[med-svn] [ginkgocadx] 02/06: New upstream version 3.8.6

Gert Wollny gewo at moszumanska.debian.org
Sun Sep 24 08:13:17 UTC 2017


This is an automated email from the git hooks/post-receive script.

gewo pushed a commit to branch master
in repository ginkgocadx.

commit 7761510fb9f29c5b723604134b3b70fb1ea0b8d8
Author: Gert Wollny <gewo at debian.org>
Date:   Sun Sep 24 08:02:12 2017 +0000

    New upstream version 3.8.6
---
 .gitignore                                         |      4 +
 .travis.yml                                        |     37 +
 AUTHORS                                            |      7 +
 CMake/LinuxProperties.cmake                        |    281 +
 CMake/MacProperties.cmake                          |    111 +
 CMake/PrvExtDeps.cmake                             |      1 +
 CMake/SysDefs.cmake                                |     93 +
 CMake/WinProperties.cmake                          |      4 +
 CMakeLists.txt                                     |    195 +
 ChangeLog                                          |    515 +
 LGPL3.txt                                          |    165 +
 README.md                                          |     90 +
 cadxcore/CMakeLists.txt                            |    330 +
 cadxcore/Info.plist.in                             |     57 +
 cadxcore/License.txt                               |    165 +
 cadxcore/VTKInria3D/vtkINRIA3DConfigure.h          |      6 +
 .../VTKInria3D/vtkVISUManagement/lut/Asymmetry.h   |    282 +
 .../VTKInria3D/vtkVISUManagement/lut/BlackBody.h   |    792 +
 .../VTKInria3D/vtkVISUManagement/lut/Cardiac.h     |    792 +
 cadxcore/VTKInria3D/vtkVISUManagement/lut/Flow.h   |    792 +
 .../VTKInria3D/vtkVISUManagement/lut/GEColor.h     |    792 +
 .../VTKInria3D/vtkVISUManagement/lut/GrayRainbow.h |    792 +
 .../VTKInria3D/vtkVISUManagement/lut/HotGreen.h    |    792 +
 .../VTKInria3D/vtkVISUManagement/lut/HotIron.h     |    792 +
 .../VTKInria3D/vtkVISUManagement/lut/HotMetal.h    |    792 +
 cadxcore/VTKInria3D/vtkVISUManagement/lut/LONI.h   |    229 +
 cadxcore/VTKInria3D/vtkVISUManagement/lut/LONI2.h  |    144 +
 .../VTKInria3D/vtkVISUManagement/lut/PERFUSION.h   |    783 +
 .../VTKInria3D/vtkVISUManagement/lut/Spectrum.h    |    792 +
 cadxcore/VTKInria3D/vtkVISUManagement/lut/Stern.h  |    792 +
 .../VTKInria3D/vtkVISUManagement/lut/VRBones.h     |    792 +
 .../vtkVISUManagement/lut/VRMusclesBones.h         |    792 +
 .../vtkVISUManagement/lut/VRRedVessels.h           |    792 +
 .../vtkVISUManagement/vtkLookupTableManager.cpp    |    617 +
 .../vtkVISUManagement/vtkLookupTableManager.h      |    122 +
 .../wxVTK/wxVTKRenderWindowInteractor.cpp          |   1419 +
 .../VTKInria3D/wxVTK/wxVTKRenderWindowInteractor.h |    236 +
 cadxcore/api/api.h                                 |     63 +
 cadxcore/api/apitest.h                             |     39 +
 cadxcore/api/autoptr.cpp                           |     40 +
 cadxcore/api/autoptr.h                             |    547 +
 cadxcore/api/cloud.h                               |     23 +
 cadxcore/api/controllers/anonusagestatsids.h       |     56 +
 cadxcore/api/controllers/icommandcontroller.cpp    |     47 +
 cadxcore/api/controllers/icommandcontroller.h      |     66 +
 .../api/controllers/iconfigurationcontroller.cpp   |     43 +
 .../api/controllers/iconfigurationcontroller.h     |    119 +
 cadxcore/api/controllers/icontroladoracciones.cpp  |     69 +
 cadxcore/api/controllers/icontroladoracciones.h    |     72 +
 .../api/controllers/icontroladorautenticacion.h    |     69 +
 cadxcore/api/controllers/icontroladorcarga.cpp     |     46 +
 cadxcore/api/controllers/icontroladorcarga.h       |    117 +
 cadxcore/api/controllers/icontroladorextensiones.h |    113 +
 .../controllers/icontroladorinternacionalizacion.h |     36 +
 cadxcore/api/controllers/icontroladorlog.cpp       |     41 +
 cadxcore/api/controllers/icontroladorlog.h         |    138 +
 cadxcore/api/controllers/icontroladorpermisos.cpp  |     46 +
 cadxcore/api/controllers/icontroladorpermisos.h    |    182 +
 cadxcore/api/controllers/icontroladorvistas.cpp    |     41 +
 cadxcore/api/controllers/icontroladorvistas.h      |     78 +
 cadxcore/api/controllers/ieventscontroller.cpp     |     41 +
 cadxcore/api/controllers/ieventscontroller.h       |     71 +
 cadxcore/api/controllers/ihistorycontroller.cpp    |    126 +
 cadxcore/api/controllers/ihistorycontroller.h      |    213 +
 cadxcore/api/controllers/imodulecontroller.cpp     |    249 +
 cadxcore/api/controllers/imodulecontroller.h       |    215 +
 cadxcore/api/controllers/ipacscontroller.cpp       |     45 +
 cadxcore/api/controllers/ipacscontroller.h         |    187 +
 cadxcore/api/controllers/iprogresscontroller.cpp   |     76 +
 cadxcore/api/controllers/iprogresscontroller.h     |     83 +
 .../controllers/proxies/ipipelineproperties.cpp    |     65 +
 .../api/controllers/proxies/ipipelineproperties.h  |    112 +
 cadxcore/api/dicom/dcmdictionary.h                 |   3363 +
 cadxcore/api/dicom/dcmuiddictionary.h              |    475 +
 cadxcore/api/dicom/dicom_legacy.h                  |     15 +
 cadxcore/api/dicom/dicomdataset.cpp                |    199 +
 cadxcore/api/dicom/dicomdataset.h                  |    111 +
 cadxcore/api/dicom/icustomassociation.cpp          |     36 +
 cadxcore/api/dicom/icustomassociation.h            |     67 +
 cadxcore/api/dicom/idicom.cpp                      |    310 +
 cadxcore/api/dicom/idicom.h                        |    159 +
 cadxcore/api/dicom/idicomconformance.cpp           |    478 +
 cadxcore/api/dicom/idicomconformance.h             |    225 +
 cadxcore/api/dicom/idicomizador.h                  |    122 +
 cadxcore/api/dicom/idicommanager.h                 |    105 +
 cadxcore/api/dicom/imodelodicom.h                  |    829 +
 cadxcore/api/doxmainpage.h                         |     79 +
 cadxcore/api/globals.h                             |     58 +
 cadxcore/api/helpers/aetwildcards.cpp              |    167 +
 cadxcore/api/helpers/aetwildcards.h                |     35 +
 cadxcore/api/helpers/helpertexto.cpp               |    341 +
 cadxcore/api/helpers/helpertexto.h                 |     73 +
 cadxcore/api/helpers/prioritylist.h                |    146 +
 cadxcore/api/iannotator.cpp                        |    314 +
 cadxcore/api/iannotator.h                          |     61 +
 cadxcore/api/ibutton.cpp                           |    121 +
 cadxcore/api/ibutton.h                             |     88 +
 cadxcore/api/icacheimagenes.h                      |    104 +
 cadxcore/api/icommand.cpp                          |    261 +
 cadxcore/api/icommand.h                            |    204 +
 cadxcore/api/iconfiguracion.h                      |     71 +
 cadxcore/api/icontexto.cpp                         |    194 +
 cadxcore/api/icontexto.h                           |    127 +
 cadxcore/api/icontract.cpp                         |     72 +
 cadxcore/api/icontract.h                           |     89 +
 cadxcore/api/ientorno.cpp                          |     40 +
 cadxcore/api/ientorno.h                            |    180 +
 cadxcore/api/ievento.cpp                           |    636 +
 cadxcore/api/ievento.h                             |    364 +
 cadxcore/api/iexception.cpp                        |     76 +
 cadxcore/api/iexception.h                          |     75 +
 cadxcore/api/ihistorytool.cpp                      |    137 +
 cadxcore/api/ihistorytool.h                        |     84 +
 cadxcore/api/ihl7parser.cpp                        |     30 +
 cadxcore/api/ihl7parser.h                          |   1634 +
 cadxcore/api/ilock.cpp                             |    107 +
 cadxcore/api/ilock.h                               |    116 +
 cadxcore/api/imgproxy.h                            |    169 +
 cadxcore/api/imodelohl7.cpp                        |    320 +
 cadxcore/api/imodelohl7.h                          |    989 +
 cadxcore/api/imodelointegracion.cpp                |     88 +
 cadxcore/api/imodelointegracion.h                  |    280 +
 cadxcore/api/imodulo.h                             |     60 +
 cadxcore/api/init.cpp                              |     61 +
 cadxcore/api/init.h                                |     33 +
 cadxcore/api/initwx.cpp                            |    761 +
 cadxcore/api/initwx.h                              |     97 +
 cadxcore/api/instantiations/instantiations.cpp     |     41 +
 cadxcore/api/instantiations/instantiations.h       |     18 +
 cadxcore/api/integration/dict.h                    |     80 +
 cadxcore/api/integration/template.h                |     45 +
 cadxcore/api/internal.h                            |     31 +
 .../internationalization/internationalization.cpp  |     33 +
 .../internationalization/internationalization.h    |     28 +
 cadxcore/api/ioverlay.h                            |     52 +
 cadxcore/api/iproxynotificadorprogreso.h           |     38 +
 cadxcore/api/istudycontext.cpp                     |    649 +
 cadxcore/api/istudycontext.h                       |    210 +
 cadxcore/api/iventanaprogreso.h                    |     34 +
 cadxcore/api/ivista.cpp                            |    165 +
 cadxcore/api/ivista.h                              |    164 +
 cadxcore/api/iwaitqueue.cpp                        |    229 +
 cadxcore/api/iwaitqueue.h                          |    172 +
 cadxcore/api/iwidgets.cpp                          |    363 +
 cadxcore/api/iwidgets.h                            |    553 +
 cadxcore/api/iwidgetsmanager.cpp                   |    103 +
 cadxcore/api/iwidgetsmanager.h                     |    261 +
 cadxcore/api/iwidgetsproperties.h                  |    285 +
 cadxcore/api/iwidgetsrenderer.cpp                  |    116 +
 cadxcore/api/iwidgetsrenderer.h                    |    161 +
 cadxcore/api/iwizard.cpp                           |    144 +
 cadxcore/api/iwizard.h                             |     87 +
 cadxcore/api/math/geometry.h                       |   1659 +
 cadxcore/api/math/geometry3d.h                     |   1103 +
 cadxcore/api/math/geometry_defs.h                  |     42 +
 cadxcore/api/observers/ieventsobserver.cpp         |     49 +
 cadxcore/api/observers/ieventsobserver.h           |     69 +
 cadxcore/api/observers/iextensionsobserver.cpp     |     41 +
 cadxcore/api/observers/iextensionsobserver.h       |     56 +
 cadxcore/api/observers/iviewsobserver.h            |     56 +
 cadxcore/api/observers/iwidgetsobserver.h          |     79 +
 cadxcore/api/threads/thread.cpp                    |    214 +
 cadxcore/api/threads/thread.h                      |     97 +
 cadxcore/api/toolsystem/itool.cpp                  |    128 +
 cadxcore/api/toolsystem/itool.h                    |    164 +
 cadxcore/api/toolsystem/itoolcontroller.cpp        |     37 +
 cadxcore/api/toolsystem/itoolcontroller.h          |     93 +
 cadxcore/api/toolsystem/itoolsregistry.cpp         |     58 +
 cadxcore/api/toolsystem/itoolsregistry.h           |    105 +
 cadxcore/api/toolsystem/iwidgettool.cpp            |     55 +
 cadxcore/api/toolsystem/iwidgettool.h              |     62 +
 cadxcore/api/ubication.cpp                         |     68 +
 cadxcore/api/ubication.h                           |     54 +
 cadxcore/api/utils/iginkgomatrix4x4.cpp            |     39 +
 cadxcore/api/utils/iginkgomatrix4x4.h              |     80 +
 cadxcore/api/westilo.h                             |    401 +
 cadxcore/api/widgetserializable.cpp                |    145 +
 cadxcore/api/widgetserializable.h                  |     65 +
 cadxcore/cadxcore-Info.plist                       |     26 +
 cadxcore/cadxcore.vcxproj                          |   1526 +
 cadxcore/cadxcore.vcxproj.filters                  |   2892 +
 cadxcore/commands/DialogoPathsSobreescribir.fbp    |    560 +
 cadxcore/commands/DicomizationComplete.fbp         |    500 +
 cadxcore/commands/acquirefromurlcommand.cpp        |    155 +
 cadxcore/commands/acquirefromurlcommand.h          |     66 +
 cadxcore/commands/autocleaningcommand.cpp          |    185 +
 cadxcore/commands/autocleaningcommand.h            |     58 +
 cadxcore/commands/cloudcommand.cpp                 |    514 +
 cadxcore/commands/cloudcommand.h                   |    105 +
 cadxcore/commands/comandoactualizaciones.cpp       |    176 +
 cadxcore/commands/comandoactualizaciones.h         |     76 +
 cadxcore/commands/comandocalibrado.h               |     84 +
 cadxcore/commands/comandocarga.cpp                 |    155 +
 cadxcore/commands/comandocarga.h                   |     70 +
 cadxcore/commands/comandodestruirvista.cpp         |     66 +
 cadxcore/commands/comandodestruirvista.h           |     62 +
 cadxcore/commands/comandoexportacion.cpp           |    271 +
 cadxcore/commands/comandoexportacion.h             |     71 +
 cadxcore/commands/comandoincluirhistorial.cpp      |    330 +
 cadxcore/commands/comandoincluirhistorial.h        |     83 +
 cadxcore/commands/comandopacs.cpp                  |    164 +
 cadxcore/commands/comandopacs.h                    |     85 +
 cadxcore/commands/commandsynchronizewithgui.cpp    |     58 +
 cadxcore/commands/commandsynchronizewithgui.h      |     62 +
 cadxcore/commands/dbmigrationcommand.cpp           |    141 +
 cadxcore/commands/dbmigrationcommand.h             |     57 +
 .../commands/dialogopathssobreescribirbase.cpp     |     83 +
 cadxcore/commands/dialogopathssobreescribirbase.h  |     64 +
 cadxcore/commands/dicomizationcompletebase.cpp     |     86 +
 cadxcore/commands/dicomizationcompletebase.h       |     71 +
 cadxcore/commands/dicomizecommand.cpp              |    532 +
 cadxcore/commands/dicomizecommand.h                |    102 +
 cadxcore/commands/exporttodicomdircommand.cpp      |    466 +
 cadxcore/commands/exporttodicomdircommand.h        |     81 +
 .../commands/incomingdicomassociationcommand.cpp   |    486 +
 .../commands/incomingdicomassociationcommand.h     |     71 +
 cadxcore/commands/inotificadorcalibrado.h          |     42 +
 cadxcore/commands/linkhistorycommand.cpp           |    190 +
 cadxcore/commands/linkhistorycommand.h             |     73 +
 cadxcore/commands/openremovableunit.cpp            |    165 +
 cadxcore/commands/openremovableunit.h              |     66 +
 cadxcore/commands/pacsdownloadcommand.cpp          |    198 +
 cadxcore/commands/pacsdownloadcommand.h            |     80 +
 cadxcore/commands/pdfextractercommand.cpp          |    148 +
 cadxcore/commands/pdfextractercommand.h            |     61 +
 .../commands/secondarycapturedicomizecommand.cpp   |     95 +
 .../commands/secondarycapturedicomizecommand.h     |     48 +
 cadxcore/commands/sendhl7command.cpp               |    265 +
 cadxcore/commands/sendhl7command.h                 |     58 +
 cadxcore/commands/sendpacscommand.cpp              |    243 +
 cadxcore/commands/sendpacscommand.h                |     69 +
 cadxcore/commands/synchronizationcommand.cpp       |    187 +
 cadxcore/commands/synchronizationcommand.h         |     79 +
 cadxcore/commands/thumbnailscommand.cpp            |    524 +
 cadxcore/commands/thumbnailscommand.h              |     59 +
 cadxcore/endpoint/address.cpp                      |    491 +
 cadxcore/endpoint/address.h                        |    289 +
 cadxcore/endpoint/address.html                     |    358 +
 cadxcore/endpoint/alt.html                         |     55 +
 cadxcore/endpoint/endpoint.cpp                     |   1197 +
 cadxcore/endpoint/endpoint.h                       |    240 +
 cadxcore/endpoint/endpoint.html                    |    271 +
 cadxcore/endpoint/eptest/chat/chat.cpp             |     75 +
 cadxcore/endpoint/eptest/eptest.cpp                |     93 +
 cadxcore/endpoint/eptest/irc.cpp                   |     48 +
 cadxcore/endpoint/eptest/test.cpp                  |     75 +
 cadxcore/endpoint/eptest/w32test/ReadMe.txt        |     68 +
 cadxcore/endpoint/eptest/w32test/StdAfx.cpp        |     31 +
 cadxcore/endpoint/eptest/w32test/StdAfx.h          |     56 +
 cadxcore/endpoint/eptest/w32test/w32test.cpp       |     37 +
 cadxcore/endpoint/exception.h                      |     34 +
 cadxcore/endpoint/icmp.txt                         |     86 +
 cadxcore/endpoint/inet_ntop.c                      |    217 +
 cadxcore/endpoint/inet_ntop.h                      |     25 +
 cadxcore/endpoint/inet_ntop_ipv4.c                 |     38 +
 cadxcore/endpoint/interfaces.cpp                   |    114 +
 cadxcore/endpoint/multicast.txt                    |     76 +
 cadxcore/endpoint/nc-bug.txt                       |     14 +
 cadxcore/endpoint/protocols.h                      |    153 +
 cadxcore/endpoint/sockatmark.cpp                   |     33 +
 cadxcore/endpoint/tricks.html                      |     82 +
 cadxcore/eventos/eventosginkgo.h                   |     44 +
 cadxcore/eventos/hidesplashwindow.h                |     55 +
 cadxcore/eventos/integration.h                     |     71 +
 cadxcore/eventos/mensajes.h                        |    107 +
 cadxcore/eventos/modificacionfichero.h             |    109 +
 cadxcore/eventos/modificacionimagen.h              |    339 +
 cadxcore/eventos/modificacionwidget.h              |     92 +
 cadxcore/eventos/progresocomando.h                 |    111 +
 cadxcore/eventos/render.h                          |     58 +
 cadxcore/eventos/scgenerated.h                     |     69 +
 cadxcore/eventos/toolevents.h                      |    159 +
 cadxcore/eventos/updateavailable.h                 |    102 +
 cadxcore/eventos/views.h                           |     76 +
 .../export/contracts/ipixelsbluringcontract.cpp    |     64 +
 cadxcore/export/contracts/ipixelsbluringcontract.h |     51 +
 .../contracts/ipixelsbluringcontractable.cpp       |     45 +
 .../export/contracts/ipixelsbluringcontractable.h  |     43 +
 cadxcore/export/contracts/irulecontract.cpp        |     29 +
 cadxcore/export/contracts/irulecontract.h          |     48 +
 cadxcore/export/contracts/irulecontractable.cpp    |     45 +
 cadxcore/export/contracts/irulecontractable.h      |     43 +
 cadxcore/export/contracts/islidercontract.cpp      |     37 +
 cadxcore/export/contracts/islidercontract.h        |     53 +
 cadxcore/export/contracts/islidercontractable.cpp  |     45 +
 cadxcore/export/contracts/islidercontractable.h    |     44 +
 cadxcore/export/contracts/iviewcontract.cpp        |     27 +
 cadxcore/export/contracts/iviewcontract.h          |     43 +
 cadxcore/export/contracts/iviewcontractable.cpp    |     42 +
 cadxcore/export/contracts/iviewcontractable.h      |     44 +
 cadxcore/export/contracts/iwidgetscontract.cpp     |     74 +
 cadxcore/export/contracts/iwidgetscontract.h       |     74 +
 cadxcore/export/contracts/iwidgetscontractable.cpp |     45 +
 cadxcore/export/contracts/iwidgetscontractable.h   |     44 +
 .../export/contracts/iwindowlayoutcontract.cpp     |     76 +
 cadxcore/export/contracts/iwindowlayoutcontract.h  |     58 +
 .../export/contracts/iwindowlayoutcontractable.cpp |     43 +
 .../export/contracts/iwindowlayoutcontractable.h   |     44 +
 cadxcore/export/contracts/iwindowlevelcontract.cpp |    256 +
 cadxcore/export/contracts/iwindowlevelcontract.h   |    105 +
 .../export/contracts/iwindowlevelcontractable.cpp  |     45 +
 .../export/contracts/iwindowlevelcontractable.h    |     43 +
 cadxcore/export/tagsprivadoscomunes.h              |     35 +
 cadxcore/export/tools/iaddfiletohistorytool.cpp    |     29 +
 cadxcore/export/tools/iaddfiletohistorytool.h      |     37 +
 cadxcore/export/tools/iangletool.cpp               |     30 +
 cadxcore/export/tools/iangletool.h                 |     46 +
 cadxcore/export/tools/ibrightnesscontrasttool.cpp  |     30 +
 cadxcore/export/tools/ibrightnesscontrasttool.h    |     41 +
 cadxcore/export/tools/icamerarotationtool.cpp      |     29 +
 cadxcore/export/tools/icamerarotationtool.h        |     38 +
 cadxcore/export/tools/icolormaptool.cpp            |     29 +
 cadxcore/export/tools/icolormaptool.h              |     40 +
 .../export/tools/icopyimagetoclipboardtool.cpp     |     29 +
 cadxcore/export/tools/icopyimagetoclipboardtool.h  |     37 +
 cadxcore/export/tools/icornerannotationstool.cpp   |     30 +
 cadxcore/export/tools/icornerannotationstool.h     |     40 +
 cadxcore/export/tools/idetachwindowtool.cpp        |     29 +
 cadxcore/export/tools/idetachwindowtool.h          |     40 +
 cadxcore/export/tools/iherramientascore.h          |     87 +
 cadxcore/export/tools/iimageexporttool.cpp         |     29 +
 cadxcore/export/tools/iimageexporttool.h           |     40 +
 cadxcore/export/tools/imarkertool.cpp              |     31 +
 cadxcore/export/tools/imarkertool.h                |     46 +
 cadxcore/export/tools/imetricgridtool.cpp          |     30 +
 cadxcore/export/tools/imetricgridtool.h            |     40 +
 cadxcore/export/tools/inotetool.cpp                |     30 +
 cadxcore/export/tools/inotetool.h                  |     46 +
 cadxcore/export/tools/ipacsuploadtool.cpp          |     29 +
 cadxcore/export/tools/ipacsuploadtool.h            |     37 +
 cadxcore/export/tools/ipixelsbluringtool.cpp       |     29 +
 cadxcore/export/tools/ipixelsbluringtool.h         |     40 +
 cadxcore/export/tools/ipointertool.cpp             |     30 +
 cadxcore/export/tools/ipointertool.h               |     42 +
 cadxcore/export/tools/iqueryretrievetool.cpp       |     29 +
 cadxcore/export/tools/iqueryretrievetool.h         |     37 +
 cadxcore/export/tools/iresettool.cpp               |     29 +
 cadxcore/export/tools/iresettool.h                 |     40 +
 cadxcore/export/tools/irotateandfliptool.cpp       |     29 +
 cadxcore/export/tools/irotateandfliptool.h         |     40 +
 cadxcore/export/tools/iruletool.cpp                |     30 +
 cadxcore/export/tools/iruletool.h                  |     42 +
 cadxcore/export/tools/isecondarycapturetool.cpp    |     29 +
 cadxcore/export/tools/isecondarycapturetool.h      |     40 +
 cadxcore/export/tools/ishowhistorytool.cpp         |     29 +
 cadxcore/export/tools/ishowhistorytool.h           |     40 +
 cadxcore/export/tools/ishowtagstool.cpp            |     29 +
 cadxcore/export/tools/ishowtagstool.h              |     40 +
 cadxcore/export/tools/isimpleprinttool.cpp         |     29 +
 cadxcore/export/tools/isimpleprinttool.h           |     37 +
 cadxcore/export/tools/istartdicomizationtool.cpp   |     29 +
 cadxcore/export/tools/istartdicomizationtool.h     |     37 +
 cadxcore/export/tools/itoolpan.cpp                 |     30 +
 cadxcore/export/tools/itoolpan.h                   |     41 +
 cadxcore/export/tools/itoolslider.cpp              |     30 +
 cadxcore/export/tools/itoolslider.h                |     41 +
 cadxcore/export/tools/itoolwindowlevel.cpp         |     30 +
 cadxcore/export/tools/itoolwindowlevel.h           |     41 +
 cadxcore/export/tools/itoolzoom.cpp                |     30 +
 cadxcore/export/tools/itoolzoom.h                  |     42 +
 cadxcore/export/tools/itrackballtool.cpp           |     30 +
 cadxcore/export/tools/itrackballtool.h             |     41 +
 cadxcore/export/tools/iundotool.cpp                |     30 +
 cadxcore/export/tools/iundotool.h                  |     42 +
 cadxcore/export/tools/ivideotool.cpp               |     30 +
 cadxcore/export/tools/ivideotool.h                 |     41 +
 cadxcore/export/tools/iwindowlayouttool.cpp        |     30 +
 cadxcore/export/tools/iwindowlayouttool.h          |     40 +
 cadxcore/itk/itkImageToVTKImageFilter.h            |    179 +
 cadxcore/itk/itkRGBImageToVTKImageFilter.h         |    286 +
 cadxcore/itk/itkVTKImageToImageFilter.h            |    195 +
 cadxcore/lang/cadxcore.pot                         |   6278 +
 cadxcore/lang/de/cadxcore.mo                       |    Bin 0 -> 90632 bytes
 cadxcore/lang/de/cadxcore.po                       |   7751 ++
 cadxcore/lang/de/wxstd.mo                          |    Bin 0 -> 144126 bytes
 cadxcore/lang/de/wxstd.po                          |   8986 ++
 cadxcore/lang/el/cadxcore.mo                       |    Bin 0 -> 1949 bytes
 cadxcore/lang/el/cadxcore.po                       |   6517 +
 cadxcore/lang/el/wxstd.mo                          |    Bin 0 -> 94252 bytes
 cadxcore/lang/el/wxstd.po                          |   9455 ++
 cadxcore/lang/es/cadxcore.mo                       |    Bin 0 -> 103686 bytes
 cadxcore/lang/es/cadxcore.po                       |   8697 ++
 cadxcore/lang/es/wxstd.mo                          |    Bin 0 -> 99822 bytes
 cadxcore/lang/es/wxstd.po                          |   9244 ++
 cadxcore/lang/fr/cadxcore.mo                       |    Bin 0 -> 97433 bytes
 cadxcore/lang/fr/cadxcore.po                       |   6856 +
 cadxcore/lang/fr/wxstd.mo                          |    Bin 0 -> 135659 bytes
 cadxcore/lang/fr/wxstd.po                          |   9056 ++
 cadxcore/lang/ja/cadxcore.mo                       |    Bin 0 -> 73249 bytes
 cadxcore/lang/ja/cadxcore.po                       |   7954 ++
 cadxcore/lang/ja/wxstd.mo                          |    Bin 0 -> 138435 bytes
 cadxcore/lang/ja/wxstd.po                          |   9171 ++
 cadxcore/lang/pl/cadxcore.mo                       |    Bin 0 -> 58896 bytes
 cadxcore/lang/pl/cadxcore.po                       |   7663 ++
 cadxcore/lang/pl/wxstd.mo                          |    Bin 0 -> 130045 bytes
 cadxcore/lang/pl/wxstd.po                          |   9155 ++
 cadxcore/lang/pt/cadxcore.mo                       |    Bin 0 -> 18079 bytes
 cadxcore/lang/pt/cadxcore.po                       |   7416 ++
 cadxcore/lang/pt/wxstd.mo                          |    Bin 0 -> 100454 bytes
 cadxcore/lang/pt/wxstd.po                          |   9210 ++
 cadxcore/lang/pt_BR/cadxcore.mo                    |    Bin 0 -> 32607 bytes
 cadxcore/lang/pt_BR/cadxcore.po                    |   7480 ++
 cadxcore/lang/pt_BR/wxstd.mo                       |    Bin 0 -> 143365 bytes
 cadxcore/lang/pt_BR/wxstd.po                       |   9009 ++
 cadxcore/lang/sr/cadxcore.mo                       |    Bin 0 -> 14016 bytes
 cadxcore/lang/sr/cadxcore.po                       |   6896 +
 cadxcore/lang/tr/cadxcore.mo                       |    Bin 0 -> 2264 bytes
 cadxcore/lang/tr/cadxcore.po                       |   6573 +
 cadxcore/lang/tr/wxstd.mo                          |    Bin 0 -> 139295 bytes
 cadxcore/lang/tr/wxstd.po                          |   8413 ++
 cadxcore/lang/zh_CN/cadxcore.mo                    |    Bin 0 -> 556 bytes
 cadxcore/lang/zh_CN/cadxcore.po                    |   6296 +
 cadxcore/lang/zh_CN/wxstd.mo                       |    Bin 0 -> 127207 bytes
 cadxcore/lang/zh_CN/wxstd.po                       |   8912 ++
 cadxcore/main/controllers/anonusagestats.cpp       |     76 +
 cadxcore/main/controllers/anonusagestats.h         |     76 +
 .../main/controllers/anonymizationcontroller.cpp   |     99 +
 .../main/controllers/anonymizationcontroller.h     |     46 +
 .../main/controllers/autocleaningcontroller.cpp    |    126 +
 cadxcore/main/controllers/autocleaningcontroller.h |     55 +
 cadxcore/main/controllers/commandcontroller.cpp    |    888 +
 cadxcore/main/controllers/commandcontroller.h      |    177 +
 .../main/controllers/configurationcontroller.cpp   |    861 +
 .../main/controllers/configurationcontroller.h     |    125 +
 cadxcore/main/controllers/controladoracciones.cpp  |    163 +
 cadxcore/main/controllers/controladoracciones.h    |     73 +
 .../main/controllers/controladorautenticacion.cpp  |    458 +
 .../main/controllers/controladorautenticacion.h    |     88 +
 cadxcore/main/controllers/controladorbbddhl7.cpp   |    345 +
 cadxcore/main/controllers/controladorbbddhl7.h     |    104 +
 cadxcore/main/controllers/controladorcarga.cpp     |    981 +
 cadxcore/main/controllers/controladorcarga.h       |     57 +
 cadxcore/main/controllers/controladorenviohl7.cpp  |    176 +
 cadxcore/main/controllers/controladorenviohl7.h    |     57 +
 cadxcore/main/controllers/controladoreventos.cpp   |    315 +
 cadxcore/main/controllers/controladoreventos.h     |    101 +
 .../main/controllers/controladorextensiones.cpp    |    598 +
 cadxcore/main/controllers/controladorextensiones.h |     68 +
 cadxcore/main/controllers/controladorhl7.cpp       |    114 +
 cadxcore/main/controllers/controladorhl7.h         |     61 +
 .../controladorinternacionalizacion.cpp            |     92 +
 .../controllers/controladorinternacionalizacion.h  |     46 +
 cadxcore/main/controllers/controladorlog.cpp       |    251 +
 cadxcore/main/controllers/controladorlog.h         |     74 +
 cadxcore/main/controllers/controladorpermisos.cpp  |    312 +
 cadxcore/main/controllers/controladorpermisos.h    |    114 +
 cadxcore/main/controllers/controladorvistas.cpp    |    541 +
 cadxcore/main/controllers/controladorvistas.h      |    123 +
 .../main/controllers/dcmtk/dicomassociation.cpp    |    466 +
 cadxcore/main/controllers/dcmtk/dicomassociation.h |    315 +
 .../controllers/dcmtk/dicomcustomassociation.cpp   |    737 +
 .../controllers/dcmtk/dicomcustomassociation.h     |    111 +
 .../controllers/dcmtk/dicomechoassociation.cpp     |     56 +
 .../main/controllers/dcmtk/dicomechoassociation.h  |     39 +
 .../controllers/dcmtk/dicomfindassociation.cpp     |    233 +
 .../main/controllers/dcmtk/dicomfindassociation.h  |    164 +
 .../main/controllers/dcmtk/dicomgetassociation.cpp |    832 +
 .../main/controllers/dcmtk/dicomgetassociation.h   |    110 +
 cadxcore/main/controllers/dcmtk/dicomimg2dcm.cpp   |    836 +
 cadxcore/main/controllers/dcmtk/dicomimg2dcm.h     |    118 +
 .../controllers/dcmtk/dicommoveassociation.cpp     |    162 +
 .../main/controllers/dcmtk/dicommoveassociation.h  |     52 +
 cadxcore/main/controllers/dcmtk/dicomnetclient.h   |    599 +
 cadxcore/main/controllers/dcmtk/dicomnetwork.cpp   |    303 +
 cadxcore/main/controllers/dcmtk/dicomnetwork.h     |    106 +
 .../controllers/dcmtk/dicomprintassociation.cpp    |   1211 +
 .../main/controllers/dcmtk/dicomprintassociation.h |    116 +
 cadxcore/main/controllers/dcmtk/dicomservers.cpp   |    471 +
 cadxcore/main/controllers/dcmtk/dicomservers.h     |    183 +
 cadxcore/main/controllers/dcmtk/dicomservice.cpp   |    330 +
 cadxcore/main/controllers/dcmtk/dicomservice.h     |    230 +
 .../controllers/dcmtk/dicomstoreassociation.cpp    |   1390 +
 .../main/controllers/dcmtk/dicomstoreassociation.h |    108 +
 cadxcore/main/controllers/dcmtk/ginkgouid.cpp      |     65 +
 cadxcore/main/controllers/dcmtk/ginkgouid.h        |     43 +
 .../main/controllers/dcmtk/helpercompresion.cpp    |    658 +
 cadxcore/main/controllers/dcmtk/helpercompresion.h |     26 +
 cadxcore/main/controllers/dcmtk/helpers.cpp        |     40 +
 cadxcore/main/controllers/dcmtk/helpers.h          |     26 +
 cadxcore/main/controllers/dcmtk/istorecallback.h   |     36 +
 .../main/controllers/dcmtk/libi2d/d2dcommon.cpp    |    114 +
 cadxcore/main/controllers/dcmtk/libi2d/d2dcommon.h |    110 +
 cadxcore/main/controllers/dcmtk/libi2d/d2dsource.h |     82 +
 .../main/controllers/dcmtk/libi2d/document2dcm.cpp |    635 +
 .../main/controllers/dcmtk/libi2d/document2dcm.h   |    224 +
 cadxcore/main/controllers/dcmtk/libi2d/foooutpl.h  |     94 +
 cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.cpp |    305 +
 cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.h   |    152 +
 cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.cpp |    940 +
 cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.h   |    402 +
 cadxcore/main/controllers/dcmtk/libi2d/i2dles.cpp  |     88 +
 cadxcore/main/controllers/dcmtk/libi2d/i2dles.h    |    125 +
 cadxcore/main/controllers/dcmtk/libi2d/i2doutpl.h  |    137 +
 .../main/controllers/dcmtk/libi2d/i2dplnsc.cpp     |    298 +
 cadxcore/main/controllers/dcmtk/libi2d/i2dplnsc.h  |    144 +
 cadxcore/main/controllers/dcmtk/libi2d/i2dplsc.cpp |    112 +
 cadxcore/main/controllers/dcmtk/libi2d/i2dplsc.h   |    111 +
 .../main/controllers/dcmtk/libi2d/i2dplvlp.cpp     |    132 +
 cadxcore/main/controllers/dcmtk/libi2d/i2dplvlp.h  |    111 +
 .../main/controllers/dcmtk/libi2d/pdf2dsource.cpp  |    173 +
 .../main/controllers/dcmtk/libi2d/pdf2dsource.h    |    115 +
 cadxcore/main/controllers/dcmtk/ofstd/offile.h     |    909 +
 cadxcore/main/controllers/dcmtk/tls/gtlslayer.cc   |    164 +
 cadxcore/main/controllers/dcmtk/tls/gtlslayer.h    |     73 +
 cadxcore/main/controllers/dcmtk/tls/tls.h          |     26 +
 cadxcore/main/controllers/dicommanager.cpp         |   1299 +
 cadxcore/main/controllers/dicommanager.h           |    138 +
 .../main/controllers/hangingprotocolcontroller.cpp |    891 +
 .../main/controllers/hangingprotocolcontroller.h   |    299 +
 cadxcore/main/controllers/historycontroller.cpp    |   2552 +
 cadxcore/main/controllers/historycontroller.h      |    313 +
 .../main/controllers/historytoolscontroller.cpp    |    183 +
 cadxcore/main/controllers/historytoolscontroller.h |     97 +
 cadxcore/main/controllers/inactivitycontroller.cpp |    217 +
 cadxcore/main/controllers/inactivitycontroller.h   |     62 +
 .../main/controllers/integrationcontroller.cpp     |    852 +
 cadxcore/main/controllers/integrationcontroller.h  |     93 +
 .../main/controllers/log4cplus/guiappender.cpp     |    185 +
 cadxcore/main/controllers/log4cplus/guiappender.h  |     84 +
 cadxcore/main/controllers/log4cplus/logdefines.h   |     91 +
 .../controllers/modalitysettingscontroller.cpp     |    644 +
 .../main/controllers/modalitysettingscontroller.h  |    208 +
 cadxcore/main/controllers/pacscontroller.cpp       |   1684 +
 cadxcore/main/controllers/pacscontroller.h         |    195 +
 cadxcore/main/controllers/parserxmlenglish.cpp     |    551 +
 cadxcore/main/controllers/parserxmlenglish.h       |     39 +
 cadxcore/main/controllers/parserxmlspanish.cpp     |    557 +
 cadxcore/main/controllers/parserxmlspanish.h       |     42 +
 cadxcore/main/controllers/permisoscore.h           |     16 +
 .../main/controllers/smartretrievecontroller.cpp   |    285 +
 .../main/controllers/smartretrievecontroller.h     |     62 +
 .../main/controllers/storedqueriescontroller.cpp   |    576 +
 .../main/controllers/storedqueriescontroller.h     |    233 +
 .../main/controllers/streaming/streamingloader.cpp |   1109 +
 .../main/controllers/streaming/streamingloader.h   |    136 +
 cadxcore/main/controllers/thumbnailcontroller.cpp  |    147 +
 cadxcore/main/controllers/thumbnailcontroller.h    |     72 +
 .../controllers/windowattributescontroller.cpp     |    125 +
 .../main/controllers/windowattributescontroller.h  |     39 +
 cadxcore/main/entorno.cpp                          |    594 +
 cadxcore/main/entorno.h                            |    216 +
 .../main/gui/acquisition/DialogoAdquisicion.fbp    |   4966 +
 .../main/gui/acquisition/acquisitiontablemodel.cpp |    607 +
 .../main/gui/acquisition/acquisitiontablemodel.h   |    142 +
 .../main/gui/acquisition/dialogoadquisicion.cpp    |    917 +
 cadxcore/main/gui/acquisition/dialogoadquisicion.h |    124 +
 .../gui/acquisition/dialogoadquisicionbase.cpp     |    551 +
 .../main/gui/acquisition/dialogoadquisicionbase.h  |    226 +
 .../main/gui/acquisition/downloadagaindialog.cpp   |     73 +
 .../main/gui/acquisition/downloadagaindialog.h     |     41 +
 cadxcore/main/gui/anonymize/AnonymizePanels.fbp    |   2802 +
 cadxcore/main/gui/anonymize/anonymizedialog.cpp    |     74 +
 cadxcore/main/gui/anonymize/anonymizedialog.h      |     53 +
 cadxcore/main/gui/anonymize/anonymizepanel.cpp     |    381 +
 cadxcore/main/gui/anonymize/anonymizepanel.h       |     63 +
 cadxcore/main/gui/anonymize/anonymizepanelbase.cpp |    274 +
 cadxcore/main/gui/anonymize/anonymizepanelbase.h   |    174 +
 .../gui/configuration/PanelesConfiguracion.fbp     |  34475 +++++
 .../defaultmodalitysettingsconfigurationpanel.cpp  |    546 +
 .../defaultmodalitysettingsconfigurationpanel.h    |     66 +
 .../gui/configuration/dialogoconfiguracion.cpp     |    314 +
 .../main/gui/configuration/dialogoconfiguracion.h  |     66 +
 .../hangingprotocolconfigurationpanel.cpp          |    975 +
 .../hangingprotocolconfigurationpanel.h            |     78 +
 .../localdatabaseconfigurationpanel.cpp            |    332 +
 .../localdatabaseconfigurationpanel.h              |     69 +
 .../configuration/panelconfiguracionestacion.cpp   |    132 +
 .../gui/configuration/panelconfiguracionestacion.h |     59 +
 .../panelconfiguracionextensiones.cpp              |    158 +
 .../configuration/panelconfiguracionextensiones.h  |     61 +
 .../configuration/panelconfiguraciongeneral.cpp    |    282 +
 .../gui/configuration/panelconfiguraciongeneral.h  |     71 +
 .../gui/configuration/panelconfiguracionhce.cpp    |    163 +
 .../main/gui/configuration/panelconfiguracionhce.h |     67 +
 .../gui/configuration/panelconfiguracionpacs.cpp   |   1119 +
 .../gui/configuration/panelconfiguracionpacs.h     |     93 +
 .../configuration/panelconfiguracionpermisos.cpp   |    690 +
 .../gui/configuration/panelconfiguracionpermisos.h |     77 +
 .../configuration/panelconfiguracionseguridad.cpp  |    369 +
 .../configuration/panelconfiguracionseguridad.h    |     75 +
 .../panelconfiguracionubicaciones.cpp              |    448 +
 .../configuration/panelconfiguracionubicaciones.h  |     76 +
 .../panelconfigurationanonymization.cpp            |    122 +
 .../panelconfigurationanonymization.h              |     64 +
 .../panelesconfiguracionginkgobase.cpp             |   3373 +
 .../configuration/panelesconfiguracionginkgobase.h |   1409 +
 .../smartretrieveconfigurationpanel.cpp            |    166 +
 .../smartretrieveconfigurationpanel.h              |     60 +
 .../main/gui/countdownmessage/CountDownMessage.fbp |   1382 +
 .../main/gui/countdownmessage/countdownmessage.cpp |     91 +
 .../main/gui/countdownmessage/countdownmessage.h   |     44 +
 .../gui/countdownmessage/countdownmessagebase.cpp  |    163 +
 .../gui/countdownmessage/countdownmessagebase.h    |    101 +
 .../inactivitycountdownmessage.cpp                 |    101 +
 .../countdownmessage/inactivitycountdownmessage.h  |     45 +
 .../main/gui/dicomdirexport/dicomdirexport.fbp     |    808 +
 .../main/gui/dicomdirexport/dicomdirexportbase.cpp |    109 +
 .../main/gui/dicomdirexport/dicomdirexportbase.h   |     75 +
 .../main/gui/dicomdirexport/exportdicomdir.cpp     |    111 +
 cadxcore/main/gui/dicomdirexport/exportdicomdir.h  |     52 +
 .../gui/dicomdirmigration/DicomDirMigration.fbp    |    807 +
 .../gui/dicomdirmigration/dicomdirmigration.cpp    |    164 +
 .../main/gui/dicomdirmigration/dicomdirmigration.h |     55 +
 .../dicomdirmigration/dicomdirmigrationbase.cpp    |    125 +
 .../gui/dicomdirmigration/dicomdirmigrationbase.h  |     80 +
 cadxcore/main/gui/droptargetmainwindow.cpp         |     48 +
 cadxcore/main/gui/droptargetmainwindow.h           |     38 +
 cadxcore/main/gui/export/PasosExportacion.fbp      |    445 +
 .../main/gui/export/datospersistentesexportacion.h |     69 +
 cadxcore/main/gui/export/parametrosprincipales.cpp |    241 +
 cadxcore/main/gui/export/parametrosprincipales.h   |     76 +
 cadxcore/main/gui/export/pasosexportacionbase.cpp  |     89 +
 cadxcore/main/gui/export/pasosexportacionbase.h    |     63 +
 .../main/gui/export/wxwizardexportacionginkgo.cpp  |    156 +
 .../main/gui/export/wxwizardexportacionginkgo.h    |     62 +
 cadxcore/main/gui/ginkgocloud/downloadcloud.fbp    |   3746 +
 .../main/gui/ginkgocloud/downloadcloudbase.cpp     |    481 +
 cadxcore/main/gui/ginkgocloud/downloadcloudbase.h  |    212 +
 cadxcore/main/gui/ginkgocloud/filelinkdialog.cpp   |     78 +
 cadxcore/main/gui/ginkgocloud/filelinkdialog.h     |     42 +
 .../gui/ginkgocloud/ginkgocloudsearchdialog.cpp    |    500 +
 .../main/gui/ginkgocloud/ginkgocloudsearchdialog.h |    108 +
 .../main/gui/ginkgocloud/openginkgoclouddialog.cpp |     73 +
 .../main/gui/ginkgocloud/openginkgoclouddialog.h   |     41 +
 .../main/gui/ginkgocloud/wxtreelistctrlcloud.h     |    131 +
 cadxcore/main/gui/history3/HistoryPanel3.fbp       |   4108 +
 cadxcore/main/gui/history3/confirmdeletedialog.h   |     58 +
 cadxcore/main/gui/history3/historypanel3.cpp       |   1258 +
 cadxcore/main/gui/history3/historypanel3.h         |    144 +
 cadxcore/main/gui/history3/historypanel3base.cpp   |    511 +
 cadxcore/main/gui/history3/historypanel3base.h     |    225 +
 cadxcore/main/gui/history3/historytablemodel.cpp   |    644 +
 cadxcore/main/gui/history3/historytablemodel.h     |    117 +
 cadxcore/main/gui/history3/historytoolmenu.cpp     |    284 +
 cadxcore/main/gui/history3/historytoolmenu.h       |     68 +
 cadxcore/main/gui/history3/openwithdialog.h        |    108 +
 cadxcore/main/gui/history3/synchronizedialog.cpp   |     65 +
 cadxcore/main/gui/history3/synchronizedialog.h     |     54 +
 .../main/gui/history3/wxhistoryimagethumbnail.cpp  |     64 +
 .../main/gui/history3/wxhistoryimagethumbnail.h    |     64 +
 .../gui/hl7controlwindow/ventanaControlHL7.fbp     |   1814 +
 .../gui/hl7controlwindow/ventanacontrolhl7.cpp     |    500 +
 .../main/gui/hl7controlwindow/ventanacontrolhl7.h  |     70 +
 .../gui/hl7controlwindow/ventanacontrolhl7base.cpp |    204 +
 .../gui/hl7controlwindow/ventanacontrolhl7base.h   |    117 +
 cadxcore/main/gui/import/PasosImportacion.fbp      |   4356 +
 cadxcore/main/gui/import/generaldata.cpp           |    446 +
 cadxcore/main/gui/import/generaldata.h             |     98 +
 cadxcore/main/gui/import/importationdata.h         |     60 +
 cadxcore/main/gui/import/pasoperfilimportacion.cpp |    208 +
 cadxcore/main/gui/import/pasoperfilimportacion.h   |     75 +
 cadxcore/main/gui/import/pasosimportacionbase.cpp  |    384 +
 cadxcore/main/gui/import/pasosimportacionbase.h    |    169 +
 .../main/gui/import/selectimagesimportation.cpp    |    812 +
 cadxcore/main/gui/import/selectimagesimportation.h |    114 +
 .../main/gui/import/wxwizardimportacionginkgo.cpp  |    387 +
 .../main/gui/import/wxwizardimportacionginkgo.h    |     76 +
 cadxcore/main/gui/license/AboutDialog.fbp          |   1395 +
 cadxcore/main/gui/license/AcceptLicenseDialog.fbp  |    637 +
 cadxcore/main/gui/license/aboutdialog.cpp          |     71 +
 cadxcore/main/gui/license/aboutdialog.h            |     42 +
 cadxcore/main/gui/license/aboutdialogbase.cpp      |    177 +
 cadxcore/main/gui/license/aboutdialogbase.h        |    108 +
 cadxcore/main/gui/license/acceptlicensedialog.cpp  |     67 +
 cadxcore/main/gui/license/acceptlicensedialog.h    |     40 +
 .../main/gui/license/acceptlicensedialogbase.cpp   |     98 +
 .../main/gui/license/acceptlicensedialogbase.h     |     81 +
 .../gui/license/dialogolicenciasopensource.cpp     |   1443 +
 .../main/gui/license/dialogolicenciasopensource.h  |     60 +
 .../gui/logcontrolwindow/ventanaControlLogs.fbp    |   1076 +
 .../gui/logcontrolwindow/ventanacontrollogs.cpp    |    248 +
 .../main/gui/logcontrolwindow/ventanacontrollogs.h |     79 +
 .../logcontrolwindow/ventanacontrollogsbase.cpp    |    154 +
 .../gui/logcontrolwindow/ventanacontrollogsbase.h  |    119 +
 cadxcore/main/gui/login/dialogologin.cpp           |     57 +
 cadxcore/main/gui/login/dialogologin.h             |     40 +
 cadxcore/main/gui/mainwindow/InterfazGinkgo.fbp    |   2284 +
 cadxcore/main/gui/mainwindow/detacheddialog.cpp    |    125 +
 cadxcore/main/gui/mainwindow/detacheddialog.h      |     51 +
 cadxcore/main/gui/mainwindow/ventanaprincipal.cpp  |   1921 +
 cadxcore/main/gui/mainwindow/ventanaprincipal.h    |    355 +
 .../main/gui/mainwindow/ventanaprincipalbase.cpp   |    269 +
 .../main/gui/mainwindow/ventanaprincipalbase.h     |    152 +
 cadxcore/main/gui/open/OpenDialogs.fbp             |   1990 +
 cadxcore/main/gui/open/abrir.cpp                   |    175 +
 cadxcore/main/gui/open/abrir.h                     |     44 +
 cadxcore/main/gui/open/dicomdirtablemodel.cpp      |    260 +
 cadxcore/main/gui/open/dicomdirtablemodel.h        |     83 +
 cadxcore/main/gui/open/opendialogs.cpp             |    232 +
 cadxcore/main/gui/open/opendialogs.h               |     87 +
 cadxcore/main/gui/open/opendialogsbase.cpp         |    229 +
 cadxcore/main/gui/open/opendialogsbase.h           |    132 +
 cadxcore/main/gui/pacsupload/PACSUpload.fbp        |    814 +
 cadxcore/main/gui/pacsupload/pacsuploaddialog.cpp  |    127 +
 cadxcore/main/gui/pacsupload/pacsuploaddialog.h    |     44 +
 .../main/gui/pacsupload/pacsuploaddialogbase.cpp   |     94 +
 .../main/gui/pacsupload/pacsuploaddialogbase.h     |     65 +
 cadxcore/main/gui/paneltags/PanelTags.fbp          |    262 +
 cadxcore/main/gui/paneltags/paneltags.cpp          |    292 +
 cadxcore/main/gui/paneltags/paneltags.h            |     67 +
 cadxcore/main/gui/paneltags/paneltagsbase.cpp      |     60 +
 cadxcore/main/gui/paneltags/paneltagsbase.h        |     71 +
 cadxcore/main/gui/previewpanel/PreviewPanel.fbp    |    818 +
 cadxcore/main/gui/previewpanel/firstlevelpanel.cpp |    129 +
 cadxcore/main/gui/previewpanel/firstlevelpanel.h   |     53 +
 cadxcore/main/gui/previewpanel/ipreviewpanel.h     |    130 +
 cadxcore/main/gui/previewpanel/leafpanel.cpp       |    190 +
 cadxcore/main/gui/previewpanel/leafpanel.h         |    140 +
 cadxcore/main/gui/previewpanel/previewpanel.cpp    |    197 +
 cadxcore/main/gui/previewpanel/previewpanel.h      |     69 +
 .../main/gui/previewpanel/previewpanelbase.cpp     |    252 +
 cadxcore/main/gui/previewpanel/previewpanelbase.h  |    186 +
 cadxcore/main/gui/previewpanel/previewpanelmodel.h |    115 +
 cadxcore/main/gui/progress/Progreso.fbp            |    305 +
 cadxcore/main/gui/progress/paneltarea.cpp          |     71 +
 cadxcore/main/gui/progress/paneltarea.h            |     42 +
 cadxcore/main/gui/progress/progresobase.cpp        |     56 +
 cadxcore/main/gui/progress/progresobase.h          |     64 +
 cadxcore/main/gui/progress/statusbarprogreso.cpp   |    372 +
 cadxcore/main/gui/progress/statusbarprogreso.h     |    169 +
 .../main/gui/selectpacsserver/SelectPacsServer.fbp |    714 +
 .../main/gui/selectpacsserver/selectpacsserver.cpp |     78 +
 .../main/gui/selectpacsserver/selectpacsserver.h   |     40 +
 .../gui/selectpacsserver/selectpacsserverbase.cpp  |     85 +
 .../gui/selectpacsserver/selectpacsserverbase.h    |     63 +
 cadxcore/main/gui/startup/StartupForm.fbp          |    664 +
 cadxcore/main/gui/startup/startupform.cpp          |    263 +
 cadxcore/main/gui/startup/startupform.h            |     42 +
 cadxcore/main/gui/startup/startupformbase.cpp      |     63 +
 cadxcore/main/gui/startup/startupformbase.h        |     64 +
 cadxcore/main/gui/startup/startupview.cpp          |    155 +
 cadxcore/main/gui/startup/startupview.h            |    117 +
 .../main/gui/toolsystem/ginkgotoolsystembar.cpp    |    356 +
 cadxcore/main/gui/toolsystem/ginkgotoolsystembar.h |     60 +
 cadxcore/main/gui/toolsystem/wxmenuitemtool.cpp    |     90 +
 cadxcore/main/gui/toolsystem/wxmenuitemtool.h      |     71 +
 cadxcore/main/gui/wxprevisualizaciondicom.cpp      |    140 +
 cadxcore/main/gui/wxprevisualizaciondicom.h        |     69 +
 cadxcore/main/license.h                            |     81 +
 cadxcore/main/managers/widgetsmanager.cpp          |   1158 +
 cadxcore/main/managers/widgetsmanager.h            |    194 +
 cadxcore/main/tools/addfiletohistorytool.cpp       |    162 +
 cadxcore/main/tools/addfiletohistorytool.h         |     50 +
 cadxcore/main/tools/angletool.cpp                  |    171 +
 cadxcore/main/tools/angletool.h                    |     70 +
 cadxcore/main/tools/anonymizetool.cpp              |     67 +
 cadxcore/main/tools/anonymizetool.h                |     43 +
 cadxcore/main/tools/brightnesscontrasttool.cpp     |     76 +
 cadxcore/main/tools/brightnesscontrasttool.h       |     58 +
 cadxcore/main/tools/camerarotationtool.cpp         |     78 +
 cadxcore/main/tools/camerarotationtool.h           |     69 +
 cadxcore/main/tools/colormaptool.cpp               |    207 +
 cadxcore/main/tools/colormaptool.h                 |     55 +
 cadxcore/main/tools/copyimagetoclipboardtool.cpp   |    102 +
 cadxcore/main/tools/copyimagetoclipboardtool.h     |     41 +
 cadxcore/main/tools/coretools.cpp                  |    181 +
 cadxcore/main/tools/coretools.h                    |     29 +
 cadxcore/main/tools/cornerannotationstool.cpp      |     96 +
 cadxcore/main/tools/cornerannotationstool.h        |     50 +
 cadxcore/main/tools/detachwindowtool.cpp           |    122 +
 cadxcore/main/tools/detachwindowtool.h             |     54 +
 cadxcore/main/tools/dicomizetool.cpp               |     60 +
 cadxcore/main/tools/dicomizetool.h                 |     44 +
 cadxcore/main/tools/enabled_tools.h                |     31 +
 cadxcore/main/tools/exportdicomdirtool.cpp         |     78 +
 cadxcore/main/tools/exportdicomdirtool.h           |     45 +
 cadxcore/main/tools/historytools.h                 |     31 +
 cadxcore/main/tools/imageexporttool.cpp            |     85 +
 cadxcore/main/tools/imageexporttool.h              |     50 +
 cadxcore/main/tools/markertool.cpp                 |    248 +
 cadxcore/main/tools/markertool.h                   |     77 +
 cadxcore/main/tools/metricgridtool.cpp             |    370 +
 cadxcore/main/tools/metricgridtool.h               |     56 +
 cadxcore/main/tools/notetool.cpp                   |     82 +
 cadxcore/main/tools/notetool.h                     |     59 +
 cadxcore/main/tools/openfiletool.cpp               |     54 +
 cadxcore/main/tools/openfiletool.h                 |     44 +
 cadxcore/main/tools/openfoldertool.cpp             |     54 +
 cadxcore/main/tools/openfoldertool.h               |     44 +
 cadxcore/main/tools/openginkgocloudlinktool.cpp    |     55 +
 cadxcore/main/tools/openginkgocloudlinktool.h      |     37 +
 cadxcore/main/tools/openremovabletool.cpp          |     59 +
 cadxcore/main/tools/openremovabletool.h            |     44 +
 cadxcore/main/tools/pacsuploadtool.cpp             |     75 +
 cadxcore/main/tools/pacsuploadtool.h               |     45 +
 cadxcore/main/tools/pixelsbluringtool.cpp          |    139 +
 cadxcore/main/tools/pixelsbluringtool.h            |     53 +
 cadxcore/main/tools/pointertool.cpp                |     77 +
 cadxcore/main/tools/pointertool.h                  |     80 +
 cadxcore/main/tools/queryretrievehistorytool.cpp   |     52 +
 cadxcore/main/tools/queryretrievehistorytool.h     |     43 +
 cadxcore/main/tools/queryretrievetool.cpp          |    128 +
 cadxcore/main/tools/queryretrievetool.h            |     48 +
 cadxcore/main/tools/resettool.cpp                  |     71 +
 cadxcore/main/tools/resettool.h                    |     47 +
 cadxcore/main/tools/rotateandfliptool.cpp          |    211 +
 cadxcore/main/tools/rotateandfliptool.h            |     53 +
 cadxcore/main/tools/ruletool.cpp                   |     88 +
 cadxcore/main/tools/ruletool.h                     |     60 +
 .../main/tools/searchginkgocloudhistorytool.cpp    |     54 +
 cadxcore/main/tools/searchginkgocloudhistorytool.h |     37 +
 cadxcore/main/tools/secondarycapturetool.cpp       |     87 +
 cadxcore/main/tools/secondarycapturetool.h         |     44 +
 cadxcore/main/tools/sendpacstool.cpp               |     83 +
 cadxcore/main/tools/sendpacstool.h                 |     44 +
 cadxcore/main/tools/showhistorytool.cpp            |     69 +
 cadxcore/main/tools/showhistorytool.h              |     51 +
 cadxcore/main/tools/showtagshistorytool.cpp        |     67 +
 cadxcore/main/tools/showtagshistorytool.h          |     42 +
 cadxcore/main/tools/showtagstool.cpp               |    144 +
 cadxcore/main/tools/showtagstool.h                 |    106 +
 cadxcore/main/tools/simpleprinttool.cpp            |    306 +
 cadxcore/main/tools/simpleprinttool.h              |     49 +
 cadxcore/main/tools/startdicomizationtool.cpp      |     73 +
 cadxcore/main/tools/startdicomizationtool.h        |     48 +
 cadxcore/main/tools/toolpan.cpp                    |     78 +
 cadxcore/main/tools/toolpan.h                      |     62 +
 cadxcore/main/tools/toolslider.cpp                 |    177 +
 cadxcore/main/tools/toolslider.h                   |     55 +
 cadxcore/main/tools/toolwindowlevel.cpp            |    330 +
 cadxcore/main/tools/toolwindowlevel.h              |     86 +
 cadxcore/main/tools/toolzoom.cpp                   |    218 +
 cadxcore/main/tools/toolzoom.h                     |     58 +
 cadxcore/main/tools/trackballtool.cpp              |     78 +
 cadxcore/main/tools/trackballtool.h                |     72 +
 cadxcore/main/tools/undotool.cpp                   |    144 +
 cadxcore/main/tools/undotool.h                     |     57 +
 cadxcore/main/tools/videotool.cpp                  |    245 +
 cadxcore/main/tools/videotool.h                    |     57 +
 cadxcore/main/tools/windowlayouttool.cpp           |    377 +
 cadxcore/main/tools/windowlayouttool.h             |     65 +
 cadxcore/main/toolsystem/toolcontroller.cpp        |    587 +
 cadxcore/main/toolsystem/toolcontroller.h          |     98 +
 cadxcore/main/toolsystem/toolsregistry.cpp         |    192 +
 cadxcore/main/toolsystem/toolsregistry.h           |    108 +
 cadxcore/main/utils/ginkgomatrix4x4.cpp            |    146 +
 cadxcore/main/utils/ginkgomatrix4x4.h              |     66 +
 cadxcore/prvext/prvext.h                           |    165 +
 cadxcore/resources/cadxcore.icns                   |    Bin 0 -> 38009 bytes
 cadxcore/resources/conformance.xml                 |   1082 +
 .../files/acquisition/ico_acquire_file.png         |    Bin 0 -> 554 bytes
 .../files/acquisition/ico_acquire_pacs.png         |    Bin 0 -> 661 bytes
 cadxcore/resources/files/acquisition/ico_clear.png |    Bin 0 -> 784 bytes
 .../resources/files/acquisition/ico_download.png   |    Bin 0 -> 997 bytes
 .../files/acquisition/ico_remove_download.png      |    Bin 0 -> 655 bytes
 .../resources/files/angle_bar/ico_angulo_cobb.png  |    Bin 0 -> 347 bytes
 .../files/angle_bar/ico_angulo_normal.png          |    Bin 0 -> 332 bytes
 .../resources/files/big_icons/ico_acquire_big.png  |    Bin 0 -> 10587 bytes
 .../files/big_icons/ico_default_dicomizer.png      |    Bin 0 -> 3986 bytes
 .../resources/files/big_icons/ico_dicomize_big.png |    Bin 0 -> 7592 bytes
 .../resources/files/big_icons/ico_history_big.png  |    Bin 0 -> 5568 bytes
 cadxcore/resources/files/big_icons/ico_qr_big.png  |    Bin 0 -> 4899 bytes
 cadxcore/resources/files/big_icons/ico_qr_big.svg  |   1341 +
 .../files/big_icons/ico_search_ginkgocloud.png     |    Bin 0 -> 5197 bytes
 .../files/big_icons/ico_search_ginkgocloud.svg     |  20130 +++
 cadxcore/resources/files/cine_bar/ico_bucle.png    |    Bin 0 -> 750 bytes
 cadxcore/resources/files/cine_bar/ico_cine.png     |    Bin 0 -> 653 bytes
 cadxcore/resources/files/cine_bar/ico_no_bucle.png |    Bin 0 -> 837 bytes
 cadxcore/resources/files/cine_bar/ico_pause.png    |    Bin 0 -> 721 bytes
 cadxcore/resources/files/cine_bar/ico_play.png     |    Bin 0 -> 717 bytes
 cadxcore/resources/files/cine_bar/ico_stop.png     |    Bin 0 -> 695 bytes
 .../files/cursors/ico_cursor_ancla_compuesta.png   |    Bin 0 -> 387 bytes
 .../files/cursors/ico_cursor_ancla_simple.png      |    Bin 0 -> 400 bytes
 .../files/cursors/ico_cursor_crear_angulo_cobb.png |    Bin 0 -> 1319 bytes
 .../cursors/ico_cursor_crear_angulo_normal.png     |    Bin 0 -> 1322 bytes
 .../files/cursors/ico_cursor_crear_anotacion.png   |    Bin 0 -> 1313 bytes
 .../files/cursors/ico_cursor_crear_elipse.png      |    Bin 0 -> 1321 bytes
 .../files/cursors/ico_cursor_crear_linea.png       |    Bin 0 -> 253 bytes
 .../files/cursors/ico_cursor_crear_poligono.png    |    Bin 0 -> 1310 bytes
 .../files/cursors/ico_cursor_crear_punto.png       |    Bin 0 -> 254 bytes
 .../files/cursors/ico_cursor_crear_rectangulo.png  |    Bin 0 -> 248 bytes
 .../resources/files/cursors/ico_cursor_lupa.png    |    Bin 0 -> 281 bytes
 .../files/cursors/ico_cursor_mano_abierta.png      |    Bin 0 -> 271 bytes
 .../files/cursors/ico_cursor_mano_cerrada.png      |    Bin 0 -> 248 bytes
 .../files/cursors/ico_cursor_seleccionar.png       |    Bin 0 -> 240 bytes
 .../files/cursors/ico_cursor_transparente.png      |    Bin 0 -> 228 bytes
 .../files/cursors/ico_cursor_window_level.png      |    Bin 0 -> 1406 bytes
 .../resources/files/cursors/ico_rotate_cursor.png  |    Bin 0 -> 342 bytes
 .../files/grid_bar/ico_ocultar_rejilla.png         |    Bin 0 -> 644 bytes
 .../resources/files/grid_bar/ico_ver_rejilla.png   |    Bin 0 -> 750 bytes
 .../resources/files/history/ico_all_patients.png   |    Bin 0 -> 874 bytes
 cadxcore/resources/files/history/ico_clean_all.png |    Bin 0 -> 784 bytes
 cadxcore/resources/files/history/ico_desplegar.png |    Bin 0 -> 831 bytes
 cadxcore/resources/files/history/ico_estudio.png   |    Bin 0 -> 566 bytes
 .../resources/files/history/ico_fichero_clave.png  |    Bin 0 -> 612 bytes
 .../resources/files/history/ico_historial_open.png |    Bin 0 -> 622 bytes
 cadxcore/resources/files/history/ico_hombre.png    |    Bin 0 -> 629 bytes
 cadxcore/resources/files/history/ico_imagen.png    |    Bin 0 -> 606 bytes
 .../resources/files/history/ico_local_file.png     |    Bin 0 -> 390 bytes
 .../files/history/ico_local_file_recent.png        |    Bin 0 -> 690 bytes
 .../resources/files/history/ico_local_linked.png   |    Bin 0 -> 343 bytes
 .../files/history/ico_local_linked_recent.png      |    Bin 0 -> 501 bytes
 .../resources/files/history/ico_movie_preview.png  |    Bin 0 -> 5533 bytes
 cadxcore/resources/files/history/ico_mujer.png     |    Bin 0 -> 590 bytes
 cadxcore/resources/files/history/ico_otro.png      |    Bin 0 -> 786 bytes
 .../resources/files/history/ico_pdf_preview.png    |    Bin 0 -> 5463 bytes
 cadxcore/resources/files/history/ico_plegar.png    |    Bin 0 -> 752 bytes
 cadxcore/resources/files/history/ico_serie.png     |    Bin 0 -> 704 bytes
 .../resources/files/history/ico_unknown_file.png   |    Bin 0 -> 2321 bytes
 .../resources/files/history/ico_wado_linked.png    |    Bin 0 -> 657 bytes
 .../files/history/ico_wado_linked_preview.png      |    Bin 0 -> 1928 bytes
 .../files/history/ico_wado_linked_recent.png       |    Bin 0 -> 701 bytes
 .../resources/files/layout_bar/ico_add_columna.png |    Bin 0 -> 445 bytes
 .../resources/files/layout_bar/ico_add_fila.png    |    Bin 0 -> 457 bytes
 .../resources/files/layout_bar/ico_del_columna.png |    Bin 0 -> 396 bytes
 .../resources/files/layout_bar/ico_del_fila.png    |    Bin 0 -> 401 bytes
 .../resources/files/layout_bar/ico_layout_1x1.png  |    Bin 0 -> 281 bytes
 .../resources/files/layout_bar/ico_layout_1x2.png  |    Bin 0 -> 344 bytes
 .../files/layout_bar/ico_layout_1x2_blue.png       |    Bin 0 -> 460 bytes
 .../resources/files/layout_bar/ico_layout_2x1.png  |    Bin 0 -> 456 bytes
 .../files/layout_bar/ico_layout_2x1_blue.png       |    Bin 0 -> 488 bytes
 .../resources/files/layout_bar/ico_layout_2x2.png  |    Bin 0 -> 506 bytes
 .../resources/files/layout_bar/ico_layout_3x3.png  |    Bin 0 -> 479 bytes
 .../resources/files/layout_bar/ico_layout_4x4.png  |    Bin 0 -> 467 bytes
 cadxcore/resources/files/logos/extensions_logo.png |    Bin 0 -> 2506 bytes
 cadxcore/resources/files/logos/ginkgo48x48.png     |    Bin 0 -> 3775 bytes
 .../resources/files/logos/ico_extension_error.png  |    Bin 0 -> 2524 bytes
 cadxcore/resources/files/logos/ico_ginkgo16x16.png |    Bin 0 -> 996 bytes
 cadxcore/resources/files/logos/ico_ginkgo32x32.png |    Bin 0 -> 2174 bytes
 cadxcore/resources/files/logos/ico_logo_splash.png |    Bin 0 -> 52542 bytes
 .../resources/files/magnifier_bar/ico_zoom_in.png  |    Bin 0 -> 725 bytes
 .../resources/files/magnifier_bar/ico_zoom_out.png |    Bin 0 -> 708 bytes
 .../files/marking_bar/ico_elipse_marcado.png       |    Bin 0 -> 761 bytes
 .../files/marking_bar/ico_flecha_marcado.png       |    Bin 0 -> 625 bytes
 .../resources/files/marking_bar/ico_free_form.png  |    Bin 0 -> 582 bytes
 .../files/marking_bar/ico_poligono_marcado.png     |    Bin 0 -> 643 bytes
 .../files/marking_bar/ico_punto_marcado.png        |    Bin 0 -> 289 bytes
 .../files/marking_bar/ico_rectangulo_marcado.png   |    Bin 0 -> 513 bytes
 cadxcore/resources/files/menu_icons/ico_abrir.png  |    Bin 0 -> 653 bytes
 .../resources/files/menu_icons/ico_acercade.png    |    Bin 0 -> 744 bytes
 .../files/menu_icons/ico_calibrar_imagen.png       |    Bin 0 -> 494 bytes
 .../resources/files/menu_icons/ico_cerrar_tab.png  |    Bin 0 -> 344 bytes
 .../files/menu_icons/ico_configuracion.png         |    Bin 0 -> 699 bytes
 cadxcore/resources/files/menu_icons/ico_cross.png  |    Bin 0 -> 544 bytes
 .../resources/files/menu_icons/ico_dicom_dir.png   |    Bin 0 -> 630 bytes
 cadxcore/resources/files/menu_icons/ico_editar.png |    Bin 0 -> 503 bytes
 cadxcore/resources/files/menu_icons/ico_editor.png |    Bin 0 -> 769 bytes
 .../files/menu_icons/ico_eliminar_todo.png         |    Bin 0 -> 716 bytes
 .../files/menu_icons/ico_eliminar_widget.png       |    Bin 0 -> 655 bytes
 .../resources/files/menu_icons/ico_exportar.png    |    Bin 0 -> 656 bytes
 .../resources/files/menu_icons/ico_filtrado.png    |    Bin 0 -> 591 bytes
 .../resources/files/menu_icons/ico_guardar.png     |    Bin 0 -> 620 bytes
 cadxcore/resources/files/menu_icons/ico_help.png   |    Bin 0 -> 766 bytes
 .../resources/files/menu_icons/ico_importar.png    |    Bin 0 -> 800 bytes
 .../resources/files/menu_icons/ico_impresora.png   |    Bin 0 -> 715 bytes
 .../files/menu_icons/ico_obtain_extensions.png     |    Bin 0 -> 452 bytes
 .../resources/files/menu_icons/ico_open_dir.png    |    Bin 0 -> 668 bytes
 .../resources/files/menu_icons/ico_open_disc.png   |    Bin 0 -> 882 bytes
 .../resources/files/menu_icons/ico_open_file.png   |    Bin 0 -> 745 bytes
 .../files/menu_icons/ico_pantalla_completa.png     |    Bin 0 -> 612 bytes
 cadxcore/resources/files/menu_icons/ico_paste.png  |    Bin 0 -> 703 bytes
 cadxcore/resources/files/menu_icons/ico_reset.png  |    Bin 0 -> 685 bytes
 cadxcore/resources/files/menu_icons/ico_salir.png  |    Bin 0 -> 655 bytes
 .../files/menu_icons/ico_send_to_pacs.png          |    Bin 0 -> 749 bytes
 .../resources/files/menu_icons/ico_support.png     |    Bin 0 -> 902 bytes
 cadxcore/resources/files/menu_icons/ico_tick.png   |    Bin 0 -> 634 bytes
 cadxcore/resources/files/menu_icons/ico_user.png   |    Bin 0 -> 741 bytes
 .../files/menu_icons/ico_vista_preliminar.png      |    Bin 0 -> 554 bytes
 .../files/menu_tabs/ico_cerrar_tab_32.png          |    Bin 0 -> 544 bytes
 .../resources/files/menu_tabs/ico_grid_2_col.png   |    Bin 0 -> 746 bytes
 .../resources/files/menu_tabs/ico_grid_3_col.png   |    Bin 0 -> 650 bytes
 .../files/menu_tabs/ico_primer_plano_tab.png       |    Bin 0 -> 464 bytes
 .../resources/files/menu_tabs/ico_reagrupar.png    |    Bin 0 -> 601 bytes
 .../resources/files/progress_bar/ico_loading.gif   |    Bin 0 -> 673 bytes
 .../resources/files/progress_bar/ico_stopped.png   |    Bin 0 -> 702 bytes
 cadxcore/resources/files/tool_icons/ico_angulo.png |    Bin 0 -> 387 bytes
 .../resources/files/tool_icons/ico_anonymize.png   |    Bin 0 -> 614 bytes
 .../resources/files/tool_icons/ico_anotacion.png   |    Bin 0 -> 564 bytes
 .../files/tool_icons/ico_brightness_contrast.png   |    Bin 0 -> 661 bytes
 cadxcore/resources/files/tool_icons/ico_copy.png   |    Bin 0 -> 564 bytes
 .../files/tool_icons/ico_corner_annotations.png    |    Bin 0 -> 191 bytes
 cadxcore/resources/files/tool_icons/ico_cruz.png   |    Bin 0 -> 643 bytes
 cadxcore/resources/files/tool_icons/ico_debug.png  |    Bin 0 -> 685 bytes
 .../resources/files/tool_icons/ico_desencajar.png  |    Bin 0 -> 533 bytes
 .../files/tool_icons/ico_download_cloud.png        |    Bin 0 -> 1564 bytes
 .../resources/files/tool_icons/ico_elevacion.png   |    Bin 0 -> 632 bytes
 cadxcore/resources/files/tool_icons/ico_flecha.png |    Bin 0 -> 544 bytes
 .../files/tool_icons/ico_flip_horizontal.png       |    Bin 0 -> 403 bytes
 .../files/tool_icons/ico_flip_vertical.png         |    Bin 0 -> 418 bytes
 .../resources/files/tool_icons/ico_informe.png     |    Bin 0 -> 748 bytes
 cadxcore/resources/files/tool_icons/ico_invert.png |    Bin 0 -> 817 bytes
 cadxcore/resources/files/tool_icons/ico_layout.png |    Bin 0 -> 506 bytes
 .../resources/files/tool_icons/ico_lazo_chroma.png |    Bin 0 -> 419 bytes
 .../resources/files/tool_icons/ico_longitud.png    |    Bin 0 -> 488 bytes
 cadxcore/resources/files/tool_icons/ico_lupa.png   |    Bin 0 -> 756 bytes
 .../resources/files/tool_icons/ico_marcado.png     |    Bin 0 -> 589 bytes
 .../files/tool_icons/ico_mostrar_ocultar_tags.png  |    Bin 0 -> 596 bytes
 .../resources/files/tool_icons/ico_mouse_l.png     |    Bin 0 -> 330 bytes
 .../resources/files/tool_icons/ico_mouse_r.png     |    Bin 0 -> 321 bytes
 .../resources/files/tool_icons/ico_mouse_rl.png    |    Bin 0 -> 344 bytes
 cadxcore/resources/files/tool_icons/ico_pan.png    |    Bin 0 -> 740 bytes
 .../resources/files/tool_icons/ico_rejilla.png     |    Bin 0 -> 320 bytes
 .../resources/files/tool_icons/ico_rotate_left.png |    Bin 0 -> 842 bytes
 .../files/tool_icons/ico_rotate_right.png          |    Bin 0 -> 829 bytes
 .../files/tool_icons/ico_search_cloud.png          |    Bin 0 -> 646 bytes
 .../files/tool_icons/ico_sin_opciones.png          |    Bin 0 -> 715 bytes
 cadxcore/resources/files/tool_icons/ico_slider.png |    Bin 0 -> 664 bytes
 .../resources/files/tool_icons/ico_trackball.png   |    Bin 0 -> 765 bytes
 cadxcore/resources/files/tool_icons/ico_varita.png |    Bin 0 -> 610 bytes
 cadxcore/resources/files/tool_icons/ico_wl.png     |    Bin 0 -> 661 bytes
 cadxcore/resources/files/tool_icons/ico_zoom.png   |    Bin 0 -> 692 bytes
 .../files/windowlevel_bar/ico_reset_wl.png         |    Bin 0 -> 685 bytes
 .../resources/files/wizards/ico_barra_superior.png |    Bin 0 -> 38339 bytes
 cadxcore/resources/ginkgoresourcesmanager.cpp      |   1130 +
 cadxcore/resources/ginkgoresourcesmanager.h        |    279 +
 cadxcore/resources/test_card.dcm                   |    Bin 0 -> 1050586 bytes
 cadxcore/singleinstance.h                          |    191 +
 cadxcore/sqlite/ginkgosqlite.h                     |    415 +
 cadxcore/sqlite/hl7sqlite.h                        |     80 +
 cadxcore/sqlite/seguridad.h                        |     71 +
 cadxcore/sqlite/sqlite3.c                          | 126007 ++++++++++++++++++
 cadxcore/sqlite/sqlite3.h                          |   6464 +
 cadxcore/sqlite/sqlite3ext.h                       |    420 +
 cadxcore/stdafx.cpp                                |      1 +
 cadxcore/stdafx.h                                  |     76 +
 cadxcore/vtk/command/ginkgoimagecommand.cpp        |    366 +
 cadxcore/vtk/command/ginkgoimagecommand.h          |     85 +
 .../interactor/ginkgointeractorstyleimage2d.cpp    |    736 +
 .../vtk/interactor/ginkgointeractorstyleimage2d.h  |    108 +
 cadxcore/vtk/vtkSmartVolumeMapper.cxx              |    617 +
 cadxcore/vtk/vtkSmartVolumeMapper.h                |    342 +
 cadxcore/vtk/vtkginkgoimageviewer.cpp              |   2569 +
 cadxcore/vtk/vtkginkgoimageviewer.h                |    536 +
 cadxcore/vtk/vtkopenglginkgotexture.cpp            |   1423 +
 cadxcore/vtk/vtkopenglginkgotexture.h              |    158 +
 cadxcore/vtk/widgets/widgetsactor.cpp              |    639 +
 cadxcore/vtk/widgets/widgetsactor.h                |    192 +
 cadxcore/widgets/gui/SeleccionTexto.fbp            |    634 +
 cadxcore/widgets/gui/calibracion.cpp               |    236 +
 cadxcore/widgets/gui/calibracion.fbp               |    698 +
 cadxcore/widgets/gui/calibracion.h                 |     66 +
 cadxcore/widgets/gui/calibracionbase.cpp           |    115 +
 cadxcore/widgets/gui/calibracionbase.h             |     85 +
 cadxcore/widgets/gui/selecciontexto.cpp            |    117 +
 cadxcore/widgets/gui/selecciontexto.h              |     66 +
 cadxcore/widgets/gui/selecciontextobase.cpp        |     92 +
 cadxcore/widgets/gui/selecciontextobase.h          |     81 +
 cadxcore/widgets/observers/iobservadorchroma.h     |     84 +
 .../widgets/observers/iobservadorchromacomplejo.h  |     80 +
 .../widgets/observers/iobservadormarcadoarea.h     |    110 +
 .../widgets/observers/iobservadorwindowlevel.h     |     46 +
 cadxcore/widgets/openglhelper.cpp                  |    581 +
 cadxcore/widgets/openglhelper.h                    |    148 +
 cadxcore/widgets/striptexthelper.cpp               |    225 +
 cadxcore/widgets/striptexthelper.h                 |     76 +
 cadxcore/widgets/wangulo.cpp                       |   1309 +
 cadxcore/widgets/wangulo.h                         |    158 +
 cadxcore/widgets/wanotacionesquina.cpp             |   1279 +
 cadxcore/widgets/wanotacionesquina.h               |    139 +
 cadxcore/widgets/wanotacionposicion.cpp            |    105 +
 cadxcore/widgets/wanotacionposicion.h              |     77 +
 cadxcore/widgets/wbrightnesscontrast.cpp           |    183 +
 cadxcore/widgets/wbrightnesscontrast.h             |     66 +
 cadxcore/widgets/wcamerarotation.cpp               |    194 +
 cadxcore/widgets/wcamerarotation.h                 |     73 +
 cadxcore/widgets/wchromacomplejo.cpp               |    407 +
 cadxcore/widgets/wchromacomplejo.h                 |    151 +
 cadxcore/widgets/welevacion.cpp                    |    253 +
 cadxcore/widgets/welevacion.h                      |    180 +
 cadxcore/widgets/welipse.cpp                       |    829 +
 cadxcore/widgets/welipse.h                         |    239 +
 cadxcore/widgets/wflecha.cpp                       |    601 +
 cadxcore/widgets/wflecha.h                         |    223 +
 cadxcore/widgets/wfreeform.cpp                     |    558 +
 cadxcore/widgets/wfreeform.h                       |    227 +
 cadxcore/widgets/wlupa.cpp                         |    807 +
 cadxcore/widgets/wlupa.h                           |    223 +
 cadxcore/widgets/wmarcadoarea.cpp                  |    470 +
 cadxcore/widgets/wmarcadoarea.h                    |    264 +
 cadxcore/widgets/wnota.cpp                         |    130 +
 cadxcore/widgets/wnota.h                           |     91 +
 cadxcore/widgets/wpan.cpp                          |    174 +
 cadxcore/widgets/wpan.h                            |     75 +
 cadxcore/widgets/wpolygon.cpp                      |    602 +
 cadxcore/widgets/wpolygon.h                        |    217 +
 cadxcore/widgets/wpunto.cpp                        |    444 +
 cadxcore/widgets/wpunto.h                          |    215 +
 cadxcore/widgets/wrectangulo.cpp                   |    491 +
 cadxcore/widgets/wrectangulo.h                     |    148 +
 cadxcore/widgets/wrejilla.cpp                      |    306 +
 cadxcore/widgets/wrejilla.h                        |    144 +
 cadxcore/widgets/wrule.cpp                         |    728 +
 cadxcore/widgets/wrule.h                           |    178 +
 cadxcore/widgets/wseleccion.cpp                    |    150 +
 cadxcore/widgets/wseleccion.h                      |     87 +
 cadxcore/widgets/wsemillas.h                       |    272 +
 cadxcore/widgets/wslider.cpp                       |    129 +
 cadxcore/widgets/wslider.h                         |     81 +
 cadxcore/widgets/wstaticrule.cpp                   |    248 +
 cadxcore/widgets/wstaticrule.h                     |    103 +
 cadxcore/widgets/wtextbox.cpp                      |    573 +
 cadxcore/widgets/wtextbox.h                        |    168 +
 cadxcore/widgets/wtrackball.cpp                    |    174 +
 cadxcore/widgets/wtrackball.h                      |     72 +
 cadxcore/widgets/wtrapezoide.cpp                   |    174 +
 cadxcore/widgets/wtrapezoide.h                     |     77 +
 cadxcore/widgets/wwindowlevel.cpp                  |    109 +
 cadxcore/widgets/wwindowlevel.h                    |     69 +
 cadxcore/widgets/wzoom.cpp                         |    146 +
 cadxcore/widgets/wzoom.h                           |     76 +
 cadxcore/wx/ginkgostyle/ginkgostyle.cpp            |   1186 +
 cadxcore/wx/ginkgostyle/ginkgostyle.h              |    455 +
 cadxcore/wx/gnkinforme/GNK_Informe.fbp             |   1077 +
 cadxcore/wx/gnkinforme/gnkinformebase.cpp          |    295 +
 cadxcore/wx/gnkinforme/gnkinformebase.h            |     82 +
 cadxcore/wx/gnkinforme/gnkinformebasewx.cpp        |    172 +
 cadxcore/wx/gnkinforme/gnkinformebasewx.h          |     92 +
 cadxcore/wx/link_additions.h                       |      0
 cadxcore/wx/maskedtextctrl/maskedtextctrl.cpp      |   1851 +
 cadxcore/wx/maskedtextctrl/maskedtextctrl.h        |    192 +
 cadxcore/wx/propiedades/Propiedades.fbp            |    640 +
 cadxcore/wx/propiedades/wxpropiedades.cpp          |     84 +
 cadxcore/wx/propiedades/wxpropiedades.h            |     46 +
 cadxcore/wx/propiedades/wxpropiedadesbase.cpp      |     79 +
 cadxcore/wx/propiedades/wxpropiedadesbase.h        |     76 +
 cadxcore/wx/thumbnailctrl/thumbnailctrl.cpp        |   1681 +
 cadxcore/wx/thumbnailctrl/thumbnailctrl.h          |    752 +
 cadxcore/wx/thumbnailctrl/thumbnailwidget.cpp      |    313 +
 cadxcore/wx/thumbnailctrl/thumbnailwidget.h        |    126 +
 cadxcore/wx/thumbnailctrl/tick.xpm                 |     40 +
 cadxcore/wx/wizardginkgo/DialogoWizard.fbp         |    804 +
 cadxcore/wx/wizardginkgo/wxwizardginkgobase.cpp    |     65 +
 cadxcore/wx/wizardginkgo/wxwizardginkgobase.h      |     43 +
 cadxcore/wx/wizardginkgo/wxwizardginkgobasewx.cpp  |     96 +
 cadxcore/wx/wizardginkgo/wxwizardginkgobasewx.h    |     80 +
 cadxcore/wx/wxginkgotoolbar.cpp                    |    704 +
 cadxcore/wx/wxginkgotoolbar.h                      |     86 +
 cadxcore/wx/wxsqlite3/wxsqlite3.cpp                |   3920 +
 cadxcore/wx/wxsqlite3/wxsqlite3.h                  |   2763 +
 cadxcore/wx/wxsqlite3/wxsqlite3def.h               |    421 +
 cadxcore/wx/wxsqlite3/wxsqlite3dyn.h               |    219 +
 cadxcore/wx/wxsqlite3/wxsqlite3opt.h               |     51 +
 debian/README.Debian                               |      6 -
 debian/changelog                                   |    359 -
 debian/compat                                      |      1 -
 debian/control                                     |     51 -
 debian/copyright                                   |    301 -
 debian/install                                     |      1 -
 debian/links                                       |      1 -
 debian/lintian-overrides                           |      3 -
 debian/manpages                                    |      1 -
 debian/mime                                        |      1 -
 debian/rules                                       |     22 -
 debian/sharedmimeinfo                              |      9 -
 debian/source/format                               |      1 -
 debian/source/options                              |      1 -
 debian/watch                                       |      3 -
 ginkgocadx/CMakeLists.txt                          |    154 +
 ginkgocadx/GinkgoCADx-Info.plist.in                |     53 +
 ginkgocadx/GinkgoCADx.Doxyfile                     |   1826 +
 ginkgocadx/build_descriptor.sh                     |     43 +
 ginkgocadx/dcmdoc.icns                             |    Bin 0 -> 124220 bytes
 ginkgocadx/dcmdoc_vacio.icns                       |    Bin 0 -> 46607 bytes
 ginkgocadx/dmg_template.tgz                        |    Bin 0 -> 266469 bytes
 ginkgocadx/ginkgo.ico                              |    Bin 0 -> 68346 bytes
 ginkgocadx/ginkgo.rc                               |    150 +
 ginkgocadx/ginkgocadx.1                            |     51 +
 ginkgocadx/ginkgocadx.desktop                      |     15 +
 ginkgocadx/ginkgocadx.icns                         |    Bin 0 -> 151435 bytes
 ginkgocadx/ginkgocadx.properties                   |     16 +
 ginkgocadx/ginkgocadx.vcxproj                      |    233 +
 ginkgocadx/ginkgocadx.vcxproj.filters              |     39 +
 ginkgocadx/ginkgocadx_vs2012.sln                   |    180 +
 ginkgocadx/logo.png                                |    Bin 0 -> 7025 bytes
 ginkgocadx/main.cpp                                |     43 +
 ginkgocadx/resource.h                              |     31 +
 ginkgocadx/targetver.h                             |     24 +
 install_open_source/Clean.bat                      |      6 +
 .../CleanDebugMonoliticOpenSource.bat              |      6 +
 .../CleanReleaseMonoliticOpenSource.bat            |      3 +
 install_open_source/GINKGO_CADX_LICENSE.txt        |     22 +
 .../InstallDebugMonoliticOpenSource.bat            |     74 +
 .../InstallReleaseMonoliticOpenSource.bat          |    181 +
 install_open_source/LGPL3.txt                      |    165 +
 install_open_source/NsisInstaller.nsi              |    372 +
 install_open_source/ginkgocadx_installer.ico       |    Bin 0 -> 68346 bytes
 install_open_source/install_open_source.vcxproj    |     80 +
 .../install_open_source.vcxproj.filters            |     37 +
 model_ginkgo.cpp                                   |      5 +
 visualizator/CMakeLists.txt                        |    170 +
 visualizator/License.txt                           |    165 +
 visualizator/lang/de/visualizator.mo               |    Bin 0 -> 5165 bytes
 visualizator/lang/de/visualizator.po               |    874 +
 visualizator/lang/el/visualizator.mo               |    Bin 0 -> 666 bytes
 visualizator/lang/el/visualizator.po               |    372 +
 visualizator/lang/es/visualizator.mo               |    Bin 0 -> 5174 bytes
 visualizator/lang/es/visualizator.po               |   1072 +
 visualizator/lang/fr/visualizator.mo               |    Bin 0 -> 4661 bytes
 visualizator/lang/fr/visualizator.po               |    408 +
 visualizator/lang/ja/visualizator.mo               |    Bin 0 -> 4736 bytes
 visualizator/lang/ja/visualizator.po               |    881 +
 visualizator/lang/pl/visualizator.mo               |    Bin 0 -> 3285 bytes
 visualizator/lang/pl/visualizator.po               |    608 +
 visualizator/lang/pt/visualizator.mo               |    Bin 0 -> 5254 bytes
 visualizator/lang/pt/visualizator.po               |    439 +
 visualizator/lang/pt_BR/visualizator.mo            |    Bin 0 -> 1223 bytes
 visualizator/lang/pt_BR/visualizator.po            |    488 +
 visualizator/lang/sr/visualizator.mo               |    Bin 0 -> 5268 bytes
 visualizator/lang/sr/visualizator.po               |    600 +
 visualizator/lang/tr/visualizator.mo               |    Bin 0 -> 871 bytes
 visualizator/lang/tr/visualizator.po               |    398 +
 visualizator/lang/visualizator.pot                 |    331 +
 visualizator/lang/zh_CN/visualizator.mo            |    Bin 0 -> 532 bytes
 visualizator/lang/zh_CN/visualizator.po            |    328 +
 visualizator/makepot.sh                            |      6 +
 .../resources/files/3d_bar/ico_cursor3d.png        |    Bin 0 -> 544 bytes
 visualizator/resources/files/3d_bar/ico_demo.png   |    Bin 0 -> 397 bytes
 visualizator/resources/files/3d_bar/ico_plegar.png |    Bin 0 -> 752 bytes
 visualizator/resources/files/3d_bar/ico_stereo.png |    Bin 0 -> 478 bytes
 .../resources/files/logos/logo_visualizator.png    |    Bin 0 -> 2954 bytes
 .../synchronization_bar/ico_dessincronizar.png     |    Bin 0 -> 430 bytes
 .../resources/files/tool_icons/ico_capas.png       |    Bin 0 -> 664 bytes
 .../files/tool_icons/ico_ecg_metadata.png          |    Bin 0 -> 504 bytes
 .../resources/files/tool_icons/ico_menu_imagen.png |    Bin 0 -> 569 bytes
 .../resources/files/tool_icons/ico_reset.png       |    Bin 0 -> 685 bytes
 .../resources/visualizatorresourcesmanager.cpp     |    130 +
 .../resources/visualizatorresourcesmanager.h       |     62 +
 visualizator/visualizator.cpp                      |     71 +
 visualizator/visualizator.h                        |     38 +
 visualizator/visualizator.vcxproj                  |    703 +
 visualizator/visualizator.vcxproj.filters          |    244 +
 .../controllers/visualizatorcontroller.cpp         |    393 +
 .../controllers/visualizatorcontroller.h           |     65 +
 .../dialogos/PanelesDeHerramientasPrimaria.fbp     |    315 +
 .../dialogos/contenedorherramientas.cpp            |     66 +
 .../visualizator/dialogos/contenedorherramientas.h |     47 +
 .../selectimagesimportationvisualizator.cpp        |    126 +
 .../selectimagesimportationvisualizator.h          |     61 +
 .../dialogos/panelesherramientasaprimariabase.cpp  |     71 +
 .../dialogos/panelesherramientasaprimariabase.h    |     97 +
 visualizator/visualizator/estudios/ecgstudy.cpp    |    877 +
 visualizator/visualizator/estudios/ecgstudy.h      |    215 +
 .../visualizator/estudios/globalmeasurement.cpp    |     68 +
 .../visualizator/estudios/globalmeasurement.h      |     78 +
 .../visualizator/estudios/globalmeasurements.cpp   |     33 +
 .../visualizator/estudios/globalmeasurements.h     |    188 +
 visualizator/visualizator/estudios/overlay.h       |     76 +
 .../visualizator/estudios/visualizatorstudy.cpp    |    274 +
 .../visualizator/estudios/visualizatorstudy.h      |     53 +
 visualizator/visualizator/eventos/changeposition.h |     78 +
 visualizator/visualizator/eventos/overlays.h       |    106 +
 visualizator/visualizator/eventos/sincronizacion.h |     83 +
 .../visualizator/eventos/visualizatorevents.h      |     34 +
 visualizator/visualizator/eventos/zoom.h           |     50 +
 .../export/contracts/ioverlayscontract.cpp         |     47 +
 .../export/contracts/ioverlayscontract.h           |     58 +
 .../export/contracts/ioverlayscontractable.cpp     |     42 +
 .../export/contracts/ioverlayscontractable.h       |     42 +
 .../visualizator/export/ireconstructiontool.h      |     52 +
 visualizator/visualizator/export/tagsprivados.h    |     25 +
 .../visualizator/export/tools/iecgruletool.cpp     |     30 +
 .../visualizator/export/tools/iecgruletool.h       |     40 +
 .../visualizator/export/tools/ioverlaystool.cpp    |     31 +
 .../visualizator/export/tools/ioverlaystool.h      |     39 +
 .../visualizator/export/tools/ivisualizatortools.h |     28 +
 visualizator/visualizator/license.h                |     37 +
 visualizator/visualizator/tools/ecgruletool.cpp    |     82 +
 visualizator/visualizator/tools/ecgruletool.h      |     55 +
 visualizator/visualizator/tools/overlaystool.cpp   |    159 +
 visualizator/visualizator/tools/overlaystool.h     |    100 +
 .../visualizator/tools/reconstructiontool.cpp      |    338 +
 .../visualizator/tools/reconstructiontool.h        |     70 +
 visualizator/visualizator/vistas/vista2d.cpp       |    283 +
 visualizator/visualizator/vistas/vista2d.h         |    120 +
 visualizator/visualizator/vistas/waveformview.cpp  |    235 +
 visualizator/visualizator/vistas/waveformview.h    |     93 +
 visualizator/visualizator/widgets/wecg.cpp         |    614 +
 visualizator/visualizator/widgets/wecg.h           |    170 +
 visualizator/visualizator/widgets/wecgrule.cpp     |    672 +
 visualizator/visualizator/widgets/wecgrule.h       |    128 +
 .../visualizator/wxvtk/VisualizatorViews.fbp       |   2232 +
 visualizator/visualizator/wxvtk/gvistacompleja.cpp |   1306 +
 visualizator/visualizator/wxvtk/gvistacompleja.h   |    183 +
 visualizator/visualizator/wxvtk/gvistasimple.cpp   |    842 +
 visualizator/visualizator/wxvtk/gvistasimple.h     |    117 +
 visualizator/visualizator/wxvtk/gwaveformview.cpp  |    446 +
 visualizator/visualizator/wxvtk/gwaveformview.h    |     86 +
 .../wxvtk/previewpanelvisualizator.cpp             |    257 +
 .../visualizator/wxvtk/previewpanelvisualizator.h  |     64 +
 .../visualizator/wxvtk/visualizatorviews.cpp       |    360 +
 .../visualizator/wxvtk/visualizatorviews.h         |    193 +
 .../visualizator_test/visualizatortest.cpp         |     31 +
 visualizator/visualizator_test/visualizatortest.h  |     33 +
 visualizator/visustdafx.cpp                        |      1 +
 visualizator/visustdafx.h                          |     67 +
 1285 files changed, 632106 insertions(+), 761 deletions(-)

diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..598b429
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,4 @@
+*~
+build*
+
+CMakeLists.txt.user
diff --git a/.travis.yml b/.travis.yml
new file mode 100644
index 0000000..8b49f9c
--- /dev/null
+++ b/.travis.yml
@@ -0,0 +1,37 @@
+sudo: required
+dist: trusty
+language: generic
+
+env:
+  matrix: 
+  - BUILD_TYPE=Release
+  - BUILD_TYPE=Debug
+
+  global:
+  - secure: ZUaYb2lsUb31Oz54glD1ol8Skjw0N/lqI1C7cYmjaiU8HDRAomlbVAW8Mw8IKZr6cNAI1DaD41P45YGG8zu40VFLySdfHblBGed01VkH8G9bHelRTmWS86Si64TwBrFYk5YCKhw8CEQrOmItSqbSmIg9y1Jm37NJR4OroqObzyA7lHHkFxRADoP69dS1esSMgPIS5mkMrvuVd9YpsnEC2Nxja0CtUAlzSj1LTh4H1t5RCOZzgq1+zPZZE64BRFfrWzwfudyJ4Tzrx0mJ1063yAhhbLbkLjheYNK/f0yOCB6bUUGay618Ify9DmAwZk8iQzCFc23H5+3U17vhTP9ohmvdRYb8NfxZ3bDCmCBeJYHg+ImrLABIqZtfCbv2Fwd5gf2ApF7/iYcrTccTJLG/hfDLe8GfQrZ29Led2JDYsjvYNQvsP8fvI0Ag3ldZBo4MZ9NNZeXdxxxg0oU5fvtj8zsFf+r13osd [...]
+
+install:
+- sudo add-apt-repository ppa:gert-die/trusty-mia -y
+- sudo add-apt-repository ppa:rebuntu16/avogadro+unofficial  -y
+- sudo apt-get update -qq
+- sudo apt-get install -y libvtk6-dev libinsighttoolkit4-dev libdcmtk-dev libcairo2-dev
+  libcurl4-gnutls-dev libfftw3-dev libfreetype6-dev libgtk2.0-dev libjsoncpp-dev libmysqlclient-dev
+  libsqlite3-dev libssl-dev libwrap0 libwrap0-dev libwxgtk3.0-dev libxml2-dev libgdcm-tools
+  libhdf5-dev
+before_script:
+- mkdir build
+- cd build
+- cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE}  .. 
+script:
+- make -j2
+
+addons:
+  coverity_scan:
+    project:
+      name: gerddie/ginkgocadx
+      version: 3.7.5+
+      description: 
+    notification_email: gw.fossdev at gmail.com
+    build_command: make -j2
+    branch_pattern: coverity_scan
+
diff --git a/AUTHORS b/AUTHORS
new file mode 100644
index 0000000..79f945d
--- /dev/null
+++ b/AUTHORS
@@ -0,0 +1,7 @@
+Current contributors: 
+
+Gert Wollny <gw.fossdev at gmail.com>
+
+Original development: 
+MetaEmotion
+
diff --git a/CMake/LinuxProperties.cmake b/CMake/LinuxProperties.cmake
new file mode 100644
index 0000000..c4905ac
--- /dev/null
+++ b/CMake/LinuxProperties.cmake
@@ -0,0 +1,281 @@
+
+#############################################################################################
+
+MACRO(PACKAGE_RULES TPROJECT ARCH DEST)
+	CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/ginkgocadx-launcher.in ${DEST}/ginkgocadx)
+	ADD_CUSTOM_COMMAND(
+		TARGET ${TPROJECT}
+		POST_BUILD
+		COMMAND echo "\\>\\>\\> Purging dist/"
+		COMMAND rm -f \"${DEST}/ginkgocadx-${ARCH}\" "${DEST}/*.so*"
+		COMMAND rm -rf \"${DEST}/Plugins\" \"${DEST}/lang\" \"${DEST}/resources\"
+		COMMAND echo "\\>\\>\\> Making subdirs Plugins, resources, resources/cadxcore, lang, lang/el, lang/es, lang/ja, lang/de, lang/tr, lang/pl, lang/pt, lang/pt_BR, lang/fr, lang/sr"
+		COMMAND mkdir \"${DEST}/resources\"
+		COMMAND chmod 755 \"${DEST}/resources\"
+		COMMAND mkdir \"${DEST}/resources/cadxcore\"
+		COMMAND chmod 755 \"${DEST}/resources/cadxcore\"
+		COMMAND mkdir -p \"${DEST}/Plugins\"
+		COMMAND mkdir -p \"${DEST}/lang/el\" \"${DEST}/lang/es\" \"${DEST}/lang/ja\" \"${DEST}/lang/de\" \"${DEST}/lang/tr\" \"${DEST}/lang/pl\" \"${DEST}/lang/pt\" \"${DEST}/lang/pt_BR\" \"${DEST}/lang/fr\" \"${DEST}/lang/sr\"
+		COMMAND echo "\\>\\>\\> Copying dicom conformance to dist/"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/resources/conformance.xml" "${DEST}/"
+		COMMAND echo "\\>\\>\\> Copying dicom test card to dist/"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/resources/test_card.dcm" "${DEST}/"
+		COMMAND echo "\\>\\>\\> Copying cadxcore resources to dist/"
+		COMMAND cp -r "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/resources/files/*" "${DEST}/resources/cadxcore/"
+		COMMAND echo "\\>\\>\\> Copying ginkgo binary to dist/"
+		COMMAND cp "${CMAKE_CURRENT_BINARY_DIR}/ginkgocadx/ginkgocadx-${ARCH}" "${DEST}/ginkgocadx-${ARCH}"
+		COMMAND echo "\\>\\>\\> changing RPATH of ginkgo"
+		COMMAND chrpath "${DEST}/ginkgocadx-${ARCH}" -r "." ">/dev/null"
+		COMMAND echo "\\>\\>\\> Stripping ginkgo"
+		COMMAND strip -s "${DEST}/ginkgocadx-${ARCH}"
+		COMMAND echo "\\>\\>\\> Applying perms"
+		COMMAND chmod +x "${DEST}/ginkgocadx-${ARCH}" "${DEST}/ginkgocadx"
+
+		COMMAND echo "\\>\\>\\> Copying libs to dist \\(${ARCH}\\)/"
+		COMMAND cp -a "${CMAKE_CURRENT_BINARY_DIR}/../../lib/${OS}-${ARCH}/*/lib/${DTYPE}/*.so*" \"${DEST}\"
+		COMMAND echo "\\>\\>\\> Applying perms"
+		COMMAND chmod -x "${DEST}/*so*"
+
+		#COMMAND echo "\\>\\>\\> changing RPATH of libCADxCore.so"
+		#COMMAND chrpath "${DEST}/libCADxCore.so" -r "." ">/dev/null"
+		#COMMAND echo "\\>\\>\\> Stripping CADxCore"
+		#COMMAND strip -s "${DEST}/libCADxCore.so"
+		COMMAND echo "\\>\\>\\> Installing translations"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/el/cadxcore.mo" "${DEST}/lang/el"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/el/wxstd.mo" "${DEST}/lang/el"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/es/cadxcore.mo" "${DEST}/lang/es"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/es/wxstd.mo" "${DEST}/lang/es"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/ja/cadxcore.mo" "${DEST}/lang/ja"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/ja/wxstd.mo" "${DEST}/lang/ja"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/de/cadxcore.mo" "${DEST}/lang/de"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/de/wxstd.mo" "${DEST}/lang/de"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/tr/cadxcore.mo" "${DEST}/lang/tr"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/tr/wxstd.mo" "${DEST}/lang/tr"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/pl/cadxcore.mo" "${DEST}/lang/pl"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/pl/wxstd.mo" "${DEST}/lang/pl"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/pt/cadxcore.mo" "${DEST}/lang/pt"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/pt/wxstd.mo" "${DEST}/lang/pt"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/pt_BR/cadxcore.mo" "${DEST}/lang/pt_BR"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/pt_BR/wxstd.mo" "${DEST}/lang/pt_BR"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/fr/cadxcore.mo" "${DEST}/lang/fr"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/fr/wxstd.mo" "${DEST}/lang/fr"
+		COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/cadxcore/lang/sr/cadxcore.mo" "${DEST}/lang/sr"
+	)
+
+	IF(BUILD_VISUALIZATION_EXT)
+		ADD_CUSTOM_COMMAND(
+   	   TARGET ${TPROJECT}
+      	POST_BUILD
+			#COMMAND echo "\\>\\>\\> Copying visualizator libs to dist/Plugins \\(${ARCH}\\)"
+			#COMMAND cp -a ${CMAKE_CURRENT_BINARY_DIR}/visualizator/libvisualizator.so* "${DEST}/Plugins"
+			#COMMAND cp -a ${CMAKE_CURRENT_BINARY_DIR}/visualizator/visualizator.inf "${DEST}/Plugins"
+			#COMMAND echo "\\>\\>\\> changing RPATH of Plugins/libvisualizator.so"
+			#COMMAND chrpath "${DEST}/Plugins/libvisualizator.so" -d ">/dev/null"
+			#COMMAND echo "\\>\\>\\> Stripping visualizator libs"
+			#COMMAND strip -s "${DEST}/Plugins/libvisualizator.so"
+			COMMAND echo "\\>\\>\\> Making subdirs resources/visualizator"
+			COMMAND chmod 755 \"${DEST}/resources\"
+			COMMAND mkdir \"${DEST}/resources/visualizator\"
+			COMMAND chmod 755 \"${DEST}/resources\"
+			COMMAND chmod 755 \"${DEST}/resources/visualizator\"
+   	   COMMAND echo "\\>\\>\\> Copying visualizator resources to dist/"
+	      COMMAND cp -r "${CMAKE_CURRENT_SOURCE_DIR}/visualizator/resources/files/*" "${DEST}/resources/visualizator/"
+			COMMAND echo "\\>\\>\\> Installing translations"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/visualizator/lang/el/visualizator.mo" "${DEST}/lang/el"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/visualizator/lang/es/visualizator.mo" "${DEST}/lang/es"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/visualizator/lang/ja/visualizator.mo" "${DEST}/lang/ja"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/visualizator/lang/de/visualizator.mo" "${DEST}/lang/de"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/visualizator/lang/tr/visualizator.mo" "${DEST}/lang/tr"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/visualizator/lang/pl/visualizator.mo" "${DEST}/lang/pl"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/visualizator/lang/pt/visualizator.mo" "${DEST}/lang/pt"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/visualizator/lang/pt_BR/visualizator.mo" "${DEST}/lang/pt_BR"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/visualizator/lang/fr/visualizator.mo" "${DEST}/lang/fr"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/visualizator/lang/sr/visualizator.mo" "${DEST}/lang/sr"
+		)
+	ENDIF()
+
+	IF(BUILD_OCT_EXT)
+		ADD_CUSTOM_COMMAND(
+   	   TARGET ${TPROJECT}
+      	POST_BUILD
+			COMMAND echo "\\>\\>\\> Copying octextension libs to dist/Plugins \\(${ARCH}\\)"
+			COMMAND cp -a ${CMAKE_CURRENT_BINARY_DIR}/octextension/liboctextension.so* "${DEST}/Plugins"
+			COMMAND cp -a ${CMAKE_CURRENT_BINARY_DIR}/octextension/octextension.inf "${DEST}/Plugins"
+			COMMAND echo "\\>\\>\\> changing RPATH of Plugins/liboctextension.so"
+			COMMAND chrpath "${DEST}/Plugins/liboctextension.so" -d ">/dev/null"
+			COMMAND echo "\\>\\>\\> Stripping octextension libs"
+			COMMAND strip -s "${DEST}/Plugins/liboctextension.so"
+			COMMAND echo "\\>\\>\\> Installing translations"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/octextension/lang/es/octextension.mo" "${DEST}/lang/es"
+		)
+	ENDIF()
+
+
+	IF(BUILD_DERMATHOLOGY_EXT)
+		ADD_CUSTOM_COMMAND(
+         TARGET ${TPROJECT}
+         POST_BUILD
+			COMMAND echo "\\>\\>\\> Copying dermatologia libs to dist/Plugins \\(${ARCH}\\)"
+			COMMAND cp -a ${CMAKE_CURRENT_BINARY_DIR}/dermatologia/libdermatologia.so* "${DEST}/Plugins"
+			COMMAND cp -a ${CMAKE_CURRENT_BINARY_DIR}/dermatologia/dermatologia.inf "${DEST}/Plugins"
+			COMMAND echo "\\>\\>\\> changing RPATH of Plugins/libdermatologia.so"
+			COMMAND chrpath "${DEST}/Plugins/libdermatologia.so" -d ">/dev/null"
+			COMMAND echo "\\>\\>\\> Stripping dermatologia libs"
+			COMMAND strip -s "${DEST}/Plugins/libdermatologia.so"
+			COMMAND echo "\\>\\>\\> Installing translations"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/dermatologia/lang/es/derma.mo" "${DEST}/lang/es"	
+		)
+	ENDIF()
+
+	IF(BUILD_OPHTALMOLOGY_EXT)
+		ADD_CUSTOM_COMMAND(
+         TARGET ${TPROJECT}
+         POST_BUILD
+			COMMAND echo "\\>\\>\\> Copying oftalmologia libs to dist/Plugins \\(${ARCH}\\)"
+			COMMAND cp -a ${CMAKE_CURRENT_BINARY_DIR}/oftalmologia/liboftalmologia.so* "${DEST}/Plugins"
+			COMMAND cp -a ${CMAKE_CURRENT_BINARY_DIR}/oftalmologia/oftalmologia.inf "${DEST}/Plugins"
+			COMMAND echo "\\>\\>\\> changing RPATH of Plugins/liboftalmologia.so"
+			COMMAND chrpath "${DEST}/Plugins/liboftalmologia.so" -d ">/dev/null"
+			COMMAND echo "\\>\\>\\> Stripping oftalmologia libs"
+			COMMAND strip -s "${DEST}/Plugins/liboftalmologia.so"
+	
+			COMMAND echo "\\>\\>\\> Installing translations"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/oftalmologia/lang/es/oftal.mo" "${DEST}/lang/es"
+		)
+	ENDIF()
+
+   IF(BUILD_SCANNER_EXT)
+		ADD_CUSTOM_COMMAND(
+         TARGET ${TPROJECT}
+         POST_BUILD
+         COMMAND echo "\\>\\>\\> Copying scanne libs to dist/Plugins \\(${ARCH}\\)"
+         COMMAND cp -a ${CMAKE_CURRENT_BINARY_DIR}/scannerextension/libscannerextension.so* "${DEST}/Plugins"
+			COMMAND cp -a ${CMAKE_CURRENT_BINARY_DIR}/scannerextension/scannerextension.inf "${DEST}/Plugins"
+         COMMAND echo "\\>\\>\\> changing RPATH of Plugins/libscannerextension.so"
+         COMMAND chrpath "${DEST}/Plugins/libscannerextension.so" -d ">/dev/null"
+         COMMAND echo "\\>\\>\\> Stripping scannerextension libs"
+         COMMAND strip -s "${DEST}/Plugins/libscannerextension.so"
+   
+         COMMAND echo "\\>\\>\\> Installing translations"
+         COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/scannerextension/lang/es/scannerextension.mo" "${DEST}/lang/es"
+      )
+   ENDIF()
+
+
+	IF(BUILD_DERMATHOLOGY_EXT OR BUILD_OPHTALMOLOGY_EXT OR BUILD_SCANNER_EXT)
+		ADD_CUSTOM_COMMAND(
+         TARGET ${TPROJECT}
+         POST_BUILD
+			COMMAND echo "\\>\\>\\> Installing translations"
+			COMMAND cp "${CMAKE_CURRENT_SOURCE_DIR}/lib_activation/lang/es/lib_activation.mo" "${DEST}/lang/es"
+		)
+	ENDIF()
+
+
+ENDMACRO(PACKAGE_RULES)
+
+#############################################################################################
+
+MACRO(ADD_GINKGO_DEFINITIONS)
+	
+	ADD_GLOBAL_GINKGO_DEFINITIONS()
+	
+	ADD_DEFINITIONS(-DLINUX -DMONOLITIC)
+	IF(CUSTOM_PACKAGE)
+		ADD_DEFINITIONS(-DCUSTOM_PACKAGE)
+	ENDIF()	
+	
+ENDMACRO(ADD_GINKGO_DEFINITIONS)
+
+#############################################################################################
+
+MACRO(ADD_EXTENSION_DEFINITIONS)
+	
+	ADD_GLOBAL_EXTENSION_DEFINITIONS()
+		
+ENDMACRO(ADD_EXTENSION_DEFINITIONS)
+
+#############################################################################################
+
+MACRO(ADD_CORE_DEFINITIONS)
+	
+	ADD_GLOBAL_CORE_DEFINITIONS()
+	
+ENDMACRO(ADD_CORE_DEFINITIONS)
+
+#############################################################################################
+
+MACRO (SET_CUSTOM_libcurl_PACKAGE)
+	SET(libcurl_FOUND TRUE)
+	SET(libcurl_defines -DCURL_STATICLIB)
+        SET(libcurl_INCLUDE_DIR
+                ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/libcurl-7.28.1/include
+        )
+        SET(libcurl_LIBRARIES curl)
+	SET(libcurl_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/libcurl-7.28.1/lib/${DTYPE})
+ENDMACRO()
+
+
+MACRO(SET_CUSTOM_wxWidgets_PACKAGE)
+	SET(wxWidgets_FOUND TRUE)
+	SET(wxWidgets_defines -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXGTK__ -DHAVE_CONFIG_H -D_REENTRANT -DNDEBUG -DwxDEBUG_LEVEL=0)
+	SET(wxWidgets_INCLUDE_DIR
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/WX-3.0.1/gtk2-unicode-${DTYPE}-3.0
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/WX-3.0.1/include
+	)
+	SET(wxWidgets_LIBRARIES wx_gtk2u-3.0 wx_gtk2u_gl-3.0)
+	
+	SET(wxWidgets_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/WX-3.0.1/lib/${DTYPE})
+ENDMACRO()
+
+MACRO(SET_CUSTOM_VTK_PACKAGE)
+	SET(VTK_FOUND TRUE)
+	SET(VTK_defines -DVTK_DEBUG_LEAKS)
+	SET(VTK_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/VTK-5.6.1/include)
+	SET(VTK_LIBRARIES
+		vtkCommon vtkGraphics vtkFiltering vtkHybrid vtkIO vtkRendering vtkImaging
+		vtkGenericFiltering vtkWidgets vtkftgl vtkVolumeRendering vtkexoIIc vtkDICOMParser
+		vtkjpeg vtktiff vtkpng vtkzlib vtkexpat vtksys vtkfreetype
+	)
+	SET(VTK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/VTK-5.6.1/lib/${DTYPE})
+ENDMACRO()
+
+MACRO(SET_CUSTOM_ITK_PACKAGE)
+	SET(ITK_FOUND TRUE)
+	SET(ITK_defines)
+	SET(ITK_INCLUDE_DIR
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include/gdcm/src
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include/Common
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include/IO
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include/BasicFilters
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include/Algorithms
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include/Numerics
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include/Numerics/Statistics
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include/Utilities
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include/Utilities/vxl/core
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include/Utilities/vxl/vcl
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/include/gdcm/src
+	)
+	SET(ITK_LIBRARIES
+		ITKCommon ITKIO ITKMetaIO ITKAlgorithms itkgdcm itksys itkgdcm
+		itkjpeg8 itkjpeg12 itkjpeg16 itktiff itkpng itkzlib itkopenjpeg
+		ITKDICOMParser itkv3p_netlib itkvcl itkvnl itkvnl_algo itkvnl_inst
+		ITKniftiio ITKStatistics ITKBasicFilters ITKNrrdIO ITKMetaIO ITKznz
+	)
+	SET(ITK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/ITK-3.20.0/lib/${DTYPE})
+ENDMACRO()
+
+MACRO(SET_CUSTOM_DCMTK_PACKAGE)
+	SET(DCMTK_FOUND TRUE)
+	SET(DCMTK_defines)
+	SET(DCMTK_INCLUDE_DIR
+		${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/DCMTK-3.6.0/include
+	)
+	SET(DCMTK_LIBRARIES
+		dcmdata dcmtls dcmnet ofstd oflog dcmjpeg dcmimage
+		dcmimgle dcmsr ijg8 ijg12 ijg16
+	)
+	SET(DCMTK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../lib/${OS}-${ARCH}/DCMTK-3.6.0/lib/${DTYPE})
+ENDMACRO()
diff --git a/CMake/MacProperties.cmake b/CMake/MacProperties.cmake
new file mode 100644
index 0000000..7c229d0
--- /dev/null
+++ b/CMake/MacProperties.cmake
@@ -0,0 +1,111 @@
+
+#############################################################################################
+
+SET(Cairo_FOUND TRUE)
+SET(Cairo_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/cairo-1.8.10/include)
+SET(Cairo_LIBRARIES cairo-1.8.10)
+SET(Cairo_LIB ${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/cairo-1.8.10/lib/${DTYPE})
+SET(Pixman_FOUND TRUE)
+SET(Pixman_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/cairo-1.8.10/include)
+SET(Pixman_LIBRARIES pixman-0.17.10)
+SET(Pixman_LIB ${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/pixman-0.17.10/lib/${DTYPE})
+
+#############################################################################################
+
+MACRO(PACKAGE_RULES PROJECT_NAME ARCH DEST)
+
+ENDMACRO(PACKAGE_RULES)
+
+#############################################################################################
+
+MACRO(ADD_GINKGO_DEFINITIONS)
+	
+	ADD_GLOBAL_GINKGO_DEFINITIONS()
+	
+ENDMACRO(ADD_GINKGO_DEFINITIONS)
+
+#############################################################################################
+
+MACRO(ADD_EXTENSION_DEFINITIONS)
+	
+	ADD_GLOBAL_EXTENSION_DEFINITIONS()
+		
+ENDMACRO(ADD_EXTENSION_DEFINITIONS)
+
+#############################################################################################
+
+MACRO(ADD_CORE_DEFINITIONS)
+	
+	ADD_GLOBAL_CORE_DEFINITIONS()
+	
+ENDMACRO(ADD_CORE_DEFINITIONS)
+
+#############################################################################################
+
+MACRO(SET_CUSTOM_wxWidgets_PACKAGE)
+	SET(wxWidgets_FOUND TRUE)
+	SET(wxWidgets_defines -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXMAC__ -DHAVE_CONFIG_H -D_REENTRANT)
+	SET(wxWidgets_INCLUDE_DIR
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/WX-2.8.11/mac-unicode-${DTYPE}-2.8
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/WX-2.8.11/include
+	)
+	IF (DEBUG)
+		SET(wxWidgets_LIBRARIES wx_macud-2.8)
+	ELSE()
+		SET(wxWidgets_LIBRARIES wx_macu-2.8)
+	ENDIF()
+	
+	SET(wxWidgets_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/WX-2.8.11/lib/${DTYPE})
+ENDMACRO()
+
+MACRO(SET_CUSTOM_VTK_PACKAGE)
+	SET(VTK_FOUND TRUE)
+	SET(VTK_defines -DVTK_DEBUG_LEAKS)
+	SET(VTK_INCLUDE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/VTK-5.6.1/include)
+	SET(VTK_LIBRARIES
+		vtkCommon vtkGraphics vtkFiltering vtkHybrid vtkIO vtkRendering vtkImaging
+		vtkGenericFiltering vtkWidgets vtkftgl vtkVolumeRendering vtkexoIIc vtkDICOMParser
+		vtkjpeg vtktiff vtkpng vtkzlib vtkexpat vtksys vtkfreetype
+	)
+	SET(VTK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/VTK-5.6.1/lib/${DTYPE})
+ENDMACRO()
+
+MACRO(SET_CUSTOM_ITK_PACKAGE)
+	SET(ITK_FOUND TRUE)
+	SET(ITK_defines)
+	SET(ITK_INCLUDE_DIR
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include/gdcm/src
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include/Common
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include/IO
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include/BasicFilters
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include/Algorithms
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include/Numerics
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include/Numerics/Statistics
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include/Utilities
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include/Utilities/vxl/core
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include/Utilities/vxl/vcl
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/include/gdcm/src
+	)
+	SET(ITK_LIBRARIES
+		ITKCommon ITKIO ITKMetaIO ITKAlgorithms itkgdcm itksys itkgdcm
+		itkjpeg8 itkjpeg12 itkjpeg16 itktiff itkpng itkzlib itkopenjpeg
+		ITKDICOMParser itkv3p_netlib itkvcl itkvnl itkvnl_algo itkvnl_inst
+		ITKniftiio ITKStatistics ITKBasicFilters ITKNrrdIO ITKMetaIO ITKznz
+	)
+	SET(ITK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/ITK-3.20.0/lib/${DTYPE})
+ENDMACRO()
+
+MACRO(SET_CUSTOM_DCMTK_PACKAGE)
+	SET(DCMTK_FOUND TRUE)
+	SET(DCMTK_defines)
+	SET(DCMTK_INCLUDE_DIR
+		${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/DCMTK-3.6.0/include
+	)
+	SET(DCMTK_LIBRARIES
+		dcmdata dcmtls dcmnet ofstd oflog dcmjpeg dcmimage
+		dcmimgle dcmsr ijg8 ijg12 ijg16
+	)
+	SET(DCMTK_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../dll/${OS}-${ARCH}/DCMTK-3.6.0/lib/${DTYPE})
+ENDMACRO()
diff --git a/CMake/PrvExtDeps.cmake b/CMake/PrvExtDeps.cmake
new file mode 100644
index 0000000..d016886
--- /dev/null
+++ b/CMake/PrvExtDeps.cmake
@@ -0,0 +1 @@
+SUBDIRS( lib_activation derma_pasi lib_retina )
diff --git a/CMake/SysDefs.cmake b/CMake/SysDefs.cmake
new file mode 100644
index 0000000..0012d21
--- /dev/null
+++ b/CMake/SysDefs.cmake
@@ -0,0 +1,93 @@
+IF(${CMAKE_BUILD_TYPE} MATCHES "^Deb")
+    SET(DEBUG TRUE)
+	SET(DTYPE "debug")
+ELSE()
+	SET(DTYPE "release")
+ENDIF()
+
+IF(${CMAKE_SYSTEM_NAME} MATCHES "Windows")
+	SET(OS "Windows")
+	SET(ARCH "x86")	
+	SET(WINDOWS TRUE)
+	INCLUDE(WinPackage)
+
+ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+	SET(OS "Linux")
+	SET(LINUX TRUE)
+	IF (${CMAKE_SYSTEM_PROCESSOR} STREQUAL "x86_64")
+		SET(ARCH "x86_64")
+	ELSEIF(${CMAKE_SYSTEM_PROCESSOR} MATCHES "i?86")
+		SET(ARCH "x86")
+	ELSE()
+		MESSAGE("UNSUPPORTED ARCH")
+	ENDIF()
+	INCLUDE(LinuxProperties)
+
+ELSEIF(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
+	SET(OS "OSX")
+	SET(MACOS TRUE)
+	SET(ARCH "x86")
+	INCLUDE(MacProperties)
+ELSE()
+	MESSAGE("UNSUPPORTED OS")
+ENDIF()
+
+#############################################################################################
+
+IF(WINDOWS)
+	SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:SSE2")
+
+ELSEIF(LINUX OR APPLE)
+	IF(FORCE_SSE2)
+		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -msse2")
+	ELSE()
+		SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
+	ENDIF()
+ENDIF()
+
+#############################################################################################
+
+MACRO(ADD_GLOBAL_GINKGO_DEFINITIONS)
+	
+	IF (DEBUG)
+		ADD_DEFINITIONS(-D_GINKGO_DEBUG -DVTK_DEBUG_LEAKS -DDEBUG -D__WXDEBUG__)
+	ENDIF()
+
+	ADD_DEFINITIONS(-DUSING_EXTENSIONS -DGINKGO_ARCH_${ARCH})
+	
+	IF (USE_PATCHED_LIBS)
+		ADD_DEFINITIONS(-DUSE_PATCHED_LIBS)
+	ENDIF()
+
+
+	IF(INTERNET_DIST)
+		ADD_DEFINITIONS(-DINTERNET_DIST)
+	ENDIF()
+	
+ENDMACRO(ADD_GLOBAL_GINKGO_DEFINITIONS)
+
+#############################################################################################
+
+MACRO(ADD_GLOBAL_EXTENSION_DEFINITIONS)
+	
+	ADD_GINKGO_DEFINITIONS()
+	
+ENDMACRO(ADD_GLOBAL_EXTENSION_DEFINITIONS)
+
+#############################################################################################
+
+MACRO(ADD_GLOBAL_CORE_DEFINITIONS)
+	
+	ADD_GINKGO_DEFINITIONS()
+	
+	ADD_DEFINITIONS(-DAPIEXPORT)
+	ADD_DEFINITIONS(-DGINKGO_VERSION="${GINKGO_VERSION}")
+	ADD_DEFINITIONS(-DGINKGO_CODENAME="${GINKGO_CODENAME}")
+	
+	IF(USE_SYSTEM_SQLITE)
+		ADD_DEFINITIONS(-DUSE_SYSTEM_SQLITE)
+	ENDIF()
+
+	
+ENDMACRO(ADD_GLOBAL_CORE_DEFINITIONS)
+
diff --git a/CMake/WinProperties.cmake b/CMake/WinProperties.cmake
new file mode 100644
index 0000000..a856552
--- /dev/null
+++ b/CMake/WinProperties.cmake
@@ -0,0 +1,4 @@
+MACRO(PACKAGE_RULES PROJECT_NAME ARCH DEST)
+
+ENDMACRO(PACKAGE_RULES)
+
diff --git a/CMakeLists.txt b/CMakeLists.txt
new file mode 100644
index 0000000..3c67a35
--- /dev/null
+++ b/CMakeLists.txt
@@ -0,0 +1,195 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+
+PROJECT(BUILD_ALL)
+
+SET( GINKGO_VERSION 3.8.6)
+
+SET( USE_PATCHED_LIBS        FALSE CACHE BOOL "Use patched libraries")
+SET( BUILD_VISUALIZATION_EXT TRUE CACHE BOOL "Build Visualization extention")
+
+SET( USE_SYSTEM_SQLITE       TRUE CACHE BOOL "Build with system SQLite library")
+SET( USE_CUSTOM_WX           FALSE CACHE BOOL "Build with custom WX library")
+SET( USE_CUSTOM_VTK          FALSE CACHE BOOL "Build with custom VTK library")
+SET( USE_CUSTOM_ITK          FALSE CACHE BOOL "Build with custom ITK library")
+SET( USE_CUSTOM_DCMTK        FALSE CACHE BOOL "Build with custom DCMTK library")
+
+SET( CUSTOM_PACKAGE          FALSE CACHE BOOL "Custom package")
+SET( FORCE_SSE               FALSE CACHE BOOL "Force SSE Flag")
+SET( INTERNET_DIST           TRUE CACHE BOOL "Public distribution")
+
+SET( CMAKE_OSX_ARCHITECTURES "i386" CACHE STRING "MacOSX Architectures" FORCE)
+
+SET( GINKGO_VERSION_STR ${GINKGO_VERSION})
+
+#############################################################################################
+
+SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/CMake)
+INCLUDE(SysDefs)
+
+#############################################################################################
+include(FindPkgConfig)
+
+include(CheckCXXCompilerFlag)
+
+IF (((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND
+      (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 5.3.0)) OR
+    ((${CMAKE_CXX_COMPILER_ID} STREQUAL "Clang") AND
+      (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 3.3.0)))
+  MESSAGE(STATUS "Compiler has full c++11 support")
+
+  # g++ >= 6.0 sets std=c++14 by default
+  IF ((${CMAKE_CXX_COMPILER_ID} STREQUAL "GNU") AND
+      (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 6.0.0))
+    SET(CXX_11_FLAG "-std=c++11")
+  ENDIF()
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  ${CXX_11_FLAG}")
+ELSE()
+  CHECK_CXX_COMPILER_FLAG("-std=c++11" HAS_GNU_CXX11_FLAG)
+  IF(HAS_GNU_CXX11_FLAG)
+    SET(CXX_11_FLAG "-std=c++11")
+  ELSE(HAS_GNU_CXX11_FLAG)
+    CHECK_CXX_COMPILER_FLAG("-std=c++0x" HAS_GNU_CXX0X_FLAG)
+    IF(HAS_GNU_CXX0X_FLAG)
+      SET(CXX_11_FLAG "-std=c++0x")
+    ELSE(HAS_GNU_CXX0X_FLAG)
+      MESSAGE(WARNING "Don't know how to enable C++11, if you are lucky, they are enabled by default")
+    ENDIF(HAS_GNU_CXX0X_FLAG)
+  ENDIF(HAS_GNU_CXX11_FLAG)
+  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}  ${CXX_11_FLAG}")
+  INCLUDE (${CMAKE_CURRENT_SOURCE_DIR}/cmake/checkCpp0xAuto.cmake)
+  INCLUDE (${CMAKE_CURRENT_SOURCE_DIR}/cmake/checkCpp0xLambda.cmake)
+  IF(NOT "${CXX_HAS_CXX_0X_AUTO}" OR NOT CXX_HAS_CXX_0X_LAMBDA)
+    MESSAGE(FATAL_ERROR
+      "This source code requires the C++0x auto type and lambda features. "
+      "If your compiler is supposed to support this feature, "
+      "please enable the appropriate flags and delete the CMakeCache.txt file before "
+      "re-running cmake.\n"
+      "For g++ >= 4.8 this is '-std=c++0x' ")
+  ENDIF(NOT "${CXX_HAS_CXX_0X_AUTO}" OR NOT CXX_HAS_CXX_0X_LAMBDA)
+ENDIF()
+
+#doesn't work... using custom build
+#IF(LINUX)
+#FIND_PACKAGE(LIBCURL REQUIRED)
+#ENDIF()
+SET_CUSTOM_libcurl_PACKAGE()
+
+IF(NOT USE_CUSTOM_WX)
+FIND_PACKAGE(wxWidgets 3.0.2 COMPONENTS core base html gl net xml aui adv richtext xrc propgrid REQUIRED)
+ELSE()
+MESSAGE(STATUS "Using custom wxWidgets")
+SET_CUSTOM_wxWidgets_PACKAGE()
+ENDIF()
+
+IF(NOT USE_CUSTOM_VTK)
+  FIND_PACKAGE(VTK 7.0.0)
+  IF (NOT VTK_FOUND)
+    FIND_PACKAGE(VTK 6.2.0 REQUIRED)
+  ENDIF()
+ELSE()
+MESSAGE(STATUS "Using custom VTK")
+SET_CUSTOM_VTK_PACKAGE()
+ENDIF()
+
+IF(NOT USE_CUSTOM_ITK)
+FIND_PACKAGE(ITK 4.8.0 REQUIRED COMPONENTS ITKCommon ITKGDCM ITKIOImageBase ITKIOVTK ITKVTK ITKIOGDCM)
+ELSE()
+MESSAGE(STATUS "Using custom ITK")
+SET_CUSTOM_ITK_PACKAGE()
+ENDIF()
+
+IF(NOT USE_CUSTOM_DCMTK)
+FIND_PACKAGE(DCMTK 3.6.1 REQUIRED)
+ELSE()
+MESSAGE(STATUS "Using custom DCMTK")
+SET_CUSTOM_DCMTK_PACKAGE()
+ENDIF()
+
+SET(CMAKE_REQUIRED_INCLUDES ${DCMTK_INCLUDES})
+SET(CMAKE_REQUIRED_LIBRARIES ${DCMTK_LIBRARIES})
+
+CHECK_CXX_SOURCE_COMPILES(
+"#include <dcmtk/dcmdata/dcitem.h>
+#include <dcmtk/dcmdata/dcdeftag.h>
+
+int main(int argc, char *args[])
+{
+     DcmTagKey tag(DCM_StudyDate);
+     DcmElement *test = DcmItem::newDicomElement(tag);
+     return test == 0;
+}
+" DCMTK_newDicomElement_IS_STATIC_MEMBER_OF_DcmItem)
+
+IF(DCMTK_newDicomElement_IS_STATIC_MEMBER_OF_DcmItem)
+  ADD_DEFINITIONS(-DDCMTK_POST_20170228)
+ENDIF()
+
+
+
+IF(NOT USE_SYSTEM_SQLITE)
+MESSAGE(STATUS "Using builtin SQLite")
+ELSE()
+MESSAGE(STATUS "Using system SQLite")
+#FIND_PACKAGE(sqlite REQUIRED)
+
+ENDIF()
+
+
+# require cairo includes
+PKG_CHECK_MODULES(CAIRO REQUIRED cairo)
+INCLUDE_DIRECTORIES(${CAIRO_INCLUDE_DIRS})
+LINK_DIRECTORIES(${CAIRO_LIBRARY_DIRS})
+
+IF(LINUX)
+  PKG_CHECK_MODULES(GTK REQUIRED gtk+-2.0)
+  INCLUDE_DIRECTORIES(${GTK_INCLUDE_DIRS})
+  LINK_DIRECTORIES(${GTK_LIBRARY_DIRS})
+
+  PKG_CHECK_MODULES(LIBCURL REQUIRED libcurl)
+  INCLUDE_DIRECTORIES(${LIBCURL_INCLUDE_DIRS})
+  LINK_DIRECTORIES(${LIBCURL_LIBRARY_DIRS})
+
+ENDIF()
+
+
+
+
+
+
+
+#############################################################################################
+
+IF(MACOS)
+SET(GINKGO_PROJECT "Ginkgo CADx" CACHE PARENT_SCOPE "")
+ELSEIF(LINUX AND CUSTOM_PACKAGE)
+SET(GINKGO_PROJECT "ginkgocadx-${ARCH}" CACHE PARENT_SCOPE "")
+ELSE()
+SET(GINKGO_PROJECT "ginkgocadx" CACHE PARENT_SCOPE "")
+ENDIF()
+
+SET(GINKGO_PLUGINS "" CACHE PARENT_SCOPE "")
+
+ADD_SUBDIRECTORY(cadxcore)
+ADD_SUBDIRECTORY(ginkgocadx)
+
+IF(BUILD_VISUALIZATION_EXT)
+ADD_SUBDIRECTORY(visualizator)
+ENDIF()
+
+ADD_CUSTOM_TARGET(${PROJECT_NAME} echo)
+
+MESSAGE(STATUS "Building ${GINKGO_PROJECT} ${GINKGO_VERSION_STR}")
+
+ADD_DEPENDENCIES(${PROJECT_NAME} "${GINKGO_PROJECT}")
+
+IF(BUILD_VISUALIZATION_EXT)
+ADD_DEPENDENCIES(${PROJECT_NAME} visualizator)
+LIST(APPEND GINKGO_PLUGINS "visualizator")
+ENDIF()
+
+IF(CUSTOM_PACKAGE)
+
+SET( DEST "${CMAKE_CURRENT_BINARY_DIR}/dist" )
+PACKAGE_RULES( "${PROJECT_NAME}" "${ARCH}" "${DEST}" )
+ENDIF()
+
diff --git a/ChangeLog b/ChangeLog
new file mode 100644
index 0000000..9d85190
--- /dev/null
+++ b/ChangeLog
@@ -0,0 +1,515 @@
+Version 3.8.4 (2016-01-08)
+-------------------------
+
+ * Correct shaders again, because the llvm based shader
+   compiler is really restrictive with the clamp function.
+
+
+Version 3.8.3 (2015-04-12)
+-------------------------
+
+* Remove some un-used code that fails  to compile with the
+  upcoming openssl-1.1.0
+
+
+Version 3.8.2 (2015-04-12)
+-------------------------
+
+* Correct shaders for image coloring. Closes: #18 
+
+
+Version 3.8.1 (2015-04-12)
+-------------------------
+
+* Correct display of ECG series loaded from files with more then
+  one data set. Closes #17
+
+Version 3.8.0 (2015-03-16)
+-------------------------
+
+* Silence warning log that blocks the program when opening a data
+  set, Closes #11
+* Fix crash when views would be changed from 1x2 or 2x1 to 1x1
+  Closes: #14
+* Run the code through Coverity and fix a lot of issues. Closes: #15
+* Clean up the version number handling to make sure that is used
+  what is given in CMakeLists.txt
+
+Version 3.7.5 (2016-02-25)
+--------------------------
+
+* Correct regression that MOVE answers from PACS server
+  time out
+* Work around that clang++ uses  move constructor instead of
+  copy constructor
+* Remove __DATE__ macros from code, Closes: #9
+* Remove pre VTK-6 code path Closes: #7
+* Remove calls to SetMaxLength on multiline widgets Closes: #10 
+* Update DCMTK version specifier 
+* Remove pre-3.0 wxWidget code Closes: #6 
+
+Version 3.7.4 (2016-02-25)
+--------------------------
+
+* Disable forced maximization on non-windows (Closes:#5)
+
+Version 3.7.3 (2016-02-25)
+--------------------------
+
+* don't reparent vtkwxRenderWindow to NULL (Closes: #2)
+* correct some stelling errors.
+
+
+Version 3.7.2 (2016-02-23)
+--------------------------
+
+* Move to github and start fork of abandoned version
+* Update build to use VTK-6, ITK-4, and DCMTK 3.6.1
+* Fix some possible race conditions by using std::atomic
+* Clean up licenses
+* remove embedded jsoncpp
+
+Version 3.7.1 (2014-12-01)
+---------------------------
+* Orientation label fixes in CR and MG modalities.
+* Widgets interactuation and selection usability enhances.
+* Deadlock fix in smart retrieve.
+* Bug fix in upload permission.
+* wxWidgets update to 3.0.1.
+* Compilation fix provided by Olly Betts (http://bugs.debian.org/749487)
+* Some issues fixes provided by Dmitry Smirnov.
+* Set process default to LTR layout in Windows.
+
+Version 3.7.0 (2014-06-16)
+---------------------------
+* Ortogonal rule tool for ECG
+* Added Maximum number of C-Find responses parametrization in profiles.
+* MPR layout enhances.
+* Text and annotations enhances.
+* Other visual and style improvements: contrast, colors..
+* Bug fix in export window.
+* Bug fix expanding empty results iun PACS search.
+* Fixed series double click behaviour.
+* DOC modality added.
+* Tool selection memorization
+* EC modality added in ECG viewer modality support list
+* Other usability enhances and behavior fixes.
+
+Version 3.6.1 (2014-02-27)
+---------------------------
+* UI migrated to wxWidgets 3.0.0 all forms has changed
+* Smart retrieve feature, allows user to automatically download studies.
+* User can store favourite queries
+* WADO retrieves in CD/DVD/USB recording workflow
+* Added translation to french and serbian
+* Traslation updates
+* Allow to specify config file by command line: --config-file=<path>
+* Usability enhances in mouse button processing.
+* Search restrictions removed performing Q/R from integration profiles
+* Other minor bug fixes
+
+Version 3.6.0 (2013-12-18)
+---------------------------
+* Added permission to specify what Storage SOP Class to use in dicomization
+* Added permision to allow specify accession number in dicomization window
+* Final cancel ignored in DICOM communications, when maximum response limit is reached, for the responses to appear in the window. 
+* Error fixes in cloud dialog.
+* Anonymous usage statistics.
+* Corner annotations are now fully customizable.
+* Allow new attributes to be added on anonymization tool.
+* Added permission to specify what Storage SOP Class to use in dicomization
+* Added permision to allow specify accession number in dicomization window
+* Cloud API enhances.
+* Error fixes in cloud dialog.
+* Pure WADO integration through XML integration file
+* Resources directory bug fixed.
+* Final cancel ignored in DICOM communications, when maximum response limit is reached, for the responses to appear in the window.  
+
+Version 3.5.1 (2013-10-23)
+---------------------------
+* Bugfixes.
+
+Versión 3.5.0 (2013-10-10)
+---------------------------
+* Better hanging protocols support.
+* Camera rotation tool.
+* Added new LUTs for PET/Fussion
+* GUI usability enhances.
+* Internal refactoring.
+* Other internal improvements and bug fixes.
+
+Versión 3.4.1 (2013-08-05)
+---------------------------
+* Mainteinance release.
+
+Versión 3.4.0 (2013-07-17)
+---------------------------
+
+* Fixed bug viewing CT Dose
+* Fixed bug checking if a slice belongs to a volume
+* Cloud bugfixes and API update
+* Show the free disk space before import.
+* Fixed bug in viewer layout.
+* Zoom level visual helper.
+* Show architecture (32 or 64 bits) in main window.
+* Show a warning before overwriting studies.
+* Static rule widget.
+* Check minimum and maximum values to verify representation.
+* Multiple monitor support enhances in GinkgoCADx Hanging Reports.
+
+Versión 3.3.0 (2013-04-17)
+
+* Ginkgo Cloud for sharing anonymized studies: Search and download support.
+* Query/Retrieve panel ui enhances
+* History and tools ui enhances
+* Internal threads managing enhances.
+* Image Orientation (L,R,S,I,A,P) annotations.
+* SC Image report generation
+* Minor enhances
+* Some tools are now available in top menu bar.
+* Allow to paste images through clipboard when importing.
+
+Version 3.2.0 (2013-02-15)
+---------------------------
+* PACS downloads simplified.
+* Enhanced error notification in PACS operations.
+* WADO download support
+* URI integration support ginkgo:// (automatically registered with Windows installer.)
+* Bug fixes :
+	- Rotation + flip behaviour fix
+
+Version 3.1.0 (2012-12-12)
+---------------------------
+* Custom Hanging protocols support.
+* GinkgoCADx now can open studies directly.
+* Drag&Drop support.
+* Some fixes suggested by users:
+ - Linux launcher
+ - Show Slice Thickness.
+* Resources extracted from executable:
+ - Images
+* DICOM Nodes specific charset configuration
+* wrong LGPL3 aditional clause removed
+* DICOMDir now imports in link-mode
+* Task retry feature
+* Log monitor charset fixed
+* Open automatically feature fixed
+* Some speed enhances
+* Polish traslation
+* HL7 not enabled by default
+* Added a DICOM grayscale test card to verify visuallization
+* Open automatically behavior restored (at drag&drop, file as arg...)
+* Retry feature sending to PACS.
+* Look&Feel enhancements
+* PACS localization selection support.
+* Many bug fixes.
+
+Version 3.0.0 rc (2012-09-14)
+---------------------------
+* Binary architecture of modules back to static
+* Grid layout removed
+* 1:1 zoom
+* Look&Feel enhancements
+* Stability and accuracy deep revision. Code review and refactoring.
+* Unit test support
+* Tool system refactoring.
+* History refactoring.
+* Many bug fixes.
+
+Version 2.14.0.4972 final (2012-06-26)
+---------------------------
+* Fixed bug in DICOM print with compressed images.
+* Fixed bug in DICOM loader.
+* Some enhancements and minor corrections.
+* Translation updates.
+* Linux official distribution binaries upgraded for Ubuntu Precise Pangolin: 12.04 LTS.
+
+MD5 of the released files with this version:
+
+d91260f97856f90c065817a966824cf7 Ginkgo_CADx-2.14.0.4972_linux_x86.tgz
+9961cd7e078d8f5f379806434e226f15 Ginkgo_CADx-2.14.0.4972_linux_x86_64.tgz
+eae562b09e2528c3e84fbdf943770441 Ginkgo_CADx-2.14.0.4972_installer.exe
+e67d82359487aaa742cb2e949791f143 Ginkgo_CADx-2.14.0.4972_win32.zip
+a52f7d2319195224e675b6e1af088947 ginkgocadx-2.14.0.4972.tgz
+
+
+Version 2.12.0.4869 final (2012-04-19)
+---------------------------
+* Window level speed has been enhanced using Pixels shaders when possible.
+* Brazillian portuguese translation
+* Charset of dicomized files can be selected in configuration
+* Some window/level related bugs has been corrected
+* Image description tag is shown in corner annotations
+* Other minor improvements and bug fixes
+
+MD5 of the released files with this version:
+7ac293aa10427c82368bcbf0dc853f35  Ginkgo_CADx-2.12.0.4889_linux_x86_64.tgz
+11acbd3a039f14b3f3cfe5e64124fd78  Ginkgo_CADx-2.12.0.4889_linux_x86.tgz
+7d2902f89ac90f93f6cfd754e5d1e50f  ginkgocadx-2.12.0.4889.tgz
+f9cb7b89b28f1cc3094cd4774f4531da Ginkgo_CADx-2.12.0.4889_installer.exe
+85c3b368c1bbf37d2dfa484e8b5cd383 Ginkgo_CADx-2.12.0.4889_win32.zip
+
+Version 2.10.0.4786 final (2012-03-08)
+---------------------------
+* UID root of dicomized files changed to metaemotion's uid
+* Second surname field has been deleted from dicomization
+* PDF's could be dicomized in opensource dicomization workflow
+* Refactoring of profiles configuration
+* Refactoring of integration subsystem, ORU mensaje is specified in a template
+
+MD5 of the released files with this version:
+f66cb29d5da6a9478e9ba0f7f6e49097  Ginkgo_CADx-2.10.0.4786_linux_x86_64.tgz
+e8e4d256c347059d628bca3e59c1a32a  Ginkgo_CADx-2.10.0.4786_linux_x86.tgz
+fbb5b602f33c6305954d4314c41e0553  Ginkgo_CADx-2.10.0.4786_installer.exe
+b2e1ed41f84e8ef73da009d3e24e33b7  Ginkgo_CADx-2.10.0.4786_win32.zip
+a08c8e8fe03b9063a015319556d93e76  ginkgocadx-2.10.0.4786.tgz
+
+Version 2.8.0.4540 final (2012-01-26)
+----------------------------
+* Stable version
+* corrected error in CMake building
+* Other minor improvements and bug fixes
+
+MD5 of the released files with this version:
+ab7bbcc41b8cdd41bc8e5327e897972b Ginkgo_CADx-2.8.0.4602_final_installer.exe
+5cad9495c728115119bc9899aaad736d Ginkgo_CADx-2.8.0.4602_final_win32.zip
+656c7449334fd294ca95dd00a1effb08 Ginkgo_CADx-2.8.0.4602_linux_x86.tgz
+c865b6f1ecef528983525db5e3ad66c2 Ginkgo_CADx-2.8.0.4602_linux_x86_64.tgz
+c5a42f5d44b68653a89321cee0775d1a ginkgocadx-2.8.0.4602.tgz
+
+Version 2.8.0.4540 rc (2012-01-16)
+----------------------------
+* Full tools subsystem refactoring. Now it's possible to bind a mouse button to a tool.
+* New zoom and pan tools has been included
+* Corrected bug in connections to ClearCanvas PACS server
+* Corrected menu bug in Unity, menu is shown as it was in ubuntu 9.x
+* Change name/surname order in patient name at importation
+* Export/import configuration from xml has been deprecated, now you can export/import using ini files
+* New open removable unit menu option has been included in Windows release
+* If there is not metric information rule and area tools uses pixels
+* Default photometric interpretation has been changed form YBR_FULL to YBR_FULL_422 that is commonly used in JPEG
+* Some changes in log system, tree view has been deleted and log level is persistent
+
+MD5 of the released files with this version:
+e9a2fc2dcd2b84d382657e3abe1403a8  Ginkgo_CADx-2.8.0.4540_rc.dmg
+610e7db74a35dbfb5dc262ca1d62d237  Ginkgo_CADx-2.8.0.4540_rc_linux_x86_64.tgz
+1f2c40dec224b98fe2c8c4ab255b54c2  Ginkgo_CADx-2.8.0.4540_rc_linux_x86.tgz
+1805b20061deb94a262c619feeb22a3d  ginkgocadx-2.8.0.4540_rc.tgz
+d142f76d67fab65e777c9bfa45c9d4a0  Ginkgo_CADx-2.8.0.4540_rc_installer.exe
+e77b097914cfc8dc7c77c7641bb3b26d  Ginkgo_CADx-2.8.0.4540_rc_win32.zip
+
+
+Version 2.6.0.1 final (2011-11-18)
+----------------------------
+* Added proxy support for http connections (check for updates and start up page)
+* Added slider tool to move between slices of a series
+* New functionallity: export to DICOM Dir with anonymization support
+* Corrected problems in downloading huge files from PACS
+* Other minor improvements and bug fixes
+* ITK patches applied to Linux x86 version
+
+MD5 of the released files with this version:
+d57ef1b76a764559a0c75871f6884e1d  Ginkgo_CADx-2.6.0.0_final.dmg
+872dd7a0825852470d0e2a19757890e6  Ginkgo_CADx-2.6.0.0_final_linux_x86_64.tgz
+3cfeb2ebfff9f4fded6b6d64dad99d89  Ginkgo_CADx-2.6.0.0_final_linux_x86.tgz
+a14935041cf5e882c84d70e97de961f3  ginkgocadx-2.6.0.0_final.tgz
+30eac5bf001484aa438b2fbe1c49d4de  Ginkgo_CADx-2.6.0.0_installer.exe
+5b965b2614403cb6d4a02a180d0bd153  Ginkgo_CADx-2.6.0.0_win32.zip
+
+Version 2.6.0.0 rc (2011-11-04)
+----------------------------
+* Enhanced ECG initial zoom and position.
+* Initial image 2D/3D view maximized.
+* Load extensions module has been redesigned, now extensions use manifest file
+* Date search fails in some PACS, corrected date format in PACS searches
+* Position and zoom has been synchronized in grid mode
+* Now position is not reseted in slice changing
+* Log format modified
+* Windows installer has been improved
+* Metadata is included in generated files when Ginkgo CADx executes an integration workflow
+* DICOM parser improved, file reading speed has been improved. 
+* Spanish translations deep correction
+* Restyling of some dialogs (Dicom inspector, pacs configuration, progress dialog...)
+* Other minor improvements and bug fixes
+
+MD5 of the released files with this version:
+fd6b3595774a5c3e85cb70aeaad7e26c  Ginkgo_CADx-2.6.0.0_rc.dmg
+95dfc48e4fd4cdbdc59bad58c31a67e3  Ginkgo_CADx-2.6.0.0_rc_installer.exe
+48864c42e4fdf7e9b7dcfeda532ae801  Ginkgo_CADx-2.6.0.0_rc_linux_x86_64.tgz
+d1615a1481e836c8182442c48fb4fb2f  Ginkgo_CADx-2.6.0.0_rc_linux_x86.tgz
+0a8a4de4a2e3267d8943c3043c7dc0fc  ginkgocadx-2.6.0.0_rc.tgz
+dca3442541ab4edbba45dc3dfc1b871b  Ginkgo_CADx-2.6.0.0_rc_win32.zip
+
+Version 2.5.4.1 final (2011-09-23)
+----------------------------
+* Stable version release
+* Welcome screen added
+* Bug resolved in parameters interpretation
+* Other minor improvements and bug fixes
+
+MD5 of the released files with this version:
+c7193a4a6f8b988bf76a167667f7400f  Ginkgo_CADx-2.5.4.1_win32.zip
+938875c68ddd0eeb6d31a7eb283704e5  Ginkgo_CADx-2.5.4.1_installer.exe
+5737e667cb70689d0d251c94b598a597  Ginkgo_CADx-2.5.4.1_linux_x86_64.tgz
+89672165ecb1ab6e27a7c15020607538  Ginkgo_CADx-2.5.4.1_linux_x86.tgz
+fd85e6fdc007d855cefbfb27ffded671  Ginkgo_CADx-2.5.4.1.dmg
+8618e01cb1a2ef4b7b5397919d8c9f8d  ginkgocadx-2.5.4.1.tgz
+
+Version 2.5.4.0 rc (2011-09-02)
+----------------------------
+* Compilation instructions document updated
+* Microsoft Redistributable libraries incuded in Ginkgo CADx release (in the instalator)
+* Corrected a bug in acquisition from a DicomDir in Linux
+* Corrected a bug in Windows when Ginkgo CADx tries to open an integration file stored in a path with special characters (á,ó,ñ,...)
+* Import files from a location has been improved, you can import files from a directory where files are stored with the medical image system, Ginkgo CADx can be configured to delete images after importation, monitoring images of a directory...
+* Integration XML parsing has changed, XML without pid parameter are valid. If you send an XML file without this parameter you can select importation workflow in Ginkgo CADx instead of doing it in the EHR application
+* GXML and GKXML files are registered as Ginkgo CADx files in Windows installer, so you can open it automatically doing double click and they are associated automatically in the navigator with Ginkgo CADx application
+* Maximum number of opened tabs can be limited in profiles section
+* A timer can be set to control inactivity time, if the timer reaches to 0 inactive tab will be closed
+* Hotkeys has been asociated with Ginkgo CADx tools
+* Restyling of download tab from a PACS dialog
+* Restyling of PACS dialog it's now more compact
+* Restyling of extensions sections from configuration
+* Corner annotations hidden by default, status of hidden/shown are stored in configuration
+* HL7 monitor redesigned, now is executed as a Ginkgo CADx command and shows progress and errors in the progress bar, problems related with HL7 connections can be detected easily
+* Pixel interpolation can be selected in Image menu, a linear interpolation at pixel level is applied to avoid pixelization
+* Windows build file (Ginkgo-CADx.sln) has been updated and checked, now you can compile core and extensions without any problem
+
+MD5 of the released files with this version:
+
+9f8e09a99c16ee63d0167d1e3dd35fa2  Ginkgo_CADx-2.5.4.0_rc_win32.zip
+c9bb3ed05d30db89b949ad034a91fc01  Ginkgo_CADx-2.5.4.0_rc_installer.exe
+f811687755bed3507f3c37e62d36007b  Ginkgo_CADx-2.5.4.0_rc_linux_x86_64.tgz
+527399d7d4b9740e4e19b4c0b05c8aaa  Ginkgo_CADx-2.5.4.0_rc_linux_x86.tgz
+201663079ef5074abfb0e9f5b43b4e8d  ginkgocadx-2.5.4.0_rc.tgz
+e2e4c948b9f4a2b1bbf47e6803668e16  Ginkgo_CADx-2.5.4.0_rc.dmg
+
+Version 2.5.2 (2011-07-22)
+----------------------------
+* Bug fixed: xml invocation with parser english results in exception 
+* Bug fixed: dicom acquisition didn't work with japanese language
+* Other minor improvements and bug fixes
+
+MD5 of the released files with this version:
+5cbfeb23f50099e0cc2eb47db329f271 ginkgocadx-2.5.2.0.tgz
+e293085ab0c8f0dd9d31ee6fd4bf4a30 Ginkgo_CADx-2.5.2.0.dmg
+b3cca5def6e74018592bc61998f0e31e Ginkgo_CADx-2.5.2.0_installer.exe
+cfcd65a81c351436c14a399ccf81447f Ginkgo_CADx-2.5.2.0_linux_x86.tgz
+f9563583e2ebe33ae5b286220e467803 Ginkgo_CADx-2.5.2.0_linux_x86_64.tgz
+0c3cc48fb19ed18934d2910a3238fe65 Ginkgo_CADx-2.5.2.0_win32.zip
+
+Version 2.5.1 (2011-07-13)
+----------------------------
+* Feature: Workflows started by external applications (xml, xml-rpc) can be reprocessed if somethings failed (uploading to pacs or sending the HL7 message).
+* Fixed: Windows 32 version doesn't load properly conformance.xml
+* Other minor improvements and bug fixes
+
+MD5 of the released files with this version:
+
+8d65fcc57f6a77ea74dfe3b24f8ce5cc  Ginkgo_CADx-2.5.1.0.dmg
+1a2626e474cf38c4b83699d8eb177b9f  Ginkgo_CADx-2.5.1.0_installer.exe
+8ee57d98c358bb0d521de07e083bd027  Ginkgo_CADx-2.5.1.0_linux_x86_64.tgz
+ffeeed59c8974f8f487fcea47a6edcc2  Ginkgo_CADx-2.5.1.0_linux_x86.tgz
+85fc0b84af2c351d4e001c092395381b  Ginkgo_CADx-2.5.1.0_win32.zip
+
+Version 2.5.0.0 (2011-07-06)
+----------------------------
+* Refactorization of DICOM network layer, starts constructing conformance.xml to enhance C-GET interoperability
+* Improve error handling of DICOM network errors
+* Removes dependency of wxWidgets configuration, Ginkgo CADx implements it's own configuration controller to handle one configuration file for sytem properties and other for user properties
+* New Ginkgo CADx extension released: Ginkgo CADx Lite Visualizator, it's focused to work with computers without 3D acceleration, you can use Ginkgo CADx in old computers!
+* New translations incorporated: German, Turkish
+* Restyling of Importation first step
+* Other minor improvements and bug fixes
+
+MD5 of the released files with this version:
+
+73818708b08a477751544259925b85f9  Ginkgo_CADx-2.5.0.0.dmg
+37e3c9f92917c5371cf23f34113e900e  Ginkgo_CADx-2.5.0.0_installer.exe
+dd08d8b0f7ec8b245c6b6603297f5440  Ginkgo_CADx-2.5.0.0_win32.zip
+ae8b9f9978236dde03fe1d4713030a30  Ginkgo_CADx-2.5.0.0_linux_x86_64.tgz
+34485fab2496cffa19ace239cbf31780  Ginkgo_CADx-2.5.0.0_linux_x86.tgz
+7c1d69fd2f360c51e079ba453393fd51  ginkgocadx-2.5.0.0.tgz
+
+Version 2.4.1.0 (2011-04-29)
+----------------------------
+* Log layout has changed, logs are grouped by thread
+* Mayor bug fix problem in Windows when Ginkgo CADx receives an integration xml as parameter, Ginkgo CADx didn't find plugins
+* wxSQLite3 update to version 2.1.1
+* wxTreeListCtrl update to release 1104
+* openssl update to openssl 1.0.0d
+
+Version 2.4.0.0 (2011-04-15)
+----------------------------
+* New architecture, refactoring of Ginkgo CADx Core.
+* ITK, VTK and wxWidgets are compiled as dll library. It's opened the possibility of make extensions containing
+  full modules with it's own views, studies...
+* New ECG view has been created, full support of ECG. (thanks to Generalitat de Catalunya for the support)
+* Sequencial instance number is now included in all slices of each imported series (thanks to Guillermo Lopez)
+* Internationalization support improved, you can easily translate Ginkgo CADx and incorporate compiled gettext
+  files in lang folder
+* Upload to PACS improved we have done a full restyling of user interaction.
+* You can configure Ginkgo CADx download implementation to work with PACS that only allows download full studies.
+  You can select series/studies download mode.
+* User/password validation when communicating with PACS server has been implemented.
+* XML Integration parser has been translated to English to provide a easier way of integration.
+* DCMTK migration to version 3.6.0
+* Log4cplus has been replaced by log4cplus of DCMTK
+* Bug fixes
+
+MD5 of the released files with this version:
+a5e51c1b505ebc3fa44bfa111fa2932b  Ginkgo_CADx-2.4.0.0_installer.exe
+0b0e9518564590a1940af8fcb20850ea  Ginkgo_CADx-2.4.0.0_linux_x86_64.tgz
+e5744efdfac2463b2b02c5bc753471e2  Ginkgo_CADx-2.4.0.0_linux_x86.tgz
+6ab0df05cac9a9c3765f7c353609b292  Ginkgo_CADx-2.4.0.0_win32.zip
+
+Version 2.3.0.0 (2011-02-25)
+----------------------------
+* Volume reconstruction totally functional
+* Surface reconstruction totally functional
+* XML-RPC interface implemented
+* Corrections in C-GET to get complete studies
+* Updated Ginkgo Translations
+* Bug fixes
+
+MD5 of the released files with this version:
+a35dc7dac51fe22899f48a9a51fad3c6  Ginkgo_CADx-2.3.0.0.dmg (OSX DMG).
+fbcf44e2a7b5364712c2e7fe57e3b708  Ginkgo_CADx-2.3.0.0_installer.exe (Windows32 Installer).
+1474d94324f3076f9083c3494d9cd846  Ginkgo_CADx-2.3.0.0_linux_x64.tgz (Linux64 Executable).
+6d22ab840fc886b8ee49376328385d8c  Ginkgo_CADx-2.3.0.0_linux_x86.tgz (Linux32 Executable).
+ab1ddab3e2745c533e42c1231916a514  Ginkgo_CADx-2.3.0.0_src.tgz (Source code).
+2781fd9ae11cb07fc95b9594ca37963a  Ginkgo_CADx-2.3.0.0_win32_standalone.zip (Windows32 Executable).
+
+Version 2.2.1.0 (2011-02-15)
+----------------------------
+* Ginkgo CADs acceps -version parameter
+* Modifications in the definition of the integration XML and HL7 message of dicomization
+* Default PACS server selection, it will be used when Ginkgo CADx is executed with a dicomization XML
+* Spanish translation updated
+* Japanese translations
+* Improved verbose level in DICOM operations
+* Overlay interpretation improved in series with slices with different number of overlays
+* Correction of "No Options" bar refresh problem
+* Series with spacing 0 are interpreted as spacing 1x1
+* Restyling of medical history bar with collapsible nodes and searching filters
+* Restyling of PACS acquisition dialog
+* Restyling of About Ginkgo dialog
+* Restyling of license dialog
+* Correction of virtual memory leak 
+* Improved update support
+* DICOM exportation and diagnostics upload system change, when a diagnostic is uploaded to a PACS the diagnostic is merged with the original file.
+* Images without metric information are detected and the user is warned about it.
+* Integration of CharLS library to read JPEG-LS DICOMs
+* Optimization of PACS commands, GET retrieve is improved and exhaustive tested  with DCM4CHEE pacs
+* Bug Fixes
+* Printing bug on Linux (thanks to André Alvim Tolentino).
+* EXPERIMENTAL 3D reconstruction (buggy and feature incomplete): CT Surface Rendering. Disabled by default. Can be enabled with permission profiles: Tools -> Settings -> Profiles -> New/Edit; Set 3D Reconstruction: "true", 3D Surface Rendering: "true".
+
+MD5 of the released files with this version:
+
+e8116a4ee3671743cd6f7020386f8fe6  Ginkgo_CADx-2.2.1.0.dmg Mac (OSX DMG).
+ca21f42b9daa4525e6c6d3216791bab4  Ginkgo_CADx-2.2.1.0_installer.exe (Windows32 Installer).
+29053b222edf07ed758fe5e232b13016  Ginkgo_CADx-2.2.1.0_linux_x64.tgz (Linux64 Executable).
+6bc50d307d536f9a2262c114a770aa0e  Ginkgo_CADx-2.2.1.0_linux_x86.tgz (Linux32 Executable).
+ad7299db649942708952a9f49884b723  Ginkgo_CADx-2.2.1.0.tgz (Source code).
+0b51df0bba3f1d25fc161447d5836932  Ginkgo_CADx-2.2.1.0_win32_standalone.zip (Windows32 Executable).
diff --git a/LGPL3.txt b/LGPL3.txt
new file mode 100644
index 0000000..f0156c5
--- /dev/null
+++ b/LGPL3.txt
@@ -0,0 +1,165 @@
+                   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
\ No newline at end of file
diff --git a/README.md b/README.md
new file mode 100644
index 0000000..beb884e
--- /dev/null
+++ b/README.md
@@ -0,0 +1,90 @@
+[![Build Status](https://travis-ci.org/gerddie/ginkgocadx.svg?branch=master)](https://travis-ci.org/gerddie/ginkgocadx)
+[![Coverity Status](https://scan.coverity.com/projects/8214/badge.svg)](https://scan.coverity.com/projects/ginkgocadx)
+
+# Ginkgo CADx #
+
+## Preface ##
+
+* Currently the project is maintained on a voluntary basis. 
+* There is no PRO version.
+* I can't help you with compiling this on MS Windows or Mac OS X 
+
+## Introduction ##
+
+Ginkgo CADx is an advanced DICOM viewer and dicomizer that can
+also be used to convert png, jpeg, bmp, pdf, tiff to DICOM files.
+
+The version developed here is a continuation of the now abandoned
+free version developed by MetaEmotion:
+
+    http://ginkgo-cadx.com/en/
+
+
+## License ##
+
+Ginkgo CADx is licensed under the terms of the Lesser GNU Public
+Licence 3.
+
+## Build ##
+
+To build Ginkgo CADx the following software packages are required:
+
+* ITK (>= 4.8)
+* VTK (>= 6.2), Please note that the code does currently not compile with the
+  VTK OpenGL2 rendering backend (see #21 and #34). VTK >= 7.0 defaults to
+  this newer backend when configured without parameters, and currently
+  you will have to set VTK_RENDERING_BACKEND=OpenGL when building VTK to
+  sucessfully compile ginkgocadx. 
+* wxWidgets (>= 3.0.1)
+* DCMTK (>= 3.6.1-20150924)
+* A C++ compiler that supports the *C++11* standard
+* CMake
+
+With these prerequisites available run *cmake* on the Ginkgo CADx
+source tree and then use the selected build system to build the software.
+After the software was sucessfully compiled run the install target.
+
+
+The original Ginkgo CADx implementation was done with cross-platform
+compatibility in mind, i.e. the software should compile on MS Windows,
+Mac OS X, and flavours of Linux. However, currently the main development
+platforms are Debian GNU/Linux and Gentoo Linux using the GNU gcc compiler
+tool chain. Hence incompatibilities may creep in and bug reports with fixes
+for other platforms are very welcome. 
+
+
+### Debian/Ubuntu specific build instructions ###
+
+The following packages must be installed in order to compile it:
+
+
+    chrpath
+    cmake
+    libcairo2-dev
+    libcurl4-gnutls-dev
+    libdcmtk-dev
+    libfftw3-dev
+    libfreetype6-dev
+    libgtk2.0-dev
+    libinsighttoolkit4-dev
+    libjsoncpp-dev
+    libmysqlclient-dev
+    libsqlite3-dev
+    libssl-dev
+    libvtk6-dev
+    libwrap0-dev
+    libwxgtk3.0-dev
+    libxml2-dev
+    libgdcm-tools
+
+On Debian *Stretch* and *Sid* these packages can be installed by simply running
+
+    apt build-dep ginkgocadx
+
+On Ubuntu Xenial (16.04 )the package can be installed from the Xenial ports PPA: 
+
+   https://launchpad.net/~gert-die/+archive/ubuntu/xenial-mia
+
+For Yantal the package available from the usual Ubuntu repositories. 
+
+
diff --git a/cadxcore/CMakeLists.txt b/cadxcore/CMakeLists.txt
new file mode 100644
index 0000000..fdf71d0
--- /dev/null
+++ b/cadxcore/CMakeLists.txt
@@ -0,0 +1,330 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+
+PROJECT(CADxCore)
+
+################ SOURCES ################
+
+AUX_SOURCE_DIRECTORY(api SRCS)
+AUX_SOURCE_DIRECTORY(api/controllers SRCS)
+AUX_SOURCE_DIRECTORY(api/controllers/proxies SRCS)
+AUX_SOURCE_DIRECTORY(api/helpers SRCS)
+AUX_SOURCE_DIRECTORY(api/math SRCS)
+AUX_SOURCE_DIRECTORY(api/observers SRCS)
+AUX_SOURCE_DIRECTORY(api/dicom SRCS)
+AUX_SOURCE_DIRECTORY(api/threads SRCS)
+AUX_SOURCE_DIRECTORY(api/internationalization SRCS)
+AUX_SOURCE_DIRECTORY(api/toolsystem SRCS)
+AUX_SOURCE_DIRECTORY(api/utils SRCS)
+
+AUX_SOURCE_DIRECTORY(export SRCS)
+AUX_SOURCE_DIRECTORY(export/tools SRCS)
+AUX_SOURCE_DIRECTORY(export/observers SRCS)
+AUX_SOURCE_DIRECTORY(export/contracts SRCS)
+
+AUX_SOURCE_DIRECTORY(main SRCS)
+AUX_SOURCE_DIRECTORY(main/controllers SRCS)
+AUX_SOURCE_DIRECTORY(main/filtering SRCS)
+AUX_SOURCE_DIRECTORY(main/utils SRCS)
+
+AUX_SOURCE_DIRECTORY(main/gui SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/anonymize SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/acquisition SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/callibration SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/configuration SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/countdownmessage SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/dicomeditor SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/dicomdirexport SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/dicomdirmigration SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/export SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/ginkgocloud SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/history3 SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/hl7controlwindow SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/import SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/license SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/logcontrolwindow SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/login SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/mainwindow SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/open SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/pacsupload SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/paneltags SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/previewpanel SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/print SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/dicomprint SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/progress SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/selectpacsserver SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/startup SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/tabtoolbar SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/taskcontrol SRCS)
+AUX_SOURCE_DIRECTORY(main/gui/toolsystem SRCS)
+
+AUX_SOURCE_DIRECTORY(main/managers SRCS)
+AUX_SOURCE_DIRECTORY(main/tools SRCS)
+AUX_SOURCE_DIRECTORY(main/toolsystem SRCS)
+AUX_SOURCE_DIRECTORY(main/controllers/dcmtk SRCS)
+AUX_SOURCE_DIRECTORY(main/controllers/dcmtk/libi2d SRCS)
+AUX_SOURCE_DIRECTORY(main/controllers/dcmtk/ofstd SRCS)
+AUX_SOURCE_DIRECTORY(main/controllers/dcmtk/tls SRCS)
+#AUX_SOURCE_DIRECTORY(main/controllers/dcmtk/tls/win-only SRCS)
+AUX_SOURCE_DIRECTORY(main/controllers/log4cplus SRCS)
+AUX_SOURCE_DIRECTORY(main/controllers/streaming SRCS)
+
+AUX_SOURCE_DIRECTORY(commands SRCS)
+
+AUX_SOURCE_DIRECTORY(net SRCS)
+
+AUX_SOURCE_DIRECTORY(resources SRCS)
+
+IF(NOT USE_SYSTEM_SQLITE)
+AUX_SOURCE_DIRECTORY(sqlite SRCS)
+ENDIF()
+
+
+AUX_SOURCE_DIRECTORY(endpoint SRCS)
+
+AUX_SOURCE_DIRECTORY(vtk SRCS)
+AUX_SOURCE_DIRECTORY(vtk/command SRCS)
+AUX_SOURCE_DIRECTORY(vtk/interactor SRCS)
+AUX_SOURCE_DIRECTORY(vtk/widgets SRCS)
+
+AUX_SOURCE_DIRECTORY(widgets SRCS)
+AUX_SOURCE_DIRECTORY(widgets/gui SRCS)
+AUX_SOURCE_DIRECTORY(widgets/observers SRCS)
+
+AUX_SOURCE_DIRECTORY(wx SRCS)
+AUX_SOURCE_DIRECTORY(wx/ginkgostyle SRCS)
+AUX_SOURCE_DIRECTORY(wx/gnkinforme SRCS)
+AUX_SOURCE_DIRECTORY(wx/iconoimagenctrl SRCS)
+AUX_SOURCE_DIRECTORY(wx/maskedtextctrl SRCS)
+AUX_SOURCE_DIRECTORY(wx/propgrid SRCS)
+AUX_SOURCE_DIRECTORY(wx/propiedades SRCS)
+AUX_SOURCE_DIRECTORY(wx/thumbnailctrl SRCS)
+AUX_SOURCE_DIRECTORY(wx/timectrl SRCS)
+AUX_SOURCE_DIRECTORY(wx/treelistctrl SRCS)
+AUX_SOURCE_DIRECTORY(wx/VTK SRCS)
+AUX_SOURCE_DIRECTORY(wx/wizardginkgo SRCS)
+AUX_SOURCE_DIRECTORY(wx/wxsqlite3 SRCS)
+AUX_SOURCE_DIRECTORY(wx/wxhttpengine SRCS)
+
+AUX_SOURCE_DIRECTORY(VTKInria3D SRCS)
+AUX_SOURCE_DIRECTORY(VTKInria3D/vtkVISUManagement SRCS)
+AUX_SOURCE_DIRECTORY(VTKInria3D/wxVTK SRCS)
+
+AUX_SOURCE_DIRECTORY(resources SRCS)
+
+IF (LINUX OR MACOS)
+	AUX_SOURCE_DIRECTORY(xmlrpc SRCS)
+ENDIF()
+
+IF (LINUX OR MACOS)
+	LIST(REMOVE_ITEM SRCS endpoint/interfaces.cpp)
+	LIST(REMOVE_ITEM SRCS endpoint/sockatmark.cpp)
+ELSEIF(WINDOWS)
+	SET(SRCS stdafx.cpp ${SRCS})
+ENDIF()
+
+################ DEFINITIONS ################
+
+ADD_CORE_DEFINITIONS()
+
+################ INCLUDE DIRECTORIES ################
+
+SET(${PROJECT_NAME}_INCLUDE_DIR
+	${CMAKE_CURRENT_SOURCE_DIR}
+	${CMAKE_CURRENT_SOURCE_DIR}/vtk
+	${CMAKE_CURRENT_SOURCE_DIR}/itk
+	${CMAKE_CURRENT_SOURCE_DIR}/wx
+	${CMAKE_CURRENT_SOURCE_DIR}/wx/VTK
+	${CMAKE_CURRENT_SOURCE_DIR}/VTKInria3D
+	${CMAKE_CURRENT_SOURCE_DIR}/VTKInria3D/wxVTK
+	CACHE INTERNAL ""
+)
+
+INCLUDE_DIRECTORIES(${PROJECT_NAME} ${${PROJECT_NAME}_INCLUDE_DIR} )
+
+################ LIBS ################
+FIND_PATH(libjsoncpp_INCLUDE_DIR json/json.h
+/usr/include/jsoncpp
+)
+INCLUDE_DIRECTORIES(${libjsoncpp_INCLUDE_DIR})
+set(libjsoncpp_LIBRARIES jsoncpp)
+MESSAGE(STATUS "libjsoncpp_LIBRARIES=${libjsoncpp_LIBRARIES} libjsoncpp_INCLUDE_DIR=${libjsoncpp_INCLUDE_DIR}")
+
+ADD_DEFINITIONS(${libcurl_defines})
+INCLUDE_DIRECTORIES(${libcurl_INCLUDE_DIR})
+LINK_DIRECTORIES(${libcurl_DIR})
+#MESSAGE("LIBCURLLibx = ${libcurl_LIBRARIES} LIBCURL_include = ${libcurl_INCLUDE_DIR}  LIBCURL_LINK_DIR= ${libcurl_DIR} LIBCURL_DEFINES=${libcurl_defines}")
+
+IF(USE_CUSTOM_WX)
+  ADD_DEFINITIONS(${wxWidgets_CXX_FLAGS})
+  INCLUDE_DIRECTORIES(${wxWidgets_INCLUDE_DIR})
+  LINK_DIRECTORIES(${wxWidgets_DIR})
+ELSE()
+  FIND_PACKAGE(wxWidgets 3.0.1 REQUIRED)
+  foreach(d ${wxWidgets_DEFINITIONS})
+    ADD_DEFINITIONS("-D${d}")
+  endforeach()
+  INCLUDE_DIRECTORIES(${wxWidgets_INCLUDE_DIRS})
+ENDIF()
+
+IF (USE_CUSTOM_VTK)
+	ADD_DEFINITIONS(${VTK_defines})
+	INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIR})
+	LINK_DIRECTORIES(${VTK_DIR})
+ELSE()
+	INCLUDE(${VTK_USE_FILE})
+ENDIF()
+
+IF(USE_CUSTOM_ITK)
+	ADD_DEFINITIONS(${ITK_defines})
+	INCLUDE_DIRECTORIES(${ITK_INCLUDE_DIR})
+	LINK_DIRECTORIES(${ITK_DIR})
+ELSE()
+	INCLUDE(${ITK_USE_FILE})
+	#MESSAGE("ITKLIBS = ${ITK_LIBRARIES}")
+ENDIF()
+
+IF(USE_CUSTOM_DCMTK)
+	ADD_DEFINITIONS(${DCMTK_defines})
+	INCLUDE_DIRECTORIES(${DCMTK_INCLUDE_DIR})
+	LINK_DIRECTORIES(${DCMTK_DIR})
+ELSE()
+	ADD_DEFINITIONS(-DHAVE_CONFIG_H)
+	INCLUDE_DIRECTORIES(${DCMTK_INCLUDE_DIRS})
+	#MESSAGE("DCMTKLIBS = ${DCMTK_LIBRARIES}")
+	#MESSAGE("DCMTKINC = ${DCMTK_INCLUDE_DIRS}")
+ENDIF()
+
+ADD_DEFINITIONS(${Cairo_defines})
+INCLUDE_DIRECTORIES(${Cairo_INCLUDE_DIR})
+LINK_DIRECTORIES(${Cairo_LIB})
+
+ADD_DEFINITIONS(${Pixman_defines})
+INCLUDE_DIRECTORIES(${Pixman_INCLUDE_DIR})
+LINK_DIRECTORIES(${Pixman_LIB})
+
+IF (MACOS)
+	ADD_DEFINITIONS(${XmlRpc++_defines})
+	INCLUDE_DIRECTORIES(${XmlRpc++_INCLUDE_DIR})
+	LINK_DIRECTORIES(${XmlRpc++_DIR})
+ENDIF()
+
+IF (LINUX)
+	IF (GTK2_FOUND)
+	  INCLUDE_DIRECTORIES(${GTK2_INCLUDE_DIRS})
+	ELSE ()
+	  MESSAGE("-----------------GTK2 NOT FOUND--------------------")
+	  INCLUDE_DIRECTORIES(/usr/include/gtk-2.0
+	      /usr/include/atk-1.0
+	      /usr/include/pango-1.0
+	      /usr/include/gio-unix-2.0/
+	      /usr/include/glib-2.0
+	      /usr/lib/i386-linux-gnu/glib-2.0/include
+	      /usr/include/freetype2
+	      /usr/include/libpng12
+	      /usr/lib/gtk-2.0/include
+	      /usr/include/cairo
+	      /usr/include/gdk-pixbuf-2.0
+	      /usr/include/pixman-1
+	  )  
+	ENDIF ()
+ENDIF()
+
+
+################ TARGET ################
+
+ADD_LIBRARY(${PROJECT_NAME} STATIC ${SRCS} )
+#ADD_EXECUTABLE(${PROJECT_NAME} WIN32 MACOSX_BUNDLE ${SRCS})
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
+	VERSION "${GINKGO_VERSION_STR}" SOVERSION "${GINKGO_VERSION_STR}"
+	LINK_INTERFACE_LIBRARIES ""
+	INSTALL_RPATH_USE_LINK_PATH FALSE )
+#INSTALL(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/ginkgocadx)
+
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/acquisition DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/big_icons DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/cursors DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/history DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/logos DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/marking_bar DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/menu_tabs DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/tool_icons DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/wizards DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/angle_bar DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/cine_bar DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/grid_bar DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/layout_bar DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/magnifier_bar DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/menu_icons DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/progress_bar DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/windowlevel_bar DESTINATION share/ginkgocadx/resources/cadxcore)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/zh_CN/cadxcore.mo DESTINATION share/ginkgocadx/lang/zh_CN)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/zh_CN/wxstd.mo DESTINATION share/ginkgocadx/lang/zh_CN)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/de/cadxcore.mo DESTINATION share/ginkgocadx/lang/de)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/de/wxstd.mo DESTINATION share/ginkgocadx/lang/de)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/el/wxstd.mo DESTINATION share/ginkgocadx/lang/el)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/el/cadxcore.mo DESTINATION share/ginkgocadx/lang/el)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/es/wxstd.mo DESTINATION share/ginkgocadx/lang/es)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/es/cadxcore.mo DESTINATION share/ginkgocadx/lang/es)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/fr/wxstd.mo DESTINATION share/ginkgocadx/lang/fr)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/fr/cadxcore.mo DESTINATION share/ginkgocadx/lang/fr)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/ja/wxstd.mo DESTINATION share/ginkgocadx/lang/ja)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/ja/cadxcore.mo DESTINATION share/ginkgocadx/lang/ja)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/pl/wxstd.mo DESTINATION share/ginkgocadx/lang/pl)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/pl/cadxcore.mo DESTINATION share/ginkgocadx/lang/pl)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/pt/wxstd.mo DESTINATION share/ginkgocadx/lang/pt)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/pt/cadxcore.mo DESTINATION share/ginkgocadx/lang/pt)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/sr/cadxcore.mo DESTINATION share/ginkgocadx/lang/sr)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/tr/wxstd.mo DESTINATION share/ginkgocadx/lang/tr)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/tr/cadxcore.mo DESTINATION share/ginkgocadx/lang/tr)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/resources/conformance.xml DESTINATION share/ginkgocadx)
+################ LIBS ################
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${libjsoncpp_LIBRARIES})
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${libcurl_LIBRARIES})
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${wxWidgets_LIBRARIES})
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${VTK_LIBRARIES})
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ITK_LIBRARIES})
+
+IF(USE_CUSTOM_DCMTK)
+	TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${DCMTK_LIBRARIES})
+ELSE()
+	TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${DCMTK_LIBRARIES} wrap)
+ENDIF()
+
+IF(USE_SYSTEM_SQLITE)
+	TARGET_LINK_LIBRARIES(${PROJECT_NAME} sqlite3)
+ENDIF()
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Cairo_LIBRARIES})
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Pixman_LIBRARIES})
+
+IF (MACOS)
+	TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${XmlRpc++_LIBRARIES})
+ENDIF()
+
+IF(LINUX)
+	TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${GTK2_LIBRARIES})
+	TARGET_LINK_LIBRARIES(${PROJECT_NAME} ssl GL crypto xml2)
+ENDIF()
+
+IF(MACOS)
+	FIND_LIBRARY( CARBON_LIB Carbon )
+	FIND_LIBRARY( OPENGL_LIB OpenGL )
+	
+	MARK_AS_ADVANCED( CARBON_LIB OPENGL_LIB )
+
+	SET(LIBS ${CARBON_LIB} ${OPENGL_LIB} )
+	LIST( APPEND LIBS ssl crypto xml2 z )
+
+	TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIBS})
+
+	SET_TARGET_PROPERTIES( PROPERTIES LINK_FLAGS "-Wl ${XCODE_LINK_FLAGS}" )
+	
+ENDIF()
+
+MESSAGE(STATUS "OS=[${OS}], Arch=[${ARCH}], Target=[${CMAKE_BUILD_TYPE}], Project=[${PROJECT_NAME}]")
+
diff --git a/cadxcore/Info.plist.in b/cadxcore/Info.plist.in
new file mode 100644
index 0000000..0372abd
--- /dev/null
+++ b/cadxcore/Info.plist.in
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>${PLUGIN_NAME}</string>
+	<key>CFBundleGetInfoString</key>
+    <string>${PLUGIN_NAME} ${FBSTRING_PLUGIN_VERSION}, ${FBSTRING_LegalCopyright}</string>
+	<key>CFBundleIdentifier</key>
+    <string>com.${ACTIVEX_PROGID}</string>
+	<key>CFBundleIconFile</key>
+	<string>cadxcore.icns</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>BRPL</string>
+	<key>CFBundleShortVersionString</key>
+    <string>${PLUGIN_NAME} ${FBSTRING_PLUGIN_VERSION}</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+    <string>${FBSTRING_PLUGIN_VERSION}</string>
+	<key>CFPlugInDynamicRegisterFunction</key>
+	<string></string>
+	<key>CFPlugInDynamicRegistration</key>
+	<string>NO</string>
+	<key>CFPlugInFactories</key>
+	<dict>
+		<key>00000000-0000-0000-0000-000000000000</key>
+		<string>MyFactoryFunction</string>
+	</dict>
+	<key>CFPlugInTypes</key>
+	<dict>
+		<key>00000000-0000-0000-0000-000000000000</key>
+		<array>
+			<string>00000000-0000-0000-0000-000000000000</string>
+		</array>
+	</dict>
+	<key>CFPlugInUnloadFunction</key>
+	<string></string>
+	<key>WebPluginName</key>
+	<string>${FBSTRING_ProductName}</string>
+	<key>WebPluginDescription</key>
+	<string>${FBSTRING_FileDescription}</string>
+	<key>WebPluginMIMETypes</key>
+	<dict>
+		<key>${FBSTRING_MIMEType}</key>
+		<dict>
+			<key>WebPluginTypeDescription</key>
+			<string>${FBSTRING_FileDescription}</string>
+		</dict>
+	</dict>
+</dict>
+</plist>
+
diff --git a/cadxcore/License.txt b/cadxcore/License.txt
new file mode 100644
index 0000000..f0156c5
--- /dev/null
+++ b/cadxcore/License.txt
@@ -0,0 +1,165 @@
+                   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
\ No newline at end of file
diff --git a/cadxcore/VTKInria3D/vtkINRIA3DConfigure.h b/cadxcore/VTKInria3D/vtkINRIA3DConfigure.h
new file mode 100644
index 0000000..bb25c2d
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkINRIA3DConfigure.h
@@ -0,0 +1,6 @@
+//#define VTK_RENDERING_EXPORT
+#define VTK_RENDERINGADDON_EXPORT
+#define VTK_DATAMANAGEMENT_EXPORT
+#define VTK_VISUMANAGEMENT_EXPORT
+#define WX_VTK_EXPORT
+#define WX_ADDON_EXPORT
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/Asymmetry.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/Asymmetry.h
new file mode 100644
index 0000000..1dc4239
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/Asymmetry.h
@@ -0,0 +1,282 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: Asymmetry.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar 20 de nov de 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_asymmetry_h_
+#define _lut_asymmetry_h_
+
+
+static const float AsymmetryLUT[256][3] = {
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.019608, 1.000000},
+        {0.000000, 0.039216, 1.000000},
+        {0.000000, 0.058824, 1.000000},
+        {0.000000, 0.078431, 1.000000},
+        {0.000000, 0.098039, 1.000000},
+        {0.000000, 0.117647, 1.000000},
+        {0.000000, 0.137255, 1.000000},
+        {0.000000, 0.156863, 1.000000},
+        {0.000000, 0.176471, 1.000000},
+        {0.000000, 0.196078, 1.000000},
+        {0.000000, 0.215686, 1.000000},
+        {0.000000, 0.235294, 1.000000},
+        {0.000000, 0.254902, 1.000000},
+        {0.000000, 0.274510, 1.000000},
+        {0.000000, 0.294118, 1.000000},
+        {0.000000, 0.313725, 1.000000},
+        {0.000000, 0.333333, 1.000000},
+        {0.000000, 0.352941, 1.000000},
+        {0.000000, 0.372549, 1.000000},
+        {0.000000, 0.392157, 1.000000},
+        {0.000000, 0.411765, 1.000000},
+        {0.000000, 0.431373, 1.000000},
+        {0.000000, 0.450980, 1.000000},
+        {0.000000, 0.470588, 1.000000},
+        {0.000000, 0.490196, 1.000000},
+        {0.000000, 0.509804, 1.000000},
+        {0.000000, 0.529412, 1.000000},
+        {0.000000, 0.549020, 1.000000},
+        {0.000000, 0.568627, 1.000000},
+        {0.000000, 0.588235, 1.000000},
+        {0.000000, 0.607843, 1.000000},
+        {0.000000, 0.627451, 1.000000},
+        {0.000000, 0.647059, 1.000000},
+        {0.000000, 0.666667, 1.000000},
+        {0.000000, 0.686275, 1.000000},
+        {0.000000, 0.705882, 1.000000},
+        {0.000000, 0.725490, 1.000000},
+        {0.000000, 0.745098, 1.000000},
+        {0.000000, 0.764706, 1.000000},
+        {0.000000, 0.784314, 1.000000},
+        {0.000000, 0.803922, 1.000000},
+        {0.000000, 0.823529, 1.000000},
+        {0.000000, 0.843137, 1.000000},
+        {0.000000, 0.862745, 1.000000},
+        {0.000000, 0.882353, 1.000000},
+        {0.000000, 0.901961, 1.000000},
+        {0.000000, 0.921569, 1.000000},
+        {0.000000, 0.941176, 1.000000},
+        {0.000000, 0.960784, 1.000000},
+        {0.000000, 0.980392, 1.000000},
+        {0.000000, 1.000000, 1.000000},
+        {0.000000, 1.000000, 0.980392},
+        {0.000000, 1.000000, 0.960784},
+        {0.000000, 1.000000, 0.941176},
+        {0.000000, 1.000000, 0.921569},
+        {0.000000, 1.000000, 0.901961},
+        {0.000000, 1.000000, 0.882353},
+        {0.000000, 1.000000, 0.862745},
+        {0.000000, 1.000000, 0.843137},
+        {0.000000, 1.000000, 0.823529},
+        {0.000000, 1.000000, 0.803922},
+        {0.000000, 1.000000, 0.784314},
+        {0.000000, 1.000000, 0.764706},
+        {0.000000, 1.000000, 0.745098},
+        {0.000000, 1.000000, 0.725490},
+        {0.000000, 1.000000, 0.705882},
+        {0.000000, 1.000000, 0.686275},
+        {0.000000, 1.000000, 0.666667},
+        {0.000000, 1.000000, 0.647059},
+        {0.000000, 1.000000, 0.627451},
+        {0.000000, 1.000000, 0.607843},
+        {0.000000, 1.000000, 0.588235},
+        {0.000000, 1.000000, 0.568627},
+        {0.000000, 1.000000, 0.549020},
+        {0.000000, 1.000000, 0.529412},
+        {0.000000, 1.000000, 0.509804},
+        {0.000000, 1.000000, 0.490196},
+        {0.000000, 1.000000, 0.470588},
+        {0.000000, 1.000000, 0.450980},
+        {0.000000, 1.000000, 0.431373},
+        {0.000000, 1.000000, 0.411765},
+        {0.000000, 1.000000, 0.392157},
+        {0.000000, 1.000000, 0.372549},
+        {0.000000, 1.000000, 0.352941},
+        {0.000000, 1.000000, 0.333333},
+        {0.000000, 1.000000, 0.313725},
+        {0.000000, 1.000000, 0.294118},
+        {0.000000, 1.000000, 0.274510},
+        {0.000000, 1.000000, 0.254902},
+        {0.000000, 1.000000, 0.235294},
+        {0.000000, 1.000000, 0.215686},
+        {0.000000, 1.000000, 0.196078},
+        {0.000000, 1.000000, 0.176471},
+        {0.000000, 1.000000, 0.156863},
+        {0.000000, 1.000000, 0.137255},
+        {0.000000, 1.000000, 0.117647},
+        {0.000000, 1.000000, 0.098039},
+        {0.000000, 1.000000, 0.078431},
+        {0.000000, 1.000000, 0.058824},
+        {0.000000, 1.000000, 0.039216},
+        {0.000000, 1.000000, 0.019608},
+        {0.000000, 1.000000, 0.000000},
+        {0.019608, 1.000000, 0.000000},
+        {0.039216, 1.000000, 0.000000},
+        {0.058824, 1.000000, 0.000000},
+        {0.078431, 1.000000, 0.000000},
+        {0.098039, 1.000000, 0.000000},
+        {0.117647, 1.000000, 0.000000},
+        {0.137255, 1.000000, 0.000000},
+        {0.156863, 1.000000, 0.000000},
+        {0.176471, 1.000000, 0.000000},
+        {0.196078, 1.000000, 0.000000},
+        {0.215686, 1.000000, 0.000000},
+        {0.235294, 1.000000, 0.000000},
+        {0.254902, 1.000000, 0.000000},
+        {0.274510, 1.000000, 0.000000},
+        {0.294118, 1.000000, 0.000000},
+        {0.313725, 1.000000, 0.000000},
+        {0.333333, 1.000000, 0.000000},
+        {0.352941, 1.000000, 0.000000},
+        {0.372549, 1.000000, 0.000000},
+        {0.392157, 1.000000, 0.000000},
+        {0.411765, 1.000000, 0.000000},
+        {0.431373, 1.000000, 0.000000},
+        {0.450980, 1.000000, 0.000000},
+        {0.470588, 1.000000, 0.000000},
+        {0.490196, 1.000000, 0.000000},
+        {0.509804, 1.000000, 0.000000},
+        {0.529412, 1.000000, 0.000000},
+        {0.549020, 1.000000, 0.000000},
+        {0.568627, 1.000000, 0.000000},
+        {0.588235, 1.000000, 0.000000},
+        {0.607843, 1.000000, 0.000000},
+        {0.627451, 1.000000, 0.000000},
+        {0.647059, 1.000000, 0.000000},
+        {0.666667, 1.000000, 0.000000},
+        {0.686275, 1.000000, 0.000000},
+        {0.705882, 1.000000, 0.000000},
+        {0.725490, 1.000000, 0.000000},
+        {0.745098, 1.000000, 0.000000},
+        {0.764706, 1.000000, 0.000000},
+        {0.784314, 1.000000, 0.000000},
+        {0.803922, 1.000000, 0.000000},
+        {0.823529, 1.000000, 0.000000},
+        {0.843137, 1.000000, 0.000000},
+        {0.862745, 1.000000, 0.000000},
+        {0.882353, 1.000000, 0.000000},
+        {0.901961, 1.000000, 0.000000},
+        {0.921569, 1.000000, 0.000000},
+        {0.941176, 1.000000, 0.000000},
+        {0.960784, 1.000000, 0.000000},
+        {0.980392, 1.000000, 0.000000},
+        {1.000000, 1.000000, 0.000000},
+        {1.000000, 0.980392, 0.000000},
+        {1.000000, 0.960784, 0.000000},
+        {1.000000, 0.941176, 0.000000},
+        {1.000000, 0.921569, 0.000000},
+        {1.000000, 0.901961, 0.000000},
+        {1.000000, 0.882353, 0.000000},
+        {1.000000, 0.862745, 0.000000},
+        {1.000000, 0.843137, 0.000000},
+        {1.000000, 0.823529, 0.000000},
+        {1.000000, 0.803922, 0.000000},
+        {1.000000, 0.784314, 0.000000},
+        {1.000000, 0.764706, 0.000000},
+        {1.000000, 0.745098, 0.000000},
+        {1.000000, 0.725490, 0.000000},
+        {1.000000, 0.705882, 0.000000},
+        {1.000000, 0.686275, 0.000000},
+        {1.000000, 0.666667, 0.000000},
+        {1.000000, 0.647059, 0.000000},
+        {1.000000, 0.627451, 0.000000},
+        {1.000000, 0.607843, 0.000000},
+        {1.000000, 0.588235, 0.000000},
+        {1.000000, 0.568627, 0.000000},
+        {1.000000, 0.549020, 0.000000},
+        {1.000000, 0.529412, 0.000000},
+        {1.000000, 0.509804, 0.000000},
+        {1.000000, 0.490196, 0.000000},
+        {1.000000, 0.470588, 0.000000},
+        {1.000000, 0.450980, 0.000000},
+        {1.000000, 0.431373, 0.000000},
+        {1.000000, 0.411765, 0.000000},
+        {1.000000, 0.392157, 0.000000},
+        {1.000000, 0.372549, 0.000000},
+        {1.000000, 0.352941, 0.000000},
+        {1.000000, 0.333333, 0.000000},
+        {1.000000, 0.313725, 0.000000},
+        {1.000000, 0.294118, 0.000000},
+        {1.000000, 0.274510, 0.000000},
+        {1.000000, 0.254902, 0.000000},
+        {1.000000, 0.235294, 0.000000},
+        {1.000000, 0.215686, 0.000000},
+        {1.000000, 0.196078, 0.000000},
+        {1.000000, 0.176471, 0.000000},
+        {1.000000, 0.156863, 0.000000},
+        {1.000000, 0.137255, 0.000000},
+        {1.000000, 0.117647, 0.000000},
+        {1.000000, 0.098039, 0.000000},
+        {1.000000, 0.078431, 0.000000},
+        {1.000000, 0.058824, 0.000000},
+        {1.000000, 0.039216, 0.000000},
+        {1.000000, 0.019608, 0.000000},
+        {1.000000, 0.000000, 0.000000},
+        {1.000000, 0.000000, 0.019608},
+        {1.000000, 0.000000, 0.039216},
+        {1.000000, 0.000000, 0.058824},
+        {1.000000, 0.000000, 0.078431},
+        {1.000000, 0.000000, 0.098039},
+        {1.000000, 0.000000, 0.117647},
+        {1.000000, 0.000000, 0.137255},
+        {1.000000, 0.000000, 0.156863},
+        {1.000000, 0.000000, 0.176471},
+        {1.000000, 0.000000, 0.196078},
+        {1.000000, 0.000000, 0.215686},
+        {1.000000, 0.000000, 0.235294},
+        {1.000000, 0.000000, 0.254902},
+        {1.000000, 0.000000, 0.274510},
+        {1.000000, 0.000000, 0.294118},
+        {1.000000, 0.000000, 0.313725},
+        {1.000000, 0.000000, 0.333333},
+        {1.000000, 0.000000, 0.352941},
+        {1.000000, 0.000000, 0.372549},
+        {1.000000, 0.000000, 0.392157},
+        {1.000000, 0.000000, 0.411765},
+        {1.000000, 0.000000, 0.431373},
+        {1.000000, 0.000000, 0.450980},
+        {1.000000, 0.000000, 0.470588},
+        {1.000000, 0.000000, 0.490196},
+        {1.000000, 0.000000, 0.509804},
+        {1.000000, 0.000000, 0.529412},
+        {1.000000, 0.000000, 0.549020},
+        {1.000000, 0.000000, 0.568627},
+        {1.000000, 0.000000, 0.588235},
+        {1.000000, 0.000000, 0.607843},
+        {1.000000, 0.000000, 0.627451},
+        {1.000000, 0.000000, 0.647059},
+        {1.000000, 0.000000, 0.666667},
+        {1.000000, 0.000000, 0.686275},
+        {1.000000, 0.000000, 0.705882},
+        {1.000000, 0.000000, 0.725490},
+        {1.000000, 0.000000, 0.745098},
+        {1.000000, 0.000000, 0.764706},
+        {1.000000, 0.000000, 0.784314},
+        {1.000000, 0.000000, 0.803922},
+        {1.000000, 0.000000, 0.823529},
+        {1.000000, 0.000000, 0.843137},
+        {1.000000, 0.000000, 0.862745},
+        {1.000000, 0.000000, 0.882353},
+        {1.000000, 0.000000, 0.901961},
+        {1.000000, 0.000000, 0.921569},
+        {1.000000, 0.000000, 0.941176},
+        {1.000000, 0.000000, 0.960784},
+        {1.000000, 0.000000, 0.980392},
+        {1.000000, 0.000000, 1.000000}
+};
+
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/BlackBody.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/BlackBody.h
new file mode 100644
index 0000000..eb96c1f
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/BlackBody.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: HotMetal.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar, 20 nov 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_blackBody_h_
+#define _lut_blackBody_h_
+
+static const int BlackBody[256*3]= {
+        0,
+        3,
+        6,
+        9,
+        12,
+        15,
+        18,
+        21,
+        24,
+        27,
+        30,
+        33,
+        36,
+        39,
+        42,
+        45,
+        48,
+        51,
+        54,
+        57,
+        60,
+        63,
+        66,
+        69,
+        72,
+        75,
+        78,
+        81,
+        84,
+        87,
+        90,
+        93,
+        96,
+        99,
+        102,
+        105,
+        108,
+        111,
+        114,
+        117,
+        120,
+        123,
+        126,
+        129,
+        132,
+        135,
+        138,
+        141,
+        144,
+        147,
+        150,
+        153,
+        156,
+        159,
+        162,
+        165,
+        168,
+        171,
+        174,
+        177,
+        180,
+        183,
+        186,
+        189,
+        192,
+        195,
+        198,
+        201,
+        204,
+        207,
+        210,
+        213,
+        216,
+        219,
+        222,
+        225,
+        228,
+        231,
+        234,
+        237,
+        240,
+        243,
+        246,
+        249,
+        252,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        3,
+        6,
+        9,
+        12,
+        15,
+        18,
+        21,
+        24,
+        27,
+        30,
+        33,
+        36,
+        39,
+        42,
+        45,
+        48,
+        51,
+        54,
+        57,
+        60,
+        63,
+        66,
+        69,
+        72,
+        75,
+        78,
+        81,
+        84,
+        87,
+        90,
+        93,
+        96,
+        99,
+        102,
+        105,
+        108,
+        111,
+        114,
+        117,
+        120,
+        123,
+        126,
+        129,
+        132,
+        135,
+        138,
+        141,
+        144,
+        147,
+        150,
+        153,
+        156,
+        159,
+        162,
+        165,
+        168,
+        171,
+        174,
+        177,
+        180,
+        183,
+        186,
+        189,
+        192,
+        195,
+        198,
+        201,
+        204,
+        207,
+        210,
+        213,
+        216,
+        219,
+        222,
+        225,
+        228,
+        231,
+        234,
+        237,
+        240,
+        243,
+        246,
+        249,
+        252,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        3,
+        6,
+        9,
+        12,
+        15,
+        18,
+        21,
+        24,
+        27,
+        30,
+        33,
+        36,
+        39,
+        42,
+        45,
+        48,
+        51,
+        54,
+        57,
+        60,
+        63,
+        66,
+        69,
+        72,
+        75,
+        78,
+        81,
+        84,
+        87,
+        90,
+        93,
+        96,
+        99,
+        102,
+        105,
+        108,
+        111,
+        114,
+        117,
+        120,
+        123,
+        126,
+        129,
+        132,
+        135,
+        138,
+        141,
+        144,
+        147,
+        150,
+        153,
+        156,
+        159,
+        162,
+        165,
+        168,
+        171,
+        174,
+        177,
+        180,
+        183,
+        186,
+        189,
+        192,
+        195,
+        198,
+        201,
+        204,
+        207,
+        210,
+        213,
+        216,
+        219,
+        222,
+        225,
+        228,
+        231,
+        234,
+        237,
+        240,
+        243,
+        246,
+        249,
+        252,
+        255
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/Cardiac.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/Cardiac.h
new file mode 100644
index 0000000..241aab6
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/Cardiac.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: HotMetal.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar, 20 nov 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_cardiac_h_
+#define _lut_cardiac_h_
+
+static const int Cardiac[256*3]= {
+        73,
+        72,
+        70,
+        69,
+        68,
+        66,
+        65,
+        63,
+        62,
+        61,
+        59,
+        58,
+        57,
+        55,
+        54,
+        52,
+        51,
+        48,
+        45,
+        41,
+        38,
+        35,
+        32,
+        29,
+        26,
+        22,
+        19,
+        16,
+        13,
+        10,
+        6,
+        3,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        2,
+        3,
+        4,
+        5,
+        6,
+        7,
+        8,
+        9,
+        10,
+        11,
+        12,
+        13,
+        14,
+        15,
+        16,
+        16,
+        17,
+        17,
+        17,
+        17,
+        18,
+        18,
+        18,
+        18,
+        19,
+        19,
+        19,
+        19,
+        20,
+        20,
+        20,
+        21,
+        22,
+        22,
+        23,
+        24,
+        25,
+        25,
+        26,
+        27,
+        28,
+        28,
+        29,
+        30,
+        31,
+        31,
+        32,
+        36,
+        39,
+        43,
+        47,
+        50,
+        54,
+        57,
+        61,
+        65,
+        68,
+        72,
+        76,
+        79,
+        83,
+        86,
+        90,
+        95,
+        99,
+        104,
+        109,
+        113,
+        118,
+        123,
+        128,
+        132,
+        137,
+        142,
+        146,
+        151,
+        156,
+        160,
+        165,
+        169,
+        172,
+        176,
+        179,
+        183,
+        186,
+        190,
+        194,
+        197,
+        201,
+        204,
+        208,
+        211,
+        215,
+        218,
+        222,
+        224,
+        226,
+        228,
+        230,
+        232,
+        234,
+        236,
+        239,
+        241,
+        243,
+        245,
+        247,
+        249,
+        251,
+        253,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        250,
+        245,
+        240,
+        236,
+        231,
+        226,
+        221,
+        216,
+        211,
+        206,
+        201,
+        197,
+        192,
+        187,
+        182,
+        177,
+        171,
+        164,
+        158,
+        151,
+        145,
+        138,
+        132,
+        125,
+        119,
+        112,
+        106,
+        99,
+        93,
+        86,
+        73,
+        193,
+        195,
+        197,
+        198,
+        200,
+        202,
+        204,
+        206,
+        208,
+        209,
+        211,
+        213,
+        215,
+        217,
+        218,
+        220,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        222,
+        216,
+        211,
+        205,
+        200,
+        194,
+        188,
+        183,
+        177,
+        171,
+        166,
+        160,
+        155,
+        149,
+        143,
+        138,
+        132,
+        128,
+        125,
+        121,
+        118,
+        114,
+        110,
+        107,
+        103,
+        99,
+        96,
+        92,
+        89,
+        85,
+        81,
+        78,
+        74,
+        70,
+        67,
+        63,
+        60,
+        56,
+        52,
+        49,
+        45,
+        41,
+        38,
+        34,
+        31,
+        27,
+        23,
+        20,
+        16,
+        15,
+        14,
+        13,
+        12,
+        11,
+        10,
+        9,
+        8,
+        7,
+        6,
+        5,
+        4,
+        3,
+        2,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        2,
+        4,
+        6,
+        8,
+        10,
+        12,
+        14,
+        17,
+        19,
+        21,
+        23,
+        25,
+        27,
+        29,
+        31,
+        33,
+        37,
+        41,
+        45,
+        50,
+        54,
+        58,
+        62,
+        66,
+        70,
+        74,
+        78,
+        83,
+        87,
+        91,
+        95,
+        99,
+        103,
+        107,
+        111,
+        116,
+        120,
+        124,
+        128,
+        132,
+        136,
+        140,
+        144,
+        149,
+        153,
+        157,
+        161,
+        165,
+        170,
+        174,
+        179,
+        184,
+        188,
+        193,
+        197,
+        202,
+        207,
+        211,
+        216,
+        221,
+        225,
+        230,
+        234,
+        239,
+        238,
+        237,
+        236,
+        235,
+        234,
+        233,
+        232,
+        231,
+        229,
+        228,
+        227,
+        226,
+        225,
+        224,
+        223,
+        222,
+        220,
+        218,
+        217,
+        215,
+        213,
+        211,
+        209,
+        208,
+        206,
+        204,
+        202,
+        200,
+        198,
+        197,
+        193,
+        3,
+        12,
+        20,
+        29,
+        37,
+        46,
+        54,
+        63,
+        71,
+        80,
+        88,
+        97,
+        105,
+        114,
+        122,
+        131,
+        139,
+        146,
+        154,
+        161,
+        168,
+        175,
+        183,
+        190,
+        197,
+        204,
+        212,
+        219,
+        226,
+        233,
+        241,
+        248,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        253,
+        252,
+        250,
+        249,
+        247,
+        246,
+        244,
+        243,
+        241,
+        239,
+        238,
+        236,
+        235,
+        233,
+        232,
+        230,
+        229,
+        227,
+        226,
+        224,
+        223,
+        221,
+        220,
+        218,
+        217,
+        215,
+        214,
+        212,
+        211,
+        209,
+        208,
+        206,
+        203,
+        201,
+        198,
+        196,
+        193,
+        191,
+        188,
+        186,
+        183,
+        180,
+        178,
+        175,
+        173,
+        170,
+        168,
+        165,
+        163,
+        161,
+        159,
+        157,
+        155,
+        153,
+        151,
+        149,
+        146,
+        144,
+        142,
+        140,
+        138,
+        136,
+        134,
+        132,
+        127,
+        123,
+        118,
+        113,
+        109,
+        104,
+        99,
+        95,
+        90,
+        85,
+        80,
+        76,
+        71,
+        66,
+        62,
+        57,
+        53,
+        50,
+        46,
+        43,
+        39,
+        36,
+        32,
+        29,
+        25,
+        21,
+        18,
+        14,
+        11,
+        7,
+        4,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        2,
+        2,
+        3,
+        4,
+        5,
+        5,
+        6,
+        7,
+        8,
+        8,
+        9,
+        10,
+        11,
+        11,
+        12,
+        11,
+        11,
+        10,
+        10,
+        9,
+        9,
+        8,
+        8,
+        7,
+        6,
+        6,
+        5,
+        5,
+        4,
+        3
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/Flow.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/Flow.h
new file mode 100644
index 0000000..78b81af
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/Flow.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: Flow.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar 20 de nov de 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_Flow_h_
+#define _lut_Flow_h_
+
+static const int Flow[3*256]= {
+        32,
+        32,
+        32,
+        32,
+        31,
+        31,
+        31,
+        31,
+        31,
+        30,
+        30,
+        30,
+        30,
+        30,
+        29,
+        29,
+        29,
+        29,
+        29,
+        28,
+        28,
+        28,
+        28,
+        28,
+        27,
+        27,
+        27,
+        27,
+        27,
+        26,
+        26,
+        26,
+        26,
+        26,
+        25,
+        25,
+        25,
+        25,
+        25,
+        24,
+        24,
+        24,
+        24,
+        24,
+        23,
+        23,
+        23,
+        23,
+        23,
+        22,
+        22,
+        22,
+        22,
+        22,
+        21,
+        21,
+        21,
+        21,
+        21,
+        20,
+        20,
+        20,
+        20,
+        19,
+        19,
+        19,
+        19,
+        18,
+        18,
+        18,
+        17,
+        17,
+        17,
+        16,
+        16,
+        16,
+        16,
+        15,
+        15,
+        15,
+        14,
+        14,
+        14,
+        13,
+        13,
+        13,
+        13,
+        12,
+        12,
+        12,
+        11,
+        11,
+        11,
+        10,
+        10,
+        10,
+        10,
+        9,
+        9,
+        9,
+        8,
+        8,
+        8,
+        7,
+        7,
+        7,
+        7,
+        6,
+        6,
+        6,
+        5,
+        5,
+        5,
+        4,
+        4,
+        4,
+        4,
+        3,
+        3,
+        3,
+        2,
+        2,
+        2,
+        1,
+        1,
+        1,
+        1,
+        0,
+        0,
+        0,
+        4,
+        8,
+        12,
+        16,
+        20,
+        24,
+        28,
+        32,
+        36,
+        40,
+        45,
+        49,
+        53,
+        57,
+        61,
+        65,
+        69,
+        73,
+        77,
+        81,
+        85,
+        89,
+        93,
+        97,
+        101,
+        105,
+        109,
+        113,
+        117,
+        121,
+        125,
+        130,
+        134,
+        138,
+        142,
+        146,
+        150,
+        154,
+        158,
+        162,
+        166,
+        170,
+        174,
+        178,
+        182,
+        186,
+        190,
+        194,
+        198,
+        202,
+        206,
+        210,
+        215,
+        219,
+        223,
+        227,
+        231,
+        235,
+        239,
+        243,
+        247,
+        251,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        200,
+        197,
+        194,
+        191,
+        188,
+        185,
+        182,
+        179,
+        176,
+        173,
+        170,
+        167,
+        164,
+        161,
+        158,
+        155,
+        152,
+        149,
+        146,
+        143,
+        140,
+        137,
+        134,
+        131,
+        128,
+        125,
+        122,
+        119,
+        116,
+        113,
+        110,
+        107,
+        104,
+        101,
+        98,
+        95,
+        92,
+        89,
+        86,
+        83,
+        80,
+        77,
+        74,
+        71,
+        68,
+        65,
+        62,
+        59,
+        56,
+        53,
+        50,
+        47,
+        44,
+        41,
+        38,
+        35,
+        32,
+        29,
+        26,
+        23,
+        20,
+        20,
+        20,
+        19,
+        19,
+        19,
+        19,
+        18,
+        18,
+        18,
+        17,
+        17,
+        17,
+        16,
+        16,
+        16,
+        16,
+        15,
+        15,
+        15,
+        14,
+        14,
+        14,
+        13,
+        13,
+        13,
+        13,
+        12,
+        12,
+        12,
+        11,
+        11,
+        11,
+        10,
+        10,
+        10,
+        10,
+        9,
+        9,
+        9,
+        8,
+        8,
+        8,
+        7,
+        7,
+        7,
+        7,
+        6,
+        6,
+        6,
+        5,
+        5,
+        5,
+        4,
+        4,
+        4,
+        4,
+        3,
+        3,
+        3,
+        2,
+        2,
+        2,
+        1,
+        1,
+        1,
+        1,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        1,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        6,
+        10,
+        14,
+        18,
+        22,
+        26,
+        30,
+        34,
+        38,
+        42,
+        46,
+        50,
+        54,
+        58,
+        62,
+        66,
+        70,
+        74,
+        78,
+        82,
+        86,
+        90,
+        94,
+        98,
+        102,
+        106,
+        110,
+        114,
+        118,
+        122,
+        126,
+        130,
+        134,
+        138,
+        142,
+        146,
+        150,
+        154,
+        158,
+        162,
+        166,
+        170,
+        174,
+        178,
+        182,
+        186,
+        190,
+        194,
+        198,
+        202,
+        206,
+        210,
+        214,
+        218,
+        222,
+        226,
+        230,
+        234,
+        238,
+        242,
+        246,
+        250,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        251,
+        247,
+        244,
+        240,
+        236,
+        232,
+        228,
+        225,
+        221,
+        217,
+        213,
+        209,
+        206,
+        202,
+        198,
+        194,
+        190,
+        186,
+        183,
+        179,
+        175,
+        171,
+        167,
+        164,
+        160,
+        156,
+        152,
+        148,
+        145,
+        141,
+        137,
+        133,
+        129,
+        126,
+        122,
+        118,
+        114,
+        110,
+        107,
+        103,
+        99,
+        95,
+        91,
+        88,
+        84,
+        80,
+        76,
+        72,
+        69,
+        65,
+        61,
+        57,
+        53,
+        49,
+        46,
+        42,
+        38,
+        34,
+        30,
+        27,
+        23,
+        19,
+        15,
+        11,
+        8,
+        4,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        8,
+        16,
+        24,
+        32,
+        40,
+        48,
+        56,
+        64,
+        72,
+        80,
+        88,
+        96,
+        104,
+        112,
+        120,
+        128,
+        136,
+        144,
+        152,
+        160,
+        168,
+        176,
+        184,
+        192,
+        200,
+        208,
+        216,
+        224,
+        232,
+        240,
+        248,
+        255
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/GEColor.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/GEColor.h
new file mode 100644
index 0000000..248cd65
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/GEColor.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: GEColor.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar 20 de nov de 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_GEColor_h_
+#define _lut_GEColor_h_
+
+static const int GEColor[3*256]= {
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        3,
+        5,
+        7,
+        9,
+        11,
+        13,
+        15,
+        17,
+        19,
+        21,
+        23,
+        25,
+        27,
+        29,
+        31,
+        33,
+        35,
+        37,
+        39,
+        41,
+        43,
+        45,
+        47,
+        49,
+        51,
+        53,
+        55,
+        57,
+        59,
+        61,
+        63,
+        65,
+        67,
+        69,
+        71,
+        73,
+        75,
+        77,
+        79,
+        81,
+        83,
+        85,
+        86,
+        88,
+        90,
+        92,
+        94,
+        96,
+        98,
+        100,
+        102,
+        104,
+        106,
+        108,
+        110,
+        112,
+        114,
+        116,
+        118,
+        120,
+        122,
+        124,
+        126,
+        128,
+        130,
+        132,
+        134,
+        136,
+        138,
+        140,
+        142,
+        144,
+        146,
+        148,
+        150,
+        152,
+        154,
+        156,
+        158,
+        160,
+        162,
+        164,
+        166,
+        168,
+        170,
+        171,
+        173,
+        175,
+        177,
+        179,
+        181,
+        183,
+        185,
+        187,
+        189,
+        191,
+        193,
+        195,
+        197,
+        199,
+        201,
+        203,
+        205,
+        207,
+        209,
+        211,
+        213,
+        215,
+        217,
+        219,
+        221,
+        223,
+        225,
+        227,
+        229,
+        231,
+        233,
+        235,
+        237,
+        239,
+        241,
+        243,
+        245,
+        247,
+        249,
+        251,
+        253,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        0,
+        2,
+        4,
+        6,
+        8,
+        10,
+        12,
+        14,
+        16,
+        18,
+        20,
+        22,
+        24,
+        26,
+        28,
+        30,
+        32,
+        34,
+        36,
+        38,
+        40,
+        42,
+        44,
+        46,
+        48,
+        50,
+        52,
+        54,
+        56,
+        58,
+        60,
+        62,
+        65,
+        67,
+        69,
+        71,
+        73,
+        75,
+        77,
+        79,
+        81,
+        83,
+        85,
+        87,
+        89,
+        91,
+        93,
+        95,
+        97,
+        99,
+        101,
+        103,
+        105,
+        107,
+        109,
+        111,
+        113,
+        115,
+        117,
+        119,
+        121,
+        123,
+        125,
+        128,
+        126,
+        124,
+        122,
+        120,
+        118,
+        116,
+        114,
+        112,
+        110,
+        108,
+        106,
+        104,
+        102,
+        100,
+        98,
+        96,
+        94,
+        92,
+        90,
+        88,
+        86,
+        84,
+        82,
+        80,
+        78,
+        76,
+        74,
+        72,
+        70,
+        68,
+        66,
+        64,
+        63,
+        61,
+        59,
+        57,
+        55,
+        53,
+        51,
+        49,
+        47,
+        45,
+        43,
+        41,
+        39,
+        37,
+        35,
+        33,
+        31,
+        29,
+        27,
+        25,
+        23,
+        21,
+        19,
+        17,
+        15,
+        13,
+        11,
+        9,
+        7,
+        5,
+        3,
+        1,
+        0,
+        2,
+        4,
+        6,
+        8,
+        10,
+        12,
+        14,
+        16,
+        18,
+        20,
+        22,
+        24,
+        26,
+        28,
+        30,
+        32,
+        34,
+        36,
+        38,
+        40,
+        42,
+        44,
+        46,
+        48,
+        50,
+        52,
+        54,
+        56,
+        58,
+        60,
+        62,
+        64,
+        66,
+        68,
+        70,
+        72,
+        74,
+        76,
+        78,
+        80,
+        82,
+        84,
+        86,
+        88,
+        90,
+        92,
+        94,
+        96,
+        98,
+        100,
+        102,
+        104,
+        106,
+        108,
+        110,
+        112,
+        114,
+        116,
+        118,
+        120,
+        122,
+        124,
+        126,
+        128,
+        130,
+        132,
+        134,
+        136,
+        138,
+        140,
+        142,
+        144,
+        146,
+        148,
+        150,
+        152,
+        154,
+        156,
+        158,
+        160,
+        162,
+        164,
+        166,
+        168,
+        170,
+        172,
+        174,
+        176,
+        178,
+        180,
+        182,
+        184,
+        186,
+        188,
+        190,
+        192,
+        194,
+        196,
+        198,
+        200,
+        202,
+        204,
+        206,
+        208,
+        210,
+        212,
+        214,
+        216,
+        218,
+        220,
+        222,
+        224,
+        226,
+        228,
+        230,
+        232,
+        234,
+        236,
+        238,
+        240,
+        242,
+        244,
+        246,
+        248,
+        250,
+        252,
+        255,
+        0,
+        1,
+        3,
+        5,
+        7,
+        9,
+        11,
+        13,
+        15,
+        17,
+        19,
+        21,
+        23,
+        25,
+        27,
+        29,
+        31,
+        33,
+        35,
+        37,
+        39,
+        41,
+        43,
+        45,
+        47,
+        49,
+        51,
+        53,
+        55,
+        57,
+        59,
+        61,
+        63,
+        65,
+        67,
+        69,
+        71,
+        73,
+        75,
+        77,
+        79,
+        81,
+        83,
+        85,
+        87,
+        89,
+        91,
+        93,
+        95,
+        97,
+        99,
+        101,
+        103,
+        105,
+        107,
+        109,
+        111,
+        113,
+        115,
+        117,
+        119,
+        121,
+        123,
+        125,
+        127,
+        129,
+        131,
+        133,
+        135,
+        137,
+        139,
+        141,
+        143,
+        145,
+        147,
+        149,
+        151,
+        153,
+        155,
+        157,
+        159,
+        161,
+        163,
+        165,
+        167,
+        169,
+        171,
+        173,
+        175,
+        177,
+        179,
+        181,
+        183,
+        185,
+        187,
+        189,
+        191,
+        193,
+        195,
+        197,
+        199,
+        201,
+        203,
+        205,
+        207,
+        209,
+        211,
+        213,
+        215,
+        217,
+        219,
+        221,
+        223,
+        225,
+        227,
+        229,
+        231,
+        233,
+        235,
+        237,
+        239,
+        241,
+        243,
+        245,
+        247,
+        249,
+        251,
+        253,
+        255,
+        252,
+        248,
+        244,
+        240,
+        236,
+        232,
+        228,
+        224,
+        220,
+        216,
+        212,
+        208,
+        204,
+        200,
+        196,
+        192,
+        188,
+        184,
+        180,
+        176,
+        172,
+        168,
+        164,
+        160,
+        156,
+        152,
+        148,
+        144,
+        140,
+        136,
+        132,
+        128,
+        124,
+        120,
+        116,
+        112,
+        108,
+        104,
+        100,
+        96,
+        92,
+        88,
+        84,
+        80,
+        76,
+        72,
+        68,
+        64,
+        60,
+        56,
+        52,
+        48,
+        44,
+        40,
+        36,
+        32,
+        28,
+        24,
+        20,
+        16,
+        12,
+        8,
+        4,
+        0,
+        4,
+        8,
+        12,
+        16,
+        20,
+        24,
+        28,
+        32,
+        36,
+        40,
+        44,
+        48,
+        52,
+        56,
+        60,
+        64,
+        68,
+        72,
+        76,
+        80,
+        85,
+        89,
+        93,
+        97,
+        101,
+        105,
+        109,
+        113,
+        117,
+        121,
+        125,
+        129,
+        133,
+        137,
+        141,
+        145,
+        149,
+        153,
+        157,
+        161,
+        165,
+        170,
+        174,
+        178,
+        182,
+        186,
+        190,
+        194,
+        198,
+        202,
+        206,
+        210,
+        214,
+        218,
+        222,
+        226,
+        230,
+        234,
+        238,
+        242,
+        246,
+        250,
+        255
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/GrayRainbow.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/GrayRainbow.h
new file mode 100644
index 0000000..08d4930
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/GrayRainbow.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: HotMetal.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar, 20 nov 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_grayRainbow_h_
+#define _lut_grayRainbow_h_
+
+static const int GrayRainbow[256*3]= {
+        0,
+        1,
+        2,
+        3,
+        4,
+        5,
+        6,
+        7,
+        8,
+        9,
+        10,
+        11,
+        12,
+        13,
+        14,
+        15,
+        175,
+        17,
+        18,
+        19,
+        20,
+        21,
+        22,
+        23,
+        24,
+        25,
+        26,
+        27,
+        28,
+        29,
+        30,
+        31,
+        95,
+        33,
+        34,
+        35,
+        36,
+        37,
+        38,
+        39,
+        40,
+        41,
+        42,
+        43,
+        44,
+        45,
+        46,
+        47,
+        15,
+        49,
+        50,
+        51,
+        52,
+        53,
+        54,
+        55,
+        56,
+        57,
+        58,
+        59,
+        60,
+        61,
+        62,
+        63,
+        0,
+        65,
+        66,
+        67,
+        68,
+        69,
+        70,
+        71,
+        72,
+        73,
+        74,
+        75,
+        76,
+        77,
+        78,
+        79,
+        0,
+        81,
+        82,
+        83,
+        84,
+        85,
+        86,
+        87,
+        88,
+        89,
+        90,
+        91,
+        92,
+        93,
+        94,
+        95,
+        0,
+        97,
+        98,
+        99,
+        100,
+        101,
+        102,
+        103,
+        104,
+        105,
+        106,
+        107,
+        108,
+        109,
+        110,
+        111,
+        0,
+        113,
+        114,
+        115,
+        116,
+        117,
+        118,
+        119,
+        120,
+        121,
+        122,
+        123,
+        124,
+        125,
+        126,
+        127,
+        0,
+        129,
+        130,
+        131,
+        132,
+        133,
+        134,
+        135,
+        136,
+        137,
+        138,
+        139,
+        140,
+        141,
+        142,
+        143,
+        0,
+        145,
+        146,
+        147,
+        148,
+        149,
+        150,
+        151,
+        152,
+        153,
+        154,
+        155,
+        156,
+        157,
+        158,
+        159,
+        35,
+        161,
+        162,
+        163,
+        164,
+        165,
+        166,
+        167,
+        168,
+        169,
+        170,
+        171,
+        172,
+        173,
+        174,
+        175,
+        115,
+        177,
+        178,
+        179,
+        180,
+        181,
+        182,
+        183,
+        184,
+        185,
+        186,
+        187,
+        188,
+        189,
+        190,
+        191,
+        195,
+        193,
+        194,
+        195,
+        196,
+        197,
+        198,
+        199,
+        200,
+        201,
+        202,
+        203,
+        204,
+        205,
+        206,
+        207,
+        255,
+        209,
+        210,
+        211,
+        212,
+        213,
+        214,
+        215,
+        216,
+        217,
+        218,
+        219,
+        220,
+        221,
+        222,
+        223,
+        255,
+        225,
+        226,
+        227,
+        228,
+        229,
+        230,
+        231,
+        232,
+        233,
+        234,
+        235,
+        236,
+        237,
+        238,
+        239,
+        255,
+        241,
+        242,
+        243,
+        244,
+        245,
+        246,
+        247,
+        248,
+        249,
+        250,
+        251,
+        252,
+        253,
+        254,
+        255,
+        0,
+        1,
+        2,
+        3,
+        4,
+        5,
+        6,
+        7,
+        8,
+        9,
+        10,
+        11,
+        12,
+        13,
+        14,
+        15,
+        0,
+        17,
+        18,
+        19,
+        20,
+        21,
+        22,
+        23,
+        24,
+        25,
+        26,
+        27,
+        28,
+        29,
+        30,
+        31,
+        0,
+        33,
+        34,
+        35,
+        36,
+        37,
+        38,
+        39,
+        40,
+        41,
+        42,
+        43,
+        44,
+        45,
+        46,
+        47,
+        0,
+        49,
+        50,
+        51,
+        52,
+        53,
+        54,
+        55,
+        56,
+        57,
+        58,
+        59,
+        60,
+        61,
+        62,
+        63,
+        65,
+        65,
+        66,
+        67,
+        68,
+        69,
+        70,
+        71,
+        72,
+        73,
+        74,
+        75,
+        76,
+        77,
+        78,
+        79,
+        145,
+        81,
+        82,
+        83,
+        84,
+        85,
+        86,
+        87,
+        88,
+        89,
+        90,
+        91,
+        92,
+        93,
+        94,
+        95,
+        225,
+        97,
+        98,
+        99,
+        100,
+        101,
+        102,
+        103,
+        104,
+        105,
+        106,
+        107,
+        108,
+        109,
+        110,
+        111,
+        255,
+        113,
+        114,
+        115,
+        116,
+        117,
+        118,
+        119,
+        120,
+        121,
+        122,
+        123,
+        124,
+        125,
+        126,
+        127,
+        255,
+        129,
+        130,
+        131,
+        132,
+        133,
+        134,
+        135,
+        136,
+        137,
+        138,
+        139,
+        140,
+        141,
+        142,
+        143,
+        255,
+        145,
+        146,
+        147,
+        148,
+        149,
+        150,
+        151,
+        152,
+        153,
+        154,
+        155,
+        156,
+        157,
+        158,
+        159,
+        255,
+        161,
+        162,
+        163,
+        164,
+        165,
+        166,
+        167,
+        168,
+        169,
+        170,
+        171,
+        172,
+        173,
+        174,
+        175,
+        255,
+        177,
+        178,
+        179,
+        180,
+        181,
+        182,
+        183,
+        184,
+        185,
+        186,
+        187,
+        188,
+        189,
+        190,
+        191,
+        255,
+        193,
+        194,
+        195,
+        196,
+        197,
+        198,
+        199,
+        200,
+        201,
+        202,
+        203,
+        204,
+        205,
+        206,
+        207,
+        235,
+        209,
+        210,
+        211,
+        212,
+        213,
+        214,
+        215,
+        216,
+        217,
+        218,
+        219,
+        220,
+        221,
+        222,
+        223,
+        155,
+        225,
+        226,
+        227,
+        228,
+        229,
+        230,
+        231,
+        232,
+        233,
+        234,
+        235,
+        236,
+        237,
+        238,
+        239,
+        75,
+        241,
+        242,
+        243,
+        244,
+        245,
+        246,
+        247,
+        248,
+        249,
+        250,
+        251,
+        252,
+        253,
+        254,
+        255,
+        0,
+        1,
+        2,
+        3,
+        4,
+        5,
+        6,
+        7,
+        8,
+        9,
+        10,
+        11,
+        12,
+        13,
+        14,
+        15,
+        255,
+        17,
+        18,
+        19,
+        20,
+        21,
+        22,
+        23,
+        24,
+        25,
+        26,
+        27,
+        28,
+        29,
+        30,
+        31,
+        255,
+        33,
+        34,
+        35,
+        36,
+        37,
+        38,
+        39,
+        40,
+        41,
+        42,
+        43,
+        44,
+        45,
+        46,
+        47,
+        255,
+        49,
+        50,
+        51,
+        52,
+        53,
+        54,
+        55,
+        56,
+        57,
+        58,
+        59,
+        60,
+        61,
+        62,
+        63,
+        255,
+        65,
+        66,
+        67,
+        68,
+        69,
+        70,
+        71,
+        72,
+        73,
+        74,
+        75,
+        76,
+        77,
+        78,
+        79,
+        255,
+        81,
+        82,
+        83,
+        84,
+        85,
+        86,
+        87,
+        88,
+        89,
+        90,
+        91,
+        92,
+        93,
+        94,
+        95,
+        255,
+        97,
+        98,
+        99,
+        100,
+        101,
+        102,
+        103,
+        104,
+        105,
+        106,
+        107,
+        108,
+        109,
+        110,
+        111,
+        205,
+        113,
+        114,
+        115,
+        116,
+        117,
+        118,
+        119,
+        120,
+        121,
+        122,
+        123,
+        124,
+        125,
+        126,
+        127,
+        125,
+        129,
+        130,
+        131,
+        132,
+        133,
+        134,
+        135,
+        136,
+        137,
+        138,
+        139,
+        140,
+        141,
+        142,
+        143,
+        45,
+        145,
+        146,
+        147,
+        148,
+        149,
+        150,
+        151,
+        152,
+        153,
+        154,
+        155,
+        156,
+        157,
+        158,
+        159,
+        0,
+        161,
+        162,
+        163,
+        164,
+        165,
+        166,
+        167,
+        168,
+        169,
+        170,
+        171,
+        172,
+        173,
+        174,
+        175,
+        0,
+        177,
+        178,
+        179,
+        180,
+        181,
+        182,
+        183,
+        184,
+        185,
+        186,
+        187,
+        188,
+        189,
+        190,
+        191,
+        0,
+        193,
+        194,
+        195,
+        196,
+        197,
+        198,
+        199,
+        200,
+        201,
+        202,
+        203,
+        204,
+        205,
+        206,
+        207,
+        0,
+        209,
+        210,
+        211,
+        212,
+        213,
+        214,
+        215,
+        216,
+        217,
+        218,
+        219,
+        220,
+        221,
+        222,
+        223,
+        0,
+        225,
+        226,
+        227,
+        228,
+        229,
+        230,
+        231,
+        232,
+        233,
+        234,
+        235,
+        236,
+        237,
+        238,
+        239,
+        0,
+        241,
+        242,
+        243,
+        244,
+        245,
+        246,
+        247,
+        248,
+        249,
+        250,
+        251,
+        252,
+        253,
+        254,
+        255
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/HotGreen.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/HotGreen.h
new file mode 100644
index 0000000..41d59c6
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/HotGreen.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: HotMetal.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar, 20 nov 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_hotGreen_h_
+#define _lut_hotGreen_h_
+
+static const int HotGreen[256*3]= {
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        3,
+        5,
+        7,
+        8,
+        10,
+        12,
+        14,
+        16,
+        17,
+        19,
+        21,
+        23,
+        24,
+        26,
+        28,
+        30,
+        32,
+        33,
+        35,
+        37,
+        39,
+        40,
+        42,
+        44,
+        46,
+        48,
+        49,
+        51,
+        53,
+        55,
+        56,
+        58,
+        60,
+        62,
+        64,
+        65,
+        67,
+        69,
+        71,
+        72,
+        74,
+        76,
+        78,
+        80,
+        81,
+        83,
+        85,
+        87,
+        88,
+        90,
+        92,
+        94,
+        96,
+        97,
+        99,
+        101,
+        103,
+        104,
+        106,
+        108,
+        110,
+        112,
+        113,
+        115,
+        117,
+        119,
+        120,
+        122,
+        124,
+        126,
+        128,
+        129,
+        131,
+        133,
+        135,
+        136,
+        138,
+        140,
+        142,
+        144,
+        145,
+        147,
+        149,
+        151,
+        152,
+        154,
+        156,
+        158,
+        160,
+        161,
+        163,
+        165,
+        167,
+        168,
+        170,
+        172,
+        174,
+        176,
+        177,
+        179,
+        181,
+        183,
+        184,
+        186,
+        188,
+        190,
+        192,
+        193,
+        195,
+        197,
+        199,
+        200,
+        202,
+        204,
+        206,
+        208,
+        209,
+        211,
+        213,
+        215,
+        216,
+        218,
+        220,
+        222,
+        224,
+        225,
+        227,
+        229,
+        231,
+        232,
+        234,
+        236,
+        238,
+        240,
+        241,
+        243,
+        245,
+        247,
+        248,
+        250,
+        252,
+        254,
+        0,
+        1,
+        3,
+        4,
+        6,
+        7,
+        9,
+        10,
+        12,
+        13,
+        15,
+        16,
+        18,
+        19,
+        21,
+        22,
+        24,
+        25,
+        27,
+        28,
+        30,
+        31,
+        33,
+        34,
+        36,
+        37,
+        39,
+        40,
+        42,
+        43,
+        45,
+        46,
+        48,
+        49,
+        51,
+        52,
+        54,
+        55,
+        57,
+        58,
+        60,
+        61,
+        63,
+        64,
+        66,
+        67,
+        69,
+        70,
+        72,
+        73,
+        75,
+        76,
+        78,
+        79,
+        81,
+        82,
+        84,
+        85,
+        87,
+        88,
+        90,
+        91,
+        93,
+        94,
+        96,
+        97,
+        99,
+        100,
+        102,
+        103,
+        105,
+        106,
+        108,
+        109,
+        111,
+        112,
+        114,
+        115,
+        117,
+        118,
+        120,
+        121,
+        123,
+        124,
+        126,
+        127,
+        129,
+        130,
+        132,
+        133,
+        135,
+        136,
+        138,
+        139,
+        141,
+        142,
+        144,
+        145,
+        147,
+        148,
+        150,
+        151,
+        153,
+        154,
+        156,
+        157,
+        159,
+        160,
+        162,
+        163,
+        165,
+        166,
+        168,
+        169,
+        171,
+        172,
+        174,
+        175,
+        177,
+        178,
+        180,
+        181,
+        183,
+        184,
+        186,
+        187,
+        189,
+        190,
+        192,
+        193,
+        195,
+        196,
+        198,
+        199,
+        201,
+        202,
+        204,
+        205,
+        207,
+        208,
+        210,
+        211,
+        213,
+        214,
+        216,
+        217,
+        219,
+        220,
+        222,
+        223,
+        225,
+        226,
+        228,
+        229,
+        231,
+        232,
+        234,
+        235,
+        237,
+        238,
+        240,
+        241,
+        243,
+        244,
+        246,
+        247,
+        249,
+        250,
+        252,
+        253,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        3,
+        6,
+        10,
+        13,
+        16,
+        20,
+        23,
+        26,
+        30,
+        33,
+        37,
+        40,
+        43,
+        47,
+        50,
+        53,
+        57,
+        60,
+        64,
+        67,
+        70,
+        74,
+        77,
+        80,
+        84,
+        87,
+        90,
+        94,
+        97,
+        101,
+        104,
+        107,
+        111,
+        114,
+        117,
+        121,
+        124,
+        128,
+        131,
+        134,
+        138,
+        141,
+        144,
+        148,
+        151,
+        154,
+        158,
+        161,
+        165,
+        168,
+        171,
+        175,
+        178,
+        181,
+        185,
+        188,
+        192,
+        195,
+        198,
+        202,
+        205,
+        208,
+        212,
+        215,
+        218,
+        222,
+        225,
+        229,
+        232,
+        235,
+        239,
+        242,
+        245,
+        249,
+        252
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/HotIron.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/HotIron.h
new file mode 100644
index 0000000..96371cd
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/HotIron.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: HotMetal.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar, 20 nov 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_hotIron_h_
+#define _lut_hotIron_h_
+
+static const int HotIron[256*3]= {
+        0,
+        2,
+        4,
+        6,
+        8,
+        10,
+        12,
+        14,
+        16,
+        18,
+        20,
+        22,
+        24,
+        26,
+        28,
+        30,
+        32,
+        34,
+        36,
+        38,
+        40,
+        42,
+        44,
+        46,
+        48,
+        50,
+        52,
+        54,
+        56,
+        58,
+        60,
+        62,
+        64,
+        66,
+        68,
+        70,
+        72,
+        74,
+        76,
+        78,
+        80,
+        82,
+        84,
+        86,
+        88,
+        90,
+        92,
+        94,
+        96,
+        98,
+        100,
+        102,
+        104,
+        106,
+        108,
+        110,
+        112,
+        114,
+        116,
+        118,
+        120,
+        122,
+        124,
+        126,
+        128,
+        130,
+        132,
+        134,
+        136,
+        138,
+        140,
+        142,
+        144,
+        146,
+        148,
+        150,
+        152,
+        154,
+        156,
+        158,
+        160,
+        162,
+        164,
+        166,
+        168,
+        170,
+        172,
+        174,
+        176,
+        178,
+        180,
+        182,
+        184,
+        186,
+        188,
+        190,
+        192,
+        194,
+        196,
+        198,
+        200,
+        202,
+        204,
+        206,
+        208,
+        210,
+        212,
+        214,
+        216,
+        218,
+        220,
+        222,
+        224,
+        226,
+        228,
+        230,
+        232,
+        234,
+        236,
+        238,
+        240,
+        242,
+        244,
+        246,
+        248,
+        250,
+        252,
+        254,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        2,
+        4,
+        6,
+        8,
+        10,
+        12,
+        14,
+        16,
+        18,
+        20,
+        22,
+        24,
+        26,
+        28,
+        30,
+        32,
+        34,
+        36,
+        38,
+        40,
+        42,
+        44,
+        46,
+        48,
+        50,
+        52,
+        54,
+        56,
+        58,
+        60,
+        62,
+        64,
+        66,
+        68,
+        70,
+        72,
+        74,
+        76,
+        78,
+        80,
+        82,
+        84,
+        86,
+        88,
+        90,
+        92,
+        94,
+        96,
+        98,
+        100,
+        102,
+        104,
+        106,
+        108,
+        110,
+        112,
+        114,
+        116,
+        118,
+        120,
+        122,
+        124,
+        126,
+        128,
+        130,
+        132,
+        134,
+        136,
+        138,
+        140,
+        142,
+        144,
+        146,
+        148,
+        150,
+        152,
+        154,
+        156,
+        158,
+        160,
+        162,
+        164,
+        166,
+        168,
+        170,
+        172,
+        174,
+        176,
+        178,
+        180,
+        182,
+        184,
+        186,
+        188,
+        190,
+        192,
+        194,
+        196,
+        198,
+        200,
+        202,
+        204,
+        206,
+        208,
+        210,
+        212,
+        214,
+        216,
+        218,
+        220,
+        222,
+        224,
+        226,
+        228,
+        230,
+        232,
+        234,
+        236,
+        238,
+        240,
+        242,
+        244,
+        246,
+        248,
+        250,
+        252,
+        255,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        4,
+        8,
+        12,
+        16,
+        20,
+        24,
+        28,
+        32,
+        36,
+        40,
+        44,
+        48,
+        52,
+        56,
+        60,
+        64,
+        68,
+        72,
+        76,
+        80,
+        84,
+        88,
+        92,
+        96,
+        100,
+        104,
+        108,
+        112,
+        116,
+        120,
+        124,
+        128,
+        132,
+        136,
+        140,
+        144,
+        148,
+        152,
+        156,
+        160,
+        164,
+        168,
+        172,
+        176,
+        180,
+        184,
+        188,
+        192,
+        196,
+        200,
+        204,
+        208,
+        212,
+        216,
+        220,
+        224,
+        228,
+        232,
+        236,
+        240,
+        244,
+        248,
+        252,
+        255
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/HotMetal.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/HotMetal.h
new file mode 100644
index 0000000..d08754e
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/HotMetal.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: HotMetal.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar 20 de nov de 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_HotMetal_h_
+#define _lut_HotMetal_h_
+
+static const int HotMetal[256*3]= {
+        0,
+        1,
+        2,
+        4,
+        5,
+        7,
+        8,
+        9,
+        11,
+        12,
+        14,
+        15,
+        16,
+        18,
+        19,
+        21,
+        22,
+        23,
+        25,
+        26,
+        28,
+        29,
+        30,
+        32,
+        33,
+        35,
+        36,
+        37,
+        39,
+        40,
+        42,
+        43,
+        44,
+        46,
+        47,
+        49,
+        50,
+        51,
+        53,
+        54,
+        56,
+        57,
+        58,
+        60,
+        61,
+        63,
+        64,
+        65,
+        67,
+        68,
+        70,
+        71,
+        72,
+        74,
+        75,
+        77,
+        78,
+        79,
+        81,
+        82,
+        84,
+        85,
+        86,
+        88,
+        89,
+        91,
+        92,
+        93,
+        95,
+        96,
+        98,
+        99,
+        100,
+        102,
+        103,
+        105,
+        106,
+        107,
+        109,
+        110,
+        112,
+        113,
+        114,
+        116,
+        117,
+        119,
+        120,
+        121,
+        123,
+        124,
+        126,
+        127,
+        128,
+        130,
+        131,
+        133,
+        134,
+        135,
+        137,
+        138,
+        140,
+        141,
+        142,
+        144,
+        145,
+        147,
+        148,
+        149,
+        151,
+        152,
+        154,
+        155,
+        156,
+        158,
+        159,
+        161,
+        162,
+        163,
+        165,
+        166,
+        168,
+        169,
+        170,
+        172,
+        173,
+        175,
+        176,
+        177,
+        179,
+        180,
+        182,
+        183,
+        184,
+        186,
+        187,
+        189,
+        190,
+        191,
+        193,
+        194,
+        196,
+        197,
+        198,
+        200,
+        201,
+        203,
+        204,
+        205,
+        207,
+        208,
+        210,
+        211,
+        212,
+        214,
+        215,
+        217,
+        218,
+        219,
+        221,
+        222,
+        224,
+        225,
+        226,
+        228,
+        229,
+        231,
+        232,
+        233,
+        235,
+        236,
+        238,
+        239,
+        240,
+        242,
+        243,
+        245,
+        246,
+        247,
+        249,
+        250,
+        252,
+        253,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        2,
+        5,
+        8,
+        11,
+        14,
+        16,
+        19,
+        22,
+        25,
+        28,
+        30,
+        33,
+        36,
+        39,
+        42,
+        44,
+        47,
+        50,
+        53,
+        56,
+        58,
+        61,
+        64,
+        67,
+        70,
+        72,
+        75,
+        78,
+        81,
+        84,
+        86,
+        89,
+        92,
+        95,
+        98,
+        100,
+        103,
+        106,
+        109,
+        112,
+        114,
+        117,
+        120,
+        123,
+        126,
+        128,
+        131,
+        134,
+        137,
+        140,
+        142,
+        145,
+        148,
+        151,
+        154,
+        156,
+        159,
+        162,
+        165,
+        168,
+        170,
+        173,
+        176,
+        179,
+        182,
+        184,
+        187,
+        190,
+        193,
+        196,
+        198,
+        201,
+        204,
+        207,
+        210,
+        212,
+        215,
+        218,
+        221,
+        224,
+        226,
+        229,
+        232,
+        235,
+        238,
+        240,
+        243,
+        246,
+        249,
+        252,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        3,
+        7,
+        11,
+        15,
+        19,
+        23,
+        27,
+        31,
+        35,
+        39,
+        43,
+        47,
+        51,
+        55,
+        59,
+        63,
+        67,
+        71,
+        75,
+        79,
+        83,
+        87,
+        91,
+        95,
+        99,
+        103,
+        107,
+        111,
+        115,
+        119,
+        123,
+        127,
+        131,
+        135,
+        139,
+        143,
+        147,
+        151,
+        155,
+        159,
+        163,
+        167,
+        171,
+        175,
+        179,
+        183,
+        187,
+        191,
+        195,
+        199,
+        203,
+        207,
+        211,
+        215,
+        219,
+        223,
+        227,
+        231,
+        235,
+        239,
+        243,
+        247,
+        251
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/LONI.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/LONI.h
new file mode 100644
index 0000000..dd1b991
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/LONI.h
@@ -0,0 +1,229 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: LONI.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar 20 de nov de 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_LONI_h_
+#define _lut_LONI_h_
+
+static const float LONI[203][3] = {
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0,         1.0000},
+        {0,    0.0244,    1.0000},
+        {0,    0.0488,    1.0000},
+        {0,    0.0732,    1.0000},
+        {0,    0.0976,    1.0000},
+        {0,    0.1220,    1.0000},
+        {0,    0.1463,    1.0000},
+        {0,    0.1707,    1.0000},
+        {0,    0.1951,    1.0000},
+        {0,    0.2195,    1.0000},
+        {0,    0.2439,    1.0000},
+        {0,    0.2683,    1.0000},
+        {0,    0.2927,    1.0000},
+        {0,    0.3171,    1.0000},
+        {0,    0.3415,    1.0000},
+        {0,    0.3659,    1.0000},
+        {0,    0.3902,    1.0000},
+        {0,    0.4146,    1.0000},
+        {0,    0.4390,    1.0000},
+        {0,    0.4634,    1.0000},
+        {0,    0.4878,    1.0000},
+        {0,    0.5122,    1.0000},
+        {0,    0.5366,    1.0000},
+        {0,    0.5610,    1.0000},
+        {0,    0.5854,    1.0000},
+        {0,    0.6098,    1.0000},
+        {0,    0.6341,    1.0000},
+        {0,    0.6585,    1.0000},
+        {0,    0.6829,    1.0000},
+        {0,    0.7073,    1.0000},
+        {0,    0.7317,    1.0000},
+        {0,    0.7561,    1.0000},
+        {0,    0.7805,    1.0000},
+        {0,    0.8049,    1.0000},
+        {0,    0.8293,    1.0000},
+        {0,    0.8537,    1.0000},
+        {0,    0.8780,    1.0000},
+        {0,    0.9024,    1.0000},
+        {0,    0.9268,    1.0000},
+        {0,    0.9512,    1.0000},
+        {0,    0.9756,    1.0000},
+        {0,    1.0000,    1.0000},
+        {0,    1.0000,    0.9756},
+        {0,    1.0000,    0.9512},
+        {0,    1.0000,    0.9268},
+        {0,    1.0000,    0.9024},
+        {0,    1.0000,    0.8780},
+        {0,    1.0000,    0.8537},
+        {0,    1.0000,    0.8293},
+        {0,    1.0000,    0.8049},
+        {0,    1.0000,    0.7805},
+        {0,    1.0000,    0.7561},
+        {0,    1.0000,    0.7317},
+        {0,    1.0000,    0.7073},
+        {0,    1.0000,    0.6829},
+        {0,    1.0000,    0.6585},
+        {0,    1.0000,    0.6341},
+        {0,    1.0000,    0.6098},
+        {0,    1.0000,    0.5854},
+        {0,    1.0000,    0.5610},
+        {0,    1.0000,    0.5366},
+        {0,    1.0000,    0.5122},
+        {0,    1.0000,    0.4878},
+        {0,    1.0000,    0.4634},
+        {0,    1.0000,    0.4390},
+        {0,    1.0000,    0.4146},
+        {0,    1.0000,    0.3902},
+        {0,    1.0000,    0.3659},
+        {0,    1.0000,    0.3415},
+        {0,    1.0000,    0.3171},
+        {0,    1.0000,    0.2927},
+        {0,    1.0000,    0.2683},
+        {0,    1.0000,    0.2439},
+        {0,    1.0000,    0.2195},
+        {0,    1.0000,    0.1951},
+        {0,    1.0000,    0.1707},
+        {0,    1.0000,    0.1463},
+        {0,    1.0000,    0.1220},
+        {0,    1.0000,    0.0976},
+        {0,    1.0000,    0.0732},
+        {0,    1.0000,    0.0488},
+        {0,    1.0000,    0.0244},
+        {0,    1.0000,         0},
+        {0.0244,    1.0000,         0},
+        {0.0488,    1.0000,         0},
+        {0.0732,    1.0000,         0},
+        {0.0976,    1.0000,         0},
+        {0.1220,    1.0000,         0},
+        {0.1463,    1.0000,         0},
+        {0.1707,    1.0000,         0},
+        {0.1951,    1.0000,         0},
+        {0.2195,    1.0000,         0},
+        {0.2439,    1.0000,         0},
+        {0.2683,    1.0000,         0},
+        {0.2927,    1.0000,         0},
+        {0.3171,    1.0000,         0},
+        {0.3415,    1.0000,         0},
+        {0.3659,    1.0000,         0},
+        {0.3902,    1.0000,         0},
+        {0.4146,    1.0000,         0},
+        {0.4390,    1.0000,         0},
+        {0.4634,    1.0000,         0},
+        {0.4878,    1.0000,         0},
+        {0.5122,    1.0000,         0},
+        {0.5366,    1.0000,         0},
+        {0.5610,    1.0000,         0},
+        {0.5854,    1.0000,         0},
+        {0.6098,    1.0000,         0},
+        {0.6341,    1.0000,         0},
+        {0.6585,    1.0000,         0},
+        {0.6829,    1.0000,         0},
+        {0.7073,    1.0000,         0},
+        {0.7317,    1.0000,         0},
+        {0.7561,    1.0000,         0},
+        {0.7805,    1.0000,         0},
+        {0.8049,    1.0000,         0},
+        {0.8293,    1.0000,         0},
+        {0.8537,    1.0000,         0},
+        {0.8780,    1.0000,         0},
+        {0.9024,    1.0000,         0},
+        {0.9268,    1.0000,         0},
+        {0.9512,    1.0000,         0},
+        {0.9756,    1.0000,         0},
+        {1.0000,    1.0000,         0},
+        {1.0000,    0.9756,         0},
+        {1.0000,    0.9512,         0},
+        {1.0000,    0.9268,         0},
+        {1.0000,    0.9024,         0},
+        {1.0000,    0.8780,         0},
+        {1.0000,    0.8537,         0},
+        {1.0000,    0.8293,         0},
+        {1.0000,    0.8049,         0},
+        {1.0000,    0.7805,         0},
+        {1.0000,    0.7561,         0},
+        {1.0000,    0.7317,         0},
+        {1.0000,    0.7073,         0},
+        {1.0000,    0.6829,         0},
+        {1.0000,    0.6585,         0},
+        {1.0000,    0.6341,         0},
+        {1.0000,    0.6098,         0},
+        {1.0000,    0.5854,         0},
+        {1.0000,    0.5610,         0},
+        {1.0000,    0.5366,         0},
+        {1.0000,    0.5122,         0},
+        {1.0000,    0.4878,         0},
+        {1.0000,    0.4634,         0},
+        {1.0000,    0.4390,         0},
+        {1.0000,    0.4146,         0},
+        {1.0000,    0.3902,         0},
+        {1.0000,    0.3659,         0},
+        {1.0000,    0.3415,         0},
+        {1.0000,    0.3171,         0},
+        {1.0000,    0.2927,         0},
+        {1.0000,    0.2683,         0},
+        {1.0000,    0.2439,         0},
+        {1.0000,    0.2195,         0},
+        {1.0000,    0.1951,         0},
+        {1.0000,    0.1707,         0},
+        {1.0000,    0.1463,         0},
+        {1.0000,    0.1220,         0},
+        {1.0000,    0.0976,         0},
+        {1.0000,    0.0732,         0},
+        {1.0000,    0.0488,         0},
+        {1.0000,    0.0244,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0},
+        {1.0000,         0,         0}
+};
+
+
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/LONI2.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/LONI2.h
new file mode 100644
index 0000000..de984b6
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/LONI2.h
@@ -0,0 +1,144 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: LONI2.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar 20 de nov de 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_LONI2_h_
+#define _lut_LONI2_h_
+
+static const float LONI2[120][3] = {
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.000000, 1.000000},
+        {0.000000, 0.111111, 1.000000},
+        {0.000000, 0.222222, 1.000000},
+        {0.000000, 0.333333, 1.000000},
+        {0.000000, 0.444444, 1.000000},
+        {0.000000, 0.555556, 1.000000},
+        {0.000000, 0.666667, 1.000000},
+        {0.000000, 0.777778, 1.000000},
+        {0.000000, 0.888889, 1.000000},
+        {0.000000, 1.000000, 1.000000},
+        {0.000000, 1.000000, 1.000000},
+        {0.000000, 1.000000, 0.888889},
+        {0.000000, 1.000000, 0.777778},
+        {0.000000, 1.000000, 0.666667},
+        {0.000000, 1.000000, 0.555556},
+        {0.000000, 1.000000, 0.444444},
+        {0.000000, 1.000000, 0.333333},
+        {0.000000, 1.000000, 0.222222},
+        {0.000000, 1.000000, 0.111111},
+        {0.000000, 1.000000, 0.000000},
+        {0.000000, 1.000000, 0.000000},
+        {0.111111, 1.000000, 0.000000},
+        {0.222222, 1.000000, 0.000000},
+        {0.333333, 1.000000, 0.000000},
+        {0.444444, 1.000000, 0.000000},
+        {0.555556, 1.000000, 0.000000},
+        {0.666667, 1.000000, 0.000000},
+        {0.777778, 1.000000, 0.000000},
+        {0.888889, 1.000000, 0.000000},
+        {1.000000, 1.000000, 0.000000},
+        {1.000000, 1.000000, 0.000000},
+        {1.000000, 0.947368, 0.000000},
+        {1.000000, 0.894737, 0.000000},
+        {1.000000, 0.842105, 0.000000},
+        {1.000000, 0.789474, 0.000000},
+        {1.000000, 0.736842, 0.000000},
+        {1.000000, 0.684211, 0.000000},
+        {1.000000, 0.631579, 0.000000},
+        {1.000000, 0.578947, 0.000000},
+        {1.000000, 0.526316, 0.000000},
+        {1.000000, 0.473684, 0.000000},
+        {1.000000, 0.421053, 0.000000},
+        {1.000000, 0.368421, 0.000000},
+        {1.000000, 0.315789, 0.000000},
+        {1.000000, 0.263158, 0.000000},
+        {1.000000, 0.210526, 0.000000},
+        {1.000000, 0.157895, 0.000000},
+        {1.000000, 0.105263, 0.000000},
+        {1.000000, 0.052632, 0.000000},
+        {1.000000, 0.000000, 0.000000},
+        {1.000000, 0.000000, 0.000000},
+        {1.000000, 0.000000, 0.052632},
+        {1.000000, 0.000000, 0.105263},
+        {1.000000, 0.000000, 0.157895},
+        {1.000000, 0.000000, 0.210526},
+        {1.000000, 0.000000, 0.263158},
+        {1.000000, 0.000000, 0.315789},
+        {1.000000, 0.000000, 0.368421},
+        {1.000000, 0.000000, 0.421053},
+        {1.000000, 0.000000, 0.473684},
+        {1.000000, 0.000000, 0.526316},
+        {1.000000, 0.000000, 0.578947},
+        {1.000000, 0.000000, 0.631579},
+        {1.000000, 0.000000, 0.684211},
+        {1.000000, 0.000000, 0.736842},
+        {1.000000, 0.000000, 0.789474},
+        {1.000000, 0.000000, 0.842105},
+        {1.000000, 0.000000, 0.894737},
+        {1.000000, 0.000000, 0.947368},
+        {1.000000, 0.000000, 1.000000}
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/PERFUSION.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/PERFUSION.h
new file mode 100644
index 0000000..04ac815
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/PERFUSION.h
@@ -0,0 +1,783 @@
+#ifndef _PERFUSION_H_
+#define _PERFUSION_H_
+
+static const int PERFUSION[3*256]= {
+
+        // Red
+        0,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        6,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        6,
+        8,
+        10,
+        14,
+        16,
+        18,
+        22,
+        24,
+        26,
+        28,
+        32,
+        34,
+        36,
+        40,
+        42,
+        44,
+        48,
+        50,
+        52,
+        54,
+        58,
+        60,
+        62,
+        66,
+        68,
+        70,
+        74,
+        76,
+        78,
+        80,
+        84,
+        86,
+        88,
+        92,
+        94,
+        96,
+        98,
+        102,
+        104,
+        106,
+        110,
+        112,
+        114,
+        118,
+        120,
+        122,
+        124,
+        128,
+        130,
+        132,
+        136,
+        138,
+        140,
+        144,
+        146,
+        148,
+        150,
+        154,
+        156,
+        158,
+        162,
+        164,
+        166,
+        168,
+        172,
+        174,
+        176,
+        180,
+        182,
+        184,
+        188,
+        190,
+        192,
+        194,
+        198,
+        200,
+        202,
+        206,
+        208,
+        210,
+        214,
+        216,
+        218,
+        220,
+        224,
+        226,
+        228,
+        232,
+        234,
+        236,
+        240,
+        242,
+        244,
+        246,
+        250,
+        252,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        254,
+        // Green
+        0,
+        6,
+        8,
+        10,
+        12,
+        14,
+        14,
+        16,
+        18,
+        20,
+        22,
+        22,
+        24,
+        26,
+        28,
+        30,
+        30,
+        32,
+        34,
+        36,
+        38,
+        38,
+        40,
+        42,
+        44,
+        46,
+        46,
+        48,
+        50,
+        52,
+        54,
+        54,
+        56,
+        58,
+        60,
+        62,
+        62,
+        64,
+        66,
+        68,
+        70,
+        70,
+        72,
+        74,
+        76,
+        78,
+        78,
+        76,
+        78,
+        76,
+        76,
+        74,
+        74,
+        72,
+        72,
+        70,
+        68,
+        68,
+        66,
+        66,
+        64,
+        64,
+        62,
+        60,
+        60,
+        58,
+        58,
+        56,
+        56,
+        54,
+        52,
+        52,
+        50,
+        50,
+        48,
+        48,
+        46,
+        46,
+        44,
+        42,
+        42,
+        40,
+        40,
+        38,
+        38,
+        36,
+        34,
+        34,
+        32,
+        32,
+        30,
+        30,
+        28,
+        26,
+        26,
+        24,
+        24,
+        22,
+        22,
+        20,
+        18,
+        18,
+        16,
+        16,
+        14,
+        14,
+        12,
+        12,
+        10,
+        8,
+        8,
+        6,
+        6,
+        4,
+        4,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        2,
+        0,
+        4,
+        6,
+        10,
+        12,
+        14,
+        18,
+        20,
+        22,
+        26,
+        28,
+        30,
+        34,
+        36,
+        38,
+        42,
+        44,
+        46,
+        50,
+        52,
+        54,
+        58,
+        60,
+        62,
+        66,
+        68,
+        70,
+        74,
+        76,
+        78,
+        82,
+        84,
+        86,
+        90,
+        92,
+        94,
+        98,
+        100,
+        102,
+        106,
+        108,
+        110,
+        114,
+        116,
+        118,
+        122,
+        124,
+        126,
+        130,
+        132,
+        134,
+        138,
+        140,
+        142,
+        146,
+        148,
+        150,
+        154,
+        156,
+        158,
+        162,
+        164,
+        166,
+        170,
+        172,
+        174,
+        178,
+        180,
+        182,
+        186,
+        188,
+        190,
+        194,
+        196,
+        198,
+        202,
+        204,
+        206,
+        210,
+        212,
+        214,
+        218,
+        220,
+        222,
+        226,
+        228,
+        230,
+        234,
+        236,
+        238,
+        242,
+        244,
+        246,
+        250,
+        252,
+        254,
+        //Blue
+        0,
+        6,
+        12,
+        16,
+        22,
+        26,
+        32,
+        36,
+        42,
+        46,
+        52,
+        56,
+        62,
+        68,
+        72,
+        78,
+        82,
+        88,
+        92,
+        98,
+        102,
+        108,
+        112,
+        118,
+        122,
+        128,
+        134,
+        138,
+        144,
+        148,
+        154,
+        158,
+        164,
+        168,
+        174,
+        178,
+        184,
+        188,
+        194,
+        200,
+        204,
+        210,
+        214,
+        220,
+        224,
+        230,
+        234,
+        240,
+        244,
+        250,
+        252,
+        250,
+        246,
+        244,
+        240,
+        238,
+        234,
+        232,
+        230,
+        226,
+        224,
+        220,
+        218,
+        214,
+        212,
+        210,
+        206,
+        204,
+        200,
+        198,
+        194,
+        192,
+        190,
+        186,
+        184,
+        180,
+        178,
+        174,
+        172,
+        170,
+        166,
+        164,
+        160,
+        158,
+        154,
+        152,
+        150,
+        146,
+        144,
+        140,
+        138,
+        134,
+        132,
+        130,
+        126,
+        124,
+        120,
+        118,
+        114,
+        112,
+        110,
+        106,
+        104,
+        100,
+        98,
+        94,
+        92,
+        90,
+        86,
+        84,
+        80,
+        78,
+        74,
+        72,
+        70,
+        66,
+        64,
+        60,
+        58,
+        54,
+        52,
+        50,
+        46,
+        44,
+        40,
+        38,
+        34,
+        32,
+        30,
+        26,
+        24,
+        20,
+        18,
+        14,
+        12,
+        10,
+        6,
+        4,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        14,
+        28,
+        42,
+        56,
+        68,
+        82,
+        96,
+        110,
+        124,
+        136,
+        150,
+        164,
+        178,
+        190,
+
+
+
+
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/Spectrum.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/Spectrum.h
new file mode 100644
index 0000000..b00093f
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/Spectrum.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: Spectrum.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar 20 de nov de 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_Spectrum_h_
+#define _lut_Spectrum_h_
+
+static const int Spectrum[256*3]= {
+        255,
+        250,
+        245,
+        240,
+        235,
+        230,
+        225,
+        220,
+        215,
+        210,
+        205,
+        200,
+        195,
+        190,
+        185,
+        180,
+        175,
+        170,
+        165,
+        160,
+        155,
+        150,
+        145,
+        140,
+        135,
+        130,
+        125,
+        120,
+        115,
+        110,
+        105,
+        100,
+        95,
+        90,
+        85,
+        80,
+        75,
+        70,
+        65,
+        60,
+        55,
+        50,
+        45,
+        40,
+        35,
+        30,
+        25,
+        20,
+        15,
+        10,
+        5,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        5,
+        10,
+        15,
+        20,
+        25,
+        30,
+        35,
+        40,
+        45,
+        50,
+        55,
+        60,
+        65,
+        70,
+        75,
+        80,
+        85,
+        90,
+        95,
+        100,
+        105,
+        110,
+        115,
+        120,
+        125,
+        130,
+        135,
+        140,
+        145,
+        150,
+        155,
+        160,
+        165,
+        170,
+        175,
+        180,
+        185,
+        190,
+        195,
+        200,
+        205,
+        210,
+        215,
+        220,
+        225,
+        230,
+        235,
+        240,
+        245,
+        250,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        5,
+        10,
+        15,
+        20,
+        25,
+        30,
+        35,
+        40,
+        45,
+        50,
+        55,
+        60,
+        65,
+        70,
+        75,
+        80,
+        85,
+        90,
+        95,
+        100,
+        105,
+        110,
+        115,
+        120,
+        125,
+        130,
+        135,
+        140,
+        145,
+        150,
+        155,
+        160,
+        165,
+        170,
+        175,
+        180,
+        185,
+        190,
+        195,
+        200,
+        205,
+        210,
+        215,
+        220,
+        225,
+        230,
+        235,
+        240,
+        245,
+        251,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        250,
+        245,
+        240,
+        235,
+        230,
+        225,
+        220,
+        215,
+        210,
+        205,
+        200,
+        195,
+        190,
+        185,
+        180,
+        175,
+        170,
+        165,
+        160,
+        155,
+        150,
+        145,
+        140,
+        135,
+        130,
+        125,
+        120,
+        115,
+        110,
+        105,
+        100,
+        95,
+        90,
+        85,
+        80,
+        75,
+        70,
+        65,
+        60,
+        55,
+        50,
+        45,
+        40,
+        35,
+        30,
+        25,
+        20,
+        15,
+        10,
+        5,
+        0,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        250,
+        245,
+        240,
+        235,
+        230,
+        225,
+        220,
+        215,
+        210,
+        205,
+        200,
+        195,
+        190,
+        185,
+        180,
+        175,
+        170,
+        165,
+        160,
+        155,
+        150,
+        145,
+        140,
+        135,
+        130,
+        125,
+        120,
+        115,
+        110,
+        105,
+        100,
+        95,
+        90,
+        85,
+        80,
+        75,
+        70,
+        65,
+        60,
+        55,
+        50,
+        45,
+        40,
+        35,
+        30,
+        25,
+        20,
+        15,
+        10,
+        5,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/Stern.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/Stern.h
new file mode 100644
index 0000000..a6c1eb2
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/Stern.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: HotMetal.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar, 20 nov 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_stern_h_
+#define _lut_stern_h_
+
+static const int Stern[256*3]= {
+        0,
+        18,
+        36,
+        54,
+        72,
+        90,
+        108,
+        127,
+        145,
+        163,
+        181,
+        199,
+        217,
+        235,
+        254,
+        249,
+        244,
+        239,
+        234,
+        229,
+        223,
+        218,
+        213,
+        208,
+        203,
+        197,
+        192,
+        187,
+        182,
+        177,
+        172,
+        166,
+        161,
+        156,
+        151,
+        146,
+        140,
+        135,
+        130,
+        125,
+        120,
+        115,
+        109,
+        104,
+        99,
+        94,
+        89,
+        83,
+        78,
+        73,
+        68,
+        63,
+        58,
+        52,
+        47,
+        42,
+        37,
+        32,
+        26,
+        21,
+        16,
+        11,
+        6,
+        0,
+        64,
+        65,
+        66,
+        67,
+        68,
+        69,
+        70,
+        71,
+        72,
+        73,
+        74,
+        75,
+        76,
+        77,
+        78,
+        79,
+        80,
+        81,
+        82,
+        83,
+        84,
+        85,
+        86,
+        87,
+        88,
+        89,
+        90,
+        91,
+        92,
+        93,
+        94,
+        95,
+        96,
+        97,
+        98,
+        99,
+        100,
+        101,
+        102,
+        103,
+        104,
+        105,
+        106,
+        107,
+        108,
+        109,
+        110,
+        111,
+        112,
+        113,
+        114,
+        115,
+        116,
+        117,
+        118,
+        119,
+        120,
+        121,
+        122,
+        123,
+        124,
+        125,
+        126,
+        127,
+        128,
+        129,
+        130,
+        131,
+        132,
+        133,
+        134,
+        135,
+        136,
+        137,
+        138,
+        139,
+        140,
+        141,
+        142,
+        143,
+        144,
+        145,
+        146,
+        147,
+        148,
+        149,
+        150,
+        151,
+        152,
+        153,
+        154,
+        155,
+        156,
+        157,
+        158,
+        159,
+        160,
+        161,
+        162,
+        163,
+        164,
+        165,
+        166,
+        167,
+        168,
+        169,
+        170,
+        171,
+        172,
+        173,
+        174,
+        175,
+        176,
+        177,
+        178,
+        179,
+        180,
+        181,
+        182,
+        183,
+        184,
+        185,
+        186,
+        187,
+        188,
+        189,
+        190,
+        191,
+        192,
+        193,
+        194,
+        195,
+        196,
+        197,
+        198,
+        199,
+        200,
+        201,
+        202,
+        203,
+        204,
+        205,
+        206,
+        207,
+        208,
+        209,
+        210,
+        211,
+        212,
+        213,
+        214,
+        215,
+        216,
+        217,
+        218,
+        219,
+        220,
+        221,
+        222,
+        223,
+        224,
+        225,
+        226,
+        227,
+        228,
+        229,
+        230,
+        231,
+        232,
+        233,
+        234,
+        235,
+        236,
+        237,
+        238,
+        239,
+        240,
+        241,
+        242,
+        243,
+        244,
+        245,
+        246,
+        247,
+        248,
+        249,
+        250,
+        251,
+        252,
+        253,
+        254,
+        255,
+        0,
+        1,
+        2,
+        3,
+        4,
+        5,
+        6,
+        7,
+        8,
+        9,
+        10,
+        11,
+        12,
+        13,
+        14,
+        15,
+        16,
+        17,
+        18,
+        19,
+        20,
+        21,
+        22,
+        23,
+        24,
+        25,
+        26,
+        27,
+        28,
+        29,
+        30,
+        31,
+        32,
+        33,
+        34,
+        35,
+        36,
+        37,
+        38,
+        39,
+        40,
+        41,
+        42,
+        43,
+        44,
+        45,
+        46,
+        47,
+        48,
+        49,
+        50,
+        51,
+        52,
+        53,
+        54,
+        55,
+        56,
+        57,
+        58,
+        59,
+        60,
+        61,
+        62,
+        63,
+        64,
+        65,
+        66,
+        67,
+        68,
+        69,
+        70,
+        71,
+        72,
+        73,
+        74,
+        75,
+        76,
+        77,
+        78,
+        79,
+        80,
+        81,
+        82,
+        83,
+        84,
+        85,
+        86,
+        87,
+        88,
+        89,
+        90,
+        91,
+        92,
+        93,
+        94,
+        95,
+        96,
+        97,
+        98,
+        99,
+        100,
+        101,
+        102,
+        103,
+        104,
+        105,
+        106,
+        107,
+        108,
+        109,
+        110,
+        111,
+        112,
+        113,
+        114,
+        115,
+        116,
+        117,
+        118,
+        119,
+        120,
+        121,
+        122,
+        123,
+        124,
+        125,
+        126,
+        127,
+        128,
+        129,
+        130,
+        131,
+        132,
+        133,
+        134,
+        135,
+        136,
+        137,
+        138,
+        139,
+        140,
+        141,
+        142,
+        143,
+        144,
+        145,
+        146,
+        147,
+        148,
+        149,
+        150,
+        151,
+        152,
+        153,
+        154,
+        155,
+        156,
+        157,
+        158,
+        159,
+        160,
+        161,
+        162,
+        163,
+        164,
+        165,
+        166,
+        167,
+        168,
+        169,
+        170,
+        171,
+        172,
+        173,
+        174,
+        175,
+        176,
+        177,
+        178,
+        179,
+        180,
+        181,
+        182,
+        183,
+        184,
+        185,
+        186,
+        187,
+        188,
+        189,
+        190,
+        191,
+        192,
+        193,
+        194,
+        195,
+        196,
+        197,
+        198,
+        199,
+        200,
+        201,
+        202,
+        203,
+        204,
+        205,
+        206,
+        207,
+        208,
+        209,
+        210,
+        211,
+        212,
+        213,
+        214,
+        215,
+        216,
+        217,
+        218,
+        219,
+        220,
+        221,
+        222,
+        223,
+        224,
+        225,
+        226,
+        227,
+        228,
+        229,
+        230,
+        231,
+        232,
+        233,
+        234,
+        235,
+        236,
+        237,
+        238,
+        239,
+        240,
+        241,
+        242,
+        243,
+        244,
+        245,
+        246,
+        247,
+        248,
+        249,
+        250,
+        251,
+        252,
+        253,
+        254,
+        255,
+        0,
+        1,
+        3,
+        5,
+        7,
+        9,
+        11,
+        13,
+        15,
+        17,
+        19,
+        21,
+        23,
+        25,
+        27,
+        29,
+        31,
+        33,
+        35,
+        37,
+        39,
+        41,
+        43,
+        45,
+        47,
+        49,
+        51,
+        53,
+        55,
+        57,
+        59,
+        61,
+        63,
+        65,
+        67,
+        69,
+        71,
+        73,
+        75,
+        77,
+        79,
+        81,
+        83,
+        85,
+        87,
+        89,
+        91,
+        93,
+        95,
+        97,
+        99,
+        101,
+        103,
+        105,
+        107,
+        109,
+        111,
+        113,
+        115,
+        117,
+        119,
+        121,
+        123,
+        125,
+        127,
+        129,
+        131,
+        133,
+        135,
+        137,
+        139,
+        141,
+        143,
+        145,
+        147,
+        149,
+        151,
+        153,
+        155,
+        157,
+        159,
+        161,
+        163,
+        165,
+        167,
+        169,
+        171,
+        173,
+        175,
+        177,
+        179,
+        181,
+        183,
+        185,
+        187,
+        189,
+        191,
+        193,
+        195,
+        197,
+        199,
+        201,
+        203,
+        205,
+        207,
+        209,
+        211,
+        213,
+        215,
+        217,
+        219,
+        221,
+        223,
+        225,
+        227,
+        229,
+        231,
+        233,
+        235,
+        237,
+        239,
+        241,
+        243,
+        245,
+        247,
+        249,
+        251,
+        253,
+        255,
+        251,
+        247,
+        243,
+        238,
+        234,
+        230,
+        226,
+        221,
+        217,
+        213,
+        209,
+        204,
+        200,
+        196,
+        192,
+        187,
+        183,
+        179,
+        175,
+        170,
+        166,
+        162,
+        158,
+        153,
+        149,
+        145,
+        141,
+        136,
+        132,
+        128,
+        124,
+        119,
+        115,
+        111,
+        107,
+        102,
+        98,
+        94,
+        90,
+        85,
+        81,
+        77,
+        73,
+        68,
+        64,
+        60,
+        56,
+        51,
+        47,
+        43,
+        39,
+        34,
+        30,
+        26,
+        22,
+        17,
+        13,
+        9,
+        5,
+        0,
+        3,
+        7,
+        11,
+        15,
+        19,
+        22,
+        26,
+        30,
+        34,
+        38,
+        41,
+        45,
+        49,
+        53,
+        57,
+        60,
+        64,
+        68,
+        72,
+        76,
+        79,
+        83,
+        87,
+        91,
+        95,
+        98,
+        102,
+        106,
+        110,
+        114,
+        117,
+        121,
+        125,
+        129,
+        133,
+        137,
+        140,
+        144,
+        148,
+        152,
+        156,
+        159,
+        163,
+        167,
+        171,
+        175,
+        178,
+        182,
+        186,
+        190,
+        194,
+        197,
+        201,
+        205,
+        209,
+        213,
+        216,
+        220,
+        224,
+        228,
+        232,
+        235,
+        239,
+        243,
+        247,
+        251,
+        255
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/VRBones.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/VRBones.h
new file mode 100644
index 0000000..0e43717
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/VRBones.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: HotMetal.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar, 20 nov 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_vrBones_h_
+#define _lut_vrBones_h_
+
+static const int VRBones[256*3]= {
+        0,
+        1,
+        3,
+        5,
+        7,
+        8,
+        10,
+        12,
+        14,
+        15,
+        17,
+        19,
+        21,
+        22,
+        24,
+        26,
+        28,
+        29,
+        31,
+        33,
+        35,
+        37,
+        38,
+        40,
+        42,
+        44,
+        45,
+        47,
+        49,
+        51,
+        52,
+        54,
+        56,
+        58,
+        59,
+        61,
+        63,
+        65,
+        67,
+        68,
+        70,
+        72,
+        74,
+        75,
+        77,
+        79,
+        81,
+        82,
+        84,
+        86,
+        88,
+        89,
+        91,
+        93,
+        95,
+        96,
+        98,
+        100,
+        102,
+        104,
+        105,
+        107,
+        109,
+        111,
+        112,
+        114,
+        116,
+        118,
+        119,
+        121,
+        123,
+        125,
+        126,
+        128,
+        130,
+        132,
+        134,
+        135,
+        137,
+        139,
+        141,
+        142,
+        144,
+        146,
+        148,
+        149,
+        151,
+        153,
+        155,
+        156,
+        158,
+        160,
+        162,
+        164,
+        165,
+        167,
+        169,
+        171,
+        172,
+        174,
+        176,
+        178,
+        179,
+        181,
+        183,
+        185,
+        186,
+        188,
+        190,
+        192,
+        193,
+        195,
+        197,
+        199,
+        201,
+        202,
+        204,
+        206,
+        208,
+        209,
+        211,
+        213,
+        215,
+        216,
+        217,
+        217,
+        218,
+        218,
+        219,
+        219,
+        220,
+        220,
+        221,
+        221,
+        222,
+        222,
+        223,
+        223,
+        224,
+        224,
+        225,
+        225,
+        226,
+        226,
+        227,
+        227,
+        228,
+        228,
+        229,
+        229,
+        230,
+        230,
+        231,
+        231,
+        232,
+        232,
+        233,
+        233,
+        234,
+        234,
+        235,
+        235,
+        236,
+        236,
+        237,
+        237,
+        238,
+        238,
+        239,
+        239,
+        240,
+        240,
+        241,
+        241,
+        242,
+        242,
+        243,
+        243,
+        244,
+        244,
+        245,
+        245,
+        246,
+        246,
+        247,
+        247,
+        248,
+        248,
+        249,
+        249,
+        250,
+        250,
+        251,
+        251,
+        252,
+        252,
+        253,
+        253,
+        254,
+        254,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        0,
+        1,
+        2,
+        3,
+        4,
+        6,
+        7,
+        8,
+        9,
+        11,
+        12,
+        13,
+        14,
+        16,
+        17,
+        18,
+        19,
+        20,
+        22,
+        23,
+        24,
+        25,
+        27,
+        28,
+        29,
+        30,
+        32,
+        33,
+        34,
+        35,
+        37,
+        38,
+        39,
+        40,
+        41,
+        43,
+        44,
+        45,
+        46,
+        48,
+        49,
+        50,
+        51,
+        53,
+        54,
+        55,
+        56,
+        57,
+        59,
+        60,
+        61,
+        62,
+        64,
+        65,
+        66,
+        67,
+        69,
+        70,
+        71,
+        72,
+        74,
+        75,
+        76,
+        77,
+        78,
+        80,
+        81,
+        82,
+        83,
+        85,
+        86,
+        87,
+        88,
+        90,
+        91,
+        92,
+        93,
+        94,
+        96,
+        97,
+        98,
+        99,
+        101,
+        102,
+        103,
+        104,
+        106,
+        107,
+        108,
+        109,
+        111,
+        112,
+        113,
+        114,
+        115,
+        117,
+        118,
+        119,
+        120,
+        122,
+        123,
+        124,
+        125,
+        127,
+        128,
+        129,
+        130,
+        131,
+        133,
+        134,
+        135,
+        136,
+        138,
+        139,
+        140,
+        141,
+        143,
+        144,
+        145,
+        146,
+        148,
+        149,
+        150,
+        151,
+        152,
+        153,
+        153,
+        154,
+        154,
+        155,
+        156,
+        156,
+        157,
+        158,
+        158,
+        159,
+        160,
+        160,
+        161,
+        162,
+        162,
+        163,
+        164,
+        164,
+        165,
+        166,
+        166,
+        167,
+        168,
+        168,
+        169,
+        170,
+        170,
+        171,
+        172,
+        172,
+        173,
+        174,
+        174,
+        175,
+        175,
+        176,
+        177,
+        177,
+        178,
+        179,
+        179,
+        180,
+        181,
+        181,
+        182,
+        183,
+        183,
+        184,
+        185,
+        185,
+        186,
+        187,
+        187,
+        188,
+        189,
+        189,
+        190,
+        191,
+        191,
+        192,
+        193,
+        193,
+        194,
+        195,
+        195,
+        196,
+        196,
+        197,
+        198,
+        198,
+        199,
+        200,
+        200,
+        201,
+        202,
+        203,
+        204,
+        205,
+        206,
+        207,
+        208,
+        209,
+        210,
+        211,
+        213,
+        214,
+        215,
+        216,
+        217,
+        218,
+        219,
+        220,
+        221,
+        222,
+        223,
+        224,
+        226,
+        227,
+        228,
+        229,
+        230,
+        231,
+        232,
+        233,
+        234,
+        235,
+        236,
+        237,
+        239,
+        240,
+        241,
+        242,
+        243,
+        244,
+        245,
+        246,
+        247,
+        248,
+        249,
+        250,
+        251,
+        251,
+        252,
+        252,
+        252,
+        253,
+        253,
+        253,
+        254,
+        254,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        2,
+        2,
+        2,
+        2,
+        3,
+        3,
+        3,
+        4,
+        4,
+        4,
+        4,
+        5,
+        5,
+        5,
+        6,
+        6,
+        6,
+        6,
+        7,
+        7,
+        7,
+        8,
+        8,
+        8,
+        9,
+        9,
+        9,
+        9,
+        10,
+        10,
+        10,
+        11,
+        11,
+        11,
+        11,
+        12,
+        12,
+        12,
+        13,
+        13,
+        13,
+        13,
+        14,
+        14,
+        14,
+        15,
+        15,
+        15,
+        16,
+        16,
+        16,
+        16,
+        17,
+        17,
+        17,
+        18,
+        18,
+        18,
+        18,
+        19,
+        19,
+        19,
+        20,
+        20,
+        20,
+        20,
+        21,
+        21,
+        21,
+        22,
+        22,
+        22,
+        23,
+        23,
+        23,
+        23,
+        24,
+        24,
+        24,
+        25,
+        25,
+        25,
+        25,
+        26,
+        26,
+        26,
+        27,
+        27,
+        27,
+        27,
+        28,
+        28,
+        28,
+        29,
+        29,
+        29,
+        29,
+        30,
+        30,
+        30,
+        31,
+        31,
+        31,
+        32,
+        32,
+        32,
+        32,
+        33,
+        33,
+        33,
+        34,
+        34,
+        34,
+        34,
+        35,
+        35,
+        35,
+        36,
+        36,
+        36,
+        36,
+        36,
+        37,
+        37,
+        37,
+        37,
+        37,
+        38,
+        38,
+        38,
+        38,
+        39,
+        39,
+        39,
+        39,
+        39,
+        40,
+        40,
+        40,
+        40,
+        40,
+        41,
+        41,
+        41,
+        41,
+        42,
+        42,
+        42,
+        42,
+        42,
+        43,
+        43,
+        43,
+        43,
+        44,
+        44,
+        44,
+        44,
+        44,
+        45,
+        45,
+        45,
+        45,
+        45,
+        46,
+        46,
+        46,
+        46,
+        47,
+        47,
+        47,
+        47,
+        47,
+        48,
+        48,
+        48,
+        48,
+        48,
+        49,
+        49,
+        49,
+        49,
+        50,
+        50,
+        50,
+        50,
+        50,
+        51,
+        51,
+        51,
+        51,
+        51,
+        52,
+        52,
+        52,
+        53,
+        53,
+        53,
+        54,
+        54,
+        54,
+        55,
+        55,
+        55,
+        56,
+        56,
+        56,
+        56,
+        57,
+        57,
+        57,
+        58,
+        58,
+        58,
+        59,
+        59,
+        59,
+        60,
+        60,
+        60,
+        61,
+        61,
+        61,
+        62,
+        62,
+        62,
+        63,
+        63,
+        63,
+        64,
+        64,
+        64,
+        65,
+        65,
+        65,
+        66,
+        66,
+        66,
+        67,
+        84,
+        101,
+        118,
+        135,
+        152,
+        169,
+        186,
+        203,
+        220,
+        237
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/VRMusclesBones.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/VRMusclesBones.h
new file mode 100644
index 0000000..571a177
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/VRMusclesBones.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: HotMetal.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar, 20 nov 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_vrMusclesBones_h_
+#define _lut_vrMusclesBones_h_
+
+static const int VRMusclesBones[256*3]= {
+        0,
+        2,
+        5,
+        8,
+        10,
+        13,
+        16,
+        18,
+        21,
+        24,
+        26,
+        29,
+        32,
+        34,
+        37,
+        40,
+        42,
+        45,
+        48,
+        51,
+        53,
+        56,
+        59,
+        61,
+        64,
+        67,
+        69,
+        72,
+        75,
+        77,
+        80,
+        83,
+        85,
+        88,
+        91,
+        93,
+        96,
+        99,
+        102,
+        104,
+        107,
+        110,
+        112,
+        115,
+        118,
+        120,
+        123,
+        126,
+        128,
+        131,
+        134,
+        136,
+        139,
+        142,
+        144,
+        147,
+        150,
+        153,
+        155,
+        158,
+        161,
+        163,
+        166,
+        169,
+        171,
+        174,
+        177,
+        179,
+        182,
+        185,
+        187,
+        190,
+        193,
+        195,
+        198,
+        201,
+        204,
+        206,
+        209,
+        212,
+        214,
+        217,
+        220,
+        222,
+        225,
+        228,
+        230,
+        233,
+        236,
+        238,
+        241,
+        244,
+        246,
+        249,
+        252,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        1,
+        2,
+        2,
+        2,
+        2,
+        3,
+        3,
+        3,
+        3,
+        3,
+        4,
+        4,
+        4,
+        4,
+        5,
+        5,
+        5,
+        5,
+        6,
+        6,
+        6,
+        6,
+        6,
+        7,
+        7,
+        7,
+        7,
+        8,
+        8,
+        8,
+        8,
+        9,
+        9,
+        9,
+        9,
+        9,
+        10,
+        10,
+        10,
+        10,
+        11,
+        11,
+        11,
+        11,
+        12,
+        12,
+        12,
+        12,
+        12,
+        13,
+        13,
+        13,
+        13,
+        14,
+        14,
+        14,
+        14,
+        15,
+        15,
+        15,
+        15,
+        15,
+        16,
+        16,
+        16,
+        16,
+        17,
+        17,
+        17,
+        17,
+        18,
+        18,
+        18,
+        18,
+        18,
+        19,
+        19,
+        19,
+        19,
+        20,
+        20,
+        20,
+        20,
+        21,
+        21,
+        21,
+        21,
+        21,
+        24,
+        27,
+        30,
+        33,
+        36,
+        39,
+        42,
+        45,
+        48,
+        51,
+        54,
+        57,
+        60,
+        63,
+        66,
+        69,
+        72,
+        75,
+        78,
+        81,
+        84,
+        87,
+        90,
+        93,
+        96,
+        99,
+        102,
+        105,
+        108,
+        111,
+        114,
+        117,
+        120,
+        123,
+        126,
+        129,
+        131,
+        134,
+        137,
+        140,
+        143,
+        146,
+        149,
+        152,
+        155,
+        158,
+        161,
+        164,
+        167,
+        170,
+        173,
+        176,
+        177,
+        179,
+        180,
+        181,
+        182,
+        183,
+        185,
+        186,
+        187,
+        188,
+        189,
+        191,
+        192,
+        193,
+        194,
+        195,
+        197,
+        198,
+        199,
+        200,
+        201,
+        203,
+        204,
+        205,
+        206,
+        207,
+        209,
+        210,
+        211,
+        212,
+        213,
+        215,
+        216,
+        217,
+        218,
+        220,
+        221,
+        222,
+        223,
+        224,
+        226,
+        227,
+        228,
+        229,
+        230,
+        232,
+        233,
+        234,
+        235,
+        236,
+        238,
+        239,
+        240,
+        241,
+        241,
+        242,
+        242,
+        242,
+        242,
+        243,
+        243,
+        243,
+        243,
+        244,
+        244,
+        244,
+        244,
+        245,
+        245,
+        245,
+        245,
+        246,
+        246,
+        246,
+        246,
+        247,
+        247,
+        247,
+        247,
+        248,
+        248,
+        248,
+        248,
+        248,
+        249,
+        249,
+        249,
+        249,
+        250,
+        250,
+        250,
+        250,
+        251,
+        251,
+        251,
+        251,
+        252,
+        252,
+        252,
+        252,
+        253,
+        253,
+        253,
+        253,
+        254,
+        254,
+        254,
+        254,
+        0,
+        0,
+        0,
+        0,
+        1,
+        1,
+        1,
+        2,
+        2,
+        2,
+        2,
+        3,
+        3,
+        3,
+        4,
+        4,
+        4,
+        5,
+        5,
+        5,
+        5,
+        6,
+        6,
+        6,
+        7,
+        7,
+        7,
+        7,
+        8,
+        8,
+        8,
+        9,
+        9,
+        9,
+        10,
+        10,
+        10,
+        10,
+        11,
+        11,
+        11,
+        12,
+        12,
+        12,
+        12,
+        13,
+        13,
+        13,
+        14,
+        14,
+        14,
+        15,
+        15,
+        15,
+        15,
+        16,
+        16,
+        16,
+        17,
+        17,
+        17,
+        17,
+        18,
+        18,
+        18,
+        19,
+        19,
+        19,
+        20,
+        20,
+        20,
+        20,
+        21,
+        21,
+        21,
+        22,
+        22,
+        22,
+        22,
+        23,
+        23,
+        23,
+        24,
+        24,
+        24,
+        25,
+        25,
+        25,
+        25,
+        26,
+        26,
+        26,
+        27,
+        27,
+        27,
+        27,
+        27,
+        27,
+        26,
+        26,
+        26,
+        25,
+        25,
+        25,
+        24,
+        24,
+        24,
+        23,
+        23,
+        22,
+        22,
+        22,
+        21,
+        21,
+        21,
+        20,
+        20,
+        20,
+        19,
+        19,
+        19,
+        18,
+        18,
+        18,
+        17,
+        17,
+        16,
+        16,
+        16,
+        15,
+        15,
+        15,
+        14,
+        14,
+        14,
+        13,
+        13,
+        13,
+        12,
+        12,
+        11,
+        11,
+        11,
+        10,
+        10,
+        10,
+        9,
+        9,
+        10,
+        10,
+        11,
+        11,
+        12,
+        12,
+        13,
+        13,
+        14,
+        15,
+        15,
+        16,
+        16,
+        17,
+        17,
+        18,
+        18,
+        19,
+        19,
+        20,
+        21,
+        21,
+        22,
+        22,
+        23,
+        23,
+        24,
+        24,
+        25,
+        26,
+        26,
+        27,
+        27,
+        28,
+        28,
+        29,
+        29,
+        30,
+        31,
+        31,
+        32,
+        32,
+        33,
+        33,
+        34,
+        34,
+        35,
+        36,
+        36,
+        37,
+        37,
+        38,
+        38,
+        39,
+        43,
+        47,
+        51,
+        55,
+        58,
+        62,
+        66,
+        70,
+        74,
+        78,
+        82,
+        86,
+        90,
+        94,
+        98,
+        102,
+        105,
+        109,
+        113,
+        117,
+        121,
+        125,
+        129,
+        133,
+        137,
+        141,
+        145,
+        149,
+        153,
+        156,
+        160,
+        164,
+        168,
+        172,
+        176,
+        180,
+        184,
+        188,
+        192,
+        196,
+        200,
+        204,
+        207,
+        211,
+        215,
+        219,
+        223,
+        227,
+        231,
+        235,
+        239,
+        243,
+        247,
+        251
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/lut/VRRedVessels.h b/cadxcore/VTKInria3D/vtkVISUManagement/lut/VRRedVessels.h
new file mode 100644
index 0000000..8a61480
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/lut/VRRedVessels.h
@@ -0,0 +1,792 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: HotMetal.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2007-11-20 18:46:10 +0100 (mar, 20 nov 2007) $
+Version:   $Revision: 477 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _lut_vrRedVessels_h_
+#define _lut_vrRedVessels_h_
+
+static const int VRRedVessels[256*3]= {
+        0,
+        1,
+        2,
+        3,
+        5,
+        6,
+        7,
+        9,
+        10,
+        11,
+        12,
+        14,
+        15,
+        16,
+        18,
+        19,
+        20,
+        21,
+        23,
+        24,
+        25,
+        27,
+        28,
+        29,
+        30,
+        32,
+        33,
+        34,
+        36,
+        37,
+        38,
+        39,
+        41,
+        42,
+        43,
+        45,
+        46,
+        47,
+        49,
+        50,
+        51,
+        52,
+        54,
+        55,
+        56,
+        58,
+        59,
+        60,
+        61,
+        63,
+        64,
+        65,
+        67,
+        68,
+        69,
+        70,
+        72,
+        73,
+        74,
+        76,
+        77,
+        78,
+        79,
+        81,
+        82,
+        83,
+        85,
+        86,
+        87,
+        88,
+        90,
+        91,
+        92,
+        94,
+        95,
+        96,
+        98,
+        99,
+        100,
+        101,
+        103,
+        104,
+        105,
+        107,
+        108,
+        109,
+        110,
+        112,
+        113,
+        114,
+        116,
+        117,
+        118,
+        119,
+        121,
+        122,
+        123,
+        125,
+        126,
+        127,
+        128,
+        130,
+        131,
+        132,
+        134,
+        135,
+        136,
+        137,
+        139,
+        140,
+        141,
+        143,
+        144,
+        145,
+        147,
+        148,
+        149,
+        150,
+        152,
+        153,
+        154,
+        156,
+        157,
+        158,
+        159,
+        161,
+        162,
+        163,
+        165,
+        166,
+        167,
+        168,
+        170,
+        171,
+        172,
+        174,
+        175,
+        176,
+        177,
+        179,
+        180,
+        181,
+        183,
+        184,
+        185,
+        186,
+        188,
+        189,
+        190,
+        192,
+        193,
+        194,
+        196,
+        197,
+        198,
+        199,
+        200,
+        201,
+        202,
+        203,
+        204,
+        206,
+        207,
+        208,
+        209,
+        210,
+        211,
+        212,
+        213,
+        214,
+        215,
+        216,
+        217,
+        219,
+        220,
+        221,
+        222,
+        223,
+        224,
+        225,
+        226,
+        227,
+        228,
+        229,
+        231,
+        232,
+        233,
+        234,
+        235,
+        236,
+        237,
+        238,
+        239,
+        240,
+        241,
+        243,
+        244,
+        245,
+        246,
+        247,
+        248,
+        249,
+        250,
+        251,
+        252,
+        253,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        255,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        3,
+        5,
+        6,
+        8,
+        10,
+        11,
+        13,
+        15,
+        16,
+        18,
+        20,
+        21,
+        23,
+        25,
+        26,
+        28,
+        30,
+        32,
+        33,
+        35,
+        37,
+        38,
+        40,
+        42,
+        43,
+        45,
+        47,
+        48,
+        50,
+        52,
+        53,
+        55,
+        57,
+        59,
+        60,
+        62,
+        64,
+        65,
+        67,
+        69,
+        70,
+        72,
+        74,
+        75,
+        77,
+        79,
+        80,
+        82,
+        84,
+        86,
+        87,
+        89,
+        91,
+        93,
+        95,
+        97,
+        99,
+        101,
+        103,
+        105,
+        107,
+        109,
+        111,
+        113,
+        115,
+        117,
+        119,
+        121,
+        124,
+        126,
+        128,
+        130,
+        132,
+        134,
+        136,
+        138,
+        140,
+        142,
+        144,
+        146,
+        148,
+        150,
+        152,
+        154,
+        156,
+        158,
+        164,
+        170,
+        176,
+        182,
+        188,
+        194,
+        200,
+        206,
+        212,
+        218,
+        224,
+        230,
+        236,
+        242,
+        248,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        0,
+        1,
+        2,
+        3,
+        4,
+        5,
+        6,
+        7,
+        8,
+        9,
+        10,
+        11,
+        12,
+        13,
+        14,
+        15,
+        16,
+        17,
+        18,
+        19,
+        20,
+        21,
+        22,
+        23,
+        24,
+        25,
+        26,
+        27,
+        28,
+        29,
+        30,
+        31,
+        32,
+        33,
+        34,
+        35,
+        36,
+        37,
+        38,
+        39,
+        40,
+        41,
+        42,
+        43,
+        44,
+        45,
+        46,
+        47,
+        48,
+        49,
+        50,
+        51,
+        52,
+        53,
+        55,
+        57,
+        59,
+        61,
+        64,
+        66,
+        68,
+        70,
+        72,
+        75,
+        77,
+        79,
+        81,
+        84,
+        86,
+        88,
+        90,
+        92,
+        95,
+        97,
+        99,
+        101,
+        103,
+        106,
+        108,
+        110,
+        112,
+        114,
+        117,
+        119,
+        121,
+        123,
+        126,
+        128,
+        136,
+        144,
+        152,
+        159,
+        167,
+        175,
+        183,
+        191,
+        199,
+        207,
+        215,
+        223,
+        231,
+        239,
+        247
+};
+
+#endif
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp b/cadxcore/VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp
new file mode 100644
index 0000000..087a0a1
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp
@@ -0,0 +1,617 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: vtkLookupTableManager.cpp $
+Language:  C++
+Author:    $Author: ntoussaint $
+Date:      $Date: 2008-05-20 18:57:09 +0200 (mar, 20 may 2008) $
+Version:   $Revision: 842 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <api/internationalization/internationalization.h>
+#include "vtkLookupTableManager.h"
+#include <vtkObjectFactory.h>
+
+vtkStandardNewMacro(vtkLookupTableManager);
+#include "lut/BlackBody.h"
+#include "lut/Cardiac.h"
+#include "lut/VRBones.h"
+#include "lut/VRMusclesBones.h"
+#include "lut/VRRedVessels.h"
+#include "lut/GrayRainbow.h"
+#include "lut/Stern.h"
+#include "lut/Spectrum.h"
+#include "lut/HotMetal.h"
+#include "lut/HotIron.h"
+#include "lut/HotGreen.h"
+#include "lut/GEColor.h"
+#include "lut/PERFUSION.h"
+#include "lut/Flow.h"
+#include "lut/LONI.h"
+#include "lut/LONI2.h"
+#include "lut/Asymmetry.h"
+#include <vtkMath.h>
+#include <cmath>
+
+#include <time.h>
+
+vtkLookupTableManager::vtkLookupTableManager() {}
+
+vtkLookupTableManager::~vtkLookupTableManager() {}
+
+std::list<std::string> vtkLookupTableManager::GetAvailableLookupTables()
+{
+        std::string lutNames[]= {_Std("B/W"),_Std("B/W Inverse"),_Std("Barten"), _Std("Black Body"), _Std("Cardiac"), _Std("VR Bones"), _Std("VR Muscles & Bones"), _Std("VR Red Vessels"), _Std("Gray Rainbow"), _Std("Stern"), _Std("Spectrum"), _Std("Hot Metal"), _Std("Hot Iron"), _Std("Hot Green"), _Std("GE Color"), _Std("PERFusion"), _Std("PET"), _Std("Flow"), _Std("LONI"), _Std("LONI2"), _Std("Asymmetry"), _Std("P-Value"), _Std("ROI")};
+        std::list<std::string> v_lutNames;
+        for ( int i=0; i<22; i++) {
+                v_lutNames.push_back(lutNames[i]);
+        }
+
+        return v_lutNames;
+}
+
+
+vtkLookupTable* vtkLookupTableManager::GetLookupTable(const int& n)
+{
+        vtkLookupTable* lut = 0;
+        switch (n) {
+        case LUT_LINEAR:
+                lut = vtkLookupTableManager::GetLinearLookupTable();
+                break;
+        case LUT_LINEAR_INV:
+                lut = vtkLookupTableManager::GetLinearInverseLookupTable();
+                break;
+
+        case LUT_BARTEN:
+                lut = vtkLookupTableManager::GetBartenLookupTable();
+                break;
+
+        case LUT_BLACKBODY:
+                lut = vtkLookupTableManager::GetBlackBodyLookupTable();
+                break;
+
+        case LUT_CARDIAC:
+                lut = vtkLookupTableManager::GetCardiacLookupTable();
+                break;
+
+        case LUT_VRBONES:
+                lut = vtkLookupTableManager::GetVRBonesLookupTable();
+                break;
+
+        case LUT_VRMUSCLESBONES:
+                lut = vtkLookupTableManager::GetVRMusclesBonesLookupTable();
+                break;
+
+        case LUT_VRREDVESSELS:
+                lut = vtkLookupTableManager::GetVRRedVesselsLookupTable();
+                break;
+
+        case LUT_GRAYRAINBOW:
+                lut = vtkLookupTableManager::GetGrayRainbowLookupTable();
+                break;
+
+        case LUT_STERN:
+                lut = vtkLookupTableManager::GetSternLookupTable();
+                break;
+
+        case LUT_SPECTRUM:
+                lut = vtkLookupTableManager::GetSpectrumLookupTable();
+                break;
+
+        case LUT_HOTMETAL:
+                lut = vtkLookupTableManager::GetHotMetalLookupTable();
+                break;
+
+        case LUT_HOTIRON:
+                lut = vtkLookupTableManager::GetHotIronLookupTable();
+                break;
+
+        case LUT_HOTGREEN:
+                lut = vtkLookupTableManager::GetHotGreenLookupTable();
+                break;
+
+        case LUT_GECOLORS:
+                lut = vtkLookupTableManager::GetGEColorLookupTable();
+                break;
+
+        case LUT_PERFUSION:
+                lut = vtkLookupTableManager::GetPERFusionLookupTable();
+                break;
+
+        case LUT_PET:
+                lut = vtkLookupTableManager::GetPETLookupTable();
+                break;
+
+        case LUT_FLOW:
+                lut = vtkLookupTableManager::GetFlowLookupTable();
+                break;
+
+        case LUT_LONI:
+                lut = vtkLookupTableManager::GetLONILookupTable();
+                break;
+
+        case LUT_LONI2:
+                lut = vtkLookupTableManager::GetLONI2LookupTable();
+                break;
+
+        case LUT_ASYMETRY:
+                lut = vtkLookupTableManager::GetAsymmetryLookupTable();
+                break;
+
+        case LUT_PVALUE:
+                lut = vtkLookupTableManager::GetPValueLookupTable();
+                break;
+
+        case LUT_ROI:
+                lut = vtkLookupTableManager::GetROILookupTable();
+                break;
+
+        default:
+                break;
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetBartenLookupTable()
+{
+
+        double tablaBarten[1024];
+
+        const double a = -1.3011877;
+        const double b = -2.5840191E-2;
+        const double c = 8.0242636E-2;
+        const double d = -1.0320229E-1;
+        const double e = 1.3646699E-1;
+        const double f = 2.8745620E-2;
+        const double g = -2.5468404E-2;
+        const double h = -3.1978977E-3;
+        const double k = 1.2992634E-4;
+        const double m = 1.3635334E-3;
+
+        double logaritmoJ;
+        double minimo = 3.402823466E+38;
+        double maximo = -3.402823466E+38;
+        int indice;
+        for ( int j=1; j<=1024; j++) {
+                indice = j-1;
+                logaritmoJ = std::log((double)j);
+
+                tablaBarten[indice] = ( a + c * logaritmoJ + e * std::pow(logaritmoJ,(double)2.0f) + g * std::pow(logaritmoJ,(double)3.0f) + m * std::pow(logaritmoJ,(double)4.0f) ) /
+                                      ( 1.0f + b * logaritmoJ + d * std::pow(logaritmoJ,(double)2.0f) + f * std::pow(logaritmoJ,(double)3.0f) + h * std::pow(logaritmoJ,(double)4.0f) + k * std::pow(logaritmoJ,(double)5.0f) );
+
+                if(maximo < tablaBarten[indice])
+                        maximo = tablaBarten[indice];
+                if(minimo > tablaBarten[indice])
+                        minimo = tablaBarten[indice];
+        }
+
+        const int numeroValores = 1024;
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(numeroValores);
+        lut->Build();
+
+        for (int i = 0; i<numeroValores; i++) {
+                int posicion = i;
+                double v = (tablaBarten[posicion] - minimo) / (maximo - minimo);
+                lut->SetTableValue(i, v, v, v, 1.0);
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetLinearLookupTable()
+{
+        const int numeroValores = 1024;
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(numeroValores);
+        lut->Build();
+
+        for (int i = 0; i < numeroValores; i++) {
+                double v = ((float) i) / 1024.0f;
+                lut->SetTableValue(i, v, v, v, 1.0);
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetLinearInverseLookupTable()
+{
+        const int numeroValores = 1024;
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(numeroValores);
+        lut->Build();
+
+        for (int i = 0; i < numeroValores; i++) {
+                double v = ((float) numeroValores - i - 1) / 1024.0f;
+                lut->SetTableValue(i, v, v, v, 1.0);
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetSpectrumLookupTable()
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)Spectrum[i]/255.0, (double)Spectrum[256+i]/255.0, (double)Spectrum[256*2+i]/255.0, 1.0);
+        }
+
+        return lut;
+}
+
+
+vtkLookupTable* vtkLookupTableManager::GetHotMetalLookupTable()
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)HotMetal[i]/255.0, (double)HotMetal[256+i]/255.0, (double)HotMetal[256*2+i]/255.0, 1.0);
+        }
+
+        return lut;
+}
+
+
+vtkLookupTable* vtkLookupTableManager::GetGEColorLookupTable()
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)GEColor[i]/255.0, (double)GEColor[256+i]/255.0, (double)GEColor[256*2+i]/255.0, 1.0);
+        }
+
+        return lut;
+}
+
+
+vtkLookupTable* vtkLookupTableManager::GetFlowLookupTable()
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)Flow[i]/255.0, (double)Flow[256+i]/255.0, (double)Flow[256*2+i]/255.0, 1.0);
+        }
+
+        return lut;
+}
+
+
+vtkLookupTable* vtkLookupTableManager::GetLONILookupTable()
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(203);
+        lut->Build();
+
+        for ( int i=0; i<203; i++) {
+                lut->SetTableValue(i, (double)LONI[i][0], (double)LONI[i][1], (double)LONI[i][2], 1.0);
+        }
+
+        return lut;
+}
+
+
+vtkLookupTable* vtkLookupTableManager::GetLONI2LookupTable()
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(120);
+        lut->Build();
+
+        for ( int i=0; i<120; i++) {
+                lut->SetTableValue(i, (double)LONI2[i][0], (double)LONI2[i][1], (double)LONI2[i][2], 1.0);
+        }
+
+        return lut;
+}
+
+
+vtkLookupTable* vtkLookupTableManager::GetAsymmetryLookupTable()
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)AsymmetryLUT[i][0], (double)AsymmetryLUT[i][1], (double)AsymmetryLUT[i][2], 1.0);
+        }
+
+        return lut;
+}
+
+
+vtkLookupTable* vtkLookupTableManager::GetPValueLookupTable()
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetTableRange (0, 1);
+        lut->SetSaturationRange (1.0, 1.5);
+        lut->SetHueRange (0.666, 0.8333);
+        //lut->SetHueRange (0.666, 0.0);
+        lut->SetValueRange (0.5, 1.0);
+        lut->Build();
+
+        return lut;
+}
+
+
+// Nuevos
+
+vtkLookupTable* vtkLookupTableManager::GetBlackBodyLookupTable(void)
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)BlackBody[i]/255.0, (double)BlackBody[256+i]/255.0, (double)BlackBody[256*2+i]/255.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetCardiacLookupTable(void)
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)Cardiac[i]/255.0, (double)Cardiac[256+i]/255.0, (double)Cardiac[256*2+i]/255.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetVRBonesLookupTable(void)
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)VRBones[i]/255.0, (double)VRBones[256+i]/255.0, (double)VRBones[256*2+i]/255.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetVRMusclesBonesLookupTable(void)
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)VRMusclesBones[i]/255.0, (double)VRMusclesBones[256+i]/255.0, (double)VRMusclesBones[256*2+i]/255.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetVRRedVesselsLookupTable(void)
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)VRRedVessels[i]/255.0, (double)VRRedVessels[256+i]/255.0, (double)VRRedVessels[256*2+i]/255.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetGrayRainbowLookupTable(void)
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)GrayRainbow[i]/255.0, (double)GrayRainbow[256+i]/255.0, (double)GrayRainbow[256*2+i]/255.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetSternLookupTable(void)
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)Stern[i]/255.0, (double)Stern[256+i]/255.0, (double)Stern[256*2+i]/255.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetHotIronLookupTable(void)
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)HotIron[i]/255.0, (double)HotIron[256+i]/255.0, (double)HotIron[256*2+i]/255.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetHotGreenLookupTable(void)
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+        lut->Build();
+
+        for ( int i=0; i<256; i++) {
+                lut->SetTableValue(i, (double)HotGreen[i]/255.0, (double)HotGreen[256+i]/255.0, (double)HotGreen[256*2+i]/255.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetPETLookupTable(void)
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+
+        lut->Build();
+
+        for ( int i = 0; i < 256; i++) {
+                if (i < 128) {
+                        lut->SetTableValue(i, (double)(i << 1) / 255.0, 0.0, 0.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+                } else if (i < 192) {
+                        lut->SetTableValue(i, 1.0, (double) ( (i-128) << 2 ) / 255.0, 0.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+                } else {
+                        lut->SetTableValue(i, 1.0, 1.0, (double) ( (i-192) << 2 ) / 255.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+                }
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetPERFusionLookupTable(void)
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(256);
+
+        lut->Build();
+
+        const int* R = PERFUSION;
+        const int* G = R + 256;
+        const int* B = G + 256;
+
+        for ( int i = 0; i < 256; i++) {
+                lut->SetTableValue(i, (double)R[i]/255.0, (double)G[i]/255.0, (double)B[i]/255.0, /*(double)(i)/255.0*/ log (1.0+(double)(i)/255.0*9.0)/log (10.0) );
+        }
+
+        return lut;
+}
+
+vtkLookupTable* vtkLookupTableManager::GetROILookupTable()
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues (256);
+        lut->SetTableValue (0, 0.0, 0.0, 0.0, 0.0); // erase color
+
+        lut->SetTableValue (1, 1.0, 0.0, 0.0, 0.5);
+        lut->SetTableValue (2, 0.0, 1.0, 0.0, 0.5);
+        lut->SetTableValue (3, 0.0, 0.0, 1.0, 0.5);
+        lut->SetTableValue (4, 1.0, 1.0, 0.0, 0.5);
+        lut->SetTableValue (5, 0.0, 1.0, 1.0, 0.5);
+        lut->SetTableValue (6, 1.0, 0.0, 1.0, 0.5);
+
+        lut->SetTableValue (7, 1.0, 0.5, 0.0, 0.5);
+        lut->SetTableValue (8, 0.0, 1.0, 0.5, 0.5);
+        lut->SetTableValue (9, 0.5, 0.0, 1.0, 0.5);
+        lut->SetTableValue (10, 1.0, 1.0, 0.5, 0.5);
+        lut->SetTableValue (11, 0.5, 1.0, 1.0, 0.5);
+        lut->SetTableValue (12, 1.0, 0.5, 1.0, 0.5);
+
+
+
+        // Fill the rest of the labels with color ramps, code taken from SNAP
+//   for (int i = 13; i < 256; i++)
+//   {
+//     if (i < 85)
+//     {
+//       lut->SetTableValue (i, ((84.0-i)/85.0 * 200.0 + 50.0)/255.0, (i/85.0 * 200.0 + 50.0)/255.0, 0, 0.5);
+//     }
+//     else if (i < 170)
+//     {
+//       lut->SetTableValue (i, 0, ((169.0-i)/85.0 * 200.0 + 50)/255.0, ((i-85)/85.0 * 200.0 + 50)/255.0, 0.5);
+//     }
+//     else
+//     {
+//       lut->SetTableValue (i, ((i-170)/85.0 * 200.0 + 50)/255.0, 0.0, ((255.0-i)/85.0 * 200.0 + 50)/255.0, 0.5);
+//     }
+//   }
+
+
+        // Fill the rest with random colors
+
+//   for (int i = 13; i < 256; i++)
+//   {
+//     srand (clock());
+
+//     // put a random color
+//     int i1 = 1 + (int) (100.0 * ((double)rand() / (RAND_MAX + 1.0)));
+//     int i2 = 1 + (int) (100.0 * ((double)rand() / (RAND_MAX + 1.0)));
+//     int i3 = 1 + (int) (100.0 * ((double)rand() / (RAND_MAX + 1.0)));
+//     double rand_1 = (double)(i1)/(100.0);
+//     double rand_2 = (double)(i2)/(100.0);
+//     double rand_3 = (double)(i3)/(100.0);
+//     double r = rand_1, g = rand_2, b = rand_3;
+//     if (i1 < 33)
+//       r = 1;
+//     else if (i1 < 66)
+//       g = 1;
+//     else if (i1 < 100)
+//       b = 1;
+
+//     lut->SetTableValue (i, r, g, b, 0.5);
+//   }
+
+        for (int i = 12; i < 256; i++) {
+                if (i%12 == 0)
+                        lut->SetTableValue (i, 1.0, 0.0, 0.0, 0.5);
+                else if (i%12 == 1)
+                        lut->SetTableValue (i, 0.0, 1.0, 0.0, 0.5);
+                else if (i%12 == 2)
+                        lut->SetTableValue (i, 0.0, 0.0, 1.0, 0.5);
+                else if (i%12 == 3)
+                        lut->SetTableValue (i, 1.0, 1.0, 0.0, 0.5);
+                else if (i%12 == 4)
+                        lut->SetTableValue (i, 0.0, 1.0, 1.0, 0.5);
+                else if (i%12 == 5)
+                        lut->SetTableValue (i, 1.0, 0.0, 1.0, 0.5);
+                else if (i%12 == 6)
+                        lut->SetTableValue (i, 1.0, 0.5, 0.0, 0.5);
+                else if (i%12 == 7)
+                        lut->SetTableValue (i, 0.0, 1.0, 0.5, 0.5);
+                else if (i%12 == 8)
+                        lut->SetTableValue (i, 0.5, 0.0, 1.0, 0.5);
+                else if (i%12 == 9)
+                        lut->SetTableValue (i, 1.0, 1.0, 0.5, 0.5);
+                else if (i%12 == 10)
+                        lut->SetTableValue (i, 0.5, 1.0, 1.0, 0.5);
+                else if (i%12 == 11)
+                        lut->SetTableValue (i, 1.0, 0.5, 1.0, 0.5);
+        }
+
+        return lut;
+
+}
+
+vtkLookupTable* vtkLookupTableManager::GetOverlayLooupTable()
+{
+        vtkLookupTable* lut = vtkLookupTable::New();
+        lut->SetNumberOfTableValues(2);
+        lut->Build();
+
+        lut->SetTableValue(0, 0.0, 0.0, 0.0, 0.0);
+
+        lut->SetTableValue(1, 1.0, 1.0, 1.0, 1.0);
+        return lut;
+}
diff --git a/cadxcore/VTKInria3D/vtkVISUManagement/vtkLookupTableManager.h b/cadxcore/VTKInria3D/vtkVISUManagement/vtkLookupTableManager.h
new file mode 100644
index 0000000..1f64456
--- /dev/null
+++ b/cadxcore/VTKInria3D/vtkVISUManagement/vtkLookupTableManager.h
@@ -0,0 +1,122 @@
+/*=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: vtkLookupTableManager.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2008-02-22 17:19:25 +0100 (vie, 22 feb 2008) $
+Version:   $Revision: 700 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifndef _vtk_LookupTableManager_h_
+#define _vtk_LookupTableManager_h_
+#include <api/api.h>
+#include <wx/arrstr.h>
+#include "vtkINRIA3DConfigure.h"
+
+#include <list>
+
+#include <vtkObject.h>
+#include <vtkLookupTable.h>
+
+class EXTAPI vtkLookupTableManager: public vtkObject
+{
+
+public:
+
+        //BTX
+        enum LookupTableIds {
+                LUT_LINEAR = 0,
+                LUT_LINEAR_INV,
+                LUT_BARTEN,
+                LUT_BLACKBODY,      //
+                LUT_CARDIAC,        //
+                LUT_VRBONES,        //
+                LUT_VRMUSCLESBONES, //
+                LUT_VRREDVESSELS,   //
+                LUT_GRAYRAINBOW,    //
+                LUT_STERN,          //
+                LUT_SPECTRUM,       //
+                LUT_HOTMETAL,
+                LUT_HOTIRON,        //
+                LUT_HOTGREEN,       //
+                LUT_GECOLORS,
+                LUT_PERFUSION,
+                LUT_PET,
+                LUT_FLOW,
+                LUT_LONI,
+                LUT_LONI2,
+                LUT_ASYMETRY,
+                LUT_PVALUE,
+                LUT_ROI
+        };
+        //ETX
+
+        static vtkLookupTableManager* New();
+        vtkTypeMacro (vtkLookupTableManager, vtkObject);
+
+        static vtkLookupTable* GetBartenLookupTable (void);
+
+        static vtkLookupTable* GetLinearLookupTable (void);
+
+        static vtkLookupTable* GetLinearInverseLookupTable (void);
+
+        static vtkLookupTable* GetSpectrumLookupTable (void);
+
+        static vtkLookupTable* GetHotMetalLookupTable (void);
+
+        static vtkLookupTable* GetGEColorLookupTable (void);
+
+        static vtkLookupTable* GetFlowLookupTable (void);
+
+        static vtkLookupTable* GetLONILookupTable (void);
+
+        static vtkLookupTable* GetLONI2LookupTable (void);
+
+        static vtkLookupTable* GetAsymmetryLookupTable (void);
+
+        static vtkLookupTable* GetPValueLookupTable (void);
+
+        static std::list<std::string> GetAvailableLookupTables(void);
+
+        static vtkLookupTable* GetROILookupTable (void);
+
+        static vtkLookupTable* GetOverlayLooupTable (void);
+
+        // Nuevos
+
+        static vtkLookupTable* GetBlackBodyLookupTable(void);
+        static vtkLookupTable* GetCardiacLookupTable(void);
+        static vtkLookupTable* GetVRBonesLookupTable(void);
+        static vtkLookupTable* GetVRMusclesBonesLookupTable(void);
+        static vtkLookupTable* GetVRRedVesselsLookupTable(void);
+        static vtkLookupTable* GetGrayRainbowLookupTable(void);
+        static vtkLookupTable* GetSternLookupTable(void);
+        static vtkLookupTable* GetHotIronLookupTable(void);
+        static vtkLookupTable* GetHotGreenLookupTable(void);
+
+        // PERFUSION
+
+        static vtkLookupTable* GetPERFusionLookupTable(void);
+
+        // PET
+        static vtkLookupTable* GetPETLookupTable(void);
+
+        static vtkLookupTable* GetLookupTable(const int&);
+
+protected:
+        vtkLookupTableManager();
+        ~vtkLookupTableManager();
+
+private:
+};
+
+
+#endif
diff --git a/cadxcore/VTKInria3D/wxVTK/wxVTKRenderWindowInteractor.cpp b/cadxcore/VTKInria3D/wxVTK/wxVTKRenderWindowInteractor.cpp
new file mode 100644
index 0000000..b2c09c1
--- /dev/null
+++ b/cadxcore/VTKInria3D/wxVTK/wxVTKRenderWindowInteractor.cpp
@@ -0,0 +1,1419 @@
+/*=========================================================================
+
+Program:   Visualization Toolkit
+Module:    $RCSfile: wxVTKRenderWindowInteractor.cxx,v $
+Language:  C++
+Date:      $Date: 2009-09-26 18:46:34 +0200 (Sat, 26 Sep 2009) $
+Version:   $Revision: 1276 $
+
+Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
+All rights reserved.
+See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notice for more information.
+
+=========================================================================*/
+
+#include <assert.h>
+
+#include "wxVTKRenderWindowInteractor.h"
+
+#include <api/math/geometry3d.h>
+#include <api/icontexto.h>
+#include <api/ientorno.h>
+
+#include <api/controllers/icontroladorlog.h>
+
+//This is needed for vtk 3.1 :
+#ifndef VTK_MAJOR_VERSION
+#  include "vtkVersion.h"
+#endif
+
+#include "vtkDebugLeaks.h"
+#include "vtkCommand.h"
+
+#ifdef __WXMAC__
+#ifdef __WXCOCOA__
+#include "vtkCocoaRenderWindow.h"
+#else
+#include "vtkCarbonRenderWindow.h"
+#endif
+#endif
+
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtkImageActor.h>
+#include <vtkWorldPointPicker.h>
+#include <vtkRenderer.h>
+#include <vtkCamera.h>
+#include <vtkInteractorObserver.h>
+
+
+// function to get VTK keysyms from ascii characters
+static const char* ascii_to_key_sym(int);
+// function to get VTK keysyms from Qt keys
+static const char* wx_key_to_key_sym(int);
+
+class Timer
+{
+private:
+#if defined(_WINDOWS)
+        LARGE_INTEGER mInicio;
+        LARGE_INTEGER mFin;
+        LARGE_INTEGER mFrecuencia;
+#else
+
+#endif
+public:
+        Timer()
+        {
+        }
+
+        void start()
+        {
+#if defined(_WINDOWS)
+                QueryPerformanceCounter( &mInicio );
+#else
+
+#endif
+        }
+
+        void restart()
+        {
+#if defined(_WINDOWS)
+                QueryPerformanceCounter( &mInicio );
+#else
+
+#endif
+        }
+
+        void stop()
+        {
+#if defined(_WINDOWS)
+                QueryPerformanceCounter(&mFin);
+                QueryPerformanceFrequency(&mFrecuencia);
+#else
+
+#endif
+        }
+#ifdef _WINDOWS
+#define UNUSED
+#else
+#define UNUSED __attribute__((unused))
+#endif
+
+        friend std::ostream& operator<<(std::ostream& out, const Timer& t UNUSED )
+        {
+#if defined(_WINDOWS)
+                const double tiempo = (double)(t.mFin.QuadPart - t.mInicio.QuadPart ) / (double) t.mFrecuencia.QuadPart;
+                return out << tiempo << " seg. " << 1.0 / tiempo << " Op./seg.";
+#else
+                return out << "No implementado";
+
+#endif
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const Timer* t)
+        {
+                if (t == NULL) {
+                        return out << "NULL";
+                } else {
+                        return out << *t;
+                }
+        }
+};
+
+// To access objc calls on cocoa
+#ifdef __WXCOCOA__
+#ifdef VTK_USE_COCOA
+#import <Cocoa/Cocoa.h>
+// This trick is no longer need in VTK CVS, should get rid of that:
+#define id Id
+#else
+#error Build mismatch you need both wxWidgets and VTK to be configure against Cocoa to work
+#endif //VTK_USE_COCOA
+#endif //__WXCOCOA__
+
+#ifdef __WXGTK__
+#include <gdk/gdkx.h>
+#include "gdk/gdkprivate.h"
+#include <gtk/gtk.h>
+#endif
+
+#ifdef __WXX11__
+#include "wx/x11/privx.h"
+#define GetXWindow(wxwin)   ((Window)(wxwin)->GetHandle())
+#endif
+
+
+//For more info on this class please go to:
+//http://wxvtk.sf.net
+//This hack is for some buggy wxGTK version:
+#define WX_USE_X_CAPTURE 1
+
+#define ID_wxVTKRenderWindowInteractor_TIMER 1001
+
+#if defined(__WXGTK__) && defined(wxUSE_GLCANVAS)
+IMPLEMENT_DYNAMIC_CLASS(wxVTKRenderWindowInteractor, wxGLCanvas)
+#else
+IMPLEMENT_DYNAMIC_CLASS(wxVTKRenderWindowInteractor, wxWindow)
+#endif  //__WXGTK__
+
+//---------------------------------------------------------------------------
+#if defined(__WXGTK__) && defined(wxUSE_GLCANVAS)
+BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxGLCanvas)
+#else
+        BEGIN_EVENT_TABLE(wxVTKRenderWindowInteractor, wxWindow)
+#endif //__WXGTK__
+        //refresh window by doing a Render
+        EVT_PAINT       (wxVTKRenderWindowInteractor::OnPaint)
+        EVT_ERASE_BACKGROUND(wxVTKRenderWindowInteractor::OnEraseBackground)
+        EVT_MOTION      (wxVTKRenderWindowInteractor::OnMotion)
+
+        //Bind the events to the event converters
+        EVT_LEFT_DCLICK (wxVTKRenderWindowInteractor::OnMouseDoubleClick)
+        EVT_MIDDLE_DCLICK (wxVTKRenderWindowInteractor::OnMouseDoubleClick)
+        EVT_RIGHT_DCLICK (wxVTKRenderWindowInteractor::OnMouseDoubleClick)
+        EVT_LEFT_DOWN   (wxVTKRenderWindowInteractor::OnButtonDown)
+        EVT_MIDDLE_DOWN (wxVTKRenderWindowInteractor::OnButtonDown)
+        EVT_RIGHT_DOWN  (wxVTKRenderWindowInteractor::OnButtonDown)
+        EVT_LEFT_UP     (wxVTKRenderWindowInteractor::OnButtonUp)
+        EVT_MIDDLE_UP   (wxVTKRenderWindowInteractor::OnButtonUp)
+        EVT_RIGHT_UP    (wxVTKRenderWindowInteractor::OnButtonUp)
+        EVT_ENTER_WINDOW(wxVTKRenderWindowInteractor::OnEnter)
+        EVT_LEAVE_WINDOW(wxVTKRenderWindowInteractor::OnLeave)
+        EVT_MOUSEWHEEL  (wxVTKRenderWindowInteractor::OnMouseWheel)
+        EVT_MOUSE_CAPTURE_LOST(wxVTKRenderWindowInteractor::OnMouseCaptureLost)
+        EVT_KEY_DOWN    (wxVTKRenderWindowInteractor::OnKeyDown)
+        EVT_KEY_UP      (wxVTKRenderWindowInteractor::OnKeyUp)
+        EVT_CHAR        (wxVTKRenderWindowInteractor::OnChar)
+        EVT_TIMER       (ID_wxVTKRenderWindowInteractor_TIMER, wxVTKRenderWindowInteractor::OnTimer)
+        EVT_SIZE        (wxVTKRenderWindowInteractor::OnSize)
+END_EVENT_TABLE()
+
+//vtkCxxMacro(wxVTKRenderWindowInteractor, "$Revision: 1276 $")
+vtkInstantiatorNewMacro(wxVTKRenderWindowInteractor)
+
+#if defined(__WXGTK__) && defined(wxUSE_GLCANVAS)
+static int wxvtk_attributes[]= {
+        WX_GL_DOUBLEBUFFER,
+        WX_GL_RGBA,
+        WX_GL_DEPTH_SIZE,
+        16,
+        0
+};
+#endif
+
+//---------------------------------------------------------------------------
+wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor()
+#if defined(__WXGTK__) && defined(wxUSE_GLCANVAS)
+        : wxGLCanvas(0, -1, wxvtk_attributes, wxDefaultPosition, wxDefaultSize, 0, wxT("wxVTKRenderWindowInteractor")),
+          vtkRenderWindowInteractor()
+#else
+        : wxWindow(), vtkRenderWindowInteractor()
+#endif //__WXGTK__
+          , timer(this, ID_wxVTKRenderWindowInteractor_TIMER)
+          , ActiveButton(wxEVT_NULL)
+          , Stereo(0)
+          , Handle(0)
+          , Created(true)
+          , RenderWhenDisabled(1)
+          , UseCaptureMouse(1)
+#if defined(__WXGTK__) && defined(wxUSE_GLCANVAS)
+          , GLContext(new wxGLContext (this))
+#endif
+{
+        vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor");
+#if defined(__WXMSW__) || defined(__WXMAC__)
+        this->SetUseCaptureMouse(0);
+#endif
+        this->RenderWindow = NULL;
+        this->SetRenderWindow(vtkRenderWindow::New());
+        this->RenderWindow->Delete();
+        this->m_pPicker = vtkWorldPointPicker::New();
+        this->m_c = new TContexto();
+        this->m_c->Reset();
+        this->m_c->pWindow = this;
+        this->m_c->pRenderer = this;
+}
+
+//---------------------------------------------------------------------------
+wxVTKRenderWindowInteractor::wxVTKRenderWindowInteractor(wxWindow *parent, wxWindowID id,
+                const wxPoint &pos,
+                const wxSize &size,
+                long style, const wxString &name)
+#if defined(__WXGTK__) && defined(wxUSE_GLCANVAS)
+        : wxGLCanvas(parent, id, wxvtk_attributes, pos, size, style, name),
+          vtkRenderWindowInteractor(),
+#else
+        :
+        wxWindow(parent, id, pos, size, style, name), vtkRenderWindowInteractor(),
+#endif //__WXGTK__
+          timer(this, ID_wxVTKRenderWindowInteractor_TIMER),
+          ActiveButton(wxEVT_NULL),
+          Stereo(0),
+          Handle(0),
+          Created(true),
+          RenderWhenDisabled(1),
+          UseCaptureMouse(0)
+#if defined(__WXGTK__) && defined(wxUSE_GLCANVAS)
+          , GLContext(new wxGLContext (this))
+#endif
+{
+        vtkDebugLeaks::ConstructClass("wxVTKRenderWindowInteractor");
+#if defined(__WXMSW__) || defined(__WXMAC__)
+        this->SetUseCaptureMouse(1);
+#endif
+        this->RenderWindow = NULL;
+        this->SetRenderWindow(vtkRenderWindow::New());
+        this->RenderWindow->Delete();
+        this->m_c = new TContexto();
+        this->m_c->Reset();
+#ifdef __WXMAC__
+        // On Mac (Carbon) we don't get notified of the initial window size with an EVT_SIZE event,
+        // so we update the size information of the interactor/renderwindow here
+        this->UpdateSize(size.x, size.y);
+#endif
+        this->m_pPicker = vtkWorldPointPicker::New();
+
+        this->m_c->pWindow = this;
+        this->m_c->pRenderer = this;
+}
+//---------------------------------------------------------------------------
+wxVTKRenderWindowInteractor::~wxVTKRenderWindowInteractor()
+{
+        DestruirContexto3D();
+        if (this->m_pPicker != NULL) {
+                this->m_pPicker->Delete();
+                this->m_pPicker = NULL;
+        }
+
+        delete m_c;
+
+        SetRenderWindow(NULL);
+        SetInteractorStyle(NULL);
+
+        // this is a leak, but for some reason, deleting the context here
+        // results in a segfault. My bet is that vtkRenderWindowInteractor
+        // does still hold a resource that makes X11[xcb] fail on an unknown
+        // sequence number, but since wxVTKRenderWindowInteractor is derived
+        // from vtkRenderWindowInteractor the tear-down can not be done in
+        // the right order.
+        // delete GLContext;
+}
+//---------------------------------------------------------------------------
+wxVTKRenderWindowInteractor * wxVTKRenderWindowInteractor::New()
+{
+        // we don't make use of the objectfactory, because we're not registered
+        return new wxVTKRenderWindowInteractor;
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::Initialize()
+{
+        int *size = RenderWindow->GetSize();
+        // enable everything and start rendering
+        Enable();
+        //RenderWindow->Start();
+
+        // set the size in the render window interactor
+        Size[0] = size[0];
+        Size[1] = size[1];
+
+        // this is initialized
+        Initialized = 1;
+
+        if (Size[0] > 0 && Size[1] > 0) {
+                CrearContexto3D(Size[0],Size[1]);
+        }
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::Enable()
+{
+        // if already enabled then done
+        if (Enabled)
+                return;
+
+        // that's it
+        Enabled = 1;
+#if defined(__WXGTK__) && defined(wxUSE_GLCANVAS)
+        SetCurrent( *GLContext );
+#endif
+        Modified();
+}
+//---------------------------------------------------------------------------
+bool wxVTKRenderWindowInteractor::Enable(bool enable)
+{
+#if defined(__WXGTK__) && defined(wxUSE_GLCANVAS)
+        return wxGLCanvas::Enable(enable);
+#else
+        return wxWindow::Enable(enable);
+#endif
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::Disable()
+{
+        // if already disabled then done
+        if (!Enabled)
+                return;
+
+        // that's it (we can't remove the event handler like it should be...)
+        Enabled = 0;
+        Modified();
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::Start()
+{
+        // the interactor cannot control the event loop
+        vtkErrorMacro( << "wxVTKRenderWindowInteractor::Start() "
+                       "interactor cannot control event loop.");
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::UpdateSize(int x, int y)
+{
+        if( RenderWindow ) {
+                // if the size changed tell render window
+                if ( x != Size[0] || y != Size[1] ) {
+                        // adjust our (vtkRenderWindowInteractor size)
+                        Size[0] = x;
+                        Size[1] = y;
+                        // and our RenderWindow's size
+                        RenderWindow->SetSize(x, y);
+                }
+                if (x > 0 && y > 0) {
+                        CrearContexto3D(x,y);
+                } else {
+                        DestruirContexto3D();
+                }
+                if (x > 0 && y > 0) {
+                        CalcularRelacionPixelsPantalla(FindPokedRenderer(0,0));
+                }
+        }
+}
+//---------------------------------------------------------------------------
+int wxVTKRenderWindowInteractor::CreateTimer(int WXUNUSED(timertype))
+{
+        // it's a one shot timer
+        if (!timer.Start(10, TRUE))
+                return 0;
+
+        return 1;
+
+}
+//------------------------------------------------------------------
+int wxVTKRenderWindowInteractor::InternalCreateTimer(int /*timerId*/, int timerType,
+                unsigned long duration)
+{
+        if (!timer.Start(duration, timerType == OneShotTimer))
+                return 0;
+
+        return ID_wxVTKRenderWindowInteractor_TIMER;
+}
+//------------------------------------------------------------------
+int wxVTKRenderWindowInteractor::InternalDestroyTimer(int /*platformTimerId*/)
+{
+        timer.Stop();
+        return 1;
+}
+//---------------------------------------------------------------------------
+int wxVTKRenderWindowInteractor::DestroyTimer()
+{
+        // do nothing
+        return 1;
+}
+
+bool wxVTKRenderWindowInteractor::Reparent( wxWindowBase *newParent )
+{
+        // should not reparent to NULL , because then it is turned into a toplevel windows
+        // which it is not
+        assert(newParent);
+
+
+        LOG_DEBUG("Core/GL", "Reparenting to " << (void*) newParent << std::endl);
+
+        return wxWindowBase::Reparent(newParent);
+}
+
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnTimer(wxTimerEvent& WXUNUSED(event))
+{
+        if (!Enabled)
+                return;
+        // pass the right timer id
+        int timerId = this->GetCurrentTimerId();
+        this->InvokeEvent(vtkCommand::TimerEvent, &timerId);
+}
+
+//---------------------------------------------------------------------------
+// NOTE on implementation:
+// Bad luck you ended up in the only tricky place of this code.
+// A few note, wxWidgets still refuse to provide such convenient method
+// so I have to maintain it myself, eventhough this is completely integrated
+// in wxPython...
+// Anyway if this happen to break for you then compare to a recent version of wxPython
+// and look for the function long wxPyGetWinHandle(wxWindow* win)
+// in wxPython/src/helpers.cpp
+long wxVTKRenderWindowInteractor::GetHandleHack()
+{
+        // __WXMSW__ is for Win32
+        //__WXMAC__ stands for using Carbon C-headers, using either the CarbonLib/CFM or the native Mach-O builds (which then also use the latest features available)
+        // __WXGTK__ is for both gtk 1.2.x and gtk 2.x
+#if defined(__WXMSW__) || defined(__WXMAC__)
+        long handle_tmp = 0;
+        handle_tmp = (long)this->GetHandle();
+#endif //__WXMSW__
+
+        //__WXCOCOA__ stands for using the objective-c Cocoa API
+#ifdef __WXCOCOA__
+        // Here is how to find the NSWindow
+        wxTopLevelWindow* toplevel = dynamic_cast<wxTopLevelWindow*>(
+                                             wxGetTopLevelParent( this ) );
+        if (toplevel != NULL ) {
+                handle_tmp = (long)toplevel->GetNSWindow();
+        }
+        // The NSView will be deducted from
+        // [(NSWindow*)Handle contentView]
+        // if only I knew how to write that in c++
+#endif //__WXCOCOA__
+
+        // Find and return the actual X-Window.
+#if defined(__WXGTK__) || defined(__WXX11__)
+        return this->GetXWindow();
+#else
+        return handle_tmp;
+#endif
+
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnPaint(wxPaintEvent& WXUNUSED(event))
+{
+        //must always be here
+        wxPaintDC pDC(this);
+        //do it here rather than in the cstor: this is safer.
+        if(!Handle) {
+                Handle = GetHandleHack();
+                RenderWindow->SetWindowId(reinterpret_cast<void *>(Handle));
+                // Cocoa
+                // this->GetNSView() <-> DisplayId
+                // this->GetTopLevel()->GetNSWindow() <-> WindowId
+#ifdef __WXMSW__
+                RenderWindow->SetParentId(reinterpret_cast<void *>(this->GetParent()->GetHWND()));
+#endif //__WXMSW__
+
+                // This is another hack to prevent the VTK Render Window from closing the display.
+                // If VTK closes the display, ~wxContext chashes while trying to destroy its
+                // glContext (because the display is closed). The Get -> Set makes this VTK
+                // object think someone else is responsible for the display.
+                this->RenderWindow->SetDisplayId(this->RenderWindow->GetGenericDisplayId());
+        }
+        // get vtk to render to the wxWindows
+        WSetCurrent();
+        Render();
+#ifdef __WXMAC__
+        // This solves a problem with repainting after a window resize
+        // See also: http://sourceforge.net/mailarchive/forum.php?thread_id=31690967&forum_id=41789
+#ifdef __WXCOCOA__
+        vtkCocoaRenderWindow * rwin = vtkCocoaRenderWindow::SafeDownCast(RenderWindow);
+        if( rwin ) {
+                rwin->UpdateContext();
+        }
+#else
+        vtkCarbonRenderWindow* rwin = vtkCarbonRenderWindow::SafeDownCast(RenderWindow);
+        if( rwin ) {
+                rwin->UpdateGLRegion();
+        }
+#endif
+#endif
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnEraseBackground(wxEraseEvent &event)
+{
+#if defined (_WINDOWS)
+        //turn off background erase to reduce flickering on MSW
+        //event.Skip(true);
+        //std::cout << "wxVTKRenderWindowInteractor::OnEraseBackground()" << std::endl;
+        event.Skip(false);
+        /*
+        event.GetDC()->SetBrush(wxBrush(wxColor(0,0,0)));
+        event.GetDC()->DrawRectangle(this->GetClientRect());
+        */
+#else
+        event.Skip(false);
+#endif
+}
+//---------------------------------------------------------------------------
+
+void wxVTKRenderWindowInteractor::OnSize(wxSizeEvent& /*event*/)
+{
+
+        int w, h;
+        GetClientSize(&w, &h);
+
+#if defined(__WXGTK__)
+        GtkWidget *widget = GetHandle();
+        if (widget != NULL) {
+                GtkWidget* parent_widget = GetParent()->GetHandle();
+                if (parent_widget != NULL) {
+                        gtk_widget_realize(parent_widget);
+                        Window parent_wid = GDK_WINDOW_XWINDOW( parent_widget->window );
+                        RenderWindow->SetParentId(reinterpret_cast<void *>(parent_wid));
+                } else {
+                        RenderWindow->SetParentId(NULL);
+                }
+                gtk_widget_realize(widget);
+                Window wid = GDK_WINDOW_XWINDOW( widget->window );
+                RenderWindow->SetWindowId(reinterpret_cast<void *>(wid));
+
+                SetCurrent(*GLContext);
+                UpdateSize(w, h);
+                return;
+        } else {
+                return;
+        }
+#else
+        UpdateSize(w, h);
+        if (!Enabled) {
+                return;
+        }
+        InvokeEvent(vtkCommand::ConfigureEvent, NULL);
+#endif
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnMotion(wxMouseEvent &event)
+{
+        if (!Enabled) {
+                return;
+        }
+        SetEventInformationFlipY(event.GetX(), event.GetY(),
+                                 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
+
+        InvokeEvent(vtkCommand::MouseMoveEvent, NULL);
+        TransformarEvento(event);
+}
+//---------------------------------------------------------------------------
+
+void wxVTKRenderWindowInteractor::OnEnter(wxMouseEvent &event)
+{
+        if (!Enabled) {
+                return;
+        }
+
+        SetEventInformationFlipY(event.GetX(), event.GetY(),
+                                 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
+
+        InvokeEvent(vtkCommand::EnterEvent, NULL);
+        TransformarEvento(event);
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnLeave(wxMouseEvent &event)
+{
+        if (!Enabled) {
+                return;
+        }
+
+        SetEventInformationFlipY(event.GetX(), event.GetY(),
+                                 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
+
+        InvokeEvent(vtkCommand::LeaveEvent, NULL);
+        TransformarEvento(event);
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnKeyDown(wxKeyEvent &event)
+{
+        if (!Enabled) {
+                return;
+        }
+        Activar();
+
+        // new style
+        int keycode = event.GetKeyCode();
+        char key = '\0';
+        if (((unsigned int)keycode) < 256) {
+                // TODO: Unicode in non-Unicode mode ??
+                key = (char)keycode;
+        }
+
+        const char* keysym = ascii_to_key_sym( keycode );
+        if(!keysym) {
+                // get virtual keys
+                keysym = wx_key_to_key_sym( keycode );
+        }
+
+        if(!keysym) {
+                keysym = "None";
+        }
+
+        // we don't get a valid mouse position inside the key event on every platform
+        // so we retrieve the mouse position explicitly and pass it along
+        wxPoint mousePos = ScreenToClient(wxGetMousePosition());
+        SetEventInformationFlipY(mousePos.x, mousePos.y,
+                                 event.ControlDown(), event.ShiftDown(), key, 0, keysym);
+        InvokeEvent(vtkCommand::KeyPressEvent, NULL);
+        TransformarEvento(event);
+        if (event.GetSkipped()) {
+                event.ResumePropagation(20);
+        }
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnKeyUp(wxKeyEvent &event)
+{
+        if (!Enabled) {
+                return;
+        }
+        Activar();
+
+        // new style
+        int keycode = event.GetKeyCode();
+        char key = '\0';
+        if (((unsigned int)keycode) < 256) {
+                // TODO: Unicode in non-Unicode mode ??
+                key = (char)keycode;
+        }
+
+        const char* keysym = ascii_to_key_sym( keycode );
+        if(!keysym) {
+                // get virtual keys
+                keysym = wx_key_to_key_sym( keycode );
+        }
+
+        if(!keysym) {
+                keysym = "None";
+        }
+
+
+        // we don't get a valid mouse position inside the key event on every platform
+        // so we retrieve the mouse position explicitly and pass it along
+        wxPoint mousePos = ScreenToClient(wxGetMousePosition());
+        SetEventInformationFlipY(mousePos.x, mousePos.y,
+                                 event.ControlDown(), event.ShiftDown(), key, 0, keysym);
+        InvokeEvent(vtkCommand::KeyReleaseEvent, NULL);
+        TransformarEvento(event);
+        if (event.GetSkipped()) {
+                event.ResumePropagation(20);
+        }
+        event.Skip();
+
+}
+
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnChar(wxKeyEvent &event)
+{
+        if (!Enabled) {
+                return;
+        }
+        TransformarEvento(event);
+
+        // new style
+        int keycode = event.GetKeyCode();
+        char key = '\0';
+        if (((unsigned int)keycode) < 256) {
+                // TODO: Unicode in non-Unicode mode ??
+                key = (char)keycode;
+        }
+
+        const char* keysym = ascii_to_key_sym( keycode );
+        if(!keysym) {
+                // get virtual keys
+                keysym = wx_key_to_key_sym( keycode );
+        }
+
+        if(!keysym) {
+                keysym = "None";
+        }
+
+        // we don't get a valid mouse position inside the key event on every platform
+        // so we retrieve the mouse position explicitly and pass it along
+        wxPoint mousePos = ScreenToClient(wxGetMousePosition());
+        SetEventInformationFlipY(mousePos.x, mousePos.y,
+                                 event.ControlDown(), event.ShiftDown(), key, 0, keysym);
+        InvokeEvent(vtkCommand::CharEvent, NULL);
+
+        TransformarEvento(event);
+        if (event.GetSkipped()) {
+                event.ResumePropagation(20);
+        }
+        event.Skip();
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnButtonDown(wxMouseEvent &event)
+{
+        if (!Enabled || (ActiveButton != wxEVT_NULL)) {
+                return;
+        }
+        Activar();
+        ActiveButton = event.GetEventType();
+
+        // On Mac (Carbon) and Windows we don't automatically get the focus when
+        // you click inside the window
+        // we therefore set the focus explicitly
+        // Apparently we need that on linux (GTK) too:
+        this->SetFocus();
+
+        SetEventInformationFlipY(event.GetX(), event.GetY(),
+                                 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
+
+        if(event.RightDown()) {
+                InvokeEvent(vtkCommand::RightButtonPressEvent, NULL);
+        } else if(event.LeftDown()) {
+
+                InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL);
+        } else if (event.LeftDClick()) {
+
+                InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL);
+        }
+
+        else if(event.MiddleDown()) {
+                InvokeEvent(vtkCommand::MiddleButtonPressEvent, NULL);
+        }
+        //save the button and capture mouse until the button is released
+        //Only if :
+        //1. it is possible (WX_USE_X_CAPTURE)
+        //2. user decided to.
+        if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse) {
+                CaptureMouse();
+        }
+        TransformarEvento(event);
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnButtonUp(wxMouseEvent &event)
+{
+        //EVT_xxx_DOWN == EVT_xxx_UP - 1
+        //This is only needed if two mouse buttons are pressed at the same time.
+        //In wxWindows 2.4 and later: better use of wxMOUSE_BTN_RIGHT or
+        //wxEVT_COMMAND_RIGHT_CLICK
+        if (!Enabled || (ActiveButton != (event.GetEventType()-1))) {
+                return;
+        }
+        Activar();
+
+        // See report by Shang Mu / Kerry Loux on wxVTK mailing list
+        this->SetFocus();
+
+        SetEventInformationFlipY(event.GetX(), event.GetY(),
+                                 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
+
+        if(ActiveButton == wxEVT_RIGHT_DOWN) {
+                InvokeEvent(vtkCommand::RightButtonReleaseEvent, NULL);
+        } else if(ActiveButton == wxEVT_LEFT_DOWN) {
+                InvokeEvent(vtkCommand::LeftButtonReleaseEvent, NULL);
+        } else if(ActiveButton == wxEVT_MIDDLE_DOWN) {
+                InvokeEvent(vtkCommand::MiddleButtonReleaseEvent, NULL);
+        }
+        //if the ActiveButton is realeased, then release mouse capture
+        if ((ActiveButton != wxEVT_NULL) && WX_USE_X_CAPTURE && UseCaptureMouse) {
+                ReleaseMouse();
+        }
+        ActiveButton = wxEVT_NULL;
+        TransformarEvento(event);
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnMouseWheel(wxMouseEvent& event)
+{
+        Activar();
+        // Mouse wheel was only added after VTK 4.4 (I think...)
+        // new style
+        //Set vtk event information ... The numebr of wheel rotations is stored in
+        //the x varible.  y varible is zero
+        SetEventInformationFlipY(event.GetX() , event.GetY(),
+                                 event.ControlDown(), event.ShiftDown(), '\0', 0, NULL);
+        //si esta el control pulsado no se procesa, lo procesaran mas adelante
+        if(!event.ControlDown()) {
+                if(event.GetWheelRotation() > 0) {
+                        //Send event to VTK
+                        InvokeEvent(vtkCommand::MouseWheelForwardEvent, NULL);
+                } else {
+                        //Send event to VTK
+                        InvokeEvent(vtkCommand::MouseWheelBackwardEvent, NULL);
+                }
+        }
+
+        TransformarEvento(event);
+}
+
+void wxVTKRenderWindowInteractor::OnMouseCaptureLost(wxMouseCaptureLostEvent& /*event*/)
+{
+        if (ActiveButton != wxEVT_NULL) {
+                //ReleaseMouse();
+        }
+        // Reset ActiveButton so that
+        // 1. we do not process mouse button up events any more,
+        // 2. the next button down event will be processed and call CaptureMouse().
+        // Otherwise ReleaseMouse() will be called
+        // without a previous CaptureMouse().
+        ActiveButton = wxEVT_NULL;
+}
+
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::Render()
+{
+        //Timer t;
+        //t.start();
+
+        int renderAllowed = !IsFrozen();
+
+        if (renderAllowed && !RenderWhenDisabled) {
+                //the user doesn't want us to render when the toplevel frame
+                //is disabled - first find the top level parent
+                wxWindow *topParent = wxGetTopLevelParent(this);
+                if (topParent) {
+                        //if it exists, check whether it's enabled
+                        //if it's not enabeld, renderAllowed will be false
+                        renderAllowed = topParent->IsEnabled();
+                }
+        }
+
+        if (renderAllowed) {
+                if(Handle && (Handle == GetHandleHack()) ) {
+                        CalcularRelacionPixelsPantalla(FindPokedRenderer(0,0));
+                        RenderWindow->Render();
+                        //t.stop();
+                        //std::cout << "wxVTKRenderWindowInteractor::Render(1) " << t << std::endl;
+                } else if(GetHandleHack()) {
+                        //this means the user has reparented us; let's adapt to the
+                        //new situation by doing the WindowRemap dance
+                        //store the new situation
+
+                        Handle = GetHandleHack();
+
+#if defined(__WXOSX__)
+                        RenderWindow->SetParentId(reinterpret_cast<void *>(this->GetParent()->GetHandle()));
+                        RenderWindow->SetWindowId(reinterpret_cast<void *>(Handle));
+#elif defined(__WXMSW__)
+                        RenderWindow->SetParentId(reinterpret_cast<void *>(this->GetParent()->GetHWND()));
+                        RenderWindow->SetWindowId(reinterpret_cast<void *>(Handle));
+#endif
+
+                        CalcularRelacionPixelsPantalla(FindPokedRenderer(0,0));
+                        bool doPlot = !Initialized;
+
+                        RenderWindow->Render();
+
+                        if (doPlot) {
+                                GNC::GCS::IControladorLog* cLog = GNC::GCS::IControladorLog::Instance();
+                                if (cLog != NULL && cLog->IsEnabledFor(GNC::GCS::IControladorLog::DebugLog) ) {
+                                        const char* str;
+                                        LOG_DEBUG("Core/GL", "OpenGL Subsytem initiallized." << std::endl);
+                                        str = (const char*) glGetString(GL_VENDOR);
+                                        if (str != NULL) {
+                                                LOG_DEBUG("Core/GL", "GL_VENDOR:" << str << std::endl);
+                                        }
+                                        str = (const char*) glGetString(GL_RENDERER);
+                                        if (str != NULL) {
+                                                LOG_DEBUG("Core/GL", "GL_RENDERER:" << str << std::endl);
+                                        }
+                                        str = (const char*) glGetString(GL_VERSION);
+                                        if (str != NULL) {
+                                                LOG_DEBUG("Core/GL", "GL_VERSION:" << str << std::endl);
+                                        }
+                                        if (cLog->IsEnabledFor(GNC::GCS::IControladorLog::TraceLog)) {
+                                                str = (const char*) glGetString(GL_EXTENSIONS);
+                                                if (str != NULL) {
+                                                        LOG_TRACE("Core/GL", "GL_EXTENSIONS:" << str << std::endl);
+                                                }
+                                        }
+                                }
+                        }
+
+                        //t.stop();
+                        //std::cerr << "wxVTKRenderWindowInteractor::Render(2) " << t << std::endl;
+                }
+        }
+}
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::SetRenderWhenDisabled(int newValue)
+{
+        //Change value of __RenderWhenDisabled ivar.
+        //If __RenderWhenDisabled is false (the default), this widget will not
+        //call Render() on the RenderWindow if the top level frame (i.e. the
+        //containing frame) has been disabled.
+
+        //This prevents recursive rendering during wxSafeYield() calls.
+        //wxSafeYield() can be called during the ProgressMethod() callback of
+        //a VTK object to have progress bars and other GUI elements updated -
+        //it does this by disabling all windows (disallowing user-input to
+        //prevent re-entrancy of code) and then handling all outstanding
+        //GUI events.
+
+        //However, this often triggers an OnPaint() method for wxVTKRWIs,
+        //resulting in a Render(), resulting in Update() being called whilst
+        //still in progress.
+
+        RenderWhenDisabled = (newValue != 0);
+}
+//---------------------------------------------------------------------------
+//
+// Set the variable that indicates that we want a stereo capable window
+// be created. This method can only be called before a window is realized.
+//
+void wxVTKRenderWindowInteractor::SetStereo(int capable)
+{
+        if (Stereo != capable) {
+                Stereo = capable;
+                RenderWindow->StereoCapableWindowOn();
+                RenderWindow->SetStereoTypeToCrystalEyes();
+                Modified();
+        }
+}
+
+//---------------------------------------------------------------------------
+//
+//
+void wxVTKRenderWindowInteractor::PrintSelf(ostream& os, vtkIndent indent)
+{
+        this->Superclass::PrintSelf(os, indent);
+}
+
+
+
+// ***** keysym stuff below  *****
+
+static const char *AsciiToKeySymTable[] = {
+        0, 0, 0, 0, 0, 0, 0, 0, 0, "Tab", 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        "space", "exclam", "quotedbl", "numbersign",
+        "dollar", "percent", "ampersand", "quoteright",
+        "parenleft", "parenright", "asterisk", "plus",
+        "comma", "minus", "period", "slash",
+        "0", "1", "2", "3", "4", "5", "6", "7",
+        "8", "9", "colon", "semicolon", "less", "equal", "greater", "question",
+        "at", "A", "B", "C", "D", "E", "F", "G",
+        "H", "I", "J", "K", "L", "M", "N", "O",
+        "P", "Q", "R", "S", "T", "U", "V", "W",
+        "X", "Y", "Z", "bracketleft",
+        "backslash", "bracketright", "asciicircum", "underscore",
+        "quoteleft", "a", "b", "c", "d", "e", "f", "g",
+        "h", "i", "j", "k", "l", "m", "n", "o",
+        "p", "q", "r", "s", "t", "u", "v", "w",
+        "x", "y", "z", "braceleft", "bar", "braceright", "asciitilde", "Delete",
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+        0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+
+const char* ascii_to_key_sym(int i)
+{
+        if(i >= 0 && i<256 ) {
+                return AsciiToKeySymTable[i];
+        }
+        return 0;
+}
+
+
+#define WXVTK_HANDLE(x,y) \
+  case x : \
+  ret = y; \
+  break;
+
+const char* wx_key_to_key_sym(int i)
+{
+        const char* ret = 0;
+        switch(i) {
+                WXVTK_HANDLE(WXK_CLEAR, "Clear")
+                WXVTK_HANDLE(WXK_BACK, "BackSpace")
+                WXVTK_HANDLE(WXK_TAB, "Tab")
+                WXVTK_HANDLE(WXK_RETURN, "Return")
+                WXVTK_HANDLE(WXK_SHIFT, "Shift_L")
+                WXVTK_HANDLE(WXK_CONTROL, "Control_L")
+                WXVTK_HANDLE(WXK_ALT, "Alt_L")
+                WXVTK_HANDLE(WXK_PAUSE, "Pause")
+                WXVTK_HANDLE(WXK_CAPITAL, "Caps_Lock")
+                WXVTK_HANDLE(WXK_ESCAPE, "Escape")
+                WXVTK_HANDLE(WXK_SPACE, "space")
+                WXVTK_HANDLE(WXK_END, "End")
+                WXVTK_HANDLE(WXK_HOME, "Home")
+                WXVTK_HANDLE(WXK_LEFT, "Left")
+                WXVTK_HANDLE(WXK_UP, "Up")
+                WXVTK_HANDLE(WXK_RIGHT, "Right")
+                WXVTK_HANDLE(WXK_DOWN, "Down")
+                WXVTK_HANDLE(WXK_SNAPSHOT, "Snapshot")
+                WXVTK_HANDLE(WXK_INSERT, "Insert")
+                WXVTK_HANDLE(WXK_DELETE, "Delete")
+                WXVTK_HANDLE(WXK_HELP, "Help")
+                WXVTK_HANDLE(WXK_NUMPAD0, "0")
+                WXVTK_HANDLE(WXK_NUMPAD1, "1")
+                WXVTK_HANDLE(WXK_NUMPAD2, "2")
+                WXVTK_HANDLE(WXK_NUMPAD3, "3")
+                WXVTK_HANDLE(WXK_NUMPAD4, "4")
+                WXVTK_HANDLE(WXK_NUMPAD5, "5")
+                WXVTK_HANDLE(WXK_NUMPAD6, "6")
+                WXVTK_HANDLE(WXK_NUMPAD7, "7")
+                WXVTK_HANDLE(WXK_NUMPAD8, "8")
+                WXVTK_HANDLE(WXK_NUMPAD9, "9")
+                // KP_0 - KP_9
+                WXVTK_HANDLE(WXK_MULTIPLY, "asterisk")
+                WXVTK_HANDLE(WXK_ADD, "plus")
+                // bar
+                WXVTK_HANDLE(WXK_SUBTRACT, "minus")
+                WXVTK_HANDLE(WXK_DECIMAL, "period")
+                WXVTK_HANDLE(WXK_SEPARATOR, "slash")
+                WXVTK_HANDLE(WXK_F1, "F1")
+                WXVTK_HANDLE(WXK_F2, "F2")
+                WXVTK_HANDLE(WXK_F3, "F3")
+                WXVTK_HANDLE(WXK_F4, "F4")
+                WXVTK_HANDLE(WXK_F5, "F5")
+                WXVTK_HANDLE(WXK_F6, "F6")
+                WXVTK_HANDLE(WXK_F7, "F7")
+                WXVTK_HANDLE(WXK_F8, "F8")
+                WXVTK_HANDLE(WXK_F9, "F9")
+                WXVTK_HANDLE(WXK_F10, "F10")
+                WXVTK_HANDLE(WXK_F11, "F11")
+                WXVTK_HANDLE(WXK_F12, "F12")
+                WXVTK_HANDLE(WXK_F13, "F13")
+                WXVTK_HANDLE(WXK_F14, "F14")
+                WXVTK_HANDLE(WXK_F15, "F15")
+                WXVTK_HANDLE(WXK_F16, "F16")
+                WXVTK_HANDLE(WXK_F17, "F17")
+                WXVTK_HANDLE(WXK_F18, "F18")
+                WXVTK_HANDLE(WXK_F19, "F19")
+                WXVTK_HANDLE(WXK_F20, "F20")
+                WXVTK_HANDLE(WXK_F21, "F21")
+                WXVTK_HANDLE(WXK_F22, "F22")
+                WXVTK_HANDLE(WXK_F23, "F23")
+                WXVTK_HANDLE(WXK_F24, "F24")
+                WXVTK_HANDLE(WXK_NUMLOCK, "Num_Lock")
+                WXVTK_HANDLE(WXK_SCROLL, "Scroll_Lock")
+                WXVTK_HANDLE(WXK_PAGEUP, "Page_Up")
+                WXVTK_HANDLE(WXK_PAGEDOWN, "Page_Down")
+#if WXWIN_COMPATIBILITY_2_6
+                WXVTK_HANDLE(WXK_NUMPAD_PRIOR, "Page_Up")
+                WXVTK_HANDLE(WXK_NUMPAD_NEXT, "Page_Down")
+#endif
+                WXVTK_HANDLE(WXK_NUMPAD_END, "End")
+                WXVTK_HANDLE(WXK_NUMPAD_BEGIN, "Begin")
+                WXVTK_HANDLE(WXK_NUMPAD_INSERT, "Insert")
+                WXVTK_HANDLE(WXK_NUMPAD_DELETE, "Delete")
+                WXVTK_HANDLE(WXK_NUMPAD_EQUAL, "Equal")
+                WXVTK_HANDLE(WXK_NUMPAD_MULTIPLY, "asterix")
+                WXVTK_HANDLE(WXK_NUMPAD_ADD, "plus")
+                WXVTK_HANDLE(WXK_NUMPAD_SEPARATOR, "slash")
+                WXVTK_HANDLE(WXK_NUMPAD_SUBTRACT, "minus")
+                WXVTK_HANDLE(WXK_NUMPAD_DECIMAL, "period")
+                WXVTK_HANDLE(WXK_NUMPAD_DIVIDE, "slash")
+
+                WXVTK_HANDLE(WXK_WINDOWS_LEFT, "Win_L")
+                WXVTK_HANDLE(WXK_WINDOWS_RIGHT, "Win_R")
+                WXVTK_HANDLE(WXK_WINDOWS_MENU, "Menu")
+//NOTHING TO DO..WXK_COMMAND IS "Control_L"			WXVTK_HANDLE(WXK_COMMAND, "Command")
+
+
+        default:
+                break;
+        }
+        return ret;
+}
+
+
+//---------------------------------------------------------------------------
+void wxVTKRenderWindowInteractor::OnMouseDoubleClick(wxMouseEvent &event)
+{
+        if (!Enabled || (ActiveButton != wxEVT_NULL)) {
+                return;
+        }
+        Activar();
+        ActiveButton = event.GetEventType();
+
+        // On Mac (Carbon) and Windows we don't automatically get the focus when
+        // you click inside the window
+        // we therefore set the focus explicitly
+        // Apparently we need that on linux (GTK) too:
+        this->SetFocus();
+
+        SetEventInformationFlipY(event.GetX(), event.GetY(),
+                                 event.ControlDown(), event.ShiftDown(), '\0', 1, NULL);
+
+        if (event.LeftDClick()) {
+                InvokeEvent(vtkCommand::LeftButtonPressEvent, NULL);
+                InvokeEvent(vtkCommand::LeftButtonReleaseEvent, NULL);
+        }
+
+        ActiveButton = wxEVT_NULL;
+        TransformarEvento(event);
+}
+
+//----------------------------------------------------------------------------------------------------
+//region Interfaz IWidgetsRenderer
+
+void wxVTKRenderWindowInteractor::PostRender(bool inmediato)
+{
+        if(inmediato) {
+                //this->Refresh(false);
+                //this->Update();
+                this->Render();
+        } else {
+                this->Refresh(false);
+        }
+
+}
+
+void wxVTKRenderWindowInteractor::WSetCurrent()
+{
+        this->RenderWindow->MakeCurrent();
+}
+
+void wxVTKRenderWindowInteractor::OnActivar()
+{
+        this->SetFocus();
+}
+
+//----------------------------------------------------------------------------------------------------
+//region "Interfaz de transformacion de coordenadas"
+
+void wxVTKRenderWindowInteractor::DisplayToWorld(double displayPos[3], double worldPos[4])
+{
+        worldPos[0] = worldPos[1] = worldPos[2] = worldPos[3] = 0.0;
+        if (m_pPicker != NULL && m_pImageViewer != NULL) {
+                int x = displayPos[0];
+                int y = displayPos[1];
+                vtkRenderer* ren = FindPokedRenderer(x, y);
+
+                if (ren != NULL) {
+                        vtkCamera* cam = ren->GetActiveCamera();
+                        if (cam != NULL) {
+                                double pt[3]  = { static_cast<double>(x), static_cast<double>(y), 0.0};
+                                double world[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+                                m_pPicker->Pick(pt, ren);
+                                m_pPicker->GetPickPosition(world);
+
+                                double cpos[3];
+                                double cdir[3];
+                                cam->GetPosition(cpos);
+                                cam->GetDirectionOfProjection(cdir);
+                                if (cam->GetParallelProjection()) {
+                                        this->m_pImageViewer->IntersectarRayo(world, cdir, worldPos);
+                                        worldPos[3] = 1.0;
+                                }
+                        }
+                }
+        }
+
+}
+
+void wxVTKRenderWindowInteractor::WorldToDisplay(double worldPos[4], double displayPos[3])
+{
+        if (!Enabled || !Initialized) {
+                return;
+        }
+        vtkRenderer* pRenderer = FindPokedRenderer(0,0);
+
+        if (pRenderer == NULL || !pRenderer->IsActiveCameraCreated()) {
+                return;
+        }
+
+        vtkInteractorObserver::ComputeWorldToDisplay(pRenderer, worldPos[0], worldPos[1], worldPos[2], displayPos);
+
+}
+
+void wxVTKRenderWindowInteractor::GetCamVectors(double camPos[4], double camDir[4], double camUp[4])
+{
+        bool available = false;
+
+        if (m_pPicker != NULL && m_pImageViewer != NULL) {
+                int x = Size[0] >> 1;
+                int y = Size[1] >> 1;
+                vtkRenderer* ren = FindPokedRenderer(x, y);
+
+                if (ren != NULL) {
+                        vtkCamera* cam = ren->GetActiveCamera();
+                        cam->GetPosition(camPos);
+                        cam->GetDirectionOfProjection(camDir);
+                        cam->GetViewUp(camUp);
+                        camPos[3] = camDir[3] = camUp[3] = 1.0;
+                        available = true;
+                }
+        }
+        if (!available) {
+                for (int i = 0; i < 4; i++) {
+                        camPos[i] = camDir[i] = camUp[i] = std::numeric_limits<double>::quiet_NaN();
+                }
+        }
+}
+
+void wxVTKRenderWindowInteractor::RayPick(double displayPos[2], double worldPos[4])
+{
+
+        bool error = true;
+
+        if (m_pPicker != NULL && m_pImageViewer != NULL) {
+                int x = (int)(displayPos[0]);
+                int y = Size[1] - (int)(displayPos[1]) - 1;
+                vtkRenderer* ren = FindPokedRenderer(x, y);
+
+                if (ren != NULL) {
+                        vtkCamera* cam = ren->GetActiveCamera();
+                        double pt[3]  = { static_cast<double>(x), static_cast<double>(y), 0.0 };
+                        double world[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+                        m_pPicker->Pick(pt, ren);
+                        m_pPicker->GetPickPosition(world);
+
+                        double cpos[3];
+                        double cdir[3];
+                        cam->GetPosition(cpos);
+                        cam->GetDirectionOfProjection(cdir);
+                        if (cam->GetParallelProjection()) {
+                                this->m_pImageViewer->IntersectarRayo(world, cdir, worldPos);
+                                worldPos[3] = 1.0;
+                                error = false;
+                        }
+                }
+        }
+        if (error) {
+                worldPos[0] = worldPos[1] = worldPos[2] = worldPos[3] = std::numeric_limits<double>::quiet_NaN();
+        }
+
+}
+
+void wxVTKRenderWindowInteractor::RayPick(double worldPos[4])
+{
+
+        bool error = true;
+
+        if (m_pPicker != NULL && m_pImageViewer != NULL) {
+                int x = Size[0] >> 1;
+                int y = Size[1] >> 1;
+                vtkRenderer* ren = FindPokedRenderer(x, y);
+
+                if (ren != NULL) {
+                        vtkCamera* cam = ren->GetActiveCamera();
+                        double cpos[3];
+                        double cdir[3];
+                        cam->GetPosition(cpos);
+                        cam->GetDirectionOfProjection(cdir);
+                        this->m_pImageViewer->IntersectarRayo(cpos, cdir, worldPos);
+                        worldPos[3] = 1.0;
+                        error = false;
+                }
+        }
+        if (error) {
+                worldPos[0] = worldPos[1] = worldPos[2] = worldPos[3] = std::numeric_limits<double>::quiet_NaN();
+        }
+
+}
+
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//region "Helpers de contexto de dibujado"
+
+
+void wxVTKRenderWindowInteractor::TransformarEvento(wxMouseEvent &event)
+{
+        if (m_pPicker != NULL && m_pImageViewer != NULL) {
+                GNC::GCS::Events::EventoRaton wrappedEvent(&event, m_c);
+                int x = event.GetX();
+                int y = Size[1] - event.GetY() - 1;
+                vtkRenderer* ren = FindPokedRenderer(x, y);
+
+                if (ren != NULL) {
+                        vtkCamera* cam = ren->GetActiveCamera();
+                        if (cam != NULL) {
+
+
+                                double pt[3]  = { static_cast<double>(x), static_cast<double>(y), 0.0f };
+                                double world[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+                                m_pPicker->Pick(pt, ren);
+                                m_pPicker->GetPickPosition(world);
+
+                                double cpos[3];
+                                double cdir[3];
+                                cam->GetPosition(cpos);
+                                cam->GetDirectionOfProjection(cdir);
+                                if (cam->GetParallelProjection()) {
+                                        double ipt[3];
+
+                                        this->m_pImageViewer->IntersectarRayo(world, cdir, wrappedEvent.wP.v);
+                                        wrappedEvent.wP.v[3] = 1.0;
+                                        this->m_pImageViewer->Proyect2D(wrappedEvent.wP, ipt);
+                                        wrappedEvent.iP.Asignar(ipt[0], ipt[1]);
+
+                                } else {
+                                        //std::cout << "Error: Reproyeccion en proyeccion perspectiva no soportado" << std::endl;
+                                        event.Skip(wrappedEvent.GetSkipped());
+                                }
+                                CalcularRelacionPixelsPantalla(ren);
+                                PropagarEvento(wrappedEvent);
+                                event.Skip(wrappedEvent.GetSkipped());
+                        }
+                }
+        }
+}
+
+void wxVTKRenderWindowInteractor::TransformarEvento(wxKeyEvent &event)
+{
+        GNC::GCS::Events::EventoTeclado wrappedEvent(&event, m_c);
+        PropagarEvento(wrappedEvent);
+        event.Skip(wrappedEvent.GetSkipped());
+}
+
+/** Proyecta worlPos sobre el viewport, crea un rectangulo de lado 1, lo reproyecta al mundo y devuelve las dimensiones del cubo envolvente de esta ultima reproyección.
+* El resultado obtenido, sirve para calcular la proporcion pixels pantalla <-> coordenadas mundo.
+* Si pos es NULL, se utiliza el centro del viewport como punto generador del rectángulo.
+* El resultado queda almacenado en el contexto de dibujado (miembro relacionMundoPantalla_{x,y,z})
+*/
+void wxVTKRenderWindowInteractor::CalcularRelacionPixelsPantalla(vtkRenderer* pRenderer)
+{
+        if (pRenderer == NULL || !pRenderer->IsActiveCameraCreated() || this->m_pImageViewer == NULL || m_c == NULL) {
+                return;
+        }
+
+        GNC::GCS::Vector screenCenter(Size[0] >> 1, Size[1] >> 1);
+
+        GNC::GCS::Vector   screenPoint[4]; // Screen Points: {center.top_left, center.top_right, center.bottom_right, center.bottom_left}: OpenGL Covention, 0,0 = lower,left
+        GNC::GCS::Vector3D  worldPoint[4]; // World points
+        GNC::GCS::Vector3D  planePoint[4]; // World points proyected in plane point (in world coords)
+        GNC::GCS::Vector3D  imagePoint[4]; // World points proyected in plane point (in image coords)
+
+        /*
+        screenPoint[0].Asignar(screenCenter.x - 0.5, screenCenter.y - 0.5); // s[0] = bottom,left  [0,0]
+        screenPoint[1].Asignar(screenCenter.x + 0.5, screenCenter.y - 0.5); // s[1] = top,left     [x,0]
+        screenPoint[2].Asignar(screenCenter.x + 0.5, screenCenter.y + 0.5); // s[2] = top,right    [x,y]
+        screenPoint[3].Asignar(screenCenter.x - 0.5, screenCenter.y + 0.5); // s[3] = bottom,right [0,y]
+        */
+
+        screenPoint[0].Asignar(screenCenter.x - 0.5, screenCenter.y + 0.5); // s[0] = top,left     [0,0]
+        screenPoint[1].Asignar(screenCenter.x + 0.5, screenCenter.y + 0.5); // s[1] = top,right    [x,0]
+        screenPoint[2].Asignar(screenCenter.x + 0.5, screenCenter.y - 0.5); // s[2] = bottom,right [x,y]
+        screenPoint[3].Asignar(screenCenter.x - 0.5, screenCenter.y - 0.5); // s[3] = bottom,left  [y,0]
+
+        // Transform the screen coords => plane points
+        GNC::GCS::Vector3D camDir = pRenderer->GetActiveCamera()->GetDirectionOfProjection();
+        for (int i = 0; i < 4; ++i) {
+                vtkInteractorObserver::ComputeDisplayToWorld(pRenderer, screenPoint[i].x, screenPoint[i].y, 0, worldPoint[i].v);
+                this->m_pImageViewer->IntersectarRayo(worldPoint[i].v, camDir.v, planePoint[i].v);
+                this->m_pImageViewer->Proyect2D(planePoint[i].v, imagePoint[i].v);
+        }
+
+        // Calculate ScreenDirectionCosines
+        this->m_c->ScreenDirectionCosines[0] = GNC::GCS::Vector(imagePoint[1].x - imagePoint[0].x , imagePoint[1].y - imagePoint[0].y).Normalizar(); // xdir [x, 0]
+        this->m_c->ScreenDirectionCosines[1] = GNC::GCS::Vector(imagePoint[3].x - imagePoint[0].x , imagePoint[3].y - imagePoint[0].y).Normalizar(); // ydir [0, y]
+        GNC::GCS::Vector3D rel((imagePoint[1] - imagePoint[0]).Norma2(), (imagePoint[3] - imagePoint[0]).Norma2(),1);
+
+        //std::cout << "Dir : { " << this->m_c->ScreenDirectionCosines[0] << " }, { " << this->m_c->ScreenDirectionCosines[1] << " }" << std::endl;
+        //std::cout << "Rel : { " << rel << " }" << std::endl;
+
+        if (m_pImageViewer) {
+                this->m_c->rotacion       = this->m_pImageViewer->GetCameraRotation();
+                this->m_c->flipHorizontal = this->m_pImageViewer->GetCameraFlipHorizontal();
+                this->m_c->flipVertical   = this->m_pImageViewer->GetCameraFlipVertical();
+        }
+        this->m_c->SetupImageScreenRel(rel.x, rel.y, rel.z);
+}
+
+void wxVTKRenderWindowInteractor::CrearContexto3D(int ancho, int alto)
+{
+        DestruirContexto3D();
+
+        m_c->ancho = ancho;
+        m_c->alto = alto;
+
+}
+
+void wxVTKRenderWindowInteractor::DestruirContexto3D()
+{
+        m_c->Reset();
+}
+//endregion
diff --git a/cadxcore/VTKInria3D/wxVTK/wxVTKRenderWindowInteractor.h b/cadxcore/VTKInria3D/wxVTK/wxVTKRenderWindowInteractor.h
new file mode 100644
index 0000000..9366dbc
--- /dev/null
+++ b/cadxcore/VTKInria3D/wxVTK/wxVTKRenderWindowInteractor.h
@@ -0,0 +1,236 @@
+/*=========================================================================
+
+  Program:   Visualization Toolkit
+  Module:    $RCSfile: wxVTKRenderWindowInteractor.h,v $
+  Language:  C++
+  Date:      $Date: 2009-09-26 18:46:34 +0200 (Sat, 26 Sep 2009) $
+  Version:   $Revision: 1276 $
+
+  Copyright (c) 1993-2002 Ken Martin, Will Schroeder, Bill Lorensen
+  All rights reserved.
+  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notice for more information.
+
+=========================================================================*/
+
+// .NAME  wxVTKRenderWindowInteractor - class to enable VTK to render to
+// and interact with wxWindow.
+// .SECTION Description
+//  wxVTKRenderWindowInteractor provide a VTK widget for wxWindow. This class
+// was completely rewrote to have the 'Look & Feel' of the python version:
+// wxVTKRenderWindowInteractor.py
+// .SECTION Caveats
+//  - There is a know bug that prevent this class to works for more info see
+// WX_USE_X_CAPTURE. This bug only affect wxGTK from 2.3.2 to wxGTK 2.4.0.
+//  - Furthermore this class is tempated over either wxWindows or wxGLCanvas,
+// in wxWindows 2.3.1 and earlier, the wxGLCanvas had scroll bars, you can avoid
+// this effect by playing with WX_BASE_CLASS at your risk (you might end up with
+// lot of flickering.)
+//  - This class might not be easily readable as it tried to work with VTK 3.2
+//  and 4.x. This class doesn't support reparenting with VTK 4.2 and earlier.
+// .SECTION see also
+// wxVTKRenderWindowInteractor.py wxVTKRenderWindow.py
+
+#ifndef _wxVTKRenderWindowInteractor_h_
+#define _wxVTKRenderWindowInteractor_h_
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include "wx/wxprec.h"
+#include <api/api.h>
+#include <memory>
+
+#ifdef __BORLANDC__
+#  pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include <wx/wx.h>
+#endif
+
+#include <wx/timer.h>
+#include <wx/dcclient.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+// vtk includes
+#include "vtkRenderWindowInteractor.h"
+#include "vtkRenderWindow.h"
+
+#include "vtkINRIA3DConfigure.h"
+
+#if defined(__WXGTK__)
+#if defined(wxUSE_GLCANVAS)
+#    include <wx/window.h>
+#    include <wx/glcanvas.h>
+#  else
+#    error "problem of wxGLCanvas, you need to build wxWidgets with opengl"
+#endif
+#endif //__WXGTK__
+
+// Motif version (renamed into wxX11 for wxWindow 2.4 and newer)
+#if defined(__WXMOTIF__)
+# error This GUI is not supported by wxVTKRenderWindowInteractor for now
+#endif
+
+// wx forward declarations
+class wxPaintEvent;
+class wxMouseEvent;
+class wxTimerEvent;
+class wxKeyEvent;
+class wxSizeEvent;
+class wxGLContext;
+
+#include <api/ievento.h>
+#include <api/ioverlay.h>
+#include <api/iwidgetsrenderer.h>
+
+#if defined(__WXGTK__) && defined(wxUSE_GLCANVAS)
+class wxVTKRenderWindowInteractor : public wxGLCanvas, public vtkRenderWindowInteractor, public GNC::GCS::IWidgetsRenderer
+#else
+class EXTAPI wxVTKRenderWindowInteractor : public wxWindow, public vtkRenderWindowInteractor, public GNC::GCS::IWidgetsRenderer
+#endif //__WXGTK__
+{
+        DECLARE_DYNAMIC_CLASS(wxVTKRenderWindowInteractor)
+
+public:
+        //constructors
+        wxVTKRenderWindowInteractor();
+
+        wxVTKRenderWindowInteractor(wxWindow *parent,
+                                    wxWindowID id,
+                                    const wxPoint &pos = wxDefaultPosition,
+                                    const wxSize &size = wxDefaultSize,
+                                    long style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE | wxCLIP_CHILDREN,
+                                    const wxString &name = wxPanelNameStr);
+        vtkTypeMacro(wxVTKRenderWindowInteractor,vtkRenderWindowInteractor);
+        static wxVTKRenderWindowInteractor * New();
+        void PrintSelf(ostream& os, vtkIndent indent);
+
+        //destructor
+        ~wxVTKRenderWindowInteractor();
+
+        // vtkRenderWindowInteractor overrides
+        void Initialize();
+        void Enable();
+        bool Enable(bool enable);
+        void Disable();
+        void Start();
+        void UpdateSize(int x, int y);
+        int CreateTimer(int timertype);
+        int DestroyTimer();
+        void TerminateApp() {};
+
+        virtual bool Reparent( wxWindowBase *newParent );
+
+        // event handlers
+        virtual void OnPaint(wxPaintEvent &event);
+        virtual void OnEraseBackground (wxEraseEvent& event);
+        virtual void OnMotion(wxMouseEvent &event);
+
+        virtual void OnButtonDown(wxMouseEvent &event);
+        virtual void OnButtonUp(wxMouseEvent &event);
+        virtual void OnMouseDoubleClick(wxMouseEvent &event);
+
+#if !(VTK_MAJOR_VERSION == 3 && VTK_MINOR_VERSION == 1)
+        virtual void OnEnter(wxMouseEvent &event);
+        virtual void OnLeave(wxMouseEvent &event);
+        virtual void OnMouseWheel(wxMouseEvent& event);
+        virtual void OnMouseCaptureLost(wxMouseCaptureLostEvent& event);
+        virtual void OnKeyDown(wxKeyEvent &event);
+        virtual void OnKeyUp(wxKeyEvent &event);
+        virtual void OnChar(wxKeyEvent &event);
+#endif
+        virtual void OnTimer(wxTimerEvent &event);
+        virtual void OnSize(wxSizeEvent &event);
+
+        void Render();
+        void SetRenderWhenDisabled(int newValue);
+
+        // Description:
+        // Prescribe that the window be created in a stereo-capable mode. This
+        // method must be called before the window is realized. Default if off.
+        vtkGetMacro(Stereo,int);
+        vtkBooleanMacro(Stereo,int);
+        virtual void SetStereo(int capable);
+
+        // Description:
+        // As CaptureMouse could be a problem sometimes on a window box
+        // This method allow to set or not the CaptureMouse.
+        // This method actually will works only if WX_USE_X_CAPTURE was set to 1
+        vtkSetMacro(UseCaptureMouse,int);
+        vtkBooleanMacro(UseCaptureMouse,int);
+
+#if VTK_MAJOR_VERSION > 5 || (VTK_MAJOR_VERSION == 5 && VTK_MINOR_VERSION >= 2)
+protected:
+        virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
+        virtual int InternalDestroyTimer(int platformTimerId);
+#endif
+
+protected:
+        wxTimer timer;
+        int ActiveButton;
+        long GetHandleHack();
+        int Stereo;
+
+private:
+        long Handle;
+        bool Created;
+        int RenderWhenDisabled;
+        int UseCaptureMouse;
+
+#if defined(__WXGTK__) && defined(wxUSE_GLCANVAS)
+        wxGLContext *GLContext;
+#endif
+
+        //----------------------------------------------------------------------------------------------------
+        //region Interfaz IWidgetsRenderer
+public:
+        virtual void PostRender(bool inmediato = false);
+
+        virtual void WSetCurrent();
+
+        virtual void OnActivar();
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de transformacion de coordenadas"
+public:
+        virtual void DisplayToWorld(double displayPos[3], double worldPos[4]);
+
+        virtual void WorldToDisplay(double worldPos[4], double displayPos[3]);
+
+        /** Gets camera vectors (camPos, camDir, camUp) **/
+        void GetCamVectors(double camPos[4], double camDir[4], double camUp[4]);
+
+        /** shots a ray from unproyected displayPos with camera direction and intersects with image plane **/
+        void RayPick(double displayPos[3], double worldPos[4]);
+
+        /** shots a ray from campPos with camera direction and intersects with image plane **/
+        void RayPick(double worldPos[4]);
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Helpers de contexto de dibujado"
+protected:
+        virtual void TransformarEvento(wxMouseEvent &event);
+        virtual void TransformarEvento(wxKeyEvent &event);
+        virtual void CrearContexto3D(int ancho, int alto);
+        virtual void DestruirContexto3D();
+
+        /* Proyecta worlPos sobre el viewport, crea un rectángulo de lado 1, lo reproyecta al mundo y devuelve las dimensiones del cubo envolvente de esta ultima reproyección.
+        * El resultado obtenido, sirve para calcular la proporción pixels pantalla <-> coordenadas mundo.
+        * Si pos es NULL, se utiliza el centro del viewport como punto generador del rectángulo.
+        * El resultado queda almacenado en el contexto de dibujado (miembro relacionMundoPantalla_{x,y,z})
+        */
+        virtual void  CalcularRelacionPixelsPantalla(vtkRenderer* pRenderer);
+        //endregion
+
+        DECLARE_EVENT_TABLE()
+};
+
+#endif //_wxVTKRenderWindowInteractor_h_
diff --git a/cadxcore/api/api.h b/cadxcore/api/api.h
new file mode 100644
index 0000000..4ee99b3
--- /dev/null
+++ b/cadxcore/api/api.h
@@ -0,0 +1,63 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef API_H
+#define API_H
+
+#if defined(_WINDOWS)
+#pragma warning (disable : 4231)
+#pragma warning (disable : 4275)
+#pragma warning (disable : 4251)
+#define DEPRECATED(reason) __declspec(deprecated(reason))
+
+#if defined(APIEXPORT)
+#if !defined(MONOLITIC)
+#define EXTAPI _declspec(dllexport)
+#define EXTAPI_TEMPLATE
+#else
+#define EXTAPI
+#define EXTAPI_TEMPLATE
+#endif
+#define NOINCLUDE
+#else
+#if !defined(MONOLITIC)
+#define EXTAPI _declspec(dllimport)
+#define EXTAPI_TEMPLATE extern
+#else
+#define EXTAPI
+#define EXTAPI_TEMPLATE
+#endif
+#define NOINCLUDE #error This file could not been included externally
+#endif
+#else
+#define DEPRECATED(reason) __attribute__((deprecated))
+#if defined(APIEXPORT)
+#define EXTAPI __attribute__((visibility("default")))
+#define EXTAPI_TEMPLATE
+#define NOINCLUDE
+#else
+#define EXTAPI
+#define EXTAPI_TEMPLATE extern
+#define NOINCLUDE #error This file could not been included externally
+#endif
+#endif
+
+#endif
diff --git a/cadxcore/api/apitest.h b/cadxcore/api/apitest.h
new file mode 100644
index 0000000..70c10b6
--- /dev/null
+++ b/cadxcore/api/apitest.h
@@ -0,0 +1,39 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#if defined(_WINDOWS)
+#pragma warning (disable : 4231)
+#pragma warning (disable : 4275)
+#pragma warning (disable : 4251)
+
+#if defined(LIBTEST_EXPORTS)
+#define EXTTEST _declspec(dllimport)
+#else
+#define EXTTEST _declspec(dllexport)
+#endif
+#else
+#if defined(LIBTEST_EXPORTS)
+#define EXTTEST
+#else
+#define EXTTEST __attribute__((visibility("default")))
+#endif
+#endif
diff --git a/cadxcore/api/autoptr.cpp b/cadxcore/api/autoptr.cpp
new file mode 100644
index 0000000..9dcc4fe
--- /dev/null
+++ b/cadxcore/api/autoptr.cpp
@@ -0,0 +1,40 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/autoptr.h>
+#include <api/internationalization/internationalization.h>
+
+//----------------------------------------------------------------------------------------------------
+
+GNC::GCS::NullPointerException::NullPointerException() throw() : GNC::GCS::IException(_Std("Attempted to dereference null pointer"))
+{
+}
+
+GNC::GCS::NullPointerException::~NullPointerException() throw()
+{
+}
+
+//----------------------------------------------------------------------------------------------------
+
+GNC::PtrCounter::PtrCounter(unsigned c) : count(c)
+{
+}
+//----------------------------------------------------------------------------------------------------
diff --git a/cadxcore/api/autoptr.h b/cadxcore/api/autoptr.h
new file mode 100644
index 0000000..1201bb1
--- /dev/null
+++ b/cadxcore/api/autoptr.h
@@ -0,0 +1,547 @@
+#pragma once
+/*
+*
+*  $Id: autoptr.h $
+*  Ginkgo CADx Project
+*
+*  Code based on yasper
+* ==========================
+*
+* yasper - A non-intrusive reference counted pointer.
+*	    Version: 1.04
+*
+*  Many ideas borrowed from Yonat Sharon and
+*  Andrei Alexandrescu.
+*
+* (zlib license)
+* ----------------------------------------------------------------------------------
+* Copyright (C) 2005-2007 Alex Rubinsteyn
+*
+* This software is provided 'as-is', without any express or implied
+* warranty.  In no event will the authors be held liable for any damages
+* arising from the use of this software.
+*
+* Permission is granted to anyone to use this software for any purpose,
+* including commercial applications, and to alter it and redistribute it
+* freely, subject to the following restrictions:
+*
+* 1. The origin of this software must not be misrepresented; you must not
+*    claim that you wrote the original software. If you use this software
+*    in a product, an acknowledgment in the product documentation would be
+*    appreciated but is not required.
+* 2. Altered source versions must be plainly marked as such, and must not be
+*    misrepresented as being the original software.
+* 3. This notice may not be removed or altered from any source distribution.
+*
+* -----------------------------------------------------------------------------------
+*
+* Send all questions, comments and bug reports to:
+* Alex Rubinsteyn (alex.rubinsteyn {at-nospam} gmail {dot} com)
+*/
+#ifndef AUTOPTR_H
+#define AUTOPTR_H
+#include <iostream>
+#include <exception>
+#include <string>
+#include <api/api.h>
+#include <api/ilock.h>
+#include <api/iexception.h>
+
+namespace GNC
+{
+
+//----------------------------------------------------------------------------------------------------
+
+class EXTAPI PtrCounter : public GNC::GCS::ILockable
+{
+public:
+        PtrCounter(unsigned c = 1);
+
+        unsigned count;
+};
+}
+
+namespace GNC
+{
+namespace GCS
+{
+
+
+//----------------------------------------------------------------------------------------------------
+
+class EXTAPI NullPointerException : public GNC::GCS::IException
+{
+public:
+        NullPointerException() throw();
+        ~NullPointerException() throw();
+};
+
+
+template <typename X>
+class Ptr : public ILockable
+{
+
+public:
+        typedef X element_type;
+
+        /*
+        Ptr needs to be its own friend so Ptr< X > and Ptr< Y > can access
+        each other's private data members
+        */
+        template <class Y> friend class Ptr;
+        /**
+        default constructor
+        - don't create Counter
+        **/
+        Ptr() : rawPtr(0), counter(0) { }
+
+        /**
+        Construct from a raw pointer
+        **/
+        Ptr(X* raw, PtrCounter* c = 0) : rawPtr(0), counter(0)
+        {
+                if (raw) {
+                        if (c) {
+                                GNC::GCS::ILocker clock(c);
+                                acquire(c);
+                                rawPtr = raw;
+                        } else {
+                                counter = new PtrCounter;
+                                rawPtr = raw;
+                        }
+                }
+        }
+
+        template <typename Y>
+        explicit Ptr(Y* raw, PtrCounter* c = 0) : rawPtr(0), counter(0)
+        {
+                if (raw) {
+                        if (c) {
+                                GNC::GCS::ILocker clock(c);
+                                acquire(c);
+                                rawPtr = static_cast<X*>( raw );
+                        } else {
+                                rawPtr = static_cast<X*>( raw );
+                                counter = new PtrCounter;
+                        }
+                }
+        }
+
+
+        /*
+        Copy constructor
+        */
+        Ptr(const Ptr< X >& otherPtr)
+        {
+                GNC::GCS::ILocker olock((Ptr<X>*) &otherPtr);
+
+                if (otherPtr.counter) {
+                        GNC::GCS::ILocker clock(otherPtr.counter);
+                        acquire( otherPtr.counter );
+                        rawPtr = otherPtr.rawPtr;
+                } else {
+                        counter = NULL;
+                        rawPtr = NULL;
+                }
+        }
+
+        template <typename Y>
+        explicit Ptr(const Ptr< Y >& otherPtr) : rawPtr(0), counter(0)
+        {
+                GNC::GCS::ILocker olock( (Ptr<Y>*) &otherPtr );
+
+                if (otherPtr.counter) {
+                        GNC::GCS::ILocker clock(otherPtr.counter);
+
+                        acquire(otherPtr.counter);
+                        rawPtr = static_cast<X*>( otherPtr.rawPtr );
+                }
+        }
+
+
+        /*
+        Destructor
+        */
+        ~Ptr()
+        {
+                GNC::GCS::ILocker lock(this);
+                release();
+        }
+
+        /*
+        Assignment to another Ptr
+        */
+
+        Ptr& operator=(const Ptr< X >& otherPtr)
+        {
+
+                if (this != &otherPtr) {
+                        release();
+
+                        if (otherPtr.counter) {
+                                GNC::GCS::ILocker cLock(otherPtr.counter);
+                                acquire(otherPtr.counter);
+                                rawPtr = static_cast<X*> (otherPtr.rawPtr);
+                        } else {
+                                rawPtr = NULL;
+                                counter = NULL;
+                        }
+
+
+                }
+
+                return *this;
+        }
+
+        template <typename Y>
+        Ptr& operator=(const Ptr< Y >& otherPtr)
+        {
+                GNC::GCS::ILocker lock(this);
+                GNC::GCS::ILocker olock((Ptr<Y>*) &otherPtr);
+
+                if ( this != (Ptr< X >*) &otherPtr ) {
+                        release();
+
+                        if (otherPtr.counter) {
+                                GNC::GCS::ILocker clock (otherPtr.counter);
+
+                                acquire(otherPtr.counter);
+                                rawPtr = static_cast<X*> (otherPtr.rawPtr);
+                        }
+                }
+                return *this;
+        }
+
+        /*
+        Assignment to raw pointers is really dangerous business.
+        If the raw pointer is also being used elsewhere,
+        we might prematurely delete it, causing much pain.
+        Use sparingly/with caution.
+        */
+
+        Ptr& operator=(X* raw)
+        {
+                GNC::GCS::ILocker lock(this);
+                if (raw) {
+                        release();
+
+                        PtrCounter* c = new PtrCounter;
+                        GNC::GCS::ILocker lock(c);
+
+                        counter = c;
+                        rawPtr = raw;
+
+                }
+                return *this;
+        }
+
+        template <typename Y>
+        Ptr& operator=(Y* raw)
+        {
+                GNC::GCS::ILocker lock(this);
+                if (raw) {
+                        release();
+
+                        PtrCounter* c = new PtrCounter();
+
+                        GNC::GCS::ILocker lock(c);
+
+                        counter = c;
+                        rawPtr = static_cast<X*>(raw);
+
+                }
+                return *this;
+        }
+
+        /*
+        assignment to long to allow Ptr< X > = NULL,
+        also allows raw pointer assignment by conversion.
+        Raw pointer assignment is really dangerous!
+        If the raw pointer is being used elsewhere,
+        it will get deleted prematurely.
+        */
+        Ptr& operator=(long num)
+        {
+                GNC::GCS::ILocker lock(this);
+                if (num == 0) { //pointer set to null
+                        release();
+                }
+
+                else { //assign raw pointer by conversion
+                        release();
+                        PtrCounter* c = new PtrCounter();
+
+                        GNC::GCS::ILocker lock(c);
+
+                        counter = c;
+                        rawPtr = reinterpret_cast<X*>(num);
+
+                }
+
+                return *this;
+        }
+
+        /*
+        Member Access
+        */
+        X* operator->() const
+        {
+                return GetRawPointer();
+        }
+
+
+        /*
+        Dereference the pointer
+        */
+        X& operator* () const
+        {
+                return *GetRawPointer();
+        }
+
+
+        /*
+        Conversion/casting operators
+        */
+
+
+        operator bool() const
+        {
+                return IsValid();
+        }
+
+
+        /*
+        implicit casts to base types of the
+        the pointer we're storing
+        */
+
+        template <typename Y>
+        operator Y*() const
+        {
+                return static_cast<Y*>(rawPtr);
+        }
+
+        template <typename Y>
+        operator const Y*() const
+        {
+                return static_cast<const Y*>(rawPtr);
+        }
+
+        template <typename Y>
+        operator Ptr<Y>()
+        {
+                //new Ptr must also take our counter or else the reference counts
+                //will go out of sync
+                return Ptr<Y>(rawPtr, counter);
+        }
+
+
+        /*
+        Provide access to the raw pointer
+        */
+
+        X* GetRawPointer() const
+        {
+                X* r = NULL;
+
+                r = rawPtr;
+
+                if (r == 0) {
+                        throw new GNC::GCS::NullPointerException;
+                }
+
+                return r;
+        }
+
+
+        /*
+        Is there only one reference on the counter?
+        */
+        bool IsUnique() const
+        {
+                bool unique = false;
+
+                if (counter) {
+                        unique = (counter->count == 1);
+                } else {
+                        unique = true;
+                }
+
+                return unique;
+        }
+
+        bool IsValid() const
+        {
+                bool valid = false;
+
+                if (counter) {
+                        valid = (rawPtr != NULL);
+                }
+
+                return valid;
+        }
+
+        unsigned GetCount() const
+        {
+                int count = 0;
+
+                if (counter) {
+                        count = counter->count;
+                }
+                return 0;
+        }
+
+private:
+        X* rawPtr;
+
+        PtrCounter* counter;
+
+        // increment the count
+        void acquire(PtrCounter* c)
+        {
+                counter = c;
+                (c->count)++;
+        }
+
+        // decrement the count, delete if it is 0
+        void release()
+        {
+                if (counter) {
+                        PtrCounter* c = counter;
+
+                        bool doDelete = false;
+
+                        X* r = NULL;
+
+                        {
+                                GNC::GCS::ILocker lock(c);
+
+                                r = rawPtr;
+
+                                (c->count)--;
+
+                                if (c->count == 0) {
+                                        counter = NULL;
+                                        rawPtr = NULL;
+
+                                        doDelete = true;
+                                }
+                        }
+
+                        if (doDelete) {
+                                delete c;
+                                delete r;
+                        }
+                }
+
+        }
+};
+
+
+template <typename X, typename Y>
+bool operator==(const Ptr< X >& lPtr, const Ptr< Y >& rPtr)
+{
+        return lPtr.GetRawPointer() == rPtr.GetRawPointer();
+}
+
+template <typename X, typename Y>
+bool operator==(const Ptr< X >& lPtr, Y* raw)
+{
+        return lPtr.GetRawPointer() == raw ;
+}
+
+template <typename X>
+bool operator==(const Ptr< X >& lPtr, long num)
+{
+        if (num == 0 && !lPtr.IsValid()) { //both pointer and address are null
+                return true;
+        }
+
+        else { //convert num to a pointer, compare addresses
+                return lPtr == reinterpret_cast<X*>(num);
+        }
+
+}
+
+template <typename X, typename Y>
+bool operator!=(const Ptr< X >& lPtr, const Ptr< Y >& rPtr)
+{
+        return ( !operator==(lPtr, rPtr) );
+}
+
+template <typename X, typename Y>
+bool operator!=(const Ptr< X >& lPtr, Y* raw)
+{
+        return ( !operator==(lPtr, raw) );
+}
+
+template <typename X>
+bool operator!=(const Ptr< X >& lPtr, long num)
+{
+        return (!operator==(lPtr, num) );
+}
+
+template <typename X, typename Y>
+bool operator&&(const Ptr< X >& lPtr, const Ptr< Y >& rPtr)
+{
+        return lPtr.IsValid() &&  rPtr.IsValid();
+}
+
+template <typename X>
+bool operator&&(const Ptr< X >& lPtr, bool rval)
+{
+        return lPtr.IsValid() && rval;
+}
+
+template <typename X>
+bool operator&&(bool lval, const Ptr< X >& rPtr)
+{
+        return lval &&  rPtr.IsValid();
+}
+
+template <typename X, typename Y>
+bool operator||(const Ptr< X >& lPtr, const Ptr< Y >& rPtr)
+{
+        return lPtr.IsValid() || rPtr.IsValid();
+}
+
+template <typename X>
+bool operator||(const Ptr< X >& lPtr, bool rval)
+{
+        return lPtr.IsValid() || rval;
+}
+
+template <typename X>
+bool operator||(bool lval, const Ptr< X >& rPtr)
+{
+        return lval || rPtr.IsValid();
+}
+
+template <typename X>
+bool operator!(const Ptr< X >& p)
+{
+        return (!p.IsValid());
+}
+
+
+/* less than comparisons for storage in containers */
+template <typename X, typename Y>
+bool operator< (const Ptr< X >& lPtr, const Ptr < Y >& rPtr)
+{
+        return lPtr.GetRawPointer() < rPtr.GetRawPointer();
+}
+
+template <typename X, typename Y>
+bool operator< (const Ptr< X >& lPtr, Y* raw)
+{
+        return lPtr.GetRawPointer() < raw;
+}
+
+template <typename X, typename Y>
+bool operator< (X* raw, const Ptr< Y >& rPtr)
+{
+        return raw < rPtr.GetRawPointer();
+}
+}
+}
+#endif
diff --git a/cadxcore/api/cloud.h b/cadxcore/api/cloud.h
new file mode 100644
index 0000000..75af9b5
--- /dev/null
+++ b/cadxcore/api/cloud.h
@@ -0,0 +1,23 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#define GINKGO_CLOUD_URI "<invalid>"
+#define GINKGO_CLOUD_DEFAULT_BUCKET "public"
diff --git a/cadxcore/api/controllers/anonusagestatsids.h b/cadxcore/api/controllers/anonusagestatsids.h
new file mode 100644
index 0000000..d8ef40f
--- /dev/null
+++ b/cadxcore/api/controllers/anonusagestatsids.h
@@ -0,0 +1,56 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+/**Ids use to send anonymous statistics about usage of the app*/
+
+//viewers usage
+#define ANON_STAT_VIEW_OS "VIEW_OS"
+#define ANON_STAT_VIEW_ECG "VIEW_ECG"
+
+//dicomizers usage
+#define ANON_STAT_DICOMIZE "DICOMIZE_"
+
+//file acquisition usage
+#define ANON_STAT_OPEN_FILE "OPEN_FILE"
+#define ANON_STAT_OPEN_FOLDER "OPEN_FOLDER"
+#define ANON_STAT_OPEN_CD "OPEN_CD"
+#define ANON_STAT_OPEN_CLOUD "OPEN_CLOUD"
+
+//system usage
+#define ANON_STAT_RUN_GINKGO "RUN_GINKGO"
+
+//other options usage
+#define ANON_STAT_DLG_CLOUD_SEARCH "DLG_CLOUD_SEARCH"
+#define ANON_STAT_DLG_PACS_SEARCH "DLG_PACS_SEARCH"
+#define ANON_STAT_DLG_PACS_UPLOAD "DLG_PACS_UPLOAD"
+#define ANON_STAT_DLG_HISTORY "DLG_HISTORY"
+#define ANON_STAT_DLG_EXPORT "DLG_EXPORT"
+#define ANON_STAT_DLG_DICOM_DIR_EXPORT "DLG_DICOM_DIR_EXPORT"
+
+//integration usage
+#define ANON_STAT_INT_URL "INT_URL"
+#define ANON_STAT_INT_DICOMIZE "INT_DICOMIZE"
+#define ANON_STAT_INT_RETRIEVE "INT_RETRIEVE"
+#define ANON_STAT_INT_OPEN "INT_OPEN"
+
+//license acceptance
+#define ANON_STAT_ACCEPT_LICENSE "ACCEPT_LICENSE"
diff --git a/cadxcore/api/controllers/icommandcontroller.cpp b/cadxcore/api/controllers/icommandcontroller.cpp
new file mode 100644
index 0000000..1f2e68c
--- /dev/null
+++ b/cadxcore/api/controllers/icommandcontroller.cpp
@@ -0,0 +1,47 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "icommandcontroller.h"
+#include <main/controllers/commandcontroller.h>
+
+GNC::GCS::CommandControllerException::CommandControllerException(const std::string& msg, const std::string& componente, bool fatal) throw() : GNC::GCS::IException(msg, componente, fatal)
+{
+}
+
+GNC::GCS::ICommandController::ICommandController()
+{
+}
+
+GNC::GCS::ICommandController::~ICommandController()
+{
+}
+
+GNC::GCS::ICommandController* GNC::GCS::ICommandController::Instance()
+{
+        return GNC::CommandController::Instance();
+
+}
+
+void GNC::GCS::ICommandController::FreeInstance()
+{
+        GNC::CommandController::FreeInstance();
+
+}
diff --git a/cadxcore/api/controllers/icommandcontroller.h b/cadxcore/api/controllers/icommandcontroller.h
new file mode 100644
index 0000000..d5ce5af
--- /dev/null
+++ b/cadxcore/api/controllers/icommandcontroller.h
@@ -0,0 +1,66 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ICOMMANDSCONTROLLER_H
+#define ICOMMANDSCONTROLLER_H
+
+#include <string>
+
+#include <api/iexception.h>
+#include <api/icommand.h>
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI CommandControllerException : public GNC::GCS::IException
+{
+public:
+        CommandControllerException(const std::string& msg, const std::string& componente = "Model", bool fatal = true) throw();
+};
+
+
+class EXTAPI ICommandController
+{
+
+protected:
+        ICommandController();
+        virtual ~ICommandController();
+
+public:
+
+        static ICommandController* Instance();
+        static void FreeInstance();
+
+        virtual void ProcessSync(IComando*, bool autodelete, bool update = true, GNC::INotificadorProgreso* pNotifier = NULL) = 0;
+        virtual void ProcessAsync(const std::string& descr, IComando*, void* owner) = 0;
+        virtual void AbortarComando(long threadId, bool sincrono = true) = 0;
+        virtual void AbortarComandosDeOwner(void* owner) = 0;
+        virtual void AbortarComandosDeOwnerAsincrono(void* owner) = 0;
+        virtual void AbortarComando(IComando* pComando, bool sincrono = true) = 0;
+
+        virtual unsigned int GetNumActiveCommands() = 0;
+
+};
+}
+}
+#endif
diff --git a/cadxcore/api/controllers/iconfigurationcontroller.cpp b/cadxcore/api/controllers/iconfigurationcontroller.cpp
new file mode 100644
index 0000000..3fff011
--- /dev/null
+++ b/cadxcore/api/controllers/iconfigurationcontroller.cpp
@@ -0,0 +1,43 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iconfigurationcontroller.h"
+#include <string>
+#include <api/autoptr.h>
+#include <main/controllers/configurationcontroller.h>
+
+GNC::GCS::IConfigurationController::IConfigurationController()
+{
+}
+
+GNC::GCS::IConfigurationController::~IConfigurationController()
+{
+}
+
+GNC::GCS::IConfigurationController* GNC::GCS::IConfigurationController::Instance()
+{
+        return GNC::GCS::ConfigurationController::Instance();
+}
+
+void GNC::GCS::IConfigurationController::FreeInstance()
+{
+        GNC::GCS::ConfigurationController::FreeInstance();
+}
+
diff --git a/cadxcore/api/controllers/iconfigurationcontroller.h b/cadxcore/api/controllers/iconfigurationcontroller.h
new file mode 100644
index 0000000..638a20f
--- /dev/null
+++ b/cadxcore/api/controllers/iconfigurationcontroller.h
@@ -0,0 +1,119 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <map>
+#include <list>
+#include <sstream>
+
+#include <api/api.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI  IConfigurationController
+{
+public:
+        class TMapValues: public std::map<std::string, std::string>
+        {
+        public:
+                bool readStringValue(const std::string& key, std::string& value, const std::string& defaultValue = "")
+                {
+                        if (find(key) != end()) {
+                                value = (*this)[key];
+                                return true;
+                        } else {
+                                value = defaultValue;
+                                return false;
+                        }
+                }
+                bool readBoolValue(const std::string& key, bool& value, bool defaultValue = true)
+                {
+                        if (find(key) != end()) {
+                                std::istringstream istr((*this)[key]);
+                                istr >> value;
+                                return true;
+                        } else {
+                                value = defaultValue;
+                                return false;
+                        }
+                }
+
+                bool readIntValue(const std::string& key, int& value, int defaultValue = 0)
+                {
+                        if (find(key) != end()) {
+                                std::istringstream istr((*this)[key]);
+                                istr >> value;
+                                return true;
+                        } else {
+                                value = defaultValue;
+                                return false;
+                        }
+                }
+
+                void insertInt(const std::string& key, int value)
+                {
+                        std::ostringstream ostr;
+                        ostr << value;
+                        (*this)[key] = ostr.str();
+                }
+
+                void insertBool(const std::string& key, bool value)
+                {
+                        std::ostringstream ostr;
+                        ostr << value;
+                        (*this)[key] = ostr.str();
+                }
+        };
+        typedef std::list<TMapValues> TListGroups;
+
+        virtual void Flush() = 0;
+
+        virtual bool deleteEntryGeneral(const std::string& scope, const std::string&key = "") = 0;
+        virtual bool writeStringGeneral(const std::string& scope, const std::string& key, const std::string& value) = 0;
+        virtual bool readStringGeneral(const std::string& scope, const std::string& key, std::string& value, const std::string& defaultValue = "") = 0;
+        virtual bool writeBoolGeneral(const std::string& scope, const std::string& key, bool value) = 0;
+        virtual bool readBoolGeneral(const std::string& scope, const std::string& key, bool& value, bool defaultValue = true) = 0;
+        virtual bool readIntGeneral(const std::string& scope, const std::string& key, int& value, int defaultValue = 0) = 0;
+        virtual bool writeIntGeneral(const std::string& scope, const std::string& key, int value) = 0;
+        virtual bool writeGroupGeneral(const std::string& scope, const TListGroups& listOfGroups, const std::string& prefix = "") = 0;
+        virtual bool readGroupGeneral(const std::string& scope, TListGroups& listOfGroups) = 0;
+
+        virtual bool deleteEntryUser(const std::string& scope, const std::string&key = "") = 0;
+        virtual bool writeStringUser(const std::string& scope, const std::string& key, const std::string& value) = 0;
+        virtual bool readStringUser(const std::string& scope, const std::string& key, std::string& value, const std::string& defaultValue = "") = 0;
+        virtual bool readBoolUser(const std::string& scope, const std::string& key, bool& value, bool defaultValue = true) = 0;
+        virtual bool writeBoolUser(const std::string& scope, const std::string& key, bool value) = 0;
+        virtual bool readIntUser(const std::string& scope, const std::string& key, int& value, int defaultValue = 0) = 0;
+        virtual bool writeIntUser(const std::string& scope, const std::string& key, int value) = 0;
+        virtual bool writeGroupUser(const std::string& scope, const TListGroups& listOfGroups, const std::string& prefix = "") = 0;
+        virtual bool readGroupUser(const std::string& scope, TListGroups& listOfGroups) = 0;
+
+        static IConfigurationController* Instance();
+        static void FreeInstance();
+protected:
+        IConfigurationController();
+        virtual ~IConfigurationController();
+};
+}
+}
diff --git a/cadxcore/api/controllers/icontroladoracciones.cpp b/cadxcore/api/controllers/icontroladoracciones.cpp
new file mode 100644
index 0000000..2d53267
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladoracciones.cpp
@@ -0,0 +1,69 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "icontroladoracciones.h"
+#include <string>
+#include <api/autoptr.h>
+#include <main/controllers/controladoracciones.h>
+
+GNC::GCS::Accion::Accion(const std::string& nombre, bool puedeRehacerse, const int peso) : m_nombre(nombre), m_peso(peso), m_puedeRehacerse(puedeRehacerse)
+{
+}
+
+GNC::GCS::Accion::~Accion()
+{
+}
+
+const std::string& GNC::GCS::Accion::GetNombre()
+{
+        return m_nombre;
+}
+
+bool GNC::GCS::Accion::PuedeRehacer()
+{
+        return m_puedeRehacerse;
+}
+
+void GNC::GCS::Accion::SetPuedeRehacerse(bool puedeRehacerse)
+{
+        m_puedeRehacerse = puedeRehacerse;
+}
+
+void GNC::GCS::Accion::Hacer()
+{
+}
+
+GNC::GCS::IControladorAcciones::IControladorAcciones()
+{
+}
+
+GNC::GCS::IControladorAcciones::~IControladorAcciones()
+{
+}
+
+GNC::GCS::IControladorAcciones* GNC::GCS::IControladorAcciones::Instance()
+{
+        return GNC::GCS::ControladorAcciones::Instance();
+}
+
+void GNC::GCS::IControladorAcciones::FreeInstance()
+{
+        GNC::GCS::ControladorAcciones::FreeInstance();
+}
diff --git a/cadxcore/api/controllers/icontroladoracciones.h b/cadxcore/api/controllers/icontroladoracciones.h
new file mode 100644
index 0000000..c78d7c7
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladoracciones.h
@@ -0,0 +1,72 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <api/autoptr.h>
+
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI Accion
+{
+public:
+        Accion(const std::string& nombre, bool puedeRehacerse = true, const int peso = 1);
+        virtual ~Accion();
+
+        virtual const std::string& GetNombre();
+        virtual void Deshacer() = 0;
+        virtual bool PuedeRehacer();
+        virtual void Hacer();
+
+protected:
+        virtual void SetPuedeRehacerse(bool puedeRehacerse = true);
+
+        std::string m_nombre;
+        int m_peso;
+        bool m_puedeRehacerse;
+};
+
+class EXTAPI IControladorAcciones
+{
+protected:
+        IControladorAcciones();
+        ~IControladorAcciones();
+public:
+        static IControladorAcciones* Instance();
+        static void FreeInstance();
+
+        virtual void PushAccion(GNC::GCS::IVista* pVista, GNC::GCS::Ptr<Accion> pAccion) = 0;
+protected:
+};
+}
+}
+
diff --git a/cadxcore/api/controllers/icontroladorautenticacion.h b/cadxcore/api/controllers/icontroladorautenticacion.h
new file mode 100644
index 0000000..92cba65
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladorautenticacion.h
@@ -0,0 +1,69 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <api/api.h>
+#include <api/iexception.h>
+
+class IModeloDicom;
+namespace GNC
+{
+namespace GCS
+{
+class IEntorno;
+}
+class IProxyNotificadorProgreso;
+}
+
+namespace GSEC
+{
+namespace Auth
+{
+
+class AuthException : GNC::GCS::IException
+{
+public:
+        AuthException(const std::string& msg, const std::string& componente="GSEC/Auth", bool _fatal = true) : GNC::GCS::IException(msg, componente, _fatal)
+        {
+        }
+        ~AuthException() throw()
+        {
+        }
+};
+
+class EXTAPI IControladorAutenticacion
+{
+public:
+
+        virtual bool Auth (const std::string& usuario, const std::string& password) = 0;
+
+protected:
+
+        IControladorAutenticacion()
+        {
+        }
+
+        virtual ~IControladorAutenticacion()
+        {
+        }
+};
+}
+}
diff --git a/cadxcore/api/controllers/icontroladorcarga.cpp b/cadxcore/api/controllers/icontroladorcarga.cpp
new file mode 100644
index 0000000..5d36147
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladorcarga.cpp
@@ -0,0 +1,46 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+
+#include "icontroladorcarga.h"
+GNC::GCS::ControladorCargaException::ControladorCargaException(const std::string& msg, const std::string& componente, bool fatal) : GNC::GCS::IException(msg, componente, fatal)
+{
+}
+
+GNC::GCS::ControladorCargaException::~ControladorCargaException() throw()
+{
+}
+
+GNC::GCS::IControladorCarga::IControladorCarga()
+{
+}
+
+GNC::GCS::IControladorCarga::~IControladorCarga()
+{
+}
+
+GNC::GCS::IStreamingLoader::IStreamingLoader()
+{
+}
+
+GNC::GCS::IStreamingLoader::~IStreamingLoader()
+{
+}
diff --git a/cadxcore/api/controllers/icontroladorcarga.h b/cadxcore/api/controllers/icontroladorcarga.h
new file mode 100644
index 0000000..bc0b7e8
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladorcarga.h
@@ -0,0 +1,117 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <vector>
+#include <string>
+#include <iostream>
+#include <exception>
+#include <api/icommand.h>
+#include <api/ilock.h>
+#include <api/controllers/proxies/ipipelineproperties.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtkSmartPointer.h>
+#include <api/autoptr.h>
+namespace GIL
+{
+class IModeloIntegracion;
+}
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+class vtkImageData;
+class vtkAlgorithmOutput;
+
+namespace GNC
+{
+namespace GCS
+{
+
+class ControladorCargaException : public GNC::GCS::IException
+{
+public:
+        ControladorCargaException(const std::string& msg, const std::string& componente="Modelo", bool fatal = true);
+
+        ~ControladorCargaException() throw();
+protected:
+};
+
+class IStreamingLoader;
+class IControladorCarga
+{
+public:
+        typedef std::list<std::string> ListaRutas;
+        typedef std::list<ListaRutas> TListaDeListaDeRutas;
+
+        virtual vtkSmartPointer<vtkImageData> CargarITKMultidimensional(IComando* cmd, ListaRutas& listaFicheros, int* orientacion, double* spacing = NULL) = 0;
+        virtual vtkSmartPointer<vtkImageData> CargarITK(IComando* cmd, std::string& path, int* orientacion, double* spacing = NULL) = 0;
+
+        virtual void CargaAsincrona(GNC::GCS::IVista* pVista, const bool loadFirst = true) = 0;
+
+        //region Creacion y destruccion de componente de carga en streaming
+        virtual IStreamingLoader* NewLoader() = 0;
+        virtual void FreeLoader(GNC::GCS::IStreamingLoader** loader) = 0;
+        //endregion
+
+protected:
+        IControladorCarga();
+        ~IControladorCarga();
+};
+
+
+class EXTAPI IStreamingLoader : public IPipelineProperties, public GNC::GCS::ILockable
+{
+public:
+        //region Constructor
+        IStreamingLoader();
+
+        virtual ~IStreamingLoader();
+
+        virtual bool IsSignalFile() = 0;
+
+        /** Fija un fichero de entrada y reestablece el pipeline interno de carga si es necesario **/
+        virtual void SetInput(const std::string& fichero) = 0;
+
+        /** Devuelve el puerto de salida **/
+        virtual vtkSmartPointer<vtkAlgorithmOutput> GetOutputPort() = 0;
+
+        /** Devuelve por parametro una copia de la imagen **/
+        virtual void GetOutputCopy(vtkSmartPointer<vtkImageData>& output) = 0;
+
+        /** establece el spacing **/
+        virtual void SetOutputSpacing(double spacing[3]) = 0;
+
+        /** establece el origen **/
+        virtual void SetOutputOrigin(double origin[3]) = 0;
+
+        /** **/
+        virtual std::string  GetPatientPosition()  = 0;
+
+};
+}
+}
diff --git a/cadxcore/api/controllers/icontroladorextensiones.h b/cadxcore/api/controllers/icontroladorextensiones.h
new file mode 100644
index 0000000..89f0e45
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladorextensiones.h
@@ -0,0 +1,113 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <map>
+
+#include <api/api.h>
+#include <api/iexception.h>
+
+class PrivateExtension;
+
+namespace GADVAPI
+{
+
+class EXTAPI IPrivateExtensionWrapper
+{
+
+public:
+
+        virtual ~IPrivateExtensionWrapper() {}
+
+#if defined(MONOLITIC)
+        virtual bool Load(PrivateExtension* pExt) = 0;
+#else
+        virtual bool Load() = 0;
+#endif
+        virtual bool UnLoad() = 0;
+        virtual bool IsLoaded() const = 0;
+
+        virtual bool IsActivated() const
+        {
+                return true;
+        }
+
+        virtual const std::string& GetProvider() const = 0;
+        virtual const std::string& GetDescription() const = 0;
+
+        virtual const std::string& GetUpdateURL() const = 0;
+
+        virtual const std::string& GetError() const = 0;
+
+        virtual PrivateExtension* GetExtension() = 0;
+
+};
+
+class EXTAPI PrivateExtensionManager : private std::map<std::string, IPrivateExtensionWrapper*>
+{
+public:
+
+        typedef std::map<std::string, IPrivateExtensionWrapper*> Base;
+        typedef Base::iterator iterator;
+
+        PrivateExtensionManager();
+        ~PrivateExtensionManager();
+
+        IPrivateExtensionWrapper* GetExtension(const std::string& nombre);
+
+        void Scan();
+
+        void UnLoadAll();
+
+        iterator begin();
+        iterator end();
+
+};
+}
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IExtensionException : public IException
+{
+public:
+
+protected:
+        IExtensionException(const std::string& msg, const std::string& component="GNC", bool fatal = true) throw();
+
+        ~IExtensionException() throw();
+};
+
+class EXTAPI IControladorExtensiones
+{
+public:
+        virtual GADVAPI::PrivateExtensionManager& GetPrivateExtensionsManager() = 0;
+
+protected:
+        IControladorExtensiones();
+        virtual ~IControladorExtensiones();
+};
+}
+}
+
diff --git a/cadxcore/api/controllers/icontroladorinternacionalizacion.h b/cadxcore/api/controllers/icontroladorinternacionalizacion.h
new file mode 100644
index 0000000..62dd50b
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladorinternacionalizacion.h
@@ -0,0 +1,36 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+namespace GNC
+{
+namespace GCS
+{
+class IControladorInternacionalizacion
+{
+public:
+        IControladorInternacionalizacion() { }
+        virtual ~IControladorInternacionalizacion() { }
+
+        virtual void AddCatalog(const std::string& catalogName) = 0;
+};
+}
+}
diff --git a/cadxcore/api/controllers/icontroladorlog.cpp b/cadxcore/api/controllers/icontroladorlog.cpp
new file mode 100644
index 0000000..132a399
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladorlog.cpp
@@ -0,0 +1,41 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "icontroladorlog.h"
+#include <main/controllers/controladorlog.h>
+
+GNC::GCS::IControladorLog* GNC::GCS::IControladorLog::Instance()
+{
+        return GNC::ControladorLog::Instance();
+}
+
+void GNC::GCS::IControladorLog::FreeInstance()
+{
+        GNC::ControladorLog::FreeInstance();
+}
+
+GNC::GCS::IControladorLog::IControladorLog()
+{
+}
+
+GNC::GCS::IControladorLog::~IControladorLog()
+{
+}
diff --git a/cadxcore/api/controllers/icontroladorlog.h b/cadxcore/api/controllers/icontroladorlog.h
new file mode 100644
index 0000000..7b90731
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladorlog.h
@@ -0,0 +1,138 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ILOGCONTROLLER_H
+#define ILOGCONTROLLER_H
+#include <map>
+#include <sstream>
+
+#include <api/api.h>
+
+#define LOG_FATAL(logger, mensaje) \
+{ \
+	GNC::GCS::IControladorLog* cL = GNC::GCS::IControladorLog::Instance(); \
+	if (cL != NULL && cL->IsEnabledFor(GNC::GCS::IControladorLog::FatalLog) ) { \
+		std::ostringstream  _buf;\
+		_buf << mensaje;\
+		cL->Log(logger,_buf.str(),GNC::GCS::IControladorLog::FatalLog);\
+	} \
+}
+
+#define LOG_ERROR(logger, mensaje) \
+{ \
+	GNC::GCS::IControladorLog* cL = GNC::GCS::IControladorLog::Instance(); \
+	if (cL != NULL && cL->IsEnabledFor(GNC::GCS::IControladorLog::ErrorLog) ) { \
+		std::ostringstream  _buf;\
+		_buf << mensaje;\
+		cL->Log(logger,_buf.str(),GNC::GCS::IControladorLog::ErrorLog);\
+	} \
+}
+
+#define LOG_WARN(logger, mensaje) \
+{ \
+	GNC::GCS::IControladorLog* cL = GNC::GCS::IControladorLog::Instance(); \
+	if (cL != NULL && cL->IsEnabledFor(GNC::GCS::IControladorLog::WarnLog) ) { \
+		std::ostringstream  _buf;\
+		_buf << mensaje;\
+		cL->Log(logger,_buf.str(),GNC::GCS::IControladorLog::WarnLog);\
+	} \
+}
+
+#define LOG_INFO(logger, mensaje) \
+{ \
+	GNC::GCS::IControladorLog* cL = GNC::GCS::IControladorLog::Instance(); \
+	if (cL != NULL && cL->IsEnabledFor(GNC::GCS::IControladorLog::InfoLog) ) { \
+		std::ostringstream  _buf;\
+		_buf << mensaje;\
+		cL->Log(logger,_buf.str(),GNC::GCS::IControladorLog::InfoLog);\
+	} \
+}
+
+#define LOG_DEBUG(logger, mensaje) \
+{ \
+	GNC::GCS::IControladorLog* cL = GNC::GCS::IControladorLog::Instance(); \
+	if (cL != NULL && cL->IsEnabledFor(GNC::GCS::IControladorLog::DebugLog) ) { \
+		std::ostringstream  _buf;\
+		_buf << mensaje;\
+		cL->Log(logger,_buf.str(),GNC::GCS::IControladorLog::DebugLog);\
+	} \
+}
+
+#define LOG_TRACE(logger, mensaje) \
+{ \
+	GNC::GCS::IControladorLog* cL = GNC::GCS::IControladorLog::Instance(); \
+	if (cL != NULL && cL->IsEnabledFor(GNC::GCS::IControladorLog::TraceLog) ) { \
+		std::ostringstream  _buf;\
+		_buf << mensaje;\
+		cL->Log(logger,_buf.str(),GNC::GCS::IControladorLog::TraceLog);\
+	} \
+}
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IControladorLog
+{
+public:
+        typedef std::map<int, std::string> MapaLogLevels;
+
+public:
+        typedef enum {
+                NoLog = 0,
+                FatalLog,
+                ErrorLog,
+                WarnLog,
+                InfoLog,
+                DebugLog,
+                TraceLog
+        } LogLevel;
+
+        static IControladorLog* Instance();
+        static void FreeInstance();
+
+protected:
+        //--- Constructores
+        IControladorLog();
+        virtual ~IControladorLog();
+public:
+        //log en el logger por defecto
+        virtual void Log(const std::string& mensaje, LogLevel logLevel = DebugLog) = 0;
+        //log en otro logger
+        virtual void Log(const std::string& logger, const std::string& mensaje,LogLevel logLevel = DebugLog) = 0;
+        //logs con contexto
+        virtual void LogConContexto(const std::string& contexto, const std::string& mensaje,LogLevel logLevel = DebugLog) = 0;
+        //logs en logger especifico con contexto
+        virtual void LogConContexto(const std::string& logger, const std::string& contexto, const std::string& mensaje,LogLevel logLevel = DebugLog) = 0;
+
+        virtual bool IsEnabledFor(LogLevel logLevel) = 0;
+
+        virtual void GetLogLevelsMap(GNC::GCS::IControladorLog::MapaLogLevels& levels) = 0;
+        virtual int GetLogLevelCode(const std::string& level) = 0;
+
+        virtual int GetActiveLogLevel() = 0;
+
+        virtual void SetActiveLogLevel(int logLevel) = 0;
+
+};
+}
+}
+#endif
diff --git a/cadxcore/api/controllers/icontroladorpermisos.cpp b/cadxcore/api/controllers/icontroladorpermisos.cpp
new file mode 100644
index 0000000..d416a41
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladorpermisos.cpp
@@ -0,0 +1,46 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "icontroladorpermisos.h"
+#include <main/controllers/controladorpermisos.h>
+
+GNC::GCS::ControladorPermisosException::ControladorPermisosException(const std::string& msg, bool fatal) throw() : GNC::GCS::IException(msg, "GNC", fatal)
+{
+}
+
+
+GNC::GCS::IControladorPermisos::IControladorPermisos()
+{
+}
+
+GNC::GCS::IControladorPermisos::~IControladorPermisos()
+{
+}
+GNC::GCS::IControladorPermisos* GNC::GCS::IControladorPermisos::Instance()
+{
+        return GNC::ControladorPermisos::Instance();
+}
+
+void GNC::GCS::IControladorPermisos::FreeInstance()
+{
+        GNC::ControladorPermisos::FreeInstance();
+
+}
diff --git a/cadxcore/api/controllers/icontroladorpermisos.h b/cadxcore/api/controllers/icontroladorpermisos.h
new file mode 100644
index 0000000..89f52f0
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladorpermisos.h
@@ -0,0 +1,182 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <ostream>
+#include <sstream>
+#include <api/iexception.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI ControladorPermisosException : public GNC::GCS::IException
+{
+public:
+        ControladorPermisosException(const std::string& msg, bool fatal = true) throw();
+};
+
+namespace Permisos
+{
+class EstadoPermiso
+{
+
+public:
+
+        EstadoPermiso()
+        {
+                m_Activo = m_ActivoPorDefecto = false;
+                m_PermisoValido = false;
+        }
+
+        EstadoPermiso(const EstadoPermiso* const o)
+        {
+                if (o != NULL) {
+                        *this = *o;
+                } else {
+                        m_Activo = m_ActivoPorDefecto = true;
+                        m_PermisoValido = false;
+                }
+        }
+
+        EstadoPermiso(const EstadoPermiso& o)
+        {
+                *this = o;
+        }
+
+        EstadoPermiso(const std::string& valorPorDefecto, bool activoPorDefecto) : m_ActivoPorDefecto(activoPorDefecto), m_ValorPorDefecto(valorPorDefecto)
+        {
+                m_PermisoValido = true;
+                Reset();
+        }
+
+        EstadoPermiso(const std::string& valorPorDefecto, const std::string& valor, bool activoPorDefecto, bool activo) : m_Activo(activo), m_ActivoPorDefecto(activoPorDefecto), m_Valor(valor), m_ValorPorDefecto(valorPorDefecto)
+        {
+                m_PermisoValido = true;
+        }
+
+        void Reset()
+        {
+                m_Activo = m_ActivoPorDefecto;
+                m_Valor  = m_ValorPorDefecto;
+        }
+
+        void Activar(bool activo)
+        {
+                m_Activo = activo;
+        }
+
+        bool Activo() const
+        {
+                return m_Activo;
+        }
+
+        bool TieneValorPorDefecto() const
+        {
+                return m_Valor == m_ValorPorDefecto && m_Activo == m_ActivoPorDefecto;
+        }
+
+        const std::string& GetRawValue() const
+        {
+                return m_Valor;
+        }
+
+        template <class T> T ObtenerValor() const
+        {
+                T v;
+                if (!m_Activo) {
+                        std::istringstream is(m_ValorPorDefecto);
+                        is >> v;
+                } else {
+                        std::istringstream is(m_Valor);
+                        is >> v;
+                }
+
+                return v;
+        }
+
+        template <class T> void AsignarValor(T valor)
+        {
+                std::ostringstream os;
+                os << valor;
+                m_Valor = os.str();
+        }
+
+        EstadoPermiso& operator = (const EstadoPermiso& o)
+        {
+                this->m_Valor = o.m_Valor;
+                this->m_ValorPorDefecto = o.m_ValorPorDefecto;
+                this->m_Activo = o.m_Activo;
+                this->m_ActivoPorDefecto = o.m_ActivoPorDefecto;
+                this->m_PermisoValido = o.m_PermisoValido;
+                return *this;
+        }
+
+        bool ValidoYActivo() const
+        {
+                return m_PermisoValido && m_Activo;
+        }
+
+        operator bool () const
+        {
+                return ValidoYActivo();
+        }
+
+private:
+        bool        m_Activo;
+        bool        m_ActivoPorDefecto;
+        std::string m_Valor;
+        std::string m_ValorPorDefecto;
+        bool        m_PermisoValido;
+
+};
+}
+
+class EXTAPI IControladorPermisos
+{
+
+protected:
+        IControladorPermisos();
+
+        virtual ~IControladorPermisos();
+
+public:
+
+        static IControladorPermisos* Instance();
+        static void FreeInstance();
+
+        /** Carga el fichero XML de permisos **/
+        virtual void CargarXMLPermisos(const std::string& xmlPermisos, bool privados = false) = 0;
+
+        /** Resetea el estado y valor de todos los permisos a sus valores por defecto **/
+        virtual void ResetearValoresPorDefecto() = 0;
+
+        /** Metodo recomendado para obtener permisos **/
+        virtual GNC::GCS::Permisos::EstadoPermiso* ObtenerPermiso(const std::string& stdNamespace, const std::string& idSujeto) = 0;
+
+        /** Metodo recomendado para comprobar permisos **/
+        virtual GNC::GCS::Permisos::EstadoPermiso Get(const std::string& stdNamespace, const std::string& idSujeto) = 0;
+
+        /** Anyade una nueva definicion de permiso al conjunto **/
+        virtual void AddDefinicionPermiso(const std::string& espacioNombres, const std::string& descripcionNamespace, const std::string& id, const std::string& descripcion, bool privado, const std::string& valorPorDefecto, bool activoPorDefecto) = 0;
+};
+}
+}
diff --git a/cadxcore/api/controllers/icontroladorvistas.cpp b/cadxcore/api/controllers/icontroladorvistas.cpp
new file mode 100644
index 0000000..c77b4f5
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladorvistas.cpp
@@ -0,0 +1,41 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "icontroladorvistas.h"
+#include <main/controllers/controladorvistas.h>
+
+
+GNC::GCS::IControladorVistas::IControladorVistas()
+{
+}
+
+GNC::GCS::IControladorVistas::~IControladorVistas()
+{
+}
+
+GNC::GCS::IControladorVistas* GNC::GCS::IControladorVistas::Instance()
+{
+        return GNC::GCS::ControladorVistas::Instance();
+}
+
+void GNC::GCS::IControladorVistas::FreeInstance()
+{
+        GNC::GCS::ControladorVistas::FreeInstance();
+}
diff --git a/cadxcore/api/controllers/icontroladorvistas.h b/cadxcore/api/controllers/icontroladorvistas.h
new file mode 100644
index 0000000..4b64e47
--- /dev/null
+++ b/cadxcore/api/controllers/icontroladorvistas.h
@@ -0,0 +1,78 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <list>
+#include <api/api.h>
+#include <api/observers/iviewsobserver.h>
+
+class wxWindow;
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IControladorVistas
+{
+public:
+        typedef std::list<IVista*> TipoListaVistas;
+
+        static IControladorVistas* Instance();
+        static void FreeInstance();
+
+        virtual wxWindow* GetRootWindow() = 0;
+
+        virtual void Freeze() = 0;
+        virtual void Thaw() = 0;
+
+        virtual void SetTitulo(GNC::GCS::IVista* pVista, const std::string& titulo) = 0;
+        virtual std::string GetTitulo(GNC::GCS::IVista* pVista) = 0;
+
+        virtual void Registrar(GNC::GCS::IVista*  pVista) = 0;
+        virtual void Destruir(GNC::GCS::IVista*   pVista) = 0;
+        virtual void Destruir(wxWindow* pVentana) = 0;
+
+//region "Getters de vistas activas"
+
+        virtual GNC::GCS::IVista* GetVistaActiva() = 0;
+
+//endregion
+
+//region "Propagacion de eventos de cambios de configuracion
+        virtual void PropagarConfiguracionCambiada() = 0;
+//endregion
+
+//region "Gestion de carga y descarga de vistas"
+        virtual void SolicitarActivarVista(GNC::GCS::IVista* pVista) = 0;
+//endregion
+
+        virtual TipoListaVistas GetVistas() = 0;
+
+protected:
+
+        virtual ~IControladorVistas();
+        IControladorVistas();
+
+};
+}
+}
diff --git a/cadxcore/api/controllers/ieventscontroller.cpp b/cadxcore/api/controllers/ieventscontroller.cpp
new file mode 100644
index 0000000..f64c223
--- /dev/null
+++ b/cadxcore/api/controllers/ieventscontroller.cpp
@@ -0,0 +1,41 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ieventscontroller.h"
+#include <main/controllers/controladoreventos.h>
+
+
+GNC::GCS::IEventsController::IEventsController()
+{
+}
+
+GNC::GCS::IEventsController::~IEventsController()
+{
+}
+
+GNC::GCS::IEventsController* GNC::GCS::IEventsController::Instance()
+{
+        return GNC::GCS::ControladorEventos::Instance();
+}
+
+void GNC::GCS::IEventsController::FreeInstance()
+{
+        GNC::GCS::ControladorEventos::FreeInstance();
+}
diff --git a/cadxcore/api/controllers/ieventscontroller.h b/cadxcore/api/controllers/ieventscontroller.h
new file mode 100644
index 0000000..bea2c23
--- /dev/null
+++ b/cadxcore/api/controllers/ieventscontroller.h
@@ -0,0 +1,71 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/api.h>
+
+//----------------------------------------------------------------------------------------------------
+//region Forward Declarations
+namespace GNC
+{
+namespace GCS
+{
+class IEventsObserver;
+namespace Events
+{
+class IEvent;
+}
+}
+}
+//endregion
+
+namespace GNC
+{
+namespace GCS
+{
+
+//====================================================================================================
+//= Interfaz del controlador de eventos
+//====================================================================================================
+class EXTAPI IEventsController
+{
+
+protected:
+        IEventsController();
+        virtual ~IEventsController();
+
+public:
+
+        static IEventsController* Instance();
+        static void FreeInstance();
+
+        //se apunta a escuchar un evento
+        virtual void Registrar (GNC::GCS::IEventsObserver* pObservador, const GNC::GCS::Events::IEvent& evento) = 0;
+        //se desapunta de escuchar un evento
+        virtual void DesRegistrar (GNC::GCS::IEventsObserver* pObservador, const GNC::GCS::Events::IEvent& evento) = 0;
+        //se desapunta de todos los eventos a los que escucha
+        virtual void DesRegistrar (GNC::GCS::IEventsObserver* pObservador) = 0;
+        //avisa a los observadores registrados a este evento
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt) = 0;
+};
+
+}
+}
diff --git a/cadxcore/api/controllers/ihistorycontroller.cpp b/cadxcore/api/controllers/ihistorycontroller.cpp
new file mode 100644
index 0000000..4baae4e
--- /dev/null
+++ b/cadxcore/api/controllers/ihistorycontroller.cpp
@@ -0,0 +1,126 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "ihistorycontroller.h"
+#include <main/controllers/historycontroller.h>
+
+GNC::GCS::IHistoryController::IHistoryController()
+{
+}
+
+GNC::GCS::IHistoryController::~IHistoryController()
+{
+}
+
+GNC::GCS::IHistoryController::StudyModel::StudyModel() :
+        pk(-1),
+        pat_sex('?'),
+        num_series(-1),
+        num_instances(-1),
+        location(TL_LocalDatabase)
+{
+}
+
+GNC::GCS::IHistoryController::SeriesModel::SeriesModel() :
+        pk(-1),
+        study_fk(-1),
+        num_instances(-1),
+        location(TL_LocalDatabase)
+{
+        pk = -1;
+}
+
+GNC::GCS::IHistoryController::FileModel::FileModel() :
+        pk(-1),
+        series_fk(-1),
+        orientation('A'),
+        slice_location(0.0),
+        slice_thickness(0.0),
+        height(0),
+        width(0),
+        number_of_frames(0),
+        instance_number(0),
+        location(TL_LocalDatabase)
+{
+        image_position[0] = 0.0;
+        image_position[1] = 0.0;
+        image_position[2] = 0.0;
+}
+
+GNC::GCS::IHistoryController::FileModel::~FileModel()
+{
+}
+
+
+GNC::GCS::IHistoryController::LightFileModel::LightFileModel() :
+        pk(-1),
+        series_fk(-1),
+        location(TL_LocalDatabase)
+{
+}
+
+GNC::GCS::IHistoryController::LightFileModel::~LightFileModel()
+{
+}
+
+GNC::GCS::IHistoryController::TAddError::TAddError(TError error, const std::string& path)
+{
+        this->error = error;
+        this->path = path;
+}
+
+
+GNC::GCS::IHistoryController* GNC::GCS::IHistoryController::Instance()
+{
+        return GNC::GCS::HistoryController::Instance();
+}
+
+void GNC::GCS::IHistoryController::FreeInstance()
+{
+        GNC::GCS::HistoryController::FreeInstance();
+}
+
+char GNC::GCS::IHistoryController::LocationToChar(GNC::GCS::IHistoryController::TLocation location)
+{
+        switch (location) {
+        case TL_LocalLinked:
+                return 'L';
+        case TL_WadoLinked:
+                return 'W';
+        case TL_LocalDatabase:
+        default:
+                return 'B';
+        }
+}
+
+GNC::GCS::IHistoryController::TLocation GNC::GCS::IHistoryController::CharToLocation(char loc)
+{
+        switch (loc) {
+        case 'L':
+                return TL_LocalLinked;
+        case 'W':
+                return TL_WadoLinked;
+        case 'B':
+        default:
+                return TL_LocalDatabase;
+        }
+}
+
diff --git a/cadxcore/api/controllers/ihistorycontroller.h b/cadxcore/api/controllers/ihistorycontroller.h
new file mode 100644
index 0000000..056bbcc
--- /dev/null
+++ b/cadxcore/api/controllers/ihistorycontroller.h
@@ -0,0 +1,213 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <list>
+#include <string>
+
+#include <api/api.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IPersistentCommand;
+class EXTAPI IHistoryController
+{
+public:
+        typedef struct EXTAPI PatientModel {
+                std::string id;
+                std::string id_issuer;
+                std::string bithdate;
+                char		sex;
+                std::string name;
+        } PatientModel;
+
+        typedef std::list<std::string> StringList;
+
+        typedef enum TLocation {
+                TL_LocalDatabase,
+                TL_LocalLinked,
+                TL_WadoLinked
+        } TLocation;
+
+        typedef struct EXTAPI StudyModel {
+                long        pk;
+                std::string pat_id;
+                std::string pat_id_issuer;
+                std::string pat_bithdate;
+                char        pat_sex;
+                std::string pat_name;
+                std::string study_iuid;
+                std::string study_id;
+                std::string	study_datetime; //timestamp
+                std::string study_acc_no;
+                std::string ref_physician;
+                std::string study_desc;
+                std::list<std::string> mods_in_study;
+                std::list<std::string> cuids_in_study;
+                int			num_series;
+                int			num_instances;
+                std::string			created_time;
+                std::string			updated_time;
+                TLocation		location;
+                StudyModel();
+        } StudyModel;
+
+        typedef struct EXTAPI SeriesModel {
+        public:
+                long			pk;
+                long			study_fk;
+                std::string series_iuid;
+                std::string	series_datetime;
+                std::string	series_no;
+                std::string	series_modality;
+                std::string	body_part;
+                std::string	laterality;
+                std::string	series_desc;
+                std::string institution;
+                std::string station_name;
+                std::string department;
+                std::string perf_physician;
+                std::string	uid_importer;
+                std::string frame_of_reference;
+                StringList  tsuids;
+                int			num_instances;
+                std::string	created_time;
+                std::string updated_time;
+                TLocation	location;
+                SeriesModel();
+        } SeriesModel;
+
+        typedef struct EXTAPI FileModel {
+        public:
+                long			pk;
+                long			series_fk;
+                std::string real_path;
+                std::string file_path;
+                std::string sopiuid;
+                std::string tsuid;
+                std::string	content_datetime;
+                std::string sopcuid;
+                std::string file_desc;
+                char			orientation;
+                double		image_position[3];
+                double		slice_location;
+                double      slice_thickness;
+                int			height;
+                int			width;
+                int			number_of_frames;
+                std::string direction_cosines;
+                std::string spacing;
+                long		instance_number;
+                std::string	created_time;
+                std::string	updated_time;
+                TLocation	location;
+
+                FileModel();
+                ~FileModel();
+
+        } FileModel;
+
+        /** only important attributes **/
+        typedef struct EXTAPI LightFileModel {
+        public:
+                long			pk;
+                long			series_fk;
+                std::string real_path;
+                std::string file_path;
+                std::string sopiuid;
+                std::string tsuid;
+                std::string sopcuid;
+
+                TLocation	location;
+                LightFileModel();
+                ~LightFileModel();
+        } LightFileModel;
+
+        typedef struct EXTAPI DICOMFileModel {
+                StudyModel study;
+                SeriesModel series;
+                FileModel file;
+        } DICOMFileModel;
+
+        typedef std::list<PatientModel> PatientModelList;
+        typedef std::list<StudyModel> StudyModelList;
+        typedef std::list<SeriesModel> SeriesModelList;
+        typedef std::list<FileModel> FileModelList;
+        typedef std::list<LightFileModel> LightFileModelList;
+        typedef std::list<DICOMFileModel> DICOMFileModelList;
+
+        typedef struct EXTAPI TAddError {
+                typedef enum TError { // FIXME WARNING: Redefinition
+                        TE_FileNotExist,
+                        TE_WrongFormat,
+                        TE_DICOMDir
+                } TError;
+                TError error;
+                std::string path;
+
+                TAddError(TError error, const std::string& path);
+        } TAddError;
+        typedef std::list<TAddError> TAddErrorList;
+
+        typedef enum TAddAction {
+                TAA_MOVE,
+                TAA_COPY,
+                TAA_LINK
+        } TAddAction;
+
+        static char LocationToChar(TLocation location);
+        static TLocation CharToLocation(char loc);
+        virtual SeriesModel GetSeriesModel(long series_pk) = 0;
+        virtual void GetSeriesModelFromUIDs(const StringList& uids, SeriesModelList& series) = 0;
+        virtual void GetSeriesModelFromUID(const std::string& uids, SeriesModelList& series) = 0;
+        virtual void GetSeriesFromStudy(long study_pk, SeriesModelList& listOfSeries) = 0;
+        virtual StudyModel GetStudyModel(long study_pk) = 0;
+        virtual FileModel GetFrameOfReference(long series_pk) = 0;
+        virtual FileModel GetFrameOfReference(const std::string& series_pk) = 0;
+        virtual FileModel GetFileModel(long file_pk) = 0;
+        virtual FileModel GetFileModelFromSopInstance(const std::string& sopInstanceUID, long study_pk = -1) = 0;
+        virtual bool IsOk() = 0;
+
+        virtual void GetAllPatients(GNC::GCS::IHistoryController::PatientModelList& patientList) = 0;
+
+        virtual bool ExistsSeriesWithUID(const std::string& seriesUID) = 0;
+        virtual int GetNumberOfFiles() = 0;
+        virtual void GetSeriesSortedFileModels(long series_pk, FileModelList& fileList, bool onlyFirst = false) = 0;
+        virtual void GetSeriesSortedFileModels(long series_pk, LightFileModelList& fileList, bool onlyFirst = false) = 0;
+        virtual StringList GetSeriesSortedPathsByUID(const std::string& seriesUID) = 0;
+        virtual StringList GetSeriesSortedPaths(const std::string& series_pk) = 0;
+        virtual StringList GetSeriesSortedPaths(long series_pk) = 0;
+        virtual StringList GetSeriesSopClasses(long series_pk) = 0;
+        virtual char GetSeriesOrientation(long series_pk) = 0;
+
+        virtual bool EmptyHistory(bool eliminarDelDisco) = 0;
+
+        static IHistoryController* Instance();
+        static void FreeInstance();
+
+protected:
+        IHistoryController();
+        ~IHistoryController();
+
+};
+}
+}
diff --git a/cadxcore/api/controllers/imodulecontroller.cpp b/cadxcore/api/controllers/imodulecontroller.cpp
new file mode 100644
index 0000000..381aff6
--- /dev/null
+++ b/cadxcore/api/controllers/imodulecontroller.cpp
@@ -0,0 +1,249 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+#include <wx/string.h>
+#include <wx/bitmap.h>
+
+#include "imodulecontroller.h"
+
+#include <main/controllers/configurationcontroller.h>
+#include <export/tagsprivadoscomunes.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+
+GNC::GCS::ModoControlador::ModoControlador(int _id, const std::string& _descripcion, const TipoListaModalidades& listaModalidades, const TipoListaUIDsImportacion& listaImportacion, wxBitmap* _bitmap, T_HangingProtocolSupportLevel supportLevel) :
+        id(_id),
+        descripcion(_descripcion),
+        m_listaModalidades(listaModalidades),
+        m_hangingSupportLevel(supportLevel),
+        m_listImportationUIDs(listaImportacion),
+        bitmap(_bitmap)
+{
+}
+
+GNC::GCS::ModoControlador::~ModoControlador()
+{
+        m_listaModalidades.clear();
+}
+
+const GNC::GCS::ModoControlador::TipoListaModalidades GNC::GCS::ModoControlador::GetModalidades()
+{
+        return m_listaModalidades;
+}
+
+const std::string& GNC::GCS::ModoControlador::GetDescripcion()
+{
+        return descripcion;
+}
+
+wxBitmap* GNC::GCS::ModoControlador::GetBitmap()
+{
+        return bitmap;
+}
+
+int GNC::GCS::ModoControlador::GetId() const
+{
+        return id;
+}
+
+
+bool GNC::GCS::ModoControlador::SupportsModalityFile(const std::string &modalidad, const std::string& transferSyntax) const
+{
+        for(TipoListaModalidades::const_iterator it = m_listaModalidades.begin(); it!= m_listaModalidades.end(); ++it) {
+                if((*it) == modalidad) {
+                        if (transferSyntax != "1.2.840.10008.1.2.4.100" && transferSyntax != "1.2.840.10008.1.2.4.101") {
+                                return true;
+                        } else {
+                                return false;
+                        }
+                }
+        }
+        return false;
+}
+
+GNC::GCS::ModoControlador::T_HangingProtocolSupportLevel GNC::GCS::ModoControlador::GetHangingSupportLevel() const
+{
+        return m_hangingSupportLevel;
+}
+
+bool GNC::GCS::ModoControlador::SupportsImportationUID(const std::string &importationUID) const
+{
+        for(TipoListaUIDsImportacion::const_iterator it = m_listImportationUIDs.begin(); it!= m_listImportationUIDs.end(); ++it) {
+                if((*it) == importationUID) {
+                        return true;
+                }
+        }
+        return false;
+}
+
+
+
+GNC::GCS::IdHL7::IdHL7()
+{
+}
+
+GNC::GCS::IdHL7::IdHL7(const IdHL7& o)
+{
+        *this = o;
+}
+
+GNC::GCS::IdHL7::IdHL7(const std::string& e, const std::string& c, const std::string& d, const std::string& n, const std::string& t, const std::string& td, const std::string& v) :
+        etiqueta(e), codigo(c), namespaceid(n), descripcion(d),  tipoobservacion(t), tipodatos(td), version(v)
+{
+}
+
+GNC::GCS::IdHL7& GNC::GCS::IdHL7::operator = (const GNC::GCS::IdHL7& o)
+{
+        etiqueta        = o.etiqueta;
+        codigo          = o.codigo;
+        descripcion     = o.descripcion;
+        namespaceid     = o.namespaceid;
+        tipoobservacion = o.tipoobservacion;
+        tipodatos       = o.tipodatos;
+        version		 = o.version;
+        return *this;
+}
+
+GNC::GCS::IdHL7::operator std::string() const
+{
+        return codigo + "^" + descripcion + "^" + namespaceid;
+}
+
+
+GNC::GCS::IModuleController::IModuleController(GNC::GCS::IEntorno* pEntorno, const std::string& uid, int priority) :
+        m_pEntorno(pEntorno), m_UID(uid), m_priority(priority)
+{
+}
+
+/* Destructor */
+GNC::GCS::IModuleController::~IModuleController()
+{
+}
+
+void GNC::GCS::IModuleController::RegistrarConfiguracion()
+{
+        bool written = false;
+
+        std::string key;
+        std::string val;
+
+        GNC::GCS::ConfigurationController * pConfig = GNC::GCS::ConfigurationController::Instance();
+
+        for (TipoListaIdsHL7::iterator it = m_ListaInformes.begin(); it != m_ListaInformes.end(); ++it) {
+                const IdHL7& i = *it;
+
+                key = i.etiqueta;
+                if ( !pConfig->readStringGeneral("/GinkgoCore/HCE/Plantillas",key, val)) {
+                        pConfig->writeStringGeneral("/GinkgoCore/HCE/Plantillas",key,(const std::string)i);
+                        written = true;
+                }
+        }
+
+        if (written) {
+                pConfig->Flush();
+        }
+
+}
+
+
+void GNC::GCS::IModuleController::GetTagsPrivadosReplace(GNC::GCS::IModuleController::TMapaTagsPrivados& mapaTags)
+{
+        if (mapaTags.find(UID_TAGS_PRIVADOS_COMUNES) == mapaTags.end()) {
+                mapaTags[UID_TAGS_PRIVADOS_COMUNES] = TListaIdsTagsPrivados();
+        }
+
+        mapaTags[UID_TAGS_PRIVADOS_COMUNES].push_back(GNC::GCS::IModuleController::TPrivateTagReemplazable(TAG_WIDGETS, GNC::GCS::IModuleController::TPrivateTagReemplazable::XML));
+}
+
+bool GNC::GCS::IModuleController::SupportsImportationUID(const std::string &)
+{
+        return false;
+}
+
+bool GNC::GCS::IModuleController::MakeThumbnail(const GNC::GCS::IHistoryController::FileModel& /*model*/, ImgProxy<UCHAR3>& /*thumbnail*/)
+{
+        return false;
+}
+
+GNC::GCS::IModuleController::TExtraLicensesMap GNC::GCS::IModuleController::GetExtraLicenses()
+{
+        GNC::GCS::IModuleController::TExtraLicensesMap map;
+        return map;
+}
+
+const std::string& GNC::GCS::IModuleController::GetUID() const
+{
+        return m_UID;
+}
+
+bool GNC::GCS::IModuleController::SoportaImportacion() const
+{
+        return false;
+}
+
+//si importa series true, si importa estudios false
+bool GNC::GCS::IModuleController::ImportaSeries() const
+{
+        return true;
+}
+
+const std::string& GNC::GCS::IModuleController::GetImporterDescription() const
+{
+        return m_ImporterDescription;
+}
+
+wxBitmap GNC::GCS::IModuleController::GetImporterIcon() const
+{
+        return GinkgoResourcesManager::BigIcons::GetIcoDefaultDicomizer();
+}
+
+
+void GNC::GCS::IModuleController::GetPasosImportacion(IWizard* , std::list<IPasoWizard*> &, wxWindow* , std::string &, GNC::GCS::Ptr<GIL::IModeloIntegracion> )
+{
+
+}
+
+void GNC::GCS::IModuleController::GetPasosConfiguracion( std::list<IPasoConfiguracion*> &, wxWindow*, IDialogoConfiguracion* ) const
+{
+
+}
+
+GNC::GCS::ModoControlador* GNC::GCS::IModuleController::GetModo(int id)
+{
+        if (id >= (int)m_ListaModos.size()) {
+                return NULL;
+        } else {
+                int top = id - 1;
+                IteradorListaModos it = m_ListaModos.begin();
+                for (int i = 0; i < top; ++i, ++it);
+                return *it;
+        }
+}
+
+GNC::GCS::IModuleController::ListaModos& GNC::GCS::IModuleController::GetListaModos()
+{
+        return m_ListaModos;
+}
+
+int GNC::GCS::IModuleController::GetPriority()
+{
+        return m_priority;
+}
diff --git a/cadxcore/api/controllers/imodulecontroller.h b/cadxcore/api/controllers/imodulecontroller.h
new file mode 100644
index 0000000..d2c9354
--- /dev/null
+++ b/cadxcore/api/controllers/imodulecontroller.h
@@ -0,0 +1,215 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <list>
+#include <vector>
+#include <map>
+#include <exception>
+
+#include <api/api.h>
+#include <api/imgproxy.h>
+#include <api/autoptr.h>
+#include <api/controllers/ihistorycontroller.h>
+#include <api/imodelointegracion.h>
+#include <wx/bitmap.h>
+
+class IPasoConfiguracion;
+class IDialogoConfiguracion;
+class IWizard;
+class IPasoWizard;
+class wxWindow;
+
+namespace GNC
+{
+namespace GCS
+{
+class IEntorno;
+class IVista;
+}
+}
+
+class IPACSController;
+
+#define GINKGO_PARAMS_SEPARATOR "="
+
+namespace GNC
+{
+namespace GCS
+{
+class HangingProtocol;
+
+/* Appender / formatter para reordenar y/o añadir tags DICOM necesarios por el controlador o vista en la importacion */
+class EXTAPI TagsDICOM
+{
+public:
+        typedef std::list<std::string> ListaArbolesPersonalizados;
+        typedef std::map<std::string, int> MapaTags;
+
+        // Vector de nombres de raices de tags DICOM que el modo necesita
+        ListaArbolesPersonalizados ArbolesPersonalizados;
+        // Mapa de tags a insertar/sobreescribir con sus id de raices asociadas (donde se insertaran)
+        MapaTags TagsAInsertar;
+
+};
+
+class EXTAPI ModoControlador
+{
+public:
+        typedef std::list<std::string> TipoListaModalidades;
+        typedef std::list<std::string> TipoListaUIDsImportacion;
+        typedef enum {
+                THSL_FULL,
+                THSL_ONLY_REGULAR,
+                THSL_ONLY_1x1
+        } T_HangingProtocolSupportLevel;
+
+        ModoControlador(int id, const std::string& descripcion, const TipoListaModalidades& listaModalidades, const TipoListaUIDsImportacion& listaImportacion, wxBitmap * bitmap = NULL, T_HangingProtocolSupportLevel supportLevel = THSL_ONLY_1x1);
+
+        virtual ~ModoControlador();
+
+        const TipoListaModalidades GetModalidades();
+
+        const std::string& GetDescripcion();
+
+        wxBitmap* GetBitmap();
+
+        int GetId() const;
+
+        T_HangingProtocolSupportLevel GetHangingSupportLevel() const;
+
+        virtual bool SupportsModalityFile(const std::string &modalidad, const std::string& transferSyntax) const;
+
+        virtual bool SupportsImportationUID(const std::string &importationUID) const;
+
+protected:
+        int id;
+        std::string descripcion;
+        TipoListaModalidades  m_listaModalidades;
+        T_HangingProtocolSupportLevel m_hangingSupportLevel;
+
+        TipoListaUIDsImportacion m_listImportationUIDs;
+        wxBitmap* bitmap;
+};
+
+class EXTAPI IdHL7
+{
+public:
+        std::string etiqueta;        // Etiqueta que usa Ginkgo para localizar el codigo
+        std::string codigo;          // Codigo formal para la etiqueta
+        std::string namespaceid;     // NamespaceID de la entidad asignatoria
+        std::string descripcion;     // Descripcion del codigo
+        std::string tipoobservacion; // Tipo de observacion. Solo se usa para Ids transportados en OBX
+        std::string tipodatos;
+        std::string version;			  //version of the id
+
+        IdHL7();
+
+        IdHL7(const IdHL7& o);
+
+        IdHL7(const std::string& e, const std::string& c, const std::string& d, const std::string& n, const std::string& t, const std::string& td, const std::string& v = "");
+
+        IdHL7& operator = (const IdHL7& o);
+
+        // return value should be const, but clang++ 3.7 doesn't like it
+        operator std::string () const;
+};
+
+/** Module controller. Responsable de proveer una factoría de controladores de estudios y registrarlos mediante el controlador de vistas. **/
+class EXTAPI IModuleController
+{
+public:
+        typedef struct TPrivateTagReemplazable {
+                typedef enum {STD, XML} TType;
+                unsigned char id;
+                TType type;
+                TPrivateTagReemplazable (unsigned char _id, TType _type) : id(_id), type(_type)
+                {
+                }
+        } TPrivateTagReemplazable;
+        typedef std::list<TPrivateTagReemplazable> TListaIdsTagsPrivados;
+        //first element uid provider, second list of tags
+        typedef std::map<std::string, TListaIdsTagsPrivados> TMapaTagsPrivados;
+
+        typedef std::list<IdHL7> TipoListaIdsHL7;
+        typedef std::map<std::string,IdHL7> TipoMapaIdsHL7;
+        typedef std::map<std::string, std::string> TExtraLicensesMap;
+
+        /* Constructor */
+        IModuleController(GNC::GCS::IEntorno* pEntorno, const std::string& uid, int priority);
+
+        /* Destructor */
+        virtual ~IModuleController();
+
+        /* Obtiene el UID único del módulo */
+        const std::string& GetUID() const;
+
+        virtual bool SoportaImportacion() const;
+
+        //si importa series true, si importa estudios false
+        virtual bool ImportaSeries() const;
+
+        const std::string& GetImporterDescription() const;
+        virtual wxBitmap GetImporterIcon() const;
+
+
+        virtual void GetPasosImportacion(IWizard* , std::list<IPasoWizard*> &, wxWindow* , std::string &, GNC::GCS::Ptr<GIL::IModeloIntegracion> );
+        virtual void GetPasosConfiguracion( std::list<IPasoConfiguracion*> &, wxWindow* , IDialogoConfiguracion* ) const;
+
+        // Metodos de inicializacion de configuracion del modulo
+        void RegistrarConfiguracion();
+
+        //registra las vistas
+        virtual void RegistrarVistas() = 0;
+
+        const IdHL7 GetIdInforme(const std::string& key) const;
+
+        /* Abre un estudio de manera no interactiva desde un directorio y devuelve su controlador específico */
+        virtual GNC::GCS::IVista* OpenView(int modo, GNC::GCS::IHistoryController::SeriesModelList& series, GNC::GCS::Ptr<GNC::GCS::HangingProtocol> hangingProtocol) = 0;
+
+
+        typedef std::vector<ModoControlador*> ListaModos;
+        typedef std::vector<ModoControlador*>::iterator IteradorListaModos;
+
+        virtual ModoControlador* GetModo(int id);
+
+        virtual ListaModos& GetListaModos();
+
+        virtual int GetPriority();
+
+        virtual void GetTagsPrivadosReplace(GNC::GCS::IModuleController::TMapaTagsPrivados& mapaTags);
+        virtual bool SupportsImportationUID(const std::string &importationUID);
+        virtual bool MakeThumbnail(const GNC::GCS::IHistoryController::FileModel& model, ImgProxy<UCHAR3>& thumbnail);
+        virtual TExtraLicensesMap GetExtraLicenses();
+
+protected:
+        GNC::GCS::IEntorno*  m_pEntorno;
+        ListaModos           m_ListaModos;
+
+        TipoListaIdsHL7      m_ListaInformes;
+
+        std::string          m_UID;
+        std::string          m_ImporterDescription;
+        int		             m_priority;
+};
+}
+}
diff --git a/cadxcore/api/controllers/ipacscontroller.cpp b/cadxcore/api/controllers/ipacscontroller.cpp
new file mode 100644
index 0000000..7d5111e
--- /dev/null
+++ b/cadxcore/api/controllers/ipacscontroller.cpp
@@ -0,0 +1,45 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <list>
+#include <map>
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+#include <api/controllers/ipacscontroller.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+GIL::DICOM::PACSException::PACSException(const std::string& msg, const std::string& component, bool fatal) throw() : GNC::GCS::IException(msg, component, fatal)
+{
+}
+
+GIL::DICOM::IPACSController::IPACSController()
+{
+}
+
+GIL::DICOM::IPACSController::~IPACSController()
+{
+}
+
diff --git a/cadxcore/api/controllers/ipacscontroller.h b/cadxcore/api/controllers/ipacscontroller.h
new file mode 100644
index 0000000..6a732a6
--- /dev/null
+++ b/cadxcore/api/controllers/ipacscontroller.h
@@ -0,0 +1,187 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <ostream>
+#include <string>
+#include <exception>
+#include <vector>
+#include <list>
+#include <map>
+
+#include <api/api.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/ivista.h>
+#include <api/dicom/idicom.h>
+#include <api/iproxynotificadorprogreso.h>
+#include <api/iexception.h>
+
+class IModeloDicom;
+class DcmElement;
+
+namespace GIL
+{
+namespace DICOM
+{
+class IInspectCallBack;
+}
+}
+
+namespace GIL
+{
+namespace DICOM
+{
+class ICustomAssociation;
+
+/** PACS Exception **/
+class EXTAPI PACSException : public GNC::GCS::IException
+{
+public:
+        /** PACS Exception constructor **/
+        PACSException(const std::string& msg, const std::string& component="GIL/PACS", bool fatal = true) throw() ;
+};
+
+typedef struct ContextoResultado {
+        bool error;
+        std::string UIDPaciente;
+        std::string UIDEstudio;
+        std::list<std::string> RutaDICOM;
+        std::string ServidorPACSID;
+        bool fromPACS;
+        bool recursivo;
+
+        inline ContextoResultado()
+        {
+                error = false;
+                fromPACS=false;
+                recursivo = false;
+        }
+
+        inline ~ContextoResultado()
+        {
+        }
+} ContextoResultado;
+
+
+
+typedef enum TipoTransferSyntaxEnvio {
+        SendExplicitLittleEndian,
+        SendImplicitLittleEndian,
+        SendJPEG2000Lossless,
+        SendJPEG2000Lossy10,
+        SendJPEG2000Lossy20,
+        SendJPEG2000Lossy50,
+        SendJPEGLossless,
+        SendJPEGLossy9,
+        SendJPEGLossy8,
+        SendJPEGLossy7,
+        SendDefault
+} TipoTransferSyntaxEnvio;
+
+class EXTAPI IPACSController
+{
+public:
+
+        virtual ~IPACSController();
+
+        virtual bool QueryRetrieve(
+                void* connectionKey,
+                const std::string& serverId,
+                IModeloDicom* pModelo,
+                const GIL::DICOM::DicomDataset& base,
+                GNC::IProxyNotificadorProgreso* pNotificador,
+                bool link
+        ) = 0;
+
+        virtual bool Print(
+                void* connectionKey,
+                const std::string& serverId,
+                const GIL::DICOM::DicomDataset& film,
+                const GIL::DICOM::DicomDataset& layout,
+                const GIL::DICOM::DicomDataset& job,
+                const std::list<std::string> files,
+                GNC::IProxyNotificadorProgreso* pNotificador
+        ) = 0;
+
+
+        /** Perform query */
+        virtual bool Query(
+                void* connectionKey,
+                const std::string& abstractSyntax,
+                const GIL::DICOM::DicomDataset& query,
+                std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >& resultsWraper,
+                const std::string& serverId,
+                GNC::IProxyNotificadorProgreso* pNotificador
+        ) = 0;
+
+        /** Test WADO URL **/
+        virtual void TestWADOURL(const std::string& url) = 0;
+
+        /** Downloads url to specified file */
+        virtual bool DownloadFileFromURL(const std::string& url,
+                                         const std::string& filePath,
+                                         GNC::IProxyNotificadorProgreso* pNotifier) = 0;
+
+        virtual GIL::DICOM::ICustomAssociation* CreateCustomAssociation(void* connectionKey, const std::string& ambitolog, GNC::IProxyNotificadorProgreso* pNotificador = NULL) = 0;
+        virtual void DestroyCustomAssociation(GIL::DICOM::ICustomAssociation* assoc) = 0;
+
+        virtual void SubirArchivos(void* connectionKey, const std::string& serverId, const std::list<std::string>& pathsSubida, GNC::IProxyNotificadorProgreso * pNotificador, TipoTransferSyntaxEnvio transferSyntax) =0;
+
+        virtual void GetConnection(void* connectionKey) = 0;
+
+        virtual void ReleaseConnection(void* connectionKey) = 0;
+
+        virtual bool LeerDicomDir(const std::string& pathDicomDir, IModeloDicom* pModelo) = 0;
+
+        virtual bool findAndGetTagFromFile(const std::string& ruta, unsigned short group, unsigned short element, std::string& value) = 0;
+
+        virtual bool EsDICOM(const std::string& path, bool accept_dicomdir, bool accept_dicomfile) const = 0;
+
+        virtual bool EsPDF(const std::string& path) const = 0;
+
+        /* Devuelve la ruta en disco (asignada a la variable ruta pasada por referencia) en base a los IDs unicos de estudio y serie de una serie de imagenes obtenida*/
+        /*virtual bool GetRutaImagen(const std::string& uidPaciente, const std::string& uidEstudio, const std::string& uidSerie, const std::string& uidImagen, const std::string& dicomDirPath, std::string& ruta, bool crearDirectorios = true) = 0;*/
+        virtual bool GetRutaImagenTemp(const std::string& uidPaciente, const std::string& uidEstudio, const std::string& uidSerie, const std::string& uidImagen, std::string& ruta, bool crearDirectorios = true) = 0;
+
+        void DumpFileElements(const std::string& rutaFichero, IInspectCallBack* callback);
+
+        //region "Metodos de Dicomizacion"
+
+        virtual IDICOMImg2DCM* CrearInstanciaDeImportacion() = 0;
+
+        virtual void LiberarInstanciaDeImportacion(IDICOMImg2DCM* instancia) = 0;
+
+        //endregion
+
+        //region "Metodos de carga/almacenamiento de DICOMS"
+
+        virtual IDICOMManager* CrearInstanciaDeDICOMManager() = 0;
+
+        virtual void LiberarInstanciaDeDICOMManager(IDICOMManager* instancia) = 0;
+
+        //endregion
+
+protected:
+
+        IPACSController();
+};
+}
+}
diff --git a/cadxcore/api/controllers/iprogresscontroller.cpp b/cadxcore/api/controllers/iprogresscontroller.cpp
new file mode 100644
index 0000000..382ae63
--- /dev/null
+++ b/cadxcore/api/controllers/iprogresscontroller.cpp
@@ -0,0 +1,76 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iprogresscontroller.h"
+
+//-------------------------------------------------------------------------
+
+GNC::IControladorProgreso::IControladorProgreso()
+{
+}
+
+GNC::IControladorProgreso::~IControladorProgreso()
+{
+}
+
+//-------------------------------------------------------------------------
+
+GNC::INotificadorProgreso::INotificadorProgreso()
+{
+        m_ProgresoNormalizado = 0;
+}
+
+GNC::INotificadorProgreso::~INotificadorProgreso()
+{
+}
+
+/** Cuidado! hay que proteger estos accesos con un cerrojo **/
+float GNC::INotificadorProgreso::GetProgresoNormalizado()
+{
+        return m_ProgresoNormalizado;
+}
+
+/** Cuidado! hay que proteger estos accesos con un cerrojo **/
+std::string GNC::INotificadorProgreso::GetTextoProgreso()
+{
+        return m_Texto;
+}
+
+/** Cuidado! hay que proteger estos accesos con un cerrojo **/
+void GNC::INotificadorProgreso::SetProgresoNormalizado(float progresoNormalizado)
+{
+        m_ProgresoNormalizado = progresoNormalizado;
+}
+
+/** Cuidado! hay que proteger estos accesos con un cerrojo **/
+void GNC::INotificadorProgreso::SetTextoProgreso(const std::string& texto)
+{
+        m_Texto = texto;
+}
+
+void GNC::INotificadorProgreso::LockProgreso()
+{
+        this->Lock();
+}
+
+void GNC::INotificadorProgreso::UnLockProgreso()
+{
+        this->UnLock();
+}
diff --git a/cadxcore/api/controllers/iprogresscontroller.h b/cadxcore/api/controllers/iprogresscontroller.h
new file mode 100644
index 0000000..3655315
--- /dev/null
+++ b/cadxcore/api/controllers/iprogresscontroller.h
@@ -0,0 +1,83 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <api/ilock.h>
+
+namespace GNC
+{
+
+//-------------------------------------------------------------------------
+
+class EXTAPI IControladorProgreso
+{
+public:
+
+        IControladorProgreso();
+
+        virtual ~IControladorProgreso();
+
+        /** Interface **/
+        virtual void InsertarTarea(long taskId, const std::string& texto) = 0;
+
+        /** Interface **/
+        virtual void EliminarTarea(long taskId) = 0;
+
+        /** Interface **/
+        virtual void SetProgresoTarea(long taskId, float normalizedProgress, const std::string& texto) = 0;
+
+};
+
+//-------------------------------------------------------------------------
+
+class EXTAPI INotificadorProgreso : public GNC::GCS::ILockable
+{
+
+public:
+
+        INotificadorProgreso();
+
+        virtual ~INotificadorProgreso();
+
+        /** Cuidado! hay que proteger estos accesos con un cerrojo **/
+        float GetProgresoNormalizado();
+
+        /** Cuidado! hay que proteger estos accesos con un cerrojo **/
+        std::string GetTextoProgreso();
+
+        /** Cuidado! hay que proteger estos accesos con un cerrojo **/
+        void SetProgresoNormalizado(float progresoNormalizado);
+
+        /** Cuidado! hay que proteger estos accesos con un cerrojo **/
+        void SetTextoProgreso(const std::string& texto);
+
+        void LockProgreso();
+
+        void UnLockProgreso();
+
+        /** Interface **/
+        virtual bool NotificarProgreso(float progresoNormalizado, const std::string& texto) = 0;
+
+protected:
+        std::string m_Texto;
+        float m_ProgresoNormalizado;
+};
+}
diff --git a/cadxcore/api/controllers/proxies/ipipelineproperties.cpp b/cadxcore/api/controllers/proxies/ipipelineproperties.cpp
new file mode 100644
index 0000000..3e04de3
--- /dev/null
+++ b/cadxcore/api/controllers/proxies/ipipelineproperties.cpp
@@ -0,0 +1,65 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "ipipelineproperties.h"
+GNC::GCS::IPipelineProperties::IPipelineProperties()
+{
+}
+
+GNC::GCS::IPipelineProperties::~IPipelineProperties()
+{
+}
+
+void GNC::GCS::IPipelineProperties::GetFPDimensions(double dims[3])
+{
+        int idims[3] = {0, 0, 0};
+        GetDimensions(idims);
+        dims[0] = (double) idims[0];
+        dims[1] = (double) idims[1];
+        dims[2] = (double) idims[2];
+
+}
+
+/**Gets the slice output dimensions **/
+void GNC::GCS::IPipelineProperties::GetFPOutputDimensions(double dims[3])
+{
+        int odims[3] = {0, 0, 0};
+        GetOutputDimensions(odims);
+        dims[0] = (double) odims[0];
+        dims[1] = (double) odims[1];
+        dims[2] = (double) odims[2];
+}
+
+//endregion
+
+//------------------------------------------------------------------------------------------------
+//region optional
+
+/** Sets camera custom orientation **/
+void GNC::GCS::IPipelineProperties::SetCustomOrientation(GNC::GCS::Vector3D&, GNC::GCS::Vector3D&, GNC::GCS::Vector3D&, double&)
+{
+}
+
+/** Gets the output current slice number **/
+int GNC::GCS::IPipelineProperties::GetCurrentSliceIndex() const
+{
+        return 0;
+}
diff --git a/cadxcore/api/controllers/proxies/ipipelineproperties.h b/cadxcore/api/controllers/proxies/ipipelineproperties.h
new file mode 100644
index 0000000..b294d1e
--- /dev/null
+++ b/cadxcore/api/controllers/proxies/ipipelineproperties.h
@@ -0,0 +1,112 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#ifndef IPIPELINEPROPERTIES_H
+#define IPIPELINEPROPERTIES_H
+#include <api/api.h>
+#include <api/autoptr.h>
+
+//----------------------------------------------------------------------------------------------------
+//region Forward Declarations
+
+//endregion
+namespace GNC
+{
+namespace GCS
+{
+class IGinkgoMatrix4x4;
+class Vector3D;
+
+//----------------------------------------------------------------------------------------------------
+/** Pipeline Properties Proxy  class **/
+class EXTAPI IPipelineProperties
+{
+public:
+
+        IPipelineProperties();
+
+        virtual ~IPipelineProperties();
+
+        //------------------------------------------------------------------------------------------------
+        //region mandatory
+
+        /** Updates **/
+        virtual void Update() = 0;
+
+        /** Updates output information **/
+        virtual void UpdateInformation() = 0;
+
+        /** Gets original (3D Volume) direction cosines **/
+        virtual const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GetDirection() = 0;
+
+        /** Gets the original (3D Volume) origin **/
+        virtual void GetOrigin(double origin[3]) = 0;
+
+        /** Gets the original (3D Volume) spacing **/
+        virtual void GetSpacing(double spacing[3]) = 0;
+
+        /** Gets the original (3D Volume) dimensions **/
+        virtual void GetDimensions(int dims[3]) = 0;
+
+        /* Gets the slice direction cosines */
+        virtual const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GetOutputDirection() = 0;
+
+        /** Gets the slice output origin **/
+        virtual void GetOutputOrigin(double origin[3]) = 0;
+
+        /** Gets the slice output spacing **/
+        virtual void GetOutputSpacing(double spacing[3]) = 0;
+
+        /**Gets the slice output dimensions **/
+        virtual void GetOutputDimensions(int currentDimensions[3]) = 0;
+
+
+        //endregion
+
+        //------------------------------------------------------------------------------------------------
+        //region helpers
+
+        /**Gets the original (3D Volume) dimensions as double floating point**/
+        void GetFPDimensions(double dims[3]);
+
+        /**Gets the slice output dimensions as double floating point**/
+        void GetFPOutputDimensions(double currentDimensions[3]);
+
+        //endregion
+
+        //------------------------------------------------------------------------------------------------
+        //region optional
+
+        /** Sets camera custom orientation **/
+        virtual void SetCustomOrientation(GNC::GCS::Vector3D& camera_focal_point, GNC::GCS::Vector3D& camera_position, GNC::GCS::Vector3D& camera_view_up, double& rotation);
+
+        /** Gets the output current slice number **/
+        virtual int GetCurrentSliceIndex() const;
+
+        //endregion
+
+};
+//endregion
+}
+}
+
+
+#endif
diff --git a/cadxcore/api/dicom/dcmdictionary.h b/cadxcore/api/dicom/dcmdictionary.h
new file mode 100644
index 0000000..47a72cf
--- /dev/null
+++ b/cadxcore/api/dicom/dcmdictionary.h
@@ -0,0 +1,3363 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+
+/*
+** Fixed Tags in ascending (gggg,eeee" order.
+** Number of entries: 3250
+** Tags with a repeating component (repeating tags" are listed later.
+*/
+#define GKDCM_CommandGroupLength                   "0000|0000"
+#define GKDCM_ACR_NEMA_CommandGroupLengthToEnd     "0000|0001"
+#define GKDCM_AffectedSOPClassUID                  "0000|0002"
+#define GKDCM_RequestedSOPClassUID                 "0000|0003"
+#define GKDCM_ACR_NEMA_CommandRecognitionCode      "0000|0010"
+#define GKDCM_CommandField                         "0000|0100"
+#define GKDCM_MessageID                            "0000|0110"
+#define GKDCM_MessageIDBeingRespondedTo            "0000|0120"
+#define GKDCM_ACR_NEMA_Initiator                   "0000|0200"
+#define GKDCM_ACR_NEMA_Receiver                    "0000|0300"
+#define GKDCM_ACR_NEMA_FindLocation                "0000|0400"
+#define GKDCM_MoveDestination                      "0000|0600"
+#define GKDCM_Priority                             "0000|0700"
+#define GKDCM_DataSetType                          "0000|0800"
+#define GKDCM_ACR_NEMA_NumberOfMatches             "0000|0850"
+#define GKDCM_ACR_NEMA_ResponseSequenceNumber      "0000|0860"
+#define GKDCM_Status                               "0000|0900"
+#define GKDCM_OffendingElement                     "0000|0901"
+#define GKDCM_ErrorComment                         "0000|0902"
+#define GKDCM_ErrorID                              "0000|0903"
+#define GKDCM_AffectedSOPInstanceUID               "0000|1000"
+#define GKDCM_RequestedSOPInstanceUID              "0000|1001"
+#define GKDCM_EventTypeID                          "0000|1002"
+#define GKDCM_AttributeIdentifierList              "0000|1005"
+#define GKDCM_ActionTypeID                         "0000|1008"
+#define GKDCM_NumberOfRemainingSubOperations       "0000|1020"
+#define GKDCM_NumberOfCompletedSubOperations       "0000|1021"
+#define GKDCM_NumberOfFailedSubOperations          "0000|1022"
+#define GKDCM_NumberOfWarningSubOperations         "0000|1023"
+#define GKDCM_MoveOriginatorApplicationEntityTitle "0000|1030"
+#define GKDCM_MoveOriginatorMessageID              "0000|1031"
+#define GKDCM_ACR_NEMA_DialogReceiver              "0000|4000"
+#define GKDCM_ACR_NEMA_TerminalType                "0000|4010"
+#define GKDCM_ACR_NEMA_MessageSetID                "0000|5010"
+#define GKDCM_ACR_NEMA_EndMessageSet               "0000|5020"
+#define GKDCM_ACR_NEMA_DisplayFormat               "0000|5110"
+#define GKDCM_ACR_NEMA_PagePositionID              "0000|5120"
+#define GKDCM_ACR_NEMA_TextFormatID                "0000|5130"
+#define GKDCM_ACR_NEMA_NormalReverse               "0000|5140"
+#define GKDCM_ACR_NEMA_AddGrayScale                "0000|5150"
+#define GKDCM_ACR_NEMA_Borders                     "0000|5160"
+#define GKDCM_ACR_NEMA_Copies                      "0000|5170"
+#define GKDCM_ACR_NEMA_MagnificationType           "0000|5180"
+#define GKDCM_ACR_NEMA_Erase                       "0000|5190"
+#define GKDCM_ACR_NEMA_Print                       "0000|51a0"
+#define GKDCM_ACR_NEMA_Overlays                    "0000|51b0"
+#define GKDCM_FileMetaInformationGroupLength       "0002|0000"
+#define GKDCM_FileMetaInformationVersion           "0002|0001"
+#define GKDCM_MediaStorageSOPClassUID              "0002|0002"
+#define GKDCM_MediaStorageSOPInstanceUID           "0002|0003"
+#define GKDCM_TransferSyntaxUID                    "0002|0010"
+#define GKDCM_ImplementationClassUID               "0002|0012"
+#define GKDCM_ImplementationVersionName            "0002|0013"
+#define GKDCM_SourceApplicationEntityTitle         "0002|0016"
+#define GKDCM_PrivateInformationCreatorUID         "0002|0100"
+#define GKDCM_PrivateInformation                   "0002|0102"
+#define GKDCM_FileSetID                            "0004|1130"
+#define GKDCM_FileSetDescriptorFileID              "0004|1141"
+#define GKDCM_SpecificCharacterSetOfFileSetDescriptorFile "0004|1142"
+#define GKDCM_OffsetOfTheFirstDirectoryRecordOfTheRootDirectoryEntity "0004|1200"
+#define GKDCM_OffsetOfTheLastDirectoryRecordOfTheRootDirectoryEntity "0004|1202"
+#define GKDCM_FileSetConsistencyFlag               "0004|1212"
+#define GKDCM_DirectoryRecordSequence              "0004|1220"
+#define GKDCM_OffsetOfTheNextDirectoryRecord       "0004|1400"
+#define GKDCM_RecordInUseFlag                      "0004|1410"
+#define GKDCM_OffsetOfReferencedLowerLevelDirectoryEntity "0004|1420"
+#define GKDCM_DirectoryRecordType                  "0004|1430"
+#define GKDCM_PrivateRecordUID                     "0004|1432"
+#define GKDCM_ReferencedFileID                     "0004|1500"
+#define GKDCM_RETIRED_MRDRDirectoryRecordOffset    "0004|1504"
+#define GKDCM_ReferencedSOPClassUIDInFile          "0004|1510"
+#define GKDCM_ReferencedSOPInstanceUIDInFile       "0004|1511"
+#define GKDCM_ReferencedTransferSyntaxUIDInFile    "0004|1512"
+#define GKDCM_ReferencedRelatedGeneralSOPClassUIDInFile "0004|151a"
+#define GKDCM_RETIRED_NumberOfReferences           "0004|1600"
+#define GKDCM_ACR_NEMA_IdentifyingGroupLengthToEnd "0008|0001"
+#define GKDCM_SpecificCharacterSet                 "0008|0005"
+#define GKDCM_LanguageCodeSequence                 "0008|0006"
+#define GKDCM_ImageType                            "0008|0008"
+#define GKDCM_ACR_NEMA_RecognitionCode             "0008|0010"
+#define GKDCM_InstanceCreationDate                 "0008|0012"
+#define GKDCM_InstanceCreationTime                 "0008|0013"
+#define GKDCM_InstanceCreatorUID                   "0008|0014"
+#define GKDCM_SOPClassUID                          "0008|0016"
+#define GKDCM_SOPInstanceUID                       "0008|0018"
+#define GKDCM_RelatedGeneralSOPClassUID            "0008|001a"
+#define GKDCM_OriginalSpecializedSOPClassUID       "0008|001b"
+#define GKDCM_StudyDate                            "0008|0020"
+#define GKDCM_SeriesDate                           "0008|0021"
+#define GKDCM_AcquisitionDate                      "0008|0022"
+#define GKDCM_ContentDate                          "0008|0023"
+#define GKDCM_RETIRED_OverlayDate                  "0008|0024"
+#define GKDCM_RETIRED_CurveDate                    "0008|0025"
+#define GKDCM_AcquisitionDateTime                  "0008|002a"
+#define GKDCM_StudyTime                            "0008|0030"
+#define GKDCM_SeriesTime                           "0008|0031"
+#define GKDCM_AcquisitionTime                      "0008|0032"
+#define GKDCM_ContentTime                          "0008|0033"
+#define GKDCM_RETIRED_OverlayTime                  "0008|0034"
+#define GKDCM_RETIRED_CurveTime                    "0008|0035"
+#define GKDCM_ACR_NEMA_OldDataSetType              "0008|0040"
+#define GKDCM_ACR_NEMA_DataSetSubtype              "0008|0041"
+#define GKDCM_RETIRED_NuclearMedicineSeriesType    "0008|0042"
+#define GKDCM_AccessionNumber                      "0008|0050"
+#define GKDCM_IssuerOfAccessionNumberSequence      "0008|0051"
+#define GKDCM_QueryRetrieveLevel                   "0008|0052"
+#define GKDCM_RetrieveAETitle                      "0008|0054"
+#define GKDCM_InstanceAvailability                 "0008|0056"
+#define GKDCM_FailedSOPInstanceUIDList             "0008|0058"
+#define GKDCM_Modality                             "0008|0060"
+#define GKDCM_ModalitiesInStudy                    "0008|0061"
+#define GKDCM_SOPClassesInStudy                    "0008|0062"
+#define GKDCM_ConversionType                       "0008|0064"
+#define GKDCM_PresentationIntentType               "0008|0068"
+#define GKDCM_Manufacturer                         "0008|0070"
+#define GKDCM_InstitutionName                      "0008|0080"
+#define GKDCM_InstitutionAddress                   "0008|0081"
+#define GKDCM_InstitutionCodeSequence              "0008|0082"
+#define GKDCM_ReferringPhysicianName               "0008|0090"
+#define GKDCM_ReferringPhysicianAddress            "0008|0092"
+#define GKDCM_ReferringPhysicianTelephoneNumbers   "0008|0094"
+#define GKDCM_ReferringPhysicianIdentificationSequence "0008|0096"
+#define GKDCM_CodeValue                            "0008|0100"
+#define GKDCM_CodingSchemeDesignator               "0008|0102"
+#define GKDCM_CodingSchemeVersion                  "0008|0103"
+#define GKDCM_CodeMeaning                          "0008|0104"
+#define GKDCM_MappingResource                      "0008|0105"
+#define GKDCM_ContextGroupVersion                  "0008|0106"
+#define GKDCM_ContextGroupLocalVersion             "0008|0107"
+#define GKDCM_ContextGroupExtensionFlag            "0008|010b"
+#define GKDCM_CodingSchemeUID                      "0008|010c"
+#define GKDCM_ContextGroupExtensionCreatorUID      "0008|010d"
+#define GKDCM_ContextIdentifier                    "0008|010f"
+#define GKDCM_CodingSchemeIdentificationSequence   "0008|0110"
+#define GKDCM_CodingSchemeRegistry                 "0008|0112"
+#define GKDCM_CodingSchemeExternalID               "0008|0114"
+#define GKDCM_CodingSchemeName                     "0008|0115"
+#define GKDCM_CodingSchemeResponsibleOrganization  "0008|0116"
+#define GKDCM_ContextUID                           "0008|0117"
+#define GKDCM_TimezoneOffsetFromUTC                "0008|0201"
+#define GKDCM_ACR_NEMA_NetworkID                   "0008|1000"
+#define GKDCM_StationName                          "0008|1010"
+#define GKDCM_StudyDescription                     "0008|1030"
+#define GKDCM_ProcedureCodeSequence                "0008|1032"
+#define GKDCM_SeriesDescription                    "0008|103e"
+#define GKDCM_SeriesDescriptionCodeSequence        "0008|103f"
+#define GKDCM_InstitutionalDepartmentName          "0008|1040"
+#define GKDCM_PhysiciansOfRecord                   "0008|1048"
+#define GKDCM_PhysiciansOfRecordIdentificationSequence "0008|1049"
+#define GKDCM_PerformingPhysicianName              "0008|1050"
+#define GKDCM_PerformingPhysicianIdentificationSequence "0008|1052"
+#define GKDCM_NameOfPhysiciansReadingStudy         "0008|1060"
+#define GKDCM_PhysiciansReadingStudyIdentificationSequence "0008|1062"
+#define GKDCM_OperatorsName                        "0008|1070"
+#define GKDCM_OperatorIdentificationSequence       "0008|1072"
+#define GKDCM_AdmittingDiagnosesDescription        "0008|1080"
+#define GKDCM_AdmittingDiagnosesCodeSequence       "0008|1084"
+#define GKDCM_ManufacturerModelName                "0008|1090"
+#define GKDCM_RETIRED_ReferencedResultsSequence    "0008|1100"
+#define GKDCM_ReferencedStudySequence              "0008|1110"
+#define GKDCM_ReferencedPerformedProcedureStepSequence "0008|1111"
+#define GKDCM_ReferencedSeriesSequence             "0008|1115"
+#define GKDCM_ReferencedPatientSequence            "0008|1120"
+#define GKDCM_ReferencedVisitSequence              "0008|1125"
+#define GKDCM_RETIRED_ReferencedOverlaySequence    "0008|1130"
+#define GKDCM_ReferencedStereometricInstanceSequence "0008|1134"
+#define GKDCM_ReferencedWaveformSequence           "0008|113a"
+#define GKDCM_ReferencedImageSequence              "0008|1140"
+#define GKDCM_RETIRED_ReferencedCurveSequence      "0008|1145"
+#define GKDCM_ReferencedInstanceSequence           "0008|114a"
+#define GKDCM_ReferencedRealWorldValueMappingInstanceSequence "0008|114b"
+#define GKDCM_ReferencedSOPClassUID                "0008|1150"
+#define GKDCM_ReferencedSOPInstanceUID             "0008|1155"
+#define GKDCM_SOPClassesSupported                  "0008|115a"
+#define GKDCM_ReferencedFrameNumber                "0008|1160"
+#define GKDCM_SimpleFrameList                      "0008|1161"
+#define GKDCM_CalculatedFrameList                  "0008|1162"
+#define GKDCM_TimeRange                            "0008|1163"
+#define GKDCM_FrameExtractionSequence              "0008|1164"
+#define GKDCM_MultiFrameSourceSOPInstanceUID       "0008|1167"
+#define GKDCM_TransactionUID                       "0008|1195"
+#define GKDCM_FailureReason                        "0008|1197"
+#define GKDCM_FailedSOPSequence                    "0008|1198"
+#define GKDCM_ReferencedSOPSequence                "0008|1199"
+#define GKDCM_StudiesContainingOtherReferencedInstancesSequence "0008|1200"
+#define GKDCM_RelatedSeriesSequence                "0008|1250"
+#define GKDCM_RETIRED_LossyImageCompressionRetired "0008|2110"
+#define GKDCM_DerivationDescription                "0008|2111"
+#define GKDCM_SourceImageSequence                  "0008|2112"
+#define GKDCM_StageName                            "0008|2120"
+#define GKDCM_StageNumber                          "0008|2122"
+#define GKDCM_NumberOfStages                       "0008|2124"
+#define GKDCM_ViewName                             "0008|2127"
+#define GKDCM_ViewNumber                           "0008|2128"
+#define GKDCM_NumberOfEventTimers                  "0008|2129"
+#define GKDCM_NumberOfViewsInStage                 "0008|212a"
+#define GKDCM_EventElapsedTimes                    "0008|2130"
+#define GKDCM_EventTimerNames                      "0008|2132"
+#define GKDCM_EventTimerSequence                   "0008|2133"
+#define GKDCM_EventTimeOffset                      "0008|2134"
+#define GKDCM_EventCodeSequence                    "0008|2135"
+#define GKDCM_StartTrim                            "0008|2142"
+#define GKDCM_StopTrim                             "0008|2143"
+#define GKDCM_RecommendedDisplayFrameRate          "0008|2144"
+#define GKDCM_RETIRED_TransducerPosition           "0008|2200"
+#define GKDCM_RETIRED_TransducerOrientation        "0008|2204"
+#define GKDCM_RETIRED_AnatomicStructure            "0008|2208"
+#define GKDCM_AnatomicRegionSequence               "0008|2218"
+#define GKDCM_AnatomicRegionModifierSequence       "0008|2220"
+#define GKDCM_PrimaryAnatomicStructureSequence     "0008|2228"
+#define GKDCM_AnatomicStructureSpaceOrRegionSequence "0008|2229"
+#define GKDCM_PrimaryAnatomicStructureModifierSequence "0008|2230"
+#define GKDCM_RETIRED_TransducerPositionSequence   "0008|2240"
+#define GKDCM_RETIRED_TransducerPositionModifierSequence "0008|2242"
+#define GKDCM_RETIRED_TransducerOrientationSequence "0008|2244"
+#define GKDCM_RETIRED_TransducerOrientationModifierSequence "0008|2246"
+#define GKDCM_RETIRED_AnatomicStructureSpaceOrRegionCodeSequenceTrial "0008|2251"
+#define GKDCM_RETIRED_AnatomicPortalOfEntranceCodeSequenceTrial "0008|2253"
+#define GKDCM_RETIRED_AnatomicApproachDirectionCodeSequenceTrial "0008|2255"
+#define GKDCM_RETIRED_AnatomicPerspectiveDescriptionTrial "0008|2256"
+#define GKDCM_RETIRED_AnatomicPerspectiveCodeSequenceTrial "0008|2257"
+#define GKDCM_RETIRED_AnatomicLocationOfExaminingInstrumentDescriptionTrial "0008|2258"
+#define GKDCM_RETIRED_AnatomicLocationOfExaminingInstrumentCodeSequenceTrial "0008|2259"
+#define GKDCM_RETIRED_AnatomicStructureSpaceOrRegionModifierCodeSequenceTrial "0008|225a"
+#define GKDCM_RETIRED_OnAxisBackgroundAnatomicStructureCodeSequenceTrial "0008|225c"
+#define GKDCM_AlternateRepresentationSequence      "0008|3001"
+#define GKDCM_IrradiationEventUID                  "0008|3010"
+#define GKDCM_ACR_NEMA_IdentifyingComments         "0008|4000"
+#define GKDCM_FrameType                            "0008|9007"
+#define GKDCM_ReferencedImageEvidenceSequence      "0008|9092"
+#define GKDCM_ReferencedRawDataSequence            "0008|9121"
+#define GKDCM_CreatorVersionUID                    "0008|9123"
+#define GKDCM_DerivationImageSequence              "0008|9124"
+#define GKDCM_SourceImageEvidenceSequence          "0008|9154"
+#define GKDCM_PixelPresentation                    "0008|9205"
+#define GKDCM_VolumetricProperties                 "0008|9206"
+#define GKDCM_VolumeBasedCalculationTechnique      "0008|9207"
+#define GKDCM_ComplexImageComponent                "0008|9208"
+#define GKDCM_AcquisitionContrast                  "0008|9209"
+#define GKDCM_DerivationCodeSequence               "0008|9215"
+#define GKDCM_ReferencedPresentationStateSequence  "0008|9237"
+#define GKDCM_ReferencedOtherPlaneSequence         "0008|9410"
+#define GKDCM_FrameDisplaySequence                 "0008|9458"
+#define GKDCM_RecommendedDisplayFrameRateInFloat   "0008|9459"
+#define GKDCM_SkipFrameRangeFlag                   "0008|9460"
+#define GKDCM_PatientName                          "0010|0010"
+#define GKDCM_PatientID                            "0010|0020"
+#define GKDCM_IssuerOfPatientID                    "0010|0021"
+#define GKDCM_TypeOfPatientID                      "0010|0022"
+#define GKDCM_IssuerOfPatientIDQualifiersSequence  "0010|0024"
+#define GKDCM_PatientBirthDate                     "0010|0030"
+#define GKDCM_PatientBirthTime                     "0010|0032"
+#define GKDCM_PatientSex                           "0010|0040"
+#define GKDCM_PatientInsurancePlanCodeSequence     "0010|0050"
+#define GKDCM_PatientPrimaryLanguageCodeSequence   "0010|0101"
+#define GKDCM_PatientPrimaryLanguageModifierCodeSequence "0010|0102"
+#define GKDCM_OtherPatientIDs                      "0010|1000"
+#define GKDCM_OtherPatientNames                    "0010|1001"
+#define GKDCM_OtherPatientIDsSequence              "0010|1002"
+#define GKDCM_PatientBirthName                     "0010|1005"
+#define GKDCM_PatientAge                           "0010|1010"
+#define GKDCM_PatientSize                          "0010|1020"
+#define GKDCM_PatientSizeCodeSequence              "0010|1021"
+#define GKDCM_PatientWeight                        "0010|1030"
+#define GKDCM_PatientAddress                       "0010|1040"
+#define GKDCM_ACR_NEMA_InsurancePlanIdentification "0010|1050"
+#define GKDCM_PatientMotherBirthName               "0010|1060"
+#define GKDCM_MilitaryRank                         "0010|1080"
+#define GKDCM_BranchOfService                      "0010|1081"
+#define GKDCM_MedicalRecordLocator                 "0010|1090"
+#define GKDCM_MedicalAlerts                        "0010|2000"
+#define GKDCM_Allergies                            "0010|2110"
+#define GKDCM_CountryOfResidence                   "0010|2150"
+#define GKDCM_RegionOfResidence                    "0010|2152"
+#define GKDCM_PatientTelephoneNumbers              "0010|2154"
+#define GKDCM_EthnicGroup                          "0010|2160"
+#define GKDCM_Occupation                           "0010|2180"
+#define GKDCM_SmokingStatus                        "0010|21a0"
+#define GKDCM_AdditionalPatientHistory             "0010|21b0"
+#define GKDCM_PregnancyStatus                      "0010|21c0"
+#define GKDCM_LastMenstrualDate                    "0010|21d0"
+#define GKDCM_PatientReligiousPreference           "0010|21f0"
+#define GKDCM_PatientSpeciesDescription            "0010|2201"
+#define GKDCM_PatientSpeciesCodeSequence           "0010|2202"
+#define GKDCM_PatientSexNeutered                   "0010|2203"
+#define GKDCM_AnatomicalOrientationType            "0010|2210"
+#define GKDCM_PatientBreedDescription              "0010|2292"
+#define GKDCM_PatientBreedCodeSequence             "0010|2293"
+#define GKDCM_BreedRegistrationSequence            "0010|2294"
+#define GKDCM_BreedRegistrationNumber              "0010|2295"
+#define GKDCM_BreedRegistryCodeSequence            "0010|2296"
+#define GKDCM_ResponsiblePerson                    "0010|2297"
+#define GKDCM_ResponsiblePersonRole                "0010|2298"
+#define GKDCM_ResponsibleOrganization              "0010|2299"
+#define GKDCM_PatientComments                      "0010|4000"
+#define GKDCM_ExaminedBodyThickness                "0010|9431"
+#define GKDCM_ClinicalTrialSponsorName             "0012|0010"
+#define GKDCM_ClinicalTrialProtocolID              "0012|0020"
+#define GKDCM_ClinicalTrialProtocolName            "0012|0021"
+#define GKDCM_ClinicalTrialSiteID                  "0012|0030"
+#define GKDCM_ClinicalTrialSiteName                "0012|0031"
+#define GKDCM_ClinicalTrialSubjectID               "0012|0040"
+#define GKDCM_ClinicalTrialSubjectReadingID        "0012|0042"
+#define GKDCM_ClinicalTrialTimePointID             "0012|0050"
+#define GKDCM_ClinicalTrialTimePointDescription    "0012|0051"
+#define GKDCM_ClinicalTrialCoordinatingCenterName  "0012|0060"
+#define GKDCM_PatientIdentityRemoved               "0012|0062"
+#define GKDCM_DeidentificationMethod               "0012|0063"
+#define GKDCM_DeidentificationMethodCodeSequence   "0012|0064"
+#define GKDCM_ClinicalTrialSeriesID                "0012|0071"
+#define GKDCM_ClinicalTrialSeriesDescription       "0012|0072"
+#define GKDCM_ClinicalTrialProtocolEthicsCommitteeName "0012|0081"
+#define GKDCM_ClinicalTrialProtocolEthicsCommitteeApprovalNumber "0012|0082"
+#define GKDCM_ConsentForClinicalTrialUseSequence   "0012|0083"
+#define GKDCM_DistributionType                     "0012|0084"
+#define GKDCM_ConsentForDistributionFlag           "0012|0085"
+#define GKDCM_ContrastBolusAgent                   "0018|0010"
+#define GKDCM_ContrastBolusAgentSequence           "0018|0012"
+#define GKDCM_ContrastBolusAdministrationRouteSequence "0018|0014"
+#define GKDCM_BodyPartExamined                     "0018|0015"
+#define GKDCM_ScanningSequence                     "0018|0020"
+#define GKDCM_SequenceVariant                      "0018|0021"
+#define GKDCM_ScanOptions                          "0018|0022"
+#define GKDCM_MRAcquisitionType                    "0018|0023"
+#define GKDCM_SequenceName                         "0018|0024"
+#define GKDCM_AngioFlag                            "0018|0025"
+#define GKDCM_InterventionDrugInformationSequence  "0018|0026"
+#define GKDCM_InterventionDrugStopTime             "0018|0027"
+#define GKDCM_InterventionDrugDose                 "0018|0028"
+#define GKDCM_InterventionDrugCodeSequence         "0018|0029"
+#define GKDCM_AdditionalDrugSequence               "0018|002a"
+#define GKDCM_RETIRED_Radionuclide                 "0018|0030"
+#define GKDCM_Radiopharmaceutical                  "0018|0031"
+#define GKDCM_RETIRED_EnergyWindowCenterline       "0018|0032"
+#define GKDCM_RETIRED_EnergyWindowTotalWidth       "0018|0033"
+#define GKDCM_InterventionDrugName                 "0018|0034"
+#define GKDCM_InterventionDrugStartTime            "0018|0035"
+#define GKDCM_InterventionSequence                 "0018|0036"
+#define GKDCM_RETIRED_TherapyType                  "0018|0037"
+#define GKDCM_InterventionStatus                   "0018|0038"
+#define GKDCM_RETIRED_TherapyDescription           "0018|0039"
+#define GKDCM_InterventionDescription              "0018|003a"
+#define GKDCM_CineRate                             "0018|0040"
+#define GKDCM_InitialCineRunState                  "0018|0042"
+#define GKDCM_SliceThickness                       "0018|0050"
+#define GKDCM_KVP                                  "0018|0060"
+#define GKDCM_CountsAccumulated                    "0018|0070"
+#define GKDCM_AcquisitionTerminationCondition      "0018|0071"
+#define GKDCM_EffectiveDuration                    "0018|0072"
+#define GKDCM_AcquisitionStartCondition            "0018|0073"
+#define GKDCM_AcquisitionStartConditionData        "0018|0074"
+#define GKDCM_AcquisitionTerminationConditionData  "0018|0075"
+#define GKDCM_RepetitionTime                       "0018|0080"
+#define GKDCM_EchoTime                             "0018|0081"
+#define GKDCM_InversionTime                        "0018|0082"
+#define GKDCM_NumberOfAverages                     "0018|0083"
+#define GKDCM_ImagingFrequency                     "0018|0084"
+#define GKDCM_ImagedNucleus                        "0018|0085"
+#define GKDCM_EchoNumbers                          "0018|0086"
+#define GKDCM_MagneticFieldStrength                "0018|0087"
+#define GKDCM_SpacingBetweenSlices                 "0018|0088"
+#define GKDCM_NumberOfPhaseEncodingSteps           "0018|0089"
+#define GKDCM_DataCollectionDiameter               "0018|0090"
+#define GKDCM_EchoTrainLength                      "0018|0091"
+#define GKDCM_PercentSampling                      "0018|0093"
+#define GKDCM_PercentPhaseFieldOfView              "0018|0094"
+#define GKDCM_PixelBandwidth                       "0018|0095"
+#define GKDCM_DeviceSerialNumber                   "0018|1000"
+#define GKDCM_DeviceUID                            "0018|1002"
+#define GKDCM_DeviceID                             "0018|1003"
+#define GKDCM_PlateID                              "0018|1004"
+#define GKDCM_GeneratorID                          "0018|1005"
+#define GKDCM_GridID                               "0018|1006"
+#define GKDCM_CassetteID                           "0018|1007"
+#define GKDCM_GantryID                             "0018|1008"
+#define GKDCM_SecondaryCaptureDeviceID             "0018|1010"
+#define GKDCM_RETIRED_HardcopyCreationDeviceID     "0018|1011"
+#define GKDCM_DateOfSecondaryCapture               "0018|1012"
+#define GKDCM_TimeOfSecondaryCapture               "0018|1014"
+#define GKDCM_SecondaryCaptureDeviceManufacturer   "0018|1016"
+#define GKDCM_RETIRED_HardcopyDeviceManufacturer   "0018|1017"
+#define GKDCM_SecondaryCaptureDeviceManufacturerModelName "0018|1018"
+#define GKDCM_SecondaryCaptureDeviceSoftwareVersions "0018|1019"
+#define GKDCM_RETIRED_HardcopyDeviceSoftwareVersion "0018|101a"
+#define GKDCM_RETIRED_HardcopyDeviceManufacturerModelName "0018|101b"
+#define GKDCM_SoftwareVersions                     "0018|1020"
+#define GKDCM_VideoImageFormatAcquired             "0018|1022"
+#define GKDCM_DigitalImageFormatAcquired           "0018|1023"
+#define GKDCM_ProtocolName                         "0018|1030"
+#define GKDCM_ContrastBolusRoute                   "0018|1040"
+#define GKDCM_ContrastBolusVolume                  "0018|1041"
+#define GKDCM_ContrastBolusStartTime               "0018|1042"
+#define GKDCM_ContrastBolusStopTime                "0018|1043"
+#define GKDCM_ContrastBolusTotalDose               "0018|1044"
+#define GKDCM_SyringeCounts                        "0018|1045"
+#define GKDCM_ContrastFlowRate                     "0018|1046"
+#define GKDCM_ContrastFlowDuration                 "0018|1047"
+#define GKDCM_ContrastBolusIngredient              "0018|1048"
+#define GKDCM_ContrastBolusIngredientConcentration "0018|1049"
+#define GKDCM_SpatialResolution                    "0018|1050"
+#define GKDCM_TriggerTime                          "0018|1060"
+#define GKDCM_TriggerSourceOrType                  "0018|1061"
+#define GKDCM_NominalInterval                      "0018|1062"
+#define GKDCM_FrameTime                            "0018|1063"
+#define GKDCM_CardiacFramingType                   "0018|1064"
+#define GKDCM_FrameTimeVector                      "0018|1065"
+#define GKDCM_FrameDelay                           "0018|1066"
+#define GKDCM_ImageTriggerDelay                    "0018|1067"
+#define GKDCM_MultiplexGroupTimeOffset             "0018|1068"
+#define GKDCM_TriggerTimeOffset                    "0018|1069"
+#define GKDCM_SynchronizationTrigger               "0018|106a"
+#define GKDCM_SynchronizationChannel               "0018|106c"
+#define GKDCM_TriggerSamplePosition                "0018|106e"
+#define GKDCM_RadiopharmaceuticalRoute             "0018|1070"
+#define GKDCM_RadiopharmaceuticalVolume            "0018|1071"
+#define GKDCM_RadiopharmaceuticalStartTime         "0018|1072"
+#define GKDCM_RadiopharmaceuticalStopTime          "0018|1073"
+#define GKDCM_RadionuclideTotalDose                "0018|1074"
+#define GKDCM_RadionuclideHalfLife                 "0018|1075"
+#define GKDCM_RadionuclidePositronFraction         "0018|1076"
+#define GKDCM_RadiopharmaceuticalSpecificActivity  "0018|1077"
+#define GKDCM_RadiopharmaceuticalStartDateTime     "0018|1078"
+#define GKDCM_RadiopharmaceuticalStopDateTime      "0018|1079"
+#define GKDCM_BeatRejectionFlag                    "0018|1080"
+#define GKDCM_LowRRValue                           "0018|1081"
+#define GKDCM_HighRRValue                          "0018|1082"
+#define GKDCM_IntervalsAcquired                    "0018|1083"
+#define GKDCM_IntervalsRejected                    "0018|1084"
+#define GKDCM_PVCRejection                         "0018|1085"
+#define GKDCM_SkipBeats                            "0018|1086"
+#define GKDCM_HeartRate                            "0018|1088"
+#define GKDCM_CardiacNumberOfImages                "0018|1090"
+#define GKDCM_TriggerWindow                        "0018|1094"
+#define GKDCM_ReconstructionDiameter               "0018|1100"
+#define GKDCM_DistanceSourceToDetector             "0018|1110"
+#define GKDCM_DistanceSourceToPatient              "0018|1111"
+#define GKDCM_EstimatedRadiographicMagnificationFactor "0018|1114"
+#define GKDCM_GantryDetectorTilt                   "0018|1120"
+#define GKDCM_GantryDetectorSlew                   "0018|1121"
+#define GKDCM_TableHeight                          "0018|1130"
+#define GKDCM_TableTraverse                        "0018|1131"
+#define GKDCM_TableMotion                          "0018|1134"
+#define GKDCM_TableVerticalIncrement               "0018|1135"
+#define GKDCM_TableLateralIncrement                "0018|1136"
+#define GKDCM_TableLongitudinalIncrement           "0018|1137"
+#define GKDCM_TableAngle                           "0018|1138"
+#define GKDCM_TableType                            "0018|113a"
+#define GKDCM_RotationDirection                    "0018|1140"
+#define GKDCM_RETIRED_AngularPosition              "0018|1141"
+#define GKDCM_RadialPosition                       "0018|1142"
+#define GKDCM_ScanArc                              "0018|1143"
+#define GKDCM_AngularStep                          "0018|1144"
+#define GKDCM_CenterOfRotationOffset               "0018|1145"
+#define GKDCM_RETIRED_RotationOffset               "0018|1146"
+#define GKDCM_FieldOfViewShape                     "0018|1147"
+#define GKDCM_FieldOfViewDimensions                "0018|1149"
+#define GKDCM_ExposureTime                         "0018|1150"
+#define GKDCM_XRayTubeCurrent                      "0018|1151"
+#define GKDCM_Exposure                             "0018|1152"
+#define GKDCM_ExposureInuAs                        "0018|1153"
+#define GKDCM_AveragePulseWidth                    "0018|1154"
+#define GKDCM_RadiationSetting                     "0018|1155"
+#define GKDCM_RectificationType                    "0018|1156"
+#define GKDCM_RadiationMode                        "0018|115a"
+#define GKDCM_ImageAndFluoroscopyAreaDoseProduct   "0018|115e"
+#define GKDCM_FilterType                           "0018|1160"
+#define GKDCM_TypeOfFilters                        "0018|1161"
+#define GKDCM_IntensifierSize                      "0018|1162"
+#define GKDCM_ImagerPixelSpacing                   "0018|1164"
+#define GKDCM_Grid                                 "0018|1166"
+#define GKDCM_GeneratorPower                       "0018|1170"
+#define GKDCM_CollimatorGridName                   "0018|1180"
+#define GKDCM_CollimatorType                       "0018|1181"
+#define GKDCM_FocalDistance                        "0018|1182"
+#define GKDCM_XFocusCenter                         "0018|1183"
+#define GKDCM_YFocusCenter                         "0018|1184"
+#define GKDCM_FocalSpots                           "0018|1190"
+#define GKDCM_AnodeTargetMaterial                  "0018|1191"
+#define GKDCM_BodyPartThickness                    "0018|11a0"
+#define GKDCM_CompressionForce                     "0018|11a2"
+#define GKDCM_DateOfLastCalibration                "0018|1200"
+#define GKDCM_TimeOfLastCalibration                "0018|1201"
+#define GKDCM_ConvolutionKernel                    "0018|1210"
+#define GKDCM_ACR_NEMA_UpperLowerPixelValues       "0018|1240"
+#define GKDCM_ActualFrameDuration                  "0018|1242"
+#define GKDCM_CountRate                            "0018|1243"
+#define GKDCM_PreferredPlaybackSequencing          "0018|1244"
+#define GKDCM_ReceiveCoilName                      "0018|1250"
+#define GKDCM_TransmitCoilName                     "0018|1251"
+#define GKDCM_PlateType                            "0018|1260"
+#define GKDCM_PhosphorType                         "0018|1261"
+#define GKDCM_ScanVelocity                         "0018|1300"
+#define GKDCM_WholeBodyTechnique                   "0018|1301"
+#define GKDCM_ScanLength                           "0018|1302"
+#define GKDCM_AcquisitionMatrix                    "0018|1310"
+#define GKDCM_InPlanePhaseEncodingDirection        "0018|1312"
+#define GKDCM_FlipAngle                            "0018|1314"
+#define GKDCM_VariableFlipAngleFlag                "0018|1315"
+#define GKDCM_SAR                                  "0018|1316"
+#define GKDCM_dBdt                                 "0018|1318"
+#define GKDCM_AcquisitionDeviceProcessingDescription "0018|1400"
+#define GKDCM_AcquisitionDeviceProcessingCode      "0018|1401"
+#define GKDCM_CassetteOrientation                  "0018|1402"
+#define GKDCM_CassetteSize                         "0018|1403"
+#define GKDCM_ExposuresOnPlate                     "0018|1404"
+#define GKDCM_RelativeXRayExposure                 "0018|1405"
+#define GKDCM_ExposureIndex                        "0018|1411"
+#define GKDCM_TargetExposureIndex                  "0018|1412"
+#define GKDCM_DeviationIndex                       "0018|1413"
+#define GKDCM_ColumnAngulation                     "0018|1450"
+#define GKDCM_TomoLayerHeight                      "0018|1460"
+#define GKDCM_TomoAngle                            "0018|1470"
+#define GKDCM_TomoTime                             "0018|1480"
+#define GKDCM_TomoType                             "0018|1490"
+#define GKDCM_TomoClass                            "0018|1491"
+#define GKDCM_NumberOfTomosynthesisSourceImages    "0018|1495"
+#define GKDCM_PositionerMotion                     "0018|1500"
+#define GKDCM_PositionerType                       "0018|1508"
+#define GKDCM_PositionerPrimaryAngle               "0018|1510"
+#define GKDCM_PositionerSecondaryAngle             "0018|1511"
+#define GKDCM_PositionerPrimaryAngleIncrement      "0018|1520"
+#define GKDCM_PositionerSecondaryAngleIncrement    "0018|1521"
+#define GKDCM_DetectorPrimaryAngle                 "0018|1530"
+#define GKDCM_DetectorSecondaryAngle               "0018|1531"
+#define GKDCM_ShutterShape                         "0018|1600"
+#define GKDCM_ShutterLeftVerticalEdge              "0018|1602"
+#define GKDCM_ShutterRightVerticalEdge             "0018|1604"
+#define GKDCM_ShutterUpperHorizontalEdge           "0018|1606"
+#define GKDCM_ShutterLowerHorizontalEdge           "0018|1608"
+#define GKDCM_CenterOfCircularShutter              "0018|1610"
+#define GKDCM_RadiusOfCircularShutter              "0018|1612"
+#define GKDCM_VerticesOfThePolygonalShutter        "0018|1620"
+#define GKDCM_ShutterPresentationValue             "0018|1622"
+#define GKDCM_ShutterOverlayGroup                  "0018|1623"
+#define GKDCM_ShutterPresentationColorCIELabValue  "0018|1624"
+#define GKDCM_CollimatorShape                      "0018|1700"
+#define GKDCM_CollimatorLeftVerticalEdge           "0018|1702"
+#define GKDCM_CollimatorRightVerticalEdge          "0018|1704"
+#define GKDCM_CollimatorUpperHorizontalEdge        "0018|1706"
+#define GKDCM_CollimatorLowerHorizontalEdge        "0018|1708"
+#define GKDCM_CenterOfCircularCollimator           "0018|1710"
+#define GKDCM_RadiusOfCircularCollimator           "0018|1712"
+#define GKDCM_VerticesOfThePolygonalCollimator     "0018|1720"
+#define GKDCM_AcquisitionTimeSynchronized          "0018|1800"
+#define GKDCM_TimeSource                           "0018|1801"
+#define GKDCM_TimeDistributionProtocol             "0018|1802"
+#define GKDCM_NTPSourceAddress                     "0018|1803"
+#define GKDCM_PageNumberVector                     "0018|2001"
+#define GKDCM_FrameLabelVector                     "0018|2002"
+#define GKDCM_FramePrimaryAngleVector              "0018|2003"
+#define GKDCM_FrameSecondaryAngleVector            "0018|2004"
+#define GKDCM_SliceLocationVector                  "0018|2005"
+#define GKDCM_DisplayWindowLabelVector             "0018|2006"
+#define GKDCM_NominalScannedPixelSpacing           "0018|2010"
+#define GKDCM_DigitizingDeviceTransportDirection   "0018|2020"
+#define GKDCM_RotationOfScannedFilm                "0018|2030"
+#define GKDCM_IVUSAcquisition                      "0018|3100"
+#define GKDCM_IVUSPullbackRate                     "0018|3101"
+#define GKDCM_IVUSGatedRate                        "0018|3102"
+#define GKDCM_IVUSPullbackStartFrameNumber         "0018|3103"
+#define GKDCM_IVUSPullbackStopFrameNumber          "0018|3104"
+#define GKDCM_LesionNumber                         "0018|3105"
+#define GKDCM_ACR_NEMA_AcquisitionComments         "0018|4000"
+#define GKDCM_OutputPower                          "0018|5000"
+#define GKDCM_TransducerData                       "0018|5010"
+#define GKDCM_FocusDepth                           "0018|5012"
+#define GKDCM_ProcessingFunction                   "0018|5020"
+#define GKDCM_RETIRED_PostprocessingFunction       "0018|5021"
+#define GKDCM_MechanicalIndex                      "0018|5022"
+#define GKDCM_BoneThermalIndex                     "0018|5024"
+#define GKDCM_CranialThermalIndex                  "0018|5026"
+#define GKDCM_SoftTissueThermalIndex               "0018|5027"
+#define GKDCM_SoftTissueFocusThermalIndex          "0018|5028"
+#define GKDCM_SoftTissueSurfaceThermalIndex        "0018|5029"
+#define GKDCM_ACR_NEMA_DynamicRange                "0018|5030"
+#define GKDCM_ACR_NEMA_TotalGain                   "0018|5040"
+#define GKDCM_DepthOfScanField                     "0018|5050"
+#define GKDCM_PatientPosition                      "0018|5100"
+#define GKDCM_ViewPosition                         "0018|5101"
+#define GKDCM_ProjectionEponymousNameCodeSequence  "0018|5104"
+#define GKDCM_RETIRED_ImageTransformationMatrix    "0018|5210"
+#define GKDCM_RETIRED_ImageTranslationVector       "0018|5212"
+#define GKDCM_Sensitivity                          "0018|6000"
+#define GKDCM_SequenceOfUltrasoundRegions          "0018|6011"
+#define GKDCM_RegionSpatialFormat                  "0018|6012"
+#define GKDCM_RegionDataType                       "0018|6014"
+#define GKDCM_RegionFlags                          "0018|6016"
+#define GKDCM_RegionLocationMinX0                  "0018|6018"
+#define GKDCM_RegionLocationMinY0                  "0018|601a"
+#define GKDCM_RegionLocationMaxX1                  "0018|601c"
+#define GKDCM_RegionLocationMaxY1                  "0018|601e"
+#define GKDCM_ReferencePixelX0                     "0018|6020"
+#define GKDCM_ReferencePixelY0                     "0018|6022"
+#define GKDCM_PhysicalUnitsXDirection              "0018|6024"
+#define GKDCM_PhysicalUnitsYDirection              "0018|6026"
+#define GKDCM_ReferencePixelPhysicalValueX         "0018|6028"
+#define GKDCM_ReferencePixelPhysicalValueY         "0018|602a"
+#define GKDCM_PhysicalDeltaX                       "0018|602c"
+#define GKDCM_PhysicalDeltaY                       "0018|602e"
+#define GKDCM_TransducerFrequency                  "0018|6030"
+#define GKDCM_TransducerType                       "0018|6031"
+#define GKDCM_PulseRepetitionFrequency             "0018|6032"
+#define GKDCM_DopplerCorrectionAngle               "0018|6034"
+#define GKDCM_SteeringAngle                        "0018|6036"
+#define GKDCM_RETIRED_DopplerSampleVolumeXPositionRetired "0018|6038"
+#define GKDCM_DopplerSampleVolumeXPosition         "0018|6039"
+#define GKDCM_RETIRED_DopplerSampleVolumeYPositionRetired "0018|603a"
+#define GKDCM_DopplerSampleVolumeYPosition         "0018|603b"
+#define GKDCM_RETIRED_TMLinePositionX0Retired      "0018|603c"
+#define GKDCM_TMLinePositionX0                     "0018|603d"
+#define GKDCM_RETIRED_TMLinePositionY0Retired      "0018|603e"
+#define GKDCM_TMLinePositionY0                     "0018|603f"
+#define GKDCM_RETIRED_TMLinePositionX1Retired      "0018|6040"
+#define GKDCM_TMLinePositionX1                     "0018|6041"
+#define GKDCM_RETIRED_TMLinePositionY1Retired      "0018|6042"
+#define GKDCM_TMLinePositionY1                     "0018|6043"
+#define GKDCM_PixelComponentOrganization           "0018|6044"
+#define GKDCM_PixelComponentMask                   "0018|6046"
+#define GKDCM_PixelComponentRangeStart             "0018|6048"
+#define GKDCM_PixelComponentRangeStop              "0018|604a"
+#define GKDCM_PixelComponentPhysicalUnits          "0018|604c"
+#define GKDCM_PixelComponentDataType               "0018|604e"
+#define GKDCM_NumberOfTableBreakPoints             "0018|6050"
+#define GKDCM_TableOfXBreakPoints                  "0018|6052"
+#define GKDCM_TableOfYBreakPoints                  "0018|6054"
+#define GKDCM_NumberOfTableEntries                 "0018|6056"
+#define GKDCM_TableOfPixelValues                   "0018|6058"
+#define GKDCM_TableOfParameterValues               "0018|605a"
+#define GKDCM_RWaveTimeVector                      "0018|6060"
+#define GKDCM_DetectorConditionsNominalFlag        "0018|7000"
+#define GKDCM_DetectorTemperature                  "0018|7001"
+#define GKDCM_DetectorType                         "0018|7004"
+#define GKDCM_DetectorConfiguration                "0018|7005"
+#define GKDCM_DetectorDescription                  "0018|7006"
+#define GKDCM_DetectorMode                         "0018|7008"
+#define GKDCM_DetectorID                           "0018|700a"
+#define GKDCM_DateOfLastDetectorCalibration        "0018|700c"
+#define GKDCM_TimeOfLastDetectorCalibration        "0018|700e"
+#define GKDCM_ExposuresOnDetectorSinceLastCalibration "0018|7010"
+#define GKDCM_ExposuresOnDetectorSinceManufactured "0018|7011"
+#define GKDCM_DetectorTimeSinceLastExposure        "0018|7012"
+#define GKDCM_DetectorActiveTime                   "0018|7014"
+#define GKDCM_DetectorActivationOffsetFromExposure "0018|7016"
+#define GKDCM_DetectorBinning                      "0018|701a"
+#define GKDCM_DetectorElementPhysicalSize          "0018|7020"
+#define GKDCM_DetectorElementSpacing               "0018|7022"
+#define GKDCM_DetectorActiveShape                  "0018|7024"
+#define GKDCM_DetectorActiveDimensions             "0018|7026"
+#define GKDCM_DetectorActiveOrigin                 "0018|7028"
+#define GKDCM_DetectorManufacturerName             "0018|702a"
+#define GKDCM_DetectorManufacturerModelName        "0018|702b"
+#define GKDCM_FieldOfViewOrigin                    "0018|7030"
+#define GKDCM_FieldOfViewRotation                  "0018|7032"
+#define GKDCM_FieldOfViewHorizontalFlip            "0018|7034"
+#define GKDCM_GridAbsorbingMaterial                "0018|7040"
+#define GKDCM_GridSpacingMaterial                  "0018|7041"
+#define GKDCM_GridThickness                        "0018|7042"
+#define GKDCM_GridPitch                            "0018|7044"
+#define GKDCM_GridAspectRatio                      "0018|7046"
+#define GKDCM_GridPeriod                           "0018|7048"
+#define GKDCM_GridFocalDistance                    "0018|704c"
+#define GKDCM_FilterMaterial                       "0018|7050"
+#define GKDCM_FilterThicknessMinimum               "0018|7052"
+#define GKDCM_FilterThicknessMaximum               "0018|7054"
+#define GKDCM_FilterBeamPathLengthMinimum          "0018|7056"
+#define GKDCM_FilterBeamPathLengthMaximum          "0018|7058"
+#define GKDCM_ExposureControlMode                  "0018|7060"
+#define GKDCM_ExposureControlModeDescription       "0018|7062"
+#define GKDCM_ExposureStatus                       "0018|7064"
+#define GKDCM_PhototimerSetting                    "0018|7065"
+#define GKDCM_ExposureTimeInuS                     "0018|8150"
+#define GKDCM_XRayTubeCurrentInuA                  "0018|8151"
+#define GKDCM_ContentQualification                 "0018|9004"
+#define GKDCM_PulseSequenceName                    "0018|9005"
+#define GKDCM_MRImagingModifierSequence            "0018|9006"
+#define GKDCM_EchoPulseSequence                    "0018|9008"
+#define GKDCM_InversionRecovery                    "0018|9009"
+#define GKDCM_FlowCompensation                     "0018|9010"
+#define GKDCM_MultipleSpinEcho                     "0018|9011"
+#define GKDCM_MultiPlanarExcitation                "0018|9012"
+#define GKDCM_PhaseContrast                        "0018|9014"
+#define GKDCM_TimeOfFlightContrast                 "0018|9015"
+#define GKDCM_Spoiling                             "0018|9016"
+#define GKDCM_SteadyStatePulseSequence             "0018|9017"
+#define GKDCM_EchoPlanarPulseSequence              "0018|9018"
+#define GKDCM_TagAngleFirstAxis                    "0018|9019"
+#define GKDCM_MagnetizationTransfer                "0018|9020"
+#define GKDCM_T2Preparation                        "0018|9021"
+#define GKDCM_BloodSignalNulling                   "0018|9022"
+#define GKDCM_SaturationRecovery                   "0018|9024"
+#define GKDCM_SpectrallySelectedSuppression        "0018|9025"
+#define GKDCM_SpectrallySelectedExcitation         "0018|9026"
+#define GKDCM_SpatialPresaturation                 "0018|9027"
+#define GKDCM_Tagging                              "0018|9028"
+#define GKDCM_OversamplingPhase                    "0018|9029"
+#define GKDCM_TagSpacingFirstDimension             "0018|9030"
+#define GKDCM_GeometryOfKSpaceTraversal            "0018|9032"
+#define GKDCM_SegmentedKSpaceTraversal             "0018|9033"
+#define GKDCM_RectilinearPhaseEncodeReordering     "0018|9034"
+#define GKDCM_TagThickness                         "0018|9035"
+#define GKDCM_PartialFourierDirection              "0018|9036"
+#define GKDCM_CardiacSynchronizationTechnique      "0018|9037"
+#define GKDCM_ReceiveCoilManufacturerName          "0018|9041"
+#define GKDCM_MRReceiveCoilSequence                "0018|9042"
+#define GKDCM_ReceiveCoilType                      "0018|9043"
+#define GKDCM_QuadratureReceiveCoil                "0018|9044"
+#define GKDCM_MultiCoilDefinitionSequence          "0018|9045"
+#define GKDCM_MultiCoilConfiguration               "0018|9046"
+#define GKDCM_MultiCoilElementName                 "0018|9047"
+#define GKDCM_MultiCoilElementUsed                 "0018|9048"
+#define GKDCM_MRTransmitCoilSequence               "0018|9049"
+#define GKDCM_TransmitCoilManufacturerName         "0018|9050"
+#define GKDCM_TransmitCoilType                     "0018|9051"
+#define GKDCM_SpectralWidth                        "0018|9052"
+#define GKDCM_ChemicalShiftReference               "0018|9053"
+#define GKDCM_VolumeLocalizationTechnique          "0018|9054"
+#define GKDCM_MRAcquisitionFrequencyEncodingSteps  "0018|9058"
+#define GKDCM_Decoupling                           "0018|9059"
+#define GKDCM_DecoupledNucleus                     "0018|9060"
+#define GKDCM_DecouplingFrequency                  "0018|9061"
+#define GKDCM_DecouplingMethod                     "0018|9062"
+#define GKDCM_DecouplingChemicalShiftReference     "0018|9063"
+#define GKDCM_KSpaceFiltering                      "0018|9064"
+#define GKDCM_TimeDomainFiltering                  "0018|9065"
+#define GKDCM_NumberOfZeroFills                    "0018|9066"
+#define GKDCM_BaselineCorrection                   "0018|9067"
+#define GKDCM_ParallelReductionFactorInPlane       "0018|9069"
+#define GKDCM_CardiacRRIntervalSpecified           "0018|9070"
+#define GKDCM_AcquisitionDuration                  "0018|9073"
+#define GKDCM_FrameAcquisitionDateTime             "0018|9074"
+#define GKDCM_DiffusionDirectionality              "0018|9075"
+#define GKDCM_DiffusionGradientDirectionSequence   "0018|9076"
+#define GKDCM_ParallelAcquisition                  "0018|9077"
+#define GKDCM_ParallelAcquisitionTechnique         "0018|9078"
+#define GKDCM_InversionTimes                       "0018|9079"
+#define GKDCM_MetaboliteMapDescription             "0018|9080"
+#define GKDCM_PartialFourier                       "0018|9081"
+#define GKDCM_EffectiveEchoTime                    "0018|9082"
+#define GKDCM_MetaboliteMapCodeSequence            "0018|9083"
+#define GKDCM_ChemicalShiftSequence                "0018|9084"
+#define GKDCM_CardiacSignalSource                  "0018|9085"
+#define GKDCM_DiffusionBValue                      "0018|9087"
+#define GKDCM_DiffusionGradientOrientation         "0018|9089"
+#define GKDCM_VelocityEncodingDirection            "0018|9090"
+#define GKDCM_VelocityEncodingMinimumValue         "0018|9091"
+#define GKDCM_VelocityEncodingAcquisitionSequence  "0018|9092"
+#define GKDCM_NumberOfKSpaceTrajectories           "0018|9093"
+#define GKDCM_CoverageOfKSpace                     "0018|9094"
+#define GKDCM_SpectroscopyAcquisitionPhaseRows     "0018|9095"
+#define GKDCM_RETIRED_ParallelReductionFactorInPlaneRetired "0018|9096"
+#define GKDCM_TransmitterFrequency                 "0018|9098"
+#define GKDCM_ResonantNucleus                      "0018|9100"
+#define GKDCM_FrequencyCorrection                  "0018|9101"
+#define GKDCM_MRSpectroscopyFOVGeometrySequence    "0018|9103"
+#define GKDCM_SlabThickness                        "0018|9104"
+#define GKDCM_SlabOrientation                      "0018|9105"
+#define GKDCM_MidSlabPosition                      "0018|9106"
+#define GKDCM_MRSpatialSaturationSequence          "0018|9107"
+#define GKDCM_MRTimingAndRelatedParametersSequence "0018|9112"
+#define GKDCM_MREchoSequence                       "0018|9114"
+#define GKDCM_MRModifierSequence                   "0018|9115"
+#define GKDCM_MRDiffusionSequence                  "0018|9117"
+#define GKDCM_CardiacSynchronizationSequence       "0018|9118"
+#define GKDCM_MRAveragesSequence                   "0018|9119"
+#define GKDCM_MRFOVGeometrySequence                "0018|9125"
+#define GKDCM_VolumeLocalizationSequence           "0018|9126"
+#define GKDCM_SpectroscopyAcquisitionDataColumns   "0018|9127"
+#define GKDCM_DiffusionAnisotropyType              "0018|9147"
+#define GKDCM_FrameReferenceDateTime               "0018|9151"
+#define GKDCM_MRMetaboliteMapSequence              "0018|9152"
+#define GKDCM_ParallelReductionFactorOutOfPlane    "0018|9155"
+#define GKDCM_SpectroscopyAcquisitionOutOfPlanePhaseSteps "0018|9159"
+#define GKDCM_RETIRED_BulkMotionStatus             "0018|9166"
+#define GKDCM_ParallelReductionFactorSecondInPlane "0018|9168"
+#define GKDCM_CardiacBeatRejectionTechnique        "0018|9169"
+#define GKDCM_RespiratoryMotionCompensationTechnique "0018|9170"
+#define GKDCM_RespiratorySignalSource              "0018|9171"
+#define GKDCM_BulkMotionCompensationTechnique      "0018|9172"
+#define GKDCM_BulkMotionSignalSource               "0018|9173"
+#define GKDCM_ApplicableSafetyStandardAgency       "0018|9174"
+#define GKDCM_ApplicableSafetyStandardDescription  "0018|9175"
+#define GKDCM_OperatingModeSequence                "0018|9176"
+#define GKDCM_OperatingModeType                    "0018|9177"
+#define GKDCM_OperatingMode                        "0018|9178"
+#define GKDCM_SpecificAbsorptionRateDefinition     "0018|9179"
+#define GKDCM_GradientOutputType                   "0018|9180"
+#define GKDCM_SpecificAbsorptionRateValue          "0018|9181"
+#define GKDCM_GradientOutput                       "0018|9182"
+#define GKDCM_FlowCompensationDirection            "0018|9183"
+#define GKDCM_TaggingDelay                         "0018|9184"
+#define GKDCM_RespiratoryMotionCompensationTechniqueDescription "0018|9185"
+#define GKDCM_RespiratorySignalSourceID            "0018|9186"
+#define GKDCM_RETIRED_ChemicalShiftMinimumIntegrationLimitInHz "0018|9195"
+#define GKDCM_RETIRED_ChemicalShiftMaximumIntegrationLimitInHz "0018|9196"
+#define GKDCM_MRVelocityEncodingSequence           "0018|9197"
+#define GKDCM_FirstOrderPhaseCorrection            "0018|9198"
+#define GKDCM_WaterReferencedPhaseCorrection       "0018|9199"
+#define GKDCM_MRSpectroscopyAcquisitionType        "0018|9200"
+#define GKDCM_RespiratoryCyclePosition             "0018|9214"
+#define GKDCM_VelocityEncodingMaximumValue         "0018|9217"
+#define GKDCM_TagSpacingSecondDimension            "0018|9218"
+#define GKDCM_TagAngleSecondAxis                   "0018|9219"
+#define GKDCM_FrameAcquisitionDuration             "0018|9220"
+#define GKDCM_MRImageFrameTypeSequence             "0018|9226"
+#define GKDCM_MRSpectroscopyFrameTypeSequence      "0018|9227"
+#define GKDCM_MRAcquisitionPhaseEncodingStepsInPlane "0018|9231"
+#define GKDCM_MRAcquisitionPhaseEncodingStepsOutOfPlane "0018|9232"
+#define GKDCM_SpectroscopyAcquisitionPhaseColumns  "0018|9234"
+#define GKDCM_CardiacCyclePosition                 "0018|9236"
+#define GKDCM_SpecificAbsorptionRateSequence       "0018|9239"
+#define GKDCM_RFEchoTrainLength                    "0018|9240"
+#define GKDCM_GradientEchoTrainLength              "0018|9241"
+#define GKDCM_ChemicalShiftMinimumIntegrationLimitInppm "0018|9295"
+#define GKDCM_ChemicalShiftMaximumIntegrationLimitInppm "0018|9296"
+#define GKDCM_CTAcquisitionTypeSequence            "0018|9301"
+#define GKDCM_AcquisitionType                      "0018|9302"
+#define GKDCM_TubeAngle                            "0018|9303"
+#define GKDCM_CTAcquisitionDetailsSequence         "0018|9304"
+#define GKDCM_RevolutionTime                       "0018|9305"
+#define GKDCM_SingleCollimationWidth               "0018|9306"
+#define GKDCM_TotalCollimationWidth                "0018|9307"
+#define GKDCM_CTTableDynamicsSequence              "0018|9308"
+#define GKDCM_TableSpeed                           "0018|9309"
+#define GKDCM_TableFeedPerRotation                 "0018|9310"
+#define GKDCM_SpiralPitchFactor                    "0018|9311"
+#define GKDCM_CTGeometrySequence                   "0018|9312"
+#define GKDCM_DataCollectionCenterPatient          "0018|9313"
+#define GKDCM_CTReconstructionSequence             "0018|9314"
+#define GKDCM_ReconstructionAlgorithm              "0018|9315"
+#define GKDCM_ConvolutionKernelGroup               "0018|9316"
+#define GKDCM_ReconstructionFieldOfView            "0018|9317"
+#define GKDCM_ReconstructionTargetCenterPatient    "0018|9318"
+#define GKDCM_ReconstructionAngle                  "0018|9319"
+#define GKDCM_ImageFilter                          "0018|9320"
+#define GKDCM_CTExposureSequence                   "0018|9321"
+#define GKDCM_ReconstructionPixelSpacing           "0018|9322"
+#define GKDCM_ExposureModulationType               "0018|9323"
+#define GKDCM_EstimatedDoseSaving                  "0018|9324"
+#define GKDCM_CTXRayDetailsSequence                "0018|9325"
+#define GKDCM_CTPositionSequence                   "0018|9326"
+#define GKDCM_TablePosition                        "0018|9327"
+#define GKDCM_ExposureTimeInms                     "0018|9328"
+#define GKDCM_CTImageFrameTypeSequence             "0018|9329"
+#define GKDCM_XRayTubeCurrentInmA                  "0018|9330"
+#define GKDCM_ExposureInmAs                        "0018|9332"
+#define GKDCM_ConstantVolumeFlag                   "0018|9333"
+#define GKDCM_FluoroscopyFlag                      "0018|9334"
+#define GKDCM_DistanceSourceToDataCollectionCenter "0018|9335"
+#define GKDCM_ContrastBolusAgentNumber             "0018|9337"
+#define GKDCM_ContrastBolusIngredientCodeSequence  "0018|9338"
+#define GKDCM_ContrastAdministrationProfileSequence "0018|9340"
+#define GKDCM_ContrastBolusUsageSequence           "0018|9341"
+#define GKDCM_ContrastBolusAgentAdministered       "0018|9342"
+#define GKDCM_ContrastBolusAgentDetected           "0018|9343"
+#define GKDCM_ContrastBolusAgentPhase              "0018|9344"
+#define GKDCM_CTDIvol                              "0018|9345"
+#define GKDCM_CTDIPhantomTypeCodeSequence          "0018|9346"
+#define GKDCM_CalciumScoringMassFactorPatient      "0018|9351"
+#define GKDCM_CalciumScoringMassFactorDevice       "0018|9352"
+#define GKDCM_EnergyWeightingFactor                "0018|9353"
+#define GKDCM_CTAdditionalXRaySourceSequence       "0018|9360"
+#define GKDCM_ProjectionPixelCalibrationSequence   "0018|9401"
+#define GKDCM_DistanceSourceToIsocenter            "0018|9402"
+#define GKDCM_DistanceObjectToTableTop             "0018|9403"
+#define GKDCM_ObjectPixelSpacingInCenterOfBeam     "0018|9404"
+#define GKDCM_PositionerPositionSequence           "0018|9405"
+#define GKDCM_TablePositionSequence                "0018|9406"
+#define GKDCM_CollimatorShapeSequence              "0018|9407"
+#define GKDCM_XAXRFFrameCharacteristicsSequence    "0018|9412"
+#define GKDCM_FrameAcquisitionSequence             "0018|9417"
+#define GKDCM_XRayReceptorType                     "0018|9420"
+#define GKDCM_AcquisitionProtocolName              "0018|9423"
+#define GKDCM_AcquisitionProtocolDescription       "0018|9424"
+#define GKDCM_ContrastBolusIngredientOpaque        "0018|9425"
+#define GKDCM_DistanceReceptorPlaneToDetectorHousing "0018|9426"
+#define GKDCM_IntensifierActiveShape               "0018|9427"
+#define GKDCM_IntensifierActiveDimensions          "0018|9428"
+#define GKDCM_PhysicalDetectorSize                 "0018|9429"
+#define GKDCM_PositionOfIsocenterProjection        "0018|9430"
+#define GKDCM_FieldOfViewSequence                  "0018|9432"
+#define GKDCM_FieldOfViewDescription               "0018|9433"
+#define GKDCM_ExposureControlSensingRegionsSequence "0018|9434"
+#define GKDCM_ExposureControlSensingRegionShape    "0018|9435"
+#define GKDCM_ExposureControlSensingRegionLeftVerticalEdge "0018|9436"
+#define GKDCM_ExposureControlSensingRegionRightVerticalEdge "0018|9437"
+#define GKDCM_ExposureControlSensingRegionUpperHorizontalEdge "0018|9438"
+#define GKDCM_ExposureControlSensingRegionLowerHorizontalEdge "0018|9439"
+#define GKDCM_CenterOfCircularExposureControlSensingRegion "0018|9440"
+#define GKDCM_RadiusOfCircularExposureControlSensingRegion "0018|9441"
+#define GKDCM_VerticesOfThePolygonalExposureControlSensingRegion "0018|9442"
+#define GKDCM_ColumnAngulationPatient              "0018|9447"
+#define GKDCM_BeamAngle                            "0018|9449"
+#define GKDCM_FrameDetectorParametersSequence      "0018|9451"
+#define GKDCM_CalculatedAnatomyThickness           "0018|9452"
+#define GKDCM_CalibrationSequence                  "0018|9455"
+#define GKDCM_ObjectThicknessSequence              "0018|9456"
+#define GKDCM_PlaneIdentification                  "0018|9457"
+#define GKDCM_FieldOfViewDimensionsInFloat         "0018|9461"
+#define GKDCM_IsocenterReferenceSystemSequence     "0018|9462"
+#define GKDCM_PositionerIsocenterPrimaryAngle      "0018|9463"
+#define GKDCM_PositionerIsocenterSecondaryAngle    "0018|9464"
+#define GKDCM_PositionerIsocenterDetectorRotationAngle "0018|9465"
+#define GKDCM_TableXPositionToIsocenter            "0018|9466"
+#define GKDCM_TableYPositionToIsocenter            "0018|9467"
+#define GKDCM_TableZPositionToIsocenter            "0018|9468"
+#define GKDCM_TableHorizontalRotationAngle         "0018|9469"
+#define GKDCM_TableHeadTiltAngle                   "0018|9470"
+#define GKDCM_TableCradleTiltAngle                 "0018|9471"
+#define GKDCM_FrameDisplayShutterSequence          "0018|9472"
+#define GKDCM_AcquiredImageAreaDoseProduct         "0018|9473"
+#define GKDCM_CArmPositionerTabletopRelationship   "0018|9474"
+#define GKDCM_XRayGeometrySequence                 "0018|9476"
+#define GKDCM_IrradiationEventIdentificationSequence "0018|9477"
+#define GKDCM_XRay3DFrameTypeSequence              "0018|9504"
+#define GKDCM_ContributingSourcesSequence          "0018|9506"
+#define GKDCM_XRay3DAcquisitionSequence            "0018|9507"
+#define GKDCM_PrimaryPositionerScanArc             "0018|9508"
+#define GKDCM_SecondaryPositionerScanArc           "0018|9509"
+#define GKDCM_PrimaryPositionerScanStartAngle      "0018|9510"
+#define GKDCM_SecondaryPositionerScanStartAngle    "0018|9511"
+#define GKDCM_PrimaryPositionerIncrement           "0018|9514"
+#define GKDCM_SecondaryPositionerIncrement         "0018|9515"
+#define GKDCM_StartAcquisitionDateTime             "0018|9516"
+#define GKDCM_EndAcquisitionDateTime               "0018|9517"
+#define GKDCM_ApplicationName                      "0018|9524"
+#define GKDCM_ApplicationVersion                   "0018|9525"
+#define GKDCM_ApplicationManufacturer              "0018|9526"
+#define GKDCM_AlgorithmType                        "0018|9527"
+#define GKDCM_AlgorithmDescription                 "0018|9528"
+#define GKDCM_XRay3DReconstructionSequence         "0018|9530"
+#define GKDCM_ReconstructionDescription            "0018|9531"
+#define GKDCM_PerProjectionAcquisitionSequence     "0018|9538"
+#define GKDCM_DiffusionBMatrixSequence             "0018|9601"
+#define GKDCM_DiffusionBValueXX                    "0018|9602"
+#define GKDCM_DiffusionBValueXY                    "0018|9603"
+#define GKDCM_DiffusionBValueXZ                    "0018|9604"
+#define GKDCM_DiffusionBValueYY                    "0018|9605"
+#define GKDCM_DiffusionBValueYZ                    "0018|9606"
+#define GKDCM_DiffusionBValueZZ                    "0018|9607"
+#define GKDCM_DecayCorrectionDateTime              "0018|9701"
+#define GKDCM_StartDensityThreshold                "0018|9715"
+#define GKDCM_StartRelativeDensityDifferenceThreshold "0018|9716"
+#define GKDCM_StartCardiacTriggerCountThreshold    "0018|9717"
+#define GKDCM_StartRespiratoryTriggerCountThreshold "0018|9718"
+#define GKDCM_TerminationCountsThreshold           "0018|9719"
+#define GKDCM_TerminationDensityThreshold          "0018|9720"
+#define GKDCM_TerminationRelativeDensityThreshold  "0018|9721"
+#define GKDCM_TerminationTimeThreshold             "0018|9722"
+#define GKDCM_TerminationCardiacTriggerCountThreshold "0018|9723"
+#define GKDCM_TerminationRespiratoryTriggerCountThreshold "0018|9724"
+#define GKDCM_DetectorGeometry                     "0018|9725"
+#define GKDCM_TransverseDetectorSeparation         "0018|9726"
+#define GKDCM_AxialDetectorDimension               "0018|9727"
+#define GKDCM_RadiopharmaceuticalAgentNumber       "0018|9729"
+#define GKDCM_PETFrameAcquisitionSequence          "0018|9732"
+#define GKDCM_PETDetectorMotionDetailsSequence     "0018|9733"
+#define GKDCM_PETTableDynamicsSequence             "0018|9734"
+#define GKDCM_PETPositionSequence                  "0018|9735"
+#define GKDCM_PETFrameCorrectionFactorsSequence    "0018|9736"
+#define GKDCM_RadiopharmaceuticalUsageSequence     "0018|9737"
+#define GKDCM_AttenuationCorrectionSource          "0018|9738"
+#define GKDCM_NumberOfIterations                   "0018|9739"
+#define GKDCM_NumberOfSubsets                      "0018|9740"
+#define GKDCM_PETReconstructionSequence            "0018|9749"
+#define GKDCM_PETFrameTypeSequence                 "0018|9751"
+#define GKDCM_TimeOfFlightInformationUsed          "0018|9755"
+#define GKDCM_ReconstructionType                   "0018|9756"
+#define GKDCM_DecayCorrected                       "0018|9758"
+#define GKDCM_AttenuationCorrected                 "0018|9759"
+#define GKDCM_ScatterCorrected                     "0018|9760"
+#define GKDCM_DeadTimeCorrected                    "0018|9761"
+#define GKDCM_GantryMotionCorrected                "0018|9762"
+#define GKDCM_PatientMotionCorrected               "0018|9763"
+#define GKDCM_CountLossNormalizationCorrected      "0018|9764"
+#define GKDCM_RandomsCorrected                     "0018|9765"
+#define GKDCM_NonUniformRadialSamplingCorrected    "0018|9766"
+#define GKDCM_SensitivityCalibrated                "0018|9767"
+#define GKDCM_DetectorNormalizationCorrection      "0018|9768"
+#define GKDCM_IterativeReconstructionMethod        "0018|9769"
+#define GKDCM_AttenuationCorrectionTemporalRelationship "0018|9770"
+#define GKDCM_PatientPhysiologicalStateSequence    "0018|9771"
+#define GKDCM_PatientPhysiologicalStateCodeSequence "0018|9772"
+#define GKDCM_DepthsOfFocus                        "0018|9801"
+#define GKDCM_ExcludedIntervalsSequence            "0018|9803"
+#define GKDCM_ExclusionStartDatetime               "0018|9804"
+#define GKDCM_ExclusionDuration                    "0018|9805"
+#define GKDCM_USImageDescriptionSequence           "0018|9806"
+#define GKDCM_ImageDataTypeSequence                "0018|9807"
+#define GKDCM_DataType                             "0018|9808"
+#define GKDCM_TransducerScanPatternCodeSequence    "0018|9809"
+#define GKDCM_AliasedDataType                      "0018|980b"
+#define GKDCM_PositionMeasuringDeviceUsed          "0018|980c"
+#define GKDCM_TransducerGeometryCodeSequence       "0018|980d"
+#define GKDCM_TransducerBeamSteeringCodeSequence   "0018|980e"
+#define GKDCM_TransducerApplicationCodeSequence    "0018|980f"
+#define GKDCM_ContributingEquipmentSequence        "0018|a001"
+#define GKDCM_ContributionDateTime                 "0018|a002"
+#define GKDCM_ContributionDescription              "0018|a003"
+#define GKDCM_StudyInstanceUID                     "0020|000d"
+#define GKDCM_SeriesInstanceUID                    "0020|000e"
+#define GKDCM_StudyID                              "0020|0010"
+#define GKDCM_SeriesNumber                         "0020|0011"
+#define GKDCM_AcquisitionNumber                    "0020|0012"
+#define GKDCM_InstanceNumber                       "0020|0013"
+#define GKDCM_RETIRED_IsotopeNumber                "0020|0014"
+#define GKDCM_RETIRED_PhaseNumber                  "0020|0015"
+#define GKDCM_RETIRED_IntervalNumber               "0020|0016"
+#define GKDCM_RETIRED_TimeSlotNumber               "0020|0017"
+#define GKDCM_RETIRED_AngleNumber                  "0020|0018"
+#define GKDCM_ItemNumber                           "0020|0019"
+#define GKDCM_PatientOrientation                   "0020|0020"
+#define GKDCM_RETIRED_OverlayNumber                "0020|0022"
+#define GKDCM_RETIRED_CurveNumber                  "0020|0024"
+#define GKDCM_RETIRED_LUTNumber                    "0020|0026"
+#define GKDCM_ACR_NEMA_ImagePosition               "0020|0030"
+#define GKDCM_ImagePositionPatient                 "0020|0032"
+#define GKDCM_ACR_NEMA_ImageOrientation            "0020|0035"
+#define GKDCM_ImageOrientationPatient              "0020|0037"
+#define GKDCM_ACR_NEMA_Location                    "0020|0050"
+#define GKDCM_FrameOfReferenceUID                  "0020|0052"
+#define GKDCM_Laterality                           "0020|0060"
+#define GKDCM_ImageLaterality                      "0020|0062"
+#define GKDCM_ACR_NEMA_ImageGeometryType           "0020|0070"
+#define GKDCM_ACR_NEMA_MaskingImage                "0020|0080"
+#define GKDCM_TemporalPositionIdentifier           "0020|0100"
+#define GKDCM_NumberOfTemporalPositions            "0020|0105"
+#define GKDCM_TemporalResolution                   "0020|0110"
+#define GKDCM_SynchronizationFrameOfReferenceUID   "0020|0200"
+#define GKDCM_SOPInstanceUIDOfConcatenationSource  "0020|0242"
+#define GKDCM_RETIRED_SeriesInStudy                "0020|1000"
+#define GKDCM_ACR_NEMA_AcquisitionsInSeries        "0020|1001"
+#define GKDCM_ImagesInAcquisition                  "0020|1002"
+#define GKDCM_ACR_NEMA_ImagesInSeries              "0020|1003"
+#define GKDCM_RETIRED_AcquisitionsInStudy          "0020|1004"
+#define GKDCM_ACR_NEMA_ImagesInStudy               "0020|1005"
+#define GKDCM_ACR_NEMA_Reference                   "0020|1020"
+#define GKDCM_PositionReferenceIndicator           "0020|1040"
+#define GKDCM_SliceLocation                        "0020|1041"
+#define GKDCM_RETIRED_OtherStudyNumbers            "0020|1070"
+#define GKDCM_NumberOfPatientRelatedStudies        "0020|1200"
+#define GKDCM_NumberOfPatientRelatedSeries         "0020|1202"
+#define GKDCM_NumberOfPatientRelatedInstances      "0020|1204"
+#define GKDCM_NumberOfStudyRelatedSeries           "0020|1206"
+#define GKDCM_NumberOfStudyRelatedInstances        "0020|1208"
+#define GKDCM_NumberOfSeriesRelatedInstances       "0020|1209"
+#define GKDCM_ACR_NEMA_ModifyingDeviceID           "0020|3401"
+#define GKDCM_ACR_NEMA_ModifiedImageID             "0020|3402"
+#define GKDCM_ACR_NEMA_ModifiedImageDate           "0020|3403"
+#define GKDCM_ACR_NEMA_ModifyingDeviceManufacturer "0020|3404"
+#define GKDCM_ACR_NEMA_ModifiedImageTime           "0020|3405"
+#define GKDCM_ACR_NEMA_ModifiedImageDescription    "0020|3406"
+#define GKDCM_ImageComments                        "0020|4000"
+#define GKDCM_ACR_NEMA_OriginalImageIdentification "0020|5000"
+#define GKDCM_ACR_NEMA_OriginalImageIdentificationNomenclature "0020|5002"
+#define GKDCM_StackID                              "0020|9056"
+#define GKDCM_InStackPositionNumber                "0020|9057"
+#define GKDCM_FrameAnatomySequence                 "0020|9071"
+#define GKDCM_FrameLaterality                      "0020|9072"
+#define GKDCM_FrameContentSequence                 "0020|9111"
+#define GKDCM_PlanePositionSequence                "0020|9113"
+#define GKDCM_PlaneOrientationSequence             "0020|9116"
+#define GKDCM_TemporalPositionIndex                "0020|9128"
+#define GKDCM_NominalCardiacTriggerDelayTime       "0020|9153"
+#define GKDCM_FrameAcquisitionNumber               "0020|9156"
+#define GKDCM_DimensionIndexValues                 "0020|9157"
+#define GKDCM_FrameComments                        "0020|9158"
+#define GKDCM_ConcatenationUID                     "0020|9161"
+#define GKDCM_InConcatenationNumber                "0020|9162"
+#define GKDCM_InConcatenationTotalNumber           "0020|9163"
+#define GKDCM_DimensionOrganizationUID             "0020|9164"
+#define GKDCM_DimensionIndexPointer                "0020|9165"
+#define GKDCM_FunctionalGroupPointer               "0020|9167"
+#define GKDCM_DimensionIndexPrivateCreator         "0020|9213"
+#define GKDCM_DimensionOrganizationSequence        "0020|9221"
+#define GKDCM_DimensionIndexSequence               "0020|9222"
+#define GKDCM_ConcatenationFrameOffsetNumber       "0020|9228"
+#define GKDCM_FunctionalGroupPrivateCreator        "0020|9238"
+#define GKDCM_NominalPercentageOfCardiacPhase      "0020|9241"
+#define GKDCM_NominalPercentageOfRespiratoryPhase  "0020|9245"
+#define GKDCM_StartingRespiratoryAmplitude         "0020|9246"
+#define GKDCM_StartingRespiratoryPhase             "0020|9247"
+#define GKDCM_EndingRespiratoryAmplitude           "0020|9248"
+#define GKDCM_EndingRespiratoryPhase               "0020|9249"
+#define GKDCM_RespiratoryTriggerType               "0020|9250"
+#define GKDCM_RRIntervalTimeNominal                "0020|9251"
+#define GKDCM_ActualCardiacTriggerDelayTime        "0020|9252"
+#define GKDCM_RespiratorySynchronizationSequence   "0020|9253"
+#define GKDCM_RespiratoryIntervalTime              "0020|9254"
+#define GKDCM_NominalRespiratoryTriggerDelayTime   "0020|9255"
+#define GKDCM_RespiratoryTriggerDelayThreshold     "0020|9256"
+#define GKDCM_ActualRespiratoryTriggerDelayTime    "0020|9257"
+#define GKDCM_ImagePositionVolume                  "0020|9301"
+#define GKDCM_ImageOrientationVolume               "0020|9302"
+#define GKDCM_UltrasoundAcquisitionGeometry        "0020|9307"
+#define GKDCM_ApexPosition                         "0020|9308"
+#define GKDCM_VolumeToTransducerMappingMatrix      "0020|9309"
+#define GKDCM_VolumeToTableMappingMatrix           "0020|930a"
+#define GKDCM_PatientFrameOfReferenceSource        "0020|930c"
+#define GKDCM_TemporalPositionTimeOffset           "0020|930d"
+#define GKDCM_PlanePositionVolumeSequence          "0020|930e"
+#define GKDCM_PlaneOrientationVolumeSequence       "0020|930f"
+#define GKDCM_TemporalPositionSequence             "0020|9310"
+#define GKDCM_DimensionOrganizationType            "0020|9311"
+#define GKDCM_VolumeFrameOfReferenceUID            "0020|9312"
+#define GKDCM_TableFrameOfReferenceUID             "0020|9313"
+#define GKDCM_DimensionDescriptionLabel            "0020|9421"
+#define GKDCM_PatientOrientationInFrameSequence    "0020|9450"
+#define GKDCM_FrameLabel                           "0020|9453"
+#define GKDCM_AcquisitionIndex                     "0020|9518"
+#define GKDCM_ContributingSOPInstancesReferenceSequence "0020|9529"
+#define GKDCM_ReconstructionIndex                  "0020|9536"
+#define GKDCM_LightPathFilterPassThroughWavelength "0022|0001"
+#define GKDCM_LightPathFilterPassBand              "0022|0002"
+#define GKDCM_ImagePathFilterPassThroughWavelength "0022|0003"
+#define GKDCM_ImagePathFilterPassBand              "0022|0004"
+#define GKDCM_PatientEyeMovementCommanded          "0022|0005"
+#define GKDCM_PatientEyeMovementCommandCodeSequence "0022|0006"
+#define GKDCM_SphericalLensPower                   "0022|0007"
+#define GKDCM_CylinderLensPower                    "0022|0008"
+#define GKDCM_CylinderAxis                         "0022|0009"
+#define GKDCM_EmmetropicMagnification              "0022|000a"
+#define GKDCM_IntraOcularPressure                  "0022|000b"
+#define GKDCM_HorizontalFieldOfView                "0022|000c"
+#define GKDCM_PupilDilated                         "0022|000d"
+#define GKDCM_DegreeOfDilation                     "0022|000e"
+#define GKDCM_StereoBaselineAngle                  "0022|0010"
+#define GKDCM_StereoBaselineDisplacement           "0022|0011"
+#define GKDCM_StereoHorizontalPixelOffset          "0022|0012"
+#define GKDCM_StereoVerticalPixelOffset            "0022|0013"
+#define GKDCM_StereoRotation                       "0022|0014"
+#define GKDCM_AcquisitionDeviceTypeCodeSequence    "0022|0015"
+#define GKDCM_IlluminationTypeCodeSequence         "0022|0016"
+#define GKDCM_LightPathFilterTypeStackCodeSequence "0022|0017"
+#define GKDCM_ImagePathFilterTypeStackCodeSequence "0022|0018"
+#define GKDCM_LensesCodeSequence                   "0022|0019"
+#define GKDCM_ChannelDescriptionCodeSequence       "0022|001a"
+#define GKDCM_RefractiveStateSequence              "0022|001b"
+#define GKDCM_MydriaticAgentCodeSequence           "0022|001c"
+#define GKDCM_RelativeImagePositionCodeSequence    "0022|001d"
+#define GKDCM_StereoPairsSequence                  "0022|0020"
+#define GKDCM_LeftImageSequence                    "0022|0021"
+#define GKDCM_RightImageSequence                   "0022|0022"
+#define GKDCM_AxialLengthOfTheEye                  "0022|0030"
+#define GKDCM_OphthalmicFrameLocationSequence      "0022|0031"
+#define GKDCM_ReferenceCoordinates                 "0022|0032"
+#define GKDCM_DepthSpatialResolution               "0022|0035"
+#define GKDCM_MaximumDepthDistortion               "0022|0036"
+#define GKDCM_AlongScanSpatialResolution           "0022|0037"
+#define GKDCM_MaximumAlongScanDistortion           "0022|0038"
+#define GKDCM_OphthalmicImageOrientation           "0022|0039"
+#define GKDCM_DepthOfTransverseImage               "0022|0041"
+#define GKDCM_MydriaticAgentConcentrationUnitsSequence "0022|0042"
+#define GKDCM_AcrossScanSpatialResolution          "0022|0048"
+#define GKDCM_MaximumAcrossScanDistortion          "0022|0049"
+#define GKDCM_MydriaticAgentConcentration          "0022|004e"
+#define GKDCM_IlluminationWaveLength               "0022|0055"
+#define GKDCM_IlluminationPower                    "0022|0056"
+#define GKDCM_IlluminationBandwidth                "0022|0057"
+#define GKDCM_MydriaticAgentSequence               "0022|0058"
+#define GKDCM_OphthalmicAxialMeasurementsRightEyeSequence "0022|1007"
+#define GKDCM_OphthalmicAxialMeasurementsLeftEyeSequence "0022|1008"
+#define GKDCM_OphthalmicAxialMeasurementsDeviceType "0022|1009"
+#define GKDCM_OphthalmicAxialLengthMeasurementsType "0022|1010"
+#define GKDCM_OphthalmicAxialLengthSequence        "0022|1012"
+#define GKDCM_OphthalmicAxialLength                "0022|1019"
+#define GKDCM_LensStatusCodeSequence               "0022|1024"
+#define GKDCM_VitreousStatusCodeSequence           "0022|1025"
+#define GKDCM_IOLFormulaCodeSequence               "0022|1028"
+#define GKDCM_IOLFormulaDetail                     "0022|1029"
+#define GKDCM_KeratometerIndex                     "0022|1033"
+#define GKDCM_SourceofOphthalmicAxialLengthCodeSequence "0022|1035"
+#define GKDCM_TargetRefraction                     "0022|1037"
+#define GKDCM_RefractiveProcedureOccurred          "0022|1039"
+#define GKDCM_RefractiveSurgeryTypeCodeSequence    "0022|1040"
+#define GKDCM_OphthalmicUltrasoundMethodCodeSequence "0022|1044"
+#define GKDCM_OphthalmicAxialLengthMeasurementsSequence "0022|1050"
+#define GKDCM_IOLPower                             "0022|1053"
+#define GKDCM_PredictedRefractiveError             "0022|1054"
+#define GKDCM_OphthalmicAxialLengthVelocity        "0022|1059"
+#define GKDCM_LensStatusDescription                "0022|1065"
+#define GKDCM_VitreousStatusDescription            "0022|1066"
+#define GKDCM_IOLPowerSequence                     "0022|1090"
+#define GKDCM_LensConstantSequence                 "0022|1092"
+#define GKDCM_IOLManufacturer                      "0022|1093"
+#define GKDCM_ImplantName                          "0022|1095"
+#define GKDCM_KeratometryMeasurementTypeCodeSequence "0022|1096"
+#define GKDCM_ImplantPartNumber                    "0022|1097"
+#define GKDCM_ReferencedOphthalmicAxialMeasurementsSequence "0022|1100"
+#define GKDCM_OphthalmicAxialLengthMeasurementsSegmentNameCodeSequence "0022|1101"
+#define GKDCM_RefractiveErrorBeforeRefractiveSurgeryCodeSequence "0022|1103"
+#define GKDCM_IOLPowerForExactEmmetropia           "0022|1121"
+#define GKDCM_IOLPowerForExactTargetRefraction     "0022|1122"
+#define GKDCM_AnteriorChamberDepthDefinitionCodeSequence "0022|1125"
+#define GKDCM_LensThicknessSequence                "0022|1127"
+#define GKDCM_AnteriorChamberDepthSequence         "0022|1128"
+#define GKDCM_LensThickness                        "0022|1130"
+#define GKDCM_AnteriorChamberDepth                 "0022|1131"
+#define GKDCM_SourceofLensThicknessDataCodeSequence "0022|1132"
+#define GKDCM_SourceofAnteriorChamberDepthDataCodeSequence "0022|1133"
+#define GKDCM_SourceofRefractiveMeasurementsSequence "0022|1134"
+#define GKDCM_SourceofRefractiveMeasurementsCodeSequence "0022|1135"
+#define GKDCM_OphthalmicAxialLengthMeasurementModified "0022|1140"
+#define GKDCM_OphthalmicAxialLengthDataSourceCodeSequence "0022|1150"
+#define GKDCM_SignaltoNoiseRatio                   "0022|1155"
+#define GKDCM_OphthalmicAxialLengthDataSourceDescription "0022|1159"
+#define GKDCM_OphthalmicAxialLengthMeasurementsTotalLengthSequence "0022|1210"
+#define GKDCM_OphthalmicAxialLengthMeasurementsSegmentalLengthSequence "0022|1211"
+#define GKDCM_OphthalmicAxialLengthMeasurementsLengthSummationSequence "0022|1212"
+#define GKDCM_UltrasoundOphthalmicAxialLengthMeasurementsSequence "0022|1220"
+#define GKDCM_OpticalOphthalmicAxialLengthMeasurementsSequence "0022|1225"
+#define GKDCM_UltrasoundSelectedOphthalmicAxialLengthSequence "0022|1230"
+#define GKDCM_OphthalmicAxialLengthSelectionMethodCodeSequence "0022|1250"
+#define GKDCM_OpticalSelectedOphthalmicAxialLengthSequence "0022|1255"
+#define GKDCM_SelectedSegmentalOphthalmicAxialLengthSequence "0022|1257"
+#define GKDCM_SelectedTotalOphthalmicAxialLengthSequence "0022|1260"
+#define GKDCM_OphthalmicAxialLengthQualityMetricSequence "0022|1262"
+#define GKDCM_OphthalmicAxialLengthQualityMetricTypeCodeSequence "0022|1265"
+#define GKDCM_IntraocularLensCalculationsRightEyeSequence "0022|1300"
+#define GKDCM_IntraocularLensCalculationsLeftEyeSequence "0022|1310"
+#define GKDCM_ReferencedOphthalmicAxialLengthMeasurementQCImageSequence "0022|1330"
+#define GKDCM_VisualFieldHorizontalExtent          "0024|0010"
+#define GKDCM_VisualFieldVerticalExtent            "0024|0011"
+#define GKDCM_VisualFieldShape                     "0024|0012"
+#define GKDCM_ScreeningTestModeCodeSequence        "0024|0016"
+#define GKDCM_MaximumStimulusLuminance             "0024|0018"
+#define GKDCM_BackgroundLuminance                  "0024|0020"
+#define GKDCM_StimulusColorCodeSequence            "0024|0021"
+#define GKDCM_BackgroundIlluminationColorCodeSequence "0024|0024"
+#define GKDCM_StimulusArea                         "0024|0025"
+#define GKDCM_StimulusPresentationTime             "0024|0028"
+#define GKDCM_FixationSequence                     "0024|0032"
+#define GKDCM_FixationMonitoringCodeSequence       "0024|0033"
+#define GKDCM_VisualFieldCatchTrialSequence        "0024|0034"
+#define GKDCM_FixationCheckedQuantity              "0024|0035"
+#define GKDCM_PatientNotProperlyFixatedQuantity    "0024|0036"
+#define GKDCM_PresentedVisualStimuliDataFlag       "0024|0037"
+#define GKDCM_NumberOfVisualStimuli                "0024|0038"
+#define GKDCM_ExcessiveFixationLossesDataFlag      "0024|0039"
+#define GKDCM_ExcessiveFixationLosses              "0024|0040"
+#define GKDCM_StimuliRetestingQuantity             "0024|0042"
+#define GKDCM_CommentsOnPatientPerformanceOfVisualField "0024|0044"
+#define GKDCM_FalseNegativesEstimateFlag           "0024|0045"
+#define GKDCM_FalseNegativesEstimate               "0024|0046"
+#define GKDCM_NegativeCatchTrialsQuantity          "0024|0048"
+#define GKDCM_FalseNegativesQuantity               "0024|0050"
+#define GKDCM_ExcessiveFalseNegativesDataFlag      "0024|0051"
+#define GKDCM_ExcessiveFalseNegatives              "0024|0052"
+#define GKDCM_FalsePositivesEstimateFlag           "0024|0053"
+#define GKDCM_FalsePositivesEstimate               "0024|0054"
+#define GKDCM_CatchTrialsDataFlag                  "0024|0055"
+#define GKDCM_PositiveCatchTrialsQuantity          "0024|0056"
+#define GKDCM_TestPointNormalsDataFlag             "0024|0057"
+#define GKDCM_TestPointNormalsSequence             "0024|0058"
+#define GKDCM_GlobalDeviationProbabilityNormalsFlag "0024|0059"
+#define GKDCM_FalsePositivesQuantity               "0024|0060"
+#define GKDCM_ExcessiveFalsePositivesDataFlag      "0024|0061"
+#define GKDCM_ExcessiveFalsePositives              "0024|0062"
+#define GKDCM_VisualFieldTestNormalsFlag           "0024|0063"
+#define GKDCM_ResultsNormalsSequence               "0024|0064"
+#define GKDCM_AgeCorrectedSensitivityDeviationAlgorithmSequence "0024|0065"
+#define GKDCM_GlobalDeviationFromNormal            "0024|0066"
+#define GKDCM_GeneralizedDefectSensitivityDeviationAlgorithmSequence "0024|0067"
+#define GKDCM_LocalizedDeviationfromNormal         "0024|0068"
+#define GKDCM_PatientReliabilityIndicator          "0024|0069"
+#define GKDCM_VisualFieldMeanSensitivity           "0024|0070"
+#define GKDCM_GlobalDeviationProbability           "0024|0071"
+#define GKDCM_LocalDeviationProbabilityNormalsFlag "0024|0072"
+#define GKDCM_LocalizedDeviationProbability        "0024|0073"
+#define GKDCM_ShortTermFluctuationCalculated       "0024|0074"
+#define GKDCM_ShortTermFluctuation                 "0024|0075"
+#define GKDCM_ShortTermFluctuationProbabilityCalculated "0024|0076"
+#define GKDCM_ShortTermFluctuationProbability      "0024|0077"
+#define GKDCM_CorrectedLocalizedDeviationFromNormalCalculated "0024|0078"
+#define GKDCM_CorrectedLocalizedDeviationFromNormal "0024|0079"
+#define GKDCM_CorrectedLocalizedDeviationFromNormalProbabilityCalculated "0024|0080"
+#define GKDCM_CorrectedLocalizedDeviationFromNormalProbability "0024|0081"
+#define GKDCM_GlobalDeviationProbabilitySequence   "0024|0083"
+#define GKDCM_LocalizedDeviationProbabilitySequence "0024|0085"
+#define GKDCM_FovealSensitivityMeasured            "0024|0086"
+#define GKDCM_FovealSensitivity                    "0024|0087"
+#define GKDCM_VisualFieldTestDuration              "0024|0088"
+#define GKDCM_VisualFieldTestPointSequence         "0024|0089"
+#define GKDCM_VisualFieldTestPointXCoordinate      "0024|0090"
+#define GKDCM_VisualFieldTestPointYCoordinate      "0024|0091"
+#define GKDCM_AgeCorrectedSensitivityDeviationValue "0024|0092"
+#define GKDCM_StimulusResults                      "0024|0093"
+#define GKDCM_SensitivityValue                     "0024|0094"
+#define GKDCM_RetestStimulusSeen                   "0024|0095"
+#define GKDCM_RetestSensitivityValue               "0024|0096"
+#define GKDCM_VisualFieldTestPointNormalsSequence  "0024|0097"
+#define GKDCM_QuantifiedDefect                     "0024|0098"
+#define GKDCM_GeneralizedDefectCorrectedSensitivityDeviationFlag "0024|0102"
+#define GKDCM_GeneralizedDefectCorrectedSensitivityDeviationValue "0024|0103"
+#define GKDCM_GeneralizedDefectCorrectedSensitivityDeviationProbabilityValue "0024|0104"
+#define GKDCM_MinimumSensitivityValue              "0024|0105"
+#define GKDCM_BlindSpotLocalized                   "0024|0106"
+#define GKDCM_BlindSpotXCoordinate                 "0024|0107"
+#define GKDCM_BlindSpotYCoordinate                 "0024|0108"
+#define GKDCM_VisualAcuityMeasurementSequence      "0024|0110"
+#define GKDCM_RefractiveParametersUsedOnPatientSequence "0024|0112"
+#define GKDCM_MeasurementLaterality                "0024|0113"
+#define GKDCM_OphthalmicPatientClinicalInformationLeftEyeSequence "0024|0114"
+#define GKDCM_OphthalmicPatientClinicalInformationRightEyeSequence "0024|0115"
+#define GKDCM_FovealPointNormativeDataFlag         "0024|0117"
+#define GKDCM_FovealPointProbabilityValue          "0024|0118"
+#define GKDCM_ScreeningBaselineMeasured            "0024|0120"
+#define GKDCM_ScreeningBaselineMeasuredSequence    "0024|0122"
+#define GKDCM_ScreeningBaselineType                "0024|0124"
+#define GKDCM_ScreeningBaselineValue               "0024|0126"
+#define GKDCM_AlgorithmSource                      "0024|0202"
+#define GKDCM_DataSetName                          "0024|0306"
+#define GKDCM_DataSetVersion                       "0024|0307"
+#define GKDCM_DataSetSource                        "0024|0308"
+#define GKDCM_DataSetDescription                   "0024|0309"
+#define GKDCM_VisualFieldTestReliabilityGlobalIndexSequence "0024|0317"
+#define GKDCM_VisualFieldGlobalResultsIndexSequence "0024|0320"
+#define GKDCM_DataObservationSequence              "0024|0325"
+#define GKDCM_IndexNormalsFlag                     "0024|0338"
+#define GKDCM_IndexProbability                     "0024|0341"
+#define GKDCM_IndexProbabilitySequence             "0024|0344"
+#define GKDCM_SamplesPerPixel                      "0028|0002"
+#define GKDCM_SamplesPerPixelUsed                  "0028|0003"
+#define GKDCM_PhotometricInterpretation            "0028|0004"
+#define GKDCM_ACR_NEMA_ImageDimensions             "0028|0005"
+#define GKDCM_PlanarConfiguration                  "0028|0006"
+#define GKDCM_NumberOfFrames                       "0028|0008"
+#define GKDCM_FrameIncrementPointer                "0028|0009"
+#define GKDCM_FrameDimensionPointer                "0028|000a"
+#define GKDCM_Rows                                 "0028|0010"
+#define GKDCM_Columns                              "0028|0011"
+#define GKDCM_RETIRED_Planes                       "0028|0012"
+#define GKDCM_UltrasoundColorDataPresent           "0028|0014"
+#define GKDCM_PixelSpacing                         "0028|0030"
+#define GKDCM_ImagerPixelSpacing                   "0018|1164"
+#define GKDCM_ZoomFactor                           "0028|0031"
+#define GKDCM_ZoomCenter                           "0028|0032"
+#define GKDCM_PixelAspectRatio                     "0028|0034"
+#define GKDCM_ACR_NEMA_ImageFormat                 "0028|0040"
+#define GKDCM_ACR_NEMA_ManipulatedImage            "0028|0050"
+#define GKDCM_CorrectedImage                       "0028|0051"
+#define GKDCM_ACR_NEMA_2C_CompressionRecognitionCode "0028|005f"
+#define GKDCM_ACR_NEMA_CompressionCode             "0028|0060"
+#define GKDCM_ACR_NEMA_2C_CompressionOriginator    "0028|0061"
+#define GKDCM_ACR_NEMA_2C_CompressionLabel         "0028|0062"
+#define GKDCM_ACR_NEMA_2C_CompressionDescription   "0028|0063"
+#define GKDCM_ACR_NEMA_2C_CompressionSequence      "0028|0065"
+#define GKDCM_ACR_NEMA_2C_CompressionStepPointers  "0028|0066"
+#define GKDCM_ACR_NEMA_2C_RepeatInterval           "0028|0068"
+#define GKDCM_ACR_NEMA_2C_BitsGrouped              "0028|0069"
+#define GKDCM_ACR_NEMA_2C_PerimeterTable           "0028|0070"
+#define GKDCM_ACR_NEMA_2C_PerimeterValue           "0028|0071"
+#define GKDCM_ACR_NEMA_2C_PredictorRows            "0028|0080"
+#define GKDCM_ACR_NEMA_2C_PredictorColumns         "0028|0081"
+#define GKDCM_ACR_NEMA_2C_PredictorConstants       "0028|0082"
+#define GKDCM_ACR_NEMA_2C_BlockedPixels            "0028|0090"
+#define GKDCM_ACR_NEMA_2C_BlockRows                "0028|0091"
+#define GKDCM_ACR_NEMA_2C_BlockColumns             "0028|0092"
+#define GKDCM_ACR_NEMA_2C_RowOverlap               "0028|0093"
+#define GKDCM_ACR_NEMA_2C_ColumnOverlap            "0028|0094"
+#define GKDCM_BitsAllocated                        "0028|0100"
+#define GKDCM_BitsStored                           "0028|0101"
+#define GKDCM_HighBit                              "0028|0102"
+#define GKDCM_PixelRepresentation                  "0028|0103"
+#define GKDCM_ACR_NEMA_SmallestValidPixelValue     "0028|0104"
+#define GKDCM_ACR_NEMA_LargestValidPixelValue      "0028|0105"
+#define GKDCM_SmallestImagePixelValue              "0028|0106"
+#define GKDCM_LargestImagePixelValue               "0028|0107"
+#define GKDCM_SmallestPixelValueInSeries           "0028|0108"
+#define GKDCM_LargestPixelValueInSeries            "0028|0109"
+#define GKDCM_RETIRED_SmallestImagePixelValueInPlane "0028|0110"
+#define GKDCM_RETIRED_LargestImagePixelValueInPlane "0028|0111"
+#define GKDCM_PixelPaddingValue                    "0028|0120"
+#define GKDCM_PixelPaddingRangeLimit               "0028|0121"
+#define GKDCM_ACR_NEMA_ImageLocation               "0028|0200"
+#define GKDCM_QualityControlImage                  "0028|0300"
+#define GKDCM_BurnedInAnnotation                   "0028|0301"
+#define GKDCM_ACR_NEMA_2C_TransformLabel           "0028|0400"
+#define GKDCM_ACR_NEMA_2C_TransformVersionNumber   "0028|0401"
+#define GKDCM_ACR_NEMA_2C_NumberOfTransformSteps   "0028|0402"
+#define GKDCM_ACR_NEMA_2C_SequenceOfCompressedData "0028|0403"
+#define GKDCM_ACR_NEMA_2C_DetailsOfCoefficients    "0028|0404"
+#define GKDCM_ACR_NEMA_2C_RowsForNthOrderCoefficients "0028|0410"
+#define GKDCM_ACR_NEMA_2C_ColumnsForNthOrderCoefficients "0028|0411"
+#define GKDCM_ACR_NEMA_2C_CoefficientCoding        "0028|0412"
+#define GKDCM_ACR_NEMA_2C_CoefficientCodingPointers "0028|0413"
+#define GKDCM_ACR_NEMA_2C_DCTLabel                 "0028|0700"
+#define GKDCM_ACR_NEMA_2C_DataBlockDescription     "0028|0701"
+#define GKDCM_ACR_NEMA_2C_DataBlock                "0028|0702"
+#define GKDCM_ACR_NEMA_2C_NormalizationFactorFormat "0028|0710"
+#define GKDCM_ACR_NEMA_2C_ZonalMapNumberFormat     "0028|0720"
+#define GKDCM_ACR_NEMA_2C_ZonalMapLocation         "0028|0721"
+#define GKDCM_ACR_NEMA_2C_ZonalMapFormat           "0028|0722"
+#define GKDCM_ACR_NEMA_2C_AdaptiveMapFormat        "0028|0730"
+#define GKDCM_ACR_NEMA_2C_CodeNumberFormat         "0028|0740"
+#define GKDCM_ACR_NEMA_2C_CodeLabel                "0028|0800"
+#define GKDCM_ACR_NEMA_2C_NumberOfTables           "0028|0802"
+#define GKDCM_ACR_NEMA_2C_CodeTableLocation        "0028|0803"
+#define GKDCM_ACR_NEMA_2C_BitsForCodeWord          "0028|0804"
+#define GKDCM_ACR_NEMA_2C_ImageDataLocation        "0028|0808"
+#define GKDCM_PixelSpacingCalibrationType          "0028|0a02"
+#define GKDCM_PixelSpacingCalibrationDescription   "0028|0a04"
+#define GKDCM_PixelIntensityRelationship           "0028|1040"
+#define GKDCM_PixelIntensityRelationshipSign       "0028|1041"
+#define GKDCM_WindowCenter                         "0028|1050"
+#define GKDCM_WindowWidth                          "0028|1051"
+#define GKDCM_RescaleIntercept                     "0028|1052"
+#define GKDCM_RescaleSlope                         "0028|1053"
+#define GKDCM_RescaleType                          "0028|1054"
+#define GKDCM_WindowCenterWidthExplanation         "0028|1055"
+#define GKDCM_VOILUTFunction                       "0028|1056"
+#define GKDCM_ACR_NEMA_GrayScale                   "0028|1080"
+#define GKDCM_RecommendedViewingMode               "0028|1090"
+#define GKDCM_ACR_NEMA_GrayLookupTableDescriptor   "0028|1100"
+#define GKDCM_RedPaletteColorLookupTableDescriptor "0028|1101"
+#define GKDCM_GreenPaletteColorLookupTableDescriptor "0028|1102"
+#define GKDCM_BluePaletteColorLookupTableDescriptor "0028|1103"
+#define GKDCM_AlphaPaletteColorLookupTableDescriptor "0028|1104"
+#define GKDCM_RETIRED_LargeRedPaletteColorLookupTableDescriptor "0028|1111"
+#define GKDCM_RETIRED_LargeGreenPaletteColorLookupTableDescriptor "0028|1112"
+#define GKDCM_RETIRED_LargeBluePaletteColorLookupTableDescriptor "0028|1113"
+#define GKDCM_PaletteColorLookupTableUID           "0028|1199"
+#define GKDCM_ACR_NEMA_GrayLookupTableData         "0028|1200"
+#define GKDCM_RedPaletteColorLookupTableData       "0028|1201"
+#define GKDCM_GreenPaletteColorLookupTableData     "0028|1202"
+#define GKDCM_BluePaletteColorLookupTableData      "0028|1203"
+#define GKDCM_AlphaPaletteColorLookupTableData     "0028|1204"
+#define GKDCM_RETIRED_LargeRedPaletteColorLookupTableData "0028|1211"
+#define GKDCM_RETIRED_LargeGreenPaletteColorLookupTableData "0028|1212"
+#define GKDCM_RETIRED_LargeBluePaletteColorLookupTableData "0028|1213"
+#define GKDCM_RETIRED_LargePaletteColorLookupTableUID "0028|1214"
+#define GKDCM_SegmentedRedPaletteColorLookupTableData "0028|1221"
+#define GKDCM_SegmentedGreenPaletteColorLookupTableData "0028|1222"
+#define GKDCM_SegmentedBluePaletteColorLookupTableData "0028|1223"
+#define GKDCM_BreastImplantPresent                 "0028|1300"
+#define GKDCM_PartialView                          "0028|1350"
+#define GKDCM_PartialViewDescription               "0028|1351"
+#define GKDCM_PartialViewCodeSequence              "0028|1352"
+#define GKDCM_SpatialLocationsPreserved            "0028|135a"
+#define GKDCM_DataFrameAssignmentSequence          "0028|1401"
+#define GKDCM_DataPathAssignment                   "0028|1402"
+#define GKDCM_BitsMappedToColorLookupTable         "0028|1403"
+#define GKDCM_BlendingLUT1Sequence                 "0028|1404"
+#define GKDCM_BlendingLUT1TransferFunction         "0028|1405"
+#define GKDCM_BlendingWeightConstant               "0028|1406"
+#define GKDCM_BlendingLookupTableDescriptor        "0028|1407"
+#define GKDCM_BlendingLookupTableData              "0028|1408"
+#define GKDCM_EnhancedPaletteColorLookupTableSequence "0028|140b"
+#define GKDCM_BlendingLUT2Sequence                 "0028|140c"
+#define GKDCM_BlendingLUT2TransferFunction         "0028|140d"
+#define GKDCM_DataPathID                           "0028|140e"
+#define GKDCM_RGBLUTTransferFunction               "0028|140f"
+#define GKDCM_AlphaLUTTransferFunction             "0028|1410"
+#define GKDCM_ICCProfile                           "0028|2000"
+#define GKDCM_LossyImageCompression                "0028|2110"
+#define GKDCM_LossyImageCompressionRatio           "0028|2112"
+#define GKDCM_LossyImageCompressionMethod          "0028|2114"
+#define GKDCM_ModalityLUTSequence                  "0028|3000"
+#define GKDCM_LUTDescriptor                        "0028|3002"
+#define GKDCM_LUTExplanation                       "0028|3003"
+#define GKDCM_ModalityLUTType                      "0028|3004"
+#define GKDCM_LUTData                              "0028|3006"
+#define GKDCM_VOILUTSequence                       "0028|3010"
+#define GKDCM_SoftcopyVOILUTSequence               "0028|3110"
+#define GKDCM_ACR_NEMA_ImagePresentationComments   "0028|4000"
+#define GKDCM_RETIRED_BiPlaneAcquisitionSequence   "0028|5000"
+#define GKDCM_RepresentativeFrameNumber            "0028|6010"
+#define GKDCM_FrameNumbersOfInterest               "0028|6020"
+#define GKDCM_FrameOfInterestDescription           "0028|6022"
+#define GKDCM_FrameOfInterestType                  "0028|6023"
+#define GKDCM_RETIRED_MaskPointers                 "0028|6030"
+#define GKDCM_RWavePointer                         "0028|6040"
+#define GKDCM_MaskSubtractionSequence              "0028|6100"
+#define GKDCM_MaskOperation                        "0028|6101"
+#define GKDCM_ApplicableFrameRange                 "0028|6102"
+#define GKDCM_MaskFrameNumbers                     "0028|6110"
+#define GKDCM_ContrastFrameAveraging               "0028|6112"
+#define GKDCM_MaskSubPixelShift                    "0028|6114"
+#define GKDCM_TIDOffset                            "0028|6120"
+#define GKDCM_MaskOperationExplanation             "0028|6190"
+#define GKDCM_PixelDataProviderURL                 "0028|7fe0"
+#define GKDCM_DataPointRows                        "0028|9001"
+#define GKDCM_DataPointColumns                     "0028|9002"
+#define GKDCM_SignalDomainColumns                  "0028|9003"
+#define GKDCM_RETIRED_LargestMonochromePixelValue  "0028|9099"
+#define GKDCM_DataRepresentation                   "0028|9108"
+#define GKDCM_PixelMeasuresSequence                "0028|9110"
+#define GKDCM_FrameVOILUTSequence                  "0028|9132"
+#define GKDCM_PixelValueTransformationSequence     "0028|9145"
+#define GKDCM_SignalDomainRows                     "0028|9235"
+#define GKDCM_DisplayFilterPercentage              "0028|9411"
+#define GKDCM_FramePixelShiftSequence              "0028|9415"
+#define GKDCM_SubtractionItemID                    "0028|9416"
+#define GKDCM_PixelIntensityRelationshipLUTSequence "0028|9422"
+#define GKDCM_FramePixelDataPropertiesSequence     "0028|9443"
+#define GKDCM_GeometricalProperties                "0028|9444"
+#define GKDCM_GeometricMaximumDistortion           "0028|9445"
+#define GKDCM_ImageProcessingApplied               "0028|9446"
+#define GKDCM_MaskSelectionMode                    "0028|9454"
+#define GKDCM_LUTFunction                          "0028|9474"
+#define GKDCM_MaskVisibilityPercentage             "0028|9478"
+#define GKDCM_PixelShiftSequence                   "0028|9501"
+#define GKDCM_RegionPixelShiftSequence             "0028|9502"
+#define GKDCM_VerticesOfTheRegion                  "0028|9503"
+#define GKDCM_MultiFramePresentationSequence       "0028|9505"
+#define GKDCM_PixelShiftFrameRange                 "0028|9506"
+#define GKDCM_LUTFrameRange                        "0028|9507"
+#define GKDCM_ImageToEquipmentMappingMatrix        "0028|9520"
+#define GKDCM_EquipmentCoordinateSystemIdentification "0028|9537"
+#define GKDCM_RETIRED_StudyStatusID                "0032|000a"
+#define GKDCM_RETIRED_StudyPriorityID              "0032|000c"
+#define GKDCM_RETIRED_StudyIDIssuer                "0032|0012"
+#define GKDCM_RETIRED_StudyVerifiedDate            "0032|0032"
+#define GKDCM_RETIRED_StudyVerifiedTime            "0032|0033"
+#define GKDCM_RETIRED_StudyReadDate                "0032|0034"
+#define GKDCM_RETIRED_StudyReadTime                "0032|0035"
+#define GKDCM_RETIRED_ScheduledStudyStartDate      "0032|1000"
+#define GKDCM_RETIRED_ScheduledStudyStartTime      "0032|1001"
+#define GKDCM_RETIRED_ScheduledStudyStopDate       "0032|1010"
+#define GKDCM_RETIRED_ScheduledStudyStopTime       "0032|1011"
+#define GKDCM_RETIRED_ScheduledStudyLocation       "0032|1020"
+#define GKDCM_RETIRED_ScheduledStudyLocationAETitle "0032|1021"
+#define GKDCM_RETIRED_ReasonForStudy               "0032|1030"
+#define GKDCM_RequestingPhysicianIdentificationSequence "0032|1031"
+#define GKDCM_RequestingPhysician                  "0032|1032"
+#define GKDCM_RequestingService                    "0032|1033"
+#define GKDCM_RequestingServiceCodeSequence        "0032|1034"
+#define GKDCM_RETIRED_StudyArrivalDate             "0032|1040"
+#define GKDCM_RETIRED_StudyArrivalTime             "0032|1041"
+#define GKDCM_RETIRED_StudyCompletionDate          "0032|1050"
+#define GKDCM_RETIRED_StudyCompletionTime          "0032|1051"
+#define GKDCM_RETIRED_StudyComponentStatusID       "0032|1055"
+#define GKDCM_RequestedProcedureDescription        "0032|1060"
+#define GKDCM_RequestedProcedureCodeSequence       "0032|1064"
+#define GKDCM_RequestedContrastAgent               "0032|1070"
+#define GKDCM_RETIRED_StudyComments                "0032|4000"
+#define GKDCM_ReferencedPatientAliasSequence       "0038|0004"
+#define GKDCM_VisitStatusID                        "0038|0008"
+#define GKDCM_AdmissionID                          "0038|0010"
+#define GKDCM_RETIRED_IssuerOfAdmissionID          "0038|0011"
+#define GKDCM_IssuerOfAdmissionIDSequence          "0038|0014"
+#define GKDCM_RouteOfAdmissions                    "0038|0016"
+#define GKDCM_RETIRED_ScheduledAdmissionDate       "0038|001a"
+#define GKDCM_RETIRED_ScheduledAdmissionTime       "0038|001b"
+#define GKDCM_RETIRED_ScheduledDischargeDate       "0038|001c"
+#define GKDCM_RETIRED_ScheduledDischargeTime       "0038|001d"
+#define GKDCM_RETIRED_ScheduledPatientInstitutionResidence "0038|001e"
+#define GKDCM_AdmittingDate                        "0038|0020"
+#define GKDCM_AdmittingTime                        "0038|0021"
+#define GKDCM_RETIRED_DischargeDate                "0038|0030"
+#define GKDCM_RETIRED_DischargeTime                "0038|0032"
+#define GKDCM_RETIRED_DischargeDiagnosisDescription "0038|0040"
+#define GKDCM_RETIRED_DischargeDiagnosisCodeSequence "0038|0044"
+#define GKDCM_SpecialNeeds                         "0038|0050"
+#define GKDCM_ServiceEpisodeID                     "0038|0060"
+#define GKDCM_RETIRED_IssuerOfServiceEpisodeID     "0038|0061"
+#define GKDCM_ServiceEpisodeDescription            "0038|0062"
+#define GKDCM_IssuerOfServiceEpisodeIDSequence     "0038|0064"
+#define GKDCM_PertinentDocumentsSequence           "0038|0100"
+#define GKDCM_CurrentPatientLocation               "0038|0300"
+#define GKDCM_PatientInstitutionResidence          "0038|0400"
+#define GKDCM_PatientState                         "0038|0500"
+#define GKDCM_PatientClinicalTrialParticipationSequence "0038|0502"
+#define GKDCM_VisitComments                        "0038|4000"
+#define GKDCM_WaveformOriginality                  "003a|0004"
+#define GKDCM_NumberOfWaveformChannels             "003a|0005"
+#define GKDCM_NumberOfWaveformSamples              "003a|0010"
+#define GKDCM_SamplingFrequency                    "003a|001a"
+#define GKDCM_MultiplexGroupLabel                  "003a|0020"
+#define GKDCM_ChannelDefinitionSequence            "003a|0200"
+#define GKDCM_WaveformChannelNumber                "003a|0202"
+#define GKDCM_ChannelLabel                         "003a|0203"
+#define GKDCM_ChannelStatus                        "003a|0205"
+#define GKDCM_ChannelSourceSequence                "003a|0208"
+#define GKDCM_ChannelSourceModifiersSequence       "003a|0209"
+#define GKDCM_SourceWaveformSequence               "003a|020a"
+#define GKDCM_ChannelDerivationDescription         "003a|020c"
+#define GKDCM_ChannelSensitivity                   "003a|0210"
+#define GKDCM_ChannelSensitivityUnitsSequence      "003a|0211"
+#define GKDCM_ChannelSensitivityCorrectionFactor   "003a|0212"
+#define GKDCM_ChannelBaseline                      "003a|0213"
+#define GKDCM_ChannelTimeSkew                      "003a|0214"
+#define GKDCM_ChannelSampleSkew                    "003a|0215"
+#define GKDCM_ChannelOffset                        "003a|0218"
+#define GKDCM_WaveformBitsStored                   "003a|021a"
+#define GKDCM_FilterLowFrequency                   "003a|0220"
+#define GKDCM_FilterHighFrequency                  "003a|0221"
+#define GKDCM_NotchFilterFrequency                 "003a|0222"
+#define GKDCM_NotchFilterBandwidth                 "003a|0223"
+#define GKDCM_WaveformDataDisplayScale             "003a|0230"
+#define GKDCM_WaveformDisplayBackgroundCIELabValue "003a|0231"
+#define GKDCM_WaveformPresentationGroupSequence    "003a|0240"
+#define GKDCM_PresentationGroupNumber              "003a|0241"
+#define GKDCM_ChannelDisplaySequence               "003a|0242"
+#define GKDCM_ChannelRecommendedDisplayCIELabValue "003a|0244"
+#define GKDCM_ChannelPosition                      "003a|0245"
+#define GKDCM_DisplayShadingFlag                   "003a|0246"
+#define GKDCM_FractionalChannelDisplayScale        "003a|0247"
+#define GKDCM_AbsoluteChannelDisplayScale          "003a|0248"
+#define GKDCM_MultiplexedAudioChannelsDescriptionCodeSequence "003a|0300"
+#define GKDCM_ChannelIdentificationCode            "003a|0301"
+#define GKDCM_ChannelMode                          "003a|0302"
+#define GKDCM_ScheduledStationAETitle              "0040|0001"
+#define GKDCM_ScheduledProcedureStepStartDate      "0040|0002"
+#define GKDCM_ScheduledProcedureStepStartTime      "0040|0003"
+#define GKDCM_ScheduledProcedureStepEndDate        "0040|0004"
+#define GKDCM_ScheduledProcedureStepEndTime        "0040|0005"
+#define GKDCM_ScheduledPerformingPhysicianName     "0040|0006"
+#define GKDCM_ScheduledProcedureStepDescription    "0040|0007"
+#define GKDCM_ScheduledProtocolCodeSequence        "0040|0008"
+#define GKDCM_ScheduledProcedureStepID             "0040|0009"
+#define GKDCM_StageCodeSequence                    "0040|000a"
+#define GKDCM_ScheduledPerformingPhysicianIdentificationSequence "0040|000b"
+#define GKDCM_ScheduledStationName                 "0040|0010"
+#define GKDCM_ScheduledProcedureStepLocation       "0040|0011"
+#define GKDCM_PreMedication                        "0040|0012"
+#define GKDCM_ScheduledProcedureStepStatus         "0040|0020"
+#define GKDCM_OrderPlacerIdentifierSequence        "0040|0026"
+#define GKDCM_OrderFillerIdentifierSequence        "0040|0027"
+#define GKDCM_LocalNamespaceEntityID               "0040|0031"
+#define GKDCM_UniversalEntityID                    "0040|0032"
+#define GKDCM_UniversalEntityIDType                "0040|0033"
+#define GKDCM_IdentifierTypeCode                   "0040|0035"
+#define GKDCM_AssigningFacilitySequence            "0040|0036"
+#define GKDCM_AssigningJurisdictionCodeSequence    "0040|0039"
+#define GKDCM_AssigningAgencyOrDepartmentCodeSequence "0040|003a"
+#define GKDCM_ScheduledProcedureStepSequence       "0040|0100"
+#define GKDCM_ReferencedNonImageCompositeSOPInstanceSequence "0040|0220"
+#define GKDCM_PerformedStationAETitle              "0040|0241"
+#define GKDCM_PerformedStationName                 "0040|0242"
+#define GKDCM_PerformedLocation                    "0040|0243"
+#define GKDCM_PerformedProcedureStepStartDate      "0040|0244"
+#define GKDCM_PerformedProcedureStepStartTime      "0040|0245"
+#define GKDCM_PerformedProcedureStepEndDate        "0040|0250"
+#define GKDCM_PerformedProcedureStepEndTime        "0040|0251"
+#define GKDCM_PerformedProcedureStepStatus         "0040|0252"
+#define GKDCM_PerformedProcedureStepID             "0040|0253"
+#define GKDCM_PerformedProcedureStepDescription    "0040|0254"
+#define GKDCM_PerformedProcedureTypeDescription    "0040|0255"
+#define GKDCM_PerformedProtocolCodeSequence        "0040|0260"
+#define GKDCM_PerformedProtocolType                "0040|0261"
+#define GKDCM_ScheduledStepAttributesSequence      "0040|0270"
+#define GKDCM_RequestAttributesSequence            "0040|0275"
+#define GKDCM_CommentsOnThePerformedProcedureStep  "0040|0280"
+#define GKDCM_PerformedProcedureStepDiscontinuationReasonCodeSequence "0040|0281"
+#define GKDCM_QuantitySequence                     "0040|0293"
+#define GKDCM_Quantity                             "0040|0294"
+#define GKDCM_MeasuringUnitsSequence               "0040|0295"
+#define GKDCM_BillingItemSequence                  "0040|0296"
+#define GKDCM_TotalTimeOfFluoroscopy               "0040|0300"
+#define GKDCM_TotalNumberOfExposures               "0040|0301"
+#define GKDCM_EntranceDose                         "0040|0302"
+#define GKDCM_ExposedArea                          "0040|0303"
+#define GKDCM_DistanceSourceToEntrance             "0040|0306"
+#define GKDCM_RETIRED_DistanceSourceToSupport      "0040|0307"
+#define GKDCM_ExposureDoseSequence                 "0040|030e"
+#define GKDCM_CommentsOnRadiationDose              "0040|0310"
+#define GKDCM_XRayOutput                           "0040|0312"
+#define GKDCM_HalfValueLayer                       "0040|0314"
+#define GKDCM_OrganDose                            "0040|0316"
+#define GKDCM_OrganExposed                         "0040|0318"
+#define GKDCM_BillingProcedureStepSequence         "0040|0320"
+#define GKDCM_FilmConsumptionSequence              "0040|0321"
+#define GKDCM_BillingSuppliesAndDevicesSequence    "0040|0324"
+#define GKDCM_RETIRED_ReferencedProcedureStepSequence "0040|0330"
+#define GKDCM_PerformedSeriesSequence              "0040|0340"
+#define GKDCM_CommentsOnTheScheduledProcedureStep  "0040|0400"
+#define GKDCM_ProtocolContextSequence              "0040|0440"
+#define GKDCM_ContentItemModifierSequence          "0040|0441"
+#define GKDCM_ScheduledSpecimenSequence            "0040|0500"
+#define GKDCM_RETIRED_SpecimenAccessionNumber      "0040|050a"
+#define GKDCM_ContainerIdentifier                  "0040|0512"
+#define GKDCM_IssuerOfTheContainerIdentifierSequence "0040|0513"
+#define GKDCM_AlternateContainerIdentifierSequence "0040|0515"
+#define GKDCM_ContainerTypeCodeSequence            "0040|0518"
+#define GKDCM_ContainerDescription                 "0040|051a"
+#define GKDCM_ContainerComponentSequence           "0040|0520"
+#define GKDCM_RETIRED_SpecimenSequence             "0040|0550"
+#define GKDCM_SpecimenIdentifier                   "0040|0551"
+#define GKDCM_RETIRED_SpecimenDescriptionSequenceTrial "0040|0552"
+#define GKDCM_RETIRED_SpecimenDescriptionTrial     "0040|0553"
+#define GKDCM_SpecimenUID                          "0040|0554"
+#define GKDCM_AcquisitionContextSequence           "0040|0555"
+#define GKDCM_AcquisitionContextDescription        "0040|0556"
+#define GKDCM_SpecimenDescriptionSequence          "0040|0560"
+#define GKDCM_IssuerOfTheSpecimenIdentifierSequence "0040|0562"
+#define GKDCM_SpecimenTypeCodeSequence             "0040|059a"
+#define GKDCM_SpecimenShortDescription             "0040|0600"
+#define GKDCM_SpecimenDetailedDescription          "0040|0602"
+#define GKDCM_SpecimenPreparationSequence          "0040|0610"
+#define GKDCM_SpecimenPreparationStepContentItemSequence "0040|0612"
+#define GKDCM_SpecimenLocalizationContentItemSequence "0040|0620"
+#define GKDCM_RETIRED_SlideIdentifier              "0040|06fa"
+#define GKDCM_ImageCenterPointCoordinatesSequence  "0040|071a"
+#define GKDCM_XOffsetInSlideCoordinateSystem       "0040|072a"
+#define GKDCM_YOffsetInSlideCoordinateSystem       "0040|073a"
+#define GKDCM_ZOffsetInSlideCoordinateSystem       "0040|074a"
+#define GKDCM_RETIRED_PixelSpacingSequence         "0040|08d8"
+#define GKDCM_RETIRED_CoordinateSystemAxisCodeSequence "0040|08da"
+#define GKDCM_MeasurementUnitsCodeSequence         "0040|08ea"
+#define GKDCM_RETIRED_VitalStainCodeSequenceTrial  "0040|09f8"
+#define GKDCM_RequestedProcedureID                 "0040|1001"
+#define GKDCM_ReasonForTheRequestedProcedure       "0040|1002"
+#define GKDCM_RequestedProcedurePriority           "0040|1003"
+#define GKDCM_PatientTransportArrangements         "0040|1004"
+#define GKDCM_RequestedProcedureLocation           "0040|1005"
+#define GKDCM_RETIRED_PlacerOrderNumberProcedure   "0040|1006"
+#define GKDCM_RETIRED_FillerOrderNumberProcedure   "0040|1007"
+#define GKDCM_ConfidentialityCode                  "0040|1008"
+#define GKDCM_ReportingPriority                    "0040|1009"
+#define GKDCM_ReasonForRequestedProcedureCodeSequence "0040|100a"
+#define GKDCM_NamesOfIntendedRecipientsOfResults   "0040|1010"
+#define GKDCM_IntendedRecipientsOfResultsIdentificationSequence "0040|1011"
+#define GKDCM_ReasonForPerformedProcedureCodeSequence "0040|1012"
+#define GKDCM_PersonIdentificationCodeSequence     "0040|1101"
+#define GKDCM_PersonAddress                        "0040|1102"
+#define GKDCM_PersonTelephoneNumbers               "0040|1103"
+#define GKDCM_RequestedProcedureComments           "0040|1400"
+#define GKDCM_RETIRED_ReasonForTheImagingServiceRequest "0040|2001"
+#define GKDCM_IssueDateOfImagingServiceRequest     "0040|2004"
+#define GKDCM_IssueTimeOfImagingServiceRequest     "0040|2005"
+#define GKDCM_RETIRED_PlacerOrderNumberImagingServiceRequestRetired "0040|2006"
+#define GKDCM_RETIRED_FillerOrderNumberImagingServiceRequestRetired "0040|2007"
+#define GKDCM_OrderEnteredBy                       "0040|2008"
+#define GKDCM_OrderEntererLocation                 "0040|2009"
+#define GKDCM_OrderCallbackPhoneNumber             "0040|2010"
+#define GKDCM_PlacerOrderNumberImagingServiceRequest "0040|2016"
+#define GKDCM_FillerOrderNumberImagingServiceRequest "0040|2017"
+#define GKDCM_ImagingServiceRequestComments        "0040|2400"
+#define GKDCM_ConfidentialityConstraintOnPatientDataDescription "0040|3001"
+#define GKDCM_GeneralPurposeScheduledProcedureStepStatus "0040|4001"
+#define GKDCM_GeneralPurposePerformedProcedureStepStatus "0040|4002"
+#define GKDCM_GeneralPurposeScheduledProcedureStepPriority "0040|4003"
+#define GKDCM_ScheduledProcessingApplicationsCodeSequence "0040|4004"
+#define GKDCM_ScheduledProcedureStepStartDateTime  "0040|4005"
+#define GKDCM_MultipleCopiesFlag                   "0040|4006"
+#define GKDCM_PerformedProcessingApplicationsCodeSequence "0040|4007"
+#define GKDCM_HumanPerformerCodeSequence           "0040|4009"
+#define GKDCM_ScheduledProcedureStepModificationDateTime "0040|4010"
+#define GKDCM_ExpectedCompletionDateTime           "0040|4011"
+#define GKDCM_ResultingGeneralPurposePerformedProcedureStepsSequence "0040|4015"
+#define GKDCM_ReferencedGeneralPurposeScheduledProcedureStepSequence "0040|4016"
+#define GKDCM_ScheduledWorkitemCodeSequence        "0040|4018"
+#define GKDCM_PerformedWorkitemCodeSequence        "0040|4019"
+#define GKDCM_InputAvailabilityFlag                "0040|4020"
+#define GKDCM_InputInformationSequence             "0040|4021"
+#define GKDCM_RelevantInformationSequence          "0040|4022"
+#define GKDCM_ReferencedGeneralPurposeScheduledProcedureStepTransactionUID "0040|4023"
+#define GKDCM_ScheduledStationNameCodeSequence     "0040|4025"
+#define GKDCM_ScheduledStationClassCodeSequence    "0040|4026"
+#define GKDCM_ScheduledStationGeographicLocationCodeSequence "0040|4027"
+#define GKDCM_PerformedStationNameCodeSequence     "0040|4028"
+#define GKDCM_PerformedStationClassCodeSequence    "0040|4029"
+#define GKDCM_PerformedStationGeographicLocationCodeSequence "0040|4030"
+#define GKDCM_RequestedSubsequentWorkitemCodeSequence "0040|4031"
+#define GKDCM_NonDICOMOutputCodeSequence           "0040|4032"
+#define GKDCM_OutputInformationSequence            "0040|4033"
+#define GKDCM_ScheduledHumanPerformersSequence     "0040|4034"
+#define GKDCM_ActualHumanPerformersSequence        "0040|4035"
+#define GKDCM_HumanPerformerOrganization           "0040|4036"
+#define GKDCM_HumanPerformerName                   "0040|4037"
+#define GKDCM_RawDataHandling                      "0040|4040"
+#define GKDCM_EntranceDoseInmGy                    "0040|8302"
+#define GKDCM_ReferencedImageRealWorldValueMappingSequence "0040|9094"
+#define GKDCM_RealWorldValueMappingSequence        "0040|9096"
+#define GKDCM_PixelValueMappingCodeSequence        "0040|9098"
+#define GKDCM_LUTLabel                             "0040|9210"
+#define GKDCM_RealWorldValueLastValueMapped        "0040|9211"
+#define GKDCM_RealWorldValueLUTData                "0040|9212"
+#define GKDCM_RealWorldValueFirstValueMapped       "0040|9216"
+#define GKDCM_RealWorldValueIntercept              "0040|9224"
+#define GKDCM_RealWorldValueSlope                  "0040|9225"
+#define GKDCM_RelationshipType                     "0040|a010"
+#define GKDCM_VerifyingOrganization                "0040|a027"
+#define GKDCM_VerificationDateTime                 "0040|a030"
+#define GKDCM_ObservationDateTime                  "0040|a032"
+#define GKDCM_ValueType                            "0040|a040"
+#define GKDCM_ConceptNameCodeSequence              "0040|a043"
+#define GKDCM_ContinuityOfContent                  "0040|a050"
+#define GKDCM_VerifyingObserverSequence            "0040|a073"
+#define GKDCM_VerifyingObserverName                "0040|a075"
+#define GKDCM_AuthorObserverSequence               "0040|a078"
+#define GKDCM_ParticipantSequence                  "0040|a07a"
+#define GKDCM_CustodialOrganizationSequence        "0040|a07c"
+#define GKDCM_ParticipationType                    "0040|a080"
+#define GKDCM_ParticipationDateTime                "0040|a082"
+#define GKDCM_ObserverType                         "0040|a084"
+#define GKDCM_VerifyingObserverIdentificationCodeSequence "0040|a088"
+#define GKDCM_RETIRED_EquivalentCDADocumentSequence "0040|a090"
+#define GKDCM_ReferencedWaveformChannels           "0040|a0b0"
+#define GKDCM_DateTime                             "0040|a120"
+#define GKDCM_Date                                 "0040|a121"
+#define GKDCM_Time                                 "0040|a122"
+#define GKDCM_PersonName                           "0040|a123"
+#define GKDCM_UID                                  "0040|a124"
+#define GKDCM_TemporalRangeType                    "0040|a130"
+#define GKDCM_ReferencedSamplePositions            "0040|a132"
+#define GKDCM_ReferencedFrameNumbers               "0040|a136"
+#define GKDCM_ReferencedTimeOffsets                "0040|a138"
+#define GKDCM_ReferencedDateTime                   "0040|a13a"
+#define GKDCM_TextValue                            "0040|a160"
+#define GKDCM_ConceptCodeSequence                  "0040|a168"
+#define GKDCM_PurposeOfReferenceCodeSequence       "0040|a170"
+#define GKDCM_AnnotationGroupNumber                "0040|a180"
+#define GKDCM_ModifierCodeSequence                 "0040|a195"
+#define GKDCM_MeasuredValueSequence                "0040|a300"
+#define GKDCM_NumericValueQualifierCodeSequence    "0040|a301"
+#define GKDCM_NumericValue                         "0040|a30a"
+#define GKDCM_RETIRED_AddressTrial                 "0040|a353"
+#define GKDCM_RETIRED_TelephoneNumberTrial         "0040|a354"
+#define GKDCM_PredecessorDocumentsSequence         "0040|a360"
+#define GKDCM_ReferencedRequestSequence            "0040|a370"
+#define GKDCM_PerformedProcedureCodeSequence       "0040|a372"
+#define GKDCM_CurrentRequestedProcedureEvidenceSequence "0040|a375"
+#define GKDCM_PertinentOtherEvidenceSequence       "0040|a385"
+#define GKDCM_HL7StructuredDocumentReferenceSequence "0040|a390"
+#define GKDCM_CompletionFlag                       "0040|a491"
+#define GKDCM_CompletionFlagDescription            "0040|a492"
+#define GKDCM_VerificationFlag                     "0040|a493"
+#define GKDCM_ArchiveRequested                     "0040|a494"
+#define GKDCM_PreliminaryFlag                      "0040|a496"
+#define GKDCM_ContentTemplateSequence              "0040|a504"
+#define GKDCM_IdenticalDocumentsSequence           "0040|a525"
+#define GKDCM_ContentSequence                      "0040|a730"
+#define GKDCM_WaveformAnnotationSequence           "0040|b020"
+#define GKDCM_TemplateIdentifier                   "0040|db00"
+#define GKDCM_RETIRED_TemplateVersion              "0040|db06"
+#define GKDCM_RETIRED_TemplateLocalVersion         "0040|db07"
+#define GKDCM_RETIRED_TemplateExtensionFlag        "0040|db0b"
+#define GKDCM_RETIRED_TemplateExtensionOrganizationUID "0040|db0c"
+#define GKDCM_RETIRED_TemplateExtensionCreatorUID  "0040|db0d"
+#define GKDCM_ReferencedContentItemIdentifier      "0040|db73"
+#define GKDCM_HL7InstanceIdentifier                "0040|e001"
+#define GKDCM_HL7DocumentEffectiveTime             "0040|e004"
+#define GKDCM_HL7DocumentTypeCodeSequence          "0040|e006"
+#define GKDCM_RetrieveURI                          "0040|e010"
+#define GKDCM_RetrieveLocationUID                  "0040|e011"
+#define GKDCM_DocumentTitle                        "0042|0010"
+#define GKDCM_EncapsulatedDocument                 "0042|0011"
+#define GKDCM_MIMETypeOfEncapsulatedDocument       "0042|0012"
+#define GKDCM_SourceInstanceSequence               "0042|0013"
+#define GKDCM_ListOfMIMETypes                      "0042|0014"
+#define GKDCM_ProductPackageIdentifier             "0044|0001"
+#define GKDCM_SubstanceAdministrationApproval      "0044|0002"
+#define GKDCM_ApprovalStatusFurtherDescription     "0044|0003"
+#define GKDCM_ApprovalStatusDateTime               "0044|0004"
+#define GKDCM_ProductTypeCodeSequence              "0044|0007"
+#define GKDCM_ProductName                          "0044|0008"
+#define GKDCM_ProductDescription                   "0044|0009"
+#define GKDCM_ProductLotIdentifier                 "0044|000a"
+#define GKDCM_ProductExpirationDateTime            "0044|000b"
+#define GKDCM_SubstanceAdministrationDateTime      "0044|0010"
+#define GKDCM_SubstanceAdministrationNotes         "0044|0011"
+#define GKDCM_SubstanceAdministrationDeviceID      "0044|0012"
+#define GKDCM_ProductParameterSequence             "0044|0013"
+#define GKDCM_SubstanceAdministrationParameterSequence "0044|0019"
+#define GKDCM_LensDescription                      "0046|0012"
+#define GKDCM_RightLensSequence                    "0046|0014"
+#define GKDCM_LeftLensSequence                     "0046|0015"
+#define GKDCM_UnspecifiedLateralityLensSequence    "0046|0016"
+#define GKDCM_CylinderSequence                     "0046|0018"
+#define GKDCM_PrismSequence                        "0046|0028"
+#define GKDCM_HorizontalPrismPower                 "0046|0030"
+#define GKDCM_HorizontalPrismBase                  "0046|0032"
+#define GKDCM_VerticalPrismPower                   "0046|0034"
+#define GKDCM_VerticalPrismBase                    "0046|0036"
+#define GKDCM_LensSegmentType                      "0046|0038"
+#define GKDCM_OpticalTransmittance                 "0046|0040"
+#define GKDCM_ChannelWidth                         "0046|0042"
+#define GKDCM_PupilSize                            "0046|0044"
+#define GKDCM_CornealSize                          "0046|0046"
+#define GKDCM_AutorefractionRightEyeSequence       "0046|0050"
+#define GKDCM_AutorefractionLeftEyeSequence        "0046|0052"
+#define GKDCM_DistancePupillaryDistance            "0046|0060"
+#define GKDCM_NearPupillaryDistance                "0046|0062"
+#define GKDCM_IntermediatePupillaryDistance        "0046|0063"
+#define GKDCM_OtherPupillaryDistance               "0046|0064"
+#define GKDCM_KeratometryRightEyeSequence          "0046|0070"
+#define GKDCM_KeratometryLeftEyeSequence           "0046|0071"
+#define GKDCM_SteepKeratometricAxisSequence        "0046|0074"
+#define GKDCM_RadiusOfCurvature                    "0046|0075"
+#define GKDCM_KeratometricPower                    "0046|0076"
+#define GKDCM_KeratometricAxis                     "0046|0077"
+#define GKDCM_FlatKeratometricAxisSequence         "0046|0080"
+#define GKDCM_BackgroundColor                      "0046|0092"
+#define GKDCM_Optotype                             "0046|0094"
+#define GKDCM_OptotypePresentation                 "0046|0095"
+#define GKDCM_SubjectiveRefractionRightEyeSequence "0046|0097"
+#define GKDCM_SubjectiveRefractionLeftEyeSequence  "0046|0098"
+#define GKDCM_AddNearSequence                      "0046|0100"
+#define GKDCM_AddIntermediateSequence              "0046|0101"
+#define GKDCM_AddOtherSequence                     "0046|0102"
+#define GKDCM_AddPower                             "0046|0104"
+#define GKDCM_ViewingDistance                      "0046|0106"
+#define GKDCM_VisualAcuityTypeCodeSequence         "0046|0121"
+#define GKDCM_VisualAcuityRightEyeSequence         "0046|0122"
+#define GKDCM_VisualAcuityLeftEyeSequence          "0046|0123"
+#define GKDCM_VisualAcuityBothEyesOpenSequence     "0046|0124"
+#define GKDCM_ViewingDistanceType                  "0046|0125"
+#define GKDCM_VisualAcuityModifiers                "0046|0135"
+#define GKDCM_DecimalVisualAcuity                  "0046|0137"
+#define GKDCM_OptotypeDetailedDefinition           "0046|0139"
+#define GKDCM_ReferencedRefractiveMeasurementsSequence "0046|0145"
+#define GKDCM_SpherePower                          "0046|0146"
+#define GKDCM_CylinderPower                        "0046|0147"
+#define GKDCM_ImagedVolumeWidth                    "0048|0001"
+#define GKDCM_ImagedVolumeHeight                   "0048|0002"
+#define GKDCM_ImagedVolumeDepth                    "0048|0003"
+#define GKDCM_TotalPixelMatrixColumns              "0048|0006"
+#define GKDCM_TotalPixelMatrixRows                 "0048|0007"
+#define GKDCM_TotalPixelMatrixOriginSequence       "0048|0008"
+#define GKDCM_SpecimenLabelInImage                 "0048|0010"
+#define GKDCM_FocusMethod                          "0048|0011"
+#define GKDCM_ExtendedDepthOfField                 "0048|0012"
+#define GKDCM_NumberOfFocalPlanes                  "0048|0013"
+#define GKDCM_DistanceBetweenFocalPlanes           "0048|0014"
+#define GKDCM_RecommendedAbsentPixelCIELabValue    "0048|0015"
+#define GKDCM_IlluminatorTypeCodeSequence          "0048|0100"
+#define GKDCM_ImageOrientationSlide                "0048|0102"
+#define GKDCM_OpticalPathSequence                  "0048|0105"
+#define GKDCM_OpticalPathIdentifier                "0048|0106"
+#define GKDCM_OpticalPathDescription               "0048|0107"
+#define GKDCM_IlluminationColorCodeSequence        "0048|0108"
+#define GKDCM_SpecimenReferenceSequence            "0048|0110"
+#define GKDCM_CondenserLensPower                   "0048|0111"
+#define GKDCM_ObjectiveLensPower                   "0048|0112"
+#define GKDCM_ObjectiveLensNumericalAperture       "0048|0113"
+#define GKDCM_PaletteColorLookupTableSequence      "0048|0120"
+#define GKDCM_ReferencedImageNavigationSequence    "0048|0200"
+#define GKDCM_TopLeftHandCornerOfLocalizerArea     "0048|0201"
+#define GKDCM_BottomRightHandCornerOfLocalizerArea "0048|0202"
+#define GKDCM_OpticalPathIdentificationSequence    "0048|0207"
+#define GKDCM_PlanePositionSlideSequence           "0048|021a"
+#define GKDCM_ColumnPositionInTotalImagePixelMatrix "0048|021e"
+#define GKDCM_RowPositionInTotalImagePixelMatrix   "0048|021f"
+#define GKDCM_PixelOriginInterpretation            "0048|0301"
+#define GKDCM_CalibrationImage                     "0050|0004"
+#define GKDCM_DeviceSequence                       "0050|0010"
+#define GKDCM_ContainerComponentTypeCodeSequence   "0050|0012"
+#define GKDCM_ContainerComponentThickness          "0050|0013"
+#define GKDCM_DeviceLength                         "0050|0014"
+#define GKDCM_ContainerComponentWidth              "0050|0015"
+#define GKDCM_DeviceDiameter                       "0050|0016"
+#define GKDCM_DeviceDiameterUnits                  "0050|0017"
+#define GKDCM_DeviceVolume                         "0050|0018"
+#define GKDCM_InterMarkerDistance                  "0050|0019"
+#define GKDCM_ContainerComponentMaterial           "0050|001a"
+#define GKDCM_ContainerComponentID                 "0050|001b"
+#define GKDCM_ContainerComponentLength             "0050|001c"
+#define GKDCM_ContainerComponentDiameter           "0050|001d"
+#define GKDCM_ContainerComponentDescription        "0050|001e"
+#define GKDCM_DeviceDescription                    "0050|0020"
+#define GKDCM_EnergyWindowVector                   "0054|0010"
+#define GKDCM_NumberOfEnergyWindows                "0054|0011"
+#define GKDCM_EnergyWindowInformationSequence      "0054|0012"
+#define GKDCM_EnergyWindowRangeSequence            "0054|0013"
+#define GKDCM_EnergyWindowLowerLimit               "0054|0014"
+#define GKDCM_EnergyWindowUpperLimit               "0054|0015"
+#define GKDCM_RadiopharmaceuticalInformationSequence "0054|0016"
+#define GKDCM_ResidualSyringeCounts                "0054|0017"
+#define GKDCM_EnergyWindowName                     "0054|0018"
+#define GKDCM_DetectorVector                       "0054|0020"
+#define GKDCM_NumberOfDetectors                    "0054|0021"
+#define GKDCM_DetectorInformationSequence          "0054|0022"
+#define GKDCM_PhaseVector                          "0054|0030"
+#define GKDCM_NumberOfPhases                       "0054|0031"
+#define GKDCM_PhaseInformationSequence             "0054|0032"
+#define GKDCM_NumberOfFramesInPhase                "0054|0033"
+#define GKDCM_PhaseDelay                           "0054|0036"
+#define GKDCM_PauseBetweenFrames                   "0054|0038"
+#define GKDCM_PhaseDescription                     "0054|0039"
+#define GKDCM_RotationVector                       "0054|0050"
+#define GKDCM_NumberOfRotations                    "0054|0051"
+#define GKDCM_RotationInformationSequence          "0054|0052"
+#define GKDCM_NumberOfFramesInRotation             "0054|0053"
+#define GKDCM_RRIntervalVector                     "0054|0060"
+#define GKDCM_NumberOfRRIntervals                  "0054|0061"
+#define GKDCM_GatedInformationSequence             "0054|0062"
+#define GKDCM_DataInformationSequence              "0054|0063"
+#define GKDCM_TimeSlotVector                       "0054|0070"
+#define GKDCM_NumberOfTimeSlots                    "0054|0071"
+#define GKDCM_TimeSlotInformationSequence          "0054|0072"
+#define GKDCM_TimeSlotTime                         "0054|0073"
+#define GKDCM_SliceVector                          "0054|0080"
+#define GKDCM_NumberOfSlices                       "0054|0081"
+#define GKDCM_AngularViewVector                    "0054|0090"
+#define GKDCM_TimeSliceVector                      "0054|0100"
+#define GKDCM_NumberOfTimeSlices                   "0054|0101"
+#define GKDCM_StartAngle                           "0054|0200"
+#define GKDCM_TypeOfDetectorMotion                 "0054|0202"
+#define GKDCM_TriggerVector                        "0054|0210"
+#define GKDCM_NumberOfTriggersInPhase              "0054|0211"
+#define GKDCM_ViewCodeSequence                     "0054|0220"
+#define GKDCM_ViewModifierCodeSequence             "0054|0222"
+#define GKDCM_RadionuclideCodeSequence             "0054|0300"
+#define GKDCM_AdministrationRouteCodeSequence      "0054|0302"
+#define GKDCM_RadiopharmaceuticalCodeSequence      "0054|0304"
+#define GKDCM_CalibrationDataSequence              "0054|0306"
+#define GKDCM_EnergyWindowNumber                   "0054|0308"
+#define GKDCM_ImageID                              "0054|0400"
+#define GKDCM_PatientOrientationCodeSequence       "0054|0410"
+#define GKDCM_PatientOrientationModifierCodeSequence "0054|0412"
+#define GKDCM_PatientGantryRelationshipCodeSequence "0054|0414"
+#define GKDCM_SliceProgressionDirection            "0054|0500"
+#define GKDCM_SeriesType                           "0054|1000"
+#define GKDCM_Units                                "0054|1001"
+#define GKDCM_CountsSource                         "0054|1002"
+#define GKDCM_ReprojectionMethod                   "0054|1004"
+#define GKDCM_RandomsCorrectionMethod              "0054|1100"
+#define GKDCM_AttenuationCorrectionMethod          "0054|1101"
+#define GKDCM_DecayCorrection                      "0054|1102"
+#define GKDCM_ReconstructionMethod                 "0054|1103"
+#define GKDCM_DetectorLinesOfResponseUsed          "0054|1104"
+#define GKDCM_ScatterCorrectionMethod              "0054|1105"
+#define GKDCM_AxialAcceptance                      "0054|1200"
+#define GKDCM_AxialMash                            "0054|1201"
+#define GKDCM_TransverseMash                       "0054|1202"
+#define GKDCM_DetectorElementSize                  "0054|1203"
+#define GKDCM_CoincidenceWindowWidth               "0054|1210"
+#define GKDCM_SecondaryCountsType                  "0054|1220"
+#define GKDCM_FrameReferenceTime                   "0054|1300"
+#define GKDCM_PrimaryPromptsCountsAccumulated      "0054|1310"
+#define GKDCM_SecondaryCountsAccumulated           "0054|1311"
+#define GKDCM_SliceSensitivityFactor               "0054|1320"
+#define GKDCM_DecayFactor                          "0054|1321"
+#define GKDCM_DoseCalibrationFactor                "0054|1322"
+#define GKDCM_ScatterFractionFactor                "0054|1323"
+#define GKDCM_DeadTimeFactor                       "0054|1324"
+#define GKDCM_ImageIndex                           "0054|1330"
+#define GKDCM_RETIRED_CountsIncluded               "0054|1400"
+#define GKDCM_RETIRED_DeadTimeCorrectionFlag       "0054|1401"
+#define GKDCM_HistogramSequence                    "0060|3000"
+#define GKDCM_HistogramNumberOfBins                "0060|3002"
+#define GKDCM_HistogramFirstBinValue               "0060|3004"
+#define GKDCM_HistogramLastBinValue                "0060|3006"
+#define GKDCM_HistogramBinWidth                    "0060|3008"
+#define GKDCM_HistogramExplanation                 "0060|3010"
+#define GKDCM_HistogramData                        "0060|3020"
+#define GKDCM_SegmentationType                     "0062|0001"
+#define GKDCM_SegmentSequence                      "0062|0002"
+#define GKDCM_SegmentedPropertyCategoryCodeSequence "0062|0003"
+#define GKDCM_SegmentNumber                        "0062|0004"
+#define GKDCM_SegmentLabel                         "0062|0005"
+#define GKDCM_SegmentDescription                   "0062|0006"
+#define GKDCM_SegmentAlgorithmType                 "0062|0008"
+#define GKDCM_SegmentAlgorithmName                 "0062|0009"
+#define GKDCM_SegmentIdentificationSequence        "0062|000a"
+#define GKDCM_ReferencedSegmentNumber              "0062|000b"
+#define GKDCM_RecommendedDisplayGrayscaleValue     "0062|000c"
+#define GKDCM_RecommendedDisplayCIELabValue        "0062|000d"
+#define GKDCM_MaximumFractionalValue               "0062|000e"
+#define GKDCM_SegmentedPropertyTypeCodeSequence    "0062|000f"
+#define GKDCM_SegmentationFractionalType           "0062|0010"
+#define GKDCM_DeformableRegistrationSequence       "0064|0002"
+#define GKDCM_SourceFrameOfReferenceUID            "0064|0003"
+#define GKDCM_DeformableRegistrationGridSequence   "0064|0005"
+#define GKDCM_GridDimensions                       "0064|0007"
+#define GKDCM_GridResolution                       "0064|0008"
+#define GKDCM_VectorGridData                       "0064|0009"
+#define GKDCM_PreDeformationMatrixRegistrationSequence "0064|000f"
+#define GKDCM_PostDeformationMatrixRegistrationSequence "0064|0010"
+#define GKDCM_NumberOfSurfaces                     "0066|0001"
+#define GKDCM_SurfaceSequence                      "0066|0002"
+#define GKDCM_SurfaceNumber                        "0066|0003"
+#define GKDCM_SurfaceComments                      "0066|0004"
+#define GKDCM_SurfaceProcessing                    "0066|0009"
+#define GKDCM_SurfaceProcessingRatio               "0066|000a"
+#define GKDCM_SurfaceProcessingDescription         "0066|000b"
+#define GKDCM_RecommendedPresentationOpacity       "0066|000c"
+#define GKDCM_RecommendedPresentationType          "0066|000d"
+#define GKDCM_FiniteVolume                         "0066|000e"
+#define GKDCM_Manifold                             "0066|0010"
+#define GKDCM_SurfacePointsSequence                "0066|0011"
+#define GKDCM_SurfacePointsNormalsSequence         "0066|0012"
+#define GKDCM_SurfaceMeshPrimitivesSequence        "0066|0013"
+#define GKDCM_NumberOfSurfacePoints                "0066|0015"
+#define GKDCM_PointCoordinatesData                 "0066|0016"
+#define GKDCM_PointPositionAccuracy                "0066|0017"
+#define GKDCM_MeanPointDistance                    "0066|0018"
+#define GKDCM_MaximumPointDistance                 "0066|0019"
+#define GKDCM_PointsBoundingBoxCoordinates         "0066|001a"
+#define GKDCM_AxisOfRotation                       "0066|001b"
+#define GKDCM_CenterOfRotation                     "0066|001c"
+#define GKDCM_NumberOfVectors                      "0066|001e"
+#define GKDCM_VectorDimensionality                 "0066|001f"
+#define GKDCM_VectorAccuracy                       "0066|0020"
+#define GKDCM_VectorCoordinateData                 "0066|0021"
+#define GKDCM_TrianglePointIndexList               "0066|0023"
+#define GKDCM_EdgePointIndexList                   "0066|0024"
+#define GKDCM_VertexPointIndexList                 "0066|0025"
+#define GKDCM_TriangleStripSequence                "0066|0026"
+#define GKDCM_TriangleFanSequence                  "0066|0027"
+#define GKDCM_LineSequence                         "0066|0028"
+#define GKDCM_PrimitivePointIndexList              "0066|0029"
+#define GKDCM_SurfaceCount                         "0066|002a"
+#define GKDCM_ReferencedSurfaceSequence            "0066|002b"
+#define GKDCM_ReferencedSurfaceNumber              "0066|002c"
+#define GKDCM_SegmentSurfaceGenerationAlgorithmIdentificationSequence "0066|002d"
+#define GKDCM_SegmentSurfaceSourceInstanceSequence "0066|002e"
+#define GKDCM_AlgorithmFamilyCodeSequence          "0066|002f"
+#define GKDCM_AlgorithmNameCodeSequence            "0066|0030"
+#define GKDCM_AlgorithmVersion                     "0066|0031"
+#define GKDCM_AlgorithmParameters                  "0066|0032"
+#define GKDCM_FacetSequence                        "0066|0034"
+#define GKDCM_SurfaceProcessingAlgorithmIdentificationSequence "0066|0035"
+#define GKDCM_AlgorithmName                        "0066|0036"
+#define GKDCM_ImplantSize                          "0068|6210"
+#define GKDCM_ImplantTemplateVersion               "0068|6221"
+#define GKDCM_ReplacedImplantTemplateSequence      "0068|6222"
+#define GKDCM_ImplantType                          "0068|6223"
+#define GKDCM_DerivationImplantTemplateSequence    "0068|6224"
+#define GKDCM_OriginalImplantTemplateSequence      "0068|6225"
+#define GKDCM_EffectiveDateTime                    "0068|6226"
+#define GKDCM_ImplantTargetAnatomySequence         "0068|6230"
+#define GKDCM_InformationFromManufacturerSequence  "0068|6260"
+#define GKDCM_NotificationFromManufacturerSequence "0068|6265"
+#define GKDCM_InformationIssueDateTime             "0068|6270"
+#define GKDCM_InformationSummary                   "0068|6280"
+#define GKDCM_ImplantRegulatoryDisapprovalCodeSequence "0068|62a0"
+#define GKDCM_OverallTemplateSpatialTolerance      "0068|62a5"
+#define GKDCM_HPGLDocumentSequence                 "0068|62c0"
+#define GKDCM_HPGLDocumentID                       "0068|62d0"
+#define GKDCM_HPGLDocumentLabel                    "0068|62d5"
+#define GKDCM_ViewOrientationCodeSequence          "0068|62e0"
+#define GKDCM_ViewOrientationModifier              "0068|62f0"
+#define GKDCM_HPGLDocumentScaling                  "0068|62f2"
+#define GKDCM_HPGLDocument                         "0068|6300"
+#define GKDCM_HPGLContourPenNumber                 "0068|6310"
+#define GKDCM_HPGLPenSequence                      "0068|6320"
+#define GKDCM_HPGLPenNumber                        "0068|6330"
+#define GKDCM_HPGLPenLabel                         "0068|6340"
+#define GKDCM_HPGLPenDescription                   "0068|6345"
+#define GKDCM_RecommendedRotationPoint             "0068|6346"
+#define GKDCM_BoundingRectangle                    "0068|6347"
+#define GKDCM_ImplantTemplate3DModelSurfaceNumber  "0068|6350"
+#define GKDCM_SurfaceModelDescriptionSequence      "0068|6360"
+#define GKDCM_SurfaceModelLabel                    "0068|6380"
+#define GKDCM_SurfaceModelScalingFactor            "0068|6390"
+#define GKDCM_MaterialsCodeSequence                "0068|63a0"
+#define GKDCM_CoatingMaterialsCodeSequence         "0068|63a4"
+#define GKDCM_ImplantTypeCodeSequence              "0068|63a8"
+#define GKDCM_FixationMethodCodeSequence           "0068|63ac"
+#define GKDCM_MatingFeatureSetsSequence            "0068|63b0"
+#define GKDCM_MatingFeatureSetID                   "0068|63c0"
+#define GKDCM_MatingFeatureSetLabel                "0068|63d0"
+#define GKDCM_MatingFeatureSequence                "0068|63e0"
+#define GKDCM_MatingFeatureID                      "0068|63f0"
+#define GKDCM_MatingFeatureDegreeOfFreedomSequence "0068|6400"
+#define GKDCM_DegreeOfFreedomID                    "0068|6410"
+#define GKDCM_DegreeOfFreedomType                  "0068|6420"
+#define GKDCM_TwoDMatingFeatureCoordinatesSequence "0068|6430"
+#define GKDCM_ReferencedHPGLDocumentID             "0068|6440"
+#define GKDCM_TwoDMatingPoint                      "0068|6450"
+#define GKDCM_TwoDMatingAxes                       "0068|6460"
+#define GKDCM_TwoDDegreeOfFreedomSequence          "0068|6470"
+#define GKDCM_ThreeDDegreeOfFreedomAxis            "0068|6490"
+#define GKDCM_RangeOfFreedom                       "0068|64a0"
+#define GKDCM_ThreeDMatingPoint                    "0068|64c0"
+#define GKDCM_ThreeDMatingAxes                     "0068|64d0"
+#define GKDCM_TwoDDegreeOfFreedomAxis              "0068|64f0"
+#define GKDCM_PlanningLandmarkPointSequence        "0068|6500"
+#define GKDCM_PlanningLandmarkLineSequence         "0068|6510"
+#define GKDCM_PlanningLandmarkPlaneSequence        "0068|6520"
+#define GKDCM_PlanningLandmarkID                   "0068|6530"
+#define GKDCM_PlanningLandmarkDescription          "0068|6540"
+#define GKDCM_PlanningLandmarkIdentificationCodeSequence "0068|6545"
+#define GKDCM_TwoDPointCoordinatesSequence         "0068|6550"
+#define GKDCM_TwoDPointCoordinates                 "0068|6560"
+#define GKDCM_ThreeDPointCoordinates               "0068|6590"
+#define GKDCM_TwoDLineCoordinatesSequence          "0068|65a0"
+#define GKDCM_TwoDLineCoordinates                  "0068|65b0"
+#define GKDCM_ThreeDLineCoordinates                "0068|65d0"
+#define GKDCM_TwoDPlaneCoordinatesSequence         "0068|65e0"
+#define GKDCM_TwoDPlaneIntersection                "0068|65f0"
+#define GKDCM_ThreeDPlaneOrigin                    "0068|6610"
+#define GKDCM_ThreeDPlaneNormal                    "0068|6620"
+#define GKDCM_GraphicAnnotationSequence            "0070|0001"
+#define GKDCM_GraphicLayer                         "0070|0002"
+#define GKDCM_BoundingBoxAnnotationUnits           "0070|0003"
+#define GKDCM_AnchorPointAnnotationUnits           "0070|0004"
+#define GKDCM_GraphicAnnotationUnits               "0070|0005"
+#define GKDCM_UnformattedTextValue                 "0070|0006"
+#define GKDCM_TextObjectSequence                   "0070|0008"
+#define GKDCM_GraphicObjectSequence                "0070|0009"
+#define GKDCM_BoundingBoxTopLeftHandCorner         "0070|0010"
+#define GKDCM_BoundingBoxBottomRightHandCorner     "0070|0011"
+#define GKDCM_BoundingBoxTextHorizontalJustification "0070|0012"
+#define GKDCM_AnchorPoint                          "0070|0014"
+#define GKDCM_AnchorPointVisibility                "0070|0015"
+#define GKDCM_GraphicDimensions                    "0070|0020"
+#define GKDCM_NumberOfGraphicPoints                "0070|0021"
+#define GKDCM_GraphicData                          "0070|0022"
+#define GKDCM_GraphicType                          "0070|0023"
+#define GKDCM_GraphicFilled                        "0070|0024"
+#define GKDCM_RETIRED_ImageRotationRetired         "0070|0040"
+#define GKDCM_ImageHorizontalFlip                  "0070|0041"
+#define GKDCM_ImageRotation                        "0070|0042"
+#define GKDCM_RETIRED_DisplayedAreaTopLeftHandCornerTrial "0070|0050"
+#define GKDCM_RETIRED_DisplayedAreaBottomRightHandCornerTrial "0070|0051"
+#define GKDCM_DisplayedAreaTopLeftHandCorner       "0070|0052"
+#define GKDCM_DisplayedAreaBottomRightHandCorner   "0070|0053"
+#define GKDCM_DisplayedAreaSelectionSequence       "0070|005a"
+#define GKDCM_GraphicLayerSequence                 "0070|0060"
+#define GKDCM_GraphicLayerOrder                    "0070|0062"
+#define GKDCM_GraphicLayerRecommendedDisplayGrayscaleValue "0070|0066"
+#define GKDCM_RETIRED_GraphicLayerRecommendedDisplayRGBValue "0070|0067"
+#define GKDCM_GraphicLayerDescription              "0070|0068"
+#define GKDCM_ContentLabel                         "0070|0080"
+#define GKDCM_ContentDescription                   "0070|0081"
+#define GKDCM_PresentationCreationDate             "0070|0082"
+#define GKDCM_PresentationCreationTime             "0070|0083"
+#define GKDCM_ContentCreatorName                   "0070|0084"
+#define GKDCM_ContentCreatorIdentificationCodeSequence "0070|0086"
+#define GKDCM_AlternateContentDescriptionSequence  "0070|0087"
+#define GKDCM_PresentationSizeMode                 "0070|0100"
+#define GKDCM_PresentationPixelSpacing             "0070|0101"
+#define GKDCM_PresentationPixelAspectRatio         "0070|0102"
+#define GKDCM_PresentationPixelMagnificationRatio  "0070|0103"
+#define GKDCM_GraphicGroupLabel                    "0070|0207"
+#define GKDCM_GraphicGroupDescription              "0070|0208"
+#define GKDCM_CompoundGraphicSequence              "0070|0209"
+#define GKDCM_CompoundGraphicInstanceID            "0070|0226"
+#define GKDCM_FontName                             "0070|0227"
+#define GKDCM_FontNameType                         "0070|0228"
+#define GKDCM_CSSFontName                          "0070|0229"
+#define GKDCM_RotationAngle                        "0070|0230"
+#define GKDCM_TextStyleSequence                    "0070|0231"
+#define GKDCM_LineStyleSequence                    "0070|0232"
+#define GKDCM_FillStyleSequence                    "0070|0233"
+#define GKDCM_GraphicGroupSequence                 "0070|0234"
+#define GKDCM_TextColorCIELabValue                 "0070|0241"
+#define GKDCM_HorizontalAlignment                  "0070|0242"
+#define GKDCM_VerticalAlignment                    "0070|0243"
+#define GKDCM_ShadowStyle                          "0070|0244"
+#define GKDCM_ShadowOffsetX                        "0070|0245"
+#define GKDCM_ShadowOffsetY                        "0070|0246"
+#define GKDCM_ShadowColorCIELabValue               "0070|0247"
+#define GKDCM_Underlined                           "0070|0248"
+#define GKDCM_Bold                                 "0070|0249"
+#define GKDCM_Italic                               "0070|0250"
+#define GKDCM_PatternOnColorCIELabValue            "0070|0251"
+#define GKDCM_PatternOffColorCIELabValue           "0070|0252"
+#define GKDCM_LineThickness                        "0070|0253"
+#define GKDCM_LineDashingStyle                     "0070|0254"
+#define GKDCM_LinePattern                          "0070|0255"
+#define GKDCM_FillPattern                          "0070|0256"
+#define GKDCM_FillMode                             "0070|0257"
+#define GKDCM_ShadowOpacity                        "0070|0258"
+#define GKDCM_GapLength                            "0070|0261"
+#define GKDCM_DiameterOfVisibility                 "0070|0262"
+#define GKDCM_RotationPoint                        "0070|0273"
+#define GKDCM_TickAlignment                        "0070|0274"
+#define GKDCM_ShowTickLabel                        "0070|0278"
+#define GKDCM_TickLabelAlignment                   "0070|0279"
+#define GKDCM_CompoundGraphicUnits                 "0070|0282"
+#define GKDCM_PatternOnOpacity                     "0070|0284"
+#define GKDCM_PatternOffOpacity                    "0070|0285"
+#define GKDCM_MajorTicksSequence                   "0070|0287"
+#define GKDCM_TickPosition                         "0070|0288"
+#define GKDCM_TickLabel                            "0070|0289"
+#define GKDCM_CompoundGraphicType                  "0070|0294"
+#define GKDCM_GraphicGroupID                       "0070|0295"
+#define GKDCM_ShapeType                            "0070|0306"
+#define GKDCM_RegistrationSequence                 "0070|0308"
+#define GKDCM_MatrixRegistrationSequence           "0070|0309"
+#define GKDCM_MatrixSequence                       "0070|030a"
+#define GKDCM_FrameOfReferenceTransformationMatrixType "0070|030c"
+#define GKDCM_RegistrationTypeCodeSequence         "0070|030d"
+#define GKDCM_FiducialDescription                  "0070|030f"
+#define GKDCM_FiducialIdentifier                   "0070|0310"
+#define GKDCM_FiducialIdentifierCodeSequence       "0070|0311"
+#define GKDCM_ContourUncertaintyRadius             "0070|0312"
+#define GKDCM_UsedFiducialsSequence                "0070|0314"
+#define GKDCM_GraphicCoordinatesDataSequence       "0070|0318"
+#define GKDCM_FiducialUID                          "0070|031a"
+#define GKDCM_FiducialSetSequence                  "0070|031c"
+#define GKDCM_FiducialSequence                     "0070|031e"
+#define GKDCM_GraphicLayerRecommendedDisplayCIELabValue "0070|0401"
+#define GKDCM_BlendingSequence                     "0070|0402"
+#define GKDCM_RelativeOpacity                      "0070|0403"
+#define GKDCM_ReferencedSpatialRegistrationSequence "0070|0404"
+#define GKDCM_BlendingPosition                     "0070|0405"
+#define GKDCM_HangingProtocolName                  "0072|0002"
+#define GKDCM_HangingProtocolDescription           "0072|0004"
+#define GKDCM_HangingProtocolLevel                 "0072|0006"
+#define GKDCM_HangingProtocolCreator               "0072|0008"
+#define GKDCM_HangingProtocolCreationDateTime      "0072|000a"
+#define GKDCM_HangingProtocolDefinitionSequence    "0072|000c"
+#define GKDCM_HangingProtocolUserIdentificationCodeSequence "0072|000e"
+#define GKDCM_HangingProtocolUserGroupName         "0072|0010"
+#define GKDCM_SourceHangingProtocolSequence        "0072|0012"
+#define GKDCM_NumberOfPriorsReferenced             "0072|0014"
+#define GKDCM_ImageSetsSequence                    "0072|0020"
+#define GKDCM_ImageSetSelectorSequence             "0072|0022"
+#define GKDCM_ImageSetSelectorUsageFlag            "0072|0024"
+#define GKDCM_SelectorAttribute                    "0072|0026"
+#define GKDCM_SelectorValueNumber                  "0072|0028"
+#define GKDCM_TimeBasedImageSetsSequence           "0072|0030"
+#define GKDCM_ImageSetNumber                       "0072|0032"
+#define GKDCM_ImageSetSelectorCategory             "0072|0034"
+#define GKDCM_RelativeTime                         "0072|0038"
+#define GKDCM_RelativeTimeUnits                    "0072|003a"
+#define GKDCM_AbstractPriorValue                   "0072|003c"
+#define GKDCM_AbstractPriorCodeSequence            "0072|003e"
+#define GKDCM_ImageSetLabel                        "0072|0040"
+#define GKDCM_SelectorAttributeVR                  "0072|0050"
+#define GKDCM_SelectorSequencePointer              "0072|0052"
+#define GKDCM_SelectorSequencePointerPrivateCreator "0072|0054"
+#define GKDCM_SelectorAttributePrivateCreator      "0072|0056"
+#define GKDCM_SelectorATValue                      "0072|0060"
+#define GKDCM_SelectorCSValue                      "0072|0062"
+#define GKDCM_SelectorISValue                      "0072|0064"
+#define GKDCM_SelectorLOValue                      "0072|0066"
+#define GKDCM_SelectorLTValue                      "0072|0068"
+#define GKDCM_SelectorPNValue                      "0072|006a"
+#define GKDCM_SelectorSHValue                      "0072|006c"
+#define GKDCM_SelectorSTValue                      "0072|006e"
+#define GKDCM_SelectorUTValue                      "0072|0070"
+#define GKDCM_SelectorDSValue                      "0072|0072"
+#define GKDCM_SelectorFDValue                      "0072|0074"
+#define GKDCM_SelectorFLValue                      "0072|0076"
+#define GKDCM_SelectorULValue                      "0072|0078"
+#define GKDCM_SelectorUSValue                      "0072|007a"
+#define GKDCM_SelectorSLValue                      "0072|007c"
+#define GKDCM_SelectorSSValue                      "0072|007e"
+#define GKDCM_SelectorCodeSequenceValue            "0072|0080"
+#define GKDCM_NumberOfScreens                      "0072|0100"
+#define GKDCM_NominalScreenDefinitionSequence      "0072|0102"
+#define GKDCM_NumberOfVerticalPixels               "0072|0104"
+#define GKDCM_NumberOfHorizontalPixels             "0072|0106"
+#define GKDCM_DisplayEnvironmentSpatialPosition    "0072|0108"
+#define GKDCM_ScreenMinimumGrayscaleBitDepth       "0072|010a"
+#define GKDCM_ScreenMinimumColorBitDepth           "0072|010c"
+#define GKDCM_ApplicationMaximumRepaintTime        "0072|010e"
+#define GKDCM_DisplaySetsSequence                  "0072|0200"
+#define GKDCM_DisplaySetNumber                     "0072|0202"
+#define GKDCM_DisplaySetLabel                      "0072|0203"
+#define GKDCM_DisplaySetPresentationGroup          "0072|0204"
+#define GKDCM_DisplaySetPresentationGroupDescription "0072|0206"
+#define GKDCM_PartialDataDisplayHandling           "0072|0208"
+#define GKDCM_SynchronizedScrollingSequence        "0072|0210"
+#define GKDCM_DisplaySetScrollingGroup             "0072|0212"
+#define GKDCM_NavigationIndicatorSequence          "0072|0214"
+#define GKDCM_NavigationDisplaySet                 "0072|0216"
+#define GKDCM_ReferenceDisplaySets                 "0072|0218"
+#define GKDCM_ImageBoxesSequence                   "0072|0300"
+#define GKDCM_ImageBoxNumber                       "0072|0302"
+#define GKDCM_ImageBoxLayoutType                   "0072|0304"
+#define GKDCM_ImageBoxTileHorizontalDimension      "0072|0306"
+#define GKDCM_ImageBoxTileVerticalDimension        "0072|0308"
+#define GKDCM_ImageBoxScrollDirection              "0072|0310"
+#define GKDCM_ImageBoxSmallScrollType              "0072|0312"
+#define GKDCM_ImageBoxSmallScrollAmount            "0072|0314"
+#define GKDCM_ImageBoxLargeScrollType              "0072|0316"
+#define GKDCM_ImageBoxLargeScrollAmount            "0072|0318"
+#define GKDCM_ImageBoxOverlapPriority              "0072|0320"
+#define GKDCM_CineRelativeToRealTime               "0072|0330"
+#define GKDCM_FilterOperationsSequence             "0072|0400"
+#define GKDCM_FilterByCategory                     "0072|0402"
+#define GKDCM_FilterByAttributePresence            "0072|0404"
+#define GKDCM_FilterByOperator                     "0072|0406"
+#define GKDCM_StructuredDisplayBackgroundCIELabValue "0072|0420"
+#define GKDCM_EmptyImageBoxCIELabValue             "0072|0421"
+#define GKDCM_StructuredDisplayImageBoxSequence    "0072|0422"
+#define GKDCM_StructuredDisplayTextBoxSequence     "0072|0424"
+#define GKDCM_ReferencedFirstFrameSequence         "0072|0427"
+#define GKDCM_ImageBoxSynchronizationSequence      "0072|0430"
+#define GKDCM_SynchronizedImageBoxList             "0072|0432"
+#define GKDCM_TypeOfSynchronization                "0072|0434"
+#define GKDCM_BlendingOperationType                "0072|0500"
+#define GKDCM_ReformattingOperationType            "0072|0510"
+#define GKDCM_ReformattingThickness                "0072|0512"
+#define GKDCM_ReformattingInterval                 "0072|0514"
+#define GKDCM_ReformattingOperationInitialViewDirection "0072|0516"
+#define GKDCM_ThreeDRenderingType                  "0072|0520"
+#define GKDCM_SortingOperationsSequence            "0072|0600"
+#define GKDCM_SortByCategory                       "0072|0602"
+#define GKDCM_SortingDirection                     "0072|0604"
+#define GKDCM_DisplaySetPatientOrientation         "0072|0700"
+#define GKDCM_VOIType                              "0072|0702"
+#define GKDCM_PseudoColorType                      "0072|0704"
+#define GKDCM_ShowGrayscaleInverted                "0072|0706"
+#define GKDCM_ShowImageTrueSizeFlag                "0072|0710"
+#define GKDCM_ShowGraphicAnnotationFlag            "0072|0712"
+#define GKDCM_ShowPatientDemographicsFlag          "0072|0714"
+#define GKDCM_ShowAcquisitionTechniquesFlag        "0072|0716"
+#define GKDCM_DisplaySetHorizontalJustification    "0072|0717"
+#define GKDCM_DisplaySetVerticalJustification      "0072|0718"
+#define GKDCM_UnifiedProcedureStepState            "0074|1000"
+#define GKDCM_UnifiedProcedureStepProgressInformationSequence "0074|1002"
+#define GKDCM_UnifiedProcedureStepProgress         "0074|1004"
+#define GKDCM_UnifiedProcedureStepProgressDescription "0074|1006"
+#define GKDCM_UnifiedProcedureStepCommunicationsURISequence "0074|1008"
+#define GKDCM_ContactURI                           "0074|100a"
+#define GKDCM_ContactDisplayName                   "0074|100c"
+#define GKDCM_UnifiedProcedureStepDiscontinuationReasonCodeSequence "0074|100e"
+#define GKDCM_BeamTaskSequence                     "0074|1020"
+#define GKDCM_BeamTaskType                         "0074|1022"
+#define GKDCM_BeamOrderIndex                       "0074|1024"
+#define GKDCM_DeliveryVerificationImageSequence    "0074|1030"
+#define GKDCM_VerificationImageTiming              "0074|1032"
+#define GKDCM_DoubleExposureFlag                   "0074|1034"
+#define GKDCM_DoubleExposureOrdering               "0074|1036"
+#define GKDCM_DoubleExposureMeterset               "0074|1038"
+#define GKDCM_DoubleExposureFieldDelta             "0074|103a"
+#define GKDCM_RelatedReferenceRTImageSequence      "0074|1040"
+#define GKDCM_GeneralMachineVerificationSequence   "0074|1042"
+#define GKDCM_ConventionalMachineVerificationSequence "0074|1044"
+#define GKDCM_IonMachineVerificationSequence       "0074|1046"
+#define GKDCM_FailedAttributesSequence             "0074|1048"
+#define GKDCM_OverriddenAttributesSequence         "0074|104a"
+#define GKDCM_ConventionalControlPointVerificationSequence "0074|104c"
+#define GKDCM_IonControlPointVerificationSequence  "0074|104e"
+#define GKDCM_AttributeOccurrenceSequence          "0074|1050"
+#define GKDCM_AttributeOccurrencePointer           "0074|1052"
+#define GKDCM_AttributeItemSelector                "0074|1054"
+#define GKDCM_AttributeOccurrencePrivateCreator    "0074|1056"
+#define GKDCM_ScheduledProcedureStepPriority       "0074|1200"
+#define GKDCM_WorklistLabel                        "0074|1202"
+#define GKDCM_ProcedureStepLabel                   "0074|1204"
+#define GKDCM_ScheduledProcessingParametersSequence "0074|1210"
+#define GKDCM_PerformedProcessingParametersSequence "0074|1212"
+#define GKDCM_UnifiedProcedureStepPerformedProcedureSequence "0074|1216"
+#define GKDCM_RelatedProcedureStepSequence         "0074|1220"
+#define GKDCM_ProcedureStepRelationshipType        "0074|1222"
+#define GKDCM_DeletionLock                         "0074|1230"
+#define GKDCM_ReceivingAE                          "0074|1234"
+#define GKDCM_RequestingAE                         "0074|1236"
+#define GKDCM_ReasonForCancellation                "0074|1238"
+#define GKDCM_SCPStatus                            "0074|1242"
+#define GKDCM_SubscriptionListStatus               "0074|1244"
+#define GKDCM_UnifiedProcedureStepListStatus       "0074|1246"
+#define GKDCM_ImplantAssemblyTemplateName          "0076|0001"
+#define GKDCM_ImplantAssemblyTemplateIssuer        "0076|0003"
+#define GKDCM_ImplantAssemblyTemplateVersion       "0076|0006"
+#define GKDCM_ReplacedImplantAssemblyTemplateSequence "0076|0008"
+#define GKDCM_ImplantAssemblyTemplateType          "0076|000a"
+#define GKDCM_OriginalImplantAssemblyTemplateSequence "0076|000c"
+#define GKDCM_DerivationImplantAssemblyTemplateSequence "0076|000e"
+#define GKDCM_ImplantAssemblyTemplateTargetAnatomySequence "0076|0010"
+#define GKDCM_ProcedureTypeCodeSequence            "0076|0020"
+#define GKDCM_SurgicalTechnique                    "0076|0030"
+#define GKDCM_ComponentTypesSequence               "0076|0032"
+#define GKDCM_ComponentTypeCodeSequence            "0076|0034"
+#define GKDCM_ExclusiveComponentType               "0076|0036"
+#define GKDCM_MandatoryComponentType               "0076|0038"
+#define GKDCM_ComponentSequence                    "0076|0040"
+#define GKDCM_ComponentID                          "0076|0055"
+#define GKDCM_ComponentAssemblySequence            "0076|0060"
+#define GKDCM_Component1ReferencedID               "0076|0070"
+#define GKDCM_Component1ReferencedMatingFeatureSetID "0076|0080"
+#define GKDCM_Component1ReferencedMatingFeatureID  "0076|0090"
+#define GKDCM_Component2ReferencedID               "0076|00a0"
+#define GKDCM_Component2ReferencedMatingFeatureSetID "0076|00b0"
+#define GKDCM_Component2ReferencedMatingFeatureID  "0076|00c0"
+#define GKDCM_ImplantTemplateGroupName             "0078|0000"
+#define GKDCM_ImplantTemplateGroupDescription      "0078|0010"
+#define GKDCM_ImplantTemplateGroupIssuer           "0078|0020"
+#define GKDCM_ImplantTemplateGroupVersion          "0078|0024"
+#define GKDCM_ReplacedImplantTemplateGroupSequence "0078|0026"
+#define GKDCM_ImplantTemplateGroupTargetAnatomySequence "0078|0028"
+#define GKDCM_ImplantTemplateGroupMembersSequence  "0078|002a"
+#define GKDCM_ImplantTemplateGroupMemberID         "0078|002e"
+#define GKDCM_ThreeDImplantTemplateGroupMemberMatchingPoint "0078|0050"
+#define GKDCM_ThreeDImplantTemplateGroupMemberMatchingAxes "0078|0060"
+#define GKDCM_ImplantTemplateGroupMemberMatching2DCoordinatesSequence "0078|0070"
+#define GKDCM_TwoDImplantTemplateGroupMemberMatchingPoint "0078|0090"
+#define GKDCM_TwoDImplantTemplateGroupMemberMatchingAxes "0078|00a0"
+#define GKDCM_ImplantTemplateGroupVariationDimensionSequence "0078|00b0"
+#define GKDCM_ImplantTemplateGroupVariationDimensionName "0078|00b2"
+#define GKDCM_ImplantTemplateGroupVariationDimensionRankSequence "0078|00b4"
+#define GKDCM_ReferencedImplantTemplateGroupMemberID "0078|00b6"
+#define GKDCM_ImplantTemplateGroupVariationDimensionRank "0078|00b8"
+#define GKDCM_StorageMediaFileSetID                "0088|0130"
+#define GKDCM_StorageMediaFileSetUID               "0088|0140"
+#define GKDCM_IconImageSequence                    "0088|0200"
+#define GKDCM_RETIRED_TopicTitle                   "0088|0904"
+#define GKDCM_RETIRED_TopicSubject                 "0088|0906"
+#define GKDCM_RETIRED_TopicAuthor                  "0088|0910"
+#define GKDCM_RETIRED_TopicKeywords                "0088|0912"
+#define GKDCM_SOPInstanceStatus                    "0100|0410"
+#define GKDCM_SOPAuthorizationDateTime             "0100|0420"
+#define GKDCM_SOPAuthorizationComment              "0100|0424"
+#define GKDCM_AuthorizationEquipmentCertificationNumber "0100|0426"
+#define GKDCM_MACIDNumber                          "0400|0005"
+#define GKDCM_MACCalculationTransferSyntaxUID      "0400|0010"
+#define GKDCM_MACAlgorithm                         "0400|0015"
+#define GKDCM_DataElementsSigned                   "0400|0020"
+#define GKDCM_DigitalSignatureUID                  "0400|0100"
+#define GKDCM_DigitalSignatureDateTime             "0400|0105"
+#define GKDCM_CertificateType                      "0400|0110"
+#define GKDCM_CertificateOfSigner                  "0400|0115"
+#define GKDCM_Signature                            "0400|0120"
+#define GKDCM_CertifiedTimestampType               "0400|0305"
+#define GKDCM_CertifiedTimestamp                   "0400|0310"
+#define GKDCM_DigitalSignaturePurposeCodeSequence  "0400|0401"
+#define GKDCM_ReferencedDigitalSignatureSequence   "0400|0402"
+#define GKDCM_ReferencedSOPInstanceMACSequence     "0400|0403"
+#define GKDCM_MAC                                  "0400|0404"
+#define GKDCM_EncryptedAttributesSequence          "0400|0500"
+#define GKDCM_EncryptedContentTransferSyntaxUID    "0400|0510"
+#define GKDCM_EncryptedContent                     "0400|0520"
+#define GKDCM_ModifiedAttributesSequence           "0400|0550"
+#define GKDCM_OriginalAttributesSequence           "0400|0561"
+#define GKDCM_AttributeModificationDateTime        "0400|0562"
+#define GKDCM_ModifyingSystem                      "0400|0563"
+#define GKDCM_SourceOfPreviousValues               "0400|0564"
+#define GKDCM_ReasonForTheAttributeModification    "0400|0565"
+#define GKDCM_ACR_NEMA_2C_CodeTableGroupLength     "1000|0000"
+#define GKDCM_ACR_NEMA_2C_EscapeTriplet            "1000|0010"
+#define GKDCM_ACR_NEMA_2C_RunLengthTriplet         "1000|0011"
+#define GKDCM_ACR_NEMA_2C_HuffmanTableSize         "1000|0012"
+#define GKDCM_ACR_NEMA_2C_HuffmanTableTriplet      "1000|0013"
+#define GKDCM_ACR_NEMA_2C_ShiftTableSize           "1000|0014"
+#define GKDCM_ACR_NEMA_2C_ShiftTableTriplet        "1000|0015"
+#define GKDCM_ACR_NEMA_2C_ZonalMapGroupLength      "1010|0000"
+#define GKDCM_ACR_NEMA_2C_ZonalMap                 "1010|0004"
+#define GKDCM_NumberOfCopies                       "2000|0010"
+#define GKDCM_PrinterConfigurationSequence         "2000|001e"
+#define GKDCM_PrintPriority                        "2000|0020"
+#define GKDCM_MediumType                           "2000|0030"
+#define GKDCM_FilmDestination                      "2000|0040"
+#define GKDCM_FilmSessionLabel                     "2000|0050"
+#define GKDCM_MemoryAllocation                     "2000|0060"
+#define GKDCM_MaximumMemoryAllocation              "2000|0061"
+#define GKDCM_RETIRED_ColorImagePrintingFlag       "2000|0062"
+#define GKDCM_RETIRED_CollationFlag                "2000|0063"
+#define GKDCM_RETIRED_AnnotationFlag               "2000|0065"
+#define GKDCM_RETIRED_ImageOverlayFlag             "2000|0067"
+#define GKDCM_RETIRED_PresentationLUTFlag          "2000|0069"
+#define GKDCM_RETIRED_ImageBoxPresentationLUTFlag  "2000|006a"
+#define GKDCM_MemoryBitDepth                       "2000|00a0"
+#define GKDCM_PrintingBitDepth                     "2000|00a1"
+#define GKDCM_MediaInstalledSequence               "2000|00a2"
+#define GKDCM_OtherMediaAvailableSequence          "2000|00a4"
+#define GKDCM_SupportedImageDisplayFormatsSequence "2000|00a8"
+#define GKDCM_ReferencedFilmBoxSequence            "2000|0500"
+#define GKDCM_RETIRED_ReferencedStoredPrintSequence "2000|0510"
+#define GKDCM_ImageDisplayFormat                   "2010|0010"
+#define GKDCM_AnnotationDisplayFormatID            "2010|0030"
+#define GKDCM_FilmOrientation                      "2010|0040"
+#define GKDCM_FilmSizeID                           "2010|0050"
+#define GKDCM_PrinterResolutionID                  "2010|0052"
+#define GKDCM_DefaultPrinterResolutionID           "2010|0054"
+#define GKDCM_MagnificationType                    "2010|0060"
+#define GKDCM_SmoothingType                        "2010|0080"
+#define GKDCM_DefaultMagnificationType             "2010|00a6"
+#define GKDCM_OtherMagnificationTypesAvailable     "2010|00a7"
+#define GKDCM_DefaultSmoothingType                 "2010|00a8"
+#define GKDCM_OtherSmoothingTypesAvailable         "2010|00a9"
+#define GKDCM_BorderDensity                        "2010|0100"
+#define GKDCM_EmptyImageDensity                    "2010|0110"
+#define GKDCM_MinDensity                           "2010|0120"
+#define GKDCM_MaxDensity                           "2010|0130"
+#define GKDCM_Trim                                 "2010|0140"
+#define GKDCM_ConfigurationInformation             "2010|0150"
+#define GKDCM_ConfigurationInformationDescription  "2010|0152"
+#define GKDCM_MaximumCollatedFilms                 "2010|0154"
+#define GKDCM_Illumination                         "2010|015e"
+#define GKDCM_ReflectedAmbientLight                "2010|0160"
+#define GKDCM_PrinterPixelSpacing                  "2010|0376"
+#define GKDCM_ReferencedFilmSessionSequence        "2010|0500"
+#define GKDCM_ReferencedImageBoxSequence           "2010|0510"
+#define GKDCM_ReferencedBasicAnnotationBoxSequence "2010|0520"
+#define GKDCM_ImageBoxPosition                     "2020|0010"
+#define GKDCM_Polarity                             "2020|0020"
+#define GKDCM_RequestedImageSize                   "2020|0030"
+#define GKDCM_RequestedDecimateCropBehavior        "2020|0040"
+#define GKDCM_RequestedResolutionID                "2020|0050"
+#define GKDCM_RequestedImageSizeFlag               "2020|00a0"
+#define GKDCM_DecimateCropResult                   "2020|00a2"
+#define GKDCM_BasicGrayscaleImageSequence          "2020|0110"
+#define GKDCM_BasicColorImageSequence              "2020|0111"
+#define GKDCM_RETIRED_ReferencedImageOverlayBoxSequence "2020|0130"
+#define GKDCM_RETIRED_ReferencedVOILUTBoxSequence  "2020|0140"
+#define GKDCM_AnnotationPosition                   "2030|0010"
+#define GKDCM_TextString                           "2030|0020"
+#define GKDCM_RETIRED_ReferencedOverlayPlaneSequence "2040|0010"
+#define GKDCM_RETIRED_ReferencedOverlayPlaneGroups "2040|0011"
+#define GKDCM_RETIRED_OverlayPixelDataSequence     "2040|0020"
+#define GKDCM_RETIRED_OverlayMagnificationType     "2040|0060"
+#define GKDCM_RETIRED_OverlaySmoothingType         "2040|0070"
+#define GKDCM_RETIRED_OverlayOrImageMagnification  "2040|0072"
+#define GKDCM_RETIRED_MagnifyToNumberOfColumns     "2040|0074"
+#define GKDCM_RETIRED_OverlayForegroundDensity     "2040|0080"
+#define GKDCM_RETIRED_OverlayBackgroundDensity     "2040|0082"
+#define GKDCM_RETIRED_OverlayMode                  "2040|0090"
+#define GKDCM_RETIRED_ThresholdDensity             "2040|0100"
+#define GKDCM_RETIRED_ReferencedImageBoxSequenceRetired "2040|0500"
+#define GKDCM_PresentationLUTSequence              "2050|0010"
+#define GKDCM_PresentationLUTShape                 "2050|0020"
+#define GKDCM_ReferencedPresentationLUTSequence    "2050|0500"
+#define GKDCM_RETIRED_PrintJobID                   "2100|0010"
+#define GKDCM_ExecutionStatus                      "2100|0020"
+#define GKDCM_ExecutionStatusInfo                  "2100|0030"
+#define GKDCM_CreationDate                         "2100|0040"
+#define GKDCM_CreationTime                         "2100|0050"
+#define GKDCM_Originator                           "2100|0070"
+#define GKDCM_RETIRED_DestinationAE                "2100|0140"
+#define GKDCM_OwnerID                              "2100|0160"
+#define GKDCM_NumberOfFilms                        "2100|0170"
+#define GKDCM_RETIRED_ReferencedPrintJobSequencePullStoredPrint "2100|0500"
+#define GKDCM_PrinterStatus                        "2110|0010"
+#define GKDCM_PrinterStatusInfo                    "2110|0020"
+#define GKDCM_PrinterName                          "2110|0030"
+#define GKDCM_RETIRED_PrintQueueID                 "2110|0099"
+#define GKDCM_RETIRED_QueueStatus                  "2120|0010"
+#define GKDCM_RETIRED_PrintJobDescriptionSequence  "2120|0050"
+#define GKDCM_RETIRED_ReferencedPrintJobSequence   "2120|0070"
+#define GKDCM_RETIRED_PrintManagementCapabilitiesSequence "2130|0010"
+#define GKDCM_RETIRED_PrinterCharacteristicsSequence "2130|0015"
+#define GKDCM_RETIRED_FilmBoxContentSequence       "2130|0030"
+#define GKDCM_RETIRED_ImageBoxContentSequence      "2130|0040"
+#define GKDCM_RETIRED_AnnotationContentSequence    "2130|0050"
+#define GKDCM_RETIRED_ImageOverlayBoxContentSequence "2130|0060"
+#define GKDCM_RETIRED_PresentationLUTContentSequence "2130|0080"
+#define GKDCM_RETIRED_ProposedStudySequence        "2130|00a0"
+#define GKDCM_RETIRED_OriginalImageSequence        "2130|00c0"
+#define GKDCM_LabelUsingInformationExtractedFromInstances "2200|0001"
+#define GKDCM_LabelText                            "2200|0002"
+#define GKDCM_LabelStyleSelection                  "2200|0003"
+#define GKDCM_MediaDisposition                     "2200|0004"
+#define GKDCM_BarcodeValue                         "2200|0005"
+#define GKDCM_BarcodeSymbology                     "2200|0006"
+#define GKDCM_AllowMediaSplitting                  "2200|0007"
+#define GKDCM_IncludeNonDICOMObjects               "2200|0008"
+#define GKDCM_IncludeDisplayApplication            "2200|0009"
+#define GKDCM_PreserveCompositeInstancesAfterMediaCreation "2200|000a"
+#define GKDCM_TotalNumberOfPiecesOfMediaCreated    "2200|000b"
+#define GKDCM_RequestedMediaApplicationProfile     "2200|000c"
+#define GKDCM_ReferencedStorageMediaSequence       "2200|000d"
+#define GKDCM_FailureAttributes                    "2200|000e"
+#define GKDCM_AllowLossyCompression                "2200|000f"
+#define GKDCM_RequestPriority                      "2200|0020"
+#define GKDCM_RTImageLabel                         "3002|0002"
+#define GKDCM_RTImageName                          "3002|0003"
+#define GKDCM_RTImageDescription                   "3002|0004"
+#define GKDCM_ReportedValuesOrigin                 "3002|000a"
+#define GKDCM_RTImagePlane                         "3002|000c"
+#define GKDCM_XRayImageReceptorTranslation         "3002|000d"
+#define GKDCM_XRayImageReceptorAngle               "3002|000e"
+#define GKDCM_RTImageOrientation                   "3002|0010"
+#define GKDCM_ImagePlanePixelSpacing               "3002|0011"
+#define GKDCM_RTImagePosition                      "3002|0012"
+#define GKDCM_RadiationMachineName                 "3002|0020"
+#define GKDCM_RadiationMachineSAD                  "3002|0022"
+#define GKDCM_RadiationMachineSSD                  "3002|0024"
+#define GKDCM_RTImageSID                           "3002|0026"
+#define GKDCM_SourceToReferenceObjectDistance      "3002|0028"
+#define GKDCM_FractionNumber                       "3002|0029"
+#define GKDCM_ExposureSequence                     "3002|0030"
+#define GKDCM_MetersetExposure                     "3002|0032"
+#define GKDCM_DiaphragmPosition                    "3002|0034"
+#define GKDCM_FluenceMapSequence                   "3002|0040"
+#define GKDCM_FluenceDataSource                    "3002|0041"
+#define GKDCM_FluenceDataScale                     "3002|0042"
+#define GKDCM_PrimaryFluenceModeSequence           "3002|0050"
+#define GKDCM_FluenceMode                          "3002|0051"
+#define GKDCM_FluenceModeID                        "3002|0052"
+#define GKDCM_DVHType                              "3004|0001"
+#define GKDCM_DoseUnits                            "3004|0002"
+#define GKDCM_DoseType                             "3004|0004"
+#define GKDCM_DoseComment                          "3004|0006"
+#define GKDCM_NormalizationPoint                   "3004|0008"
+#define GKDCM_DoseSummationType                    "3004|000a"
+#define GKDCM_GridFrameOffsetVector                "3004|000c"
+#define GKDCM_DoseGridScaling                      "3004|000e"
+#define GKDCM_RTDoseROISequence                    "3004|0010"
+#define GKDCM_DoseValue                            "3004|0012"
+#define GKDCM_TissueHeterogeneityCorrection        "3004|0014"
+#define GKDCM_DVHNormalizationPoint                "3004|0040"
+#define GKDCM_DVHNormalizationDoseValue            "3004|0042"
+#define GKDCM_DVHSequence                          "3004|0050"
+#define GKDCM_DVHDoseScaling                       "3004|0052"
+#define GKDCM_DVHVolumeUnits                       "3004|0054"
+#define GKDCM_DVHNumberOfBins                      "3004|0056"
+#define GKDCM_DVHData                              "3004|0058"
+#define GKDCM_DVHReferencedROISequence             "3004|0060"
+#define GKDCM_DVHROIContributionType               "3004|0062"
+#define GKDCM_DVHMinimumDose                       "3004|0070"
+#define GKDCM_DVHMaximumDose                       "3004|0072"
+#define GKDCM_DVHMeanDose                          "3004|0074"
+#define GKDCM_StructureSetLabel                    "3006|0002"
+#define GKDCM_StructureSetName                     "3006|0004"
+#define GKDCM_StructureSetDescription              "3006|0006"
+#define GKDCM_StructureSetDate                     "3006|0008"
+#define GKDCM_StructureSetTime                     "3006|0009"
+#define GKDCM_ReferencedFrameOfReferenceSequence   "3006|0010"
+#define GKDCM_RTReferencedStudySequence            "3006|0012"
+#define GKDCM_RTReferencedSeriesSequence           "3006|0014"
+#define GKDCM_ContourImageSequence                 "3006|0016"
+#define GKDCM_StructureSetROISequence              "3006|0020"
+#define GKDCM_ROINumber                            "3006|0022"
+#define GKDCM_ReferencedFrameOfReferenceUID        "3006|0024"
+#define GKDCM_ROIName                              "3006|0026"
+#define GKDCM_ROIDescription                       "3006|0028"
+#define GKDCM_ROIDisplayColor                      "3006|002a"
+#define GKDCM_ROIVolume                            "3006|002c"
+#define GKDCM_RTRelatedROISequence                 "3006|0030"
+#define GKDCM_RTROIRelationship                    "3006|0033"
+#define GKDCM_ROIGenerationAlgorithm               "3006|0036"
+#define GKDCM_ROIGenerationDescription             "3006|0038"
+#define GKDCM_ROIContourSequence                   "3006|0039"
+#define GKDCM_ContourSequence                      "3006|0040"
+#define GKDCM_ContourGeometricType                 "3006|0042"
+#define GKDCM_ContourSlabThickness                 "3006|0044"
+#define GKDCM_ContourOffsetVector                  "3006|0045"
+#define GKDCM_NumberOfContourPoints                "3006|0046"
+#define GKDCM_ContourNumber                        "3006|0048"
+#define GKDCM_AttachedContours                     "3006|0049"
+#define GKDCM_ContourData                          "3006|0050"
+#define GKDCM_RTROIObservationsSequence            "3006|0080"
+#define GKDCM_ObservationNumber                    "3006|0082"
+#define GKDCM_ReferencedROINumber                  "3006|0084"
+#define GKDCM_ROIObservationLabel                  "3006|0085"
+#define GKDCM_RTROIIdentificationCodeSequence      "3006|0086"
+#define GKDCM_ROIObservationDescription            "3006|0088"
+#define GKDCM_RelatedRTROIObservationsSequence     "3006|00a0"
+#define GKDCM_RTROIInterpretedType                 "3006|00a4"
+#define GKDCM_ROIInterpreter                       "3006|00a6"
+#define GKDCM_ROIPhysicalPropertiesSequence        "3006|00b0"
+#define GKDCM_ROIPhysicalProperty                  "3006|00b2"
+#define GKDCM_ROIPhysicalPropertyValue             "3006|00b4"
+#define GKDCM_ROIElementalCompositionSequence      "3006|00b6"
+#define GKDCM_ROIElementalCompositionAtomicNumber  "3006|00b7"
+#define GKDCM_ROIElementalCompositionAtomicMassFraction "3006|00b8"
+#define GKDCM_FrameOfReferenceRelationshipSequence "3006|00c0"
+#define GKDCM_RelatedFrameOfReferenceUID           "3006|00c2"
+#define GKDCM_FrameOfReferenceTransformationType   "3006|00c4"
+#define GKDCM_FrameOfReferenceTransformationMatrix "3006|00c6"
+#define GKDCM_FrameOfReferenceTransformationComment "3006|00c8"
+#define GKDCM_MeasuredDoseReferenceSequence        "3008|0010"
+#define GKDCM_MeasuredDoseDescription              "3008|0012"
+#define GKDCM_MeasuredDoseType                     "3008|0014"
+#define GKDCM_MeasuredDoseValue                    "3008|0016"
+#define GKDCM_TreatmentSessionBeamSequence         "3008|0020"
+#define GKDCM_TreatmentSessionIonBeamSequence      "3008|0021"
+#define GKDCM_CurrentFractionNumber                "3008|0022"
+#define GKDCM_TreatmentControlPointDate            "3008|0024"
+#define GKDCM_TreatmentControlPointTime            "3008|0025"
+#define GKDCM_TreatmentTerminationStatus           "3008|002a"
+#define GKDCM_TreatmentTerminationCode             "3008|002b"
+#define GKDCM_TreatmentVerificationStatus          "3008|002c"
+#define GKDCM_ReferencedTreatmentRecordSequence    "3008|0030"
+#define GKDCM_SpecifiedPrimaryMeterset             "3008|0032"
+#define GKDCM_SpecifiedSecondaryMeterset           "3008|0033"
+#define GKDCM_DeliveredPrimaryMeterset             "3008|0036"
+#define GKDCM_DeliveredSecondaryMeterset           "3008|0037"
+#define GKDCM_SpecifiedTreatmentTime               "3008|003a"
+#define GKDCM_DeliveredTreatmentTime               "3008|003b"
+#define GKDCM_ControlPointDeliverySequence         "3008|0040"
+#define GKDCM_IonControlPointDeliverySequence      "3008|0041"
+#define GKDCM_SpecifiedMeterset                    "3008|0042"
+#define GKDCM_DeliveredMeterset                    "3008|0044"
+#define GKDCM_MetersetRateSet                      "3008|0045"
+#define GKDCM_MetersetRateDelivered                "3008|0046"
+#define GKDCM_ScanSpotMetersetsDelivered           "3008|0047"
+#define GKDCM_DoseRateDelivered                    "3008|0048"
+#define GKDCM_TreatmentSummaryCalculatedDoseReferenceSequence "3008|0050"
+#define GKDCM_CumulativeDoseToDoseReference        "3008|0052"
+#define GKDCM_FirstTreatmentDate                   "3008|0054"
+#define GKDCM_MostRecentTreatmentDate              "3008|0056"
+#define GKDCM_NumberOfFractionsDelivered           "3008|005a"
+#define GKDCM_OverrideSequence                     "3008|0060"
+#define GKDCM_ParameterSequencePointer             "3008|0061"
+#define GKDCM_OverrideParameterPointer             "3008|0062"
+#define GKDCM_ParameterItemIndex                   "3008|0063"
+#define GKDCM_MeasuredDoseReferenceNumber          "3008|0064"
+#define GKDCM_ParameterPointer                     "3008|0065"
+#define GKDCM_OverrideReason                       "3008|0066"
+#define GKDCM_CorrectedParameterSequence           "3008|0068"
+#define GKDCM_CorrectionValue                      "3008|006a"
+#define GKDCM_CalculatedDoseReferenceSequence      "3008|0070"
+#define GKDCM_CalculatedDoseReferenceNumber        "3008|0072"
+#define GKDCM_CalculatedDoseReferenceDescription   "3008|0074"
+#define GKDCM_CalculatedDoseReferenceDoseValue     "3008|0076"
+#define GKDCM_StartMeterset                        "3008|0078"
+#define GKDCM_EndMeterset                          "3008|007a"
+#define GKDCM_ReferencedMeasuredDoseReferenceSequence "3008|0080"
+#define GKDCM_ReferencedMeasuredDoseReferenceNumber "3008|0082"
+#define GKDCM_ReferencedCalculatedDoseReferenceSequence "3008|0090"
+#define GKDCM_ReferencedCalculatedDoseReferenceNumber "3008|0092"
+#define GKDCM_BeamLimitingDeviceLeafPairsSequence  "3008|00a0"
+#define GKDCM_RecordedWedgeSequence                "3008|00b0"
+#define GKDCM_RecordedCompensatorSequence          "3008|00c0"
+#define GKDCM_RecordedBlockSequence                "3008|00d0"
+#define GKDCM_TreatmentSummaryMeasuredDoseReferenceSequence "3008|00e0"
+#define GKDCM_RecordedSnoutSequence                "3008|00f0"
+#define GKDCM_RecordedRangeShifterSequence         "3008|00f2"
+#define GKDCM_RecordedLateralSpreadingDeviceSequence "3008|00f4"
+#define GKDCM_RecordedRangeModulatorSequence       "3008|00f6"
+#define GKDCM_RecordedSourceSequence               "3008|0100"
+#define GKDCM_SourceSerialNumber                   "3008|0105"
+#define GKDCM_TreatmentSessionApplicationSetupSequence "3008|0110"
+#define GKDCM_ApplicationSetupCheck                "3008|0116"
+#define GKDCM_RecordedBrachyAccessoryDeviceSequence "3008|0120"
+#define GKDCM_ReferencedBrachyAccessoryDeviceNumber "3008|0122"
+#define GKDCM_RecordedChannelSequence              "3008|0130"
+#define GKDCM_SpecifiedChannelTotalTime            "3008|0132"
+#define GKDCM_DeliveredChannelTotalTime            "3008|0134"
+#define GKDCM_SpecifiedNumberOfPulses              "3008|0136"
+#define GKDCM_DeliveredNumberOfPulses              "3008|0138"
+#define GKDCM_SpecifiedPulseRepetitionInterval     "3008|013a"
+#define GKDCM_DeliveredPulseRepetitionInterval     "3008|013c"
+#define GKDCM_RecordedSourceApplicatorSequence     "3008|0140"
+#define GKDCM_ReferencedSourceApplicatorNumber     "3008|0142"
+#define GKDCM_RecordedChannelShieldSequence        "3008|0150"
+#define GKDCM_ReferencedChannelShieldNumber        "3008|0152"
+#define GKDCM_BrachyControlPointDeliveredSequence  "3008|0160"
+#define GKDCM_SafePositionExitDate                 "3008|0162"
+#define GKDCM_SafePositionExitTime                 "3008|0164"
+#define GKDCM_SafePositionReturnDate               "3008|0166"
+#define GKDCM_SafePositionReturnTime               "3008|0168"
+#define GKDCM_CurrentTreatmentStatus               "3008|0200"
+#define GKDCM_TreatmentStatusComment               "3008|0202"
+#define GKDCM_FractionGroupSummarySequence         "3008|0220"
+#define GKDCM_ReferencedFractionNumber             "3008|0223"
+#define GKDCM_FractionGroupType                    "3008|0224"
+#define GKDCM_BeamStopperPosition                  "3008|0230"
+#define GKDCM_FractionStatusSummarySequence        "3008|0240"
+#define GKDCM_TreatmentDate                        "3008|0250"
+#define GKDCM_TreatmentTime                        "3008|0251"
+#define GKDCM_RTPlanLabel                          "300a|0002"
+#define GKDCM_RTPlanName                           "300a|0003"
+#define GKDCM_RTPlanDescription                    "300a|0004"
+#define GKDCM_RTPlanDate                           "300a|0006"
+#define GKDCM_RTPlanTime                           "300a|0007"
+#define GKDCM_TreatmentProtocols                   "300a|0009"
+#define GKDCM_PlanIntent                           "300a|000a"
+#define GKDCM_TreatmentSites                       "300a|000b"
+#define GKDCM_RTPlanGeometry                       "300a|000c"
+#define GKDCM_PrescriptionDescription              "300a|000e"
+#define GKDCM_DoseReferenceSequence                "300a|0010"
+#define GKDCM_DoseReferenceNumber                  "300a|0012"
+#define GKDCM_DoseReferenceUID                     "300a|0013"
+#define GKDCM_DoseReferenceStructureType           "300a|0014"
+#define GKDCM_NominalBeamEnergyUnit                "300a|0015"
+#define GKDCM_DoseReferenceDescription             "300a|0016"
+#define GKDCM_DoseReferencePointCoordinates        "300a|0018"
+#define GKDCM_NominalPriorDose                     "300a|001a"
+#define GKDCM_DoseReferenceType                    "300a|0020"
+#define GKDCM_ConstraintWeight                     "300a|0021"
+#define GKDCM_DeliveryWarningDose                  "300a|0022"
+#define GKDCM_DeliveryMaximumDose                  "300a|0023"
+#define GKDCM_TargetMinimumDose                    "300a|0025"
+#define GKDCM_TargetPrescriptionDose               "300a|0026"
+#define GKDCM_TargetMaximumDose                    "300a|0027"
+#define GKDCM_TargetUnderdoseVolumeFraction        "300a|0028"
+#define GKDCM_OrganAtRiskFullVolumeDose            "300a|002a"
+#define GKDCM_OrganAtRiskLimitDose                 "300a|002b"
+#define GKDCM_OrganAtRiskMaximumDose               "300a|002c"
+#define GKDCM_OrganAtRiskOverdoseVolumeFraction    "300a|002d"
+#define GKDCM_ToleranceTableSequence               "300a|0040"
+#define GKDCM_ToleranceTableNumber                 "300a|0042"
+#define GKDCM_ToleranceTableLabel                  "300a|0043"
+#define GKDCM_GantryAngleTolerance                 "300a|0044"
+#define GKDCM_BeamLimitingDeviceAngleTolerance     "300a|0046"
+#define GKDCM_BeamLimitingDeviceToleranceSequence  "300a|0048"
+#define GKDCM_BeamLimitingDevicePositionTolerance  "300a|004a"
+#define GKDCM_SnoutPositionTolerance               "300a|004b"
+#define GKDCM_PatientSupportAngleTolerance         "300a|004c"
+#define GKDCM_TableTopEccentricAngleTolerance      "300a|004e"
+#define GKDCM_TableTopPitchAngleTolerance          "300a|004f"
+#define GKDCM_TableTopRollAngleTolerance           "300a|0050"
+#define GKDCM_TableTopVerticalPositionTolerance    "300a|0051"
+#define GKDCM_TableTopLongitudinalPositionTolerance "300a|0052"
+#define GKDCM_TableTopLateralPositionTolerance     "300a|0053"
+#define GKDCM_RTPlanRelationship                   "300a|0055"
+#define GKDCM_FractionGroupSequence                "300a|0070"
+#define GKDCM_FractionGroupNumber                  "300a|0071"
+#define GKDCM_FractionGroupDescription             "300a|0072"
+#define GKDCM_NumberOfFractionsPlanned             "300a|0078"
+#define GKDCM_NumberOfFractionPatternDigitsPerDay  "300a|0079"
+#define GKDCM_RepeatFractionCycleLength            "300a|007a"
+#define GKDCM_FractionPattern                      "300a|007b"
+#define GKDCM_NumberOfBeams                        "300a|0080"
+#define GKDCM_BeamDoseSpecificationPoint           "300a|0082"
+#define GKDCM_BeamDose                             "300a|0084"
+#define GKDCM_BeamMeterset                         "300a|0086"
+#define GKDCM_BeamDosePointDepth                   "300a|0088"
+#define GKDCM_BeamDosePointEquivalentDepth         "300a|0089"
+#define GKDCM_BeamDosePointSSD                     "300a|008a"
+#define GKDCM_NumberOfBrachyApplicationSetups      "300a|00a0"
+#define GKDCM_BrachyApplicationSetupDoseSpecificationPoint "300a|00a2"
+#define GKDCM_BrachyApplicationSetupDose           "300a|00a4"
+#define GKDCM_BeamSequence                         "300a|00b0"
+#define GKDCM_TreatmentMachineName                 "300a|00b2"
+#define GKDCM_PrimaryDosimeterUnit                 "300a|00b3"
+#define GKDCM_SourceAxisDistance                   "300a|00b4"
+#define GKDCM_BeamLimitingDeviceSequence           "300a|00b6"
+#define GKDCM_RTBeamLimitingDeviceType             "300a|00b8"
+#define GKDCM_SourceToBeamLimitingDeviceDistance   "300a|00ba"
+#define GKDCM_IsocenterToBeamLimitingDeviceDistance "300a|00bb"
+#define GKDCM_NumberOfLeafJawPairs                 "300a|00bc"
+#define GKDCM_LeafPositionBoundaries               "300a|00be"
+#define GKDCM_BeamNumber                           "300a|00c0"
+#define GKDCM_BeamName                             "300a|00c2"
+#define GKDCM_BeamDescription                      "300a|00c3"
+#define GKDCM_BeamType                             "300a|00c4"
+#define GKDCM_RadiationType                        "300a|00c6"
+#define GKDCM_HighDoseTechniqueType                "300a|00c7"
+#define GKDCM_ReferenceImageNumber                 "300a|00c8"
+#define GKDCM_PlannedVerificationImageSequence     "300a|00ca"
+#define GKDCM_ImagingDeviceSpecificAcquisitionParameters "300a|00cc"
+#define GKDCM_TreatmentDeliveryType                "300a|00ce"
+#define GKDCM_NumberOfWedges                       "300a|00d0"
+#define GKDCM_WedgeSequence                        "300a|00d1"
+#define GKDCM_WedgeNumber                          "300a|00d2"
+#define GKDCM_WedgeType                            "300a|00d3"
+#define GKDCM_WedgeID                              "300a|00d4"
+#define GKDCM_WedgeAngle                           "300a|00d5"
+#define GKDCM_WedgeFactor                          "300a|00d6"
+#define GKDCM_TotalWedgeTrayWaterEquivalentThickness "300a|00d7"
+#define GKDCM_WedgeOrientation                     "300a|00d8"
+#define GKDCM_IsocenterToWedgeTrayDistance         "300a|00d9"
+#define GKDCM_SourceToWedgeTrayDistance            "300a|00da"
+#define GKDCM_WedgeThinEdgePosition                "300a|00db"
+#define GKDCM_BolusID                              "300a|00dc"
+#define GKDCM_BolusDescription                     "300a|00dd"
+#define GKDCM_NumberOfCompensators                 "300a|00e0"
+#define GKDCM_MaterialID                           "300a|00e1"
+#define GKDCM_TotalCompensatorTrayFactor           "300a|00e2"
+#define GKDCM_CompensatorSequence                  "300a|00e3"
+#define GKDCM_CompensatorNumber                    "300a|00e4"
+#define GKDCM_CompensatorID                        "300a|00e5"
+#define GKDCM_SourceToCompensatorTrayDistance      "300a|00e6"
+#define GKDCM_CompensatorRows                      "300a|00e7"
+#define GKDCM_CompensatorColumns                   "300a|00e8"
+#define GKDCM_CompensatorPixelSpacing              "300a|00e9"
+#define GKDCM_CompensatorPosition                  "300a|00ea"
+#define GKDCM_CompensatorTransmissionData          "300a|00eb"
+#define GKDCM_CompensatorThicknessData             "300a|00ec"
+#define GKDCM_NumberOfBoli                         "300a|00ed"
+#define GKDCM_CompensatorType                      "300a|00ee"
+#define GKDCM_NumberOfBlocks                       "300a|00f0"
+#define GKDCM_TotalBlockTrayFactor                 "300a|00f2"
+#define GKDCM_TotalBlockTrayWaterEquivalentThickness "300a|00f3"
+#define GKDCM_BlockSequence                        "300a|00f4"
+#define GKDCM_BlockTrayID                          "300a|00f5"
+#define GKDCM_SourceToBlockTrayDistance            "300a|00f6"
+#define GKDCM_IsocenterToBlockTrayDistance         "300a|00f7"
+#define GKDCM_BlockType                            "300a|00f8"
+#define GKDCM_AccessoryCode                        "300a|00f9"
+#define GKDCM_BlockDivergence                      "300a|00fa"
+#define GKDCM_BlockMountingPosition                "300a|00fb"
+#define GKDCM_BlockNumber                          "300a|00fc"
+#define GKDCM_BlockName                            "300a|00fe"
+#define GKDCM_BlockThickness                       "300a|0100"
+#define GKDCM_BlockTransmission                    "300a|0102"
+#define GKDCM_BlockNumberOfPoints                  "300a|0104"
+#define GKDCM_BlockData                            "300a|0106"
+#define GKDCM_ApplicatorSequence                   "300a|0107"
+#define GKDCM_ApplicatorID                         "300a|0108"
+#define GKDCM_ApplicatorType                       "300a|0109"
+#define GKDCM_ApplicatorDescription                "300a|010a"
+#define GKDCM_CumulativeDoseReferenceCoefficient   "300a|010c"
+#define GKDCM_FinalCumulativeMetersetWeight        "300a|010e"
+#define GKDCM_NumberOfControlPoints                "300a|0110"
+#define GKDCM_ControlPointSequence                 "300a|0111"
+#define GKDCM_ControlPointIndex                    "300a|0112"
+#define GKDCM_NominalBeamEnergy                    "300a|0114"
+#define GKDCM_DoseRateSet                          "300a|0115"
+#define GKDCM_WedgePositionSequence                "300a|0116"
+#define GKDCM_WedgePosition                        "300a|0118"
+#define GKDCM_BeamLimitingDevicePositionSequence   "300a|011a"
+#define GKDCM_LeafJawPositions                     "300a|011c"
+#define GKDCM_GantryAngle                          "300a|011e"
+#define GKDCM_GantryRotationDirection              "300a|011f"
+#define GKDCM_BeamLimitingDeviceAngle              "300a|0120"
+#define GKDCM_BeamLimitingDeviceRotationDirection  "300a|0121"
+#define GKDCM_PatientSupportAngle                  "300a|0122"
+#define GKDCM_PatientSupportRotationDirection      "300a|0123"
+#define GKDCM_TableTopEccentricAxisDistance        "300a|0124"
+#define GKDCM_TableTopEccentricAngle               "300a|0125"
+#define GKDCM_TableTopEccentricRotationDirection   "300a|0126"
+#define GKDCM_TableTopVerticalPosition             "300a|0128"
+#define GKDCM_TableTopLongitudinalPosition         "300a|0129"
+#define GKDCM_TableTopLateralPosition              "300a|012a"
+#define GKDCM_IsocenterPosition                    "300a|012c"
+#define GKDCM_SurfaceEntryPoint                    "300a|012e"
+#define GKDCM_SourceToSurfaceDistance              "300a|0130"
+#define GKDCM_CumulativeMetersetWeight             "300a|0134"
+#define GKDCM_TableTopPitchAngle                   "300a|0140"
+#define GKDCM_TableTopPitchRotationDirection       "300a|0142"
+#define GKDCM_TableTopRollAngle                    "300a|0144"
+#define GKDCM_TableTopRollRotationDirection        "300a|0146"
+#define GKDCM_HeadFixationAngle                    "300a|0148"
+#define GKDCM_GantryPitchAngle                     "300a|014a"
+#define GKDCM_GantryPitchRotationDirection         "300a|014c"
+#define GKDCM_GantryPitchAngleTolerance            "300a|014e"
+#define GKDCM_PatientSetupSequence                 "300a|0180"
+#define GKDCM_PatientSetupNumber                   "300a|0182"
+#define GKDCM_PatientSetupLabel                    "300a|0183"
+#define GKDCM_PatientAdditionalPosition            "300a|0184"
+#define GKDCM_FixationDeviceSequence               "300a|0190"
+#define GKDCM_FixationDeviceType                   "300a|0192"
+#define GKDCM_FixationDeviceLabel                  "300a|0194"
+#define GKDCM_FixationDeviceDescription            "300a|0196"
+#define GKDCM_FixationDevicePosition               "300a|0198"
+#define GKDCM_FixationDevicePitchAngle             "300a|0199"
+#define GKDCM_FixationDeviceRollAngle              "300a|019a"
+#define GKDCM_ShieldingDeviceSequence              "300a|01a0"
+#define GKDCM_ShieldingDeviceType                  "300a|01a2"
+#define GKDCM_ShieldingDeviceLabel                 "300a|01a4"
+#define GKDCM_ShieldingDeviceDescription           "300a|01a6"
+#define GKDCM_ShieldingDevicePosition              "300a|01a8"
+#define GKDCM_SetupTechnique                       "300a|01b0"
+#define GKDCM_SetupTechniqueDescription            "300a|01b2"
+#define GKDCM_SetupDeviceSequence                  "300a|01b4"
+#define GKDCM_SetupDeviceType                      "300a|01b6"
+#define GKDCM_SetupDeviceLabel                     "300a|01b8"
+#define GKDCM_SetupDeviceDescription               "300a|01ba"
+#define GKDCM_SetupDeviceParameter                 "300a|01bc"
+#define GKDCM_SetupReferenceDescription            "300a|01d0"
+#define GKDCM_TableTopVerticalSetupDisplacement    "300a|01d2"
+#define GKDCM_TableTopLongitudinalSetupDisplacement "300a|01d4"
+#define GKDCM_TableTopLateralSetupDisplacement     "300a|01d6"
+#define GKDCM_BrachyTreatmentTechnique             "300a|0200"
+#define GKDCM_BrachyTreatmentType                  "300a|0202"
+#define GKDCM_TreatmentMachineSequence             "300a|0206"
+#define GKDCM_SourceSequence                       "300a|0210"
+#define GKDCM_SourceNumber                         "300a|0212"
+#define GKDCM_SourceType                           "300a|0214"
+#define GKDCM_SourceManufacturer                   "300a|0216"
+#define GKDCM_ActiveSourceDiameter                 "300a|0218"
+#define GKDCM_ActiveSourceLength                   "300a|021a"
+#define GKDCM_SourceEncapsulationNominalThickness  "300a|0222"
+#define GKDCM_SourceEncapsulationNominalTransmission "300a|0224"
+#define GKDCM_SourceIsotopeName                    "300a|0226"
+#define GKDCM_SourceIsotopeHalfLife                "300a|0228"
+#define GKDCM_SourceStrengthUnits                  "300a|0229"
+#define GKDCM_ReferenceAirKermaRate                "300a|022a"
+#define GKDCM_SourceStrength                       "300a|022b"
+#define GKDCM_SourceStrengthReferenceDate          "300a|022c"
+#define GKDCM_SourceStrengthReferenceTime          "300a|022e"
+#define GKDCM_ApplicationSetupSequence             "300a|0230"
+#define GKDCM_ApplicationSetupType                 "300a|0232"
+#define GKDCM_ApplicationSetupNumber               "300a|0234"
+#define GKDCM_ApplicationSetupName                 "300a|0236"
+#define GKDCM_ApplicationSetupManufacturer         "300a|0238"
+#define GKDCM_TemplateNumber                       "300a|0240"
+#define GKDCM_TemplateType                         "300a|0242"
+#define GKDCM_TemplateName                         "300a|0244"
+#define GKDCM_TotalReferenceAirKerma               "300a|0250"
+#define GKDCM_BrachyAccessoryDeviceSequence        "300a|0260"
+#define GKDCM_BrachyAccessoryDeviceNumber          "300a|0262"
+#define GKDCM_BrachyAccessoryDeviceID              "300a|0263"
+#define GKDCM_BrachyAccessoryDeviceType            "300a|0264"
+#define GKDCM_BrachyAccessoryDeviceName            "300a|0266"
+#define GKDCM_BrachyAccessoryDeviceNominalThickness "300a|026a"
+#define GKDCM_BrachyAccessoryDeviceNominalTransmission "300a|026c"
+#define GKDCM_ChannelSequence                      "300a|0280"
+#define GKDCM_ChannelNumber                        "300a|0282"
+#define GKDCM_ChannelLength                        "300a|0284"
+#define GKDCM_ChannelTotalTime                     "300a|0286"
+#define GKDCM_SourceMovementType                   "300a|0288"
+#define GKDCM_NumberOfPulses                       "300a|028a"
+#define GKDCM_PulseRepetitionInterval              "300a|028c"
+#define GKDCM_SourceApplicatorNumber               "300a|0290"
+#define GKDCM_SourceApplicatorID                   "300a|0291"
+#define GKDCM_SourceApplicatorType                 "300a|0292"
+#define GKDCM_SourceApplicatorName                 "300a|0294"
+#define GKDCM_SourceApplicatorLength               "300a|0296"
+#define GKDCM_SourceApplicatorManufacturer         "300a|0298"
+#define GKDCM_SourceApplicatorWallNominalThickness "300a|029c"
+#define GKDCM_SourceApplicatorWallNominalTransmission "300a|029e"
+#define GKDCM_SourceApplicatorStepSize             "300a|02a0"
+#define GKDCM_TransferTubeNumber                   "300a|02a2"
+#define GKDCM_TransferTubeLength                   "300a|02a4"
+#define GKDCM_ChannelShieldSequence                "300a|02b0"
+#define GKDCM_ChannelShieldNumber                  "300a|02b2"
+#define GKDCM_ChannelShieldID                      "300a|02b3"
+#define GKDCM_ChannelShieldName                    "300a|02b4"
+#define GKDCM_ChannelShieldNominalThickness        "300a|02b8"
+#define GKDCM_ChannelShieldNominalTransmission     "300a|02ba"
+#define GKDCM_FinalCumulativeTimeWeight            "300a|02c8"
+#define GKDCM_BrachyControlPointSequence           "300a|02d0"
+#define GKDCM_ControlPointRelativePosition         "300a|02d2"
+#define GKDCM_ControlPoint3DPosition               "300a|02d4"
+#define GKDCM_CumulativeTimeWeight                 "300a|02d6"
+#define GKDCM_CompensatorDivergence                "300a|02e0"
+#define GKDCM_CompensatorMountingPosition          "300a|02e1"
+#define GKDCM_SourceToCompensatorDistance          "300a|02e2"
+#define GKDCM_TotalCompensatorTrayWaterEquivalentThickness "300a|02e3"
+#define GKDCM_IsocenterToCompensatorTrayDistance   "300a|02e4"
+#define GKDCM_CompensatorColumnOffset              "300a|02e5"
+#define GKDCM_IsocenterToCompensatorDistances      "300a|02e6"
+#define GKDCM_CompensatorRelativeStoppingPowerRatio "300a|02e7"
+#define GKDCM_CompensatorMillingToolDiameter       "300a|02e8"
+#define GKDCM_IonRangeCompensatorSequence          "300a|02ea"
+#define GKDCM_CompensatorDescription               "300a|02eb"
+#define GKDCM_RadiationMassNumber                  "300a|0302"
+#define GKDCM_RadiationAtomicNumber                "300a|0304"
+#define GKDCM_RadiationChargeState                 "300a|0306"
+#define GKDCM_ScanMode                             "300a|0308"
+#define GKDCM_VirtualSourceAxisDistances           "300a|030a"
+#define GKDCM_SnoutSequence                        "300a|030c"
+#define GKDCM_SnoutPosition                        "300a|030d"
+#define GKDCM_SnoutID                              "300a|030f"
+#define GKDCM_NumberOfRangeShifters                "300a|0312"
+#define GKDCM_RangeShifterSequence                 "300a|0314"
+#define GKDCM_RangeShifterNumber                   "300a|0316"
+#define GKDCM_RangeShifterID                       "300a|0318"
+#define GKDCM_RangeShifterType                     "300a|0320"
+#define GKDCM_RangeShifterDescription              "300a|0322"
+#define GKDCM_NumberOfLateralSpreadingDevices      "300a|0330"
+#define GKDCM_LateralSpreadingDeviceSequence       "300a|0332"
+#define GKDCM_LateralSpreadingDeviceNumber         "300a|0334"
+#define GKDCM_LateralSpreadingDeviceID             "300a|0336"
+#define GKDCM_LateralSpreadingDeviceType           "300a|0338"
+#define GKDCM_LateralSpreadingDeviceDescription    "300a|033a"
+#define GKDCM_LateralSpreadingDeviceWaterEquivalentThickness "300a|033c"
+#define GKDCM_NumberOfRangeModulators              "300a|0340"
+#define GKDCM_RangeModulatorSequence               "300a|0342"
+#define GKDCM_RangeModulatorNumber                 "300a|0344"
+#define GKDCM_RangeModulatorID                     "300a|0346"
+#define GKDCM_RangeModulatorType                   "300a|0348"
+#define GKDCM_RangeModulatorDescription            "300a|034a"
+#define GKDCM_BeamCurrentModulationID              "300a|034c"
+#define GKDCM_PatientSupportType                   "300a|0350"
+#define GKDCM_PatientSupportID                     "300a|0352"
+#define GKDCM_PatientSupportAccessoryCode          "300a|0354"
+#define GKDCM_FixationLightAzimuthalAngle          "300a|0356"
+#define GKDCM_FixationLightPolarAngle              "300a|0358"
+#define GKDCM_MetersetRate                         "300a|035a"
+#define GKDCM_RangeShifterSettingsSequence         "300a|0360"
+#define GKDCM_RangeShifterSetting                  "300a|0362"
+#define GKDCM_IsocenterToRangeShifterDistance      "300a|0364"
+#define GKDCM_RangeShifterWaterEquivalentThickness "300a|0366"
+#define GKDCM_LateralSpreadingDeviceSettingsSequence "300a|0370"
+#define GKDCM_LateralSpreadingDeviceSetting        "300a|0372"
+#define GKDCM_IsocenterToLateralSpreadingDeviceDistance "300a|0374"
+#define GKDCM_RangeModulatorSettingsSequence       "300a|0380"
+#define GKDCM_RangeModulatorGatingStartValue       "300a|0382"
+#define GKDCM_RangeModulatorGatingStopValue        "300a|0384"
+#define GKDCM_RangeModulatorGatingStartWaterEquivalentThickness "300a|0386"
+#define GKDCM_RangeModulatorGatingStopWaterEquivalentThickness "300a|0388"
+#define GKDCM_IsocenterToRangeModulatorDistance    "300a|038a"
+#define GKDCM_ScanSpotTuneID                       "300a|0390"
+#define GKDCM_NumberOfScanSpotPositions            "300a|0392"
+#define GKDCM_ScanSpotPositionMap                  "300a|0394"
+#define GKDCM_ScanSpotMetersetWeights              "300a|0396"
+#define GKDCM_ScanningSpotSize                     "300a|0398"
+#define GKDCM_NumberOfPaintings                    "300a|039a"
+#define GKDCM_IonToleranceTableSequence            "300a|03a0"
+#define GKDCM_IonBeamSequence                      "300a|03a2"
+#define GKDCM_IonBeamLimitingDeviceSequence        "300a|03a4"
+#define GKDCM_IonBlockSequence                     "300a|03a6"
+#define GKDCM_IonControlPointSequence              "300a|03a8"
+#define GKDCM_IonWedgeSequence                     "300a|03aa"
+#define GKDCM_IonWedgePositionSequence             "300a|03ac"
+#define GKDCM_ReferencedSetupImageSequence         "300a|0401"
+#define GKDCM_SetupImageComment                    "300a|0402"
+#define GKDCM_MotionSynchronizationSequence        "300a|0410"
+#define GKDCM_ControlPointOrientation              "300a|0412"
+#define GKDCM_GeneralAccessorySequence             "300a|0420"
+#define GKDCM_GeneralAccessoryID                   "300a|0421"
+#define GKDCM_GeneralAccessoryDescription          "300a|0422"
+#define GKDCM_GeneralAccessoryType                 "300a|0423"
+#define GKDCM_GeneralAccessoryNumber               "300a|0424"
+#define GKDCM_ApplicatorGeometrySequence           "300a|0431"
+#define GKDCM_ApplicatorApertureShape              "300a|0432"
+#define GKDCM_ApplicatorOpening                    "300a|0433"
+#define GKDCM_ApplicatorOpeningX                   "300a|0434"
+#define GKDCM_ApplicatorOpeningY                   "300a|0435"
+#define GKDCM_SourceToApplicatorMountingPositionDistance "300a|0436"
+#define GKDCM_ReferencedRTPlanSequence             "300c|0002"
+#define GKDCM_ReferencedBeamSequence               "300c|0004"
+#define GKDCM_ReferencedBeamNumber                 "300c|0006"
+#define GKDCM_ReferencedReferenceImageNumber       "300c|0007"
+#define GKDCM_StartCumulativeMetersetWeight        "300c|0008"
+#define GKDCM_EndCumulativeMetersetWeight          "300c|0009"
+#define GKDCM_ReferencedBrachyApplicationSetupSequence "300c|000a"
+#define GKDCM_ReferencedBrachyApplicationSetupNumber "300c|000c"
+#define GKDCM_ReferencedSourceNumber               "300c|000e"
+#define GKDCM_ReferencedFractionGroupSequence      "300c|0020"
+#define GKDCM_ReferencedFractionGroupNumber        "300c|0022"
+#define GKDCM_ReferencedVerificationImageSequence  "300c|0040"
+#define GKDCM_ReferencedReferenceImageSequence     "300c|0042"
+#define GKDCM_ReferencedDoseReferenceSequence      "300c|0050"
+#define GKDCM_ReferencedDoseReferenceNumber        "300c|0051"
+#define GKDCM_BrachyReferencedDoseReferenceSequence "300c|0055"
+#define GKDCM_ReferencedStructureSetSequence       "300c|0060"
+#define GKDCM_ReferencedPatientSetupNumber         "300c|006a"
+#define GKDCM_ReferencedDoseSequence               "300c|0080"
+#define GKDCM_ReferencedToleranceTableNumber       "300c|00a0"
+#define GKDCM_ReferencedBolusSequence              "300c|00b0"
+#define GKDCM_ReferencedWedgeNumber                "300c|00c0"
+#define GKDCM_ReferencedCompensatorNumber          "300c|00d0"
+#define GKDCM_ReferencedBlockNumber                "300c|00e0"
+#define GKDCM_ReferencedControlPointIndex          "300c|00f0"
+#define GKDCM_ReferencedControlPointSequence       "300c|00f2"
+#define GKDCM_ReferencedStartControlPointIndex     "300c|00f4"
+#define GKDCM_ReferencedStopControlPointIndex      "300c|00f6"
+#define GKDCM_ReferencedRangeShifterNumber         "300c|0100"
+#define GKDCM_ReferencedLateralSpreadingDeviceNumber "300c|0102"
+#define GKDCM_ReferencedRangeModulatorNumber       "300c|0104"
+#define GKDCM_ApprovalStatus                       "300e|0002"
+#define GKDCM_ReviewDate                           "300e|0004"
+#define GKDCM_ReviewTime                           "300e|0005"
+#define GKDCM_ReviewerName                         "300e|0008"
+#define GKDCM_ACR_NEMA_TextGroupLength             "4000|0000"
+#define GKDCM_ACR_NEMA_TextArbitrary               "4000|0010"
+#define GKDCM_ACR_NEMA_TextComments                "4000|4000"
+#define GKDCM_RETIRED_ResultsID                    "4008|0040"
+#define GKDCM_RETIRED_ResultsIDIssuer              "4008|0042"
+#define GKDCM_RETIRED_ReferencedInterpretationSequence "4008|0050"
+#define GKDCM_RETIRED_InterpretationRecordedDate   "4008|0100"
+#define GKDCM_RETIRED_InterpretationRecordedTime   "4008|0101"
+#define GKDCM_RETIRED_InterpretationRecorder       "4008|0102"
+#define GKDCM_RETIRED_ReferenceToRecordedSound     "4008|0103"
+#define GKDCM_RETIRED_InterpretationTranscriptionDate "4008|0108"
+#define GKDCM_RETIRED_InterpretationTranscriptionTime "4008|0109"
+#define GKDCM_RETIRED_InterpretationTranscriber    "4008|010a"
+#define GKDCM_RETIRED_InterpretationText           "4008|010b"
+#define GKDCM_RETIRED_InterpretationAuthor         "4008|010c"
+#define GKDCM_RETIRED_InterpretationApproverSequence "4008|0111"
+#define GKDCM_RETIRED_InterpretationApprovalDate   "4008|0112"
+#define GKDCM_RETIRED_InterpretationApprovalTime   "4008|0113"
+#define GKDCM_RETIRED_PhysicianApprovingInterpretation "4008|0114"
+#define GKDCM_RETIRED_InterpretationDiagnosisDescription "4008|0115"
+#define GKDCM_RETIRED_InterpretationDiagnosisCodeSequence "4008|0117"
+#define GKDCM_RETIRED_ResultsDistributionListSequence "4008|0118"
+#define GKDCM_RETIRED_DistributionName             "4008|0119"
+#define GKDCM_RETIRED_DistributionAddress          "4008|011a"
+#define GKDCM_RETIRED_InterpretationID             "4008|0200"
+#define GKDCM_RETIRED_InterpretationIDIssuer       "4008|0202"
+#define GKDCM_RETIRED_InterpretationTypeID         "4008|0210"
+#define GKDCM_RETIRED_InterpretationStatusID       "4008|0212"
+#define GKDCM_RETIRED_Impressions                  "4008|0300"
+#define GKDCM_RETIRED_ResultsComments              "4008|4000"
+#define GKDCM_MACParametersSequence                "4ffe|0001"
+#define GKDCM_SharedFunctionalGroupsSequence       "5200|9229"
+#define GKDCM_PerFrameFunctionalGroupsSequence     "5200|9230"
+#define GKDCM_WaveformSequence                     "5400|0100"
+#define GKDCM_ChannelMinimumValue                  "5400|0110"
+#define GKDCM_ChannelMaximumValue                  "5400|0112"
+#define GKDCM_WaveformBitsAllocated                "5400|1004"
+#define GKDCM_WaveformSampleInterpretation         "5400|1006"
+#define GKDCM_WaveformPaddingValue                 "5400|100a"
+#define GKDCM_WaveformData                         "5400|1010"
+#define GKDCM_FirstOrderPhaseCorrectionAngle       "5600|0010"
+#define GKDCM_SpectroscopyData                     "5600|0020"
+#define GKDCM_PixelData                            "7fe0|0010"
+#define GKDCM_ACR_NEMA_2C_CoefficientsSDVN         "7fe0|0020"
+#define GKDCM_ACR_NEMA_2C_CoefficientsSDHN         "7fe0|0030"
+#define GKDCM_ACR_NEMA_2C_CoefficientsSDDN         "7fe0|0040"
+#define GKDCM_DigitalSignaturesSequence            "fffa|fffa"
+#define GKDCM_DataSetTrailingPadding               "fffc|fffc"
+#define GKDCM_Item                                 "fffe|e000"
+#define GKDCM_ItemDelimitationItem                 "fffe|e00d"
+#define GKDCM_SequenceDelimitationItem             "fffe|e0dd"
+
+/*
+** Tags where the group/element can vary (repeating tags".
+** Number of entries: 78
+*/
+#define GKDCM_OverlayRows                          "6000|0010" /* (0x6000-0x60ff,0x0010" */
+#define GKDCM_OverlayColumns                       "6000|0011" /* (0x6000-0x60ff,0x0011" */
+#define GKDCM_NumberOfFramesInOverlay              "6000|0015" /* (0x6000-0x60ff,0x0015" */
+#define GKDCM_OverlayDescription                   "6000|0022" /* (0x6000-0x60ff,0x0022" */
+#define GKDCM_OverlayType                          "6000|0040" /* (0x6000-0x60ff,0x0040" */
+#define GKDCM_OverlaySubtype                       "6000|0045" /* (0x6000-0x60ff,0x0045" */
+#define GKDCM_OverlayOrigin                        "6000|0050" /* (0x6000-0x60ff,0x0050" */
+#define GKDCM_ImageFrameOrigin                     "6000|0051" /* (0x6000-0x60ff,0x0051" */
+#define GKDCM_OverlayBitsAllocated                 "6000|0100" /* (0x6000-0x60ff,0x0100" */
+#define GKDCM_OverlayBitPosition                   "6000|0102" /* (0x6000-0x60ff,0x0102" */
+#define GKDCM_OverlayActivationLayer               "6000|1001" /* (0x6000-0x60ff,0x1001" */
+#define GKDCM_ROIArea                              "6000|1301" /* (0x6000-0x60ff,0x1301" */
+#define GKDCM_ROIMean                              "6000|1302" /* (0x6000-0x60ff,0x1302" */
+#define GKDCM_ROIStandardDeviation                 "6000|1303" /* (0x6000-0x60ff,0x1303" */
+#define GKDCM_OverlayLabel                         "6000|1500" /* (0x6000-0x60ff,0x1500" */
+#define GKDCM_OverlayData                          "6000|3000" /* (0x6000-0x60ff,0x3000" */
+#define GKDCM_ACR_NEMA_2C_VariablePixelDataGroupLength "7f00|0000" /* (0x7f00-0x7fff,0x0000" */
+#define GKDCM_PrivateGroupLength                   "0009|0000" /* (0x0009-o-0xffff,0x0000" */
+#define GKDCM_RETIRED_NumberOfPoints               "5000|0010" /* (0x5000-0x50ff,0x0010" */
+#define GKDCM_RETIRED_TypeOfData                   "5000|0020" /* (0x5000-0x50ff,0x0020" */
+#define GKDCM_RETIRED_CurveDescription             "5000|0022" /* (0x5000-0x50ff,0x0022" */
+#define GKDCM_RETIRED_AxisUnits                    "5000|0030" /* (0x5000-0x50ff,0x0030" */
+#define GKDCM_RETIRED_AxisLabels                   "5000|0040" /* (0x5000-0x50ff,0x0040" */
+#define GKDCM_RETIRED_OverlayPlanes                "6000|0012" /* (0x6000-0x60ff,0x0012" */
+#define GKDCM_RETIRED_OverlayPlaneOrigin           "6000|0052" /* (0x6000-0x60ff,0x0052" */
+#define GKDCM_ACR_NEMA_2C_OverlayCompressionCode   "6000|0060" /* (0x6000-0x60ff,0x0060" */
+#define GKDCM_ACR_NEMA_2C_OverlayCompressionOriginator "6000|0061" /* (0x6000-0x60ff,0x0061" */
+#define GKDCM_ACR_NEMA_2C_OverlayCompressionLabel  "6000|0062" /* (0x6000-0x60ff,0x0062" */
+#define GKDCM_ACR_NEMA_2C_OverlayCompressionDescription "6000|0063" /* (0x6000-0x60ff,0x0063" */
+#define GKDCM_ACR_NEMA_2C_OverlayCompressionStepPointers "6000|0066" /* (0x6000-0x60ff,0x0066" */
+#define GKDCM_ACR_NEMA_2C_OverlayRepeatInterval    "6000|0068" /* (0x6000-0x60ff,0x0068" */
+#define GKDCM_ACR_NEMA_2C_OverlayBitsGrouped       "6000|0069" /* (0x6000-0x60ff,0x0069" */
+#define GKDCM_ACR_NEMA_2C_VariablePixelData        "7f00|0010" /* (0x7f00-0x7fff,0x0010" */
+#define GKDCM_ACR_NEMA_2C_VariableNextDataGroup    "7f00|0011" /* (0x7f00-0x7fff,0x0011" */
+#define GKDCM_ACR_NEMA_2C_VariableCoefficientsSDVN "7f00|0020" /* (0x7f00-0x7fff,0x0020" */
+#define GKDCM_ACR_NEMA_2C_VariableCoefficientsSDHN "7f00|0030" /* (0x7f00-0x7fff,0x0030" */
+#define GKDCM_ACR_NEMA_2C_VariableCoefficientsSDDN "7f00|0040" /* (0x7f00-0x7fff,0x0040" */
+#define GKDCM_PrivateCreator                       "0009|0010" /* (0x0009-o-0xffff,0x0010-u-0x00ff" */
+#define GKDCM_IllegalGroupLength                   "0001|0000" /* (0x0001-o-0x0007,0x0000" */
+#define GKDCM_IllegalPrivateCreator                "0001|0010" /* (0x0001-o-0x0007,0x0010-u-0x00ff" */
+#define GKDCM_GenericGroupLength                   "0000|0000" /* (0x0000-u-0xffff,0x0000" */
+#define GKDCM_ACR_NEMA_SourceImageID               "0020|3100" /* (0x0020,0x3100-0x31ff" */
+#define GKDCM_RETIRED_CurveDimensions              "5000|0005" /* (0x5000-0x50ff,0x0005" */
+#define GKDCM_RETIRED_DataValueRepresentation      "5000|0103" /* (0x5000-0x50ff,0x0103" */
+#define GKDCM_RETIRED_MinimumCoordinateValue       "5000|0104" /* (0x5000-0x50ff,0x0104" */
+#define GKDCM_RETIRED_MaximumCoordinateValue       "5000|0105" /* (0x5000-0x50ff,0x0105" */
+#define GKDCM_RETIRED_CurveRange                   "5000|0106" /* (0x5000-0x50ff,0x0106" */
+#define GKDCM_RETIRED_CurveDataDescriptor          "5000|0110" /* (0x5000-0x50ff,0x0110" */
+#define GKDCM_RETIRED_CoordinateStartValue         "5000|0112" /* (0x5000-0x50ff,0x0112" */
+#define GKDCM_RETIRED_CoordinateStepValue          "5000|0114" /* (0x5000-0x50ff,0x0114" */
+#define GKDCM_RETIRED_CurveActivationLayer         "5000|1001" /* (0x5000-0x50ff,0x1001" */
+#define GKDCM_RETIRED_AudioType                    "5000|2000" /* (0x5000-0x50ff,0x2000" */
+#define GKDCM_RETIRED_AudioSampleFormat            "5000|2002" /* (0x5000-0x50ff,0x2002" */
+#define GKDCM_RETIRED_NumberOfChannels             "5000|2004" /* (0x5000-0x50ff,0x2004" */
+#define GKDCM_RETIRED_NumberOfSamples              "5000|2006" /* (0x5000-0x50ff,0x2006" */
+#define GKDCM_RETIRED_SampleRate                   "5000|2008" /* (0x5000-0x50ff,0x2008" */
+#define GKDCM_RETIRED_TotalTime                    "5000|200a" /* (0x5000-0x50ff,0x200a" */
+#define GKDCM_RETIRED_AudioSampleData              "5000|200c" /* (0x5000-0x50ff,0x200c" */
+#define GKDCM_RETIRED_AudioComments                "5000|200e" /* (0x5000-0x50ff,0x200e" */
+#define GKDCM_RETIRED_CurveLabel                   "5000|2500" /* (0x5000-0x50ff,0x2500" */
+#define GKDCM_RETIRED_CurveReferencedOverlaySequence "5000|2600" /* (0x5000-0x50ff,0x2600" */
+#define GKDCM_RETIRED_CurveReferencedOverlayGroup  "5000|2610" /* (0x5000-0x50ff,0x2610" */
+#define GKDCM_RETIRED_CurveData                    "5000|3000" /* (0x5000-0x50ff,0x3000" */
+#define GKDCM_ACR_NEMA_OverlayFormat               "6000|0110" /* (0x6000-0x60ff,0x0110" */
+#define GKDCM_ACR_NEMA_OverlayLocation             "6000|0200" /* (0x6000-0x60ff,0x0200" */
+#define GKDCM_ACR_NEMA_2C_OverlayCodeLabel         "6000|0800" /* (0x6000-0x60ff,0x0800" */
+#define GKDCM_ACR_NEMA_2C_OverlayNumberOfTables    "6000|0802" /* (0x6000-0x60ff,0x0802" */
+#define GKDCM_ACR_NEMA_2C_OverlayCodeTableLocation "6000|0803" /* (0x6000-0x60ff,0x0803" */
+#define GKDCM_ACR_NEMA_2C_OverlayBitsForCodeWord   "6000|0804" /* (0x6000-0x60ff,0x0804" */
+#define GKDCM_RETIRED_OverlayDescriptorGray        "6000|1100" /* (0x6000-0x60ff,0x1100" */
+#define GKDCM_RETIRED_OverlayDescriptorRed         "6000|1101" /* (0x6000-0x60ff,0x1101" */
+#define GKDCM_RETIRED_OverlayDescriptorGreen       "6000|1102" /* (0x6000-0x60ff,0x1102" */
+#define GKDCM_RETIRED_OverlayDescriptorBlue        "6000|1103" /* (0x6000-0x60ff,0x1103" */
+#define GKDCM_RETIRED_OverlaysGray                 "6000|1200" /* (0x6000-0x60ff,0x1200" */
+#define GKDCM_RETIRED_OverlaysRed                  "6000|1201" /* (0x6000-0x60ff,0x1201" */
+#define GKDCM_RETIRED_OverlaysGreen                "6000|1202" /* (0x6000-0x60ff,0x1202" */
+#define GKDCM_RETIRED_OverlaysBlue                 "6000|1203" /* (0x6000-0x60ff,0x1203" */
+#define GKDCM_ACR_NEMA_OverlayComments             "6000|4000" /* (0x6000-0x60ff,0x4000" */
+
diff --git a/cadxcore/api/dicom/dcmuiddictionary.h b/cadxcore/api/dicom/dcmuiddictionary.h
new file mode 100644
index 0000000..d4ea4b5
--- /dev/null
+++ b/cadxcore/api/dicom/dcmuiddictionary.h
@@ -0,0 +1,475 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+/*
+** String Constants
+*/
+
+/*
+** Defined Transfer Syntax UIDs
+*/
+
+/// Implicit VR Little Endian: Default Transfer Syntax for DICOM
+#define GKUID_LittleEndianImplicitTransferSyntax  "1.2.840.10008.1.2"
+/// Explicit VR Little Endian
+#define GKUID_LittleEndianExplicitTransferSyntax  "1.2.840.10008.1.2.1"
+/// Explicit VR Big Endian
+#define GKUID_BigEndianExplicitTransferSyntax     "1.2.840.10008.1.2.2"
+/// Deflated Explicit VR Little Endian
+#define GKUID_DeflatedExplicitVRLittleEndianTransferSyntax "1.2.840.10008.1.2.1.99"
+/** JPEG Baseline (Process 1): Default Transfer Syntax
+ * for Lossy JPEG 8 Bit Image Compression
+ */
+#define GKUID_JPEGProcess1TransferSyntax          "1.2.840.10008.1.2.4.50"
+/** JPEG Extended (Process 2 & 4): Default Transfer Syntax
+ *  for Lossy JPEG 12 Bit Image Compression (Process 4 only)
+ */
+#define GKUID_JPEGProcess2_4TransferSyntax        "1.2.840.10008.1.2.4.51"
+/// JPEG Extended (Process 3 & 5) - RETIRED
+#define GKUID_JPEGProcess3_5TransferSyntax        "1.2.840.10008.1.2.4.52"
+/// JPEG Spectral Selection, Non-Hierarchical (Process 6 & 8) - RETIRED
+#define GKUID_JPEGProcess6_8TransferSyntax        "1.2.840.10008.1.2.4.53"
+/// JPEG Spectral Selection, Non-Hierarchical (Process 7 & 9) - RETIRED
+#define GKUID_JPEGProcess7_9TransferSyntax        "1.2.840.10008.1.2.4.54"
+/// JPEG Full Progression, Non-Hierarchical (Process 10 & 12) - RETIRED
+#define GKUID_JPEGProcess10_12TransferSyntax      "1.2.840.10008.1.2.4.55"
+/// JPEG Full Progression, Non-Hierarchical (Process 11 & 13) - RETIRED
+#define GKUID_JPEGProcess11_13TransferSyntax      "1.2.840.10008.1.2.4.56"
+/// JPEG Lossless, Non-Hierarchical (Process 14)
+#define GKUID_JPEGProcess14TransferSyntax         "1.2.840.10008.1.2.4.57"
+/// JPEG Lossless, Non-Hierarchical (Process 15) - RETIRED
+#define GKUID_JPEGProcess15TransferSyntax         "1.2.840.10008.1.2.4.58"
+/// JPEG Extended, Hierarchical (Process 16 & 18) - RETIRED
+#define GKUID_JPEGProcess16_18TransferSyntax      "1.2.840.10008.1.2.4.59"
+/// JPEG Extended, Hierarchical (Process 17 & 19) - RETIRED
+#define GKUID_JPEGProcess17_19TransferSyntax      "1.2.840.10008.1.2.4.60"
+/// JPEG Spectral Selection, Hierarchical (Process 20 & 22) - RETIRED
+#define GKUID_JPEGProcess20_22TransferSyntax      "1.2.840.10008.1.2.4.61"
+/// JPEG Spectral Selection, Hierarchical (Process 21 & 23) - RETIRED
+#define GKUID_JPEGProcess21_23TransferSyntax      "1.2.840.10008.1.2.4.62"
+/// JPEG Full Progression, Hierarchical (Process 24 & 26) - RETIRED
+#define GKUID_JPEGProcess24_26TransferSyntax      "1.2.840.10008.1.2.4.63"
+/// JPEG Full Progression, Hierarchical (Process 25 & 27) - RETIRED
+#define GKUID_JPEGProcess25_27TransferSyntax      "1.2.840.10008.1.2.4.64"
+/// JPEG Lossless, Hierarchical (Process 28) - RETIRED
+#define GKUID_JPEGProcess28TransferSyntax         "1.2.840.10008.1.2.4.65"
+/// JPEG Lossless, Hierarchical (Process 29) - RETIRED
+#define GKUID_JPEGProcess29TransferSyntax         "1.2.840.10008.1.2.4.66"
+/** JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14
+ *  [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression
+ */
+#define GKUID_JPEGProcess14SV1TransferSyntax      "1.2.840.10008.1.2.4.70"
+/// JPEG-LS Lossless Image Compression
+#define GKUID_JPEGLSLosslessTransferSyntax        "1.2.840.10008.1.2.4.80"
+/// JPEG-LS Lossy (Near-Lossless) Image Compression
+#define GKUID_JPEGLSLossyTransferSyntax           "1.2.840.10008.1.2.4.81"
+/// JPEG 2000 Image Compression (Lossless Only)
+#define GKUID_JPEG2000LosslessOnlyTransferSyntax  "1.2.840.10008.1.2.4.90"
+/// JPEG 2000 Image Compression (Lossless or Lossy)
+#define GKUID_JPEG2000TransferSyntax              "1.2.840.10008.1.2.4.91"
+/// JPEG 2000 Part 2 Multi-component Image Compression (Lossless Only)
+#define GKUID_JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax "1.2.840.10008.1.2.4.92"
+/// JPEG 2000 Part 2 Multi-component Image Compression (Lossless or Lossy)
+#define GKUID_JPEG2000Part2MulticomponentImageCompressionTransferSyntax "1.2.840.10008.1.2.4.93"
+/// JPIP Referenced
+#define GKUID_JPIPReferencedTransferSyntax        "1.2.840.10008.1.2.4.94"
+/// JPIP Referenced Deflate
+#define GKUID_JPIPReferencedDeflateTransferSyntax "1.2.840.10008.1.2.4.95"
+/// MPEG2 Main Profile @ Main Level
+#define GKUID_MPEG2MainProfileAtMainLevelTransferSyntax "1.2.840.10008.1.2.4.100"
+/// MPEG2 Main Profile @ High Level
+#define GKUID_MPEG2MainProfileAtHighLevelTransferSyntax "1.2.840.10008.1.2.4.101"
+/// RLE Lossless
+#define GKUID_RLELosslessTransferSyntax           "1.2.840.10008.1.2.5"
+
+/** MIME encapsulation (Supplement 101) is only a pseudo transfer syntax used to
+ *  refer to MIME encapsulated HL7 CDA documents from a DICOMDIR when stored
+ *  on a DICOM storage medium. It is never used for network communication
+ *  or encoding of DICOM objects.
+ */
+#define GKUID_RFC2557MIMEEncapsulationTransferSyntax "1.2.840.10008.1.2.6.1"
+
+/** XML encoding (Supplement 114) is only a pseudo transfer syntax used to refer to
+ *  encapsulated HL7 CDA documents from a DICOMDIR when stored on a DICOM storage
+ *  medium. It is never used for network communication or encoding of DICOM objects.
+ */
+#define GKUID_XMLEncodingTransferSyntax "1.2.840.10008.1.2.6.2"
+
+/*
+** Defined SOP Class UIDs according to DICOM standard
+*/
+
+// Storage
+#define GKUID_RETIRED_StoredPrintStorage                             "1.2.840.10008.5.1.1.27"
+#define GKUID_RETIRED_HardcopyGrayscaleImageStorage                  "1.2.840.10008.5.1.1.29"
+#define GKUID_RETIRED_HardcopyColorImageStorage                      "1.2.840.10008.5.1.1.30"
+#define GKUID_ComputedRadiographyImageStorage                        "1.2.840.10008.5.1.4.1.1.1"
+#define GKUID_DigitalXRayImageStorageForPresentation                 "1.2.840.10008.5.1.4.1.1.1.1"
+#define GKUID_DigitalXRayImageStorageForProcessing                   "1.2.840.10008.5.1.4.1.1.1.1.1"
+#define GKUID_DigitalMammographyXRayImageStorageForPresentation      "1.2.840.10008.5.1.4.1.1.1.2"
+#define GKUID_DigitalMammographyXRayImageStorageForProcessing        "1.2.840.10008.5.1.4.1.1.1.2.1"
+#define GKUID_DigitalIntraOralXRayImageStorageForPresentation        "1.2.840.10008.5.1.4.1.1.1.3"
+#define GKUID_DigitalIntraOralXRayImageStorageForProcessing          "1.2.840.10008.5.1.4.1.1.1.3.1"
+#define GKUID_CTImageStorage                                         "1.2.840.10008.5.1.4.1.1.2"
+#define GKUID_EnhancedCTImageStorage                                 "1.2.840.10008.5.1.4.1.1.2.1"
+#define GKUID_RETIRED_UltrasoundMultiframeImageStorage               "1.2.840.10008.5.1.4.1.1.3"
+#define GKUID_UltrasoundMultiframeImageStorage                       "1.2.840.10008.5.1.4.1.1.3.1"
+#define GKUID_MRImageStorage                                         "1.2.840.10008.5.1.4.1.1.4"
+#define GKUID_EnhancedMRImageStorage                                 "1.2.840.10008.5.1.4.1.1.4.1"
+#define GKUID_MRSpectroscopyStorage                                  "1.2.840.10008.5.1.4.1.1.4.2"
+#define GKUID_EnhancedMRColorImageStorage                            "1.2.840.10008.5.1.4.1.1.4.3"
+#define GKUID_RETIRED_NuclearMedicineImageStorage                    "1.2.840.10008.5.1.4.1.1.5"
+#define GKUID_RETIRED_UltrasoundImageStorage                         "1.2.840.10008.5.1.4.1.1.6"
+#define GKUID_UltrasoundImageStorage                                 "1.2.840.10008.5.1.4.1.1.6.1"
+#define GKUID_EnhancedUSVolumeStorage                                "1.2.840.10008.5.1.4.1.1.6.2"
+#define GKUID_SecondaryCaptureImageStorage                           "1.2.840.10008.5.1.4.1.1.7"
+#define GKUID_MultiframeSingleBitSecondaryCaptureImageStorage        "1.2.840.10008.5.1.4.1.1.7.1"
+#define GKUID_MultiframeGrayscaleByteSecondaryCaptureImageStorage    "1.2.840.10008.5.1.4.1.1.7.2"
+#define GKUID_MultiframeGrayscaleWordSecondaryCaptureImageStorage    "1.2.840.10008.5.1.4.1.1.7.3"
+#define GKUID_MultiframeTrueColorSecondaryCaptureImageStorage        "1.2.840.10008.5.1.4.1.1.7.4"
+#define GKUID_RETIRED_StandaloneOverlayStorage                       "1.2.840.10008.5.1.4.1.1.8"
+#define GKUID_RETIRED_StandaloneCurveStorage                         "1.2.840.10008.5.1.4.1.1.9"
+#define GKUID_TwelveLeadECGWaveformStorage                           "1.2.840.10008.5.1.4.1.1.9.1.1"
+#define GKUID_GeneralECGWaveformStorage                              "1.2.840.10008.5.1.4.1.1.9.1.2"
+#define GKUID_AmbulatoryECGWaveformStorage                           "1.2.840.10008.5.1.4.1.1.9.1.3"
+#define GKUID_HemodynamicWaveformStorage                             "1.2.840.10008.5.1.4.1.1.9.2.1"
+#define GKUID_CardiacElectrophysiologyWaveformStorage                "1.2.840.10008.5.1.4.1.1.9.3.1"
+#define GKUID_BasicVoiceAudioWaveformStorage                         "1.2.840.10008.5.1.4.1.1.9.4.1"
+#define GKUID_GeneralAudioWaveformStorage                            "1.2.840.10008.5.1.4.1.1.9.4.2"
+#define GKUID_ArterialPulseWaveformStorage                           "1.2.840.10008.5.1.4.1.1.9.5.1"
+#define GKUID_RespiratoryWaveformStorage                             "1.2.840.10008.5.1.4.1.1.9.6.1"
+#define GKUID_RETIRED_StandaloneModalityLUTStorage                   "1.2.840.10008.5.1.4.1.1.10"
+#define GKUID_RETIRED_StandaloneVOILUTStorage                        "1.2.840.10008.5.1.4.1.1.11"
+#define GKUID_GrayscaleSoftcopyPresentationStateStorage              "1.2.840.10008.5.1.4.1.1.11.1"
+#define GKUID_ColorSoftcopyPresentationStateStorage                  "1.2.840.10008.5.1.4.1.1.11.2"
+#define GKUID_PseudoColorSoftcopyPresentationStateStorage            "1.2.840.10008.5.1.4.1.1.11.3"
+#define GKUID_BlendingSoftcopyPresentationStateStorage               "1.2.840.10008.5.1.4.1.1.11.4"
+#define GKUID_XAXRFGrayscaleSoftcopyPresentationStateStorage         "1.2.840.10008.5.1.4.1.1.11.5"
+#define GKUID_XRayAngiographicImageStorage                           "1.2.840.10008.5.1.4.1.1.12.1"
+#define GKUID_EnhancedXAImageStorage                                 "1.2.840.10008.5.1.4.1.1.12.1.1"
+#define GKUID_XRayRadiofluoroscopicImageStorage                      "1.2.840.10008.5.1.4.1.1.12.2"
+#define GKUID_EnhancedXRFImageStorage                                "1.2.840.10008.5.1.4.1.1.12.2.1"
+#define GKUID_XRay3DAngiographicImageStorage                         "1.2.840.10008.5.1.4.1.1.13.1.1"
+#define GKUID_XRay3DCraniofacialImageStorage                         "1.2.840.10008.5.1.4.1.1.13.1.2"
+#define GKUID_BreastTomosynthesisImageStorage                        "1.2.840.10008.5.1.4.1.1.13.1.3"
+#define GKUID_RETIRED_XRayAngiographicBiPlaneImageStorage            "1.2.840.10008.5.1.4.1.1.12.3"
+#define GKUID_NuclearMedicineImageStorage                            "1.2.840.10008.5.1.4.1.1.20"
+#define GKUID_RawDataStorage                                         "1.2.840.10008.5.1.4.1.1.66"
+#define GKUID_SpatialRegistrationStorage                             "1.2.840.10008.5.1.4.1.1.66.1"
+#define GKUID_SpatialFiducialsStorage                                "1.2.840.10008.5.1.4.1.1.66.2"
+#define GKUID_DeformableSpatialRegistrationStorage                   "1.2.840.10008.5.1.4.1.1.66.3"
+#define GKUID_SegmentationStorage                                    "1.2.840.10008.5.1.4.1.1.66.4"
+#define GKUID_SurfaceSegmentationStorage                             "1.2.840.10008.5.1.4.1.1.66.5"
+#define GKUID_RealWorldValueMappingStorage                           "1.2.840.10008.5.1.4.1.1.67"
+#define GKUID_RETIRED_VLImageStorage                                 "1.2.840.10008.5.1.4.1.1.77.1"
+#define GKUID_VLEndoscopicImageStorage                               "1.2.840.10008.5.1.4.1.1.77.1.1"
+#define GKUID_VideoEndoscopicImageStorage                            "1.2.840.10008.5.1.4.1.1.77.1.1.1"
+#define GKUID_VLMicroscopicImageStorage                              "1.2.840.10008.5.1.4.1.1.77.1.2"
+#define GKUID_VideoMicroscopicImageStorage                           "1.2.840.10008.5.1.4.1.1.77.1.2.1"
+#define GKUID_VLSlideCoordinatesMicroscopicImageStorage              "1.2.840.10008.5.1.4.1.1.77.1.3"
+#define GKUID_VLPhotographicImageStorage                             "1.2.840.10008.5.1.4.1.1.77.1.4"
+#define GKUID_VideoPhotographicImageStorage                          "1.2.840.10008.5.1.4.1.1.77.1.4.1"
+#define GKUID_OphthalmicPhotography8BitImageStorage                  "1.2.840.10008.5.1.4.1.1.77.1.5.1"
+#define GKUID_OphthalmicPhotography16BitImageStorage                 "1.2.840.10008.5.1.4.1.1.77.1.5.2"
+#define GKUID_StereometricRelationshipStorage                        "1.2.840.10008.5.1.4.1.1.77.1.5.3"
+#define GKUID_OphthalmicTomographyImageStorage                       "1.2.840.10008.5.1.4.1.1.77.1.5.4"
+#define GKUID_VLWholeSlideMicroscopyImageStorage                     "1.2.840.10008.5.1.4.1.1.77.1.6"
+#define GKUID_RETIRED_VLMultiFrameImageStorage                       "1.2.840.10008.5.1.4.1.1.77.2"
+#define GKUID_LensometryMeasurementsStorage                          "1.2.840.10008.5.1.4.1.1.78.1"
+#define GKUID_AutorefractionMeasurementsStorage                      "1.2.840.10008.5.1.4.1.1.78.2"
+#define GKUID_KeratometryMeasurementsStorage                         "1.2.840.10008.5.1.4.1.1.78.3"
+#define GKUID_SubjectiveRefractionMeasurementsStorage                "1.2.840.10008.5.1.4.1.1.78.4"
+#define GKUID_VisualAcuityMeasurementsStorage                        "1.2.840.10008.5.1.4.1.1.78.5"
+#define GKUID_SpectaclePrescriptionReportStorage                     "1.2.840.10008.5.1.4.1.1.78.6"
+#define GKUID_OphthalmicAxialMeasurementsStorage                     "1.2.840.10008.5.1.4.1.1.78.7"
+#define GKUID_IntraocularLensCalculationsStorage                     "1.2.840.10008.5.1.4.1.1.78.8"
+#define GKUID_MacularGridThicknessAndVolumeReportStorage             "1.2.840.10008.5.1.4.1.1.79.1"
+#define GKUID_OphthalmicVisualFieldStaticPerimetryMeasurementsStorage "1.2.840.10008.5.1.4.1.1.80.1"
+#define GKUID_BasicTextSRStorage                                     "1.2.840.10008.5.1.4.1.1.88.11"
+#define GKUID_EnhancedSRStorage                                      "1.2.840.10008.5.1.4.1.1.88.22"
+#define GKUID_ComprehensiveSRStorage                                 "1.2.840.10008.5.1.4.1.1.88.33"
+#define GKUID_ProcedureLogStorage                                    "1.2.840.10008.5.1.4.1.1.88.40"
+#define GKUID_MammographyCADSRStorage                                "1.2.840.10008.5.1.4.1.1.88.50"
+#define GKUID_KeyObjectSelectionDocumentStorage                      "1.2.840.10008.5.1.4.1.1.88.59"
+#define GKUID_ChestCADSRStorage                                      "1.2.840.10008.5.1.4.1.1.88.65"
+#define GKUID_XRayRadiationDoseSRStorage                             "1.2.840.10008.5.1.4.1.1.88.67"
+#define GKUID_ColonCADSRStorage                                      "1.2.840.10008.5.1.4.1.1.88.69"
+#define GKUID_ImplantationPlanSRDocumentStorage                      "1.2.840.10008.5.1.4.1.1.88.70"
+#define GKUID_EncapsulatedPDFStorage                                 "1.2.840.10008.5.1.4.1.1.104.1"
+#define GKUID_EncapsulatedCDAStorage                                 "1.2.840.10008.5.1.4.1.1.104.2"
+#define GKUID_PositronEmissionTomographyImageStorage                 "1.2.840.10008.5.1.4.1.1.128"
+#define GKUID_RETIRED_StandalonePETCurveStorage                      "1.2.840.10008.5.1.4.1.1.129"
+#define GKUID_EnhancedPETImageStorage                                "1.2.840.10008.5.1.4.1.1.130"
+#define GKUID_BasicStructuredDisplayStorage                          "1.2.840.10008.5.1.4.1.1.131"
+#define GKUID_RTImageStorage                                         "1.2.840.10008.5.1.4.1.1.481.1"
+#define GKUID_RTDoseStorage                                          "1.2.840.10008.5.1.4.1.1.481.2"
+#define GKUID_RTStructureSetStorage                                  "1.2.840.10008.5.1.4.1.1.481.3"
+#define GKUID_RTBeamsTreatmentRecordStorage                          "1.2.840.10008.5.1.4.1.1.481.4"
+#define GKUID_RTPlanStorage                                          "1.2.840.10008.5.1.4.1.1.481.5"
+#define GKUID_RTBrachyTreatmentRecordStorage                         "1.2.840.10008.5.1.4.1.1.481.6"
+#define GKUID_RTTreatmentSummaryRecordStorage                        "1.2.840.10008.5.1.4.1.1.481.7"
+#define GKUID_RTIonPlanStorage                                       "1.2.840.10008.5.1.4.1.1.481.8"
+#define GKUID_RTIonBeamsTreatmentRecordStorage                       "1.2.840.10008.5.1.4.1.1.481.9"
+#define GKUID_GenericImplantTemplateStorage                          "1.2.840.10008.5.1.4.43.1"
+#define GKUID_ImplantAssemblyTemplateStorage                         "1.2.840.10008.5.1.4.44.1"
+#define GKUID_ImplantTemplateGroupStorage                            "1.2.840.10008.5.1.4.45.1"
+
+// DICOMDIR; was GKUID_BasicDirectoryStorageSOPClass in DCMTK versions prior to 3.5.3
+#define GKUID_MediaStorageDirectoryStorage                           "1.2.840.10008.1.3.10"
+
+/* Hanging Protocols Storage is a special case because hanging protocols use a different
+   information model, i.e. there is no patient, study or series in a hanging protocol IOD. */
+#define GKUID_HangingProtocolStorage                                 "1.2.840.10008.5.1.4.38.1"
+
+// Query/Retrieve
+#define GKUID_FINDPatientRootQueryRetrieveInformationModel           "1.2.840.10008.5.1.4.1.2.1.1"
+#define GKUID_MOVEPatientRootQueryRetrieveInformationModel           "1.2.840.10008.5.1.4.1.2.1.2"
+#define GKUID_GETPatientRootQueryRetrieveInformationModel            "1.2.840.10008.5.1.4.1.2.1.3"
+#define GKUID_FINDStudyRootQueryRetrieveInformationModel             "1.2.840.10008.5.1.4.1.2.2.1"
+#define GKUID_MOVEStudyRootQueryRetrieveInformationModel             "1.2.840.10008.5.1.4.1.2.2.2"
+#define GKUID_GETStudyRootQueryRetrieveInformationModel              "1.2.840.10008.5.1.4.1.2.2.3"
+#define GKUID_RETIRED_FINDPatientStudyOnlyQueryRetrieveInformationModel "1.2.840.10008.5.1.4.1.2.3.1"
+#define GKUID_RETIRED_MOVEPatientStudyOnlyQueryRetrieveInformationModel "1.2.840.10008.5.1.4.1.2.3.2"
+#define GKUID_RETIRED_GETPatientStudyOnlyQueryRetrieveInformationModel  "1.2.840.10008.5.1.4.1.2.3.3"
+#define GKUID_RETIRED_MOVECompositeInstanceRootRetrieve              "1.2.840.10008.5.1.4.1.2.4.2"
+#define GKUID_RETIRED_GETCompositeInstanceRootRetrieve               "1.2.840.10008.5.1.4.1.2.4.3"
+#define GKUID_RETIRED_GETCompositeInstanceRetrieveWithoutBulkData    "1.2.840.10008.5.1.4.1.2.5.3"
+
+// Worklist
+#define GKUID_FINDModalityWorklistInformationModel                   "1.2.840.10008.5.1.4.31"
+#define GKUID_FINDGeneralPurposeWorklistInformationModel             "1.2.840.10008.5.1.4.32.1"
+
+// General Purpose Worklist
+#define GKUID_GeneralPurposeScheduledProcedureStepSOPClass           "1.2.840.10008.5.1.4.32.2"
+#define GKUID_GeneralPurposePerformedProcedureStepSOPClass           "1.2.840.10008.5.1.4.32.3"
+#define GKUID_GeneralPurposeWorklistManagementMetaSOPClass           "1.2.840.10008.5.1.4.32"
+
+// MPPS
+#define GKUID_ModalityPerformedProcedureStepSOPClass                 "1.2.840.10008.3.1.2.3.3"
+#define GKUID_ModalityPerformedProcedureStepRetrieveSOPClass         "1.2.840.10008.3.1.2.3.4"
+#define GKUID_ModalityPerformedProcedureStepNotificationSOPClass     "1.2.840.10008.3.1.2.3.5"
+
+// Unified Worklist and Procedure Step
+#define GKUID_UnifiedWorklistAndProcedureStepServiceClass            "1.2.840.10008.5.1.4.34.4"
+#define GKUID_UnifiedProcedureStepPushSOPClass                       "1.2.840.10008.5.1.4.34.4.1"
+#define GKUID_UnifiedProcedureStepWatchSOPClass                      "1.2.840.10008.5.1.4.34.4.2"
+#define GKUID_UnifiedProcedureStepPullSOPClass                       "1.2.840.10008.5.1.4.34.4.3"
+#define GKUID_UnifiedProcedureStepEventSOPClass                      "1.2.840.10008.5.1.4.34.4.4"
+#define GKUID_UnifiedWorklistAndProcedureStepSOPInstance             "1.2.840.10008.5.1.4.34.5"
+
+// Storage Commitment
+#define GKUID_StorageCommitmentPushModelSOPClass                     "1.2.840.10008.1.20.1"
+#define GKUID_StorageCommitmentPushModelSOPInstance                  "1.2.840.10008.1.20.1.1"
+#define GKUID_RETIRED_StorageCommitmentPullModelSOPClass             "1.2.840.10008.1.20.2"
+#define GKUID_RETIRED_StorageCommitmentPullModelSOPInstance          "1.2.840.10008.1.20.2.1"
+
+// Hanging Protocols
+#define GKUID_FINDHangingProtocolInformationModel                    "1.2.840.10008.5.1.4.38.2"
+#define GKUID_MOVEHangingProtocolInformationModel                    "1.2.840.10008.5.1.4.38.3"
+
+// Relevant Patient Information Query
+#define GKUID_GeneralRelevantPatientInformationQuery                 "1.2.840.10008.5.1.4.37.1"
+#define GKUID_BreastImagingRelevantPatientInformationQuery           "1.2.840.10008.5.1.4.37.2"
+#define GKUID_CardiacRelevantPatientInformationQuery                 "1.2.840.10008.5.1.4.37.3"
+
+// Color Palette Storage and Query/Retrieve
+#define GKUID_ColorPaletteStorage                                    "1.2.840.10008.5.1.4.39.1"
+#define GKUID_FINDColorPaletteInformationModel                       "1.2.840.10008.5.1.4.39.2"
+#define GKUID_MOVEColorPaletteInformationModel                       "1.2.840.10008.5.1.4.39.3"
+#define GKUID_GETColorPaletteInformationModel                        "1.2.840.10008.5.1.4.39.4"
+
+// Implant Template Query/Retrieve
+#define GKUID_FINDGenericImplantTemplateInformationModel             "1.2.840.10008.5.1.4.43.2"
+#define GKUID_MOVEGenericImplantTemplateInformationModel             "1.2.840.10008.5.1.4.43.3"
+#define GKUID_GETGenericImplantTemplateInformationModel              "1.2.840.10008.5.1.4.43.4"
+#define GKUID_FINDImplantAssemblyTemplateInformationModel            "1.2.840.10008.5.1.4.44.2"
+#define GKUID_MOVEImplantAssemblyTemplateInformationModel            "1.2.840.10008.5.1.4.44.3"
+#define GKUID_GETImplantAssemblyTemplateInformationModel             "1.2.840.10008.5.1.4.44.4"
+#define GKUID_FINDImplantTemplateGroupInformationModel               "1.2.840.10008.5.1.4.45.2"
+#define GKUID_MOVEImplantTemplateGroupInformationModel               "1.2.840.10008.5.1.4.45.3"
+#define GKUID_GETImplantTemplateGroupInformationModel                "1.2.840.10008.5.1.4.45.4"
+
+// Print
+#define GKUID_BasicFilmSessionSOPClass                               "1.2.840.10008.5.1.1.1"
+#define GKUID_BasicFilmBoxSOPClass                                   "1.2.840.10008.5.1.1.2"
+#define GKUID_BasicGrayscaleImageBoxSOPClass                         "1.2.840.10008.5.1.1.4"
+#define GKUID_BasicColorImageBoxSOPClass                             "1.2.840.10008.5.1.1.4.1"
+#define GKUID_RETIRED_ReferencedImageBoxSOPClass                     "1.2.840.10008.5.1.1.4.2"
+#define GKUID_BasicGrayscalePrintManagementMetaSOPClass              "1.2.840.10008.5.1.1.9"
+#define GKUID_RETIRED_ReferencedGrayscalePrintManagementMetaSOPClass "1.2.840.10008.5.1.1.9.1"
+#define GKUID_PrintJobSOPClass                                       "1.2.840.10008.5.1.1.14"
+#define GKUID_BasicAnnotationBoxSOPClass                             "1.2.840.10008.5.1.1.15"
+#define GKUID_PrinterSOPClass                                        "1.2.840.10008.5.1.1.16"
+#define GKUID_PrinterConfigurationRetrievalSOPClass                  "1.2.840.10008.5.1.1.16.376"
+#define GKUID_PrinterSOPInstance                                     "1.2.840.10008.5.1.1.17"
+#define GKUID_PrinterConfigurationRetrievalSOPInstance               "1.2.840.10008.5.1.1.17.376"
+#define GKUID_BasicColorPrintManagementMetaSOPClass                  "1.2.840.10008.5.1.1.18"
+#define GKUID_RETIRED_ReferencedColorPrintManagementMetaSOPClass     "1.2.840.10008.5.1.1.18.1"
+#define GKUID_VOILUTBoxSOPClass                                      "1.2.840.10008.5.1.1.22"
+#define GKUID_PresentationLUTSOPClass                                "1.2.840.10008.5.1.1.23"
+#define GKUID_RETIRED_ImageOverlayBoxSOPClass                        "1.2.840.10008.5.1.1.24"
+#define GKUID_RETIRED_BasicPrintImageOverlayBoxSOPClass              "1.2.840.10008.5.1.1.24.1"
+#define GKUID_RETIRED_PrintQueueSOPInstance                          "1.2.840.10008.5.1.1.25"
+#define GKUID_RETIRED_PrintQueueManagementSOPClass                   "1.2.840.10008.5.1.1.26"
+#define GKUID_RETIRED_PullPrintRequestSOPClass                       "1.2.840.10008.5.1.1.31"
+#define GKUID_RETIRED_PullStoredPrintManagementMetaSOPClass          "1.2.840.10008.5.1.1.32"
+
+// Detached Management
+#define GKUID_RETIRED_DetachedPatientManagementSOPClass              "1.2.840.10008.3.1.2.1.1"
+#define GKUID_RETIRED_DetachedPatientManagementMetaSOPClass          "1.2.840.10008.3.1.2.1.4"
+#define GKUID_RETIRED_DetachedVisitManagementSOPClass                "1.2.840.10008.3.1.2.2.1"
+#define GKUID_RETIRED_DetachedStudyManagementSOPClass                "1.2.840.10008.3.1.2.3.1"
+#define GKUID_RETIRED_DetachedResultsManagementSOPClass              "1.2.840.10008.3.1.2.5.1"
+#define GKUID_RETIRED_DetachedResultsManagementMetaSOPClass          "1.2.840.10008.3.1.2.5.4"
+#define GKUID_RETIRED_DetachedStudyManagementMetaSOPClass            "1.2.840.10008.3.1.2.5.5"
+#define GKUID_RETIRED_DetachedInterpretationManagementSOPClass       "1.2.840.10008.3.1.2.6.1"
+
+// Procedure Log
+#define GKUID_ProceduralEventLoggingSOPClass                         "1.2.840.10008.1.40"
+#define GKUID_ProceduralEventLoggingSOPInstance                      "1.2.840.10008.1.40.1"
+
+// Substance Administration
+#define GKUID_SubstanceAdministrationLoggingSOPClass                 "1.2.840.10008.1.42"
+#define GKUID_SubstanceAdministrationLoggingSOPInstance              "1.2.840.10008.1.42.1"
+#define GKUID_ProductCharacteristicsQuerySOPClass                    "1.2.840.10008.5.1.4.41"
+#define GKUID_SubstanceApprovalQuerySOPClass                         "1.2.840.10008.5.1.4.42"
+
+// Media Creation
+#define GKUID_MediaCreationManagementSOPClass                        "1.2.840.10008.5.1.1.33"
+
+// SOP Class Relationship Negotiation
+#define GKUID_StorageServiceClass                                    "1.2.840.10008.4.2"
+
+// Instance Availability Notification
+#define GKUID_InstanceAvailabilityNotificationSOPClass               "1.2.840.10008.5.1.4.33"
+
+// Application Hosting
+#define GKUID_NativeDICOMModel                                       "1.2.840.10008.7.1.1"
+#define GKUID_AbstractMultiDimensionalImageModel                     "1.2.840.10008.7.1.2"
+
+// Other
+#define GKUID_VerificationSOPClass                                   "1.2.840.10008.1.1"
+#define GKUID_RETIRED_BasicStudyContentNotificationSOPClass          "1.2.840.10008.1.9"
+#define GKUID_RETIRED_StudyComponentManagementSOPClass               "1.2.840.10008.3.1.2.3.2"
+
+// Coding Schemes
+#define GKUID_DICOMControlledTerminologyCodingScheme                 "1.2.840.10008.2.16.4"
+#define GKUID_DICOMUIDRegistryCodingScheme                           "1.2.840.10008.2.6.1"
+
+// Configuration Management LDAP UIDs
+#define GKUID_LDAP_dicomDeviceName                                   "1.2.840.10008.15.0.3.1"
+#define GKUID_LDAP_dicomDescription                                  "1.2.840.10008.15.0.3.2"
+#define GKUID_LDAP_dicomManufacturer                                 "1.2.840.10008.15.0.3.3"
+#define GKUID_LDAP_dicomManufacturerModelName                        "1.2.840.10008.15.0.3.4"
+#define GKUID_LDAP_dicomSoftwareVersion                              "1.2.840.10008.15.0.3.5"
+#define GKUID_LDAP_dicomVendorData                                   "1.2.840.10008.15.0.3.6"
+#define GKUID_LDAP_dicomAETitle                                      "1.2.840.10008.15.0.3.7"
+#define GKUID_LDAP_dicomNetworkConnectionReference                   "1.2.840.10008.15.0.3.8"
+#define GKUID_LDAP_dicomApplicationCluster                           "1.2.840.10008.15.0.3.9"
+#define GKUID_LDAP_dicomAssociationInitiator                         "1.2.840.10008.15.0.3.10"
+#define GKUID_LDAP_dicomAssociationAcceptor                          "1.2.840.10008.15.0.3.11"
+#define GKUID_LDAP_dicomHostname                                     "1.2.840.10008.15.0.3.12"
+#define GKUID_LDAP_dicomPort                                         "1.2.840.10008.15.0.3.13"
+#define GKUID_LDAP_dicomSOPClass                                     "1.2.840.10008.15.0.3.14"
+#define GKUID_LDAP_dicomTransferRole                                 "1.2.840.10008.15.0.3.15"
+#define GKUID_LDAP_dicomTransferSyntax                               "1.2.840.10008.15.0.3.16"
+#define GKUID_LDAP_dicomPrimaryDeviceType                            "1.2.840.10008.15.0.3.17"
+#define GKUID_LDAP_dicomRelatedDeviceReference                       "1.2.840.10008.15.0.3.18"
+#define GKUID_LDAP_dicomPreferredCalledAETitle                       "1.2.840.10008.15.0.3.19"
+#define GKUID_LDAP_dicomTLSCyphersuite                               "1.2.840.10008.15.0.3.20"
+#define GKUID_LDAP_dicomAuthorizedNodeCertificateReference           "1.2.840.10008.15.0.3.21"
+#define GKUID_LDAP_dicomThisNodeCertificateReference                 "1.2.840.10008.15.0.3.22"
+#define GKUID_LDAP_dicomInstalled                                    "1.2.840.10008.15.0.3.23"
+#define GKUID_LDAP_dicomStationName                                  "1.2.840.10008.15.0.3.24"
+#define GKUID_LDAP_dicomDeviceSerialNumber                           "1.2.840.10008.15.0.3.25"
+#define GKUID_LDAP_dicomInstitutionName                              "1.2.840.10008.15.0.3.26"
+#define GKUID_LDAP_dicomInstitutionAddress                           "1.2.840.10008.15.0.3.27"
+#define GKUID_LDAP_dicomInstitutionDepartmentName                    "1.2.840.10008.15.0.3.28"
+#define GKUID_LDAP_dicomIssuerOfPatientID                            "1.2.840.10008.15.0.3.29"
+#define GKUID_LDAP_dicomPreferredCallingAETitle                      "1.2.840.10008.15.0.3.30"
+#define GKUID_LDAP_dicomSupportedCharacterSet                        "1.2.840.10008.15.0.3.31"
+#define GKUID_LDAP_dicomConfigurationRoot                            "1.2.840.10008.15.0.4.1"
+#define GKUID_LDAP_dicomDevicesRoot                                  "1.2.840.10008.15.0.4.2"
+#define GKUID_LDAP_dicomUniqueAETitlesRegistryRoot                   "1.2.840.10008.15.0.4.3"
+#define GKUID_LDAP_dicomDevice                                       "1.2.840.10008.15.0.4.4"
+#define GKUID_LDAP_dicomNetworkAE                                    "1.2.840.10008.15.0.4.5"
+#define GKUID_LDAP_dicomNetworkConnection                            "1.2.840.10008.15.0.4.6"
+#define GKUID_LDAP_dicomUniqueAETitle                                "1.2.840.10008.15.0.4.7"
+#define GKUID_LDAP_dicomTransferCapability                           "1.2.840.10008.15.0.4.8"
+
+// UTC Synchronization Frame of Reference (CP 432)
+#define GKUID_UniversalCoordinatedTimeSynchronizationFrameOfReference "1.2.840.10008.15.1.1"
+
+// Well-known Frame of References
+#define GKUID_TalairachBrainAtlasFrameOfReference                    "1.2.840.10008.1.4.1.1"
+#define GKUID_SPM2T1FrameOfReference                                 "1.2.840.10008.1.4.1.2"
+#define GKUID_SPM2T2FrameOfReference                                 "1.2.840.10008.1.4.1.3"
+#define GKUID_SPM2PDFrameOfReference                                 "1.2.840.10008.1.4.1.4"
+#define GKUID_SPM2EPIFrameOfReference                                "1.2.840.10008.1.4.1.5"
+#define GKUID_SPM2FILT1FrameOfReference                              "1.2.840.10008.1.4.1.6"
+#define GKUID_SPM2PETFrameOfReference                                "1.2.840.10008.1.4.1.7"
+#define GKUID_SPM2TRANSMFrameOfReference                             "1.2.840.10008.1.4.1.8"
+#define GKUID_SPM2SPECTFrameOfReference                              "1.2.840.10008.1.4.1.9"
+#define GKUID_SPM2GRAYFrameOfReference                               "1.2.840.10008.1.4.1.10"
+#define GKUID_SPM2WHITEFrameOfReference                              "1.2.840.10008.1.4.1.11"
+#define GKUID_SPM2CSFFrameOfReference                                "1.2.840.10008.1.4.1.12"
+#define GKUID_SPM2BRAINMASKFrameOfReference                          "1.2.840.10008.1.4.1.13"
+#define GKUID_SPM2AVG305T1FrameOfReference                           "1.2.840.10008.1.4.1.14"
+#define GKUID_SPM2AVG152T1FrameOfReference                           "1.2.840.10008.1.4.1.15"
+#define GKUID_SPM2AVG152T2FrameOfReference                           "1.2.840.10008.1.4.1.16"
+#define GKUID_SPM2AVG152PDFrameOfReference                           "1.2.840.10008.1.4.1.17"
+#define GKUID_SPM2SINGLESUBJT1FrameOfReference                       "1.2.840.10008.1.4.1.18"
+#define GKUID_ICBM452T1FrameOfReference                              "1.2.840.10008.1.4.2.1"
+#define GKUID_ICBMSingleSubjectMRIFrameOfReference                   "1.2.840.10008.1.4.2.2"
+
+// Well-known SOP Instances for Color Palettes
+#define GKUID_HotIronColorPaletteSOPInstance                         "1.2.840.10008.1.5.1"
+#define GKUID_PETColorPaletteSOPInstance                             "1.2.840.10008.1.5.2"
+#define GKUID_HotMetalBlueColorPaletteSOPInstance                    "1.2.840.10008.1.5.3"
+#define GKUID_PET20StepColorPaletteSOPInstance                       "1.2.840.10008.1.5.4"
+
+// Private DCMTK UIDs
+
+// Private SOP Class UID used to shutdown external network applications
+#define GKUID_PrivateShutdownSOPClass                                "1.2.276.0.7230010.3.4.1915765545.18030.917282194.0"
+
+
+/* DRAFT SUPPLEMENTS - EXPERIMENTAL USE ONLY */
+
+/*
+ * The following UIDs were defined in "frozen draft for trial implementation" versions
+ * of various DICOM supplements and are or will be changed before final text.
+ * Since it is likely that trial implementations exist, we leave the UIDs in the dictionary.
+ */
+
+/* Supplement 23 Frozen Draft (November 1997) */
+#define GKUID_DRAFT_SRTextStorage                                    "1.2.840.10008.5.1.4.1.1.88.1"
+#define GKUID_DRAFT_SRAudioStorage                                   "1.2.840.10008.5.1.4.1.1.88.2"
+#define GKUID_DRAFT_SRDetailStorage                                  "1.2.840.10008.5.1.4.1.1.88.3"
+#define GKUID_DRAFT_SRComprehensiveStorage                           "1.2.840.10008.5.1.4.1.1.88.4"
+
+/* Supplement 30 Draft 08 for Demonstration (October 1997) */
+#define GKUID_DRAFT_WaveformStorage                                  "1.2.840.10008.5.1.4.1.1.9.1"
+
+/* Supplement 74 Frozen Draft (October 2007) */
+#define GKUID_DRAFT_RTBeamsDeliveryInstructionStorage                "1.2.840.10008.5.1.4.34.1"
+#define GKUID_DRAFT_RTConventionalMachineVerification                "1.2.840.10008.5.1.4.34.2"
+#define GKUID_DRAFT_RTIonMachineVerification                         "1.2.840.10008.5.1.4.34.3"
diff --git a/cadxcore/api/dicom/dicom_legacy.h b/cadxcore/api/dicom/dicom_legacy.h
new file mode 100644
index 0000000..2d833c0
--- /dev/null
+++ b/cadxcore/api/dicom/dicom_legacy.h
@@ -0,0 +1,15 @@
+
+
+#ifdef DCMTK_POST_20170228
+inline DcmElement *newDicomElement(const DcmTagKey& key)
+{
+	return DcmItem::newDicomElement(key); 
+}
+
+inline OFCondition newDicomElement(DcmElement *&newElement,
+                                       const DcmTagKey &tag)
+{
+	return DcmItem::newDicomElement(newElement, tag); 
+}
+
+#endif 
diff --git a/cadxcore/api/dicom/dicomdataset.cpp b/cadxcore/api/dicom/dicomdataset.cpp
new file mode 100644
index 0000000..933cce1
--- /dev/null
+++ b/cadxcore/api/dicom/dicomdataset.cpp
@@ -0,0 +1,199 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "dicomdataset.h"
+
+static const std::string empty;
+
+
+GIL::DICOM::DicomDataset::DicomDataset()
+{
+}
+
+GIL::DICOM::DicomDataset::~DicomDataset()
+{
+}
+
+
+//a�ade referencias a las imagenes a las que hace referencia
+void GIL::DICOM::DicomDataset::AddReference(const std::string& sopClassUID, const std::string& sopInstanceUID)
+{
+        //se busca la secuencia de referencias
+        GIL::DICOM::DicomDataset referencia;
+        referencia.tags[std::string("0008|1150")] =  sopClassUID;
+        referencia.tags[std::string("0008|1155")] =  sopInstanceUID;
+        DicomDataset* pSecuencia_referencias = buscar_secuencia("0008|1140");
+        if (  pSecuencia_referencias== NULL) {
+                DicomDataset secuencia_referencias;
+                secuencia_referencias.items.push_back(referencia);
+                secuencia_referencias.tagName = "0008|1140";
+                secuencias.push_back(secuencia_referencias);
+        } else {
+                //se busca si ya esta metida la referencia
+                bool encontrado = false;
+                for(GIL::DICOM::DicomDataset::DatasetList::iterator it = pSecuencia_referencias->items.begin(); it!= pSecuencia_referencias->items.end(); ++it) {
+                        std::string uid;
+                        if((*it).getTag("0008|1155",uid)) {
+                                if (uid == sopInstanceUID) {
+                                        encontrado = true;
+                                        break;
+                                }
+                        }
+                }
+                if(!encontrado) {
+                        pSecuencia_referencias->items.push_back(referencia);
+                }
+        }
+}
+
+//a�ade referencias a las imagenes originales
+void GIL::DICOM::DicomDataset::AddReferenceSource(const std::string& sopClassUID, const std::string& sopInstanceUID)
+{
+        //se busca la secuencia de referencias
+        GIL::DICOM::DicomDataset referencia;
+        referencia.tags[std::string("0008|1150")] =  sopClassUID;
+        referencia.tags[std::string("0008|1155")] =  sopInstanceUID;
+        DicomDataset* pSecuencia_referencias = buscar_secuencia("0008|2112");
+        if (  pSecuencia_referencias== NULL) {
+                DicomDataset secuencia_referencias;
+                secuencia_referencias.items.push_back(referencia);
+                secuencia_referencias.tagName = "0008|2112";
+                secuencias.push_back(secuencia_referencias);
+        } else {
+                //se busca si ya esta metida la referencia
+                bool encontrado = false;
+                for(GIL::DICOM::DicomDataset::DatasetList::iterator it = pSecuencia_referencias->items.begin(); it!= pSecuencia_referencias->items.end(); ++it) {
+                        std::string uid;
+                        if((*it).getTag("0008|1155",uid)) {
+                                if (uid == sopInstanceUID) {
+                                        encontrado = true;
+                                        break;
+                                }
+                        }
+                }
+                if(!encontrado) {
+                        pSecuencia_referencias->items.push_back(referencia);
+                }
+        }
+}
+
+void GIL::DICOM::DicomDataset::clear()
+{
+        secuencias.clear();
+        items.clear();
+        tags.clear();
+}
+
+GIL::DICOM::DicomDataset* GIL::DICOM::DicomDataset::buscar_secuencia(const char* tag)
+{
+        std::string stag = tag;
+        return buscar_secuencia(stag);
+}
+
+GIL::DICOM::DicomDataset* GIL::DICOM::DicomDataset::buscar_secuencia(const std::string & tag)
+{
+        for (DatasetList::iterator it = secuencias.begin(); it != secuencias.end(); ++it) {
+                if ((*it).tagName == tag) {
+                        return &(*it);
+                }
+        }
+        return NULL;
+}
+
+/* Obtiene un tag y lo asigna en el par�metro de salida valor.
+Devuelve true si el tag existe y false si el tag no existe */
+bool GIL::DICOM::DicomDataset::getTag(const std::string& tag, std::string& valor) const
+{
+        ListaTags::const_iterator it = tags.find(tag);
+        bool found = false;
+        if (it != tags.end()) {
+                valor = (*it).second;
+                found = true;
+        }
+        return found;
+}
+
+/* Obtiene un tag y lo asigna en el par�metro de salida valor.
+Devuelve true si el tag existe y false si el tag no existe */
+bool GIL::DICOM::DicomDataset::getTag(const char* tag, std::string& valor) const
+{
+        ListaTags::const_iterator it = tags.find(tag);
+        bool found = false;
+        if (it != tags.end()) {
+                valor = (*it).second;
+                found = true;
+        }
+        return found;
+}
+
+const std::string& GIL::DICOM::DicomDataset::getTag(const std::string& tag) const
+{
+        ListaTags::const_iterator it = tags.find(tag);
+        if (it != tags.end()) {
+                return (*it).second;
+        }
+        return empty;
+}
+
+const std::string& GIL::DICOM::DicomDataset::getTag(const char* tag) const
+{
+        ListaTags::const_iterator it = tags.find(tag);
+        if (it != tags.end()) {
+                return (*it).second;
+        }
+        return empty;
+}
+
+
+void GIL::DICOM::DicomDataset::dump(std::ostream& out, int indentLevel) const
+{
+        for (int i = 0; i < indentLevel; i++) {
+                out << " ";
+        }
+        out << "[ " << std::endl;
+
+        for (DatasetList::const_iterator it = secuencias.begin(); it != secuencias.end(); ++it) {
+                for (int i = 0; i < indentLevel + 3; i++) {
+                        out << " ";
+                }
+                out << "SEQ " << (*it).tagName << std::endl;
+                (*it).dump(out, indentLevel + 6);
+        }
+        for (DatasetList::const_iterator it = items.begin(); it != items.end(); ++it) {
+                for (int i = 0; i < indentLevel + 3; i++) {
+                        out << " ";
+                }
+                out << "ITEM " << std::endl;
+
+                (*it).dump(out, indentLevel + 6);
+        }
+        for (ListaTags::const_iterator it = tags.begin(); it != tags.end(); ++it) {
+                for (int i = 0; i < indentLevel + 3; i++) {
+                        out << " ";
+                }
+                out << "TAG " << (*it).first << " = " << (*it).second << std::endl;
+
+        }
+        for (int i = 0; i < indentLevel; i++) {
+                out << " ";
+        }
+        out << "]" << std::endl;
+}
diff --git a/cadxcore/api/dicom/dicomdataset.h b/cadxcore/api/dicom/dicomdataset.h
new file mode 100644
index 0000000..ed535bd
--- /dev/null
+++ b/cadxcore/api/dicom/dicomdataset.h
@@ -0,0 +1,111 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef DICOMDATASET_H
+#define DICOMDATASET_H
+
+#include <string>
+#include <sstream>
+#include <list>
+#include <map>
+#include <ostream>
+#include <api/api.h>
+
+namespace GIL
+{
+namespace DICOM
+{
+
+typedef std::map<std::string, std::string> ListaTags;
+
+class EXTAPI DicomDataset
+{
+
+private:
+
+
+public:
+
+        typedef std::list<DicomDataset> DatasetList;
+
+        DatasetList secuencias;
+        DatasetList items;
+        ListaTags tags;
+
+        std::string tagName;
+
+        DicomDataset() ;
+
+        ~DicomDataset() ;
+
+        //a�ade referencias a las imagenes a las que hace referencia
+        void AddReference(const std::string& sopClassUID, const std::string& sopInstanceUID);
+
+        //a�ade referencias a las imagenes originales
+        void AddReferenceSource(const std::string& sopClassUID, const std::string& sopInstanceUID);
+
+        void clear();
+
+        DicomDataset* buscar_secuencia(const char* tag);
+
+        DicomDataset* buscar_secuencia(const std::string & tag);
+
+        /* Obtiene un tag y lo asigna en el par�metro de salida valor.
+        Devuelve true si el tag existe y false si el tag no existe */
+        bool getTag(const std::string& tag, std::string & valor) const;
+
+        bool getTag(const char* tag, std::string & valor) const;
+
+        const std::string& getTag(const char* tag) const;
+        const std::string& getTag(const std::string& tag) const;
+
+        template<class T>
+        inline T getTagAs(const std::string& tag, const T& defaultValue)
+        {
+                T ret = defaultValue;
+                std::stringstream is(getTag(tag));
+                is >> ret;
+                return ret;
+        }
+
+        void dump(std::ostream& out, int indentLevel = 0) const;
+
+        friend std::ostream & operator<<(std::ostream& out, const DicomDataset& j)
+        {
+                j.dump(out);
+                return out;
+        }
+
+        friend std::ostream & operator<<(std::ostream& out, const DicomDataset* j)
+        {
+                if (j == NULL) {
+                        out << "[ NULL ]" << std::endl;
+                } else {
+                        out << *j;
+                }
+                return out;
+        }
+
+};
+}
+}
+
+#endif
diff --git a/cadxcore/api/dicom/icustomassociation.cpp b/cadxcore/api/dicom/icustomassociation.cpp
new file mode 100644
index 0000000..aac5d91
--- /dev/null
+++ b/cadxcore/api/dicom/icustomassociation.cpp
@@ -0,0 +1,36 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/autoptr.h>
+#include "icustomassociation.h"
+
+GIL::DICOM::ICustomAssociation::ICustomAssociation() { }
+
+GIL::DICOM::ICustomAssociation::~ICustomAssociation() { }
+
+void GIL::DICOM::ICustomAssociation::SetStorageSOPClasses(const GIL::DICOM::SOPClassList& SOPClasses)
+{
+        this->SOPClasses = SOPClasses;
+}
+
+const std::string& GIL::DICOM::ICustomAssociation::getErrorMessage() const
+{
+        return errorMsg;
+}
diff --git a/cadxcore/api/dicom/icustomassociation.h b/cadxcore/api/dicom/icustomassociation.h
new file mode 100644
index 0000000..8f83424
--- /dev/null
+++ b/cadxcore/api/dicom/icustomassociation.h
@@ -0,0 +1,67 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <ostream>
+#include <string>
+#include <api/autoptr.h>
+#include <api/dicom/idicom.h>
+#include <api/dicom/idicomconformance.h>
+
+namespace GIL
+{
+namespace DICOM
+{
+class EXTAPI ICustomAssociation
+{
+
+protected:
+
+        ICustomAssociation();
+
+public:
+        virtual ~ICustomAssociation();
+
+public:
+
+        virtual bool Connect(const std::string& serverId, const std::string& local_aet) = 0;
+
+        virtual bool createRQ( const std::string& sopclassUID, const GIL::DICOM::DicomDataset& attributeListIn,  int& status, std::string& affectedSopinstanceUID) = 0;
+        virtual bool setRQ(    const std::string& sopclassUID, const std::string& sopinstanceUID, const GIL::DICOM::DicomDataset& modificationList, int& status) = 0;
+        virtual bool getRQ(    const std::string& sopclassUID, const std::string& sopinstanceUID, const int *attributeIdentifierList, unsigned long numShorts, int& status,  GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& attributeListOut) = 0;
+        virtual bool actionRQ( const std::string& sopclassUID, const std::string& sopinstanceUID, int actionTypeID, const GIL::DICOM::DicomDataset& actionInformation, int& status,  GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& attributeListOut) = 0;
+        virtual bool deleteRQ( const std::string& sopclassUID, const std::string& sopinstanceUID, int& status) = 0;
+
+        virtual bool releaseAssociation() = 0;
+        virtual bool abortAssociation() = 0;
+
+public:
+
+        void SetStorageSOPClasses(const GIL::DICOM::SOPClassList& SOPClasses);
+        const std::string& getErrorMessage() const;
+
+protected:
+
+        std::string errorMsg;
+        GIL::DICOM::SOPClassList SOPClasses;
+};
+}
+}
diff --git a/cadxcore/api/dicom/idicom.cpp b/cadxcore/api/dicom/idicom.cpp
new file mode 100644
index 0000000..e84756a
--- /dev/null
+++ b/cadxcore/api/dicom/idicom.cpp
@@ -0,0 +1,310 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "idicom.h"
+#include "dcmtk/dcmdata/dcdict.h"
+#include <dcmtk/dcmdata/dctk.h>
+#include "dcmtk/dcmimgle/dcmimage.h"
+
+#ifdef DCMTK_POST_20170228
+#include "dicom_legacy.h"
+#endif 
+
+GIL::DICOM::TipoTagPrivado::TipoTagPrivado()
+{
+}
+
+GIL::DICOM::TipoTagPrivado::~TipoTagPrivado()
+{
+}
+
+
+GIL::DICOM::TagPrivadoString::TagPrivadoString(const std::string& valor):Valor(valor)
+{
+}
+
+GIL::DICOM::TagPrivadoString::~TagPrivadoString()
+{
+}
+
+std::string GIL::DICOM::TagPrivadoString::ToString()
+{
+        return Valor;
+}
+
+/*------------------------------*/
+DcmElement* GIL::DICOM::TagPrivadoString::ToElement(unsigned int group, unsigned int element)
+{
+        OFCondition cond;
+        DcmVR vr(EVR_LT);
+        DcmTagKey key(group,element);
+        DcmTag tag(key,vr);
+        if (tag.error() != EC_Normal) {
+                std::cerr << "error al almacenar los tags privados, tag desconocido: (" << group << ","<<element<<")" <<std::endl;
+                return NULL;
+        }
+
+        
+        DcmElement* pElement = newDicomElement(tag);
+
+        if(pElement==NULL) {
+                std::cerr << "error al almacenar los tags privados, error al crear el elemento: (" << group << ","<<element<<") " <<std::endl;
+                return NULL;
+        }
+
+        cond=pElement->putString(Valor.c_str());
+
+        if (cond.bad()) {
+                std::cerr << "error al almacenar los tags privados, error al escribir los datos: (" << group << ","<<element<<")" << cond.text() <<std::endl;
+                return NULL;
+        }
+
+        return pElement;
+}
+/*------------------------------*/
+GIL::DICOM::TagPrivadoUndefined::TagPrivadoUndefined()
+{
+        Valor = NULL;
+        Size = 0;
+}
+
+GIL::DICOM::TagPrivadoUndefined::TagPrivadoUndefined(unsigned int size)
+{
+        Size = size;
+        Valor = new unsigned char[Size];
+}
+
+GIL::DICOM::TagPrivadoUndefined::TagPrivadoUndefined(unsigned char* valor, unsigned int size)
+{
+        Size = size;
+        Valor = new unsigned char[Size];
+        memcpy(Valor,valor,Size*sizeof(unsigned char));
+}
+
+GIL::DICOM::TagPrivadoUndefined::~TagPrivadoUndefined()
+{
+        if (Valor != NULL) {
+                delete [] Valor;
+        }
+        Valor = NULL;
+        Size = 0;
+}
+
+GIL::DICOM::TagPrivadoUndefined::TagPrivadoUndefined(const GIL::DICOM::TagPrivadoUndefined& otro)
+{
+        this->Size = otro.Size;
+        this->Valor = new unsigned char[Size];
+        memcpy(this->Valor, otro.Valor,Size*sizeof(unsigned char));
+}
+
+GIL::DICOM::TagPrivadoUndefined& GIL::DICOM::TagPrivadoUndefined::operator = (const GIL::DICOM::TagPrivadoUndefined& otro)
+{
+        this->Size = otro.Size;
+        this->Valor = new unsigned char[Size];
+        memcpy(this->Valor,otro.Valor,Size*sizeof(unsigned char));
+        return *this;
+}
+
+void GIL::DICOM::TagPrivadoUndefined::Copiar(void* ptrCopia, int size)
+{
+        if(this->Valor != NULL) {
+                delete[] this->Valor;
+        }
+        this->Size = size;
+        this->Valor = new unsigned char [Size];
+        memcpy(this->Valor,ptrCopia,Size*sizeof(unsigned char));
+}
+
+std::string GIL::DICOM::TagPrivadoUndefined::ToString()
+{
+        return std::string ((char*)Valor,Size);
+}
+
+unsigned char* GIL::DICOM::TagPrivadoUndefined::GetValor()
+{
+        return Valor;
+}
+
+unsigned int GIL::DICOM::TagPrivadoUndefined::GetSize()
+{
+        return Size;
+}
+
+DcmElement* GIL::DICOM::TagPrivadoUndefined::ToElement(unsigned int group, unsigned int element)
+{
+        OFCondition cond;
+        DcmVR vr(EVR_UN);
+        DcmTagKey key(group,element);
+        DcmTag tag(key,vr);
+        if (tag.error() != EC_Normal) {
+                std::cerr << "error al almacenar los tags privados, tag desconocido: (" << group << ","<<element<<")" <<std::endl;
+                return NULL;
+        }
+
+        DcmElement* pElement = newDicomElement(tag);
+
+        if(pElement==NULL) {
+                std::cerr << "error al almacenar los tags privados, error al crear el elemento: (" << group << ","<<element<<")" <<std::endl;
+                return NULL;
+        }
+
+        cond=pElement->putUint8Array(Valor,Size);
+
+        if (cond.bad()) {
+                std::cerr << "error al almacenar los tags privados, error al escribir los datos: (" << group << ","<<element<<")" <<std::endl;
+                return NULL;
+        }
+
+        return pElement;
+}
+
+
+
+GIL::DICOM::TipoPrivateTags::TipoPrivateTags()
+{
+
+}
+
+GIL::DICOM::TipoPrivateTags::TipoPrivateTags(const std::string& uidModulo)
+{
+        this->UIDModulo = uidModulo;
+}
+
+GIL::DICOM::TipoPrivateTags::~TipoPrivateTags()
+{
+        Vaciar();
+}
+
+GIL::DICOM::TipoPrivateTags::ListaTags& GIL::DICOM::TipoPrivateTags::GetListaTags()
+{
+        return Tags;
+}
+
+void GIL::DICOM::TipoPrivateTags::Vaciar()
+{
+        for(ListaTags::iterator it=Tags.begin(); it!=Tags.end(); ++it) {
+                if((*it).second!=NULL) {
+                        delete ((*it).second);
+                }
+        }
+        Tags.clear();
+}
+
+void GIL::DICOM::TipoPrivateTags::DeleteTag(unsigned char tag)
+{
+        if(Tags.find(tag)!=Tags.end()) {
+                //se borra
+                if (Tags[tag] != NULL) {
+                        delete Tags[tag];
+                }
+                Tags.erase(tag);
+        }
+}
+
+bool GIL::DICOM::TipoPrivateTags::GetTag(unsigned char tag, std::string& valor)
+{
+        if(Tags.find(tag)!=Tags.end()) {
+                valor = Tags[tag]->ToString();
+                return true;
+        } else {
+                valor="";
+                return false;
+        }
+}
+
+GIL::DICOM::TagPrivadoUndefined* GIL::DICOM::TipoPrivateTags::GetTagUndefined(unsigned char tag)
+{
+        if(Tags.find(tag)!=Tags.end()) {
+                TagPrivadoUndefined* pTag = dynamic_cast<TagPrivadoUndefined*> (Tags[tag]);
+                return pTag;
+        } else {
+                return NULL;
+        }
+}
+
+void GIL::DICOM::TipoPrivateTags::SetTag(unsigned char tag, const std::string& valor)
+{
+        if(Tags.find(tag) != Tags.end()) {
+                delete Tags[tag];
+        }
+        Tags[tag] = new TagPrivadoString(valor);
+}
+
+void GIL::DICOM::TipoPrivateTags::SetTag(unsigned char tag, unsigned char* valor, int longitud)
+{
+        if(Tags.find(tag) != Tags.end()) {
+                delete Tags[tag];
+        }
+        Tags[tag] = new TagPrivadoUndefined(valor, longitud);
+}
+
+GIL::DICOM::TagPrivadoUndefined* GIL::DICOM::TipoPrivateTags::NewTagUndefined(unsigned char tag, int longitud)
+{
+        if(Tags.find(tag) != Tags.end()) {
+                delete Tags[tag];
+        }
+        TagPrivadoUndefined* pTag = new TagPrivadoUndefined(longitud);
+        Tags[tag] = pTag;
+        return pTag;
+}
+
+
+GIL::DICOM::TipoMetaInfo::~TipoMetaInfo()
+{
+}
+
+/* Obtiene un tag y lo asigna en el parámetro de salida valor.
+	Devuelve true si el tag existe y false si el tag no existe */
+bool GIL::DICOM::TipoMetaInfo::getTag(const std::string& tag, std::string & valor)
+{
+        ListaTags::iterator it = tags.find(tag);
+        bool found = false;
+        if (it != tags.end()) {
+                valor = (*it).second;
+                found = true;
+        }
+        return found;
+}
+
+std::string GIL::DICOM::TipoMetaInfo::getTag(const std::string& tag)
+{
+        ListaTags::iterator it = tags.find(tag);
+        if (it != tags.end()) {
+                return (*it).second;
+        }
+        return "";
+}
+
+template<class T> T GIL::DICOM::TipoMetaInfo::getTagAs(const std::string& tag, const T& defaultValue)
+{
+        T ret = defaultValue;
+        std::stringstream is(getTag(tag));
+        is >> ret;
+        return ret;
+}
+
+GIL::DICOM::I2DException::I2DException(const std::string& msg, const std::string& componente, bool fatal) throw()  : GNC::GCS::IException(msg, componente, fatal)
+{
+}
+GIL::DICOM::I2DException::~I2DException() throw()
+{
+}
+
diff --git a/cadxcore/api/dicom/idicom.h b/cadxcore/api/dicom/idicom.h
new file mode 100644
index 0000000..4859d49
--- /dev/null
+++ b/cadxcore/api/dicom/idicom.h
@@ -0,0 +1,159 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <string>
+#include <map>
+#include <list>
+
+#include <api/api.h>
+#include <api/iexception.h>
+#include <api/dicom/dicomdataset.h>
+
+namespace GIL
+{
+namespace DICOM
+{
+class IDICOMImg2DCM;
+class IDICOMManager;
+}
+}
+
+class DcmElement;
+
+namespace GIL
+{
+namespace DICOM
+{
+
+class IDICOMImg2DCM;
+class IDICOMManager;
+
+class EXTAPI TipoTagPrivado
+{
+public:
+        TipoTagPrivado();
+        virtual ~TipoTagPrivado();
+        virtual std::string ToString() = 0;
+        virtual DcmElement* ToElement(unsigned int group, unsigned int element) = 0;
+};
+
+class EXTAPI TagPrivadoString: public TipoTagPrivado
+{
+public:
+        TagPrivadoString(const std::string& valor);
+        virtual ~TagPrivadoString();
+
+        virtual std::string ToString();
+
+        virtual DcmElement* ToElement(unsigned int group, unsigned int element);
+protected:
+        std::string Valor;
+};
+
+
+class EXTAPI TagPrivadoUndefined: public TipoTagPrivado
+{
+public:
+        TagPrivadoUndefined();
+
+        TagPrivadoUndefined(unsigned int size);
+
+        TagPrivadoUndefined(unsigned char* valor, unsigned int size);
+
+        virtual ~TagPrivadoUndefined();
+
+        TagPrivadoUndefined(const TagPrivadoUndefined& otro);
+
+        TagPrivadoUndefined& operator = (const TagPrivadoUndefined& otro) ;
+
+        void Copiar(void* ptrCopia, int size) ;
+
+        virtual std::string ToString() ;
+
+        unsigned char* GetValor();
+
+        unsigned int GetSize();
+
+        virtual DcmElement* ToElement(unsigned int group, unsigned int element);
+protected:
+        unsigned char* Valor;
+        unsigned int Size;
+};
+
+class EXTAPI TipoPrivateTags
+{
+public:
+        typedef std::map<unsigned char, TipoTagPrivado* > ListaTags;
+        std::string UIDModulo;
+
+        TipoPrivateTags();
+
+        TipoPrivateTags(const std::string& uidModulo);
+
+        ~TipoPrivateTags();
+
+        ListaTags& GetListaTags();
+
+        void Vaciar();
+
+        void DeleteTag(unsigned char tag);
+
+        bool GetTag(unsigned char tag, std::string& valor) ;
+
+        TagPrivadoUndefined* GetTagUndefined(unsigned char tag);
+
+        void SetTag(unsigned char tag, const std::string& valor);
+
+        void SetTag(unsigned char tag, unsigned char* valor, int longitud) ;
+
+        TagPrivadoUndefined* NewTagUndefined(unsigned char tag, int longitud);
+protected:
+        ListaTags Tags;
+
+};
+
+class EXTAPI TipoMetaInfo
+{
+public:
+        typedef std::map<std::string, std::string> ListaTags;
+
+        ListaTags tags;
+
+        ~TipoMetaInfo();
+
+        /* Obtiene un tag y lo asigna en el parámetro de salida valor.
+         Devuelve true si el tag existe y false si el tag no existe */
+        bool getTag(const std::string& tag, std::string & valor);
+
+        std::string getTag(const std::string& tag);
+
+        template<class T> T getTagAs(const std::string& tag, const T& defaultValue);
+};
+
+class EXTAPI I2DException : public GNC::GCS::IException
+{
+public:
+        I2DException(const std::string& msg, const std::string& component="GIL/I2D", bool fatal = true) throw();
+        virtual ~I2DException() throw();
+};
+}
+}
diff --git a/cadxcore/api/dicom/idicomconformance.cpp b/cadxcore/api/dicom/idicomconformance.cpp
new file mode 100644
index 0000000..557f550
--- /dev/null
+++ b/cadxcore/api/dicom/idicomconformance.cpp
@@ -0,0 +1,478 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <list>
+#include <map>
+#include <cstring>
+
+#include "idicomconformance.h"
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/ientorno.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/configurationcontroller.h>
+
+#include <wx/xml/xml.h>
+#include <wx/file.h>
+#include <wx/sstream.h>
+#include <wx/msgdlg.h>
+#include <wx/tokenzr.h>
+#include <wx/filename.h>
+
+namespace GIL
+{
+namespace DICOM
+{
+static std::string emptyString;
+static TransferSyntaxList emptyTSList;
+}
+}
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+void GIL::DICOM::TransferSyntaxMap::AddTransferSyntax(const std::string& tsRef, const std::string& tsUID)
+{
+        TransferSyntaxMapImpl& impl = *this;
+        impl[tsRef] = tsUID;
+}
+
+const std::string& GIL::DICOM::TransferSyntaxMap::GetTransferSyntaxUID(const std::string& tsRef) const
+{
+        const_iterator it = find(tsRef);
+        if (it != end()) {
+                return (*it).second;
+        } else {
+                return emptyString;
+        }
+}
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+void GIL::DICOM::SOPClassMap::AddSOPClass(const std::string& scRef, const std::string& scUID)
+{
+        SOPClassMapImpl::iterator it = find(scRef);
+
+        if (it == end()) {
+                SOPClassMapImpl& impl = *this;
+                impl[scRef] = GIL::DICOM::SOPClassTuple(scUID);
+        }
+}
+
+void GIL::DICOM::SOPClassMap::AddTransferSyntaxForSOP(const std::string& scRef, const std::string& tsRef)
+{
+        SOPClassMapImpl::iterator it = find(scRef);
+
+        if (it != end()) {
+                const std::string& tsUID = GIL::DICOM::Conformance::GetTransferSyntaxes().GetTransferSyntaxUID(tsRef);
+                if (tsUID.size() != 0) {
+                        SOPClassTuple& sop = (*it).second;
+                        sop.tsRefs.push_back(tsRef);
+                        sop.tsUIDs.push_back(tsUID);
+                } else {
+                        LOG_ERROR(_Std("GIL/DICOM/Conformance"), _Std("Unable to add supported transfer syntax ") << tsRef << _Std(" to SOP Class ") << scRef <<_Std(" . Transfer Syntax does not exists in model: Add it first."));
+                }
+        } else {
+                LOG_ERROR(_Std("GIL/DICOM/Conformance"), _Std("Unable to add supported transfer syntax ") << tsRef << _Std(" to SOP Class ") << scRef <<_Std(" . SOP Class does not exists in model: Add it first."));
+        }
+}
+
+const std::string& GIL::DICOM::SOPClassMap::GetSOPClassUID(const std::string& scRef) const
+{
+
+        SOPClassMapImpl::const_iterator it = find(scRef);
+        if (it != end()) {
+                return (*it).second.scUID;
+        }
+        return emptyString;
+}
+
+const GIL::DICOM::TransferSyntaxList& GIL::DICOM::SOPClassMap::GetSupportedTransferSyntaxRefs(const std::string& scRef) const
+{
+
+        SOPClassMapImpl::const_iterator it = find(scRef);
+        if (it != end()) {
+                return (*it).second.tsRefs;
+        } else {
+                return emptyTSList;
+        }
+}
+
+const GIL::DICOM::TransferSyntaxList& GIL::DICOM::SOPClassMap::GetSupportedTransferSyntaxUIDs(const std::string& scRef) const
+{
+
+        SOPClassMapImpl::const_iterator it = find(scRef);
+        if (it != end()) {
+                return (*it).second.tsUIDs;
+        } else {
+                return emptyTSList;
+        }
+}
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+void GIL::DICOM::ModalityMap::AddModality(const std::string& mRef, const std::string& descr)
+{
+        ModalityMapImpl::iterator it = find(mRef);
+
+        if (it == end()) {
+                ModalityMapImpl& impl = *this;
+                impl[mRef] = GIL::DICOM::ModalityTuple(descr);
+        }
+}
+
+void GIL::DICOM::ModalityMap::AddSOPClassForModality(const std::string& mRef, const std::string& scRef)
+{
+        ModalityMapImpl::iterator it = find(mRef);
+
+        if (it != end()) {
+                std::string scUID = GIL::DICOM::Conformance::GetStorageSOPClasses().GetSOPClassUID(scRef);
+                if (scUID.size() == 0) {
+                        scUID = GIL::DICOM::Conformance::GetScuSOPClasses().GetSOPClassUID(scRef);
+                        if (scUID.size() == 0) {
+                                scUID = GIL::DICOM::Conformance::GetScpSOPClasses().GetSOPClassUID(scRef);
+                        }
+                }
+                if (scUID.size() == 0) {
+                        LOG_ERROR(_Std("GIL/DICOM/Conformance"), _Std("Unable to add supported SOP Class ") << scRef << _Std(" to Modality ") << mRef <<_Std(" . SOP Class does not exists in model: Add it first."));
+                } else {
+                        ModalityTuple& modality = (*it).second;
+                        modality.scRefs.push_back(scRef);
+                        modality.scUIDs.push_back(scUID);
+                }
+        } else {
+                LOG_ERROR(_Std("GIL/DICOM/Conformance"), _Std("Unable to add supported SOP Class ") << scRef << _Std(" to Modality ") << mRef <<_Std(" . Modality does not exists in model: Add it first."));
+        }
+}
+
+const std::string& GIL::DICOM::ModalityMap::GetDescription(const std::string& mRef) const
+{
+
+        ModalityMapImpl::const_iterator it = find(mRef);
+        if (it != end()) {
+                return (*it).second.descr;
+        }
+        return emptyString;
+}
+
+/** Gets the SOP Classes names (refs) list supported by this Modality **/
+const GIL::DICOM::SOPClassList& GIL::DICOM::ModalityMap::GetSupportedSOPClassRefs(const std::string& mRef) const
+{
+
+        ModalityMapImpl::const_iterator it = find(mRef);
+        if (it != end()) {
+                return (*it).second.scRefs;
+        } else {
+                return emptyTSList;
+        }
+
+}
+
+/** Gets the SOP Classes oid list supported by this Modality **/
+const GIL::DICOM::SOPClassList& GIL::DICOM::ModalityMap::GetSupportedSOPClassUIDs(const std::string& mRef) const
+{
+
+        ModalityMapImpl::const_iterator it = find(mRef);
+        if (it != end()) {
+                return (*it).second.scUIDs;
+        } else {
+                return emptyTSList;
+        }
+}
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+
+GIL::DICOM::TransferSyntaxMap GIL::DICOM::Conformance::m_TransferSyntaxes;
+GIL::DICOM::SOPClassMap GIL::DICOM::Conformance::m_StorageSOPClasses;
+GIL::DICOM::SOPClassMap GIL::DICOM::Conformance::m_ScuSOPClasses;
+GIL::DICOM::SOPClassMap GIL::DICOM::Conformance::m_ScpSOPClasses;
+GIL::DICOM::ModalityMap GIL::DICOM::Conformance::m_Modalities;
+bool GIL::DICOM::Conformance::m_Loaded = false;
+
+#define CONFORMANCE_FILE wxT("conformance.xml")
+#define CONFORMANCE_ROOT_TAG wxT("dicom-conformance")
+
+
+void GIL::DICOM::Conformance::Load()
+{
+
+        m_Loaded = true;
+
+        wxFileName cpath = FROMPATH(GNC::GCS::IEntorno::Instance()->GetGinkgoResourcesDir()) + wxFileName::GetPathSeparator() + CONFORMANCE_FILE;
+
+        wxXmlDocument xmldoc;
+        xmldoc.Load(cpath.GetFullPath());
+        if (!xmldoc.IsOk()) {
+                LOG_ERROR(_Std("GIL/DICOM/Conformance"), _Std("Error loading DICOM Conformance file" ));
+                m_Loaded = false;
+                return;
+        }
+        wxXmlNode* pRoot = xmldoc.GetRoot();
+        if (pRoot->GetName().CmpNoCase(CONFORMANCE_ROOT_TAG) != 0) {
+                LOG_ERROR(_Std("GIL/DICOM/Conformance"), _Std("Invalid DICOM Conformance file" ));
+                m_Loaded = false;
+                return;
+        }
+
+        for (wxXmlNode* entry = pRoot->GetChildren(); entry != NULL; entry = entry->GetNext()) {
+
+                if (entry->GetName().CmpNoCase(wxT("transfer-syntaxes")) == 0) {
+                        // Loading Transfer Syntaxes
+                        wxString wxTS_RefId;
+                        wxString wxTS_UID;
+                        for (wxXmlNode* tsentry = entry->GetChildren(); tsentry != NULL; tsentry = tsentry->GetNext()) {
+
+                                if ((tsentry->GetName().CmpNoCase(wxT("transfer-syntax")) == 0) && tsentry->GetAttribute(wxT("ref-id"), &wxTS_RefId) && tsentry->GetAttribute(wxT("uid"), &wxTS_UID)) {
+                                        m_TransferSyntaxes.AddTransferSyntax(std::string(wxTS_RefId.ToUTF8()), std::string(wxTS_UID.ToUTF8()));
+                                }
+                        }
+                }
+
+                else if (entry->GetName().CmpNoCase(wxT("storage-sop-classes")) == 0) {
+                        // Loading Storage SOP Classes
+                        wxString wxSC_RefId;
+                        wxString wxSC_UID;
+                        wxString wxTS_Ref;
+
+                        std::string sc_RefId;
+
+                        for (wxXmlNode* scentry = entry->GetChildren(); scentry != NULL; scentry = scentry->GetNext()) {
+
+                                if ( (scentry->GetName().CmpNoCase(wxT("sop-class")) == 0) && scentry->GetAttribute(wxT("ref-id"), &wxSC_RefId) && scentry->GetAttribute(wxT("uid"), &wxSC_UID)) {
+
+                                        sc_RefId = std::string(wxSC_RefId.ToUTF8());
+                                        m_StorageSOPClasses.AddSOPClass( sc_RefId, std::string(wxSC_UID.ToUTF8()) );
+
+                                        for (wxXmlNode* tsentry = scentry->GetChildren(); tsentry != NULL; tsentry = tsentry->GetNext()) {
+
+                                                if ((tsentry->GetName().CmpNoCase(wxT("allowed-transfer-syntax")) == 0) && tsentry->GetAttribute(wxT("ref"), &wxTS_Ref)) {
+                                                        m_StorageSOPClasses.AddTransferSyntaxForSOP( sc_RefId, std::string(wxTS_Ref.ToUTF8()) );
+                                                }
+                                        }
+                                }
+                        }
+                } else if (entry->GetName().CmpNoCase(wxT("scu-sop-classes")) == 0) {
+                        // Loading SCU SOP Classes
+                        wxString wxSC_RefId;
+                        wxString wxSC_UID;
+                        wxString wxTS_Ref;
+
+                        std::string sc_RefId;
+
+                        for (wxXmlNode* scentry = entry->GetChildren(); scentry != NULL; scentry = scentry->GetNext()) {
+
+                                if ( (scentry->GetName().CmpNoCase(wxT("sop-class")) == 0) && scentry->GetAttribute(wxT("ref-id"), &wxSC_RefId) && scentry->GetAttribute(wxT("uid"), &wxSC_UID)) {
+
+                                        sc_RefId = std::string(wxSC_RefId.ToUTF8());
+                                        m_ScuSOPClasses.AddSOPClass( sc_RefId, std::string(wxSC_UID.ToUTF8()) );
+
+                                        for (wxXmlNode* tsentry = scentry->GetChildren(); tsentry != NULL; tsentry = tsentry->GetNext()) {
+
+                                                if ((tsentry->GetName().CmpNoCase(wxT("allowed-transfer-syntax")) == 0) && tsentry->GetAttribute(wxT("ref"), &wxTS_Ref)) {
+                                                        m_ScuSOPClasses.AddTransferSyntaxForSOP( sc_RefId, std::string(wxTS_Ref.ToUTF8()) );
+                                                }
+                                        }
+                                } else if (scentry->GetName().CmpNoCase(wxT("include-storage-sop-classes")) == 0) {
+                                        for (SOPClassMap::iterator it = m_StorageSOPClasses.begin(); it != m_StorageSOPClasses.end(); ++it) {
+                                                const std::string& storageSOPRef = (*it).first;
+                                                SOPClassTuple& storageSOPTuple = (*it).second;
+                                                m_ScuSOPClasses[storageSOPRef] = storageSOPTuple;
+                                        }
+                                }
+                        }
+                } else if (entry->GetName().CmpNoCase(wxT("scp-sop-classes")) == 0) {
+                        // Loading SCP SOP Classes
+                        wxString wxSC_RefId;
+                        wxString wxSC_UID;
+                        wxString wxTS_Ref;
+
+                        std::string sc_RefId;
+
+                        for (wxXmlNode* scentry = entry->GetChildren(); scentry != NULL; scentry = scentry->GetNext()) {
+
+                                if ( (scentry->GetName().CmpNoCase(wxT("sop-class")) == 0) && scentry->GetAttribute(wxT("ref-id"), &wxSC_RefId) && scentry->GetAttribute(wxT("uid"), &wxSC_UID)) {
+
+                                        sc_RefId = std::string(wxSC_RefId.ToUTF8());
+                                        m_ScpSOPClasses.AddSOPClass( sc_RefId, std::string(wxSC_UID.ToUTF8()) );
+
+                                        for (wxXmlNode* tsentry = scentry->GetChildren(); tsentry != NULL; tsentry = tsentry->GetNext()) {
+
+                                                if ((tsentry->GetName().CmpNoCase(wxT("allowed-transfer-syntax")) == 0) && tsentry->GetAttribute(wxT("ref"), &wxTS_Ref)) {
+                                                        m_ScpSOPClasses.AddTransferSyntaxForSOP( sc_RefId, std::string(wxTS_Ref.ToUTF8()) );
+                                                }
+                                        }
+                                } else if (scentry->GetName().CmpNoCase(wxT("include-storage-sop-classes")) == 0) {
+                                        for (SOPClassMap::iterator it = m_StorageSOPClasses.begin(); it != m_StorageSOPClasses.end(); ++it) {
+                                                const std::string& storageSOPRef = (*it).first;
+                                                SOPClassTuple& storageSOPTuple = (*it).second;
+                                                m_ScpSOPClasses[storageSOPRef] = storageSOPTuple;
+                                        }
+                                }
+                        }
+                } else if (entry->GetName().CmpNoCase(wxT("modalities-map")) == 0) {
+                        // Loading Modalities
+                        wxString wxM_RefId;
+                        wxString wxM_Descr;
+                        wxString wxSC_Ref;
+
+                        std::string m_RefId;
+
+                        for (wxXmlNode* mentry = entry->GetChildren(); mentry != NULL; mentry = mentry->GetNext()) {
+
+                                if ( (mentry->GetName().CmpNoCase(wxT("modality")) == 0) && mentry->GetAttribute(wxT("ref-id"), &wxM_RefId)) {
+                                        if(mentry->GetAttribute(wxT("descr"), &wxM_Descr)) {
+
+                                                m_RefId = std::string(wxM_RefId.ToUTF8());
+                                                m_Modalities.AddModality( m_RefId, std::string(wxM_Descr.ToUTF8()) );
+
+                                                for (wxXmlNode* scentry = mentry->GetChildren(); scentry != NULL; scentry = scentry->GetNext()) {
+
+                                                        if ((scentry->GetName().CmpNoCase(wxT("allowed-sop-class")) == 0) && scentry->GetAttribute(wxT("ref"), &wxSC_Ref)) {
+                                                                m_Modalities.AddSOPClassForModality( m_RefId, std::string(wxSC_Ref.ToUTF8()) );
+                                                        }
+                                                }
+                                        }
+                                }
+                        }
+                }
+        }
+        return;
+}
+
+const GIL::DICOM::TransferSyntaxMap& GIL::DICOM::Conformance::GetTransferSyntaxes()
+{
+        if (!m_Loaded) {
+                Load();
+        }
+        return m_TransferSyntaxes;
+}
+
+const GIL::DICOM::SOPClassMap& GIL::DICOM::Conformance::GetStorageSOPClasses()
+{
+        if (!m_Loaded) {
+                Load();
+        }
+        return m_StorageSOPClasses;
+}
+
+const GIL::DICOM::SOPClassMap& GIL::DICOM::Conformance::GetScuSOPClasses()
+{
+        if (!m_Loaded) {
+                Load();
+        }
+        return m_ScuSOPClasses;
+}
+
+
+const GIL::DICOM::SOPClassMap& GIL::DICOM::Conformance::GetScpSOPClasses()
+{
+        if (!m_Loaded) {
+                Load();
+        }
+        return m_ScpSOPClasses;
+}
+
+const GIL::DICOM::ModalityMap& GIL::DICOM::Conformance::GetModalities()
+{
+        if (!m_Loaded) {
+                Load();
+        }
+        return m_Modalities;
+}
+
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+GIL::DICOM::ArrayHelper::ArrayHelper()
+{
+        array = NULL;
+        size = 0;
+}
+
+GIL::DICOM::ArrayHelper::ArrayHelper(const std::list<std::string>& list)
+{
+        array = NULL;
+        size = 0;
+        copyFrom(list);
+}
+
+GIL::DICOM::ArrayHelper::ArrayHelper(const ArrayHelper& o)
+{
+        this->size = o.size;
+        this->array = new const char* [this->size];
+        for (unsigned int i = 0; i < this->size; i++) {
+                this->array[i] = strdup(o.array[i]);
+        }
+}
+
+void GIL::DICOM::ArrayHelper::swap(ArrayHelper& other)
+{
+        std::swap(array, other.array);
+        std::swap(size, other.size);
+}
+
+GIL::DICOM::ArrayHelper::~ArrayHelper()
+{
+        this->free();
+}
+
+GIL::DICOM::ArrayHelper& GIL::DICOM::ArrayHelper::operator=(const GIL::DICOM::ArrayHelper& o)
+{
+        if (this != &o) {
+                ArrayHelper help(o);
+                swap(help);
+        }
+        return *this;
+}
+
+GIL::DICOM::ArrayHelper& GIL::DICOM::ArrayHelper::operator=(const std::list<std::string>& list)
+{
+        copyFrom(list);
+        return *this;
+}
+
+void GIL::DICOM::ArrayHelper::copyFrom(const std::list<std::string>& list)
+{
+        free();
+        this->size = list.size();
+        this->array = new const char* [this->size];
+        unsigned int i = 0;
+        for (auto it = list.begin(); it != list.end(); ++it) {
+                this->array[i++] = strdup(it->c_str());
+        }
+}
+void GIL::DICOM::ArrayHelper::free()
+{
+        if (this->size != 0) {
+                for (unsigned int i = 0; i < this->size; i++) {
+                        delete[] this->array[i];
+                }
+                this->size = 0;
+        }
+        if (this->array != NULL) {
+                delete[] this->array;
+                this->array = NULL;
+        }
+}
diff --git a/cadxcore/api/dicom/idicomconformance.h b/cadxcore/api/dicom/idicomconformance.h
new file mode 100644
index 0000000..475ddc3
--- /dev/null
+++ b/cadxcore/api/dicom/idicomconformance.h
@@ -0,0 +1,225 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <map>
+#include <list>
+#include <string>
+#include <iostream>
+#include <api/api.h>
+
+namespace GIL
+{
+namespace DICOM
+{
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+typedef std::map<std::string, std::string> TransferSyntaxMapImpl;
+typedef std::list<std::string> TransferSyntaxList;
+typedef std::list<std::string> SOPClassList;
+
+class EXTAPI TransferSyntaxMap : public TransferSyntaxMapImpl
+{
+public:
+
+        void AddTransferSyntax(const std::string& tsRef, const std::string& tsUID);
+
+        const std::string& GetTransferSyntaxUID(const std::string& tsRef) const;
+};
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+class EXTAPI SOPClassTuple
+{
+public:
+        std::string scUID;
+        TransferSyntaxList tsRefs;
+        TransferSyntaxList tsUIDs;
+
+        inline SOPClassTuple()
+        {
+        }
+
+        inline SOPClassTuple(const std::string& scUID)
+        {
+                this->scUID = scUID;
+        }
+
+        inline SOPClassTuple(const SOPClassTuple& o)
+        {
+                *this = o;
+        }
+
+        inline SOPClassTuple& operator=(const SOPClassTuple& o)
+        {
+                this->scUID  = o.scUID;
+                this->tsRefs = o.tsRefs;
+                this->tsUIDs = o.tsUIDs;
+                return *this;
+        }
+
+};
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+class EXTAPI ArrayHelper
+{
+public:
+        ArrayHelper();
+
+        ArrayHelper(const std::list<std::string>& list);
+
+        ArrayHelper(const ArrayHelper& o);
+
+        ArrayHelper& operator=(const ArrayHelper& o);
+
+        ArrayHelper& operator=(const std::list<std::string>& list);
+
+        ~ArrayHelper();
+
+        void copyFrom(const std::list<std::string>& list);
+
+        void free();
+
+        void swap(ArrayHelper& other);
+
+        const char** array;
+        unsigned int size;
+};
+
+typedef std::map<std::string, SOPClassTuple > SOPClassMapImpl;
+
+class EXTAPI SOPClassMap : public SOPClassMapImpl
+{
+
+public:
+
+        void AddSOPClass(const std::string& scRef, const std::string& scUID);
+
+        void AddTransferSyntaxForSOP(const std::string& scRef, const std::string& tsRef);
+
+        const std::string& GetSOPClassUID(const std::string& scRef) const;
+
+        /** Gets the transfer syntax names list (refs) supported by this SOP Class **/
+        const TransferSyntaxList& GetSupportedTransferSyntaxRefs(const std::string& scRef) const;
+
+        /** Gets the transfer syntax oid list supported by this SOP Class **/
+        const TransferSyntaxList& GetSupportedTransferSyntaxUIDs(const std::string& scRef) const;
+};
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+class EXTAPI ModalityTuple
+{
+public:
+        std::string descr;
+        SOPClassList scRefs;
+        SOPClassList scUIDs;
+
+        inline ModalityTuple()
+        {
+        }
+
+        inline ModalityTuple(const std::string& descr)
+        {
+                this->descr = descr;
+        }
+
+        inline ModalityTuple(const ModalityTuple& o)
+        {
+                *this = o;
+        }
+
+        inline ModalityTuple& operator=(const ModalityTuple& o)
+        {
+                this->descr  = o.descr;
+                this->scRefs = o.scRefs;
+                this->scUIDs = o.scUIDs;
+                return *this;
+        }
+
+};
+
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+typedef std::map<std::string, ModalityTuple > ModalityMapImpl;
+
+class EXTAPI ModalityMap : public ModalityMapImpl
+{
+
+public:
+
+        void AddModality(const std::string& mRef, const std::string& desr);
+
+        void AddSOPClassForModality(const std::string& mRef, const std::string& scRef);
+
+        const std::string& GetDescription(const std::string& mRef) const;
+
+        /** Gets the SOP Classes names (refs) list supported by this Modality **/
+        const SOPClassList& GetSupportedSOPClassRefs(const std::string& mRef) const;
+
+        /** Gets the SOP Classes oid list supported by this Modality **/
+        const SOPClassList& GetSupportedSOPClassUIDs(const std::string& mRef) const;
+};
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+class EXTAPI Conformance
+{
+
+public:
+
+        static void Load();
+
+        static const GIL::DICOM::TransferSyntaxMap& GetTransferSyntaxes();
+
+        static const GIL::DICOM::SOPClassMap& GetStorageSOPClasses();
+
+        static const GIL::DICOM::SOPClassMap& GetScpSOPClasses();
+
+        static const GIL::DICOM::SOPClassMap& GetScuSOPClasses();
+
+        static const GIL::DICOM::ModalityMap& GetModalities();
+
+private:
+
+        static GIL::DICOM::TransferSyntaxMap m_TransferSyntaxes;
+
+        static GIL::DICOM::SOPClassMap m_StorageSOPClasses;
+
+        static GIL::DICOM::SOPClassMap m_ScpSOPClasses;
+
+        static GIL::DICOM::SOPClassMap m_ScuSOPClasses;
+
+        static GIL::DICOM::ModalityMap m_Modalities;
+
+        static bool m_Loaded;
+
+};
+}
+}
diff --git a/cadxcore/api/dicom/idicomizador.h b/cadxcore/api/dicom/idicomizador.h
new file mode 100644
index 0000000..3d47ca0
--- /dev/null
+++ b/cadxcore/api/dicom/idicomizador.h
@@ -0,0 +1,122 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/controllers/ipacscontroller.h>
+
+namespace GIL
+{
+namespace DICOM
+{
+
+typedef enum TDICOMOutputFormat {
+        TDOF_AUTO, //vlp for img formats and sc for sc
+        TDOF_FOO,
+        TDOF_VLP,
+        TDOF_SC,
+        TDOF_NSC,
+        TDOF_SR
+} TDICOMOutputFormat;
+
+class EXTAPI IDICOMImg2DCM
+{
+public:
+
+
+        /* Inicializa una conversi�n. IInspectCallback sirve para especificar un callback mediante el cual se pueden inspeccionar los atributos buscados.
+         *
+         * Formatos de entrada soportados:
+         *	  JPEG
+         * Formatos de salida soportados (DICOM SOP a generar):
+         *   VLP (Visible Light Photography)
+         *   SC (Secondary Capture)
+         *   NSC (New Secondary Capture)
+         */
+        typedef struct TImageFile {
+                void* pixelData;
+                int width;
+                int heigth;
+                int samplesPerPixel;
+                std::string photometricInterpretation;
+                int bitsAllocated;
+                int bitsStored;
+                int highBit;
+                int pixelRepr;
+                int planarConf;
+                int pixAspectH;
+                int pixAspectV;
+                bool recompress;
+
+                //configuration for rgbFiles uncompressed...
+                TImageFile(void* pixelData, const int with, const int heigth)
+                {
+                        Init(pixelData, with, heigth, 3, "RGB", 8, 8, 7, 0, 0, 1, 1, true);
+                }
+
+                TImageFile(void* pixelData, const int width, const int heigth, const int samplesPerPixel, const std::string& photometricInterpretation,
+                           const int bitsAllocated, const int bitsStored, const int highBit, const int pixelRepr, const int planarConf, const int pixAspectH,
+                           const int pixAspectV, const bool recompress)
+                {
+                        Init(pixelData, width, heigth, samplesPerPixel, photometricInterpretation, bitsAllocated, bitsStored, highBit, pixelRepr,planarConf, pixAspectH, pixAspectV, recompress);
+                }
+
+                void Init(void* pixelData, const int width, const int heigth, const int samplesPerPixel, const std::string& photometricInterpretation,
+                          const int bitsAllocated, const int bitsStored, const int highBit, const int pixelRepr, const int planarConf, const int pixAspectH,
+                          const int pixAspectV, const bool recompress)
+                {
+                        this->pixelData = pixelData;
+                        this->width = width;
+                        this->heigth = heigth;
+                        this->samplesPerPixel = samplesPerPixel;
+                        this->photometricInterpretation = photometricInterpretation;
+                        this->bitsAllocated = bitsAllocated;
+                        this->bitsStored = bitsStored;
+                        this->highBit = highBit;
+                        this->pixelRepr = pixelRepr;
+                        this->planarConf = planarConf;
+                        this->pixAspectH = pixAspectH;
+                        this->pixAspectV = pixAspectV;
+                        this->recompress = recompress;
+                }
+        } TImageFile;
+
+        virtual ~IDICOMImg2DCM() {}
+
+        virtual void Inicializar(TImageFile& fileDefinition, IInspectCallBack* pICallback = NULL, bool debug = false, TDICOMOutputFormat outputFormat = TDOF_VLP) = 0;
+        virtual void Inicializar(std::string& inputFile, IInspectCallBack* pICallback = NULL, bool debug = false, TDICOMOutputFormat outputFormat = TDOF_AUTO)=0;
+
+        virtual int InsertarJerarquia(DicomDataset& base)=0;
+
+        virtual int InsertarTagsPrivados(TipoPrivateTags& base) = 0;
+
+        /* Actualiza los campos DICOM a sobreescribir */
+        virtual void ActualizarCampos(IInspectCallBack* pICallback)=0;
+
+        /* Realiza una conversi�n ya inicializada */
+        virtual bool Convertir(std::string& outputFile)=0;
+
+        virtual bool CrearSRDoc(std::string& outputFile, DicomDataset& base, std::list<GNC::GCS::Ptr<TipoPrivateTags> >& tagsPrivados) = 0;
+
+        /* Resetea el estado interno */
+        virtual void Reset()=0;
+
+};
+}
+}
diff --git a/cadxcore/api/dicom/idicommanager.h b/cadxcore/api/dicom/idicommanager.h
new file mode 100644
index 0000000..46fc3d5
--- /dev/null
+++ b/cadxcore/api/dicom/idicommanager.h
@@ -0,0 +1,105 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <stddef.h>
+#include <vector>
+
+
+namespace GIL
+{
+namespace DICOM
+{
+class DicomDataset;
+class TagPrivadoUndefined;
+class TipoMetaInfo;
+class TipoPrivateTags;
+}
+}
+
+namespace GIL
+{
+namespace DICOM
+{
+
+
+
+class IInspectCallBack
+{
+public:
+
+        virtual ~IInspectCallBack() {}
+
+        virtual void ObtenerJerarquiaInserccion(DicomDataset& /*lista*/)
+        {
+        }
+
+        virtual void Inspect(std::string& clave, std::string& desc, std::string& valor) = 0;
+        virtual void Done() = 0;
+};
+
+class IDICOMManager
+{
+public:
+
+        virtual ~IDICOMManager() {}
+
+        /*Almacena la jerarquia cargada en un fichero*/
+        virtual bool AlmacenarFichero(const std::string& inputFile, IInspectCallBack* pICallback = NULL, bool debug = false)=0;
+
+        /*Actualiza la jerarquia cargada*/
+        virtual int ActualizarJerarquia(DicomDataset& base)=0;
+
+        /*actualiza los tags privados*/
+        virtual int ActualizarTagsPrivados(TipoPrivateTags& tags)=0;
+
+        /*anonimiza los tags privados*/
+        virtual void AnonimizarTagsPrivados() = 0;
+
+        /*carga los tags privados*/
+        virtual int CargarTagsPrivados(GIL::DICOM::TipoPrivateTags& tags)=0;
+
+        /*carga la MetaInfo*/
+        virtual int CargarMetaInfo(const std::string& inputFile, GIL::DICOM::TipoMetaInfo& tags)=0;
+
+        /* Obtiene la jerarquia de campos DICOM del fichero */
+        virtual bool CargarFichero(const std::string& inputFile, GIL::DICOM::DicomDataset& jerarquia, bool cargarSoloTagsInfo = true, IInspectCallBack* pICallback = NULL)=0;
+
+        /*Carga el fichero y responde a primitivas get tag, util para pillar tags especificos sin cargar toda la jerarquia*/
+        virtual bool CargarFichero(const std::string& inputFile, bool cargarSoloTagsInfo = true)=0;
+        virtual bool GetTag(unsigned int grupo,unsigned int elemento, std::string & valor)=0;
+        virtual bool GetTag(unsigned int grupo,unsigned int elemento, TagPrivadoUndefined& tagBinario)=0;
+        virtual bool GetTag(unsigned int grupo,unsigned int elemento, float& valor) = 0;
+        virtual bool GetTag(unsigned int grupo,unsigned int elemento, int& valor) = 0;
+        virtual bool GetTag(unsigned int grupo,unsigned int elemento, GIL::DICOM::DicomDataset& secuencia) = 0;
+
+        virtual bool FindTag(unsigned int grupo,unsigned int elemento, TagPrivadoUndefined& tagBinario)=0;
+        virtual bool FindTag(unsigned int grupo, unsigned int elemento, std::vector<TagPrivadoUndefined>& binaryTags) = 0;
+
+        /* returns the oid name or empty string if not found */
+        virtual std::string GetOIDName(const std::string &oid) = 0;
+
+        /* devuelve la descripcion de este tag*/
+        virtual std::string GetDescription(const std::string &clave) const = 0;
+
+        virtual std::string GetNewUID() = 0;
+};
+}
+}
diff --git a/cadxcore/api/dicom/imodelodicom.h b/cadxcore/api/dicom/imodelodicom.h
new file mode 100644
index 0000000..370165a
--- /dev/null
+++ b/cadxcore/api/dicom/imodelodicom.h
@@ -0,0 +1,829 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+#include <exception>
+
+#include <api/globals.h>
+#include <api/iexception.h>
+#include <api/internationalization/internationalization.h>
+
+
+class IModeloDicom;
+class IModeloEstudio;
+class IModeloSerie;
+class IModeloPaciente;
+
+namespace GIL
+{
+namespace DICOM
+{
+class EXTAPI ModelException : public GNC::GCS::IException
+{
+public:
+        ModelException(const std::string& msg, const std::string& componente="GIL/DICOM/Model", bool fatal = true) : GNC::GCS::IException(msg, componente, fatal)
+        {
+                this->cause = msg;
+                this->component = componente;
+                this->fatal = fatal;
+        }
+        ~ModelException() throw()
+        {
+        }
+
+        const std::string& GetComponent() const
+        {
+                return component;
+        }
+
+        const std::string& GetCause() const
+        {
+                return cause;
+        }
+
+        std::string GetFullCause() const
+        {
+                return *this;
+        }
+
+        bool IsFatal()  const
+        {
+                return fatal;
+        }
+
+        operator std::string () const
+        {
+                return std::string("Excepcion en componente ") + GetComponent() + std::string(": ")  + GetCause();
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const ModelException& ex)
+        {
+                out << (const std::string&) ex;
+                return out;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const ModelException* ex)
+        {
+                if (ex != NULL) {
+                        out << *ex;
+                } else {
+                        out << "(NULL)";
+                }
+                return out;
+        }
+
+protected:
+        std::string cause;
+        std::string component;
+        bool fatal;
+};
+}
+}
+class IModeloImagen
+{
+public:
+
+        IModeloImagen()
+        {
+                m_pSeriePadre = NULL;
+                m_pModeloPadre = NULL;
+        }
+
+        IModeloImagen(IModeloDicom* pModeloPadre, IModeloSerie* pSeriePadre,
+                      const std::string& UID, const std::string& instanceNumber, const std::string& pathImagen = "")
+        {
+                m_pSeriePadre = pSeriePadre;
+                m_pModeloPadre = pModeloPadre;
+                m_UID = UID;
+                m_pathImagen = pathImagen;
+                m_instanceNumber = instanceNumber;
+        }
+
+        IModeloImagen( const IModeloImagen& o)
+        {
+                m_pSeriePadre = o.m_pSeriePadre;
+                m_pModeloPadre = o.m_pModeloPadre;
+                m_UID = o.m_UID;
+                m_pathImagen = o.m_pathImagen;
+                m_instanceNumber = o.m_instanceNumber;
+        }
+
+        IModeloImagen& operator = (const IModeloImagen& o)
+        {
+                m_pSeriePadre = o.m_pSeriePadre;
+                m_pModeloPadre = o.m_pModeloPadre;
+                m_UID = o.m_UID;
+                m_pathImagen = o.m_pathImagen;
+                m_instanceNumber = o.m_instanceNumber;
+                return *this;
+        }
+
+        ~IModeloImagen()
+        {
+        }
+
+        const std::string& GetUID() const
+        {
+                return m_UID;
+        }
+
+        const std::string& GetPathImagen() const
+        {
+                return m_pathImagen;
+        }
+
+        const std::string& GetInstanceNumber() const
+        {
+                return m_instanceNumber;
+        }
+protected:
+        IModeloSerie* m_pSeriePadre;
+        IModeloDicom* m_pModeloPadre;
+        std::string   m_UID;
+        std::string	  m_pathImagen;
+        std::string	  m_instanceNumber;
+
+        friend class IModeloDicom;
+
+};
+
+class IModeloSerie
+{
+
+public:
+
+        typedef std::list<IModeloImagen> ListaImagenesType;
+
+        IModeloSerie()
+        {
+                m_pEstudioPadre = NULL;
+                m_pModeloPadre = NULL;
+        }
+
+        IModeloSerie(const IModeloSerie& o)
+        {
+                m_pEstudioPadre = o.m_pEstudioPadre;
+                m_pModeloPadre = o.m_pModeloPadre;
+                m_UID = o.m_UID;
+                m_Tipo = o.m_Tipo;
+                m_Numero = o.m_Numero;
+                m_Fecha = o.m_Fecha;
+                m_Hora = o.m_Hora;
+                m_Descripcion = o.m_Descripcion;
+                m_Doctor = o.m_Doctor;
+        }
+
+        IModeloSerie(IModeloDicom* pModeloPadre, IModeloEstudio* pEstudioPadre,
+                     const std::string& UID,
+                     const std::string& tipo,
+                     const std::string& fecha,
+                     const std::string& hora,
+                     const std::string& descripcion,
+                     const std::string& numero,
+                     const std::string& doctor)
+        {
+                m_pEstudioPadre = pEstudioPadre;
+                m_pModeloPadre = pModeloPadre;
+                m_UID = UID;
+                m_Tipo = tipo;
+                m_Numero = numero;
+                m_Fecha = fecha;
+                m_Hora = hora;
+                m_Descripcion = descripcion;
+                m_Doctor = doctor;
+        }
+
+        IModeloSerie& operator=(const IModeloSerie& o)
+        {
+                m_pEstudioPadre = o.m_pEstudioPadre;
+                m_pModeloPadre = o.m_pModeloPadre;
+                m_UID = o.m_UID;
+                m_Tipo = o.m_Tipo;
+                m_Numero = o.m_Numero;
+                m_Fecha = o.m_Fecha;
+                m_Hora = o.m_Hora;
+                m_Descripcion = o.m_Descripcion;
+                m_Doctor = o.m_Doctor;
+                return *this;
+        }
+
+        ~IModeloSerie()
+        {
+        }
+
+        const std::string& GetUID() const
+        {
+                return m_UID;
+        }
+
+        const std::string& GetTipo() const
+        {
+                return m_Tipo;
+        }
+
+        const std::string& GetNumero() const
+        {
+                return m_Numero;
+        }
+
+        const std::string& GetFecha() const
+        {
+                return m_Fecha;
+        }
+
+        const std::string& GetHora() const
+        {
+                return m_Hora;
+        }
+
+        const std::string& GetDescripcion() const
+        {
+                return m_Descripcion;
+        }
+
+        const std::string& GetDoctor() const
+        {
+                return m_Doctor;
+        }
+
+        const ListaImagenesType& ListaImagenes() const
+        {
+                return Imagenes;
+        }
+
+        const IModeloImagen& Imagen(int indice) const
+        {
+                int i=0;
+                ListaImagenesType::const_iterator it;
+                for(it = Imagenes.begin(); i < indice && it != Imagenes.end(); ++it, i++);
+
+                if(it != Imagenes.end()) {
+                        return (*it);
+                } else {
+                        return Imagenes.front();
+                }
+        }
+
+        const IModeloEstudio* GetStudy() const
+        {
+                return m_pEstudioPadre;
+        }
+protected:
+        std::string m_UID;
+        std::string m_Tipo;
+        std::string m_Numero;
+        std::string m_Fecha;
+        std::string m_Hora;
+        std::string m_Descripcion;
+        std::string m_Doctor;
+
+        IModeloEstudio*     m_pEstudioPadre;
+        IModeloDicom*       m_pModeloPadre;
+
+        ListaImagenesType Imagenes;
+
+        friend class IModeloDicom;
+
+};
+
+class IModeloEstudio
+{
+
+public:
+
+        typedef std::list<IModeloSerie> ListaSeriesType;
+
+        IModeloEstudio()
+        {
+                m_pModeloPadre = NULL;
+                m_pPacientePadre = NULL;
+        }
+
+        IModeloEstudio( const IModeloEstudio& o )
+        {
+                m_pModeloPadre = o.m_pModeloPadre;
+                m_pPacientePadre = o.m_pPacientePadre;
+                m_UID = o.m_UID;
+                m_AccNumber = o.m_AccNumber;
+                m_Descripcion = o.m_Descripcion;
+                m_Modalidad = o.m_Modalidad;
+                m_Fecha = o.m_Fecha;
+                m_Hora = o.m_Hora;
+                m_Doctor = o.m_Doctor;
+        }
+
+        IModeloEstudio( IModeloDicom* pModeloPadre, IModeloPaciente* pPacientePadre,
+                        const std::string& UID,
+                        const std::string& AccNumber,
+                        const std::string& descripcion,
+                        const std::string& modalidad,
+                        const std::string& fecha,
+                        const std::string& hora,
+                        const std::string& doctor)
+        {
+                m_pModeloPadre = pModeloPadre;
+                m_pPacientePadre = pPacientePadre;
+                m_UID = UID;
+                m_AccNumber = AccNumber;
+                m_Descripcion = descripcion;
+                m_Modalidad = modalidad;
+                m_Fecha = fecha;
+                m_Hora = hora;
+                m_Doctor = doctor;
+        }
+
+        IModeloEstudio& operator=(const IModeloEstudio& o)
+        {
+                m_UID = o.m_UID;
+                m_AccNumber = o.m_AccNumber;
+                m_Descripcion = o.m_Descripcion;
+                m_Modalidad = o.m_Modalidad;
+                m_Fecha = o.m_Fecha;
+                m_Hora = o.m_Hora;
+                m_Doctor = o.m_Doctor;
+                return *this;
+        }
+
+
+        ~IModeloEstudio()
+        {
+        }
+
+        const std::string& GetUID() const
+        {
+                return m_UID;
+        }
+
+        const std::string& GetAccNumber() const
+        {
+                return m_AccNumber;
+        }
+
+        const std::string& GetDescripcion() const
+        {
+                return m_Descripcion;
+        }
+
+        const std::string& GetModalidad() const
+        {
+                return m_Modalidad;
+        }
+
+        const std::string& GetFecha() const
+        {
+                return m_Fecha;
+        }
+
+        const std::string& GetHora() const
+        {
+                return m_Hora;
+        }
+
+        const std::string& GetDoctor() const
+        {
+                return m_Doctor;
+        }
+
+        const ListaSeriesType& ListaSeries() const
+        {
+                return Series;
+        }
+
+        const IModeloSerie& Serie(int indice) const
+        {
+                int i=0;
+                ListaSeriesType::const_iterator it;
+                for(it = Series.begin(); i<indice && it != Series.end(); ++it, i++);
+
+                if(it != Series.end()) {
+                        return (*it);
+                } else {
+                        return Series.front();
+                }
+        }
+
+        const IModeloPaciente* GetPatient() const
+        {
+                return m_pPacientePadre;
+        }
+
+protected:
+
+        std::string m_UID;
+        std::string m_AccNumber;
+        std::string m_Descripcion;
+        std::string m_Modalidad;
+        std::string m_Fecha;
+        std::string m_Hora;
+        std::string m_Comentarios;
+        std::string m_Doctor;
+
+        IModeloDicom* m_pModeloPadre;
+        IModeloPaciente* m_pPacientePadre;
+
+        ListaSeriesType    Series;
+
+        friend class IModeloDicom;
+
+};
+
+class IModeloPaciente
+{
+public:
+
+        typedef std::list<IModeloEstudio> ListaEstudiosType;
+
+        IModeloPaciente()
+        {
+                m_pModeloPadre = NULL;
+        }
+
+        IModeloPaciente( const IModeloPaciente& o )
+        {
+                m_pModeloPadre = o.m_pModeloPadre;
+                m_UID = o .m_UID;
+                m_Nombre = o.m_Nombre;
+                m_FechaNacimiento = o.m_FechaNacimiento;
+                m_Sexo = o.m_Sexo;
+        }
+
+        IModeloPaciente( IModeloDicom* pModeloPadre,
+                         const std::string& UID,
+                         const std::string& nombre,
+                         const std::string& fechaNacimiento,
+                         const std::string& sexo)
+        {
+                m_pModeloPadre = pModeloPadre;
+                m_UID = UID;
+                m_Nombre = nombre;
+                m_FechaNacimiento = fechaNacimiento;
+                m_Sexo = sexo;
+        }
+
+        IModeloPaciente& operator=(const IModeloPaciente& o)
+        {
+                m_pModeloPadre = o.m_pModeloPadre;
+                m_UID = o .m_UID;
+                m_Nombre = o.m_Nombre;
+                m_FechaNacimiento = o.m_FechaNacimiento;
+                m_Sexo = o.m_Sexo;
+                return *this;
+        }
+
+        ~IModeloPaciente()
+        {
+        }
+
+        const std::string& GetUID() const
+        {
+                return m_UID;
+        }
+
+        const std::string& GetNombre() const
+        {
+                return m_Nombre;
+        }
+
+        const std::string& GetFechaNacimiento() const
+        {
+                return m_FechaNacimiento;
+        }
+
+        const std::string& GetSexo() const
+        {
+                return m_Sexo;
+        }
+
+        const ListaEstudiosType& ListaEstudios() const
+        {
+                return Estudios;
+        }
+
+        const IModeloEstudio& Estudio(int indice) const
+        {
+                int i=0;
+                ListaEstudiosType::const_iterator it;
+                for(it = Estudios.begin(); i<indice && it != Estudios.end(); ++it, i++);
+
+                if(it != Estudios.end()) {
+                        return (*it);
+                } else {
+                        return Estudios.front();
+                }
+        }
+
+protected:
+
+        std::string m_UID;
+        std::string m_Nombre;
+        std::string m_FechaNacimiento;
+        std::string m_Sexo;
+
+        ListaEstudiosType Estudios;
+
+        IModeloDicom* m_pModeloPadre;
+
+        friend class IModeloDicom;
+
+};
+
+class IModeloDicom
+{
+public:
+
+        typedef std::list<IModeloPaciente> ListaPacientesType;
+
+        typedef std::list<IModeloEstudio*> ListaPunterosEstudiosType;
+        typedef std::list<IModeloSerie*>   ListaPunterosSeriesType;
+        typedef std::list<IModeloImagen*>  ListaPunterosImagenesType;
+
+        IModeloDicom()
+        {
+                Error = false;
+        }
+
+        ~IModeloDicom()
+        {
+        }
+
+        const ListaPacientesType& ListaPacientes() const
+        {
+                return Pacientes;
+        }
+
+        const IModeloPaciente& Paciente(int indice) const
+        {
+                int i=0;
+                ListaPacientesType::const_iterator it;
+                for(it = Pacientes.begin(); i<indice && it != Pacientes.end(); ++it, i++);
+
+                if(it != Pacientes.end()) {
+                        return (*it);
+                } else {
+                        return Pacientes.front();
+                }
+        }
+
+        // region operaciones de busqueda externas
+
+public:
+
+        // Esta operacion es externa porque devuelve como resultado un puntero a constante, para no modificar/destruir el registro de paciente.
+        void BuscarPaciente(const std::string& UID, IModeloPaciente const **  result)
+        {
+                IModeloPaciente* paciente = NULL;
+                BuscarPacienteInternal(UID, &paciente);
+                *result = paciente;
+        }
+
+        // Esta operacion es externa porque devuelve como resultado un puntero a constante, para no modificar/destruir el registro de estudio.
+        void BuscarEstudio(const std::string& UID, IModeloEstudio const ** result)
+        {
+                IModeloEstudio* estudio = NULL;
+                BuscarEstudioInternal(UID, &estudio);
+                *result = estudio;
+        }
+
+        // Esta operacion es externa porque devuelve como resultado un puntero a constante, para no modificar/destruir el registro de serie.
+        void BuscarSerie(const std::string& UID, IModeloSerie const ** result)
+        {
+                IModeloSerie* serie = NULL;
+                BuscarSerieInternal(UID, &serie);
+                *result = serie;
+        }
+
+        // Esta operacion es externa porque devuelve como resultado un puntero a constante, para no modificar/destruir el registro de imagen.
+        void BuscarImagen(const std::string& UID, IModeloImagen const ** result)
+        {
+                IModeloImagen* imagen = NULL;
+                BuscarImagenInternal(UID, &imagen);
+                *result = imagen;
+        }
+
+        bool TieneImagenes()
+        {
+                return (ListaPunterosImagenes.size() > 0);
+        }
+
+        // endregion
+
+        // region operaciones de busqueda internas
+
+private:
+
+        // Esta operacion es interna porque devuelve como resultado un puntero a constante, para no modificar/destruir el registro de paciente.
+        void BuscarPacienteInternal(const std::string& UID, IModeloPaciente **  result)
+        {
+                for (ListaPacientesType::iterator it = Pacientes.begin(); *result == NULL && it != Pacientes.end(); ++it) {
+                        IModeloPaciente& pi = *it;
+                        if (pi.GetUID() == UID) {
+                                *result = &(*it);
+                        }
+                }
+        }
+
+        // Esta operacion es interna porque devuelve como resultado un puntero a constante, para no modificar/destruir el registro de estudio.
+        void BuscarEstudioInternal(const std::string& UID, IModeloEstudio **  result)
+        {
+                for (ListaPunterosEstudiosType::iterator it = ListaPunterosEstudios.begin(); *result == NULL && it != ListaPunterosEstudios.end(); ++it) {
+                        IModeloEstudio* pi = *it;
+                        if (pi->GetUID() == UID) {
+                                *result = (*it);
+                        }
+                }
+        }
+
+        // Esta operacion es interna porque devuelve como resultado un puntero a constante, para no modificar/destruir el registro de serie.
+        void BuscarSerieInternal(const std::string& UID, IModeloSerie **  result)
+        {
+
+                for (ListaPunterosSeriesType::iterator it = ListaPunterosSeries.begin(); *result == NULL && it != ListaPunterosSeries.end(); ++it) {
+                        IModeloSerie* pi = *it;
+                        if (pi->GetUID() == UID) {
+                                *result = (*it);
+                        }
+                }
+        }
+
+
+        // Esta operacion es interna porque devuelve como resultado un puntero a constante, para no modificar/destruir el registro de imagen.
+        void BuscarImagenInternal(const std::string& UID, IModeloImagen **  result)
+        {
+                for (ListaPunterosImagenesType::iterator it = ListaPunterosImagenes.begin(); *result == NULL && it != ListaPunterosImagenes.end(); ++it) {
+                        IModeloImagen* pi = *it;
+                        if (pi->GetUID() == UID) {
+                                *result = (*it);
+                        }
+                }
+        }
+
+        // endregion
+
+        // operaciones de inserccion
+
+public:
+
+        const IModeloPaciente& InsertarPaciente(const std::string& UID, const std::string& nombre, const std::string& fechaNacimiento, const std::string& sexo)
+        {
+
+                const IModeloPaciente* paciente = NULL;
+
+                BuscarPaciente(UID, &paciente);
+
+                if (paciente == NULL) {
+                        Pacientes.push_back(IModeloPaciente( this, UID, nombre, fechaNacimiento, sexo));
+                        paciente = &Pacientes.back();
+                }
+
+                return *paciente;
+        }
+
+        const IModeloEstudio& InsertarEstudio(const std::string& UIDPaciente, const std::string& UID, const std::string& AccNumber, const std::string& descripcion, const std::string& modalidad, const std::string& fecha, const std::string& hora, const std::string& doctor)
+        {
+
+                IModeloEstudio* estudio = NULL;
+
+                BuscarEstudioInternal(UID, &estudio);
+
+                if (estudio == NULL) {
+
+                        IModeloPaciente* paciente = NULL;
+
+                        BuscarPacienteInternal(UIDPaciente, &paciente);
+
+                        if (paciente != NULL) {
+
+                                paciente->Estudios.push_back(IModeloEstudio( this, paciente, UID, AccNumber, descripcion, modalidad, fecha, hora, doctor));
+                                estudio = & (paciente->Estudios.back());
+                                ListaPunterosEstudios.push_back(estudio);
+                        } else {
+                                // El estudio no esta asociado a un paciente existente.
+                                throw GIL::DICOM::ModelException(_Std("Logical error: Study not associated with existent patient in model"));
+                        }
+                }
+
+                return *estudio;
+        }
+
+        const IModeloSerie& InsertarSerie(const std::string& UIDEstudio, const std::string& UID, const std::string& tipo, const std::string& fecha, const std::string& hora, const std::string& descripcion, const std::string& numero, const std::string& doctor)
+        {
+
+                IModeloSerie* serie = NULL;
+
+                BuscarSerieInternal(UID, &serie);
+
+                if (serie == NULL) {
+
+                        IModeloEstudio* estudio = NULL;
+
+                        BuscarEstudioInternal(UIDEstudio, &estudio);
+
+                        if (estudio != NULL) {
+
+                                estudio->Series.push_back(IModeloSerie( this, estudio, UID, tipo, fecha, hora, descripcion, numero,doctor));
+                                serie = & (estudio->Series.back());
+                                ListaPunterosSeries.push_back(serie);
+                        } else {
+                                // La Serie no esta asociada a un estudio existente.
+                                throw GIL::DICOM::ModelException(_Std("Logical error: Serie not associated with existent study in model"));
+                        }
+                }
+
+                return *serie;
+
+        }
+
+        const IModeloImagen& InsertarImagen(const std::string& UIDSerie, const std::string& UID, const std::string& instanceNumber, const std::string& pathImagen = "")
+        {
+
+                IModeloImagen* imagen = NULL;
+
+                BuscarImagenInternal(UID, &imagen);
+
+                if (imagen == NULL) {
+
+                        IModeloSerie* serie = NULL;
+
+                        BuscarSerieInternal(UIDSerie, &serie);
+
+                        if (serie != NULL) {
+
+                                serie->Imagenes.push_back(IModeloImagen( this, serie, UID, instanceNumber, pathImagen));
+                                imagen = & (serie->Imagenes.back());
+                                ListaPunterosImagenes.push_back(imagen);
+                        } else {
+                                // La Imagen no esta asociada a una serie existente.
+                                throw GIL::DICOM::ModelException(_Std("Logical error: Image not associated with existent serie in model"));
+                        }
+                }
+
+                return *imagen;
+
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const IModeloDicom& d)
+        {
+                for (IModeloDicom::ListaPacientesType::const_iterator it = d.Pacientes.begin(); it != d.Pacientes.end(); ++it) {
+                        const IModeloPaciente& p = *it;
+                        out << "P: " << p.GetUID().c_str() << " [ " << p.GetNombre().c_str() << std::endl;
+                        for (IModeloPaciente::ListaEstudiosType::const_iterator ite = p.ListaEstudios().begin(); ite != p.ListaEstudios().end(); ite++) {
+                                const IModeloEstudio& e = *ite;
+                                out << "\tE: " << e.GetUID().c_str() << ", " << e.GetDescripcion().c_str() << std::endl;
+                                for (IModeloEstudio::ListaSeriesType::const_iterator its = e.ListaSeries().begin(); its != e.ListaSeries().end(); its++) {
+                                        const IModeloSerie& s = *its;
+                                        out << "\t\tS: " << s.GetUID().c_str() << ", " << s.GetTipo().c_str() << ", " << s.GetDescripcion().c_str() << std::endl;
+                                        for (IModeloSerie::ListaImagenesType::const_iterator iti = s.ListaImagenes().begin(); iti != s.ListaImagenes().end(); iti++) {
+                                                const IModeloImagen& i = *iti;
+                                                out << "\t\t\t" << "I: " << i.GetUID().c_str() << std::endl;
+                                        }
+                                }
+                        }
+                }
+                return out;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, IModeloDicom* const d)
+        {
+                if (d != NULL) {
+                        out << *d;
+                } else {
+                        out << "[ NULL ]";
+                }
+                return out;
+        }
+
+        const ListaPunterosImagenesType Imagenes() const
+        {
+                return ListaPunterosImagenes;
+        }
+
+public:
+        bool Error;
+
+protected:
+        ListaPacientesType Pacientes;
+
+        ListaPunterosEstudiosType  ListaPunterosEstudios;
+        ListaPunterosSeriesType    ListaPunterosSeries;
+        ListaPunterosImagenesType  ListaPunterosImagenes;
+
+};
diff --git a/cadxcore/api/doxmainpage.h b/cadxcore/api/doxmainpage.h
new file mode 100644
index 0000000..c589cc0
--- /dev/null
+++ b/cadxcore/api/doxmainpage.h
@@ -0,0 +1,79 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#ifndef DOXMAINPAGE_H
+#define DOXMAINPAGE_H
+
+/**
+    @mainpage Ginkgo CADx 3.0.0
+
+     Ginkgo CADx is an extensible multi-platform Open Source Medical Imaging software which provides a complete DICOM Viewer solution with advanced capabilities.
+
+	Extensions are both free or commercial plugins that allows you to expand the capabilities of Ginkgo CADx for your personal needs and provide advanced features such as image analytics based auto-diagnosis. Everyone can create their own extensions!.
+
+    Key Classes:\n
+      GNC::GCS::ICommand\n
+      GNC::GCS::IView\n
+
+
+    @ref whatsnew\n
+    @ref basics\n
+    @ref visualization\n
+	@ref coordinates\n
+    @ref integration\n
+    @ref extending\n
+
+    @section whatsnew What's new in Ginkgo CADx 3.0.0?
+
+    For comprehensive list of changes and new features, please see the changelog.
+
+    @section basics Understanding Ginkgo CADx framework
+
+    As seen here, Ginkgo CADx application is constructed:
+
+    @code
+
+    #include <api/api.h>
+
+    ...
+
+    @endcode
+
+
+	@section visualization The visualization system
+
+	...
+
+	@section coordinates The coordinates system
+
+	...
+
+	@section integration Integration
+
+	...
+
+	@section extending Extending Ginkgo CADx
+
+	...
+
+**/
+#endif
+
diff --git a/cadxcore/api/globals.h b/cadxcore/api/globals.h
new file mode 100644
index 0000000..e32725c
--- /dev/null
+++ b/cadxcore/api/globals.h
@@ -0,0 +1,58 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#if 0
+#if defined (_GINKGO_DEBUG)
+
+#include <iostream>
+#if defined(_WINDOWS)
+#define _WINSOCKAPI_
+#include <windows.h>
+#endif
+
+#define GDEBUG(expr) std::cout << "D: " << expr << "   @ " << __FILE__ << ":" << __LINE__ << std::endl;
+
+#else // !defined (_GINKGO_DEBUG)
+#define GDEBUG(expr) /* nada */
+#endif
+
+#if defined (_GINKGO_TRACE)
+#define GTRACE(expr) std::cout << "T: " << expr << "   @ " << __FILE__ << ":" << __LINE__ << std::endl;
+
+#else // !defined (_GINKGO_DEBUG)
+#define GTRACE(expr) /* nada */
+#endif
+#else
+#define GTRACE(expr) /* nada */
+#endif
+
+#if defined(__WXGTK__) || defined(__WXMAC__) || defined(__WXMSW__)
+
+#if defined (_WIN32)
+#define TOPATH(stringwx) std::string((stringwx.To8BitData().data()==NULL)?"":stringwx.To8BitData())
+#define FROMPATH(stringstd) wxString::From8BitData(stringstd.c_str())
+#else
+#define TOPATH(stringwx) std::string(stringwx.ToUTF8())
+#define FROMPATH(stringstd) wxString::FromUTF8(stringstd.c_str())
+#endif
+
+#endif
diff --git a/cadxcore/api/helpers/aetwildcards.cpp b/cadxcore/api/helpers/aetwildcards.cpp
new file mode 100644
index 0000000..bebc377
--- /dev/null
+++ b/cadxcore/api/helpers/aetwildcards.cpp
@@ -0,0 +1,167 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "aetwildcards.h"
+#include <string>
+#include <algorithm>
+#include <cstring>
+#include <cctype>
+#include <sstream>
+#include <iostream>
+#include <iomanip>
+#if defined(_WINDOWS)
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else
+#include <unistd.h>
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netdb.h>
+#include <arpa/inet.h>
+#endif
+
+using std::string;
+
+std::string GNC::GCS::AETWildcards::Parse(const std::string& AET)
+{
+        std::string realAET = AET;
+        std::string ip4[4];
+
+        if ( (AET.find("%IP") != std::string::npos) || (AET.find("%HOSTNAME") != std::string::npos) || (AET.find("%hostname") != std::string::npos))  {
+                char bufHostName[256];
+                string bufIP4;
+
+                std::memset(bufHostName, 0, 256 * sizeof(char));
+
+#if defined(_WINDOWS)
+                if ( gethostname(bufHostName, 256) != 0) {
+                        unsigned long error = WSAGetLastError();
+                        std::cout << "gethostname() Error: " << error << std::endl;
+                }
+#else
+                int ret = 0;
+                if ( (ret = gethostname(bufHostName, 256)) != 0) {
+                        std::cout << "gethostname() Error: " << ret << std::endl;
+                }
+#endif
+                else {
+                        struct addrinfo* l_addrInfo = NULL;
+                        struct addrinfo l_addrInfoHints;
+
+                        std::memset(&l_addrInfoHints, 0, sizeof(addrinfo));
+
+                        l_addrInfoHints.ai_socktype = SOCK_STREAM;
+                        l_addrInfoHints.ai_family = PF_INET;
+
+#if defined(_WINDOWS)
+                        if ( getaddrinfo(bufHostName, NULL, &l_addrInfoHints, &l_addrInfo) != 0 ) {
+                                unsigned long error = WSAGetLastError();
+                                std::cout << "getaddrinfo() Error: " << error << std::endl;
+                        }
+#else
+                        if ( (ret = getaddrinfo(bufHostName, NULL, &l_addrInfoHints, &l_addrInfo)) != 0 ) {
+                                std::cout << "getaddrinfo() Error: " << ret << std::endl;
+                        }
+#endif
+                        else {
+                                struct sockaddr_in* sockaddr_ipv4 = (struct sockaddr_in *) l_addrInfo->ai_addr;
+                                const char* ip = inet_ntoa(sockaddr_ipv4->sin_addr);
+
+                                bufIP4 = string(ip);
+
+                                unsigned long* sAddr = (unsigned long*) &sockaddr_ipv4->sin_addr.s_addr;
+                                {
+                                        std::stringstream ss;
+                                        ss << std::setw(3) << std::setfill('0');
+                                        ss << (int) ( ( (*sAddr) & 0xFF000000) >> 24);
+                                        ip4[3] = ss.str();
+                                }
+                                {
+                                        std::stringstream ss;
+                                        ss << std::setw(3) << std::setfill('0');
+                                        ss << (int) ( ( (*sAddr) & 0x00FF0000) >> 16);
+                                        ip4[2] = ss.str();
+                                }
+                                {
+                                        std::stringstream ss;
+                                        ss << std::setw(3) << std::setfill('0');
+                                        ss << (int) ( ( (*sAddr) & 0x0000FF00) >> 8);
+                                        ip4[1] = ss.str();
+                                }
+                                {
+                                        std::stringstream ss;
+                                        ss << std::setw(3) << std::setfill('0');
+                                        ss << (int) ( ( (*sAddr) & 0x000000FF) );
+                                        ip4[0] = ss.str();
+                                }
+                                freeaddrinfo(l_addrInfo);
+                        }
+                }
+
+                bool changed = true;
+
+                while(changed) {
+
+                        std::string::size_type it0;
+                        it0 = realAET.find("%IP1");
+                        if (it0 != std::string::npos) {
+                                realAET = realAET.replace(it0, 4, ip4[0] );
+                        } else {
+                                it0 = realAET.find("%IP2");
+                                if (it0 != std::string::npos) {
+                                        realAET = realAET.replace(it0, 4, ip4[1] );
+                                } else {
+                                        it0 = realAET.find("%IP3");
+                                        if (it0 != std::string::npos) {
+                                                realAET = realAET.replace(it0, 4, ip4[2] );
+                                        } else {
+                                                it0 = realAET.find("%IP4");
+                                                if (it0 != std::string::npos) {
+                                                        realAET	= realAET.replace(it0, 4, ip4[3] );
+                                                } else {
+                                                        it0 = realAET.find("%IP");
+                                                        if (it0 != std::string::npos) {
+                                                                realAET = realAET.replace(it0, 3, bufIP4.c_str() );
+                                                        } else {
+                                                                it0 = realAET.find("%HOSTNAME");
+                                                                if (it0 != std::string::npos) {
+                                                                        std::string hostName = bufHostName;
+                                                                        std::transform(hostName.begin(), hostName.end(), hostName.begin(), ::toupper);
+                                                                        realAET = realAET.replace(it0, 9, hostName.c_str() );
+                                                                } else {
+                                                                        it0 = realAET.find("%hostname");
+                                                                        if (it0 != std::string::npos) {
+                                                                                std::string hostName = bufHostName;
+                                                                                std::transform(hostName.begin(), hostName.end(), hostName.begin(), ::tolower);
+                                                                                realAET = realAET.replace(it0, 9, hostName.c_str() );
+                                                                        } else {
+                                                                                changed = false;
+                                                                        }
+                                                                }
+                                                        }
+                                                }
+                                        }
+                                }
+                        }
+                }
+        }
+
+        return realAET;
+}
diff --git a/cadxcore/api/helpers/aetwildcards.h b/cadxcore/api/helpers/aetwildcards.h
new file mode 100644
index 0000000..745a1e6
--- /dev/null
+++ b/cadxcore/api/helpers/aetwildcards.h
@@ -0,0 +1,35 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <api/api.h>
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI AETWildcards
+{
+public:
+        static std::string Parse(const std::string& AET);
+};
+}
+}
diff --git a/cadxcore/api/helpers/helpertexto.cpp b/cadxcore/api/helpers/helpertexto.cpp
new file mode 100644
index 0000000..3da5702
--- /dev/null
+++ b/cadxcore/api/helpers/helpertexto.cpp
@@ -0,0 +1,341 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+#include <list>
+
+#include <api/globals.h>
+#include <api/icontexto.h>
+#include <cairo/cairo.h>
+#include <api/westilo.h>
+#include "helpertexto.h"
+
+GNC::GCS::Widgets::HelperTexto::TVector GNC::GCS::Widgets::HelperTexto::calcularBoundingBox(TContexto* c, const std::string& texto, bool withShadow, float anchoMaximo, TAlineamiento alineamiento)
+{
+        return procesarTexto(c->cr, texto, NULL, withShadow, anchoMaximo, alineamiento, false);
+}
+
+GNC::GCS::Widgets::HelperTexto::TVector GNC::GCS::Widgets::HelperTexto::dibujarTexto(TContexto* c, const std::string& texto, bool withShadow, float anchoMaximo, TAlineamiento alineamiento)
+{
+        return procesarTexto(c->cr, texto, NULL, withShadow, anchoMaximo, alineamiento, true);
+}
+
+GNC::GCS::Widgets::HelperTexto::TVector GNC::GCS::Widgets::HelperTexto::dibujarTexto(TContexto* c, const std::string& texto, const TColor& col, bool withShadow, float anchoMaximo, TAlineamiento alineamiento)
+{
+        return procesarTexto(c->cr, texto, &col, withShadow, anchoMaximo, alineamiento, true);
+}
+
+
+class Palabra
+{
+public:
+        Palabra()
+        {
+        }
+
+        Palabra(const Palabra& o)
+        {
+                *this = o;
+        }
+
+        Palabra(const std::string& texto, GNC::GCS::Vector size)
+        {
+                this->texto = texto;
+                this->psize = size;
+        }
+
+        Palabra& operator = (const Palabra& o)
+        {
+                this->texto = o.texto;
+                this->psize = o.psize;
+                return *this;
+        }
+
+        std::string texto;
+        GNC::GCS::Vector psize;
+
+};
+
+class Linea : public std::list<Palabra>
+{
+
+public:
+        typedef std::list<Linea> Base;
+
+
+        Linea()
+        {
+        }
+
+        Linea(GNC::GCS::Vector size)
+        {
+                lsize = size;
+        }
+
+        void Insertar(const Palabra& palabra)
+        {
+                if (size() == 0) {
+                        lsize.AsignarMaximos(palabra.psize);
+                } else {
+                        lsize.x += palabra.psize.x;
+                        lsize.y = std::max(lsize.y, palabra.psize.y);
+                }
+                push_back(palabra);
+        }
+
+        double NumPalabrasD() const
+        {
+                return (double) size();
+        }
+
+        unsigned long NumPalabras() const
+        {
+                return size();
+        }
+
+        GNC::GCS::Vector lsize;
+
+};
+
+class Parrafo : public std::list<Linea>
+{
+public:
+        typedef std::list<Linea> Base;
+        typedef GNC::GCS::Widgets::HelperTexto::TAlineamiento TAlineamiento;
+
+        Parrafo(_cairo* cr, double anchoMaximo, const GNC::GCS::Widgets::Color* c,  bool withShadow, TAlineamiento alineamiento = GNC::GCS::Widgets::HelperTexto::TA_Izquierda, double margen_horizontal = 2.0f, double margen_vertical = 2.0f)
+        {
+                this->cr = cr;
+                this->margen.Asignar(margen_horizontal, margen_vertical);
+                this->anchoMaximo = anchoMaximo - margen.x - margen.x;
+                this->alineamiento = alineamiento;
+                this->color = c;
+                this->drawShadow = withShadow;
+                cairo_font_extents(cr, &font_extents);
+                cairo_text_extents(cr, "i", &espacio_extents);
+                InsertarNuevaLinea();
+        }
+
+        void InsertarPalabra(const std::string& palabra)
+        {
+                cairo_text_extents_t text_extents;
+
+                cairo_text_extents(cr, palabra.c_str(), &text_extents);
+
+                GNC::GCS::Vector psize (text_extents.x_advance - text_extents.x_bearing, text_extents.y_advance - text_extents.y_bearing);
+
+                Palabra p(palabra, psize);
+
+                Linea& la = LineaActual();
+                if ( Cabe(p, la) ) {
+                        la.Insertar(p);
+                } else {
+                        InsertarNuevaLinea();
+                        la.Insertar(p);
+                }
+        }
+
+        void InsertarNuevaLinea()
+        {
+                push_back(Linea(GNC::GCS::Vector(0, std::ceil(font_extents.height) + 3.0f)));
+        }
+
+        void InsertarTab()
+        {
+        }
+
+        Linea& LineaActual()
+        {
+                return back();
+        }
+
+        inline double AnchoDeEspacios(const Linea& l)
+        {
+                return std::max(l.NumPalabrasD() - 1.0f, (double)0.0f) * espacio_extents.x_advance;
+        }
+
+        bool Cabe(Palabra& p, Linea& l) const
+        {
+                bool cabe = false;
+                if (anchoMaximo > 0) {
+                        // El ancho de la linea actual es el ancho de las palabras mas el ancho de los espacios entre sus palabras.
+                        const double anchoLineaActual = l.lsize.x + ( std::max(l.NumPalabrasD(), (double)0.0f) * espacio_extents.x_advance);
+                        if ( anchoMaximo > (anchoLineaActual + p.psize.x) ) {
+                                cabe = true;
+                        }
+                } else {
+                        cabe = true;
+                }
+
+                return cabe;
+        }
+
+        GNC::GCS::Vector Procesar(bool dibujar = true)
+        {
+                GNC::GCS::Vector bbox;
+                for (Base::iterator it = begin(); it != end(); ++it) {
+                        const Linea& l = (*it);
+
+                        bbox.x = std::max(bbox.x, l.lsize.x + AnchoDeEspacios(l));
+                        bbox.y += std::ceil(font_extents.height) + 2.0f;
+                }
+                bbox += (margen + margen);
+                if (dibujar) {
+
+                        // Posicion inicial
+                        GNC::GCS::Vector pos = margen + GNC::GCS::Vector(0.0f, std::ceil(font_extents.height));
+
+                        for (Base::iterator itl = begin(); itl != end(); ++itl) {
+                                const Linea& l = (*itl);
+                                DibujarLinea(l, bbox, pos);
+                                pos.y += (std::ceil(font_extents.height) + 2.0f);
+                        }
+                }
+                return bbox;
+        }
+
+        inline void DibujarLinea(const Linea& l, const GNC::GCS::Vector& bbox, const GNC::GCS::Vector& posInicial)
+        {
+                GNC::GCS::Vector pos(posInicial);
+
+                switch(alineamiento) {
+                default:
+                case GNC::GCS::Widgets::HelperTexto::TA_Izquierda: {
+                        for (Linea::const_iterator it = l.begin(); it != l.end(); ++it) {
+                                const Palabra& p = (*it);
+                                DibujarPalabra(p, pos);
+                                pos.x += (p.psize.x + espacio_extents.x_advance);
+                        }
+                }
+                break;
+                case GNC::GCS::Widgets::HelperTexto::TA_Derecha: {
+                        pos.x += bbox.x - (margen.x + margen.x + l.lsize.x + AnchoDeEspacios(l));
+                        for (Linea::const_iterator it = l.begin(); it != l.end(); ++it) {
+                                const Palabra& p = (*it);
+                                DibujarPalabra(p, pos);
+                                pos.x += (p.psize.x + espacio_extents.x_advance);
+                        }
+                }
+                break;
+                case GNC::GCS::Widgets::HelperTexto::TA_Centrado: {
+                        pos.x += ( bbox.x - (margen.x + margen.x + l.lsize.x + AnchoDeEspacios(l)) ) / 2.0f;
+                        for (Linea::const_iterator it = l.begin(); it != l.end(); ++it) {
+                                const Palabra& p = (*it);
+                                DibujarPalabra(p, pos);
+                                pos.x += (p.psize.x + espacio_extents.x_advance);
+                        }
+                }
+                break;
+                case GNC::GCS::Widgets::HelperTexto::TA_Justificado: {
+                        double resto = ( bbox.x - (margen.x + margen.x + l.lsize.x + AnchoDeEspacios(l)) );
+                        resto = resto / std::max( (double)1.0f, l.NumPalabrasD() - 1.0f);
+                        for (Linea::const_iterator it = l.begin(); it != l.end(); ++it) {
+                                const Palabra& p = (*it);
+                                DibujarPalabra(p, pos);
+                                pos.x += (p.psize.x + espacio_extents.x_advance + resto);
+                        }
+                }
+                break;
+                }
+        }
+
+        inline void DibujarPalabra(const Palabra& p, const GNC::GCS::Vector& pos)
+        {
+                if (p.texto.size() > 0) {
+
+                        if (drawShadow) {
+                                cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+
+                                cairo_move_to(cr, pos.x + 1.0f, pos.y + 1.0f);
+                                cairo_set_source_rgba(cr, DEFAULT_TEXT_COLOR_INVERTED);
+                                cairo_show_text(cr, p.texto.c_str());
+                        } else {
+                                cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
+                        }
+
+                        cairo_move_to(cr, pos.x, pos.y);
+
+                        if (color == NULL) {
+                                cairo_set_source_rgba(cr, DEFAULT_TEXT_COLOR);
+                        } else {
+                                cairo_set_source_rgba(cr, color->RF(), color->GF(), color->BF(), color->AF());
+                        }
+                        cairo_show_text(cr, p.texto.c_str());
+
+                }
+        }
+
+        _cairo*                   cr;
+        double                    anchoMaximo;
+        TAlineamiento             alineamiento;
+
+        cairo_font_extents_t      font_extents;
+        cairo_text_extents_t      espacio_extents;
+
+        GNC::GCS::Vector          margen;
+        const GNC::GCS::Widgets::Color* color;
+        bool                      drawShadow;
+
+};
+
+GNC::GCS::Widgets::HelperTexto::TVector GNC::GCS::Widgets::HelperTexto::procesarTexto(_cairo* cr, const std::string& texto, const TColor* c, bool withShadow, float anchoMaximo, TAlineamiento alineamiento, bool dibujar)
+{
+
+        Parrafo par(cr, anchoMaximo, c, withShadow, alineamiento, 5.0f, 5.0f);
+
+        // Parseo del texto caracter a caracter
+        for (std::string::const_iterator it1 = texto.begin(); it1 != texto.end(); ) {
+                std::string palabra;
+                int wl = 0;
+                std::string::const_iterator it2;
+
+                for (it2 = it1; it2 != texto.end() && *it2 != ' ' && *it2 != '\t' && *it2 != '\r' && *it2 != '\n'; ++it2) {
+                        wl++;
+                }
+                if (wl > 0) {
+                        palabra = std::string(it1, it2);
+                        it1 += wl;
+
+                        par.InsertarPalabra(palabra);
+
+                } else {
+                        int skipped = 0;
+                        if (*it2 == ' ') {
+                                skipped = 1;
+                        } else if (*it2 == '\t') {
+                                par.InsertarTab();
+                                skipped = 1;
+                        } else if (*it2 == '\n') {
+                                par.InsertarNuevaLinea();
+                                skipped = 1;
+                        } else if (*it2 == '\r') {
+                                par.InsertarNuevaLinea();
+                                if (it2+1 != texto.end() && *(it2+1) == '\n') {
+                                        skipped = 2;
+                                } else {
+                                        skipped = 1;
+                                }
+                        }
+                        it1 += skipped;
+                }
+        }
+
+        return par.Procesar(dibujar);
+}
diff --git a/cadxcore/api/helpers/helpertexto.h b/cadxcore/api/helpers/helpertexto.h
new file mode 100644
index 0000000..88d331c
--- /dev/null
+++ b/cadxcore/api/helpers/helpertexto.h
@@ -0,0 +1,73 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/math/geometry.h>
+#include <api/iwidgets.h>
+
+//region Forward declarations
+struct _cairo_surface;
+struct _cairo;
+
+namespace GNC
+{
+namespace GCS
+{
+class Contexto3D;
+}
+}
+//endregion
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+class EXTAPI HelperTexto
+{
+public:
+        typedef GNC::GCS::Vector           TVector;
+        typedef GNC::GCS::Widgets::Color   TColor;
+        typedef GNC::GCS::Contexto3D       TContexto;
+
+        typedef enum TAlineamiento {
+                TA_Izquierda,
+                TA_Derecha,
+                TA_Centrado,
+                TA_Justificado
+        } TAlineamiento;
+
+        /* Calcula el bounding box del texto sobre cairo para la fuente seleccionada. Realiza word-wrapping. */
+        static TVector calcularBoundingBox(TContexto* c, const std::string& texto, bool withShadow, float anchoMaximo = -1, TAlineamiento alineamiento = TA_Izquierda);
+
+        /* Dibuja el texto en el contexto con fuente seleccionada. Realiza word-wrapping. */
+        static TVector dibujarTexto(TContexto* c, const std::string& texto, bool withShadow, float anchoMaximo = -1, TAlineamiento alineamiento = TA_Izquierda);
+
+        /* Dibuja el texto en el contexto con fuente seleccionada y color especificado. Realiza word-wrapping. */
+        static TVector dibujarTexto(TContexto* c, const std::string& texto, const TColor& col, bool withShadow, float anchoMaximo = -1, TAlineamiento alineamiento = TA_Izquierda);
+
+        /* Realiza el procesamiento del texto. Calcular el Bounding Box y opcionalmente pintar */
+        static TVector procesarTexto(_cairo* cr, const std::string& texto, const TColor* col, bool withShadow, float anchoMaximo = -1, TAlineamiento alineamiento = TA_Izquierda, bool dibujar = true);
+};
+}
+}
+}
diff --git a/cadxcore/api/helpers/prioritylist.h b/cadxcore/api/helpers/prioritylist.h
new file mode 100644
index 0000000..dcb39fb
--- /dev/null
+++ b/cadxcore/api/helpers/prioritylist.h
@@ -0,0 +1,146 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#ifndef PRIORITYLIST_H
+#define PRIORITYLIST_H
+
+#include <list>
+#include <iterator>
+
+namespace GNC
+{
+namespace GCS
+{
+
+//region "Helpers"
+// <editor-fold defaultstate="collapsed" desc="lista prioritaria">
+template<class T>
+class priority_list
+{
+        std::list<T> lst;
+public:
+        class iterator;
+
+        friend class iterator;
+
+        class iterator : public std::iterator< std::bidirectional_iterator_tag,T,ptrdiff_t>
+        {
+                typename std::list<T>* r;
+                typename std::list<T>::iterator it;
+        public:
+                iterator(priority_list<T>& otro)
+                {
+                        *this = otro;
+                }
+                iterator(std::list<T>& lst, const typename std::list<T>::iterator& i) : r(&lst), it(i) {}
+
+                bool operator==(const iterator& x) const
+                {
+                        return it == x.it;
+                }
+                bool operator!=(const iterator& x) const
+                {
+                        return !(*this == x);
+                }
+                typename std::list<T>::reference operator*() const
+                {
+                        return *it;
+                }
+                iterator& operator=(const iterator& otro)
+                {
+                        r = otro.r;
+                        it = otro.it;
+                        return *this;
+                }
+                iterator& operator++()
+                {
+                        ++it;
+                        return *this;
+                }
+                iterator operator++(int)
+                {
+                        iterator tmp = *this;
+                        ++*this;
+                        return tmp;
+                }
+                iterator& operator--()
+                {
+                        --it;
+                        return *this;
+                }
+                iterator operator--(int)
+                {
+                        iterator tmp = *this;
+                        --*this;
+                        return tmp;
+                }
+                iterator insert(const T& x)
+                {
+                        return iterator(*r, r->insert(it));
+                }
+                iterator erase()
+                {
+                        return iterator(*r, r->erase(it));
+                }
+        };
+
+        void insertar(const T& x)
+        {
+                bool stop = false;
+                for (typename std::list<T>::iterator it1 = lst.begin(); !stop && it1 != lst.end(); it1++) {
+                        if ((*it1) > x) {
+                                lst.insert(it1, x);
+                                stop = true;
+                        }
+                }
+                if (!stop) {
+                        lst.push_back(x);
+                }
+        }
+        void eliminar(const T& x)
+        {
+                bool stop = false;
+                for (typename std::list<T>::iterator it1 = lst.begin(); !stop && it1 != lst.end(); it1++) {
+                        if ((*it1) == x) {
+                                lst.erase(it1);
+                                stop = true;
+                        }
+                }
+        }
+        iterator begin()
+        {
+                return iterator(lst, lst.begin());
+        }
+        iterator end()
+        {
+                return iterator(lst, lst.end());
+        }
+        int size()
+        {
+                return lst.size();
+        }
+};
+// </editor-fold>
+//endregion
+}
+}
+#endif
diff --git a/cadxcore/api/iannotator.cpp b/cadxcore/api/iannotator.cpp
new file mode 100644
index 0000000..8ce0207
--- /dev/null
+++ b/cadxcore/api/iannotator.cpp
@@ -0,0 +1,314 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iannotator.h"
+#include <api/westilo.h>
+#include <api/icontexto.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/iwidgetsmanager.h>
+#include <api/ivista.h>
+#include <api/istudycontext.h>
+#include <main/entorno.h>
+#include <vtkginkgoimageviewer.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/internationalization/internationalization.h>
+
+#include <wx/string.h>
+#include <wx/translation.h>
+#include <wx/datetime.h>
+
+#include <vtkRenderWindow.h>
+#include <vtkImageData.h>
+
+GNC::GCS::IAnnotator::IAnnotator(GNC::GCS::IVista *pView): m_pView(pView)
+{
+}
+
+GNC::GCS::IAnnotator::~IAnnotator()
+{
+}
+
+std::string GNC::GCS::IAnnotator::GetAnnotationValue(GNC::GCS::Contexto3D* c, const std::string& key)
+{
+        if (key == "${NEWLINE}") {
+                return "\n";
+        } else if (key =="${GINKGO.VERSION.FULLTEXT}") {
+                return GNC::Entorno::Instance()->GetGinkgoVersionString();
+        } else if (key =="${GINKGO.ARCH}") {
+                if (sizeof(void*) == 4) {
+                        return "32 bits";
+                } else {
+                        return "64 bits";
+                }
+        } else if (key == "${VOLUME.IDX}") {
+                if (m_pView != NULL && m_pView->GetEstudio().IsValid()) {
+                        std::ostringstream ostr;
+                        ostr << m_pView->GetEstudio()->ActiveFileIndex + 1;
+                        return ostr.str();
+                }
+        } else if (key == "${SLICE.WIDTH}") {
+                if (c->GetRenderer() != NULL && c->GetRenderer()->m_pImageViewer != NULL) {
+                        int dims[3];
+                        c->GetRenderer()->m_pImageViewer->GetDimensions(dims);
+                        std::ostringstream ostr;
+                        ostr << dims[0];
+                        return ostr.str();
+                }
+        } else if (key == "${SLICE.HEIGHT}") {
+                if (c->GetRenderer() != NULL && c->GetRenderer()->m_pImageViewer != NULL) {
+                        int dims[3];
+                        c->GetRenderer()->m_pImageViewer->GetDimensions(dims);
+                        std::ostringstream ostr;
+                        ostr << dims[1];
+                        return ostr.str();
+                }
+        } else if (key == "${SLICE.WL.FULLTEXT}") {
+                if (c->GetRenderer() != NULL && c->GetRenderer()->m_pImageViewer != NULL) {
+                        std::ostringstream ostr;
+                        ostr << "WL: ";
+                        ostr << std::setiosflags(ios::fixed) << std::setprecision(ANNOTATION_FP_PRECISION);
+                        ostr << c->GetRenderer()->m_pImageViewer->GetWindow() << "/" << c->GetRenderer()->m_pImageViewer->GetLevel();
+                        return ostr.str();
+                }
+        } else if (key == "${SLICE.IDX}") {
+                if (c->GetRenderer() != NULL && c->GetRenderer()->m_pImageViewer != NULL) {
+                        std::ostringstream ostr;
+                        ostr << c->GetRenderer()->m_pImageViewer->GetTindex() + 1;
+                        return ostr.str();
+                }
+        } else if (key == "${SLICE.COUNT}") {
+                if (c->GetRenderer() != NULL && c->GetRenderer()->m_pImageViewer != NULL) {
+                        int dims[3];
+                        c->GetRenderer()->m_pImageViewer->GetDimensions(dims);
+                        std::ostringstream ostr;
+                        ostr << dims[2];
+                        return ostr.str();
+                }
+        } else if (key == "${SLICE.IDX.FULLTEXT}") {
+                if (c->GetRenderer() != NULL && c->GetRenderer()->m_pImageViewer != NULL && m_pView != NULL && m_pView->GetEstudio().IsValid()) {
+                        int dims[3];
+                        c->GetRenderer()->m_pImageViewer->GetDimensions(dims);
+                        std::ostringstream ostr;
+                        ostr << _Std("Slice") << ": " <<  c->GetRenderer()->m_pImageViewer->GetTindex() + 1 << " " << _Std("of") << " " << dims[2] << std::endl << _Std("Volume") << ": " << m_pView->GetEstudio()->ActiveFileIndex + 1;
+                        return ostr.str();
+                }
+        } else if (key == "${SLICE.VOXEL.SIZE}") {
+                if (c->GetRenderer() != NULL && c->GetRenderer()->m_pImageViewer != NULL && m_pView != NULL && m_pView->GetEstudio().IsValid()) {
+                        double spacing[3];
+                        bool hasSpacing = m_pView->GetEstudio()->GetSpacingActive(spacing[0], spacing[1], spacing[2]);
+                        std::ostringstream ostr;
+                        if (hasSpacing) {
+                                ostr << std::setiosflags(ios::fixed) << std::setprecision(ANNOTATION_FP_PRECISION);
+                                ostr << _Std("Voxel:") << spacing[0] << "x" << spacing[1] << " mm.";
+                        } else {
+                                ostr << _Std("Image without metric information");
+                        }
+                        return ostr.str();
+                }
+        } else if (key == "${SLICE.THICKNESS}") {
+                return GetFloatingPointTagWithPrecision(GKDCM_SliceThickness, "N/A", ANNOTATION_FP_PRECISION);
+        }  else if (key == "${SLICE.THICKNESS.FULLTEXT}") {
+                if(ContainsTag(GKDCM_SliceThickness)) {
+                        std::ostringstream ostr;
+                        ostr << _Std("Slice thickness") << ": " << GetFloatingPointTagWithPrecision(GKDCM_SliceThickness, "N/A", ANNOTATION_FP_PRECISION) << " mm.";
+                        return ostr.str();
+                }
+        } else if (key == "${SLICE.LOCATION}") {
+                return GetFloatingPointTagWithPrecision(GKDCM_SliceLocation, "N/A", ANNOTATION_FP_PRECISION);
+        }  else if (key == "${SLICE.LOCATION.FULLTEXT}") {
+                if(ContainsTag(GKDCM_SliceLocation)) {
+                        std::ostringstream ostr;
+                        ostr << _Std("Slice location") << ": " << GetFloatingPointTagWithPrecision(GKDCM_SliceLocation, "N/A", ANNOTATION_FP_PRECISION);
+                        return ostr.str();
+                }
+        } else if (key == "${VIEW.SCALE}") {
+                if (c->GetRenderer() != NULL && c->GetRenderer()->m_pImageViewer != NULL) {
+                        double ppmm =  (c->GetRenderer()->m_pImageViewer->GetRenderWindow()->GetDPI() / 25.4); // pixels per mm
+                        double mmpp =  1.0 / ppmm; // mm per pixel
+                        double spacing[3];
+                        c->GetRenderer()->m_pImageViewer->GetSpacing(spacing);
+                        double onePixelHeight = c->GetRenderer()->m_pImageViewer->GetZoomFactor();
+                        std::ostringstream ostr;
+                        ostr << std::setiosflags(ios::fixed) << std::setprecision(ANNOTATION_FP_PRECISION);
+                        ostr << _Std("Scale") << " 1:" << ( (spacing[1] * mmpp) / onePixelHeight);
+                        return ostr.str();
+                }
+        } else if (key == "${SLICE.LATERALITY}") {
+                std::string lat = GetTagValue(c, GKDCM_ImageLaterality);
+                if(lat != "") {
+                        std::ostringstream ostr;
+                        if(lat=="R") {
+                                ostr << _Std("Right") << ";" ;
+                        } else if(lat=="L") {
+                                ostr << _Std("Left") << ";";
+                        }
+                        return ostr.str();
+                }
+        }
+
+        return "";
+}
+
+std::string GNC::GCS::IAnnotator::FormatTag(const std::string& value, const std::string& format)
+{
+        if (format.empty()) {
+                return value;
+        } else if (format == "date") {
+                wxDateTime date;
+                date.ParseFormat(wxString::FromUTF8(value.c_str()),wxT("%Y%m%d"));
+                if (date.IsValid()) {
+                        return std::string(date.Format(_("%Y-%m-%d")).ToUTF8());
+                }
+        } else if (format == "time") {
+                wxDateTime time;
+                time.ParseFormat(wxString::FromUTF8(value.c_str()),wxT("%H%M%S"));
+                if(time.IsValid()) {
+                        return std::string(time.Format(_("%H:%M:%S")).ToUTF8());
+                }
+        }
+        //unknown format, or value hasn't right format
+        return value;
+}
+
+std::string GNC::GCS::IAnnotator::GetFloatingPointTagWithPrecision(const std::string& key, const std::string& defValue, int precision)
+{
+        if (m_pView != NULL && m_pView->GetEstudio().IsValid()) {
+                std::string value;
+                if (m_pView->GetEstudio()->GetTagActiveImage(key, value) && !value.empty()) {
+
+                        double fpVal = 0.0f;
+
+                        std::istringstream is(value);
+                        is >> fpVal;
+
+                        std::ostringstream ostr;
+                        ostr << std::setiosflags(ios::fixed) << std::setprecision(precision);
+                        ostr << fpVal;
+                        return ostr.str();
+                }
+        }
+        return defValue;
+}
+
+bool GNC::GCS::IAnnotator::ContainsTag(const std::string& key)
+{
+        if (m_pView != NULL && m_pView->GetEstudio().IsValid()) {
+                std::string value;
+                if (m_pView->GetEstudio()->GetTagActiveImage(key, value) && !value.empty()) {
+                        return true;
+                }
+        }
+        return false;
+}
+
+std::string GNC::GCS::IAnnotator::GetTagValue(GNC::GCS::Contexto3D* /*c*/, const std::string& key, const std::string& defValue, const std::string& format)
+{
+        if (m_pView != NULL && m_pView->GetEstudio().IsValid()) {
+                std::string value;
+                if (m_pView->GetEstudio()->GetTagActiveImage(key, value) && !value.empty()) {
+                        return FormatTag(value, format);
+                }
+        }
+        return defValue;
+}
+
+std::string GNC::GCS::IAnnotator::GetPositionAnnotation(GNC::GCS::Contexto3D* c, const GNC::GCS::Vector3D& wP)
+{
+        if (c->pRenderer == NULL || c->pRenderer->m_pImageViewer == NULL) {
+                return "";
+        }
+        std::ostringstream os;
+        os.setf(ios::floatfield, ios::fixed );
+        os.precision(2);
+        os.fill('0');
+
+        //double zpos = SeriesViewer->GetPipeline()->GetCurrentSliceIndex();
+
+        double ip[3] = {0,0,0};
+        c->pRenderer->m_pImageViewer->Proyect2D(wP.v, ip);
+        int pp[3] = {0, 0, 0};
+        int dims[3] = {1, 1, 1};
+
+        c->GetRenderer()->m_pImageViewer->GetDimensions(dims);
+
+        os << _Std("Position:") << " W:(" << wP.x << ", " << wP.y << "," << wP.z << "); I:(" << ip[0] << ", " << ip[1] << ", " << ip[2] << ")";
+
+        //corregir de convencion DICOM a convenciotk
+
+        c->GetRenderer()->m_pImageViewer->CoordenadasImagenACoordenadasPixel(ip, pp);
+        if (pp[0]>=0 && pp[0] < dims[0] && pp[1]>=0 && pp[1] < dims[1] && pp[2] >=0 && pp[2] < dims[2]) {
+                const vtkSmartPointer<vtkImageData>& pImg = c->GetRenderer()->m_pImageViewer->GetDataObject();
+                //image is not updated...
+                if (pImg == NULL || pImg->GetNumberOfPoints() == 0 || pImg->GetDimensions()[0] != dims[0] || pImg->GetDimensions()[1] != dims[1] ) {
+                        return "";
+                }
+                void *scalar = pImg->GetScalarPointer( (int)pp[0], (int)pp[1], (int)pp[2] );
+
+                if( scalar ) {
+
+                        bool primero = true;
+                        double value = 0.0f;
+
+                        for(int i = 0; i< c->GetRenderer()->m_pImageViewer->GetNumberOfComponents(); i++) {
+                                switch (c->GetRenderer()->m_pImageViewer->GetInput()->GetScalarType()) {
+                                case VTK_DOUBLE:
+                                        value = (((double*)scalar)[i]);
+                                        break;
+                                case VTK_FLOAT:
+                                        value = (double) (((float*)scalar)[i]);
+                                        break;
+                                case VTK_UNSIGNED_LONG:
+                                        value = (double) (((unsigned long*)scalar)[i]);
+                                        break;
+                                case VTK_LONG:
+                                        value = (double) (((long*)scalar)[i]);
+                                        break;
+                                case VTK_UNSIGNED_INT:
+                                        value = (double) (((unsigned int*)scalar)[i]);
+                                        break;
+                                case VTK_INT:
+                                        value = (double) (((int*)scalar)[i]);
+                                        break;
+                                case VTK_UNSIGNED_SHORT:
+                                        value = (double) (((unsigned short*)scalar)[i]);
+                                        break;
+                                case VTK_SHORT:
+                                        value = (double) (((short*)scalar)[i]);
+                                        break;
+                                case VTK_UNSIGNED_CHAR:
+                                        value = (double) (((unsigned char*)scalar)[i]);
+                                        break;
+                                case VTK_CHAR:
+                                        value = (double) (((char*)scalar)[i]);
+                                        break;
+                                }
+
+                                if(primero) {
+                                        os << " " << _Std("Value:") << value;
+                                } else {
+                                        os << "," << value;
+                                }
+                                primero = false;
+                        }
+                }
+        }
+
+        return os.str();
+}
diff --git a/cadxcore/api/iannotator.h b/cadxcore/api/iannotator.h
new file mode 100644
index 0000000..e64ae71
--- /dev/null
+++ b/cadxcore/api/iannotator.h
@@ -0,0 +1,61 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <api/math/geometry3d.h>
+
+namespace GNC
+{
+namespace GCS
+{
+//region "Forward declarations"
+class Contexto3D;
+class IVista;
+//endregion
+
+//-----------------------------------------------------------------------------------------------
+
+class IAnnotator
+{
+public:
+        IAnnotator(GNC::GCS::IVista *pView);
+        virtual ~IAnnotator();
+
+        /* special annotation values like ${NEWLINE}*/
+        virtual std::string GetAnnotationValue(GNC::GCS::Contexto3D* c, const std::string& key);
+
+
+
+        /* tag syntax is the same as defined in api/dicom/dcmdictionary.h   gggg|eeee*/
+        virtual std::string GetTagValue(GNC::GCS::Contexto3D* c, const std::string& key, const std::string& defValue = "", const std::string& format ="");
+
+        //el comportamiento por defecto de las anotaciones con posicion es el mismo que las de sin posicion
+        //si se desean pueden sobreescribirse
+        virtual std::string GetPositionAnnotation(GNC::GCS::Contexto3D* c, const GNC::GCS::Vector3D& wP);
+protected:
+        std::string FormatTag(const std::string& value, const std::string& format);
+        std::string GetFloatingPointTagWithPrecision(const std::string& key, const std::string& defValue, int precision);
+        bool ContainsTag(const std::string& key);
+
+        GNC::GCS::IVista* m_pView;
+};
+}
+}
diff --git a/cadxcore/api/ibutton.cpp b/cadxcore/api/ibutton.cpp
new file mode 100644
index 0000000..c127abc
--- /dev/null
+++ b/cadxcore/api/ibutton.cpp
@@ -0,0 +1,121 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ibutton.h"
+
+GNC::GCS::TriggerButton::TriggerButton()
+{
+        ResetTriggerButtonMask();
+}
+
+GNC::GCS::TriggerButton::TriggerButton(const TriggerButton& o)
+{
+        *this = o;
+}
+
+/** Resets the activation button mask
+**/
+void GNC::GCS::TriggerButton::ResetTriggerButtonMask()
+{
+        m_TriggerButtonMask = GNC::GCS::EMPTYBUTTONMASK;
+}
+
+/** Enable activation button mask
+**/
+void GNC::GCS::TriggerButton::EnableTriggerButton(int mask)
+{
+        m_TriggerButtonMask |= mask;
+}
+
+GNC::GCS::TriggerButton& GNC::GCS::TriggerButton::EnableLeft()
+{
+        EnableTriggerButton(LBUTTONMASK);
+        return *this;
+}
+
+GNC::GCS::TriggerButton& GNC::GCS::TriggerButton::EnableRight()
+{
+        EnableTriggerButton(RBUTTONMASK);
+        return *this;
+}
+
+GNC::GCS::TriggerButton& GNC::GCS::TriggerButton::EnableMiddle()
+{
+        EnableTriggerButton(MBUTTONMASK);
+        return *this;
+}
+
+/** Disable activation button mask
+**/
+void GNC::GCS::TriggerButton::DisableTriggerButton(int mask)
+{
+        m_TriggerButtonMask &= ~mask;
+}
+
+GNC::GCS::TriggerButton& GNC::GCS::TriggerButton::DisableLeft()
+{
+        DisableTriggerButton(LBUTTONMASK);
+        return *this;
+}
+
+GNC::GCS::TriggerButton& GNC::GCS::TriggerButton::DisableRight()
+{
+        DisableTriggerButton(RBUTTONMASK);
+        return *this;
+}
+
+GNC::GCS::TriggerButton& GNC::GCS::TriggerButton::DisableMiddle()
+{
+        DisableTriggerButton(MBUTTONMASK);
+        return *this;
+}
+
+/** Checks activation button mask is applied
+**/
+bool GNC::GCS::TriggerButton::IsTriggerButtonEnabled(int mask) const
+{
+        return (0 != (m_TriggerButtonMask & mask));
+}
+
+bool GNC::GCS::TriggerButton::IsLeftEnabled() const
+{
+        return IsTriggerButtonEnabled(LBUTTONMASK);
+}
+
+bool GNC::GCS::TriggerButton::IsRightEnabled() const
+{
+        return IsTriggerButtonEnabled(RBUTTONMASK);
+}
+
+bool GNC::GCS::TriggerButton::IsMiddleEnabled() const
+{
+        return IsTriggerButtonEnabled(MBUTTONMASK);
+}
+
+GNC::GCS::TriggerButton& GNC::GCS::TriggerButton::operator=(const GNC::GCS::TriggerButton& o)
+{
+        this->m_TriggerButtonMask = o.m_TriggerButtonMask;
+        return *this;
+}
+
+bool GNC::GCS::TriggerButton::IsEmpty() const
+{
+        return this->m_TriggerButtonMask == EMPTYBUTTONMASK;
+}
diff --git a/cadxcore/api/ibutton.h b/cadxcore/api/ibutton.h
new file mode 100644
index 0000000..b3c3b18
--- /dev/null
+++ b/cadxcore/api/ibutton.h
@@ -0,0 +1,88 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IBUTTON_H
+#define IBUTTON_H
+#include <api/api.h>
+
+namespace GNC
+{
+namespace GCS
+{
+
+const int EMPTYBUTTONMASK = 0x00;
+const int LBUTTONMASK = 0x01;
+const int RBUTTONMASK = 0x02;
+const int MBUTTONMASK = 0x04;
+
+class EXTAPI TriggerButton
+{
+
+public:
+
+        TriggerButton();
+
+        TriggerButton(const TriggerButton& o);
+
+        /** Resets the activation button mask
+        **/
+        void ResetTriggerButtonMask();
+
+        /** Enable activation button mask
+        **/
+        void EnableTriggerButton(int mask);
+
+        TriggerButton& EnableLeft();
+
+        TriggerButton& EnableRight();
+
+        TriggerButton& EnableMiddle();
+
+        /** Disable activation button mask
+        **/
+        void DisableTriggerButton(int mask);
+
+        TriggerButton& DisableLeft();
+
+        TriggerButton& DisableRight();
+
+        TriggerButton& DisableMiddle();
+
+        /** Checks activation button mask is applied
+        **/
+        bool IsTriggerButtonEnabled(int mask) const;
+
+        bool IsLeftEnabled() const;
+
+        bool IsRightEnabled() const;
+
+        bool IsMiddleEnabled() const;
+
+        TriggerButton& operator=(const TriggerButton& o);
+
+        bool IsEmpty() const;
+
+protected:
+        int m_TriggerButtonMask;
+};
+}
+}
+#endif
diff --git a/cadxcore/api/icacheimagenes.h b/cadxcore/api/icacheimagenes.h
new file mode 100644
index 0000000..c1cc59f
--- /dev/null
+++ b/cadxcore/api/icacheimagenes.h
@@ -0,0 +1,104 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <map>
+#include <api/autoptr.h>
+#include "ilock.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class IElementoCache
+{
+public:
+        IElementoCache() {};
+        virtual ~IElementoCache() {};
+
+};
+
+template <class TPixel>
+class IElementoCacheConcreto : public IElementoCache, public ILockable
+{
+public:
+        IElementoCacheConcreto(int ancho, int alto, int numeroComponentes):IElementoCache()
+        {
+                m_ancho = ancho;
+                m_alto = alto;
+                m_numeroComponentes = numeroComponentes;
+                m_PixelData = NULL;
+        }
+
+        virtual ~IElementoCacheConcreto()
+        {
+        }
+
+        virtual TPixel* GetPixelData()
+        {
+                GNC::GCS::ILocker lock(this);
+                if(m_PixelData == NULL) {
+                        Inicializar();
+                }
+                return m_PixelData;
+        }
+
+        virtual void Inicializar() = 0;
+
+        virtual int GetAncho()
+        {
+                return m_ancho;
+        }
+
+        virtual int GetAlto()
+        {
+                return m_alto;
+        }
+
+        virtual int GetNumeroComponentes()
+        {
+                return m_numeroComponentes;
+        }
+
+protected:
+        TPixel* m_PixelData;
+        int m_ancho;
+        int m_alto;
+        int m_numeroComponentes;
+};
+
+typedef std::map<std::string,GNC::GCS::Ptr<IElementoCache> > MapaImagenes;
+
+class ICacheImagenes: protected std::map<void*, MapaImagenes>
+{
+public:
+        ICacheImagenes() {}
+        ~ICacheImagenes()
+        {
+                for(ICacheImagenes::iterator it = begin(); it!=end(); ++it) {
+                        (*it).second.clear();
+                }
+                clear();
+        }
+
+};
+}
+}
diff --git a/cadxcore/api/icommand.cpp b/cadxcore/api/icommand.cpp
new file mode 100644
index 0000000..5dc37dd
--- /dev/null
+++ b/cadxcore/api/icommand.cpp
@@ -0,0 +1,261 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+#include <list>
+#include <api/iexception.h>
+#include <api/controllers/iprogresscontroller.h>
+#include "iproxynotificadorprogreso.h"
+#include "icommand.h"
+
+//---------------------------------------------------------------------------------------
+//region Forward declarations
+namespace GNC
+{
+class LanzadorComandos;
+class INotificadorProgreso;
+class CommandController;
+
+namespace GCS
+{
+class IComando;
+
+}
+}
+//endregion
+
+namespace GNC
+{
+namespace GCS
+{
+
+//---------------------------------------------------------------------------------------
+IComandoParams::IComandoParams() {}
+IComandoParams::~IComandoParams() {}
+
+//---------------------------------------------------------------------------------------
+IComandoResult::IComandoResult() { }
+IComandoResult::~IComandoResult() { }
+
+//---------------------------------------------------------------------------------------
+IComando::IComando(IComandoParams* pParams, const std::string& name , void* pOwner)
+{
+        m_pParams = pParams;
+        m_pResult = NULL;
+        m_pNotificadorProgreso = NULL;
+        m_Abortado = false;
+        m_Id = -1;
+        m_Nombre = name;
+        m_pOwner = pOwner;
+        if (m_Nombre.size() == 0) {
+                m_Nombre = "Comando";
+        }
+        NotificarProgreso(0.0f, m_Nombre);
+}
+
+IComando::~IComando()
+{
+        Free();
+        OnDestroy();
+}
+
+void IComando::Free()
+{
+        if (m_pResult != NULL)  {
+                delete m_pResult;
+                m_pResult = NULL;
+        }
+        if (m_pParams != NULL) {
+                delete m_pParams;
+                m_pParams = NULL;
+        }
+}
+
+//endregion
+
+//---------------------------------------------------------------------------------------
+//region Interfaz especifica
+
+
+/** Notifica el progreso. Si devuelve true, el ejecutor dejara de procesarse **/
+bool IComando::NotificarProgreso(float progresoNormalizado, const std::string& texto)
+{
+        if (m_Abortado) {
+                return false;
+        }
+
+        if (m_pNotificadorProgreso != NULL) {
+                return m_pNotificadorProgreso->NotificarProgreso(progresoNormalizado, texto);
+        }
+
+        return true;
+}
+
+/** Callback que puede ser sobrecargado por el sujeto para incluir acciones especificas cuando se aborta el comando **/
+void IComando::OnAbort() {}
+
+/** Callback que puede ser sobrecargado por el sujeto para incluir acciones especificas cuando se destruye el comando **/
+void IComando::OnDestroy() {}
+
+//endregion
+
+//---------------------------------------------------------------------------------------
+//region Getters y helpers
+int IComando::GetId() const
+{
+        return m_Id;
+}
+
+void IComando::SetId(int id)
+{
+        m_Id = id;
+}
+
+void IComando::SetOwner(void* pOwner)
+{
+        m_pOwner = pOwner;
+}
+
+void* IComando::GetOwner() const
+{
+        return m_pOwner;
+}
+
+const std::string& IComando::GetName() const
+{
+        return m_Nombre;
+}
+
+IComandoParams* IComando::GetParams()
+{
+        return m_pParams;
+}
+
+void IComando::Abort()
+{
+        m_Abortado = true;
+        OnAbort();
+}
+
+bool IComando::EstaAbortado() const
+{
+        return m_Abortado;
+}
+
+//endregion
+
+//---------------------------------------------------------------------------------------
+//region Notificacion
+GNC::INotificadorProgreso* IComando::GetNotificadorProgreso()
+{
+        return m_pNotificadorProgreso;
+}
+
+// Este metodo debe ser invocado solo por el lanzador de comandos.
+void IComando::SetNotificadorProgreso(GNC::INotificadorProgreso* pNotificador)
+{
+        m_pNotificadorProgreso = pNotificador;
+}
+//endregion
+
+//---------------------------------------------------------------------------------------
+//region "Gestion de Dependencias"
+
+
+void IComando::EsperaA(int idDep)
+{
+        m_Dependencias.push_back(idDep);
+}
+
+void IComando::AbortaSi(int idConflicto)
+{
+        m_Conflictos.push_back(idConflicto);
+}
+
+void IComando::CancelaA(int idReemplazo)
+{
+        m_Reemplazos.push_back(idReemplazo);
+}
+
+///////////////IPersistentCommand////////////////
+IPersistentCommand::IPersistentCommand(const std::list<long> seriesId, const std::string description):
+        IComando(NULL),
+        m_seriesId(seriesId),
+        m_idBBDD(-1),
+        m_status(IPersistentCommand::Pending),
+        m_description(description)
+{
+
+}
+
+IPersistentCommand::IPersistentCommand(long idBBDD, const std::list<long> seriesId, const std::string description):
+        IComando(NULL),
+        m_seriesId(seriesId),
+        m_idBBDD(idBBDD),
+        m_status(IPersistentCommand::Pending),
+        m_description(description)
+{
+}
+
+IPersistentCommand::~IPersistentCommand()
+{
+}
+
+std::string IPersistentCommand::getClassUID()
+{
+        throw new GNC::GCS::IException("Method has to be overridden");
+}
+
+long IPersistentCommand::getIdBBDD()
+{
+        return m_idBBDD;
+}
+
+void IPersistentCommand::setIdBBDD(long id)
+{
+        m_idBBDD = id;
+}
+
+const std::list<long>& IPersistentCommand::getSeriesId()
+{
+        return m_seriesId;
+}
+
+const std::string& IPersistentCommand::getErrorDescription()
+{
+        return m_errorDescription;
+}
+
+IPersistentCommand::TStatus IPersistentCommand::getStatus()
+{
+        return m_status;
+}
+
+const std::string& IPersistentCommand::getDescription()
+{
+        return m_description;
+}
+
+void IPersistentCommand::setStatus(IPersistentCommand::TStatus status)
+{
+        m_status = status;
+}
+}
+}
diff --git a/cadxcore/api/icommand.h b/cadxcore/api/icommand.h
new file mode 100644
index 0000000..8aca6e8
--- /dev/null
+++ b/cadxcore/api/icommand.h
@@ -0,0 +1,204 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+#include <api/controllers/iprogresscontroller.h>
+#include "iproxynotificadorprogreso.h"
+
+//---------------------------------------------------------------------------------------
+//region Forward declarations
+namespace GNC
+{
+class CommandLauncher;
+class CommandController;
+class INotificadorProgreso;
+
+namespace GCS
+{
+class IComando;
+class ICommandController;
+}
+}
+//endregion
+
+namespace GNC
+{
+namespace GCS
+{
+
+//---------------------------------------------------------------------------------------
+class EXTAPI IComandoParams
+{
+public:
+        IComandoParams();
+        virtual ~IComandoParams();
+};
+
+//---------------------------------------------------------------------------------------
+class EXTAPI IComandoResult
+{
+public:
+        IComandoResult();
+        virtual ~IComandoResult();
+};
+
+
+//---------------------------------------------------------------------------------------
+class EXTAPI IComando : public GNC::IProxyNotificadorProgreso
+{
+        //---------------------------------------------------------------------------------------
+        //region Constructor y destructor
+        typedef std::list< int> TipoListaIdComandos;
+
+public:
+
+        IComando(IComandoParams* pParams, const std::string& name = "Comando", void* pOwner = NULL);
+
+        virtual ~IComando();
+
+        void Free();
+
+        //endregion
+
+        //---------------------------------------------------------------------------------------
+        //region Interfaz especifica
+protected:
+
+        virtual void Execute() = 0;
+
+        virtual void Update() = 0;
+
+public:
+
+        /** Notifica el progreso. Si devuelve true, el ejecutor dejara de procesarse **/
+        virtual bool NotificarProgreso(float progresoNormalizado, const std::string& texto);
+protected:
+
+        /** Callback que puede ser sobrecargado por el sujeto para incluir acciones especificas cuando se aborta el comando **/
+        virtual void OnAbort();
+
+        /** Callback que puede ser sobrecargado por el sujeto para incluir acciones especificas cuando se destruye el comando **/
+        virtual void OnDestroy();
+
+        //endregion
+
+        //---------------------------------------------------------------------------------------
+        //region Getters y helpers
+public:
+
+        int GetId() const;
+
+        void SetId(int id);
+
+        void SetOwner(void* pOwner);
+
+        void* GetOwner() const;
+
+        const std::string& GetName() const;
+
+        IComandoParams* GetParams();
+
+        void Abort() ;
+
+        bool EstaAbortado() const;
+
+        //endregion
+
+        //---------------------------------------------------------------------------------------
+        //region Notificacion
+        GNC::INotificadorProgreso* GetNotificadorProgreso();
+private:
+        // Este metodo debe ser invocado solo por el lanzador de comandos.
+        void SetNotificadorProgreso(GNC::INotificadorProgreso* pNotificador);
+        //endregion
+
+
+        //---------------------------------------------------------------------------------------
+        //region "Gestion de Dependencias"
+
+protected:
+
+        void EsperaA(int idDep);
+
+        void AbortaSi(int idConflicto);
+
+        void CancelaA(int idReemplazo);
+
+        TipoListaIdComandos   m_Dependencias;
+        TipoListaIdComandos   m_Conflictos;
+        TipoListaIdComandos   m_Reemplazos;
+        //endregion
+
+
+        //---------------------------------------------------------------------------------------
+        //region "Atributos"
+
+protected:
+        IComandoParams*            m_pParams;
+        IComandoResult*            m_pResult;
+
+private:
+        int                        m_Id;
+        std::string                m_Nombre;
+        bool                       m_Abortado;
+        void*                      m_pOwner;
+        GNC::INotificadorProgreso* m_pNotificadorProgreso;
+
+        friend class GNC::CommandLauncher;
+        friend class GNC::CommandController;
+        //endregion
+};
+
+//deprecated, persistent commands are deprecated
+class EXTAPI IPersistentCommand: public GNC::GCS::IComando
+{
+public:
+        typedef enum {
+                Pending = 0,
+                Ok,
+                Error
+        } TStatus;
+
+        IPersistentCommand(const std::list<long> seriesId, const std::string description);
+        IPersistentCommand(long idBBDD, const std::list<long> seriesId, const std::string description);
+
+        virtual ~IPersistentCommand();
+        virtual std::string serialize() = 0;
+        virtual void init(const std::string& serializedValue) = 0;
+        virtual std::string getClassUID();
+        long getIdBBDD();
+        void setIdBBDD(long id);
+        const std::list<long>& getSeriesId();
+        const std::string& getErrorDescription();
+        TStatus getStatus();
+        const std::string& getDescription();
+
+protected:
+        void setStatus(TStatus status);
+        std::list<long> m_seriesId;
+        long m_idBBDD;
+        TStatus m_status;
+        std::string m_description;
+        std::string m_errorDescription;
+};
+}
+}
diff --git a/cadxcore/api/iconfiguracion.h b/cadxcore/api/iconfiguracion.h
new file mode 100644
index 0000000..9b6125e
--- /dev/null
+++ b/cadxcore/api/iconfiguracion.h
@@ -0,0 +1,71 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+
+class wxWindow;
+
+class IDialogoConfiguracion
+{
+public:
+        IDialogoConfiguracion() {}
+        virtual ~IDialogoConfiguracion() {}
+        virtual void OnPropiedadCambiada() = 0;
+};
+
+class IPasoConfiguracion
+{
+public:
+        IPasoConfiguracion(IDialogoConfiguracion* pDialogo)
+        {
+                m_pDialogoConfiguracion = pDialogo;
+        }
+
+        virtual ~IPasoConfiguracion()
+        {
+                m_pDialogoConfiguracion = NULL;
+        }
+
+protected:
+        IDialogoConfiguracion* m_pDialogoConfiguracion;
+
+public:
+
+        void OnPropiedadCambiada()
+        {
+                if(m_pDialogoConfiguracion != NULL) {
+                        m_pDialogoConfiguracion->OnPropiedadCambiada();
+                }
+        }
+
+        virtual void Recargar() = 0;
+
+        virtual wxWindow* GetPanel() = 0;
+
+        virtual std::string GetTitle() = 0;
+
+        virtual std::string GetCabecera() = 0;
+
+        virtual bool Validar() = 0;
+
+        virtual bool Guardar() = 0;
+};
diff --git a/cadxcore/api/icontexto.cpp b/cadxcore/api/icontexto.cpp
new file mode 100644
index 0000000..e8ec8af
--- /dev/null
+++ b/cadxcore/api/icontexto.cpp
@@ -0,0 +1,194 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <cstdlib>
+
+#include "icontexto.h"
+#include <api/math/geometry3d.h>
+#include <vtk/vtkginkgoimageviewer.h>
+
+#include <cairo/cairo.h>
+
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+GNC::GCS::Contexto3D::Contexto3D(TipoProyeccion proyeccion)
+{
+
+        tipoProyeccion = proyeccion;
+        pWindow = NULL;
+        pRenderer = NULL;
+        pixelData = NULL;
+        cr = NULL;
+        cs = NULL;
+        pOffscrenViewer = NULL;
+        offscreenCreado = false;
+        OVID = 0;
+        Reset();
+
+}
+GNC::GCS::Contexto3D::~Contexto3D()
+{
+        Reset();
+}
+
+void GNC::GCS::Contexto3D::Reset()
+{
+
+        ancho           = 0;
+        flipHorizontal  = false;
+        flipVertical    = false;
+        alto            = 0;
+        rotacion        = 0;
+        spacing[0] = spacing[1] = spacing[2] = 1.0f;
+        origin[0] = origin[1] = origin[2] = 0.0f;
+        m_RelacionMundoPantallaOffscreen.Asignar(1.0f, 1.0f);
+        m_RelacionImagenPantalla.Asignar(1.0f, 1.0f);
+        ScreenDirectionCosines[0].Asignar(1.0, 0.0);
+        ScreenDirectionCosines[1].Asignar(0.0, 1.0);
+
+        OVID            = 0;
+        if ( offscreenCreado) {
+                DestruirOffscreen();
+        }
+}
+
+void GNC::GCS::Contexto3D::SetupImageScreenRel(double relX, double relY, double /*relZ*/)
+{
+        //GNC::GCS::Vector3D vrel(relX, relY, relZ);
+        //std::cout << "Rel : " << vrel << std::endl;
+        m_RelacionImagenPantalla.Asignar(relX, relY);
+}
+
+GNC::GCS::Vector& GNC::GCS::Contexto3D::RefRelacionImagenPantalla()
+{
+        return m_RelacionImagenPantalla;
+}
+
+const GNC::GCS::Vector& GNC::GCS::Contexto3D::RelacionImagenPantalla() const
+{
+        return m_RelacionImagenPantalla;
+}
+
+GNC::GCS::Vector& GNC::GCS::Contexto3D::RefRelacionMundoPantallaOffscreen()
+{
+        return m_RelacionMundoPantallaOffscreen;
+}
+
+const GNC::GCS::Vector& GNC::GCS::Contexto3D::RelacionMundoPantallaOffscreen() const
+{
+        return m_RelacionMundoPantallaOffscreen;
+}
+
+bool GNC::GCS::Contexto3D::IsOk() const
+{
+        return ancho > 0 && alto > 0 && pWindow != NULL && pRenderer != NULL;
+}
+
+GNC::GCS::IWidgetsRenderer* GNC::GCS::Contexto3D::GetRenderer() const
+{
+        return pRenderer;
+}
+
+
+void GNC::GCS::Contexto3D::CrearOffscreen()
+{
+
+        if (offscreenCreado) {
+                DestruirOffscreen();
+        }
+
+        if (ancho == 0 || alto == 0) {
+                return;
+        }
+
+
+        const int numCanales = 4;
+        int rowStride = ancho * numCanales;
+        pixelData = (unsigned char*)std::calloc(rowStride, alto);
+
+        if (pixelData == NULL) {
+                return;
+        }
+
+        cs = cairo_image_surface_create_for_data(pixelData, CAIRO_FORMAT_ARGB32, ancho, alto, rowStride);
+        if (cairo_surface_status(cs) != CAIRO_STATUS_SUCCESS) {
+                std::cerr << "Error al crear surface" << std::endl;
+                cairo_surface_destroy(cs);
+                cs =  NULL;
+                free(pixelData);
+                pixelData = NULL;
+                return;
+        }
+
+        else {
+                cr = cairo_create(cs);
+                if (cairo_status(cr) != CAIRO_STATUS_SUCCESS) {
+                        cairo_destroy(cr);
+                        cr = NULL;
+                        cairo_surface_destroy(cs);
+                        cs = NULL;
+                        free(pixelData);
+                        pixelData = NULL;
+                        return;
+                }
+        }
+
+        //relacion mundo/pantalla
+        m_RelacionMundoPantallaOffscreen = GNC::GCS::Vector( ancho, alto) * (1.0f/720.0f);
+
+        factorReescalado = GNC::GCS::Vector::Unidad();
+        offscreenCreado = true;
+}
+
+void GNC::GCS::Contexto3D::DestruirOffscreen()
+{
+
+        if (!offscreenCreado) {
+                return;
+        }
+        if (cr != NULL) {
+                cairo_destroy(cr);
+                cr = NULL;
+        }
+        if (cs != NULL) {
+                cairo_surface_destroy(cs);
+                cs = NULL;
+        }
+        if (pixelData != NULL) {
+                free(pixelData);
+                pixelData = NULL;
+        }
+
+        offscreenCreado = false;
+
+}
+
+GNC::GCS::Vector GNC::GCS::Contexto3D::Reproyectar(const GNC::GCS::Vector& v)
+{
+
+        GNC::GCS::Vector vp = v;
+
+        return vp;
+}
+
diff --git a/cadxcore/api/icontexto.h b/cadxcore/api/icontexto.h
new file mode 100644
index 0000000..bb72a1d
--- /dev/null
+++ b/cadxcore/api/icontexto.h
@@ -0,0 +1,127 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/math/geometry.h>
+
+// Forward Declarations
+
+struct _cairo;
+struct _cairo_surface;
+
+class vtkGinkgoImageViewer;
+namespace GNC
+{
+namespace GCS
+{
+class IWidgetsRenderer;
+}
+}
+
+class wxWindow;
+
+// Forward Declarations
+
+namespace GNC
+{
+namespace GCS
+{
+
+typedef enum TipoProyeccion {
+        TP_Ortogonal,
+        TP_Perspectiva
+} TipoProyeccion;
+
+class EXTAPI Contexto3D
+{
+public:
+
+        /* Dimension en las coordenadas x del viewport */
+        unsigned int ancho;
+        /* Dimension en las coordenadas y del viewport */
+        unsigned int alto;
+
+        // Propiedades para Offscreen Rendering
+
+        double           spacing[3];
+        double           origin[3];
+        unsigned char*   pixelData;
+        _cairo*          cr;
+        _cairo_surface*  cs;
+        bool             offscreenCreado;
+        long             OVID; // VID offscreen
+        GNC::GCS::Vector factorReescalado; // Factor de reescalado de la imagen. Para corregir coordenadas mundo al redimensionar.
+
+        /* Puntero a wxWindow del renderer para permitir enparentar wxWidgets (Ventanas, dialogos, etc...) */
+        wxWindow*              pWindow;
+        IWidgetsRenderer*      pRenderer;
+        vtkGinkgoImageViewer*  pOffscrenViewer;
+
+
+protected:
+        /* Relacion coordenada mundo => coordenada pantalla*/
+        GNC::GCS::Vector       m_RelacionMundoPantallaOffscreen;
+
+        GNC::GCS::Vector       m_RelacionImagenPantalla;
+
+
+
+public:
+
+        /* Rotacion y posicion de la camara */
+        double rotacion;
+        bool   flipHorizontal;
+        bool   flipVertical;
+
+        GNC::GCS::Vector ScreenDirectionCosines[2]; /** Director unit vectors (image plane coordinates) for screen coordinates **/
+
+        /* Tipo de Proyeccion (Para calcular la norma) */
+        TipoProyeccion tipoProyeccion;
+
+        Contexto3D(TipoProyeccion proyeccion = TP_Ortogonal);
+
+        ~Contexto3D();
+
+        void Reset();
+
+        void SetupImageScreenRel(double relX, double relY, double relZ);
+
+        GNC::GCS::Vector& RefRelacionImagenPantalla();
+
+        const GNC::GCS::Vector& RelacionImagenPantalla() const;
+
+        GNC::GCS::Vector& RefRelacionMundoPantallaOffscreen();
+
+        const GNC::GCS::Vector& RelacionMundoPantallaOffscreen() const;
+
+        bool IsOk() const;
+
+        IWidgetsRenderer* GetRenderer() const;
+
+        void CrearOffscreen();
+
+        void DestruirOffscreen();
+
+        GNC::GCS::Vector Reproyectar(const GNC::GCS::Vector& v);
+
+};
+}
+}
diff --git a/cadxcore/api/icontract.cpp b/cadxcore/api/icontract.cpp
new file mode 100644
index 0000000..d5293c8
--- /dev/null
+++ b/cadxcore/api/icontract.cpp
@@ -0,0 +1,72 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "icontract.h"
+
+GNC::GCS::ContractException::ContractException(const std::string& msg) throw() : GNC::GCS::IException(msg, "GNC", false)
+{
+}
+
+GNC::GCS::IContract::IContract(ContractType type, int prio)
+{
+        m_Type = type;
+        m_Priority = prio;
+}
+
+GNC::GCS::IContract::~IContract()
+{
+
+}
+void GNC::GCS::IContract::Ping()
+{
+}
+
+bool GNC::GCS::IContract::operator<(const GNC::GCS::IContract& other) const
+{
+        if (m_Priority < other.m_Priority) {
+                return true;
+        }
+        return false;
+}
+
+bool GNC::GCS::IContract::operator<(const GNC::GCS::IContract* other) const
+{
+        if (m_Priority < other->m_Priority) {
+                return true;
+        }
+        return false;
+}
+//------------------------------------------------------------------------
+GNC::GCS::IContractable::IContractable()
+{
+        m_pContract = NULL;
+}
+
+GNC::GCS::IContractable::~IContractable()
+{
+        m_pContract = NULL;
+}
+
+void GNC::GCS::IContractable::Register(IContract* contract)
+{
+        if (IsValidContract(contract)) {
+                m_pContract = contract;
+        }
+}
diff --git a/cadxcore/api/icontract.h b/cadxcore/api/icontract.h
new file mode 100644
index 0000000..911545a
--- /dev/null
+++ b/cadxcore/api/icontract.h
@@ -0,0 +1,89 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ICONTRACT_H
+#define ICONTRACT_H
+
+#include <map>
+#include <api/api.h>
+#include <api/iexception.h>
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI ContractException : public GNC::GCS::IException
+{
+public:
+
+        ContractException(const std::string& msg) throw();
+};
+
+//------------------------------------------------------------------------
+/* Contract generic interface.
+ */
+class EXTAPI IContract
+{
+public:
+
+        typedef enum {
+                TC_Mandatory,
+                TC_Optional
+        } ContractType;
+
+        IContract(ContractType type = TC_Mandatory, int prio = 0);
+
+        virtual ~IContract();
+
+        void Ping();
+
+        bool operator<(const IContract& other) const;
+
+        bool operator<(const IContract* other) const;
+
+public:
+        ContractType m_Type;
+        int          m_Priority;
+};
+
+//------------------------------------------------------------------------
+/* Contract management class */
+class EXTAPI IContractable
+{
+
+        //region "Public interface for contract management"
+
+protected:
+        GNC::GCS::IContract* m_pContract;
+
+public:
+
+        IContractable();
+
+        virtual ~IContractable();
+
+        virtual bool IsValidContract(IContract* contract) = 0;
+        virtual void Register(IContract* contract);
+};
+}
+}
+#endif
diff --git a/cadxcore/api/ientorno.cpp b/cadxcore/api/ientorno.cpp
new file mode 100644
index 0000000..83d8f79
--- /dev/null
+++ b/cadxcore/api/ientorno.cpp
@@ -0,0 +1,40 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/ientorno.h>
+#include <main/entorno.h>
+
+GNC::GCS::IEntorno::IEntorno()
+{
+}
+
+GNC::GCS::IEntorno::~IEntorno()
+{
+}
+
+GNC::GCS::IEntorno* GNC::GCS::IEntorno::Instance()
+{
+        return GNC::Entorno::Instance();
+}
+
+void GNC::GCS::IEntorno::FreeInstance()
+{
+        return GNC::Entorno::FreeInstance();
+}
diff --git a/cadxcore/api/ientorno.h b/cadxcore/api/ientorno.h
new file mode 100644
index 0000000..f23cea3
--- /dev/null
+++ b/cadxcore/api/ientorno.h
@@ -0,0 +1,180 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IENVIRONMENT_H
+#define IENVIRONMENT_H
+
+#include <string>
+#include <map>
+
+#include <api/api.h>
+#include <api/autoptr.h>
+
+// Forward Declarations
+class wxPanel;
+class wxWindow;
+class wxPropertyGrid;
+class wxApp;
+class VentanaPrincipal;
+
+// Forward Declarations
+namespace GNC
+{
+namespace GCS
+{
+class IControladorVistas;
+class ICommandController;
+class IEventsController;
+class IControladorCarga;
+class IConfigurationController;
+class IControladorPermisos;
+class IControladorLog;
+class IControladorExtensiones;
+class IControladorAcciones;
+class IControladorInternacionalizacion;
+class IWidgetsManager;
+class IVista;
+
+class IExtensionsObserver;
+class IObservadorVistas;
+}
+
+}
+namespace GIL
+{
+namespace DICOM
+{
+class IPACSController;
+}
+class Ubicacion;
+}
+
+namespace GNC
+{
+
+namespace GCS
+{
+
+class EXTAPI IEntorno
+{
+
+public:
+        typedef std::map< std::string, GIL::Ubicacion* > MapaUbicaciones;
+        static IEntorno* m_pInstance;
+
+protected:
+        IEntorno();
+        virtual ~IEntorno();
+
+        MapaUbicaciones         m_Ubicaciones;
+
+public:
+
+        static IEntorno* Instance();
+        static void FreeInstance();
+
+        //region version
+
+        /** Gets the GinkgoCADx version full string **/
+        virtual const std::string& GetGinkgoVersionString() = 0;
+
+        /** Gets the GinkgoCADx version string **/
+        virtual std::string GetGinkgoVersion() = 0;
+
+        /** Gets the mayor version number **/
+        virtual int GetGinkgoMayorVersionNumber() = 0;
+
+        /** Gets the mayor version minor **/
+        virtual int GetGinkgoMinorVersionNumber() = 0;
+
+        /** Gets the application name */
+        virtual std::string GetApplicationName() = 0;
+
+        /** Gets the application subtitle */
+        virtual std::string GetApplicationSubTitle() = 0;
+
+        /** Gets the application credits */
+        virtual std::string GetApplicationCredits() = 0;
+
+        /** Gets the application eula */
+        virtual std::string GetApplicationEula() = 0;
+
+        //endregion
+
+        //region license
+        virtual const std::string& GetLicenseMessage() = 0;
+        //enregion
+
+        virtual const std::string& GetGinkgoCopyRight() = 0;
+        virtual int ParseSVNBuild(const char* str) = 0;
+        virtual const std::string& GetPluginsPath() = 0;
+        virtual const std::string& GetGinkgoUserDir() = 0;
+        virtual const std::string& GetGinkgoTempDir() = 0;
+        virtual std::string CreateGinkgoTempDir() = 0;
+        virtual const std::string& GetGinkgoResourcesDir() = 0;
+        virtual std::string CrearDirectorioTemporal() = 0;
+        virtual std::string GetDicomLocalAET() = 0;
+        virtual std::string ParseAET(const std::string& aet) = 0;
+        virtual void SetLicenseMessage(const std::string& desc) = 0;
+
+        virtual void YieldApp() = 0;
+        virtual wxApp* GetApp() = 0;
+        virtual VentanaPrincipal* GetVentanaPrincipal() = 0;
+        virtual wxWindow* GetVentanaRaiz() = 0;
+
+        virtual GNC::GCS::IControladorVistas* GetControladorVistas() = 0;
+        virtual GNC::GCS::ICommandController* GetCommandController() = 0;
+
+        virtual GNC::GCS::IEventsController* GetControladorEventos() = 0;
+        virtual GNC::GCS::IControladorCarga* GetControladorCarga() = 0;
+        virtual GNC::GCS::IControladorPermisos* GetControladorPermisos() = 0;
+        virtual GNC::GCS::IControladorExtensiones* GetControladorExtensiones() = 0;
+        virtual GNC::GCS::IControladorAcciones*  GetControladorAcciones() = 0;
+        virtual GNC::GCS::IControladorInternacionalizacion*  GetControladorInternacionalizacion() = 0;
+        virtual GNC::GCS::IConfigurationController* GetConfigurationController() = 0;
+        virtual GNC::GCS::IWidgetsManager* NewWidgetsManager(GNC::GCS::IVista* pVista) = 0;
+
+        virtual GIL::DICOM::IPACSController* GetPACSController() = 0;
+
+        virtual void FreeWidgetsManager(GNC::GCS::IWidgetsManager* pManager) = 0;
+
+        virtual MapaUbicaciones& GetUbicaciones() = 0;
+        virtual void RemoveDirRecursive(const std::string& path) = 0;
+        virtual std::string CreateGinkgoTempFile() = 0;
+
+//------------------------------------------------------------------------------
+//region "Extensions observers registry interface"
+
+        virtual void RegisterExtensionsObserver(GNC::GCS::IExtensionsObserver* observer) = 0;
+        virtual void UnRegisterExtensionsObserver(GNC::GCS::IExtensionsObserver* observer) = 0;
+//endregion
+
+//------------------------------------------------------------------------------
+//region "Views observers registry interface"
+
+        virtual void RegisterViewsObserver(GNC::GCS::IObservadorVistas* observer) = 0;
+        virtual void UnRegisterViewsObserver(GNC::GCS::IObservadorVistas* observer) = 0;
+//endregion
+
+};
+}
+}
+#endif
diff --git a/cadxcore/api/ievento.cpp b/cadxcore/api/ievento.cpp
new file mode 100644
index 0000000..ea6144f
--- /dev/null
+++ b/cadxcore/api/ievento.cpp
@@ -0,0 +1,636 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ievento.h"
+#include <wx/event.h>
+
+GNC::GCS::Events::IEvent::IEvent(long codigoEvento, long codigoAmbito, long prioridad, GNC::GCS::IVista* pVista)
+{
+        m_codigoEvento = codigoEvento;
+        m_codigoAmbito = codigoAmbito;
+        m_pVista = pVista;
+        m_skip = true;
+        m_prioridad=prioridad;
+}
+
+GNC::GCS::Events::IEvent::~IEvent()
+{
+}
+
+bool GNC::GCS::Events::IEvent::IsEqual(const IEvent& evt) const
+{
+        if(evt.GetCodigoEvento() == m_codigoEvento && evt.GetCodigoAmbito() == m_codigoAmbito && evt.GetVista() == m_pVista) {
+                return true;
+        } else {
+                return false;
+        }
+}
+
+bool GNC::GCS::Events::IEvent::IsSkipped() const
+{
+        return m_skip;
+}
+
+void GNC::GCS::Events::IEvent::Skip(bool skip)
+{
+        m_skip=skip;
+}
+
+long GNC::GCS::Events::IEvent::GetCodigoEvento() const
+{
+        return m_codigoEvento;
+}
+
+long GNC::GCS::Events::IEvent::GetCodigoAmbito() const
+{
+        return m_codigoAmbito;
+}
+
+void GNC::GCS::Events::IEvent::SetAmbito(long codigoAmbito)
+{
+        m_codigoAmbito = codigoAmbito;
+}
+
+GNC::GCS::IVista* GNC::GCS::Events::IEvent::GetVista() const
+{
+        return m_pVista;
+}
+
+void GNC::GCS::Events::IEvent::SetVista(GNC::GCS::IVista* pVista)
+{
+        m_pVista = pVista;
+}
+
+long GNC::GCS::Events::IEvent::GetPrioridad() const
+{
+        return m_prioridad;
+}
+
+void GNC::GCS::Events::IEvent::SetPrioridad(long prioridad)
+{
+        m_prioridad = prioridad;
+}
+
+void GNC::GCS::Events::IEvent::SetNombre(const char* nombre)
+{
+        m_Nombre = nombre;
+}
+
+void GNC::GCS::Events::IEvent::SetNombre(std::string& nombre)
+{
+        m_Nombre = nombre;
+}
+
+const std::string& GNC::GCS::Events::IEvent::GetNombre() const
+{
+        return m_Nombre;
+}
+
+
+void GNC::GCS::Events::IEvent::pushInfo(std::ostream& ) const
+{
+}
+
+//====================================================================================================
+//= Interfaz de evento de raton
+//====================================================================================================
+
+
+GNC::GCS::Events::EventoRaton::EventoRaton(wxMouseEvent* evt, Contexto3D* pContexto)
+{
+        c = pContexto;
+        m_left = m_middle = m_right = m_any = false;
+        m_leftDown = m_middleDown = m_rightDown = m_anyDown = false;
+        m_tipo = ET_UNKNOWN;
+        m_controlDown = m_shiftDown = m_altDown = m_metaDown = false;
+        m_wheelRotation = m_wheelDelta = m_linesPerAction = 0;
+        m_skip = true;
+        sX = sY = 0;
+        ParseWXEvent(evt);
+}
+
+GNC::GCS::Events::EventoRaton::~EventoRaton()
+{
+
+}
+
+bool GNC::GCS::Events::EventoRaton::ButtonDown(Boton but) const
+{
+        if (m_tipo == ET_DOWN) {
+                switch (but) {
+                case EB_CUALQUIERA:
+                        return m_any;
+                case EB_IZQUIERDO:
+                        return m_left;
+                case EB_DERECHO:
+                        return m_right;
+                case EB_CENTRAL:
+                        return m_middle;
+                default:
+                        return false;
+                }
+        } else {
+                return false;
+        }
+}
+
+bool GNC::GCS::Events::EventoRaton::ButtonDown(const GNC::GCS::TriggerButton& button) const
+{
+        if (m_tipo == ET_DOWN) {
+                return (m_left && button.IsLeftEnabled()) || (m_right && button.IsRightEnabled()) || (m_middle && button.IsMiddleEnabled());
+        } else {
+                return false;
+        }
+}
+
+bool GNC::GCS::Events::EventoRaton::ButtonDClick(Boton but) const
+{
+        if (m_tipo == ET_DCLICK) {
+                switch (but) {
+                case EB_CUALQUIERA:
+                        return m_any;
+                case EB_IZQUIERDO:
+                        return m_left;
+                case EB_DERECHO:
+                        return m_right;
+                case EB_CENTRAL:
+                        return m_middle;
+                default:
+                        return false;
+                }
+        } else {
+                return false;
+        }
+}
+
+bool GNC::GCS::Events::EventoRaton::ButtonDClick(const GNC::GCS::TriggerButton& button) const
+{
+        if (m_tipo == ET_DCLICK) {
+                return (m_left && button.IsLeftEnabled()) || (m_right && button.IsRightEnabled()) || (m_middle && button.IsMiddleEnabled());
+        } else {
+                return false;
+        }
+}
+
+bool GNC::GCS::Events::EventoRaton::ButtonUp(Boton but) const
+{
+        if (m_tipo == ET_UP) {
+                switch (but) {
+                case EB_CUALQUIERA:
+                        return m_any;
+                case EB_IZQUIERDO:
+                        return m_left;
+                case EB_DERECHO:
+                        return m_right;
+                case EB_CENTRAL:
+                        return m_middle;
+                default:
+                        return false;
+                }
+        } else {
+                return false;
+        }
+}
+
+bool GNC::GCS::Events::EventoRaton::ButtonUp(const GNC::GCS::TriggerButton& button) const
+{
+        if (m_tipo == ET_UP) {
+                return (m_left && button.IsLeftEnabled()) || (m_right && button.IsRightEnabled()) || (m_middle && button.IsMiddleEnabled());
+        } else {
+                return false;
+        }
+}
+
+bool GNC::GCS::Events::EventoRaton::Button(Boton but) const
+{
+        switch (but) {
+        case EB_CUALQUIERA:
+                return m_any;
+        case EB_IZQUIERDO:
+                return m_left;
+        case EB_DERECHO:
+                return m_right;
+        case EB_CENTRAL:
+                return m_middle;
+        default:
+                return false;
+        }
+}
+
+bool GNC::GCS::Events::EventoRaton::Button(const GNC::GCS::TriggerButton& button) const
+{
+        return  (m_left && button.IsLeftEnabled()) || (m_right && button.IsRightEnabled()) || (m_middle && button.IsMiddleEnabled());
+}
+
+bool GNC::GCS::Events::EventoRaton::ButtonIsDown(Boton but) const
+{
+        if (m_anyDown) {
+                switch (but) {
+                case EB_CUALQUIERA:
+                        return m_any;
+                case EB_IZQUIERDO:
+                        return m_left;
+                case EB_DERECHO:
+                        return m_right;
+                case EB_CENTRAL:
+                        return m_middle;
+                default:
+                        return false;
+                }
+        } else {
+                return false;
+        }
+}
+
+bool GNC::GCS::Events::EventoRaton::ButtonIsDown(const GNC::GCS::TriggerButton& button) const
+{
+        return m_anyDown && ( (m_left && button.IsLeftEnabled()) || (m_right && button.IsRightEnabled()) || (m_middle && button.IsMiddleEnabled()) );
+}
+
+bool GNC::GCS::Events::EventoRaton::ControlDown() const
+{
+        return m_controlDown;
+}
+
+bool GNC::GCS::Events::EventoRaton::MetaDown() const
+{
+        return m_metaDown;
+}
+
+bool GNC::GCS::Events::EventoRaton::AltDown() const
+{
+        return m_altDown;
+}
+
+bool GNC::GCS::Events::EventoRaton::ShiftDown() const
+{
+        return m_shiftDown;
+}
+
+bool GNC::GCS::Events::EventoRaton::LeftDown() const
+{
+        return (m_tipo == ET_DOWN && m_left);
+}
+
+bool GNC::GCS::Events::EventoRaton::MiddleDown() const
+{
+        return (m_tipo == ET_DOWN && m_middle);
+}
+
+bool GNC::GCS::Events::EventoRaton::RightDown() const
+{
+        return (m_tipo == ET_DOWN && m_right);
+}
+
+bool GNC::GCS::Events::EventoRaton::LeftUp() const
+{
+        return (m_tipo == ET_UP && m_left);
+}
+
+bool GNC::GCS::Events::EventoRaton::MiddleUp() const
+{
+        return (m_tipo == ET_UP && m_middle);
+}
+
+bool GNC::GCS::Events::EventoRaton::RightUp() const
+{
+        return (m_tipo == ET_UP && m_right);
+}
+
+bool GNC::GCS::Events::EventoRaton::LeftDClick() const
+{
+        return (m_tipo == ET_DCLICK && m_left);
+}
+
+bool GNC::GCS::Events::EventoRaton::MiddleDClick() const
+{
+        return (m_tipo == ET_DCLICK && m_middle);
+}
+
+bool GNC::GCS::Events::EventoRaton::RightDClick() const
+{
+        return (m_tipo == ET_DCLICK && m_right);
+}
+
+bool GNC::GCS::Events::EventoRaton::LeftIsDown() const
+{
+        return m_leftDown;
+}
+
+bool GNC::GCS::Events::EventoRaton::MiddleIsDown() const
+{
+        return m_middleDown;
+}
+
+bool GNC::GCS::Events::EventoRaton::RightIsDown() const
+{
+        return m_rightDown;
+}
+
+bool GNC::GCS::Events::EventoRaton::AnyIsDown() const
+{
+        return m_anyDown;
+}
+
+bool GNC::GCS::Events::EventoRaton::Dragging() const
+{
+        return (m_tipo == ET_MOTION) && ButtonIsDown(EB_CUALQUIERA);
+}
+
+bool GNC::GCS::Events::EventoRaton::Moving() const
+{
+        return (m_tipo == ET_MOTION) && !ButtonIsDown(EB_CUALQUIERA);
+}
+
+bool GNC::GCS::Events::EventoRaton::Entering() const
+{
+        return (m_tipo == ET_ENTER);
+}
+
+bool GNC::GCS::Events::EventoRaton::Leaving() const
+{
+        return (m_tipo == ET_LEAVE);
+}
+
+int GNC::GCS::Events::EventoRaton::GetWheelRotation() const
+{
+        return m_wheelRotation;
+}
+
+int GNC::GCS::Events::EventoRaton::GetWheelDelta() const
+{
+        return m_wheelDelta;
+}
+
+int GNC::GCS::Events::EventoRaton::GetLinesPerAction() const
+{
+        return m_linesPerAction;
+}
+
+#ifdef _WINDOWS
+bool GNC::GCS::Events::EventoRaton::IsPageScroll() const
+{
+        return ((unsigned int)m_linesPerAction == UINT_MAX);
+}
+#else
+bool GNC::GCS::Events::EventoRaton::IsPageScroll() const
+{
+        return ((unsigned int)m_linesPerAction == std::numeric_limits<unsigned int>::max());
+}
+#endif
+
+void GNC::GCS::Events::EventoRaton::Skip(bool skip)
+{
+        m_skip = skip;
+}
+
+bool GNC::GCS::Events::EventoRaton::GetSkipped() const
+{
+        return m_skip;
+}
+
+void GNC::GCS::Events::EventoRaton::ParseWXEvent(wxMouseEvent* evt)
+{
+        wP.x = (double) evt->m_x;
+        wP.y = (double) evt->m_y;
+        wP.z = 0.0f;
+
+        m_leftDown   = evt->m_leftDown;
+        m_middleDown = evt->m_middleDown;
+        m_rightDown  = evt->m_rightDown;
+        m_anyDown    = m_leftDown || m_middleDown || m_rightDown;
+        int etype = evt->GetEventType();
+
+        if (etype == wxEVT_MOTION) {
+                m_tipo = ET_MOTION;
+        } else if (etype == wxEVT_LEFT_DOWN) {
+                m_tipo = ET_DOWN;
+                m_left = true;
+        } else if (etype == wxEVT_LEFT_UP) {
+                m_tipo = ET_UP;
+                m_left = true;
+        } else if (etype == wxEVT_LEFT_DCLICK) {
+                m_tipo = ET_DCLICK;
+                m_left = true;
+        } else if (etype == wxEVT_MIDDLE_DOWN) {
+                m_tipo = ET_DOWN;
+                m_middle = true;
+        } else if (etype == wxEVT_MIDDLE_UP) {
+                m_tipo = ET_UP;
+                m_middle = true;
+        } else if (etype == wxEVT_MIDDLE_DCLICK) {
+                m_tipo = ET_DCLICK;
+                m_middle = true;
+        } else if (etype == wxEVT_RIGHT_DOWN) {
+                m_tipo = ET_DOWN;
+                m_right = true;
+        } else if (etype == wxEVT_RIGHT_UP) {
+                m_tipo = ET_UP;
+                m_right = true;
+        } else if (etype == wxEVT_RIGHT_DCLICK) {
+                m_tipo = ET_DCLICK;
+                m_right = true;
+        } else if (etype == wxEVT_ENTER_WINDOW) {
+                m_tipo = ET_ENTER;
+        } else if (etype == wxEVT_LEAVE_WINDOW) {
+                m_tipo = ET_LEAVE;
+        } else {
+                m_tipo = ET_UNKNOWN;
+        }
+
+        m_any = m_anyDown || m_left || m_right || m_middle;
+
+        m_controlDown    = evt->m_controlDown;
+        m_shiftDown      = evt->m_shiftDown;
+        m_altDown        = evt->m_altDown;
+        m_metaDown       = evt->m_metaDown;
+
+        m_wheelRotation  = evt->m_wheelRotation;
+        m_wheelDelta     = evt->m_wheelDelta;
+        m_linesPerAction = evt->m_linesPerAction;
+        sX               = evt->m_x;
+        sY               = evt->m_y;
+
+}
+
+//====================================================================================================
+//= Interfaz de evento de teclado
+//====================================================================================================
+
+GNC::GCS::Events::EventoTeclado::EventoTeclado(wxKeyEvent* evt, Contexto3D* pContexto)
+{
+        c = pContexto;
+        m_keyCode = 0;
+
+        m_controlDown = false;
+        m_shiftDown = false;
+        m_altDown = false;
+        m_metaDown = false;
+
+        m_uniChar = L'\0';
+
+        m_rawCode = 0;
+        m_rawFlags = 0;
+
+        m_skip = true;
+
+        ParseWXEvent(evt);
+}
+
+GNC::GCS::Events::EventoTeclado::~EventoTeclado()
+{
+
+}
+
+bool GNC::GCS::Events::EventoTeclado::ControlDown() const
+{
+        return m_controlDown;
+}
+
+bool GNC::GCS::Events::EventoTeclado::ShiftDown() const
+{
+        return m_shiftDown;
+}
+
+bool GNC::GCS::Events::EventoTeclado::MetaDown() const
+{
+        return m_metaDown;
+}
+
+bool GNC::GCS::Events::EventoTeclado::AltDown() const
+{
+        return m_altDown;
+}
+
+bool GNC::GCS::Events::EventoTeclado::HasModifiers() const
+{
+        return ControlDown() || AltDown();
+}
+
+int GNC::GCS::Events::EventoTeclado::GetKeyCode() const
+{
+        return (int)m_keyCode;
+}
+
+wchar_t GNC::GCS::Events::EventoTeclado::GetUnicodeKey() const
+{
+        return m_uniChar;
+}
+
+unsigned int GNC::GCS::Events::EventoTeclado::GetRawKeyCode() const
+{
+        return m_rawCode;
+}
+
+unsigned int GNC::GCS::Events::EventoTeclado::GetRawKeyFlags() const
+{
+        return m_rawFlags;
+}
+
+void GNC::GCS::Events::EventoTeclado::Skip(bool skip)
+{
+        m_skip = skip;
+}
+
+bool GNC::GCS::Events::EventoTeclado::GetSkipped() const
+{
+        return m_skip;
+}
+
+void GNC::GCS::Events::EventoTeclado::ParseWXEvent(wxKeyEvent* evt)
+{
+        m_isKeyDown = evt->GetEventType() == wxEVT_KEY_DOWN;
+        m_keyCode     = evt->m_keyCode;
+        m_controlDown = evt->m_controlDown;
+        m_shiftDown   = evt->m_shiftDown;
+        m_altDown     = evt->m_altDown;
+        m_metaDown    = evt->m_metaDown;
+
+        m_rawCode     = evt->m_rawCode;
+        m_rawFlags    = evt->m_rawFlags;
+        m_uniChar     = evt->m_uniChar;
+}
+
+
+//====================================================================================================
+//= Interfaz de subscriptor de ventos
+//====================================================================================================
+
+GNC::GCS::Events::ISubscriptorEventos::ISubscriptorEventos()
+{
+}
+
+GNC::GCS::Events::ISubscriptorEventos::~ISubscriptorEventos()
+{
+}
+
+// Propagacion de eventos de raton
+void GNC::GCS::Events::ISubscriptorEventos::OnMouseEvents(GNC::GCS::Events::EventoRaton&)
+{
+}
+
+// Propagacion de eventos de teclado
+void GNC::GCS::Events::ISubscriptorEventos::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+}
+
+//====================================================================================================
+//= Interfaz de publicacion de eventos
+//====================================================================================================
+
+GNC::GCS::Events::IPublicadorEventos::IPublicadorEventos()
+{
+}
+
+GNC::GCS::Events::IPublicadorEventos::~IPublicadorEventos()
+{
+}
+
+void GNC::GCS::Events::IPublicadorEventos::InsertarListener(GNC::GCS::Events::ISubscriptorEventos* pListener)
+{
+        IteradorListaListeners it;
+        for (it = m_Listeners.begin(); it != m_Listeners.end() && (*it) != pListener; ++it);
+        if (it == m_Listeners.end()) {
+                m_Listeners.push_back(pListener);
+        }
+}
+
+void GNC::GCS::Events::IPublicadorEventos::EliminarListener(GNC::GCS::Events::ISubscriptorEventos* pListener)
+{
+        IteradorListaListeners it;
+        for (it = m_Listeners.begin(); it != m_Listeners.end() && (*it) != pListener; ++it);
+        if (it != m_Listeners.end()) {
+                m_Listeners.erase(it);
+        }
+}
+
+void GNC::GCS::Events::IPublicadorEventos::PropagarEvento(GNC::GCS::Events::EventoRaton& evt)
+{
+        for (IteradorListaListeners it = m_Listeners.begin(); it != m_Listeners.end(); ++it) {
+                (*it)->OnMouseEvents(evt);
+        }
+}
+
+void GNC::GCS::Events::IPublicadorEventos::PropagarEvento(GNC::GCS::Events::EventoTeclado& evt)
+{
+        for (IteradorListaListeners it = m_Listeners.begin(); it != m_Listeners.end(); ++it) {
+                (*it)->OnKeyEvents(evt);
+        }
+}
diff --git a/cadxcore/api/ievento.h b/cadxcore/api/ievento.h
new file mode 100644
index 0000000..a2af54a
--- /dev/null
+++ b/cadxcore/api/ievento.h
@@ -0,0 +1,364 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IEVENT_H
+#define IEVENT_H
+
+#include <ostream>
+#include <string>
+#include <list>
+#include <limits>
+#include <api/api.h>
+#include <api/ibutton.h>
+#include <api/math/geometry.h>
+#include <api/math/geometry3d.h>
+
+#define ginkgoAmbitoGeneral  0
+
+//----------------------------------------------------------------------------------------------------
+//region "Forward Declarations"
+class wxMouseEvent;
+class wxKeyEvent;
+
+namespace GNC
+{
+namespace GCS
+{
+class Contexto3D;
+class IVista;
+}
+}
+//endregion
+
+namespace GNC
+{
+namespace GCS
+{
+
+namespace Events
+{
+
+//====================================================================================================
+//= Interfaz de evento
+//====================================================================================================
+class EXTAPI IEvent
+{
+public:
+        //codigo de evento es obligatorio y unico para cada evento
+        //el codigo ambito sirve para jerarquizar los eventos entre eventos de guardado, de widgets...
+        //prioridad: 0 es la maxima prioridad, se procesaran antes los eventos cuya prioridad sea menor
+        //sincronoInterfaz: el procesamiento del evento ha de ser sincrono con la interfaz?
+        //vista: vista a la que esta asociado, NULL es la vista general
+        IEvent(long codigoEvento, long codigoAmbito = ginkgoAmbitoGeneral, long prioridad = 100, GNC::GCS::IVista* pVista = NULL);
+
+        virtual ~IEvent();
+
+        virtual bool IsEqual(const IEvent& evt) const;
+
+        virtual void pushInfo(std::ostream& ) const;
+
+        bool IsSkipped() const;
+
+        void Skip(bool skip = true);
+
+        long GetCodigoEvento() const;
+
+        long GetCodigoAmbito() const;
+
+        void SetAmbito(long codigoAmbito);
+
+        GNC::GCS::IVista* GetVista() const;
+
+        void SetVista(GNC::GCS::IVista* pVista);
+
+        long GetPrioridad() const;
+
+        void SetPrioridad(long prioridad);
+
+        void SetNombre(const char* nombre);
+
+        void SetNombre(std::string& nombre);
+
+        const std::string& GetNombre() const;
+
+        inline friend std::ostream& operator<<(std::ostream& out, const IEvent& e)
+        {
+                out <<
+                    "[ nombre = " << e.m_Nombre.c_str() <<
+                    ", codigo = " << e.m_codigoEvento <<
+                    ", ambito = " << e.m_codigoAmbito <<
+                    ", prio = "   << e.m_prioridad <<
+                    ", vista =  " << e.m_pVista <<
+                    ", [ ";
+                e.pushInfo(out);
+                out << " ] ]";
+                return out;
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const IEvent* e)
+        {
+                if (e == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *e;
+                }
+                return out;
+        }
+
+protected:
+        long              m_codigoEvento;
+        long              m_codigoAmbito;
+        long              m_prioridad;
+        bool              m_skip;
+        GNC::GCS::IVista* m_pVista;
+        std::string       m_Nombre;
+};
+
+//====================================================================================================
+//= Interfaz de evento de raton
+//====================================================================================================
+class EXTAPI EventoRaton
+{
+
+public:
+
+        typedef enum Boton {
+                EB_CUALQUIERA,
+                EB_IZQUIERDO,
+                EB_DERECHO,
+                EB_CENTRAL
+        } Boton;
+
+        typedef enum Tipo {
+                ET_UNKNOWN,
+                ET_ENTER,
+                ET_LEAVE,
+                ET_MOTION,
+                ET_DOWN,
+                ET_UP,
+                ET_DCLICK
+        } Tipo;
+
+public:
+
+        EventoRaton(wxMouseEvent* evt, Contexto3D* pContexto);
+
+        ~EventoRaton();
+
+        bool ButtonDown(Boton but = EB_CUALQUIERA) const;
+
+        bool ButtonDown(const GNC::GCS::TriggerButton& button) const;
+
+        bool ButtonDClick(Boton but = EB_CUALQUIERA) const;
+
+        bool ButtonDClick(const GNC::GCS::TriggerButton& button) const;
+
+        bool ButtonUp(Boton but = EB_CUALQUIERA) const;
+
+        bool ButtonUp(const GNC::GCS::TriggerButton& button) const;
+
+        bool Button(Boton but) const;
+
+        bool Button(const GNC::GCS::TriggerButton& button) const;
+
+        bool ButtonIsDown(Boton but) const;
+
+        bool ButtonIsDown(const GNC::GCS::TriggerButton& button) const;
+
+        bool ControlDown() const;
+        bool MetaDown() const;
+        bool AltDown() const;
+        bool ShiftDown() const;
+
+        bool LeftDown() const;
+        bool MiddleDown() const;
+        bool RightDown() const;
+
+        bool LeftUp() const;
+        bool MiddleUp() const;
+        bool RightUp() const;
+
+        bool LeftDClick() const;
+        bool MiddleDClick() const;
+        bool RightDClick() const;
+
+        bool LeftIsDown() const;
+        bool MiddleIsDown() const;
+        bool RightIsDown() const;
+        bool AnyIsDown() const;
+
+
+        bool Dragging() const;
+
+        bool Moving() const;
+
+        bool Entering() const;
+        bool Leaving() const;
+        int GetWheelRotation() const;
+
+        int GetWheelDelta() const;
+
+        int GetLinesPerAction() const;
+
+        bool IsPageScroll() const;
+
+        void Skip(bool skip = true);
+
+        bool GetSkipped() const;
+
+        void ParseWXEvent(wxMouseEvent* evt);
+
+public:
+
+        GNC::GCS::Vector3D wP;
+        GNC::GCS::Vector iP;
+
+        int sX;
+        int sY;
+
+        Contexto3D* c;
+
+
+        bool   m_left;
+        bool   m_middle;
+        bool   m_right;
+        bool   m_any;
+
+        bool   m_leftDown;
+        bool   m_middleDown;
+        bool   m_rightDown;
+        bool   m_anyDown;
+
+        Tipo   m_tipo;
+
+        bool   m_controlDown;
+        bool   m_shiftDown;
+        bool   m_altDown;
+        bool   m_metaDown;
+
+        int    m_wheelRotation;
+        int    m_wheelDelta;
+        int    m_linesPerAction;
+        bool   m_skip;
+};
+
+//====================================================================================================
+//= Interfaz de evento de teclado
+//====================================================================================================
+class EXTAPI EventoTeclado
+{
+
+public:
+        Contexto3D* c;
+
+public:
+
+        EventoTeclado(wxKeyEvent* evt, Contexto3D* pContexto);
+
+        ~EventoTeclado();
+
+        bool ControlDown() const;
+        bool ShiftDown() const;
+        bool MetaDown() const;
+        bool AltDown() const;
+
+        bool HasModifiers() const;
+
+        int GetKeyCode() const;
+
+        wchar_t GetUnicodeKey() const;
+
+        unsigned int GetRawKeyCode() const;
+
+        unsigned int GetRawKeyFlags() const;
+
+        void Skip(bool skip = true);
+
+        bool GetSkipped() const;
+
+        void ParseWXEvent(wxKeyEvent* evt);
+
+public:
+        bool			  m_isKeyDown;
+
+        long          m_keyCode;
+
+        bool          m_controlDown;
+        bool          m_shiftDown;
+        bool          m_altDown;
+        bool          m_metaDown;
+
+        wchar_t       m_uniChar;
+
+        unsigned int  m_rawCode;
+        unsigned int  m_rawFlags;
+
+        bool          m_skip;
+
+};
+
+//====================================================================================================
+//= Interfaz de subscriptor de ventos
+//====================================================================================================
+class EXTAPI ISubscriptorEventos
+{
+public:
+        ISubscriptorEventos();
+        virtual ~ISubscriptorEventos();
+
+        // Propagacion de eventos de raton
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        // Propagacion de eventos de teclado
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+};
+
+//====================================================================================================
+//= Interfaz de publicacion de eventos
+//====================================================================================================
+class EXTAPI IPublicadorEventos
+{
+public:
+        typedef std::list<GNC::GCS::Events::ISubscriptorEventos*> ListaListeners;
+        typedef ListaListeners::iterator IteradorListaListeners;
+
+        IPublicadorEventos();
+
+        ~IPublicadorEventos();
+
+        void InsertarListener(GNC::GCS::Events::ISubscriptorEventos* pListener);
+
+        void EliminarListener(GNC::GCS::Events::ISubscriptorEventos* pListener);
+
+protected:
+
+        void PropagarEvento(GNC::GCS::Events::EventoRaton& evt);
+
+        void PropagarEvento(GNC::GCS::Events::EventoTeclado& evt);
+
+protected:
+        ListaListeners m_Listeners;
+};
+
+}
+}
+}
+#endif
diff --git a/cadxcore/api/iexception.cpp b/cadxcore/api/iexception.cpp
new file mode 100644
index 0000000..8dd022d
--- /dev/null
+++ b/cadxcore/api/iexception.cpp
@@ -0,0 +1,76 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/iexception.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::IException::IException(const std::string& msg, const std::string& component, bool fatal) throw()
+{
+        this->cause = msg;
+        this->component = component;
+        this->fatal = fatal;
+}
+
+GNC::GCS::IException::~IException() throw()
+{
+}
+
+const std::string& GNC::GCS::IException::GetComponent() const
+{
+        return component;
+}
+
+const std::string& GNC::GCS::IException::GetCause() const
+{
+        return cause;
+}
+
+const char* GNC::GCS::IException::what() const throw()
+{
+        return cause.c_str();
+}
+
+std::string GNC::GCS::IException::GetFullCause() const
+{
+        return *this;
+}
+
+bool GNC::GCS::IException::IsFatal()  const
+{
+        return fatal;
+}
+
+GNC::GCS::IException::operator std::string() const
+{
+        return _Std("Exception in component") + std::string(" ") + GetComponent() + std::string(" :\n")  + GetCause();
+}
+
+//=========================
+
+GNC::GCS::IRequestingException::IRequestingException(const std::string& msg, const std::string& component, bool fatal) throw() : IException(msg, component, fatal)
+{
+
+}
+
+GNC::GCS::IRequestingException::~IRequestingException() throw()
+{
+
+}
diff --git a/cadxcore/api/iexception.h b/cadxcore/api/iexception.h
new file mode 100644
index 0000000..8558276
--- /dev/null
+++ b/cadxcore/api/iexception.h
@@ -0,0 +1,75 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IEXCEPTION_H
+#define IEXCEPTION_H
+
+#include <string>
+#include <exception>
+
+#include <api/api.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IException : public std::exception
+{
+public:
+        IException(const std::string& msg, const std::string& component="GNC", bool fatal = true) throw();
+
+        virtual ~IException() throw();
+
+        const std::string& GetComponent() const;
+
+        const std::string& GetCause() const;
+
+        virtual const char* what() const throw();
+
+        std::string GetFullCause() const;
+
+        bool IsFatal()  const;
+
+        operator std::string () const;
+
+        inline const std::string str() const
+        {
+                return (std::string) *this;
+        }
+
+protected:
+        std::string cause;
+        std::string component;
+        bool fatal;
+};
+
+class EXTAPI IRequestingException : public IException
+{
+public:
+        IRequestingException(const std::string& msg, const std::string& component="GNC", bool fatal = true) throw();
+        virtual ~IRequestingException() throw();
+
+        virtual bool shouldExit() = 0;
+};
+
+}
+}
+#endif
diff --git a/cadxcore/api/ihistorytool.cpp b/cadxcore/api/ihistorytool.cpp
new file mode 100644
index 0000000..5159e94
--- /dev/null
+++ b/cadxcore/api/ihistorytool.cpp
@@ -0,0 +1,137 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "ihistorytool.h"
+#include <api/controllers/ihistorycontroller.h>
+
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+
+#include <wx/dc.h>
+#include <wx/sizer.h>
+#include <wx/event.h>
+#include <wx/bitmap.h>
+#include <wx/menu.h>
+#include <wx/wxginkgotoolbar.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class EventHandlerHistoryTool: public wxEvtHandler
+{
+public:
+        EventHandlerHistoryTool(wxEvtHandler* pParent, GNC::GCS::IHistoryTool* pTool):wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pTool=pTool;
+                m_pParent->Connect(m_pTool->ID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerHistoryTool::OnClick),NULL,this);
+        }
+        ~EventHandlerHistoryTool()
+        {
+                m_pParent->Disconnect(m_pTool->ID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerHistoryTool::OnClick),NULL,this);
+                m_pParent = NULL;
+                m_pTool = NULL;
+        }
+
+        void OnClick( wxCommandEvent& event )
+        {
+                m_pTool->Execute();
+                event.Skip(false);
+        }
+
+        GNC::GCS::IHistoryTool* m_pTool;
+        wxEvtHandler* m_pParent;
+};
+
+class HistoryToolMenuItem : public wxMenuItem
+{
+public:
+        HistoryToolMenuItem(wxEvtHandler* pParent, const wxString& nombre, wxMenu* pMenuPadre, GNC::GCS::IHistoryTool* pTool):wxMenuItem(pMenuPadre,pTool->ID,nombre,nombre,wxITEM_NORMAL)
+        {
+                pEventHandler = new EventHandlerHistoryTool(pParent,pTool);
+#ifdef __WXMSW__
+                SetBitmaps(pTool->Icon);
+#else
+                SetBitmap(pTool->Icon);
+#endif
+        }
+
+        ~HistoryToolMenuItem()
+        {
+                if(pEventHandler != NULL) {
+                        delete pEventHandler;
+                        pEventHandler = NULL;
+                }
+        }
+
+        EventHandlerHistoryTool* pEventHandler;
+};
+
+}
+}
+
+
+GNC::GCS::IHistoryTool::IHistoryTool(UID id, TToolFamily family, const std::string& shortDescription, const std::string& description, const wxBitmap& icon, const wxBitmap& bigIcon) :
+        ID(id),
+        Family(family),
+        ShortDescription(shortDescription),
+        Description(description),
+        Icon(icon),
+        BigIcon(bigIcon),
+        EventHandler(NULL)
+{
+}
+
+GNC::GCS::IHistoryTool::~IHistoryTool()
+{
+}
+
+void GNC::GCS::IHistoryTool::AppendToolIn(wxGinkgoToolBar* pParent, bool big)
+{
+        if (big) {
+                if ( BigIcon.IsOk() ) {
+                        pParent->AddTool(this->ID, wxString::FromUTF8(ShortDescription.c_str()), BigIcon, wxString::FromUTF8(Description.c_str()));
+                }
+        } else {
+                pParent->AddTool(this->ID, wxString::FromUTF8(ShortDescription.c_str()), Icon, wxString::FromUTF8(Description.c_str()));
+        }
+}
+
+void GNC::GCS::IHistoryTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        pMenu->Append(new HistoryToolMenuItem(pParent,wxString::FromUTF8(Description.c_str()),pMenu,this));
+}
+
+bool GNC::GCS::IHistoryTool::AreSeriesFullyDownloaded(const std::list<long>& seriesPk)
+{
+        for (std::list<long>::const_iterator it = seriesPk.begin(); it != seriesPk.end(); ++it) {
+                if (GNC::GCS::IHistoryController::Instance()->GetSeriesModel((*it)).location == GNC::GCS::IHistoryController::TL_WadoLinked) {
+                        return false;
+                }
+        }
+        return true;
+}
+
+//ignore series by default...
+void GNC::GCS::IHistoryTool::Execute(const std::list<long>& /*seriesPk*/)
+{
+        Execute();
+}
diff --git a/cadxcore/api/ihistorytool.h b/cadxcore/api/ihistorytool.h
new file mode 100644
index 0000000..2dbc492
--- /dev/null
+++ b/cadxcore/api/ihistorytool.h
@@ -0,0 +1,84 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IHISTORYTOOL_H
+#define IHISTORYTOOL_H
+#include <string>
+#include <list>
+
+#include <api/api.h>
+#include <wx/bitmap.h>
+
+class wxWindow;
+class wxGinkgoToolBar;
+class wxEvtHandler;
+class wxMenu;
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EventHandlerHistoryTool;
+
+class EXTAPI IHistoryTool
+{
+public:
+        typedef unsigned int UID;
+        typedef enum {
+                TFamily_Open,
+                TFamily_Dicomize,
+                TFamily_Delete,
+                TFamily_ShowMetadata,
+                TFamily_Q_R,
+                TFamily_Anonymize,
+                TFamily_Export,
+                TFamily_Other,
+                TFamily_Send
+        } TToolFamily;
+
+        IHistoryTool(UID id, TToolFamily family, const std::string& shortDescription, const std::string& description, const wxBitmap& icon, const wxBitmap& bigIcon = wxBitmap());
+
+        virtual ~IHistoryTool();
+
+        virtual void AppendToolIn(wxGinkgoToolBar* pParent, bool big = false);
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual void Execute() = 0;
+        virtual void Execute(const std::list<long>& seriesPk);
+
+        virtual bool Enabled()
+        {
+                return true;
+        }
+        virtual bool AreSeriesFullyDownloaded(const std::list<long>& seriesPk);
+
+        UID ID;
+        TToolFamily Family;
+        std::string ShortDescription;
+        std::string Description;
+        wxBitmap Icon;
+        wxBitmap BigIcon;
+        EventHandlerHistoryTool* EventHandler;
+};
+}
+}
+#endif
diff --git a/cadxcore/api/ihl7parser.cpp b/cadxcore/api/ihl7parser.cpp
new file mode 100644
index 0000000..0895630
--- /dev/null
+++ b/cadxcore/api/ihl7parser.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ihl7parser.h"
+#include <wx/datetime.h>
+
+
+void GIL::Hl7Parser::Messages::MessageInterpreter::GenerateTimeStamp()
+{
+        std::string timeStamp(wxDateTime::Now().Format(wxT("%Y%m%d%H%M%S")).ToUTF8());
+
+        MSH.SetTimeStamp(timeStamp);
+}
diff --git a/cadxcore/api/ihl7parser.h b/cadxcore/api/ihl7parser.h
new file mode 100644
index 0000000..268b3d9
--- /dev/null
+++ b/cadxcore/api/ihl7parser.h
@@ -0,0 +1,1634 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include "imodelohl7.h"
+#include <ostream>
+#include <iomanip>
+#include <sstream>
+#include <ctime>
+
+namespace GIL
+{
+namespace Hl7Parser
+{
+
+namespace Segmentos
+{
+
+class MSH : public GIL::HL7::Segment
+{
+
+protected:
+
+public:
+
+        MSH(const std::string& messageType, const std::string& messageTriggerEvent, const std::string& messageHeader, const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : GIL::HL7::Segment("MSH",rs,fs,sfs)
+        {
+                GIL::HL7::Segment& msh = *this;
+
+                msh <<= GIL::HL7::Field(1, "MSH.1") << GIL::HL7::Component(1, "", m_FS);
+                msh <<= GIL::HL7::Field(2, "MSH.2") << GIL::HL7::Component(1, "", m_CS + "~\\&");
+
+                msh <<= GIL::HL7::Field(3, "MSH.3") << GIL::HL7::Component(1, "HD.1"); // Sending Application
+                msh <<= GIL::HL7::Field(4, "MSH.4") << GIL::HL7::Component(1, "HD.1"); // Sending Facility
+                msh <<= GIL::HL7::Field(5, "MSH.5") << GIL::HL7::Component(1, "HD.1"); // Receiving Application
+                msh <<= GIL::HL7::Field(6, "MSH.6") << GIL::HL7::Component(1, "HD.1"); // Receiving Facility
+
+                msh <<= GIL::HL7:: Field(7, "MSH.7") << GIL::HL7::Component(1, "TS.1"); // TimeStamp: YYYYMMDDhhmmss
+
+                msh <<= GIL::HL7::Field(9, "MSH.9") << GIL::HL7::Component(1, "MSG.1", messageType) << GIL::HL7::Component(2, "MSG.2", messageTriggerEvent) << GIL::HL7::Component(3, "MSG.3", messageHeader); // Message Type
+
+                msh <<= GIL::HL7::Field(10, "MSH.10") << GIL::HL7::Component(1, ""); // Message Control ID
+                msh <<= GIL::HL7::Field(11, "MSH.11") << GIL::HL7::Component(1, "PT.1", "P"); // Processing ID
+                msh <<= GIL::HL7::Field(12, "MSH.12") << GIL::HL7::Component(1, "VID.1", "2.5"); // Version ID
+                msh <<= GIL::HL7::Field(15, "MSH.15") << GIL::HL7::Component(1, "", "AL"); // Accept Acknowledgment type
+                msh <<= GIL::HL7::Field(16, "MSH.16") << GIL::HL7::Component(1, "", "NE"); // Application Acknowledgement type
+        }
+
+        MSH(const GIL::HL7::Segment& segment)
+        {
+                *this = segment;
+        }
+
+        MSH& operator=(const GIL::HL7::Segment& segment)
+        {
+                GIL::HL7::Segment& msh = *this;
+                msh = segment;
+                return *this;
+        }
+
+        void SetSendingApplication(const std::string& sendingApplication)
+        {
+                GIL::HL7::Segment& msh = *this;
+                msh[3][1] = sendingApplication;
+        }
+
+        const std::string& GetSendingApplication()
+        {
+                GIL::HL7::Segment& msh = *this;
+                return msh[3][1];
+        }
+
+        void SetSendingFacility(const std::string& sendingFacility)
+        {
+                GIL::HL7::Segment& msh = *this;
+                msh[4][1] = sendingFacility;
+        }
+
+        const std::string& GetSendingFacility()
+        {
+                GIL::HL7::Segment& msh = *this;
+                return msh[4][1];
+        }
+
+        void SetReceivingApplication(const std::string& receivingApplication)
+        {
+                GIL::HL7::Segment& msh = *this;
+                msh[5][1] = receivingApplication;
+        }
+
+        const std::string& GetReceivingApplication()
+        {
+                GIL::HL7::Segment& msh = *this;
+                return msh[5][1];
+        }
+
+        void SetReceivingFacility(const std::string& receivingFacility)
+        {
+                GIL::HL7::Segment& msh = *this;
+                msh[6][1] = receivingFacility;
+        }
+
+        const std::string& GetReceivingFacility()
+        {
+                GIL::HL7::Segment& msh = *this;
+                return msh[6][1];
+        }
+
+        void SetTimeStamp(const std::string& messageTimeStamp)
+        {
+                GIL::HL7::Segment& msh = *this;
+                msh[7][1] = messageTimeStamp;
+        }
+
+        const std::string& GetTimeStamp()
+        {
+                GIL::HL7::Segment& msh = *this;
+                return msh[7][1];
+        }
+
+        void SetMessageType(const std::string& messageType)
+        {
+                GIL::HL7::Segment& msh = *this;
+                msh[9][1] = messageType;
+        }
+
+        const std::string& GetMessageType()
+        {
+                GIL::HL7::Segment& msh = *this;
+                return msh[9][1];
+        }
+
+        void SetMessageTriggerEvent(const std::string& triggerEvent)
+        {
+                GIL::HL7::Segment& msh = *this;
+                msh[9][2] = triggerEvent;
+        }
+
+        const std::string& GetMessageTriggerEvent()
+        {
+                GIL::HL7::Segment& msh = *this;
+                return msh[9][2];
+        }
+
+        void SetMessageHeader(const std::string& messageHeader)
+        {
+                GIL::HL7::Segment& msh = *this;
+                msh[9][3] = messageHeader;
+        }
+
+        const std::string& GetMessageHeader()
+        {
+                GIL::HL7::Segment& msh = *this;
+                return msh[9][3];
+        }
+
+        void SetMessageControlId(const std::string& messageControlId)
+        {
+                GIL::HL7::Segment& msh = *this;
+                msh[10][1] = messageControlId;
+        }
+
+        const std::string& GetMessageControlId()
+        {
+                GIL::HL7::Segment& msh = *this;
+                return msh[10][1];
+        }
+};
+
+class MSA : public GIL::HL7::Segment
+{
+
+public:
+
+        typedef enum ACK_Code {
+                AC_Success,
+                AC_Error,
+                AC_Rejected,
+                AC_Unknown
+        } ACK_Code;
+
+        MSA(const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : GIL::HL7::Segment("MSA", rs, fs, sfs)
+        {
+                GIL::HL7::Segment& msa = *this;
+
+                msa <<= GIL::HL7::Field(1, "MSA.1") << GIL::HL7::Component(1, "");
+                msa <<= GIL::HL7::Field(2, "MSA.2") << GIL::HL7::Component(1, "");
+        }
+
+        MSA& operator=(const GIL::HL7::Segment& segment)
+        {
+                GIL::HL7::Segment& msa = *this;
+                msa = segment;
+                return *this;
+        }
+
+        void SetReferralMessageControlId(const std::string& refMsgControlId)
+        {
+                GIL::HL7::Segment& msa = *this;
+                msa[2][1] = refMsgControlId;
+        }
+
+        const std::string& GetReferralMessageControlId()
+        {
+                GIL::HL7::Segment& msa = *this;
+                return msa[2][1];
+        }
+
+        void SetAckCode(ACK_Code code)
+        {
+                GIL::HL7::Segment& msa = *this;
+                switch(code) {
+                case AC_Success:
+                        msa[1][1] = "CA";
+                        break;
+                case AC_Rejected:
+                        msa[1][1] = "CR";
+                        break;
+                case AC_Error:
+                case AC_Unknown:
+                default:
+                        msa[1][1] = "CE";
+                        break;
+                }
+
+        }
+
+        ACK_Code GetAckCode()
+        {
+                GIL::HL7::Segment& msa = *this;
+                if (msa[1][1] == "CA" || msa[1][1] == "AA") {
+                        return AC_Success;
+                } else if (msa[1][1] == "CR" || msa[1][1] == "AR") {
+                        return AC_Rejected;
+                } else if (msa[1][1] == "CE" || msa[1][1] == "AE") {
+                        return AC_Error;
+                } else {
+                        return AC_Unknown;
+                }
+        }
+
+        void SetAckCodeString(const std::string& ackCodeString)
+        {
+                GIL::HL7::Segment& msa = *this;
+                msa[1][1] = ackCodeString;
+        }
+
+        const std::string& GetAckCodeString()
+        {
+                GIL::HL7::Segment& msa = *this;
+                return msa[1][1];
+        }
+
+        bool IsSuccess()
+        {
+                return GetAckCode() == AC_Success;
+        }
+
+        bool IsRejected()
+        {
+                return GetAckCode() == AC_Rejected;
+        }
+
+        bool IsErrored()
+        {
+                return GetAckCode() == AC_Error;
+        }
+
+        bool IsUnknown()
+        {
+                return GetAckCode() == AC_Unknown;
+        }
+
+};
+
+class ERR : public GIL::HL7::Segment
+{
+
+public:
+        ERR(const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : GIL::HL7::Segment("ERR", rs, fs, sfs)
+        {
+                //GIL::HL7::Segment& msh = *this;
+        }
+
+        ERR& operator=(const GIL::HL7::Segment& segment)
+        {
+                GIL::HL7::Segment& err = *this;
+                err = segment;
+                return *this;
+        }
+
+        void SetErrorCode(GIL::HL7::Message::ErrorCode errorCode)
+        {
+                GIL::HL7::Segment& err = *this;
+                err[2][1] = GIL::HL7::Message::GetErrorCodeAsString(errorCode);
+        }
+
+        GIL::HL7::Message::ErrorCode GetErrorCode()
+        {
+                GIL::HL7::Segment& err = *this;
+                return GIL::HL7::Message::GetErrorCodeFromErrorCodeAsString(err[2][1]);
+        }
+
+        const std::string GetErrorCodeDescription()
+        {
+                return GIL::HL7::Message::GetErrorCodeDescription(GetErrorCode());
+        }
+
+        const std::string GetErrorMessage()
+        {
+                GIL::HL7::Segment& err = *this;
+                return err[6][1];
+        }
+
+        void SetErrorSeverity(GIL::HL7::Message::ErrorSeverity errorSeverity)
+        {
+                GIL::HL7::Segment& err = *this;
+                err[3][1] = GIL::HL7::Message::GetErrorSeverityString(errorSeverity);
+        }
+
+        GIL::HL7::Message::ErrorSeverity GetErrorSeverity()
+        {
+                GIL::HL7::Segment& err = *this;
+                return GIL::HL7::Message::GetErrorSeverityFromString(err[3][1]);
+        }
+};
+
+class PID : public GIL::HL7::Segment
+{
+public:
+        PID(const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : GIL::HL7::Segment("PID", rs, fs, sfs)
+        {
+                GIL::HL7::Segment& pid = *this;
+                pid <<= GIL::HL7::Field(1, "PID.1") << GIL::HL7::Component(1, "SI.1");
+                pid <<= GIL::HL7::Field(3, "PID.3");
+                pid <<= GIL::HL7::Field(4, "PID.4");
+                pid <<= GIL::HL7::Field(5, "PID.5");
+                pid <<= GIL::HL7::Field(6, "PID.6");
+
+        }
+
+        PID& operator=(const GIL::HL7::Segment& segment)
+        {
+                GIL::HL7::Segment& pid = *this;
+                pid = segment;
+                return *this;
+        }
+
+        void SetSetId(const std::string& setId)
+        {
+                GIL::HL7::Segment& pid = *this;
+                pid[1][1] = setId;
+        }
+
+        const std::string& GetSetId()
+        {
+                GIL::HL7::Segment& pid = *this;
+                return pid[1][1];
+        }
+
+        void ClearPatientIdentification()
+        {
+                GIL::HL7::Segment& pid = *this;
+                pid <<= GIL::HL7::Field(3, "PID.3");
+        }
+
+        /* Numero de Identificacion Fiscal */
+        void SetPatientNIF( const std::string& nif)
+        {
+                ClearPatientIdentification();
+                GIL::HL7::Segment& pid = *this;
+                pid[3] << GIL::HL7::Component(1, "CX.1", nif);
+                pid[3] << GIL::HL7::Component(4, "CX.4", "MI");
+                pid[3] << GIL::HL7::Component(5, "CX.5", "NNESP");
+                pid[3] << GIL::HL7::Component(9, "CX.9", "ESP&&ISO3166");
+        }
+
+        void AddPatientNIF( const std::string& nif)
+        {
+                GIL::HL7::Segment& pid = *this;
+                GIL::HL7::Field pid_3(3, "PID.3");
+                pid_3 << GIL::HL7::Component(1, "CX.1", nif);
+                pid_3 << GIL::HL7::Component(4, "CX.4", "MI");
+                pid_3 << GIL::HL7::Component(5, "CX.5", "NNESP");
+                pid_3 << GIL::HL7::Component(9, "CX.9", "ESP&&ISO3166");
+                pid << pid_3;
+        }
+
+        /* Numero de Seguridad Social */
+        void SetPatientSS(const std::string& numss)
+        {
+                ClearPatientIdentification();
+                GIL::HL7::Segment& pid = *this;
+                pid[3] << GIL::HL7::Component(1, "CX.1", numss);
+                pid[3] << GIL::HL7::Component(4, "CX.4", "SS");
+                pid[3] << GIL::HL7::Component(5, "CX.5", "SS");
+                pid[3] << GIL::HL7::Component(9, "CX.9", "ESP&&ISO3166");
+        }
+
+        /* Numero de Seguridad Social */
+        void AddPatientSS(const std::string& numss)
+        {
+                GIL::HL7::Segment& pid = *this;
+                GIL::HL7::Field pid_3(3, "PID.3");
+                pid_3 << GIL::HL7::Component(1, "CX.1", numss);
+                pid_3 << GIL::HL7::Component(4, "CX.4", "SS");
+                pid_3 << GIL::HL7::Component(5, "CX.5", "SS");
+                pid_3 << GIL::HL7::Component(9, "CX.9", "ESP&&ISO3166");
+                pid << pid_3;
+        }
+
+        /* CIP del Servicio Nacional de Salud*/
+        void SetPatientCIP(const std::string& cip)
+        {
+                ClearPatientIdentification();
+                GIL::HL7::Segment& pid = *this;
+                pid[3] << GIL::HL7::Component(1, "CX.1", cip);
+                pid[3] << GIL::HL7::Component(4, "CX.4", "MS");
+                pid[3] << GIL::HL7::Component(5, "CX.5", "HC");
+                pid[3] << GIL::HL7::Component(9, "CX.9", "ESP&&ISO3166");
+        }
+
+        /* CIP del Servicio Nacional de Salud*/
+        void AddPatientCIP(const std::string& cip)
+        {
+                GIL::HL7::Segment& pid = *this;
+                GIL::HL7::Field pid_3(3, "PID.3");
+                pid_3 << GIL::HL7::Component(1, "CX.1", cip);
+                pid_3 << GIL::HL7::Component(4, "CX.4", "MS");
+                pid_3 << GIL::HL7::Component(5, "CX.5", "HC");
+                pid_3 << GIL::HL7::Component(9, "CX.9", "ESP&&ISO3166");
+                pid << pid_3;
+        }
+
+        /* CIP Hl7Parser */
+        void SetPatientHl7ParserCIP(const std::string& cip)
+        {
+                ClearPatientIdentification();
+                GIL::HL7::Segment& pid = *this;
+                pid[3] << GIL::HL7::Component(1, "CX.1", cip);
+                pid[3] << GIL::HL7::Component(4, "CX.4", "CACL");
+                pid[3] << GIL::HL7::Component(5, "CX.5", "JHN");
+                pid[3] << GIL::HL7::Component(9, "CX.9", "CL&&ISO3166-2");
+        }
+
+        /* CIP Hl7Parser */
+        void AddPatientHl7ParserCIP(const std::string& cip)
+        {
+                GIL::HL7::Segment& pid = *this;
+                GIL::HL7::Field pid_3(3, "PID.3");
+                pid_3 << GIL::HL7::Component(1, "CX.1", cip);
+                pid_3 << GIL::HL7::Component(4, "CX.4", "CACL");
+                pid_3 << GIL::HL7::Component(5, "CX.5", "JHN");
+                pid_3 << GIL::HL7::Component(9, "CX.9", "CL&&ISO3166-2");
+                pid << pid_3;
+        }
+
+        /* Numero de pasaporte */
+        void SetPatientPassportNum(const std::string& num)
+        {
+                ClearPatientIdentification();
+                GIL::HL7::Segment& pid = *this;
+                pid[3] << GIL::HL7::Component(1, "CX.1", num);
+                pid[3] << GIL::HL7::Component(4, "CX.4", "MI");
+                pid[3] << GIL::HL7::Component(5, "CX.5", "PPN");
+                pid[3] << GIL::HL7::Component(9, "CX.9", "ESP&&ISO3166");
+        }
+
+        /* Numero de pasaporte */
+        void AddPatientPassportNum(const std::string& num)
+        {
+                GIL::HL7::Segment& pid = *this;
+                GIL::HL7::Field pid_3(3, "PID.3");
+                pid_3 << GIL::HL7::Component(1, "CX.1", num);
+                pid_3 << GIL::HL7::Component(4, "CX.4", "MI");
+                pid_3 << GIL::HL7::Component(5, "CX.5", "PPN");
+                pid_3 << GIL::HL7::Component(9, "CX.9", "ESP&&ISO3166");
+                pid << pid_3;
+        }
+
+        /* Numero de Historia Clinica (Dependiente del centro) */
+        void SetPatientNHC(const std::string& nhc, const std::string& idCentro)
+        {
+                ClearPatientIdentification();
+                GIL::HL7::Segment& pid = *this;
+                pid[3] << GIL::HL7::Component(1, "CX.1", nhc);
+                pid[3] << GIL::HL7::Component(4, "CX.4", "HIS");
+                pid[3] << GIL::HL7::Component(5, "CX.5", "PI");
+                pid[3] << GIL::HL7::Component(9, "CX.9", idCentro + std::string("&&99CENTROSACYL"));
+        }
+
+        /* Numero de Historia Clinica (Dependiente del centro) */
+        void AddPatientNHC(const std::string& nhc, const std::string& idCentro)
+        {
+                GIL::HL7::Segment& pid = *this;
+                GIL::HL7::Field pid_3(3, "PID.3");
+                pid_3 << GIL::HL7::Component(1, "CX.1", nhc);
+                pid_3 << GIL::HL7::Component(4, "CX.4", "HIS");
+                pid_3 << GIL::HL7::Component(5, "CX.5", "PI");
+                pid_3 << GIL::HL7::Component(9, "CX.9", idCentro + std::string("&&99CENTROSACYL"));
+                pid << pid_3;
+        }
+
+        void SetPatientName(const std::string& nombre, const std::string& apellido1, const std::string& apellido2)
+        {
+                GIL::HL7::Segment& pid = *this;
+                pid[5] << GIL::HL7::Component(1, "XPN.1", apellido1);
+                pid[5] << GIL::HL7::Component(2, "XPN.2", nombre);
+                pid[6] << GIL::HL7::Component(1, "XPN.1", apellido2);
+        }
+};
+
+class PV1 : public GIL::HL7::Segment
+{
+public:
+        PV1(const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : GIL::HL7::Segment("PV1", rs, fs, sfs)
+        {
+                GIL::HL7::Segment& pv1 = *this;
+                pv1 <<= GIL::HL7::Field(1, "PV1.1") << GIL::HL7::Component(1, "SI.1");
+                pv1 <<= GIL::HL7::Field(19, "PV1.19") << GIL::HL7::Component(1, "CX.1") << GIL::HL7::Component(4, "CX.4") << GIL::HL7::Component(5, "CX.5") << GIL::HL7::Component(9, "CX.9");
+        }
+
+        PV1& operator=(const GIL::HL7::Segment& segment)
+        {
+                GIL::HL7::Segment& pv1 = *this;
+                pv1 = segment;
+                return *this;
+        }
+
+        void SetSetId(const std::string& id)
+        {
+                GIL::HL7::Segment& pv1 = *this;
+                pv1[1] << GIL::HL7::Component(1, "SI.1", id);
+        }
+
+        void SetPatientClass(const std::string& patientClass)
+        {
+                GIL::HL7::Segment& pv1 = *this;
+                pv1[2] << GIL::HL7::Component(1, "IS.1", patientClass);
+        }
+
+        void SetEpisodeNumber(const std::string& episodeNumber, const std::string& ambitoPeticion, const std::string& idCentro)
+        {
+                GIL::HL7::Segment& pv1 = *this;
+                if (!episodeNumber.empty()) {
+                        pv1[19] << GIL::HL7::Component(1, "CX.1", episodeNumber);
+                }
+                pv1[19] << GIL::HL7::Component(4, "CX.4", ambitoPeticion);
+                pv1[19] << GIL::HL7::Component(5, "CX.5", "VN");
+                pv1[19] << GIL::HL7::Component(9, "CX.9", idCentro + std::string("&&99CENTROHl7Parser"));
+        }
+
+};
+
+class ORC : public GIL::HL7::Segment
+{
+public:
+        ORC(const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : GIL::HL7::Segment("ORC", rs, fs, sfs)
+        {
+                GIL::HL7::Segment& orc = *this;
+                orc <<= GIL::HL7::Field(1, "ORC.1") << GIL::HL7::Component(1, "ID.1");
+                orc <<= GIL::HL7::Field(2, "ORC.2") << GIL::HL7::Component(1, "EI.1");
+                orc <<= GIL::HL7::Field(2, "ORC.3") << GIL::HL7::Component(1, "EI.1");
+                orc <<= GIL::HL7::Field(4, "ORC.4") << GIL::HL7::Component(1, "EI.1");
+                orc <<= GIL::HL7::Field(5, "ORC.5") << GIL::HL7::Component(1, "ID.1");
+                orc <<= GIL::HL7::Field(12, "ORC.12") << GIL::HL7::Component(1, "XCN.1") << GIL::HL7::Component(2, "XCN.2") << GIL::HL7::Component(3, "XCN.3") << GIL::HL7::Component(4, "XCN.4") << GIL::HL7::Component(9, "XCN.9") << GIL::HL7::Component(13, "XCN.13") << GIL::HL7::Component(22, "XCN.22");
+                orc <<= GIL::HL7::Field(17, "ORC.17") << GIL::HL7::Component(1, "CE.1") << GIL::HL7::Component(2, "CE.2") << GIL::HL7::Component(3, "CE.3");
+        }
+
+        ORC& operator=(const GIL::HL7::Segment& segment)
+        {
+                GIL::HL7::Segment& orc = *this;
+                orc = segment;
+                return *this;
+        }
+
+        void SetControlOrder(const std::string& controlOrder)
+        {
+                GIL::HL7::Segment& orc = *this;
+                orc[1][1] = controlOrder;
+        }
+
+        void SetPlacerOrderNumber(const std::string& placerOrder)
+        {
+                GIL::HL7::Segment& orc = *this;
+                orc[2][1] = placerOrder;
+                orc[4][1] = placerOrder;
+        }
+
+        void SetFillerOrderNumber(const std::string& fillerOrder)
+        {
+                GIL::HL7::Segment& orc = *this;
+                orc[3][1] = fillerOrder;
+        }
+
+        void SetStatus(const std::string& status)
+        {
+                GIL::HL7::Segment& orc = *this;
+                orc[5][1] = status;
+        }
+
+        void SetOrderingProviderName(const std::string& nombre, const std::string& apellido1, const std::string& apellido2)
+        {
+                GIL::HL7::Segment& orc = *this;
+                orc[12][2] = apellido1;
+                orc[12][3] = nombre;
+                orc[12][4] = apellido2;
+        }
+
+        void SetOrderingProviderNIF(const std::string& nif)
+        {
+                GIL::HL7::Segment& orc = *this;
+                orc[12][1] = nif;
+                orc[12][9] = "MI";
+                orc[12][13] = "NNESP";
+                orc[12][22] ="ESP&&ISO3166";
+        }
+
+        void SetOrderingProviderCollegNumber(const std::string& num)
+        {
+                GIL::HL7::Segment& orc = *this;
+                orc[12][1] = num;
+                orc[12][9] = "MD";
+                orc[12][13] = "COM";
+                orc[12][22] ="ESP&&ISO3166";
+        }
+
+        void SetOrderingFacility(const std::string& id, const std::string& nombre)
+        {
+                GIL::HL7::Segment& orc = *this;
+                orc[21][1] = nombre;
+                orc[21][10] = id;
+        }
+
+};
+
+class OBR : public GIL::HL7::Segment
+{
+public:
+        typedef enum Laterality_Code {
+                LAT_R,
+                LAT_L
+        } ACK_Code;
+
+        OBR(const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : GIL::HL7::Segment("OBR", rs, fs, sfs)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr <<= GIL::HL7::Field(1, "OBR.1") << GIL::HL7::Component(1, "SI.1");
+                obr <<= GIL::HL7::Field(2, "OBR.2") << GIL::HL7::Component(1, "ST.1");
+                obr <<= GIL::HL7::Field(2, "OBR.3") << GIL::HL7::Component(1, "ST.1");
+                obr <<= GIL::HL7::Field(4, "OBR.4") << GIL::HL7::Component(1, "ST.1") << GIL::HL7::Component(2, "ST.1") << GIL::HL7::Component(3, "ID.1");
+                obr <<= GIL::HL7::Field(26, "OBR.26") << GIL::HL7::Component(1, "ST.1");
+                obr <<= GIL::HL7::Field(29, "OBR.26") << GIL::HL7::Component(1, "ST.1");
+        }
+
+        OBR& operator=(const GIL::HL7::Segment& segment)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr = segment;
+                return *this;
+        }
+
+        void SetSetId(const std::string& id)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr[1][1] = id;
+        }
+
+        void SetPlacerOrderNumber(const std::string& placeOrderUID)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr[2][1] = placeOrderUID;
+        }
+
+        void SetStudyUID(const std::string& StudyUID)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr[2][1] = StudyUID;
+        }
+
+        void SetFillerOrderNumber(const std::string& fillerOrder)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr[3][1] = fillerOrder;
+        }
+
+        void SetFillerOrderNumber(const std::string& fillerOrderId, const std::string& fillerOrderNamespaceId)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr[3][1] = fillerOrderId;
+                obr[3][2] = fillerOrderNamespaceId;
+        }
+
+        void SetIdentifier(const std::string& identifier)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr.ParseField(4, identifier);
+        }
+
+        void SetIdentifier(const std::string& codPrueba, const std::string& tipoPrueba, const std::string& sistemaCodificacion)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr[4][1] = codPrueba;
+                obr[4][2] = tipoPrueba;
+                obr[4][3] = sistemaCodificacion;
+        }
+
+        void SetPlacerField1(const std::string& value)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr[18][1] = value;
+        }
+
+        void SetParentResultIdentifier(const std::string& parentObservationIdentifier, const std::string& parentObservationSubIdentifier, const std::string& parentObservationValueDescriptor)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr[26][1] = parentObservationIdentifier;
+                obr[26][2] = parentObservationSubIdentifier;
+                obr[26][3] = parentObservationValueDescriptor;
+        }
+
+        void SetParentID(const std::string& placerOrderUId, const std::string& fillerOderUId)
+        {
+                GIL::HL7::Segment& obr = *this;
+                obr[29][1] = placerOrderUId;
+                obr[29][2] = fillerOderUId;
+        }
+
+        void SetLaterality(Laterality_Code laterality)
+        {
+                GIL::HL7::Segment& obr = *this;
+                switch(laterality) {
+                case LAT_L: {
+                        obr[46][1] = "L";
+                        obr[46][2] = "Izquierdo";
+                        obr[46][3] = "HL70495";
+                }
+                break;
+                case LAT_R: {
+                        obr[46][1] = "R";
+                        obr[46][2] = "Derecho";
+                        obr[46][3] = "HL70495";
+                }
+                break;
+                }
+        }
+};
+
+class OBX : public GIL::HL7::Segment
+{
+public:
+        OBX(const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : GIL::HL7::Segment("OBX", rs, fs, sfs)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx <<= GIL::HL7::Field(1, "OBX.1")   << GIL::HL7::Component(1, "SI.1");
+                obx <<= GIL::HL7::Field(2, "OBX.2")   << GIL::HL7::Component(1, "ID.1");
+                obx <<= GIL::HL7::Field(3, "OBX.3")   << GIL::HL7::Component(1, "ST.1")  << GIL::HL7::Component(2, "ST.1")  << GIL::HL7::Component(3, "ID.1");
+                obx <<= GIL::HL7::Field(5, "OBX.5")   << GIL::HL7::Component(1, "") << GIL::HL7::Component(2, "") << GIL::HL7::Component(3, "");
+                obx <<= GIL::HL7::Field(11, "OBX.11") << GIL::HL7::Component(1, "ID.1");
+                obx <<= GIL::HL7::Field(16, "OBX.16") << GIL::HL7::Component(1, "XCN.1") << GIL::HL7::Component(2, "XCN.2") << GIL::HL7::Component(3, "XCN.3") << GIL::HL7::Component(4, "XCN.4") << GIL::HL7::Component(9, "XCN.9") << GIL::HL7::Component(13, "XCN.13") << GIL::HL7::Component(22, "XCN.22");
+
+        }
+
+        OBX& operator=(const GIL::HL7::Segment& segment)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx = segment;
+                return *this;
+        }
+
+        void SetSetId(const std::string& id)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx[1][1] = id;
+        }
+
+        void SetValueType(const std::string& valueType)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx[2][1] = valueType;
+        }
+
+        void SetIdentifier(const std::string& codigoPrueba, const std::string& descPrueba, const std::string& sistemaCodificacion)
+        {
+                GIL::HL7::Segment& obx = *this;
+                if (codigoPrueba != "") {
+                        obx[3][1] = codigoPrueba;
+                }
+                obx[3][2] = descPrueba;
+                if (sistemaCodificacion != "") {
+                        obx[3][3] = sistemaCodificacion;
+                }
+        }
+
+        void SetSubIdentifier(const std::string& value, bool unscape = true)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx.ParseField(4, value, unscape);
+        }
+
+        void SetValue(const std::string& value, bool unscape = true)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx.ParseField(5, value, unscape);
+        }
+
+        void SetWado(const std::string& value)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx[5][1] = value;
+                obx[5][3] = "image";
+                obx[5][4] = "dicom";
+        }
+
+        void SetValueMetadata(const std::string& idAplicacion, const std::string& dataType, const std::string& dataSubType)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx[5][2] = idAplicacion;
+                obx[5][3] = dataType;
+                obx[5][4] = dataSubType;
+        }
+
+        void SetObservationResultStatus(const std::string& status)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx[11][1] = status;
+        }
+
+        void SetResponsiveObserverName(const std::string& nombre, const std::string& apellido1, const std::string& apellido2)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx[16][2] = apellido1;
+                obx[16][3] = nombre;
+                obx[16][4] = apellido2;
+        }
+
+        void SetResponsiveObserverNIF(const std::string& nif)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx[16][1]  = nif;
+                obx[16][9]  = "MI";
+                obx[16][13] = "NNESP";
+                obx[16][22] ="ESP&&ISO3166";
+        }
+
+        void AddObservationMethod(const std::string& codigo, const std::string& desc, const std::string& namespaceid)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx << GIL::HL7::Field(17, "OBX.17") << GIL::HL7::Component(1, "ST.1", codigo) << GIL::HL7::Component(2, "ST.2", desc) << GIL::HL7::Component(3, "ST.3", namespaceid);
+        }
+
+        void SetObservationMethod(const std::string& codigo, const std::string& desc, const std::string& namespaceid)
+        {
+                GIL::HL7::Segment& obx = *this;
+                obx[17][1] = codigo;
+                obx[17][2] = desc;
+                obx[17][3] = namespaceid;
+        }
+};
+
+class TQ1 : public GIL::HL7::Segment
+{
+public:
+        TQ1(const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : GIL::HL7::Segment("TQ1", rs, fs, sfs)
+        {
+                GIL::HL7::Segment& tq1 = *this;
+                tq1 <<= GIL::HL7::Field(1, "TQ.1") << GIL::HL7::Component(1, "SI.1");
+                tq1 <<= GIL::HL7::Field(9, "TQ.9") << GIL::HL7::Component(1, "ST.1");
+        }
+
+        TQ1& operator=(const GIL::HL7::Segment& segment)
+        {
+                GIL::HL7::Segment& tq1 = *this;
+                tq1 = segment;
+                return *this;
+        }
+
+        void SetSetId(const std::string& id)
+        {
+                GIL::HL7::Segment& tq1 = *this;
+                tq1[1][1] = id;
+        }
+
+        void SetUrgency(const std::string& urgency)
+        {
+                GIL::HL7::Segment& tq1 = *this;
+                tq1[9][1] = urgency;
+        }
+};
+
+}
+
+namespace Messages
+{
+
+class MessageInterpreter
+{
+
+public:
+
+        MessageInterpreter(const std::string& messageType, const std::string& messageTriggerEvent, const std::string& messageHeader, const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : MSH( messageType, messageTriggerEvent, messageHeader, rs, fs, sfs)
+        {
+        }
+
+        MessageInterpreter(const GIL::HL7::Message& msg) : MSH(msg.GetSegment("MSH", 1))
+        {
+        }
+
+        virtual ~MessageInterpreter()
+        {
+        }
+
+        virtual void GenerateTimeStamp();
+
+        void SetSendingApplication(const std::string& sendingApplication)
+        {
+                MSH.SetSendingApplication(sendingApplication);
+        }
+
+        const std::string& GetSendingApplication()
+        {
+                return MSH.GetSendingApplication();
+        }
+
+        void SetSendingFacility(const std::string& sendingFacility)
+        {
+                MSH.SetSendingFacility(sendingFacility);
+        }
+
+        const std::string& GetSendingFacility()
+        {
+                return MSH.GetSendingFacility();
+        }
+
+        void SetReceivingApplication(const std::string& receivingApplication)
+        {
+                MSH.SetReceivingApplication(receivingApplication);
+        }
+
+        const std::string& GetReceivingApplicacion()
+        {
+                return MSH.GetReceivingApplication();
+        }
+
+        void SetReceivingFacility(const std::string& receivingFacility)
+        {
+                MSH.SetReceivingFacility(receivingFacility);
+        }
+
+        const std::string& GetReceivingFacility()
+        {
+                return MSH.GetReceivingFacility();
+        }
+
+        void SetTimeStamp(const std::string& messageTimeStamp)
+        {
+                MSH.SetTimeStamp(messageTimeStamp);
+        }
+
+        const std::string& GetTimeStamp()
+        {
+                return MSH.GetTimeStamp();
+        }
+
+        void SetMessageType(const std::string& messageType)
+        {
+                MSH.SetMessageType(messageType);
+        }
+
+        const std::string& GetMessageType()
+        {
+                return MSH.GetMessageType();
+        }
+
+        void SetMessageTriggerEvent(const std::string& triggerEvent)
+        {
+                MSH.SetMessageTriggerEvent(triggerEvent);
+        }
+
+        const std::string& GetMessageTriggerEvent()
+        {
+                return MSH.GetMessageTriggerEvent();
+        }
+
+        void SetMessageHeader(const std::string& messageHeader)
+        {
+                MSH.SetMessageHeader(messageHeader);
+        }
+
+        const std::string& GetMessageHeader()
+        {
+                return MSH.GetMessageHeader();
+        }
+
+        void SetMessageControlId(const std::string& messageControlId)
+        {
+                MSH.SetMessageControlId(messageControlId);
+        }
+
+        const std::string& GetMessageControlId()
+        {
+                return MSH.GetMessageControlId();
+        }
+
+        void Build(GIL::HL7::Message& msg)
+        {
+                GenerateTimeStamp();
+                msg.SetHeader(MSH.GetMessageHeader());
+                msg["MSH"] = MSH;
+
+                BuildSpecific(msg);
+        }
+
+protected:
+
+        virtual void BuildSpecific(GIL::HL7::Message& msg) = 0;
+
+public:
+
+        GIL::Hl7Parser::Segmentos::MSH MSH;
+
+protected:
+        std::string messageType;
+        std::string messageTriggerEvent;
+
+};
+
+class ORU_R01Interpreter : public MessageInterpreter
+{
+
+public:
+
+        class PatientResult
+        {
+
+        public:
+
+                class Patient
+                {
+
+                public:
+
+                        class PatientIdentification
+                        {
+
+                        public:
+
+                                PatientIdentification()
+                                {
+                                }
+
+                                void SetSetId(unsigned int id)
+                                {
+                                        std::stringstream ss;
+                                        ss << id;
+                                        PID.SetSetId(ss.str());
+                                }
+
+                                void SetPatientNIF( const std::string& nif)
+                                {
+                                        PID.SetPatientNIF(nif);
+                                }
+
+                                void AddPatientNIF( const std::string& nif)
+                                {
+                                        PID.AddPatientNIF(nif);
+                                }
+
+                                /* Numero de Seguridad Social */
+                                void SetPatientSS(const std::string& numss)
+                                {
+                                        PID.SetPatientSS(numss);
+                                }
+
+                                /* Numero de Seguridad Social */
+                                void AddPatientSS(const std::string& numss)
+                                {
+                                        PID.AddPatientSS(numss);
+                                }
+
+                                /* CIP del Servicio Nacional de Salud*/
+                                void SetPatientCIP(const std::string& cip)
+                                {
+                                        PID.SetPatientCIP(cip);
+                                }
+
+                                /* CIP del Servicio Nacional de Salud*/
+                                void AddPatientCIP(const std::string& cip)
+                                {
+                                        PID.AddPatientCIP(cip);
+                                }
+
+                                /* CIP Hl7Parser */
+                                void SetPatientHl7ParserCIP(const std::string& cip)
+                                {
+                                        PID.SetPatientHl7ParserCIP(cip);
+                                }
+
+                                /* CIP Hl7Parser */
+                                void AddPatientHl7ParserCIP(const std::string& cip)
+                                {
+                                        PID.AddPatientHl7ParserCIP(cip);
+                                }
+
+                                /* Numero de pasaporte */
+                                void AddPatientPassportNum(const std::string& num)
+                                {
+                                        PID.AddPatientPassportNum(num);
+                                }
+
+                                /* Numero de pasaporte */
+                                void SetPatientPassportNum(const std::string& num)
+                                {
+                                        PID.SetPatientPassportNum(num);
+                                }
+
+                                /* Numero de Historia Clinica (Dependiente del centro) */
+                                void SetPatientNHC(const std::string& nhc, const std::string& idCentro)
+                                {
+                                        PID.SetPatientNHC(nhc, idCentro);
+                                }
+
+                                /* Numero de Historia Clinica (Dependiente del centro) */
+                                void AddPatientNHC(const std::string& nhc, const std::string& idCentro)
+                                {
+                                        PID.AddPatientNHC(nhc, idCentro);
+                                }
+
+                                void SetPatientName(const std::string& nombre, const std::string& apellido1, const std::string& apellido2)
+                                {
+                                        PID.SetPatientName(nombre, apellido1, apellido2);
+                                }
+
+                                GIL::Hl7Parser::Segmentos::PID PID;
+                        };
+
+                        class PatientVisit
+                        {
+
+                        public:
+
+                                PatientVisit()
+                                {
+                                }
+
+                                void SetEpisodeNumber(const std::string& nep, const std::string& ambitoPeticion, const std::string& idCentro)
+                                {
+                                        PV1.SetEpisodeNumber(nep, ambitoPeticion, idCentro);
+                                }
+
+                                void SetSetId(unsigned int id)
+                                {
+                                        std::stringstream ss;
+                                        ss << id;
+                                        PV1.SetSetId(ss.str());
+                                }
+
+                                void SetPatientTypeExternal()
+                                {
+                                        PV1.SetPatientClass("O");
+                                }
+
+                                void SetPatientTypeAdmitted()
+                                {
+                                        PV1.SetPatientClass("I");
+                                }
+
+                        public:
+                                GIL::Hl7Parser::Segmentos::PV1 PV1;
+
+                        };
+
+                        Patient()
+                        {
+                        }
+
+                public:
+
+                        void BuildSpecific(GIL::HL7::Message& msg)
+                        {
+                                msg << patientIdentification.PID;
+                                msg << patientVisit.PV1;
+                        }
+
+                        PatientIdentification patientIdentification;
+                        PatientVisit patientVisit;
+                };
+
+                class Order
+                {
+
+                public:
+                        class OrderCommon
+                        {
+
+                        public:
+                                OrderCommon()
+                                {
+                                }
+
+                                void SetStatusCompleted()
+                                {
+                                        ORC.SetStatus("CM");
+                                        ORC.SetControlOrder("SC");
+                                }
+
+                                void SetOrderingUID(const std::string& uid)
+                                {
+                                        ORC.SetPlacerOrderNumber(uid);
+                                }
+
+                                void SetProducerUID(const std::string& producerUID)
+                                {
+                                        ORC.SetFillerOrderNumber(producerUID);
+                                }
+
+                                void SetProducerUID(const std::string& accessionNumber,const std::string& idPACS)
+                                {
+                                        std::stringstream ostr;
+                                        ostr << accessionNumber << '^' << idPACS;
+                                        ORC.SetFillerOrderNumber(ostr.str());
+                                }
+
+                                void SetOrderingProviderName(const std::string& nombre, const std::string& apellido1, const std::string& apellido2)
+                                {
+                                        ORC.SetOrderingProviderName(nombre, apellido1, apellido2);
+                                }
+
+                                void SetOrderingProviderNIF(const std::string& nif)
+                                {
+                                        ORC.SetOrderingProviderNIF(nif);
+                                }
+
+                                void SetOrderingCenter(const std::string& id, const std::string& nombre)
+                                {
+                                        ORC.SetOrderingFacility(id, nombre);
+                                }
+
+                                GIL::Hl7Parser::Segmentos::ORC ORC;
+                        };
+
+                        class TimingQuantity
+                        {
+                        public:
+                                TimingQuantity()
+                                {
+                                }
+
+                                void SetSetId(unsigned int id)
+                                {
+                                        std::stringstream ss;
+                                        ss << id;
+                                        TQ1.SetSetId(ss.str());
+                                }
+
+                                void SetUrgencyNormal()
+                                {
+                                        TQ1.SetUrgency("R");
+                                }
+
+                                void SetUrgencyUrgent()
+                                {
+                                        TQ1.SetUrgency("S");
+                                }
+
+                                GIL::Hl7Parser::Segmentos::TQ1 TQ1;
+                        };
+
+                        class ObservationRequest
+                        {
+
+                        public:
+                                ObservationRequest()
+                                {
+                                }
+
+                                void SetSetId(unsigned int id)
+                                {
+                                        std::stringstream ss;
+                                        ss << id;
+                                        OBR.SetSetId(ss.str());
+                                }
+
+                                void SetOrderingUID(const std::string& orderUId)
+                                {
+                                        OBR.SetPlacerOrderNumber(orderUId);
+                                }
+
+                                void SetProducerUID(const std::string& producerUID)
+                                {
+                                        OBR.SetFillerOrderNumber(producerUID);
+                                }
+
+                                void SetProducerUID(const std::string& accessionNumber,const std::string& idPACS)
+                                {
+                                        std::stringstream ostr;
+                                        ostr << accessionNumber << '^' << idPACS;
+                                        OBR.SetFillerOrderNumber(ostr.str());
+                                }
+
+                                void SetIdentifier(const std::string& id)
+                                {
+                                        OBR.SetIdentifier(id);
+                                }
+
+                                void SetIdentifier(const std::string& codPrueba, const std::string& tipoPrueba, const std::string& sistemaCodificacion)
+                                {
+                                        OBR.SetIdentifier(codPrueba, tipoPrueba, sistemaCodificacion);
+                                }
+
+                                //  identificadordObservacionReferida = OBX.3, subIdentificadorObservacionReferida = OBX.4, valorEvidencia = OBX.4
+                                void SetParentResultIdentifier(const std::string& identificadordObservacionReferida, const std::string& subIdentificadorObservacionReferida, const std::string& valorEvidencia)
+                                {
+                                        OBR.SetParentResultIdentifier(identificadordObservacionReferida, subIdentificadorObservacionReferida, valorEvidencia);
+                                }
+
+                                void SetParentID(const std::string& placerOrderUId, const std::string& fillerOderUId)
+                                {
+                                        OBR.SetParentID(placerOrderUId, fillerOderUId);
+                                }
+
+                                void SetStudyUID(const std::string& StudyUID)
+                                {
+                                        OBR.SetStudyUID(StudyUID);
+                                }
+
+                                void SetPlacerField1(const std::string& value)
+                                {
+                                        OBR.SetPlacerField1(value);
+                                }
+
+                                void SetLateralityRight()
+                                {
+                                        OBR.SetLaterality(GIL::Hl7Parser::Segmentos::OBR::LAT_R);
+                                }
+
+                                void SetLateralityLeft()
+                                {
+                                        OBR.SetLaterality(GIL::Hl7Parser::Segmentos::OBR::LAT_L);
+                                }
+
+                                GIL::Hl7Parser::Segmentos::OBR OBR;
+                        };
+
+                        class ObservationGroup
+                        {
+
+                        public:
+
+                                class Observation
+                                {
+                                public:
+
+                                        Observation()
+                                        {
+                                        }
+
+                                        void Clear()
+                                        {
+                                                OBX = GIL::Hl7Parser::Segmentos::OBX();
+                                        }
+
+                                        void SetSetId(unsigned int id)
+                                        {
+                                                std::stringstream ss;
+                                                ss << id;
+                                                OBX.SetSetId(ss.str());
+                                        }
+
+                                        void SetDataType(const std::string& dataType)
+                                        {
+                                                OBX.SetValueType(dataType);
+                                        }
+
+                                        void SetSubIdentifier(unsigned int id)
+                                        {
+                                                std::stringstream ss;
+                                                ss << id;
+                                                OBX.SetSubIdentifier(ss.str());
+                                        }
+
+                                        void SetIdentifier(const std::string& codigoPrueba, const std::string& descPrueba, const std::string& sistemaCodificacion)
+                                        {
+                                                OBX.SetIdentifier(codigoPrueba, descPrueba, sistemaCodificacion);
+                                        }
+
+                                        void SetValue(const std::string& value, bool unscape = true)
+                                        {
+                                                OBX.SetValue(value, unscape);
+                                        }
+
+                                        void SetValueMetadata(const std::string& idAplicacion, const std::string& dataType, const std::string& dataSubType)
+                                        {
+                                                OBX.SetValueMetadata(idAplicacion, dataType, dataSubType);
+                                        }
+
+                                        void SetWado(const std::string& value)
+                                        {
+                                                OBX.SetWado(value);
+                                        }
+
+                                        void SetResponsiveObserverName(const std::string& nombre, const std::string& apellido1, const std::string& apellido2)
+                                        {
+                                                OBX.SetResponsiveObserverName(nombre, apellido1, apellido2);
+                                        }
+
+                                        void SetResponsiveObserverNIF(const std::string& nif)
+                                        {
+                                                OBX.SetResponsiveObserverNIF(nif);
+                                        }
+
+                                        void SetFinal()
+                                        {
+                                                OBX.SetObservationResultStatus("F");
+                                        }
+
+                                        void AddObservationMethod(const std::string& codigo, const std::string& desc, const std::string& namespaceid)
+                                        {
+                                                OBX.AddObservationMethod(codigo, desc, namespaceid);
+                                        }
+
+                                        GIL::Hl7Parser::Segmentos::OBX OBX;
+                                };
+
+                                ObservationGroup()
+                                {
+
+                                }
+
+                                void AddObservation(const Observation& ob)
+                                {
+                                        Observations.push_back(ob);
+                                }
+
+                                std::list<Observation> Observations;
+                        };
+
+                        Order()
+                        {
+
+                        }
+
+                public:
+                        void BuildSpecific(GIL::HL7::Message& msg)
+                        {
+                                msg << orderCommon.ORC;
+                                msg << observationRequest.OBR;
+                                msg << timingQuantity.TQ1;
+
+                                for (std::list<Order::ObservationGroup::Observation>::iterator it = observationGroup.Observations.begin(); it != observationGroup.Observations.end(); ++it) {
+                                        msg << (*it).OBX;
+                                }
+
+                        }
+
+                        OrderCommon orderCommon;
+                        TimingQuantity timingQuantity;
+                        ObservationRequest observationRequest;
+                        ObservationGroup observationGroup;
+
+                };
+
+                PatientResult()
+                {
+                }
+
+        public:
+
+                void BuildSpecific(GIL::HL7::Message& msg)
+                {
+                        patient.BuildSpecific(msg);
+
+                        for (std::list<Order>::iterator it = orders.begin(); it != orders.end(); ++it) {
+                                (*it).BuildSpecific(msg);
+                        }
+                }
+
+                void AddOrder(Order& order)
+                {
+                        orders.push_back(order);
+                }
+
+                Patient patient;
+                std::list<Order> orders;
+        };
+
+        ORU_R01Interpreter(const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : MessageInterpreter("ORU", "R01", "ORU_R01", rs, fs, sfs)
+        {
+        }
+
+protected:
+
+        virtual void BuildSpecific(GIL::HL7::Message& msg)
+        {
+                for (std::list<PatientResult>::iterator it = results.begin(); it != results.end(); ++it) {
+                        (*it).BuildSpecific(msg);
+                }
+
+        }
+
+public:
+
+        void AddPatientResult(PatientResult& result)
+        {
+                results.push_back(result);
+        }
+
+protected:
+
+        std::list<PatientResult> results;
+};
+
+class ACKInterpreter : public MessageInterpreter
+{
+
+public:
+
+        ACKInterpreter(const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^") : MessageInterpreter("ACK", "", "ACK", rs, fs,sfs)
+        {
+                MSH <<= GIL::HL7::Field(15, "MSH.15") << GIL::HL7::Component(1, "", "NE");
+                MSH <<= GIL::HL7::Field(16, "MSH.16") << GIL::HL7::Component(1, "", "NE");
+        }
+
+        ACKInterpreter(const GIL::HL7::Message& msg) : MessageInterpreter(msg), MSA(), ERR()
+        {
+                MSA = msg.GetSegment("MSA", 1);
+                ERR = msg.GetSegment("ERR", 1);
+        }
+
+        // Obtiene el Control ID del mensaje al que se refiere este ACK
+        void SetReferralMessageControlId (MessageInterpreter& msg)
+        {
+                MSA.SetReferralMessageControlId(msg.MSH.GetMessageControlId());
+        }
+
+        void SetReferralMessageControlId (GIL::HL7::Message& msg)
+        {
+                MSA.SetReferralMessageControlId(msg["MSH"][10][1]);
+        }
+
+        void SetReferralMessageControlId (const std::string& msgControlId)
+        {
+                MSA.SetReferralMessageControlId(msgControlId);
+        }
+
+        const std::string& GetReferralMessageControlId ()
+        {
+                return MSA.GetReferralMessageControlId();
+        }
+
+        void SetAckCode(GIL::Hl7Parser::Segmentos::MSA::ACK_Code code)
+        {
+                return MSA.SetAckCode(code);
+        }
+
+        GIL::Hl7Parser::Segmentos::MSA::ACK_Code GetAckCode()
+        {
+                return MSA.GetAckCode();
+        }
+
+        bool IsSuccess ()
+        {
+                return MSA.IsSuccess();
+        }
+
+        bool IsRejected ()
+        {
+                return MSA.IsRejected();
+        }
+
+        bool IsErrored ()
+        {
+                return MSA.IsErrored();
+        }
+
+        bool IsUnknown ()
+        {
+                return MSA.IsUnknown();
+        }
+
+        void SetErrorCode(GIL::HL7::Message::ErrorCode errorCode)
+        {
+                ERR.SetErrorCode(errorCode);
+        }
+
+        GIL::HL7::Message::ErrorCode GetErrorCode()
+        {
+                return ERR.GetErrorCode();
+        }
+
+        void SetErrorSeverity(GIL::HL7::Message::ErrorSeverity errorSeverity)
+        {
+                return ERR.SetErrorSeverity(errorSeverity);
+        }
+
+        GIL::HL7::Message::ErrorSeverity GetErrorSeverity()
+        {
+                return ERR.GetErrorSeverity();
+        }
+
+protected:
+
+        virtual void BuildSpecific(GIL::HL7::Message& msg)
+        {
+                msg["MSA"] = MSA;
+                msg["ERR"] = ERR;
+        }
+
+public:
+
+        GIL::Hl7Parser::Segmentos::MSA MSA;
+        GIL::Hl7Parser::Segmentos::ERR ERR;
+};
+}
+}
+}
diff --git a/cadxcore/api/ilock.cpp b/cadxcore/api/ilock.cpp
new file mode 100644
index 0000000..64cb695
--- /dev/null
+++ b/cadxcore/api/ilock.cpp
@@ -0,0 +1,107 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+#include "ilock.h"
+#include <wx/thread.h>
+
+//----------------------------------------------------------------------------------------------------
+//region Interfaz de soporte de cerrojos
+
+//----------------------------------------------------------------------------------------------------
+//region Constructor y destructor
+
+GNC::GCS::ILockable::ILockable()
+{
+        m_IsLocked = false;
+        m_pCS = new wxCriticalSection();
+}
+
+GNC::GCS::ILockable::~ILockable()
+{
+        if (m_pCS != NULL) {
+                delete m_pCS;
+        }
+        m_pCS = NULL;
+}
+
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//region Interfaz de exclusion mutua
+
+void GNC::GCS::ILockable::Lock()
+{
+        //----------------------------------------------------------------------------------------------------
+        // Entrada a la seccion Critica
+        //----------------------------------------------------------------------------------------------------
+        m_pCS->Enter();
+        m_IsLocked = true;
+        //----------------------------------------------------------------------------------------------------
+        //----------------------------------------------------------------------------------------------------
+}
+
+void GNC::GCS::ILockable::UnLock()
+{
+        //----------------------------------------------------------------------------------------------------
+        // Salida de la seccion Critica
+        //----------------------------------------------------------------------------------------------------
+        m_IsLocked = false;
+        m_pCS->Leave();
+        //----------------------------------------------------------------------------------------------------
+        //----------------------------------------------------------------------------------------------------
+}
+
+bool GNC::GCS::ILockable::IsLocked() const
+{
+        return m_IsLocked;
+}
+
+//endregion
+
+
+//----------------------------------------------------------------------------------------------------
+//region Construccion y destruccion
+
+GNC::GCS::ILocker::ILocker(GNC::GCS::ILockable& pLockable)
+{
+        m_pLockable = &pLockable;
+        m_pLockable->Lock();
+
+}
+
+GNC::GCS::ILocker::ILocker(GNC::GCS::ILockable* pLockable)
+{
+        m_pLockable = pLockable;
+        m_pLockable->Lock();
+
+}
+
+GNC::GCS::ILocker::~ILocker()
+{
+        if (m_pLockable != NULL) {
+                m_pLockable->UnLock();
+                m_pLockable = NULL;
+        }
+}
+
+//endregion
+
+//endregion
diff --git a/cadxcore/api/ilock.h b/cadxcore/api/ilock.h
new file mode 100644
index 0000000..91e316b
--- /dev/null
+++ b/cadxcore/api/ilock.h
@@ -0,0 +1,116 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ILOCK_H
+#define ILOCK_H
+#include <api/api.h>
+#include <list>
+#include <string>
+#include <atomic>
+
+//----------------------------------------------------------------------------------------------------
+//region Forward Declarations
+class wxCriticalSection;
+
+namespace GNC
+{
+namespace GCS
+{
+class ILocker;
+}
+}
+//endregion
+
+
+namespace GNC
+{
+namespace GCS
+{
+
+//----------------------------------------------------------------------------------------------------
+//region Interfaz de soporte de cerrojos
+//----------------------------------------------------------------------------------------------------
+class EXTAPI ILockable
+{
+        //----------------------------------------------------------------------------------------------------
+        //region Constructor y destructor
+public:
+
+        ILockable();
+        ~ILockable();
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region Interfaz de exclusion mutua
+public:
+
+        void Lock();
+
+        void UnLock();
+
+        bool IsLocked() const;
+        //enregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region Interfaz de subscripcion
+private:
+//				ILocker* m_pLocker; // ILocker que ha bloqueado el cerrojo.
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region Atributos
+private:
+        wxCriticalSection* m_pCS;             // El cerrojo real.
+        bool               m_IsLocked;
+        //endregion
+
+        friend class ILocker;
+};
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//region Helper de bloqueo automatico
+//----------------------------------------------------------------------------------------------------
+class EXTAPI ILocker
+{
+        //----------------------------------------------------------------------------------------------------
+        //region Construccion y destruccion
+public:
+
+        ILocker( GNC::GCS::ILockable& pLockable );
+        ILocker( GNC::GCS::ILockable* pLockable );
+        ~ILocker();
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region Atributos
+private:
+
+        ILockable* m_pLockable;
+        //endregion
+
+        friend class ILockable;
+};
+//endregion
+}
+}
+
+#endif
diff --git a/cadxcore/api/imgproxy.h b/cadxcore/api/imgproxy.h
new file mode 100644
index 0000000..0296523
--- /dev/null
+++ b/cadxcore/api/imgproxy.h
@@ -0,0 +1,169 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <iostream>
+#include <string>
+
+template <class TPixel>
+class ImgProxy
+{
+private:
+        bool automem;
+
+public:
+        int anchura, altura, size;
+        TPixel *data;
+
+        ImgProxy()
+        {
+                this->anchura = 0;
+                this->altura = 0;
+                this->size = 0;
+                this->data = NULL;
+                this->automem = false;
+                //std::cout << "ImgProxy[" << this << "] creado data = " << data << ", automem=" << automem << std::endl;
+        }
+
+        ImgProxy(const ImgProxy&o)
+        {
+                (*this) = o;
+        }
+
+        ImgProxy(int anchura, int altura, TPixel *data, bool automem = false)
+        {
+                this->anchura = anchura;
+                this->altura = altura;
+                this->size = anchura * altura;
+                this->data = data;
+                this->automem = automem;
+                //std::cout << "ImgProxy[" << this << "] creado data = " << data << ", automem=" << automem << std::endl;
+        }
+
+        ImgProxy(int anchura, int altura)
+        {
+                this->anchura = anchura;
+                this->altura = altura;
+                this->size = anchura * altura;
+                this->data = new TPixel[anchura*altura];
+                this->automem = true;
+                //std::cout << "ImgProxy[" << this << "] creado data = " << data << ", automem=" << automem << std::endl;
+        }
+
+        ~ImgProxy()
+        {
+                //std::cout << "ImgProxy[" << this << "] destruido data = " << data << ", automem=" << automem << std::endl;
+                if (automem && this->data) {
+                        //std::cout << "ImgProxy destruido" << std::endl;
+                        delete[] this->data;
+                        this->data = NULL;
+                }
+
+        }
+
+        ImgProxy& operator=(const ImgProxy& o)
+        {
+                //std::cout << "PELIGRO!!!!! ImgProxy[" << this << "] asignado data = " << data << ", automem=" << automem << std::endl;
+                anchura = o.anchura;
+                altura = o.altura;
+                size = o.size;
+                if (o.automem) {
+
+                        unsigned int size = anchura*altura;
+                        data = new TPixel[size];
+                        for (unsigned int i = 0; i < size; ++i) {
+                                data[i] = o.data[i];
+                        }
+                        automem = true;
+                } else {
+                        data = o.data;
+                        automem = false;
+                }
+                return *this;
+        }
+
+        inline void Fill(TPixel v)
+        {
+                for (int i = 0; i < this->size; ++i) {
+                        this->data[i] = v;
+                }
+        }
+
+        inline TPixel &Pixel(int x, int y)
+        {
+                return this->data[y * anchura + x];
+        }
+
+        inline const TPixel &Pixel(int x, int y) const
+        {
+                return this->data[y * anchura + x];
+        }
+};
+
+#ifndef UCHAR
+typedef unsigned char UCHAR;
+#endif
+
+#ifndef CHAR
+typedef char CHAR;
+#endif
+
+typedef struct UCHAR3 {
+        unsigned char v1, v2, v3;
+
+        UCHAR3() : v1(0), v2(0), v3(0)
+        { }
+
+        UCHAR3(unsigned char _v1, unsigned char _v2, unsigned char _v3) : v1(_v1), v2(_v2), v3(_v3)
+        { }
+} UCHAR3;
+
+
+typedef struct UCHAR4 {
+        unsigned char v1, v2, v3, v4;
+
+        UCHAR4() : v1(0), v2(0), v3(0), v4(0)
+        { }
+
+        UCHAR4(unsigned char _v1, unsigned char _v2, unsigned char _v3, unsigned char _v4) : v1(_v1), v2(_v2), v3(_v3), v4(_v4)
+        { }
+} UCHAR4;
+
+typedef struct FLOAT3 {
+        float v1, v2, v3;
+
+        FLOAT3() : v1(0.0f), v2(0.0f), v3(0.0f)
+        { }
+
+        FLOAT3(float _v1, float _v2, float _v3) : v1(_v1), v2(_v2), v3(_v3)
+        { }
+} FLOAT3;
+
+
+typedef struct FLOAT4 {
+        float v1, v2, v3, v4;
+
+        FLOAT4() : v1(0.0f), v2(0.0f), v3(0.0f), v4(0.0f)
+        { }
+
+        FLOAT4(float _v1, float _v2, float _v3, float _v4) : v1(_v1), v2(_v2), v3(_v3), v4(_v4)
+        { }
+} FLOAT4;
diff --git a/cadxcore/api/imodelohl7.cpp b/cadxcore/api/imodelohl7.cpp
new file mode 100644
index 0000000..684fe12
--- /dev/null
+++ b/cadxcore/api/imodelohl7.cpp
@@ -0,0 +1,320 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "imodelohl7.h"
+#include <cassert>
+
+std::string GIL::HL7::DefaultEscapeER7(const std::string& str)
+{
+        std::stringstream ss;
+        for (std::string::size_type i = 0; i < str.size(); i++) {
+                if (str[i] == '\\') {
+                        ss << "\\E\\";
+                } else if (str[i] == '|') {
+                        ss << "\\F\\";
+                } else if (str[i] == '~') {
+                        ss << "\\R\\";
+                } else if (str[i] == '^') {
+                        ss << "\\S\\";
+                } else if (str[i] == '&') {
+                        ss << "\\T\\";
+                } else {
+                        ss << str[i];
+                }
+        }
+        return ss.str();
+
+}
+
+GIL::HL7::Field& GIL::HL7::Segment::ParseField(size_t fieldNum, const std::string& record, bool unscape)
+{
+        Field& field = ( (*this) <<= Field(fieldNum, "", m_CS, m_ES, m_SCS) );
+        std::string::size_type l_loc = 0;
+        std::string::size_type c_loc = std::string::npos;
+
+        std::string::size_type start = std::string::npos;
+        std::string::size_type size  = std::string::npos;
+        bool cont = true;
+
+        size_t componentNum = 1;
+
+        while (cont) {
+                c_loc = record.find(m_CS, l_loc);
+                if (c_loc == std::string::npos) {
+                        start = l_loc;
+                        size  = c_loc;
+                        l_loc = std::string::npos;
+                        cont  = false;
+                } else {
+                        start = l_loc;
+                        size  = c_loc - l_loc;
+                        l_loc = c_loc + 1;
+                }
+
+                const std::string& value = ( unscape?UnEscapeER7(record.substr(start, size)) : record.substr(start, size) );
+                if (value.size() == 0) {
+                        field << Component(componentNum, "");
+                } else if (value == "\"\"") {
+                        field << Component(componentNum, "", "");
+                } else {
+                        field << Component(componentNum, "", value);
+                }
+                //std::cout << "{" << value << "}";
+                componentNum++;
+        }
+        return field;
+}
+
+const std::string GIL::HL7::Field::EscapeER7(const std::string& str) const
+{
+        std::stringstream ss;
+        for (std::string::size_type i = 0; i < str.size(); i++) {
+                if (str[i] == m_ES[0]) {
+                        ss << "\\E\\";
+                } else if (str[i] == m_CS[0]) {
+                        ss << "\\S\\";
+                } else if (str[i] == m_SCS[0]) {
+                        ss << "\\T\\";
+                } else {
+                        ss << str[i];
+                }
+        }
+        return ss.str();
+}
+
+const std::string GIL::HL7::Field::UnEscapeER7(const std::string& str) const
+{
+
+        if (str.size() < 3) {
+                return str;
+        }
+
+        std::stringstream ss;
+        const std::string::size_type size = str.size();
+        const std::string::size_type sizelimit = str.size() - 2;
+
+        bool skipNext = false;
+        bool printNext = false;
+
+        for (std::string::size_type i = 0; i < size; i++) {
+                if ( str[i] == '\\') {
+                        if (skipNext) {
+                                skipNext = false;
+                                if (printNext) {
+                                        ss << str[i];
+                                        printNext = false;
+                                }
+                        } else {
+                                skipNext = true;
+                                if (i < sizelimit) {
+                                        switch(str[i+1]) {
+                                        case 'E':
+                                                ss << m_ES;
+                                                i++;
+                                                break;
+                                        case 'S':
+                                                ss << m_CS;
+                                                i++;
+                                                break;
+                                        case 'T':
+                                                ss << m_SCS;
+                                                i++;
+                                                break;
+                                        default:
+                                                ss << str[i];
+                                                printNext = true;
+                                                break;
+                                        }
+                                } else {
+                                        assert(!printNext);
+                                }
+                        }
+                } else {
+                        ss << str[i];
+                }
+        }
+        return ss.str();
+}
+
+const std::string GIL::HL7::Segment::EscapeER7(const std::string& str) const
+{
+        std::stringstream ss;
+        for (std::string::size_type i = 0; i < str.size(); i++) {
+                if (str[i] == m_ES[0]) {
+                        ss << "\\E\\";
+                } else if (str[i] == m_FS[0]) {
+                        ss << "\\F\\";
+                } else if (str[i] == m_FRS[0]) {
+                        ss << "\\R\\";
+                } else if (str[i] == m_CS[0]) {
+                        ss << "\\S\\";
+                } else if (str[i] == m_SCS[0]) {
+                        ss << "\\T\\";
+                } else {
+                        ss << str[i];
+                }
+        }
+        return ss.str();
+}
+
+const std::string GIL::HL7::Segment::UnEscapeER7(const std::string& str) const
+{
+
+        if (str.size() < 3) {
+                return str;
+        }
+
+        std::stringstream ss;
+        const std::string::size_type size = str.size();
+        const std::string::size_type sizelimit = str.size() - 2;
+
+        bool skipNext = false;
+        bool printNext = false;
+
+        for (std::string::size_type i = 0; i < size; i++) {
+                if ( str[i] == '\\') {
+                        if (skipNext) {
+                                skipNext = false;
+                                if (printNext) {
+                                        ss << str[i];
+                                        printNext = false;
+                                }
+                        } else {
+                                skipNext = true;
+                                if (i < sizelimit) {
+                                        switch(str[i+1]) {
+                                        case 'E':
+                                                ss << m_ES;
+                                                i++;
+                                                break;
+                                        case 'F':
+                                                ss << m_FS;
+                                                i++;
+                                                break;
+                                        case 'R':
+                                                ss << m_FRS;
+                                                i++;
+                                                break;
+                                        case 'S':
+                                                ss << m_CS;
+                                                i++;
+                                                break;
+                                        case 'T':
+                                                ss << m_SCS;
+                                                i++;
+                                                break;
+                                        default:
+                                                ss << str[i];
+                                                printNext = true;
+                                                break;
+                                        }
+                                } else {
+                                        assert(!printNext);
+                                }
+                        }
+                } else {
+                        ss << str[i];
+                }
+        }
+        return ss.str();
+}
+
+const std::string GIL::HL7::Message::EscapeER7(const std::string& str) const
+{
+        std::stringstream ss;
+        for (std::string::size_type i = 0; i < str.size(); i++) {
+                if (str[i] == m_ES[0]) {
+                        ss << "\\E\\";
+                } else if (str[i] == m_FS[0]) {
+                        ss << "\\F\\";
+                } else if (str[i] == m_FRS[0]) {
+                        ss << "\\R\\";
+                } else if (str[i] == m_CS[0]) {
+                        ss << "\\S\\";
+                } else if (str[i] == m_SCS[0]) {
+                        ss << "\\T\\";
+                } else {
+                        ss << str[i];
+                }
+        }
+        return ss.str();
+}
+
+const std::string GIL::HL7::Message::UnEscapeER7(const std::string& str) const
+{
+
+        if (str.size() < 3) {
+                return str;
+        }
+
+        std::stringstream ss;
+        const std::string::size_type size = str.size();
+        const std::string::size_type sizelimit = str.size() - 2;
+
+        bool skipNext = false;
+        bool printNext = false;
+
+        for (std::string::size_type i = 0; i < size; i++) {
+                if ( str[i] == '\\') {
+                        if (skipNext) {
+                                skipNext = false;
+                                if (printNext) {
+                                        ss << str[i];
+                                        printNext = false;
+                                }
+                        } else {
+                                skipNext = true;
+                                if (i < sizelimit) {
+                                        switch(str[i+1]) {
+                                        case 'E':
+                                                ss << m_ES;
+                                                i++;
+                                                break;
+                                        case 'F':
+                                                ss << m_FS;
+                                                i++;
+                                                break;
+                                        case 'R':
+                                                ss << m_FRS;
+                                                i++;
+                                                break;
+                                        case 'S':
+                                                ss << m_CS;
+                                                i++;
+                                                break;
+                                        case 'T':
+                                                ss << m_SCS;
+                                                i++;
+                                                break;
+                                        default:
+                                                ss << str[i];
+                                                printNext = true;
+                                                break;
+                                        }
+                                } else {
+                                        assert(!printNext);
+                                }
+                        }
+                } else {
+                        ss << str[i];
+                }
+        }
+        return ss.str();
+}
diff --git a/cadxcore/api/imodelohl7.h b/cadxcore/api/imodelohl7.h
new file mode 100644
index 0000000..370b710
--- /dev/null
+++ b/cadxcore/api/imodelohl7.h
@@ -0,0 +1,989 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <list>
+#include <map>
+#include <sstream>
+
+#include <api/api.h>
+#include <api/globals.h>
+#include <api/iexception.h>
+
+#define RECORD_SEPARATOR "\x0D"
+
+namespace GIL
+{
+
+namespace HL7
+{
+
+std::string DefaultEscapeER7(const std::string& str);
+
+/* Este namespace contiene una implementación completa de mensajeria HL7 generica */
+
+class HL7Exception : public GNC::GCS::IException
+{
+public:
+        HL7Exception(const std::string& msg, const std::string& component="HL7", bool fatal = true) throw() : GNC::GCS::IException(msg ,component, fatal) {}
+};
+
+class HL7XMLException : public GNC::GCS::IException
+{
+public:
+        HL7XMLException(const std::string& msg, const std::string& component="XMLIntegration", bool fatal = true) throw() : GNC::GCS::IException(msg ,component, fatal) {}
+};
+
+namespace Util
+{
+inline std::list<std::string> split(const std::string& str, const std::string& separador)
+{
+        std::list<std::string> lista;
+        std::string::size_type start = 0;
+        std::string::size_type end = 0;
+
+        while ((end = str.find (separador, start)) != std::string::npos) {
+                lista.push_back (str.substr (start, end-start));
+                start = end + separador.size();
+        }
+        lista.push_back (str.substr (start));
+        return lista;
+}
+
+inline std::string tolower(const std::string& input_string)
+{
+        std::string str = input_string;
+
+        // iterate through all the characters.  If uppercase,
+        // convert to lowercase.
+        for (std::string::size_type i = 0 ; i < str.length() ; ++i)
+                if (isupper(str[i]) )
+                        str[i] |= 32;
+
+        return str;
+}
+}
+
+
+class Component
+{
+
+private:
+        size_t       m_Num;
+        std::string  m_Header;
+        std::string  m_Value;
+        bool         m_Null;
+
+public:
+        Component()
+        {
+                m_Num = 0;
+                m_Null = true;
+        }
+
+        Component(size_t num)
+        {
+                m_Num = num;
+                m_Null = true;
+        }
+
+        Component(size_t num, const std::string& header) : m_Num(num), m_Header(header), m_Null(true)
+        {
+        }
+
+        Component(size_t num, const std::string& header, const std::string& value) : m_Num(num), m_Header(header), m_Value(value), m_Null(false)
+        {
+        }
+
+        Component(const Component& otro)
+        {
+                *this = otro;
+        }
+
+        Component& operator=(const Component& otro)
+        {
+                m_Num    = otro.m_Num;
+                m_Header = otro.m_Header;
+                m_Value  = otro.m_Value;
+                m_Null  = otro.m_Null;
+                return *this;
+        }
+
+        Component& operator=(const std::string& valor)
+        {
+                m_Value = valor;
+                m_Null = false;
+                return *this;
+        }
+
+        bool operator==(const std::string& valor)
+        {
+                return m_Value == valor;
+        }
+
+        bool operator==(const char* valor)
+        {
+                return m_Value == valor;
+        }
+
+        operator const std::string& ()
+        {
+                return m_Value;
+        }
+
+        size_t GetNum() const
+        {
+                return m_Num;
+        }
+
+        const std::string& GetName() const
+        {
+                return m_Header;
+        }
+
+        const std::string& GetValue() const
+        {
+                return m_Value;
+        }
+
+        bool IsNull() const
+        {
+                return m_Null;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const Component& sf)
+        {
+                if (!sf.IsNull()) {
+                        if (sf.m_Value.size() == 0) {
+                                out << "\"\"";
+                        } else {
+                                out << sf.m_Value;
+                        }
+                }
+                return out;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const Component* sf)
+        {
+                out << *sf;
+                return out;
+        }
+};
+
+class Field : public std::map<size_t, Component>
+{
+
+private:
+        typedef std::map<size_t, Component> Base;
+
+protected:
+        size_t m_Num;
+        std::string  m_Header;
+        std::string  m_CS;       // component separator
+        std::string  m_ES;       // escape separator
+        std::string  m_SCS;      // subcomponent separator
+
+public:
+
+        Field()
+        {
+                m_Num = 0;
+        }
+
+        Field(size_t num, const std::string& header = "", const std::string& sfs ="^", const std::string& es = "\\", const std::string& cs = "&") : m_Num(num), m_Header(header), m_CS(sfs), m_ES(es), m_SCS(cs)
+        {
+        }
+
+        Field(const Field& otro):std::map<size_t, Component>(otro)
+        {
+                *this = otro;
+        }
+
+        Field& operator=(const Field& otro)
+        {
+                m_Num    = otro.m_Num;
+                m_Header = otro.m_Header;
+                m_CS     = otro.m_CS;
+                m_ES     = otro.m_ES;
+                m_SCS    = otro.m_SCS;
+                Base::operator = ((const Base&)otro);
+                return *this;
+        }
+
+        Field& operator<<(const Component& sf)
+        {
+                Field::operator[] (sf.GetNum()) = sf;
+                return *this;
+        }
+
+        Component GetComponent(size_t num) const
+        {
+                if (num == 0) {
+                        throw HL7Exception("Indice de componente invalido: 0", "MODEL");
+                }
+
+                const_iterator it;
+                for (it = begin(); it != end(); ++it) {
+                        size_t numComponent = (*it).first;
+                        if (numComponent == num) {
+                                const Component& c = (*it).second;
+                                return Component(c);
+                        }
+                }
+                return Component(num, "");
+        }
+
+        const std::string& GetSFS() const
+        {
+                return m_CS;
+        }
+
+        void SetSFS(const std::string& sfs)
+        {
+                m_CS = sfs;
+        }
+
+        size_t GetNum() const
+        {
+                return m_Num;
+        }
+
+        const std::string& GetName() const
+        {
+                return m_Header;
+        }
+
+        Component& operator[](size_t indice)
+        {
+                if (indice == 0) {
+                        throw HL7Exception("Indice de sub-campo invalido: 0", "MODEL");
+                }
+
+                Base& t = *this;
+
+                size_t numLast = size();
+
+                if ( indice > numLast) {
+                        for (size_t i = numLast + 1; i <= indice; i++) {
+                                t[i] = Component(i);
+                        }
+                }
+
+                return t[indice];
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const Field& f)
+        {
+                bool first = true;
+                for(Field::const_iterator it= f.begin(); it != f.end(); ++it) {
+                        if (first) {
+                                first = false;
+                                out << (*it).second;
+                        } else {
+                                out << f.m_CS << (*it).second;
+                        }
+                }
+                return out;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const Field* f)
+        {
+                return out << *f;
+        }
+
+        const std::string EscapeER7(const std::string& str) const;
+        const std::string UnEscapeER7(const std::string& str) const;
+};
+
+class Segment : protected std::map<size_t, std::list<Field> >
+{
+
+private:
+        typedef std::map<size_t, std::list<Field> > Base;
+
+protected:
+        std::string m_Header;
+        std::string m_RS;
+        std::string m_FS;
+        std::string m_CS;
+        std::string m_FRS;
+        std::string m_ES;
+        std::string m_SCS;
+
+public:
+
+        Segment()
+        {
+        }
+
+        Segment(const std::string& header, const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs = "^", const std::string& frs = "~", const std::string& es = "\\", const std::string& cs = "&" ) : m_Header(header), m_RS(rs), m_FS(fs), m_CS(sfs), m_FRS(frs), m_ES(es), m_SCS(cs)
+        {
+        }
+
+        Segment(const Segment& otro):std::map<size_t, std::list<Field> >(otro)
+        {
+                *this = otro;
+        }
+
+        Segment& operator=(const Segment& otro)
+        {
+                m_Header       = otro.m_Header;
+                m_RS           = otro.m_RS;
+                m_FS           = otro.m_FS;
+                m_CS           = otro.m_CS;
+                m_FRS          = otro.m_FRS;
+                m_ES           = otro.m_ES;
+                m_SCS          = otro.m_SCS;
+                Base::operator = ((const Base&)otro);
+                return *this;
+        }
+
+        Field& operator<<=(const Field& f)
+        {
+                size_t indice = f.GetNum();
+
+                if (indice == 0) {
+                        throw HL7Exception("Indice de campo invalido: 0", "MODEL");
+                }
+
+                Base& t = *this;
+
+                size_t numLast = size();
+
+                if ( indice > numLast) {
+                        for (size_t i = numLast + 1; i < indice; i++) {
+                                t[i] = std::list<Field>();
+                                t[i].push_back(Field(i));
+                        }
+                }
+
+                t[indice].clear();
+                t[indice].push_back(f);
+                return t[indice].back();
+        }
+
+        Field& operator<<(const Field& f)
+        {
+                size_t indice = f.GetNum();
+
+                if (indice == 0) {
+                        throw HL7Exception("Indice de campo invalido: 0", "MODEL");
+                }
+
+                Base& t = *this;
+
+                size_t numLast = size();
+
+                if ( indice > numLast) {
+                        for (size_t i = numLast + 1; i < indice; i++) {
+                                t[i] = std::list<Field>();
+                                t[i].push_back(Field(i));
+                        }
+                }
+
+                t[indice].push_back(f);
+                return t[indice].back();
+        }
+
+        Field GetField(size_t num, size_t repnum = 1) const
+        {
+                if (num == 0) {
+                        throw HL7Exception("Indice de campo invalido: 0", "MODEL");
+                }
+                if (repnum == 0) {
+                        throw HL7Exception("Indice de repeticion de campo invalido: 0", "MODEL");
+                }
+
+                const_iterator it;
+                size_type i;
+                for (it = begin(), i = 1; it != end(); ++it, i++) {
+                        if (i == num) {
+                                const std::list<Field>& fl = (*it).second;
+                                std::list<Field>::const_iterator itr = fl.begin();
+                                if (itr != fl.end()) {
+                                        return Field(*itr);
+                                } else {
+                                        return Field(num, "", m_RS, m_FS, m_CS);
+                                }
+                        }
+                }
+                return Field(num, "", m_RS, m_FS, m_CS);
+        }
+
+        const std::string& GetSFS() const
+        {
+                return m_CS;
+        }
+
+        void SetSFS(const std::string& sfs)
+        {
+                m_CS = sfs;
+        }
+
+        const std::string& GetName() const
+        {
+                return m_Header;
+        }
+
+        Field& operator[](size_t indice)
+        {
+                if (indice == 0) {
+                        throw HL7Exception("Indice de campo invalido: 0", "MODEL");
+                }
+
+                Base& t = *this;
+
+                size_t numLast = size();
+
+                if ( indice > numLast) {
+                        for (size_t i = numLast + 1; i <= indice; i++) {
+                                t[i] = std::list<Field>();
+                                t[i].push_back(Field(i));
+                        }
+                }
+                return t[indice].front();
+        }
+
+        Field& RepeatedField(size_t indiceCampo, size_t indiceRepeticion)
+        {
+                if (indiceCampo == 0) {
+                        throw HL7Exception("Indice de campo invalido: 0", "MODEL");
+                }
+                if (indiceRepeticion == 0) {
+                        throw HL7Exception("Indice de repeticion de campo invalido: 0", "MODEL");
+                }
+
+                Base& t = *this;
+
+                size_t numLast = size();
+
+                if ( indiceCampo > numLast) {
+                        for (size_t i = numLast + 1; i <= indiceCampo; i++) {
+                                t[i] = std::list<Field>();
+                                t[i].push_back(Field(i));
+                        }
+                }
+
+                std::list<Field>& fields = t[indiceCampo];
+                numLast = fields.size();
+
+                if ( indiceRepeticion > numLast) {
+                        for (size_t i = numLast + 1; i <= indiceRepeticion; i++) {
+                                fields.push_back(Field(i));
+                        }
+                }
+
+                std::list<Field>::iterator it;
+                size_t i;
+
+                for (i = 1, it = fields.begin(); it != fields.end() && i != indiceRepeticion; ++it, i++);
+
+                if ( it == fields.end() || i != indiceRepeticion) {
+                        throw HL7Exception("Error al localizar el indice de repeticion", "MODEL");
+                }
+
+                return *it;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const Segment& s)
+        {
+                out << s.GetName();
+                size_t i = 1;
+
+                if (s.m_Header == "MSH") {
+                        bool firstField = true;
+                        for(Segment::const_iterator it = s.begin(); it != s.end(); ++it, i++) {
+                                if (firstField) {
+                                        firstField = false;
+                                } else {
+                                        bool fieldRepeated = false;
+                                        for (std::list<Field>::const_iterator it2 = (*it).second.begin(); it2 != (*it).second.end(); ++it2) {
+                                                if (fieldRepeated) {
+                                                        out << "~" << (*it2);
+                                                } else {
+                                                        out << s.m_FS <<  (*it2);
+                                                        fieldRepeated = true;
+                                                }
+                                        }
+                                }
+                        }
+                } else {
+                        for(Segment::const_iterator it = s.begin(); it != s.end(); ++it, i++) {
+                                bool fieldRepeated = false;
+                                for (std::list<Field>::const_iterator it2 = (*it).second.begin(); it2 != (*it).second.end(); ++it2) {
+                                        if (fieldRepeated) {
+                                                out << "~" << (*it2);
+                                        } else {
+                                                out << s.m_FS <<  (*it2);
+                                                fieldRepeated = true;
+                                        }
+                                }
+                        }
+                }
+                out << s.m_RS;
+                return out;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const Segment* s)
+        {
+                return out << *s;
+        }
+
+        EXTAPI Field& ParseField (size_t fieldNum, const std::string& record, bool unscape = true);
+
+        EXTAPI const std::string EscapeER7(const std::string& str) const;
+        EXTAPI const std::string UnEscapeER7(const std::string& str) const;
+
+};
+
+class Message : public std::list<Segment>
+{
+
+private:
+
+        typedef std::list<Segment> Base;
+        std::string m_Header;  // message header
+        std::string m_RS;      // record separator
+        std::string m_FS;      // (|) Field separator
+        std::string m_CS;      // (^) Component separator
+        std::string m_FRS;     // (~) Field repeat separator
+        std::string m_ES;      // (\) Escape separator
+        std::string m_SCS;     // (&) SubComponent separator
+
+public:
+
+        Message(const std::string& header = "", const std::string& rs = RECORD_SEPARATOR, const std::string& fs = "|", const std::string& sfs ="^") : m_Header(header), m_RS(rs), m_FS(fs), m_CS(sfs)
+        {
+        }
+
+        Message(const Message& otro):std::list<Segment>(otro)
+        {
+                *this = otro;
+        }
+
+        Message& operator=(const Message& otro)
+        {
+                m_FRS          = otro.m_FRS;
+                m_ES           = otro.m_ES;
+                m_SCS          = otro.m_SCS;
+                m_Header       = otro.m_Header;
+                m_RS           = otro.m_RS;
+                m_FS           = otro.m_FS;
+                m_CS           = otro.m_CS;
+                Base::operator = ((const Base&)otro);
+                return *this;
+        }
+
+        static Message FromER7(const std::string& msgStr)
+        {
+                Message msg;
+                msg.LoadFromER7(msgStr);
+                return msg;
+        }
+
+        void LoadFromXML(const std::string& /*msgStr*/)
+        {
+        }
+
+        void LoadFromER7(const std::string& msgStr)
+        {
+                Clear();
+
+                std::list<std::string> records;
+
+                std::string::size_type l_loc = 0; // Last Location
+                std::string::size_type c_loc = std::string::npos; // Current Location
+                bool cont = true;
+
+                while(cont) {
+                        c_loc = msgStr.find(RECORD_SEPARATOR, l_loc);
+                        if (c_loc == std::string::npos) {
+                                const std::string& record = msgStr.substr(l_loc);
+                                if (record.size() > 0) {
+                                        records.push_back(record);
+                                }
+                                cont = false;
+                        } else {
+                                const std::string& record = msgStr.substr(l_loc, c_loc - l_loc);
+                                if (record.size() > 0) {
+                                        records.push_back(record);
+                                }
+                                l_loc = c_loc + 1;
+                        }
+                }
+
+                if (records.empty()) {
+                        throw HL7Exception(std::string("Error al interpretar la cabecera del mensaje no se han encontrado registros"));
+                }
+                std::list<std::string>::iterator itr = records.begin();
+                std::string& mshrecord = *itr;
+
+                Message& msg = *this;
+
+                if (mshrecord.size() >= 8 && mshrecord[0] == 'M' && mshrecord[1] == 'S' && mshrecord[2] == 'H') {
+                        m_FS  = mshrecord[3];
+                        m_CS  = mshrecord[4];
+                        m_FRS = mshrecord[5];
+                        m_ES  = mshrecord[6];
+                        m_SCS = mshrecord[7];
+
+                        Segment& segment = (msg << Segment("MSH", m_RS, m_FS, m_CS, m_FRS, m_ES, m_SCS));
+                        segment << Field(1, "MSH.1") << Component(1, "", m_FS);
+                        segment << Field(2, "MSH.2") << Component(1, "", m_CS + m_FRS + m_ES + m_SCS);
+
+                        ParseER7Segment(segment, mshrecord, 9, 3);
+
+                } else {
+                        throw HL7Exception(std::string("Error al interpretar la cabecera del mensaje: ") + mshrecord.substr(0,8));
+                }
+
+                for (itr++; itr != records.end(); ++itr) {
+
+                        std::string& record = *itr;
+                        //std::cout << "Parsing Record: [" << record << "]" << std::endl;
+
+                        Segment& segment = (msg << Segment(record.substr(0,record.find(m_FS, 0)), m_RS, m_FS, m_CS, m_FRS, m_ES, m_SCS));
+                        ParseER7Segment(segment, record, 4);
+                }
+        }
+
+private:
+
+        void ParseER7Segment(Segment& segment, const std::string& record, std::string::size_type offsetFirstField=5, int numFirstField=1)
+        {
+                std::string::size_type l_loc = offsetFirstField;
+                std::string::size_type c_loc = std::string::npos;
+
+                std::string::size_type start = std::string::npos;
+                std::string::size_type size = std::string::npos;
+                bool cont = true;
+
+                size_t fieldNum = numFirstField;
+
+                //std::cout << "Record = [" << record << "]" << std::endl;
+
+                if (offsetFirstField >= record.size()) {
+                        return;
+                }
+
+                while (cont) {
+
+                        c_loc = record.find(m_FS, l_loc);
+                        if (c_loc == std::string::npos) {
+                                start = l_loc;
+                                size  = std::string::npos;
+                                cont  = false;
+                        } else {
+                                start = l_loc;
+                                size  = c_loc - l_loc;
+                                l_loc = c_loc + 1;
+                        }
+
+                        const std::string& str = record.substr(start, size);
+
+                        //std::cout << "Field " << fieldNum << " = [" << str << "] ";
+
+                        // Repeticion de campos.
+
+                        std::string::size_type l_locfr = 0;
+                        std::string::size_type c_locfr = std::string::npos;
+
+                        std::string::size_type startfr = std::string::npos;
+                        std::string::size_type endfr = std::string::npos;
+                        bool contfr = true;
+
+                        while (contfr) {
+                                c_locfr = str.find(m_FRS, l_locfr);
+                                if (c_locfr == std::string::npos) {
+                                        startfr = l_locfr;
+                                        endfr = c_locfr;
+                                        l_locfr = std::string::npos;
+                                        contfr = false;
+                                } else {
+                                        startfr = l_locfr;
+                                        endfr = c_locfr - l_locfr;
+                                        l_locfr = c_locfr + 1;
+                                }
+
+                                segment.ParseField(fieldNum, str.substr(startfr, endfr));
+
+                        }
+
+                        //std::cout << std::endl;
+
+                        fieldNum++;
+                }
+        }
+
+public:
+
+        EXTAPI const std::string EscapeER7(const std::string& str) const;
+        EXTAPI const std::string UnEscapeER7(const std::string& str) const;
+
+        void Clear()
+        {
+                Base::clear();
+        }
+
+        Segment& operator<<(const Segment& s)
+        {
+                push_back(s);
+                return back();
+        }
+
+        /* Devuelve el primer mensaje encontrado con la cabecera parametrizada. */
+        Segment& operator[] (const std::string& key)
+        {
+                return Segments(key, 1);
+        }
+
+        /* Devuelve el num-avo mensaje encontrado con la cabecera parametrizada. */
+        Segment& Segments(const std::string& key, size_t num)
+        {
+                if (num == 0) {
+                        throw HL7Exception("Indice de segmento invalido: 0", "MODEL");
+                }
+
+                iterator it;
+                size_type i;
+                for (it = begin(), i = num; it != end()  && i > 0; ++it) {
+                        Segment& s = *it;
+                        if (s.GetName() == key) {
+                                --i;
+                        }
+                        if (i == 0) {
+                                return s;
+                        }
+                }
+                return (*this) << Segment(key, m_RS, m_FS, m_CS);
+        }
+
+        Segment GetSegment(const std::string& key, size_t num = 1) const
+        {
+                if (num == 0) {
+                        throw HL7Exception("Indice de segmento invalido: 0", "MODEL");
+                }
+
+                const_iterator it;
+                size_type i;
+                for (it = begin(), i = num; it != end() && i > 0; ++it) {
+                        const Segment& s = *it;
+                        if (s.GetName() == key) {
+                                --i;
+                        }
+                        if (i == 0) {
+                                return Segment(s);
+                        }
+                }
+                return Segment(key, m_RS, m_FS, m_CS);
+        }
+
+        void SetHeader(const std::string& header)
+        {
+                m_Header = header;
+        }
+
+        const std::string& GetHeader()
+        {
+                return m_Header;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const Message& m)
+        {
+                for(Message::const_iterator it = m.begin(); it != m.end(); ++it) {
+                        out << *it;
+                }
+                return out;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const Message* m)
+        {
+                return out << *m;
+        }
+
+public:
+        typedef enum ErrorCode {
+                EC_MessageAccepted          = 0,
+                EC_SegmentSequenceError     = 100,
+                EC_RequiredFieldMissing     = 101,
+                EC_DataTypeError            = 102,
+                EC_TableValueNotFound       = 103,
+                EC_UnsuportedMessageType    = 200,
+                EC_UnsuportedProcessingId   = 201,
+                EC_UnsupportedEventCode     = 202,
+                EC_UnsupportedVersionId     = 203,
+                EC_UnknownKeyIdentifier     = 204,
+                EC_DupplicateKeyIdentifier  = 205,
+                EC_ApplicationRecordLocked  = 206,
+                EC_ApplicationInternalError = 207
+        } ErrorCode;
+
+        static const std::string GetErrorCodeDescription(ErrorCode errorCode)
+        {
+                std::stringstream ss;
+                ss << errorCode << ": ";
+
+                switch (errorCode) {
+                case EC_MessageAccepted:
+                        ss << "Mensaje aceptado";
+                        break;
+                case EC_SegmentSequenceError:
+                        ss << "Error en la secuencia del segmento";
+                        break;
+                case EC_RequiredFieldMissing:
+                        ss << "Campo requerido inexistente";
+                        break;
+                case EC_DataTypeError:
+                        ss << "Error en el tipo de dato";
+                        break;
+                case EC_TableValueNotFound:
+                        ss << "Valor de la tabla no encontrado";
+                        break;
+                case EC_UnsuportedMessageType:
+                        ss << "Tipo de mensaje no soportado";
+                        break;
+                case EC_UnsuportedProcessingId:
+                        ss << "Id de procesamiento no soportado";
+                        break;
+                case EC_UnsupportedEventCode:
+                        ss << "Codigo de evento no soportado";
+                        break;
+                case EC_UnsupportedVersionId:
+                        ss << "Id de version no soportado";
+                        break;
+                case EC_UnknownKeyIdentifier:
+                        ss << "Identificador desconocido";
+                        break;
+                case EC_DupplicateKeyIdentifier:
+                        ss << "Identificador clave duplicado";
+                        break;
+                case EC_ApplicationRecordLocked:
+                        ss << "Registro de la aplicacion bloqueado";
+                        break;
+                case EC_ApplicationInternalError:
+                        ss << "Error interno de la aplicacion";
+                        break;
+                default:
+                        ss << "Codigo invalido";
+                        break;
+                }
+                return ss.str();
+        }
+
+        static const std::string GetErrorCodeAsString(ErrorCode errorCode)
+        {
+                std::stringstream ss;
+                ss << errorCode;
+                std::string errorCodeString = ss.str();
+
+                switch (errorCode) {
+                case EC_MessageAccepted:
+                case EC_SegmentSequenceError:
+                case EC_RequiredFieldMissing:
+                case EC_DataTypeError:
+                case EC_TableValueNotFound:
+                case EC_UnsuportedMessageType:
+                case EC_UnsuportedProcessingId:
+                case EC_UnsupportedEventCode:
+                case EC_UnsupportedVersionId:
+                case EC_UnknownKeyIdentifier:
+                case EC_DupplicateKeyIdentifier:
+                case EC_ApplicationRecordLocked:
+                case EC_ApplicationInternalError:
+                        return errorCodeString;
+                default:
+                        throw HL7Exception(std::string("[Error Code] invalido: ") + errorCodeString, "MODEL/LOGIC");
+                }
+        }
+
+        static ErrorCode GetErrorCodeFromErrorCodeAsString(const std::string& errorCodeString)
+        {
+                if (errorCodeString == "0") {
+                        return EC_MessageAccepted;
+                } else if (errorCodeString == "100") {
+                        return EC_SegmentSequenceError;
+                } else if (errorCodeString == "101") {
+                        return EC_RequiredFieldMissing;
+                } else if (errorCodeString == "102") {
+                        return EC_DataTypeError;
+                } else if (errorCodeString == "103") {
+                        return EC_TableValueNotFound;
+                } else if (errorCodeString == "200") {
+                        return EC_UnsuportedMessageType;
+                } else if (errorCodeString == "201") {
+                        return EC_UnsuportedProcessingId;
+                } else if (errorCodeString == "202") {
+                        return EC_UnsupportedEventCode;
+                } else if (errorCodeString == "203") {
+                        return EC_UnsupportedVersionId;
+                } else if (errorCodeString == "204") {
+                        return EC_UnknownKeyIdentifier;
+                } else if (errorCodeString == "205") {
+                        return EC_DupplicateKeyIdentifier;
+                } else if (errorCodeString == "206") {
+                        return EC_ApplicationRecordLocked;
+                } else if (errorCodeString == "207") {
+                        return EC_ApplicationInternalError;
+                } else {
+                        throw HL7Exception(std::string("[Error Code] invalido: ") + errorCodeString, "MODEL/LOGIC");
+                }
+        }
+
+        typedef enum ErrorSeverity {
+                ES_Warning     = 0,
+                ES_Information = 1,
+                ES_Error       = 2
+        } ErrorSeverity;
+
+        static const char* GetErrorSeverityString(ErrorSeverity es)
+        {
+                switch (es) {
+                case ES_Information:
+                        return "I";
+                        break;
+                case ES_Error:
+                        return "E";
+                        break;
+                case ES_Warning:
+                        return "W";
+                default: {
+                        std::stringstream ss;
+                        ss << es;
+                        throw HL7Exception(std::string("[Error Severity] invalido: ") + ss.str(), "MODEL/LOGIC");
+                }
+                }
+        }
+
+        static ErrorSeverity GetErrorSeverityFromString(const std::string& ess)
+        {
+                if (ess == "I") {
+                        return ES_Information;
+                } else if (ess == "E") {
+                        return ES_Error;
+                } else if (ess == "W") {
+                        return ES_Warning;
+                } else {
+                        throw HL7Exception(std::string("[Error Severity String] invalida: ") + ess, "MODEL/LOGIC");
+                }
+        }
+};
+}
+}
diff --git a/cadxcore/api/imodelointegracion.cpp b/cadxcore/api/imodelointegracion.cpp
new file mode 100644
index 0000000..8ddcc79
--- /dev/null
+++ b/cadxcore/api/imodelointegracion.cpp
@@ -0,0 +1,88 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "imodelointegracion.h"
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/configurationcontroller.h>
+
+std::string GIL::IMapOfVarsModel::empty;
+
+namespace GIL
+{
+bool IMapOfVarsModel::InsertVariable(const std::string& key, const std::string& value, const std::string& description)
+{
+        if (find(key) != end()) {
+                LOG_DEBUG("IMapOfVarsModel", "you are trying to replace variable " << key << " with value " << value);
+                (*this)[key] = IVariableModel(key, value, description);
+                return false;
+        } else {
+                (*this)[key] = IVariableModel(key, value, description);
+                return true;
+        }
+}
+
+const std::string& IMapOfVarsModel::GetValue(const std::string& key) const
+{
+        const_iterator it = find(key);
+        if (it == end()) {
+                LOG_WARN("IMapOfVarsModel", "you are trying to get a variable " << key << " that doesn't esists");
+                return empty;
+        } else {
+                return (*it).second.GetValue();
+        }
+}
+
+const std::string& IMapOfVarsModel::GetDescription(const std::string& key) const
+{
+        const_iterator it = find(key);
+        if (it == end()) {
+                LOG_WARN("IMapOfVarsModel", "you are trying to get a variable " << key << " that doesn't esists");
+                return empty;
+        } else {
+                return (*it).second.GetDescription();
+        }
+}
+
+bool IMapOfVarsModel::Contains(const std::string& key) const
+{
+        return find(key) != end();
+}
+
+bool IMapOfVarsModel::IsEmpty()
+{
+        return (*this).size() == 0;
+}
+
+IMapOfVarsModel::TMapOfVarsModelIterator IMapOfVarsModel::Begin()
+{
+        return (*this).begin();
+}
+
+IMapOfVarsModel::TMapOfVarsModelIterator IMapOfVarsModel::End()
+{
+        return (*this).end();
+}
+
+IModeloIntegracion::IModeloIntegracion()
+{
+        accion      = TA_Ninguna;
+        atendido = false;
+}
+}
diff --git a/cadxcore/api/imodelointegracion.h b/cadxcore/api/imodelointegracion.h
new file mode 100644
index 0000000..491a3f2
--- /dev/null
+++ b/cadxcore/api/imodelointegracion.h
@@ -0,0 +1,280 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+#include <sstream>
+#include <api/api.h>
+#include <api/dicom/idicom.h>
+#include <api/autoptr.h>
+
+namespace GIL
+{
+class EXTAPI IModeloPACSServer
+{
+public:
+
+        typedef enum IMPS_Method {
+                IMPS_GET,
+                IMPS_MOVE,
+                IMPS_WADO
+        } IMPS_Method;
+
+        std::string sid;
+        std::string AET;
+        std::string hostname;
+        std::string puerto;
+        std::string pdu;
+        std::string retrieveLevel;
+        bool        tls;
+        bool        verify;
+        IMPS_Method metodo;
+        std::string cert;
+        std::string key;
+        std::string user;
+        std::string password;
+        std::string wadoURI;
+        std::string defaultCharset;
+
+        IModeloPACSServer()
+        {
+                this->tls = false;
+                this->verify = false;
+                this->metodo = IMPS_GET;
+                user=password = "";
+        }
+
+        IModeloPACSServer(const IModeloPACSServer& otro) = default;
+
+
+        IModeloPACSServer(const std::string& sid, const std::string& AET, const std::string& hostname, const std::string& puerto, const std::string& pdu, IMPS_Method metodo, const std::string& retrieveLevel = "SERIES", bool tls = false, bool verify = false, const std::string& cert = "", const std::string& key = "", const std::string& defaultCharset = "ISO_IR 192")
+        {
+                this->sid      = sid;
+                this->AET      = AET;
+                this->hostname = hostname;
+                this->puerto   = puerto;
+                this->pdu      = pdu;
+                this->tls      = tls;
+                this->verify   = verify;
+                this->metodo   = metodo;
+                this->retrieveLevel = retrieveLevel;
+                this->cert     = cert;
+                this->key      = key;
+                this->defaultCharset = defaultCharset;
+        }
+
+        IModeloPACSServer& operator=(const IModeloPACSServer& otro) = default;
+
+};
+
+class EXTAPI IVariableModel
+{
+public:
+        std::string key;
+        std::string value;
+        std::string description;
+
+        IVariableModel()
+        {
+        }
+
+        IVariableModel(const std::string& key, const std::string& value, const std::string& description = "")
+        {
+                this->key					= key;
+                this->value					= value;
+                this->description       = description;
+        }
+
+        IVariableModel( const IVariableModel& o)
+        {
+                (*this) = o;
+        }
+
+        IVariableModel& operator=(const IVariableModel& otro)
+        {
+                this->key					= otro.key;
+                this->value					= otro.value;
+                this->description       = otro.description;
+                return *this;
+        }
+
+        const std::string& GetKey() const
+        {
+                return this->key;
+        }
+
+        const std::string& GetValue() const
+        {
+                return this->value;
+        }
+
+        const std::string& GetDescription() const
+        {
+                return this->description;
+        }
+
+};
+
+class EXTAPI IMapOfVarsModel: protected std::map<std::string, IVariableModel>
+{
+public:
+        static std::string empty;
+        typedef std::map<std::string, IVariableModel>::iterator TMapOfVarsModelIterator;
+        IMapOfVarsModel() {}
+        ~IMapOfVarsModel() {}
+
+        bool InsertVariable (const std::string& key, const std::string& value, const std::string& description = "");
+        const std::string& GetValue(const std::string& key) const;
+        const std::string& GetDescription(const std::string& key) const;
+        bool Contains(const std::string& key) const;
+        bool IsEmpty();
+        TMapOfVarsModelIterator Begin();
+        TMapOfVarsModelIterator End();
+
+};
+
+class EXTAPI IImageModel
+{
+public:
+        IImageModel() {}
+        ~IImageModel() {}
+
+        IImageModel( const IImageModel& o)
+        {
+                (*this) = o;
+        }
+
+        IImageModel& operator=(const IImageModel& otro)
+        {
+                this->MapOfVars					= otro.MapOfVars;
+                return *this;
+        }
+
+        IMapOfVarsModel MapOfVars;
+};
+
+class EXTAPI ISeriesModel
+{
+public:
+        typedef std::list<IImageModel> TListOfImages;
+        ISeriesModel() {}
+        ~ISeriesModel() {}
+
+        ISeriesModel( const ISeriesModel& o)
+        {
+                (*this) = o;
+        }
+
+        ISeriesModel& operator=(const ISeriesModel& otro)
+        {
+                this->Images					= otro.Images;
+                this->MapOfVars					= otro.MapOfVars;
+                return *this;
+        }
+
+        TListOfImages	Images;
+        IMapOfVarsModel MapOfVars;
+};
+
+class EXTAPI IStudyModel
+{
+public:
+        typedef std::list<ISeriesModel> TListOfSeries;
+
+        IStudyModel() {}
+        ~IStudyModel() {}
+
+        IStudyModel( const IStudyModel& o)
+        {
+                (*this) = o;
+        }
+
+        IStudyModel& operator=(const IStudyModel& otro)
+        {
+                this->Series					= otro.Series;
+                this->MapOfVars					= otro.MapOfVars;
+                return *this;
+        }
+
+        TListOfSeries	Series;
+        IMapOfVarsModel MapOfVars;
+};
+
+class EXTAPI IModeloIntegracion
+{
+public:
+        typedef std::list<std::string> ListOfPaths;
+        typedef std::list<IStudyModel> TListOfStudies;
+
+        typedef enum TipoAccion {
+                TA_Ninguna,
+                TA_Dicomizar,
+                TA_Obtener,
+                TA_Imprimir,
+                TA_Open
+        } TipoAccion;
+
+
+        GIL::DICOM::DicomDataset TagsDICOMOverwrite;
+        IMapOfVarsModel GlobalVariables;
+        TListOfStudies  Studies;
+
+        ListOfPaths			Files;
+
+        std::string       idPlantilla;
+        TipoAccion        accion;
+
+        std::string       rawXmlData;
+        std::string       messageTemplate;
+
+        bool              atendido;
+
+        IModeloIntegracion();
+
+        IModeloIntegracion(const IModeloIntegracion& otro)
+        {
+                *this = otro;
+        }
+
+        ~IModeloIntegracion()
+        {
+
+        }
+
+        IModeloIntegracion& operator=(const IModeloIntegracion& otro)
+        {
+                this->TagsDICOMOverwrite             = otro.TagsDICOMOverwrite;
+                this->GlobalVariables           = otro.GlobalVariables;
+                this->Studies                = otro.Studies;
+                this->Files          = otro.Files;
+                this->idPlantilla         = otro.idPlantilla;
+                this->accion = otro.accion;
+                this->rawXmlData   = otro.rawXmlData;
+                this->atendido      = otro.atendido;
+                this->messageTemplate = otro.messageTemplate;
+
+                return *this;
+        }
+};
+
+typedef std::list< GNC::GCS::Ptr<GIL::IModeloIntegracion> > IntegrationModelList;
+}
+
diff --git a/cadxcore/api/imodulo.h b/cadxcore/api/imodulo.h
new file mode 100644
index 0000000..75e3e5f
--- /dev/null
+++ b/cadxcore/api/imodulo.h
@@ -0,0 +1,60 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+namespace GNC
+{
+namespace GCS
+{
+class IModuleController;
+}
+}
+
+#ifdef __WXMSW__
+#ifdef MAKING_MODULES
+#define PRVEXT_API _declspec(dllexport)
+#define MODULO_API _declspec(dllexport) GNC::GCS::IModuleController*
+#else // USING_MODULES
+#define PRVEXT_API _declspec(dllimport)
+#define MODULO_API _declspec(dllimport) GNC::GCS::IModuleController*
+//typedef GNC::GCS::IModuleController* (__cdecl* MODULO_ENTRY_POINT)(wxWindow* handle, GNC::GCS::IEntorno* pEntorno);
+#endif
+#elif defined(__WXMAC__)
+#ifdef MAKING_MODULES
+#define PRVEXT_API __attribute__((visibility("default")))
+#define MODULO_API __attribute__((visibility("default"))) GNC::GCS::IModuleController*
+#else // USING_MODULES
+#define PRVEXT_API
+#define MODULO_API GNC::GCS::IModuleController*
+typedef GNC::GCS::IModuleController* (*MODULO_ENTRY_POINT)(WXHWND handle);
+#endif
+#else
+#ifdef MAKING_MODULES
+#define PRVEXT_API __attribute__((visibility("default")))
+#define MODULO_API __attribute__((visibility("default"))) GNC::GCS::IModuleController*
+#else // USING_MODULES
+#define PRVEXT_API
+#define MODULO_API GNC::GCS::IModuleController*
+//typedef GNC::GCS::IModuleController* (*MODULO_ENTRY_POINT)(void* handle);
+#endif
+#endif
+
+
+#define MODULO_ENTRY_POINT_NAME "init"
diff --git a/cadxcore/api/init.cpp b/cadxcore/api/init.cpp
new file mode 100644
index 0000000..d18f05e
--- /dev/null
+++ b/cadxcore/api/init.cpp
@@ -0,0 +1,61 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "init.h"
+#include "initwx.h"
+
+#if defined(GINKGO_PRO)
+#include <lib_test.h>
+#include <cstring>
+#endif
+
+#include <iostream>
+
+#if defined(_WIN32)
+int EXTAPI Init(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{
+        return InitWX(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
+}
+#else
+int EXTAPI Init(int argc, char** argv)
+{
+#if defined(GINKGO_PRO)
+        bool unitTest = false;
+
+        for( int i = 1; i < argc; i++ ) {
+                if (std::strcmp(argv[i], "-unittest") == 0) {
+                        unitTest = true;
+                }
+        }
+
+        for( int i = 0; i < argc; i++) {
+                GlobalFree(argv[i]);
+        }
+        GlobalFree(argv);
+
+        if (unitTest) {
+                return InitTest();
+        }
+#endif
+        std::cout << "calling InitWX(argc, argv);\n";
+        return InitWX(argc, argv);
+}
+#endif
diff --git a/cadxcore/api/init.h b/cadxcore/api/init.h
new file mode 100644
index 0000000..0cb9975
--- /dev/null
+++ b/cadxcore/api/init.h
@@ -0,0 +1,33 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <string>
+#include "doxmainpage.h"
+#include <api/api.h>
+
+#if defined(_WINDOWS)
+#define _WINSOCKAPI_
+#include <windows.h>
+int EXTAPI Init(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow);
+#else
+int EXTAPI Init(int argc, char** argv);
+#endif
+
diff --git a/cadxcore/api/initwx.cpp b/cadxcore/api/initwx.cpp
new file mode 100644
index 0000000..cbb2861
--- /dev/null
+++ b/cadxcore/api/initwx.cpp
@@ -0,0 +1,761 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#define SINGLE_INSTANCE
+#if defined (_WIN32) && defined (_GINKGO_DEBUG)
+#include <cairo/cairo.h>
+#if defined _GINKGO_CHECK_LEAKS
+#define _CRTDBG_MAP_ALLOC
+#include <stdlib.h>
+#include <crtdbg.h>
+#endif
+#endif
+
+#include <cctype>
+#include <string>
+#include <algorithm>
+#include <iostream>
+#include <fstream>
+#include <stdio.h>
+#include <fcntl.h>
+
+#include <wx/image.h>
+#include <wx/splash.h>
+#include <wx/msgout.h>
+#include <wx/msgdlg.h>
+#include <wx/dcmemory.h>
+#include <wx/bitmap.h>
+#include <wx/statbmp.h>
+#include <wx/bmpbuttn.h>
+#include <wx/filename.h>
+#include <wx/stdpaths.h>
+#include <wx/dir.h>
+#include <wx/sysopt.h>
+#include <wx/log.h>
+#include <wx/datetime.h>
+#include <wx/stdpaths.h>
+#include <wx/filename.h>
+#include <wx/wfstream.h>
+#include <wx/wxsqlite3/wxsqlite3.h>
+#include <wx/socket.h>
+#include <wx/dcclient.h>
+
+#include <main/controllers/configurationcontroller.h>
+#include <main/tools/coretools.h>
+#include "singleinstance.h"
+#include "initwx.h"
+#include <curl/curl.h>
+
+#if defined(__DEPRECATED)
+#undef __DEPRECATED
+#endif
+
+#include <vtkPolyDataMapper.h>
+
+#include <itkObject.h>
+#include <itkMultiThreader.h>
+#if defined(_GINKGO_DEBUG) && !defined(OMITIR_VENTANA_ERRORES_VTK)
+#include <vtkObject.h>
+#endif
+
+#if defined(_WIN32)
+#define _WINSOCKAPI_
+#include <windows.h>
+#include <io.h>
+#endif
+#if defined(_WIN32) && defined(_GINKGO_DEBUG) && !defined(_WIN32_WINNT_WIN7)
+//#include <vld.h>
+#endif
+#if !defined(_WIN32)
+#include <sys/signal.h>
+#endif
+
+#include <main/license.h>
+#include <api/globals.h>
+#include <api/imodulo.h>
+#include <api/integration/template.h>
+#include <api/toolsystem/itoolsregistry.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/commandcontroller.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/dicom/idicomconformance.h>
+#include <eventos/hidesplashwindow.h>
+
+#include "main/entorno.h"
+
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/pacscontroller.h>
+#include <main/controllers/controladorcarga.h>
+#include <main/controllers/controladorhl7.h>
+#include <main/controllers/controladorenviohl7.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/controllers/controladorbbddhl7.h>
+#include <main/controllers/controladoracciones.h>
+#include <main/controllers/integrationcontroller.h>
+#include <main/controllers/dcmtk/dicomservers.h>
+#include <main/controllers/controladorinternacionalizacion.h>
+#include <main/controllers/controladorautenticacion.h>
+#include <main/controllers/inactivitycontroller.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/thumbnailcontroller.h>
+#include <main/controllers/historytoolscontroller.h>
+#include <main/controllers/hangingprotocolcontroller.h>
+#include <main/controllers/autocleaningcontroller.h>
+#include <main/controllers/modalitysettingscontroller.h>
+#include <main/controllers/anonusagestats.h>
+#include <main/controllers/smartretrievecontroller.h>
+#include <main/controllers/storedqueriescontroller.h>
+
+#include <main/gui/mainwindow/ventanaprincipal.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#define _GINKGO_ENABLE_SPLASH
+
+using namespace GIL;
+
+#if defined(_WIN32)
+
+void RedirectIOToConsole()
+{
+
+        CONSOLE_SCREEN_BUFFER_INFO coninfo;
+        FILE *fp;
+
+        // allocate a console for this app
+        AllocConsole();
+
+        // set the screen buffer to be big enough to let us scroll text
+        GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE),
+                                   &coninfo);
+        coninfo.dwSize.Y = 9999;
+        SetConsoleScreenBufferSize(GetStdHandle(STD_OUTPUT_HANDLE),
+                                   coninfo.dwSize);
+
+        // redirect unbuffered STDOUT to the console
+        long lStdHandle = (long) GetStdHandle(STD_OUTPUT_HANDLE);
+        long hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
+        fp = _fdopen(hConHandle, "w");
+        *stdout = *fp;
+        //setvbuf(stdout, NULL, _IONBF, 0);
+
+        // redirect unbuffered STDIN to the console
+        lStdHandle = (long) GetStdHandle(STD_INPUT_HANDLE);
+        hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
+        fp = _fdopen(hConHandle, "r");
+        *stdin = *fp;
+        //setvbuf(stdin, NULL, _IONBF, 0);
+
+        // redirect unbuffered STDERR to the console
+        lStdHandle = (long) GetStdHandle(STD_ERROR_HANDLE);
+        hConHandle = _open_osfhandle(lStdHandle, _O_TEXT);
+        fp = _fdopen(hConHandle, "w");
+        *stderr = *fp;
+        //setvbuf(stderr, NULL, _IONBF, 0);
+
+        // make cout, wcout, cin, wcin, wcerr, cerr, wclog and clog
+        // point to console as well
+        //ios::sync_with_stdio();
+}
+
+#endif
+
+class GinkgoEventsDelegate: GNC::GCS::IEventsObserver
+{
+public:
+        GinkgoEventsDelegate(Ginkgo* pApp)
+        {
+                m_pApp = pApp;
+                GNC::GCS::IEventsController::Instance()->Registrar(this, GNC::GCS::Events::EventHideSplashWindow());
+        }
+
+        ~GinkgoEventsDelegate()
+        {
+        }
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+        {
+                GNC::GCS::Events::EventHideSplashWindow* pEvt = dynamic_cast<GNC::GCS::Events::EventHideSplashWindow*>(evt);
+                if (pEvt != NULL) {
+                        if (m_pApp->GetLogoWindow() != NULL) {
+                                m_pApp->GetLogoWindow()->Hide();
+                        }
+                }
+        }
+
+        virtual int FilterEvent(wxEvent &event)
+        {
+                // Automaticlly logout when the user is Away From Keyboard (AFK) for too long
+                if (wxEVT_MOTION == event.GetEventType() || wxEVT_CHAR == event.GetEventType()) {
+                        // User has done something, so stop the AFK timer
+                        GNC::GCS::InactivityController::Instance()->ResetsInactivity();
+                }
+                const int FILTER_EVENT_PROCESS_NORMALLY = -1;
+
+                return FILTER_EVENT_PROCESS_NORMALLY;
+        }
+
+        Ginkgo* m_pApp;
+};
+
+//Punto de entrada
+IMPLEMENT_APP_NO_MAIN(Ginkgo)
+#if defined(_WIN32)
+int WINAPI InitWX(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{
+        SetProcessDefaultLayout(0);
+        return wxEntry(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
+}
+#else
+int InitWX(int argc, char** argv)
+{
+        return wxEntry(argc, argv);
+}
+#endif
+
+wxSplashScreen* Ginkgo::GetLogoWindow()
+{
+        return m_pVentanaLogo;
+}
+
+/* Carga las extensiones de plugins Ginkgo (Bibliotecas externas .plugin) */
+void Ginkgo::LoadPlugins()
+{
+        GNC::ControladorExtensiones::Instance();
+}
+
+void Ginkgo::OnSplashClose(wxCloseEvent& WXUNUSED(event))
+{
+        m_pVentanaLogo = NULL;
+}
+
+// Evento de incialización de la aplicación
+
+bool Ginkgo::OnInit()
+{
+        m_pEventObserverDelegate = new GinkgoEventsDelegate(this);
+
+        setlocale(LC_NUMERIC, "C");
+
+#if defined(__WXOSX__)
+        m_Inicializado = false;
+#endif
+        //std::cout << "OnInit()" << std::endl;
+#if defined(_GINKGO_DEBUG) && defined(_WINDOWS) && defined (_GINKGO_CHECK_LEAKS)
+        _CrtSetDbgFlag ( _CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF );
+        _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_DEBUG );
+#endif
+
+#if (defined(_WIN32) && defined(_GINKGO_DEBUG)) || defined(FORCE_ENABLE_CONSOLE)
+        RedirectIOToConsole();
+#endif
+
+        wxLog *logger = new wxLogStderr();
+        wxLog::SetActiveTarget(logger);
+
+        {
+                // TODO Migrate to getopt if params continues growing
+                for (int i = 1; i < argc; ++i) { // Find the first "not starting with --" argument
+                        wxString arg = wxString(argv[i]);
+                        if (arg.StartsWith("--config-file")) {
+                                wxString::size_type eqPos = arg.find("=");
+                                if (eqPos != wxString::npos) {
+                                        wxString configFilePath = arg.substr(eqPos + 1, std::string::npos);
+
+                                        if (!wxFile::Exists(configFilePath)) {
+                                                LOG_ERROR("INIT", "Specified config file does not exists" << ": " << TOPATH(configFilePath));
+                                                GNC::GCS::IControladorLog::FreeInstance();
+                                                GNC::Entorno::FreeInstance();
+                                                GNC::GCS::ConfigurationController::FreeInstance();
+                                                return false;
+                                        } else {
+                                                GNC::GCS::ConfigurationController::SetPreferredConfigFile(TOPATH(configFilePath));
+                                        }
+                                }
+                        }
+                }
+        }
+
+        wxSocketBase::Initialize();
+
+
+        wxSQLite3Database::InitializeSQLite();
+        //initialize WSA on windows
+#if defined(_WINDOWS)
+        WSADATA wsaData;
+        if (WSAStartup(MAKEWORD( 2, 2 ), &wsaData) != 0) {
+                LOG_ERROR("INIT", "Error initializing network");
+        }
+#endif
+        //initialize curl...
+        /* Must initialize libcurl before any threads are started */
+        curl_global_init(CURL_GLOBAL_ALL);
+
+        WriteHeaderLog();
+
+        //esto es para que no casque
+        m_pServer = NULL;
+#if defined(SINGLE_INSTANCE)
+
+        //check numero de instancias del programa
+        const wxString inst_name = wxString::Format(wxT("Ginkgo-%s"), wxGetUserId().c_str());
+        m_singleInstanceChecker.Create(inst_name);
+#if defined(_WINDOWS)
+        const wxString& name = inst_name;
+#else
+        const wxString name(wxT("40000"));
+#endif
+        //comprobación una instancia
+        //If using a single instance, use IPC to
+        // communicate with the other instance
+        if (!m_singleInstanceChecker.IsAnotherRunning()) {
+                // Create a new server
+                m_pServer = new stServer;
+                if ( !m_pServer->Create( name ) ) {
+                        //NO ha podido crearse el servidor......
+                        LOG_ERROR("Core", "Error creating IPC server");
+                }
+        } else {
+                GNC::Entorno::Instance()->SetChildInstance(true);
+                LOG_INFO("Core", "Ginkgo client instance initiallized");
+                m_pServer = NULL;
+                // OK, there IS another one running, so try to connect to it
+                // and send it any filename before exiting.
+                stClient* client = new stClient;
+                // ignored under DDE, host name in TCP/IP based classes
+                wxString hostName = wxT("localhost");
+                // Create the connection
+                wxConnectionBase* connection =
+                        client->MakeConnection(hostName,
+                                               name, inst_name);
+                if (connection) {
+                        if (argc > 1) {
+                                wxString str;
+                                for (int i = 1; i < argc && str.IsEmpty(); ++i) { // Find the first "not starting with --" argument
+                                        wxString arg = wxString(argv[1]);
+                                        if (!arg.StartsWith("--")) {
+                                                str = arg;
+                                        }
+                                }
+
+                                if (!str.IsEmpty()) {
+                                        if (str.Lower().StartsWith(wxT("ginkgocadx://"))) {
+                                                LOG_INFO("Core", "The client sends following URL: " << str.ToUTF8());
+                                                // Ask the other instance to open a file or raise itself
+                                                connection->Execute(str);
+                                                connection->Disconnect();
+                                                delete connection;
+                                        } else {
+                                                wxFileName fileName = wxFileName(argv[1]);
+                                                if (fileName.IsRelative()) {
+#if defined(__WXGTK__)
+                                                        char* invocation_dir = getenv("INVOCATION_DIR");
+                                                        if (invocation_dir != NULL) {
+                                                                wxString invocationDir = wxString::FromUTF8(invocation_dir);
+                                                                if (!invocationDir.IsEmpty()) {
+                                                                        fileName = invocationDir + wxFileName::GetPathSeparator() + fileName.GetFullPath();
+                                                                }
+                                                        }
+#else
+                                                        fileName.MakeAbsolute();
+#endif
+                                                }
+                                                if (fileName.IsOk() && ((fileName.FileExists() && fileName.IsFileReadable()) || (wxDirExists(fileName.GetFullPath()) && fileName.IsDirReadable()))) {
+                                                        LOG_INFO("Core", "The client sends following file: " << fileName.GetFullPath().ToUTF8());
+                                                        // Ask the other instance to open a file or raise itself
+                                                        connection->Execute(fileName.GetFullPath());
+                                                        connection->Disconnect();
+                                                        delete connection;
+                                                } else {
+                                                        wxString err = wxString::Format(wxT("Error: The file %s does not exists or is not readable"), argv[1]);
+                                                        LOG_ERROR("Core", TOPATH(err));
+                                                        wxMessageBox(err, wxT("Ginkgo CADx"), wxICON_INFORMATION|wxOK);
+                                                }
+                                        }
+                                }
+                        } else {
+                                // Ask the other instance to open a file or raise itself
+                                connection->Execute(wxT(""));
+                                connection->Disconnect();
+                                delete connection;
+                        }
+                } else {
+                        LOG_ERROR("Core", "The client could not communicate with server because the server had opened modal dialogs");
+                        wxMessageBox(wxT("Sorry, the existing instance may be too busy too respond.\nPlease close any open dialogs and retry."),
+                                     wxT("Ginkgo CADx"), wxICON_INFORMATION|wxOK);
+                }
+                delete client;
+
+                //nos salimos limpiamente sin dejar leaks
+                GNC::GCS::IControladorLog::FreeInstance();
+                GNC::Entorno::FreeInstance();
+                GNC::GCS::ConfigurationController::FreeInstance();
+                return false;
+        }
+#endif
+
+        wxPNGHandler* handlerPng=new wxPNGHandler();
+        wxImage::AddHandler(handlerPng);
+#if defined(_GINKGO_ENABLE_SPLASH)
+        m_pVentanaLogo = NULL;
+        wxBitmap bitmap = GinkgoResourcesManager::Logos::GetLogoSplash();
+        wxSplashScreen splash(bitmap, wxSPLASH_CENTRE_ON_SCREEN | wxSPLASH_NO_TIMEOUT,
+                              -1, NULL, -1, wxDefaultPosition, wxDefaultSize,
+                              wxSTAY_ON_TOP|wxNO_BORDER);
+        wxIcon icono;
+        icono.CopyFromBitmap(GinkgoResourcesManager::Logos::GetLogoGinkgo32x32());
+        splash.SetIcon(icono);
+        splash.Connect(wxEVT_CLOSE_WINDOW, wxCloseEventHandler(Ginkgo::OnSplashClose));
+        // Copia del bitmap original de la ventana splash para pintar sobre ella
+        if (m_pBitmapOriginal.Create(bitmap.GetWidth(), bitmap.GetHeight(), bitmap.GetDepth())) {
+                m_pVentanaLogo = &splash;
+                wxMemoryDC srcDC(bitmap);
+                wxMemoryDC dstDC(m_pBitmapOriginal);
+                dstDC.Blit(wxPoint(0, 0), srcDC.GetSize(), &srcDC, wxPoint(0, 0), wxCOPY, false, wxPoint(0, 0));
+        }
+#endif
+        DoProgress(wxString(_("Initializing environment ...")));
+
+        //inicializamos la intrnacionalizacion del core
+        {
+                GNC::GCS::ControladorInternacionalizacion::Instance()->AddCatalog("cadxcore");
+        }
+        //permisos del core
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.restrictions", _Std("Ginkgo CADx restrictions"), "reutilize_study", _Std("Open only one tab for each study"), false, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.restrictions", _Std("Ginkgo CADx restrictions"), "anonymous_history", _Std("Anonymous mode (history is cleaned)"), false, "", false);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.restrictions", _Std("Ginkgo CADx restrictions"), "max_tabs", _Std("Max number of tabs opened"), false, "2", false);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.restrictions", _Std("Ginkgo CADx restrictions"), "inactivity_time", _Std("Max seconds of Ginkgo CADx application inactivity"), false, "600", false);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.restrictions", _Std("Ginkgo CADx restrictions"), "auto_close", _Std("Close automatically Ginkgo CADx after dicomize"), false, "", false);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.restrictions", _Std("Ginkgo CADx restrictions"), "export", _Std("Export images"), false, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.restrictions", _Std("Ginkgo CADx restrictions"), "acquire", _Std("Acquire DICOM files"), false, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.restrictions", _Std("Ginkgo CADx restrictions"), "import", _Std("Import files to DICOM format"), false, "", true);
+#ifdef GINKGO_PRO
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.help", _Std("Online manual"), "url_manual", _Std("URL of manual"), true, _Std("doc\\manual_ginkgo_cadx_pro_en.pdf"), true);
+#else
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.help", _Std("Online manual"), "url_manual", _Std("URL of manual"), true, "http://doc.ginkgo-cadx.com/", true);
+#endif
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.help", _Std("Online support"), "url_support", _Std("URL of online support"), true, _Std("http://ginkgo-cadx.com/"), true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.update", _Std("Program Updates"), "check_updates", _Std("Warn about newest Ginkgo CADx updates"), false, "http://updates.ginkgo-cadx.com/version3.xml", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.update", _Std("Program Updates"), "update_period", _Std("Update period (days)"), false, "2", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.seguridad",_Std("Security"), "setup_security", _Std("Setup Security"), false, "", false);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.startup", _Std("Show on startup"), "startupdefaultvalue", _Std("Show on startup default value"), true, "", true);
+
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.menu",_Std("Tools"),"configuracion",_Std("Settings menu"), false, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.menu",_Std("Tools"),"licencia",_Std("License menu"), true, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.pacs.limits", _Std("PACS Limits"), "find_rsp_max_results", _Std("Maximum number of C-Find responses allowed"), false, "400", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.pacs.limits", _Std("PACS Limits"),"pacs_upload",_Std("Upload images to a PACS server"), false, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.pacs.limits", _Std("PACS Limits"), "pacs_acquisition", _Std("Acquire images from PACS"),false, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.pacs.limits", _Std("PACS Limits"), "remote_pacs", _Std("Enable remote PACS configuration"), false, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.pacs.limits", _Std("PACS Limits"), "pacs_tls", _Std("Enable TLS configuration"), false, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.pacs.limits", _Std("PACS Limits"), "patient_scope", _Std("Restrict search over selected patient"), false, "", false);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.pacs.limits", _Std("PACS Limits"), "study_size", _Std("Restrict study retrieval by maximum size (KB)"), false, "16384", false);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.pacs.limits", _Std("PACS Limits"), "force_lossless", _Std("Force lossless when upload"), false, "", false);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.importacion", _Std("Import"), "storage_sop_class", _Std("Specify this Storage SOP Class in dicomization"), false, "1.2.840.10008.5.1.4.1.1.77.1.4", false);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.importacion", _Std("Import"), "input_accno", _Std("Show accession number input"), false, "", false);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.importacion", _Std("Import"), "quality", _Std("Set compression, 0 implies no compression (0..14)"), false, "1", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.importacion", _Std("Import"), "codec", _Std("Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG Lossless)"), false, "0", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.importacion", _Std("Import"), "mantener", _Std("Don't change image codec (if possible)"), false, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.importacion", _Std("Import"), "skip_demographic", _Std("Skip demographic step if it's possible"), false, "", false);
+
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.hl7", _Std("HL7 Service"), "autostart", _Std("Automatically start HL7 Sender service"), false, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.integracion", _Std("XML dicomization"), "send_message", _Std("Send Hl7 message when importing"), false, "", false);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.integracion", _Std("XML dicomization"), "upload_pacs_xml", _Std("Send study to PACS when importing"), false, "", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.integracion",_Std("XML dicomization"), "integration_template",_Std("Default ORU template"),false, DEFAULT_INTEGRATION_MESSAGE_TEMPLATE, true);
+
+        // Private permissions: Styles
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("style", _Std("Style"), "widgetsOverlay.maxTextWidth", "Widgets overlays Maximum text width", true, "-1", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("style", _Std("Style"), "widgetsOverlay.fontSize", "Widgets overlays font size", true, "18.0", true);
+
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("style", _Std("Style"), "cornerAnnotation.fontSize", "Corner annotations font size", true, "14.0", true);
+
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("style", _Std("Style"), "widgets.fontSize", "Widgets font size", true, "14.0", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("style", _Std("Style"), "widgets.maxTextWidth", "Widgets max text width", true, "350.0", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("style", _Std("Style"), "widgets.lineWidth", "Widgets line width", true, "1.0", true);
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("style", _Std("Style"), "widgets.draggingLineWidth", "Widgets dragging line width", true, "1.0", true);
+
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("style", _Std("Style"), "ecg.label.fontSize", "ECG labels size", true, "14.0", true);
+
+        std::string modalidades[20] = {"CR","CT","DR","DX","IO","MG","MR","NM","OT","PT","RF","RG","SC","SR","US","XA","XC","ES","ECG","HD"};
+        //permisos modalidades
+        for(int i = 0; i < 20; ++i) {
+                wxString texto = wxString::Format(_("Download %s images"),wxString::FromUTF8(modalidades[i].c_str()).c_str());
+                GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.pacs.download",_Std("PACS"),modalidades[i],std::string(texto.ToUTF8()),false, "", true);
+        }
+
+        wxString texto = _("Download all modalities");
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.pacs.download",_Std("PACS"),"all",std::string(texto.ToUTF8()),false, "", true);
+
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("core.opengl", _Std("OpenGL"), "enable_shaders", _Std("Enable shaders"), false, "", true);
+
+        //ginkgocloud
+        GNC::GCS::IControladorPermisos::Instance()->AddDefinicionPermiso("ginkgocloud",_Std("Ginkgo Cloud"), "download",_Std("Download from Ginkgo Cloud"),false, "", true);
+
+        itk::MultiThreader::SetGlobalDefaultNumberOfThreads(4);
+        itk::MultiThreader::SetGlobalMaximumNumberOfThreads(16);
+
+        /*
+        vtkPolyDataMapper* m = vtkPolyDataMapper::New();
+        m->GlobalImmediateModeRenderingOn();
+        m->Delete();
+        */
+#ifdef __WXMAC__
+        wxApp::s_macAboutMenuItemId = 1062;
+        wxApp::s_macPreferencesMenuItemId = 1063;
+        wxApp::s_macHelpMenuTitleName = wxT("A&yuda");
+        //wxSystemOptions::SetOption( wxMAC_TEXTCONTROL_USE_SPELL_CHECKER, 1 );
+#endif
+
+
+#if !defined(_GINKGO_DEBUG) || defined(OMITIR_VENTANA_ERRORES_VTK)
+        vtkObject::GlobalWarningDisplayOff();
+        itk::Object::GlobalWarningDisplayOff();
+#endif
+
+
+        wxThread::SetConcurrency(wxThread::GetCPUCount());
+
+        //codecs...
+        wxJPEGHandler* handler=new wxJPEGHandler();
+        wxImage::AddHandler(handler);
+
+        wxGIFHandler* handlerGif=new wxGIFHandler();
+        wxImage::AddHandler(handlerGif);
+
+        wxTIFFHandler* handleTiff = new wxTIFFHandler();
+        wxImage::AddHandler(handleTiff);
+
+        GNC::Entorno::Instance()->SetApp(this);
+
+        {
+                wxWindowDisabler dis;
+                m_pVentanaPrincipal = new VentanaPrincipal(NULL, wxString::FromUTF8(GNC::Entorno::Instance()->GetApplicationName().c_str()));
+                m_pVentanaPrincipal->Hide();
+                SetTopWindow(m_pVentanaPrincipal);
+        }
+
+        DoProgress(wxString(_("Tools loading base ...")));
+
+        DoProgress(wxString(_("Starting tools...")));
+
+        GNC::RegisterCoreTools();
+
+        DoProgress(wxString(_("Loading plugins ...")));
+
+        try {
+                LoadPlugins();
+        } catch (GNC::GCS::IRequestingException& ex) {
+                m_pVentanaLogo->Hide();
+                if (ex.shouldExit()) {
+                        exit(-1);
+                }
+        } catch (GNC::GCS::IException& ex) {
+                m_pVentanaLogo->Hide();
+                LOG_ERROR("Init", "Error loading: " << ex.GetCause());
+                wxMessageBox(_("Unable to start GinkgoCADx:\n") + wxString::FromUTF8(ex.GetCause().c_str()),_("error"),wxICON_INFORMATION);
+                exit(-1);
+        }
+
+        DoProgress(wxString(_("Loading resources ...")));
+        GIL::DICOM::Conformance::Load();
+
+        DoProgress(wxString(_("Starting services...")));
+        try {
+                GIL::DICOM::PACSController::Instance()->StartServer();
+        } catch(GNC::GCS::IException& ex) {
+                LOG_ERROR("Init", "Error starting PACS Service: " << ex.GetCause());
+        }
+        try {
+                GNC::GCS::SmartRetrieveController::Instance()->resetStatus();
+        } catch(...) {
+                LOG_ERROR("Init", "Error starting smartRetrieve service");
+        }
+
+        DoProgress(wxString(_("Configuring environment ...")));
+
+        try {
+                GNC::GCS::ConfigurationController::TListGroups profiles;
+                GNC::GCS::ConfigurationController::Instance()->readGroupGeneral("/GinkgoCore/Profiles", profiles);
+
+                for (GNC::GCS::ConfigurationController::TListGroups::iterator it = profiles.begin(); it != profiles.end(); ++it) {
+                        bool value;
+                        (*it).readBoolValue("Apply",value, false);
+                        if (value) {
+                                std::string xml;
+                                if ((*it).readStringValue("XML", xml)) {
+                                        GNC::GCS::IControladorPermisos::Instance()->CargarXMLPermisos(xml, false);
+                                        break;
+                                }
+                        }
+                }
+        } catch(GNC::GCS::ControladorPermisosException& ex) {
+                m_pVentanaLogo->Hide();
+                wxMessageBox(_("Failed to set permissions:\n") + wxString::FromUTF8(ex.GetCause().c_str()),_("error"),wxICON_INFORMATION);
+        }
+
+        //es necesario porque hay permisos que afectan a menus
+        m_pVentanaPrincipal->RefrescarMenus();
+
+        //se registran vistas y modos
+        const GNC::ControladorExtensiones::ListaModulos& listaModulos = GNC::ControladorExtensiones::Instance()->Modulos();
+        for(GNC::ControladorExtensiones::ListaModulos::const_iterator it = listaModulos.begin(); it != listaModulos.end(); ++it) {
+                (*it).second->RegistrarVistas();
+        }
+
+        DoProgress(wxString(_("Updating ...")));
+
+        m_pVentanaPrincipal->CargarHistorial();
+
+        DoProgress(wxString(_("Interpreting parameters ...")));
+
+
+
+        //parseo
+        wxCommandEvent ce(wxEVT_COMMAND_MENU_SELECTED, ID_Inicio_Aplicacion);
+        m_pVentanaPrincipal->GetEventHandler()->AddPendingEvent(ce);
+
+#if defined (__WXMAC__)
+        m_Inicializado = true;
+        if (m_OpenFileName.size() > 0) {
+                GinkgoDispatcher::Instance()->InsertarPeticion(m_OpenFileName);
+        }
+#endif
+#if defined(_GINKGO_ENABLE_SPLASH)
+        m_pVentanaLogo = NULL;
+#endif
+        //launch auto cleaning controller...
+        GNC::GCS::AutoCleaningController::Instance();
+
+        LOG_STAT(ANON_STAT_RUN_GINKGO)
+
+        return TRUE;
+}
+
+#ifdef __WXMAC__
+void Ginkgo::MacOpenFile(const wxString &fileName)
+{
+        if (m_Inicializado) {
+                GinkgoDispatcher::Instance()->InsertarPeticion( std::string(TOPATH(fileName)) );
+        } else {
+                m_OpenFileName = std::string(TOPATH(fileName));
+        }
+
+}
+#endif
+
+
+int Ginkgo::OnExit()
+{
+        LOG_INFO("Core", "Cerrando Ginkgo ");
+        //UnRegister events
+        delete m_pEventObserverDelegate;
+        m_pEventObserverDelegate = NULL;
+
+        //UnRegister tools
+        try {
+                GNC::GCS::IToolsRegistry::Instance()->UnRegisterAll();
+        } catch (GNC::GCS::ToolsRegistryException& ex) {
+                LOG_ERROR("Core", _Std("Error unregistering tools: ") << ex.str())
+        }
+
+        GNC::GCS::StoredQueryController::FreeInstance();
+        GNC::GCS::SmartRetrieveController::FreeInstance();
+        GNC::GCS::AutoCleaningController::FreeInstance();
+        GNC::GCS::AnonUsageStats::FreeInstance();
+        GNC::GCS::ThumbnailController::FreeInstance();
+        GNC::GCS::ModalitySettingsController::FreeInstance();
+        GNC::GCS::HangingProtocolController::FreeInstance();
+        GNC::GCS::ControladorVistas::FreeInstance();
+        GIL::IntegrationController::FreeInstance();
+        GIL::HL7::ControladorEnvioHl7::FreeInstance();
+        GNC::GCS::ControladorAcciones::FreeInstance();
+        GNC::GCS::InactivityController::FreeInstance();
+        GIL::DICOM::PACSController::FreeInstance();
+        GNC::GCS::ICommandController::FreeInstance();
+        GNC::ControladorExtensiones::FreeInstance();
+        GNC::GCS::ControladorCarga::FreeInstance();
+        GNC::HistoryToolsController::FreeInstance();
+        GNC::GCS::IToolsRegistry::FreeInstance();
+        GNC::GCS::HistoryController::FreeInstance();
+        GIL::HL7::ControladorBBDDHl7::FreeInstance();
+        GNC::GCS::IControladorPermisos::FreeInstance();
+        GNC::GCS::ControladorInternacionalizacion::FreeInstance();
+        GSEC::Auth::ControladorAutenticacion::FreeInstance();
+        DicomServerList::FreeInstance();
+        wxSQLite3Database::ShutdownSQLite();
+        GNC::GCS::IEventsController::FreeInstance();
+
+        GNC::Entorno::FreeInstance();
+
+        wxSocketBase::Shutdown();
+
+#if defined(_WINDOWS)
+        if (m_pServer != NULL) {
+                delete m_pServer;
+        }
+#endif
+        GNC::GCS::ConfigurationController::FreeInstance();
+
+        GNC::GCS::IControladorLog::FreeInstance();
+
+#if defined(_WINDOWS)
+        WSACleanup();
+#endif
+        curl_global_cleanup();
+
+#if defined(_WINDOWS) && defined(_DEBUG)
+        cairo_debug_reset_static_data();
+#endif
+
+        return wxApp::OnExit();
+}
+
+// Modificación del estado en el banner
+
+void Ginkgo::DoProgress(wxString str)
+{
+        if (m_pVentanaLogo == NULL) {
+                return;
+        }
+        wxSplashScreenWindow* pSplashWin = m_pVentanaLogo->GetSplashWindow();
+
+        wxMemoryDC srcDC(m_pBitmapOriginal);
+        wxClientDC wdc(pSplashWin);
+
+        wxColour colorTexto;
+
+        colorTexto.Set(70,70,70);
+
+        // Restauración del logo
+        wdc.Blit(wxPoint(0, 0), srcDC.GetSize(), &srcDC, wxPoint(0, 0), wxCOPY, false, wxPoint(0, 0));
+
+        // Dibujado del texto
+        wdc.SetTextForeground(colorTexto);
+        wdc.DrawText(str, 190, srcDC.GetSize().y - 37);
+}
+
+void Ginkgo::WriteHeaderLog()
+{
+        LOG_INFO("Core", _Std("Starting") << " " << GNC::Entorno::Instance()->GetApplicationName() << " " << GNC::GCS::IEntorno::Instance()->GetGinkgoVersionString());
+}
+//endregion
diff --git a/cadxcore/api/initwx.h b/cadxcore/api/initwx.h
new file mode 100644
index 0000000..d675d59
--- /dev/null
+++ b/cadxcore/api/initwx.h
@@ -0,0 +1,97 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <wx/app.h>
+#include <wx/bitmap.h>
+#include <wx/snglinst.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Events
+{
+class IEvento;
+}
+}
+}
+
+class wxSingleInstanceChecker;
+class Entorno;
+class stServer;
+
+// Colores de la ventana del logo
+#define SPLASH_COLOR_RELLENO "#4400FF" // Azul
+#define SPLASH_COLOR_BORDE   "#d4d4d4" // Gris
+#define SPLASH_COLOR_TEXTO   "#d4d4d4" // Gris
+
+class wxSplashScreen;
+class VentanaPrincipal;
+class GinkgoEventsDelegate;
+
+class EXTAPI Ginkgo : public wxApp
+{
+public:
+        wxSplashScreen* GetLogoWindow();
+
+        virtual bool OnInit();
+        virtual int OnExit();
+
+#ifdef __WXMAC__
+        virtual void MacOpenFile(const wxString &fileName);
+        std::string m_OpenFileName;
+        bool m_Inicializado;
+#endif
+
+        virtual void DoProgress(wxString str);
+
+
+        void OnSplashClose(wxCloseEvent& event);
+
+        void WriteHeaderLog();
+
+//region "Carga de Extensiones"
+        void LoadPlugins();
+//endregion
+
+
+private:
+
+
+protected:
+        wxSplashScreen*			m_pVentanaLogo;
+        wxBitmap                m_pBitmapOriginal;
+        VentanaPrincipal*       m_pVentanaPrincipal;
+        wxSingleInstanceChecker m_singleInstanceChecker;
+        stServer*               m_pServer;
+        GinkgoEventsDelegate*	m_pEventObserverDelegate;
+
+public:
+
+        wxCriticalSection m_SplashCriticalSection;
+};
+
+#if defined(_WIN32)
+int WINAPI InitWX(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow);
+#else
+int InitWX(int argc, char** argv);
+#endif
diff --git a/cadxcore/api/instantiations/instantiations.cpp b/cadxcore/api/instantiations/instantiations.cpp
new file mode 100644
index 0000000..f5f2928
--- /dev/null
+++ b/cadxcore/api/instantiations/instantiations.cpp
@@ -0,0 +1,41 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+#include <list>
+#include <map>
+#include <api/math/geometry.h>
+#include <api/math/geometry3d.h>
+
+#include "instantiations.h"
+
+#if defined(GEOMETRY2D_NO_TEMPLATE)
+
+#else
+namespace GNC
+{
+namespace GCS
+{
+
+//EXTAPI_TEMPLATE template GVector<PRECISION_COMPONENTE_POR_DEFECTO,PRECISION_REALES_POR_DEFECTO>;
+//EXTAPI_TEMPLATE template GMatriz<PRECISION_COMPONENTE_POR_DEFECTO,PRECISION_REALES_POR_DEFECTO>;
+}
+}
+#endif
diff --git a/cadxcore/api/instantiations/instantiations.h b/cadxcore/api/instantiations/instantiations.h
new file mode 100644
index 0000000..6bc61b7
--- /dev/null
+++ b/cadxcore/api/instantiations/instantiations.h
@@ -0,0 +1,18 @@
+#error delete this file
+#pragma once
+/*
+ *
+ *  $Id: instantiations.h $
+ *  Ginkgo CADx Project
+ *
+ *  Copyright 2008-14 MetaEmotion S.L. All rights reserved.
+ *  http://ginkgo-cadx.com
+ *
+ *  This file is licensed under LGPL v3 license.
+ *  See License.txt for details
+ *
+ */
+#ifndef INSTANTIATIONS_H
+#define INSTANTIATIONS_H
+
+#endif
diff --git a/cadxcore/api/integration/dict.h b/cadxcore/api/integration/dict.h
new file mode 100644
index 0000000..8076af5
--- /dev/null
+++ b/cadxcore/api/integration/dict.h
@@ -0,0 +1,80 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+//GinkgoCADx Integration dictionary
+
+#define GKDI_GINKGOCADX_MODULE_UID                   "ginkgocadx:module.uid"
+#define GKDI_GINKGOCADX_MODULE_NAME                  "ginkgocadx:module.name"
+#define GKDI_GINKGOCADX_MODULE_TID                   "ginkgocadx:module.tid"
+
+#define GKDI_GINKGOCADX_CONF_RECEIVING_ORG_ID        "ginkgocadx.conf:receiving.organization.id"
+#define GKDI_GINKGOCADX_CONF_PETITIONER_SYS_ID       "ginkgocadx.conf:petitioner.system.id"
+#define GKDI_GINKGOCADX_CONF_FILLER_APP_ID           "ginkgocadx.conf:filler.application.id"
+#define GKDI_GINKGOCADX_CONF_ORGANIZATION_NAME       "ginkgocadx.conf:organization.name"
+#define GKDI_GINKGOCADX_CONF_ORGANIZATION_ID         "ginkgocadx.conf:organization.id"
+#define GKDI_GINKGOCADX_CONF_GINKGO_APP_ID           "ginkgocadx.conf:gingocadx.application.id"
+
+#define GKDI_MESSAGE_HL7_TIMESTAMP                   "message:timestamp.hl7"
+#define GKDI_MESSAGE_EPOCH_TIMESTAMP                 "message:timestamp.epoch"
+#define GKDI_MESSAGE_PLACER                          "message:placer.id" // Custom Placer ID
+#define GKDI_MESSAGE_FILLER                          "message:filler.id" // Custom Filler ID
+
+#define GKDI_GLOBAL_PACS_STORE_SID                   "global:pacs.store.sid"
+#define GKDI_GLOBAL_PACS_RETRIEVE_SID                "global:pacs.retrieve.sid"
+#define GKDI_GLOBAL_OBSERVATIONS                     "global:observations"
+#define GKDI_GLOBAL_APPLICATION_CODE                 "global:application.code"
+#define GKDI_GLOBAL_PACS_LOCAL_AET                   "global:pacs.local.aet"
+
+#define GKDI_HCE_PETITION_ID                         "hce:petition.id"
+#define GKDI_HCE_EPISODE_NUMBER                      "hce:episode.number"
+#define GKDI_HCE_ID                                  "hce:id"
+
+#define GKDI_JIMENA_AMBITO_PETICION                  "jimena:ambito.peticion"
+
+#define GKDI_PATIENT_ID                              "patient:id"
+#define GKDI_PATIENT_ID_ASSIGNING                    "patient:issuer.of.patient.id"
+#define GKDI_PATIENT_NAME                            "patient:name"
+#define GKDI_PATIENT_FAMILY_NAME                     "patient:family.name"
+#define GKDI_PATIENT_SECOND_FAMILY_NAME              "patient:family.second.name"
+#define GKDI_PATIENT_SEX                             "patient:sex"
+#define GKDI_PATIENT_BIRTH_DATE                      "patient:birth.date"
+
+#define GKDI_REFERRING_PHISICIAN_ID                  "referring.physician:id"
+#define GKDI_REFERRING_PHISICIAN_NAME                "referring.physician:name"
+#define GKDI_REFERRING_PHISICIAN_FAMILY_NAME         "referring.physician:family.name"
+#define GKDI_REFERRING_PHISICIAN_SECOND_FAMILY_NAME  "referring.physician:family.second.name"
+#define GKDI_REFERRING_PHISICIAN_INSTITUTION_ID      "referring.physician:institution.id"
+#define GKDI_REFERRING_PHISICIAN_INSTITUTION_NAME    "referring.physician:institution.name"
+
+#define GKID_STUDY_IDX                               "study:idx"
+#define GKDI_STUDY_ACCESSION_NUMBER                  "study:accession.number"
+#define GKDI_STUDY_INSTANCE_UID                      "study:instance.uid"
+#define GKDI_STUDY_DESCRIPTION                       "study:description"
+
+#define GKID_SERIE_IDX                               "serie:idx"
+#define GKDI_SERIE_INSTANCE_UID                      "serie:instance.uid"
+#define GKDI_SERIE_DESCRIPTION                       "serie:description"
+
+#define GKID_IMAGE_IDX                               "image:idx"
+#define GKDI_IMAGE_SOP_INSTANCE_UID                  "image:sop.instance.uid"
+#define GKDI_IMAGE_SOP_CLASS_UID                     "image:sop.class.uid"
+#define GKDI_IMAGE_DICOM_PATH                        "image:file.target.path"
diff --git a/cadxcore/api/integration/template.h b/cadxcore/api/integration/template.h
new file mode 100644
index 0000000..692bb72
--- /dev/null
+++ b/cadxcore/api/integration/template.h
@@ -0,0 +1,45 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#define DEFAULT_INTEGRATION_MESSAGE_TEMPLATE \
+"<msg>" \
+"		<seg>MSH|^~\\&|<repl key=\"ginkgocadx.conf:gingocadx.application.id\"/>|<repl key=\"referring.physician:institution.id\"/>|<repl key=\"hce:id\"/>|<repl key=\"ginkgocadx.conf:receiving.organization.id\"/>|<repl key=\"message:timestamp.hl7\"/>||ORU^R01^ORU_R01|GNK.<repl key=\"message:timestamp.epoch\"/>|P|2.5|||AL|NE</seg>" \
+"		<seg>PID|1||<repl key=\"patient:id\"/>^^^HIS^PI^^^^<repl key=\"referring.physician:institution.id\"/>&&99CENTROSACYL||<repl key=\"patient:family.name\"/>^<repl key=\"patient:name\"/>|<repl key=\"patient:family.second.name\"/></seg>" \
+"		<seg>PV1|1||||||||||||||||||<repl key=\"hce:episode.number\"/>^^^<repl key=\"jimena:ambito.peticion\"/>^VN^^^^<repl key=\"referring.physician:institution.id\"/>&&99CENTROSACYL</seg>" \
+"		<for.study>" \
+"			<seg>ORC|SC|<repl key=\"hce:petition.id\"/>|<repl key=\"message:timestamp.epoch\"/>.<repl key=\"global:pacs.local.aet\"/>^<repl key=\"ginkgocadx.conf:filler.application.id\"/>|<repl key=\"hce:petition.id\"/>|CM|||||||<repl key=\"referring.physician:id\"/>^<repl key=\"referring.physician:family.name\"/>^<repl key=\"referring.physician:name\"/>^<repl key=\"referring.physician:family.second.name\"/>^^^^^MI^^^^NNESP^^^^^^^^^ESP&&ISO3166|||||^^||||\"\"^^^^^^^^^\"\"</seg>" \
+"			<seg>OBR|<idx expr=\"1+study:idx\"/>|<repl key=\"hce:petition.id\"/>|<repl key=\"message:timestamp.epoch\"/>.<repl key=\"global:pacs.local.aet\"/>^<repl key=\"ginkgocadx.conf:filler.application.id\"/>|<repl key=\"ginkgocadx:module.tid\"/>||||||||||||||<repl key=\"study:accession.number\"/>|||||||||||</seg>" \
+"			<seg>TQ1|1||||||||R</seg>" \
+"			<sequence key=\"obxseq\" val=\"0\"/>" \
+"			<sequence key=\"imgseq\" val=\"0\"/>" \
+"			<for.serie>" \
+"				<for.image>" \
+"					<seg>OBX|<idx expr=\"obxseq.nextval\"/>|HD|121018^Study Instance UID^DCM|<idx expr=\"imgseq.nextval\"/>|^<repl key=\"study:instance.uid\"/>^ISO||||||F|||||<repl key=\"referring.physician:id\"/>^<repl key=\"referring.physician:family.name\"/>^<repl key=\"referring.physician:name\"/>^<repl key=\"referring.physician:family.second.name\"/>^^^^^MI^^^^NNESP^^^^^^^^^ESP&&ISO3166</seg>" \
+"					<seg>OBX|<idx expr=\"obxseq.nextval\"/>|HD|112002^Series Instance UID^DCM|<idx expr=\"imgseq.curval\"/>|^<repl key=\"serie:instance.uid\"/>^ISO||||||F|||||<repl key=\"referring.physician:id\"/>^<repl key=\"referring.physician:family.name\"/>^<repl key=\"referring.physician:name\"/>^<repl key=\"referring.physician:family.second.name\"/>^^^^^MI^^^^NNESP^^^^^^^^^ESP&&ISO3166</seg>" \
+"					<seg>OBX|<idx expr=\"obxseq.nextval\"/>|HD|121126^SOP Instance UID^DCM|<idx expr=\"imgseq.curval\"/>|^<repl key=\"image:sop.instance.uid\"/>^ISO||||||F|||||<repl key=\"referring.physician:id\"/>^<repl key=\"referring.physician:family.name\"/>^<repl key=\"referring.physician:name\"/>^<repl key=\"referring.physician:family.second.name\"/>^^^^^MI^^^^NNESP^^^^^^^^^ESP&&ISO3166</seg>" \
+"					<seg>OBX|<idx expr=\"obxseq.nextval\"/>|HD|121127^SOP Class ID^DCM|<idx expr=\"imgseq.curval\"/>|^<repl key=\"image:sop.class.uid\"/>^ISO||||||F|||||<repl key=\"referring.physician:id\"/>^<repl key=\"referring.physician:family.name\"/>^<repl key=\"referring.physician:name\"/>^<repl key=\"referring.physician:family.second.name\"/>^^^^^MI^^^^NNESP^^^^^^^^^ESP&&ISO3166</seg>" \
+"					<seg>OBX|<idx expr=\"obxseq.nextval\"/>|HD|ARCHIVE^IDPACS^DCM|<idx expr=\"imgseq.curval\"/>|<repl key=\"global:pacs.store.sid\"/>^<repl key=\"global:pacs.store.sid\"/>^DNS|||||||||||<repl key=\"referring.physician:id\"/>^<repl key=\"referring.physician:family.name\"/>^<repl key=\"referring.physician:name\"/>^<repl key=\"referring.physician:family.second.name\"/>^^^^^MI^^^^NNESP^^^^^^^^^ESP&&ISO3166</seg>" \
+"				</for.image>" \
+"			</for.serie>" \
+"		</for.study>" \
+"		</msg>"
+
+
diff --git a/cadxcore/api/internal.h b/cadxcore/api/internal.h
new file mode 100644
index 0000000..f985aff
--- /dev/null
+++ b/cadxcore/api/internal.h
@@ -0,0 +1,31 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef NOEXTERNALINCLUDE_H
+#define NOEXTERNALINCLUDE_H
+
+#include <api/api.h>
+
+#if !defined(APIEXPORT)
+//#error This file could not been included outside cadxcore
+#endif
+
+#endif
diff --git a/cadxcore/api/internationalization/internationalization.cpp b/cadxcore/api/internationalization/internationalization.cpp
new file mode 100644
index 0000000..393e6a4
--- /dev/null
+++ b/cadxcore/api/internationalization/internationalization.cpp
@@ -0,0 +1,33 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+
+#include <api/internationalization/internationalization.h>
+
+#include <wx/intl.h>
+
+std::string EXTAPI _Std(const char* s)
+{
+        wxString wxStr = wxString::FromUTF8(s);
+        wxStr = wxGetTranslation(wxStr);
+        return std::string(wxStr.ToUTF8());
+}
+
diff --git a/cadxcore/api/internationalization/internationalization.h b/cadxcore/api/internationalization/internationalization.h
new file mode 100644
index 0000000..52c2193
--- /dev/null
+++ b/cadxcore/api/internationalization/internationalization.h
@@ -0,0 +1,28 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+
+#include <api/api.h>
+
+/** Translates the string to current language **/
+std::string EXTAPI _Std(const char* s);
diff --git a/cadxcore/api/ioverlay.h b/cadxcore/api/ioverlay.h
new file mode 100644
index 0000000..cf23213
--- /dev/null
+++ b/cadxcore/api/ioverlay.h
@@ -0,0 +1,52 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/math/geometry.h>
+
+class vtkGinkgoImageViewer;
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+class IWidget;
+}
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+
+/* Interfaz que se ocupa de imprimir (OpenGL + Cairo) datos referidos a un widget o a un widgetsRenderer */
+class IImpresorOverlay
+{
+public:
+        virtual ~IImpresorOverlay() {}
+
+        virtual std::string ImprimirOverlay(GNC::GCS::Widgets::IWidget* w, vtkGinkgoImageViewer* pViewer) = 0;
+};
+
+}
+}
diff --git a/cadxcore/api/iproxynotificadorprogreso.h b/cadxcore/api/iproxynotificadorprogreso.h
new file mode 100644
index 0000000..acd6e4c
--- /dev/null
+++ b/cadxcore/api/iproxynotificadorprogreso.h
@@ -0,0 +1,38 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <api/api.h>
+
+namespace GNC
+{
+class EXTAPI IProxyNotificadorProgreso
+{
+public:
+        IProxyNotificadorProgreso() {}
+        virtual ~IProxyNotificadorProgreso() {}
+
+
+        /** Notifica el progreso. Este metodo se puede ejecutar de manera asincrona, y su desencadenante resulta en una llamada sincrona con la interfaz.
+        Devuelve false si el comando se ejecutara, de manera que el invocador (tarea que ejecuta la accion real) pueda saber si debe terminar.**/
+        virtual bool NotificarProgreso(float progresoNormalizado, const std::string& texto) = 0;
+};
+}
diff --git a/cadxcore/api/istudycontext.cpp b/cadxcore/api/istudycontext.cpp
new file mode 100644
index 0000000..05dd2db
--- /dev/null
+++ b/cadxcore/api/istudycontext.cpp
@@ -0,0 +1,649 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/event.h>
+#include <wx/mstream.h>
+#include <wx/filename.h>
+#include <wx/xml/xml.h>
+#include <wx/file.h>
+
+#include <api/globals.h>
+#include <api/ientorno.h>
+#include <api/ivista.h>
+#include <api/istudycontext.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/toolsystem/itoolsregistry.h>
+
+#include <api/dicom/idicomizador.h>
+#include <api/dicom/idicommanager.h>
+
+#include <api/controllers/ipacscontroller.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/hangingprotocolcontroller.h>
+
+#include <main/controllers/controladorcarga.h>
+#include <main/controllers/controladorlog.h>
+#include <main/entorno.h>
+#include <export/tagsprivadoscomunes.h>
+
+
+
+#undef __DEPRECATED
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtkExecutive.h>
+#include <vtkImageData.h>
+#include <vtkDataObject.h>
+#include <vtkAlgorithmOutput.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
+#include <vtkUnsignedCharArray.h>
+#include <vtkPointData.h>
+#include <vtkCharArray.h>
+
+#define _GINKGO_TRACE
+
+GNC::GCS::IStudyContext::IStudyContext()
+{
+        View               = NULL;
+        Viewer              = NULL;
+        Module              = NULL;
+        Window             = NULL;
+        ParentWindow        = NULL;
+
+        Loader              = GNC::GCS::ControladorCarga::Instance()->NewLoader();
+
+        renderConnection    = Loader->GetOutputPort();
+
+        ActiveFileIndex = -1;
+}
+
+GNC::GCS::IStudyContext::IStudyContext(const GNC::GCS::IStudyContext& o)
+{
+        *this = o;
+}
+
+GNC::GCS::IStudyContext::IStudyContext(const GNC::GCS::IStudyContext* o)
+{
+        if (o != NULL) {
+                *this = *o;
+        } else {
+                View = NULL;
+                Module = NULL;
+                Window = NULL;
+                ParentWindow = NULL;
+                Viewer       = NULL;
+                Loader = GNC::GCS::ControladorCarga::Instance()->NewLoader();
+                renderConnection    = Loader->GetOutputPort();
+                ActiveFileIndex = -1;
+        }
+}
+
+GNC::GCS::IStudyContext::~IStudyContext()
+{
+}
+
+GNC::GCS::Ptr<GNC::GCS::IReferredStudyContext> GNC::GCS::IStudyContext::NewRef(const GNC::GCS::Ptr<GNC::GCS::IStudyContext>& parent)
+{
+        GNC::GCS::Ptr<IReferredStudyContext> reference = new IReferredStudyContext();
+
+        reference->View                 = parent->View;
+        reference->Module                = parent->Module;
+        reference->Window               = parent->Window;
+        reference->ParentWindow          = parent->ParentWindow;
+
+        reference->ActiveFileIndex   = parent->ActiveFileIndex;
+
+        reference->Files              = parent->Files;
+
+        reference->OpenedSeries        = parent->OpenedSeries;
+
+        reference->EstudioPadre          = parent;
+
+        reference->hangingLayout = parent->hangingLayout;
+
+        return reference;
+}
+
+GNC::GCS::IStudyContext& GNC::GCS::IStudyContext::operator = (const GNC::GCS::IStudyContext& o)
+{
+        View                 = o.View;
+        Module                = o.Module;
+        Window               = o.Window;
+        ParentWindow          = o.ParentWindow;
+
+        Loader                = o.Loader;
+
+        renderConnection      = Loader->GetOutputPort();
+
+        ActiveFileIndex   = o.ActiveFileIndex;
+
+        Files              = o.Files;
+
+        OpenedSeries.clear();
+        for (std::vector<long>::const_iterator it = o.OpenedSeries.begin(); it != o.OpenedSeries.end(); ++it) {
+                OpenedSeries.push_back((*it));
+        }
+        hangingLayout = o.hangingLayout;
+
+        return *this;
+}
+
+vtkSmartPointer<vtkAlgorithmOutput> GNC::GCS::IStudyContext::GetLoaderOutputConnection()
+{
+        return vtkSmartPointer<vtkAlgorithmOutput>(Loader->GetOutputPort());
+}
+
+void GNC::GCS::IStudyContext::SetRendererInputConnection(const vtkSmartPointer<vtkAlgorithmOutput>& input)
+{
+        renderConnection = input;
+}
+
+void GNC::GCS::IStudyContext::SetViewer(const vtkSmartPointer<vtkGinkgoImageViewer>& viewer)
+{
+        Viewer = viewer;
+        if (Viewer != NULL) {
+                Viewer->IImagePropertiesProxy = Loader;
+        }
+}
+
+void GNC::GCS::IStudyContext::SetActiveIndex(int indice)
+{
+        int newIdx = indice;
+
+        if (indice >= 0 && !Files.empty()) { // Propagate last to each other, so there is no more slices to layout them
+                size_t numFiles = Files.size();
+                if (static_cast<size_t>(indice) >= numFiles) {
+                        newIdx = numFiles - 1;
+                }
+                TStudyFile& fichero = *Files[newIdx];
+
+                ActiveFileIndex = newIdx;
+
+                Loader->SetInput(fichero.PathOfFile);
+                Loader->UpdateInformation();
+                double spacing[3] = {1.0f, 1.0f, 1.0f};
+                if (!GetSpacingActive(spacing[0], spacing[1], spacing[2])) {
+                        LOG_INFO("StudyContext", "GNC::GCS::IStudyContext::SetActiveIndex: no active spacing, use defaul (1,1,1)");
+                }
+                Loader->SetOutputSpacing(spacing);
+                double origin[3] = {0.0f, 0.0f, 0.0f};
+                GetOriginActive(origin[0], origin[1], origin[2]);
+                Loader->SetOutputOrigin(origin);
+                if(Viewer != NULL) {
+                        // FIXME: Comprobar si el pipeline esta conectado.
+                        Viewer->SetupPipeline();
+                } else {
+                        LOG_ERROR("StudyContext", "GNC::GCS::IStudyContext::SetActiveIndex: no idea what is wrong ...");
+                }
+        } else {
+                LOG_ERROR("StudyContext", "Layout distribution error");
+        }
+}
+
+void GNC::GCS::IStudyContext::DoInitiallizeContext(const std::list<std::string>& rutas)
+{
+        ActiveFileIndex = 0;
+        Viewer=NULL;
+
+        Files.clear();
+
+        //se inicializan los vectores...
+
+        for (std::list<std::string>::const_iterator it = rutas.begin(); it != rutas.end(); ++it) {
+                Files.push_back(new TStudyFile());
+                Files.back()->PathOfFile = (*it);
+        }
+}
+
+std::list<std::string> GNC::GCS::IStudyContext::GetImagePaths()
+{
+        std::list<std::string> resultado;
+        for (TStudyFileVector::iterator it = Files.begin(); it != Files.end(); ++it) {
+                resultado.push_back((*it)->PathOfFile);
+        }
+
+        return resultado;
+}
+
+const std::string& GNC::GCS::IStudyContext::GetPathActiveImage()
+{
+        return GetImagePath(ActiveFileIndex);
+}
+
+const std::string& GNC::GCS::IStudyContext::GetImagePath(const int indice)
+{
+        if (indice >= 0 && (unsigned int)indice < Files.size()) {
+                return Files[indice]->PathOfFile;
+        } else {
+                throw GNC::GCS::VistaException("GetRutaDeImagen(): Indice fuera de rango");
+        }
+}
+
+
+GNC::GCS::Ptr<GIL::DICOM::TipoMetaInfo> GNC::GCS::IStudyContext::GetMetaInfoActiveImage()
+{
+        return GetMetaInfo(ActiveFileIndex);
+}
+
+GNC::GCS::Ptr<GIL::DICOM::DicomDataset> GNC::GCS::IStudyContext::GetTagsActiveImage()
+{
+        return GetTagsImage(ActiveFileIndex);
+}
+
+GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> GNC::GCS::IStudyContext::GetPrivateTagsActiveImage()
+{
+        return GetPrivateTags(ActiveFileIndex);
+}
+
+GNC::GCS::Ptr<GIL::DICOM::TipoMetaInfo> GNC::GCS::IStudyContext::GetMetaInfo(const int indice)
+{
+        if(indice < 0 || indice >= (int)Files.size())
+                return NULL;
+
+        TStudyFile& fichero = *Files[indice];
+
+        if(! fichero.MetaInfo.IsValid() ) {
+                LoadMetaInfo(indice);
+        }
+        return fichero.MetaInfo;
+}
+
+GNC::GCS::Ptr<GIL::DICOM::DicomDataset> GNC::GCS::IStudyContext::GetTagsImage(const int indice)
+{
+        if(indice < 0 || indice >= (int)Files.size())
+                return NULL;
+
+        TStudyFile& fichero = *Files[indice];
+
+        if(!fichero.TagsImage.IsValid()) {
+                LoadImageTags(indice);
+        }
+        return fichero.TagsImage;
+}
+
+
+GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> GNC::GCS::IStudyContext::GetPrivateTags(int indice)
+{
+        if(indice < 0 || indice >= (int)Files.size())
+                return NULL;
+
+        TStudyFile& fichero = *Files[indice];
+
+        if(!fichero.PrivateTags.IsValid()) {
+                LoadImageTags(indice);
+        }
+        return fichero.PrivateTags;
+}
+
+int GNC::GCS::IStudyContext::GetSliceNumber()
+{
+        return Files.size();
+}
+
+bool GNC::GCS::IStudyContext::GetSpacingActive(double* spacing)
+{
+        return GNC::GCS::IStudyContext::GetSpacing(ActiveFileIndex, spacing[0], spacing[1] , spacing[2]);
+}
+
+bool GNC::GCS::IStudyContext::GetSpacingActive(double& x, double& y, double& z)
+{
+        return GNC::GCS::IStudyContext::GetSpacing(ActiveFileIndex, x, y ,z);
+}
+
+void GNC::GCS::IStudyContext::RecalibrateActiveImage(double spacing[3], double origin[3])
+{
+        RecalibrateImage(ActiveFileIndex, spacing, origin);
+}
+
+void GNC::GCS::IStudyContext::RecalibrateImage(const int indice, double spacing[3], double origin[3])
+{
+        if (indice == ActiveFileIndex) {
+                Loader->SetOutputOrigin(origin);
+                Loader->SetOutputSpacing(spacing);
+
+                Viewer->SetupPipeline();
+        }
+
+        SetSpacing(indice, spacing[0], spacing[1], spacing[2]);
+}
+
+bool GNC::GCS::IStudyContext::GetSpacing(const int indice, double& x, double& y, double& z)
+{
+        bool hasSpacing = false;
+        std::string spacing;
+        x=0.0f;
+        y=0.0f;
+        z=0.0f;
+        GNC::GCS::Ptr<GIL::DICOM::DicomDataset> tagsImage = GetTagsImage(indice);
+        if (tagsImage.IsValid()) {
+                if(tagsImage->getTag("0028|0030",spacing)) {
+                        char c;
+                        std::istringstream issl(spacing);
+                        issl >> x;
+                        if(!issl.eof()) {
+                                issl>>c;//la barra
+                                issl>>y;
+                        }
+                        if(!issl.eof()) {
+                                issl>>c;//la barra
+                                issl>>z;
+                        }
+                        hasSpacing = true;
+                } else if(tagsImage->getTag("0018|1164",spacing)) {
+                        char c;
+                        std::istringstream issl(spacing);
+                        issl >> x;
+                        if(!issl.eof()) {
+                                issl>>c;//la barra
+                                issl>>y;
+                        }
+                        if(!issl.eof()) {
+                                issl>>c;//la barra
+                                issl>>z;
+                        }
+                        hasSpacing = true;
+                }
+        }
+        if (x < std::numeric_limits<double>::epsilon()) {
+                x = 1.0f;
+                hasSpacing = false;
+        }
+        if (y < std::numeric_limits<double>::epsilon()) {
+                y = 1.0f;
+                hasSpacing = false;
+        }
+        if (z < std::numeric_limits<double>::epsilon()) {
+                z = 1.0f;
+        }
+        return hasSpacing;
+}
+
+void GNC::GCS::IStudyContext::SetSpacing(const int indice, const double x, const double y, const double z)
+{
+        std::ostringstream os;
+        os << x << "\\" << y << "\\" <<z;
+        std::string nuevoSpacing(os.str());
+
+        GNC::GCS::Ptr<GIL::DICOM::DicomDataset> tagsImage = GetTagsImage(indice);
+        if (tagsImage.IsValid()) {
+                tagsImage->tags[std::string("0028|0030")] = nuevoSpacing;
+        }
+}
+
+void GNC::GCS::IStudyContext::GetOriginActive(double* origin)
+{
+        GetOrigin(ActiveFileIndex, origin[0], origin[1], origin[2]);
+}
+
+void GNC::GCS::IStudyContext::GetOriginActive(double& x, double& y, double& z)
+{
+        GetOrigin(ActiveFileIndex, x, y ,z);
+}
+
+void GNC::GCS::IStudyContext::GetOrigin(const int indice, double& x, double& y, double& z)
+{
+        std::string origin;
+        x = y = z =0.0f;
+        GNC::GCS::Ptr<GIL::DICOM::DicomDataset> tagsImagen = GetTagsImage(indice);
+        if (tagsImagen.IsValid()) {
+                if(tagsImagen->getTag("0020|0032",origin)) {
+                        char c;
+                        std::istringstream issl(origin);
+                        issl >> x;
+                        if(!issl.eof()) {
+                                issl>>c;//la barra
+                                issl>>y;
+                        }
+                        if(!issl.eof()) {
+                                issl>>c;//la barra
+                                issl>>z;
+                        }
+                }
+        }
+}
+
+void GNC::GCS::IStudyContext::GetDimensionsActiveImage(int* dims)
+{
+        GetDimensionsImage(ActiveFileIndex, dims[0], dims[1], dims[2]);
+}
+
+void GNC::GCS::IStudyContext::GetDimensionsActiveImage(int& x, int& y, int& z)
+{
+        GetDimensionsImage(ActiveFileIndex, x, y, z);
+}
+
+void GNC::GCS::IStudyContext::GetDimensionsImage(const int indice, int& x, int& y, int& z)
+{
+        //z = Files.size();
+        x = y = z = 0;
+        GNC::GCS::Ptr<GIL::DICOM::DicomDataset> tagsImagenOriginal = GetTagsImage(indice);
+        if (tagsImagenOriginal.IsValid()) {
+                std::string tag;
+                if (tagsImagenOriginal->getTag("0028|0010",tag) ) {
+                        std::istringstream issl(tag);
+                        issl >> y;
+                }
+                if (tagsImagenOriginal->getTag("0028|0011",tag)) {
+                        std::istringstream issl(tag);
+                        issl >> x;
+                }
+
+                if (tagsImagenOriginal->getTag("0028|0008",tag)) {
+                        std::istringstream issl(tag);
+                        issl >> z;
+                } else {
+                        z = 1;
+                }
+        }
+}
+
+int GNC::GCS::IStudyContext::GetTSizeActive()
+{
+        int dimensions[3] = {0,0,0};
+        Loader->GetOutputDimensions(dimensions);
+        return dimensions[2];
+}
+
+std::string GNC::GCS::IStudyContext::GetTagActiveImage(const std::string& tag)
+{
+        std::string tagVal;
+        GetTagActiveImage(tag, tagVal);
+        return tagVal;
+}
+
+bool GNC::GCS::IStudyContext::GetTagActiveImage(const std::string& tag, std::string& valor)
+{
+        GNC::GCS::Ptr<GIL::DICOM::DicomDataset> pointer = GetTagsActiveImage();
+        if (pointer.IsValid()) {
+                return pointer->getTag(tag,valor);
+        } else {
+                return false;
+        }
+}
+
+int GNC::GCS::IStudyContext::GetPathIndex(const std::string& path)
+{
+
+        int i = 0;
+
+        for (TStudyFileVector::iterator it = Files.begin(); it != Files.end(); ++it, i++) {
+                if ((*it)->PathOfFile == path) {
+                        return i;
+                }
+        }
+        return -1;
+}
+
+void GNC::GCS::IStudyContext::CreateLoader()
+{
+        Loader              = GNC::GCS::ControladorCarga::Instance()->NewLoader();
+
+        renderConnection    = Loader->GetOutputPort();
+}
+
+
+bool GNC::GCS::IStudyContext::IsKeyImageActive()
+{
+        return IsKeyImage(ActiveFileIndex);
+}
+
+bool GNC::GCS::IStudyContext::IsKeyImage(int indice)
+{
+        GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> pTagsPrivados = GetPrivateTags(indice);
+        if (!pTagsPrivados.IsValid())
+                return false;
+
+        std::string isKey;
+        if (pTagsPrivados->GetTag(TAG_KEY_IMAGE, isKey)) {
+                return isKey.compare("YES") == 0;
+        } else {
+                return false;
+        }
+}
+void GNC::GCS::IStudyContext::LoadMetaInfo(const int indice)
+{
+        GNC::GCS::ILocker lock(this);
+        //tags imagenes
+
+        TStudyFile* fichero = Files[indice];
+
+        if (!fichero->MetaInfo.IsValid()) {
+                fichero->MetaInfo = new GIL::DICOM::TipoMetaInfo();
+
+                GIL::DICOM::IDICOMManager*	pDICOMManager;
+                pDICOMManager= GNC::Entorno::Instance()->GetPACSController()->CrearInstanciaDeDICOMManager();
+                pDICOMManager->CargarMetaInfo(fichero->PathOfFile, *(fichero->MetaInfo));
+                GNC::Entorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+        }
+}
+
+void GNC::GCS::IStudyContext::LoadImageTags(const int indice)
+{
+        GNC::GCS::ILocker lock(this);
+
+        TStudyFile* fichero = Files[indice];
+
+
+        //tags imagenes
+        if (!fichero->TagsImage.IsValid()) {
+                fichero->TagsImage = new GIL::DICOM::DicomDataset();
+                fichero->PrivateTags = new GIL::DICOM::TipoPrivateTags(UID_TAGS_PRIVADOS_COMUNES);
+
+                GIL::DICOM::IDICOMManager*	pDICOMManager;
+                pDICOMManager= GNC::Entorno::Instance()->GetPACSController()->CrearInstanciaDeDICOMManager();
+                pDICOMManager->CargarFichero(fichero->PathOfFile, *(fichero->TagsImage));
+                pDICOMManager->CargarTagsPrivados(*(fichero->PrivateTags));
+                CallbackCargarTagsImagen(indice, pDICOMManager);
+                GNC::Entorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+        }
+}
+
+//inicializa el mapa de valoracion con los datos del tag privado, si no existe el tag privado lo crea y lo inserta
+void GNC::GCS::IStudyContext::CreateUnsignedCharMap(vtkSmartPointer<vtkImageData>& pMapa, GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> pTagsPrivados, const unsigned char tag, const int indice, unsigned char valorInicial)
+{
+        GNC::GCS::ILocker lock(this);
+        //se crea la imagen
+        if (pMapa == NULL) {
+                pMapa = vtkSmartPointer<vtkImageData>::New();
+
+                double spacing[3] = {1.0f,1.0f,1.0f};
+                double origin[3] = {0.0f,0.0f,0.0f};
+                int dimensions[3] = {0,0,0};
+                GetSpacing(indice,spacing[0],spacing[1],spacing[2]);
+                GetOrigin(indice,origin[0],origin[1],origin[2]);
+                GetDimensionsImage(indice,dimensions[0],dimensions[1], dimensions[2]);
+
+                //se inicializan valores de dimensions, scalartype...
+                pMapa->SetDimensions(dimensions[0],dimensions[1],1);
+
+                pMapa->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
+                pMapa->SetSpacing(spacing[0],spacing[1],spacing[2]);
+                pMapa->SetOrigin(origin[0],origin[1],origin[2]);
+
+                GIL::DICOM::TagPrivadoUndefined* pTagPrivado = pTagsPrivados->GetTagUndefined(tag);
+                if(pTagPrivado == NULL) {
+                        const unsigned int size = dimensions[0] * dimensions[1];
+                        pTagPrivado = pTagsPrivados->NewTagUndefined(tag,size);
+                        //se hace un fill 0
+                        const unsigned char* fin = size + pTagPrivado->GetValor();
+                        for( unsigned char* pData = pTagPrivado->GetValor(); pData < fin; ++pData) {
+                                (*pData) = valorInicial;
+                        }
+                }
+
+                unsigned int size = pMapa->GetDimensions()[0] * pMapa->GetDimensions()[1];
+                unsigned char *in_data =  pTagPrivado->GetValor();
+                unsigned char *out_ptr =  reinterpret_cast<unsigned char*>(pMapa->GetScalarPointer());
+                std::copy(in_data, in_data + size, out_ptr);
+        }
+}
+
+void GNC::GCS::IStudyContext::CreateCharMap(vtkSmartPointer<vtkImageData>& pMapa, GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> pTagsPrivados, const unsigned char tag, const int indice, char valorInicial)
+{
+        GNC::GCS::ILocker lock(this);
+        //se crea la imagen
+        if (pMapa == NULL) {
+                pMapa = vtkSmartPointer<vtkImageData>::New();
+
+                double spacing[3] = {1.0f,1.0f,1.0f};
+                double origin[3] = {0.0f,0.0f,0.0f};
+                int dimensions[3] = {0,0,0};
+                GetSpacing(indice,spacing[0],spacing[1],spacing[2]);
+                GetOrigin(indice,origin[0],origin[1],origin[2]);
+                GetDimensionsImage(indice,dimensions[0],dimensions[1], dimensions[2]);
+
+                //se inicializan valores de dimensions, scalartype...
+                pMapa->SetDimensions(dimensions[0],dimensions[1],1);
+                pMapa->AllocateScalars(VTK_CHAR, 1);
+                pMapa->SetSpacing(spacing[0],spacing[1],spacing[2]);
+                pMapa->SetOrigin(origin[0],origin[1],origin[2]);
+
+                GIL::DICOM::TagPrivadoUndefined* pTagPrivado = pTagsPrivados->GetTagUndefined(tag);
+                if(pTagPrivado == NULL) {
+                        const unsigned int size = dimensions[0] * dimensions[1];
+                        pTagPrivado = pTagsPrivados->NewTagUndefined(tag,size);
+                        //se hace un fill 0
+                        const char* fin = size + (char*)pTagPrivado->GetValor();
+                        for( char* pData = (char*)pTagPrivado->GetValor(); pData < fin; ++pData) {
+                                (*pData) = valorInicial;
+                        }
+                }
+
+                unsigned int size = pMapa->GetDimensions()[0] * pMapa->GetDimensions()[1];
+                unsigned char *in_data =  pTagPrivado->GetValor();
+                unsigned char *out_ptr =  reinterpret_cast<unsigned char*>(pMapa->GetScalarPointer());
+                std::copy(in_data, in_data + size, out_ptr);
+        }
+}
+
+GNC::GCS::IReferredStudyContext::IReferredStudyContext()
+{
+}
+
+GNC::GCS::IReferredStudyContext::~IReferredStudyContext()
+{
+}
+
+void GNC::GCS::IReferredStudyContext::UnRefViewer()
+{
+        Viewer = NULL;
+}
diff --git a/cadxcore/api/istudycontext.h b/cadxcore/api/istudycontext.h
new file mode 100644
index 0000000..0dc39cc
--- /dev/null
+++ b/cadxcore/api/istudycontext.h
@@ -0,0 +1,210 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/api.h>
+#include <string>
+#include <vector>
+#if defined(__DEPRECATED)
+#undef __DEPRECATED
+#endif
+#include <vtkSmartPointer.h>
+#include <api/autoptr.h>
+#include <api/ilock.h>
+#include <api/dicom/idicom.h>
+
+class vtkGinkgoImageViewer;
+class vtkAlgorithmOutput;
+class vtkImageData;
+
+class wxWindow;
+
+namespace GNC
+{
+namespace GCS
+{
+class IEntorno;
+class IVista;
+class IStreamingLoader;
+class IImagePropertiesProxy;
+class IReferredStudyContext;
+class IModuleController;
+class Layout;
+class HangingProtocol;
+}
+}
+
+namespace GIL
+{
+namespace DICOM
+{
+class DicomDataset;
+class TipoPrivateTags;
+class IDICOMManager;
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+//region Interfaz de gestion de entrada (ficheros, diagnosticos, etc..)
+class EXTAPI IStudyContext: public ILockable
+{
+public:
+        typedef struct TStudyFile {
+                std::string PathOfFile;
+                bool			WidgetsLoaded;
+                GNC::GCS::Ptr<GIL::DICOM::TipoMetaInfo> MetaInfo;
+                GNC::GCS::Ptr<GIL::DICOM::DicomDataset> TagsImage;
+                GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> PrivateTags;
+
+                TStudyFile()
+                {
+                        PathOfFile = "";
+                        WidgetsLoaded = false;
+                }
+
+        } TStudyFile;
+
+
+        typedef std::vector<GNC::GCS::Ptr<TStudyFile> >     TStudyFileVector;
+
+        GNC::GCS::IVista*                                 View;
+        GNC::GCS::IModuleController*                      Module;
+        vtkSmartPointer<vtkGinkgoImageViewer>             Viewer;
+        wxWindow*                                         ParentWindow; // La ventana WX de la que es padre la vista (Notebook/Grid..)
+        wxWindow*                                         Window;      // La ventana WX propia de la vista
+
+        GNC::GCS::Ptr<GNC::GCS::IStreamingLoader>         Loader;
+
+        vtkSmartPointer<vtkAlgorithmOutput>               renderConnection; // Conexion hacia renderer
+        GNC::GCS::Ptr<GNC::GCS::Layout>					  hangingLayout;
+        GNC::GCS::Ptr<GNC::GCS::HangingProtocol>          hangingProtocol;
+
+        int                                               ActiveFileIndex;
+        std::vector<long>											  OpenedSeries;
+protected:
+        TStudyFileVector											  Files;
+public:
+
+        IStudyContext();
+
+        IStudyContext(const IStudyContext& o);
+        IStudyContext(const IStudyContext* o)__attribute_deprecated__;
+
+        virtual ~IStudyContext();
+
+        static GNC::GCS::Ptr<GNC::GCS::IReferredStudyContext> NewRef(const GNC::GCS::Ptr<GNC::GCS::IStudyContext>& parent);
+
+        IStudyContext& operator = (const IStudyContext& o);
+
+        /** Obtiene el puerto de conexion de salida del StreamingLoader. Se usa para inyectar pipelines que necesiten las vistas graficas
+        	Pipeline: Loader.ruta_fichero => [...] => Loader.loaderOutputConnection => [PIPELINE_ESPECIFICO] => Viewer.renderInputConnection => [...]
+        **/
+        vtkSmartPointer<vtkAlgorithmOutput> GetLoaderOutputConnection();
+
+        /** Obtiene el puerto de conexion de entrada hacia el renderer. Por defecto es la salida del StreamingLoader
+        	Pipeline: Loader.ruta_fichero => [...] => Loader.loaderOutputConnection => [PIPELINE_ESPECIFICO] => Viewer.renderInputConnection => [...]
+        **/
+        void SetRendererInputConnection(const vtkSmartPointer<vtkAlgorithmOutput>& input);
+
+        void SetViewer(const vtkSmartPointer<vtkGinkgoImageViewer>& viewer);
+
+        virtual void SetActiveIndex(int indice);
+
+        std::list<std::string> GetImagePaths();
+
+        const std::string& GetPathActiveImage();
+        const std::string& GetImagePath(const int indice);
+
+        //tags
+        GNC::GCS::Ptr<GIL::DICOM::TipoMetaInfo>    GetMetaInfoActiveImage();
+        GNC::GCS::Ptr<GIL::DICOM::DicomDataset>   GetTagsActiveImage();
+        GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> GetPrivateTagsActiveImage();
+
+        GNC::GCS::Ptr<GIL::DICOM::TipoMetaInfo>    GetMetaInfo(const int indice);
+        GNC::GCS::Ptr<GIL::DICOM::DicomDataset>   GetTagsImage(const int indice);
+        GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> GetPrivateTags(int indice);
+
+        int GetSliceNumber();
+        virtual void RecalibrateActiveImage(double spacing[3], double origin[3]);
+        virtual void RecalibrateImage(const int indice, double spacing[3], double origin[3]);
+
+        virtual bool GetSpacingActive(double* spacing);
+        virtual bool GetSpacingActive(double& x, double& y, double& z);
+        // Returns true if image has spacing
+        bool GetSpacing(const int indice, double& x, double& y, double& z);
+        virtual void SetSpacing(const int indice, const double x, const double y, const double z);
+
+        void GetOriginActive(double* origin);
+        void GetOriginActive(double& x, double& y, double& z);
+        void GetOrigin(const int indice, double& x, double& y, double& z);
+
+        void GetDimensionsActiveImage(int* dimensions);
+        void GetDimensionsActiveImage(int& x, int& y, int& z);
+        void GetDimensionsImage(const int indice, int& x, int& y, int& z);
+
+        int GetTSizeActive();
+
+        int GetPathIndex(const std::string& path);
+
+        std::string GetTagActiveImage(const std::string& tag);
+        bool GetTagActiveImage(const std::string& tag, std::string& valor);
+
+        bool IsKeyImageActive();
+        bool IsKeyImage(int indice = 0);
+
+        void CreateLoader();
+
+protected:
+        void DoInitiallizeContext(const std::list<std::string>& rutas);
+
+        void LoadMetaInfo(const int indice);
+        void LoadImageTags(const int indice);
+public:
+        virtual void CallbackCargarTagsImagen(const int /*indice*/, GIL::DICOM::IDICOMManager* /*pDicomManager*/) = 0;
+protected:
+        void CreateUnsignedCharMap(vtkSmartPointer<vtkImageData>& pMapa, GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> pTagsPrivados, const unsigned char tag, const int indice, unsigned char valorInicial = 0);
+        void CreateCharMap(vtkSmartPointer<vtkImageData>& pMapa, GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> pTagsPrivados, const unsigned char tag, const int indice, char valorInicial = 0);
+
+        friend class IContextoEstudioReferido;
+};
+
+class EXTAPI IReferredStudyContext : public IStudyContext
+{
+public:
+        IReferredStudyContext();
+
+        virtual ~IReferredStudyContext();
+
+        void UnRefViewer();
+
+        virtual void CallbackCargarTagsImagen(const int indice, GIL::DICOM::IDICOMManager* pDicomManager)
+        {
+                EstudioPadre->CallbackCargarTagsImagen(indice, pDicomManager);
+        }
+
+        GNC::GCS::Ptr<GNC::GCS::IStudyContext> EstudioPadre;
+
+};
+}
+}
diff --git a/cadxcore/api/iventanaprogreso.h b/cadxcore/api/iventanaprogreso.h
new file mode 100644
index 0000000..78f957a
--- /dev/null
+++ b/cadxcore/api/iventanaprogreso.h
@@ -0,0 +1,34 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+class wxString;
+
+class IVentanaProgreso
+{
+public:
+
+        IVentanaProgreso() { }
+        virtual ~IVentanaProgreso() { }
+
+        virtual void ResetProgress() = 0;
+        virtual void SetProgress(int progress, wxString text) = 0;
+};
+
diff --git a/cadxcore/api/ivista.cpp b/cadxcore/api/ivista.cpp
new file mode 100644
index 0000000..074ae05
--- /dev/null
+++ b/cadxcore/api/ivista.cpp
@@ -0,0 +1,165 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+#include <iostream>
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/ientorno.h>
+#include <api/istudycontext.h>
+#include <api/toolsystem/itoolcontroller.h>
+#include <api/ientorno.h>
+#include <eventos/views.h>
+#include <main/controllers/controladoreventos.h>
+
+
+#include "ivista.h"
+
+GNC::GCS::VistaException::VistaException(const std::string& msg, const std::string& component, bool fatal) throw() : GNC::GCS::IException(msg ,component, fatal)
+{
+}
+
+/* Constructor */
+GNC::GCS::IVista::IVista(const GNC::GCS::Ptr<GNC::GCS::IStudyContext>& estudio) :
+        Estudio(new GNC::GCS::Ptr<GNC::GCS::IStudyContext>(estudio) ),
+        m_Titulo(_Std("Loading...")),
+        m_toolController(GNC::GCS::IToolController::New()),
+        m_Activada(false),
+        m_Cargada(false),
+        m_Guardada(true)
+{
+        (*Estudio)->View  = this;
+        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventView(this, GNC::GCS::Events::EventView::Creation));
+}
+
+/* Destructor */
+GNC::GCS::IVista::~IVista()
+{
+        if (GNC::GCS::IEntorno::Instance()->GetVentanaPrincipal() != NULL) {
+                GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventView(this, GNC::GCS::Events::EventView::Destruction));
+        }
+        delete m_toolController;
+        GTRACE(">> IVista::~IVista() " << this)
+        (*Estudio)->View = NULL;
+        if (this->IsLocked()) {
+                this->UnLock();
+        }
+        // Estudio is a pointer to GNC::GCS::Ptr to avoid circular dependencies.
+        delete Estudio;
+        GTRACE("<< IVista::~IVista()" << this)
+}
+
+std::string& GNC::GCS::IVista::GetTitulo()
+{
+        return m_Titulo;
+}
+
+bool GNC::GCS::IVista::SoportaHerramienta(GNC::GCS::ITool* )
+{
+        return true;
+}
+
+/* Notificacion de cambio en la configuracion */
+void GNC::GCS::IVista::OnConfiguracionCambiada()
+{
+
+}
+
+void GNC::GCS::IVista::Activar()
+{
+        m_Activada = true;
+}
+
+void GNC::GCS::IVista::Desactivar()
+{
+        m_Activada = false;
+}
+
+/* Obtiene el identificador unico del módulo al que pertenece */
+const std::string& GNC::GCS::IVista::GetUIDModulo()
+{
+        return (*Estudio)->Module->GetUID();
+}
+
+/* Obtiene el modulo al que pertenece */
+GNC::GCS::IModuleController* GNC::GCS::IVista::GetModulo()
+{
+        return (*Estudio)->Module;
+}
+
+GNC::GCS::Ptr<GNC::GCS::IStudyContext>& GNC::GCS::IVista::GetEstudio()
+{
+        return (*Estudio);
+}
+
+
+bool GNC::GCS::IVista::EstaCargada()
+{
+        return m_Cargada;
+}
+
+bool GNC::GCS::IVista::EstaModificada()
+{
+        return false;
+}
+
+void GNC::GCS::IVista::SetCargada(bool cargada)
+{
+        m_Cargada = cargada;
+}
+
+bool GNC::GCS::IVista::Guardar()
+{
+        return true;
+}
+
+const std::list<std::string> GNC::GCS::IVista::GetImagePaths() const
+{
+        if ((*Estudio)) {
+                return (*Estudio)->GetImagePaths();
+        } else {
+                throw VistaException("Vista no inicializada");
+        }
+}
+
+
+/**Gets dicom is currently shown**/
+std::string GNC::GCS::IVista::GetCurrentDICOM()
+{
+        if ((*Estudio)) {
+                return std::string((*Estudio)->GetImagePath((*Estudio)->ActiveFileIndex));
+        } else {
+                throw VistaException("Vista no inicializada");
+        }
+}
+
+GNC::GCS::IToolController* GNC::GCS::IVista::GetToolController()
+{
+        return m_toolController;
+}
+
+void GNC::GCS::IVista::OnFocus()
+{
+        if (!m_Activada) {
+                GNC::GCS::IControladorVistas::Instance()->SolicitarActivarVista(this);
+        }
+}
diff --git a/cadxcore/api/ivista.h b/cadxcore/api/ivista.h
new file mode 100644
index 0000000..3fef1e0
--- /dev/null
+++ b/cadxcore/api/ivista.h
@@ -0,0 +1,164 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IVIEW_H
+#define IVIEW_H
+
+#include <api/api.h>
+#include <api/globals.h>
+#include <api/ilock.h>
+#include <string>
+#include <vector>
+#include <api/autoptr.h>
+
+//----------------------------------------------------------------------------------------------------
+//region Forward Declarations
+
+class wxWindow;
+class vtkAlgorithmOutput;
+class vtkImageData;
+
+namespace GNC
+{
+namespace GCS
+{
+class IModuleController;
+class IStudyContext;
+class ITool;
+class IComando;
+class IToolController;
+}
+}
+
+namespace GIL
+{
+class IModeloIntegracion;
+}
+//endregion
+
+
+namespace GNC
+{
+namespace GCS
+{
+
+//----------------------------------------------------------------------------------------------------
+//region Excepcion de tipo vista
+class EXTAPI VistaException : public GNC::GCS::IException
+{
+public:
+        VistaException(const std::string& msg, const std::string& component="Modelo", bool fatal = true) throw();
+};
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//region Interfaz de vistas
+
+class EXTAPI IVista : public GNC::GCS::ILockable
+{
+public:
+
+        /* Constructor */
+        IVista(const GNC::GCS::Ptr<GNC::GCS::IStudyContext>& estudio);
+
+        /* Destructor */
+        virtual ~IVista();
+
+        virtual std::string& GetTitulo();
+
+        virtual wxWindow* GetWindow() = 0;
+
+        virtual bool SoportaHerramienta(GNC::GCS::ITool* pHerramienta);
+
+        virtual bool SoportaGuardar() = 0;
+
+        virtual bool SoportaExportar() = 0;
+
+        /* Notificacion de cambio en la configuracion */
+        virtual void OnConfiguracionCambiada();
+
+        virtual void Activar();
+
+        virtual void Desactivar();
+
+        /* Obtiene el identificador unico del modulo al que pertenece */
+        virtual const std::string& GetUIDModulo();
+
+        /* Obtiene el modulo al que pertenece */
+        virtual GNC::GCS::IModuleController* GetModulo();
+
+        GNC::GCS::Ptr<GNC::GCS::IStudyContext>& GetEstudio();
+
+        virtual bool EstaCargada();
+
+        virtual bool EstaModificada();
+
+        virtual void SetCargada(bool cargada = true);
+
+        virtual bool Guardar();
+
+        virtual const std::list<std::string> GetImagePaths() const;
+
+        virtual void ActivarRuta(long file_pk) = 0;
+
+        /**Gets dicom is currently shown**/
+        virtual std::string GetCurrentDICOM();
+
+        //----------------------------------------------------------------------------------------------------
+        //region Interfaz de Carga
+
+        // Comienzo de carga. Metodo sincrono con la interfaz.
+        virtual void OnCargaIniciada() = 0;
+
+        // Paso 1: Cargar el estudio. Metodo NO sincrono con la interfaz.
+        virtual void CargarEstudio(GNC::GCS::IComando* pCmdInvocador) = 0;
+
+        // Finalizacion de la carga. Metodo sincrono con la interfaz.
+        virtual void OnCargaFinalizada() = 0;
+
+        // Paso 2: Inicializacion del pipeline. Metodo sincrono con la interfaz.
+        virtual void IniciarPipeline() = 0;
+
+        // Parada del pipeline. Metodo sincrono con la interfaz Se invoca en el caso de que ocurra un error de carga.
+        virtual void DetenerPipeline() = 0;
+
+        virtual GNC::GCS::IToolController* GetToolController();
+
+        //endregion
+
+        virtual void OnFocus();
+
+private:
+        // Estudio is a pointer to GNC::GCS::Ptr to avoid circular dependencies.
+        GNC::GCS::Ptr<GNC::GCS::IStudyContext>* Estudio;
+
+protected:
+        std::string                        m_Titulo;
+        GNC::GCS::IToolController*         m_toolController;
+
+        bool                               m_Activada;
+        bool                               m_Cargada;
+        bool                               m_Guardada;
+
+};
+}
+}
+#endif
diff --git a/cadxcore/api/iwaitqueue.cpp b/cadxcore/api/iwaitqueue.cpp
new file mode 100644
index 0000000..de921ff
--- /dev/null
+++ b/cadxcore/api/iwaitqueue.cpp
@@ -0,0 +1,229 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/iwaitqueue.h>
+#include <api/controllers/icontroladorlog.h>
+#include <wx/thread.h>
+
+
+//----------------------------------------------------------------------------------------------------
+//region Cola de espera
+//----------------------------------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------------------------------
+//region Constructor y destructor
+
+GNC::GCS::WaitQueue::WaitQueue()
+{
+        m_pSignaler = new wxSemaphore(0, 0);
+        m_Size = 0;
+}
+
+GNC::GCS::WaitQueue::~WaitQueue()
+{
+        GNC::GCS::ILocker q_Locker(this);
+        if (m_Size > 0 ) {
+                LOG_ERROR("WaitQueue", "Inconsistency detected: The queue finished while some pending task non signaled.");
+        }
+        delete m_pSignaler;
+        m_pSignaler = NULL;
+}
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//region Interfaz general
+
+GNC::GCS::TipoListaEspera::size_type GNC::GCS::WaitQueue::Size() const
+{
+        return m_Size;
+}
+
+bool GNC::GCS::WaitQueue::Empty() const
+{
+        return (m_Size == 0);
+}
+
+bool GNC::GCS::WaitQueue::NotEmpty() const
+{
+        return m_Size != 0;
+}
+
+GNC::GCS::TipoListaEspera::size_type GNC::GCS::WaitQueue::Pending()
+{
+        ILocker q_lock(this);
+        const TipoListaEspera::size_type npending = m_Size - m_ListaEspera.size();
+        return npending;
+}
+
+
+bool GNC::GCS::WaitQueue::Wait()
+{
+        wxSemaError err = m_pSignaler->Wait();
+        GNC::GCS::ILocker q_Locker(this);
+        if (err != wxSEMA_NO_ERROR) {
+                return false;
+        } else {
+                m_Size--;
+        }
+        return true;
+}
+
+bool GNC::GCS::WaitQueue::Wait(long msecs)
+{
+        wxSemaError err = m_pSignaler->WaitTimeout(msecs);
+        GNC::GCS::ILocker q_Locker(this);
+        if (err != wxSEMA_NO_ERROR) {
+                return false;
+        } else {
+                m_Size--;
+        }
+        return true;
+}
+
+void GNC::GCS::WaitQueue::RegistrarEspera(WaitQueueTask* task)
+{
+        GNC::GCS::ILocker q_Locker(this);
+        GNC::GCS::ILocker t_Locker(task);
+        task->m_ListaNotificacion.push_back(this);
+        m_ListaEspera.push_back(task);
+        m_Size++;
+}
+
+void GNC::GCS::WaitQueue::TerminarPendientes()
+{
+        GNC::GCS::ILocker q_locker(this);
+
+        for (TipoListaEspera::iterator it = m_ListaEspera.begin(); it != m_ListaEspera.end(); ++it) {
+                GNC::GCS::WaitQueueTask* wqt = *it;
+                GNC::GCS::ILocker t_locker(wqt);
+                if (wqt->m_NotificarTerminacion) {
+                        wqt->Terminar();
+                }
+        }
+}
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//region Interfaz privada
+
+//endregion
+
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+// Tarea de la cola de espera
+//----------------------------------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------------------------------
+//region Constructor y destructor
+
+GNC::GCS::WaitQueueTask::WaitQueueTask()
+{
+        m_NotificarTerminacion = false;
+}
+
+GNC::GCS::WaitQueueTask::~WaitQueueTask()
+{
+}
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//region Interfaz general
+
+void GNC::GCS::WaitQueueTask::Signal()
+{
+        //GNC::GCS::ILocker t_locker(this, loc);
+        for (TipoListaNotificaciones::iterator it_q = m_ListaNotificacion.begin(); it_q != m_ListaNotificacion.end(); ++it_q) {
+                WaitQueue* wq = (*it_q);
+                ILocker q_locker(wq);
+
+                bool notfound = true;
+                for (TipoListaEspera::iterator it_t = wq->m_ListaEspera.begin(); it_t != wq->m_ListaEspera.end(); ++it_t) {
+                        WaitQueueTask* qt = *it_t;
+                        if ( qt == this) {
+                                wq->m_ListaEspera.remove(this);
+                                wq->m_pSignaler->Post();
+                                notfound = false;
+                                break;
+                        }
+                }
+
+                if (notfound) {
+                        LOG_ERROR("WaitQueue", "Error: Inconsistency in waitqueue mechanism. It wast notified a non registered or alreadt notified dependency");
+                }
+
+        }
+        m_ListaNotificacion.clear();
+}
+
+void GNC::GCS::WaitQueueTask::Terminar()
+{
+        m_NotificarTerminacion = true;
+        DoTerminar();
+}
+//endregion
+
+//region Interfaz privada
+
+//endregion
+
+//endregion
+
+
+GNC::GCS::NotifyQueue::NotifyQueue()
+{
+        RegistryCount = 0;
+        NotifyObject = new wxSemaphore(0, 0);
+}
+
+GNC::GCS::NotifyQueue::~NotifyQueue()
+{
+}
+
+void GNC::GCS::NotifyQueue::NotifyAll()
+{
+
+        GNC::GCS::ILocker lock(RegistryLock);
+
+        for (unsigned int i = 0; i < RegistryCount; i++) {
+                NotifyObject->Post();
+        }
+
+}
+
+void GNC::GCS::NotifyQueue::Wait()
+{
+        {
+                GNC::GCS::ILocker lock(RegistryLock);
+                RegistryCount++;
+        }
+        /*wxSemaError err =*/ NotifyObject->Wait();
+}
+
+unsigned int GNC::GCS::NotifyQueue::Size() const
+{
+        return RegistryCount;
+}
+
+bool GNC::GCS::NotifyQueue::Requested() const
+{
+        return RegistryCount > 0;
+}
+
diff --git a/cadxcore/api/iwaitqueue.h b/cadxcore/api/iwaitqueue.h
new file mode 100644
index 0000000..91323b1
--- /dev/null
+++ b/cadxcore/api/iwaitqueue.h
@@ -0,0 +1,172 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IWAITQUEUE_H
+#define IWAITQUEUE_H
+
+#include <api/ilock.h>
+class wxSemaphore;
+
+namespace GNC
+{
+namespace GCS
+{
+
+class WaitQueueTask;
+class EXTAPI TipoListaEspera : public std::list<WaitQueueTask*, std::allocator<WaitQueueTask*> > {};
+
+//----------------------------------------------------------------------------------------------------
+//region Cola de espera
+//----------------------------------------------------------------------------------------------------
+class EXTAPI WaitQueue : public GNC::GCS::ILockable
+{
+
+        //----------------------------------------------------------------------------------------------------
+        //region Definiciones
+public:
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region Constructor y destructor
+public:
+
+        WaitQueue();
+        ~WaitQueue();
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region Interfaz general
+public:
+
+        TipoListaEspera::size_type Size() const;
+
+        bool Empty() const;
+
+        bool NotEmpty() const;
+
+        TipoListaEspera::size_type Pending();
+
+        /* Espera bloqueante hasta que alguna de las tareas registradas termine */
+        bool Wait();
+
+        /* Espera bloqueante con limite de tiempo hasta que alguna de las tareas registradas termine */
+        bool Wait(long msecs);
+
+        /* Registra una tarea para su espera */
+        void RegistrarEspera(WaitQueueTask* task);
+
+        /* Itera sobre todas las tareas pendientes y si tienen el flag de terminacion activo, vuelve a enviarles una senyal de terminacion */
+        void TerminarPendientes();
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region Interfaz privada
+
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region Atributos
+private:
+
+        wxSemaphore*               m_pSignaler;
+
+        TipoListaEspera m_ListaEspera;
+        TipoListaEspera::size_type m_Size;
+
+        //endregion
+
+        friend class WaitQueueTask;
+};
+//endregion
+
+class EXTAPI TipoListaNotificaciones : public std::list<WaitQueue*, std::allocator<WaitQueue*> > {};
+
+//----------------------------------------------------------------------------------------------------
+// Tarea de la cola de espera
+//----------------------------------------------------------------------------------------------------
+class EXTAPI WaitQueueTask : public GNC::GCS::ILockable
+{
+
+        //----------------------------------------------------------------------------------------------------
+        //region Definiciones
+public:
+
+        //endregion
+
+        //region Interfaz general
+public:
+        /* Senala todas las waitqueue a las que se ha registrado esta tarea */
+        void Signal();
+
+        /* Metodo que activa el flag de terminacion e invoca a DoTerminar() */
+        void Terminar();
+        //endregion
+
+        //region Interfaz privada
+protected:
+        /* Metodo privado a implementar en la tarea. Implementa la funcionalidad necesaria para que la tarea se detenga (de manera activa o pasiva, segun corresponda) */
+        virtual void DoTerminar() = 0;
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region Constructor y destructor
+public:
+
+        WaitQueueTask();
+
+        virtual ~WaitQueueTask();
+
+        //endregion
+
+        //region Atributos
+protected:
+
+        TipoListaNotificaciones            m_ListaNotificacion;
+        bool                               m_NotificarTerminacion;
+        //endregion
+
+        friend class WaitQueue;
+};
+//endregion
+
+class EXTAPI NotifyQueue
+{
+
+public:
+        NotifyQueue();
+        ~NotifyQueue();
+
+        void Wait();
+        void NotifyAll();
+
+        unsigned int Size() const;
+
+        bool Requested() const;
+
+        GNC::GCS::ILockable RegistryLock;
+        unsigned int RegistryCount;
+        wxSemaphore* NotifyObject;
+};
+}
+}
+#endif
diff --git a/cadxcore/api/iwidgets.cpp b/cadxcore/api/iwidgets.cpp
new file mode 100644
index 0000000..59e1f32
--- /dev/null
+++ b/cadxcore/api/iwidgets.cpp
@@ -0,0 +1,363 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iwidgets.h"
+#include "iwidgetsmanager.h"
+#include "icontexto.h"
+#include "widgetserializable.h"
+
+#include <api/controllers/icontroladorpermisos.h>
+
+#include <wx/xml/xml.h>
+#include <wx/menu.h>
+#include <wx/propiedades/wxpropiedades.h>
+
+#include <api/iwidgetsrenderer.h>
+#include <api/internationalization/internationalization.h>
+#include <vtk/vtkginkgoimageviewer.h>
+
+#include <sstream>
+
+//region "Serializado y desserializado"
+
+GNC::GCS::Nodo GNC::GCS::Nodo::Deserializar(wxXmlNode* nodo)
+{
+        Nodo n;
+        wxString strTmp = nodo->GetAttribute(wxT("x"),wxT("0.0"));
+        double doubleTmp;
+        strTmp.ToDouble(&doubleTmp);
+        n.x = (TComp) doubleTmp;
+
+        strTmp = nodo->GetAttribute(wxT("y"),wxT("0.0"));
+        strTmp.ToDouble(&doubleTmp);
+        n.y = (TComp) doubleTmp;
+
+        strTmp = nodo->GetAttribute(wxT("size"),wxT("10.0"));
+        strTmp.ToDouble(&doubleTmp);
+        n.m_Size = (float) doubleTmp;
+
+        n.m_Seleccionado = false;
+        n.m_Iluminado = false;
+        return n;
+}
+
+wxXmlNode* GNC::GCS::Nodo::Serializar()
+{
+        wxXmlNode* resultado = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxT("node"));
+        resultado->AddAttribute(new wxXmlProperty(wxT("x"),wxString::Format(wxT("%f"),x)));
+        resultado->AddAttribute(new wxXmlProperty(wxT("y"),wxString::Format(wxT("%f"),y)));
+        resultado->AddAttribute(new wxXmlProperty(wxT("size"),wxString::Format(wxT("%f"),m_Size)));
+        return resultado;
+}
+
+//endregion
+
+GNC::GCS::Widgets::IWidgetBuilder::IWidgetBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid, bool activar)
+{
+        m_ButtonMask = buttonMask;
+        m_GID = gid;
+        m_pManager = pManager;
+        if(activar) {
+                Activar();
+        }
+
+        m_FontSizeProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "widgets.fontSize").ObtenerValor<float>();
+        m_MaxTextWidthProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "widgets.maxTextWidth").ObtenerValor<float>();
+        m_LineWidthProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "widgets.lineWidth").ObtenerValor<float>();
+        m_DraggingLineWidthProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "widgets.draggingLineWidth").ObtenerValor<float>();
+}
+
+GNC::GCS::Widgets::IWidgetBuilder::~IWidgetBuilder()
+{
+        m_pManager->UnRegisterBuilder(this);
+}
+
+/* Obtiene el id de grupo de los widget construidos (tipo) */
+long GNC::GCS::Widgets::IWidgetBuilder::GetGID()
+{
+        return m_GID;
+}
+
+void GNC::GCS::Widgets::IWidgetBuilder::Activar()
+{
+        m_pManager->RegisterBuilder(this);
+}
+
+void GNC::GCS::Widgets::IWidgetBuilder::Desactivar()
+{
+        m_pManager->UnRegisterBuilder(this);
+}
+
+void GNC::GCS::Widgets::IWidgetBuilder::LanzarEventoCreacion(IWidget* w)
+{
+        m_pManager->LanzarEventoCreacion(w);
+}
+
+void GNC::GCS::Widgets::IWidgetBuilder::LanzarEventoModificacion(IWidget* w)
+{
+        m_pManager->LanzarEventoModificacion(w);
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::IWidgetBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_INVALIDO;
+}
+
+
+
+GNC::GCS::Widgets::IWidget::IWidget(GNC::GCS::IWidgetsManager* pManager, long vid, const char* Nombre, long gid, long tid, long uid)
+{
+        m_pManager            = pManager;
+        m_pRenderer           = NULL;
+        m_Nombre              = Nombre;
+        m_VID                 = vid;
+        m_TID                 = tid;
+        m_GID                 = gid;
+        m_UID                 = uid;
+        m_Seleccionado        = false;
+        m_Iluminado           = false;
+        m_Modificado          = false;
+        m_Oculto			  = false;
+        m_ReservaRecursos     = false;
+        m_TopLevel            = false;
+        m_NotificarCambios    = false;
+        m_IgnorarEventos      = false;
+
+
+        m_FontSizeProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "widgets.fontSize").ObtenerValor<float>();
+        m_MaxTextWidthProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "widgets.maxTextWidth").ObtenerValor<float>();
+        m_LineWidthProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "widgets.lineWidth").ObtenerValor<float>();
+        m_DraggingLineWidthProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "widgets.draggingLineWidth").ObtenerValor<float>();
+}
+
+GNC::GCS::Widgets::IWidget::~IWidget()
+{
+}
+
+//endregion
+
+//region "Interfaz especifica"
+
+//region Interfaz de dibujado de overlays
+
+bool GNC::GCS::Widgets::IWidget::EsMarcador() const
+{
+        return false;
+}
+
+bool GNC::GCS::Widgets::IWidget::DelimitaArea() const
+{
+        return false;
+}
+
+bool GNC::GCS::Widgets::IWidget::DelimitaTendencia() const
+{
+        return false;
+}
+
+bool GNC::GCS::Widgets::IWidget::ContieneFast(const GNC::GCS::Vector& ) const
+{
+        return false;
+}
+
+void GNC::GCS::Widgets::IWidget::GetBoundingBox(GNC::GCS::Vector& , GNC::GCS::Vector& ) const
+{
+
+}
+
+void GNC::GCS::Widgets::IWidget::GetPosicion(GNC::GCS::Vector& ) const
+{
+
+}
+
+void GNC::GCS::Widgets::IWidget::GetPuntoAnclaje(GNC::GCS::Vector& , const GNC::GCS::Vector& ) const
+{
+}
+
+//region Propiedades exclusivas de widgets de area
+
+float GNC::GCS::Widgets::IWidget::GetAreaMetrica() const
+{
+        return 0.0f;
+}
+
+float GNC::GCS::Widgets::IWidget::GetPerimetro() const
+{
+        return 0.0f;
+}
+
+void GNC::GCS::Widgets::IWidget::GetVertices(std::list<GNC::GCS::Vector>& ) const
+{
+}
+//endregion
+
+//region Propiedades exclusivas de widgets de tendencia
+
+void GNC::GCS::Widgets::IWidget::GetDistancia(GNC::GCS::Vector& ) const
+{
+}
+
+void GNC::GCS::Widgets::IWidget::GetRecorrido(std::list<GNC::GCS::Vector>& ) const
+{
+}
+
+//endregion
+
+//endregion Interfaz de dibujado de overlays
+
+void GNC::GCS::Widgets::IWidget::LiberarRecursos(GNC::GCS::IWidgetsRenderer* /*pKey*/)
+{
+}
+
+//endregion
+
+//region "Interfaz generica"
+
+void GNC::GCS::Widgets::IWidget::LanzarEventoModificacion()
+{
+        m_pManager->LanzarEventoModificacion(this);
+}
+
+void GNC::GCS::Widgets::IWidget::LanzarEventoDestruccion()
+{
+        m_pManager->LanzarEventoDestruccion(this);
+}
+
+//endregion
+
+//region menu contextual
+
+bool GNC::GCS::Widgets::IWidget::GetMenuContextual(wxMenu*, wxWindow* )
+{
+        return false;
+}
+
+inline std::string FloatToString(float valor)
+{
+        std::ostringstream ostr;
+        ostr.setf(std::ios::floatfield, std::ios::fixed );
+        ostr.precision(2);
+        ostr << valor;
+        return ostr.str();
+}
+
+inline std::string PuntoToString(GNC::GCS::Vector valor)
+{
+        std::ostringstream ostr;
+        ostr << valor;
+        return ostr.str();
+}
+
+std::string GNC::GCS::Widgets::IWidget::PuntoToStringMundo(const GNC::GCS::Vector& valor)
+{
+        double wp[4];
+        std::stringstream out;
+        out.precision(3);
+        const double ip[3] = {valor.x, valor.y,
+                              static_cast<double>(m_pManager->GetRendererActivo()->m_pImageViewer->GetTindex())
+                             };
+        m_pManager->GetRendererActivo()->m_pImageViewer->CoordenadasImagenACoordenadasMundo(ip, wp);
+        out << "[ x = " << wp[0] << ", y = " << wp[1] << ", z=" << wp[2] << "  ]";
+        return out.str();
+}
+
+void GNC::GCS::Widgets::IWidget::MostrarPropiedades(wxWindow* pParent)
+{
+        GNC::GUI::wxPropiedades::TMapaPropiedades mapaPropiedades;
+        mapaPropiedades[_Std("Name")] = m_Nombre;
+        if(this->DelimitaArea()) {
+                {
+                        std::ostringstream          os;
+                        os.setf(std::ios_base::floatfield, std::ios_base::fixed );
+                        os.precision(2);
+                        os.fill('0');
+                        float area = GetAreaMetrica();
+                        if (area > 1000000.0f) {
+                                os << area / 1000000.0f << " m².";
+                        } else if (area > 100.0f) {
+                                os << area / 100.0f << " cm².";
+                        } else {
+                                os << area << " mm².";
+                        }
+                        mapaPropiedades[_Std("Area")] = os.str();
+                }
+                {
+                        float perimetro = GetPerimetro();
+                        std::ostringstream          os;
+                        os.setf(std::ios_base::floatfield, std::ios_base::fixed );
+                        os.precision(2);
+                        os.fill('0');
+                        if (perimetro > 1000.0f) {
+                                os << perimetro / 1000.0f << " m.";
+                        } else if (perimetro > 10.0f) {
+                                os << perimetro / 10.0f << " cm.";
+                        } else {
+                                os << perimetro << " mm.";
+                        }
+                        mapaPropiedades[_Std("Perimeter")] = os.str();
+                }
+        }
+        if(this->DelimitaTendencia()) {
+                std::list<GNC::GCS::Vector> recorrido;
+                GetRecorrido(recorrido);
+                {
+                        std::ostringstream ostr;
+                        unsigned int i =0;
+                        for(std::list<GNC::GCS::Vector>::iterator it = recorrido.begin(); it!= recorrido.end(); ++it, i++) {
+                                ostr << PuntoToString((*it));
+                                if((i+1) != recorrido.size())
+                                        ostr << "," << std::endl;
+                        }
+                        mapaPropiedades[_Std("Travel (I)")] = ostr.str();
+                }
+                {
+                        std::stringstream out;
+                        unsigned int i =0;
+                        for(std::list<GNC::GCS::Vector>::iterator it = recorrido.begin(); it!= recorrido.end(); ++it, i++) {
+                                out << PuntoToStringMundo(*it);
+                                if((i+1) != recorrido.size())
+                                        out << "," << std::endl;
+                        }
+                        mapaPropiedades[_Std("Travel (M)")] = out.str();
+                }
+        }
+
+
+
+        GNC::GUI::wxPropiedades::TListaMapasPropiedades listaMapas;
+        listaMapas.push_back(mapaPropiedades);
+
+        InsertarPropiedades(listaMapas);
+
+        //si es serializable...
+        /*	GNC::GCS::Widgets::IWidgetSerializable* pSerializable = dynamic_cast<GNC::GCS::Widgets::IWidgetSerializable*>(this);
+        	if(pSerializable != NULL) {
+        		listaMapas.push_back(pSerializable->GetPropiedades());
+        	}*/
+        GNC::GUI::wxPropiedades pProp(pParent,m_Nombre, listaMapas);
+        pProp.ShowModal();
+
+}
+
+void GNC::GCS::Widgets::IWidget::InsertarPropiedades(TListaMapasPropiedades &/*listaMapaPropiedades*/)
+{
+}
+
+//endregion
diff --git a/cadxcore/api/iwidgets.h b/cadxcore/api/iwidgets.h
new file mode 100644
index 0000000..fc1acc7
--- /dev/null
+++ b/cadxcore/api/iwidgets.h
@@ -0,0 +1,553 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <list>
+#include <map>
+#include <string>
+#include <sstream>
+
+#include <api/api.h>
+#include <api/ibutton.h>
+#include <api/math/geometry.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+
+#include "ievento.h"
+#include "iwidgetsproperties.h"
+
+//region "Forward declarations"
+
+namespace GNC
+{
+namespace GCS
+{
+class Contexto3D;
+class IWidgetsManager;
+class IWidgetsRenderer;
+
+namespace Widgets
+{
+class IObservadorWidget;
+class IWidget;
+}
+}
+}
+
+class vtkWorldPointPicker;
+class WidgetRepresentation;
+class wxXmlNode;
+class wxMenu;
+class wxWindow;
+
+// Forward declarations
+
+//endregion
+
+#define DEFAULT_POINT_SIZE 10.0f
+#define TID_USER_ANNOTATION_WIDGET 1
+
+namespace GNC
+{
+
+namespace GCS
+{
+
+class EXTAPI Nodo : public Vector
+{
+public:
+        float m_Size;         // Tamano del punto
+        bool  m_Seleccionado; // Indicador de seleccion
+        bool  m_Iluminado;    // Indicador de iluminacion (hover)
+
+        inline Nodo()
+        {
+                m_Size = DEFAULT_POINT_SIZE;
+                m_Seleccionado = false;
+                m_Iluminado = false;
+        }
+
+        inline Nodo(const Vector::TComp& x, const Vector::TComp& y) : Vector(x, y)
+        {
+                m_Size = DEFAULT_POINT_SIZE;
+                m_Seleccionado = false;
+                m_Iluminado = false;
+        }
+
+        inline Nodo(const Nodo& otro):Vector(otro)
+        {
+
+                *this = otro;
+        }
+
+        inline Nodo(const Vector& otro):Nodo()
+        {
+
+                *this = otro;
+        }
+
+        inline ~Nodo()
+        {
+
+        }
+
+        //region "Serializado y desserializado"
+
+        static Nodo Deserializar(wxXmlNode* nodo);
+
+        wxXmlNode* Serializar();
+
+
+        //endregion
+
+        /* Comprueba si x, y cae centro del bounding box definido por:
+         * x0,y0 == [ p.x - umbral * m_Size, p.y - umbral * m_Size ]
+         * x1,y1 == [ p.x + umbral * m_Size, p.y + umbral * m_Size ]
+         * Se computa: | p.x - x | < (umbral * m_Size) && | p.y - y | < (umbral * m_Size)
+         *
+         * umbral es un factor de escala que transforma coordenadas_mundo a pixels_pantalla.
+         * Por tanto, el bounding box siempre estará definido en "m_Size" pixels pantalla.
+         */
+        inline bool Hits (const GNC::GCS::Vector& vector,  const Vector& umbral) const
+        {
+                GNC::GCS::Vector radix = umbral * m_Size;
+                GNC::GCS::Vector bb[2];
+                (vector - radix).IniciarBoundingBox(bb);
+                (vector + radix).ExtenderBoundingBox(bb);
+                if (this->DentroDeBoundingBox(bb[0], bb[1]))
+                        return true;
+                else
+                        return false;
+        }
+
+        inline bool Hits ( Vector::TComp x,  Vector::TComp y,  const Vector& umbral) const
+        {
+                return Hits(GNC::GCS::Vector(x, y), umbral);
+        }
+
+        inline Nodo& operator = (const Nodo& otro)
+        {
+                this->x = otro.x;
+                this->y = otro.y;
+                this->m_Size = otro.m_Size;
+                this->m_Seleccionado = otro.m_Seleccionado;
+                this->m_Iluminado = otro.m_Iluminado;
+                return *this;
+        }
+
+        inline Nodo& operator = (const Vector& otro)
+        {
+                this->x = otro.x;
+                this->y = otro.y;
+                return *this;
+        }
+
+        inline void Seleccionar(bool seleccionar)
+        {
+                m_Seleccionado = seleccionar;
+        }
+
+        inline void InvertirSeleccion()
+        {
+                Seleccionar(!EstaSeleccionado());
+        }
+
+        inline void Iluminar(bool iluminar)
+        {
+                m_Iluminado = iluminar;
+        }
+
+        inline bool EstaSeleccionado() const
+        {
+                return m_Seleccionado;
+        }
+
+        inline bool EstaIluminado() const
+        {
+                return m_Iluminado;
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const Nodo& n)
+        {
+                out << "[ x = " << n.x << ", y = " << n.y << "  ]";
+                return out;
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const Nodo* n)
+        {
+                if (n == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *n;
+                }
+                return out;
+        }
+
+        //region "Helper para deserializar"
+protected:
+        //endregion
+
+};
+
+namespace Widgets
+{
+
+// Clase que construye widgets
+class EXTAPI IWidgetBuilder
+{
+
+public:
+
+        typedef enum Estado {
+                WBS_Ninguno,
+                WBS_Creando,
+                WBS_Moviendo,
+                WBS_Seleccionando
+        } Estado;
+
+protected:
+        GNC::GCS::IWidgetsManager*  m_pManager;
+        long m_GID; // Group ID de los widgets construidos
+        GNC::GCS::TriggerButton m_ButtonMask;
+
+        // Default (common) properties
+        float m_FontSizeProp;
+        float m_MaxTextWidthProp;
+        float m_LineWidthProp;
+        float m_DraggingLineWidthProp;
+
+public:
+        //existen builders que no necesitan activarse, como la rejilla
+        IWidgetBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid = 0, bool activar = true);
+        virtual ~IWidgetBuilder();
+
+        virtual GNC::GCS::TriggerButton GetButtonMask() const
+        {
+                return m_ButtonMask;
+        }
+
+        /* Obtiene el id de grupo de los widget construidos (tipo) */
+        virtual long GetGID();
+
+        virtual void Activar();
+
+        virtual void Desactivar();
+
+        virtual void Render(Contexto3D* c) = 0;
+
+        virtual void LanzarEventoCreacion(IWidget* w);
+
+        virtual void LanzarEventoModificacion(IWidget* w);
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&) = 0;
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&) = 0;
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+};
+
+// Clase que representa un widget
+class EXTAPI IWidget
+{
+public:
+        typedef std::list<GNC::GCS::Widgets::IObservadorWidget*> ListaObservadores;
+        typedef bool (IWidget::*Muestreador) ( const GNC::GCS::Vector& punto ) const;
+
+        //region "Construccion y destruccion"
+protected:
+        GNC::GCS::IWidgetsManager*           m_pManager;
+        GNC::GCS::IWidgetsRenderer*          m_pRenderer; // Renderer asociado a widgets toplevel
+
+        std::string                m_Nombre;
+        long                       m_VID; // Id de la sub-vista
+        long                       m_UID; // ID de widget
+        long                       m_GID; // ID de grupo
+        long                       m_TID; // ID de tipo del widget
+        bool                       m_Seleccionado;
+        bool                       m_Iluminado;
+        bool                       m_Modificado;
+        bool                       m_ReservaRecursos;
+        bool                       m_NotificarCambios;
+        bool                       m_IgnorarEventos;
+
+        GNC::GCS::Vector           m_PosCursor;
+
+protected:
+        bool                       m_Oculto;
+        bool                       m_TopLevel; // Indica si el widget es top-level. Los widgets top level procesan los eventos los primeros y se renderizan siempre los ultimos.
+
+public:
+        IWidget(GNC::GCS::IWidgetsManager* pManager, long vid, const char* Nombre = "", long gid = 0, long tid = 0, long uid = 0);
+
+        virtual ~IWidget();
+        //endregion
+
+        //region "Interfaz especifica"
+
+        virtual void IgnorarEventos(bool ignorar)
+        {
+                if (ignorar == true) {
+                        Iluminar(false);
+                        Seleccionar(false);
+                }
+                if (ignorar != m_IgnorarEventos) {
+                        Modificar(true);
+                        m_IgnorarEventos = ignorar;
+                }
+        }
+
+        virtual bool IgnoraEventos()
+        {
+                return m_IgnorarEventos;
+        }
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&) = 0;
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&) = 0;
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral) = 0;
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices) = 0;
+
+        inline void NotificarCambios(bool notificar)
+        {
+                m_NotificarCambios = notificar;
+        }
+
+        inline bool RequiereNotificarCambios() const
+        {
+                return m_NotificarCambios;
+        }
+
+        inline IWidgetsRenderer* GetTopLevelRenderer() const
+        {
+                return m_pRenderer;
+        }
+
+        virtual void TickAnimation(double /*freq*/) {}
+
+        //region Interfaz de dibujado de overlays
+        virtual bool EsMarcador() const;
+        virtual bool DelimitaArea() const;
+
+        virtual bool DelimitaTendencia() const;
+
+        virtual bool ContieneFast(const GNC::GCS::Vector& ) const;
+
+        virtual void GetBoundingBox(GNC::GCS::Vector& , GNC::GCS::Vector& ) const;
+
+        virtual void GetPosicion(GNC::GCS::Vector& ) const;
+
+        virtual void GetPuntoAnclaje(GNC::GCS::Vector& , const GNC::GCS::Vector& ) const;
+
+        //region Propiedades exclusivas de widgets de area
+        virtual float GetAreaMetrica() const;
+
+        virtual float GetPerimetro() const;
+
+        virtual void GetVertices(std::list<GNC::GCS::Vector>& ) const;
+        //endregion
+
+        //region Propiedades exclusivas de widgets de tendencia
+
+        virtual void GetDistancia(GNC::GCS::Vector& ) const;
+
+        virtual void GetRecorrido(std::list<GNC::GCS::Vector>& ) const;
+        //endregion
+
+        //endregion Interfaz de dibujado de overlays
+
+        virtual void Render(Contexto3D* c) = 0;
+
+        virtual void OffscreenRender(Contexto3D* /*c*/) {}
+
+        virtual void Ocultar(bool ocultar)
+        {
+                if (m_Oculto != ocultar) {
+                        m_Oculto = ocultar;
+                        m_Modificado = true;
+                }
+        }
+
+        virtual void Modificar(bool modificar)
+        {
+                m_Modificado = modificar;
+        }
+
+        virtual void Seleccionar(bool seleccionar)
+        {
+                if (m_Seleccionado != seleccionar) {
+                        m_Seleccionado = seleccionar;
+                        m_Modificado = true;
+                }
+        }
+
+        virtual void InvertirSeleccion()
+        {
+                Seleccionar(!EstaSeleccionado());
+        }
+
+        virtual void Iluminar(bool iluminar)
+        {
+                if (m_Iluminado != iluminar) {
+                        m_Iluminado = iluminar;
+                        m_Modificado = true;
+                }
+        }
+
+        virtual void SeleccionarNodo(GNC::GCS::Nodo& nodo, bool seleccionar)
+        {
+                if (nodo.m_Seleccionado != seleccionar) {
+                        nodo.m_Seleccionado = seleccionar;
+                        m_Modificado = true;
+                }
+        }
+
+        virtual void IluminarNodo(GNC::GCS::Nodo& nodo, bool iluminar)
+        {
+                if (nodo.m_Iluminado != iluminar) {
+                        nodo.m_Iluminado = iluminar;
+                        m_Modificado = true;
+                }
+        }
+
+        virtual bool ReservaRecursos() const
+        {
+                return m_ReservaRecursos;
+        }
+
+        virtual void LiberarRecursos(GNC::GCS::IWidgetsRenderer* pKey);
+
+        /* Indica si el widget permite ser borrado automaticamente por el manager. Esto ocurre cuando el widget esta seleccionado y el manager recibe la tecla SUPR */
+        virtual bool SoportaAutoBorrado() const
+        {
+                return false;
+        }
+
+        //endregion
+
+        //region "Interfaz generica"
+        /* Obtiene el id de tipo del widget */
+        inline long GetVID() const
+        {
+                return m_VID;
+        }
+
+        /* Obtiene el id de tipo del widget */
+        inline long GetTID() const
+        {
+                return m_TID;
+        }
+
+        /* Obtiene el id unico del widget */
+        inline long GetUID() const
+        {
+                return m_UID;
+        }
+
+        /* Obtiene el id de grupo del widget (tipo) */
+        inline  long GetGID() const
+        {
+                return m_GID;
+        }
+
+        virtual bool EstaOculto() const
+        {
+                return m_Oculto;
+        }
+
+        virtual bool EstaModificado() const
+        {
+                return m_Modificado;
+        }
+
+        virtual bool EstaSeleccionado() const
+        {
+                return m_Seleccionado;
+        }
+
+        virtual bool EstaIluminado() const
+        {
+                return m_Iluminado;
+        }
+
+        virtual bool EsTopLevel() const
+        {
+                return m_TopLevel;
+        }
+
+        // Establece si el widget es top-level. Los widgets top level procesan los eventos los primeros y se renderizan siempre los ultimos.
+        inline void SetTopLevel(bool setTopLevel = true)
+        {
+                if (m_TopLevel != setTopLevel) {
+                        m_TopLevel = setTopLevel;
+                        m_Modificado = true;
+                }
+        }
+
+        void LanzarEventoModificacion();
+
+        void LanzarEventoDestruccion();
+
+        inline friend std::ostream& operator<<(std::ostream& out, const IWidget& w)
+        {
+                out << "[ VID = " << w.m_VID << ", nombre = " << w.m_Nombre.c_str() << ", GID = " << w.m_GID << ", TID = " << w.m_TID << ", UID = " << w.m_UID << " ]";
+                return out;
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const IWidget* w)
+        {
+                if (w == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *w;
+                }
+                return out;
+        }
+
+        //endregion
+        //region menu contextual
+        virtual bool GetMenuContextual(wxMenu*, wxWindow* );
+        virtual void MostrarPropiedades(wxWindow* pParent);
+
+        typedef std::map< std::string , std::string > TMapaPropiedades;
+        typedef std::list< TMapaPropiedades > TListaMapasPropiedades;
+        virtual void InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades);
+
+        //endregion
+
+protected:
+        std::string PuntoToStringMundo(const GNC::GCS::Vector& valor);
+        ListaObservadores   m_Observadores;   // Lista de observadores
+
+        // Default (common) properties
+        float m_LineWidthProp;
+        float m_FontSizeProp;
+        float m_MaxTextWidthProp;
+        float m_DraggingLineWidthProp;
+};
+}
+}
+}
diff --git a/cadxcore/api/iwidgetsmanager.cpp b/cadxcore/api/iwidgetsmanager.cpp
new file mode 100644
index 0000000..d6772a7
--- /dev/null
+++ b/cadxcore/api/iwidgetsmanager.cpp
@@ -0,0 +1,103 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iwidgetsmanager.h"
+#include "observers/iwidgetsobserver.h"
+
+GNC::GCS::IWidgetsManager::IWidgetsManager(GNC::GCS::IVista* pView) :
+        m_pDefaultEventListenerDelegate(NULL),
+        m_pRendererActivo(NULL),
+        m_Modified(false),
+        m_pView(pView),
+        m_Enabled(true),
+        m_cursor(GNC::GCS::Widgets::CUR_FLECHA)
+{ }
+
+GNC::GCS::IWidgetsManager::~IWidgetsManager()
+{
+        m_pView = NULL;
+}
+
+GNC::GCS::IVista* GNC::GCS::IWidgetsManager::GetVista()
+{
+        return m_pView;
+}
+
+void GNC::GCS::IWidgetsManager::MarcarModificado(bool modificado)
+{
+        m_Modified = modificado;
+}
+
+bool GNC::GCS::IWidgetsManager::EstaModificado()
+{
+        return m_Modified;
+}
+
+void GNC::GCS::IWidgetsManager::SetDefaultEventListenerDelegate(GNC::GCS::Events::ISubscriptorEventos* pDelegate)
+{
+        this->m_pDefaultEventListenerDelegate = pDelegate;
+}
+
+void GNC::GCS::IWidgetsManager::RegisterBuilder(GNC::GCS::Widgets::IWidgetBuilder* pBuilder)
+{
+        m_pBuilders.push_back(pBuilder);
+}
+
+void GNC::GCS::IWidgetsManager::UnRegisterBuilder(GNC::GCS::Widgets::IWidgetBuilder* pBuilder)
+{
+        for (ListaBuilders::iterator it = m_pBuilders.begin(); it != m_pBuilders.end(); ++it) {
+                if ( (*it) == pBuilder) {
+                        m_pBuilders.erase(it);
+                        break;
+                }
+        }
+}
+
+void GNC::GCS::IWidgetsManager::Enable(bool enabled)
+{
+        m_Enabled = enabled;
+}
+
+bool GNC::GCS::IWidgetsManager::IsEnabled()
+{
+        return m_Enabled;
+}
+
+//----------------------------------------------------------------------------------------------------
+//region "Interfaz de registro del IWidgetsRenderer"
+
+void GNC::GCS::IWidgetsManager::InsertarObservador(GNC::GCS::Widgets::IObservadorWidget* observador)
+{
+        m_Observadores.push_back(observador);
+}
+
+void GNC::GCS::IWidgetsManager::EliminarObservador(GNC::GCS::Widgets::IObservadorWidget* observador)
+{
+        IteradorListaObservadores it;
+
+        for (it = m_Observadores.begin(); it != m_Observadores.end() && (*it) != observador; ++it);
+
+        if (it != m_Observadores.end()) {
+                m_Observadores.erase(it);
+        }
+}
+
+//endregion
+
diff --git a/cadxcore/api/iwidgetsmanager.h b/cadxcore/api/iwidgetsmanager.h
new file mode 100644
index 0000000..7188593
--- /dev/null
+++ b/cadxcore/api/iwidgetsmanager.h
@@ -0,0 +1,261 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/autoptr.h>
+#include <api/math/geometry.h>
+#include <api/ievento.h>
+#include <api/iwidgetsproperties.h>
+
+// Forward declarations
+
+namespace GNC
+{
+namespace GCS
+{
+class IEventsController;
+class IWidgetsRenderer;
+class IContexto;
+class IAnnotator;
+class IImpresorOverlay;
+
+namespace Widgets
+{
+class IWidget;
+class IPublicadorEventos;
+class IObservadorWidget;
+class IWidgetBuilder;
+}
+}
+}
+
+// Forward declarations
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI ListaWidgets : public std::list< GNC::GCS::Widgets::IWidget*, std::allocator<GNC::GCS::Widgets::IWidget*> > {};
+class EXTAPI ListaBuilders : public std::list< GNC::GCS::Widgets::IWidgetBuilder*, std::allocator<GNC::GCS::Widgets::IWidgetBuilder*> > {};
+class EXTAPI ListaObservadores : public std::list<GNC::GCS::Widgets::IObservadorWidget* , std::allocator<GNC::GCS::Widgets::IObservadorWidget*> > {};
+class EXTAPI ListaRenderers : public std::list<GNC::GCS::IWidgetsRenderer*, std::allocator<GNC::GCS::IWidgetsRenderer*> > {};
+
+
+class EXTAPI IWidgetsManager : public GNC::GCS::Events::ISubscriptorEventos
+{
+
+public:
+
+        IWidgetsManager(GNC::GCS::IVista* pVista);
+
+        virtual ~IWidgetsManager();
+
+        GNC::GCS::IVista* GetVista();
+
+        void MarcarModificado(bool modificado);
+
+        bool EstaModificado();
+
+        void SetDefaultEventListenerDelegate(GNC::GCS::Events::ISubscriptorEventos* pDelegate);
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de registro de IWidgetBuilder's"
+
+protected:
+        ListaBuilders m_pBuilders;
+        GNC::GCS::Events::ISubscriptorEventos* m_pDefaultEventListenerDelegate;
+
+public:
+        void RegisterBuilder(GNC::GCS::Widgets::IWidgetBuilder* pBuilder);
+
+        void UnRegisterBuilder(GNC::GCS::Widgets::IWidgetBuilder* pBuilder);
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de registro de IWidget's"
+
+public:
+        typedef ListaWidgets::iterator IteradorListaWidgets;
+
+protected:
+        ListaWidgets m_Widgets;
+
+public:
+
+        virtual void Enable(bool enabled);
+        virtual bool IsEnabled();
+
+        virtual void InsertarWidget(GNC::GCS::Widgets::IWidget* pWidget, bool propagarEvento=true) = 0;
+
+        /** Removes a widget. Note: Frees the pWidget pointing! **/
+        virtual void EliminarWidget(const GNC::GCS::Widgets::IWidget* pWidget, bool propagarEvento=true) = 0;
+
+        /** Removes a widget. Note: Frees the pWidget pointing! **/
+        virtual void EliminarWidget(GNC::GCS::IWidgetsManager::IteradorListaWidgets& it, bool propagarEvento=true) = 0;
+
+        /** Removes all widgets. Note: Frees the pWidget pointers! **/
+        virtual void EliminarTodosLosWidgets(bool propagarEventos=true) = 0;
+
+        /** Remove all widgets except anyone with this tid **/
+        virtual void RemoveAllWidgetsExceptTID(long tid, bool propagateEvents=true) = 0;
+
+        virtual void RemoveUserAnnotationWidgets(bool propagateEvents=true) = 0;
+
+        virtual void OcultarTodosLosWidgets(bool ocultar, long GID) = 0;
+
+        /** Set visible on all widgets matching TID **/
+        virtual void SetVisibleByTID(bool visible, long tid) = 0;
+
+        /** Removes all widgets. Note: Frees the pWidget pointers! **/
+        virtual void EliminarTodosLosWidgets(long GID) = 0;
+
+        virtual void OcultarWidgetsDeSubVista(bool ocultar, long vid) = 0;
+
+        virtual GNC::GCS::ListaWidgets& GetListaWidgets() = 0;
+
+        virtual void GetListaWidgetsSubVista(long vid, GNC::GCS::ListaWidgets& lista) = 0;
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de registro del IWidgetsRenderer"
+
+public:
+
+        virtual void SetRendererActivo(GNC::GCS::IWidgetsRenderer* pRenderer) = 0;
+
+        inline GNC::GCS::IWidgetsRenderer* GetRendererActivo()
+        {
+                return m_pRendererActivo;
+        }
+
+        virtual void InsertarRenderer(GNC::GCS::IWidgetsRenderer* pRenderer) = 0;
+
+        virtual void EliminarRenderer(GNC::GCS::IWidgetsRenderer* pRenderer) = 0;
+
+        virtual void LiberarRecursos(GNC::GCS::IWidgetsRenderer* pRenderer) = 0;
+
+protected:
+        GNC::GCS::IWidgetsRenderer* m_pRendererActivo;
+
+        ListaRenderers m_Renderers;
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de Observadores"
+
+public:
+        typedef ListaObservadores::iterator IteradorListaObservadores;
+
+protected:
+        ListaObservadores m_Observadores;
+
+public:
+
+        void InsertarObservador(GNC::GCS::Widgets::IObservadorWidget* observador);
+
+        void EliminarObservador(GNC::GCS::Widgets::IObservadorWidget* observador);
+
+        virtual void NotificarCreacion(GNC::GCS::Widgets::IWidget* pWidget) = 0;
+
+        virtual void NotificarDestruccion(GNC::GCS::Widgets::IWidget* pWidget) = 0;
+
+        virtual void NotificarModificacion(GNC::GCS::Widgets::IWidget* pWidget) = 0;
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz general"
+        virtual void SetAnnotator(const GNC::GCS::Ptr<GNC::GCS::IAnnotator>& pAnnotador) = 0;
+        virtual const GNC::GCS::Ptr<GNC::GCS::IAnnotator>& GetAnnotator() = 0;
+        virtual void ShowAnnotations(bool show) = 0;
+        virtual bool IsShownAnnotations() = 0;
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz general"
+
+public:
+
+        virtual void Render() = 0;
+
+        virtual void TickAnimation(double freq) = 0;
+
+        virtual void EnableAnimation() = 0;
+
+        virtual void DisableAnimation() = 0;
+
+        /* Este metodo solo debe ser invocado por IWidgetsRenderer */
+        virtual void RenderPrivate(Contexto3D* c) = 0;
+
+        /*imprime los widgets sobre la imagen que recibe, definida por anchura y altura*/
+        virtual void OffScreenRender(GNC::GCS::Contexto3D* c) = 0;
+
+        /* Metodo que indica al manager que es preciso hacer un render() */
+        virtual void Modificado() = 0;
+
+        virtual void ModificadoPorWidget(GNC::GCS::Widgets::IWidget* w) = 0;
+
+        virtual void DefaultMouseEventProcess(GNC::GCS::Events::EventoRaton& evento) = 0;
+
+        virtual void DefaultKeyEventProcess(GNC::GCS::Events::EventoTeclado& event) = 0;
+
+        // Propaga a todos los widgets no ocultos un hit test de seleccion. Los widgets se seleccionan si validan un hittest con el bounding box especificado.
+        virtual void PropagarHitTestSeleccion(GNC::GCS::Vector* vertices, int numVertices) = 0;
+
+protected:
+        bool          m_Modified;
+        GNC::GCS::IVista*		  m_pView;
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de selecciones"
+
+protected:
+        float m_BoundingBoxSeleccion[4];
+        ListaWidgets m_WidgetsSeleccionados;
+        bool m_Enabled;
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de acceso al sistema de eventos ginkgo"
+
+public:
+
+        virtual void LanzarEventoCreacion(GNC::GCS::Widgets::IWidget* w) = 0;
+        virtual void LanzarEventoModificacion(GNC::GCS::Widgets::IWidget* w) = 0;
+        virtual void LanzarEventoDestruccion(GNC::GCS::Widgets::IWidget* w) = 0;
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        virtual void SetCursor(GNC::GCS::Widgets::TipoCursor cursor) = 0;
+        GNC::GCS::Widgets::TipoCursor m_cursor;
+        //endregion
+
+};
+}
+}
diff --git a/cadxcore/api/iwidgetsproperties.h b/cadxcore/api/iwidgetsproperties.h
new file mode 100644
index 0000000..111f096
--- /dev/null
+++ b/cadxcore/api/iwidgetsproperties.h
@@ -0,0 +1,285 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#define _GMAX(a,b) ( a > b? a : b )
+#define _GMIN(a,b) ( a < b? a : b )
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+//region "Cursores
+typedef enum TipoCursor {
+        CUR_INVALIDO,
+        CUR_TRANSPARENTE,
+        CUR_LUPA,
+        CUR_SELECCION,
+        CUR_FLECHA,
+        CUR_MANO_ABIERTA,
+        CUR_MANO_CERRADA,
+        CUR_CREAR_LINEA,
+        CUR_CREAR_ANGULO_COBB,
+        CUR_CREAR_ANGULO_NORMAL,
+        CUR_CREAR_ANOTACION,
+        CUR_CREAR_ELIPSE,
+        CUR_CREAR_PUNTO,
+        CUR_CREAR_POLIGONO,
+        CUR_CREAR_RECTANGULO,
+        CUR_WINDOW_LEVEL,
+        CUR_ANCLA_SIMPLE,
+        CUR_ANCLA_COMPUESTA,
+        CUR_ROTATION
+} TipoCursor;
+
+class Color
+{
+
+private:
+        float R;
+        float G;
+        float B;
+        float A;
+
+public:
+
+        inline Color()
+        {
+                R = 1.0f;
+                G = 1.0f;
+                B = 1.0f;
+                A = 1.0f;
+        }
+
+        inline Color(const Color& c)
+        {
+                *this = c;
+        }
+
+        inline Color (float r, float g, float b, float a = 1.0f)
+        {
+                R = Clamp(r);
+                G = Clamp(g);
+                B = Clamp(b);
+                A = Clamp(a);
+        }
+
+        inline Color (unsigned char r, unsigned char g, unsigned char b, unsigned char a = 255)
+        {
+                R = Clamp((float)r / 255.0f);
+                G = Clamp((float)g / 255.0f);
+                B = Clamp((float)b / 255.0f);
+                A = Clamp((float)a / 255.0f);
+        }
+
+        inline Color& operator=(const Color& o)
+        {
+                R = o.R;
+                G = o.G;
+                B = o.B;
+                A = o.A;
+                return *this;
+        }
+
+        inline bool operator==(const Color& o)
+        {
+                return (R == o.R && G == o.G && B == o.B && A == o.A);
+        }
+
+        inline bool operator!=(const Color& o)
+        {
+                return !( (*this) == o);
+        }
+
+        inline Color operator*(float val) const
+        {
+                Color c(*this);
+                c.R = Clamp(c.R * val);
+                c.G = Clamp(c.G * val);
+                c.B = Clamp(c.B * val);
+                c.A = Clamp(c.A * val);
+                return c;
+        }
+
+        inline Color operator-(float val) const
+        {
+                Color c(*this);
+                c.R = Clamp(c.R - val);
+                c.G = Clamp(c.G - val);
+                c.B = Clamp(c.B - val);
+                return c;
+        }
+
+        inline Color operator-(const Color& o) const
+        {
+                Color c(*this);
+                c.R = Clamp(c.R - o.R);
+                c.G = Clamp(c.G - o.G);
+                c.B = Clamp(c.B - o.B);
+                return c;
+        }
+
+        inline Color operator/(float val) const
+        {
+                Color c(*this);
+                c.R = Clamp(c.R / val);
+                c.G = Clamp(c.G / val);
+                c.B = Clamp(c.B / val);
+                c.A = Clamp(c.A / val);
+                return c;
+        }
+
+        inline Color Complementario() const
+        {
+                float metrica = Max() + Min();
+                return (*this) - metrica;
+        }
+
+        inline Color Complementar()
+        {
+                return *this = Complementario();
+        }
+
+        inline Color Inverso() const
+        {
+                return Color(1.0f, 1.0f, 1.0f) - (*this);
+        }
+
+        inline float Clamp(float valor) const
+        {
+                return _GMAX(0.0f, _GMIN(1.0f, valor));
+        }
+
+        inline float Max() const
+        {
+                return _GMAX(R, _GMAX(G, B));
+        }
+
+        inline float Min() const
+        {
+                return _GMIN(R, _GMIN(G, B));
+        }
+
+        inline Color& Invertir()
+        {
+                return (*this = Inverso());
+        }
+
+        inline unsigned char R8() const
+        {
+                return (unsigned char) (this->R * 255.0f);
+        }
+
+        inline unsigned char G8() const
+        {
+                return (unsigned char) (G * 255.0f);
+        }
+
+        inline unsigned char B8() const
+        {
+                return (unsigned char) (B * 255.0f);
+        }
+
+        inline unsigned char A8() const
+        {
+                return (unsigned char) (A * 255.0f);
+        }
+
+        inline float RF() const
+        {
+                return R;
+        }
+
+        inline float GF() const
+        {
+                return G;
+        }
+
+        inline float BF() const
+        {
+                return B;
+        }
+
+        inline float AF() const
+        {
+                return A;
+        }
+
+        inline void SetRF(float r)
+        {
+                R = Clamp(r);
+        }
+
+        inline void SetGF(float g)
+        {
+                G = Clamp(g);
+        }
+
+        inline void SetBF(float b)
+        {
+                B = Clamp(b);
+        }
+
+        inline void SetAF(float a)
+        {
+                A = Clamp(a);
+        }
+
+        inline void SetR8(unsigned char r)
+        {
+                R = Clamp((float)r / 255.0f);
+        }
+
+        inline void SetG8(unsigned char g)
+        {
+                G = Clamp((float)g / 255.0f);
+        }
+
+        inline void SetB8(unsigned char b)
+        {
+                B = Clamp((float)b / 255.0f);
+        }
+
+        inline void SetA8(unsigned char a)
+        {
+                A = Clamp((float)a / 255.0f);
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const Color& c)
+        {
+                return out << "[ R = " << c.R << ", G = " << c.G << ", B = " << c.B << ", A = " << c.A << " ]";
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const Color* c)
+        {
+                if (c != NULL) {
+                        return out << *c;
+                } else {
+                        return out << "[ NULL ]";
+                }
+        }
+};
+}
+}
+}
diff --git a/cadxcore/api/iwidgetsrenderer.cpp b/cadxcore/api/iwidgetsrenderer.cpp
new file mode 100644
index 0000000..a7e54bb
--- /dev/null
+++ b/cadxcore/api/iwidgetsrenderer.cpp
@@ -0,0 +1,116 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iwidgetsrenderer.h"
+#include "iwidgetsmanager.h"
+#include "ioverlay.h"
+#include "icontexto.h"
+
+
+GNC::GCS::IWidgetsRenderer::IWidgetsRenderer()
+{
+        m_pManager = NULL;
+        m_pImageViewer = NULL;
+        m_pPicker = NULL;
+        m_pRepresentation = NULL;
+        m_c = NULL;
+        m_pIOverlay = NULL;
+        m_VID = 0;
+        m_Modificado = false;
+}
+
+GNC::GCS::IWidgetsRenderer::~IWidgetsRenderer()
+{
+        if (m_pManager != NULL) {
+                m_pManager->EliminarRenderer(this);
+                EliminarListener(m_pManager);
+        }
+}
+
+//----------------------------------------------------------------------------------------------------
+//region "Interfaz de impresión de overlays"
+
+void GNC::GCS::IWidgetsRenderer::SetIOverlay(IImpresorOverlay* pOverlay)
+{
+        m_pIOverlay = pOverlay;
+}
+
+//endregion
+
+
+//----------------------------------------------------------------------------------------------------
+//region "Interfaz de configuracion de vistas/slices"
+
+void GNC::GCS::IWidgetsRenderer::Activar()
+{
+        OnActivar();
+        if (m_pManager != NULL) {
+                m_pManager->SetRendererActivo(this);
+        }
+}
+
+/* Establece el id de sub-vista activo. Los widgets se asocian a un VID */
+void GNC::GCS::IWidgetsRenderer::SetVID(long vid, bool render)
+{
+        if (m_VID != vid) {
+                //long oldVID = m_VID;
+                m_VID = vid;
+                if (render) {
+                        PostRender();
+                }
+        }
+}
+
+/* Propaga la notificación de activación de este renderer hacia las clases base */
+void GNC::GCS::IWidgetsRenderer::OnActivar()
+{
+
+}
+
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//region "Interfaz de configuracion del manager"
+
+void GNC::GCS::IWidgetsRenderer::SetManager(IWidgetsManager* pManager)
+{
+        if (m_pManager != pManager) {
+                IWidgetsManager* oldManager = m_pManager;
+
+                m_pManager = pManager;
+
+                if (oldManager != NULL) {
+                        oldManager->EliminarRenderer(this);
+                        EliminarListener(oldManager);
+                }
+
+                if (m_pManager != NULL) {
+                        m_pManager->InsertarRenderer(this);
+                        InsertarListener(m_pManager);
+                }
+        }
+}
+
+void GNC::GCS::IWidgetsRenderer::SetRepresentation(WidgetRepresentation* pWidget)
+{
+        m_pRepresentation = pWidget;
+}
+
+//endregion
diff --git a/cadxcore/api/iwidgetsrenderer.h b/cadxcore/api/iwidgetsrenderer.h
new file mode 100644
index 0000000..f317b98
--- /dev/null
+++ b/cadxcore/api/iwidgetsrenderer.h
@@ -0,0 +1,161 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/ievento.h>
+#include <api/math/geometry.h>
+
+//----------------------------------------------------------------------------------------------------
+// Forward declarations
+
+namespace GNC
+{
+namespace GCS
+{
+class IImpresorOverlay;
+class IWidgetsManager;
+
+namespace Widgets
+{
+class IWidget;
+class IWidgetBuilder;
+}
+}
+}
+
+class vtkGinkgoImageViewer;
+class vtkWorldPointPicker;
+class WidgetRepresentation;
+class wxWindow;
+
+// End Forward declarations
+
+namespace GNC
+{
+namespace GCS
+{
+
+/* Clase que solicita al modelo de widgets que redibuje sus widgets */
+class EXTAPI IWidgetsRenderer : public GNC::GCS::Events::IPublicadorEventos
+{
+public:
+        typedef GNC::GCS::Contexto3D TContexto;
+
+        TContexto* m_c;
+        IImpresorOverlay* m_pIOverlay;
+
+        IWidgetsRenderer();
+
+        virtual ~IWidgetsRenderer();
+
+        /* Metodo que indica al manager que es preciso hacer un render() */
+        void Modificar(bool modificar)
+        {
+                m_Modificado = modificar;
+        }
+
+        inline bool EstaModificado()
+        {
+                return m_Modificado;
+        }
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de impresión de overlays"
+
+public:
+
+        void SetIOverlay(IImpresorOverlay* pOverlay);
+
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de configuracion de vistas/slices"
+
+public:
+
+        /* Propaga la notificación de activación de este renderer hacia el manager */
+        void Activar();
+
+        /* Establece el id de sub-vista activo. Los widgets se asocian a un VID. */
+        void SetVID(long vid, bool render);
+
+        /* Obtiene el id de sub-vista activo. Los widgets se asocian a un VID. */
+        inline long GetVID(void)
+        {
+                return m_VID;
+        }
+
+protected:
+
+        /* Propaga la notificación de activación de este renderer hacia las clases base */
+        virtual void OnActivar();
+
+        long m_VID;
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de configuracion del manager"
+
+public:
+        void SetManager(GNC::GCS::IWidgetsManager* pManager);
+
+        void SetRepresentation(WidgetRepresentation* pWidget);
+
+        virtual void WSetCurrent() = 0;
+
+protected:
+        GNC::GCS::IWidgetsManager*      m_pManager;
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de transformacion de coordenadas"
+public:
+
+        /** Project display to world **/
+        virtual void DisplayToWorld(double displayPos[3], double worldPos[4]) = 0;
+
+        /** Unproject work to display **/
+        virtual void WorldToDisplay(double worldPos[4], double displayPos[3]) = 0;
+
+        /** Gets camera vectors (camPos, camDir, camUp) **/
+        virtual void GetCamVectors(double camPos[4], double camDir[4], double camUp[4]) = 0;
+
+        /** shots a ray from unproyected displayPos with camera direction and intersects with image plane **/
+        virtual void RayPick(double displayPos[2], double worldPos[4]) = 0;
+
+        /** shots a ray from campPos with camera direction and intersects with image plane **/
+        virtual void RayPick(double worldPos[4]) = 0;
+
+        //endregion
+
+protected:
+
+public:
+        virtual void PostRender(bool inmediato = false) = 0;
+
+public:
+        vtkGinkgoImageViewer* m_pImageViewer;
+        vtkWorldPointPicker*  m_pPicker;
+        WidgetRepresentation* m_pRepresentation;
+        std::string sid;
+        bool                  m_Modificado;
+};
+}
+}
diff --git a/cadxcore/api/iwizard.cpp b/cadxcore/api/iwizard.cpp
new file mode 100644
index 0000000..c05337c
--- /dev/null
+++ b/cadxcore/api/iwizard.cpp
@@ -0,0 +1,144 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/string.h>
+#include "iwizard.h"
+
+IWizard::~IWizard()
+{
+}
+
+IPasoWizard::IPasoWizard(IWizard * pWizard) :
+        m_pListaFicheros(NULL),
+        m_pWizard(pWizard)
+{
+}
+
+IPasoWizard::~IPasoWizard()
+{
+}
+
+bool IPasoWizard::Attach()
+{
+        return true;
+}
+
+bool IPasoWizard::Detach()
+{
+        return true;
+}
+
+std::string IPasoWizard::GetSubTitle()
+{
+        return "";
+}
+
+bool IPasoWizard::IsSkipped()
+{
+        return false;
+}
+
+bool IPasoWizard::AllowCancel()
+{
+        return true;
+}
+
+void IPasoWizard::OnCancelled() {}
+
+void IPasoWizard::AsignarListaFicheros(ListaFicheros &lista)
+{
+        m_pListaFicheros=&lista;
+}
+
+void IPasoWizard::SiguientePaso()
+{
+        m_pWizard->SiguientePaso();
+}
+
+void IPasoWizard::EnableSiguiente(bool enable)
+{
+        m_pWizard->EnableSiguiente(enable);
+}
+
+void IPasoWizard::EnableAnterior(bool enable)
+{
+        m_pWizard->EnableAnterior(enable);
+}
+
+void IPasoWizard::EnableCancelar(bool enable)
+{
+        m_pWizard->EnableCancelar(enable);
+}
+//helpers
+bool IPasoWizard::ValidarDouble(std::string strNumero, double min, double max, bool obligatorio, bool estricto)
+{
+        if(strNumero != "") {
+                wxString wxStr = wxString::FromUTF8(strNumero.c_str());
+                double valor;
+                if(!wxStr.ToDouble(&valor)) {
+                        return false;
+                } else {
+                        if (estricto) {
+                                if(valor <= min || valor >= max) {
+                                        return false;
+                                }
+                        } else {
+                                if(valor < min || valor > max) {
+                                        return false;
+                                }
+                        }
+                }
+                return true;
+        } else {
+                if(obligatorio) {
+                        return false;
+                } else {
+                        return true;
+                }
+        }
+}
+
+bool IPasoWizard::ValidarLong(std::string strNumero, long min, long max, bool obligatorio, bool estricto)
+{
+        if(strNumero != "") {
+                wxString wxStr = wxString::FromUTF8(strNumero.c_str());
+                long valor;
+                if(!wxStr.ToLong(&valor)) {
+                        return false;
+                } else {
+                        if (estricto) {
+                                if(valor<=min || valor >=max) {
+                                        return false;
+                                }
+                        } else {
+                                if(valor < min || valor > max) {
+                                        return false;
+                                }
+                        }
+                }
+                return true;
+        } else {
+                if(obligatorio) {
+                        return false;
+                } else {
+                        return true;
+                }
+        }
+}
diff --git a/cadxcore/api/iwizard.h b/cadxcore/api/iwizard.h
new file mode 100644
index 0000000..9c7c668
--- /dev/null
+++ b/cadxcore/api/iwizard.h
@@ -0,0 +1,87 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+#include <api/api.h>
+
+class EXTAPI IWizard
+{
+public:
+        virtual ~IWizard();
+
+        virtual void SiguientePaso() = 0;
+        virtual void EnableSiguiente(bool enable) = 0;
+
+        virtual void EnableAnterior(bool enable) = 0;
+
+        virtual void EnableCancelar(bool enable) = 0;
+};
+
+class EXTAPI IPasoWizard
+{
+public:
+        typedef std::list<std::string> ListaFicheros;
+protected:
+
+        ListaFicheros* m_pListaFicheros;
+        IWizard* m_pWizard;
+
+public:
+        IPasoWizard(IWizard * pWizard);
+        virtual ~IPasoWizard();
+
+        virtual bool Attach();
+
+        virtual bool Detach();
+
+        virtual std::string GetTitle()=0;
+
+        virtual std::string GetSubTitle();
+
+        virtual bool Siguiente()=0;
+
+        virtual bool Anterior()=0;
+
+        virtual bool Cancelar()=0;
+
+        virtual bool Validar()=0;
+
+        virtual bool IsSkipped();
+
+        virtual bool AllowCancel() ;
+
+        virtual void OnCancelled();
+
+        virtual void AsignarListaFicheros(ListaFicheros &lista);
+
+        virtual void SiguientePaso();
+
+        virtual void EnableSiguiente(bool enable);
+
+        virtual void EnableAnterior(bool enable);
+
+        virtual void EnableCancelar(bool enable);
+        //helpers
+        virtual bool ValidarDouble(std::string strNumero, double min, double max, bool obligatorio = false, bool estricto = true);
+
+        virtual bool ValidarLong(std::string strNumero, long min, long max, bool obligatorio = false, bool estricto = true);
+};
diff --git a/cadxcore/api/math/geometry.h b/cadxcore/api/math/geometry.h
new file mode 100644
index 0000000..cd7feeb
--- /dev/null
+++ b/cadxcore/api/math/geometry.h
@@ -0,0 +1,1659 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef GEOMETRY2D_H
+#define GEOMETRY2D_H
+
+#if defined(max)
+#undef max
+#endif
+#if defined(min)
+#undef min
+#endif
+
+#include <list>
+#include <limits>
+#include <iostream>
+
+#include <api/api.h>
+#include <api/globals.h>
+#include <api/math/geometry_defs.h>
+
+#define GEOMETRY2D_NO_TEMPLATE
+
+#if defined(GEOMETRY2D_NO_TEMPLATE)
+
+namespace GNC
+{
+namespace GCS
+{
+
+class Matriz;
+
+class Vector
+{
+public:
+
+        typedef PRECISION_COMPONENTE_POR_DEFECTO TComp;
+        typedef PRECISION_REALES_POR_DEFECTO     TReal;
+
+        TComp& x;           // Coordenada mundo X
+        TComp& y;           // Coordenada mundo Y
+        TComp& z;           // Coordenada mundo Z (Allways zero)
+        TComp& w;           // Coordenada mundo W
+
+        TComp v[4];
+
+public:
+
+        static inline const Vector NaN()
+        {
+                return Vector(NaNDeComponentes(), NaNDeComponentes());
+        }
+
+        static inline const Vector Inf()
+        {
+                return Vector(InfinitoDeComponentes(), InfinitoDeComponentes());
+        }
+
+        static inline const Vector Zero()
+        {
+                return Vector();
+        }
+
+        static inline const Vector Unidad()
+        {
+                return Vector(1.0, 1.0);
+        }
+
+        //----------------------------------------------
+        //-- Constructores y destructores
+        //----------------------------------------------
+
+        inline Vector() : x(v[0]), y(v[1]), z(v[2]), w(v[3])
+        {
+                x = (TComp)0.0;
+                y = (TComp)0.0;
+                z = (TComp)0.0;
+                w = (TComp)1.0;
+        }
+
+        /* Constructor copia transparente */
+        inline Vector(const Vector& b) : x(v[0]), y(v[1]), z(v[2]), w(v[3])
+        {
+                x = b.x;
+                y = b.y;
+                z = (TComp)0.0;
+                w = (TComp)1.0;
+        }
+
+        template <class TipoComp1, class TipoComp2>
+        inline Vector(const TipoComp1& valX, const TipoComp2& valY)  : x(v[0]), y(v[1]), z(v[2]), w(v[3])
+        {
+                x = (TComp) valX;
+                y = (TComp) valY;
+                z = (TComp)0.0;
+                w = (TComp)1.0;
+        }
+
+        template <class TipoComp> inline Vector(const TipoComp* const valor)  : x(v[0]), y(v[1]), z(v[2]), w(v[3])
+        {
+                x = valor[0];
+                y = valor[1];
+                z = (TComp)0.0;
+                w = (TComp)1.0;
+        }
+
+        inline ~Vector()
+        {
+        }
+
+
+        //----------------------------------------------
+        //-- Asignacion explicita
+        //----------------------------------------------
+
+        /* Asigna las coordenadas al vector */
+        template <class TipoComp1, class TipoComp2>
+        inline Vector& Asignar(const TipoComp1& valX, const TipoComp2& valY)
+        {
+                x = (TComp) valX;
+                y = (TComp) valY;
+                return (*this);
+        }
+
+        /* Asigna el valor a todas las coordenadas del vector */
+        template <class TipoComp> inline Vector& Asignar(const TipoComp& valor)
+        {
+                x = (TComp) valor;
+                y = (TComp) valor;
+                return *this;
+        }
+
+        /* Asigna el valor a todas las coordenadas del vector */
+        template <class TipoComp> inline void Exportar(TipoComp* ptr)
+        {
+                ptr[0] = (TipoComp) x;
+                ptr[1] = (TipoComp) y;
+        }
+
+        //----------------------------------------------
+        //-- Normas Vectoriales, Distancias y Producto Interior
+        //----------------------------------------------
+
+        inline TComp Norma1() const
+        {
+                return std::abs(x) + std::abs(y);
+        }
+
+        /* Devuelve la norma 2 (euclidea) al cuadrado */
+        inline TComp Norma2Cuadrado() const
+        {
+                return (TReal)x * (TReal)x + (TReal)y * (TReal)y;
+        }
+
+        /* Devuelve la norma 2 (euclidea) */
+        inline TReal Norma2() const
+        {
+                return std::sqrt((TReal) (*this).Norma2Cuadrado());
+        }
+
+        inline TReal NormaEnesima(unsigned int n) const
+        {
+                return std::pow( std::pow((TReal)x, (TReal)n) + std::pow((TReal)y, (TReal)n), (TReal)1.0f / (TReal)n);
+        }
+
+        inline TComp NormaInfinito() const
+        {
+                return std::max<TReal>(x, y);
+        }
+
+        /* Devuelve la distancia euclidea a "b" */
+        inline TReal DistanciaEuclidea(const Vector& b) const
+        {
+                const Vector& a = *this;
+                return std::sqrt( (double) (b - a).Norma2Cuadrado() );
+        }
+
+        /* Devuelve el cuadrado de la distancia euclidea */
+        inline TReal DistanciaEuclideaCuadrado(const Vector& b) const
+        {
+                const Vector& a = *this;
+                return (b - a).Norma2Cuadrado();
+        }
+
+        /* Normaliza un vector teniendo en cuenta singularidades */
+        inline Vector& Normalizar()
+        {
+
+                Vector& a = (*this);
+
+                const TReal& norma = a.Norma2();
+
+                if ( std::abs(norma) < EpsilonDeReales()) {
+                        a.Asignar( (TComp)0.0f, (TComp)0.0f);
+                } else {
+                        a /= norma;
+                }
+                return a;
+        }
+
+        /* Devuelve el vector normalizado teniendo en cuenta singularidades */
+        inline Vector Normalizado() const
+        {
+                return Vector(*this).Normalizar();
+        }
+
+        /* Devuelve el producto escalar por b */
+        inline TReal ProductoEscalar(const Vector& b) const
+        {
+                const Vector& a = *this;
+                return ((TReal)a.x * (TReal)b.x) + ((TReal)a.y * (TReal)b.y);
+        }
+
+        /* Devuelve la dimension z del producto vectorial */
+        inline TReal ProductoVectorialZ(const Vector& b) const
+        {
+                const Vector& a = *this;
+                return ((TReal)a.y * (TReal)b.x) - ((TReal)a.x * (TReal)b.y);
+        }
+
+        //----------------------------------------------
+        //-- Angulos
+        //----------------------------------------------
+
+        /* Devuelve el angulo { entre [0, -PI) } que forma con "b" */
+        inline TReal Angulo(const Vector& b) const
+        {
+                const Vector& a = (*this);
+                const TReal& angulo = std::acos( ((TReal) a.ProductoEscalar(b)) / (a.Norma2() * b.Norma2()) );
+                if ( (TReal) a.ProductoVectorialZ(b) < 0.0f) {
+                        return angulo;
+                } else {
+                        return -1.0f * angulo;
+                }
+        }
+
+        inline TReal Angulo() const
+        {
+                return std::atan2( (TReal) y, (TReal) x );
+        }
+
+        /* Devuelve el angulo entre pi/2 y -pi/2 tomando como origen el punto con abscisa mas baja */
+        inline TReal AnguloSobreAbscisa() const
+        {
+                const TReal& angulo = Angulo();
+                if (angulo > (TReal)M_PI_2) {
+                        return (TReal)-M_PI + angulo;
+                } else if (angulo < (TReal)-M_PI_2) {
+                        return (TReal)M_PI + angulo;
+                } else {
+                        return angulo;
+                }
+        }
+
+        /* Devuelve el angulo rotado entre pi/2 y -pi/2 tomando como origen el punto con abscisa mas baja teniendo en cuenta una rotacion del eje z.*/
+        inline TReal AnguloRotadoSobreAbscisa(const TReal& rotacion) const
+        {
+                const TReal& angulo = Angulo() - rotacion;
+                if (angulo > (TReal)M_PI_2) {
+                        return (TReal)-M_PI + angulo;
+                } else if (angulo < (TReal)-M_PI_2) {
+                        return (TReal)M_PI + angulo;
+                } else {
+                        return angulo;
+                }
+        }
+
+        /* Devuelve la pendiente del vector */
+        inline TReal Pendiente() const
+        {
+
+                if (std::abs(x) < EpsilonDeComponentes()) {
+                        if (std::abs(y) < EpsilonDeComponentes()) {
+                                return NaNDeReales();
+                        } else {
+                                return (TReal)0.0f;
+                        }
+                } else {
+                        return (TReal)y / (TReal)x;
+                }
+        }
+
+        //----------------------------------------------
+        //-- Ajuste e interpolacion
+        //----------------------------------------------
+
+        /* Sean "this" y rect, ambos rectangulos definidos con inicio en el origen de coordenadas,
+         calcula el rectangulo minimo con igual proporcion a "this" que contiene a rect */
+        inline Vector AjusteOptimoProporcional(const Vector& r2) const
+        {
+                const Vector& r1 = *this;
+
+                const TReal& m = std::abs(r1.Pendiente());
+
+                if (m < EpsilonDeReales()) {
+                        return Vector( (TComp) 0.0f, (TComp) 0.0f);
+                }
+
+                const TReal& Yc = std::max<TReal>(std::abs(r2.y), std::abs(m * r2.x));
+
+                return Vector(Yc / m, Yc);
+        }
+
+        /* Sean "this" y rect, ambos rectangulos definidos con inicio en el origen de coordenadas,
+         calcula el rectangulo minimo con igual proporcion a "this" contenido en rect */
+        inline Vector AjusteInteriorProporcional(const Vector& r2) const
+        {
+                const Vector& r1 = *this;
+
+                const TReal& m = std::abs(r1.Pendiente());
+
+                if (m < EpsilonDeReales()) {
+                        return Vector( (TComp) 0.0f, (TComp) 0.0f);
+                }
+
+                const TReal& Yc = std::min<TReal>( (std::abs((TReal)r2.y)) , (std::abs( m * (TReal) r2.x)) );
+
+                return Vector(Yc / m, Yc);
+        }
+
+        // Devuelve un vector que apunta al origen del desplazamiento de este vector para compartir centro con un vector determinado.
+        inline Vector OrigenDeVectorCentradoA(const Vector& b) const
+        {
+                const Vector& a = (*this);
+                return (b - a ) / 2.0f;
+        }
+
+        /* Sea rect(p0, p1) un rectangulo definido por las esquinas p0, p1, desinfla el rectangulo las unidades especificadas */
+        static inline void DesinflarRectangulo(Vector& p0, Vector& p1, const TComp& tamano)
+        {
+                const Vector& puntoMedio = p0.PuntoMedio(p1);
+                if (p0.x < p1.x) {
+                        p0.x = std::min(p0.x + tamano, puntoMedio.x);
+                        p1.x = std::max(p1.x - tamano, puntoMedio.x);
+                } else {
+                        p0.x = std::min(p0.x - tamano, puntoMedio.x);
+                        p1.x = std::max(p1.x + tamano, puntoMedio.x);
+                }
+
+                if (p0.y < p1.y) {
+                        p0.y = std::min(p0.y + tamano, puntoMedio.y);
+                        p1.y = std::min(p1.y - tamano, puntoMedio.y);
+                } else {
+                        p0.y = std::min(p0.y - tamano, puntoMedio.y);
+                        p1.y = std::min(p1.y + tamano, puntoMedio.y);
+                }
+        }
+
+        /* Sea rect(p0, p1) un rectangulo definido por las esquinas p0, p1, infla el rectangulo las unidades especificadas */
+        static inline void InflarRectangulo(Vector& p0, Vector& p1, const TComp& tamano)
+        {
+                if (p0.x < p1.x) {
+                        p0.x -= tamano;
+                        p1.x += tamano;
+                } else {
+                        p0.x += tamano;
+                        p1.x -= tamano;
+                }
+
+                if (p0.y < p1.y) {
+                        p0.y += tamano;
+                        p1.y -= tamano;
+                } else {
+                        p0.y -= tamano;
+                        p1.y += tamano;
+                }
+        }
+
+        /* translada el vector de acuerdo con el nuevo spacing y con el nuevo origen */
+        inline void ReEscalar(const TReal* oldSpacing, const TReal* oldOrigin, const TReal* newSpacing, const TReal* newOrigin)
+        {
+                const Vector& vOldSpacing = oldSpacing;
+                const Vector vOldOrigin(oldOrigin[0],-oldOrigin[1]);
+                const Vector& vNewSpacing = newSpacing;
+                const Vector vNewOrigin(newOrigin[0],-newOrigin[1]);
+
+                *this = ( ( (*this) - vOldOrigin) * ( vNewSpacing / vOldSpacing) ) + vNewOrigin;
+        }
+
+        inline Vector& ReflejarSobreAbscisas()
+        {
+                y = 0.0f - y;
+                return *this;
+        }
+
+        inline Vector ReflejoSobreAbscisas() const
+        {
+                return Vector(x, 0.0f - y);
+        }
+
+        inline Vector& ReflejarSobreOrdenadas()
+        {
+                x = 0.0f - x;
+                return *this;
+        }
+
+        inline Vector ReflejoSobreOrdenadas() const
+        {
+                return Vector(0.0f - x, y);
+        }
+
+        // Devuelve el reflejo del punto sobre el punto p (proyección sobre recta que atraviesa los dos puntos de manera que la distancia entre p y el punto actual se mantiene)
+        inline Vector ReflejoSobrePunto(const Vector& p) const
+        {
+                return p + (p - *this);
+        }
+
+        // Refleja el punto sobre p (proyección sobre recta que atraviesa los dos puntos de manera que la distancia entre p y el punto actual se mantiene)
+        inline Vector& ReflejarSobrePunto(const Vector& p)
+        {
+                *this = ReflejoSobrePunto(p);
+                return *this;
+        }
+
+        //----------------------------------------------
+        //-- Componentes
+        //----------------------------------------------
+
+        /* Devuelve la mayor de las componentes */
+        inline const TComp& Mayor() const
+        {
+                return x>y?x:y;
+        }
+
+        /* Devuelve la menor de las componentes */
+        inline const TComp& Menor() const
+        {
+                return x>y?y:x;
+        }
+
+        //----------------------------------------------
+        //-- Constantes
+        //----------------------------------------------
+
+        static inline TComp InfinitoDeComponentes()
+        {
+                return std::numeric_limits<TComp>::infinity();
+        }
+
+        static inline TReal InfinitoDeReales()
+        {
+                return std::numeric_limits<TReal>::infinity();
+        }
+
+        static inline TComp NaNDeComponentes()
+        {
+                return std::numeric_limits<TComp>::quiet_NaN();
+        }
+
+        static inline TReal NaNDeReales()
+        {
+                return std::numeric_limits<TReal>::quiet_NaN();
+        }
+
+        static inline TComp EpsilonDeComponentes()
+        {
+                return std::numeric_limits<TComp>::epsilon();
+        }
+
+        static inline TReal EpsilonDeReales()
+        {
+                return std::numeric_limits<TReal>::epsilon();
+        }
+
+        //----------------------------------------------
+        //-- Comprobaciones
+        //----------------------------------------------
+
+        inline bool EsNulo() const
+        {
+#if defined(EXACT_COMPARISON)
+                return x == 0.0f && y == 0.0f;
+#else
+                return ((*this) - Zero()).ValorAbsoluto().NearlyEqual(Zero());
+#endif
+        }
+
+        inline bool EsInvalido() const
+        {
+                return (x != x) || (y != y);
+        }
+
+        inline bool EsNaN() const
+        {
+                return (x != x) || (y != y);
+        }
+
+        //----------------------------------------------
+        //-- Geometria
+        //----------------------------------------------
+
+        // Calcula el vector ortogonal (perpendicular) con dirección y sentido segun la regla de la mano derecha.
+        inline Vector VectorOrtogonal() const
+        {
+                if (std::abs(x) < EpsilonDeComponentes()) { // Vector sobre las ordenadas
+                        if (std::abs(y) < EpsilonDeComponentes()) { // Singularidad. Punto = 0, 0. Usamos un vector cualquiera
+                                return Vector(1.0f, 0.0f);
+                        } else if (y > 0.0f) {
+                                return Vector(1.0f, 0.0f);
+                        } else { // y < 0.0f
+                                return Vector(-1.0f, 0.0f);
+                        }
+                } else {
+                        if ( std::abs(y) < EpsilonDeComponentes() ) { // Vector sobre las abscisas
+                                if( x > 0.0f) {
+                                        return Vector(0.0f, -1.0f);
+                                } else {
+                                        return Vector(0.0f, 1.0f);
+                                }
+                        } else if (y > 0.0f) {
+                                return Vector(1.0f, -x/y);
+                        } else { // y < 0.0f
+                                return Vector(-1.0f, x/y);
+                        }
+                }
+        }
+
+        // Calcula el vector ortonormal (perpendicular y norma 1) con dirección y sentido segun la regla de la mano derecha.
+        inline Vector VectorOrtonormal() const
+        {
+                if (std::abs(x) < EpsilonDeComponentes()) { // Vector sobre las ordenadas
+                        if (std::abs(y) < EpsilonDeComponentes()) { // Singularidad. Punto = 0, 0. Usamos un vector cualquiera
+                                return Vector(1.0f, 0.0f);
+                        } else if (y > 0.0f) {
+                                return Vector(1.0f, 0.0f);
+                        } else {
+                                return Vector(-1.0f, 0.0f);
+                        }
+                } else {
+                        if (std::abs(y) < EpsilonDeComponentes()) { // Vector sobre las abscisas
+                                if( x > 0.0f ) {
+                                        return Vector(0.0f, -1.0f);
+                                } else {
+                                        return Vector(0.0f, 1.0f);
+                                }
+                        } else if (y > 0) {
+                                if (x > 0) {
+                                        return Vector(1.0f, -x/y).Normalizar();
+                                } else {
+                                        return Vector(1.0f, -x/y).Normalizar();
+                                }
+                        } else {
+                                if (x > 0) {
+                                        return Vector(-1.0f, x/y).Normalizar();
+                                } else {
+                                        return Vector(-1.0f, x/y).Normalizar();
+                                }
+                        }
+
+                }
+        }
+
+        /* Devuelve el punto medio entre dos vectores */
+        inline Vector PuntoMedio(const Vector& b) const
+        {
+                const Vector& a = (*this);
+                return (a + b) / 2.0f;
+        }
+
+        /* Devuelve el punto de interseccion entre la recta r definida por r0,r1 y la recta s definida por s0,s1 */
+        static inline Vector InterseccionEntreRectas(const Vector& r0, const Vector& r1, const Vector& s0, const Vector& s1)
+        {
+
+                TReal d1 = ((TReal)r0.x - (TReal)r1.x) * ((TReal)s0.y - (TReal)s1.y);
+                TReal d2 = ((TReal)r0.y - (TReal)r1.y) * ((TReal)s0.x - (TReal)s1.x);
+
+                if (std::abs(d1) < Vector::EpsilonDeReales()) {
+                        d1 = 0.0f;
+                }
+                if (std::abs(d2) < Vector::EpsilonDeReales()) {
+                        d2 = 0.0f;
+                }
+                const TReal& d = d1 - d2;
+                if ( std::abs(d) < Vector::EpsilonDeReales()) {
+                        return Vector(NaNDeComponentes(), NaNDeComponentes());
+                } else {
+                        const TComp& pre = (r0.x * r1.y - r0.y * r1.x);
+                        const TComp& post = (s0.x * s1.y - s0.y * s1.x);
+                        return ( ( (s0 - s1) * pre ) - (r0 - r1) * post) / d;
+                }
+        }
+
+        static inline Vector InterseccionEntreRectaYElipse(const Vector&, const Vector& , const Vector& , const Vector& )
+        {
+                return Vector();
+        }
+
+        static inline Vector VectorUnitarioTangenteAElipse(const Vector&, const Vector& , const TReal& )
+        {
+                return Vector();
+        }
+
+        /* Devuelve el punto de la proyeccion ortogonal del punto sobre la recta definida por p0 y p1 */
+        inline Vector ProyeccionOrtogonalSobreRecta(const Vector& p0, const Vector& p1) const
+        {
+                return InterseccionEntreRectas(*this, *this + (p1-p0).VectorOrtogonal(), p0, p1);
+        }
+
+        /* Devuelve la distancia del punto a la recta definida por p0 y p1 */
+        inline TReal DistanciaARecta(const Vector& p0, const Vector& p1) const
+        {
+                return (ProyeccionOrtogonalSobreRecta(p0, p1) - (*this)).Norma2();
+        }
+
+        /* Devuelve el cuadrado de la distancia del punto a la segmento de p0 y p1 */
+        inline TComp DistanciaASegmentoCuadrado(const Vector& p0, const Vector& p1) const
+        {
+                Vector vi = ProyeccionOrtogonalSobreRecta(p0, p1);
+                Vector pm = p0.PuntoMedio(p1);
+                if (vi.DistanciaEuclideaCuadrado(pm) > p0.DistanciaEuclideaCuadrado(pm)) {
+                        return std::min(this->DistanciaEuclideaCuadrado(p0), this->DistanciaEuclideaCuadrado(p1));
+                } else {
+                        return this->DistanciaEuclideaCuadrado(vi);
+                }
+        }
+
+        /* Devuelve el cuadrado de la distancia del punto a la segmento de p0 y p1 */
+        inline TComp DistanciaASegmento(const Vector& p0, const Vector& p1) const
+        {
+                return std::sqrt(this->DistanciaASegmentoCuadrado(p0, p1));
+        }
+
+        /* Devuelve el cuadrado de la distancia del punto a la recta definida por p0 y p1 */
+        inline TComp DistanciaARectaCuadrado(const Vector& p0, const Vector& p1) const
+        {
+                return (ProyeccionOrtogonalSobreRecta(p0, p1) - (*this)).Norma2Cuadrado();
+        }
+
+        //----------------------------------------------
+        //-- Acotaciones
+        //----------------------------------------------
+
+        inline Vector ValorAbsoluto()
+        {
+                return Vector(std::abs(x), std::abs(y));
+        }
+
+        inline Vector TruncadoAMaximo(const TComp& val) const
+        {
+                return Vector(*this).TruncarAMaximo(val);
+        }
+
+        inline Vector TruncadoAMinimo(const TComp& val) const
+        {
+                return Vector(*this).TruncarAMinimo(val);
+        }
+
+        inline Vector& TruncarAMaximo(const TComp& val)
+        {
+                x = std::max<TReal>(x, val);
+                y = std::max<TReal>(y, val);
+                return *this;
+        }
+
+        inline Vector& TruncarAMinimo(const TComp& val)
+        {
+                x = std::min<TReal>(x, val);
+                y = std::min<TReal>(y, val);
+                return *this;
+        }
+
+        inline Vector TruncadoAMaximo(TComp valx, TComp valy) const
+        {
+                return Vector(*this).TruncarAMaximo(valx, valy);
+        }
+
+        inline Vector TruncadoAMinimo(TComp valx, TComp valy) const
+        {
+                return Vector(*this).TruncarAMinimo(valx, valy);
+        }
+
+        inline Vector& TruncarAMaximo(TComp valx, TComp valy)
+        {
+                x = std::max<TReal>(x, valx);
+                y = std::max<TReal>(y, valy);
+                return *this;
+        }
+
+        inline Vector& TruncarAMinimo(TComp valx, TComp valy)
+        {
+                x = std::min<TReal>(x, valx);
+                y = std::min<TReal>(y, valy);
+                return *this;
+        }
+
+        inline TComp ComponenteMaxima() const
+        {
+                return std::max<TReal>(x,y);
+        }
+
+        inline TComp ComponenteMinima() const
+        {
+                return std::min<TReal>(x,y);
+        }
+
+        static inline Vector ComponentesMaximas(const Vector& a, const Vector& b)
+        {
+                return Vector(std::max<TReal>(a.x, b.x), std::max<TReal>(a.y, b.y));
+        }
+
+        static inline Vector ComponentesMinimas(const Vector& a, const Vector& b)
+        {
+                return Vector(std::min<TReal>(a.x, b.x), std::min<TReal>(a.y, b.y));
+        }
+
+        inline Vector& AsignarMaximos(const Vector& o)
+        {
+                x = std::max<TReal>(x, o.x);
+                y = std::max<TReal>(y, o.y);
+                return *this;
+        }
+
+        inline Vector& AsignarMinimos(const Vector& o)
+        {
+                x = std::min<TReal>(x, o.x);
+                y = std::min<TReal>(y, o.y);
+                return *this;
+        }
+
+        inline Vector ObtenerMaximos(const Vector& o) const
+        {
+                return Vector(std::max<TReal>(x, o.x), std::max<TReal>(y, o.y));
+        }
+
+        inline Vector ObtenerMinimos(const Vector& o) const
+        {
+                return Vector(std::min<TReal>(x, o.x), std::min<TReal>(y, o.y));
+        }
+
+        inline bool TieneComponenteMayorQue(const Vector& o) const
+        {
+                return ( (x > o.x) || (y > o.y) );
+        }
+
+        inline bool TieneComponenteMenorQue(const Vector& o) const
+        {
+                return ( (x < o.x) || (y < o.y) );
+        }
+
+        /* Devuelve verdadero si el vector es singular (distancia a (0,0) < epsilon =~ (0,0) ) */
+        inline bool Singular() const
+        {
+                return std::abs(x) < EpsilonDeComponentes() || std::abs(y) < EpsilonDeComponentes();
+        }
+
+        inline Vector RedondeoAlza() const
+        {
+                return Vector(*this).RedondearAlza();
+        }
+
+        inline Vector& RedondearAlza()
+        {
+                x = std::ceil(x);
+                y = std::ceil(y);
+                return *this;
+        }
+
+        inline Vector RedondeoBaja() const
+        {
+                return Vector(*this).RedondearBaja();
+        }
+
+        inline Vector& RedondearBaja()
+        {
+                x = std::floor(x);
+                y = std::floor(y);
+                return *this;
+        }
+
+        static TComp ValorRedondeado(const TComp& val)
+        {
+                const TComp& d = std::floor(val);
+                const TComp& u = std::ceil(val);
+                if ( val - d < u - val) {
+                        return d;
+                } else {
+                        return u;
+                }
+        }
+
+        inline Vector Redondeado() const
+        {
+                return Vector(*this).Redondear();
+        }
+
+        inline Vector& Redondear()
+        {
+                x = ValorRedondeado(x);
+                y = ValorRedondeado(y);
+                return *this;
+        }
+
+        /* Devuelve el vector de rotacion para un angulo dado (x = cos(angulo), y = sin(angulo)) */
+
+        static inline Vector VectorDeRotacion(const TReal& angulo)
+        {
+                return Vector((TComp)std::cos(angulo), (TComp)std::sin(angulo));
+        }
+
+        /* Devuelve un nuevo vector rotado el vector sobre el eje de coordenadas Z */
+        inline Vector RotacionSobreZ(const TReal& angulo) const;
+
+        /* Rota el vector sobre el eje de coordenadas Z */
+        inline Vector& RotarSobreZ(const TReal& angulo)
+        {
+                *this = RotacionSobreZ(angulo);
+                return *this;
+        }
+
+        inline Vector RotacionSobreZ(const Vector& centro, const TReal& angulo) const;
+
+        inline Vector& RotarSobreZ(const Vector& centro, const TReal& angulo)
+        {
+                *this = RotacionSobreZ(centro, angulo);
+                return *this;
+        }
+
+        inline bool DentroDeElipse(const Vector& centro, const TReal& radioX, const TReal& radioY, const TReal& rotacion) const
+        {
+                Vector p(*this);
+                p.RotarSobreZ(centro, -rotacion);
+
+                const TComp& t1 = (p.x - centro.x) / radioX;
+                const TComp& t2 = (p.y - centro.y) / radioY;
+
+                return (t1 * t1) + (t2 * t2) <= (TComp)1.0f;
+        }
+
+        /* Devuelve true si el punto esta contenido dentro del poligono especificado.
+         Metodo del teorema de las curvas de Jordan para poligonos cerrados concavos o convexos.
+         Contempla los casos:
+        	* punto coincidente con un vértice.
+            * vertices consecutivos de poligono coincidentes.
+         */
+        template <class TipoVector>
+        inline bool DentroDePoligono(const TipoVector *v, int numVertices) const
+        {
+                int cruces = 0;
+                for ( int i = 0; i < numVertices; i++ ) {
+                        if ( *this == v[i] ) {
+                                return true;
+                        }
+                        int j = (i == numVertices-1 ? 0 : i + 1);
+
+                        const TComp& xmin = std::min(v[i].x, v[j].x);
+                        const TComp& xmax = std::max(v[i].x, v[j].x);
+                        const TComp& ymin = std::min(v[i].y, v[j].y);
+                        const TComp& ymax = std::max(v[i].y, v[j].y);
+
+                        if (x <= xmax && y <= ymax && y >= ymin) {
+                                if (x <= xmin) {
+                                        cruces++;
+                                } else {
+                                        // Ecuacion de la linea
+                                        const TComp& dx = v[j].x - v[i].x;
+
+                                        if (std::abs(dx) > EpsilonDeComponentes()) {
+                                                const Vector& pi = InterseccionEntreRectas (*this, *this + Vector(1.0f, 0.0f), v[i], v[j]);
+                                                if ( pi.x > x) {
+                                                        cruces++;
+                                                }
+                                        }
+                                }
+                        }
+                }
+                return (cruces & 1) != 0;
+        }
+
+        /* Devuelve true si el punto esta contenido dentro del poligono especificado.
+        Metodo del teorema de las curvas de Jordan para poligonos cerrados concavos o convexos.
+        Contempla los casos:
+        * punto coincidente con un vértice.
+           * vertices consecutivos de poligono coincidentes.
+        */
+        template <class TipoVector>
+        inline bool DentroDePoligono(const TipoVector& lista) const
+        {
+                int cruces = 0;
+                typename TipoVector::const_iterator i = lista.begin();
+                typename TipoVector::const_iterator j = --lista.end();
+
+                for ( typename TipoVector::size_type k = 0; k < lista.size(); ++k ) {
+                        if ( *this == (*i) ) {
+                                return true;
+                        }
+                        j = i++;
+
+                        const TComp& xmin = std::min((*i).x, (*j).x);
+                        const TComp& xmax = std::max((*i).x, (*j).x);
+                        const TComp& ymin = std::min((*i).y, (*j).y);
+                        const TComp& ymax = std::max((*i).y, (*j).y);
+
+                        if (x <= xmax && y <= ymax && y >= ymin) {
+                                if (x <= xmin) {
+                                        cruces++;
+                                } else {
+                                        // Ecuacion de la linea
+                                        const TComp& dx = (*j).x - (*i).x;
+
+                                        if (std::abs(dx) > EpsilonDeComponentes()) {
+                                                const Vector& pi = InterseccionEntreRectas (*this, *this + Vector(1.0f, 0.0f), (*i), (*j));
+                                                if ( pi.x > x) {
+                                                        cruces++;
+                                                }
+                                        }
+                                }
+                        }
+                }
+                return (cruces & 1) != 0;
+        }
+
+        /* Otra implementacion distinta que devuelve true si el punto esta contenido dentro del poligono especificado.
+         Metodo del teorema de las curvas de Jordan para poligonos cerrados concavos o convexos.
+         Contempla los casos:
+        	* punto coincidente con un vértice.
+            * vertices consecutivos de poligono coincidentes.
+         */
+        template <class TipoVector>
+        inline bool DentroDePoligono2(const TipoVector* const v, const int& numVertices) const
+        {
+                int i, j;
+                bool t = false;
+                for (i = 0, j = numVertices-1; i < numVertices; j = i++) {
+                        if ( ( (v[i].y > y) != (v[j].y > y) ) && (x < (v[j]. x - v[i].x) * (y - v[i].y) / (v[j].y - v[i].y) + v[i].x) )
+                                t = !t;
+                }
+                return t;
+        }
+
+        template <class TipoVector>
+        inline bool DentroDePoligono2(const std::list<TipoVector>& lista) const
+        {
+                typename std::list<TipoVector>::const_iterator i = lista.begin();
+                typename std::list<TipoVector>::const_iterator j = --lista.end();
+                bool t = false;
+
+                if (i != j) {
+                        for ( ; i != lista.end(); j = i++) {
+                                if ( ( ( (*i).y > y) != ((*j).y > y) ) && (x < ((*j). x - (*i).x) * (y - (*i).y) / ((*j).y - (*i).y) + (*i).x) ) {
+                                        t = !t;
+                                }
+                        }
+                }
+                return t;
+        }
+
+        // Calcula el area de un poligono simple por el metodo de los determinantes
+        template <class TipoVector>
+        static TReal AreaDePoligono(const TipoVector* const v, const int& numVertices)
+        {
+                TReal area = 0.0f;
+                const TReal fact = 0.5f;
+                if (numVertices > 2) {
+                        for (int i = 1, j = 2; j < numVertices; i++, j++) {
+                                area += ( fact * (
+                                                  ( (TReal)(v[0].x) * (TReal)(v[i].y) ) +
+                                                  ( (TReal)(v[i].x) * (TReal)(v[j].y) ) +
+                                                  ( (TReal)(v[j].x) * (TReal)(v[0].y) ) -
+                                                  ( (TReal)(v[0].y) * (TReal)(v[i].x) ) -
+                                                  ( (TReal)(v[i].y) * (TReal)(v[j].x) ) -
+                                                  ( (TReal)(v[j].y) * (TReal)(v[0].x) )
+                                          )
+                                        );
+
+                        }
+                }
+                return std::abs(area);
+        }
+
+        // Calcula el area de un poligono simple por el metodo de los determinantes
+        template <class TipoVector>
+        static TReal AreaDePoligono(const std::list<TipoVector>& lista)
+        {
+                TReal area = 0.0f;
+                const TReal fact = 0.5f;
+
+                if (lista.size() > 2) {
+                        typename std::list<TipoVector>::const_iterator v0 = lista.begin();
+                        typename std::list<TipoVector>::const_iterator v1 = v0;
+                        v1++;
+                        typename std::list<TipoVector>::const_iterator v2 = v1;
+                        v2++;
+                        for (; v2 != lista.end(); v1++, v2++) {
+                                area += ( fact * (
+                                                  ( (TReal)((*v0).x) * (TReal)((*v1).y) ) +
+                                                  ( (TReal)((*v1).x) * (TReal)((*v2).y) ) +
+                                                  ( (TReal)((*v2).x) * (TReal)((*v0).y) ) -
+                                                  ( (TReal)((*v0).y) * (TReal)((*v1).x) ) -
+                                                  ( (TReal)((*v1).y) * (TReal)((*v2).x) ) -
+                                                  ( (TReal)((*v2).y) * (TReal)((*v0).x) )
+                                          )
+                                        );
+
+                        }
+                }
+                return std::abs(area);
+        }
+
+        // Determina si el poligono es simple (sus aristas no intersectan entre ellas)
+        template <class TipoVector>
+        static bool EsPoligonoSimple(const std::list<TipoVector>& lista)
+        {
+                bool simple = true;
+
+                if (lista.size() > 3) {
+                        typename std::list<TipoVector>::const_iterator i = lista.begin();
+                        typename std::list<TipoVector>::const_iterator j = i;
+                        j++;
+
+                        typename std::list<TipoVector>::const_iterator k;
+                        typename std::list<TipoVector>::const_iterator l;
+
+                        TipoVector inter;
+                        TipoVector bbox[2][2];
+
+                        const unsigned long nl = lista.size() - 1;
+                        unsigned long ni = 0;
+
+                        for (ni = 0; simple && ni < nl; ni++, i++, j++) {
+                                (*i).IniciarBoundingBox(bbox[0][0],bbox[0][1]);
+                                (*j).ExtenderBoundingBox(bbox[0][0],bbox[0][1]);
+
+                                k = j;
+
+                                while ( simple && (++k) != lista.end()) {
+                                        l = k;
+                                        l++;
+
+                                        if (l == lista.end()) {
+                                                l = lista.begin();
+                                                if (l == i) {
+                                                        break;
+                                                }
+                                        }
+
+                                        (*k).IniciarBoundingBox(bbox[1][0], bbox[1][1]);
+                                        (*l).ExtenderBoundingBox(bbox[1][0], bbox[1][1]);
+
+                                        TipoVector::IntersectarBoundingBox(bbox[0], bbox[1], bbox[1]);
+
+                                        if ( BoundingBoxValido(bbox[1]) ) {
+
+                                                inter = TipoVector::InterseccionEntreRectas(*i, *j, *k, *l);
+
+                                                if ( (inter.x + 1e-6) >= bbox[1][0].x && (inter.x - 1e-6) <= bbox[1][1].x && (inter.y + 1e-6) >= bbox[1][0].y && (inter.y - 1e-6) <= bbox[1][1].y ) {
+                                                        simple = false;
+                                                }
+                                        }
+                                }
+                        }
+                }
+                return simple;
+        }
+
+        // Determina si el poligono es simple (sus aristas no intersectan entre ellas)
+        template <class TipoVector>
+        static bool EsPoligonoSimple(const TipoVector* const v, const int numVertices)
+        {
+                bool simple = true;
+
+                if (numVertices > 3) {
+                        int i = 0;
+                        int j = 1;
+
+                        int k = 0;
+                        int l = 0;
+
+                        TipoVector inter;
+                        TipoVector bbox[2][2];
+
+                        const unsigned long nl = numVertices - 1;
+                        unsigned long ni = 0;
+
+                        for (ni = 0; simple && ni < nl; ni++, i++, j++) {
+                                v[i].IniciarBoundingBox(bbox[0][0],bbox[0][1]);
+                                v[j].ExtenderBoundingBox(bbox[0][0],bbox[0][1]);
+
+                                k = j;
+
+                                while ( simple && (++k) != numVertices) {
+                                        l = k + 1;
+
+                                        if (l == numVertices) {
+                                                l = 0;
+                                                if (l == i) {
+                                                        break;
+                                                }
+                                        }
+
+                                        v[k].IniciarBoundingBox(bbox[1][0], bbox[1][1]);
+                                        v[l].ExtenderBoundingBox(bbox[1][0], bbox[1][1]);
+
+                                        TipoVector::IntersectarBoundingBox(bbox[0], bbox[1], bbox[1]);
+
+                                        if ( TipoVector::BoundingBoxValido(bbox[1]) ) {
+
+                                                inter = TipoVector::InterseccionEntreRectas(v[i], v[j], v[k], v[l]);
+
+                                                if ( (inter.x + 1e-6) >= bbox[1][0].x && (inter.x - 1e-6) <= bbox[1][1].x && (inter.y + 1e-6) >= bbox[1][0].y && (inter.y - 1e-6) <= bbox[1][1].y ) {
+                                                        simple = false;
+                                                }
+                                        }
+                                }
+                        }
+                }
+                return simple;
+        }
+
+        // Calcula y devuelve el centroide de una colección de puntos.
+        template <class TipoVector>
+        static Vector Centroide(const TipoVector v[], const int& numVertices)
+        {
+                Vector vSum;
+
+                if (numVertices > 0) {
+                        for (int i = 0; i < numVertices; ++i) {
+                                vSum += v[i];
+                        }
+                        vSum /= (TComp)numVertices;
+                }
+                return vSum;
+        }
+
+        // Calcula y devuelve el centroide de una coleccion de puntos.
+        template <class TipoVector>
+        static Vector Centroide(const std::list<TipoVector>& lista)
+        {
+                typename std::list<TipoVector>::const_iterator i = lista.begin();
+                Vector vSum;
+
+                if (i != lista.end()) {
+                        for ( i = lista.begin(); i != lista.end(); i++) {
+                                vSum += (*i);
+                        }
+                        vSum /= (TComp)lista.size();
+                }
+                return vSum;
+        }
+
+        // Calcula y devuelve el perimetro del poligono
+        template <class TipoVector>
+        static TReal PerimetroDePoligono(const TipoVector v[], int numVertices)
+        {
+                int i, j;
+                TReal perimetro = 0.0f;
+                for (i = 0, j = numVertices-1; i < numVertices; j = i++) {
+                        perimetro += (v[i] - v[j]).Norma2();
+                }
+                return perimetro;
+        }
+
+        // Calcula y devuelve el perimetro del poligono
+        template <class TipoVector>
+        static TReal PerimetroDePoligono(const std::list<TipoVector>& lista)
+        {
+                TReal perimetro = 0.0f;
+                if (lista.size() > 0) {
+                        typename std::list<TipoVector>::const_iterator i = lista.begin();
+                        typename std::list<TipoVector>::const_iterator j = --lista.end();
+
+
+                        for ( ; i != lista.end(); j = i++) {
+                                perimetro += ( (*j) - (*i) ).Norma2();
+                        }
+                }
+                return perimetro;
+        }
+
+        inline bool DentroDeBoundingBox(const Vector& p0, const Vector& p1) const
+        {
+                bool vx = false;
+                bool vy = false;
+                if (p0.x < p1.x) {
+                        vx = (p0.x < x && x < p1.x);
+                } else {
+                        vx = (p1.x < x && x < p0.x);
+                }
+
+                if (p0.y < p1.y) {
+                        vy = (p0.y < y && y < p1.y);
+                } else {
+                        vy = (p1.y < y && y < p0.y);
+                }
+
+                return vx && vy;
+        }
+
+        inline bool DentroDeBoundingBoxCerrado(const Vector& p0, const Vector& p1) const
+        {
+                bool vx = false;
+                bool vy = false;
+                if (p0.x < p1.x) {
+                        vx = (p0.x <= x && x <= p1.x);
+                } else {
+                        vx = (p1.x <= x && x <= p0.x);
+                }
+
+                if (p0.y < p1.y) {
+                        vy = (p0.y <= y && y <= p1.y);
+                } else {
+                        vy = (p1.y <= y && y <= p0.y);
+                }
+
+                return vx && vy;
+        }
+
+        // Inicia un bounding box que contiene al punto
+        inline void IniciarBoundingBox(Vector bBox[2]) const
+        {
+                IniciarBoundingBox(bBox[0], bBox[1]);
+        }
+
+        // Inicia un bounding box que contiene al punto
+        inline void IniciarBoundingBox(Vector& p0, Vector& p1) const
+        {
+                p0 = p1 = *this;
+        }
+
+        // Extiende el bounding box especificado como parámetro para contener al punto
+        inline void ExtenderBoundingBox(Vector bBox[2]) const
+        {
+                ExtenderBoundingBox(bBox[0], bBox[1]);
+        }
+
+        // Extiende el bounding box especificado como parámetro para contener al punto
+        inline void ExtenderBoundingBox(Vector& p0, Vector& p1) const
+        {
+                if (p0.x <= p1.x) {
+                        if (x < p0.x) {
+                                p0.x = x;
+                        } else if (x > p1.x) {
+                                p1.x = x;
+                        }
+                } else {
+                        if (x < p1.x) {
+                                p1.x = x;
+                        } else if (x > p0.x) {
+                                p0.x = x;
+                        }
+                }
+                if (p0.y <= p1.y) {
+                        if (y < p0.y) {
+                                p0.y = y;
+                        } else if (y > p1.y) {
+                                p1.y = y;
+                        }
+                } else {
+                        if (y < p1.y) {
+                                p1.y = y;
+                        } else if (y > p0.y) {
+                                p0.y = y;
+                        }
+                }
+        }
+
+        // Ordena el bounding box de manera que p0.x <= p1.x y p0.y <= p1.y
+        static void OrdenarBoundingBox(Vector bBox[2])
+        {
+                Vector::OrdenarBoundingBox(bBox[0], bBox[1]);
+        }
+
+        // Ordena el bounding box de manera que p0.x <= p1.x y p0.y <= p1.y
+        static void OrdenarBoundingBox(Vector& p0, Vector& p1)
+        {
+                const Vector temp (std::min(p0.x, p1.x), std::min(p0.y, p1.y));
+                p1.Asignar (std::max(p0.x, p1.x), std::max(p0.y, p1.y));
+                p0 = temp;
+        }
+
+        template <class TipoVector> static void IntersectarBoundingBox(const TipoVector* a, const TipoVector* b, TipoVector* res)
+        {
+                const TipoVector a0 (std::min<TComp>(a[0].x, a[1].x), std::min<TComp>(a[0].y, a[1].y));
+                const TipoVector a1 (std::max<TComp>(a[0].x, a[1].x), std::max<TComp>(a[0].y, a[1].y));
+                const TipoVector b0 (std::min<TComp>(b[0].x, b[1].x), std::min<TComp>(b[0].y, b[1].y));
+                const TipoVector b1 (std::max<TComp>(b[0].x, b[1].x), std::max<TComp>(b[0].y, b[1].y));
+
+                res[0].Asignar(std::max<TComp>(a[0].x, b[0].x), std::max<TComp>(a[0].y, b[0].y));
+                res[1].Asignar(std::min<TComp>(a[1].x, b[1].x), std::min<TComp>(a[1].y, b[1].y));
+                if (res[0].x > res[1].x || res[0].y > res[1].y) {
+                        res[0].Asignar(TipoVector::NaNDeComponentes(), TipoVector::NaNDeComponentes());
+                        res[1].Asignar(TipoVector::NaNDeComponentes(), TipoVector::NaNDeComponentes());
+                }
+        }
+
+        template <class TipoVector> static bool BoundingBoxValido(const TipoVector* bb)
+        {
+                return ( !(bb[0].EsInvalido()) && !(bb[1].EsInvalido()) );
+        }
+
+        // Intercambia los valores de p0 a p1 y viceversa
+        static void IntercambiarValores(Vector& p0, Vector& p1)
+        {
+                const Vector& temp = p0;
+                p0 = p1;
+                p1 = temp;
+        }
+
+        inline Vector& operator=(const Vector& otro)
+        {
+                x = (TComp) otro.x;
+                y = (TComp) otro.y;
+                return *this;
+        }
+
+        inline Vector& operator=(const TComp* const v)
+        {
+                x = (TComp) v[0];
+                y = (TComp) v[1];
+                return *this;
+        }
+
+        inline bool operator==(const Vector& otro) const
+        {
+#if defined EXACT_COMPARION
+                return ( x == (TComp) otro.x ) && ( y == (TComp) otro.y );
+#else
+                return this->NearlyEqual(otro);
+#endif
+
+        }
+
+        inline bool NearlyEqual(const Vector& otro) const
+        {
+                return (*this - otro).ValorAbsoluto() < Vector(EpsilonDeComponentes(), EpsilonDeComponentes());
+        }
+
+        inline bool NearlyNotEqual(const Vector& otro) const
+        {
+                return !NearlyEqual(otro);
+        }
+
+        inline bool operator<(const Vector& otro) const
+        {
+                return ( (x < otro.x) && (y < otro.y));
+        }
+        inline bool operator<=(const Vector& otro) const
+        {
+                return (*this < otro) || this->NearlyEqual(otro);
+        }
+        inline bool operator>(const Vector& otro) const
+        {
+                return ( (x > otro.x) && (y > otro.y));
+        }
+        inline bool operator>=(const Vector& otro) const
+        {
+                return (*this > otro) || this->NearlyEqual(otro);
+        }
+
+        inline bool operator!=(const Vector& otro) const
+        {
+                return !(*this == otro);
+        }
+
+        inline Vector operator*(const Vector& otro) const
+        {
+                return Vector(*this) *= otro;
+        }
+
+        inline Vector& operator*=(const Vector& otro)
+        {
+                x *= otro.x;
+                y *= otro.y;
+                return *this;
+        }
+
+        inline Vector operator*(const TComp& valor) const
+        {
+                return Vector(*this) *= (TComp) valor;
+        }
+
+        inline Vector& operator*=(const TComp& valor)
+        {
+                x *= (TComp) valor;
+                y *= (TComp) valor;
+                return *this;
+        }
+
+        inline Vector operator/(const Vector& otro) const
+        {
+                return Vector(*this) /= otro;
+        }
+
+        inline Vector& operator/=(const Vector v)
+        {
+                x /= v.x;
+                y /= v.y;
+                return *this;
+        }
+
+        inline Vector operator/(const TComp& v) const
+        {
+                return Vector(*this) /= v;
+        }
+
+        inline Vector& operator/=(const TComp& v)
+        {
+                x /= v;
+                y /= v;
+                return *this;
+        }
+
+        inline Vector operator-(const Vector& otro) const
+        {
+                return Vector(*this) -= otro;
+        }
+
+        inline Vector& operator-=(const Vector& otro)
+        {
+                x -= otro.x;
+                y -= otro.y;
+                return *this;
+        }
+
+        inline Vector operator-(const TComp& valor) const
+        {
+                return Vector(*this) -= valor;
+        }
+
+        /** Unary minus **/
+        inline Vector operator-() const
+        {
+                return Vector(-x, -y);
+        }
+
+        inline Vector& operator-=(const TComp& valor)
+        {
+                x -= valor;
+                y -= valor;
+                return *this;
+        }
+
+        inline Vector operator+(const Vector& otro) const
+        {
+                return Vector(*this) += otro;
+        }
+
+        inline Vector& operator+=(const Vector& otro)
+        {
+                x += otro.x;
+                y += otro.y;
+                return *this;
+        }
+
+        inline Vector operator+(const TComp& valor) const
+        {
+                return Vector(*this) += valor;
+        }
+
+        inline Vector& operator+=(const TComp& valor)
+        {
+                x += (TComp) valor;
+                y += (TComp) valor;
+                return *this;
+        }
+
+        inline operator TComp *()
+        {
+                return v;
+        }
+
+        inline operator const TComp *() const
+        {
+                return v;
+        }
+
+        //----------------------------------------------
+        //-- Accesores
+        //----------------------------------------------
+
+        inline TComp& operator [] (int i)
+        {
+                return v[i];
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const Vector& c)
+        {
+                out << "[ x = " << c.x << ", y = " << c.y << " ]";
+                return out;
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const Vector* const c)
+        {
+                if (c == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *c;
+                }
+                return out;
+        }
+};
+
+inline GNC::GCS::Vector operator+(int val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val + o.x, (GNC::GCS::Vector::TComp)val + o.y );
+}
+
+inline GNC::GCS::Vector operator+(float val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val + o.x, (GNC::GCS::Vector::TComp)val + o.y );
+}
+
+inline GNC::GCS::Vector operator+(double val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val + o.x, (GNC::GCS::Vector::TComp)val + o.y );
+}
+
+inline GNC::GCS::Vector operator-(int val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val - o.x, (GNC::GCS::Vector::TComp)val - o.y );
+}
+
+inline GNC::GCS::Vector operator-(float val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val - o.x, (GNC::GCS::Vector::TComp)val - o.y );
+}
+
+inline GNC::GCS::Vector operator-(double val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val - o.x, (GNC::GCS::Vector::TComp)val - o.y );
+}
+
+inline GNC::GCS::Vector operator*(int val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val * o.x, (GNC::GCS::Vector::TComp)val * o.y );
+}
+
+inline GNC::GCS::Vector operator*(float val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val * o.x, (GNC::GCS::Vector::TComp)val * o.y );
+}
+
+inline GNC::GCS::Vector operator*(double val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val * o.x, (GNC::GCS::Vector::TComp)val * o.y );
+}
+
+inline GNC::GCS::Vector operator/(int val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val / o.x, (GNC::GCS::Vector::TComp)val / o.y );
+}
+
+inline GNC::GCS::Vector operator/(float val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val / o.x, (GNC::GCS::Vector::TComp)val / o.y );
+}
+
+inline GNC::GCS::Vector operator/(double val, const Vector& o)
+{
+        return GNC::GCS::Vector( (GNC::GCS::Vector::TComp)val / o.x, (GNC::GCS::Vector::TComp)val / o.y );
+}
+
+class  Matriz
+{
+
+public:
+        typedef PRECISION_COMPONENTE_POR_DEFECTO TComp;
+        typedef PRECISION_REALES_POR_DEFECTO     TReal;
+        typedef Vector TVector;
+        typedef Matriz TMatriz;
+
+        TReal a00;
+        TReal a01;
+        TReal a10;
+        TReal a11;
+
+        inline  Matriz()
+        {
+                a00 = a01 = a10 = a11 = (TReal) 0.0f;
+        }
+
+        inline Matriz(const TComp& a00, const TComp& a01, const TComp& a10, const TComp& a11)
+        {
+                this->a00 = (TReal) a00;
+                this->a01 = (TReal) a01;
+                this->a10 = (TReal) a10;
+                this->a11 = (TReal) a11;
+        }
+
+        inline Matriz(const Matriz& otra)
+        {
+                a00 = otra.a00;
+                a01 = otra.a01;
+                a10 = otra.a10;
+                a11 = otra.a11;
+        }
+
+        inline static Matriz MatrizRotacion(const TComp& angulo)
+        {
+                return Matriz(std::cos(angulo), -std::sin(angulo), std::sin(angulo), std::cos(angulo));
+        }
+
+        inline Matriz ProductoMatricial(const Matriz& otra) const
+        {
+                return TMatriz(
+                               a00 * otra.a00 + a01 * otra.a10,
+                               a00 * otra.a01 + a01 * otra.a11,
+                               a10 * otra.a00 + a11 * otra.a10,
+                               a10 * otra.a01 + a11 * otra.a11);
+        }
+
+        inline TVector ProductoMatricial(const TVector& otro) const
+        {
+                return Vector(
+                               (TVector::TComp)( a00 * (TReal) otro.x + a01 * (TReal) otro.y ),
+                               (TVector::TComp)( a10 * (TReal) otro.x + a11 * (TReal) otro.y ) );
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const Matriz& m)
+        {
+                out << "[ a00 = " << m.a00 << ", a01 = " << m.a01 << "; " << std::endl;
+                out << "  a10 = " << m.a10 << ", a11 = " << m.a11 << " ]";
+                return out;
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const Matriz* m)
+        {
+                if (m == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *m;
+                }
+                return out;
+        }
+};
+
+/* Devuelve un nuevo vector rotado el vector sobre el eje de coordenadas Z */
+inline Vector Vector::RotacionSobreZ(const TReal& angulo) const
+{
+        return  Matriz::MatrizRotacion(angulo).ProductoMatricial(*this);
+}
+
+inline Vector Vector::RotacionSobreZ(const Vector& centro, const TReal& angulo) const
+{
+        return centro +  Matriz::MatrizRotacion(angulo).ProductoMatricial(*this - centro);
+}
+}
+}
+#else
+
+#endif
+#endif
diff --git a/cadxcore/api/math/geometry3d.h b/cadxcore/api/math/geometry3d.h
new file mode 100644
index 0000000..5ea7524
--- /dev/null
+++ b/cadxcore/api/math/geometry3d.h
@@ -0,0 +1,1103 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef GEOMETRY3D_H
+#define GEOMETRY3D_H
+
+#if defined(max)
+#undef max
+#endif
+#if defined(min)
+#undef min
+#endif
+
+#include <list>
+#include <iostream>
+#include <cmath>
+#include <limits>
+
+#include <api/api.h>
+#include <api/globals.h>
+#include <api/math/geometry_defs.h>
+
+
+#define GEOMETRY3D_NO_TEMPLATE
+
+#if defined(GEOMETRY3D_NO_TEMPLATE)
+
+namespace GNC
+{
+namespace GCS
+{
+
+class Matriz3x3;
+
+class Vector3D
+{
+public:
+        typedef PRECISION_COMPONENTE_POR_DEFECTO TComp;
+        typedef PRECISION_REALES_POR_DEFECTO     TReal;
+
+        TComp v[4];         // Coordenadas
+
+        TComp& x;           // Coordenada X
+        TComp& y;           // Coordenada Y
+        TComp& z;           // Coordenada Z
+        TComp& t;           // Coordenada Z
+
+public:
+
+        static const Vector3D NaN()
+        {
+                return Vector3D(NaNDeComponentes(), NaNDeComponentes(), NaNDeComponentes());
+        }
+
+        static const Vector3D Inf()
+        {
+                return Vector3D(InfinitoDeComponentes(), InfinitoDeComponentes(), InfinitoDeComponentes());
+        }
+
+        static const Vector3D Zero()
+        {
+                return Vector3D();
+        }
+
+        static const Vector3D Unidad()
+        {
+                return Vector3D(1.0, 1.0, 1.0);
+        }
+
+        //----------------------------------------------
+        //-- Constructores y destructores
+        //----------------------------------------------
+
+        inline Vector3D() : x(v[0]), y(v[1]), z(v[2]), t(v[3])
+        {
+                x = (TComp) 0.0f;
+                y = (TComp) 0.0f;
+                z = (TComp) 0.0f;
+                t = (TComp) 1.0f;
+        }
+
+        /* Constructor copia transparente */
+        inline Vector3D(const Vector3D& b) : x(v[0]), y(v[1]), z(v[2]), t(v[3])
+        {
+                x = (TComp) b.x;
+                y = (TComp) b.y;
+                z = (TComp) b.z;
+                t = (TComp) b.t;
+        }
+
+        template <class TipoComp1, class TipoComp2, class TipoComp3> inline Vector3D(const TipoComp1& valX, const TipoComp2& valY, const TipoComp3& valZ) : x(v[0]), y(v[1]), z(v[2]), t(v[3])
+        {
+                x = (TComp) valX;
+                y = (TComp) valY;
+                z = (TComp) valZ;
+                t = (TComp) 1.0;
+        }
+
+        template <class TipoComp> inline Vector3D(const TipoComp* const valor) : x(v[0]), y(v[1]), z(v[2]), t(v[3])
+        {
+                x = (TComp) valor[0];
+                y = (TComp) valor[1];
+                z = (TComp) valor[2];
+                t = (TComp) 1.0;
+        }
+
+        ~Vector3D()
+        {
+
+        }
+
+        //----------------------------------------------
+        //-- Asignacion explicita
+        //----------------------------------------------
+
+        /* Asigna las coordenadas al vector */
+        template <class TipoComp1, class TipoComp2, class TipoComp3> inline Vector3D& Asignar(const TipoComp1& valX, const TipoComp2& valY, const TipoComp3& valZ)
+        {
+                x = (TComp) valX;
+                y = (TComp) valY;
+                z = (TComp) valZ;
+                t = (TComp) 1.0;
+                return (*this);
+        }
+
+        /* Asigna el valor a todas las coordenadas del vector */
+        template <class TipoComp> inline Vector3D& Asignar(const TipoComp& valor)
+        {
+                x = (TComp) valor;
+                y = (TComp) valor;
+                z = (TComp) valor;
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        //----------------------------------------------
+        //-- Load and Store
+        //----------------------------------------------
+
+        /* Load from array (interpret ncomp components) */
+        template <class TipoComp> inline void Load(int ncomp, TipoComp* mem)
+        {
+                for (int i = 0; i < 4; ++i) {
+                        if (i < ncomp) {
+                                v[i] = (TComp) mem[i];
+                        } else {
+                                if (v[i] == 3) {
+                                        v[i] = (TComp)0.0;
+                                } else {
+                                        v[i] = (TComp)1.0;
+                                }
+                        }
+                }
+        }
+
+        /* Store to array (interpret ncomp components) */
+        template <class TipoComp> inline void Store(int ncomp, TipoComp* mem) const
+        {
+                for (int i = 0; i < 4; ++i) {
+                        if (i < ncomp) {
+                                mem[i] = (TipoComp) v[i];
+                        }
+                }
+        }
+
+        //----------------------------------------------
+        //-- Normas Vectoriales, Distancias y Producto Interior
+        //----------------------------------------------
+
+        inline TComp Norma1() const
+        {
+                return std::abs(x) + std::abs(y) + std::abs(z);
+        }
+
+        /* Devuelve la norma 2 (euclidea) al cuadrado */
+        inline TComp Norma2Cuadrado() const
+        {
+                return (TReal)x * (TReal)x + (TReal)y * (TReal)y + (TReal)z * (TReal)z;
+        }
+
+        /* Devuelve la norma 2 (euclidea) */
+        inline TReal Norma2() const
+        {
+                return std::sqrt((TReal) (*this).Norma2Cuadrado());
+        }
+
+        inline TReal NormaEnesima(unsigned int n) const
+        {
+                return std::pow( std::pow((TReal)x, (TReal)n) + std::pow((TReal)y, (TReal)n) + std::pow((TReal)z, (TReal)n), (TReal)1.0f / (TReal)n);
+        }
+
+        inline TComp NormaInfinito() const
+        {
+                return std::max(x, std::max(y, z));
+        }
+
+        /* Devuelve la distancia euclidea a "b" */
+        inline TReal DistanciaEuclidea(const Vector3D& b) const
+        {
+                const Vector3D& a = *this;
+                return std::sqrt( (double) (b - a).Norma2Cuadrado() );
+        }
+
+        /* Devuelve el cuadrado de la distancia euclidea */
+        inline TReal DistanciaEuclideaCuadrado(const Vector3D& b) const
+        {
+                const Vector3D& a = *this;
+                return (b - a).Norma2Cuadrado();
+        }
+
+        /* Normaliza un vector teniendo en cuenta singularidades */
+        inline Vector3D& Normalizar()
+        {
+
+                Vector3D& a = (*this);
+
+                const TReal& norma = a.Norma2();
+
+                if ( std::abs(norma) < EpsilonDeReales()) {
+                        a.Asignar( (TComp)0.0, (TComp)0.0f, (TComp)0.0);
+                } else {
+                        a /= norma;
+                }
+                return a;
+        }
+
+        /* Devuelve el vector normalizado teniendo en cuenta singularidades */
+        inline Vector3D Normalizado() const
+        {
+                return Vector3D(*this).Normalizar();
+        }
+
+        /* Devuelve el producto escalar por b */
+        inline TReal ProductoEscalar(const Vector3D& b) const
+        {
+                const Vector3D& a = *this;
+                return ((TReal)a.x * (TReal)b.x) + ((TReal)a.y * (TReal)b.y) + ((TReal)a.z * (TReal)b.z);
+        }
+
+        /* Devuelve el producto vectorial
+        	w =  u  x v = (u_y v_z - u_z v_y) i + (u_z v_x - u_x v_z) j + (u_x v_y - u_y v_x) k
+        	|  i   j   k  |
+        	| u.x u.y u.z | = { (u.y*v.z - u.z*v.y), (u.z*v.x - u.x*v.z), (u.x*v.y - u.y*v.x) }
+        	| v.x v.y v.z |
+        */
+        inline Vector3D ProductoVectorial(const Vector3D& v) const
+        {
+                const Vector3D& u = *this;
+                return Vector3D(
+                               ((TReal)u.y * (TReal)v.z) - ((TReal)u.z * (TReal)v.y),
+                               ((TReal)u.z * (TReal)v.x) - ((TReal)u.x * (TReal)v.z),
+                               ((TReal)u.x * (TReal)v.y) - ((TReal)u.y * (TReal)v.x)
+                       );
+        }
+
+        //----------------------------------------------
+        //-- Angulos
+        //----------------------------------------------
+
+        /* Devuelve el angulo { entre [0, PI) } que forma con "b" */
+        inline TReal Angulo(const Vector3D& b) const
+        {
+                const Vector3D& a = (*this);
+                const TReal& angulo = std::acos( ((TReal) a.ProductoEscalar(b)) / (a.Norma2() * b.Norma2()) );
+                return angulo;
+        }
+
+
+        //----------------------------------------------
+        //-- Ajuste e interpolacion
+        //----------------------------------------------
+
+
+
+        //----------------------------------------------
+        //-- Componentes
+        //----------------------------------------------
+
+        /* Devuelve la mayor de las componentes */
+        inline const TComp& Mayor() const
+        {
+                return x > y ? (x > z ? x : z) : (y > z ? y : z);
+        }
+
+        /* Devuelve la menor de las componentes */
+        inline const TComp& Menor() const
+        {
+                return x > y ? (y > z ? z : y) : (x > z ? z : x );
+        }
+
+        /* Returns the dominant component index (x==0, y==1, z==2) */
+        inline int GetDominantIndex() const
+        {
+                return x > y ? (y > z ? 2 : 1) : (x > z ? 2 : 0 );
+        }
+
+        //----------------------------------------------
+        //-- Constantes
+        //----------------------------------------------
+
+        static inline TComp InfinitoDeComponentes()
+        {
+                return std::numeric_limits<TComp>::infinity();
+        }
+
+        static inline TReal InfinitoDeReales()
+        {
+                return std::numeric_limits<TReal>::infinity();
+        }
+
+        static inline TComp NaNDeComponentes()
+        {
+                return std::numeric_limits<TComp>::quiet_NaN();
+        }
+
+        static inline TReal NaNDeReales()
+        {
+                return std::numeric_limits<TReal>::quiet_NaN();
+        }
+
+        static inline TComp EpsilonDeComponentes()
+        {
+                return std::numeric_limits<TComp>::epsilon();
+        }
+
+        static inline TReal EpsilonDeReales()
+        {
+                return std::numeric_limits<TReal>::epsilon();
+        }
+
+        //----------------------------------------------
+        //-- Comprobaciones
+        //----------------------------------------------
+
+        inline bool EsNulo() const
+        {
+#if defined(EXACT_COMPARISON)
+                return x == 0.0 && y == 0.0 && z == 0.0;
+#else
+                return ((*this) - Zero()).ValorAbsoluto().NearlyEqual(Zero());
+#endif
+        }
+
+        inline bool EsInvalido() const
+        {
+                return (x != x) || (y != y) || (z != z);
+        }
+
+        inline bool EsNaN() const
+        {
+                return (x != x) || (y != y) || (z != z);
+        }
+
+        //----------------------------------------------
+        //-- Geometria
+        //----------------------------------------------
+
+        /** Devuelve el punto de interseccion entre una recta y un plano
+        La recta
+        **/
+
+        static Vector3D InterseccionEntreRectaYPlano(const Vector3D& punto_recta, const Vector3D& vdir_recta, const Vector3D& centro_plano, const Vector3D& vnorm_plano)
+        {
+                TReal numerador = (centro_plano - punto_recta).ProductoEscalar(vnorm_plano);
+                TReal denominador = vdir_recta.ProductoEscalar(vnorm_plano);
+                TReal distancia = 0.0;
+                if (std::abs(denominador) < EpsilonDeReales()) {
+                        if (std::abs(numerador) < EpsilonDeReales()) { // Colineales
+                                return punto_recta;
+                        } else {
+                                return Inf(); // Paralelos. Se cortan en el infinito
+                        }
+                } else {
+                        distancia = numerador / denominador;
+                        return punto_recta + vdir_recta * distancia;
+                }
+        }
+
+        /* Devuelve el punto medio entre dos vectores */
+        inline Vector3D PuntoMedio(const Vector3D& b) const
+        {
+                const Vector3D& a = (*this);
+                return (a + b) / 2.0f;
+        }
+
+        /* Devuelve el punto de la proyeccion ortogonal del punto sobre la recta definida por p0 y p1 */
+        inline Vector3D ProyeccionOrtogonalSobreRecta(const Vector3D& p0, const Vector3D& p1) const
+        {
+                typedef Vector3D V;
+                V vdir = p1 - p0;
+                V::TComp proj = ( (*this) - p0).ProductoEscalar(vdir);
+                return p0 + (vdir * proj);
+        }
+
+        /* Devuelve la distancia del punto a la recta definida por p0 y p1 */
+        inline TReal DistanciaARecta(const Vector3D& p0, const Vector3D& p1) const
+        {
+                return (ProyeccionOrtogonalSobreRecta(p0, p1) - (*this)).Norma2();
+        }
+
+        /* Devuelve el cuadrado de la distancia del punto a la recta definida por p0 y p1 */
+        inline TComp DistanciaARectaCuadrado(const Vector3D& p0, const Vector3D& p1) const
+        {
+                return (ProyeccionOrtogonalSobreRecta(p0, p1) - (*this)).Norma2Cuadrado();
+        }
+
+        //----------------------------------------------
+        //-- Acotaciones
+        //----------------------------------------------
+
+        /** Return signs ( -1.0 if < -epsilon, 1.0 if > epsilon 0.0 otherwise) */
+        inline Vector3D Sign() const
+        {
+                Vector3D signs;
+                const TComp lower = -EpsilonDeComponentes();
+                const TComp upper = EpsilonDeComponentes();
+                for (int i = 0; i < 3; i++) {
+                        const TComp& val = v[i];
+                        TComp& sign = signs.v[i];
+                        if (val < lower) {
+                                sign = -1.0;
+                        } else if (val > upper) {
+                                sign = 1.0;
+                        } else {
+                                sign = 0.0;
+                        }
+                }
+                return signs;
+        }
+
+        /** Stabilize at 0.0 (ignore if desv from zero > eps) */
+        inline Vector3D& Stabilize()
+        {
+                TComp trunc = EpsilonDeComponentes();
+                for (int i = 0; i < 3; i++) {
+                        TComp& val = v[i];
+                        if (val > 0.0) {
+                                if (val < trunc) {
+                                        val = 0.0;
+                                }
+                        } else if (val < 0.0) {
+                                if (std::abs(val) < trunc) {
+                                        val = 0.0;
+                                }
+                        }
+                }
+                return *this;
+        }
+
+        /** Return a new vector stabilized at 0.0 (ignore if desv from zero > eps) */
+        inline Vector3D Stabilized() const
+        {
+                return Vector3D(*this).Stabilize();
+        }
+
+        inline Vector3D ValorAbsoluto()
+        {
+                return Vector3D(std::abs(x), std::abs(y), std::abs(z));
+        }
+
+        inline Vector3D TruncadoAMaximo(const TComp& val) const
+        {
+                return Vector3D(*this).TruncarAMaximo(val);
+        }
+
+        inline Vector3D TruncadoAMinimo(const TComp& val) const
+        {
+                return Vector3D(*this).TruncarAMinimo(val);
+        }
+
+        inline Vector3D& TruncarAMaximo(const TComp& val)
+        {
+                x = std::max(x, val);
+                y = std::max(y, val);
+                z = std::max(z, val);
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline Vector3D& TruncarAMinimo(const TComp& val)
+        {
+                x = std::min(x, val);
+                y = std::min(y, val);
+                z = std::min(z, val);
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline Vector3D TruncadoAMaximo(TComp valx, TComp valy, TComp valz) const
+        {
+                return Vector3D(*this).TruncarAMaximo(valx, valy, valz);
+        }
+
+        inline Vector3D TruncadoAMinimo(TComp valx, TComp valy, TComp valz) const
+        {
+                return Vector3D(*this).TruncarAMinimo(valx, valy, valz);
+        }
+
+        inline Vector3D& TruncarAMaximo(TComp valx, TComp valy, TComp valz)
+        {
+                x = std::max(x, valx);
+                y = std::max(y, valy);
+                z = std::max(z, valz);
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline Vector3D& TruncarAMinimo(TComp valx, TComp valy, TComp valz)
+        {
+                x = std::min(x, valx);
+                y = std::min(y, valy);
+                z = std::min(z, valz);
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline TComp ComponenteMaxima() const
+        {
+                return std::max(x,std::max(y, z));
+        }
+
+        inline TComp ComponenteMinima() const
+        {
+                return std::min(x,std::min(y, z));
+        }
+
+        static inline Vector3D ComponentesMaximas(const Vector3D& a, const Vector3D& b)
+        {
+                return Vector3D(std::max(a.x, b.x), std::max(a.y, b.y), std::max(a.z, b.z));
+        }
+
+        static inline Vector3D ComponentesMinimas(const Vector3D& a, const Vector3D& b)
+        {
+                return Vector3D(std::min(a.x, b.x), std::min(a.y, b.y), std::min(a.z, b.z));
+        }
+
+        inline Vector3D& AsignarMaximos(const Vector3D& o)
+        {
+                x = std::max(x, o.x);
+                y = std::max(y, o.y);
+                z = std::max(x, o.z);
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline Vector3D& AsignarMinimos(const Vector3D& o)
+        {
+                x = std::min(x, o.x);
+                y = std::min(y, o.y);
+                z = std::min(z, o.z);
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline Vector3D Maximos(const Vector3D& o) const
+        {
+                return Vector3D(std::max(x, o.x), std::max(y, o.y), std::max(z, o.z));
+        }
+
+        inline const Vector3D Minimos(const Vector3D& o) const
+        {
+                return Vector3D(std::min(x, o.x), std::min(y, o.y), std::min(z, o.z));
+        }
+
+        inline bool TieneComponenteMayorQue(const Vector3D& o) const
+        {
+                return ( (x > o.x) || (y > o.y) || (z > o.z));
+        }
+
+        inline bool TieneComponenteMenorQue(const Vector3D& o) const
+        {
+                return ( (x < o.x) || (y < o.y)  || (z < o.z));
+        }
+
+        /* Devuelve verdadero si el vector es singular (distancia a (0,0) < epsilon =~ (0,0) ) */
+        inline bool Singular() const
+        {
+                return std::abs(x) < EpsilonDeComponentes() || std::abs(y) < EpsilonDeComponentes() || std::abs(z) < EpsilonDeComponentes();
+        }
+
+        inline Vector3D RedondeoAlza() const
+        {
+                return Vector3D(*this).RedondearAlza();
+        }
+
+        inline Vector3D& RedondearAlza()
+        {
+                x = std::ceil(x);
+                y = std::ceil(y);
+                z = std::ceil(z);
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline Vector3D RedondeoBaja() const
+        {
+                return Vector3D(*this).RedondearBaja();
+        }
+
+        inline Vector3D& RedondearBaja()
+        {
+                x = std::floor(x);
+                y = std::floor(y);
+                z = std::floor(z);
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        template <class TipoComp> static TipoComp ValorRedondeado(const TipoComp& val)
+        {
+                const TipoComp& d = std::floor(val);
+                const TipoComp& u = std::ceil(val);
+                if ( val - d < u - val) {
+                        return d;
+                } else {
+                        return u;
+                }
+        }
+
+        inline Vector3D Redondeado() const
+        {
+                return Vector3D(*this).Redondear();
+        }
+
+        inline Vector3D& Redondear()
+        {
+                x = ValorRedondeado(x);
+                y = ValorRedondeado(y);
+                z = ValorRedondeado(z);
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        // Calcula y devuelve el centroide de una coleccion de puntos.
+        template <class TipoVector>
+        static Vector3D Centroide(const TipoVector v[], const int& numVertices)
+        {
+                Vector3D vSum;
+
+                if (numVertices > 0) {
+                        for (int i = 0; i < numVertices; ++i) {
+                                vSum += v[i];
+                        }
+                        vSum /= (TComp)numVertices;
+                }
+                return vSum;
+        }
+
+        // Calcula y devuelve el centroide de una coleccion de puntos.
+        template <class TipoVector>
+        static Vector3D Centroide(const std::list<TipoVector>& lista)
+        {
+                typename std::list<TipoVector>::const_iterator i = lista.begin();
+                Vector3D vSum;
+
+                if (i != lista.end()) {
+                        for ( i = lista.begin(); i != lista.end(); i++) {
+                                vSum += (*i);
+                        }
+                        vSum /= (TComp)lista.size();
+                }
+                return vSum;
+        }
+
+
+        // Intercambia los valores de p0 a p1 y viceversa
+        template <class TipoComp, class TipoReal> static void IntercambiarValores(Vector3D& p0, Vector3D& p1)
+        {
+                const Vector3D temp(p0);
+                p0 = p1;
+                p1 = temp;
+        }
+
+        inline Vector3D& operator=(const Vector3D& otro)
+        {
+                v[0] = (TComp) otro.v[0];
+                v[1] = (TComp) otro.v[1];
+                v[2] = (TComp) otro.v[2];
+                v[3] = (TComp) otro.v[3];
+                return *this;
+        }
+
+
+        template <class TipoComp> inline Vector3D& operator=(const TipoComp* const vec)
+        {
+                v[0] = (TComp) vec[0];
+                v[1] = (TComp) vec[1];
+                v[2] = (TComp) vec[2];
+                //v[3] = (TComp) vec[3];
+                v[3] = 1.0;
+                return *this;
+        }
+
+        inline bool operator==(const Vector3D& otro) const
+        {
+#if defined(EXACT_COMPARION)
+                return ( x == (TComp) otro.x ) && ( y == (TComp) otro.y ) && ( z == (TComp) otro.z );
+#else
+                return this->NearlyEqual(otro);
+#endif
+        }
+
+        inline bool NearlyEqual(const Vector3D& otro) const
+        {
+                return (*this - otro).ValorAbsoluto() < Vector3D(EpsilonDeComponentes(), EpsilonDeComponentes(), EpsilonDeComponentes());
+        }
+
+        inline bool NearlyNotEqual(const Vector3D& otro) const
+        {
+                return !NearlyEqual(otro);
+        }
+
+        inline bool operator!=(const Vector3D& otro) const
+        {
+                return !(*this == otro);
+        }
+
+        inline Vector3D operator*(const Vector3D& otro) const
+        {
+                return Vector3D(x * otro.x, y * otro.y, z * otro.z);
+        }
+
+        inline Vector3D& operator*=(const Vector3D& otro)
+        {
+                x *= otro.x;
+                y *= otro.y;
+                z *= otro.z;
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        template <class TipoComp> inline Vector3D operator*(const TipoComp& valor) const
+        {
+                return Vector3D(x * valor, y * valor, z * valor);
+        }
+
+        template <class TipoComp> inline Vector3D& operator*=(const TipoComp& valor)
+        {
+                x *= (TComp) valor;
+                y *= (TComp) valor;
+                z *= (TComp) valor;
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline Vector3D operator/(const Vector3D& otro) const
+        {
+                return Vector3D(x / otro.x, y / otro.y, z / otro.z);
+        }
+
+        inline Vector3D& operator/=(const Vector3D v)
+        {
+                x /= v.x;
+                y /= v.y;
+                z /= v.z;
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        template <class TipoComp> inline Vector3D operator/(const TipoComp& v) const
+        {
+                return Vector3D(x / v, y / v, z / v);
+        }
+
+        template <class TipoComp> inline Vector3D& operator/=(const TipoComp& v)
+        {
+                x /= v;
+                y /= v;
+                z /= v;
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline Vector3D operator-(const Vector3D& otro) const
+        {
+                return Vector3D(x - otro.x, y - otro.y, z - otro.z);
+        }
+
+        inline Vector3D& operator-=(const Vector3D& otro)
+        {
+                x -= otro.x;
+                y -= otro.y;
+                z -= otro.z;
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline Vector3D operator-(const TComp& valor) const
+        {
+                return Vector3D(x - valor, y - valor, z - valor);
+        }
+
+        /** Unary minus **/
+        inline Vector3D operator-() const
+        {
+                return Vector3D(-x, -y, -z);
+        }
+
+        inline Vector3D& operator-=(const TComp& valor)
+        {
+                x -= valor;
+                y -= valor;
+                z -= valor;
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline Vector3D operator+(const Vector3D& otro) const
+        {
+                return Vector3D(x + otro.x, y + otro.y, z + otro.z);
+        }
+
+        inline Vector3D& operator+=(const Vector3D& otro)
+        {
+                x += otro.x;
+                y += otro.y;
+                z += otro.z;
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline Vector3D operator+(const TComp& valor) const
+        {
+                Vector3D t(*this);
+                return t += valor;
+        }
+
+        inline Vector3D& operator+=(const TComp& valor)
+        {
+                x += (TComp) valor;
+                y += (TComp) valor;
+                z += (TComp) valor;
+                t = (TComp) 1.0;
+                return *this;
+        }
+
+        inline bool operator<(const Vector3D& otro) const
+        {
+                return ( (x < otro.x) && (y < otro.y) && (z < otro.z) );
+        }
+        inline bool operator<=(const Vector3D& otro) const
+        {
+                return ( (*this) < otro ) || this->NearlyEqual(otro);
+        }
+        inline bool operator>(const Vector3D& otro) const
+        {
+                return ( (x > otro.x) && (y > otro.y) && (z > otro.z) );
+        }
+        inline bool operator>=(const Vector3D& otro) const
+        {
+                return ( (*this) < otro ) || this->NearlyEqual(otro);
+        }
+
+        inline operator TComp *()
+        {
+                return v;
+        }
+
+        inline operator const TComp *() const
+        {
+                return v;
+        }
+
+        //----------------------------------------------
+        //-- Utils
+        //----------------------------------------------
+
+        inline bool InsideOpenedBoundingBox(const Vector3D& p0, const Vector3D& p1) const
+        {
+                bool vx = false;
+                bool vy = false;
+                bool vz = false;
+                if (p0.x < p1.x) {
+                        vx = (p0.x < x && x < p1.x);
+                } else {
+                        vx = (p1.x < x && x < p0.x);
+                }
+
+                if (p0.y < p1.y) {
+                        vy = (p0.y < y && y < p1.y);
+                } else {
+                        vy = (p1.y < y && y < p0.y);
+                }
+
+                if (p0.z < p1.z) {
+                        vz = (p0.z < z && z < p1.z);
+                } else {
+                        vz = (p1.z < z && z < p0.z);
+                }
+
+                return vx && vy && vz;
+        }
+
+        inline bool InsideClosedBoundingBox(const Vector3D& p0, const Vector3D& p1) const
+        {
+                bool vx = false;
+                bool vy = false;
+                bool vz = false;
+                if (p0.x < p1.x) {
+                        vx = (p0.x <= x && x <= p1.x);
+                } else {
+                        vx = (p1.x <= x && x <= p0.x);
+                }
+
+                if (p0.y < p1.y) {
+                        vy = (p0.y <= y && y <= p1.y);
+                } else {
+                        vy = (p1.y <= y && y <= p0.y);
+                }
+
+                if (p0.z < p1.z) {
+                        vz = (p0.z <= z && z <= p1.z);
+                } else {
+                        vz = (p1.z <= z && z <= p0.z);
+                }
+
+                return vx && vy && vz;
+        }
+
+        inline void InitBoundingBox(Vector3D& p0, Vector3D& p1) const
+        {
+                p0 = p1 = *this;
+        }
+
+        inline void InitBoundingBox(Vector3D bBox[2]) const
+        {
+                InitBoundingBox(bBox[0], bBox[1]);
+        }
+
+        inline void ExtendBoundingBox(Vector3D& p0, Vector3D& p1) const
+        {
+                if (p0.x <= p1.x) {
+                        if (x < p0.x) {
+                                p0.x = x;
+                        } else if (x > p1.x) {
+                                p1.x = x;
+                        }
+                } else {
+                        if (x < p1.x) {
+                                p1.x = x;
+                        } else if (x > p0.x) {
+                                p0.x = x;
+                        }
+                }
+                if (p0.y <= p1.y) {
+                        if (y < p0.y) {
+                                p0.y = y;
+                        } else if (y > p1.y) {
+                                p1.y = y;
+                        }
+                } else {
+                        if (y < p1.y) {
+                                p1.y = y;
+                        } else if (y > p0.y) {
+                                p0.y = y;
+                        }
+                }
+                if (p0.z <= p1.z) {
+                        if (z < p0.z) {
+                                p0.z = z;
+                        } else if (z > p1.z) {
+                                p1.z = z;
+                        }
+                } else {
+                        if (z < p1.z) {
+                                p1.z = z;
+                        } else if (z > p0.z) {
+                                p0.z = z;
+                        }
+                }
+        }
+
+        inline void ExtendBoundingBox(Vector3D bBox[2]) const
+        {
+                ExtendBoundingBox(bBox[0], bBox[1]);
+        }
+
+        //----------------------------------------------
+        //-- Accesores
+        //----------------------------------------------
+
+        inline TComp& operator [] (int i)
+        {
+                return v[i];
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const Vector3D& c)
+        {
+                out << "[ x = " << c.x << ", y = " << c.y << ", z = " << c.z << " ]";
+                return out;
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const Vector3D* const c)
+        {
+                if (c == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *c;
+                }
+                return out;
+        }
+};
+
+template <class TipoComp> inline Vector3D operator+(const TipoComp val, const Vector3D& o)
+{
+        return Vector3D( (Vector3D::TComp)val + o.x, (Vector3D::TComp)val + o.y, (Vector3D::TComp)val + o.z );
+}
+
+template <class TipoComp> inline Vector3D operator-(const TipoComp val, const Vector3D& o)
+{
+        return Vector3D( (Vector3D::TComp)val - o.x, (Vector3D::TComp)val - o.y, (Vector3D::TComp)val - o.z );
+}
+
+template <class TipoComp> inline Vector3D operator*(const TipoComp val, const Vector3D& o)
+{
+        return Vector3D( (Vector3D::TComp)val * o.x, (Vector3D::TComp)val * o.y, (Vector3D::TComp)val * o.z );
+}
+
+template <class TipoComp> inline Vector3D operator/(const TipoComp val, const Vector3D& o)
+{
+        return Vector3D( (Vector3D::TComp)val / o.x, (Vector3D::TComp)val / o.y, (Vector3D::TComp)val / o.z );
+}
+
+class  Matriz3x3
+{
+
+public:
+        typedef PRECISION_COMPONENTE_POR_DEFECTO TComp;
+        typedef PRECISION_REALES_POR_DEFECTO     TReal;
+
+        TReal v[9];
+
+        TReal& a00;
+        TReal& a01;
+        TReal& a02;
+        TReal& a10;
+        TReal& a11;
+        TReal& a12;
+        TReal& a20;
+        TReal& a21;
+        TReal& a22;
+
+        inline  Matriz3x3() : a00(v[0]), a01(v[1]), a02(v[2]), a10(v[3]), a11(v[4]), a12(v[5]), a20(v[6]), a21(v[7]), a22(v[8])
+        {
+                for (int i = 0; i < 9; i++) {
+                        v[i] = 0.0;
+                }
+
+        }
+
+        inline Matriz3x3(const Matriz3x3& otra) :  a00(v[0]), a01(v[1]), a02(v[2]), a10(v[3]), a11(v[4]), a12(v[5]), a20(v[6]), a21(v[7]), a22(v[8])
+        {
+                *this = otra;
+        }
+
+        inline Matriz3x3& operator = (const Matriz3x3& otra)
+        {
+                for (int i = 0; i < 9; i++) {
+                        v[i] = otra.v[i];
+                }
+                return *this;
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const  Matriz3x3& m)
+        {
+                out << "[ a00 = " << m.a00 << ", a01 = " << m.a01 << ", a02 = " << m.a02 << ";  " << std::endl;
+                out << "[ a10 = " << m.a10 << ", a11 = " << m.a11 << ", a12 = " << m.a12 << ";  " << std::endl;
+                out << "[ a20 = " << m.a20 << ", a21 = " << m.a21 << ", a22 = " << m.a22 << "]";
+                return out;
+        }
+
+        inline friend std::ostream& operator<<(std::ostream& out, const  Matriz3x3* m)
+        {
+                if (m == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *m;
+                }
+                return out;
+        }
+};
+}
+}
+#endif
+#endif
diff --git a/cadxcore/api/math/geometry_defs.h b/cadxcore/api/math/geometry_defs.h
new file mode 100644
index 0000000..fdd9fdd
--- /dev/null
+++ b/cadxcore/api/math/geometry_defs.h
@@ -0,0 +1,42 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <cmath>
+
+#define PRECISION_COMPONENTE_POR_DEFECTO double
+#define PRECISION_REALES_POR_DEFECTO     double
+//#define EXACT_COMPARION // use exact comparison with == or treat nearly distances (< epsilon) as equal.
+
+#ifdef _WIN32
+#ifndef M_PI
+#define M_PI       3.14159265358979323846
+#endif
+#ifndef M_PI_2
+#define M_PI_2     1.57079632679489661923
+#endif
+#endif
+#ifndef M_PI_4
+#define M_PI_4     M_PI * 0.25f
+#endif
+#ifndef M_2PI
+#define M_2PI     6.28318530717958647692
+#endif
diff --git a/cadxcore/api/observers/ieventsobserver.cpp b/cadxcore/api/observers/ieventsobserver.cpp
new file mode 100644
index 0000000..1028429
--- /dev/null
+++ b/cadxcore/api/observers/ieventsobserver.cpp
@@ -0,0 +1,49 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ieventsobserver.h"
+#include <api/controllers/ieventscontroller.h>
+
+GNC::GCS::IEventsObserver::IEventsObserver()
+{
+        //m_pControlador = NULL;
+}
+
+GNC::GCS::IEventsObserver::~IEventsObserver()
+{
+        GNC::GCS::IEventsController::Instance()->DesRegistrar(this);
+}
+
+/*
+void GNC::GCS::IEventsObserver::OnRegistrar (IControladorEventos* pControlador)
+{
+	m_pControlador = pControlador;
+}
+*/
+
+void GNC::GCS::IEventsObserver::PreProcesarEvento(GNC::GCS::Events::IEvent*, std::list<GNC::GCS::Events::IEvent*>& )
+{
+
+}
+
+bool GNC::GCS::IEventsObserver::FiltrarEvento(GNC::GCS::Events::IEvent *)
+{
+        return false;
+}
diff --git a/cadxcore/api/observers/ieventsobserver.h b/cadxcore/api/observers/ieventsobserver.h
new file mode 100644
index 0000000..8749e52
--- /dev/null
+++ b/cadxcore/api/observers/ieventsobserver.h
@@ -0,0 +1,69 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IEVENTSOBSERVER_H
+#define IEVENTSOBSERVER_H
+
+#include <list>
+
+#include <api/api.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Events
+{
+class IEvent;
+}
+class IEventsController;
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+
+//====================================================================================================
+//= Interfaz del observador de eventos
+//====================================================================================================
+class EXTAPI IEventsObserver
+{
+public:
+        IEventsObserver();
+
+        virtual ~IEventsObserver();
+
+        //virtual void OnRegistrar (IControladorEventos* pControlador);
+
+        virtual void PreProcesarEvento(GNC::GCS::Events::IEvent*, std::list<GNC::GCS::Events::IEvent*>& );
+
+        virtual bool FiltrarEvento(GNC::GCS::Events::IEvent*);
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent* evt) = 0;
+
+protected:
+        //IControladorEventos* m_pControlador;
+};
+}
+}
+#endif
diff --git a/cadxcore/api/observers/iextensionsobserver.cpp b/cadxcore/api/observers/iextensionsobserver.cpp
new file mode 100644
index 0000000..eff0663
--- /dev/null
+++ b/cadxcore/api/observers/iextensionsobserver.cpp
@@ -0,0 +1,41 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iextensionsobserver.h"
+
+#include <api/controllers/imodulecontroller.h>
+
+
+
+GNC::GCS::IExtensionsObserver::IExtensionsObserver()
+{
+}
+
+GNC::GCS::IExtensionsObserver::~IExtensionsObserver()
+{
+}
+
+void GNC::GCS::IExtensionsObserver::OnModuleActivated(GNC::GCS::IModuleController* )
+{
+}
+
+void GNC::GCS::IExtensionsObserver::OnModuleDeactivated(GNC::GCS::IModuleController* )
+{
+}
diff --git a/cadxcore/api/observers/iextensionsobserver.h b/cadxcore/api/observers/iextensionsobserver.h
new file mode 100644
index 0000000..72f353d
--- /dev/null
+++ b/cadxcore/api/observers/iextensionsobserver.h
@@ -0,0 +1,56 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/api.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IModuleController;
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IExtensionsObserver
+{
+public:
+
+        IExtensionsObserver();
+        virtual ~IExtensionsObserver();
+
+        /** The module is loaded **/
+        virtual void OnModuleLoaded(GNC::GCS::IModuleController* ) = 0;
+        /** The module is unloaded **/
+        virtual void OnModuleUnloaded(GNC::GCS::IModuleController* ) = 0;
+
+        /** The module is activated **/
+        virtual void OnModuleActivated(GNC::GCS::IModuleController* );
+        /** The module is deactivated **/
+        virtual void OnModuleDeactivated(GNC::GCS::IModuleController* );
+};
+}
+}
diff --git a/cadxcore/api/observers/iviewsobserver.h b/cadxcore/api/observers/iviewsobserver.h
new file mode 100644
index 0000000..fc533e9
--- /dev/null
+++ b/cadxcore/api/observers/iviewsobserver.h
@@ -0,0 +1,56 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+/* Interfaz de observacion de vistas */
+class EXTAPI IObservadorVistas
+{
+public:
+
+        IObservadorVistas() {}
+
+        virtual ~IObservadorVistas() {}
+
+        //region "Interfaz de observacion de vistas"
+
+        virtual void OnVistaActivada(GNC::GCS::IVista* /*pVista*/) {}
+
+        // Opcionales
+        virtual void OnVistaCreada(GNC::GCS::IVista* ) {}
+
+        virtual void OnVistaDestruida(GNC::GCS::IVista* ) {}
+        //endregion
+
+};
+}
+}
diff --git a/cadxcore/api/observers/iwidgetsobserver.h b/cadxcore/api/observers/iwidgetsobserver.h
new file mode 100644
index 0000000..1bab0f0
--- /dev/null
+++ b/cadxcore/api/observers/iwidgetsobserver.h
@@ -0,0 +1,79 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+//region "Forward declarations"
+
+class IWidget;
+
+//endregion
+
+//-----------------------------------------------------------------------------------------------
+
+class IObservadorWidget
+{
+public:
+
+        long GID; // GID de los widgets a escuchar (filtro por tipo)
+        long VID; // VID de los widgets a escuchar (VistaID)
+
+        /* Construye un observador que escucha eventos de widgets con un gid especifico */
+        IObservadorWidget(long vid, long gid=0)
+        {
+                SetVID(vid);
+                SetGID(gid);
+        }
+
+        virtual ~IObservadorWidget()
+        {
+
+        }
+
+        virtual void SetVID(long vid)
+        {
+                VID = vid;
+        }
+
+        virtual void SetGID(long gid)
+        {
+                GID = gid;
+        }
+
+        virtual void OnWidgetCreado(IWidget*) {}
+
+        virtual void OnWidgetModificado(IWidget*) {}
+
+        virtual void OnWidgetDestruido(IWidget*) {}
+
+        virtual void OnWidgetSeleccionado(IWidget*) {}
+
+        virtual void OnWidgetDeseleccionado(IWidget*) {}
+};
+}
+}
+}
diff --git a/cadxcore/api/threads/thread.cpp b/cadxcore/api/threads/thread.cpp
new file mode 100644
index 0000000..17e4071
--- /dev/null
+++ b/cadxcore/api/threads/thread.cpp
@@ -0,0 +1,214 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/iexception.h>
+
+#include <api/threads/thread.h>
+#include <api/controllers/icontroladorlog.h>
+
+#include <wx/thread.h>
+
+GNC::GCS::ILockable GNC::GCS::ThreadController::Lock;
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+#if defined (_WINDOWS)
+#define MS_VC_EXCEPTION 0x406D1388
+
+#pragma pack(push,8)
+typedef struct tagTHREADNAME_INFO {
+        DWORD dwType; // Must be 0x1000.
+        LPCSTR szName; // Pointer to name (in user addr space).
+        DWORD dwThreadID; // Thread ID (-1=caller thread).
+        DWORD dwFlags; // Reserved for future use, must be zero.
+} THREADNAME_INFO;
+#pragma pack(pop)
+
+void GNC::GCS::Threading::SetThreadName( long threadID, const std::string& threadName)
+{
+        //Sleep(10);
+        THREADNAME_INFO info;
+        info.dwType = 0x1000;
+        info.szName = threadName.c_str();
+        info.dwThreadID = threadID;
+        info.dwFlags = 0;
+
+        __try {
+                RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(ULONG_PTR), (ULONG_PTR*)&info );
+        } __except(EXCEPTION_EXECUTE_HANDLER) {
+        }
+}
+#elif defined(__WXOSX__)
+#include <pthread.h>
+#include <sys/signal.h>
+
+void GNC::GCS::Threading::SetThreadName( long /*threadID*/, const std::string& threadName)
+{
+        //pthread_setname_np(threadName.c_str());
+}
+
+void FooSignalHandler(int sig)
+{
+        GTRACE("SIGUSR1 recibido");
+}
+#else
+#include <pthread.h>
+#include <sys/signal.h>
+
+void GNC::GCS::Threading::SetThreadName( long /*threadID*/, const std::string& /*threadName*/)
+{
+}
+
+void FooSignalHandler(int /*sig*/)
+{
+        GTRACE("SIGUSR1 recibido");
+}
+
+#endif
+
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+namespace GNC
+{
+namespace GCS
+{
+class ThreadAdaptorPrivate: public wxThread
+{
+protected:
+        ThreadAdaptorPrivate(GNC::GCS::Thread* iface, wxThreadKind kind ) : wxThread(kind)
+        {
+                this->m_threadIface = iface;
+                this->m_threadId = 0;
+
+        }
+
+        ~ThreadAdaptorPrivate()
+        {
+        }
+
+        virtual void OnExit()
+        {
+                ;
+        }
+
+
+        virtual void* Entry()
+        {
+                GNC::GCS::Threading::SetThreadName( GetId(), this->m_threadIface->GetName());
+
+                try {
+                        return this->m_threadIface->Task();
+                } catch (GNC::GCS::IException& ex) {
+                        LOG_ERROR(_Std("Threading"), _Std("Error while running thread: ") << this->m_threadIface->GetName() << _Std(" : ") << ex.what() );
+                } catch (std::exception& ex) {
+                        LOG_ERROR(_Std("Threading"), _Std("Error while running thread: ") << this->m_threadIface->GetName() << _Std(" : ") << ex.what() );
+                } catch (...) {
+                        LOG_ERROR(_Std("Threading"), _Std("Internal error while running thread: ") << this->m_threadIface->GetName() );
+                }
+                return NULL;
+        }
+
+        virtual void SetTid(unsigned long tid)
+        {
+                this->m_threadId = tid;
+        }
+
+        Thread* m_threadIface;
+        unsigned long m_threadId;
+        friend class ThreadController;
+};
+}
+}
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+GNC::GCS::Thread::Thread(const std::string& name)
+{
+        this->m_ThreadName = name;
+}
+
+const std::string& GNC::GCS::Thread::GetName() const
+{
+        return this->m_ThreadName;
+}
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+GNC::GCS::ThreadController::ThreadMap GNC::GCS::ThreadController::RegisteredThreads;
+std::atomic<unsigned long> GNC::GCS::ThreadController::TidCount(1);
+
+unsigned long GNC::GCS::ThreadController::Launch(Thread* thread, bool detached)
+{
+        unsigned long tid = 0;
+        ThreadAdaptorPrivate* threadPrivate = new ThreadAdaptorPrivate(thread, detached ? wxTHREAD_DETACHED : wxTHREAD_JOINABLE);
+        threadPrivate->Create();
+        {
+                tid = TidCount++;
+                threadPrivate->SetTid(tid);
+
+                GNC::GCS::ILocker lock(Lock);
+                RegisteredThreads[tid] = threadPrivate;
+        }
+        threadPrivate->Run();
+
+        return tid;
+
+}
+void GNC::GCS::ThreadController::Stop(unsigned long tid)
+{
+        GNC::GCS::ILocker lock(Lock);
+        ThreadMap::iterator it = RegisteredThreads.find(tid);
+        if (it != RegisteredThreads.end()) {
+                ThreadAdaptorPrivate* threadPrivate = (*it).second;
+                RegisteredThreads.erase(it);
+                threadPrivate->m_threadIface->Stop();
+                threadPrivate->Wait();
+                delete threadPrivate;
+        }
+}
+
+void GNC::GCS::ThreadController::Wait(unsigned long tid)
+{
+        GNC::GCS::ILocker lock(Lock);
+        ThreadMap::iterator it = RegisteredThreads.find(tid);
+        if (it != RegisteredThreads.end()) {
+                ThreadAdaptorPrivate* threadPrivate = (*it).second;
+                threadPrivate->Wait();
+                RegisteredThreads.erase(it);
+        }
+}
+
+void GNC::GCS::ThreadController::OnThreadExit(unsigned long tid)
+{
+        GNC::GCS::ILocker lock(Lock);
+        ThreadMap::iterator it = RegisteredThreads.find(tid);
+        if (it != RegisteredThreads.end()) {
+                ThreadAdaptorPrivate* threadPrivate = (*it).second;
+                delete threadPrivate;
+                RegisteredThreads.erase(it);
+        }
+}
+
diff --git a/cadxcore/api/threads/thread.h b/cadxcore/api/threads/thread.h
new file mode 100644
index 0000000..40e9f9b
--- /dev/null
+++ b/cadxcore/api/threads/thread.h
@@ -0,0 +1,97 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <map>
+#include <api/api.h>
+#include <api/ilock.h>
+#include <atomic>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Threading
+{
+void EXTAPI SetThreadName(long threadID, const std::string& threadName);
+}
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+
+class ThreadAdaptorPrivate;
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+class EXTAPI Thread
+{
+
+public:
+
+        Thread(const std::string& name = "thread");
+
+        virtual ~Thread() {}
+
+        const std::string& GetName() const;
+
+        virtual void Stop() = 0;
+
+protected:
+
+        virtual void* Task() = 0;
+
+        std::string m_ThreadName;
+
+        friend class ThreadAdaptorPrivate;
+
+};
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+class EXTAPI ThreadController
+{
+public:
+
+        typedef std::map<unsigned long, ThreadAdaptorPrivate*> ThreadMap;
+
+        static unsigned long Launch(Thread* thread, bool detached = true);
+
+        static void Stop(unsigned long tid);
+        static void Wait(unsigned long tid);
+        static void Suspend(unsigned long tid);
+
+        static void OnThreadExit(unsigned long tid);
+
+protected:
+        static GNC::GCS::ILockable Lock;
+        static std::atomic<unsigned long> TidCount;
+private:
+        static ThreadMap RegisteredThreads;
+};
+}
+}
diff --git a/cadxcore/api/toolsystem/itool.cpp b/cadxcore/api/toolsystem/itool.cpp
new file mode 100644
index 0000000..c24c8a8
--- /dev/null
+++ b/cadxcore/api/toolsystem/itool.cpp
@@ -0,0 +1,128 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <iostream>
+
+#include "itool.h"
+#include "itoolcontroller.h"
+#include <api/toolsystem/itoolsregistry.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+
+#include <wx/panel.h>
+#include <wx/sizer.h>
+#include <wx/wxginkgotoolbar.h>
+
+//revisado
+void GNC::GCS::ITool::RegisterTool()
+{
+        GNC::GCS::IToolsRegistry::Instance()->RegisterTool(this);
+}
+
+/** Sets the Owner module of the tool (the module providing the tool). NULL if CADxCore **/
+void GNC::GCS::ITool::SetOwnerModule(GNC::GCS::IModuleController* pOwner)
+{
+        OwnerModule = pOwner;
+}
+
+/** Gets the Owner module of the tool (the module providing the tool). NULL if CADxCore **/
+GNC::GCS::IModuleController* GNC::GCS::ITool::GetOwnerModule()
+{
+        return OwnerModule;
+}
+
+GNC::GCS::ITool::ITool(const ITool::UID& uid, const ITool::TToolFamily& uidFamilia, const std::string& nombre, const wxBitmap& icon, const int subFamilia, const int& prioridad) :
+        ID(uid),
+        FamilyId(uidFamilia),
+        SubFamilyId(subFamilia),
+        Priority(prioridad),
+        Name(nombre),
+        Icon(icon),
+        m_pParent(NULL),
+        OwnerModule(NULL),
+        KeyCode(0),
+        Enabled(true)
+{
+}
+
+GNC::GCS::ITool::~ITool()
+{
+}
+
+void GNC::GCS::ITool::AppendToolIn(wxGinkgoToolBar* pParent)
+{
+        if (AppendsInToolBar()) {
+                if (HasDropDownMenu()) {
+                        pParent->AddTool(this->ID, wxString::FromUTF8(Name.c_str()), Icon, wxString::FromUTF8(Name.c_str()), wxITEM_NORMAL);
+                        pParent->ForceSetToolDropDown(this->ID, true);
+                } else {
+                        pParent->AddTool(this->ID, wxString::FromUTF8(Name.c_str()), Icon, wxString::FromUTF8(Name.c_str()), wxITEM_CHECK);
+                        pParent->ForceSetToolDropDown(this->ID, false);
+                }
+                pParent->EnableTool(this->ID, IsEnabled());
+        }
+}
+
+void GNC::GCS::ITool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                GNC::GUI::wxDefaultEvtHandlerTool* evtHandler = new GNC::GUI::wxDefaultEvtHandlerTool(pParent, this);
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ID, wxString::FromUTF8(Name.c_str()),Icon, evtHandler));
+        }
+}
+
+void GNC::GCS::ITool::AppendDropDownMenu(wxEvtHandler* /*pParent*/, wxMenu* /*pMenu*/)
+{
+}
+
+void GNC::GCS::ITool::SetToolBar(GNC::GCS::IToolController* pParent)
+{
+        m_pParent = pParent;
+}
+
+GNC::GCS::IToolController* GNC::GCS::ITool::GetToolBar()
+{
+        return m_pParent;
+}
+
+void GNC::GCS::ITool::ConnectKeyEvents(wxWindow* /*pParent*/)
+{
+        //implement in child
+}
+
+int GNC::GCS::ITool::GetKeyCode()
+{
+        return KeyCode;
+}
+
+bool GNC::GCS::ITool::IsEnabled()
+{
+        return Enabled;
+}
+
+/*If a tool is not active it wont be attached to any menu*/
+bool GNC::GCS::ITool::IsReady()
+{
+        return true;
+}
+
+void GNC::GCS::ITool::Enable(bool enabled)
+{
+        Enabled = enabled;
+}
diff --git a/cadxcore/api/toolsystem/itool.h b/cadxcore/api/toolsystem/itool.h
new file mode 100644
index 0000000..8d07d7a
--- /dev/null
+++ b/cadxcore/api/toolsystem/itool.h
@@ -0,0 +1,164 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ITOOL_H
+#define ITOOL_H
+
+#include <api/api.h>
+#include <api/globals.h>
+#include <api/ibutton.h>
+#include <api/iexception.h>
+#include <wx/bitmap.h>
+#include <wx/cursor.h>
+
+#include <wx/bitmap.h>
+
+class wxXmlNode;
+class wxPanel;
+class wxSizer;
+class wxMenu;
+class wxGinkgoToolBar;
+class wxEvtHandler;
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+class ITool;
+class IToolController;
+class IModuleController;
+}
+}
+
+namespace GNC
+{
+
+namespace GCS
+{
+class EventHandlerITool;
+
+class EXTAPI ITool
+{
+public:
+        typedef enum {
+                TFamiliaGlobal,
+                TFamiliaVisualizacion,
+                TFamiliaMedicion,
+                TFamiliaAnotacion,
+                TFamiliaChroma,
+                TFamiliaVision,
+                TMenuArchivo,
+                TMenuEdicion,
+                TMenuVer,
+                TSeriesMenu,
+                TMenuHerramientas,
+                TMenuHelp,
+                TMenuExport,
+                TMenuPACSAcquisition,
+                TViewOptions
+        } TToolFamily;
+
+        typedef unsigned int UID;
+
+        virtual ~ITool();
+
+        //new tool
+        ITool(const ITool::UID& uid, const ITool::TToolFamily& familyUID, const std::string& name, const wxBitmap& icon, const int subFamily = 0xFFFFFFFF, const int& priority = 0);
+
+        TToolFamily GetFamily()
+        {
+                return FamilyId;
+        }
+
+        int GetSubFamily()
+        {
+                return SubFamilyId;
+        }
+
+        virtual bool AppendsInGlobalMenu()
+        {
+                return false;
+        }
+
+        virtual bool AppendsInMenu()
+        {
+                return true;
+        }
+
+        virtual bool AppendsInToolBar()
+        {
+                return true;
+        }
+
+        virtual bool HasDropDownMenu()
+        {
+                return false;
+        }
+
+        virtual void AppendToolIn(wxGinkgoToolBar* pParent);
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+        virtual void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual bool IsEnabled();
+        virtual void Enable(bool enabled);
+        /*If a tool is not ready it wont be attached to any menu*/
+        virtual bool IsReady();
+
+        virtual bool ExecuteAction() = 0;
+
+
+        /** Registers the tool in the Tool Registry Container **/
+        void RegisterTool();
+
+        /** Sets the Owner module of the tool (the module providing the tool). NULL if CADxCore **/
+        void SetOwnerModule(GNC::GCS::IModuleController* pOwner);
+        /** Gets the Owner module of the tool (the module providing the tool). NULL if CADxCore **/
+        GNC::GCS::IModuleController* GetOwnerModule();
+
+        virtual GNC::GCS::ITool* NewTool() = 0;
+
+        virtual void SetToolBar(GNC::GCS::IToolController* pParent);
+        virtual GNC::GCS::IToolController* GetToolBar();
+
+        //register key events to this parent
+        virtual void ConnectKeyEvents(wxWindow* pParent);
+
+        virtual int GetKeyCode();
+
+        ITool::UID ID;
+        TToolFamily FamilyId;
+        //sirve para meter separadores en los menus dentro de la misma familia
+        int	SubFamilyId;
+        int Priority;
+        std::string Name;
+        wxBitmap Icon;
+        GNC::GCS::IToolController* m_pParent;
+        IModuleController* OwnerModule;
+        int KeyCode;
+protected:
+        bool Enabled;
+        //
+
+};
+}
+}
+#endif
diff --git a/cadxcore/api/toolsystem/itoolcontroller.cpp b/cadxcore/api/toolsystem/itoolcontroller.cpp
new file mode 100644
index 0000000..835f217
--- /dev/null
+++ b/cadxcore/api/toolsystem/itoolcontroller.cpp
@@ -0,0 +1,37 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <map>
+#include "itoolcontroller.h"
+#include <main/toolsystem/toolcontroller.h>
+
+
+GNC::GCS::IToolController::IToolController()
+{
+}
+
+GNC::GCS::IToolController::~IToolController()
+{
+}
+
+GNC::GCS::IToolController* GNC::GCS::IToolController::New()
+{
+        return new GNC::ToolController();
+}
diff --git a/cadxcore/api/toolsystem/itoolcontroller.h b/cadxcore/api/toolsystem/itoolcontroller.h
new file mode 100644
index 0000000..279001e
--- /dev/null
+++ b/cadxcore/api/toolsystem/itoolcontroller.h
@@ -0,0 +1,93 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ITOOLBAR_H
+#define ITOOLBAR_H
+#include <string>
+#include <list>
+
+#include <api/api.h>
+#include <api/toolsystem/itool.h>
+#include <api/ievento.h>
+
+class wxXmlNode;
+class wxWindow;
+class wxEvtHandler;
+class wxMenu;
+class wxGinkgoToolBar;
+
+namespace GNC
+{
+namespace GCS
+{
+class IContract;
+class IWidgetTool;
+
+class IToolController
+{
+public:
+        typedef std::list<long> TIdList;
+
+        IToolController();
+        virtual ~IToolController();
+
+//region "Tool Bar interface"
+
+        virtual void AddTool(long idTool, GNC::GCS::IContract* pContract) = 0;
+        virtual void RemoveTool(long idTool) = 0;
+
+        virtual GNC::GCS::ITool* GetTool(long idTool) = 0;
+
+        virtual void Enable(long idTool, bool enabled) = 0;
+
+        virtual void InitializeToolController() = 0;
+        virtual void ReconnectToolController() = 0;
+        virtual void FinalizeToolController() = 0;
+
+        virtual void LoadStatus(const std::string& view, const std::string& modality = "ALL") = 0;
+        virtual void SaveStatus(const std::string& view, const std::string& modality = "ALL") = 0;
+
+        //register tool key events to parent window
+        virtual void ConnectKeyEvents(wxWindow* pParent) = 0;
+
+        virtual wxWindow* CreateNewToolBar(wxWindow* pParent, bool alignLeft = true) = 0;
+        virtual wxWindow* CreateNewToolBar(wxWindow* pParent, GNC::GCS::ITool::TToolFamily family, bool alignLeft = true) = 0;
+        virtual wxWindow* CreateNewToolBar(wxWindow* pParent, const TIdList& toolsToInclude, bool alignLeft = true) = 0;
+        virtual void AppendsToolInMenu(wxEvtHandler* pParent, wxMenu* pMenu, GNC::GCS::ITool::TToolFamily family) = 0;
+        virtual void AppendsToolsInToolBar(wxGinkgoToolBar* pToolBar, GNC::GCS::ITool::TToolFamily family) = 0;
+        virtual void AppendsToolsInToolBar(wxGinkgoToolBar* pToolBar, const GNC::GCS::IToolController::TIdList& toolsToInclude) = 0;
+
+        virtual void OnKeyAccelerator(GNC::GCS::Events::EventoTeclado& evento, wxWindow* pWindow) = 0;
+
+        virtual void ActivateTool(long idTool, const TriggerButton& buttonmask, wxWindow* pParent) = 0;
+        virtual void AppendDropDownMenu(long idTool, wxEvtHandler* pParent, wxMenu* pMenu) = 0;
+
+        virtual GNC::GCS::IWidgetTool* GetLeftTool() = 0;
+        virtual GNC::GCS::IWidgetTool* GetRightTool() = 0;
+        virtual GNC::GCS::IWidgetTool* GetMiddleTool() = 0;
+
+        static GNC::GCS::IToolController* New();
+//endregion
+
+};
+}
+}
+#endif
diff --git a/cadxcore/api/toolsystem/itoolsregistry.cpp b/cadxcore/api/toolsystem/itoolsregistry.cpp
new file mode 100644
index 0000000..035c4ce
--- /dev/null
+++ b/cadxcore/api/toolsystem/itoolsregistry.cpp
@@ -0,0 +1,58 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "itoolsregistry.h"
+#include <main/toolsystem/toolsregistry.h>
+
+GNC::GCS::ToolsRegistryException::ToolsRegistryException(const std::string& msg) throw() : GNC::GCS::IException(msg, "GNC", false)
+{
+}
+
+
+GNC::GCS::IToolsRegistry::IToolsRegistry()
+{
+}
+
+GNC::GCS::IToolsRegistry::~IToolsRegistry()
+{
+}
+
+
+void GNC::GCS::IToolsRegistry::UnRegisterAll()
+{
+}
+
+//------------------------------------------------------------------------------
+//region "Singleton pattern"
+
+/** Singleton getter **/
+GNC::GCS::IToolsRegistry* GNC::GCS::IToolsRegistry::Instance()
+{
+        return GNC::ToolsRegistry::Instance();
+
+}
+
+/** Singleton free **/
+void GNC::GCS::IToolsRegistry::FreeInstance()
+{
+        GNC::ToolsRegistry::FreeInstance();
+}
+
+//endregion
diff --git a/cadxcore/api/toolsystem/itoolsregistry.h b/cadxcore/api/toolsystem/itoolsregistry.h
new file mode 100644
index 0000000..15e79c5
--- /dev/null
+++ b/cadxcore/api/toolsystem/itoolsregistry.h
@@ -0,0 +1,105 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ITOOLSREGISTRY_H
+#define ITOOLSREGISTRY_H
+
+#include <string>
+#include <list>
+#include <map>
+
+#include <api/toolsystem/itool.h>
+#include <api/iexception.h>
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI ToolsRegistryException : public GNC::GCS::IException
+{
+public:
+        ToolsRegistryException(const std::string& msg) throw();
+};
+
+/** Tools Registry container interface **/
+class EXTAPI IToolsRegistry
+{
+
+//------------------------------------------------------------------------------
+//region "Singleton pattern"
+
+public:
+
+        /** Singleton getter **/
+        static GNC::GCS::IToolsRegistry* Instance();
+
+        /** Singleton free **/
+        static void FreeInstance();
+
+protected:
+
+        IToolsRegistry();
+        ~IToolsRegistry();
+
+//endregion
+
+//------------------------------------------------------------------------------
+//region "Tool Registry interface"
+
+public:
+        /** Registers a tool **/
+        virtual void RegisterTool(GNC::GCS::ITool* pTool) = 0;
+
+        /** UnRegisters a tool given its uid and frees its factory instance **/
+        virtual void UnRegisterTool(GNC::GCS::ITool::UID uid) = 0;
+
+        /** UnRegisters a tool given its uid and frees its factory instance **/
+        virtual void UnRegisterAll();
+
+        /** Constructs and returns a new abstract instance of a tool given its uid **/
+        virtual GNC::GCS::ITool* NewTool(GNC::GCS::ITool::UID uid) = 0;
+
+        /** appends general tools in menu */
+        virtual void AppendsToolInMenu(wxEvtHandler* pParent, wxMenu* pMenu, GNC::GCS::ITool::TToolFamily family) = 0;
+
+        /** Constructs and returns a new concrete instance of a tool given its uid **/
+        template <typename ToolType> ToolType* NewConcreteTool(GNC::GCS::ITool::UID uid)
+        {
+                ToolType* pConcreteTool = NULL;
+                GNC::GCS::ITool* pAbstractTool = NewTool(uid);
+                if (pAbstractTool != NULL) {
+                        pConcreteTool = dynamic_cast<ToolType*>(pAbstractTool);
+                }
+                return pConcreteTool;
+        }
+
+        typedef std::list<GNC::GCS::ITool*> TToolList;
+        typedef std::map<int, TToolList> TToolMap;
+        /** Returns tools of a concrete family **/
+        virtual TToolMap GetToolsFromFamily(GNC::GCS::ITool::TToolFamily family) = 0;
+
+//endregion
+
+};
+}
+}
+#endif
diff --git a/cadxcore/api/toolsystem/iwidgettool.cpp b/cadxcore/api/toolsystem/iwidgettool.cpp
new file mode 100644
index 0000000..3bc38ef
--- /dev/null
+++ b/cadxcore/api/toolsystem/iwidgettool.cpp
@@ -0,0 +1,55 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <iostream>
+
+#include "iwidgettool.h"
+#include "itoolcontroller.h"
+#include <api/controllers/icontroladorlog.h>
+
+#include <wx/panel.h>
+#include <wx/sizer.h>
+#include <wx/wxginkgotoolbar.h>
+
+GNC::GCS::IWidgetTool::IWidgetTool(const ITool::UID& uid, const ITool::TToolFamily& uidFamilia, const std::string& nombre, const wxBitmap& icon, const int subFamilia, const int& prioridad): GNC::GCS::ITool(uid, uidFamilia, nombre, icon, subFamilia, prioridad)
+{
+}
+
+GNC::GCS::IWidgetTool::~IWidgetTool()
+{
+}
+
+bool GNC::GCS::IWidgetTool::ExecuteAction()
+{
+        //none
+        LOG_ERROR("IWidgetTool","trying to execute a widget tool");
+        return false;
+}
+
+void GNC::GCS::IWidgetTool::AppendToolIn(wxGinkgoToolBar* pParent)
+{
+        if (AppendsInToolBar()) {
+                pParent->AddTool(this->ID, wxString::FromUTF8(Name.c_str()), Icon, wxString::FromUTF8(Name.c_str()), wxITEM_NORMAL);
+                pParent->ForceSetToolDropDown(this->ID, HasDropDownMenu());
+                pParent->EnableTool(this->ID, IsEnabled());
+        }
+}
+
+
diff --git a/cadxcore/api/toolsystem/iwidgettool.h b/cadxcore/api/toolsystem/iwidgettool.h
new file mode 100644
index 0000000..c2e2419
--- /dev/null
+++ b/cadxcore/api/toolsystem/iwidgettool.h
@@ -0,0 +1,62 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IWIDGETTOOL_H
+#define IWIDGETTOOL_H
+
+#include <api/toolsystem/itool.h>
+
+namespace GNC
+{
+
+namespace GCS
+{
+class EXTAPI IWidgetTool: public GNC::GCS::ITool
+{
+public:
+        virtual ~IWidgetTool();
+
+        //new tool
+        IWidgetTool(const ITool::UID& uid, const ITool::TToolFamily& familyUID, const std::string& name, const wxBitmap& icon, const int subFamily = 0xFFFFFFFF, const int& priority = 0);
+
+        virtual bool AppendsInMenu()
+        {
+                return false;
+        }
+        virtual bool ExecuteAction();
+
+        virtual void Connect() = 0;
+        virtual void Disconnect() = 0;
+
+        virtual void AppendToolIn(wxGinkgoToolBar* pParent);
+
+        TriggerButton& GetTriggerButton()
+        {
+                return m_TriggerButtonMask;
+        }
+
+        TriggerButton m_TriggerButtonMask;
+        //
+
+};
+}
+}
+#endif
diff --git a/cadxcore/api/ubication.cpp b/cadxcore/api/ubication.cpp
new file mode 100644
index 0000000..0f485bb
--- /dev/null
+++ b/cadxcore/api/ubication.cpp
@@ -0,0 +1,68 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "ubication.h"
+
+GIL::Ubicacion::Ubicacion() :
+        Monitorize(false),
+        CleanBefore(false),
+        CleanAfter(false)
+{
+}
+
+GIL::Ubicacion::Ubicacion(const std::string& titulo, const std::string& ruta, const std::string& descripcion, bool monitorize, bool cleanbefore, bool cleanafter)
+{
+        this->Titulo = titulo;
+        Update(ruta, descripcion, monitorize, cleanbefore, cleanafter);
+
+}
+
+GIL::Ubicacion::Ubicacion(const GIL::Ubicacion& otro)
+{
+        *this = otro;
+}
+
+GIL::Ubicacion::~Ubicacion()
+{
+
+}
+
+void GIL::Ubicacion::Update(const std::string& ruta, const std::string& desc, bool monitorize, bool cleanbefore, bool cleanafter)
+{
+        this->Ruta        = ruta;
+        this->Descripcion = desc;
+        this->Monitorize  = monitorize;
+        this->CleanBefore = cleanbefore;
+        this->CleanAfter  = cleanafter;
+}
+
+GIL::Ubicacion& GIL::Ubicacion::operator=(const GIL::Ubicacion& otro)
+{
+        this->Titulo      = otro.Titulo;
+        this->Ruta        = otro.Ruta;
+        this->Descripcion = otro.Descripcion;
+        this->Monitorize	= otro.Monitorize;
+        this->CleanBefore	= otro.CleanBefore;
+        this->CleanAfter	= otro.CleanAfter;
+
+        return *this;
+}
+
diff --git a/cadxcore/api/ubication.h b/cadxcore/api/ubication.h
new file mode 100644
index 0000000..9d71d1e
--- /dev/null
+++ b/cadxcore/api/ubication.h
@@ -0,0 +1,54 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef UBICATION_H
+#define UBICATION_H
+#include <string>
+
+#include <api/api.h>
+
+namespace GIL
+{
+class EXTAPI Ubicacion
+{
+public:
+
+        std::string       Titulo;
+        std::string       Ruta;
+        std::string       Descripcion;
+        bool              Monitorize;
+        bool              CleanBefore;
+        bool              CleanAfter;
+
+        Ubicacion();
+
+        Ubicacion(const std::string& titulo, const std::string& ruta, const std::string& descripcion, bool monitorize, bool cleanbefore, bool cleanafter);
+
+        Ubicacion(const Ubicacion& otro);
+
+        ~Ubicacion();
+
+        void Update(const std::string& ruta, const std::string& desc, bool monitorize, bool cleanbefore, bool cleanafter);
+
+        Ubicacion& operator=(const Ubicacion& otro);
+};
+}
+#endif
diff --git a/cadxcore/api/utils/iginkgomatrix4x4.cpp b/cadxcore/api/utils/iginkgomatrix4x4.cpp
new file mode 100644
index 0000000..93b376e
--- /dev/null
+++ b/cadxcore/api/utils/iginkgomatrix4x4.cpp
@@ -0,0 +1,39 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#if defined(__DEPRECATED)
+#undef __DEPRECATED
+#endif
+#include "iginkgomatrix4x4.h"
+#include <main/utils/ginkgomatrix4x4.h>
+
+GNC::GCS::IGinkgoMatrix4x4::IGinkgoMatrix4x4()
+{
+}
+
+GNC::GCS::IGinkgoMatrix4x4::~IGinkgoMatrix4x4()
+{
+}
+
+GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GNC::GCS::IGinkgoMatrix4x4::New()
+{
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> newPtr((GNC::GCS::IGinkgoMatrix4x4*) new GNC::GinkgoMatrix4x4());
+        return newPtr;
+}
diff --git a/cadxcore/api/utils/iginkgomatrix4x4.h b/cadxcore/api/utils/iginkgomatrix4x4.h
new file mode 100644
index 0000000..6974e75
--- /dev/null
+++ b/cadxcore/api/utils/iginkgomatrix4x4.h
@@ -0,0 +1,80 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IGINKGOMATRIX4X4
+#define IGINKGOMATRIX4X4
+#include <api/autoptr.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IGinkgoMatrix4x4
+{
+protected:
+        IGinkgoMatrix4x4();
+public:
+        virtual ~IGinkgoMatrix4x4();
+
+        static GNC::GCS::Ptr<IGinkgoMatrix4x4> New();
+
+        virtual void Print(std::ostream& os) = 0;
+        // Description:
+        // Non-static member function. Assigns *from* elements array
+        virtual void DeepCopy(const IGinkgoMatrix4x4* other) = 0;
+        // Description:
+        // Set all of the elements to zero.
+        virtual void Zero() = 0;
+        // Description:
+        // Set equal to Identity matrix
+        virtual void Identity() = 0;
+        // Description:
+        // Matrix Inversion (adapted from Richard Carling in "Graphics Gems,"
+        // Academic Press, 1990).
+        virtual GNC::GCS::Ptr<IGinkgoMatrix4x4> Invert() = 0;
+        // Description:
+        // Transpose the matrix .
+        virtual GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> Transpose() = 0;
+        // Description:
+        // Multiply a homogeneous coordinate by this matrix, i.e. out = A*in.
+        // The in[4] and out[4] can be the same array. Returns a pointer to out
+        virtual double* MultiplyPoint(const double in[4], double out[4]) = 0;
+        // Description:
+        // Multiplies other to the right result = this * other
+        virtual GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> Multiply4x4(const GNC::GCS::Ptr<IGinkgoMatrix4x4>& other) = 0;
+        // Description:
+        // Compute adjoint of the matrix and put it into out.
+        virtual GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4>  Adjoint() = 0;
+        // Description:
+        // Compute the determinant of the matrix and return it.
+        virtual double Determinant() = 0;
+        // Description:
+        // Sets the element i,j in the matrix.
+        virtual void SetElement(int i, int j, double value) = 0;
+        // Description:
+        // Returns the element i,j from the matrix.
+        virtual double GetElement(int i, int j) const = 0;
+
+        virtual void ToDoubleArrayByColumns(double matrix[16]) = 0;
+};
+}
+}
+#endif
diff --git a/cadxcore/api/westilo.h b/cadxcore/api/westilo.h
new file mode 100644
index 0000000..85781ac
--- /dev/null
+++ b/cadxcore/api/westilo.h
@@ -0,0 +1,401 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <widgets/openglhelper.h>
+#include <api/icontexto.h>
+#include <api/iwidgetsrenderer.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <cairo/cairo.h>
+
+typedef struct TWidgetColor {
+        float r, g, b, a;
+        TWidgetColor(float r, float g, float b, float a)
+        {
+                this->r = r;
+                this->g = g;
+                this->b = b;
+                this->a = a;
+        }
+
+        inline void Aplicar() const
+        {
+                glColor4f(this->r, this->g, this->b, this->a);
+        }
+        inline void AplicarCairo(struct _cairo* cr) const
+        {
+                cairo_set_source_rgba(cr, this->r, this->g, this->b, this->a);
+        }
+} TWidgetColor;
+
+#define ConsumirEvento() evento.Skip(false)
+#define EventoConsumido() !evento.GetSkipped()
+
+#define WIDGETS_TEXT_FONT_FAMILY "Arial"
+
+#define ANNOTATOR_TEXT_COLOR        0.0f, 0.90f, 0.90f, 1.0f
+#define DEFAULT_TEXT_COLOR          0.0f, 0.75f, 0.75f, 1.0f
+#define DEFAULT_TEXT_COLOR_INVERTED 0.0f, 0.0f, 0.0f, 1.0f
+
+static TWidgetColor wColorNormal(0.0f, 1.0f, 0.0f, 1.0f); // glColor4f(0.0f, 1.0f, 0.0f, 0.75f);
+static TWidgetColor wColorNormalSuave(0.0f, 0.5f, 0.0f, 0.5f); // glColor4f(0.0f, 1.0f, 0.0f, 0.75f);
+static TWidgetColor wColorIluminado(1.0f, 1.0f, 0.0f, 1.0f); // glColor4f(1.0f, 1.0f, 0.0f, 1.0f);
+static TWidgetColor wColorMoviendose(1.0f, 0.0f, 0.0f, 1.0f);
+static TWidgetColor wColorSeleccionado(1.0f, 0.0f, 0.0f, 1.0f);
+static TWidgetColor wColorSeleccionadoIluminado(1.0f, 0.5f, 0.0f, 1.0f);
+
+static TWidgetColor wColorSombra(0.0f, 0.0f, 0.0f, 0.2f);
+static TWidgetColor wColorLineaArrastre(1.0f, 0.0f, 0.0f, 1.0f);
+
+#define WIDGET_SIZE_PUNTO 8.0f
+
+static GNC::GCS::Vector wRadioPuntoIluminado(15.0f, 15.0f);
+
+static TWidgetColor wColorPuntoIluminadoInterior(1.0f, 1.0f, 0.0f, 0.3f);
+static TWidgetColor wColorPuntoIluminadoExterior(1.0f, 1.0f, 0.0f, 0.0f);
+
+static TWidgetColor wColorAngulo(1.0f, 0.0f, 0.0f, 0.8f);
+static TWidgetColor wColorAnguloInterior(1.0f, 0.0f, 0.0f, 0.25f);
+
+#define WIDGET_OFFSET_X_SOMBRA					1.0f
+#define WIDGET_OFFSET_Y_SOMBRA					1.0f
+
+#define WIDGET_OFFSET_X_SOMBRA_SELECCIONADO		2.0f
+#define WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO		2.0f
+
+#define WIDGET_INCREMENTO_DETALLE_SELECCIONADO	1.15f
+
+#define ANNOTATION_FP_PRECISION 2
+#define ANNOTATION_TEXT_WITH_SHADOW true
+
+// -- Comportamiento --------------------------------------------------------------------------------
+
+inline void wAplicarColor(bool iluminado, bool moviendose, bool seleccionado)
+{
+        if (moviendose && seleccionado) {
+                wColorSeleccionadoIluminado.Aplicar();
+                return;
+        } else if (!iluminado && seleccionado) {
+                wColorSeleccionado.Aplicar();
+                return;
+        } else if (iluminado && seleccionado) {
+                wColorSeleccionadoIluminado.Aplicar();
+                return;
+        } else if (iluminado && !seleccionado) {
+                wColorIluminado.Aplicar();
+                return;
+        } else {
+                wColorNormal.Aplicar();
+                return;
+        }
+}
+
+inline void wAplicarColorSuave(bool iluminado, bool moviendose, bool seleccionado)
+{
+        if (moviendose && seleccionado) {
+                wColorSeleccionadoIluminado.Aplicar();
+                return;
+        } else if (!iluminado && seleccionado) {
+                wColorSeleccionado.Aplicar();
+                return;
+        } else if (iluminado && seleccionado) {
+                wColorSeleccionadoIluminado.Aplicar();
+                return;
+        } else if (iluminado && !seleccionado) {
+                wColorIluminado.Aplicar();
+                return;
+        } else {
+                wColorNormalSuave.Aplicar();
+                return;
+        }
+}
+
+
+inline void wDibujarElipseDegradado(const GNC::GCS::Vector &centro, const GNC::GCS::Vector &radio, const TWidgetColor &interior, const TWidgetColor &exterior, float resolucion=60.0f)
+{
+        glBegin(GL_TRIANGLE_FAN);
+        float step = M_2PI / resolucion;
+
+        interior.Aplicar();
+        glVertex3f(centro.x, centro.y, 0.0f);
+
+        exterior.Aplicar();
+        for (float angulo = 0; angulo < M_2PI; angulo += step) {
+                glVertex3f(centro.x + (radio.x * std::cos (angulo)) , centro.y + (radio.y * std::sin (angulo)), 0.0f);
+        }
+        glEnd();
+}
+
+
+inline void dibujarDecoracionTextura(const GNC::GCS::Vector* const quad, const GNC::GCS::Vector& escala)
+{
+        /*
+         * Posicion del Quad
+         *  q3   q2
+         *  q0   q1
+         * */
+
+        // Dibujo el fondo
+        glColor4f(0.0f, 0.0f, 0.0f, 0.61f);
+        glBegin(GL_QUADS);
+        glVertex2d(quad[0].x, quad[0].y);
+        glVertex2d(quad[1].x, quad[1].y);
+        glVertex2d(quad[2].x, quad[2].y);
+        glVertex2d(quad[3].x, quad[3].y);
+        glEnd();
+
+        // Dibujado el borde
+        glColor4f(0.2f, 0.2f, 0.2f, 1.0f);
+        glBegin(GL_LINE_LOOP);
+        glVertex2d(quad[0].x, quad[0].y);
+        glVertex2d(quad[1].x, quad[1].y);
+        glVertex2d(quad[2].x, quad[2].y);
+        glVertex2d(quad[3].x, quad[3].y);
+        glEnd();
+
+        // Dibujado de la sombra, lo hago en 2 tramos para evitar overlapping
+        glColor4f(0.0f, 0.0f, 0.0f, 0.3f);
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(quad[1].x + 2 * escala.x, quad[1].y - 2 * escala.y);
+        glVertex2d(quad[2].x + 2 * escala.x, quad[2].y - 2 * escala.y);
+        glEnd();
+
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(quad[2].x + 1 * escala.x, quad[2].y - 2 * escala.y);
+        glVertex2d(quad[3].x + 2 * escala.x, quad[3].y - 2 * escala.y);
+        glEnd();
+
+}
+
+inline void wDibujarTexturaTextoDecorada(GNC::GCS::TexturaCairo& tc, const GNC::GCS::Vector* const quad, const GNC::GCS::Vector& escala, bool flipHorizontal, bool flipVertical, double anguloCamara)
+{
+
+        dibujarDecoracionTextura(quad, escala);
+        tc.Render(quad, flipHorizontal, flipVertical, anguloCamara);
+}
+
+inline void wDibujarTexturaTextoDecorada2D(GNC::GCS::Contexto3D* c, GNC::GCS::TexturaCairo& tc, const GNC::GCS::Vector& rasterPos)
+{
+        /*
+         * Posicion del Quad
+         *  q3   q2
+         *  q0   q1
+         * */
+
+        GNC::GCS::Vector escala(1.0, 1.0);
+
+        glMatrixMode(GL_PROJECTION);
+        glPushMatrix();
+        glLoadIdentity();
+
+        glOrtho(0, c->ancho, 0, c->alto, -1, 1);
+        glMatrixMode(GL_MODELVIEW);
+        glPushMatrix();
+        glLoadIdentity();
+
+        GNC::GCS::Vector quad[4];
+
+        quad[0].x = rasterPos.x;
+        quad[0].y = rasterPos.y;
+
+        quad[2].x = quad[0].x + (double)tc.ancho;
+        quad[2].y = quad[0].y - (double)tc.alto;
+
+        quad[1].x = quad[2].x;
+        quad[1].y = quad[0].y;
+
+        quad[3].x = quad[0].x;
+        quad[3].y = quad[2].y;
+
+        dibujarDecoracionTextura(quad, escala);
+
+        quad[2].x = quad[0].x + (double)tc.anchoPOT;
+        quad[2].y = quad[0].y - (double)tc.altoPOT;
+
+        quad[1].x = quad[2].x;
+        quad[1].y = quad[0].y;
+
+        quad[3].x = quad[0].x;
+        quad[3].y = quad[2].y;
+
+        tc.Render2D(quad);
+
+        glPopMatrix();
+        glMatrixMode(GL_PROJECTION);
+        glPopMatrix();
+        glMatrixMode(GL_MODELVIEW);
+}
+
+inline void wDibujarTexturaTexto2D(GNC::GCS::Contexto3D* c, GNC::GCS::TexturaCairo& tc, const GNC::GCS::Vector& rasterPos)
+{
+        /*
+         * Posicion del Quad
+         *  q3   q2
+         *  q0   q1
+         * */
+
+        glMatrixMode(GL_PROJECTION);
+        glPushMatrix();
+        glLoadIdentity();
+
+        glOrtho(0, c->ancho, 0, c->alto, -1, 1);
+        glMatrixMode(GL_MODELVIEW);
+        glPushMatrix();
+        glLoadIdentity();
+
+        GNC::GCS::Vector quad[4];
+
+        quad[0].x = rasterPos.x;
+        quad[0].y = rasterPos.y;
+
+        quad[2].x = quad[0].x + (double)tc.anchoPOT;
+        quad[2].y = quad[0].y - (double)tc.altoPOT;
+
+        quad[1].x = quad[2].x;
+        quad[1].y = quad[0].y;
+
+        quad[3].x = quad[0].x;
+        quad[3].y = quad[2].y;
+
+        tc.Render2D(quad);
+
+        glPopMatrix();
+        glMatrixMode(GL_PROJECTION);
+        glPopMatrix();
+        glMatrixMode(GL_MODELVIEW);
+}
+
+inline void wDibujarBordeTexto2D(GNC::GCS::Contexto3D* c, GNC::GCS::TexturaCairo& tc, const GNC::GCS::Vector& rasterPos)
+{
+        /*
+         * Posicion del Quad
+         *  q3   q2
+         *  q0   q1
+         * */
+
+        glMatrixMode(GL_PROJECTION);
+        glPushMatrix();
+        glLoadIdentity();
+
+        glOrtho(0, c->ancho, 0, c->alto, -1, 1);
+        glMatrixMode(GL_MODELVIEW);
+        glPushMatrix();
+        glLoadIdentity();
+
+        GNC::GCS::Vector quad[4];
+
+        quad[0].x = rasterPos.x;
+        quad[0].y = rasterPos.y;
+
+        quad[2].x = quad[0].x + (double)tc.ancho;
+        quad[2].y = quad[0].y - (double)tc.alto;
+
+        quad[1].x = quad[2].x;
+        quad[1].y = quad[0].y;
+
+        quad[3].x = quad[0].x;
+        quad[3].y = quad[2].y;
+
+        glBegin(GL_LINE_LOOP);
+        glVertex2d(quad[0].x, quad[0].y);
+        glVertex2d(quad[1].x, quad[1].y);
+        glVertex2d(quad[2].x, quad[2].y);
+        glVertex2d(quad[3].x, quad[3].y);
+        glEnd();
+
+        glPopMatrix();
+        glMatrixMode(GL_PROJECTION);
+        glPopMatrix();
+        glMatrixMode(GL_MODELVIEW);
+}
+
+inline void wDibujarFondoTexto2D(GNC::GCS::Contexto3D* c, GNC::GCS::TexturaCairo& tc, const GNC::GCS::Vector& rasterPos)
+{
+        /*
+         * Posicion del Quad
+         *  q3   q2
+         *  q0   q1
+         * */
+
+        glMatrixMode(GL_PROJECTION);
+        glPushMatrix();
+        glLoadIdentity();
+
+        glOrtho(0, c->ancho, 0, c->alto, -1, 1);
+        glMatrixMode(GL_MODELVIEW);
+        glPushMatrix();
+        glLoadIdentity();
+
+        GNC::GCS::Vector quad[4];
+
+        quad[0].x = rasterPos.x;
+        quad[0].y = rasterPos.y;
+
+        quad[2].x = quad[0].x + (double)tc.ancho;
+        quad[2].y = quad[0].y - (double)tc.alto;
+
+        quad[1].x = quad[2].x;
+        quad[1].y = quad[0].y;
+
+        quad[3].x = quad[0].x;
+        quad[3].y = quad[2].y;
+
+        glBegin(GL_QUADS);
+        for (int i = 0; i < 4; ++i) {
+                glVertex2dv(quad[i].v);
+        }
+        glEnd();
+
+        glPopMatrix();
+        glMatrixMode(GL_PROJECTION);
+        glPopMatrix();
+        glMatrixMode(GL_MODELVIEW);
+}
+
+inline void AjustarAPixelsPantalla(GNC::GCS::Contexto3D* c, GNC::GCS::Vector* v, int numVectores)
+{
+        if (numVectores < 1) {
+                return;
+        }
+        GNC::GCS::Vector offsetCorreccion;
+        double worldPos[4] = {0.0f, 0.0f, 0.0f, 0.0f};
+        double imagePos[4] = {v[0].x, v[0].y, 0.0f, 0.0f};
+
+        c->GetRenderer()->m_pImageViewer->CoordenadasImagenACoordenadasMundo(imagePos, worldPos);
+
+        double displayPos[3] = {0.0f, 0.0f, 0.0f};
+
+        c->pRenderer->WorldToDisplay(worldPos, displayPos);
+        offsetCorreccion.Asignar(displayPos[0], displayPos[1]);
+        offsetCorreccion.Redondear();
+        displayPos[0] = offsetCorreccion.x;
+        displayPos[1] = offsetCorreccion.y;
+
+        c->pRenderer->DisplayToWorld(displayPos, worldPos);
+        c->GetRenderer()->m_pImageViewer->Proyect2D(worldPos, imagePos);
+
+        offsetCorreccion.Asignar(imagePos[0], imagePos[1]);
+
+        offsetCorreccion -= v[0];
+        for (int i = 0; i < numVectores; i++) {
+                v[i] += offsetCorreccion;
+        }
+}
diff --git a/cadxcore/api/widgetserializable.cpp b/cadxcore/api/widgetserializable.cpp
new file mode 100644
index 0000000..2a67fc4
--- /dev/null
+++ b/cadxcore/api/widgetserializable.cpp
@@ -0,0 +1,145 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "widgetserializable.h"
+
+#include <api/internationalization/internationalization.h>
+
+#include <sstream>
+#include <wx/string.h>
+#include <wx/xml/xml.h>
+
+
+inline const std::string GetFormattedTimet(time_t fecha)
+{
+        struct tm tminfo;
+        char fechaString[100];
+
+#ifdef _WIN32
+        localtime_s(&tminfo,&fecha);
+#else
+        localtime_r(&fecha,&tminfo);
+#endif
+
+        strftime(fechaString,100,"%d/%m/%Y, %H:%M:%S",&tminfo);
+        return fechaString;
+}
+
+
+
+GNC::GCS::Widgets::IWidgetSerializable::IWidgetSerializable()
+{
+        time ( &m_timestampCreacion );
+        ActualizarTimestampModificacion();
+}
+
+GNC::GCS::Widgets::IWidgetSerializable::IWidgetSerializable(wxXmlNode* nodo)
+{
+        LeerMetadatos(nodo);
+}
+
+GNC::GCS::Widgets::IWidgetSerializable::~IWidgetSerializable()
+{
+}
+
+std::map<std::string,std::string> GNC::GCS::Widgets::IWidgetSerializable::GetPropiedades()
+{
+        std::map<std::string,std::string> propiedades;
+        {
+                std::ostringstream ostr;
+                ostr << GetFormattedTimet(m_timestampCreacion);
+                propiedades[_Std("Creation Date")] = ostr.str();
+        }
+        {
+                std::ostringstream ostr;
+                ostr << GetFormattedTimet(m_timestampModificacion);
+                propiedades[_Std("Modification Date")] = ostr.str();
+        }
+        {
+                propiedades[_Std("Physician")] = m_nombreMedico;
+        }
+        return propiedades;
+}
+
+void GNC::GCS::Widgets::IWidgetSerializable::SerializarMetadatos(wxXmlNode* nodo, const std::string& nombreMedico)
+{
+        {
+                std::ostringstream ostr;
+                ostr << m_timestampCreacion;
+                nodo->AddAttribute(wxT("creacion"),wxString::FromUTF8(ostr.str().c_str()));
+        }
+        {
+                std::ostringstream ostr;
+                ostr << m_timestampModificacion;
+                nodo->AddAttribute(wxT("modificacion"),wxString::FromUTF8(ostr.str().c_str()));
+        }
+        if(m_modificado) {
+                nodo->AddAttribute(wxT("medico"),wxString::FromUTF8(nombreMedico.c_str()));
+                m_nombreMedico = nombreMedico;
+        } else {
+                nodo->AddAttribute(wxT("medico"),wxString::FromUTF8(m_nombreMedico.c_str()));
+        }
+        m_modificado = false;
+}
+
+void GNC::GCS::Widgets::IWidgetSerializable::LeerMetadatos(wxXmlNode* nodo)
+{
+        wxString valor;
+
+        if(nodo->GetAttribute(wxT("creacion"),&valor)) {
+#if defined(__WXOSX__) || defined(__WXGTK__)
+                if(!valor.ToLong(&m_timestampCreacion)) {
+#else
+                if(!valor.ToLongLong(&m_timestampCreacion)) {
+#endif
+                        m_timestampCreacion = 0;
+                }
+        } else {
+                m_timestampCreacion = 0;
+        }
+
+        if(nodo->GetAttribute(wxT("modificacion"),&valor)) {
+#if defined(__WXOSX__) || defined(__WXGTK__)
+                if(!valor.ToLong(&m_timestampModificacion)) {
+#else
+                if(!valor.ToLongLong(&m_timestampModificacion)) {
+#endif
+                        time ( &m_timestampModificacion );
+                        m_timestampModificacion = 0;
+                }
+        } else {
+                time ( &m_timestampModificacion );
+        }
+
+        wxString wxStr;
+        if(nodo->GetAttribute(wxT("medico"),&wxStr)) {
+                //si se carga del xml no esta modificado
+                m_nombreMedico = wxStr.ToUTF8();
+                m_modificado = false;
+        } else {
+                m_nombreMedico = "";
+        }
+}
+
+void GNC::GCS::Widgets::IWidgetSerializable::ActualizarTimestampModificacion()
+{
+        time ( &m_timestampModificacion );
+        m_modificado = true;
+}
diff --git a/cadxcore/api/widgetserializable.h b/cadxcore/api/widgetserializable.h
new file mode 100644
index 0000000..3133df8
--- /dev/null
+++ b/cadxcore/api/widgetserializable.h
@@ -0,0 +1,65 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <ctime>
+#include <map>
+#include <string>
+
+// Forward Declarations
+class wxXmlNode;
+// Forward Declarations
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+class EXTAPI IWidgetSerializable
+{
+public:
+        IWidgetSerializable();
+        IWidgetSerializable(wxXmlNode* nodo);
+
+        virtual ~IWidgetSerializable();
+
+        virtual wxXmlNode* Serializar(const std::string& nombreMedico) = 0;
+
+        std::map<std::string,std::string> GetPropiedades();
+
+protected:
+        void SerializarMetadatos(wxXmlNode* nodo, const std::string& nombreMedico);
+
+        void LeerMetadatos(wxXmlNode* nodo);
+
+        void ActualizarTimestampModificacion();
+
+protected:
+        time_t m_timestampCreacion;
+        time_t m_timestampModificacion;
+        std::string m_nombreMedico;
+        bool m_modificado;
+};
+}
+}
+}
diff --git a/cadxcore/cadxcore-Info.plist b/cadxcore/cadxcore-Info.plist
new file mode 100644
index 0000000..53cb87a
--- /dev/null
+++ b/cadxcore/cadxcore-Info.plist
@@ -0,0 +1,26 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>English</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string>cadxcore.icns</string>
+	<key>CFBundleIdentifier</key>
+	<string>com.metaemotion.${PRODUCT_NAME:identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>2.3.0.0</string>
+	<key>LSMultipleInstancesProhibited</key>
+	<true/>
+	<key>NSHumanReadableCopyright</key>
+	<string>MetaEmotion S.L.</string>
+</dict>
+</plist>
diff --git a/cadxcore/cadxcore.vcxproj b/cadxcore/cadxcore.vcxproj
new file mode 100644
index 0000000..94349cd
--- /dev/null
+++ b/cadxcore/cadxcore.vcxproj
@@ -0,0 +1,1526 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="DebugDynamicPro|Win32">
+      <Configuration>DebugDynamicPro</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="DebugDynamicPro|x64">
+      <Configuration>DebugDynamicPro</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="DebugMonoliticOS|Win32">
+      <Configuration>DebugMonoliticOS</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="DebugMonoliticOS|x64">
+      <Configuration>DebugMonoliticOS</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="DebugMonoliticPro|Win32">
+      <Configuration>DebugMonoliticPro</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="DebugMonoliticPro|x64">
+      <Configuration>DebugMonoliticPro</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseDynamicPro|Win32">
+      <Configuration>ReleaseDynamicPro</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseDynamicPro|x64">
+      <Configuration>ReleaseDynamicPro</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseMonoliticOpenSource|Win32">
+      <Configuration>ReleaseMonoliticOpenSource</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseMonoliticOpenSource|x64">
+      <Configuration>ReleaseMonoliticOpenSource</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseMonoliticPro|Win32">
+      <Configuration>ReleaseMonoliticPro</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseMonoliticPro|x64">
+      <Configuration>ReleaseMonoliticPro</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{51617602-E33C-4A52-941E-3E3302DE4447}</ProjectGuid>
+    <RootNamespace>cadxCore</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v90</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v90</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v90</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v90</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <UseOfMfc>false</UseOfMfc>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\</IntDir>
+    <IncludePath>C:\Program Files (x86)\Visual Leak Detector\include;$(IncludePath)</IncludePath>
+    <LibraryPath>C:\Program Files (x86)\Visual Leak Detector\lib\Win32;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\</IntDir>
+    <IncludePath>C:\Program Files (x86)\Visual Leak Detector\include;$(IncludePath)</IncludePath>
+    <LibraryPath>C:\Program Files (x86)\Visual Leak Detector\lib\Win32;$(LibraryPath)</LibraryPath>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;.\;..\..\lib\Windows-x64\WX-2.8.11\mswu;..\..\lib\Windows-x64\WX-2.8.11\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib\Windows-x64\ITK-3.20.0\incl [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;GINKGO_PRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;.\;..\..\lib\Windows-x86\WX-2.8.11\mswu;..\..\lib\Windows-x86\WX-2.8.11\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK-3.20.0\incl [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;GINKGO_PRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore\jsoncpp;.\;..\..\lib\Windows-x64\WX-2.8.11\mswu;..\..\lib\Windows-x64\WX-2.8.11\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib\Windows [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;_CFE_;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;WXMAKING_MY_DLL;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;MONOLITIC;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore\jsoncpp;.\;..\..\lib\Windows-x86\WX-3.0.1\mswu;..\..\lib\Windows-x86\WX-3.0.1\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK-3.20.0\include\Numerics;..\..\lib\ [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;_CFE_;CAIRO_WIN32_STATIC_BUILD;WXMAKING_MY_DLL;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;MONOLITIC;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;.\;..\..\lib\Windows-x64\WX-2.8.11\mswu;..\..\lib\Windows-x64\WX-2.8.11\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib\Windows-x64\ITK-3.20.0\incl [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;_CFE_;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;WXMAKING_MY_DLL;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;GINKGO_PRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>false</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>wxbase28u_net.lib;wxmsw28u_aui.lib;wxmsw28u_media.lib;wxmsw28u_qa.lib;wxmsw28u_richtext.lib;wxmsw28u_xrc.lib;wxmsw28u_adv.lib;wxmsw28u_html.lib;wxbase28u_xml.lib;wxmsw28u_core.lib;wxbase28u.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;vtkCommon.lib;vtkRendering.lib;vtkDICOMParser.lib;vtkexoIIc.lib;vtkexpat.lib;vtkFiltering.lib;vtkfreetype.lib;vtkftgl.lib;vtkGenericFiltering.lib;vtkGraphics.lib;vtkHybrid.lib;vtkImaging.lib;vtkInfovi [...]
+      <AdditionalLibraryDirectories>..\..\lib\Windows-x64\WX-2.8.11\lib;..\..\lib\Windows-x64\VTK-5.10.0\lib\Release;..\..\lib\Windows-x64\ITK-3.20.0\lib\release;..\..\lib\Windows-x64\DCMTK-3.6.0\lib\release;..\..\lib\Windows-x64\openssl-1.0.0d\lib\release;..\..\lib\Windows-x64\cairowin32\cairowin32\release;Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;.\;..\..\lib\Windows-x86\WX-2.8.11\mswu;..\..\lib\Windows-x86\WX-2.8.11\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK-3.20.0\incl [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;_CFE_;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;WXMAKING_MY_DLL;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;GINKGO_PRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>false</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <Link>
+      <AdditionalDependencies>wxbase28u_net.lib;wxmsw28u_aui.lib;wxmsw28u_media.lib;wxmsw28u_qa.lib;wxmsw28u_richtext.lib;wxmsw28u_xrc.lib;wxmsw28u_adv.lib;wxmsw28u_html.lib;wxbase28u_xml.lib;wxmsw28u_core.lib;wxbase28u.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;vtkCommon.lib;vtkRendering.lib;vtkDICOMParser.lib;vtkexoIIc.lib;vtkexpat.lib;vtkFiltering.lib;vtkfreetype.lib;vtkftgl.lib;vtkGenericFiltering.lib;vtkGraphics.lib;vtkHybrid.lib;vtkImaging.lib;vtkInfovi [...]
+      <AdditionalLibraryDirectories>..\..\lib\Windows-x86\WX-2.8.11\lib;..\..\lib\Windows-x86\VTK-5.10.0\lib\Release;..\..\lib\Windows-x86\ITK-3.20.0\lib\release;..\..\lib\Windows-x86\DCMTK-3.6.0\lib\release;..\..\lib\Windows-x86\openssl-1.0.0d\lib\release;..\..\lib\Windows-x86\cairowin32\cairowin32\release;Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore\jsoncpp;.\;..\..\lib\Windows-x64\WX-3.0.1\mswu;..\..\lib\Windows-x64\WX-3.0.1\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib\Windows-x [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;_CFE_;CAIRO_WIN32_STATIC_BUILD;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;GINKGO_PRO;MONOLITIC;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>false</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore\jsoncpp;.\;..\..\lib\Windows-x86\WX-3.0.1\mswu;..\..\lib\Windows-x86\WX-3.0.1\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK-3.20.0\include\Numerics;..\..\lib\ [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;_CFE_;CAIRO_WIN32_STATIC_BUILD;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;GINKGO_PRO;MONOLITIC;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>false</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore\jsoncpp;.\;..\..\lib\Windows-x64\WX-3.0.1\mswud;..\..\lib\Windows-x64\WX-3.0.1\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib\Windows- [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;GINKGO_PRO;MONOLITIC;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <MultiProcessorCompilation>false</MultiProcessorCompilation>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <MinimalRebuild>true</MinimalRebuild>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore\jsoncpp;.\;..\..\lib\Windows-x64\WX-3.0.1\mswud;..\..\lib\Windows-x64\WX-3.0.1\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib\Windows- [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;GINKGO_PRO;MONOLITIC;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <MultiProcessorCompilation>false</MultiProcessorCompilation>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <MinimalRebuild>true</MinimalRebuild>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore\jsoncpp;.\;..\..\lib\Windows-x86\WX-3.0.1\mswud;..\..\lib\Windows-x86\WX-3.0.1\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows- [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;GINKGO_PRO;MONOLITIC;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore\jsoncpp;.\;..\..\lib\Windows-x86\WX-3.0.1\mswud;..\..\lib\Windows-x86\WX-3.0.1\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows- [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;APIEXPORT;USING_EXTENSIONS;USE_PATCHED_LIBS;MONOLITIC;CURL_STATICLIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>stdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClInclude Include="api\cloud.h" />
+    <ClInclude Include="api\controllers\anonusagestatsids.h" />
+    <ClInclude Include="api\controllers\icommandcontroller.h" />
+    <ClInclude Include="api\dicom\icustomassociation.h" />
+    <ClInclude Include="api\iannotator.h" />
+    <ClInclude Include="commands\acquirefromurlcommand.h" />
+    <ClInclude Include="commands\autocleaningcommand.h" />
+    <ClInclude Include="commands\cloudcommand.h" />
+    <ClInclude Include="commands\linkhistorycommand.h" />
+    <ClInclude Include="commands\pacsdownloadcommand.h" />
+    <ClInclude Include="commands\pdfextractercommand.h" />
+    <ClInclude Include="commands\secondarycapturedicomizecommand.h" />
+    <ClInclude Include="commands\synchronizationcommand.h" />
+    <ClInclude Include="eventos\scgenerated.h" />
+    <ClInclude Include="export\contracts\ipixelsbluringcontract.h" />
+    <ClInclude Include="export\contracts\ipixelsbluringcontractable.h" />
+    <ClInclude Include="export\tools\iaddfiletohistorytool.h" />
+    <ClInclude Include="export\tools\ibrightnesscontrasttool.h" />
+    <ClInclude Include="export\tools\icamerarotationtool.h" />
+    <ClInclude Include="export\tools\icopyimagetoclipboardtool.h" />
+    <ClInclude Include="export\tools\ipacsuploadtool.h" />
+    <ClInclude Include="export\tools\iqueryretrievetool.h" />
+    <ClInclude Include="export\tools\isecondarycapturetool.h" />
+    <ClInclude Include="export\tools\isimpleprinttool.h" />
+    <ClInclude Include="export\tools\istartdicomizationtool.h" />
+    <ClInclude Include="jsoncpp\json\autolink.h" />
+    <ClInclude Include="jsoncpp\json\config.h" />
+    <ClInclude Include="jsoncpp\json\features.h" />
+    <ClInclude Include="jsoncpp\json\forwards.h" />
+    <ClInclude Include="jsoncpp\json\json.h" />
+    <ClInclude Include="jsoncpp\json\reader.h" />
+    <ClInclude Include="jsoncpp\json\value.h" />
+    <ClInclude Include="jsoncpp\json\writer.h" />
+    <ClInclude Include="jsoncpp\json_batchallocator.h" />
+    <ClInclude Include="main\controllers\anonusagestats.h" />
+    <ClInclude Include="main\controllers\modalitysettingscontroller.h" />
+    <ClInclude Include="main\controllers\autocleaningcontroller.h" />
+    <ClInclude Include="main\controllers\commandcontroller.h" />
+    <ClInclude Include="main\controllers\smartretrievecontroller.h" />
+    <ClInclude Include="main\controllers\storedqueriescontroller.h" />
+    <ClInclude Include="main\controllers\windowattributescontroller.h" />
+    <ClInclude Include="main\gui\acquisition\acquisitiontablemodel.h" />
+    <ClInclude Include="main\gui\acquisition\downloadagaindialog.h" />
+    <ClInclude Include="main\gui\anonymize\anonymizepanel.h" />
+    <ClInclude Include="main\gui\configuration\defaultmodalitysettingsconfigurationpanel.h" />
+    <ClInclude Include="main\gui\configuration\hangingprotocolconfigurationpanel.h" />
+    <ClInclude Include="main\gui\configuration\localdatabaseconfigurationpanel.h" />
+    <ClInclude Include="main\gui\configuration\smartretrieveconfigurationpanel.h" />
+    <ClInclude Include="main\gui\ginkgocloud\downloadcloudbase.h" />
+    <ClInclude Include="main\gui\ginkgocloud\filelinkdialog.h" />
+    <ClInclude Include="main\gui\ginkgocloud\ginkgocloudsearchdialog.h" />
+    <ClInclude Include="main\gui\ginkgocloud\openginkgoclouddialog.h" />
+    <ClInclude Include="main\gui\history3\historytablemodel.h" />
+    <ClInclude Include="main\gui\history3\synchronizedialog.h" />
+    <ClInclude Include="main\gui\open\dicomdirtablemodel.h" />
+    <ClInclude Include="main\gui\pacsupload\pacsuploaddialog.h" />
+    <ClInclude Include="main\gui\pacsupload\pacsuploaddialogbase.h" />
+    <ClInclude Include="main\gui\toolsystem\ginkgotoolsystembar.h" />
+    <ClInclude Include="main\tools\addfiletohistorytool.h" />
+    <ClInclude Include="main\tools\brightnesscontrasttool.h" />
+    <ClInclude Include="main\tools\camerarotationtool.h" />
+    <ClInclude Include="main\tools\copyimagetoclipboardtool.h" />
+    <ClInclude Include="main\tools\openginkgocloudlinktool.h" />
+    <ClInclude Include="main\tools\pacsuploadtool.h" />
+    <ClInclude Include="main\tools\queryretrievetool.h" />
+    <ClInclude Include="main\tools\searchginkgocloudhistorytool.h" />
+    <ClInclude Include="main\tools\secondarycapturetool.h" />
+    <ClInclude Include="main\tools\simpleprinttool.h" />
+    <ClInclude Include="main\tools\startdicomizationtool.h" />
+    <ClInclude Include="singleinstance.h" />
+    <ClInclude Include="stdafx.h" />
+    <ClInclude Include="main\entorno.h" />
+    <ClInclude Include="main\license.h" />
+    <ClInclude Include="main\tools\angletool.h" />
+    <ClInclude Include="main\tools\anonymizetool.h" />
+    <ClInclude Include="main\tools\colormaptool.h" />
+    <ClInclude Include="main\tools\cornerannotationstool.h" />
+    <ClInclude Include="main\tools\detachwindowtool.h" />
+    <ClInclude Include="main\tools\dicomizetool.h" />
+    <ClInclude Include="main\tools\enabled_tools.h" />
+    <ClInclude Include="main\tools\exportdicomdirtool.h" />
+    <ClInclude Include="main\tools\historytools.h" />
+    <ClInclude Include="main\tools\imageexporttool.h" />
+    <ClInclude Include="main\tools\markertool.h" />
+    <ClInclude Include="main\tools\metricgridtool.h" />
+    <ClInclude Include="main\tools\notetool.h" />
+    <ClInclude Include="main\tools\openfiletool.h" />
+    <ClInclude Include="main\tools\openfoldertool.h" />
+    <ClInclude Include="main\tools\openremovabletool.h" />
+    <ClInclude Include="main\tools\pixelsbluringtool.h" />
+    <ClInclude Include="main\tools\pointertool.h" />
+    <ClInclude Include="main\tools\queryretrievehistorytool.h" />
+    <ClInclude Include="main\tools\resettool.h" />
+    <ClInclude Include="main\tools\rotateandfliptool.h" />
+    <ClInclude Include="main\tools\ruletool.h" />
+    <ClInclude Include="main\tools\sendpacstool.h" />
+    <ClInclude Include="main\tools\showhistorytool.h" />
+    <ClInclude Include="main\tools\showtagshistorytool.h" />
+    <ClInclude Include="main\tools\showtagstool.h" />
+    <ClInclude Include="main\tools\toolpan.h" />
+    <ClInclude Include="main\tools\toolslider.h" />
+    <ClInclude Include="main\tools\toolwindowlevel.h" />
+    <ClInclude Include="main\tools\toolzoom.h" />
+    <ClInclude Include="main\tools\trackballtool.h" />
+    <ClInclude Include="main\tools\undotool.h" />
+    <ClInclude Include="main\tools\videotool.h" />
+    <ClInclude Include="main\tools\windowlayouttool.h" />
+    <ClInclude Include="main\tools\coretools.h" />
+    <ClInclude Include="main\controllers\anonymizationcontroller.h" />
+    <ClInclude Include="main\controllers\configurationcontroller.h" />
+    <ClInclude Include="main\controllers\controladoracciones.h" />
+    <ClInclude Include="main\controllers\controladorautenticacion.h" />
+    <ClInclude Include="main\controllers\controladorbbddhl7.h" />
+    <ClInclude Include="main\controllers\controladorcarga.h" />
+    <ClInclude Include="main\controllers\controladorenviohl7.h" />
+    <ClInclude Include="main\controllers\controladoreventos.h" />
+    <ClInclude Include="main\controllers\controladorextensiones.h" />
+    <ClInclude Include="main\controllers\controladorhl7.h" />
+    <ClInclude Include="main\controllers\controladorinternacionalizacion.h" />
+    <ClInclude Include="main\controllers\controladorlog.h" />
+    <ClInclude Include="main\controllers\controladorpermisos.h" />
+    <ClInclude Include="main\controllers\controladorvistas.h" />
+    <ClInclude Include="main\controllers\dicommanager.h" />
+    <ClInclude Include="main\controllers\hangingprotocolcontroller.h" />
+    <ClInclude Include="main\controllers\historycontroller.h" />
+    <ClInclude Include="main\controllers\historytoolscontroller.h" />
+    <ClInclude Include="main\controllers\inactivitycontroller.h" />
+    <ClInclude Include="main\controllers\integrationcontroller.h" />
+    <ClInclude Include="main\controllers\pacscontroller.h" />
+    <ClInclude Include="main\controllers\parserxmlenglish.h" />
+    <ClInclude Include="main\controllers\parserxmlspanish.h" />
+    <ClInclude Include="main\controllers\permisoscore.h" />
+    <ClInclude Include="main\controllers\thumbnailcontroller.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomassociation.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomcustomassociation.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomechoassociation.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomfindassociation.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomgetassociation.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomimg2dcm.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicommoveassociation.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomnetclient.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomnetwork.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomprintassociation.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomservers.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomservice.h" />
+    <ClInclude Include="main\controllers\dcmtk\dicomstoreassociation.h" />
+    <ClInclude Include="main\controllers\dcmtk\ginkgouid.h" />
+    <ClInclude Include="main\controllers\dcmtk\helpercompresion.h" />
+    <ClInclude Include="main\controllers\dcmtk\helpers.h" />
+    <ClInclude Include="main\controllers\dcmtk\istorecallback.h" />
+    <ClInclude Include="main\controllers\dcmtk\ofstd\offile.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\d2dcommon.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\d2dsource.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\document2dcm.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\foooutpl.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2dimgs.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2djpgs.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2dles.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2doutpl.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2dplnsc.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2dplsc.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2dplvlp.h" />
+    <ClInclude Include="main\controllers\dcmtk\libi2d\pdf2dsource.h" />
+    <ClInclude Include="main\controllers\dcmtk\tls\gtlslayer.h" />
+    <ClInclude Include="main\controllers\dcmtk\tls\tls.h" />
+    <ClInclude Include="main\controllers\streaming\streamingloader.h" />
+    <ClInclude Include="main\controllers\log4cplus\guiappender.h" />
+    <ClInclude Include="main\controllers\log4cplus\logdefines.h" />
+    <ClInclude Include="main\managers\widgetsmanager.h" />
+    <ClInclude Include="main\gui\droptargetmainwindow.h" />
+    <ClInclude Include="main\gui\wxprevisualizaciondicom.h" />
+    <ClInclude Include="main\gui\acquisition\dialogoadquisicion.h" />
+    <ClInclude Include="main\gui\acquisition\dialogoadquisicionbase.h" />
+    <ClInclude Include="main\gui\configuration\dialogoconfiguracion.h" />
+    <ClInclude Include="main\gui\configuration\panelconfiguracionestacion.h" />
+    <ClInclude Include="main\gui\configuration\panelconfiguracionextensiones.h" />
+    <ClInclude Include="main\gui\configuration\panelconfiguraciongeneral.h" />
+    <ClInclude Include="main\gui\configuration\panelconfiguracionhce.h" />
+    <ClInclude Include="main\gui\configuration\panelconfiguracionpacs.h" />
+    <ClInclude Include="main\gui\configuration\panelconfiguracionpermisos.h" />
+    <ClInclude Include="main\gui\configuration\panelconfiguracionseguridad.h" />
+    <ClInclude Include="main\gui\configuration\panelconfiguracionubicaciones.h" />
+    <ClInclude Include="main\gui\configuration\panelconfigurationanonymization.h" />
+    <ClInclude Include="main\gui\configuration\panelesconfiguracionginkgobase.h" />
+    <ClInclude Include="main\gui\export\datospersistentesexportacion.h" />
+    <ClInclude Include="main\gui\export\parametrosprincipales.h" />
+    <ClInclude Include="main\gui\export\pasosexportacionbase.h" />
+    <ClInclude Include="main\gui\export\wxwizardexportacionginkgo.h" />
+    <ClInclude Include="main\gui\hl7controlwindow\ventanacontrolhl7.h" />
+    <ClInclude Include="main\gui\hl7controlwindow\ventanacontrolhl7base.h" />
+    <ClInclude Include="main\gui\import\generaldata.h" />
+    <ClInclude Include="main\gui\import\importationdata.h" />
+    <ClInclude Include="main\gui\import\pasoperfilimportacion.h" />
+    <ClInclude Include="main\gui\import\pasosimportacionbase.h" />
+    <ClInclude Include="main\gui\import\selectimagesimportation.h" />
+    <ClInclude Include="main\gui\import\wxwizardimportacionginkgo.h" />
+    <ClInclude Include="main\gui\license\aboutdialog.h" />
+    <ClInclude Include="main\gui\license\aboutdialogbase.h" />
+    <ClInclude Include="main\gui\license\acceptlicensedialog.h" />
+    <ClInclude Include="main\gui\license\acceptlicensedialogbase.h" />
+    <ClInclude Include="main\gui\license\dialogolicenciasopensource.h" />
+    <ClInclude Include="main\gui\logcontrolwindow\ventanacontrollogs.h" />
+    <ClInclude Include="main\gui\logcontrolwindow\ventanacontrollogsbase.h" />
+    <ClInclude Include="main\gui\login\dialogologin.h" />
+    <ClInclude Include="main\gui\mainwindow\detacheddialog.h" />
+    <ClInclude Include="main\gui\mainwindow\ventanaprincipal.h" />
+    <ClInclude Include="main\gui\mainwindow\ventanaprincipalbase.h" />
+    <ClInclude Include="main\gui\open\abrir.h" />
+    <ClInclude Include="main\gui\open\opendialogs.h" />
+    <ClInclude Include="main\gui\open\opendialogsbase.h" />
+    <ClInclude Include="main\gui\paneltags\paneltags.h" />
+    <ClInclude Include="main\gui\paneltags\paneltagsbase.h" />
+    <ClInclude Include="main\gui\progress\paneltarea.h" />
+    <ClInclude Include="main\gui\progress\progresobase.h" />
+    <ClInclude Include="main\gui\progress\statusbarprogreso.h" />
+    <ClInclude Include="main\gui\countdownmessage\countdownmessage.h" />
+    <ClInclude Include="main\gui\countdownmessage\countdownmessagebase.h" />
+    <ClInclude Include="main\gui\countdownmessage\inactivitycountdownmessage.h" />
+    <ClInclude Include="main\gui\startup\startupform.h" />
+    <ClInclude Include="main\gui\startup\startupformbase.h" />
+    <ClInclude Include="main\gui\startup\startupview.h" />
+    <ClInclude Include="main\gui\dicomdirexport\dicomdirexportbase.h" />
+    <ClInclude Include="main\gui\dicomdirexport\exportdicomdir.h" />
+    <ClInclude Include="main\gui\history3\confirmdeletedialog.h" />
+    <ClInclude Include="main\gui\history3\historypanel3.h" />
+    <ClInclude Include="main\gui\history3\historypanel3base.h" />
+    <ClInclude Include="main\gui\history3\historytoolmenu.h" />
+    <ClInclude Include="main\gui\history3\openwithdialog.h" />
+    <ClInclude Include="main\gui\history3\wxhistoryimagethumbnail.h" />
+    <ClInclude Include="main\gui\anonymize\anonymizedialog.h" />
+    <ClInclude Include="main\gui\anonymize\anonymizepanelbase.h" />
+    <ClInclude Include="main\gui\selectpacsserver\selectpacsserver.h" />
+    <ClInclude Include="main\gui\selectpacsserver\selectpacsserverbase.h" />
+    <ClInclude Include="main\gui\previewpanel\firstlevelpanel.h" />
+    <ClInclude Include="main\gui\previewpanel\ipreviewpanel.h" />
+    <ClInclude Include="main\gui\previewpanel\leafpanel.h" />
+    <ClInclude Include="main\gui\previewpanel\previewpanel.h" />
+    <ClInclude Include="main\gui\previewpanel\previewpanelbase.h" />
+    <ClInclude Include="main\gui\previewpanel\previewpanelmodel.h" />
+    <ClInclude Include="main\gui\toolsystem\wxmenuitemtool.h" />
+    <ClInclude Include="main\gui\dicomdirmigration\dicomdirmigration.h" />
+    <ClInclude Include="main\gui\dicomdirmigration\dicomdirmigrationbase.h" />
+    <ClInclude Include="main\toolsystem\toolcontroller.h" />
+    <ClInclude Include="main\toolsystem\toolsregistry.h" />
+    <ClInclude Include="main\utils\ginkgomatrix4x4.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\PERFUSION.h" />
+    <ClInclude Include="vtk\vtkginkgoimageviewer.h" />
+    <ClInclude Include="vtk\vtkopenglginkgotexture.h" />
+    <ClInclude Include="vtk\vtkSmartVolumeMapper.h" />
+    <ClInclude Include="vtk\command\ginkgoimagecommand.h" />
+    <ClInclude Include="vtk\interactor\ginkgointeractorstyleimage2d.h" />
+    <ClInclude Include="vtk\widgets\widgetsactor.h" />
+    <ClInclude Include="VTKInria3D\vtkINRIA3DConfigure.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\vtkLookupTableManager.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\Asymmetry.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\BlackBody.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\Cardiac.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\Flow.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\GEColor.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\GrayRainbow.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\HotGreen.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\HotIron.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\HotMetal.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\LONI.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\LONI2.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\Spectrum.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\Stern.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\VRBones.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\VRMusclesBones.h" />
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\VRRedVessels.h" />
+    <ClInclude Include="VTKInria3D\wxVTK\wxVTKRenderWindowInteractor.h" />
+    <ClInclude Include="export\tagsprivadoscomunes.h" />
+    <ClInclude Include="export\tools\iangletool.h" />
+    <ClInclude Include="export\tools\icolormaptool.h" />
+    <ClInclude Include="export\tools\icornerannotationstool.h" />
+    <ClInclude Include="export\tools\idetachwindowtool.h" />
+    <ClInclude Include="export\tools\iherramientascore.h" />
+    <ClInclude Include="export\tools\iimageprinttool.h" />
+    <ClInclude Include="export\tools\imarkertool.h" />
+    <ClInclude Include="export\tools\imetricgridtool.h" />
+    <ClInclude Include="export\tools\inotetool.h" />
+    <ClInclude Include="export\tools\ipixelsbluringtool.h" />
+    <ClInclude Include="export\tools\ipointertool.h" />
+    <ClInclude Include="export\tools\iresettool.h" />
+    <ClInclude Include="export\tools\irotateandfliptool.h" />
+    <ClInclude Include="export\tools\iruletool.h" />
+    <ClInclude Include="export\tools\ishowhistorytool.h" />
+    <ClInclude Include="export\tools\ishowtagstool.h" />
+    <ClInclude Include="export\tools\itoolpan.h" />
+    <ClInclude Include="export\tools\itoolslider.h" />
+    <ClInclude Include="export\tools\itoolwindowlevel.h" />
+    <ClInclude Include="export\tools\itoolzoom.h" />
+    <ClInclude Include="export\tools\itrackballtool.h" />
+    <ClInclude Include="export\tools\iundotool.h" />
+    <ClInclude Include="export\tools\ivideotool.h" />
+    <ClInclude Include="export\tools\iwindowlayouttool.h" />
+    <ClInclude Include="export\contracts\irulecontract.h" />
+    <ClInclude Include="export\contracts\irulecontractable.h" />
+    <ClInclude Include="export\contracts\islidercontract.h" />
+    <ClInclude Include="export\contracts\islidercontractable.h" />
+    <ClInclude Include="export\contracts\iviewcontract.h" />
+    <ClInclude Include="export\contracts\iviewcontractable.h" />
+    <ClInclude Include="export\contracts\iwidgetscontract.h" />
+    <ClInclude Include="export\contracts\iwidgetscontractable.h" />
+    <ClInclude Include="export\contracts\iwindowlayoutcontract.h" />
+    <ClInclude Include="export\contracts\iwindowlayoutcontractable.h" />
+    <ClInclude Include="export\contracts\iwindowlevelcontract.h" />
+    <ClInclude Include="export\contracts\iwindowlevelcontractable.h" />
+    <ClInclude Include="api\api.h" />
+    <ClInclude Include="api\autoptr.h" />
+    <ClInclude Include="api\globals.h" />
+    <ClInclude Include="api\ibutton.h" />
+    <ClInclude Include="api\icacheimagenes.h" />
+    <ClInclude Include="api\icommand.h" />
+    <ClInclude Include="api\iconfiguracion.h" />
+    <ClInclude Include="api\icontexto.h" />
+    <ClInclude Include="api\icontract.h" />
+    <ClInclude Include="api\ientorno.h" />
+    <ClInclude Include="api\ievento.h" />
+    <ClInclude Include="api\iexception.h" />
+    <ClInclude Include="api\ihistorytool.h" />
+    <ClInclude Include="api\ihl7parser.h" />
+    <ClInclude Include="api\ilock.h" />
+    <ClInclude Include="api\imgproxy.h" />
+    <ClInclude Include="api\imodelohl7.h" />
+    <ClInclude Include="api\imodelointegracion.h" />
+    <ClInclude Include="api\imodulo.h" />
+    <ClInclude Include="api\init.h" />
+    <ClInclude Include="api\initwx.h" />
+    <ClInclude Include="api\internal.h" />
+    <ClInclude Include="api\ioverlay.h" />
+    <ClInclude Include="api\iproxynotificadorprogreso.h" />
+    <ClInclude Include="api\istudycontext.h" />
+    <ClInclude Include="api\iventanaprogreso.h" />
+    <ClInclude Include="api\ivista.h" />
+    <ClInclude Include="api\iwaitqueue.h" />
+    <ClInclude Include="api\iwidgets.h" />
+    <ClInclude Include="api\iwidgetsmanager.h" />
+    <ClInclude Include="api\iwidgetsproperties.h" />
+    <ClInclude Include="api\iwidgetsrenderer.h" />
+    <ClInclude Include="api\iwizard.h" />
+    <ClInclude Include="api\ubication.h" />
+    <ClInclude Include="api\westilo.h" />
+    <ClInclude Include="api\widgetserializable.h" />
+    <ClInclude Include="api\observers\ieventsobserver.h" />
+    <ClInclude Include="api\observers\iextensionsobserver.h" />
+    <ClInclude Include="api\observers\iviewsobserver.h" />
+    <ClInclude Include="api\observers\iwidgetsobserver.h" />
+    <ClInclude Include="api\math\geometry.h" />
+    <ClInclude Include="api\math\geometry3d.h" />
+    <ClInclude Include="api\math\geometry_defs.h" />
+    <ClInclude Include="api\internationalization\internationalization.h" />
+    <ClInclude Include="api\controllers\iconfigurationcontroller.h" />
+    <ClInclude Include="api\controllers\icontroladoracciones.h" />
+    <ClInclude Include="api\controllers\icontroladorautenticacion.h" />
+    <ClInclude Include="api\controllers\icontroladorcarga.h" />
+    <ClInclude Include="api\controllers\icontroladorextensiones.h" />
+    <ClInclude Include="api\controllers\icontroladorinternacionalizacion.h" />
+    <ClInclude Include="api\controllers\icontroladorlog.h" />
+    <ClInclude Include="api\controllers\icontroladorpermisos.h" />
+    <ClInclude Include="api\controllers\icontroladorvistas.h" />
+    <ClInclude Include="api\controllers\ieventscontroller.h" />
+    <ClInclude Include="api\controllers\ihistorycontroller.h" />
+    <ClInclude Include="api\controllers\imodulecontroller.h" />
+    <ClInclude Include="api\controllers\ipacscontroller.h" />
+    <ClInclude Include="api\controllers\iprogresscontroller.h" />
+    <ClInclude Include="api\controllers\proxies\ipipelineproperties.h" />
+    <ClInclude Include="api\dicom\dcmdictionary.h" />
+    <ClInclude Include="api\dicom\dcmuiddictionary.h" />
+    <ClInclude Include="api\dicom\dicomdataset.h" />
+    <ClInclude Include="api\dicom\idicom.h" />
+    <ClInclude Include="api\dicom\idicomconformance.h" />
+    <ClInclude Include="api\dicom\idicomizador.h" />
+    <ClInclude Include="api\dicom\idicommanager.h" />
+    <ClInclude Include="api\dicom\imodelodicom.h" />
+    <ClInclude Include="api\threads\thread.h" />
+    <ClInclude Include="api\integration\dict.h" />
+    <ClInclude Include="api\integration\template.h" />
+    <ClInclude Include="api\helpers\aetwildcards.h" />
+    <ClInclude Include="api\helpers\dcmdictionary.h" />
+    <ClInclude Include="api\helpers\dcmuiddictionary.h" />
+    <ClInclude Include="api\helpers\helpertexto.h" />
+    <ClInclude Include="api\instantiations\instantiations.h" />
+    <ClInclude Include="api\utils\iginkgomatrix4x4.h" />
+    <ClInclude Include="api\toolsystem\itool.h" />
+    <ClInclude Include="api\toolsystem\itoolcontroller.h" />
+    <ClInclude Include="api\toolsystem\itoolsregistry.h" />
+    <ClInclude Include="api\toolsystem\iwidgettool.h" />
+    <ClInclude Include="widgets\striptexthelper.h" />
+    <ClInclude Include="widgets\wbrightnesscontrast.h" />
+    <ClInclude Include="widgets\wcamerarotation.h" />
+    <ClInclude Include="widgets\wfreeform.h" />
+    <ClInclude Include="widgets\wpolygon.h" />
+    <ClInclude Include="widgets\wstaticrule.h" />
+    <ClInclude Include="widgets\wtextbox.h" />
+    <ClInclude Include="wx\propiedades\wxpropiedades.h" />
+    <ClInclude Include="wx\propiedades\wxpropiedadesbase.h" />
+    <ClInclude Include="wx\wxginkgotoolbar.h" />
+    <ClInclude Include="wx\wxsqlite3\wxsqlite3.h" />
+    <ClInclude Include="wx\wxsqlite3\wxsqlite3def.h" />
+    <ClInclude Include="wx\wxsqlite3\wxsqlite3dyn.h" />
+    <ClInclude Include="wx\wxsqlite3\wxsqlite3opt.h" />
+    <ClInclude Include="wx\ginkgostyle\ginkgostyle.h" />
+    <ClInclude Include="wx\thumbnailctrl\thumbnailctrl.h" />
+    <ClInclude Include="wx\thumbnailctrl\thumbnailwidget.h" />
+    <ClInclude Include="wx\wizardginkgo\wxwizardginkgobase.h" />
+    <ClInclude Include="wx\wizardginkgo\wxwizardginkgobasewx.h" />
+    <ClInclude Include="wx\maskedtextctrl\maskedtextctrl.h" />
+    <ClInclude Include="wx\gnkinforme\gnkinformebase.h" />
+    <ClInclude Include="wx\gnkinforme\gnkinformebasewx.h" />
+    <ClInclude Include="sqlite\ginkgosqlite.h" />
+    <ClInclude Include="sqlite\hl7sqlite.h" />
+    <ClInclude Include="sqlite\seguridad.h" />
+    <ClInclude Include="sqlite\sqlite3.h" />
+    <ClInclude Include="sqlite\sqlite3ext.h" />
+    <ClInclude Include="commands\comandoactualizaciones.h" />
+    <ClInclude Include="commands\comandocalibrado.h" />
+    <ClInclude Include="commands\comandocarga.h" />
+    <ClInclude Include="commands\comandodestruirvista.h" />
+    <ClInclude Include="commands\comandoexportacion.h" />
+    <ClInclude Include="commands\comandoincluirhistorial.h" />
+    <ClInclude Include="commands\comandopacs.h" />
+    <ClInclude Include="commands\commandsynchronizewithgui.h" />
+    <ClInclude Include="commands\dbmigrationcommand.h" />
+    <ClInclude Include="commands\dialogopathssobreescribirbase.h" />
+    <ClInclude Include="commands\dicomizationcompletebase.h" />
+    <ClInclude Include="commands\dicomizecommand.h" />
+    <ClInclude Include="commands\exporttodicomdircommand.h" />
+    <ClInclude Include="commands\incomingdicomassociationcommand.h" />
+    <ClInclude Include="commands\inotificadorcalibrado.h" />
+    <ClInclude Include="commands\openremovableunit.h" />
+    <ClInclude Include="commands\sendhl7command.h" />
+    <ClInclude Include="commands\sendpacscommand.h" />
+    <ClInclude Include="commands\thumbnailscommand.h" />
+    <ClInclude Include="eventos\eventosginkgo.h" />
+    <ClInclude Include="eventos\hidesplashwindow.h" />
+    <ClInclude Include="eventos\integration.h" />
+    <ClInclude Include="eventos\mensajes.h" />
+    <ClInclude Include="eventos\modificacionfichero.h" />
+    <ClInclude Include="eventos\modificacionimagen.h" />
+    <ClInclude Include="eventos\modificacionwidget.h" />
+    <ClInclude Include="eventos\progresocomando.h" />
+    <ClInclude Include="eventos\render.h" />
+    <ClInclude Include="eventos\toolevents.h" />
+    <ClInclude Include="eventos\updateavailable.h" />
+    <ClInclude Include="eventos\views.h" />
+    <ClInclude Include="endpoint\endpoint.h" />
+    <ClInclude Include="widgets\openglhelper.h" />
+    <ClInclude Include="widgets\wangulo.h" />
+    <ClInclude Include="widgets\wanotacionesquina.h" />
+    <ClInclude Include="widgets\wanotacionposicion.h" />
+    <ClInclude Include="widgets\wchromacomplejo.h" />
+    <ClInclude Include="widgets\welevacion.h" />
+    <ClInclude Include="widgets\welipse.h" />
+    <ClInclude Include="widgets\wflecha.h" />
+    <ClInclude Include="widgets\wlupa.h" />
+    <ClInclude Include="widgets\wmarcadoarea.h" />
+    <ClInclude Include="widgets\wnota.h" />
+    <ClInclude Include="widgets\wpan.h" />
+    <ClInclude Include="widgets\wpunto.h" />
+    <ClInclude Include="widgets\wrectangulo.h" />
+    <ClInclude Include="widgets\wrejilla.h" />
+    <ClInclude Include="widgets\wrule.h" />
+    <ClInclude Include="widgets\wseleccion.h" />
+    <ClInclude Include="widgets\wslider.h" />
+    <ClInclude Include="widgets\wtrackball.h" />
+    <ClInclude Include="widgets\wtrapezoide.h" />
+    <ClInclude Include="widgets\wwindowlevel.h" />
+    <ClInclude Include="widgets\wzoom.h" />
+    <ClInclude Include="widgets\gui\calibracion.h" />
+    <ClInclude Include="widgets\gui\calibracionbase.h" />
+    <ClInclude Include="widgets\gui\selecciontexto.h" />
+    <ClInclude Include="widgets\gui\selecciontextobase.h" />
+    <ClInclude Include="widgets\observers\iobservadorchroma.h" />
+    <ClInclude Include="widgets\observers\iobservadorchromacomplejo.h" />
+    <ClInclude Include="widgets\observers\iobservadormarcadoarea.h" />
+    <ClInclude Include="widgets\observers\iobservadorwindowlevel.h" />
+    <ClInclude Include="prvext\prvext.h" />
+    <ClInclude Include="itk\itkImageToVTKImageFilter.h" />
+    <ClInclude Include="itk\itkRGBImageToVTKImageFilter.h" />
+    <ClInclude Include="itk\itkVTKImageToImageFilter.h" />
+    <ClInclude Include="ginkgopro\ginkgo_pro_defines.h" />
+    <ClInclude Include="ginkgopro\ico_logo_background.h" />
+    <ClInclude Include="ginkgopro\ico_logo_splash.h" />
+    <ClInclude Include="ginkgopro\icons.h" />
+    <ClInclude Include="resources\ginkgoresourcesmanager.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="api\controllers\icommandcontroller.cpp" />
+    <ClCompile Include="api\controllers\icontroladorcarga.cpp" />
+    <ClCompile Include="api\controllers\proxies\ipipelineproperties.cpp" />
+    <ClCompile Include="api\dicom\icustomassociation.cpp" />
+    <ClCompile Include="api\dicom\idicom.cpp" />
+    <ClCompile Include="api\iannotator.cpp" />
+    <ClCompile Include="commands\acquirefromurlcommand.cpp" />
+    <ClCompile Include="commands\autocleaningcommand.cpp" />
+    <ClCompile Include="commands\cloudcommand.cpp" />
+    <ClCompile Include="commands\linkhistorycommand.cpp" />
+    <ClCompile Include="commands\pacsdownloadcommand.cpp" />
+    <ClCompile Include="commands\pdfextractercommand.cpp" />
+    <ClCompile Include="commands\secondarycapturedicomizecommand.cpp" />
+    <ClCompile Include="commands\synchronizationcommand.cpp" />
+    <ClCompile Include="export\contracts\ipixelsbluringcontract.cpp" />
+    <ClCompile Include="export\contracts\ipixelsbluringcontractable.cpp" />
+    <ClCompile Include="export\tools\iaddfiletohistorytool.cpp" />
+    <ClCompile Include="export\tools\ibrightnesscontrasttool.cpp" />
+    <ClCompile Include="export\tools\icamerarotationtool.cpp" />
+    <ClCompile Include="export\tools\icopyimagetoclipboardtool.cpp" />
+    <ClCompile Include="export\tools\ipacsuploadtool.cpp" />
+    <ClCompile Include="export\tools\iqueryretrievetool.cpp" />
+    <ClCompile Include="export\tools\isecondarycapturetool.cpp" />
+    <ClCompile Include="export\tools\isimpleprinttool.cpp" />
+    <ClCompile Include="export\tools\istartdicomizationtool.cpp" />
+    <ClCompile Include="jsoncpp\json_reader.cpp" />
+    <ClCompile Include="jsoncpp\json_value.cpp" />
+    <ClCompile Include="jsoncpp\json_writer.cpp" />
+    <ClCompile Include="main\controllers\anonusagestats.cpp" />
+    <ClCompile Include="main\controllers\modalitysettingscontroller.cpp" />
+    <ClCompile Include="main\controllers\autocleaningcontroller.cpp" />
+    <ClCompile Include="main\controllers\commandcontroller.cpp" />
+    <ClCompile Include="main\controllers\smartretrievecontroller.cpp" />
+    <ClCompile Include="main\controllers\storedqueriescontroller.cpp" />
+    <ClCompile Include="main\controllers\windowattributescontroller.cpp" />
+    <ClCompile Include="main\gui\acquisition\acquisitiontablemodel.cpp" />
+    <ClCompile Include="main\gui\acquisition\downloadagaindialog.cpp" />
+    <ClCompile Include="main\gui\anonymize\anonymizepanel.cpp" />
+    <ClCompile Include="main\gui\configuration\defaultmodalitysettingsconfigurationpanel.cpp" />
+    <ClCompile Include="main\gui\configuration\hangingprotocolconfigurationpanel.cpp" />
+    <ClCompile Include="main\gui\configuration\localdatabaseconfigurationpanel.cpp" />
+    <ClCompile Include="main\gui\configuration\smartretrieveconfigurationpanel.cpp" />
+    <ClCompile Include="main\gui\ginkgocloud\downloadcloudbase.cpp" />
+    <ClCompile Include="main\gui\ginkgocloud\filelinkdialog.cpp" />
+    <ClCompile Include="main\gui\ginkgocloud\ginkgocloudsearchdialog.cpp" />
+    <ClCompile Include="main\gui\ginkgocloud\openginkgoclouddialog.cpp" />
+    <ClCompile Include="main\gui\history3\historytablemodel.cpp" />
+    <ClCompile Include="main\gui\history3\synchronizedialog.cpp" />
+    <ClCompile Include="main\gui\open\dicomdirtablemodel.cpp" />
+    <ClCompile Include="main\gui\pacsupload\pacsuploaddialog.cpp" />
+    <ClCompile Include="main\gui\pacsupload\pacsuploaddialogbase.cpp" />
+    <ClCompile Include="main\gui\toolsystem\ginkgotoolsystembar.cpp" />
+    <ClCompile Include="main\tools\addfiletohistorytool.cpp" />
+    <ClCompile Include="main\tools\brightnesscontrasttool.cpp" />
+    <ClCompile Include="main\tools\camerarotationtool.cpp" />
+    <ClCompile Include="main\tools\copyimagetoclipboardtool.cpp" />
+    <ClCompile Include="main\tools\openginkgocloudlinktool.cpp" />
+    <ClCompile Include="main\tools\pacsuploadtool.cpp" />
+    <ClCompile Include="main\tools\queryretrievetool.cpp" />
+    <ClCompile Include="main\tools\searchginkgocloudhistorytool.cpp" />
+    <ClCompile Include="main\tools\secondarycapturetool.cpp" />
+    <ClCompile Include="main\tools\simpleprinttool.cpp" />
+    <ClCompile Include="main\tools\startdicomizationtool.cpp" />
+    <ClCompile Include="stdafx.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">Create</PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="main\entorno.cpp" />
+    <ClCompile Include="main\tools\angletool.cpp" />
+    <ClCompile Include="main\tools\anonymizetool.cpp" />
+    <ClCompile Include="main\tools\colormaptool.cpp" />
+    <ClCompile Include="main\tools\cornerannotationstool.cpp" />
+    <ClCompile Include="main\tools\detachwindowtool.cpp" />
+    <ClCompile Include="main\tools\dicomizetool.cpp" />
+    <ClCompile Include="main\tools\exportdicomdirtool.cpp" />
+    <ClCompile Include="main\tools\imageexporttool.cpp" />
+    <ClCompile Include="main\tools\markertool.cpp" />
+    <ClCompile Include="main\tools\metricgridtool.cpp" />
+    <ClCompile Include="main\tools\notetool.cpp" />
+    <ClCompile Include="main\tools\openfiletool.cpp" />
+    <ClCompile Include="main\tools\openfoldertool.cpp" />
+    <ClCompile Include="main\tools\openremovabletool.cpp" />
+    <ClCompile Include="main\tools\pixelsbluringtool.cpp" />
+    <ClCompile Include="main\tools\pointertool.cpp" />
+    <ClCompile Include="main\tools\queryretrievehistorytool.cpp" />
+    <ClCompile Include="main\tools\resettool.cpp" />
+    <ClCompile Include="main\tools\rotateandfliptool.cpp" />
+    <ClCompile Include="main\tools\ruletool.cpp" />
+    <ClCompile Include="main\tools\sendpacstool.cpp" />
+    <ClCompile Include="main\tools\showhistorytool.cpp" />
+    <ClCompile Include="main\tools\showtagshistorytool.cpp" />
+    <ClCompile Include="main\tools\showtagstool.cpp" />
+    <ClCompile Include="main\tools\toolpan.cpp" />
+    <ClCompile Include="main\tools\toolslider.cpp" />
+    <ClCompile Include="main\tools\toolwindowlevel.cpp" />
+    <ClCompile Include="main\tools\toolzoom.cpp" />
+    <ClCompile Include="main\tools\trackballtool.cpp" />
+    <ClCompile Include="main\tools\undotool.cpp" />
+    <ClCompile Include="main\tools\videotool.cpp" />
+    <ClCompile Include="main\tools\windowlayouttool.cpp" />
+    <ClCompile Include="main\tools\coretools.cpp" />
+    <ClCompile Include="main\controllers\anonymizationcontroller.cpp" />
+    <ClCompile Include="main\controllers\configurationcontroller.cpp" />
+    <ClCompile Include="main\controllers\controladoracciones.cpp" />
+    <ClCompile Include="main\controllers\controladorautenticacion.cpp" />
+    <ClCompile Include="main\controllers\controladorbbddhl7.cpp" />
+    <ClCompile Include="main\controllers\controladorcarga.cpp" />
+    <ClCompile Include="main\controllers\controladorenviohl7.cpp" />
+    <ClCompile Include="main\controllers\controladoreventos.cpp" />
+    <ClCompile Include="main\controllers\controladorextensiones.cpp" />
+    <ClCompile Include="main\controllers\controladorhl7.cpp" />
+    <ClCompile Include="main\controllers\controladorinternacionalizacion.cpp" />
+    <ClCompile Include="main\controllers\controladorlog.cpp" />
+    <ClCompile Include="main\controllers\controladorpermisos.cpp" />
+    <ClCompile Include="main\controllers\controladorvistas.cpp" />
+    <ClCompile Include="main\controllers\dicommanager.cpp" />
+    <ClCompile Include="main\controllers\hangingprotocolcontroller.cpp" />
+    <ClCompile Include="main\controllers\historycontroller.cpp" />
+    <ClCompile Include="main\controllers\historytoolscontroller.cpp" />
+    <ClCompile Include="main\controllers\inactivitycontroller.cpp" />
+    <ClCompile Include="main\controllers\integrationcontroller.cpp" />
+    <ClCompile Include="main\controllers\pacscontroller.cpp" />
+    <ClCompile Include="main\controllers\parserxmlenglish.cpp" />
+    <ClCompile Include="main\controllers\parserxmlspanish.cpp" />
+    <ClCompile Include="main\controllers\thumbnailcontroller.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicomassociation.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicomcustomassociation.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicomechoassociation.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicomfindassociation.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicomgetassociation.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicomimg2dcm.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicommoveassociation.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicomnetwork.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicomprintassociation.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicomservers.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicomservice.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\dicomstoreassociation.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\ginkgouid.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\helpercompresion.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\helpers.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\libi2d\d2dcommon.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\libi2d\document2dcm.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2dimgs.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2djpgs.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2dles.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2dplnsc.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2dplsc.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2dplvlp.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\libi2d\pdf2dsource.cpp" />
+    <ClCompile Include="main\controllers\dcmtk\tls\gtlslayer.cc" />
+    <ClCompile Include="main\controllers\dcmtk\tls\win-only\tlslayer.cc" />
+    <ClCompile Include="main\controllers\dcmtk\tls\win-only\tlsscu.cc" />
+    <ClCompile Include="main\controllers\dcmtk\tls\win-only\tlstrans.cc" />
+    <ClCompile Include="main\controllers\streaming\streamingloader.cpp" />
+    <ClCompile Include="main\controllers\log4cplus\guiappender.cpp" />
+    <ClCompile Include="main\managers\widgetsmanager.cpp" />
+    <ClCompile Include="main\gui\droptargetmainwindow.cpp" />
+    <ClCompile Include="main\gui\wxprevisualizaciondicom.cpp" />
+    <ClCompile Include="main\gui\acquisition\dialogoadquisicion.cpp" />
+    <ClCompile Include="main\gui\acquisition\dialogoadquisicionbase.cpp" />
+    <ClCompile Include="main\gui\configuration\dialogoconfiguracion.cpp" />
+    <ClCompile Include="main\gui\configuration\panelconfiguracionestacion.cpp" />
+    <ClCompile Include="main\gui\configuration\panelconfiguracionextensiones.cpp" />
+    <ClCompile Include="main\gui\configuration\panelconfiguraciongeneral.cpp" />
+    <ClCompile Include="main\gui\configuration\panelconfiguracionhce.cpp" />
+    <ClCompile Include="main\gui\configuration\panelconfiguracionpacs.cpp" />
+    <ClCompile Include="main\gui\configuration\panelconfiguracionpermisos.cpp" />
+    <ClCompile Include="main\gui\configuration\panelconfiguracionseguridad.cpp" />
+    <ClCompile Include="main\gui\configuration\panelconfiguracionubicaciones.cpp" />
+    <ClCompile Include="main\gui\configuration\panelconfigurationanonymization.cpp" />
+    <ClCompile Include="main\gui\configuration\panelesconfiguracionginkgobase.cpp" />
+    <ClCompile Include="main\gui\export\parametrosprincipales.cpp" />
+    <ClCompile Include="main\gui\export\pasosexportacionbase.cpp" />
+    <ClCompile Include="main\gui\export\wxwizardexportacionginkgo.cpp" />
+    <ClCompile Include="main\gui\hl7controlwindow\ventanacontrolhl7.cpp" />
+    <ClCompile Include="main\gui\hl7controlwindow\ventanacontrolhl7base.cpp" />
+    <ClCompile Include="main\gui\import\generaldata.cpp" />
+    <ClCompile Include="main\gui\import\pasoperfilimportacion.cpp" />
+    <ClCompile Include="main\gui\import\pasosimportacionbase.cpp" />
+    <ClCompile Include="main\gui\import\selectimagesimportation.cpp" />
+    <ClCompile Include="main\gui\import\wxwizardimportacionginkgo.cpp" />
+    <ClCompile Include="main\gui\license\aboutdialog.cpp" />
+    <ClCompile Include="main\gui\license\aboutdialogbase.cpp" />
+    <ClCompile Include="main\gui\license\acceptlicensedialog.cpp" />
+    <ClCompile Include="main\gui\license\acceptlicensedialogbase.cpp" />
+    <ClCompile Include="main\gui\license\dialogolicenciasopensource.cpp" />
+    <ClCompile Include="main\gui\logcontrolwindow\ventanacontrollogs.cpp" />
+    <ClCompile Include="main\gui\logcontrolwindow\ventanacontrollogsbase.cpp" />
+    <ClCompile Include="main\gui\login\dialogologin.cpp" />
+    <ClCompile Include="main\gui\mainwindow\detacheddialog.cpp" />
+    <ClCompile Include="main\gui\mainwindow\ventanaprincipal.cpp" />
+    <ClCompile Include="main\gui\mainwindow\ventanaprincipalbase.cpp" />
+    <ClCompile Include="main\gui\open\abrir.cpp" />
+    <ClCompile Include="main\gui\open\opendialogs.cpp" />
+    <ClCompile Include="main\gui\open\opendialogsbase.cpp" />
+    <ClCompile Include="main\gui\paneltags\paneltags.cpp" />
+    <ClCompile Include="main\gui\paneltags\paneltagsbase.cpp" />
+    <ClCompile Include="main\gui\progress\paneltarea.cpp" />
+    <ClCompile Include="main\gui\progress\progresobase.cpp" />
+    <ClCompile Include="main\gui\progress\statusbarprogreso.cpp" />
+    <ClCompile Include="main\gui\countdownmessage\countdownmessage.cpp" />
+    <ClCompile Include="main\gui\countdownmessage\countdownmessagebase.cpp" />
+    <ClCompile Include="main\gui\countdownmessage\inactivitycountdownmessage.cpp" />
+    <ClCompile Include="main\gui\startup\startupform.cpp" />
+    <ClCompile Include="main\gui\startup\startupformbase.cpp" />
+    <ClCompile Include="main\gui\startup\startupview.cpp" />
+    <ClCompile Include="main\gui\dicomdirexport\dicomdirexportbase.cpp" />
+    <ClCompile Include="main\gui\dicomdirexport\exportdicomdir.cpp" />
+    <ClCompile Include="main\gui\history3\historypanel3.cpp" />
+    <ClCompile Include="main\gui\history3\historypanel3base.cpp" />
+    <ClCompile Include="main\gui\history3\historytoolmenu.cpp" />
+    <ClCompile Include="main\gui\history3\wxhistoryimagethumbnail.cpp" />
+    <ClCompile Include="main\gui\anonymize\anonymizedialog.cpp" />
+    <ClCompile Include="main\gui\anonymize\anonymizepanelbase.cpp" />
+    <ClCompile Include="main\gui\selectpacsserver\selectpacsserver.cpp" />
+    <ClCompile Include="main\gui\selectpacsserver\selectpacsserverbase.cpp" />
+    <ClCompile Include="main\gui\previewpanel\firstlevelpanel.cpp" />
+    <ClCompile Include="main\gui\previewpanel\leafpanel.cpp" />
+    <ClCompile Include="main\gui\previewpanel\previewpanel.cpp" />
+    <ClCompile Include="main\gui\previewpanel\previewpanelbase.cpp" />
+    <ClCompile Include="main\gui\toolsystem\wxmenuitemtool.cpp" />
+    <ClCompile Include="main\gui\dicomdirmigration\dicomdirmigration.cpp" />
+    <ClCompile Include="main\gui\dicomdirmigration\dicomdirmigrationbase.cpp" />
+    <ClCompile Include="main\toolsystem\toolcontroller.cpp" />
+    <ClCompile Include="main\toolsystem\toolsregistry.cpp" />
+    <ClCompile Include="main\utils\ginkgomatrix4x4.cpp" />
+    <ClCompile Include="vtk\vtkginkgoimageviewer.cpp" />
+    <ClCompile Include="vtk\vtkopenglginkgotexture.cpp" />
+    <ClCompile Include="vtk\vtkSmartVolumeMapper.cxx" />
+    <ClCompile Include="vtk\command\ginkgoimagecommand.cpp" />
+    <ClCompile Include="vtk\interactor\ginkgointeractorstyleimage2d.cpp" />
+    <ClCompile Include="vtk\widgets\widgetsactor.cpp" />
+    <ClCompile Include="VTKInria3D\vtkVISUManagement\vtkLookupTableManager.cpp" />
+    <ClCompile Include="VTKInria3D\wxVTK\wxVTKRenderWindowInteractor.cpp" />
+    <ClCompile Include="export\tools\iangletool.cpp" />
+    <ClCompile Include="export\tools\icolormaptool.cpp" />
+    <ClCompile Include="export\tools\icornerannotationstool.cpp" />
+    <ClCompile Include="export\tools\idetachwindowtool.cpp" />
+    <ClCompile Include="export\tools\iimageexporttool.cpp" />
+    <ClCompile Include="export\tools\imarkertool.cpp" />
+    <ClCompile Include="export\tools\imetricgridtool.cpp" />
+    <ClCompile Include="export\tools\inotetool.cpp" />
+    <ClCompile Include="export\tools\ipixelsbluringtool.cpp" />
+    <ClCompile Include="export\tools\ipointertool.cpp" />
+    <ClCompile Include="export\tools\iresettool.cpp" />
+    <ClCompile Include="export\tools\irotateandfliptool.cpp" />
+    <ClCompile Include="export\tools\iruletool.cpp" />
+    <ClCompile Include="export\tools\ishowhistorytool.cpp" />
+    <ClCompile Include="export\tools\ishowtagstool.cpp" />
+    <ClCompile Include="export\tools\itoolpan.cpp" />
+    <ClCompile Include="export\tools\itoolslider.cpp" />
+    <ClCompile Include="export\tools\itoolwindowlevel.cpp" />
+    <ClCompile Include="export\tools\itoolzoom.cpp" />
+    <ClCompile Include="export\tools\itrackballtool.cpp" />
+    <ClCompile Include="export\tools\iundotool.cpp" />
+    <ClCompile Include="export\tools\ivideotool.cpp" />
+    <ClCompile Include="export\tools\iwindowlayouttool.cpp" />
+    <ClCompile Include="export\contracts\irulecontract.cpp" />
+    <ClCompile Include="export\contracts\irulecontractable.cpp" />
+    <ClCompile Include="export\contracts\islidercontract.cpp" />
+    <ClCompile Include="export\contracts\islidercontractable.cpp" />
+    <ClCompile Include="export\contracts\iviewcontract.cpp" />
+    <ClCompile Include="export\contracts\iviewcontractable.cpp" />
+    <ClCompile Include="export\contracts\iwidgetscontract.cpp" />
+    <ClCompile Include="export\contracts\iwidgetscontractable.cpp" />
+    <ClCompile Include="export\contracts\iwindowlayoutcontract.cpp" />
+    <ClCompile Include="export\contracts\iwindowlayoutcontractable.cpp" />
+    <ClCompile Include="export\contracts\iwindowlevelcontract.cpp" />
+    <ClCompile Include="export\contracts\iwindowlevelcontractable.cpp" />
+    <ClCompile Include="api\autoptr.cpp" />
+    <ClCompile Include="api\ibutton.cpp" />
+    <ClCompile Include="api\icommand.cpp" />
+    <ClCompile Include="api\icontexto.cpp" />
+    <ClCompile Include="api\icontract.cpp" />
+    <ClCompile Include="api\ientorno.cpp" />
+    <ClCompile Include="api\ievento.cpp" />
+    <ClCompile Include="api\iexception.cpp" />
+    <ClCompile Include="api\ihistorytool.cpp" />
+    <ClCompile Include="api\ihl7parser.cpp" />
+    <ClCompile Include="api\ilock.cpp" />
+    <ClCompile Include="api\imodelohl7.cpp" />
+    <ClCompile Include="api\imodelointegracion.cpp" />
+    <ClCompile Include="api\init.cpp" />
+    <ClCompile Include="api\initwx.cpp" />
+    <ClCompile Include="api\istudycontext.cpp" />
+    <ClCompile Include="api\ivista.cpp" />
+    <ClCompile Include="api\iwaitqueue.cpp" />
+    <ClCompile Include="api\iwidgets.cpp" />
+    <ClCompile Include="api\iwidgetsmanager.cpp" />
+    <ClCompile Include="api\iwidgetsrenderer.cpp" />
+    <ClCompile Include="api\iwizard.cpp" />
+    <ClCompile Include="api\ubication.cpp" />
+    <ClCompile Include="api\widgetserializable.cpp" />
+    <ClCompile Include="api\observers\ieventsobserver.cpp" />
+    <ClCompile Include="api\observers\iextensionsobserver.cpp" />
+    <ClCompile Include="api\internationalization\internationalization.cpp" />
+    <ClCompile Include="api\controllers\iconfigurationcontroller.cpp" />
+    <ClCompile Include="api\controllers\icontroladoracciones.cpp" />
+    <ClCompile Include="api\controllers\icontroladorlog.cpp" />
+    <ClCompile Include="api\controllers\icontroladorpermisos.cpp" />
+    <ClCompile Include="api\controllers\icontroladorvistas.cpp" />
+    <ClCompile Include="api\controllers\ieventscontroller.cpp" />
+    <ClCompile Include="api\controllers\ihistorycontroller.cpp" />
+    <ClCompile Include="api\controllers\imodulecontroller.cpp" />
+    <ClCompile Include="api\controllers\ipacscontroller.cpp" />
+    <ClCompile Include="api\controllers\iprogresscontroller.cpp" />
+    <ClCompile Include="api\dicom\dicomdataset.cpp" />
+    <ClCompile Include="api\dicom\idicomconformance.cpp" />
+    <ClCompile Include="api\threads\thread.cpp" />
+    <ClCompile Include="api\helpers\aetwildcards.cpp" />
+    <ClCompile Include="api\helpers\helpertexto.cpp" />
+    <ClCompile Include="api\utils\iginkgomatrix4x4.cpp" />
+    <ClCompile Include="api\toolsystem\itool.cpp" />
+    <ClCompile Include="api\toolsystem\itoolcontroller.cpp" />
+    <ClCompile Include="api\toolsystem\itoolsregistry.cpp" />
+    <ClCompile Include="api\toolsystem\iwidgettool.cpp" />
+    <ClCompile Include="widgets\striptexthelper.cpp" />
+    <ClCompile Include="widgets\wbrightnesscontrast.cpp" />
+    <ClCompile Include="widgets\wcamerarotation.cpp" />
+    <ClCompile Include="widgets\wfreeform.cpp" />
+    <ClCompile Include="widgets\wpolygon.cpp" />
+    <ClCompile Include="widgets\wstaticrule.cpp" />
+    <ClCompile Include="widgets\wtextbox.cpp" />
+    <ClCompile Include="wx\propiedades\wxpropiedades.cpp" />
+    <ClCompile Include="wx\propiedades\wxpropiedadesbase.cpp" />
+    <ClCompile Include="wx\wxginkgotoolbar.cpp" />
+    <ClCompile Include="wx\wxsqlite3\wxsqlite3.cpp" />
+    <ClCompile Include="wx\ginkgostyle\ginkgostyle.cpp" />
+    <ClCompile Include="wx\thumbnailctrl\thumbnailctrl.cpp" />
+    <ClCompile Include="wx\thumbnailctrl\thumbnailwidget.cpp" />
+    <ClCompile Include="wx\wizardginkgo\wxwizardginkgobase.cpp" />
+    <ClCompile Include="wx\wizardginkgo\wxwizardginkgobasewx.cpp" />
+    <ClCompile Include="wx\maskedtextctrl\maskedtextctrl.cpp" />
+    <ClCompile Include="wx\gnkinforme\gnkinformebase.cpp" />
+    <ClCompile Include="wx\gnkinforme\gnkinformebasewx.cpp" />
+    <ClCompile Include="sqlite\sqlite3.c">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="commands\comandoactualizaciones.cpp" />
+    <ClCompile Include="commands\comandocalibrado.cpp" />
+    <ClCompile Include="commands\comandocarga.cpp" />
+    <ClCompile Include="commands\comandodestruirvista.cpp" />
+    <ClCompile Include="commands\comandoexportacion.cpp" />
+    <ClCompile Include="commands\comandoincluirhistorial.cpp" />
+    <ClCompile Include="commands\comandopacs.cpp" />
+    <ClCompile Include="commands\commandsynchronizewithgui.cpp" />
+    <ClCompile Include="commands\dbmigrationcommand.cpp" />
+    <ClCompile Include="commands\dialogopathssobreescribirbase.cpp" />
+    <ClCompile Include="commands\dicomizationcompletebase.cpp" />
+    <ClCompile Include="commands\dicomizecommand.cpp" />
+    <ClCompile Include="commands\exporttodicomdircommand.cpp" />
+    <ClCompile Include="commands\incomingdicomassociationcommand.cpp" />
+    <ClCompile Include="commands\openremovableunit.cpp" />
+    <ClCompile Include="commands\sendhl7command.cpp" />
+    <ClCompile Include="commands\sendpacscommand.cpp" />
+    <ClCompile Include="commands\thumbnailscommand.cpp" />
+    <ClCompile Include="endpoint\address.cpp" />
+    <ClCompile Include="endpoint\endpoint.cpp" />
+    <ClCompile Include="endpoint\inet_ntop.c">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">
+      </PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">
+      </PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="widgets\openglhelper.cpp" />
+    <ClCompile Include="widgets\wangulo.cpp" />
+    <ClCompile Include="widgets\wanotacionesquina.cpp" />
+    <ClCompile Include="widgets\wanotacionposicion.cpp" />
+    <ClCompile Include="widgets\wchromacomplejo.cpp" />
+    <ClCompile Include="widgets\welevacion.cpp" />
+    <ClCompile Include="widgets\welipse.cpp" />
+    <ClCompile Include="widgets\wflecha.cpp" />
+    <ClCompile Include="widgets\wlupa.cpp" />
+    <ClCompile Include="widgets\wmarcadoarea.cpp" />
+    <ClCompile Include="widgets\wnota.cpp" />
+    <ClCompile Include="widgets\wpan.cpp" />
+    <ClCompile Include="widgets\wpunto.cpp" />
+    <ClCompile Include="widgets\wrectangulo.cpp" />
+    <ClCompile Include="widgets\wrejilla.cpp" />
+    <ClCompile Include="widgets\wrule.cpp" />
+    <ClCompile Include="widgets\wseleccion.cpp" />
+    <ClCompile Include="widgets\wslider.cpp" />
+    <ClCompile Include="widgets\wtrackball.cpp" />
+    <ClCompile Include="widgets\wtrapezoide.cpp" />
+    <ClCompile Include="widgets\wwindowlevel.cpp" />
+    <ClCompile Include="widgets\wzoom.cpp" />
+    <ClCompile Include="widgets\gui\calibracion.cpp" />
+    <ClCompile Include="widgets\gui\calibracionbase.cpp" />
+    <ClCompile Include="widgets\gui\selecciontexto.cpp" />
+    <ClCompile Include="widgets\gui\selecciontextobase.cpp" />
+    <ClCompile Include="resources\ginkgoresourcesmanager.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="resources\test_card.dcm">
+      <Message Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">Copying test card</Message>
+      <Message Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">Copying test card</Message>
+      <Message Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">Copying test card</Message>
+      <Message Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">Copying test card</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">Copiando test card</Message>
+      <Message Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">Copiando test card</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="resources\conformance.xml">
+      <Message Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'">Copiando dicom conformance file</Message>
+      <Message Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'">Copiando dicom conformance file</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'">mkdir "$(OutDir)" 2>NUL
+copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'">mkdir "$(OutDir)" 2>NUL
+copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">Copying dicom conformance file</Message>
+      <Message Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">Copying dicom conformance file</Message>
+      <Message Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">Copying dicom conformance file</Message>
+      <Message Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">Copying dicom conformance file</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">Copiando dicom conformance file</Message>
+      <Message Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">Copiando dicom conformance file</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">Copiando dicom conformance file</Message>
+      <Message Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">Copiando dicom conformance file</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Message Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">Copiando dicom conformance file</Message>
+      <Message Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">Copiando dicom conformance file</Message>
+      <Command Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <Command Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">copy "%(FullPath)" "$(OutDir)"
+</Command>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">%(FullPath);%(AdditionalInputs)</AdditionalInputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+      <Outputs Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">$(OutDir)%(Filename)%(Extension);%(Outputs)</Outputs>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="..\lib_derma\lib_derma_pasi\libderma_pasi.vcproj" />
+    <None Include="jsoncpp\json_internalarray.inl" />
+    <None Include="jsoncpp\json_internalmap.inl" />
+    <None Include="jsoncpp\json_valueiterator.inl" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/cadxcore/cadxcore.vcxproj.filters b/cadxcore/cadxcore.vcxproj.filters
new file mode 100644
index 0000000..5122899
--- /dev/null
+++ b/cadxcore/cadxcore.vcxproj.filters
@@ -0,0 +1,2892 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source\main">
+      <UniqueIdentifier>{a854893a-4dbf-4400-bf4c-356d16ad4ad2}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\tools">
+      <UniqueIdentifier>{b63155a5-07d9-402d-8dbc-950757d20579}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\tools\autoregister">
+      <UniqueIdentifier>{c0c19a35-a0e9-4963-8b0b-589504c743d4}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\controllers">
+      <UniqueIdentifier>{7dcbbb7f-ca41-439d-a086-a170e8c1b7a6}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\controllers\dcmtk">
+      <UniqueIdentifier>{64c0b81a-d383-4651-a33b-9494fb9e8b1c}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\controllers\dcmtk\ofstd">
+      <UniqueIdentifier>{1b3976b2-921f-4cb0-b93b-98ba3eded70c}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\controllers\dcmtk\libi2d">
+      <UniqueIdentifier>{511e6ed7-7ab7-4065-bde0-38c600c78b96}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\controllers\dcmtk\tls">
+      <UniqueIdentifier>{e4f1ebb3-6a87-4190-989f-3c9b9bd227a9}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\controllers\dcmtk\tls\win-only">
+      <UniqueIdentifier>{959e8a3f-825c-44a0-9c07-cc87b571b7cd}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\controllers\dcmtk\threads">
+      <UniqueIdentifier>{3ba1e6f3-d06f-4a51-a1cc-7d8d3f7d3b95}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\controllers\streaming">
+      <UniqueIdentifier>{278f1489-fbd6-4d20-8bf1-b9438dd1af97}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\controllers\log4cplus">
+      <UniqueIdentifier>{0a61e932-2aa4-4acc-aaa3-e28ad99af80e}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\managers">
+      <UniqueIdentifier>{f181896d-da32-46e6-b79f-c827bf1ecb46}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui">
+      <UniqueIdentifier>{addca24c-bf02-4601-9384-0ec459c0301e}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\acquisition">
+      <UniqueIdentifier>{f7353684-a79a-4a3d-9be0-051bb0d33d08}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\configuration">
+      <UniqueIdentifier>{7032241d-3a78-4fa6-9ca2-b90326771817}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\export">
+      <UniqueIdentifier>{b4356683-325e-4276-8fd7-2e6adf11e12b}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\hl7controlwindow">
+      <UniqueIdentifier>{bdf3266e-4d05-455c-89be-b5bb1fcb1fe7}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\import">
+      <UniqueIdentifier>{779c7f6d-302b-43ca-97ac-e078cde2f0b2}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\license">
+      <UniqueIdentifier>{dbdbe85d-75f1-4ec0-a941-d18c62e1aced}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\logcontrolwindow">
+      <UniqueIdentifier>{5df37032-999a-4f3f-8069-5bafdd6a23a4}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\login">
+      <UniqueIdentifier>{bbea7a6d-5bce-48c9-82b0-781a7c8ccfad}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\mainwindow">
+      <UniqueIdentifier>{7702b215-0bf4-4c57-bdf9-7cd9ea32cc76}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\open">
+      <UniqueIdentifier>{c5941943-de41-4851-9954-868d10099439}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\paneltags">
+      <UniqueIdentifier>{ccc98461-2216-488c-b4bd-9b0a0e66a689}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\progress">
+      <UniqueIdentifier>{0839eb8b-6e0e-41be-9667-cc84c35cfab1}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\countdownmessage">
+      <UniqueIdentifier>{22e8a8e7-e4ed-4ff3-a88d-6177129a8e9d}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\startup">
+      <UniqueIdentifier>{ca51f83f-4841-45d7-8ba8-2f373b8df0e3}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\dicomdirexport">
+      <UniqueIdentifier>{04cd5b23-ae49-4464-bd78-f3a5e22c0d00}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\history3">
+      <UniqueIdentifier>{64e95719-8e8c-4d63-9e7c-cdab9d741f34}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\anonymize">
+      <UniqueIdentifier>{d2bbca1d-69d3-4453-93eb-f15a9a847510}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\selectpacsserver">
+      <UniqueIdentifier>{20ff658a-ff6a-41c2-918b-599a5f69599d}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\previewpanel">
+      <UniqueIdentifier>{3186125a-16fd-4f43-bd93-75ac21484291}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\toolsystem">
+      <UniqueIdentifier>{e498516c-7b4b-413e-a3b9-5d3634f5c5cf}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\dicomdirmigration">
+      <UniqueIdentifier>{7f76ddec-b129-4ebe-8fbe-8318d2fe503a}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\toolsystem">
+      <UniqueIdentifier>{3193e75e-ed58-42d1-9202-d90e7d0dcc62}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\utils">
+      <UniqueIdentifier>{5a9e34e6-fc50-4e1a-bbc7-f75f0bf2ac82}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\vtk">
+      <UniqueIdentifier>{60984d7e-4fa9-4c99-886e-da6598266f4c}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\vtk\command">
+      <UniqueIdentifier>{e2dc7248-a287-4f21-bbdd-fd87345ac7e9}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\vtk\interactor">
+      <UniqueIdentifier>{bb3ebeac-f301-4a4e-9db0-2237d696731b}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\vtk\widgets">
+      <UniqueIdentifier>{570c18ba-9cd7-425f-a14c-f70471ba2f50}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\VTKInria3D">
+      <UniqueIdentifier>{4f9d677e-8bf8-42d9-9511-f86960c60335}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\VTKInria3D\vtkVISUManagement">
+      <UniqueIdentifier>{180f2c79-be11-4c92-8d7b-40e1dec30212}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\VTKInria3D\vtkVISUManagement\lut">
+      <UniqueIdentifier>{6940c42f-07c6-4087-b129-1b6f159ca1bb}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\VTKInria3D\wxVTK">
+      <UniqueIdentifier>{81dccf54-a50d-483f-b60d-0dbfe0dec869}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\export">
+      <UniqueIdentifier>{16942c7a-c56f-496d-81a6-0c1d88c3e33a}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\export\tools">
+      <UniqueIdentifier>{9d9afa69-0ec2-4302-9985-48426fdd26f4}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\export\contracts">
+      <UniqueIdentifier>{bc3fd17c-31ef-4565-894c-652fc23da12f}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api">
+      <UniqueIdentifier>{e895d40d-aa5e-46f3-99b7-c7a0afa58732}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\observers">
+      <UniqueIdentifier>{c31dd657-6718-4a15-bdde-0e5bb27ece85}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\math">
+      <UniqueIdentifier>{992c3092-0562-4768-b9ed-2500a5e38684}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\internationalization">
+      <UniqueIdentifier>{4dde5311-0825-4e0b-bc18-2d9f028f7b9a}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\controllers">
+      <UniqueIdentifier>{d982eee8-ef5d-40fc-b93f-22c8c3586c1d}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\controllers\proxies">
+      <UniqueIdentifier>{fa580f95-9eef-42d7-97b6-0e433278ba7d}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\dicom">
+      <UniqueIdentifier>{d9ba4994-b4b4-48f7-83cb-421b2a71f40a}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\threads">
+      <UniqueIdentifier>{1b984b9f-568a-4a99-9e71-10fa72a6341e}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\integration">
+      <UniqueIdentifier>{ad7f38bb-d0ee-4a91-afcb-42d52602b838}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\helpers">
+      <UniqueIdentifier>{2366c516-0004-4ba4-8a63-6305a6e2a5ee}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\instantiations">
+      <UniqueIdentifier>{e8365fb9-ff6e-4056-afe1-8e05e44e51c8}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\utils">
+      <UniqueIdentifier>{8d104745-659c-4e7b-bcb7-e99ccbc4cfd9}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\api\toolsystem">
+      <UniqueIdentifier>{76754bbb-2c1a-48ce-b42f-3bb90bca73c5}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\wx">
+      <UniqueIdentifier>{59615882-401c-4a8a-89bf-1fda74deb548}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\wx\propiedades">
+      <UniqueIdentifier>{4d41e7bb-0cf3-4484-a4da-ea69d2e97872}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\wx\wxsqlite3">
+      <UniqueIdentifier>{2bd370c5-711d-4492-9355-5e2cad3f0655}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\wx\ginkgostyle">
+      <UniqueIdentifier>{393f4e29-abbf-45b8-9bd3-d2f3d6300a4e}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\wx\thumbnailctrl">
+      <UniqueIdentifier>{5293f338-c9b1-444d-9b4c-4c09ff83355c}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\wx\wizardginkgo">
+      <UniqueIdentifier>{01cf9be1-468b-4547-a213-bb5f1bcd3970}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\wx\maskedtextctrl">
+      <UniqueIdentifier>{1d9cf754-4fe6-4e90-afeb-0e680e10c10b}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\wx\gnkinforme">
+      <UniqueIdentifier>{7bed82c7-6dae-46db-b4c4-bf72b06d7732}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\sqlite">
+      <UniqueIdentifier>{5a4c33b0-bc45-4294-9216-c7bfd6672b4e}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\commands">
+      <UniqueIdentifier>{50172d9f-3f36-4cf4-a021-201ed76c9393}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\eventos">
+      <UniqueIdentifier>{ff9bc47d-3cb0-488a-8cbe-51c1069f9b4d}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\endpoint">
+      <UniqueIdentifier>{99029d94-0910-482c-89fe-0e55a5795287}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\widgets">
+      <UniqueIdentifier>{1e01a7e9-2058-41d3-a443-4bbf251210e6}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\widgets\gui">
+      <UniqueIdentifier>{f8e06817-ec48-4754-8f16-218d0277ae90}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\widgets\observers">
+      <UniqueIdentifier>{0716224a-1f97-4c67-93b9-daa972132244}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\prvext">
+      <UniqueIdentifier>{24b2e9ba-1d35-4c75-b410-8056c98ddc27}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\itk">
+      <UniqueIdentifier>{f059a651-6327-435b-ade6-b6e3ac1566b6}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\ginkgopro">
+      <UniqueIdentifier>{8f6dd983-a9b1-4bfd-a090-9316a9c044fe}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Resources">
+      <UniqueIdentifier>{84058894-9cd6-40e8-8ca6-06a17620a82e}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\ginkgocloud">
+      <UniqueIdentifier>{ba079f7f-f296-48ce-ac71-30020bd58f0c}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\jsoncpp">
+      <UniqueIdentifier>{fb888b2a-c4a1-4f89-8472-b8dbbcc9a059}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\jsoncpp\json">
+      <UniqueIdentifier>{4a4119bd-dcf4-44fc-b8e1-57b0546c0f29}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\main\gui\pacsupload">
+      <UniqueIdentifier>{c7885166-9571-4ea4-b065-ebc8245b951b}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="singleinstance.h">
+      <Filter>Source</Filter>
+    </ClInclude>
+    <ClInclude Include="stdafx.h">
+      <Filter>Source</Filter>
+    </ClInclude>
+    <ClInclude Include="main\entorno.h">
+      <Filter>Source\main</Filter>
+    </ClInclude>
+    <ClInclude Include="main\license.h">
+      <Filter>Source\main</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\angletool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\anonymizetool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\colormaptool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\cornerannotationstool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\detachwindowtool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\dicomizetool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\enabled_tools.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\exportdicomdirtool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\historytools.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\imageexporttool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\markertool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\metricgridtool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\notetool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\openfiletool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\openfoldertool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\openremovabletool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\pixelsbluringtool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\pointertool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\resettool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\rotateandfliptool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\ruletool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\sendpacstool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\showhistorytool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\showtagshistorytool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\showtagstool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\toolpan.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\toolslider.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\toolwindowlevel.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\toolzoom.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\trackballtool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\undotool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\videotool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\windowlayouttool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\coretools.h">
+      <Filter>Source\main\tools\autoregister</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\anonymizationcontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\configurationcontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladoracciones.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladorautenticacion.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladorbbddhl7.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladorcarga.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladorenviohl7.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladoreventos.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladorextensiones.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladorhl7.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladorinternacionalizacion.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladorlog.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladorpermisos.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\controladorvistas.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dicommanager.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\hangingprotocolcontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\historycontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\historytoolscontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\inactivitycontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\integrationcontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\pacscontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\parserxmlenglish.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\parserxmlspanish.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\permisoscore.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\thumbnailcontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomassociation.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomcustomassociation.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomechoassociation.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomfindassociation.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomgetassociation.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomimg2dcm.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicommoveassociation.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomnetclient.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomnetwork.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomprintassociation.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomservers.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomservice.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\dicomstoreassociation.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\ginkgouid.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\helpercompresion.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\helpers.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\istorecallback.h">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\ofstd\offile.h">
+      <Filter>Source\main\controllers\dcmtk\ofstd</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\d2dcommon.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\d2dsource.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\document2dcm.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\foooutpl.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2dimgs.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2djpgs.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2dles.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2doutpl.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2dplnsc.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2dplsc.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\i2dplvlp.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\libi2d\pdf2dsource.h">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\tls\gtlslayer.h">
+      <Filter>Source\main\controllers\dcmtk\tls</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\dcmtk\tls\tls.h">
+      <Filter>Source\main\controllers\dcmtk\tls</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\streaming\streamingloader.h">
+      <Filter>Source\main\controllers\streaming</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\log4cplus\guiappender.h">
+      <Filter>Source\main\controllers\log4cplus</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\log4cplus\logdefines.h">
+      <Filter>Source\main\controllers\log4cplus</Filter>
+    </ClInclude>
+    <ClInclude Include="main\managers\widgetsmanager.h">
+      <Filter>Source\main\managers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\droptargetmainwindow.h">
+      <Filter>Source\main\gui</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\wxprevisualizaciondicom.h">
+      <Filter>Source\main\gui</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\acquisition\dialogoadquisicion.h">
+      <Filter>Source\main\gui\acquisition</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\acquisition\dialogoadquisicionbase.h">
+      <Filter>Source\main\gui\acquisition</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\dialogoconfiguracion.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\panelconfiguracionestacion.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\panelconfiguracionextensiones.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\panelconfiguraciongeneral.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\panelconfiguracionhce.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\panelconfiguracionpacs.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\panelconfiguracionpermisos.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\panelconfiguracionseguridad.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\panelconfiguracionubicaciones.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\panelconfigurationanonymization.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\panelesconfiguracionginkgobase.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\export\datospersistentesexportacion.h">
+      <Filter>Source\main\gui\export</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\export\parametrosprincipales.h">
+      <Filter>Source\main\gui\export</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\export\pasosexportacionbase.h">
+      <Filter>Source\main\gui\export</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\export\wxwizardexportacionginkgo.h">
+      <Filter>Source\main\gui\export</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\hl7controlwindow\ventanacontrolhl7.h">
+      <Filter>Source\main\gui\hl7controlwindow</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\hl7controlwindow\ventanacontrolhl7base.h">
+      <Filter>Source\main\gui\hl7controlwindow</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\import\generaldata.h">
+      <Filter>Source\main\gui\import</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\import\importationdata.h">
+      <Filter>Source\main\gui\import</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\import\pasoperfilimportacion.h">
+      <Filter>Source\main\gui\import</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\import\pasosimportacionbase.h">
+      <Filter>Source\main\gui\import</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\import\selectimagesimportation.h">
+      <Filter>Source\main\gui\import</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\import\wxwizardimportacionginkgo.h">
+      <Filter>Source\main\gui\import</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\license\aboutdialog.h">
+      <Filter>Source\main\gui\license</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\license\aboutdialogbase.h">
+      <Filter>Source\main\gui\license</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\license\acceptlicensedialog.h">
+      <Filter>Source\main\gui\license</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\license\acceptlicensedialogbase.h">
+      <Filter>Source\main\gui\license</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\license\dialogolicenciasopensource.h">
+      <Filter>Source\main\gui\license</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\logcontrolwindow\ventanacontrollogs.h">
+      <Filter>Source\main\gui\logcontrolwindow</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\logcontrolwindow\ventanacontrollogsbase.h">
+      <Filter>Source\main\gui\logcontrolwindow</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\login\dialogologin.h">
+      <Filter>Source\main\gui\login</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\mainwindow\detacheddialog.h">
+      <Filter>Source\main\gui\mainwindow</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\mainwindow\ventanaprincipal.h">
+      <Filter>Source\main\gui\mainwindow</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\mainwindow\ventanaprincipalbase.h">
+      <Filter>Source\main\gui\mainwindow</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\open\abrir.h">
+      <Filter>Source\main\gui\open</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\open\opendialogs.h">
+      <Filter>Source\main\gui\open</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\open\opendialogsbase.h">
+      <Filter>Source\main\gui\open</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\paneltags\paneltags.h">
+      <Filter>Source\main\gui\paneltags</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\paneltags\paneltagsbase.h">
+      <Filter>Source\main\gui\paneltags</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\progress\paneltarea.h">
+      <Filter>Source\main\gui\progress</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\progress\progresobase.h">
+      <Filter>Source\main\gui\progress</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\progress\statusbarprogreso.h">
+      <Filter>Source\main\gui\progress</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\countdownmessage\countdownmessage.h">
+      <Filter>Source\main\gui\countdownmessage</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\countdownmessage\countdownmessagebase.h">
+      <Filter>Source\main\gui\countdownmessage</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\countdownmessage\inactivitycountdownmessage.h">
+      <Filter>Source\main\gui\countdownmessage</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\startup\startupform.h">
+      <Filter>Source\main\gui\startup</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\startup\startupformbase.h">
+      <Filter>Source\main\gui\startup</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\startup\startupview.h">
+      <Filter>Source\main\gui\startup</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\dicomdirexport\dicomdirexportbase.h">
+      <Filter>Source\main\gui\dicomdirexport</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\dicomdirexport\exportdicomdir.h">
+      <Filter>Source\main\gui\dicomdirexport</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\history3\confirmdeletedialog.h">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\history3\historypanel3.h">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\history3\historypanel3base.h">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\history3\historytoolmenu.h">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\history3\openwithdialog.h">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\history3\wxhistoryimagethumbnail.h">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\anonymize\anonymizedialog.h">
+      <Filter>Source\main\gui\anonymize</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\anonymize\anonymizepanelbase.h">
+      <Filter>Source\main\gui\anonymize</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\selectpacsserver\selectpacsserver.h">
+      <Filter>Source\main\gui\selectpacsserver</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\selectpacsserver\selectpacsserverbase.h">
+      <Filter>Source\main\gui\selectpacsserver</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\previewpanel\firstlevelpanel.h">
+      <Filter>Source\main\gui\previewpanel</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\previewpanel\ipreviewpanel.h">
+      <Filter>Source\main\gui\previewpanel</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\previewpanel\leafpanel.h">
+      <Filter>Source\main\gui\previewpanel</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\previewpanel\previewpanel.h">
+      <Filter>Source\main\gui\previewpanel</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\previewpanel\previewpanelbase.h">
+      <Filter>Source\main\gui\previewpanel</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\previewpanel\previewpanelmodel.h">
+      <Filter>Source\main\gui\previewpanel</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\toolsystem\wxmenuitemtool.h">
+      <Filter>Source\main\gui\toolsystem</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\dicomdirmigration\dicomdirmigration.h">
+      <Filter>Source\main\gui\dicomdirmigration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\dicomdirmigration\dicomdirmigrationbase.h">
+      <Filter>Source\main\gui\dicomdirmigration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\toolsystem\toolcontroller.h">
+      <Filter>Source\main\toolsystem</Filter>
+    </ClInclude>
+    <ClInclude Include="main\toolsystem\toolsregistry.h">
+      <Filter>Source\main\toolsystem</Filter>
+    </ClInclude>
+    <ClInclude Include="main\utils\ginkgomatrix4x4.h">
+      <Filter>Source\main\utils</Filter>
+    </ClInclude>
+    <ClInclude Include="vtk\vtkginkgoimageviewer.h">
+      <Filter>Source\vtk</Filter>
+    </ClInclude>
+    <ClInclude Include="vtk\vtkopenglginkgotexture.h">
+      <Filter>Source\vtk</Filter>
+    </ClInclude>
+    <ClInclude Include="vtk\vtkSmartVolumeMapper.h">
+      <Filter>Source\vtk</Filter>
+    </ClInclude>
+    <ClInclude Include="vtk\command\ginkgoimagecommand.h">
+      <Filter>Source\vtk\command</Filter>
+    </ClInclude>
+    <ClInclude Include="vtk\interactor\ginkgointeractorstyleimage2d.h">
+      <Filter>Source\vtk\interactor</Filter>
+    </ClInclude>
+    <ClInclude Include="vtk\widgets\widgetsactor.h">
+      <Filter>Source\vtk\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkINRIA3DConfigure.h">
+      <Filter>Source\VTKInria3D</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\vtkLookupTableManager.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\Asymmetry.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\BlackBody.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\Cardiac.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\Flow.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\GEColor.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\GrayRainbow.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\HotGreen.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\HotIron.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\HotMetal.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\LONI.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\LONI2.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\Spectrum.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\Stern.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\VRBones.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\VRMusclesBones.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\VRRedVessels.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\wxVTK\wxVTKRenderWindowInteractor.h">
+      <Filter>Source\VTKInria3D\wxVTK</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tagsprivadoscomunes.h">
+      <Filter>Source\export</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\iangletool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\icolormaptool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\icornerannotationstool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\idetachwindowtool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\iherramientascore.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\iimageprinttool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\imarkertool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\imetricgridtool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\inotetool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\ipixelsbluringtool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\ipointertool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\iresettool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\irotateandfliptool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\iruletool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\ishowhistorytool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\ishowtagstool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\itoolpan.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\itoolslider.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\itoolwindowlevel.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\itoolzoom.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\itrackballtool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\iundotool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\ivideotool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\iwindowlayouttool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\irulecontract.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\irulecontractable.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\islidercontract.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\islidercontractable.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\iviewcontract.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\iviewcontractable.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\iwidgetscontract.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\iwidgetscontractable.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\iwindowlayoutcontract.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\iwindowlayoutcontractable.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\iwindowlevelcontract.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\iwindowlevelcontractable.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="api\api.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\autoptr.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\globals.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\ibutton.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\icacheimagenes.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\icommand.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\iconfiguracion.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\icontexto.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\icontract.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\ientorno.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\ievento.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\iexception.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\ihistorytool.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\ihl7parser.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\ilock.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\imgproxy.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\imodelohl7.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\imodelointegracion.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\imodulo.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\init.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\initwx.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\internal.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\ioverlay.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\iproxynotificadorprogreso.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\istudycontext.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\iventanaprogreso.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\ivista.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\iwaitqueue.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\iwidgets.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\iwidgetsmanager.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\iwidgetsproperties.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\iwidgetsrenderer.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\iwizard.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\ubication.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\westilo.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\widgetserializable.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="api\observers\ieventsobserver.h">
+      <Filter>Source\api\observers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\observers\iextensionsobserver.h">
+      <Filter>Source\api\observers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\observers\iviewsobserver.h">
+      <Filter>Source\api\observers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\observers\iwidgetsobserver.h">
+      <Filter>Source\api\observers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\math\geometry.h">
+      <Filter>Source\api\math</Filter>
+    </ClInclude>
+    <ClInclude Include="api\math\geometry3d.h">
+      <Filter>Source\api\math</Filter>
+    </ClInclude>
+    <ClInclude Include="api\math\geometry_defs.h">
+      <Filter>Source\api\math</Filter>
+    </ClInclude>
+    <ClInclude Include="api\internationalization\internationalization.h">
+      <Filter>Source\api\internationalization</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\iconfigurationcontroller.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\icontroladoracciones.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\icontroladorautenticacion.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\icontroladorcarga.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\icontroladorextensiones.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\icontroladorinternacionalizacion.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\icontroladorlog.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\icontroladorpermisos.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\icontroladorvistas.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\ieventscontroller.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\ihistorycontroller.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\imodulecontroller.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\ipacscontroller.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\iprogresscontroller.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\proxies\ipipelineproperties.h">
+      <Filter>Source\api\controllers\proxies</Filter>
+    </ClInclude>
+    <ClInclude Include="api\dicom\dcmdictionary.h">
+      <Filter>Source\api\dicom</Filter>
+    </ClInclude>
+    <ClInclude Include="api\dicom\dcmuiddictionary.h">
+      <Filter>Source\api\dicom</Filter>
+    </ClInclude>
+    <ClInclude Include="api\dicom\dicomdataset.h">
+      <Filter>Source\api\dicom</Filter>
+    </ClInclude>
+    <ClInclude Include="api\dicom\idicom.h">
+      <Filter>Source\api\dicom</Filter>
+    </ClInclude>
+    <ClInclude Include="api\dicom\idicomconformance.h">
+      <Filter>Source\api\dicom</Filter>
+    </ClInclude>
+    <ClInclude Include="api\dicom\idicomizador.h">
+      <Filter>Source\api\dicom</Filter>
+    </ClInclude>
+    <ClInclude Include="api\dicom\idicommanager.h">
+      <Filter>Source\api\dicom</Filter>
+    </ClInclude>
+    <ClInclude Include="api\dicom\imodelodicom.h">
+      <Filter>Source\api\dicom</Filter>
+    </ClInclude>
+    <ClInclude Include="api\threads\thread.h">
+      <Filter>Source\api\threads</Filter>
+    </ClInclude>
+    <ClInclude Include="api\integration\dict.h">
+      <Filter>Source\api\integration</Filter>
+    </ClInclude>
+    <ClInclude Include="api\integration\template.h">
+      <Filter>Source\api\integration</Filter>
+    </ClInclude>
+    <ClInclude Include="api\helpers\aetwildcards.h">
+      <Filter>Source\api\helpers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\helpers\dcmdictionary.h">
+      <Filter>Source\api\helpers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\helpers\dcmuiddictionary.h">
+      <Filter>Source\api\helpers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\helpers\helpertexto.h">
+      <Filter>Source\api\helpers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\instantiations\instantiations.h">
+      <Filter>Source\api\instantiations</Filter>
+    </ClInclude>
+    <ClInclude Include="api\utils\iginkgomatrix4x4.h">
+      <Filter>Source\api\utils</Filter>
+    </ClInclude>
+    <ClInclude Include="api\toolsystem\itool.h">
+      <Filter>Source\api\toolsystem</Filter>
+    </ClInclude>
+    <ClInclude Include="api\toolsystem\itoolcontroller.h">
+      <Filter>Source\api\toolsystem</Filter>
+    </ClInclude>
+    <ClInclude Include="api\toolsystem\itoolsregistry.h">
+      <Filter>Source\api\toolsystem</Filter>
+    </ClInclude>
+    <ClInclude Include="api\toolsystem\iwidgettool.h">
+      <Filter>Source\api\toolsystem</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\propiedades\wxpropiedades.h">
+      <Filter>Source\wx\propiedades</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\propiedades\wxpropiedadesbase.h">
+      <Filter>Source\wx\propiedades</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\wxsqlite3\wxsqlite3.h">
+      <Filter>Source\wx\wxsqlite3</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\wxsqlite3\wxsqlite3def.h">
+      <Filter>Source\wx\wxsqlite3</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\wxsqlite3\wxsqlite3dyn.h">
+      <Filter>Source\wx\wxsqlite3</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\wxsqlite3\wxsqlite3opt.h">
+      <Filter>Source\wx\wxsqlite3</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\ginkgostyle\ginkgostyle.h">
+      <Filter>Source\wx\ginkgostyle</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\thumbnailctrl\thumbnailctrl.h">
+      <Filter>Source\wx\thumbnailctrl</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\thumbnailctrl\thumbnailwidget.h">
+      <Filter>Source\wx\thumbnailctrl</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\wizardginkgo\wxwizardginkgobase.h">
+      <Filter>Source\wx\wizardginkgo</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\wizardginkgo\wxwizardginkgobasewx.h">
+      <Filter>Source\wx\wizardginkgo</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\maskedtextctrl\maskedtextctrl.h">
+      <Filter>Source\wx\maskedtextctrl</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\gnkinforme\gnkinformebase.h">
+      <Filter>Source\wx\gnkinforme</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\gnkinforme\gnkinformebasewx.h">
+      <Filter>Source\wx\gnkinforme</Filter>
+    </ClInclude>
+    <ClInclude Include="sqlite\ginkgosqlite.h">
+      <Filter>Source\sqlite</Filter>
+    </ClInclude>
+    <ClInclude Include="sqlite\hl7sqlite.h">
+      <Filter>Source\sqlite</Filter>
+    </ClInclude>
+    <ClInclude Include="sqlite\seguridad.h">
+      <Filter>Source\sqlite</Filter>
+    </ClInclude>
+    <ClInclude Include="sqlite\sqlite3.h">
+      <Filter>Source\sqlite</Filter>
+    </ClInclude>
+    <ClInclude Include="sqlite\sqlite3ext.h">
+      <Filter>Source\sqlite</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\comandoactualizaciones.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\comandocalibrado.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\comandocarga.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\comandodestruirvista.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\comandoexportacion.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\comandoincluirhistorial.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\comandopacs.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\commandsynchronizewithgui.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\dbmigrationcommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\dialogopathssobreescribirbase.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\dicomizationcompletebase.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\dicomizecommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\exporttodicomdircommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\incomingdicomassociationcommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\inotificadorcalibrado.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\openremovableunit.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\sendhl7command.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\sendpacscommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\thumbnailscommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\eventosginkgo.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\hidesplashwindow.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\integration.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\mensajes.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\modificacionfichero.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\modificacionimagen.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\modificacionwidget.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\progresocomando.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\render.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\toolevents.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\updateavailable.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\views.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="endpoint\endpoint.h">
+      <Filter>Source\endpoint</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\openglhelper.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wangulo.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wanotacionesquina.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wanotacionposicion.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wchromacomplejo.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\welevacion.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\welipse.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wflecha.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wlupa.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wmarcadoarea.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wnota.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wpan.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wpunto.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wrectangulo.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wrejilla.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wrule.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wseleccion.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wslider.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wtrackball.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wtrapezoide.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wwindowlevel.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wzoom.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\gui\calibracion.h">
+      <Filter>Source\widgets\gui</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\gui\calibracionbase.h">
+      <Filter>Source\widgets\gui</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\gui\selecciontexto.h">
+      <Filter>Source\widgets\gui</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\gui\selecciontextobase.h">
+      <Filter>Source\widgets\gui</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\observers\iobservadorchroma.h">
+      <Filter>Source\widgets\observers</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\observers\iobservadorchromacomplejo.h">
+      <Filter>Source\widgets\observers</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\observers\iobservadormarcadoarea.h">
+      <Filter>Source\widgets\observers</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\observers\iobservadorwindowlevel.h">
+      <Filter>Source\widgets\observers</Filter>
+    </ClInclude>
+    <ClInclude Include="prvext\prvext.h">
+      <Filter>Source\prvext</Filter>
+    </ClInclude>
+    <ClInclude Include="itk\itkImageToVTKImageFilter.h">
+      <Filter>Source\itk</Filter>
+    </ClInclude>
+    <ClInclude Include="itk\itkRGBImageToVTKImageFilter.h">
+      <Filter>Source\itk</Filter>
+    </ClInclude>
+    <ClInclude Include="itk\itkVTKImageToImageFilter.h">
+      <Filter>Source\itk</Filter>
+    </ClInclude>
+    <ClInclude Include="ginkgopro\ginkgo_pro_defines.h">
+      <Filter>Source\ginkgopro</Filter>
+    </ClInclude>
+    <ClInclude Include="ginkgopro\ico_logo_background.h">
+      <Filter>Source\ginkgopro</Filter>
+    </ClInclude>
+    <ClInclude Include="ginkgopro\ico_logo_splash.h">
+      <Filter>Source\ginkgopro</Filter>
+    </ClInclude>
+    <ClInclude Include="ginkgopro\icons.h">
+      <Filter>Source\ginkgopro</Filter>
+    </ClInclude>
+    <ClInclude Include="resources\ginkgoresourcesmanager.h">
+      <Filter>Resources</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\hangingprotocolconfigurationpanel.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\windowattributescontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\pacsdownloadcommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\linkhistorycommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\history3\synchronizedialog.h">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\synchronizationcommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\icommandcontroller.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\commandcontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\isecondarycapturetool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\secondarycapturetool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\secondarycapturedicomizecommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="eventos\scgenerated.h">
+      <Filter>Source\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\ipacsuploadtool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\pacsuploadtool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\istartdicomizationtool.h">
+      <Filter>Source\export</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\startdicomizationtool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\addfiletohistorytool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\iaddfiletohistorytool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\anonymize\anonymizepanel.h">
+      <Filter>Source\main\gui\anonymize</Filter>
+    </ClInclude>
+    <ClInclude Include="api\cloud.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\openginkgocloudlinktool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\ginkgocloud\downloadcloudbase.h">
+      <Filter>Source\main\gui\ginkgocloud</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\ginkgocloud\openginkgoclouddialog.h">
+      <Filter>Source\main\gui\ginkgocloud</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\cloudcommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="jsoncpp\json_batchallocator.h">
+      <Filter>Source\jsoncpp</Filter>
+    </ClInclude>
+    <ClInclude Include="jsoncpp\json\autolink.h">
+      <Filter>Source\jsoncpp\json</Filter>
+    </ClInclude>
+    <ClInclude Include="jsoncpp\json\config.h">
+      <Filter>Source\jsoncpp\json</Filter>
+    </ClInclude>
+    <ClInclude Include="jsoncpp\json\features.h">
+      <Filter>Source\jsoncpp\json</Filter>
+    </ClInclude>
+    <ClInclude Include="jsoncpp\json\forwards.h">
+      <Filter>Source\jsoncpp\json</Filter>
+    </ClInclude>
+    <ClInclude Include="jsoncpp\json\json.h">
+      <Filter>Source\jsoncpp\json</Filter>
+    </ClInclude>
+    <ClInclude Include="jsoncpp\json\reader.h">
+      <Filter>Source\jsoncpp\json</Filter>
+    </ClInclude>
+    <ClInclude Include="jsoncpp\json\value.h">
+      <Filter>Source\jsoncpp\json</Filter>
+    </ClInclude>
+    <ClInclude Include="jsoncpp\json\writer.h">
+      <Filter>Source\jsoncpp\json</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\ginkgocloud\ginkgocloudsearchdialog.h">
+      <Filter>Source\main\gui\ginkgocloud</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\ginkgocloud\filelinkdialog.h">
+      <Filter>Source\main\gui\ginkgocloud</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\pdfextractercommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\icopyimagetoclipboardtool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\copyimagetoclipboardtool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wstaticrule.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\acquisition\downloadagaindialog.h">
+      <Filter>Source\main\gui\acquisition</Filter>
+    </ClInclude>
+    <ClInclude Include="api\dicom\icustomassociation.h">
+      <Filter>Source\api\dicom</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\autocleaningcommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\autocleaningcontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\localdatabaseconfigurationpanel.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\striptexthelper.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\ipixelsbluringcontract.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\contracts\ipixelsbluringcontractable.h">
+      <Filter>Source\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\iqueryretrievetool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\searchginkgocloudhistorytool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\queryretrievehistorytool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\queryretrievetool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\icamerarotationtool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\camerarotationtool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wcamerarotation.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\ibrightnesscontrasttool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\brightnesscontrasttool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wbrightnesscontrast.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="VTKInria3D\vtkVISUManagement\lut\PERFUSION.h">
+      <Filter>Source\VTKInria3D\vtkVISUManagement\lut</Filter>
+    </ClInclude>
+    <ClInclude Include="api\iannotator.h">
+      <Filter>Source\api</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\modalitysettingscontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\defaultmodalitysettingsconfigurationpanel.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="commands\acquirefromurlcommand.h">
+      <Filter>Source\commands</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\anonusagestats.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="api\controllers\anonusagestatsids.h">
+      <Filter>Source\api\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="wx\wxginkgotoolbar.h">
+      <Filter>Source\wx</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\history3\historytablemodel.h">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\toolsystem\ginkgotoolsystembar.h">
+      <Filter>Source\main\gui\toolsystem</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\acquisition\acquisitiontablemodel.h">
+      <Filter>Source\main\gui\acquisition</Filter>
+    </ClInclude>
+    <ClInclude Include="export\tools\isimpleprinttool.h">
+      <Filter>Source\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\tools\simpleprinttool.h">
+      <Filter>Source\main\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\open\dicomdirtablemodel.h">
+      <Filter>Source\main\gui\open</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\configuration\smartretrieveconfigurationpanel.h">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\smartretrievecontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\controllers\storedqueriescontroller.h">
+      <Filter>Source\main\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\pacsupload\pacsuploaddialog.h">
+      <Filter>Source\main\gui\pacsupload</Filter>
+    </ClInclude>
+    <ClInclude Include="main\gui\pacsupload\pacsuploaddialogbase.h">
+      <Filter>Source\main\gui\pacsupload</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wfreeform.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wpolygon.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="widgets\wtextbox.h">
+      <Filter>Source\widgets</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="stdafx.cpp">
+      <Filter>Source</Filter>
+    </ClCompile>
+    <ClCompile Include="main\entorno.cpp">
+      <Filter>Source\main</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\angletool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\anonymizetool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\colormaptool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\cornerannotationstool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\detachwindowtool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\dicomizetool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\exportdicomdirtool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\imageexporttool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\markertool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\metricgridtool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\notetool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\openfiletool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\openfoldertool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\openremovabletool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\pixelsbluringtool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\pointertool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\resettool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\rotateandfliptool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\ruletool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\sendpacstool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\showhistorytool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\showtagshistorytool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\showtagstool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\toolpan.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\toolslider.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\toolwindowlevel.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\toolzoom.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\trackballtool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\undotool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\videotool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\windowlayouttool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\coretools.cpp">
+      <Filter>Source\main\tools\autoregister</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\anonymizationcontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\configurationcontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladoracciones.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladorautenticacion.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladorbbddhl7.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladorcarga.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladorenviohl7.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladoreventos.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladorextensiones.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladorhl7.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladorinternacionalizacion.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladorlog.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladorpermisos.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\controladorvistas.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dicommanager.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\hangingprotocolcontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\historycontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\historytoolscontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\inactivitycontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\integrationcontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\pacscontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\parserxmlenglish.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\parserxmlspanish.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\thumbnailcontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicomassociation.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicomcustomassociation.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicomechoassociation.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicomfindassociation.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicomgetassociation.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicomimg2dcm.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicommoveassociation.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicomnetwork.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicomprintassociation.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicomservers.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicomservice.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\dicomstoreassociation.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\ginkgouid.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\helpercompresion.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\helpers.cpp">
+      <Filter>Source\main\controllers\dcmtk</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\libi2d\d2dcommon.cpp">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\libi2d\document2dcm.cpp">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2dimgs.cpp">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2djpgs.cpp">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2dles.cpp">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2dplnsc.cpp">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2dplsc.cpp">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\libi2d\i2dplvlp.cpp">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\libi2d\pdf2dsource.cpp">
+      <Filter>Source\main\controllers\dcmtk\libi2d</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\tls\gtlslayer.cc">
+      <Filter>Source\main\controllers\dcmtk\tls</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\tls\win-only\tlslayer.cc">
+      <Filter>Source\main\controllers\dcmtk\tls\win-only</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\tls\win-only\tlsscu.cc">
+      <Filter>Source\main\controllers\dcmtk\tls\win-only</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\dcmtk\tls\win-only\tlstrans.cc">
+      <Filter>Source\main\controllers\dcmtk\tls\win-only</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\streaming\streamingloader.cpp">
+      <Filter>Source\main\controllers\streaming</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\log4cplus\guiappender.cpp">
+      <Filter>Source\main\controllers\log4cplus</Filter>
+    </ClCompile>
+    <ClCompile Include="main\managers\widgetsmanager.cpp">
+      <Filter>Source\main\managers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\droptargetmainwindow.cpp">
+      <Filter>Source\main\gui</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\wxprevisualizaciondicom.cpp">
+      <Filter>Source\main\gui</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\acquisition\dialogoadquisicion.cpp">
+      <Filter>Source\main\gui\acquisition</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\acquisition\dialogoadquisicionbase.cpp">
+      <Filter>Source\main\gui\acquisition</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\dialogoconfiguracion.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\panelconfiguracionestacion.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\panelconfiguracionextensiones.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\panelconfiguraciongeneral.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\panelconfiguracionhce.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\panelconfiguracionpacs.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\panelconfiguracionpermisos.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\panelconfiguracionseguridad.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\panelconfiguracionubicaciones.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\panelconfigurationanonymization.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\panelesconfiguracionginkgobase.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\export\parametrosprincipales.cpp">
+      <Filter>Source\main\gui\export</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\export\pasosexportacionbase.cpp">
+      <Filter>Source\main\gui\export</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\export\wxwizardexportacionginkgo.cpp">
+      <Filter>Source\main\gui\export</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\hl7controlwindow\ventanacontrolhl7.cpp">
+      <Filter>Source\main\gui\hl7controlwindow</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\hl7controlwindow\ventanacontrolhl7base.cpp">
+      <Filter>Source\main\gui\hl7controlwindow</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\import\generaldata.cpp">
+      <Filter>Source\main\gui\import</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\import\pasoperfilimportacion.cpp">
+      <Filter>Source\main\gui\import</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\import\pasosimportacionbase.cpp">
+      <Filter>Source\main\gui\import</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\import\selectimagesimportation.cpp">
+      <Filter>Source\main\gui\import</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\import\wxwizardimportacionginkgo.cpp">
+      <Filter>Source\main\gui\import</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\license\aboutdialog.cpp">
+      <Filter>Source\main\gui\license</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\license\aboutdialogbase.cpp">
+      <Filter>Source\main\gui\license</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\license\acceptlicensedialog.cpp">
+      <Filter>Source\main\gui\license</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\license\acceptlicensedialogbase.cpp">
+      <Filter>Source\main\gui\license</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\license\dialogolicenciasopensource.cpp">
+      <Filter>Source\main\gui\license</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\logcontrolwindow\ventanacontrollogs.cpp">
+      <Filter>Source\main\gui\logcontrolwindow</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\logcontrolwindow\ventanacontrollogsbase.cpp">
+      <Filter>Source\main\gui\logcontrolwindow</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\login\dialogologin.cpp">
+      <Filter>Source\main\gui\login</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\mainwindow\detacheddialog.cpp">
+      <Filter>Source\main\gui\mainwindow</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\mainwindow\ventanaprincipal.cpp">
+      <Filter>Source\main\gui\mainwindow</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\mainwindow\ventanaprincipalbase.cpp">
+      <Filter>Source\main\gui\mainwindow</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\open\abrir.cpp">
+      <Filter>Source\main\gui\open</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\open\opendialogs.cpp">
+      <Filter>Source\main\gui\open</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\open\opendialogsbase.cpp">
+      <Filter>Source\main\gui\open</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\paneltags\paneltags.cpp">
+      <Filter>Source\main\gui\paneltags</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\paneltags\paneltagsbase.cpp">
+      <Filter>Source\main\gui\paneltags</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\progress\paneltarea.cpp">
+      <Filter>Source\main\gui\progress</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\progress\progresobase.cpp">
+      <Filter>Source\main\gui\progress</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\progress\statusbarprogreso.cpp">
+      <Filter>Source\main\gui\progress</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\countdownmessage\countdownmessage.cpp">
+      <Filter>Source\main\gui\countdownmessage</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\countdownmessage\countdownmessagebase.cpp">
+      <Filter>Source\main\gui\countdownmessage</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\countdownmessage\inactivitycountdownmessage.cpp">
+      <Filter>Source\main\gui\countdownmessage</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\startup\startupform.cpp">
+      <Filter>Source\main\gui\startup</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\startup\startupformbase.cpp">
+      <Filter>Source\main\gui\startup</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\startup\startupview.cpp">
+      <Filter>Source\main\gui\startup</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\dicomdirexport\dicomdirexportbase.cpp">
+      <Filter>Source\main\gui\dicomdirexport</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\dicomdirexport\exportdicomdir.cpp">
+      <Filter>Source\main\gui\dicomdirexport</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\history3\historypanel3.cpp">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\history3\historypanel3base.cpp">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\history3\historytoolmenu.cpp">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\history3\wxhistoryimagethumbnail.cpp">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\anonymize\anonymizedialog.cpp">
+      <Filter>Source\main\gui\anonymize</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\anonymize\anonymizepanelbase.cpp">
+      <Filter>Source\main\gui\anonymize</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\selectpacsserver\selectpacsserver.cpp">
+      <Filter>Source\main\gui\selectpacsserver</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\selectpacsserver\selectpacsserverbase.cpp">
+      <Filter>Source\main\gui\selectpacsserver</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\previewpanel\firstlevelpanel.cpp">
+      <Filter>Source\main\gui\previewpanel</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\previewpanel\leafpanel.cpp">
+      <Filter>Source\main\gui\previewpanel</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\previewpanel\previewpanel.cpp">
+      <Filter>Source\main\gui\previewpanel</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\previewpanel\previewpanelbase.cpp">
+      <Filter>Source\main\gui\previewpanel</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\toolsystem\wxmenuitemtool.cpp">
+      <Filter>Source\main\gui\toolsystem</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\dicomdirmigration\dicomdirmigration.cpp">
+      <Filter>Source\main\gui\dicomdirmigration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\dicomdirmigration\dicomdirmigrationbase.cpp">
+      <Filter>Source\main\gui\dicomdirmigration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\toolsystem\toolcontroller.cpp">
+      <Filter>Source\main\toolsystem</Filter>
+    </ClCompile>
+    <ClCompile Include="main\toolsystem\toolsregistry.cpp">
+      <Filter>Source\main\toolsystem</Filter>
+    </ClCompile>
+    <ClCompile Include="main\utils\ginkgomatrix4x4.cpp">
+      <Filter>Source\main\utils</Filter>
+    </ClCompile>
+    <ClCompile Include="vtk\vtkginkgoimageviewer.cpp">
+      <Filter>Source\vtk</Filter>
+    </ClCompile>
+    <ClCompile Include="vtk\vtkopenglginkgotexture.cpp">
+      <Filter>Source\vtk</Filter>
+    </ClCompile>
+    <ClCompile Include="vtk\vtkSmartVolumeMapper.cxx">
+      <Filter>Source\vtk</Filter>
+    </ClCompile>
+    <ClCompile Include="vtk\command\ginkgoimagecommand.cpp">
+      <Filter>Source\vtk\command</Filter>
+    </ClCompile>
+    <ClCompile Include="vtk\interactor\ginkgointeractorstyleimage2d.cpp">
+      <Filter>Source\vtk\interactor</Filter>
+    </ClCompile>
+    <ClCompile Include="vtk\widgets\widgetsactor.cpp">
+      <Filter>Source\vtk\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="VTKInria3D\vtkVISUManagement\vtkLookupTableManager.cpp">
+      <Filter>Source\VTKInria3D\vtkVISUManagement</Filter>
+    </ClCompile>
+    <ClCompile Include="VTKInria3D\wxVTK\wxVTKRenderWindowInteractor.cpp">
+      <Filter>Source\VTKInria3D\wxVTK</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\iangletool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\icolormaptool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\icornerannotationstool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\idetachwindowtool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\iimageexporttool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\imarkertool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\imetricgridtool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\inotetool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\ipixelsbluringtool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\ipointertool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\iresettool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\irotateandfliptool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\iruletool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\ishowhistorytool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\ishowtagstool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\itoolpan.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\itoolslider.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\itoolwindowlevel.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\itoolzoom.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\itrackballtool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\iundotool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\ivideotool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\iwindowlayouttool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\irulecontract.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\irulecontractable.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\islidercontract.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\islidercontractable.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\iviewcontract.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\iviewcontractable.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\iwidgetscontract.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\iwidgetscontractable.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\iwindowlayoutcontract.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\iwindowlayoutcontractable.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\iwindowlevelcontract.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\iwindowlevelcontractable.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="api\autoptr.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\ibutton.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\icommand.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\icontexto.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\icontract.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\ientorno.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\ievento.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\iexception.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\ihistorytool.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\ihl7parser.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\ilock.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\imodelohl7.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\imodelointegracion.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\init.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\initwx.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\istudycontext.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\ivista.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\iwaitqueue.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\iwidgets.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\iwidgetsmanager.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\iwidgetsrenderer.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\iwizard.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\ubication.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\widgetserializable.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="api\observers\ieventsobserver.cpp">
+      <Filter>Source\api\observers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\observers\iextensionsobserver.cpp">
+      <Filter>Source\api\observers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\internationalization\internationalization.cpp">
+      <Filter>Source\api\internationalization</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\iconfigurationcontroller.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\icontroladoracciones.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\icontroladorlog.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\icontroladorpermisos.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\icontroladorvistas.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\ieventscontroller.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\ihistorycontroller.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\imodulecontroller.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\ipacscontroller.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\iprogresscontroller.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\dicom\dicomdataset.cpp">
+      <Filter>Source\api\dicom</Filter>
+    </ClCompile>
+    <ClCompile Include="api\dicom\idicomconformance.cpp">
+      <Filter>Source\api\dicom</Filter>
+    </ClCompile>
+    <ClCompile Include="api\threads\thread.cpp">
+      <Filter>Source\api\threads</Filter>
+    </ClCompile>
+    <ClCompile Include="api\helpers\aetwildcards.cpp">
+      <Filter>Source\api\helpers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\helpers\helpertexto.cpp">
+      <Filter>Source\api\helpers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\utils\iginkgomatrix4x4.cpp">
+      <Filter>Source\api\utils</Filter>
+    </ClCompile>
+    <ClCompile Include="api\toolsystem\itool.cpp">
+      <Filter>Source\api\toolsystem</Filter>
+    </ClCompile>
+    <ClCompile Include="api\toolsystem\itoolcontroller.cpp">
+      <Filter>Source\api\toolsystem</Filter>
+    </ClCompile>
+    <ClCompile Include="api\toolsystem\itoolsregistry.cpp">
+      <Filter>Source\api\toolsystem</Filter>
+    </ClCompile>
+    <ClCompile Include="api\toolsystem\iwidgettool.cpp">
+      <Filter>Source\api\toolsystem</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\propiedades\wxpropiedades.cpp">
+      <Filter>Source\wx\propiedades</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\propiedades\wxpropiedadesbase.cpp">
+      <Filter>Source\wx\propiedades</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\wxsqlite3\wxsqlite3.cpp">
+      <Filter>Source\wx\wxsqlite3</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\ginkgostyle\ginkgostyle.cpp">
+      <Filter>Source\wx\ginkgostyle</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\thumbnailctrl\thumbnailctrl.cpp">
+      <Filter>Source\wx\thumbnailctrl</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\thumbnailctrl\thumbnailwidget.cpp">
+      <Filter>Source\wx\thumbnailctrl</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\wizardginkgo\wxwizardginkgobase.cpp">
+      <Filter>Source\wx\wizardginkgo</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\wizardginkgo\wxwizardginkgobasewx.cpp">
+      <Filter>Source\wx\wizardginkgo</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\maskedtextctrl\maskedtextctrl.cpp">
+      <Filter>Source\wx\maskedtextctrl</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\gnkinforme\gnkinformebase.cpp">
+      <Filter>Source\wx\gnkinforme</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\gnkinforme\gnkinformebasewx.cpp">
+      <Filter>Source\wx\gnkinforme</Filter>
+    </ClCompile>
+    <ClCompile Include="sqlite\sqlite3.c">
+      <Filter>Source\sqlite</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\comandoactualizaciones.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\comandocalibrado.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\comandocarga.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\comandodestruirvista.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\comandoexportacion.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\comandoincluirhistorial.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\comandopacs.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\commandsynchronizewithgui.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\dbmigrationcommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\dialogopathssobreescribirbase.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\dicomizationcompletebase.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\dicomizecommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\exporttodicomdircommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\incomingdicomassociationcommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\openremovableunit.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\sendhl7command.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\sendpacscommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\thumbnailscommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="endpoint\address.cpp">
+      <Filter>Source\endpoint</Filter>
+    </ClCompile>
+    <ClCompile Include="endpoint\endpoint.cpp">
+      <Filter>Source\endpoint</Filter>
+    </ClCompile>
+    <ClCompile Include="endpoint\inet_ntop.c">
+      <Filter>Source\endpoint</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\openglhelper.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wangulo.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wanotacionesquina.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wanotacionposicion.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wchromacomplejo.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\welevacion.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\welipse.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wflecha.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wlupa.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wmarcadoarea.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wnota.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wpan.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wpunto.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wrectangulo.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wrejilla.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wrule.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wseleccion.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wslider.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wtrackball.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wtrapezoide.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wwindowlevel.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wzoom.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\gui\calibracion.cpp">
+      <Filter>Source\widgets\gui</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\gui\calibracionbase.cpp">
+      <Filter>Source\widgets\gui</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\gui\selecciontexto.cpp">
+      <Filter>Source\widgets\gui</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\gui\selecciontextobase.cpp">
+      <Filter>Source\widgets\gui</Filter>
+    </ClCompile>
+    <ClCompile Include="resources\ginkgoresourcesmanager.cpp">
+      <Filter>Resources</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\hangingprotocolconfigurationpanel.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\windowattributescontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\pacsdownloadcommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\linkhistorycommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\history3\synchronizedialog.cpp">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\synchronizationcommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\icommandcontroller.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\commandcontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\isecondarycapturetool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\secondarycapturetool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\secondarycapturedicomizecommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\ipacsuploadtool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\pacsuploadtool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\istartdicomizationtool.cpp">
+      <Filter>Source\export</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\startdicomizationtool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\addfiletohistorytool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\iaddfiletohistorytool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\openginkgocloudlinktool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\ginkgocloud\downloadcloudbase.cpp">
+      <Filter>Source\main\gui\ginkgocloud</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\ginkgocloud\openginkgoclouddialog.cpp">
+      <Filter>Source\main\gui\ginkgocloud</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\cloudcommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="jsoncpp\json_reader.cpp">
+      <Filter>Source\jsoncpp</Filter>
+    </ClCompile>
+    <ClCompile Include="jsoncpp\json_value.cpp">
+      <Filter>Source\jsoncpp</Filter>
+    </ClCompile>
+    <ClCompile Include="jsoncpp\json_writer.cpp">
+      <Filter>Source\jsoncpp</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\ginkgocloud\ginkgocloudsearchdialog.cpp">
+      <Filter>Source\main\gui\ginkgocloud</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\ginkgocloud\filelinkdialog.cpp">
+      <Filter>Source\main\gui\ginkgocloud</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\pdfextractercommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\icopyimagetoclipboardtool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\copyimagetoclipboardtool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\anonymize\anonymizepanel.cpp">
+      <Filter>Source\main\gui\anonymize</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wstaticrule.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\acquisition\downloadagaindialog.cpp">
+      <Filter>Source\main\gui\acquisition</Filter>
+    </ClCompile>
+    <ClCompile Include="api\dicom\icustomassociation.cpp">
+      <Filter>Source\api\dicom</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\icontroladorcarga.cpp">
+      <Filter>Source\api\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\controllers\proxies\ipipelineproperties.cpp">
+      <Filter>Source\api\controllers\proxies</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\autocleaningcommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\localdatabaseconfigurationpanel.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\striptexthelper.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\ipixelsbluringcontract.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\contracts\ipixelsbluringcontractable.cpp">
+      <Filter>Source\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\iqueryretrievetool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\searchginkgocloudhistorytool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\queryretrievehistorytool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\queryretrievetool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\icamerarotationtool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\camerarotationtool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wcamerarotation.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\ibrightnesscontrasttool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\brightnesscontrasttool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wbrightnesscontrast.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\anonymize\anonymizepanel.cpp">
+      <Filter>Source\main\gui\anonymize</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\autocleaningcontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="api\iannotator.cpp">
+      <Filter>Source\api</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\modalitysettingscontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\defaultmodalitysettingsconfigurationpanel.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="api\dicom\idicom.cpp">
+      <Filter>Source\api\dicom</Filter>
+    </ClCompile>
+    <ClCompile Include="commands\acquirefromurlcommand.cpp">
+      <Filter>Source\commands</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\anonusagestats.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\history3\historytablemodel.cpp">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\history3\historytablemodel.cpp">
+      <Filter>Source\main\gui\history3</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\toolsystem\ginkgotoolsystembar.cpp">
+      <Filter>Source\main\gui\toolsystem</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\acquisition\acquisitiontablemodel.cpp">
+      <Filter>Source\main\gui\acquisition</Filter>
+    </ClCompile>
+    <ClCompile Include="wx\wxginkgotoolbar.cpp">
+      <Filter>Source\wx</Filter>
+    </ClCompile>
+    <ClCompile Include="export\tools\isimpleprinttool.cpp">
+      <Filter>Source\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\tools\simpleprinttool.cpp">
+      <Filter>Source\main\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\open\dicomdirtablemodel.cpp">
+      <Filter>Source\main\gui\open</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\configuration\smartretrieveconfigurationpanel.cpp">
+      <Filter>Source\main\gui\configuration</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\smartretrievecontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\controllers\storedqueriescontroller.cpp">
+      <Filter>Source\main\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\pacsupload\pacsuploaddialog.cpp">
+      <Filter>Source\main\gui\pacsupload</Filter>
+    </ClCompile>
+    <ClCompile Include="main\gui\pacsupload\pacsuploaddialogbase.cpp">
+      <Filter>Source\main\gui\pacsupload</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wfreeform.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wpolygon.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="widgets\wtextbox.cpp">
+      <Filter>Source\widgets</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <CustomBuild Include="resources\conformance.xml">
+      <Filter>Resources</Filter>
+    </CustomBuild>
+    <CustomBuild Include="resources\test_card.dcm">
+      <Filter>Resources</Filter>
+    </CustomBuild>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="jsoncpp\json_internalarray.inl">
+      <Filter>Source\jsoncpp</Filter>
+    </None>
+    <None Include="jsoncpp\json_internalmap.inl">
+      <Filter>Source\jsoncpp</Filter>
+    </None>
+    <None Include="jsoncpp\json_valueiterator.inl">
+      <Filter>Source\jsoncpp</Filter>
+    </None>
+    <None Include="..\lib_derma\lib_derma_pasi\libderma_pasi.vcproj" />
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/cadxcore/commands/DialogoPathsSobreescribir.fbp b/cadxcore/commands/DialogoPathsSobreescribir.fbp
new file mode 100644
index 0000000..0167d11
--- /dev/null
+++ b/cadxcore/commands/DialogoPathsSobreescribir.fbp
@@ -0,0 +1,560 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="10" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">dialogopathssobreescribirbase</property>
+        <property name="first_id">1052</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">DialogoPathsSobreescribir</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">700,209</property>
+            <property name="name">OverwriteDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Overwrite Paths</property>
+            <property name="tooltip"></property>
+            <property name="validator_data_type"></property>
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer3</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pBody</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer6</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pPanelOverwrite</property>
+                                    <property name="permission">public</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="tooltip">Overwrite</property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer31</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">0</property>
+                                            <property name="flag"></property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label"></property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pTextMessage</property>
+                                                <property name="permission">public</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">10</property>
+                                            <property name="flag">wxBOTTOM</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="bg"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Would you like to overwrite them?</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_staticText1</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">440</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxTOP</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxListBox" expanded="0">
+                                                <property name="bg"></property>
+                                                <property name="choices"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">1</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pPathList</property>
+                                                <property name="permission">public</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnListBox"></event>
+                                                <event name="OnListBoxDClick"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pFooter</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer4</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Overwrite</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_button1</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_button2</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/commands/DicomizationComplete.fbp b/cadxcore/commands/DicomizationComplete.fbp
new file mode 100644
index 0000000..77baf5c
--- /dev/null
+++ b/cadxcore/commands/DicomizationComplete.fbp
@@ -0,0 +1,500 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">dicomizationcompletebase</property>
+        <property name="first_id">1052</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">DicomizationComplete</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header" />
+        <property name="relative_path">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="bg" />
+            <property name="center">wxBOTH</property>
+            <property name="context_help" />
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style" />
+            <property name="fg" />
+            <property name="font" />
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size" />
+            <property name="minimum_size">500,250</property>
+            <property name="name">DicomizationCompleteBase</property>
+            <property name="pos" />
+            <property name="size">-1,-1</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass" />
+            <property name="title">Dicomization complete</property>
+            <property name="tooltip" />
+            <property name="validator_data_type" />
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable" />
+            <property name="window_extra_style" />
+            <property name="window_name" />
+            <property name="window_style" />
+            <event name="OnActivate" />
+            <event name="OnActivateApp" />
+            <event name="OnChar" />
+            <event name="OnClose" />
+            <event name="OnEnterWindow" />
+            <event name="OnEraseBackground" />
+            <event name="OnHibernate" />
+            <event name="OnIconize" />
+            <event name="OnIdle" />
+            <event name="OnInitDialog" />
+            <event name="OnKeyDown" />
+            <event name="OnKeyUp" />
+            <event name="OnKillFocus" />
+            <event name="OnLeaveWindow" />
+            <event name="OnLeftDClick" />
+            <event name="OnLeftDown" />
+            <event name="OnLeftUp" />
+            <event name="OnMiddleDClick" />
+            <event name="OnMiddleDown" />
+            <event name="OnMiddleUp" />
+            <event name="OnMotion" />
+            <event name="OnMouseEvents" />
+            <event name="OnMouseWheel" />
+            <event name="OnPaint" />
+            <event name="OnRightDClick" />
+            <event name="OnRightDown" />
+            <event name="OnRightUp" />
+            <event name="OnSetFocus" />
+            <event name="OnSize" />
+            <event name="OnUpdateUI" />
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size" />
+                <property name="name">bSizer3</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="bg">0,0,0</property>
+                        <property name="context_help" />
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg" />
+                        <property name="font" />
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size" />
+                        <property name="minimum_size" />
+                        <property name="name">m_pHeader</property>
+                        <property name="permission">protected</property>
+                        <property name="pos" />
+                        <property name="size" />
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip">Dicomization complete</property>
+                        <property name="validator_data_type" />
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable" />
+                        <property name="window_extra_style" />
+                        <property name="window_name" />
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar" />
+                        <event name="OnEnterWindow" />
+                        <event name="OnEraseBackground" />
+                        <event name="OnKeyDown" />
+                        <event name="OnKeyUp" />
+                        <event name="OnKillFocus" />
+                        <event name="OnLeaveWindow" />
+                        <event name="OnLeftDClick" />
+                        <event name="OnLeftDown" />
+                        <event name="OnLeftUp" />
+                        <event name="OnMiddleDClick" />
+                        <event name="OnMiddleDown" />
+                        <event name="OnMiddleUp" />
+                        <event name="OnMotion" />
+                        <event name="OnMouseEvents" />
+                        <event name="OnMouseWheel" />
+                        <event name="OnPaint" />
+                        <event name="OnRightDClick" />
+                        <event name="OnRightDown" />
+                        <event name="OnRightUp" />
+                        <event name="OnSetFocus" />
+                        <event name="OnSize" />
+                        <event name="OnUpdateUI" />
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg" />
+                        <property name="context_help" />
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg" />
+                        <property name="font" />
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size" />
+                        <property name="minimum_size">-1,-1</property>
+                        <property name="name">m_pBodyPanel</property>
+                        <property name="permission">protected</property>
+                        <property name="pos" />
+                        <property name="size" />
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip" />
+                        <property name="validator_data_type" />
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable" />
+                        <property name="window_extra_style" />
+                        <property name="window_name" />
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar" />
+                        <event name="OnEnterWindow" />
+                        <event name="OnEraseBackground" />
+                        <event name="OnKeyDown" />
+                        <event name="OnKeyUp" />
+                        <event name="OnKillFocus" />
+                        <event name="OnLeaveWindow" />
+                        <event name="OnLeftDClick" />
+                        <event name="OnLeftDown" />
+                        <event name="OnLeftUp" />
+                        <event name="OnMiddleDClick" />
+                        <event name="OnMiddleDown" />
+                        <event name="OnMiddleUp" />
+                        <event name="OnMotion" />
+                        <event name="OnMouseEvents" />
+                        <event name="OnMouseWheel" />
+                        <event name="OnPaint" />
+                        <event name="OnRightDClick" />
+                        <event name="OnRightDown" />
+                        <event name="OnRightUp" />
+                        <event name="OnSetFocus" />
+                        <event name="OnSize" />
+                        <event name="OnUpdateUI" />
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size" />
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="bg" />
+                                    <property name="context_help" />
+                                    <property name="context_menu">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg" />
+                                    <property name="font" />
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="maximum_size" />
+                                    <property name="minimum_size" />
+                                    <property name="name">m_pPanelTitled</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos" />
+                                    <property name="size" />
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="tooltip">Dicomization complete</property>
+                                    <property name="validator_data_type" />
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable" />
+                                    <property name="window_extra_style" />
+                                    <property name="window_name" />
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar" />
+                                    <event name="OnEnterWindow" />
+                                    <event name="OnEraseBackground" />
+                                    <event name="OnKeyDown" />
+                                    <event name="OnKeyUp" />
+                                    <event name="OnKillFocus" />
+                                    <event name="OnLeaveWindow" />
+                                    <event name="OnLeftDClick" />
+                                    <event name="OnLeftDown" />
+                                    <event name="OnLeftUp" />
+                                    <event name="OnMiddleDClick" />
+                                    <event name="OnMiddleDown" />
+                                    <event name="OnMiddleUp" />
+                                    <event name="OnMotion" />
+                                    <event name="OnMouseEvents" />
+                                    <event name="OnMouseWheel" />
+                                    <event name="OnPaint" />
+                                    <event name="OnRightDClick" />
+                                    <event name="OnRightDown" />
+                                    <event name="OnRightUp" />
+                                    <event name="OnSetFocus" />
+                                    <event name="OnSize" />
+                                    <event name="OnUpdateUI" />
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size" />
+                                        <property name="name">bSizer16</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="1">
+                                                <property name="bg" />
+                                                <property name="context_help" />
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg" />
+                                                <property name="font" />
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Dicomization finished successfully</property>
+                                                <property name="maximum_size" />
+                                                <property name="minimum_size" />
+                                                <property name="name">m_staticText8</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos" />
+                                                <property name="size" />
+                                                <property name="style" />
+                                                <property name="subclass" />
+                                                <property name="tooltip" />
+                                                <property name="validator_data_type" />
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable" />
+                                                <property name="window_extra_style" />
+                                                <property name="window_name" />
+                                                <property name="window_style" />
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar" />
+                                                <event name="OnEnterWindow" />
+                                                <event name="OnEraseBackground" />
+                                                <event name="OnKeyDown" />
+                                                <event name="OnKeyUp" />
+                                                <event name="OnKillFocus" />
+                                                <event name="OnLeaveWindow" />
+                                                <event name="OnLeftDClick" />
+                                                <event name="OnLeftDown" />
+                                                <event name="OnLeftUp" />
+                                                <event name="OnMiddleDClick" />
+                                                <event name="OnMiddleDown" />
+                                                <event name="OnMiddleUp" />
+                                                <event name="OnMotion" />
+                                                <event name="OnMouseEvents" />
+                                                <event name="OnMouseWheel" />
+                                                <event name="OnPaint" />
+                                                <event name="OnRightDClick" />
+                                                <event name="OnRightDown" />
+                                                <event name="OnRightUp" />
+                                                <event name="OnSetFocus" />
+                                                <event name="OnSize" />
+                                                <event name="OnUpdateUI" />
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg" />
+                        <property name="context_help" />
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg" />
+                        <property name="font" />
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size" />
+                        <property name="minimum_size" />
+                        <property name="name">m_panel12</property>
+                        <property name="permission">protected</property>
+                        <property name="pos" />
+                        <property name="size" />
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip" />
+                        <property name="validator_data_type" />
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable" />
+                        <property name="window_extra_style" />
+                        <property name="window_name" />
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar" />
+                        <event name="OnEnterWindow" />
+                        <event name="OnEraseBackground" />
+                        <event name="OnKeyDown" />
+                        <event name="OnKeyUp" />
+                        <event name="OnKillFocus" />
+                        <event name="OnLeaveWindow" />
+                        <event name="OnLeftDClick" />
+                        <event name="OnLeftDown" />
+                        <event name="OnLeftUp" />
+                        <event name="OnMiddleDClick" />
+                        <event name="OnMiddleDown" />
+                        <event name="OnMiddleUp" />
+                        <event name="OnMotion" />
+                        <event name="OnMouseEvents" />
+                        <event name="OnMouseWheel" />
+                        <event name="OnPaint" />
+                        <event name="OnRightDClick" />
+                        <event name="OnRightDown" />
+                        <event name="OnRightUp" />
+                        <event name="OnSetFocus" />
+                        <event name="OnSize" />
+                        <event name="OnUpdateUI" />
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size" />
+                            <property name="name">bSizer15</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxCheckBox" expanded="1">
+                                    <property name="bg" />
+                                    <property name="checked">0</property>
+                                    <property name="context_help" />
+                                    <property name="context_menu">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg" />
+                                    <property name="font" />
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Don't show this message again</property>
+                                    <property name="maximum_size" />
+                                    <property name="minimum_size" />
+                                    <property name="name">m_pCheckNotShow</property>
+                                    <property name="permission">public</property>
+                                    <property name="pos" />
+                                    <property name="size" />
+                                    <property name="style" />
+                                    <property name="subclass" />
+                                    <property name="tooltip" />
+                                    <property name="validator_data_type" />
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable" />
+                                    <property name="window_extra_style" />
+                                    <property name="window_name" />
+                                    <property name="window_style" />
+                                    <event name="OnChar" />
+                                    <event name="OnCheckBox" />
+                                    <event name="OnEnterWindow" />
+                                    <event name="OnEraseBackground" />
+                                    <event name="OnKeyDown" />
+                                    <event name="OnKeyUp" />
+                                    <event name="OnKillFocus" />
+                                    <event name="OnLeaveWindow" />
+                                    <event name="OnLeftDClick" />
+                                    <event name="OnLeftDown" />
+                                    <event name="OnLeftUp" />
+                                    <event name="OnMiddleDClick" />
+                                    <event name="OnMiddleDown" />
+                                    <event name="OnMiddleUp" />
+                                    <event name="OnMotion" />
+                                    <event name="OnMouseEvents" />
+                                    <event name="OnMouseWheel" />
+                                    <event name="OnPaint" />
+                                    <event name="OnRightDClick" />
+                                    <event name="OnRightDown" />
+                                    <event name="OnRightUp" />
+                                    <event name="OnSetFocus" />
+                                    <event name="OnSize" />
+                                    <event name="OnUpdateUI" />
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="bg" />
+                                    <property name="context_help" />
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg" />
+                                    <property name="font" />
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Accept</property>
+                                    <property name="maximum_size" />
+                                    <property name="minimum_size" />
+                                    <property name="name">m_button5</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos" />
+                                    <property name="size" />
+                                    <property name="style" />
+                                    <property name="subclass" />
+                                    <property name="tooltip" />
+                                    <property name="validator_data_type" />
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable" />
+                                    <property name="window_extra_style" />
+                                    <property name="window_name" />
+                                    <property name="window_style" />
+                                    <event name="OnButtonClick">OnYesClick</event>
+                                    <event name="OnChar" />
+                                    <event name="OnEnterWindow" />
+                                    <event name="OnEraseBackground" />
+                                    <event name="OnKeyDown" />
+                                    <event name="OnKeyUp" />
+                                    <event name="OnKillFocus" />
+                                    <event name="OnLeaveWindow" />
+                                    <event name="OnLeftDClick" />
+                                    <event name="OnLeftDown" />
+                                    <event name="OnLeftUp" />
+                                    <event name="OnMiddleDClick" />
+                                    <event name="OnMiddleDown" />
+                                    <event name="OnMiddleUp" />
+                                    <event name="OnMotion" />
+                                    <event name="OnMouseEvents" />
+                                    <event name="OnMouseWheel" />
+                                    <event name="OnPaint" />
+                                    <event name="OnRightDClick" />
+                                    <event name="OnRightDown" />
+                                    <event name="OnRightUp" />
+                                    <event name="OnSetFocus" />
+                                    <event name="OnSize" />
+                                    <event name="OnUpdateUI" />
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/commands/acquirefromurlcommand.cpp b/cadxcore/commands/acquirefromurlcommand.cpp
new file mode 100644
index 0000000..87474c7
--- /dev/null
+++ b/cadxcore/commands/acquirefromurlcommand.cpp
@@ -0,0 +1,155 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/internationalization/internationalization.h>
+#include <api/controllers/ipacscontroller.h>
+#include <api/controllers/ieventscontroller.h>
+#include <main/controllers/commandcontroller.h>
+#include <api/controllers/icontroladorlog.h>
+#include <eventos/mensajes.h>
+#include <main/entorno.h>
+#include <main/controllers/historycontroller.h>
+#include <eventos/progresocomando.h>
+#include "acquirefromurlcommand.h"
+#include "comandoincluirhistorial.h"
+#include <wx/filename.h>
+#include <wx/thread.h>
+
+
+#define IDC_ACQUIRE_FROM_URL_COMMAND                  123
+
+// Singleton de persistencia
+namespace GADAPI
+{
+AcquireFromURLCommandParameters::AcquireFromURLCommandParameters(const std::list<std::string>& urlList) :
+        m_urlList(urlList),
+        m_pSemWait(new wxSemaphore())
+{
+}
+
+AcquireFromURLCommandParameters::~AcquireFromURLCommandParameters()
+{
+        if (m_pSemWait != NULL) {
+                delete m_pSemWait;
+                m_pSemWait = NULL;
+        }
+}
+
+AcquireFromURLCommand::AcquireFromURLCommand(AcquireFromURLCommandParameters* pParams) : IComando(pParams)
+{
+        m_pAcquireParams = pParams;
+        SetId(IDC_ACQUIRE_FROM_URL_COMMAND);
+        GNC::Entorno::Instance()->GetControladorEventos()->Registrar(this, GNC::GCS::Events::EventoProgresoComando());
+}
+
+void AcquireFromURLCommand::Execute()
+{
+        std::string tarea= _Std("Downloading files ...");
+        if (!NotificarProgreso(0.0f,tarea)) {
+                return;
+        }
+
+        GIL::DICOM::IPACSController* pCI = NULL;
+
+        std::string pathDownloadedFiles = GNC::Entorno::Instance()->CrearDirectorioTemporal();
+        try {
+                pCI = GNC::GCS::IEntorno::Instance()->GetPACSController();
+                int fileNum = 1;
+                for (std::list<std::string>::const_iterator it = m_pAcquireParams->m_urlList.begin();
+                     it != m_pAcquireParams->m_urlList.end(); ++it) {
+                        {
+                                if (!NotificarProgreso(fileNum/m_pAcquireParams->m_urlList.size(),
+                                                       std::string(wxString::Format(_("Downloading file %d"), fileNum).ToUTF8()))) {
+                                        return;
+                                }
+                        }
+                        ++fileNum;
+                        std::ostringstream ostr;
+                        ostr << pathDownloadedFiles;
+                        ostr << (char)wxFileName::GetPathSeparator();
+                        ostr << fileNum;
+
+                        if (!pCI->DownloadFileFromURL((*it), ostr.str(), this)) {
+                                std::ostringstream ostrErr;
+                                ostrErr << _Std("Error downloading file: ");
+                                ostrErr << (*it);
+                                throw GIL::DICOM::PACSException(ostrErr.str());
+                        }
+                }
+        } catch (GIL::DICOM::PACSException& ex) {
+                m_pAcquireParams->m_error =  (const std::string)ex;
+        } catch (std::exception& ex) {
+                m_pAcquireParams->m_error= ex.what();
+        } catch (...) {
+                m_pAcquireParams->m_error= _Std("Internal Error");
+        }
+        //including history....
+        if(m_pAcquireParams->m_error.empty()) {
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(pathDownloadedFiles, true, GNC::GCS::IHistoryController::TAA_MOVE);
+                pParams->m_abrirDespuesDeCargar = true;
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial * pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+                GNC::Entorno::Instance()->GetCommandController()->ProcessAsync("Processing...",pCmd,this);
+                m_pAcquireParams->m_pSemWait->Wait();
+        }
+
+        NotificarProgreso(1.0f,tarea);
+}
+
+void AcquireFromURLCommand::Update()
+{
+        if (EstaAbortado()) {
+                return;
+        }
+        if(!m_pAcquireParams->m_error.empty()) {
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL, _Std("Error downloading files: ") + "\n" + m_pAcquireParams->m_error, GNC::GCS::Events::EventoMensajes::PopUpMessage,false, GNC::GCS::Events::EventoMensajes::Error));
+                return;
+        }
+}
+
+
+
+bool AcquireFromURLCommand::NotificarProgreso(float progresoNormalizado,const std::string &texto)
+{
+        if (EstaAbortado()) {
+                return false;
+        }
+        return IComando::NotificarProgreso(progresoNormalizado, texto);
+}
+
+void AcquireFromURLCommand::LiberarRecursos()
+{
+}
+
+void AcquireFromURLCommand::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        GNC::GCS::Events::EventoProgresoComando* pEvt = dynamic_cast<GNC::GCS::Events::EventoProgresoComando*> (evt);
+        if (!pEvt) {
+                LOG_TRACE("Net", "AcquireFromURLCommand::ProcesarEvento: unexpected event type, ignore");
+                return;
+        }
+
+        GNC::GCS::IComando* pCmd = pEvt->GetComando();
+        if (pCmd != NULL && pCmd->GetOwner() == this &&pEvt->GetTipo() == GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado) {
+                m_pAcquireParams->m_pSemWait->Post();
+        }
+}
+
+}
diff --git a/cadxcore/commands/acquirefromurlcommand.h b/cadxcore/commands/acquirefromurlcommand.h
new file mode 100644
index 0000000..8e98093
--- /dev/null
+++ b/cadxcore/commands/acquirefromurlcommand.h
@@ -0,0 +1,66 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/globals.h>
+#include <api/icommand.h>
+#include <api/ihistorytool.h>
+#include <api/observers/ieventsobserver.h>
+
+class wxSemaphore;
+
+
+namespace GADAPI
+{
+class AcquireFromURLCommandParameters : public GNC::GCS::IComandoParams
+{
+
+public:
+        //download only specifying
+        AcquireFromURLCommandParameters(const std::list<std::string>& urlList);
+        virtual ~AcquireFromURLCommandParameters();
+
+public:
+        std::list<std::string> m_urlList;
+        std::string m_error;
+        wxSemaphore* m_pSemWait;
+};
+
+
+
+class AcquireFromURLCommand : public GNC::GCS::IComando, public GNC::GCS::IEventsObserver
+{
+public:
+        AcquireFromURLCommand(AcquireFromURLCommandParameters* pParams);
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+public:
+
+        virtual bool NotificarProgreso(float progresoNormalizado, const std::string &texto);
+
+        virtual void LiberarRecursos();
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+        AcquireFromURLCommandParameters* m_pAcquireParams;
+};
+}
diff --git a/cadxcore/commands/autocleaningcommand.cpp b/cadxcore/commands/autocleaningcommand.cpp
new file mode 100644
index 0000000..1cf3cb7
--- /dev/null
+++ b/cadxcore/commands/autocleaningcommand.cpp
@@ -0,0 +1,185 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+
+#include "autocleaningcommand.h"
+#include <api/internationalization/internationalization.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/entorno.h>
+
+#include <wx/filename.h>
+#include <wx/dir.h>
+#include <wx/utils.h>
+
+/*
+this command is composed of two commands the sequence is this:
+1 - get a list of candidates to be deleted listA
+2 - synchronize with gui and call history panel to drop those candidates
+3 - if any delete has be performed resets autocleaning controller to launch command again...
+*/
+
+#define IDC_AUTOCLEANING_COMMAND   122
+
+GADAPI::AutoCleaningCommandParameters::AutoCleaningCommandParameters(int olderThan, int hdSpace, int dicomDirSize):
+        OlderThan(olderThan),
+        HdSpace(hdSpace),
+        DicomDirSize(dicomDirSize)
+{
+}
+
+GADAPI::AutoCleaningCommandParameters::~AutoCleaningCommandParameters()
+{
+}
+
+GADAPI::AutoCleaningCommand::AutoCleaningCommand(AutoCleaningCommandParameters* pParams) : IComando(pParams)
+{
+        m_pAutoCleaningParameters = pParams;
+        SetId(IDC_AUTOCLEANING_COMMAND);
+        AbortaSi(IDC_AUTOCLEANING_COMMAND);
+}
+
+bool compareCreation (const GNC::GCS::IHistoryController::StudyModel& first, const GNC::GCS::IHistoryController::StudyModel& second)
+{
+        wxDateTime dtFirst, dtSecond;
+        dtFirst.ParseFormat(wxString::FromUTF8(first.created_time.c_str()), wxT("%Y-%m-%dT%H:%M:%S.%l"));
+        dtSecond.ParseFormat(wxString::FromUTF8(second.created_time.c_str()), wxT("%Y-%m-%dT%H:%M:%S.%l"));
+        return dtFirst > dtSecond;
+}
+
+void GADAPI::AutoCleaningCommand::Execute()
+{
+        std::string tarea= _Std("Cleaning dicomdir...");
+        if (!NotificarProgreso(0.0f,tarea)) {
+                return;
+        }
+
+        //from more restrictive to less...
+        if (m_pAutoCleaningParameters->OlderThan > 0) {
+                //ask history studies older than..
+                wxDateTime from, to;
+                to = wxDateTime::Now();
+                to.Add(wxDateSpan::Days(-1*m_pAutoCleaningParameters->OlderThan));
+
+                GNC::GCS::History::AcquisitionDateFilter filter(from,to);
+                filter.Enable(true);
+                GNC::GCS::HistoryController::StudyModelList studyList;
+                std::list<GNC::GCS::History::IHistoryFilter*> filterList;
+                filterList.push_back(&filter);
+                GNC::GCS::HistoryController::Instance()->GetStudies(filterList, studyList);
+                int progress = 0;
+                for (GNC::GCS::HistoryController::StudyModelList::iterator it = studyList.begin(); it != studyList.end(); ++it,progress++) {
+                        if (!NotificarProgreso((double)progress/studyList.size(),tarea)) {
+                                return;
+                        }
+                        GNC::GCS::HistoryController::Instance()->GetSeriesFromStudy((*it).pk, m_pAutoCleaningParameters->seriesToDelete);
+                }
+        }
+
+        //how much size we have to free
+        wxDiskspaceSize_t spaceToFree = 0;
+        wxDiskspaceSize_t KB = 1024;
+        wxDiskspaceSize_t MB = KB*1024;
+        //	wxDiskspaceSize_t GB = MB*1024;
+
+        //if there is no series to delete try with next criteria
+        if (m_pAutoCleaningParameters->HdSpace > 0 && m_pAutoCleaningParameters->seriesToDelete.empty()) {
+                //guess how much size we have to free...
+                wxDiskspaceSize_t total = 0;
+                wxDiskspaceSize_t free = 0;
+
+                if (wxGetDiskSpace(FROMPATH(GNC::GCS::HistoryController::Instance()->GetGinkgoDicomDir()), &total, &free) ) {
+                        wxDiskspaceSize_t hdSpaceInBytes = wxDiskspaceSize_t(m_pAutoCleaningParameters->HdSpace) * MB;
+                        if (hdSpaceInBytes > free) {
+                                //we have to free bytes
+                                spaceToFree = hdSpaceInBytes - free;
+                        }
+                }
+        }
+
+        //if there is no series to delete and spactofree is ok try with next criteria
+        if (m_pAutoCleaningParameters->DicomDirSize > 0 && m_pAutoCleaningParameters->seriesToDelete.empty() && spaceToFree == 0) {
+                wxString dicomDirPath(FROMPATH(GNC::GCS::HistoryController::Instance()->GetGinkgoDicomDir()));
+                //know current dicomdir size...
+                wxDiskspaceSize_t currentSize = 0;
+                wxDir dir;
+                if (dir.Open(dicomDirPath)) {
+                        wxString wxPathFich;
+                        bool cont = dir.GetFirst(&wxPathFich,wxEmptyString, wxDIR_FILES | wxDIR_DIRS);
+                        while (cont) {
+                                wxPathFich = dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) + wxPathFich;
+                                if (wxFileName::IsFileReadable(wxPathFich)) {
+                                        currentSize += wxFileName::GetSize(wxPathFich).GetValue();
+                                }
+                                cont = dir.GetNext(&wxPathFich);
+                        }
+                }
+                wxDiskspaceSize_t maxDicomDirSizeBytes = wxDiskspaceSize_t(m_pAutoCleaningParameters->DicomDirSize) * MB;
+                if (currentSize > maxDicomDirSizeBytes) {
+                        spaceToFree = currentSize - maxDicomDirSizeBytes;
+                }
+        }
+
+        if (spaceToFree > 0) {
+                LOG_DEBUG("AutoCleaning", "We have to free  " << spaceToFree.ToDouble() << "bytes");
+                //select all studies sort by acquisition date located in local database...
+                GNC::GCS::HistoryController::StudyModelList studyList;
+                GNC::GCS::History::StudyLocationFilter filter(GNC::GCS::HistoryController::TL_LocalDatabase);
+                std::list<GNC::GCS::History::IHistoryFilter*> filterList;
+                filterList.push_back(&filter);
+                GNC::GCS::HistoryController::Instance()->GetStudies(filterList, studyList);
+                //sort them by acquisition date..
+                studyList.sort(compareCreation);
+
+                int progress = 0;
+                for (GNC::GCS::HistoryController::StudyModelList::iterator itStudy = studyList.begin(); spaceToFree>0 && itStudy != studyList.end(); ++itStudy, ++progress) {
+                        if (!NotificarProgreso((double)progress/studyList.size(),tarea)) {
+                                return;
+                        }
+                        //calculate study size to delete it...
+                        GNC::GCS::HistoryController::SeriesModelList series;
+                        GNC::GCS::HistoryController::Instance()->GetSeriesFromStudy((*itStudy).pk, series);
+                        for (GNC::GCS::HistoryController::SeriesModelList::iterator itSeries = series.begin(); itSeries != series.end(); ++itSeries) {
+                                GNC::GCS::HistoryController::LightFileModelList files;
+                                GNC::GCS::HistoryController::Instance()->GetSeriesSortedFileModels((*itSeries).pk, files);
+                                for (GNC::GCS::HistoryController::LightFileModelList::iterator itFiles = files.begin(); itFiles != files.end(); ++itFiles) {
+                                        if ((*itFiles).location == GNC::GCS::HistoryController::TL_LocalDatabase) {
+                                                wxFileName fn(FROMPATH((*itFiles).real_path));
+                                                spaceToFree -= fn.GetSize().GetValue();
+                                        }
+                                }
+                                m_pAutoCleaningParameters->seriesToDelete.push_back((*itSeries));
+                        }
+                }
+        }
+}
+
+void GADAPI::AutoCleaningCommand::Update()
+{
+        if (EstaAbortado()) {
+                return;
+        }
+
+}
+
+
+
+
diff --git a/cadxcore/commands/autocleaningcommand.h b/cadxcore/commands/autocleaningcommand.h
new file mode 100644
index 0000000..e6e9c45
--- /dev/null
+++ b/cadxcore/commands/autocleaningcommand.h
@@ -0,0 +1,58 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/globals.h>
+#include <api/icommand.h>
+#include <api/controllers/ihistorycontroller.h>
+
+namespace GADAPI
+{
+class AutoCleaningCommandParameters : public GNC::GCS::IComandoParams
+{
+public:
+        //download only specifying
+        AutoCleaningCommandParameters(int olderThan, int hdSpace, int dicomDirSize);
+        virtual ~AutoCleaningCommandParameters();
+
+public:
+        int OlderThan;
+        int HdSpace;
+        int DicomDirSize;
+        GNC::GCS::IHistoryController::SeriesModelList seriesToDelete;
+};
+
+
+
+class AutoCleaningCommand: public GNC::GCS::IComando
+{
+public:
+        AutoCleaningCommand(AutoCleaningCommandParameters* pParams);
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+public:
+
+
+        AutoCleaningCommandParameters* m_pAutoCleaningParameters;
+};
+}
diff --git a/cadxcore/commands/cloudcommand.cpp b/cadxcore/commands/cloudcommand.cpp
new file mode 100644
index 0000000..a033e40
--- /dev/null
+++ b/cadxcore/commands/cloudcommand.cpp
@@ -0,0 +1,514 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <memory>
+#include <stdio.h>
+#include <curl/curl.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+
+#include "cloudcommand.h"
+#include "comandoincluirhistorial.h"
+#include <api/cloud.h>
+#include <api/ientorno.h>
+#include <api/controllers/ipacscontroller.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/icommandcontroller.h>
+#include <main/controllers/configurationcontroller.h>
+#include <api/controllers/ieventscontroller.h>
+#include <eventos/mensajes.h>
+#include <api/internationalization/internationalization.h>
+
+#include <json/json.h>
+#include <openssl/bio.h>
+#include <openssl/evp.h>
+
+#include <wx/dir.h>
+#include <wx/filename.h>
+#include <wx/tarstrm.h>
+#include <wx/zstream.h>
+#include <wx/wfstream.h>
+
+#define CLOUD_PROTOCOL_VERSION "1.1"
+////helper...
+inline std::string FromBase64(const std::string& input)
+{
+        char* pOutput = (char*)malloc(input.size());
+
+        BIO *bin, *b64;
+        b64 = BIO_new(BIO_f_base64());
+        BIO_set_flags(b64, BIO_FLAGS_BASE64_NO_NL);
+        bin = BIO_new_mem_buf((void*) input.c_str(), input.size());
+
+        bin = BIO_push(b64, bin);
+
+        int size = BIO_read(bin, pOutput, input.size());
+        std::string outputstr(pOutput, size);
+
+        BIO_free_all(b64);
+        free(pOutput);
+        return outputstr;
+}
+
+int progress_func_download_cloud(void* ptr, double TotalToDownload, double NowDownloaded, double , double )
+{
+        GNC::GCS::CloudCommand* pCmd = (GNC::GCS::CloudCommand*)(ptr);
+        if (pCmd != NULL && TotalToDownload != 0) {
+                if (pCmd->NotificarProgreso((float)NowDownloaded/TotalToDownload, _Std("Downloading files..."))) {
+                        return 0;
+                } else {
+                        return -1;
+                }
+        } else {
+                return 0;
+        }
+}
+//
+
+namespace GNC
+{
+
+struct InMemmoryDataHandler {
+        char *data;
+        size_t bufferlen;
+        size_t writepos;
+        int initialized;
+};
+
+size_t static inMemmoryResponseHandler( void *ptr, size_t size, size_t nmemb, void *userdata)
+{
+        size_t nbytes = size*nmemb;
+        struct InMemmoryDataHandler* dataHandler = (struct InMemmoryDataHandler*) userdata;
+
+        if (!(dataHandler)->initialized) {
+                (dataHandler)->data = (char *)malloc(nbytes);
+                (dataHandler)->bufferlen = nbytes;
+                (dataHandler)->writepos = 0;
+                (dataHandler)->initialized = true;
+        }
+
+        if ((dataHandler)->bufferlen < ((dataHandler)->writepos + nbytes)) {
+                (dataHandler)->bufferlen = (dataHandler)->bufferlen + nbytes;
+                (dataHandler)->data = (char*) realloc((dataHandler)->data, (size_t) ((dataHandler)->writepos + nbytes));
+        }
+
+        assert((dataHandler)->data != NULL);
+        memcpy( (dataHandler)->data + (dataHandler)->writepos, ptr, nbytes);
+        (dataHandler)->writepos += nbytes;
+        return nbytes;
+}
+
+struct FileDataHandler {
+        wxFFileOutputStream* fos;
+        size_t filelen;
+};
+
+size_t static fileResponseHandler( void *ptr, size_t size, size_t nmemb, void *userdata)
+{
+        size_t nbytes = size * nmemb;
+        struct FileDataHandler* dataHandler = (struct FileDataHandler *) userdata;
+        dataHandler->fos->Write(ptr, nbytes);
+        dataHandler->filelen += nbytes;
+        return nbytes;
+}
+}
+
+// CloudCommandParams
+
+GNC::GCS::CloudCommandParams::CloudCommandParams(GNC::GCS::CloudCommandParams::ActionType action) : m_action(action)
+{
+}
+
+GNC::GCS::CloudCommandParams::~CloudCommandParams()
+{
+}
+
+// CloudGetCommandParams
+
+GNC::GCS::CloudGetCommandParams::CloudGetCommandParams(const std::string& url, bool base64) : CloudCommandParams(CloudCommandParams::CC_GET), m_url (url)
+{
+        if (base64) {
+                std::string urlWithoutPrefix = url;
+                wxString urlWx = wxString::FromUTF8(url.c_str());
+                if (urlWx.StartsWith(wxT("ginkgocadx://cloud:"))) {
+                        urlWithoutPrefix = urlWx.SubString(19,urlWx.size()-1).ToUTF8();
+                }
+                m_url = FromBase64(urlWithoutPrefix);
+        } else {
+                m_url = url;
+        }
+}
+
+GNC::GCS::CloudGetCommandParams::~CloudGetCommandParams()
+{
+}
+
+// CloudFindCommandParams
+
+GNC::GCS::CloudFindCommandParams::CloudFindCommandParams(const std::string& bucketId,const std::string& userNameQuery, const std::string& descriptionQuery, const std::string& modalitiesQuery, const std::string& fromDateQuery, const std::string& toDateQuery) : CloudCommandParams(CloudCommandParams::CC_FIND), m_bucketId(bucketId), m_userNameQuery(userNameQuery), m_descriptionQuery(descriptionQuery), m_modalitiesQuery(modalitiesQuery), m_fromDateQuery(fromDateQuery), m_toDateQuery(toDateQuery)
+{
+}
+
+GNC::GCS::CloudFindCommandParams::~CloudFindCommandParams()
+{
+}
+
+// CloudCommand
+
+GNC::GCS::CloudCommand::CloudCommand(::GNC::GCS::CloudCommandParams* pParams): GNC::GCS::IComando(pParams, _Std("CloudCommand"))
+{
+        m_pCloudParams = pParams;
+}
+
+void GNC::GCS::CloudCommand::Execute()
+{
+        try {
+
+                if (m_pCloudParams->m_action == CloudCommandParams::CC_FIND) {
+                        doFind(static_cast<CloudFindCommandParams*>(m_pParams));
+                } else if (m_pCloudParams->m_action == CloudCommandParams::CC_GET) {
+                        doGet(static_cast<CloudGetCommandParams*>(m_pParams));
+                } else {
+                        m_pCloudParams->m_error = _Std("Unknown operation");
+                }
+        } catch (std::exception& ex) {
+                std::ostringstream ostr;
+                ostr << _Std("Error in cloud operation. See log to get more details...") << std::endl;
+                ostr << ex.what();
+                m_pCloudParams->m_error = ostr.str();
+        }
+}
+
+void GNC::GCS::CloudCommand::doGet(GNC::GCS::CloudGetCommandParams* pParams)
+{
+
+        // Step 1: Setup handler
+        FileDataHandler responseDataHandler;
+        memset(&responseDataHandler, 0, sizeof(FileDataHandler));
+
+        std::ostringstream ostr;
+
+        ostr << GNC::GCS::IEntorno::Instance()->CreateGinkgoTempFile() << time(NULL) << ".tgz";
+        std::string tgzFile = ostr.str();
+
+        wxString tmpFile(FROMPATH(tgzFile));
+
+        responseDataHandler.fos = new wxFFileOutputStream(tmpFile);
+
+        // Step 2: Download
+
+        CURL *curl;
+        CURLcode res;
+        double speed_upload, total_time;
+
+        curl = curl_easy_init();
+        if(curl) {
+                curl_easy_setopt(curl, CURLOPT_URL, pParams->m_url.c_str());
+
+                std::ostringstream userAgent;
+                userAgent << "Mozilla/5.0 (compatible; GinkgoCADx " << GNC::GCS::IEntorno::Instance()->GetGinkgoVersionString()  << " )";
+                curl_easy_setopt(curl, CURLOPT_USERAGENT, userAgent.str().c_str());
+
+                //proxy settings
+                GNC::GCS::ProxySettings settings = GNC::GCS::ConfigurationController::Instance()->GetProxySettings();
+                if (settings.useProxy) {
+                        curl_easy_setopt(curl, CURLOPT_PROXY, settings.hostName.c_str());
+                        curl_easy_setopt(curl, CURLOPT_PROXYPORT, settings.port);
+                        if (settings.requiresAuth) {
+                                curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, settings.userName.c_str());
+                                curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, settings.password.c_str());
+                        }
+                        curl_easy_setopt(curl, CURLOPT_NOPROXY, settings.exceptions.c_str());
+                }
+
+                curl_easy_setopt(curl, CURLOPT_HTTPGET, TRUE);
+
+                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, fileResponseHandler);
+                curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *) &responseDataHandler);
+                //progress
+                curl_easy_setopt(curl, CURLOPT_PROGRESSDATA , this);
+                curl_easy_setopt(curl, CURLOPT_PROGRESSFUNCTION, progress_func_download_cloud);
+                curl_easy_setopt(curl, CURLOPT_NOPROGRESS, 0);
+
+                res = curl_easy_perform(curl);
+
+                // Check for errors
+                if(res != CURLE_OK) {
+                        std::ostringstream os;
+                        os << _Std("Could to retrieve study.") << " " << curl_easy_strerror(res);
+                        m_pCloudParams->m_error = os.str();
+                        LOG_ERROR("CloudGet", m_pCloudParams->m_error);
+                } else {
+                        long http_code = 0;
+                        curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &http_code);
+                        if (http_code != 200) {
+                                std::ostringstream os;
+                                if (http_code == 410) {
+                                        //version is not supported
+                                        os << _Std("This version of Ginkgo CADx is not compatible with current version of Ginkgo Cloud.");
+                                } else {
+                                        os << _Std("Error retrieving study.") << " Http error code: " << http_code;
+                                }
+                                m_pCloudParams->m_error = os.str();
+                                LOG_ERROR("CloudGet", m_pCloudParams->m_error);
+                        } else {
+                                // now extract transfer info
+                                curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload);
+                                curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);
+                                std::ostringstream ostr;
+                                ostr << _Std("Study successfully retrieved.") << " " << _Std("Speed") << " " << responseDataHandler.filelen << " " <<  _Std("bytes/sec during") << " " << total_time << " " << _Std("seconds");
+                                LOG_INFO("CloudGet", ostr.str());
+                                if (responseDataHandler.filelen == 0) {
+                                        std::ostringstream os;
+                                        os << _Std("Empty Response");
+                                        m_pCloudParams->m_error = os.str();
+                                        LOG_ERROR("CloudGet", m_pCloudParams->m_error);
+                                }
+                        }
+                }
+                // always cleanup
+                curl_easy_cleanup(curl);
+        }
+        responseDataHandler.fos->Close();
+        delete responseDataHandler.fos;
+
+        //untar...
+        wxFileName fileIn ( tmpFile );
+        NotificarProgreso(0.95f, _Std("Extracting files..."));
+        {
+                wxFFileInputStream fsIn(fileIn.GetFullPath());
+                wxZlibInputStream gzIn(fsIn, wxZLIB_GZIP);
+                if (gzIn.IsOk()) {
+                        wxTarInputStream tarIn(gzIn);
+                        if (tarIn.IsOk()) {
+                                pParams->m_baseDir = GNC::GCS::IEntorno::Instance()->CrearDirectorioTemporal();
+                                wxString baseTargetDir(FROMPATH(pParams->m_baseDir));
+
+                                for (wxTarEntry* entry = tarIn.GetNextEntry(); entry != NULL; entry = tarIn.GetNextEntry()) {
+                                        if (entry->IsDir()) {
+                                                wxMkdir(baseTargetDir + wxFileName::GetPathSeparator() + entry->GetName());
+                                        } else {
+                                                wxFFileOutputStream fileOut(baseTargetDir + wxFileName::GetPathSeparator() +  entry->GetName());
+                                                tarIn.Read(fileOut);
+                                                fileOut.Close();
+                                                tarIn.CloseEntry();
+                                        }
+                                        delete entry;
+                                }
+                        } else {
+                                pParams->m_error = _Std("Invalid file has been downloaded");
+                        }
+                } else {
+                        pParams->m_error = _Std("Invalid file has been downloaded");
+                }
+        }
+
+        wxRemoveFile(fileIn.GetFullPath());
+        wxRmdir(fileIn.GetPath());
+
+}
+
+void GNC::GCS::CloudCommand::doFind(GNC::GCS::CloudFindCommandParams* pParams)
+{
+
+        // Step 1: Setup handler
+        InMemmoryDataHandler responseDataHandler;
+        memset(&responseDataHandler, 0, sizeof(InMemmoryDataHandler));
+
+        // Step 2: Invoke
+
+        CURL *curl;
+        CURLcode res;
+        double speed_upload, total_time;
+
+        curl = curl_easy_init();
+        if(curl) {
+                std::ostringstream baseUrl;
+                baseUrl << GINKGO_CLOUD_URI << "/find/";
+                baseUrl << pParams->m_bucketId;
+                baseUrl << "/";
+                curl_easy_setopt(curl, CURLOPT_URL, baseUrl.str().c_str());
+
+                std::ostringstream userAgent;
+                userAgent << "Mozilla/5.0 (compatible; GinkgoCADx " << GNC::GCS::IEntorno::Instance()->GetGinkgoVersionString()  << " )";
+                curl_easy_setopt(curl, CURLOPT_USERAGENT, userAgent.str().c_str());
+
+                //proxy settings
+                GNC::GCS::ProxySettings settings = GNC::GCS::ConfigurationController::Instance()->GetProxySettings();
+                if (settings.useProxy) {
+                        curl_easy_setopt(curl, CURLOPT_PROXY, settings.hostName.c_str());
+                        curl_easy_setopt(curl, CURLOPT_PROXYPORT, settings.port);
+                        if (settings.requiresAuth) {
+                                curl_easy_setopt(curl, CURLOPT_PROXYUSERNAME, settings.userName.c_str());
+                                curl_easy_setopt(curl, CURLOPT_PROXYPASSWORD, settings.password.c_str());
+                        }
+                        curl_easy_setopt(curl, CURLOPT_NOPROXY, settings.exceptions.c_str());
+                }
+
+                struct curl_httppost* post = NULL;
+                struct curl_httppost* last = NULL;
+
+                curl_formadd(&post, &last, CURLFORM_COPYNAME, "userName", CURLFORM_COPYCONTENTS, pParams->m_userNameQuery.c_str(), CURLFORM_END);
+
+                curl_formadd(&post, &last, CURLFORM_COPYNAME, "description", CURLFORM_COPYCONTENTS, pParams->m_descriptionQuery.c_str(), CURLFORM_END);
+                curl_formadd(&post, &last, CURLFORM_COPYNAME, "modalities", CURLFORM_COPYCONTENTS, pParams->m_modalitiesQuery.c_str(), CURLFORM_END);
+                curl_formadd(&post, &last, CURLFORM_COPYNAME, "fromDate", CURLFORM_COPYCONTENTS, pParams->m_fromDateQuery.c_str(), CURLFORM_END);
+                curl_formadd(&post, &last, CURLFORM_COPYNAME, "toDate", CURLFORM_COPYCONTENTS, pParams->m_toDateQuery.c_str(), CURLFORM_END);
+                curl_formadd(&post, &last, CURLFORM_COPYNAME, "versionId", CURLFORM_COPYCONTENTS, CLOUD_PROTOCOL_VERSION, CURLFORM_END);
+
+                curl_easy_setopt(curl, CURLOPT_HTTPPOST, post);
+
+                curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, GNC::inMemmoryResponseHandler);
+                curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *) &responseDataHandler);
+
+                res = curl_easy_perform(curl);
+
+                // Check for errors
+                // Check for errors
+                if(res != CURLE_OK) {
+                        std::ostringstream os;
+                        os << _Std("Could to perform query.") << " " << curl_easy_strerror(res);
+                        m_pCloudParams->m_error = os.str();
+                        LOG_ERROR("CloudFind", m_pCloudParams->m_error);
+                } else {
+                        long http_code = 0;
+                        curl_easy_getinfo (curl, CURLINFO_RESPONSE_CODE, &http_code);
+                        if (http_code != 200) {
+                                std::ostringstream os;
+                                if (http_code == 410) {
+                                        //version is not supported
+                                        os << _Std("This version of Ginkgo CADx is not compatible with current version of Ginkgo Cloud.");
+                                } else {
+                                        os << _Std("Error perfoming the query.") << " Http error code: " << http_code;
+                                }
+                                m_pCloudParams->m_error = os.str();
+                                LOG_ERROR("CloudFind", m_pCloudParams->m_error);
+                        } else {
+                                // now extract transfer info
+                                curl_easy_getinfo(curl, CURLINFO_SPEED_UPLOAD, &speed_upload);
+                                curl_easy_getinfo(curl, CURLINFO_TOTAL_TIME, &total_time);
+                                std::ostringstream ostr;
+                                ostr << _Std("Query successfully performed.") << " " << _Std("Speed") << " " << speed_upload << " " <<  _Std("bytes/sec during") << " " << total_time << " " << _Std("seconds");
+                                LOG_INFO("CloudFind", ostr.str());
+                        }
+                }
+                // always cleanup
+
+                if (responseDataHandler.bufferlen > 0 && m_pCloudParams->m_error.empty()) {
+
+                        if (GNC::GCS::IControladorLog::Instance()->IsEnabledFor(GNC::GCS::IControladorLog::TraceLog)) {
+                                std::string jsonData = std::string(responseDataHandler.data, responseDataHandler.bufferlen);
+                                LOG_TRACE("CloudFind", _Std("JSon Response") << ": " << jsonData);
+                        }
+                        Json::Value root;
+                        Json::Reader reader;
+                        bool parsingSuccessful = reader.parse( responseDataHandler.data, responseDataHandler.data + responseDataHandler.bufferlen, root );
+                        if (parsingSuccessful) {
+
+                                for (Json::ValueIterator it1 = root.begin(); it1 != root.end(); ++it1) {
+                                        CloudFindCommandParams::ResultTuple rtuple;
+                                        Json::Value& tuple = (*it1);
+
+                                        Json::Value::Members m = tuple.getMemberNames();
+                                        for (Json::Value::Members::iterator it2 = m.begin(); it2 != m.end(); ++it2) {
+                                                const std::string& name = (*it2);
+                                                Json::Value& value = tuple[name];
+                                                if (value.isString()) {
+                                                        rtuple[name] = tuple.get(name, "").asCString();
+                                                } else if (value.isBool()) {
+                                                        if (value.asBool()) {
+                                                                rtuple[name] = "true";
+                                                        } else {
+                                                                rtuple[name] = "false";
+                                                        }
+                                                } else if (value.isInt()) {
+                                                        std::ostringstream os;
+                                                        os << value.asInt();
+                                                        rtuple[name] = os.str();
+                                                } else if (value.isDouble()) {
+                                                        std::ostringstream os;
+                                                        os << value.asInt();
+                                                        rtuple[name] = os.str();
+                                                } else if (value.isArray()) {
+                                                        if (name == "modalities") {
+                                                                bool start = true;
+                                                                Json::Value& modalities = tuple[name];
+                                                                std::ostringstream os;
+                                                                for (Json::ValueIterator it3 = modalities.begin(); it3 != modalities.end(); ++it3) {
+                                                                        Json::Value& modality = (*it3);
+                                                                        if (modality.isString()) {
+                                                                                if (start) {
+                                                                                        start = false;
+                                                                                } else {
+                                                                                        os << "/";
+                                                                                }
+                                                                                os << modality.asCString();
+                                                                        }
+                                                                }
+                                                                rtuple[name] = os.str();
+                                                        }
+                                                } else {
+                                                        LOG_TRACE("CloudFind", _Std("Unknown JSon attribute:") << ": " << name);
+                                                }
+
+                                        }
+                                        pParams->m_pResults.push_back(rtuple);
+                                }
+
+                        } else {
+                                std::ostringstream os;
+                                os << _Std("Error parsing JSon: ");
+                                os << reader.getFormattedErrorMessages();
+                                m_pCloudParams->m_error = os.str();
+                                LOG_ERROR("CloudFind", m_pCloudParams->m_error);
+                        }
+
+
+                } else {
+                        LOG_ERROR("CloudFind", _Std("Null Response"));
+                }
+                if (responseDataHandler.data != NULL) {
+                        free(responseDataHandler.data);
+                }
+                curl_formfree(post);
+                curl_easy_cleanup(curl);
+        }
+
+}
+
+void GNC::GCS::CloudCommand::Update()
+{
+        if (m_pCloudParams->m_error != "") {
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL, m_pCloudParams->m_error, GNC::GCS::Events::EventoMensajes::PopUpMessage, false, GNC::GCS::Events::EventoMensajes::Error));
+        } else {
+                if (m_pCloudParams->m_action == CloudCommandParams::CC_GET) {
+
+                        CloudGetCommandParams* pParams = static_cast<CloudGetCommandParams*>(m_pCloudParams);
+
+                        if (pParams != NULL) {
+                                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pIncluirParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(pParams->m_baseDir, true, GNC::GCS::IHistoryController::TAA_MOVE);
+                                pIncluirParams->m_abrirDespuesDeCargar = true;
+                                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pIncluirParams);
+                                GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Storing in the history..."), pCmd, this->GetOwner());
+                        }
+                }
+        }
+}
diff --git a/cadxcore/commands/cloudcommand.h b/cadxcore/commands/cloudcommand.h
new file mode 100644
index 0000000..541f019
--- /dev/null
+++ b/cadxcore/commands/cloudcommand.h
@@ -0,0 +1,105 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/globals.h>
+#include <api/icommand.h>
+#include <api/dicom/idicom.h>
+#include <vector>
+
+namespace GNC
+{
+namespace GCS
+{
+class CloudCommandParams : public ::GNC::GCS::IComandoParams
+{
+
+public:
+
+        typedef enum ActionType {
+                CC_GET,
+                CC_FIND
+        } ActionType;
+
+protected:
+
+        CloudCommandParams(ActionType action);
+        ~CloudCommandParams();
+
+public:
+        const ActionType m_action;
+
+
+public:
+        std::string m_error;
+};
+
+class CloudGetCommandParams : public CloudCommandParams
+{
+public:
+
+        CloudGetCommandParams(const std::string& url, bool base64);
+        ~CloudGetCommandParams();
+
+        std::string m_url;
+        std::string m_baseDir;
+};
+
+class CloudFindCommandParams : public CloudCommandParams
+{
+public:
+
+        typedef std::map<std::string, std::string> ResultTuple;
+        typedef std::list<ResultTuple> Results;
+
+        CloudFindCommandParams(const std::string& bucketId, const std::string& userNameQuery, const std::string& descriptionQuery, const std::string& modalitiesQuery, const std::string& fromDateQuery, const std::string& toDateQuery);
+        ~CloudFindCommandParams();
+
+        const std::string m_bucketId;
+        const std::string m_userNameQuery;
+        const std::string m_descriptionQuery;
+        const std::string m_modalitiesQuery;
+        const std::string m_fromDateQuery;
+        const std::string m_toDateQuery;
+
+        Results m_pResults;
+
+};
+
+
+class CloudCommand : public GNC::GCS::IComando
+{
+public:
+        CloudCommand(::GNC::GCS::CloudCommandParams* pParams);
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+private:
+        void doGet(GNC::GCS::CloudGetCommandParams* pParams);
+        void doFind(GNC::GCS::CloudFindCommandParams* pParams);
+
+public:
+
+        ::GNC::GCS::CloudCommandParams* m_pCloudParams;
+};
+}
+}
diff --git a/cadxcore/commands/comandoactualizaciones.cpp b/cadxcore/commands/comandoactualizaciones.cpp
new file mode 100644
index 0000000..84f862e
--- /dev/null
+++ b/cadxcore/commands/comandoactualizaciones.cpp
@@ -0,0 +1,176 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <sstream>
+#include <api/internationalization/internationalization.h>
+
+#include <wx/xml/xml.h>
+#include <wx/msgdlg.h>
+#include <wx/sstream.h>
+#include <wx/url.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/pacscontroller.h>
+
+#include <api/globals.h>
+
+#include <main/entorno.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/controladorlog.h>
+#include <eventos/updateavailable.h>
+
+#include "comandoactualizaciones.h"
+
+#define IDC_CHECK_UPDATES 112
+
+GNC::ComandoComprobarActualizacionesParams::ComandoComprobarActualizacionesParams(const std::string& url, bool informar) :
+        m_URL(url),
+        m_Informar(informar)
+{
+}
+
+GNC::ComandoComprobarActualizacionesParams::~ComandoComprobarActualizacionesParams()
+{
+}
+
+GNC::ComandoComprobarActualizaciones::ComandoComprobarActualizaciones(ComandoComprobarActualizacionesParams* pParams) :
+        IComando(pParams, _Std("Check Updates")),
+        m_pComprobarActualizacionesParams(pParams),
+        m_Version(),
+        m_Revision(0),
+        m_Description(),
+        m_URL()
+{
+        SetId(IDC_CHECK_UPDATES);
+        CancelaA(IDC_CHECK_UPDATES);
+}
+
+const std::string& GNC::ComandoComprobarActualizaciones::GetError() const
+{
+        return m_Error;
+}
+
+const std::string& GNC::ComandoComprobarActualizaciones::GetVersion() const
+{
+        return m_Version;
+}
+
+const std::string& GNC::ComandoComprobarActualizaciones::GetDescription() const
+{
+        return m_Description;
+}
+
+int GNC::ComandoComprobarActualizaciones::GetRevision() const
+{
+        return m_Revision;
+}
+
+
+void GNC::ComandoComprobarActualizaciones::Execute()
+{
+//	NotificarProgreso(0.0, tarea);
+
+        if (EstaAbortado()) {
+                return;
+        }
+
+        std::string tmpFile = GNC::Entorno::Instance()->CreateGinkgoTempFile();
+        try {
+                if (!GIL::DICOM::PACSController::Instance()->DownloadFileFromURL(m_pComprobarActualizacionesParams->m_URL, tmpFile, this)) {
+                        std::ostringstream ostr;
+                        ostr << "Error downloading update file: " << m_pComprobarActualizacionesParams->m_URL << " check http proxy settings";
+                        m_Error = ostr.str();
+                        return;
+                }
+        } catch (GIL::DICOM::PACSException&) {
+                std::ostringstream ostr;
+                ostr << "Error downloading update file: " << m_pComprobarActualizacionesParams->m_URL << " check http proxy settings";
+                m_Error = ostr.str();
+                return;
+        }
+
+
+        try {
+                wxXmlDocument xml;
+                xml.Load(FROMPATH(tmpFile));
+                wxXmlNode* raiz = xml.GetRoot();
+                if (raiz == NULL) {
+                        m_Error = "XML invalid";
+                        return;
+                }
+                if (raiz->GetName() == wxT("ginkgo")) {
+                        wxString propVal;
+
+                        for (wxXmlNode* nodo = raiz->GetChildren(); nodo != NULL; nodo = nodo->GetNext()) {
+
+                                if (nodo->GetName() == wxT("version")) {
+                                        m_Version = std::string(nodo->GetNodeContent().Trim().ToUTF8());
+                                } else if (nodo->GetName() == wxT("revision")) {
+                                        long val;
+                                        if ( nodo->GetNodeContent().Trim().ToLong(&val) ) {
+                                                if (val >= 0) {
+                                                        m_Revision = (int) val;
+                                                }
+                                        }
+                                } else if (nodo->GetName() == wxT("description")) {
+                                        m_Description = std::string(nodo->GetNodeContent().Trim().ToUTF8());
+                                } else if (nodo->GetName() == wxT("url")) {
+                                        m_URL = std::string(nodo->GetNodeContent().Trim().ToUTF8());
+                                }
+                        }
+                }
+
+                if (m_URL.empty()) {
+                        m_Error = _Std("Not enough parameters found on XML");
+                        Abort();
+                        return;
+                }
+
+                //Sleep(3000);
+        } catch (...) {
+                m_Error = _Std("XML parsing internal error");
+                Abort();
+        }
+}
+
+void GNC::ComandoComprobarActualizaciones::Update()
+{
+
+        if (m_Error.size() > 0) {
+                LOG_ERROR("Core/Update", m_Error);
+                if (m_pComprobarActualizacionesParams->m_Informar) {
+                        wxMessageBox(_("Error checking application updates"), _("Ginkgo CADx updates"), wxICON_ERROR);
+                }
+                return;
+        }
+
+        if (EstaAbortado()) {
+                return;
+        }
+        try {
+
+                GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoUpdateAvailable(m_Version, m_Revision, m_Description, m_URL, m_pComprobarActualizacionesParams->m_Informar));
+        } catch (...) {
+                LOG_ERROR("CORE/Updates", _Std("Internal error checking updates"));
+        }
+
+}
+
+
diff --git a/cadxcore/commands/comandoactualizaciones.h b/cadxcore/commands/comandoactualizaciones.h
new file mode 100644
index 0000000..d2ebb3e
--- /dev/null
+++ b/cadxcore/commands/comandoactualizaciones.h
@@ -0,0 +1,76 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/icommand.h>
+#include <api/autoptr.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+
+namespace GNC
+{
+class ComandoComprobarActualizaciones;
+
+class ComandoComprobarActualizacionesParams : public GNC::GCS::IComandoParams
+{
+public:
+        ComandoComprobarActualizacionesParams(const std::string& url, bool informar = false);
+
+        virtual ~ComandoComprobarActualizacionesParams();
+
+        std::string                     m_URL;
+        bool                            m_Informar;
+
+};
+
+class ComandoComprobarActualizaciones : public GNC::GCS::IComando
+{
+public:
+
+        ComandoComprobarActualizaciones(ComandoComprobarActualizacionesParams* pParams);
+
+        const std::string& GetError() const;
+        const std::string& GetVersion() const;
+        const std::string& GetDescription() const;
+        int GetRevision() const;
+
+protected:
+
+        virtual void Execute();
+        virtual void Update();
+
+protected:
+
+        ComandoComprobarActualizacionesParams* m_pComprobarActualizacionesParams;
+        std::string                            m_Error;
+
+private:
+        std::string m_Version;
+        int         m_Revision;
+        std::string m_Description;
+        std::string m_URL;
+};
+}
diff --git a/cadxcore/commands/comandocalibrado.h b/cadxcore/commands/comandocalibrado.h
new file mode 100644
index 0000000..8131c7c
--- /dev/null
+++ b/cadxcore/commands/comandocalibrado.h
@@ -0,0 +1,84 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+//#define _GINKGO_TRACE
+#include <api/globals.h>
+#include <api/icommand.h>
+#include <api/ientorno.h>
+#include <exception>
+#include "inotificadorcalibrado.h"
+//#include <AVL.h>
+//
+//
+//namespace GNC{
+//	namespace GUI{
+//		struct TPuntoCalibrado;
+//	}
+//}
+//
+//namespace GADAPI {
+//
+//	class CalibradoParamsException : public GNC::GCS::IException {
+//	public:
+//		CalibradoParamsException(std::string& message) throw() {m_message=message;}
+//		 ~CalibradoParamsException() throw() {}
+//		 std::string GetMensage(){return m_message;}
+//	protected:
+//		 std::string m_message;
+//	};
+//
+//
+//	class ComandoCalibradoParams : public IComandoParams {
+//	public:
+//		typedef MEF_ImagenRGBLight TImagenCalibrado;
+//		TImagenCalibrado m_imagen;
+//		double spacing[3];
+//		std::list<GNC::GUI::TPuntoCalibrado> m_Puntos;
+//		INotificadorCalibrado* m_pNotificador;
+//
+//		ComandoCalibradoParams(vtkImageData* pImagenOriginal,int slice,INotificadorCalibrado* pNotificador) ;
+//
+//		~ComandoCalibradoParams();
+//
+//	};
+//
+//	class ComandoCalibrado : public IComando {
+//	public:
+//		ComandoCalibrado(ComandoCalibradoParams* pParams);
+//		~ComandoCalibrado();
+//
+//		void Execute();
+//
+//		void Abort();
+//		void Update();
+//
+//		void SetNotificadorProgreso(GNC::INotificadorProgreso* pNotificador);
+//		void SetNotificadorProgresoAlternativo(GNC::INotificadorProgreso* pNotificador);
+//
+//		void NotificarProgreso(float progresoNormalizado,const std::string &texto);
+//
+//		void LiberarRecursos();
+//
+//	protected:
+//		ComandoCalibradoParams* m_pCalibradoParams;
+//		GNC::INotificadorProgreso* m_pNotificadorProgresoAlternativo;
+//	};
+//}
diff --git a/cadxcore/commands/comandocarga.cpp b/cadxcore/commands/comandocarga.cpp
new file mode 100644
index 0000000..04dea7d
--- /dev/null
+++ b/cadxcore/commands/comandocarga.cpp
@@ -0,0 +1,155 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+#include <wx/msgdlg.h>
+
+#include <api/globals.h>
+#include <api/ivista.h>
+#include <api/istudycontext.h>
+
+#include <api/controllers/icontroladorvistas.h>
+#include <api/imodelointegracion.h>
+#include <api/controllers/icontroladorcarga.h>
+#include <api/internationalization/internationalization.h>
+
+#include <main/entorno.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/controladorcarga.h>
+#include <main/controllers/controladorlog.h>
+
+
+#include "comandocarga.h"
+
+#define IDC_CARGA       91
+
+GADAPI::ComandoCargaParams::ComandoCargaParams(GNC::GCS::IVista* pVista, const bool loadFirst)
+{
+        IVista = pVista;
+        Padre = NULL;
+        GNC::Entorno* pEntorno = GNC::Entorno::Instance();
+        LoadFirst = loadFirst;
+        pEntorno->ViewsObservers.push_back(this);
+}
+
+GADAPI::ComandoCargaParams::~ComandoCargaParams()
+{
+        GNC::Entorno* pEntorno = GNC::Entorno::Instance();
+        pEntorno->ViewsObservers.remove(this);
+}
+
+void GADAPI::ComandoCargaParams::OnVistaDestruida(GNC::GCS::IVista* pVista)
+{
+        if (IVista == pVista) {
+                Padre->Abort();
+                if (IVista != NULL) {
+                        GNC::GCS::ILocker lock(pVista);
+                        IVista->DetenerPipeline();
+                        IVista = NULL;
+                }
+        }
+}
+
+GADAPI::ComandoCarga::ComandoCarga(ComandoCargaParams* pParams) : IComando(pParams, "ComandoCarga")
+{
+        CargaParams = pParams;
+        CargaParams->Padre = this;
+        SetId(IDC_CARGA);
+        EsperaA(IDC_CARGA);
+        CargaParams->IVista->OnCargaIniciada();
+}
+
+void GADAPI::ComandoCarga::Execute()
+{
+        std::string tarea(_Std("Loading..."));
+        GNC::GCS::ILocker lock(CargaParams->IVista);
+
+        if (!EstaAbortado()) {
+                try {
+                        //se le da la oportunidad a la vista de que haga cosas asincronas con la interfaz, por ejemplo reordenar ficheros
+                        CargaParams->IVista->CargarEstudio(this);
+                        if (CargaParams->LoadFirst) {
+                                GNC::GCS::Ptr<GNC::GCS::IStudyContext> estudio = CargaParams->IVista->GetEstudio();
+
+                                if (!estudio->GetImagePaths().empty()) {
+                                        estudio->Loader->SetInput(estudio->GetImagePaths().front());
+                                } else {
+                                        Error = _Std("Series path couldn't be found");
+                                }
+                        }
+                } catch( GNC::GCS::VistaException& ex ) {
+                        Error = _Std("Exception loading:") + " " + ex.GetCause();
+                } catch (GNC::GCS::ControladorCargaException& ex) {
+                        Error = _Std("Exception loading:") + " " + ex.GetCause();
+                } catch (...) {
+                        Error = _Std("Study malformed or unsupported");
+                }
+        }
+
+        //GTRACE("Saliendo comando carga ");
+}
+
+void GADAPI::ComandoCarga::Update()
+{
+
+        bool detener = false;
+
+        if (Error.size() == 0) {
+
+                if (CargaParams->IVista == NULL) {
+                        LOG_ERROR("ControladorCarga", "Vista destruida sin notificar al proceso de carga. Inconsistencia interna");
+                        return;
+                }
+
+                try {
+                        LOG_TRACE("ControladorCarga", "Se invoca el iniciar pipeline de la vista");
+                        CargaParams->IVista->IniciarPipeline();
+
+                        CargaParams->IVista->SetCargada(true);
+                        GNC::GCS::ControladorVistas::Instance()->SetTitulo(CargaParams->IVista, CargaParams->IVista->GetTitulo());
+                        CargaParams->IVista->OnCargaFinalizada();
+                } catch (GNC::GCS::VistaException& ex) {
+                        Error = _Std("Error loading study: ") + ex.GetCause();
+                        detener = true;
+                } catch (const std::bad_alloc&) {
+                        Error = _Std("Error loading study insufficient memory");
+                        detener = true;
+                } catch (const std::exception& ex) {
+                        Error = _Std("Error loading study: ") + std::string(ex.what());
+                        detener = true;
+                } catch (...) {
+                        Error = _Std("Error loading study.");
+                        detener = true;
+                }
+        } else {
+                LOG_DEBUG("ControladorCarga",  _Std("Load canceled by user"));
+                detener = true;
+        }
+
+        if (detener) {
+                if (Error.size() > 0) {
+                        LOG_ERROR("ControladorCarga", Error);
+                        wxMessageBox(wxString::FromUTF8(Error.c_str()), _("Error loading study"), wxICON_ERROR);
+                }
+        }
+
+
+}
+
diff --git a/cadxcore/commands/comandocarga.h b/cadxcore/commands/comandocarga.h
new file mode 100644
index 0000000..1af720a
--- /dev/null
+++ b/cadxcore/commands/comandocarga.h
@@ -0,0 +1,70 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/icommand.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/autoptr.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+
+namespace GADAPI
+{
+class ComandoCarga;
+
+class ComandoCargaParams : public GNC::GCS::IComandoParams, public GNC::GCS::IObservadorVistas
+{
+public:
+        ComandoCargaParams(GNC::GCS::IVista* pVista, const bool loadFirst);
+
+        virtual ~ComandoCargaParams();
+
+        virtual void OnVistaDestruida(GNC::GCS::IVista* pVista);
+
+        GNC::GCS::IVista*               IVista;
+        ComandoCarga*                   Padre;
+        bool									  LoadFirst;
+
+};
+
+class ComandoCarga : public GNC::GCS::IComando
+{
+public:
+
+        ComandoCarga(ComandoCargaParams* pParams);
+
+protected:
+
+        virtual void Execute();
+        virtual void Update();
+
+protected:
+
+        ComandoCargaParams* CargaParams;
+        std::string         Error;
+
+};
+}
diff --git a/cadxcore/commands/comandodestruirvista.cpp b/cadxcore/commands/comandodestruirvista.cpp
new file mode 100644
index 0000000..b533144
--- /dev/null
+++ b/cadxcore/commands/comandodestruirvista.cpp
@@ -0,0 +1,66 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+#include <wx/msgdlg.h>
+
+#include <api/globals.h>
+#include <api/ivista.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/imodelointegracion.h>
+#include <api/controllers/icontroladorcarga.h>
+#include <main/entorno.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/controladorlog.h>
+#include "comandodestruirvista.h"
+
+#define IDC_DESTRUIR       101
+
+GADAPI::ComandoDestruirVistaParams::ComandoDestruirVistaParams(GNC::GCS::IVista* pVista)
+{
+        m_pVista = pVista;
+}
+
+GADAPI::ComandoDestruirVistaParams::~ComandoDestruirVistaParams()
+{
+}
+
+
+GADAPI::ComandoDestruirVista::ComandoDestruirVista(ComandoDestruirVistaParams* pParams) : IComando(pParams, "ComandoDestruirVista")
+{
+        GTRACE(">> ComandoDestruirVista::ComandoDestruirVista(): " << this);
+        m_pDestruirParams = pParams;
+        GTRACE("<< ComandoDestruirVista::ComandoDestruirVista(): " << this);
+}
+
+void GADAPI::ComandoDestruirVista::Execute()
+{
+
+}
+
+void GADAPI::ComandoDestruirVista::Update()
+{
+        if (!EstaAbortado()) {
+                //este destruir no destruye bien la ventana, hay que invocar a ventana principal!!
+
+                //GNC::GCS::ControladorVistas::Instance()->Destruir(m_pDestruirParams->m_pVista);
+        }
+}
+
diff --git a/cadxcore/commands/comandodestruirvista.h b/cadxcore/commands/comandodestruirvista.h
new file mode 100644
index 0000000..9f13192
--- /dev/null
+++ b/cadxcore/commands/comandodestruirvista.h
@@ -0,0 +1,62 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/icommand.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/autoptr.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+
+namespace GADAPI
+{
+class EXTAPI ComandoDestruirVistaParams : public GNC::GCS::IComandoParams
+{
+public:
+        ComandoDestruirVistaParams(GNC::GCS::IVista* pVista);
+
+        virtual ~ComandoDestruirVistaParams();
+
+        GNC::GCS::IVista*   m_pVista;
+};
+
+class EXTAPI ComandoDestruirVista : public GNC::GCS::IComando
+{
+public:
+
+        ComandoDestruirVista(ComandoDestruirVistaParams* pParams);
+
+        virtual void Execute();
+
+        virtual void Update();
+
+protected:
+
+        ComandoDestruirVistaParams* m_pDestruirParams;
+
+};
+}
diff --git a/cadxcore/commands/comandoexportacion.cpp b/cadxcore/commands/comandoexportacion.cpp
new file mode 100644
index 0000000..6a19b19
--- /dev/null
+++ b/cadxcore/commands/comandoexportacion.cpp
@@ -0,0 +1,271 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4996)
+#endif
+
+#include <sstream>
+
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <main/controllers/configurationcontroller.h>
+
+#include <api/globals.h>
+#include <api/ientorno.h>
+#include <api/dicom/idicommanager.h>
+#include <api/internationalization/internationalization.h>
+#include <api/controllers/icontroladorlog.h>
+
+#include <api/controllers/ipacscontroller.h>
+
+#include <main/entorno.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/gui/history3/historypanel3.h>
+
+#include <eventos/mensajes.h>
+
+#include "comandoexportacion.h"
+
+#include <itkImage.h>
+#include <itkRGBPixel.h>
+#include <itkGDCMImageIO.h>
+#include <itkJPEGImageIO.h>
+#include <itkPNGImageIO.h>
+#include <itkVectorResampleImageFilter.h>
+#include <itkLinearInterpolateImageFunction.h>
+#include <itkImageFileWriter.h>
+#include <api/istudycontext.h>
+
+#include <api/dicom/dcmdictionary.h>
+#include <commands/comandoincluirhistorial.h>
+
+
+
+namespace GADAPI
+{
+
+ComandoExportacionParams::ComandoExportacionParams(GNC::GCS::Ptr<GNC::GUI::TipoWizardExportacion>& pDatosPersistentes)
+{
+        m_pDatosPersistentes = pDatosPersistentes;
+        m_hasError = false;
+        if (pDatosPersistentes->m_target != GNC::GUI::TipoWizardExportacion::EXTERNAL_FOLDER) {
+                m_tempDir = GNC::Entorno::Instance()->CreateGinkgoTempDir();
+        }
+}
+
+ComandoExportacionParams::~ComandoExportacionParams()
+{
+}
+
+ComandoExportacion::ComandoExportacion(ComandoExportacionParams* pParams): GNC::GCS::IComando(pParams,"Exportacion")
+{
+        m_pExportacionParams = pParams;
+}
+
+void ComandoExportacion::Execute()
+{
+        if (!NotificarProgreso(0.0, _Std("Exporting files...")) )
+                return;
+
+        ExportarDICOM();
+
+        if (m_pExportacionParams->m_pDatosPersistentes->m_target == GNC::GUI::TipoWizardExportacion::OVERWRITE) {
+                GNC::GCS::HistoryController::FileModelList fileModelList;
+                for (std::list<long>::iterator it = m_pExportacionParams->m_pDatosPersistentes->ListOfSeriesPks.begin(); it != m_pExportacionParams->m_pDatosPersistentes->ListOfSeriesPks.end(); ++it) {
+                        GNC::GCS::HistoryController::Instance()->GetSeriesSortedFileModels((*it), fileModelList);
+                }
+                GNC::GCS::HistoryController::Instance()->UpdateFiles(fileModelList);
+        }
+}
+
+void ComandoExportacion::Update()
+{
+        switch (m_pExportacionParams->m_pDatosPersistentes->m_target) {
+        case GNC::GUI::TipoWizardExportacion::EXTERNAL_FOLDER: {
+                if (m_pExportacionParams->m_hasError) {
+                        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,m_pExportacionParams->m_Error, GNC::GCS::Events::EventoMensajes::StatusMessage,true, GNC::GCS::Events::EventoMensajes::Error));
+                } else {
+                        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL, _Std("Export has been finished successfully"), GNC::GCS::Events::EventoMensajes::StatusMessage,true, GNC::GCS::Events::EventoMensajes::Informacion));
+                }
+        }
+        break;
+        case GNC::GUI::TipoWizardExportacion::OVERWRITE: {
+                GNC::GUI::HistoryPanel3::Instance()->ReloadHistory();
+        }
+        break;
+        case GNC::GUI::TipoWizardExportacion::NEW_STUDY: {
+                //add to history...
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(m_pExportacionParams->m_outputPaths, false, GNC::GCS::HistoryController::TAA_MOVE);
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+                GNC::GCS::ICommandController::Instance()->ProcessAsync("Including...", pCmd, NULL);
+        }
+        break;
+        }
+}
+
+//endregion
+
+void ComandoExportacion::ExportarDICOM()
+{
+        GNC::GCS::Ptr<GNC::GUI::TipoWizardExportacion> pDatosPersistentes = m_pExportacionParams->m_pDatosPersistentes;
+        bool correcto = true;
+
+        std::list<std::string> resultado;
+        std::list<std::string> listaPaths;
+
+        if (!pDatosPersistentes->ListOfSeriesPks.empty()) {
+                for (std::list<long>::iterator itUIDs = pDatosPersistentes->ListOfSeriesPks.begin(); itUIDs != pDatosPersistentes->ListOfSeriesPks.end(); ++itUIDs) {
+                        GNC::GCS::HistoryController::StringList pathsSerie = GNC::GCS::HistoryController::Instance()->GetSeriesSortedPaths((*itUIDs));
+                        listaPaths.insert(listaPaths.begin(), pathsSerie.begin(), pathsSerie.end());
+                }
+        } else if (!pDatosPersistentes->ListOfDICOMPaths.empty()) {
+                listaPaths.insert(listaPaths.end(), pDatosPersistentes->ListOfDICOMPaths.begin(), pDatosPersistentes->ListOfDICOMPaths.end());
+        }
+
+        GIL::DICOM::IDICOMManager*	pDICOMManager;
+
+
+        wxString destino;
+
+        //update ids to get new study...
+        std::map<std::string, std::string> mapOfUIDs;
+        std::string stringTmp;
+        GIL::DICOM::DicomDataset baseUIDs;
+        //
+
+        int contador = 1;
+        for(std::list<std::string>::iterator it = listaPaths.begin(); it!= listaPaths.end(); ++it,++contador) {
+                wxString cadena = wxString::Format(_("Exporting file %d of %d"), (int)contador, (int)listaPaths.size());
+                if (!NotificarProgreso((float)contador/listaPaths.size(), std::string(cadena.ToUTF8())))
+                        return;
+
+                GIL::DICOM::DicomDataset base;
+
+                pDICOMManager = GNC::GCS::IEntorno::Instance()->GetPACSController()->CrearInstanciaDeDICOMManager();
+                pDICOMManager->CargarFichero((*it), base);
+
+                pDICOMManager->ActualizarJerarquia(pDatosPersistentes->m_base);
+
+                if (pDatosPersistentes->m_target == GNC::GUI::TipoWizardExportacion::NEW_STUDY) {
+                        baseUIDs.tags.clear();
+
+                        // GW: The original code didn't test whether the tag was actually found, and
+                        // so the first fail would create an UID for an empty value, and
+                        // for later calls the old value would be re-used (which would obvioulsy be wrong).
+                        // so now we just don't set the baseUID tags if they are not available
+                        // this may now reveal another bug.
+
+                        //study instance uid
+                        if (base.getTag(GKDCM_StudyInstanceUID, stringTmp)) {
+                                if (mapOfUIDs.find(stringTmp) == mapOfUIDs.end()) {
+                                        mapOfUIDs[stringTmp] = pDICOMManager->GetNewUID();
+                                }
+                                baseUIDs.tags[GKDCM_StudyInstanceUID] = mapOfUIDs[stringTmp];
+                        } else {
+                                LOG_INFO("Commands", "tag " << GKDCM_StudyInstanceUID << " not available");
+                        }
+
+                        //series instance uid
+                        if (base.getTag(GKDCM_SeriesInstanceUID, stringTmp)) {
+                                if (mapOfUIDs.find(stringTmp) == mapOfUIDs.end()) {
+                                        mapOfUIDs[stringTmp] = pDICOMManager->GetNewUID();
+                                }
+                                baseUIDs.tags[GKDCM_SeriesInstanceUID] = mapOfUIDs[stringTmp];
+                        } else {
+                                LOG_INFO("Commands", "tag " << GKDCM_SeriesInstanceUID << " not available");
+                        }
+
+                        //sop instance
+                        if (base.getTag(GKDCM_SOPInstanceUID, stringTmp)) {
+                                if (mapOfUIDs.find(stringTmp) == mapOfUIDs.end()) {
+                                        mapOfUIDs[stringTmp] = pDICOMManager->GetNewUID();
+                                }
+                                baseUIDs.tags[GKDCM_SOPInstanceUID] = mapOfUIDs[stringTmp];
+                        } else {
+                                LOG_INFO("Commands", "tag " << GKDCM_SOPInstanceUID << " not available");
+                        }
+                        //update uids
+                        pDICOMManager->ActualizarJerarquia(baseUIDs);
+                }
+
+                //anonimizar tags Ginkgo
+                if(!pDatosPersistentes->m_incluirTagsGinkgo) {
+                        pDICOMManager->AnonimizarTagsPrivados();
+                }
+
+
+                if (pDatosPersistentes->m_target == GNC::GUI::TipoWizardExportacion::OVERWRITE) {
+                        destino = FROMPATH((*it));
+                } else {
+                        destino = GetFichero(wxT("dcm"));
+                }
+
+                std::string destinoStd(TOPATH(destino));
+                correcto = correcto && pDICOMManager->AlmacenarFichero(destinoStd);
+                resultado.push_back(destinoStd);
+                m_pExportacionParams->m_outputPaths.push_back(destinoStd);
+                GNC::Entorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+        }
+
+        if(!correcto) {
+                m_pExportacionParams->m_Error = _Std("Error storing file, check the permissions over the directory.");
+                m_pExportacionParams->m_hasError = true;
+        }
+}
+
+
+wxString ComandoExportacion::GetFichero(const wxString& extension)
+{
+        wxString dir;
+        if (m_pExportacionParams->m_pDatosPersistentes->m_target == GNC::GUI::TipoWizardExportacion::EXTERNAL_FOLDER) {
+                dir = FROMPATH(m_pExportacionParams->m_pDatosPersistentes->m_pathDestino);
+        } else {
+                dir = FROMPATH(m_pExportacionParams->m_tempDir);
+        }
+
+        //if pathDestino is a file.. then return
+        if (!wxDirExists(dir)) {
+                return dir;
+        } else {
+                wxString destino(wxEmptyString);
+                std::string nombre (wxDateTime::Now().Format(_("image_%m-%d-%Y_")).ToUTF8());
+                std::string stdDir(TOPATH(dir));
+                std::string stdExtension(TOPATH(extension));
+                int indice=0;
+                //yy-mm-dd_imagen_indice
+                do {
+                        std::ostringstream ostr;
+                        ostr << stdDir << (char)wxFileName::GetPathSeparator() << nombre << indice++ << "." << stdExtension;
+                        destino = FROMPATH(ostr.str());
+                } while(wxFile::Exists(destino));
+                return destino;
+        }
+}
+};
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
diff --git a/cadxcore/commands/comandoexportacion.h b/cadxcore/commands/comandoexportacion.h
new file mode 100644
index 0000000..9896c84
--- /dev/null
+++ b/cadxcore/commands/comandoexportacion.h
@@ -0,0 +1,71 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/autoptr.h>
+
+#include <api/icommand.h>
+
+#include <main/gui/export/datospersistentesexportacion.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+
+namespace GADAPI
+{
+class ComandoExportacion;
+
+class ComandoExportacionParams : public GNC::GCS::IComandoParams
+{
+public:
+        ComandoExportacionParams(GNC::GCS::Ptr<GNC::GUI::TipoWizardExportacion>& pDatosPersistentes);
+
+        virtual ~ComandoExportacionParams();
+
+        GNC::GCS::Ptr<GNC::GUI::TipoWizardExportacion> m_pDatosPersistentes;
+        std::list<std::string> m_outputPaths;
+        std::string m_Error;
+        bool m_hasError;
+        std::string m_tempDir;
+};
+
+class ComandoExportacion : public GNC::GCS::IComando
+{
+public:
+
+        ComandoExportacion(ComandoExportacionParams* pParams);
+
+protected:
+
+        virtual void Execute();
+        virtual void Update();
+
+protected:
+        void ExportarDICOM();
+        wxString GetFichero(const wxString& extension);
+
+        ComandoExportacionParams* m_pExportacionParams;
+};
+}
diff --git a/cadxcore/commands/comandoincluirhistorial.cpp b/cadxcore/commands/comandoincluirhistorial.cpp
new file mode 100644
index 0000000..0dd2eca
--- /dev/null
+++ b/cadxcore/commands/comandoincluirhistorial.cpp
@@ -0,0 +1,330 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/msgdlg.h>
+
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/ivista.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/imodelointegracion.h>
+#include <api/controllers/icontroladorcarga.h>
+#include <api/dicom/imodelodicom.h>
+#include <main/entorno.h>
+#include "comandoincluirhistorial.h"
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <main/gui/history3/historypanel3.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/pacscontroller.h>
+
+#include "dialogopathssobreescribirbase.h"
+
+#define IDC_INCLUIR       101
+#define IDC_AVISAR		  102
+
+class SubComandoAvisarModelos : public GNC::GCS::IComando
+{
+public:
+        SubComandoAvisarModelos() : IComando(NULL)
+        {
+                SetId(IDC_AVISAR);
+        }
+
+        virtual void Execute()
+        {
+        }
+
+        virtual void Update()
+        {
+                GNC::GUI::HistoryPanel3::Instance()->RefreshSearch();
+        }
+
+        virtual void LiberarRecursos()
+        {
+        }
+
+protected:
+};
+
+namespace GADAPI
+{
+
+//lee un directorio en profundidad y lo incluye en el dicomdir
+namespace ComandoIncluirHistorial
+{
+ComandoIncluirHistorialParams::ComandoIncluirHistorialParams(const std::string& path, bool recursivo, GNC::GCS::HistoryController::TAddAction addAction) :
+        m_numberOfFiles(0),
+        m_path(path),
+        m_recursivo(recursivo),
+        m_abrirDespuesDeCargar(false),
+        m_informar(true),
+        m_addAction(addAction)
+
+{ }
+
+ComandoIncluirHistorialParams::ComandoIncluirHistorialParams(const std::list<std::string>& listaPaths, bool abrirDespuesDeCargar, GNC::GCS::HistoryController::TAddAction addAction) :
+        m_numberOfFiles(0),
+        m_recursivo(true),
+        m_abrirDespuesDeCargar(abrirDespuesDeCargar),
+        m_informar(true),
+        m_addAction(addAction)
+{
+        if (listaPaths.size() == 1) {
+                m_path = listaPaths.front();
+        } else {
+                m_listaPaths = listaPaths;
+        }
+}
+
+ComandoIncluirHistorialParams::~ComandoIncluirHistorialParams()
+{
+}
+
+
+ComandoIncluirHistorial::ComandoIncluirHistorial(ComandoIncluirHistorialParams* pParams) : IComando(pParams)
+{
+        GTRACE(">> ComandoCarga::ComandoCarga(): " << this);
+        m_pIncluirParams = pParams;
+        SetId(IDC_INCLUIR);
+        GTRACE("<< ComandoCarga::ComandoCarga(): " << this);
+}
+
+void ComandoIncluirHistorial::Execute()
+{
+        std::list<long>* insertedSeriesPtr = &(m_pIncluirParams->m_InsertedSeries);
+
+        NotificarProgreso(0.0f,_Std("Exploring directory ..."));
+
+        if(m_pIncluirParams->m_path != "") {
+                GNC::GCS::HistoryController::StringList listaFicheros;
+                wxString wxPath = FROMPATH(m_pIncluirParams->m_path);
+                if(wxFileExists(wxPath)) {
+                        wxFileName filename(wxPath);
+                        if(filename.GetExt().Lower() == wxT("dcm") || GIL::DICOM::PACSController::Instance()->EsDICOM(TOPATH(wxPath), false, true) ) {
+                                listaFicheros.push_back(m_pIncluirParams->m_path);
+
+                                GNC::GCS::HistoryController::Instance()->AddFiles(listaFicheros, m_pIncluirParams->m_ErrorList, insertedSeriesPtr, this, m_pIncluirParams->m_addAction);
+                                m_pIncluirParams->m_numberOfFiles += listaFicheros.size();
+                        } else if (GIL::DICOM::PACSController::Instance()->EsDICOM(TOPATH(wxPath), true, false)) {
+                                //it's a DICOMDIR file...
+                                NotificarProgreso(0.05f,_Std("Reading DICOMDIR ..."));
+                                IModeloDicom dicomDirModel;
+                                if(GIL::DICOM::PACSController::Instance()->LeerDicomDir(m_pIncluirParams->m_path,&dicomDirModel) && dicomDirModel.ListaPacientes().size()!=0) {
+                                        for (IModeloDicom::ListaPacientesType::const_iterator it = dicomDirModel.ListaPacientes().begin(); it != dicomDirModel.ListaPacientes().end(); ++it) {
+                                                const IModeloPaciente& p = *it;
+                                                for (IModeloPaciente::ListaEstudiosType::const_iterator it2 = p.ListaEstudios().begin(); it2 != p.ListaEstudios().end(); ++it2) {
+                                                        const IModeloEstudio& e = *it2;
+                                                        listaFicheros.clear();
+                                                        for (IModeloEstudio::ListaSeriesType::const_iterator it3 = e.ListaSeries().begin(); it3 != e.ListaSeries().end(); ++it3) {
+                                                                const IModeloSerie& s = *it3;
+                                                                for(IModeloSerie::ListaImagenesType::const_iterator it4 = s.ListaImagenes().begin(); it4 != s.ListaImagenes().end(); ++it4) {
+                                                                        const IModeloImagen& i = *it4;
+                                                                        if(i.GetPathImagen() != "") {
+                                                                                listaFicheros.push_back(i.GetPathImagen());
+                                                                        }
+                                                                }
+                                                        }
+                                                        GNC::GCS::HistoryController::Instance()->AddFiles(listaFicheros, m_pIncluirParams->m_ErrorList, insertedSeriesPtr, this, m_pIncluirParams->m_addAction);
+                                                        m_pIncluirParams->m_numberOfFiles += listaFicheros.size();
+                                                        SubComandoAvisarModelos * pCmd = new SubComandoAvisarModelos();
+                                                        GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Including files in the history .."),pCmd,NULL);
+                                                }
+                                        }
+                                }
+                        }
+                } else if (wxDirExists(wxPath) && m_pIncluirParams->m_recursivo) {
+                        //caso especial en el que se va avisando poco a poco...
+                        TListaListas listaListas;
+                        LeerDirectorioRecursivo(wxPath,listaListas);
+                        for (TListaListas::iterator it = listaListas.begin(); it != listaListas.end(); ++it) {
+                                //se incluyen "por paquetes los ficheros"
+                                GNC::GCS::HistoryController::Instance()->AddFiles((*it), m_pIncluirParams->m_ErrorList, insertedSeriesPtr, this, m_pIncluirParams->m_addAction);
+                                m_pIncluirParams->m_numberOfFiles += (*it).size();
+                                SubComandoAvisarModelos * pCmd = new SubComandoAvisarModelos();
+                                GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Including files in the history .."),pCmd,NULL);
+                        }
+                } else if(wxDirExists(wxPath)) {
+                        //leer el directorio normal
+                        wxDir dir;
+                        if (dir.Open(wxPath)) {
+                                wxString wxPathFich;
+                                bool cont = dir.GetFirst(&wxPathFich,wxEmptyString, wxDIR_FILES | wxDIR_DIRS);
+                                while (cont) {
+                                        wxPathFich = dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) + wxPathFich;
+                                        wxFileName filename(wxPathFich);
+                                        if(filename.GetExt().Lower() == wxT("dcm") || GIL::DICOM::PACSController::Instance()->EsDICOM(TOPATH(wxPathFich), false, true) ) {
+                                                std::string pathStd(TOPATH(wxPathFich));
+                                                listaFicheros.push_back(pathStd);
+                                        }
+                                        cont = dir.GetNext(&wxPathFich);
+                                }
+                        }
+                        GNC::GCS::HistoryController::Instance()->AddFiles(listaFicheros, m_pIncluirParams->m_ErrorList, insertedSeriesPtr, this, m_pIncluirParams->m_addAction);
+                        m_pIncluirParams->m_numberOfFiles += listaFicheros.size();
+                        SubComandoAvisarModelos * pCmd = new SubComandoAvisarModelos();
+                        GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Including files in the history .."),pCmd,NULL);
+                }
+        } else {
+                GNC::GCS::HistoryController::Instance()->AddFiles(m_pIncluirParams->m_listaPaths, m_pIncluirParams->m_ErrorList, insertedSeriesPtr, this, m_pIncluirParams->m_addAction);
+                m_pIncluirParams->m_numberOfFiles += m_pIncluirParams->m_listaPaths.size();
+        }
+        //remove duplicated series ids
+        std::set<long> setOfIds;
+        for (std::list<long>::iterator it = m_pIncluirParams->m_InsertedSeries.begin(); it != m_pIncluirParams->m_InsertedSeries.end(); ++it) {
+                setOfIds.insert((*it));
+        }
+        m_pIncluirParams->m_InsertedSeries.clear();
+        m_pIncluirParams->m_InsertedSeries.insert(m_pIncluirParams->m_InsertedSeries.begin(), setOfIds.begin(), setOfIds.end());
+}
+
+void  ComandoIncluirHistorial::LeerDirectorioRecursivo(wxString& dirPath, TListaListas& listaListasPaths, int profundidadMaxima, const int profundidadActual)
+{
+        {
+                std::ostringstream ostr;
+                ostr << _Std("Exploring directory ") << dirPath.ToUTF8();
+                NotificarProgreso(0.0f, ostr.str());
+                if (EstaAbortado()) {
+                        return;
+                }
+        }
+        TListaPaths listaCurrentPaths;
+        wxArrayString listaDirectoriosCurrent;
+        bool dicomEncontrado = false;
+        if(wxDirExists(dirPath)) {
+                //vaciar
+                wxDir dir;
+                if (dir.Open(dirPath)) {
+                        wxString fileName;
+                        //no se listan los ocultos
+                        bool cont = dir.GetFirst(&fileName,wxEmptyString,wxDIR_FILES | wxDIR_DIRS);
+                        while (cont) {
+                                fileName=dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) + fileName;
+                                if(wxDir::Exists(fileName) ) {
+                                        listaDirectoriosCurrent.push_back(fileName);
+                                } else if (wxFileExists(fileName)) {
+                                        wxFileName filename(fileName);
+                                        if(filename.GetExt().Lower() == wxT("dcm") || GIL::DICOM::PACSController::Instance()->EsDICOM(TOPATH(fileName), false, true) ) {
+                                                std::string pathStd(TOPATH(fileName));
+                                                listaCurrentPaths.push_back(pathStd);
+                                                dicomEncontrado = true;
+                                        }
+                                }
+                                cont = dir.GetNext(&fileName);
+                        }
+                }
+        } else if (wxFileExists(dirPath)) {
+                wxFileName filename(dirPath);
+                if(filename.GetExt().Lower() == wxT("dcm") || GIL::DICOM::PACSController::Instance()->EsDICOM(TOPATH(dirPath), false, true)) {
+                        std::string pathStd(TOPATH(dirPath));
+                        listaCurrentPaths.push_back(pathStd);
+                        dicomEncontrado = true;
+                }
+        }
+
+        int siguienteProfundidad = profundidadActual;
+        if(dicomEncontrado) {
+                //se resetea la profundidad actual
+                siguienteProfundidad = 0;
+        } else {
+                siguienteProfundidad ++;
+        }
+        if(siguienteProfundidad <= profundidadMaxima) {
+                for(wxArrayString::iterator it =listaDirectoriosCurrent.begin(); it != listaDirectoriosCurrent.end(); ++it) {
+                        LeerDirectorioRecursivo((*it),listaListasPaths,profundidadMaxima,siguienteProfundidad);
+                }
+        }
+
+        listaListasPaths.push_back(listaCurrentPaths);
+}
+
+void ComandoIncluirHistorial::Update()
+{
+        wxString message = wxT("");
+        message += _("Image acquisition finished.");
+        message += wxT(" ");
+        message += wxString::Format(_("There have been included %d images."), (int)(m_pIncluirParams->m_numberOfFiles));
+        message += wxT("\n");
+        if (m_pIncluirParams->m_ErrorList.size() > 0)
+                message += wxString::Format(_("\nThere are %d errors (see log for more detailed description)"), (int)(m_pIncluirParams->m_ErrorList.size()));
+
+        //log
+        {
+                std::ostringstream errorOstr;
+                if (!m_pIncluirParams->m_ErrorList.empty()) {
+
+                        bool first = true;
+                        for (GNC::GCS::HistoryController::TAddErrorList::iterator it = m_pIncluirParams->m_ErrorList.begin(); it != m_pIncluirParams->m_ErrorList.end(); ++it) {
+                                if ((*it).error == GNC::GCS::HistoryController::TAddError::TE_FileNotExist) {
+                                        if (first) {
+                                                errorOstr<< "\t" << _Std("This files doesn't exist:") << std::endl;
+                                                first = false;
+                                        }
+                                        errorOstr << "\t\t" << (*it).path << std::endl;
+                                }
+                        }
+                        first = true;
+                        for (GNC::GCS::HistoryController::TAddErrorList::iterator it = m_pIncluirParams->m_ErrorList.begin(); it != m_pIncluirParams->m_ErrorList.end(); ++it) {
+                                if ((*it).error == GNC::GCS::HistoryController::TAddError::TE_WrongFormat) {
+                                        if (first) {
+                                                errorOstr<< "\t" << _Std("This files doesn't have DICOM format:") << std::endl;
+                                                first = false;
+                                        }
+                                        errorOstr << "\t\t" << (*it).path << std::endl;
+                                }
+                        }
+
+                        first = true;
+                        for (GNC::GCS::HistoryController::TAddErrorList::iterator it = m_pIncluirParams->m_ErrorList.begin(); it != m_pIncluirParams->m_ErrorList.end(); ++it) {
+                                if ((*it).error == GNC::GCS::HistoryController::TAddError::TE_DICOMDir) {
+                                        if (first) {
+                                                errorOstr << "\t" <<_Std("This files are Dicom Dirs:") << std::endl;
+                                                first = false;
+                                        }
+                                        errorOstr << "\t\t" << (*it).path << std::endl;
+                                }
+                        }
+                }
+
+                std::string errorString = errorOstr.str();
+                if (!errorString.empty()) {
+                        LOG_ERROR("ComandoIncluirHistorial", errorOstr.str());
+                }
+        }
+
+        GNC::GUI::HistoryPanel3::Instance()->ReloadCombos(false);
+        GNC::GUI::HistoryPanel3::Instance()->RefreshSearch();
+        const int MAX_OPENED_STUDIES = 3;
+        if (m_pIncluirParams->m_abrirDespuesDeCargar) {
+                std::set<long> openedStudies;
+                for (std::list<long>::iterator it = m_pIncluirParams->m_InsertedSeries.begin(); it != m_pIncluirParams->m_InsertedSeries.end() && openedStudies.size() < MAX_OPENED_STUDIES; ++it) {
+                        GNC::GCS::HistoryController::SeriesModel seriesModel = GNC::GCS::HistoryController::Instance()->GetSeriesModel((*it));
+                        GNC::GUI::HistoryPanel3::Instance()->OpenSeriesOrStudy(seriesModel.study_fk, false);
+                }
+        }
+}
+}
+}
+
diff --git a/cadxcore/commands/comandoincluirhistorial.h b/cadxcore/commands/comandoincluirhistorial.h
new file mode 100644
index 0000000..72c0a62
--- /dev/null
+++ b/cadxcore/commands/comandoincluirhistorial.h
@@ -0,0 +1,83 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <list>
+#include <set>
+
+#include <api/api.h>
+#include <api/icommand.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/controllers/ihistorycontroller.h>
+
+#include <wx/string.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+
+namespace GADAPI
+{
+//lee un directorio en profundidad y lo incluye en el dicomdir
+namespace ComandoIncluirHistorial
+{
+class ComandoIncluirHistorial;
+class EXTAPI ComandoIncluirHistorialParams : public GNC::GCS::IComandoParams
+{
+public:
+        ComandoIncluirHistorialParams(const std::string& path, bool recursivo = false, GNC::GCS::IHistoryController::TAddAction addAction = GNC::GCS::IHistoryController::TAA_COPY);
+        ComandoIncluirHistorialParams(const std::list<std::string>& listaPaths, bool abrirDespuesDeCargar = false, GNC::GCS::IHistoryController::TAddAction addAction  = GNC::GCS::IHistoryController::TAA_COPY);
+        virtual ~ComandoIncluirHistorialParams();
+
+        int m_numberOfFiles;
+        std::string m_path;
+        std::list<std::string> m_listaPaths;
+        bool m_recursivo;
+        GNC::GCS::IHistoryController::TAddErrorList m_ErrorList;
+        std::list<long>                             m_InsertedSeries;
+        bool m_abrirDespuesDeCargar;
+        bool m_informar;
+        GNC::GCS::IHistoryController::TAddAction m_addAction;
+};
+
+class EXTAPI ComandoIncluirHistorial : public GNC::GCS::IComando
+{
+public:
+        typedef std::list<std::string> TListaPaths;
+        typedef std::list<TListaPaths> TListaListas;
+
+        ComandoIncluirHistorial(ComandoIncluirHistorialParams* pParams);
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+private:
+        void LeerDirectorioRecursivo(wxString& path, TListaListas& listaListasPaths, const int profundidadMaxima = 10, const int profundidadActual=0);
+protected:
+
+        ComandoIncluirHistorialParams* m_pIncluirParams;
+};
+}
+}
diff --git a/cadxcore/commands/comandopacs.cpp b/cadxcore/commands/comandopacs.cpp
new file mode 100644
index 0000000..b67ce25
--- /dev/null
+++ b/cadxcore/commands/comandopacs.cpp
@@ -0,0 +1,164 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+
+#include <sstream>
+#include <map>
+
+#include <api/api.h>
+#include <api/globals.h>
+#include <api/ientorno.h>
+
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/commandcontroller.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/dicom/dcmuiddictionary.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include <main/controllers/storedqueriescontroller.h>
+
+#include <eventos/mensajes.h>
+
+#include <main/controllers/dcmtk/dicomservers.h>
+
+#include "comandopacs.h"
+#include "comandoincluirhistorial.h"
+
+
+
+#define IDC_PACS_BUSCAR                  61
+#define IDC_PACS_DESCARGAR               62
+#define IDC_PACS_SUBIR			         64
+
+#define ID_REFRESCO_PROGRESO 1
+
+#define PARALLEL
+
+// Singleton de persistencia
+namespace GADAPI
+{
+ComandoPACSParams::ComandoPACSParams(const GNC::GCS::Ptr<GNC::GCS::StoredQuery>& query) :
+        pQuery(query),
+        m_apResults(new TSearchResultList())
+{
+        if (pQuery->getPacsId().empty()) {
+                if(!DicomServerList::Instance()->Empty()) {
+                        pQuery->setPacsId(DicomServerList::Instance()->GetDefaultServer()->ID);
+                        LOG_DEBUG("COMANDOPACS", "Unspecified pacs ID, selecting " << pQuery->getPacsId());
+                } else {
+                        throw GIL::DICOM::PACSException(_Std("There is not any Remote PACS configured"));
+                }
+        }
+
+        m_informar=true;
+        m_error = "";
+}
+
+ComandoPACSParams::~ComandoPACSParams()
+{
+}
+
+
+ComandoPACS::ComandoPACS(ComandoPACSParams* pParams) : IComando(pParams)
+{
+        m_pPACSParams = pParams;
+
+        SetId(IDC_PACS_BUSCAR);
+#if !defined(PARALLEL)
+        EsperaA(IDC_PACS_BUSCAR);
+        EsperaA(IDC_PACS_DESCARGAR);
+        EsperaA(IDC_PACS_SUBIR);
+#endif
+}
+
+void ComandoPACS::Execute()
+{
+        std::string tarea=_Std("Querying PACS ...");
+        if (!NotificarProgreso(0.0f,tarea)) {
+                return;
+        }
+        GIL::DICOM::IPACSController* pCI = NULL;
+        try {
+
+                pCI = GNC::GCS::IEntorno::Instance()->GetPACSController();
+                if (pCI == NULL) {
+                        throw GIL::DICOM::PACSException(_Std("Error accessing the controller subsystem integration: (GIL:: DICOM)."));
+                }
+
+                pCI->GetConnection(this);
+
+                std::string mensaje = _Std("Starting Search ...");
+                if ( !NotificarProgreso(0.0f, mensaje) ) {
+                        return;
+                }
+
+                GIL::DICOM::DicomDataset query;
+                m_pPACSParams->pQuery->buildQuery(query);
+                pCI->Query(this, GKUID_FINDStudyRootQueryRetrieveInformationModel, query, *(m_pPACSParams->m_apResults), m_pPACSParams->pQuery->getPacsId(), this);
+
+        } catch (GinkgoNoServerFoundException& ) {
+                m_pPACSParams->m_error= _Std("Server ID not found. ID = ") + m_pPACSParams->pQuery->getPacsId();
+        } catch (GIL::DICOM::PACSException& ex) {
+                m_pPACSParams->m_error= _Std("Query error with PACS Id ") + m_pPACSParams->pQuery->getPacsId() + "\n" + (const std::string)ex;
+        } catch (GIL::DICOM::ModelException& ex) {
+                m_pPACSParams->m_error= _Std("Query error with PACS Id ") + m_pPACSParams->pQuery->getPacsId() + "\n" + (const std::string)ex;
+        } catch (std::exception& ex) {
+                m_pPACSParams->m_error= _Std("Query error with PACS Id ") + m_pPACSParams->pQuery->getPacsId() + "\n" + ex.what();
+        } catch ( ... ) {
+                m_pPACSParams->m_error= _Std("Query error with PACS Id ") + m_pPACSParams->pQuery->getPacsId() + "\n" + _Std("Internal error");
+        }
+        if (pCI) {
+                pCI->ReleaseConnection(this);
+        }
+        if (!NotificarProgreso(1.0f,tarea)) {
+                return;
+        }
+}
+
+void ComandoPACS::Update()
+{
+        if (EstaAbortado()) {
+                return;
+        }
+
+        if(!m_pPACSParams->m_error.empty()) {
+                LOG_ERROR("C-FIND", "Error searching on PACS:\n"  << m_pPACSParams->m_error);
+                if (m_pPACSParams->m_informar) {
+                        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL, _Std("Failed to perform search: ") + "\n" + m_pPACSParams->m_error, GNC::GCS::Events::EventoMensajes::PopUpMessage,false, GNC::GCS::Events::EventoMensajes::Error));
+                }
+                m_pPACSParams->m_informar = false;
+
+        }
+}
+
+
+bool ComandoPACS::NotificarProgreso(float progresoNormalizado,const std::string &texto)
+{
+        if (EstaAbortado()) {
+                return false;
+        }
+        return IComando::NotificarProgreso(progresoNormalizado, texto);
+}
+
+void ComandoPACS::LiberarRecursos()
+{
+}
+
+}
diff --git a/cadxcore/commands/comandopacs.h b/cadxcore/commands/comandopacs.h
new file mode 100644
index 0000000..64332ea
--- /dev/null
+++ b/cadxcore/commands/comandopacs.h
@@ -0,0 +1,85 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+//#define _GINKGO_TRACE
+#include <api/globals.h>
+#include <api/icommand.h>
+#include <api/ivista.h>
+#include <api/autoptr.h>
+#include <api/dicom/imodelodicom.h>
+#include <api/controllers/ipacscontroller.h>
+
+#include <main/controllers/dcmtk/dicomservers.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class StoredQuery;
+}
+}
+
+namespace GIL
+{
+class IModeloIntegracion;
+namespace DICOM
+{
+class IPACSController;
+}
+}
+
+namespace GADAPI
+{
+class ComandoPACSParams : public GNC::GCS::IComandoParams
+{
+public:
+        typedef std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> > TSearchResultList;
+        ComandoPACSParams(const GNC::GCS::Ptr<GNC::GCS::StoredQuery>& query) ;
+
+        virtual ~ComandoPACSParams();
+
+public:
+        GNC::GCS::Ptr<GNC::GCS::StoredQuery> pQuery;
+        GNC::GCS::Ptr<TSearchResultList> m_apResults;
+
+        bool                     m_informar;
+        std::string              m_error;
+};
+
+
+
+class EXTAPI ComandoPACS : public GNC::GCS::IComando
+{
+public:
+        ComandoPACS(ComandoPACSParams* pParams);
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+public:
+        virtual bool NotificarProgreso(float progresoNormalizado, const std::string &texto);
+
+        void LiberarRecursos();
+
+        ComandoPACSParams* m_pPACSParams;
+};
+}
diff --git a/cadxcore/commands/commandsynchronizewithgui.cpp b/cadxcore/commands/commandsynchronizewithgui.cpp
new file mode 100644
index 0000000..5fe658d
--- /dev/null
+++ b/cadxcore/commands/commandsynchronizewithgui.cpp
@@ -0,0 +1,58 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+//#define DUMP_IMAGENES
+#include <api/globals.h>
+#include "commandsynchronizewithgui.h"
+#include <main/controllers/controladoreventos.h>
+
+#define IDC_COMANDO_SYNCHRONIZE_WITH_GUI           116
+
+// Singleton de persistencia
+namespace GADAPI
+{
+CommandSynchronizeWithGUI::CommandSynchronizeWithGUI(ISynchronizedWithGUI* pParams, ISynchronizedData* pData, bool clearData):IComando(NULL)
+{
+        SetId(IDC_COMANDO_SYNCHRONIZE_WITH_GUI);
+        m_pListener = pParams;
+        m_pData = pData;
+        m_clearData = clearData;
+}
+
+CommandSynchronizeWithGUI::~CommandSynchronizeWithGUI()
+{
+        if (m_clearData && m_pData != NULL) {
+                delete m_pData;
+        }
+}
+
+void CommandSynchronizeWithGUI::Execute()
+{
+}
+
+void CommandSynchronizeWithGUI::Update()
+{
+        m_pListener->ExecuteSynchronized(m_pData);
+}
+
+}
+
+
diff --git a/cadxcore/commands/commandsynchronizewithgui.h b/cadxcore/commands/commandsynchronizewithgui.h
new file mode 100644
index 0000000..5dd2076
--- /dev/null
+++ b/cadxcore/commands/commandsynchronizewithgui.h
@@ -0,0 +1,62 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+//#define _GINKGO_TRACE
+#include <api/api.h>
+#include <api/globals.h>
+#include <api/icommand.h>
+#include <api/ientorno.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/imodelointegracion.h>
+
+namespace GADAPI
+{
+class EXTAPI ISynchronizedData
+{
+public:
+        ISynchronizedData() {}
+        virtual ~ISynchronizedData() {}
+};
+
+class EXTAPI ISynchronizedWithGUI
+{
+public:
+        virtual ~ISynchronizedWithGUI() {}
+
+        virtual void ExecuteSynchronized(GADAPI::ISynchronizedData* pData) = 0;
+};
+
+class EXTAPI CommandSynchronizeWithGUI : public GNC::GCS::IComando
+{
+public:
+        CommandSynchronizeWithGUI(ISynchronizedWithGUI* pParam, ISynchronizedData * pData = NULL, bool clearData = false);
+        virtual ~CommandSynchronizeWithGUI();
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+protected:
+        ISynchronizedWithGUI* m_pListener;
+        ISynchronizedData * m_pData;
+        bool m_clearData;
+};
+}
diff --git a/cadxcore/commands/dbmigrationcommand.cpp b/cadxcore/commands/dbmigrationcommand.cpp
new file mode 100644
index 0000000..ec76277
--- /dev/null
+++ b/cadxcore/commands/dbmigrationcommand.cpp
@@ -0,0 +1,141 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "dbmigrationcommand.h"
+
+#include <api/globals.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/ientorno.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <api/internationalization/internationalization.h>
+#include <eventos/progresocomando.h>
+#include <eventos/mensajes.h>
+
+#include "comandoincluirhistorial.h"
+
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/msgdlg.h>
+#include <wx/thread.h>
+#include <wx/wxsqlite3/wxsqlite3.h>
+#include <sqlite/sqlite3.h>
+
+#define IDC_MIGRATION 120
+
+
+GADAPI::DBMigrationCommandParams::DBMigrationCommandParams(const std::string& oldDicomDirPath,const std::string& newDicomDirPath, bool deleteAfterFinish)
+{
+        OldDicomDir = oldDicomDirPath;
+        NewDicomDir = newDicomDirPath;
+        DeleteAfterFinish = deleteAfterFinish;
+        SemaphoreWaitIncludeFiles = new wxSemaphore();
+}
+
+GADAPI::DBMigrationCommandParams::~DBMigrationCommandParams()
+{
+        delete SemaphoreWaitIncludeFiles;
+        SemaphoreWaitIncludeFiles = NULL;
+}
+
+
+GADAPI::DBMigrationCommand::DBMigrationCommand(DBMigrationCommandParams* pParams) : IComando(pParams)
+{
+        m_pMigrationParams = pParams;
+        SetId(IDC_MIGRATION);
+        GNC::GCS::IEventsController::Instance()->Registrar(this, GNC::GCS::Events::EventoProgresoComando());
+}
+
+void GADAPI::DBMigrationCommand::Execute()
+{
+        //trying to read linked files...
+        std::list<std::string> linkedFiles;
+        {
+                std::string pathFicheroDB;
+                std::string pathFicheroDBThumbnails;
+                {
+                        std::ostringstream ostr;
+                        ostr << m_pMigrationParams->OldDicomDir  << (char)wxFileName::GetPathSeparator(wxPATH_NATIVE) << "ginkgodatabase_2.1.db";
+                        pathFicheroDB = ostr.str();
+                }
+                if (wxFileExists(FROMPATH(pathFicheroDB))) {
+                        try {
+                                wxSQLite3Database connection;
+                                connection.Open(FROMPATH(pathFicheroDB));
+                                wxSQLite3StatementBuffer bufSQL;
+                                bufSQL.Format("Select distinct(file_path) from File");
+                                wxSQLite3ResultSet resultados = connection.ExecuteQuery(bufSQL);
+                                while (resultados.NextRow()) {
+                                        wxFileName fileName(resultados.GetAsString(0));
+                                        if (fileName.IsRelative()) {
+                                                fileName.MakeAbsolute(FROMPATH(m_pMigrationParams->OldDicomDir));
+                                        }
+                                        if (fileName.FileExists()) {
+                                                linkedFiles.push_back(std::string(TOPATH(fileName.GetFullPath())));
+                                        }
+                                }
+                        } catch (wxSQLite3Exception& ex) {
+                                LOG_WARN("BBDD", "error exploring old database, linked file could be lost " << ex.GetMessage());
+                        }
+                }
+
+        }
+        if (!linkedFiles.empty()) {
+                NotificarProgreso(0.0f,_Std("Migrating old DICOM Dir ..."));
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(linkedFiles,false, GNC::GCS::IHistoryController::TAA_LINK);
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+
+                GNC::CommandController::Instance()->ProcessAsync("Processing...",pCmd, m_pMigrationParams);
+                NotificarProgreso(0.05f,_Std("Including files ..."));
+                m_pMigrationParams->SemaphoreWaitIncludeFiles->Wait();
+        }
+        //
+        NotificarProgreso(0.0f,_Std("Migrating old DICOM Dir ..."));
+        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(m_pMigrationParams->OldDicomDir, true, GNC::GCS::IHistoryController::TAA_COPY);
+        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+
+        GNC::CommandController::Instance()->ProcessAsync("Processing...",pCmd, m_pMigrationParams);
+        NotificarProgreso(0.05f,_Std("Including files ..."));
+        m_pMigrationParams->SemaphoreWaitIncludeFiles->Wait();
+}
+
+void GADAPI::DBMigrationCommand::Update()
+{
+        if (m_pMigrationParams->DeleteAfterFinish) {
+                if (wxMessageBox(_("Migration finished successfully, now Ginkgo CADx will delete folder:\n") + FROMPATH(m_pMigrationParams->OldDicomDir) + _T("\n") + _("and all it's sub folders\nDo you confirm deletion?"), _("Info"), wxICON_WARNING|wxOK|wxCANCEL, GNC::GCS::IEntorno::Instance()->GetVentanaRaiz()) == wxOK) {
+                        GNC::GCS::IEntorno::Instance()->RemoveDirRecursive(m_pMigrationParams->OldDicomDir);
+                }
+        } else {
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL, _Std("Migration finisthed successfully"), GNC::GCS::Events::EventoMensajes::PopUpMessage));
+        }
+}
+
+void GADAPI::DBMigrationCommand::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        GNC::GCS::Events::EventoProgresoComando* pEvt = dynamic_cast<GNC::GCS::Events::EventoProgresoComando*> (evt);
+        if (pEvt == NULL  || pEvt->GetComando() == NULL || pEvt->GetComando()->GetOwner() != m_pMigrationParams) {
+                return;
+        }
+        if (pEvt->GetTipo() == GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado) {
+                m_pMigrationParams->SemaphoreWaitIncludeFiles->Post();
+        }
+}
+
diff --git a/cadxcore/commands/dbmigrationcommand.h b/cadxcore/commands/dbmigrationcommand.h
new file mode 100644
index 0000000..1a618ca
--- /dev/null
+++ b/cadxcore/commands/dbmigrationcommand.h
@@ -0,0 +1,57 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/icommand.h>
+#include <api/observers/ieventsobserver.h>
+
+class wxSemaphore;
+
+namespace GADAPI
+{
+//lee un directorio en profundidad y lo incluye en el dicomdir
+class EXTAPI DBMigrationCommandParams : public GNC::GCS::IComandoParams
+{
+public:
+        DBMigrationCommandParams(const std::string& oldDicomDirPath,const std::string& newDicomDirPath, bool deleteAfterFinish);
+        virtual ~DBMigrationCommandParams();
+
+        std::string OldDicomDir;
+        std::string NewDicomDir;
+        bool DeleteAfterFinish;
+        wxSemaphore* SemaphoreWaitIncludeFiles;
+};
+
+class EXTAPI DBMigrationCommand : public GNC::GCS::IComando, public GNC::GCS::IEventsObserver
+{
+public:
+
+        DBMigrationCommand(DBMigrationCommandParams* pParams);
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt) ;
+protected:
+
+        DBMigrationCommandParams* m_pMigrationParams;
+};
+}
diff --git a/cadxcore/commands/dialogopathssobreescribirbase.cpp b/cadxcore/commands/dialogopathssobreescribirbase.cpp
new file mode 100644
index 0000000..c424ede
--- /dev/null
+++ b/cadxcore/commands/dialogopathssobreescribirbase.cpp
@@ -0,0 +1,83 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "dialogopathssobreescribirbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+OverwriteDialogBase::OverwriteDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 700,209 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer3;
+        bSizer3 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelOverwrite = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelOverwrite->SetToolTip( _("Overwrite") );
+
+        wxBoxSizer* bSizer31;
+        bSizer31 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTextMessage = new wxStaticText( m_pPanelOverwrite, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pTextMessage->Wrap( -1 );
+        bSizer31->Add( m_pTextMessage, 0, 0, 0 );
+
+        m_staticText1 = new wxStaticText( m_pPanelOverwrite, wxID_ANY, _("Would you like to overwrite them?"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText1->Wrap( 440 );
+        bSizer31->Add( m_staticText1, 0, wxBOTTOM, 10 );
+
+        m_pPathList = new wxListBox( m_pPanelOverwrite, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+        m_pPathList->Hide();
+
+        bSizer31->Add( m_pPathList, 1, wxEXPAND|wxTOP, 5 );
+
+        m_pPanelOverwrite->SetSizer( bSizer31 );
+        m_pPanelOverwrite->Layout();
+        bSizer31->Fit( m_pPanelOverwrite );
+        bSizer6->Add( m_pPanelOverwrite, 1, wxEXPAND, 5 );
+
+        m_pBody->SetSizer( bSizer6 );
+        m_pBody->Layout();
+        bSizer6->Fit( m_pBody );
+        bSizer3->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button1 = new wxButton( m_pFooter, wxID_OK, _("Overwrite"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer4->Add( m_button1, 0, wxRIGHT, 5 );
+
+        m_button2 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button2->SetDefault();
+        bSizer4->Add( m_button2, 0, wxLEFT, 5 );
+
+        m_pFooter->SetSizer( bSizer4 );
+        m_pFooter->Layout();
+        bSizer4->Fit( m_pFooter );
+        bSizer3->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+        this->SetSizer( bSizer3 );
+        this->Layout();
+        bSizer3->Fit( this );
+
+        this->Centre( wxBOTH );
+}
+
+OverwriteDialogBase::~OverwriteDialogBase()
+{
+}
diff --git a/cadxcore/commands/dialogopathssobreescribirbase.h b/cadxcore/commands/dialogopathssobreescribirbase.h
new file mode 100644
index 0000000..5fe30d2
--- /dev/null
+++ b/cadxcore/commands/dialogopathssobreescribirbase.h
@@ -0,0 +1,64 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __dialogopathssobreescribirbase__
+#define __dialogopathssobreescribirbase__
+
+#include <wx/intl.h>
+
+class BodyPanel;
+class FooterPanel;
+class TitledPanel;
+
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/listbox.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class OverwriteDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class OverwriteDialogBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        wxStaticText* m_staticText1;
+        FooterPanel* m_pFooter;
+
+        wxButton* m_button1;
+        wxButton* m_button2;
+
+public:
+        TitledPanel* m_pPanelOverwrite;
+        wxStaticText* m_pTextMessage;
+        wxListBox* m_pPathList;
+
+        OverwriteDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Overwrite Paths"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~OverwriteDialogBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__dialogopathssobreescribirbase__
diff --git a/cadxcore/commands/dicomizationcompletebase.cpp b/cadxcore/commands/dicomizationcompletebase.cpp
new file mode 100644
index 0000000..87a7e77
--- /dev/null
+++ b/cadxcore/commands/dicomizationcompletebase.cpp
@@ -0,0 +1,86 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "dicomizationcompletebase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+DicomizationCompleteBase::DicomizationCompleteBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 500,250 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer3;
+        bSizer3 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetBackgroundColour( wxColour( 0, 0, 0 ) );
+        m_pHeader->SetToolTip( _("Dicomization complete") );
+
+        bSizer3->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBodyPanel = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelTitled = new TitledPanel( m_pBodyPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelTitled->SetToolTip( _("Dicomization complete") );
+
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticText8 = new wxStaticText( m_pPanelTitled, wxID_ANY, _("Dicomization finished successfully"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText8->Wrap( -1 );
+        bSizer16->Add( m_staticText8, 0, wxALL, 5 );
+
+        m_pPanelTitled->SetSizer( bSizer16 );
+        m_pPanelTitled->Layout();
+        bSizer16->Fit( m_pPanelTitled );
+        bSizer7->Add( m_pPanelTitled, 0, wxEXPAND, 5 );
+
+        m_pBodyPanel->SetSizer( bSizer7 );
+        m_pBodyPanel->Layout();
+        bSizer7->Fit( m_pBodyPanel );
+        bSizer3->Add( m_pBodyPanel, 1, wxEXPAND, 5 );
+
+        m_panel12 = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pCheckNotShow = new wxCheckBox( m_panel12, wxID_ANY, _("Don't show this message again"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer15->Add( m_pCheckNotShow, 0, wxALL, 5 );
+
+
+        bSizer15->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button5 = new wxButton( m_panel12, wxID_CANCEL, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button5->SetDefault();
+        bSizer15->Add( m_button5, 0, wxRIGHT, 5 );
+
+        m_panel12->SetSizer( bSizer15 );
+        m_panel12->Layout();
+        bSizer15->Fit( m_panel12 );
+        bSizer3->Add( m_panel12, 0, wxEXPAND, 5 );
+
+        this->SetSizer( bSizer3 );
+        this->Layout();
+        bSizer3->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DicomizationCompleteBase::OnYesClick ), NULL, this );
+}
+
+DicomizationCompleteBase::~DicomizationCompleteBase()
+{
+        // Disconnect Events
+        m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DicomizationCompleteBase::OnYesClick ), NULL, this );
+
+}
diff --git a/cadxcore/commands/dicomizationcompletebase.h b/cadxcore/commands/dicomizationcompletebase.h
new file mode 100644
index 0000000..be94a40
--- /dev/null
+++ b/cadxcore/commands/dicomizationcompletebase.h
@@ -0,0 +1,71 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __dicomizationcompletebase__
+#define __dicomizationcompletebase__
+
+#include <wx/intl.h>
+
+class BodyPanel;
+class FooterPanel;
+class HeaderPanel;
+class TitledPanel;
+
+#include <wx/panel.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/sizer.h>
+#include <wx/checkbox.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DicomizationCompleteBase
+///////////////////////////////////////////////////////////////////////////////
+class DicomizationCompleteBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBodyPanel;
+        TitledPanel* m_pPanelTitled;
+        wxStaticText* m_staticText8;
+        FooterPanel* m_panel12;
+
+        wxButton* m_button5;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnYesClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+        wxCheckBox* m_pCheckNotShow;
+
+        DicomizationCompleteBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Dicomization complete"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~DicomizationCompleteBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__dicomizationcompletebase__
diff --git a/cadxcore/commands/dicomizecommand.cpp b/cadxcore/commands/dicomizecommand.cpp
new file mode 100644
index 0000000..de74d7a
--- /dev/null
+++ b/cadxcore/commands/dicomizecommand.cpp
@@ -0,0 +1,532 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <sstream>
+#include <map>
+#include <cmath>
+#include <locale>
+
+#include <wx/msgdlg.h>
+#include <wx/filename.h>
+#include <wx/dir.h>
+#include <wx/file.h>
+#include <wx/xml/xml.h>
+#include <wx/mstream.h>
+#include <wx/image.h>
+
+#include <api/globals.h>
+#include <api/integration/dict.h>
+#include <api/controllers/ieventscontroller.h>
+#include <main/controllers/commandcontroller.h>
+#include <api/controllers/ipacscontroller.h>
+#include <api/internationalization/internationalization.h>
+
+#include <api/dicom/idicomizador.h>
+#include <api/dicom/idicommanager.h>
+
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/controllers/controladorhl7.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/inactivitycontroller.h>
+#include <main/controllers/integrationcontroller.h>
+#include <main/controllers/configurationcontroller.h>
+#include <eventos/progresocomando.h>
+
+#include <commands/sendpacscommand.h>
+#include <commands/comandoincluirhistorial.h>
+
+#include <export/tagsprivadoscomunes.h>
+#include <main/entorno.h>
+
+#include "dicomizecommand.h"
+#include "dicomizationcompletebase.h"
+
+#define IDC_DICOMIZACION_INTEGRACION           2030
+#define IDC_SUBCOMANDO_ADD_HISTORIAL           2031
+
+// Singleton de persistencia
+namespace GADAPI
+{
+
+DicomizeCommandParams::DicomizeCommandParams(const GNC::GCS::Ptr<GNC::GUI::ImportationData>& pDatosPersistentes, const std::string& dirTemporal)
+{
+        m_pSemaforoEsperarComando = new wxSemaphore();
+        if (pDatosPersistentes.IsValid()) {
+                m_pImportData = pDatosPersistentes;
+        } else {
+                m_pImportData = new GNC::GUI::ImportationData();
+        }
+
+        //se copia todo el directorio temporal a uno nuevo
+        wxString wxNuevoDirTemp = FROMPATH(GNC::Entorno::Instance()->CrearDirectorioTemporal());
+
+        wxDir dir;
+        if (!dirTemporal.empty()) {
+                if (dir.Open(FROMPATH(dirTemporal))) {
+                        wxString fileName;
+                        wxString destino;
+                        bool cont = dir.GetFirst(&fileName);
+
+                        while (cont) {
+                                destino = wxNuevoDirTemp + wxFileName::GetPathSeparator(wxPATH_NATIVE) + fileName;
+                                fileName=dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) +fileName;
+                                wxRenameFile(fileName,destino);
+                                for(GNC::GUI::ImportationData::TListOfFiles::iterator it = m_pImportData->m_SourceFiles.begin(); it!= m_pImportData->m_SourceFiles.end(); ++it) {
+                                        if ( FROMPATH((*it)) == fileName ) {
+                                                (*it) = TOPATH(destino);
+                                                break;
+                                        }
+                                }
+                                cont = dir.GetNext(&fileName);
+                        }
+                }
+        }
+        m_dirTemporal = TOPATH(wxNuevoDirTemp);
+        ///
+        m_mensajeError = "";
+        m_copiadoCorrecto = false;
+        m_importacionCorrecta = false;
+        m_openAfterDicomize = true;
+        m_pComandoEspera = NULL;
+        m_pParamsEspera = NULL;
+        //
+        GTRACE("<< DicomizeCommandParams::DicomizeCommandParams(): " << this);
+}
+
+DicomizeCommandParams::DicomizeCommandParams( const DicomizeCommandParams& o)
+{
+        (*this) = o;
+}
+
+DicomizeCommandParams& DicomizeCommandParams::operator = (const DicomizeCommandParams& o)
+{
+        this->m_pImportData = o.m_pImportData;
+        this->m_dirTemporal = o.m_dirTemporal;
+        this->m_openAfterDicomize = o.m_openAfterDicomize;
+
+        this->m_mensajeError = "";
+        this->m_copiadoCorrecto = o.m_copiadoCorrecto;
+        this->m_importacionCorrecta = o.m_importacionCorrecta;
+        this->m_listOfFiles = o.m_listOfFiles;
+
+        m_pSemaforoEsperarComando = new wxSemaphore();
+        m_pComandoEspera = NULL;
+        m_pParamsEspera = NULL;
+        return *this;
+}
+
+DicomizeCommandParams::~DicomizeCommandParams()
+{
+        if (m_pSemaforoEsperarComando != NULL) {
+                delete m_pSemaforoEsperarComando;
+                m_pSemaforoEsperarComando = NULL;
+        }
+}
+
+DicomizeCommand::DicomizeCommand(DicomizeCommandParams* pParams) : IComando(pParams)
+{
+        m_pIntegracionParams = pParams;
+        SetId(IDC_DICOMIZACION_INTEGRACION);
+        EsperaA(IDC_DICOMIZACION_INTEGRACION);
+
+        GNC::Entorno::Instance()->GetControladorEventos()->Registrar(this, GNC::GCS::Events::EventoProgresoComando());
+}
+
+void DicomizeCommand::Execute()
+{
+        NotificarProgreso(0.05f, _Std("Step 1 of 3: Importing images"));
+
+        if(!m_pIntegracionParams->m_importacionCorrecta) {
+                m_pIntegracionParams->m_importacionCorrecta = ImportarFicherosOriginales();
+        }
+        if(!m_pIntegracionParams->m_importacionCorrecta) {
+                return;
+        }
+
+        NotificarProgreso(0.40f, _Std("Step 2 of 3: Copying images"));
+        //despues se copian todos los dicoms...
+
+        if(!m_pIntegracionParams->m_copiadoCorrecto) {
+                m_pIntegracionParams->m_copiadoCorrecto = CopiarDicom();
+        }
+        if(!m_pIntegracionParams->m_copiadoCorrecto) {
+                return;
+        }
+
+        //ahora se suben al pacs...
+        NotificarProgreso(0.50f, _Std("Step 3 of 3: Uploading images"));
+
+        if(m_pIntegracionParams->m_pImportData->m_pIntegrationModel->GlobalVariables.Contains(GKDI_GLOBAL_PACS_STORE_SID)) {
+                SubirPACS();
+        }
+}
+
+void DicomizeCommand::Update()
+{
+        if(m_pIntegracionParams->m_mensajeError != "") {
+                GNC::GCS::InactivityController::Instance()->StopsMonitoring();
+                wxString mensaje = _("Import process failed:") + wxString(wxT("\n - ")) + wxString::FromUTF8(m_pIntegracionParams->m_mensajeError.c_str()) + _("\nWould you like to retry?");
+
+                int answer = wxMessageBox(mensaje,_("Info"),wxYES_NO | wxICON_INFORMATION, GNC::Entorno::Instance()->GetVentanaRaiz());
+                GNC::GCS::InactivityController::Instance()->RestartMonitoring();
+                if(answer == wxYES) {
+                        DicomizeCommandParams* pParams = new DicomizeCommandParams(*m_pIntegracionParams);
+                        DicomizeCommand* pCmd = new DicomizeCommand(pParams);
+                        GNC::Entorno::Instance()->GetCommandController()->ProcessAsync(_Std("Importing..."),pCmd,NULL);
+                } else {
+                        BorrarArchivosTemporales(FROMPATH(m_pIntegracionParams->m_dirTemporal));
+                        GNC::GCS::InactivityController::Instance()->KillNow();
+                }
+        } else {
+                BorrarArchivosTemporales(FROMPATH(m_pIntegracionParams->m_dirTemporal));
+                bool showMessage;
+                GNC::GCS::ConfigurationController::Instance()->readBoolUser("/GinkgoCore/Importation", "ShowFinishMessage", showMessage, true);
+                if (showMessage) {
+                        GNC::GUI::DicomizationCompleteBase dlg(GNC::Entorno::Instance()->GetVentanaRaiz());
+                        dlg.ShowModal();
+                        if (dlg.m_pCheckNotShow->IsChecked()) {
+                                GNC::GCS::ConfigurationController::Instance()->writeBoolUser("/GinkgoCore/Importation", "ShowFinishMessage", false);
+                        }
+                }
+                GNC::GCS::InactivityController::Instance()->KillNow();
+        }
+}
+
+void DicomizeCommand::OnAbort()
+{
+        BorrarArchivosTemporales(FROMPATH(m_pIntegracionParams->m_dirTemporal));
+}
+
+void DicomizeCommand::LiberarRecursos()
+{
+        BorrarArchivosTemporales(FROMPATH(m_pIntegracionParams->m_dirTemporal));
+}
+
+bool DicomizeCommand::ImportarFicherosOriginales()
+{
+        GIL::IStudyModel studyModel;
+        GNC::GUI::ImportationData& importationData = *m_pIntegracionParams->m_pImportData;
+        importationData.m_pIntegrationModel->Studies.push_back(studyModel);
+        GIL::ISeriesModel imageSeries = ImportOriginalFiles(false);
+        if (!imageSeries.Images.empty()) {
+                importationData.m_pIntegrationModel->Studies.front().Series.push_back(imageSeries);
+        }
+        GIL::ISeriesModel pdfSeries = ImportOriginalFiles(true);
+        if (!pdfSeries.Images.empty()) {
+                importationData.m_pIntegrationModel->Studies.front().Series.push_back(pdfSeries);
+        }
+        return (imageSeries.Images.size() + pdfSeries.Images.size()) == importationData.m_SourceFiles.size();
+}
+
+GIL::ISeriesModel DicomizeCommand::ImportOriginalFiles(bool pdfFiles)
+{
+        bool esElPrimero=true;
+        GIL::ISeriesModel seriesModel;
+
+        GIL::DICOM::IPACSController* pCI = GNC::Entorno::Instance()->GetPACSController();
+        GNC::GUI::ImportationData& importationData = *m_pIntegracionParams->m_pImportData;
+
+        if (importationData.m_pIntegrationModel->Studies.empty()) {
+                LOG_ERROR("ImportOriginalFiles", "study model must exists");
+                return seriesModel;
+        }
+        GIL::IStudyModel& studyModel = importationData.m_pIntegrationModel->Studies.front();
+
+        int instanceNumber = 0;
+        std::string seriesInstanceUID = "";
+        for(GNC::GUI::ImportationData::TListOfFiles::iterator it= importationData.m_SourceFiles.begin(); it!= importationData.m_SourceFiles.end(); ++it) {
+                if (pCI->EsPDF((*it)) != pdfFiles)
+                        continue;
+                GIL::DICOM::IDICOMImg2DCM* pI2D = NULL;
+                GIL::DICOM::IDICOMManager*	pDICOMManager = NULL;
+                try {
+                        pI2D = pCI->CrearInstanciaDeImportacion();
+                        std::string rutaFichero = (*it);
+
+                        pI2D->Inicializar(rutaFichero, NULL);
+
+                        std::string tag;
+
+                        //base comun
+                        GIL::DICOM::DicomDataset base = importationData.baseImages;
+
+                        if (seriesInstanceUID != "") {
+                                base.tags[std::string("0020|000e")] = seriesInstanceUID; //serie instance uid
+                        }
+
+                        //fecha imagen
+                        base.tags[std::string("0008|0022")] = wxDateTime::Now().Format(wxT("%Y%m%d")).ToUTF8();
+                        //hora imagen
+                        base.tags[std::string("0008|0032")] = wxDateTime::Now().Format(wxT("%H%M%S")).ToUTF8();
+
+
+                        //instance number
+                        {
+                                std::ostringstream ostr;
+                                ostr << instanceNumber++;
+                                base.tags[std::string("0020|0013")] = ostr.str();
+                        }
+
+                        if (!importationData.m_pIntegrationModel->rawXmlData.empty()) {
+                                //raw data
+                                GIL::DICOM::TipoPrivateTags tagsPrivados(UID_TAGS_PRIVADOS_COMUNES);
+                                unsigned char tag = TAG_XML_INTEGRACION;
+                                tagsPrivados.SetTag(tag,importationData.m_pIntegrationModel->rawXmlData);
+                                pI2D->InsertarTagsPrivados(tagsPrivados);
+                        }
+
+                        pI2D->InsertarJerarquia(base);
+
+                        pI2D->InsertarJerarquia(importationData.m_pIntegrationModel->TagsDICOMOverwrite);
+
+                        wxFileName inputFileName = wxFileName::FileName(FROMPATH(rutaFichero));
+                        //se crea el directorio de la serie
+                        wxString tempFilePath = FROMPATH(m_pIntegracionParams->m_dirTemporal) + wxFileName::GetPathSeparator(wxPATH_NATIVE) + inputFileName.GetName() + wxT(".dcm");
+                        while (wxFile::Exists(tempFilePath)) {
+                                tempFilePath = FROMPATH(m_pIntegracionParams->m_dirTemporal) + wxFileName::GetPathSeparator(wxPATH_NATIVE) + inputFileName.GetName() + wxString::Format(wxT("%d.dcm"), (int)(rand()) );
+                        }
+
+                        std::string rutaImportacion(TOPATH(tempFilePath));
+
+                        pI2D->Convertir(rutaImportacion);
+
+                        pCI->LiberarInstanciaDeImportacion(pI2D);
+                        pI2D = NULL;
+
+                        {
+                                //leemos tags
+                                pDICOMManager = pCI->CrearInstanciaDeDICOMManager();
+                                pDICOMManager->CargarFichero(rutaImportacion);
+                                if(esElPrimero) {
+                                        esElPrimero=false;
+
+                                        if (!studyModel.MapOfVars.Contains(GKDI_STUDY_ACCESSION_NUMBER)) {
+                                                if(pDICOMManager->GetTag(0x0008,0x0050,tag)) {//accession number
+                                                        importationData.baseImages.tags[std::string("0008|0050")] = tag;
+                                                        studyModel.MapOfVars.InsertVariable(GKDI_STUDY_ACCESSION_NUMBER, tag);
+                                                }
+
+                                                if(pDICOMManager->GetTag(0x0020,0x000d,tag)) {//studyUID
+                                                        importationData.baseImages.tags[std::string("0020|000d")] = tag;
+                                                        studyModel.MapOfVars.InsertVariable(GKDI_STUDY_INSTANCE_UID, tag);
+                                                }
+                                        }
+
+                                        if(pDICOMManager->GetTag(0x0020,0x000e,tag)) {//uid serie original
+                                                seriesInstanceUID = tag;
+                                                seriesModel.MapOfVars.InsertVariable(GKDI_SERIE_INSTANCE_UID, tag);
+                                        }
+                                }
+                                GIL::IImageModel imageModel;
+
+                                pDICOMManager->GetTag(0x0008,0x0018,tag); //sop instance uid
+                                imageModel.MapOfVars.InsertVariable(GKDI_IMAGE_SOP_INSTANCE_UID, tag);
+
+                                pDICOMManager->GetTag(0x0008,0x0016,tag);//sop class uid
+                                imageModel.MapOfVars.InsertVariable(GKDI_IMAGE_SOP_CLASS_UID, tag);
+
+                                pCI->LiberarInstanciaDeDICOMManager(pDICOMManager);
+                                pDICOMManager = NULL;
+
+                                imageModel.MapOfVars.InsertVariable(GKDI_IMAGE_DICOM_PATH, rutaImportacion);
+                                seriesModel.Images.push_back(imageModel);
+                        }//fin leer tags
+
+                } catch (GIL::DICOM::I2DException& ex) {
+                        m_pIntegracionParams->m_mensajeError = ex.GetCause();
+                        LOG_ERROR("DICOMIZATION", "Error in dicomization process: " << ex.GetCause());
+                        if (pI2D != NULL) {
+                                pCI->LiberarInstanciaDeImportacion(pI2D);
+                        }
+                        if (pDICOMManager != NULL) {
+                                pCI->LiberarInstanciaDeDICOMManager(pDICOMManager);
+                        }
+                } catch (std::exception& e) {
+                        m_pIntegracionParams->m_mensajeError = e.what();
+                        LOG_ERROR("DICOMIZATION", "Error doing dicomization: " << e.what() );
+                        if (pI2D != NULL) {
+                                pCI->LiberarInstanciaDeImportacion(pI2D);
+                        }
+                        if (pDICOMManager != NULL) {
+                                pCI->LiberarInstanciaDeDICOMManager(pDICOMManager);
+                        }
+                } catch (...) {
+                        m_pIntegracionParams->m_mensajeError = _Std("Unknown error in dicomization process");
+                        LOG_ERROR("Internal error in dicomization process", "DICOMIZATION");
+                        if (pI2D != NULL) {
+                                pCI->LiberarInstanciaDeImportacion(pI2D);
+                        }
+                        if (pDICOMManager != NULL) {
+                                pCI->LiberarInstanciaDeDICOMManager(pDICOMManager);
+                        }
+                }
+        }// end for
+        return seriesModel;
+}
+
+bool DicomizeCommand::CopiarDicom()
+{
+        bool correcto = true;
+
+        m_pIntegracionParams->m_listOfFiles.clear();
+        //el directorio existe, se crea un directorio para la serie, con el uid de la serie donde se copiaran los ficheros importados
+        wxDir dir;
+        if (dir.Open(FROMPATH(m_pIntegracionParams->m_dirTemporal))) {
+                wxString pathOrigenWx,destinoWx;
+                bool cont = dir.GetFirst(&pathOrigenWx,wxT("*.dcm"));
+                std::string pathDestinoStd,pathOrigenStd;
+                GIL::DICOM::DicomDataset base;
+
+                while (cont) {
+                        pathOrigenWx=dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) +pathOrigenWx;
+                        pathOrigenStd = TOPATH(pathOrigenWx);
+                        m_pIntegracionParams->m_listOfFiles.push_back(pathOrigenStd);
+                        cont = dir.GetNext(&pathOrigenWx);
+                }
+        }
+
+        if(correcto) {
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(m_pIntegracionParams->m_listOfFiles, m_pIntegracionParams->m_openAfterDicomize, GNC::GCS::HistoryController::TAA_MOVE);
+                pParams->m_informar = false;
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+
+                LanzarYEsperar(pCmd, pParams);
+        }
+        return correcto;
+}
+
+bool DicomizeCommand::SubirPACS()
+{
+        try {
+                //get hl7 message...
+                std::string hl7Message;
+                if (m_pIntegracionParams->m_pImportData->m_pIntegrationModel.IsValid() && GNC::GCS::IControladorPermisos::Instance()->Get("core.integracion","send_message")) {
+                        // Lanzar evento.
+                        hl7Message = GIL::IntegrationController::Instance()->GetMessageFromIntegrationModel(m_pIntegracionParams->m_pImportData->m_pIntegrationModel);
+                }
+
+                //el pacs sera el primero d la configuracion si no lanzar excepcion
+                if (GNC::GCS::IControladorPermisos::Instance()->Get("core.integracion", "upload_pacs_xml")) {
+                        std::string pacsStore = m_pIntegracionParams->m_pImportData->m_pIntegrationModel->GlobalVariables.GetValue(GKDI_GLOBAL_PACS_STORE_SID);
+                        ::GADAPI::SendPACSCommand* pCmd = new ::GADAPI::SendPACSCommand(pacsStore, hl7Message, m_pIntegracionParams->m_InsertedSeries);
+                        GNC::Entorno::Instance()->GetCommandController()->ProcessAsync("Processing...",pCmd,NULL);
+                } else {
+                        LOG_INFO("DicomizeCommand","pacs upload is disabled");
+                }
+        } catch (GIL::HL7::HL7Exception& ex) {
+                std::ostringstream ostr;
+                m_pIntegracionParams->m_mensajeError = _Std("Error sending evidences:") + ex.GetCause();
+                LOG_ERROR("SendHL7Message",m_pIntegracionParams->m_mensajeError);
+                return false;
+        } catch (GIL::DICOM::PACSException& ex) {
+                std::stringstream ostr;
+                ostr << _Std("Can not upload to the PACS:\n");
+                ostr << ex.str();
+                m_pIntegracionParams->m_mensajeError = ostr.str();
+        } catch (GNC::GCS::IException& ex) {
+                m_pIntegracionParams->m_mensajeError = _Std("Error sending evidences:") + ex.GetCause();
+                LOG_ERROR("SendHL7Message",m_pIntegracionParams->m_mensajeError);
+                return false;
+        } catch (std::exception& ex) {
+                std::stringstream ostr;
+                ostr << _Std("Can not upload to the PACS:\n");
+                ostr << ex.what();
+                m_pIntegracionParams->m_mensajeError = ostr.str();
+        } catch (...) {
+                std::stringstream ostr;
+                ostr << _Std("Can not upload to the PACS:\nInternal Error");
+                m_pIntegracionParams->m_mensajeError = ostr.str();
+        }
+        if(m_pIntegracionParams->m_mensajeError != "") {
+                return false;
+        } else {
+                return true;
+        }
+}
+
+void DicomizeCommand::LanzarYEsperar(GNC::GCS::IComando* pCmd, GNC::GCS::IComandoParams* pCmdParams)
+{
+        LOG_TRACE("DicomizeCommand", "Esperando a " << pCmd);
+        m_pIntegracionParams->m_pComandoEspera = pCmd;
+        m_pIntegracionParams->m_pParamsEspera = pCmdParams;
+        GNC::Entorno::Instance()->GetCommandController()->ProcessAsync("Processing...",pCmd,NULL);
+        m_pIntegracionParams->m_pSemaforoEsperarComando->Wait();
+        LOG_TRACE("DicomizeCommand", "Espera de " << pCmd << " finalizada");
+}
+
+bool  DicomizeCommand::BorrarArchivosTemporales(wxString dirPath)
+{
+        //borra en cascada
+        if(!wxRmdir(dirPath)) {
+                //vaciar
+                wxDir dir;
+                if (dir.Open(dirPath)) {
+                        wxString fileName;
+                        bool cont = dir.GetFirst(&fileName);
+                        while (cont) {
+                                fileName=dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) +fileName;
+                                if(wxDir::Exists(fileName)) {
+                                        if (BorrarArchivosTemporales(fileName)) {
+                                                cont = dir.GetFirst(&fileName);
+                                        } else {
+                                                cont = dir.GetNext(&fileName);
+                                        }
+                                } else {
+                                        if (wxRemoveFile(fileName)) {
+                                                cont = dir.GetFirst(&fileName);
+                                        } else {
+                                                cont = dir.GetNext(&fileName);
+                                        }
+                                }
+                        }
+                }
+        }
+        if(wxDir::Exists(dirPath)) {
+                return wxRmdir(dirPath);
+        }
+        return true;
+}
+
+void DicomizeCommand::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        GNC::GCS::Events::EventoProgresoComando* pEvt = dynamic_cast<GNC::GCS::Events::EventoProgresoComando*> (evt);
+
+        if (pEvt == NULL  || pEvt->GetComando() == NULL || pEvt->GetComando() != m_pIntegracionParams->m_pComandoEspera) {
+                LOG_TRACE("DicomizeCommand", "Evento ignorado. No corresponde al comando de interes");
+                return;
+        }
+
+        if (pEvt->GetTipo() == GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado) {
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pCmdHistoryParams= dynamic_cast< GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* > (m_pIntegracionParams->m_pParamsEspera);
+                if (pCmdHistoryParams != NULL) {
+                        m_pIntegracionParams->m_InsertedSeries = pCmdHistoryParams->m_InsertedSeries;
+                }
+                LOG_TRACE("DicomizeCommand", "Procesando evento de terminacion del subcomando avisar.");
+
+                m_pIntegracionParams->m_pComandoEspera = NULL;
+                m_pIntegracionParams->m_pParamsEspera = NULL;
+                m_pIntegracionParams->m_pSemaforoEsperarComando->Post();
+        }
+}
+}
+
diff --git a/cadxcore/commands/dicomizecommand.h b/cadxcore/commands/dicomizecommand.h
new file mode 100644
index 0000000..084608d
--- /dev/null
+++ b/cadxcore/commands/dicomizecommand.h
@@ -0,0 +1,102 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <wx/string.h>
+#include <api/globals.h>
+#include <api/api.h>
+#include <api/icommand.h>
+#include <api/ientorno.h>
+#include <api/observers/ieventsobserver.h>
+#include <api/imodelointegracion.h>
+#include <main/gui/import/importationdata.h>
+
+class wxCriticalSectionLocker;
+class wxSemaphore;
+
+namespace GADAPI
+{
+class EXTAPI DicomizeCommandParams : public GNC::GCS::IComandoParams
+{
+public:
+        DicomizeCommandParams(const GNC::GCS::Ptr<GNC::GUI::ImportationData>& pDatosPersistentes, const std::string& dirTemporal = "") ;
+
+        DicomizeCommandParams( const DicomizeCommandParams& o);
+        DicomizeCommandParams& operator = (const DicomizeCommandParams& o);
+
+        virtual ~DicomizeCommandParams() ;
+
+public:
+        GNC::GCS::Ptr<GNC::GUI::ImportationData> m_pImportData;
+        std::string m_dirTemporal;
+        std::list<std::string> m_listOfFiles;
+        std::list<long> m_InsertedSeries;
+        bool m_openAfterDicomize;
+
+        std::string m_mensajeError;
+        bool m_importacionCorrecta;
+        bool m_copiadoCorrecto;
+        wxSemaphore* m_pSemaforoEsperarComando;
+
+        GNC::GCS::IComando*	m_pComandoEspera;
+        GNC::GCS::IComandoParams*	m_pParamsEspera;
+};
+
+
+class EXTAPI DicomizeCommand : public GNC::GCS::IComando, public GNC::GCS::IEventsObserver
+{
+public:
+        DicomizeCommand(DicomizeCommandParams* pParams);
+
+        typedef struct {
+                wxString campoLista;
+                wxString loincCodigoCampo;
+                wxString loincDescCampo;
+                wxString valor;
+        } tValoracion;
+
+        typedef std::list<tValoracion> listaValoraciones;
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+        virtual void OnAbort();
+
+        void LiberarRecursos();
+public:
+        virtual bool ImportarFicherosOriginales();
+
+protected:
+        virtual GIL::ISeriesModel ImportOriginalFiles(bool pdfFiles);
+
+        virtual bool CopiarDicom();
+
+        virtual bool SubirPACS();
+
+        virtual void LanzarYEsperar(GNC::GCS::IComando* pCmd, GNC::GCS::IComandoParams* pCmdParams);
+
+        virtual bool  BorrarArchivosTemporales(wxString dirPath);
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt) ;
+
+        DicomizeCommandParams* m_pIntegracionParams;
+};
+}
diff --git a/cadxcore/commands/exporttodicomdircommand.cpp b/cadxcore/commands/exporttodicomdircommand.cpp
new file mode 100644
index 0000000..a8c1eb1
--- /dev/null
+++ b/cadxcore/commands/exporttodicomdircommand.cpp
@@ -0,0 +1,466 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifdef _MSC_VER
+#pragma warning(push)
+#pragma warning(disable: 4996)
+#endif
+
+
+#include <dcmtk/dcmdata/dcdicdir.h>
+#include <dcmtk/dcmdata/dcdeftag.h>
+
+#include <sstream>
+
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/dicommanager.h>
+#include <main/controllers/controladorlog.h>
+#include <main/entorno.h>
+
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/dicom/idicommanager.h>
+
+#include <main/entorno.h>
+#include <main/controllers/controladoreventos.h>
+
+#include <eventos/mensajes.h>
+
+#include "exporttodicomdircommand.h"
+
+
+#ifdef DCMTK_POST_20170228
+#include <api/dicom/dicom_legacy.h>
+#endif 
+
+#define IDC_EXPORT_TO_DICOMDIR           118
+
+GADAPI::ExportToDicomDirCommandParams::ExportToDicomDirCommandParams(const TListOfPks& seriesList, const std::string& destinationPath, const GIL::DICOM::DicomDataset& anonymized, bool includeGinkgo)
+{
+        m_seriesList = seriesList;
+        m_destinationPath = destinationPath;
+        m_hasError = false;
+        m_anonymized = anonymized;
+        m_includeGinkgoTags = includeGinkgo;
+}
+
+GADAPI::ExportToDicomDirCommandParams::~ExportToDicomDirCommandParams()
+{
+}
+
+GADAPI::ExportToDicomDirCommand::ExportToDicomDirCommand(ExportToDicomDirCommandParams* pParams): GNC::GCS::IComando(pParams,"Export Dicom Dir")
+{
+        SetId(IDC_EXPORT_TO_DICOMDIR);
+        m_pExportacionParams = pParams;
+}
+
+inline std::string GetRightPath(const std::string& uid, const std::string& prefix, std::map<std::string, int>& mapOfUids, int& index)
+{
+        std::string pathOfUid;
+        if (mapOfUids.find(uid) == mapOfUids.end()) {
+                mapOfUids[uid] = index;
+                std::ostringstream ostr;
+                ostr << prefix << index++;
+                pathOfUid = ostr.str();
+        } else {
+                std::ostringstream ostr;
+                ostr << prefix << mapOfUids[uid];
+                pathOfUid = ostr.str();
+        }
+        return pathOfUid;
+}
+
+inline bool CreateDir(const wxString& path)
+{
+        if (!wxDirExists(path)) {
+                if (!wxFileName::Mkdir(path)) {
+                        return false;
+                }
+        }
+        return true;
+}
+
+inline bool CreatePathOfSeries(const GNC::GCS::IHistoryController::StudyModel& studyModel,
+                               const GNC::GCS::IHistoryController::SeriesModel& seriesModel,
+                               std::map<std::string, int>& mapOfPathPatients,
+                               std::map<std::string, int>& mapOfPathStudies,
+                               std::map<std::string, int>& mapOfPathSeries,
+                               int& patientIndex,
+                               int& studyIndex,
+                               int& seriesIndex,
+                               const std::string& destinationPath,
+                               std::string& pathOfPatient,
+                               std::string& pathOfStudy,
+                               std::string& pathOfSeries,
+                               wxString& fullPath)
+{
+        pathOfPatient = GetRightPath(studyModel.pat_id, "PT", mapOfPathPatients, patientIndex);
+        pathOfStudy = GetRightPath(studyModel.study_iuid, "ST", mapOfPathStudies, studyIndex);
+        pathOfSeries = GetRightPath(seriesModel.series_iuid, "SE", mapOfPathSeries, seriesIndex);
+
+        fullPath = FROMPATH(destinationPath) + wxFileName::GetPathSeparator() + wxT("DICOM");
+        if (!CreateDir(fullPath)) {
+                return false;
+        }
+        fullPath += wxFileName::GetPathSeparator() + wxString::FromUTF8(pathOfPatient.c_str());
+        if (!CreateDir(fullPath)) {
+                return false;
+        }
+        fullPath +=	wxFileName::GetPathSeparator() + wxString::FromUTF8(pathOfStudy.c_str());
+        if (!CreateDir(fullPath)) {
+                return false;
+        }
+        fullPath += wxFileName::GetPathSeparator() + wxString::FromUTF8(pathOfSeries.c_str());
+        if (!CreateDir(fullPath)) {
+                return false;
+        }
+        return true;
+}
+
+inline void InsertTagRecord(const DcmTagKey& key, const std::string& value, DcmDirectoryRecord* record)
+{
+        DcmTag tag(key);
+        DcmElement* e = newDicomElement(tag);
+        e->putString(value.c_str());
+        record->insert(e, true, false);
+}
+
+inline DcmDirectoryRecord* GetSeriesRecord(const GNC::GCS::IHistoryController::StudyModel& studyModel,
+                const GNC::GCS::IHistoryController::SeriesModel& seriesModel,
+                std::map<std::string, DcmDirectoryRecord*>& dcmMapOfPatients,
+                std::map<std::string, DcmDirectoryRecord*>& dcmMapOfStudies,
+                std::map<std::string, DcmDirectoryRecord*>& dcmMapOfSeries,
+                DcmDirectoryRecord * root)
+{
+        DcmDirectoryRecord* PatientRecord;
+        if (dcmMapOfPatients.find(studyModel.pat_id) == dcmMapOfPatients.end()) {
+                PatientRecord = new DcmDirectoryRecord();
+                dcmMapOfPatients[studyModel.pat_id] = PatientRecord;
+                root->insertSub(PatientRecord);
+                InsertTagRecord(DCM_DirectoryRecordType, "PATIENT", PatientRecord);
+                InsertTagRecord(DCM_SpecificCharacterSet, "ISO_IR 192", PatientRecord);
+                InsertTagRecord(DCM_PatientID, studyModel.pat_id, PatientRecord);
+                InsertTagRecord(DCM_PatientName, studyModel.pat_name, PatientRecord);
+                {
+                        std::ostringstream ostr;
+                        ostr << studyModel.pat_sex;
+                        InsertTagRecord(DCM_PatientSex, ostr.str(), PatientRecord);
+                }
+                InsertTagRecord(DCM_PatientBirthDate, studyModel.pat_bithdate, PatientRecord);
+        } else {
+                PatientRecord = dcmMapOfPatients[studyModel.pat_id];
+        }
+
+        DcmDirectoryRecord* StudyRecord;
+        if (dcmMapOfStudies.find(studyModel.study_iuid) == dcmMapOfStudies.end()) {
+                StudyRecord = new DcmDirectoryRecord();
+                dcmMapOfStudies[studyModel.study_iuid] = StudyRecord;
+                PatientRecord->insertSub(StudyRecord);
+                InsertTagRecord(DCM_DirectoryRecordType, "STUDY", StudyRecord);
+                InsertTagRecord(DCM_SpecificCharacterSet, "ISO_IR 192", StudyRecord);
+                InsertTagRecord(DCM_StudyInstanceUID, studyModel.study_iuid, StudyRecord);
+                InsertTagRecord(DCM_StudyDescription, studyModel.study_desc, StudyRecord);
+                wxDateTime date;
+                date.ParseFormat(wxString::FromUTF8(studyModel.study_datetime.c_str()), wxT("%Y-%m-%dT%H:%M:%S"));
+                if (date.IsValid()) {
+                        std::string tmp(date.Format(wxT("%Y%m%d")).ToUTF8());
+                        InsertTagRecord(DCM_StudyDate, tmp, StudyRecord);
+                        tmp = date.Format(wxT("%H%M%S.%l")).ToUTF8();
+                        InsertTagRecord(DCM_StudyTime, tmp, StudyRecord);
+                }
+                InsertTagRecord(DCM_AccessionNumber, studyModel.study_acc_no, StudyRecord);
+                InsertTagRecord(DCM_StudyID, studyModel.study_id, StudyRecord);
+        } else {
+                StudyRecord = dcmMapOfStudies[studyModel.study_iuid];
+        }
+
+        DcmDirectoryRecord* SeriesRecord;
+        if (dcmMapOfSeries.find(studyModel.study_iuid) == dcmMapOfSeries.end()) {
+                SeriesRecord = new DcmDirectoryRecord();
+                dcmMapOfSeries[seriesModel.series_iuid] = SeriesRecord;
+                StudyRecord->insertSub(SeriesRecord);
+                InsertTagRecord(DCM_DirectoryRecordType, "SERIES", SeriesRecord);
+                InsertTagRecord(DCM_SpecificCharacterSet, "ISO_IR 192", SeriesRecord);
+                InsertTagRecord(DCM_SeriesInstanceUID, seriesModel.series_iuid, SeriesRecord);
+                InsertTagRecord(DCM_SeriesDescription, seriesModel.series_desc, SeriesRecord);
+                wxDateTime date;
+                date.ParseFormat(wxString::FromUTF8(seriesModel.series_datetime.c_str()), wxT("%Y-%m-%dT%H:%M:%S"));
+                if (date.IsValid()) {
+                        std::string tmp(date.Format(wxT("%Y%m%d")).ToUTF8());
+                        InsertTagRecord(DCM_SeriesDate, tmp, SeriesRecord);
+                        tmp = date.Format(wxT("%H%M%S.%l")).ToUTF8();
+                        InsertTagRecord(DCM_SeriesTime,  tmp, SeriesRecord);
+                }
+                InsertTagRecord(DCM_Modality, seriesModel.series_modality, SeriesRecord);
+                InsertTagRecord(DCM_SeriesNumber, seriesModel.series_no, SeriesRecord);
+        } else {
+                SeriesRecord = dcmMapOfSeries[seriesModel.series_iuid];
+        }
+
+        return SeriesRecord;
+}
+
+void GADAPI::ExportToDicomDirCommand::Execute()
+{
+        if (!NotificarProgreso(0.0, _Std("Exporting files...")) )
+                return;
+
+        std::string pathOfDicomDir;
+        {
+                std::ostringstream ostr;
+                ostr << m_pExportacionParams->m_destinationPath;
+                ostr << (char)wxFileName::GetPathSeparator();
+                ostr << "DICOMDIR";
+                pathOfDicomDir = ostr.str();
+        }
+
+        //clean dicomdir file and dicomdir directory if present...
+        {
+                std::ostringstream ostr;
+                ostr << m_pExportacionParams->m_destinationPath;
+                ostr << (char) wxFileName::GetPathSeparator();
+                ostr << "DICOM";
+                GNC::Entorno::Instance()->RemoveDirRecursive(ostr.str());
+                wxRemoveFile(FROMPATH(pathOfDicomDir));
+        }
+        //
+
+        std::map<std::string, int> mapOfPathPatients;
+        std::map<std::string, int> mapOfPathStudies;
+        std::map<std::string, int> mapOfPathSeries;
+        std::map<std::string, int> mapOfPathImages;
+
+        std::map<std::string, DcmDirectoryRecord*> dcmMapOfPatients;
+        std::map<std::string, DcmDirectoryRecord*> dcmMapOfStudies;
+        std::map<std::string, DcmDirectoryRecord*> dcmMapOfSeries;
+
+        std::string pathOfPatient, pathOfStudy, pathOfSeries;
+
+        int patientIndex=0, studyIndex=0, seriesIndex=0;
+
+        int numberOfSeries = m_pExportacionParams->m_seriesList.size();
+        int actualSerie = 1;
+
+        DcmDicomDir dicomDir(pathOfDicomDir.c_str(), "GINKGOCADXCD");
+        DcmDirectoryRecord *   root = &(dicomDir.getRootRecord());
+
+        //FIRST OF ALL EXPORT WITHOUT ANONYMIZE
+        if (m_pExportacionParams->m_seriesList.size() > 0 && m_pExportacionParams->m_anonymized.tags.empty() && m_pExportacionParams->m_includeGinkgoTags) {
+                for (ExportToDicomDirCommandParams::TListOfPks::const_iterator itUids = m_pExportacionParams->m_seriesList.begin(); itUids != m_pExportacionParams->m_seriesList.end(); ++itUids) {
+                        wxString cadena = wxString::Format(_("Exporting series %d of %d"), (int)(actualSerie++), (int)(numberOfSeries));
+                        if (!NotificarProgreso((float)actualSerie/numberOfSeries, std::string(cadena.ToUTF8())))
+                                return;
+                        //find source paths and series model
+                        GNC::GCS::IHistoryController::SeriesModel seriesModel = GNC::GCS::HistoryController::Instance()->GetSeriesModel((*itUids));
+                        GNC::GCS::IHistoryController::StudyModel studyModel = GNC::GCS::HistoryController::Instance()->GetStudyModel(seriesModel.study_fk);
+                        GNC::GCS::IHistoryController::FileModelList fileModels;
+                        GNC::GCS::HistoryController::Instance()->GetSeriesSortedFileModels((*itUids), fileModels);
+
+                        if (fileModels.empty()) {
+                                m_pExportacionParams->m_Error = _Std("Some of selected series has been deleted");
+                                m_pExportacionParams->m_hasError = true;
+                                return;
+                        }
+
+                        //get path of series
+                        wxString fullPathWx;
+                        if (!CreatePathOfSeries(studyModel, seriesModel, mapOfPathPatients, mapOfPathStudies, mapOfPathSeries, patientIndex, studyIndex, seriesIndex, m_pExportacionParams->m_destinationPath, pathOfPatient, pathOfStudy, pathOfSeries, fullPathWx) ) {
+                                m_pExportacionParams->m_Error = _Std("There was an error creating directory");
+                                m_pExportacionParams->m_hasError = true;
+                                return;
+                        }
+
+                        //dicomdir structure
+                        DcmDirectoryRecord* SeriesRecord = GetSeriesRecord(studyModel, seriesModel, dcmMapOfPatients, dcmMapOfStudies, dcmMapOfSeries, root);
+
+                        //path is created, now we are going to copy images...
+                        mapOfPathImages[seriesModel.series_iuid] = 0;
+                        for (GNC::GCS::IHistoryController::FileModelList::const_iterator itDCMModels = fileModels.begin(); itDCMModels != fileModels.end(); ++itDCMModels) {
+                                std::string pathOfImage;
+                                {
+                                        std::ostringstream ostr;
+                                        ostr << "IM";
+                                        ostr << mapOfPathImages[seriesModel.series_iuid]++;
+                                        pathOfImage = ostr.str();
+                                }
+
+                                wxString pathOfImageWx = fullPathWx + wxFileName::GetPathSeparator() + wxString::FromUTF8(pathOfImage.c_str());
+                                std::string absolutepathFile = (*itDCMModels).real_path;
+                                if (!wxCopyFile(FROMPATH(absolutepathFile),  pathOfImageWx)) {
+                                        LOG_ERROR("ExportToDicomDirCommand", "Error copying file " << absolutepathFile << " TO " << pathOfImageWx.ToUTF8());
+                                        m_pExportacionParams->m_Error = _Std("There was an error writing file");
+                                        m_pExportacionParams->m_hasError = true;
+                                        return;
+                                }
+                                DcmDirectoryRecord* ImageRecord = new DcmDirectoryRecord();
+                                SeriesRecord->insertSub(ImageRecord);
+                                std::string fileId;
+                                {
+                                        std::ostringstream ostr;
+                                        ostr << "DICOM" << "\\" << pathOfPatient << "\\" << pathOfStudy << "\\" << pathOfSeries << "\\" << pathOfImage;
+                                        fileId = ostr.str();
+                                }
+                                InsertTagRecord(DCM_DirectoryRecordType, "IMAGE", ImageRecord);
+                                InsertTagRecord(DCM_ReferencedSOPInstanceUIDInFile, (*itDCMModels).sopiuid, ImageRecord);
+                                InsertTagRecord(DCM_ReferencedTransferSyntaxUIDInFile, (*itDCMModels).tsuid, ImageRecord);
+                                InsertTagRecord(DCM_ReferencedSOPClassUIDInFile, (*itDCMModels).sopcuid, ImageRecord);
+                                InsertTagRecord(DCM_SpecificCharacterSet, "ISO_IR 192", ImageRecord);
+                                InsertTagRecord(DCM_ImageComments, (*itDCMModels).file_desc, ImageRecord);
+                                std::string instanceNumber;
+                                {
+                                        std::ostringstream ostr;
+                                        ostr << (*itDCMModels).instance_number;
+                                        instanceNumber = ostr.str();
+                                }
+                                InsertTagRecord(DCM_InstanceNumber, instanceNumber, ImageRecord);
+                                InsertTagRecord(DCM_ReferencedFileID, fileId, ImageRecord);
+                        }
+                }
+        }///END EXPORT WITHOUT ANONYMIZE
+        std::string m_TmpDir = GNC::Entorno::Instance()->CrearDirectorioTemporal();
+        //export series anonymizing...
+        if (m_pExportacionParams->m_seriesList.size() > 0 && (!m_pExportacionParams->m_anonymized.tags.empty() || !m_pExportacionParams->m_includeGinkgoTags)) {
+                for (ExportToDicomDirCommandParams::TListOfPks::const_iterator itUids = m_pExportacionParams->m_seriesList.begin(); itUids != m_pExportacionParams->m_seriesList.end(); ++itUids) {
+                        wxString cadena = wxString::Format(_("Exporting series %d of %d"), (int)(actualSerie++), (int)(numberOfSeries));
+                        if (!NotificarProgreso((float)actualSerie/numberOfSeries, std::string(cadena.ToUTF8())))
+                                return;
+                        //find source paths and series model
+                        GNC::GCS::IHistoryController::FileModelList fileModels;
+                        GNC::GCS::HistoryController::Instance()->GetSeriesSortedFileModels((*itUids), fileModels);
+
+                        for (GNC::GCS::IHistoryController::FileModelList::const_iterator itFileModel = fileModels.begin(); itFileModel != fileModels.end(); ++itFileModel) {
+                                GIL::DICOM::DICOMManager manager;
+                                manager.CargarFichero((*itFileModel).real_path);
+                                manager.ActualizarJerarquia(m_pExportacionParams->m_anonymized);
+                                if (!m_pExportacionParams->m_includeGinkgoTags) {
+                                        manager.AnonimizarTagsPrivados();
+                                }
+                                wxString targetFile = FROMPATH(m_TmpDir) + wxFileName::GetPathSeparator() + wxString::Format(wxT("%d"), (int)(rand()));
+                                while (wxFileExists(targetFile)) {
+                                        targetFile = FROMPATH(m_TmpDir) + wxFileName::GetPathSeparator() + wxString::Format(wxT("%d"), (int)(rand()));
+                                }
+                                std::string targetFileStd(TOPATH(targetFile));
+                                if (!manager.AlmacenarFichero(targetFileStd)) {
+                                        m_pExportacionParams->m_Error = _Std("There was an error anonymizing files");
+                                        m_pExportacionParams->m_hasError = true;
+                                        return;
+                                }
+                        }
+                }
+        }
+        //read tmp directory and insert into dcmdir...
+        {
+                wxString tmpDirWx = FROMPATH(m_TmpDir);
+                wxDir dir;
+                if (dir.Open(tmpDirWx)) {
+                        wxString fileName;
+                        bool cont = dir.GetFirst(&fileName);
+                        while (cont) {
+                                fileName=dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) +fileName;
+                                const std::string fileNameStd(TOPATH(fileName));
+                                GNC::GCS::IHistoryController::DICOMFileModel dicomFile;
+                                GNC::GCS::IHistoryController::TAddErrorList foo;
+                                if (!GNC::GCS::HistoryController::Instance()->ReadFile(dicomFile, fileNameStd, foo)) {
+                                        LOG_ERROR("ExportDICOMDir", "error reading " << fileNameStd);
+                                        continue;
+                                }
+
+                                //create path
+                                wxString fullPathWx;
+                                if (!CreatePathOfSeries(dicomFile.study, dicomFile.series, mapOfPathPatients, mapOfPathStudies, mapOfPathSeries, patientIndex, studyIndex, seriesIndex, m_pExportacionParams->m_destinationPath, pathOfPatient, pathOfStudy, pathOfSeries, fullPathWx) ) {
+                                        m_pExportacionParams->m_Error = _Std("There was an error creating directory");
+                                        m_pExportacionParams->m_hasError = true;
+                                        return;
+                                }
+
+                                //dicomdir structure
+                                DcmDirectoryRecord* SeriesRecord = GetSeriesRecord(dicomFile.study, dicomFile.series, dcmMapOfPatients, dcmMapOfStudies, dcmMapOfSeries, root);
+
+                                //path is created, now we are going to copy images...
+                                if (mapOfPathImages.find(dicomFile.series.series_iuid) == mapOfPathImages.end()) {
+                                        mapOfPathImages[dicomFile.series.series_iuid] = 0;
+                                }
+                                std::string pathOfImage;
+                                {
+                                        std::ostringstream ostr;
+                                        ostr << "IM";
+                                        ostr << mapOfPathImages[dicomFile.series.series_iuid]++;
+                                        pathOfImage = ostr.str();
+                                }
+
+                                wxString pathOfImageWx = fullPathWx + wxFileName::GetPathSeparator() + wxString::FromUTF8(pathOfImage.c_str());
+                                //moving tmp files...
+                                if (!wxRenameFile(fileName, pathOfImageWx)) {
+                                        m_pExportacionParams->m_Error = _Std("There was an error writing file");
+                                        m_pExportacionParams->m_hasError = true;
+                                        return;
+                                }
+
+                                DcmDirectoryRecord* ImageRecord = new DcmDirectoryRecord();
+                                SeriesRecord->insertSub(ImageRecord);
+                                std::string fileId;
+                                {
+                                        std::ostringstream ostr;
+                                        ostr << "DICOM" << "\\" << pathOfPatient << "\\" << pathOfStudy << "\\" << pathOfSeries << "\\" << pathOfImage;
+                                        fileId = ostr.str();
+                                }
+                                InsertTagRecord(DCM_ReferencedFileID, fileId, ImageRecord);
+                                InsertTagRecord(DCM_DirectoryRecordType, "IMAGE", ImageRecord);
+                                InsertTagRecord(DCM_ReferencedSOPInstanceUIDInFile, dicomFile.file.sopiuid, ImageRecord);
+                                InsertTagRecord(DCM_ReferencedTransferSyntaxUIDInFile, dicomFile.file.tsuid, ImageRecord);
+                                InsertTagRecord(DCM_ReferencedSOPClassUIDInFile, dicomFile.file.sopcuid, ImageRecord);
+                                {
+                                        std::ostringstream ostr;
+                                        ostr << dicomFile.file.instance_number;
+                                        InsertTagRecord(DCM_InstanceNumber, ostr.str(), ImageRecord);
+                                }
+                                InsertTagRecord(DCM_ImageComments, dicomFile.file.file_desc, ImageRecord);
+                                InsertTagRecord(DCM_SpecificCharacterSet, "ISO_IR 192", ImageRecord);
+                                cont = dir.GetNext(&fileName);
+                        }
+                }
+
+        }
+        OFCondition cond = dicomDir.write();
+        std::cout << cond.text() << std::endl;
+}
+
+
+
+void GADAPI::ExportToDicomDirCommand::Update()
+{
+        if (m_pExportacionParams->m_hasError) {
+                GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,m_pExportacionParams->m_Error, GNC::GCS::Events::EventoMensajes::StatusMessage,true, GNC::GCS::Events::EventoMensajes::Error));
+        } else {
+                GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL, _Std("Export has been finished successfully"), GNC::GCS::Events::EventoMensajes::StatusMessage,true, GNC::GCS::Events::EventoMensajes::Informacion));
+        }
+}
+
+//endregion
+
+
+#ifdef _MSC_VER
+#pragma warning(pop)
+#endif
+
diff --git a/cadxcore/commands/exporttodicomdircommand.h b/cadxcore/commands/exporttodicomdircommand.h
new file mode 100644
index 0000000..4874e58
--- /dev/null
+++ b/cadxcore/commands/exporttodicomdircommand.h
@@ -0,0 +1,81 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <list>
+
+#include <api/autoptr.h>
+#include <api/icommand.h>
+#include <api/dicom/dicomdataset.h>
+
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+
+namespace GIL
+{
+namespace DICOM
+{
+class DicomDataset;
+}
+}
+
+namespace GADAPI
+{
+class ExportToDicomDirCommand;
+
+class EXTAPI ExportToDicomDirCommandParams : public GNC::GCS::IComandoParams
+{
+public:
+        typedef std::list<long> TListOfPks;
+        ExportToDicomDirCommandParams(const TListOfPks& seriesList, const std::string& destinationPath, const GIL::DICOM::DicomDataset& anonymized, bool includeGinkgo);
+
+        virtual ~ExportToDicomDirCommandParams();
+
+        TListOfPks m_seriesList;
+        std::string m_destinationPath;
+        GIL::DICOM::DicomDataset m_anonymized;
+        bool m_includeGinkgoTags;
+
+        std::string m_Error;
+        bool m_hasError;
+};
+
+class EXTAPI ExportToDicomDirCommand : public GNC::GCS::IComando
+{
+public:
+
+        ExportToDicomDirCommand(ExportToDicomDirCommandParams* pParams);
+
+protected:
+
+        virtual void Execute();
+        virtual void Update();
+
+protected:
+
+        ExportToDicomDirCommandParams* m_pExportacionParams;
+};
+}
diff --git a/cadxcore/commands/incomingdicomassociationcommand.cpp b/cadxcore/commands/incomingdicomassociationcommand.cpp
new file mode 100644
index 0000000..a47188e
--- /dev/null
+++ b/cadxcore/commands/incomingdicomassociationcommand.cpp
@@ -0,0 +1,486 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+// For some reason dcmtk-3.6.1-20150924 has an hiccup in
+// dcmth/oflog/  logger.h and logmacro.h
+// since they are not used we define the include guards here
+#define DCMTK_LOG4CPLUS_TRACELOGGER_H
+#define DCMTK_LOG4CPLUS_LOGGING_MACROS_HEADER_
+
+#include <wx/string.h>
+
+#include <api/imodelointegracion.h>
+#include <api/internationalization/internationalization.h>
+#include <commands/incomingdicomassociationcommand.h>
+#include <commands/comandoincluirhistorial.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/entorno.h>
+#include <eventos/mensajes.h>
+
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+#include <dcmtk/dcmnet/cond.h>
+
+#include <dcmtk/dcmnet/assoc.h>
+#include <dcmtk/dcmnet/dimse.h>
+
+#include <dcmtk/dcmdata/dcfilefo.h>
+#include <dcmtk/dcmdata/dcmetinf.h>
+
+#include <dcmtk/dcmdata/dcdeftag.h>
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+#include <main/controllers/pacscontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/controladoreventos.h>
+struct StoreCallbackData {
+        //std::string imageFileName;
+        DcmFileFormat* dcmff;
+        T_ASC_Association* assoc;
+};
+
+/**
+* This function.is used to indicate progress when storescp receives instance data over the
+* network. On the final call to this function (identified by progress->state == DIMSE_StoreEnd)
+* this function will store the data set which was received over the network to a file.
+* Earlier calls to this function will simply cause some information to be dumped to stdout.
+*
+* Parameters:
+*   callbackData  - [in] data for this callback function
+*   progress      - [in] The state of progress. (identifies if this is the initial or final call
+*                   to this function, or a call in between these two calls.
+*   req           - [in] The original store request message.
+*   imageFileName - [in] The path to and name of the file the information shall be written to.
+*   imageDataSet  - [in] The data set which shall be stored in the image file
+*   rsp           - [inout] the C-STORE-RSP message (will be sent after the call to this function)
+*   statusDetail  - [inout] This variable can be used to capture detailed information with regard to
+*                   the status information which is captured in the status element (0000,0900). Note
+*                   that this function does specify any such information, the pointer will be set to NULL.
+*/
+static void storeSCPCallback( void * callbackData, T_DIMSE_StoreProgress * progress, T_DIMSE_C_StoreRQ * /*req*/, char * /*imageFileName*/, DcmDataset ** imageDataSet, T_DIMSE_C_StoreRSP * rsp, DcmDataset ** statusDetail)
+{
+        //DIC_UI sopClass;
+        //DIC_UI sopInstance;
+
+        std::string ambitoLog = "storeSCPCallback";
+
+        // if this is the final call of this function, save the data which was received to a file
+        // (note that we could also save the image somewhere else, put it in database, etc.)
+        if (progress->state == DIMSE_StoreEnd) {
+                OFString tmpStr;
+
+                // do not send status detail information
+                *statusDetail = NULL;
+
+                // remember callback data
+                StoreCallbackData *cbdata = OFstatic_cast(StoreCallbackData *, callbackData);
+
+                // Concerning the following line: an appropriate status code is already set in the resp structure,
+                // it need not be success. For example, if the caller has already detected an out of resources problem
+                // then the status will reflect this.  The callback function is still called to allow cleanup.
+                //rsp->DimseStatus = STATUS_Success;
+
+                // we want to write the received information to a file only if this information
+                // is present and the options opt_bitPreserving and opt_ignore are not set.
+                if ((imageDataSet != NULL) && (*imageDataSet != NULL)) {
+                        OFString fileName;
+
+                        OFString OFPacienteUId;
+                        OFString OFEstudioUId;
+                        OFString OFSerieUId;
+                        OFString OFImagenUId;
+
+                        std::string PacienteUId;
+                        std::string EstudioUId;
+                        std::string SerieUId;
+                        std::string ImagenUId;
+
+                        if ((*imageDataSet)->findAndGetOFString(DCM_PatientID, OFPacienteUId).good()) {
+                                PacienteUId.assign(OFPacienteUId.c_str());
+                        } else {
+                                LOG_ERROR(ambitoLog, _Std("element patient id absent in dataset" ));
+                                rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
+                                return;
+                        }
+                        if ((*imageDataSet)->findAndGetOFString(DCM_StudyInstanceUID, OFEstudioUId).good()) {
+                                EstudioUId.assign(OFEstudioUId.c_str());
+                        } else {
+                                LOG_ERROR(ambitoLog, _Std("element study instance uid absent in dataset" ));
+                                rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
+                                return;
+                        }
+                        if ((*imageDataSet)->findAndGetOFString(DCM_SeriesInstanceUID, OFSerieUId).good()) {
+                                SerieUId.assign(OFSerieUId.c_str());
+                        } else {
+                                LOG_ERROR(ambitoLog, _Std("element series instance uid absent in dataset" ));
+                                rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
+                                return;
+                        }
+
+                        if ((*imageDataSet)->findAndGetOFString(DCM_SOPInstanceUID, OFImagenUId).good()) {
+                                ImagenUId.assign(OFImagenUId.c_str());
+                        } else {
+                                LOG_ERROR(ambitoLog, _Std("element sop instance uid absent in dataset" ));
+                                rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
+                                return;
+                        }
+
+                        std::string rutaStd;
+                        if (!GIL::DICOM::PACSController::Instance()->GetRutaImagenTemp(PacienteUId,EstudioUId,SerieUId,ImagenUId, rutaStd)) {
+                                LOG_ERROR(ambitoLog, "could not create subdirectory for study: " << rutaStd);
+                                rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
+                                return;
+                        }
+                        fileName = rutaStd.c_str();
+
+                        // determine the transfer syntax which shall be used to write the information to the file
+                        E_TransferSyntax xfer = (*imageDataSet)->getOriginalXfer();
+
+                        // store file either with meta header or as pure dataset
+                        LOG_DEBUG(ambitoLog, "storing DICOM file: " << fileName);
+                        /*   if (OFStandard::fileExists(fileName))
+                        {
+                        LOG_WARN(ambitoLog, "DICOM file already exists, overwriting: " << fileName);
+                        }*/
+                        OFCondition cond = cbdata->dcmff->saveFile(fileName.c_str(), xfer);
+                        if (cond.bad()) {
+                                LOG_ERROR(ambitoLog, "cannot write DICOM file: " << fileName << ": " << cond.text());
+                                rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
+                        }
+
+                        // check the image to make sure it is consistent, i.e. that its sopClass and sopInstance correspond
+                        // to those mentioned in the request. If not, set the status in the response message variable.
+                        if (rsp->DimseStatus == STATUS_Success) {
+                                // which SOP class and SOP instance ?
+                                /* if (!DU_findSOPClassAndInstanceInDataSet(*imageDataSet, sopClass, sopInstance))
+                                {
+                                LOG_ERROR(ambitoLog, "bad DICOM file: " << fileName);
+                                rsp->DimseStatus = STATUS_STORE_Error_CannotUnderstand;
+                                }
+                                else if (strcmp(sopClass, req->AffectedSOPClassUID) != 0)
+                                {
+                                rsp->DimseStatus = STATUS_STORE_Error_DataSetDoesNotMatchSOPClass;
+                                }
+                                else if (strcmp(sopInstance, req->AffectedSOPInstanceUID) != 0)
+                                {
+                                rsp->DimseStatus = STATUS_STORE_Error_DataSetDoesNotMatchSOPClass;
+                                }*/
+                        }
+                }
+
+        }
+}
+
+GADAPI::PACS::IncomingDicomAssociationCommandParams::IncomingDicomAssociationCommandParams(T_ASC_Association* assoc, unsigned long rcvTimeout)
+{
+        m_pAssoc = assoc;
+        m_rcvTimeout = rcvTimeout;
+}
+
+GADAPI::PACS::IncomingDicomAssociationCommandParams::~IncomingDicomAssociationCommandParams()
+{
+        if (m_pAssoc != NULL) {
+                OFCondition cond = ASC_dropSCPAssociation(m_pAssoc);
+                OFString temp_str;
+
+                if (cond.bad()) {
+                        LOG_FATAL("IncomingDicomAssociationCommandParams", DimseCondition::dump(temp_str, cond).c_str());
+                }
+
+                cond = ASC_destroyAssociation(&m_pAssoc);
+                if (cond.bad()) {
+                        LOG_FATAL("IncomingDicomAssociationCommandParams", DimseCondition::dump(temp_str, cond).c_str());
+                }
+                m_pAssoc = NULL;
+        }
+}
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+GADAPI::PACS::IncomingDicomAssociationCommand::IncomingDicomAssociationCommand(IncomingDicomAssociationCommandParams* pParams, const std::string& name) : IComando(pParams, name)
+{
+        m_pIncommingassociationParams = pParams;
+        ambitolog = name;
+}
+
+
+GADAPI::PACS::IncomingDicomAssociationCommand::~IncomingDicomAssociationCommand()
+{
+
+}
+
+void GADAPI::PACS::IncomingDicomAssociationCommand::Execute()
+{
+        OFCondition cond = EC_Normal;
+        OFString temp_str;
+
+        T_ASC_Association* assoc = m_pIncommingassociationParams->m_pAssoc;
+
+        T_DIMSE_Message msg;
+        T_ASC_PresentationContextID presID = 0;
+        DcmDataset *statusDetail = NULL;
+
+        std::string cmdname;
+
+        // start a loop to be able to receive more than one DIMSE command
+        while( cond == EC_Normal || cond == DIMSE_NODATAAVAILABLE || cond == DIMSE_OUTOFRESOURCES ) {
+                // receive a DIMSE command over the network
+                cond = DIMSE_receiveCommand(assoc, DIMSE_BLOCKING, m_pIncommingassociationParams->m_rcvTimeout, &presID, &msg, &statusDetail);
+
+                // if the command which was received has extra status
+                // detail information, dump this information
+                if (statusDetail != NULL) {
+                        LOG_WARN(ambitolog, "Status Detail:" << OFendl << DcmObject::PrintHelper(*statusDetail));
+                        delete statusDetail;
+                }
+
+                // check if peer did release or abort, or if we have a valid message
+                if (cond == EC_Normal) {
+
+                        switch (msg.CommandField) {
+                        case DIMSE_C_ECHO_RQ:
+
+                                echoSCP(assoc, &msg, presID, &cond);
+
+                                break;
+                        case DIMSE_C_STORE_RQ:
+                                cmdname = "C-STORE-RQ";
+
+                                storeSCP(assoc, &msg, presID, &cond);
+                                break;
+
+                        case DIMSE_C_GET_RQ:
+                                cmdname = "C-GET-RQ";
+#if 0
+                                getSCP(assoc, &msg, presID, &cond);
+#else
+                                {
+                                        LOG_ERROR(ambitolog, _Std("Ignoring incoming operation ") << cmdname << ":" << _Std("Not implemented"));
+
+                                        DIC_UL x = 0, y = 0;
+                                        DIMSE_ignoreDataSet(assoc, DIMSE_BLOCKING, 0, &x, &y);
+
+                                        T_DIMSE_Message rsp;
+                                        bzero((char*)&rsp, sizeof(rsp));
+                                        rsp.CommandField = DIMSE_C_GET_RSP;
+                                        rsp.msg.CGetRSP.DimseStatus = STATUS_GET_Failed_SOPClassNotSupported;
+                                        rsp.msg.CGetRSP.MessageIDBeingRespondedTo = msg.msg.CGetRQ.MessageID;
+                                        strcpy(rsp.msg.CGetRSP.AffectedSOPClassUID, msg.msg.CGetRQ.AffectedSOPClassUID);
+                                        rsp.msg.CGetRSP.opts = O_GET_AFFECTEDSOPCLASSUID
+                                                               | O_GET_NUMBEROFREMAININGSUBOPERATIONS
+                                                               | O_GET_NUMBEROFCOMPLETEDSUBOPERATIONS
+                                                               | O_GET_NUMBEROFFAILEDSUBOPERATIONS
+                                                               | O_GET_NUMBEROFWARNINGSUBOPERATIONS;
+                                        rsp.msg.CGetRSP.DataSetType = DIMSE_DATASET_NULL;
+                                        rsp.msg.CGetRSP.NumberOfCompletedSubOperations = 0;
+                                        rsp.msg.CGetRSP.NumberOfFailedSubOperations = 1;
+                                        rsp.msg.CGetRSP.NumberOfRemainingSubOperations = 0;
+                                        rsp.msg.CGetRSP.NumberOfWarningSubOperations = 0;
+
+                                        DcmDataset ds_detail;
+                                        ds_detail.putAndInsertString(DCM_SpecificCharacterSet, "ISO_IR 192");
+                                        ds_detail.putAndInsertString(DCM_ErrorComment, _Std("Not implemented").c_str());
+                                        cond = DIMSE_sendMessageUsingMemoryData(assoc, presID, &rsp, &ds_detail, NULL, NULL, NULL);
+                                }
+#endif
+                                break;
+                        case DIMSE_C_FIND_RQ:
+                                cmdname = "C-FIND-RQ";
+                                cond = DIMSE_BADCOMMANDTYPE;
+                                break;
+                        case DIMSE_C_MOVE_RQ:
+                                cmdname = "C-MOVE-RQ";
+                                cond = DIMSE_BADCOMMANDTYPE;
+                                break;
+                        case DIMSE_C_CANCEL_RQ:
+                                cmdname = "C-CANCEL-RQ";
+                                cond = DIMSE_BADCOMMANDTYPE;
+                                break;
+                        case DIMSE_N_EVENT_REPORT_RQ:
+                                cmdname = "N-EVENT-RQ";
+                                cond = DIMSE_BADCOMMANDTYPE;
+                                break;
+                        case DIMSE_N_GET_RQ:
+                                cmdname = "N-GET-RQ";
+                                cond = DIMSE_BADCOMMANDTYPE;
+                                break;
+                        case DIMSE_N_SET_RQ:
+                                cmdname = "N-SET-RQ";
+                                cond = DIMSE_BADCOMMANDTYPE;
+                                break;
+                        case DIMSE_N_ACTION_RQ:
+                                cmdname = "N-ACTION-RQ";
+                                cond = DIMSE_BADCOMMANDTYPE;
+                                break;
+                        case DIMSE_N_CREATE_RQ:
+                                cmdname = "N-CREATE-RQ";
+                                cond = DIMSE_BADCOMMANDTYPE;
+                                break;
+                        case DIMSE_N_DELETE_RQ:
+                                cmdname = "N-DELETE-RQ";
+                                cond = DIMSE_BADCOMMANDTYPE;
+                                break;
+                        case DIMSE_NOTHING:
+                                cmdname = "NOTHING";
+                                cond = DIMSE_BADCOMMANDTYPE;
+                                break;
+                        default:
+                                // we cannot handle this kind of message
+                                cond = DIMSE_BADCOMMANDTYPE;
+                                break;
+                        }
+                }
+        }
+
+        if (cond == DIMSE_BADCOMMANDTYPE) {
+                std::ostringstream os;
+                os << "0x" << std::hex << OFstatic_cast(unsigned, msg.CommandField);
+                cmdname = os.str();
+                LOG_ERROR(ambitolog, _Std("Ignoring incoming operation ") << cmdname << ":" << _Std("Not implemented"));
+                ASC_abortAssociation(assoc);
+        } else {
+                if (cond == DUL_PEERREQUESTEDRELEASE) {
+                        LOG_DEBUG(ambitolog, "Association released by remote endpoint");
+                        cond = ASC_acknowledgeRelease(assoc);
+                } else if (cond == DUL_PEERABORTEDASSOCIATION) {
+                        LOG_WARN(ambitolog, "Association Aborted by remote endpoint");
+                } else {
+                        LOG_ERROR(ambitolog, "DIMSE failure (aborting association): " << DimseCondition::dump(temp_str, cond).c_str());
+                        // some kind of error so abort the association
+                        cond = ASC_abortAssociation(assoc);
+                }
+                if (cond.bad()) {
+                        LOG_WARN(ambitolog, "DIMSE failure (closing association): " << DimseCondition::dump(temp_str, cond).c_str());
+                }
+        }
+}
+
+
+void GADAPI::PACS::IncomingDicomAssociationCommand::echoSCP( T_ASC_Association * assoc, T_DIMSE_Message * msg, unsigned char presID, OFCondition* rcond)
+{
+        OFString temp_str;
+        LOG_INFO(ambitolog, "Received Echo Request");
+        LOG_DEBUG(ambitolog, DIMSE_dumpMessage(temp_str, msg->msg.CEchoRQ, DIMSE_INCOMING, NULL, presID));
+
+        // the echo succeeded !!
+        OFCondition cond = DIMSE_sendEchoResponse(assoc, presID, &msg->msg.CEchoRQ, STATUS_Success, NULL);
+        if (cond.bad()) {
+                LOG_ERROR(ambitolog, "Echo SCP Failed: " << DimseCondition::dump(temp_str, cond));
+        }
+        *rcond = cond;
+}
+
+/**
+* This function processes a DIMSE C-STORE-RQ commmand that was
+* received over the network connection.
+*
+* Parameters:
+*   assoc  - [in] The association (network connection to another DICOM application).
+*   msg    - [in] The DIMSE C-STORE-RQ message that was received.
+*   presID - [in] The ID of the presentation context which was specified in the PDV which contained
+*                 the DIMSE command.
+*/
+void GADAPI::PACS::IncomingDicomAssociationCommand::storeSCP( T_ASC_Association *assoc, T_DIMSE_Message *msg, unsigned char presID, OFCondition* rcond)
+{
+
+        OFCondition cond = EC_Normal;
+        T_DIMSE_C_StoreRQ *req;
+
+        // assign the actual information of the C-STORE-RQ command to a local variable
+        req = &msg->msg.CStoreRQ;
+
+        if (m_TempDir.size() == 0) {
+                m_TempDir = GNC::Entorno::Instance()->CreateGinkgoTempFile();
+        }
+
+        // GW: still not secure, but no longer a resource leak, see also #16
+        // since right now I don't know how to properly work around this, I'll just tag the code.
+        // coverity[SECURE_TEMP]
+        char *fileName = tempnam(m_TempDir.c_str(), "sscpfile_");
+        if (!fileName) {
+                LOG_ERROR(ambitolog, "Unable to create unique file name:"<< strerror(errno));
+                *rcond = makeOFCondition(OFM_dcmnet, 20, OF_error, "IncomingDicomAssociationCommand::storeSCP: unable to create unique file name");
+                return;
+        }
+
+        // dump some information if required
+        OFString str;
+        LOG_DEBUG(ambitolog, "Received Store Request: MsgID " << req->MessageID << ", (" << dcmSOPClassUIDToModality(req->AffectedSOPClassUID, "OT") << ")");
+        LOG_DEBUG(ambitolog, DIMSE_dumpMessage(str, *req, DIMSE_INCOMING, NULL, presID));
+
+        // intialize some variables
+        StoreCallbackData callbackData;
+        callbackData.assoc = assoc;
+        DcmFileFormat dcmff;
+        callbackData.dcmff = &dcmff;
+
+        // store SourceApplicationEntityTitle in metaheader
+        if (assoc && assoc->params) {
+                const char *aet = assoc->params->DULparams.callingAPTitle;
+                if (aet) dcmff.getMetaInfo()->putAndInsertString(DCM_SourceApplicationEntityTitle, aet);
+        }
+
+        // define an address where the information which will be received over the network will be stored
+
+        // if opt_bitPreserving is set, the user requires that the data shall be
+        // written exactly as it was received. Depending on this option, function
+        // DIMSE_storeProvider must be called with certain parameters.
+        bool opt_useMetaheader = true;
+        int opt_dimse_timeout = 60;
+        cond = DIMSE_storeProvider(assoc, presID, req, fileName, opt_useMetaheader, NULL, storeSCPCallback, &callbackData, DIMSE_NONBLOCKING, opt_dimse_timeout);
+
+
+
+        // if some error occured, dump corresponding information and remove the outfile if necessary
+        if (cond.bad()) {
+                OFString temp_str;
+                LOG_ERROR(ambitolog, "Store SCP Failed: " << DimseCondition::dump(temp_str, cond));
+                // remove file
+                if (strcmp(fileName, NULL_DEVICE_NAME) != 0)
+                        OFStandard::deleteFile(fileName);
+        } else {
+                m_DicomFileList.push_back(std::string(fileName));
+        }
+        free(fileName);
+        *rcond = cond;
+}
+
+void GADAPI::PACS::IncomingDicomAssociationCommand::Update()
+{
+
+
+        if(m_Error != "") {
+                LOG_WARN(ambitolog, m_Error);
+                GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL, m_Error, GNC::GCS::Events::EventoMensajes::PopUpMessage, false, GNC::GCS::Events::EventoMensajes::Error));
+        }
+
+        if (m_DicomFileList.size() > 0) {
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(m_DicomFileList, false, GNC::GCS::HistoryController::TAA_MOVE);
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial * pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+                GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Including files..."),pCmd,NULL);
+        }
+}
diff --git a/cadxcore/commands/incomingdicomassociationcommand.h b/cadxcore/commands/incomingdicomassociationcommand.h
new file mode 100644
index 0000000..5c798b2
--- /dev/null
+++ b/cadxcore/commands/incomingdicomassociationcommand.h
@@ -0,0 +1,71 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/globals.h>
+#include <api/icommand.h>
+
+struct T_ASC_Association;
+struct T_DIMSE_Message;
+class OFCondition;
+
+namespace GADAPI
+{
+
+namespace PACS
+{
+class EXTAPI IncomingDicomAssociationCommandParams : public GNC::GCS::IComandoParams
+{
+public:
+        IncomingDicomAssociationCommandParams(T_ASC_Association* assoc, unsigned long rcvTimeout = 0);
+        virtual ~IncomingDicomAssociationCommandParams();
+
+        T_ASC_Association* m_pAssoc;
+        long               m_rcvTimeout;
+};
+
+//-----------------------------------------------------------------------------------------------
+//-----------------------------------------------------------------------------------------------
+
+class EXTAPI IncomingDicomAssociationCommand : public GNC::GCS::IComando
+{
+public:
+        IncomingDicomAssociationCommand(IncomingDicomAssociationCommandParams* pParams, const std::string& name="SCP-Service");
+        virtual ~IncomingDicomAssociationCommand();
+
+protected:
+
+        virtual void Execute();
+        virtual void Update();
+
+        void echoSCP( T_ASC_Association * assoc, T_DIMSE_Message * msg, unsigned char presID, OFCondition* cond);
+        void storeSCP( T_ASC_Association * assoc, T_DIMSE_Message * msg, unsigned char presID, OFCondition* cond);
+
+        IncomingDicomAssociationCommandParams* m_pIncommingassociationParams;
+
+        std::string ambitolog;
+
+        std::list<std::string> m_DicomFileList;
+        std::string m_TempDir;
+        std::string m_Error;
+};
+
+}
+}
diff --git a/cadxcore/commands/inotificadorcalibrado.h b/cadxcore/commands/inotificadorcalibrado.h
new file mode 100644
index 0000000..b3fdfb4
--- /dev/null
+++ b/cadxcore/commands/inotificadorcalibrado.h
@@ -0,0 +1,42 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+namespace GNC
+{
+namespace GUI
+{
+struct TPuntoCalibrado;
+}
+}
+
+namespace GADAPI
+{
+
+class INotificadorCalibrado
+{
+public:
+        INotificadorCalibrado() {}
+        virtual ~INotificadorCalibrado() {}
+
+        virtual void SetPuntosCalibrado(std::list<GNC::GUI::TPuntoCalibrado>& puntos) = 0;
+};
+}
diff --git a/cadxcore/commands/linkhistorycommand.cpp b/cadxcore/commands/linkhistorycommand.cpp
new file mode 100644
index 0000000..0e90a48
--- /dev/null
+++ b/cadxcore/commands/linkhistorycommand.cpp
@@ -0,0 +1,190 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/msgdlg.h>
+#include <wx/uri.h>
+
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/ivista.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/imodelointegracion.h>
+#include <api/controllers/icontroladorcarga.h>
+#include <api/dicom/imodelodicom.h>
+#include <main/entorno.h>
+#include "linkhistorycommand.h"
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <main/gui/history3/historypanel3.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/pacscontroller.h>
+
+#include "dialogopathssobreescribirbase.h"
+
+#define IDC_INCLUIR       101
+
+namespace GADAPI
+{
+
+//lee un directorio en profundidad y lo incluye en el dicomdir
+namespace LinkHistoryCommand
+{
+LinkHistoryCommandParams::LinkHistoryCommandParams(const GNC::GCS::Ptr<IModeloDicom>& pModelo) :
+        m_pModelo(pModelo),
+        m_abrirDespuesDeCargar(false),
+        m_informar(true)
+
+{ }
+
+LinkHistoryCommandParams::~LinkHistoryCommandParams()
+{
+}
+
+
+LinkHistoryCommand::LinkHistoryCommand(LinkHistoryCommandParams* pParams) : IComando(pParams)
+{
+        GTRACE(">> ComandoCarga::ComandoCarga(): " << this);
+        m_pLinkParams = pParams;
+        SetId(IDC_INCLUIR);
+        GTRACE("<< ComandoCarga::ComandoCarga(): " << this);
+}
+
+void LinkHistoryCommand::Execute()
+{
+        std::list<long>* insertedSeriesPtr = &(m_pLinkParams->m_InsertedSeries);
+
+        NotificarProgreso(0.0f,_Std("Linking study..."));
+
+        //first iteration insert downloaded slices into history as usual...
+        if (m_pLinkParams->m_pModelo.IsValid()) {
+                //listamos las imagenes que nos hemos bajado
+                GNC::GCS::HistoryController::StringList urlList;
+                for (IModeloDicom::ListaPacientesType::const_iterator it = m_pLinkParams->m_pModelo->ListaPacientes().begin(); it != m_pLinkParams->m_pModelo->ListaPacientes().end(); ++it) {
+                        const IModeloPaciente& p = *it;
+                        for (IModeloPaciente::ListaEstudiosType::const_iterator it2 = p.ListaEstudios().begin(); it2 != p.ListaEstudios().end(); ++it2) {
+                                const IModeloEstudio& e = *it2;
+                                for (IModeloEstudio::ListaSeriesType::const_iterator it3 = e.ListaSeries().begin(); it3 != e.ListaSeries().end(); ++it3) {
+                                        const IModeloSerie& s = *it3;
+                                        //first of all insert files...
+                                        GNC::GCS::HistoryController::StringList fileList;
+                                        GNC::GCS::IHistoryController::DICOMFileModelList fileModels;
+                                        for (IModeloSerie::ListaImagenesType::const_iterator it4 = s.ListaImagenes().begin(); it4 != s.ListaImagenes().end(); ++it4) {
+                                                const IModeloImagen& im = *it4;
+                                                std::string path = im.GetPathImagen();
+                                                wxFileName filename(FROMPATH(im.GetPathImagen()));
+                                                if(filename.GetExt().Lower() == wxT("dcm") || GIL::DICOM::PACSController::Instance()->EsDICOM(im.GetPathImagen(), false, true) ) {
+                                                        fileList.push_back(im.GetPathImagen());
+                                                } else if (!path.empty()) {
+                                                        GNC::GCS::IHistoryController::DICOMFileModel fileModel;
+                                                        fileModel.file.file_path = im.GetPathImagen();
+                                                        long in = 0;
+                                                        wxString::FromUTF8(im.GetInstanceNumber().c_str()).ToLong(&in);
+                                                        fileModel.file.instance_number = in;
+                                                        fileModel.file.sopiuid = im.GetUID();
+                                                        fileModels.push_back(fileModel);
+                                                } else {
+                                                        LOG_ERROR("LINKCommand", "trying to link an instance without wado url: " << im.GetUID());
+                                                        m_pLinkParams->m_ErrorList.push_back(GNC::GCS::HistoryController::TAddError(GNC::GCS::IHistoryController::TAddError::TE_WrongFormat, im.GetUID()));
+                                                }
+                                        }
+                                        if (fileList.empty()) {
+                                                //error no file in series
+                                                return;
+                                        }
+                                        if (GNC::GCS::HistoryController::Instance()->AddFiles(fileList, m_pLinkParams->m_ErrorList, insertedSeriesPtr, this, GNC::GCS::HistoryController::TAA_MOVE)) {
+                                                GNC::GCS::HistoryController::Instance()->LinkFilesToSeries(insertedSeriesPtr->back(), fileModels,this);
+                                        }
+                                }
+                        }
+                }
+        }
+}
+
+void LinkHistoryCommand::Update()
+{
+        wxString message = wxT("");
+        message += _("Image acquisition finished.");
+        message += wxT("\n");
+        if (m_pLinkParams->m_ErrorList.size() > 0)
+                message += wxString::Format(_("\nThere are %d errors (see log for more detailed description)"), (int)(m_pLinkParams->m_ErrorList.size()));
+
+        //log
+        {
+                std::ostringstream errorOstr;
+                if (!m_pLinkParams->m_ErrorList.empty()) {
+
+                        bool first = true;
+                        for (GNC::GCS::HistoryController::TAddErrorList::iterator it = m_pLinkParams->m_ErrorList.begin(); it != m_pLinkParams->m_ErrorList.end(); ++it) {
+                                if ((*it).error == GNC::GCS::HistoryController::TAddError::TE_FileNotExist) {
+                                        if (first) {
+                                                errorOstr<< "\t" << _Std("This files doesn't exist:") << std::endl;
+                                                first = false;
+                                        }
+                                        errorOstr << "\t\t" << (*it).path << std::endl;
+                                }
+                        }
+                        first = true;
+                        for (GNC::GCS::HistoryController::TAddErrorList::iterator it = m_pLinkParams->m_ErrorList.begin(); it != m_pLinkParams->m_ErrorList.end(); ++it) {
+                                if ((*it).error == GNC::GCS::HistoryController::TAddError::TE_WrongFormat) {
+                                        if (first) {
+                                                errorOstr<< "\t" << _Std("This files doesn't have DICOM format:") << std::endl;
+                                                first = false;
+                                        }
+                                        errorOstr << "\t\t" << (*it).path << std::endl;
+                                }
+                        }
+
+                        first = true;
+                        for (GNC::GCS::HistoryController::TAddErrorList::iterator it = m_pLinkParams->m_ErrorList.begin(); it != m_pLinkParams->m_ErrorList.end(); ++it) {
+                                if ((*it).error == GNC::GCS::HistoryController::TAddError::TE_DICOMDir) {
+                                        if (first) {
+                                                errorOstr << "\t" <<_Std("This files are Dicom Dirs:") << std::endl;
+                                                first = false;
+                                        }
+                                        errorOstr << "\t\t" << (*it).path << std::endl;
+                                }
+                        }
+                }
+
+                std::string errorString = errorOstr.str();
+                if (!errorString.empty()) {
+                        LOG_ERROR("ComandoIncluirHistorial", errorOstr.str());
+                }
+        }
+
+        GNC::GUI::HistoryPanel3::Instance()->ReloadCombos(false);
+        GNC::GUI::HistoryPanel3::Instance()->RefreshSearch();
+        const int MAX_OPENED_STUDIES = 3;
+        if (m_pLinkParams->m_abrirDespuesDeCargar) {
+                std::set<long> openedStudies;
+                for (std::list<long>::iterator it = m_pLinkParams->m_InsertedSeries.begin(); it != m_pLinkParams->m_InsertedSeries.end() && openedStudies.size() < MAX_OPENED_STUDIES; ++it) {
+                        GNC::GCS::HistoryController::SeriesModel seriesModel = GNC::GCS::HistoryController::Instance()->GetSeriesModel((*it));
+                        GNC::GUI::HistoryPanel3::Instance()->OpenSeriesOrStudy(seriesModel.study_fk, false);
+                }
+        }
+}
+}
+}
+
diff --git a/cadxcore/commands/linkhistorycommand.h b/cadxcore/commands/linkhistorycommand.h
new file mode 100644
index 0000000..5497dfe
--- /dev/null
+++ b/cadxcore/commands/linkhistorycommand.h
@@ -0,0 +1,73 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <list>
+#include <set>
+
+#include <api/api.h>
+#include <api/icommand.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/controllers/ihistorycontroller.h>
+#include <api/dicom/imodelodicom.h>
+#include <wx/string.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+
+namespace GADAPI
+{
+//lee un directorio en profundidad y lo incluye en el dicomdir
+namespace LinkHistoryCommand
+{
+class LinkHistoryCommand;
+class EXTAPI LinkHistoryCommandParams : public GNC::GCS::IComandoParams
+{
+public:
+        LinkHistoryCommandParams(const GNC::GCS::Ptr<IModeloDicom>& pModelo);
+        virtual ~LinkHistoryCommandParams();
+
+        GNC::GCS::Ptr<IModeloDicom> m_pModelo;
+        GNC::GCS::IHistoryController::TAddErrorList m_ErrorList;
+        std::list<long>                             m_InsertedSeries;
+        bool m_abrirDespuesDeCargar;
+        bool m_informar;
+};
+
+class EXTAPI LinkHistoryCommand : public GNC::GCS::IComando
+{
+public:
+
+        LinkHistoryCommand(LinkHistoryCommandParams* pParams);
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+private:
+        LinkHistoryCommandParams* m_pLinkParams;
+};
+}
+}
diff --git a/cadxcore/commands/openremovableunit.cpp b/cadxcore/commands/openremovableunit.cpp
new file mode 100644
index 0000000..ae0e5a0
--- /dev/null
+++ b/cadxcore/commands/openremovableunit.cpp
@@ -0,0 +1,165 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/window.h>
+#include <wx/volume.h>
+#include <wx/msgdlg.h>
+#include <api/globals.h>
+#include <main/controllers/commandcontroller.h>
+#include <api/internationalization/internationalization.h>
+#include "openremovableunit.h"
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/pacscontroller.h>
+#include <main/gui/open/opendialogs.h>
+#include <main/gui/open/abrir.h>
+#include <commands/comandoincluirhistorial.h>
+#include <main/entorno.h>
+
+#include <main/controllers/anonusagestats.h>
+
+namespace GADAPI
+{
+OpenRemovableUnitCommand::OpenRemovableUnitCommand(OpenRemovableUnitCommandParams* pParams) : IComando(pParams)
+{
+        m_pOpenParams = pParams;
+}
+
+void OpenRemovableUnitCommand::Execute()
+{
+        LOG_STAT(ANON_STAT_OPEN_CD)
+#ifdef _WIN32
+        NotificarProgreso(0.15f, _Std("Exploring drives..."));
+        wxArrayString volumes = wxFSVolume::GetVolumes(wxFS_VOL_MOUNTED|wxFS_VOL_REMOVABLE );
+        NotificarProgreso(0.75f, _Std("Exploring drives..."));
+        wxArrayString mountedVolumes;
+        for (wxArrayString::iterator it = volumes.begin(); it != volumes.end(); ++it) {
+                wxFSVolume fs((*it));
+                if (fs.IsOk()) {
+                        OpenRemovableUnitCommandParams::TRemovableUnit unit;
+                        unit.path = TOPATH(fs.GetName());
+                        //first of all list files in path if it isn't mounted ... error
+                        wxDir dir;
+                        wxString tmp;
+                        if (dir.Open(fs.GetName()) && dir.GetFirst(&tmp)) {
+                                //second check if it includes dicomdir
+                                wxString dicomDirPath = fs.GetName() + wxT("DICOMDIR");
+                                unit.hasDicomDir = wxFileExists(dicomDirPath) && GIL::DICOM::PACSController::Instance()->EsDICOM(TOPATH(dicomDirPath),true,false);
+
+                                unit.displayName = fs.GetDisplayName().ToUTF8();
+                                m_pOpenParams->units.push_back(unit);
+                        }
+                }
+        }
+#endif
+}
+
+void OpenRemovableUnitCommand::Update()
+{
+        if (EstaAbortado()) {
+                return;
+        }
+        if (m_pOpenParams->units.empty()) {
+                //no units
+                if (wxMessageBox(_("No DICOMDIR found in removable units.\nWould you like to scan other path recursively?"), _("Info"), wxOK|wxCANCEL, m_pOpenParams->m_pParent) == wxOK) {
+                        GNC::GUI::Abrir::AbrirDirectorio(m_pOpenParams->m_pParent);
+                }
+        } else {
+                if (!OpenDicomDir()) {
+                        ScanRecursively();
+                }
+        }
+}
+bool OpenRemovableUnitCommand::OpenDicomDir()
+{
+        int numberOfUnits = 0;
+        std::string path;
+        for (OpenRemovableUnitCommandParams::TListOfUnits::iterator it = m_pOpenParams->units.begin(); it != m_pOpenParams->units.end(); ++it) {
+                if ((*it).hasDicomDir) {
+                        numberOfUnits++;
+                        path = (*it).path;
+                }
+        }
+        if (numberOfUnits == 0) {
+                return false;
+        } else if (numberOfUnits == 1) {
+                //dialogo de adquisicion a traves de dicomdir...
+                LaunchOpenDicomDir(path);
+        } else {
+                //show dialog listing units..
+                SelectDrive(true);
+        }
+        return true;
+}
+
+bool OpenRemovableUnitCommand::ScanRecursively()
+{
+        if (m_pOpenParams->units.size() == 1) {
+                wxString name = wxString::FromUTF8(m_pOpenParams->units.front().displayName.c_str());
+                wxString message = wxString::Format(_("No DICOMDIR found in removable units, would you like to scan recursively %s drive"), name.c_str());
+                if (wxMessageBox(message, _("Info"), wxOK|wxCANCEL, m_pOpenParams->m_pParent) == wxOK) {
+                        LaunchOpenRecursively(m_pOpenParams->units.front().path);
+                }
+        } else {
+                SelectDrive(false);
+        }
+        return true;
+}
+
+void OpenRemovableUnitCommand::SelectDrive(bool hasDicomDir)
+{
+        GNC::GUI::SelectDrive::TListOfDrives listOfDrives;
+        for (OpenRemovableUnitCommandParams::TListOfUnits::iterator it = m_pOpenParams->units.begin(); it != m_pOpenParams->units.end(); ++it) {
+                if ((*it).hasDicomDir == hasDicomDir) {
+                        listOfDrives.push_back(GNC::GUI::SelectDrive::TDrive((*it).path, (*it).displayName));
+                }
+        }
+        GNC::GUI::SelectDrive dialog(m_pOpenParams->m_pParent, listOfDrives);
+        if (hasDicomDir) {
+                dialog.SetMessage(_("Select drive you want to open"));
+        } else {
+                dialog.SetMessage(_("Ginkgo CADx has detected more than one removable units,\nbut none of them includes a DICOMDIR at root.\nSelect drive where you want to acquire recursively"));
+        }
+        if (dialog.ShowModal() == wxID_OK) {
+                std::string path = dialog.GetSelectedDrive();
+                if (hasDicomDir) {
+                        LaunchOpenDicomDir(path);
+                } else {
+                        LaunchOpenRecursively(path);
+                }
+        }
+}
+
+void OpenRemovableUnitCommand::LaunchOpenRecursively(const std::string& path)
+{
+        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(path,true);
+        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+        GNC::Entorno::Instance()->GetCommandController()->ProcessAsync(_Std("Storing in the history..."),pCmd, NULL);
+}
+
+void OpenRemovableUnitCommand::LaunchOpenDicomDir(const std::string& path)
+{
+        std::ostringstream ostr;
+        ostr << path << "DICOMDIR";
+        GNC::GUI::DialogoDicomDir dicomDirDialog(m_pOpenParams->m_pParent, ostr.str());
+        dicomDirDialog.ShowModal();
+}
+}
diff --git a/cadxcore/commands/openremovableunit.h b/cadxcore/commands/openremovableunit.h
new file mode 100644
index 0000000..65ceb02
--- /dev/null
+++ b/cadxcore/commands/openremovableunit.h
@@ -0,0 +1,66 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/icommand.h>
+
+namespace GADAPI
+{
+class  OpenRemovableUnitCommandParams: public GNC::GCS::IComandoParams
+{
+public:
+        typedef struct TRemovableUnit {
+                std::string displayName;
+                std::string path;
+                bool hasDicomDir;
+        } TRemovableUnit;
+
+        OpenRemovableUnitCommandParams(wxWindow* pParent)
+        {
+                m_pParent = pParent;
+        }
+        virtual ~OpenRemovableUnitCommandParams()
+        {
+        }
+public:
+        typedef std::list<TRemovableUnit> TListOfUnits;
+        TListOfUnits units;
+        wxWindow* m_pParent;
+};
+
+
+class OpenRemovableUnitCommand : public GNC::GCS::IComando
+{
+public:
+        OpenRemovableUnitCommand(OpenRemovableUnitCommandParams* pParams);
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+        bool OpenDicomDir();
+        bool ScanRecursively();
+        void SelectDrive(bool hasDicomDir);
+        void LaunchOpenRecursively(const std::string& path);
+        void LaunchOpenDicomDir(const std::string& path);
+protected:
+
+        OpenRemovableUnitCommandParams* m_pOpenParams;
+};
+}
diff --git a/cadxcore/commands/pacsdownloadcommand.cpp b/cadxcore/commands/pacsdownloadcommand.cpp
new file mode 100644
index 0000000..e122ae5
--- /dev/null
+++ b/cadxcore/commands/pacsdownloadcommand.cpp
@@ -0,0 +1,198 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+
+#include <sstream>
+#include <map>
+
+#include <api/api.h>
+#include <api/globals.h>
+#include <api/ientorno.h>
+
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/commandcontroller.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/controllers/icontroladorpermisos.h>
+
+#include <eventos/mensajes.h>
+
+#include <main/controllers/dcmtk/dicomservers.h>
+
+#include "pacsdownloadcommand.h"
+#include "comandoincluirhistorial.h"
+#include "linkhistorycommand.h"
+
+
+#define IDC_PACS_BUSCAR                  61
+#define IDC_PACS_DESCARGAR               62
+#define IDC_PACS_SUBIR			         64
+
+#define ID_REFRESCO_PROGRESO 1
+
+#define PARALLEL
+
+// Singleton de persistencia
+namespace GADAPI
+{
+
+PACSDownloadCommandParams::PACSDownloadCommandParams(const std::string& serverSeleccionado, const GIL::DICOM::DicomDataset& base, bool link, bool silent) :
+        m_link(link),
+        m_silent(silent),
+        m_base(base)
+{
+        m_base = base;
+        m_pModelo = GNC::GCS::Ptr<IModeloDicom>(new IModeloDicom());
+
+        if(serverSeleccionado == "") {
+                //usaremos el primer servidor (por defecto)
+                if(!DicomServerList::Instance()->Empty()) {
+                        m_serverSeleccionado = DicomServerList::Instance()->GetDefaultServer()->ID;
+                } else {
+                        throw GIL::DICOM::PACSException(_Std("There is not any Remote PACS configured"));
+                }
+        } else {
+                m_serverSeleccionado = serverSeleccionado;
+        }
+
+        m_error = "";
+}
+
+PACSDownloadCommandParams::~PACSDownloadCommandParams()
+{
+}
+
+PACSDownloadCommand::PACSDownloadCommand(PACSDownloadCommandParams* pParams) : IComando(pParams)
+{
+        m_pPACSParams = pParams;
+        SetId(IDC_PACS_DESCARGAR);
+        EsperaA(IDC_PACS_DESCARGAR);
+#if !defined(PARALLEL)
+        EsperaA(IDC_PACS_BUSCAR);
+        EsperaA(IDC_PACS_DESCARGAR);
+        EsperaA(IDC_PACS_SUBIR);
+#endif
+}
+
+void PACSDownloadCommand::Execute()
+{
+        std::string tarea= _Std("Downloading files ...");
+        if (!NotificarProgreso(0.0f,tarea)) {
+                return;
+        }
+
+        GIL::DICOM::IPACSController* pCI = NULL;
+
+        try {
+                pCI = GNC::GCS::IEntorno::Instance()->GetPACSController();
+                pCI->GetConnection(this);
+                pCI->QueryRetrieve(this, m_pPACSParams->m_serverSeleccionado, m_pPACSParams->m_pModelo, m_pPACSParams->m_base, this, m_pPACSParams->m_link);
+        } catch (GinkgoNoServerFoundException& ) {
+                m_pPACSParams->m_error= _Std("Server ID not found. ID = ") + m_pPACSParams->m_serverSeleccionado;
+                m_pPACSParams->m_pModelo->Error = true;
+        } catch (GIL::DICOM::PACSException& ex) {
+                m_pPACSParams->m_error =  (const std::string)ex;
+                m_pPACSParams->m_pModelo->Error = true;
+        } catch (std::exception& ex) {
+                m_pPACSParams->m_error= ex.what();
+                m_pPACSParams->m_pModelo->Error = true;
+        } catch (...) {
+                m_pPACSParams->m_error= _Std("Internal Error");
+                m_pPACSParams->m_pModelo->Error = true;
+        }
+        if (pCI) {
+                pCI->ReleaseConnection(this);
+        }
+        GTRACE(m_pPACSParams->m_pModelo);
+        NotificarProgreso(1.0f,tarea);
+}
+
+void PACSDownloadCommand::Update()
+{
+        if (EstaAbortado()) {
+                return;
+        }
+
+
+        if(!m_pPACSParams->m_error.empty()) {
+                LOG_ERROR("C-MOVE/C-GET", "Error Downloading study: " << m_pPACSParams->m_error);
+                if (!m_pPACSParams->m_silent) {
+                        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL, _Std("Error downloading study: ") + "\n" + m_pPACSParams->m_error, GNC::GCS::Events::EventoMensajes::PopUpMessage,false, GNC::GCS::Events::EventoMensajes::Error));
+                }
+                return;
+        } else {
+                if (!m_pPACSParams->m_link) {
+                        //move downloaded images to history
+                        std::list<std::string> rutas;
+                        std::string rutaImagen;
+                        if (m_pPACSParams->m_pModelo.IsValid()) {
+                                //listamos las imagenes que nos hemos bajado
+                                for (IModeloDicom::ListaPacientesType::const_iterator it = m_pPACSParams->m_pModelo->ListaPacientes().begin(); it != m_pPACSParams->m_pModelo->ListaPacientes().end(); ++it) {
+                                        const IModeloPaciente& p = *it;
+                                        for (IModeloPaciente::ListaEstudiosType::const_iterator it2 = p.ListaEstudios().begin(); it2 != p.ListaEstudios().end(); ++it2) {
+                                                const IModeloEstudio& e = *it2;
+                                                for (IModeloEstudio::ListaSeriesType::const_iterator it3 = e.ListaSeries().begin(); it3 != e.ListaSeries().end(); ++it3) {
+                                                        const IModeloSerie& s = *it3;
+                                                        for (IModeloSerie::ListaImagenesType::const_iterator it4 = s.ListaImagenes().begin(); it4 != s.ListaImagenes().end(); ++it4) {
+                                                                const IModeloImagen& im = *it4;
+                                                                rutas.push_back(im.GetPathImagen());
+                                                        }
+                                                }
+                                        }
+                                }
+                        }
+
+                        //si ha descargado algo...
+                        if(rutas.empty()) {
+                                return;
+                        }
+
+                        //se lanza un evento para incluir las imagenes en el historial
+                        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(rutas, true, GNC::GCS::IHistoryController::TAA_MOVE);
+                        //silent mode...
+                        pParams->m_abrirDespuesDeCargar = !m_pPACSParams->m_silent;
+                        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial * pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+                        GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Including files..."), pCmd, NULL);
+                } else {
+                        //link images...
+                        GADAPI::LinkHistoryCommand::LinkHistoryCommandParams* pParams = new GADAPI::LinkHistoryCommand::LinkHistoryCommandParams(m_pPACSParams->m_pModelo);
+                        //silent mode...
+                        pParams->m_abrirDespuesDeCargar = !m_pPACSParams->m_silent;
+                        GADAPI::LinkHistoryCommand::LinkHistoryCommand * pCmd = new GADAPI::LinkHistoryCommand::LinkHistoryCommand(pParams);
+                        GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Including files..."), pCmd, NULL);
+                }
+        }
+}
+
+
+
+bool PACSDownloadCommand::NotificarProgreso(float progresoNormalizado,const std::string &texto)
+{
+        if (EstaAbortado()) {
+                return false;
+        }
+        return IComando::NotificarProgreso(progresoNormalizado, texto);
+}
+
+void PACSDownloadCommand::LiberarRecursos()
+{
+}
+
+}
diff --git a/cadxcore/commands/pacsdownloadcommand.h b/cadxcore/commands/pacsdownloadcommand.h
new file mode 100644
index 0000000..5cf7510
--- /dev/null
+++ b/cadxcore/commands/pacsdownloadcommand.h
@@ -0,0 +1,80 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+//#define _GINKGO_TRACE
+#include <api/globals.h>
+#include <api/icommand.h>
+#include <api/ivista.h>
+#include <api/dicom/imodelodicom.h>
+#include <api/controllers/ipacscontroller.h>
+
+#include <main/controllers/dcmtk/dicomservers.h>
+
+
+
+namespace GIL
+{
+class IModeloIntegracion;
+namespace DICOM
+{
+class IPACSController;
+}
+}
+
+namespace GADAPI
+{
+class PACSDownloadCommandParams : public GNC::GCS::IComandoParams
+{
+
+public:
+        //download only specifying
+        PACSDownloadCommandParams(const std::string& serverSeleccionado, const GIL::DICOM::DicomDataset& base, bool link = false, bool silent = false);
+        virtual ~PACSDownloadCommandParams();
+
+public:
+        std::string              m_serverSeleccionado;
+        bool					 m_link;
+        bool					 m_silent;
+        std::string              m_error;
+        GNC::GCS::Ptr<IModeloDicom> m_pModelo;
+        GIL::DICOM::DicomDataset m_base;
+};
+
+
+
+class EXTAPI PACSDownloadCommand : public GNC::GCS::IComando
+{
+public:
+        PACSDownloadCommand(PACSDownloadCommandParams* pParams);
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+public:
+
+        virtual bool NotificarProgreso(float progresoNormalizado, const std::string &texto);
+
+        void LiberarRecursos();
+
+        PACSDownloadCommandParams* m_pPACSParams;
+};
+}
diff --git a/cadxcore/commands/pdfextractercommand.cpp b/cadxcore/commands/pdfextractercommand.cpp
new file mode 100644
index 0000000..52a13d7
--- /dev/null
+++ b/cadxcore/commands/pdfextractercommand.cpp
@@ -0,0 +1,148 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/dir.h>
+#include <wx/file.h>
+#include <wx/filename.h>
+#include <wx/mimetype.h>
+#include <wx/msgdlg.h>
+
+#include <main/controllers/dicommanager.h>
+#include <main/entorno.h>
+
+#include "pdfextractercommand.h"
+
+#define IDC_EXTRACTER          5002
+
+// Singleton de persistencia
+namespace GADAPI
+{
+
+PDFExtracterCommandParameters::PDFExtracterCommandParameters(const std::list<std::string>& rutas, const std::list<std::string>& dests, bool forOpening)
+{
+        m_pathsOriginal.insert(m_pathsOriginal.begin(), rutas.begin(), rutas.end());
+        m_pathsExtracted.insert(m_pathsExtracted.begin(), dests.begin(), dests.end());
+        m_error = false;
+        m_ForOpening = forOpening;
+}
+
+PDFExtracterCommandParameters::~PDFExtracterCommandParameters()
+{
+}
+
+
+PDFExtracterCommand::PDFExtracterCommand(PDFExtracterCommandParameters* pParams) : IComando(pParams)
+{
+        m_pExtracterParameters = pParams;
+        SetId(IDC_EXTRACTER);
+        EsperaA(IDC_EXTRACTER);
+}
+
+void PDFExtracterCommand::Execute()
+{
+
+        wxString wxPathDirectorioTemporal;
+
+        if (m_pExtracterParameters->m_pathsExtracted.empty()) {
+                wxPathDirectorioTemporal = FROMPATH(GNC::GCS::IEntorno::Instance()->CreateGinkgoTempDir());
+        }
+
+        class ProxyNotificador: public GNC::IProxyNotificadorProgreso
+        {
+        public:
+                ProxyNotificador(PDFExtracterCommand* pCmd)
+                {
+                        m_pCmd = pCmd;
+                }
+
+                virtual bool NotificarProgreso(float progresoNormalizado, const std::string& texto)
+                {
+                        return m_pCmd->NotificarProgreso(progresoNormalizado, texto);
+                }
+                PDFExtracterCommand* m_pCmd;
+        };
+
+        ProxyNotificador proxy(this);
+        bool calculatePaths = m_pExtracterParameters->m_pathsExtracted.empty();
+
+        int i = 0;
+        for (std::vector<std::string>::iterator itRutas = m_pExtracterParameters->m_pathsOriginal.begin(); itRutas != m_pExtracterParameters->m_pathsOriginal.end(); ++itRutas) {
+
+                std::string stdFilePath;
+                if (calculatePaths) {
+                        wxString fpath = wxPathDirectorioTemporal + wxFileName::GetPathSeparator() + wxString::Format(wxT("%d.pdf"), (int)(i) );
+                        stdFilePath = std::string( TOPATH(fpath) );
+                } else {
+                        stdFilePath = m_pExtracterParameters->m_pathsExtracted.at(i);
+                }
+                //extract pdf data in temp directory...
+                GIL::DICOM::DICOMManager manager;
+                manager.CargarFichero((*itRutas));
+                //encapsulated pdf...
+                if (manager.ExtractTagToFile(0x0042, 0x0011, stdFilePath, &proxy)) {
+                        m_pExtracterParameters->m_pathsExtracted.push_back(stdFilePath);
+                } else {
+                        m_pExtracterParameters->m_error = true;
+                }
+                i++;
+        }
+}
+
+void PDFExtracterCommand::Update()
+{
+        if (m_pExtracterParameters->m_error) {
+                wxMessageBox(_("Error extracting pdf, Ginkgo CADx is unable to load this format"), _("Error"), wxOK);
+        }
+        if (m_pExtracterParameters->m_pathsExtracted.empty()) {
+                return;
+        }
+
+        if (m_pExtracterParameters->m_ForOpening) {
+
+                wxFileType* fileType = wxTheMimeTypesManager->GetFileTypeFromMimeType(wxT("application/pdf"));
+                if (fileType == NULL) {
+                        wxMessageBox(_("There isn't any pdf reader registered in the system"), _("Info"), wxICON_WARNING|wxOK);
+                        return;
+                }
+
+                for (std::vector<std::string>::iterator itRutas = m_pExtracterParameters->m_pathsExtracted.begin(); itRutas != m_pExtracterParameters->m_pathsExtracted.end(); ++itRutas) {
+                        wxString openCmd = fileType->GetOpenCommand(FROMPATH((*itRutas)));
+                        if (!openCmd.IsEmpty()) {
+                                wxExecute(openCmd);
+                        } else {
+                                wxMessageBox(_("There isn't any pdf reader registered in the system"), _("Info"), wxICON_WARNING|wxOK);
+                                break;
+                        }
+                }
+                delete fileType;
+                //		wxMessageBox(_("PDF files will be opened with system's PDF reader..."), _("Info"), wxICON_INFORMATION | wxOK);
+        } else {
+                wxMessageBox(_("PDF files extracted successfully..."), _("Info"), wxICON_INFORMATION | wxOK);
+        }
+}
+
+void PDFExtracterCommand::OnAbort()
+{
+}
+
+void PDFExtracterCommand::LiberarRecursos()
+{
+}
+}
diff --git a/cadxcore/commands/pdfextractercommand.h b/cadxcore/commands/pdfextractercommand.h
new file mode 100644
index 0000000..0d60abf
--- /dev/null
+++ b/cadxcore/commands/pdfextractercommand.h
@@ -0,0 +1,61 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+//#define _GINKGO_TRACE
+#include <vector>
+#include <api/globals.h>
+#include <api/icommand.h>
+
+
+namespace GADAPI
+{
+class PDFExtracterCommandParameters : public GNC::GCS::IComandoParams
+{
+public:
+        PDFExtracterCommandParameters(const std::list<std::string>& rutas, const std::list<std::string>& dests = std::list<std::string>(), bool forOpening = true) ;
+
+        virtual ~PDFExtracterCommandParameters() ;
+
+public:
+        std::vector<std::string> m_pathsOriginal;
+        std::vector<std::string> m_pathsExtracted;
+        bool m_error;
+        bool m_ForOpening;
+};
+
+
+class PDFExtracterCommand : public GNC::GCS:: IComando
+{
+public:
+        PDFExtracterCommand(PDFExtracterCommandParameters* pParams);
+
+protected:
+        virtual void Execute();
+
+        virtual void Update();
+
+        virtual void OnAbort();
+
+        void LiberarRecursos();
+
+        PDFExtracterCommandParameters* m_pExtracterParameters;
+};
+}
diff --git a/cadxcore/commands/secondarycapturedicomizecommand.cpp b/cadxcore/commands/secondarycapturedicomizecommand.cpp
new file mode 100644
index 0000000..4d4ff2d
--- /dev/null
+++ b/cadxcore/commands/secondarycapturedicomizecommand.cpp
@@ -0,0 +1,95 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "secondarycapturedicomizecommand.h"
+#include <api/ivista.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/ientorno.h>
+#include <api/dicom/dcmdictionary.h>
+#include <export/tagsprivadoscomunes.h>
+#include <main/controllers/dicommanager.h>
+#include <main/controllers/controladoreventos.h>
+#include <api/integration/dict.h>
+#include <api/internationalization/internationalization.h>
+#include <eventos/scgenerated.h>
+
+#include <wx/datetime.h>
+
+GADAPI::SecondaryCaptureDicomizeCommandParameters::SecondaryCaptureDicomizeCommandParameters(GNC::GCS::IVista* pView, const std::string& screenShot) : GADAPI::DicomizeCommandParams(GNC::GCS::Ptr<GNC::GUI::ImportationData>()),
+        m_pView(pView),
+        m_screenShot(screenShot)
+{
+        m_originalImagePath = m_pView->GetCurrentDICOM();
+        m_openAfterDicomize = false;
+}
+
+GADAPI::SecondaryCaptureDicomizeCommand::SecondaryCaptureDicomizeCommand(::GADAPI::SecondaryCaptureDicomizeCommandParameters* pParams) : ::GADAPI::DicomizeCommand(pParams),
+        m_pSecondaryParams(pParams)
+{
+}
+
+void GADAPI::SecondaryCaptureDicomizeCommand::Update()
+{
+        DicomizeCommand::Update();
+
+        //send an event to the view and add current series...
+        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::SCGeneratedEvent(m_pSecondaryParams->m_pView, m_pIntegracionParams->m_InsertedSeries));
+}
+
+bool GADAPI::SecondaryCaptureDicomizeCommand::ImportarFicherosOriginales()
+{
+        //fill in parameters...
+        GIL::DICOM::DICOMManager manager;
+        GIL::DICOM::DicomDataset base;
+        manager.CargarFichero(m_pSecondaryParams->m_originalImagePath, base);
+
+        GNC::GCS::Ptr<GNC::GUI::ImportationData>& ImportData = m_pSecondaryParams->m_pImportData;
+        //patient module atributes
+        ImportData->baseImages.tags[GKDCM_PatientName] = base.getTag(GKDCM_PatientName);
+        ImportData->baseImages.tags[GKDCM_PatientID] = base.getTag(GKDCM_PatientID);
+        ImportData->baseImages.tags[GKDCM_PatientBirthDate] = base.getTag(GKDCM_PatientBirthDate);
+        ImportData->baseImages.tags[GKDCM_PatientSex] = base.getTag(GKDCM_PatientSex);
+        ImportData->baseImages.tags[GKDCM_IssuerOfPatientID] = base.getTag(GKDCM_IssuerOfPatientID);
+        //study module atributes
+        ImportData->baseImages.tags[GKDCM_StudyInstanceUID] = base.getTag(GKDCM_StudyInstanceUID);
+        ImportData->baseImages.tags[GKDCM_StudyDate] = base.getTag(GKDCM_StudyDate);
+        ImportData->baseImages.tags[GKDCM_StudyTime] = base.getTag(GKDCM_StudyTime);
+        ImportData->baseImages.tags[GKDCM_StudyDescription] = base.getTag(GKDCM_StudyDescription);
+        ImportData->baseImages.tags[GKDCM_ReferringPhysicianName] = base.getTag(GKDCM_ReferringPhysicianName);
+        ImportData->baseImages.tags[GKDCM_StudyID] = base.getTag(GKDCM_StudyID);
+        ImportData->baseImages.tags[GKDCM_AccessionNumber] = base.getTag(GKDCM_AccessionNumber);
+        //series module attributes
+        ImportData->baseImages.tags[GKDCM_Modality] = "SC";
+        ImportData->baseImages.tags[GKDCM_SeriesDescription] = _Std("Ginkgo CADx Secondary Capture");
+        ImportData->baseImages.tags[GKDCM_Laterality] = base.getTag(GKDCM_Laterality);
+        wxDateTime date = wxDateTime::Now();
+        ImportData->baseImages.tags[GKDCM_InstanceCreationDate] = ImportData->baseImages.tags[GKDCM_SeriesDate] =  std::string(date.Format(wxT("%Y%m%d")).ToUTF8());
+        ImportData->baseImages.tags[GKDCM_InstanceCreationTime] = ImportData->baseImages.tags[GKDCM_SeriesTime] =std::string(date.Format(wxT("%H%M%S")).ToUTF8());
+
+        //sc module
+        ImportData->baseImages.tags[GKDCM_ConversionType] = "DI";
+
+        //fill in image file
+        ImportData->m_SourceFiles.push_back(m_pSecondaryParams->m_screenShot);
+        //call original operation!
+        return GADAPI::DicomizeCommand::ImportarFicherosOriginales();
+}
+
+//on update add to view!
diff --git a/cadxcore/commands/secondarycapturedicomizecommand.h b/cadxcore/commands/secondarycapturedicomizecommand.h
new file mode 100644
index 0000000..d2089c1
--- /dev/null
+++ b/cadxcore/commands/secondarycapturedicomizecommand.h
@@ -0,0 +1,48 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <commands/dicomizecommand.h>
+
+
+namespace GADAPI
+{
+class SecondaryCaptureDicomizeCommandParameters : public ::GADAPI::DicomizeCommandParams
+{
+public:
+        SecondaryCaptureDicomizeCommandParameters(GNC::GCS::IVista* pView, const std::string& screenShot);
+
+        GNC::GCS::IVista* m_pView;
+        std::string m_originalImagePath;
+        std::string m_screenShot;
+};
+
+class SecondaryCaptureDicomizeCommand : public ::GADAPI::DicomizeCommand
+{
+public:
+        SecondaryCaptureDicomizeCommand(::GADAPI::SecondaryCaptureDicomizeCommandParameters* pParams);
+
+protected:
+        virtual void Update();
+        virtual bool ImportarFicherosOriginales();
+
+        SecondaryCaptureDicomizeCommandParameters* m_pSecondaryParams;
+};
+}
diff --git a/cadxcore/commands/sendhl7command.cpp b/cadxcore/commands/sendhl7command.cpp
new file mode 100644
index 0000000..bfe0687
--- /dev/null
+++ b/cadxcore/commands/sendhl7command.cpp
@@ -0,0 +1,265 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+
+#include <wx/string.h>
+#include <wx/intl.h>
+#include <wx/thread.h>
+
+#include <api/internationalization/internationalization.h>
+
+#include <endpoint/endpoint.h>
+#include "sendhl7command.h"
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/controladorhl7.h>
+#include <api/imodelohl7.h>
+#include <api/ihl7parser.h>
+
+#define IDC_SEND_HL7								117
+
+// Singleton de persistencia
+namespace GADAPI
+{
+SendHL7CommandParams::SendHL7CommandParams(const std::list<GIL::HL7::MensajeHL7>& messages)
+{
+        this->messages = messages;
+        m_idLastSock = -1;
+        m_pSemaphore = new wxSemaphore;
+}
+
+SendHL7CommandParams::~SendHL7CommandParams()
+{
+        delete m_pSemaphore;
+}
+
+SendHL7Command::SendHL7Command(SendHL7CommandParams* pParams) : IComando(pParams)
+{
+        m_pSendParams = pParams;
+
+        SetId(IDC_SEND_HL7);
+        EsperaA(IDC_SEND_HL7);
+}
+
+void SendHL7Command::Execute()
+{
+        int current = 1;
+        for(std::list<GIL::HL7::MensajeHL7>::iterator it = m_pSendParams->messages.begin(); it!=m_pSendParams->messages.end(); ++it) {
+                bool sent = false;
+                while (!sent && !EstaAbortado()) {
+                        float currentProgress = (float)(current-1)/m_pSendParams->messages.size();
+                        {
+                                wxString strTmp = wxString::Format(_("Sending HL7 message %d of %d"), (int)(current), (int)(m_pSendParams->messages.size()));
+                                NotificarProgreso(currentProgress, std::string(strTmp.ToUTF8()));
+                                LOG_DEBUG("Core/HL7", "Comienza el procesamiento del mensaje " << (*it).m_id)
+                        }
+
+                        try {
+                                switch((*it).m_protocolo) {
+                                case GIL::HL7::ControladorHL7::TP_MLLP:
+                                        EnviarMensajeMLLP((*it).m_mensaje,(*it).m_destino,(*it).m_procesarACK,(*it).m_msgControlId);
+                                        GIL::HL7::ControladorBBDDHl7::Instance()->ActualizarEstadoMensaje((*it).m_id,GIL::HL7::MensajeHL7::TE_Enviado,"");
+                                        LOG_DEBUG("Core/HL7", _Std("Message successfully sent"))
+                                        sent = true;
+                                        break;
+                                default:
+                                        throw GIL::HL7::HL7Exception(_Std("Unknown protocol"));
+                                }
+                        } catch(GIL::HL7::HL7Exception& ex) {
+                                LOG_ERROR("Core/HL7", _Std("Error sending message:") << ex.str())
+                                //ha ocurrido un error
+
+                                //al primer error se para
+                                if (ex.IsFatal()) {
+                                        GIL::HL7::ControladorBBDDHl7::Instance()->ActualizarEstadoMensaje((*it).m_id,GIL::HL7::MensajeHL7::TE_Error,ex.GetCause().c_str());
+                                } else {
+                                        GIL::HL7::ControladorBBDDHl7::Instance()->ActualizarEstadoMensaje((*it).m_id,GIL::HL7::MensajeHL7::TE_Warning,ex.GetCause().c_str());
+                                }
+                                NotificarProgreso(currentProgress, _Std("Error sending HL7 message see log for more details"));
+                        } catch(...) {
+                                LOG_DEBUG("Core/HL7", _Std("Error sending message:") << " " <<_Std("Unknown error"));
+                                GIL::HL7::ControladorBBDDHl7::Instance()->ActualizarEstadoMensaje((*it).m_id, GIL::HL7::MensajeHL7::TE_Error, _Std("Unknown error"));
+                        }
+                        if (!sent) {
+                                //wait one minute
+                                m_pSendParams->m_pSemaphore->WaitTimeout(60000);
+                        }
+                } //while !sent
+        }
+
+}
+
+void SendHL7Command::Update()
+{
+        if (EstaAbortado()) {
+                return;
+        }
+
+}
+
+void SendHL7Command::OnAbort()
+{
+        if (m_pSendParams->m_idLastSock != -1) {
+                Endpoint::ShutdownSocket(m_pSendParams->m_idLastSock, Endpoint::BOTH);
+        }
+        m_pSendParams->m_pSemaphore->Post();
+}
+
+
+
+/* Envia el mensaje por MLLP */
+void SendHL7Command::EnviarMensajeMLLP(const std::string& msg, const std::string& url, bool procesarACK, const std::string& msgControlId)
+{
+        const std::string START_BLOCK = "\x0b";
+        const std::string END_BLOCK   = "\x1C";
+        const std::string END_MSG     = "\x0D";
+
+        std::cout << "inicializo..." << std::endl;
+        Endpoint ep(TCP | CLIENT, url);
+
+        if (!ep) {
+                throw GIL::HL7::HL7Exception(_Std("Failed to start connection") + ": " + ep.m_error_str, "COMM");
+        }
+
+        m_pSendParams->m_idLastSock = ep.m_sockfd;
+
+        std::stringstream outputStream;
+        outputStream << START_BLOCK << msg << END_BLOCK << END_MSG;
+        long nbytes = ep.Write(outputStream.str());
+        if (nbytes != (long)outputStream.str().size()) {
+                std::stringstream errmsg;
+                if (nbytes == -1) {
+                        errmsg << _Std("Error sending message:") << ep.m_error_str;
+                } else {
+                        errmsg << _Std("Error sending message. It was sent ") << nbytes << _Std(" bytes from a total of ") << outputStream.str();
+                }
+                throw GIL::HL7::HL7Exception(errmsg.str(), "COMM");
+        }
+
+        if (!procesarACK) {
+                return;
+        }
+
+        ep.Shutdown(Endpoint::OUTPUT);
+
+        //std::cout << "Message Control ID is = " << msgControlId << std::endl;
+
+        outputStream.str("");
+
+        //std::cout << "Connected to: " << std::string(ep.m_remote) << std::endl;
+
+        unsigned int msgNum = 0;
+
+        std::list<std::string> mStrings;
+        std::stringstream      inputStream;
+
+        std::string buff;
+
+        bool started = false;
+        bool pending = true;
+
+        while( pending && ( ep.Read(-1024, buff) > 0 ) ) {
+                if (!started) {
+
+                        std::string::size_type sb_loc = buff.find(START_BLOCK, 0);
+
+                        if (sb_loc != std::string::npos) {
+
+                                started = true;
+
+                                mStrings.push_back(std::string());
+
+                                msgNum++;
+
+                                std::string::size_type eb_loc = buff.find(END_BLOCK, sb_loc+1);
+
+                                if (eb_loc != std::string::npos) {
+                                        inputStream << buff.substr(sb_loc + 1, eb_loc - 1 - sb_loc);
+
+                                        mStrings.back() = inputStream.str();
+                                        inputStream.str("");
+
+                                        started = false;
+
+                                        std::string::size_type em_loc = buff.find(END_MSG, eb_loc+1);
+                                        if (em_loc != std::string::npos) {
+                                                pending = false;
+                                        } else {
+                                                inputStream << buff.substr(eb_loc+1);
+                                        }
+
+                                } else {
+                                        inputStream << buff.substr(sb_loc + 1);
+                                }
+                        }
+
+                } else {
+                        std::string::size_type eb_loc = buff.find(END_BLOCK, 0);
+
+                        if (eb_loc != std::string::npos) {
+                                inputStream << buff.substr(0, eb_loc - 1);
+                                started = false;
+
+                                mStrings.back() = inputStream.str();
+                                inputStream.str("");
+
+                                std::string::size_type em_loc = buff.find(END_MSG, eb_loc+1);
+                                if (em_loc != std::string::npos) {
+                                        pending = false;
+                                } else {
+                                        inputStream << buff.substr(eb_loc+1);
+                                }
+                        } else {
+                                inputStream << buff;
+                        }
+                }
+        }
+        bool confirmado = false;
+        std::list<std::string>::iterator it;
+        unsigned int i;
+        for ( i = 1, it = mStrings.begin(); it != mStrings.end(); i++, ++it) {
+                std::string& s = *it;
+
+                if (i != msgNum || !pending) {
+                        //std::cout << "Mensaje :\n" << s << std::endl;
+                        try {
+                                GIL::Hl7Parser::Messages::ACKInterpreter ai(GIL::HL7::Message::FromER7(s));
+                                if (msgControlId != ai.GetReferralMessageControlId()) {
+                                        throw GIL::HL7::HL7Exception(_Std("Error in the logic of confirmation. The control of the message ID does not match recognized"));
+                                }
+                                if (!ai.IsSuccess()) {
+                                        std::stringstream errmsg;
+                                        errmsg << _Std("NACK received:") << ai.ERR.GetErrorCodeDescription();
+                                        throw GIL::HL7::HL7Exception(errmsg.str());
+                                }
+                                confirmado = true;
+                        } catch (GIL::HL7::HL7Exception& e) {
+                                throw GIL::HL7::HL7Exception(_Std("Failed delivery confirmation:") + e.GetCause(), "COMM");
+                        }
+                        break;
+                }
+        }
+        if (!confirmado) {
+                throw GIL::HL7::HL7Exception(_Std("Error in the confirmation of delivery: Delivery is not recognized by the remote end"), "COMM");
+        }
+        //std::cout << "Total: " << ep.GetTotalBytesReaded() << std::endl;*/
+}
+
+}
diff --git a/cadxcore/commands/sendhl7command.h b/cadxcore/commands/sendhl7command.h
new file mode 100644
index 0000000..3db0342
--- /dev/null
+++ b/cadxcore/commands/sendhl7command.h
@@ -0,0 +1,58 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/icommand.h>
+#include <main/controllers/controladorbbddhl7.h>
+
+namespace GADAPI
+{
+class SendHL7CommandParams : public GNC::GCS::IComandoParams
+{
+
+public:
+        SendHL7CommandParams(const std::list<GIL::HL7::MensajeHL7>& messages);
+
+        virtual ~SendHL7CommandParams();
+
+public:
+        std::list<GIL::HL7::MensajeHL7> messages;
+        wxSemaphore* m_pSemaphore;
+        int m_idLastSock;
+};
+
+
+class SendHL7Command : public GNC::GCS::IComando
+{
+public:
+        SendHL7Command(SendHL7CommandParams* pParams);
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+        virtual void OnAbort();
+
+protected:
+        /* Envia el mensaje por MLLP */
+        void EnviarMensajeMLLP(const std::string& msg, const std::string& url, bool procesarACK=true, const std::string& msgControlId="") ;
+
+        SendHL7CommandParams* m_pSendParams;
+};
+}
diff --git a/cadxcore/commands/sendpacscommand.cpp b/cadxcore/commands/sendpacscommand.cpp
new file mode 100644
index 0000000..5f9872f
--- /dev/null
+++ b/cadxcore/commands/sendpacscommand.cpp
@@ -0,0 +1,243 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <map>
+#include <sstream>
+
+#include <api/api.h>
+#include <api/globals.h>
+
+#include <api/controllers/ieventscontroller.h>
+
+#include <eventos/integration.h>
+
+#include <main/entorno.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/pacscontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/dcmtk/dicomservers.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/dcmtk/dicomservers.h>
+
+#include <main/gui/countdownmessage/countdownmessage.h>
+
+#include "sendpacscommand.h"
+
+#include <wx/xml/xml.h>
+#include <wx/mstream.h>
+#include <wx/sstream.h>
+
+
+#define IDC_PACS_BUSCAR                  61
+#define IDC_PACS_DESCARGAR               62
+#define IDC_PACS_ABORTAR_TODOS           63
+#define IDC_PACS_SUBIR			         64
+
+#define PARALLEL
+
+#define DESCRIPTION _Std("Send files to PACS")
+// Singleton de persistencia
+namespace GADAPI
+{
+SendPACSCommand::SendPACSCommand(const std::string& selectedServer, const std::string& hl7Message, const std::list<long> seriesId) :
+        GNC::GCS::IComando(NULL),
+        m_selectedServer(selectedServer),
+        m_seriesId(seriesId),
+        m_hl7Message(hl7Message)
+{
+        checkDependencies();
+}
+
+SendPACSCommand::SendPACSCommand( const SendPACSCommand& o): GNC::GCS::IComando(NULL)
+{
+        (*this) = o;
+        checkDependencies();
+}
+
+SendPACSCommand& SendPACSCommand::operator = (const SendPACSCommand& o)
+{
+        this->m_selectedServer = o.m_selectedServer;
+        this->m_hl7Message = o.m_hl7Message;
+        this->m_error = o.m_error;
+        this->m_seriesId = o.m_seriesId;
+        return *this;
+}
+
+SendPACSCommand::~SendPACSCommand()
+{
+}
+
+void SendPACSCommand::checkDependencies()
+{
+        SetId(IDC_PACS_SUBIR);
+        EsperaA(IDC_PACS_SUBIR);
+#if !defined(PARALLEL)
+        EsperaA(IDC_PACS_BUSCAR);
+        EsperaA(IDC_PACS_DESCARGAR);
+        EsperaA(IDC_PACS_SUBIR);
+#endif
+        AbortaSi(IDC_PACS_ABORTAR_TODOS);
+}
+
+std::string SendPACSCommand::getClassUID()
+{
+        return "2cc283db-3c88-4e91-ab2b-03fa01092f27";
+}
+
+std::string SendPACSCommand::serialize()
+{
+        wxXmlDocument documento;
+        wxXmlNode* raiz = NULL;
+
+        //si el funcionamiento es de n diagnosticos se guardan los widgets que hay
+        raiz = new wxXmlNode(NULL,wxXML_ELEMENT_NODE, wxT("SendPacsCommand"));
+        documento.SetFileEncoding(wxT("UTF-8"));
+        documento.SetRoot(raiz);
+        raiz->AddAttribute(wxT("pacs"),wxString::FromUTF8(m_selectedServer.c_str()));
+        raiz->AddAttribute(wxT("hl7"), wxString::FromUTF8(m_hl7Message.c_str()));
+        wxStringOutputStream out;
+        documento.Save(out);
+        return std::string(out.GetString().ToUTF8());
+}
+
+void SendPACSCommand::init(const std::string& serializedValue)
+{
+        wxString wxSerializedValue = wxString::FromUTF8(serializedValue.c_str());
+        wxStringInputStream istream(wxSerializedValue);
+        wxXmlDocument doc(istream);
+        wxXmlNode* root = doc.GetRoot();
+        if (root != NULL) {
+                m_selectedServer = root->GetAttribute(wxT("pacs"),wxEmptyString).ToUTF8();
+                m_hl7Message = root->GetAttribute(wxT("hl7"),wxEmptyString).ToUTF8();
+        } else {
+                //error
+                LOG_ERROR("SendPACSCommand", "Error deserializing SendPACSCommand serialized value-"<< serializedValue << " -");
+        }
+}
+
+void SendPACSCommand::Execute()
+{
+        if(m_selectedServer == "") {
+                //usaremos el primer servidor (por defecto)
+                if(!DicomServerList::Instance()->Empty()) {
+                        m_selectedServer = DicomServerList::Instance()->GetDefaultServer()->ID;
+                } else {
+                        throw GIL::DICOM::PACSException(_Std("There is not any Remote PACS configured"));
+                }
+        }
+
+        //one send operation for each tsyntax uid
+        std::map<std::string, std::list<std::string> > mapOfTSyntax;
+
+        for (std::list<long>::const_iterator it = m_seriesId.begin(); it != m_seriesId.end(); ++it) {
+                GNC::GCS::HistoryController::LightFileModelList listOfFiles;
+                GNC::GCS::HistoryController::Instance()->GetSeriesSortedFileModels((*it), listOfFiles);
+                for (GNC::GCS::HistoryController::LightFileModelList::iterator itFiles = listOfFiles.begin(); itFiles != listOfFiles.end(); itFiles++) {
+                        if (mapOfTSyntax.find((*itFiles).tsuid) == mapOfTSyntax.end()) {
+                                mapOfTSyntax[(*itFiles).tsuid] = std::list<std::string>();
+                        }
+                        mapOfTSyntax[(*itFiles).tsuid].push_back((*itFiles).real_path);
+                }
+        }
+
+        std::string tarea = _Std("Uploading files ...");
+        if (!NotificarProgreso(0.0f,tarea)) {
+                return;
+        }
+        GIL::DICOM::IPACSController* pCI = NULL;
+        try {
+                pCI = GNC::Entorno::Instance()->GetPACSController();
+                pCI->GetConnection(this);
+                if (GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits", "pacs_upload")) {
+                        for (std::map<std::string, std::list<std::string> >::iterator it = mapOfTSyntax.begin(); it != mapOfTSyntax.end(); ++it) {
+                                pCI->SubirArchivos(this, m_selectedServer, (*it).second,this,GIL::DICOM::SendDefault);
+                        }
+
+                        if (!m_hl7Message.empty()) {
+                                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::HL7SendRequestEvent(m_hl7Message));
+                        }
+                } else {
+                        LOG_INFO("C-STORE", "No se enviara el estudio al PACS porque el permiso de subida lo impide.");
+                }
+        } catch (GinkgoNoServerFoundException&) {
+                m_error = _Std("Error: PACS entry configuration not found: ") + m_selectedServer;
+        } catch (GIL::DICOM::PACSException& ex) {
+                m_error = _Std("Error:") + (const std::string)ex;
+        } catch (std::exception& ex) {
+                m_error = _Std("Error sending evidences:") + ex.what();
+        } catch (...) {
+                m_error = _Std("Error sending evidences: Internal error.");
+        }
+        if (pCI) {
+                pCI->ReleaseConnection(this);
+        }
+}
+
+void SendPACSCommand::Update()
+{
+        if (EstaAbortado()) {
+                return;
+        }
+
+        if(m_error!="") {
+                wxString message = _("Error uploading the study to PACS: ");
+                message += wxT("\n") + wxString::FromUTF8(m_error.c_str());
+                message += _("\nWould you like to retry(automatically retried in %d seconds)?");
+                GNC::GUI::CountdownMessage modalDlg(NULL, _("Retry send to PACS"), message);
+                int returnCode = modalDlg.ShowModalCountdown();
+                switch (returnCode) {
+                case wxID_OK: {
+                        //retry; copy and execute...
+                        SendPACSCommand* pCmd = new SendPACSCommand(*this);
+                        GNC::CommandController::Instance()->ProcessAsync("Sending...",pCmd, NULL);
+                }
+                break;
+                default:
+                        //set status error
+                        break;
+                }
+
+                //GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL, _Std("Error uploading the study to PACS: ") + "\n" + m_errorDescription, GNC::GCS::Events::EventoMensajes::PopUpMessage,false, GNC::GCS::Events::EventoMensajes::Error));
+                return ;
+        } else {
+                /*			if (m_pPACSParams->m_informar) {
+                				GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,_Std("Study successfully sent to PACS"),GNC::GCS::Events::EventoMensajes::PopUpMessage,false, GNC::GCS::Events::EventoMensajes::Informacion));
+                			}*/
+                return;
+        }
+}
+
+bool SendPACSCommand::NotificarProgreso(float progresoNormalizado,const std::string &texto)
+{
+        if (EstaAbortado()) {
+                return false;
+        }
+        return IComando::NotificarProgreso(progresoNormalizado, texto);
+}
+
+void SendPACSCommand::LiberarRecursos()
+{
+}
+
+}
diff --git a/cadxcore/commands/sendpacscommand.h b/cadxcore/commands/sendpacscommand.h
new file mode 100644
index 0000000..0a4020c
--- /dev/null
+++ b/cadxcore/commands/sendpacscommand.h
@@ -0,0 +1,69 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/globals.h>
+#include <api/icommand.h>
+#include <api/ivista.h>
+#include <api/controllers/ipacscontroller.h>
+
+namespace GIL
+{
+class IModeloIntegracion;
+namespace DICOM
+{
+class IPACSController;
+}
+}
+
+namespace GADAPI
+{
+class EXTAPI SendPACSCommand : public GNC::GCS::IComando
+{
+public:
+        SendPACSCommand(const std::string& selectedServer, const std::string& hl7Message, const std::list<long> seriesId);
+
+        SendPACSCommand( const SendPACSCommand& o);
+        SendPACSCommand& operator = (const SendPACSCommand& o);
+protected:
+        void checkDependencies();
+public:
+
+        virtual ~SendPACSCommand();
+        virtual std::string getClassUID();
+
+        virtual std::string serialize();
+        virtual void init(const std::string& serializedValue);
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+public:
+        virtual bool NotificarProgreso(float progresoNormalizado, const std::string &texto);
+
+        void LiberarRecursos();
+
+        std::string m_selectedServer;
+        std::list<long> m_seriesId;
+        std::string m_hl7Message;
+        std::string m_error;
+};
+}
diff --git a/cadxcore/commands/synchronizationcommand.cpp b/cadxcore/commands/synchronizationcommand.cpp
new file mode 100644
index 0000000..6261d15
--- /dev/null
+++ b/cadxcore/commands/synchronizationcommand.cpp
@@ -0,0 +1,187 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/internationalization/internationalization.h>
+#include <api/controllers/ipacscontroller.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/hangingprotocolcontroller.h>
+#include <eventos/mensajes.h>
+#include <main/entorno.h>
+#include <main/controllers/historycontroller.h>
+#include <eventos/progresocomando.h>
+#include "synchronizationcommand.h"
+#include "comandoincluirhistorial.h"
+#include <wx/filename.h>
+#include <wx/thread.h>
+
+
+#define IDC_SYCHRONIZATION_COMMAND                  121
+
+// Singleton de persistencia
+namespace GADAPI
+{
+SynchronizationCommandParameters::SynchronizationCommandParameters(const std::list<long>& seriesPk, GNC::GCS::IHistoryTool* pTool) :
+        m_SeriesPk(seriesPk),
+        m_pTool(pTool),
+        m_pCtrlMod(NULL),
+        m_mode(-1),
+        m_pHangingProtocol(NULL),
+        m_pSemWait(new wxSemaphore())
+{
+}
+
+SynchronizationCommandParameters::SynchronizationCommandParameters(const std::list<long>& seriesPk, GNC::GCS::IModuleController* pCtrlMod, int mode, const GNC::GCS::Ptr<GNC::GCS::HangingProtocol>& pHangingProtocol):
+        m_SeriesPk(seriesPk),
+        m_pTool(NULL),
+        m_pCtrlMod(pCtrlMod),
+        m_mode(mode),
+        m_pHangingProtocol(pHangingProtocol),
+        m_pSemWait(new wxSemaphore())
+{
+}
+
+SynchronizationCommandParameters::~SynchronizationCommandParameters()
+{
+        if (m_pSemWait != NULL) {
+                delete m_pSemWait;
+                m_pSemWait = NULL;
+        }
+}
+
+SynchronizationCommand::SynchronizationCommand(SynchronizationCommandParameters* pParams) : IComando(pParams)
+{
+        m_pSynchronizeParams = pParams;
+        SetId(IDC_SYCHRONIZATION_COMMAND);
+        GNC::Entorno::Instance()->GetControladorEventos()->Registrar(this, GNC::GCS::Events::EventoProgresoComando());
+}
+
+void SynchronizationCommand::Execute()
+{
+        std::string tarea= _Std("Downloading files ...");
+        if (!NotificarProgreso(0.0f,tarea)) {
+                return;
+        }
+
+        GIL::DICOM::IPACSController* pCI = NULL;
+
+        std::string pathDownloadedFiles = GNC::Entorno::Instance()->CrearDirectorioTemporal();
+        try {
+                pCI = GNC::GCS::IEntorno::Instance()->GetPACSController();
+                int fileNum = 1;
+                for (std::list<long>::const_iterator it = m_pSynchronizeParams->m_SeriesPk.begin(); it != m_pSynchronizeParams->m_SeriesPk.end(); ++it) {
+                        GNC::GCS::IHistoryController::SeriesModel sm = GNC::GCS::IHistoryController::Instance()->GetSeriesModel((*it));
+                        if (sm.location == GNC::GCS::IHistoryController::TL_WadoLinked) {
+                                //get files and download it
+                                GNC::GCS::IHistoryController::LightFileModelList listOfFiles;
+                                GNC::GCS::IHistoryController::Instance()->GetSeriesSortedFileModels((*it), listOfFiles);
+                                for (GNC::GCS::IHistoryController::LightFileModelList::iterator itFiles = listOfFiles.begin(); itFiles != listOfFiles.end(); ++itFiles) {
+                                        {
+                                                if (!NotificarProgreso(0.05, std::string(wxString::Format(_("Downloading file %d"), (int)(fileNum++) ).ToUTF8()))) {
+                                                        return;
+                                                }
+                                        }
+                                        GNC::GCS::IHistoryController::LightFileModel& fm = (*itFiles);
+                                        if (fm.location == GNC::GCS::IHistoryController::TL_WadoLinked) {
+                                                std::ostringstream ostr;
+                                                ostr << pathDownloadedFiles;
+                                                ostr << (char)wxFileName::GetPathSeparator();
+                                                ostr << fm.pk;
+
+                                                if (!pCI->DownloadFileFromURL(fm.real_path, ostr.str(), this)) {
+                                                        std::ostringstream ostrErr;
+                                                        ostrErr << _Std("Error downloading file");
+                                                        ostrErr << fm.real_path;
+                                                        throw GIL::DICOM::PACSException(ostrErr.str());
+                                                }
+                                        }
+                                }
+                        }
+                }
+        } catch (GIL::DICOM::PACSException& ex) {
+                m_pSynchronizeParams->m_error =  (const std::string)ex;
+        } catch (std::exception& ex) {
+                m_pSynchronizeParams->m_error= ex.what();
+        } catch (...) {
+                m_pSynchronizeParams->m_error= _Std("Internal Error");
+        }
+        //including history....
+        if(m_pSynchronizeParams->m_error.empty()) {
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(pathDownloadedFiles, true, GNC::GCS::IHistoryController::TAA_MOVE);
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial * pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+                GNC::Entorno::Instance()->GetCommandController()->ProcessAsync("Processing...",pCmd,this);
+                m_pSynchronizeParams->m_pSemWait->Wait();
+
+        }
+
+        NotificarProgreso(1.0f,tarea);
+}
+
+void SynchronizationCommand::Update()
+{
+        if (EstaAbortado()) {
+                return;
+        }
+        if(!m_pSynchronizeParams->m_error.empty()) {
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL, _Std("Error synchronizing study: ") + "\n" + m_pSynchronizeParams->m_error, GNC::GCS::Events::EventoMensajes::PopUpMessage,false, GNC::GCS::Events::EventoMensajes::Error));
+                return;
+        } else {
+                //execute tool
+                if (m_pSynchronizeParams->m_pTool != NULL) {
+                        m_pSynchronizeParams->m_pTool->Execute(m_pSynchronizeParams->m_SeriesPk);
+                } else if (m_pSynchronizeParams->m_pCtrlMod != NULL) {
+                        GNC::GCS::IHistoryController::SeriesModelList seriesModelList;
+                        for (std::list<long>::const_iterator it = m_pSynchronizeParams->m_SeriesPk.begin(); it != m_pSynchronizeParams->m_SeriesPk.end(); ++it) {
+                                seriesModelList.push_back(GNC::GCS::HistoryController::Instance()->GetSeriesModel((*it)));
+                        }
+                        m_pSynchronizeParams->m_pCtrlMod->OpenView(m_pSynchronizeParams->m_mode, seriesModelList, m_pSynchronizeParams->m_pHangingProtocol);
+                }
+        }
+}
+
+
+
+bool SynchronizationCommand::NotificarProgreso(float progresoNormalizado,const std::string &texto)
+{
+        if (EstaAbortado()) {
+                return false;
+        }
+        return IComando::NotificarProgreso(progresoNormalizado, texto);
+}
+
+void SynchronizationCommand::LiberarRecursos()
+{
+}
+
+void SynchronizationCommand::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        GNC::GCS::Events::EventoProgresoComando* pEvt = dynamic_cast<GNC::GCS::Events::EventoProgresoComando*> (evt);
+        if (pEvt) {
+                GNC::GCS::IComando* pCmd = pEvt->GetComando();
+                if (pCmd != NULL && pCmd->GetOwner() == this &&pEvt->GetTipo() == GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado) {
+                        m_pSynchronizeParams->m_pSemWait->Post();
+                }
+        } else {
+                LOG_ERROR("Command", "SynchronizationCommand::ProcesarEvento: unexpected or no event");
+        }
+}
+
+}
diff --git a/cadxcore/commands/synchronizationcommand.h b/cadxcore/commands/synchronizationcommand.h
new file mode 100644
index 0000000..f609060
--- /dev/null
+++ b/cadxcore/commands/synchronizationcommand.h
@@ -0,0 +1,79 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+//#define _GINKGO_TRACE
+#include <api/globals.h>
+#include <api/icommand.h>
+#include <api/ihistorytool.h>
+#include <api/observers/ieventsobserver.h>
+
+class wxSemaphore;
+namespace GNC
+{
+namespace GCS
+{
+class IModuleController;
+class HangingProtocol;
+}
+}
+
+namespace GADAPI
+{
+class SynchronizationCommandParameters : public GNC::GCS::IComandoParams
+{
+
+public:
+        //download only specifying
+        SynchronizationCommandParameters(const std::list<long>& seriesPk, GNC::GCS::IHistoryTool* pTool);
+        SynchronizationCommandParameters(const std::list<long>& seriesPk, GNC::GCS::IModuleController* pCtrlMod, int mode, const GNC::GCS::Ptr<GNC::GCS::HangingProtocol>& pHangingProtocol);
+        virtual ~SynchronizationCommandParameters();
+
+public:
+        std::list<long> m_SeriesPk;
+        std::string m_error;
+        GNC::GCS::IHistoryTool* m_pTool;
+        GNC::GCS::IModuleController* m_pCtrlMod;
+        int m_mode;
+        GNC::GCS::Ptr<GNC::GCS::HangingProtocol> m_pHangingProtocol;
+        wxSemaphore* m_pSemWait;
+};
+
+
+
+class SynchronizationCommand : public GNC::GCS::IComando, public GNC::GCS::IEventsObserver
+{
+public:
+        SynchronizationCommand(SynchronizationCommandParameters* pParams);
+
+protected:
+        virtual void Execute();
+        virtual void Update();
+
+public:
+
+        virtual bool NotificarProgreso(float progresoNormalizado, const std::string &texto);
+
+        virtual void LiberarRecursos();
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+        SynchronizationCommandParameters* m_pSynchronizeParams;
+};
+}
diff --git a/cadxcore/commands/thumbnailscommand.cpp b/cadxcore/commands/thumbnailscommand.cpp
new file mode 100644
index 0000000..853a722
--- /dev/null
+++ b/cadxcore/commands/thumbnailscommand.cpp
@@ -0,0 +1,524 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <cmath>
+#include "thumbnailscommand.h"
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/image.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <main/entorno.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/controladorcarga.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/streaming/streamingloader.h>
+#include <main/controllers/controladorextensiones.h>
+
+#include <vtkSmartPointer.h>
+#include <vtkImageData.h>
+#include <vtkImageCast.h>
+#include <vtkAlgorithmOutput.h>
+#include <vtkImageShiftScale.h>
+#include <vtkImageMapToRGBA.h>
+#include <vtkImageMapToWindowLevelColors.h>
+#include <vtkMatrix4x4.h>
+#include <vtkImageReslice.h>
+#include <vtkExecutive.h>
+#include <vtkInformationVector.h>
+#include <itk/itkVTKImageToImageFilter.h>
+#include <vtkVISUManagement/vtkLookupTableManager.h>
+#include <vtkJPEGWriter.h>
+
+
+#include <itkExceptionObject.h>
+#include <itkImage.h>
+#include <itkRGBPixel.h>
+#include <itkGDCMImageIO.h>
+#include <itkImageFileReader.h>
+#include <itkVectorResampleImageFilter.h>
+#include <itkLinearInterpolateImageFunction.h>
+#include <itkImageDuplicator.h>
+
+#include <api/dicom/dcmdictionary.h>
+#include <api/dicom/dcmuiddictionary.h>
+
+#define IDC_GENERAR_THUMBNAILS       81
+#define IDC_CARGA       91
+#define SIZE_THUMBNAILS 76
+
+namespace GADAPI
+{
+class ThumbnailsCommandParams: public GNC::GCS::IComandoParams
+{
+public:
+        ThumbnailsCommandParams(long file_pk, ThumbnailsNotifier* pNotificador)
+        {
+                m_file_pk = file_pk;
+                m_wxImg = NULL;
+                m_pNotificadorThumbnail = pNotificador;
+        }
+
+        virtual ~ThumbnailsCommandParams()
+        {
+                if (m_wxImg != NULL) {
+                        delete m_wxImg;
+                        m_wxImg = NULL;
+                }
+        }
+
+        GNC::GCS::HistoryController::FileModel m_fileModel;
+        long									  m_file_pk;
+        wxImage*                        m_wxImg;
+        ThumbnailsNotifier*			m_pNotificadorThumbnail;
+
+};
+
+ThumbnailsCommand::ThumbnailsCommand(long file_pk, ThumbnailsNotifier* pNotificador) : IComando(NULL, "GenerarThumbnails")
+{
+        m_Error = false;
+        GTRACE(">> ThumbnailsCommand::ThumbnailsCommand(): " << this);
+        m_pThumbParams = new ThumbnailsCommandParams(file_pk, pNotificador);
+        m_pParams = m_pThumbParams;
+        SetId(IDC_GENERAR_THUMBNAILS);
+        EsperaA(IDC_GENERAR_THUMBNAILS);
+        EsperaA(IDC_CARGA);
+        GTRACE("<< ThumbnailsCommand::ThumbnailsCommand(): " << this);
+}
+
+void ThumbnailsCommand::Execute()
+{
+        NotificarProgreso(0.05f,_Std("Creating Thumbnail..."));
+        m_Error = true;
+        GTRACE("Arrancando comando generar thumbnails  " << m_pThumbParams->m_ruta)
+        //std::string tarea_Std("Generando thumbnails...");
+        //pillamos el uid
+        m_pThumbParams->m_fileModel = GNC::GCS::HistoryController::Instance()->GetFileModel(m_pThumbParams->m_file_pk);
+        if(m_pThumbParams->m_fileModel.sopiuid.empty()) {
+                wxBitmap bmp = GinkgoResourcesManager::History::GetIcoUnknownFile();
+                m_pThumbParams->m_wxImg = new wxImage();
+                (*m_pThumbParams->m_wxImg) = bmp.ConvertToImage();
+                GuardarImagen();
+                m_Error = false;
+                return;
+        }
+        //if is wado linked...
+        if (m_pThumbParams->m_fileModel.location == GNC::GCS::IHistoryController::TL_WadoLinked) {
+                wxBitmap bmp = GinkgoResourcesManager::History::GetIcoWadoLinkedPreview();
+                m_pThumbParams->m_wxImg = new wxImage();
+                (*m_pThumbParams->m_wxImg) = bmp.ConvertToImage();
+                m_Error = false;
+                return;
+        }
+        //comprobar si el thumbnail ya estaba generado
+        m_pThumbParams->m_wxImg = GetImageFromBD();
+        if(m_pThumbParams->m_wxImg != NULL) {
+                GTRACE("Saliendo generar thumbnails salida2  " << m_pThumbParams->m_ruta);
+                NotificarProgreso(1.0f,_Std("Creating Thumbnail..."));
+                m_Error = false;
+                return;
+        } else {
+                //try to make thumbnail with extensions...
+                ::GNC::ControladorExtensiones::ListaModulos listaModulos = ::GNC::ControladorExtensiones::Instance()->Modulos();
+                for(GNC::ControladorExtensiones::IteradorListaModulos it=listaModulos.begin(); it!=listaModulos.end(); ++it) {
+                        GNC::GCS::IModuleController* modulo = (*it).second;
+                        GNC::GCS::Ptr<ImgProxy<UCHAR3> >pImgCapture(new ImgProxy<UCHAR3>());
+                        if (modulo->MakeThumbnail(m_pThumbParams->m_fileModel, *pImgCapture)) {
+                                wxImage* pImage = new wxImage(pImgCapture->anchura, pImgCapture->altura, (unsigned char*)pImgCapture->data, true);
+                                if (pImage->IsOk()) {
+                                        double scaleX = ((double) SIZE_THUMBNAILS)/((double) pImgCapture->anchura);
+                                        double scaleY = ((double) SIZE_THUMBNAILS)/((double) pImgCapture->altura);
+
+                                        if (scaleX < 1.0 || scaleY < 1.0) {
+                                                double scale = wxMin(scaleX, scaleY);
+                                                int newWidth = (int) (scale * pImgCapture->anchura);
+                                                int newHeight = (int) (scale * pImgCapture->altura);
+                                                m_pThumbParams->m_wxImg = new wxImage(pImage->Scale(newWidth, newHeight, wxIMAGE_QUALITY_HIGH));
+                                        } else {
+                                                m_pThumbParams->m_wxImg = new wxImage(*pImage);
+                                        }
+                                        delete pImage;
+
+                                        GuardarImagen();
+                                        m_Error = false;
+                                        return;
+                                }
+                        }
+                }
+
+                if (m_pThumbParams->m_fileModel.tsuid== GKUID_MPEG2MainProfileAtMainLevelTransferSyntax || m_pThumbParams->m_fileModel.tsuid == GKUID_MPEG2MainProfileAtHighLevelTransferSyntax) {
+                        wxBitmap bmp = GinkgoResourcesManager::History::GetMoviePreview();
+                        m_pThumbParams->m_wxImg = new wxImage();
+                        (*m_pThumbParams->m_wxImg) = bmp.ConvertToImage();
+                        GuardarImagen();
+                        m_Error = false;
+                        return;
+                }
+                if (m_pThumbParams->m_fileModel.sopcuid == GKUID_EncapsulatedPDFStorage) {
+                        wxBitmap bmp = GinkgoResourcesManager::History::GetPDFPreview();
+                        m_pThumbParams->m_wxImg = new wxImage();
+                        (*m_pThumbParams->m_wxImg) = bmp.ConvertToImage();
+                        m_Error = false;
+                        return;
+                }
+
+                double size[2]   = {0.0, 0.0};
+                int dimensions[3] = {0, 0, 0};
+                double spacing[3] = {0.0, 0.0, 0.0};
+                double origin[3] = {0.0, 0.0, 0.0};
+
+                size[0] = SIZE_THUMBNAILS;
+                size[1] = SIZE_THUMBNAILS;
+
+                {
+                        //esto es una nyapa para recuperarnos de errores, antes de leer guardamos en bbdd una imagen negra, si finalmente
+                        //el thumbnail se genera bien pues se mete, si no pues se quedara con unknown
+                        wxImage img = GinkgoResourcesManager::History::GetIcoUnknownFile().ConvertToImage();
+                        m_pThumbParams->m_wxImg = &img;
+                        GuardarImagen();
+                        m_pThumbParams->m_wxImg = NULL;
+                }
+
+                typedef itk::RGBPixel<unsigned char> PixelType;
+                typedef itk::Image< PixelType,  2 > ImageType;
+
+                typedef itk::ImageRegionConstIterator< ImageType > ImageIteratorType;
+
+                typedef itk::VTKImageToImageFilter<ImageType> TipoFiltro;
+
+                ImageType::SizeType outputSize;
+                ImageType::SpacingType outputSpacing;
+                ImageType::PointType outputOrigin;
+
+                vtkSmartPointer<vtkImageShiftScale> normalizeFilter = vtkSmartPointer<vtkImageShiftScale>::New();
+
+                outputSize[0] = size[0];
+                outputSize[1] = size[1];
+
+                unsigned long imgsize = outputSize[0] * outputSize[1] * sizeof(unsigned char) * 3;
+                unsigned char* data = new unsigned char[imgsize];
+
+                try {
+
+                        GNC::StreamingLoader loader;
+
+                        loader.SetInput(m_pThumbParams->m_fileModel.real_path);
+
+                        loader.GetDimensions(dimensions);
+                        loader.GetSpacing(spacing);
+                        loader.SetOutputOrigin(origin);
+
+                        vtkSmartPointer<vtkImageReslice> pReslice = vtkSmartPointer<vtkImageReslice>::New();
+                        TipoFiltro::Pointer VTK2ITKfiltro = TipoFiltro::New();
+
+                        vtkSmartPointer<vtkMatrix4x4> resliceAxes = vtkSmartPointer<vtkMatrix4x4>::New();
+
+
+                        if ( dimensions[0] == 0 || dimensions[1] == 0 || spacing[0] == 0 || spacing[1] == 0) {
+                                if ( !loader.IsSignalFile()) {
+                                        m_Error = true;
+                                        delete[] data;
+                                        data = NULL;
+                                        LOG_WARN("GenerarThumbnails", "Error: imagen de tamaño 0, generación ignorada.");
+                                        return;
+                                }
+
+                                NotificarProgreso(0.8f,_Std("Creating Thumbnail..."));
+
+                                memset(data, 0, imgsize);
+                                double x, y;
+                                unsigned int ix, iy;
+                                const double resx = M_PI * 4.0 / (double) outputSize[0];
+                                const double resy = (double) 0.25 * outputSize[1];
+                                const double sy = (double) 0.5 * outputSize[1];
+
+                                for (ix = 0; ix < outputSize[0]; ++ix) {
+
+                                        x = ((double) ix);
+                                        y = resy * std::sin(x * resx);
+                                        y += sy;
+                                        iy = std::max<int>(0, std::min<int>(outputSize[0] - 1, (int) std::floor(y + 0.5)) );
+
+                                        unsigned char* pixel = data + (3 * (iy * outputSize[0] + ix));
+                                        pixel[0] = 0;
+                                        pixel[1] = 255;
+                                        pixel[2] = 128;
+                                }
+
+                        } else {
+
+
+                                pReslice->SetInputConnection(loader.GetOutputPort());
+                                pReslice->SetOutputDimensionality(2);
+                                pReslice->SetResliceAxesDirectionCosines(1, 0, 0,
+                                                0, 1, 0,
+                                                0, 0, 1);
+                                outputSize[0] = size[0];
+                                outputSize[1] = size[1];
+
+                                double dInputSize[3];
+                                dInputSize[0] = (double)dimensions[0];
+                                dInputSize[1] = (double)dimensions[1];
+                                dInputSize[2] = 1.0;
+
+                                double dOutputSize[3];
+                                dOutputSize[0] = (double)outputSize[0];
+                                dOutputSize[1] = (double)outputSize[1];
+                                dOutputSize[2] = 1.0;
+
+                                double sX = dOutputSize[0] / dInputSize[0];
+                                double sY = dOutputSize[1] / dInputSize[1];
+
+                                double s = std::min<double>(sX, sY);
+
+                                double dOutputSpacing[3];
+                                dOutputSpacing[0] = spacing[0] / s;
+                                dOutputSpacing[1] = spacing[1] / s;
+                                dOutputSpacing[2] = spacing[2];
+
+                                pReslice->SetOutputExtent(0, dOutputSize[0] - 1, 0, dOutputSize[1] - 1,  0, 1);
+                                pReslice->SetOutputSpacing(dOutputSpacing);
+                                //moves image vertical or horizontal to center thumbnail. x + => left; - => right. y + => up; - => down
+                                //formula is tested with color images and images with spacing and origin
+                                origin[0] = (((s - sX) * dInputSize[0] / 2.0f) / s) * spacing[0];
+                                origin[1] = (((s - sY) * dInputSize[1] / 2.0f) / s)  * spacing[0];
+                                pReslice->SetOutputOrigin(origin);
+
+                                pReslice->SetInterpolationModeToCubic();
+
+                                pReslice->Update();
+
+                                vtkImageData *timg = pReslice->GetOutput();
+
+                                if(timg->GetNumberOfScalarComponents() > 1) {
+                                        normalizeFilter->SetInputConnection(pReslice->GetOutputPort());
+                                        normalizeFilter->SetOutputScalarTypeToUnsignedChar();
+
+                                        if (timg->GetScalarType() != VTK_UNSIGNED_CHAR) {
+                                                double range[2];
+                                                timg->GetScalarRange(range);
+
+                                                double diff = range[1]-range[0];
+                                                if (diff > std::numeric_limits<double>::epsilon()) {
+                                                        normalizeFilter->SetShift(-range[0]);
+                                                        normalizeFilter->SetScale(255.0/(range[1]-range[0]));
+                                                }
+                                        }
+                                        normalizeFilter->Update();
+                                        VTK2ITKfiltro->SetInput(normalizeFilter->GetOutput());
+
+                                } else {
+                                        vtkSmartPointer<vtkImageMapToColors> pImageMap = vtkSmartPointer<vtkImageMapToColors>::New();
+
+                                        pImageMap->SetInputConnection(pReslice->GetOutputPort());
+
+                                        vtkSmartPointer<vtkLookupTable> pLookupTable = vtkLookupTableManager::GetLinearLookupTable();
+
+                                        pImageMap->SetLookupTable(pLookupTable);
+                                        pImageMap->SetOutputFormatToRGB();
+
+                                        if (timg->GetNumberOfScalarComponents() == 1) {
+
+                                                double window, level;
+                                                if (loader.GetDefaultWindowLevel(window,level) && window != 0.0) {
+                                                        double v_min = (level) - 0.5 * window;
+                                                        double v_max = level + 0.5 * window;
+                                                        pLookupTable->SetRange(v_min, v_max);
+                                                } else {
+                                                        double range[2];
+                                                        timg->GetScalarRange(range);
+
+                                                        double diff = range[1]-range[0];
+
+                                                        window = range[1]-range[0];
+                                                        level = 0.5*(range[1]+range[0]);
+
+                                                        if (diff > std::numeric_limits<double>::epsilon()) {
+                                                                double v_min = (level) - 0.5 * window;
+                                                                double v_max = level + 0.5 * window;
+                                                                pLookupTable->SetRange(v_min, v_max);
+                                                        }
+                                                }
+                                        }
+                                        pImageMap->SetLookupTable(pLookupTable);
+
+                                        pImageMap->Update();
+                                        VTK2ITKfiltro->SetInput( pImageMap->GetOutput());
+                                }
+                                NotificarProgreso(0.6f,_Std("Creating Thumbnail..."));
+
+                                VTK2ITKfiltro->GetImporter()->UpdateLargestPossibleRegion();
+
+                                const ImageType* img = VTK2ITKfiltro->GetOutput();
+                                NotificarProgreso(0.8f,_Std("Creating Thumbnail..."));
+
+                                ImageType::RegionType region = img->GetLargestPossibleRegion();
+
+                                ImageIteratorType it (img, region);
+
+                                std::cout << "imgsize = " << imgsize << std::endl;
+
+                                std::cout << "region = ";
+                                region.Print(std::cout);
+                                std::cout << std::endl;
+
+                                unsigned long off = 0;
+                                for (it.GoToBegin(); !it.IsAtEnd() && off < imgsize; ++it) {
+                                        const ImageType::PixelType& pixel = it.Value();
+                                        data[off++] = pixel.GetRed();
+                                        data[off++] = pixel.GetGreen();
+                                        data[off++] = pixel.GetBlue();
+                                }
+                        }
+
+                        m_pThumbParams->m_wxImg = new wxImage(outputSize[0], outputSize[1], data, false);
+                        GuardarImagen();
+                        NotificarProgreso(1.0f,_Std("Generating thumbnail ..."));
+
+                        m_Error = false;
+
+                } catch (GNC::GCS::ControladorCargaException &ex1) {
+                        LOG_ERROR("GenerarThumnails", "Unable to create thumbnail for file [" << m_pThumbParams->m_file_pk << "]: " << ex1.str());
+                        if (data != NULL) {
+                                delete[] data;
+                                data = NULL;
+                        }
+                        //si se cancela el comando
+                        return;
+                } catch(itk::ExceptionObject& ex2) {
+                        LOG_ERROR("GenerarThumnails", "Unable to create thumbnail for file [" << m_pThumbParams->m_file_pk << "]: " << ex2.GetDescription());
+                        //std::string descr = ex2.GetDescription();
+                        if (data != NULL) {
+                                delete[] data;
+                                data = NULL;
+                        }
+                        return;
+                } catch(std::exception &ex3) {
+                        LOG_ERROR("GenerarThumnails", "Unable to create thumbnail for file [" << m_pThumbParams->m_file_pk << "]: " << ex3.what());
+                        //std::string descr = ex3.what();
+                        //si se cancela el comando
+                        if (data != NULL) {
+                                delete[] data;
+                                data = NULL;
+                        }
+                        return;
+                } catch(...) {
+                        LOG_ERROR("GenerarThumnails", "Unable to create thumbnail for file [" << m_pThumbParams->m_file_pk << "]: Internal error" );
+                        //si se cancela el comando
+                        if (data != NULL) {
+                                delete[] data;
+                                data = NULL;
+                        }
+                        return;
+                }
+        }
+}
+
+void ThumbnailsCommand::Update()
+{
+        if (!m_Error) {
+                if (m_pThumbParams == NULL || m_pThumbParams->m_wxImg == NULL || !m_pThumbParams->m_wxImg->IsOk()) {
+                        LOG_ERROR("GenerarThumbnails", "No se pudo establecer la previsualizacion: La imagen es invalida o no fue generada correctamente");
+                } else {
+                        m_pThumbParams->m_pNotificadorThumbnail->SetImage(m_pThumbParams->m_file_pk, m_pThumbParams->m_wxImg);
+                }
+        } else {
+                wxImage img =  GinkgoResourcesManager::History::GetIcoUnknownFile().ConvertToImage();
+                m_pThumbParams->m_pNotificadorThumbnail->SetImage(m_pThumbParams->m_file_pk, &img);
+        }
+}
+
+wxImage* ThumbnailsCommand::GetImage()
+{
+        return m_pThumbParams->m_wxImg;
+}
+
+wxImage* ThumbnailsCommand::GetImageFromBD()
+{
+        int ancho,alto = 0;
+        unsigned char* data = NULL;
+        GNC::GCS::HistoryController::Instance()->GetThumbnail(m_pThumbParams->m_file_pk, ancho, alto, data);
+        if(data != NULL) {
+                wxImage* img = new wxImage(ancho,alto,data,false);
+                return img;
+        } else {
+                return NULL;
+        }
+}
+
+
+unsigned char ClampToByte(int a)
+{
+        if (a > 255)
+                return 255;
+        else if (a < 0)
+                return 0;
+        else
+                return a;
+}
+
+unsigned char ClampUpToByte(int a)
+{
+        if (a > 255)
+                return 255;
+        else
+                return a;
+}
+
+
+void ThumbnailsCommand::GuardarImagen()
+{
+        if (!m_pThumbParams->m_wxImg->IsOk())
+                return;
+
+        unsigned char *pixelData = m_pThumbParams->m_wxImg->GetData();
+
+        // We apply a vertical gradient
+        const int w = m_pThumbParams->m_wxImg->GetWidth();
+        const int h = m_pThumbParams->m_wxImg->GetHeight();
+        const int med_h = h/2;
+
+        // Aplicamos desde el origen hasta la mitad en altura (255, 255, 255, 100) -> (255, 255, 255, 0)
+        for (int y = 0, pos = 0, alpha = 70; (y < med_h) && (alpha > 0); ++y, alpha-=2) {
+                for (int x = 0; x < w; ++x, pos+=3) {
+                        pixelData[pos+0] = ClampUpToByte((int) pixelData[pos+0] + alpha);
+                        pixelData[pos+1] = ClampUpToByte((int) pixelData[pos+1] + alpha);
+                        pixelData[pos+2] = ClampUpToByte((int) pixelData[pos+2] + alpha);
+                }
+
+        } // for y
+
+        GNC::GCS::HistoryController::Instance()->SetThumbnail(m_pThumbParams->m_file_pk,
+                        m_pThumbParams->m_wxImg->GetWidth(),
+                        m_pThumbParams->m_wxImg->GetHeight(),
+                        m_pThumbParams->m_wxImg->GetData());
+
+}
+
+}
diff --git a/cadxcore/commands/thumbnailscommand.h b/cadxcore/commands/thumbnailscommand.h
new file mode 100644
index 0000000..6aabd8d
--- /dev/null
+++ b/cadxcore/commands/thumbnailscommand.h
@@ -0,0 +1,59 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/icommand.h>
+#include <api/api.h>
+
+class wxImage;
+
+namespace GADAPI
+{
+class ThumbnailsCommandParams;
+
+class EXTAPI ThumbnailsNotifier
+{
+public:
+        ThumbnailsNotifier() {}
+        virtual ~ThumbnailsNotifier() {}
+
+        virtual void SetImage(long file_pk, wxImage* pImage) = 0;
+};
+
+class EXTAPI ThumbnailsCommand : public GNC::GCS::IComando
+{
+public:
+        ThumbnailsCommand(long file_pk, ThumbnailsNotifier* pNotificador);
+
+        wxImage* GetImage();
+
+protected:
+        void Execute();
+        void Update();
+
+protected:
+        wxImage* GetImageFromBD();
+        void GuardarImagen();
+
+        ThumbnailsCommandParams* m_pThumbParams;
+        bool                            m_Error;
+
+};
+}
diff --git a/cadxcore/endpoint/address.cpp b/cadxcore/endpoint/address.cpp
new file mode 100644
index 0000000..709d5fd
--- /dev/null
+++ b/cadxcore/endpoint/address.cpp
@@ -0,0 +1,491 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <iostream>
+#include <sstream>       // for numeric conversion
+
+#include <string>
+#include <cstdlib>
+
+#include <sys/types.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#include "protocols.h"
+#include "address.h"
+#ifdef _WIN32
+#include "inet_ntop.h"
+#endif
+
+
+//******************* EndpointAddress ***********************
+// A single address
+
+
+// Return literal IP address
+std::string EndpointAddress::IP()
+{
+        char str[128];
+        addrinfo* addr = this;
+
+        if (!m_Inicializada)
+                return "???";
+
+        memset(&str, 0, 128);
+        // This is nasty, but necessary
+        // From, I think, W. Richard Steven's work
+#ifdef _WIN32
+        if (addr->ai_family == AF_INET) {
+                myinet_ntop(AF_INET, &(((sockaddr_in*)addr->ai_addr)->sin_addr),
+                            str, sizeof(str));
+        } else if (addr->ai_family == AF_INET6) {
+                myinet_ntop(AF_INET6, &(((sockaddr_in6*)addr->ai_addr)->sin6_addr),
+                            str, sizeof(str));
+        } else {
+                return "";
+        }
+#else
+        if (addr->ai_family == AF_INET) {
+                inet_ntop(AF_INET, &(((sockaddr_in*)addr->ai_addr)->sin_addr),
+                          str, sizeof(str));
+        } else if (addr->ai_family == AF_INET6) {
+                inet_ntop(AF_INET6, &(((sockaddr_in6*)addr->ai_addr)->sin6_addr),
+                          str, sizeof(str));
+        } else {
+                return "";
+        }
+#endif
+
+        return std::string(str);
+}
+
+// Return canonical DNS name, empty string if none
+std::string EndpointAddress::DNS()
+{
+        return ai_canonname ? ai_canonname : "";
+}
+
+// Return canonical DNS name if has one, else IP
+std::string EndpointAddress::Name()
+{
+        if (DNS().length())
+                return DNS();
+        else
+                return IP();
+}
+
+
+// Return stringified port number
+std::string EndpointAddress::Port()
+{
+        unsigned short port = PortNumber();
+        std::string str;
+        std::ostringstream o;
+
+        if (!(o << port))
+                return "???";
+        return o.str();
+}
+
+// Return integer port number
+unsigned short EndpointAddress::PortNumber()
+{
+        unsigned short port;
+
+        if (!m_Inicializada)
+                return 0;
+
+        if (ai_family == AF_INET)
+                port = ((sockaddr_in*)ai_addr)->sin_port;
+        else if (ai_family == AF_INET6)
+                port = ((sockaddr_in6*)ai_addr)->sin6_port;
+        else
+                port = 0;
+
+        return ntohs(port);
+}
+
+/*int EndpointAddress::SetPort(int port)
+{
+    if (ai_family == AF_INET)
+        ((sockaddr_in*)ai_addr)->sin_port = htons(port);
+    else if (ai_family == AF_INET6)
+        ((sockaddr_in6*)ai_addr)->sin6_port = htons(port);
+    else
+    {
+#ifdef _EP_DEBUG
+        std::cout << "EndpointAddress::SetPort()-addr family?" << std::endl;
+#endif
+    }
+    return port;
+}*/
+
+// Return IP address, colon, port
+std::string EndpointAddress::IPPort()
+{
+        if( this == 0 || !m_Inicializada )
+                return "(unconnected)";
+
+        std::string ip = IP();
+
+        if (ip.length() == 0)
+                return "(invalid)";
+
+        // If address has colons (as with IPv6), need to put in brackets
+        if (ip.find(":") != std::string::npos)
+                ip = "[" + ip + "]";
+
+        return ip + ":" + Port();
+}
+
+// Return IP address, colon, port
+EndpointAddress::operator std::string()
+{
+        return IPPort();
+}
+
+/****************************************************/
+// Function Added by John Medema, 05/05.
+
+// ai_canonname is the C Pointer that
+// normally holds the DNS Canonical Name.
+
+// dynamicMemLoc is a pointer that holds
+// the address for the dynamically
+// (heap-allocated) memory.  ai_canonname
+// should also be pointing to this, but
+// I wanted a guaranteed pointer the
+// dynamic memory.
+
+// dynamicMemData is a string that holds
+// a copy of the data pointed to by
+// dynamicMemLoc.
+
+// Process:  When the EndpointAddress
+// is first instantiated, dynamicMemData
+// is automatically set to "".  The only
+// time dynamicMemData is not "" is when
+// there has been dynamically allocated
+// memory.  (A String is the smallest
+// C/C++ object that is initialized to a
+// set value.  No other objects zero out
+// their value upon initialization.)
+// As long as we need to have something
+// in dynamicMemData, we put in a copy of
+// the C String data.
+
+// I chose to use a string/pointer combination
+// because the Constuctor/Create()/Clone()
+// functions can be used manually (not just
+// for object initialization).
+
+
+//******************* EndpointAddrlist ***********************
+
+void EndpointAddrlist::Copy(const EndpointAddrlist & original)
+{
+        m_error_code = original.m_error_code;
+        m_error_str = original.m_error_str;
+        m_error_cat = original.m_error_cat;
+        m_bool = original.m_bool;
+        m_addrlist = original.m_addrlist;
+        m_addrs = m_addrlist.begin();
+}
+
+bool EndpointAddrlist::Create(std::string hostname, std::string service,
+                              int type, int family)
+{
+        struct addrinfo hints;//, *addr;
+        int error, proto;
+        memset(&hints, 0, sizeof(hints));
+        proto = type & EP_SOCK_MASK;
+        if (proto == TCP)
+                hints.ai_socktype = SOCK_STREAM;
+        else if (proto == UDP)
+                hints.ai_socktype = SOCK_DGRAM;
+        else if (proto >= RAW_BASE)
+                hints.ai_socktype = SOCK_RAW;
+
+        m_bool = false;
+        m_error_cat = EP_ERROR_NONE;
+        m_error_code = 0;
+        m_error_str = "";
+
+        //hints.ai_socktype = ((type & EP_SOCK_MASK) == UDP) ? SOCK_DGRAM : SOCK_STREAM;
+        hints.ai_family = family;
+
+        // Should we fetch the canonical name (DNS FQDN)? Probably not.
+        //hints.ai_flags = //AI_CANONNAME |
+
+        hints.ai_flags = (type & SERVER) ? AI_PASSIVE : 0;
+
+        // hostname can be one of:
+        // - IPv4 address
+        // - IPv6 address - has >1 colon
+        // - DNS name
+        // - One of the above, followed by ":service_name"
+        // IPv4 or DNS + port = 1 colon
+        // IPv6 = >1 colon
+        // IPv6 + port = [address]:port, requires brackets
+        // [address] can be any literal, including IPv4
+
+        // One colon, no [] - something besides an IPv6 literal, easy
+        if (hostname.find(":") != std::string::npos &&        // has colon
+            hostname.find_first_of(":") == hostname.find_last_of(":") &&  // 1 ":"
+            hostname.find("]") == std::string::npos) {        // and no ]
+                // One colon. Before the colon is host, after is service
+                service = hostname.substr(hostname.find(":") + 1);
+                hostname = hostname.substr(0, hostname.find(":"));
+
+        }
+        // Let hostnames with multiple colons be parsed by getaddrinfo(), because
+        // they are IPv6 addresses without ports. Unless they contain [...].
+
+        // A service (port) name can be specified with IPv6 addresses also, but
+        // they have to be enclosed in brackets to disambiguate the colons.
+        // This seems to be the standard in URLs, for example- http://[::1]:80/
+        // IPv4 addresses are also allowed, as in [127.0.0.1]:80, but not DNS names
+        // Technical Note: Only the last bracket is actually required
+        if (hostname.find("]") != std::string::npos) {
+                service = hostname.substr(hostname.find("]") + 1);
+                if (service[0] == ':')       // [foo]:bar, extract just bar
+                        service = service.substr(1); // but also allow [foo]bar
+                hostname = hostname.substr(0, hostname.find("]"));
+                if (hostname[0] == '[')      // [foo]:bar, just extract foo
+                        hostname = hostname.substr(1); // but also allow foo]:bar
+
+#ifdef _EP_DEBUG
+                std::cout<<"service:"<<service<<","<<hostname<<std::endl;
+#endif
+
+                hints.ai_flags |= AI_NUMERICHOST;  // force literal, disable DNS
+        }
+
+        // With raw services, this may not be an error. Assume 0?
+        // For now, don't complain about this error. If it becomes a problem,
+        // it will cause errors further down the road.
+        //if (service == "")
+        //    std::cout << "No service port given!" << std::endl;
+
+        // Allow the two octets of the port number to be specified separately,
+        // separated by commas. For example, port "1,2" would be 258. This is
+        // mainly used when writing to ICMP raw sockets: type,code is port number
+        if (service.find(",") != std::string::npos) {
+                int nport;
+                std::ostringstream o;
+
+#ifdef _EP_DEBUG
+                std::cout << "service has comma!" << std::endl;
+#endif
+
+                nport = (atoi(service.substr(0, service.find(",")).c_str()) << 8)
+                        + atoi(service.substr(service.find(",") + 1).c_str());
+
+                service = (o << nport) ? o.str() : service;
+        }
+
+        // XXX: inet_addr could be used here if hostname doesn't contain a colon
+        // (non-IPv6), as it could be either an IPv4 literal or DNS hostname.
+        //     if ((remote_ip = inet_addr(remote_addr.c_str()) >= 0xffffffff) {
+        // That would allow for all kinds of neat IPv4 literals, like hex,
+        // octal, dotless, blah blah blah.
+        // XXX: But this is not done. Maybe thats a good thing.
+
+        // Raw sockets don't have service/port numbers
+        const char* str_service = service.c_str();
+        if (type >= RAW_BASE)
+                str_service = NULL;
+
+        // Leaving the hostname blank means NULL (getaddrinfo won't accept blank)
+        // NULL means INADDR_ANY if server, INADDR_LOOPBACK if client
+        const char* str_hostname = hostname.c_str();
+        if (!hostname.length())
+                str_hostname = NULL;
+
+        if (type < RAW_BASE) {
+                addrinfo* res;
+                // Call the standard getaddrinfo(), it does all our work!
+                error = getaddrinfo(str_hostname, str_service, &hints, &res);
+                if (error) {
+                        std::stringstream ss;
+                        ss << "Used hostname: "
+                           << (str_hostname ? str_hostname : "(null)")
+                           << ", service: "
+                           << (str_service ? str_service : "(null)") << std::endl;
+                        ss << "getaddrinfo: " << strerror(errno) << std::endl;
+
+                        if (hints.ai_flags & AI_NUMERICHOST)
+                                ss << "(A literal address, i.e. not a DNS name, is required)" << std::endl;
+                        m_error_str = ss.str();
+
+                        m_error_cat = EP_ERROR_GETADDRINFO;
+                        m_error_code = error;
+
+                        DeleteList();
+                        m_bool = false;
+                } else {
+                        m_bool = true;
+                        CreateList(res);
+                        freeaddrinfo(res);
+                }
+        } else {
+                // Raw sockets not supported with Win32 getaddrinfo?
+                // Build it ourself, IPv4 only
+                EndpointAddress tempEA;
+                tempEA.ai_flags = 0;
+                tempEA.ai_family = AF_INET;
+                tempEA.ai_socktype = SOCK_RAW;
+                tempEA.ai_protocol = type;
+                tempEA.ai_addrlen = sizeof(sockaddr_in);
+                tempEA.ai_next = 0;
+#if defined(_WINDOWS)
+                ( (sockaddr_in*) tempEA.ai_addr )->sin_family = (ADDRESS_FAMILY)tempEA.ai_family;
+#else
+                ( (sockaddr_in*) tempEA.ai_addr )->sin_family = tempEA.ai_family;
+#endif
+                ( (sockaddr_in*) tempEA.ai_addr )->sin_port = 0;
+                ( (sockaddr_in*) tempEA.ai_addr )->sin_addr.s_addr = inet_addr(hostname.c_str());
+                m_addrlist.push_back(tempEA);
+        }
+
+        // User specified a service (port) for a raw socket, let's use it :)
+        if (type >= RAW_BASE && service.length() != 0) {
+                // TODO: let them specify service *names* as well
+                int port = atoi(service.c_str());
+
+                // Note: port of 0 is okay here
+
+                std::list< EndpointAddress >::iterator it;
+                for (it = m_addrlist.begin(); it != m_addrlist.end(); ++it) {
+                        addrinfo* ai = &(*it);
+
+                        // Warning: this is ugly, and duplicated in EndpointAddress
+                        if (ai->ai_family == AF_INET)
+                                ((sockaddr_in*)ai->ai_addr)->sin_port = (u_short) htons((u_short)port);
+                        else if (ai->ai_family == AF_INET6)
+                                ((sockaddr_in6*)ai->ai_addr)->sin6_port = (u_short) htons((u_short)port);
+                        else {
+#ifdef _EP_DEBUG
+                                std::cout << "EndpointAddress::SetPort()-addr family?"
+                                          << std::endl;
+#endif
+                        }
+                }
+        }
+        return true;
+}
+
+// Get current address
+EndpointAddress EndpointAddrlist::GetAddress() const
+{
+        if(m_addrs != m_addrlist.end()) {
+                return *m_addrs;
+        } else {
+                EndpointAddress ret;
+                return ret;
+        }
+}
+
+// Get current address and go to next, or m_addrlist.end() if at end
+EndpointAddress EndpointAddrlist::GetAddressNext()
+{
+        if( m_addrlist.empty() == true || m_addrs == m_addrlist.end() ) {
+                EndpointAddress ret;
+                return ret;
+        }
+
+        EndpointAddress ret = *m_addrs;
+        if( m_addrs != m_addrlist.end() ) {
+                m_addrs++;
+        }
+
+        return ret;
+}
+
+// CreateList assumes the pointer is at the head of the list.
+// Only pass m_head through here!!!
+void EndpointAddrlist::CreateList( struct addrinfo* list )
+{
+        int count = 1;
+        DeleteList();
+
+        // curList_addr = current node in 'list'
+//  EndpointAddress *curList_addr = (EndpointAddress*) list;
+        addrinfo *curList_addr = list;
+        // curM_addr = current node in our class' vector
+        EndpointAddress curM_addr;
+
+        if( !list ) {
+                return;
+        }
+
+        while( curList_addr != NULL ) {
+                count++;
+                curM_addr = *curList_addr;
+
+                // explicitly set ai_next = 0 since the vector iterators are used instead.
+                curM_addr.ai_next = 0;
+
+                //finalize
+                m_addrlist.push_back(curM_addr);
+                curList_addr = (EndpointAddress*) curList_addr->ai_next;
+        }
+        m_addrs = m_addrlist.begin();
+
+        return;
+}
+
+// Deletes out the local addrinfo linked list.
+void EndpointAddrlist::DeleteList()
+{
+        m_addrlist.clear();
+        m_addrs = m_addrlist.begin();
+        return;
+}
+
+int EndpointAddrlist::SetLastError()
+{
+#ifdef _WIN32
+        m_error_code = WSAGetLastError();
+
+        LPVOID lpMsgBuf;
+        FormatMessage(
+                FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+                NULL,
+                m_error_code,
+                MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                (LPTSTR) &lpMsgBuf,
+                0,
+                NULL );
+        m_error_str = (const char*)lpMsgBuf;
+        LocalFree(lpMsgBuf);
+#else
+        m_error_code = errno;
+        m_error_str =  strerror(errno);
+#endif
+        return m_error_code;
+}
+
+EndpointAddrlist::~EndpointAddrlist()
+{
+        DeleteList();
+}
+
+
diff --git a/cadxcore/endpoint/address.h b/cadxcore/endpoint/address.h
new file mode 100644
index 0000000..be25f73
--- /dev/null
+++ b/cadxcore/endpoint/address.h
@@ -0,0 +1,289 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __ENDPOINT_ADDRESS_H
+#define __ENDPOINT_ADDRESS_H
+
+#define EP_ERROR_NONE         0
+#define EP_ERROR_GETADDRINFO  100
+
+
+#ifdef _WIN32
+#include <sys/types.h>
+#include <winsock2.h>
+#include <ws2tcpip.h>
+#else // !_WIN32
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#endif // !_WIN32
+
+//******************* EndpointAddress ***********************
+#include <iostream>
+#include <string>
+#include <cstring>
+#include <list>
+
+// A single address
+class EndpointAddress : public addrinfo
+{
+public:
+        EndpointAddress()
+        {
+                Reset();
+        }
+
+        EndpointAddress(const EndpointAddress &otra)
+        {
+                *this = otra;
+        }
+
+        EndpointAddress(sockaddr* sa, int type)
+        {
+
+                Reset();
+
+                if (!sa) {
+                        m_Inicializada = false;
+                        return;
+                }
+
+                ai_flags = 0;
+                ai_family = sa->sa_family;
+                ai_socktype = type;
+                ai_protocol = 0;
+
+                ai_addr = &m_sockaddr;
+                m_sockaddr = *(sa);
+                ai_next = NULL;
+
+                ai_addrlen = sizeof(sockaddr);
+
+                ResetCanonName();
+                ai_canonname = m_CanonName;
+
+                m_sockaddr = *sa;
+
+                ai_next = NULL;
+
+                m_Inicializada = true;
+        }
+
+        ~EndpointAddress()
+        {
+        }
+
+        std::string IPPort();
+
+        std::string IP();
+
+        std::string DNS();
+
+        std::string Name();
+
+        std::string Port();
+
+        unsigned short PortNumber();
+
+        EndpointAddress & operator=(const EndpointAddress & otra)
+        {
+
+                if( !otra.m_Inicializada ) {
+                        Reset();
+                        return *this;
+                }
+
+                ResetCanonName();
+
+                ai_flags =otra.ai_flags;
+                ai_family = otra.ai_family;
+                ai_socktype = otra.ai_socktype;
+
+                // GW: Not sure why the protocolis not copied
+                ai_protocol = 0;
+
+                ai_addr = &m_sockaddr;
+                m_sockaddr = *(otra.ai_addr);
+                ai_next =otra.ai_next;
+
+                ai_addrlen = sizeof(sockaddr);
+
+                CopyCanonName(otra.m_CanonName);
+                ai_canonname = m_CanonName;
+
+                m_Inicializada = otra.m_Inicializada;
+
+                return *this;
+        }
+
+        EndpointAddress & operator=(const addrinfo & otra)
+        {
+                ResetCanonName();
+
+                ai_flags = otra.ai_flags;
+                ai_family = otra.ai_family;
+                ai_socktype = otra.ai_socktype;
+
+                // GW: Not sure why the protocolis not copied
+                ai_protocol = 0;
+
+                ai_addr = &m_sockaddr;
+                m_sockaddr = *(otra.ai_addr);
+                ai_next = otra.ai_next;
+
+                ai_addrlen = sizeof(sockaddr);
+                if (otra.ai_canonname != NULL) {
+                        CopyCanonName(otra.ai_canonname);
+                }
+                ai_canonname = m_CanonName;
+
+                m_Inicializada = true;
+
+                return *this;
+        }
+
+        EndpointAddress & operator*()
+        {
+                return *this;
+        }
+
+        operator std::string();
+
+        operator bool()
+        {
+                return m_Inicializada;
+        }
+
+        operator sockaddr()
+        {
+                if (!m_Inicializada) {
+                        sockaddr _nil;
+                        std::memset(&_nil, 0, sizeof(sockaddr));
+                        return _nil;
+                } else {
+                        return m_sockaddr;
+                }
+        }
+
+        bool m_Inicializada;
+
+protected:
+
+        void Reset()
+        {
+                ai_flags = 0;
+                ai_family = 0;
+                ai_socktype = 0;
+                ai_protocol = 0;
+                ai_addrlen = sizeof(sockaddr);
+                ai_protocol = 0;
+
+                ai_addr = &m_sockaddr;
+                std::memset(&m_sockaddr, 0, sizeof(sockaddr));
+                ai_next = NULL;
+
+                ai_addrlen = sizeof(sockaddr);
+
+                ResetCanonName();
+                ai_canonname = m_CanonName;
+
+                m_Inicializada = false;
+        }
+
+        void ResetCanonName()
+        {
+                for (int i = 0; i < 255; i++) {
+                        m_CanonName[i] = 0;
+                }
+        }
+
+        void CopyCanonName(const char* src)
+        {
+                for (int i = 0; i < 255 && src[i] != 0; i++) {
+                        m_CanonName[i] = src[i];
+                }
+        }
+
+        struct sockaddr m_sockaddr;
+        char m_CanonName[256];
+
+};
+
+
+//******************* EndpointAddrlist ***********************
+// Encapsulates (possibly multiple) addresses
+
+#include <vector>
+
+class EndpointAddrlist
+{
+public:
+        EndpointAddrlist() : m_error_cat(0), m_error_code(0)
+        {
+                m_bool = false;
+                m_addrs = m_addrlist.begin();
+        };
+        EndpointAddrlist( const EndpointAddrlist & orig )
+        {
+                Copy(orig);
+        };
+        EndpointAddrlist(std::string hostname,
+                         std::string service = "",
+                         int protocol = TCP | CLIENT,
+                         int family = AF_INET)
+        {
+                Create(hostname, service, protocol, family);
+        }
+        ~EndpointAddrlist();
+
+        bool Create(std::string hostname, std::string service = "",
+                    int protocol = TCP | CLIENT, int family = AF_INET);
+
+        EndpointAddrlist & operator=(const EndpointAddrlist & orig)
+        {
+                Copy(orig);
+                return *this;
+        }
+        operator bool() const
+        {
+                return m_bool;
+        }
+        void Copy(const EndpointAddrlist & );
+
+        EndpointAddress GetAddress() const;
+        EndpointAddress GetAddressNext();
+        static std::string StrIP(struct addrinfo*);
+        int SetLastError();
+        std::list< EndpointAddress >  m_addrlist;
+        std::list< EndpointAddress >::iterator m_addrs;
+
+        int m_error_cat;
+        int m_error_code;
+        std::string m_error_str;
+        bool m_bool;
+
+private:
+        void DeleteList();
+        void CreateList( struct addrinfo* );
+        char canonname[256];
+};
+#endif
diff --git a/cadxcore/endpoint/address.html b/cadxcore/endpoint/address.html
new file mode 100644
index 0000000..4d1caa5
--- /dev/null
+++ b/cadxcore/endpoint/address.html
@@ -0,0 +1,358 @@
+<html>
+<head>
+<title>EndpointAddress Class</title>
+</head>
+<body>
+<h1>Table of Contents</h1>
+<ul>
+<li><a href="#1.">1. Network Addressing</a>
+<li><a href="#2.">2. EndpointAddrlist class</a>
+<ul>
+<li><a href="#2.1.">2.1. Constructors</a>
+</ul>
+<li><a href="#3.">3. EndpointAddress</a>
+<ul>
+<li><a href="#3.1.">3.1. Constructor</a>
+</ul>
+<li><a href="#4.">4. File Locations</a>
+<li><a href="#5.">5. Errors from <tt>getaddrinfo</tt></a>
+<ul>
+<li><a href="#5.1.">5.1. Resolution Errors</a>
+<li><a href="#5.2.">5.2. Usage Errors</a>
+</ul>
+</ul>
+
+<a name="1."><h1>1. Network Addressing</h1></a>
+<p>Addressing a socket is not a trivial topic. A port number, transport layer
+protocol, and possibly more than one IPv4 or IPv6 or DNS address must be 
+given. The DNS has to be resolved, addresses have to be chosen, port numbers
+must be resolved, and so on.
+
+<p>Fortunately, nearly everything needed to represent an Internet address
+can be encapsulated into a regular ordinary <tt>string</tt>, which can be
+entered by the user. All thats needed is this string to create an
+<tt>EndpointAddrlist</tt> object, although other information may be supplied
+(in particular, the transport layer protocol -- UDP or TCP -- must be passed
+outside of the string, for security reasons). EndpointAddrlist attempts to
+take care of everything regarding addresses, including things which many
+applications would otherwise ignore (such as multiple addresses per name).
+
+<p><tt>Endpoint</tt> accepts EndpointAddrlist as remote and local addresses,
+in which case all the addresses shall be tried. EndpointAddress encapsulates
+just one.
+
+<a name="2."><h1>2. EndpointAddrlist Class</h1></a>
+<p>EndpointAddrlist encapsulates an array of <tt>addrinfo</tt>s obtained
+through the protocol-independent <tt>getaddrinfo</tt>. Although the class
+name is singular, it is possible for multiple addresses to be listed within.
+Your application can choose to ignore all but one, but its recommended to
+try to connect to alternative addresses if the first one doesn't work,
+instead of giving up.
+
+<a name="2.1."><h2>2.1. Constructors</h2></a>
+<p>The following arguments are accepted, in order:
+
+<h3>string hostname</h3>
+<p>A hostname. This is passed to <tt>getnameinfo</tt> which either resolves
+the DNS name or uses <tt>inet_pton</tt> to convert from presentation form
+to numeric form. Note that <tt>inet_pton</tt> only supports dotted-decimal
+IPv4 or hex-string IPv6 addresss, and <b>not</b> the following alternative 
+IPv4 address formats (which <tt>inet_aton</tt> and therefore ping support):
+<ul>
+<li><b>Implied octets</b>: 127.1 = 127.0.0.1, 127.1.2 = 127.1.0.2
+<li><b>Hexadecimal octets</b>: 0x7f.0.0.0 = 127.0.0.1
+<li><b>Octal octets</b>: 0377.0377.0377.0377 = 255.255.255.255
+<li><b>Binary octets?</b>
+<li><b>Dotless addresses</b>: 2130706433 = 127.0.0.1,
+0x7f000001 = 127.0.0.1, 017700000001 = 127.0.0.1
+</ul>
+<p>Regular dotted-decimal strings such as "127.0.0.1" (IPv4) and hex string
+"::1" (IPv6) are allowed. DNS names may resolve to either IPv4 or
+IPv6 addresses, depending on if A or AAAA resource records exist.
+If your host doesn't support both IPv4 and IPv6, either one can be disabled
+by setting the default address family later on.
+
+<p>The hostname can also contain a service port, in URL-style. That is,
+a hostname followed by a colon and then a port, rather than a period. Netstat
+represents port 139 of 10.0.0.2 as "10.0.0.2.139", but this is not acceptable.
+"10.0.0.2:139" is supported by this class, and has the advantage of being
+aesthetically pleasing and easy to parse. With one exception.
+
+<p>IPv6 addresses contain embedded colons. However, they always contain
+more than one colon. "::1" is interpreted as an IPv6 address with no port,
+while "127.0.0.1:1" is interpreted as port 1 on 127.0.0.1. So how can port
+names be specified with IPv6 addresses? Several purposals have been made, but
+the best by far (and the one which this class understands) is to enclose
+the IPv6 address in brackets, like so: [::1]:80 = port 80 of ::1. IPv6-enabled
+web browsers understand this. The parser is loose about what is accepted:
+[::1]80, ::1]:80 and even ::1]80 will be interpreted identically, but you 
+shouldn't rely on this. For orthogonality (the [] notation has roots in
+email systems), an IPv4 address is acceptable in brackets:
+[127.0.0.1]:80 works as expected. Brackets also turn on AI_NUMERICHOST, which
+prevents DNS resolving -- [example.com]:80 won't work, but example.com:80 will.
+<i>Brackets enclose literals, they are optional with IPv4 but required with
+IPv6</i>.
+
+<p>If a port is given, it replaces the <tt>service</tt> variable, described
+below. This is to allow users to override default port numbers in case of an
+emergency. It should not be viewed as a security concern.
+
+<h3>string service = ""</h3>
+<p>The service name resolves to a port number through <tt>services</tt>.
+This means you can specify human-readable service names such as 
+"http" for port 80 TCP. Numeric strings are also allowed, such as "80";
+this is passed to <tt>getaddrinfo</tt> and handled there.
+
+<p><tt>getaddrinfo</tt> handles this input, but before it gets to it, this
+class interprets port numbers with commas in them. The port number is 16-bits,
+and both octets can be specified as two 0-255 integers, separated by a 
+common; for example, "1,2" is 0x0102. This is most useful for raw ICMP sockets;
+they understand the first octet as the type code and the second as the code
+code (this is specific to the Endpoint library). Other bases besides decimal
+are not supported.
+
+<p>This argument can often be omitted if you know for sure <tt>hostname</tt> 
+will
+contain a port number, but specifying it is most useful for allowing a 
+default port if none is specified in <tt>hostname</tt>.
+
+<h3>int type = 0</h3>
+<p>A bitmask of the following:
+<ul>
+<li><b>TCP</b> - Transport Control Protocol
+<li><b>UDP</b> - User Datagram Protocol
+<li><b>RAW_<i>xxx</i></b> - Raw socket with transport-layer protocol <i>xxx</i>
+</ul>
+And:
+<ul>
+<li><b>CLIENT (0)</b> - Actively connects to another host
+<li><b>SERVER (1)</b> - Passively waits for another host to connect
+</ul>
+<li>
+<p>The default is TCP | CLIENT, which seems to be the most common.
+
+<p>To use IPv4 raw sockets on Unix, you need root access. You also need to give
+the transport-layer protocol; these are derived from IPPROTO_, see protocols.h.
+For example, to send raw ICMP packets, use RAW_ICMP, to send raw UDP, RAW_UDP.
+Endpoint will make the IP header for you unless you choose RAW_RAW, in which
+case you can do it yourself. The idea is that you RAW_xxx makes the raw IP as
+well as xxx header for you, although this is only implemented with RAW_UDP
+presently.
+
+
+<h3>int family = EndpointAddrlist::g_default_family</h3>
+<p>Specifies the address as well as protocol family. Allowed values are:
+<ul>
+<li><b>AF_UNSPEC</b>: "unspecified", host is dual-stack and supports both
+IPv4 and IPv6 (either is acceptable)
+<li><b>AF_INET</b>: Only want IPv4 addresses
+<li><b>AF_INET6</b>: Only want IPv6 addresses
+</ul>
+<p>EndpointAddrlist::g_default_family can be set on a global (or at least
+program-wide) scale, to reflect which protocol families the host supports.
+An IPv4-only host would set this to AF_INET, an IPv6-only host AF_INET6,
+a dual-stack IPv4 and IPv6 host would use AF_UNSPEC.
+
+<h3>EndpointAddress GetAddress()</h3>
+<p>Returns the current address. Unless GetAddressNext() is called, this is the
+first address. See GetAddressNext(), which is preferred for most applications.
+However, GetAddress() has its uses; sometimes there is no reason to try
+multiple names, for example if there is no DNS name.
+
+<h3>EndpointAddress GetAddressNext()</h3>
+<p>Return the current address, and move to the next one (post-increment).
+This should be done instead of just trying to use the first address. The
+proper protocol is to try each address, until one succeeds.
+
+<a name="3."><h1>3. EndpointAddress</h1></a>
+<p>Encapsulates a single address. This is a subclass of the <tt>addrinfo</tt>
+structure, whose declaration is reproduced below:
+<pre>
+struct addrinfo {
+        int     ai_flags;       /* AI_PASSIVE, AI_CANONNAME, AI_NUMERICHOST */
+        int     ai_family;      /* PF_xxx */
+        int     ai_socktype;    /* SOCK_xxx */
+        int     ai_protocol;    /* 0 or IPPROTO_xxx for IPv4 and IPv6 */
+        size_t  ai_addrlen;     /* length of ai_addr */
+        char    *ai_canonname;  /* canonical name for hostname */
+        struct  sockaddr *ai_addr;      /* binary address */
+        struct  addrinfo *ai_next;      /* next structure in linked list */
+};
+</pre>
+<p>There is also an m_bool boolean value, which is true if the fields above
+are valid.</p>
+
+<a name="3.1."><h2>3.1. Constructor</h2></a>
+<p>EndpointAddrlist(addrinfo*) is the only constructor. If the pointer is
+non-null, each field is copied shallowly and m_bool is true. If null, 
+m_bool is false.
+
+<h2>operator string()</h2>
+<p>Stringifies the address by returning IP() + ":" + Port(). The reason why 
+IP() is
+returned rather than its DNS name is threefold: not all hosts have DNS
+names, DNS names may have more than one host, and forward/reverse DNS may
+not match. If IP() contains a colon, it is put in square brackets as is
+customary with IPv6.
+
+<h2>string IP()</h2>
+<p>Returns a human-readable form of the address. operator string() calls
+this. The IP address will be returned, as either a dotted-decimal or
+hex string.
+
+<p>This function internally calls <tt>inet_ntop</tt> (numeric to
+presentation) with the proper flags and passing the proper structures,
+depending on if the address is IPv4 or IPv6. Manually, this is tedious.
+WinSock does not provide <tt>inet_ntop</tt> so a implementation copied
+from BIND is provided.
+
+<h2>string DNS()</h2>
+<p>Returns the canonical DNS name in ai_cannonname, or an empty string 
+if there is none.
+
+<h2>string Name()</h2>
+<p>Returns DNS() if not empty, else IP().
+
+<h2>string Port()</h2>
+<p>Returns the port number.
+
+<h2>operator bool()</h2>
+<p>Returns m_bool, which is false if there is no address.
+
+<a name="4."><h1>4. File Locations</h1></a>
+<p><tt>services</tt> and <tt>hosts</tt> are used during service
+and name resolution (name resolution additionally uses DNS). Both these
+files can be by default found in the following locations:
+<ul>
+<li><b>Unix:</b> /etc
+<li><b>Windows NT, 2000, XP:</b> C:\windows\system32\drivers\etc, C:\winnt\system32\drivers\etc
+<li><b>Windows 95, 98, Me:</b> C:\windows
+</ul>
+
+<a name="5."><h1>5. Errors From <tt>getaddrinfo()</tt></h1></a>
+<p>A non-zero return value from <tt>getaddrinfo</tt> is one of the following,
+organized in order of likelihood, from greatest to least. The Posix 1g and
+Win32 constants as well as BSD and Win32 <tt>gai_strerror</tt> results are
+included as well.
+
+<a name="5.1."><h2>5.1. Resolution Errors</h2></a>
+<p>If an error occurs, <tt>m_bool</tt> is set to false,
+<tt>m_error_code</tt> is set to <tt>EP_ERROR_GETADDRINFO</tt>, and
+<tt>m_error_str</tt> is set to a description of the problem.
+
+<p>Unless literals are given, the hostname and service name need to be
+resolved. Errors can happen in this process.
+
+
+<h3>EAI_AGAIN = WSATRY_AGAIN</h3>
+<ul>
+<li><b>BSD:</b> "Temporary failure in name resolution."
+</ul>
+<p>There was a temporary DNS failure and you should try again.
+
+<h3>EAI_FAIL = WSANO_RECOVERY</h3>
+<ul>
+<li><b>BSD:</b> "Non-recoverable failure in name resolution."
+</ul>
+<p>A real bad error.	
+
+<h3>EAI_NODATA = WSANO_DATA / EAI_NONAME</h3>
+<ul>
+<li><b>BSD:</b> "No address associated with <i>hostname</i>."
+</ul>
+<p>This was removed from RFC, its equivalence or lack thereof to
+EAI_NONAME is unknown. The latest version of Windows defines EAI_NODATA
+to EAI_NONAME.	
+
+<h3>EAI_NONAME = WSAHOST_NOT_FOUND</h3>
+<ul>
+<li><b>BSD:</b> "<i>hostname</i> or <i>service</i> not provided, or not known."
+<li><b>Win32:</b> "No such host is known."
+</ul>
+<p>Not provided or no address associated with hostname.
+
+<h3>EAI_SERVICE = WSATYPE_NOT_FOUND</h3>
+<ul>
+<li><b>BSD:</b> "<i>service</i> not supported for ai_socktype."
+<li><b>Win32:</b> "The specified class was not found."
+</ul>
+<p>The symbolic service name could not be resolved, the entry in
+<tt>services</tt> is missing. The reference to "ai_socktype" means
+that if you try to connect to the "domain" service with TCP, and 
+the <tt>services</tt> file only has an entry for TCP, you'll also get this 
+error (although most systems now define both TCP and UDP for all services).
+This error never happens with numeric port numbers, so if
+you're concerned about portability, use them. Win32's <tt>services</tt>
+is quite small and doesn't cover all the esoteric service names, although
+it has its uses with custom servers (if you use a symbolic service name
+in your server and the user wants to change the port, all he has to do is 
+change the definition in <tt>services</tt> -- however, your install
+program must add a line to the file.).
+
+<a name="5.2."><h2>5.2. Usage Errors</h2></a>
+<p>These errors are mostly the fault of the programmer; either you (the class
+user) or me (the class programmer). Errors that "should not happen" should
+not happen under class design, even if invalid parameters are passed to the class.
+
+
+<h3>EAI_FAMILY = WSAEAFNOSUPPORT</h3>
+<ul>
+<li><b>BSD:</b> "<i>ai_family</i> not supported."
+<li><b>Win32:</b> "An address incompatible with the requested protocol was used."
+</ul>
+<p>hints.ai_family is invalid. The address family is specified as the last
+argument, and can be either AF_UNSPEC (IPv4 and/or) IPv6, AF_INET (IPv4),
+or AF_INET6 (IPv4). If the parameter is not given,  
+EndpointAddress::g_default_family is used. Either the default family 
+(which defaults to AF_UNSPEC) or the passed family is invalid.
+
+
+<h3>EAI_BADFLAGS = WSAEINVAL</h3>
+<ul>
+<li><b>BSD:</b> "Invalid value for <i>ai_flags</i>."
+<li><b>Win32:</b> never generated?
+</ul>
+<p>Valid values are AI_PASSIVE, AI_CANONNAME, and AI_NUMERICHOST.
+EndpointAddress only sets AI_PASSIVE (for servers) and AI_NUMERICHOST
+(for bracketed literals) so this should never happen.
+
+<h3>EAI_MEMORY = WSA_NOT_ENOUGH_MEMORY</h3>
+<ul>
+<li>BSD: "Memory allocation failure."
+</ul>
+
+
+<h3>EAI_ADDRFAMILY</h3>
+<ul>
+<li><b>BSD:</b> "Address family for <i>hostname</i> not supported."
+<li><b>Win32:</b> N/A
+</ul>
+<p>Presumably this means an address family other than AF_UNSPEC was
+given, and no address of that type is associated with the hostname.
+Does not exist on Win32.</p>
+
+
+<h3>EAI_SOCKTYPE = WSAESOCKNOSUPPORT</h3>
+<ul>
+<li><b>BSD:</b> "<i>ai_socktype</i> not supported."
+<li><b>Win32:</b> "The support for the specified socket type does not exist in this address family."
+</ul>
+<p>hints.ai_socktype is invalid. EndpointAddrlist sets this field to
+either SOCK_DGRAM for UDP or SOCK_STREAM for TCP so this should never happen.
+
+<h3>EAI_SYSTEM</h3>
+<ul>
+<li><b>BSD:</b> "System error returned in <i>errno</i>."
+<li><b>Win32:</b> N/A
+</ul>
+<p>This error code code is rarely used, but it means the errno variable
+will contain additional error information. Does not exist on Win32 (and most Unixes).
+</ul>
+
+</pre>
+
+</body>
+</html>
+
+
+
diff --git a/cadxcore/endpoint/alt.html b/cadxcore/endpoint/alt.html
new file mode 100644
index 0000000..31cb6ce
--- /dev/null
+++ b/cadxcore/endpoint/alt.html
@@ -0,0 +1,55 @@
+<html>
+<head>
+<title>Other C++ Socket Classes</title>
+</head>
+<body>
+<h1>References</h1>
+
+<dl>
+<dt>Microsoft Foundation Classes' <i>CSocket</i></dt>
+<dd>See <a href="http://tangentsoft.net/wskfaq/articles/csocket.html">CSocket Considered Harmful</a>, problems with being asynchronous and synchronous<p></dd>
+
+
+<dt><a href="http://www.gnu.org/software/commonc++/">GNU Common C++</a></dt>
+<dd>"GNU Common C++ offers support and portable classes for threading and sockets for both UNIX (Posix systems with "pthread" support) and the Windows "Win32" API. "</dd>
+
+<dt><a href="http://nmstl.sourceforge.net/doc/apiuc/classSocket.html">NMSTL's <i>Socket</i></a>
+<dd>Part of the "Networking, Messaging, Servers, and Threading Library",
+seems to be just a thin wrapper.<p></dd>
+
+<dt><a href="http://www.ddj.com/documents/s=7157/ddj0206a/0206a.htm">Jason 
+But's <i>SocketCC</i></a></dt>
+<dd>IPv4, IPv6, UDP, TCP, <i>SocketException</i>, <i>IPAddress</i>, several
+classes for TCP and UDP. No Win32 support, targetted at Linux.<p></dd>
+</dl>
+
+<dt><a href="http://www.cs.wustl.edu/~schmidt/cs544/socket2.html">ACE Sockets</a>
+<dd>Not much information<p></dd>
+
+<dt><a href="http://www.drclue.net/F1.cgi/HTML/SOCKETS/SOCKETS.html">Dr. Clue's <i>Socket</i></a></dt>
+<dd>Looks comprehensive, but no Win32 support.<p></dd>
+
+<dt><a href="http://www.adp-gmbh.ch/win/misc/sockets.html">Rene Nyffenegger's <i>Socket</i> for Win32</a></dt>
+<dd>SocketServer, SocketSelect, UDP. Win32 (WinSock2) only<p></dd>
+
+<dt><a href="http://members.aon.at/hstraub/linux/socket++/">Socket++</a></dt>
+<dd>"Socket++ is a family of C++ classes that gives the same interface as the iostream classes for input and output for communication between processes.", has Internet socks as well as Unix domain, implements Echo and SMTP example "protocol" classes, no IPv6. RedHat, Debian, FreeBSD, WinSock(?). Wrappers provided for pipe(), socketpair(), popen() and fork(). GPL'd. "Socket++ is a iostream like C++ class library for UNIX and INET domains of sockets and protocols.".<p></dd>
+
+<dt><a href="http://libsocket.sourceforge.net/">libsocketcpp</a></dt>
+<dd>"Libsocketcpp provides a easy-to-use C++ class. With this class, TCP and UDP functionality can be added to any program quickly and easily." XXX<p></dd>
+
+<dt><a href="http://www.rfc1149.net/devel/adasockets">AdaSockets</a></dt> - non-C++ (Ada)
+<dd>"AdaSockets allows Ada programmers to use sockets from within their programs with an easy-to-use Ada-friendly interface." XXX<p></dd>
+
+<dt><a href="http://www.ruby-lang.org/raa/list.rhtml?name=tcpsocketpipe">Ruby/TCPSocketPipe</a> - non-C++ (Ruby)</dt>
+<dd>"A Ruby library to create I/O pipes for TCP socket tunneling" XXX<p></dd>
+</dl>
+
+<dt><a href="http://www.gnetlibrary.org/">GNetLibrary</a><dd>
+GNet is a C library, but its object-oriented.</dd>
+
+<li><i>Unix Network Programming</i> - <b>a must</b>, also comes with a nice
+C networking library of wrappers for system calls
+<li><a href="http://www.ecst.csuchico.edu/~beej/guide/net/html/">Beej's Guide to Network Programming</a> - an excellent tutorial, good overview
+<li><a href="http://world.std.com/~jimf/papers/sockets/sockets.html">BSD Sockets: A Quick And Dirty Primer</a>
+</ul>
diff --git a/cadxcore/endpoint/endpoint.cpp b/cadxcore/endpoint/endpoint.cpp
new file mode 100644
index 0000000..1da8bcb
--- /dev/null
+++ b/cadxcore/endpoint/endpoint.cpp
@@ -0,0 +1,1197 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <iostream>
+#include <cstdlib>
+#include <cstdio>
+#include "endpoint.h"
+#include <api/controllers/icontroladorlog.h>
+#ifdef _WIN32
+#define _WINSOCKAPI_    // stops windows.h including winsock.h
+#include <windows.h>
+#endif
+
+//#define _EP_DEBUG
+Endpoint::Endpoint()
+{
+        m_bool = false;
+        m_error_cat = EP_ERROR_NONE;
+        m_error_code = 0;
+        m_error_str = "";
+        m_servfd = -1;
+        m_sockfd = -1;
+        m_family = AF_INET;
+        m_bytes_recv = 0;
+        m_server = 0;
+        m_bytes_sent = 0;
+        m_type = 0;
+}
+
+Endpoint::Endpoint( int type, std::string hostname, int service, int options ):Endpoint()
+{
+        // we could be getting an option instead of a service-
+        // because of the Endpoint(int, string) constructor below.
+        // option constants DOACCEPT and NOACCEPT are set to
+        // non-service ints.
+        if( service == DOACCEPT || service == NOACCEPT ) {
+                options = service;
+        }
+        std::ostringstream o;
+        o << service;
+        Create( type, hostname, o.str(), options );
+}
+
+Endpoint::Endpoint( int type, std::string remote, std::string local, int options  ):Endpoint()
+{
+        Create( type, EndpointAddrlist(remote, "", type),
+                EndpointAddrlist(local, "", type), options );
+}
+
+Endpoint::Endpoint( int type, std::string address ):Endpoint()
+{
+        Create( type, address );
+}
+
+Endpoint::Endpoint( int type, std::string remotehost, std::string remoteservice,
+                    std::string localhost, std::string localservice, int options  ):Endpoint()
+{
+        Create( type, remotehost, remoteservice, localhost, localservice, options );
+}
+
+Endpoint::Endpoint( int type, const EndpointAddrlist& address, int options  ):Endpoint()
+{
+        Create( type, address, options );
+}
+
+Endpoint::Endpoint( int type, const EndpointAddrlist& local, const EndpointAddrlist& remote, int options ):Endpoint()
+{
+        Create( type, local, remote, options );
+}
+
+bool Endpoint::Create( int type, std::string remotehost, std::string remoteservice,
+                       std::string localhost, std::string localservice, int options )
+{
+        return Create( type, EndpointAddrlist(remotehost, remoteservice, type),
+                       EndpointAddrlist(localhost, localservice, type), options );
+}
+
+bool Endpoint::Create( int type, std::string hostname, std::string service, int options )
+{
+        // If "service" isn't a service but a host:service, then the two
+        // arguments are: remote host+port, local host+port
+        if (service.find(":") != std::string::npos)
+                return Create( type, EndpointAddrlist(hostname, "", type),
+                               EndpointAddrlist(service, "", type), options );
+
+        // Otherwise the two arguments are: host, port
+        return Create( type, EndpointAddrlist(hostname, service, type), options );
+}
+
+bool Endpoint::Create( int type, const EndpointAddrlist& addr, int options )
+{
+        EndpointAddrlist local, remote;
+        m_type = type & EP_SOCK_MASK;
+        m_server = type & SERVER;
+
+        m_bool = false;
+
+        if (m_server) {
+                local = addr;
+        } else {
+                remote = addr;
+        }
+        return Create( type, remote, local, options );
+}
+
+// Main creation function - all Create() calls go here
+bool Endpoint::Create( int type, const EndpointAddrlist& _remote, const EndpointAddrlist& _local, int options )
+{
+
+        EndpointAddrlist local = _local;
+        EndpointAddrlist remote = _remote;
+        EndpointAddress try_local, try_remote;
+        m_type = type & EP_SOCK_MASK;
+        m_server = type & SERVER;
+        m_sockfd = m_servfd = -1;
+
+        m_bool = false;
+        m_error_cat = EP_ERROR_NONE;
+        m_error_code = 0;
+        m_error_str = "";
+
+        // Possible combinations of local & remote:
+        // LOCAL           REMOTE
+        // non-specified   non-specified      invalid!
+        // non-specified   specified          ok, common for client connections
+        // specified       non-specified      ok, common for server connections
+        // specified       specified          ok, rare, used for either
+
+        if (!local && !remote) {
+                // Local or remote address failed, find out what the deal is
+                // To see if an EndpointAddrlist is valid, don't check m_bool
+                // because m_bool=false if error, true if not; instead, check
+                // m_addrs to see if its non-null.
+                if ( remote.GetAddress() && remote.m_error_cat != EP_ERROR_NONE) {
+                        m_error_cat = remote.m_error_cat;
+                        m_error_code = remote.m_error_code;
+                        m_error_str = remote.m_error_str;
+                } else if (local.GetAddress() && local.m_error_code != EP_ERROR_NONE) {
+                        m_error_cat = local.m_error_cat;
+                        m_error_code = local.m_error_code;
+                        m_error_str = local.m_error_str;
+                } else {
+                        m_error_cat = EP_ERROR_ADDRESS;
+                        SetLastError();
+                        m_error_str = "Neither remote or local address could be determined.";
+                }
+                return false;
+        }
+
+        if (local) { // Local address specified, bind to ALL local addresses associated with this name
+                while ( (try_local = local.GetAddressNext()) ) {
+                        m_local = try_local;
+
+                        // If its a raw socket, setup the transport-layer-protocol field
+                        if (m_type >= RAW_BASE)
+                                try_local.ai_protocol = (m_type >> 1) - (RAW_BASE >> 1);
+
+#ifdef _EP_DEBUG
+                        std::cout << "trying to bind " << std::string(try_local) << std::endl;
+#endif
+                        // If g_raw_sockfd is specified, use it for raw sockets instead of socket()
+                        if (m_type >= RAW_BASE && g_raw_sockfd)
+                                m_sockfd = g_raw_sockfd;
+                        else
+                                m_sockfd = socket(try_local.ai_family, try_local.ai_socktype,
+                                                  try_local.ai_protocol);
+
+                        if (m_sockfd < 0) {
+                                m_error_cat = EP_ERROR_SOCKET;
+                                SetLastError();
+                                /*
+                                std::stringstream ss;
+                                ss << "socket error: " << strerror(errno)
+                                   << " family=" << try_local.ai_family
+                                   << " socktype=" << try_local.ai_socktype
+                                   << " protocol=" << try_local.ai_protocol;
+                                m_error_str = ss.str();
+                                */
+
+                                // don't break; try another
+                                continue;
+                        }
+
+                        // Set local address, unless its a raw socket
+                        if (m_type < RAW_BASE) {
+                                int n, yes = 1;
+                                n = setsockopt(m_sockfd, SOL_SOCKET, SO_REUSEADDR, (const char*)(&yes), sizeof(int));
+#ifdef _EP_DEBUG
+                                if( n != 0 ) {
+                                        std::cout << n << "--> " << ": " << errno << std::endl;
+                                        std::perror("setsockopt");
+                                }
+#endif
+                                n = bind(m_sockfd, try_local.ai_addr, try_local.ai_addrlen);
+                                if ( n < 0 ) {
+                                        m_error_cat = EP_ERROR_BIND;
+                                        SetLastError();
+                                        /*
+                                        std::stringstream ss;
+                                        ss << "bind error " << errno << ": " << strerror(errno) << " " << std::string(m_local);
+                                        m_error_str = ss.str();
+                                        */
+#ifdef _EP_DEBUG
+                                        std::cout << "bind error: " << strerror(errno) << " " <<
+                                                  std::string(m_local) << std::endl;
+#endif
+                                } else {
+#ifdef _EP_DEBUG
+                                        std::cout << "bound!" << std::endl;
+#endif
+                                        m_bool = true;
+                                        break;
+                                }
+                        }
+                }
+
+                // Ok...a local address was given, do a passive open?
+                // This is not always the case, a local address can be given and
+                // the socket be an active open, although thats rare.
+                // - Only TCP servers require listen() and accept()
+                if ((type & SERVER) && (type & EP_SOCK_MASK) == TCP && m_bool == true) {
+                        // What to do here? Data transfer occurs over newfd,
+                        // but the current fd is bound to the local address
+                        m_servfd = m_sockfd;
+                        m_local_server = m_local;
+
+                        // GW: make the socked invalid, because it is now handled by m_servfd
+                        m_sockfd = -1;
+                        listen(m_servfd, 10);
+
+                        if( options == DOACCEPT ) {
+                                bool returnVal = Accept();
+                                m_bool = returnVal;
+                        } else {
+                                m_bool = true;
+                        }
+
+                        //try_remote.Create(sa, SOCK_STREAM);     // TCP
+                        //(m_type == UDP ? SOCK_DGRAM : SOCK_STREAM));
+                        if (remote) { // Remote address for server. Not used. TODO: Only accept from?
+#ifdef _EP_DEBUG
+                                std::cout << "GIVEN: " << std::string(remote.GetAddress()) << std::endl;
+                                std::cout << "CONNECTED: " << std::string(m_remote) << std::endl;
+#endif
+                        }
+                }
+        }
+
+        if (remote) {  // Remote address specified, only connect to ONE
+                if ((type & SERVER) == CLIENT) {   // Client = active open to remote
+                        // Try to find an address that works, stick with it
+                        while( (try_remote = remote.GetAddressNext()) ) {
+                                // If its a raw socket, setup the transport-layer-protocol field
+                                if (m_type >= RAW_BASE)
+                                        try_remote.ai_protocol = (m_type >> 1) - (RAW_BASE >> 1);
+
+#ifdef _EP_DEBUG
+                                std::cout << "trying to connect "
+                                          << std::string(try_remote) << std::endl;
+#endif
+
+                                // Only socket() if doesn't exist yet; it may have been
+                                // created and bound in the previous step
+                                if (m_sockfd < 0) {
+                                        if (m_type >= RAW_BASE && g_raw_sockfd)
+                                                m_sockfd = g_raw_sockfd;
+                                        else
+                                                m_sockfd = socket(try_remote.ai_family, try_remote.ai_socktype,
+                                                                  try_remote.ai_protocol);
+                                }
+
+                                if (m_sockfd < 0) {
+                                        m_error_cat = EP_ERROR_SOCKET;
+                                        SetLastError();
+                                        /*
+                                        std::stringstream ss;
+                                        ss << "socket error: " << strerror(errno)
+                                           << " family=" << try_remote.ai_family
+                                           << " socktype=" << try_remote.ai_socktype
+                                           << " protocol=" << try_remote.ai_protocol;
+                                        m_error_str = ss.str();
+                                        */
+                                        continue;
+                                }
+                                if (m_type < RAW_BASE) { // only if not raw (will be in header)
+                                        if (connect(m_sockfd, try_remote.ai_addr, try_remote.ai_addrlen) < 0) {
+                                                std::string str("connect(): ");
+                                                perror((str + try_remote.IP() + " [" + try_remote.DNS() + "]: " + try_remote.Port()).c_str());
+                                                m_error_cat = EP_ERROR_CONNECT;
+                                                SetLastError();
+                                                /*
+                                                std::stringstream ss;
+                                                ss << "connect error: " << strerror(errno);
+                                                m_error_str = ss.str();
+                                                */
+                                        } else {
+#ifdef _EP_DEBUG
+                                                std::cout << "connected!" << std::endl;
+#endif
+                                                m_bool = true;
+                                                m_remote = try_remote;
+                                                break;
+                                        }
+                                } else {
+                                        m_bool = true;
+                                        m_remote = try_remote; // raw sockets will be first(XXX:IPv4)
+                                        break;
+                                }
+                        }
+
+                        // we were not able to establishe a connection
+                        if (m_sockfd < 0) {
+                                LOG_ERROR("Net", "Unable to open socket");
+                                m_bool = false;
+                                return false;
+                        }
+
+                        // Get local socket name = local address
+                        sockaddr sa;
+#ifdef _WIN32
+                        int n;
+#else
+                        unsigned int n;
+#endif
+                        n = sizeof(sockaddr);
+                        if (getsockname(m_sockfd, &sa, &n) == 0) {
+                                if (!m_local && (type & EP_SOCK_MASK) == TCP)
+                                        m_local = EndpointAddress(&sa, SOCK_STREAM);
+                                else if (!m_local && (type & EP_SOCK_MASK) == UDP)
+                                        m_local = EndpointAddress(&sa, SOCK_STREAM);
+                                else if (!m_local && (type & EP_SOCK_MASK) >= RAW_BASE)
+                                        m_local = EndpointAddress(&sa, SOCK_STREAM);
+                        } else {
+                                LOG_ERROR("Net", "Unable to acquire socket name")
+                        }
+
+                        // Don't need to getpeername() because its specified
+
+                } else { // not CLIENT (i.e., SERVER)
+#ifdef _EP_DEBUG
+                        std::cout << "ignoring remote address for server" << std::endl;
+#endif
+                }
+        }
+
+        // Always set IP_HDRINCL on raw sockets so we can write the IP header
+        if (m_bool && (m_type >= RAW_BASE)) {
+                int on = 1;
+                if (setsockopt(m_sockfd, IPPROTO_IP, IP_HDRINCL, (const char*)&on, sizeof(on)) < 0) {
+                        m_error_cat = EP_ERROR_SETSOCKOPT;
+                        SetLastError();
+                        //m_error_str = "setsockopt error: " + (std::string)strerror(errno);
+                }
+        }
+        return m_bool;
+}
+
+
+bool Endpoint::Accept()
+{
+        // Ok...a local address was given, do a passive open?
+        // This is not always the case, a local address can be given and
+        // the socket be an active open, although thats rare.
+        // - Only TCP servers require listen() and accept()
+        if( (m_server & SERVER) && (m_type & EP_SOCK_MASK) == TCP && m_bool == true && m_servfd >= 0 ) {
+                // Don't need to getsockname() because local endpoint is given
+                // Passive open (accept), returned sockaddr will be peer name
+                // so don't need getpeername()
+
+                // Clear out the connection socket so we don't abandon an open socket.
+                Close();
+
+                sockaddr saAcceptInfo;
+                sockaddr* sa = &saAcceptInfo;
+
+#ifdef _WIN32
+                int n;
+#else
+                unsigned int n;
+#endif
+                n = sizeof(sockaddr);
+
+
+                int newfd = accept(m_servfd, sa, &n);
+                if (newfd >= 0) {
+                        m_sockfd = newfd;
+#ifdef _EP_DEBUG
+                        std::cout << "accepted!" << std::endl;
+#endif
+                        // Set remote address to who connected.
+                        // accept() kindly returns this value (getpeername() doesn't seem to work)
+                        m_remote = EndpointAddress(sa, m_type);
+
+                        // fill in our local address info.
+                        // cannot do this until 1) the connection is accepted
+                        // and 2) until sa* is finished being used (stores
+                        // the remote address).
+                        if (getsockname( m_sockfd, sa, &n ) != 0) {
+                                m_local = EndpointAddress(sa, m_type);
+                        } else {
+                                LOG_ERROR("Net", "Unable to acquire socket name:" << strerror(errno));
+                        }
+
+                        return true;
+                } else {
+                        // accept wasn't successful
+                        m_error_cat = EP_ERROR_ACCEPT;
+                        m_bool = false;
+                        SetLastError();
+                        /*
+                        std::stringstream ss;
+                        ss << "accept() failed: " << strerror(errno);
+                        m_error_str = ss.str();
+                        */
+                }
+        }
+        return false;
+}
+
+
+int Endpoint::g_bytes_sent = 0;
+int Endpoint::g_bytes_recv = 0;
+
+// IP headers for raw sockets
+struct ep_iphdr {
+        u_int8_t ver_ihl;    // version + internet header length (or vice versa)
+        u_int8_t dscp;       // diff. services code point, was type of service (tos)
+        u_int16_t tot_len;
+        u_int16_t id;
+        u_int16_t frag_off;
+        u_int8_t ttl;
+        u_int8_t protocol;
+        u_int16_t check;
+        u_int32_t saddr;
+        u_int32_t daddr;
+        /*The options start here. */
+};
+
+// Pseudo-header for checksum purposes
+struct ep_pseudohdr {
+        u_int32_t       saddr;
+        u_int32_t       daddr;
+        u_int8_t        zero;
+        u_int8_t        protocol;
+        u_int16_t       length;
+};
+
+// Based on BSD's
+struct ep_udphdr {
+        u_short sport;               /* source port */
+        u_short dport;               /* destination port */
+        u_short ulen;                /* udp length */
+        u_short sum;                 /* udp checksum */
+};
+
+struct ep_icmphdr {
+        u_int8_t  type;
+        u_int8_t  code;
+        u_int16_t sum;
+};
+
+
+
+int Endpoint::Send(const void *msg, int len, int /*flags*/)
+{
+        unsigned int bytes_sent;
+        bytes_sent = send(m_sockfd, (const char*)msg, len, 0);
+        if( bytes_sent == (unsigned int)-1||bytes_sent==(unsigned int)0) { // error/ closed
+                m_bool = false;
+                m_error_cat = EP_ERROR_SEND;
+                SetLastError();
+                return bytes_sent;
+        }
+
+        AddBytesSent(bytes_sent);
+        return bytes_sent;
+}
+
+// Write all bytes in data
+// Returns number of bytes written
+int Endpoint::Write(std::string data)
+{
+        unsigned int bytes_left, bytes_sent;
+        bytes_left = data.length();
+
+        if( !m_bool ) {
+                return -1;
+        }
+
+        // Do not actually send 0 bytes, doing this will kill connection.
+        if( bytes_left == 0 ) {
+                return 0;
+        }
+
+        // If raw socket, include the IP header, unless its RAW_RAW
+        // (Note: raw sockets are IPv4-only, use datalink access for raw IPv6)
+        if (m_type >= RAW_BASE && m_type != RAW_RAW) {
+                char* buff = new char[8192];   // TODO: MTU
+                char* pseudobuff = new char[8192];
+                int iphdrsz = 20;              // No IP options, 20 byte IP header
+                int layer4sz;                  // Layer 4 (TCP, UDP, etc.) hdr size
+
+                switch (m_type) {
+                case RAW_UDP:
+                        layer4sz = 8;
+                        break;
+                case RAW_ICMP:
+                        layer4sz = 4;
+                        break;
+                default:
+                        layer4sz = 0;
+                        break;
+                }
+
+                // Copy data to IP buff
+                memcpy(buff + iphdrsz + layer4sz, data.data(), data.length());
+
+                // Build an IP header. Always do this if IP_HDRINCL is set.
+                ep_iphdr* iphdr = (struct ep_iphdr*)buff;
+
+#if __BYTE_ORDER == __LITTLE_ENDIAN
+                iphdr->ver_ihl = (u_int8_t) (iphdrsz >> 2 | 0x40);
+#elif __BYTE_ORDER == __BIG_ENDIAN
+                iphdr->ver_ihl = (u_int8_t) ( ((iphdrsz >> 2) << 4) | 0x4 );     // really ihl_ver
+#else
+# error "Please fix <bits/endian.h>"
+#endif
+
+                //iphdr->ihl = iphdrsz >> 2;   //  Header Length(=20 bytes)
+                //iphdr->version = 4;   // IPv4
+
+                iphdr->dscp = 8;      // Differentiated Services Field (?)
+                //iphdr->tot_len = 20 + (m_type == RAW_UDP ? 8 : 0) + data.length()
+                iphdr->tot_len = (u_int16_t) (iphdrsz + layer4sz + data.length());
+                iphdr->id = 0;        // IPID, let kernel fill it in (randomize??)
+                iphdr->frag_off = 0;  // Fragment offset & flags = not fragmented
+                iphdr->ttl = 128;     // Time to Live
+                iphdr->protocol = (u_int8_t) ( (m_type >> 1) - (RAW_BASE >> 1) );   // Next protocol
+                iphdr->check = 0;     // Checksum, filled in by kernel
+                iphdr->saddr = inet_addr(m_local.IP().c_str());      // Source &
+                iphdr->daddr = inet_addr(m_remote.IP().c_str());     // dest address
+
+                if (m_type == RAW_UDP) {
+                        ep_udphdr* udphdr = (struct ep_udphdr*)(buff + iphdrsz);
+                        ep_pseudohdr* pseudohdr = (struct ep_pseudohdr*)pseudobuff;
+
+                        udphdr->sport = htons(m_local.PortNumber());
+                        udphdr->dport = htons(m_remote.PortNumber());
+                        udphdr->sum = 0;
+                        udphdr->ulen = (u_short) htons((u_short)data.length() + 8);
+
+                        // Copy UDP header and data into pseudo header
+                        memcpy(pseudobuff + sizeof(struct ep_pseudohdr), buff + iphdrsz,
+                               layer4sz + data.length());
+
+                        pseudohdr->saddr = iphdr->saddr;
+                        pseudohdr->daddr = iphdr->daddr;
+                        pseudohdr->zero  = 0;
+                        pseudohdr->protocol = IPPROTO_UDP;
+                        pseudohdr->length = udphdr->ulen;
+
+                        // XXX: Incorrect checksum if source port is 0? Inconsistantly.
+                        // Or if we specify 0 as src addr so it gets filled in
+                        udphdr->sum = Endpoint::in_cksum((u_short*)pseudobuff,
+                                                         sizeof(struct ep_pseudohdr) + layer4sz + data.length());
+
+                } else if (m_type == RAW_ICMP) {
+                        ep_icmphdr* icmphdr = (struct ep_icmphdr*)(buff + iphdrsz);
+
+                        // Port number, upper 8 bits are type, lower are code XXX:ENDIAN
+                        icmphdr->type  = (u_int8_t) (m_remote.PortNumber() >> 8);
+                        icmphdr->code = (u_int8_t) (m_remote.PortNumber() & 0xff);
+                        icmphdr->sum  = 0;
+
+                        icmphdr->sum = Endpoint::in_cksum((u_short*)icmphdr,
+                                                          layer4sz + data.length());
+                }
+
+                int err = sendto(m_sockfd, buff, data.length()+iphdrsz+layer4sz, 0,
+                                 (sockaddr*)m_remote.ai_addr, m_remote.ai_addrlen);
+
+                if (err < 0) {
+#ifdef _EP_DEBUG
+                        std::cout << "send error: " << strerror(errno)
+                                  << std::endl;
+#endif
+                        m_bool = false;
+                        m_error_cat = EP_ERROR_SEND;
+                        SetLastError();
+                }
+
+                delete[] buff;
+                delete[] pseudobuff;
+
+                return err;
+        }
+
+        // Loop until either a) all bytes are sent b) no more bytes could be sent
+        do {
+                // XXX: shall flags be MSG_WAITALL, if supported?
+                bytes_sent = send(m_sockfd, ( data.data() + data.length() - bytes_left ), bytes_left, 0);
+
+                if (bytes_sent == (unsigned)-1||bytes_sent==(unsigned)0) { // error/ closed
+                        m_bool = false;
+                        m_error_cat = EP_ERROR_SEND;
+                        SetLastError();
+                        return bytes_sent;
+                }
+
+                //m_bytes_sent += bytes_sent;
+                //Endpoint::g_bytes_sent += bytes_sent;
+                AddBytesSent(bytes_sent);
+
+                bytes_left -= bytes_sent;
+        } while(bytes_left > 0 && bytes_sent != 0);
+
+        if (bytes_sent != data.length()) {
+#ifdef _EP_DEBUG
+                std::cout << "Socket::Write() partial write, " << bytes_sent
+                          << " != " <<
+                          data.length() << std::endl;
+#endif
+                return bytes_sent;
+        }
+        return bytes_sent;
+}
+
+
+int Endpoint::Recv(void *buf, int len, unsigned int flags)
+{
+        int returnVal;
+        returnVal = recv(m_sockfd, (char *)buf, len, flags);
+
+        // Check for conditions that may terminate reading prematurely
+        if (returnVal == -1) {      // -1  is error or EWOULDBLOCK
+                // Check if caller wanted non-blocking, and we got it
+                if (/*!m_blocking && */errno == EAGAIN)
+                        return returnVal;
+
+                // Otherwise, this is an error
+                m_bool = false;
+                m_error_cat = EP_ERROR_RECV;
+                SetLastError();
+                return -1 * returnVal;   // Error condition
+        } else if (returnVal == 0) { // 0 is EOF
+                return returnVal;
+        }
+
+        AddBytesRecv(returnVal);
+        return returnVal;
+}
+
+// Read bytes_to_read bytes into data, return FALSE if end-of-file
+// bytes_to_read=x can be either:
+// x>0 - read AT LEAST x bytes, blocking
+// x<0 - read AT MOST -x bytes, blocking
+// x=0 - Non-blocking I/O (not supported)
+// (This is copied almost verbatim from my own IPv4-only Socket)
+int Endpoint::Read(int bytes_to_read, std::string& data)
+{
+        int bytes_left      = bytes_to_read;
+        int bytes_read      = 0;
+        int bytes_just_read = 0;
+        //bool eof            = false;
+        bool read_all       = true;
+        //bool ret            = true;
+
+        if (bytes_to_read == 0) {            // Non-blocking I/O (not supported)
+#ifdef _EP_DEBUG
+                std::cout << "Error, can't read 0 bytes" << std::endl;
+#endif
+        }
+
+        if (bytes_to_read < 0) {     // Negatives = don't read all, do one call
+                bytes_left = -bytes_to_read;
+                read_all = false;
+        }
+
+        do {
+                char* buf = new char[bytes_left];
+                if (!buf) {
+#ifdef _EP_DEBUG
+                        std::cout << "OUT OF MEMORY!" << std::endl;
+#endif
+                        // force-close connection and return 0
+                        m_bool = false;
+                        m_error_cat = EP_ERROR_RECV;
+                        m_error_code = 0;
+                        m_error_str = "";
+                        Close();
+                        CloseServer();
+                        return 0;
+                }
+
+                bytes_just_read = recv(m_sockfd, (char*)buf, bytes_left, 0);
+                if (bytes_just_read > 0) {
+                        bytes_read += bytes_just_read;
+                        data += std::string(buf, bytes_just_read);
+                }
+                delete[] buf;      // TODO: Less inefficient
+
+                // Check for conditions that may terminate reading prematurely
+                if (bytes_just_read == -1) {      // -1  is error or EWOULDBLOCK
+                        // Check if caller wanted non-blocking, and we got it
+                        if (/*!m_blocking && */errno == EAGAIN)
+                                return bytes_read;
+
+                        // Otherwise, this is an error
+                        m_bool = false;
+                        m_error_cat = EP_ERROR_RECV;
+                        SetLastError();
+                        return -bytes_read;   // Error condition
+                        break;
+                } else if (bytes_just_read == 0)  // 0 is EOF
+                        return bytes_read;
+
+                bytes_left -= bytes_just_read;
+
+                // If read_all is set (the default, for + values), loop again.
+                // If not set (for - bytes_to_read values), don't loop anymore
+                if (!read_all)
+                        break;
+        } while(bytes_left != 0);
+
+        //m_bytes_recv += data.length();
+        //Endpoint::g_bytes_recv += data.length();
+        AddBytesRecv(data.length());
+
+        return bytes_read;
+}
+
+
+// Read bytes_to_read bytes into data, return FALSE if end-of-file
+// bytes_to_read=x can be either:
+// x>0 - read AT LEAST x bytes, blocking
+// x<0 - read AT MOST -x bytes, blocking
+// x=0 - Non-blocking I/O (not supported)
+// (This is copied almost verbatim from my own IPv4-only Socket)
+int Endpoint::Read(int bytes_to_read, char* buffer)
+{
+        int bytes_left      = bytes_to_read;
+        int bytes_read      = 0;
+        int bytes_just_read = 0;
+        //bool eof            = false;
+        bool read_all       = true;
+        //bool ret            = true;
+
+        if (bytes_to_read == 0) {            // Non-blocking I/O (not supported)
+#ifdef _EP_DEBUG
+                std::cout << "Error, can't read 0 bytes" << std::endl;
+#endif
+        }
+
+        if (bytes_to_read < 0) {     // Negatives = don't read all, do one call
+                bytes_left = -bytes_to_read;
+                read_all = false;
+        }
+
+        do {
+                char* buf = new char[bytes_left];
+                if (!buf) {
+#ifdef _EP_DEBUG
+                        std::cout << "OUT OF MEMORY!" << std::endl;
+#endif
+                        // force-close connection and return 0
+                        m_bool = false;
+                        m_error_cat = EP_ERROR_RECV;
+                        m_error_code = 0;
+                        m_error_str = "";
+                        Close();
+                        CloseServer();
+                        return 0;
+                }
+
+                bytes_just_read = recv(m_sockfd, (char*)buf, bytes_left, 0);
+                if (bytes_just_read > 0) {
+                        bytes_read += bytes_just_read;
+                        memcpy(buffer, buf, bytes_just_read);
+                }
+                delete[] buf;      // TODO: Less inefficient
+
+                // Check for conditions that may terminate reading prematurely
+                if (bytes_just_read == -1) {      // -1  is error or EWOULDBLOCK
+                        // Check if caller wanted non-blocking, and we got it
+                        if (/*!m_blocking && */errno == EAGAIN)
+                                return bytes_read;
+
+                        // Otherwise, this is an error
+                        m_bool = false;
+                        m_error_cat = EP_ERROR_RECV;
+                        SetLastError();
+                        return -bytes_read;   // Error condition
+                        break;
+                } else if (bytes_just_read == 0)  // 0 is EOF
+                        return bytes_read;
+
+                bytes_left -= bytes_just_read;
+
+                // If read_all is set (the default, for + values), loop again.
+                // If not set (for - bytes_to_read values), don't loop anymore
+                if (!read_all)
+                        break;
+        } while(bytes_left != 0);
+
+        //m_bytes_recv += data.length();
+        //Endpoint::g_bytes_recv += data.length();
+        AddBytesRecv(bytes_read);
+
+        return bytes_read;
+}
+
+int Endpoint::g_raw_sockfd = 0;        // create new raw socket fd for each instance by default
+
+void Endpoint::setup_raw(std::string argv0)
+{
+        Initialize();   // static method, so not normally called
+
+        // The "launch" program passes a raw socket in this environment variable,
+        // so only *it* (launch) is setuid root, thus increasing safety
+#if defined (_WINDOWS)
+#pragma warning( push )
+#pragma warning( disable : 4996 )
+#endif
+        if (getenv("RAWSOCKFD")) {
+                Endpoint::set_raw_sockfd(std::atoi(std::getenv("RAWSOCKFD")));
+#ifdef _EP_DEBUG
+                std::cout << "Using raw #" << std::atoi(std::getenv("RAWSOCKFD")) << std::endl;
+#endif
+                return;
+        }
+#if defined (_WINDOWS)
+#pragma warning ( pop)
+#endif
+
+        int rawfd = socket(AF_INET, SOCK_RAW, IPPROTO_RAW);
+
+        // Don't bother getuid() on Win32
+#ifdef _WIN32
+#define getuid() -1
+#endif
+
+        if (rawfd < 0) {
+#ifdef _EP_DEBUG
+                std::cout << "Couldn't create raw socket." << rawfd << std::endl;
+#endif
+#ifndef _WIN32
+                if (getuid() != 0) {
+                        std::cout << "You are not running as root. Please set the setuid "
+                                  "bit by typing:\nchmod 4755 " << argv0 << std::endl
+                                  << "and try again. Root priviledges will be dropped "
+                                  "after the raw socket is created." << std::endl;
+                } else {
+                        std::cout << "You ARE running as root, but creation of the raw "
+                                  "socket failed anyways.\n\nMaybe check your TCP/IP "
+                                  "stack?" << std::endl;
+                }
+#else
+                // TODO: Use winpcap's pcap_send, works on all platforms
+                std::cout << "You are running the Win32 build.\n" << std::endl
+                          << "Please note that only Windows XP/2000 are supported."
+                          << std::endl << std::endl
+                          << "Windows NT3/Me/98/95 do not have the required "
+                          << "capabilities to use raw sockets." << std::endl
+                          << "Also, you must have administrator priviledges. Under NT4, you can run\n"
+                          << "ntadmraw.reg to enable non-admin raw sockets. Under XP Home Edition, \n"
+                          << "all users are Admin by default and should have no problems. Test if \n"
+                          << "you have raw socket capabilities by going here: " << std::endl
+                          << "http://news.grc.com/files/sockettome.exe - make sure this works"<<std::endl
+                          << "(Note: do not install GRC's SocketLock; this program will not work)."
+                          << std::endl;
+#endif
+                //exit(-1);
+                return;
+        }
+
+        // Comment this out when debugging, then you can do: sudo gdb sumiserv
+#if !defined(_WINDOWS)
+        if (getuid() == 0) {
+                std::cout << "Please run with effective user root, and a real non-root user." << std::endl
+                          << "This is required for security purposes.\n" << std::endl
+                          << "To do this, set the setuid bit on this file: chmod 4755 "
+                          << argv0 << std::endl
+                          << "Also, make sure the owner is root: chown root " << argv0
+                          << std::endl;
+                //exit(-2);
+                close(rawfd);
+                return;
+        }
+#endif
+
+        // Set to real user ID so any further bugs won't compromise root
+#ifndef _WIN32
+        if (setuid(getuid()) < 0) {
+                LOG_ERROR("Net", "Error dropping privileges:" << strerror(errno));
+        }
+
+#endif
+
+        Endpoint::set_raw_sockfd(rawfd);
+
+        std::cout << "Now running as user " << getuid() << " with socket "
+                  << Endpoint::get_raw_sockfd() << std::endl;
+}
+
+// Initialize system-wide socket library if necessary
+void Endpoint::Initialize()
+{
+
+}
+
+bool Endpoint::Close()
+{
+        EndpointAddress blank;
+        m_remote = blank;
+        if( m_sockfd >= 0 ) {
+#ifdef _WIN32
+                closesocket ( m_sockfd );
+#else
+                close ( m_sockfd );
+#endif
+        }
+        m_sockfd = -1;
+        return true;
+}
+
+void Endpoint::Shutdown(EP_Mode mode)
+{
+        switch(mode) {
+        case INPUT:
+                shutdown(m_sockfd, 0);
+                break;
+        case OUTPUT:
+                shutdown(m_sockfd, 1);
+                break;
+        case BOTH:
+                shutdown(m_sockfd, 2);
+                break;
+        }
+}
+
+void Endpoint::ShutdownSocket(int socketID, EP_Mode mode)
+{
+        switch(mode) {
+        case INPUT:
+                shutdown(socketID, 0);
+                break;
+        case OUTPUT:
+                shutdown(socketID, 1);
+                break;
+        case BOTH:
+                shutdown(socketID, 2);
+                break;
+        }
+}
+
+bool Endpoint::CloseServer()
+{
+        if( m_servfd >= 0 ) {
+#ifdef _WIN32
+                closesocket ( m_servfd );
+#else
+                close ( m_servfd );
+#endif
+        }
+        m_servfd = -1;
+        return true;
+}
+
+#ifdef _WIN32
+
+std::string convertUTF16toUTF8(const wchar_t* source, unsigned sourceLength)
+{
+#if defined(WIN32) && !defined(__CYGWIN__)
+        if (sourceLength == 0) {
+                return std::string();
+        }
+
+        int destLen = WideCharToMultiByte(CP_UTF8, 0, source, sourceLength, 0, 0, 0, 0);
+        if (destLen <= 0) {
+                std::cerr << "Cannot convert UTF-16 string to UTF-8." << std::endl;
+                return std::string();
+        }
+
+        std::string sDest(destLen, '\0');
+        destLen = WideCharToMultiByte(CP_UTF8, 0, source, sourceLength, &sDest[0], destLen, 0, 0);
+
+        if (destLen <= 0) {
+                std::cerr << "Cannot convert UTF-16 string to UTF-8." << std::endl;
+                return std::string();
+        }
+
+        return sDest;
+#else
+        //TODO: Implement for other platforms
+        osg::notify(osg::WARN) << "ConvertUTF16toUTF8 not implemented." << std::endl;
+        return std::string();
+#endif
+}
+
+
+#endif
+
+
+Endpoint::~Endpoint()
+{
+        Close();
+        CloseServer();
+}
+
+int Endpoint::SetLastError()
+{
+#ifdef _WIN32
+        m_error_code = WSAGetLastError();
+
+        LPVOID lpMsgBuf;
+        FormatMessage(
+                FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
+                NULL,
+                m_error_code,
+                MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
+                (LPTSTR) &lpMsgBuf,
+                0,
+                NULL );
+
+        std::wstring wstr = (WCHAR*)lpMsgBuf;
+
+        m_error_str = convertUTF16toUTF8(wstr.c_str(), wstr.size()); //.assign((const char*)lpMsgBuf);
+        LocalFree(lpMsgBuf);
+#else
+        m_error_code = errno;
+        m_error_str =  strerror(errno);
+#endif
+        return m_error_code;
+}
+
+
+/* Obtained from source code from _Unix Network Programming_ by *
+ * W. Richard Stevens. www.kohala.com/start/unpv12e.html for download. */
+
+unsigned short
+Endpoint::in_cksum(unsigned short *addr, int len)
+{
+        int				nleft = len;
+        int				sum = 0;
+        unsigned short	*w = addr;
+        unsigned short	answer = 0;
+
+        /*
+         * Our algorithm is simple, using a 32 bit accumulator (sum), we add
+         * sequential 16 bit words to it, and at the end, fold back all the
+         * carry bits from the top 16 bits into the lower 16 bits.
+         */
+        while (nleft > 1)  {
+                sum += *w++;
+                nleft -= 2;
+        }
+
+        /* 4mop up an odd byte, if necessary */
+        if (nleft == 1) {
+                *(unsigned char *)(&answer) = *(unsigned char *)w ;
+                sum += answer;
+        }
+
+        /* 4add back carry outs from top 16 bits to low 16 bits */
+        sum = (sum >> 16) + (sum & 0xffff);	/* add hi 16 to low 16 */
+        sum += (sum >> 16);			/* add carry */
+        answer = (unsigned short)~sum;				/* truncate to 16 bits */
+        return(answer);
+}
+
+/*
+    int join(std::string mcastaddr, std::string interface = "0");
+    int leave(std::string mcastaddr, std::string interface = "0");
+    int mcast_options(std::string outgoing_if, int ttl = 1, int loop = 1);
+*/
+
+#if 0
+#include <net/if.h>        // for ifreq
+#include <sys/sockio.h>    // for SIOCGIFADDR
+
+int Endpoint::join(std::string mcastaddr, std::string ifname)
+{
+        int sockfd = m_sockfd;
+        EndpointAddrlist addrlist(mcastaddr + ":0");
+        sockaddr sa_referent = addrlist.GetAddress();
+        sockaddr* sa = &sa_referent;
+        int n;
+
+// from UNP, slightly modified
+
+        switch (sa->sa_family) {
+        case AF_INET: {
+                struct ip_mreq          mreq;
+                struct ifreq            ifreq;
+
+                memcpy(&mreq.imr_multiaddr,
+                       &((struct sockaddr_in *) sa)->sin_addr,
+                       sizeof(struct in_addr));
+
+                /* if (ifname.length()) {
+                     // modified
+                     strncpy(ifreq.ifr_name, ifname.c_str(), IFNAMSIZ);
+                     if (ioctl(sockfd, SIOCGIFADDR, &ifreq) < 0)
+                     {
+                #ifdef _EP_DEBUG
+                            std::cout << "ioctl: SIOCGIFADDR failed"
+                                      << std::endl;
+                #endif
+                            return(-1);
+                     }
+                     memcpy(&mreq.imr_interface,
+                           &((struct sockaddr_in *) &ifreq.ifr_addr)->sin_addr,
+                           sizeof(struct in_addr));
+                } else */
+                mreq.imr_interface.s_addr = htonl(INADDR_ANY);
+
+                n = (setsockopt(sockfd, IPPROTO_IP, IP_ADD_MEMBERSHIP,
+                                &mreq, sizeof(mreq)));
+                if (n != 0) {
+#ifdef _EP_DEBUG
+                        std::cout << "setsockopt join: " <<
+                                  strerror(errno) << std::endl;
+#endif
+                        return n;
+                }
+                return 0;
+        }
+                /* end mcast_join1 */
+
+                /* include mcast_join2 */
+#ifdef  IPV6
+        case AF_INET6: {
+                struct ipv6_mreq        mreq6;
+
+                memcpy(&mreq6.ipv6mr_multiaddr,
+                       &((struct sockaddr_in6 *) sa)->sin6_addr,
+                       sizeof(struct in6_addr));
+
+                if (ifindex > 0)
+                        mreq6.ipv6mr_interface = ifindex;
+                else if (ifname != NULL)
+                        if ( (mreq6.ipv6mr_interface = if_nametoindex(ifname)) == 0) {
+                                errno = ENXIO;  /* if name not found */
+#ifdef _EP_DEBUG
+                                std::cout << "ENXIO ifname not found"
+                                          << std::endl;
+#endif
+                                return(-1);
+                        } else
+                                mreq6.ipv6mr_interface = 0;
+
+                // XXX: IPV6_ADD_MEMBERSHIP -> IPV6_JOIN_GROUP
+                n = setsockopt(sockfd, IPPROTO_IPV6, IPV6_JOIN_GROUP,
+                               &mreq6, sizeof(mreq6));
+                if (n != 0) {
+#ifdef _EP_DEBUG
+                        std::cout << "setsockopt failure: " << strerror(errno)
+                                  << std::endl;
+#endif
+                }
+#ifdef _EP_DEBUG
+                std::cout << strerror(errno) << std::endl;
+#endif
+                return n;
+        }
+#endif
+
+        default:
+                errno = EPROTONOSUPPORT;
+#ifdef _EP_DEBUG
+                std::cout << "join: protocol not supported" << std::endl;
+#endif
+                return(-1);
+        }
+}
+
+
+
+*/
+#endif
diff --git a/cadxcore/endpoint/endpoint.h b/cadxcore/endpoint/endpoint.h
new file mode 100644
index 0000000..7f2bd33
--- /dev/null
+++ b/cadxcore/endpoint/endpoint.h
@@ -0,0 +1,240 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __EP_ENDPOINT_H
+#define __EP_ENDPOINT_H
+
+#include <iostream>
+#include <sstream>
+#include <string>
+#include <vector>
+
+#include <sys/types.h>
+#include <errno.h>
+#include <fcntl.h>
+
+#include "protocols.h"
+#include "address.h"
+
+#ifdef _WIN32
+typedef unsigned char  u_int8_t;
+typedef unsigned short u_int16_t;
+typedef unsigned int   u_int32_t;
+#endif
+
+// Used for Endpoint connection options, mainly Accept().
+#define NOACCEPT 	4
+#define DOACCEPT 	6
+
+
+#define EP_ERROR_NONE        0
+#define EP_ERROR_SOCKET      1
+#define EP_ERROR_BIND        2
+#define EP_ERROR_ACCEPT      3
+#define EP_ERROR_SETSOCKOPT  4
+#define EP_ERROR_CONNECT     5
+#define EP_ERROR_ADDRESS     6
+#define EP_ERROR_GETPEERNAME 7
+#define EP_ERROR_SEND        8
+#define EP_ERROR_RECV        9
+// 100+ defined in address.h
+
+
+class Endpoint
+{
+public:
+
+        typedef enum EP_Mode {
+                INPUT,
+                OUTPUT,
+                BOTH
+        } EP_Mode;
+
+        Endpoint();
+
+        // Each of these functions have an int appended to the end of
+        // their constuctors, for determining if we should automatically
+        // connect() or accept().
+        Endpoint( int type, std::string hostname, int service, int options = DOACCEPT );
+
+        // type-hostname-service deprecated in favor of type-remote-local
+        //Endpoint(int type, std::string hostname, std::string service = "")
+        //    { Create(type, hostname, service); }
+        Endpoint( int type, std::string remote, std::string local, int options = DOACCEPT );
+
+        // This constructor does not need the options parameter because it would
+        // conflict with the above Endpoint( int, std::string, int, int=DOACCEPT )
+        Endpoint( int type, std::string address );
+
+        Endpoint( int type, std::string remotehost, std::string remoteservice,
+                  std::string localhost, std::string localservice, int options = DOACCEPT );
+        Endpoint( int type, const EndpointAddrlist& address, int options = DOACCEPT );
+        Endpoint( int type, const EndpointAddrlist& local, const EndpointAddrlist& remote, int options = DOACCEPT );
+
+
+        bool Create( int type, const EndpointAddrlist& address, int options = DOACCEPT );
+        bool Create( int type, const EndpointAddrlist& remote, const EndpointAddrlist& local, int options = DOACCEPT );
+        bool Create( int type, std::string host, std::string service, int options = DOACCEPT );
+        bool Create( int type, std::string remotehost, std::string remoteservice,
+                     std::string localhost, std::string localservice, int options = DOACCEPT );
+
+        virtual ~Endpoint();
+        bool Close();
+        void Shutdown(EP_Mode mode);
+        static void ShutdownSocket(int socketID, EP_Mode mode);
+        bool CloseServer();
+        bool Accept();
+
+        operator bool()
+        {
+                return m_bool;
+        }
+        operator std::string()
+        {
+                return Connection();
+        }
+        std::string Connection()
+        {
+                return m_local.IPPort() + " <--> " + m_remote.IPPort();
+        }
+        std::string Server()
+        {
+                return m_local_server.IPPort();
+        }
+
+        int Send(const void *msg, int len, int flags);
+        int Write(std::string);      // Returns number of bytes written
+        int Recv(void *buf, int len, unsigned int flags);
+        int Read(int, std::string&);  // Returns number of bytes read
+        int Read(int, char* buffer);  // Returns number of bytes read
+
+
+        void SetOptOn(int level, int opt)
+        {
+                char on = 1;
+                setsockopt(m_sockfd, level, opt, &on, sizeof(on));
+        }
+
+        void AddBytesRecv(int n)
+        {
+                m_bytes_recv += n;
+                g_bytes_recv += n;
+        }
+        void AddBytesSent(int n)
+        {
+                m_bytes_sent += n;
+                g_bytes_sent += n;
+        }
+        int GetBytesRecv()
+        {
+                return m_bytes_recv;
+        }
+        int GetBytesSent()
+        {
+                return m_bytes_sent;
+        }
+        int GetAllBytesRecv()
+        {
+                return g_bytes_recv;
+        }
+        int GetAllBytesSent()
+        {
+                return g_bytes_sent;
+        }
+
+        std::string Stats()
+        {
+                std::stringstream ss;
+                ss << GetBytesRecv() << " / " << GetBytesSent()
+                   << std::endl
+                   << GetAllBytesRecv() << " / "
+                   << GetAllBytesSent() << std::endl;
+                return ss.str();
+        }
+
+        int m_sockfd;
+        int m_servfd;
+
+        bool m_bool;
+        int m_error_cat;
+        int m_error_code;
+        std::string m_error_str;
+
+        int m_type;
+        int m_server;
+        int m_family;
+
+        EndpointAddress m_remote;
+        EndpointAddress m_local;
+
+        // Only used with TCP | SERVER
+        EndpointAddress m_local_server;
+
+        // Multicast functions
+        // No special function needed to send to an mcast addr, ex. 226.1.1.2:2000
+        //int join(std::string mcastaddr, std::string interface = "0");
+        //int leave(std::string mcastaddr, std::string interface = "0");
+        int mcast_options(std::string outgoing_if, int ttl = 1, int loop = 1);
+
+        static void Initialize();
+
+        static unsigned short in_cksum(unsigned short *addr, int len);
+
+        static int set_raw_sockfd(int n)
+        {
+                return g_raw_sockfd = n;
+        }
+        static int get_raw_sockfd()
+        {
+                return g_raw_sockfd;
+        }
+
+        // Handles creation of one raw socket & dropping of root
+        static void setup_raw(std::string argv0);
+private:
+
+        int m_bytes_sent;
+        int m_bytes_recv;
+
+        // Static data that applies to all instances of this class
+        static int g_bytes_sent;
+        static int g_bytes_recv;
+
+        // If this is non-zero, it will be used instead of a call to
+        // socket() for raw sockets. The idea is to re-use one raw
+        // socket created when the program started (code to do this in SUMI,
+        // TODO: maybe move it here) so root privs can be dropped.
+        // XXX: Unfortunately, the pipe breaks after multiple sends.
+        // XXXX: Can't sendto() multiple times?
+        static int g_raw_sockfd;          // Socket descriptor to use for raw sockets
+
+        int SetLastError();
+};
+
+struct Interface {
+        bool up, bcast, loopback, p2p, mcast;
+        std::string address;
+        std::string broadcast;
+        std::string netmask;
+};
+bool Network_Interfaces(std::vector<Interface>& is);
+
+#endif
+
diff --git a/cadxcore/endpoint/endpoint.html b/cadxcore/endpoint/endpoint.html
new file mode 100644
index 0000000..82ab876
--- /dev/null
+++ b/cadxcore/endpoint/endpoint.html
@@ -0,0 +1,271 @@
+<html>
+<head>
+<title>Endpoint</title>
+</head>
+<body>
+<h1>Endpoint C++ Socket Library</h1>
+<p>Endpoint is a C++ class which uses Berkeley sockets to communicate with
+hosts via the Internet, through IPv4 or IPv6, using TCP or UDP or raw IP,
+on Win32 or Unix operating systems. Originally written for developing
+peer-to-peer applications, the simple philosophy behind Endpoint
+is of <i>choice</i> and <i>portability</i> and <i>consistency</i>:
+
+<ul>
+<li><b>Protocol-family independence</b> - IPv4 or IPv6, transparently
+<li><b>Socket-type independence</b> - UDP or TCP, client or server created similarly
+<li><b>Platform-indepedence</b> - works on Win32 and Unix
+</ul>
+
+<p>Additionally, <b>data is data</b>. It shouldn't matter how it gets there,
+via IPv4 or IPv6, on a Win32 or Unix platform. The addressing and connection
+establishment is the tough part, which this class hierarchy tries to address.
+New protocol family-independent calls are used, nullifying the need to port
+to IPv6 once IPv6 becomes more widely used.
+
+<p>Also, Endpoint is to be optimized for typical cases, while still
+retaining desired functionality. Byte counters are an example of this,
+as is multiple addresses per host. In the future, perhaps multicasting will
+be transparently available.
+
+<p><b>For more information, read below or refer to
+<a href="tricks.html">Tips and Tricks</a> or the
+<a href="address.html">EndpointAddress documentation</a>. To download,
+go to <a href="http://sourceforge.net/project/showfiles.php?group_id=115933&package_id=125829">file releases</a>.</b>
+
+<p>
+
+<h2>Platforms</h2>
+<p>Endpoint has been compiled and tested successfully on the following
+operating systems:
+<ul>
+<li>FreeBSD 5.1-CURRENT, G++ 3.3.1
+<li>FreeBSD 4.8-STABLE, G++ 2.95.4
+<li>Microsoft Windows XP, VC++ 6.0 - raw sockets tested
+<li>Microsoft Windows 2000, VC++ 6.0
+<li>Microsoft Windows Me, VC++ 6.0
+</ul>
+<p>Portability is a major goal. Testers welcome.
+
+<h2>Feature List</h2>
+<p>Currently:
+<ul>
+<li>UDP, TCP, IPv4 raw sockets
+<li>Active or passive open (CLIENT or server)
+<li>Protocol independence
+<li>IPv4 or IPv6 with automatic getaddrinfo() DNS resolution
+<li>Automatic creation IPv4 header for raw sockets unless RAW_RAW given
+<li>Automatic creation of UDP header for RAW_UDP sockets, with proper ports
+<li>Automatic creation of ICMP header, "code,type" dest port specification
+<li>Optional <tt>Endpoint::g_raw_sockfd</tt>, set this to a raw socket
+    descriptor and all raw sockets will use it. Allows Endpoint to be ran
+    without root priviledges. Can also be passed through <tt>RAWSOCKFD</tt>
+    environment variable if <tt>setup_raw()</tt> is called first.
+<li>Socket options, SetOptOn, uses setsockopt
+<li>Error handling
+</ul>
+
+<p>Not implemented (yet):
+<ul>
+<li>A pluggable mechanism for registering creation of new layer-4 raw protocols
+    so for example, create_igmp() creates raw IGMP packet headers. Extensive
+    as possible. (Currently only UDP and ICMP create headers for you).
+    Perhaps 
+<a href="http://www.packetfactory.net/Projects/Libnet/">Libnet</a> would be
+better for this purpose.
+<li>A shorter method of creating RAW sockets. Endpoint ep(RAW);
+<li>Easily usable I/O: ep << "foo"; ep >> input. Stream compatible.
+<li>Optional everything - optional service names
+<li>IP options - rarely used, but would be nice to have (long fat pipe)
+<li>readfrom/sendto - with null sockaddr by default?
+<li>readv, writev, recvmsg, sendmsg - perhaps
+<li>IPv6 raw sockets - no such thing
+<li>Datalink access - could use libpcap but not socket interface portably
+<li>Out-of-band data/urgent data for TCP - rarely used
+<li>Application-layer protocols - belong in other classes, but todo
+<li>Non-blocking I/O - not very efficient, existed in earlier versions but
+    was taken out
+<li>Signal-driven I/O - blah
+<li>select and poll - hows this fit in?
+<li>Unix Domain Sockets - although useful, not completely portable (Win32)
+<li>Routing Sockets - no datalink access yet so can't be done, belongs in app
+<li>Broadcast
+<li>Multicast - I like it, should perhaps be implemented, but not much support
+<li>threading - belongs in client app
+<li>XTI - never
+</ul>
+
+<h1>Endpoint Class</h1>
+This class implements a "socket", a single endpoint connected to another
+endpoint. Member variables m_remote and m_local represent these; they are 
+of type EndpointAddrinfo.
+
+<h2>Constructors</h2>
+<ul>
+<li>Endpoint::Endpoint(int type, EndpointAddrlist addr)
+<li>Endpoint::Endpoint(int type, string hostname, string service = "")
+<li>Endpoint::Endpoint(int type, EndpointAddrlist remote, EndpointAddrlist local)
+<li>Endpoint::Endpoint(int type, string remotehost, string remoteservice,
+    string localhost, string localservice)
+</ul>
+<p>The one-address constructors interpret the address as local if <tt>type</tt>
+specifies a server, remote if client -- and then calls the two-address constructor.
+The string parameters just create <tt>EndpointAddrlist</tt>s and pass them to the
+others. Each constructor is implemented as a <tt>Create</tt> method, the real
+constructor simply calls this. Notice how address lists as opposed to a single
+address are passed: if the first one fails, the others are tried; m_local and
+m_remote are set to the connected <tt>EndpointAddress</tt>es.
+
+<h3>int type</h3>
+<p>Specifies protocol and client/server, see address.html.
+
+<h3>string hostname</h3>
+<p>See address.html. For clients, this is the remote
+address, for servers, this is the local address.
+
+<h3>string service</h3>
+<p>Default service, see above.
+
+<h2>operator string()</h2>
+<p>Returns the socket pair as a string, for example:
+"127.0.0.1:8000 <--> 127.0.0.1:3402". The local address
+is shown first followed by the foreign address. Invalid addresses are shown as 
+"(invalid)".
+
+<h2>operator bool()</h2>
+<p>Returns true if is connected (m_bool member variable). More useful with
+TCP sockets than UDP sockets. connect() rarely fails with UDP sockets; you'll
+usually be notified of a UDP port being closed when you try to write to it. If
+you want to make sure, write a 0-byte packet and abort if it fails. Endpoint
+doesn't do this for you because that might interfere with the data.
+
+<h2>bool Write(string)</h2>
+<p>Writes all data in string, looping if necessary. Calls send(). If any
+of the send() calls returns -1, returns false. This means the remote host
+closed the connection, and if you try to send more you'll cause a SIGPIPE
+on Unix.
+
+<h2>std::string Stats()</h2>
+<p>Return a string of various statistics of the socket usage.
+You can also call the socket-wide <tt>GetBytesRecv()</tt>,
+<tt>GetBytesSent()</tt>, or application-wide
+<tt>GetAllBytesRecv()</tt> and
+<tt>GetAllBytesSent()</tt> calls individually.
+
+<h2>int m_error_code; std::string m_error_str</h2>
+<p>Error codes and error strings. Check these if !ep (m_bool=false). 
+Defined values for
+<tt>m_error_code</tt> are EP_ERROR_NONE, EP_ERROR_SOCKET, EP_ERROR_BIND,
+EP_ERROR_ACCEPT, EP_ERROR_SETSOCKOPT, EP_ERROR_CONNECT, EP_ERROR_ADDRESS,
+and the EndpointAddrlist error EP_ERROR_GETADDRINFO. Each code corresponds to
+the system call where an error occured.
+<tt>m_error_str</tt> is a descriptive, human readable string of the error,
+suitable for printing. If Endpoint attempts to create an EndpointAddrlist and
+fails, the error will propagate into these variables.
+
+<h2>static int set_raw_sockfd(int fd)</h2>
+<p>Set the socket descriptor <tt>g_raw_sockfd</tt> used for raw sockets, to fd.
+Useful for, on Unix, separating the <tt>socket()</tt> call (which usually has
+to run as root) with the rest of the application code.
+
+<h2>static void Initialize()</h2>
+<p>Initialize the socket library. Necessary on Win32; this function is called
+upon the first instanciation of an Endpoint object. On other platforms,
+nothing happens.
+
+<h1>References</h1>
+<p>Endpoint isn't the only C++ class to utilize TCP/IP sockets, nor does
+it claim to be the best. Below are other C++ classes whose purpose is the
+same as or similar to that of Endpoint's, so one can learn from them.
+
+
+<dl>
+<dt>Microsoft Foundation Classes' <i>CSocket</i></dt>
+<dd>See <a href="http://tangentsoft.net/wskfaq/articles/csocket.html">CSocket Considered Harmful</a>, problems with being asynchronous and synchronous<p></dd>
+
+<dt><a href="http://nmstl.sourceforge.net/doc/apiuc/classSocket.html">NMSTL's <i>Socket</i></a>
+<dd>Part of the "Networking, Messaging, Servers, and Threading Library",
+seems to be just a thin wrapper.<p></dd>
+
+<dt><a href="http://www.ddj.com/documents/s=7157/ddj0206a/0206a.htm">Jason 
+But's <i>SocketCC</i></a></dt>
+<dd>IPv4, IPv6, UDP, TCP, <i>SocketException</i>, <i>IPAddress</i>, several
+classes for TCP and UDP. No Win32 support, targetted at Linux.<p></dd>
+</dl>
+
+<dt><a href="http://www.cs.wustl.edu/~schmidt/cs544/socket2.html">ACE Sockets</a>
+<dd>Not much information<p></dd>
+
+<dt><a href="http://www.drclue.net/F1.cgi/HTML/SOCKETS/SOCKETS.html">Dr. Clue's <i>Socket</i></a></dt>
+<dd>Looks comprehensive, but no Win32 support.<p></dd>
+
+<dt><a href="http://www.adp-gmbh.ch/win/misc/sockets.html">Rene Nyffenegger's <i>Socket</i> for Win32</a></dt>
+<dd>SocketServer, SocketSelect, UDP. Win32 (WinSock2) only<p></dd>
+
+<dt><a href="http://members.aon.at/hstraub/linux/socket++/">Socket++</a></dt>
+<dd>"Socket++ is a family of C++ classes that gives the same interface as the iostream classes for input and output for communication between processes.", has Internet socks as well as Unix domain, implements Echo and SMTP example "protocol" classes, no IPv6. RedHat, Debian, FreeBSD, WinSock(?). Wrappers provided for pipe(), socketpair(), popen() and fork(). GPL'd. "Socket++ is a iostream like C++ class library for UNIX and INET domains of sockets and protocols.".<p></dd>
+
+<dt><a href="http://libsocket.sourceforge.net/">libsocketcpp</a></dt>
+<dd>"Libsocketcpp provides a easy-to-use C++ class. With this class, TCP and UDP functionality can be added to any program quickly and easily." XXX<p></dd>
+
+<dt><a href="http://www.rfc1149.net/devel/adasockets">AdaSockets</a></dt> - non-C++ (Ada)
+<dd>"AdaSockets allows Ada programmers to use sockets from within their programs with an easy-to-use Ada-friendly interface." XXX<p></dd>
+
+<dt><a href="http://www.ruby-lang.org/raa/list.rhtml?name=tcpsocketpipe">Ruby/TCPSocketPipe</a> - non-C++ (Ruby)</dt>
+<dd>"A Ruby library to create I/O pipes for TCP socket tunneling" XXX<p></dd>
+
+<dt><a href="http://tangentsoft.net/endpoint/">The Endpoint Library</a></dt>
+<dd>An MFC, WinSock 1.1 socket library from 1997. Not to be confused with
+the Endpoint C++ Socket Library.
+</dl>
+
+
+<li><i>Unix Network Programming</i> - <b>a must</b>
+<li><a href="http://www.ecst.csuchico.edu/~beej/guide/net/html/">Beej's Guide to Network Programming</a> - an excellent tutorial, good overview
+<li><a href="http://world.std.com/~jimf/papers/sockets/sockets.html">BSD Sockets: A Quick And Dirty Primer</a>
+</ul>
+
+<h1>Frequently Asked Questions</h1>
+<h2>On Win32, where is the inet_ntop function?</h2>
+<p>WinSock is missing this function. The implementation from BIND is
+included in <tt>inet_ntop.c</tt>. You can link to <tt>inet_ntop_ipv4.c</tt>
+if you only want IPv4 and want to save a little space, but in general
+<tt>inet_ntop.c</tt> is preferred. Add this file to your project if you
+get an <tt>error LNK2001: unresolved external symbol _inet_ntop</tt>.</p>
+
+<h2>On Win32, I get an error saying <tt>getaddrinfo</tt> or <tt>addrinfo</tt>
+is not found, what can I do?</h2>
+<p>You need to download the <i>core</i> "Microsoft Platform SDK" which includes
+this function. Ask Google for where to download this. Copy the files from "include"
+to your Microsoft Visual Studio "include" directory, overwriting them. The compile should now work.
+
+<h2>On Win32, I get tons of link errors, how do I fix it?</h2>
+<p>You need to link with <tt>ws2_32.lib</tt>, and the object files of
+<tt>endpoint.cpp</tt>, <tt>address.cpp</tt>, and <tt>inet_ntop.c</tt>. Also
+link to <tt>ws2_32.lib</tt> under Project -> Settings -> Link -> General
+-> Object/library modules.
+
+<h2>On Win32, should I include support for "Windows Sockets" in the MFC
+  AppWizard?</h2>
+<p>Unfortunately, no, as the afxsock.h header will conflict with Endpoint.
+If you created a project with WOSA support, you can fix it by removing 
+#include <afxsock.h> from stdafx.h and replacing AfxSocketInit() with
+Endpoint::Initialize(). Also, you may have to change the precompiled header
+option (Project -> Settings -> C++ -> Category=Precompiled Headers) from
+"Use precompiled header file (.pch" to "Automatic use of precompiled
+headers" through stdafx.h. Endpoint doesn't include stdafx.h.
+
+<h2>On Win32, I get <tt>fatal error C1189: #error :  WINDOWS.H already 
+included.  MFC apps must not #include <windows.h></tt>.</h2>
+<p>Include endpoint.h in stdafx.h, <i>after</i> the normal afx includes.
+
+<h2>Are raw sockets supported on Win32?</h2>
+<p>Yes, provided your version supports it (Windows XP or Windows 2000). You
+may be able to create raw sockets as normal users.
+
+<h1>About the Author</h1>
+<p><a href="http://sourceforge.net/users/jeffconnelly">Jeff Connelly</a>. Comments, questions, and criticism welcome.</p>
+
+<p>Happy hacking!
+</body>
+</html>
+
diff --git a/cadxcore/endpoint/eptest/chat/chat.cpp b/cadxcore/endpoint/eptest/chat/chat.cpp
new file mode 100644
index 0000000..1cb27cc
--- /dev/null
+++ b/cadxcore/endpoint/eptest/chat/chat.cpp
@@ -0,0 +1,75 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <iostream>
+#include "endpoint.h"
+
+
+using namespace std;
+
+Endpoint make_server();
+Endpoint make_client(string);
+
+int main(int argc, char** argv)
+{
+        Endpoint::Initialize();
+        EndpointAddrlist::g_default_family = AF_INET;
+
+        if (argc != 2) {
+                cout << "usage: " << argv[0] << " next-host" << endl;
+                return -1;
+        }
+
+        string strPeer = argv[1];
+
+        if (strPeer[0] == '-') {
+                make_server();
+                make_client(strPeer.substr(1));
+        } else {
+                make_client(strPeer);
+                make_server();
+        }
+
+        return 0;
+}
+
+Endpoint make_server()
+{
+        Endpoint ep(TCP | SERVER, "localhost:8000");
+        if (!ep) {
+                cout << "problem starting server" << endl;
+                exit(-2);
+        }
+        cout << "server started" << endl;
+
+        return ep;
+}
+
+Endpoint make_client(string strPeer)
+{
+        Endpoint ep(TCP | CLIENT, strPeer, "8000");
+        if (!ep) {
+                cout << "problem connecting to peer" << endl;
+                exit(-2);
+        }
+        cout << "connected to peer" << endl;
+
+        return ep;
+}
diff --git a/cadxcore/endpoint/eptest/eptest.cpp b/cadxcore/endpoint/eptest/eptest.cpp
new file mode 100644
index 0000000..b991341
--- /dev/null
+++ b/cadxcore/endpoint/eptest/eptest.cpp
@@ -0,0 +1,93 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <iostream>
+
+
+
+using namespace std;
+
+
+
+#include "../endpoint.h"
+
+
+
+int main(int argc, char* argv[])
+
+{
+
+        Endpoint::Initialize();
+
+
+
+        Endpoint ep(UDP | SERVER, "0.0.0.0:80");
+
+        //Endpoint ep(TCP | CLIENT, EndpointAddrlist("10.0.0.2:8000"));
+
+        if (!ep)
+
+        {
+
+                cout << "Couldn't connect" << endl;
+
+                return -2;
+
+        }
+
+
+
+        cout << string(ep) << endl;
+
+
+
+        string buf;
+
+        ep.Read(-1024, buf);
+
+        cout << buf << endl;
+
+        //while(int n=ep.Write("hello world\n")){
+
+        //}
+
+
+
+        cout << "ok done" << endl;
+
+
+
+        cout << ep.GetAllBytesSent() << " / " << ep.GetAllBytesRecv() << endl;
+
+
+
+        return 0;
+
+
+
+
+
+        return 0;
+
+}
+
+
+
diff --git a/cadxcore/endpoint/eptest/irc.cpp b/cadxcore/endpoint/eptest/irc.cpp
new file mode 100644
index 0000000..e6ae84c
--- /dev/null
+++ b/cadxcore/endpoint/eptest/irc.cpp
@@ -0,0 +1,48 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+#include <iostream>
+
+#include "endpoint.h"
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#undef THIS_FILE
+static char THIS_FILE[] = __FILE__;
+#endif
+
+int main()
+{
+        Endpoint ep(TCP | CLIENT, "[127.0.0.1]:6667");
+        string str;
+
+        ep.Write("NICK jeff2\015\012");
+        ep.Write("USER blah blah blah :blahs\015\012");
+
+        while(ep.Read(-200, str)) {
+                std::cout << str;
+                if (str.find("376") != string::npos) {  // End of /MOTD
+                        ep.Write("MODE jeff2 +ix\015\012");
+                        ep.Write("PRIVMSG jeff :hello world\015\012");
+                }
+                str = "";
+        }
+
+        return 0;
+}
diff --git a/cadxcore/endpoint/eptest/test.cpp b/cadxcore/endpoint/eptest/test.cpp
new file mode 100644
index 0000000..d6bd803
--- /dev/null
+++ b/cadxcore/endpoint/eptest/test.cpp
@@ -0,0 +1,75 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+#include "protocols.h"
+
+#include "address.h"
+#include "endpoint.h"
+#include <signal.h>
+#include <iostream>
+
+#define IPSZ       sizeof(struct ep_iphdr)
+#define UDPSZ      sizeof(struct ep_udphdr)
+#define DATASZ     sizeof(STRING) - 1
+#define PSEUDOSZ   sizeof(struct pseudohdr)
+#define BUFFSZ     100
+#define SIZE       (IPSZ + UDPSZ + DATASZ)
+#define STRING     "hello"
+
+#include<stdio.h>
+int main(int argc, char**argv)
+{
+#ifndef _WIN32
+        signal(SIGPIPE, SIG_IGN);
+#endif
+        /*if (argc != 3) {
+           std::cout << "usage: %0 <dst> <src>\n" << std::endl;
+           return 0;
+        }*/
+
+        EndpointAddrlist::g_default_family = AF_INET;
+        Endpoint::Initialize();
+        Endpoint::setup_raw(argv[0]);
+
+        Endpoint ep(RAW_UDP | CLIENT, argv[1], argv[2]);
+        ep.Write("hi");
+// for multicasting, can't connect() or else won't receive from everywhere
+//Endpoint ep(UDP | CLIENT, ":0", "226.1.1.2:2000");
+
+//std::cout << "Join: " << ep.join("226.1.1.2") << std::endl;
+
+        if (!ep) {
+                std::cout << "Couldn't connect" << std::endl;
+                return -2;
+        }
+
+        std::cout << std::string(ep) << std::endl;
+
+        std::string buf;
+        ep.Read(-500, buf);
+        std::cout << buf;
+
+//ep.Write("hello\r\n");
+
+        return 0;
+
+}
+
diff --git a/cadxcore/endpoint/eptest/w32test/ReadMe.txt b/cadxcore/endpoint/eptest/w32test/ReadMe.txt
new file mode 100644
index 0000000..a9ea2f2
--- /dev/null
+++ b/cadxcore/endpoint/eptest/w32test/ReadMe.txt
@@ -0,0 +1,68 @@
+========================================================================
+
+       CONSOLE APPLICATION : w32test
+
+========================================================================
+
+
+
+
+
+AppWizard has created this w32test application for you.  
+
+
+
+This file contains a summary of what you will find in each of the files that
+
+make up your w32test application.
+
+
+
+w32test.dsp
+
+    This file (the project file) contains information at the project level and
+
+    is used to build a single project or subproject. Other users can share the
+
+    project (.dsp) file, but they should export the makefiles locally.
+
+
+
+w32test.cpp
+
+    This is the main application source file.
+
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+Other standard files:
+
+
+
+StdAfx.h, StdAfx.cpp
+
+    These files are used to build a precompiled header (PCH) file
+
+    named w32test.pch and a precompiled types file named StdAfx.obj.
+
+
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
+Other notes:
+
+
+
+AppWizard uses "TODO:" to indicate parts of the source code you
+
+should add to or customize.
+
+
+
+/////////////////////////////////////////////////////////////////////////////
+
diff --git a/cadxcore/endpoint/eptest/w32test/StdAfx.cpp b/cadxcore/endpoint/eptest/w32test/StdAfx.cpp
new file mode 100644
index 0000000..5ffb32b
--- /dev/null
+++ b/cadxcore/endpoint/eptest/w32test/StdAfx.cpp
@@ -0,0 +1,31 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+
+
+#include "stdafx.h"
+
+
+
+// TODO: reference any additional headers you need in STDAFX.H
+
+// and not in this file
+
diff --git a/cadxcore/endpoint/eptest/w32test/StdAfx.h b/cadxcore/endpoint/eptest/w32test/StdAfx.h
new file mode 100644
index 0000000..5e3a52d
--- /dev/null
+++ b/cadxcore/endpoint/eptest/w32test/StdAfx.h
@@ -0,0 +1,56 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+
+#if !defined(AFX_STDAFX_H__B6AE493D_5064_45EE_92F1_881AFD02612E__INCLUDED_)
+
+#define AFX_STDAFX_H__B6AE493D_5064_45EE_92F1_881AFD02612E__INCLUDED_
+
+
+
+#if _MSC_VER > 1000
+
+#pragma once
+
+#endif // _MSC_VER > 1000
+
+
+
+#define WIN32_LEAN_AND_MEAN		// Exclude rarely-used stuff from Windows headers
+
+
+
+#include <stdio.h>
+
+
+
+// TODO: reference additional headers your program requires here
+
+
+
+//{{AFX_INSERT_LOCATION}}
+
+// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
+
+
+
+#endif // !defined(AFX_STDAFX_H__B6AE493D_5064_45EE_92F1_881AFD02612E__INCLUDED_)
+
diff --git a/cadxcore/endpoint/eptest/w32test/w32test.cpp b/cadxcore/endpoint/eptest/w32test/w32test.cpp
new file mode 100644
index 0000000..758acb1
--- /dev/null
+++ b/cadxcore/endpoint/eptest/w32test/w32test.cpp
@@ -0,0 +1,37 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "stdafx.h"
+
+
+
+/*
+
+int main(int argc, char* argv[])
+
+{
+
+	printf("Hello World!\n");
+
+	return 0;
+
+}*/
+
diff --git a/cadxcore/endpoint/exception.h b/cadxcore/endpoint/exception.h
new file mode 100644
index 0000000..94b0421
--- /dev/null
+++ b/cadxcore/endpoint/exception.h
@@ -0,0 +1,34 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#ifndef __EP_EXCEPTION_H
+#define __EP_EXCEPTION_H
+#include <string>
+
+class EndpointException
+{
+public:
+        EndpointException(std::string str):m_str(str) {}
+
+        std::string m_str;
+};
+
+#endif
diff --git a/cadxcore/endpoint/icmp.txt b/cadxcore/endpoint/icmp.txt
new file mode 100644
index 0000000..5b9fd77
--- /dev/null
+++ b/cadxcore/endpoint/icmp.txt
@@ -0,0 +1,86 @@
+ICMP For Data Transfer
+
+"Project Loki: ICMP Tunneling". Alhambra, daemon9.
+http://www.phrack.org/phrack/49/P49-06
+
+RFC 792
+
+http://www.iana.org/assignments/icmp-parameters
+
+type/code meaning
+
+0 echo reply
+1 ???
+2 ???
+3 destination unreachable
+3/0 net unreachable
+3/1 host unreachable
+3/2 protocol unreachable
+3/3 port unreachable
+3/4 fragmentation needed and DF set
+3/5 source route failed
+3/6 destination network unknown
+3/7 destination host unknown
+3/8 source host isolated
+3/9 communication with destination network administratively prohibited
+3/10 communication with destination host administratively prohibited
+3/11 destination network unreachable for type of service
+3/12 destination host unreachable for type of service
+3/13 communication administratively prohibited RFC1812
+2/14 host precedence violation RFC1812
+3/15 precedence cutoff in effect RFC1812
+4 source quench
+5 redirect
+5/0 redirect datagrams for the network
+5/1 redirect datagrams for the host
+5/2 redirect datagrams for the Type of Service and network
+5/3 redirect datagrams for the Type of Service and host
+6 alternate host address
+7 ???
+8 echo request
+9 router advertisement
+9/0 normal router advertisement
+9/16 does not route common traffic
+10 router soliciation
+11 time exceeded
+11/0 time to live exceeded in transit
+11/1 fragment reassembly time exceeded
+12 parameter problem message
+12/0 pointer indicates error
+12/1 missing a required option
+12/2 bad length
+13 timestamp
+14 timestamp reply
+15 information request
+16 information reply
+17 address mask request
+18 address mask reply
+19 reserved for security
+20-29 reserved for robustness experiment
+30 traceroute
+31 datagram conversion error
+33 IPv6 Where-Are-You
+34 IPv6 I-Am-Here
+35 Mobile Registration Request
+36 Mobile Registration Reply
+37 domain name request
+38 domain name reply
+39 SKIP
+40 Photurius
+40/1 bad SPI
+40/2 authentication failed
+40/2 decompression failed
+40/3 decryption failed
+40/4 need authentication
+40/5 need authorization
+41-255 Reserved
+
+request reply
+8       0        echo
+13      14       timestamp
+15      16       information
+17      18       address mask
+33      34       IPv6 Where-Are-You/I-Am-Here
+35      36       Mobile Registration
+37      38       domain name
+
diff --git a/cadxcore/endpoint/inet_ntop.c b/cadxcore/endpoint/inet_ntop.c
new file mode 100644
index 0000000..5afe179
--- /dev/null
+++ b/cadxcore/endpoint/inet_ntop.c
@@ -0,0 +1,217 @@
+/* This is from the BIND 4.9.4 release, modified to compile by itself */
+/* Modified again 2003-03-27 Jeff Connelly to compile under C++ */
+
+/* Copyright (c) 1996 by Internet Software Consortium.
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the above
+ * copyright notice and this permission notice appear in all copies.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
+ * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
+ * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
+ * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
+ * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
+ * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
+ * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
+ * SOFTWARE.
+ */
+
+#if defined(LIBC_SCCS) && !defined(lint)
+static char rcsid[] = "$Id: inet_ntop.c,v $";
+#endif /* LIBC_SCCS and not lint */
+
+#include <sys/types.h>
+#include <string.h>
+#include <errno.h>
+#include <stdio.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#if !defined EAFNOSUPPORT
+   #define EAFNOSUPPORT 97
+#endif
+//#define ENOSPC 98
+#else
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#endif
+
+#define	IN6ADDRSZ	16
+#define	INT16SZ		 2
+
+#ifndef	AF_INET6
+#define	AF_INET6	AF_MAX+1	/* just to let this compile */
+#endif
+
+/*
+ * WARNING: Don't even consider trying to compile this on a system where
+ * sizeof(int) < 4.  sizeof(int) > 4 is fine; all the world's not a VAX.
+ */
+
+static const char *myinet_ntop4(const u_char *src, char *dst, size_t size);
+static const char *myinet_ntop6(const u_char *src, char *dst, size_t size);
+
+/* char *
+ * inet_ntop(af, src, dst, size)
+ *	convert a network format address to presentation format.
+ * return:
+ *	pointer to presentation format address (`dst'), or NULL (see errno).
+ * author:
+ *	Paul Vixie, 1996.
+ */
+const char *
+myinet_ntop(int af, const void* src, char* dst, size_t size)
+{
+   switch (af) {
+   case AF_INET:
+      return (myinet_ntop4(src, dst, size));
+   case AF_INET6:
+      return (myinet_ntop6(src, dst, size));
+   default:
+      errno = EAFNOSUPPORT;
+      return (NULL);
+   }
+   /* NOTREACHED */
+}
+
+/* const char *
+ * inet_ntop4(src, dst, size)
+ *	format an IPv4 address, more or less like inet_ntoa()
+ * return:
+ *	`dst' (as a const)
+ * notes:
+ *	(1) uses no statics
+ *	(2) takes a u_char* not an in_addr as input
+ * author:
+ *	Paul Vixie, 1996.
+ */
+static const char *
+myinet_ntop4(const u_char* src, char* dst, size_t size)
+{
+   static const char fmt[] = "%u.%u.%u.%u";
+   size_t maxlen = sizeof "255.255.255.255";
+   char tmp[sizeof "255.255.255.255"];
+   #if defined(_WINDOWS)
+   sprintf_s(tmp, maxlen, fmt, src[0], src[1], src[2], src[3]);
+   #else
+   snprintf(tmp, maxlen, fmt, src[0], src[1], src[2], src[3]);
+   #endif
+   if (strlen(tmp) > size) {
+      errno = ENOSPC;
+      return (NULL);
+   }
+   #if defined(_WINDOWS)
+   strcpy_s(dst, maxlen, tmp);
+   #else
+   strncpy(dst, tmp, maxlen);
+   #endif
+   return (dst);
+}
+
+/* const char *
+ * inet_ntop6(src, dst, size)
+ *	convert IPv6 binary address into presentation (printable) format
+ * author:
+ *	Paul Vixie, 1996.
+ */
+static const char *
+myinet_ntop6(const u_char* src, char* dst, size_t size)
+{
+   /*
+    * Note that int32_t and int16_t need only be "at least" large enough
+    * to contain a value of the specified size.  On some systems, like
+    * Crays, there is no such thing as an integer variable with 16 bits.
+    * Keep this in mind if you think this function should have been coded
+    * to use pointer overlays.  All the world's not a VAX.
+    */
+   const size_t maxlen = sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255";
+   char tmp[sizeof "ffff:ffff:ffff:ffff:ffff:ffff:255.255.255.255"], *tp;
+   struct { int base, len; } best, cur;
+   u_int words[IN6ADDRSZ / INT16SZ];
+   int i;
+   best.len = 0;
+
+   /*
+    * Preprocess:
+    *	Copy the input (bytewise) array into a wordwise array.
+    *	Find the longest run of 0x00's in src[] for :: shorthanding.
+    */
+   memset(words, 0, sizeof words);
+   for (i = 0; i < IN6ADDRSZ; i++)
+      words[i / 2] |= (src[i] << ((1 - (i % 2)) << 3));
+   best.base = -1;
+   cur.base = -1;
+   for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+      if (words[i] == 0) {
+         if (cur.base == -1)
+            cur.base = i, cur.len = 1;
+         else
+            cur.len++;
+      } else {
+         if (cur.base != -1) {
+            if (best.base == -1 || cur.len > best.len)
+               best = cur;
+            cur.base = -1;
+         }
+      }
+   }
+   if (cur.base != -1) {
+      if (best.base == -1 || cur.len > best.len)
+         best = cur;
+   }
+   if (best.base != -1 && best.len < 2)
+      best.base = -1;
+
+   /*
+    * Format the result.
+    */
+   tp = tmp;
+   for (i = 0; i < (IN6ADDRSZ / INT16SZ); i++) {
+      /* Are we inside the best run of 0x00's? */
+      if (best.base != -1 && i >= best.base &&
+          i < (best.base + best.len)) {
+         if (i == best.base)
+            *tp++ = ':';
+         continue;
+      }
+      /* Are we following an initial run of 0x00s or any real hex? */
+      if (i != 0)
+         *tp++ = ':';
+      /* Is this address an encapsulated IPv4? */
+      if (i == 6 && best.base == 0 &&
+          (best.len == 6 || (best.len == 5 && words[5] == 0xffff))) {
+         if (!myinet_ntop4(src+12, tp, sizeof tmp - (tp - tmp)))
+            return (NULL);
+         tp += strlen(tp);
+         break;
+      }
+      #if defined(_WINDOWS)
+      sprintf_s(tp, 5, "%x", words[i]);
+      #else
+      snprintf(tp, 5, "%x", words[i]);
+      #endif
+      tp += strlen(tp);
+   }
+   /* Was it a trailing run of 0x00's? */
+   if (best.base != -1 && (best.base + best.len) == (IN6ADDRSZ / INT16SZ))
+      *tp++ = ':';
+   *tp++ = '\0';
+
+   /*
+    * Check for overflow, copy, and we're done.
+    */
+   if ((tp - tmp) > (signed int) size) {
+      errno = ENOSPC;
+      return (NULL);
+   }
+   #if defined(_WINDOWS)
+   strcpy_s(dst, maxlen, tmp);
+   #else
+   strncpy(dst, tmp, maxlen);
+   #endif
+
+   return (dst);
+}
diff --git a/cadxcore/endpoint/inet_ntop.h b/cadxcore/endpoint/inet_ntop.h
new file mode 100644
index 0000000..5a7174f
--- /dev/null
+++ b/cadxcore/endpoint/inet_ntop.h
@@ -0,0 +1,25 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+
+#ifdef _WIN32
+extern "C" const char * __cdecl myinet_ntop(int af, const void *src, char *dst, size_t size);
+#endif
diff --git a/cadxcore/endpoint/inet_ntop_ipv4.c b/cadxcore/endpoint/inet_ntop_ipv4.c
new file mode 100644
index 0000000..6924b9a
--- /dev/null
+++ b/cadxcore/endpoint/inet_ntop_ipv4.c
@@ -0,0 +1,38 @@
+#include	<sys/types.h>
+#include	<errno.h>
+#include	<stdio.h>
+#include <string.h>
+
+#ifdef _WIN32
+#include <winsock2.h>
+#define EAFNOSUPPORT 97
+#else
+#include	<sys/socket.h>
+#endif
+
+#ifndef	INET_ADDRSTRLEN
+#define	INET_ADDRSTRLEN		16
+#endif
+
+/* include inet_ntop */
+const char *
+inet_ntop(int family, const void *addrptr, char *strptr, size_t len)
+{
+	const u_char *p = (const u_char *) addrptr;
+
+	if (family == AF_INET) {
+		char	temp[INET_ADDRSTRLEN];
+
+		snprintf(temp, sizeof(temp), "%d.%d.%d.%d",
+				 p[0], p[1], p[2], p[3]);
+		if (strlen(temp) >= len) {
+			errno = ENOSPC;
+			return (NULL);
+		}
+		strcpy(strptr, temp);
+		return (strptr);
+	}
+	errno = EAFNOSUPPORT;
+	return (NULL);
+}
+/* end inet_ntop */
diff --git a/cadxcore/endpoint/interfaces.cpp b/cadxcore/endpoint/interfaces.cpp
new file mode 100644
index 0000000..7ff8634
--- /dev/null
+++ b/cadxcore/endpoint/interfaces.cpp
@@ -0,0 +1,114 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+#include <vector>
+
+#include "protocols.h"
+#include "address.h"
+#include "endpoint.h"
+
+#ifndef _WIN32
+# error "UNIX network interface retrieval is currently unimplemented - please read UNP and implemenet it"
+#else
+
+// derived from code from tangentsoft.com WinSock example
+bool Network_Interfaces(std::vector<Interface>& is)
+{
+        SOCKET sd;
+        // Should use INTERFACE_INFO_EX to allow IPv6 support
+        INTERFACE_INFO InterfaceList[20];
+        unsigned long nBytesReturned;
+        int nNumInterfaces;
+
+        sd = socket(AF_INET, SOCK_DGRAM, 0);
+        if (sd == SOCKET_ERROR) {
+                //MessageBox(GetDesktopWindow(), "Failed to get a socket. Error ", "", 0);
+                //+ WSAGetLastError() <<
+                //endl;
+                return false;
+        }
+
+        if (WSAIoctl(sd, SIO_GET_INTERFACE_LIST, 0, 0, &InterfaceList,
+                     sizeof(InterfaceList), &nBytesReturned, 0, 0) == SOCKET_ERROR) {
+                //    MessageBox(GetDesktopWindow(), "Failed calling WSAIoctl: error ", "", 0);
+                //<< WSAGetLastError() <<
+                //		endl;
+                return false;
+        }
+        closesocket(sd);
+
+        nNumInterfaces = nBytesReturned / sizeof(INTERFACE_INFO);
+
+        //str.Format("There are %d\n", nNumInterfaces);
+        //MessageBox(GetDesktopWindow(), str, "", 0);
+
+        for (int i = 0; i < nNumInterfaces; ++i) {
+                Interface in;
+
+                memset(&in, 0, sizeof(in));
+
+                // NOTE: This should be moved into application-specific code
+                if (InterfaceList[i].iiFlags & IFF_LOOPBACK)    // Skip loopback - uninteresting
+                        continue;
+                if (!(InterfaceList[i].iiFlags & IFF_UP))       // Skip down interfaces
+                        continue;
+
+                sockaddr_in *pAddress;
+
+                pAddress = (sockaddr_in *) & (InterfaceList[i].iiAddress);
+                //str += CString("IP=") + inet_ntoa(pAddress->sin_addr);
+                in.address = inet_ntoa(pAddress->sin_addr);
+
+                pAddress = (sockaddr_in *) & (InterfaceList[i].iiBroadcastAddress);
+                //str += CString(" BCAST=") + inet_ntoa(pAddress->sin_addr);
+                in.broadcast = inet_ntoa(pAddress->sin_addr);
+
+                pAddress = (sockaddr_in *) & (InterfaceList[i].iiNetmask);
+                //str += CString(" MASK=") + inet_ntoa(pAddress->sin_addr);
+                in.netmask = inet_ntoa(pAddress->sin_addr);
+
+                u_long nFlags = InterfaceList[i].iiFlags;
+                if (nFlags & IFF_UP) { //str += " <UP";
+                        in.up = true;
+                } else                 { //str += " <DOWN";
+                        in.up = false;
+                }
+                if (nFlags & IFF_POINTTOPOINT) { //str += " P2P";
+                        in.p2p = true;
+                }
+                if (nFlags & IFF_LOOPBACK)     { //str += " LOOPBACK";
+                        in.loopback = true;
+                }
+                if (nFlags & IFF_BROADCAST)    { //str += " BCAST";
+                        in.bcast = true;
+                }
+                if (nFlags & IFF_MULTICAST)    { //str += "MCAST";
+                        in.mcast = true;
+                }
+                //str += ">\n";
+                is.push_back(in);
+        }
+        //MessageBox(GetDesktopWindow(), str, "", 0);
+
+        return true;
+}
+
+#endif
diff --git a/cadxcore/endpoint/multicast.txt b/cadxcore/endpoint/multicast.txt
new file mode 100644
index 0000000..b230f26
--- /dev/null
+++ b/cadxcore/endpoint/multicast.txt
@@ -0,0 +1,76 @@
+224.0.0.0 - 239.0.0.0 is our LAN!
+
+pinging it pings all the hosts
+while pinging 255.255.255.255 pings only BSD (Win32 no response to bcast ping)
+
+Does this mean my Linksys BEFSR81 supports multicast? I think so.
+It supports multicast pass-through also.
+But how can I join a group? I suppose I have to join before I can actually
+receive. This is very inefficient if the kernel has to drop mcast packets
+not intended for it, the router should only forward to group members. But
+does it? Not sure.
+
+Multicast is neat, use it.
+
+---
+
+228.246.191.191 -> reserved-multicast-range-NOT-delegated.example.com
+
+But why I can ping 232.0.0.0 - 232.255.255.255, though RFC 3171 says its
+RESERVED? Heck, why can I ping the WHOLE MULTICAST range?
+224.0.0.0 - 239.0.0.0
+
+nmap reveals they're not running TCP. Makes sense...its not multicastable.
+UDP is.
+
+Warning: forward host lookup failed for reserved-multicast-range-NOT-delegated.example.com: Unknown host
+reserved-multicast-range-NOT-delegated.example.com [228.246.191.191] 80 (http) : Address family not supported by protocol family
+ sent 0, rcvd 0
+
+Interesting. "Address family not supported by protocol family"
+
+nmap says all UDP and TCP are filtered. But ICMP isn't!
+
+However, a protocol scan (-sO) shows that icmp,tcp,and udp (1,6,17) are 
+supported. None other of the 256 possible IP protocols are. Good.
+
+All hosts appear identical.
+
+
+> ping 228.246.191.191
+PING 228.246.191.191 (228.246.191.191): 56 data bytes
+64 bytes from 228.246.191.191: icmp_seq=0 ttl=150 time=0.741 ms
+64 bytes from 228.246.191.191: icmp_seq=1 ttl=150 time=0.696 ms
+
+
+OrgName:    Internet Assigned Numbers Authority
+OrgID:      IANA
+Address:    4676 Admiralty Way, Suite 330
+City:       Marina del Rey
+StateProv:  CA
+PostalCode: 90292-6695
+Country:    US
+
+NetRange:   224.0.0.0 - 239.255.255.255
+CIDR:       224.0.0.0/4
+NetName:    MCAST-NET
+NetHandle:  NET-224-0-0-0-1
+Parent:
+NetType:    IANA Special Use
+NameServer: FLAG.EP.NET
+NameServer: STRUL.STUPI.SE
+NameServer: NS.ISI.EDU
+NameServer: NIC.NEAR.NET
+Comment:    This block is reserved for special purposes.
+Comment:    Please see RFC 3171 for additional information.
+Comment:
+RegDate:    1991-05-22
+Updated:    2002-09-16
+
+OrgTechHandle: IANA-ARIN
+OrgTechName:   Internet Corporation for Assigned Names and Number
+OrgTechPhone:  +1-310-823-9358
+OrgTechEmail:  res-ip at iana.org
+
+# ARIN WHOIS database, last updated 2003-04-26 20:10
+# Enter ? for additional hints on searching ARIN's WHOIS database.
diff --git a/cadxcore/endpoint/nc-bug.txt b/cadxcore/endpoint/nc-bug.txt
new file mode 100644
index 0000000..fc45f6b
--- /dev/null
+++ b/cadxcore/endpoint/nc-bug.txt
@@ -0,0 +1,14 @@
+#!/bin/sh
+# Discovered 2003-05-09 Jeff Connelly
+
+# Bug in netcat with IPv6 support.
+# Scenerio: listen on IPv6, connect with IPv4
+# The protocol stack stack passes the IPv4 connection to the IPv6
+# server, but netcat can't do a forward host lookup on 0.0.0.0. This
+# full DNS lookup is not optional. netcat barfs and no data is received.
+
+nc -l6p 8000 &
+echo "xxx" | nc localhost 8000
+
+# 0.0.0.0: forward host lookup failed: Unknown host
+
diff --git a/cadxcore/endpoint/protocols.h b/cadxcore/endpoint/protocols.h
new file mode 100644
index 0000000..ff7e9bc
--- /dev/null
+++ b/cadxcore/endpoint/protocols.h
@@ -0,0 +1,153 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#ifndef __EP__PROTOCOLS_H
+#define __EP__PROTOCOLS_H
+
+// Logically AND (&) this with a type field to get the socket type (below)
+#define EP_SOCK_MASK ~1
+
+// Client/server is LSB; do (type & SERVER) to see whether its a passive socket
+#define CLIENT 0  // (default)
+#define SERVER 1  // 
+
+// Protocol type, occupies all but the LSB
+#define TCP       (0<<1)
+#define UDP       (1<<1)
+#define RAW_BASE  (2<<1)        // all >= RAW_BASE is raw, L4 protocol encoded
+
+#define RAW       RAW_RAW       // raw IP packet shortcut
+
+// comments & definitions from /usr/include/netinet/in.h on BSD
+#define RAW_IP         ((2+IPPROTO_IP)<<1)     /* dummy for IP */
+#define RAW_ICMP       ((2+IPPROTO_ICMP)<<1)   /* control message protocol */
+#define RAW_TCP        ((2+IPPROTO_TCP)<<1)    /* tcp */
+#define RAW_UDP        ((2+IPPROTO_UDP)<<1)    /* user datagram protocol */
+#define RAW_RAW        ((2+IPPROTO_RAW)<<1)    /* raw IP packet */
+#define RAW_HOPOPTS    ((2+IPPROTO_HOPOPTS)<<1)/* IP6 hop-by-hop options */
+#define RAW_IGMP       ((2+IPPROTO_IGMP)<<1)   /* group mgmt protocol */
+#define RAW_GGP        ((2+IPPROTO_GGP)<<1)    /* gateway^2 (deprecated) */
+#define RAW_IPV4       ((2+IPPROTO_IPV4)<<1)   /* IPv4 encapsulation */
+#define RAW_IPIP       ((2+IPPROTO_IPV4)<<1)   /* for compatibility */
+#define RAW_ST         ((2+IPPROTO_ST)<<1)     /* Stream protocol II */
+#define RAW_EGP        ((2+IPPROTO_EGP)<<1)    /* exterior gateway protocol */
+#define RAW_PIGP       ((2+IPPROTO_PIGP)<<1)   /* private interior gateway */
+#define RAW_RCCMON     ((2+IPPROTO_RCCMON)<<1) /* BBN RCC Monitoring */
+#define RAW_NVPII      ((2+IPPROTO_NVPII)<<1)  /* network voice protocol*/
+#define RAW_PUP        ((2+IPPROTO_PUP)<<1)    /* pup */
+#define RAW_ARGUS      ((2+IPPROTO_ARGUS)<<1)  /* Argus */
+#define RAW_EMCON      ((2+IPPROTO_EMCON)<<1)  /* EMCON */
+#define RAW_XNET       ((2+IPPROTO_XNET)<<1)   /* Cross Net Debugger */
+#define RAW_CHAOS      ((2+IPPROTO_CHAOS)<<1)  /* Chaos*/
+#define RAW_MUX        ((2+IPPROTO_MUX)<<1)    /* Multiplexing */
+#define RAW_MEAS       ((2+IPPROTO_MEAS)<<1)   /* DCN Measurement Subsystems */
+#define RAW_HMP        ((2+IPPROTO_HMP)<<1)    /* Host Monitoring */
+#define RAW_PRM        ((2+IPPROTO_PRM)<<1)    /* Packet Radio Measurement */
+#define RAW_IDP        ((2+IPPROTO_IDP)<<1)    /* xns idp */
+#define RAW_TRUNK1     ((2+IPPROTO_TRUNK1)<<1) /* Trunk-1 */
+#define RAW_TRUNK2     ((2+IPPROTO_TRUNK2)<<1) /* Trunk-2 */
+#define RAW_LEAF1      ((2+IPPROTO_LEAF1)<<1)  /* Leaf-1 */
+#define RAW_LEAF2      ((2+IPPROTO_LEAF2)<<1)  /* Leaf-2 */
+#define RAW_RDP        ((2+IPPROTO_RDP)<<1)    /* Reliable Data */
+#define RAW_IRTP       ((2+IPPROTO_IRTP)<<1)   /* Reliable Transaction */
+#define RAW_TP         ((2+IPPROTO_TP)<<1)     /* tp-4 w/ class negotiation */
+#define RAW_BLT        ((2+IPPROTO_BLT)<<1)    /* Bulk Data Transfer */
+#define RAW_NSP        ((2+IPPROTO_NSP)<<1)    /* Network Services */
+#define RAW_INP        ((2+IPPROTO_INP)<<1)    /* Merit Internodal */
+#define RAW_SEP        ((2+IPPROTO_SEP)<<1)    /* Sequential Exchange */
+#define RAW_3PC        ((2+IPPROTO_3PC)<<1)    /* Third Party Connect */
+#define RAW_IDPR       ((2+IPPROTO_IDPR)<<1)   /* InterDomain Policy Routing */
+#define RAW_XTP        ((2+IPPROTO_XTP)<<1)    /* XTP */
+#define RAW_DDP        ((2+IPPROTO_DDP)<<1)    /* Datagram Delivery */
+#define RAW_CMTP       ((2+IPPROTO_CMTP)<<1)   /* Control Message Transport */
+#define RAW_TPXX       ((2+IPPROTO_TPXX)<<1)   /* TP++ Transport */
+#define RAW_IL         ((2+IPPROTO_IL)<<1)     /* IL transport protocol */
+#define RAW_IPV6       ((2+IPPROTO_IPV6)<<1)   /* IP6 header */
+#define RAW_SDRP       ((2+IPPROTO_SDRP)<<1)   /* Source Demand Routing */
+#define RAW_ROUTING    ((2+IPPROTO_ROUTING)<<1)/* IP6 routing header */
+#define RAW_FRAGMENT   ((2+IPPROTO_FRAGMENT)<<1)/* IP6 fragmentation header */
+#define RAW_IDRP       ((2+IPPROTO_IDRP)<<1)   /* InterDomain Routing*/
+#define RAW_RSVP       ((2+IPPROTO_RSVP)<<1)   /* resource reservation */
+#define RAW_GRE        ((2+IPPROTO_GRE)<<1)    /* General Routing Encap. */
+#define RAW_MHRP       ((2+IPPROTO_MHRP)<<1)   /* Mobile Host Routing */
+#define RAW_BHA        ((2+IPPROTO_BHA)<<1)    /* BHA */
+#define RAW_ESP        ((2+IPPROTO_ESP)<<1)    /* IP6 Encap Sec. Payload */
+#define RAW_AH         ((2+IPPROTO_AH)<<1)     /* IP6 Auth Header */
+#define RAW_INLSP      ((2+IPPROTO_INLSP)<<1)  /* Integ. Net Layer Security */
+#define RAW_SWIPE      ((2+IPPROTO_SWIPE)<<1)  /* IP with encryption */
+#define RAW_NHRP       ((2+IPPROTO_NHRP)<<1)   /* Next Hop Resolution */
+#define RAW_MOBILE     ((2+IPPROTO_MOBILE)<<1) /* IP Mobility */
+#define RAW_TLSP       ((2+IPPROTO_TLSP)<<1)   /* Transport Layer Security */
+#define RAW_SKIP       ((2+IPPROTO_SKIP)<<1)   /* SKIP */
+#define RAW_ICMPV6     ((2+IPPROTO_ICMPV6)<<1) /* ICMP6 */
+#define RAW_NONE       ((2+IPPROTO_NONE)<<1)   /* IP6 no next header */
+#define RAW_DSTOPTS    ((2+IPPROTO_DSTOPTS)<<1)/* IP6 destination option */
+#define RAW_AHIP       ((2+IPPROTO_AHIP)<<1)   /* any host internal protocol */
+#define RAW_CFTP       ((2+IPPROTO_CFTP)<<1)   /* CFTP */
+#define RAW_HELLO      ((2+IPPROTO_HELLO)<<1)  /* "hello" routing protocol */
+#define RAW_SATEXPAK   ((2+IPPROTO_SATEXPAK)<<1)/* SATNET/Backroom EXPAK */
+#define RAW_KRYPTOLAN  ((2+IPPROTO_KRYPTOLAN)<<1)/* Kryptolan */
+#define RAW_RVD        ((2+IPPROTO_RVD)<<1)    /* Remote Virtual Disk */
+#define RAW_IPPC       ((2+IPPROTO_IPPC)<<1)   /* Pluribus Packet Core */
+#define RAW_ADFS       ((2+IPPROTO_ADFS)<<1)   /* Any distributed FS */
+#define RAW_SATMON     ((2+IPPROTO_SATMON)<<1) /* Satnet Monitoring */
+#define RAW_VISA       ((2+IPPROTO_VISA)<<1)   /* VISA Protocol */
+#define RAW_IPCV       ((2+IPPROTO_IPCV)<<1)   /* Packet Core Utility */
+#define RAW_CPNX       ((2+IPPROTO_CPNX)<<1)   /* Comp. Prot. Net. Executive */
+#define RAW_CPHB       ((2+IPPROTO_CPHB)<<1)   /* Comp. Prot. HeartBeat */
+#define RAW_WSN        ((2+IPPROTO_WSN)<<1)    /* Wang Span Network */
+#define RAW_PVP        ((2+IPPROTO_PVP)<<1)    /* Packet Video Protocol */
+#define RAW_BRSATMON   ((2+IPPROTO_BRSATMON)<<1)/* BackRoom SATNET Monitoring */
+#define RAW_ND         ((2+IPPROTO_ND)<<1)     /* Sun net disk proto (temp.) */
+#define RAW_WBMON      ((2+IPPROTO_WBMON)<<1)  /* WIDEBAND Monitoring */
+#define RAW_WBEXPAK    ((2+IPPROTO_WBEXPAK)<<1)/* WIDEBAND EXPAK */
+#define RAW_EON        ((2+IPPROTO_EON)<<1)    /* ISO cnlp */
+#define RAW_VMTP       ((2+IPPROTO_VMTP)<<1)   /* VMTP */
+#define RAW_SVMTP      ((2+IPPROTO_SVMTP)<<1)  /* Secure VMTP */
+#define RAW_VINES      ((2+IPPROTO_VINES)<<1)  /* Banyon VINES */
+#define RAW_TTP        ((2+IPPROTO_TTP)<<1)    /* TTP */
+#define RAW_IGP        ((2+IPPROTO_IGP)<<1)    /* NSFNET-IGP */
+#define RAW_DGP        ((2+IPPROTO_DGP)<<1)    /* dissimilar gateway prot. */
+#define RAW_TCF        ((2+IPPROTO_TCF)<<1)    /* TCF */
+#define RAW_IGRP       ((2+IPPROTO_IGRP)<<1)   /* Cisco/GXS IGRP */
+#define RAW_OSPFIGP    ((2+IPPROTO_OSPFIGP)<<1)/* OSPFIGP */
+#define RAW_SRPC       ((2+IPPROTO_SRPC)<<1)   /* Strite RPC protocol */
+#define RAW_LARP       ((2+IPPROTO_LARP)<<1)   /* Locus Address Resoloution */
+#define RAW_MTP        ((2+IPPROTO_MTP)<<1)    /* Multicast Transport */
+#define RAW_AX25       ((2+IPPROTO_AX25)<<1)   /* AX.25 Frames */
+#define RAW_IPEIP      ((2+IPPROTO_IPEIP)<<1)  /* IP encapsulated in IP */
+#define RAW_MICP       ((2+IPPROTO_MICP)<<1)   /* Mobile Int.ing control */
+#define RAW_SCCSP      ((2+IPPROTO_SCCSP)<<1)  /* Semaphore Comm. security */
+#define RAW_ETHERIP    ((2+IPPROTO_ETHERIP)<<1)/* Ethernet IP encapsulation */
+#define RAW_ENCAP      ((2+IPPROTO_ENCAP)<<1)  /* encapsulation header */
+#define RAW_APES       ((2+IPPROTO_APES)<<1)   /* any private encr. scheme */
+#define RAW_GMTP       ((2+IPPROTO_GMTP)<<1)   /* GMTP*/
+#define RAW_IPCOMP     ((2+IPPROTO_IPCOMP)<<1) /* payload compression(IPComp) */
+#define RAW_PIM        ((2+IPPROTO_PIM)<<1)    /* Protocol Independent Mcast */
+#define RAW_PGM        ((2+IPPROTO_PGM)<<1)    /* PGM */
+#define RAW_OLD_DIVERT  ((2+IPPROTO_OLD_DIVERT)<<1)/* OLD divert pseudo-proto */
+#define RAW_MAX        ((2+IPPROTO_MAX)<<1)
+#define RAW_DONE       ((2+IPPROTO_DONE)<<1)
+#define RAW_DIVERT     ((2+IPPROTO_DIVERT)<<1) /* divert pseudo-protocol */
+
+
+#endif
+
diff --git a/cadxcore/endpoint/sockatmark.cpp b/cadxcore/endpoint/sockatmark.cpp
new file mode 100644
index 0000000..231ebe5
--- /dev/null
+++ b/cadxcore/endpoint/sockatmark.cpp
@@ -0,0 +1,33 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <sys/sockio.h>
+
+int
+sockatmark(int fd)
+{
+        int		flag;
+
+        if (ioctl(fd, SIOCATMARK, &flag) < 0)
+                return(-1);
+        return(flag != 0 ? 1 : 0);
+}
diff --git a/cadxcore/endpoint/tricks.html b/cadxcore/endpoint/tricks.html
new file mode 100644
index 0000000..edc7067
--- /dev/null
+++ b/cadxcore/endpoint/tricks.html
@@ -0,0 +1,82 @@
+<html>
+<head>
+<title>Cool Things You Can do With Endpoint</title>
+</head>
+<body>
+<h1>Endpoint: Tips and Tricks</h1>
+
+<h2>Send/Receive Normal TCP/UDP Traffic</h2>
+<p>This is easy:
+<pre>
+// Choose one of these. It'll return once a connection is established.
+Endpoint ep(TCP | CLIENT, "example.com:80");       // Active open
+Endpoint ep(TCP | SERVER, ":80");                  // Passive open
+Endpoint ep(UDP | CLIENT, "example.com:41170");    // Send
+Endpoint ep(UDP | SERVER, ":41170");               // Receive
+
+if (!ep)   // If couldn't open socket
+   std::cout << "failed: " << std::endl; 
+
+// Print out the local and remote address
+std::cout << "New socket: " << ep << std::endl;
+
+// Find out who we're connected to (note that this is shown above also)
+std::cout << "Connected to: " << string(ep.m_remote) << std::endl;
+
+// Write some data
+ep.Write("hi");
+</pre>
+
+<h2>Use IPv6</h2>
+<p>If your host supports it, IPv6 will be automatically enabled. DNS names
+will resolve to 128-bit IPv6 addresses. To <i>specifically</i> use IPv6:
+<pre>
+EndpointAddrlist::g_default_family = AF_INET6;
+</pre>
+<p>Now all DNS names will resolve to IPv6 addresses. (See also: RES_USE_INET6)
+
+<p>To connect to an IPv6 host without DNS, simply write the address. Use 
+square brackets around the IPv6 address if you're also specifying a port.
+For example, to connect to a local web server you're running on IPv6:
+<pre>
+Endpoint ep(TCP | CLIENT, "[::1]:80");
+
+</pre>
+
+<p>If you have IPv6 support but don't want it to get in the way, use:
+<pre>
+EndpointAddrlist::g_default_family = AF_INET;
+</pre>
+
+<h2>Use Raw Sockets</h2>
+<p>Endpoint now supports raw sockets with IPv4 (IPv6 doesn't have raw sockets;
+you have to use datalink access for that, which Endpoint doesn't currently
+support). If you want to write your own IP header, use RAW.
+
+<p>A number of transport-layer protocols that sit on top of IPv4 are available
+to Endpoint. To write IGMP packets, for example, use RAW_ICMP. This will make
+the IP header for you, but you have to write the IGMP header.
+
+<p>RAW_UDP and RAW_ICMP automatically create the UDP or ICMP header for you.
+See the next topic for using ICMP.
+
+
+<h2>Send ICMP Messages</h2>
+<p>Simply create a RAW_ICMP | CLIENT socket with your destined address,
+specifying a port number of <i>type</i>,<i>code</i>. For example, to send a
+"host unreachable" ICMP message to 10.3.2.1:
+
+<pre>
+Endpoint ep(RAW_ICMP | CLIENT, "10.3.2.1:3,1");
+
+ep.Write("...");
+</pre>
+
+<p>To send a "ping" (ICMP echo request), replace "3,1" with "8,0". See the
+official <a href="http://www.iana.org/assignments/icmp-parameters">IANA ICMP 
+parameters</a> for more information.
+
+<p>ICMP can be used as a covert channel. See 
+<a href="http://www.phrack.org/phrack/49/P49-06">Project Loki: ICMP
+Tunnelling</a> in Phrack 49, by Alhambra and daemon9 for an article about this
+steganographic process.
diff --git a/cadxcore/eventos/eventosginkgo.h b/cadxcore/eventos/eventosginkgo.h
new file mode 100644
index 0000000..5c82dbd
--- /dev/null
+++ b/cadxcore/eventos/eventosginkgo.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#define ginkgoEVT_Core_ModificacionFichero 1
+#define ginkgoEVT_Core_ModificacionImagen  3
+#define ginkgoEVT_Core_ModificacionWidget  4
+#define ginkgoEVT_Core_Render              5
+#define ginkgoEVT_Core_SCGenerated         6
+#define ginkgoEVT_Core_MensajesUsuario     7
+#define ginkgoEVT_Core_ProgresoComando     9
+#define ginkgoEVT_Core_UpdateAvailable     11
+#define ginkgoEVT_Core_Views               12
+#define ginkgoEVT_Core_HideSplashWindow	   18
+#define ginkgoEVT_Core_Integration         19
+#define ginkgoEVT_Core_HL7SendRequest      20
+#define ginkgoEVT_Core_ToolConnected       21
+#define ginkgoEVT_Core_ToolIconChanged     22
+#define ginkgoEVT_Core_ToolEnabled         23
+
+///el rango 100-199 esta reservado para el historial
+#define ginkgoEVT_Core_HistorialSeleccionar         100
+#define ginkgoEVT_Core_HistorialAbribleEliminado    102
+#define ginkgoEVT_Core_SetFocus                     106
+
+
diff --git a/cadxcore/eventos/hidesplashwindow.h b/cadxcore/eventos/hidesplashwindow.h
new file mode 100644
index 0000000..5be2207
--- /dev/null
+++ b/cadxcore/eventos/hidesplashwindow.h
@@ -0,0 +1,55 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Events
+{
+
+class EXTAPI EventHideSplashWindow : public GNC::GCS::Events::IEvent
+{
+public:
+
+        EventHideSplashWindow(GNC::GCS::IVista* pVista = NULL) : GNC::GCS::Events::IEvent(ginkgoEVT_Core_HideSplashWindow, 0, 100, pVista)
+        {
+                m_Nombre = "EventHideSplashWindow";
+        }
+
+        ~EventHideSplashWindow()
+        {
+        }
+
+        virtual void pushInfo(std::ostream& /*out*/) const
+        {
+        }
+
+protected:
+};
+
+}
+}
+}
diff --git a/cadxcore/eventos/integration.h b/cadxcore/eventos/integration.h
new file mode 100644
index 0000000..9e2d0b9
--- /dev/null
+++ b/cadxcore/eventos/integration.h
@@ -0,0 +1,71 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+#include <api/imodelointegracion.h>
+#include <api/autoptr.h>
+
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Events
+{
+
+class EXTAPI HL7SendRequestEvent : public GNC::GCS::Events::IEvent
+{
+private:
+        std::string m_Message;
+
+public:
+        HL7SendRequestEvent() : GNC::GCS::Events::IEvent(ginkgoEVT_Core_HL7SendRequest, 0, 100, NULL)
+        {
+                m_Nombre = "HL7SendRequest";
+        }
+
+        HL7SendRequestEvent(const std::string& msg): GNC::GCS::Events::IEvent(ginkgoEVT_Core_HL7SendRequest, 0, 100, NULL)
+        {
+                this->m_Nombre  = "HL7SendRequest";
+                this->m_Message = msg;
+
+        }
+
+        ~HL7SendRequestEvent()
+        {
+        }
+
+        const std::string& GetMessage() const
+        {
+                return m_Message;
+        }
+
+        virtual void pushInfo(std::ostream& out) const
+        {
+                out << "HL7SendRequest ()";
+        }
+};
+}
+}
+}
diff --git a/cadxcore/eventos/mensajes.h b/cadxcore/eventos/mensajes.h
new file mode 100644
index 0000000..b0aa681
--- /dev/null
+++ b/cadxcore/eventos/mensajes.h
@@ -0,0 +1,107 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Events
+{
+
+//este evento servir� para lanzar mensajes al usuario, en el status bar y en un futuro en el popup window q sea
+class EXTAPI EventoMensajes : public GNC::GCS::Events::IEvent
+{
+public:
+        typedef enum {
+                StatusMessage,
+                PopUpMessage
+        } TipoEventoMensajes;
+
+        typedef enum {
+                Informacion,
+                Aviso,
+                Error
+        } TipoGravedad;
+
+        EventoMensajes(GNC::GCS::IVista* pVista, TipoEventoMensajes tipo = StatusMessage, TipoGravedad gravedad = Informacion): GNC::GCS::Events::IEvent(ginkgoEVT_Core_MensajesUsuario,0,100,pVista)
+        {
+                m_Nombre = "Mensajes";
+                m_tipo = tipo;
+                m_gravedad = gravedad;
+                m_sincrono = true;
+        }
+
+        EventoMensajes(GNC::GCS::IVista* pVista,const std::string& mensaje, TipoEventoMensajes tipo = StatusMessage, bool sincrono = true, TipoGravedad gravedad = Informacion) : GNC::GCS::Events::IEvent(ginkgoEVT_Core_MensajesUsuario,0,100,pVista)
+        {
+                m_Nombre = "Mensajes";
+                m_Mensaje = mensaje;
+                m_tipo = tipo;
+                m_gravedad = gravedad;
+                m_sincrono = sincrono;
+        }
+
+        ~EventoMensajes()
+        {
+        }
+
+        std::string& GetMensaje()
+        {
+                return m_Mensaje;
+        }
+
+        TipoEventoMensajes GetTipo()
+        {
+                return m_tipo;
+        }
+
+        void SetGravedad(TipoGravedad gravedad)
+        {
+                m_gravedad = gravedad;
+        }
+
+        TipoGravedad GetGravedad()
+        {
+                return m_gravedad;
+        }
+
+        bool IsSincronoConLaInterfaz()
+        {
+                return m_sincrono;
+        }
+
+        virtual void pushInfo(std::ostream& out) const
+        {
+                out << "Mensaje: " << m_Mensaje;
+        }
+
+protected:
+        std::string        m_Mensaje;
+        TipoEventoMensajes m_tipo;
+        TipoGravedad       m_gravedad;
+        bool               m_sincrono;
+};
+}
+}
+}
diff --git a/cadxcore/eventos/modificacionfichero.h b/cadxcore/eventos/modificacionfichero.h
new file mode 100644
index 0000000..fab6a17
--- /dev/null
+++ b/cadxcore/eventos/modificacionfichero.h
@@ -0,0 +1,109 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <vector>
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class IStudyContext;
+namespace Events
+{
+class EXTAPI EventoModificacionFichero: public GNC::GCS::Events::IEvent
+{
+public:
+
+        typedef std::list<std::string> ListaRutas;
+
+        typedef enum {
+                FicheroGuardado,
+                FicheroModificado,
+                FicheroCerrado
+        } TipoModificacion;
+
+        EventoModificacionFichero(GNC::GCS::IVista* pVistaModificada = NULL,  TipoModificacion  tipo = FicheroModificado, GNC::GCS::IVista* pVistaAmbito = NULL):GNC::GCS::Events::IEvent(ginkgoEVT_Core_ModificacionFichero,0,100,pVistaAmbito)
+        {
+                m_pVistaModificada = pVistaModificada;
+                m_tipo = tipo;
+                m_pContexto = NULL;
+                m_Nombre = "ModificacionFichero";
+        }
+
+        EventoModificacionFichero(GNC::GCS::IVista* pVistaModificada, IStudyContext* pContexto = NULL, TipoModificacion  tipo = FicheroModificado, GNC::GCS::IVista* pVistaAmbito = NULL):GNC::GCS::Events::IEvent(ginkgoEVT_Core_ModificacionFichero,0,100,pVistaAmbito)
+        {
+                m_pVistaModificada = pVistaModificada;
+                m_tipo = tipo;
+                m_pContexto = pContexto;
+                m_Nombre = "ModificacionFichero";
+        }
+
+        ~EventoModificacionFichero()
+        {
+                m_pVistaModificada=NULL;
+                m_pContexto = NULL;
+        }
+
+        TipoModificacion GetTipoEvento()
+        {
+                return m_tipo;
+        }
+
+
+        IStudyContext* GetContextoEstudio()
+        {
+                return m_pContexto;
+        }
+
+        GNC::GCS::IVista* GetVistaModificada()
+        {
+                return m_pVistaModificada;
+        }
+
+        virtual void pushInfo(std::ostream& out) const
+        {
+                out << "Tipo = ";
+                switch (m_tipo) {
+                case FicheroGuardado:
+                        out << "FicheroGuardado";
+                        break;
+                case FicheroModificado:
+                        out << "FicheroModificado";
+                        break;
+                case FicheroCerrado:
+                        out << "FicheroCerrado";
+                        break;
+                }
+        }
+
+protected:
+        GNC::GCS::IVista*  m_pVistaModificada;
+        TipoModificacion   m_tipo;
+        IStudyContext*  m_pContexto;
+};
+}
+}
+}
diff --git a/cadxcore/eventos/modificacionimagen.h b/cadxcore/eventos/modificacionimagen.h
new file mode 100644
index 0000000..c172b65
--- /dev/null
+++ b/cadxcore/eventos/modificacionimagen.h
@@ -0,0 +1,339 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+class vtkImageData;
+class vtkGinkgoImageViewer;
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Events
+{
+
+class EXTAPI EventoModificacionImagen : public GNC::GCS::Events::IEvent
+{
+public:
+
+        typedef enum {
+                ZM_CenteredBestFit = 0,
+                ZM_CenteredOriginalSize = 1,
+        } ResetZoomMode;
+
+        typedef enum {
+                ImagenCargada,
+                ImagenModificada,
+                ImagenRecalibrada,
+                ImagenDescargada,
+                VisualizacionImagenModificada,
+                SliceCambiado,
+                MapaModificado,
+                AnotacionesEstaticasModificadas
+        } TipoModificacion;
+
+        // El parametro render indica si en el preprocesado de este evento, se debería apilar o no un render
+        EventoModificacionImagen(GNC::GCS::IVista* pVista = NULL, TipoModificacion tipo = ImagenCargada, int sliceAfectado = -1, bool apilarRender = true) : GNC::GCS::Events::IEvent(ginkgoEVT_Core_ModificacionImagen, 0, 100, pVista)
+        {
+                m_Nombre = "ModificacionImagen";
+                m_SliceAfectado = sliceAfectado;
+                m_Tipo = tipo;
+                m_ApilarRender = apilarRender;
+                m_OldSpacing[0] = m_OldSpacing[1] = m_OldSpacing[2] = 0.0f;
+                m_NewSpacing[0] = m_NewSpacing[1] = m_NewSpacing[2] = 0.0f;
+                m_OldOrigin[0] = m_OldOrigin[1] = m_OldOrigin[2] = 0.0f;
+                m_NewOrigin[0] = m_NewOrigin[1] = m_NewOrigin[2] = 0.0f;
+                m_newWindow = 0.0f;
+                m_newLevel = 0.0f;
+                m_resetWL = false;
+                m_resetBC = false;
+                m_resetCurrentPoint = false;
+                m_resetZoom = false;
+                m_resetZoomMode = ZM_CenteredBestFit;
+                m_autoCalculeWL = false;
+                if (tipo == VisualizacionImagenModificada) {
+                        int x = 1;
+                        x++;
+                }
+        }
+
+        ~EventoModificacionImagen()
+        {
+        }
+
+        virtual void pushInfo(std::ostream& out) const
+        {
+                out << "Tipo = ";
+                switch (m_Tipo) {
+                case ImagenCargada:
+                        out << "ImagenCargada";
+                        break;
+                case ImagenModificada:
+                        out << "ImagenModificada";
+                        break;
+                case ImagenRecalibrada:
+                        out << "ImagenRecalibrada";
+                        break;
+                case ImagenDescargada:
+                        out << "ImagenDescargada";
+                        break;
+                case VisualizacionImagenModificada:
+                        out << "VisualizacionImagenModificada";
+                        break;
+                case SliceCambiado:
+                        out << "SliceCambiado";
+                        break;
+                case MapaModificado:
+                        out << "MapaModificado";
+                        break;
+                case AnotacionesEstaticasModificadas:
+                        out << "AnotacionesEstaticasModificadas";
+                        break;
+                }
+                out << ", SliceAfectado = " << m_SliceAfectado;
+                if (m_Tipo == ImagenRecalibrada) {
+                        out << ", OldSpacing = [ " << m_OldSpacing[0] << ", " << m_OldSpacing[1] << ", " << m_OldSpacing[2] << " ]";
+                        out << ", NewSpacing = [ " << m_NewSpacing[0] << ", " << m_NewSpacing[1] << ", " << m_NewSpacing[2] << " ]";
+                        out << ", OldOrigin = [ " << m_OldOrigin[0] << ", " << m_OldOrigin[1] << ", " << m_OldOrigin[2] << " ]";
+                        out << ", NewOrigin = [ " << m_NewOrigin[0] << ", " << m_NewOrigin[1] << ", " << m_NewOrigin[2] << " ]";
+                }
+        }
+
+        inline void SetSlice(int slice)
+        {
+                m_SliceAfectado = slice;
+        }
+
+        inline int GetSliceAfectado() const
+        {
+                return m_SliceAfectado;
+        }
+
+        inline bool GetApilarRender() const
+        {
+                return m_ApilarRender;
+        }
+
+        inline TipoModificacion GetTipo()
+        {
+                return m_Tipo;
+        }
+
+        inline void GetOldSpacing(double spacing[3])
+        {
+                spacing[0] = m_OldSpacing[0];
+                spacing[1] = m_OldSpacing[1];
+                spacing[2] = m_OldSpacing[2];
+        }
+
+        inline double* GetOldSpacing()
+        {
+                return m_OldSpacing;
+        }
+
+        inline void SetOldSpacing(double spacing[3])
+        {
+                m_OldSpacing[0] = spacing[0];
+                m_OldSpacing[1] = spacing[1];
+                m_OldSpacing[2] = spacing[2];
+        }
+
+        inline void GetNewSpacing(double spacing[3])
+        {
+                spacing[0] = m_NewSpacing[0];
+                spacing[1] = m_NewSpacing[1];
+                spacing[2] = m_NewSpacing[2];
+        }
+
+        inline double* GetNewSpacing()
+        {
+                return m_NewSpacing;
+        }
+
+        inline void SetNewSpacing(double spacing[3])
+        {
+                m_NewSpacing[0] = spacing[0];
+                m_NewSpacing[1] = spacing[1];
+                m_NewSpacing[2] = spacing[2];
+        }
+
+        inline void GetOldOrigin(double origin[3])
+        {
+                origin[0] = m_OldOrigin[0];
+                origin[1] = m_OldOrigin[1];
+                origin[2] = m_OldOrigin[2];
+        }
+
+        inline double* GetOldOrigin()
+        {
+                return m_OldOrigin;
+        }
+
+        inline void SetOldOrigin(double origin[3])
+        {
+                m_OldOrigin[0] = origin[0];
+                m_OldOrigin[1] = origin[1];
+                m_OldOrigin[2] = origin[2];
+        }
+
+        inline void GetNewOrigin(double origin[3])
+        {
+                origin[0] = m_NewOrigin[0];
+                origin[1] = m_NewOrigin[1];
+                origin[2] = m_NewOrigin[2];
+        }
+
+        inline double* GetNewOrigin()
+        {
+                return m_NewOrigin;
+        }
+
+        inline void SetNewOrigin(double origin[3])
+        {
+                m_NewOrigin[0] = origin[0];
+                m_NewOrigin[1] = origin[1];
+                m_NewOrigin[2] = origin[2];
+        }
+
+        inline void GetProporcionSpacing(double proporcionSpacing[3])
+        {
+                proporcionSpacing[0] = m_NewSpacing[0]/m_OldSpacing[0];
+                proporcionSpacing[1] = m_NewSpacing[1]/m_OldSpacing[1];
+                proporcionSpacing[2] = m_NewSpacing[2]/m_OldSpacing[2];
+        }
+
+        inline void GetDiferenciaOrigin(double diferenciaOrigin[3])
+        {
+                diferenciaOrigin[0] = m_NewOrigin[0] - m_OldOrigin[0];
+                diferenciaOrigin[1] = m_NewOrigin[1] - m_OldOrigin[1];
+                diferenciaOrigin[2] = m_NewOrigin[2] - m_OldOrigin[2];
+        }
+
+        inline double GetWindow()
+        {
+                return m_newWindow;
+        }
+
+        inline void SetWindow(double window)
+        {
+                m_newWindow=window;
+        }
+
+        inline double GetLevel()
+        {
+                return m_newLevel;
+        }
+
+        inline void SetLevel(double level)
+        {
+                m_newLevel = level;
+        }
+
+        inline bool ResetWindowLevel()
+        {
+                return m_resetWL;
+        }
+
+        inline bool ResetCurrentPoint()
+        {
+                return m_resetCurrentPoint;
+        }
+
+        inline bool ResetZoom()
+        {
+                return m_resetZoom;
+        }
+
+        inline bool ResetBrightnessContrast()
+        {
+                return m_resetBC;
+        }
+
+        inline ResetZoomMode GetResetZoomMode()
+        {
+                return m_resetZoomMode;
+        }
+
+        inline bool AutoCalculeWindowLevel()
+        {
+                return m_autoCalculeWL;
+        }
+
+        inline void EnableResetWindowLevel()
+        {
+                m_resetWL = true;
+        }
+
+        inline void EnableResetBrightnessContrast()
+        {
+                m_resetBC = true;
+        }
+
+        inline void EnableAutoCalculeWindowLevel()
+        {
+                m_autoCalculeWL = true;
+        }
+
+        inline void EnableResetCurrentPoint()
+        {
+                m_resetCurrentPoint = true;
+        }
+
+        inline void EnableResetZoom(ResetZoomMode zoomMode = ZM_CenteredBestFit)
+        {
+                m_resetZoom = true;
+                m_resetZoomMode = zoomMode;
+        }
+
+        inline void ResetearCalibracion()
+        {
+                m_NewSpacing[0] = m_OldSpacing[0];
+                m_NewSpacing[1] = m_OldSpacing[1];
+                m_NewSpacing[2] = m_OldSpacing[2];
+
+                m_NewOrigin[0] = m_OldOrigin[0];
+                m_NewOrigin[1] = m_OldOrigin[1];
+                m_NewOrigin[2] = m_OldOrigin[2];
+
+        }
+protected:
+        double           m_OldSpacing[3];
+        double           m_NewSpacing[3];
+        double           m_OldOrigin[3];
+        double           m_NewOrigin[3];
+        int              m_SliceAfectado;
+        bool             m_ApilarRender;
+        TipoModificacion m_Tipo;
+        double			 m_newWindow;
+        double			 m_newLevel;
+        bool             m_resetWL;
+        bool             m_resetBC;
+        bool             m_resetCurrentPoint;
+        bool             m_resetZoom;
+        bool             m_autoCalculeWL;
+        ResetZoomMode    m_resetZoomMode;
+};
+}
+}
+}
diff --git a/cadxcore/eventos/modificacionwidget.h b/cadxcore/eventos/modificacionwidget.h
new file mode 100644
index 0000000..cfe0348
--- /dev/null
+++ b/cadxcore/eventos/modificacionwidget.h
@@ -0,0 +1,92 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+namespace Widgets
+{
+class IWidget;
+}
+
+namespace Events
+{
+
+class EXTAPI EventoModificacionWidget : public GNC::GCS::Events::IEvent
+{
+public:
+
+        typedef enum {
+                WidgetCreado,
+                WidgetModificado,
+                WidgetDestruido
+        } TipoModificacion;
+
+        EventoModificacionWidget(GNC::GCS::IVista* pVista = NULL, TipoModificacion tipo = WidgetModificado, GNC::GCS::Widgets::IWidget* w = NULL) : GNC::GCS::Events::IEvent(ginkgoEVT_Core_ModificacionWidget,0,100,pVista)
+        {
+                m_Nombre = "ModificacionWidget";
+                m_pWidget = w;
+                m_Tipo = tipo;
+        }
+
+        ~EventoModificacionWidget()
+        {
+        }
+
+        virtual void pushInfo(std::ostream& out) const
+        {
+                out << "Tipo = ";
+                switch (m_Tipo) {
+                case WidgetCreado:
+                        out << "WidgetCreado";
+                        break;
+                case WidgetModificado:
+                        out << "WidgetModificado";
+                        break;
+                case WidgetDestruido:
+                        out << "WidgetDestruido";
+                        break;
+                }
+        }
+
+        GNC::GCS::Widgets::IWidget* GetWidget()
+        {
+                return m_pWidget;
+        }
+
+        TipoModificacion GetTipo()
+        {
+                return m_Tipo;
+        }
+
+protected:
+        TipoModificacion            m_Tipo;
+        GNC::GCS::Widgets::IWidget* m_pWidget;
+};
+}
+}
+}
diff --git a/cadxcore/eventos/progresocomando.h b/cadxcore/eventos/progresocomando.h
new file mode 100644
index 0000000..6a3fd23
--- /dev/null
+++ b/cadxcore/eventos/progresocomando.h
@@ -0,0 +1,111 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+class IComando;
+
+namespace Events
+{
+
+class EXTAPI EventoProgresoComando : public GNC::GCS::Events::IEvent
+{
+public:
+
+        typedef enum {
+                TEP_Iniciado,
+                TEP_Progreso,
+                TEP_Finalizado,
+                TEP_Unknown
+        } TipoEventoProgreso;
+
+        EventoProgresoComando(IComando* pComando = NULL, TipoEventoProgreso tipo = TEP_Unknown, float progresoNormalizado = 0.0f, const std::string& texto = "") : GNC::GCS::Events::IEvent(ginkgoEVT_Core_ProgresoComando, 0, 100, NULL)
+        {
+                m_Nombre = "ProgresoComando";
+                m_pComando = pComando;
+                m_Tipo = tipo;
+                m_ProgresoNormalizado = progresoNormalizado;
+                m_Texto = texto;
+        }
+
+        ~EventoProgresoComando()
+        {
+        }
+
+        virtual void pushInfo(std::ostream& out) const
+        {
+                out << "Tipo = ";
+                switch (m_Tipo) {
+                case TEP_Iniciado:
+                        out << "Iniciado";
+                        break;
+                case TEP_Progreso:
+                        out << "Progreso";
+                        break;
+                case TEP_Finalizado:
+                        out << "Finalizado";
+                        break;
+                case TEP_Unknown:
+                default:
+                        out << "Unknown";
+                        break;
+                }
+                out << ", Progreso = " << m_ProgresoNormalizado << ", Texto = " << m_Texto << ", Comando = " << m_pComando;
+        }
+
+        IComando* GetComando() const
+        {
+                return m_pComando;
+        }
+
+        TipoEventoProgreso GetTipo() const
+        {
+                return m_Tipo;
+        }
+
+        float GetProgresoNormalizado() const
+        {
+                return m_ProgresoNormalizado;
+        }
+
+        const std::string& GetTexto() const
+        {
+                return m_Texto;
+        }
+
+protected:
+        GNC::GCS::IComando*             m_pComando;
+        TipoEventoProgreso              m_Tipo;
+        float                           m_ProgresoNormalizado;
+        std::string                     m_Texto;
+
+};
+
+}
+}
+}
diff --git a/cadxcore/eventos/render.h b/cadxcore/eventos/render.h
new file mode 100644
index 0000000..2fadb58
--- /dev/null
+++ b/cadxcore/eventos/render.h
@@ -0,0 +1,58 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Events
+{
+
+class EXTAPI EventoRender : public GNC::GCS::Events::IEvent
+{
+public:
+
+        EventoRender(GNC::GCS::IVista* pVista, int sliceAfectado = -1) : GNC::GCS::Events::IEvent(ginkgoEVT_Core_Render,0,100,pVista)
+        {
+                m_Nombre = "Render";
+                m_SliceAfectado = sliceAfectado;
+        }
+
+        ~EventoRender()
+        {
+        }
+
+        virtual void pushInfo(std::ostream& out) const
+        {
+                out << "Slice = " << m_SliceAfectado;
+        }
+
+protected:
+        int              m_SliceAfectado;
+};
+
+}
+}
+}
diff --git a/cadxcore/eventos/scgenerated.h b/cadxcore/eventos/scgenerated.h
new file mode 100644
index 0000000..14b77b2
--- /dev/null
+++ b/cadxcore/eventos/scgenerated.h
@@ -0,0 +1,69 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+namespace Events
+{
+
+class EXTAPI SCGeneratedEvent : public GNC::GCS::Events::IEvent
+{
+
+public:
+        SCGeneratedEvent(GNC::GCS::IVista* pView = NULL, const std::list<long>& newSeriesId = std::list<long>()) : GNC::GCS::Events::IEvent(ginkgoEVT_Core_SCGenerated, 0, 100, NULL),
+                m_pView(pView),
+                m_seriesId(newSeriesId)
+        {
+                m_Nombre = "SCGeneratedEvent";
+        }
+
+        ~SCGeneratedEvent()
+        {
+        }
+
+        const std::list<long>& GetSeriesId()
+        {
+                return m_seriesId;
+        }
+
+        GNC::GCS::IVista* GetView()
+        {
+                return m_pView;
+        }
+
+        virtual void pushInfo(std::ostream& /*out*/) const
+        {
+        }
+
+private:
+        GNC::GCS::IVista* m_pView;
+        std::list<long> m_seriesId;
+};
+}
+}
+}
diff --git a/cadxcore/eventos/toolevents.h b/cadxcore/eventos/toolevents.h
new file mode 100644
index 0000000..458de30
--- /dev/null
+++ b/cadxcore/eventos/toolevents.h
@@ -0,0 +1,159 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+class wxBitmap;
+namespace GNC
+{
+namespace GCS
+{
+class ITool;
+class IToolController;
+namespace Events
+{
+class EXTAPI ToolConnectedEvent : public GNC::GCS::Events::IEvent
+{
+private:
+        bool connected;
+        GNC::GCS::ITool* pTool;
+        GNC::GCS::IToolController* pToolBar;
+public:
+        ToolConnectedEvent() : GNC::GCS::Events::IEvent(ginkgoEVT_Core_ToolConnected, 0, 100, NULL)
+        {
+                connected = false;
+                pTool = NULL;
+                pToolBar = NULL;
+        }
+
+        ToolConnectedEvent(bool connected, GNC::GCS::ITool* pTool, GNC::GCS::IToolController* pToolBar): GNC::GCS::Events::IEvent(ginkgoEVT_Core_ToolConnected, 0, 100, NULL)
+        {
+                this->connected = connected;
+                this->pTool = pTool;
+                this->pToolBar = pToolBar;
+        }
+
+        ~ToolConnectedEvent()
+        {
+        }
+
+        bool IsConnected()
+        {
+                return connected;
+        }
+
+        GNC::GCS::ITool* GetTool()
+        {
+                return pTool;
+        }
+
+        GNC::GCS::IToolController* GetToolBar()
+        {
+                return pToolBar;
+        }
+};
+
+class EXTAPI ToolEnabledEvent : public GNC::GCS::Events::IEvent
+{
+private:
+        bool enabled;
+        GNC::GCS::ITool* pTool;
+        GNC::GCS::IToolController* pToolBar;
+public:
+        ToolEnabledEvent() : GNC::GCS::Events::IEvent(ginkgoEVT_Core_ToolEnabled, 0, 100, NULL)
+        {
+                enabled = false;
+                pTool = NULL;
+                pToolBar = NULL;
+        }
+
+        ToolEnabledEvent(bool enabled, GNC::GCS::ITool* pTool, GNC::GCS::IToolController* pToolBar): GNC::GCS::Events::IEvent(ginkgoEVT_Core_ToolEnabled, 0, 100, NULL)
+        {
+                this->enabled = enabled;
+                this->pTool = pTool;
+                this->pToolBar = pToolBar;
+        }
+
+        ~ToolEnabledEvent()
+        {
+        }
+
+        bool IsEnabled()
+        {
+                return enabled;
+        }
+
+        GNC::GCS::ITool* GetTool()
+        {
+                return pTool;
+        }
+
+        GNC::GCS::IToolController* GetToolBar()
+        {
+                return pToolBar;
+        }
+};
+
+class EXTAPI ChangeToolIconEvent : public GNC::GCS::Events::IEvent
+{
+private:
+        const wxBitmap* pBitmap;
+        GNC::GCS::ITool* pTool;
+        GNC::GCS::IToolController* pToolBar;
+public:
+        ChangeToolIconEvent() : GNC::GCS::Events::IEvent(ginkgoEVT_Core_ToolIconChanged, 0, 100, NULL)
+        {
+                pBitmap = NULL;
+                pTool = NULL;
+                pToolBar = NULL;
+        }
+
+        ChangeToolIconEvent(const wxBitmap* bmp, GNC::GCS::ITool* pTool, GNC::GCS::IToolController* pToolBar): GNC::GCS::Events::IEvent(ginkgoEVT_Core_ToolIconChanged, 0, 100, NULL),pBitmap(bmp)
+        {
+                this->pTool = pTool;
+                this->pToolBar = pToolBar;
+        }
+
+        ~ChangeToolIconEvent()
+        {
+        }
+
+        const wxBitmap* GetBitmap()
+        {
+                return pBitmap;
+        }
+
+        GNC::GCS::ITool* GetTool()
+        {
+                return pTool;
+        }
+
+        GNC::GCS::IToolController* GetToolBar()
+        {
+                return pToolBar;
+        }
+};
+
+}
+}
+}
diff --git a/cadxcore/eventos/updateavailable.h b/cadxcore/eventos/updateavailable.h
new file mode 100644
index 0000000..d9de68d
--- /dev/null
+++ b/cadxcore/eventos/updateavailable.h
@@ -0,0 +1,102 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Events
+{
+
+class EXTAPI EventoUpdateAvailable : public GNC::GCS::Events::IEvent
+{
+private:
+        std::string m_VersionString;
+        int         m_Revision;
+        std::string m_Description;
+        std::string m_URL;
+        bool        m_Informar;
+
+public:
+        EventoUpdateAvailable() :
+                GNC::GCS::Events::IEvent(ginkgoEVT_Core_UpdateAvailable, 0, 100, NULL),
+                m_VersionString(),
+                m_Revision(0),
+                m_Description(),
+                m_URL(),
+                m_Informar(false)
+        {
+                m_Nombre = "UpdateAvailable";
+        }
+
+        EventoUpdateAvailable(std::string& versionString, int revision, const std::string& description, const std::string& url, bool informar):
+                GNC::GCS::Events::IEvent(ginkgoEVT_Core_UpdateAvailable, 0, 100, NULL),
+                m_VersionString(versionString),
+                m_Revision(revision),
+                m_Description(description),
+                m_URL(url),
+                m_Informar(informar)
+
+        {
+                m_Nombre = "UpdateAvailable";
+        }
+
+        ~EventoUpdateAvailable()
+        {
+        }
+
+        const std::string& GetURL()
+        {
+                return m_URL;
+        }
+
+        bool Informar()
+        {
+                return m_Informar;
+        }
+
+        int GetRevision()
+        {
+                return m_Revision;
+        }
+
+        const std::string& GetVersionString()
+        {
+                return m_VersionString;
+        }
+
+        const std::string& GetDescription()
+        {
+                return m_Description;
+        }
+
+        virtual void pushInfo(std::ostream& out) const
+        {
+                out << "UpdateAvailable (" << m_VersionString << ") from " << m_URL;
+        }
+};
+}
+}
+}
diff --git a/cadxcore/eventos/views.h b/cadxcore/eventos/views.h
new file mode 100644
index 0000000..8262dd3
--- /dev/null
+++ b/cadxcore/eventos/views.h
@@ -0,0 +1,76 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/ievento.h>
+#include "eventosginkgo.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+namespace Events
+{
+
+class EXTAPI EventView : public GNC::GCS::Events::IEvent
+{
+
+public:
+        typedef enum {
+                Creation,
+                Initialized,
+                Destruction
+        } EventViewType;
+
+        EventView(GNC::GCS::IVista* pView = NULL, EventViewType type = Creation) : GNC::GCS::Events::IEvent(ginkgoEVT_Core_Views, 0, 100, NULL)
+        {
+                m_Nombre = "EventView";
+                m_pView = pView;
+                m_type = type;
+        }
+
+        ~EventView()
+        {
+        }
+
+        EventViewType GetType()
+        {
+                return m_type;
+        }
+
+        GNC::GCS::IVista* GetView()
+        {
+                return m_pView;
+        }
+
+        virtual void pushInfo(std::ostream& /*out*/) const
+        {
+        }
+
+private:
+        GNC::GCS::IVista* m_pView;
+        EventViewType m_type;
+
+};
+}
+}
+}
diff --git a/cadxcore/export/contracts/ipixelsbluringcontract.cpp b/cadxcore/export/contracts/ipixelsbluringcontract.cpp
new file mode 100644
index 0000000..92383b1
--- /dev/null
+++ b/cadxcore/export/contracts/ipixelsbluringcontract.cpp
@@ -0,0 +1,64 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ipixelsbluringcontract.h"
+#include <main/controllers/modalitysettingscontroller.h>
+#include <api/iwidgetsmanager.h>
+#include <api/ivista.h>
+#include <api/istudycontext.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtkSystemIncludes.h>
+
+GNC::GCS::IPixelsBluringContract::IPixelsBluringContract() : IWidgetsContract()
+{
+}
+
+GNC::GCS::IPixelsBluringContract::~IPixelsBluringContract()
+{
+}
+
+void GNC::GCS::IPixelsBluringContract::Setup(const std::string& modality)
+{
+        if (GetManager() != NULL && GetManager()->GetVista() != NULL) {
+                GNC::GCS::Ptr<DefaultModalitySettings> ptr = GNC::GCS::ModalitySettingsController::Instance()->getModalitySettings(modality);
+                if (ptr.IsValid()) {
+                        int interpolationMode = VTK_LINEAR_INTERPOLATION;
+                        switch(ptr->getInterpolationMode()) {
+                        case GNC::GCS::DefaultModalitySettings::TIM_LINEAR:
+                                interpolationMode = VTK_LINEAR_INTERPOLATION;
+                                break;
+                        case GNC::GCS::DefaultModalitySettings::TIM_NEAREST_NEIGHBOUR:
+                                interpolationMode = VTK_NEAREST_INTERPOLATION;
+                                break;
+                        case GNC::GCS::DefaultModalitySettings::TIM_CUBIC:
+                                //	interpolationMode = VTK_CUBIC_INTERPOLATION;
+                                interpolationMode = 2;//en linux no encuentra cubic
+                                break;
+                        }
+                        GNC::GCS::IWidgetsContract::TViewerList list;
+                        GetAllViewers(list);
+                        for (GNC::GCS::IWidgetsContract::TViewerList::iterator it = list.begin(); it != list.end(); ++it) {
+                                vtkGinkgoImageViewer* pW = (*it);
+                                pW->SetInterpolationMode(interpolationMode);
+                        }
+                }
+
+        }
+}
diff --git a/cadxcore/export/contracts/ipixelsbluringcontract.h b/cadxcore/export/contracts/ipixelsbluringcontract.h
new file mode 100644
index 0000000..cf656d1
--- /dev/null
+++ b/cadxcore/export/contracts/ipixelsbluringcontract.h
@@ -0,0 +1,51 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <list>
+#include <vector>
+
+#include <api/api.h>
+#include <export/contracts/iwidgetscontract.h>
+
+namespace GIL
+{
+namespace DICOM
+{
+class DicomDataset;
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IPixelsBluringContract : public IWidgetsContract
+{
+public:
+        IPixelsBluringContract();
+
+        ~IPixelsBluringContract();
+
+        virtual void Setup(const std::string& modality);
+};
+}
+}
+
diff --git a/cadxcore/export/contracts/ipixelsbluringcontractable.cpp b/cadxcore/export/contracts/ipixelsbluringcontractable.cpp
new file mode 100644
index 0000000..ba4a710
--- /dev/null
+++ b/cadxcore/export/contracts/ipixelsbluringcontractable.cpp
@@ -0,0 +1,45 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "ipixelsbluringcontractable.h"
+#include <export/contracts/ipixelsbluringcontract.h>
+
+GNC::GCS::IPixelsBluringContractable::IPixelsBluringContractable()
+{
+        PixelsBluringContract = NULL;
+}
+
+GNC::GCS::IPixelsBluringContractable::~IPixelsBluringContractable()
+{
+}
+
+bool GNC::GCS::IPixelsBluringContractable::IsValidContract(IContract* contract)
+{
+        GNC::GCS::IPixelsBluringContract* pWContract = dynamic_cast<GNC::GCS::IPixelsBluringContract*>(contract);
+        return pWContract != NULL;
+}
+
+
+void GNC::GCS::IPixelsBluringContractable::Register(IContract* contract)
+{
+        GNC::GCS::IContractable::Register(contract);
+        PixelsBluringContract = static_cast<GNC::GCS::IPixelsBluringContract*>(contract);
+}
diff --git a/cadxcore/export/contracts/ipixelsbluringcontractable.h b/cadxcore/export/contracts/ipixelsbluringcontractable.h
new file mode 100644
index 0000000..aad0e7b
--- /dev/null
+++ b/cadxcore/export/contracts/ipixelsbluringcontractable.h
@@ -0,0 +1,43 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/icontract.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IPixelsBluringContract;
+class EXTAPI IPixelsBluringContractable: public GNC::GCS::IContractable
+{
+public:
+        IPixelsBluringContractable();
+        virtual ~IPixelsBluringContractable();
+
+        virtual bool IsValidContract(IContract* contract);
+
+        virtual void Register(IContract* contract);
+protected:
+        GNC::GCS::IPixelsBluringContract* PixelsBluringContract;
+};
+}
+}
diff --git a/cadxcore/export/contracts/irulecontract.cpp b/cadxcore/export/contracts/irulecontract.cpp
new file mode 100644
index 0000000..c476f55
--- /dev/null
+++ b/cadxcore/export/contracts/irulecontract.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "irulecontract.h"
+
+GNC::GCS::IRuleContract::IRuleContract()
+{
+}
+
+GNC::GCS::IRuleContract::~IRuleContract()
+{
+}
diff --git a/cadxcore/export/contracts/irulecontract.h b/cadxcore/export/contracts/irulecontract.h
new file mode 100644
index 0000000..e753944
--- /dev/null
+++ b/cadxcore/export/contracts/irulecontract.h
@@ -0,0 +1,48 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IRULECONTRACT_H
+#define IRULECONTRACT_H
+
+#include <list>
+
+#include <api/api.h>
+#include <export/contracts/iwidgetscontract.h>
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IRuleContract : public IWidgetsContract
+{
+public:
+
+        IRuleContract();
+
+        ~IRuleContract();
+
+        virtual bool SupportsCallibration() = 0;
+};
+}
+}
+
+#endif
diff --git a/cadxcore/export/contracts/irulecontractable.cpp b/cadxcore/export/contracts/irulecontractable.cpp
new file mode 100644
index 0000000..3f27309
--- /dev/null
+++ b/cadxcore/export/contracts/irulecontractable.cpp
@@ -0,0 +1,45 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "irulecontractable.h"
+#include <export/contracts/irulecontract.h>
+
+GNC::GCS::IRuleContractable::IRuleContractable()
+{
+        RuleContract = NULL;
+}
+
+GNC::GCS::IRuleContractable::~IRuleContractable()
+{
+}
+
+bool GNC::GCS::IRuleContractable::IsValidContract(IContract* contract)
+{
+        GNC::GCS::IRuleContract* pWContract = dynamic_cast<GNC::GCS::IRuleContract*>(contract);
+        return pWContract != NULL;
+}
+
+
+void GNC::GCS::IRuleContractable::Register(IContract* contract)
+{
+        GNC::GCS::IContractable::Register(contract);
+        RuleContract = static_cast<GNC::GCS::IRuleContract*>(contract);
+}
diff --git a/cadxcore/export/contracts/irulecontractable.h b/cadxcore/export/contracts/irulecontractable.h
new file mode 100644
index 0000000..090e15b
--- /dev/null
+++ b/cadxcore/export/contracts/irulecontractable.h
@@ -0,0 +1,43 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/icontract.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IRuleContract;
+class EXTAPI IRuleContractable: public GNC::GCS::IContractable
+{
+public:
+        IRuleContractable();
+        virtual ~IRuleContractable();
+
+        virtual bool IsValidContract(IContract* contract);
+
+        virtual void Register(IContract* contract);
+protected:
+        GNC::GCS::IRuleContract* RuleContract;
+};
+}
+}
diff --git a/cadxcore/export/contracts/islidercontract.cpp b/cadxcore/export/contracts/islidercontract.cpp
new file mode 100644
index 0000000..4647024
--- /dev/null
+++ b/cadxcore/export/contracts/islidercontract.cpp
@@ -0,0 +1,37 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "islidercontract.h"
+
+GNC::GCS::ISliderContract::ISliderContract()
+{
+}
+
+GNC::GCS::ISliderContract::~ISliderContract()
+{
+}
+
+void GNC::GCS::ISliderContract::GoToNextSeries() const
+{
+}
+
+void GNC::GCS::ISliderContract::GoToPrevSeries() const
+{
+}
diff --git a/cadxcore/export/contracts/islidercontract.h b/cadxcore/export/contracts/islidercontract.h
new file mode 100644
index 0000000..af051b1
--- /dev/null
+++ b/cadxcore/export/contracts/islidercontract.h
@@ -0,0 +1,53 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ISLIDERCONTRACT_H
+#define ISLIDERCONTRACT_H
+
+#include <list>
+
+#include <api/api.h>
+#include <export/contracts/iwidgetscontract.h>
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI ISliderContract : public IWidgetsContract
+{
+public:
+
+        ISliderContract();
+
+        ~ISliderContract();
+
+        virtual void SetSlice(int slicenum) = 0;
+        virtual int GetSlice() const = 0;
+        virtual int GetNumberOfSlices() const = 0;
+
+        virtual void GoToNextSeries() const;
+        virtual void GoToPrevSeries() const;
+};
+}
+}
+
+#endif
diff --git a/cadxcore/export/contracts/islidercontractable.cpp b/cadxcore/export/contracts/islidercontractable.cpp
new file mode 100644
index 0000000..6a1e2f3
--- /dev/null
+++ b/cadxcore/export/contracts/islidercontractable.cpp
@@ -0,0 +1,45 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "islidercontractable.h"
+#include <export/contracts/islidercontract.h>
+
+GNC::GCS::ISliderContractable::ISliderContractable()
+{
+        SliderContract = NULL;
+}
+
+GNC::GCS::ISliderContractable::~ISliderContractable()
+{
+}
+
+bool GNC::GCS::ISliderContractable::IsValidContract(IContract* contract)
+{
+        GNC::GCS::ISliderContract* pWContract = dynamic_cast<GNC::GCS::ISliderContract*>(contract);
+        return pWContract != NULL;
+}
+
+
+void GNC::GCS::ISliderContractable::Register(IContract* contract)
+{
+        GNC::GCS::IContractable::Register(contract);
+        SliderContract = static_cast<GNC::GCS::ISliderContract*>(contract);
+}
diff --git a/cadxcore/export/contracts/islidercontractable.h b/cadxcore/export/contracts/islidercontractable.h
new file mode 100644
index 0000000..8b296a3
--- /dev/null
+++ b/cadxcore/export/contracts/islidercontractable.h
@@ -0,0 +1,44 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/icontract.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class ISliderContract;
+class EXTAPI ISliderContractable: public GNC::GCS::IContractable
+{
+public:
+        ISliderContractable();
+        virtual ~ISliderContractable();
+
+        virtual bool IsValidContract(IContract* contract);
+
+
+        virtual void Register(IContract* contract);
+protected:
+        GNC::GCS::ISliderContract* SliderContract;
+};
+}
+}
diff --git a/cadxcore/export/contracts/iviewcontract.cpp b/cadxcore/export/contracts/iviewcontract.cpp
new file mode 100644
index 0000000..6163f5a
--- /dev/null
+++ b/cadxcore/export/contracts/iviewcontract.cpp
@@ -0,0 +1,27 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iviewcontract.h"
+GNC::GCS::IViewContract::IViewContract()
+{
+}
+GNC::GCS::IViewContract::~IViewContract()
+{
+}
diff --git a/cadxcore/export/contracts/iviewcontract.h b/cadxcore/export/contracts/iviewcontract.h
new file mode 100644
index 0000000..96217bf
--- /dev/null
+++ b/cadxcore/export/contracts/iviewcontract.h
@@ -0,0 +1,43 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IVIEWCONTRACT_H
+#define IVIEWCONTRACT_H
+
+#include <api/icontract.h>
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+
+class EXTAPI IViewContract : public IContract
+{
+public:
+        IViewContract();
+        ~IViewContract();
+
+        virtual GNC::GCS::IVista* GetView() = 0;
+protected:
+};
+}
+}
+#endif
diff --git a/cadxcore/export/contracts/iviewcontractable.cpp b/cadxcore/export/contracts/iviewcontractable.cpp
new file mode 100644
index 0000000..f9f2f02
--- /dev/null
+++ b/cadxcore/export/contracts/iviewcontractable.cpp
@@ -0,0 +1,42 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "iviewcontractable.h"
+#include <export/contracts/iviewcontract.h>
+GNC::GCS::IViewContractable::IViewContractable()
+{
+        ViewContract = NULL;
+}
+GNC::GCS::IViewContractable::~IViewContractable()
+{
+}
+
+bool GNC::GCS::IViewContractable::IsValidContract(IContract* contract)
+{
+        GNC::GCS::IViewContract* pWContract = dynamic_cast<GNC::GCS::IViewContract*>(contract);
+        return pWContract != NULL;
+}
+
+void GNC::GCS::IViewContractable::Register(IContract* contract)
+{
+        GNC::GCS::IContractable::Register(contract);
+        ViewContract = static_cast<GNC::GCS::IViewContract*>(contract);
+}
diff --git a/cadxcore/export/contracts/iviewcontractable.h b/cadxcore/export/contracts/iviewcontractable.h
new file mode 100644
index 0000000..4ef756f
--- /dev/null
+++ b/cadxcore/export/contracts/iviewcontractable.h
@@ -0,0 +1,44 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/icontract.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IViewContract;
+class EXTAPI IViewContractable: public GNC::GCS::IContractable
+{
+public:
+        IViewContractable();
+        virtual ~IViewContractable();
+
+        virtual bool IsValidContract(IContract* contract);
+
+
+        virtual void Register(IContract* contract);
+protected:
+        GNC::GCS::IViewContract* ViewContract;
+};
+}
+}
diff --git a/cadxcore/export/contracts/iwidgetscontract.cpp b/cadxcore/export/contracts/iwidgetscontract.cpp
new file mode 100644
index 0000000..b3e35f6
--- /dev/null
+++ b/cadxcore/export/contracts/iwidgetscontract.cpp
@@ -0,0 +1,74 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iwidgetscontract.h"
+#include <api/icontexto.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/iwidgetsmanager.h>
+#include <api/ivista.h>
+#include <api/istudycontext.h>
+
+GNC::GCS::IWidgetsContract::IWidgetsContract()
+{
+}
+
+GNC::GCS::IWidgetsContract::~IWidgetsContract()
+{
+}
+
+void GNC::GCS::IWidgetsContract::GetAllViewers(TViewerList& viewerList)
+{
+        viewerList.push_back(GetViewerActivo());
+}
+
+bool GNC::GCS::IWidgetsContract::Inicializado()
+{
+        return ( (GetManager() != NULL) && (GetViewerActivo() != NULL) );
+}
+
+//Anotation section
+//this method processes special keys like: ${VOLUME.IDX} ${SLICE.WIDTH}...
+std::string GNC::GCS::IWidgetsContract::GetAnnotationValue(GNC::GCS::Contexto3D* c, const std::string& key)
+{
+        return GetTagValue(c, key);
+}
+
+//return dicom tag value from key
+std::string GNC::GCS::IWidgetsContract::GetTagValue(GNC::GCS::Contexto3D* /*c*/, const std::string& key)
+{
+        GNC::GCS::IWidgetsManager* pManager = GetManager();
+        if (pManager != NULL) {
+                std::string value;
+                if (pManager->GetVista()->GetEstudio()->GetTagActiveImage(key, value)) {
+                        return value;
+                }
+        }
+        return "";
+}
+
+vtkGinkgoImageViewer* GNC::GCS::IWidgetsContract::GetViewerActivo()
+{
+        GNC::GCS::IWidgetsManager* pManager = GetManager();
+        if (pManager != NULL) {
+                return pManager->GetRendererActivo()->m_pImageViewer;
+        } else {
+                return NULL;
+        }
+}
diff --git a/cadxcore/export/contracts/iwidgetscontract.h b/cadxcore/export/contracts/iwidgetscontract.h
new file mode 100644
index 0000000..b4f218c
--- /dev/null
+++ b/cadxcore/export/contracts/iwidgetscontract.h
@@ -0,0 +1,74 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IWIDGETSCONTRACT_H
+#define IWIDGETSCONTRACT_H
+
+#include <list>
+
+#include <api/api.h>
+#include <api/icontract.h>
+
+class vtkGinkgoImageViewer;
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+class IWidgetsManager;
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+class Contexto3D;
+
+class EXTAPI IWidgetsContract : public IContract
+{
+public:
+
+        typedef std::list<vtkGinkgoImageViewer*> TViewerList;
+
+        IWidgetsContract();
+
+        ~IWidgetsContract();
+
+        virtual GNC::GCS::IWidgetsManager* GetManager() = 0;
+
+        virtual void GetAllViewers(TViewerList& viewerList);
+
+        bool Inicializado();
+
+        //Anotation section
+        //this method processes special keys like: ${VOLUME.IDX} ${SLICE.WIDTH}...
+        virtual std::string GetAnnotationValue(GNC::GCS::Contexto3D* c, const std::string& key);
+
+        //return dicom tag value from key
+        virtual std::string GetTagValue(GNC::GCS::Contexto3D* c, const std::string& key);
+
+        vtkGinkgoImageViewer* GetViewerActivo();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/contracts/iwidgetscontractable.cpp b/cadxcore/export/contracts/iwidgetscontractable.cpp
new file mode 100644
index 0000000..d8ebfe5
--- /dev/null
+++ b/cadxcore/export/contracts/iwidgetscontractable.cpp
@@ -0,0 +1,45 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "iwidgetscontractable.h"
+#include <export/contracts/iwidgetscontract.h>
+
+GNC::GCS::IWidgetsContractable::IWidgetsContractable()
+{
+        WidgetsContract = NULL;
+}
+
+GNC::GCS::IWidgetsContractable::~IWidgetsContractable()
+{
+}
+
+bool GNC::GCS::IWidgetsContractable::IsValidContract(IContract* contract)
+{
+        GNC::GCS::IWidgetsContract* pWContract = dynamic_cast<GNC::GCS::IWidgetsContract*>(contract);
+        return pWContract != NULL;
+}
+
+
+void GNC::GCS::IWidgetsContractable::Register(IContract* contract)
+{
+        GNC::GCS::IContractable::Register(contract);
+        WidgetsContract = static_cast<GNC::GCS::IWidgetsContract*>(contract);
+}
diff --git a/cadxcore/export/contracts/iwidgetscontractable.h b/cadxcore/export/contracts/iwidgetscontractable.h
new file mode 100644
index 0000000..75955e3
--- /dev/null
+++ b/cadxcore/export/contracts/iwidgetscontractable.h
@@ -0,0 +1,44 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/icontract.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IWidgetsContract;
+class EXTAPI IWidgetsContractable: public GNC::GCS::IContractable
+{
+public:
+        IWidgetsContractable();
+        virtual ~IWidgetsContractable();
+
+        virtual bool IsValidContract(IContract* contract);
+
+
+        virtual void Register(IContract* contract);
+protected:
+        GNC::GCS::IWidgetsContract* WidgetsContract;
+};
+}
+}
diff --git a/cadxcore/export/contracts/iwindowlayoutcontract.cpp b/cadxcore/export/contracts/iwindowlayoutcontract.cpp
new file mode 100644
index 0000000..ab35594
--- /dev/null
+++ b/cadxcore/export/contracts/iwindowlayoutcontract.cpp
@@ -0,0 +1,76 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "iwindowlayoutcontract.h"
+
+GNC::GCS::IWindowLayoutContract::IWindowLayoutContract()
+{
+        m_MinSlice = 0;
+        m_MaxSlice = 0;
+}
+
+GNC::GCS::IWindowLayoutContract::~IWindowLayoutContract()
+{
+}
+
+void GNC::GCS::IWindowLayoutContract::Setup(int minSlice, int maxSlice)
+{
+        m_MinSlice = minSlice;
+        m_MaxSlice = maxSlice;
+}
+
+void GNC::GCS::IWindowLayoutContract::AddRow()
+{
+        int filas = GetRows()+1;
+        int columnas = GetColumns();
+        SetWindowLayout(filas,columnas);
+}
+
+void GNC::GCS::IWindowLayoutContract::AddColumn()
+{
+        int filas = GetRows();
+        int columnas = GetColumns()+1;
+        SetWindowLayout(filas,columnas);
+}
+
+void GNC::GCS::IWindowLayoutContract::DelRow()
+{
+        int filas = GetRows()-1;
+        int columnas = GetColumns();
+        SetWindowLayout(filas,columnas);
+}
+
+void GNC::GCS::IWindowLayoutContract::DelColumn()
+{
+        int filas = GetRows();
+        int columnas = GetColumns()-1;
+        SetWindowLayout(filas,columnas);
+}
+
+void GNC::GCS::IWindowLayoutContract::SplitActive(bool )
+{
+}
+
+bool GNC::GCS::IWindowLayoutContract::SupportsSplit()
+{
+        return false;
+}
+
diff --git a/cadxcore/export/contracts/iwindowlayoutcontract.h b/cadxcore/export/contracts/iwindowlayoutcontract.h
new file mode 100644
index 0000000..a9d295c
--- /dev/null
+++ b/cadxcore/export/contracts/iwindowlayoutcontract.h
@@ -0,0 +1,58 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IWINDOWLAYOUTCONTRACT_H
+#define IWINDOWLAYOUTCONTRACT_H
+#include <list>
+
+#include <api/api.h>
+#include <api/icontract.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IWindowLayoutContract : public IContract
+{
+public:
+
+        IWindowLayoutContract();
+        ~IWindowLayoutContract();
+
+        virtual void Setup(int minSlice, int maxSlice);
+
+        virtual void AddRow();
+        virtual void AddColumn();
+        virtual void DelRow();
+        virtual void DelColumn();
+        virtual void SetWindowLayout(int filas, int columnas) = 0;
+        virtual int GetColumns() = 0;
+        virtual int GetRows() = 0;
+        virtual void SplitActive(bool vertically);
+        virtual bool SupportsSplit();
+
+        int m_MinSlice;
+        int m_MaxSlice;
+};
+}
+}
+
+#endif
diff --git a/cadxcore/export/contracts/iwindowlayoutcontractable.cpp b/cadxcore/export/contracts/iwindowlayoutcontractable.cpp
new file mode 100644
index 0000000..4a82cd1
--- /dev/null
+++ b/cadxcore/export/contracts/iwindowlayoutcontractable.cpp
@@ -0,0 +1,43 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "iwindowlayoutcontractable.h"
+#include <export/contracts/iwindowlayoutcontract.h>
+
+GNC::GCS::IWindowLayoutContractable::IWindowLayoutContractable()
+{
+        WindowLayoutContract = NULL;
+}
+GNC::GCS::IWindowLayoutContractable::~IWindowLayoutContractable()
+{
+}
+
+bool GNC::GCS::IWindowLayoutContractable::IsValidContract(IContract* contract)
+{
+        GNC::GCS::IWindowLayoutContract* pWContract = dynamic_cast<GNC::GCS::IWindowLayoutContract*>(contract);
+        return pWContract != NULL;
+}
+
+void GNC::GCS::IWindowLayoutContractable::Register(IContract* contract)
+{
+        GNC::GCS::IContractable::Register(contract);
+        WindowLayoutContract = static_cast<GNC::GCS::IWindowLayoutContract*>(contract);
+}
diff --git a/cadxcore/export/contracts/iwindowlayoutcontractable.h b/cadxcore/export/contracts/iwindowlayoutcontractable.h
new file mode 100644
index 0000000..b4d5f98
--- /dev/null
+++ b/cadxcore/export/contracts/iwindowlayoutcontractable.h
@@ -0,0 +1,44 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/icontract.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IWindowLayoutContract;
+class EXTAPI IWindowLayoutContractable: public GNC::GCS::IContractable
+{
+public:
+        IWindowLayoutContractable();
+        virtual ~IWindowLayoutContractable();
+
+        virtual bool IsValidContract(IContract* contract);
+
+
+        virtual void Register(IContract* contract);
+protected:
+        GNC::GCS::IWindowLayoutContract* WindowLayoutContract;
+};
+}
+}
diff --git a/cadxcore/export/contracts/iwindowlevelcontract.cpp b/cadxcore/export/contracts/iwindowlevelcontract.cpp
new file mode 100644
index 0000000..c311015
--- /dev/null
+++ b/cadxcore/export/contracts/iwindowlevelcontract.cpp
@@ -0,0 +1,256 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iwindowlevelcontract.h"
+#include <api/dicom/dicomdataset.h>
+#include <api/internationalization/internationalization.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <main/controllers/modalitysettingscontroller.h>
+#include <api/iwidgetsmanager.h>
+#include <api/ivista.h>
+#include <api/istudycontext.h>
+
+GNC::GCS::IWindowLevelContract::WindowLevel::WindowLevel()
+{
+        m_label = std::string("");
+        m_window = 0;
+        m_level = 0;
+        m_type = TWLT_USER_DEFINED;
+}
+
+
+GNC::GCS::IWindowLevelContract::WindowLevel::WindowLevel(const std::string& label, const double& window,const double& level, TWL_TYPE type)
+{
+        m_label = label;
+        m_window = window;
+        m_level = level;
+        m_type = type;
+}
+
+GNC::GCS::IWindowLevelContract::WindowLevel::WindowLevel(const WindowLevel& otro)
+{
+        m_window = otro.m_window;
+        m_level = otro.m_level;
+        m_label = otro.m_label;
+        m_type = otro.m_type;
+}
+
+GNC::GCS::IWindowLevelContract::WindowLevel& GNC::GCS::IWindowLevelContract::WindowLevel::operator=(const WindowLevel& otro)
+{
+        m_label = otro.m_label;
+        m_window = otro.m_window;
+        m_level = otro.m_level;
+        m_type = otro.m_type;
+        return *this;
+}
+
+GNC::GCS::IWindowLevelContract::IWindowLevelContract() : IWidgetsContract()
+{
+}
+
+GNC::GCS::IWindowLevelContract::~IWindowLevelContract()
+{
+}
+
+bool GNC::GCS::IWindowLevelContract::HasCurrentWindowLevel()
+{
+        return !GetWindowLevelList().empty();
+}
+
+void GNC::GCS::IWindowLevelContract::SetUserDefinedWindowLevel(double window, double level)
+{
+        if (GetWindowLevelList().size() == 0 || (GetWindowLevelList().size() > 0 && GetWindowLevelList().back().m_type != WindowLevel::TWLT_USER_DEFINED)) {
+                GetWindowLevelList().push_back(WindowLevel("USER_DEFINED", window, level, WindowLevel::TWLT_USER_DEFINED));
+        } else {
+                GetWindowLevelList().back().m_window = window;
+                GetWindowLevelList().back().m_level = level;
+        }
+        SetLabelCurrent(GetWindowLevelList().back().m_label);
+}
+
+GNC::GCS::IWindowLevelContract::WindowLevel GNC::GCS::IWindowLevelContract::GetCurrentWindowLevel()
+{
+        for (ListaWindowLevels::const_iterator it = GetWindowLevelList().begin(); it != GetWindowLevelList().end(); ++it) {
+                if ((*it).m_label == GetLabelCurrent()) {
+                        return (*it);
+                }
+        }
+        if (GetWindowLevelList().size() > 0) {
+                SetLabelCurrent(GetWindowLevelList().front().m_label);
+                return GetWindowLevelList().front();
+        } else {
+                WindowLevel wl("",0,0,WindowLevel::TWLT_USER_DEFINED);
+                return wl;
+        }
+}
+
+bool GNC::GCS::IWindowLevelContract::HasDefaultWindowLevel()
+{
+        bool resultado = false;
+        for (ListaWindowLevels::const_iterator it = GetWindowLevelList().begin(); it != GetWindowLevelList().end(); ++it) {
+                resultado = resultado || (*it).m_type != WindowLevel::TWLT_USER_DEFINED;
+        }
+        return resultado;
+}
+
+GNC::GCS::IWindowLevelContract::WindowLevel GNC::GCS::IWindowLevelContract::GetAndSetDefaultWindowLevel()
+{
+        for (ListaWindowLevels::const_iterator it = GetWindowLevelList().begin(); it != GetWindowLevelList().end(); ++it) {
+                if ((*it).m_type != WindowLevel::TWLT_USER_DEFINED) {
+                        SetLabelCurrent((*it).m_label);
+                        return (*it);
+                }
+        }
+        WindowLevel wl("",0,0,WindowLevel::TWLT_USER_DEFINED);
+        return wl;
+}
+
+void GNC::GCS::IWindowLevelContract::RemoveUserDefined()
+{
+        ListaWindowLevels listaTemp;
+        for (ListaWindowLevels::iterator it = GetWindowLevelList().begin(); it !=  GetWindowLevelList().end(); ++it) {
+                if ((*it).m_type != WindowLevel::TWLT_USER_DEFINED) {
+                        listaTemp.push_back((*it));
+                }
+        }
+        GetWindowLevelList() = listaTemp;
+}
+
+void GNC::GCS::IWindowLevelContract::Setup(const GIL::DICOM::DicomDataset& base)
+{
+        //se guardan los user defined
+        ListaWindowLevels listaTemp;
+        for (ListaWindowLevels::iterator it = GetWindowLevelList().begin(); it !=  GetWindowLevelList().end(); ++it) {
+                if ((*it).m_type == WindowLevel::TWLT_USER_DEFINED) {
+                        listaTemp.push_back((*it));
+                }
+        }
+        GetWindowLevelList().clear();
+        //se pillan los window levels
+        double level = 0.0f;
+        double window = 0.0f;
+        //it's necessary because if there isn't current window level you have to set in this order:
+        //	if current is set current
+        //	wl of the hanging protocol
+        //	wl of the file
+        std::string labelCurrent;
+        std::string label("");
+
+        std::string levelStr;
+        std::string windowStr;
+        std::string labelStr;
+        std::string modality;
+
+        base.getTag(std::string("0028|1050"),levelStr);
+        base.getTag(std::string("0028|1051"),windowStr);
+        base.getTag(std::string("0028|1055"),labelStr);
+        base.getTag(std::string("0008|0060"),modality);
+
+        bool wlValido = true;
+
+        if ( levelStr.empty() || windowStr.empty() ) {
+                wlValido = false;
+        } else {
+                while(levelStr.size()>0) {
+                        std::istringstream issl(levelStr);
+                        issl >> level;
+
+                        std::istringstream issw(windowStr);
+                        issw >> window;
+
+                        if (window == 0.0f) {
+                                wlValido = false;
+                        }
+
+                        if(labelStr.find_first_of('\\')!=std::string::npos) {
+                                label = labelStr.substr(0,labelStr.find_first_of('\\'));
+                        } else if(labelStr.size()>0) {
+                                label = labelStr;
+                        } else {
+                                std::ostringstream ostr;
+                                ostr << "WindowLevel" << GetWindowLevelList().size();
+                                label = ostr.str();
+                        }
+
+                        if(wlValido) {
+                                if (labelCurrent.empty()) {
+                                        labelCurrent = label;
+                                }
+                                WindowLevel wl(label,window,level, WindowLevel::TWLT_FILE);
+                                GetWindowLevelList().push_back(wl);
+                        }
+
+
+                        if(levelStr.find_first_of('\\')!=std::string::npos) {
+                                levelStr = levelStr.substr(levelStr.find_first_of('\\')+1,levelStr.size()-1);
+                                windowStr = windowStr.substr(windowStr.find_first_of('\\')+1,windowStr.size()-1);
+                                if(labelStr.find_first_of('\\')!=std::string::npos) {
+                                        labelStr = labelStr.substr(labelStr.find_first_of('\\')+1,labelStr.size()-1);
+                                }
+                        } else {
+                                break;
+                        }
+                }
+        }
+
+        GNC::GCS::Ptr<DefaultModalitySettings> ptr = GNC::GCS::ModalitySettingsController::Instance()->getModalitySettings(modality);
+        if (ptr.IsValid()) {
+                for (GNC::GCS::DefaultModalitySettings::TListOfWLSettings::const_iterator it  = ptr->getWLSettings().begin(); it != ptr->getWLSettings().end(); ++it) {
+                        GetWindowLevelList().push_back(WindowLevel((*it)->getLabel(), (*it)->getWindow(), (*it)->getLevel(), WindowLevel::TWLT_PREDEFINED));
+                }
+                if (ptr->getInitialWindowLevelLabel().compare(GNC::GCS::DefaultModalitySettings::getDefaultWindowLevelLabel()) != 0) {
+                        if (ptr->getInitialWindowLevelLabel().compare(GNC::GCS::DefaultModalitySettings::getAutocalculateWindowLevelLabel()) == 0) {
+                                if (GetViewerActivo() != NULL) {
+                                        DoAutoCalculateWindowLevel();
+                                }
+                        } else {
+                                labelCurrent = ptr->getInitialWindowLevelLabel();
+                        }
+                }
+        }
+
+
+        //se meten si es necesario los user defined
+        for (ListaWindowLevels::iterator it = listaTemp.begin(); it !=  listaTemp.end(); ++it) {
+                GetWindowLevelList().push_back((*it));
+        }
+        //sets current...
+        if (GetLabelCurrent().empty()) {
+                SetLabelCurrent(labelCurrent);
+        }
+}
+
+double GNC::GCS::IWindowLevelContract::GetCurrentWindow()
+{
+        if (GetViewerActivo() != NULL) {
+                return GetViewerActivo()->GetWindow();
+        } else {
+                return 0;
+        }
+}
+
+double GNC::GCS::IWindowLevelContract::GetCurrentLevel()
+{
+        if (GetViewerActivo() != NULL) {
+                return GetViewerActivo()->GetLevel();
+        } else {
+                return 0;
+        }
+}
diff --git a/cadxcore/export/contracts/iwindowlevelcontract.h b/cadxcore/export/contracts/iwindowlevelcontract.h
new file mode 100644
index 0000000..1b45aea
--- /dev/null
+++ b/cadxcore/export/contracts/iwindowlevelcontract.h
@@ -0,0 +1,105 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IWINDOWLEVELCONTRACT_H
+#define IWINDOWLEVELCONTRACT_H
+#include <list>
+#include <vector>
+
+#include <api/api.h>
+#include <export/contracts/iwidgetscontract.h>
+
+namespace GIL
+{
+namespace DICOM
+{
+class DicomDataset;
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IWindowLevelContract : public IWidgetsContract
+{
+public:
+
+        class EXTAPI WindowLevel
+        {
+
+        public:
+
+                typedef enum TWL_TYPE {
+                        TWLT_FILE,
+                        TWLT_PREDEFINED,
+                        TWLT_USER_DEFINED
+                } TWL_TYPE;
+
+                WindowLevel();
+
+                WindowLevel(const std::string& label, const double& window,const double& level, TWL_TYPE type);
+
+                WindowLevel(const WindowLevel& otro);
+
+                WindowLevel& operator=(const WindowLevel& otro);
+
+                TWL_TYPE			m_type;
+                std::string         m_label;
+                double              m_window;
+                double              m_level;
+        };
+
+        typedef std::vector<WindowLevel> ListaWindowLevels;
+
+public:
+
+        IWindowLevelContract();
+
+        ~IWindowLevelContract();
+
+        virtual bool HasCurrentWindowLevel() ;
+
+        virtual void SetUserDefinedWindowLevel(double window, double level);
+
+        virtual WindowLevel GetCurrentWindowLevel();
+
+        virtual bool HasDefaultWindowLevel();
+
+        virtual WindowLevel GetAndSetDefaultWindowLevel();
+
+        virtual void RemoveUserDefined();
+
+        virtual void Setup(const GIL::DICOM::DicomDataset& base);
+
+        virtual ListaWindowLevels& GetWindowLevelList() = 0;
+        virtual std::string GetLabelCurrent() = 0;
+        virtual void SetLabelCurrent(const std::string& labelCurrent) = 0;
+        virtual void DoAutoCalculateWindowLevel() = 0;
+        virtual void DoResetWindowLevel() = 0;
+        virtual void DoSetWindowLevel(double window, double level) = 0;
+        virtual double GetCurrentWindow();
+        virtual double GetCurrentLevel();
+};
+}
+}
+
+#endif
diff --git a/cadxcore/export/contracts/iwindowlevelcontractable.cpp b/cadxcore/export/contracts/iwindowlevelcontractable.cpp
new file mode 100644
index 0000000..93679b5
--- /dev/null
+++ b/cadxcore/export/contracts/iwindowlevelcontractable.cpp
@@ -0,0 +1,45 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "iwindowlevelcontractable.h"
+#include <export/contracts/iwindowlevelcontract.h>
+
+GNC::GCS::IWindowLevelContractable::IWindowLevelContractable()
+{
+        WindowLevelContract = NULL;
+}
+
+GNC::GCS::IWindowLevelContractable::~IWindowLevelContractable()
+{
+}
+
+bool GNC::GCS::IWindowLevelContractable::IsValidContract(IContract* contract)
+{
+        GNC::GCS::IWindowLevelContract* pWContract = dynamic_cast<GNC::GCS::IWindowLevelContract*>(contract);
+        return pWContract != NULL;
+}
+
+
+void GNC::GCS::IWindowLevelContractable::Register(IContract* contract)
+{
+        GNC::GCS::IContractable::Register(contract);
+        WindowLevelContract = static_cast<GNC::GCS::IWindowLevelContract*>(contract);
+}
diff --git a/cadxcore/export/contracts/iwindowlevelcontractable.h b/cadxcore/export/contracts/iwindowlevelcontractable.h
new file mode 100644
index 0000000..81d24a1
--- /dev/null
+++ b/cadxcore/export/contracts/iwindowlevelcontractable.h
@@ -0,0 +1,43 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/icontract.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IWindowLevelContract;
+class EXTAPI IWindowLevelContractable: public GNC::GCS::IContractable
+{
+public:
+        IWindowLevelContractable();
+        virtual ~IWindowLevelContractable();
+
+        virtual bool IsValidContract(IContract* contract);
+
+        virtual void Register(IContract* contract);
+protected:
+        GNC::GCS::IWindowLevelContract* WindowLevelContract;
+};
+}
+}
diff --git a/cadxcore/export/tagsprivadoscomunes.h b/cadxcore/export/tagsprivadoscomunes.h
new file mode 100644
index 0000000..aa90e46
--- /dev/null
+++ b/cadxcore/export/tagsprivadoscomunes.h
@@ -0,0 +1,35 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma  once
+//tags privados comunes a todos los diagnosticos
+#define UID_TAGS_PRIVADOS_COMUNES "METAEMOTION GINKGO"
+
+#define TAG_KEY_IMAGE   			    0x1
+#define TAG_WIDGETS					    0xb
+#define TAG_XML_INTEGRACION		    0xa
+
+//en estos tags va la info relacionada con los informes en general
+#define UID_TAGS_PRIVADOS_INFORME "METAEMOTION GINKGO DIAGNOSTIC"
+#define TAG_LISTA_COMPROMISOS			 0x1
+#define TAG_LISTA_COMENTARIOS			 0x2
+
+
+
diff --git a/cadxcore/export/tools/iaddfiletohistorytool.cpp b/cadxcore/export/tools/iaddfiletohistorytool.cpp
new file mode 100644
index 0000000..a65267b
--- /dev/null
+++ b/cadxcore/export/tools/iaddfiletohistorytool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iaddfiletohistorytool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IAddFileToHistory::ID = HCore_AddFileToHistory;
+
+GNC::GCS::IAddFileToHistory::IAddFileToHistory() : ITool(ID, TMenuArchivo,  _Std("Open study"), GinkgoResourcesManager::MenuIcons::GetIcoAbrir())
+{
+}
diff --git a/cadxcore/export/tools/iaddfiletohistorytool.h b/cadxcore/export/tools/iaddfiletohistorytool.h
new file mode 100644
index 0000000..7f50d38
--- /dev/null
+++ b/cadxcore/export/tools/iaddfiletohistorytool.h
@@ -0,0 +1,37 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <export/contracts/iviewcontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IAddFileToHistory:  public ITool, public IViewContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IAddFileToHistory();
+};
+}
+}
diff --git a/cadxcore/export/tools/iangletool.cpp b/cadxcore/export/tools/iangletool.cpp
new file mode 100644
index 0000000..1f46ede
--- /dev/null
+++ b/cadxcore/export/tools/iangletool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iangletool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IAngleTool::ID = HCore_Angulo;
+
+GNC::GCS::IAngleTool::IAngleTool() : IWidgetTool(ID, TFamiliaMedicion, _Std("Angle \tCtrl+A"), GinkgoResourcesManager::AngleBar::GetIcoAnguloNormal())
+{
+        KeyCode = Name[Name.size() - 1];
+}
diff --git a/cadxcore/export/tools/iangletool.h b/cadxcore/export/tools/iangletool.h
new file mode 100644
index 0000000..74efba2
--- /dev/null
+++ b/cadxcore/export/tools/iangletool.h
@@ -0,0 +1,46 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IANGLETOOL_H
+#define IANGLETOOL_H
+#include <api/toolsystem/iwidgettool.h>
+#include "iherramientascore.h"
+#include <export/contracts/iwidgetscontractable.h>
+
+namespace GNC
+{
+
+namespace GCS
+{
+
+class EXTAPI IAngleTool : public IWidgetTool, public IWidgetsContractable
+{
+public:
+
+        static GNC::GCS::ITool::UID ID;
+
+        IAngleTool();
+};
+
+
+}
+}
+#endif
diff --git a/cadxcore/export/tools/ibrightnesscontrasttool.cpp b/cadxcore/export/tools/ibrightnesscontrasttool.cpp
new file mode 100644
index 0000000..0a3cbd1
--- /dev/null
+++ b/cadxcore/export/tools/ibrightnesscontrasttool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ibrightnesscontrasttool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IBrightnessContrastTool::ID = HCore_BrightnessContrast;
+
+GNC::GCS::IBrightnessContrastTool::IBrightnessContrastTool() : IWidgetTool(ID, TFamiliaVisualizacion, _Std("Brightness/Contrast \tCtrl+B"), GinkgoResourcesManager::ToolIcons::GetIcoBrightnessContrast())
+{
+        KeyCode = Name[Name.size() - 1];
+}
diff --git a/cadxcore/export/tools/ibrightnesscontrasttool.h b/cadxcore/export/tools/ibrightnesscontrasttool.h
new file mode 100644
index 0000000..1f88b45
--- /dev/null
+++ b/cadxcore/export/tools/ibrightnesscontrasttool.h
@@ -0,0 +1,41 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IBRIGHTNESSCOTNRASTTOOL_H
+#define IBRIGHTNESSCOTNRASTTOOL_H
+#include "iherramientascore.h"
+#include <api/toolsystem/iwidgettool.h>
+#include <export/contracts/iwidgetscontractable.h>
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IBrightnessContrastTool: public IWidgetTool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IBrightnessContrastTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/icamerarotationtool.cpp b/cadxcore/export/tools/icamerarotationtool.cpp
new file mode 100644
index 0000000..8a7767c
--- /dev/null
+++ b/cadxcore/export/tools/icamerarotationtool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "icamerarotationtool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::ICameraRotationTool::ID = HCore_CameraRotation;
+
+GNC::GCS::ICameraRotationTool::ICameraRotationTool() : IWidgetTool(ID, TFamiliaVisualizacion,  _Std("Rotate camera"), GinkgoResourcesManager::ToolIcons::GetIcoRotateLeft())
+{
+}
diff --git a/cadxcore/export/tools/icamerarotationtool.h b/cadxcore/export/tools/icamerarotationtool.h
new file mode 100644
index 0000000..85491bf
--- /dev/null
+++ b/cadxcore/export/tools/icamerarotationtool.h
@@ -0,0 +1,38 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/toolsystem/iwidgettool.h>
+#include <export/contracts/iwidgetscontractable.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI ICameraRotationTool: public IWidgetTool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        ICameraRotationTool();
+};
+}
+}
diff --git a/cadxcore/export/tools/icolormaptool.cpp b/cadxcore/export/tools/icolormaptool.cpp
new file mode 100644
index 0000000..ba12fc8
--- /dev/null
+++ b/cadxcore/export/tools/icolormaptool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "icolormaptool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+GNC::GCS::ITool::UID GNC::GCS::IColorMapTool::ID = HCore_ColorMap;
+
+GNC::GCS::IColorMapTool::IColorMapTool(): GNC::GCS::ITool(ID, TSeriesMenu, _Std("Color Map"), GinkgoResourcesManager::ToolIcons::GetIcoCruz(), 1)
+{
+}
diff --git a/cadxcore/export/tools/icolormaptool.h b/cadxcore/export/tools/icolormaptool.h
new file mode 100644
index 0000000..6f6a1b0
--- /dev/null
+++ b/cadxcore/export/tools/icolormaptool.h
@@ -0,0 +1,40 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#ifndef ICOLORMAPTOOL_H
+#define ICOLORMAPTOOL_H
+#include <api/toolsystem/iwidgettool.h>
+#include "iherramientascore.h"
+#include <export/contracts/iwidgetscontractable.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IColorMapTool:  public GNC::GCS::ITool, public GNC::GCS::IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IColorMapTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/icopyimagetoclipboardtool.cpp b/cadxcore/export/tools/icopyimagetoclipboardtool.cpp
new file mode 100644
index 0000000..f94532a
--- /dev/null
+++ b/cadxcore/export/tools/icopyimagetoclipboardtool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "icopyimagetoclipboardtool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::ICopyImageToClipboardTool::ID = HCore_CopyImageToClipboard;
+
+GNC::GCS::ICopyImageToClipboardTool::ICopyImageToClipboardTool() : ITool(ID, TMenuEdicion,  _Std("Copy") + " \tCtrl+c", GinkgoResourcesManager::ToolIcons::GetIcoCopyToClipboard(),3)
+{
+}
diff --git a/cadxcore/export/tools/icopyimagetoclipboardtool.h b/cadxcore/export/tools/icopyimagetoclipboardtool.h
new file mode 100644
index 0000000..0a9cacc
--- /dev/null
+++ b/cadxcore/export/tools/icopyimagetoclipboardtool.h
@@ -0,0 +1,37 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <export/contracts/iwidgetscontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI ICopyImageToClipboardTool:  public ITool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        ICopyImageToClipboardTool();
+};
+}
+}
diff --git a/cadxcore/export/tools/icornerannotationstool.cpp b/cadxcore/export/tools/icornerannotationstool.cpp
new file mode 100644
index 0000000..90abfdb
--- /dev/null
+++ b/cadxcore/export/tools/icornerannotationstool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "icornerannotationstool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::ICornerAnnotationsTool::ID = HCore_CornerAnnotations;
+
+GNC::GCS::ICornerAnnotationsTool::ICornerAnnotationsTool() : ITool(ID, TSeriesMenu,  _Std("Window annotations"), GinkgoResourcesManager::ToolIcons::GetIcoCornerAnnotations(),2)
+{
+}
diff --git a/cadxcore/export/tools/icornerannotationstool.h b/cadxcore/export/tools/icornerannotationstool.h
new file mode 100644
index 0000000..79f8397
--- /dev/null
+++ b/cadxcore/export/tools/icornerannotationstool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ICORNERANNOTATIONSTOOL_H
+#define ICORNERANNOTATIONSTOOL_H
+#include <export/contracts/iwidgetscontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI ICornerAnnotationsTool:  public ITool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        ICornerAnnotationsTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/idetachwindowtool.cpp b/cadxcore/export/tools/idetachwindowtool.cpp
new file mode 100644
index 0000000..1968d87
--- /dev/null
+++ b/cadxcore/export/tools/idetachwindowtool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "idetachwindowtool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IDetachWindowTool::ID = HCore_DetachWindow;
+
+GNC::GCS::IDetachWindowTool::IDetachWindowTool() : ITool(ID, TMenuVer,  _Std("Detach window"), GinkgoResourcesManager::ToolIcons::GetIcoDesencajar())
+{
+}
diff --git a/cadxcore/export/tools/idetachwindowtool.h b/cadxcore/export/tools/idetachwindowtool.h
new file mode 100644
index 0000000..78dc65a
--- /dev/null
+++ b/cadxcore/export/tools/idetachwindowtool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IDETACHWINDOWTOOL_H
+#define IDETACHWINDOWTOOL_H
+#include <export/contracts/iviewcontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IDetachWindowTool:  public ITool, public IViewContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IDetachWindowTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/iherramientascore.h b/cadxcore/export/tools/iherramientascore.h
new file mode 100644
index 0000000..bed36af
--- /dev/null
+++ b/cadxcore/export/tools/iherramientascore.h
@@ -0,0 +1,87 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ITOOLSCORE_H
+#define ITOOLSCORE_H
+// UIDs de las herramientas core: Reservado desde 0 a 100;
+
+#define HCore_Pointer                     1
+#define HCore_Rule                        3
+#define HCore_Angulo                      4
+#define HCore_Lupa                        5
+#define HCore_Varita                      6
+#define HCore_LazoChroma                  7
+#define HCore_Elevacion                   8
+#define HCore_Nota                        9
+#define HCore_Deshacer                    10
+#define HCore_WindowLayout                11
+#define HCore_EdicionDICOM                12
+#define HCore_Calibrado                   13
+#define HCore_Debug                       14
+#define HCore_Marcado                     15
+#define HCore_MetricGrid                  16
+#define HCore_CornerAnnotations           17
+#define HCore_PanelTags                   18
+#define HCore_Reset                       19
+#define HCore_DetachWindow                20
+#define HCore_PixelsBluring               21
+#define HCore_SecondaryCapture            22
+
+#define HCore_Pan                         23
+#define HCore_Zoom                        24
+#define HCore_Slider                      25
+#define HCore_WindowLevel                 26
+
+#define HCore_Anonymize                   27
+#define HCore_ShowDicomTagsHistory        28
+#define HCore_OpenFile                    29
+#define HCore_OpenFolder                  30
+#define HCore_OpenRemovable               31
+#define HCore_DicomizeFromHistory         32
+#define HCore_QueryRetrieveHistory        33
+#define HCore_HistoryPACSUpload           34
+#define HCore_ExportDicomDir              35
+#define HCore_ShowDicomTags               36
+#define HCore_RotateAndFlip               37
+#define HCore_ColorMap                    38
+#define HCore_ShowHistory                 39
+#define HCore_ImageExport                 40
+#define HCore_SimplePrint                 41
+
+#define HCore_Trackball                   42
+#define HCore_Video	                      43
+
+#define HCore_PACSUpload                  44
+#define HCore_DicomizeFromView            45
+#define HCore_AddFileToHistory            46
+
+#define HCore_OpenGinkgoCloudLinkHistory  47
+#define HCore_SearchGinkgoCloudHistory    48
+#define HCore_CopyImageToClipboard        49
+
+#define HCore_QueryRetrieve               50
+#define HCore_CameraRotation              51
+#define HCore_BrightnessContrast          52
+
+
+#define SubFamiliaEdicionDeshacer        0
+
+#endif
diff --git a/cadxcore/export/tools/iimageexporttool.cpp b/cadxcore/export/tools/iimageexporttool.cpp
new file mode 100644
index 0000000..d5945fd
--- /dev/null
+++ b/cadxcore/export/tools/iimageexporttool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iimageexporttool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IImageExportTool::ID = HCore_ImageExport;
+
+GNC::GCS::IImageExportTool::IImageExportTool() : ITool(ID, TMenuArchivo,  _Std("Export image..."), GinkgoResourcesManager::MenuIcons::GetIcoExportar(), 4)
+{
+}
diff --git a/cadxcore/export/tools/iimageexporttool.h b/cadxcore/export/tools/iimageexporttool.h
new file mode 100644
index 0000000..b763567
--- /dev/null
+++ b/cadxcore/export/tools/iimageexporttool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IIMAGEEXPORTTOOL_H
+#define IIMAGEEXPORTTOOL_H
+#include <export/contracts/iwidgetscontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IImageExportTool:  public ITool, public GNC::GCS::IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IImageExportTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/imarkertool.cpp b/cadxcore/export/tools/imarkertool.cpp
new file mode 100644
index 0000000..e47a7f4
--- /dev/null
+++ b/cadxcore/export/tools/imarkertool.cpp
@@ -0,0 +1,31 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "imarkertool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IMarkerTool::ID = HCore_Marcado;
+
+GNC::GCS::IMarkerTool::IMarkerTool() : IWidgetTool(ID, TFamiliaAnotacion, _Std("Marking Tools \tCtrl+M"), GinkgoResourcesManager::MarkingBar::GetIcoPunto())
+{
+        KeyCode = Name[Name.size() - 1];
+}
diff --git a/cadxcore/export/tools/imarkertool.h b/cadxcore/export/tools/imarkertool.h
new file mode 100644
index 0000000..d1e202d
--- /dev/null
+++ b/cadxcore/export/tools/imarkertool.h
@@ -0,0 +1,46 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IMARKERTOOL_H
+#define IMARKERTOOL_H
+#include "iherramientascore.h"
+#include <api/toolsystem/iwidgettool.h>
+#include <export/contracts/iwidgetscontractable.h>
+
+namespace GNC
+{
+
+namespace GCS
+{
+
+class EXTAPI IMarkerTool : public IWidgetTool, public IWidgetsContractable
+{
+public:
+
+        static GNC::GCS::ITool::UID ID;
+
+        IMarkerTool();
+};
+
+
+}
+}
+#endif
diff --git a/cadxcore/export/tools/imetricgridtool.cpp b/cadxcore/export/tools/imetricgridtool.cpp
new file mode 100644
index 0000000..635aef3
--- /dev/null
+++ b/cadxcore/export/tools/imetricgridtool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "imetricgridtool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IMetricGridTool::ID = HCore_MetricGrid;
+
+GNC::GCS::IMetricGridTool::IMetricGridTool() : ITool(ID, TSeriesMenu,  _Std("Metric grid"), GinkgoResourcesManager::ToolIcons::GetIcoRejilla(), 1)
+{
+}
diff --git a/cadxcore/export/tools/imetricgridtool.h b/cadxcore/export/tools/imetricgridtool.h
new file mode 100644
index 0000000..2022c22
--- /dev/null
+++ b/cadxcore/export/tools/imetricgridtool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IMETRICTOOL_H
+#define IMETRICTOOL_H
+#include <export/contracts/iwidgetscontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IMetricGridTool:  public ITool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IMetricGridTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/inotetool.cpp b/cadxcore/export/tools/inotetool.cpp
new file mode 100644
index 0000000..7264dfd
--- /dev/null
+++ b/cadxcore/export/tools/inotetool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "inotetool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::INoteTool::ID = HCore_Nota;
+
+GNC::GCS::INoteTool::INoteTool() : IWidgetTool(ID, TFamiliaAnotacion, _Std("Text Note \tCtrl+N"), GinkgoResourcesManager::ToolIcons::GetIcoAnotacion())
+{
+        KeyCode = Name[Name.size() - 1];
+}
diff --git a/cadxcore/export/tools/inotetool.h b/cadxcore/export/tools/inotetool.h
new file mode 100644
index 0000000..5b41d3f
--- /dev/null
+++ b/cadxcore/export/tools/inotetool.h
@@ -0,0 +1,46 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef INOTETOOL_H
+#define INOTETOOL_H
+#include <api/toolsystem/iwidgettool.h>
+#include "iherramientascore.h"
+#include <export/contracts/iwidgetscontractable.h>
+
+namespace GNC
+{
+
+namespace GCS
+{
+
+class EXTAPI INoteTool : public IWidgetTool, public IWidgetsContractable
+{
+public:
+
+        static GNC::GCS::ITool::UID ID;
+
+        INoteTool();
+};
+
+
+}
+}
+#endif
diff --git a/cadxcore/export/tools/ipacsuploadtool.cpp b/cadxcore/export/tools/ipacsuploadtool.cpp
new file mode 100644
index 0000000..da4d301
--- /dev/null
+++ b/cadxcore/export/tools/ipacsuploadtool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ipacsuploadtool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IPACSUploadTool::ID = HCore_PACSUpload;
+
+GNC::GCS::IPACSUploadTool::IPACSUploadTool() : ITool(ID, TMenuArchivo,  _Std("Upload study..."), GinkgoResourcesManager::MenuIcons::GetIcoSendToPACS(),4)
+{
+}
diff --git a/cadxcore/export/tools/ipacsuploadtool.h b/cadxcore/export/tools/ipacsuploadtool.h
new file mode 100644
index 0000000..dd0dfbc
--- /dev/null
+++ b/cadxcore/export/tools/ipacsuploadtool.h
@@ -0,0 +1,37 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <export/contracts/iviewcontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IPACSUploadTool:  public ITool, public IViewContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IPACSUploadTool();
+};
+}
+}
diff --git a/cadxcore/export/tools/ipixelsbluringtool.cpp b/cadxcore/export/tools/ipixelsbluringtool.cpp
new file mode 100644
index 0000000..a296e71
--- /dev/null
+++ b/cadxcore/export/tools/ipixelsbluringtool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ipixelsbluringtool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IPixelsBluringTool::ID = HCore_PixelsBluring;
+
+GNC::GCS::IPixelsBluringTool::IPixelsBluringTool() : ITool(ID, TSeriesMenu,  _Std("Pixels blurring"), wxNullBitmap,2)
+{
+}
diff --git a/cadxcore/export/tools/ipixelsbluringtool.h b/cadxcore/export/tools/ipixelsbluringtool.h
new file mode 100644
index 0000000..3e02cd6
--- /dev/null
+++ b/cadxcore/export/tools/ipixelsbluringtool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IINTERPOLATETOOL_H
+#define IINTERPOLATETOOL_H
+#include <export/contracts/ipixelsbluringcontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IPixelsBluringTool:  public ITool, public IPixelsBluringContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IPixelsBluringTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/ipointertool.cpp b/cadxcore/export/tools/ipointertool.cpp
new file mode 100644
index 0000000..a6c3cec
--- /dev/null
+++ b/cadxcore/export/tools/ipointertool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ipointertool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IPointerTool::ID = HCore_Pointer;
+
+GNC::GCS::IPointerTool::IPointerTool() : IWidgetTool(ID, TFamiliaVisualizacion,  _Std("Pointer \tEsc"), GinkgoResourcesManager::ToolIcons::GetIcoFlecha())
+{
+        KeyCode = WXK_ESCAPE;
+}
diff --git a/cadxcore/export/tools/ipointertool.h b/cadxcore/export/tools/ipointertool.h
new file mode 100644
index 0000000..f5e86a3
--- /dev/null
+++ b/cadxcore/export/tools/ipointertool.h
@@ -0,0 +1,42 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IPOINTERTOOL_H
+#define IPOINTERTOOL_H
+#include <api/toolsystem/iwidgettool.h>
+#include <export/contracts/iwidgetscontractable.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IPointerTool: public IWidgetTool, public IWidgetsContractable
+{
+public:
+
+        static GNC::GCS::ITool::UID ID;
+        IPointerTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/iqueryretrievetool.cpp b/cadxcore/export/tools/iqueryretrievetool.cpp
new file mode 100644
index 0000000..485f08f
--- /dev/null
+++ b/cadxcore/export/tools/iqueryretrievetool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iqueryretrievetool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IQueryRetrieveTool::ID = HCore_QueryRetrieve;
+
+GNC::GCS::IQueryRetrieveTool::IQueryRetrieveTool() : ITool(ID, TMenuArchivo,  _Std("Acquire a DICOM study from PACS"), GinkgoResourcesManager::Acquisition::GetIcoAdquirePACS())
+{
+}
diff --git a/cadxcore/export/tools/iqueryretrievetool.h b/cadxcore/export/tools/iqueryretrievetool.h
new file mode 100644
index 0000000..30fbbf1
--- /dev/null
+++ b/cadxcore/export/tools/iqueryretrievetool.h
@@ -0,0 +1,37 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <export/contracts/iviewcontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IQueryRetrieveTool:  public ITool, public IViewContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IQueryRetrieveTool();
+};
+}
+}
diff --git a/cadxcore/export/tools/iresettool.cpp b/cadxcore/export/tools/iresettool.cpp
new file mode 100644
index 0000000..5fbbbaa
--- /dev/null
+++ b/cadxcore/export/tools/iresettool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iresettool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IResetTool::ID = HCore_Reset;
+
+GNC::GCS::IResetTool::IResetTool() : ITool(ID, TSeriesMenu,  _Std("Reset"), GinkgoResourcesManager::MenuIcons::GetIcoReset(),2)
+{
+}
diff --git a/cadxcore/export/tools/iresettool.h b/cadxcore/export/tools/iresettool.h
new file mode 100644
index 0000000..cad9875
--- /dev/null
+++ b/cadxcore/export/tools/iresettool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IRESETTOOL_H
+#define IRESETTOOL_H
+#include <export/contracts/iwidgetscontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IResetTool:  public ITool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IResetTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/irotateandfliptool.cpp b/cadxcore/export/tools/irotateandfliptool.cpp
new file mode 100644
index 0000000..0cb639e
--- /dev/null
+++ b/cadxcore/export/tools/irotateandfliptool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "irotateandfliptool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IRotateAndFlipTool::ID = HCore_RotateAndFlip;
+
+GNC::GCS::IRotateAndFlipTool::IRotateAndFlipTool() : ITool(ID, TSeriesMenu,  _Std("Rotate and flip"), GinkgoResourcesManager::MenuIcons::GetIcoReset())
+{
+}
diff --git a/cadxcore/export/tools/irotateandfliptool.h b/cadxcore/export/tools/irotateandfliptool.h
new file mode 100644
index 0000000..bef559d
--- /dev/null
+++ b/cadxcore/export/tools/irotateandfliptool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IROTATEANDFLIPTOOL_H
+#define IROTATEANDFLIPTOOL_H
+#include <export/contracts/iwidgetscontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IRotateAndFlipTool:  public ITool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IRotateAndFlipTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/iruletool.cpp b/cadxcore/export/tools/iruletool.cpp
new file mode 100644
index 0000000..45a6110
--- /dev/null
+++ b/cadxcore/export/tools/iruletool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iruletool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IRuleTool::ID = HCore_Rule;
+
+GNC::GCS::IRuleTool::IRuleTool() : IWidgetTool(ID, TFamiliaMedicion,  _Std("Rule \tCtrl+R"), GinkgoResourcesManager::ToolIcons::GetIcoLongitud())
+{
+        KeyCode = Name[Name.size() - 1];
+}
diff --git a/cadxcore/export/tools/iruletool.h b/cadxcore/export/tools/iruletool.h
new file mode 100644
index 0000000..4b3b874
--- /dev/null
+++ b/cadxcore/export/tools/iruletool.h
@@ -0,0 +1,42 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IRULETOOL_H
+#define IRULETOOL_H
+#include <api/toolsystem/iwidgettool.h>
+#include <export/contracts/irulecontractable.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IRuleTool: public IWidgetTool, public IRuleContractable
+{
+public:
+
+        static GNC::GCS::ITool::UID ID;
+        IRuleTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/isecondarycapturetool.cpp b/cadxcore/export/tools/isecondarycapturetool.cpp
new file mode 100644
index 0000000..8471292
--- /dev/null
+++ b/cadxcore/export/tools/isecondarycapturetool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "isecondarycapturetool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::ISecondaryCaptureTool::ID = HCore_SecondaryCapture;
+
+GNC::GCS::ISecondaryCaptureTool::ISecondaryCaptureTool() : ITool(ID, TMenuArchivo,  _Std("Save snapshot as new series..."), GinkgoResourcesManager::MenuIcons::GetIcoGuardar(),3)
+{
+}
diff --git a/cadxcore/export/tools/isecondarycapturetool.h b/cadxcore/export/tools/isecondarycapturetool.h
new file mode 100644
index 0000000..0961538
--- /dev/null
+++ b/cadxcore/export/tools/isecondarycapturetool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ISECONDARYCAPTURETOOL_H
+#define ISECONDARYCAPTURETOOL_H
+#include <export/contracts/iwidgetscontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI ISecondaryCaptureTool:  public ITool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        ISecondaryCaptureTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/ishowhistorytool.cpp b/cadxcore/export/tools/ishowhistorytool.cpp
new file mode 100644
index 0000000..72c43bd
--- /dev/null
+++ b/cadxcore/export/tools/ishowhistorytool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ishowhistorytool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IShowHistoryTool::ID = HCore_ShowHistory;
+
+GNC::GCS::IShowHistoryTool::IShowHistoryTool() : ITool(ID, TMenuArchivo,  _Std("Show history \tAlt+h"), GinkgoResourcesManager::History::GetIcoHistorialOpen())
+{
+}
diff --git a/cadxcore/export/tools/ishowhistorytool.h b/cadxcore/export/tools/ishowhistorytool.h
new file mode 100644
index 0000000..d4fa026
--- /dev/null
+++ b/cadxcore/export/tools/ishowhistorytool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ISHOWHISTORYTOOL_H
+#define ISHOWHISTORYTOOL_H
+#include <export/contracts/iviewcontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IShowHistoryTool:  public ITool, public IViewContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IShowHistoryTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/ishowtagstool.cpp b/cadxcore/export/tools/ishowtagstool.cpp
new file mode 100644
index 0000000..eab2a87
--- /dev/null
+++ b/cadxcore/export/tools/ishowtagstool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ishowtagstool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IShowTagsTool::ID = HCore_ShowDicomTags;
+
+GNC::GCS::IShowTagsTool::IShowTagsTool() : ITool(ID, TMenuHerramientas,  _Std("DICOM inspector"), GinkgoResourcesManager::ToolIcons::GetIcoMostrarOcultarTags())
+{
+}
diff --git a/cadxcore/export/tools/ishowtagstool.h b/cadxcore/export/tools/ishowtagstool.h
new file mode 100644
index 0000000..4ec24ae
--- /dev/null
+++ b/cadxcore/export/tools/ishowtagstool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ISHOWTAGSTOOL_H
+#define ISHOWTAGSTOOL_H
+#include <export/contracts/iviewcontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IShowTagsTool:  public ITool, public IViewContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IShowTagsTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/isimpleprinttool.cpp b/cadxcore/export/tools/isimpleprinttool.cpp
new file mode 100644
index 0000000..8c73305
--- /dev/null
+++ b/cadxcore/export/tools/isimpleprinttool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "isimpleprinttool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::ISimplePrintTool::ID = HCore_SimplePrint;
+
+GNC::GCS::ISimplePrintTool::ISimplePrintTool() : ITool(ID, TMenuArchivo,  _Std("Print") + "...", GinkgoResourcesManager::MenuIcons::GetIcoImpresora(),5)
+{
+}
diff --git a/cadxcore/export/tools/isimpleprinttool.h b/cadxcore/export/tools/isimpleprinttool.h
new file mode 100644
index 0000000..44525d0
--- /dev/null
+++ b/cadxcore/export/tools/isimpleprinttool.h
@@ -0,0 +1,37 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <export/contracts/iwidgetscontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI ISimplePrintTool:  public ITool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        ISimplePrintTool();
+};
+}
+}
diff --git a/cadxcore/export/tools/istartdicomizationtool.cpp b/cadxcore/export/tools/istartdicomizationtool.cpp
new file mode 100644
index 0000000..6d21573
--- /dev/null
+++ b/cadxcore/export/tools/istartdicomizationtool.cpp
@@ -0,0 +1,29 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "istartdicomizationtool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IStartDicomizationTool::ID = HCore_DicomizeFromView;
+
+GNC::GCS::IStartDicomizationTool::IStartDicomizationTool() : ITool(ID, TMenuArchivo,  _Std("Dicomize..."), GinkgoResourcesManager::MenuIcons::GetIcoImportar(), 2)
+{
+}
diff --git a/cadxcore/export/tools/istartdicomizationtool.h b/cadxcore/export/tools/istartdicomizationtool.h
new file mode 100644
index 0000000..5d034a7
--- /dev/null
+++ b/cadxcore/export/tools/istartdicomizationtool.h
@@ -0,0 +1,37 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <export/contracts/iviewcontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IStartDicomizationTool:  public ITool, public IViewContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IStartDicomizationTool();
+};
+}
+}
diff --git a/cadxcore/export/tools/itoolpan.cpp b/cadxcore/export/tools/itoolpan.cpp
new file mode 100644
index 0000000..5cdb752
--- /dev/null
+++ b/cadxcore/export/tools/itoolpan.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "itoolpan.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IToolPan::ID = HCore_Pan;
+
+GNC::GCS::IToolPan::IToolPan() : IWidgetTool(ID, TFamiliaVisualizacion,  _Std("Pan \tCtrl+P"), GinkgoResourcesManager::ToolIcons::GetIcoPan())
+{
+        KeyCode = Name[Name.size() - 1];
+}
diff --git a/cadxcore/export/tools/itoolpan.h b/cadxcore/export/tools/itoolpan.h
new file mode 100644
index 0000000..b8dee23
--- /dev/null
+++ b/cadxcore/export/tools/itoolpan.h
@@ -0,0 +1,41 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IPANTOOL_H
+#define IPANTOOL_H
+#include <api/toolsystem/iwidgettool.h>
+#include <export/contracts/iwidgetscontractable.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IToolPan: public IWidgetTool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IToolPan();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/itoolslider.cpp b/cadxcore/export/tools/itoolslider.cpp
new file mode 100644
index 0000000..76e0b2a
--- /dev/null
+++ b/cadxcore/export/tools/itoolslider.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "itoolslider.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IToolSlider::ID = HCore_Slider;
+
+GNC::GCS::IToolSlider::IToolSlider() : IWidgetTool(ID, TFamiliaVisualizacion,  _Std("Slider \tCtrl+S"), GinkgoResourcesManager::ToolIcons::GetIcoSlider())
+{
+        KeyCode = Name[Name.size() - 1];
+}
diff --git a/cadxcore/export/tools/itoolslider.h b/cadxcore/export/tools/itoolslider.h
new file mode 100644
index 0000000..ffe542b
--- /dev/null
+++ b/cadxcore/export/tools/itoolslider.h
@@ -0,0 +1,41 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ISLIDERTOOL_H
+#define ISLIDERTOOL_H
+#include <api/toolsystem/iwidgettool.h>
+#include <export/contracts/islidercontractable.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IToolSlider: public IWidgetTool, public ISliderContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IToolSlider();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/itoolwindowlevel.cpp b/cadxcore/export/tools/itoolwindowlevel.cpp
new file mode 100644
index 0000000..e781361
--- /dev/null
+++ b/cadxcore/export/tools/itoolwindowlevel.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "itoolwindowlevel.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IToolWindowLevel::ID = HCore_WindowLevel;
+
+GNC::GCS::IToolWindowLevel::IToolWindowLevel() : IWidgetTool(ID, TFamiliaVisualizacion,  _Std("Window/Level \tCtrl+W"), GinkgoResourcesManager::ToolIcons::GetIcoWindowLevel())
+{
+        KeyCode = Name[Name.size() - 1];
+}
diff --git a/cadxcore/export/tools/itoolwindowlevel.h b/cadxcore/export/tools/itoolwindowlevel.h
new file mode 100644
index 0000000..5cf7e39
--- /dev/null
+++ b/cadxcore/export/tools/itoolwindowlevel.h
@@ -0,0 +1,41 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IWINDOWLEVELTOOL_H
+#define IWINDOWLEVELTOOL_H
+#include <api/toolsystem/iwidgettool.h>
+#include <export/contracts/iwindowlevelcontractable.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IToolWindowLevel: public IWidgetTool, public IWindowLevelContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IToolWindowLevel();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/itoolzoom.cpp b/cadxcore/export/tools/itoolzoom.cpp
new file mode 100644
index 0000000..aac924f
--- /dev/null
+++ b/cadxcore/export/tools/itoolzoom.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "itoolzoom.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IToolZoom::ID = HCore_Zoom;
+
+GNC::GCS::IToolZoom::IToolZoom() : IWidgetTool(ID, TFamiliaVisualizacion,  _Std("Zoom \tCtrl+O"), GinkgoResourcesManager::ToolIcons::GetIcoZoom())
+{
+        KeyCode = Name[Name.size() - 1];
+}
diff --git a/cadxcore/export/tools/itoolzoom.h b/cadxcore/export/tools/itoolzoom.h
new file mode 100644
index 0000000..118e8c7
--- /dev/null
+++ b/cadxcore/export/tools/itoolzoom.h
@@ -0,0 +1,42 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IZOOMTOOL_H
+#define IZOOMTOOL_H
+#include <api/toolsystem/iwidgettool.h>
+#include <export/contracts/iwidgetscontractable.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IToolZoom: public IWidgetTool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+
+        IToolZoom();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/itrackballtool.cpp b/cadxcore/export/tools/itrackballtool.cpp
new file mode 100644
index 0000000..279a7b8
--- /dev/null
+++ b/cadxcore/export/tools/itrackballtool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "itrackballtool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::ITrackballTool::ID = HCore_Trackball;
+
+GNC::GCS::ITrackballTool::ITrackballTool() : IWidgetTool(ID, TFamiliaVisualizacion,  _Std("Trackball \tCtrl+T"), GinkgoResourcesManager::ToolIcons::GetIcoTrackball())
+{
+        KeyCode = Name[Name.size() - 1];
+}
diff --git a/cadxcore/export/tools/itrackballtool.h b/cadxcore/export/tools/itrackballtool.h
new file mode 100644
index 0000000..1b5dd1b
--- /dev/null
+++ b/cadxcore/export/tools/itrackballtool.h
@@ -0,0 +1,41 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef ITRACKBALLTOOL_H
+#define ITRACKBALLTOOL_H
+#include <api/toolsystem/iwidgettool.h>
+#include <export/contracts/iwidgetscontractable.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI ITrackballTool: public IWidgetTool, public IWidgetsContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        ITrackballTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/iundotool.cpp b/cadxcore/export/tools/iundotool.cpp
new file mode 100644
index 0000000..c0aeac2
--- /dev/null
+++ b/cadxcore/export/tools/iundotool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "iundotool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IUndoTool::ID = HCore_Deshacer;
+
+GNC::GCS::IUndoTool::IUndoTool() : ITool(ID, TMenuEdicion, _Std("Undo"), GinkgoResourcesManager::AngleBar::GetIcoAnguloNormal())
+{
+}
diff --git a/cadxcore/export/tools/iundotool.h b/cadxcore/export/tools/iundotool.h
new file mode 100644
index 0000000..6c7a317
--- /dev/null
+++ b/cadxcore/export/tools/iundotool.h
@@ -0,0 +1,42 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IUNDOTOOL_H
+#define IUNDOTOOL_H
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+#include <export/contracts/iviewcontractable.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IUndoTool: public ITool, public IViewContractable
+{
+public:
+
+        static GNC::GCS::ITool::UID ID;
+        IUndoTool();
+
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/ivideotool.cpp b/cadxcore/export/tools/ivideotool.cpp
new file mode 100644
index 0000000..0f6f6a2
--- /dev/null
+++ b/cadxcore/export/tools/ivideotool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ivideotool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IVideoTool::ID = HCore_Video;
+
+GNC::GCS::IVideoTool::IVideoTool() : ITool(ID, TFamiliaVisualizacion,  _Std("Video \tCtrl+Space"), GinkgoResourcesManager::CineBar::GetIcoPlay())
+{
+        KeyCode = (int)' ';
+}
diff --git a/cadxcore/export/tools/ivideotool.h b/cadxcore/export/tools/ivideotool.h
new file mode 100644
index 0000000..37efe0e
--- /dev/null
+++ b/cadxcore/export/tools/ivideotool.h
@@ -0,0 +1,41 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IVIDEOTOOL_H
+#define IVIDEOTOOL_H
+#include <api/toolsystem/itool.h>
+#include <export/contracts/islidercontractable.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IVideoTool: public ITool, public ISliderContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IVideoTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/export/tools/iwindowlayouttool.cpp b/cadxcore/export/tools/iwindowlayouttool.cpp
new file mode 100644
index 0000000..ad191c5
--- /dev/null
+++ b/cadxcore/export/tools/iwindowlayouttool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "iwindowlayouttool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNC::GCS::ITool::UID GNC::GCS::IWindowLayoutTool::ID = HCore_WindowLayout;
+
+GNC::GCS::IWindowLayoutTool::IWindowLayoutTool() : ITool(ID, TMenuVer,  _Std("Window layout"), GinkgoResourcesManager::ToolIcons::GetIcoLayout())
+{
+}
diff --git a/cadxcore/export/tools/iwindowlayouttool.h b/cadxcore/export/tools/iwindowlayouttool.h
new file mode 100644
index 0000000..f0a5d41
--- /dev/null
+++ b/cadxcore/export/tools/iwindowlayouttool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef IWINDOWLAYOUTTOOL_H
+#define IWINDOWLAYOUTTOOL_H
+#include <export/contracts/iwindowlayoutcontractable.h>
+#include <api/toolsystem/itool.h>
+#include "iherramientascore.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI IWindowLayoutTool:  public ITool, public IWindowLayoutContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IWindowLayoutTool();
+};
+}
+}
+#endif
diff --git a/cadxcore/itk/itkImageToVTKImageFilter.h b/cadxcore/itk/itkImageToVTKImageFilter.h
new file mode 100644
index 0000000..22027c4
--- /dev/null
+++ b/cadxcore/itk/itkImageToVTKImageFilter.h
@@ -0,0 +1,179 @@
+/*=========================================================================
+
+  Program:   Insight Segmentation & Registration Toolkit
+  Module:    $RCSfile: itkImageToVTKImageFilter.h,v $
+  Language:  C++
+  Date:      $Date: 2007-11-20 18:46:10 +0100 (mar, 20 nov 2007) $
+  Version:   $Revision: 477 $
+
+  Copyright (c) 2002 Insight Consortium. All rights reserved.
+  See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
+
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#pragma once
+
+#include <itkVTKImageExport.h>
+#include <vtkImageImport.h>
+#include <vtkImageData.h>
+
+namespace itk
+{
+
+/** \class ImageToVTKImageFilter
+ * \brief Converts an ITK image into a VTK image and plugs a
+ *  itk data pipeline to a VTK datapipeline.
+ *
+ *  This class puts together an itkVTKImageExporter and a vtkImageImporter.
+ *  It takes care of the details related to the connection of ITK and VTK
+ *  pipelines. The User will perceive this filter as an adaptor to which
+ *  an itk::Image can be plugged as input and a vtkImage is produced as
+ *  output.
+ *
+ * \ingroup   ImageFilters
+ */
+template <class TInputImage >
+class ImageToVTKImageFilter : public ProcessObject
+{
+public:
+        /** Standard class typedefs. */
+
+        typedef ImageToVTKImageFilter Self;
+        typedef ProcessObject Superclass;
+        typedef SmartPointer<Self> Pointer;
+        typedef SmartPointer<const Self> ConstPointer;
+
+        /** Method for creation through the object factory. */
+        itkNewMacro(Self);
+
+        /** Run-time type information (and related methods). */
+        itkTypeMacro(ImageToVTKImageFilter, ProcessObject);
+
+        /** Some typedefs. */
+        typedef TInputImage InputImageType;
+        typedef typename InputImageType::ConstPointer InputImagePointer;
+        typedef VTKImageExport< InputImageType> ExporterFilterType;
+        typedef typename ExporterFilterType::Pointer ExporterFilterPointer;
+
+        /** Get the output in the form of a vtkImage.
+            This call is delegated to the internal vtkImageImporter filter  */
+        vtkImageData * GetOutput() const;
+
+        /** Set the input in the form of an itk::Image */
+        void SetInput(const InputImageType *);
+
+        /** Return the internal VTK image importer filter.
+            This is intended to facilitate users the access
+            to methods in the importer */
+        vtkImageImport * GetImporter() const;
+
+        /** Return the internal ITK image exporter filter.
+            This is intended to facilitate users the access
+            to methods in the exporter */
+        ExporterFilterType * GetExporter() const;
+
+        /** This call delegate the update to the importer */
+        void Update();
+
+protected:
+        ImageToVTKImageFilter();
+        virtual ~ImageToVTKImageFilter();
+
+private:
+        ImageToVTKImageFilter(const Self&); //purposely not implemented
+        void operator=(const Self&); //purposely not implemented
+
+        ExporterFilterPointer m_Exporter;
+        vtkImageImport * m_Importer;
+
+};
+
+/**
+ * Constructor
+ */
+template <class TInputImage>
+ImageToVTKImageFilter<TInputImage>
+::ImageToVTKImageFilter()
+{
+
+        m_Importer = vtkImageImport::New();
+
+        m_Exporter = ExporterFilterType::New();
+
+        m_Importer->SetUpdateInformationCallback(m_Exporter->GetUpdateInformationCallback());
+        m_Importer->SetPipelineModifiedCallback(m_Exporter->GetPipelineModifiedCallback());
+        m_Importer->SetWholeExtentCallback(m_Exporter->GetWholeExtentCallback());
+        m_Importer->SetSpacingCallback(m_Exporter->GetSpacingCallback());
+        m_Importer->SetOriginCallback(m_Exporter->GetOriginCallback());
+        m_Importer->SetScalarTypeCallback(m_Exporter->GetScalarTypeCallback());
+        m_Importer->SetNumberOfComponentsCallback(m_Exporter->GetNumberOfComponentsCallback());
+        m_Importer->SetPropagateUpdateExtentCallback(m_Exporter->GetPropagateUpdateExtentCallback());
+        m_Importer->SetUpdateDataCallback(m_Exporter->GetUpdateDataCallback());
+        m_Importer->SetDataExtentCallback(m_Exporter->GetDataExtentCallback());
+        m_Importer->SetBufferPointerCallback(m_Exporter->GetBufferPointerCallback());
+        m_Importer->SetCallbackUserData(m_Exporter->GetCallbackUserData());
+
+}
+
+/**
+ * Destructor
+ */
+template <class TInputImage>
+ImageToVTKImageFilter<TInputImage>
+::~ImageToVTKImageFilter()
+{
+        m_Importer->Delete();
+}
+
+/**
+ * Set an itk::Image as input
+ */
+template <class TInputImage>
+void ImageToVTKImageFilter<TInputImage>::SetInput(const InputImageType * inputImage)
+{
+        m_Exporter->SetInput(inputImage);
+}
+
+/**
+ * Get a vtkImage as output
+ */
+template <class TInputImage>
+vtkImageData *ImageToVTKImageFilter<TInputImage>::GetOutput() const
+{
+        return m_Importer->GetOutput();
+}
+
+/**
+ * Get the importer filter
+ */
+template <class TInputImage>
+vtkImageImport * ImageToVTKImageFilter<TInputImage>::GetImporter() const
+{
+        return m_Importer;
+}
+
+/**
+ * Get the exporter filter
+ */
+template <class TInputImage>
+typename ImageToVTKImageFilter<TInputImage>::ExporterFilterType *ImageToVTKImageFilter<TInputImage>::GetExporter() const
+{
+        return m_Exporter.GetPointer();
+}
+
+/**
+ * Delegate the Update to the importer
+ */
+template <class TInputImage>
+void ImageToVTKImageFilter<TInputImage>::Update()
+{
+        m_Importer->Update();
+}
+
+
+} // end namespace itk
+
+
diff --git a/cadxcore/itk/itkRGBImageToVTKImageFilter.h b/cadxcore/itk/itkRGBImageToVTKImageFilter.h
new file mode 100644
index 0000000..c6cfaaa
--- /dev/null
+++ b/cadxcore/itk/itkRGBImageToVTKImageFilter.h
@@ -0,0 +1,286 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#undef __DEPRECATED
+#include <itkPixelTraits.h>
+#include <vtkImageData.h>
+#include <vtkPointData.h>
+#include <vtkFloatArray.h>
+#include <itkImageConstIterator.h>
+#include <itkImageLinearIteratorWithIndex.h>
+#include <itkImageReverseConstIterator.h>
+#include <itkImageIterator.h>
+#include <itkImageReverseIterator.h>
+#include <itkImageRegionConstIterator.h>
+#include <itkImageRegionReverseConstIterator.h>
+
+// FIXME: esta clase puede tener memmory leaks
+
+namespace itk
+{
+
+typedef enum VTKScalarType {
+        DOUBLE,
+        FLOAT,
+        LONG,
+        UNSIGNED_LONG,
+        INT,
+        UNSIGNED_INT,
+        SHORT,
+        UNSIGNED_SHORT,
+        CHAR,
+        SIGNED_CHAR,
+        UNSIGNED_CHAR
+} VTKScalarType;
+
+template <class TInputImage >
+class RGBImageToVTKImageFilter : public ProcessObject
+{
+public:
+        /** Standard class typedefs. */
+        typedef RGBImageToVTKImageFilter Self;
+        typedef ProcessObject Superclass;
+        typedef SmartPointer<Self> Pointer;
+        //typedef SmartPointer<const Self>  ConstPointer;
+
+        /** Method for creation through the object factory. */
+        itkNewMacro(Self);
+
+        /** Run-time type information (and related methods). */
+        itkTypeMacro(ImageToVTKImageFilter, ProcessObject);
+
+        /** Some typedefs. */
+        typedef TInputImage InputImageType;
+        typedef typename InputImageType::ConstPointer InputImagePointer;
+
+        /** Get the output in the form of a vtkImage */
+        vtkImageData * GetOutput() const;
+
+        /** Set the input in the form of an itk::Image */
+        void SetInput(const InputImageType *);
+
+        /** Updates */
+        void Update();
+
+protected:
+        RGBImageToVTKImageFilter();
+        virtual ~RGBImageToVTKImageFilter();
+
+private:
+        RGBImageToVTKImageFilter(const Self&); // purposely not implemented
+        void operator=(const Self&); // purposely not implemented
+
+        InputImagePointer m_ImageInput;
+        vtkImageData *m_ImageData;
+        std::string m_ScalarTypeName;
+        VTKScalarType m_ScalarType;
+};
+
+/**
+ * Constructor
+ */
+template <class TInputImage>RGBImageToVTKImageFilter<TInputImage>::RGBImageToVTKImageFilter()
+{
+        m_ImageInput = NULL;
+        typedef typename TInputImage::PixelType PixelType;
+        typedef typename PixelTraits< PixelType >::ValueType ScalarType;
+
+        if (typeid (ScalarType) == typeid (double)) {
+                m_ScalarTypeName = "double";
+                m_ScalarType = DOUBLE;
+        } else if (typeid (ScalarType) == typeid (float)) {
+                m_ScalarTypeName = "float";
+                m_ScalarType = FLOAT;
+        } else if (typeid (ScalarType) == typeid (long)) {
+                m_ScalarTypeName = "long";
+                m_ScalarType = LONG;
+        } else if (typeid (ScalarType) == typeid (unsigned long)) {
+                m_ScalarTypeName = "unsigned long";
+                m_ScalarType = UNSIGNED_LONG;
+        } else if (typeid (ScalarType) == typeid (int)) {
+                m_ScalarTypeName = "int";
+                m_ScalarType = INT;
+        } else if (typeid (ScalarType) == typeid (unsigned int)) {
+                m_ScalarTypeName = "unsigned int";
+                m_ScalarType = UNSIGNED_INT;
+        } else if (typeid (ScalarType) == typeid (short)) {
+                m_ScalarTypeName = "short";
+                m_ScalarType = SHORT;
+        } else if (typeid (ScalarType) == typeid (unsigned short)) {
+                m_ScalarTypeName = "unsigned short";
+                m_ScalarType = UNSIGNED_SHORT;
+        } else if (typeid (ScalarType) == typeid (char)) {
+                m_ScalarTypeName = "char";
+                m_ScalarType = CHAR;
+        } else if (typeid (ScalarType) == typeid (unsigned char)) {
+                m_ScalarTypeName = "unsigned char";
+                m_ScalarType = UNSIGNED_CHAR;
+        } else if (typeid (ScalarType) == typeid (signed char)) {
+                m_ScalarTypeName = "signed char";
+                m_ScalarType = SIGNED_CHAR;
+        } else {
+                itkExceptionMacro( << "Type currently not supported");
+        }
+        m_ImageData = NULL;
+}
+
+/**
+ * Destructor
+ */
+template <class TInputImage>RGBImageToVTKImageFilter<TInputImage>::~RGBImageToVTKImageFilter()
+{
+        m_ImageData = NULL;
+}
+
+/**
+ * Set an itk::Image as input
+ */
+template <class TInputImage> void RGBImageToVTKImageFilter<TInputImage>::SetInput(const InputImageType * inputImage)
+{
+        m_ImageInput = inputImage;
+        if (m_ImageData != NULL) {
+                m_ImageData->Delete();
+        }
+        m_ImageData = vtkImageData::New();
+
+
+        typename TInputImage::RegionType img_region = m_ImageInput->GetLargestPossibleRegion();
+
+        unsigned int imageNumComponents = img_region.GetImageDimension();
+        typename TInputImage::RegionType::SizeType imageSize = img_region.GetSize();
+
+        m_ImageData->SetDimensions(imageSize[0], imageSize[1], imageSize[2]);
+        // TODO: Fijar Origen y espaciado
+        m_ImageData->SetOrigin(0.0, 0.0, 0.0);
+        m_ImageData->SetSpacing(1.0, 1.0, 1.0);
+        switch (m_ScalarType) {
+        case DOUBLE:
+                m_ImageData->SetScalarTypeToDouble();
+                break;
+        case FLOAT:
+                m_ImageData->SetScalarTypeToFloat();
+                break;
+        case LONG:
+                m_ImageData->SetScalarTypeToLong();
+                break;
+        case UNSIGNED_LONG:
+                m_ImageData->SetScalarTypeToUnsignedLong();
+                break;
+        case INT:
+                m_ImageData->SetScalarTypeToInt();
+                break;
+        case UNSIGNED_INT:
+                m_ImageData->SetScalarTypeToUnsignedInt();
+                break;
+        case SHORT:
+                m_ImageData->SetScalarTypeToShort();
+                break;
+        case UNSIGNED_SHORT:
+                m_ImageData->SetScalarTypeToUnsignedShort();
+                break;
+        case CHAR:
+                m_ImageData->SetScalarTypeToChar();
+                break;
+        case SIGNED_CHAR:
+                m_ImageData->SetScalarTypeToSignedChar();
+                break;
+        case UNSIGNED_CHAR:
+                m_ImageData->SetScalarTypeToUnsignedChar();
+                break;
+        default:
+                itkExceptionMacro( << "Type currently not supported");
+                break;
+        }
+        m_ImageData->SetNumberOfScalarComponents(imageNumComponents);
+        m_ImageData->AllocateScalars();
+}
+
+/**
+ * Get a vtkImage as output
+ */
+template <class TInputImage>vtkImageData *RGBImageToVTKImageFilter<TInputImage>::GetOutput() const
+{
+        return m_ImageData;
+}
+
+/**
+ * Delegate the Update to the importer
+ */
+template <class TInputImage> void RGBImageToVTKImageFilter<TInputImage>::Update()
+{
+        typename TInputImage::RegionType img_region = m_ImageInput->GetLargestPossibleRegion();
+
+        unsigned int imageNumComponents = img_region.GetImageDimension();
+        typename TInputImage::RegionType::SizeType imageSize = img_region.GetSize();
+
+        itk::ImageLinearIteratorWithIndex<const TInputImage> it(m_ImageInput, img_region);
+
+        double *tuple = new double[imageNumComponents];
+
+        //int cid;
+        typename TInputImage::PixelType pixel;
+
+        vtkDataArray* scalars = m_ImageData->GetPointData()->GetScalars();
+
+        unsigned long offset = 0;
+        unsigned int cid;
+
+        it.SetDirection(0);
+        it.GoToBegin();
+
+        while (!it.IsAtEnd()) {
+                it.GoToBeginOfLine();
+                while (!it.IsAtEndOfLine()) {
+                        pixel = it.Get();
+                        for (cid = 0; cid < pixel.GetNumberOfComponents(); ++cid) {
+                                tuple[cid] = pixel.GetNthComponent(cid);
+                        }
+                        scalars->SetTuple(offset++, tuple);
+                        ++it;
+                }
+                it.NextLine();
+        }
+        /*
+
+        	int cid;
+        	y = 0;
+
+        	it.SetDirection(0);
+        	for (z = 0, it.GoToBegin(); !it.IsAtEnd() ; z++) {
+        		for (y = 0; !it.IsAtReverseEnd(); it.PreviousLine(), y++) {
+        			 it.GoToBeginOfLine();
+        			 for (x = 0; !it.IsAtEndOfLine(); ++it, ++x) {
+        				pixel = it.Get();
+        				for (cid = 0; cid < pixel.GetNumberOfComponents(); ++cid) {
+        					 tuple[cid] = pixel.GetNthComponent(cid);
+        				}
+        				m_ImageData->GetPointData()->GetScalars()->SetTuple(z * imageSize[1] + y * imageSize[0] + x, tuple);
+        			 }
+        		}
+        	}*/
+
+        delete[] tuple;
+}
+
+} // end namespace itk
+
+
+
diff --git a/cadxcore/itk/itkVTKImageToImageFilter.h b/cadxcore/itk/itkVTKImageToImageFilter.h
new file mode 100644
index 0000000..0607599
--- /dev/null
+++ b/cadxcore/itk/itkVTKImageToImageFilter.h
@@ -0,0 +1,195 @@
+/*=========================================================================
+
+Program:   Insight Segmentation & Registration Toolkit
+Module:    $RCSfile: itkVTKImageToImageFilter.h,v $
+Language:  C++
+Date:      $Date: 2004-04-25 21:35:10 $
+Version:   $Revision: 1.5 $
+
+Copyright (c) 2002 Insight Consortium. All rights reserved.
+See ITKCopyright.txt or http://www.itk.org/HTML/Copyright.htm for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#pragma once
+
+#include "itkVTKImageImport.h"
+#include "vtkImageExport.h"
+#include "vtkImageData.h"
+
+#ifndef vtkFloatingPointType
+#define vtkFloatingPointType float
+#endif
+
+namespace itk
+{
+
+/** \class VTKImageToImageFilter
+* \brief Converts a VTK image into an ITK image and plugs a
+*  vtk data pipeline to an ITK datapipeline.
+*
+*  This class puts together an itkVTKImageImporter and a vtkImageExporter.
+*  It takes care of the details related to the connection of ITK and VTK
+*  pipelines. The User will perceive this filter as an adaptor to which
+*  a vtkImage can be plugged as input and an itk::Image is produced as
+*  output.
+*
+* \ingroup   ImageFilters
+*/
+template <class TOutputImage >
+class VTKImageToImageFilter : public ProcessObject
+{
+public:
+        /** Standard class typedefs. */
+        typedef VTKImageToImageFilter Self;
+        typedef ProcessObject Superclass;
+        typedef SmartPointer<Self> Pointer;
+        typedef SmartPointer<const Self> ConstPointer;
+
+        /** Method for creation through the object factory. */
+        itkNewMacro(Self);
+
+        /** Run-time type information (and related methods). */
+        itkTypeMacro(VTKImageToImageFilter, ProcessObject);
+
+        /** Some typedefs. */
+        typedef TOutputImage OutputImageType;
+        typedef typename OutputImageType::ConstPointer OutputImagePointer;
+        typedef VTKImageImport< OutputImageType > ImporterFilterType;
+        typedef typename ImporterFilterType::Pointer ImporterFilterPointer;
+
+        /** Get the output in the form of a vtkImage.
+        This call is delegated to the internal vtkImageImporter filter  */
+        const OutputImageType * GetOutput() const;
+
+        /** Set the input in the form of a vtkImageData */
+        void SetInput(vtkImageData *);
+
+        /** Return the internal VTK image exporter filter.
+        This is intended to facilitate users the access
+        to methods in the exporter */
+        vtkImageExport * GetExporter() const;
+
+        /** Return the internal ITK image importer filter.
+        This is intended to facilitate users the access
+        to methods in the importer */
+        ImporterFilterType * GetImporter() const;
+
+        /** This call delegate the update to the importer */
+        void Update();
+
+protected:
+        VTKImageToImageFilter();
+        virtual ~VTKImageToImageFilter();
+
+private:
+        VTKImageToImageFilter(const Self&); //purposely not implemented
+        void operator=(const Self&); //purposely not implemented
+
+        ImporterFilterPointer m_Importer;
+        vtkImageExport * m_Exporter;
+
+};
+
+/**
+* Constructor
+*/
+template <class TOutputImage> VTKImageToImageFilter<TOutputImage>::VTKImageToImageFilter()
+{
+
+        m_Exporter = vtkImageExport::New();
+
+        m_Importer = ImporterFilterType::New();
+
+        m_Importer->SetUpdateInformationCallback(m_Exporter->GetUpdateInformationCallback());
+        m_Importer->SetPipelineModifiedCallback(m_Exporter->GetPipelineModifiedCallback());
+        m_Importer->SetWholeExtentCallback(m_Exporter->GetWholeExtentCallback());
+        m_Importer->SetSpacingCallback(m_Exporter->GetSpacingCallback());
+        m_Importer->SetOriginCallback(m_Exporter->GetOriginCallback());
+        m_Importer->SetScalarTypeCallback(m_Exporter->GetScalarTypeCallback());
+        m_Importer->SetNumberOfComponentsCallback(m_Exporter->GetNumberOfComponentsCallback());
+        m_Importer->SetPropagateUpdateExtentCallback(m_Exporter->GetPropagateUpdateExtentCallback());
+        m_Importer->SetUpdateDataCallback(m_Exporter->GetUpdateDataCallback());
+        m_Importer->SetDataExtentCallback(m_Exporter->GetDataExtentCallback());
+        m_Importer->SetBufferPointerCallback(m_Exporter->GetBufferPointerCallback());
+        m_Importer->SetCallbackUserData(m_Exporter->GetCallbackUserData());
+
+}
+
+/**
+* Destructor
+*/
+template <class TOutputImage>
+VTKImageToImageFilter<TOutputImage>
+::~VTKImageToImageFilter()
+{
+        if (m_Exporter) {
+                m_Exporter->Delete();
+                m_Exporter = 0;
+        }
+}
+
+/**
+* Set a vtkImageData as input
+*/
+template <class TOutputImage>
+void
+VTKImageToImageFilter<TOutputImage>
+::SetInput(vtkImageData * inputImage)
+{
+        m_Exporter->SetInputData(inputImage);
+}
+
+/**
+* Get an itk::Image as output
+*/
+template <class TOutputImage>
+const typename VTKImageToImageFilter<TOutputImage>::OutputImageType *
+VTKImageToImageFilter<TOutputImage>
+::GetOutput() const
+{
+        return m_Importer->GetOutput();
+}
+
+/**
+* Get the exporter filter
+*/
+template <class TOutputImage>
+vtkImageExport *
+VTKImageToImageFilter<TOutputImage>
+::GetExporter() const
+{
+        return m_Exporter;
+}
+
+/**
+* Get the importer filter
+*/
+template <class TOutputImage>
+typename VTKImageToImageFilter<TOutputImage>::ImporterFilterType *
+VTKImageToImageFilter<TOutputImage>
+::GetImporter() const
+{
+        return m_Importer;
+}
+
+/**
+* Delegate the Update to the importer
+*/
+template <class TOutputImage>
+void
+VTKImageToImageFilter<TOutputImage>
+::Update()
+{
+        m_Importer->Update();
+}
+
+
+} // end namespace itk
+
+
+
+
diff --git a/cadxcore/lang/cadxcore.pot b/cadxcore/lang/cadxcore.pot
new file mode 100644
index 0000000..91eae5f
--- /dev/null
+++ b/cadxcore/lang/cadxcore.pot
@@ -0,0 +1,6278 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GinkgoCADx\n"
+"POT-Creation-Date: 2014-06-11 14:19+0100\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: English <en at li.org>\n"
+"Language: en\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-KeywordsList: _Std;_\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Poedit-SearchPath-0: ..\n"
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Red Vessels"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Metal"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Green"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "GE Color"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PET"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "P-Value"
+msgstr ""
+
+#: ../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr ""
+
+#: ../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr ""
+
+#: ../api/dicom/idicomconformance.cpp:80 ../api/dicom/idicomconformance.cpp:84
+#: ../api/dicom/idicomconformance.cpp:143
+#: ../api/dicom/idicomconformance.cpp:152
+#: ../api/dicom/idicomconformance.cpp:214
+#: ../api/dicom/idicomconformance.cpp:220
+msgid "GIL/DICOM/Conformance"
+msgstr ""
+
+#: ../api/dicom/idicomconformance.cpp:80 ../api/dicom/idicomconformance.cpp:84
+msgid "Unable to add supported transfer syntax "
+msgstr ""
+
+#: ../api/dicom/idicomconformance.cpp:80 ../api/dicom/idicomconformance.cpp:84
+msgid " to SOP Class "
+msgstr ""
+
+#: ../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr ""
+
+#: ../api/dicom/idicomconformance.cpp:84
+#: ../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr ""
+
+#: ../api/dicom/idicomconformance.cpp:143
+#: ../api/dicom/idicomconformance.cpp:152
+msgid "Unable to add supported SOP Class "
+msgstr ""
+
+#: ../api/dicom/idicomconformance.cpp:143
+#: ../api/dicom/idicomconformance.cpp:152
+msgid " to Modality "
+msgstr ""
+
+#: ../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr ""
+
+#: ../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr ""
+
+#: ../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr ""
+
+#: ../api/iannotator.cpp:97
+msgid "Slice"
+msgstr ""
+
+#: ../api/iannotator.cpp:97
+msgid "of"
+msgstr ""
+
+#: ../api/iannotator.cpp:97
+msgid "Volume"
+msgstr ""
+
+#: ../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr ""
+
+#: ../api/iannotator.cpp:110
+msgid "Image without metric information"
+msgstr ""
+
+#: ../api/iannotator.cpp:119
+msgid "Slice thickness"
+msgstr ""
+
+#: ../api/iannotator.cpp:127
+msgid "Slice location"
+msgstr ""
+
+#: ../api/iannotator.cpp:139
+msgid "Scale"
+msgstr ""
+
+#: ../api/iannotator.cpp:147
+msgid "Right"
+msgstr ""
+
+#: ../api/iannotator.cpp:149
+msgid "Left"
+msgstr ""
+
+#: ../api/iannotator.cpp:219
+msgid "Position:"
+msgstr ""
+
+#: ../api/iannotator.cpp:272
+msgid "Value:"
+msgstr ""
+
+#: ../api/iexception.cpp:52
+msgid "Exception in component"
+msgstr ""
+
+#: ../api/initwx.cpp:439
+msgid "Initializing environment ..."
+msgstr ""
+
+#: ../api/initwx.cpp:446 ../api/initwx.cpp:447 ../api/initwx.cpp:448
+#: ../api/initwx.cpp:449 ../api/initwx.cpp:450 ../api/initwx.cpp:451
+#: ../api/initwx.cpp:452 ../api/initwx.cpp:453
+msgid "Ginkgo CADx restrictions"
+msgstr ""
+
+#: ../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr ""
+
+#: ../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr ""
+
+#: ../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr ""
+
+#: ../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr ""
+
+#: ../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr ""
+
+#: ../api/initwx.cpp:451
+msgid "Export images"
+msgstr ""
+
+#: ../api/initwx.cpp:452
+msgid "Acquire DICOM files"
+msgstr ""
+
+#: ../api/initwx.cpp:453
+msgid "Import files to DICOM format"
+msgstr ""
+
+#: ../api/initwx.cpp:455 ../api/initwx.cpp:457
+msgid "Online manual"
+msgstr ""
+
+#: ../api/initwx.cpp:455 ../api/initwx.cpp:457
+msgid "URL of manual"
+msgstr ""
+
+#: ../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr ""
+
+#: ../api/initwx.cpp:459
+msgid "Online support"
+msgstr ""
+
+#: ../api/initwx.cpp:459
+msgid "URL of online support"
+msgstr ""
+
+#: ../api/initwx.cpp:459
+msgid "http://ginkgo-cadx.com/"
+msgstr ""
+
+#: ../api/initwx.cpp:460 ../api/initwx.cpp:461
+msgid "Program Updates"
+msgstr ""
+
+#: ../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr ""
+
+#: ../api/initwx.cpp:461
+msgid "Update period (days)"
+msgstr ""
+
+#: ../api/initwx.cpp:462
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr ""
+
+#: ../api/initwx.cpp:462
+msgid "Setup Security"
+msgstr ""
+
+#: ../api/initwx.cpp:463
+msgid "Show on startup"
+msgstr ""
+
+#: ../api/initwx.cpp:463
+msgid "Show on startup default value"
+msgstr ""
+
+#: ../api/initwx.cpp:465 ../api/initwx.cpp:466
+#: ../main/gui/history3/historypanel3.cpp:328
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr ""
+
+#: ../api/initwx.cpp:465
+msgid "Settings menu"
+msgstr ""
+
+#: ../api/initwx.cpp:466
+msgid "License menu"
+msgstr ""
+
+#: ../api/initwx.cpp:467 ../api/initwx.cpp:468 ../api/initwx.cpp:469
+#: ../api/initwx.cpp:470 ../api/initwx.cpp:471 ../api/initwx.cpp:472
+#: ../api/initwx.cpp:473 ../api/initwx.cpp:474
+msgid "PACS Limits"
+msgstr ""
+
+#: ../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr ""
+
+#: ../api/initwx.cpp:468
+msgid "Upload images to a PACS server"
+msgstr ""
+
+#: ../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr ""
+
+#: ../api/initwx.cpp:470
+msgid "Enable remote PACS configuration"
+msgstr ""
+
+#: ../api/initwx.cpp:471
+msgid "Enable TLS configuration"
+msgstr ""
+
+#: ../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr ""
+
+#: ../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr ""
+
+#: ../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr ""
+
+#: ../api/initwx.cpp:475 ../api/initwx.cpp:476 ../api/initwx.cpp:477
+#: ../api/initwx.cpp:478 ../api/initwx.cpp:479 ../api/initwx.cpp:480
+msgid "Import"
+msgstr ""
+
+#: ../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr ""
+
+#: ../api/initwx.cpp:476
+msgid "Show accession number input"
+msgstr ""
+
+#: ../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr ""
+
+#: ../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+
+#: ../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr ""
+
+#: ../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr ""
+
+#: ../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr ""
+
+#: ../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr ""
+
+#: ../api/initwx.cpp:483 ../api/initwx.cpp:484 ../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr ""
+
+#: ../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr ""
+
+#: ../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr ""
+
+#: ../api/initwx.cpp:485
+msgid "Default ORU template"
+msgstr ""
+
+#: ../api/initwx.cpp:488 ../api/initwx.cpp:489 ../api/initwx.cpp:491
+#: ../api/initwx.cpp:493 ../api/initwx.cpp:494 ../api/initwx.cpp:495
+#: ../api/initwx.cpp:496 ../api/initwx.cpp:498
+msgid "Style"
+msgstr ""
+
+#: ../api/initwx.cpp:503
+#, c-format
+msgid "Download %s images"
+msgstr ""
+
+#: ../api/initwx.cpp:504 ../api/initwx.cpp:508
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+msgid "PACS"
+msgstr ""
+
+#: ../api/initwx.cpp:507
+msgid "Download all modalities"
+msgstr ""
+
+#: ../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr ""
+
+#: ../api/initwx.cpp:510
+msgid "Enable shaders"
+msgstr ""
+
+#: ../api/initwx.cpp:513 ../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+msgid "Ginkgo Cloud"
+msgstr ""
+
+#: ../api/initwx.cpp:513
+msgid "Download from Ginkgo Cloud"
+msgstr ""
+
+#: ../api/initwx.cpp:560
+msgid "Tools loading base ..."
+msgstr ""
+
+#: ../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr ""
+
+#: ../api/initwx.cpp:566
+msgid "Loading plugins ..."
+msgstr ""
+
+#: ../api/initwx.cpp:580
+msgid "Unable to start GinkgoCADx:\n"
+msgstr ""
+
+#: ../api/initwx.cpp:580 ../api/initwx.cpp:621
+msgid "error"
+msgstr ""
+
+#: ../api/initwx.cpp:584
+msgid "Loading resources ..."
+msgstr ""
+
+#: ../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr ""
+
+#: ../api/initwx.cpp:601
+msgid "Configuring environment ..."
+msgstr ""
+
+#: ../api/initwx.cpp:621
+msgid "Failed to set permissions:\n"
+msgstr ""
+
+#: ../api/initwx.cpp:634
+msgid "Updating ..."
+msgstr ""
+
+#: ../api/initwx.cpp:638
+msgid "Interpreting parameters ..."
+msgstr ""
+
+#: ../api/initwx.cpp:689
+msgid "Error unregistering tools: "
+msgstr ""
+
+#: ../api/initwx.cpp:769
+msgid "Starting"
+msgstr ""
+
+#: ../api/ivista.cpp:36 ../commands/comandocarga.cpp:73
+msgid "Loading..."
+msgstr ""
+
+#: ../api/iwidgets.cpp:268 ../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ../main/gui/import/pasosimportacionbase.cpp:151
+msgid "Name"
+msgstr ""
+
+#: ../api/iwidgets.cpp:285
+msgid "Area"
+msgstr ""
+
+#: ../api/iwidgets.cpp:302
+msgid "Perimeter"
+msgstr ""
+
+#: ../api/iwidgets.cpp:316
+msgid "Travel (I)"
+msgstr ""
+
+#: ../api/iwidgets.cpp:326
+msgid "Travel (M)"
+msgstr ""
+
+#: ../api/threads/thread.cpp:114 ../api/threads/thread.cpp:117
+#: ../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr ""
+
+#: ../api/threads/thread.cpp:114 ../api/threads/thread.cpp:117
+msgid "Error while running thread: "
+msgstr ""
+
+#: ../api/threads/thread.cpp:114 ../api/threads/thread.cpp:117
+msgid " : "
+msgstr ""
+
+#: ../api/threads/thread.cpp:120
+msgid "Internal error while running thread: "
+msgstr ""
+
+#: ../api/widgetserializable.cpp:60
+msgid "Creation Date"
+msgstr ""
+
+#: ../api/widgetserializable.cpp:65
+msgid "Modification Date"
+msgstr ""
+
+#: ../api/widgetserializable.cpp:68
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ../wx/gnkinforme/gnkinformebase.cpp:40
+msgid "Physician"
+msgstr ""
+
+#: ../commands/acquirefromurlcommand.cpp:55
+#: ../commands/pacsdownloadcommand.cpp:88
+#: ../commands/synchronizationcommand.cpp:70
+msgid "Downloading files ..."
+msgstr ""
+
+#: ../commands/acquirefromurlcommand.cpp:69
+#: ../commands/synchronizationcommand.cpp:91
+#: ../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, c-format
+msgid "Downloading file %d"
+msgstr ""
+
+#: ../commands/acquirefromurlcommand.cpp:81
+msgid "Error downloading file: "
+msgstr ""
+
+#: ../commands/acquirefromurlcommand.cpp:95
+#: ../commands/pacsdownloadcommand.cpp:114
+#: ../commands/synchronizationcommand.cpp:121
+msgid "Internal Error"
+msgstr ""
+
+#: ../commands/acquirefromurlcommand.cpp:115
+msgid "Error downloading files: "
+msgstr ""
+
+#: ../commands/autocleaningcommand.cpp:62
+msgid "Cleaning dicomdir..."
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:67
+msgid "Downloading files..."
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:183
+msgid "Unknown operation"
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:188
+msgid "Error in cloud operation. See log to get more details..."
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:249
+msgid "Could to retrieve study."
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:260 ../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:262
+msgid "Error retrieving study."
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:271
+msgid "Study successfully retrieved."
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:271 ../commands/cloudcommand.cpp:405
+msgid "Speed"
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:271 ../commands/cloudcommand.cpp:405
+msgid "bytes/sec during"
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:271 ../commands/cloudcommand.cpp:405
+msgid "seconds"
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:275
+msgid "Empty Response"
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:289
+msgid "Extracting files..."
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:313 ../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:383
+msgid "Could to perform query."
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:396
+msgid "Error perfoming the query."
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:405
+msgid "Query successfully performed."
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:472
+msgid "Unknown JSon attribute:"
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:482
+msgid "Error parsing JSon: "
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr ""
+
+#: ../commands/cloudcommand.cpp:515 ../commands/openremovableunit.cpp:148
+#: ../main/gui/open/abrir.cpp:119 ../main/gui/open/abrir.cpp:159
+#: ../main/gui/open/opendialogs.cpp:146
+msgid "Storing in the history..."
+msgstr ""
+
+#: ../commands/comandoactualizaciones.cpp:46
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:536
+msgid "Check Updates"
+msgstr ""
+
+#: ../commands/comandoactualizaciones.cpp:136
+msgid "Not enough parameters found on XML"
+msgstr ""
+
+#: ../commands/comandoactualizaciones.cpp:145
+msgid "XML parsing internal error"
+msgstr ""
+
+#: ../commands/comandoactualizaciones.cpp:156
+msgid "Error checking application updates"
+msgstr ""
+
+#: ../commands/comandoactualizaciones.cpp:156
+msgid "Ginkgo CADx updates"
+msgstr ""
+
+#: ../commands/comandoactualizaciones.cpp:170
+msgid "Internal error checking updates"
+msgstr ""
+
+#: ../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr ""
+
+#: ../commands/comandocarga.cpp:92 ../commands/comandocarga.cpp:96
+msgid "Exception loading:"
+msgstr ""
+
+#: ../commands/comandocarga.cpp:100
+msgid "Study malformed or unsupported"
+msgstr ""
+
+#: ../commands/comandocarga.cpp:129 ../commands/comandocarga.cpp:139
+msgid "Error loading study: "
+msgstr ""
+
+#: ../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr ""
+
+#: ../commands/comandocarga.cpp:144
+msgid "Error loading study."
+msgstr ""
+
+#: ../commands/comandocarga.cpp:149
+msgid "Load canceled by user"
+msgstr ""
+
+#: ../commands/comandocarga.cpp:156
+#: ../main/gui/history3/historypanel3.cpp:1056
+#: ../main/gui/history3/historypanel3.cpp:1063
+#: ../main/gui/history3/historypanel3.cpp:1068
+msgid "Error loading study"
+msgstr ""
+
+#: ../commands/comandoexportacion.cpp:81
+#: ../commands/exporttodicomdircommand.cpp:214
+msgid "Exporting files..."
+msgstr ""
+
+#: ../commands/comandoexportacion.cpp:105
+#: ../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr ""
+
+#: ../commands/comandoexportacion.cpp:158
+#, c-format
+msgid "Exporting file %d of %d"
+msgstr ""
+
+#: ../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr ""
+
+#: ../commands/comandoexportacion.cpp:233
+msgid "image_%m-%d-%Y_"
+msgstr ""
+
+#: ../commands/comandoincluirhistorial.cpp:108
+msgid "Exploring directory ..."
+msgstr ""
+
+#: ../commands/comandoincluirhistorial.cpp:122
+msgid "Reading DICOMDIR ..."
+msgstr ""
+
+#: ../commands/comandoincluirhistorial.cpp:142
+#: ../commands/comandoincluirhistorial.cpp:156
+#: ../commands/comandoincluirhistorial.cpp:177
+msgid "Including files in the history .."
+msgstr ""
+
+#: ../commands/comandoincluirhistorial.cpp:196
+msgid "Exploring directory "
+msgstr ""
+
+#: ../commands/comandoincluirhistorial.cpp:256
+#: ../commands/linkhistorycommand.cpp:118
+msgid "Image acquisition finished."
+msgstr ""
+
+#: ../commands/comandoincluirhistorial.cpp:258
+#, c-format
+msgid "There have been included %d images."
+msgstr ""
+
+#: ../commands/comandoincluirhistorial.cpp:261
+#: ../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+
+#: ../commands/comandoincluirhistorial.cpp:273
+#: ../commands/linkhistorycommand.cpp:133
+msgid "This files doesn't exist:"
+msgstr ""
+
+#: ../commands/comandoincluirhistorial.cpp:284
+#: ../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr ""
+
+#: ../commands/comandoincluirhistorial.cpp:296
+#: ../commands/linkhistorycommand.cpp:156
+msgid "This files are Dicom Dirs:"
+msgstr ""
+
+#: ../commands/comandopacs.cpp:58 ../commands/pacsdownloadcommand.cpp:61
+#: ../commands/sendpacscommand.cpp:137
+msgid "There is not any Remote PACS configured"
+msgstr ""
+
+#: ../commands/comandopacs.cpp:84
+msgid "Querying PACS ..."
+msgstr ""
+
+#: ../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr ""
+
+#: ../commands/comandopacs.cpp:98
+msgid "Starting Search ..."
+msgstr ""
+
+#: ../commands/comandopacs.cpp:108 ../commands/pacsdownloadcommand.cpp:101
+msgid "Server ID not found. ID = "
+msgstr ""
+
+#: ../commands/comandopacs.cpp:110 ../commands/comandopacs.cpp:112
+#: ../commands/comandopacs.cpp:114 ../commands/comandopacs.cpp:116
+msgid "Query error with PACS Id "
+msgstr ""
+
+#: ../commands/comandopacs.cpp:116
+#: ../main/controllers/controladoreventos.cpp:284
+#: ../main/gui/history3/historypanel3.cpp:1068
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error"
+msgstr ""
+
+#: ../commands/comandopacs.cpp:135
+msgid "Failed to perform search: "
+msgstr ""
+
+#: ../commands/dbmigrationcommand.cpp:94
+#: ../commands/dbmigrationcommand.cpp:103
+msgid "Migrating old DICOM Dir ..."
+msgstr ""
+
+#: ../commands/dbmigrationcommand.cpp:99
+#: ../commands/dbmigrationcommand.cpp:108
+msgid "Including files ..."
+msgstr ""
+
+#: ../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+
+#: ../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+
+#: ../commands/dbmigrationcommand.cpp:116 ../commands/dicomizecommand.cpp:181
+#: ../commands/openremovableunit.cpp:74 ../commands/openremovableunit.cpp:110
+#: ../commands/pdfextractercommand.cpp:113
+#: ../commands/pdfextractercommand.cpp:122
+#: ../commands/pdfextractercommand.cpp:130
+#: ../main/controllers/historycontroller.cpp:447
+#: ../main/controllers/historycontroller.cpp:1680
+#: ../main/controllers/historycontroller.cpp:1725
+#: ../main/controllers/historycontroller.cpp:1779
+#: ../main/controllers/historycontroller.cpp:1801
+#: ../main/controllers/historycontroller.cpp:1825
+#: ../main/controllers/historycontroller.cpp:1882
+#: ../main/controllers/historycontroller.cpp:1939
+#: ../main/controllers/historycontroller.cpp:1976
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ../main/gui/anonymize/anonymizepanel.cpp:95
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ../main/gui/export/parametrosprincipales.cpp:161
+#: ../main/gui/export/parametrosprincipales.cpp:167
+#: ../main/gui/history3/historypanel3.cpp:904
+#: ../main/gui/history3/historypanel3.cpp:975
+#: ../main/gui/history3/historypanel3.cpp:1045
+#: ../main/gui/history3/historypanel3.cpp:1078
+#: ../main/gui/history3/historypanel3.cpp:1106
+#: ../main/gui/history3/historypanel3.cpp:1119
+#: ../main/gui/history3/historypanel3.cpp:1171
+#: ../main/gui/import/pasoperfilimportacion.cpp:170
+#: ../main/gui/import/pasoperfilimportacion.cpp:188
+#: ../main/gui/import/selectimagesimportation.cpp:141
+#: ../main/gui/import/selectimagesimportation.cpp:342
+#: ../main/gui/import/selectimagesimportation.cpp:743
+#: ../main/gui/import/selectimagesimportation.cpp:761
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ../main/gui/login/dialogologin.cpp:50
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ../main/gui/open/opendialogs.cpp:58 ../main/gui/open/opendialogs.cpp:62
+#: ../main/gui/open/opendialogs.cpp:134
+#: ../main/gui/progress/statusbarprogreso.cpp:284
+#: ../main/gui/progress/statusbarprogreso.cpp:287
+#: ../main/gui/progress/statusbarprogreso.cpp:292
+#: ../main/tools/anonymizetool.cpp:46 ../main/tools/exportdicomdirtool.cpp:57
+#: ../main/tools/sendpacstool.cpp:59 ../main/tools/showtagshistorytool.cpp:42
+#: ../main/gui/history3/openwithdialog.h:72
+msgid "Info"
+msgstr ""
+
+#: ../commands/dbmigrationcommand.cpp:123
+msgid "Migration finisthed successfully"
+msgstr ""
+
+#: ../commands/dialogopathssobreescribirbase.cpp:27
+#: ../commands/dialogopathssobreescribirbase.cpp:62
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid "Overwrite"
+msgstr ""
+
+#: ../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr ""
+
+#: ../commands/dialogopathssobreescribirbase.cpp:65
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ../main/gui/history3/historypanel3base.cpp:339
+#: ../main/gui/history3/historypanel3base.cpp:415
+#: ../main/gui/history3/historypanel3base.cpp:486
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ../main/gui/open/opendialogsbase.cpp:53
+#: ../main/gui/open/opendialogsbase.cpp:131
+#: ../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ../widgets/gui/calibracionbase.cpp:86
+#: ../widgets/gui/selecciontextobase.cpp:60
+#: ../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr ""
+
+#: ../commands/dicomizationcompletebase.cpp:24
+#: ../commands/dicomizationcompletebase.cpp:33
+#: ../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr ""
+
+#: ../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr ""
+
+#: ../commands/dicomizationcompletebase.cpp:56
+msgid "Don't show this message again"
+msgstr ""
+
+#: ../commands/dicomizationcompletebase.cpp:62
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ../main/gui/history3/historypanel3base.cpp:411
+#: ../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ../widgets/gui/calibracionbase.cpp:82
+#: ../widgets/gui/selecciontextobase.cpp:56
+msgid "Accept"
+msgstr ""
+
+#: ../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr ""
+
+#: ../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr ""
+
+#: ../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr ""
+
+#: ../commands/dicomizecommand.cpp:179
+msgid "Import process failed:"
+msgstr ""
+
+#: ../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+
+#: ../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr ""
+
+#: ../commands/dicomizecommand.cpp:370
+msgid "Unknown error in dicomization process"
+msgstr ""
+
+#: ../commands/dicomizecommand.cpp:431 ../commands/dicomizecommand.cpp:442
+#: ../commands/sendpacscommand.cpp:185
+msgid "Error sending evidences:"
+msgstr ""
+
+#: ../commands/dicomizecommand.cpp:437 ../commands/dicomizecommand.cpp:448
+msgid "Can not upload to the PACS:\n"
+msgstr ""
+
+#: ../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+
+#: ../commands/exporttodicomdircommand.cpp:261
+#: ../commands/exporttodicomdircommand.cpp:338
+#, c-format
+msgid "Exporting series %d of %d"
+msgstr ""
+
+#: ../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr ""
+
+#: ../commands/exporttodicomdircommand.cpp:279
+#: ../commands/exporttodicomdircommand.cpp:385
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ../main/gui/export/parametrosprincipales.cpp:167
+msgid "There was an error creating directory"
+msgstr ""
+
+#: ../commands/exporttodicomdircommand.cpp:303
+#: ../commands/exporttodicomdircommand.cpp:408
+msgid "There was an error writing file"
+msgstr ""
+
+#: ../commands/exporttodicomdircommand.cpp:358
+msgid "There was an error anonymizing files"
+msgstr ""
+
+#: ../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr ""
+
+#: ../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr ""
+
+#: ../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr ""
+
+#: ../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr ""
+
+#: ../commands/incomingdicomassociationcommand.cpp:274
+#: ../commands/incomingdicomassociationcommand.cpp:355
+msgid "Ignoring incoming operation "
+msgstr ""
+
+#: ../commands/incomingdicomassociationcommand.cpp:274
+#: ../commands/incomingdicomassociationcommand.cpp:298
+#: ../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr ""
+
+#: ../commands/incomingdicomassociationcommand.cpp:473
+#: ../commands/pacsdownloadcommand.cpp:170
+#: ../commands/pacsdownloadcommand.cpp:179
+msgid "Including files..."
+msgstr ""
+
+#: ../commands/linkhistorycommand.cpp:68
+msgid "Linking study..."
+msgstr ""
+
+#: ../commands/openremovableunit.cpp:42 ../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr ""
+
+#: ../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+
+#: ../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+
+#: ../commands/openremovableunit.cpp:130
+msgid "Select drive you want to open"
+msgstr ""
+
+#: ../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+
+#: ../commands/pacsdownloadcommand.cpp:134
+msgid "Error downloading study: "
+msgstr ""
+
+#: ../commands/pdfextractercommand.cpp:103
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr ""
+
+#: ../commands/pdfextractercommand.cpp:103
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ../main/gui/progress/statusbarprogreso.cpp:278
+#: ../widgets/gui/calibracion.cpp:205 ../widgets/gui/calibracion.cpp:209
+#: ../widgets/gui/calibracion.cpp:219 ../widgets/gui/calibracion.cpp:225
+#: ../widgets/gui/calibracion.cpp:229
+msgid "Error"
+msgstr ""
+
+#: ../commands/pdfextractercommand.cpp:113
+#: ../commands/pdfextractercommand.cpp:122
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr ""
+
+#: ../commands/pdfextractercommand.cpp:130
+msgid "PDF files extracted successfully..."
+msgstr ""
+
+#: ../commands/secondarycapturedicomizecommand.cpp:73
+msgid "Ginkgo CADx Secondary Capture"
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:73
+msgid "Message successfully sent"
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:77
+msgid "Unknown protocol"
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:80 ../commands/sendhl7command.cpp:93
+#: ../commands/sendhl7command.cpp:145
+msgid "Error sending message:"
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:93 ../commands/sendhl7command.cpp:94
+msgid "Unknown error"
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:134
+msgid "Failed to start connection"
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:148
+msgid "Error sending message. It was sent "
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:258
+msgid "Failed delivery confirmation:"
+msgstr ""
+
+#: ../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr ""
+
+#: ../commands/sendpacscommand.cpp:51
+msgid "Send files to PACS"
+msgstr ""
+
+#: ../commands/sendpacscommand.cpp:155
+msgid "Uploading files ..."
+msgstr ""
+
+#: ../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr ""
+
+#: ../commands/sendpacscommand.cpp:181
+msgid "Error:"
+msgstr ""
+
+#: ../commands/sendpacscommand.cpp:189
+msgid "Error sending evidences: Internal error."
+msgstr ""
+
+#: ../commands/sendpacscommand.cpp:203
+msgid "Error uploading the study to PACS: "
+msgstr ""
+
+#: ../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+
+#: ../commands/sendpacscommand.cpp:206
+msgid "Retry send to PACS"
+msgstr ""
+
+#: ../commands/synchronizationcommand.cpp:104
+msgid "Error downloading file"
+msgstr ""
+
+#: ../commands/synchronizationcommand.cpp:141
+msgid "Error synchronizing study: "
+msgstr ""
+
+#: ../commands/thumbnailscommand.cpp:107 ../commands/thumbnailscommand.cpp:133
+#: ../commands/thumbnailscommand.cpp:247 ../commands/thumbnailscommand.cpp:376
+#: ../commands/thumbnailscommand.cpp:382
+#: ../main/gui/import/selectimagesimportation.cpp:504
+msgid "Creating Thumbnail..."
+msgstr ""
+
+#: ../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr ""
+
+#: ../export/tools/iaddfiletohistorytool.cpp:19
+#: ../main/gui/history3/historypanel3.cpp:632
+msgid "Open study"
+msgstr ""
+
+#: ../export/tools/iangletool.cpp:19
+msgid "Angle \tCtrl+A"
+msgstr ""
+
+#: ../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr ""
+
+#: ../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr ""
+
+#: ../export/tools/icolormaptool.cpp:20
+msgid "Color Map"
+msgstr ""
+
+#: ../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ../main/gui/open/opendialogsbase.cpp:46
+#: ../main/gui/open/opendialogsbase.cpp:198
+msgid "Copy"
+msgstr ""
+
+#: ../export/tools/icornerannotationstool.cpp:20
+msgid "Window annotations"
+msgstr ""
+
+#: ../export/tools/idetachwindowtool.cpp:19
+msgid "Detach window"
+msgstr ""
+
+#: ../export/tools/iimageexporttool.cpp:19
+msgid "Export image..."
+msgstr ""
+
+#: ../export/tools/imarkertool.cpp:20
+msgid "Marking Tools \tCtrl+M"
+msgstr ""
+
+#: ../export/tools/imetricgridtool.cpp:20
+msgid "Metric grid"
+msgstr ""
+
+#: ../export/tools/inotetool.cpp:19
+msgid "Text Note \tCtrl+N"
+msgstr ""
+
+#: ../export/tools/ipacsuploadtool.cpp:19
+msgid "Upload study..."
+msgstr ""
+
+#: ../export/tools/ipixelsbluringtool.cpp:20
+msgid "Pixels blurring"
+msgstr ""
+
+#: ../export/tools/ipointertool.cpp:19
+msgid "Pointer \tEsc"
+msgstr ""
+
+#: ../export/tools/iqueryretrievetool.cpp:19
+#: ../main/tools/queryretrievehistorytool.cpp:25
+#: ../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr ""
+
+#: ../export/tools/iresettool.cpp:19
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+msgid "Reset"
+msgstr ""
+
+#: ../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr ""
+
+#: ../export/tools/iruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: ../export/tools/isecondarycapturetool.cpp:19
+msgid "Save snapshot as new series..."
+msgstr ""
+
+#: ../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr ""
+
+#: ../export/tools/ishowtagstool.cpp:19
+#: ../main/tools/showtagshistorytool.cpp:27
+msgid "DICOM inspector"
+msgstr ""
+
+#: ../export/tools/isimpleprinttool.cpp:19
+#: ../main/tools/simpleprinttool.cpp:226
+msgid "Print"
+msgstr ""
+
+#: ../export/tools/istartdicomizationtool.cpp:19
+msgid "Dicomize..."
+msgstr ""
+
+#: ../export/tools/itoolpan.cpp:19
+msgid "Pan \tCtrl+P"
+msgstr ""
+
+#: ../export/tools/itoolslider.cpp:19
+msgid "Slider \tCtrl+S"
+msgstr ""
+
+#: ../export/tools/itoolwindowlevel.cpp:19
+msgid "Window/Level \tCtrl+W"
+msgstr ""
+
+#: ../export/tools/itoolzoom.cpp:19
+msgid "Zoom \tCtrl+O"
+msgstr ""
+
+#: ../export/tools/itrackballtool.cpp:19
+msgid "Trackball \tCtrl+T"
+msgstr ""
+
+#: ../export/tools/iundotool.cpp:20 ../main/tools/undotool.cpp:109
+msgid "Undo"
+msgstr ""
+
+#: ../export/tools/ivideotool.cpp:19
+msgid "Video \tCtrl+Space"
+msgstr ""
+
+#: ../export/tools/iwindowlayouttool.cpp:20
+msgid "Window layout"
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:161
+msgid "Studies with"
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:210
+msgid "Reading properties"
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:219
+#: ../main/controllers/controladorcarga.cpp:642
+#: ../main/controllers/controladorcarga.cpp:888
+#: ../main/controllers/streaming/streamingloader.cpp:600
+msgid "Error reading the study: "
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:224
+#: ../main/controllers/controladorcarga.cpp:229
+#: ../main/controllers/controladorcarga.cpp:647
+#: ../main/controllers/controladorcarga.cpp:893
+msgid "Internal error reading the study: "
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:269
+#: ../main/controllers/controladorcarga.cpp:281
+#: ../main/controllers/controladorcarga.cpp:905
+msgid "Spacing is not valid: ("
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:305
+#: ../main/controllers/controladorcarga.cpp:338
+#: ../main/controllers/controladorcarga.cpp:372
+#: ../main/controllers/controladorcarga.cpp:408
+#: ../main/controllers/controladorcarga.cpp:441
+#: ../main/controllers/controladorcarga.cpp:474
+#: ../main/controllers/controladorcarga.cpp:507
+#: ../main/controllers/controladorcarga.cpp:540
+#: ../main/controllers/controladorcarga.cpp:573
+#: ../main/controllers/controladorcarga.cpp:606
+#: ../main/controllers/controladorcarga.cpp:935
+msgid "Error loading the study: Out of memory"
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:375
+msgid "Error loading the study: Internal Error"
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:630
+#: ../main/controllers/streaming/streamingloader.cpp:1023
+#: ../main/controllers/streaming/streamingloader.cpp:1223
+#: ../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:651
+#: ../main/controllers/controladorcarga.cpp:960
+msgid "Process canceled by user."
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:878
+msgid "Interpreting properties"
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:917
+msgid "Spacing of the image is invalid: ("
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:942
+msgid "Reading dataset"
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:951
+msgid "Error reading the study:"
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr ""
+
+#: ../main/controllers/controladorcarga.cpp:972
+msgid "load"
+msgstr ""
+
+#: ../main/controllers/controladorenviohl7.cpp:40
+msgid "Stopping HL7 sender"
+msgstr ""
+
+#: ../main/controllers/controladorenviohl7.cpp:63
+#: ../main/controllers/controladorenviohl7.cpp:76
+msgid "Error starting HL7 sender"
+msgstr ""
+
+#: ../main/controllers/controladorenviohl7.cpp:65
+#: ../main/controllers/controladorenviohl7.cpp:78
+msgid "HL7 sender started"
+msgstr ""
+
+#: ../main/controllers/controladorenviohl7.cpp:108
+msgid "HL7 controller destroyed"
+msgstr ""
+
+#: ../main/controllers/controladorenviohl7.cpp:150
+msgid "Error processing message"
+msgstr ""
+
+#: ../main/controllers/controladoreventos.cpp:284
+#: ../main/controllers/pacscontroller.cpp:1549
+#: ../main/controllers/pacscontroller.cpp:1553
+#: ../main/controllers/pacscontroller.cpp:1557
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ../main/gui/import/pasosimportacionbase.cpp:195
+#: ../wx/gnkinforme/gnkinformebase.cpp:184
+msgid "Unknown"
+msgstr ""
+
+#: ../main/controllers/controladorextensiones.cpp:110
+msgid "Loading"
+msgstr ""
+
+#: ../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr ""
+
+#: ../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr ""
+
+#: ../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr ""
+
+#: ../main/controllers/controladorextensiones.cpp:153
+msgid "Could not find entry point"
+msgstr ""
+
+#: ../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr ""
+
+#: ../main/controllers/controladorhl7.cpp:74
+msgid "Integration engine hostname not set"
+msgstr ""
+
+#: ../main/controllers/controladorhl7.cpp:77
+msgid "Integration engine port not set"
+msgstr ""
+
+#: ../main/controllers/controladorhl7.cpp:91
+msgid "Unsupported protocol"
+msgstr ""
+
+#: ../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, c-format
+msgid "Downloading file %d/%d"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+msgid "Image format not supported"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:200
+msgid "Receiving Association failed: "
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:209
+msgid "Association received"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:210
+msgid "Parameters:"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:272
+#: ../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:274
+msgid "No valid presentation contexts"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "Association(dicom://"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, c-format
+msgid "Uploading file %d of %d"
+msgstr ""
+
+#: ../main/controllers/dicommanager.cpp:504
+#: ../main/controllers/dicommanager.cpp:531
+msgid "Extracting file..."
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:323
+msgid "Error creating history database "
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:343
+msgid "Error creating dicomDir database "
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:425
+#: ../main/controllers/historycontroller.cpp:441
+msgid "Error creating thumbnails database "
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:560
+msgid "Including image "
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:560
+#: ../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:707
+msgid "Linking image "
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:1680
+#: ../main/controllers/historycontroller.cpp:1725
+#: ../main/controllers/historycontroller.cpp:1779
+#: ../main/controllers/historycontroller.cpp:1801
+#: ../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:1882
+#: ../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr ""
+
+#: ../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr ""
+
+#: ../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+
+#: ../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr ""
+
+#: ../main/controllers/integrationcontroller.cpp:493
+msgid "Malformed template Id ("
+msgstr ""
+
+#: ../main/controllers/integrationcontroller.cpp:493
+#: ../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+
+#: ../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr ""
+
+#: ../main/controllers/integrationcontroller.cpp:540
+msgid "Template Id unsupported ("
+msgstr ""
+
+#: ../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr ""
+
+#: ../main/controllers/integrationcontroller.cpp:566
+msgid "Unknown module Id ("
+msgstr ""
+
+#: ../main/controllers/integrationcontroller.cpp:592
+msgid "Empty configuration"
+msgstr ""
+
+#: ../main/controllers/integrationcontroller.cpp:631
+msgid "XML Parser Not Found. Key="
+msgstr ""
+
+#: ../main/controllers/log4cplus/guiappender.cpp:75
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:73
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ../main/gui/history3/historypanel3base.cpp:48
+#: ../main/gui/import/pasosimportacionbase.cpp:227
+msgid "Patient"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:73
+msgid "Patient ID"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:86
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ../main/gui/history3/historypanel3.cpp:227
+#: ../main/gui/open/opendialogs.cpp:50
+msgid "Modality"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:98
+msgid "Dimensions"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:109
+#, c-format
+msgid "Made with %s"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:167
+#: ../main/controllers/modalitysettingscontroller.cpp:338
+#: ../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr ""
+
+#: ../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr ""
+
+#: ../main/controllers/pacscontroller.cpp:1212
+msgid "Downloading file"
+msgstr ""
+
+#: ../main/controllers/pacscontroller.cpp:1318
+msgid "Error downloading WADO file"
+msgstr ""
+
+#: ../main/controllers/pacscontroller.cpp:1318
+msgid "Check PACS configuration"
+msgstr ""
+
+#: ../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr ""
+
+#: ../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr ""
+
+#: ../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr ""
+
+#: ../main/controllers/pacscontroller.cpp:1428
+msgid "Invalid HTTP response"
+msgstr ""
+
+#: ../main/controllers/pacscontroller.cpp:1433
+msgid "Invalid HTTP code"
+msgstr ""
+
+#: ../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr ""
+
+#: ../main/controllers/pacscontroller.cpp:1472
+msgid "PACS-Service"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:97
+#: ../main/controllers/parserxmlspanish.cpp:94
+msgid "Omitted Identificator"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:105
+#: ../main/controllers/parserxmlspanish.cpp:102
+msgid "Omitted AET"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:113
+#: ../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:121
+#: ../main/controllers/parserxmlspanish.cpp:118
+msgid "Omitted port"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:206
+#: ../main/controllers/parserxmlenglish.cpp:237
+#: ../main/controllers/parserxmlspanish.cpp:188
+#: ../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:212
+#: ../main/controllers/parserxmlspanish.cpp:194
+msgid "Port is not a valid number"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:248
+#: ../main/controllers/parserxmlspanish.cpp:228
+msgid "The port is not a valid number"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:265
+#: ../main/controllers/parserxmlspanish.cpp:246
+msgid "Setting not found"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:391
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:427
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:434
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:445
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:483
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:548
+#: ../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:552
+#: ../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr ""
+
+#: ../main/controllers/parserxmlenglish.cpp:570
+#: ../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:340
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:402
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:438
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:445
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:486
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:524
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ../main/controllers/parserxmlspanish.cpp:559
+msgid "id_application expected"
+msgstr ""
+
+#: ../main/controllers/smartretrievecontroller.cpp:124
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:920
+msgid "Downloading from PACS..."
+msgstr ""
+
+#: ../main/controllers/streaming/streamingloader.cpp:303
+#: ../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+
+#: ../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ../main/gui/history3/historytablemodel.cpp:403
+#: ../main/gui/history3/historytablemodel.cpp:415
+#: ../main/gui/history3/historytablemodel.cpp:470
+#: ../main/gui/history3/historytablemodel.cpp:482
+#: ../main/gui/open/dicomdirtablemodel.cpp:102
+#: ../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+msgid "Exploring PACS..."
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ../main/gui/history3/historypanel3.cpp:225
+#: ../main/gui/open/opendialogs.cpp:49
+msgid "Patient id"
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ../main/gui/history3/historypanel3.cpp:224
+#: ../main/gui/open/opendialogs.cpp:48
+msgid "Patient name"
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:479
+msgid "Study Instance UID"
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ../main/gui/history3/historypanel3.cpp:231
+#: ../main/gui/open/opendialogs.cpp:53
+msgid "Accession number"
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:481
+msgid "Study date"
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:482
+msgid "Study time"
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:490
+msgid "Series Instance UID"
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:492
+msgid "Series date"
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:493
+msgid "Series time"
+msgstr ""
+
+#: ../main/gui/acquisition/acquisitiontablemodel.cpp:519
+msgid "No results found"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:96
+msgid "Write query name"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:101
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+msgid "Id"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+msgid "Date Time"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ../main/gui/history3/historypanel3.cpp:229
+#: ../main/gui/import/pasosimportacionbase.cpp:298
+#: ../main/gui/import/pasosimportacionbase.cpp:340
+#: ../main/gui/open/opendialogs.cpp:52
+msgid "Description"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ../main/gui/import/pasosimportacionbase.cpp:276
+msgid "Accession Number"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:210
+msgid "Store query"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:211
+msgid "Remove query"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:278
+msgid "There is no any PACS configured"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+msgid "Study UID"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid "Search"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:519
+msgid "Download series"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+msgid "Download study"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:535
+msgid "Link series"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:537
+msgid "Link study"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:551
+msgid "Properties..."
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:686
+msgid "You must specify at least a modality or a period of time"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:709
+msgid "Select a valid query"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:721
+msgid "Select a valid PACS Server"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid "Download of modality "
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "Modality download error"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:786
+msgid "search results"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:913
+msgid "Downloading serie..."
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicion.cpp:916
+msgid "Downloading study..."
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+msgid "PACS acquisition is restricted"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+msgid "Server"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ../main/gui/import/pasosimportacionbase.cpp:284
+#: ../main/gui/import/pasosimportacionbase.cpp:326
+#: ../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ../main/gui/history3/historypanel3base.cpp:81
+msgid "Any date"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ../main/gui/history3/historypanel3base.cpp:85
+msgid "Today AM"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ../main/gui/history3/historypanel3base.cpp:88
+msgid "Today PM"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ../main/gui/history3/historypanel3base.cpp:91
+msgid "Today"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ../main/gui/history3/historypanel3base.cpp:100
+msgid "Yesterday"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ../main/gui/history3/historypanel3base.cpp:103
+msgid "Last 7 days"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ../main/gui/history3/historypanel3base.cpp:106
+msgid "Last 30 days"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ../main/gui/history3/historypanel3base.cpp:109
+msgid "Last 3 months"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+msgid "Stored queries"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+msgid "Select stored queries..."
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ../main/gui/open/opendialogsbase.cpp:50
+#: ../main/gui/open/opendialogsbase.cpp:202
+msgid "Link"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+msgid "Download"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+msgid "Series does not exist"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ../main/gui/open/opendialogsbase.cpp:127
+#: ../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ../main/tools/metricgridtool.cpp:101
+msgid "Ok"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ../main/gui/acquisition/dialogoadquisicionbase.h:151
+msgid "Download again"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+msgid "Open"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ../main/gui/acquisition/dialogoadquisicionbase.h:179
+msgid "Set query name"
+msgstr ""
+
+#: ../main/gui/acquisition/downloadagaindialog.cpp:32
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ../main/gui/acquisition/downloadagaindialog.cpp:34
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizedialog.cpp:64
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ../main/gui/export/parametrosprincipales.cpp:194
+msgid "Exporting images ..."
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:21
+msgid "Common tags"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+msgid "Patient's name and surname"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+msgid "Patient Id"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:44
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:71
+msgid "Add new..."
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ../main/tools/anonymizetool.cpp:26
+#: ../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:136
+msgid "Create new"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ../main/gui/anonymize/anonymizepanelbase.h:136
+msgid "Add DICOM tag"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:199
+msgid "Group"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:203
+msgid "Element"
+msgstr ""
+
+#: ../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ../widgets/wangulo.cpp:1114
+msgid "Value"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+msgid "Top right corner annotation"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+msgid "Top left corner annotation"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+msgid "Bottom left corner annotation"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+msgid "Bottom right corner annotation"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+msgid "You must fill in all fields"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+msgid "Window/level label in use"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+msgid "Window"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+msgid "Level"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+msgid "Do you confirm the removal of the preset?"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Data modified"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+msgid "Modality settings"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+msgid "Default modality settings"
+msgstr ""
+
+#: ../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, c-format
+msgid "%s settings"
+msgstr ""
+
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:60
+msgid "settings"
+msgstr ""
+
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Export Configuration"
+msgstr ""
+
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Ini Files(*.ini)|*.ini"
+msgstr ""
+
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:266
+msgid "Existing file"
+msgstr ""
+
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:273
+msgid "Export successfully completed"
+msgstr ""
+
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:275
+msgid "There was an error during exportation"
+msgstr ""
+
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Import Configuration"
+msgstr ""
+
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Ini files(*.ini)|*.ini"
+msgstr ""
+
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr ""
+
+#: ../main/gui/configuration/dialogoconfiguracion.cpp:300
+msgid "There was an error during importation, check permissions"
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+msgid "Dicom tag"
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+msgid "Split horizontally..."
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+msgid "Split vertically..."
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ../main/tools/windowlayouttool.cpp:273
+msgid "Split active horizontally"
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ../main/tools/windowlayouttool.cpp:274
+msgid "Split active vertically"
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+msgid "New hanging protocol"
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, c-format
+msgid "Window %d"
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "Yes"
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr ""
+
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+msgid "Hanging protocols"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+msgid "One day"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+msgid "Two days"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+msgid "Three days"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+msgid "Two weeks"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+msgid "One month"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+msgid "Three months"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+msgid "Local database"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+msgid "Local DICOM Dir setup"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+msgid "Select DICOMDIR"
+msgstr ""
+
+#: ../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+msgid "Extensions settings"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+msgid "Port has to be a valid number"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+msgid "General configuration parameters"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionhce.cpp:134
+msgid "Testing conectivity with the server..."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ../main/gui/configuration/panelconfiguracionhce.cpp:144
+msgid "Error connecting to url"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionhce.cpp:141
+msgid "hostname/port not set"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "Select certificate"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:255
+msgid "Change ..."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+msgid "Import ..."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:279
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:472
+msgid "There are this errors: "
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:525
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:558
+msgid "Testing the connection to the node ..."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:561
+msgid "DICOM Error"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:607
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:616
+msgid "Invalid port number"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:622
+msgid "WADO Error"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:703
+msgid "Use by default"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:795
+msgid "DICOM nodes"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:800
+msgid "DICOM nodes settings"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ../main/gui/export/pasosexportacionbase.cpp:20
+msgid "Profile"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+msgid "Set property active"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Set property inactive"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+msgid "Set default value"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+msgid "Set by user"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+msgid "Profile name can't be repeated"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+msgid "Profiles Settings"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+msgid "Confirm the removal of the profile "
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+msgid "New User"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+msgid "User name repeated"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+msgid "Password has to contain at least 6 characters"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+msgid "No login"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+msgid "User/Password"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+msgid "Password"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+msgid "Password is setted"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+msgid "Password is not setted"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+msgid "Set password"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+msgid "Security Setting"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+msgid "User inserted successfully"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+msgid "Password changed successfully"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+msgid "User deleted successfully"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ../main/gui/login/dialogologin.cpp:27
+msgid "User"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+msgid "Maximum length of title is 8 characters"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+msgid "Title"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+msgid "Path"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+msgid "Clean before"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+msgid "Clean after"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+msgid "Location Settings"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr ""
+
+#: ../main/gui/configuration/panelconfigurationanonymization.cpp:96
+msgid "Anonymization settings"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1370
+msgid "Settings"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+msgid "Export config..."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+msgid "Import config..."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+msgid "Physician's name"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+msgid "Physician's Id"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+msgid "Service"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+msgid "Service's name"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+msgid "Service's Id"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+msgid "Local institution"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+msgid "Institution's name"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+msgid "Institution's Id"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+msgid "Dicomized files"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+msgid "Charset"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+msgid "ISO_IR 148"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+msgid "Automatically check for updates"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+msgid "Proxy settings"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+msgid "Enable http proxy"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+msgid "Proxy Settings"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+msgid "Server settings"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+msgid "Host"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+msgid "Port"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+msgid "Username"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+msgid "No proxy for addresses containing"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+msgid "DICOM Dir"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+msgid "Auto-cleaning"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+msgid "MB"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ../main/tools/toolwindowlevel.cpp:201
+msgid "Reset to default"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+msgid "Local AET"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+msgid "DICOM Nodes"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+msgid "New ..."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+msgid "Edit ..."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ../main/gui/history3/historypanel3.cpp:677
+#: ../main/gui/history3/historypanel3.cpp:686
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ../main/gui/import/selectimagesimportation.cpp:291
+#: ../main/managers/widgetsmanager.cpp:1079
+msgid "Delete"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+msgid "Set Default"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+msgid "DICOM Node"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+msgid "PDU (KB)"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+msgid "Retrieve method"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Move"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Get"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+msgid "WADO URL"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+msgid "Retrieve mode"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ../main/gui/import/pasosimportacionbase.cpp:319
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1395
+msgid "Series"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+msgid "Studies"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+msgid "Worklists"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+msgid "Select how do you want to handle MPPS items"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+msgid "DICOM MPPS"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+msgid "HL7 messages"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+msgid "HL7"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+msgid "Abort message"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+msgid "Completed message"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+msgid "In progress message"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+msgid "Default values"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+msgid "Worklist"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+msgid "SSL/TLS"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+msgid "Verify server credentials"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+msgid "Use SSL/TLS"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+msgid "Certificate to use in this connection"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+msgid "Default charset"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+msgid "Advanced"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+msgid "Local AET certificate"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+msgid "Certificate used by Ginkgo CADx"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+msgid "Receiver organization Id"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+msgid "Petitioner System Id"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+msgid "Filler Application Id"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+msgid "Ginkgo CADx Application Id"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+msgid "Integration engine"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+msgid "Hostname / Port"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+msgid "Protocol"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ../main/gui/export/pasosexportacionbase.cpp:28
+msgid "Format"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+msgid "Message's format"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+msgid "Test engine"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+msgid "Test Integration Engine connectivity"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+msgid "Ginkgo Extension Title"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+msgid "Edit public key"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+msgid "Public key"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+msgid "Public key in PEM format"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+msgid "Load ..."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+msgid "Private key"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+msgid "Private key in PEM format"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+msgid "Profile name"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+msgid "Set active"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+msgid "Configure location"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+msgid "Location"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+msgid "Security type"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+msgid "Change Password ..."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+msgid "Set main password"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+msgid "Set Password"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+msgid "Edit User"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+msgid "User Name"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+msgid "Confirm Password"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+msgid "Properties"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+msgid "Edit corner annotations"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue}  where GGGG is the tag's group in hexadecimal and EEEE is the "
+"tag's element."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+msgid "Window/level"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ../main/gui/history3/historytoolmenu.cpp:149
+#: ../widgets/gui/selecciontextobase.h:58
+msgid "Edit"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+msgid "Default Window/Level"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+msgid "Corner annotations"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+msgid "Setup corner annotations"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+msgid "Setup..."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+msgid "Other settings"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+msgid "Interpolate pixel data"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+msgid "Hanging protocol"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+msgid "Opening mode"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+msgid "Study opening criteria"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+msgid "Workspace"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+msgid "Enable/Disable"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+msgid "Top left corner annotations"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+msgid "Setup window"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+msgid "Set default"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+msgid "Open in main window"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+msgid "Setup position..."
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+msgid "Setup undocked window position"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+msgid "Layout"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+msgid "Current layout"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+msgid "Columns"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+msgid "Series criteria"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+msgid "Select opening mode"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+msgid "Tag"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+msgid "Save"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+msgid "Enable background queries"
+msgstr ""
+
+#: ../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+msgid "Smart retrieve"
+msgstr ""
+
+#: ../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+msgid "Smart retrieve settings"
+msgstr ""
+
+#: ../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr ""
+
+#: ../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ../main/gui/dicomdirexport/dicomdirexportbase.h:64
+msgid "Export DICOM"
+msgstr ""
+
+#: ../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr ""
+
+#: ../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+msgid "Ginkgo CADx private tags"
+msgstr ""
+
+#: ../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ../main/gui/history3/historypanel3.cpp:340
+#: ../main/gui/history3/historytoolmenu.cpp:158
+msgid "Export"
+msgstr ""
+
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ../main/gui/export/parametrosprincipales.cpp:157
+msgid "Select the directory where the files will be stored"
+msgstr ""
+
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+
+#: ../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+msgid "Select the DICOM Dir folder"
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+msgid "DICOM Dir migration"
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+msgid "Migrate existing (recommended)"
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+msgid "Continue..."
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+msgid "Select other"
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+msgid "Browse..."
+msgstr ""
+
+#: ../main/gui/export/parametrosprincipales.cpp:106
+msgid "DICOM Export"
+msgstr ""
+
+#: ../main/gui/export/parametrosprincipales.cpp:110
+msgid "Select the format and the images you want to export"
+msgstr ""
+
+#: ../main/gui/export/parametrosprincipales.cpp:143
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr ""
+
+#: ../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+
+#: ../main/gui/export/parametrosprincipales.cpp:150
+msgid "Select file"
+msgstr ""
+
+#: ../main/gui/export/pasosexportacionbase.cpp:32
+msgid "DICOM (native format)"
+msgstr ""
+
+#: ../main/gui/export/pasosexportacionbase.cpp:32
+msgid "Image (jpg, bmp, png)"
+msgstr ""
+
+#: ../main/gui/export/pasosexportacionbase.cpp:38
+msgid "Export all files of opened tab"
+msgstr ""
+
+#: ../main/gui/export/pasosexportacionbase.cpp:55
+msgid "JPEG"
+msgstr ""
+
+#: ../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr ""
+
+#: ../main/gui/export/wxwizardexportacionginkgo.cpp:40
+msgid "Image Export Wizard"
+msgstr ""
+
+#: ../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ../main/gui/license/aboutdialogbase.cpp:67
+#: ../main/gui/license/aboutdialogbase.cpp:151
+#: ../wx/propiedades/wxpropiedadesbase.cpp:54
+msgid "&Accept"
+msgstr ""
+
+#: ../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+msgid "Open link"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+msgid "File link:"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ../main/gui/import/pasosimportacionbase.cpp:270
+msgid "Study"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+msgid "User name"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+msgid "Ginkgo Cloud link"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+msgid "Copy to clipboard"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "New Ginkgo Cloud study"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "To download the study, paste this url "
+msgstr ""
+
+#: ../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+msgid "Creator"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+msgid "Last Modificator"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+msgid "Show link..."
+msgstr ""
+
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+msgid "Invalid link"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:117
+#: ../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:119
+#: ../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:226
+#: ../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:228
+msgid "Date acquired"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:230
+msgid "Date added"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:308
+#: ../main/gui/history3/historytoolmenu.cpp:82
+#: ../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:316
+#: ../main/tools/dicomizetool.cpp:28
+msgid "Dicomize"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:363
+msgid "All patients"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:481
+msgid "Results"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:481
+#, c-format
+msgid " (%d images)"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:634
+msgid "Open study with .."
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:663
+#: ../main/gui/history3/historypanel3base.cpp:482
+msgid "Synchronize"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:677
+msgid "&Delete from history"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:686
+msgid "&Clear history"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:904
+#: ../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:1045
+msgid "Unable to open modality "
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:1086
+msgid "all files"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:1106
+#: ../main/gui/history3/historypanel3.cpp:1171
+#: ../main/tools/anonymizetool.cpp:46 ../main/tools/exportdicomdirtool.cpp:57
+#: ../main/tools/sendpacstool.cpp:59 ../main/tools/showtagshistorytool.cpp:42
+msgid "Select at least one series"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:1128
+msgid "those series"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3.cpp:1128
+msgid "this series"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3base.cpp:57
+msgid "Advanced search"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3base.cpp:73
+msgid "Acquisition date"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3base.cpp:302
+#: ../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr ""
+
+#: ../main/gui/history3/historypanel3base.cpp:336
+#: ../main/gui/history3/historytoolmenu.cpp:102
+#: ../main/gui/history3/historytoolmenu.cpp:200
+#: ../main/gui/history3/historytoolmenu.cpp:229
+msgid "Remove"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3base.cpp:454
+#: ../main/gui/history3/historypanel3base.h:187
+msgid "Synchronize files"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+
+#: ../main/gui/history3/historytablemodel.cpp:406
+#: ../main/gui/history3/historytablemodel.cpp:418
+#: ../main/gui/history3/historytablemodel.cpp:473
+#: ../main/gui/history3/historytablemodel.cpp:485
+#: ../main/gui/open/dicomdirtablemodel.cpp:105
+msgid "00/00/0000 00:00:00"
+msgstr ""
+
+#: ../main/gui/history3/historytoolmenu.cpp:138
+msgid "Close history"
+msgstr ""
+
+#: ../main/gui/history3/historytoolmenu.cpp:139
+#: ../main/gui/startup/startupform.cpp:53
+msgid "History"
+msgstr ""
+
+#: ../main/gui/history3/historytoolmenu.cpp:201
+#: ../main/gui/history3/historytoolmenu.cpp:230
+msgid "Clear history"
+msgstr ""
+
+#: ../main/gui/history3/historytoolmenu.cpp:232
+msgid "Select all"
+msgstr ""
+
+#: ../main/gui/history3/historytoolmenu.cpp:233
+msgid "Deselect all"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+msgid "Destination"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+msgid "Status"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+msgid "Error message"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+msgid "Show Message"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+msgid "Edit Message"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+msgid "Delete message"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+msgid "Error editing message"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+msgid "Error purguing messages"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ../main/gui/progress/paneltarea.cpp:31
+msgid "Stop"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Sent"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ../main/gui/progress/statusbarprogreso.cpp:281
+msgid "Warning"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+msgid "Error getting message"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+msgid "Running"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+msgid "Usually due to an error in sending a message"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ../main/gui/progress/paneltarea.cpp:31
+msgid "Start"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+msgid "Error deleting messages"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+msgid "Remove sent messages"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+msgid "Exit"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+msgid "Messages"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+msgid "Refresh"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1394
+msgid "View"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+msgid "Send task status:"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+msgid "Message"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+msgid "Destination:"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+msgid "Status:"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+msgid "Message content:"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ../wx/thumbnailctrl/thumbnailwidget.cpp:142
+msgid "OK"
+msgstr ""
+
+#: ../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr ""
+
+#: ../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr ""
+
+#: ../main/gui/import/generaldata.cpp:210
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+
+#: ../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+
+#: ../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+
+#: ../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+
+#: ../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+
+#: ../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr ""
+
+#: ../main/gui/import/generaldata.cpp:231
+msgid "Error validating fields"
+msgstr ""
+
+#: ../main/gui/import/pasoperfilimportacion.cpp:148
+msgid "Selecting Import Profile"
+msgstr ""
+
+#: ../main/gui/import/pasoperfilimportacion.cpp:152
+msgid "You must select the profile you want to use import"
+msgstr ""
+
+#: ../main/gui/import/pasoperfilimportacion.cpp:170
+msgid "You must select the import profile"
+msgstr ""
+
+#: ../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:21
+msgid "Selected images"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:56
+msgid "Preview"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:62
+msgid "Remove all"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:113
+#: ../wx/gnkinforme/gnkinformebasewx.cpp:65
+msgid "Demographic data"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:159
+#: ../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "Birth date"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:217
+msgid "Study Details"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:234
+#: ../wx/gnkinforme/gnkinformebase.cpp:122
+msgid "Weight"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:245
+msgid "Kg"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:252
+#: ../wx/gnkinforme/gnkinformebase.cpp:119
+msgid "Height"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr ""
+
+#: ../main/gui/import/pasosimportacionbase.cpp:291
+#: ../main/gui/import/pasosimportacionbase.cpp:333
+msgid "Time"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files..."
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste from clipboard"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:330
+msgid "Delete selected items"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:342
+msgid "You must select an image"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:346
+msgid "Generating preview..."
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:500
+msgid "Select images"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:715
+msgid "Image selection"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:760
+msgid "The file"
+msgstr ""
+
+#: ../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr ""
+
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:52
+msgid "Image Import Wizard"
+msgstr ""
+
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr ""
+
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr ""
+
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr ""
+
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr ""
+
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr ""
+
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:167
+msgid "free of"
+msgstr ""
+
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:181
+msgid "in dicomization dir."
+msgstr ""
+
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr ""
+
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, c-format
+msgid "Step %d of %d: "
+msgstr ""
+
+#: ../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr ""
+
+#: ../main/gui/license/aboutdialog.cpp:25
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:22
+msgid "Ginkgo CADx"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:55
+msgid "Licenses"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:58
+msgid "UPDATE_INFO"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:108
+#: ../main/gui/license/aboutdialogbase.h:88
+msgid "Open Source Licenses"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:119
+msgid "FamFamFam Icons"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:120
+msgid "Fugue Icons"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:126
+msgid "WxWidgets"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:127
+msgid "Zlib"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:130
+msgid "Dark Glass Icons"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr ""
+
+#: ../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr ""
+
+#: ../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr ""
+
+#: ../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+
+#: ../main/gui/license/acceptlicensedialogbase.cpp:53
+msgid "Check for updates automatically"
+msgstr ""
+
+#: ../main/gui/license/acceptlicensedialogbase.cpp:66
+msgid "I Accept the license"
+msgstr ""
+
+#: ../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr ""
+
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Save logs"
+msgstr ""
+
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr ""
+
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+msgid "File couldn't be stored "
+msgstr ""
+
+#: ../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+msgid "Could not write to file"
+msgstr ""
+
+#: ../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+msgid "Save log..."
+msgstr ""
+
+#: ../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+msgid "Clear log"
+msgstr ""
+
+#: ../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+msgid "Log"
+msgstr ""
+
+#: ../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr ""
+
+#: ../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr ""
+
+#: ../main/gui/login/dialogologin.cpp:50
+msgid "The username or password is incorrect"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:250
+msgid "Tasks"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1139
+msgid "Included in the history ..."
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "Check update error"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1072
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1174
+msgid "Malformed XML"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1192
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1220
+msgid "Error parsing integration XML:\n"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1224
+msgid "PACS error:\n"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1228
+msgid "Error executing WorkFlow\n"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1232
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1270
+msgid "Close current view"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all views"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "Exit application"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Show full screen"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1302
+msgid "Tab grouping"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1329
+msgid "Ginkgo CADx manual ..."
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1330
+msgid "Open test card"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for newest versions"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1332
+msgid "Need support ..."
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About "
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+msgid "HL7 monitor"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1371
+msgid "HL7 message control"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+msgid "Log monitor"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1372
+msgid "Log monitored"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1390
+msgid "&File"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1664
+msgid "Unsaved data"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid "Error saving"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "Full Screen"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "View Full Screen"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1708
+msgid "Tab Regroup"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "&Close all"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "Close all windows"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1728
+msgid "Tabbed organization"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "Ginkgo CADx updated"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1782
+msgid "New version available ("
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+msgid "New Update"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+msgid "New version available"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+msgid "X"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+msgid "Close this notification"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+msgid "The following commands will be aborted if you close the application"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+msgid "Close Ginkgo CADx"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ../main/gui/mainwindow/ventanaprincipalbase.h:138
+msgid "User login"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+msgid "System authentication"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+msgid "Login"
+msgstr ""
+
+#: ../main/gui/open/abrir.cpp:80 ../main/gui/open/abrir.cpp:82
+msgid "Open..."
+msgstr ""
+
+#: ../main/gui/open/opendialogs.cpp:58
+msgid "There was an error reading DICOMDIR file"
+msgstr ""
+
+#: ../main/gui/open/opendialogs.cpp:62
+msgid "Select a valid DICOMDIR file"
+msgstr ""
+
+#: ../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr ""
+
+#: ../main/gui/open/opendialogs.cpp:180
+#: ../main/gui/open/opendialogsbase.cpp:170
+#: ../main/gui/open/opendialogsbase.h:112
+msgid "Copy or link"
+msgstr ""
+
+#: ../main/gui/open/opendialogsbase.cpp:22
+#: ../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr ""
+
+#: ../main/gui/open/opendialogsbase.cpp:94
+#: ../main/gui/open/opendialogsbase.h:85
+msgid "Select drive"
+msgstr ""
+
+#: ../main/gui/open/opendialogsbase.cpp:175
+msgid "Do you want to copy or link files?"
+msgstr ""
+
+#: ../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ../main/gui/selectpacsserver/selectpacsserver.cpp:30
+msgid "There aren't any PACS configured"
+msgstr ""
+
+#: ../main/gui/pacsupload/pacsuploaddialog.cpp:69
+msgid "0000/00/00 00:00:00"
+msgstr ""
+
+#: ../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ../main/gui/pacsupload/pacsuploaddialogbase.h:57
+msgid "Upload study"
+msgstr ""
+
+#: ../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+msgid "Select PACS server"
+msgstr ""
+
+#: ../main/gui/paneltags/paneltags.cpp:119
+msgid "Metadata"
+msgstr ""
+
+#: ../main/gui/paneltags/paneltags.cpp:120
+msgid "Identification information"
+msgstr ""
+
+#: ../main/gui/paneltags/paneltags.cpp:121
+msgid "Patient information"
+msgstr ""
+
+#: ../main/gui/paneltags/paneltags.cpp:122
+msgid "Acquisition information"
+msgstr ""
+
+#: ../main/gui/paneltags/paneltags.cpp:123
+msgid "Relationship information"
+msgstr ""
+
+#: ../main/gui/paneltags/paneltags.cpp:124
+msgid "Image presentation information"
+msgstr ""
+
+#: ../main/gui/paneltags/paneltags.cpp:125 ../widgets/wtextbox.cpp:525
+msgid "Text"
+msgstr ""
+
+#: ../main/gui/paneltags/paneltags.cpp:126
+msgid "Other"
+msgstr ""
+
+#: ../main/gui/paneltags/paneltags.cpp:137
+#: ../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr ""
+
+#: ../main/gui/previewpanel/previewpanel.cpp:47
+msgid "Hide"
+msgstr ""
+
+#: ../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr ""
+
+#: ../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ../main/gui/previewpanel/previewpanelbase.cpp:207
+msgid "Previews"
+msgstr ""
+
+#: ../main/gui/progress/progresobase.cpp:23
+msgid "There is no running tasks"
+msgstr ""
+
+#: ../main/gui/progress/statusbarprogreso.cpp:165
+msgid "0 running tasks."
+msgstr ""
+
+#: ../main/gui/progress/statusbarprogreso.cpp:192
+#, c-format
+msgid "There are %d pending tasks"
+msgstr ""
+
+#: ../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ../main/gui/selectpacsserver/selectpacsserverbase.h:55
+msgid "Select PACS"
+msgstr ""
+
+#: ../main/gui/startup/startupformbase.cpp:29
+msgid "http://ginkgo-cadx.com"
+msgstr ""
+
+#: ../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr ""
+
+#: ../main/gui/startup/startupformbase.cpp:47
+msgid "Ginkgo CADx Pro"
+msgstr ""
+
+#: ../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+
+#: ../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr ""
+
+#: ../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr ""
+
+#: ../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr ""
+
+#: ../main/managers/widgetsmanager.cpp:1079
+msgid "Delete Widget"
+msgstr ""
+
+#: ../main/managers/widgetsmanager.cpp:1090
+msgid "Properties ..."
+msgstr ""
+
+#: ../main/managers/widgetsmanager.cpp:1090
+msgid "Widget Properties"
+msgstr ""
+
+#: ../main/tools/addfiletohistorytool.cpp:114
+msgid "Open file"
+msgstr ""
+
+#: ../main/tools/addfiletohistorytool.cpp:115
+#: ../main/tools/openfoldertool.cpp:27
+msgid "Open folder"
+msgstr ""
+
+#: ../main/tools/addfiletohistorytool.cpp:116
+#: ../main/tools/openremovabletool.cpp:28
+msgid "Open removable unit"
+msgstr ""
+
+#: ../main/tools/addfiletohistorytool.cpp:117
+#: ../main/tools/openginkgocloudlinktool.cpp:27
+msgid "Open Ginkgo Cloud link"
+msgstr ""
+
+#: ../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr ""
+
+#: ../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr ""
+
+#: ../main/tools/colormaptool.cpp:110
+msgid "Invert color map"
+msgstr ""
+
+#: ../main/tools/cornerannotationstool.cpp:44
+msgid "Hide corner annotations"
+msgstr ""
+
+#: ../main/tools/cornerannotationstool.cpp:46
+msgid "Show corner annotations"
+msgstr ""
+
+#: ../main/tools/detachwindowtool.cpp:42
+msgid "Attach View"
+msgstr ""
+
+#: ../main/tools/detachwindowtool.cpp:44
+msgid "Detach view"
+msgstr ""
+
+#: ../main/tools/dicomizetool.cpp:28
+msgid "Dicomize files"
+msgstr ""
+
+#: ../main/tools/exportdicomdirtool.cpp:32
+msgid "Export to DICOM Dir"
+msgstr ""
+
+#: ../main/tools/markertool.cpp:171
+msgid "Point"
+msgstr ""
+
+#: ../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr ""
+
+#: ../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr ""
+
+#: ../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr ""
+
+#: ../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr ""
+
+#: ../main/tools/markertool.cpp:176
+msgid "Free form"
+msgstr ""
+
+#: ../main/tools/metricgridtool.cpp:57
+msgid "Grid"
+msgstr ""
+
+#: ../main/tools/metricgridtool.cpp:67
+msgid "Grid Scale"
+msgstr ""
+
+#: ../main/tools/metricgridtool.cpp:74
+msgid "Scale X"
+msgstr ""
+
+#: ../main/tools/metricgridtool.cpp:78
+msgid "X axis scale"
+msgstr ""
+
+#: ../main/tools/metricgridtool.cpp:87
+msgid "Scale Y"
+msgstr ""
+
+#: ../main/tools/metricgridtool.cpp:91
+msgid "Y axis scale"
+msgstr ""
+
+#: ../main/tools/metricgridtool.cpp:206
+msgid "Show grid"
+msgstr ""
+
+#: ../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr ""
+
+#: ../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr ""
+
+#: ../main/tools/metricgridtool.cpp:250
+msgid "Hide Grid"
+msgstr ""
+
+#: ../main/tools/metricgridtool.cpp:252
+msgid "Show Grid"
+msgstr ""
+
+#: ../main/tools/openfiletool.cpp:28
+msgid "Open File"
+msgstr ""
+
+#: ../main/tools/pacsuploadtool.cpp:54
+msgid "Send to PACS..."
+msgstr ""
+
+#: ../main/tools/pixelsbluringtool.cpp:59
+msgid "Unset pixels blurring"
+msgstr ""
+
+#: ../main/tools/pixelsbluringtool.cpp:61
+msgid "Set pixels blurring"
+msgstr ""
+
+#: ../main/tools/queryretrievehistorytool.cpp:25
+msgid "PACS Q/R"
+msgstr ""
+
+#: ../main/tools/queryretrievetool.cpp:94
+#: ../main/tools/searchginkgocloudhistorytool.cpp:28
+msgid "Search Ginkgo Cloud"
+msgstr ""
+
+#: ../main/tools/rotateandfliptool.cpp:151
+msgid "Undo rotate and flip"
+msgstr ""
+
+#: ../main/tools/rotateandfliptool.cpp:153
+#: ../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr ""
+
+#: ../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr ""
+
+#: ../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr ""
+
+#: ../main/tools/rotateandfliptool.cpp:156
+msgid "Flip horizontal"
+msgstr ""
+
+#: ../main/tools/rotateandfliptool.cpp:157
+msgid "Flip vertical"
+msgstr ""
+
+#: ../main/tools/sendpacstool.cpp:34
+msgid "Send to PACS"
+msgstr ""
+
+#: ../main/tools/sendpacstool.cpp:70
+msgid "Sending to PACS..."
+msgstr ""
+
+#: ../main/tools/showtagstool.cpp:42
+msgid "Hide DICOM inspector"
+msgstr ""
+
+#: ../main/tools/showtagstool.cpp:44
+msgid "Show DICOM inspector"
+msgstr ""
+
+#: ../main/tools/simpleprinttool.cpp:119
+msgid "Image printing"
+msgstr ""
+
+#: ../main/tools/simpleprinttool.cpp:224
+msgid "Page setup"
+msgstr ""
+
+#: ../main/tools/simpleprinttool.cpp:225
+msgid "Print preview"
+msgstr ""
+
+#: ../main/tools/simpleprinttool.cpp:272
+msgid "Print image"
+msgstr ""
+
+#: ../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr ""
+
+#: ../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr ""
+
+#: ../main/tools/undotool.cpp:110
+msgid "Redo"
+msgstr ""
+
+#: ../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr ""
+
+#: ../main/tools/videotool.cpp:153
+msgid "Enable loop"
+msgstr ""
+
+#: ../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr ""
+
+#: ../main/tools/windowlayouttool.cpp:267
+msgid "Add column"
+msgstr ""
+
+#: ../main/tools/windowlayouttool.cpp:268
+msgid "Add row"
+msgstr ""
+
+#: ../main/tools/windowlayouttool.cpp:270
+msgid "Remove column"
+msgstr ""
+
+#: ../main/tools/windowlayouttool.cpp:271
+msgid "Remove row"
+msgstr ""
+
+#: ../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr ""
+
+#: ../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr ""
+
+#: ../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr ""
+
+#: ../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr ""
+
+#: ../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr ""
+
+#: ../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr ""
+
+#: ../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr ""
+
+#: ../main/toolsystem/toolsregistry.cpp:82
+msgid "The tool is already registered"
+msgstr ""
+
+#: ../main/toolsystem/toolsregistry.cpp:187
+msgid "The module "
+msgstr ""
+
+#: ../resources/ginkgoresourcesmanager.cpp:49
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: ../resources/ginkgoresourcesmanager.cpp:56
+msgid "Unable to load PNG image resource"
+msgstr ""
+
+#: ../resources/ginkgoresourcesmanager.cpp:63
+msgid "Unable to load GIF animation resource"
+msgstr ""
+
+#: ../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr ""
+
+#: ../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr ""
+
+#: ../widgets/gui/calibracion.cpp:219
+msgid "Enter the calibration value"
+msgstr ""
+
+#: ../widgets/gui/calibracion.cpp:225
+msgid "The calibration value is too low"
+msgstr ""
+
+#: ../widgets/gui/calibracion.cpp:229
+msgid "The calibration value is too high"
+msgstr ""
+
+#: ../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr ""
+
+#: ../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr ""
+
+#: ../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr ""
+
+#: ../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr ""
+
+#: ../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr ""
+
+#: ../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr ""
+
+#: ../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr ""
+
+#: ../widgets/gui/selecciontextobase.cpp:26
+msgid "Note"
+msgstr ""
+
+#: ../widgets/wangulo.cpp:1101 ../widgets/wangulo.cpp:1103
+msgid "Type"
+msgstr ""
+
+#: ../widgets/wangulo.cpp:1101
+msgid "Normal"
+msgstr ""
+
+#: ../widgets/wangulo.cpp:1103
+msgid "Cobb"
+msgstr ""
+
+#: ../widgets/welipse.cpp:721 ../widgets/wfreeform.cpp:470
+#: ../widgets/wpolygon.cpp:574
+msgid "Center (I)"
+msgstr ""
+
+#: ../widgets/welipse.cpp:727 ../widgets/wfreeform.cpp:476
+#: ../widgets/wpolygon.cpp:580
+msgid "Center (M)"
+msgstr ""
+
+#: ../widgets/welipse.cpp:762 ../widgets/welipse.cpp:766
+msgid "Greater Radius"
+msgstr ""
+
+#: ../widgets/welipse.cpp:763 ../widgets/welipse.cpp:767
+msgid "Lower Radius"
+msgstr ""
+
+#: ../widgets/wfreeform.cpp:482 ../widgets/wpolygon.cpp:586
+msgid "Number of Vertex"
+msgstr ""
+
+#: ../widgets/wpunto.cpp:353
+msgid "Position (I)"
+msgstr ""
+
+#: ../widgets/wpunto.cpp:358
+msgid "Position (M)"
+msgstr ""
+
+#: ../widgets/wrule.cpp:558
+msgid "Image Calibration"
+msgstr ""
+
+#: ../widgets/wrule.cpp:663
+msgid "Length"
+msgstr ""
+
+#: ../widgets/wrule.cpp:668
+msgid "Points (I)"
+msgstr ""
+
+#: ../widgets/wrule.cpp:675
+msgid "Points (M)"
+msgstr ""
+
+#: ../widgets/wtextbox.cpp:445
+msgid "Default text"
+msgstr ""
+
+#: ../wx/gnkinforme/gnkinformebase.cpp:41
+msgid "Commit date"
+msgstr ""
+
+#: ../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr ""
+
+#: ../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr ""
+
+#: ../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr ""
+
+#: ../wx/gnkinforme/gnkinformebase.cpp:214
+#: ../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr ""
+
+#: ../wx/gnkinforme/gnkinformebase.cpp:219
+msgid "Modified"
+msgstr ""
+
+#: ../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr ""
+
+#: ../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr ""
+
+#: ../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr ""
+
+#: ../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ../wx/gnkinforme/gnkinformebasewx.cpp:130
+msgid "Commit inform"
+msgstr ""
+
+#: ../wx/propiedades/wxpropiedades.cpp:30
+msgid "Properties of "
+msgstr ""
+
+#: ../wx/propiedades/wxpropiedadesbase.cpp:31
+msgid "Widget's Name"
+msgstr ""
+
+#: ../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr ""
+
+#: ../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr ""
+
+#: ../wx/wxsqlite3/wxsqlite3.cpp:3701
+msgid "Regular expression invalid: '"
+msgstr ""
+
+#: ../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr ""
+
+#: ../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+
+#: ../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+
+#: ../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+
+#: ../commands/dialogopathssobreescribirbase.h:56
+msgid "Overwrite Paths"
+msgstr ""
+
+#: ../ginkgopro/ginkgo_pro_defines.h:21
+msgid "Professional DICOM CADx environment"
+msgstr ""
+
+#: ../main/controllers/dcmtk/dicomservers.h:39
+msgid "Server not found"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.h:99
+msgid "DICOM Query/Retrieve"
+msgstr ""
+
+#: ../main/gui/acquisition/dialogoadquisicionbase.h:123
+msgid "Not found"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+msgid "Advanced Settings"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+msgid "Edit profile"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+msgid "Add/Edit Location"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+msgid "Add window/level"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+msgid "Add tag"
+msgstr ""
+
+#: ../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+msgid "Setup window position"
+msgstr ""
+
+#: ../main/gui/countdownmessage/countdownmessagebase.h:61
+msgid "Closing"
+msgstr ""
+
+#: ../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+msgid "DICOM Dir configuration"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/downloadcloudbase.h:70
+msgid "Open Ginkgo Cloud"
+msgstr ""
+
+#: ../main/gui/ginkgocloud/downloadcloudbase.h:123
+msgid "Ginkgo Cloud search"
+msgstr ""
+
+#: ../main/gui/history3/confirmdeletedialog.h:24
+msgid " from History?"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3base.h:100
+msgid "Medical history"
+msgstr ""
+
+#: ../main/gui/history3/historypanel3base.h:161
+msgid "Open With ..."
+msgstr ""
+
+#: ../main/gui/history3/openwithdialog.h:72
+msgid "Select a View"
+msgstr ""
+
+#: ../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+msgid "Message detail"
+msgstr ""
+
+#: ../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+msgid "Log node"
+msgstr ""
+
+#: ../main/gui/mainwindow/ventanaprincipalbase.h:87
+msgid "Closing Ginkgo CADx"
+msgstr ""
+
+#: ../main/gui/paneltags/paneltagsbase.h:57
+msgid "DICOM Inspector"
+msgstr ""
+
+#: ../main/license.h:31
+msgid "Open Source DICOM CADx environment"
+msgstr ""
+
+#: ../widgets/gui/calibracionbase.h:65
+msgid "Calibration"
+msgstr ""
+
+#: ../wx/propiedades/wxpropiedadesbase.h:62
+msgid "Properties of ..."
+msgstr ""
+
+#: ../wx/thumbnailctrl/thumbnailwidget.h:44
+msgid "Image Browser Dialog"
+msgstr ""
+
+#: ../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+msgid "Test title"
+msgstr ""
diff --git a/cadxcore/lang/de/cadxcore.mo b/cadxcore/lang/de/cadxcore.mo
new file mode 100644
index 0000000..6b796a6
Binary files /dev/null and b/cadxcore/lang/de/cadxcore.mo differ
diff --git a/cadxcore/lang/de/cadxcore.po b/cadxcore/lang/de/cadxcore.po
new file mode 100644
index 0000000..77d42ef
--- /dev/null
+++ b/cadxcore/lang/de/cadxcore.po
@@ -0,0 +1,7751 @@
+# German translation for ginkgocadx
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the ginkgocadx package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-06-11 15:48+0100\n"
+"PO-Revision-Date: 2014-06-11 15:48+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: German <de at li.org>\n"
+"Language: de\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: ..\\..\n"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr "S/W"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr "S/W invertiert"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr "Barten"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr "Schwarzkörper"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr "Kardial"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr "VR Knochen"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr "VR Muskeln & Knochen"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "VR Red Vessels"
+msgstr "VR Knochen"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr "Grauer Regenbogen"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr "Spektrum"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Metal"
+msgstr "Heisses Metall"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr "Heisses Eisen"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "Hot Green"
+msgstr "Heisses Metall"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "GE Color"
+msgstr "GE-Farbe"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr "PERFusion"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PET"
+msgstr "PET"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr "Fluss"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr "LONI"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr "LONI2"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr "Asymmetrie"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "P-Value"
+msgstr "P-Wert"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr "ROI"
+
+#: ..\../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr "Es wurde versucht, einen NULL-Zeiger zu dereferenzieren"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#: ..\../api/dicom/idicomconformance.cpp:214
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "GIL/DICOM/Conformance"
+msgstr "GIL/DICOM/Konformität"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#, fuzzy
+msgid "Unable to add supported transfer syntax "
+msgstr ""
+" . Transfer-Syntax existiert nicht im Modell: Fügen Sie sie erst hinzu."
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#, fuzzy
+msgid " to SOP Class "
+msgstr "Diese Speicher-SOP-Klasse bei der Dicomisierung angeben"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr ""
+" . Transfer-Syntax existiert nicht im Modell: Fügen Sie sie erst hinzu."
+
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr " . SOP-Klasse existiert nicht im Modell: Fügen Sie sie erst hinzu."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#, fuzzy
+msgid "Unable to add supported SOP Class "
+msgstr " . SOP-Klasse existiert nicht im Modell: Fügen Sie sie erst hinzu."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#, fuzzy
+msgid " to Modality "
+msgstr "Modalität"
+
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr " . Modalität existiert nicht im Modell: Fügen Sie sie erst hinzu."
+
+#: ..\../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr "Fehler beim Laden der DICOM-Konformitätsdatei"
+
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr "Ungültige DICOM-Konformitätsdatei"
+
+#: ..\../api/iannotator.cpp:97
+msgid "Slice"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "of"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "Volume"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr "Voxel:"
+
+#: ..\../api/iannotator.cpp:110
+msgid "Image without metric information"
+msgstr "Bild ohne Maßstab"
+
+#: ..\../api/iannotator.cpp:119
+msgid "Slice thickness"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:127
+#, fuzzy
+msgid "Slice location"
+msgstr "Ort"
+
+#: ..\../api/iannotator.cpp:139
+msgid "Scale"
+msgstr "Skalieren"
+
+#: ..\../api/iannotator.cpp:147
+msgid "Right"
+msgstr "Rechts"
+
+#: ..\../api/iannotator.cpp:149
+msgid "Left"
+msgstr "Links"
+
+#: ..\../api/iannotator.cpp:219
+msgid "Position:"
+msgstr "Position:"
+
+#: ..\../api/iannotator.cpp:272
+msgid "Value:"
+msgstr "Wert:"
+
+#: ..\../api/iexception.cpp:52
+#, fuzzy
+msgid "Exception in component"
+msgstr "Ausnahmezustand beim Laden:"
+
+#: ..\../api/initwx.cpp:439
+msgid "Initializing environment ..."
+msgstr "Initialisiere Umgebung..."
+
+#: ..\../api/initwx.cpp:446 ..\../api/initwx.cpp:447 ..\../api/initwx.cpp:448
+#: ..\../api/initwx.cpp:449 ..\../api/initwx.cpp:450 ..\../api/initwx.cpp:451
+#: ..\../api/initwx.cpp:452 ..\../api/initwx.cpp:453
+#, fuzzy
+msgid "Ginkgo CADx restrictions"
+msgstr "Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr "Nur einen Reiter pro Studie öffnen"
+
+#: ..\../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr "Privater Modus (Verlauf wird geleert)"
+
+#: ..\../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr "Max. Anzahl offener Reiter"
+
+#: ..\../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr "Max. Sekunden erlaubter Untätigkeit der »Ginkgo CADx«-Anwendung"
+
+#: ..\../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr "Ginkgo CADx nach dem Dicomisieren automatisch schließen"
+
+#: ..\../api/initwx.cpp:451
+msgid "Export images"
+msgstr "Bilder exportieren …"
+
+#: ..\../api/initwx.cpp:452
+msgid "Acquire DICOM files"
+msgstr "DICOM-Dateien akquirieren"
+
+#: ..\../api/initwx.cpp:453
+msgid "Import files to DICOM format"
+msgstr "Dateien in das DICOM-Format importieren"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "Online manual"
+msgstr "Online-Handbuch"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "URL of manual"
+msgstr "URL des Handbuchs"
+
+#: ..\../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "Online support"
+msgstr "Online-Unterstützung"
+
+#: ..\../api/initwx.cpp:459
+msgid "URL of online support"
+msgstr "URL der Online-Unterstützung"
+
+#: ..\../api/initwx.cpp:459
+msgid "http://ginkgo-cadx.com/"
+msgstr "http://ginkgo-cadx.com/"
+
+#: ..\../api/initwx.cpp:460 ..\../api/initwx.cpp:461
+msgid "Program Updates"
+msgstr "Programmupdates"
+
+#: ..\../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr "Warnungen zu neuesten »Ginkgo CADx«-Aktualisierungen ausgeben"
+
+#: ..\../api/initwx.cpp:461
+msgid "Update period (days)"
+msgstr "Aktualisierungsintervall (Tage)"
+
+#: ..\../api/initwx.cpp:462
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr "Sicherheit"
+
+#: ..\../api/initwx.cpp:462
+msgid "Setup Security"
+msgstr "Sicherheit einrichten"
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup"
+msgstr "Beim Start anzeigen"
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup default value"
+msgstr "Vorgabe-Wert für Anzeigen beim Start"
+
+#: ..\../api/initwx.cpp:465 ..\../api/initwx.cpp:466
+#: ..\../main/gui/history3/historypanel3.cpp:328
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr "Werkzeuge"
+
+#: ..\../api/initwx.cpp:465
+msgid "Settings menu"
+msgstr "Einstellungsmenü"
+
+#: ..\../api/initwx.cpp:466
+msgid "License menu"
+msgstr "Lizenzmenü"
+
+#: ..\../api/initwx.cpp:467 ..\../api/initwx.cpp:468 ..\../api/initwx.cpp:469
+#: ..\../api/initwx.cpp:470 ..\../api/initwx.cpp:471 ..\../api/initwx.cpp:472
+#: ..\../api/initwx.cpp:473 ..\../api/initwx.cpp:474
+msgid "PACS Limits"
+msgstr "PACS-Grenzwerte"
+
+#: ..\../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr ""
+
+#: ..\../api/initwx.cpp:468
+msgid "Upload images to a PACS server"
+msgstr "Bilder auf einen PACS-Server hochladen"
+
+#: ..\../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr "Akquiriere Bilder aus dem PACS"
+
+#: ..\../api/initwx.cpp:470
+msgid "Enable remote PACS configuration"
+msgstr "Aktiviere entfernte PACS-Konfiguration"
+
+#: ..\../api/initwx.cpp:471
+msgid "Enable TLS configuration"
+msgstr "Aktiviere TLS-Konfiguration"
+
+#: ..\../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr "Suche auf gewählten Patienten einschränken"
+
+#: ..\../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr "Suche anhand maximaler Studiengröße einschränken (KB)"
+
+#: ..\../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr "Erzwinge Verlustlosigkeit beim Hochladen"
+
+#: ..\../api/initwx.cpp:475 ..\../api/initwx.cpp:476 ..\../api/initwx.cpp:477
+#: ..\../api/initwx.cpp:478 ..\../api/initwx.cpp:479 ..\../api/initwx.cpp:480
+msgid "Import"
+msgstr "Importieren"
+
+#: ..\../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr "Diese Speicher-SOP-Klasse bei der Dicomisierung angeben"
+
+#: ..\../api/initwx.cpp:476
+msgid "Show accession number input"
+msgstr ""
+
+#: ..\../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr "Kompression wählen (0-14, 0=keine)"
+
+#: ..\../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+"Rekompressions-Codec (0=JPEG-Baseline (Vorgabe), 1=JPEG-Progressiv, 2=JPEG-"
+"Verlustfrei)"
+
+#: ..\../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr "Ändere nicht den Bildcodec (wenn möglich)"
+
+#: ..\../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr "Demographischen Schritt überspringen, wenn möglich"
+
+#: ..\../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr "HL7-Service"
+
+#: ..\../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr "Starte den HL7-Versanddienst automatisch"
+
+#: ..\../api/initwx.cpp:483 ..\../api/initwx.cpp:484 ..\../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr "XML-Dicomisierung"
+
+#: ..\../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr "Sende HL7-Nachricht beim Importieren"
+
+#: ..\../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr "Sende Studie zum PACS beim Importieren"
+
+#: ..\../api/initwx.cpp:485
+msgid "Default ORU template"
+msgstr "Standard-ORU-Vorlage"
+
+#: ..\../api/initwx.cpp:488 ..\../api/initwx.cpp:489 ..\../api/initwx.cpp:491
+#: ..\../api/initwx.cpp:493 ..\../api/initwx.cpp:494 ..\../api/initwx.cpp:495
+#: ..\../api/initwx.cpp:496 ..\../api/initwx.cpp:498
+msgid "Style"
+msgstr "Stil"
+
+#: ..\../api/initwx.cpp:503
+#, c-format
+msgid "Download %s images"
+msgstr "Lade %s Bilder herunter"
+
+#: ..\../api/initwx.cpp:504 ..\../api/initwx.cpp:508
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+msgid "PACS"
+msgstr "PACS"
+
+#: ..\../api/initwx.cpp:507
+msgid "Download all modalities"
+msgstr "Alle Modalitäten herunterladen"
+
+#: ..\../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr "OpenGL"
+
+#: ..\../api/initwx.cpp:510
+msgid "Enable shaders"
+msgstr "Shader aktivieren"
+
+#: ..\../api/initwx.cpp:513
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+msgid "Ginkgo Cloud"
+msgstr "Ginkgo-Cloud"
+
+#: ..\../api/initwx.cpp:513
+msgid "Download from Ginkgo Cloud"
+msgstr "Von Ginkgo-Cloud herunterladen"
+
+#: ..\../api/initwx.cpp:560
+#, fuzzy
+msgid "Tools loading base ..."
+msgstr "Werkzeuge"
+
+#: ..\../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr "Werkzeuge wird gestartet …"
+
+#: ..\../api/initwx.cpp:566
+msgid "Loading plugins ..."
+msgstr "Lade Plugins ..."
+
+#: ..\../api/initwx.cpp:580
+msgid "Unable to start GinkgoCADx:\n"
+msgstr "Ginkgo CADx kann nicht gestartet werden:\n"
+
+#: ..\../api/initwx.cpp:580 ..\../api/initwx.cpp:621
+msgid "error"
+msgstr "Fehler"
+
+#: ..\../api/initwx.cpp:584
+msgid "Loading resources ..."
+msgstr "Ressourcen werden geladen …"
+
+#: ..\../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr "Dienste werden gestartet …"
+
+#: ..\../api/initwx.cpp:601
+msgid "Configuring environment ..."
+msgstr "Konfiguriere Umgebung"
+
+#: ..\../api/initwx.cpp:621
+msgid "Failed to set permissions:\n"
+msgstr "Konnte Rechte nicht setzen:\n"
+
+#: ..\../api/initwx.cpp:634
+msgid "Updating ..."
+msgstr "Es wird aktualisiert …"
+
+#: ..\../api/initwx.cpp:638
+msgid "Interpreting parameters ..."
+msgstr "Interpretiere Parameter ..."
+
+#: ..\../api/initwx.cpp:689
+msgid "Error unregistering tools: "
+msgstr "Fehler beim Deregistrieren von Werkzeugen: "
+
+#: ..\../api/initwx.cpp:769
+#, fuzzy
+msgid "Starting"
+msgstr "Werkzeuge wird gestartet …"
+
+#: ..\../api/ivista.cpp:36 ..\../commands/comandocarga.cpp:73
+msgid "Loading..."
+msgstr "Laden…"
+
+#: ..\../api/iwidgets.cpp:268
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ..\../main/gui/import/pasosimportacionbase.cpp:151
+msgid "Name"
+msgstr "Name"
+
+#: ..\../api/iwidgets.cpp:285
+msgid "Area"
+msgstr "Fläche"
+
+#: ..\../api/iwidgets.cpp:302
+msgid "Perimeter"
+msgstr "Umfang"
+
+#: ..\../api/iwidgets.cpp:316
+#, fuzzy
+msgid "Travel (I)"
+msgstr "Vertex (I)"
+
+#: ..\../api/iwidgets.cpp:326
+#, fuzzy
+msgid "Travel (M)"
+msgstr "Vertex (M)"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#: ..\../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr "Threading"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid "Error while running thread: "
+msgstr "Fehler beim Ausführen des Threads: "
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid " : "
+msgstr " : "
+
+#: ..\../api/threads/thread.cpp:120
+msgid "Internal error while running thread: "
+msgstr "Interner Fehler beim Ausführen des Threads: "
+
+#: ..\../api/widgetserializable.cpp:60
+msgid "Creation Date"
+msgstr "Erstellungsdatum"
+
+#: ..\../api/widgetserializable.cpp:65
+msgid "Modification Date"
+msgstr "Änderungsdatum"
+
+#: ..\../api/widgetserializable.cpp:68
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:40
+msgid "Physician"
+msgstr "Arzt"
+
+#: ..\../commands/acquirefromurlcommand.cpp:55
+#: ..\../commands/pacsdownloadcommand.cpp:88
+#: ..\../commands/synchronizationcommand.cpp:70
+msgid "Downloading files ..."
+msgstr "Lade Dateien ..."
+
+#: ..\../commands/acquirefromurlcommand.cpp:69
+#: ..\../commands/synchronizationcommand.cpp:91
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, c-format
+msgid "Downloading file %d"
+msgstr "Lade Datei %d"
+
+#: ..\../commands/acquirefromurlcommand.cpp:81
+msgid "Error downloading file: "
+msgstr "Fehler beim Herunterladen der Datei: "
+
+#: ..\../commands/acquirefromurlcommand.cpp:95
+#: ..\../commands/pacsdownloadcommand.cpp:114
+#: ..\../commands/synchronizationcommand.cpp:121
+msgid "Internal Error"
+msgstr "Interner Fehler"
+
+#: ..\../commands/acquirefromurlcommand.cpp:115
+msgid "Error downloading files: "
+msgstr "Fehler beim Herunterladen der Dateien: "
+
+#: ..\../commands/autocleaningcommand.cpp:62
+#, fuzzy
+msgid "Cleaning dicomdir..."
+msgstr "Automatisch aufräumen"
+
+#: ..\../commands/cloudcommand.cpp:67
+msgid "Downloading files..."
+msgstr "Dateien werden heruntergeladen …"
+
+#: ..\../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:183
+msgid "Unknown operation"
+msgstr "Unbekannte Operation"
+
+#: ..\../commands/cloudcommand.cpp:188
+msgid "Error in cloud operation. See log to get more details..."
+msgstr ""
+"Fehler bei einer Cloud-Operation. Sehen Sie ins Protokoll für mehr Details …"
+
+#: ..\../commands/cloudcommand.cpp:249
+msgid "Could to retrieve study."
+msgstr "Studie konnte nicht empfangen werden."
+
+#: ..\../commands/cloudcommand.cpp:260 ..\../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+"Diese Version von Ginkgo CADx ist zur aktuellen Version von Ginkgo Cloud "
+"nicht kompatibel."
+
+#: ..\../commands/cloudcommand.cpp:262
+msgid "Error retrieving study."
+msgstr "Fehler beim Empfangen der Studie."
+
+#: ..\../commands/cloudcommand.cpp:271
+msgid "Study successfully retrieved."
+msgstr "Studie erfolgreich empfangen."
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "Speed"
+msgstr "Geschwindigkeit"
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "bytes/sec during"
+msgstr " Bytes von "
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "seconds"
+msgstr "Sekunden"
+
+#: ..\../commands/cloudcommand.cpp:275
+msgid "Empty Response"
+msgstr "Leere Antwort"
+
+#: ..\../commands/cloudcommand.cpp:289
+msgid "Extracting files..."
+msgstr "Dateien werden entpackt …"
+
+#: ..\../commands/cloudcommand.cpp:313 ..\../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr "Ungültige Datei wurde heruntergeladen"
+
+#: ..\../commands/cloudcommand.cpp:383
+msgid "Could to perform query."
+msgstr "Anfrage konnte nicht ausgeführt werden."
+
+#: ..\../commands/cloudcommand.cpp:396
+msgid "Error perfoming the query."
+msgstr "Fehler beim Ausführen der Anfrage."
+
+#: ..\../commands/cloudcommand.cpp:405
+msgid "Query successfully performed."
+msgstr "Anfrage erfolgreich ausgeführt."
+
+#: ..\../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr "JSon-Antwort"
+
+#: ..\../commands/cloudcommand.cpp:472
+msgid "Unknown JSon attribute:"
+msgstr "Unbekanntes JSon-Attribut:"
+
+#: ..\../commands/cloudcommand.cpp:482
+msgid "Error parsing JSon: "
+msgstr "Fehler bei der JSon-Verarbeitung: "
+
+#: ..\../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr "NULL-Antwort"
+
+#: ..\../commands/cloudcommand.cpp:515
+#: ..\../commands/openremovableunit.cpp:148 ..\../main/gui/open/abrir.cpp:119
+#: ..\../main/gui/open/abrir.cpp:159 ..\../main/gui/open/opendialogs.cpp:146
+msgid "Storing in the history..."
+msgstr "Es wird im Verlauf gespeichert …"
+
+#: ..\../commands/comandoactualizaciones.cpp:46
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:536
+msgid "Check Updates"
+msgstr "Nach Aktualisierungen suchen"
+
+#: ..\../commands/comandoactualizaciones.cpp:136
+msgid "Not enough parameters found on XML"
+msgstr "Unzureichende Parameter im XML festgestellt"
+
+#: ..\../commands/comandoactualizaciones.cpp:145
+msgid "XML parsing internal error"
+msgstr "Interner Fehler beim verarbeiten des XMLs"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Error checking application updates"
+msgstr "Fehler beim Check auf Programmupdates"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Ginkgo CADx updates"
+msgstr "Ginkgo CADx Updates"
+
+#: ..\../commands/comandoactualizaciones.cpp:170
+msgid "Internal error checking updates"
+msgstr "Interner Fehler bei Updateprüfung"
+
+#: ..\../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr "Serienpfad konnt nicht gefunden werden"
+
+#: ..\../commands/comandocarga.cpp:92 ..\../commands/comandocarga.cpp:96
+msgid "Exception loading:"
+msgstr "Ausnahmezustand beim Laden:"
+
+#: ..\../commands/comandocarga.cpp:100
+msgid "Study malformed or unsupported"
+msgstr "Studie korrumpiert oder nicht unterstützt"
+
+#: ..\../commands/comandocarga.cpp:129 ..\../commands/comandocarga.cpp:139
+msgid "Error loading study: "
+msgstr "Fehler beim Laden der Studie: "
+
+#: ..\../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr "Fehler beim Laden der Studie: nicht genug Speicher"
+
+#: ..\../commands/comandocarga.cpp:144
+msgid "Error loading study."
+msgstr "Fehler beim Laden der Studie."
+
+#: ..\../commands/comandocarga.cpp:149
+msgid "Load canceled by user"
+msgstr "Laden durch Benutzer abgebrochen"
+
+#: ..\../commands/comandocarga.cpp:156
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+#: ..\../main/gui/history3/historypanel3.cpp:1063
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+msgid "Error loading study"
+msgstr "Fehler beim Laden der Studie"
+
+#: ..\../commands/comandoexportacion.cpp:81
+#: ..\../commands/exporttodicomdircommand.cpp:214
+msgid "Exporting files..."
+msgstr "Exportiere Dateien..."
+
+#: ..\../commands/comandoexportacion.cpp:105
+#: ..\../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr "Export wurde erfolgreich abgeschlossen"
+
+#: ..\../commands/comandoexportacion.cpp:158
+#, c-format
+msgid "Exporting file %d of %d"
+msgstr "Exportiere Datei %d von %d"
+
+#: ..\../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr ""
+"Fehler beim Speichern der Datei, Überprüfen Sie die Zugriffsrechte auf das "
+"Verzeichnis"
+
+#: ..\../commands/comandoexportacion.cpp:233
+msgid "image_%m-%d-%Y_"
+msgstr "Bild_%Y-%m-%d-_"
+
+#: ..\../commands/comandoincluirhistorial.cpp:108
+msgid "Exploring directory ..."
+msgstr "Untersuche Verzeichnis ..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:122
+#, fuzzy
+msgid "Reading DICOMDIR ..."
+msgstr "DICOMDIR wählen"
+
+#: ..\../commands/comandoincluirhistorial.cpp:142
+#: ..\../commands/comandoincluirhistorial.cpp:156
+#: ..\../commands/comandoincluirhistorial.cpp:177
+msgid "Including files in the history .."
+msgstr "Füge Dateien zum Verlauf hinzu .."
+
+#: ..\../commands/comandoincluirhistorial.cpp:196
+msgid "Exploring directory "
+msgstr "Durchsuchen von Verzeichnis "
+
+#: ..\../commands/comandoincluirhistorial.cpp:256
+#: ..\../commands/linkhistorycommand.cpp:118
+msgid "Image acquisition finished."
+msgstr "Einlesen des Bildes abgeschlossen."
+
+#: ..\../commands/comandoincluirhistorial.cpp:258
+#, c-format
+msgid "There have been included %d images."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:261
+#: ..\../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+"\n"
+"Es sind %d Fehler vorhanden (detaillierte Beschreibung im Protokoll)"
+
+#: ..\../commands/comandoincluirhistorial.cpp:273
+#: ..\../commands/linkhistorycommand.cpp:133
+msgid "This files doesn't exist:"
+msgstr "Diese Dateien existieren nicht:"
+
+#: ..\../commands/comandoincluirhistorial.cpp:284
+#: ..\../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr "Diese Dateien sind nicht im DICOM-Format:"
+
+#: ..\../commands/comandoincluirhistorial.cpp:296
+#: ..\../commands/linkhistorycommand.cpp:156
+msgid "This files are Dicom Dirs:"
+msgstr "Diese Dateien sind DICOM-Verzeichnisse:"
+
+#: ..\../commands/comandopacs.cpp:58 ..\../commands/pacsdownloadcommand.cpp:61
+#: ..\../commands/sendpacscommand.cpp:137
+msgid "There is not any Remote PACS configured"
+msgstr "Es ist kein entfernter PACS konfiguriert"
+
+#: ..\../commands/comandopacs.cpp:84
+msgid "Querying PACS ..."
+msgstr "PACS wird abgefragt …"
+
+#: ..\../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr ""
+"Fehler beim Zugriff auf die Controller-Subsystemintegration: (GIL:: DICOM)."
+
+#: ..\../commands/comandopacs.cpp:98
+msgid "Starting Search ..."
+msgstr "Starte Suche ..."
+
+#: ..\../commands/comandopacs.cpp:108
+#: ..\../commands/pacsdownloadcommand.cpp:101
+msgid "Server ID not found. ID = "
+msgstr "Server-ID nicht gefunde. ID = "
+
+#: ..\../commands/comandopacs.cpp:110 ..\../commands/comandopacs.cpp:112
+#: ..\../commands/comandopacs.cpp:114 ..\../commands/comandopacs.cpp:116
+msgid "Query error with PACS Id "
+msgstr "Abfragefehler mit der PACS-Id "
+
+#: ..\../commands/comandopacs.cpp:116
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error"
+msgstr "Interner Fehler"
+
+#: ..\../commands/comandopacs.cpp:135
+msgid "Failed to perform search: "
+msgstr "Konnte Suche nicht durchführen: "
+
+#: ..\../commands/dbmigrationcommand.cpp:94
+#: ..\../commands/dbmigrationcommand.cpp:103
+msgid "Migrating old DICOM Dir ..."
+msgstr "Altes DICOM-Verzeichnis wird migriert …"
+
+#: ..\../commands/dbmigrationcommand.cpp:99
+#: ..\../commands/dbmigrationcommand.cpp:108
+#, fuzzy
+msgid "Including files ..."
+msgstr "Füge Dateien ein..."
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+"Migration erfolgreich abgeschlossen, Ginkgo CADx wird diesen Ordner jetzt "
+"löschen:\n"
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+#: ..\../commands/dicomizecommand.cpp:181
+#: ..\../commands/openremovableunit.cpp:74
+#: ..\../commands/openremovableunit.cpp:110
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../commands/pdfextractercommand.cpp:130
+#: ..\../main/controllers/historycontroller.cpp:447
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+#: ..\../main/controllers/historycontroller.cpp:1976
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ..\../main/gui/login/dialogologin.cpp:50
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ..\../main/gui/open/opendialogs.cpp:58
+#: ..\../main/gui/open/opendialogs.cpp:62
+#: ..\../main/gui/open/opendialogs.cpp:134
+#: ..\../main/gui/progress/statusbarprogreso.cpp:284
+#: ..\../main/gui/progress/statusbarprogreso.cpp:287
+#: ..\../main/gui/progress/statusbarprogreso.cpp:292
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Info"
+msgstr "Information"
+
+#: ..\../commands/dbmigrationcommand.cpp:123
+msgid "Migration finisthed successfully"
+msgstr "Migration erfolgreich abgeschlossen"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:27
+#: ..\../commands/dialogopathssobreescribirbase.cpp:62
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid "Overwrite"
+msgstr "Überschreiben"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr "Möchten Sie sie überschreiben?"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:65
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ..\../main/gui/history3/historypanel3base.cpp:339
+#: ..\../main/gui/history3/historypanel3base.cpp:415
+#: ..\../main/gui/history3/historypanel3base.cpp:486
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ..\../main/gui/open/opendialogsbase.cpp:53
+#: ..\../main/gui/open/opendialogsbase.cpp:131
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ..\../widgets/gui/calibracionbase.cpp:86
+#: ..\../widgets/gui/selecciontextobase.cpp:60
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#: ..\../commands/dicomizationcompletebase.cpp:24
+#: ..\../commands/dicomizationcompletebase.cpp:33
+#: ..\../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr "Dicomisierung abgeschlossen"
+
+#: ..\../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr "Dicomisierung erfolgreich abgeschlossen"
+
+#: ..\../commands/dicomizationcompletebase.cpp:56
+msgid "Don't show this message again"
+msgstr "Diese Nachricht nicht mehr anzeigen"
+
+#: ..\../commands/dicomizationcompletebase.cpp:62
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ..\../main/gui/history3/historypanel3base.cpp:411
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ..\../widgets/gui/calibracionbase.cpp:82
+#: ..\../widgets/gui/selecciontextobase.cpp:56
+msgid "Accept"
+msgstr "Übernehmen"
+
+#: ..\../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr "Schritt 1 von 3: Importieren der Bilder"
+
+#: ..\../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr "Schritt 2 von 3: Kopieren der Bilder"
+
+#: ..\../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr "Schritt 3 von 3: Hochladen der Bilder"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid "Import process failed:"
+msgstr "Importvorgang gescheitert:"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+"\n"
+"Möchten Sie es erneut versuchen?"
+
+#: ..\../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr "Es wird importiert …"
+
+#: ..\../commands/dicomizecommand.cpp:370
+msgid "Unknown error in dicomization process"
+msgstr "Unbekannter Fehler im Dicomisierungs-Prozess"
+
+#: ..\../commands/dicomizecommand.cpp:431
+#: ..\../commands/dicomizecommand.cpp:442
+#: ..\../commands/sendpacscommand.cpp:185
+#, fuzzy
+msgid "Error sending evidences:"
+msgstr "Fehler beim Sender der Nachricht:"
+
+#: ..\../commands/dicomizecommand.cpp:437
+#: ..\../commands/dicomizecommand.cpp:448
+msgid "Can not upload to the PACS:\n"
+msgstr "Es kann nicht zum PACS hochgeladen werden:\n"
+
+#: ..\../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+"Es kann nicht zum PACS hochgeladen werden:\n"
+"Interner Fehler"
+
+#: ..\../commands/exporttodicomdircommand.cpp:261
+#: ..\../commands/exporttodicomdircommand.cpp:338
+#, c-format
+msgid "Exporting series %d of %d"
+msgstr "Serie %d von %d wird exportiert"
+
+#: ..\../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr "Einige der ausgewählten Serien wurden gelöscht"
+
+#: ..\../commands/exporttodicomdircommand.cpp:279
+#: ..\../commands/exporttodicomdircommand.cpp:385
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+msgid "There was an error creating directory"
+msgstr "Beim Erstellen des Ordners ist ein Fehler aufgetreten"
+
+#: ..\../commands/exporttodicomdircommand.cpp:303
+#: ..\../commands/exporttodicomdircommand.cpp:408
+msgid "There was an error writing file"
+msgstr "Beim Schreiben der Datei ist ein Fehler aufgetreten"
+
+#: ..\../commands/exporttodicomdircommand.cpp:358
+msgid "There was an error anonymizing files"
+msgstr "Beim Anonymisieren der Dateien ist ein Fehler aufgetreten"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Ignoring incoming operation "
+msgstr "Ignorieren des eingehenden Vorgangs "
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:298
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr "Nicht implementiert"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:473
+#: ..\../commands/pacsdownloadcommand.cpp:170
+#: ..\../commands/pacsdownloadcommand.cpp:179
+msgid "Including files..."
+msgstr "Füge Dateien ein..."
+
+#: ..\../commands/linkhistorycommand.cpp:68
+msgid "Linking study..."
+msgstr "Studie wird verknüpft …"
+
+#: ..\../commands/openremovableunit.cpp:42
+#: ..\../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr "Datenträger durchsuchen …"
+
+#: ..\../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+"Auf Wechseldatenträgern wurde kein DICOM-Verzeichnis gefunden.\n"
+"Möchten Sie den anderen Pfad rekursiv durchsuchen?"
+
+#: ..\../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+"Auf Wechseldatenträgern wurde kein DICOM-Verzeichnis gefunden.\n"
+"Möchten Sie das Laufwerk %s rekursiv durchsuchen?"
+
+#: ..\../commands/openremovableunit.cpp:130
+msgid "Select drive you want to open"
+msgstr "Laufwerk auswählen, das geöffnet werden soll"
+
+#: ..\../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+"Ginkgo CADx hat mehr als einen Wechseldatenträger gefunden,\n"
+"jedoch enthält keiner davon ein DICOM-Verzeichnis im Wurzelverzeichnis.\n"
+"Wählen Sie das Laufwerk aus, von dem Sie rekursiv akquirieren möchten."
+
+#: ..\../commands/pacsdownloadcommand.cpp:134
+msgid "Error downloading study: "
+msgstr "Fehler beim Herunterladen der Studie: "
+
+#: ..\../commands/pdfextractercommand.cpp:103
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr ""
+"Fehler beim Extrahieren des PDFs, Ginkgo CADx kann dieses Format nicht laden"
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ..\../main/gui/progress/statusbarprogreso.cpp:278
+#: ..\../widgets/gui/calibracion.cpp:205 ..\../widgets/gui/calibracion.cpp:209
+#: ..\../widgets/gui/calibracion.cpp:219 ..\../widgets/gui/calibracion.cpp:225
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "Error"
+msgstr "Fehler"
+
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr "Im System ist kein PDF-Betrachter festgelegt"
+
+#: ..\../commands/pdfextractercommand.cpp:130
+msgid "PDF files extracted successfully..."
+msgstr "PDF-Dateien wurden erfolgreich extrahiert …"
+
+#: ..\../commands/secondarycapturedicomizecommand.cpp:73
+#, fuzzy
+msgid "Ginkgo CADx Secondary Capture"
+msgstr "Ginkgo CADx"
+
+#: ..\../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr "HL7-Meldung %d von %d wird gesendet"
+
+#: ..\../commands/sendhl7command.cpp:73
+msgid "Message successfully sent"
+msgstr "Nachricht erfolgreich gesendet"
+
+#: ..\../commands/sendhl7command.cpp:77
+msgid "Unknown protocol"
+msgstr "Unbekanntes Protokoll"
+
+#: ..\../commands/sendhl7command.cpp:80 ..\../commands/sendhl7command.cpp:93
+#: ..\../commands/sendhl7command.cpp:145
+msgid "Error sending message:"
+msgstr "Fehler beim Sender der Nachricht:"
+
+#: ..\../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr "Fehler beim Senden der HL7-Mitteilung; Details stehen im Protokoll"
+
+#: ..\../commands/sendhl7command.cpp:93 ..\../commands/sendhl7command.cpp:94
+msgid "Unknown error"
+msgstr "Unbekannter Fehler"
+
+#: ..\../commands/sendhl7command.cpp:134
+msgid "Failed to start connection"
+msgstr "Konnte Verbindung nicht starten"
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid "Error sending message. It was sent "
+msgstr "Fehler beim Sender der Nachricht. Es wurde gesendet "
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr " Bytes von "
+
+#: ..\../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr ""
+"Bestätigungslogik fehlgeschlagen. Die ID der Nachricht stimmt nicht überein."
+
+#: ..\../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr "NACK erhalten:"
+
+#: ..\../commands/sendhl7command.cpp:258
+msgid "Failed delivery confirmation:"
+msgstr "Bestätigung gescheiterter Übertragung:"
+
+#: ..\../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr ""
+"Fehler bei der Bestätigung der Auslieferung: Auslieferung wurde von der "
+"Gegenstelle nicht registriert"
+
+#: ..\../commands/sendpacscommand.cpp:51
+msgid "Send files to PACS"
+msgstr "Dateien zum PACS senden"
+
+#: ..\../commands/sendpacscommand.cpp:155
+msgid "Uploading files ..."
+msgstr "Dateien werden hochgeladen …"
+
+#: ..\../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr "Fehler: PACS Eintrag Konfiguration nicht gefunden: "
+
+#: ..\../commands/sendpacscommand.cpp:181
+msgid "Error:"
+msgstr "Fehler:"
+
+#: ..\../commands/sendpacscommand.cpp:189
+msgid "Error sending evidences: Internal error."
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:203
+msgid "Error uploading the study to PACS: "
+msgstr "Fehler beim Hochladen der Studie zum PACS: "
+
+#: ..\../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+"\n"
+"Möchten Sie es erneut versuchen? Automatischer Versuch in %d Sekunde(n) …"
+
+#: ..\../commands/sendpacscommand.cpp:206
+msgid "Retry send to PACS"
+msgstr "Erneut versuchen, zum PACS zu senden"
+
+#: ..\../commands/synchronizationcommand.cpp:104
+msgid "Error downloading file"
+msgstr "Fehler beim Herunterladen der Datei"
+
+#: ..\../commands/synchronizationcommand.cpp:141
+msgid "Error synchronizing study: "
+msgstr "Fehler beim Abgleichen der Studie: "
+
+#: ..\../commands/thumbnailscommand.cpp:107
+#: ..\../commands/thumbnailscommand.cpp:133
+#: ..\../commands/thumbnailscommand.cpp:247
+#: ..\../commands/thumbnailscommand.cpp:376
+#: ..\../commands/thumbnailscommand.cpp:382
+#: ..\../main/gui/import/selectimagesimportation.cpp:504
+msgid "Creating Thumbnail..."
+msgstr "Erzeuge Vorschau..."
+
+#: ..\../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr "Erstelle Vorschaubilder"
+
+#: ..\../export/tools/iaddfiletohistorytool.cpp:19
+#: ..\../main/gui/history3/historypanel3.cpp:632
+msgid "Open study"
+msgstr "Studie öffnen"
+
+#: ..\../export/tools/iangletool.cpp:19
+msgid "Angle \tCtrl+A"
+msgstr "Winkel \tCtrl+A"
+
+#: ..\../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr "Helligkeit/Kontrast \tCtrl+B"
+
+#: ..\../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr "Kamera drehen"
+
+#: ..\../export/tools/icolormaptool.cpp:20
+msgid "Color Map"
+msgstr "Farbpalette"
+
+#: ..\../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ..\../main/gui/open/opendialogsbase.cpp:46
+#: ..\../main/gui/open/opendialogsbase.cpp:198
+msgid "Copy"
+msgstr "Kopieren"
+
+#: ..\../export/tools/icornerannotationstool.cpp:20
+msgid "Window annotations"
+msgstr "Fensterbemerkungen"
+
+#: ..\../export/tools/idetachwindowtool.cpp:19
+msgid "Detach window"
+msgstr "Fenster abtrennen"
+
+#: ..\../export/tools/iimageexporttool.cpp:19
+msgid "Export image..."
+msgstr "Bild exportieren …"
+
+#: ..\../export/tools/imarkertool.cpp:20
+msgid "Marking Tools \tCtrl+M"
+msgstr "Markierungswerkzeuge \tCtrl+M"
+
+#: ..\../export/tools/imetricgridtool.cpp:20
+msgid "Metric grid"
+msgstr "Metrisches Gitter"
+
+#: ..\../export/tools/inotetool.cpp:19
+msgid "Text Note \tCtrl+N"
+msgstr "Textnotiz \tCtrl+N"
+
+#: ..\../export/tools/ipacsuploadtool.cpp:19
+msgid "Upload study..."
+msgstr "Studie hochladen …"
+
+#: ..\../export/tools/ipixelsbluringtool.cpp:20
+msgid "Pixels blurring"
+msgstr ""
+
+#: ..\../export/tools/ipointertool.cpp:19
+msgid "Pointer \tEsc"
+msgstr "Zeiger \tEsc"
+
+#: ..\../export/tools/iqueryretrievetool.cpp:19
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#: ..\../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr "Eine DICOM-Studie vom PACS akquirieren"
+
+#: ..\../export/tools/iresettool.cpp:19
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+msgid "Reset"
+msgstr "Zurücksetzen"
+
+#: ..\../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr "Drehen und Spiegeln"
+
+#: ..\../export/tools/iruletool.cpp:19
+#, fuzzy
+msgid "Rule \tCtrl+R"
+msgstr "Winkel \tCtrl+A"
+
+#: ..\../export/tools/isecondarycapturetool.cpp:19
+msgid "Save snapshot as new series..."
+msgstr "Bildschirmfoto als neue Serie speichern …"
+
+#: ..\../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr "Verlauf anzeigen \tAlt+h"
+
+#: ..\../export/tools/ishowtagstool.cpp:19
+#: ..\../main/tools/showtagshistorytool.cpp:27
+msgid "DICOM inspector"
+msgstr "DICOM-Inspektor"
+
+#: ..\../export/tools/isimpleprinttool.cpp:19
+#: ..\../main/tools/simpleprinttool.cpp:226
+msgid "Print"
+msgstr "Drucken"
+
+#: ..\../export/tools/istartdicomizationtool.cpp:19
+msgid "Dicomize..."
+msgstr "Dicomisieren …"
+
+#: ..\../export/tools/itoolpan.cpp:19
+msgid "Pan \tCtrl+P"
+msgstr "Schwenken \tCtrl+P"
+
+#: ..\../export/tools/itoolslider.cpp:19
+#, fuzzy
+msgid "Slider \tCtrl+S"
+msgstr "Winkel \tCtrl+A"
+
+#: ..\../export/tools/itoolwindowlevel.cpp:19
+msgid "Window/Level \tCtrl+W"
+msgstr "Fenster/Ebene \tCtrl+W"
+
+#: ..\../export/tools/itoolzoom.cpp:19
+#, fuzzy
+msgid "Zoom \tCtrl+O"
+msgstr "Winkel \tCtrl+A"
+
+#: ..\../export/tools/itrackballtool.cpp:19
+msgid "Trackball \tCtrl+T"
+msgstr "Trackball \tCtrl+T"
+
+#: ..\../export/tools/iundotool.cpp:20 ..\../main/tools/undotool.cpp:109
+msgid "Undo"
+msgstr "Rückgängig"
+
+#: ..\../export/tools/ivideotool.cpp:19
+msgid "Video \tCtrl+Space"
+msgstr "Video \tCtrl+Space"
+
+#: ..\../export/tools/iwindowlayouttool.cpp:20
+msgid "Window layout"
+msgstr "Fensteranordnung"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid "Studies with"
+msgstr "Studien mit"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr " nicht unterstützte Komponenten"
+
+#: ..\../main/controllers/controladorcarga.cpp:210
+msgid "Reading properties"
+msgstr "Lese Eigenschaften"
+
+#: ..\../main/controllers/controladorcarga.cpp:219
+#: ..\../main/controllers/controladorcarga.cpp:642
+#: ..\../main/controllers/controladorcarga.cpp:888
+#: ..\../main/controllers/streaming/streamingloader.cpp:600
+msgid "Error reading the study: "
+msgstr "Fehler beim Laden der Studie: "
+
+#: ..\../main/controllers/controladorcarga.cpp:224
+#: ..\../main/controllers/controladorcarga.cpp:229
+#: ..\../main/controllers/controladorcarga.cpp:647
+#: ..\../main/controllers/controladorcarga.cpp:893
+msgid "Internal error reading the study: "
+msgstr "Interner Fehler beim Lesen der Studie: "
+
+#: ..\../main/controllers/controladorcarga.cpp:269
+#: ..\../main/controllers/controladorcarga.cpp:281
+#: ..\../main/controllers/controladorcarga.cpp:905
+msgid "Spacing is not valid: ("
+msgstr "Abstand ist ungültig: ("
+
+#: ..\../main/controllers/controladorcarga.cpp:305
+#: ..\../main/controllers/controladorcarga.cpp:338
+#: ..\../main/controllers/controladorcarga.cpp:372
+#: ..\../main/controllers/controladorcarga.cpp:408
+#: ..\../main/controllers/controladorcarga.cpp:441
+#: ..\../main/controllers/controladorcarga.cpp:474
+#: ..\../main/controllers/controladorcarga.cpp:507
+#: ..\../main/controllers/controladorcarga.cpp:540
+#: ..\../main/controllers/controladorcarga.cpp:573
+#: ..\../main/controllers/controladorcarga.cpp:606
+#: ..\../main/controllers/controladorcarga.cpp:935
+msgid "Error loading the study: Out of memory"
+msgstr "Fehler beim Laden der Studie: Nicht genug Speicher"
+
+#: ..\../main/controllers/controladorcarga.cpp:375
+msgid "Error loading the study: Internal Error"
+msgstr "Fehler beim Laden der Studie: interner Fehler"
+
+#: ..\../main/controllers/controladorcarga.cpp:630
+#: ..\../main/controllers/streaming/streamingloader.cpp:1023
+#: ..\../main/controllers/streaming/streamingloader.cpp:1223
+#: ..\../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr "Fehler beim Laden der Studie: nicht unterstütztes Pixelformat"
+
+#: ..\../main/controllers/controladorcarga.cpp:651
+#: ..\../main/controllers/controladorcarga.cpp:960
+msgid "Process canceled by user."
+msgstr "Vorgang vom Nutzer abgebrochen"
+
+#: ..\../main/controllers/controladorcarga.cpp:878
+msgid "Interpreting properties"
+msgstr "Interpretiere Eigenschaften"
+
+#: ..\../main/controllers/controladorcarga.cpp:917
+msgid "Spacing of the image is invalid: ("
+msgstr "Abstand des Bildes ist ungültig: ("
+
+#: ..\../main/controllers/controladorcarga.cpp:942
+msgid "Reading dataset"
+msgstr "Lese Datenset"
+
+#: ..\../main/controllers/controladorcarga.cpp:951
+msgid "Error reading the study:"
+msgstr "Fehler beim Lesen der Studie:"
+
+#: ..\../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr "Interner Fehler beim Lesen der Studie:"
+
+#: ..\../main/controllers/controladorcarga.cpp:972
+#, fuzzy
+msgid "load"
+msgstr "Laden ..."
+
+#: ..\../main/controllers/controladorenviohl7.cpp:40
+msgid "Stopping HL7 sender"
+msgstr "HL7-Sender wird gestoppt"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:63
+#: ..\../main/controllers/controladorenviohl7.cpp:76
+msgid "Error starting HL7 sender"
+msgstr "Fehler beim Starten des HL7-Senders"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:65
+#: ..\../main/controllers/controladorenviohl7.cpp:78
+msgid "HL7 sender started"
+msgstr "HL7-Sender wurde gestartet"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:108
+#, fuzzy
+msgid "HL7 controller destroyed"
+msgstr "HL7"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:150
+msgid "Error processing message"
+msgstr "Fehler beim Verarbeiten der Nachricht"
+
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/controllers/pacscontroller.cpp:1549
+#: ..\../main/controllers/pacscontroller.cpp:1553
+#: ..\../main/controllers/pacscontroller.cpp:1557
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:184
+msgid "Unknown"
+msgstr "Unbekannt"
+
+#: ..\../main/controllers/controladorextensiones.cpp:110
+msgid "Loading"
+msgstr "Ladevorgang"
+
+#: ..\../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr "Bibliotheksdatei der Erweiterung konnte nicht geladen werden"
+
+#: ..\../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr "Bibliotheksdatei konnte nicht geladen werden. Prüfen Sie das Protokoll"
+
+#: ..\../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr "Erweiterungsdeskriptor stimmt nicht überein"
+
+#: ..\../main/controllers/controladorextensiones.cpp:153
+msgid "Could not find entry point"
+msgstr "Einstiegspunkt konnte nicht gefunden werden"
+
+#: ..\../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:74
+#, fuzzy
+msgid "Integration engine hostname not set"
+msgstr "Hostname-Integrationsmaschine (IP oder DNS)"
+
+#: ..\../main/controllers/controladorhl7.cpp:77
+#, fuzzy
+msgid "Integration engine port not set"
+msgstr "Hostname-Integrationsmaschine (IP oder DNS)"
+
+#: ..\../main/controllers/controladorhl7.cpp:91
+msgid "Unsupported protocol"
+msgstr "Nicht unterstütztes Protokoll"
+
+#: ..\../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr "%d Ergebnisse wurden gefunden"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, c-format
+msgid "Downloading file %d/%d"
+msgstr "Lade Datei %d/%d"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr "Größenbeschränkung für herunterladbare Studien wurde überschritten"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr "Für die PDF-Dicomisierung konnte kein Speicher reserviert werden"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr "Für die Bild-Dicomisierung konnte kein Speicher reserviert werden"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+msgid "Image format not supported"
+msgstr "Bildformat nicht unterstützt"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr "Privater Schlüssel und Zertifikat stimmen nicht überein"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr "Fehler beim Festlegen der TLS-Schicht: "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:200
+#, fuzzy
+msgid "Receiving Association failed: "
+msgstr ""
+"Eindeutiger Bezeichner der Organisation, welche die Nachricht empfängt."
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:209
+#, fuzzy
+msgid "Association received"
+msgstr "NACK erhalten:"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:210
+msgid "Parameters:"
+msgstr "Parameter:"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ")"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:274
+#, fuzzy
+msgid "No valid presentation contexts"
+msgstr "Abstand ist ungültig: ("
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+#, fuzzy
+msgid "Association(dicom://"
+msgstr "DICOM-Inspektor"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr "@"
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr "»Ginkgo CADx« kann nicht packen von "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr " bis "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, c-format
+msgid "Uploading file %d of %d"
+msgstr "Datei %d von %d wird hochgeladen"
+
+#: ..\../main/controllers/dicommanager.cpp:504
+#: ..\../main/controllers/dicommanager.cpp:531
+msgid "Extracting file..."
+msgstr "Datei wird entpackt …"
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid "Error creating history database "
+msgstr "Fehler beim Erstellen der Verlaufsdatenbank "
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+"Sie haben nicht die erforderliche Berechtigung, in das DICOM-Verzeichnis zu "
+"schreiben. Einstellungen werden im temporären Verzeichnis gespeichert."
+
+#: ..\../main/controllers/historycontroller.cpp:343
+msgid "Error creating dicomDir database "
+msgstr "Fehler beim Erstellen der dicomDir-Datenbank "
+
+#: ..\../main/controllers/historycontroller.cpp:425
+#: ..\../main/controllers/historycontroller.cpp:441
+msgid "Error creating thumbnails database "
+msgstr "Fehler beim Erstellen der Vorschaubilder-Datenbank "
+
+#: ..\../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr "Fehler bei der Erstellung der Datenbank:\n"
+
+#: ..\../main/controllers/historycontroller.cpp:560
+msgid "Including image "
+msgstr "Füge Bilder hinzu "
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr " von "
+
+#: ..\../main/controllers/historycontroller.cpp:707
+#, fuzzy
+msgid "Linking image "
+msgstr "Studie wird verknüpft …"
+
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr "Fehler beim Lesen des Verlaufs: \n"
+
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr "Konnte die Nummer der Datenbank nicht löschen:\n"
+
+#: ..\../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr "Konnte den Verlauf nicht leeren:\n"
+
+#: ..\../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+"»Ginkgo CADx« hat Untätigkeit festgestellt und wird in %d Sekunden "
+"geschlossen.\n"
+"Möchten Sie fortfahren?"
+
+#: ..\../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr ""
+"Schwerer Fehler! Sie können nicht zwei Parser registrieren mit dem gleichen "
+"Schlüssel"
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+msgid "Malformed template Id ("
+msgstr "Korrupter Template-Bezeichner"
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+"):\n"
+"ist keine gültige HL7 Kennung (z.B. code^description^namespaceId)"
+
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr "Finde korruptes Template in der Modulkonfiguration"
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid "Template Id unsupported ("
+msgstr "Template-Id wird nicht unterstützt ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr "):"
+
+#: ..\../main/controllers/integrationcontroller.cpp:566
+msgid "Unknown module Id ("
+msgstr "Unbekannte Modul-Id ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:592
+msgid "Empty configuration"
+msgstr "Leere Konfiguration"
+
+#: ..\../main/controllers/integrationcontroller.cpp:631
+msgid "XML Parser Not Found. Key="
+msgstr "XML-Parser nicht gefunden. Schlüssel="
+
+#: ..\../main/controllers/log4cplus/guiappender.cpp:75
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr "%Y/%m/%d %H:%M:%S.%q"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ..\../main/gui/history3/historypanel3base.cpp:48
+#: ..\../main/gui/import/pasosimportacionbase.cpp:227
+msgid "Patient"
+msgstr "Patient"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+msgid "Patient ID"
+msgstr "Patienten-ID"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:86
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ..\../main/gui/history3/historypanel3.cpp:227
+#: ..\../main/gui/open/opendialogs.cpp:50
+msgid "Modality"
+msgstr "Modalität"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:98
+msgid "Dimensions"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:109
+#, c-format
+msgid "Made with %s"
+msgstr "Erstellt mit %s"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:167
+#: ..\../main/controllers/modalitysettingscontroller.cpp:338
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr "Voreinstellung"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr "Automatisch berechnen"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr "WIRBELSÄULE"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr "MEDIASTINUM"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1212
+msgid "Downloading file"
+msgstr "Datei wird heruntergeladen"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Error downloading WADO file"
+msgstr "Fehler beim Herunterladen der WADO-Datei"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Check PACS configuration"
+msgstr "PACS-Konfiguration überprüfen"
+
+#: ..\../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr "Unbekannte Abfragetiefe"
+
+#: ..\../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr "Abfragetiefe nicht angegeben"
+
+#: ..\../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr "HTTP-Anfrage kann nicht ausgeführt werden"
+
+#: ..\../main/controllers/pacscontroller.cpp:1428
+msgid "Invalid HTTP response"
+msgstr "Ungültige HTTP-Antwort"
+
+#: ..\../main/controllers/pacscontroller.cpp:1433
+msgid "Invalid HTTP code"
+msgstr "Ungültiger HTTP-Code"
+
+#: ..\../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr "HTTP-Subsystem kann nicht initialisiert werden"
+
+#: ..\../main/controllers/pacscontroller.cpp:1472
+msgid "PACS-Service"
+msgstr "PACS-Dienst"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:97
+#: ..\../main/controllers/parserxmlspanish.cpp:94
+msgid "Omitted Identificator"
+msgstr "Weggelassener Identifikator"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:105
+#: ..\../main/controllers/parserxmlspanish.cpp:102
+msgid "Omitted AET"
+msgstr "Weggelassener AET"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:113
+#: ..\../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr "Hostname fehlt"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:121
+#: ..\../main/controllers/parserxmlspanish.cpp:118
+msgid "Omitted port"
+msgstr "Weggelassener Port"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:206
+#: ..\../main/controllers/parserxmlenglish.cpp:237
+#: ..\../main/controllers/parserxmlspanish.cpp:188
+#: ..\../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr "Die PDU-Größe ist keine gültige Zahlenangabe"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:212
+#: ..\../main/controllers/parserxmlspanish.cpp:194
+msgid "Port is not a valid number"
+msgstr "Port enthält keine gültige Zahl"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:248
+#: ..\../main/controllers/parserxmlspanish.cpp:228
+msgid "The port is not a valid number"
+msgstr "Die Port-Angabe ist keine gültige Zahl"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:265
+#: ..\../main/controllers/parserxmlspanish.cpp:246
+msgid "Setting not found"
+msgstr "Einstellung nicht gefunden"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr "Attribut »action« ungültig in Gültigkeitsbereich »gnkworkflow«"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr "Attribut »action« wird erwartet in Gültigkeitsbereich »gnkworkflow«"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+"Attribut »pacs-retrieve-sid« ist leer in Gültigkeitsbereich »gnkworkflow«"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr "Attribut »pacs-store-sid« ist leer in Gültigkeitsbereich »gnkworkflow«"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr ""
+"Attribut »value« wird erwartet in Gültigkeitsbereich »query-retrieve-level«"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:391
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr "Attribut »code« wird erwartet in Gültigkeitsbereich »patient«"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:427
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr "Attribut »code« wird erwartet in Gültigkeitsbereich »physician«"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:434
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr "Attribut »value« wird erwartet in Gültigkeitsbereich »physician«"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:445
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr "Attribut »iid« wird erwartet in Gültigkeitsbereich »institution«"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr "Attribut »code« wird erwartet in Gültigkeitsbereich »metadata«"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:483
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr "Attribut »key« wird erwartet in Gültigkeitsbereich »metadata«"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:548
+#: ..\../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr ""
+"Sie müssen die Attribute angeben, die Sie in der Abfrage verwenden möchten"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:552
+#: ..\../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr "\"Patient\"-Markierung ohne IDs gelesen"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:570
+#: ..\../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr ""
+"Sie müssen einen Standard-PACS im Integrations-XML oder im Menü "
+"Einstellungen definieren"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr "Attribut »accion« ungültig in Gültigkeitsbereich »plantilla«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr "Attribut »accion« wird erwartet in Gültigkeitsbereich »plantilla«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+"Attribut »pacs_retrieve_sid« ist leer in Gültigkeitsbereich »plantilla«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr "Attribut »pacs_store_sid« ist leer in Gültigkeitsbereich »plantilla«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:340
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr "Attribut »uid« wird erwartet in Gültigkeitsbereich »dimse«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr "Attribut »ambito« ungültig in Gültigkeitsbereich »dimse«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr "Attribut »ambito« wird erwartet in Gültigkeitsbereich »dimse«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:402
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr "Attribut »codigo« wird erwartet in Gültigkeitsbereich »paciente«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:438
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr "Attribut »codigo« wird erwartet in Gültigkeitsbereich »medico«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:445
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr "Attribut »valor« wird erwartet in Gültigkeitsbereich »medico«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr "Attribut »cid« wird erwartet in Gültigkeitsbereich »centro«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr "Attribut »aid« wird erwartet in Gültigkeitsbereich »hce«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:486
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr "Attribut »codigo« wird erwartet in Gültigkeitsbereich »metadato«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr "Attribut »clave« wird erwartet in Gültigkeitsbereich »metadato«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:524
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+"Attribut »id_peticion« wird erwartet in Gültigkeitsbereich »gnkworkflow«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr "Attribut »ambito« wird erwartet in Gültigkeitsbereich »plantilla«"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:559
+#, fuzzy
+msgid "id_application expected"
+msgstr "Ginkgo CADx-Anwendungs-ID"
+
+#: ..\../main/controllers/smartretrievecontroller.cpp:124
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:920
+msgid "Downloading from PACS..."
+msgstr "Lade vom PACS..."
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:303
+#: ..\../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+"Fehler beim Laden der Studie: Größter Pixel-Datenwert des Bildes ist "
+"inkohärent zur Kombination von Pixel-Repräsentation und High-Bit"
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr "Interner Fehler beim Lesen der Studie, unbekanntes Format "
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ..\../main/gui/history3/historytablemodel.cpp:403
+#: ..\../main/gui/history3/historytablemodel.cpp:415
+#: ..\../main/gui/history3/historytablemodel.cpp:470
+#: ..\../main/gui/history3/historytablemodel.cpp:482
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:102
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr "%d/%m/%Y %H:%M:%S"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr "%d/%m/%Y 00:00:00"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+msgid "Exploring PACS..."
+msgstr "Untersuche PACS..."
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ..\../main/gui/history3/historypanel3.cpp:225
+#: ..\../main/gui/open/opendialogs.cpp:49
+msgid "Patient id"
+msgstr "Patienten-ID"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ..\../main/gui/history3/historypanel3.cpp:224
+#: ..\../main/gui/open/opendialogs.cpp:48
+msgid "Patient name"
+msgstr "Patientenname"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:479
+msgid "Study Instance UID"
+msgstr "Studien-Instanz-UID"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ..\../main/gui/history3/historypanel3.cpp:231
+#: ..\../main/gui/open/opendialogs.cpp:53
+#, fuzzy
+msgid "Accession number"
+msgstr "Max. Anzahl offener Reiter"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:481
+msgid "Study date"
+msgstr "Studiendatum"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:482
+#, fuzzy
+msgid "Study time"
+msgstr "Uhrzeit"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:490
+msgid "Series Instance UID"
+msgstr "Serieninstanz-UID"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:492
+msgid "Series date"
+msgstr "Datum der Serie"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:493
+#, fuzzy
+msgid "Series time"
+msgstr "Uhrzeit"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:519
+msgid "No results found"
+msgstr "Keine Ergebnisse gefunden"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#, fuzzy
+msgid "Write query name"
+msgstr "Name"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#, fuzzy
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr "Es gibt offene Aufgaben. Möchten Sie diese ausführen?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+msgid "Id"
+msgstr "Kennung"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+msgid "Date Time"
+msgstr "Datum Zeit"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ..\../main/gui/history3/historypanel3.cpp:229
+#: ..\../main/gui/import/pasosimportacionbase.cpp:298
+#: ..\../main/gui/import/pasosimportacionbase.cpp:340
+#: ..\../main/gui/open/opendialogs.cpp:52
+msgid "Description"
+msgstr "Beschreibung"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ..\../main/gui/import/pasosimportacionbase.cpp:276
+#, fuzzy
+msgid "Accession Number"
+msgstr "Max. Anzahl offener Reiter"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:210
+#, fuzzy
+msgid "Store query"
+msgstr "Anfrage konnte nicht ausgeführt werden."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:211
+#, fuzzy
+msgid "Remove query"
+msgstr "Entfernen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:278
+msgid "There is no any PACS configured"
+msgstr "Es ist kein PACS konfiguriert."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+msgid "Study UID"
+msgstr "Studien-UID"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+"Suchen ohne Parameter kann eine lange Zeit dauern\n"
+"Möchten Sie fortfahren ?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid "Search"
+msgstr "Durchsuchen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:519
+msgid "Download series"
+msgstr "Serie herunterladen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+msgid "Download study"
+msgstr "Studie herunterladen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:535
+msgid "Link series"
+msgstr "Serie verknüpfen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:537
+msgid "Link study"
+msgstr "Studie verknüpfen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:551
+msgid "Properties..."
+msgstr "Eigenschaften..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#, fuzzy
+msgid "You must specify at least a modality or a period of time"
+msgstr "Sie müssen eine absolute Pfadangabe für das Verzeichnis machen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#, fuzzy
+msgid "Select a valid query"
+msgstr "Wähle einen gültigen PACS Server"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+msgid "Select a valid PACS Server"
+msgstr "Wähle einen gültigen PACS Server"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid "Download of modality "
+msgstr "Download der Modalität "
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr " nicht erlaubt"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr "Sie sind nicht berechtigt, diese Art von Modalitäten herunterzuladen."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "Modality download error"
+msgstr "Modalität-Download-Fehler"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:786
+msgid "search results"
+msgstr "Suchergebnisse"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:913
+msgid "Downloading serie..."
+msgstr "Serie wird heruntergeladen …"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:916
+msgid "Downloading study..."
+msgstr "Studie wird heruntergeladen …"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+msgid "PACS acquisition is restricted"
+msgstr "Akquirieren vom PACS ist eingeschränkt"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+msgid "Server"
+msgstr "Server"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ..\../main/gui/import/pasosimportacionbase.cpp:284
+#: ..\../main/gui/import/pasosimportacionbase.cpp:326
+#: ..\../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr "Datum"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ..\../main/gui/history3/historypanel3base.cpp:81
+msgid "Any date"
+msgstr "Beliebiges Datum"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ..\../main/gui/history3/historypanel3base.cpp:85
+msgid "Today AM"
+msgstr "Heute vormittag"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ..\../main/gui/history3/historypanel3base.cpp:88
+msgid "Today PM"
+msgstr "Heute nachmittag"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ..\../main/gui/history3/historypanel3base.cpp:91
+msgid "Today"
+msgstr "Heute"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ..\../main/gui/history3/historypanel3base.cpp:100
+msgid "Yesterday"
+msgstr "Gestern"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ..\../main/gui/history3/historypanel3base.cpp:103
+msgid "Last 7 days"
+msgstr "Letzten 7 Tage"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ..\../main/gui/history3/historypanel3base.cpp:106
+msgid "Last 30 days"
+msgstr "Letzten 30 Tage"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ..\../main/gui/history3/historypanel3base.cpp:109
+msgid "Last 3 months"
+msgstr "Letzte 3 Monate"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ..\../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr "Zwischen:"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ..\../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr "Modalitäten"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+#, fuzzy
+msgid "Stored queries"
+msgstr "Datei konnte nicht gespeichert werden "
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+#, fuzzy
+msgid "Select stored queries..."
+msgstr ""
+"Wählen Sie das Verzeichnis, in welches die Dateien gespeichert werden sollen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ..\../main/gui/open/opendialogsbase.cpp:50
+#: ..\../main/gui/open/opendialogsbase.cpp:202
+msgid "Link"
+msgstr "Verweis"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr "Nur auf WADO-Servern verfügbar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+msgid "Download"
+msgstr "Herunterladen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ..\../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr "Schliessen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+msgid "Series does not exist"
+msgstr "Serie existiert nicht"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr "Diese Serien wurden aus dem lokalen Verlauf gelöscht"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr "Fortfahren"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ..\../main/gui/open/opendialogsbase.cpp:127
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ..\../main/tools/metricgridtool.cpp:101
+msgid "Ok"
+msgstr "OK"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:151
+msgid "Download again"
+msgstr "Erneut herunterladen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+msgid "Open"
+msgstr "Öffnen"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:179
+#, fuzzy
+msgid "Set query name"
+msgstr "Name"
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:32
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+"Diese Serie wurde bereits in den lokalen Verlauf heruntergeladen. Möchten "
+"Sie sie erneut herunterladen?"
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:34
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+"Diese Studie wurde bereits in den lokalen Verlauf heruntergeladen. Möchten "
+"Sie sie erneut herunterladen?"
+
+#: ..\../main/gui/anonymize/anonymizedialog.cpp:64
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ..\../main/gui/export/parametrosprincipales.cpp:194
+msgid "Exporting images ..."
+msgstr "Exportiere Bilder"
+
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr "Ungültige Werte im Feld Element oder Gruppe"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:21
+msgid "Common tags"
+msgstr "Gebräuchliche Markierungen"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+msgid "Patient's name and surname"
+msgstr "Vor- und Nachname des Patienten"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+msgid "Patient Id"
+msgstr "Patienten-ID"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr "Institutionen"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr "Zuweisender Arzt"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr "Kommentare"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:44
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr "Schlagwörter (Doppelklick, um Wert zu ändern)"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:71
+msgid "Add new..."
+msgstr "Neu hinzufügen …"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ..\../main/tools/anonymizetool.cpp:26
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr "Anonymisiere"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:136
+msgid "Create new"
+msgstr "Neu erstellen"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:136
+msgid "Add DICOM tag"
+msgstr "DICOM-Markierung hinzufügen"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:199
+msgid "Group"
+msgstr "Gruppe"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:203
+msgid "Element"
+msgstr "Element"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ..\../widgets/wangulo.cpp:1114
+msgid "Value"
+msgstr "Wert"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+msgid "Top right corner annotation"
+msgstr "Eckbeschriftung oben rechts"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+msgid "Top left corner annotation"
+msgstr "Eckbeschriftung oben links"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+msgid "Bottom left corner annotation"
+msgstr "Eckbeschriftung  unten links"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+msgid "Bottom right corner annotation"
+msgstr "Eckbeschriftung unten rechts"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+msgid "You must fill in all fields"
+msgstr "Sie müssen alle Felder ausfüllen"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#, fuzzy
+msgid "Window/level label in use"
+msgstr "Fenster/Ebene"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr "Geben Sie gültige Zahlen in die Felder Fenster und Ebene ein."
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+msgid "Window"
+msgstr "Fenster"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+msgid "Level"
+msgstr "Ebene"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr "Linear"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr "Kubisch"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+msgid "Do you confirm the removal of the preset?"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Data modified"
+msgstr "Daten geändert"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+msgid "Modality settings"
+msgstr "Modalitätseinstellungen"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+msgid "Default modality settings"
+msgstr "Standard-Modalitätseinstellungen"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, c-format
+msgid "%s settings"
+msgstr "%s-Einstellungen"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:60
+msgid "settings"
+msgstr "Einstellungen"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Export Configuration"
+msgstr "Exportiere Konfiguration"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Ini Files(*.ini)|*.ini"
+msgstr "INI-Dateien (*.ini)|*.ini"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+"Datei existiert bereits\n"
+"Wollen Sie es überschreiben ?"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+msgid "Existing file"
+msgstr "Vorhandene Datei"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+msgid "Export successfully completed"
+msgstr "Export erfolgreich abgeschlossen"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+msgid "There was an error during exportation"
+msgstr "Beim Exportieren ist ein Fehler aufgetreten"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Import Configuration"
+msgstr "Importiere Konfiguration"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Ini files(*.ini)|*.ini"
+msgstr "INI-Dateien (*.ini)|*.ini"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr ""
+"Importvorgang erfolgreich abgeschlossen, Ginkgo CADx neustarten, um "
+"Änderungen anzuwenden"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+msgid "There was an error during importation, check permissions"
+msgstr ""
+"Beim Importieren ist ein Fehler aufgetreten, bitte Berechtigungen überprüfen"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+msgid "Dicom tag"
+msgstr "DICOM-Markierung"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+msgid "Split horizontally..."
+msgstr "Horizontal teilen …"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+msgid "Split vertically..."
+msgstr "Vertikal teilen …"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ..\../main/tools/windowlayouttool.cpp:273
+#, fuzzy
+msgid "Split active horizontally"
+msgstr "Horizontal teilen …"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ..\../main/tools/windowlayouttool.cpp:274
+#, fuzzy
+msgid "Split active vertically"
+msgstr "Vertikal teilen …"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+msgid "New hanging protocol"
+msgstr "Neues Hanging-Protokoll"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, c-format
+msgid "Window %d"
+msgstr "Fenster %d"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr "Diese Ansicht unterstützt nicht mehr als ein Fenster"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr "Aktiviert"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "Yes"
+msgstr "Ja"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr "Nein"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+msgid "Hanging protocols"
+msgstr "Hanging-Protokolle"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+msgid "One day"
+msgstr "Ein Tag"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+msgid "Two days"
+msgstr "Zwei Tage"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+msgid "Three days"
+msgstr "Drei Tage"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr "Eine Woche"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+msgid "Two weeks"
+msgstr "Zwei Wochen"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+msgid "One month"
+msgstr "Ein Monat"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+msgid "Three months"
+msgstr "Drei Monate"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr "Ein Jahr"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+msgid "Local database"
+msgstr "Lokale Datenbank"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+msgid "Local DICOM Dir setup"
+msgstr "Einrichtung des lokalen DICOM-Verzeichnisses"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+"Der gewählte Ordner existiert nicht.\n"
+"Möchten Sie ihn erstellen?"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+"Konnte Verzeichnis nicht anlegen. Stellen Sie sicher, dass der Pfad korrekt "
+"ist und Sie entsprechende Rechte im Wurzelverzeichnis haben."
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+"Beim Lesen des Ordners ist ein Fehler aufgetreten, bitte Berechtigung zum "
+"Schreiben sicherstellen"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+msgid "Select DICOMDIR"
+msgstr "DICOMDIR wählen"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+"Warnung! Um den Ordner zu aktualisieren, müssen Sie die aktuell geöffnete "
+"Serie schließen."
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr "Konfigurationsparameter der lokalen Arbeitsstation"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr "Erweiterungen"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+msgid "Extensions settings"
+msgstr "Einstellung von Erweiterungen"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr ""
+"Gingko CADx muss neu gestartet werden damit die Änderungen an den "
+"Erweiterungen aktiv werden"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#, fuzzy
+msgid "Port has to be a valid number"
+msgstr "Port enthält keine gültige Zahl"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr "Allgemein"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+msgid "General configuration parameters"
+msgstr "Allgemeine Konfigurationsparameter"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr ""
+"»Ginkgo CADx« muss neu gestartet werden, damit die Änderungen wirksam werden"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:134
+msgid "Testing conectivity with the server..."
+msgstr "Teste Verbindung mit dem Server..."
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:144
+msgid "Error connecting to url"
+msgstr "Fehler bei der Verbindung zur URL"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#, fuzzy
+msgid "hostname/port not set"
+msgstr "Hostname / Port"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr "Verbindungstest fehlgeschlagen"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr "Verbindungstest erfolgreich"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "Select certificate"
+msgstr "Zertifikat wählen"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr "PEM-Dateien (*.pem;*.key)|*.pem;*.key|Alle Dateien (*.*)|*.*"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr "Sie müssen den privaten und öffentlichen Schlüssel festlegen"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:255
+msgid "Change ..."
+msgstr "Ändere ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+msgid "Import ..."
+msgstr "Importieren ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:279
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr ""
+"Wenn Sie SSL/TLS nutzen wollen, müssen Sie ein gültiges Zertifikat und einen "
+"gültigen privaten Schlüssel angeben"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:472
+msgid "There are this errors: "
+msgstr "Es sind diese Fehler vorhanden: "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+"\n"
+"- Diese PACS-Id wird bereits verwendet"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"- Der Port muss eine positive Ganzzahl sein (16 Bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+"\n"
+"- Der Port ist zu gross"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+"\n"
+"- Die Maximallänge des AET ist 16 Zeichen."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+"\n"
+"- Die PDU-Grösse sollte grösser als oder gleich Null sein (Voreinstellung = "
+"16384)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+"\n"
+"- Der Maximalwert für die PDU ist "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+"\n"
+"- Der Minimalwert der PDU ist "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+"\n"
+"- Wenn Sie SSL/TLS nutzen wollen, müssen Sie ein gültiges Zertifikat und "
+"einen privaten Schlüssel angeben"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:525
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+"\n"
+"- Wenn Sie WADO verwenden möchten, müssen Sie einen WADO-URL angeben"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+"\n"
+"- WADO-URL entspricht keinem gültigen Schema (z.B. http://)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+"\n"
+"- WADO-URL enthält keinen Rechnernamen"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr "Sie müssen alle Felder ausfüllen zum Fortfahren"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:558
+msgid "Testing the connection to the node ..."
+msgstr "Verbindung zum Knoten wird getestet …"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:561
+msgid "DICOM Error"
+msgstr "DICOM-Fehler"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr ""
+"Verbindung nicht möglich: Netzwerkunterstützung konnte nicht gestartet "
+"werden."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr "Der Dienst antwortete nicht erwartungsgemäß auf das C-ECHO"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:607
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr "Der Dienst hat nicht gemäß dem DICOM-Standard geantwortet"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:616
+msgid "Invalid port number"
+msgstr "Ungültige Port-Nummer"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:622
+msgid "WADO Error"
+msgstr "WADO-Fehler"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:703
+msgid "Use by default"
+msgstr "Als Vorgabe verwenden"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:795
+msgid "DICOM nodes"
+msgstr "DICOM-Knoten"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:800
+msgid "DICOM nodes settings"
+msgstr "DICOM-Knoteneinstellungen"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr "Sie haben die folgenden Fehler produziert:"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"- Der lokale Port muss eine positive Ganzzahl sein (16 Bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+"\n"
+"- Der lokale Port ist zu gross"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+"\n"
+"- Die Maximallänge des lokalen AET ist 16 Zeichen"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr "Entfernen des Knotens bestätigen"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Sie müssen den lokalen AET konfigurieren, der zur Kommunikation mit den "
+"DICOM-Knoten verwendet wird. Der angegebene Port muss in der Firewall "
+"geöffnet sein, weil dies für Übertragungen essentiell ist."
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ..\../main/gui/export/pasosexportacionbase.cpp:20
+msgid "Profile"
+msgstr "Profil"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr "Standardwert"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#, fuzzy
+msgid "Set property active"
+msgstr "Aktivieren"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr "Inaktiv"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+#, fuzzy
+msgid "Set property inactive"
+msgstr "Inaktiv"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+msgid "Set default value"
+msgstr "Als Standardwert festlegen"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+msgid "Set by user"
+msgstr "Nach Benutzer festlegen"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+msgid "Profile name can't be repeated"
+msgstr "Profilname kann nicht wiederholt werden"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr "Sie müssen das Feld Name ausfüllen zum Fortfahren"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr "Profile"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+msgid "Profiles Settings"
+msgstr "Profileinstellungen"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr ""
+"Ginkgo CADx muss neu gestart werden damit die Änderungen an den Rechten "
+"aktiv werden"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+msgid "Confirm the removal of the profile "
+msgstr "Bestätige das Entfernen des Profils "
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+msgid "New User"
+msgstr "Neuer Benutzer"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr "Der Name des Benutzers muss min. 4 Zeichen lang sein"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+msgid "User name repeated"
+msgstr "Benutzername wiederholen"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr "Passwort und Bestätigung können nicht verschieden sein."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+msgid "Password has to contain at least 6 characters"
+msgstr "Passwort muß mindestens 6 Zeichen lang sein"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+msgid "No login"
+msgstr "Kein Login"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+msgid "User/Password"
+msgstr "Benutzer/Passwort"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+msgid "Password"
+msgstr "Passwort"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+msgid "Password is setted"
+msgstr "Passwort gesetzt"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr "Passwort ändern"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+msgid "Password is not setted"
+msgstr "Kein Passwort definiert"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+msgid "Set password"
+msgstr "Passwort setzen"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+msgid "Security Setting"
+msgstr "Sicherheitseinstellungen"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr "Sie müssen zumindest einen Benutzer erstellen"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr "Sie müssen das Hauptpasswort festlegen"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+msgid "User inserted successfully"
+msgstr "Benutzer wurde erfolgreich eingefügt"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr ""
+"Beim Einfügen des Benutzers ist ein Fehler aufgetreten. Für mehr "
+"Informationen öffnen Sie das Protokoll."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+msgid "Password changed successfully"
+msgstr "Passwort erfolgreich geändert"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr ""
+"Beim Ändern des Passworts ist ein Fehler aufgetreten. Für mehr Informationen "
+"öffnen Sie das Protokoll."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+msgid "User deleted successfully"
+msgstr "Benutzer wurde erfolgreich gelöscht"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr ""
+"Beim Löschen des Benutzers ist ein Fehler aufgetreten. Für mehr "
+"Informationen öffnen Sie das Protokoll."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr "Ginkgo CADx muss mindestens einen Nutzer haben."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ..\../main/gui/login/dialogologin.cpp:27
+msgid "User"
+msgstr "Benutzer"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ..\../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr "Verzeichnis wählen"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr "Ortsbenennungen können nicht wiederholt werden"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+msgid "Maximum length of title is 8 characters"
+msgstr "Maximale Länges des Titels is 8 Zeichen"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr "Der gewählte Ordner kann nicht geöffnet werden"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr "Sie müssen beide Felder ausfüllen zum Fortfahren, Titel und Ort"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+msgid "Title"
+msgstr "Titel"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+msgid "Path"
+msgstr "Pfad"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr "Überwachen"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+msgid "Clean before"
+msgstr "Vorher säubern"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+msgid "Clean after"
+msgstr "Hinterher säubern"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr "Orte"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+msgid "Location Settings"
+msgstr "Standorteinstellungen"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr "Anonymisierung"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:96
+msgid "Anonymization settings"
+msgstr "Anonymisierungseinstellungen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1370
+msgid "Settings"
+msgstr "Einstellungen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+msgid "Export config..."
+msgstr "Konfiguration exportieren …"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+msgid "Import config..."
+msgstr "Konfiguration importieren …"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr "Anwenden"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+msgid "Physician's name"
+msgstr "Arztname"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+msgid "Physician's Id"
+msgstr "Mediziner-ID"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+msgid "Service"
+msgstr "Dienst"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+msgid "Service's name"
+msgstr "Dienstname"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+msgid "Service's Id"
+msgstr "Dienst-ID"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+msgid "Local institution"
+msgstr "Lokale Institution"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+msgid "Institution's name"
+msgstr "Institutsname"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+#, fuzzy
+msgid "Institution's Id"
+msgstr "Lokale Institution"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+msgid "Dicomized files"
+msgstr "Dicomisierte Dateien"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+msgid "Charset"
+msgstr "Zeichensatz"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr "ISO_IR 192"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr "ISO_IR 6"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr "ISO_IR 100"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr "ISO_IR 101"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr "ISO_IR 109"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr "ISO_IR 110"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr "ISO_IR 126"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr "ISO_IR 127"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr "ISO_IR 138"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr "ISO_IR 144"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+msgid "ISO_IR 148"
+msgstr "ISO_IR 148"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr "Sprache"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr "Verschiedenes"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+msgid "Automatically check for updates"
+msgstr "Suche automatisch nach Updates"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+"Helfen Sie uns durch Senden anonymer Nutzungsdaten (es werde keine "
+"Patientendaten gesendet)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+msgid "Proxy settings"
+msgstr "Proxy-Einstellungen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+msgid "Enable http proxy"
+msgstr "HTTP-Proxy aktivieren"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+#, fuzzy
+msgid "Proxy Settings"
+msgstr "Proxy-Einstellungen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+msgid "Server settings"
+msgstr "Server-Einstellungen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+msgid "Host"
+msgstr "Host"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+msgid "Port"
+msgstr "Port"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr "Legitimierung"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr "Proxy-Server erfordert Legitimierung"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+#, fuzzy
+msgid "Username"
+msgstr "Benutzername oder Passwort sind nicht korrekt"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr "Ausnahmen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+#, fuzzy
+msgid "No proxy for addresses containing"
+msgstr "Mehrere Adressen Komma-getrennt angeben."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr "Mehrere Adressen Komma-getrennt angeben."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+msgid "DICOM Dir"
+msgstr "DICOM-Verzeichnis"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr ""
+"DICOM-Verzeichnis ist das lokale Verzeichnis in dem der Verlauf gespeichert "
+"wird"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr "..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+"Warnung! Um den Ordner zu aktualisieren, müssen Sie alle geöffneten Serien "
+"schließen."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+msgid "Auto-cleaning"
+msgstr "Automatisch aufräumen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr "Studien löschen mit älterem Akquirierungsdatum als:"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+"Ältere Studien löschen, wenn freier Festplattenspeicher kleiner ist als:"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+msgid "MB"
+msgstr "MB"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr "Studien löschen, wenn DICOM-Verzeichnis größer ist als:"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+"Diese Funktion betrifft nur Studien, die in das DICOM-Verzeichnis kopiert "
+"wurden und nicht geöffnet sind"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ..\../main/tools/toolwindowlevel.cpp:201
+msgid "Reset to default"
+msgstr "Auf Standard zurücksetzen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr "Lokales PACS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Sie müssen den lokalen AET konfigurieren, der zur Kommunikation mit dem PACS-"
+"Server verwendet wird. Der angegebene Port muss in der Firewall geöffnet "
+"sein, weil dies für Übertragungen essentiell ist."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+msgid "Local AET"
+msgstr "Lokale AET"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr "Erweiterte Einstellungen ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+msgid "DICOM Nodes"
+msgstr "DICOM-Knoten"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+msgid "New ..."
+msgstr "Neu ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+msgid "Edit ..."
+msgstr "Bearbeiten ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete"
+msgstr "Löschen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+msgid "Set Default"
+msgstr "Standard setzen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+msgid "DICOM Node"
+msgstr "DICOM-Knoten"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr "AET"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+msgid "PDU (KB)"
+msgstr "PDU (KB)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+msgid "Retrieve method"
+msgstr "Empfangsmethode"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Move"
+msgstr "Verschieben"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Get"
+msgstr "Abrufen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr "WADO"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+msgid "WADO URL"
+msgstr "WADO-URL"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+msgid "Retrieve mode"
+msgstr "Empfangsmodus"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ..\../main/gui/import/pasosimportacionbase.cpp:319
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1395
+msgid "Series"
+msgstr "Serie"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+msgid "Studies"
+msgstr "Studien"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr "Verbindung wiederverwenden"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr "Bei mehr als einer Abfrage, Verbindungen wiederverwenden"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+msgid "Worklists"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+msgid "Select how do you want to handle MPPS items"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+msgid "DICOM MPPS"
+msgstr "DICOM-MPPS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+msgid "HL7 messages"
+msgstr "HL7-Nachrichten"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+msgid "HL7"
+msgstr "HL7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+#, fuzzy
+msgid "Abort message"
+msgstr "Nachricht"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+#, fuzzy
+msgid "Completed message"
+msgstr "Export erfolgreich abgeschlossen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+#, fuzzy
+msgid "In progress message"
+msgstr "Nachricht"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+msgid "Default values"
+msgstr "Standardwerte"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+msgid "Worklist"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+msgid "SSL/TLS"
+msgstr "SSL/TLS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+#, fuzzy
+msgid "Verify server credentials"
+msgstr "Server"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+msgid "Use SSL/TLS"
+msgstr "SSL/TLS benutzen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr "Zertifikat"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+msgid "Certificate to use in this connection"
+msgstr "Zertifikat für die Verbindung"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr "Erweiterte Konfiguration ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+msgid "Default charset"
+msgstr "Standardzeichensatz"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+msgid "Advanced"
+msgstr "Erweitert"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr "Verbindung testen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+msgid "Local AET certificate"
+msgstr "Lokales AET-Zertifikat"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+msgid "Certificate used by Ginkgo CADx"
+msgstr "Zertifikat, das »Ginkgo CADx« nutzt"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr "Anwendungs-ID von »Ginkgo CADx« zum Eintrag in das Feld MSH.3"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+msgid "Receiver organization Id"
+msgstr "Empfänger-Organisations-ID"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr ""
+"Eindeutiger Bezeichner der Organisation, welche die Nachricht empfängt."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+#, fuzzy
+msgid "Petitioner System Id"
+msgstr "Kennung"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+msgid "Filler Application Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+#, fuzzy
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr "Eindeutiger Bezeichner der Filler-Anwendung (SIID/Ginkgo)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr "Eindeutiger Bezeichner der Filler-Anwendung (SIID/Ginkgo)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+msgid "Ginkgo CADx Application Id"
+msgstr "Ginkgo CADx-Anwendungs-ID"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+"Eindeutiger Bezeichner der »Picture Archiving and Communication System "
+"Application« (SIID/PACS)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+#, fuzzy
+msgid "Integration engine"
+msgstr "Hostname-Integrationsmaschine (IP oder DNS)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+msgid "Hostname / Port"
+msgstr "Hostname / Port"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr "Hostname-Integrationsmaschine (IP oder DNS)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr "/"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+msgid "Protocol"
+msgstr "Protokoll"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr "MLLP"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ..\../main/gui/export/pasosexportacionbase.cpp:28
+msgid "Format"
+msgstr "Format"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+msgid "Message's format"
+msgstr "Nachrichtenformat"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr "ER7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+#, fuzzy
+msgid "Test engine"
+msgstr "Verbindung testen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+#, fuzzy
+msgid "Test Integration Engine connectivity"
+msgstr "Hostname-Integrationsmaschine (IP oder DNS)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+msgid "Ginkgo Extension Title"
+msgstr "Titel der Ginkgo-Erweiterung"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+msgid "Edit public key"
+msgstr "Ändere den öffentlichen Schlüssel"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr ""
+"Standardzertifikat (in lokalen AET-Einstellungen konfiguriert) verwenden"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+msgid "Public key"
+msgstr "Öffentlicher Schlüssel"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+msgid "Public key in PEM format"
+msgstr "Öffentlicher Schlüssel im PEM-Format"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+msgid "Load ..."
+msgstr "Laden ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+msgid "Private key"
+msgstr "Privater Schlüssel"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+msgid "Private key in PEM format"
+msgstr "Privater Schlüssel im PEM-Format"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+msgid "Profile name"
+msgstr "Profilname"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+msgid "Set active"
+msgstr "Aktivieren"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+msgid "Configure location"
+msgstr "Konfiguriere Ort"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+msgid "Location"
+msgstr "Ort"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr "Ordner nach der Dicomisierung säubern"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr "Ordner vor der Dicomisierung säubern"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+msgid "Security type"
+msgstr "Sicherheitsmodus"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr "Benutzer"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+msgid "Change Password ..."
+msgstr "Ändere Passwort ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+msgid "Set main password"
+msgstr "Hauptpasswort setzen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+msgid "Set Password"
+msgstr "Passwort setzen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+msgid "Edit User"
+msgstr "Benutzer bearbeiten"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+msgid "User Name"
+msgstr "Name des Benutzers"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+msgid "Confirm Password"
+msgstr "Kennwort bestätigen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+msgid "Properties"
+msgstr "Eigenschaften"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+msgid "Edit corner annotations"
+msgstr "Eckbeschriftungen bearbeiten"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue}  where GGGG is the tag's group in hexadecimal and EEEE is the "
+"tag's element."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+msgid "Window/level"
+msgstr "Fenster/Ebene"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr "Hinzufügen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ..\../main/gui/history3/historytoolmenu.cpp:149
+#: ..\../widgets/gui/selecciontextobase.h:58
+msgid "Edit"
+msgstr "Bearbeiten"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+msgid "Default Window/Level"
+msgstr "Standard-Fenster/Ebene"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+msgid "Corner annotations"
+msgstr "Eckbeschriftungen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+msgid "Setup corner annotations"
+msgstr "Eckbeschriftungen einrichten"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+msgid "Setup..."
+msgstr "Einrichten …"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+msgid "Other settings"
+msgstr "Andere Einstellungen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+msgid "Interpolate pixel data"
+msgstr "Pixel-Daten interpolieren"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+msgid "Hanging protocol"
+msgstr "Hanging-Protokoll"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+#, fuzzy
+msgid "Opening mode"
+msgstr "Empfangsmodus"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+#, fuzzy
+msgid "Study opening criteria"
+msgstr "Studie"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr "+"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+msgid "Workspace"
+msgstr "Arbeitsfläche"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+msgid "Enable/Disable"
+msgstr "Aktivieren/Deaktivieren"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+msgid "Top left corner annotations"
+msgstr "Eckbeschriftungen oben links"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+msgid "Setup window"
+msgstr "Fenster einrichten"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr ""
+"Klicken Sie auf den Konfigurieren-Knopf und platzieren Sie das Fenster wie "
+"gewünscht"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+msgid "Set default"
+msgstr "Als Vorgabe festlegen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+msgid "Open in main window"
+msgstr "Im Hauptfenster öffnen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+msgid "Setup position..."
+msgstr "Position einrichten …"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+#, fuzzy
+msgid "Setup undocked window position"
+msgstr "Position einrichten …"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+msgid "Layout"
+msgstr "Anordnung"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+msgid "Current layout"
+msgstr "Aktuelle Anordnung"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr "Zeilen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+msgid "Columns"
+msgstr "Spalten"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+#, fuzzy
+msgid "Series criteria"
+msgstr "Serie"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+#, fuzzy
+msgid "Select opening mode"
+msgstr "Empfangsmodus"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+msgid "Tag"
+msgstr "Markierung"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+"Position und Größe des Fensters einrichten, in dem die Studie geöffnet "
+"werden soll"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+msgid "Save"
+msgstr "Speichern"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+#, fuzzy
+msgid "Enable background queries"
+msgstr "Shader aktivieren"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+#, fuzzy
+msgid "Smart retrieve"
+msgstr "Empfangsmethode"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+#, fuzzy
+msgid "Smart retrieve settings"
+msgstr "Einstellungen"
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr "Untätigkeit festgestellt"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.h:64
+msgid "Export DICOM"
+msgstr "DICOM exportieren"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr "Zuweisender Arzt"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+#, fuzzy
+msgid "Ginkgo CADx private tags"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ..\../main/gui/history3/historypanel3.cpp:340
+#: ..\../main/gui/history3/historytoolmenu.cpp:158
+msgid "Export"
+msgstr "Exportieren"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ..\../main/gui/export/parametrosprincipales.cpp:157
+msgid "Select the directory where the files will be stored"
+msgstr ""
+"Wählen Sie das Verzeichnis, in welches die Dateien gespeichert werden sollen"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+"Der gewählte Ordner existiert nicht.\n"
+"Möchten Sie einen erstellen?"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr "Angegebener Pfad enthält andere DICOM-Verzeichnisse"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+"Ginkgo CADx hat ein Standard-DICOM-Verzeichnis gefunden, das mit einer alten "
+"Version\n"
+"von Ginkgo CADx (BBDD v.%d) erstellt wurde. Wie möchten Sie vorgehen?"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+"Das DICOM-Verzeichnis wurde mit einer neueren Version von Ginkgo CADx (BBDD "
+"v.%d)\n"
+"erstellt. Die aktuelle Version ist nicht in der Lage, das Verzeichnis zu "
+"öffnen."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+msgid "Select the DICOM Dir folder"
+msgstr "Wählen Sie das DICOM-Verzeichnis aus"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+msgid "DICOM Dir migration"
+msgstr "DICOM-Verzeichnismigration"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+msgid "Migrate existing (recommended)"
+msgstr "Existierende migrieren (empfohlen)"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+"Bestehendes DICOM-Verzeichnis migrieren, bestehende Dateien werden zum neuen "
+"DICOM-Verzeichnis hinzugefügt. Schließen Sie Ginkgo CADx nicht, bis die "
+"Migration abgeschlossen ist."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr ""
+"Altes DICOM-Verzeichnis nach der Migration entfernen (wird in *_old "
+"umbenannt)"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+msgid "Continue..."
+msgstr "Fortsetzen …"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+msgid "Select other"
+msgstr "Anderen wählen"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+"Wählen Sie einen anderen Pfad, wenn der Pfad kein Ginkgo CADx-DICOM-"
+"Verzeichnis enthält, wobei dann ein neues angelegt wird. Ansonsten wird das "
+"bestehende DICOM-Verzeichnis verwendet."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+msgid "Browse..."
+msgstr "Auswählen …"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:106
+msgid "DICOM Export"
+msgstr "DICOM-Export"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:110
+msgid "Select the format and the images you want to export"
+msgstr "Wählen Sie das Format und die Bilder, die Sie exportieren wollen"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:143
+#, fuzzy
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr "PEM-Dateien (*.pem;*.key)|*.pem;*.key|Alle Dateien (*.*)|*.*"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:150
+#, fuzzy
+msgid "Select file"
+msgstr "Wählen Sie eine gülltige DICOMDIR-Datei"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "DICOM (native format)"
+msgstr "DICOM (Nativformat)"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "Image (jpg, bmp, png)"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:38
+#, fuzzy
+msgid "Export all files of opened tab"
+msgstr "Exportiere Datei %d von %d"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:55
+msgid "JPEG"
+msgstr "JPEG"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr "Qualität"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:40
+msgid "Image Export Wizard"
+msgstr "Bildexportassistent"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ..\../main/gui/license/aboutdialogbase.cpp:67
+#: ..\../main/gui/license/aboutdialogbase.cpp:151
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:54
+msgid "&Accept"
+msgstr "A&kzeptieren"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr "&Weiter >"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+msgid "Open link"
+msgstr "Verweis öffnen"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+msgid "File link:"
+msgstr "Dateiverweis:"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ..\../main/gui/import/pasosimportacionbase.cpp:270
+msgid "Study"
+msgstr "Studie"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+msgid "User name"
+msgstr "Benutzername"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+msgid "Ginkgo Cloud link"
+msgstr "Ginkgo Cloud-Verweis"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+"Sie können den Verweis kopieren und in E-Mails sowie Webseiten einfügen – "
+"zum Herunterladen und Visualisieren muss Ginkgo CADx installiert sein."
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr "Verweis per E-Mail senden"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+msgid "Copy to clipboard"
+msgstr "In Zwischenablage kopieren"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "New Ginkgo Cloud study"
+msgstr "Neue Ginkgo Cloud-Studie"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "To download the study, paste this url "
+msgstr "Um die Studie herunterladen zu können, fügen Sie diesen URL "
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+"in das »Open Ginkgo Cloud-Verweis«-Werkzeug im Ginkgo CADx-Verlauf ein oder "
+"in die Adresszeile Ihres Webbrowsers."
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+msgid "Creator"
+msgstr "Ersteller"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+#, fuzzy
+msgid "Last Modificator"
+msgstr "Letzten 7 Tage"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+msgid "Show link..."
+msgstr "Verweis anzeigen …"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr "?"
+
+#: ..\../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+msgid "Invalid link"
+msgstr "Ungültiger Verweis"
+
+#: ..\../main/gui/history3/historypanel3.cpp:117
+#: ..\../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr "Serie öffnen"
+
+#: ..\../main/gui/history3/historypanel3.cpp:119
+#: ..\../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr "Serie öffnen mit ..."
+
+#: ..\../main/gui/history3/historypanel3.cpp:226
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr "Alter"
+
+#: ..\../main/gui/history3/historypanel3.cpp:228
+#, fuzzy
+msgid "Date acquired"
+msgstr "Datum"
+
+#: ..\../main/gui/history3/historypanel3.cpp:230
+#, fuzzy
+msgid "Date added"
+msgstr "Datum"
+
+#: ..\../main/gui/history3/historypanel3.cpp:308
+#: ..\../main/gui/history3/historytoolmenu.cpp:82
+#: ..\../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr "Akquiriere"
+
+#: ..\../main/gui/history3/historypanel3.cpp:316
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize"
+msgstr "Dicomisieren"
+
+#: ..\../main/gui/history3/historypanel3.cpp:363
+msgid "All patients"
+msgstr "Alle Patienten"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+msgid "Results"
+msgstr "Ergebnisse"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, c-format
+msgid " (%d images)"
+msgstr " (%d Bilder)"
+
+#: ..\../main/gui/history3/historypanel3.cpp:634
+msgid "Open study with .."
+msgstr "Studie öffnen mit …"
+
+#: ..\../main/gui/history3/historypanel3.cpp:663
+#: ..\../main/gui/history3/historypanel3base.cpp:482
+msgid "Synchronize"
+msgstr "Abgleichen"
+
+#: ..\../main/gui/history3/historypanel3.cpp:677
+msgid "&Delete from history"
+msgstr "Aus dem Verlauf &Löschen"
+
+#: ..\../main/gui/history3/historypanel3.cpp:686
+msgid "&Clear history"
+msgstr "&Verlauf leeren"
+
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr ""
+"Sie haben die max. Anzahl offener Reiter erreicht, bitte einige Reiter "
+"schließen und erneut versuchen"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid "Unable to open modality "
+msgstr "Modalität kann nicht geöffnet werden: "
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr " mit Transfersyntax "
+
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+"Fehler beim Laden der Studie, überprüfen Sie die Einstellungen zum Hanging-"
+"Protokoll"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr ""
+"Konnte den Verlauf nicht leeren. Sie müssen geöffnete Studien schließen"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1086
+msgid "all files"
+msgstr "Alle Dateien"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+msgid "Select at least one series"
+msgstr "Wählen Sie mindestens eine Serie aus"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr "Sie können die geöffnete Serie nicht entfernen"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "those series"
+msgstr "jene Serien"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "this series"
+msgstr "diese Serie"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:57
+msgid "Advanced search"
+msgstr "Erweiterte Suche"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:73
+msgid "Acquisition date"
+msgstr "Akquirierungsdatum"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:302
+#: ..\../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr "Löschen bestätigen"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr "Sind Sie sicher, dass sie löschen möchten "
+
+#: ..\../main/gui/history3/historypanel3base.cpp:336
+#: ..\../main/gui/history3/historytoolmenu.cpp:102
+#: ..\../main/gui/history3/historytoolmenu.cpp:200
+#: ..\../main/gui/history3/historytoolmenu.cpp:229
+msgid "Remove"
+msgstr "Entfernen"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr ""
+"Wählen Sie die Ansicht, die sie zum Öffnen von Dateien verwenden wollen"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr "Immer diese Ansicht zum Öffnen der Dateien verwenden"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:454
+#: ..\../main/gui/history3/historypanel3base.h:187
+msgid "Synchronize files"
+msgstr "Dateien abgleichen"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+"Bevor diese Aktion ausgeführt werden kann, müssen Dateien zur lokalen "
+"Datenbank\n"
+"heruntergeladen werden. Möchten Sie die Dateien jetzt abgleichen?"
+
+#: ..\../main/gui/history3/historytablemodel.cpp:406
+#: ..\../main/gui/history3/historytablemodel.cpp:418
+#: ..\../main/gui/history3/historytablemodel.cpp:473
+#: ..\../main/gui/history3/historytablemodel.cpp:485
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:105
+msgid "00/00/0000 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:138
+msgid "Close history"
+msgstr "Verlauf schließen"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:139
+#: ..\../main/gui/startup/startupform.cpp:53
+msgid "History"
+msgstr "Verlauf"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:201
+#: ..\../main/gui/history3/historytoolmenu.cpp:230
+msgid "Clear history"
+msgstr "Verlauf leeren"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:232
+msgid "Select all"
+msgstr "Alle auswählen"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:233
+msgid "Deselect all"
+msgstr "Auswahl aufheben"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+msgid "Destination"
+msgstr "Ziel"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+msgid "Status"
+msgstr "Status"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+msgid "Error message"
+msgstr "Fehlermeldung"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+msgid "Show Message"
+msgstr "Nachricht zeigen"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+msgid "Edit Message"
+msgstr "Nachricht bearbeiten"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+msgid "Delete message"
+msgstr "Nachricht löschen"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+msgid "Error editing message"
+msgstr "Fehler beim Ändern der Nachricht"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+msgid "Error purguing messages"
+msgstr "Fehler beim Löschen von Nachrichten"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Stop"
+msgstr "Stopp"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Sent"
+msgstr "Gesendet"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr "Ausstehend"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/progress/statusbarprogreso.cpp:281
+msgid "Warning"
+msgstr "Warnung"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+msgid "Error getting message"
+msgstr "Fehler beim Erhalt der Nachricht"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+msgid "Running"
+msgstr "Wird ausgeführt"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr "Der Übermittlungsvorgang hat begonnen und bereit zum Senden"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr "Abgebrochen"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+msgid "Usually due to an error in sending a message"
+msgstr "Üblicherweise aufgrund eines Fehlers beim Senden einer Nachricht"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Start"
+msgstr "Start"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr "Möchten Sie diese Meldungen entfernen?"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+msgid "Error deleting messages"
+msgstr "Fehler beim Löschen von Nachrichten"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+msgid "Remove sent messages"
+msgstr "Gesendete Nachrichten entfernen"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+msgid "Exit"
+msgstr "Schließen"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+msgid "Messages"
+msgstr "Nachrichten"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+msgid "Refresh"
+msgstr "Auffrischen"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1394
+msgid "View"
+msgstr "Anzeigen"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+msgid "Send task status:"
+msgstr "Sende Aufgaben-Status:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr "Aktiviert"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+msgid "Message"
+msgstr "Nachricht"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr "Datum:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+msgid "Destination:"
+msgstr "Ziel:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+msgid "Status:"
+msgstr "Status:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+msgid "Message content:"
+msgstr "Nachrichteninhalt:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:142
+msgid "OK"
+msgstr "OK"
+
+#: ..\../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr "Übersichtsdaten der DICOM-Dateien"
+
+#: ..\../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr "DICOM-Daten aus den zu erstellenden Dateien können verteilt werden"
+
+#: ..\../main/gui/import/generaldata.cpp:210
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+"\n"
+"* Die Patienten-ID ist erforderlich."
+
+#: ..\../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+"\n"
+"* Patientenname und Nachname dürfen zusammen nicht mehr als 61 Zeichen lang "
+"sein."
+
+#: ..\../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+"\n"
+"* Das Format der eingegebenen Größe (in Zentimetern) ist nicht korrekt. "
+
+#: ..\../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+"\n"
+"* Das Geburtsdatum des Patienten liegt zeitlich hinter dem Datum der Studie."
+
+#: ..\../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+"\n"
+"* Das Format des eingegebenen Gewichts ist nicht korrekt. Gültige Werte sind "
+"0 bis 400 Kg."
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr "Folgende Fehler sind beim Prüfen der Felder aufgetreten"
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "Error validating fields"
+msgstr "Fehler beim Prüfen der Felder"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:148
+msgid "Selecting Import Profile"
+msgstr "Auswahl des Importprofils"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:152
+msgid "You must select the profile you want to use import"
+msgstr "Sie müssen das Profil auswählen, das Sie für dem Import nutzen möchten"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+msgid "You must select the import profile"
+msgstr "Sie müssen das Import-Profil auswählen"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr "Unerwarteter Fehler – wählen Sie das Modul erneut aus"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:21
+msgid "Selected images"
+msgstr "Gewählte Bilder"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:56
+msgid "Preview"
+msgstr "Vorschau"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:62
+msgid "Remove all"
+msgstr "Alle entfernen"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:113
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:65
+msgid "Demographic data"
+msgstr "Demographische Daten"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr "Identifikator *"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr "(ID oder Anamnese-Nr.)"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:159
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "Birth date"
+msgstr "Geburtsdatum"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr "Nachname"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr "Geschlecht"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr "Männlich"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr "Weiblich"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr "Anderes"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:217
+msgid "Study Details"
+msgstr "Details zur Studie"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:234
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:122
+msgid "Weight"
+msgstr "Gewicht"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:245
+msgid "Kg"
+msgstr "Kg"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:252
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:119
+msgid "Height"
+msgstr "Größe"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr "cm"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:291
+#: ..\../main/gui/import/pasosimportacionbase.cpp:333
+msgid "Time"
+msgstr "Uhrzeit"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr "Der Pfad zu diesem Ort existiert nicht"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+"Bilder (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG-Bilder (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP-Bilder (*."
+"bmp)|*.bmp|PNG-Bilder (*.png)|*.png|TIFF-Bilder (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF-Dokumente (*.pdf)|*.pdf|Alle Dateien (*.*)|*.*"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+"Bilder (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG-"
+"Bilder (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP-Bilder (*.bmp)|*.bmp;"
+"*BMP|PNG-Bilder (*.png)|*.png;*PNG|TIFF-Bilder (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF-Dokumente (*.pdf;*.PDF)|*.PDF;*.pdf|Alle Dateien (*.*)|*.*"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files..."
+msgstr "Dateien auswählen …"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr "Dateien vom Dateisystem auswählen"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste"
+msgstr "Einfügen"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste from clipboard"
+msgstr "Aus der Zwischenablage einfügen"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr "Zurück"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr "Diese Datei von der Festplatte wirklich löschen?"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:330
+msgid "Delete selected items"
+msgstr "Ausgewählte Einträge löschen"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+msgid "You must select an image"
+msgstr "Sie müssen ein Bild auswählen"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:346
+msgid "Generating preview..."
+msgstr "Vorschau wird erstellt …"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:500
+msgid "Select images"
+msgstr "Bilder auswählen"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr "Vorschaubilder werden erstellt …"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:715
+msgid "Image selection"
+msgstr "Bildauswahl"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr "Sie müssen die Bilder auswählen, die Sie importieren möchten"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr "Sie müssen zumindest ein Bild auswählen"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:760
+msgid "The file"
+msgstr "Die Datei"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr " existiert nicht"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:52
+msgid "Image Import Wizard"
+msgstr "Bildimportassistent"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr "Angefordertes Modul unterstützt keine Imports"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr "Es ist kein Modul mit Importunterstützung registriert"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr "Es ist kein Modul mit Importunterstützung vorhanden"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr "Das gewünschte Modul ist nicht registriert"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr "Das angeforderte Modul ist nicht registriert"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:167
+msgid "free of"
+msgstr "frei von"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:181
+msgid "in dicomization dir."
+msgstr "im Dicomisierungs-Ordner."
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr "Sind Sie sicher, dass Sie den Importvorgang abbrechen möchten?"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, c-format
+msgid "Step %d of %d: "
+msgstr "Schritt %d von %d: "
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr "&Ende"
+
+#: ..\../main/gui/license/aboutdialog.cpp:25
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About"
+msgstr "Info"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:22
+msgid "Ginkgo CADx"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr "Mitwirkende"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:55
+msgid "Licenses"
+msgstr "Lizenzen"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:58
+#, fuzzy
+msgid "UPDATE_INFO"
+msgstr "Information"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:108
+#: ..\../main/gui/license/aboutdialogbase.h:88
+msgid "Open Source Licenses"
+msgstr "Open SOurce Lizenzen"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr "Cairo"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr "DCMTK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:119
+msgid "FamFamFam Icons"
+msgstr "FamFamFam-Symbole"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:120
+msgid "Fugue Icons"
+msgstr "Fugue-Icons"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr "IK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr "LibJpeg"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr "LibPng"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr "OpenSSL"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr "VTK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:126
+msgid "WxWidgets"
+msgstr "WxWidgets"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:127
+msgid "Zlib"
+msgstr "Zlib"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr "SQL Lite"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr "CharLS"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:130
+msgid "Dark Glass Icons"
+msgstr "»Dark Glass«-Symbole"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr "Libcurl"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr "JsonCpp"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ..\../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr "Lizenzvereinbarung"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+"Wenn Sie die Lizenzvereinbarung anerkennen, drücken Sie \"Ich akzeptiere die "
+"Lizenz\" um fortzufahren. Sie müssen die Lizenz akzeptierenm um mit Ginkgo "
+"CADx nutzen zu können."
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:53
+msgid "Check for updates automatically"
+msgstr "Suche automatisch nach Updates"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:66
+msgid "I Accept the license"
+msgstr "Ich akzeptiere die Lizenz"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr "Ich akzeptiere die Lizenz nicht"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Save logs"
+msgstr "Logs speichern"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr "Log-Datei (*.log) | *.log | Text file (*.txt) | *.txt"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+msgid "File couldn't be stored "
+msgstr "Datei konnte nicht gespeichert werden "
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+msgid "Could not write to file"
+msgstr "Konnte nicht in die Datei schreiben"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+msgid "Save log..."
+msgstr "Log speichern..."
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+msgid "Clear log"
+msgstr "Protokoll leeren"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+msgid "Log"
+msgstr "Log"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr "Liste leeren"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr "Protokolltext"
+
+#: ..\../main/gui/login/dialogologin.cpp:50
+msgid "The username or password is incorrect"
+msgstr "Benutzername oder Passwort sind nicht korrekt"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:250
+msgid "Tasks"
+msgstr "Aufgaben"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1139
+msgid "Included in the history ..."
+msgstr "Im Verlauf enthalten …"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr ""
+"In der aktuellen Konfiguration ist keine URL zum Prüfen auf Aktualisierungen "
+"angegeben."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "Check update error"
+msgstr "Überprüfen Updatefehler"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr ""
+"Semantischer/syntaktischer Fehler bei der Auswertung des Integrations-URL "
+"(siehe Protokoll für Details):\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+msgid "Malformed XML"
+msgstr "Kaputtes XML"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1192
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr "Fehler beim Verarbeiten der Befehlszeilenparameter. ("
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr ""
+"Semantischer/syntaktischer Fehler beim Lesen des Integrations-XML (siehe "
+"Fehlerlog für Details):\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+msgid "Error parsing integration XML:\n"
+msgstr "Fehler beim Parsen des Integrations-XML:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+msgid "PACS error:\n"
+msgstr "PACS-Fehler:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+msgid "Error executing WorkFlow\n"
+msgstr "Fehler beim Ausführen des Arbeitsablaufs\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+"Fehler beim Abarbeiten des Arbeitsablaufs\n"
+"Internes Problem"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+msgid "Close current view"
+msgstr "Schließe aktuelle Ansicht"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all"
+msgstr "Alle schließen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all views"
+msgstr "Schließe alle Ansichten"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr "&Beenden"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "Exit application"
+msgstr "Anwendung beenden"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr "Vollbild"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Show full screen"
+msgstr "Vollbild anzeigen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1302
+#, fuzzy
+msgid "Tab grouping"
+msgstr "Reiterumgruppierung"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1329
+msgid "Ginkgo CADx manual ..."
+msgstr "Ginkgo CADx-Handbuch …"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1330
+#, fuzzy
+msgid "Open test card"
+msgstr "Verbindung testen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr "Nach Aktualisierungen suchen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for newest versions"
+msgstr "Prüfe auf neueste Version"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1332
+msgid "Need support ..."
+msgstr "Unterstützung benötigt ..."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About "
+msgstr "Info zu "
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+#, fuzzy
+msgid "HL7 monitor"
+msgstr "Protokollbetrachter"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+msgid "HL7 message control"
+msgstr "HL7-Nachrichtensteuerung"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+msgid "Log monitor"
+msgstr "Protokollbetrachter"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+msgid "Log monitored"
+msgstr "Überwachtes Protokoll"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1390
+msgid "&File"
+msgstr "&Datei"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr "&Bearbeiten"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr "&Hilfe"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr "Fehler beim Laden des Verlaufs, Ginkgo CADx wird geschlossen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr "Mosaik"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr "Möchten Sie die Änderungen in der Studie speichern:"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1664
+msgid "Unsaved data"
+msgstr "Ungespeicherte Daten"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr ""
+"Es traten während des Speicherns der Serie Fehler auf.\n"
+"Wollen Sie mit dem Schließen fortfahren? "
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid "Error saving"
+msgstr "Fehler beim Speichern"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "Full Screen"
+msgstr "Vollbild"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "View Full Screen"
+msgstr "Als Vollbild anzeigen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1708
+msgid "Tab Regroup"
+msgstr "Reiterumgruppierung"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr "&Schließen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "&Close all"
+msgstr "&Alle schließen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "Close all windows"
+msgstr "Schließe alle Fenster"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1728
+#, fuzzy
+msgid "Tabbed organization"
+msgstr "Rasteranordnung"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr "Im Moment gibt es keine neuesten »Ginkgo CADx«-Versionen."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "Ginkgo CADx updated"
+msgstr "Ginkgo CADx erneuert"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1782
+msgid "New version available ("
+msgstr "Neue Version verfügbar ("
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr "Interner Fehler bei Authentifikation"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+msgid "New Update"
+msgstr "Neues Update"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+msgid "New version available"
+msgstr "Neue Version verfügbar"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr "Nicht erneut wegen des Updates warnen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+msgid "X"
+msgstr "X"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+msgid "Close this notification"
+msgstr "Schließe diese Nachricht"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+msgid "The following commands will be aborted if you close the application"
+msgstr "Folgende Befehle werden abgebrochen, wenn Sie die Anwendung schließen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+msgid "Close Ginkgo CADx"
+msgstr "»Ginkgo CADx« schließen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr "Scließt das Programm und bricht alle ausstehenden Kommandos ab"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr "Schließen Sie das Programm nicht und lassen Sie Kommandos laufen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:138
+msgid "User login"
+msgstr "Benutzername"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+msgid "System authentication"
+msgstr "System-Legitimierung"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+msgid "Login"
+msgstr "Login"
+
+#: ..\../main/gui/open/abrir.cpp:80 ..\../main/gui/open/abrir.cpp:82
+msgid "Open..."
+msgstr "Öffnen..."
+
+#: ..\../main/gui/open/opendialogs.cpp:58
+#, fuzzy
+msgid "There was an error reading DICOMDIR file"
+msgstr "Wählen Sie eine gülltige DICOMDIR-Datei"
+
+#: ..\../main/gui/open/opendialogs.cpp:62
+msgid "Select a valid DICOMDIR file"
+msgstr "Wählen Sie eine gülltige DICOMDIR-Datei"
+
+#: ..\../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr "Wählen Sie die DICOMDIR-Datei, die Sie einlesen wollen"
+
+#: ..\../main/gui/open/opendialogs.cpp:180
+#: ..\../main/gui/open/opendialogsbase.cpp:170
+#: ..\../main/gui/open/opendialogsbase.h:112
+msgid "Copy or link"
+msgstr "Kopieren oder verknüpfen"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:22
+#: ..\../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr "Akquiriere aus einem DICOM Verzeichnis"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:94
+#: ..\../main/gui/open/opendialogsbase.h:85
+msgid "Select drive"
+msgstr "Laufwerk auswählen"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:175
+msgid "Do you want to copy or link files?"
+msgstr "Möchten Sie Dateien kopieren oder verknüpfen?"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ..\../main/gui/selectpacsserver/selectpacsserver.cpp:30
+msgid "There aren't any PACS configured"
+msgstr "Es sind keine PACS konfiguriert"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:69
+#, fuzzy
+msgid "0000/00/00 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.h:57
+msgid "Upload study"
+msgstr "Studie hochladen"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+msgid "Select PACS server"
+msgstr "PACS-Server auswählen"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:119
+msgid "Metadata"
+msgstr "Meta-Daten"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:120
+#, fuzzy
+msgid "Identification information"
+msgstr "Patienteninformationen"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:121
+msgid "Patient information"
+msgstr "Patienteninformationen"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:122
+msgid "Acquisition information"
+msgstr "Akquirierungsinformationen"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:123
+msgid "Relationship information"
+msgstr "Beziehungsinformationen"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:124
+#, fuzzy
+msgid "Image presentation information"
+msgstr "Bild ohne Maßstab"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:125 ..\../widgets/wtextbox.cpp:525
+msgid "Text"
+msgstr "Text"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:126
+msgid "Other"
+msgstr "Andere"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:137
+#: ..\../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr "Daten"
+
+#: ..\../main/gui/previewpanel/previewpanel.cpp:47
+msgid "Hide"
+msgstr "Ausblenden"
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:207
+msgid "Previews"
+msgstr "Vorschaubilder"
+
+#: ..\../main/gui/progress/progresobase.cpp:23
+msgid "There is no running tasks"
+msgstr "Es sind keine laufenden Aufgaben vorhanden"
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:165
+msgid "0 running tasks."
+msgstr "0 laufende Prozesse."
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:192
+#, c-format
+msgid "There are %d pending tasks"
+msgstr "Es sind %d ausstehende Aufgaben vorhanden"
+
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.h:55
+msgid "Select PACS"
+msgstr "PACS auswählen"
+
+#: ..\../main/gui/startup/startupformbase.cpp:29
+msgid "http://ginkgo-cadx.com"
+msgstr "http://ginkgo-cadx.com"
+
+#: ..\../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr ""
+"Für diagnostische Zwecke keine geeigneten verfügbar. Erwägen Sie eine "
+"Aktualisierung auf"
+
+#: ..\../main/gui/startup/startupformbase.cpp:47
+msgid "Ginkgo CADx Pro"
+msgstr "Ginkgo CADx Pro"
+
+#: ..\../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+"Vergessen Sie nicht, dass Sie zum Entwicklungsfortschritt beitragen, wenn "
+"Sie Ginkgo CADx Pro kaufen."
+
+#: ..\../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr "Angetrieben von"
+
+#: ..\../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr "MetaEmotion Healthcare"
+
+#: ..\../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr "Startseite"
+
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete Widget"
+msgstr "Oberflächenelement löschen"
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Properties ..."
+msgstr "Eigenschafte ..."
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+#, fuzzy
+msgid "Widget Properties"
+msgstr "Eigenschaften..."
+
+#: ..\../main/tools/addfiletohistorytool.cpp:114
+msgid "Open file"
+msgstr "Datei öffnen"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:115
+#: ..\../main/tools/openfoldertool.cpp:27
+msgid "Open folder"
+msgstr "Ordner öffnen"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:116
+#: ..\../main/tools/openremovabletool.cpp:28
+msgid "Open removable unit"
+msgstr "Wechseldatenträger öffnen"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:117
+#: ..\../main/tools/openginkgocloudlinktool.cpp:27
+msgid "Open Ginkgo Cloud link"
+msgstr "Ginkgo Cloud-Verweis öffnen"
+
+#: ..\../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr "Normaler Winkel (3-Punkt)"
+
+#: ..\../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr "Cobb-Winkel"
+
+#: ..\../main/tools/colormaptool.cpp:110
+msgid "Invert color map"
+msgstr "Farbpalette umkehren"
+
+#: ..\../main/tools/cornerannotationstool.cpp:44
+msgid "Hide corner annotations"
+msgstr "Eck-Notizen ausblenden"
+
+#: ..\../main/tools/cornerannotationstool.cpp:46
+msgid "Show corner annotations"
+msgstr "Ecknotizen zeigen"
+
+#: ..\../main/tools/detachwindowtool.cpp:42
+msgid "Attach View"
+msgstr "Ansicht andocken"
+
+#: ..\../main/tools/detachwindowtool.cpp:44
+msgid "Detach view"
+msgstr "Ansicht abtrennen"
+
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize files"
+msgstr "Dateien dicomisieren"
+
+#: ..\../main/tools/exportdicomdirtool.cpp:32
+msgid "Export to DICOM Dir"
+msgstr "In DICOM-Verzeichnis exportieren"
+
+#: ..\../main/tools/markertool.cpp:171
+msgid "Point"
+msgstr "Punkt"
+
+#: ..\../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr "Pfeil"
+
+#: ..\../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr "Ellipse"
+
+#: ..\../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr "Trapezoid"
+
+#: ..\../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr "Polygon"
+
+#: ..\../main/tools/markertool.cpp:176
+#, fuzzy
+msgid "Free form"
+msgstr "frei von"
+
+#: ..\../main/tools/metricgridtool.cpp:57
+msgid "Grid"
+msgstr "Gitter"
+
+#: ..\../main/tools/metricgridtool.cpp:67
+msgid "Grid Scale"
+msgstr "Gittermaßstab"
+
+#: ..\../main/tools/metricgridtool.cpp:74
+msgid "Scale X"
+msgstr "X-Skalierung"
+
+#: ..\../main/tools/metricgridtool.cpp:78
+msgid "X axis scale"
+msgstr "Skalierung X-Achse"
+
+#: ..\../main/tools/metricgridtool.cpp:87
+msgid "Scale Y"
+msgstr "Y-Skalierung"
+
+#: ..\../main/tools/metricgridtool.cpp:91
+msgid "Y axis scale"
+msgstr "Skalierung Y-Achse"
+
+#: ..\../main/tools/metricgridtool.cpp:206
+msgid "Show grid"
+msgstr "Gitter anzeigen"
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr "Gitter konfigurieren ..."
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr "Gitter konfigurieren"
+
+#: ..\../main/tools/metricgridtool.cpp:250
+msgid "Hide Grid"
+msgstr "Gitter ausblenden"
+
+#: ..\../main/tools/metricgridtool.cpp:252
+msgid "Show Grid"
+msgstr "Gitter anzeigen"
+
+#: ..\../main/tools/openfiletool.cpp:28
+msgid "Open File"
+msgstr "Datei öffnen"
+
+#: ..\../main/tools/pacsuploadtool.cpp:54
+msgid "Send to PACS..."
+msgstr "Zum PACS senden …"
+
+#: ..\../main/tools/pixelsbluringtool.cpp:59
+msgid "Unset pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:61
+#, fuzzy
+msgid "Set pixels blurring"
+msgstr "Nach Benutzer festlegen"
+
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+msgid "PACS Q/R"
+msgstr ""
+
+#: ..\../main/tools/queryretrievetool.cpp:94
+#: ..\../main/tools/searchginkgocloudhistorytool.cpp:28
+msgid "Search Ginkgo Cloud"
+msgstr "In der Ginkgo Cloud suchen"
+
+#: ..\../main/tools/rotateandfliptool.cpp:151
+msgid "Undo rotate and flip"
+msgstr "Drehen und Spiegeln rückgängig machen"
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr "Drehen um 90°"
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr "Gegen den Uhrzeigersinn"
+
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr "Im Uhrzeigersinn"
+
+#: ..\../main/tools/rotateandfliptool.cpp:156
+msgid "Flip horizontal"
+msgstr "Horizontal spiegeln"
+
+#: ..\../main/tools/rotateandfliptool.cpp:157
+msgid "Flip vertical"
+msgstr "Vertikal spiegeln"
+
+#: ..\../main/tools/sendpacstool.cpp:34
+msgid "Send to PACS"
+msgstr "Zum PACS senden"
+
+#: ..\../main/tools/sendpacstool.cpp:70
+msgid "Sending to PACS..."
+msgstr "Es wird zum PACS gesendet …"
+
+#: ..\../main/tools/showtagstool.cpp:42
+msgid "Hide DICOM inspector"
+msgstr "DICOM-Inspektor ausblenden"
+
+#: ..\../main/tools/showtagstool.cpp:44
+msgid "Show DICOM inspector"
+msgstr "DICOM-Inspektor anzeigen"
+
+#: ..\../main/tools/simpleprinttool.cpp:119
+#, fuzzy
+msgid "Image printing"
+msgstr "Bild exportieren …"
+
+#: ..\../main/tools/simpleprinttool.cpp:224
+#, fuzzy
+msgid "Page setup"
+msgstr "Einrichten …"
+
+#: ..\../main/tools/simpleprinttool.cpp:225
+#, fuzzy
+msgid "Print preview"
+msgstr "Drucken"
+
+#: ..\../main/tools/simpleprinttool.cpp:272
+#, fuzzy
+msgid "Print image"
+msgstr "Drucken"
+
+#: ..\../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr "Automatische Berechnung"
+
+#: ..\../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr "Größe auf Bildschirmauflösung skalieren"
+
+#: ..\../main/tools/undotool.cpp:110
+msgid "Redo"
+msgstr "Erneut"
+
+#: ..\../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr "Endlosschleife deaktivieren"
+
+#: ..\../main/tools/videotool.cpp:153
+msgid "Enable loop"
+msgstr "Endlosschleife aktivieren"
+
+#: ..\../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr "%.1f Bilder/Sek"
+
+#: ..\../main/tools/windowlayouttool.cpp:267
+msgid "Add column"
+msgstr "Spalte hinzufügen"
+
+#: ..\../main/tools/windowlayouttool.cpp:268
+msgid "Add row"
+msgstr "Zeile hinzufügen"
+
+#: ..\../main/tools/windowlayouttool.cpp:270
+msgid "Remove column"
+msgstr "Spalte entfernen"
+
+#: ..\../main/tools/windowlayouttool.cpp:271
+msgid "Remove row"
+msgstr "Zeile entfernen"
+
+#: ..\../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr "1x1 Ansicht"
+
+#: ..\../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr "1x2 Ansicht"
+
+#: ..\../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr "2x1 Ansicht"
+
+#: ..\../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr "2x2 Ansicht"
+
+#: ..\../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr "3x3 Ansicht"
+
+#: ..\../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr "4x4 Ansicht"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr "Werkzeugmodul nach Verwerfen der ToolsRegistry immer noch registriert"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:82
+msgid "The tool is already registered"
+msgstr "Das Werkzeug ist bereits registriert"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:187
+msgid "The module "
+msgstr "Das Modul "
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:49
+msgid "Unable to load PNG bitmap resource"
+msgstr "PNG-Bitmap-Ressource konnte nicht geladen werden"
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:56
+msgid "Unable to load PNG image resource"
+msgstr "PNG-Bild-Ressource konnte nicht geladen werden"
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:63
+msgid "Unable to load GIF animation resource"
+msgstr "GIF-Animation-Ressource konnte nicht geladen werden"
+
+#: ..\../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr "Der Kalibrationswert muß eine Dezimalzahl sein"
+
+#: ..\../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr "Kalibrierungswert ist zu niedrig"
+
+#: ..\../widgets/gui/calibracion.cpp:219
+msgid "Enter the calibration value"
+msgstr "Geben Sie den Kalibrierungswert ein"
+
+#: ..\../widgets/gui/calibracion.cpp:225
+msgid "The calibration value is too low"
+msgstr "Der Kalibrationswert ist zu niedrig"
+
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "The calibration value is too high"
+msgstr "Der Kalibrationswert ist zu hoch"
+
+#: ..\../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr "Kalibriere..."
+
+#: ..\../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr "Abstand"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr "Micron"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr "Millimeter"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr "Zentimeter"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr "Meter"
+
+#: ..\../widgets/gui/selecciontextobase.cpp:26
+msgid "Note"
+msgstr "Anmerkung"
+
+#: ..\../widgets/wangulo.cpp:1101 ..\../widgets/wangulo.cpp:1103
+msgid "Type"
+msgstr "Art"
+
+#: ..\../widgets/wangulo.cpp:1101
+msgid "Normal"
+msgstr "Normal"
+
+#: ..\../widgets/wangulo.cpp:1103
+msgid "Cobb"
+msgstr "Cobb"
+
+#: ..\../widgets/welipse.cpp:721 ..\../widgets/wfreeform.cpp:470
+#: ..\../widgets/wpolygon.cpp:574
+#, fuzzy
+msgid "Center (I)"
+msgstr "Vertex (I)"
+
+#: ..\../widgets/welipse.cpp:727 ..\../widgets/wfreeform.cpp:476
+#: ..\../widgets/wpolygon.cpp:580
+#, fuzzy
+msgid "Center (M)"
+msgstr "Vertex (M)"
+
+#: ..\../widgets/welipse.cpp:762 ..\../widgets/welipse.cpp:766
+msgid "Greater Radius"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:763 ..\../widgets/welipse.cpp:767
+msgid "Lower Radius"
+msgstr ""
+
+#: ..\../widgets/wfreeform.cpp:482 ..\../widgets/wpolygon.cpp:586
+#, fuzzy
+msgid "Number of Vertex"
+msgstr "Vertex (I)"
+
+#: ..\../widgets/wpunto.cpp:353
+msgid "Position (I)"
+msgstr "Position (I)"
+
+#: ..\../widgets/wpunto.cpp:358
+msgid "Position (M)"
+msgstr "Position (M)"
+
+#: ..\../widgets/wrule.cpp:558
+msgid "Image Calibration"
+msgstr "Bildkalibrierung"
+
+#: ..\../widgets/wrule.cpp:663
+msgid "Length"
+msgstr "Länge"
+
+#: ..\../widgets/wrule.cpp:668
+msgid "Points (I)"
+msgstr "Punkte (I)"
+
+#: ..\../widgets/wrule.cpp:675
+msgid "Points (M)"
+msgstr "Punkte (M)"
+
+#: ..\../widgets/wtextbox.cpp:445
+msgid "Default text"
+msgstr "Standardtext"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:41
+msgid "Commit date"
+msgstr "Einreichdatum"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr "<unbekannte ID>"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr "%d.%m.%Y"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:214
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr "Eingereicht"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:219
+msgid "Modified"
+msgstr "Geändert"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr "Nicht übertragen"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr "644654645"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:130
+msgid "Commit inform"
+msgstr "Einreichkommentar"
+
+#: ..\../wx/propiedades/wxpropiedades.cpp:30
+msgid "Properties of "
+msgstr "Eigenschaften von "
+
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:31
+#, fuzzy
+msgid "Widget's Name"
+msgstr "Oberflächenelement löschen"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr "< Vo&riger"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr "&Abbrechen"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3701
+msgid "Regular expression invalid: '"
+msgstr "Regulärer Ausdruck ungültig: '"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr ""
+"REGEXP wurde mit der falschen Anzahl Argumenten aufgerufen: %d anstatt 2."
+
+#: ..\../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+"Logischer Fehler: Die Studie ist keinem existierenden Patienten im Modell "
+"zugeordnet"
+
+#: ..\../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+"Logischer Fehler: Die Serie ist keiner existierenden Studie im Modell "
+"zugeordnet"
+
+#: ..\../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+"Logischer Fehler: Das Bild ist keiner existierenden Serie im Modell "
+"zugeordnet"
+
+#: ..\../commands/dialogopathssobreescribirbase.h:56
+#, fuzzy
+msgid "Overwrite Paths"
+msgstr "Überschreiben"
+
+#: ..\../ginkgopro/ginkgo_pro_defines.h:21
+msgid "Professional DICOM CADx environment"
+msgstr "Professionelle DICOM CADx-Umgebung"
+
+#: ..\../main/controllers/dcmtk/dicomservers.h:39
+msgid "Server not found"
+msgstr "Server nicht gefunden"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:99
+#, fuzzy
+msgid "DICOM Query/Retrieve"
+msgstr "Unbekannte Abfragetiefe"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:123
+msgid "Not found"
+msgstr "Nicht gefunden"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+msgid "Advanced Settings"
+msgstr "Erweiterte Einstellungen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+msgid "Edit profile"
+msgstr "Profil bearbeiten"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+msgid "Add/Edit Location"
+msgstr "Standort hinzufügen/bearbeiten"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+msgid "Add window/level"
+msgstr "Fenster/Ebene hinzufügen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+msgid "Add tag"
+msgstr "Markierung hinzufügen"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+#, fuzzy
+msgid "Setup window position"
+msgstr "Position einrichten …"
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.h:61
+#, fuzzy
+msgid "Closing"
+msgstr "Ginkgo CADx wird geschlossen"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+msgid "DICOM Dir configuration"
+msgstr "DICOM-Verzeichniskonfiguration"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:70
+msgid "Open Ginkgo Cloud"
+msgstr "Ginkgo Cloud öffnen"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:123
+msgid "Ginkgo Cloud search"
+msgstr "Ginkgo Cloud-Suche"
+
+#: ..\../main/gui/history3/confirmdeletedialog.h:24
+msgid " from History?"
+msgstr " vom Verlauf?"
+
+#: ..\../main/gui/history3/historypanel3base.h:100
+msgid "Medical history"
+msgstr "Anamnese"
+
+#: ..\../main/gui/history3/historypanel3base.h:161
+msgid "Open With ..."
+msgstr "Öffnen mit …"
+
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Select a View"
+msgstr "Ansicht auswählen"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+msgid "Message detail"
+msgstr "Nachrichtendetails"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+msgid "Log node"
+msgstr "Knoten protokollieren"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:87
+msgid "Closing Ginkgo CADx"
+msgstr "Ginkgo CADx wird geschlossen"
+
+#: ..\../main/gui/paneltags/paneltagsbase.h:57
+msgid "DICOM Inspector"
+msgstr "DICOM-Inspektor"
+
+#: ..\../main/license.h:31
+msgid "Open Source DICOM CADx environment"
+msgstr "Open Source DICOM-System CADx"
+
+#: ..\../widgets/gui/calibracionbase.h:65
+msgid "Calibration"
+msgstr "Kalibriere"
+
+#: ..\../wx/propiedades/wxpropiedadesbase.h:62
+msgid "Properties of ..."
+msgstr "Eigenschaften von …"
+
+#: ..\../wx/thumbnailctrl/thumbnailwidget.h:44
+msgid "Image Browser Dialog"
+msgstr "Bilder-Browser-Dialogfenster"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+msgid "Test title"
+msgstr "Test-Titel"
+
+#~ msgid ""
+#~ "Unexpected Error exporting, the view is not allowed to export to the "
+#~ "format selected"
+#~ msgstr ""
+#~ "Unerwarteter Fehler beim Exportieren – die Ansicht ist nicht berechtigt, "
+#~ "in das ausgewählte Format zu exportieren"
+
+#~ msgid "Failed to store the file, check permissions on the directory"
+#~ msgstr ""
+#~ "Konnte die Datei nicht speichern. Überprüfen Sie die Schreibrechte in dem "
+#~ "Verzeichnis"
+
+#~ msgid "The key files will not be exported"
+#~ msgstr "Die Schlüsseldateien werden nicht exportiert"
+
+#~ msgid "Current"
+#~ msgstr "Aktuell"
+
+#~ msgid "All"
+#~ msgstr "Alle"
+
+#~ msgid "JPG"
+#~ msgstr "JPG"
+
+#~ msgid "BMP"
+#~ msgstr "BMP"
+
+#~ msgid "PNG"
+#~ msgstr "PNG"
+
+#~ msgid "Content"
+#~ msgstr "Inhalt"
+
+#~ msgid "Include annotation Widgets"
+#~ msgstr "Anmerkungs-Felder einfügen"
+
+#~ msgid "Tile Horizontally"
+#~ msgstr "Waagerecht kacheln"
+
+#~ msgid "Tile Vertically"
+#~ msgstr "Senkrecht kacheln"
+
+#~ msgid "Grid (two columns)"
+#~ msgstr "Gitter (2 Spalten)"
+
+#~ msgid "Grid (three columns)"
+#~ msgstr "Gitter (3 Spalten)"
+
+#~ msgid "Grid organization"
+#~ msgstr "Rasteranordnung"
+
+#~ msgid "Color"
+#~ msgstr "Farbe"
+
+#~ msgid "Vertex (I)"
+#~ msgstr "Vertex (I)"
+
+#~ msgid "Vertex (M)"
+#~ msgstr "Vertex (M)"
+
+#~ msgid "0"
+#~ msgstr "0"
+
+#~ msgid "Select PACS servera"
+#~ msgstr "PACS-Server auswählen"
+
+#~ msgid "Checking program updates..."
+#~ msgstr "Programmaktualisierungen werden gesucht …"
+
+#~ msgid "Untitled"
+#~ msgstr "Unbenannt"
+
+#~ msgid "UID"
+#~ msgstr "UID"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">"
+#~ msgstr ">"
+
+#~ msgid "<"
+#~ msgstr "<"
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid "Patient's Id"
+#~ msgstr "Patienten-ID"
+
+#~ msgid "You are not allowed to download this kind of modalities ("
+#~ msgstr ""
+#~ "Sie sind nicht berechtigt, diese Art von Modalitäten herunterzuladen ("
+
+#~ msgid "Searching..."
+#~ msgstr "Es wird gesucht …"
+
+#~ msgid "unknown column"
+#~ msgstr "Unbekannte Spalte"
+
+#~ msgid "URL"
+#~ msgstr "URL"
+
+#~ msgid "Pending tasks"
+#~ msgstr "Offene Aufgaben"
+
+#~ msgid "Restart pending tasks"
+#~ msgstr "Offene Aufgabe erneut ausführen"
+
+#~ msgid "Remove pending tasks"
+#~ msgstr "Offene Aufgaben löschen"
+
+#~ msgid "Advanced tasks management..."
+#~ msgstr "Erweiterte Aufgabenverwaltung …"
+
+#~ msgid "You can't remove series with pending tasks, cancel tasks and retry"
+#~ msgstr ""
+#~ "Serien mit offenen Aufgaben können nicht entfernt werden, löschen Sie die "
+#~ "Aufgaben und versuchen es erneut"
+
+#~ msgid "Are you sure you want to delete task?"
+#~ msgstr "Soll die Aufgabe wirklich gelöscht werden?"
+
+#~ msgid "Delete tasks"
+#~ msgstr "Aufgaben löschen"
+
+#~ msgid "Sort by"
+#~ msgstr "Sortieren nach"
+
+#~ msgid "Pateint id"
+#~ msgstr "Patienten-ID"
+
+#~ msgid "Include Annotations"
+#~ msgstr "Inklusive Ecknotizen"
+
+#~ msgid "Zoom"
+#~ msgstr "Vergrößerung"
+
+#~ msgid "Options"
+#~ msgstr "Optionen"
+
+#~ msgid "Images per sheet"
+#~ msgstr "Bilder pro Blatt"
+
+#~ msgid "Print ..."
+#~ msgstr "Drucken …"
+
+#~ msgid "Completed"
+#~ msgstr "Fertiggestellt"
+
+#~ msgid "Delete task"
+#~ msgstr "Aufgabe löschen"
+
+#~ msgid "Restart task"
+#~ msgstr "Aufgabe erneut ausführen"
+
+#~ msgid "Delete all"
+#~ msgstr "Alle löschen"
+
+#~ msgid "Are you sure you want to delete tasks?"
+#~ msgstr "Möchten Sie die Aufgaben wirklich löschen?"
+
+#~ msgid "ID"
+#~ msgstr "ID"
+
+#~ msgid "Point Size"
+#~ msgstr "Punktgröße"
+
+#~ msgid "Family"
+#~ msgstr "Familie"
+
+#~ msgid "Underline"
+#~ msgstr "Unterstrichen"
+
+#~ msgid "Make a selection:"
+#~ msgstr "Triff eine Auswahl:"
+
+#~ msgid "Categorized Mode"
+#~ msgstr "Kategorisierter Modus"
+
+#~ msgid "Alphabetic Mode"
+#~ msgstr "Alphabetischer Modus"
+
+#~ msgid "False"
+#~ msgstr "Falsch"
+
+#~ msgid "True"
+#~ msgstr "Wahr"
+
+#~ msgid "Unspecified"
+#~ msgstr "Nicht angegeben"
+
+#~ msgid ""
+#~ "Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", "
+#~ "NOT \"%s\"."
+#~ msgstr ""
+#~ "Typoperation »%s« gescheitert: Eigenschaft mit der Bezeichnung »%s« ist "
+#~ "vom Typ »%s«, jedoch NICHT »%s«."
+
+#~ msgid "Error in resource: %s"
+#~ msgstr "Fehler in der Ressource: %s"
+
+#~ msgid "Value must be %lld or higher"
+#~ msgstr "Wert muss %lld oder größer sein"
+
+#~ msgid "Value must be %llu or higher"
+#~ msgstr "Wert muss %llu oder größer sein"
+
+#~ msgid "Value must be %llu or less"
+#~ msgstr "Wert muss %llu oder kleiner sein"
+
+#~ msgid "Value must be %f or higher"
+#~ msgstr "Wert muss %f oder größer sein"
+
+#~ msgid "Value must be %f or less"
+#~ msgstr "Wert muss %f oder kleiner sein"
+
+#~ msgid "Not %s"
+#~ msgstr "Nicht %s"
+
+#~ msgid "Choose a directory:"
+#~ msgstr "Verzeichnis wählen:"
+
+#~ msgid "Choose a file"
+#~ msgstr "Wählen Sie eine Datei aus"
+
+#~ msgid "All files (*.*)|*.*"
+#~ msgstr "Alle Dateien(*.*)|*.*"
+
+#~ msgid "Update"
+#~ msgstr "Aktualisieren"
+
+#~ msgid "Up"
+#~ msgstr "Hoch"
+
+#~ msgid "Down"
+#~ msgstr "Herunter"
+
+#~ msgid "Page %i"
+#~ msgstr "Seite %i"
+
+#~ msgid "Configure proxy"
+#~ msgstr "Proxy-Server konfigurieren"
+
+#~ msgid "Use system settings"
+#~ msgstr "Systemeinstellungen verwenden"
+
+#~ msgid "Manual configuration of proxy:"
+#~ msgstr "Manuelle Proxy-Konfiguration:"
+
+#~ msgid "Host:"
+#~ msgstr "Host:"
+
+#~ msgid "Port:"
+#~ msgstr "Port:"
+
+#~ msgid "Password:"
+#~ msgstr "Passwort:"
+
+#~ msgid "Authenticate"
+#~ msgstr "Legitimieren"
+
+#~ msgid "Show / Hide DICOM tags panel"
+#~ msgstr "DICOM-Markierungen ein-/ausblenden"
+
+#~ msgid "Updates"
+#~ msgstr "Aktualisierungen"
+
+#~ msgid "Visualization"
+#~ msgstr "Histogrammangleichung"
+
+#~ msgid "Reset window level and zoom"
+#~ msgstr "Fenster, Ebene und Vergrößerung zurücksetzen"
+
+#~ msgid "Dicomize images..."
+#~ msgstr "Gewählte Bilder"
+
+#~ msgid "Double click to edit"
+#~ msgstr "Doppelklicken zum Ändern"
+
+#~ msgid "Uploading to the PACS ..."
+#~ msgstr "Es wird zum PACS hochgeladen …"
+
+#~ msgid ""
+#~ "No results obtained. Maybe you have a wrong PACS server configuration"
+#~ msgstr ""
+#~ "Keine Ergebnisse erhalten. Möglicherweise haben Sie eine fehlerhafte PACS-"
+#~ "Konfiguration"
+
+#~ msgid ""
+#~ "No results obtained in PACS retrieve.\n"
+#~ "Maybe study doesn't exist or you have a wrong PACS server configuration."
+#~ msgstr ""
+#~ "Keine Ergebnisse erhalten. Möglicherweise haben Sie eine fehlerhafte PACS-"
+#~ "Konfiguration"
+
+#~ msgid "Downloads"
+#~ msgstr "Downloads"
+
+#~ msgid "Clean"
+#~ msgstr "Liste leeren"
+
+#~ msgid "Starting..."
+#~ msgstr "Es wird gestartet …"
+
+#~ msgid ""
+#~ "Diagnostic files can't be opened, you have to open the diagnosed series"
+#~ msgstr ""
+#~ "Diagnosedateien können nicht direkt geöffnet werden, Sie müssen die "
+#~ "diagnostizierte Serie öffen"
+
+#~ msgid "Error: "
+#~ msgstr "Fehler: "
+
+#~ msgid "Error: No images were downloaded"
+#~ msgstr "Fehler: Es wurden keine Bilder heruntergeladen"
+
+#~ msgid "Finished"
+#~ msgstr "Fertig"
+
+#~ msgid "Play"
+#~ msgstr "Wiedergeben"
+
+#~ msgid "Retry"
+#~ msgstr "Wiederholen"
+
+#~ msgid "Successful connection test."
+#~ msgstr "Erfolgreicher Verbindungstest."
+
+#~ msgid "The service did not respond properly:"
+#~ msgstr "Der Dienst antwortete nicht erwartungsgemäß:"
+
+#~ msgid "Error starting network support"
+#~ msgstr "Fehler beim Starten der Netzwerkunterstützung"
+
+#~ msgid "The selected directory does must be empty"
+#~ msgstr "Der gewählte Ordner kann nicht geöffnet werden"
+
+#~ msgid "What do you want to do?"
+#~ msgstr "Wähle Serie, die hochgeladen werden soll"
+
+#~ msgid "Choose the import profile"
+#~ msgstr "Wählen Sie das Importprofil"
+
+#~ msgid "Import profile"
+#~ msgstr "Profil importieren"
+
+#~ msgid "An error ocurred loading Ginkgo News check your internet connection"
+#~ msgstr ""
+#~ "Fehler beim Laden von »Ginkgo News« aufgetreten, bitte Internetverbindung "
+#~ "prüfen"
+
+#~ msgid "Welcome"
+#~ msgstr "Willkommen"
+
+#~ msgid "Twitter"
+#~ msgstr "Twitter"
+
+#~ msgid "%d/%m/%Y %H:%M:%S"
+#~ msgstr "%d.%m.%Y %k:%M:%S"
+
+#~ msgid "Loading modules ..."
+#~ msgstr "Lade Module ..."
+
+#~ msgid ""
+#~ "\n"
+#~ "There are %d files that overwrite existing files"
+#~ msgstr ""
+#~ "\n"
+#~ "Es sind %d Dateien vorhanden, die existierende Dateien überschreiben"
+
+#~ msgid "Finished .."
+#~ msgstr "Fertig .."
+
+#~ msgid "Merging file %d of %d"
+#~ msgstr "Füge Datei %d von %d ein"
+
+#~ msgid "Column organization (2 columns)"
+#~ msgstr "Spaltenaufteilung (2 Spalten)"
+
+#~ msgid "Display Options"
+#~ msgstr "Optionen anzeigen"
+
+#~ msgid "Close Panel"
+#~ msgstr "Schließe Panel"
+
+#~ msgid "Close All"
+#~ msgstr "Alle schließen"
+
+#~ msgid "Close all tabs"
+#~ msgstr "Schließe alle Reiter"
+
+#~ msgid "Grid Organization"
+#~ msgstr "Gitterorganisation"
+
+#~ msgid "Error deleting the Study of database:\n"
+#~ msgstr "Fehler beim Löschen der Studie aus der Datenbank:\n"
+
+#~ msgid "Error deleting file from de database: \n"
+#~ msgstr "Fehler beim Löschen der Datei aus der Datenbank: \n"
+
+#~ msgid "Error deleting file from database:\n"
+#~ msgstr "Fehler beim Löschen der Datei aus der Datenbank:\n"
+
+#~ msgid "Activate"
+#~ msgstr "Aktivieren"
+
+#~ msgid "Not loaded"
+#~ msgstr " nicht erlaubt"
+
+#~ msgid "Export global..."
+#~ msgstr "Exportieren..."
+
+#~ msgid "Import global..."
+#~ msgstr "Importieren ..."
+
+#~ msgid "XML-RPC Server"
+#~ msgstr "XML-RPC-Server"
+
+#~ msgid "Enable XML-RPC server"
+#~ msgstr "Aktiviere XML-RPC-Server"
+
+#~ msgid ""
+#~ "Enable/Disable XML RPC Server for listening remote operations from EHR "
+#~ "System"
+#~ msgstr ""
+#~ "Aktiviere/Deaktiviere XML-RPC-Server um Anfragen von Praxisprogrammen "
+#~ "empfangen zu können"
+
+#~ msgid "Plugin's path"
+#~ msgstr "Pluginpfad"
+
+#~ msgid "Obtain extensions..."
+#~ msgstr "Erweiterungen werden besorgt …"
+
+#~ msgid "1.0"
+#~ msgstr "1.0"
+
+#~ msgid "Select files you want to export"
+#~ msgstr "Wählen Sie die Dateien, die hochgeladen werden sollen"
+
+#~ msgid "Select Series you want to export"
+#~ msgstr "Wähle Serie, die hochgeladen werden soll"
+
+#~ msgid "Export diagnostic"
+#~ msgstr "Exportiere die Diagnostik"
+
+#~ msgid "No description"
+#~ msgstr "Keine Beschreibung"
+
+#~ msgid "Send to PACS server"
+#~ msgstr "An PACS-Server senden"
+
+#~ msgid "All modalities"
+#~ msgstr "Modalitäten"
+
+#~ msgid "Last week"
+#~ msgstr "Letzte Woche"
+
+#~ msgid ""
+#~ "\n"
+#~ "There aren't any stored study that matches with the search filter.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Es gibt keine Studien, die mit dem Suchfilter übereinstimmen\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "There is no size in the medical history to show every patients\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Es gibt keine Grösse in der Krankengeschichte, um alle Patienten "
+#~ "anzuzeigen\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Try using filters or collapsing nodes and refresh search\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Versuchen Sie die Nutzung von Filtern oder das Verbergen von Knoten und "
+#~ "aktualisieren Sie die Suche\n"
+
+#~ msgid "Acquiring a new DICOM study"
+#~ msgstr "Akquiriere eine neue DICOM-Studie"
+
+#~ msgid "&Open File"
+#~ msgstr "&Datei öffnen"
+
+#~ msgid "&Open Folder"
+#~ msgstr "&Verzeichnis öffnen"
+
+#~ msgid "Acquire from a local folder"
+#~ msgstr "Akquiriere aus einem lokalen Verzeichnis"
+
+#~ msgid "&Import ..."
+#~ msgstr "&Importieren ..."
+
+#~ msgid "12412012 Q"
+#~ msgstr "12412012 Q"
+
+#~ msgid "31/08/1983"
+#~ msgstr "31.08.1983"
+
+#~ msgid "Javier Tovar Velasco"
+#~ msgstr "Javier Tovar Velasco"
+
+#~ msgid "10:20"
+#~ msgstr "10:20"
+
+#~ msgid "31/02/2010"
+#~ msgstr "31.02.2010"
+
+#~ msgid "CT"
+#~ msgstr "CT"
+
+#~ msgid "Filters"
+#~ msgstr "Filter"
+
+#~ msgid "<Unknow ID>"
+#~ msgstr "<Unbekannte ID>"
+
+#~ msgid "&Delete Patient from History"
+#~ msgstr "&Lösche Patient aus dem Verlauf"
+
+#~ msgid "Failed to remove patient, you have to close opened studies"
+#~ msgstr ""
+#~ "Konnte den Patienten nicht entfernen. Sie müssen offene Studien schließen"
+
+#~ msgid "We want to thanks "
+#~ msgstr "Wir danken "
+
+#~ msgid " for all their support in Ginkgo CADx creation!"
+#~ msgstr " für die Unterstützung bei der Entwicklung von Ginkgo CADx!"
+
+#~ msgid "Translators"
+#~ msgstr "Übersetzer"
+
+#~ msgid "Japanese: Noriya Yokohama"
+#~ msgstr "Japanisch: Noriya Yokohama"
+
+#~ msgid "German: Sebastian Hilbert"
+#~ msgstr "Deutsch: Sebastian Hilbert"
+
+#~ msgid "Turkish: zeugma (sunder67)"
+#~ msgstr "Türkisch: zeugma (sunder67)"
+
+#~ msgid "Spanish: JFLP (jluna80)"
+#~ msgstr "Spanisch: JFLP (jluna80)"
+
+#~ msgid "Greetings"
+#~ msgstr "Grüße"
+
+#~ msgid "Ross Boswell: PACS compliance testing"
+#~ msgstr "Ross Boswell: PACS-Compliance-Tests"
+
+#~ msgid "Andre Alvim Tolentino: Printing issues"
+#~ msgstr "Andre Alvim Tolentino: Druckprobleme"
+
+#~ msgid "XmlRpc++"
+#~ msgstr "XmlRpc++"
+
+#~ msgid ""
+#~ "\n"
+#~ "Ginkgo CADx license agreement <version>\n"
+#~ "-----------------------------------\n"
+#~ "\n"
+#~ "This version is a trial version for <customer>, and therefore its use is "
+#~ "restricted for this purpose.\n"
+#~ "\n"
+#~ "\n"
+#~ "\n"
+#~ "S.L MetaEmotion Healthcare\n"
+#~ "http://healthcare.metaemotion.com/en/welcome\n"
+#~ "contacto at metaemotion.com"
+#~ msgstr ""
+#~ "\n"
+#~ "Ginkgo CADx Lizenzvereinbarung <Version>\n"
+#~ "-----------------------------------\n"
+#~ "\n"
+#~ "Diese Version ist eine Testversion für <Kunde> und daher ist die Nutzung "
+#~ "auf den Zweck beschränkt.\n"
+#~ "\n"
+#~ "\n"
+#~ "\n"
+#~ "S.L MetaEmotion Healthcare\n"
+#~ "http://healthcare.metaemotion.com/en/welcome\n"
+#~ "contacto at metaemotion.com"
+
+#~ msgid "Acquire from a removable unit"
+#~ msgstr "Akquiriere aus einem lokalen Verzeichnis"
+
+#~ msgid "Import Images"
+#~ msgstr "Bilder importieren"
+
+#~ msgid "DICOM &acquisition from PACS"
+#~ msgstr "DICOM &Aquisition"
+
+#~ msgid "&Import images..."
+#~ msgstr "&Importieren von Bildern"
+
+#~ msgid "&Save"
+#~ msgstr "&Speichern"
+
+#~ msgid "Export current series..."
+#~ msgstr "Exportiere Dateien..."
+
+#~ msgid "Export the active study to other formats"
+#~ msgstr "Exportiere die aktive Studie in ein anderes Format"
+
+#~ msgid "Print..."
+#~ msgstr "Drucken ..."
+
+#~ msgid "Get extensions ..."
+#~ msgstr "Rufe Erweiterungen ab"
+
+#~ msgid "Start page ..."
+#~ msgstr "Seite wird gestartet …"
+
+#~ msgid "Ginkgo CADx start page ..."
+#~ msgstr "Startseite von »Ginkgo CADx« …"
+
+#~ msgid "About &Ginkgo CADx ..."
+#~ msgstr "&Über Ginkgo CADx ..."
+
+#~ msgid "About Ginkgo CADx ..."
+#~ msgstr "Über Ginkgo CADx ..."
+
+#~ msgid "Ginkgo CADx settings"
+#~ msgstr "Ginkgo CADx Einstellungen"
+
+#~ msgid "Image"
+#~ msgstr "Bild"
+
+#~ msgid "3D tools"
+#~ msgstr "3D Werkzeuge"
+
+#~ msgid "Select Series you want to upload"
+#~ msgstr "Wähle Serie, die hochgeladen werden soll"
+
+#~ msgid "Select files you want to upload"
+#~ msgstr "Wählen Sie die Dateien, die hochgeladen werden sollen"
+
+#~ msgid "PACS server"
+#~ msgstr "PACS-Server"
+
+#~ msgid "Assistant to send files to PACS"
+#~ msgstr "Assistent zum Senden von Dateien zum PACS"
+
+#~ msgid "Show On Startup"
+#~ msgstr "Beim Start anzeigen"
+
+#~ msgid "Decrease"
+#~ msgstr "Verringern"
+
+#~ msgid "Decrease value"
+#~ msgstr "Wert verringern"
+
+#~ msgid "Increase"
+#~ msgstr "Erhöhen"
+
+#~ msgid "Increase value"
+#~ msgstr "Wert erhöhen"
+
+#~ msgid "Factor (0.50)"
+#~ msgstr "Faktor (0.50)"
+
+#~ msgid "Factor"
+#~ msgstr "Faktor"
+
+#~ msgid "Factor (%.2f)"
+#~ msgstr "Faktor (%.2f)"
+
+#~ msgid "Deleting a Column"
+#~ msgstr "Lösche eine Spalte"
+
+#~ msgid "Deleting a Row"
+#~ msgstr "Lösche eine Zeile"
+
+#~ msgid "1x1"
+#~ msgstr "1×1"
+
+#~ msgid "1x2"
+#~ msgstr "1x2"
+
+#~ msgid "2x1"
+#~ msgstr "2x1"
+
+#~ msgid "2X2"
+#~ msgstr "2x2"
+
+#~ msgid "3x3"
+#~ msgstr "3x3"
+
+#~ msgid "4x4"
+#~ msgstr "4x4"
+
+#~ msgid "Zoom -"
+#~ msgstr "Verkleinern"
+
+#~ msgid "Ginkgo CADx Settings"
+#~ msgstr "Ginkgo CADx Einstellungen"
+
+#~ msgid "About Ginkgo CADx..."
+#~ msgstr "Über Ginkgo CADx ..."
+
+#~ msgid "Confirm the removal of the server"
+#~ msgstr "Bestätige das Entfernen des Servers"
+
+#~ msgid "PACS Servers"
+#~ msgstr "PACS-Server"
+
+#~ msgid "Test server"
+#~ msgstr "Testserver"
+
+#~ msgid "PACS Server"
+#~ msgstr "PACS-Server"
+
+#~ msgid " WL"
+#~ msgstr " WL"
+
+#~ msgid " WW"
+#~ msgstr " WW"
+
+#~ msgid " is compatible with Ginkgo CADx "
+#~ msgstr " ist kompatibel mit Ginkgo CADx "
+
+#~ msgid "Anonymized tags default value"
+#~ msgstr "Voreinstellte Werte anonymisierter DICOM tags"
+
+#~ msgid "Are you sure to delete the tag"
+#~ msgstr "Sind Sie sicher, dass Sie das Tag löschen möchten ?"
+
+#~ msgid "Auto Levels"
+#~ msgstr "Ebenen automatisch"
+
+#~ msgid "Birthday"
+#~ msgstr "Geburtstag"
+
+#~ msgid "Breaking the world"
+#~ msgstr "Zerbreche die Welt"
+
+#~ msgid "Cancels current task"
+#~ msgstr "Bricht die aktuelle Aufgabe ab"
+
+#~ msgid "Closing windows..."
+#~ msgstr "Schließe Fenster..."
+
+#~ msgid "Code:"
+#~ msgstr "Code:"
+
+#~ msgid "Configure tags to anonymize"
+#~ msgstr "Konfiguriere zu anomymisierende Tags"
+
+#~ msgid "Correction"
+#~ msgstr "Korrektur"
+
+#~ msgid "Could not get the associated module"
+#~ msgstr "Konnte das verknüpfte Modul nicht erhalten"
+
+#~ msgid "Creating new images ..."
+#~ msgstr "Erzeuge neue Bilder ..."
+
+#~ msgid "Date: "
+#~ msgstr "Datum: "
+
+#~ msgid "Default Value"
+#~ msgstr "Standardwert"
+
+#~ msgid "Description: "
+#~ msgstr "Beschreibung: "
+
+#~ msgid "Disengage"
+#~ msgstr "Löse"
+
+#~ msgid "Duplicate Tool"
+#~ msgstr "Duplizierungswerkzeug"
+
+#~ msgid "Edge preserving smooth filter"
+#~ msgstr "Kantenerhaltener Glättungsfilter"
+
+#~ msgid "Edges"
+#~ msgstr "Kanten"
+
+#~ msgid "Environment"
+#~ msgstr "Umgebung"
+
+#~ msgid "Error in receiving the response"
+#~ msgstr "Fehler beim Empfang der Antwort"
+
+#~ msgid "Error when making SSL connection"
+#~ msgstr "Fehler beim Erstellen der SSL-Verbindung"
+
+#~ msgid "Error when making the request, writing incomplete"
+#~ msgstr "Fehler beim Anfordern, unvollständig geschrieben"
+
+#~ msgid "Export Certificate"
+#~ msgstr "Exportiere Zertifikat"
+
+#~ msgid "Extension "
+#~ msgstr "Erweiterung "
+
+#~ msgid "Extensions Support"
+#~ msgstr "Unterstützung von Erweiterungen"
+
+#~ msgid ""
+#~ "Failed to perform the HTTP request, the server returned the error code "
+#~ msgstr ""
+#~ "Konnte HTTP-Anfrage nicht ausführen. Der Server gab eine Fehlermeldung "
+#~ "zurück "
+
+#~ msgid "Failed to save the file"
+#~ msgstr "Konnte die Datei nicht speichern"
+
+#~ msgid "Fatal error, can not write the history database"
+#~ msgstr "Ausnahmefehler, kann die Verlausdatenbank nicht erstellen"
+
+#~ msgid "Fill the fields to continue."
+#~ msgstr "Füllen Sie die Felder aus um fortzufahren."
+
+#~ msgid "Filter menu"
+#~ msgstr "Filtermenü"
+
+#~ msgid "Gaussian 3x3"
+#~ msgstr "GAUSSisch 3x3"
+
+#~ msgid "Gaussian smooth filter"
+#~ msgstr "GAUSS-Glättungsfilter"
+
+#~ msgid "Ginkgo CADx license agreement version  "
+#~ msgstr "Ginkgo CADx Lizenzvereinbarung  "
+
+#~ msgid "Id: "
+#~ msgstr "Kennung: "
+
+#~ msgid "It has been read a \"medico\" tag without identifiers"
+#~ msgstr "\"Arzt\"-Markierung ohne IDs gelesen"
+
+#~ msgid "It was impossible to connect server "
+#~ msgstr "Es war unmöglich, eine Verbindung herzustellen mit dem Server "
+
+#~ msgid "Levels"
+#~ msgstr "Ebenen"
+
+#~ msgid "License"
+#~ msgstr "Lizenz"
+
+#~ msgid "License Data"
+#~ msgstr "Lizenzdaten"
+
+#~ msgid "Magnifying glass"
+#~ msgstr "Lupe"
+
+#~ msgid "Malformed server response"
+#~ msgstr "Kaputte Serverantwort"
+
+#~ msgid "Median smooth filter"
+#~ msgstr "Median-Glättungsfilter"
+
+#~ msgid "Merging files..."
+#~ msgstr "Führe Dateien zusammen ..."
+
+#~ msgid "Modify"
+#~ msgstr "Bearbeiten"
+
+#~ msgid "Name: "
+#~ msgstr "Name: "
+
+#~ msgid "No options"
+#~ msgstr "Keine Optionen"
+
+#~ msgid "No results obtained"
+#~ msgstr "Keine Ergebnisser erhalten"
+
+#~ msgid "Not specified the server protocol"
+#~ msgstr "Server-Protokoll nicht angegeben"
+
+#~ msgid "Null Tool"
+#~ msgstr "Null-Werkzeug"
+
+#~ msgid "Opening series..."
+#~ msgstr "Serie öffnen..."
+
+#~ msgid "Organization"
+#~ msgstr "Organisation"
+
+#~ msgid "PEM file (*.pem) | *.pem"
+#~ msgstr "PEM-Datei (*.pem) | *.pem"
+
+#~ msgid "Poligono"
+#~ msgstr "Polygone"
+
+#~ msgid "Reason:"
+#~ msgstr "Grund:"
+
+#~ msgid "Redo "
+#~ msgstr "Erneut "
+
+#~ msgid "Remove finished"
+#~ msgstr "Entfernen abgeschlossen"
+
+#~ msgid "Reset Window/Level"
+#~ msgstr "Fenster/Ebene zurücksetzen"
+
+#~ msgid "Rss url is not valid check configuration"
+#~ msgstr "RSS-URL ist ungültig, bitte Konfiguration prüfen"
+
+#~ msgid "Sacyl (CyL, Spain)"
+#~ msgstr "Sacyl (CyL, Spain)"
+
+#~ msgid "Select the DICOM files you wish to upload"
+#~ msgstr "Wählen Sie die DICOM-Dateien, die hochgeladen werden sollen"
+
+#~ msgid "Select the server where the files will be sent"
+#~ msgstr "Wählen Sie den Server, an den die Dateien gesendet werden sollen"
+
+#~ msgid "Series UID: "
+#~ msgstr "UID der Serie: "
+
+#~ msgid "Sex: female"
+#~ msgstr "Geschlecht: weiblich"
+
+#~ msgid "Sex: male"
+#~ msgstr "Geschlecht: männlich"
+
+#~ msgid "Smooth"
+#~ msgstr "Glätten"
+
+#~ msgid "System Environment of Electronic Health Record"
+#~ msgstr "Systemumgebung der Elektronischen Karteikarte"
+
+#~ msgid "Tab Organization"
+#~ msgstr "Reiterorganisation"
+
+#~ msgid "Tags defined in settings"
+#~ msgstr "In den Einstellungen definierte Tags"
+
+#~ msgid "The CN field does not match the hostname"
+#~ msgstr "CN-Feld und Hostname stimmen nicht überein"
+
+#~ msgid "The certificate has not been verified"
+#~ msgstr "Das Zertifikat wurde nicht bestätigt"
+
+#~ msgid ""
+#~ "The following certificate has not been able to verify\n"
+#~ "Do you want to save to import into the system?"
+#~ msgstr ""
+#~ "Folgendes Zertifikat konnte nicht überprüft werden.\n"
+#~ "Möchten Sie es abspeichern, um es ins System zu importieren?"
+
+#~ msgid "The invocation XML is malformed"
+#~ msgstr "Aufruf-XML mißgestaltet"
+
+#~ msgid "The xml format is not correct"
+#~ msgstr "Das XML-Format ist nicht korrekt"
+
+#~ msgid "This files has to be overwritten"
+#~ msgstr "Diese Dateien müssen überschrieben werden"
+
+#~ msgid "URL for new extensions"
+#~ msgstr "URL für neue Erweiterungen"
+
+#~ msgid "Unsupported Protocol"
+#~ msgstr "Nicht unterstütztes Protokoll"
+
+#~ msgid "XML Files(*.xml)|*.xml"
+#~ msgstr "XML-Dateien (*.xml)|*.xml"
+
+#~ msgid "\"petition-id\" attribute expected at \"gnkworkflow\" scope"
+#~ msgstr ""
+#~ "Attribut »petition-id« wird erwartet in Gültigkeitsbereich »gnkworkflow«"
+
+#~ msgid "Abdomen"
+#~ msgstr "Unterleib"
+
+#~ msgid "Cranium"
+#~ msgstr "Schädel"
+
+#~ msgid "DICOM Dir has been created with a new version of Ginkgo CADx."
+#~ msgstr ""
+#~ "Das DICOM-Verzeichnis wurde mit einer neueren Version von Ginkgo CADX "
+#~ "erstellt."
+
+#~ msgid "Dicomize images"
+#~ msgstr "Bilder dicomisieren"
+
+#~ msgid "Download warning"
+#~ msgstr "Downloadwarnung"
+
+#~ msgid ""
+#~ "Error in interpreting the parameters of the command line. The file or "
+#~ "directory doesn't exist ("
+#~ msgstr ""
+#~ "Fehler beim Interprätieren der Kommandozeilenparameter. Die Datei oder "
+#~ "das Verzeichnis existieren nicht ("
+
+#~ msgid ""
+#~ "Ginkgo CADx has detected a default DICOM Dir created with an old version "
+#~ "of Ginkgo CADx"
+#~ msgstr ""
+#~ "Ginkgo CADx hat ein Standard-DICOM-Verzeichnis gefunden, das mit einer "
+#~ "älteren Version Ginkgo CADx erstellt wurde"
+
+#~ msgid "Lung"
+#~ msgstr "Lunge"
+
+#~ msgid "Mediastinum"
+#~ msgstr "Mediastinum"
+
+#~ msgid "Migrate..."
+#~ msgstr "Migrieren …"
+
+#~ msgid "Open again"
+#~ msgstr "Erneut öffnen"
+
+#~ msgid "Pixels bluring"
+#~ msgstr "Pixel für Glättung"
+
+#~ msgid "Remove old DICOM Dir after migration"
+#~ msgstr "Altes DICOM-Verzeichnis nach der Migration entfernen"
+
+#~ msgid "Reprocess Series"
+#~ msgstr "Serie erneut verarbeiten"
+
+#~ msgid ""
+#~ "Series were already in the download queue.\n"
+#~ "Do you want to force download?"
+#~ msgstr ""
+#~ "Serie ist bereits in der Download-Warteschlange.\n"
+#~ "Möchten Sie das Herunterladen erzwingen?"
+
+#~ msgid "Set pixels bluring"
+#~ msgstr "Pixel für Glättung festlegen"
+
+#~ msgid "Show metadatada"
+#~ msgstr "Meta-Daten anzeigen"
+
+#~ msgid "Spine"
+#~ msgstr "Wirbelsäule"
+
+#~ msgid ""
+#~ "Studies are already in the download queue.\n"
+#~ "Do you want to repeat download?"
+#~ msgstr ""
+#~ "Studien sind bereits in der Download-Warteschlange.\n"
+#~ "Möchten Sie das Herunterladen wiederholen?"
+
+#~ msgid "Study description"
+#~ msgstr "Beschreibung der Studie"
+
+#~ msgid "Study successfully sent to PACS"
+#~ msgstr "Studie erfolgreich zum PACS gesendet"
+
+#~ msgid "The following commands will abort if you close the application"
+#~ msgstr ""
+#~ "Folgende Befehle werden abgebrochen, wenn Sie die Anwendung schließen"
+
+#~ msgid ""
+#~ "The series selected is already open\n"
+#~ "Do you want to open it again?"
+#~ msgstr ""
+#~ "Ausgewählte Serie ist bereits geöffnet.\n"
+#~ "Möchten Sie sie erneut öffnen?"
+
+#~ msgid "The service did not respond correctly to the DICOM standard:"
+#~ msgstr "Der Dienst antwortete nicht entsprechend dem DICOM-Standard:"
+
+#~ msgid "This version is unabled to open it."
+#~ msgstr "Diese Version ist nicht in der Lage, es zu öffnen."
+
+#~ msgid ""
+#~ "Unable to reprocess this series. This series hasn't been dicomized with "
+#~ "Ginkgo CADx."
+#~ msgstr ""
+#~ "Diese Serie kann nicht wieder verarbeitet werden. Sie wurde nicht mit "
+#~ "Ginkgo CADx dicomisiert."
+
+#~ msgid "Vertebra"
+#~ msgstr "Wirbel"
+
+#~ msgid "Face Name"
+#~ msgstr "Oberflächenname"
+
+#~ msgid "Horizontal mosaic"
+#~ msgstr "Horizontales Mosaik"
+
+#~ msgid "No proxy for addresses containing:"
+#~ msgstr "Proxy umgehen für Adressen mit folgenden Inhalten:"
+
+#~ msgid "Page Setup ..."
+#~ msgstr "Seiteneinstellungen …"
+
+#~ msgid "Print image..."
+#~ msgstr "Bild drucken …"
+
+#~ msgid "Subsystem integration error: uninitialized result data container."
+#~ msgstr ""
+#~ "Subsystem-Integrationsfehler: Nicht initialisierter Container für "
+#~ "Ergebnisdaten."
+
+#~ msgid "Username:"
+#~ msgstr "Benutzername:"
+
+#~ msgid "Vertical mosaic"
+#~ msgstr "Vertikales Mosaik"
+
+#~ msgid "There are pending tasks, do you want to execute them?"
+#~ msgstr "Es gibt offene Aufgaben. Möchten Sie diese ausführen?"
+
+#~ msgid "Clean finished downloads"
+#~ msgstr "Download-Liste säubern"
+
+#~ msgid "Exception in component "
+#~ msgstr "Ausnahmefehler in Komponente "
+
+#~ msgid ""
+#~ "If you reprocess this series it will be uploaded to PACS server and \n"
+#~ "integration message will be resent to integration engine.\n"
+#~ "Do you want to continue?"
+#~ msgstr ""
+#~ "Wenn Sie diese Serie noch einmal verarbeiten, wird sie zum PACS-Server "
+#~ "hochgeladen \n"
+#~ "und die Integrationsnachricht wird erneut zum Integrationsrechner "
+#~ "gesendet. \n"
+#~ "Möchten Sie fortfahren?"
+
+#~ msgid "clockWise"
+#~ msgstr "Im Uhrzeigersinn"
+
+#~ msgid "counter-clockWise"
+#~ msgstr "Gegen den Uhrzeigersinn"
diff --git a/cadxcore/lang/de/wxstd.mo b/cadxcore/lang/de/wxstd.mo
new file mode 100644
index 0000000..e59f48e
Binary files /dev/null and b/cadxcore/lang/de/wxstd.mo differ
diff --git a/cadxcore/lang/de/wxstd.po b/cadxcore/lang/de/wxstd.po
new file mode 100644
index 0000000..5dab9a7
--- /dev/null
+++ b/cadxcore/lang/de/wxstd.po
@@ -0,0 +1,8986 @@
+# Initial translation by unknown translator
+# Updated by Thomas Krebs <Thomas.Krebs at mecadtron.de>
+msgid ""
+msgstr ""
+"Project-Id-Version: wxWidgets 3.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-01 19:04+0200\n"
+"PO-Revision-Date: 2012-04-27 17:01+0100\n"
+"Last-Translator: Dr. Thomas Krebs <Thomas.Krebs at mecadtron.de>\n"
+"Language-Team: wxWidgets Team <wx-dev at wxwidgets.org>\n"
+"Language: de\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/common/debugrpt.cpp:591
+msgid ""
+"\n"
+"Please send this report to the program maintainer, thank you!\n"
+msgstr ""
+"\n"
+"Bitte senden Sie diesen Bericht an den Programmautor. Vielen Dank!\n"
+
+#: ../src/richtext/richtextstyledlg.cpp:210
+#: ../src/richtext/richtextstyledlg.cpp:222
+msgid " "
+msgstr " "
+
+#: ../src/generic/dbgrptg.cpp:326
+msgid "              Thank you and we're sorry for the inconvenience!\n"
+msgstr ""
+"              Vielen Dank, und wir entschuldigen uns für die "
+"Unannehmlichkeiten.\n"
+
+#: ../src/common/prntbase.cpp:546
+#, c-format
+msgid " (copy %d of %d)"
+msgstr "(Kopie %d von %d)"
+
+#: ../src/common/log.cpp:425
+#, c-format
+msgid " (error %ld: %s)"
+msgstr " (Fehler %ld: %s)"
+
+#: ../src/common/imagtiff.cpp:75
+#, c-format
+msgid " (in module \"%s\")"
+msgstr "(im Modul \"%s\")"
+
+#: ../src/common/docview.cpp:1624
+msgid " - "
+msgstr " - "
+
+#: ../src/richtext/richtextprint.cpp:588 ../src/html/htmprint.cpp:704
+msgid " Preview"
+msgstr " Vorschau"
+
+#: ../src/common/fontcmn.cpp:811
+msgid " bold"
+msgstr " fett"
+
+#: ../src/common/fontcmn.cpp:827
+msgid " italic"
+msgstr " kursiv"
+
+#: ../src/common/fontcmn.cpp:807
+msgid " light"
+msgstr " dünn"
+
+#: ../src/common/paper.cpp:118
+msgid "#10 Envelope, 4 1/8 x 9 1/2 in"
+msgstr "#10 Umschlag, 4 1/8 x 9 1/2 Zoll"
+
+#: ../src/common/paper.cpp:119
+msgid "#11 Envelope, 4 1/2 x 10 3/8 in"
+msgstr "#11 Umschlag, 4 1/2 x 10 3/8 Zoll"
+
+#: ../src/common/paper.cpp:120
+msgid "#12 Envelope, 4 3/4 x 11 in"
+msgstr "#12 Umschlag, 4 3/4 x 11 Zoll"
+
+#: ../src/common/paper.cpp:121
+msgid "#14 Envelope, 5 x 11 1/2 in"
+msgstr "#14 Umschlag, 5 x 11 1/2 Zoll"
+
+#: ../src/common/paper.cpp:117
+msgid "#9 Envelope, 3 7/8 x 8 7/8 in"
+msgstr "#9 Umschlag, 3 7/8 x 8 7/8 Zoll"
+
+#: ../src/html/helpwnd.cpp:1044
+#, c-format
+msgid "%d of %lu"
+msgstr "%d von %lu"
+
+#: ../src/html/helpwnd.cpp:1681 ../src/html/helpwnd.cpp:1719
+#, c-format
+msgid "%i of %i"
+msgstr "%i von %i"
+
+#: ../src/generic/filectrlg.cpp:315
+#, c-format
+msgid "%ld byte"
+msgid_plural "%ld bytes"
+msgstr[0] "%ld Byte"
+msgstr[1] "%ld Bytes"
+
+#: ../src/html/helpwnd.cpp:1046
+#, c-format
+msgid "%lu of %lu"
+msgstr "%lu von %lu"
+
+#: ../src/common/cmdline.cpp:1050
+#, c-format
+msgid "%s (or %s)"
+msgstr " %s (oder %s)"
+
+#: ../src/generic/logg.cpp:230
+#, c-format
+msgid "%s Error"
+msgstr "%s Fehler"
+
+#: ../src/generic/logg.cpp:242
+#, c-format
+msgid "%s Information"
+msgstr "%s Information"
+
+#: ../src/generic/preferencesg.cpp:110
+#, c-format
+msgid "%s Preferences"
+msgstr "%s-Einstellungen"
+
+#: ../src/generic/logg.cpp:234
+#, c-format
+msgid "%s Warning"
+msgstr "%s Warnung"
+
+#: ../src/common/tarstrm.cpp:1319
+#, c-format
+msgid "%s did not fit the tar header for entry '%s'"
+msgstr "%s passte nicht zum tar Kopfeintrag für den Eintrag '%s'"
+
+#: ../src/common/fldlgcmn.cpp:106
+#, c-format
+msgid "%s files (%s)|%s"
+msgstr "%s Dateien (%s)|%s"
+
+#: ../src/common/stockitem.cpp:139 ../src/html/helpfrm.cpp:142
+#: ../src/html/helpfrm.cpp:144
+msgid "&About"
+msgstr "Übe&r"
+
+#: ../src/common/stockitem.cpp:207
+msgid "&Actual Size"
+msgstr "T&atsächliche Größe"
+
+#: ../src/richtext/richtextindentspage.cpp:262
+msgid "&After a paragraph:"
+msgstr "&Nach einem Absatz:"
+
+#: ../src/richtext/richtextindentspage.cpp:128
+#: ../src/richtext/richtextliststylepage.cpp:319
+msgid "&Alignment"
+msgstr "&Ausrichtung"
+
+#: ../src/common/stockitem.cpp:141
+msgid "&Apply"
+msgstr "Übernehmen"
+
+#: ../src/richtext/richtextstyledlg.cpp:251
+msgid "&Apply Style"
+msgstr "&Stil anwenden"
+
+#: ../src/msw/mdi.cpp:175
+msgid "&Arrange Icons"
+msgstr "&Icons anordnen"
+
+#: ../src/common/stockitem.cpp:195
+msgid "&Ascending"
+msgstr "&Aufsteigend"
+
+#: ../src/common/stockitem.cpp:142
+msgid "&Back"
+msgstr "&Zurück"
+
+#: ../src/richtext/richtextstylepage.cpp:113
+msgid "&Based on:"
+msgstr "&Basierend auf:"
+
+#: ../src/richtext/richtextindentspage.cpp:253
+msgid "&Before a paragraph:"
+msgstr "&Vor einem Absatz:"
+
+#: ../src/richtext/richtextfontpage.cpp:271
+msgid "&Bg colour:"
+msgstr "&Hg Farbe:"
+
+#: ../src/common/stockitem.cpp:143
+msgid "&Bold"
+msgstr "&Fett"
+
+#: ../src/common/stockitem.cpp:144
+msgid "&Bottom"
+msgstr "&Unten"
+
+#: ../src/richtext/richtextborderspage.cpp:359
+#: ../src/richtext/richtextborderspage.cpp:503
+#: ../src/richtext/richtextmarginspage.cpp:260
+#: ../src/richtext/richtextmarginspage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:637
+#: ../src/richtext/richtextsizepage.cpp:644
+msgid "&Bottom:"
+msgstr "&Unten:"
+
+#: ../include/wx/richtext/richtextbuffer.h:3530
+msgid "&Box"
+msgstr "&Rahmen"
+
+#: ../src/richtext/richtextliststylepage.cpp:210
+#: ../src/richtext/richtextbulletspage.cpp:159
+msgid "&Bullet style:"
+msgstr "Stil des &Gliederungspunktes:"
+
+#: ../src/common/stockitem.cpp:146
+msgid "&CD-Rom"
+msgstr "&CD-Rom"
+
+#: ../src/generic/wizard.cpp:432 ../src/generic/fontdlgg.cpp:470
+#: ../src/generic/fontdlgg.cpp:489 ../src/osx/carbon/fontdlg.cpp:588
+#: ../src/common/stockitem.cpp:145
+msgid "&Cancel"
+msgstr "Ab&brechen"
+
+#: ../src/msw/mdi.cpp:171
+msgid "&Cascade"
+msgstr "Kaskadieren"
+
+#: ../include/wx/richtext/richtextbuffer.h:5587
+msgid "&Cell"
+msgstr "&Zelle"
+
+#: ../src/richtext/richtextsymboldlg.cpp:439
+msgid "&Character code:"
+msgstr "&Zeichencode:"
+
+#: ../src/common/stockitem.cpp:147
+msgid "&Clear"
+msgstr "&Löschen"
+
+#: ../src/generic/logg.cpp:522 ../src/common/stockitem.cpp:148
+#: ../src/common/prntbase.cpp:1570 ../src/univ/themes/win32.cpp:3756
+#: ../src/html/helpfrm.cpp:139
+msgid "&Close"
+msgstr "&Schließen"
+
+#: ../src/common/stockitem.cpp:193
+msgid "&Color"
+msgstr "&Farbe"
+
+#: ../src/richtext/richtextfontpage.cpp:258
+msgid "&Colour:"
+msgstr "&Farbe:"
+
+#: ../src/common/stockitem.cpp:149
+msgid "&Convert"
+msgstr "&Konvertieren"
+
+#: ../src/richtext/richtextctrl.cpp:326 ../src/osx/textctrl_osx.cpp:583
+#: ../src/common/stockitem.cpp:150 ../src/msw/textctrl.cpp:2284
+msgid "&Copy"
+msgstr "&Kopieren"
+
+#: ../src/generic/hyperlinkg.cpp:156
+msgid "&Copy URL"
+msgstr "URL &kopieren"
+
+#: ../src/common/headerctrlcmn.cpp:328
+msgid "&Customize..."
+msgstr "&Anpassen..."
+
+#: ../src/generic/dbgrptg.cpp:334
+msgid "&Debug report preview:"
+msgstr "Vorschau des Fehlerberichts:"
+
+#: ../src/richtext/richtexttabspage.cpp:142
+#: ../src/richtext/richtextctrl.cpp:328 ../src/osx/textctrl_osx.cpp:585
+#: ../src/common/stockitem.cpp:152 ../src/msw/textctrl.cpp:2286
+msgid "&Delete"
+msgstr "&Löschen"
+
+#: ../src/richtext/richtextstyledlg.cpp:269
+msgid "&Delete Style..."
+msgstr "Stil &löschen..."
+
+#: ../src/common/stockitem.cpp:196
+msgid "&Descending"
+msgstr "&Absteigend"
+
+#: ../src/generic/logg.cpp:688
+msgid "&Details"
+msgstr "&Einzelheiten"
+
+#: ../src/common/stockitem.cpp:153
+msgid "&Down"
+msgstr "&Runter"
+
+#: ../src/common/stockitem.cpp:154
+msgid "&Edit"
+msgstr "&Bearbeiten"
+
+#: ../src/richtext/richtextstyledlg.cpp:263
+msgid "&Edit Style..."
+msgstr "Stil &bearbeiten..."
+
+#: ../src/common/stockitem.cpp:155
+msgid "&Execute"
+msgstr "&Ausführen"
+
+#: ../src/common/stockitem.cpp:157 ../src/html/helpfrm.cpp:146
+msgid "&File"
+msgstr "&Datei"
+
+#: ../src/common/stockitem.cpp:158
+msgid "&Find"
+msgstr "&Suchen"
+
+#: ../src/generic/wizard.cpp:626
+msgid "&Finish"
+msgstr "&Fertigstellen"
+
+#: ../src/common/stockitem.cpp:159
+msgid "&First"
+msgstr "&Erste"
+
+#: ../src/richtext/richtextsizepage.cpp:244
+msgid "&Floating mode:"
+msgstr "&Schwebemodus:"
+
+#: ../src/common/stockitem.cpp:160
+msgid "&Floppy"
+msgstr "&Diskette"
+
+#: ../src/common/stockitem.cpp:194
+msgid "&Font"
+msgstr "&Schriftart"
+
+#: ../src/generic/fontdlgg.cpp:371
+msgid "&Font family:"
+msgstr "&Schriftart:"
+
+#: ../src/richtext/richtextliststylepage.cpp:194
+msgid "&Font for Level..."
+msgstr "&Schriftart für Ebene..."
+
+#: ../src/richtext/richtextfontpage.cpp:156
+#: ../src/richtext/richtextsymboldlg.cpp:400
+msgid "&Font:"
+msgstr "&Schriftart:"
+
+#: ../src/common/stockitem.cpp:161
+msgid "&Forward"
+msgstr "&Vorwärts"
+
+#: ../src/richtext/richtextsymboldlg.cpp:451
+msgid "&From:"
+msgstr "&Von:"
+
+#: ../src/common/stockitem.cpp:162
+msgid "&Harddisk"
+msgstr "&Festplatte"
+
+#: ../src/richtext/richtextsizepage.cpp:351
+#: ../src/richtext/richtextsizepage.cpp:358
+msgid "&Height:"
+msgstr "&Höhe:"
+
+#: ../src/generic/wizard.cpp:435 ../src/richtext/richtextstyledlg.cpp:303
+#: ../src/richtext/richtextsymboldlg.cpp:479 ../src/osx/menu_osx.cpp:785
+#: ../src/common/stockitem.cpp:163 ../src/html/helpfrm.cpp:147
+msgid "&Help"
+msgstr "&Hilfe"
+
+#: ../include/wx/richmsgdlg.h:30
+msgid "&Hide details"
+msgstr "&Einzelheiten verbergen"
+
+#: ../src/common/stockitem.cpp:164
+msgid "&Home"
+msgstr "&Start"
+
+#: ../src/richtext/richtextindentspage.cpp:184
+#: ../src/richtext/richtextliststylepage.cpp:372
+msgid "&Indentation (tenths of a mm)"
+msgstr "&Einrücken (Zehntel-mm)"
+
+#: ../src/richtext/richtextindentspage.cpp:167
+#: ../src/richtext/richtextliststylepage.cpp:356
+msgid "&Indeterminate"
+msgstr "&Unbestimmt"
+
+#: ../src/common/stockitem.cpp:166
+msgid "&Index"
+msgstr "&Index"
+
+#: ../src/common/stockitem.cpp:167
+msgid "&Info"
+msgstr "&Information"
+
+#: ../src/common/stockitem.cpp:168
+msgid "&Italic"
+msgstr "&Kursiv"
+
+#: ../src/common/stockitem.cpp:169
+msgid "&Jump to"
+msgstr "&Springen zu"
+
+#: ../src/richtext/richtextindentspage.cpp:153
+#: ../src/richtext/richtextliststylepage.cpp:342
+msgid "&Justified"
+msgstr "&Ausgerichtet"
+
+#: ../src/common/stockitem.cpp:174
+msgid "&Last"
+msgstr "&Letztes"
+
+#: ../src/richtext/richtextindentspage.cpp:139
+#: ../src/richtext/richtextliststylepage.cpp:328
+msgid "&Left"
+msgstr "&Links"
+
+#: ../src/richtext/richtextindentspage.cpp:195
+#: ../src/richtext/richtextborderspage.cpp:269
+#: ../src/richtext/richtextborderspage.cpp:413
+#: ../src/richtext/richtextliststylepage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:187
+#: ../src/richtext/richtextmarginspage.cpp:301
+#: ../src/richtext/richtextsizepage.cpp:532
+#: ../src/richtext/richtextsizepage.cpp:539
+msgid "&Left:"
+msgstr "&Links:"
+
+#: ../src/richtext/richtextliststylepage.cpp:183
+msgid "&List level:"
+msgstr "&Listenebene:"
+
+#: ../src/generic/logg.cpp:523
+msgid "&Log"
+msgstr "&Log"
+
+#: ../src/univ/themes/win32.cpp:3748
+msgid "&Move"
+msgstr "&Bewegen"
+
+#: ../src/richtext/richtextsizepage.cpp:672
+msgid "&Move the object to:"
+msgstr "&Bewege das Objekt zu:"
+
+#: ../src/common/stockitem.cpp:175
+msgid "&Network"
+msgstr "&Netzwerk"
+
+#: ../src/richtext/richtexttabspage.cpp:136 ../src/common/stockitem.cpp:176
+msgid "&New"
+msgstr "&Neu"
+
+#: ../src/aui/tabmdi.cpp:111 ../src/generic/mdig.cpp:100
+#: ../src/msw/mdi.cpp:176
+msgid "&Next"
+msgstr "&Weiter"
+
+#: ../src/generic/wizard.cpp:431 ../src/generic/wizard.cpp:626
+msgid "&Next >"
+msgstr "&Weiter >"
+
+#: ../src/richtext/richtextsizepage.cpp:681
+msgid "&Next Paragraph"
+msgstr "&Nächster Absatz"
+
+#: ../src/generic/tipdlg.cpp:276
+msgid "&Next Tip"
+msgstr "&Nächster Tipp"
+
+#: ../src/richtext/richtextstylepage.cpp:123
+msgid "&Next style:"
+msgstr "&Nächster Stil:"
+
+#: ../src/common/stockitem.cpp:177 ../src/msw/msgdlg.cpp:476
+msgid "&No"
+msgstr "&Nein"
+
+#: ../src/generic/dbgrptg.cpp:356
+msgid "&Notes:"
+msgstr "Bemerkungen:"
+
+#: ../src/richtext/richtextbulletspage.cpp:264
+msgid "&Number:"
+msgstr "&Nummer:"
+
+#: ../src/generic/fontdlgg.cpp:475 ../src/generic/fontdlgg.cpp:482
+#: ../src/osx/carbon/fontdlg.cpp:594 ../src/common/stockitem.cpp:178
+msgid "&OK"
+msgstr "&OK"
+
+#: ../src/generic/dbgrptg.cpp:342 ../src/common/stockitem.cpp:179
+#: ../src/html/helpfrm.cpp:137
+msgid "&Open..."
+msgstr "&Öffnen..."
+
+#: ../src/richtext/richtextindentspage.cpp:222
+msgid "&Outline level:"
+msgstr "&Umrandungsebene:"
+
+#: ../src/richtext/richtextindentspage.cpp:293
+msgid "&Page Break"
+msgstr "&Seitenumbruch"
+
+#: ../src/richtext/richtextctrl.cpp:327 ../src/osx/textctrl_osx.cpp:584
+#: ../src/common/stockitem.cpp:180 ../src/msw/textctrl.cpp:2285
+msgid "&Paste"
+msgstr "Einfügen"
+
+#: ../include/wx/richtext/richtextbuffer.h:4655
+msgid "&Picture"
+msgstr "&Bild"
+
+#: ../src/generic/fontdlgg.cpp:422
+msgid "&Point size:"
+msgstr "Schriftgröße in &Punkt:"
+
+#: ../src/richtext/richtexttabspage.cpp:114
+msgid "&Position (tenths of a mm):"
+msgstr "&Position (Zehntel-mm):"
+
+#: ../src/richtext/richtextsizepage.cpp:514
+msgid "&Position mode:"
+msgstr "&Positionierungs-Modus:"
+
+#: ../src/common/stockitem.cpp:181
+msgid "&Preferences"
+msgstr "&Einstellungen"
+
+#: ../src/aui/tabmdi.cpp:112 ../src/generic/mdig.cpp:101
+#: ../src/msw/mdi.cpp:177
+msgid "&Previous"
+msgstr "&Zurück"
+
+#: ../src/richtext/richtextsizepage.cpp:675
+msgid "&Previous Paragraph"
+msgstr "&Vorheriger Absatz"
+
+#: ../src/common/stockitem.cpp:183
+msgid "&Print..."
+msgstr "&Drucken..."
+
+#: ../src/richtext/richtextctrl.cpp:332 ../src/richtext/richtextctrl.cpp:4945
+#: ../src/common/stockitem.cpp:184
+msgid "&Properties"
+msgstr "&Eigenschaften"
+
+#: ../src/common/stockitem.cpp:156
+msgid "&Quit"
+msgstr "&Beenden"
+
+#: ../src/richtext/richtextctrl.cpp:323 ../src/osx/textctrl_osx.cpp:580
+#: ../src/common/stockitem.cpp:185 ../src/common/cmdproc.cpp:293
+#: ../src/common/cmdproc.cpp:300 ../src/msw/textctrl.cpp:2281
+msgid "&Redo"
+msgstr "&Wiederholen"
+
+#: ../src/common/cmdproc.cpp:289 ../src/common/cmdproc.cpp:309
+msgid "&Redo "
+msgstr "&Wiederholen "
+
+#: ../src/richtext/richtextstyledlg.cpp:257
+msgid "&Rename Style..."
+msgstr "Stil &umbenennen..."
+
+#: ../src/generic/fdrepdlg.cpp:179
+msgid "&Replace"
+msgstr "&Ersetzen"
+
+#: ../src/richtext/richtextstyledlg.cpp:287
+msgid "&Restart numbering"
+msgstr "&Nummerierung Neustart"
+
+#: ../src/univ/themes/win32.cpp:3747
+msgid "&Restore"
+msgstr "&Wiederherstellen"
+
+#: ../src/richtext/richtextindentspage.cpp:146
+#: ../src/richtext/richtextliststylepage.cpp:335
+msgid "&Right"
+msgstr "&Rechts"
+
+#: ../src/richtext/richtextindentspage.cpp:213
+#: ../src/richtext/richtextborderspage.cpp:299
+#: ../src/richtext/richtextborderspage.cpp:443
+#: ../src/richtext/richtextliststylepage.cpp:399
+#: ../src/richtext/richtextmarginspage.cpp:212
+#: ../src/richtext/richtextmarginspage.cpp:326
+#: ../src/richtext/richtextsizepage.cpp:602
+#: ../src/richtext/richtextsizepage.cpp:609
+msgid "&Right:"
+msgstr "&Rechts:"
+
+#: ../src/common/stockitem.cpp:190
+msgid "&Save"
+msgstr "&Speichern"
+
+#: ../src/common/stockitem.cpp:191
+msgid "&Save as"
+msgstr "&Speichern unter"
+
+#: ../include/wx/richmsgdlg.h:29
+msgid "&See details"
+msgstr "&Einzelheiten anzeigen"
+
+#: ../src/generic/tipdlg.cpp:270
+msgid "&Show tips at startup"
+msgstr "&Tipps beim Programmstart zeigen"
+
+#: ../src/univ/themes/win32.cpp:3750
+msgid "&Size"
+msgstr "&Größe"
+
+#: ../src/richtext/richtextfontpage.cpp:168
+msgid "&Size:"
+msgstr "&Größe:"
+
+#: ../src/generic/progdlgg.cpp:282
+msgid "&Skip"
+msgstr "&Überspringen"
+
+#: ../src/richtext/richtextindentspage.cpp:242
+#: ../src/richtext/richtextliststylepage.cpp:417
+msgid "&Spacing (tenths of a mm)"
+msgstr "&Zeichenabstand (Zehntel-mm)"
+
+#: ../src/common/stockitem.cpp:197
+msgid "&Spell Check"
+msgstr "&Rechtschreibprüfung"
+
+#: ../src/common/stockitem.cpp:198
+msgid "&Stop"
+msgstr "&Stopp"
+
+#: ../src/richtext/richtextfontpage.cpp:284 ../src/common/stockitem.cpp:199
+msgid "&Strikethrough"
+msgstr "&Durchstreichen"
+
+#: ../src/generic/fontdlgg.cpp:382 ../src/richtext/richtextstylepage.cpp:104
+msgid "&Style:"
+msgstr "&Stil:"
+
+#: ../src/richtext/richtextstyledlg.cpp:198
+msgid "&Styles:"
+msgstr "&Stile:"
+
+#: ../src/richtext/richtextsymboldlg.cpp:413
+msgid "&Subset:"
+msgstr "&Teilsatz"
+
+#: ../src/richtext/richtextliststylepage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:222
+msgid "&Symbol:"
+msgstr "&Symbol:"
+
+#: ../include/wx/richtext/richtextbuffer.h:5679
+msgid "&Table"
+msgstr "&Tabelle"
+
+#: ../src/common/stockitem.cpp:200
+msgid "&Top"
+msgstr "&Oben"
+
+#: ../src/richtext/richtextborderspage.cpp:329
+#: ../src/richtext/richtextborderspage.cpp:473
+#: ../src/richtext/richtextmarginspage.cpp:235
+#: ../src/richtext/richtextmarginspage.cpp:349
+#: ../src/richtext/richtextsizepage.cpp:567
+#: ../src/richtext/richtextsizepage.cpp:574
+msgid "&Top:"
+msgstr "&Oben:"
+
+#: ../src/generic/fontdlgg.cpp:444 ../src/common/stockitem.cpp:202
+msgid "&Underline"
+msgstr "&Unterstrichen"
+
+#: ../src/richtext/richtextfontpage.cpp:243
+msgid "&Underlining:"
+msgstr "&Unterstreichen:"
+
+#: ../src/richtext/richtextctrl.cpp:322 ../src/osx/textctrl_osx.cpp:579
+#: ../src/common/stockitem.cpp:203 ../src/common/cmdproc.cpp:271
+#: ../src/msw/textctrl.cpp:2280
+msgid "&Undo"
+msgstr "&Rückgängig"
+
+#: ../src/common/cmdproc.cpp:265
+msgid "&Undo "
+msgstr "&Rückgängig "
+
+#: ../src/common/stockitem.cpp:204
+msgid "&Unindent"
+msgstr "&Einrücken"
+
+#: ../src/common/stockitem.cpp:205
+msgid "&Up"
+msgstr "&Hoch"
+
+#: ../src/richtext/richtextsizepage.cpp:278
+msgid "&Vertical alignment:"
+msgstr "&Vertikale Ausrichtung:"
+
+#: ../src/generic/dbgrptg.cpp:340
+msgid "&View..."
+msgstr "&Ansicht..."
+
+#: ../src/generic/fontdlgg.cpp:393
+msgid "&Weight:"
+msgstr "&Dicke:"
+
+#: ../src/richtext/richtextsizepage.cpp:317
+#: ../src/richtext/richtextsizepage.cpp:324
+msgid "&Width:"
+msgstr "&Dicke:"
+
+#: ../src/aui/tabmdi.cpp:311 ../src/aui/tabmdi.cpp:327
+#: ../src/aui/tabmdi.cpp:329 ../src/generic/mdig.cpp:294
+#: ../src/generic/mdig.cpp:310 ../src/generic/mdig.cpp:314
+#: ../src/msw/mdi.cpp:77
+msgid "&Window"
+msgstr "&Fenster"
+
+#: ../src/common/stockitem.cpp:206 ../src/msw/msgdlg.cpp:476
+msgid "&Yes"
+msgstr "&Ja"
+
+#: ../src/common/config.cpp:523 ../src/msw/regconf.cpp:258
+#, c-format
+msgid "'%s' has extra '..', ignored."
+msgstr "'%s' hat extra '..', ignoriert."
+
+#: ../src/common/valtext.cpp:249 ../src/common/valtext.cpp:251
+#: ../src/common/valtext.cpp:253 ../src/common/valtext.cpp:255
+#, c-format
+msgid "'%s' is invalid"
+msgstr "'%s' ist ungültig"
+
+#: ../src/common/cmdline.cpp:948 ../src/common/cmdline.cpp:966
+#, c-format
+msgid "'%s' is not a correct numeric value for option '%s'."
+msgstr "'%s' ist kein gültiger numerischer Wert für Option '%s'."
+
+#: ../src/common/translation.cpp:1086
+#, c-format
+msgid "'%s' is not a valid message catalog."
+msgstr "'%s' ist kein gültiger Nachrichtenkatalog."
+
+#: ../src/common/textbuf.cpp:239
+#, c-format
+msgid "'%s' is probably a binary buffer."
+msgstr "'%s' ist vermutlich ein Binärpuffer."
+
+#: ../src/common/valtext.cpp:247
+#, c-format
+msgid "'%s' should be numeric."
+msgstr "'%s' sollte numerisch sein."
+
+#: ../src/common/valtext.cpp:239
+#, c-format
+msgid "'%s' should only contain ASCII characters."
+msgstr "'%s' sollte ausschließlich ASCII-Zeichen enthalten."
+
+#: ../src/common/valtext.cpp:241
+#, c-format
+msgid "'%s' should only contain alphabetic characters."
+msgstr "'%s' sollte nur alphabetische Zeichen enthalten."
+
+#: ../src/common/valtext.cpp:243
+#, c-format
+msgid "'%s' should only contain alphabetic or numeric characters."
+msgstr "'%s' sollte nur alphanumerische Zeichen enthalten."
+
+#: ../src/common/valtext.cpp:245
+#, c-format
+msgid "'%s' should only contain digits."
+msgstr "'%s' sollte ausschließlich Ziffern enthalten."
+
+#: ../src/richtext/richtextliststylepage.cpp:229
+#: ../src/richtext/richtextbulletspage.cpp:179
+msgid "(*)"
+msgstr "(*)"
+
+#: ../src/html/helpwnd.cpp:976
+msgid "(Help)"
+msgstr "(Hilfe)"
+
+#: ../src/richtext/richtextliststylepage.cpp:481
+#: ../src/richtext/richtextbulletspage.cpp:286
+msgid "(None)"
+msgstr "(Kein)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:504
+msgid "(Normal text)"
+msgstr "(Normaler Text)"
+
+#: ../src/html/helpwnd.cpp:426 ../src/html/helpwnd.cpp:1119
+#: ../src/html/helpwnd.cpp:1745
+msgid "(bookmarks)"
+msgstr "(Lesezeichen)"
+
+#: ../src/richtext/richtextindentspage.cpp:274
+#: ../src/richtext/richtextindentspage.cpp:286
+#: ../src/richtext/richtextindentspage.cpp:287
+#: ../src/richtext/richtextindentspage.cpp:311
+#: ../src/richtext/richtextindentspage.cpp:326
+#: ../src/richtext/richtextformatdlg.cpp:831
+#: ../src/richtext/richtextfontpage.cpp:331
+#: ../src/richtext/richtextfontpage.cpp:335
+#: ../src/richtext/richtextfontpage.cpp:339
+#: ../src/richtext/richtextliststylepage.cpp:448
+#: ../src/richtext/richtextliststylepage.cpp:460
+#: ../src/richtext/richtextliststylepage.cpp:461
+msgid "(none)"
+msgstr "(Kein)"
+
+#: ../src/richtext/richtextliststylepage.cpp:492
+#: ../src/richtext/richtextbulletspage.cpp:297
+msgid "*"
+msgstr "*"
+
+#: ../src/richtext/richtextliststylepage.cpp:236
+#: ../src/richtext/richtextbulletspage.cpp:186
+msgid "*)"
+msgstr "*)"
+
+#: ../src/richtext/richtextliststylepage.cpp:495
+#: ../src/richtext/richtextbulletspage.cpp:300
+msgid "+"
+msgstr "+"
+
+#: ../src/msw/utils.cpp:1324
+msgid ", 64-bit edition"
+msgstr ", 64-bit Edition"
+
+#: ../src/richtext/richtextliststylepage.cpp:493
+#: ../src/richtext/richtextbulletspage.cpp:298
+msgid "-"
+msgstr "-"
+
+#: ../src/generic/filepickerg.cpp:66
+msgid "..."
+msgstr "..."
+
+#: ../src/richtext/richtextindentspage.cpp:276
+#: ../src/richtext/richtextliststylepage.cpp:450
+msgid "1.1"
+msgstr "1.1"
+
+#: ../src/richtext/richtextindentspage.cpp:277
+#: ../src/richtext/richtextliststylepage.cpp:451
+msgid "1.2"
+msgstr "1.2"
+
+#: ../src/richtext/richtextindentspage.cpp:278
+#: ../src/richtext/richtextliststylepage.cpp:452
+msgid "1.3"
+msgstr "1.3"
+
+#: ../src/richtext/richtextindentspage.cpp:279
+#: ../src/richtext/richtextliststylepage.cpp:453
+msgid "1.4"
+msgstr "1.4"
+
+#: ../src/richtext/richtextindentspage.cpp:280
+#: ../src/richtext/richtextliststylepage.cpp:454
+msgid "1.5"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:455
+msgid "1.6"
+msgstr "1.6"
+
+#: ../src/richtext/richtextindentspage.cpp:282
+#: ../src/richtext/richtextliststylepage.cpp:456
+msgid "1.7"
+msgstr "1.7"
+
+#: ../src/richtext/richtextindentspage.cpp:283
+#: ../src/richtext/richtextliststylepage.cpp:457
+msgid "1.8"
+msgstr "1.8"
+
+#: ../src/richtext/richtextindentspage.cpp:284
+#: ../src/richtext/richtextliststylepage.cpp:458
+msgid "1.9"
+msgstr "1.9"
+
+#: ../src/common/paper.cpp:141
+msgid "10 x 11 in"
+msgstr "10 x 11 Zoll"
+
+#: ../src/common/paper.cpp:114
+msgid "10 x 14 in"
+msgstr "10 x 14 Zoll"
+
+#: ../src/common/paper.cpp:115
+msgid "11 x 17 in"
+msgstr "11 x 17 Zoll"
+
+#: ../src/common/paper.cpp:185
+msgid "12 x 11 in"
+msgstr "12 x 11 Zoll"
+
+#: ../src/common/paper.cpp:142
+msgid "15 x 11 in"
+msgstr "15 x 11 Zoll"
+
+#: ../src/richtext/richtextindentspage.cpp:285
+#: ../src/richtext/richtextliststylepage.cpp:459
+msgid "2"
+msgstr "2"
+
+#: ../src/common/paper.cpp:133
+msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in"
+msgstr "6 3/4 Umschlag, 3 5/8 x 6 1/2 Zoll"
+
+#: ../src/common/paper.cpp:140
+msgid "9 x 11 in"
+msgstr "9 x 11 Zoll"
+
+#: ../src/html/htmprint.cpp:431
+msgid ": file does not exist!"
+msgstr ": Datei existiert nicht!"
+
+#: ../src/common/fontmap.cpp:199
+msgid ": unknown charset"
+msgstr ": unbekannter Zeichensatz"
+
+#: ../src/common/fontmap.cpp:413
+msgid ": unknown encoding"
+msgstr ": unbekannte Kodierung"
+
+#: ../src/generic/wizard.cpp:437
+msgid "< &Back"
+msgstr "< &Zurück"
+
+#: ../src/osx/carbon/fontdlg.cpp:608 ../src/osx/carbon/fontdlg.cpp:815
+#: ../src/osx/carbon/fontdlg.cpp:835
+msgid "<Any Decorative>"
+msgstr "<Beliebig Dekorativ>"
+
+#: ../src/osx/carbon/fontdlg.cpp:609 ../src/osx/carbon/fontdlg.cpp:817
+#: ../src/osx/carbon/fontdlg.cpp:837
+msgid "<Any Modern>"
+msgstr "<Beliebig Modern>"
+
+#: ../src/osx/carbon/fontdlg.cpp:607 ../src/osx/carbon/fontdlg.cpp:813
+#: ../src/osx/carbon/fontdlg.cpp:833
+msgid "<Any Roman>"
+msgstr "<Beliebig Roman>"
+
+#: ../src/osx/carbon/fontdlg.cpp:610 ../src/osx/carbon/fontdlg.cpp:819
+#: ../src/osx/carbon/fontdlg.cpp:839
+msgid "<Any Script>"
+msgstr "<Beliebig Script>"
+
+#: ../src/osx/carbon/fontdlg.cpp:611 ../src/osx/carbon/fontdlg.cpp:824
+#: ../src/osx/carbon/fontdlg.cpp:843
+msgid "<Any Swiss>"
+msgstr "<Beliebig Swiss>"
+
+#: ../src/osx/carbon/fontdlg.cpp:612 ../src/osx/carbon/fontdlg.cpp:821
+#: ../src/osx/carbon/fontdlg.cpp:841
+msgid "<Any Teletype>"
+msgstr "<Beliebig Schreibmaschine>"
+
+#: ../src/osx/carbon/fontdlg.cpp:606
+msgid "<Any>"
+msgstr "<Beliebig>"
+
+#: ../src/generic/filectrlg.cpp:286 ../src/generic/filectrlg.cpp:309
+msgid "<DIR>"
+msgstr "<VERZEICHNIS>"
+
+#: ../src/generic/filectrlg.cpp:290 ../src/generic/filectrlg.cpp:313
+msgid "<DRIVE>"
+msgstr "<LAUFWERK>"
+
+#: ../src/generic/filectrlg.cpp:288 ../src/generic/filectrlg.cpp:311
+msgid "<LINK>"
+msgstr "<LINK>"
+
+#: ../src/html/helpwnd.cpp:1279
+msgid "<b><i>Bold italic face.</i></b><br>"
+msgstr "<b><i>Fette kursive Schrift</i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1283
+msgid "<b><i>bold italic <u>underlined</u></i></b><br>"
+msgstr "<b><i>fett kursiv <u>unterstrichen</u></i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1278
+msgid "<b>Bold face.</b> "
+msgstr "<b>Fette Schrift.</b> "
+
+#: ../src/html/helpwnd.cpp:1277
+msgid "<i>Italic face.</i> "
+msgstr "<i>Kursive Schrift.</i> "
+
+#: ../src/richtext/richtextliststylepage.cpp:494
+#: ../src/richtext/richtextbulletspage.cpp:299
+msgid ">"
+msgstr ">"
+
+#: ../src/generic/dbgrptg.cpp:318
+msgid "A debug report has been generated in the directory\n"
+msgstr "Ein Fehlerbericht wurde erstellt im Verzeichnis\n"
+
+#: ../src/common/debugrpt.cpp:578
+msgid "A debug report has been generated. It can be found in"
+msgstr "Ein Fehlerbericht wurde erstellt. Er liegt im Verzeichnis"
+
+#: ../src/common/xtixml.cpp:418
+msgid "A non empty collection must consist of 'element' nodes"
+msgstr "Eine nicht leere Sammlung muss aus 'element'-Knoten bestehen"
+
+#: ../src/richtext/richtextliststylepage.cpp:304
+#: ../src/richtext/richtextliststylepage.cpp:306
+#: ../src/richtext/richtextbulletspage.cpp:257
+#: ../src/richtext/richtextbulletspage.cpp:259
+msgid "A standard bullet name."
+msgstr "Ein vordefinierter Gliederungspunkt."
+
+#: ../src/common/paper.cpp:218
+msgid "A0 sheet, 841 x 1189 mm"
+msgstr "A0 Blatt, 841 x 1189 mm"
+
+#: ../src/common/paper.cpp:219
+msgid "A1 sheet, 594 x 841 mm"
+msgstr "A1 Blatt, 594 x 841 mm"
+
+#: ../src/common/paper.cpp:160
+msgid "A2 420 x 594 mm"
+msgstr "A2 420 x 594 mm"
+
+#: ../src/common/paper.cpp:157
+msgid "A3 Extra 322 x 445 mm"
+msgstr "A3 Extra 322 x 445 mm"
+
+#: ../src/common/paper.cpp:162
+msgid "A3 Extra Transverse 322 x 445 mm"
+msgstr "A3 Extra Quer 322 x 445 mm"
+
+#: ../src/common/paper.cpp:171
+msgid "A3 Rotated 420 x 297 mm"
+msgstr "A3 Rotiert 420 x 297 mm"
+
+#: ../src/common/paper.cpp:161
+msgid "A3 Transverse 297 x 420 mm"
+msgstr "A3 Quer 297 x 420 mm"
+
+#: ../src/common/paper.cpp:107
+msgid "A3 sheet, 297 x 420 mm"
+msgstr "A3 Blatt, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:147
+msgid "A4 Extra 9.27 x 12.69 in"
+msgstr "A4 Extra 9.27 x 12.69 Zoll"
+
+#: ../src/common/paper.cpp:154
+msgid "A4 Plus 210 x 330 mm"
+msgstr "A4 Plus 210 x 330 mm"
+
+#: ../src/common/paper.cpp:172
+msgid "A4 Rotated 297 x 210 mm"
+msgstr "A4 Rotiert 297 x 210 mm"
+
+#: ../src/common/paper.cpp:149
+msgid "A4 Transverse 210 x 297 mm"
+msgstr "A4 Quer 210 x 297 mm"
+
+#: ../src/common/paper.cpp:98
+msgid "A4 sheet, 210 x 297 mm"
+msgstr "A4 Blatt, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:108
+msgid "A4 small sheet, 210 x 297 mm"
+msgstr "A4 klein Blatt, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:158
+msgid "A5 Extra 174 x 235 mm"
+msgstr "A5 Extra 174 x 235 mm"
+
+#: ../src/common/paper.cpp:173
+msgid "A5 Rotated 210 x 148 mm"
+msgstr "A5 Rotiert 210 x 148 mm"
+
+#: ../src/common/paper.cpp:155
+msgid "A5 Transverse 148 x 210 mm"
+msgstr "A5 Quer 148 x 210 mm"
+
+#: ../src/common/paper.cpp:109
+msgid "A5 sheet, 148 x 210 mm"
+msgstr "A4 Blatt, 148 x 210 mm"
+
+#: ../src/common/paper.cpp:165
+msgid "A6 105 x 148 mm"
+msgstr "A6 105 x 148 mm"
+
+#: ../src/common/paper.cpp:178
+msgid "A6 Rotated 148 x 105 mm"
+msgstr "A6 Rotiert 148 x 105 mm"
+
+#: ../src/generic/fontdlgg.cpp:83 ../src/richtext/richtextformatdlg.cpp:526
+#: ../src/osx/carbon/fontdlg.cpp:339
+msgid "ABCDEFGabcdefg12345"
+msgstr "ABCDEFGabcdefg12345ÄÖÜßäöü"
+
+#: ../src/common/accelcmn.cpp:76
+msgid "ADD"
+msgstr "HINZUFÜGEN"
+
+#: ../src/richtext/richtextsymboldlg.cpp:458 ../src/common/ftp.cpp:405
+msgid "ASCII"
+msgstr "ASCII"
+
+#: ../src/osx/menu_osx.cpp:630 ../src/common/stockitem.cpp:139
+msgid "About"
+msgstr "Über"
+
+#: ../src/generic/aboutdlgg.cpp:140 ../src/msw/aboutdlg.cpp:64
+#, c-format
+msgid "About %s"
+msgstr "Über %s"
+
+#: ../src/richtext/richtextsizepage.cpp:520
+msgid "Absolute"
+msgstr "Absolut"
+
+#: ../src/common/stockitem.cpp:207
+msgid "Actual Size"
+msgstr "Tatsächliche Größe"
+
+#: ../src/common/stockitem.cpp:140
+msgid "Add"
+msgstr "Hinzufügen"
+
+#: ../src/richtext/richtextbuffer.cpp:10751
+#, fuzzy
+msgid "Add Column"
+msgstr "Spalte hinzufügen"
+
+#: ../src/richtext/richtextbuffer.cpp:10688
+#, fuzzy
+msgid "Add Row"
+msgstr "Zeile hinzufügen"
+
+#: ../src/html/helpwnd.cpp:439
+msgid "Add current page to bookmarks"
+msgstr "Aktuelle HTML-Seite den Lesezeichen hinzufügen"
+
+#: ../src/generic/colrdlgg.cpp:283
+msgid "Add to custom colours"
+msgstr "Zu Benutzerfarben hinzufügen"
+
+#: ../include/wx/xtiprop.h:259
+msgid "AddToPropertyCollection called on a generic accessor"
+msgstr "AddToPropertyCollection aufgerufen für einen allgemeinen accessor"
+
+#: ../include/wx/xtiprop.h:197
+msgid "AddToPropertyCollection called w/o valid adder"
+msgstr "AddToPropertyCollection aufgerufen ohne gültigen adder"
+
+#: ../src/html/helpctrl.cpp:159
+#, c-format
+msgid "Adding book %s"
+msgstr "Buch %s wird hinzugefügt"
+
+#: ../src/osx/carbon/dataview.cpp:1933
+msgid "Adding flavor TEXT failed"
+msgstr "Das Hinzufügen der Variante TEXT schlug fehl"
+
+#: ../src/osx/carbon/dataview.cpp:1954
+msgid "Adding flavor utxt failed"
+msgstr "Das Hinzufügen der Variante utxt schlug fehl"
+
+#: ../src/common/preferencescmn.cpp:41
+msgid "Advanced"
+msgstr "Erweitert"
+
+#: ../src/richtext/richtextliststylepage.cpp:435
+msgid "After a paragraph:"
+msgstr "Nach einem Absatz:"
+
+#: ../src/common/stockitem.cpp:172
+msgid "Align Left"
+msgstr "Linksbündig"
+
+#: ../src/common/stockitem.cpp:173
+msgid "Align Right"
+msgstr "Rechtsbündig"
+
+#: ../src/richtext/richtextsizepage.cpp:266
+msgid "Alignment"
+msgstr "Ausrichtung"
+
+#: ../src/generic/prntdlgg.cpp:215
+msgid "All"
+msgstr "Alle"
+
+#: ../src/generic/filectrlg.cpp:1205 ../src/common/fldlgcmn.cpp:89
+#, c-format
+msgid "All files (%s)|%s"
+msgstr "Alle Dateien (%s)|%s"
+
+#: ../include/wx/defs.h:2922
+msgid "All files (*)|*"
+msgstr "Alle Dateien (*)|*"
+
+#: ../include/wx/defs.h:2919
+msgid "All files (*.*)|*.*"
+msgstr "Alle Dateien (*.*)|*.*"
+
+#: ../src/richtext/richtextstyles.cpp:1057
+msgid "All styles"
+msgstr "Alle Stile"
+
+#: ../src/propgrid/manager.cpp:1496
+msgid "Alphabetic Mode"
+msgstr "Alphabetischer Modus"
+
+#: ../src/common/xtistrm.cpp:429
+msgid "Already Registered Object passed to SetObjectClassInfo"
+msgstr "Ein bereits registriertes Objekt wurde an SetObjectClassInfo übergeben"
+
+#: ../src/unix/dialup.cpp:353
+msgid "Already dialling ISP."
+msgstr "Wähle bereits ISP."
+
+#: ../src/common/accelcmn.cpp:320 ../src/univ/themes/win32.cpp:3756
+msgid "Alt+"
+msgstr "Alt+"
+
+#: ../src/common/debugrpt.cpp:581
+msgid "And includes the following files:\n"
+msgstr "Und enthält die folgenden Dateien:\n"
+
+#: ../src/generic/animateg.cpp:162
+#, c-format
+msgid "Animation file is not of type %ld."
+msgstr "Animationsdatei hat nicht den Typ %ld."
+
+#: ../src/generic/logg.cpp:1034
+#, c-format
+msgid "Append log to file '%s' (choosing [No] will overwrite it)?"
+msgstr "An Logdatei '%s' anhängen ([Nein] wird sie ersetzen)?"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:610
+#: ../src/osx/menu_osx.cpp:649 ../src/osx/menu_osx.cpp:657
+msgid "Application"
+msgstr "Anwendung"
+
+#: ../src/common/stockitem.cpp:141
+msgid "Apply"
+msgstr "Übernehmen"
+
+#: ../src/richtext/richtextliststylepage.cpp:482
+#: ../src/richtext/richtextbulletspage.cpp:287
+msgid "Arabic"
+msgstr "Arabisch"
+
+#: ../src/common/fmapbase.cpp:153
+msgid "Arabic (ISO-8859-6)"
+msgstr "Arabisch (ISO-8859-6)"
+
+#: ../src/msw/ole/automtn.cpp:661
+#, c-format
+msgid "Argument %u not found."
+msgstr "Hilfeverzeichnis %u nicht gefunden."
+
+#: ../src/generic/aboutdlgg.cpp:184
+msgid "Artists"
+msgstr "Künstler"
+
+#: ../src/common/stockitem.cpp:195
+msgid "Ascending"
+msgstr "Absteigend"
+
+#: ../src/generic/filectrlg.cpp:468
+msgid "Attributes"
+msgstr "Eigenschaften"
+
+#: ../src/richtext/richtextliststylepage.cpp:294
+#: ../src/richtext/richtextbulletspage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:247
+msgid "Available fonts."
+msgstr "Verfügbare Schriftarten."
+
+#: ../src/common/paper.cpp:138
+msgid "B4 (ISO) 250 x 353 mm"
+msgstr "B4 (ISO) 250 x 353 mm"
+
+#: ../src/common/paper.cpp:174
+msgid "B4 (JIS) Rotated 364 x 257 mm"
+msgstr "B4 (JIS) Rotiert 364 x 257 mm"
+
+#: ../src/common/paper.cpp:128
+msgid "B4 Envelope, 250 x 353 mm"
+msgstr "B4 Umschlag, 250 x 353 mm"
+
+#: ../src/common/paper.cpp:110
+msgid "B4 sheet, 250 x 354 mm"
+msgstr "B4 Blatt, 250 x 354 mm"
+
+#: ../src/common/paper.cpp:159
+msgid "B5 (ISO) Extra 201 x 276 mm"
+msgstr "B5 (ISO) Extra 201 x 276 mm"
+
+#: ../src/common/paper.cpp:175
+msgid "B5 (JIS) Rotated 257 x 182 mm"
+msgstr "B5 (JIS) Rotiert 257 x 182 mm"
+
+#: ../src/common/paper.cpp:156
+msgid "B5 (JIS) Transverse 182 x 257 mm"
+msgstr "B5 (JIS) Quer 182 x 257 mm"
+
+#: ../src/common/paper.cpp:129
+msgid "B5 Envelope, 176 x 250 mm"
+msgstr "B5 Umschlag, 176 x 250 mm"
+
+#: ../src/common/paper.cpp:111
+msgid "B5 sheet, 182 x 257 millimeter"
+msgstr "B5 Blatt, 182 x 257 mm"
+
+#: ../src/common/paper.cpp:183
+msgid "B6 (JIS) 128 x 182 mm"
+msgstr "B6 (JIS) 128 x 182 mm"
+
+#: ../src/common/paper.cpp:184
+msgid "B6 (JIS) Rotated 182 x 128 mm"
+msgstr "B6 (JIS) Rotiert 182 x 128 mm"
+
+#: ../src/common/paper.cpp:130
+msgid "B6 Envelope, 176 x 125 mm"
+msgstr "B6 Umschlag, 176 x 125 mm"
+
+#: ../src/common/accelcmn.cpp:49
+msgid "BACK"
+msgstr "ZURÜCK"
+
+#: ../src/common/imagbmp.cpp:523 ../src/common/imagbmp.cpp:553
+#: ../src/common/imagbmp.cpp:568
+msgid "BMP: Couldn't allocate memory."
+msgstr "BMP: Speicheranforderung gescheitert."
+
+#: ../src/common/imagbmp.cpp:97
+msgid "BMP: Couldn't save invalid image."
+msgstr "BMP: Konnte ungültiges Bild nicht speichern."
+
+#: ../src/common/imagbmp.cpp:338
+msgid "BMP: Couldn't write RGB color map."
+msgstr "BMP: Konnte RGB Farbtabelle nicht speichern."
+
+#: ../src/common/imagbmp.cpp:473
+msgid "BMP: Couldn't write data."
+msgstr "BMP: Konnte Daten nicht speichern."
+
+#: ../src/common/imagbmp.cpp:239
+msgid "BMP: Couldn't write the file (Bitmap) header."
+msgstr "BMP: Dateikopf (Bitmap) konnte nicht geschrieben werden."
+
+#: ../src/common/imagbmp.cpp:262
+msgid "BMP: Couldn't write the file (BitmapInfo) header."
+msgstr "BMP: Dateikopf (BitmapInfo) konnte nicht geschrieben werden."
+
+#: ../src/common/imagbmp.cpp:133
+msgid "BMP: wxImage doesn't have own wxPalette."
+msgstr "BMP: wxImage hat keine eigene wxPalette."
+
+#: ../src/common/stockitem.cpp:142
+msgid "Back"
+msgstr "Zurück"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:119
+#: ../src/richtext/richtextformatdlg.cpp:374
+msgid "Background"
+msgstr "Hintergrund"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:131
+msgid "Background &colour:"
+msgstr "Hintergrund&farbe:"
+
+#: ../src/osx/carbon/fontdlg.cpp:406
+msgid "Background colour"
+msgstr "Hintergrundfarbe"
+
+#: ../src/common/fmapbase.cpp:160
+msgid "Baltic (ISO-8859-13)"
+msgstr "Baltisch (ISO-8859-13)"
+
+#: ../src/common/fmapbase.cpp:151
+msgid "Baltic (old) (ISO-8859-4)"
+msgstr "Baltisch (alt) (ISO-8859-4)"
+
+#: ../src/richtext/richtextliststylepage.cpp:426
+msgid "Before a paragraph:"
+msgstr "Vor einem Absatz:"
+
+#: ../src/richtext/richtextliststylepage.cpp:489
+#: ../src/richtext/richtextbulletspage.cpp:294
+msgid "Bitmap"
+msgstr "Bitmap"
+
+#: ../src/osx/carbon/dataview.cpp:2396
+msgid "Bitmap renderer cannot render value; value type: "
+msgstr "Bitmapdarsteller kann den Wert nicht wiedergeben; Typ des Werts:"
+
+#: ../src/generic/fontdlgg.cpp:333 ../src/richtext/richtextfontpage.cpp:337
+#: ../src/osx/carbon/fontdlg.cpp:540 ../src/common/stockitem.cpp:143
+msgid "Bold"
+msgstr "Fett"
+
+#: ../src/richtext/richtextborderspage.cpp:256
+#: ../src/richtext/richtextborderspage.cpp:389
+msgid "Border"
+msgstr "Berandung"
+
+#: ../src/richtext/richtextformatdlg.cpp:368
+msgid "Borders"
+msgstr "Berandungen"
+
+#: ../src/richtext/richtextsizepage.cpp:288 ../src/common/stockitem.cpp:144
+msgid "Bottom"
+msgstr "Unten"
+
+#: ../src/generic/prntdlgg.cpp:893
+msgid "Bottom margin (mm):"
+msgstr "Unterer Rand (mm)"
+
+#: ../src/richtext/richtextbuffer.cpp:8919
+msgid "Box Properties"
+msgstr "Eigenschaften"
+
+#: ../src/richtext/richtextstyles.cpp:1061
+msgid "Box styles"
+msgstr "Box Stile"
+
+#: ../src/common/filepickercmn.cpp:43 ../src/common/filepickercmn.cpp:44
+msgid "Browse"
+msgstr "Durchsuchen"
+
+#: ../src/richtext/richtextliststylepage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:195
+msgid "Bullet &Alignment:"
+msgstr "&Ausrichtung der Gliederungspunkte:"
+
+#: ../src/richtext/richtextliststylepage.cpp:309
+msgid "Bullet style"
+msgstr "Stil der Gliederungspunkte"
+
+#: ../src/richtext/richtextformatdlg.cpp:342
+msgid "Bullets"
+msgstr "Gliederungspunkte"
+
+#: ../src/common/paper.cpp:99
+msgid "C sheet, 17 x 22 in"
+msgstr "C Blatt, 17 x 22 Zoll"
+
+#: ../src/generic/logg.cpp:520
+msgid "C&lear"
+msgstr "&Löschen"
+
+#: ../src/generic/fontdlgg.cpp:406
+msgid "C&olour:"
+msgstr "&Farbe:"
+
+#: ../src/common/paper.cpp:124
+msgid "C3 Envelope, 324 x 458 mm"
+msgstr "C3 Umschlag, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:125
+msgid "C4 Envelope, 229 x 324 mm"
+msgstr "C4 Umschlag, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:123
+msgid "C5 Envelope, 162 x 229 mm"
+msgstr "C5 Umschlag, 162 x 229 mm"
+
+#: ../src/common/paper.cpp:126
+msgid "C6 Envelope, 114 x 162 mm"
+msgstr "C6 Umschlag, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:127
+msgid "C65 Envelope, 114 x 229 mm"
+msgstr "C65 Umschlag, 114 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:66
+msgid "CANCEL"
+msgstr "ABBRECHEN"
+
+#: ../src/common/accelcmn.cpp:70
+msgid "CAPITAL"
+msgstr "KAPITALIEN"
+
+#: ../src/common/stockitem.cpp:146
+msgid "CD-Rom"
+msgstr "CD-Rom"
+
+#: ../src/html/chm.cpp:815 ../src/html/chm.cpp:874
+msgid "CHM handler currently supports only local files!"
+msgstr "CHM-Handler unterstützt derzeit nur lokale Dateien."
+
+#: ../src/common/accelcmn.cpp:67
+msgid "CLEAR"
+msgstr "LÖSCHEN"
+
+#: ../src/common/accelcmn.cpp:111
+msgid "COMMAND"
+msgstr "BEFEHL"
+
+#: ../src/richtext/richtextfontpage.cpp:291
+msgid "Ca&pitals"
+msgstr "Ka&pitalien"
+
+#: ../src/common/cmdproc.cpp:267
+msgid "Can't &Undo "
+msgstr "Kann nicht rückgängig machen "
+
+#: ../src/common/image.cpp:2686
+msgid "Can't automatically determine the image format for non-seekable input."
+msgstr ""
+"Das Bildformat für nicht durchsuchbare Eingabe kann nicht bestimmt werden."
+
+#: ../src/msw/registry.cpp:505
+#, c-format
+msgid "Can't close registry key '%s'"
+msgstr "Kann Registrierungsschlüssel '%s' nicht schließen."
+
+#: ../src/msw/registry.cpp:583
+#, c-format
+msgid "Can't copy values of unsupported type %d."
+msgstr "Kann Inhalte des nicht unterstützten Typs %d nicht kopieren."
+
+#: ../src/msw/registry.cpp:486
+#, c-format
+msgid "Can't create registry key '%s'"
+msgstr "Kann Registrierungsschlüssel '%s' nicht anlegen."
+
+#: ../src/msw/thread.cpp:696 ../src/os2/thread.cpp:494
+msgid "Can't create thread"
+msgstr "Kann Thread nicht erzeugen"
+
+#: ../src/msw/window.cpp:3793
+#, c-format
+msgid "Can't create window of class %s"
+msgstr "Kann kein Fenster der Klasse '%s' anlegen."
+
+#: ../src/msw/registry.cpp:776
+#, c-format
+msgid "Can't delete key '%s'"
+msgstr "Kann Schlüssel '%s' nicht löschen"
+
+#: ../src/msw/iniconf.cpp:458 ../src/os2/iniconf.cpp:471
+#, c-format
+msgid "Can't delete the INI file '%s'"
+msgstr "Kann INI-Datei '%s' nicht löschen"
+
+#: ../src/msw/registry.cpp:804
+#, c-format
+msgid "Can't delete value '%s' from key '%s'"
+msgstr "Kann Wert '%s' von Schlüssel '%s' nicht löschen."
+
+#: ../src/msw/registry.cpp:1161
+#, c-format
+msgid "Can't enumerate subkeys of key '%s'"
+msgstr "Kann Unterschlüssel von '%s' nicht auflisten"
+
+#: ../src/msw/registry.cpp:1116
+#, c-format
+msgid "Can't enumerate values of key '%s'"
+msgstr "Kann Werte von Schlüssel '%s' nicht auflisten"
+
+#: ../src/msw/registry.cpp:1379
+#, c-format
+msgid "Can't export value of unsupported type %d."
+msgstr "Kann Wert des nicht unterstützten Typs %d nicht kopieren."
+
+#: ../src/common/ffile.cpp:236
+#, c-format
+msgid "Can't find current position in file '%s'"
+msgstr "Kann aktuelle Position in Datei '%s' nicht finden."
+
+#: ../src/msw/registry.cpp:416
+#, c-format
+msgid "Can't get info about registry key '%s'"
+msgstr "Kann keine Information über den Registrierungsschlüssel '%s' finden"
+
+#: ../src/common/zstream.cpp:346
+msgid "Can't initialize zlib deflate stream."
+msgstr "Kann das Entpacken der zlib-Daten nicht initialisieren"
+
+#: ../src/common/zstream.cpp:185
+msgid "Can't initialize zlib inflate stream."
+msgstr "Kann das komprimieren der zlib-Daten nicht initialisieren"
+
+#: ../src/msw/fswatcher.cpp:432
+#, c-format
+msgid "Can't monitor non-existent directory \"%s\" for changes."
+msgstr ""
+"Das nicht vorhandene Verzeichnis \"%s\"  kann nicht nach Änderungen "
+"durchsucht werden."
+
+#: ../src/msw/registry.cpp:452
+#, c-format
+msgid "Can't open registry key '%s'"
+msgstr "Kann Registrierungsschlüssel '%s' nicht öffnen"
+
+#: ../src/common/zstream.cpp:252
+#, c-format
+msgid "Can't read from inflate stream: %s"
+msgstr "Kann nicht vom entpackten Datenstrom lesen:%s"
+
+#: ../src/common/zstream.cpp:244
+msgid "Can't read inflate stream: unexpected EOF in underlying stream."
+msgstr ""
+"Kann den Entkomprimier-Strom nicht lesen: Unerwartetes EOF im "
+"zugrundeliegenden Strom."
+
+#: ../src/msw/registry.cpp:1048
+#, c-format
+msgid "Can't read value of '%s'"
+msgstr "Kann Wert von '%s' nicht lesen"
+
+#: ../src/msw/registry.cpp:877 ../src/msw/registry.cpp:909
+#: ../src/msw/registry.cpp:971
+#, c-format
+msgid "Can't read value of key '%s'"
+msgstr "Kann Wert von Eintrag '%s' nicht lesen"
+
+#: ../src/common/image.cpp:2483
+#, c-format
+msgid "Can't save image to file '%s': unknown extension."
+msgstr "Kann Bild nicht aus Datei '%s' laden: Unbekannte Dateiendung."
+
+#: ../src/generic/logg.cpp:579 ../src/generic/logg.cpp:996
+msgid "Can't save log contents to file."
+msgstr "Kann Logtexte nicht in Datei speichern."
+
+#: ../src/msw/thread.cpp:652 ../src/os2/thread.cpp:477
+msgid "Can't set thread priority"
+msgstr "Kann Thread-Priorität nicht setzen"
+
+#: ../src/msw/registry.cpp:895 ../src/msw/registry.cpp:939
+#: ../src/msw/registry.cpp:1065
+#, c-format
+msgid "Can't set value of '%s'"
+msgstr "Kann Wert von '%s' nicht setzen"
+
+#: ../src/unix/utilsunx.cpp:357
+msgid "Can't write to child process's stdin"
+msgstr "Kann nicht in den Standard-Eingabekanal des Kindprozesses schreiben"
+
+#: ../src/common/zstream.cpp:427
+#, c-format
+msgid "Can't write to deflate stream: %s"
+msgstr "Kann nicht in den gepackten Datenstrom schreiben: %s"
+
+#: ../include/wx/msgdlg.h:274 ../src/generic/dirdlgg.cpp:107
+#: ../src/richtext/richtextstyledlg.cpp:300 ../src/common/stockitem.cpp:145
+#: ../src/msw/msgdlg.cpp:489 ../src/msw/progdlg.cpp:673
+#: ../src/gtk1/fontdlg.cpp:144 ../src/motif/msgdlg.cpp:196
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#: ../src/os2/thread.cpp:116
+msgid "Cannot create mutex."
+msgstr "Kann Mutex nicht anlegen."
+
+#: ../src/osx/carbon/dataview.cpp:895
+msgid "Cannot create new column's ID. Probably max. number of columns reached."
+msgstr ""
+"Es können keine neuen ID Zeilen angelegt werden. Warscheinlich ist die "
+"maximale Anzahl an Zeilen erreicht."
+
+#: ../src/common/filefn.cpp:1336
+#, c-format
+msgid "Cannot enumerate files '%s'"
+msgstr "Kann Dateien '%s' nicht auflisten"
+
+#: ../src/msw/dir.cpp:264
+#, c-format
+msgid "Cannot enumerate files in directory '%s'"
+msgstr "Kann Dateien in Verzeichnis '%s' nicht auflisten"
+
+#: ../src/msw/dialup.cpp:542
+#, c-format
+msgid "Cannot find active dialup connection: %s"
+msgstr "Kann keine aktive DFÜ-Verbindung finden: %s"
+
+#: ../src/msw/dialup.cpp:848
+msgid "Cannot find the location of address book file"
+msgstr "Kann Adressbuchdatei nicht finden"
+
+#: ../src/msw/ole/automtn.cpp:562
+#, c-format
+msgid "Cannot get an active instance of \"%s\""
+msgstr "Kann kein aktives Exemplar von \"%s\" bekommen"
+
+#: ../src/unix/threadpsx.cpp:1030
+#, c-format
+msgid "Cannot get priority range for scheduling policy %d."
+msgstr "Kein Prioritätsbereich für Scheduling-Verfahren %d ermittelbar."
+
+#: ../src/unix/utilsunx.cpp:988
+msgid "Cannot get the hostname"
+msgstr "Hostnamen nicht ermittelbar"
+
+#: ../src/unix/utilsunx.cpp:1024
+msgid "Cannot get the official hostname"
+msgstr "Offizieller Hostname nicht ermittelbar"
+
+#: ../src/msw/dialup.cpp:949
+msgid "Cannot hang up - no active dialup connection."
+msgstr "Kann nicht auflegen - keine aktive DFÜ-Verbindung vorhanden."
+
+#: ../include/wx/msw/ole/oleutils.h:52
+msgid "Cannot initialize OLE"
+msgstr "Kann OLE nicht initialisieren"
+
+#: ../src/common/socket.cpp:847
+msgid "Cannot initialize sockets"
+msgstr "Kann Sockets nicht initialisieren"
+
+#: ../src/msw/volume.cpp:620
+#, c-format
+msgid "Cannot load icon from '%s'."
+msgstr "Kann das Icon nicht von '%s' laden."
+
+#: ../src/xrc/xmlres.cpp:361
+#, c-format
+msgid "Cannot load resources from '%s'."
+msgstr "Kann die Ressourcen nicht aus '%s' laden."
+
+#: ../src/xrc/xmlres.cpp:746
+#, c-format
+msgid "Cannot load resources from file '%s'."
+msgstr "Kann die Ressourcen nicht aus der Datei '%s' laden."
+
+#: ../src/html/htmlfilt.cpp:137
+#, c-format
+msgid "Cannot open HTML document: %s"
+msgstr "HTML-Dokument %s kann nicht geöffnet werden"
+
+#: ../src/html/helpdata.cpp:665
+#, c-format
+msgid "Cannot open HTML help book: %s"
+msgstr "HTML-Hilfebuch %s kann nicht geöffnet werden"
+
+#: ../src/html/helpdata.cpp:297
+#, c-format
+msgid "Cannot open contents file: %s"
+msgstr "Kann den Inhalt der Datei %s nicht öffnen!"
+
+#: ../src/generic/dcpsg.cpp:1751
+msgid "Cannot open file for PostScript printing!"
+msgstr "Kann Datei für den Postscriptdruck nicht öffnen!"
+
+#: ../src/html/helpdata.cpp:311
+#, c-format
+msgid "Cannot open index file: %s"
+msgstr "Kann Indexdatei %s nicht öffnen!"
+
+#: ../src/xrc/xmlres.cpp:728
+#, c-format
+msgid "Cannot open resources file '%s'."
+msgstr "Kann die Ressourcendatei '%s' nicht öffnen."
+
+#: ../src/html/helpwnd.cpp:1537
+msgid "Cannot print empty page."
+msgstr "Leere Seite kann nicht gedruckt werden."
+
+#: ../src/msw/volume.cpp:507
+#, c-format
+msgid "Cannot read typename from '%s'!"
+msgstr "Kann die Typnamen nicht aus '%s' lesen!"
+
+#: ../src/os2/thread.cpp:527
+#, c-format
+msgid "Cannot resume thread %lu"
+msgstr "Kann Thread %lu nicht fortsetzen."
+
+#: ../src/msw/thread.cpp:923
+#, c-format
+msgid "Cannot resume thread %lx"
+msgstr "Kann Thread %lx nicht fortsetzen"
+
+#: ../src/unix/threadpsx.cpp:1011
+msgid "Cannot retrieve thread scheduling policy."
+msgstr "Kann Scheduling-Verfahren der Threads nicht ermitteln"
+
+#: ../src/common/intl.cpp:542
+#, c-format
+msgid "Cannot set locale to language \"%s\"."
+msgstr "Lokalisierung kann nicht auf die Sprache \"%s\" gesetzt werden."
+
+#: ../src/unix/threadpsx.cpp:831 ../src/msw/thread.cpp:569
+msgid "Cannot start thread: error writing TLS."
+msgstr "Kann Thread nicht starten: Fehler beim Beschreiben des TLS."
+
+#: ../src/os2/thread.cpp:513
+#, c-format
+msgid "Cannot suspend thread %lu"
+msgstr "Kann Thread %lu nicht anhalten."
+
+#: ../src/msw/thread.cpp:907
+#, fuzzy, c-format
+msgid "Cannot suspend thread %lx"
+msgstr "Kann Thread %lx nicht anhalten."
+
+#: ../src/msw/thread.cpp:830
+msgid "Cannot wait for thread termination"
+msgstr "Kann nicht auf Threadende warten"
+
+#: ../src/html/helpwnd.cpp:546
+msgid "Case sensitive"
+msgstr "Groß-/Kleinschreibung"
+
+#: ../src/propgrid/manager.cpp:1495
+msgid "Categorized Mode"
+msgstr "Bestimmter Modus"
+
+#: ../src/richtext/richtextbuffer.cpp:9347
+msgid "Cell Properties"
+msgstr "Zelleneigenschaften"
+
+#: ../src/common/fmapbase.cpp:161
+msgid "Celtic (ISO-8859-14)"
+msgstr "Keltisch (ISO-8859-14)"
+
+#: ../src/richtext/richtextindentspage.cpp:160
+#: ../src/richtext/richtextliststylepage.cpp:349
+msgid "Cen&tred"
+msgstr "Zen&triert"
+
+#: ../src/common/stockitem.cpp:170
+msgid "Centered"
+msgstr "Zentriert"
+
+#: ../src/common/fmapbase.cpp:149
+msgid "Central European (ISO-8859-2)"
+msgstr "Zentraleuropäisch (ISO-8859-2)"
+
+#: ../src/richtext/richtextliststylepage.cpp:250
+#: ../src/richtext/richtextbulletspage.cpp:200
+msgid "Centre"
+msgstr "Zentriert"
+
+#: ../src/richtext/richtextindentspage.cpp:162
+#: ../src/richtext/richtextindentspage.cpp:164
+#: ../src/richtext/richtextliststylepage.cpp:351
+#: ../src/richtext/richtextliststylepage.cpp:353
+msgid "Centre text."
+msgstr "Zentriere Text."
+
+#: ../src/richtext/richtextsizepage.cpp:287
+msgid "Centred"
+msgstr "Zentriert"
+
+#: ../src/richtext/richtextliststylepage.cpp:280
+#: ../src/richtext/richtextbulletspage.cpp:232
+msgid "Ch&oose..."
+msgstr "Wä&hle..."
+
+#: ../src/richtext/richtextbuffer.cpp:4041
+msgid "Change List Style"
+msgstr "Ändere den Stil der Liste"
+
+#: ../src/richtext/richtextbuffer.cpp:3392
+msgid "Change Object Style"
+msgstr "Ändere den Stil des Objektes"
+
+#: ../src/richtext/richtextbuffer.cpp:3658
+#: ../src/richtext/richtextbuffer.cpp:7749
+msgid "Change Properties"
+msgstr "Ändere Eigenschaften"
+
+#: ../src/richtext/richtextbuffer.cpp:3209
+msgid "Change Style"
+msgstr "Ändere Stil"
+
+#: ../src/common/fileconf.cpp:372
+#, c-format
+msgid "Changes won't be saved to avoid overwriting the existing file \"%s\""
+msgstr ""
+"Änderungen werden nicht gesichert um das Überschreiben der vorhandenen "
+"Datei  \"%s\" zu vermeiden."
+
+#: ../src/richtext/richtextstyles.cpp:1059
+msgid "Character styles"
+msgstr "Zeichenstil"
+
+#: ../src/richtext/richtextliststylepage.cpp:224
+#: ../src/richtext/richtextliststylepage.cpp:226
+#: ../src/richtext/richtextbulletspage.cpp:174
+#: ../src/richtext/richtextbulletspage.cpp:176
+msgid "Check to add a period after the bullet."
+msgstr "Klicken um einen Punkt nach dem Gliederungspunkt hinzuzufügen."
+
+#: ../src/richtext/richtextliststylepage.cpp:238
+#: ../src/richtext/richtextliststylepage.cpp:240
+#: ../src/richtext/richtextbulletspage.cpp:188
+#: ../src/richtext/richtextbulletspage.cpp:190
+msgid "Check to add a right parenthesis."
+msgstr "Klicken um eine schließende Klammer hinzuzufügen."
+
+#: ../src/richtext/richtextliststylepage.cpp:231
+#: ../src/richtext/richtextliststylepage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:181
+#: ../src/richtext/richtextbulletspage.cpp:183
+msgid "Check to enclose the bullet in parentheses."
+msgstr "Klicken um den Gliederungspunkt in Klammern zu setzen."
+
+#: ../src/osx/carbon/fontdlg.cpp:542 ../src/osx/carbon/fontdlg.cpp:544
+msgid "Check to make the font bold."
+msgstr "Klicken um die Schriftart auf fett zu stellen."
+
+#: ../src/osx/carbon/fontdlg.cpp:549 ../src/osx/carbon/fontdlg.cpp:551
+msgid "Check to make the font italic."
+msgstr "Klicken um die Schriftart auf kursiv zu stellen."
+
+#: ../src/osx/carbon/fontdlg.cpp:558 ../src/osx/carbon/fontdlg.cpp:560
+msgid "Check to make the font underlined."
+msgstr "Klicken um die Schriftart auf unterstrichen zu stellen."
+
+#: ../src/richtext/richtextstyledlg.cpp:289
+#: ../src/richtext/richtextstyledlg.cpp:291
+msgid "Check to restart numbering."
+msgstr "Klicken um die Nummerierung neu zu starten"
+
+#: ../src/richtext/richtextfontpage.cpp:286
+#: ../src/richtext/richtextfontpage.cpp:288
+msgid "Check to show a line through the text."
+msgstr "Klicken um eine Linie durch den Text zu ziehen."
+
+#: ../src/richtext/richtextfontpage.cpp:293
+#: ../src/richtext/richtextfontpage.cpp:295
+msgid "Check to show the text in capitals."
+msgstr "Markieren um den Text in Großbuchstaben anzuzeigen."
+
+#: ../src/richtext/richtextfontpage.cpp:300
+#: ../src/richtext/richtextfontpage.cpp:302
+msgid "Check to show the text in small capitals."
+msgstr "Markieren um den Text in Kapitälchen darzustellen."
+
+#: ../src/richtext/richtextfontpage.cpp:314
+#: ../src/richtext/richtextfontpage.cpp:316
+msgid "Check to show the text in subscript."
+msgstr "Klicken um den Text tiefgestellt anzuzeigen."
+
+#: ../src/richtext/richtextfontpage.cpp:307
+#: ../src/richtext/richtextfontpage.cpp:309
+msgid "Check to show the text in superscript."
+msgstr "Klicken um den Text hochgestellt anzuzeigen."
+
+#: ../src/msw/dialup.cpp:784
+msgid "Choose ISP to dial"
+msgstr "Wähle anzuwählenden ISP"
+
+#: ../src/propgrid/props.cpp:1643
+msgid "Choose a directory:"
+msgstr "Verzeichnis wählen:"
+
+#: ../src/propgrid/props.cpp:1702
+msgid "Choose a file"
+msgstr "Datei wählen"
+
+#: ../src/generic/colrdlgg.cpp:144 ../src/gtk/colordlg.cpp:63
+msgid "Choose colour"
+msgstr "Wähle Farbe"
+
+#: ../src/generic/fontpickerg.cpp:50 ../src/gtk/fontdlg.cpp:75
+#: ../src/gtk1/fontdlg.cpp:125
+msgid "Choose font"
+msgstr "Wähle Schriftart"
+
+#: ../src/common/module.cpp:74
+#, c-format
+msgid "Circular dependency involving module \"%s\" detected."
+msgstr "Zirkuläre Abhängigkeit betreffend das Modul \"%s\" erkannt."
+
+#: ../src/aui/tabmdi.cpp:108 ../src/generic/mdig.cpp:97
+msgid "Cl&ose"
+msgstr "Schließen"
+
+#: ../src/msw/ole/automtn.cpp:673
+msgid "Class not registered."
+msgstr "Klasse nicht registriert."
+
+#: ../src/common/stockitem.cpp:147
+msgid "Clear"
+msgstr "Löschen"
+
+#: ../src/generic/logg.cpp:520
+msgid "Clear the log contents"
+msgstr "Logtexte löschen"
+
+#: ../src/richtext/richtextstyledlg.cpp:252
+#: ../src/richtext/richtextstyledlg.cpp:254
+msgid "Click to apply the selected style."
+msgstr "Klicken um den ausgewählten Stil anzuwenden."
+
+#: ../src/richtext/richtextliststylepage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:283
+#: ../src/richtext/richtextbulletspage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:235
+msgid "Click to browse for a symbol."
+msgstr "Klicken um nach einem Symbol zu navigieren."
+
+#: ../src/osx/carbon/fontdlg.cpp:589 ../src/osx/carbon/fontdlg.cpp:591
+msgid "Click to cancel changes to the font."
+msgstr "Klicken um die Änderungen der Schriftart zu verwerfen."
+
+#: ../src/generic/fontdlgg.cpp:472 ../src/generic/fontdlgg.cpp:491
+msgid "Click to cancel the font selection."
+msgstr "Klicken um Wahl der Schriftart abzubrechen."
+
+#: ../src/osx/carbon/fontdlg.cpp:570 ../src/osx/carbon/fontdlg.cpp:572
+msgid "Click to change the font colour."
+msgstr "Klicken um die Farbe der Schriftart zu ändern."
+
+#: ../src/richtext/richtextfontpage.cpp:276
+#: ../src/richtext/richtextfontpage.cpp:278
+msgid "Click to change the text background colour."
+msgstr "Klicken um die Hintergrundfarbe des Textes zu ändern."
+
+#: ../src/richtext/richtextfontpage.cpp:263
+#: ../src/richtext/richtextfontpage.cpp:265
+msgid "Click to change the text colour."
+msgstr "Klicken um die Textfarbe zu ändern."
+
+#: ../src/richtext/richtextliststylepage.cpp:195
+#: ../src/richtext/richtextliststylepage.cpp:197
+msgid "Click to choose the font for this level."
+msgstr "Klicken um die Schriftart für diese Ebene zu wählen."
+
+#: ../src/richtext/richtextstyledlg.cpp:279
+#: ../src/richtext/richtextstyledlg.cpp:281
+msgid "Click to close this window."
+msgstr "Klicken um dieses Fenster zu schließen."
+
+#: ../src/osx/carbon/fontdlg.cpp:596 ../src/osx/carbon/fontdlg.cpp:598
+msgid "Click to confirm changes to the font."
+msgstr "Klicken um die Änderungen der Schriftart zu bestätigen."
+
+#: ../src/generic/fontdlgg.cpp:477 ../src/generic/fontdlgg.cpp:479
+#: ../src/generic/fontdlgg.cpp:484 ../src/generic/fontdlgg.cpp:486
+msgid "Click to confirm the font selection."
+msgstr "Klicken um Wahl der Schriftart zu bestätigen."
+
+#: ../src/richtext/richtextstyledlg.cpp:244
+#: ../src/richtext/richtextstyledlg.cpp:246
+msgid "Click to create a new box style."
+msgstr "Klicken um einen neuen Box Stil zu erzeugen."
+
+#: ../src/richtext/richtextstyledlg.cpp:226
+#: ../src/richtext/richtextstyledlg.cpp:228
+msgid "Click to create a new character style."
+msgstr "Klicken um einen neuen Zeichenstil zu erzeugen."
+
+#: ../src/richtext/richtextstyledlg.cpp:238
+#: ../src/richtext/richtextstyledlg.cpp:240
+msgid "Click to create a new list style."
+msgstr "Klicken um einen neuen Listenstil zu erzeugen."
+
+#: ../src/richtext/richtextstyledlg.cpp:232
+#: ../src/richtext/richtextstyledlg.cpp:234
+msgid "Click to create a new paragraph style."
+msgstr "Klicken um einen neuen Absatzstil zu erzeugen."
+
+#: ../src/richtext/richtexttabspage.cpp:137
+#: ../src/richtext/richtexttabspage.cpp:139
+msgid "Click to create a new tab position."
+msgstr "Klicken um eine neue Tabulatorposition zu erzeugen."
+
+#: ../src/richtext/richtexttabspage.cpp:149
+#: ../src/richtext/richtexttabspage.cpp:151
+msgid "Click to delete all tab positions."
+msgstr "Klicken um alle Tabulatorpositionen zu löschen."
+
+#: ../src/richtext/richtextstyledlg.cpp:270
+#: ../src/richtext/richtextstyledlg.cpp:272
+msgid "Click to delete the selected style."
+msgstr "Klicken um den ausgewählten Stil zu löschen."
+
+#: ../src/richtext/richtexttabspage.cpp:143
+#: ../src/richtext/richtexttabspage.cpp:145
+msgid "Click to delete the selected tab position."
+msgstr "Klicken um die ausgewählte Tabulatorposition zu löschen."
+
+#: ../src/richtext/richtextstyledlg.cpp:264
+#: ../src/richtext/richtextstyledlg.cpp:266
+msgid "Click to edit the selected style."
+msgstr "Klicken um den ausgewählten Stil zu bearbeiten."
+
+#: ../src/richtext/richtextstyledlg.cpp:258
+#: ../src/richtext/richtextstyledlg.cpp:260
+msgid "Click to rename the selected style."
+msgstr "Klicken um den ausgewählten Stil umzubenennen."
+
+#: ../src/generic/dbgrptg.cpp:97 ../src/generic/progdlgg.cpp:804
+#: ../src/generic/progdlgg.cpp:809 ../src/richtext/richtextstyledlg.cpp:277
+#: ../src/richtext/richtextsymboldlg.cpp:476 ../src/common/stockitem.cpp:148
+#: ../src/msw/progdlg.cpp:170 ../src/msw/progdlg.cpp:679
+#: ../src/html/helpdlg.cpp:90
+msgid "Close"
+msgstr "Schließen"
+
+#: ../src/aui/tabmdi.cpp:109 ../src/generic/mdig.cpp:98
+msgid "Close All"
+msgstr "Alles Schließen"
+
+#: ../src/common/stockitem.cpp:266
+msgid "Close current document"
+msgstr "Aktuelles Dokument schließen"
+
+#: ../src/generic/logg.cpp:522
+msgid "Close this window"
+msgstr "Fenster schließen"
+
+#: ../src/common/stockitem.cpp:193
+msgid "Color"
+msgstr "Farbe"
+
+#: ../src/richtext/richtextformatdlg.cpp:725
+msgid "Colour"
+msgstr "Farbe"
+
+#: ../src/msw/colordlg.cpp:156
+#, c-format
+msgid "Colour selection dialog failed with error %0lx."
+msgstr "Farbauswahldialog schlug mit Fehler %0lx fehl."
+
+#: ../src/osx/carbon/fontdlg.cpp:566
+msgid "Colour:"
+msgstr "Farbe:"
+
+#: ../src/osx/carbon/dataview.cpp:900
+msgid "Column could not be added."
+msgstr "Zeile konnte nicht hinzugefügt werden."
+
+#: ../src/osx/carbon/dataview.cpp:899
+msgid "Column description could not be initialized."
+msgstr "Zeilenbeschreibung konnte nicht installiert werden."
+
+#: ../src/osx/carbon/dataview.cpp:1538 ../src/osx/carbon/dataview.cpp:1559
+msgid "Column index not found."
+msgstr "Zeilenindex nicht gefunden."
+
+#: ../src/osx/carbon/dataview.cpp:1614
+msgid "Column width could not be determined"
+msgstr "Zeilenbreite kann nicht bestimmt werden"
+
+#: ../src/osx/carbon/dataview.cpp:901
+msgid "Column width could not be set."
+msgstr "Zeilenbreite kann nicht gesetzt werden."
+
+#: ../src/common/init.cpp:188
+#, c-format
+msgid ""
+"Command line argument %d couldn't be converted to Unicode and will be "
+"ignored."
+msgstr ""
+"Kommandozeilenargument %d konnte nicht nach Unicode konvertiert werden und "
+"wird ignoriert."
+
+#: ../src/msw/fontdlg.cpp:119
+#, c-format
+msgid "Common dialog failed with error code %0lx."
+msgstr "Allgemeiner Dialog schlug fehl mit dem Fehlercode %0lx."
+
+#: ../src/gtk/window.cpp:4306
+msgid ""
+"Compositing not supported by this system, please enable it in your Window "
+"Manager."
+msgstr ""
+"Zusammenfügen wird nicht durch dieses System unterstützt, bitte über den "
+"Fenster Manager einstellen."
+
+#: ../src/html/helpwnd.cpp:1554
+msgid "Compressed HTML Help file (*.chm)|*.chm|"
+msgstr "Komprimierte HTML-Hilfedatei (*.chm)|*.chm|"
+
+#: ../src/generic/dirctrlg.cpp:544
+msgid "Computer"
+msgstr "Computer"
+
+#: ../src/common/fileconf.cpp:965
+#, c-format
+msgid "Config entry name cannot start with '%c'."
+msgstr ""
+"Die Bezeichnung des Konfigurations-Eintrags kann nicht mit '%c' beginnen."
+
+#: ../src/gtk/filedlg.cpp:59
+msgid "Confirm"
+msgstr "Bestätigen"
+
+#: ../src/msw/mimetype.cpp:739
+msgid "Confirm registry update"
+msgstr "Aktualisierung der Registry bestätigen"
+
+#: ../src/html/htmlwin.cpp:544
+msgid "Connecting..."
+msgstr "Verbinde..."
+
+#: ../src/html/helpwnd.cpp:482
+msgid "Contents"
+msgstr "Inhalte"
+
+#: ../src/common/strconv.cpp:2261
+#, c-format
+msgid "Conversion to charset '%s' doesn't work."
+msgstr "Konvertierung zum Zeichensatz '%s' funktioniert nicht."
+
+#: ../src/common/stockitem.cpp:149
+msgid "Convert"
+msgstr "Konvertieren"
+
+#: ../src/html/htmlwin.cpp:1057
+#, c-format
+msgid "Copied to clipboard:\"%s\""
+msgstr "In Zwischenablage kopiert:\"%s\""
+
+#: ../src/generic/prntdlgg.cpp:247
+msgid "Copies:"
+msgstr "Kopien:"
+
+#: ../src/common/stockitem.cpp:150 ../src/stc/stc_i18n.cpp:18
+msgid "Copy"
+msgstr "Kopieren"
+
+#: ../src/common/stockitem.cpp:258
+msgid "Copy selection"
+msgstr "Auswahl kopieren"
+
+#: ../src/html/chm.cpp:718
+#, c-format
+msgid "Could not create temporary file '%s'"
+msgstr "Konnte temporäre Datei %s nicht erzeugen"
+
+#: ../src/osx/carbon/dataview.cpp:1285 ../src/osx/carbon/dataview.cpp:1672
+msgid "Could not determine column index."
+msgstr "Konnte Zeilenindex nicht bestimmen."
+
+#: ../src/osx/carbon/dataview.cpp:876
+msgid "Could not determine column's position"
+msgstr "Zeilenposition kann nicht bestimmt werden"
+
+#: ../src/osx/carbon/dataview.cpp:843
+msgid "Could not determine number of columns."
+msgstr "Anzahl an Zeilen konnte nicht ermittelt werden."
+
+#: ../src/osx/carbon/dataview.cpp:975
+msgid "Could not determine number of items"
+msgstr "Konnte Anzahl der Elemente nicht bestimmen"
+
+#: ../src/html/chm.cpp:273
+#, c-format
+msgid "Could not extract %s into %s: %s"
+msgstr "Konnte nicht %s in %s extrahieren: %s"
+
+#: ../src/generic/tabg.cpp:1048
+msgid "Could not find tab for id"
+msgstr "Konnte Seite für ID nicht finden"
+
+#: ../src/osx/carbon/dataview.cpp:2556 ../src/osx/carbon/dataview.cpp:2591
+#: ../src/osx/carbon/dataview.cpp:2615 ../src/osx/carbon/dataview.cpp:2636
+#: ../src/osx/carbon/dataview.cpp:2773
+msgid "Could not get header description."
+msgstr "Konnte Kopfzeilenbeschreibung nicht erhalten."
+
+#: ../src/osx/carbon/dataview.cpp:1169 ../src/osx/carbon/dataview.cpp:1195
+msgid "Could not get items."
+msgstr "Konnte die Elemente nicht erhalten."
+
+#: ../src/osx/carbon/dataview.cpp:2659 ../src/osx/carbon/dataview.cpp:2724
+msgid "Could not get property flags."
+msgstr "Konnte die Eigenschaftsflags nicht erhalten."
+
+#: ../src/osx/carbon/dataview.cpp:726
+msgid "Could not get selected items."
+msgstr "Konnte die ausgewählten Elemente nicht erhalten."
+
+#: ../src/html/chm.cpp:444
+#, c-format
+msgid "Could not locate file '%s'."
+msgstr "Konnte Datei %s nicht finden."
+
+#: ../src/osx/carbon/dataview.cpp:845
+msgid "Could not remove column."
+msgstr "Konnte die Zeile nicht entfernen."
+
+#: ../src/osx/carbon/dataview.cpp:642
+msgid "Could not retrieve number of items"
+msgstr "Konnte die Anzahl der Elemente nicht erhalten."
+
+#: ../src/osx/carbon/dataview.cpp:2572
+msgid "Could not set alignment."
+msgstr "Konnte die Ausrichtung nicht setzen."
+
+#: ../src/osx/carbon/dataview.cpp:2803
+msgid "Could not set column width."
+msgstr "Konnte die Zeilenbreite nicht setzen."
+
+#: ../src/common/filefn.cpp:1569
+msgid "Could not set current working directory"
+msgstr "Konnte das Arbeitsverzeichnis nicht setzen"
+
+#: ../src/osx/carbon/dataview.cpp:2775
+msgid "Could not set header description."
+msgstr "Konnte die Kopfzeilenbeschreibung nicht setzen."
+
+#: ../src/osx/carbon/dataview.cpp:2596
+msgid "Could not set icon."
+msgstr "Konnte Sinnbild nicht setzen."
+
+#: ../src/osx/carbon/dataview.cpp:2617
+msgid "Could not set maximum width."
+msgstr "Konnte die maximale Breite nicht setzen."
+
+#: ../src/osx/carbon/dataview.cpp:2638
+msgid "Could not set minimum width."
+msgstr "Minimale Breite kann nicht gesetzt werden."
+
+#: ../src/osx/carbon/dataview.cpp:2664 ../src/osx/carbon/dataview.cpp:2729
+msgid "Could not set property flags."
+msgstr "Konnte Eigenschaftsflag nicht setzen."
+
+#: ../src/common/prntbase.cpp:1985
+msgid "Could not start document preview."
+msgstr "Kann Druckvorschau nicht starten."
+
+#: ../src/generic/printps.cpp:178 ../src/msw/printwin.cpp:210
+#: ../src/gtk/print.cpp:1077
+msgid "Could not start printing."
+msgstr "Kann Ausdruck nicht beginnen."
+
+#: ../src/common/wincmn.cpp:2131
+msgid "Could not transfer data to window"
+msgstr "Kann Daten nicht ins Fenster übertragen."
+
+#: ../src/os2/thread.cpp:160
+msgid "Couldn't acquire a mutex lock"
+msgstr "Konnte Mutex-Sperre nicht bekommen"
+
+#: ../src/msw/imaglist.cpp:166 ../src/msw/imaglist.cpp:197
+#: ../src/msw/imaglist.cpp:209 ../src/msw/dragimag.cpp:193
+#: ../src/msw/dragimag.cpp:232
+msgid "Couldn't add an image to the image list."
+msgstr "Kann Bild nicht zur Liste hinzufügen."
+
+#: ../src/msw/timer.cpp:134 ../src/os2/timer.cpp:113
+msgid "Couldn't create a timer"
+msgstr "Kann keinen Timer anlegen."
+
+#: ../src/osx/carbon/overlay.cpp:122
+msgid "Couldn't create the overlay window"
+msgstr "Konnte das überlagerte Fenster nicht erzeugen."
+
+#: ../src/common/translation.cpp:2015
+msgid "Couldn't enumerate translations"
+msgstr "Konnte Übersetzungen nicht aufzählen"
+
+#: ../src/common/dynlib.cpp:152
+#, c-format
+msgid "Couldn't find symbol '%s' in a dynamic library"
+msgstr "Kann Symbol '%s' in der dynamischen Bibliothek nicht finden"
+
+#: ../src/gtk/print.cpp:2014
+msgid "Couldn't get hatch style from wxBrush."
+msgstr "Konnte den Schraffurstil von wxBrush nicht erfragen."
+
+#: ../src/msw/thread.cpp:950
+msgid "Couldn't get the current thread pointer"
+msgstr "Kann den aktuellen Threadzeiger nicht bekommen."
+
+#: ../src/osx/carbon/overlay.cpp:129
+msgid "Couldn't init the context on the overlay window"
+msgstr "Konnte den Kontext auf dem überlagerten Fenster nicht initialisieren."
+
+#: ../src/common/imaggif.cpp:263
+msgid "Couldn't initialize GIF hash table."
+msgstr "GIF Hash-Tabelle konnte nicht initialisiert werden."
+
+#: ../src/common/imagpng.cpp:657
+msgid "Couldn't load a PNG image - file is corrupted or not enough memory."
+msgstr ""
+"Konnte PNG-Bild nicht laden - Datei ist beschädigt oder der Speicher reicht "
+"nicht aus."
+
+#: ../src/unix/sound.cpp:470
+#, c-format
+msgid "Couldn't load sound data from '%s'."
+msgstr "Kann die Klangdaten nicht von '%s' laden."
+
+#: ../src/msw/dirdlg.cpp:441
+msgid "Couldn't obtain folder name"
+msgstr "Verzeichnisname konnte nicht ermittelt werden."
+
+#: ../src/unix/sound_sdl.cpp:229
+#, c-format
+msgid "Couldn't open audio: %s"
+msgstr "Fehler beim Öffnen der Audiodatei: %s"
+
+#: ../src/msw/ole/dataobj.cpp:350
+#, c-format
+msgid "Couldn't register clipboard format '%s'."
+msgstr "Konnte Zwischenablage-Format '%s' nicht registrieren."
+
+#: ../src/os2/thread.cpp:177
+msgid "Couldn't release a mutex"
+msgstr "Konnte einen Mutex nicht freigeben."
+
+#: ../src/msw/listctrl.cpp:756
+#, c-format
+msgid "Couldn't retrieve information about list control item %d."
+msgstr "Kann keine Informationen über das Listenelement %d bekommen."
+
+#: ../src/common/imagpng.cpp:746 ../src/common/imagpng.cpp:757
+#: ../src/common/imagpng.cpp:767
+msgid "Couldn't save PNG image."
+msgstr "Konnte PNG-Bild nicht speichern."
+
+#: ../src/msw/thread.cpp:715
+msgid "Couldn't terminate thread"
+msgstr "Kann Thread nicht beenden"
+
+#: ../src/common/xtistrm.cpp:170
+#, c-format
+msgid "Create Parameter %s not found in declared RTTI Parameters"
+msgstr ""
+"Erzeugungsparameter %s nicht in den deklarierten RTTI-Parametern gefunden"
+
+#: ../src/generic/dirdlgg.cpp:317
+msgid "Create directory"
+msgstr "Verzeichnis anlegen"
+
+#: ../src/generic/filedlgg.cpp:228 ../src/generic/dirdlgg.cpp:131
+msgid "Create new directory"
+msgstr "Neues Verzeichnis anlegen"
+
+#: ../src/common/accelcmn.cpp:322
+msgid "Ctrl+"
+msgstr "Strg+"
+
+#: ../src/richtext/richtextctrl.cpp:325 ../src/osx/textctrl_osx.cpp:582
+#: ../src/common/stockitem.cpp:151 ../src/msw/textctrl.cpp:2283
+msgid "Cu&t"
+msgstr "Ausschneiden"
+
+#: ../src/generic/filectrlg.cpp:956
+msgid "Current directory:"
+msgstr "Aktuelles Verzeichnis:"
+
+#: ../src/gtk/print.cpp:759
+msgid "Custom size"
+msgstr "Angepasste Größe"
+
+#: ../src/common/headerctrlcmn.cpp:60
+msgid "Customize Columns"
+msgstr "Zeilen anpassen"
+
+#: ../src/common/stockitem.cpp:151 ../src/stc/stc_i18n.cpp:17
+msgid "Cut"
+msgstr "Ausschneiden"
+
+#: ../src/common/stockitem.cpp:259
+msgid "Cut selection"
+msgstr "Auswahl ausschneiden"
+
+#: ../src/common/fmapbase.cpp:152
+msgid "Cyrillic (ISO-8859-5)"
+msgstr "Kyrillisch (ISO-8859-5)"
+
+#: ../src/common/paper.cpp:100
+msgid "D sheet, 22 x 34 in"
+msgstr "D Blatt, 22 x 34 Zoll"
+
+#: ../src/msw/dde.cpp:708
+msgid "DDE poke request failed"
+msgstr "DDE 'poke' Anfrage gescheitert"
+
+#: ../src/common/accelcmn.cpp:79
+msgid "DECIMAL"
+msgstr "DEZIMAL"
+
+#: ../src/common/accelcmn.cpp:47
+msgid "DEL"
+msgstr "ENTF"
+
+#: ../src/common/accelcmn.cpp:48
+msgid "DELETE"
+msgstr "ENTFERNEN"
+
+#: ../src/common/imagbmp.cpp:1092
+msgid "DIB Header: Encoding doesn't match bitdepth."
+msgstr "DIB-Header: Kodierung entspricht nicht der Bittiefe."
+
+#: ../src/common/imagbmp.cpp:1040
+msgid "DIB Header: Image height > 32767 pixels for file."
+msgstr "DIB-Header: Bildhöhe > 32767 pixels."
+
+#: ../src/common/imagbmp.cpp:1032
+msgid "DIB Header: Image width > 32767 pixels for file."
+msgstr "DIB-Header: Bildbreite > 32767 pixels."
+
+#: ../src/common/imagbmp.cpp:1060
+msgid "DIB Header: Unknown bitdepth in file."
+msgstr "DIB-Header: Unbekannte Bittiefe."
+
+#: ../src/common/imagbmp.cpp:1074
+msgid "DIB Header: Unknown encoding in file."
+msgstr "DIB-Header: Unbekannte Kodierung."
+
+#: ../src/common/accelcmn.cpp:80
+msgid "DIVIDE"
+msgstr "TEILE"
+
+#: ../src/common/paper.cpp:122
+msgid "DL Envelope, 110 x 220 mm"
+msgstr "DL Umschlag, 110 x 220 mm"
+
+#: ../src/common/accelcmn.cpp:59
+msgid "DOWN"
+msgstr "RUNTER"
+
+#: ../src/richtext/richtextborderspage.cpp:545
+msgid "Dashed"
+msgstr "Gestrichelt"
+
+#: ../src/osx/carbon/dataview.cpp:1921
+msgid "Data object has invalid data format"
+msgstr "Dateiobjekt hat ein ungültiges Dateiformat"
+
+#: ../src/osx/carbon/dataview.cpp:2491
+msgid "Date renderer cannot render value; value type: "
+msgstr "Datums Renderer kann den Wert nicht darstellen; Wert Typ:"
+
+#: ../src/generic/dbgrptg.cpp:300
+#, c-format
+msgid "Debug report \"%s\""
+msgstr "Fehlerbericht \"%s\""
+
+#: ../src/common/debugrpt.cpp:210
+msgid "Debug report couldn't be created."
+msgstr "Fehlerbericht konnte nicht erstellt werden."
+
+#: ../src/common/debugrpt.cpp:558
+msgid "Debug report generation has failed."
+msgstr "Das Erstellen des Fehlerberichts ist fehlgeschlagen."
+
+#: ../src/generic/fontdlgg.cpp:323
+msgid "Decorative"
+msgstr "Dekorativ"
+
+#: ../src/common/fmapbase.cpp:796
+msgid "Default encoding"
+msgstr "Standardkodierung"
+
+#: ../src/dfb/fontmgr.cpp:180
+msgid "Default font"
+msgstr "Standardschriftart"
+
+#: ../src/generic/prntdlgg.cpp:510
+msgid "Default printer"
+msgstr "Standarddrucker"
+
+#: ../src/richtext/richtextbuffer.cpp:7841 ../src/common/stockitem.cpp:152
+#: ../src/stc/stc_i18n.cpp:20
+msgid "Delete"
+msgstr "Löschen"
+
+#: ../src/richtext/richtexttabspage.cpp:148
+msgid "Delete A&ll"
+msgstr "A&lles löschen"
+
+#: ../src/richtext/richtextbuffer.cpp:10637
+#, fuzzy
+msgid "Delete Column"
+msgstr "Spalte löschen"
+
+#: ../src/richtext/richtextbuffer.cpp:10587
+#, fuzzy
+msgid "Delete Row"
+msgstr "Zeile löschen"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+msgid "Delete Style"
+msgstr "Stil löschen"
+
+#: ../src/richtext/richtextctrl.cpp:1231 ../src/richtext/richtextctrl.cpp:1452
+msgid "Delete Text"
+msgstr "Text löschen"
+
+#: ../src/generic/editlbox.cpp:274
+msgid "Delete item"
+msgstr "Element löschen"
+
+#: ../src/common/stockitem.cpp:260
+msgid "Delete selection"
+msgstr "Auswahl löschen"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+#, c-format
+msgid "Delete style %s?"
+msgstr "Stil %s löschen?"
+
+#: ../src/unix/snglinst.cpp:295
+#, c-format
+msgid "Deleted stale lock file '%s'."
+msgstr "Ungenutzte Sperr-Datei '%s' wurde gelöscht."
+
+#: ../src/common/module.cpp:124
+#, c-format
+msgid "Dependency \"%s\" of module \"%s\" doesn't exist."
+msgstr "Abhängigkeit \"%s\" des Moduls \"%s\" existiert nicht."
+
+#: ../src/common/stockitem.cpp:196
+msgid "Descending"
+msgstr "Absteigend"
+
+#: ../src/generic/dirctrlg.cpp:626
+msgid "Desktop"
+msgstr "Arbeitsoberfläche"
+
+#: ../src/generic/aboutdlgg.cpp:70
+msgid "Developed by "
+msgstr "Entwickelt von "
+
+#: ../src/generic/aboutdlgg.cpp:176
+msgid "Developers"
+msgstr "Entwickler"
+
+#: ../src/msw/dialup.cpp:393
+msgid ""
+"Dial up functions are unavailable because the remote access service (RAS) is "
+"not installed on this machine. Please install it."
+msgstr ""
+"DFÜ-Verbindungs-Funktionen stehen nicht zur Verfügung, da der RAS-Dienst "
+"(Remote Access Service) auf dieser Maschine nicht installiert ist. Bitte "
+"installieren."
+
+#: ../src/generic/tipdlg.cpp:230
+msgid "Did you know..."
+msgstr "Wussten Sie schon..."
+
+#: ../src/dfb/wrapdfb.cpp:63
+#, c-format
+msgid "DirectFB error %d occurred."
+msgstr "DirectFB-Fehler %d aufgetreten."
+
+#: ../src/motif/filedlg.cpp:219
+msgid "Directories"
+msgstr "Verzeichnisse"
+
+#: ../src/common/filefn.cpp:1251
+#, c-format
+msgid "Directory '%s' couldn't be created"
+msgstr "Verzeichnis '%s' konnte nicht angelegt werden."
+
+#: ../src/common/filefn.cpp:1271
+#, c-format
+msgid "Directory '%s' couldn't be deleted"
+msgstr "Verzeichnis '%s' konnte nicht gelöscht werden."
+
+#: ../src/generic/dirdlgg.cpp:233
+msgid "Directory does not exist"
+msgstr "Verzeichnis existiert nicht"
+
+#: ../src/generic/filectrlg.cpp:1412
+msgid "Directory doesn't exist."
+msgstr "Verzeichnis existiert nicht"
+
+#: ../src/common/docview.cpp:455
+msgid "Discard changes and reload the last saved version?"
+msgstr "Änderungen verwerfen und letzte gesicherte Version laden?"
+
+#: ../src/html/helpwnd.cpp:512
+msgid ""
+"Display all index items that contain given substring. Search is case "
+"insensitive."
+msgstr ""
+"Zeige alle Indexelemente an, die den gegebenen Suchbegriff enthalten. Groß-/"
+"Kleinschreibung wird nicht beachtet."
+
+#: ../src/html/helpwnd.cpp:692
+msgid "Display options dialog"
+msgstr "Einstellungen-Dialog anzeigen"
+
+#: ../src/html/helpwnd.cpp:326
+msgid "Displays help as you browse the books on the left."
+msgstr ""
+"Anzeigen bieten Unterstützung beim Navigieren der Bücher auf der linken "
+"Seite."
+
+#: ../src/msw/mimetype.cpp:732
+msgid ""
+"Do you want to overwrite the command used to %s files with extension \"%s"
+"\" ?\n"
+"Current value is \n"
+"%s, \n"
+"New value is \n"
+"%s %1"
+msgstr ""
+"Wollen Sie den Befehl zum %s von Dateien mit der Erweiterung \"%s\" "
+"ändern ?\n"
+"Aktueller Wert ist;\n"
+"%s,\n"
+"Neuer Wert ist\n"
+"%s %1"
+
+#: ../src/common/docview.cpp:531
+#, c-format
+msgid "Do you want to save changes to %s?"
+msgstr "Möchten Sie die Änderungen nach %s speichern?"
+
+#: ../src/common/prntbase.cpp:525
+msgid "Document:"
+msgstr "Dokument:"
+
+#: ../src/generic/aboutdlgg.cpp:73
+msgid "Documentation by "
+msgstr "Dokumentation von "
+
+#: ../src/generic/aboutdlgg.cpp:180
+msgid "Documentation writers"
+msgstr "Autoren der Dokumentation"
+
+#: ../src/common/sizer.cpp:2680
+msgid "Don't Save"
+msgstr "Nicht speichern"
+
+#: ../src/msw/frame.cpp:122 ../src/html/htmlwin.cpp:611
+msgid "Done"
+msgstr "Fertig"
+
+#: ../src/generic/progdlgg.cpp:481 ../src/msw/progdlg.cpp:407
+msgid "Done."
+msgstr "Fertig."
+
+#: ../src/richtext/richtextborderspage.cpp:544
+msgid "Dotted"
+msgstr "Gepunktet"
+
+#: ../src/richtext/richtextborderspage.cpp:546
+msgid "Double"
+msgstr "Verdoppeln"
+
+#: ../src/common/paper.cpp:177
+msgid "Double Japanese Postcard Rotated 148 x 200 mm"
+msgstr "Doppelte Japanische Postkarte Rotiert 148 x 200 mm"
+
+#: ../src/common/xtixml.cpp:273
+#, c-format
+msgid "Doubly used id : %d"
+msgstr "ID doppelt verwendet: %d"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:153
+msgid "Down"
+msgstr "Herunter"
+
+#: ../src/richtext/richtextctrl.cpp:814
+msgid "Drag"
+msgstr "Freigeben"
+
+#: ../src/common/paper.cpp:101
+msgid "E sheet, 34 x 44 in"
+msgstr "E Blatt, 34 x 44 Zoll"
+
+#: ../src/common/accelcmn.cpp:61
+msgid "END"
+msgstr "ENDE"
+
+#: ../src/common/accelcmn.cpp:52
+msgid "ENTER"
+msgstr "EINGABE"
+
+#: ../src/unix/fswatcher_inotify.cpp:535
+msgid "EOF while reading from inotify descriptor"
+msgstr "EOF beim Lesen vom inotify Bezeichner"
+
+#: ../src/common/accelcmn.cpp:64
+msgid "ESC"
+msgstr "ESC"
+
+#: ../src/common/accelcmn.cpp:65
+msgid "ESCAPE"
+msgstr "ESCAPE"
+
+#: ../src/common/accelcmn.cpp:73
+msgid "EXECUTE"
+msgstr "AUSFÜHREN"
+
+#: ../src/common/stockitem.cpp:154
+msgid "Edit"
+msgstr "Bearbeiten"
+
+#: ../src/generic/editlbox.cpp:272
+msgid "Edit item"
+msgstr "Element bearbeiten"
+
+#: ../include/wx/generic/progdlgg.h:84
+msgid "Elapsed time:"
+msgstr "Benötigte Zeit:"
+
+#: ../src/richtext/richtextsizepage.cpp:353
+#: ../src/richtext/richtextsizepage.cpp:355
+#: ../src/richtext/richtextsizepage.cpp:465
+#: ../src/richtext/richtextsizepage.cpp:467
+msgid "Enable the height value."
+msgstr "Höhenwert berücksichtigen."
+
+#: ../src/richtext/richtextsizepage.cpp:438
+#: ../src/richtext/richtextsizepage.cpp:440
+msgid "Enable the maximum width value."
+msgstr "Erlaube den maximalen Breitenwert."
+
+#: ../src/richtext/richtextsizepage.cpp:411
+#: ../src/richtext/richtextsizepage.cpp:413
+msgid "Enable the minimum height value."
+msgstr "Minimalen Höhenwert einschalten."
+
+#: ../src/richtext/richtextsizepage.cpp:384
+#: ../src/richtext/richtextsizepage.cpp:386
+msgid "Enable the minimum width value."
+msgstr "Erlaube den minimalen Breitenwert."
+
+#: ../src/richtext/richtextsizepage.cpp:319
+#: ../src/richtext/richtextsizepage.cpp:321
+msgid "Enable the width value."
+msgstr "Breitenwert einschalten."
+
+#: ../src/richtext/richtextsizepage.cpp:280
+#: ../src/richtext/richtextsizepage.cpp:282
+msgid "Enable vertical alignment."
+msgstr "Vertikalabgleich einschalten."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:133
+#: ../src/richtext/richtextbackgroundpage.cpp:135
+msgid "Enables a background colour."
+msgstr "Ermöglicht eine Hintergrundfarbe."
+
+#: ../src/richtext/richtextstyledlg.cpp:931
+msgid "Enter a box style name"
+msgstr "Einen Box Stilnamen eingeben"
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+msgid "Enter a character style name"
+msgstr "Eingabe eines Zeichenstils"
+
+#: ../src/richtext/richtextstyledlg.cpp:817
+msgid "Enter a list style name"
+msgstr "Eingabe eines Listenstils"
+
+#: ../src/richtext/richtextstyledlg.cpp:890
+msgid "Enter a new style name"
+msgstr "Einen neuen Stilnamen eingeben"
+
+#: ../src/richtext/richtextstyledlg.cpp:651
+msgid "Enter a paragraph style name"
+msgstr "Eingabe eines Absatzstils"
+
+#: ../src/generic/dbgrptg.cpp:174
+#, c-format
+msgid "Enter command to open file \"%s\":"
+msgstr "Befehl zum Öffnen von Datei \"%s\" eingeben:"
+
+#: ../src/generic/helpext.cpp:463
+msgid "Entries found"
+msgstr "Einträge gefunden"
+
+#: ../src/common/paper.cpp:143
+msgid "Envelope Invite 220 x 220 mm"
+msgstr "Umschlag Einladung 220 x 220 mm"
+
+#: ../src/common/config.cpp:473
+#, c-format
+msgid ""
+"Environment variables expansion failed: missing '%c' at position %u in '%s'."
+msgstr ""
+"Auswerten der Umgebungsvariablen schlug fehl. Es fehlt '%c' an Position %u "
+"in '%s'."
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/dirctrlg.cpp:688
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:791
+#: ../src/generic/filectrlg.cpp:805 ../src/generic/filectrlg.cpp:821
+#: ../src/generic/filectrlg.cpp:1381 ../src/generic/filectrlg.cpp:1412
+#: ../src/gtk/filedlg.cpp:73 ../src/gtk1/fontdlg.cpp:74
+msgid "Error"
+msgstr "Fehler"
+
+#: ../src/unix/epolldispatcher.cpp:103
+msgid "Error closing epoll descriptor"
+msgstr "Fehler beim Schließen des epol Bezeichners"
+
+#: ../src/unix/fswatcher_kqueue.cpp:114
+msgid "Error closing kqueue instance"
+msgstr "Fehler schließt kqueue Vorgang"
+
+#: ../src/generic/dirdlgg.cpp:251
+msgid "Error creating directory"
+msgstr "Fehler beim Anlegen des Verzeichnisses"
+
+#: ../src/common/imagbmp.cpp:1103
+msgid "Error in reading image DIB."
+msgstr "Fehler beim Lesen des DIB-Bildes."
+
+#: ../src/propgrid/propgrid.cpp:6563
+#, c-format
+msgid "Error in resource: %s"
+msgstr "Fehler in der Ressource: %s"
+
+#: ../src/common/fileconf.cpp:453
+msgid "Error reading config options."
+msgstr "Fehler beim Parsen der Optionen."
+
+#: ../src/common/fileconf.cpp:1064
+msgid "Error saving user configuration data."
+msgstr "Fehler beim Speichern der Benutzer-Optionen."
+
+#: ../src/gtk/print.cpp:671
+msgid "Error while printing: "
+msgstr "Fehler während des Druckens:"
+
+#: ../src/common/log.cpp:223
+msgid "Error: "
+msgstr "Fehler: "
+
+#: ../src/common/fmapbase.cpp:150
+msgid "Esperanto (ISO-8859-3)"
+msgstr "Esperanto (ISO-8859-3)"
+
+#: ../include/wx/generic/progdlgg.h:85
+msgid "Estimated time:"
+msgstr "Geschätzte Zeit:"
+
+#: ../src/unix/fswatcher_inotify.cpp:639
+msgid "Event queue overflowed"
+msgstr "Überlauf der Ereigniswarteschlange"
+
+#: ../src/generic/dbgrptg.cpp:234
+msgid "Executable files (*.exe)|*.exe|"
+msgstr "Ausführbare Dateien (*.exe)|*.exe|"
+
+#: ../src/common/stockitem.cpp:155
+msgid "Execute"
+msgstr "Ausführen"
+
+#: ../src/msw/utilsexc.cpp:888
+#, c-format
+msgid "Execution of command '%s' failed"
+msgstr "Befehlsausführung '%s' schlug fehl"
+
+#: ../src/os2/utilsexc.cpp:163
+#, c-format
+msgid "Execution of command '%s' failed with error: %ul"
+msgstr "Befehlsausführung '%s' schlug fehl mit Fehler: %ul"
+
+#: ../src/common/paper.cpp:106
+msgid "Executive, 7 1/4 x 10 1/2 in"
+msgstr "Executive, 7 1/4 x 10 1/2 Zoll"
+
+#: ../src/msw/registry.cpp:1230
+#, c-format
+msgid ""
+"Exporting registry key: file \"%s\" already exists and won't be overwritten."
+msgstr ""
+"Exportiere Registrierungsschlüssel: Datei \"%s\" besteht bereits und wird "
+"nicht überschrieben."
+
+#: ../src/common/fmapbase.cpp:195
+msgid "Extended Unix Codepage for Japanese (EUC-JP)"
+msgstr "Erweiterter Unix-Zeichensatz für Japanisch (EUC-JP)"
+
+#: ../src/html/chm.cpp:725
+#, c-format
+msgid "Extraction of '%s' into '%s' failed."
+msgstr "Extrahieren von '%s' in '%s' schlug fehl."
+
+#: ../src/common/accelcmn.cpp:238 ../src/common/accelcmn.cpp:333
+msgid "F"
+msgstr "F"
+
+#: ../src/propgrid/advprops.cpp:640
+msgid "Face Name"
+msgstr "Schriftartname"
+
+#: ../src/unix/snglinst.cpp:269
+msgid "Failed to access lock file."
+msgstr "Fehler beim Zugriff auf Sperr-Datei."
+
+#: ../src/unix/epolldispatcher.cpp:116
+#, c-format
+msgid "Failed to add descriptor %d to epoll descriptor %d"
+msgstr "Das Hinzufügen des Bezeichners %d zum epoll Bezeichner %d schlug fehl"
+
+#: ../src/msw/dib.cpp:548
+#, c-format
+msgid "Failed to allocate %luKb of memory for bitmap data."
+msgstr "Anforderung von %lu Kb Speicher für Bitmap gescheitert."
+
+#: ../src/common/glcmn.cpp:87
+msgid "Failed to allocate colour for OpenGL"
+msgstr "Anforderung von Farbe für OpenGL gescheitert"
+
+#: ../src/unix/displayx11.cpp:288
+msgid "Failed to change video mode"
+msgstr "Änderung des Video-Modus gescheitert"
+
+#: ../src/common/image.cpp:3139
+#, c-format
+msgid "Failed to check format of image file \"%s\"."
+msgstr "Überprüfung des Formats der Bilddatei \"%s\" gescheitert."
+
+#: ../src/common/debugrpt.cpp:244
+#, c-format
+msgid "Failed to clean up debug report directory \"%s\""
+msgstr "Konnte Fehlerberichtsverzeichnis \"%s\" nicht aufräumen."
+
+#: ../src/common/filename.cpp:211
+msgid "Failed to close file handle"
+msgstr "Konnte Datei-Handle nicht schließen."
+
+#: ../src/unix/snglinst.cpp:334
+#, c-format
+msgid "Failed to close lock file '%s'"
+msgstr "Konnte Sperr-Datei '%s' nicht schließen"
+
+#: ../src/msw/clipbrd.cpp:115
+msgid "Failed to close the clipboard."
+msgstr "Konnte Zwischenablage nicht schließen."
+
+#: ../src/x11/utils.cpp:204
+#, c-format
+msgid "Failed to close the display \"%s\""
+msgstr "Konnte das Display \"%s\" nicht schließen"
+
+#: ../src/msw/dialup.cpp:818
+msgid "Failed to connect: missing username/password."
+msgstr "Verbindung fehlgeschlagen: Es fehlt der Benutzername bzw. das Passwort"
+
+#: ../src/msw/dialup.cpp:764
+msgid "Failed to connect: no ISP to dial."
+msgstr "Verbindungsversuch gescheitert: kein anwählbares ISP."
+
+#: ../src/common/textfile.cpp:200
+#, c-format
+msgid "Failed to convert file \"%s\" to Unicode."
+msgstr "Konnte die Datei \"%s\" nicht nach Unicode konvertieren."
+
+#: ../src/generic/logg.cpp:976
+msgid "Failed to copy dialog contents to the clipboard."
+msgstr "Kopieren des Dialoginhalts in die Zwischenablage gescheitert."
+
+#: ../src/msw/registry.cpp:691
+#, c-format
+msgid "Failed to copy registry value '%s'"
+msgstr "Kopieren des Registry-Werts '%s' gescheitert"
+
+#: ../src/msw/registry.cpp:700
+#, c-format
+msgid "Failed to copy the contents of registry key '%s' to '%s'."
+msgstr ""
+"Kopieren des Inhalts des Registrierungsschlüssels '%s' nach '%s' gescheitert"
+
+#: ../src/common/filefn.cpp:1058
+#, c-format
+msgid "Failed to copy the file '%s' to '%s'"
+msgstr "Konnte die Datei '%s' nicht nach '%s' kopieren"
+
+#: ../src/msw/registry.cpp:678
+#, c-format
+msgid "Failed to copy the registry subkey '%s' to '%s'."
+msgstr "Kopieren des Registrierungsschlüssels von '%s' in '%s' gescheitert"
+
+#: ../src/msw/dde.cpp:1073
+msgid "Failed to create DDE string"
+msgstr "Erstellung der DDE-Zeichenkette gescheitert"
+
+#: ../src/msw/mdi.cpp:590
+msgid "Failed to create MDI parent frame."
+msgstr "Erstellung des MDI-Hauptrahmens gescheitert."
+
+#: ../src/common/filename.cpp:1080
+msgid "Failed to create a temporary file name"
+msgstr "Konnte keinen temporären Dateinamen erstellen."
+
+#: ../src/msw/utilsexc.cpp:235
+msgid "Failed to create an anonymous pipe"
+msgstr "Konnte keine anonyme Unix-Pipe erstellen"
+
+#: ../src/msw/ole/automtn.cpp:522
+#, c-format
+msgid "Failed to create an instance of \"%s\""
+msgstr "Erzeugen eines Exemplars von \"%s\" gescheitert."
+
+#: ../src/msw/dde.cpp:442
+#, c-format
+msgid "Failed to create connection to server '%s' on topic '%s'"
+msgstr "Aufbau der Verbindung zum Server '%s' 'on topic' '%s' gescheitert"
+
+#: ../src/msw/cursor.cpp:212
+msgid "Failed to create cursor."
+msgstr "Cursor konnte nicht erzeugt werden"
+
+#: ../src/common/debugrpt.cpp:209
+#, c-format
+msgid "Failed to create directory \"%s\""
+msgstr "Konnte das Verzeichnis \"%s\" nicht erzeugen."
+
+#: ../src/generic/dirdlgg.cpp:249
+#, c-format
+msgid ""
+"Failed to create directory '%s'\n"
+"(Do you have the required permissions?)"
+msgstr ""
+"Konnte Verzeichnis '%s' nicht erstellen\n"
+"(Haben Sie die nötigen Zugriffsrechte?)"
+
+#: ../src/unix/epolldispatcher.cpp:84
+msgid "Failed to create epoll descriptor"
+msgstr "Epoll Beschreibungselement konnte nicht erzeugt werden"
+
+#: ../src/msw/mimetype.cpp:198
+#, c-format
+msgid "Failed to create registry entry for '%s' files."
+msgstr "Konnte keinen Registrierungseintrag für '%s'-Dateien erstellen."
+
+#: ../src/msw/fdrepdlg.cpp:442
+#, c-format
+msgid "Failed to create the standard find/replace dialog (error code %d)"
+msgstr "Konnte keinen Standard-Finden/Ersetzen-Dialog erstellen (Fehler %d)"
+
+#: ../src/unix/wakeuppipe.cpp:52
+msgid "Failed to create wake up pipe used by event loop."
+msgstr "Erzeugung der Weckleitung für die Ereignisschleife gescheitert."
+
+#: ../src/html/winpars.cpp:739
+#, c-format
+msgid "Failed to display HTML document in %s encoding"
+msgstr "Konnte HTML-Dokument nicht in der Kodierung %s anzeigen"
+
+#: ../src/msw/clipbrd.cpp:127
+msgid "Failed to empty the clipboard."
+msgstr "Konnte Zwischenablage nicht leeren."
+
+#: ../src/unix/displayx11.cpp:265
+msgid "Failed to enumerate video modes"
+msgstr "Auflisten der Video-Modi gescheitert"
+
+#: ../src/msw/dde.cpp:727
+msgid "Failed to establish an advise loop with DDE server"
+msgstr "Aufbau einer 'advise Schleife' mit dem DDE-Server gescheitert"
+
+#: ../src/msw/dialup.cpp:650 ../src/msw/dialup.cpp:884
+#, c-format
+msgid "Failed to establish dialup connection: %s"
+msgstr "Aufbau der DFÜ-Verbindung gescheitert: %s"
+
+#: ../src/unix/utilsunx.cpp:617
+#, c-format
+msgid "Failed to execute '%s'\n"
+msgstr "Kann '%s' nicht ausführen\n"
+
+#: ../src/common/debugrpt.cpp:725
+msgid "Failed to execute curl, please install it in PATH."
+msgstr "Konnte curl nicht starten, bitte im PATH installieren."
+
+#: ../src/msw/ole/automtn.cpp:505
+#, c-format
+msgid "Failed to find CLSID of \"%s\""
+msgstr "Konnte CLSID von '%s' nicht finden"
+
+#: ../src/common/regex.cpp:434 ../src/common/regex.cpp:482
+#, c-format
+msgid "Failed to find match for regular expression: %s"
+msgstr "Konnte keine Übereinstimmung mit regulärem Ausdruck %s finden"
+
+#: ../src/msw/dialup.cpp:716
+#, c-format
+msgid "Failed to get ISP names: %s"
+msgstr "Konnte ISP-Namen '%s' nicht ermitteln"
+
+#: ../src/msw/ole/automtn.cpp:574
+#, c-format
+msgid "Failed to get OLE automation interface for \"%s\""
+msgstr "Konnte die OLE Automatisierungsschnittstelle für \"%s\" nicht bekommen"
+
+#: ../src/msw/clipbrd.cpp:747
+msgid "Failed to get data from the clipboard"
+msgstr "Konnte Daten nicht aus der Zwischenablage kopieren"
+
+#: ../src/common/time.cpp:249
+msgid "Failed to get the local system time"
+msgstr "Versuch örtliche Systemzeit zu bekommen, fehlgeschlagen."
+
+#: ../src/common/filefn.cpp:1453
+msgid "Failed to get the working directory"
+msgstr "Konnte Arbeitsverzeichnis nicht ermitteln"
+
+#: ../src/univ/theme.cpp:113
+msgid "Failed to initialize GUI: no built-in themes found."
+msgstr "Konnte GUI nicht initialisieren: kein Thema gefunden."
+
+#: ../src/msw/helpchm.cpp:63
+msgid "Failed to initialize MS HTML Help."
+msgstr "Konnte MS-HTML-Hilfe nicht initialisieren."
+
+#: ../src/msw/glcanvas.cpp:892
+msgid "Failed to initialize OpenGL"
+msgstr "Konnte OpenGL nicht initialisieren"
+
+#: ../src/msw/dialup.cpp:879
+#, c-format
+msgid "Failed to initiate dialup connection: %s"
+msgstr "Versuch gescheitert, die Einwählverbindung einzuleiten: %s"
+
+#: ../src/gtk/textctrl.cpp:1117
+msgid "Failed to insert text in the control."
+msgstr "Einfügen von Text in das Steuerelement fehlgeschlagen."
+
+#: ../src/unix/snglinst.cpp:241
+#, c-format
+msgid "Failed to inspect the lock file '%s'"
+msgstr "Konnte die Sperr-Datei '%s' nicht lesen"
+
+#: ../src/unix/appunix.cpp:182
+msgid "Failed to install signal handler"
+msgstr "Konnte Signalbearbeitung nicht installieren"
+
+#: ../src/unix/threadpsx.cpp:1162
+msgid ""
+"Failed to join a thread, potential memory leak detected - please restart the "
+"program"
+msgstr ""
+"Thread-Verbindung gescheitert. Dies ist ein mögliches Speicherleck - Bitte "
+"Programm neu starten"
+
+#: ../src/msw/utils.cpp:745
+#, c-format
+msgid "Failed to kill process %d"
+msgstr "Konnte Prozess %d nicht abbrechen"
+
+#: ../src/common/image.cpp:2365
+#, c-format
+msgid "Failed to load bitmap \"%s\" from resources."
+msgstr "Konnte das Bitmap \"%s\" aus der Ressource nicht laden."
+
+#: ../src/common/image.cpp:2374
+#, c-format
+msgid "Failed to load icon \"%s\" from resources."
+msgstr "Konnte das Symbol \"%s\" aus der Ressource nicht laden."
+
+#: ../src/common/iconbndl.cpp:182
+#, c-format
+msgid "Failed to load image %%d from file '%s'."
+msgstr "Konnte das Bild %%d aus der Datei '%s' nicht laden."
+
+#: ../src/common/iconbndl.cpp:190
+#, c-format
+msgid "Failed to load image %d from stream."
+msgstr "Konnte das Bild %d aus dem Strom nicht laden."
+
+#: ../src/common/image.cpp:2450 ../src/common/image.cpp:2469
+#, c-format
+msgid "Failed to load image from file \"%s\"."
+msgstr "Konnte das Bild aus der Datei \"%s\" nicht laden."
+
+#: ../src/msw/enhmeta.cpp:97
+#, c-format
+msgid "Failed to load metafile from file \"%s\"."
+msgstr "Konnte Metadatei aus Datei \"%s\" nicht laden."
+
+#: ../src/msw/volume.cpp:327
+msgid "Failed to load mpr.dll."
+msgstr "Konnte mpr.dll nicht laden."
+
+#: ../src/msw/utils.cpp:1120
+#, c-format
+msgid "Failed to load resource \"%s\"."
+msgstr "Konnte die Ressource \"%s\" nicht laden."
+
+#: ../src/common/dynlib.cpp:100
+#, c-format
+msgid "Failed to load shared library '%s'"
+msgstr "Laden der dynamischen Bibliothek '%s' gescheitert"
+
+#: ../src/msw/utils.cpp:1127
+#, c-format
+msgid "Failed to lock resource \"%s\"."
+msgstr "Konnte die Ressource \"%s\" nicht sperren."
+
+#: ../src/unix/snglinst.cpp:198
+#, c-format
+msgid "Failed to lock the lock file '%s'"
+msgstr "Konnte die Sperr-Datei '%s' nicht sperren"
+
+#: ../src/unix/epolldispatcher.cpp:136
+#, c-format
+msgid "Failed to modify descriptor %d in epoll descriptor %d"
+msgstr "Wechsel von Beschreibung %d in Epoll beschreibung %d  fehlgeschlagen"
+
+#: ../src/common/filename.cpp:2681
+#, c-format
+msgid "Failed to modify file times for '%s'"
+msgstr "Konnte Zugriffszeit von Datei '%s' nicht ändern"
+
+#: ../src/common/selectdispatcher.cpp:252
+msgid "Failed to monitor I/O channels"
+msgstr "Die Überwachung der I/O Kanäle ist fehlgeschlagen"
+
+#: ../src/common/filename.cpp:194
+#, c-format
+msgid "Failed to open '%s' for reading"
+msgstr "Konnte '%s' nicht zum Lesen öffnen"
+
+#: ../src/common/filename.cpp:199
+#, c-format
+msgid "Failed to open '%s' for writing"
+msgstr "Konnte '%s' nicht zum Schreiben öffnen"
+
+#: ../src/html/chm.cpp:141
+#, c-format
+msgid "Failed to open CHM archive '%s'."
+msgstr "CHM-Archiv '%s' lässt sich nicht öffnen."
+
+#: ../src/common/utilscmn.cpp:1135
+#, c-format
+msgid "Failed to open URL \"%s\" in default browser."
+msgstr "Konnte die URL \"%s\" nicht im voreingestellten Browser öffnen."
+
+#: ../include/wx/msw/private/fswatcher.h:92
+#, c-format
+msgid "Failed to open directory \"%s\" for monitoring."
+msgstr "Konnte das Verzeichnis \"%s\" nicht zur Überwachung öffnen."
+
+#: ../src/x11/utils.cpp:223
+#, c-format
+msgid "Failed to open display \"%s\"."
+msgstr "Öffnen des Displays \"%s\" fehlgeschlagen."
+
+#: ../src/common/filename.cpp:1115
+msgid "Failed to open temporary file."
+msgstr "Konnte temporäre Datei nicht öffnen."
+
+#: ../src/msw/clipbrd.cpp:94
+msgid "Failed to open the clipboard."
+msgstr "Konnte Zwischenablage nicht öffnen."
+
+#: ../src/common/translation.cpp:1170
+#, c-format
+msgid "Failed to parse Plural-Forms: '%s'"
+msgstr "Analyse der Pluralformen fehlgeschlagen: '%s'"
+
+#: ../src/unix/mediactrl.cpp:1268
+#, c-format
+msgid "Failed to prepare playing \"%s\"."
+msgstr "Fehler bei der Vorbereitung zum Abspielen von \"%s\"."
+
+#: ../src/msw/clipbrd.cpp:647
+msgid "Failed to put data on the clipboard"
+msgstr "Versuch Daten in der Zwischenablage abzulegen, gescheitert"
+
+#: ../src/unix/snglinst.cpp:278
+msgid "Failed to read PID from lock file."
+msgstr "Konnte keine PID von Sperr-Datei lesen."
+
+#: ../src/common/fileconf.cpp:464
+msgid "Failed to read config options."
+msgstr "Lesen der Konfigurationsoptionen fehlgeschlagen."
+
+#: ../src/common/docview.cpp:678
+#, c-format
+msgid "Failed to read document from the file \"%s\"."
+msgstr "Konnte Dokument aus der Datei \"%s\" nicht lesen."
+
+#: ../src/dfb/evtloop.cpp:98
+msgid "Failed to read event from DirectFB pipe"
+msgstr "Konnte Ereignis von DirectFB Kanal nicht lesen"
+
+#: ../src/unix/wakeuppipe.cpp:120
+msgid "Failed to read from wake-up pipe"
+msgstr "Konnte nicht aus dem Weckkanal lesen"
+
+#: ../src/unix/utilsunx.cpp:685
+msgid "Failed to redirect child process input/output"
+msgstr "Umleitung der Ein-/Ausgabe des Unterprozesses gescheitert"
+
+#: ../src/msw/utilsexc.cpp:697
+msgid "Failed to redirect the child process IO"
+msgstr "Umleitung der Ein-/Ausgabe des Unterprozesses gescheitert"
+
+#: ../src/msw/dde.cpp:293
+#, c-format
+msgid "Failed to register DDE server '%s'"
+msgstr "Versuch DDE-Server '%s' zu registrieren, gescheitert"
+
+#: ../src/common/fontmap.cpp:245
+#, c-format
+msgid "Failed to remember the encoding for the charset '%s'."
+msgstr ""
+"Versuch gescheitert, an die Kodierung für den Zeichensatz '%s' zu erinnern."
+
+#: ../src/common/debugrpt.cpp:227
+#, c-format
+msgid "Failed to remove debug report file \"%s\""
+msgstr "Konnte Fehlerberichtsdatei \"%s\" nicht entfernen."
+
+#: ../src/unix/snglinst.cpp:322
+#, c-format
+msgid "Failed to remove lock file '%s'"
+msgstr "Konnte Sperr-Datei '%s' nicht löschen."
+
+#: ../src/unix/snglinst.cpp:288
+#, c-format
+msgid "Failed to remove stale lock file '%s'."
+msgstr "Konnte unbenutzte Sperr-Datei '%s' nicht entfernen."
+
+#: ../src/msw/registry.cpp:528
+#, c-format
+msgid "Failed to rename registry value '%s' to '%s'."
+msgstr "Umbenennen des Registrieungswertes '%s' in '%s' gescheitert"
+
+#: ../src/common/filefn.cpp:1168
+#, c-format
+msgid ""
+"Failed to rename the file '%s' to '%s' because the destination file already "
+"exists."
+msgstr ""
+"Umbenennen der Datei '%s' nach '%s' fehlgeschlagen, da die Zieldatei bereits "
+"existiert."
+
+#: ../src/msw/registry.cpp:633
+#, c-format
+msgid "Failed to rename the registry key '%s' to '%s'."
+msgstr "Umbenennen des Registrieungsschlüssels von '%s' in '%s' gescheitert."
+
+#: ../src/msw/clipbrd.cpp:497
+msgid "Failed to retrieve data from the clipboard."
+msgstr "Konnte Daten von der Zwischenablage nicht bekommen."
+
+#: ../src/common/filename.cpp:2777
+#, c-format
+msgid "Failed to retrieve file times for '%s'"
+msgstr "Konnte Zugriffszeit von Datei '%s' nicht ermitteln"
+
+#: ../src/msw/dialup.cpp:487
+msgid "Failed to retrieve text of RAS error message"
+msgstr "Versuch den Inhalt der RAS-Fehlernachricht zu holen, gescheitert"
+
+#: ../src/msw/clipbrd.cpp:784
+msgid "Failed to retrieve the supported clipboard formats"
+msgstr ""
+"Konnte die von der Zwischenablage unterstützten Formate nicht ermitteln"
+
+#: ../src/common/docview.cpp:649
+#, c-format
+msgid "Failed to save document to the file \"%s\"."
+msgstr "Das Dokument konnte nicht in die Datei \"%s\" gesichert werden."
+
+#: ../src/msw/dib.cpp:326
+#, c-format
+msgid "Failed to save the bitmap image to file \"%s\"."
+msgstr "Das Bitmap-Bild konnte nicht in der Datei \"%s\" geschrieben werden."
+
+#: ../src/msw/dde.cpp:768
+msgid "Failed to send DDE advise notification"
+msgstr "Versuch gescheitert, eine DDE-Benachrichtigung zu schicken"
+
+#: ../src/common/ftp.cpp:404
+#, c-format
+msgid "Failed to set FTP transfer mode to %s."
+msgstr "Konnte den FTP-Transfermodus nicht auf '%s' setzen."
+
+#: ../src/msw/clipbrd.cpp:373
+msgid "Failed to set clipboard data."
+msgstr "Konnte Dateien nicht in die Zwischenablage kopieren."
+
+#: ../src/unix/snglinst.cpp:181
+#, c-format
+msgid "Failed to set permissions on lock file '%s'"
+msgstr "Konnte die Zugriffsrechte für Datei '%s' nicht setzen"
+
+#: ../src/unix/utilsunx.cpp:674
+msgid "Failed to set process priority"
+msgstr "Versuch gescheitert, die Prozess-Priorität zu setzen"
+
+#: ../src/common/file.cpp:576
+msgid "Failed to set temporary file permissions"
+msgstr "Konnte die Zugriffsrechte der temporären Datei nicht setzen"
+
+#: ../src/gtk/textctrl.cpp:1058
+msgid "Failed to set text in the text control."
+msgstr "Setzen von Text in das Text-Steuerelement fehlgeschlagen."
+
+#: ../src/unix/threadpsx.cpp:1293
+#, c-format
+msgid "Failed to set thread concurrency level to %lu"
+msgstr ""
+"Versuch gescheitert, die Thread-Nebenläufigkeit auf Stufe %lu zu setzen"
+
+#: ../src/unix/threadpsx.cpp:1377 ../src/unix/threadpsx.cpp:1387
+#, c-format
+msgid "Failed to set thread priority %d."
+msgstr "Versuch gescheitert, die Thread-Priorität %d zu setzen."
+
+#: ../src/unix/utilsunx.cpp:791
+msgid "Failed to set up non-blocking pipe, the program might hang."
+msgstr ""
+"Das Erzeugen einer nicht blockierenden Pipe ist fehlgeschlagen, das Programm "
+"könnte stehen bleiben."
+
+#: ../src/common/fs_mem.cpp:261
+#, c-format
+msgid "Failed to store image '%s' to memory VFS!"
+msgstr "Versuch das Bild '%s' im VFS-Speicher zu laden, gescheitert!"
+
+#: ../src/dfb/evtloop.cpp:170
+msgid "Failed to switch DirectFB pipe to non-blocking mode"
+msgstr "Wechsel von DirectFB Pipe in den Nicht blockierenden Modus schlug fehl"
+
+#: ../src/unix/wakeuppipe.cpp:59
+msgid "Failed to switch wake up pipe to non-blocking mode"
+msgstr ""
+"Fehlgeschlagen die aufweck Pipe in den nicht blockierenden Modus umzuschalten"
+
+#: ../src/unix/threadpsx.cpp:1569
+msgid "Failed to terminate a thread."
+msgstr "Versuch den Thread zu beenden, gescheitert."
+
+#: ../src/msw/dde.cpp:746
+msgid "Failed to terminate the advise loop with DDE server"
+msgstr "Versuch gescheitert, die 'advise Schleife' mit DDE-Server zu beenden."
+
+#: ../src/msw/dialup.cpp:959
+#, c-format
+msgid "Failed to terminate the dialup connection: %s"
+msgstr "Versuch gescheitert, die DFÜ-Verbindung zu beenden: %s"
+
+#: ../src/common/filename.cpp:2696
+#, c-format
+msgid "Failed to touch the file '%s'"
+msgstr "Konnte die Datei '%s' nicht 'berühren'"
+
+#: ../src/unix/snglinst.cpp:328
+#, c-format
+msgid "Failed to unlock lock file '%s'"
+msgstr "Konnte die Sperrung von Datei '%s' nicht aufheben"
+
+#: ../src/msw/dde.cpp:314
+#, c-format
+msgid "Failed to unregister DDE server '%s'"
+msgstr "Die Registrierung des DDE-Servers '%s' konnte nicht aufgehoben werden"
+
+#: ../src/unix/epolldispatcher.cpp:155
+#, c-format
+msgid "Failed to unregister descriptor %d from epoll descriptor %d"
+msgstr "Konnte Descriptor %d vom Epoll Descriptor nicht %d austragen"
+
+#: ../src/common/fileconf.cpp:1037
+msgid "Failed to update user configuration file."
+msgstr "Kann Benutzer-Konfigurationsdatei nicht aktualisieren."
+
+#: ../src/common/debugrpt.cpp:738
+#, c-format
+msgid "Failed to upload the debug report (error code %d)."
+msgstr "Konnte den Fehlerbericht nicht hochladen (Fehlercode %d)."
+
+#: ../src/unix/snglinst.cpp:168
+#, c-format
+msgid "Failed to write to lock file '%s'"
+msgstr "Konnte Sperr-Datei '%s' nicht schreiben"
+
+#: ../src/propgrid/propgrid.cpp:172
+msgid "False"
+msgstr "Falsch"
+
+#: ../src/propgrid/advprops.cpp:658
+msgid "Family"
+msgstr "Familie"
+
+#: ../src/common/stockitem.cpp:157 ../src/msw/wince/filedlgwce.cpp:121
+msgid "File"
+msgstr "Datei"
+
+#: ../src/common/docview.cpp:666
+#, c-format
+msgid "File \"%s\" could not be opened for reading."
+msgstr "Die Datei \"%s\" konnte nicht zum Lesen geöffnet werden."
+
+#: ../src/common/docview.cpp:643
+#, c-format
+msgid "File \"%s\" could not be opened for writing."
+msgstr "Die Datei \"%s\" konnte nicht zum Schreiben geöffnet werden."
+
+#: ../src/gtk/filedlg.cpp:56
+#, c-format
+msgid "File '%s' already exists, do you really want to overwrite it?"
+msgstr ""
+"Datei '%s' existiert bereits, möchten Sie diese wirklich überschreiben?"
+
+#: ../src/os2/filedlg.cpp:310
+#, c-format
+msgid ""
+"File '%s' already exists.\n"
+"Do you want to replace it?"
+msgstr ""
+"Datei '%s' existiert bereits.\n"
+"Möchten Sie diese wirklich überschreiben?"
+
+#: ../src/common/filefn.cpp:1207
+#, c-format
+msgid "File '%s' couldn't be removed"
+msgstr "Die Datei '%s' konnte nicht gelöscht werden."
+
+#: ../src/common/filefn.cpp:1187
+#, c-format
+msgid "File '%s' couldn't be renamed '%s'"
+msgstr "Die Datei '%s' konnte nicht nach '%s' umbenannt werden."
+
+#: ../src/richtext/richtextctrl.cpp:2688 ../src/common/textcmn.cpp:921
+msgid "File couldn't be loaded."
+msgstr "Datei konnte nicht geladen werden."
+
+#: ../src/msw/filedlg.cpp:458
+#, c-format
+msgid "File dialog failed with error code %0lx."
+msgstr "Datei Dialog schlug fehl mit dem Fehlercode %0lx."
+
+#: ../src/common/docview.cpp:1771
+msgid "File error"
+msgstr "Dateifehler"
+
+#: ../src/generic/dirctrlg.cpp:688 ../src/generic/filectrlg.cpp:805
+msgid "File name exists already."
+msgstr "Dateiname bereits vorhanden"
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Files"
+msgstr "Dateien"
+
+#: ../src/common/filefn.cpp:1761
+#, c-format
+msgid "Files (%s)"
+msgstr "Dateien (%s)"
+
+#: ../src/motif/filedlg.cpp:218
+msgid "Filter"
+msgstr "Filter"
+
+#: ../src/common/stockitem.cpp:158 ../src/html/helpwnd.cpp:500
+msgid "Find"
+msgstr "Suchen"
+
+#: ../src/common/stockitem.cpp:159
+msgid "First"
+msgstr "Erste(r)"
+
+#: ../src/common/prntbase.cpp:1518
+msgid "First page"
+msgstr "Erste Seite"
+
+#: ../src/richtext/richtextsizepage.cpp:521
+msgid "Fixed"
+msgstr "Festgesetzt"
+
+#: ../src/html/helpwnd.cpp:1219
+msgid "Fixed font:"
+msgstr "Schrift fester Breite:"
+
+#: ../src/html/helpwnd.cpp:1282
+msgid "Fixed size face.<br> <b>bold</b> <i>italic</i> "
+msgstr "Schrift fester Breite.<br> <b>fett</b> <i>kursiv</i> "
+
+#: ../src/richtext/richtextsizepage.cpp:229
+msgid "Floating"
+msgstr "Schwebend"
+
+#: ../src/common/stockitem.cpp:160
+msgid "Floppy"
+msgstr "Diskette"
+
+#: ../src/common/paper.cpp:112
+msgid "Folio, 8 1/2 x 13 in"
+msgstr "Folio, 8 1/2 x 13 Zoll"
+
+#: ../src/richtext/richtextformatdlg.cpp:324 ../src/osx/carbon/fontdlg.cpp:473
+#: ../src/common/stockitem.cpp:194
+msgid "Font"
+msgstr "Schriftart"
+
+#: ../src/richtext/richtextfontpage.cpp:230
+msgid "Font &weight:"
+msgstr "Schrift&dicke:"
+
+#: ../src/html/helpwnd.cpp:1220
+msgid "Font size:"
+msgstr "Schriftgröße:"
+
+#: ../src/richtext/richtextfontpage.cpp:217
+msgid "Font st&yle:"
+msgstr "Schrifst&il:"
+
+#: ../src/osx/carbon/fontdlg.cpp:515
+msgid "Font:"
+msgstr "Schrift:"
+
+#: ../src/dfb/fontmgr.cpp:198
+#, c-format
+msgid "Fonts index file %s disappeared while loading fonts."
+msgstr ""
+"Indexdatei der Schriftarten %s während des Ladens der Schriften verschwunden."
+
+#: ../src/unix/utilsunx.cpp:651
+msgid "Fork failed"
+msgstr "'Fork' gescheitert"
+
+#: ../src/common/stockitem.cpp:161
+msgid "Forward"
+msgstr "Vorwärts"
+
+#: ../src/common/xtixml.cpp:235
+msgid "Forward hrefs are not supported"
+msgstr "Forward hrefs werden nicht unterstützt"
+
+#: ../src/html/helpwnd.cpp:888
+#, c-format
+msgid "Found %i matches"
+msgstr "Suchbegriff %i mal gefunden"
+
+#: ../src/generic/prntdlgg.cpp:238
+msgid "From:"
+msgstr "Von:"
+
+#: ../src/common/imaggif.cpp:160
+msgid "GIF: Invalid gif index."
+msgstr "GIF: Ungültiger Index."
+
+#: ../src/common/imaggif.cpp:150
+msgid "GIF: data stream seems to be truncated."
+msgstr "GIF: Datenstrom scheint unvollständig zu sein."
+
+#: ../src/common/imaggif.cpp:134
+msgid "GIF: error in GIF image format."
+msgstr "GIF: Fehler im GIF-Bildformat."
+
+#: ../src/common/imaggif.cpp:137
+msgid "GIF: not enough memory."
+msgstr "GIF: nicht genug Speicher."
+
+#: ../src/common/imaggif.cpp:140
+msgid "GIF: unknown error!!!"
+msgstr "GIF: unbekannter Fehler!"
+
+#: ../src/gtk/window.cpp:4288
+msgid ""
+"GTK+ installed on this machine is too old to support screen compositing, "
+"please install GTK+ 2.12 or later."
+msgstr ""
+"Das GTK+, das auf dieser Maschine installiert ist, ist zu alt um "
+"Bildschrimanordnung zu unterstützen, bitte GTK+ 2.12 oder neuer "
+"installieren. "
+
+#: ../src/univ/themes/gtk.cpp:525
+msgid "GTK+ theme"
+msgstr "GTK+ Thema"
+
+#: ../src/common/preferencescmn.cpp:39
+msgid "General"
+msgstr "Allgemein"
+
+#: ../src/common/prntbase.cpp:243
+msgid "Generic PostScript"
+msgstr "Generisches PostScript"
+
+#: ../src/common/paper.cpp:136
+msgid "German Legal Fanfold, 8 1/2 x 13 in"
+msgstr "German Legal Endlospapier, 21,59 x 33,02 cm"
+
+#: ../src/common/paper.cpp:135
+msgid "German Std Fanfold, 8 1/2 x 12 in"
+msgstr "German Std Endlospapier, 8 1/2 x 12 Zoll"
+
+#: ../include/wx/xtiprop.h:188
+msgid "GetProperty called w/o valid getter"
+msgstr "GetProperty aufgerufen ohne gültigen getter"
+
+#: ../include/wx/xtiprop.h:266
+msgid "GetPropertyCollection called on a generic accessor"
+msgstr "GetPropertyCollection aufgerufen für einen allgemeinen accessor"
+
+#: ../include/wx/xtiprop.h:206
+msgid "GetPropertyCollection called w/o valid collection getter"
+msgstr "GetPropertyCollection aufgerufen ohne gültigen Collection getter"
+
+#: ../src/html/helpwnd.cpp:673
+msgid "Go back"
+msgstr "Vorherige HTML-Seite zeigen"
+
+#: ../src/html/helpwnd.cpp:674
+msgid "Go forward"
+msgstr "Nächste HTML-Seite zeigen"
+
+#: ../src/html/helpwnd.cpp:676
+msgid "Go one level up in document hierarchy"
+msgstr "In die nächste Dokumentebene gehen"
+
+#: ../src/generic/filedlgg.cpp:223 ../src/generic/dirdlgg.cpp:136
+msgid "Go to home directory"
+msgstr "Gehe zum Benutzerverzeichnis"
+
+#: ../src/generic/filedlgg.cpp:219
+msgid "Go to parent directory"
+msgstr "Gehe zum 'Parent'-Verzeichnis"
+
+#: ../src/generic/aboutdlgg.cpp:76
+msgid "Graphics art by "
+msgstr "Grafik von "
+
+#: ../src/common/fmapbase.cpp:154
+msgid "Greek (ISO-8859-7)"
+msgstr "Griechisch (ISO-8859-7)"
+
+#: ../src/richtext/richtextborderspage.cpp:547
+msgid "Groove"
+msgstr "Groove"
+
+#: ../src/common/zstream.cpp:158 ../src/common/zstream.cpp:318
+msgid "Gzip not supported by this version of zlib"
+msgstr "Gzip wird nicht von dieser zlib-Version unterstützt"
+
+#: ../src/common/accelcmn.cpp:75
+msgid "HELP"
+msgstr "HILFE"
+
+#: ../src/common/accelcmn.cpp:60
+msgid "HOME"
+msgstr "POS 1"
+
+#: ../src/html/helpwnd.cpp:1552
+msgid "HTML Help Project (*.hhp)|*.hhp|"
+msgstr "HTML-Hilfe-Projekt (*.hhp)|*.hhp|"
+
+#: ../src/html/htmlwin.cpp:659
+#, c-format
+msgid "HTML anchor %s does not exist."
+msgstr "HTML-Anker %s existiert nicht."
+
+#: ../src/html/helpwnd.cpp:1550
+msgid "HTML files (*.html;*.htm)|*.html;*.htm|"
+msgstr "HTML-Dateien (*.html;*.htm)|*.html;*.htm|"
+
+#: ../src/common/stockitem.cpp:162
+msgid "Harddisk"
+msgstr "Festplatte"
+
+#: ../src/common/fmapbase.cpp:155
+msgid "Hebrew (ISO-8859-8)"
+msgstr "Hebräisch (ISO-8859-8)"
+
+#: ../include/wx/msgdlg.h:275 ../src/osx/button_osx.cpp:39
+#: ../src/common/stockitem.cpp:163 ../src/html/helpdlg.cpp:66
+#: ../src/html/helpfrm.cpp:116
+msgid "Help"
+msgstr "Hilfe"
+
+#: ../src/html/helpwnd.cpp:1213
+msgid "Help Browser Options"
+msgstr "Hilfe zu den Browser-Einstellungen"
+
+#: ../src/generic/helpext.cpp:458 ../src/generic/helpext.cpp:459
+msgid "Help Index"
+msgstr "Hilfeindex"
+
+#: ../src/html/helpwnd.cpp:1534
+msgid "Help Printing"
+msgstr "Hilfe drucken"
+
+#: ../src/html/helpwnd.cpp:814
+msgid "Help Topics"
+msgstr "Hilfethemen"
+
+#: ../src/html/helpwnd.cpp:1551
+msgid "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+msgstr "Hilfe-Bücher (*.htb)|*.htb|Hilfe-Bücher (*.zip)|*.zip|"
+
+#: ../src/generic/helpext.cpp:271
+#, c-format
+msgid "Help directory \"%s\" not found."
+msgstr "Hilfeverzeichnis \"%s\" nicht gefunden."
+
+#: ../src/generic/helpext.cpp:279
+#, c-format
+msgid "Help file \"%s\" not found."
+msgstr "Hilfedatei \"%s\" nicht gefunden."
+
+#: ../src/html/helpctrl.cpp:63
+#, c-format
+msgid "Help: %s"
+msgstr "Hilfe: %s"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:649
+#, c-format
+msgid "Hide %s"
+msgstr "Verberge %s"
+
+#: ../src/osx/menu_osx.cpp:604 ../src/osx/menu_osx.cpp:651
+msgid "Hide Others"
+msgstr "Andere ausblenden"
+
+#: ../src/generic/infobar.cpp:85
+msgid "Hide this notification message."
+msgstr "Diese Meldung ausblenden."
+
+#: ../src/generic/dirdlgg.cpp:98 ../src/common/stockitem.cpp:164
+msgid "Home"
+msgstr "Start"
+
+#: ../src/generic/dirctrlg.cpp:624
+msgid "Home directory"
+msgstr "Benutzerverzeichnis"
+
+#: ../src/richtext/richtextsizepage.cpp:253
+#: ../src/richtext/richtextsizepage.cpp:255
+msgid "How the object will float relative to the text."
+msgstr "Wie das Objekt relativ zum Text angeordnet wird."
+
+#: ../src/common/imagbmp.cpp:1118
+msgid "ICO: Error in reading mask DIB."
+msgstr "ICO: Fehler beim Lesen der DIB-Maske."
+
+#: ../src/common/imagbmp.cpp:1233 ../src/common/imagbmp.cpp:1294
+#: ../src/common/imagbmp.cpp:1305 ../src/common/imagbmp.cpp:1318
+#: ../src/common/imagbmp.cpp:1363 ../src/common/imagbmp.cpp:1375
+#: ../src/common/imagbmp.cpp:1386
+msgid "ICO: Error writing the image file!"
+msgstr "ICO: Schreibfehler beim Speichern."
+
+#: ../src/common/imagbmp.cpp:1198
+msgid "ICO: Image too tall for an icon."
+msgstr "ICO: Bild zu groß für ein Icon."
+
+#: ../src/common/imagbmp.cpp:1206
+msgid "ICO: Image too wide for an icon."
+msgstr "ICO: Bild zu breit für ein Icon."
+
+#: ../src/common/imagbmp.cpp:1466
+msgid "ICO: Invalid icon index."
+msgstr "ICO: Ungültiger Icon-Index."
+
+#: ../src/common/imagiff.cpp:759
+msgid "IFF: data stream seems to be truncated."
+msgstr "IFF: Datenstrom scheint unvollständig zu sein."
+
+#: ../src/common/imagiff.cpp:743
+msgid "IFF: error in IFF image format."
+msgstr "IFF: Fehler im IFF-Bildformat."
+
+#: ../src/common/imagiff.cpp:746
+msgid "IFF: not enough memory."
+msgstr "IFF: nicht genug Speicher."
+
+#: ../src/common/imagiff.cpp:749
+msgid "IFF: unknown error!!!"
+msgstr "IFF: unbekannter Fehler!"
+
+#: ../src/common/accelcmn.cpp:50
+msgid "INS"
+msgstr "EINF"
+
+#: ../src/common/accelcmn.cpp:51
+msgid "INSERT"
+msgstr "EINFÜGEN"
+
+#: ../src/common/fmapbase.cpp:197
+msgid "ISO-2022-JP"
+msgstr "ISO-2022-JP"
+
+#: ../src/osx/carbon/dataview.cpp:2420
+msgid "Icon & text renderer cannot render value; value type: "
+msgstr "Bild & Text Renderer kann den Wert nicht darstellen; Wert Typ"
+
+#: ../src/html/htmprint.cpp:282
+msgid ""
+"If possible, try changing the layout parameters to make the printout more "
+"narrow."
+msgstr ""
+"Wenn möglich die Layout Parameter ändern um den Ausdruck schmaler zu machen."
+
+#: ../src/generic/dbgrptg.cpp:358
+msgid ""
+"If you have any additional information pertaining to this bug\n"
+"report, please enter it here and it will be joined to it:"
+msgstr ""
+"Falls Sie weitere Informationen betreffend diesen Fehlerberichtes haben, "
+"tragen Sie sie bitte hier ein, um sie zum Bericht hinzuzufügen:"
+
+#: ../src/generic/dbgrptg.cpp:324
+msgid ""
+"If you wish to suppress this debug report completely, please choose the "
+"\"Cancel\" button,\n"
+"but be warned that it may hinder improving the program, so if\n"
+"at all possible please do continue with the report generation.\n"
+msgstr ""
+"Falls Sie diesen Fehlerbericht vollständig unterdrücken möchten, drücken Sie "
+"bitte \"Abbrechen\".\n"
+"Bedenken Sie aber bitte, dass dies eventuell die Verbesserung des Programms "
+"behindern kann,\n"
+"nach Möglichkeit sollten Sie also den Fehlerbericht erstellen.\n"
+
+#: ../src/msw/registry.cpp:1395
+#, c-format
+msgid "Ignoring value \"%s\" of the key \"%s\"."
+msgstr "Ignoriere Wert \"%s\" von Schlüssel \"%s\"."
+
+#: ../src/common/xtistrm.cpp:299
+msgid "Illegal Object Class (Non-wxEvtHandler) as Event Source"
+msgstr "Ungültige Objektklasse (nicht wxEvtHandler) als Ereignisquelle"
+
+#: ../src/common/xti.cpp:513
+msgid "Illegal Parameter Count for ConstructObject Method"
+msgstr "Ungültige Anzahl Parameter für ConstructObject-Methode"
+
+#: ../src/common/xti.cpp:501
+msgid "Illegal Parameter Count for Create Method"
+msgstr "Ungültige Anzahl Parameter für Create-Methode"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/filectrlg.cpp:791
+msgid "Illegal directory name."
+msgstr "Ungültiger Verzeichnisname."
+
+#: ../src/generic/filectrlg.cpp:1380
+msgid "Illegal file specification."
+msgstr "Ungültige Dateiangabe."
+
+#: ../src/common/image.cpp:2158
+msgid "Image and mask have different sizes."
+msgstr "Bild und Bildmaske haben verschiedene Größen."
+
+#: ../src/common/image.cpp:2609
+#, c-format
+msgid "Image file is not of type %d."
+msgstr "Bilddatei hat nicht den Typ %d."
+
+#: ../src/common/image.cpp:2739
+#, c-format
+msgid "Image is not of type %s."
+msgstr "Bilddatei hat nicht den Typ %s."
+
+#: ../src/msw/textctrl.cpp:399
+msgid ""
+"Impossible to create a rich edit control, using simple text control instead. "
+"Please reinstall riched32.dll"
+msgstr ""
+"Versuch eine 'rich edit control' zu erstellen gescheitert, verwende "
+"stattdessen ein einfaches Text-Control. Bitte 'riched32.dll' neu installieren"
+
+#: ../src/unix/utilsunx.cpp:307
+msgid "Impossible to get child process input"
+msgstr "Es war nicht möglich, die Eingabe des Unterprozesses zu verarbeiten"
+
+#: ../src/common/filefn.cpp:1074
+#, c-format
+msgid "Impossible to get permissions for file '%s'"
+msgstr "Konnte nicht die Zugriffsrechte der Datei '%s' ermitteln"
+
+#: ../src/common/filefn.cpp:1088
+#, c-format
+msgid "Impossible to overwrite the file '%s'"
+msgstr "Versuch die Datei '%s' zu überschreiben, gescheitert"
+
+#: ../src/common/filefn.cpp:1142
+#, c-format
+msgid "Impossible to set permissions for the file '%s'"
+msgstr "Konnte die Zugriffsrechte für Datei '%s' nicht setzen"
+
+#: ../src/common/gifdecod.cpp:818
+#, c-format
+msgid "Incorrect GIF frame size (%u, %d) for the frame #%u"
+msgstr "Ungültige GIF Bildgröße  (%u, %d) für das Bild #%u"
+
+#: ../src/msw/ole/automtn.cpp:624
+msgid "Incorrect number of arguments."
+msgstr "Fehlerhafte Anzahl von Argumenten"
+
+#: ../src/common/stockitem.cpp:165
+msgid "Indent"
+msgstr "Einrücken"
+
+#: ../src/richtext/richtextformatdlg.cpp:330
+msgid "Indents && Spacing"
+msgstr "Einrückungen && Zeichenabstand"
+
+#: ../src/common/stockitem.cpp:166 ../src/html/helpwnd.cpp:525
+msgid "Index"
+msgstr "Index"
+
+#: ../src/common/fmapbase.cpp:159
+msgid "Indian (ISO-8859-12)"
+msgstr "Indisch (ISO-8859-12)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "Info"
+msgstr "Info"
+
+#: ../src/common/init.cpp:276
+msgid "Initialization failed in post init, aborting."
+msgstr "Initialisierung in \"post init\" fehlgeschlagen, breche ab."
+
+#: ../src/richtext/richtextsymboldlg.cpp:472
+msgid "Insert"
+msgstr "Einfügen"
+
+#: ../src/richtext/richtextbuffer.cpp:7687
+msgid "Insert Field"
+msgstr "Feld einfügen"
+
+#: ../src/richtext/richtextbuffer.cpp:7598
+#: ../src/richtext/richtextbuffer.cpp:8551
+msgid "Insert Image"
+msgstr "Bild einfügen"
+
+#: ../src/richtext/richtextbuffer.cpp:7645
+msgid "Insert Object"
+msgstr "Objekt einfügen"
+
+#: ../src/richtext/richtextctrl.cpp:1172 ../src/richtext/richtextctrl.cpp:1362
+#: ../src/richtext/richtextbuffer.cpp:7440
+#: ../src/richtext/richtextbuffer.cpp:7470
+#: ../src/richtext/richtextbuffer.cpp:7514
+msgid "Insert Text"
+msgstr "Text einfügen"
+
+#: ../src/richtext/richtextindentspage.cpp:295
+#: ../src/richtext/richtextindentspage.cpp:297
+msgid "Inserts a page break before the paragraph."
+msgstr "Fügt einen Seitenumbruch vor dem Absatz ein."
+
+#: ../src/richtext/richtextborderspage.cpp:549
+msgid "Inset"
+msgstr "Einfügen"
+
+#: ../src/gtk/app.cpp:429
+#, c-format
+msgid "Invalid GTK+ command line option, use \"%s --help\""
+msgstr "Ungültige GTK+ Kommentarzeile, benutzen sie \"%s --help\""
+
+#: ../src/common/imagtiff.cpp:314
+msgid "Invalid TIFF image index."
+msgstr "Ungültiger Index des TIFF-Bilds."
+
+#: ../src/osx/carbon/dataview.cpp:1782 ../src/osx/carbon/dataview.cpp:1877
+msgid "Invalid data view item"
+msgstr "Ungültiges Datenansichtselement"
+
+#: ../src/common/appcmn.cpp:266
+#, c-format
+msgid "Invalid display mode specification '%s'."
+msgstr "Ungültige Angabe '%s' des Displays."
+
+#: ../src/x11/app.cpp:121
+#, c-format
+msgid "Invalid geometry specification '%s'"
+msgstr "Ungültige Angabe '%s' der Fenstergröße"
+
+#: ../src/unix/fswatcher_inotify.cpp:298
+#, c-format
+msgid "Invalid inotify event for \"%s\""
+msgstr "Ungültiges inotify-Ereignis für \"%s\""
+
+#: ../src/unix/snglinst.cpp:306
+#, c-format
+msgid "Invalid lock file '%s'."
+msgstr "Ungültige Sperr-Datei '%s'."
+
+#: ../src/common/translation.cpp:1111
+msgid "Invalid message catalog."
+msgstr "Ungültiger Nachrichtenkatalog."
+
+#: ../src/common/xtistrm.cpp:409 ../src/common/xtistrm.cpp:424
+msgid "Invalid or Null Object ID passed to GetObjectClassInfo"
+msgstr "Ungültige oder Null Objekt-ID an GetObjectClassInfo übergeben"
+
+#: ../src/common/xtistrm.cpp:439
+msgid "Invalid or Null Object ID passed to HasObjectClassInfo"
+msgstr "Ungültige oder Null Objekt-ID an HasObjectClassInfo übergeben"
+
+#: ../src/common/regex.cpp:313
+#, c-format
+msgid "Invalid regular expression '%s': %s"
+msgstr "Ungültiger regulärer Ausdruck '%s': %s"
+
+#: ../src/common/config.cpp:226
+#, c-format
+msgid "Invalid value %ld for a boolean key \"%s\" in config file."
+msgstr ""
+"Ungültiger Wert %ld für einen booleschen Schlüssel  \"%s\"  in der "
+"Konfigurationsdatei."
+
+#: ../src/generic/fontdlgg.cpp:329 ../src/richtext/richtextfontpage.cpp:333
+#: ../src/osx/carbon/fontdlg.cpp:547 ../src/common/stockitem.cpp:168
+msgid "Italic"
+msgstr "Kursiv"
+
+#: ../src/common/paper.cpp:131
+msgid "Italy Envelope, 110 x 230 mm"
+msgstr "Italy Umschlag, 110 x 230 mm"
+
+#: ../src/common/imagjpeg.cpp:255
+msgid "JPEG: Couldn't load - file is probably corrupted."
+msgstr "JPEG: Lesefehler - Datei ist vermutlich beschädigt."
+
+#: ../src/common/imagjpeg.cpp:434
+msgid "JPEG: Couldn't save image."
+msgstr "JPEG: Konnte Bild nicht speichern."
+
+#: ../src/common/paper.cpp:164
+msgid "Japanese Double Postcard 200 x 148 mm"
+msgstr "Japanische Doppelte Postkarte 200 x 148 mm"
+
+#: ../src/common/paper.cpp:168
+msgid "Japanese Envelope Chou #3"
+msgstr "Japanischer Briefumschlag Chou #3"
+
+#: ../src/common/paper.cpp:181
+msgid "Japanese Envelope Chou #3 Rotated"
+msgstr "Japanischer Briefumschlag Chou #3 Rotiert"
+
+#: ../src/common/paper.cpp:169
+msgid "Japanese Envelope Chou #4"
+msgstr "Japanischer Briefumschlag Chou #4"
+
+#: ../src/common/paper.cpp:182
+msgid "Japanese Envelope Chou #4 Rotated"
+msgstr "Japanischer Briefumschlag Chou #4 Rotiert"
+
+#: ../src/common/paper.cpp:166
+msgid "Japanese Envelope Kaku #2"
+msgstr "Japanischer Briefumschlag Kaku #2"
+
+#: ../src/common/paper.cpp:179
+msgid "Japanese Envelope Kaku #2 Rotated"
+msgstr "Japanischer Briefumschlag Kaku #2 Rotiert"
+
+#: ../src/common/paper.cpp:167
+msgid "Japanese Envelope Kaku #3"
+msgstr "Japanischer Briefumschlag Kaku #3"
+
+#: ../src/common/paper.cpp:180
+msgid "Japanese Envelope Kaku #3 Rotated"
+msgstr "Japanischer Briefumschlag Kaku #3 Rotiert"
+
+#: ../src/common/paper.cpp:186
+msgid "Japanese Envelope You #4"
+msgstr "Japanischer Briefumschlag You #4"
+
+#: ../src/common/paper.cpp:187
+msgid "Japanese Envelope You #4 Rotated"
+msgstr "Japanischer Briefumschlag You #4 Rotiert"
+
+#: ../src/common/paper.cpp:139
+msgid "Japanese Postcard 100 x 148 mm"
+msgstr "Japanische Postkarte 100 x 148 mm"
+
+#: ../src/common/paper.cpp:176
+msgid "Japanese Postcard Rotated 148 x 100 mm"
+msgstr "Japanische Postkarte Rotiert 100 x 148 mm"
+
+#: ../src/common/stockitem.cpp:169
+msgid "Jump to"
+msgstr "Springen zu"
+
+#: ../src/common/stockitem.cpp:171
+msgid "Justified"
+msgstr "Bündig"
+
+#: ../src/richtext/richtextindentspage.cpp:155
+#: ../src/richtext/richtextindentspage.cpp:157
+#: ../src/richtext/richtextliststylepage.cpp:344
+#: ../src/richtext/richtextliststylepage.cpp:346
+msgid "Justify text left and right."
+msgstr "Text rechts und links ausrichten"
+
+#: ../src/common/fmapbase.cpp:163
+msgid "KOI8-R"
+msgstr "KOI8-R"
+
+#: ../src/common/fmapbase.cpp:164
+msgid "KOI8-U"
+msgstr "KOI8-U"
+
+#: ../src/common/accelcmn.cpp:254 ../src/common/accelcmn.cpp:336
+msgid "KP_"
+msgstr "Num_"
+
+#: ../src/common/accelcmn.cpp:103
+msgid "KP_ADD"
+msgstr "Num_Plus"
+
+#: ../src/common/accelcmn.cpp:98
+msgid "KP_BEGIN"
+msgstr "Num_Anfang"
+
+#: ../src/common/accelcmn.cpp:106
+msgid "KP_DECIMAL"
+msgstr "Num_Dezimal"
+
+#: ../src/common/accelcmn.cpp:100
+msgid "KP_DELETE"
+msgstr "Num_Entf"
+
+#: ../src/common/accelcmn.cpp:107
+msgid "KP_DIVIDE"
+msgstr "Num_Division"
+
+#: ../src/common/accelcmn.cpp:92
+msgid "KP_DOWN"
+msgstr "Num_Runter"
+
+#: ../src/common/accelcmn.cpp:97
+msgid "KP_END"
+msgstr "Num_Ende"
+
+#: ../src/common/accelcmn.cpp:87
+msgid "KP_ENTER"
+msgstr "Num_Eingabe"
+
+#: ../src/common/accelcmn.cpp:101
+msgid "KP_EQUAL"
+msgstr "Num_Gleich"
+
+#: ../src/common/accelcmn.cpp:88
+msgid "KP_HOME"
+msgstr "Num_Pos 1"
+
+#: ../src/common/accelcmn.cpp:99
+msgid "KP_INSERT"
+msgstr "Num_Einfg"
+
+#: ../src/common/accelcmn.cpp:89
+msgid "KP_LEFT"
+msgstr "Num_Links"
+
+#: ../src/common/accelcmn.cpp:102
+msgid "KP_MULTIPLY"
+msgstr "Num_Mal"
+
+#: ../src/common/accelcmn.cpp:95
+msgid "KP_NEXT"
+msgstr "Num_Nächster"
+
+#: ../src/common/accelcmn.cpp:96
+msgid "KP_PAGEDOWN"
+msgstr "Num_Bild Runter"
+
+#: ../src/common/accelcmn.cpp:94
+msgid "KP_PAGEUP"
+msgstr "Num_Bild Hoch"
+
+#: ../src/common/accelcmn.cpp:93
+msgid "KP_PRIOR"
+msgstr "Num_Voriger"
+
+#: ../src/common/accelcmn.cpp:91
+msgid "KP_RIGHT"
+msgstr "Num_Rechts"
+
+#: ../src/common/accelcmn.cpp:104
+msgid "KP_SEPARATOR"
+msgstr "Num_Trennzeichen"
+
+#: ../src/common/accelcmn.cpp:85
+msgid "KP_SPACE"
+msgstr "Num_Leertaste"
+
+#: ../src/common/accelcmn.cpp:105
+msgid "KP_SUBTRACT"
+msgstr "Num_Minus"
+
+#: ../src/common/accelcmn.cpp:86
+msgid "KP_TAB"
+msgstr "Num_Tab"
+
+#: ../src/common/accelcmn.cpp:90
+msgid "KP_UP"
+msgstr "Num_Hoch"
+
+#: ../src/richtext/richtextindentspage.cpp:270
+msgid "L&ine spacing:"
+msgstr "Ze&ilenabstand:"
+
+#: ../src/common/accelcmn.cpp:56
+msgid "LEFT"
+msgstr "LINKS"
+
+#: ../src/generic/prntdlgg.cpp:613 ../src/generic/prntdlgg.cpp:868
+msgid "Landscape"
+msgstr "Querformat"
+
+#: ../src/common/stockitem.cpp:174
+msgid "Last"
+msgstr "Letzte(r)"
+
+#: ../src/common/prntbase.cpp:1542
+msgid "Last page"
+msgstr "Letzte Seite"
+
+#: ../src/common/log.cpp:309
+#, c-format
+msgid "Last repeated message (\"%s\", %lu time) wasn't output"
+msgid_plural "Last repeated message (\"%s\", %lu times) wasn't output"
+msgstr[0] ""
+"Die letzte wiederholte Nachricht (\"%s\", %lu Mal) wurde nicht ausgegeben"
+msgstr[1] ""
+"Die letzte wiederholte Nachricht (\"%s\", %lu Mal) wurde nicht ausgegeben"
+
+#: ../src/common/paper.cpp:104
+msgid "Ledger, 17 x 11 in"
+msgstr "Ledger, 17 x 11 Zoll"
+
+#: ../src/richtext/richtextliststylepage.cpp:249
+#: ../src/richtext/richtextliststylepage.cpp:252
+#: ../src/richtext/richtextliststylepage.cpp:253
+#: ../src/richtext/richtextbulletspage.cpp:199
+#: ../src/richtext/richtextbulletspage.cpp:202
+#: ../src/richtext/richtextbulletspage.cpp:203
+#: ../src/richtext/richtextsizepage.cpp:249
+msgid "Left"
+msgstr "Links"
+
+#: ../src/richtext/richtextindentspage.cpp:204
+#: ../src/richtext/richtextliststylepage.cpp:390
+msgid "Left (&first line):"
+msgstr "Links (&ertse Zeile):"
+
+#: ../src/generic/prntdlgg.cpp:880
+msgid "Left margin (mm):"
+msgstr "Linker Rand (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:141
+#: ../src/richtext/richtextindentspage.cpp:143
+#: ../src/richtext/richtextliststylepage.cpp:330
+#: ../src/richtext/richtextliststylepage.cpp:332
+msgid "Left-align text."
+msgstr "Linksbündiger Text."
+
+#: ../src/common/paper.cpp:145
+msgid "Legal Extra 9 1/2 x 15 in"
+msgstr "Legal Extra 9 1/2 x 15 Zoll"
+
+#: ../src/common/paper.cpp:97
+msgid "Legal, 8 1/2 x 14 in"
+msgstr "Legal, 8 1/2 x 14 Zoll"
+
+#: ../src/common/paper.cpp:144
+msgid "Letter Extra 9 1/2 x 12 in"
+msgstr "Letter Extra 9 1/2 x 12 Zoll"
+
+#: ../src/common/paper.cpp:150
+msgid "Letter Extra Transverse 9.275 x 12 in"
+msgstr "Brief Extra Quer 9.275 x 12 Zoll"
+
+#: ../src/common/paper.cpp:153
+msgid "Letter Plus 8 1/2 x 12.69 in"
+msgstr "Brief Plus 8 1/2 x 12.69 Zoll"
+
+#: ../src/common/paper.cpp:170
+msgid "Letter Rotated 11 x 8 1/2 in"
+msgstr "Brief Rotiert 11 x 8 1/2 Zoll"
+
+#: ../src/common/paper.cpp:102
+msgid "Letter Small, 8 1/2 x 11 in"
+msgstr "Letter Small, 8 1/2 x 11 Zoll"
+
+#: ../src/common/paper.cpp:148
+msgid "Letter Transverse 8 1/2 x 11 in"
+msgstr "Brief Quer 8 1/2 x 11 Zoll"
+
+#: ../src/common/paper.cpp:96
+msgid "Letter, 8 1/2 x 11 in"
+msgstr "Letter, 8 1/2 x 11 Zoll"
+
+#: ../src/generic/aboutdlgg.cpp:173
+msgid "License"
+msgstr "Lizenz"
+
+#: ../src/generic/fontdlgg.cpp:332
+msgid "Light"
+msgstr "Dünn"
+
+#: ../src/generic/helpext.cpp:298
+#, c-format
+msgid "Line %lu of map file \"%s\" has invalid syntax, skipped."
+msgstr ""
+"Zeile %lu der Abbildungsdatei \"%s\" hat ungültige Syntax, übersprungen."
+
+#: ../src/richtext/richtextliststylepage.cpp:444
+msgid "Line spacing:"
+msgstr "Zeilenabstand:"
+
+#: ../src/html/chm.cpp:838
+msgid "Link contained '//', converted to absolute link."
+msgstr "Verweis enthielt '//', in absoluten Link umgewandelt."
+
+#: ../src/richtext/richtextformatdlg.cpp:349
+msgid "List Style"
+msgstr "Listenstil"
+
+#: ../src/richtext/richtextstyles.cpp:1060
+msgid "List styles"
+msgstr "Listenstile"
+
+#: ../src/richtext/richtextfontpage.cpp:206
+#: ../src/richtext/richtextfontpage.cpp:208
+msgid "Lists font sizes in points."
+msgstr "Schriftgröße der Listen in Punkt."
+
+#: ../src/richtext/richtextfontpage.cpp:199
+#: ../src/richtext/richtextfontpage.cpp:201
+msgid "Lists the available fonts."
+msgstr "Listet die verfügbaren Schriftarten auf."
+
+#: ../src/common/fldlgcmn.cpp:325
+#, c-format
+msgid "Load %s file"
+msgstr "%s-Datei laden"
+
+#: ../src/html/htmlwin.cpp:575
+msgid "Loading : "
+msgstr "Laden: "
+
+#: ../src/unix/snglinst.cpp:246
+#, c-format
+msgid "Lock file '%s' has incorrect owner."
+msgstr "Sperr-Datei '%s' hat falschen Besitzer."
+
+#: ../src/unix/snglinst.cpp:251
+#, c-format
+msgid "Lock file '%s' has incorrect permissions."
+msgstr "Sperr-Datei '%s' hat falsche Zugriffsrechte."
+
+#: ../src/generic/logg.cpp:582
+#, c-format
+msgid "Log saved to the file '%s'."
+msgstr "Logtext in Datei '%s' gespeichert."
+
+#: ../src/richtext/richtextliststylepage.cpp:484
+#: ../src/richtext/richtextbulletspage.cpp:289
+msgid "Lower case letters"
+msgstr "Kleinbuchstaben"
+
+#: ../src/richtext/richtextliststylepage.cpp:486
+#: ../src/richtext/richtextbulletspage.cpp:291
+msgid "Lower case roman numerals"
+msgstr "Römische Ziffern in Kleinbuchstaben"
+
+#: ../src/gtk/mdi.cpp:422 ../src/gtk1/mdi.cpp:431
+msgid "MDI child"
+msgstr "MDI child"
+
+#: ../src/common/accelcmn.cpp:68
+msgid "MENU"
+msgstr "MENÜ"
+
+#: ../src/msw/helpchm.cpp:56
+msgid ""
+"MS HTML Help functions are unavailable because the MS HTML Help library is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Die MS-HTML-Hilfe funktioniert nicht, da die MS-HTML-Hilfe-Bibliothek nicht "
+"installiert ist. Bitte installieren Sie sie."
+
+#: ../src/univ/themes/win32.cpp:3754
+msgid "Ma&ximize"
+msgstr "Ma&ximieren"
+
+#: ../src/common/fmapbase.cpp:203
+msgid "MacArabic"
+msgstr "MacArabic"
+
+#: ../src/common/fmapbase.cpp:222
+msgid "MacArmenian"
+msgstr "MacArmenian"
+
+#: ../src/common/fmapbase.cpp:211
+msgid "MacBengali"
+msgstr "MacBengali"
+
+#: ../src/common/fmapbase.cpp:217
+msgid "MacBurmese"
+msgstr "MacBurmese"
+
+#: ../src/common/fmapbase.cpp:236
+msgid "MacCeltic"
+msgstr "MacCeltic"
+
+#: ../src/common/fmapbase.cpp:227
+msgid "MacCentralEurRoman"
+msgstr "MacCentralEurRoman"
+
+#: ../src/common/fmapbase.cpp:223
+msgid "MacChineseSimp"
+msgstr "MacChineseSimp"
+
+#: ../src/common/fmapbase.cpp:201
+msgid "MacChineseTrad"
+msgstr "MacChineseTrad"
+
+#: ../src/common/fmapbase.cpp:233
+msgid "MacCroatian"
+msgstr "MacCroatian"
+
+#: ../src/common/fmapbase.cpp:206
+msgid "MacCyrillic"
+msgstr "MacCyrillic"
+
+#: ../src/common/fmapbase.cpp:207
+msgid "MacDevanagari"
+msgstr "MacDevanagari"
+
+#: ../src/common/fmapbase.cpp:231
+msgid "MacDingbats"
+msgstr "MacDingbats"
+
+#: ../src/common/fmapbase.cpp:226
+msgid "MacEthiopic"
+msgstr "MacEthiopic"
+
+#: ../src/common/fmapbase.cpp:229
+msgid "MacExtArabic"
+msgstr "MacExtArabic"
+
+#: ../src/common/fmapbase.cpp:237
+msgid "MacGaelic"
+msgstr "MacGaelic"
+
+#: ../src/common/fmapbase.cpp:221
+msgid "MacGeorgian"
+msgstr "MacGeorgian"
+
+#: ../src/common/fmapbase.cpp:205
+msgid "MacGreek"
+msgstr "MacGreek"
+
+#: ../src/common/fmapbase.cpp:209
+msgid "MacGujarati"
+msgstr "MacGujarati"
+
+#: ../src/common/fmapbase.cpp:208
+msgid "MacGurmukhi"
+msgstr "MacGurmukhi"
+
+#: ../src/common/fmapbase.cpp:204
+msgid "MacHebrew"
+msgstr "MacHebrew"
+
+#: ../src/common/fmapbase.cpp:234
+msgid "MacIcelandic"
+msgstr "MacIcelandic"
+
+#: ../src/common/fmapbase.cpp:200
+msgid "MacJapanese"
+msgstr "MacJapanese"
+
+#: ../src/common/fmapbase.cpp:214
+msgid "MacKannada"
+msgstr "MacKannada"
+
+#: ../src/common/fmapbase.cpp:238
+msgid "MacKeyboardGlyphs"
+msgstr "MacKeyboardGlyphs"
+
+#: ../src/common/fmapbase.cpp:218
+msgid "MacKhmer"
+msgstr "MacKhmer"
+
+#: ../src/common/fmapbase.cpp:202
+msgid "MacKorean"
+msgstr "MacKorean"
+
+#: ../src/common/fmapbase.cpp:220
+msgid "MacLaotian"
+msgstr "MacLaotian"
+
+#: ../src/common/fmapbase.cpp:215
+msgid "MacMalayalam"
+msgstr "MacMalayalam"
+
+#: ../src/common/fmapbase.cpp:225
+msgid "MacMongolian"
+msgstr "MacMongolian"
+
+#: ../src/common/fmapbase.cpp:210
+msgid "MacOriya"
+msgstr "MacOriya"
+
+#: ../src/common/fmapbase.cpp:199
+msgid "MacRoman"
+msgstr "MacRoman"
+
+#: ../src/common/fmapbase.cpp:235
+msgid "MacRomanian"
+msgstr "MacRomanian"
+
+#: ../src/common/fmapbase.cpp:216
+msgid "MacSinhalese"
+msgstr "MacSinhalese"
+
+#: ../src/common/fmapbase.cpp:230
+msgid "MacSymbol"
+msgstr "MacSymbol"
+
+#: ../src/common/fmapbase.cpp:212
+msgid "MacTamil"
+msgstr "MacTamil"
+
+#: ../src/common/fmapbase.cpp:213
+msgid "MacTelugu"
+msgstr "MacTelugu"
+
+#: ../src/common/fmapbase.cpp:219
+msgid "MacThai"
+msgstr "MacThai"
+
+#: ../src/common/fmapbase.cpp:224
+msgid "MacTibetan"
+msgstr "MacTibetan"
+
+#: ../src/common/fmapbase.cpp:232
+msgid "MacTurkish"
+msgstr "MacTurkish"
+
+#: ../src/common/fmapbase.cpp:228
+msgid "MacVietnamese"
+msgstr "MacVietnamese"
+
+#: ../src/propgrid/advprops.cpp:2031
+msgid "Make a selection:"
+msgstr "Bitte auswählen:"
+
+#: ../src/richtext/richtextformatdlg.cpp:362
+#: ../src/richtext/richtextmarginspage.cpp:172
+msgid "Margins"
+msgstr "Randfiguren"
+
+#: ../src/generic/fdrepdlg.cpp:147
+msgid "Match case"
+msgstr "Groß- und Kleinschreibung beachten"
+
+#: ../src/richtext/richtextsizepage.cpp:463
+msgid "Max height:"
+msgstr "Maximale Höhe:"
+
+#: ../src/richtext/richtextsizepage.cpp:436
+msgid "Max width:"
+msgstr "Maximale Breite:"
+
+#: ../src/unix/mediactrl.cpp:1006
+#, c-format
+msgid "Media playback error: %s"
+msgstr "Medienwiedergabe-Fehler: %s"
+
+#: ../src/common/fs_mem.cpp:175
+#, c-format
+msgid "Memory VFS already contains file '%s'!"
+msgstr "VFS-Speicher beinhaltet bereits die Datei '%s'!"
+
+#: ../src/msw/frame.cpp:347
+msgid "Menu"
+msgstr "Menü"
+
+#: ../src/common/msgout.cpp:124
+msgid "Message"
+msgstr "Nachricht"
+
+#: ../src/univ/themes/metal.cpp:168
+msgid "Metal theme"
+msgstr "Metal-Thema"
+
+#: ../src/msw/ole/automtn.cpp:641
+msgid "Method or property not found."
+msgstr "Methode oder Eigenschaft nicht gefunden."
+
+#: ../src/univ/themes/win32.cpp:3752
+msgid "Mi&nimize"
+msgstr "Mi&nimieren"
+
+#: ../src/richtext/richtextsizepage.cpp:409
+msgid "Min height:"
+msgstr "Minimale Höhe:"
+
+#: ../src/richtext/richtextsizepage.cpp:382
+msgid "Min width:"
+msgstr "Minimale Breite:"
+
+#: ../src/msw/ole/automtn.cpp:657
+msgid "Missing a required parameter."
+msgstr "Ein notwendiger Parameter fehlt."
+
+#: ../src/generic/fontdlgg.cpp:324
+msgid "Modern"
+msgstr "Modern"
+
+#: ../src/generic/filectrlg.cpp:462
+msgid "Modified"
+msgstr "Geändert"
+
+#: ../src/common/module.cpp:133
+#, c-format
+msgid "Module \"%s\" initialization failed"
+msgstr "Initialisierung von Modul \"%s\" fehlgeschlagen."
+
+#: ../src/common/paper.cpp:132
+msgid "Monarch Envelope, 3 7/8 x 7 1/2 in"
+msgstr "Monarch Envelope, 3 7/8 x 7 1/2 Zoll"
+
+#: ../src/msw/fswatcher.cpp:143
+msgid "Monitoring individual files for changes is not supported currently."
+msgstr ""
+"Überwachen einzelner Dateien auf Änderungen wird zurzeit nicht unterstützt."
+
+#: ../src/generic/editlbox.cpp:276
+msgid "Move down"
+msgstr "Abwärts verschieben"
+
+#: ../src/generic/editlbox.cpp:275
+msgid "Move up"
+msgstr "Nach oben"
+
+#: ../src/richtext/richtextsizepage.cpp:682
+#: ../src/richtext/richtextsizepage.cpp:684
+msgid "Moves the object to the next paragraph."
+msgstr "Verschiebt das Objekt zum nächsten Absatz."
+
+#: ../src/richtext/richtextsizepage.cpp:676
+#: ../src/richtext/richtextsizepage.cpp:678
+msgid "Moves the object to the previous paragraph."
+msgstr "Verschiebt das Objekt in den vorherigen Absatz."
+
+#: ../src/richtext/richtextbuffer.cpp:9345
+msgid "Multiple Cell Properties"
+msgstr "Mehrfache Zelleneigenschaften"
+
+#: ../src/common/accelcmn.cpp:81
+msgid "NUM_LOCK"
+msgstr "Num_LOCK"
+
+#: ../src/generic/filectrlg.cpp:459
+msgid "Name"
+msgstr "Name"
+
+#: ../src/common/stockitem.cpp:175
+msgid "Network"
+msgstr "Netzwerk"
+
+#: ../src/common/stockitem.cpp:176
+msgid "New"
+msgstr "Neu"
+
+#: ../src/richtext/richtextstyledlg.cpp:243
+msgid "New &Box Style..."
+msgstr "Neuer &Kastenstil..."
+
+#: ../src/richtext/richtextstyledlg.cpp:225
+msgid "New &Character Style..."
+msgstr "Neuer &Zeichenstil..."
+
+#: ../src/richtext/richtextstyledlg.cpp:237
+msgid "New &List Style..."
+msgstr "Neuer &Listenstil..."
+
+#: ../src/richtext/richtextstyledlg.cpp:231
+msgid "New &Paragraph Style..."
+msgstr "Neuer &Absatzstil..."
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:651
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:817
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:890
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:931
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "New Style"
+msgstr "Neuer Stil"
+
+#: ../src/generic/dirdlgg.cpp:102
+msgid "New directory"
+msgstr "Verzeichnis anlegen"
+
+#: ../src/generic/editlbox.cpp:273
+msgid "New item"
+msgstr "Neues &Element"
+
+#: ../src/generic/dirdlgg.cpp:326 ../src/generic/dirdlgg.cpp:336
+#: ../src/generic/filectrlg.cpp:653 ../src/generic/filectrlg.cpp:662
+msgid "NewName"
+msgstr "NeuerName"
+
+#: ../src/generic/tipdlg.cpp:305
+msgid "Next"
+msgstr "Weiter"
+
+#: ../src/common/prntbase.cpp:1537 ../src/html/helpwnd.cpp:678
+msgid "Next page"
+msgstr "Nächste HTML-Seite zeigen"
+
+#: ../include/wx/msgdlg.h:272 ../src/common/stockitem.cpp:177
+#: ../src/motif/msgdlg.cpp:196
+msgid "No"
+msgstr "Nein"
+
+#: ../src/generic/animateg.cpp:150
+#, c-format
+msgid "No animation handler for type %ld defined."
+msgstr "Kein Animationshandler für Typ %ld definiert."
+
+#: ../src/dfb/bitmap.cpp:642 ../src/dfb/bitmap.cpp:676
+#, c-format
+msgid "No bitmap handler for type %d defined."
+msgstr "Keine Bildbehandlungsroutine für den Typ %d definiert."
+
+#: ../src/osx/carbon/dataview.cpp:1784
+msgid "No column existing."
+msgstr "Es existiert keine Zeile"
+
+#: ../src/osx/carbon/dataview.cpp:1674
+msgid "No column for the specified column existing."
+msgstr "Für die ausgewählte Spalte existiert nicht."
+
+#: ../src/osx/carbon/dataview.cpp:1423
+msgid "No column for the specified column position existing."
+msgstr "Für die ausgewählte Zeilenposition existiert nicht."
+
+#: ../src/common/utilscmn.cpp:1049
+msgid "No default application configured for HTML files."
+msgstr "Keine voreingestellte Anwendung für HTML Dateinen."
+
+#: ../src/generic/helpext.cpp:449
+msgid "No entries found."
+msgstr "Keine Einträge gefunden."
+
+#: ../src/common/fontmap.cpp:421
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found,\n"
+"but an alternative encoding '%s' is available.\n"
+"Do you want to use this encoding (otherwise you will have to choose another "
+"one)?"
+msgstr ""
+"Keine Schriftart für die Kodierung '%s' gefunden,\n"
+"es ist aber eine Alternative '%s' verfügbar.\n"
+"Möchten Sie diese Schriftart für die Kodierung wählen\n"
+"(sonst müssen Sie einen anderen auswählen)?"
+
+#: ../src/common/fontmap.cpp:426
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found.\n"
+"Would you like to select a font to be used for this encoding\n"
+"(otherwise the text in this encoding will not be shown correctly)?"
+msgstr ""
+"Keine Schriftart für die Kodierung '%s' gefunden,\n"
+"Möchten Sie eine Schriftart für die Kodierung wählen\n"
+"(sonst wird der Text mit dieser Kodierung nicht richtig angezeigt)?"
+
+#: ../src/generic/animateg.cpp:142
+msgid "No handler found for animation type."
+msgstr "Kein Handler für den Animationstyp gefunden."
+
+#: ../src/common/image.cpp:2591
+msgid "No handler found for image type."
+msgstr "Dieses Bildformat wird nicht unterstützt."
+
+#: ../src/common/image.cpp:2599 ../src/common/image.cpp:2710
+#: ../src/common/image.cpp:2763
+#, c-format
+msgid "No image handler for type %d defined."
+msgstr "Bildformat %d wurde nicht definiert."
+
+#: ../src/common/image.cpp:2733 ../src/common/image.cpp:2777
+#, c-format
+msgid "No image handler for type %s defined."
+msgstr "Bildformat %s wurde nicht definiert."
+
+#: ../src/html/helpwnd.cpp:871
+msgid "No matching page found yet"
+msgstr "Passende Seite noch nicht gefunden"
+
+#: ../src/osx/carbon/dataview.cpp:1676 ../src/osx/carbon/dataview.cpp:1786
+msgid "No renderer or invalid renderer type specified for custom data column."
+msgstr ""
+"Kein Renderer oder ungültiger Renderer Typ für die benutzte Dateizeile "
+"aufgeführt"
+
+#: ../src/osx/carbon/dataview.cpp:1424
+msgid "No renderer specified for column."
+msgstr "Kein Renderer für diese Zeile festgelegt."
+
+#: ../src/unix/sound.cpp:81
+msgid "No sound"
+msgstr "Kein Ton"
+
+#: ../src/common/image.cpp:2166 ../src/common/image.cpp:2207
+msgid "No unused colour in image being masked."
+msgstr "Keine unbenutzte Farbe wurde im Bild unterdrückt."
+
+#: ../src/common/image.cpp:3236
+msgid "No unused colour in image."
+msgstr "Keine unbenutzte Farbe im Bild."
+
+#: ../src/generic/helpext.cpp:306
+#, c-format
+msgid "No valid mappings found in the file \"%s\"."
+msgstr "Keine gültige Abbildung in der Datei \"%s\" gefunden."
+
+#: ../src/richtext/richtextborderspage.cpp:542
+#: ../src/richtext/richtextsizepage.cpp:248
+#: ../src/richtext/richtextsizepage.cpp:252
+msgid "None"
+msgstr "Kein"
+
+#: ../src/common/fmapbase.cpp:157
+msgid "Nordic (ISO-8859-10)"
+msgstr "Nordisch (ISO-8859-10)"
+
+#: ../src/generic/fontdlgg.cpp:328 ../src/generic/fontdlgg.cpp:331
+msgid "Normal"
+msgstr "Normal"
+
+#: ../src/html/helpwnd.cpp:1276
+msgid "Normal face<br>and <u>underlined</u>. "
+msgstr "Normaler Zeichensatz<br> und <u>unterstrichen</u> "
+
+#: ../src/html/helpwnd.cpp:1218
+msgid "Normal font:"
+msgstr "Normal Font:"
+
+#: ../src/propgrid/props.cpp:887
+#, c-format
+msgid "Not %s"
+msgstr "Nicht %s"
+
+#: ../include/wx/filename.h:586 ../include/wx/filename.h:591
+msgid "Not available"
+msgstr "Nicht verfügbar"
+
+#: ../src/richtext/richtextfontpage.cpp:340
+msgid "Not underlined"
+msgstr "Nicht unterstrichen"
+
+#: ../src/common/paper.cpp:116
+msgid "Note, 8 1/2 x 11 in"
+msgstr "Note, 8 1/2 x 11 Zoll"
+
+#: ../src/generic/notifmsgg.cpp:104
+msgid "Notice"
+msgstr "Bemerkung"
+
+#: ../src/osx/carbon/dataview.cpp:902
+msgid "Number of columns could not be determined."
+msgstr "Anzahl an Zeilen konnte nicht bestimmt werden."
+
+#: ../src/richtext/richtextliststylepage.cpp:487
+#: ../src/richtext/richtextbulletspage.cpp:292
+msgid "Numbered outline"
+msgstr "Nummerierung umrandet"
+
+#: ../include/wx/msgdlg.h:273 ../src/richtext/richtextstyledlg.cpp:297
+#: ../src/common/stockitem.cpp:178 ../src/msw/msgdlg.cpp:489
+#: ../src/msw/msgdlg.cpp:799 ../src/msw/dialog.cpp:120
+#: ../src/gtk1/fontdlg.cpp:138
+msgid "OK"
+msgstr "OK"
+
+#: ../src/msw/ole/automtn.cpp:681
+#, c-format
+msgid "OLE Automation error in %s: %s"
+msgstr "OLE Automatisierungsfehler in  %s: %s"
+
+#: ../include/wx/richtext/richtextimagedlg.h:39
+msgid "Object Properties"
+msgstr "Objekteigenschaften"
+
+#: ../src/msw/ole/automtn.cpp:649
+msgid "Object implementation does not support named arguments."
+msgstr "Objektanwendung unterstützt die genannten Argumente nicht."
+
+#: ../src/common/xtixml.cpp:264
+msgid "Objects must have an id attribute"
+msgstr "Objekte müssen ein ID-Attribut besitzen."
+
+#: ../src/common/docview.cpp:1755 ../src/common/docview.cpp:1797
+msgid "Open File"
+msgstr "Datei öffnen"
+
+#: ../src/html/helpwnd.cpp:684 ../src/html/helpwnd.cpp:1557
+msgid "Open HTML document"
+msgstr "Öffne HTML-Dokument"
+
+#: ../src/generic/dbgrptg.cpp:163
+#, c-format
+msgid "Open file \"%s\""
+msgstr "Öffne Datei \"%s\""
+
+#: ../src/common/stockitem.cpp:179
+msgid "Open..."
+msgstr "Öffnen..."
+
+#: ../src/osx/carbon/glcanvas.cpp:48
+#, c-format
+msgid "OpenGL function \"%s\" failed: %s (error %d)"
+msgstr "OpenGL Funktion \"%s\" schlug fehl %s (Fehler %d)"
+
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:821
+msgid "Operation not permitted."
+msgstr "Ausführung nicht erlaubt."
+
+#: ../src/common/cmdline.cpp:735
+#, c-format
+msgid "Option '%s' can't be negated"
+msgstr "Option '%s' konnte nicht negiert werden"
+
+#: ../src/common/cmdline.cpp:899
+#, c-format
+msgid "Option '%s' requires a value."
+msgstr "Option '%s' erwartet einen Wert."
+
+#: ../src/common/cmdline.cpp:982
+#, c-format
+msgid "Option '%s': '%s' cannot be converted to a date."
+msgstr "Option '%s': '%s' kann nicht in ein Datum umgewandelt werden."
+
+#: ../src/generic/dirdlgg.cpp:187 ../src/generic/prntdlgg.cpp:618
+msgid "Options"
+msgstr "Einstellungen"
+
+#: ../src/generic/prntdlgg.cpp:615 ../src/generic/prntdlgg.cpp:869
+msgid "Orientation"
+msgstr "Ausrichtung"
+
+#: ../src/common/windowid.cpp:259
+msgid "Out of window IDs.  Recommend shutting down application."
+msgstr "Window IDs ausgeschalten. Vorgeschlagene Auswahl schließen."
+
+#: ../src/richtext/richtextborderspage.cpp:400
+#: ../src/richtext/richtextborderspage.cpp:533
+msgid "Outline"
+msgstr "Umrandung"
+
+#: ../src/richtext/richtextborderspage.cpp:550
+msgid "Outset"
+msgstr "Beginn"
+
+#: ../src/msw/ole/automtn.cpp:645
+msgid "Overflow while coercing argument values."
+msgstr "Überlauf beim Umwandeln der Argumentwerte."
+
+#: ../src/common/accelcmn.cpp:84
+msgid "PAGEDOWN"
+msgstr "BILD RUNTER"
+
+#: ../src/common/accelcmn.cpp:83
+msgid "PAGEUP"
+msgstr "BILD HOCH"
+
+#: ../src/common/accelcmn.cpp:69
+msgid "PAUSE"
+msgstr "PAUSE"
+
+#: ../src/common/imagpcx.cpp:457 ../src/common/imagpcx.cpp:480
+msgid "PCX: couldn't allocate memory"
+msgstr "PCX: Speicheranforderung gescheitert"
+
+#: ../src/common/imagpcx.cpp:456
+msgid "PCX: image format unsupported"
+msgstr "PCX: Bildformat wird nicht unterstützt"
+
+#: ../src/common/imagpcx.cpp:479
+msgid "PCX: invalid image"
+msgstr "PCX: ungültiges Bild"
+
+#: ../src/common/imagpcx.cpp:442
+msgid "PCX: this is not a PCX file."
+msgstr "PCX: dies ist keine PCX-Datei."
+
+#: ../src/common/imagpcx.cpp:459 ../src/common/imagpcx.cpp:481
+msgid "PCX: unknown error !!!"
+msgstr "PCX: unbekannter Fehler!"
+
+#: ../src/common/imagpcx.cpp:458
+msgid "PCX: version number too low"
+msgstr "PCX: Versionsnummer zu niedrig"
+
+#: ../src/common/accelcmn.cpp:55
+msgid "PGDN"
+msgstr "BILD HOCH"
+
+#: ../src/common/accelcmn.cpp:54
+msgid "PGUP"
+msgstr "BILD RUNTER"
+
+#: ../src/common/imagpnm.cpp:91
+msgid "PNM: Couldn't allocate memory."
+msgstr "PNM: Speicheranforderung gescheitert."
+
+#: ../src/common/imagpnm.cpp:73
+msgid "PNM: File format is not recognized."
+msgstr "PNM: Datei-Format wurde nicht erkannt."
+
+#: ../src/common/imagpnm.cpp:112 ../src/common/imagpnm.cpp:134
+#: ../src/common/imagpnm.cpp:156
+msgid "PNM: File seems truncated."
+msgstr "PNM: Datei wurde abgeschnitten."
+
+#: ../src/common/paper.cpp:188
+msgid "PRC 16K 146 x 215 mm"
+msgstr "PRC 16K 146 x 215 mm"
+
+#: ../src/common/paper.cpp:201
+msgid "PRC 16K Rotated"
+msgstr "PRC 16K Rotiert"
+
+#: ../src/common/paper.cpp:189
+msgid "PRC 32K 97 x 151 mm"
+msgstr "PRC 32K 97 x 151 mm"
+
+#: ../src/common/paper.cpp:202
+msgid "PRC 32K Rotated"
+msgstr "PRC 32K Rotiert"
+
+#: ../src/common/paper.cpp:190
+msgid "PRC 32K(Big) 97 x 151 mm"
+msgstr "PRC 32K(Groß) 97 x 151 mm"
+
+#: ../src/common/paper.cpp:203
+msgid "PRC 32K(Big) Rotated"
+msgstr "PRC 32K(Groß) Rotiert"
+
+#: ../src/common/paper.cpp:191
+msgid "PRC Envelope #1 102 x 165 mm"
+msgstr "PRC Umschlag #1 102 x 165 mm"
+
+#: ../src/common/paper.cpp:204
+msgid "PRC Envelope #1 Rotated 165 x 102 mm"
+msgstr "PRC Umschlag #1 Rotated 165 x 102 mm"
+
+#: ../src/common/paper.cpp:200
+msgid "PRC Envelope #10 324 x 458 mm"
+msgstr "PRC Umschlag #10 324 x 458 mm"
+
+#: ../src/common/paper.cpp:213
+msgid "PRC Envelope #10 Rotated 458 x 324 mm"
+msgstr "PRC Umschlag #10 Rotiert 458 x 324 mm"
+
+#: ../src/common/paper.cpp:192
+msgid "PRC Envelope #2 102 x 176 mm"
+msgstr "PRC Umschlag #2 102 x 176 mm"
+
+#: ../src/common/paper.cpp:205
+msgid "PRC Envelope #2 Rotated 176 x 102 mm"
+msgstr "PRC Umschlag #2 Rotiert 176 x 102 mm"
+
+#: ../src/common/paper.cpp:193
+msgid "PRC Envelope #3 125 x 176 mm"
+msgstr "PRC Umschlag #3 125 x 176 mm"
+
+#: ../src/common/paper.cpp:206
+msgid "PRC Envelope #3 Rotated 176 x 125 mm"
+msgstr "PRC Umschlag #3 Rotiert 176 x 125 mm"
+
+#: ../src/common/paper.cpp:194
+msgid "PRC Envelope #4 110 x 208 mm"
+msgstr "PRC Umschlag #4 110 x 208 mm"
+
+#: ../src/common/paper.cpp:207
+msgid "PRC Envelope #4 Rotated 208 x 110 mm"
+msgstr "PRC Umschlag #4 Rotiert 208 x 110 mm"
+
+#: ../src/common/paper.cpp:195
+msgid "PRC Envelope #5 110 x 220 mm"
+msgstr "PRC Umschlag #5 110 x 220 mm"
+
+#: ../src/common/paper.cpp:208
+msgid "PRC Envelope #5 Rotated 220 x 110 mm"
+msgstr "PRC Umschlag #5 Rotiert 220 x 110 mm"
+
+#: ../src/common/paper.cpp:196
+msgid "PRC Envelope #6 120 x 230 mm"
+msgstr "PRC Umschlag #6 120 x 230 mm"
+
+#: ../src/common/paper.cpp:209
+msgid "PRC Envelope #6 Rotated 230 x 120 mm"
+msgstr "PRC Umschlag #6 Rotiert 230 x 120 mm"
+
+#: ../src/common/paper.cpp:197
+msgid "PRC Envelope #7 160 x 230 mm"
+msgstr "PRC Umschlag #7 160 x 230 mm"
+
+#: ../src/common/paper.cpp:210
+msgid "PRC Envelope #7 Rotated 230 x 160 mm"
+msgstr "PRC Umschlag #7 Rotiert 230 x 160 mm"
+
+#: ../src/common/paper.cpp:198
+msgid "PRC Envelope #8 120 x 309 mm"
+msgstr "PRC Umschlag #8 120 x 309 mm"
+
+#: ../src/common/paper.cpp:211
+msgid "PRC Envelope #8 Rotated 309 x 120 mm"
+msgstr "PRC Umschlag #8 Rotiert 309 x 120 mm"
+
+#: ../src/common/paper.cpp:199
+msgid "PRC Envelope #9 229 x 324 mm"
+msgstr "PRC Umschlag #9 229 x 324 mm"
+
+#: ../src/common/paper.cpp:212
+msgid "PRC Envelope #9 Rotated 324 x 229 mm"
+msgstr "PRC Umschlag #9 Rotiert 324 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:72
+msgid "PRINT"
+msgstr "DRUCKEN"
+
+#: ../src/richtext/richtextmarginspage.cpp:286
+msgid "Padding"
+msgstr "Auffüllung"
+
+#: ../src/common/prntbase.cpp:2044
+#, c-format
+msgid "Page %d"
+msgstr "Seite %d"
+
+#: ../src/common/prntbase.cpp:2042
+#, c-format
+msgid "Page %d of %d"
+msgstr "Seite %d aus %d"
+
+#: ../src/gtk/print.cpp:774
+msgid "Page Setup"
+msgstr "Seiten-Einstellungen"
+
+#: ../src/generic/prntdlgg.cpp:828 ../src/common/prntbase.cpp:467
+msgid "Page setup"
+msgstr "Seiteneinstellungen"
+
+#: ../src/generic/prntdlgg.cpp:216
+msgid "Pages"
+msgstr "Seiten"
+
+#: ../src/generic/prntdlgg.cpp:602 ../src/generic/prntdlgg.cpp:801
+#: ../src/generic/prntdlgg.cpp:842 ../src/generic/prntdlgg.cpp:855
+#: ../src/generic/prntdlgg.cpp:1052 ../src/generic/prntdlgg.cpp:1057
+msgid "Paper size"
+msgstr "Papierformat"
+
+#: ../src/richtext/richtextstyles.cpp:1058
+msgid "Paragraph styles"
+msgstr "Absatzstile"
+
+#: ../src/common/xtistrm.cpp:469
+msgid "Passing a already registered object to SetObject"
+msgstr "Ein bereits registriertes Objekt wurde an SetObject übergeben"
+
+#: ../src/common/xtistrm.cpp:480
+msgid "Passing an unknown object to GetObject"
+msgstr "Ein unbekanntes Objekt wurde an GetObject übergeben"
+
+#: ../src/richtext/richtextctrl.cpp:3117 ../src/common/stockitem.cpp:180
+#: ../src/stc/stc_i18n.cpp:19
+msgid "Paste"
+msgstr "Einfügen"
+
+#: ../src/common/stockitem.cpp:262
+msgid "Paste selection"
+msgstr "Auswahl einfügen"
+
+#: ../src/richtext/richtextliststylepage.cpp:222
+#: ../src/richtext/richtextbulletspage.cpp:172
+msgid "Peri&od"
+msgstr "P&unkt"
+
+#: ../src/generic/filectrlg.cpp:465
+msgid "Permissions"
+msgstr "Zugriffsrechte"
+
+#: ../src/richtext/richtextbuffer.cpp:11942
+msgid "Picture Properties"
+msgstr "Bildeigenschaften"
+
+#: ../include/wx/unix/pipe.h:47
+msgid "Pipe creation failed"
+msgstr "Konnte keine Pipe anlegen"
+
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Please choose a valid font."
+msgstr "Bitte wählen Sie eine gültige Schriftart."
+
+#: ../src/gtk/filedlg.cpp:72
+msgid "Please choose an existing file."
+msgstr "Bitte wählen Sie eine bestehende Datei."
+
+#: ../src/html/helpwnd.cpp:813
+msgid "Please choose the page to display:"
+msgstr "Bitte wählen Sie die darzustellende Seite:"
+
+#: ../src/msw/dialup.cpp:785
+msgid "Please choose which ISP do you want to connect to"
+msgstr "Bitte gewünschte ISP-Verbindung auswählen"
+
+#: ../src/msw/listctrl.cpp:372
+#, c-format
+msgid ""
+"Please install a newer version of comctl32.dll\n"
+"(at least version 4.70 is required but you have %d.%02d)\n"
+"or this program won't operate correctly."
+msgstr ""
+"Bitte installieren Sie eine neuere Version von comctl32.dll\n"
+"(mindestens Version 4.70 wird benötigt, aber Sie haben nur\n"
+"Version %d.%02d)."
+
+#: ../src/common/headerctrlcmn.cpp:59
+msgid "Please select the columns to show and define their order:"
+msgstr "Bitte die Zeilen aufrufen um ihren Ablauf anzuzeigen und zu bestimmen:"
+
+#: ../src/common/prntbase.cpp:521
+msgid "Please wait while printing..."
+msgstr "Bitte warten Sie während gedruckt wird..."
+
+#: ../src/propgrid/advprops.cpp:631
+msgid "Point Size"
+msgstr "Schriftgröße in Punkt"
+
+#: ../src/osx/carbon/dataview.cpp:1278 ../src/osx/carbon/dataview.cpp:1329
+#: ../src/osx/carbon/dataview.cpp:1420 ../src/osx/carbon/dataview.cpp:1443
+#: ../src/osx/carbon/dataview.cpp:1460 ../src/osx/carbon/dataview.cpp:1477
+#: ../src/osx/carbon/dataview.cpp:1670 ../src/osx/carbon/dataview.cpp:1779
+#: ../src/osx/carbon/dataview.cpp:1821 ../src/osx/carbon/dataview.cpp:1874
+#: ../src/osx/carbon/dataview.cpp:1997
+msgid "Pointer to data view control not set correctly."
+msgstr "Zeiger wurde nicht korrekt auf das Kontrollelement gesetzt."
+
+#: ../src/osx/carbon/dataview.cpp:1279 ../src/osx/carbon/dataview.cpp:1338
+#: ../src/osx/carbon/dataview.cpp:1421 ../src/osx/carbon/dataview.cpp:1478
+#: ../src/osx/carbon/dataview.cpp:1671 ../src/osx/carbon/dataview.cpp:1780
+#: ../src/osx/carbon/dataview.cpp:1822 ../src/osx/carbon/dataview.cpp:1875
+#: ../src/osx/carbon/dataview.cpp:1998
+msgid "Pointer to model not set correctly."
+msgstr "Zeiger wurde nicht korrekt auf das Model gesetzt."
+
+#: ../src/generic/prntdlgg.cpp:612 ../src/generic/prntdlgg.cpp:867
+msgid "Portrait"
+msgstr "Hochformat"
+
+#: ../src/richtext/richtextsizepage.cpp:496
+msgid "Position"
+msgstr "Position"
+
+#: ../src/generic/prntdlgg.cpp:298
+msgid "PostScript file"
+msgstr "PostScript-Datei"
+
+#: ../src/common/stockitem.cpp:181
+msgid "Preferences"
+msgstr "Einstellungen"
+
+#: ../src/osx/menu_osx.cpp:643
+msgid "Preferences..."
+msgstr "Einstellungen..."
+
+#: ../src/common/prntbase.cpp:529
+msgid "Preparing"
+msgstr "Vorbereitung"
+
+#: ../src/generic/fontdlgg.cpp:455 ../src/osx/carbon/fontdlg.cpp:576
+#: ../src/html/helpwnd.cpp:1235
+msgid "Preview:"
+msgstr "Vorschau:"
+
+#: ../src/common/prntbase.cpp:1523 ../src/html/helpwnd.cpp:677
+msgid "Previous page"
+msgstr "Vorherige Seite"
+
+#: ../src/generic/prntdlgg.cpp:143 ../src/generic/prntdlgg.cpp:157
+#: ../src/common/prntbase.cpp:409 ../src/common/prntbase.cpp:1511
+#: ../src/gtk/print.cpp:584 ../src/gtk/print.cpp:597
+msgid "Print"
+msgstr "Drucken"
+
+#: ../include/wx/prntbase.h:395 ../src/common/docview.cpp:1250
+msgid "Print Preview"
+msgstr "Druckvorschau"
+
+#: ../src/common/prntbase.cpp:1985 ../src/common/prntbase.cpp:2027
+#: ../src/common/prntbase.cpp:2035
+msgid "Print Preview Failure"
+msgstr "Fehler bei der Druckvorschau"
+
+#: ../src/generic/prntdlgg.cpp:224
+msgid "Print Range"
+msgstr "Seitenbereich"
+
+#: ../src/generic/prntdlgg.cpp:449
+msgid "Print Setup"
+msgstr "Druckereinstellungen"
+
+#: ../src/generic/prntdlgg.cpp:621
+msgid "Print in colour"
+msgstr "Farbig drucken"
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print previe&w..."
+msgstr "Druck&vorschau..."
+
+#: ../src/common/docview.cpp:1244
+msgid "Print preview creation failed."
+msgstr "Erzeugung der Druckvorschau fehlgeschlagen"
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print preview..."
+msgstr "Druckvorschau..."
+
+#: ../src/generic/prntdlgg.cpp:630
+msgid "Print spooling"
+msgstr "Druckersteuerung"
+
+#: ../src/html/helpwnd.cpp:688
+msgid "Print this page"
+msgstr "Diese Seite drucken"
+
+#: ../src/generic/prntdlgg.cpp:185
+msgid "Print to File"
+msgstr "In Datei drucken"
+
+#: ../src/common/stockitem.cpp:183
+msgid "Print..."
+msgstr "Drucken..."
+
+#: ../src/generic/prntdlgg.cpp:493
+msgid "Printer"
+msgstr "Drucker"
+
+#: ../src/generic/prntdlgg.cpp:633
+msgid "Printer command:"
+msgstr "Druckbefehl:"
+
+#: ../src/generic/prntdlgg.cpp:180
+msgid "Printer options"
+msgstr "Drucker-Einstellungen"
+
+#: ../src/generic/prntdlgg.cpp:645
+msgid "Printer options:"
+msgstr "Drucker-Einstellungen:"
+
+#: ../src/generic/prntdlgg.cpp:916
+msgid "Printer..."
+msgstr "Drucker..."
+
+#: ../src/generic/prntdlgg.cpp:196
+msgid "Printer:"
+msgstr "Drucker:"
+
+#: ../include/wx/richtext/richtextprint.h:163 ../src/common/prntbase.cpp:518
+#: ../src/html/htmprint.cpp:277
+msgid "Printing"
+msgstr "Drucken"
+
+#: ../src/common/prntbase.cpp:586
+msgid "Printing "
+msgstr "Drucken von "
+
+#: ../src/common/prntbase.cpp:330
+msgid "Printing Error"
+msgstr "Fehler beim Drucken"
+
+#: ../src/common/prntbase.cpp:544
+#, c-format
+msgid "Printing page %d of %d"
+msgstr "Drucke Seite %d von %d"
+
+#: ../src/generic/printps.cpp:201
+#, c-format
+msgid "Printing page %d..."
+msgstr "Drucke Seite %d..."
+
+#: ../src/generic/printps.cpp:161
+msgid "Printing..."
+msgstr "Drucke..."
+
+#: ../include/wx/richtext/richtextprint.h:109 ../include/wx/prntbase.h:263
+#: ../src/common/docview.cpp:2124
+msgid "Printout"
+msgstr "Ausdruck"
+
+#: ../src/common/debugrpt.cpp:565
+#, c-format
+msgid ""
+"Processing debug report has failed, leaving the files in \"%s\" directory."
+msgstr ""
+"Bearbeitung des Fehlerberichts fehlgeschlagen, belasse die Dateien im Ordner "
+"\"%s\"."
+
+#: ../src/osx/carbon/dataview.cpp:2472
+msgid "Progress renderer cannot render value type; value type: "
+msgstr "Prozess Renderer konnte den Wert nicht darstellen; Wert Typ:"
+
+#: ../src/common/prntbase.cpp:528
+msgid "Progress:"
+msgstr "Fortschritt:"
+
+#: ../src/common/stockitem.cpp:184
+msgid "Properties"
+msgstr "Eigenschaften"
+
+#: ../src/propgrid/manager.cpp:237
+msgid "Property"
+msgstr "Eigenschaft"
+
+#: ../src/propgrid/propgrid.cpp:3144 ../src/propgrid/propgrid.cpp:3276
+msgid "Property Error"
+msgstr "Eigenschaftsfehler"
+
+#: ../src/common/paper.cpp:113
+msgid "Quarto, 215 x 275 mm"
+msgstr "Quarto, 215 x 275 mm"
+
+#: ../src/generic/logg.cpp:1036
+msgid "Question"
+msgstr "Frage"
+
+#: ../src/common/stockitem.cpp:156
+msgid "Quit"
+msgstr "Beenden"
+
+#: ../src/osx/menu_osx.cpp:610 ../src/osx/menu_osx.cpp:657
+#, c-format
+msgid "Quit %s"
+msgstr "%s Beenden"
+
+#: ../src/common/stockitem.cpp:263
+msgid "Quit this program"
+msgstr "Dieses Programm beenden"
+
+#: ../src/common/accelcmn.cpp:53
+msgid "RETURN"
+msgstr "EINGABE"
+
+#: ../src/common/accelcmn.cpp:57
+msgid "RIGHT"
+msgstr "RECHTS"
+
+#: ../src/common/accelcmn.cpp:327
+msgid "RawCtrl+"
+msgstr "RawCtrl+"
+
+#: ../src/common/ffile.cpp:113 ../src/common/ffile.cpp:134
+#, c-format
+msgid "Read error on file '%s'"
+msgstr "Lesefehler in Datei '%s'"
+
+#: ../src/common/prntbase.cpp:257
+msgid "Ready"
+msgstr "Bereit"
+
+#: ../src/common/stockitem.cpp:185 ../src/stc/stc_i18n.cpp:16
+msgid "Redo"
+msgstr "Wiederholen"
+
+#: ../src/common/stockitem.cpp:264
+msgid "Redo last action"
+msgstr "Letzte Aktion wiederholen"
+
+#: ../src/common/stockitem.cpp:186
+msgid "Refresh"
+msgstr "Aktualisiere"
+
+#: ../src/msw/registry.cpp:625
+#, c-format
+msgid "Registry key '%s' already exists."
+msgstr "Registrierungsschlüssel '%s' bereits vorhanden."
+
+#: ../src/msw/registry.cpp:594
+#, c-format
+msgid "Registry key '%s' does not exist, cannot rename it."
+msgstr ""
+"Registrierungsschlüssel '%s' existiert nicht, Umbenennung daher nicht "
+"möglich."
+
+#: ../src/msw/registry.cpp:726
+#, c-format
+msgid ""
+"Registry key '%s' is needed for normal system operation,\n"
+"deleting it will leave your system in unusable state:\n"
+"operation aborted."
+msgstr ""
+"Registrierungsschlüssel '%s' wird vom System benötigt,\n"
+"durch seine Entfernung wird das System unbrauchbar:\n"
+"Abbruch."
+
+#: ../src/msw/registry.cpp:520
+#, c-format
+msgid "Registry value '%s' already exists."
+msgstr "Registrierungswert '%s' bereits vorhanden."
+
+#: ../src/richtext/richtextfontpage.cpp:332
+#: ../src/richtext/richtextfontpage.cpp:336
+msgid "Regular"
+msgstr "Regulär"
+
+#: ../src/richtext/richtextsizepage.cpp:519
+msgid "Relative"
+msgstr "Relativ"
+
+#: ../src/generic/helpext.cpp:462
+msgid "Relevant entries:"
+msgstr "Relevante Einträge:"
+
+#: ../include/wx/generic/progdlgg.h:86
+msgid "Remaining time:"
+msgstr "Verbleibende Zeit:"
+
+#: ../src/common/stockitem.cpp:187
+msgid "Remove"
+msgstr "Entferne"
+
+#: ../src/richtext/richtextctrl.cpp:1430
+msgid "Remove Bullet"
+msgstr "Gliederungspunkt entfernen"
+
+#: ../src/html/helpwnd.cpp:440
+msgid "Remove current page from bookmarks"
+msgstr "Aktuelle HTML-Seite als Lesezeichen entfernen"
+
+#: ../src/common/rendcmn.cpp:194
+#, c-format
+msgid "Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."
+msgstr ""
+"Renderer \"%s\" hat eine ungültige Version %d.%d und kann nicht geladen "
+"werden."
+
+#: ../src/osx/carbon/dataview.cpp:1430
+msgid "Rendering failed."
+msgstr "Darstellung gescheitert."
+
+#: ../src/richtext/richtextbuffer.cpp:4214
+msgid "Renumber List"
+msgstr "Liste neu nummerieren"
+
+#: ../src/common/stockitem.cpp:188
+msgid "Rep&lace"
+msgstr "&Ersetzen"
+
+#: ../src/richtext/richtextctrl.cpp:3277 ../src/common/stockitem.cpp:188
+msgid "Replace"
+msgstr "Ersetzen"
+
+#: ../src/generic/fdrepdlg.cpp:182
+msgid "Replace &all"
+msgstr "Alle &ersetzen"
+
+#: ../src/common/stockitem.cpp:261
+msgid "Replace selection"
+msgstr "Auswahl ersetzen"
+
+#: ../src/generic/fdrepdlg.cpp:124
+msgid "Replace with:"
+msgstr "Ersetzen durch:"
+
+#: ../src/common/valtext.cpp:161
+msgid "Required information entry is empty."
+msgstr "Erforderlicher Informationseintrag ist leer."
+
+#: ../src/common/translation.cpp:1966
+#, c-format
+msgid "Resource '%s' is not a valid message catalog."
+msgstr "Ressource '%s' ist kein gültiger Nachrichtenkatalog."
+
+#: ../src/common/stockitem.cpp:189
+msgid "Revert to Saved"
+msgstr "Rückgängig auf Gespeichertes"
+
+#: ../src/richtext/richtextborderspage.cpp:548
+msgid "Ridge"
+msgstr "Grat"
+
+#: ../src/richtext/richtextliststylepage.cpp:251
+#: ../src/richtext/richtextbulletspage.cpp:201
+#: ../src/richtext/richtextsizepage.cpp:250
+msgid "Right"
+msgstr "Rechts"
+
+#: ../src/generic/prntdlgg.cpp:892
+msgid "Right margin (mm):"
+msgstr "Rechter Rand (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:148
+#: ../src/richtext/richtextindentspage.cpp:150
+#: ../src/richtext/richtextliststylepage.cpp:337
+#: ../src/richtext/richtextliststylepage.cpp:339
+msgid "Right-align text."
+msgstr "Rechtsbündiger Text."
+
+#: ../src/generic/fontdlgg.cpp:322
+msgid "Roman"
+msgstr "Roman"
+
+#: ../src/richtext/richtextliststylepage.cpp:299
+#: ../src/richtext/richtextbulletspage.cpp:252
+msgid "S&tandard bullet name:"
+msgstr "Vordefinierter Gliederungspunkt:"
+
+#: ../src/common/accelcmn.cpp:82
+msgid "SCROLL_LOCK"
+msgstr "ROLLEN_LOCK"
+
+#: ../src/common/accelcmn.cpp:71
+msgid "SELECT"
+msgstr "AUSWAHL"
+
+#: ../src/common/accelcmn.cpp:77
+msgid "SEPARATOR"
+msgstr "TRENNER"
+
+#: ../src/common/accelcmn.cpp:74
+msgid "SNAPSHOT"
+msgstr "S-Abf"
+
+#: ../src/common/accelcmn.cpp:62
+msgid "SPACE"
+msgstr "Leertaste"
+
+#: ../src/common/accelcmn.cpp:257 ../src/common/accelcmn.cpp:339
+msgid "SPECIAL"
+msgstr "SPEZIAL"
+
+#: ../src/common/accelcmn.cpp:78
+msgid "SUBTRACT"
+msgstr "Subtrahieren"
+
+#: ../src/common/stockitem.cpp:190 ../src/common/sizer.cpp:2678
+msgid "Save"
+msgstr "Speichern"
+
+#: ../src/common/fldlgcmn.cpp:327
+#, c-format
+msgid "Save %s file"
+msgstr "Datei %s speichern"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save &As..."
+msgstr "&Speichern unter..."
+
+#: ../src/common/docview.cpp:360
+msgid "Save As"
+msgstr "Speichern unter"
+
+#: ../src/common/stockitem.cpp:191
+msgid "Save as"
+msgstr "Speichern unter"
+
+#: ../src/common/stockitem.cpp:267
+msgid "Save current document"
+msgstr "Aktuelles Dokument speichern"
+
+#: ../src/common/stockitem.cpp:268
+msgid "Save current document with a different filename"
+msgstr "Aktuelles Dokument mit einen anderen Dateinamen speichern"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save log contents to file"
+msgstr "Logtexte in Datei speichern"
+
+#: ../src/generic/fontdlgg.cpp:325
+msgid "Script"
+msgstr "Skript"
+
+#: ../src/generic/srchctlg.cpp:67 ../src/html/helpwnd.cpp:548
+#: ../src/html/helpwnd.cpp:563
+msgid "Search"
+msgstr "Suchen"
+
+#: ../src/html/helpwnd.cpp:550
+msgid ""
+"Search contents of help book(s) for all occurrences of the text you typed "
+"above"
+msgstr ""
+"Den Inhalt der Hilfebücher nach allem Auftreten des oben eingegebenem "
+"Begriff durchsuchen"
+
+#: ../src/generic/fdrepdlg.cpp:160
+msgid "Search direction"
+msgstr "Suchrichtung"
+
+#: ../src/generic/fdrepdlg.cpp:112
+msgid "Search for:"
+msgstr "Suchen nach:"
+
+#: ../src/html/helpwnd.cpp:1065
+msgid "Search in all books"
+msgstr "Alle Bücher durchsuchen"
+
+#: ../src/html/helpwnd.cpp:870
+msgid "Searching..."
+msgstr "Suchen..."
+
+#: ../src/generic/dirctrlg.cpp:546
+msgid "Sections"
+msgstr "Abschnitte"
+
+#: ../src/common/ffile.cpp:220
+#, c-format
+msgid "Seek error on file '%s'"
+msgstr "Suchfehler in Datei '%s'"
+
+#: ../src/common/ffile.cpp:210
+#, c-format
+msgid "Seek error on file '%s' (large files not supported by stdio)"
+msgstr ""
+"Positionierungsfehler bei Datei '%s' (große Dateien werden nicht von stdio "
+"unterstützt)."
+
+#: ../src/richtext/richtextctrl.cpp:330 ../src/osx/textctrl_osx.cpp:587
+#: ../src/common/stockitem.cpp:192 ../src/msw/textctrl.cpp:2288
+msgid "Select &All"
+msgstr "Alles auswählen"
+
+#: ../src/common/stockitem.cpp:192 ../src/stc/stc_i18n.cpp:21
+msgid "Select All"
+msgstr "Alles auswählen"
+
+#: ../src/common/docview.cpp:1877
+msgid "Select a document template"
+msgstr "Dokument-Vorlage wählen"
+
+#: ../src/common/docview.cpp:1951
+msgid "Select a document view"
+msgstr "Dokument-Anzeige ('View') wählen"
+
+#: ../src/richtext/richtextfontpage.cpp:235
+#: ../src/richtext/richtextfontpage.cpp:237
+msgid "Select regular or bold."
+msgstr "Wähle normal oder fett."
+
+#: ../src/richtext/richtextfontpage.cpp:222
+#: ../src/richtext/richtextfontpage.cpp:224
+msgid "Select regular or italic style."
+msgstr "Wähle normal oder kursiv."
+
+#: ../src/richtext/richtextfontpage.cpp:248
+#: ../src/richtext/richtextfontpage.cpp:250
+msgid "Select underlining or no underlining."
+msgstr "Wähle unterstrichen oder nicht unterstrichen."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Selection"
+msgstr "Auswahl"
+
+#: ../src/richtext/richtextliststylepage.cpp:187
+#: ../src/richtext/richtextliststylepage.cpp:189
+msgid "Selects the list level to edit."
+msgstr "Wählt die Listenebene zur Bearbeitung."
+
+#: ../src/common/cmdline.cpp:918
+#, c-format
+msgid "Separator expected after the option '%s'."
+msgstr "Trennungszeichen nach der Option '%s' erwartet."
+
+#: ../src/richtext/richtextbuffer.cpp:10513
+msgid "Set Cell Style"
+msgstr "Stil der Zelle einstellen"
+
+#: ../include/wx/xtiprop.h:179
+msgid "SetProperty called w/o valid setter"
+msgstr "SetProperty aufgerufen ohne gültigen Setter"
+
+#: ../src/common/filename.cpp:2632
+msgid "Setting directory access times is not supported under this OS version"
+msgstr ""
+"Das setzen der Verzeichniszugriffszeit ist auf dieser Betriebssystemversion "
+"nicht unterstützt"
+
+#: ../src/generic/prntdlgg.cpp:188
+msgid "Setup..."
+msgstr "Einstellungen..."
+
+#: ../src/msw/dialup.cpp:563
+msgid "Several active dialup connections found, choosing one randomly."
+msgstr "Mehrere aktive DFÜ-Verbindungen gefunden, wähle eine davon aus."
+
+#: ../src/common/accelcmn.cpp:324
+msgid "Shift+"
+msgstr "Umschalt+"
+
+#: ../src/generic/dirdlgg.cpp:170
+msgid "Show &hidden directories"
+msgstr "Versteckte Verzeic&hnisse anzeigen"
+
+#: ../src/generic/filectrlg.cpp:1003
+msgid "Show &hidden files"
+msgstr "V&ersteckte Dateien anzeigen"
+
+#: ../src/osx/menu_osx.cpp:605 ../src/osx/menu_osx.cpp:652
+msgid "Show All"
+msgstr "Alles zeigen"
+
+#: ../src/common/stockitem.cpp:257
+msgid "Show about dialog"
+msgstr "Zeige den \"Über\"-Dialog"
+
+#: ../src/html/helpwnd.cpp:502
+msgid "Show all"
+msgstr "Alles zeigen"
+
+#: ../src/html/helpwnd.cpp:513
+msgid "Show all items in index"
+msgstr "Alle Themen im Index anzeigen"
+
+#: ../src/generic/dirdlgg.cpp:105
+msgid "Show hidden directories"
+msgstr "Versteckte Verzeichnisse anzeigen"
+
+#: ../src/html/helpwnd.cpp:671
+msgid "Show/hide navigation panel"
+msgstr "Suchbaum ein-/ausschalten"
+
+#: ../src/richtext/richtextsymboldlg.cpp:421
+#: ../src/richtext/richtextsymboldlg.cpp:423
+msgid "Shows a Unicode subset."
+msgstr "Zeigt einen Unicode-Teilzeichensatz."
+
+#: ../src/richtext/richtextliststylepage.cpp:472
+#: ../src/richtext/richtextliststylepage.cpp:474
+#: ../src/richtext/richtextbulletspage.cpp:276
+#: ../src/richtext/richtextbulletspage.cpp:278
+msgid "Shows a preview of the bullet settings."
+msgstr "Zeigt eine Vorschau der Gliederungspunkteinstellungen."
+
+#: ../src/richtext/richtextfontpage.cpp:322
+#: ../src/richtext/richtextfontpage.cpp:324
+msgid "Shows a preview of the font settings."
+msgstr "Zeigt eine Vorschau der Schriftarteinstellungen."
+
+#: ../src/osx/carbon/fontdlg.cpp:580 ../src/osx/carbon/fontdlg.cpp:582
+msgid "Shows a preview of the font."
+msgstr "Zeigt eine Vorschau der Schriftart."
+
+#: ../src/richtext/richtextindentspage.cpp:303
+#: ../src/richtext/richtextindentspage.cpp:305
+msgid "Shows a preview of the paragraph settings."
+msgstr "Zeigt eine Vorschau der Absatzeinstellungen."
+
+#: ../src/generic/fontdlgg.cpp:460 ../src/generic/fontdlgg.cpp:462
+msgid "Shows the font preview."
+msgstr "Zeigt die Schriftvorschau."
+
+#: ../src/univ/themes/mono.cpp:516
+msgid "Simple monochrome theme"
+msgstr "Einfaches einfarbiges Thema"
+
+#: ../src/richtext/richtextindentspage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:449
+msgid "Single"
+msgstr "Einzel"
+
+#: ../src/generic/filectrlg.cpp:460 ../src/richtext/richtextformatdlg.cpp:356
+#: ../src/richtext/richtextsizepage.cpp:299
+msgid "Size"
+msgstr "Größe"
+
+#: ../src/osx/carbon/fontdlg.cpp:525
+msgid "Size:"
+msgstr "Größe:"
+
+#: ../src/generic/progdlgg.cpp:262 ../src/generic/progdlgg.cpp:773
+#: ../src/msw/progdlg.cpp:801
+msgid "Skip"
+msgstr "Überspringen"
+
+#: ../src/generic/fontdlgg.cpp:330
+msgid "Slant"
+msgstr "Geneigt"
+
+#: ../src/richtext/richtextfontpage.cpp:298
+msgid "Small C&apitals"
+msgstr "Ka&pitälchen"
+
+#: ../src/richtext/richtextborderspage.cpp:543
+msgid "Solid"
+msgstr "Fett"
+
+#: ../src/common/docview.cpp:1773
+msgid "Sorry, could not open this file."
+msgstr "Bedauere, diese Datei konnte nicht geöffnet werden."
+
+#: ../src/common/prntbase.cpp:2027 ../src/common/prntbase.cpp:2035
+msgid "Sorry, not enough memory to create a preview."
+msgstr "Nicht genug Speicher für Vorschau."
+
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "Sorry, that name is taken. Please choose another."
+msgstr "Bedauere, der Name ist bereits besetzt. Bitte anderen auswählen."
+
+#: ../src/common/docview.cpp:1796
+msgid "Sorry, the format for this file is unknown."
+msgstr "Bedauere, das Format dieser Datei ist unbekannt."
+
+#: ../src/unix/sound.cpp:492
+msgid "Sound data are in unsupported format."
+msgstr "Klangdaten haben ein nicht unterstütztes Format."
+
+#: ../src/unix/sound.cpp:477
+#, c-format
+msgid "Sound file '%s' is in unsupported format."
+msgstr "Klangdatei '%s' besitzt ein nicht unterstütztes Format."
+
+#: ../src/richtext/richtextliststylepage.cpp:467
+msgid "Spacing"
+msgstr "Zwischenraum"
+
+#: ../src/common/stockitem.cpp:197
+msgid "Spell Check"
+msgstr "Rechtschreibprüfung"
+
+#: ../src/richtext/richtextliststylepage.cpp:490
+#: ../src/richtext/richtextbulletspage.cpp:295
+msgid "Standard"
+msgstr "Standard"
+
+#: ../src/common/paper.cpp:105
+msgid "Statement, 5 1/2 x 8 1/2 in"
+msgstr "Statement, 5 1/2 x 8 1/2 Zoll"
+
+#: ../src/richtext/richtextsizepage.cpp:518
+#: ../src/richtext/richtextsizepage.cpp:523
+msgid "Static"
+msgstr "Statisch"
+
+#: ../src/generic/prntdlgg.cpp:204
+msgid "Status:"
+msgstr "Status:"
+
+#: ../src/common/stockitem.cpp:198
+msgid "Stop"
+msgstr "Stop"
+
+#: ../src/common/stockitem.cpp:199
+msgid "Strikethrough"
+msgstr "Durchstreichen"
+
+#: ../src/common/colourcmn.cpp:45
+#, c-format
+msgid "String To Colour : Incorrect colour specification : %s"
+msgstr "StringTo Colour: Falsche Farbangabe '%s'"
+
+#: ../src/richtext/richtextformatdlg.cpp:318 ../src/propgrid/advprops.cpp:647
+msgid "Style"
+msgstr "Stil"
+
+#: ../include/wx/richtext/richtextstyledlg.h:47
+msgid "Style Organiser"
+msgstr "Stil-Organisator"
+
+#: ../src/osx/carbon/fontdlg.cpp:534
+msgid "Style:"
+msgstr "Stil:"
+
+#: ../src/richtext/richtextfontpage.cpp:312
+msgid "Subscrip&t"
+msgstr "Tiefgestell&t"
+
+#: ../src/richtext/richtextfontpage.cpp:305
+msgid "Supe&rscript"
+msgstr "Hochge&stellt"
+
+#: ../src/common/paper.cpp:151
+msgid "SuperA/SuperA/A4 227 x 356 mm"
+msgstr "SuperA/SuperA/A4 227 x 356 mm"
+
+#: ../src/common/paper.cpp:152
+msgid "SuperB/SuperB/A3 305 x 487 mm"
+msgstr "SuperB/SuperB/A3 305 x 487 mm"
+
+#: ../src/generic/fontdlgg.cpp:326
+msgid "Swiss"
+msgstr "Swiss"
+
+#: ../src/richtext/richtextliststylepage.cpp:488
+#: ../src/richtext/richtextbulletspage.cpp:293
+msgid "Symbol"
+msgstr "Symbol"
+
+#: ../src/richtext/richtextliststylepage.cpp:288
+#: ../src/richtext/richtextbulletspage.cpp:240
+msgid "Symbol &font:"
+msgstr "Symbolschri&ftart:"
+
+#: ../include/wx/richtext/richtextsymboldlg.h:47
+msgid "Symbols"
+msgstr "Symbole"
+
+#: ../src/common/accelcmn.cpp:63
+msgid "TAB"
+msgstr "Tabulator"
+
+#: ../src/common/imagtiff.cpp:372 ../src/common/imagtiff.cpp:385
+#: ../src/common/imagtiff.cpp:744
+msgid "TIFF: Couldn't allocate memory."
+msgstr "TIFF: Speicheranforderung gescheitert."
+
+#: ../src/common/imagtiff.cpp:304
+msgid "TIFF: Error loading image."
+msgstr "TIFF: Fehler beim Laden des Bildes."
+
+#: ../src/common/imagtiff.cpp:471
+msgid "TIFF: Error reading image."
+msgstr "TIFF: Fehler beim Lesen des Bildes."
+
+#: ../src/common/imagtiff.cpp:611
+msgid "TIFF: Error saving image."
+msgstr "TIFF: Schreibfehler beim Speichern."
+
+#: ../src/common/imagtiff.cpp:849
+msgid "TIFF: Error writing image."
+msgstr "TIFF: Schreibfehler beim Speichern."
+
+#: ../src/common/imagtiff.cpp:358
+msgid "TIFF: Image size is abnormally big."
+msgstr "TIFF: Bildgröße ist außergewöhnlich groß."
+
+#: ../src/richtext/richtextbuffer.cpp:10794
+msgid "Table Properties"
+msgstr "Tabelleneigenschaften"
+
+#: ../src/common/paper.cpp:146
+msgid "Tabloid Extra 11.69 x 18 in"
+msgstr "Tabloid Extra 11.69 x 18 Zoll"
+
+#: ../src/common/paper.cpp:103
+msgid "Tabloid, 11 x 17 in"
+msgstr "Tabloid, 11 x 17 Zoll"
+
+#: ../src/richtext/richtextformatdlg.cpp:336
+msgid "Tabs"
+msgstr "Tabulatoren"
+
+#: ../src/generic/fontdlgg.cpp:327
+msgid "Teletype"
+msgstr "Schreibmaschine"
+
+#: ../src/common/docview.cpp:1878
+msgid "Templates"
+msgstr "Vorlagen"
+
+#: ../src/osx/carbon/dataview.cpp:2373
+msgid "Text renderer cannot render value; value type: "
+msgstr "Text Renderer kann Wert nicht darstellen; Wert Typ:"
+
+#: ../src/common/fmapbase.cpp:158
+msgid "Thai (ISO-8859-11)"
+msgstr "Thai (ISO-8859-11)"
+
+#: ../src/common/ftp.cpp:620
+msgid "The FTP server doesn't support passive mode."
+msgstr "Der FTP-Server unterstützt den passiven Transfermodus nicht."
+
+#: ../src/common/ftp.cpp:606
+msgid "The FTP server doesn't support the PORT command."
+msgstr "Der FTP-Server unterstützt nicht das PORT-Kommando."
+
+#: ../src/richtext/richtextliststylepage.cpp:215
+#: ../src/richtext/richtextliststylepage.cpp:217
+#: ../src/richtext/richtextbulletspage.cpp:164
+#: ../src/richtext/richtextbulletspage.cpp:166
+msgid "The available bullet styles."
+msgstr "Die verfügbaren Gliederungspunktstile."
+
+#: ../src/richtext/richtextstyledlg.cpp:202
+#: ../src/richtext/richtextstyledlg.cpp:204
+msgid "The available styles."
+msgstr "Die verfügbaren Schriftarten."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:139
+#: ../src/richtext/richtextbackgroundpage.cpp:141
+msgid "The background colour."
+msgstr "Die Hintergrundfarbe."
+
+#: ../src/richtext/richtextmarginspage.cpp:268
+#: ../src/richtext/richtextmarginspage.cpp:270
+msgid "The bottom margin size."
+msgstr "Die untere Randgröße."
+
+#: ../src/richtext/richtextmarginspage.cpp:382
+#: ../src/richtext/richtextmarginspage.cpp:384
+msgid "The bottom padding size."
+msgstr "Die untere Auffüllung."
+
+#: ../src/richtext/richtextsizepage.cpp:639
+#: ../src/richtext/richtextsizepage.cpp:641
+#: ../src/richtext/richtextsizepage.cpp:653
+#: ../src/richtext/richtextsizepage.cpp:655
+msgid "The bottom position."
+msgstr "Abstand nach unten."
+
+#: ../src/richtext/richtextliststylepage.cpp:254
+#: ../src/richtext/richtextliststylepage.cpp:256
+#: ../src/richtext/richtextliststylepage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:277
+#: ../src/richtext/richtextbulletspage.cpp:204
+#: ../src/richtext/richtextbulletspage.cpp:206
+#: ../src/richtext/richtextbulletspage.cpp:227
+#: ../src/richtext/richtextbulletspage.cpp:229
+msgid "The bullet character."
+msgstr "Die Gliederungspunktzeichen."
+
+#: ../src/richtext/richtextsymboldlg.cpp:443
+#: ../src/richtext/richtextsymboldlg.cpp:445
+msgid "The character code."
+msgstr "Der Zeichencode."
+
+#: ../src/common/fontmap.cpp:203
+#, c-format
+msgid ""
+"The charset '%s' is unknown. You may select\n"
+"another charset to replace it with or choose\n"
+"[Cancel] if it cannot be replaced"
+msgstr ""
+"Die Zeichensatz '%s' ist nicht bekannt. Wählen Sie \n"
+"einen Ersatzzeichensatz oder 'Abbrechen', \n"
+"falls er nicht ersetzt werden kann."
+
+#: ../src/msw/ole/dataobj.cpp:367
+#, c-format
+msgid "The clipboard format '%d' doesn't exist."
+msgstr "Das Format '%d' für die Zwischenablage existiert nicht."
+
+#: ../src/richtext/richtextstylepage.cpp:128
+#: ../src/richtext/richtextstylepage.cpp:130
+msgid "The default style for the next paragraph."
+msgstr "Der voreingestellte Stil für den nächsten Absatz."
+
+#: ../src/generic/dirdlgg.cpp:231
+#, c-format
+msgid ""
+"The directory '%s' does not exist\n"
+"Create it now?"
+msgstr ""
+"Verzeichnis '%s' existiert nicht.\n"
+"Soll es jetzt erstellt werden?"
+
+#: ../src/html/htmprint.cpp:271
+#, c-format
+msgid ""
+"The document \"%s\" doesn't fit on the page horizontally and will be "
+"truncated if printed.\n"
+"\n"
+"Would you like to proceed with printing it nevertheless?"
+msgstr ""
+"Das Dokument \"%s\" passt nicht horizontal auf die Seite und wird beim "
+"Drucken abgeschnitten.\n"
+"\n"
+"Wollen sie dennoch mit dem Drucken fortfahren?"
+
+#: ../src/common/docview.cpp:1184
+#, c-format
+msgid ""
+"The file '%s' doesn't exist and couldn't be opened.\n"
+"It has been removed from the most recently used files list."
+msgstr ""
+"Die Datei '%s' existiert nicht und konnte nicht geöffnet werden.\n"
+"Sie wurde aus der Liste kürzlich verwendeter Dateien entfernt."
+
+#: ../src/richtext/richtextindentspage.cpp:208
+#: ../src/richtext/richtextindentspage.cpp:210
+#: ../src/richtext/richtextliststylepage.cpp:394
+#: ../src/richtext/richtextliststylepage.cpp:396
+msgid "The first line indent."
+msgstr "Der Ersteinzug."
+
+#: ../src/gtk/utilsgtk.cpp:427
+msgid "The following standard GTK+ options are also supported:\n"
+msgstr ""
+"Die nachfolgenden Standard GTK+ Optionen werden ebenfalls unterstützt:\n"
+
+#: ../src/generic/fontdlgg.cpp:414 ../src/generic/fontdlgg.cpp:416
+msgid "The font colour."
+msgstr "Die Schriftfarbe."
+
+#: ../src/generic/fontdlgg.cpp:375 ../src/generic/fontdlgg.cpp:377
+msgid "The font family."
+msgstr "Die Schriftart."
+
+#: ../src/richtext/richtextsymboldlg.cpp:405
+#: ../src/richtext/richtextsymboldlg.cpp:407
+msgid "The font from which to take the symbol."
+msgstr "Die Schriftart aus der das Symbol entnommen wurde."
+
+#: ../src/generic/fontdlgg.cpp:427 ../src/generic/fontdlgg.cpp:429
+#: ../src/generic/fontdlgg.cpp:434 ../src/generic/fontdlgg.cpp:436
+msgid "The font point size."
+msgstr "Die Schriftgröße in Punkt."
+
+#: ../src/osx/carbon/fontdlg.cpp:529 ../src/osx/carbon/fontdlg.cpp:531
+msgid "The font size in points."
+msgstr "Die Schriftgröße in Punkt."
+
+#: ../src/richtext/richtextfontpage.cpp:190
+#: ../src/richtext/richtextfontpage.cpp:192
+msgid "The font size units, points or pixels."
+msgstr "Einheit der Schriftgröße in Punkt oder Pixel."
+
+#: ../src/generic/fontdlgg.cpp:386 ../src/generic/fontdlgg.cpp:388
+msgid "The font style."
+msgstr "Die Schriftschitt."
+
+#: ../src/generic/fontdlgg.cpp:397 ../src/generic/fontdlgg.cpp:399
+msgid "The font weight."
+msgstr "Die Schriftdicke."
+
+#: ../src/common/docview.cpp:1465
+#, c-format
+msgid "The format of file '%s' couldn't be determined."
+msgstr "Das Format der Datei '%s' konnte nicht bestimmt werden."
+
+#: ../src/richtext/richtextindentspage.cpp:199
+#: ../src/richtext/richtextindentspage.cpp:201
+#: ../src/richtext/richtextliststylepage.cpp:385
+#: ../src/richtext/richtextliststylepage.cpp:387
+msgid "The left indent."
+msgstr "Der Linkseinzug."
+
+#: ../src/richtext/richtextmarginspage.cpp:195
+#: ../src/richtext/richtextmarginspage.cpp:197
+msgid "The left margin size."
+msgstr "Der linke Rand."
+
+#: ../src/richtext/richtextmarginspage.cpp:309
+#: ../src/richtext/richtextmarginspage.cpp:311
+msgid "The left padding size."
+msgstr "Die linke Auffüllung."
+
+#: ../src/richtext/richtextsizepage.cpp:534
+#: ../src/richtext/richtextsizepage.cpp:536
+#: ../src/richtext/richtextsizepage.cpp:548
+#: ../src/richtext/richtextsizepage.cpp:550
+msgid "The left position."
+msgstr "Abstand nach links."
+
+#: ../src/richtext/richtextindentspage.cpp:288
+#: ../src/richtext/richtextindentspage.cpp:290
+#: ../src/richtext/richtextliststylepage.cpp:462
+#: ../src/richtext/richtextliststylepage.cpp:464
+msgid "The line spacing."
+msgstr "Der Zeilenabstand."
+
+#: ../src/richtext/richtextbulletspage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:270
+msgid "The list item number."
+msgstr "Die Nummer des Listenelements"
+
+#: ../src/msw/ole/automtn.cpp:653
+msgid "The locale ID is unknown."
+msgstr "Die lokale ID ist unbekannt."
+
+#: ../src/richtext/richtextsizepage.cpp:366
+#: ../src/richtext/richtextsizepage.cpp:368
+msgid "The object height."
+msgstr "Die Objekthöhe."
+
+#: ../src/richtext/richtextsizepage.cpp:474
+#: ../src/richtext/richtextsizepage.cpp:476
+msgid "The object maximum height."
+msgstr "Die maximale Objekthöhe."
+
+#: ../src/richtext/richtextsizepage.cpp:447
+#: ../src/richtext/richtextsizepage.cpp:449
+msgid "The object maximum width."
+msgstr "Die maximale Objektbreite."
+
+#: ../src/richtext/richtextsizepage.cpp:420
+#: ../src/richtext/richtextsizepage.cpp:422
+msgid "The object minimum height."
+msgstr "Die minimale Objekthöhe."
+
+#: ../src/richtext/richtextsizepage.cpp:393
+#: ../src/richtext/richtextsizepage.cpp:395
+msgid "The object minimum width."
+msgstr "Die minimale Objektbreite."
+
+#: ../src/richtext/richtextsizepage.cpp:332
+#: ../src/richtext/richtextsizepage.cpp:334
+msgid "The object width."
+msgstr "Die Objektbreite."
+
+#: ../src/richtext/richtextindentspage.cpp:227
+#: ../src/richtext/richtextindentspage.cpp:229
+msgid "The outline level."
+msgstr "Die Umrandungsebene."
+
+#: ../src/common/log.cpp:281
+#, c-format
+msgid "The previous message repeated %lu time."
+msgid_plural "The previous message repeated %lu times."
+msgstr[0] "Die vorangegangene Nachricht wurde ein Mal wiederholt."
+msgstr[1] "Die vorangegangene Nachricht wurde %lu Mal wiederholt."
+
+#: ../src/common/log.cpp:274
+msgid "The previous message repeated once."
+msgstr "Die vorangegangene Nachricht wurde ein Mal wiederholt."
+
+#: ../src/gtk/print.cpp:931 ../src/gtk/print.cpp:1114
+msgid "The print dialog returned an error."
+msgstr "Der Drucken Dialog hat einen Fehler zurückgegeben."
+
+#: ../src/richtext/richtextsymboldlg.cpp:462
+#: ../src/richtext/richtextsymboldlg.cpp:464
+msgid "The range to show."
+msgstr "Der anzuzeigende Bereich."
+
+#: ../src/generic/dbgrptg.cpp:322
+msgid ""
+"The report contains the files listed below. If any of these files contain "
+"private information,\n"
+"please uncheck them and they will be removed from the report.\n"
+msgstr ""
+"Der Fehlerbericht enthält die unten aufgelisteten Dateien. Bitte stellen Sie "
+"sicher, dass alle Dateien,\n"
+"die vertrauliche Informationen enthalten, nicht ausgewählt sind; sie werden "
+"dann aus dem Fehlerbericht entfernt.\n"
+
+#: ../src/common/cmdline.cpp:1083
+#, c-format
+msgid "The required parameter '%s' was not specified."
+msgstr "Der benötigte Parameter '%s' wurde nicht angegeben."
+
+#: ../src/richtext/richtextindentspage.cpp:217
+#: ../src/richtext/richtextindentspage.cpp:219
+#: ../src/richtext/richtextliststylepage.cpp:403
+#: ../src/richtext/richtextliststylepage.cpp:405
+msgid "The right indent."
+msgstr "Der Rechtseinzug."
+
+#: ../src/richtext/richtextmarginspage.cpp:220
+#: ../src/richtext/richtextmarginspage.cpp:222
+msgid "The right margin size."
+msgstr "Der rechte Rand."
+
+#: ../src/richtext/richtextmarginspage.cpp:334
+#: ../src/richtext/richtextmarginspage.cpp:336
+msgid "The right padding size."
+msgstr "Die rechte Auffüllung."
+
+#: ../src/richtext/richtextsizepage.cpp:604
+#: ../src/richtext/richtextsizepage.cpp:606
+#: ../src/richtext/richtextsizepage.cpp:618
+#: ../src/richtext/richtextsizepage.cpp:620
+msgid "The right position."
+msgstr "Abstand nach rechts."
+
+#: ../src/richtext/richtextindentspage.cpp:267
+#: ../src/richtext/richtextliststylepage.cpp:439
+#: ../src/richtext/richtextliststylepage.cpp:441
+msgid "The spacing after the paragraph."
+msgstr "Der Abstand nach einem Absatz."
+
+#: ../src/richtext/richtextindentspage.cpp:257
+#: ../src/richtext/richtextindentspage.cpp:259
+#: ../src/richtext/richtextliststylepage.cpp:430
+#: ../src/richtext/richtextliststylepage.cpp:432
+msgid "The spacing before the paragraph."
+msgstr "Der Abstand vor einem Absatz."
+
+#: ../src/richtext/richtextstylepage.cpp:108
+#: ../src/richtext/richtextstylepage.cpp:110
+msgid "The style name."
+msgstr "Die Stilname."
+
+#: ../src/richtext/richtextstylepage.cpp:118
+#: ../src/richtext/richtextstylepage.cpp:120
+msgid "The style on which this style is based."
+msgstr "Der Stil auf dem dieser Stil basiert."
+
+#: ../src/richtext/richtextstyledlg.cpp:214
+#: ../src/richtext/richtextstyledlg.cpp:216
+msgid "The style preview."
+msgstr "Die Schriftvorschau."
+
+#: ../src/msw/ole/automtn.cpp:669
+msgid "The system cannot find the file specified."
+msgstr "Das System kann die aufgeführte Datei nicht finden."
+
+#: ../src/richtext/richtexttabspage.cpp:118
+#: ../src/richtext/richtexttabspage.cpp:120
+msgid "The tab position."
+msgstr "Die Tabulatorposition."
+
+#: ../src/richtext/richtexttabspage.cpp:124
+msgid "The tab positions."
+msgstr "Die Tabulatorpositionen."
+
+#: ../src/richtext/richtextctrl.cpp:2705
+msgid "The text couldn't be saved."
+msgstr "Der Text konnte nicht gesichert werden."
+
+#: ../src/richtext/richtextmarginspage.cpp:243
+#: ../src/richtext/richtextmarginspage.cpp:245
+msgid "The top margin size."
+msgstr "Der obere Rand."
+
+#: ../src/richtext/richtextmarginspage.cpp:357
+#: ../src/richtext/richtextmarginspage.cpp:359
+msgid "The top padding size."
+msgstr "Die obere Füllung."
+
+#: ../src/richtext/richtextsizepage.cpp:569
+#: ../src/richtext/richtextsizepage.cpp:571
+#: ../src/richtext/richtextsizepage.cpp:583
+#: ../src/richtext/richtextsizepage.cpp:585
+msgid "The top position."
+msgstr "Abstand nach oben."
+
+#: ../src/common/cmdline.cpp:1061
+#, c-format
+msgid "The value for the option '%s' must be specified."
+msgstr "Der Wert für die Option '%s' muss angegeben werden."
+
+#: ../src/msw/dialup.cpp:452
+#, c-format
+msgid ""
+"The version of remote access service (RAS) installed on this machine is too "
+"old, please upgrade (the following required function is missing: %s)."
+msgstr ""
+"Die Version des auf dieser Maschine installierten RAS-Dienstes ist zu alt. "
+"Bitte auf den neusten Stand bringen (die folgende benötigte Funktion fehlt: "
+"%s)."
+
+#: ../src/gtk/print.cpp:959
+msgid "The wxGtkPrinterDC cannot be used."
+msgstr "wxGtkPrinterDC kann nicht benutzt werden."
+
+#: ../src/osx/carbon/dataview.cpp:1340
+msgid "There is no column or renderer for the specified column index."
+msgstr ""
+"Es existiert keine Zeile oder Darstellung für den festgelegten Zeilenindex."
+
+#: ../src/richtext/richtextprint.cpp:614 ../src/html/htmprint.cpp:735
+msgid ""
+"There was a problem during page setup: you may need to set a default printer."
+msgstr ""
+"Es gab ein Problem bei der Seiteneinrichtung: eventuell müssen Sie einen\n"
+"Standarddrucker einrichten."
+
+#: ../src/html/htmprint.cpp:255
+msgid ""
+"This document doesn't fit on the page horizontally and will be truncated "
+"when it is printed."
+msgstr ""
+"Dieses Dokument passt nicht horizontal auf die Seite und wird beim drucken "
+"abgeschnitten."
+
+#: ../src/common/image.cpp:2716
+#, c-format
+msgid "This is not a %s."
+msgstr "Dies ist kein %s."
+
+#: ../src/common/wincmn.cpp:1653
+msgid "This platform does not support background transparency."
+msgstr "Diese Platform unterstützt die Hintergrundtransparenz nicht."
+
+#: ../src/gtk/window.cpp:4317
+msgid ""
+"This program was compiled with a too old version of GTK+, please rebuild "
+"with GTK+ 2.12 or newer."
+msgstr ""
+"Dieses Programm wurde mit einer zu alten Version von GTK+ übersetzt, bitte "
+"mit GTK+2.12 oder neuer erstellen."
+
+#: ../src/msw/datecontrols.cpp:59
+msgid ""
+"This system doesn't support date controls, please upgrade your version of "
+"comctl32.dll"
+msgstr ""
+"Dieses System unterstützt nicht die Komponente zur Darstellung der "
+"Datumsauswahl. Installieren Sie bitte eine neuere Version der comctl32.dll."
+
+#: ../src/msw/thread.cpp:1300
+msgid ""
+"Thread module initialization failed: cannot store value in thread local "
+"storage"
+msgstr ""
+"Thread-Modul-Initialisierung gescheitert: Wert konnte nicht im lokalen "
+"Speicherbereich des Thread gespeichert werden"
+
+#: ../src/unix/threadpsx.cpp:1758
+msgid "Thread module initialization failed: failed to create thread key"
+msgstr ""
+"Thread-Modul-Initialisierung gescheitert: Thread-Schlüssel konnte nicht "
+"erstellt werden"
+
+#: ../src/msw/thread.cpp:1288
+msgid ""
+"Thread module initialization failed: impossible to allocate index in thread "
+"local storage"
+msgstr ""
+"Thread-Modul-Initialisierung gescheitert: Index konnte nicht im lokalen "
+"Speicherbereich des Thread allokiert werden"
+
+#: ../src/unix/threadpsx.cpp:1038
+msgid "Thread priority setting is ignored."
+msgstr "Thread-Prioritätseinstellung wird ignoriert"
+
+#: ../src/msw/mdi.cpp:172
+msgid "Tile &Horizontally"
+msgstr "Horizontal anordnen"
+
+#: ../src/msw/mdi.cpp:173
+msgid "Tile &Vertically"
+msgstr "Vertikal anordnen"
+
+#: ../src/common/ftp.cpp:202
+msgid "Timeout while waiting for FTP server to connect, try passive mode."
+msgstr ""
+"Timeout beim Warten auf eine Verbindung zum FTP-Server, versuchen Sie "
+"passiven Modus."
+
+#: ../src/os2/timer.cpp:99
+msgid "Timer creation failed."
+msgstr "Konnte Zeitgeber nicht anlegen."
+
+#: ../src/generic/tipdlg.cpp:220
+msgid "Tip of the Day"
+msgstr "Tipp des Tages"
+
+#: ../src/generic/tipdlg.cpp:154
+msgid "Tips not available, sorry!"
+msgstr "Bedauere, Tipps stehen nicht zur Verfügung"
+
+#: ../src/generic/prntdlgg.cpp:242
+msgid "To:"
+msgstr "Bis:"
+
+#: ../src/osx/carbon/dataview.cpp:2451
+msgid "Toggle renderer cannot render value; value type: "
+msgstr "Umschalt Renderer konnte den Wert nicht darstellen; Wert Typ:"
+
+#: ../src/richtext/richtextbuffer.cpp:7983
+msgid "Too many EndStyle calls!"
+msgstr "Zu viele EndStyle-Aufrufe!"
+
+#: ../src/common/imagpng.cpp:286
+msgid "Too many colours in PNG, the image may be slightly blurred."
+msgstr ""
+"Zu viele Farben in PNG; das Bild wird vielleicht verschmiert angezeigt."
+
+#: ../src/richtext/richtextsizepage.cpp:286
+#: ../src/richtext/richtextsizepage.cpp:290 ../src/common/stockitem.cpp:200
+msgid "Top"
+msgstr "Oben"
+
+#: ../src/generic/prntdlgg.cpp:881
+msgid "Top margin (mm):"
+msgstr "Oberer Rand (mm):"
+
+#: ../src/generic/aboutdlgg.cpp:79
+msgid "Translations by "
+msgstr "Übersetzungen von "
+
+#: ../src/generic/aboutdlgg.cpp:188
+msgid "Translators"
+msgstr "Übersetzer"
+
+#: ../src/propgrid/propgrid.cpp:173
+msgid "True"
+msgstr "Wahr"
+
+#: ../src/common/fs_mem.cpp:227
+#, c-format
+msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!"
+msgstr ""
+"Beim Versuch, die Datei '%s' aus dem VFS-Speicher zu entfernen, wurde "
+"festgestellt, dass sie gar nicht geladen war!"
+
+#: ../src/common/fmapbase.cpp:156
+msgid "Turkish (ISO-8859-9)"
+msgstr "Türkisch (ISO-8859-9)"
+
+#: ../src/generic/filectrlg.cpp:461
+msgid "Type"
+msgstr "Typ"
+
+#: ../src/richtext/richtextfontpage.cpp:160
+#: ../src/richtext/richtextfontpage.cpp:162
+msgid "Type a font name."
+msgstr "Schriftart eingeben."
+
+#: ../src/richtext/richtextfontpage.cpp:175
+#: ../src/richtext/richtextfontpage.cpp:177
+msgid "Type a size in points."
+msgstr "Größe in Punkt angeben."
+
+#: ../src/msw/ole/automtn.cpp:665
+#, c-format
+msgid "Type mismatch in argument %u."
+msgstr "Typfehler in Argument %u."
+
+#: ../src/common/xtixml.cpp:356 ../src/common/xtixml.cpp:509
+#: ../src/common/xtistrm.cpp:322
+msgid "Type must have enum - long conversion"
+msgstr "Typ muss eine enum-long Umwandlung haben"
+
+#: ../src/propgrid/propgridiface.cpp:382
+#, c-format
+msgid ""
+"Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT "
+"\"%s\"."
+msgstr ""
+"Die Typoperation \"%s\" ist fehlgeschlagen: Die Eigenschaft bezeichnet mit "
+"\"%s\" ist vom Typ \"%s\", NICHT \"%s\"."
+
+#: ../src/common/accelcmn.cpp:58
+msgid "UP"
+msgstr "HOCH"
+
+#: ../src/common/paper.cpp:134
+msgid "US Std Fanfold, 14 7/8 x 11 in"
+msgstr "US Std Endlospapier, 14 7/8 x 11 Zoll"
+
+#: ../src/common/fmapbase.cpp:196
+msgid "US-ASCII"
+msgstr "US-ASCII"
+
+#: ../src/unix/fswatcher_inotify.cpp:109
+msgid "Unable to add inotify watch"
+msgstr "Nicht möglich Benachrichtigung der Überwachung hinzuzufügen"
+
+#: ../src/unix/fswatcher_kqueue.cpp:136
+msgid "Unable to add kqueue watch"
+msgstr "Fehlgeschlagen eine Beobachtung an die Kqueue anzuhängen"
+
+#: ../include/wx/msw/private/fswatcher.h:142
+msgid "Unable to associate handle with I/O completion port"
+msgstr ""
+"Nicht möglich das Handle mit dem I/O Beendigungsport in Verbindung zu bringen"
+
+#: ../include/wx/msw/private/fswatcher.h:125
+msgid "Unable to close I/O completion port handle"
+msgstr "Konnte I/O Vervollständigungs Port-Handle nicht schließen."
+
+#: ../src/unix/fswatcher_inotify.cpp:97
+msgid "Unable to close inotify instance"
+msgstr "Konnte Inotify Instanz nicht schließen"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:74
+#, c-format
+msgid "Unable to close path '%s'"
+msgstr "Konnte Pfad '%s' nicht schließen"
+
+#: ../include/wx/msw/private/fswatcher.h:48
+#, c-format
+msgid "Unable to close the handle for '%s'"
+msgstr "Konnte das Handle für '%s' nicht schließen"
+
+#: ../include/wx/msw/private/fswatcher.h:240
+msgid "Unable to create I/O completion port"
+msgstr "Konnte den I/O Vervollständigungs-Port nicht erzeugen"
+
+#: ../src/msw/fswatcher.cpp:84
+msgid "Unable to create IOCP worker thread"
+msgstr "Erzeugen des IOCP Arbeitsthreads fehlgeschlagen"
+
+#: ../src/unix/fswatcher_inotify.cpp:74
+msgid "Unable to create inotify instance"
+msgstr "Erzeugen der Inotify Instanz fehlgeschlagen"
+
+#: ../src/unix/fswatcher_kqueue.cpp:97
+msgid "Unable to create kqueue instance"
+msgstr "Erzeugen der kqueue Instanz fehlgeschlagen"
+
+#: ../include/wx/msw/private/fswatcher.h:229
+msgid "Unable to dequeue completion packet"
+msgstr "Nicht möglich das Kompletierungspaket aufzulösen"
+
+#: ../src/unix/fswatcher_kqueue.cpp:185
+msgid "Unable to get events from kqueue"
+msgstr "Ereignisse von Kqueue zu erhalten fehlgeschlagen"
+
+#: ../src/osx/carbon/dataview.cpp:1903
+msgid "Unable to handle native drag&drop data"
+msgstr "Nicht möglich mit ursprüngliche Drag&Drop Daten umzugehen"
+
+#: ../src/gtk/app.cpp:439
+msgid "Unable to initialize GTK+, is DISPLAY set properly?"
+msgstr "Nicht möglich GTK+ zu initialisieren, ist DISPLAY korrekt gesetzt?"
+
+#: ../src/gtk/app.cpp:276
+msgid "Unable to initialize Hildon program"
+msgstr "Konnte das Hildon Programm nicht initialisieren"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:57
+#, c-format
+msgid "Unable to open path '%s'"
+msgstr "Pfad '%s' lässt sich nicht öffnen"
+
+#: ../src/html/htmlwin.cpp:561
+#, c-format
+msgid "Unable to open requested HTML document: %s"
+msgstr "Das angeforderte HTML-Dokument konnte nicht geöffnet werden: %s"
+
+#: ../src/unix/sound.cpp:368
+msgid "Unable to play sound asynchronously."
+msgstr "Der Klang kann nicht asynchron abgespielt werden."
+
+#: ../include/wx/msw/private/fswatcher.h:207
+msgid "Unable to post completion status"
+msgstr "Nicht möglich den Ausführungsstatus zu senden"
+
+#: ../src/unix/fswatcher_inotify.cpp:530
+msgid "Unable to read from inotify descriptor"
+msgstr "Konnte nicht vom Inotify Beschreibungselement lesen"
+
+#: ../src/unix/fswatcher_inotify.cpp:132
+msgid "Unable to remove inotify watch"
+msgstr "Zurücksetzen der Inotify Überwachung nicht möglich"
+
+#: ../src/unix/fswatcher_kqueue.cpp:153
+msgid "Unable to remove kqueue watch"
+msgstr "Zurücksetzen der Kqueue Überwachung nicht möglich"
+
+#: ../src/msw/fswatcher.cpp:168
+#, c-format
+msgid "Unable to set up watch for '%s'"
+msgstr "Konnte die Überwachung für '%s' nicht aufsetzen."
+
+#: ../src/msw/fswatcher.cpp:91
+msgid "Unable to start IOCP worker thread"
+msgstr "Nicht möglich den Arbeits Thread IOCP zu starten"
+
+#: ../src/common/stockitem.cpp:201
+msgid "Undelete"
+msgstr "Löschen rückgängig machen"
+
+#: ../src/common/stockitem.cpp:202
+msgid "Underline"
+msgstr "Unterstreichen"
+
+#: ../src/richtext/richtextfontpage.cpp:341 ../src/osx/carbon/fontdlg.cpp:556
+#: ../src/propgrid/advprops.cpp:655
+msgid "Underlined"
+msgstr "Unterstrichen"
+
+#: ../src/common/stockitem.cpp:203 ../src/stc/stc_i18n.cpp:15
+msgid "Undo"
+msgstr "Rückgängig"
+
+#: ../src/common/stockitem.cpp:265
+msgid "Undo last action"
+msgstr "Letzte Aktion zurücknehmen"
+
+#: ../src/common/cmdline.cpp:864
+#, c-format
+msgid "Unexpected characters following option '%s'."
+msgstr "Unerwartete Zeichen folgen der Option '%s'."
+
+#: ../src/unix/fswatcher_inotify.cpp:261
+#, c-format
+msgid "Unexpected event for \"%s\": no matching watch descriptor."
+msgstr ""
+"Unerwartetes Ereignis für \"%s\": Kein passender Überwachungs-Deskriptor."
+
+#: ../src/common/cmdline.cpp:1024
+#, c-format
+msgid "Unexpected parameter '%s'"
+msgstr "Unerwarteter Parameter '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:148
+msgid "Unexpectedly new I/O completion port was created"
+msgstr "Neue unerwartete I/O Ausführungs Port wurde erstellt"
+
+#: ../src/msw/fswatcher.cpp:70
+msgid "Ungraceful worker thread termination"
+msgstr "Unfreundliche Beendigung des Arbeitsthreads"
+
+#: ../src/richtext/richtextsymboldlg.cpp:459
+#: ../src/richtext/richtextsymboldlg.cpp:460
+#: ../src/richtext/richtextsymboldlg.cpp:461
+msgid "Unicode"
+msgstr "Unicode"
+
+#: ../src/common/fmapbase.cpp:185 ../src/common/fmapbase.cpp:191
+msgid "Unicode 16 bit (UTF-16)"
+msgstr "Unicode 16 bit (UTF-16)"
+
+#: ../src/common/fmapbase.cpp:190
+msgid "Unicode 16 bit Big Endian (UTF-16BE)"
+msgstr "Unicode 16 Bit Big Endian (UTF-16BE)"
+
+#: ../src/common/fmapbase.cpp:186
+msgid "Unicode 16 bit Little Endian (UTF-16LE)"
+msgstr "Unicode 16 Bit Little Endian (UTF-16LE)"
+
+#: ../src/common/fmapbase.cpp:187 ../src/common/fmapbase.cpp:193
+msgid "Unicode 32 bit (UTF-32)"
+msgstr "Unicode 32 Bit (UTF-32)"
+
+#: ../src/common/fmapbase.cpp:192
+msgid "Unicode 32 bit Big Endian (UTF-32BE)"
+msgstr "Unicode 32 Bit Big Endian (UTF-32BE)"
+
+#: ../src/common/fmapbase.cpp:188
+msgid "Unicode 32 bit Little Endian (UTF-32LE)"
+msgstr "Unicode 32 Bit Little Endian (UTF-32LE)"
+
+#: ../src/common/fmapbase.cpp:182
+msgid "Unicode 7 bit (UTF-7)"
+msgstr "Unicode 7 bit (UTF-7)"
+
+#: ../src/common/fmapbase.cpp:183
+msgid "Unicode 8 bit (UTF-8)"
+msgstr "Unicode 8 bit (UTF-8)"
+
+#: ../src/common/stockitem.cpp:204
+msgid "Unindent"
+msgstr "Einrücken aufheben"
+
+#: ../src/richtext/richtextborderspage.cpp:373
+#: ../src/richtext/richtextborderspage.cpp:375
+msgid "Units for the bottom border width."
+msgstr "Einheit für die untere Randbreite."
+
+#: ../src/richtext/richtextmarginspage.cpp:278
+#: ../src/richtext/richtextmarginspage.cpp:280
+msgid "Units for the bottom margin."
+msgstr "Einheiten für den unteren Bundsteg"
+
+#: ../src/richtext/richtextborderspage.cpp:517
+#: ../src/richtext/richtextborderspage.cpp:519
+msgid "Units for the bottom outline width."
+msgstr "Einheiten für die untere Umrissbreite."
+
+#: ../src/richtext/richtextmarginspage.cpp:392
+#: ../src/richtext/richtextmarginspage.cpp:394
+msgid "Units for the bottom padding."
+msgstr "Einheiten für die untere Auffüllung."
+
+#: ../src/richtext/richtextsizepage.cpp:664
+#: ../src/richtext/richtextsizepage.cpp:666
+msgid "Units for the bottom position."
+msgstr "Einheit für den Abstand nach unten."
+
+#: ../src/richtext/richtextborderspage.cpp:283
+#: ../src/richtext/richtextborderspage.cpp:285
+msgid "Units for the left border width."
+msgstr "Einheiten für die linke Randbreite."
+
+#: ../src/richtext/richtextmarginspage.cpp:205
+#: ../src/richtext/richtextmarginspage.cpp:207
+msgid "Units for the left margin."
+msgstr "Einheiten für den linken Bundsteg"
+
+#: ../src/richtext/richtextborderspage.cpp:427
+#: ../src/richtext/richtextborderspage.cpp:429
+msgid "Units for the left outline width."
+msgstr "Einheiten für die linke Umrissbreite."
+
+#: ../src/richtext/richtextmarginspage.cpp:319
+#: ../src/richtext/richtextmarginspage.cpp:321
+msgid "Units for the left padding."
+msgstr "Einheiten für die linke Auffüllung"
+
+#: ../src/richtext/richtextsizepage.cpp:559
+#: ../src/richtext/richtextsizepage.cpp:561
+msgid "Units for the left position."
+msgstr "Einheit für den Abstand nach links."
+
+#: ../src/richtext/richtextsizepage.cpp:485
+#: ../src/richtext/richtextsizepage.cpp:487
+msgid "Units for the maximum object height."
+msgstr "Einheiten für die maximale Objekthöhe."
+
+#: ../src/richtext/richtextsizepage.cpp:458
+#: ../src/richtext/richtextsizepage.cpp:460
+msgid "Units for the maximum object width."
+msgstr "Einheiten für die maximale Objektbreite."
+
+#: ../src/richtext/richtextsizepage.cpp:431
+#: ../src/richtext/richtextsizepage.cpp:433
+msgid "Units for the minimum object height."
+msgstr "Einheiten für die minximale Objekthöhe."
+
+#: ../src/richtext/richtextsizepage.cpp:404
+#: ../src/richtext/richtextsizepage.cpp:406
+msgid "Units for the minimum object width."
+msgstr "Einheiten für die minimale Objektbreite."
+
+#: ../src/richtext/richtextsizepage.cpp:377
+#: ../src/richtext/richtextsizepage.cpp:379
+msgid "Units for the object height."
+msgstr "Einheiten für dir Objekthöhe."
+
+#: ../src/richtext/richtextsizepage.cpp:343
+#: ../src/richtext/richtextsizepage.cpp:345
+msgid "Units for the object width."
+msgstr "Einheiten für die Objektbreite."
+
+#: ../src/richtext/richtextborderspage.cpp:313
+#: ../src/richtext/richtextborderspage.cpp:315
+msgid "Units for the right border width."
+msgstr "Einheiten für die rechte Randbreite."
+
+#: ../src/richtext/richtextmarginspage.cpp:230
+#: ../src/richtext/richtextmarginspage.cpp:232
+msgid "Units for the right margin."
+msgstr "Einheiten für den rechten Bundsteg."
+
+#: ../src/richtext/richtextborderspage.cpp:457
+#: ../src/richtext/richtextborderspage.cpp:459
+msgid "Units for the right outline width."
+msgstr "Einheiten für die rechte Umrissbreite."
+
+#: ../src/richtext/richtextmarginspage.cpp:344
+#: ../src/richtext/richtextmarginspage.cpp:346
+msgid "Units for the right padding."
+msgstr "Einheit für die Auffüllung rechts."
+
+#: ../src/richtext/richtextsizepage.cpp:629
+#: ../src/richtext/richtextsizepage.cpp:631
+msgid "Units for the right position."
+msgstr "Einheit des Abstands nach rechts."
+
+#: ../src/richtext/richtextborderspage.cpp:343
+#: ../src/richtext/richtextborderspage.cpp:345
+msgid "Units for the top border width."
+msgstr "Einheit für die Breite des oberen Randes."
+
+#: ../src/richtext/richtextmarginspage.cpp:253
+#: ../src/richtext/richtextmarginspage.cpp:255
+msgid "Units for the top margin."
+msgstr "Einheiten für den oberen Rand."
+
+#: ../src/richtext/richtextborderspage.cpp:487
+#: ../src/richtext/richtextborderspage.cpp:489
+msgid "Units for the top outline width."
+msgstr "Einheit für die Breite des obren Umrisses."
+
+#: ../src/richtext/richtextmarginspage.cpp:367
+#: ../src/richtext/richtextmarginspage.cpp:369
+msgid "Units for the top padding."
+msgstr "Einheit für die obere Auffüllung"
+
+#: ../src/richtext/richtextsizepage.cpp:594
+#: ../src/richtext/richtextsizepage.cpp:596
+msgid "Units for the top position."
+msgstr "Einheit des Abstands nach oben."
+
+#: ../src/generic/progdlgg.cpp:382 ../src/generic/progdlgg.cpp:655
+msgid "Unknown"
+msgstr "Unbekannt"
+
+#: ../src/msw/dde.cpp:1177
+#, c-format
+msgid "Unknown DDE error %08x"
+msgstr "Unbekannter DDE-Fehler %08x"
+
+#: ../src/common/xtistrm.cpp:414
+msgid "Unknown Object passed to GetObjectClassInfo"
+msgstr "Unbekanntes Objekt an GetObjectClassInfo übergeben"
+
+#: ../src/common/imagpng.cpp:614
+#, c-format
+msgid "Unknown PNG resolution unit %d"
+msgstr "Unbekannte Einheit für die PNG Auflösung %d"
+
+#: ../src/common/xtixml.cpp:327
+#, c-format
+msgid "Unknown Property %s"
+msgstr "Unbekannte Eigenschaft %s"
+
+#: ../src/common/imagtiff.cpp:532
+#, c-format
+msgid "Unknown TIFF resolution unit %d ignored"
+msgstr "Unbekannter TIFF Auflösungseinheit %d ignoriert"
+
+#: ../src/osx/carbon/dataview.cpp:1978
+msgid "Unknown data format"
+msgstr "Unbekanntes Datenformat"
+
+#: ../src/unix/dlunix.cpp:325
+msgid "Unknown dynamic library error"
+msgstr "Unbekannter Fehler bei Behandlung dynamischer Bibliothek"
+
+#: ../src/common/fmapbase.cpp:810
+#, c-format
+msgid "Unknown encoding (%d)"
+msgstr "Unbekannte Kodierung (%d)"
+
+#: ../src/msw/ole/automtn.cpp:677
+#, c-format
+msgid "Unknown error %08x"
+msgstr "Unbekannter Fehler %08x"
+
+#: ../src/msw/ole/automtn.cpp:636
+msgid "Unknown exception"
+msgstr "Unbekannte Ausnahme"
+
+#: ../src/common/image.cpp:2701
+msgid "Unknown image data format."
+msgstr "Unbekanntes Bilddateiformat"
+
+#: ../src/common/cmdline.cpp:749
+#, c-format
+msgid "Unknown long option '%s'"
+msgstr "Unbekannte 'long'-Option '%s'"
+
+#: ../src/msw/ole/automtn.cpp:620
+msgid "Unknown name or named argument."
+msgstr "Unbekannter Name oder unbekanntes Argument."
+
+#: ../src/common/cmdline.cpp:764 ../src/common/cmdline.cpp:786
+#, c-format
+msgid "Unknown option '%s'"
+msgstr "Unbekannte Option '%s'"
+
+#: ../src/common/mimecmn.cpp:230
+#, c-format
+msgid "Unmatched '{' in an entry for mime type %s."
+msgstr "Unzutreffendes '{'-Zeichen in einem Eintrag des MIME-Typs %s."
+
+#: ../src/common/cmdproc.cpp:262 ../src/common/cmdproc.cpp:288
+#: ../src/common/cmdproc.cpp:308
+msgid "Unnamed command"
+msgstr "Unbenanntes Kommando"
+
+#: ../src/propgrid/propgrid.cpp:398
+msgid "Unspecified"
+msgstr "Nicht angegeben"
+
+#: ../src/msw/clipbrd.cpp:271 ../src/msw/clipbrd.cpp:439
+msgid "Unsupported clipboard format."
+msgstr "Nicht unterstütztes Format in der Zwischenablage."
+
+#: ../src/common/appcmn.cpp:249
+#, c-format
+msgid "Unsupported theme '%s'."
+msgstr "Unbekanntes Thema '%s'."
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:205
+msgid "Up"
+msgstr "Hoch"
+
+#: ../src/richtext/richtextliststylepage.cpp:483
+#: ../src/richtext/richtextbulletspage.cpp:288
+msgid "Upper case letters"
+msgstr "Großbuchstaben"
+
+#: ../src/richtext/richtextliststylepage.cpp:485
+#: ../src/richtext/richtextbulletspage.cpp:290
+msgid "Upper case roman numerals"
+msgstr "Römische Ziffern in Großbuchstaben"
+
+#: ../src/common/cmdline.cpp:1155
+#, c-format
+msgid "Usage: %s"
+msgstr "Verwendung: %s"
+
+#: ../src/richtext/richtextindentspage.cpp:169
+#: ../src/richtext/richtextindentspage.cpp:171
+#: ../src/richtext/richtextliststylepage.cpp:358
+#: ../src/richtext/richtextliststylepage.cpp:360
+msgid "Use the current alignment setting."
+msgstr "Benutze die aktuellen Einstellungen für die Ausrichtung."
+
+#: ../src/osx/carbon/dataview.cpp:2658 ../src/osx/carbon/dataview.cpp:2723
+msgid "Valid pointer to native data view control does not exist"
+msgstr ""
+"Es existiert kein gültiger Zeiger auf das Kontrollelement zur der "
+"ursprünglichen Daten"
+
+#: ../src/common/valtext.cpp:174
+msgid "Validation conflict"
+msgstr "Verifizierungs-Konflikt"
+
+#: ../src/propgrid/manager.cpp:238
+msgid "Value"
+msgstr "Wert"
+
+#: ../src/propgrid/props.cpp:384
+#, c-format
+msgid "Value must be %s or higher."
+msgstr "Wert muss %s oder höher sein."
+
+#: ../src/propgrid/props.cpp:411
+#, c-format
+msgid "Value must be %s or less."
+msgstr "Wert muss %s oder kleiner sein."
+
+#: ../src/propgrid/props.cpp:388 ../src/propgrid/props.cpp:415
+#, c-format
+msgid "Value must be between %s and %s."
+msgstr "Wert muss zwischen %s und %s liegen."
+
+#: ../src/generic/aboutdlgg.cpp:128
+msgid "Version "
+msgstr "Version "
+
+#: ../src/richtext/richtextsizepage.cpp:291
+#: ../src/richtext/richtextsizepage.cpp:293
+msgid "Vertical alignment."
+msgstr "Vertikalabgleich"
+
+#: ../src/generic/filedlgg.cpp:216
+msgid "View files as a detailed view"
+msgstr "Dateien mit Details anzeigen"
+
+#: ../src/generic/filedlgg.cpp:214
+msgid "View files as a list view"
+msgstr "Dateien als Liste anzeigen"
+
+#: ../src/common/docview.cpp:1952
+msgid "Views"
+msgstr "Darstellung"
+
+#: ../src/common/accelcmn.cpp:108
+msgid "WINDOWS_LEFT"
+msgstr "WINDOWS_LINKS"
+
+#: ../src/common/accelcmn.cpp:110
+msgid "WINDOWS_MENU"
+msgstr "WINDOWS_MENÜ"
+
+#: ../src/common/accelcmn.cpp:109
+msgid "WINDOWS_RIGHT"
+msgstr "WINDOWS_RECHTS"
+
+#: ../src/unix/epolldispatcher.cpp:213
+#, c-format
+msgid "Waiting for IO on epoll descriptor %d failed"
+msgstr ""
+"Warten auf ein Eingabe-/Ausgabe Epoll Beschreibungselement %d fehlgeschlagen"
+
+#: ../src/common/log.cpp:227
+msgid "Warning: "
+msgstr "Warnung: "
+
+#: ../src/propgrid/advprops.cpp:651
+msgid "Weight"
+msgstr "Dicke"
+
+#: ../src/common/fmapbase.cpp:148
+msgid "Western European (ISO-8859-1)"
+msgstr "Westeuropäisch (ISO-8859-1)"
+
+#: ../src/common/fmapbase.cpp:162
+msgid "Western European with Euro (ISO-8859-15)"
+msgstr "Westeuropäisch mit Euro (ISO-8859-15)"
+
+#: ../src/generic/fontdlgg.cpp:446 ../src/generic/fontdlgg.cpp:448
+msgid "Whether the font is underlined."
+msgstr "Ob der Schrifttyp unterstrichen ist."
+
+#: ../src/generic/fdrepdlg.cpp:144
+msgid "Whole word"
+msgstr "Ganzes Wort"
+
+#: ../src/html/helpwnd.cpp:547
+msgid "Whole words only"
+msgstr "Nur ganze Worte"
+
+#: ../src/univ/themes/win32.cpp:1102
+msgid "Win32 theme"
+msgstr "Win32 Thema"
+
+#: ../src/msw/utils.cpp:1220
+msgid "Win32s on Windows 3.1"
+msgstr "Win32s on Windows 3.1"
+
+#: ../src/msw/utils.cpp:1270
+msgid "Windows 2000"
+msgstr "Windows 2000"
+
+#: ../src/msw/utils.cpp:1302
+msgid "Windows 7"
+msgstr "Windows 7"
+
+#: ../src/msw/utils.cpp:1234
+msgid "Windows 95"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1230
+msgid "Windows 95 OSR2"
+msgstr "Windows 95 OSR2"
+
+#: ../src/msw/utils.cpp:1245
+msgid "Windows 98"
+msgstr "Windows 98"
+
+#: ../src/msw/utils.cpp:1241
+msgid "Windows 98 SE"
+msgstr "Windows 98 SE"
+
+#: ../src/msw/utils.cpp:1252
+#, c-format
+msgid "Windows 9x (%d.%d)"
+msgstr "Windows 9x (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:177
+msgid "Windows Arabic (CP 1256)"
+msgstr "Windows Arabisch (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:178
+msgid "Windows Baltic (CP 1257)"
+msgstr "Windows Baltisch (CP 1257)"
+
+#: ../src/msw/utils.cpp:1214
+#, c-format
+msgid "Windows CE (%d.%d)"
+msgstr "Windows CE (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:171
+msgid "Windows Central European (CP 1250)"
+msgstr "Windows Zentral Europäisch (CP 1250)"
+
+#: ../src/common/fmapbase.cpp:168
+msgid "Windows Chinese Simplified (CP 936) or GB-2312"
+msgstr "Windows Vereinfachtes Chinesisch (CP 936) oder GB-2312"
+
+#: ../src/common/fmapbase.cpp:170
+msgid "Windows Chinese Traditional (CP 950) or Big-5"
+msgstr "Windows Traditionelles Chinesisch (CP 950) oder Big-5"
+
+#: ../src/common/fmapbase.cpp:172
+msgid "Windows Cyrillic (CP 1251)"
+msgstr "Windows Kyrillisch (CP 1251)"
+
+#: ../src/common/fmapbase.cpp:174
+msgid "Windows Greek (CP 1253)"
+msgstr "Windows Griechisch (CP 1253)"
+
+#: ../src/common/fmapbase.cpp:176
+msgid "Windows Hebrew (CP 1255)"
+msgstr "Windows Hebräisch (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:167
+msgid "Windows Japanese (CP 932) or Shift-JIS"
+msgstr "Windows Japanisch (CP 932) oder Shift-JIS"
+
+#: ../src/common/fmapbase.cpp:180
+msgid "Windows Johab (CP 1361)"
+msgstr "Windows Johab (CP 1361)"
+
+#: ../src/common/fmapbase.cpp:169
+msgid "Windows Korean (CP 949)"
+msgstr "Windows Koreanisch (CP 949)"
+
+#: ../src/msw/utils.cpp:1249
+msgid "Windows ME"
+msgstr "Windows ME"
+
+#: ../src/msw/utils.cpp:1310
+#, c-format
+msgid "Windows NT %lu.%lu"
+msgstr "Windows NT %lu.%lu"
+
+#: ../src/msw/utils.cpp:1279
+msgid "Windows Server 2003"
+msgstr "Windows Server 2003"
+
+#: ../src/msw/utils.cpp:1295
+msgid "Windows Server 2008"
+msgstr "Windows Server 2008"
+
+#: ../src/msw/utils.cpp:1301
+msgid "Windows Server 2008 R2"
+msgstr "Windows Server 2008 R2"
+
+#: ../src/common/fmapbase.cpp:166
+msgid "Windows Thai (CP 874)"
+msgstr "Windows Thailändisch (CP 874)"
+
+#: ../src/common/fmapbase.cpp:175
+msgid "Windows Turkish (CP 1254)"
+msgstr "Windows Türkisch (CP 1254)"
+
+#: ../src/common/fmapbase.cpp:179
+msgid "Windows Vietnamese (CP 1258)"
+msgstr "Windows Vietnamesisch (CP 1258)"
+
+#: ../src/msw/utils.cpp:1296
+msgid "Windows Vista"
+msgstr "Windows Vista"
+
+#: ../src/common/fmapbase.cpp:173
+msgid "Windows Western European (CP 1252)"
+msgstr "Windows West Europäisch (CP 1252)"
+
+#: ../src/msw/utils.cpp:1285
+msgid "Windows XP"
+msgstr "Windows XP"
+
+#: ../src/common/fmapbase.cpp:181
+msgid "Windows/DOS OEM (CP 437)"
+msgstr "Windows/DOS OEM (CP 437)"
+
+#: ../src/common/fmapbase.cpp:165
+msgid "Windows/DOS OEM Cyrillic (CP 866)"
+msgstr "Windows/DOS OEM Kyrillisch (CP 866)"
+
+#: ../src/common/ffile.cpp:148
+#, c-format
+msgid "Write error on file '%s'"
+msgstr "Schreibfehler bei Datei '%s'"
+
+#: ../src/xml/xml.cpp:844
+#, c-format
+msgid "XML parsing error: '%s' at line %d"
+msgstr "Fehler beim Lesen des XML: '%s' in Zeile %d"
+
+#: ../src/common/xpmdecod.cpp:796
+msgid "XPM: Malformed pixel data!"
+msgstr "XPM: Pixeldaten in falscher Form!"
+
+#: ../src/common/xpmdecod.cpp:705
+#, c-format
+msgid "XPM: incorrect colour description in line %d"
+msgstr "XPM: nicht korrekte Farbbeschreibung in Zeile %d"
+
+#: ../src/common/xpmdecod.cpp:680
+msgid "XPM: incorrect header format!"
+msgstr "XPM: nicht korrektes Kopfformat!"
+
+#: ../src/common/xpmdecod.cpp:716 ../src/common/xpmdecod.cpp:725
+#, c-format
+msgid "XPM: malformed colour definition '%s' at line %d!"
+msgstr "XPM: ungültige Farbdefinition '%s' in Zeile %d!"
+
+#: ../src/common/xpmdecod.cpp:755
+msgid "XPM: no colors left to use for mask!"
+msgstr "XPM: keine Farben für die Maske übrig!"
+
+#: ../src/common/xpmdecod.cpp:782
+#, c-format
+msgid "XPM: truncated image data at line %d!"
+msgstr "XPM: abgeschnittene Bilddaten in Zeile %d!"
+
+#: ../include/wx/msgdlg.h:271 ../src/common/stockitem.cpp:206
+#: ../src/motif/msgdlg.cpp:196
+msgid "Yes"
+msgstr "Ja"
+
+#: ../src/osx/carbon/overlay.cpp:155
+msgid "You cannot Clear an overlay that is not inited"
+msgstr "Sie können keine Überlagerung löschen, die nicht initialisiert wurde"
+
+#: ../src/osx/carbon/overlay.cpp:107 ../src/dfb/overlay.cpp:61
+msgid "You cannot Init an overlay twice"
+msgstr "Eine Überlagerung kann nicht zweimal initialisiert werden"
+
+#: ../src/generic/dirdlgg.cpp:316
+msgid "You cannot add a new directory to this section."
+msgstr "Sie können hier kein neues Verzeichnis anlegen."
+
+#: ../src/propgrid/propgrid.cpp:3258
+msgid "You have entered invalid value. Press ESC to cancel editing."
+msgstr ""
+"Sie haben einen ungültigen Wert eingegeben. Drücken Sie ESC um die "
+"Bearbeitung zu beenden."
+
+#: ../src/common/stockitem.cpp:209
+msgid "Zoom &In"
+msgstr "Ver&größern"
+
+#: ../src/common/stockitem.cpp:210
+msgid "Zoom &Out"
+msgstr "Ver&kleinern"
+
+#: ../src/common/stockitem.cpp:209 ../src/common/prntbase.cpp:1564
+msgid "Zoom In"
+msgstr "Vergrößern"
+
+#: ../src/common/stockitem.cpp:210 ../src/common/prntbase.cpp:1550
+msgid "Zoom Out"
+msgstr "Verkleinern"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to &Fit"
+msgstr "&Passende Grösse"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to Fit"
+msgstr "Einpassen"
+
+#: ../src/msw/dde.cpp:1144
+msgid "a DDEML application has created a prolonged race condition."
+msgstr "Eine DDEML-Anwendung hat eine 'prolonged race condition' ausgeloest."
+
+#: ../src/msw/dde.cpp:1132
+msgid ""
+"a DDEML function was called without first calling the DdeInitialize "
+"function,\n"
+"or an invalid instance identifier\n"
+"was passed to a DDEML function."
+msgstr ""
+"Eine DDEML-Funktion wurde aufgerufen, ohne vorher die Deinitialisierungs-"
+"Funktion aufzurufen,\n"
+"oder ein ungültiger 'instance identifier'\n"
+"wurde an eine DDEML-Funktion übergeben."
+
+#: ../src/msw/dde.cpp:1150
+msgid "a client's attempt to establish a conversation has failed."
+msgstr ""
+"Der Versuch eines Clients, eine Verbindung herzustellen, ist gescheitert."
+
+#: ../src/msw/dde.cpp:1147
+msgid "a memory allocation failed."
+msgstr "Eine Speicheranforderung ist gescheitert."
+
+#: ../src/msw/dde.cpp:1141
+msgid "a parameter failed to be validated by the DDEML."
+msgstr "Ein Parameter wurde von DDEML nicht verifiziert."
+
+#: ../src/msw/dde.cpp:1123
+msgid "a request for a synchronous advise transaction has timed out."
+msgstr ""
+"Eine Anfrage für eine 'synchronous advise transaction' ist gescheitert (time-"
+"out)"
+
+#: ../src/msw/dde.cpp:1129
+msgid "a request for a synchronous data transaction has timed out."
+msgstr ""
+"Eine Anfrage für eine 'synchronous data transaction' ist gescheitert (time-"
+"out)"
+
+#: ../src/msw/dde.cpp:1138
+msgid "a request for a synchronous execute transaction has timed out."
+msgstr ""
+"Eine Anfrage für eine 'synchronous execute transaction' ist gescheitert "
+"(time-out)"
+
+#: ../src/msw/dde.cpp:1156
+msgid "a request for a synchronous poke transaction has timed out."
+msgstr ""
+"Eine Anfrage für eine 'synchronous poke transaction' ist gescheitert (time-"
+"out)"
+
+#: ../src/msw/dde.cpp:1171
+msgid "a request to end an advise transaction has timed out."
+msgstr ""
+"Eine Anfrage, eine 'advise transaction' zu beenden ist, gescheitert (time-"
+"out)"
+
+#: ../src/msw/dde.cpp:1165
+msgid ""
+"a server-side transaction was attempted on a conversation\n"
+"that was terminated by the client, or the server\n"
+"terminated before completing a transaction."
+msgstr ""
+"Ein Verbindungs-Versuch vom Server\n"
+"wurde vom Client abgebrochen, oder der Server\n"
+"terminierte bevor die Transaktion vollständig beendet wurde."
+
+#: ../src/msw/dde.cpp:1153
+msgid "a transaction failed."
+msgstr "Eine Transaktion ist gescheitert."
+
+#: ../src/common/accelcmn.cpp:184
+msgid "alt"
+msgstr "alt"
+
+#: ../src/msw/dde.cpp:1135
+msgid ""
+"an application initialized as APPCLASS_MONITOR has\n"
+"attempted to perform a DDE transaction,\n"
+"or an application initialized as APPCMD_CLIENTONLY has \n"
+"attempted to perform server transactions."
+msgstr ""
+"Eine Anwendung, die als ein 'APPCLASS_MONITOR' gestartet wurde, \n"
+"versuchte eine DDE-Transaktion auszuführen,\n"
+"oder eine Anwendung, die als ein 'APPCMD_CLIENTONLY' gestartet wurde, \n"
+"versuchte eine Server-Transaktion auszuführen."
+
+#: ../src/msw/dde.cpp:1159
+msgid "an internal call to the PostMessage function has failed. "
+msgstr "Ein interner Aufruf zur 'PostMessage'-Funktion ist gescheitert. "
+
+#: ../src/msw/dde.cpp:1168
+msgid "an internal error has occurred in the DDEML."
+msgstr "Ein interne Fehler ist im DDEML aufgetreten."
+
+#: ../src/msw/dde.cpp:1174
+msgid ""
+"an invalid transaction identifier was passed to a DDEML function.\n"
+"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n"
+"the transaction identifier for that callback is no longer valid."
+msgstr ""
+"Eine ungültige Transaktions-Identifizierung wurde an eine DDEML-Funktion "
+"übergeben.\n"
+"Sobald die Anwendung aus einem 'XTYP_XACT_COMPLETE'-Callback zurückgekehrt "
+"ist,\n"
+"ist die Transaktions-Identifizierung für dieses Callback nicht mehr gültig."
+
+#: ../src/common/zipstrm.cpp:1272
+msgid "assuming this is a multi-part zip concatenated"
+msgstr "Nehme mehrteiliges, konkateniertes Zip an."
+
+#: ../src/common/fileconf.cpp:1882
+#, c-format
+msgid "attempt to change immutable key '%s' ignored."
+msgstr ""
+"Versuch den unveränderlichen Schlüssel '%s' anzupassen wurde ignoriert."
+
+#: ../src/html/chm.cpp:329
+msgid "bad arguments to library function"
+msgstr "Falsche Argumente für die Bibliotheksfunktion"
+
+#: ../src/html/chm.cpp:341
+msgid "bad signature"
+msgstr "Falsche Unterschrift"
+
+#: ../src/common/zipstrm.cpp:1715
+msgid "bad zipfile offset to entry"
+msgstr "Falsches Offset zum Einsprung in der Zipdatei."
+
+#: ../src/common/ftp.cpp:405
+msgid "binary"
+msgstr "binär"
+
+#: ../src/common/fontcmn.cpp:978
+msgid "bold"
+msgstr "fett"
+
+#: ../src/os2/iniconf.cpp:463
+msgid "buffer is too small for Windows directory."
+msgstr "Puffer zu klein für Windows-Verzeichnis."
+
+#: ../src/msw/utils.cpp:1316
+#, c-format
+msgid "build %lu"
+msgstr "Erzeugungsversion %lu"
+
+#: ../src/common/ffile.cpp:79
+#, c-format
+msgid "can't close file '%s'"
+msgstr "Kann Datei '%s' nicht schließen"
+
+#: ../src/common/file.cpp:278
+#, c-format
+msgid "can't close file descriptor %d"
+msgstr "Kann Dateibeschreibung '%d' nicht schließen"
+
+#: ../src/common/file.cpp:604
+#, c-format
+msgid "can't commit changes to file '%s'"
+msgstr "Kann Änderungen in Datei '%s' nicht sichern"
+
+#: ../src/common/file.cpp:212
+#, c-format
+msgid "can't create file '%s'"
+msgstr "Kann Datei '%s' nicht anlegen"
+
+#: ../src/common/fileconf.cpp:1176
+#, c-format
+msgid "can't delete user configuration file '%s'"
+msgstr "Kann Konfigurationsdatei '%s' nicht löschen"
+
+#: ../src/common/file.cpp:511
+#, c-format
+msgid "can't determine if the end of file is reached on descriptor %d"
+msgstr "Kann auf Dateibeschreibung '%d' das Dateiende nicht Feststellen"
+
+#: ../src/msdos/utilsdos.cpp:310 ../src/msdos/utilsdos.cpp:475
+#, c-format
+msgid "can't execute '%s'"
+msgstr "Kann '%s' nicht ausführen"
+
+#: ../src/common/zipstrm.cpp:1490
+msgid "can't find central directory in zip"
+msgstr "Kann Zentralverzeichnis im Zip nicht finden."
+
+#: ../src/common/file.cpp:481
+#, c-format
+msgid "can't find length of file on file descriptor %d"
+msgstr "Kann auf Dateibeschreibung '%d' die Dateilänge nicht finden"
+
+#: ../src/msw/utils.cpp:373
+msgid "can't find user's HOME, using current directory."
+msgstr "Kann Benutzerverzeichnis nicht finden, verwende aktuelles Verzeichnis."
+
+#: ../src/common/file.cpp:382
+#, c-format
+msgid "can't flush file descriptor %d"
+msgstr "Kann auf die Dateibeschreibung '%d' nicht entladen"
+
+#: ../src/common/file.cpp:438 ../src/msw/wince/filefnwce.cpp:204
+#, c-format
+msgid "can't get seek position on file descriptor %d"
+msgstr "Kann auf die Dateibeschreibung %d nicht positionieren"
+
+#: ../src/common/fontmap.cpp:325
+msgid "can't load any font, aborting"
+msgstr "Kann keine Schriftarten mehr laden, Abbruch"
+
+#: ../src/common/file.cpp:264 ../src/common/ffile.cpp:63
+#, c-format
+msgid "can't open file '%s'"
+msgstr "Kann Datei '%s' nicht öffnen"
+
+#: ../src/common/fileconf.cpp:351
+#, c-format
+msgid "can't open global configuration file '%s'."
+msgstr "Kann globale Konfigurationsdatei '%s' nicht öffnen."
+
+#: ../src/common/fileconf.cpp:367
+#, c-format
+msgid "can't open user configuration file '%s'."
+msgstr "Kann Konfigurationsdatei '%s' nicht öffnen."
+
+#: ../src/common/fileconf.cpp:1017
+msgid "can't open user configuration file."
+msgstr "Kann Benutzer-Konfigurationsdatei nicht öffnen."
+
+#: ../src/common/zipstrm.cpp:527
+msgid "can't re-initialize zlib deflate stream"
+msgstr "Kann den zlib deflate-stream nicht reinitialisieren"
+
+#: ../src/common/zipstrm.cpp:552
+msgid "can't re-initialize zlib inflate stream"
+msgstr "Kann den zlib inflate-stream nicht reinitialisieren"
+
+#: ../src/common/file.cpp:334
+#, c-format
+msgid "can't read from file descriptor %d"
+msgstr "Kann Dateibeschreibung '%d' nicht lesen"
+
+#: ../src/common/file.cpp:599
+#, c-format
+msgid "can't remove file '%s'"
+msgstr "Kann Datei '%s' nicht löschen"
+
+#: ../src/common/file.cpp:616
+#, c-format
+msgid "can't remove temporary file '%s'"
+msgstr "Kann temporäre Datei '%s' nicht löschen"
+
+#: ../src/common/file.cpp:424 ../src/msw/wince/filefnwce.cpp:190
+#, c-format
+msgid "can't seek on file descriptor %d"
+msgstr "Kann auf die Dateibeschreibung '%d' nicht suchen"
+
+#: ../src/common/textfile.cpp:299
+#, c-format
+msgid "can't write buffer '%s' to disk."
+msgstr "Kann den Puffer '%s' nicht schreiben."
+
+#: ../src/common/file.cpp:350
+#, c-format
+msgid "can't write to file descriptor %d"
+msgstr "Kann Dateibeschreibung '%d' nicht schreiben"
+
+#: ../src/common/fileconf.cpp:1031
+msgid "can't write user configuration file."
+msgstr "Kann Benutzer-Konfigurationsdatei nicht schreiben."
+
+#: ../src/html/chm.cpp:345
+msgid "checksum error"
+msgstr "Prüfsummen-Fehler"
+
+#: ../src/common/tarstrm.cpp:820
+msgid "checksum failure reading tar header block"
+msgstr "Prüfsummenfehler beim Lesen der tar Kopfeintrages"
+
+#: ../src/richtext/richtextborderspage.cpp:280
+#: ../src/richtext/richtextborderspage.cpp:310
+#: ../src/richtext/richtextborderspage.cpp:340
+#: ../src/richtext/richtextborderspage.cpp:370
+#: ../src/richtext/richtextborderspage.cpp:424
+#: ../src/richtext/richtextborderspage.cpp:454
+#: ../src/richtext/richtextborderspage.cpp:484
+#: ../src/richtext/richtextborderspage.cpp:514
+#: ../src/richtext/richtextmarginspage.cpp:202
+#: ../src/richtext/richtextmarginspage.cpp:227
+#: ../src/richtext/richtextmarginspage.cpp:250
+#: ../src/richtext/richtextmarginspage.cpp:275
+#: ../src/richtext/richtextmarginspage.cpp:316
+#: ../src/richtext/richtextmarginspage.cpp:341
+#: ../src/richtext/richtextmarginspage.cpp:364
+#: ../src/richtext/richtextmarginspage.cpp:389
+#: ../src/richtext/richtextsizepage.cpp:339
+#: ../src/richtext/richtextsizepage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:400
+#: ../src/richtext/richtextsizepage.cpp:427
+#: ../src/richtext/richtextsizepage.cpp:454
+#: ../src/richtext/richtextsizepage.cpp:481
+#: ../src/richtext/richtextsizepage.cpp:555
+#: ../src/richtext/richtextsizepage.cpp:590
+#: ../src/richtext/richtextsizepage.cpp:625
+#: ../src/richtext/richtextsizepage.cpp:660
+msgid "cm"
+msgstr "cm"
+
+#: ../src/html/chm.cpp:347
+msgid "compression error"
+msgstr "Fehler beim Komprimieren"
+
+#: ../src/common/regex.cpp:239
+msgid "conversion to 8-bit encoding failed"
+msgstr "Umwandlung in 8-Bit-Kodierung fehlgeschlagen"
+
+#: ../src/common/accelcmn.cpp:182
+msgid "ctrl"
+msgstr "strg"
+
+#: ../src/common/cmdline.cpp:1323
+msgid "date"
+msgstr "Datum"
+
+#: ../src/html/chm.cpp:349
+msgid "decompression error"
+msgstr "Fehler beim Entpacken"
+
+#: ../src/richtext/richtextstyles.cpp:780 ../src/common/fmapbase.cpp:820
+msgid "default"
+msgstr "Standard"
+
+#: ../src/common/cmdline.cpp:1319
+msgid "double"
+msgstr "Doppelte Genauigkeit"
+
+#: ../src/common/debugrpt.cpp:543
+msgid "dump of the process state (binary)"
+msgstr "Dump des bearbeiteten Zustands (binär)"
+
+#: ../src/common/datetimefmt.cpp:1936
+msgid "eighteenth"
+msgstr "achtzehnte"
+
+#: ../src/common/datetimefmt.cpp:1926
+msgid "eighth"
+msgstr "achte"
+
+#: ../src/common/datetimefmt.cpp:1929
+msgid "eleventh"
+msgstr "elfte"
+
+#: ../src/common/fileconf.cpp:1868
+#, c-format
+msgid "entry '%s' appears more than once in group '%s'"
+msgstr "Eintrag '%s' erscheint in Gruppe '%s' mehrfach"
+
+#: ../src/html/chm.cpp:343
+msgid "error in data format"
+msgstr "Fehler im Datenformat"
+
+#: ../src/msdos/utilsdos.cpp:413
+#, c-format
+msgid "error opening '%s'"
+msgstr "Fehler beim Öffnen von '%s'"
+
+#: ../src/html/chm.cpp:331
+msgid "error opening file"
+msgstr "Fehler beim Öffnen der Datei"
+
+#: ../src/common/zipstrm.cpp:1576
+msgid "error reading zip central directory"
+msgstr "Fehler beim Lesen des Zentralverzeichnisses im Zip"
+
+#: ../src/common/zipstrm.cpp:1667
+msgid "error reading zip local header"
+msgstr "Fehler beim Lesen des lokalen Headers in Zipdatei"
+
+#: ../src/common/zipstrm.cpp:2396
+#, c-format
+msgid "error writing zip entry '%s': bad crc or length"
+msgstr ""
+"Fehler beim Schreiben von Zip-Eintrag '%s': Falsche Prüfsumme oder Länge"
+
+#: ../src/common/ffile.cpp:170
+#, c-format
+msgid "failed to flush the file '%s'"
+msgstr "Versuch, die Datei '%s' zu entladen, gescheitert"
+
+#: ../src/common/datetimefmt.cpp:1933
+msgid "fifteenth"
+msgstr "fünfzehnte"
+
+#: ../src/common/datetimefmt.cpp:1923
+msgid "fifth"
+msgstr "fünfte"
+
+#: ../src/common/fileconf.cpp:610
+#, c-format
+msgid "file '%s', line %d: '%s' ignored after group header."
+msgstr "Datei '%s', Zeile %d: '%s' hinter Gruppenkopf ignoriert."
+
+#: ../src/common/fileconf.cpp:639
+#, c-format
+msgid "file '%s', line %d: '=' expected."
+msgstr "Datei '%s', Zeile %d: '=' erwartet."
+
+#: ../src/common/fileconf.cpp:662
+#, c-format
+msgid "file '%s', line %d: key '%s' was first found at line %d."
+msgstr "Datei '%s', Zeile %d: Eintrag '%s' taucht erstmals in Zeile %d auf."
+
+#: ../src/common/fileconf.cpp:652
+#, c-format
+msgid "file '%s', line %d: value for immutable key '%s' ignored."
+msgstr ""
+"Datei '%s', Zeile %d: Wert für nicht-änderbaren Eintrag '%s' ignoriert."
+
+#: ../src/common/fileconf.cpp:574
+#, c-format
+msgid "file '%s': unexpected character %c at line %d."
+msgstr "Datei '%s': unerwartetes Zeichen %c in Zeile %d."
+
+#: ../src/richtext/richtextbuffer.cpp:8358
+msgid "files"
+msgstr "Dateien"
+
+#: ../src/common/datetimefmt.cpp:1919
+msgid "first"
+msgstr "erste"
+
+#: ../src/html/helpwnd.cpp:1265
+msgid "font size"
+msgstr "Schriftgröße:"
+
+#: ../src/common/datetimefmt.cpp:1932
+msgid "fourteenth"
+msgstr "vierzehnte"
+
+#: ../src/common/datetimefmt.cpp:1922
+msgid "fourth"
+msgstr "vierte"
+
+#: ../src/common/appbase.cpp:695
+msgid "generate verbose log messages"
+msgstr "ausführliche Log-Nachrichten erstellen"
+
+#: ../src/richtext/richtextbuffer.cpp:12212
+#: ../src/richtext/richtextbuffer.cpp:12322
+msgid "image"
+msgstr "Bild"
+
+#: ../src/common/tarstrm.cpp:796
+msgid "incomplete header block in tar"
+msgstr "unvollständiger Kopfeintrag in tar"
+
+#: ../src/common/xtixml.cpp:489
+msgid "incorrect event handler string, missing dot"
+msgstr "Event-Handler-Zeichenkette falsch, Punkt fehlt"
+
+#: ../src/common/tarstrm.cpp:1381
+msgid "incorrect size given for tar entry"
+msgstr "Nicht korrekte Größe für tar-Eintrag gegeben"
+
+#: ../src/common/tarstrm.cpp:993
+msgid "invalid data in extended tar header"
+msgstr "ungültige Daten in erweitertem tar-Kopfeintrag"
+
+#: ../src/generic/logg.cpp:1050
+msgid "invalid message box return value"
+msgstr "ungültiger 'message box'-Rückgabewert"
+
+#: ../src/common/zipstrm.cpp:1445
+msgid "invalid zip file"
+msgstr "Ungültige Zip-Datei"
+
+#: ../src/common/fontcmn.cpp:983
+msgid "italic"
+msgstr "kursiv"
+
+#: ../src/common/fontcmn.cpp:973
+msgid "light"
+msgstr "dünn"
+
+#: ../src/common/intl.cpp:293
+#, c-format
+msgid "locale '%s' cannot be set."
+msgstr "Lokale Umgebung '%s' kann nicht gesetzt werden."
+
+#: ../src/common/datetimefmt.cpp:2092
+msgid "midnight"
+msgstr "Mitternacht"
+
+#: ../src/common/datetimefmt.cpp:1937
+msgid "nineteenth"
+msgstr "neunzehnte"
+
+#: ../src/common/datetimefmt.cpp:1927
+msgid "ninth"
+msgstr "neunte"
+
+#: ../src/msw/dde.cpp:1119
+msgid "no DDE error."
+msgstr "kein DDE-Fehler."
+
+#: ../src/html/chm.cpp:327
+msgid "no error"
+msgstr "kein Fehler"
+
+#: ../src/dfb/fontmgr.cpp:174
+#, c-format
+msgid "no fonts found in %s, using builtin font"
+msgstr "Keine Schriftarten in %s, gefunden"
+
+#: ../src/html/helpdata.cpp:655
+msgid "noname"
+msgstr "namenlos"
+
+#: ../src/common/datetimefmt.cpp:2091
+msgid "noon"
+msgstr "mittags"
+
+#: ../src/richtext/richtextstyles.cpp:779
+msgid "normal"
+msgstr "Normal"
+
+#: ../src/gtk/print.cpp:1218 ../src/gtk/print.cpp:1323
+msgid "not implemented"
+msgstr "nicht ausgeführt"
+
+#: ../src/common/cmdline.cpp:1315
+msgid "num"
+msgstr "num"
+
+#: ../src/common/xtixml.cpp:259
+msgid "objects cannot have XML Text Nodes"
+msgstr "Objekte können keine XML-Text-Knoten haben"
+
+#: ../src/html/chm.cpp:339
+msgid "out of memory"
+msgstr "nicht genug Speicher"
+
+#: ../src/richtext/richtextsizepage.cpp:340
+#: ../src/richtext/richtextsizepage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:401
+#: ../src/richtext/richtextsizepage.cpp:428
+#: ../src/richtext/richtextsizepage.cpp:455
+#: ../src/richtext/richtextsizepage.cpp:482
+#: ../src/richtext/richtextsizepage.cpp:556
+#: ../src/richtext/richtextsizepage.cpp:591
+#: ../src/richtext/richtextsizepage.cpp:626
+#: ../src/richtext/richtextsizepage.cpp:661
+msgid "percent"
+msgstr "Prozent"
+
+#: ../src/common/debugrpt.cpp:519
+msgid "process context description"
+msgstr "Bearbeite Kontextbeschreibung"
+
+#: ../src/richtext/richtextfontpage.cpp:186
+#: ../src/richtext/richtextfontpage.cpp:189
+msgid "pt"
+msgstr "pt"
+
+#: ../src/richtext/richtextfontpage.cpp:187
+#: ../src/richtext/richtextborderspage.cpp:279
+#: ../src/richtext/richtextborderspage.cpp:281
+#: ../src/richtext/richtextborderspage.cpp:282
+#: ../src/richtext/richtextborderspage.cpp:309
+#: ../src/richtext/richtextborderspage.cpp:311
+#: ../src/richtext/richtextborderspage.cpp:312
+#: ../src/richtext/richtextborderspage.cpp:339
+#: ../src/richtext/richtextborderspage.cpp:341
+#: ../src/richtext/richtextborderspage.cpp:342
+#: ../src/richtext/richtextborderspage.cpp:369
+#: ../src/richtext/richtextborderspage.cpp:371
+#: ../src/richtext/richtextborderspage.cpp:372
+#: ../src/richtext/richtextborderspage.cpp:423
+#: ../src/richtext/richtextborderspage.cpp:425
+#: ../src/richtext/richtextborderspage.cpp:426
+#: ../src/richtext/richtextborderspage.cpp:453
+#: ../src/richtext/richtextborderspage.cpp:455
+#: ../src/richtext/richtextborderspage.cpp:456
+#: ../src/richtext/richtextborderspage.cpp:483
+#: ../src/richtext/richtextborderspage.cpp:485
+#: ../src/richtext/richtextborderspage.cpp:486
+#: ../src/richtext/richtextborderspage.cpp:513
+#: ../src/richtext/richtextborderspage.cpp:515
+#: ../src/richtext/richtextborderspage.cpp:516
+#: ../src/richtext/richtextmarginspage.cpp:201
+#: ../src/richtext/richtextmarginspage.cpp:203
+#: ../src/richtext/richtextmarginspage.cpp:204
+#: ../src/richtext/richtextmarginspage.cpp:226
+#: ../src/richtext/richtextmarginspage.cpp:228
+#: ../src/richtext/richtextmarginspage.cpp:229
+#: ../src/richtext/richtextmarginspage.cpp:249
+#: ../src/richtext/richtextmarginspage.cpp:251
+#: ../src/richtext/richtextmarginspage.cpp:252
+#: ../src/richtext/richtextmarginspage.cpp:274
+#: ../src/richtext/richtextmarginspage.cpp:276
+#: ../src/richtext/richtextmarginspage.cpp:277
+#: ../src/richtext/richtextmarginspage.cpp:315
+#: ../src/richtext/richtextmarginspage.cpp:317
+#: ../src/richtext/richtextmarginspage.cpp:318
+#: ../src/richtext/richtextmarginspage.cpp:340
+#: ../src/richtext/richtextmarginspage.cpp:342
+#: ../src/richtext/richtextmarginspage.cpp:343
+#: ../src/richtext/richtextmarginspage.cpp:363
+#: ../src/richtext/richtextmarginspage.cpp:365
+#: ../src/richtext/richtextmarginspage.cpp:366
+#: ../src/richtext/richtextmarginspage.cpp:388
+#: ../src/richtext/richtextmarginspage.cpp:390
+#: ../src/richtext/richtextmarginspage.cpp:391
+#: ../src/richtext/richtextsizepage.cpp:338
+#: ../src/richtext/richtextsizepage.cpp:341
+#: ../src/richtext/richtextsizepage.cpp:342
+#: ../src/richtext/richtextsizepage.cpp:372
+#: ../src/richtext/richtextsizepage.cpp:375
+#: ../src/richtext/richtextsizepage.cpp:376
+#: ../src/richtext/richtextsizepage.cpp:399
+#: ../src/richtext/richtextsizepage.cpp:402
+#: ../src/richtext/richtextsizepage.cpp:403
+#: ../src/richtext/richtextsizepage.cpp:426
+#: ../src/richtext/richtextsizepage.cpp:429
+#: ../src/richtext/richtextsizepage.cpp:430
+#: ../src/richtext/richtextsizepage.cpp:453
+#: ../src/richtext/richtextsizepage.cpp:456
+#: ../src/richtext/richtextsizepage.cpp:457
+#: ../src/richtext/richtextsizepage.cpp:480
+#: ../src/richtext/richtextsizepage.cpp:483
+#: ../src/richtext/richtextsizepage.cpp:484
+#: ../src/richtext/richtextsizepage.cpp:554
+#: ../src/richtext/richtextsizepage.cpp:557
+#: ../src/richtext/richtextsizepage.cpp:558
+#: ../src/richtext/richtextsizepage.cpp:589
+#: ../src/richtext/richtextsizepage.cpp:592
+#: ../src/richtext/richtextsizepage.cpp:593
+#: ../src/richtext/richtextsizepage.cpp:624
+#: ../src/richtext/richtextsizepage.cpp:627
+#: ../src/richtext/richtextsizepage.cpp:628
+#: ../src/richtext/richtextsizepage.cpp:659
+#: ../src/richtext/richtextsizepage.cpp:662
+#: ../src/richtext/richtextsizepage.cpp:663
+msgid "px"
+msgstr "px"
+
+#: ../src/common/accelcmn.cpp:188
+msgid "rawctrl"
+msgstr "strg"
+
+#: ../src/html/chm.cpp:333
+msgid "read error"
+msgstr "Lesefehler"
+
+#: ../src/common/zipstrm.cpp:1882
+#, c-format
+msgid "reading zip stream (entry %s): bad crc"
+msgstr "Beim Lesen von Zipstream (Eintrag %s): Falsche Prüfsumme"
+
+#: ../src/common/zipstrm.cpp:1877
+#, c-format
+msgid "reading zip stream (entry %s): bad length"
+msgstr "Beim Lesen von Zipstream (Eintrag %s): Falsche Länge"
+
+#: ../src/msw/dde.cpp:1162
+msgid "reentrancy problem."
+msgstr "Probleme beim Wiedereintreten."
+
+#: ../src/common/datetimefmt.cpp:1920
+msgid "second"
+msgstr "zweite"
+
+#: ../src/html/chm.cpp:337
+msgid "seek error"
+msgstr "Seek-Fehler"
+
+#: ../src/common/datetimefmt.cpp:1935
+msgid "seventeenth"
+msgstr "siebzehnte"
+
+#: ../src/common/datetimefmt.cpp:1925
+msgid "seventh"
+msgstr "siebte"
+
+#: ../src/common/accelcmn.cpp:186
+msgid "shift"
+msgstr "Umschalt"
+
+#: ../src/common/appbase.cpp:685
+msgid "show this help message"
+msgstr "Zeige diesen Hilfstext"
+
+#: ../src/common/datetimefmt.cpp:1934
+msgid "sixteenth"
+msgstr "sechzehnte"
+
+#: ../src/common/datetimefmt.cpp:1924
+msgid "sixth"
+msgstr "sechste"
+
+#: ../src/common/appcmn.cpp:227
+msgid "specify display mode to use (e.g. 640x480-16)"
+msgstr "Geben Sie eine zu verwendende Bildschirmauflösung ein (Z.B. 640x48-16)"
+
+#: ../src/common/appcmn.cpp:213
+msgid "specify the theme to use"
+msgstr "geben Sie das zu benutzende Thema an"
+
+#: ../src/richtext/richtextbuffer.cpp:8876
+msgid "standard/circle"
+msgstr "Standard/Kreis"
+
+#: ../src/richtext/richtextbuffer.cpp:8877
+msgid "standard/circle-outline"
+msgstr "Standard/ Kreisumriss"
+
+#: ../src/richtext/richtextbuffer.cpp:8879
+msgid "standard/diamond"
+msgstr "Standard/ Raute"
+
+#: ../src/richtext/richtextbuffer.cpp:8878
+msgid "standard/square"
+msgstr "Standard/Quadrat"
+
+#: ../src/richtext/richtextbuffer.cpp:8880
+msgid "standard/triangle"
+msgstr "Standard/ Dreieck"
+
+#: ../src/common/zipstrm.cpp:1782
+msgid "stored file length not in Zip header"
+msgstr "Gespeicherte Dateilänge nicht in Zip-Header"
+
+#: ../src/common/cmdline.cpp:1311
+msgid "str"
+msgstr "str"
+
+#: ../src/common/fontcmn.cpp:794 ../src/common/fontcmn.cpp:969
+msgid "strikethrough"
+msgstr "Durchstreichen"
+
+#: ../src/common/tarstrm.cpp:1003 ../src/common/tarstrm.cpp:1025
+#: ../src/common/tarstrm.cpp:1507 ../src/common/tarstrm.cpp:1529
+msgid "tar entry not open"
+msgstr "tar Eintrag nicht offen"
+
+#: ../src/common/datetimefmt.cpp:1928
+msgid "tenth"
+msgstr "zehnte"
+
+#: ../src/msw/dde.cpp:1126
+msgid "the response to the transaction caused the DDE_FBUSY bit to be set."
+msgstr "das Ergebnis zur Transaktion hat das 'DDE_FBUSY'-Bit gesetzt."
+
+#: ../src/common/datetimefmt.cpp:1921
+msgid "third"
+msgstr "dritte"
+
+#: ../src/common/datetimefmt.cpp:1931
+msgid "thirteenth"
+msgstr "dreizehnte"
+
+#: ../src/common/datetimefmt.cpp:1725
+msgid "today"
+msgstr "heute"
+
+#: ../src/common/datetimefmt.cpp:1727
+msgid "tomorrow"
+msgstr "morgen"
+
+#: ../src/common/fileconf.cpp:1979
+#, c-format
+msgid "trailing backslash ignored in '%s'"
+msgstr "Abschließenden Gegenschrägstrich in '%s' ignoriert"
+
+#: ../src/gtk/aboutdlg.cpp:218
+msgid "translator-credits"
+msgstr "Übersetzer"
+
+#: ../src/common/datetimefmt.cpp:1930
+msgid "twelfth"
+msgstr "zwölfte"
+
+#: ../src/common/datetimefmt.cpp:1938
+msgid "twentieth"
+msgstr "zwanzigste"
+
+#: ../src/common/fontcmn.cpp:789 ../src/common/fontcmn.cpp:965
+msgid "underlined"
+msgstr "unterstrichen"
+
+#: ../src/common/fileconf.cpp:2014
+#, c-format
+msgid "unexpected \" at position %d in '%s'."
+msgstr "unerwartetes \" an Position %d in '%s'."
+
+#: ../src/common/tarstrm.cpp:1045
+msgid "unexpected end of file"
+msgstr "Unerwartetes Ende der Datei"
+
+#: ../src/generic/progdlgg.cpp:399 ../src/common/tarstrm.cpp:371
+#: ../src/common/tarstrm.cpp:394 ../src/common/tarstrm.cpp:425
+msgid "unknown"
+msgstr "unbekannt"
+
+#: ../src/common/xtixml.cpp:253
+#, c-format
+msgid "unknown class %s"
+msgstr "Unbekannte Klasse %s"
+
+#: ../src/common/regex.cpp:261 ../src/html/chm.cpp:351
+msgid "unknown error"
+msgstr "unbekannter Fehler"
+
+#: ../src/msw/dialup.cpp:490
+#, c-format
+msgid "unknown error (error code %08x)."
+msgstr "unbekannter Fehler (Fehlercode %08x)."
+
+#: ../src/msw/wince/filefnwce.cpp:172
+msgid "unknown seek origin"
+msgstr "Unbekannte Suchposition"
+
+#: ../src/common/fmapbase.cpp:834
+#, c-format
+msgid "unknown-%d"
+msgstr "unbekannt-%d"
+
+#: ../src/common/docview.cpp:507
+msgid "unnamed"
+msgstr "Unbenannt"
+
+#: ../src/common/docview.cpp:1606
+#, c-format
+msgid "unnamed%d"
+msgstr "Unbenannt%d"
+
+#: ../src/common/zipstrm.cpp:1796 ../src/common/zipstrm.cpp:2184
+msgid "unsupported Zip compression method"
+msgstr "Nicht unterstütztes Zip-Kompressionsformat."
+
+#: ../src/common/translation.cpp:1883
+#, c-format
+msgid "using catalog '%s' from '%s'."
+msgstr "Verwende Nachrichtenkatalog '%s' von '%s'."
+
+#: ../src/html/chm.cpp:335
+msgid "write error"
+msgstr "Schreibfehler"
+
+#: ../src/common/time.cpp:318
+msgid "wxGetTimeOfDay failed."
+msgstr "wxGetTimeOfDay gescheitert."
+
+#: ../src/gtk/print.cpp:987
+msgid "wxPrintout::GetPageInfo gives a null maxPage."
+msgstr "wxPrintout::GetPageInfo liefert eine NULL maximale Seitengröße."
+
+#: ../src/osx/carbon/dataview.cpp:1303
+msgid "wxWidget control pointer is not a data view pointer"
+msgstr ""
+"Zeiger auf ein wxwWidget Kontrollelement ist kein Zeiger auf eine "
+"Datenanzeige"
+
+#: ../src/osx/carbon/dataview.cpp:907
+msgid "wxWidget's control not initialized."
+msgstr "wxWidget Kontrollelement nicht initialisiert."
+
+#: ../src/motif/app.cpp:245
+#, c-format
+msgid "wxWidgets could not open display for '%s': exiting."
+msgstr "wxWidgets konnte 'open display' nicht ausführen für '%s': Abbruch."
+
+#: ../src/x11/app.cpp:164
+msgid "wxWidgets could not open display. Exiting."
+msgstr "wxWidgets konnte Display nicht öffnen. Abbruch."
+
+#: ../src/richtext/richtextsymboldlg.cpp:434
+msgid "xxxx"
+msgstr "xxxx"
+
+#: ../src/common/datetimefmt.cpp:1726
+msgid "yesterday"
+msgstr "Gestern"
+
+#: ../src/common/zstream.cpp:251 ../src/common/zstream.cpp:426
+#, c-format
+msgid "zlib error %d"
+msgstr "zlib-Fehler %d"
+
+#: ../src/richtext/richtextliststylepage.cpp:496
+#: ../src/richtext/richtextbulletspage.cpp:301
+msgid "~"
+msgstr "~"
+
+#~ msgid "Print preview"
+#~ msgstr "Druck&vorschau"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "1"
+#~ msgstr "1"
+
+#~ msgid "10"
+#~ msgstr "10"
+
+#~ msgid "3"
+#~ msgstr "3"
+
+#~ msgid "4"
+#~ msgstr "4"
+
+#~ msgid "5"
+#~ msgstr "5"
+
+#~ msgid "6"
+#~ msgstr "6"
+
+#~ msgid "7"
+#~ msgstr "7"
+
+#~ msgid "8"
+#~ msgstr "8"
+
+#~ msgid "9"
+#~ msgstr "9"
+
+#~ msgid "Can't monitor non-existent path \"%s\" for changes."
+#~ msgstr ""
+#~ "Der nicht vorhandene Pfad \"%s\" kann nicht nach Änderungen durchsucht "
+#~ "werden."
+
+#~ msgid "File system containing watched object was unmounted"
+#~ msgstr ""
+#~ "Das Dateisystem das die beobachteten Objekte enthält wurde ausgehängt"
+
+#~ msgid "&Preview..."
+#~ msgstr "& Vorschau..."
+
+#~ msgid "Enable vertical offset."
+#~ msgstr "Vertikalen Absatz einschalten."
+
+#~ msgid "Preview..."
+#~ msgstr "Vorschau..."
+
+#~ msgid "The vertical offset relative to the paragraph."
+#~ msgstr "Der vertikale Abstand relativ zum Absatz."
+
+#~ msgid "Units for the object offset."
+#~ msgstr "Einheiten für den Objektabsatz."
+
+#~ msgid "Vertical &Offset:"
+#~ msgstr "Vertikal &Absatz:"
+
+#~ msgid "&Save..."
+#~ msgstr "&Speichern..."
+
+#~ msgid "About "
+#~ msgstr "Über "
+
+#~ msgid "All files (*.*)|*"
+#~ msgstr "Alle Dateien (*.\")|*"
+
+#~ msgid "Cannot initialize SciTech MGL!"
+#~ msgstr "Kann SciTech MGL nicht initialisieren!"
+
+#~ msgid "Cannot initialize display."
+#~ msgstr "Kann das Display nicht initialisieren."
+
+#~ msgid "Cannot start thread: error writing TLS"
+#~ msgstr "Kann Thread nicht starten: Fehler beim TLS-Schreiben"
+
+#~ msgid "Close\tAlt-F4"
+#~ msgstr "Schließen\tAlt-F4"
+
+#~ msgid "Couldn't create cursor."
+#~ msgstr "Konnte Cursor nicht erzeugen."
+
+#~ msgid "Directory '%s' doesn't exist!"
+#~ msgstr "Verzeichnis '%s' existiert nicht."
+
+#~ msgid "File %s does not exist."
+#~ msgstr "Datei '%s' existiert nicht."
+
+#~ msgid "Mode %ix%i-%i not available."
+#~ msgstr "Darstellung %is%i-%i ist nicht vorhanden"
+
+#~ msgid "Paper Size"
+#~ msgstr "Papierformat"
+
+#~ msgid "\t%s: %s\n"
+#~ msgstr "\t%s: %s\n"
+
+#~ msgid " Couldn't create the UnicodeConverter"
+#~ msgstr "Konnte den UnicodeConverter nicht erzeugen"
+
+#~ msgid "#define %s must be an integer."
+#~ msgstr "#define %s muss eine Ganzzahl sein"
+
+#~ msgid "%.*f GB"
+#~ msgstr "%.*f GB"
+
+#~ msgid "%.*f MB"
+#~ msgstr "%.*f MB"
+
+#~ msgid "%.*f TB"
+#~ msgstr "%.*f TB"
+
+#~ msgid "%.*f kB"
+#~ msgstr "%.*f kB"
+
+#~ msgid "%s B"
+#~ msgstr "%s B"
+
+#~ msgid "%s not a bitmap resource specification."
+#~ msgstr "%s gibt keine Quelle für eine Bitmap-Grafik an."
+
+#~ msgid "%s not an icon resource specification."
+#~ msgstr "%s gibt keine Quelle für eine Icon-Grafik an."
+
+#~ msgid "%s: ill-formed resource file syntax."
+#~ msgstr "%s: unkorrekte Syntax der Ressourcendatei."
+
+#~ msgid "&Goto..."
+#~ msgstr "&Gehe zu ..."
+
+#~ msgid "&Open"
+#~ msgstr "&Öffnen"
+
+#~ msgid "&Print"
+#~ msgstr "&Drucken"
+
+#~ msgid ""
+#~ ", expected static, #include or #define\n"
+#~ "while parsing resource."
+#~ msgstr ""
+#~ ", Erwartete static, #include or #define\n"
+#~ "beim Parsen der Ressource."
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">>|"
+#~ msgstr ">>|"
+
+#~ msgid "Archive doesnt contain #SYSTEM file"
+#~ msgstr "Archiv enthält keine Datei #SYSTEM"
+
+#~ msgid "BIG5"
+#~ msgstr "BIG5"
+
+#~ msgid "Bitmap resource specification %s not found."
+#~ msgstr "Ressourcenspezifikation %s für Bitmap nicht gefunden."
+
+#~ msgid "Can't check image format of file '%s': file does not exist."
+#~ msgstr ""
+#~ "Kann Bildformat nicht überprüfen bei Datei '%s': Datei nicht vorhanden."
+
+#~ msgid "Can't load image from file '%s': file does not exist."
+#~ msgstr "Kann Bild aus Datei '%s' nicht laden: Datei ist nicht vorhanden."
+
+#~ msgid "Cannot convert dialog units: dialog unknown."
+#~ msgstr "Kann Dialog-Einheiten nicht konvertieren: Dialog unbekannt."
+
+#~ msgid "Cannot convert from the charset '%s'!"
+#~ msgstr "Kann nicht von Kodierung (%s) konvertieren"
+
+#~ msgid "Cannot find container for unknown control '%s'."
+#~ msgstr "Kann keinen Container für unbekanntes Steuerelement '%s' finden."
+
+#~ msgid "Cannot find font node '%s'."
+#~ msgstr "Kann keinen Font-Knoten '%s' finden."
+
+#~ msgid "Cannot open file '%s'."
+#~ msgstr "Konnte Datei '%s' nicht öffnen"
+
+#~ msgid "Cannot parse coordinates from '%s'."
+#~ msgstr "Kann die Koordinaten nicht aus '%s' lesen."
+
+#~ msgid "Cannot parse dimension from '%s'."
+#~ msgstr "Kann die Dimensionen nicht aus '%s' lesen."
+
+#~ msgid "Cant create the thread event queue"
+#~ msgstr "Kann Ereignis-Warteschlange des Threads nicht erzeugen"
+
+#~ msgid "Click to cancel this window."
+#~ msgstr "Klicken um dieses Fenster zu schließen."
+
+#~ msgid "Click to confirm your selection."
+#~ msgstr "Klicken um die Auswahl zu bestätigen."
+
+#~ msgid "Closes the dialog without inserting a symbol."
+#~ msgstr "Schließt das Dokument ohne ein Symbol einzufügen."
+
+#~ msgid ""
+#~ "Could not resolve control class or id '%s'. Use (non-zero) integer "
+#~ "instead\n"
+#~ " or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "Konnte Steuerelement-Klasse oder -Kennziffer '%s' nicht auflösen.\n"
+#~ "Ganzzahl (ungleich Null) verwenden, oder #define angeben (siehe Handbuch "
+#~ "bei Problemen)"
+
+#~ msgid ""
+#~ "Could not resolve menu id '%s'. Use (non-zero) integer instead\n"
+#~ "or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "Konnte Menü-Id '%s' nicht auflösen. Benutzen Sie stattdessen Integer "
+#~ "(ungleich Null)\n"
+#~ "oder ein #define (s.a. Handbuch für mögliche Probleme damit)"
+
+#~ msgid "Could not unlock mutex"
+#~ msgstr "Konnte Mutex nicht freigeben"
+
+#~ msgid "Couldn't end the context on the overlay window"
+#~ msgstr "Konnte den Kontext auf dem überlagerten Fenster nicht beenden."
+
+#~ msgid "Expected '*' while parsing resource."
+#~ msgstr "Erwartete '*' beim Parsen der Ressource."
+
+#~ msgid "Expected '=' while parsing resource."
+#~ msgstr "Erwartete '=' beim Parsen der Ressource."
+
+#~ msgid "Expected 'char' while parsing resource."
+#~ msgstr "Erwartete 'char' beim Parsen der Ressource."
+
+#~ msgid "Failed to %s dialup connection: %s"
+#~ msgstr "Fehlerhafte %s DFÜ-Verbindung: %s"
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "Konnte XBM-Ressource %s nicht finden.\n"
+#~ "Vergessen wxResourceLoadBitmapData zu benutzen?"
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadIconData?"
+#~ msgstr ""
+#~ "Konnte XBM-Ressource %s nicht finden.\n"
+#~ "Vergessen wxResourceLoadIconData zu benutzen?"
+
+#~ msgid ""
+#~ "Failed to find XPM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "Konnte XPM-Ressource %s nicht finden.\n"
+#~ "Vergessen wxResourceLoadBitmapData zu benutzen?"
+
+#~ msgid "Failed to get clipboard data."
+#~ msgstr "Konnte Daten nicht aus der Zwischenablage holen."
+
+#~ msgid "Failed to load shared library '%s' Error '%s'"
+#~ msgstr "Laden der dynamischen Bibliothek '%s' gescheitert: Fehler '%s'"
+
+#~ msgid "Failed to register OpenGL window class."
+#~ msgstr "Konnte OpenGL Fensterklasse nicht registrieren."
+
+#~ msgid "Fatal error"
+#~ msgstr "Nicht-behebbarer Fehler"
+
+#~ msgid "Fatal error: "
+#~ msgstr "Nicht-behebbarer Fehler: "
+
+#~ msgid "Found "
+#~ msgstr "Gefunden "
+
+#~ msgid "GB-2312"
+#~ msgstr "GB-2312"
+
+#~ msgid "Goto Page"
+#~ msgstr "Gehe zur Seite"
+
+#~ msgid ""
+#~ "HTML pagination algorithm generated more than the allowed maximum number "
+#~ "of pages and it can't continue any longer!"
+#~ msgstr ""
+#~ "Der Algorithmus zur HTML-Seitengenerierung hat mehr als die maximal "
+#~ "erlaubten Seiten erzeugt und kann nicht fortfahren!"
+
+#~ msgid "I64"
+#~ msgstr "I64"
+
+#~ msgid "Icon resource specification %s not found."
+#~ msgstr "Ressourcenspezifikation %s des Icons nicht gefunden."
+
+#~ msgid "Ill-formed resource file syntax."
+#~ msgstr "Nicht wohlgeformte Syntax für Ressourcendatei."
+
+#~ msgid "Inserts the chosen symbol."
+#~ msgstr "Fügt das ausgewählte Symbol ein"
+
+#~ msgid "Internal error, illegal wxCustomTypeInfo"
+#~ msgstr "interner Fehler (ungültige wxCustomTypeinfo)"
+
+#~ msgid "Invalid XRC resource '%s': doesn't have root node 'resource'."
+#~ msgstr "Ungültige XRC-Ressource '%s': Kein Wurzel-Knoten 'resource'."
+
+#~ msgid "Long Conversions not supported"
+#~ msgstr "Umwandlung in long wird nicht unterstützt"
+
+#~ msgid "No XPM icon facility available!"
+#~ msgstr "Keine Möglichkeit mit XPM-Icons umzugehen!"
+
+#~ msgid "No handler found for XML node '%s', class '%s'!"
+#~ msgstr "XML-Knoten '%s', Klasse '%s' kann nicht bearbeitet werden!\""
+
+#~ msgid "No image handler for type %ld defined."
+#~ msgstr "Kein Bild-Handler für Typ %ld definiert."
+
+#~ msgid "Option '%s' requires a value, '=' expected."
+#~ msgstr "Option '%s' erwartet einen Wert, '=' erwartet."
+
+#~ msgid "Passing a already registered object to SetObjectName"
+#~ msgstr "Ein bereits registriertes Objekt wurde an SetObjectname übergeben"
+
+#~ msgid "Program aborted."
+#~ msgstr "Programm abgebrochen."
+
+#~ msgid "Referenced object node with ref=\"%s\" not found!"
+#~ msgstr "Der angesprochene Objektknoten mit ref=\"%s\" wurde nicht gefunden!"
+
+#~ msgid "Resource files must have same version number!"
+#~ msgstr "Ressourcen-Datei muss die gleiche Versionsnummer haben!"
+
+#~ msgid "SHIFT-JIS"
+#~ msgstr "Shift-JIS"
+
+#~ msgid "Select a file"
+#~ msgstr "Datei wählen"
+
+#~ msgid "Select all"
+#~ msgstr "Alles auswählen"
+
+#~ msgid "Sorry, could not open this file for saving."
+#~ msgstr "Bedauere, diese Datei konnte zum Speichern nicht geöffnet werden."
+
+#~ msgid "Sorry, could not save this file."
+#~ msgstr "Bedauere, diese Datei konnte nicht gespeichert werden."
+
+#~ msgid ""
+#~ "Sorry, docking is not supported for ports other than wxMSW, wxMac and "
+#~ "wxGTK"
+#~ msgstr ""
+#~ "Entschuldigung, Andocken wird nicht unterstützt für Portierungen außer "
+#~ "wxMSW, wxMac und wxGTK"
+
+#~ msgid "Sorry, print preview needs a printer to be installed."
+#~ msgstr ""
+#~ "Tut mir leid: Die Druck-Vorschau benötigt einen installierten Drucker"
+
+#~ msgid "Status: "
+#~ msgstr "Status: "
+
+#~ msgid ""
+#~ "Streaming delegates for not already streamed objects not yet supported"
+#~ msgstr ""
+#~ "Streaming delegates sind noch nicht unterstützt, wenn es sich nicht "
+#~ "bereits um streaming objects handelt"
+
+#~ msgid "String conversions not supported"
+#~ msgstr "Umwandlung in Zeichenkette wird nicht unterstützt"
+
+#~ msgid "Subclass '%s' not found for resource '%s', not subclassing!"
+#~ msgstr ""
+#~ "Unterklasse '%s' für Ressource '%s' nicht gefunden, keine Unterklasse "
+#~ "erstellt!"
+
+#~ msgid "TIFF library error."
+#~ msgstr "Fehler in TIFF-Bibliothek."
+
+#~ msgid "TIFF library warning."
+#~ msgstr "Warnung in TIFF-Bibliothek."
+
+#~ msgid ""
+#~ "The file '%s' couldn't be opened.\n"
+#~ "It has been removed from the most recently used files list."
+#~ msgstr ""
+#~ "Die Datei '%s' konnte nicht geöffnet werden.\n"
+#~ "Sie wurde aus der Liste kürzlich verwendeter Dateien entfernt."
+
+#~ msgid "The path '%s' contains too many \"..\"!"
+#~ msgstr "Das Verzeichnis '%s' enthält zu viele \"..\"."
+
+#~ msgid "Trying to solve a NULL hostname: giving up"
+#~ msgstr "Auflösen eines NULL-Hostnamens fehlgeschlagen"
+
+#~ msgid "Unexpected end of file while parsing resource."
+#~ msgstr "Unerwartetes Dateiende beim Parsen der Ressource."
+
+#~ msgid "Unknown style flag "
+#~ msgstr "Unbekanntes Stil-Flag "
+
+#~ msgid "Unrecognized style %s while parsing resource."
+#~ msgstr "Unbekannter Stil %s beim Parsen der Ressource."
+
+#~ msgid "Version %s"
+#~ msgstr "Version %s"
+
+#~ msgid "Video Output"
+#~ msgstr "Video-Ausgabe"
+
+#~ msgid "Warning"
+#~ msgstr "Warnung"
+
+#~ msgid "Warning: attempt to remove HTML tag handler from empty stack."
+#~ msgstr ""
+#~ "Warnung: Es wurde versucht, einen 'HTML-Tag-Handler' von einem leeren "
+#~ "Stack zu entfernen."
+
+#~ msgid "Windows 2000 (build %lu"
+#~ msgstr "Windows 2000 (build %lu"
+
+#~ msgid "XRC resource '%s' (class '%s') not found!"
+#~ msgstr "XRC-Ressource '%s' (Klasse '%s') nicht gefunden!"
+
+#~ msgid "XRC resource: Cannot create animation from '%s'."
+#~ msgstr "XRC-Ressource: Kann aus '%s' keine Animation erstellen."
+
+#~ msgid "XRC resource: Cannot create bitmap from '%s'."
+#~ msgstr "XRC-Ressource: Kann aus '%s' keine Bitmap erstellen."
+
+#~ msgid "XRC resource: Incorrect colour specification '%s' for property '%s'."
+#~ msgstr "XRC-Ressource: Falsche Farb-Angabe '%s' für Eigenschaft '%s'."
+
+#~ msgid "[EMPTY]"
+#~ msgstr "[leer]"
+
+#~ msgid "catalog file for domain '%s' not found."
+#~ msgstr "Nachrichtenkatalog für Sprachbereich '%s' nicht gefunden."
+
+#~ msgid "delegate has no type info"
+#~ msgstr "Delegate hat keine Typ-Info"
+
+#~ msgid "encoding %i"
+#~ msgstr "Kodierung %i"
+
+#~ msgid "establish"
+#~ msgstr "Verbunden"
+
+#~ msgid "initiate"
+#~ msgstr "einleiten"
+
+#~ msgid "invalid eof() return value."
+#~ msgstr "ungültiger 'eof()'-Rückgabewert."
+
+#~ msgid "looking for catalog '%s' in path '%s'."
+#~ msgstr "Suche Nachrichtenkatalog '%s' in Pfad '%s'."
+
+#~ msgid "unknown line terminator"
+#~ msgstr "Unbekanntes Zeilenende"
+
+#~ msgid "writing"
+#~ msgstr "Schreiben"
+
+#~ msgid "wxRichTextBulletsPage"
+#~ msgstr "wxRichTextBulletsPage"
+
+#~ msgid "wxRichTextFontPage"
+#~ msgstr "wxRichTextFontPage"
+
+#~ msgid "wxRichTextListStylePage"
+#~ msgstr "wxRichTextListStylePage"
+
+#~ msgid "wxRichTextStylePage"
+#~ msgstr "wxRichTextStylePage"
+
+#~ msgid "wxSocket: invalid signature in ReadMsg."
+#~ msgstr "wxSocket: ungültige Signatur in ReadMsg."
+
+#~ msgid "wxSocket: unknown event!."
+#~ msgstr "wxSocket: unbekanntes Ereignis!."
+
+#~ msgid "|<<"
+#~ msgstr "|<<"
diff --git a/cadxcore/lang/el/cadxcore.mo b/cadxcore/lang/el/cadxcore.mo
new file mode 100644
index 0000000..eff23a1
Binary files /dev/null and b/cadxcore/lang/el/cadxcore.mo differ
diff --git a/cadxcore/lang/el/cadxcore.po b/cadxcore/lang/el/cadxcore.po
new file mode 100644
index 0000000..4686625
--- /dev/null
+++ b/cadxcore/lang/el/cadxcore.po
@@ -0,0 +1,6517 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL at ADDRESS>\n"
+"POT-Creation-Date: 2014-06-11 15:48+0100\n"
+"PO-Revision-Date: 2014-06-11 15:49+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Ελληνικά, Σύγχρονα <opensuse-translation-el at opensuse.org>\n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: ..\\..\n"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Red Vessels"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Metal"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Green"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "GE Color"
+msgstr "Χρώμα"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PET"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "P-Value"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr ""
+
+#: ..\../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#: ..\../api/dicom/idicomconformance.cpp:214
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "GIL/DICOM/Conformance"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid "Unable to add supported transfer syntax "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid " to SOP Class "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid "Unable to add supported SOP Class "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " to Modality "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "Slice"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "of"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "Volume"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:110
+msgid "Image without metric information"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:119
+msgid "Slice thickness"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:127
+msgid "Slice location"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:139
+msgid "Scale"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:147
+msgid "Right"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:149
+msgid "Left"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:219
+msgid "Position:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:272
+msgid "Value:"
+msgstr ""
+
+#: ..\../api/iexception.cpp:52
+msgid "Exception in component"
+msgstr ""
+
+#: ..\../api/initwx.cpp:439
+msgid "Initializing environment ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:446 ..\../api/initwx.cpp:447 ..\../api/initwx.cpp:448
+#: ..\../api/initwx.cpp:449 ..\../api/initwx.cpp:450 ..\../api/initwx.cpp:451
+#: ..\../api/initwx.cpp:452 ..\../api/initwx.cpp:453
+msgid "Ginkgo CADx restrictions"
+msgstr ""
+
+#: ..\../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr ""
+
+#: ..\../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr ""
+
+#: ..\../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr ""
+
+#: ..\../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr ""
+
+#: ..\../api/initwx.cpp:451
+msgid "Export images"
+msgstr ""
+
+#: ..\../api/initwx.cpp:452
+#, fuzzy
+msgid "Acquire DICOM files"
+msgstr "όλα τα αρχεία"
+
+#: ..\../api/initwx.cpp:453
+msgid "Import files to DICOM format"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "Online manual"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "URL of manual"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "Online support"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "URL of online support"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "http://ginkgo-cadx.com/"
+msgstr ""
+
+#: ..\../api/initwx.cpp:460 ..\../api/initwx.cpp:461
+msgid "Program Updates"
+msgstr ""
+
+#: ..\../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr ""
+
+#: ..\../api/initwx.cpp:461
+msgid "Update period (days)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:462
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr ""
+
+#: ..\../api/initwx.cpp:462
+msgid "Setup Security"
+msgstr ""
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup"
+msgstr ""
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup default value"
+msgstr ""
+
+#: ..\../api/initwx.cpp:465 ..\../api/initwx.cpp:466
+#: ..\../main/gui/history3/historypanel3.cpp:328
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr ""
+
+#: ..\../api/initwx.cpp:465
+msgid "Settings menu"
+msgstr ""
+
+#: ..\../api/initwx.cpp:466
+msgid "License menu"
+msgstr ""
+
+#: ..\../api/initwx.cpp:467 ..\../api/initwx.cpp:468 ..\../api/initwx.cpp:469
+#: ..\../api/initwx.cpp:470 ..\../api/initwx.cpp:471 ..\../api/initwx.cpp:472
+#: ..\../api/initwx.cpp:473 ..\../api/initwx.cpp:474
+msgid "PACS Limits"
+msgstr ""
+
+#: ..\../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr ""
+
+#: ..\../api/initwx.cpp:468
+msgid "Upload images to a PACS server"
+msgstr ""
+
+#: ..\../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr ""
+
+#: ..\../api/initwx.cpp:470
+msgid "Enable remote PACS configuration"
+msgstr ""
+
+#: ..\../api/initwx.cpp:471
+msgid "Enable TLS configuration"
+msgstr ""
+
+#: ..\../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr ""
+
+#: ..\../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr ""
+
+#: ..\../api/initwx.cpp:475 ..\../api/initwx.cpp:476 ..\../api/initwx.cpp:477
+#: ..\../api/initwx.cpp:478 ..\../api/initwx.cpp:479 ..\../api/initwx.cpp:480
+msgid "Import"
+msgstr ""
+
+#: ..\../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:476
+msgid "Show accession number input"
+msgstr ""
+
+#: ..\../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483 ..\../api/initwx.cpp:484 ..\../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:485
+msgid "Default ORU template"
+msgstr ""
+
+#: ..\../api/initwx.cpp:488 ..\../api/initwx.cpp:489 ..\../api/initwx.cpp:491
+#: ..\../api/initwx.cpp:493 ..\../api/initwx.cpp:494 ..\../api/initwx.cpp:495
+#: ..\../api/initwx.cpp:496 ..\../api/initwx.cpp:498
+msgid "Style"
+msgstr ""
+
+#: ..\../api/initwx.cpp:503
+#, c-format
+msgid "Download %s images"
+msgstr ""
+
+#: ..\../api/initwx.cpp:504 ..\../api/initwx.cpp:508
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+msgid "PACS"
+msgstr ""
+
+#: ..\../api/initwx.cpp:507
+#, fuzzy
+msgid "Download all modalities"
+msgstr "όλα τα αρχεία"
+
+#: ..\../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr ""
+
+#: ..\../api/initwx.cpp:510
+msgid "Enable shaders"
+msgstr ""
+
+#: ..\../api/initwx.cpp:513
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+msgid "Ginkgo Cloud"
+msgstr ""
+
+#: ..\../api/initwx.cpp:513
+msgid "Download from Ginkgo Cloud"
+msgstr ""
+
+#: ..\../api/initwx.cpp:560
+msgid "Tools loading base ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:566
+msgid "Loading plugins ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:580
+msgid "Unable to start GinkgoCADx:\n"
+msgstr ""
+
+#: ..\../api/initwx.cpp:580 ..\../api/initwx.cpp:621
+msgid "error"
+msgstr "σφάλμα"
+
+#: ..\../api/initwx.cpp:584
+msgid "Loading resources ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:601
+msgid "Configuring environment ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:621
+msgid "Failed to set permissions:\n"
+msgstr ""
+
+#: ..\../api/initwx.cpp:634
+msgid "Updating ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:638
+#, fuzzy
+msgid "Interpreting parameters ..."
+msgstr "Παράμετροι:"
+
+#: ..\../api/initwx.cpp:689
+#, fuzzy
+msgid "Error unregistering tools: "
+msgstr "σφάλμα"
+
+#: ..\../api/initwx.cpp:769
+msgid "Starting"
+msgstr ""
+
+#: ..\../api/ivista.cpp:36 ..\../commands/comandocarga.cpp:73
+msgid "Loading..."
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:268
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ..\../main/gui/import/pasosimportacionbase.cpp:151
+msgid "Name"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:285
+msgid "Area"
+msgstr "Περιοχή"
+
+#: ..\../api/iwidgets.cpp:302
+msgid "Perimeter"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:316
+msgid "Travel (I)"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:326
+msgid "Travel (M)"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#: ..\../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid "Error while running thread: "
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid " : "
+msgstr " : "
+
+#: ..\../api/threads/thread.cpp:120
+msgid "Internal error while running thread: "
+msgstr ""
+
+#: ..\../api/widgetserializable.cpp:60
+#, fuzzy
+msgid "Creation Date"
+msgstr "Ημερομηνία"
+
+#: ..\../api/widgetserializable.cpp:65
+#, fuzzy
+msgid "Modification Date"
+msgstr "Ημερομηνία"
+
+#: ..\../api/widgetserializable.cpp:68
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:40
+msgid "Physician"
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:55
+#: ..\../commands/pacsdownloadcommand.cpp:88
+#: ..\../commands/synchronizationcommand.cpp:70
+#, fuzzy
+msgid "Downloading files ..."
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/acquirefromurlcommand.cpp:69
+#: ..\../commands/synchronizationcommand.cpp:91
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, c-format
+msgid "Downloading file %d"
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:81
+#, fuzzy
+msgid "Error downloading file: "
+msgstr "σφάλμα"
+
+#: ..\../commands/acquirefromurlcommand.cpp:95
+#: ..\../commands/pacsdownloadcommand.cpp:114
+#: ..\../commands/synchronizationcommand.cpp:121
+#, fuzzy
+msgid "Internal Error"
+msgstr "σφάλμα"
+
+#: ..\../commands/acquirefromurlcommand.cpp:115
+#, fuzzy
+msgid "Error downloading files: "
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/autocleaningcommand.cpp:62
+msgid "Cleaning dicomdir..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:67
+#, fuzzy
+msgid "Downloading files..."
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:183
+msgid "Unknown operation"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:188
+msgid "Error in cloud operation. See log to get more details..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:249
+msgid "Could to retrieve study."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:260 ..\../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:262
+#, fuzzy
+msgid "Error retrieving study."
+msgstr "σφάλμα"
+
+#: ..\../commands/cloudcommand.cpp:271
+msgid "Study successfully retrieved."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "Speed"
+msgstr "Ταχύτητα"
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "bytes/sec during"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "seconds"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:275
+msgid "Empty Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:289
+#, fuzzy
+msgid "Extracting files..."
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/cloudcommand.cpp:313 ..\../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:383
+msgid "Could to perform query."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:396
+#, fuzzy
+msgid "Error perfoming the query."
+msgstr "σφάλμα"
+
+#: ..\../commands/cloudcommand.cpp:405
+msgid "Query successfully performed."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:472
+msgid "Unknown JSon attribute:"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:482
+#, fuzzy
+msgid "Error parsing JSon: "
+msgstr "σφάλμα"
+
+#: ..\../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:515
+#: ..\../commands/openremovableunit.cpp:148 ..\../main/gui/open/abrir.cpp:119
+#: ..\../main/gui/open/abrir.cpp:159 ..\../main/gui/open/opendialogs.cpp:146
+msgid "Storing in the history..."
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:46
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:536
+msgid "Check Updates"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:136
+msgid "Not enough parameters found on XML"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:145
+msgid "XML parsing internal error"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Error checking application updates"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Ginkgo CADx updates"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:170
+msgid "Internal error checking updates"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:92 ..\../commands/comandocarga.cpp:96
+msgid "Exception loading:"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:100
+msgid "Study malformed or unsupported"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:129 ..\../commands/comandocarga.cpp:139
+#, fuzzy
+msgid "Error loading study: "
+msgstr "σφάλμα"
+
+#: ..\../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:144
+#, fuzzy
+msgid "Error loading study."
+msgstr "σφάλμα"
+
+#: ..\../commands/comandocarga.cpp:149
+msgid "Load canceled by user"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:156
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+#: ..\../main/gui/history3/historypanel3.cpp:1063
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#, fuzzy
+msgid "Error loading study"
+msgstr "σφάλμα"
+
+#: ..\../commands/comandoexportacion.cpp:81
+#: ..\../commands/exporttodicomdircommand.cpp:214
+#, fuzzy
+msgid "Exporting files..."
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/comandoexportacion.cpp:105
+#: ..\../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:158
+#, c-format
+msgid "Exporting file %d of %d"
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:233
+msgid "image_%m-%d-%Y_"
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:108
+msgid "Exploring directory ..."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:122
+msgid "Reading DICOMDIR ..."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:142
+#: ..\../commands/comandoincluirhistorial.cpp:156
+#: ..\../commands/comandoincluirhistorial.cpp:177
+#, fuzzy
+msgid "Including files in the history .."
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/comandoincluirhistorial.cpp:196
+msgid "Exploring directory "
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:256
+#: ..\../commands/linkhistorycommand.cpp:118
+msgid "Image acquisition finished."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:258
+#, c-format
+msgid "There have been included %d images."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:261
+#: ..\../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:273
+#: ..\../commands/linkhistorycommand.cpp:133
+#, fuzzy
+msgid "This files doesn't exist:"
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/comandoincluirhistorial.cpp:284
+#: ..\../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:296
+#: ..\../commands/linkhistorycommand.cpp:156
+#, fuzzy
+msgid "This files are Dicom Dirs:"
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/comandopacs.cpp:58 ..\../commands/pacsdownloadcommand.cpp:61
+#: ..\../commands/sendpacscommand.cpp:137
+msgid "There is not any Remote PACS configured"
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:84
+msgid "Querying PACS ..."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:98
+#, fuzzy
+msgid "Starting Search ..."
+msgstr "Αναζήτηση"
+
+#: ..\../commands/comandopacs.cpp:108
+#: ..\../commands/pacsdownloadcommand.cpp:101
+msgid "Server ID not found. ID = "
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:110 ..\../commands/comandopacs.cpp:112
+#: ..\../commands/comandopacs.cpp:114 ..\../commands/comandopacs.cpp:116
+msgid "Query error with PACS Id "
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:116
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+#, fuzzy
+msgid "Internal error"
+msgstr "σφάλμα"
+
+#: ..\../commands/comandopacs.cpp:135
+#, fuzzy
+msgid "Failed to perform search: "
+msgstr "Αναζήτηση"
+
+#: ..\../commands/dbmigrationcommand.cpp:94
+#: ..\../commands/dbmigrationcommand.cpp:103
+msgid "Migrating old DICOM Dir ..."
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:99
+#: ..\../commands/dbmigrationcommand.cpp:108
+#, fuzzy
+msgid "Including files ..."
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+#: ..\../commands/dicomizecommand.cpp:181
+#: ..\../commands/openremovableunit.cpp:74
+#: ..\../commands/openremovableunit.cpp:110
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../commands/pdfextractercommand.cpp:130
+#: ..\../main/controllers/historycontroller.cpp:447
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+#: ..\../main/controllers/historycontroller.cpp:1976
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ..\../main/gui/login/dialogologin.cpp:50
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ..\../main/gui/open/opendialogs.cpp:58
+#: ..\../main/gui/open/opendialogs.cpp:62
+#: ..\../main/gui/open/opendialogs.cpp:134
+#: ..\../main/gui/progress/statusbarprogreso.cpp:284
+#: ..\../main/gui/progress/statusbarprogreso.cpp:287
+#: ..\../main/gui/progress/statusbarprogreso.cpp:292
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Info"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:123
+msgid "Migration finisthed successfully"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:27
+#: ..\../commands/dialogopathssobreescribirbase.cpp:62
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid "Overwrite"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:65
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ..\../main/gui/history3/historypanel3base.cpp:339
+#: ..\../main/gui/history3/historypanel3base.cpp:415
+#: ..\../main/gui/history3/historypanel3base.cpp:486
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ..\../main/gui/open/opendialogsbase.cpp:53
+#: ..\../main/gui/open/opendialogsbase.cpp:131
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ..\../widgets/gui/calibracionbase.cpp:86
+#: ..\../widgets/gui/selecciontextobase.cpp:60
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:24
+#: ..\../commands/dicomizationcompletebase.cpp:33
+#: ..\../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:56
+msgid "Don't show this message again"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:62
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ..\../main/gui/history3/historypanel3base.cpp:411
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ..\../widgets/gui/calibracionbase.cpp:82
+#: ..\../widgets/gui/selecciontextobase.cpp:56
+msgid "Accept"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid "Import process failed:"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:370
+msgid "Unknown error in dicomization process"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:431
+#: ..\../commands/dicomizecommand.cpp:442
+#: ..\../commands/sendpacscommand.cpp:185
+#, fuzzy
+msgid "Error sending evidences:"
+msgstr "σφάλμα"
+
+#: ..\../commands/dicomizecommand.cpp:437
+#: ..\../commands/dicomizecommand.cpp:448
+msgid "Can not upload to the PACS:\n"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:261
+#: ..\../commands/exporttodicomdircommand.cpp:338
+#, c-format
+msgid "Exporting series %d of %d"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:279
+#: ..\../commands/exporttodicomdircommand.cpp:385
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#, fuzzy
+msgid "There was an error creating directory"
+msgstr "σφάλμα"
+
+#: ..\../commands/exporttodicomdircommand.cpp:303
+#: ..\../commands/exporttodicomdircommand.cpp:408
+#, fuzzy
+msgid "There was an error writing file"
+msgstr "σφάλμα"
+
+#: ..\../commands/exporttodicomdircommand.cpp:358
+#, fuzzy
+msgid "There was an error anonymizing files"
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Ignoring incoming operation "
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:298
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:473
+#: ..\../commands/pacsdownloadcommand.cpp:170
+#: ..\../commands/pacsdownloadcommand.cpp:179
+#, fuzzy
+msgid "Including files..."
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/linkhistorycommand.cpp:68
+msgid "Linking study..."
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:42
+#: ..\../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:130
+msgid "Select drive you want to open"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+
+#: ..\../commands/pacsdownloadcommand.cpp:134
+#, fuzzy
+msgid "Error downloading study: "
+msgstr "σφάλμα"
+
+#: ..\../commands/pdfextractercommand.cpp:103
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ..\../main/gui/progress/statusbarprogreso.cpp:278
+#: ..\../widgets/gui/calibracion.cpp:205 ..\../widgets/gui/calibracion.cpp:209
+#: ..\../widgets/gui/calibracion.cpp:219 ..\../widgets/gui/calibracion.cpp:225
+#: ..\../widgets/gui/calibracion.cpp:229
+#, fuzzy
+msgid "Error"
+msgstr "σφάλμα"
+
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:130
+msgid "PDF files extracted successfully..."
+msgstr ""
+
+#: ..\../commands/secondarycapturedicomizecommand.cpp:73
+msgid "Ginkgo CADx Secondary Capture"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:73
+msgid "Message successfully sent"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:77
+msgid "Unknown protocol"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:80 ..\../commands/sendhl7command.cpp:93
+#: ..\../commands/sendhl7command.cpp:145
+#, fuzzy
+msgid "Error sending message:"
+msgstr "σφάλμα"
+
+#: ..\../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:93 ..\../commands/sendhl7command.cpp:94
+#, fuzzy
+msgid "Unknown error"
+msgstr "σφάλμα"
+
+#: ..\../commands/sendhl7command.cpp:134
+msgid "Failed to start connection"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid "Error sending message. It was sent "
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:258
+msgid "Failed delivery confirmation:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:51
+#, fuzzy
+msgid "Send files to PACS"
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/sendpacscommand.cpp:155
+#, fuzzy
+msgid "Uploading files ..."
+msgstr "όλα τα αρχεία"
+
+#: ..\../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:181
+#, fuzzy
+msgid "Error:"
+msgstr "σφάλμα"
+
+#: ..\../commands/sendpacscommand.cpp:189
+msgid "Error sending evidences: Internal error."
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:203
+msgid "Error uploading the study to PACS: "
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:206
+msgid "Retry send to PACS"
+msgstr ""
+
+#: ..\../commands/synchronizationcommand.cpp:104
+#, fuzzy
+msgid "Error downloading file"
+msgstr "σφάλμα"
+
+#: ..\../commands/synchronizationcommand.cpp:141
+#, fuzzy
+msgid "Error synchronizing study: "
+msgstr "σφάλμα"
+
+#: ..\../commands/thumbnailscommand.cpp:107
+#: ..\../commands/thumbnailscommand.cpp:133
+#: ..\../commands/thumbnailscommand.cpp:247
+#: ..\../commands/thumbnailscommand.cpp:376
+#: ..\../commands/thumbnailscommand.cpp:382
+#: ..\../main/gui/import/selectimagesimportation.cpp:504
+msgid "Creating Thumbnail..."
+msgstr ""
+
+#: ..\../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr ""
+
+#: ..\../export/tools/iaddfiletohistorytool.cpp:19
+#: ..\../main/gui/history3/historypanel3.cpp:632
+msgid "Open study"
+msgstr ""
+
+#: ..\../export/tools/iangletool.cpp:19
+msgid "Angle \tCtrl+A"
+msgstr ""
+
+#: ..\../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr ""
+
+#: ..\../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr ""
+
+#: ..\../export/tools/icolormaptool.cpp:20
+#, fuzzy
+msgid "Color Map"
+msgstr "Χρώμα"
+
+#: ..\../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ..\../main/gui/open/opendialogsbase.cpp:46
+#: ..\../main/gui/open/opendialogsbase.cpp:198
+msgid "Copy"
+msgstr ""
+
+#: ..\../export/tools/icornerannotationstool.cpp:20
+msgid "Window annotations"
+msgstr ""
+
+#: ..\../export/tools/idetachwindowtool.cpp:19
+msgid "Detach window"
+msgstr ""
+
+#: ..\../export/tools/iimageexporttool.cpp:19
+msgid "Export image..."
+msgstr ""
+
+#: ..\../export/tools/imarkertool.cpp:20
+msgid "Marking Tools \tCtrl+M"
+msgstr ""
+
+#: ..\../export/tools/imetricgridtool.cpp:20
+msgid "Metric grid"
+msgstr ""
+
+#: ..\../export/tools/inotetool.cpp:19
+msgid "Text Note \tCtrl+N"
+msgstr ""
+
+#: ..\../export/tools/ipacsuploadtool.cpp:19
+msgid "Upload study..."
+msgstr ""
+
+#: ..\../export/tools/ipixelsbluringtool.cpp:20
+msgid "Pixels blurring"
+msgstr ""
+
+#: ..\../export/tools/ipointertool.cpp:19
+msgid "Pointer \tEsc"
+msgstr ""
+
+#: ..\../export/tools/iqueryretrievetool.cpp:19
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#: ..\../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr ""
+
+#: ..\../export/tools/iresettool.cpp:19
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+msgid "Reset"
+msgstr ""
+
+#: ..\../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr ""
+
+#: ..\../export/tools/iruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: ..\../export/tools/isecondarycapturetool.cpp:19
+msgid "Save snapshot as new series..."
+msgstr ""
+
+#: ..\../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr ""
+
+#: ..\../export/tools/ishowtagstool.cpp:19
+#: ..\../main/tools/showtagshistorytool.cpp:27
+msgid "DICOM inspector"
+msgstr ""
+
+#: ..\../export/tools/isimpleprinttool.cpp:19
+#: ..\../main/tools/simpleprinttool.cpp:226
+msgid "Print"
+msgstr "Εκτύπωση"
+
+#: ..\../export/tools/istartdicomizationtool.cpp:19
+msgid "Dicomize..."
+msgstr ""
+
+#: ..\../export/tools/itoolpan.cpp:19
+msgid "Pan \tCtrl+P"
+msgstr ""
+
+#: ..\../export/tools/itoolslider.cpp:19
+msgid "Slider \tCtrl+S"
+msgstr ""
+
+#: ..\../export/tools/itoolwindowlevel.cpp:19
+msgid "Window/Level \tCtrl+W"
+msgstr ""
+
+#: ..\../export/tools/itoolzoom.cpp:19
+msgid "Zoom \tCtrl+O"
+msgstr ""
+
+#: ..\../export/tools/itrackballtool.cpp:19
+msgid "Trackball \tCtrl+T"
+msgstr ""
+
+#: ..\../export/tools/iundotool.cpp:20 ..\../main/tools/undotool.cpp:109
+msgid "Undo"
+msgstr ""
+
+#: ..\../export/tools/ivideotool.cpp:19
+msgid "Video \tCtrl+Space"
+msgstr ""
+
+#: ..\../export/tools/iwindowlayouttool.cpp:20
+msgid "Window layout"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid "Studies with"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:210
+msgid "Reading properties"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:219
+#: ..\../main/controllers/controladorcarga.cpp:642
+#: ..\../main/controllers/controladorcarga.cpp:888
+#: ..\../main/controllers/streaming/streamingloader.cpp:600
+#, fuzzy
+msgid "Error reading the study: "
+msgstr "σφάλμα"
+
+#: ..\../main/controllers/controladorcarga.cpp:224
+#: ..\../main/controllers/controladorcarga.cpp:229
+#: ..\../main/controllers/controladorcarga.cpp:647
+#: ..\../main/controllers/controladorcarga.cpp:893
+msgid "Internal error reading the study: "
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:269
+#: ..\../main/controllers/controladorcarga.cpp:281
+#: ..\../main/controllers/controladorcarga.cpp:905
+msgid "Spacing is not valid: ("
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:305
+#: ..\../main/controllers/controladorcarga.cpp:338
+#: ..\../main/controllers/controladorcarga.cpp:372
+#: ..\../main/controllers/controladorcarga.cpp:408
+#: ..\../main/controllers/controladorcarga.cpp:441
+#: ..\../main/controllers/controladorcarga.cpp:474
+#: ..\../main/controllers/controladorcarga.cpp:507
+#: ..\../main/controllers/controladorcarga.cpp:540
+#: ..\../main/controllers/controladorcarga.cpp:573
+#: ..\../main/controllers/controladorcarga.cpp:606
+#: ..\../main/controllers/controladorcarga.cpp:935
+msgid "Error loading the study: Out of memory"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:375
+msgid "Error loading the study: Internal Error"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:630
+#: ..\../main/controllers/streaming/streamingloader.cpp:1023
+#: ..\../main/controllers/streaming/streamingloader.cpp:1223
+#: ..\../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:651
+#: ..\../main/controllers/controladorcarga.cpp:960
+msgid "Process canceled by user."
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:878
+msgid "Interpreting properties"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:917
+msgid "Spacing of the image is invalid: ("
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:942
+msgid "Reading dataset"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:951
+#, fuzzy
+msgid "Error reading the study:"
+msgstr "σφάλμα"
+
+#: ..\../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:972
+msgid "load"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:40
+msgid "Stopping HL7 sender"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:63
+#: ..\../main/controllers/controladorenviohl7.cpp:76
+msgid "Error starting HL7 sender"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:65
+#: ..\../main/controllers/controladorenviohl7.cpp:78
+msgid "HL7 sender started"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:108
+msgid "HL7 controller destroyed"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:150
+#, fuzzy
+msgid "Error processing message"
+msgstr "σφάλμα"
+
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/controllers/pacscontroller.cpp:1549
+#: ..\../main/controllers/pacscontroller.cpp:1553
+#: ..\../main/controllers/pacscontroller.cpp:1557
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:184
+msgid "Unknown"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:110
+msgid "Loading"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:153
+msgid "Could not find entry point"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:74
+msgid "Integration engine hostname not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:77
+msgid "Integration engine port not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:91
+msgid "Unsupported protocol"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, c-format
+msgid "Downloading file %d/%d"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+msgid "Image format not supported"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:200
+msgid "Receiving Association failed: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:209
+msgid "Association received"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:210
+msgid "Parameters:"
+msgstr "Παράμετροι:"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ")"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:274
+msgid "No valid presentation contexts"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "Association(dicom://"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr "@"
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, c-format
+msgid "Uploading file %d of %d"
+msgstr ""
+
+#: ..\../main/controllers/dicommanager.cpp:504
+#: ..\../main/controllers/dicommanager.cpp:531
+msgid "Extracting file..."
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid "Error creating history database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:343
+msgid "Error creating dicomDir database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:425
+#: ..\../main/controllers/historycontroller.cpp:441
+msgid "Error creating thumbnails database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:560
+msgid "Including image "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid "Linking image "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr ""
+
+#: ..\../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+msgid "Malformed template Id ("
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid "Template Id unsupported ("
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:566
+msgid "Unknown module Id ("
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:592
+msgid "Empty configuration"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:631
+msgid "XML Parser Not Found. Key="
+msgstr ""
+
+#: ..\../main/controllers/log4cplus/guiappender.cpp:75
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ..\../main/gui/history3/historypanel3base.cpp:48
+#: ..\../main/gui/import/pasosimportacionbase.cpp:227
+msgid "Patient"
+msgstr "Ασθενής"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#, fuzzy
+msgid "Patient ID"
+msgstr "Ασθενής"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:86
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ..\../main/gui/history3/historypanel3.cpp:227
+#: ..\../main/gui/open/opendialogs.cpp:50
+msgid "Modality"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:98
+msgid "Dimensions"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:109
+#, c-format
+msgid "Made with %s"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:167
+#: ..\../main/controllers/modalitysettingscontroller.cpp:338
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1212
+msgid "Downloading file"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Error downloading WADO file"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Check PACS configuration"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1428
+msgid "Invalid HTTP response"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1433
+msgid "Invalid HTTP code"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1472
+msgid "PACS-Service"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:97
+#: ..\../main/controllers/parserxmlspanish.cpp:94
+msgid "Omitted Identificator"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:105
+#: ..\../main/controllers/parserxmlspanish.cpp:102
+msgid "Omitted AET"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:113
+#: ..\../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:121
+#: ..\../main/controllers/parserxmlspanish.cpp:118
+msgid "Omitted port"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:206
+#: ..\../main/controllers/parserxmlenglish.cpp:237
+#: ..\../main/controllers/parserxmlspanish.cpp:188
+#: ..\../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:212
+#: ..\../main/controllers/parserxmlspanish.cpp:194
+msgid "Port is not a valid number"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:248
+#: ..\../main/controllers/parserxmlspanish.cpp:228
+msgid "The port is not a valid number"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:265
+#: ..\../main/controllers/parserxmlspanish.cpp:246
+msgid "Setting not found"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:391
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:427
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:434
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:445
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:483
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:548
+#: ..\../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:552
+#: ..\../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:570
+#: ..\../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:340
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:402
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:438
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:445
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:486
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:524
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:559
+msgid "id_application expected"
+msgstr ""
+
+#: ..\../main/controllers/smartretrievecontroller.cpp:124
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:920
+msgid "Downloading from PACS..."
+msgstr ""
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:303
+#: ..\../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ..\../main/gui/history3/historytablemodel.cpp:403
+#: ..\../main/gui/history3/historytablemodel.cpp:415
+#: ..\../main/gui/history3/historytablemodel.cpp:470
+#: ..\../main/gui/history3/historytablemodel.cpp:482
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:102
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+msgid "Exploring PACS..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ..\../main/gui/history3/historypanel3.cpp:225
+#: ..\../main/gui/open/opendialogs.cpp:49
+#, fuzzy
+msgid "Patient id"
+msgstr "Ασθενής"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ..\../main/gui/history3/historypanel3.cpp:224
+#: ..\../main/gui/open/opendialogs.cpp:48
+#, fuzzy
+msgid "Patient name"
+msgstr "Ασθενής"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:479
+msgid "Study Instance UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ..\../main/gui/history3/historypanel3.cpp:231
+#: ..\../main/gui/open/opendialogs.cpp:53
+msgid "Accession number"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:481
+#, fuzzy
+msgid "Study date"
+msgstr "Ημερομηνία"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:482
+msgid "Study time"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:490
+msgid "Series Instance UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:492
+#, fuzzy
+msgid "Series date"
+msgstr "Ημερομηνία"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:493
+msgid "Series time"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:519
+#, fuzzy
+msgid "No results found"
+msgstr "Αποτελέσματα"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+msgid "Write query name"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+msgid "Id"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+#, fuzzy
+msgid "Date Time"
+msgstr "Ημερομηνία"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ..\../main/gui/history3/historypanel3.cpp:229
+#: ..\../main/gui/import/pasosimportacionbase.cpp:298
+#: ..\../main/gui/import/pasosimportacionbase.cpp:340
+#: ..\../main/gui/open/opendialogs.cpp:52
+msgid "Description"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ..\../main/gui/import/pasosimportacionbase.cpp:276
+msgid "Accession Number"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:210
+msgid "Store query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:211
+msgid "Remove query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:278
+msgid "There is no any PACS configured"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+msgid "Study UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid "Search"
+msgstr "Αναζήτηση"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:519
+msgid "Download series"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+msgid "Download study"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:535
+msgid "Link series"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:537
+msgid "Link study"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:551
+msgid "Properties..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+msgid "You must specify at least a modality or a period of time"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+msgid "Select a valid query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+msgid "Select a valid PACS Server"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid "Download of modality "
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+#, fuzzy
+msgid "Modality download error"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:786
+#, fuzzy
+msgid "search results"
+msgstr "Αποτελέσματα"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:913
+msgid "Downloading serie..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:916
+msgid "Downloading study..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+msgid "PACS acquisition is restricted"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+msgid "Server"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ..\../main/gui/import/pasosimportacionbase.cpp:284
+#: ..\../main/gui/import/pasosimportacionbase.cpp:326
+#: ..\../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr "Ημερομηνία"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ..\../main/gui/history3/historypanel3base.cpp:81
+#, fuzzy
+msgid "Any date"
+msgstr "Ημερομηνία"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ..\../main/gui/history3/historypanel3base.cpp:85
+#, fuzzy
+msgid "Today AM"
+msgstr "Σήμερα"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ..\../main/gui/history3/historypanel3base.cpp:88
+#, fuzzy
+msgid "Today PM"
+msgstr "Σήμερα"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ..\../main/gui/history3/historypanel3base.cpp:91
+msgid "Today"
+msgstr "Σήμερα"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ..\../main/gui/history3/historypanel3base.cpp:100
+msgid "Yesterday"
+msgstr "Χθες"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ..\../main/gui/history3/historypanel3base.cpp:103
+msgid "Last 7 days"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ..\../main/gui/history3/historypanel3base.cpp:106
+msgid "Last 30 days"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ..\../main/gui/history3/historypanel3base.cpp:109
+msgid "Last 3 months"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ..\../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ..\../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+msgid "Stored queries"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+msgid "Select stored queries..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ..\../main/gui/open/opendialogsbase.cpp:50
+#: ..\../main/gui/open/opendialogsbase.cpp:202
+msgid "Link"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+msgid "Download"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ..\../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+msgid "Series does not exist"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr "Συνέχεια"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ..\../main/gui/open/opendialogsbase.cpp:127
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ..\../main/tools/metricgridtool.cpp:101
+msgid "Ok"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:151
+msgid "Download again"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+msgid "Open"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:179
+msgid "Set query name"
+msgstr ""
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:32
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:34
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizedialog.cpp:64
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ..\../main/gui/export/parametrosprincipales.cpp:194
+msgid "Exporting images ..."
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:21
+msgid "Common tags"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+#, fuzzy
+msgid "Patient's name and surname"
+msgstr "Ασθενής"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+#, fuzzy
+msgid "Patient Id"
+msgstr "Ασθενής"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr "Σχόλια"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:44
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:71
+#, fuzzy
+msgid "Add new..."
+msgstr "Προσθήκη"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ..\../main/tools/anonymizetool.cpp:26
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:136
+msgid "Create new"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:136
+#, fuzzy
+msgid "Add DICOM tag"
+msgstr "Προσθήκη"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:199
+msgid "Group"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:203
+msgid "Element"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ..\../widgets/wangulo.cpp:1114
+msgid "Value"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+msgid "Top right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+msgid "Top left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+msgid "Bottom left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+msgid "Bottom right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+msgid "You must fill in all fields"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+msgid "Window/level label in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+msgid "Window"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+msgid "Level"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+msgid "Do you confirm the removal of the preset?"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+#, fuzzy
+msgid "Data modified"
+msgstr "Δεδομένα"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+msgid "Modality settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+msgid "Default modality settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, c-format
+msgid "%s settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:60
+msgid "settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Export Configuration"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Ini Files(*.ini)|*.ini"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+msgid "Existing file"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+msgid "Export successfully completed"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#, fuzzy
+msgid "There was an error during exportation"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Import Configuration"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Ini files(*.ini)|*.ini"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+msgid "There was an error during importation, check permissions"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+msgid "Dicom tag"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+msgid "Split horizontally..."
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+msgid "Split vertically..."
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ..\../main/tools/windowlayouttool.cpp:273
+msgid "Split active horizontally"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ..\../main/tools/windowlayouttool.cpp:274
+msgid "Split active vertically"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+msgid "New hanging protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, c-format
+msgid "Window %d"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "Yes"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+msgid "Hanging protocols"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+msgid "One day"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+msgid "Two days"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+msgid "Three days"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+msgid "Two weeks"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+msgid "One month"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+msgid "Three months"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+msgid "Local database"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+msgid "Local DICOM Dir setup"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+msgid "Select DICOMDIR"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+msgid "Extensions settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+msgid "Port has to be a valid number"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+#, fuzzy
+msgid "General configuration parameters"
+msgstr "Παράμετροι:"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:134
+msgid "Testing conectivity with the server..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:144
+#, fuzzy
+msgid "Error connecting to url"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+msgid "hostname/port not set"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "Select certificate"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:255
+msgid "Change ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+msgid "Import ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:279
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:472
+msgid "There are this errors: "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:525
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:558
+msgid "Testing the connection to the node ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:561
+#, fuzzy
+msgid "DICOM Error"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:607
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:616
+msgid "Invalid port number"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:622
+#, fuzzy
+msgid "WADO Error"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:703
+msgid "Use by default"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:795
+msgid "DICOM nodes"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:800
+msgid "DICOM nodes settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ..\../main/gui/export/pasosexportacionbase.cpp:20
+msgid "Profile"
+msgstr "Προφίλ"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+msgid "Set property active"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Set property inactive"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+msgid "Set default value"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+msgid "Set by user"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+msgid "Profile name can't be repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+msgid "Profiles Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#, fuzzy
+msgid "Confirm the removal of the profile "
+msgstr "Προφίλ"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+msgid "New User"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+msgid "User name repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+msgid "Password has to contain at least 6 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+msgid "No login"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+msgid "User/Password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+msgid "Password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+msgid "Password is setted"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+msgid "Password is not setted"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+msgid "Set password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+msgid "Security Setting"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+msgid "User inserted successfully"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+msgid "Password changed successfully"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+msgid "User deleted successfully"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ..\../main/gui/login/dialogologin.cpp:27
+msgid "User"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ..\../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+msgid "Maximum length of title is 8 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+msgid "Title"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+msgid "Path"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+msgid "Clean before"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+msgid "Clean after"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+msgid "Location Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:96
+msgid "Anonymization settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1370
+msgid "Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+msgid "Export config..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+msgid "Import config..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr "Εφαρμογή"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+msgid "Physician's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+msgid "Physician's Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+msgid "Service"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+msgid "Service's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+msgid "Service's Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+msgid "Local institution"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+msgid "Institution's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+msgid "Institution's Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+#, fuzzy
+msgid "Dicomized files"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+msgid "Charset"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+msgid "ISO_IR 148"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+msgid "Automatically check for updates"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+msgid "Proxy settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+msgid "Enable http proxy"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+msgid "Proxy Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+msgid "Server settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+msgid "Host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+msgid "Port"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+msgid "Username"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+msgid "No proxy for addresses containing"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+msgid "DICOM Dir"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr "..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+msgid "Auto-cleaning"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+msgid "MB"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ..\../main/tools/toolwindowlevel.cpp:201
+msgid "Reset to default"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+msgid "Local AET"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+msgid "DICOM Nodes"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+msgid "New ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+msgid "Edit ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+msgid "Set Default"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+msgid "DICOM Node"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+msgid "PDU (KB)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+msgid "Retrieve method"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Move"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Get"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+msgid "WADO URL"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+msgid "Retrieve mode"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ..\../main/gui/import/pasosimportacionbase.cpp:319
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1395
+msgid "Series"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+msgid "Studies"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+msgid "Worklists"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+msgid "Select how do you want to handle MPPS items"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+msgid "DICOM MPPS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+msgid "HL7 messages"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+msgid "HL7"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+msgid "Abort message"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+msgid "Completed message"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+msgid "In progress message"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+msgid "Default values"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+msgid "Worklist"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+msgid "SSL/TLS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+msgid "Verify server credentials"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+msgid "Use SSL/TLS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+msgid "Certificate to use in this connection"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+msgid "Default charset"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+msgid "Advanced"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+msgid "Local AET certificate"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+msgid "Certificate used by Ginkgo CADx"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+msgid "Receiver organization Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+msgid "Petitioner System Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+msgid "Filler Application Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+msgid "Ginkgo CADx Application Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+msgid "Integration engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+msgid "Hostname / Port"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr "/"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+msgid "Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ..\../main/gui/export/pasosexportacionbase.cpp:28
+msgid "Format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+msgid "Message's format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr "ER7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+msgid "Test engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+msgid "Test Integration Engine connectivity"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+msgid "Ginkgo Extension Title"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+msgid "Edit public key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+msgid "Public key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+msgid "Public key in PEM format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+msgid "Load ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+msgid "Private key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+msgid "Private key in PEM format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+#, fuzzy
+msgid "Profile name"
+msgstr "Προφίλ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+msgid "Set active"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+msgid "Configure location"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+msgid "Location"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+msgid "Security type"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+msgid "Change Password ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+msgid "Set main password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+msgid "Set Password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+msgid "Edit User"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+msgid "User Name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+msgid "Confirm Password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+msgid "Properties"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+msgid "Edit corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue}  where GGGG is the tag's group in hexadecimal and EEEE is the "
+"tag's element."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+msgid "Window/level"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr "Προσθήκη"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ..\../main/gui/history3/historytoolmenu.cpp:149
+#: ..\../widgets/gui/selecciontextobase.h:58
+msgid "Edit"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+msgid "Default Window/Level"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+msgid "Corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+msgid "Setup corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+msgid "Setup..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+msgid "Other settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+#, fuzzy
+msgid "Interpolate pixel data"
+msgstr "Δεδομένα"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+msgid "Hanging protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+msgid "Opening mode"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+msgid "Study opening criteria"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+msgid "Workspace"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+msgid "Enable/Disable"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+msgid "Top left corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+msgid "Setup window"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+msgid "Set default"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+msgid "Open in main window"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+msgid "Setup position..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+msgid "Setup undocked window position"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+msgid "Layout"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+msgid "Current layout"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+msgid "Columns"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+msgid "Series criteria"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+msgid "Select opening mode"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+msgid "Tag"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+msgid "Save"
+msgstr "Αποθήκευση"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+msgid "Enable background queries"
+msgstr ""
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+msgid "Smart retrieve"
+msgstr ""
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+msgid "Smart retrieve settings"
+msgstr ""
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.h:64
+msgid "Export DICOM"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+msgid "Ginkgo CADx private tags"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ..\../main/gui/history3/historypanel3.cpp:340
+#: ..\../main/gui/history3/historytoolmenu.cpp:158
+msgid "Export"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ..\../main/gui/export/parametrosprincipales.cpp:157
+msgid "Select the directory where the files will be stored"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+msgid "Select the DICOM Dir folder"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+msgid "DICOM Dir migration"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+msgid "Migrate existing (recommended)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+#, fuzzy
+msgid "Continue..."
+msgstr "Συνέχεια"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+msgid "Select other"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+msgid "Browse..."
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:106
+msgid "DICOM Export"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:110
+msgid "Select the format and the images you want to export"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:143
+#, fuzzy
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr "Όλα τα αρχεία (*.*)|*.*"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:150
+#, fuzzy
+msgid "Select file"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "DICOM (native format)"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "Image (jpg, bmp, png)"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:38
+msgid "Export all files of opened tab"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:55
+msgid "JPEG"
+msgstr "JPEG"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr ""
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:40
+msgid "Image Export Wizard"
+msgstr ""
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ..\../main/gui/license/aboutdialogbase.cpp:67
+#: ..\../main/gui/license/aboutdialogbase.cpp:151
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:54
+msgid "&Accept"
+msgstr ""
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+msgid "Open link"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+msgid "File link:"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ..\../main/gui/import/pasosimportacionbase.cpp:270
+msgid "Study"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+msgid "User name"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+msgid "Ginkgo Cloud link"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+msgid "Copy to clipboard"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "New Ginkgo Cloud study"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "To download the study, paste this url "
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+msgid "Creator"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+msgid "Last Modificator"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+msgid "Show link..."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+msgid "Invalid link"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:117
+#: ..\../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:119
+#: ..\../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:226
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr "Ηλικία"
+
+#: ..\../main/gui/history3/historypanel3.cpp:228
+#, fuzzy
+msgid "Date acquired"
+msgstr "Ημερομηνία"
+
+#: ..\../main/gui/history3/historypanel3.cpp:230
+#, fuzzy
+msgid "Date added"
+msgstr "Ημερομηνία"
+
+#: ..\../main/gui/history3/historypanel3.cpp:308
+#: ..\../main/gui/history3/historytoolmenu.cpp:82
+#: ..\../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:316
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:363
+#, fuzzy
+msgid "All patients"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+msgid "Results"
+msgstr "Αποτελέσματα"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, c-format
+msgid " (%d images)"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:634
+msgid "Open study with .."
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:663
+#: ..\../main/gui/history3/historypanel3base.cpp:482
+msgid "Synchronize"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:677
+msgid "&Delete from history"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:686
+msgid "&Clear history"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid "Unable to open modality "
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1086
+msgid "all files"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+msgid "Select at least one series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "those series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "this series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:57
+#, fuzzy
+msgid "Advanced search"
+msgstr "Αναζήτηση"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:73
+#, fuzzy
+msgid "Acquisition date"
+msgstr "Ημερομηνία"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:302
+#: ..\../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:336
+#: ..\../main/gui/history3/historytoolmenu.cpp:102
+#: ..\../main/gui/history3/historytoolmenu.cpp:200
+#: ..\../main/gui/history3/historytoolmenu.cpp:229
+msgid "Remove"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:454
+#: ..\../main/gui/history3/historypanel3base.h:187
+#, fuzzy
+msgid "Synchronize files"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+
+#: ..\../main/gui/history3/historytablemodel.cpp:406
+#: ..\../main/gui/history3/historytablemodel.cpp:418
+#: ..\../main/gui/history3/historytablemodel.cpp:473
+#: ..\../main/gui/history3/historytablemodel.cpp:485
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:105
+msgid "00/00/0000 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:138
+msgid "Close history"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:139
+#: ..\../main/gui/startup/startupform.cpp:53
+msgid "History"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:201
+#: ..\../main/gui/history3/historytoolmenu.cpp:230
+msgid "Clear history"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:232
+#, fuzzy
+msgid "Select all"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:233
+#, fuzzy
+msgid "Deselect all"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+msgid "Destination"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+msgid "Status"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+#, fuzzy
+msgid "Error message"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+msgid "Show Message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+msgid "Edit Message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+msgid "Delete message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+#, fuzzy
+msgid "Error editing message"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+#, fuzzy
+msgid "Error purguing messages"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Stop"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Sent"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/progress/statusbarprogreso.cpp:281
+msgid "Warning"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+#, fuzzy
+msgid "Error getting message"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+msgid "Running"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+msgid "Usually due to an error in sending a message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Start"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+#, fuzzy
+msgid "Error deleting messages"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+msgid "Remove sent messages"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+msgid "Exit"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+msgid "Messages"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+msgid "Refresh"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1394
+msgid "View"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+msgid "Send task status:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+msgid "Message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr "Ημερομηνία:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+msgid "Destination:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+msgid "Status:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+#, fuzzy
+msgid "Message content:"
+msgstr "Περιεχόμενο"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:142
+msgid "OK"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:210
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:231
+#, fuzzy
+msgid "Error validating fields"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:148
+#, fuzzy
+msgid "Selecting Import Profile"
+msgstr "Προφίλ"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:152
+msgid "You must select the profile you want to use import"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+msgid "You must select the import profile"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:21
+msgid "Selected images"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:56
+msgid "Preview"
+msgstr "Προεπισκόπηση"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:62
+#, fuzzy
+msgid "Remove all"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:113
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:65
+#, fuzzy
+msgid "Demographic data"
+msgstr "Δεδομένα"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:159
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+#, fuzzy
+msgid "Birth date"
+msgstr "Ημερομηνία"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:217
+msgid "Study Details"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:234
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:122
+msgid "Weight"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:245
+msgid "Kg"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:252
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:119
+msgid "Height"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:291
+#: ..\../main/gui/import/pasosimportacionbase.cpp:333
+msgid "Time"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+#, fuzzy
+msgid "Select files..."
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste from clipboard"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:330
+msgid "Delete selected items"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+msgid "You must select an image"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:346
+#, fuzzy
+msgid "Generating preview..."
+msgstr "Προεπισκόπηση"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:500
+msgid "Select images"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:715
+msgid "Image selection"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:760
+msgid "The file"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:52
+msgid "Image Import Wizard"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:167
+msgid "free of"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:181
+msgid "in dicomization dir."
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, c-format
+msgid "Step %d of %d: "
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialog.cpp:25
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:22
+msgid "Ginkgo CADx"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:55
+msgid "Licenses"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:58
+msgid "UPDATE_INFO"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:108
+#: ..\../main/gui/license/aboutdialogbase.h:88
+msgid "Open Source Licenses"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:119
+msgid "FamFamFam Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:120
+msgid "Fugue Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:126
+msgid "WxWidgets"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:127
+msgid "Zlib"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:130
+msgid "Dark Glass Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ..\../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:53
+msgid "Check for updates automatically"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:66
+msgid "I Accept the license"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+#, fuzzy
+msgid "Save logs"
+msgstr "Αποθήκευση"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+msgid "File couldn't be stored "
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+msgid "Could not write to file"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+#, fuzzy
+msgid "Save log..."
+msgstr "Αποθήκευση"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+msgid "Clear log"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+msgid "Log"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr ""
+
+#: ..\../main/gui/login/dialogologin.cpp:50
+msgid "The username or password is incorrect"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:250
+msgid "Tasks"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1139
+msgid "Included in the history ..."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+#, fuzzy
+msgid "Check update error"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+msgid "Malformed XML"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1192
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+msgid "Error parsing integration XML:\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#, fuzzy
+msgid "PACS error:\n"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+msgid "Error executing WorkFlow\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+msgid "Close current view"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+#, fuzzy
+msgid "Close all"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+#, fuzzy
+msgid "Close all views"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "Exit application"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Show full screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1302
+msgid "Tab grouping"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1329
+msgid "Ginkgo CADx manual ..."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1330
+msgid "Open test card"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for newest versions"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1332
+msgid "Need support ..."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About "
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+msgid "HL7 monitor"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+msgid "HL7 message control"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+msgid "Log monitor"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+msgid "Log monitored"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1390
+msgid "&File"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1664
+#, fuzzy
+msgid "Unsaved data"
+msgstr "Δεδομένα"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+#, fuzzy
+msgid "Error saving"
+msgstr "σφάλμα"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "Full Screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "View Full Screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1708
+msgid "Tab Regroup"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+#, fuzzy
+msgid "&Close all"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+#, fuzzy
+msgid "Close all windows"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1728
+msgid "Tabbed organization"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "Ginkgo CADx updated"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1782
+msgid "New version available ("
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+msgid "New Update"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+msgid "New version available"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+msgid "X"
+msgstr "X"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+msgid "Close this notification"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+msgid "The following commands will be aborted if you close the application"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+msgid "Close Ginkgo CADx"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:138
+msgid "User login"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+msgid "System authentication"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+msgid "Login"
+msgstr ""
+
+#: ..\../main/gui/open/abrir.cpp:80 ..\../main/gui/open/abrir.cpp:82
+msgid "Open..."
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:58
+msgid "There was an error reading DICOMDIR file"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:62
+msgid "Select a valid DICOMDIR file"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:180
+#: ..\../main/gui/open/opendialogsbase.cpp:170
+#: ..\../main/gui/open/opendialogsbase.h:112
+msgid "Copy or link"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:22
+#: ..\../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:94
+#: ..\../main/gui/open/opendialogsbase.h:85
+msgid "Select drive"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:175
+msgid "Do you want to copy or link files?"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ..\../main/gui/selectpacsserver/selectpacsserver.cpp:30
+msgid "There aren't any PACS configured"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:69
+#, fuzzy
+msgid "0000/00/00 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.h:57
+msgid "Upload study"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+msgid "Select PACS server"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:119
+msgid "Metadata"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:120
+msgid "Identification information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:121
+#, fuzzy
+msgid "Patient information"
+msgstr "Ασθενής"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:122
+msgid "Acquisition information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:123
+msgid "Relationship information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:124
+msgid "Image presentation information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:125 ..\../widgets/wtextbox.cpp:525
+msgid "Text"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:126
+msgid "Other"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:137
+#: ..\../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr "Δεδομένα"
+
+#: ..\../main/gui/previewpanel/previewpanel.cpp:47
+msgid "Hide"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:207
+msgid "Previews"
+msgstr ""
+
+#: ..\../main/gui/progress/progresobase.cpp:23
+msgid "There is no running tasks"
+msgstr ""
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:165
+#, fuzzy
+msgid "0 running tasks."
+msgstr "0"
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:192
+#, c-format
+msgid "There are %d pending tasks"
+msgstr ""
+
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.h:55
+msgid "Select PACS"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:29
+msgid "http://ginkgo-cadx.com"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:47
+msgid "Ginkgo CADx Pro"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr ""
+
+#: ..\../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr ""
+
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete Widget"
+msgstr ""
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Properties ..."
+msgstr ""
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Widget Properties"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:114
+msgid "Open file"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:115
+#: ..\../main/tools/openfoldertool.cpp:27
+msgid "Open folder"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:116
+#: ..\../main/tools/openremovabletool.cpp:28
+msgid "Open removable unit"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:117
+#: ..\../main/tools/openginkgocloudlinktool.cpp:27
+msgid "Open Ginkgo Cloud link"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr ""
+
+#: ..\../main/tools/colormaptool.cpp:110
+#, fuzzy
+msgid "Invert color map"
+msgstr "Χρώμα"
+
+#: ..\../main/tools/cornerannotationstool.cpp:44
+msgid "Hide corner annotations"
+msgstr ""
+
+#: ..\../main/tools/cornerannotationstool.cpp:46
+msgid "Show corner annotations"
+msgstr ""
+
+#: ..\../main/tools/detachwindowtool.cpp:42
+msgid "Attach View"
+msgstr ""
+
+#: ..\../main/tools/detachwindowtool.cpp:44
+msgid "Detach view"
+msgstr ""
+
+#: ..\../main/tools/dicomizetool.cpp:28
+#, fuzzy
+msgid "Dicomize files"
+msgstr "όλα τα αρχεία"
+
+#: ..\../main/tools/exportdicomdirtool.cpp:32
+msgid "Export to DICOM Dir"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:171
+msgid "Point"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:176
+msgid "Free form"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:57
+msgid "Grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:67
+msgid "Grid Scale"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:74
+#, fuzzy
+msgid "Scale X"
+msgstr "X"
+
+#: ..\../main/tools/metricgridtool.cpp:78
+#, fuzzy
+msgid "X axis scale"
+msgstr "X"
+
+#: ..\../main/tools/metricgridtool.cpp:87
+msgid "Scale Y"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:91
+msgid "Y axis scale"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:206
+msgid "Show grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:250
+msgid "Hide Grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:252
+msgid "Show Grid"
+msgstr ""
+
+#: ..\../main/tools/openfiletool.cpp:28
+msgid "Open File"
+msgstr ""
+
+#: ..\../main/tools/pacsuploadtool.cpp:54
+msgid "Send to PACS..."
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:59
+msgid "Unset pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:61
+msgid "Set pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+msgid "PACS Q/R"
+msgstr ""
+
+#: ..\../main/tools/queryretrievetool.cpp:94
+#: ..\../main/tools/searchginkgocloudhistorytool.cpp:28
+#, fuzzy
+msgid "Search Ginkgo Cloud"
+msgstr "Αναζήτηση"
+
+#: ..\../main/tools/rotateandfliptool.cpp:151
+msgid "Undo rotate and flip"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:156
+msgid "Flip horizontal"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:157
+msgid "Flip vertical"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:34
+msgid "Send to PACS"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:70
+msgid "Sending to PACS..."
+msgstr ""
+
+#: ..\../main/tools/showtagstool.cpp:42
+msgid "Hide DICOM inspector"
+msgstr ""
+
+#: ..\../main/tools/showtagstool.cpp:44
+msgid "Show DICOM inspector"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:119
+msgid "Image printing"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:224
+msgid "Page setup"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:225
+#, fuzzy
+msgid "Print preview"
+msgstr "Εκτύπωση"
+
+#: ..\../main/tools/simpleprinttool.cpp:272
+#, fuzzy
+msgid "Print image"
+msgstr "Εκτύπωση"
+
+#: ..\../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr ""
+
+#: ..\../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr ""
+
+#: ..\../main/tools/undotool.cpp:110
+msgid "Redo"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:153
+msgid "Enable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:267
+#, fuzzy
+msgid "Add column"
+msgstr "Προσθήκη"
+
+#: ..\../main/tools/windowlayouttool.cpp:268
+#, fuzzy
+msgid "Add row"
+msgstr "Προσθήκη"
+
+#: ..\../main/tools/windowlayouttool.cpp:270
+msgid "Remove column"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:271
+msgid "Remove row"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:82
+msgid "The tool is already registered"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:187
+msgid "The module "
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:49
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:56
+msgid "Unable to load PNG image resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:63
+msgid "Unable to load GIF animation resource"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:219
+msgid "Enter the calibration value"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:225
+msgid "The calibration value is too low"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "The calibration value is too high"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr ""
+
+#: ..\../widgets/gui/selecciontextobase.cpp:26
+msgid "Note"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1101 ..\../widgets/wangulo.cpp:1103
+msgid "Type"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1101
+msgid "Normal"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1103
+msgid "Cobb"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:721 ..\../widgets/wfreeform.cpp:470
+#: ..\../widgets/wpolygon.cpp:574
+msgid "Center (I)"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:727 ..\../widgets/wfreeform.cpp:476
+#: ..\../widgets/wpolygon.cpp:580
+msgid "Center (M)"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:762 ..\../widgets/welipse.cpp:766
+msgid "Greater Radius"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:763 ..\../widgets/welipse.cpp:767
+msgid "Lower Radius"
+msgstr ""
+
+#: ..\../widgets/wfreeform.cpp:482 ..\../widgets/wpolygon.cpp:586
+msgid "Number of Vertex"
+msgstr ""
+
+#: ..\../widgets/wpunto.cpp:353
+msgid "Position (I)"
+msgstr ""
+
+#: ..\../widgets/wpunto.cpp:358
+msgid "Position (M)"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:558
+msgid "Image Calibration"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:663
+msgid "Length"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:668
+msgid "Points (I)"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:675
+msgid "Points (M)"
+msgstr ""
+
+#: ..\../widgets/wtextbox.cpp:445
+msgid "Default text"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:41
+#, fuzzy
+msgid "Commit date"
+msgstr "Ημερομηνία"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:214
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:219
+msgid "Modified"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr "644654645"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:130
+msgid "Commit inform"
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedades.cpp:30
+msgid "Properties of "
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:31
+msgid "Widget's Name"
+msgstr ""
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr ""
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr ""
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3701
+msgid "Regular expression invalid: '"
+msgstr ""
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.h:56
+msgid "Overwrite Paths"
+msgstr ""
+
+#: ..\../ginkgopro/ginkgo_pro_defines.h:21
+msgid "Professional DICOM CADx environment"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservers.h:39
+msgid "Server not found"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:99
+msgid "DICOM Query/Retrieve"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:123
+msgid "Not found"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+msgid "Advanced Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+#, fuzzy
+msgid "Edit profile"
+msgstr "Προφίλ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+#, fuzzy
+msgid "Add/Edit Location"
+msgstr "Προσθήκη"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+#, fuzzy
+msgid "Add window/level"
+msgstr "Προσθήκη"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+#, fuzzy
+msgid "Add tag"
+msgstr "Προσθήκη"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+msgid "Setup window position"
+msgstr ""
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.h:61
+msgid "Closing"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+msgid "DICOM Dir configuration"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:70
+msgid "Open Ginkgo Cloud"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:123
+#, fuzzy
+msgid "Ginkgo Cloud search"
+msgstr "Αναζήτηση"
+
+#: ..\../main/gui/history3/confirmdeletedialog.h:24
+msgid " from History?"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.h:100
+msgid "Medical history"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.h:161
+msgid "Open With ..."
+msgstr ""
+
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Select a View"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+msgid "Message detail"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+msgid "Log node"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:87
+msgid "Closing Ginkgo CADx"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltagsbase.h:57
+msgid "DICOM Inspector"
+msgstr ""
+
+#: ..\../main/license.h:31
+msgid "Open Source DICOM CADx environment"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.h:65
+msgid "Calibration"
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedadesbase.h:62
+msgid "Properties of ..."
+msgstr ""
+
+#: ..\../wx/thumbnailctrl/thumbnailwidget.h:44
+msgid "Image Browser Dialog"
+msgstr ""
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+msgid "Test title"
+msgstr ""
+
+#, fuzzy
+#~ msgid "The key files will not be exported"
+#~ msgstr "όλα τα αρχεία"
+
+#, fuzzy
+#~ msgid "All"
+#~ msgstr "όλα τα αρχεία"
+
+#~ msgid "JPG"
+#~ msgstr "JPG"
+
+#~ msgid "BMP"
+#~ msgstr "BMP"
+
+#~ msgid "Content"
+#~ msgstr "Περιεχόμενο"
+
+#~ msgid "Color"
+#~ msgstr "Χρώμα"
+
+#~ msgid "0"
+#~ msgstr "0"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">"
+#~ msgstr ">"
+
+#~ msgid "<"
+#~ msgstr "<"
+
+#~ msgid "unknown column"
+#~ msgstr "άγνωστη στήλη"
+
+#~ msgid "Zoom"
+#~ msgstr "Μεγέθυνση"
+
+#~ msgid "Alphabetic Mode"
+#~ msgstr "Αλφαβητική σειρά"
+
+#~ msgid "Down"
+#~ msgstr "Κάτω"
+
+#~ msgid " WL"
+#~ msgstr " WL"
+
+#~ msgid " WW"
+#~ msgstr " WW"
+
+#~ msgid "&Save"
+#~ msgstr "&Αποθήκευση"
+
+#~ msgid "1.0"
+#~ msgstr "1.0"
+
+#~ msgid "10:20"
+#~ msgstr "10:20"
+
+#~ msgid "1x1"
+#~ msgstr "1x1"
+
+#~ msgid "1x2"
+#~ msgstr "1x2"
+
+#~ msgid "2X2"
+#~ msgstr "2X2"
+
+#~ msgid "2x1"
+#~ msgstr "2x1"
+
+#~ msgid "31/02/2010"
+#~ msgstr "31/02/2010"
+
+#~ msgid "31/08/1983"
+#~ msgstr "31/08/1983"
+
+#~ msgid "3D tools"
+#~ msgstr "Εργαλεία 3D"
+
+#~ msgid "3x3"
+#~ msgstr "3x3"
+
+#~ msgid "4x4"
+#~ msgstr "4x4"
+
+#~ msgid "Code:"
+#~ msgstr "Κωδικός:"
+
+#~ msgid "Correction"
+#~ msgstr "Διόρθωση"
+
+#~ msgid "Zoom -"
+#~ msgstr "Μεγέθυνση -"
diff --git a/cadxcore/lang/el/wxstd.mo b/cadxcore/lang/el/wxstd.mo
new file mode 100644
index 0000000..a9a05ea
Binary files /dev/null and b/cadxcore/lang/el/wxstd.mo differ
diff --git a/cadxcore/lang/el/wxstd.po b/cadxcore/lang/el/wxstd.po
new file mode 100644
index 0000000..f1879f9
--- /dev/null
+++ b/cadxcore/lang/el/wxstd.po
@@ -0,0 +1,9455 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: wxWidgets 3.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-01 19:04+0200\n"
+"PO-Revision-Date: 2005-02-16 09:03+0200\n"
+"Last-Translator: InterZone <info at interzone.gr>\n"
+"Language-Team: Tsolakos Stavros <tsolako1 at otenet.gr>, Nassos Yiannopoulos "
+"<nassosy at compulink.gr>\n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../src/common/debugrpt.cpp:591
+msgid ""
+"\n"
+"Please send this report to the program maintainer, thank you!\n"
+msgstr ""
+
+#: ../src/richtext/richtextstyledlg.cpp:210
+#: ../src/richtext/richtextstyledlg.cpp:222
+msgid " "
+msgstr " "
+
+#: ../src/generic/dbgrptg.cpp:326
+msgid "              Thank you and we're sorry for the inconvenience!\n"
+msgstr ""
+
+#: ../src/common/prntbase.cpp:546
+#, fuzzy, c-format
+msgid " (copy %d of %d)"
+msgstr "Σελίδα %d από %d"
+
+#: ../src/common/log.cpp:425
+#, c-format
+msgid " (error %ld: %s)"
+msgstr " (σφάλμα %ld: %s)"
+
+#: ../src/common/imagtiff.cpp:75
+#, fuzzy, c-format
+msgid " (in module \"%s\")"
+msgstr "tiff module: %s"
+
+#: ../src/common/docview.cpp:1624
+msgid " - "
+msgstr " - "
+
+#: ../src/richtext/richtextprint.cpp:588 ../src/html/htmprint.cpp:704
+msgid " Preview"
+msgstr " Προεπισκόπηση"
+
+#: ../src/common/fontcmn.cpp:811
+#, fuzzy
+msgid " bold"
+msgstr "έντονο"
+
+#: ../src/common/fontcmn.cpp:827
+#, fuzzy
+msgid " italic"
+msgstr "πλάγιο"
+
+#: ../src/common/fontcmn.cpp:807
+#, fuzzy
+msgid " light"
+msgstr "απαλό(light)"
+
+#: ../src/common/paper.cpp:118
+msgid "#10 Envelope, 4 1/8 x 9 1/2 in"
+msgstr "#10 Φάκελος, 4 1/8 x 9 1/2 ίντσες"
+
+#: ../src/common/paper.cpp:119
+msgid "#11 Envelope, 4 1/2 x 10 3/8 in"
+msgstr "#11 Φάκελος, 4 1/2 x 10 3/8 ίντσες"
+
+#: ../src/common/paper.cpp:120
+msgid "#12 Envelope, 4 3/4 x 11 in"
+msgstr "#12 Φάκελος, 4 3/4 x 11 ίντσες"
+
+#: ../src/common/paper.cpp:121
+msgid "#14 Envelope, 5 x 11 1/2 in"
+msgstr "#14 Φάκελος, 5 x 11 1/2 ίντσες"
+
+#: ../src/common/paper.cpp:117
+msgid "#9 Envelope, 3 7/8 x 8 7/8 in"
+msgstr "#9 Φάκελος, 3 7/8 x 8 7/8 ίντσες"
+
+#: ../src/html/helpwnd.cpp:1044
+#, fuzzy, c-format
+msgid "%d of %lu"
+msgstr "%i από %i"
+
+#: ../src/html/helpwnd.cpp:1681 ../src/html/helpwnd.cpp:1719
+#, c-format
+msgid "%i of %i"
+msgstr "%i από %i"
+
+#: ../src/generic/filectrlg.cpp:315
+#, fuzzy, c-format
+msgid "%ld byte"
+msgid_plural "%ld bytes"
+msgstr[0] "%ld bytes"
+msgstr[1] "%ld bytes"
+
+#: ../src/html/helpwnd.cpp:1046
+#, fuzzy, c-format
+msgid "%lu of %lu"
+msgstr "%i από %i"
+
+#: ../src/common/cmdline.cpp:1050
+#, c-format
+msgid "%s (or %s)"
+msgstr "%s (ή %s)"
+
+#: ../src/generic/logg.cpp:230
+#, c-format
+msgid "%s Error"
+msgstr "%s Σφάλμα"
+
+#: ../src/generic/logg.cpp:242
+#, c-format
+msgid "%s Information"
+msgstr "%s Πληροφορίες"
+
+#: ../src/generic/preferencesg.cpp:110
+#, fuzzy, c-format
+msgid "%s Preferences"
+msgstr "&Προτιμήσεις"
+
+#: ../src/generic/logg.cpp:234
+#, c-format
+msgid "%s Warning"
+msgstr "%s Προειδοποίηση"
+
+#: ../src/common/tarstrm.cpp:1319
+#, c-format
+msgid "%s did not fit the tar header for entry '%s'"
+msgstr ""
+
+#: ../src/common/fldlgcmn.cpp:106
+#, c-format
+msgid "%s files (%s)|%s"
+msgstr "%s αρχεία (%s)|%s"
+
+#: ../src/common/stockitem.cpp:139 ../src/html/helpfrm.cpp:142
+#: ../src/html/helpfrm.cpp:144
+msgid "&About"
+msgstr "&Περί"
+
+#: ../src/common/stockitem.cpp:207
+msgid "&Actual Size"
+msgstr "&Πραγματικό μέγεθος"
+
+#: ../src/richtext/richtextindentspage.cpp:262
+msgid "&After a paragraph:"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:128
+#: ../src/richtext/richtextliststylepage.cpp:319
+#, fuzzy
+msgid "&Alignment"
+msgstr "Στοίχιση Αριστερά"
+
+#: ../src/common/stockitem.cpp:141
+msgid "&Apply"
+msgstr "&Εφαρμογή"
+
+#: ../src/richtext/richtextstyledlg.cpp:251
+#, fuzzy
+msgid "&Apply Style"
+msgstr "&Εφαρμογή"
+
+#: ../src/msw/mdi.cpp:175
+msgid "&Arrange Icons"
+msgstr "&Τακτοποίηση εικονιδίων"
+
+#: ../src/common/stockitem.cpp:195
+msgid "&Ascending"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:142
+msgid "&Back"
+msgstr "&Πίσω"
+
+#: ../src/richtext/richtextstylepage.cpp:113
+msgid "&Based on:"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:253
+msgid "&Before a paragraph:"
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:271
+#, fuzzy
+msgid "&Bg colour:"
+msgstr "&Χρώμα:"
+
+#: ../src/common/stockitem.cpp:143
+msgid "&Bold"
+msgstr "&Έντονο"
+
+#: ../src/common/stockitem.cpp:144
+msgid "&Bottom"
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:359
+#: ../src/richtext/richtextborderspage.cpp:503
+#: ../src/richtext/richtextmarginspage.cpp:260
+#: ../src/richtext/richtextmarginspage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:637
+#: ../src/richtext/richtextsizepage.cpp:644
+msgid "&Bottom:"
+msgstr ""
+
+#: ../include/wx/richtext/richtextbuffer.h:3530
+#, fuzzy
+msgid "&Box"
+msgstr "&Έντονο"
+
+#: ../src/richtext/richtextliststylepage.cpp:210
+#: ../src/richtext/richtextbulletspage.cpp:159
+msgid "&Bullet style:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:146
+msgid "&CD-Rom"
+msgstr ""
+
+#: ../src/generic/wizard.cpp:432 ../src/generic/fontdlgg.cpp:470
+#: ../src/generic/fontdlgg.cpp:489 ../src/osx/carbon/fontdlg.cpp:588
+#: ../src/common/stockitem.cpp:145
+msgid "&Cancel"
+msgstr "&Ακυρο"
+
+#: ../src/msw/mdi.cpp:171
+msgid "&Cascade"
+msgstr "&Επικάλυψη"
+
+#: ../include/wx/richtext/richtextbuffer.h:5587
+#, fuzzy
+msgid "&Cell"
+msgstr "&Ακυρο"
+
+#: ../src/richtext/richtextsymboldlg.cpp:439
+msgid "&Character code:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:147
+msgid "&Clear"
+msgstr "&Καθαρισμός"
+
+#: ../src/generic/logg.cpp:522 ../src/common/stockitem.cpp:148
+#: ../src/common/prntbase.cpp:1570 ../src/univ/themes/win32.cpp:3756
+#: ../src/html/helpfrm.cpp:139
+msgid "&Close"
+msgstr "&Κλείσιμο"
+
+#: ../src/common/stockitem.cpp:193
+#, fuzzy
+msgid "&Color"
+msgstr "&Χρώμα:"
+
+#: ../src/richtext/richtextfontpage.cpp:258
+#, fuzzy
+msgid "&Colour:"
+msgstr "&Χρώμα:"
+
+#: ../src/common/stockitem.cpp:149
+#, fuzzy
+msgid "&Convert"
+msgstr "Περιεχόμενα"
+
+#: ../src/richtext/richtextctrl.cpp:326 ../src/osx/textctrl_osx.cpp:583
+#: ../src/common/stockitem.cpp:150 ../src/msw/textctrl.cpp:2284
+msgid "&Copy"
+msgstr "&Αντιγραφή"
+
+#: ../src/generic/hyperlinkg.cpp:156
+#, fuzzy
+msgid "&Copy URL"
+msgstr "&Αντιγραφή"
+
+#: ../src/common/headerctrlcmn.cpp:328
+#, fuzzy
+msgid "&Customize..."
+msgstr "μέγεθος γραμματοσειράς"
+
+#: ../src/generic/dbgrptg.cpp:334
+msgid "&Debug report preview:"
+msgstr ""
+
+#: ../src/richtext/richtexttabspage.cpp:142
+#: ../src/richtext/richtextctrl.cpp:328 ../src/osx/textctrl_osx.cpp:585
+#: ../src/common/stockitem.cpp:152 ../src/msw/textctrl.cpp:2286
+msgid "&Delete"
+msgstr "&Διαγραφή"
+
+#: ../src/richtext/richtextstyledlg.cpp:269
+#, fuzzy
+msgid "&Delete Style..."
+msgstr "Διαγραφή στοιχείου"
+
+#: ../src/common/stockitem.cpp:196
+msgid "&Descending"
+msgstr ""
+
+#: ../src/generic/logg.cpp:688
+msgid "&Details"
+msgstr "&Λεπτομέρειες"
+
+#: ../src/common/stockitem.cpp:153
+msgid "&Down"
+msgstr "&Κάτω"
+
+#: ../src/common/stockitem.cpp:154
+msgid "&Edit"
+msgstr ""
+
+#: ../src/richtext/richtextstyledlg.cpp:263
+#, fuzzy
+msgid "&Edit Style..."
+msgstr "Επεξεργασία στοιχείου"
+
+#: ../src/common/stockitem.cpp:155
+msgid "&Execute"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:157 ../src/html/helpfrm.cpp:146
+msgid "&File"
+msgstr "&Αρχείο"
+
+#: ../src/common/stockitem.cpp:158
+msgid "&Find"
+msgstr "&Εύρεση"
+
+#: ../src/generic/wizard.cpp:626
+msgid "&Finish"
+msgstr "&Τέλος"
+
+#: ../src/common/stockitem.cpp:159
+#, fuzzy
+msgid "&First"
+msgstr "πρώτο"
+
+#: ../src/richtext/richtextsizepage.cpp:244
+msgid "&Floating mode:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:160
+#, fuzzy
+msgid "&Floppy"
+msgstr "&Αντιγραφή"
+
+#: ../src/common/stockitem.cpp:194
+#, fuzzy
+msgid "&Font"
+msgstr "Οικογένεια γραμματοσειράς:"
+
+#: ../src/generic/fontdlgg.cpp:371
+msgid "&Font family:"
+msgstr "Οικογένεια γραμματοσειράς:"
+
+#: ../src/richtext/richtextliststylepage.cpp:194
+msgid "&Font for Level..."
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:156
+#: ../src/richtext/richtextsymboldlg.cpp:400
+#, fuzzy
+msgid "&Font:"
+msgstr "Οικογένεια γραμματοσειράς:"
+
+#: ../src/common/stockitem.cpp:161
+msgid "&Forward"
+msgstr "&Εμπρός"
+
+#: ../src/richtext/richtextsymboldlg.cpp:451
+#, fuzzy
+msgid "&From:"
+msgstr "Από:"
+
+#: ../src/common/stockitem.cpp:162
+msgid "&Harddisk"
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:351
+#: ../src/richtext/richtextsizepage.cpp:358
+#, fuzzy
+msgid "&Height:"
+msgstr "&Βάρος:"
+
+#: ../src/generic/wizard.cpp:435 ../src/richtext/richtextstyledlg.cpp:303
+#: ../src/richtext/richtextsymboldlg.cpp:479 ../src/osx/menu_osx.cpp:785
+#: ../src/common/stockitem.cpp:163 ../src/html/helpfrm.cpp:147
+msgid "&Help"
+msgstr "&Βοήθεια"
+
+#: ../include/wx/richmsgdlg.h:30
+#, fuzzy
+msgid "&Hide details"
+msgstr "&Λεπτομέρειες"
+
+#: ../src/common/stockitem.cpp:164
+msgid "&Home"
+msgstr "&Αρχική"
+
+#: ../src/richtext/richtextindentspage.cpp:184
+#: ../src/richtext/richtextliststylepage.cpp:372
+msgid "&Indentation (tenths of a mm)"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:167
+#: ../src/richtext/richtextliststylepage.cpp:356
+#, fuzzy
+msgid "&Indeterminate"
+msgstr "&Υπογράμμιση"
+
+#: ../src/common/stockitem.cpp:166
+msgid "&Index"
+msgstr "&Ευρετήριο"
+
+#: ../src/common/stockitem.cpp:167
+#, fuzzy
+msgid "&Info"
+msgstr "&Αναίρεση"
+
+#: ../src/common/stockitem.cpp:168
+msgid "&Italic"
+msgstr "&Πλάγια"
+
+#: ../src/common/stockitem.cpp:169
+msgid "&Jump to"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:153
+#: ../src/richtext/richtextliststylepage.cpp:342
+#, fuzzy
+msgid "&Justified"
+msgstr "Ευθυγραμμισμένα"
+
+#: ../src/common/stockitem.cpp:174
+#, fuzzy
+msgid "&Last"
+msgstr "&Επικόληση"
+
+#: ../src/richtext/richtextindentspage.cpp:139
+#: ../src/richtext/richtextliststylepage.cpp:328
+msgid "&Left"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:195
+#: ../src/richtext/richtextborderspage.cpp:269
+#: ../src/richtext/richtextborderspage.cpp:413
+#: ../src/richtext/richtextliststylepage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:187
+#: ../src/richtext/richtextmarginspage.cpp:301
+#: ../src/richtext/richtextsizepage.cpp:532
+#: ../src/richtext/richtextsizepage.cpp:539
+msgid "&Left:"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:183
+msgid "&List level:"
+msgstr ""
+
+#: ../src/generic/logg.cpp:523
+msgid "&Log"
+msgstr "&Καταγραφή"
+
+#: ../src/univ/themes/win32.cpp:3748
+msgid "&Move"
+msgstr "&Μετακίνηση"
+
+#: ../src/richtext/richtextsizepage.cpp:672
+msgid "&Move the object to:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:175
+#, fuzzy
+msgid "&Network"
+msgstr "&Νέο"
+
+#: ../src/richtext/richtexttabspage.cpp:136 ../src/common/stockitem.cpp:176
+msgid "&New"
+msgstr "&Νέο"
+
+#: ../src/aui/tabmdi.cpp:111 ../src/generic/mdig.cpp:100
+#: ../src/msw/mdi.cpp:176
+msgid "&Next"
+msgstr "&Επόμενο"
+
+#: ../src/generic/wizard.cpp:431 ../src/generic/wizard.cpp:626
+msgid "&Next >"
+msgstr "&Επόμενο >"
+
+#: ../src/richtext/richtextsizepage.cpp:681
+msgid "&Next Paragraph"
+msgstr ""
+
+#: ../src/generic/tipdlg.cpp:276
+msgid "&Next Tip"
+msgstr "&Επόμενο Tip"
+
+#: ../src/richtext/richtextstylepage.cpp:123
+#, fuzzy
+msgid "&Next style:"
+msgstr "&Επόμενο >"
+
+#: ../src/common/stockitem.cpp:177 ../src/msw/msgdlg.cpp:476
+msgid "&No"
+msgstr "&Όχι"
+
+#: ../src/generic/dbgrptg.cpp:356
+#, fuzzy
+msgid "&Notes:"
+msgstr "&Όχι"
+
+#: ../src/richtext/richtextbulletspage.cpp:264
+msgid "&Number:"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:475 ../src/generic/fontdlgg.cpp:482
+#: ../src/osx/carbon/fontdlg.cpp:594 ../src/common/stockitem.cpp:178
+msgid "&OK"
+msgstr "&OK"
+
+#: ../src/generic/dbgrptg.cpp:342 ../src/common/stockitem.cpp:179
+#: ../src/html/helpfrm.cpp:137
+msgid "&Open..."
+msgstr "&Ανοιγμα..."
+
+#: ../src/richtext/richtextindentspage.cpp:222
+msgid "&Outline level:"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:293
+msgid "&Page Break"
+msgstr ""
+
+#: ../src/richtext/richtextctrl.cpp:327 ../src/osx/textctrl_osx.cpp:584
+#: ../src/common/stockitem.cpp:180 ../src/msw/textctrl.cpp:2285
+msgid "&Paste"
+msgstr "&Επικόληση"
+
+#: ../include/wx/richtext/richtextbuffer.h:4655
+msgid "&Picture"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:422
+msgid "&Point size:"
+msgstr "Μέγεθος κουκίδας:"
+
+#: ../src/richtext/richtexttabspage.cpp:114
+msgid "&Position (tenths of a mm):"
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:514
+#, fuzzy
+msgid "&Position mode:"
+msgstr "Ερώτημα"
+
+#: ../src/common/stockitem.cpp:181
+msgid "&Preferences"
+msgstr "&Προτιμήσεις"
+
+#: ../src/aui/tabmdi.cpp:112 ../src/generic/mdig.cpp:101
+#: ../src/msw/mdi.cpp:177
+msgid "&Previous"
+msgstr "&Προηγούμενο"
+
+#: ../src/richtext/richtextsizepage.cpp:675
+#, fuzzy
+msgid "&Previous Paragraph"
+msgstr "Προηγούμενη σελίδα"
+
+#: ../src/common/stockitem.cpp:183
+msgid "&Print..."
+msgstr "&Εκτύπωση..."
+
+#: ../src/richtext/richtextctrl.cpp:332 ../src/richtext/richtextctrl.cpp:4945
+#: ../src/common/stockitem.cpp:184
+msgid "&Properties"
+msgstr "&Ιδιότητες"
+
+#: ../src/common/stockitem.cpp:156
+msgid "&Quit"
+msgstr "Έ&ξοδος"
+
+#: ../src/richtext/richtextctrl.cpp:323 ../src/osx/textctrl_osx.cpp:580
+#: ../src/common/stockitem.cpp:185 ../src/common/cmdproc.cpp:293
+#: ../src/common/cmdproc.cpp:300 ../src/msw/textctrl.cpp:2281
+msgid "&Redo"
+msgstr "&Επανάληψη"
+
+#: ../src/common/cmdproc.cpp:289 ../src/common/cmdproc.cpp:309
+msgid "&Redo "
+msgstr "&Επανάληψη "
+
+#: ../src/richtext/richtextstyledlg.cpp:257
+msgid "&Rename Style..."
+msgstr ""
+
+#: ../src/generic/fdrepdlg.cpp:179
+msgid "&Replace"
+msgstr "&Αντικατάσταση"
+
+#: ../src/richtext/richtextstyledlg.cpp:287
+msgid "&Restart numbering"
+msgstr ""
+
+#: ../src/univ/themes/win32.cpp:3747
+msgid "&Restore"
+msgstr "&Επαναφορά"
+
+#: ../src/richtext/richtextindentspage.cpp:146
+#: ../src/richtext/richtextliststylepage.cpp:335
+#, fuzzy
+msgid "&Right"
+msgstr "Απαλό(light)"
+
+#: ../src/richtext/richtextindentspage.cpp:213
+#: ../src/richtext/richtextborderspage.cpp:299
+#: ../src/richtext/richtextborderspage.cpp:443
+#: ../src/richtext/richtextliststylepage.cpp:399
+#: ../src/richtext/richtextmarginspage.cpp:212
+#: ../src/richtext/richtextmarginspage.cpp:326
+#: ../src/richtext/richtextsizepage.cpp:602
+#: ../src/richtext/richtextsizepage.cpp:609
+#, fuzzy
+msgid "&Right:"
+msgstr "&Βάρος:"
+
+#: ../src/common/stockitem.cpp:190
+msgid "&Save"
+msgstr "&Αποθήκευση"
+
+#: ../src/common/stockitem.cpp:191
+#, fuzzy
+msgid "&Save as"
+msgstr "Αποθήκευση ως"
+
+#: ../include/wx/richmsgdlg.h:29
+#, fuzzy
+msgid "&See details"
+msgstr "&Λεπτομέρειες"
+
+#: ../src/generic/tipdlg.cpp:270
+msgid "&Show tips at startup"
+msgstr "&Εμφάνιση tips κατά την εκκίνηση"
+
+#: ../src/univ/themes/win32.cpp:3750
+msgid "&Size"
+msgstr "&Μέγεθος"
+
+#: ../src/richtext/richtextfontpage.cpp:168
+#, fuzzy
+msgid "&Size:"
+msgstr "&Μέγεθος"
+
+#: ../src/generic/progdlgg.cpp:282
+#, fuzzy
+msgid "&Skip"
+msgstr "Παράλειψη"
+
+#: ../src/richtext/richtextindentspage.cpp:242
+#: ../src/richtext/richtextliststylepage.cpp:417
+msgid "&Spacing (tenths of a mm)"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:197
+msgid "&Spell Check"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:198
+msgid "&Stop"
+msgstr "&Διακοπή"
+
+#: ../src/richtext/richtextfontpage.cpp:284 ../src/common/stockitem.cpp:199
+msgid "&Strikethrough"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:382 ../src/richtext/richtextstylepage.cpp:104
+msgid "&Style:"
+msgstr "&Στυλ:"
+
+#: ../src/richtext/richtextstyledlg.cpp:198
+#, fuzzy
+msgid "&Styles:"
+msgstr "&Στυλ:"
+
+#: ../src/richtext/richtextsymboldlg.cpp:413
+msgid "&Subset:"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:222
+#, fuzzy
+msgid "&Symbol:"
+msgstr "&Στυλ:"
+
+#: ../include/wx/richtext/richtextbuffer.h:5679
+msgid "&Table"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:200
+#, fuzzy
+msgid "&Top"
+msgstr "&Αντιγραφή"
+
+#: ../src/richtext/richtextborderspage.cpp:329
+#: ../src/richtext/richtextborderspage.cpp:473
+#: ../src/richtext/richtextmarginspage.cpp:235
+#: ../src/richtext/richtextmarginspage.cpp:349
+#: ../src/richtext/richtextsizepage.cpp:567
+#: ../src/richtext/richtextsizepage.cpp:574
+#, fuzzy
+msgid "&Top:"
+msgstr "Πρός:"
+
+#: ../src/generic/fontdlgg.cpp:444 ../src/common/stockitem.cpp:202
+msgid "&Underline"
+msgstr "&Υπογράμμιση"
+
+#: ../src/richtext/richtextfontpage.cpp:243
+#, fuzzy
+msgid "&Underlining:"
+msgstr "&Υπογράμμιση"
+
+#: ../src/richtext/richtextctrl.cpp:322 ../src/osx/textctrl_osx.cpp:579
+#: ../src/common/stockitem.cpp:203 ../src/common/cmdproc.cpp:271
+#: ../src/msw/textctrl.cpp:2280
+msgid "&Undo"
+msgstr "&Αναίρεση"
+
+#: ../src/common/cmdproc.cpp:265
+msgid "&Undo "
+msgstr "&Αναίρεση "
+
+#: ../src/common/stockitem.cpp:204
+msgid "&Unindent"
+msgstr "Α&ποστοίχιση"
+
+#: ../src/common/stockitem.cpp:205
+msgid "&Up"
+msgstr "&Επάνω"
+
+#: ../src/richtext/richtextsizepage.cpp:278
+#, fuzzy
+msgid "&Vertical alignment:"
+msgstr "Στοίχιση Αριστερά"
+
+#: ../src/generic/dbgrptg.cpp:340
+#, fuzzy
+msgid "&View..."
+msgstr "&Ανοιγμα..."
+
+#: ../src/generic/fontdlgg.cpp:393
+msgid "&Weight:"
+msgstr "&Βάρος:"
+
+#: ../src/richtext/richtextsizepage.cpp:317
+#: ../src/richtext/richtextsizepage.cpp:324
+#, fuzzy
+msgid "&Width:"
+msgstr "&Βάρος:"
+
+#: ../src/aui/tabmdi.cpp:311 ../src/aui/tabmdi.cpp:327
+#: ../src/aui/tabmdi.cpp:329 ../src/generic/mdig.cpp:294
+#: ../src/generic/mdig.cpp:310 ../src/generic/mdig.cpp:314
+#: ../src/msw/mdi.cpp:77
+msgid "&Window"
+msgstr "&Παράθυρο"
+
+#: ../src/common/stockitem.cpp:206 ../src/msw/msgdlg.cpp:476
+msgid "&Yes"
+msgstr "&Ναι"
+
+#: ../src/common/config.cpp:523 ../src/msw/regconf.cpp:258
+#, c-format
+msgid "'%s' has extra '..', ignored."
+msgstr "'%s' περιέχει επιπλέον '..', αγνοήθηκαν."
+
+#: ../src/common/valtext.cpp:249 ../src/common/valtext.cpp:251
+#: ../src/common/valtext.cpp:253 ../src/common/valtext.cpp:255
+#, c-format
+msgid "'%s' is invalid"
+msgstr "'%s' δεν ισχύει"
+
+#: ../src/common/cmdline.cpp:948 ../src/common/cmdline.cpp:966
+#, c-format
+msgid "'%s' is not a correct numeric value for option '%s'."
+msgstr "'%s' δεν είναι μία σωστή αριθμητική τιμή για την επιλογή '%s'."
+
+#: ../src/common/translation.cpp:1086
+#, c-format
+msgid "'%s' is not a valid message catalog."
+msgstr "'%s' δεν είναι ένας σωστός κατάλογος μηνυμάτων."
+
+#: ../src/common/textbuf.cpp:239
+#, c-format
+msgid "'%s' is probably a binary buffer."
+msgstr "'%s' είναι πιθανόν ένας δυαδικός ( binary ) buffer"
+
+#: ../src/common/valtext.cpp:247
+#, c-format
+msgid "'%s' should be numeric."
+msgstr "'%s' πρέπει να είναι αριθμητικό."
+
+#: ../src/common/valtext.cpp:239
+#, c-format
+msgid "'%s' should only contain ASCII characters."
+msgstr "'%s' πρέπει να περιέχει ASCII χαρακτήρες."
+
+#: ../src/common/valtext.cpp:241
+#, c-format
+msgid "'%s' should only contain alphabetic characters."
+msgstr "'%s' πρέπει να περιέχει μόνο αλφαβητικούς χαρακτήρες."
+
+#: ../src/common/valtext.cpp:243
+#, c-format
+msgid "'%s' should only contain alphabetic or numeric characters."
+msgstr "'%s' πρέπει να περιέχει μόνο αλφαβητικούς ή αριθμητικούς χαρακτήρες."
+
+#: ../src/common/valtext.cpp:245
+#, fuzzy, c-format
+msgid "'%s' should only contain digits."
+msgstr "'%s' πρέπει να περιέχει ASCII χαρακτήρες."
+
+#: ../src/richtext/richtextliststylepage.cpp:229
+#: ../src/richtext/richtextbulletspage.cpp:179
+msgid "(*)"
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:976
+msgid "(Help)"
+msgstr "(Βοήθεια)"
+
+#: ../src/richtext/richtextliststylepage.cpp:481
+#: ../src/richtext/richtextbulletspage.cpp:286
+msgid "(None)"
+msgstr ""
+
+#: ../src/richtext/richtextsymboldlg.cpp:504
+#, fuzzy
+msgid "(Normal text)"
+msgstr "Κανονική γραμματοσειρά:"
+
+#: ../src/html/helpwnd.cpp:426 ../src/html/helpwnd.cpp:1119
+#: ../src/html/helpwnd.cpp:1745
+msgid "(bookmarks)"
+msgstr "(σελιδοδείκτες)"
+
+#: ../src/richtext/richtextindentspage.cpp:274
+#: ../src/richtext/richtextindentspage.cpp:286
+#: ../src/richtext/richtextindentspage.cpp:287
+#: ../src/richtext/richtextindentspage.cpp:311
+#: ../src/richtext/richtextindentspage.cpp:326
+#: ../src/richtext/richtextformatdlg.cpp:831
+#: ../src/richtext/richtextfontpage.cpp:331
+#: ../src/richtext/richtextfontpage.cpp:335
+#: ../src/richtext/richtextfontpage.cpp:339
+#: ../src/richtext/richtextliststylepage.cpp:448
+#: ../src/richtext/richtextliststylepage.cpp:460
+#: ../src/richtext/richtextliststylepage.cpp:461
+#, fuzzy
+msgid "(none)"
+msgstr "ανώνυμο"
+
+#: ../src/richtext/richtextliststylepage.cpp:492
+#: ../src/richtext/richtextbulletspage.cpp:297
+msgid "*"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:236
+#: ../src/richtext/richtextbulletspage.cpp:186
+msgid "*)"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:495
+#: ../src/richtext/richtextbulletspage.cpp:300
+msgid "+"
+msgstr ""
+
+#: ../src/msw/utils.cpp:1324
+msgid ", 64-bit edition"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:493
+#: ../src/richtext/richtextbulletspage.cpp:298
+msgid "-"
+msgstr ""
+
+#: ../src/generic/filepickerg.cpp:66
+#, fuzzy
+msgid "..."
+msgstr ".."
+
+#: ../src/richtext/richtextindentspage.cpp:276
+#: ../src/richtext/richtextliststylepage.cpp:450
+msgid "1.1"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:277
+#: ../src/richtext/richtextliststylepage.cpp:451
+msgid "1.2"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:278
+#: ../src/richtext/richtextliststylepage.cpp:452
+msgid "1.3"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:279
+#: ../src/richtext/richtextliststylepage.cpp:453
+msgid "1.4"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:280
+#: ../src/richtext/richtextliststylepage.cpp:454
+msgid "1.5"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:455
+msgid "1.6"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:282
+#: ../src/richtext/richtextliststylepage.cpp:456
+msgid "1.7"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:283
+#: ../src/richtext/richtextliststylepage.cpp:457
+msgid "1.8"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:284
+#: ../src/richtext/richtextliststylepage.cpp:458
+msgid "1.9"
+msgstr ""
+
+#: ../src/common/paper.cpp:141
+#, fuzzy
+msgid "10 x 11 in"
+msgstr "10 x 14 ίντσες"
+
+#: ../src/common/paper.cpp:114
+msgid "10 x 14 in"
+msgstr "10 x 14 ίντσες"
+
+#: ../src/common/paper.cpp:115
+msgid "11 x 17 in"
+msgstr "11 x 17 ίντσες"
+
+#: ../src/common/paper.cpp:185
+#, fuzzy
+msgid "12 x 11 in"
+msgstr "10 x 14 ίντσες"
+
+#: ../src/common/paper.cpp:142
+#, fuzzy
+msgid "15 x 11 in"
+msgstr "10 x 14 ίντσες"
+
+#: ../src/richtext/richtextindentspage.cpp:285
+#: ../src/richtext/richtextliststylepage.cpp:459
+msgid "2"
+msgstr ""
+
+#: ../src/common/paper.cpp:133
+msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in"
+msgstr "6 3/4 Φάκελος, 3 5/8 x 6 1/2 ίντσες"
+
+#: ../src/common/paper.cpp:140
+#, fuzzy
+msgid "9 x 11 in"
+msgstr "11 x 17 ίντσες"
+
+#: ../src/html/htmprint.cpp:431
+msgid ": file does not exist!"
+msgstr ": το αρχείο δεν υπάρχει!"
+
+#: ../src/common/fontmap.cpp:199
+msgid ": unknown charset"
+msgstr ": άγνωστο σετ χαρακτήρων"
+
+#: ../src/common/fontmap.cpp:413
+msgid ": unknown encoding"
+msgstr ": άγνωστη κωδικοποίηση"
+
+#: ../src/generic/wizard.cpp:437
+msgid "< &Back"
+msgstr "< &Πίσω"
+
+#: ../src/osx/carbon/fontdlg.cpp:608 ../src/osx/carbon/fontdlg.cpp:815
+#: ../src/osx/carbon/fontdlg.cpp:835
+#, fuzzy
+msgid "<Any Decorative>"
+msgstr "Διακοσμητικός"
+
+#: ../src/osx/carbon/fontdlg.cpp:609 ../src/osx/carbon/fontdlg.cpp:817
+#: ../src/osx/carbon/fontdlg.cpp:837
+#, fuzzy
+msgid "<Any Modern>"
+msgstr "Μοντέρνο"
+
+#: ../src/osx/carbon/fontdlg.cpp:607 ../src/osx/carbon/fontdlg.cpp:813
+#: ../src/osx/carbon/fontdlg.cpp:833
+#, fuzzy
+msgid "<Any Roman>"
+msgstr "Ρωμαϊκό"
+
+#: ../src/osx/carbon/fontdlg.cpp:610 ../src/osx/carbon/fontdlg.cpp:819
+#: ../src/osx/carbon/fontdlg.cpp:839
+#, fuzzy
+msgid "<Any Script>"
+msgstr "Χειρόγραφο(Script)"
+
+#: ../src/osx/carbon/fontdlg.cpp:611 ../src/osx/carbon/fontdlg.cpp:824
+#: ../src/osx/carbon/fontdlg.cpp:843
+#, fuzzy
+msgid "<Any Swiss>"
+msgstr "Ελβετικό(Swiss)"
+
+#: ../src/osx/carbon/fontdlg.cpp:612 ../src/osx/carbon/fontdlg.cpp:821
+#: ../src/osx/carbon/fontdlg.cpp:841
+#, fuzzy
+msgid "<Any Teletype>"
+msgstr "Τηλέτυπο"
+
+#: ../src/osx/carbon/fontdlg.cpp:606
+msgid "<Any>"
+msgstr ""
+
+#: ../src/generic/filectrlg.cpp:286 ../src/generic/filectrlg.cpp:309
+msgid "<DIR>"
+msgstr "<ΚΑΤΑΛΟΓΟΣ>"
+
+#: ../src/generic/filectrlg.cpp:290 ../src/generic/filectrlg.cpp:313
+msgid "<DRIVE>"
+msgstr "<ΟΔΗΓΟΣ>"
+
+#: ../src/generic/filectrlg.cpp:288 ../src/generic/filectrlg.cpp:311
+msgid "<LINK>"
+msgstr "<ΣΥΝΔΕΣΗ>"
+
+#: ../src/html/helpwnd.cpp:1279
+msgid "<b><i>Bold italic face.</i></b><br>"
+msgstr "<b><i>Εντονη πλάγια όψη.</i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1283
+msgid "<b><i>bold italic <u>underlined</u></i></b><br>"
+msgstr "<b><i>έντονα πλάγια <u>υπογραμμισμένα</u></i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1278
+msgid "<b>Bold face.</b> "
+msgstr "<b>Έντονη όψη</b>"
+
+#: ../src/html/helpwnd.cpp:1277
+msgid "<i>Italic face.</i> "
+msgstr "<i>Πλάγια όψη."
+
+#: ../src/richtext/richtextliststylepage.cpp:494
+#: ../src/richtext/richtextbulletspage.cpp:299
+#, fuzzy
+msgid ">"
+msgstr ">>"
+
+#: ../src/generic/dbgrptg.cpp:318
+msgid "A debug report has been generated in the directory\n"
+msgstr ""
+
+#: ../src/common/debugrpt.cpp:578
+msgid "A debug report has been generated. It can be found in"
+msgstr ""
+
+#: ../src/common/xtixml.cpp:418
+msgid "A non empty collection must consist of 'element' nodes"
+msgstr "Μία μη άδεια συλλογή πρέπει να αποτελείται από κόμβους 'element'"
+
+#: ../src/richtext/richtextliststylepage.cpp:304
+#: ../src/richtext/richtextliststylepage.cpp:306
+#: ../src/richtext/richtextbulletspage.cpp:257
+#: ../src/richtext/richtextbulletspage.cpp:259
+msgid "A standard bullet name."
+msgstr ""
+
+#: ../src/common/paper.cpp:218
+#, fuzzy
+msgid "A0 sheet, 841 x 1189 mm"
+msgstr "Φύλλο A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:219
+#, fuzzy
+msgid "A1 sheet, 594 x 841 mm"
+msgstr "Φύλλο A3, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:160
+msgid "A2 420 x 594 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:157
+#, fuzzy
+msgid "A3 Extra 322 x 445 mm"
+msgstr "C3 Φάκελος, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:162
+#, fuzzy
+msgid "A3 Extra Transverse 322 x 445 mm"
+msgstr "C3 Φάκελος, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:171
+#, fuzzy
+msgid "A3 Rotated 420 x 297 mm"
+msgstr "Φύλλο A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:161
+#, fuzzy
+msgid "A3 Transverse 297 x 420 mm"
+msgstr "Φύλλο A3, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:107
+msgid "A3 sheet, 297 x 420 mm"
+msgstr "Φύλλο A3, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:147
+msgid "A4 Extra 9.27 x 12.69 in"
+msgstr ""
+
+#: ../src/common/paper.cpp:154
+#, fuzzy
+msgid "A4 Plus 210 x 330 mm"
+msgstr "Φύλλο A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:172
+#, fuzzy
+msgid "A4 Rotated 297 x 210 mm"
+msgstr "Φύλλο A3, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:149
+#, fuzzy
+msgid "A4 Transverse 210 x 297 mm"
+msgstr "Φύλλο A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:98
+msgid "A4 sheet, 210 x 297 mm"
+msgstr "Φύλλο A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:108
+msgid "A4 small sheet, 210 x 297 mm"
+msgstr "Μικρό φύλλο A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:158
+#, fuzzy
+msgid "A5 Extra 174 x 235 mm"
+msgstr "Φύλλο A5, 148 x 210 mm"
+
+#: ../src/common/paper.cpp:173
+msgid "A5 Rotated 210 x 148 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:155
+#, fuzzy
+msgid "A5 Transverse 148 x 210 mm"
+msgstr "Φύλλο A5, 148 x 210 mm"
+
+#: ../src/common/paper.cpp:109
+msgid "A5 sheet, 148 x 210 mm"
+msgstr "Φύλλο A5, 148 x 210 mm"
+
+#: ../src/common/paper.cpp:165
+#, fuzzy
+msgid "A6 105 x 148 mm"
+msgstr "10 x 14 ίντσες"
+
+#: ../src/common/paper.cpp:178
+#, fuzzy
+msgid "A6 Rotated 148 x 105 mm"
+msgstr "Φύλλο A5, 148 x 210 mm"
+
+#: ../src/generic/fontdlgg.cpp:83 ../src/richtext/richtextformatdlg.cpp:526
+#: ../src/osx/carbon/fontdlg.cpp:339
+msgid "ABCDEFGabcdefg12345"
+msgstr "ΑΒΓΔΕΖαβγδεζ12345"
+
+#: ../src/common/accelcmn.cpp:76
+msgid "ADD"
+msgstr ""
+
+#: ../src/richtext/richtextsymboldlg.cpp:458 ../src/common/ftp.cpp:405
+msgid "ASCII"
+msgstr "ASCII"
+
+#: ../src/osx/menu_osx.cpp:630 ../src/common/stockitem.cpp:139
+#, fuzzy
+msgid "About"
+msgstr "&Περί"
+
+#: ../src/generic/aboutdlgg.cpp:140 ../src/msw/aboutdlg.cpp:64
+#, fuzzy, c-format
+msgid "About %s"
+msgstr "&Περί..."
+
+#: ../src/richtext/richtextsizepage.cpp:520
+msgid "Absolute"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:207
+#, fuzzy
+msgid "Actual Size"
+msgstr "&Πραγματικό μέγεθος"
+
+#: ../src/common/stockitem.cpp:140
+msgid "Add"
+msgstr "Προσθήκη"
+
+#: ../src/richtext/richtextbuffer.cpp:10751
+msgid "Add Column"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:10688
+msgid "Add Row"
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:439
+msgid "Add current page to bookmarks"
+msgstr "Προσθήκη της τρέχουσας σελίδας στους σελιδοδείκτες"
+
+#: ../src/generic/colrdlgg.cpp:283
+msgid "Add to custom colours"
+msgstr "Προσθήκη στα χρώματα χρήστη"
+
+#: ../include/wx/xtiprop.h:259
+msgid "AddToPropertyCollection called on a generic accessor"
+msgstr "AddToPropertyCollection κλήθηκε σε έναν γενικό accessor"
+
+#: ../include/wx/xtiprop.h:197
+msgid "AddToPropertyCollection called w/o valid adder"
+msgstr "AddToPropertyCollection κλήθηκε χωρίς έγκυρο προσθέτη"
+
+#: ../src/html/helpctrl.cpp:159
+#, c-format
+msgid "Adding book %s"
+msgstr "Προσθήκη βιβλίου %s"
+
+#: ../src/osx/carbon/dataview.cpp:1933
+msgid "Adding flavor TEXT failed"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1954
+msgid "Adding flavor utxt failed"
+msgstr ""
+
+#: ../src/common/preferencescmn.cpp:41
+msgid "Advanced"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:435
+msgid "After a paragraph:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:172
+msgid "Align Left"
+msgstr "Στοίχιση Αριστερά"
+
+#: ../src/common/stockitem.cpp:173
+msgid "Align Right"
+msgstr "Στοίχιση Δεξιά"
+
+#: ../src/richtext/richtextsizepage.cpp:266
+#, fuzzy
+msgid "Alignment"
+msgstr "Στοίχιση Αριστερά"
+
+#: ../src/generic/prntdlgg.cpp:215
+msgid "All"
+msgstr "Όλα"
+
+#: ../src/generic/filectrlg.cpp:1205 ../src/common/fldlgcmn.cpp:89
+#, c-format
+msgid "All files (%s)|%s"
+msgstr "Όλα τα αρχεία (%s)|%s"
+
+#: ../include/wx/defs.h:2922
+msgid "All files (*)|*"
+msgstr "Όλα τα αρχεία (*)|*"
+
+#: ../include/wx/defs.h:2919
+msgid "All files (*.*)|*.*"
+msgstr "Όλα τα αρχεία (*.*)|*.*"
+
+#: ../src/richtext/richtextstyles.cpp:1057
+msgid "All styles"
+msgstr ""
+
+#: ../src/propgrid/manager.cpp:1496
+msgid "Alphabetic Mode"
+msgstr ""
+
+#: ../src/common/xtistrm.cpp:429
+msgid "Already Registered Object passed to SetObjectClassInfo"
+msgstr "Ένα ήδη Registered αντικείμενο δόθηκε στην SetObjectClassInfo"
+
+#: ../src/unix/dialup.cpp:353
+msgid "Already dialling ISP."
+msgstr "Γίνεται ήδη κλήση προς τον παροχέα Internet(ISP)."
+
+#: ../src/common/accelcmn.cpp:320 ../src/univ/themes/win32.cpp:3756
+msgid "Alt+"
+msgstr ""
+
+#: ../src/common/debugrpt.cpp:581
+msgid "And includes the following files:\n"
+msgstr ""
+
+#: ../src/generic/animateg.cpp:162
+#, fuzzy, c-format
+msgid "Animation file is not of type %ld."
+msgstr "Αρχείο εικόνας δεν είναι τύπυ %d."
+
+#: ../src/generic/logg.cpp:1034
+#, c-format
+msgid "Append log to file '%s' (choosing [No] will overwrite it)?"
+msgstr ""
+"Να γίνει προσάρτηση(append) της καταγραφής(log) στο αρχείο '%s' (Επιλέγοντας "
+"[Όχι] θα το επικαλύψει(overwrite));"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:610
+#: ../src/osx/menu_osx.cpp:649 ../src/osx/menu_osx.cpp:657
+#, fuzzy
+msgid "Application"
+msgstr "Τμήματα"
+
+#: ../src/common/stockitem.cpp:141
+#, fuzzy
+msgid "Apply"
+msgstr "&Εφαρμογή"
+
+#: ../src/richtext/richtextliststylepage.cpp:482
+#: ../src/richtext/richtextbulletspage.cpp:287
+msgid "Arabic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:153
+msgid "Arabic (ISO-8859-6)"
+msgstr "Αραβικό (ISO-8859-6)"
+
+#: ../src/msw/ole/automtn.cpp:661
+#, fuzzy, c-format
+msgid "Argument %u not found."
+msgstr "αρχείο καταλόγου για την περιοχή (domain) '%s' δεν βρέθηκε."
+
+#: ../src/generic/aboutdlgg.cpp:184
+msgid "Artists"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:195
+#, fuzzy
+msgid "Ascending"
+msgstr "γίνεται ανάγνωση"
+
+#: ../src/generic/filectrlg.cpp:468
+msgid "Attributes"
+msgstr "Χαρακτηριστικά"
+
+#: ../src/richtext/richtextliststylepage.cpp:294
+#: ../src/richtext/richtextbulletspage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:247
+msgid "Available fonts."
+msgstr ""
+
+#: ../src/common/paper.cpp:138
+#, fuzzy
+msgid "B4 (ISO) 250 x 353 mm"
+msgstr "Φύλλο B4, 250 x 354 mm"
+
+#: ../src/common/paper.cpp:174
+msgid "B4 (JIS) Rotated 364 x 257 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:128
+msgid "B4 Envelope, 250 x 353 mm"
+msgstr "B4 Φάκελος, 250 x 353 mm"
+
+#: ../src/common/paper.cpp:110
+msgid "B4 sheet, 250 x 354 mm"
+msgstr "Φύλλο B4, 250 x 354 mm"
+
+#: ../src/common/paper.cpp:159
+msgid "B5 (ISO) Extra 201 x 276 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:175
+msgid "B5 (JIS) Rotated 257 x 182 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:156
+#, fuzzy
+msgid "B5 (JIS) Transverse 182 x 257 mm"
+msgstr "Φύλλο B5, 182 x 257 mm"
+
+#: ../src/common/paper.cpp:129
+msgid "B5 Envelope, 176 x 250 mm"
+msgstr "B5 Φάκελος, 176 x 250 mm"
+
+#: ../src/common/paper.cpp:111
+msgid "B5 sheet, 182 x 257 millimeter"
+msgstr "Φύλλο B5, 182 x 257 mm"
+
+#: ../src/common/paper.cpp:183
+msgid "B6 (JIS) 128 x 182 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:184
+msgid "B6 (JIS) Rotated 182 x 128 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:130
+msgid "B6 Envelope, 176 x 125 mm"
+msgstr "B6 Φάκελος, 176 x 125 mm"
+
+#: ../src/common/accelcmn.cpp:49
+msgid "BACK"
+msgstr ""
+
+#: ../src/common/imagbmp.cpp:523 ../src/common/imagbmp.cpp:553
+#: ../src/common/imagbmp.cpp:568
+msgid "BMP: Couldn't allocate memory."
+msgstr "BMP: Δεν ήταν δυνατή η δέσμευση(allocation) μνήμης."
+
+#: ../src/common/imagbmp.cpp:97
+msgid "BMP: Couldn't save invalid image."
+msgstr "BMP: Δεν είναι δυνατή η αποθήκευση μη έγκυρης εικόνας."
+
+#: ../src/common/imagbmp.cpp:338
+msgid "BMP: Couldn't write RGB color map."
+msgstr "BMP: Δεν ήταν δυνατή η εγγραφή του χάρτη RGB."
+
+#: ../src/common/imagbmp.cpp:473
+msgid "BMP: Couldn't write data."
+msgstr "BMP: Δεν ήταν δυνατή η εγγραφή δεδομένων."
+
+#: ../src/common/imagbmp.cpp:239
+msgid "BMP: Couldn't write the file (Bitmap) header."
+msgstr "BMP: Δεν ήταν δυνατή η εγγραφή της κεφαλής του αρχείου Bitmap."
+
+#: ../src/common/imagbmp.cpp:262
+msgid "BMP: Couldn't write the file (BitmapInfo) header."
+msgstr "BMP: Δεν ήταν δυνατή η εγγραφή της κεφαλής του αρχείου BitmapInfo."
+
+#: ../src/common/imagbmp.cpp:133
+msgid "BMP: wxImage doesn't have own wxPalette."
+msgstr "BMP: Το wxImage δεν κατέχει κάποιο wxPalette."
+
+#: ../src/common/stockitem.cpp:142
+#, fuzzy
+msgid "Back"
+msgstr "&Πίσω"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:119
+#: ../src/richtext/richtextformatdlg.cpp:374
+#, fuzzy
+msgid "Background"
+msgstr "Πίσω"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:131
+msgid "Background &colour:"
+msgstr ""
+
+#: ../src/osx/carbon/fontdlg.cpp:406
+msgid "Background colour"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:160
+msgid "Baltic (ISO-8859-13)"
+msgstr "Βαλτικό (ISO-8859-13)"
+
+#: ../src/common/fmapbase.cpp:151
+msgid "Baltic (old) (ISO-8859-4)"
+msgstr "Βαλτικό (παλαιό) (ISO-8859-4)"
+
+#: ../src/richtext/richtextliststylepage.cpp:426
+msgid "Before a paragraph:"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:489
+#: ../src/richtext/richtextbulletspage.cpp:294
+msgid "Bitmap"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:2396
+msgid "Bitmap renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:333 ../src/richtext/richtextfontpage.cpp:337
+#: ../src/osx/carbon/fontdlg.cpp:540 ../src/common/stockitem.cpp:143
+msgid "Bold"
+msgstr "Έντονο"
+
+#: ../src/richtext/richtextborderspage.cpp:256
+#: ../src/richtext/richtextborderspage.cpp:389
+#, fuzzy
+msgid "Border"
+msgstr "Μοντέρνο"
+
+#: ../src/richtext/richtextformatdlg.cpp:368
+#, fuzzy
+msgid "Borders"
+msgstr "Μοντέρνο"
+
+#: ../src/richtext/richtextsizepage.cpp:288 ../src/common/stockitem.cpp:144
+msgid "Bottom"
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:893
+msgid "Bottom margin (mm):"
+msgstr "Κάτω περιθώριο (mm)"
+
+#: ../src/richtext/richtextbuffer.cpp:8919
+#, fuzzy
+msgid "Box Properties"
+msgstr "&Ιδιότητες"
+
+#: ../src/richtext/richtextstyles.cpp:1061
+#, fuzzy
+msgid "Box styles"
+msgstr "&Επόμενο >"
+
+#: ../src/common/filepickercmn.cpp:43 ../src/common/filepickercmn.cpp:44
+msgid "Browse"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:195
+msgid "Bullet &Alignment:"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:309
+msgid "Bullet style"
+msgstr ""
+
+#: ../src/richtext/richtextformatdlg.cpp:342
+msgid "Bullets"
+msgstr ""
+
+#: ../src/common/paper.cpp:99
+msgid "C sheet, 17 x 22 in"
+msgstr "Φύλλο C, 17 x 22 ίντσες"
+
+#: ../src/generic/logg.cpp:520
+msgid "C&lear"
+msgstr "&Καθάρισμα"
+
+#: ../src/generic/fontdlgg.cpp:406
+msgid "C&olour:"
+msgstr "&Χρώμα:"
+
+#: ../src/common/paper.cpp:124
+msgid "C3 Envelope, 324 x 458 mm"
+msgstr "C3 Φάκελος, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:125
+msgid "C4 Envelope, 229 x 324 mm"
+msgstr "C4 Φάκελος, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:123
+msgid "C5 Envelope, 162 x 229 mm"
+msgstr "C5 Φάκελος, 162 x 229 mm"
+
+#: ../src/common/paper.cpp:126
+msgid "C6 Envelope, 114 x 162 mm"
+msgstr "C6 Φάκελος, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:127
+msgid "C65 Envelope, 114 x 229 mm"
+msgstr "C65 Φάκελος, 114 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:66
+msgid "CANCEL"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:70
+msgid "CAPITAL"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:146
+msgid "CD-Rom"
+msgstr ""
+
+#: ../src/html/chm.cpp:815 ../src/html/chm.cpp:874
+msgid "CHM handler currently supports only local files!"
+msgstr "ο χειριστής CHM προς το παρόν υποστηρίζει μόνο τοπικά αρχεία!"
+
+#: ../src/common/accelcmn.cpp:67
+msgid "CLEAR"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:111
+msgid "COMMAND"
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:291
+msgid "Ca&pitals"
+msgstr ""
+
+#: ../src/common/cmdproc.cpp:267
+msgid "Can't &Undo "
+msgstr "Δεν είναι δυνατή η αναίρεση"
+
+#: ../src/common/image.cpp:2686
+msgid "Can't automatically determine the image format for non-seekable input."
+msgstr ""
+
+#: ../src/msw/registry.cpp:505
+#, c-format
+msgid "Can't close registry key '%s'"
+msgstr "Δεν είναι δυνατό το κλείσιμο του κλειδιού μητρώου(registry key) '%s'"
+
+#: ../src/msw/registry.cpp:583
+#, c-format
+msgid "Can't copy values of unsupported type %d."
+msgstr "Δεν είναι δυνατή η αντιγραφή τιμών μη υποστηριζομένου τύπου %d."
+
+#: ../src/msw/registry.cpp:486
+#, c-format
+msgid "Can't create registry key '%s'"
+msgstr "Δεν είναι δυνατή η δημιουργία του κλειδιού μητρώου(registry key) '%s'"
+
+#: ../src/msw/thread.cpp:696 ../src/os2/thread.cpp:494
+msgid "Can't create thread"
+msgstr "Δεν είναι δυνατή η δημιουργία του νήματος εκτέλεσης (thread)"
+
+#: ../src/msw/window.cpp:3793
+#, c-format
+msgid "Can't create window of class %s"
+msgstr "Δεν είναι δυνατή η δημιουργία παραθύρου τάξεως %s"
+
+#: ../src/msw/registry.cpp:776
+#, c-format
+msgid "Can't delete key '%s'"
+msgstr "Δεν είναι δυνατή η διαγραφή του κλειδιού '%s'"
+
+#: ../src/msw/iniconf.cpp:458 ../src/os2/iniconf.cpp:471
+#, c-format
+msgid "Can't delete the INI file '%s'"
+msgstr "Δεν είναι δυνατή η διαγραφή του αρχείου INI '%s'"
+
+#: ../src/msw/registry.cpp:804
+#, c-format
+msgid "Can't delete value '%s' from key '%s'"
+msgstr "Δεν είναι δυνατή η διαγραφή της τιμής '%s' από το κλειδί '%s'"
+
+#: ../src/msw/registry.cpp:1161
+#, c-format
+msgid "Can't enumerate subkeys of key '%s'"
+msgstr "Δεν είναι δυνατή η απαρίθμηση των υποκλειδιών του '%s'"
+
+#: ../src/msw/registry.cpp:1116
+#, c-format
+msgid "Can't enumerate values of key '%s'"
+msgstr "Δεν είναι δυνατή η απαρίθμηση των τιμών του κλειδιού '%s'"
+
+#: ../src/msw/registry.cpp:1379
+#, c-format
+msgid "Can't export value of unsupported type %d."
+msgstr "Δεν είναι δυνατή η εξαγωγή τιμών μη υποστηριζομένου τύπου %d."
+
+#: ../src/common/ffile.cpp:236
+#, c-format
+msgid "Can't find current position in file '%s'"
+msgstr "Δεν είναι δυνατή η εύρεση της τρέχουσας θέσης στο αρχείου '%s'"
+
+#: ../src/msw/registry.cpp:416
+#, c-format
+msgid "Can't get info about registry key '%s'"
+msgstr ""
+"Δεν είναι δυνατή η συλλογή πληροφοριών για το κλειδί μητρώου(registry) '%s'"
+
+#: ../src/common/zstream.cpp:346
+msgid "Can't initialize zlib deflate stream."
+msgstr "Δεν είναι δυνατή η αρχικοποίηση της ροής zlib deflate."
+
+#: ../src/common/zstream.cpp:185
+msgid "Can't initialize zlib inflate stream."
+msgstr "Δεν είναι δυνατή η αρχικοποίηση της ροής zlib inflate."
+
+#: ../src/msw/fswatcher.cpp:432
+#, c-format
+msgid "Can't monitor non-existent directory \"%s\" for changes."
+msgstr ""
+
+#: ../src/msw/registry.cpp:452
+#, c-format
+msgid "Can't open registry key '%s'"
+msgstr "Δεν είναι δυνατό το άνοιγμα του κλειδιού μητρώου(registry) '%s'"
+
+#: ../src/common/zstream.cpp:252
+#, c-format
+msgid "Can't read from inflate stream: %s"
+msgstr "Αδύνατη η ανάγνωση από την ροή inflate: %s"
+
+#: ../src/common/zstream.cpp:244
+msgid "Can't read inflate stream: unexpected EOF in underlying stream."
+msgstr ""
+"Αδύνατη η ανάγνωση της ροής inflate: απρόσμενο EOF στην υποκείμενη ροή."
+
+#: ../src/msw/registry.cpp:1048
+#, c-format
+msgid "Can't read value of '%s'"
+msgstr "Δεν είναι δυνατή η ανάγνωση της τιμής του '%s'"
+
+#: ../src/msw/registry.cpp:877 ../src/msw/registry.cpp:909
+#: ../src/msw/registry.cpp:971
+#, c-format
+msgid "Can't read value of key '%s'"
+msgstr "Δεν είναι δυνατή η ανάγνωση της τιμής του κλειδιού '%s'"
+
+#: ../src/common/image.cpp:2483
+#, c-format
+msgid "Can't save image to file '%s': unknown extension."
+msgstr ""
+"Δεν είναι δυνατή η αποθήκευση της εικόνας στο αρχείο '%s': άγνωστη επέκταση"
+
+#: ../src/generic/logg.cpp:579 ../src/generic/logg.cpp:996
+msgid "Can't save log contents to file."
+msgstr ""
+"Δεν είναι δυνατή η αποθήκευση των περιεχομένων της καταγραφής(log) στο "
+"αρχείο."
+
+#: ../src/msw/thread.cpp:652 ../src/os2/thread.cpp:477
+msgid "Can't set thread priority"
+msgstr "Δεν είναι δυνατή η θέση προτεραιότητας του νήματος εκτέλεσης (thread)"
+
+#: ../src/msw/registry.cpp:895 ../src/msw/registry.cpp:939
+#: ../src/msw/registry.cpp:1065
+#, c-format
+msgid "Can't set value of '%s'"
+msgstr "Δεν είναι δυνατή η ανάθεση τιμής του '%s'"
+
+#: ../src/unix/utilsunx.cpp:357
+#, fuzzy
+msgid "Can't write to child process's stdin"
+msgstr "Αποτυχία θανάτωσης της διαδικασίας(process) %d"
+
+#: ../src/common/zstream.cpp:427
+#, c-format
+msgid "Can't write to deflate stream: %s"
+msgstr "Δεν είναι δυνατή η εγγραφή στην ροή deflate: %s"
+
+#: ../include/wx/msgdlg.h:274 ../src/generic/dirdlgg.cpp:107
+#: ../src/richtext/richtextstyledlg.cpp:300 ../src/common/stockitem.cpp:145
+#: ../src/msw/msgdlg.cpp:489 ../src/msw/progdlg.cpp:673
+#: ../src/gtk1/fontdlg.cpp:144 ../src/motif/msgdlg.cpp:196
+msgid "Cancel"
+msgstr "Ακυρο"
+
+#: ../src/os2/thread.cpp:116
+msgid "Cannot create mutex."
+msgstr "Δεν είναι δυνατή η δημιουργία του mutex."
+
+#: ../src/osx/carbon/dataview.cpp:895
+msgid "Cannot create new column's ID. Probably max. number of columns reached."
+msgstr ""
+
+#: ../src/common/filefn.cpp:1336
+#, c-format
+msgid "Cannot enumerate files '%s'"
+msgstr "Δεν είναι δυνατή η απαρίθμηση των αρχείων '%s'"
+
+#: ../src/msw/dir.cpp:264
+#, c-format
+msgid "Cannot enumerate files in directory '%s'"
+msgstr "Δεν είναι δυνατή η απαρίθμηση των αρχείων στον κατάλογο '%s'"
+
+#: ../src/msw/dialup.cpp:542
+#, c-format
+msgid "Cannot find active dialup connection: %s"
+msgstr "Δεν είναι δυνατή η εύρεση της ενεργού τηλεφωνικής συνδέσεως: %s"
+
+#: ../src/msw/dialup.cpp:848
+msgid "Cannot find the location of address book file"
+msgstr "Δεν είναι δυνατή η εύρεση της θέσης του αρχείου βιβλίου διευθύνσεων"
+
+#: ../src/msw/ole/automtn.cpp:562
+#, fuzzy, c-format
+msgid "Cannot get an active instance of \"%s\""
+msgstr "Δεν είναι δυνατή η εύρεση της ενεργού τηλεφωνικής συνδέσεως: %s"
+
+#: ../src/unix/threadpsx.cpp:1030
+#, fuzzy, c-format
+msgid "Cannot get priority range for scheduling policy %d."
+msgstr "Δεν είναι δυνατή η ανάγνωση του εύρους προτεραιοτήτων"
+
+#: ../src/unix/utilsunx.cpp:988
+msgid "Cannot get the hostname"
+msgstr "Δεν είναι δυνατή η ανάγνωση του ονόματος διακομιστή(hostname)"
+
+#: ../src/unix/utilsunx.cpp:1024
+msgid "Cannot get the official hostname"
+msgstr ""
+"Δεν είναι δυνατή η ανάγνωση του επισήμου ονόματος διακομιστή(official "
+"hostname)"
+
+#: ../src/msw/dialup.cpp:949
+msgid "Cannot hang up - no active dialup connection."
+msgstr ""
+"Δεν είναι δυνατό το κλείσιμο της γραμμής - δεν υπάρχει ενεργός τηλεφωνική "
+"σύνδεση."
+
+#: ../include/wx/msw/ole/oleutils.h:52
+msgid "Cannot initialize OLE"
+msgstr "Δεν είναι δυνατή η αρχικοποίηση του OLE"
+
+#: ../src/common/socket.cpp:847
+#, fuzzy
+msgid "Cannot initialize sockets"
+msgstr "Δεν είναι δυνατή η αρχικοποίηση του OLE"
+
+#: ../src/msw/volume.cpp:620
+#, c-format
+msgid "Cannot load icon from '%s'."
+msgstr "Δεν είναι δυνατή η φόρτωση εικονιδίου από το '%s'"
+
+#: ../src/xrc/xmlres.cpp:361
+#, fuzzy, c-format
+msgid "Cannot load resources from '%s'."
+msgstr "Δεν είναι δυνατή η φόρτωση πόρων(resources) από το αρχείο '%s'"
+
+#: ../src/xrc/xmlres.cpp:746
+#, c-format
+msgid "Cannot load resources from file '%s'."
+msgstr "Δεν είναι δυνατή η φόρτωση πόρων(resources) από το αρχείο '%s'"
+
+#: ../src/html/htmlfilt.cpp:137
+#, c-format
+msgid "Cannot open HTML document: %s"
+msgstr "Δεν είναι δυνατό το άνοιγμα εγγράφου HTML: %s"
+
+#: ../src/html/helpdata.cpp:665
+#, c-format
+msgid "Cannot open HTML help book: %s"
+msgstr "Δεν είναι δυνατό το άνοιγμα βιβλίου βοήθειας HTML: %s"
+
+#: ../src/html/helpdata.cpp:297
+#, c-format
+msgid "Cannot open contents file: %s"
+msgstr "Δεν είναι δυνατό το άνοιγμα των περιεχομένων του αρχείου: %s"
+
+#: ../src/generic/dcpsg.cpp:1751
+msgid "Cannot open file for PostScript printing!"
+msgstr "Δεν είναι δυνατό το άνοιγμα του αρχείου για εκτύπωση PostScript!"
+
+#: ../src/html/helpdata.cpp:311
+#, c-format
+msgid "Cannot open index file: %s"
+msgstr "Δεν είναι δυνατό το άνοιγμα του αρχείου ευρετηρίου(index): %s"
+
+#: ../src/xrc/xmlres.cpp:728
+#, fuzzy, c-format
+msgid "Cannot open resources file '%s'."
+msgstr "Δεν είναι δυνατή η φόρτωση πόρων(resources) από το αρχείο '%s'"
+
+#: ../src/html/helpwnd.cpp:1537
+msgid "Cannot print empty page."
+msgstr "Δεν είναι δυνατή η εκτύπωση άδειας σελίδας."
+
+#: ../src/msw/volume.cpp:507
+#, c-format
+msgid "Cannot read typename from '%s'!"
+msgstr "Δεν είναι δυνατή η ανάγνωση ονομάτων τύπων(typenames) από το '%s'"
+
+#: ../src/os2/thread.cpp:527
+#, c-format
+msgid "Cannot resume thread %lu"
+msgstr "Δεν είναι δυνατή η συνέχιση(resume) του νήματος(thread) %lu"
+
+#: ../src/msw/thread.cpp:923
+#, fuzzy, c-format
+msgid "Cannot resume thread %lx"
+msgstr "Δεν είναι δυνατή η συνέχιση(resume) του νήματος(thread) %x"
+
+#: ../src/unix/threadpsx.cpp:1011
+msgid "Cannot retrieve thread scheduling policy."
+msgstr "Δεν είναι δυνατή η ανάκτηση της thread scheduling policy."
+
+#: ../src/common/intl.cpp:542
+#, c-format
+msgid "Cannot set locale to language \"%s\"."
+msgstr ""
+
+#: ../src/unix/threadpsx.cpp:831 ../src/msw/thread.cpp:569
+msgid "Cannot start thread: error writing TLS."
+msgstr ""
+"Δεν είναι δυνατή η εκκίνηση του νήματος(thread): Σφάλμα κατά την εγγραφή του "
+"TLS"
+
+#: ../src/os2/thread.cpp:513
+#, c-format
+msgid "Cannot suspend thread %lu"
+msgstr "Δεν είναι δυνατή η αναστολή εκτέλεσης(suspend) του νήματος(thread) %lu"
+
+#: ../src/msw/thread.cpp:907
+#, fuzzy, c-format
+msgid "Cannot suspend thread %lx"
+msgstr "Δεν είναι δυνατή η αναστολή εκτέλεσης(suspend) του νήματος(thread) %x"
+
+#: ../src/msw/thread.cpp:830
+msgid "Cannot wait for thread termination"
+msgstr ""
+"Δεν είναι δυνατή η αναμονή(wait) για τον τερματισμό του νήματος εκτέλεσης"
+"(thread)"
+
+#: ../src/html/helpwnd.cpp:546
+msgid "Case sensitive"
+msgstr "Διάκριση κεφαλαίων-πεζών"
+
+#: ../src/propgrid/manager.cpp:1495
+msgid "Categorized Mode"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:9347
+#, fuzzy
+msgid "Cell Properties"
+msgstr "&Ιδιότητες"
+
+#: ../src/common/fmapbase.cpp:161
+msgid "Celtic (ISO-8859-14)"
+msgstr "Κελτικό (ISO-8859-14)"
+
+#: ../src/richtext/richtextindentspage.cpp:160
+#: ../src/richtext/richtextliststylepage.cpp:349
+#, fuzzy
+msgid "Cen&tred"
+msgstr "Στο κέντρο"
+
+#: ../src/common/stockitem.cpp:170
+msgid "Centered"
+msgstr "Στο κέντρο"
+
+#: ../src/common/fmapbase.cpp:149
+msgid "Central European (ISO-8859-2)"
+msgstr "Κεντροευρωπαϊκό (ISO-8859-2)"
+
+#: ../src/richtext/richtextliststylepage.cpp:250
+#: ../src/richtext/richtextbulletspage.cpp:200
+#, fuzzy
+msgid "Centre"
+msgstr "Στο κέντρο"
+
+#: ../src/richtext/richtextindentspage.cpp:162
+#: ../src/richtext/richtextindentspage.cpp:164
+#: ../src/richtext/richtextliststylepage.cpp:351
+#: ../src/richtext/richtextliststylepage.cpp:353
+#, fuzzy
+msgid "Centre text."
+msgstr "Δεν είναι δυνατή η δημιουργία του mutex."
+
+#: ../src/richtext/richtextsizepage.cpp:287
+#, fuzzy
+msgid "Centred"
+msgstr "Στο κέντρο"
+
+#: ../src/richtext/richtextliststylepage.cpp:280
+#: ../src/richtext/richtextbulletspage.cpp:232
+#, fuzzy
+msgid "Ch&oose..."
+msgstr "&Μετάβαση..."
+
+#: ../src/richtext/richtextbuffer.cpp:4041
+msgid "Change List Style"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:3392
+msgid "Change Object Style"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:3658
+#: ../src/richtext/richtextbuffer.cpp:7749
+#, fuzzy
+msgid "Change Properties"
+msgstr "&Ιδιότητες"
+
+#: ../src/richtext/richtextbuffer.cpp:3209
+msgid "Change Style"
+msgstr ""
+
+#: ../src/common/fileconf.cpp:372
+#, c-format
+msgid "Changes won't be saved to avoid overwriting the existing file \"%s\""
+msgstr ""
+
+#: ../src/richtext/richtextstyles.cpp:1059
+msgid "Character styles"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:224
+#: ../src/richtext/richtextliststylepage.cpp:226
+#: ../src/richtext/richtextbulletspage.cpp:174
+#: ../src/richtext/richtextbulletspage.cpp:176
+msgid "Check to add a period after the bullet."
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:238
+#: ../src/richtext/richtextliststylepage.cpp:240
+#: ../src/richtext/richtextbulletspage.cpp:188
+#: ../src/richtext/richtextbulletspage.cpp:190
+msgid "Check to add a right parenthesis."
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:231
+#: ../src/richtext/richtextliststylepage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:181
+#: ../src/richtext/richtextbulletspage.cpp:183
+msgid "Check to enclose the bullet in parentheses."
+msgstr ""
+
+#: ../src/osx/carbon/fontdlg.cpp:542 ../src/osx/carbon/fontdlg.cpp:544
+#, fuzzy
+msgid "Check to make the font bold."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/osx/carbon/fontdlg.cpp:549 ../src/osx/carbon/fontdlg.cpp:551
+#, fuzzy
+msgid "Check to make the font italic."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/osx/carbon/fontdlg.cpp:558 ../src/osx/carbon/fontdlg.cpp:560
+#, fuzzy
+msgid "Check to make the font underlined."
+msgstr "Επιλογή εαν η γραμματοσειρά είναι υπογραμμισμένη ή όχι."
+
+#: ../src/richtext/richtextstyledlg.cpp:289
+#: ../src/richtext/richtextstyledlg.cpp:291
+msgid "Check to restart numbering."
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:286
+#: ../src/richtext/richtextfontpage.cpp:288
+#, fuzzy
+msgid "Check to show a line through the text."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextfontpage.cpp:293
+#: ../src/richtext/richtextfontpage.cpp:295
+#, fuzzy
+msgid "Check to show the text in capitals."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextfontpage.cpp:300
+#: ../src/richtext/richtextfontpage.cpp:302
+#, fuzzy
+msgid "Check to show the text in small capitals."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextfontpage.cpp:314
+#: ../src/richtext/richtextfontpage.cpp:316
+#, fuzzy
+msgid "Check to show the text in subscript."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextfontpage.cpp:307
+#: ../src/richtext/richtextfontpage.cpp:309
+#, fuzzy
+msgid "Check to show the text in superscript."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/msw/dialup.cpp:784
+msgid "Choose ISP to dial"
+msgstr "Επιλέξτε παροχέα Internet για κλήση"
+
+#: ../src/propgrid/props.cpp:1643
+#, fuzzy
+msgid "Choose a directory:"
+msgstr "Δημιουργία καταλόγου"
+
+#: ../src/propgrid/props.cpp:1702
+#, fuzzy
+msgid "Choose a file"
+msgstr "Επιλέξτε γραμματοσειρά"
+
+#: ../src/generic/colrdlgg.cpp:144 ../src/gtk/colordlg.cpp:63
+msgid "Choose colour"
+msgstr "Επιλέξτε χρώμα"
+
+#: ../src/generic/fontpickerg.cpp:50 ../src/gtk/fontdlg.cpp:75
+#: ../src/gtk1/fontdlg.cpp:125
+msgid "Choose font"
+msgstr "Επιλέξτε γραμματοσειρά"
+
+#: ../src/common/module.cpp:74
+#, c-format
+msgid "Circular dependency involving module \"%s\" detected."
+msgstr ""
+
+#: ../src/aui/tabmdi.cpp:108 ../src/generic/mdig.cpp:97
+msgid "Cl&ose"
+msgstr "&Κλείσιμο"
+
+#: ../src/msw/ole/automtn.cpp:673
+#, fuzzy
+msgid "Class not registered."
+msgstr "Δεν είναι δυνατή η δημιουργία του νήματος εκτέλεσης (thread)"
+
+#: ../src/common/stockitem.cpp:147
+#, fuzzy
+msgid "Clear"
+msgstr "&Καθαρισμός"
+
+#: ../src/generic/logg.cpp:520
+msgid "Clear the log contents"
+msgstr "Καθαρισμός περιεχομένων καταγραφής(log)"
+
+#: ../src/richtext/richtextstyledlg.cpp:252
+#: ../src/richtext/richtextstyledlg.cpp:254
+#, fuzzy
+msgid "Click to apply the selected style."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextliststylepage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:283
+#: ../src/richtext/richtextbulletspage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:235
+msgid "Click to browse for a symbol."
+msgstr ""
+
+#: ../src/osx/carbon/fontdlg.cpp:589 ../src/osx/carbon/fontdlg.cpp:591
+#, fuzzy
+msgid "Click to cancel changes to the font."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/generic/fontdlgg.cpp:472 ../src/generic/fontdlgg.cpp:491
+msgid "Click to cancel the font selection."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/osx/carbon/fontdlg.cpp:570 ../src/osx/carbon/fontdlg.cpp:572
+#, fuzzy
+msgid "Click to change the font colour."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextfontpage.cpp:276
+#: ../src/richtext/richtextfontpage.cpp:278
+#, fuzzy
+msgid "Click to change the text background colour."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextfontpage.cpp:263
+#: ../src/richtext/richtextfontpage.cpp:265
+#, fuzzy
+msgid "Click to change the text colour."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextliststylepage.cpp:195
+#: ../src/richtext/richtextliststylepage.cpp:197
+#, fuzzy
+msgid "Click to choose the font for this level."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextstyledlg.cpp:279
+#: ../src/richtext/richtextstyledlg.cpp:281
+#, fuzzy
+msgid "Click to close this window."
+msgstr "Κλείσιμο αυτού του παραθύρου."
+
+#: ../src/osx/carbon/fontdlg.cpp:596 ../src/osx/carbon/fontdlg.cpp:598
+#, fuzzy
+msgid "Click to confirm changes to the font."
+msgstr "Κάνετε κλικ για να επιβεβαιώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/generic/fontdlgg.cpp:477 ../src/generic/fontdlgg.cpp:479
+#: ../src/generic/fontdlgg.cpp:484 ../src/generic/fontdlgg.cpp:486
+msgid "Click to confirm the font selection."
+msgstr "Κάνετε κλικ για να επιβεβαιώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextstyledlg.cpp:244
+#: ../src/richtext/richtextstyledlg.cpp:246
+#, fuzzy
+msgid "Click to create a new box style."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextstyledlg.cpp:226
+#: ../src/richtext/richtextstyledlg.cpp:228
+msgid "Click to create a new character style."
+msgstr ""
+
+#: ../src/richtext/richtextstyledlg.cpp:238
+#: ../src/richtext/richtextstyledlg.cpp:240
+#, fuzzy
+msgid "Click to create a new list style."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextstyledlg.cpp:232
+#: ../src/richtext/richtextstyledlg.cpp:234
+msgid "Click to create a new paragraph style."
+msgstr ""
+
+#: ../src/richtext/richtexttabspage.cpp:137
+#: ../src/richtext/richtexttabspage.cpp:139
+#, fuzzy
+msgid "Click to create a new tab position."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtexttabspage.cpp:149
+#: ../src/richtext/richtexttabspage.cpp:151
+#, fuzzy
+msgid "Click to delete all tab positions."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextstyledlg.cpp:270
+#: ../src/richtext/richtextstyledlg.cpp:272
+#, fuzzy
+msgid "Click to delete the selected style."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtexttabspage.cpp:143
+#: ../src/richtext/richtexttabspage.cpp:145
+#, fuzzy
+msgid "Click to delete the selected tab position."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextstyledlg.cpp:264
+#: ../src/richtext/richtextstyledlg.cpp:266
+#, fuzzy
+msgid "Click to edit the selected style."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/richtext/richtextstyledlg.cpp:258
+#: ../src/richtext/richtextstyledlg.cpp:260
+#, fuzzy
+msgid "Click to rename the selected style."
+msgstr "Κάνετε κλικ για να ακυρώσετε την επιλογή γραμματοσειράς."
+
+#: ../src/generic/dbgrptg.cpp:97 ../src/generic/progdlgg.cpp:804
+#: ../src/generic/progdlgg.cpp:809 ../src/richtext/richtextstyledlg.cpp:277
+#: ../src/richtext/richtextsymboldlg.cpp:476 ../src/common/stockitem.cpp:148
+#: ../src/msw/progdlg.cpp:170 ../src/msw/progdlg.cpp:679
+#: ../src/html/helpdlg.cpp:90
+msgid "Close"
+msgstr "Κλείσιμο"
+
+#: ../src/aui/tabmdi.cpp:109 ../src/generic/mdig.cpp:98
+msgid "Close All"
+msgstr "Κλείσιμο"
+
+#: ../src/common/stockitem.cpp:266
+msgid "Close current document"
+msgstr ""
+
+#: ../src/generic/logg.cpp:522
+msgid "Close this window"
+msgstr "Κλείσιμο αυτού του παραθύρου."
+
+#: ../src/common/stockitem.cpp:193
+#, fuzzy
+msgid "Color"
+msgstr "&Χρώμα:"
+
+#: ../src/richtext/richtextformatdlg.cpp:725
+#, fuzzy
+msgid "Colour"
+msgstr "&Χρώμα:"
+
+#: ../src/msw/colordlg.cpp:156
+#, fuzzy, c-format
+msgid "Colour selection dialog failed with error %0lx."
+msgstr "Η εκτέλεση της εντολής '%s' απέτυχε με σφάλμα: %ul"
+
+#: ../src/osx/carbon/fontdlg.cpp:566
+#, fuzzy
+msgid "Colour:"
+msgstr "&Χρώμα:"
+
+#: ../src/osx/carbon/dataview.cpp:900
+#, fuzzy
+msgid "Column could not be added."
+msgstr "Το αρχείο δεν μπόρεσε να φορτωθεί."
+
+#: ../src/osx/carbon/dataview.cpp:899
+msgid "Column description could not be initialized."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1538 ../src/osx/carbon/dataview.cpp:1559
+#, fuzzy
+msgid "Column index not found."
+msgstr "αρχείο καταλόγου για την περιοχή (domain) '%s' δεν βρέθηκε."
+
+#: ../src/osx/carbon/dataview.cpp:1614
+msgid "Column width could not be determined"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:901
+msgid "Column width could not be set."
+msgstr ""
+
+#: ../src/common/init.cpp:188
+#, c-format
+msgid ""
+"Command line argument %d couldn't be converted to Unicode and will be "
+"ignored."
+msgstr ""
+
+#: ../src/msw/fontdlg.cpp:119
+#, fuzzy, c-format
+msgid "Common dialog failed with error code %0lx."
+msgstr "Η εκτέλεση της εντολής '%s' απέτυχε με σφάλμα: %ul"
+
+#: ../src/gtk/window.cpp:4306
+msgid ""
+"Compositing not supported by this system, please enable it in your Window "
+"Manager."
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:1554
+msgid "Compressed HTML Help file (*.chm)|*.chm|"
+msgstr "Αρχείο βοήθειας συμπιεσμένης HTML (*.chm)|*.chm|"
+
+#: ../src/generic/dirctrlg.cpp:544
+msgid "Computer"
+msgstr "Υπολογιστής"
+
+#: ../src/common/fileconf.cpp:965
+#, c-format
+msgid "Config entry name cannot start with '%c'."
+msgstr ""
+"Το όνομα εισόδου διαμόρφωσης (Config entry name) δεν μπορεί να αρχίζει με "
+"'%c'"
+
+#: ../src/gtk/filedlg.cpp:59
+msgid "Confirm"
+msgstr "Επιβεβαίωση"
+
+#: ../src/msw/mimetype.cpp:739
+msgid "Confirm registry update"
+msgstr "Επιβεβαίωση ενημέρωσης μητρώου(registry update)"
+
+#: ../src/html/htmlwin.cpp:544
+msgid "Connecting..."
+msgstr "Γίνεται σύνδεση..."
+
+#: ../src/html/helpwnd.cpp:482
+msgid "Contents"
+msgstr "Περιεχόμενα"
+
+#: ../src/common/strconv.cpp:2261
+#, c-format
+msgid "Conversion to charset '%s' doesn't work."
+msgstr "Η μετατροπή στο σετ χαρακτήρων '%s' δεν λειτουργεί"
+
+#: ../src/common/stockitem.cpp:149
+#, fuzzy
+msgid "Convert"
+msgstr "Περιεχόμενα"
+
+#: ../src/html/htmlwin.cpp:1057
+#, c-format
+msgid "Copied to clipboard:\"%s\""
+msgstr "Αντιγράφηκε στο πρόχειρο:\"%s\""
+
+#: ../src/generic/prntdlgg.cpp:247
+msgid "Copies:"
+msgstr "Αντίγραφα:"
+
+#: ../src/common/stockitem.cpp:150 ../src/stc/stc_i18n.cpp:18
+#, fuzzy
+msgid "Copy"
+msgstr "&Αντιγραφή"
+
+#: ../src/common/stockitem.cpp:258
+#, fuzzy
+msgid "Copy selection"
+msgstr "Τμήματα"
+
+#: ../src/html/chm.cpp:718
+#, c-format
+msgid "Could not create temporary file '%s'"
+msgstr "Δεν είναι δυνατή η δημιουργία του προσωρινού αρχείου '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:1285 ../src/osx/carbon/dataview.cpp:1672
+#, fuzzy
+msgid "Could not determine column index."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της προεπισκόπησης εγγράφου."
+
+#: ../src/osx/carbon/dataview.cpp:876
+msgid "Could not determine column's position"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:843
+#, fuzzy
+msgid "Could not determine number of columns."
+msgstr "Δεν βρέθηκε το αρχείο συμπερήληψης πόρων(resource include file) %s."
+
+#: ../src/osx/carbon/dataview.cpp:975
+#, fuzzy
+msgid "Could not determine number of items"
+msgstr "Δεν βρέθηκε το αρχείο συμπερήληψης πόρων(resource include file) %s."
+
+#: ../src/html/chm.cpp:273
+#, c-format
+msgid "Could not extract %s into %s: %s"
+msgstr "Δεν ήταν δυνατή η εξαγωγή του %s στο %s: %s"
+
+#: ../src/generic/tabg.cpp:1048
+msgid "Could not find tab for id"
+msgstr "Δεν ήταν δυνατή η εύρεση tab για το id"
+
+#: ../src/osx/carbon/dataview.cpp:2556 ../src/osx/carbon/dataview.cpp:2591
+#: ../src/osx/carbon/dataview.cpp:2615 ../src/osx/carbon/dataview.cpp:2636
+#: ../src/osx/carbon/dataview.cpp:2773
+#, fuzzy
+msgid "Could not get header description."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/osx/carbon/dataview.cpp:1169 ../src/osx/carbon/dataview.cpp:1195
+#, fuzzy
+msgid "Could not get items."
+msgstr "Δεν είναι δυνατός ο εντοπισμός του αρχείου '%s'."
+
+#: ../src/osx/carbon/dataview.cpp:2659 ../src/osx/carbon/dataview.cpp:2724
+#, fuzzy
+msgid "Could not get property flags."
+msgstr "Δεν είναι δυνατή η δημιουργία του προσωρινού αρχείου '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:726
+#, fuzzy
+msgid "Could not get selected items."
+msgstr "Δεν είναι δυνατός ο εντοπισμός του αρχείου '%s'."
+
+#: ../src/html/chm.cpp:444
+#, c-format
+msgid "Could not locate file '%s'."
+msgstr "Δεν είναι δυνατός ο εντοπισμός του αρχείου '%s'."
+
+#: ../src/osx/carbon/dataview.cpp:845
+#, fuzzy
+msgid "Could not remove column."
+msgstr "Δεν ήταν δυνατή η δημιουργία δείκτη ποντικιού."
+
+#: ../src/osx/carbon/dataview.cpp:642
+#, fuzzy
+msgid "Could not retrieve number of items"
+msgstr "Δεν είναι δυνατή η δημιουργία του προσωρινού αρχείου '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:2572
+#, fuzzy
+msgid "Could not set alignment."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/osx/carbon/dataview.cpp:2803
+#, fuzzy
+msgid "Could not set column width."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της προεπισκόπησης εγγράφου."
+
+#: ../src/common/filefn.cpp:1569
+#, fuzzy
+msgid "Could not set current working directory"
+msgstr "Αποτυχία λήψης καταλόγου εργασίας (working directory)"
+
+#: ../src/osx/carbon/dataview.cpp:2775
+#, fuzzy
+msgid "Could not set header description."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/osx/carbon/dataview.cpp:2596
+#, fuzzy
+msgid "Could not set icon."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/osx/carbon/dataview.cpp:2617
+#, fuzzy
+msgid "Could not set maximum width."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/osx/carbon/dataview.cpp:2638
+#, fuzzy
+msgid "Could not set minimum width."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/osx/carbon/dataview.cpp:2664 ../src/osx/carbon/dataview.cpp:2729
+#, fuzzy
+msgid "Could not set property flags."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/common/prntbase.cpp:1985
+msgid "Could not start document preview."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της προεπισκόπησης εγγράφου."
+
+#: ../src/generic/printps.cpp:178 ../src/msw/printwin.cpp:210
+#: ../src/gtk/print.cpp:1077
+msgid "Could not start printing."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/common/wincmn.cpp:2131
+msgid "Could not transfer data to window"
+msgstr "Δεν ήταν δυνατή η μεταφορά δεδομένων στο παράθυρο."
+
+#: ../src/os2/thread.cpp:160
+msgid "Couldn't acquire a mutex lock"
+msgstr "Δεν ήταν δυνατή η κτήση μιας κλειδαριάς mutex"
+
+#: ../src/msw/imaglist.cpp:166 ../src/msw/imaglist.cpp:197
+#: ../src/msw/imaglist.cpp:209 ../src/msw/dragimag.cpp:193
+#: ../src/msw/dragimag.cpp:232
+msgid "Couldn't add an image to the image list."
+msgstr "Δεν ήταν δυνατή η προσθήκη μιας εικόνας στην λίστα εικόνων."
+
+#: ../src/msw/timer.cpp:134 ../src/os2/timer.cpp:113
+msgid "Couldn't create a timer"
+msgstr "Δεν ήταν δυνατή η δημιουργία χρονοδιακόπτη (timer)"
+
+#: ../src/osx/carbon/overlay.cpp:122
+#, fuzzy
+msgid "Couldn't create the overlay window"
+msgstr "Δεν ήταν δυνατή η δημιουργία χρονοδιακόπτη (timer)"
+
+#: ../src/common/translation.cpp:2015
+#, fuzzy
+msgid "Couldn't enumerate translations"
+msgstr "Δεν ήταν δυνατός ο τερματισμός του thread"
+
+#: ../src/common/dynlib.cpp:152
+#, c-format
+msgid "Couldn't find symbol '%s' in a dynamic library"
+msgstr ""
+"Δεν ήταν δυνατός ο εντοπισμός του συμβόλου '%s' σε μια δυναμική βιβλιοθήκη."
+
+#: ../src/gtk/print.cpp:2014
+msgid "Couldn't get hatch style from wxBrush."
+msgstr ""
+
+#: ../src/msw/thread.cpp:950
+msgid "Couldn't get the current thread pointer"
+msgstr ""
+"Δεν ήταν δυνατή η ανάκτηση toy τρέχοντος δείκτη νήματος εκτέλεσης(thread)"
+
+#: ../src/osx/carbon/overlay.cpp:129
+#, fuzzy
+msgid "Couldn't init the context on the overlay window"
+msgstr ""
+"Δεν ήταν δυνατή η ανάκτηση toy τρέχοντος δείκτη νήματος εκτέλεσης(thread)"
+
+#: ../src/common/imaggif.cpp:263
+#, fuzzy
+msgid "Couldn't initialize GIF hash table."
+msgstr "Δεν είναι δυνατή η αρχικοποίηση της ροής zlib deflate."
+
+#: ../src/common/imagpng.cpp:657
+msgid "Couldn't load a PNG image - file is corrupted or not enough memory."
+msgstr ""
+"Δεν ήταν δυνατή η φόρτωση εικόνας PNG - είτε το αρχείο δεν είναι έγκυρο ή "
+"δεν υπάρχει αρκετή μνήμη."
+
+#: ../src/unix/sound.cpp:470
+#, c-format
+msgid "Couldn't load sound data from '%s'."
+msgstr "Δεν ήταν δυνατή η φόρτωση δεδομένων ήχου από το '%s'"
+
+#: ../src/msw/dirdlg.cpp:441
+#, fuzzy
+msgid "Couldn't obtain folder name"
+msgstr "Δεν ήταν δυνατή η δημιουργία χρονοδιακόπτη (timer)"
+
+#: ../src/unix/sound_sdl.cpp:229
+#, c-format
+msgid "Couldn't open audio: %s"
+msgstr "Δεν είναι δυνατό το άνοιγμα του ήχου: %s"
+
+#: ../src/msw/ole/dataobj.cpp:350
+#, c-format
+msgid "Couldn't register clipboard format '%s'."
+msgstr ""
+"Δεν ήταν δυνατή η καταχώρηση του τύπου προχείρου(clipboard format) '%s'"
+
+#: ../src/os2/thread.cpp:177
+msgid "Couldn't release a mutex"
+msgstr "Δεν ήταν δυνατή η απελευθέρωση ενός mutex"
+
+#: ../src/msw/listctrl.cpp:756
+#, c-format
+msgid "Couldn't retrieve information about list control item %d."
+msgstr ""
+"Δεν ήταν δυνατή η ανάκτηση πληροφοριών σχετικά με το στοιχείο λίστας %d."
+
+#: ../src/common/imagpng.cpp:746 ../src/common/imagpng.cpp:757
+#: ../src/common/imagpng.cpp:767
+msgid "Couldn't save PNG image."
+msgstr "Δεν ήταν δυνατή η αποθήκευση εικόνας PNG."
+
+#: ../src/msw/thread.cpp:715
+msgid "Couldn't terminate thread"
+msgstr "Δεν ήταν δυνατός ο τερματισμός του thread"
+
+#: ../src/common/xtistrm.cpp:170
+#, fuzzy, c-format
+msgid "Create Parameter %s not found in declared RTTI Parameters"
+msgstr "Η παράμετρος Create δεν βρέθηκε στις δηλωμένες παραμέτρους RTTI"
+
+#: ../src/generic/dirdlgg.cpp:317
+msgid "Create directory"
+msgstr "Δημιουργία καταλόγου"
+
+#: ../src/generic/filedlgg.cpp:228 ../src/generic/dirdlgg.cpp:131
+msgid "Create new directory"
+msgstr "Δημιουργία νέου καταλόγου"
+
+#: ../src/common/accelcmn.cpp:322
+#, fuzzy
+msgid "Ctrl+"
+msgstr "ctrl"
+
+#: ../src/richtext/richtextctrl.cpp:325 ../src/osx/textctrl_osx.cpp:582
+#: ../src/common/stockitem.cpp:151 ../src/msw/textctrl.cpp:2283
+msgid "Cu&t"
+msgstr "Απο&κοπή"
+
+#: ../src/generic/filectrlg.cpp:956
+msgid "Current directory:"
+msgstr "Τρέχον κατάλογος:"
+
+#: ../src/gtk/print.cpp:759
+#, fuzzy
+msgid "Custom size"
+msgstr "μέγεθος γραμματοσειράς"
+
+#: ../src/common/headerctrlcmn.cpp:60
+#, fuzzy
+msgid "Customize Columns"
+msgstr "μέγεθος γραμματοσειράς"
+
+#: ../src/common/stockitem.cpp:151 ../src/stc/stc_i18n.cpp:17
+#, fuzzy
+msgid "Cut"
+msgstr "Απο&κοπή"
+
+#: ../src/common/stockitem.cpp:259
+#, fuzzy
+msgid "Cut selection"
+msgstr "Τμήματα"
+
+#: ../src/common/fmapbase.cpp:152
+msgid "Cyrillic (ISO-8859-5)"
+msgstr "Κυριλλικό (ISO-8859-5)"
+
+#: ../src/common/paper.cpp:100
+msgid "D sheet, 22 x 34 in"
+msgstr "D sheet, 22 x 34 ίντσες"
+
+#: ../src/msw/dde.cpp:708
+msgid "DDE poke request failed"
+msgstr "Η DDE poke αίτηση απέτυχε"
+
+#: ../src/common/accelcmn.cpp:79
+msgid "DECIMAL"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:47
+msgid "DEL"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:48
+msgid "DELETE"
+msgstr ""
+
+#: ../src/common/imagbmp.cpp:1092
+msgid "DIB Header: Encoding doesn't match bitdepth."
+msgstr "DIB Header: Η κωδικοποίηση δεν ταιρίζει με το βάθος bit."
+
+#: ../src/common/imagbmp.cpp:1040
+msgid "DIB Header: Image height > 32767 pixels for file."
+msgstr ""
+"DIB Header: Το ύψος της εικόνας είναι > 32767 εικονοστοιχεία για το αρχείο."
+
+#: ../src/common/imagbmp.cpp:1032
+msgid "DIB Header: Image width > 32767 pixels for file."
+msgstr ""
+"DIB Header: Το πλάτος της εικόνας είναι > 32767 εικονοστοιχεία για το αρχείο."
+
+#: ../src/common/imagbmp.cpp:1060
+msgid "DIB Header: Unknown bitdepth in file."
+msgstr "DIB Header: Αγνωστο βάθος bit στο αρχείο."
+
+#: ../src/common/imagbmp.cpp:1074
+msgid "DIB Header: Unknown encoding in file."
+msgstr "DIB Header: Αγνωστη κωδικοποίηση στο αρχείο."
+
+#: ../src/common/accelcmn.cpp:80
+#, fuzzy
+msgid "DIVIDE"
+msgstr "<ΟΔΗΓΟΣ>"
+
+#: ../src/common/paper.cpp:122
+msgid "DL Envelope, 110 x 220 mm"
+msgstr "Φάκελος DL, 110 x 220 mm"
+
+#: ../src/common/accelcmn.cpp:59
+msgid "DOWN"
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:545
+#, fuzzy
+msgid "Dashed"
+msgstr "Ημερομηνία"
+
+#: ../src/osx/carbon/dataview.cpp:1921
+msgid "Data object has invalid data format"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:2491
+msgid "Date renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:300
+#, c-format
+msgid "Debug report \"%s\""
+msgstr ""
+
+#: ../src/common/debugrpt.cpp:210
+#, fuzzy
+msgid "Debug report couldn't be created."
+msgstr "Δεν ήταν δυνατή η δημιουργία του καταλόγου '%s'"
+
+#: ../src/common/debugrpt.cpp:558
+msgid "Debug report generation has failed."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:323
+msgid "Decorative"
+msgstr "Διακοσμητικός"
+
+#: ../src/common/fmapbase.cpp:796
+msgid "Default encoding"
+msgstr "Προκαθορισμένη κωδικοποίηση"
+
+#: ../src/dfb/fontmgr.cpp:180
+#, fuzzy
+msgid "Default font"
+msgstr "Προκαθορισμένος εκτυπωτής"
+
+#: ../src/generic/prntdlgg.cpp:510
+msgid "Default printer"
+msgstr "Προκαθορισμένος εκτυπωτής"
+
+#: ../src/richtext/richtextbuffer.cpp:7841 ../src/common/stockitem.cpp:152
+#: ../src/stc/stc_i18n.cpp:20
+#, fuzzy
+msgid "Delete"
+msgstr "&Διαγραφή"
+
+#: ../src/richtext/richtexttabspage.cpp:148
+#, fuzzy
+msgid "Delete A&ll"
+msgstr "Επιλογή &Ολων"
+
+#: ../src/richtext/richtextbuffer.cpp:10637
+#, fuzzy
+msgid "Delete Column"
+msgstr "Τμήματα"
+
+#: ../src/richtext/richtextbuffer.cpp:10587
+#, fuzzy
+msgid "Delete Row"
+msgstr "&Διαγραφή"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+#, fuzzy
+msgid "Delete Style"
+msgstr "Διαγραφή στοιχείου"
+
+#: ../src/richtext/richtextctrl.cpp:1231 ../src/richtext/richtextctrl.cpp:1452
+#, fuzzy
+msgid "Delete Text"
+msgstr "Διαγραφή στοιχείου"
+
+#: ../src/generic/editlbox.cpp:274
+msgid "Delete item"
+msgstr "Διαγραφή στοιχείου"
+
+#: ../src/common/stockitem.cpp:260
+#, fuzzy
+msgid "Delete selection"
+msgstr "Τμήματα"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+#, fuzzy, c-format
+msgid "Delete style %s?"
+msgstr "Διαγραφή στοιχείου"
+
+#: ../src/unix/snglinst.cpp:295
+#, c-format
+msgid "Deleted stale lock file '%s'."
+msgstr "Διεγράφη το απαρχειομένο(stale) αρχείο κλειδαριά (lock file) '%s'"
+
+#: ../src/common/module.cpp:124
+#, c-format
+msgid "Dependency \"%s\" of module \"%s\" doesn't exist."
+msgstr ""
+
+#: ../src/common/stockitem.cpp:196
+#, fuzzy
+msgid "Descending"
+msgstr "Προκαθορισμένη κωδικοποίηση"
+
+#: ../src/generic/dirctrlg.cpp:626
+msgid "Desktop"
+msgstr ""
+
+#: ../src/generic/aboutdlgg.cpp:70
+msgid "Developed by "
+msgstr ""
+
+#: ../src/generic/aboutdlgg.cpp:176
+msgid "Developers"
+msgstr ""
+
+#: ../src/msw/dialup.cpp:393
+msgid ""
+"Dial up functions are unavailable because the remote access service (RAS) is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Συναρτήσεις (functions) τηλεφωνικής σύνδεσης (dialup) δεν είναι διαθέσιμες "
+"γιατί η υπηρεσία απομακρυσμένης πρόσβασης (remote access service, RAS) δεν "
+"είναι εκατεστημένη σε αυτό το μηχάνημα. Παρακαλώ εγκαταστήστε τη."
+
+#: ../src/generic/tipdlg.cpp:230
+msgid "Did you know..."
+msgstr "Γνωρίζατε ότι..."
+
+#: ../src/dfb/wrapdfb.cpp:63
+#, c-format
+msgid "DirectFB error %d occurred."
+msgstr ""
+
+#: ../src/motif/filedlg.cpp:219
+#, fuzzy
+msgid "Directories"
+msgstr "Διακοσμητικός"
+
+#: ../src/common/filefn.cpp:1251
+#, c-format
+msgid "Directory '%s' couldn't be created"
+msgstr "Δεν ήταν δυνατή η δημιουργία του καταλόγου '%s'"
+
+#: ../src/common/filefn.cpp:1271
+#, fuzzy, c-format
+msgid "Directory '%s' couldn't be deleted"
+msgstr "Δεν ήταν δυνατή η δημιουργία του καταλόγου '%s'"
+
+#: ../src/generic/dirdlgg.cpp:233
+msgid "Directory does not exist"
+msgstr "Ο κατάλογος δεν υπάρχει"
+
+#: ../src/generic/filectrlg.cpp:1412
+msgid "Directory doesn't exist."
+msgstr "Ο κατάλογος δεν υπάρχει."
+
+#: ../src/common/docview.cpp:455
+msgid "Discard changes and reload the last saved version?"
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:512
+msgid ""
+"Display all index items that contain given substring. Search is case "
+"insensitive."
+msgstr ""
+"Εμφάνιση όλων των στοιχείων του ευρετηρίου δεδομένου substring. Η αναζήτηση "
+"διακρίνει μεταξύ κεφαλαίων/πεζών."
+
+#: ../src/html/helpwnd.cpp:692
+msgid "Display options dialog"
+msgstr "Εμφάνιση του διαλόγου επιλογών"
+
+#: ../src/html/helpwnd.cpp:326
+msgid "Displays help as you browse the books on the left."
+msgstr ""
+
+#: ../src/msw/mimetype.cpp:732
+msgid ""
+"Do you want to overwrite the command used to %s files with extension \"%s"
+"\" ?\n"
+"Current value is \n"
+"%s, \n"
+"New value is \n"
+"%s %1"
+msgstr ""
+"Θέλετε να επικαλύψετε την εντολή που χρησιμοποιήθηκε για να %s τα αρχεία με "
+"επέκταση \"%s\" ?\n"
+"Η τρέχουσα τιμή είναι \n"
+"%s, \n"
+"Η νέα τιμή είναι \n"
+"%s %1"
+
+#: ../src/common/docview.cpp:531
+#, fuzzy, c-format
+msgid "Do you want to save changes to %s?"
+msgstr "Θέλετε να αποθηκεύσετε τις αλλαγές στο έγγραφο %s ;"
+
+#: ../src/common/prntbase.cpp:525
+msgid "Document:"
+msgstr ""
+
+#: ../src/generic/aboutdlgg.cpp:73
+msgid "Documentation by "
+msgstr ""
+
+#: ../src/generic/aboutdlgg.cpp:180
+msgid "Documentation writers"
+msgstr ""
+
+#: ../src/common/sizer.cpp:2680
+msgid "Don't Save"
+msgstr ""
+
+#: ../src/msw/frame.cpp:122 ../src/html/htmlwin.cpp:611
+msgid "Done"
+msgstr "Έτοιμο"
+
+#: ../src/generic/progdlgg.cpp:481 ../src/msw/progdlg.cpp:407
+msgid "Done."
+msgstr "Έτοιμο."
+
+#: ../src/richtext/richtextborderspage.cpp:544
+#, fuzzy
+msgid "Dotted"
+msgstr "Έτοιμο"
+
+#: ../src/richtext/richtextborderspage.cpp:546
+#, fuzzy
+msgid "Double"
+msgstr "Έτοιμο"
+
+#: ../src/common/paper.cpp:177
+msgid "Double Japanese Postcard Rotated 148 x 200 mm"
+msgstr ""
+
+#: ../src/common/xtixml.cpp:273
+#, c-format
+msgid "Doubly used id : %d"
+msgstr "Id χρησιμοποιούμενο δύο φορές : %d"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:153
+msgid "Down"
+msgstr "Κάτω"
+
+#: ../src/richtext/richtextctrl.cpp:814
+msgid "Drag"
+msgstr ""
+
+#: ../src/common/paper.cpp:101
+msgid "E sheet, 34 x 44 in"
+msgstr "E sheet, 34 x 44 ίντσες"
+
+#: ../src/common/accelcmn.cpp:61
+msgid "END"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:52
+msgid "ENTER"
+msgstr ""
+
+#: ../src/unix/fswatcher_inotify.cpp:535
+#, fuzzy
+msgid "EOF while reading from inotify descriptor"
+msgstr "αδύνατη η ανάγνωση από περiγραφέα (descriptor) αρχείου %d"
+
+#: ../src/common/accelcmn.cpp:64
+msgid "ESC"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:65
+msgid "ESCAPE"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:73
+msgid "EXECUTE"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:154
+#, fuzzy
+msgid "Edit"
+msgstr "Επεξεργασία στοιχείου"
+
+#: ../src/generic/editlbox.cpp:272
+msgid "Edit item"
+msgstr "Επεξεργασία στοιχείου"
+
+#: ../include/wx/generic/progdlgg.h:84
+#, fuzzy
+msgid "Elapsed time:"
+msgstr "Υπολογισθείς χρόνος : "
+
+#: ../src/richtext/richtextsizepage.cpp:353
+#: ../src/richtext/richtextsizepage.cpp:355
+#: ../src/richtext/richtextsizepage.cpp:465
+#: ../src/richtext/richtextsizepage.cpp:467
+msgid "Enable the height value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:438
+#: ../src/richtext/richtextsizepage.cpp:440
+#, fuzzy
+msgid "Enable the maximum width value."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/richtext/richtextsizepage.cpp:411
+#: ../src/richtext/richtextsizepage.cpp:413
+msgid "Enable the minimum height value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:384
+#: ../src/richtext/richtextsizepage.cpp:386
+#, fuzzy
+msgid "Enable the minimum width value."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/richtext/richtextsizepage.cpp:319
+#: ../src/richtext/richtextsizepage.cpp:321
+msgid "Enable the width value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:280
+#: ../src/richtext/richtextsizepage.cpp:282
+#, fuzzy
+msgid "Enable vertical alignment."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:133
+#: ../src/richtext/richtextbackgroundpage.cpp:135
+msgid "Enables a background colour."
+msgstr ""
+
+#: ../src/richtext/richtextstyledlg.cpp:931
+#, fuzzy
+msgid "Enter a box style name"
+msgstr "Το στυλ της γραμματοσειράς."
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+msgid "Enter a character style name"
+msgstr ""
+
+#: ../src/richtext/richtextstyledlg.cpp:817
+msgid "Enter a list style name"
+msgstr ""
+
+#: ../src/richtext/richtextstyledlg.cpp:890
+#, fuzzy
+msgid "Enter a new style name"
+msgstr "Το στυλ της γραμματοσειράς."
+
+#: ../src/richtext/richtextstyledlg.cpp:651
+msgid "Enter a paragraph style name"
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:174
+#, fuzzy, c-format
+msgid "Enter command to open file \"%s\":"
+msgstr "δεν είναι δυνατό το άνοιγμα του αρχείου '%s'"
+
+#: ../src/generic/helpext.cpp:463
+msgid "Entries found"
+msgstr "Εισαγωγές(entries) βρέθηκαν"
+
+#: ../src/common/paper.cpp:143
+#, fuzzy
+msgid "Envelope Invite 220 x 220 mm"
+msgstr "Φάκελος DL, 110 x 220 mm"
+
+#: ../src/common/config.cpp:473
+#, fuzzy, c-format
+msgid ""
+"Environment variables expansion failed: missing '%c' at position %u in '%s'."
+msgstr ""
+"Η επέκταση μεταβλητών περιβάλλοντος απέτυχε: λείπει το '%c' στην θέση %d στο "
+"'%s'."
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/dirctrlg.cpp:688
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:791
+#: ../src/generic/filectrlg.cpp:805 ../src/generic/filectrlg.cpp:821
+#: ../src/generic/filectrlg.cpp:1381 ../src/generic/filectrlg.cpp:1412
+#: ../src/gtk/filedlg.cpp:73 ../src/gtk1/fontdlg.cpp:74
+msgid "Error"
+msgstr "Σφάλμα"
+
+#: ../src/unix/epolldispatcher.cpp:103
+#, fuzzy
+msgid "Error closing epoll descriptor"
+msgstr "Σφάλμα κατα τη δημιουργία καταλόγου"
+
+#: ../src/unix/fswatcher_kqueue.cpp:114
+#, fuzzy
+msgid "Error closing kqueue instance"
+msgstr "Σφάλμα κατα τη δημιουργία καταλόγου"
+
+#: ../src/generic/dirdlgg.cpp:251
+msgid "Error creating directory"
+msgstr "Σφάλμα κατα τη δημιουργία καταλόγου"
+
+#: ../src/common/imagbmp.cpp:1103
+#, fuzzy
+msgid "Error in reading image DIB."
+msgstr "Σφάλμα κατά την ανάγνωση εικόνας DIB."
+
+#: ../src/propgrid/propgrid.cpp:6563
+#, c-format
+msgid "Error in resource: %s"
+msgstr ""
+
+#: ../src/common/fileconf.cpp:453
+msgid "Error reading config options."
+msgstr "Σφάλμα κατά την ανάγνωση των ρυθμίσεων."
+
+#: ../src/common/fileconf.cpp:1064
+msgid "Error saving user configuration data."
+msgstr "Σφάλμα κατά την εγγραφή των ρυθμίσεων χρήστη."
+
+#: ../src/gtk/print.cpp:671
+#, fuzzy
+msgid "Error while printing: "
+msgstr "Σφάλμα κατά την αναμονή στη σημαφόρο"
+
+#: ../src/common/log.cpp:223
+msgid "Error: "
+msgstr "Σφάλμα: "
+
+#: ../src/common/fmapbase.cpp:150
+msgid "Esperanto (ISO-8859-3)"
+msgstr "Εσπεράντο (ISO-8859-3)"
+
+#: ../include/wx/generic/progdlgg.h:85
+#, fuzzy
+msgid "Estimated time:"
+msgstr "Υπολογισθείς χρόνος : "
+
+#: ../src/unix/fswatcher_inotify.cpp:639
+msgid "Event queue overflowed"
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:234
+#, fuzzy
+msgid "Executable files (*.exe)|*.exe|"
+msgstr "Όλα τα αρχεία (*.*)|*.*"
+
+#: ../src/common/stockitem.cpp:155
+msgid "Execute"
+msgstr ""
+
+#: ../src/msw/utilsexc.cpp:888
+#, c-format
+msgid "Execution of command '%s' failed"
+msgstr "Η εκτέλεση της εντολής '%s' απέτυχε"
+
+#: ../src/os2/utilsexc.cpp:163
+#, c-format
+msgid "Execution of command '%s' failed with error: %ul"
+msgstr "Η εκτέλεση της εντολής '%s' απέτυχε με σφάλμα: %ul"
+
+#: ../src/common/paper.cpp:106
+msgid "Executive, 7 1/4 x 10 1/2 in"
+msgstr "Executive, 7 1/4 x 10 1/2 ίντσες"
+
+#: ../src/msw/registry.cpp:1230
+#, c-format
+msgid ""
+"Exporting registry key: file \"%s\" already exists and won't be overwritten."
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:195
+msgid "Extended Unix Codepage for Japanese (EUC-JP)"
+msgstr "Εκτεταμένη Κωδικοσελίδα Unix για Ιαπωνικά (EUC-JP)"
+
+#: ../src/html/chm.cpp:725
+#, c-format
+msgid "Extraction of '%s' into '%s' failed."
+msgstr "Η εξαγωγή του '%s' στο '%s' απέτυχε"
+
+#: ../src/common/accelcmn.cpp:238 ../src/common/accelcmn.cpp:333
+msgid "F"
+msgstr ""
+
+#: ../src/propgrid/advprops.cpp:640
+#, fuzzy
+msgid "Face Name"
+msgstr "ΝέοΌνομα"
+
+#: ../src/unix/snglinst.cpp:269
+msgid "Failed to access lock file."
+msgstr "Αποτυχία πρόσβασης στο αρχείο 'κλειδωνιά'(lock file)."
+
+#: ../src/unix/epolldispatcher.cpp:116
+#, fuzzy, c-format
+msgid "Failed to add descriptor %d to epoll descriptor %d"
+msgstr "δεν είναι δυνατή η εγγραφή του περιγραφέα αρχείου(file descriptor) %d"
+
+#: ../src/msw/dib.cpp:548
+#, fuzzy, c-format
+msgid "Failed to allocate %luKb of memory for bitmap data."
+msgstr "Αποτυχία δέσμευσης %luKb μνήμης για δεδομένα bitmap."
+
+#: ../src/common/glcmn.cpp:87
+#, fuzzy
+msgid "Failed to allocate colour for OpenGL"
+msgstr "Αποτυχία δημιουργίας δείκτη."
+
+#: ../src/unix/displayx11.cpp:288
+msgid "Failed to change video mode"
+msgstr "Αποτυχία αλλαγής της κατάστασης οθόνης"
+
+#: ../src/common/image.cpp:3139
+#, fuzzy, c-format
+msgid "Failed to check format of image file \"%s\"."
+msgstr "Αποτυχία αποθήκευσης της εικόνας στο αρχείο \"%s\"."
+
+#: ../src/common/debugrpt.cpp:244
+#, fuzzy, c-format
+msgid "Failed to clean up debug report directory \"%s\""
+msgstr "Απέτυχε η δημιουργία καταλόγου '%s'/.gnome."
+
+#: ../src/common/filename.cpp:211
+msgid "Failed to close file handle"
+msgstr "Αποτυχία κλεισίματος του χειριστηρίου του αρχείου(file handle)"
+
+#: ../src/unix/snglinst.cpp:334
+#, c-format
+msgid "Failed to close lock file '%s'"
+msgstr "Αποτυχία κλεισίματος του αρχείου 'κλειδωνιά'(lock file) '%s'"
+
+#: ../src/msw/clipbrd.cpp:115
+msgid "Failed to close the clipboard."
+msgstr "Αποτυχία κλεισίματος του προχείρου(clipboard)"
+
+#: ../src/x11/utils.cpp:204
+#, fuzzy, c-format
+msgid "Failed to close the display \"%s\""
+msgstr "Αποτυχία κλεισίματος του προχείρου(clipboard)"
+
+#: ../src/msw/dialup.cpp:818
+msgid "Failed to connect: missing username/password."
+msgstr "Αποτυχία συνδεσης: λείπει το όνομα χρήστη/συνθηματικό"
+
+#: ../src/msw/dialup.cpp:764
+msgid "Failed to connect: no ISP to dial."
+msgstr ""
+"Αποτυχία συνδεσης: κανένας παροχέας υπηρεσιών Internet (ISP) για να καλέσω."
+
+#: ../src/common/textfile.cpp:200
+#, fuzzy, c-format
+msgid "Failed to convert file \"%s\" to Unicode."
+msgstr "Αποτυχία κλεισίματος του χειριστηρίου του αρχείου(file handle)"
+
+#: ../src/generic/logg.cpp:976
+#, fuzzy
+msgid "Failed to copy dialog contents to the clipboard."
+msgstr "Αποτυχία ανοίγματος του προχείρου (clipboard)."
+
+#: ../src/msw/registry.cpp:691
+#, c-format
+msgid "Failed to copy registry value '%s'"
+msgstr "Αποτυχία αντιγραφής της τιμής μητρώου '%s'"
+
+#: ../src/msw/registry.cpp:700
+#, c-format
+msgid "Failed to copy the contents of registry key '%s' to '%s'."
+msgstr ""
+"Αποτυχία αντιγραφής των περιεχομένων του κλειδιού μητρώου '%s' στο '%s'."
+
+#: ../src/common/filefn.cpp:1058
+#, c-format
+msgid "Failed to copy the file '%s' to '%s'"
+msgstr "Αποτυχία αντιγραφής του αρχείου '%s' στο '%s'"
+
+#: ../src/msw/registry.cpp:678
+#, c-format
+msgid "Failed to copy the registry subkey '%s' to '%s'."
+msgstr "Αποτυχία της αντιγραφής του υποκλειδιού μητρώου '%s' σε '%s'."
+
+#: ../src/msw/dde.cpp:1073
+msgid "Failed to create DDE string"
+msgstr "Απέτυχε η δημιουργεία ενός DDE αλφαρηθμιτικού (string)"
+
+#: ../src/msw/mdi.cpp:590
+msgid "Failed to create MDI parent frame."
+msgstr "Αποτυχία δημιουργίας ενός γονεικού περιγράμματος (parent frame) MDI."
+
+#: ../src/common/filename.cpp:1080
+msgid "Failed to create a temporary file name"
+msgstr "Αποτυχία δημιουργίας ονόματος προσωρινού αρχείου"
+
+#: ../src/msw/utilsexc.cpp:235
+msgid "Failed to create an anonymous pipe"
+msgstr "Αποτυχία δημιουργίας ενός ανώνυμου pipe"
+
+#: ../src/msw/ole/automtn.cpp:522
+#, fuzzy, c-format
+msgid "Failed to create an instance of \"%s\""
+msgstr "Απέτυχε η δημιουργία καταλόγου '%s'/.gnome."
+
+#: ../src/msw/dde.cpp:442
+#, c-format
+msgid "Failed to create connection to server '%s' on topic '%s'"
+msgstr ""
+"Αποτυχία κατά την δημιουργία σύνδεσης με τον εξυπηρετητή (server) '%s' στο "
+"θέμα '%s'"
+
+#: ../src/msw/cursor.cpp:212
+msgid "Failed to create cursor."
+msgstr "Αποτυχία δημιουργίας δείκτη."
+
+#: ../src/common/debugrpt.cpp:209
+#, fuzzy, c-format
+msgid "Failed to create directory \"%s\""
+msgstr "Απέτυχε η δημιουργία καταλόγου '%s'/.gnome."
+
+#: ../src/generic/dirdlgg.cpp:249
+#, c-format
+msgid ""
+"Failed to create directory '%s'\n"
+"(Do you have the required permissions?)"
+msgstr ""
+"Αποτυχία κατά τη δημιουργία υποκαταλόγου '%s'\n"
+"(Έχετε τα απαιτούμενα δικαιώματα(permissions);)"
+
+#: ../src/unix/epolldispatcher.cpp:84
+#, fuzzy
+msgid "Failed to create epoll descriptor"
+msgstr "Αποτυχία δημιουργίας δείκτη."
+
+#: ../src/msw/mimetype.cpp:198
+#, c-format
+msgid "Failed to create registry entry for '%s' files."
+msgstr ""
+"Απέτυχε η δημιουργία εγγραφής μητρώου (registry entry) για '%s' αρχεία."
+
+#: ../src/msw/fdrepdlg.cpp:442
+#, c-format
+msgid "Failed to create the standard find/replace dialog (error code %d)"
+msgstr ""
+"Απέτυχε η δημιουργία καθιερωμένου παράθυρου διαλόγου εύρεσης/αντικατάστασης "
+"(κωδικός σφάλματος %d)"
+
+#: ../src/unix/wakeuppipe.cpp:52
+#, fuzzy
+msgid "Failed to create wake up pipe used by event loop."
+msgstr "Αποτυχία δημιουργίας μιας μπάρας κατάστασης (status bar)"
+
+#: ../src/html/winpars.cpp:739
+#, c-format
+msgid "Failed to display HTML document in %s encoding"
+msgstr "Απέτυχε η προβολή του εγγράφου HTML στην κωδικοποίηση %s"
+
+#: ../src/msw/clipbrd.cpp:127
+msgid "Failed to empty the clipboard."
+msgstr "Αποτυχία αδειάσματος του προχείρου (clipboard)."
+
+#: ../src/unix/displayx11.cpp:265
+msgid "Failed to enumerate video modes"
+msgstr "Απέτυχε η απαρίθμηση των καταστάσεων οθόνης."
+
+#: ../src/msw/dde.cpp:727
+msgid "Failed to establish an advise loop with DDE server"
+msgstr "Αποτυχία επίτευξης βρόχου advise με τον διακομιστή DDE"
+
+#: ../src/msw/dialup.cpp:650 ../src/msw/dialup.cpp:884
+#, fuzzy, c-format
+msgid "Failed to establish dialup connection: %s"
+msgstr "Αποτυχία %s της σύνδεσης μέσω τηλεφώνου : %s"
+
+#: ../src/unix/utilsunx.cpp:617
+#, c-format
+msgid "Failed to execute '%s'\n"
+msgstr "Αποτυχία εκτέλεσης του '%s'\n"
+
+#: ../src/common/debugrpt.cpp:725
+msgid "Failed to execute curl, please install it in PATH."
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:505
+#, fuzzy, c-format
+msgid "Failed to find CLSID of \"%s\""
+msgstr "Αποτυχία ανοίγματος του '%s' για το '%s'"
+
+#: ../src/common/regex.cpp:434 ../src/common/regex.cpp:482
+#, fuzzy, c-format
+msgid "Failed to find match for regular expression: %s"
+msgstr ""
+"Αποτυχία στο συνταίριασμα του '%s' στην κανονική έκφραση (regular "
+"expression): %s"
+
+#: ../src/msw/dialup.cpp:716
+#, c-format
+msgid "Failed to get ISP names: %s"
+msgstr "Αποτυχία κατά την λήψη των ονομάτων των ISP: %s"
+
+#: ../src/msw/ole/automtn.cpp:574
+#, fuzzy, c-format
+msgid "Failed to get OLE automation interface for \"%s\""
+msgstr "Απέτυχε η δημιουργία καταλόγου '%s'/.gnome."
+
+#: ../src/msw/clipbrd.cpp:747
+msgid "Failed to get data from the clipboard"
+msgstr "Αποτυχία λήψης δεδομένων απο το πρόχειρο"
+
+#: ../src/common/time.cpp:249
+msgid "Failed to get the local system time"
+msgstr "Αποτυχία καθορισμού της ώρας του τοπικού συστήματος"
+
+#: ../src/common/filefn.cpp:1453
+msgid "Failed to get the working directory"
+msgstr "Αποτυχία λήψης καταλόγου εργασίας (working directory)"
+
+#: ../src/univ/theme.cpp:113
+msgid "Failed to initialize GUI: no built-in themes found."
+msgstr "Αποτυχία αρχικοποίησης του GUI: δεν βρέθηκαν ενσωματωμένα θέματα."
+
+#: ../src/msw/helpchm.cpp:63
+msgid "Failed to initialize MS HTML Help."
+msgstr "Αποτυχία στην αρχικοποίηση του MS HTML Help."
+
+#: ../src/msw/glcanvas.cpp:892
+msgid "Failed to initialize OpenGL"
+msgstr "Απέτυχε η αρχικοποίηση του OpenGL"
+
+#: ../src/msw/dialup.cpp:879
+#, fuzzy, c-format
+msgid "Failed to initiate dialup connection: %s"
+msgstr "Αποτυχία τερματισμού της σύνδεσης μέσω τηλεφώνου : %s"
+
+#: ../src/gtk/textctrl.cpp:1117
+#, fuzzy
+msgid "Failed to insert text in the control."
+msgstr "Αποτυχία λήψης καταλόγου εργασίας (working directory)"
+
+#: ../src/unix/snglinst.cpp:241
+#, c-format
+msgid "Failed to inspect the lock file '%s'"
+msgstr "Αποτυχία επιθεώρησης του αρχείου 'κλειδωνιά'(lock file) '%s'"
+
+#: ../src/unix/appunix.cpp:182
+#, fuzzy
+msgid "Failed to install signal handler"
+msgstr "Αποτυχία κλεισίματος του χειριστηρίου του αρχείου(file handle)"
+
+#: ../src/unix/threadpsx.cpp:1162
+msgid ""
+"Failed to join a thread, potential memory leak detected - please restart the "
+"program"
+msgstr ""
+"Απέτυχε η συνένωση(join) ενός νήματος εκτέλεσης (thread), πιθανή διαρροή "
+"μνήμης εντοπίστηκε - παρακαλώ επανεκκινήστε το πρόγραμμα"
+
+#: ../src/msw/utils.cpp:745
+#, c-format
+msgid "Failed to kill process %d"
+msgstr "Αποτυχία θανάτωσης της διαδικασίας(process) %d"
+
+#: ../src/common/image.cpp:2365
+#, fuzzy, c-format
+msgid "Failed to load bitmap \"%s\" from resources."
+msgstr "Αποτυχία φόρτωσης της εικόνας %d από το αρχείο '%s'."
+
+#: ../src/common/image.cpp:2374
+#, fuzzy, c-format
+msgid "Failed to load icon \"%s\" from resources."
+msgstr "Αποτυχία φόρτωσης της εικόνας %d από το αρχείο '%s'."
+
+#: ../src/common/iconbndl.cpp:182
+#, fuzzy, c-format
+msgid "Failed to load image %%d from file '%s'."
+msgstr "Αποτυχία φόρτωσης της εικόνας %d από το αρχείο '%s'."
+
+#: ../src/common/iconbndl.cpp:190
+#, fuzzy, c-format
+msgid "Failed to load image %d from stream."
+msgstr "Αποτυχία φόρτωσης της εικόνας %d από το αρχείο '%s'."
+
+#: ../src/common/image.cpp:2450 ../src/common/image.cpp:2469
+#, fuzzy, c-format
+msgid "Failed to load image from file \"%s\"."
+msgstr "Αποτυχία φόρτωσης της εικόνας %d από το αρχείο '%s'."
+
+#: ../src/msw/enhmeta.cpp:97
+#, c-format
+msgid "Failed to load metafile from file \"%s\"."
+msgstr "Αποτυχία φόρτωσης της μετα-εικόνας από το αρχείο '%s'."
+
+#: ../src/msw/volume.cpp:327
+msgid "Failed to load mpr.dll."
+msgstr "Αποτυχία φόρτωσης του mpr.dll."
+
+#: ../src/msw/utils.cpp:1120
+#, fuzzy, c-format
+msgid "Failed to load resource \"%s\"."
+msgstr "Αποτυχία φόρτωσης της μετα-εικόνας από το αρχείο '%s'."
+
+#: ../src/common/dynlib.cpp:100
+#, c-format
+msgid "Failed to load shared library '%s'"
+msgstr "Αποτυχία φόρτωσης της κοινής βιβλιοθήκης (shared library) '%s'"
+
+#: ../src/msw/utils.cpp:1127
+#, fuzzy, c-format
+msgid "Failed to lock resource \"%s\"."
+msgstr "Αποτυχία κλειδώματος του αρχείου 'κλειδωνιά'(lock file) '%s'"
+
+#: ../src/unix/snglinst.cpp:198
+#, c-format
+msgid "Failed to lock the lock file '%s'"
+msgstr "Αποτυχία κλειδώματος του αρχείου 'κλειδωνιά'(lock file) '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:136
+#, c-format
+msgid "Failed to modify descriptor %d in epoll descriptor %d"
+msgstr ""
+
+#: ../src/common/filename.cpp:2681
+#, c-format
+msgid "Failed to modify file times for '%s'"
+msgstr "Αποτυχία τροποποίησης ώρας του αρχείου '%s'"
+
+#: ../src/common/selectdispatcher.cpp:252
+msgid "Failed to monitor I/O channels"
+msgstr ""
+
+#: ../src/common/filename.cpp:194
+#, fuzzy, c-format
+msgid "Failed to open '%s' for reading"
+msgstr "Αποτυχία ανοίγματος του '%s' για το '%s'"
+
+#: ../src/common/filename.cpp:199
+#, fuzzy, c-format
+msgid "Failed to open '%s' for writing"
+msgstr "Αποτυχία ανοίγματος του '%s' για το '%s'"
+
+#: ../src/html/chm.cpp:141
+#, c-format
+msgid "Failed to open CHM archive '%s'."
+msgstr "Αποτυχία ανοίγματος του arxe;ioy CHM '%s'."
+
+#: ../src/common/utilscmn.cpp:1135
+#, fuzzy, c-format
+msgid "Failed to open URL \"%s\" in default browser."
+msgstr "Αποτυχία ανοίγματος του '%s' για το '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:92
+#, fuzzy, c-format
+msgid "Failed to open directory \"%s\" for monitoring."
+msgstr "Αποτυχία ανοίγματος του '%s' για το '%s'"
+
+#: ../src/x11/utils.cpp:223
+#, fuzzy, c-format
+msgid "Failed to open display \"%s\"."
+msgstr "Αποτυχία ανοίγματος του '%s' για το '%s'"
+
+#: ../src/common/filename.cpp:1115
+msgid "Failed to open temporary file."
+msgstr "Αποτυχία ανοίγματος προσωρινού αρχείου"
+
+#: ../src/msw/clipbrd.cpp:94
+msgid "Failed to open the clipboard."
+msgstr "Αποτυχία ανοίγματος του προχείρου (clipboard)."
+
+#: ../src/common/translation.cpp:1170
+#, fuzzy, c-format
+msgid "Failed to parse Plural-Forms: '%s'"
+msgstr "Δεν είναι δυνατή η ανάγνωση Plural-Forms:'%s'."
+
+#: ../src/unix/mediactrl.cpp:1268
+#, fuzzy, c-format
+msgid "Failed to prepare playing \"%s\"."
+msgstr "Αποτυχία ανοίγματος του '%s' για το '%s'"
+
+#: ../src/msw/clipbrd.cpp:647
+msgid "Failed to put data on the clipboard"
+msgstr "Αποτυχία τοποθέτησης δεδομένων στο πρόχειρο (clipboard)"
+
+#: ../src/unix/snglinst.cpp:278
+msgid "Failed to read PID from lock file."
+msgstr "Απέτυχε η ανάγνωση PID από αρχείο κλειδωνιά(lock file)."
+
+#: ../src/common/fileconf.cpp:464
+#, fuzzy
+msgid "Failed to read config options."
+msgstr "Σφάλμα κατά την ανάγνωση των ρυθμίσεων."
+
+#: ../src/common/docview.cpp:678
+#, fuzzy, c-format
+msgid "Failed to read document from the file \"%s\"."
+msgstr "Αποτυχία φόρτωσης της μετα-εικόνας από το αρχείο '%s'."
+
+#: ../src/dfb/evtloop.cpp:98
+#, fuzzy
+msgid "Failed to read event from DirectFB pipe"
+msgstr "Απέτυχε η ανάγνωση PID από αρχείο κλειδωνιά(lock file)."
+
+#: ../src/unix/wakeuppipe.cpp:120
+#, fuzzy
+msgid "Failed to read from wake-up pipe"
+msgstr "Απέτυχε η ανάγνωση PID από αρχείο κλειδωνιά(lock file)."
+
+#: ../src/unix/utilsunx.cpp:685
+msgid "Failed to redirect child process input/output"
+msgstr ""
+"Αποτυχία στην ανακατεύθυνση της εισόδου/εξόδου διεργασίας απογόνου (child "
+"process input/output)"
+
+#: ../src/msw/utilsexc.cpp:697
+msgid "Failed to redirect the child process IO"
+msgstr ""
+"Αποτυχία στην ανακατεύθυνση του IO διεργασίας απογόνου (child process IO)"
+
+#: ../src/msw/dde.cpp:293
+#, c-format
+msgid "Failed to register DDE server '%s'"
+msgstr "Απέτυχε η καταχώρηση του DDE εξυπηρετητή (server) '%s'"
+
+#: ../src/common/fontmap.cpp:245
+#, c-format
+msgid "Failed to remember the encoding for the charset '%s'."
+msgstr ""
+"Αποτυχία ανάμνησης της κωδικοποίησης για το συνολο χαρακτήρων (charset) '%s'."
+
+#: ../src/common/debugrpt.cpp:227
+#, fuzzy, c-format
+msgid "Failed to remove debug report file \"%s\""
+msgstr "Αποτυχία απομάκρυνσης του αρχείου 'κλειδωνιά'(lock file) '%s'"
+
+#: ../src/unix/snglinst.cpp:322
+#, c-format
+msgid "Failed to remove lock file '%s'"
+msgstr "Αποτυχία απομάκρυνσης του αρχείου 'κλειδωνιά'(lock file) '%s'"
+
+#: ../src/unix/snglinst.cpp:288
+#, c-format
+msgid "Failed to remove stale lock file '%s'."
+msgstr ""
+"Αποτυχία απομάκρυνσης του απαρχειομένου(stale) αρχείου 'κλειδωνιά'(lock "
+"file) '%s'"
+
+#: ../src/msw/registry.cpp:528
+#, c-format
+msgid "Failed to rename registry value '%s' to '%s'."
+msgstr "Αποτυχία της μετονομασίας της τιμής μητρώου '%s' σε '%s'."
+
+#: ../src/common/filefn.cpp:1168
+#, c-format
+msgid ""
+"Failed to rename the file '%s' to '%s' because the destination file already "
+"exists."
+msgstr ""
+
+#: ../src/msw/registry.cpp:633
+#, c-format
+msgid "Failed to rename the registry key '%s' to '%s'."
+msgstr "Αποτυχία της μετονομασίας του κλειδιού μητρώου '%s' σε '%s'."
+
+#: ../src/msw/clipbrd.cpp:497
+msgid "Failed to retrieve data from the clipboard."
+msgstr "Αποτυχία κατά την ανάκτηση δεδομένων από το πρόχειρο (clipboard)."
+
+#: ../src/common/filename.cpp:2777
+#, c-format
+msgid "Failed to retrieve file times for '%s'"
+msgstr "Αποτυχία λήψης της ώρας του αρχείου '%s'"
+
+#: ../src/msw/dialup.cpp:487
+msgid "Failed to retrieve text of RAS error message"
+msgstr "Αποτυχία στη λήψη κειμένου από το μήνυμα σφάλματος RAS"
+
+#: ../src/msw/clipbrd.cpp:784
+msgid "Failed to retrieve the supported clipboard formats"
+msgstr ""
+"Αποτυχία στην ανάκτηση των υποστηριζομένων μορφών προχείρου (clipboard "
+"formats)"
+
+#: ../src/common/docview.cpp:649
+#, fuzzy, c-format
+msgid "Failed to save document to the file \"%s\"."
+msgstr "Αποτυχία αποθήκευσης της εικόνας στο αρχείο \"%s\"."
+
+#: ../src/msw/dib.cpp:326
+#, c-format
+msgid "Failed to save the bitmap image to file \"%s\"."
+msgstr "Αποτυχία αποθήκευσης της εικόνας στο αρχείο \"%s\"."
+
+#: ../src/msw/dde.cpp:768
+msgid "Failed to send DDE advise notification"
+msgstr "Αποτυχία κατά την αποστολή DDE advise επισήμανσης"
+
+#: ../src/common/ftp.cpp:404
+#, c-format
+msgid "Failed to set FTP transfer mode to %s."
+msgstr "Αποτυχία θέσης FTP transfer mode σε '%s'"
+
+#: ../src/msw/clipbrd.cpp:373
+msgid "Failed to set clipboard data."
+msgstr "Αποτυχία θέσης δεδομένων προχείρου (clipboard)."
+
+#: ../src/unix/snglinst.cpp:181
+#, c-format
+msgid "Failed to set permissions on lock file '%s'"
+msgstr "Αδύνατος ο ορισμός των δικαιωμάτων για το αρχείο 'κλειδωνιά' '%s'"
+
+#: ../src/unix/utilsunx.cpp:674
+#, fuzzy
+msgid "Failed to set process priority"
+msgstr "Δεν είναι δυνατή η θέση προτεραιότητας του thread"
+
+#: ../src/common/file.cpp:576
+msgid "Failed to set temporary file permissions"
+msgstr "Αποτυχία θέσπισης δικαιωμάτων προσωρινού αρχείου"
+
+#: ../src/gtk/textctrl.cpp:1058
+#, fuzzy
+msgid "Failed to set text in the text control."
+msgstr "Αποτυχία καθορισμού της ώρας του UTC συστήματος"
+
+#: ../src/unix/threadpsx.cpp:1293
+#, fuzzy, c-format
+msgid "Failed to set thread concurrency level to %lu"
+msgstr "Δεν είναι δυνατή η θέση προτεραιότητας του thread"
+
+#: ../src/unix/threadpsx.cpp:1377 ../src/unix/threadpsx.cpp:1387
+#, fuzzy, c-format
+msgid "Failed to set thread priority %d."
+msgstr "Δεν είναι δυνατή η θέση προτεραιότητας του thread"
+
+#: ../src/unix/utilsunx.cpp:791
+msgid "Failed to set up non-blocking pipe, the program might hang."
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:261
+#, c-format
+msgid "Failed to store image '%s' to memory VFS!"
+msgstr "Αποτυχία αποθήκευσης της εικόνας '%s' στο VFS μνήμης!"
+
+#: ../src/dfb/evtloop.cpp:170
+msgid "Failed to switch DirectFB pipe to non-blocking mode"
+msgstr ""
+
+#: ../src/unix/wakeuppipe.cpp:59
+msgid "Failed to switch wake up pipe to non-blocking mode"
+msgstr ""
+
+#: ../src/unix/threadpsx.cpp:1569
+msgid "Failed to terminate a thread."
+msgstr "Αποτυχία τερματισμού του thread"
+
+#: ../src/msw/dde.cpp:746
+msgid "Failed to terminate the advise loop with DDE server"
+msgstr "Αποτυχία τερματισμού του advise loop με τον DDE εξυπηρετητή (server)"
+
+#: ../src/msw/dialup.cpp:959
+#, c-format
+msgid "Failed to terminate the dialup connection: %s"
+msgstr "Αποτυχία τερματισμού της σύνδεσης μέσω τηλεφώνου : %s"
+
+#: ../src/common/filename.cpp:2696
+#, c-format
+msgid "Failed to touch the file '%s'"
+msgstr "Αποτυχία αγγίγματος (touch) του αρχείου '%s'"
+
+#: ../src/unix/snglinst.cpp:328
+#, c-format
+msgid "Failed to unlock lock file '%s'"
+msgstr "Αποτυχία ξεκλείδωματος του αρχείου 'κλειδωνιά'(lock file) '%s'"
+
+#: ../src/msw/dde.cpp:314
+#, c-format
+msgid "Failed to unregister DDE server '%s'"
+msgstr ""
+"Αποτυχία απο-καταχώρησης (unregister) του DDE εξυπηρετητή (server) '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:155
+#, fuzzy, c-format
+msgid "Failed to unregister descriptor %d from epoll descriptor %d"
+msgstr "Αποτυχία κατά την ανάκτηση δεδομένων από το πρόχειρο (clipboard)."
+
+#: ../src/common/fileconf.cpp:1037
+msgid "Failed to update user configuration file."
+msgstr "Αποτυχία ανανέωσης του αρχείου ρυθμίσεων του χρήστη."
+
+#: ../src/common/debugrpt.cpp:738
+#, fuzzy, c-format
+msgid "Failed to upload the debug report (error code %d)."
+msgstr ""
+"Απέτυχε η δημιουργία καθιερωμένου παράθυρου διαλόγου εύρεσης/αντικατάστασης "
+"(κωδικός σφάλματος %d)"
+
+#: ../src/unix/snglinst.cpp:168
+#, c-format
+msgid "Failed to write to lock file '%s'"
+msgstr "Αποτυχία εγγραφής του αρχείου 'κλειδωνιά'(lock file) '%s'"
+
+#: ../src/propgrid/propgrid.cpp:172
+#, fuzzy
+msgid "False"
+msgstr "Αρχείο"
+
+#: ../src/propgrid/advprops.cpp:658
+#, fuzzy
+msgid "Family"
+msgstr "Οικογένεια γραμματοσειράς:"
+
+#: ../src/common/stockitem.cpp:157 ../src/msw/wince/filedlgwce.cpp:121
+msgid "File"
+msgstr "Αρχείο"
+
+#: ../src/common/docview.cpp:666
+#, fuzzy, c-format
+msgid "File \"%s\" could not be opened for reading."
+msgstr "Αποτυχία ανοίγματος του '%s' για το '%s'"
+
+#: ../src/common/docview.cpp:643
+#, fuzzy, c-format
+msgid "File \"%s\" could not be opened for writing."
+msgstr "Αποτυχία ανοίγματος του '%s' για το '%s'"
+
+#: ../src/gtk/filedlg.cpp:56
+#, c-format
+msgid "File '%s' already exists, do you really want to overwrite it?"
+msgstr "Το αρχείο '%s' υπάρχει ήδη, πραγματικά θέλετε να επικαλυφτεί;"
+
+#: ../src/os2/filedlg.cpp:310
+#, c-format
+msgid ""
+"File '%s' already exists.\n"
+"Do you want to replace it?"
+msgstr ""
+"Το αρχείο '%s' υπάρχει ήδη.\n"
+"Θέλετε να αντικατασταθεί;"
+
+#: ../src/common/filefn.cpp:1207
+#, fuzzy, c-format
+msgid "File '%s' couldn't be removed"
+msgstr "Δεν ήταν δυνατή η δημιουργία του καταλόγου '%s'"
+
+#: ../src/common/filefn.cpp:1187
+#, fuzzy, c-format
+msgid "File '%s' couldn't be renamed '%s'"
+msgstr "Δεν ήταν δυνατή η δημιουργία του καταλόγου '%s'"
+
+#: ../src/richtext/richtextctrl.cpp:2688 ../src/common/textcmn.cpp:921
+msgid "File couldn't be loaded."
+msgstr "Το αρχείο δεν μπόρεσε να φορτωθεί."
+
+#: ../src/msw/filedlg.cpp:458
+#, fuzzy, c-format
+msgid "File dialog failed with error code %0lx."
+msgstr "Η εκτέλεση της εντολής '%s' απέτυχε με σφάλμα: %ul"
+
+#: ../src/common/docview.cpp:1771
+msgid "File error"
+msgstr "Σφάλμα αρχείου"
+
+#: ../src/generic/dirctrlg.cpp:688 ../src/generic/filectrlg.cpp:805
+msgid "File name exists already."
+msgstr "Το όνομα αρχείου υπάρχει ήδη."
+
+#: ../src/motif/filedlg.cpp:220
+#, fuzzy
+msgid "Files"
+msgstr "Αρχείο"
+
+#: ../src/common/filefn.cpp:1761
+#, c-format
+msgid "Files (%s)"
+msgstr "Αρχεία (%s)"
+
+#: ../src/motif/filedlg.cpp:218
+#, fuzzy
+msgid "Filter"
+msgstr "Αρχείο"
+
+#: ../src/common/stockitem.cpp:158 ../src/html/helpwnd.cpp:500
+msgid "Find"
+msgstr "Εύρεση"
+
+#: ../src/common/stockitem.cpp:159
+#, fuzzy
+msgid "First"
+msgstr "πρώτο"
+
+#: ../src/common/prntbase.cpp:1518
+#, fuzzy
+msgid "First page"
+msgstr "Επόμενη σελίδα"
+
+#: ../src/richtext/richtextsizepage.cpp:521
+#, fuzzy
+msgid "Fixed"
+msgstr "Γραμματοσειρά σταθερού μεγέθους:"
+
+#: ../src/html/helpwnd.cpp:1219
+msgid "Fixed font:"
+msgstr "Γραμματοσειρά σταθερού μεγέθους:"
+
+#: ../src/html/helpwnd.cpp:1282
+msgid "Fixed size face.<br> <b>bold</b> <i>italic</i> "
+msgstr "Όψη σταθερού μεγέθους.<br> <b>έντονη</b> <i>πλάγια</i> "
+
+#: ../src/richtext/richtextsizepage.cpp:229
+msgid "Floating"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:160
+#, fuzzy
+msgid "Floppy"
+msgstr "&Αντιγραφή"
+
+#: ../src/common/paper.cpp:112
+msgid "Folio, 8 1/2 x 13 in"
+msgstr "Folio, 8 1/2 x 13 ίντσες"
+
+#: ../src/richtext/richtextformatdlg.cpp:324 ../src/osx/carbon/fontdlg.cpp:473
+#: ../src/common/stockitem.cpp:194
+msgid "Font"
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:230
+#, fuzzy
+msgid "Font &weight:"
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/html/helpwnd.cpp:1220
+msgid "Font size:"
+msgstr "Μέγεθος γραμματοσειράς:"
+
+#: ../src/richtext/richtextfontpage.cpp:217
+#, fuzzy
+msgid "Font st&yle:"
+msgstr "Μέγεθος γραμματοσειράς:"
+
+#: ../src/osx/carbon/fontdlg.cpp:515
+#, fuzzy
+msgid "Font:"
+msgstr "Μέγεθος γραμματοσειράς:"
+
+#: ../src/dfb/fontmgr.cpp:198
+#, c-format
+msgid "Fonts index file %s disappeared while loading fonts."
+msgstr ""
+
+#: ../src/unix/utilsunx.cpp:651
+msgid "Fork failed"
+msgstr "Fork απέτυχε"
+
+#: ../src/common/stockitem.cpp:161
+#, fuzzy
+msgid "Forward"
+msgstr "&Εμπρός"
+
+#: ../src/common/xtixml.cpp:235
+msgid "Forward hrefs are not supported"
+msgstr "Οι forward hrefs δεν υποστηρίζονται"
+
+#: ../src/html/helpwnd.cpp:888
+#, c-format
+msgid "Found %i matches"
+msgstr "Βρέθηκαν %i αντιστοιχίες"
+
+#: ../src/generic/prntdlgg.cpp:238
+msgid "From:"
+msgstr "Από:"
+
+#: ../src/common/imaggif.cpp:160
+msgid "GIF: Invalid gif index."
+msgstr "GIF: Λάθος gif index."
+
+#: ../src/common/imaggif.cpp:150
+msgid "GIF: data stream seems to be truncated."
+msgstr "GIF: το stream δεδομένων μοιάζει να είναι αποκομμένο."
+
+#: ../src/common/imaggif.cpp:134
+msgid "GIF: error in GIF image format."
+msgstr "GIF: σφάλμα στην μορφή εικόνας GIF."
+
+#: ../src/common/imaggif.cpp:137
+msgid "GIF: not enough memory."
+msgstr "GIF: ανεπαρκής μνήμη."
+
+#: ../src/common/imaggif.cpp:140
+msgid "GIF: unknown error!!!"
+msgstr "GIF: άγνωστο λάθος!!!"
+
+#: ../src/gtk/window.cpp:4288
+msgid ""
+"GTK+ installed on this machine is too old to support screen compositing, "
+"please install GTK+ 2.12 or later."
+msgstr ""
+
+#: ../src/univ/themes/gtk.cpp:525
+msgid "GTK+ theme"
+msgstr "Θέμα GTK+"
+
+#: ../src/common/preferencescmn.cpp:39
+msgid "General"
+msgstr ""
+
+#: ../src/common/prntbase.cpp:243
+msgid "Generic PostScript"
+msgstr "Γενικό PostScript"
+
+#: ../src/common/paper.cpp:136
+msgid "German Legal Fanfold, 8 1/2 x 13 in"
+msgstr "German Legal Fanfold, 8 1/2 x 13 ίντσες"
+
+#: ../src/common/paper.cpp:135
+msgid "German Std Fanfold, 8 1/2 x 12 in"
+msgstr "German Std Fanfold, 8 1/2 x 12 ίντσες"
+
+#: ../include/wx/xtiprop.h:188
+msgid "GetProperty called w/o valid getter"
+msgstr "Η GetProperty κλήθηκε χωρίς έγκυρο getter"
+
+#: ../include/wx/xtiprop.h:266
+msgid "GetPropertyCollection called on a generic accessor"
+msgstr "Η GetPropertyCollection κλήθηκε σε έναν γενικό accessor"
+
+#: ../include/wx/xtiprop.h:206
+msgid "GetPropertyCollection called w/o valid collection getter"
+msgstr "Η GetPropertyCollection κλήθηκε χωρίς έγκυρο collection getter"
+
+#: ../src/html/helpwnd.cpp:673
+msgid "Go back"
+msgstr "Πήγαινε πίσω"
+
+#: ../src/html/helpwnd.cpp:674
+msgid "Go forward"
+msgstr "Πήγαινε εμπρός"
+
+#: ../src/html/helpwnd.cpp:676
+msgid "Go one level up in document hierarchy"
+msgstr "Πήγαινε ένα επίπεδο πάνω στην ιεραρχεία του εγγράφου"
+
+#: ../src/generic/filedlgg.cpp:223 ../src/generic/dirdlgg.cpp:136
+msgid "Go to home directory"
+msgstr "Προς κεντρικό κατάλογο"
+
+#: ../src/generic/filedlgg.cpp:219
+msgid "Go to parent directory"
+msgstr "Προς πατρικό κατάλογο"
+
+#: ../src/generic/aboutdlgg.cpp:76
+msgid "Graphics art by "
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:154
+msgid "Greek (ISO-8859-7)"
+msgstr "Ελληνικό (ISO-8859-7)"
+
+#: ../src/richtext/richtextborderspage.cpp:547
+msgid "Groove"
+msgstr ""
+
+#: ../src/common/zstream.cpp:158 ../src/common/zstream.cpp:318
+msgid "Gzip not supported by this version of zlib"
+msgstr "Το Gzip δεν υποστηρίζεται από αυτήν την έκδοση της zlib"
+
+#: ../src/common/accelcmn.cpp:75
+msgid "HELP"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:60
+msgid "HOME"
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:1552
+msgid "HTML Help Project (*.hhp)|*.hhp|"
+msgstr "Εργασία HTML βοήθειας (*.hhp)|*.hhp|"
+
+#: ../src/html/htmlwin.cpp:659
+#, c-format
+msgid "HTML anchor %s does not exist."
+msgstr "Η HTML άγκυρα %s δεν υπάρχει."
+
+#: ../src/html/helpwnd.cpp:1550
+msgid "HTML files (*.html;*.htm)|*.html;*.htm|"
+msgstr "Αρχεία HTML (*.html;*.htm)|*.html;*.htm|"
+
+#: ../src/common/stockitem.cpp:162
+msgid "Harddisk"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:155
+msgid "Hebrew (ISO-8859-8)"
+msgstr "Εβραϊκό (ISO-8859-8)"
+
+#: ../include/wx/msgdlg.h:275 ../src/osx/button_osx.cpp:39
+#: ../src/common/stockitem.cpp:163 ../src/html/helpdlg.cpp:66
+#: ../src/html/helpfrm.cpp:116
+msgid "Help"
+msgstr "Βοήθεια"
+
+#: ../src/html/helpwnd.cpp:1213
+msgid "Help Browser Options"
+msgstr "Επιλογές Περιηγητή Βοηθείας"
+
+#: ../src/generic/helpext.cpp:458 ../src/generic/helpext.cpp:459
+msgid "Help Index"
+msgstr "Ευρετήριο Βοηθείας"
+
+#: ../src/html/helpwnd.cpp:1534
+msgid "Help Printing"
+msgstr "Βοήθεια Εκτύπωσης"
+
+#: ../src/html/helpwnd.cpp:814
+msgid "Help Topics"
+msgstr "Θέματα Βοήθειας"
+
+#: ../src/html/helpwnd.cpp:1551
+msgid "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+msgstr "Βιβλία βοήθειας (*.htb)|*.htb|Αρχεία βοήθειας (*.zip)|*.zip|"
+
+#: ../src/generic/helpext.cpp:271
+#, c-format
+msgid "Help directory \"%s\" not found."
+msgstr ""
+
+#: ../src/generic/helpext.cpp:279
+#, fuzzy, c-format
+msgid "Help file \"%s\" not found."
+msgstr "αρχείο καταλόγου για την περιοχή (domain) '%s' δεν βρέθηκε."
+
+#: ../src/html/helpctrl.cpp:63
+#, c-format
+msgid "Help: %s"
+msgstr "Βοήθεια: %s"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:649
+#, fuzzy, c-format
+msgid "Hide %s"
+msgstr "Βοήθεια: %s"
+
+#: ../src/osx/menu_osx.cpp:604 ../src/osx/menu_osx.cpp:651
+msgid "Hide Others"
+msgstr ""
+
+#: ../src/generic/infobar.cpp:85
+msgid "Hide this notification message."
+msgstr ""
+
+#: ../src/generic/dirdlgg.cpp:98 ../src/common/stockitem.cpp:164
+msgid "Home"
+msgstr "Αρχική σελίδα"
+
+#: ../src/generic/dirctrlg.cpp:624
+msgid "Home directory"
+msgstr "Αρχικός κατάλογος"
+
+#: ../src/richtext/richtextsizepage.cpp:253
+#: ../src/richtext/richtextsizepage.cpp:255
+msgid "How the object will float relative to the text."
+msgstr ""
+
+#: ../src/common/imagbmp.cpp:1118
+msgid "ICO: Error in reading mask DIB."
+msgstr "ICO: Σφάλμα στην ανάγνωση μάσκας DIB."
+
+#: ../src/common/imagbmp.cpp:1233 ../src/common/imagbmp.cpp:1294
+#: ../src/common/imagbmp.cpp:1305 ../src/common/imagbmp.cpp:1318
+#: ../src/common/imagbmp.cpp:1363 ../src/common/imagbmp.cpp:1375
+#: ../src/common/imagbmp.cpp:1386
+msgid "ICO: Error writing the image file!"
+msgstr "ICO: Σφάλμα κατά την εγγραφή του αρχείου εικόνας!"
+
+#: ../src/common/imagbmp.cpp:1198
+msgid "ICO: Image too tall for an icon."
+msgstr "ICO: Εικόνα πολύ ψηλή για εικονίδιο(icon)."
+
+#: ../src/common/imagbmp.cpp:1206
+msgid "ICO: Image too wide for an icon."
+msgstr "ICO: Εικόνα πολύ πλατιά για εικονίδιο(icon)."
+
+#: ../src/common/imagbmp.cpp:1466
+msgid "ICO: Invalid icon index."
+msgstr "ICO: Λανθασμένος δείκτης(index) εικονιδίου(icon)."
+
+#: ../src/common/imagiff.cpp:759
+msgid "IFF: data stream seems to be truncated."
+msgstr "IFF: το stream δεδομένων μοιάζει να είναι αποκομμένο."
+
+#: ../src/common/imagiff.cpp:743
+msgid "IFF: error in IFF image format."
+msgstr "IFF: σφάλμα στη μορφή εικόνας IFF."
+
+#: ../src/common/imagiff.cpp:746
+msgid "IFF: not enough memory."
+msgstr "IFF: ανεπαρκής μνήμη."
+
+#: ../src/common/imagiff.cpp:749
+msgid "IFF: unknown error!!!"
+msgstr "IFF: άγνωστο λάθος!!!"
+
+#: ../src/common/accelcmn.cpp:50
+msgid "INS"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:51
+msgid "INSERT"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:197
+msgid "ISO-2022-JP"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:2420
+msgid "Icon & text renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/html/htmprint.cpp:282
+msgid ""
+"If possible, try changing the layout parameters to make the printout more "
+"narrow."
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:358
+msgid ""
+"If you have any additional information pertaining to this bug\n"
+"report, please enter it here and it will be joined to it:"
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:324
+msgid ""
+"If you wish to suppress this debug report completely, please choose the "
+"\"Cancel\" button,\n"
+"but be warned that it may hinder improving the program, so if\n"
+"at all possible please do continue with the report generation.\n"
+msgstr ""
+
+#: ../src/msw/registry.cpp:1395
+#, c-format
+msgid "Ignoring value \"%s\" of the key \"%s\"."
+msgstr ""
+
+#: ../src/common/xtistrm.cpp:299
+msgid "Illegal Object Class (Non-wxEvtHandler) as Event Source"
+msgstr "Εσφαλμένη κλάση αντικειμένου (μη-wxEvtHandler) σαν πηγή Events"
+
+#: ../src/common/xti.cpp:513
+msgid "Illegal Parameter Count for ConstructObject Method"
+msgstr "Εσφαλμένος αριθμός παραμέτρων για μέθοδο ConstructObject"
+
+#: ../src/common/xti.cpp:501
+msgid "Illegal Parameter Count for Create Method"
+msgstr "Εσφαλμένος αριθμός παραμέτρων για μέθοδο Create"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/filectrlg.cpp:791
+msgid "Illegal directory name."
+msgstr "Μη έγκυρο όνομα καταλόγου."
+
+#: ../src/generic/filectrlg.cpp:1380
+msgid "Illegal file specification."
+msgstr "Μη έγκυρος προσδιορισμός αρχείου."
+
+#: ../src/common/image.cpp:2158
+msgid "Image and mask have different sizes."
+msgstr "Εικόνα και μάσκα έχουν διαφορετικά μεγέθη."
+
+#: ../src/common/image.cpp:2609
+#, fuzzy, c-format
+msgid "Image file is not of type %d."
+msgstr "Αρχείο εικόνας δεν είναι τύπυ %d."
+
+#: ../src/common/image.cpp:2739
+#, fuzzy, c-format
+msgid "Image is not of type %s."
+msgstr "Αρχείο εικόνας δεν είναι τύπυ %d."
+
+#: ../src/msw/textctrl.cpp:399
+msgid ""
+"Impossible to create a rich edit control, using simple text control instead. "
+"Please reinstall riched32.dll"
+msgstr ""
+"Αδύνατη η δημουργία ενός στοιχείου ελέγχου(control) rich edit, αντι αυτού "
+"γίνεται χρήση του simpe text στοιχείου ελέγχου. Παρακαλώ επανεγκαταστήστε το "
+"riched32.dll"
+
+#: ../src/unix/utilsunx.cpp:307
+msgid "Impossible to get child process input"
+msgstr "Αδύνατη η λήψη της εισόδου της διεργασίας (process) απογόνου(child)"
+
+#: ../src/common/filefn.cpp:1074
+#, c-format
+msgid "Impossible to get permissions for file '%s'"
+msgstr "Αδύνατη η λήψη των δικαιωμάτων για το αρχείο '%s'"
+
+#: ../src/common/filefn.cpp:1088
+#, c-format
+msgid "Impossible to overwrite the file '%s'"
+msgstr "Αδύνατη η επικάλυψη του αρχείου '%s'"
+
+#: ../src/common/filefn.cpp:1142
+#, c-format
+msgid "Impossible to set permissions for the file '%s'"
+msgstr "Αδύνατος ο ορισμός των δικαιωμάτων για το αρχείο '%s'"
+
+#: ../src/common/gifdecod.cpp:818
+#, c-format
+msgid "Incorrect GIF frame size (%u, %d) for the frame #%u"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:624
+msgid "Incorrect number of arguments."
+msgstr ""
+
+#: ../src/common/stockitem.cpp:165
+msgid "Indent"
+msgstr "Στοίχιση"
+
+#: ../src/richtext/richtextformatdlg.cpp:330
+msgid "Indents && Spacing"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:166 ../src/html/helpwnd.cpp:525
+msgid "Index"
+msgstr "Ευρετήριο"
+
+#: ../src/common/fmapbase.cpp:159
+msgid "Indian (ISO-8859-12)"
+msgstr "Ινδικό (ISO-8859-12)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "Info"
+msgstr ""
+
+#: ../src/common/init.cpp:276
+msgid "Initialization failed in post init, aborting."
+msgstr ""
+
+#: ../src/richtext/richtextsymboldlg.cpp:472
+#, fuzzy
+msgid "Insert"
+msgstr "Στοίχιση"
+
+#: ../src/richtext/richtextbuffer.cpp:7687
+#, fuzzy
+msgid "Insert Field"
+msgstr "Στοίχιση"
+
+#: ../src/richtext/richtextbuffer.cpp:7598
+#: ../src/richtext/richtextbuffer.cpp:8551
+msgid "Insert Image"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:7645
+#, fuzzy
+msgid "Insert Object"
+msgstr "Στοίχιση"
+
+#: ../src/richtext/richtextctrl.cpp:1172 ../src/richtext/richtextctrl.cpp:1362
+#: ../src/richtext/richtextbuffer.cpp:7440
+#: ../src/richtext/richtextbuffer.cpp:7470
+#: ../src/richtext/richtextbuffer.cpp:7514
+msgid "Insert Text"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:295
+#: ../src/richtext/richtextindentspage.cpp:297
+msgid "Inserts a page break before the paragraph."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:549
+#, fuzzy
+msgid "Inset"
+msgstr "Στοίχιση"
+
+#: ../src/gtk/app.cpp:429
+#, c-format
+msgid "Invalid GTK+ command line option, use \"%s --help\""
+msgstr ""
+
+#: ../src/common/imagtiff.cpp:314
+msgid "Invalid TIFF image index."
+msgstr "Λανθασμένος δείκτης εικόνας TIFF."
+
+#: ../src/osx/carbon/dataview.cpp:1782 ../src/osx/carbon/dataview.cpp:1877
+msgid "Invalid data view item"
+msgstr ""
+
+#: ../src/common/appcmn.cpp:266
+#, c-format
+msgid "Invalid display mode specification '%s'."
+msgstr ""
+"Λανθασμένος καθορισμός(specification) κατάστασης λειτουργίας(mode) οθόνης"
+"(display) '%s'."
+
+#: ../src/x11/app.cpp:121
+#, c-format
+msgid "Invalid geometry specification '%s'"
+msgstr "Λανθασμένος γεωμετρικός καθορισμός(specification) '%s'"
+
+#: ../src/unix/fswatcher_inotify.cpp:298
+#, c-format
+msgid "Invalid inotify event for \"%s\""
+msgstr ""
+
+#: ../src/unix/snglinst.cpp:306
+#, c-format
+msgid "Invalid lock file '%s'."
+msgstr "Λανθασμένο αρχείο κλειδαριά (lock file) '%s'."
+
+#: ../src/common/translation.cpp:1111
+#, fuzzy
+msgid "Invalid message catalog."
+msgstr "'%s' δεν είναι ένας σωστός κατάλογος μηνυμάτων."
+
+#: ../src/common/xtistrm.cpp:409 ../src/common/xtistrm.cpp:424
+msgid "Invalid or Null Object ID passed to GetObjectClassInfo"
+msgstr "Μη έγκυρο ή Null ID αντικειμένου δόθηκε στην GetObjectClassInfo"
+
+#: ../src/common/xtistrm.cpp:439
+msgid "Invalid or Null Object ID passed to HasObjectClassInfo"
+msgstr "Μη έγκυρο ή Null ID αντικειμένου δόθηκε στην HasObjectClassInfo"
+
+#: ../src/common/regex.cpp:313
+#, c-format
+msgid "Invalid regular expression '%s': %s"
+msgstr "Λανθασμένη κανονική έκφραση (regular expression) '%s': %s"
+
+#: ../src/common/config.cpp:226
+#, c-format
+msgid "Invalid value %ld for a boolean key \"%s\" in config file."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:329 ../src/richtext/richtextfontpage.cpp:333
+#: ../src/osx/carbon/fontdlg.cpp:547 ../src/common/stockitem.cpp:168
+msgid "Italic"
+msgstr "Πλάγια"
+
+#: ../src/common/paper.cpp:131
+msgid "Italy Envelope, 110 x 230 mm"
+msgstr "Italy Envelope, 110 x 230 mm"
+
+#: ../src/common/imagjpeg.cpp:255
+msgid "JPEG: Couldn't load - file is probably corrupted."
+msgstr "JPEG: Αδύνατη η φόρτωση - το αρχείο είναι μάλλον φθαρμένο(corrupted)."
+
+#: ../src/common/imagjpeg.cpp:434
+msgid "JPEG: Couldn't save image."
+msgstr "JPEG: Αδύνατη η αποθήκευση της εικόνας."
+
+#: ../src/common/paper.cpp:164
+msgid "Japanese Double Postcard 200 x 148 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:168
+msgid "Japanese Envelope Chou #3"
+msgstr ""
+
+#: ../src/common/paper.cpp:181
+msgid "Japanese Envelope Chou #3 Rotated"
+msgstr ""
+
+#: ../src/common/paper.cpp:169
+msgid "Japanese Envelope Chou #4"
+msgstr ""
+
+#: ../src/common/paper.cpp:182
+msgid "Japanese Envelope Chou #4 Rotated"
+msgstr ""
+
+#: ../src/common/paper.cpp:166
+msgid "Japanese Envelope Kaku #2"
+msgstr ""
+
+#: ../src/common/paper.cpp:179
+msgid "Japanese Envelope Kaku #2 Rotated"
+msgstr ""
+
+#: ../src/common/paper.cpp:167
+msgid "Japanese Envelope Kaku #3"
+msgstr ""
+
+#: ../src/common/paper.cpp:180
+msgid "Japanese Envelope Kaku #3 Rotated"
+msgstr ""
+
+#: ../src/common/paper.cpp:186
+msgid "Japanese Envelope You #4"
+msgstr ""
+
+#: ../src/common/paper.cpp:187
+msgid "Japanese Envelope You #4 Rotated"
+msgstr ""
+
+#: ../src/common/paper.cpp:139
+msgid "Japanese Postcard 100 x 148 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:176
+msgid "Japanese Postcard Rotated 148 x 100 mm"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:169
+msgid "Jump to"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:171
+msgid "Justified"
+msgstr "Ευθυγραμμισμένα"
+
+#: ../src/richtext/richtextindentspage.cpp:155
+#: ../src/richtext/richtextindentspage.cpp:157
+#: ../src/richtext/richtextliststylepage.cpp:344
+#: ../src/richtext/richtextliststylepage.cpp:346
+msgid "Justify text left and right."
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:163
+msgid "KOI8-R"
+msgstr "KOI8-R"
+
+#: ../src/common/fmapbase.cpp:164
+msgid "KOI8-U"
+msgstr "KOI8-U"
+
+#: ../src/common/accelcmn.cpp:254 ../src/common/accelcmn.cpp:336
+msgid "KP_"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:103
+msgid "KP_ADD"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:98
+msgid "KP_BEGIN"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:106
+msgid "KP_DECIMAL"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:100
+msgid "KP_DELETE"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:107
+msgid "KP_DIVIDE"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:92
+msgid "KP_DOWN"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:97
+msgid "KP_END"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:87
+msgid "KP_ENTER"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:101
+msgid "KP_EQUAL"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:88
+msgid "KP_HOME"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:99
+msgid "KP_INSERT"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:89
+msgid "KP_LEFT"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:102
+msgid "KP_MULTIPLY"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:95
+msgid "KP_NEXT"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:96
+msgid "KP_PAGEDOWN"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:94
+msgid "KP_PAGEUP"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:93
+msgid "KP_PRIOR"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:91
+msgid "KP_RIGHT"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:104
+msgid "KP_SEPARATOR"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:85
+msgid "KP_SPACE"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:105
+msgid "KP_SUBTRACT"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:86
+msgid "KP_TAB"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:90
+msgid "KP_UP"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:270
+msgid "L&ine spacing:"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:56
+msgid "LEFT"
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:613 ../src/generic/prntdlgg.cpp:868
+msgid "Landscape"
+msgstr "Τοπίο"
+
+#: ../src/common/stockitem.cpp:174
+#, fuzzy
+msgid "Last"
+msgstr "&Επικόληση"
+
+#: ../src/common/prntbase.cpp:1542
+#, fuzzy
+msgid "Last page"
+msgstr "Επόμενη σελίδα"
+
+#: ../src/common/log.cpp:309
+#, c-format
+msgid "Last repeated message (\"%s\", %lu time) wasn't output"
+msgid_plural "Last repeated message (\"%s\", %lu times) wasn't output"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../src/common/paper.cpp:104
+msgid "Ledger, 17 x 11 in"
+msgstr "Ledger, 17 x 11 ίντσες"
+
+#: ../src/richtext/richtextliststylepage.cpp:249
+#: ../src/richtext/richtextliststylepage.cpp:252
+#: ../src/richtext/richtextliststylepage.cpp:253
+#: ../src/richtext/richtextbulletspage.cpp:199
+#: ../src/richtext/richtextbulletspage.cpp:202
+#: ../src/richtext/richtextbulletspage.cpp:203
+#: ../src/richtext/richtextsizepage.cpp:249
+msgid "Left"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:204
+#: ../src/richtext/richtextliststylepage.cpp:390
+msgid "Left (&first line):"
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:880
+msgid "Left margin (mm):"
+msgstr "Αριστερό περιθώριο (mm)"
+
+#: ../src/richtext/richtextindentspage.cpp:141
+#: ../src/richtext/richtextindentspage.cpp:143
+#: ../src/richtext/richtextliststylepage.cpp:330
+#: ../src/richtext/richtextliststylepage.cpp:332
+msgid "Left-align text."
+msgstr ""
+
+#: ../src/common/paper.cpp:145
+#, fuzzy
+msgid "Legal Extra 9 1/2 x 15 in"
+msgstr "Νομικό, 8 1/2 x 14 ίντσες"
+
+#: ../src/common/paper.cpp:97
+msgid "Legal, 8 1/2 x 14 in"
+msgstr "Νομικό, 8 1/2 x 14 ίντσες"
+
+#: ../src/common/paper.cpp:144
+#, fuzzy
+msgid "Letter Extra 9 1/2 x 12 in"
+msgstr "Γράμμα, 8 1/2 x 11 ίντσες"
+
+#: ../src/common/paper.cpp:150
+msgid "Letter Extra Transverse 9.275 x 12 in"
+msgstr ""
+
+#: ../src/common/paper.cpp:153
+#, fuzzy
+msgid "Letter Plus 8 1/2 x 12.69 in"
+msgstr "Γράμμα, 8 1/2 x 11 ίντσες"
+
+#: ../src/common/paper.cpp:170
+#, fuzzy
+msgid "Letter Rotated 11 x 8 1/2 in"
+msgstr "Γράμμα, 8 1/2 x 11 ίντσες"
+
+#: ../src/common/paper.cpp:102
+msgid "Letter Small, 8 1/2 x 11 in"
+msgstr "Γράμμα Μικρό, 8 1/2 x 11 ίντσες"
+
+#: ../src/common/paper.cpp:148
+#, fuzzy
+msgid "Letter Transverse 8 1/2 x 11 in"
+msgstr "Γράμμα, 8 1/2 x 11 ίντσες"
+
+#: ../src/common/paper.cpp:96
+msgid "Letter, 8 1/2 x 11 in"
+msgstr "Γράμμα, 8 1/2 x 11 ίντσες"
+
+#: ../src/generic/aboutdlgg.cpp:173
+msgid "License"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:332
+msgid "Light"
+msgstr "Απαλό(light)"
+
+#: ../src/generic/helpext.cpp:298
+#, c-format
+msgid "Line %lu of map file \"%s\" has invalid syntax, skipped."
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:444
+msgid "Line spacing:"
+msgstr ""
+
+#: ../src/html/chm.cpp:838
+msgid "Link contained '//', converted to absolute link."
+msgstr "Η σύνδεση που περιείχε '//', μετατράπηκε σε απόλυτη σύνδεση."
+
+#: ../src/richtext/richtextformatdlg.cpp:349
+msgid "List Style"
+msgstr ""
+
+#: ../src/richtext/richtextstyles.cpp:1060
+msgid "List styles"
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:206
+#: ../src/richtext/richtextfontpage.cpp:208
+msgid "Lists font sizes in points."
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:199
+#: ../src/richtext/richtextfontpage.cpp:201
+#, fuzzy
+msgid "Lists the available fonts."
+msgstr "Το Tip δεν είναι διαθέσιμο, συγγνώμη!"
+
+#: ../src/common/fldlgcmn.cpp:325
+#, c-format
+msgid "Load %s file"
+msgstr "Φόρτωση %s αρχείου"
+
+#: ../src/html/htmlwin.cpp:575
+msgid "Loading : "
+msgstr "Γίνεται φόρτωση : "
+
+#: ../src/unix/snglinst.cpp:246
+#, c-format
+msgid "Lock file '%s' has incorrect owner."
+msgstr "Το αρχείο 'κλειδωνιά' '%s' έχει λανθασμένο ιδιοκτήτη."
+
+#: ../src/unix/snglinst.cpp:251
+#, c-format
+msgid "Lock file '%s' has incorrect permissions."
+msgstr "Το αρχείο 'κλειδωνιά' '%s' έχει λανθασμένα δικαιώματα."
+
+#: ../src/generic/logg.cpp:582
+#, c-format
+msgid "Log saved to the file '%s'."
+msgstr "Η καταγραφή (log) αποθηκεύτηκε στο αρχείο '%s'"
+
+#: ../src/richtext/richtextliststylepage.cpp:484
+#: ../src/richtext/richtextbulletspage.cpp:289
+msgid "Lower case letters"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:486
+#: ../src/richtext/richtextbulletspage.cpp:291
+msgid "Lower case roman numerals"
+msgstr ""
+
+#: ../src/gtk/mdi.cpp:422 ../src/gtk1/mdi.cpp:431
+msgid "MDI child"
+msgstr "MDI παιδί"
+
+#: ../src/common/accelcmn.cpp:68
+msgid "MENU"
+msgstr ""
+
+#: ../src/msw/helpchm.cpp:56
+msgid ""
+"MS HTML Help functions are unavailable because the MS HTML Help library is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Οι συναρτήσεις (functions) της MS HTML Help δεν είναι διαθέσιμες γιατί η "
+"βιβλιοθήκη MS HTML Help δεν είναι εγκατεστημένη. Παρακαλώ εγκαταστήστε την."
+
+#: ../src/univ/themes/win32.cpp:3754
+msgid "Ma&ximize"
+msgstr "Με&γιστοποίηση"
+
+#: ../src/common/fmapbase.cpp:203
+msgid "MacArabic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:222
+msgid "MacArmenian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:211
+msgid "MacBengali"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:217
+msgid "MacBurmese"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:236
+msgid "MacCeltic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:227
+msgid "MacCentralEurRoman"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:223
+msgid "MacChineseSimp"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:201
+msgid "MacChineseTrad"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:233
+msgid "MacCroatian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:206
+msgid "MacCyrillic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:207
+msgid "MacDevanagari"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:231
+msgid "MacDingbats"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:226
+msgid "MacEthiopic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:229
+msgid "MacExtArabic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:237
+msgid "MacGaelic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:221
+msgid "MacGeorgian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:205
+msgid "MacGreek"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:209
+msgid "MacGujarati"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:208
+msgid "MacGurmukhi"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:204
+msgid "MacHebrew"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:234
+msgid "MacIcelandic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:200
+msgid "MacJapanese"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:214
+msgid "MacKannada"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:238
+msgid "MacKeyboardGlyphs"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:218
+msgid "MacKhmer"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:202
+msgid "MacKorean"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:220
+msgid "MacLaotian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:215
+msgid "MacMalayalam"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:225
+msgid "MacMongolian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:210
+msgid "MacOriya"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:199
+#, fuzzy
+msgid "MacRoman"
+msgstr "Ρωμαϊκό"
+
+#: ../src/common/fmapbase.cpp:235
+#, fuzzy
+msgid "MacRomanian"
+msgstr "Ρωμαϊκό"
+
+#: ../src/common/fmapbase.cpp:216
+#, fuzzy
+msgid "MacSinhalese"
+msgstr "Ταίριασμα πεζών/κεφαλαίων"
+
+#: ../src/common/fmapbase.cpp:230
+#, fuzzy
+msgid "MacSymbol"
+msgstr "&Στυλ:"
+
+#: ../src/common/fmapbase.cpp:212
+msgid "MacTamil"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:213
+msgid "MacTelugu"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:219
+msgid "MacThai"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:224
+msgid "MacTibetan"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:232
+msgid "MacTurkish"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:228
+msgid "MacVietnamese"
+msgstr ""
+
+#: ../src/propgrid/advprops.cpp:2031
+#, fuzzy
+msgid "Make a selection:"
+msgstr "Τμήματα"
+
+#: ../src/richtext/richtextformatdlg.cpp:362
+#: ../src/richtext/richtextmarginspage.cpp:172
+msgid "Margins"
+msgstr ""
+
+#: ../src/generic/fdrepdlg.cpp:147
+msgid "Match case"
+msgstr "Ταίριασμα πεζών/κεφαλαίων"
+
+#: ../src/richtext/richtextsizepage.cpp:463
+#, fuzzy
+msgid "Max height:"
+msgstr "&Βάρος:"
+
+#: ../src/richtext/richtextsizepage.cpp:436
+#, fuzzy
+msgid "Max width:"
+msgstr "Αντικατάσταση με:"
+
+#: ../src/unix/mediactrl.cpp:1006
+#, c-format
+msgid "Media playback error: %s"
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:175
+#, c-format
+msgid "Memory VFS already contains file '%s'!"
+msgstr "VFS μνήμης ήδη περιέχει το αρχείο '%s'!"
+
+#: ../src/msw/frame.cpp:347
+msgid "Menu"
+msgstr "Μενού"
+
+#: ../src/common/msgout.cpp:124
+#, fuzzy
+msgid "Message"
+msgstr "%s μήνυμα"
+
+#: ../src/univ/themes/metal.cpp:168
+msgid "Metal theme"
+msgstr "Μεταλλικό θέμα"
+
+#: ../src/msw/ole/automtn.cpp:641
+msgid "Method or property not found."
+msgstr ""
+
+#: ../src/univ/themes/win32.cpp:3752
+msgid "Mi&nimize"
+msgstr "Ελα&χιστοποίηση"
+
+#: ../src/richtext/richtextsizepage.cpp:409
+#, fuzzy
+msgid "Min height:"
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextsizepage.cpp:382
+msgid "Min width:"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:657
+msgid "Missing a required parameter."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:324
+msgid "Modern"
+msgstr "Μοντέρνο"
+
+#: ../src/generic/filectrlg.cpp:462
+msgid "Modified"
+msgstr "Τροποποιημένο"
+
+#: ../src/common/module.cpp:133
+#, c-format
+msgid "Module \"%s\" initialization failed"
+msgstr ""
+
+#: ../src/common/paper.cpp:132
+msgid "Monarch Envelope, 3 7/8 x 7 1/2 in"
+msgstr "Φακελος Monarch, 3 7/8 x 7 1/2 ίντσες"
+
+#: ../src/msw/fswatcher.cpp:143
+msgid "Monitoring individual files for changes is not supported currently."
+msgstr ""
+
+#: ../src/generic/editlbox.cpp:276
+msgid "Move down"
+msgstr "Μετακίνηση κάτω"
+
+#: ../src/generic/editlbox.cpp:275
+msgid "Move up"
+msgstr "Μετακίνηση επάνω"
+
+#: ../src/richtext/richtextsizepage.cpp:682
+#: ../src/richtext/richtextsizepage.cpp:684
+msgid "Moves the object to the next paragraph."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:676
+#: ../src/richtext/richtextsizepage.cpp:678
+msgid "Moves the object to the previous paragraph."
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:9345
+msgid "Multiple Cell Properties"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:81
+msgid "NUM_LOCK"
+msgstr ""
+
+#: ../src/generic/filectrlg.cpp:459
+msgid "Name"
+msgstr "Όνομα"
+
+#: ../src/common/stockitem.cpp:175
+msgid "Network"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:176
+#, fuzzy
+msgid "New"
+msgstr "&Νέο"
+
+#: ../src/richtext/richtextstyledlg.cpp:243
+#, fuzzy
+msgid "New &Box Style..."
+msgstr "Νέο στοιχείο"
+
+#: ../src/richtext/richtextstyledlg.cpp:225
+msgid "New &Character Style..."
+msgstr ""
+
+#: ../src/richtext/richtextstyledlg.cpp:237
+msgid "New &List Style..."
+msgstr ""
+
+#: ../src/richtext/richtextstyledlg.cpp:231
+msgid "New &Paragraph Style..."
+msgstr ""
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:651
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:817
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:890
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:931
+#: ../src/richtext/richtextstyledlg.cpp:936
+#, fuzzy
+msgid "New Style"
+msgstr "Νέο στοιχείο"
+
+#: ../src/generic/dirdlgg.cpp:102
+msgid "New directory"
+msgstr "Νέος κατάλογος"
+
+#: ../src/generic/editlbox.cpp:273
+msgid "New item"
+msgstr "Νέο στοιχείο"
+
+#: ../src/generic/dirdlgg.cpp:326 ../src/generic/dirdlgg.cpp:336
+#: ../src/generic/filectrlg.cpp:653 ../src/generic/filectrlg.cpp:662
+msgid "NewName"
+msgstr "ΝέοΌνομα"
+
+#: ../src/generic/tipdlg.cpp:305
+msgid "Next"
+msgstr "Επόμενο"
+
+#: ../src/common/prntbase.cpp:1537 ../src/html/helpwnd.cpp:678
+msgid "Next page"
+msgstr "Επόμενη σελίδα"
+
+#: ../include/wx/msgdlg.h:272 ../src/common/stockitem.cpp:177
+#: ../src/motif/msgdlg.cpp:196
+msgid "No"
+msgstr "Όχι"
+
+#: ../src/generic/animateg.cpp:150
+#, fuzzy, c-format
+msgid "No animation handler for type %ld defined."
+msgstr "Δεν έχει οριστεί χειριστής εικόνας για τον τύπο %d."
+
+#: ../src/dfb/bitmap.cpp:642 ../src/dfb/bitmap.cpp:676
+#, fuzzy, c-format
+msgid "No bitmap handler for type %d defined."
+msgstr "Δεν έχει οριστεί χειριστής εικόνας για τον τύπο %d."
+
+#: ../src/osx/carbon/dataview.cpp:1784
+msgid "No column existing."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1674
+msgid "No column for the specified column existing."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1423
+msgid "No column for the specified column position existing."
+msgstr ""
+
+#: ../src/common/utilscmn.cpp:1049
+msgid "No default application configured for HTML files."
+msgstr ""
+
+#: ../src/generic/helpext.cpp:449
+msgid "No entries found."
+msgstr "Δεν βρέθηκαν εισαγωγές(entries)."
+
+#: ../src/common/fontmap.cpp:421
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found,\n"
+"but an alternative encoding '%s' is available.\n"
+"Do you want to use this encoding (otherwise you will have to choose another "
+"one)?"
+msgstr ""
+"Δεν βρέθηκε γραμματοσειρά (font) για την εμφάνιση κειμένου στην κωδικοποίηση "
+"(encoding) '%s',\n"
+"αλλά μία εναλλακτική κωδικοποίηση '%s' είναι διαθέισμη.\n"
+"Θέλετε να χρησιμοποιήσετε αυτή την κωδικοποίηση (διαφορετικά θα πρέπει να "
+"επιλέξετε μία άλλη) ;"
+
+#: ../src/common/fontmap.cpp:426
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found.\n"
+"Would you like to select a font to be used for this encoding\n"
+"(otherwise the text in this encoding will not be shown correctly)?"
+msgstr ""
+"Δεν βρέθηκε γραμματοσειρά (font) για την εμφάνιση κειμένου για αυτήν την "
+"κωδικοποίηση (encoding) '%s'.\n"
+"Θα θέλατε να επιλέξετε μία γραμματοσειρα για να χρησιμοποιηθεί για αυτή την "
+"κωδικοποίηση(διαφορετικά το κείμενο σε αυτή την κωδικοποίηση δεν θα "
+"εμφανιστεί κανονικά) ;"
+
+#: ../src/generic/animateg.cpp:142
+#, fuzzy
+msgid "No handler found for animation type."
+msgstr "Δεν βρέθηκε χειριστής για τύπο εικόνας."
+
+#: ../src/common/image.cpp:2591
+msgid "No handler found for image type."
+msgstr "Δεν βρέθηκε χειριστής για τύπο εικόνας."
+
+#: ../src/common/image.cpp:2599 ../src/common/image.cpp:2710
+#: ../src/common/image.cpp:2763
+#, c-format
+msgid "No image handler for type %d defined."
+msgstr "Δεν έχει οριστεί χειριστής εικόνας για τον τύπο %d."
+
+#: ../src/common/image.cpp:2733 ../src/common/image.cpp:2777
+#, c-format
+msgid "No image handler for type %s defined."
+msgstr "Δεν έχει οριστεί χειριστής εικόνας για τον τύπο %s."
+
+#: ../src/html/helpwnd.cpp:871
+msgid "No matching page found yet"
+msgstr "Δεν βρέθηκε ακόμα σελίδα που να ταιράζει"
+
+#: ../src/osx/carbon/dataview.cpp:1676 ../src/osx/carbon/dataview.cpp:1786
+msgid "No renderer or invalid renderer type specified for custom data column."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1424
+msgid "No renderer specified for column."
+msgstr ""
+
+#: ../src/unix/sound.cpp:81
+msgid "No sound"
+msgstr "Χωρίς ήχο"
+
+#: ../src/common/image.cpp:2166 ../src/common/image.cpp:2207
+msgid "No unused colour in image being masked."
+msgstr ""
+"Δεν υπάρχει μη χρησιμοποιούμενο χρώμα στην εικόνα που εφααρμόζεται η μάσκα"
+
+#: ../src/common/image.cpp:3236
+msgid "No unused colour in image."
+msgstr "Δεν υπάρχει μη χρησιμοποιούμενο χρώμα στην εικόνα"
+
+#: ../src/generic/helpext.cpp:306
+#, c-format
+msgid "No valid mappings found in the file \"%s\"."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:542
+#: ../src/richtext/richtextsizepage.cpp:248
+#: ../src/richtext/richtextsizepage.cpp:252
+#, fuzzy
+msgid "None"
+msgstr "Έτοιμο"
+
+#: ../src/common/fmapbase.cpp:157
+msgid "Nordic (ISO-8859-10)"
+msgstr "Νορδικό (ISO-8859-10)"
+
+#: ../src/generic/fontdlgg.cpp:328 ../src/generic/fontdlgg.cpp:331
+msgid "Normal"
+msgstr "Κανονικό"
+
+#: ../src/html/helpwnd.cpp:1276
+msgid "Normal face<br>and <u>underlined</u>. "
+msgstr "Κανονική όψη<br>και <u>υπογραμμισμένη</u>."
+
+#: ../src/html/helpwnd.cpp:1218
+msgid "Normal font:"
+msgstr "Κανονική γραμματοσειρά:"
+
+#: ../src/propgrid/props.cpp:887
+#, fuzzy, c-format
+msgid "Not %s"
+msgstr "&Περί..."
+
+#: ../include/wx/filename.h:586 ../include/wx/filename.h:591
+#, fuzzy
+msgid "Not available"
+msgstr "Δεν υπάρχει μονάδα(facility) XBM διαθέσιμη!"
+
+#: ../src/richtext/richtextfontpage.cpp:340
+#, fuzzy
+msgid "Not underlined"
+msgstr "υπογεγραμμένο"
+
+#: ../src/common/paper.cpp:116
+msgid "Note, 8 1/2 x 11 in"
+msgstr "Σημείωμα, 8 1/2 x 11 ίντσες"
+
+#: ../src/generic/notifmsgg.cpp:104
+#, fuzzy
+msgid "Notice"
+msgstr "&Όχι"
+
+#: ../src/osx/carbon/dataview.cpp:902
+#, fuzzy
+msgid "Number of columns could not be determined."
+msgstr "Το αρχείο δεν μπόρεσε να φορτωθεί."
+
+#: ../src/richtext/richtextliststylepage.cpp:487
+#: ../src/richtext/richtextbulletspage.cpp:292
+msgid "Numbered outline"
+msgstr ""
+
+#: ../include/wx/msgdlg.h:273 ../src/richtext/richtextstyledlg.cpp:297
+#: ../src/common/stockitem.cpp:178 ../src/msw/msgdlg.cpp:489
+#: ../src/msw/msgdlg.cpp:799 ../src/msw/dialog.cpp:120
+#: ../src/gtk1/fontdlg.cpp:138
+msgid "OK"
+msgstr "OK"
+
+#: ../src/msw/ole/automtn.cpp:681
+#, c-format
+msgid "OLE Automation error in %s: %s"
+msgstr ""
+
+#: ../include/wx/richtext/richtextimagedlg.h:39
+#, fuzzy
+msgid "Object Properties"
+msgstr "&Ιδιότητες"
+
+#: ../src/msw/ole/automtn.cpp:649
+msgid "Object implementation does not support named arguments."
+msgstr ""
+
+#: ../src/common/xtixml.cpp:264
+msgid "Objects must have an id attribute"
+msgstr "Τα αντικείμενα πρέπει να έχουν ένα χαρακτηριστικό id"
+
+#: ../src/common/docview.cpp:1755 ../src/common/docview.cpp:1797
+msgid "Open File"
+msgstr "Ανοιγμα Αρχείου"
+
+#: ../src/html/helpwnd.cpp:684 ../src/html/helpwnd.cpp:1557
+msgid "Open HTML document"
+msgstr "’νοιγμα εγγράφου HTML"
+
+#: ../src/generic/dbgrptg.cpp:163
+#, fuzzy, c-format
+msgid "Open file \"%s\""
+msgstr "Ανοιγμα Αρχείου"
+
+#: ../src/common/stockitem.cpp:179
+#, fuzzy
+msgid "Open..."
+msgstr "&Ανοιγμα..."
+
+#: ../src/osx/carbon/glcanvas.cpp:48
+#, c-format
+msgid "OpenGL function \"%s\" failed: %s (error %d)"
+msgstr ""
+
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:821
+msgid "Operation not permitted."
+msgstr "Λειτουργία δεν ειπιτρέπετε."
+
+#: ../src/common/cmdline.cpp:735
+#, fuzzy, c-format
+msgid "Option '%s' can't be negated"
+msgstr "Δεν ήταν δυνατή η δημιουργία του καταλόγου '%s'"
+
+#: ../src/common/cmdline.cpp:899
+#, c-format
+msgid "Option '%s' requires a value."
+msgstr "Η επιλογή '%s' απαιτεί μια τιμή."
+
+#: ../src/common/cmdline.cpp:982
+#, c-format
+msgid "Option '%s': '%s' cannot be converted to a date."
+msgstr "Επιλογή '%s': το '%s' δεν μπροει να μετατραπει σε ημερομηνία."
+
+#: ../src/generic/dirdlgg.cpp:187 ../src/generic/prntdlgg.cpp:618
+msgid "Options"
+msgstr "Επιλογές"
+
+#: ../src/generic/prntdlgg.cpp:615 ../src/generic/prntdlgg.cpp:869
+msgid "Orientation"
+msgstr "Προσανατολισμός"
+
+#: ../src/common/windowid.cpp:259
+msgid "Out of window IDs.  Recommend shutting down application."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:400
+#: ../src/richtext/richtextborderspage.cpp:533
+msgid "Outline"
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:550
+msgid "Outset"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:645
+msgid "Overflow while coercing argument values."
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:84
+msgid "PAGEDOWN"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:83
+msgid "PAGEUP"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:69
+msgid "PAUSE"
+msgstr ""
+
+#: ../src/common/imagpcx.cpp:457 ../src/common/imagpcx.cpp:480
+msgid "PCX: couldn't allocate memory"
+msgstr "PCX: Δεν ήταν δυνατή η δέσμευση μνήμης"
+
+#: ../src/common/imagpcx.cpp:456
+msgid "PCX: image format unsupported"
+msgstr "PCX: μορφή εικόνας δεν υποστηρίζεται"
+
+#: ../src/common/imagpcx.cpp:479
+msgid "PCX: invalid image"
+msgstr "PCX: λανθασμένη εικόνα"
+
+#: ../src/common/imagpcx.cpp:442
+msgid "PCX: this is not a PCX file."
+msgstr "PCX: αυτό δεν είναι αρχείο PCX."
+
+#: ../src/common/imagpcx.cpp:459 ../src/common/imagpcx.cpp:481
+msgid "PCX: unknown error !!!"
+msgstr "PCX: άγνωστο σφάλμα !!!"
+
+#: ../src/common/imagpcx.cpp:458
+msgid "PCX: version number too low"
+msgstr "PCX: αριθμός έκδοσης πολύ χαμηλός"
+
+#: ../src/common/accelcmn.cpp:55
+msgid "PGDN"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:54
+msgid "PGUP"
+msgstr ""
+
+#: ../src/common/imagpnm.cpp:91
+msgid "PNM: Couldn't allocate memory."
+msgstr "PNM: Δεν ήταν δυνατή η δέσμευση μνήμης."
+
+#: ../src/common/imagpnm.cpp:73
+msgid "PNM: File format is not recognized."
+msgstr "PNM: Η μορφή αρχείου δεν αναγνωρίζεται."
+
+#: ../src/common/imagpnm.cpp:112 ../src/common/imagpnm.cpp:134
+#: ../src/common/imagpnm.cpp:156
+msgid "PNM: File seems truncated."
+msgstr "PNM: Το αρχείο μοιάζει να είναι αποκομμένο."
+
+#: ../src/common/paper.cpp:188
+msgid "PRC 16K 146 x 215 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:201
+msgid "PRC 16K Rotated"
+msgstr ""
+
+#: ../src/common/paper.cpp:189
+msgid "PRC 32K 97 x 151 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:202
+msgid "PRC 32K Rotated"
+msgstr ""
+
+#: ../src/common/paper.cpp:190
+msgid "PRC 32K(Big) 97 x 151 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:203
+msgid "PRC 32K(Big) Rotated"
+msgstr ""
+
+#: ../src/common/paper.cpp:191
+#, fuzzy
+msgid "PRC Envelope #1 102 x 165 mm"
+msgstr "C6 Φάκελος, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:204
+#, fuzzy
+msgid "PRC Envelope #1 Rotated 165 x 102 mm"
+msgstr "C6 Φάκελος, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:200
+#, fuzzy
+msgid "PRC Envelope #10 324 x 458 mm"
+msgstr "C3 Φάκελος, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:213
+#, fuzzy
+msgid "PRC Envelope #10 Rotated 458 x 324 mm"
+msgstr "C4 Φάκελος, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:192
+#, fuzzy
+msgid "PRC Envelope #2 102 x 176 mm"
+msgstr "C6 Φάκελος, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:205
+#, fuzzy
+msgid "PRC Envelope #2 Rotated 176 x 102 mm"
+msgstr "B6 Φάκελος, 176 x 125 mm"
+
+#: ../src/common/paper.cpp:193
+#, fuzzy
+msgid "PRC Envelope #3 125 x 176 mm"
+msgstr "C6 Φάκελος, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:206
+#, fuzzy
+msgid "PRC Envelope #3 Rotated 176 x 125 mm"
+msgstr "B6 Φάκελος, 176 x 125 mm"
+
+#: ../src/common/paper.cpp:194
+#, fuzzy
+msgid "PRC Envelope #4 110 x 208 mm"
+msgstr "Φάκελος DL, 110 x 220 mm"
+
+#: ../src/common/paper.cpp:207
+#, fuzzy
+msgid "PRC Envelope #4 Rotated 208 x 110 mm"
+msgstr "C6 Φάκελος, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:195
+#, fuzzy
+msgid "PRC Envelope #5 110 x 220 mm"
+msgstr "Φάκελος DL, 110 x 220 mm"
+
+#: ../src/common/paper.cpp:208
+#, fuzzy
+msgid "PRC Envelope #5 Rotated 220 x 110 mm"
+msgstr "C4 Φάκελος, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:196
+#, fuzzy
+msgid "PRC Envelope #6 120 x 230 mm"
+msgstr "C5 Φάκελος, 162 x 229 mm"
+
+#: ../src/common/paper.cpp:209
+#, fuzzy
+msgid "PRC Envelope #6 Rotated 230 x 120 mm"
+msgstr "C5 Φάκελος, 162 x 229 mm"
+
+#: ../src/common/paper.cpp:197
+#, fuzzy
+msgid "PRC Envelope #7 160 x 230 mm"
+msgstr "B5 Φάκελος, 176 x 250 mm"
+
+#: ../src/common/paper.cpp:210
+#, fuzzy
+msgid "PRC Envelope #7 Rotated 230 x 160 mm"
+msgstr "C6 Φάκελος, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:198
+#, fuzzy
+msgid "PRC Envelope #8 120 x 309 mm"
+msgstr "C5 Φάκελος, 162 x 229 mm"
+
+#: ../src/common/paper.cpp:211
+#, fuzzy
+msgid "PRC Envelope #8 Rotated 309 x 120 mm"
+msgstr "C4 Φάκελος, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:199
+#, fuzzy
+msgid "PRC Envelope #9 229 x 324 mm"
+msgstr "C4 Φάκελος, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:212
+#, fuzzy
+msgid "PRC Envelope #9 Rotated 324 x 229 mm"
+msgstr "C5 Φάκελος, 162 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:72
+msgid "PRINT"
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:286
+#, fuzzy
+msgid "Padding"
+msgstr "γίνεται ανάγνωση"
+
+#: ../src/common/prntbase.cpp:2044
+#, c-format
+msgid "Page %d"
+msgstr "Σελίδα %d"
+
+#: ../src/common/prntbase.cpp:2042
+#, c-format
+msgid "Page %d of %d"
+msgstr "Σελίδα %d από %d"
+
+#: ../src/gtk/print.cpp:774
+msgid "Page Setup"
+msgstr "Οργάνωση(setup) Σελίδας"
+
+#: ../src/generic/prntdlgg.cpp:828 ../src/common/prntbase.cpp:467
+msgid "Page setup"
+msgstr "Ρύθμιση(setup) Σελίδας"
+
+#: ../src/generic/prntdlgg.cpp:216
+msgid "Pages"
+msgstr "Σελίδες"
+
+#: ../src/generic/prntdlgg.cpp:602 ../src/generic/prntdlgg.cpp:801
+#: ../src/generic/prntdlgg.cpp:842 ../src/generic/prntdlgg.cpp:855
+#: ../src/generic/prntdlgg.cpp:1052 ../src/generic/prntdlgg.cpp:1057
+msgid "Paper size"
+msgstr "Μέγεθος χαρτιού"
+
+#: ../src/richtext/richtextstyles.cpp:1058
+msgid "Paragraph styles"
+msgstr ""
+
+#: ../src/common/xtistrm.cpp:469
+msgid "Passing a already registered object to SetObject"
+msgstr "Δόθηκε ένα ήδη registered αντικείμενο στην SetObject"
+
+#: ../src/common/xtistrm.cpp:480
+#, fuzzy
+msgid "Passing an unknown object to GetObject"
+msgstr "Δόθηκε ένα άγνωστο αντικείμενο στην GetObject"
+
+#: ../src/richtext/richtextctrl.cpp:3117 ../src/common/stockitem.cpp:180
+#: ../src/stc/stc_i18n.cpp:19
+#, fuzzy
+msgid "Paste"
+msgstr "&Επικόληση"
+
+#: ../src/common/stockitem.cpp:262
+#, fuzzy
+msgid "Paste selection"
+msgstr "Τμήματα"
+
+#: ../src/richtext/richtextliststylepage.cpp:222
+#: ../src/richtext/richtextbulletspage.cpp:172
+msgid "Peri&od"
+msgstr ""
+
+#: ../src/generic/filectrlg.cpp:465
+msgid "Permissions"
+msgstr "Δικαιώματα"
+
+#: ../src/richtext/richtextbuffer.cpp:11942
+#, fuzzy
+msgid "Picture Properties"
+msgstr "&Ιδιότητες"
+
+#: ../include/wx/unix/pipe.h:47
+msgid "Pipe creation failed"
+msgstr "Δημιουργία pipe απέτυχε"
+
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Please choose a valid font."
+msgstr "Παρακαλώ επιλέξτε μία αποδεκτή γραμματοσειρά."
+
+#: ../src/gtk/filedlg.cpp:72
+msgid "Please choose an existing file."
+msgstr "Παρακλώ επιλέξτε ένα υπάρχον αρχείο."
+
+#: ../src/html/helpwnd.cpp:813
+msgid "Please choose the page to display:"
+msgstr "Παρακλώ επιλέξτε την σελίδα για απεικόνιση:"
+
+#: ../src/msw/dialup.cpp:785
+msgid "Please choose which ISP do you want to connect to"
+msgstr ""
+"Παρακαλώ επιλέξτε τον παροχέα υπηρεσιών Internet (ISP) με τον οποίο θέλετε "
+"να συνδεθείτε"
+
+#: ../src/msw/listctrl.cpp:372
+#, c-format
+msgid ""
+"Please install a newer version of comctl32.dll\n"
+"(at least version 4.70 is required but you have %d.%02d)\n"
+"or this program won't operate correctly."
+msgstr ""
+"Παρακαλώ εγκαταστήστε μια νεότερη έκδοση του comctl32.dll\n"
+"(η ελάχιστη απαραίτητη έκδοση είναι η 4.70 αλλά εσείς έχετε την %d.%02d)\n"
+"διαφορετικά αυτό το πρόγραμμα δεν θα λειτουργήσει κανονικά."
+
+#: ../src/common/headerctrlcmn.cpp:59
+msgid "Please select the columns to show and define their order:"
+msgstr ""
+
+#: ../src/common/prntbase.cpp:521
+#, fuzzy
+msgid "Please wait while printing..."
+msgstr "Παρακαλώ περιμένετε όσο διαρκεί η εκτύπωση\n"
+
+#: ../src/propgrid/advprops.cpp:631
+#, fuzzy
+msgid "Point Size"
+msgstr "Μέγεθος κουκίδας:"
+
+#: ../src/osx/carbon/dataview.cpp:1278 ../src/osx/carbon/dataview.cpp:1329
+#: ../src/osx/carbon/dataview.cpp:1420 ../src/osx/carbon/dataview.cpp:1443
+#: ../src/osx/carbon/dataview.cpp:1460 ../src/osx/carbon/dataview.cpp:1477
+#: ../src/osx/carbon/dataview.cpp:1670 ../src/osx/carbon/dataview.cpp:1779
+#: ../src/osx/carbon/dataview.cpp:1821 ../src/osx/carbon/dataview.cpp:1874
+#: ../src/osx/carbon/dataview.cpp:1997
+msgid "Pointer to data view control not set correctly."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1279 ../src/osx/carbon/dataview.cpp:1338
+#: ../src/osx/carbon/dataview.cpp:1421 ../src/osx/carbon/dataview.cpp:1478
+#: ../src/osx/carbon/dataview.cpp:1671 ../src/osx/carbon/dataview.cpp:1780
+#: ../src/osx/carbon/dataview.cpp:1822 ../src/osx/carbon/dataview.cpp:1875
+#: ../src/osx/carbon/dataview.cpp:1998
+msgid "Pointer to model not set correctly."
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:612 ../src/generic/prntdlgg.cpp:867
+msgid "Portrait"
+msgstr "Πορτραίτο"
+
+#: ../src/richtext/richtextsizepage.cpp:496
+#, fuzzy
+msgid "Position"
+msgstr "Ερώτημα"
+
+#: ../src/generic/prntdlgg.cpp:298
+msgid "PostScript file"
+msgstr "Αρχείο PostScript"
+
+#: ../src/common/stockitem.cpp:181
+#, fuzzy
+msgid "Preferences"
+msgstr "&Προτιμήσεις"
+
+#: ../src/osx/menu_osx.cpp:643
+#, fuzzy
+msgid "Preferences..."
+msgstr "&Προτιμήσεις"
+
+#: ../src/common/prntbase.cpp:529
+msgid "Preparing"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:455 ../src/osx/carbon/fontdlg.cpp:576
+#: ../src/html/helpwnd.cpp:1235
+msgid "Preview:"
+msgstr "Προεπισκόπηση:"
+
+#: ../src/common/prntbase.cpp:1523 ../src/html/helpwnd.cpp:677
+msgid "Previous page"
+msgstr "Προηγούμενη σελίδα"
+
+#: ../src/generic/prntdlgg.cpp:143 ../src/generic/prntdlgg.cpp:157
+#: ../src/common/prntbase.cpp:409 ../src/common/prntbase.cpp:1511
+#: ../src/gtk/print.cpp:584 ../src/gtk/print.cpp:597
+msgid "Print"
+msgstr "Εκτύπωση"
+
+#: ../include/wx/prntbase.h:395 ../src/common/docview.cpp:1250
+msgid "Print Preview"
+msgstr "Προεπισκόπηση Εκτύπωσης"
+
+#: ../src/common/prntbase.cpp:1985 ../src/common/prntbase.cpp:2027
+#: ../src/common/prntbase.cpp:2035
+msgid "Print Preview Failure"
+msgstr "Αποτυχία Προεπισκόπησης Εκτύπωσης"
+
+#: ../src/generic/prntdlgg.cpp:224
+msgid "Print Range"
+msgstr "Εύρος εκτύπωσης"
+
+#: ../src/generic/prntdlgg.cpp:449
+msgid "Print Setup"
+msgstr "Οργάνωση(setup) Εκτύπωσης"
+
+#: ../src/generic/prntdlgg.cpp:621
+msgid "Print in colour"
+msgstr "Εγχρωμη εκτύπωση"
+
+#: ../src/common/stockitem.cpp:182
+#, fuzzy
+msgid "Print previe&w..."
+msgstr "Π&ροεπισκόπηση εκτύπωσης"
+
+#: ../src/common/docview.cpp:1244
+#, fuzzy
+msgid "Print preview creation failed."
+msgstr "Δημιουργία pipe απέτυχε"
+
+#: ../src/common/stockitem.cpp:182
+#, fuzzy
+msgid "Print preview..."
+msgstr "Προεπισκόπηση εκτύπωσης"
+
+#: ../src/generic/prntdlgg.cpp:630
+msgid "Print spooling"
+msgstr "Spooling εκτύπωσης"
+
+#: ../src/html/helpwnd.cpp:688
+msgid "Print this page"
+msgstr "Εκτύπωση αυτής της σελίδας"
+
+#: ../src/generic/prntdlgg.cpp:185
+msgid "Print to File"
+msgstr "Εκτύπωση σε Αρχείο"
+
+#: ../src/common/stockitem.cpp:183
+#, fuzzy
+msgid "Print..."
+msgstr "&Εκτύπωση..."
+
+#: ../src/generic/prntdlgg.cpp:493
+msgid "Printer"
+msgstr "Εκτυπωτής"
+
+#: ../src/generic/prntdlgg.cpp:633
+msgid "Printer command:"
+msgstr "Εντολή εκτυπωτή:"
+
+#: ../src/generic/prntdlgg.cpp:180
+msgid "Printer options"
+msgstr "Επιλογές εκτυπωτή"
+
+#: ../src/generic/prntdlgg.cpp:645
+msgid "Printer options:"
+msgstr "Επιλογές εκτυπωτή:"
+
+#: ../src/generic/prntdlgg.cpp:916
+msgid "Printer..."
+msgstr "Εκτυπωτής..."
+
+#: ../src/generic/prntdlgg.cpp:196
+msgid "Printer:"
+msgstr "Εκτυπωτής:"
+
+#: ../include/wx/richtext/richtextprint.h:163 ../src/common/prntbase.cpp:518
+#: ../src/html/htmprint.cpp:277
+#, fuzzy
+msgid "Printing"
+msgstr "Γίνεται εκτύπωση του "
+
+#: ../src/common/prntbase.cpp:586
+msgid "Printing "
+msgstr "Γίνεται εκτύπωση του "
+
+#: ../src/common/prntbase.cpp:330
+msgid "Printing Error"
+msgstr "Σφάλμα Εκτύπωσης"
+
+#: ../src/common/prntbase.cpp:544
+#, fuzzy, c-format
+msgid "Printing page %d of %d"
+msgstr "Γίνεται εκτύπωση σελίδας %d..."
+
+#: ../src/generic/printps.cpp:201
+#, c-format
+msgid "Printing page %d..."
+msgstr "Γίνεται εκτύπωση σελίδας %d..."
+
+#: ../src/generic/printps.cpp:161
+msgid "Printing..."
+msgstr "Γίνεται εκτύπωση..."
+
+#: ../include/wx/richtext/richtextprint.h:109 ../include/wx/prntbase.h:263
+#: ../src/common/docview.cpp:2124
+#, fuzzy
+msgid "Printout"
+msgstr "Εκτύπωση"
+
+#: ../src/common/debugrpt.cpp:565
+#, c-format
+msgid ""
+"Processing debug report has failed, leaving the files in \"%s\" directory."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:2472
+msgid "Progress renderer cannot render value type; value type: "
+msgstr ""
+
+#: ../src/common/prntbase.cpp:528
+msgid "Progress:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:184
+#, fuzzy
+msgid "Properties"
+msgstr "&Ιδιότητες"
+
+#: ../src/propgrid/manager.cpp:237
+#, fuzzy
+msgid "Property"
+msgstr "&Ιδιότητες"
+
+#: ../src/propgrid/propgrid.cpp:3144 ../src/propgrid/propgrid.cpp:3276
+#, fuzzy
+msgid "Property Error"
+msgstr "Σφάλμα Εκτύπωσης"
+
+#: ../src/common/paper.cpp:113
+msgid "Quarto, 215 x 275 mm"
+msgstr "Quarto, 215 x 275 mm"
+
+#: ../src/generic/logg.cpp:1036
+msgid "Question"
+msgstr "Ερώτημα"
+
+#: ../src/common/stockitem.cpp:156
+#, fuzzy
+msgid "Quit"
+msgstr "Έ&ξοδος"
+
+#: ../src/osx/menu_osx.cpp:610 ../src/osx/menu_osx.cpp:657
+#, fuzzy, c-format
+msgid "Quit %s"
+msgstr "Έ&ξοδος"
+
+#: ../src/common/stockitem.cpp:263
+#, fuzzy
+msgid "Quit this program"
+msgstr "Εκτύπωση αυτής της σελίδας"
+
+#: ../src/common/accelcmn.cpp:53
+msgid "RETURN"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:57
+msgid "RIGHT"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:327
+#, fuzzy
+msgid "RawCtrl+"
+msgstr "ctrl"
+
+#: ../src/common/ffile.cpp:113 ../src/common/ffile.cpp:134
+#, c-format
+msgid "Read error on file '%s'"
+msgstr "Λάθος ανάγνωσης στο αρχείο '%s'"
+
+#: ../src/common/prntbase.cpp:257
+msgid "Ready"
+msgstr "Έτοιμο"
+
+#: ../src/common/stockitem.cpp:185 ../src/stc/stc_i18n.cpp:16
+#, fuzzy
+msgid "Redo"
+msgstr "&Επανάληψη"
+
+#: ../src/common/stockitem.cpp:264
+msgid "Redo last action"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:186
+msgid "Refresh"
+msgstr "Ανανέωση"
+
+#: ../src/msw/registry.cpp:625
+#, c-format
+msgid "Registry key '%s' already exists."
+msgstr "Το κλειδί μητρώου '%s' υπάρχει ήδη."
+
+#: ../src/msw/registry.cpp:594
+#, c-format
+msgid "Registry key '%s' does not exist, cannot rename it."
+msgstr "Το κλειδί μητρώου '%s' δεν υπάρχει, αδύνατη η μετονομασία του."
+
+#: ../src/msw/registry.cpp:726
+#, c-format
+msgid ""
+"Registry key '%s' is needed for normal system operation,\n"
+"deleting it will leave your system in unusable state:\n"
+"operation aborted."
+msgstr ""
+"Το αρχείο μητρώου '%s' χρειάζεται για την κανονική λειτουργία του "
+"συστήματος,\n"
+"διαγράφοντάς το θα αφήσει το σύστημά σας σε κατάσταση αχρηστίας:\n"
+"η λειτουργία ματαιώθηκε."
+
+#: ../src/msw/registry.cpp:520
+#, c-format
+msgid "Registry value '%s' already exists."
+msgstr "Η τιμή μητρώου '%s' υπάρχει ήδη."
+
+#: ../src/richtext/richtextfontpage.cpp:332
+#: ../src/richtext/richtextfontpage.cpp:336
+msgid "Regular"
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:519
+#, fuzzy
+msgid "Relative"
+msgstr "Διακοσμητικός"
+
+#: ../src/generic/helpext.cpp:462
+msgid "Relevant entries:"
+msgstr "Σχετικές εγγραφές:"
+
+#: ../include/wx/generic/progdlgg.h:86
+#, fuzzy
+msgid "Remaining time:"
+msgstr "Xρόνος που απομένει : "
+
+#: ../src/common/stockitem.cpp:187
+msgid "Remove"
+msgstr "Απομάκρυνση"
+
+#: ../src/richtext/richtextctrl.cpp:1430
+#, fuzzy
+msgid "Remove Bullet"
+msgstr "Απομάκρυνση"
+
+#: ../src/html/helpwnd.cpp:440
+msgid "Remove current page from bookmarks"
+msgstr "Αφαίρεση τρέχουσας σελίδας από τους σελιδοδείκτες"
+
+#: ../src/common/rendcmn.cpp:194
+#, c-format
+msgid "Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."
+msgstr ""
+"Ο Renderer \"%s\" είναι σε ασύμβατη έκδοση %d.%d και δεν μπορεί να φορτωθεί."
+
+#: ../src/osx/carbon/dataview.cpp:1430
+#, fuzzy
+msgid "Rendering failed."
+msgstr "Η δημιουργία timer απέτυχε."
+
+#: ../src/richtext/richtextbuffer.cpp:4214
+msgid "Renumber List"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:188
+msgid "Rep&lace"
+msgstr "&Αντικατάσταση"
+
+#: ../src/richtext/richtextctrl.cpp:3277 ../src/common/stockitem.cpp:188
+#, fuzzy
+msgid "Replace"
+msgstr "&Αντικατάσταση"
+
+#: ../src/generic/fdrepdlg.cpp:182
+msgid "Replace &all"
+msgstr "Αντικατάσταση &Όλων"
+
+#: ../src/common/stockitem.cpp:261
+#, fuzzy
+msgid "Replace selection"
+msgstr "Αντικατάσταση &Όλων"
+
+#: ../src/generic/fdrepdlg.cpp:124
+msgid "Replace with:"
+msgstr "Αντικατάσταση με:"
+
+#: ../src/common/valtext.cpp:161
+msgid "Required information entry is empty."
+msgstr ""
+
+#: ../src/common/translation.cpp:1966
+#, fuzzy, c-format
+msgid "Resource '%s' is not a valid message catalog."
+msgstr "'%s' δεν είναι ένας σωστός κατάλογος μηνυμάτων."
+
+#: ../src/common/stockitem.cpp:189
+msgid "Revert to Saved"
+msgstr "Επαναφορά από το αποθηκευμένο"
+
+#: ../src/richtext/richtextborderspage.cpp:548
+#, fuzzy
+msgid "Ridge"
+msgstr "Απαλό(light)"
+
+#: ../src/richtext/richtextliststylepage.cpp:251
+#: ../src/richtext/richtextbulletspage.cpp:201
+#: ../src/richtext/richtextsizepage.cpp:250
+#, fuzzy
+msgid "Right"
+msgstr "Απαλό(light)"
+
+#: ../src/generic/prntdlgg.cpp:892
+msgid "Right margin (mm):"
+msgstr "Δεξί περιθώριο (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:148
+#: ../src/richtext/richtextindentspage.cpp:150
+#: ../src/richtext/richtextliststylepage.cpp:337
+#: ../src/richtext/richtextliststylepage.cpp:339
+msgid "Right-align text."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:322
+msgid "Roman"
+msgstr "Ρωμαϊκό"
+
+#: ../src/richtext/richtextliststylepage.cpp:299
+#: ../src/richtext/richtextbulletspage.cpp:252
+msgid "S&tandard bullet name:"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:82
+msgid "SCROLL_LOCK"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:71
+msgid "SELECT"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:77
+msgid "SEPARATOR"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:74
+msgid "SNAPSHOT"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:62
+msgid "SPACE"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:257 ../src/common/accelcmn.cpp:339
+msgid "SPECIAL"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:78
+msgid "SUBTRACT"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:190 ../src/common/sizer.cpp:2678
+msgid "Save"
+msgstr "Αποθήκευση"
+
+#: ../src/common/fldlgcmn.cpp:327
+#, c-format
+msgid "Save %s file"
+msgstr "Αποθήκευση %s αρχείου"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save &As..."
+msgstr "Αποθήκευση &ως..."
+
+#: ../src/common/docview.cpp:360
+msgid "Save As"
+msgstr "Αποθήκευση ως"
+
+#: ../src/common/stockitem.cpp:191
+#, fuzzy
+msgid "Save as"
+msgstr "Αποθήκευση ως"
+
+#: ../src/common/stockitem.cpp:267
+#, fuzzy
+msgid "Save current document"
+msgstr "Επιλέξτε μια προβολή εγγράφων"
+
+#: ../src/common/stockitem.cpp:268
+msgid "Save current document with a different filename"
+msgstr ""
+
+#: ../src/generic/logg.cpp:518
+msgid "Save log contents to file"
+msgstr "Αποθήκευση περιεχομένων καταγραφής(log) σε αρχείο"
+
+#: ../src/generic/fontdlgg.cpp:325
+msgid "Script"
+msgstr "Χειρόγραφο(Script)"
+
+#: ../src/generic/srchctlg.cpp:67 ../src/html/helpwnd.cpp:548
+#: ../src/html/helpwnd.cpp:563
+msgid "Search"
+msgstr "Αναζήτηση"
+
+#: ../src/html/helpwnd.cpp:550
+#, fuzzy
+msgid ""
+"Search contents of help book(s) for all occurrences of the text you typed "
+"above"
+msgstr ""
+"Αναζήτηση στα περιεχόμενα του/των βιβλίου/βιβλίων βοηθείας για όλες τις "
+"εμφανίσεις του κειμένου που γράψατε επάνω"
+
+#: ../src/generic/fdrepdlg.cpp:160
+msgid "Search direction"
+msgstr "Κατεύθυνση αναζήτησης"
+
+#: ../src/generic/fdrepdlg.cpp:112
+msgid "Search for:"
+msgstr "Αναζήτηση για:"
+
+#: ../src/html/helpwnd.cpp:1065
+msgid "Search in all books"
+msgstr "Εύρεση σε όλα τα βιβλία"
+
+#: ../src/html/helpwnd.cpp:870
+msgid "Searching..."
+msgstr "Γίνεται αναζήτηση..."
+
+#: ../src/generic/dirctrlg.cpp:546
+msgid "Sections"
+msgstr "Τμήματα"
+
+#: ../src/common/ffile.cpp:220
+#, c-format
+msgid "Seek error on file '%s'"
+msgstr "Λάθος ανίχνευσης (seek error) στο αρχείο '%s'."
+
+#: ../src/common/ffile.cpp:210
+#, c-format
+msgid "Seek error on file '%s' (large files not supported by stdio)"
+msgstr ""
+
+#: ../src/richtext/richtextctrl.cpp:330 ../src/osx/textctrl_osx.cpp:587
+#: ../src/common/stockitem.cpp:192 ../src/msw/textctrl.cpp:2288
+msgid "Select &All"
+msgstr "Επιλογή &Ολων"
+
+#: ../src/common/stockitem.cpp:192 ../src/stc/stc_i18n.cpp:21
+#, fuzzy
+msgid "Select All"
+msgstr "Επιλογή &Ολων"
+
+#: ../src/common/docview.cpp:1877
+msgid "Select a document template"
+msgstr "Επιλέξτε ένα πρότυπα εγγράφου"
+
+#: ../src/common/docview.cpp:1951
+msgid "Select a document view"
+msgstr "Επιλέξτε μια προβολή εγγράφων"
+
+#: ../src/richtext/richtextfontpage.cpp:235
+#: ../src/richtext/richtextfontpage.cpp:237
+msgid "Select regular or bold."
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:222
+#: ../src/richtext/richtextfontpage.cpp:224
+msgid "Select regular or italic style."
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:248
+#: ../src/richtext/richtextfontpage.cpp:250
+msgid "Select underlining or no underlining."
+msgstr ""
+
+#: ../src/motif/filedlg.cpp:220
+#, fuzzy
+msgid "Selection"
+msgstr "Τμήματα"
+
+#: ../src/richtext/richtextliststylepage.cpp:187
+#: ../src/richtext/richtextliststylepage.cpp:189
+msgid "Selects the list level to edit."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:918
+#, c-format
+msgid "Separator expected after the option '%s'."
+msgstr "Αναμενόταν διαχωριστικό μετά την επιλογή '%s'."
+
+#: ../src/richtext/richtextbuffer.cpp:10513
+#, fuzzy
+msgid "Set Cell Style"
+msgstr "Διαγραφή στοιχείου"
+
+#: ../include/wx/xtiprop.h:179
+msgid "SetProperty called w/o valid setter"
+msgstr "Η SetProperty κλήθηκε χωρίς έγκυρο θέτη"
+
+#: ../src/common/filename.cpp:2632
+msgid "Setting directory access times is not supported under this OS version"
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:188
+msgid "Setup..."
+msgstr "Ρυθμίσεις..."
+
+#: ../src/msw/dialup.cpp:563
+msgid "Several active dialup connections found, choosing one randomly."
+msgstr ""
+"Βρέθηκαν πολλαπλές ενεργές τηλεφωνικές συνδέσεις, γίνεται τυχαία επιλογή "
+"μίας."
+
+#: ../src/common/accelcmn.cpp:324
+#, fuzzy
+msgid "Shift+"
+msgstr "shift"
+
+#: ../src/generic/dirdlgg.cpp:170
+#, fuzzy
+msgid "Show &hidden directories"
+msgstr "Εμφάνιση κρυφών καταλόγων"
+
+#: ../src/generic/filectrlg.cpp:1003
+#, fuzzy
+msgid "Show &hidden files"
+msgstr "Εμφάνιση κρυφών αρχείων."
+
+#: ../src/osx/menu_osx.cpp:605 ../src/osx/menu_osx.cpp:652
+#, fuzzy
+msgid "Show All"
+msgstr "Εμφάνιση όλων"
+
+#: ../src/common/stockitem.cpp:257
+msgid "Show about dialog"
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:502
+msgid "Show all"
+msgstr "Εμφάνιση όλων"
+
+#: ../src/html/helpwnd.cpp:513
+msgid "Show all items in index"
+msgstr "Εμφάνιση όλων των στοιχείων στο ευρετήριο"
+
+#: ../src/generic/dirdlgg.cpp:105
+msgid "Show hidden directories"
+msgstr "Εμφάνιση κρυφών καταλόγων"
+
+#: ../src/html/helpwnd.cpp:671
+msgid "Show/hide navigation panel"
+msgstr "Εμφλανιση/Κρύψιμο πλαίσιο πλοήγησης (navigation panel)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:421
+#: ../src/richtext/richtextsymboldlg.cpp:423
+msgid "Shows a Unicode subset."
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:472
+#: ../src/richtext/richtextliststylepage.cpp:474
+#: ../src/richtext/richtextbulletspage.cpp:276
+#: ../src/richtext/richtextbulletspage.cpp:278
+msgid "Shows a preview of the bullet settings."
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:322
+#: ../src/richtext/richtextfontpage.cpp:324
+msgid "Shows a preview of the font settings."
+msgstr ""
+
+#: ../src/osx/carbon/fontdlg.cpp:580 ../src/osx/carbon/fontdlg.cpp:582
+msgid "Shows a preview of the font."
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:303
+#: ../src/richtext/richtextindentspage.cpp:305
+msgid "Shows a preview of the paragraph settings."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:460 ../src/generic/fontdlgg.cpp:462
+msgid "Shows the font preview."
+msgstr "Εμφανίζει την προεπισκόπηση της γραμματοσειράς"
+
+#: ../src/univ/themes/mono.cpp:516
+msgid "Simple monochrome theme"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:449
+msgid "Single"
+msgstr ""
+
+#: ../src/generic/filectrlg.cpp:460 ../src/richtext/richtextformatdlg.cpp:356
+#: ../src/richtext/richtextsizepage.cpp:299
+msgid "Size"
+msgstr "Μέγεθος"
+
+#: ../src/osx/carbon/fontdlg.cpp:525
+#, fuzzy
+msgid "Size:"
+msgstr "Μέγεθος"
+
+#: ../src/generic/progdlgg.cpp:262 ../src/generic/progdlgg.cpp:773
+#: ../src/msw/progdlg.cpp:801
+msgid "Skip"
+msgstr "Παράλειψη"
+
+#: ../src/generic/fontdlgg.cpp:330
+msgid "Slant"
+msgstr "Κλήση"
+
+#: ../src/richtext/richtextfontpage.cpp:298
+msgid "Small C&apitals"
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:543
+#, fuzzy
+msgid "Solid"
+msgstr "Έντονο"
+
+#: ../src/common/docview.cpp:1773
+msgid "Sorry, could not open this file."
+msgstr "Συγγνώμη, δεν μπόρεσε να ανοιχθεί αυτό το αρχείο."
+
+#: ../src/common/prntbase.cpp:2027 ../src/common/prntbase.cpp:2035
+msgid "Sorry, not enough memory to create a preview."
+msgstr "Συγγνώμη, δεν υπάρχει αρκετή μνήμη για την δημιουργία προεπισκόπησης."
+
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "Sorry, that name is taken. Please choose another."
+msgstr ""
+
+#: ../src/common/docview.cpp:1796
+msgid "Sorry, the format for this file is unknown."
+msgstr "Συγγνώμη, η μορφή αυτού του αρχείου είναι άγνωστη."
+
+#: ../src/unix/sound.cpp:492
+msgid "Sound data are in unsupported format."
+msgstr "Τα δεδομένα ήχου είναι σε μη υποστηριζόμενη μορφή."
+
+#: ../src/unix/sound.cpp:477
+#, c-format
+msgid "Sound file '%s' is in unsupported format."
+msgstr "Το αρχείο '%s' είναι σε μη υποστηριζόμενη μορφή."
+
+#: ../src/richtext/richtextliststylepage.cpp:467
+#, fuzzy
+msgid "Spacing"
+msgstr "Γίνεται αναζήτηση..."
+
+#: ../src/common/stockitem.cpp:197
+msgid "Spell Check"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:490
+#: ../src/richtext/richtextbulletspage.cpp:295
+msgid "Standard"
+msgstr ""
+
+#: ../src/common/paper.cpp:105
+msgid "Statement, 5 1/2 x 8 1/2 in"
+msgstr "Δήλωση, 5 1/2 x 8 1/2 ίντσες"
+
+#: ../src/richtext/richtextsizepage.cpp:518
+#: ../src/richtext/richtextsizepage.cpp:523
+#, fuzzy
+msgid "Static"
+msgstr "Κατάσταση: "
+
+#: ../src/generic/prntdlgg.cpp:204
+msgid "Status:"
+msgstr "Κατάσταση: "
+
+#: ../src/common/stockitem.cpp:198
+#, fuzzy
+msgid "Stop"
+msgstr "&Διακοπή"
+
+#: ../src/common/stockitem.cpp:199
+msgid "Strikethrough"
+msgstr ""
+
+#: ../src/common/colourcmn.cpp:45
+#, c-format
+msgid "String To Colour : Incorrect colour specification : %s"
+msgstr "String To Colour : Λανθασμένος καθορισμός χρώματος: %s"
+
+#: ../src/richtext/richtextformatdlg.cpp:318 ../src/propgrid/advprops.cpp:647
+#, fuzzy
+msgid "Style"
+msgstr "&Στυλ:"
+
+#: ../include/wx/richtext/richtextstyledlg.h:47
+msgid "Style Organiser"
+msgstr ""
+
+#: ../src/osx/carbon/fontdlg.cpp:534
+#, fuzzy
+msgid "Style:"
+msgstr "&Στυλ:"
+
+#: ../src/richtext/richtextfontpage.cpp:312
+#, fuzzy
+msgid "Subscrip&t"
+msgstr "Χειρόγραφο(Script)"
+
+#: ../src/richtext/richtextfontpage.cpp:305
+#, fuzzy
+msgid "Supe&rscript"
+msgstr "Χειρόγραφο(Script)"
+
+#: ../src/common/paper.cpp:151
+msgid "SuperA/SuperA/A4 227 x 356 mm"
+msgstr ""
+
+#: ../src/common/paper.cpp:152
+msgid "SuperB/SuperB/A3 305 x 487 mm"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:326
+msgid "Swiss"
+msgstr "Ελβετικό(Swiss)"
+
+#: ../src/richtext/richtextliststylepage.cpp:488
+#: ../src/richtext/richtextbulletspage.cpp:293
+msgid "Symbol"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:288
+#: ../src/richtext/richtextbulletspage.cpp:240
+#, fuzzy
+msgid "Symbol &font:"
+msgstr "Κανονική γραμματοσειρά:"
+
+#: ../include/wx/richtext/richtextsymboldlg.h:47
+#, fuzzy
+msgid "Symbols"
+msgstr "&Στυλ:"
+
+#: ../src/common/accelcmn.cpp:63
+msgid "TAB"
+msgstr ""
+
+#: ../src/common/imagtiff.cpp:372 ../src/common/imagtiff.cpp:385
+#: ../src/common/imagtiff.cpp:744
+msgid "TIFF: Couldn't allocate memory."
+msgstr "TIFF: Αδύνατη η δέσμευση μνήμης."
+
+#: ../src/common/imagtiff.cpp:304
+msgid "TIFF: Error loading image."
+msgstr "TIFF: Λάθος κατά την φόρτωση εικόνας."
+
+#: ../src/common/imagtiff.cpp:471
+msgid "TIFF: Error reading image."
+msgstr "TIFF: Λάθος κατά την ανάγνωση εικόνας."
+
+#: ../src/common/imagtiff.cpp:611
+msgid "TIFF: Error saving image."
+msgstr "TIFF: Λάθος κατά την αποθήκευση εικόνας."
+
+#: ../src/common/imagtiff.cpp:849
+msgid "TIFF: Error writing image."
+msgstr "TIFF: Λάθος κατα την εγγραφή εικόνας."
+
+#: ../src/common/imagtiff.cpp:358
+msgid "TIFF: Image size is abnormally big."
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:10794
+#, fuzzy
+msgid "Table Properties"
+msgstr "&Ιδιότητες"
+
+#: ../src/common/paper.cpp:146
+#, fuzzy
+msgid "Tabloid Extra 11.69 x 18 in"
+msgstr "11 x 17 ίντσες"
+
+#: ../src/common/paper.cpp:103
+msgid "Tabloid, 11 x 17 in"
+msgstr "11 x 17 ίντσες"
+
+#: ../src/richtext/richtextformatdlg.cpp:336
+msgid "Tabs"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:327
+msgid "Teletype"
+msgstr "Τηλέτυπο"
+
+#: ../src/common/docview.cpp:1878
+msgid "Templates"
+msgstr "Πρότυπα"
+
+#: ../src/osx/carbon/dataview.cpp:2373
+msgid "Text renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:158
+msgid "Thai (ISO-8859-11)"
+msgstr "Ταϋλανδέζικο (ISO-8859-11)"
+
+#: ../src/common/ftp.cpp:620
+msgid "The FTP server doesn't support passive mode."
+msgstr ""
+"Ο διακομιστής FTP δεν υποστηρίζει κατάσταση λειτουργίας(mode) 'passive'."
+
+#: ../src/common/ftp.cpp:606
+msgid "The FTP server doesn't support the PORT command."
+msgstr "Ο διακομιστής FTP δεν υποστηρίζει την εντολή PORT."
+
+#: ../src/richtext/richtextliststylepage.cpp:215
+#: ../src/richtext/richtextliststylepage.cpp:217
+#: ../src/richtext/richtextbulletspage.cpp:164
+#: ../src/richtext/richtextbulletspage.cpp:166
+msgid "The available bullet styles."
+msgstr ""
+
+#: ../src/richtext/richtextstyledlg.cpp:202
+#: ../src/richtext/richtextstyledlg.cpp:204
+#, fuzzy
+msgid "The available styles."
+msgstr "Το στυλ της γραμματοσειράς."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:139
+#: ../src/richtext/richtextbackgroundpage.cpp:141
+#, fuzzy
+msgid "The background colour."
+msgstr "Το χρώμα της γραμματοσειράς."
+
+#: ../src/richtext/richtextmarginspage.cpp:268
+#: ../src/richtext/richtextmarginspage.cpp:270
+#, fuzzy
+msgid "The bottom margin size."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextmarginspage.cpp:382
+#: ../src/richtext/richtextmarginspage.cpp:384
+#, fuzzy
+msgid "The bottom padding size."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextsizepage.cpp:639
+#: ../src/richtext/richtextsizepage.cpp:641
+#: ../src/richtext/richtextsizepage.cpp:653
+#: ../src/richtext/richtextsizepage.cpp:655
+#, fuzzy
+msgid "The bottom position."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextliststylepage.cpp:254
+#: ../src/richtext/richtextliststylepage.cpp:256
+#: ../src/richtext/richtextliststylepage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:277
+#: ../src/richtext/richtextbulletspage.cpp:204
+#: ../src/richtext/richtextbulletspage.cpp:206
+#: ../src/richtext/richtextbulletspage.cpp:227
+#: ../src/richtext/richtextbulletspage.cpp:229
+msgid "The bullet character."
+msgstr ""
+
+#: ../src/richtext/richtextsymboldlg.cpp:443
+#: ../src/richtext/richtextsymboldlg.cpp:445
+msgid "The character code."
+msgstr ""
+
+#: ../src/common/fontmap.cpp:203
+#, c-format
+msgid ""
+"The charset '%s' is unknown. You may select\n"
+"another charset to replace it with or choose\n"
+"[Cancel] if it cannot be replaced"
+msgstr ""
+"Το σύνολο χαρακτήρων (charset) '%s' είναι άγνωστο. Μπορείτε να επιλέξετε\n"
+"ένα άλλο σύνολο χαρακτήρων να το αντικαταστήσει ή διαλέξτε\n"
+"[Ακύρωση] εάν δεν μπορεί να αντικατασταθεί"
+
+#: ../src/msw/ole/dataobj.cpp:367
+#, c-format
+msgid "The clipboard format '%d' doesn't exist."
+msgstr "O τύπος προχείρου(clipboard format) '%d' δεν υπάρχει."
+
+#: ../src/richtext/richtextstylepage.cpp:128
+#: ../src/richtext/richtextstylepage.cpp:130
+msgid "The default style for the next paragraph."
+msgstr ""
+
+#: ../src/generic/dirdlgg.cpp:231
+#, c-format
+msgid ""
+"The directory '%s' does not exist\n"
+"Create it now?"
+msgstr ""
+"Ο κατάλογος '%s' δεν υπάρχει\n"
+"Να δημιουργηθεί τώρα;"
+
+#: ../src/html/htmprint.cpp:271
+#, c-format
+msgid ""
+"The document \"%s\" doesn't fit on the page horizontally and will be "
+"truncated if printed.\n"
+"\n"
+"Would you like to proceed with printing it nevertheless?"
+msgstr ""
+
+#: ../src/common/docview.cpp:1184
+#, c-format
+msgid ""
+"The file '%s' doesn't exist and couldn't be opened.\n"
+"It has been removed from the most recently used files list."
+msgstr ""
+"Το αρχείο '%s' δεν υπάρχει και δεν μπόρεσε να ανοιχτεί.\n"
+"Αφαιρέθηκε από την λίστα με τα πρόσφατα χρησιμοποιημένα αρχεία."
+
+#: ../src/richtext/richtextindentspage.cpp:208
+#: ../src/richtext/richtextindentspage.cpp:210
+#: ../src/richtext/richtextliststylepage.cpp:394
+#: ../src/richtext/richtextliststylepage.cpp:396
+#, fuzzy
+msgid "The first line indent."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/gtk/utilsgtk.cpp:427
+msgid "The following standard GTK+ options are also supported:\n"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:414 ../src/generic/fontdlgg.cpp:416
+msgid "The font colour."
+msgstr "Το χρώμα της γραμματοσειράς."
+
+#: ../src/generic/fontdlgg.cpp:375 ../src/generic/fontdlgg.cpp:377
+msgid "The font family."
+msgstr "Η οικογένεια της γραμματοσειρας."
+
+#: ../src/richtext/richtextsymboldlg.cpp:405
+#: ../src/richtext/richtextsymboldlg.cpp:407
+msgid "The font from which to take the symbol."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:427 ../src/generic/fontdlgg.cpp:429
+#: ../src/generic/fontdlgg.cpp:434 ../src/generic/fontdlgg.cpp:436
+msgid "The font point size."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/osx/carbon/fontdlg.cpp:529 ../src/osx/carbon/fontdlg.cpp:531
+#, fuzzy
+msgid "The font size in points."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextfontpage.cpp:190
+#: ../src/richtext/richtextfontpage.cpp:192
+#, fuzzy
+msgid "The font size units, points or pixels."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/generic/fontdlgg.cpp:386 ../src/generic/fontdlgg.cpp:388
+msgid "The font style."
+msgstr "Το στυλ της γραμματοσειράς."
+
+#: ../src/generic/fontdlgg.cpp:397 ../src/generic/fontdlgg.cpp:399
+msgid "The font weight."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/common/docview.cpp:1465
+#, fuzzy, c-format
+msgid "The format of file '%s' couldn't be determined."
+msgstr "Δεν ήταν δυνατή η δημιουργία του καταλόγου '%s'"
+
+#: ../src/richtext/richtextindentspage.cpp:199
+#: ../src/richtext/richtextindentspage.cpp:201
+#: ../src/richtext/richtextliststylepage.cpp:385
+#: ../src/richtext/richtextliststylepage.cpp:387
+#, fuzzy
+msgid "The left indent."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextmarginspage.cpp:195
+#: ../src/richtext/richtextmarginspage.cpp:197
+#, fuzzy
+msgid "The left margin size."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextmarginspage.cpp:309
+#: ../src/richtext/richtextmarginspage.cpp:311
+#, fuzzy
+msgid "The left padding size."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextsizepage.cpp:534
+#: ../src/richtext/richtextsizepage.cpp:536
+#: ../src/richtext/richtextsizepage.cpp:548
+#: ../src/richtext/richtextsizepage.cpp:550
+#, fuzzy
+msgid "The left position."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextindentspage.cpp:288
+#: ../src/richtext/richtextindentspage.cpp:290
+#: ../src/richtext/richtextliststylepage.cpp:462
+#: ../src/richtext/richtextliststylepage.cpp:464
+msgid "The line spacing."
+msgstr ""
+
+#: ../src/richtext/richtextbulletspage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:270
+msgid "The list item number."
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:653
+msgid "The locale ID is unknown."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:366
+#: ../src/richtext/richtextsizepage.cpp:368
+#, fuzzy
+msgid "The object height."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextsizepage.cpp:474
+#: ../src/richtext/richtextsizepage.cpp:476
+#, fuzzy
+msgid "The object maximum height."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextsizepage.cpp:447
+#: ../src/richtext/richtextsizepage.cpp:449
+#, fuzzy
+msgid "The object maximum width."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextsizepage.cpp:420
+#: ../src/richtext/richtextsizepage.cpp:422
+#, fuzzy
+msgid "The object minimum height."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextsizepage.cpp:393
+#: ../src/richtext/richtextsizepage.cpp:395
+#, fuzzy
+msgid "The object minimum width."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextsizepage.cpp:332
+#: ../src/richtext/richtextsizepage.cpp:334
+#, fuzzy
+msgid "The object width."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextindentspage.cpp:227
+#: ../src/richtext/richtextindentspage.cpp:229
+#, fuzzy
+msgid "The outline level."
+msgstr "Εμφανίζει την προεπισκόπηση της γραμματοσειράς"
+
+#: ../src/common/log.cpp:281
+#, c-format
+msgid "The previous message repeated %lu time."
+msgid_plural "The previous message repeated %lu times."
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../src/common/log.cpp:274
+msgid "The previous message repeated once."
+msgstr ""
+
+#: ../src/gtk/print.cpp:931 ../src/gtk/print.cpp:1114
+msgid "The print dialog returned an error."
+msgstr ""
+
+#: ../src/richtext/richtextsymboldlg.cpp:462
+#: ../src/richtext/richtextsymboldlg.cpp:464
+msgid "The range to show."
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:322
+msgid ""
+"The report contains the files listed below. If any of these files contain "
+"private information,\n"
+"please uncheck them and they will be removed from the report.\n"
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1083
+#, c-format
+msgid "The required parameter '%s' was not specified."
+msgstr "Η απαραίτητη παράμετρος '%s' δεν προσδιορίστηκε."
+
+#: ../src/richtext/richtextindentspage.cpp:217
+#: ../src/richtext/richtextindentspage.cpp:219
+#: ../src/richtext/richtextliststylepage.cpp:403
+#: ../src/richtext/richtextliststylepage.cpp:405
+msgid "The right indent."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:220
+#: ../src/richtext/richtextmarginspage.cpp:222
+#, fuzzy
+msgid "The right margin size."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextmarginspage.cpp:334
+#: ../src/richtext/richtextmarginspage.cpp:336
+#, fuzzy
+msgid "The right padding size."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextsizepage.cpp:604
+#: ../src/richtext/richtextsizepage.cpp:606
+#: ../src/richtext/richtextsizepage.cpp:618
+#: ../src/richtext/richtextsizepage.cpp:620
+#, fuzzy
+msgid "The right position."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextindentspage.cpp:267
+#: ../src/richtext/richtextliststylepage.cpp:439
+#: ../src/richtext/richtextliststylepage.cpp:441
+msgid "The spacing after the paragraph."
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:257
+#: ../src/richtext/richtextindentspage.cpp:259
+#: ../src/richtext/richtextliststylepage.cpp:430
+#: ../src/richtext/richtextliststylepage.cpp:432
+msgid "The spacing before the paragraph."
+msgstr ""
+
+#: ../src/richtext/richtextstylepage.cpp:108
+#: ../src/richtext/richtextstylepage.cpp:110
+#, fuzzy
+msgid "The style name."
+msgstr "Το στυλ της γραμματοσειράς."
+
+#: ../src/richtext/richtextstylepage.cpp:118
+#: ../src/richtext/richtextstylepage.cpp:120
+msgid "The style on which this style is based."
+msgstr ""
+
+#: ../src/richtext/richtextstyledlg.cpp:214
+#: ../src/richtext/richtextstyledlg.cpp:216
+#, fuzzy
+msgid "The style preview."
+msgstr "Εμφανίζει την προεπισκόπηση της γραμματοσειράς"
+
+#: ../src/msw/ole/automtn.cpp:669
+msgid "The system cannot find the file specified."
+msgstr ""
+
+#: ../src/richtext/richtexttabspage.cpp:118
+#: ../src/richtext/richtexttabspage.cpp:120
+#, fuzzy
+msgid "The tab position."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtexttabspage.cpp:124
+#, fuzzy
+msgid "The tab positions."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextctrl.cpp:2705
+msgid "The text couldn't be saved."
+msgstr "Το κείμενο δεν μπόρεσε να αποθυκευτεί."
+
+#: ../src/richtext/richtextmarginspage.cpp:243
+#: ../src/richtext/richtextmarginspage.cpp:245
+#, fuzzy
+msgid "The top margin size."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextmarginspage.cpp:357
+#: ../src/richtext/richtextmarginspage.cpp:359
+#, fuzzy
+msgid "The top padding size."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/richtext/richtextsizepage.cpp:569
+#: ../src/richtext/richtextsizepage.cpp:571
+#: ../src/richtext/richtextsizepage.cpp:583
+#: ../src/richtext/richtextsizepage.cpp:585
+#, fuzzy
+msgid "The top position."
+msgstr "Το μέγεθος κουκίδας γραμματοσειράς"
+
+#: ../src/common/cmdline.cpp:1061
+#, c-format
+msgid "The value for the option '%s' must be specified."
+msgstr "Η τιμή για την επιλογή '%s' πρέπει να προσδιοριστεί,"
+
+#: ../src/msw/dialup.cpp:452
+#, fuzzy, c-format
+msgid ""
+"The version of remote access service (RAS) installed on this machine is too "
+"old, please upgrade (the following required function is missing: %s)."
+msgstr ""
+"Η εγκατεστημένη σε αυτό το μηχάνημα υπηρεσία απομακρυσμένης πρόσβασης "
+"(remote access service, RAS) είναι πολύ παλία, παρακαλώ αναβαθμίστε (η "
+"ακόλουθη απαραίτητη συνάρτηση λείπει: %s)."
+
+#: ../src/gtk/print.cpp:959
+msgid "The wxGtkPrinterDC cannot be used."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1340
+msgid "There is no column or renderer for the specified column index."
+msgstr ""
+
+#: ../src/richtext/richtextprint.cpp:614 ../src/html/htmprint.cpp:735
+msgid ""
+"There was a problem during page setup: you may need to set a default printer."
+msgstr ""
+"Υπήρξε πρόβλημα κατά την διάρκεια οργάνωσης δελίδας (page setup): ίσως να "
+"χρειαστεί να θέσετε έναν προεπιλεγμένο (default) εκτυπωτή."
+
+#: ../src/html/htmprint.cpp:255
+msgid ""
+"This document doesn't fit on the page horizontally and will be truncated "
+"when it is printed."
+msgstr ""
+
+#: ../src/common/image.cpp:2716
+#, fuzzy, c-format
+msgid "This is not a %s."
+msgstr "PCX: αυτό δεν είναι αρχείο PCX."
+
+#: ../src/common/wincmn.cpp:1653
+msgid "This platform does not support background transparency."
+msgstr ""
+
+#: ../src/gtk/window.cpp:4317
+msgid ""
+"This program was compiled with a too old version of GTK+, please rebuild "
+"with GTK+ 2.12 or newer."
+msgstr ""
+
+#: ../src/msw/datecontrols.cpp:59
+msgid ""
+"This system doesn't support date controls, please upgrade your version of "
+"comctl32.dll"
+msgstr ""
+
+#: ../src/msw/thread.cpp:1300
+msgid ""
+"Thread module initialization failed: cannot store value in thread local "
+"storage"
+msgstr ""
+"Η αρχικοποίηση μονάδας νήματος εκτέλεσης (thread module) απέτυχε: αδύνατη η "
+"αποθήκευση τιμής στην τοπική αποθήκευση νήματος (thread local storage)"
+
+#: ../src/unix/threadpsx.cpp:1758
+msgid "Thread module initialization failed: failed to create thread key"
+msgstr ""
+"Η αρχικοποίηση μονάδας νήματος εκτέλεσης (thread module) απέτυχε: αποτυχία "
+"δημιουργίας κλειδιού νήματος (thread key)"
+
+#: ../src/msw/thread.cpp:1288
+msgid ""
+"Thread module initialization failed: impossible to allocate index in thread "
+"local storage"
+msgstr ""
+"Η αρχικοποίηση μονάδας νήματος εκτέλεσης (thread module) απέτυχε: αδύνατο να "
+"δεσμευτεί (allocate) δείκτης (index) στην στην τοπική αποθήκευση νήματος "
+"(thread local storage)"
+
+#: ../src/unix/threadpsx.cpp:1038
+msgid "Thread priority setting is ignored."
+msgstr "Η ρύθμιση προτεραιότητας του νήματος εκτέλεσης (thread) αγνοήθηκε. "
+
+#: ../src/msw/mdi.cpp:172
+msgid "Tile &Horizontally"
+msgstr "Οριζόντια παράθεση"
+
+#: ../src/msw/mdi.cpp:173
+msgid "Tile &Vertically"
+msgstr "Κατακόρυφη παράθεση"
+
+#: ../src/common/ftp.cpp:202
+msgid "Timeout while waiting for FTP server to connect, try passive mode."
+msgstr ""
+"Τέλος χρόνου κατά την αναμονή για την σύνδεση στον διακομιστή FTP, δοκιμάστε "
+"σε passive mode."
+
+#: ../src/os2/timer.cpp:99
+msgid "Timer creation failed."
+msgstr "Η δημιουργία timer απέτυχε."
+
+#: ../src/generic/tipdlg.cpp:220
+msgid "Tip of the Day"
+msgstr "Tip της Ημέρας"
+
+#: ../src/generic/tipdlg.cpp:154
+msgid "Tips not available, sorry!"
+msgstr "Το Tip δεν είναι διαθέσιμο, συγγνώμη!"
+
+#: ../src/generic/prntdlgg.cpp:242
+msgid "To:"
+msgstr "Πρός:"
+
+#: ../src/osx/carbon/dataview.cpp:2451
+msgid "Toggle renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:7983
+msgid "Too many EndStyle calls!"
+msgstr ""
+
+#: ../src/common/imagpng.cpp:286
+msgid "Too many colours in PNG, the image may be slightly blurred."
+msgstr "Πάρα πολλά χρώματα στο PNG, η εικόνα μπορεί να είναι λίγο θολή."
+
+#: ../src/richtext/richtextsizepage.cpp:286
+#: ../src/richtext/richtextsizepage.cpp:290 ../src/common/stockitem.cpp:200
+#, fuzzy
+msgid "Top"
+msgstr "Πρός:"
+
+#: ../src/generic/prntdlgg.cpp:881
+msgid "Top margin (mm):"
+msgstr "Πάνω περιθώριο (mm)"
+
+#: ../src/generic/aboutdlgg.cpp:79
+msgid "Translations by "
+msgstr ""
+
+#: ../src/generic/aboutdlgg.cpp:188
+msgid "Translators"
+msgstr ""
+
+#: ../src/propgrid/propgrid.cpp:173
+msgid "True"
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:227
+#, c-format
+msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!"
+msgstr ""
+"Προσπάθεια απομάκρυνσης αρχείου '%s' από VFS μνήμης, αλλά δεν είναι "
+"φορτωμένο!"
+
+#: ../src/common/fmapbase.cpp:156
+msgid "Turkish (ISO-8859-9)"
+msgstr "Τουρκικό (ISO-8859-9)"
+
+#: ../src/generic/filectrlg.cpp:461
+msgid "Type"
+msgstr "Τύπος"
+
+#: ../src/richtext/richtextfontpage.cpp:160
+#: ../src/richtext/richtextfontpage.cpp:162
+#, fuzzy
+msgid "Type a font name."
+msgstr "Η οικογένεια της γραμματοσειρας."
+
+#: ../src/richtext/richtextfontpage.cpp:175
+#: ../src/richtext/richtextfontpage.cpp:177
+msgid "Type a size in points."
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:665
+#, c-format
+msgid "Type mismatch in argument %u."
+msgstr ""
+
+#: ../src/common/xtixml.cpp:356 ../src/common/xtixml.cpp:509
+#: ../src/common/xtistrm.cpp:322
+msgid "Type must have enum - long conversion"
+msgstr "Ο τύπος πρέπει να έχει μετατροπή enum - long"
+
+#: ../src/propgrid/propgridiface.cpp:382
+#, c-format
+msgid ""
+"Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT "
+"\"%s\"."
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:58
+msgid "UP"
+msgstr ""
+
+#: ../src/common/paper.cpp:134
+msgid "US Std Fanfold, 14 7/8 x 11 in"
+msgstr "US Std Fanfold, 14 7/8 x 11 ίντσες"
+
+#: ../src/common/fmapbase.cpp:196
+#, fuzzy
+msgid "US-ASCII"
+msgstr "ASCII"
+
+#: ../src/unix/fswatcher_inotify.cpp:109
+msgid "Unable to add inotify watch"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:136
+msgid "Unable to add kqueue watch"
+msgstr ""
+
+#: ../include/wx/msw/private/fswatcher.h:142
+msgid "Unable to associate handle with I/O completion port"
+msgstr ""
+
+#: ../include/wx/msw/private/fswatcher.h:125
+#, fuzzy
+msgid "Unable to close I/O completion port handle"
+msgstr "Αποτυχία κλεισίματος του χειριστηρίου του αρχείου(file handle)"
+
+#: ../src/unix/fswatcher_inotify.cpp:97
+#, fuzzy
+msgid "Unable to close inotify instance"
+msgstr "Αποτυχία κλεισίματος του χειριστηρίου του αρχείου(file handle)"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:74
+#, fuzzy, c-format
+msgid "Unable to close path '%s'"
+msgstr "Αποτυχία κλεισίματος του αρχείου 'κλειδωνιά'(lock file) '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:48
+#, fuzzy, c-format
+msgid "Unable to close the handle for '%s'"
+msgstr "Αποτυχία κλεισίματος του χειριστηρίου του αρχείου(file handle)"
+
+#: ../include/wx/msw/private/fswatcher.h:240
+#, fuzzy
+msgid "Unable to create I/O completion port"
+msgstr "Αποτυχία δημιουργίας δείκτη."
+
+#: ../src/msw/fswatcher.cpp:84
+#, fuzzy
+msgid "Unable to create IOCP worker thread"
+msgstr "Αποτυχία δημιουργίας ενός γονεικού περιγράμματος (parent frame) MDI."
+
+#: ../src/unix/fswatcher_inotify.cpp:74
+#, fuzzy
+msgid "Unable to create inotify instance"
+msgstr "Απέτυχε η δημιουργεία ενός DDE αλφαρηθμιτικού (string)"
+
+#: ../src/unix/fswatcher_kqueue.cpp:97
+#, fuzzy
+msgid "Unable to create kqueue instance"
+msgstr "Απέτυχε η δημιουργεία ενός DDE αλφαρηθμιτικού (string)"
+
+#: ../include/wx/msw/private/fswatcher.h:229
+msgid "Unable to dequeue completion packet"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:185
+msgid "Unable to get events from kqueue"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1903
+msgid "Unable to handle native drag&drop data"
+msgstr ""
+
+#: ../src/gtk/app.cpp:439
+msgid "Unable to initialize GTK+, is DISPLAY set properly?"
+msgstr ""
+
+#: ../src/gtk/app.cpp:276
+#, fuzzy
+msgid "Unable to initialize Hildon program"
+msgstr "Απέτυχε η αρχικοποίηση του OpenGL"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:57
+#, fuzzy, c-format
+msgid "Unable to open path '%s'"
+msgstr "Αποτυχία ανοίγματος του arxe;ioy CHM '%s'."
+
+#: ../src/html/htmlwin.cpp:561
+#, c-format
+msgid "Unable to open requested HTML document: %s"
+msgstr "Δεν είναι δυνατό το άνοιγμα εγγράφου HTML: %s"
+
+#: ../src/unix/sound.cpp:368
+msgid "Unable to play sound asynchronously."
+msgstr "Αδύνατη η ασύγχρονη αναπαραγωγή ήχου."
+
+#: ../include/wx/msw/private/fswatcher.h:207
+msgid "Unable to post completion status"
+msgstr ""
+
+#: ../src/unix/fswatcher_inotify.cpp:530
+#, fuzzy
+msgid "Unable to read from inotify descriptor"
+msgstr "αδύνατη η ανάγνωση από περiγραφέα (descriptor) αρχείου %d"
+
+#: ../src/unix/fswatcher_inotify.cpp:132
+msgid "Unable to remove inotify watch"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:153
+msgid "Unable to remove kqueue watch"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:168
+#, fuzzy, c-format
+msgid "Unable to set up watch for '%s'"
+msgstr "Αποτυχία αγγίγματος (touch) του αρχείου '%s'"
+
+#: ../src/msw/fswatcher.cpp:91
+msgid "Unable to start IOCP worker thread"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:201
+msgid "Undelete"
+msgstr "Αναίρεση διαγραφής"
+
+#: ../src/common/stockitem.cpp:202
+#, fuzzy
+msgid "Underline"
+msgstr "&Υπογράμμιση"
+
+#: ../src/richtext/richtextfontpage.cpp:341 ../src/osx/carbon/fontdlg.cpp:556
+#: ../src/propgrid/advprops.cpp:655
+#, fuzzy
+msgid "Underlined"
+msgstr "&Υπογράμμιση"
+
+#: ../src/common/stockitem.cpp:203 ../src/stc/stc_i18n.cpp:15
+#, fuzzy
+msgid "Undo"
+msgstr "&Αναίρεση"
+
+#: ../src/common/stockitem.cpp:265
+msgid "Undo last action"
+msgstr ""
+
+#: ../src/common/cmdline.cpp:864
+#, fuzzy, c-format
+msgid "Unexpected characters following option '%s'."
+msgstr "Απροσδόκητη παράμετρος '%s'"
+
+#: ../src/unix/fswatcher_inotify.cpp:261
+#, c-format
+msgid "Unexpected event for \"%s\": no matching watch descriptor."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1024
+#, c-format
+msgid "Unexpected parameter '%s'"
+msgstr "Απροσδόκητη παράμετρος '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:148
+msgid "Unexpectedly new I/O completion port was created"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:70
+#, fuzzy
+msgid "Ungraceful worker thread termination"
+msgstr ""
+"Δεν είναι δυνατή η αναμονή(wait) για τον τερματισμό του νήματος εκτέλεσης"
+"(thread)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:459
+#: ../src/richtext/richtextsymboldlg.cpp:460
+#: ../src/richtext/richtextsymboldlg.cpp:461
+#, fuzzy
+msgid "Unicode"
+msgstr "Α&ποστοίχιση"
+
+#: ../src/common/fmapbase.cpp:185 ../src/common/fmapbase.cpp:191
+msgid "Unicode 16 bit (UTF-16)"
+msgstr "Unicode 16 bit (UTF-16)"
+
+#: ../src/common/fmapbase.cpp:190
+msgid "Unicode 16 bit Big Endian (UTF-16BE)"
+msgstr "Unicode 16 bit Big Endian (UTF-16BE)"
+
+#: ../src/common/fmapbase.cpp:186
+msgid "Unicode 16 bit Little Endian (UTF-16LE)"
+msgstr "Unicode 16 bit Little Endian (UTF-16LE)"
+
+#: ../src/common/fmapbase.cpp:187 ../src/common/fmapbase.cpp:193
+msgid "Unicode 32 bit (UTF-32)"
+msgstr "Unicode 32 bit (UTF-32)"
+
+#: ../src/common/fmapbase.cpp:192
+msgid "Unicode 32 bit Big Endian (UTF-32BE)"
+msgstr "Unicode 32 bit Big Endian (UTF-32BE)"
+
+#: ../src/common/fmapbase.cpp:188
+msgid "Unicode 32 bit Little Endian (UTF-32LE)"
+msgstr "Unicode 32 bit Little Endian (UTF-32LE)"
+
+#: ../src/common/fmapbase.cpp:182
+msgid "Unicode 7 bit (UTF-7)"
+msgstr "Unicode 7 bit (UTF-7)"
+
+#: ../src/common/fmapbase.cpp:183
+msgid "Unicode 8 bit (UTF-8)"
+msgstr "Unicode 8 bit (UTF-8)"
+
+#: ../src/common/stockitem.cpp:204
+#, fuzzy
+msgid "Unindent"
+msgstr "Α&ποστοίχιση"
+
+#: ../src/richtext/richtextborderspage.cpp:373
+#: ../src/richtext/richtextborderspage.cpp:375
+msgid "Units for the bottom border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:278
+#: ../src/richtext/richtextmarginspage.cpp:280
+msgid "Units for the bottom margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:517
+#: ../src/richtext/richtextborderspage.cpp:519
+msgid "Units for the bottom outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:392
+#: ../src/richtext/richtextmarginspage.cpp:394
+msgid "Units for the bottom padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:664
+#: ../src/richtext/richtextsizepage.cpp:666
+#, fuzzy
+msgid "Units for the bottom position."
+msgstr ""
+"Δεν είναι δυνατή η αναμονή(wait) για τον τερματισμό του νήματος εκτέλεσης"
+"(thread)"
+
+#: ../src/richtext/richtextborderspage.cpp:283
+#: ../src/richtext/richtextborderspage.cpp:285
+msgid "Units for the left border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:205
+#: ../src/richtext/richtextmarginspage.cpp:207
+msgid "Units for the left margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:427
+#: ../src/richtext/richtextborderspage.cpp:429
+msgid "Units for the left outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:319
+#: ../src/richtext/richtextmarginspage.cpp:321
+msgid "Units for the left padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:559
+#: ../src/richtext/richtextsizepage.cpp:561
+#, fuzzy
+msgid "Units for the left position."
+msgstr ""
+"Δεν είναι δυνατή η αναμονή(wait) για τον τερματισμό του νήματος εκτέλεσης"
+"(thread)"
+
+#: ../src/richtext/richtextsizepage.cpp:485
+#: ../src/richtext/richtextsizepage.cpp:487
+#, fuzzy
+msgid "Units for the maximum object height."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextsizepage.cpp:458
+#: ../src/richtext/richtextsizepage.cpp:460
+#, fuzzy
+msgid "Units for the maximum object width."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextsizepage.cpp:431
+#: ../src/richtext/richtextsizepage.cpp:433
+#, fuzzy
+msgid "Units for the minimum object height."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextsizepage.cpp:404
+#: ../src/richtext/richtextsizepage.cpp:406
+#, fuzzy
+msgid "Units for the minimum object width."
+msgstr "Το βάρος της γραμματοσειράς."
+
+#: ../src/richtext/richtextsizepage.cpp:377
+#: ../src/richtext/richtextsizepage.cpp:379
+msgid "Units for the object height."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:343
+#: ../src/richtext/richtextsizepage.cpp:345
+msgid "Units for the object width."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:313
+#: ../src/richtext/richtextborderspage.cpp:315
+msgid "Units for the right border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:230
+#: ../src/richtext/richtextmarginspage.cpp:232
+msgid "Units for the right margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:457
+#: ../src/richtext/richtextborderspage.cpp:459
+msgid "Units for the right outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:344
+#: ../src/richtext/richtextmarginspage.cpp:346
+msgid "Units for the right padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:629
+#: ../src/richtext/richtextsizepage.cpp:631
+#, fuzzy
+msgid "Units for the right position."
+msgstr ""
+"Δεν είναι δυνατή η αναμονή(wait) για τον τερματισμό του νήματος εκτέλεσης"
+"(thread)"
+
+#: ../src/richtext/richtextborderspage.cpp:343
+#: ../src/richtext/richtextborderspage.cpp:345
+msgid "Units for the top border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:253
+#: ../src/richtext/richtextmarginspage.cpp:255
+#, fuzzy
+msgid "Units for the top margin."
+msgstr ""
+"Δεν είναι δυνατή η αναμονή(wait) για τον τερματισμό του νήματος εκτέλεσης"
+"(thread)"
+
+#: ../src/richtext/richtextborderspage.cpp:487
+#: ../src/richtext/richtextborderspage.cpp:489
+msgid "Units for the top outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:367
+#: ../src/richtext/richtextmarginspage.cpp:369
+msgid "Units for the top padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:594
+#: ../src/richtext/richtextsizepage.cpp:596
+#, fuzzy
+msgid "Units for the top position."
+msgstr ""
+"Δεν είναι δυνατή η αναμονή(wait) για τον τερματισμό του νήματος εκτέλεσης"
+"(thread)"
+
+#: ../src/generic/progdlgg.cpp:382 ../src/generic/progdlgg.cpp:655
+#, fuzzy
+msgid "Unknown"
+msgstr "άγνωστο"
+
+#: ../src/msw/dde.cpp:1177
+#, c-format
+msgid "Unknown DDE error %08x"
+msgstr "’γνωστο σφάλμα DDE %08x"
+
+#: ../src/common/xtistrm.cpp:414
+msgid "Unknown Object passed to GetObjectClassInfo"
+msgstr "’γνωστο αντικείμενο δόθηκε στην GetObjectClassInfo"
+
+#: ../src/common/imagpng.cpp:614
+#, fuzzy, c-format
+msgid "Unknown PNG resolution unit %d"
+msgstr "’γνωστη επιλογή '%s'"
+
+#: ../src/common/xtixml.cpp:327
+#, fuzzy, c-format
+msgid "Unknown Property %s"
+msgstr "’γνωστη Ιδιότητα %s"
+
+#: ../src/common/imagtiff.cpp:532
+#, c-format
+msgid "Unknown TIFF resolution unit %d ignored"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1978
+#, fuzzy
+msgid "Unknown data format"
+msgstr "σφάλμα στη μορφή των δεδομένων"
+
+#: ../src/unix/dlunix.cpp:325
+msgid "Unknown dynamic library error"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:810
+#, c-format
+msgid "Unknown encoding (%d)"
+msgstr "’γνωστη κωδικοποίηση (%d)"
+
+#: ../src/msw/ole/automtn.cpp:677
+#, fuzzy, c-format
+msgid "Unknown error %08x"
+msgstr "’γνωστο σφάλμα DDE %08x"
+
+#: ../src/msw/ole/automtn.cpp:636
+#, fuzzy
+msgid "Unknown exception"
+msgstr "’γνωστη επιλογή '%s'"
+
+#: ../src/common/image.cpp:2701
+#, fuzzy
+msgid "Unknown image data format."
+msgstr "σφάλμα στη μορφή των δεδομένων"
+
+#: ../src/common/cmdline.cpp:749
+#, c-format
+msgid "Unknown long option '%s'"
+msgstr "’γνωστη επιλογή long '%s'"
+
+#: ../src/msw/ole/automtn.cpp:620
+msgid "Unknown name or named argument."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:764 ../src/common/cmdline.cpp:786
+#, c-format
+msgid "Unknown option '%s'"
+msgstr "’γνωστη επιλογή '%s'"
+
+#: ../src/common/mimecmn.cpp:230
+#, c-format
+msgid "Unmatched '{' in an entry for mime type %s."
+msgstr "Αταίριαστο '{' σε μία είσοδο (entry) για τον τύπο mime %s."
+
+#: ../src/common/cmdproc.cpp:262 ../src/common/cmdproc.cpp:288
+#: ../src/common/cmdproc.cpp:308
+msgid "Unnamed command"
+msgstr "Ανώνυμη εντολή"
+
+#: ../src/propgrid/propgrid.cpp:398
+#, fuzzy
+msgid "Unspecified"
+msgstr "Ευθυγραμμισμένα"
+
+#: ../src/msw/clipbrd.cpp:271 ../src/msw/clipbrd.cpp:439
+msgid "Unsupported clipboard format."
+msgstr "Δεν υποστηρίζεται ο τύπος προχείρου(clipboard format)."
+
+#: ../src/common/appcmn.cpp:249
+#, c-format
+msgid "Unsupported theme '%s'."
+msgstr "Το θέμα '%s' δεν υποστηρίζεται."
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:205
+msgid "Up"
+msgstr "Επάνω"
+
+#: ../src/richtext/richtextliststylepage.cpp:483
+#: ../src/richtext/richtextbulletspage.cpp:288
+msgid "Upper case letters"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:485
+#: ../src/richtext/richtextbulletspage.cpp:290
+msgid "Upper case roman numerals"
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1155
+#, c-format
+msgid "Usage: %s"
+msgstr "Χρήση: %s"
+
+#: ../src/richtext/richtextindentspage.cpp:169
+#: ../src/richtext/richtextindentspage.cpp:171
+#: ../src/richtext/richtextliststylepage.cpp:358
+#: ../src/richtext/richtextliststylepage.cpp:360
+msgid "Use the current alignment setting."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:2658 ../src/osx/carbon/dataview.cpp:2723
+msgid "Valid pointer to native data view control does not exist"
+msgstr ""
+
+#: ../src/common/valtext.cpp:174
+msgid "Validation conflict"
+msgstr "Σύγκρουση επικύρωσης (validation conflict)"
+
+#: ../src/propgrid/manager.cpp:238
+msgid "Value"
+msgstr ""
+
+#: ../src/propgrid/props.cpp:384
+#, c-format
+msgid "Value must be %s or higher."
+msgstr ""
+
+#: ../src/propgrid/props.cpp:411
+#, c-format
+msgid "Value must be %s or less."
+msgstr ""
+
+#: ../src/propgrid/props.cpp:388 ../src/propgrid/props.cpp:415
+#, fuzzy, c-format
+msgid "Value must be between %s and %s."
+msgstr "Δώστε έναν αριθμό σελίδας μεταξύ %d και %d:"
+
+#: ../src/generic/aboutdlgg.cpp:128
+#, fuzzy
+msgid "Version "
+msgstr "Δικαιώματα"
+
+#: ../src/richtext/richtextsizepage.cpp:291
+#: ../src/richtext/richtextsizepage.cpp:293
+#, fuzzy
+msgid "Vertical alignment."
+msgstr "Δεν ήταν δυνατή η εκκίνηση της εκτύπωσης."
+
+#: ../src/generic/filedlgg.cpp:216
+msgid "View files as a detailed view"
+msgstr "Εμφάνιση αρχείων σε προβολή με λεπτομέρειες"
+
+#: ../src/generic/filedlgg.cpp:214
+msgid "View files as a list view"
+msgstr "Εμφάνιση αρχείων σε προβολή λίστας"
+
+#: ../src/common/docview.cpp:1952
+msgid "Views"
+msgstr "Προβολές"
+
+#: ../src/common/accelcmn.cpp:108
+msgid "WINDOWS_LEFT"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:110
+msgid "WINDOWS_MENU"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:109
+msgid "WINDOWS_RIGHT"
+msgstr ""
+
+#: ../src/unix/epolldispatcher.cpp:213
+#, fuzzy, c-format
+msgid "Waiting for IO on epoll descriptor %d failed"
+msgstr "Η αναμονή για τον τερματισμό υπο-διεργασίας (subprocess) απέτυχε"
+
+#: ../src/common/log.cpp:227
+msgid "Warning: "
+msgstr "Προειδοποίηση: "
+
+#: ../src/propgrid/advprops.cpp:651
+#, fuzzy
+msgid "Weight"
+msgstr "&Βάρος:"
+
+#: ../src/common/fmapbase.cpp:148
+msgid "Western European (ISO-8859-1)"
+msgstr "Δυτικο-Ευρωπαϊκό (ISO-8859-1)"
+
+#: ../src/common/fmapbase.cpp:162
+msgid "Western European with Euro (ISO-8859-15)"
+msgstr "Δυτικο-Ευρωπαϊκό με Euro (ISO-8859-15)"
+
+#: ../src/generic/fontdlgg.cpp:446 ../src/generic/fontdlgg.cpp:448
+msgid "Whether the font is underlined."
+msgstr "Επιλογή εαν η γραμματοσειρά είναι υπογραμμισμένη ή όχι."
+
+#: ../src/generic/fdrepdlg.cpp:144
+msgid "Whole word"
+msgstr "Ολόκληρη λέξη"
+
+#: ../src/html/helpwnd.cpp:547
+msgid "Whole words only"
+msgstr "Ολόκληρες λέξεις μόνο"
+
+#: ../src/univ/themes/win32.cpp:1102
+msgid "Win32 theme"
+msgstr "Win32 θέμα"
+
+#: ../src/msw/utils.cpp:1220
+msgid "Win32s on Windows 3.1"
+msgstr "Win32s σε Windows 3.1"
+
+#: ../src/msw/utils.cpp:1270
+#, fuzzy
+msgid "Windows 2000"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1302
+#, fuzzy
+msgid "Windows 7"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1234
+msgid "Windows 95"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1230
+msgid "Windows 95 OSR2"
+msgstr "Windows 95 OSR2"
+
+#: ../src/msw/utils.cpp:1245
+msgid "Windows 98"
+msgstr "Windows 98"
+
+#: ../src/msw/utils.cpp:1241
+msgid "Windows 98 SE"
+msgstr "Windows 98 SE"
+
+#: ../src/msw/utils.cpp:1252
+#, c-format
+msgid "Windows 9x (%d.%d)"
+msgstr "Windows 9x (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:177
+msgid "Windows Arabic (CP 1256)"
+msgstr "Windows Αραβικό (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:178
+msgid "Windows Baltic (CP 1257)"
+msgstr "Windows Βαλτικό (CP 1257)"
+
+#: ../src/msw/utils.cpp:1214
+#, fuzzy, c-format
+msgid "Windows CE (%d.%d)"
+msgstr "Windows 9x (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:171
+msgid "Windows Central European (CP 1250)"
+msgstr "Windows Κεντρο-Ευρωπαϊκό (CP 1250)"
+
+#: ../src/common/fmapbase.cpp:168
+#, fuzzy
+msgid "Windows Chinese Simplified (CP 936) or GB-2312"
+msgstr "Windows Απλοποιημένο Κινέζικο (CP 936)"
+
+#: ../src/common/fmapbase.cpp:170
+#, fuzzy
+msgid "Windows Chinese Traditional (CP 950) or Big-5"
+msgstr "Windows Παραδοσιακό Κινέζικο (CP 950)"
+
+#: ../src/common/fmapbase.cpp:172
+msgid "Windows Cyrillic (CP 1251)"
+msgstr "Windows Κυριλικό (CP 1251)"
+
+#: ../src/common/fmapbase.cpp:174
+msgid "Windows Greek (CP 1253)"
+msgstr "Windows Ελληνικό (CP 1253)"
+
+#: ../src/common/fmapbase.cpp:176
+msgid "Windows Hebrew (CP 1255)"
+msgstr "Windows Εβραϊκό (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:167
+#, fuzzy
+msgid "Windows Japanese (CP 932) or Shift-JIS"
+msgstr "Windows Ιαπωνικό (CP 932)"
+
+#: ../src/common/fmapbase.cpp:180
+#, fuzzy
+msgid "Windows Johab (CP 1361)"
+msgstr "Windows Αραβικό (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:169
+msgid "Windows Korean (CP 949)"
+msgstr "Windows Κορεάτικο (CP 949)"
+
+#: ../src/msw/utils.cpp:1249
+msgid "Windows ME"
+msgstr "Windows ME"
+
+#: ../src/msw/utils.cpp:1310
+#, fuzzy, c-format
+msgid "Windows NT %lu.%lu"
+msgstr "Windows 9x (%d.%d)"
+
+#: ../src/msw/utils.cpp:1279
+#, fuzzy
+msgid "Windows Server 2003"
+msgstr "Windows Ελληνικό (CP 1253)"
+
+#: ../src/msw/utils.cpp:1295
+#, fuzzy
+msgid "Windows Server 2008"
+msgstr "Windows 98"
+
+#: ../src/msw/utils.cpp:1301
+#, fuzzy
+msgid "Windows Server 2008 R2"
+msgstr "Windows Εβραϊκό (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:166
+#, fuzzy
+msgid "Windows Thai (CP 874)"
+msgstr "Windows Βαλτικό (CP 1257)"
+
+#: ../src/common/fmapbase.cpp:175
+msgid "Windows Turkish (CP 1254)"
+msgstr "Windows Τουρκικό (CP 1254)"
+
+#: ../src/common/fmapbase.cpp:179
+#, fuzzy
+msgid "Windows Vietnamese (CP 1258)"
+msgstr "Windows Ελληνικό (CP 1253)"
+
+#: ../src/msw/utils.cpp:1296
+#, fuzzy
+msgid "Windows Vista"
+msgstr "Windows 95"
+
+#: ../src/common/fmapbase.cpp:173
+msgid "Windows Western European (CP 1252)"
+msgstr "Windows Δυτικο-Ευρωπαϊκό (CP 1252)"
+
+#: ../src/msw/utils.cpp:1285
+#, fuzzy
+msgid "Windows XP"
+msgstr "Windows 95"
+
+#: ../src/common/fmapbase.cpp:181
+msgid "Windows/DOS OEM (CP 437)"
+msgstr "Windows/DOS OEM (CP 437)"
+
+#: ../src/common/fmapbase.cpp:165
+#, fuzzy
+msgid "Windows/DOS OEM Cyrillic (CP 866)"
+msgstr "Windows Κυριλικό (CP 1251)"
+
+#: ../src/common/ffile.cpp:148
+#, c-format
+msgid "Write error on file '%s'"
+msgstr "Σφάλμα εγγραφής (write error) στο αρχείο '%s'"
+
+#: ../src/xml/xml.cpp:844
+#, c-format
+msgid "XML parsing error: '%s' at line %d"
+msgstr "XML σφάλμα ανάγνωσης (parsing error): '%s' στη γραμμή %d"
+
+#: ../src/common/xpmdecod.cpp:796
+msgid "XPM: Malformed pixel data!"
+msgstr "XPM: Κακοσχηματισμένα δεδομένα εικονοστοιχείων (pixel)!"
+
+#: ../src/common/xpmdecod.cpp:705
+#, fuzzy, c-format
+msgid "XPM: incorrect colour description in line %d"
+msgstr "XPM: κακοσχηματισμένος ορισμός χρώματος '%s'!"
+
+#: ../src/common/xpmdecod.cpp:680
+msgid "XPM: incorrect header format!"
+msgstr ""
+
+#: ../src/common/xpmdecod.cpp:716 ../src/common/xpmdecod.cpp:725
+#, fuzzy, c-format
+msgid "XPM: malformed colour definition '%s' at line %d!"
+msgstr "XPM: κακοσχηματισμένος ορισμός χρώματος '%s'!"
+
+#: ../src/common/xpmdecod.cpp:755
+msgid "XPM: no colors left to use for mask!"
+msgstr ""
+
+#: ../src/common/xpmdecod.cpp:782
+#, c-format
+msgid "XPM: truncated image data at line %d!"
+msgstr ""
+
+#: ../include/wx/msgdlg.h:271 ../src/common/stockitem.cpp:206
+#: ../src/motif/msgdlg.cpp:196
+msgid "Yes"
+msgstr "Ναι"
+
+#: ../src/osx/carbon/overlay.cpp:155
+#, fuzzy
+msgid "You cannot Clear an overlay that is not inited"
+msgstr "Δεν μπορείτε να προσθέσετε καινούργιο κατάλογο σε αυτό το τμήμα."
+
+#: ../src/osx/carbon/overlay.cpp:107 ../src/dfb/overlay.cpp:61
+msgid "You cannot Init an overlay twice"
+msgstr ""
+
+#: ../src/generic/dirdlgg.cpp:316
+msgid "You cannot add a new directory to this section."
+msgstr "Δεν μπορείτε να προσθέσετε καινούργιο κατάλογο σε αυτό το τμήμα."
+
+#: ../src/propgrid/propgrid.cpp:3258
+msgid "You have entered invalid value. Press ESC to cancel editing."
+msgstr ""
+
+#: ../src/common/stockitem.cpp:209
+msgid "Zoom &In"
+msgstr "&Αύξηση ζουμ"
+
+#: ../src/common/stockitem.cpp:210
+msgid "Zoom &Out"
+msgstr "&Ελάττωση ζουμ"
+
+#: ../src/common/stockitem.cpp:209 ../src/common/prntbase.cpp:1564
+#, fuzzy
+msgid "Zoom In"
+msgstr "&Αύξηση ζουμ"
+
+#: ../src/common/stockitem.cpp:210 ../src/common/prntbase.cpp:1550
+#, fuzzy
+msgid "Zoom Out"
+msgstr "&Ελάττωση ζουμ"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to &Fit"
+msgstr "Βέλτιστο ζουμ"
+
+#: ../src/common/stockitem.cpp:208
+#, fuzzy
+msgid "Zoom to Fit"
+msgstr "Βέλτιστο ζουμ"
+
+#: ../src/msw/dde.cpp:1144
+msgid "a DDEML application has created a prolonged race condition."
+msgstr "μια DDEML εφαρμογή έχει δημιουργήσει έναν παρατεταμένο race condition."
+
+#: ../src/msw/dde.cpp:1132
+msgid ""
+"a DDEML function was called without first calling the DdeInitialize "
+"function,\n"
+"or an invalid instance identifier\n"
+"was passed to a DDEML function."
+msgstr ""
+"μια συνάρτηση(function) DDEML κλήθηκε χώρις πρώτα να καλέσει την "
+"DdeInitialize συνάρτηση(function),\n"
+"ή ένα λανθασμένο αναγνωριστικό(identifier) instance\n"
+"δόθηκε σε μια DDEML συνάρτηση(function)."
+
+#: ../src/msw/dde.cpp:1150
+msgid "a client's attempt to establish a conversation has failed."
+msgstr ""
+"η προσπάθεια ενός πελάτη(client) να εδραιώσει(establish) μία συνδιάλεξη"
+"(conversation) απέτυχε."
+
+#: ../src/msw/dde.cpp:1147
+msgid "a memory allocation failed."
+msgstr "μία προσπάθεια δέσμευσης (allocation) μνήμης απέτυχε."
+
+#: ../src/msw/dde.cpp:1141
+msgid "a parameter failed to be validated by the DDEML."
+msgstr "απέτυχε η επικύρωση μιας παραμέτρου από το DDEML."
+
+#: ../src/msw/dde.cpp:1123
+msgid "a request for a synchronous advise transaction has timed out."
+msgstr ""
+"μία αίτηση για σύγχρονη(synchronous) ενημερωτική(advise) συναλλαγή"
+"(transaction) ξεπέρασε το χρονικό περιθώριο (timed out)"
+
+#: ../src/msw/dde.cpp:1129
+msgid "a request for a synchronous data transaction has timed out."
+msgstr ""
+"μία αίτηση για σύγχρονη(synchronous) συναλλαγή(transaction) δεδομένων(data) "
+"ξεπέρασε το χρονικό περιθώριο (timed out)"
+
+#: ../src/msw/dde.cpp:1138
+msgid "a request for a synchronous execute transaction has timed out."
+msgstr ""
+"μία αίτηση για σύγχρονη(synchronous) συναλλαγή(transaction) εκτέλεσης"
+"(execute) ξεπέρασε το χρονικό περιθώριο (timed out)"
+
+#: ../src/msw/dde.cpp:1156
+msgid "a request for a synchronous poke transaction has timed out."
+msgstr ""
+"μία αίτηση για σύγχρονη(synchronous) poke συναλλαγή(transaction) ξεπέρασε το "
+"χρονικό περιθώριο (timed out)"
+
+#: ../src/msw/dde.cpp:1171
+msgid "a request to end an advise transaction has timed out."
+msgstr ""
+"μία αίτηση για τερματισμό μιας ενημερωτικής(advise) συναλλαγής(transaction) "
+"ξεπέρασε το χρονικό περιθώριο (timed out)"
+
+#: ../src/msw/dde.cpp:1165
+msgid ""
+"a server-side transaction was attempted on a conversation\n"
+"that was terminated by the client, or the server\n"
+"terminated before completing a transaction."
+msgstr ""
+"αποπειράθηκε μια συναλλαγη στη μεριά του εξυπηρετητή (server-side) σε μια "
+"συνδίαλεξη (conversation)\n"
+"που είχε τερματιστεί από τον πελάτη(client), ή ο εξυπηρετητής (server)\n"
+"τερμάτισε πριν ολοκληρωθεί μια συναλλαγή( transaction)."
+
+#: ../src/msw/dde.cpp:1153
+msgid "a transaction failed."
+msgstr "μία συναλλαγή (transaction) απέτυχε."
+
+#: ../src/common/accelcmn.cpp:184
+msgid "alt"
+msgstr "alt"
+
+#: ../src/msw/dde.cpp:1135
+msgid ""
+"an application initialized as APPCLASS_MONITOR has\n"
+"attempted to perform a DDE transaction,\n"
+"or an application initialized as APPCMD_CLIENTONLY has \n"
+"attempted to perform server transactions."
+msgstr ""
+"μία εφαρμογή που αρχικοποιήθηκε ως APPCLASS_MONITOR\n"
+"προσπάθησε να κάνει μια συναλλαγή (transaction) DDE,\n"
+"ή μία εφαρμογή που αρχικοποιήθηκε ως APPCMD_CLIENTONLY\n"
+"προσπάθησε να κάνει συναλλαγές εξυπηρετητή (server transactions)."
+
+#: ../src/msw/dde.cpp:1159
+msgid "an internal call to the PostMessage function has failed. "
+msgstr "μία εσωτερική κλήση στην συνάρτηση (function) PostMessage απέτυχε."
+
+#: ../src/msw/dde.cpp:1168
+msgid "an internal error has occurred in the DDEML."
+msgstr "ένα εσωτερικό λάθος συνέβη στο DDEML."
+
+#: ../src/msw/dde.cpp:1174
+msgid ""
+"an invalid transaction identifier was passed to a DDEML function.\n"
+"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n"
+"the transaction identifier for that callback is no longer valid."
+msgstr ""
+"ένα λανθασμένο αναγνωριστικό(identifier) συναλλαγής(transaction) δώθηκε σε "
+"μία DDEML συνάρτηση(function).\n"
+"Όταν η εφαρμογή επιστρέψει από ένα XTYP_XACT_COMPLETE callback,\n"
+"το αναγνωριστικό συναλλαγής για εκείνο το callback δεν θα είναι πλέον έγκυρο."
+
+#: ../src/common/zipstrm.cpp:1272
+msgid "assuming this is a multi-part zip concatenated"
+msgstr ""
+
+#: ../src/common/fileconf.cpp:1882
+#, c-format
+msgid "attempt to change immutable key '%s' ignored."
+msgstr "η προσπάθεια αλλαγής αμετάβλητου κλειδιού '%s' αγνοήθηκε."
+
+#: ../src/html/chm.cpp:329
+msgid "bad arguments to library function"
+msgstr "λανθασμένες παράμετροι σε συνάρτηση βιβλιοθήκης"
+
+#: ../src/html/chm.cpp:341
+msgid "bad signature"
+msgstr "κακή σήμανση"
+
+#: ../src/common/zipstrm.cpp:1715
+msgid "bad zipfile offset to entry"
+msgstr ""
+
+#: ../src/common/ftp.cpp:405
+msgid "binary"
+msgstr "δυαδικό"
+
+#: ../src/common/fontcmn.cpp:978
+msgid "bold"
+msgstr "έντονο"
+
+#: ../src/os2/iniconf.cpp:463
+msgid "buffer is too small for Windows directory."
+msgstr ""
+
+#: ../src/msw/utils.cpp:1316
+#, c-format
+msgid "build %lu"
+msgstr ""
+
+#: ../src/common/ffile.cpp:79
+#, c-format
+msgid "can't close file '%s'"
+msgstr "δεν είναι δυνατό το κλείσιμο του αρχείου '%s'"
+
+#: ../src/common/file.cpp:278
+#, c-format
+msgid "can't close file descriptor %d"
+msgstr "αδύνατο το κλείσιμο περιγραφέα (descriptor) αρχείου %d"
+
+#: ../src/common/file.cpp:604
+#, c-format
+msgid "can't commit changes to file '%s'"
+msgstr "αδύνατη η δέσμευση των αλλαγών στο αρχείο '%s'"
+
+#: ../src/common/file.cpp:212
+#, c-format
+msgid "can't create file '%s'"
+msgstr "δεν είναι δυνατή η δημιουργία του αρχείου '%s'"
+
+#: ../src/common/fileconf.cpp:1176
+#, c-format
+msgid "can't delete user configuration file '%s'"
+msgstr "Δεν είναι δυνατή η διαγραφή του αρχείου ρυθμίσεων '%s' του χρήστη"
+
+#: ../src/common/file.cpp:511
+#, c-format
+msgid "can't determine if the end of file is reached on descriptor %d"
+msgstr ""
+"αδύνατο να καθοριστεί εαν το τέλος αρχείου του έχει φτάσει στο περιγραφέα "
+"(descriptor) %d"
+
+#: ../src/msdos/utilsdos.cpp:310 ../src/msdos/utilsdos.cpp:475
+#, fuzzy, c-format
+msgid "can't execute '%s'"
+msgstr "Αποτυχία εκτέλεσης του '%s'\n"
+
+#: ../src/common/zipstrm.cpp:1490
+msgid "can't find central directory in zip"
+msgstr ""
+"Δεν είναι δυνατή η εύρεση του κεντρικού καταλόγου στο συμπιεσμένο αρχείο"
+
+#: ../src/common/file.cpp:481
+#, c-format
+msgid "can't find length of file on file descriptor %d"
+msgstr ""
+"αδύνατη η εύρεση του μεγέθους αρχείου στον περιγραφέα αρχείου (file "
+"desciptor) %d"
+
+#: ../src/msw/utils.cpp:373
+msgid "can't find user's HOME, using current directory."
+msgstr ""
+"αδύνατη η εύρεση του HOME του χρήστη, γίνεται χρήση τρέχοντος καταλόγου."
+
+#: ../src/common/file.cpp:382
+#, c-format
+msgid "can't flush file descriptor %d"
+msgstr ""
+"δεν μπορεί να πραγματοποιηθεί το άδειασμα (flush) του περιγραφέα αρχείου %d"
+
+#: ../src/common/file.cpp:438 ../src/msw/wince/filefnwce.cpp:204
+#, c-format
+msgid "can't get seek position on file descriptor %d"
+msgstr ""
+"αδύνατη η λήψη θέσης αναζήτησης (seek position) στον περιγραφέα(descriptor) "
+"αρχείου %d"
+
+#: ../src/common/fontmap.cpp:325
+msgid "can't load any font, aborting"
+msgstr "αδύνατη η φόρτωση οποιασδήποτε γραμματοσειράς, γίνεται ματαίωση"
+
+#: ../src/common/file.cpp:264 ../src/common/ffile.cpp:63
+#, c-format
+msgid "can't open file '%s'"
+msgstr "δεν είναι δυνατό το άνοιγμα του αρχείου '%s'"
+
+#: ../src/common/fileconf.cpp:351
+#, c-format
+msgid "can't open global configuration file '%s'."
+msgstr "δεν είναι δυνατό το άνοιγμα του γενικού(global) αρχείου ρυθμίσεων %s"
+
+#: ../src/common/fileconf.cpp:367
+#, c-format
+msgid "can't open user configuration file '%s'."
+msgstr "δεν είναι δυνατό το άνοιγμα του αρχείου ρυθμίσεων '%s' του χρήστη"
+
+#: ../src/common/fileconf.cpp:1017
+msgid "can't open user configuration file."
+msgstr "αδύνατο το άνοιγμα αρχείου ρυθμίσεων του χρήστη."
+
+#: ../src/common/zipstrm.cpp:527
+msgid "can't re-initialize zlib deflate stream"
+msgstr "Δεν είναι δυνατή η αρχικοποίηση της ροής zlib deflate."
+
+#: ../src/common/zipstrm.cpp:552
+msgid "can't re-initialize zlib inflate stream"
+msgstr "Δεν είναι δυνατή η αρχικοποίηση της ροής zlib inflate."
+
+#: ../src/common/file.cpp:334
+#, c-format
+msgid "can't read from file descriptor %d"
+msgstr "αδύνατη η ανάγνωση από περiγραφέα (descriptor) αρχείου %d"
+
+#: ../src/common/file.cpp:599
+#, c-format
+msgid "can't remove file '%s'"
+msgstr "δεν είναι δυνατό το σβήσιμο του αρχείου '%s'"
+
+#: ../src/common/file.cpp:616
+#, c-format
+msgid "can't remove temporary file '%s'"
+msgstr "δεν είναι δυνατό το σβήσιμο του προσωρινού αρχείου '%s'"
+
+#: ../src/common/file.cpp:424 ../src/msw/wince/filefnwce.cpp:190
+#, c-format
+msgid "can't seek on file descriptor %d"
+msgstr "αδύνατη η αναζήτηση(seek) στον περγραφέα(descriptor) αρχείου %d"
+
+#: ../src/common/textfile.cpp:299
+#, c-format
+msgid "can't write buffer '%s' to disk."
+msgstr "αδύνατη η εγγραφή της προσωρινής μνήμης (buffer) '%s' στο δίσκο."
+
+#: ../src/common/file.cpp:350
+#, c-format
+msgid "can't write to file descriptor %d"
+msgstr "δεν είναι δυνατή η εγγραφή του περιγραφέα αρχείου(file descriptor) %d"
+
+#: ../src/common/fileconf.cpp:1031
+msgid "can't write user configuration file."
+msgstr "Αδύνατη η εγγραφή αρχείου ρυθμίσεων χρήστη."
+
+#: ../src/html/chm.cpp:345
+msgid "checksum error"
+msgstr "σφάλμα checksum"
+
+#: ../src/common/tarstrm.cpp:820
+msgid "checksum failure reading tar header block"
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:280
+#: ../src/richtext/richtextborderspage.cpp:310
+#: ../src/richtext/richtextborderspage.cpp:340
+#: ../src/richtext/richtextborderspage.cpp:370
+#: ../src/richtext/richtextborderspage.cpp:424
+#: ../src/richtext/richtextborderspage.cpp:454
+#: ../src/richtext/richtextborderspage.cpp:484
+#: ../src/richtext/richtextborderspage.cpp:514
+#: ../src/richtext/richtextmarginspage.cpp:202
+#: ../src/richtext/richtextmarginspage.cpp:227
+#: ../src/richtext/richtextmarginspage.cpp:250
+#: ../src/richtext/richtextmarginspage.cpp:275
+#: ../src/richtext/richtextmarginspage.cpp:316
+#: ../src/richtext/richtextmarginspage.cpp:341
+#: ../src/richtext/richtextmarginspage.cpp:364
+#: ../src/richtext/richtextmarginspage.cpp:389
+#: ../src/richtext/richtextsizepage.cpp:339
+#: ../src/richtext/richtextsizepage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:400
+#: ../src/richtext/richtextsizepage.cpp:427
+#: ../src/richtext/richtextsizepage.cpp:454
+#: ../src/richtext/richtextsizepage.cpp:481
+#: ../src/richtext/richtextsizepage.cpp:555
+#: ../src/richtext/richtextsizepage.cpp:590
+#: ../src/richtext/richtextsizepage.cpp:625
+#: ../src/richtext/richtextsizepage.cpp:660
+msgid "cm"
+msgstr ""
+
+#: ../src/html/chm.cpp:347
+msgid "compression error"
+msgstr "σφάλμα συμπίεσης"
+
+#: ../src/common/regex.cpp:239
+msgid "conversion to 8-bit encoding failed"
+msgstr "η μετατροπή σε 8-bit κωδικοποίηση απέτυχε"
+
+#: ../src/common/accelcmn.cpp:182
+msgid "ctrl"
+msgstr "ctrl"
+
+#: ../src/common/cmdline.cpp:1323
+msgid "date"
+msgstr "ημερομηνία"
+
+#: ../src/html/chm.cpp:349
+msgid "decompression error"
+msgstr "σφάλμα αποσυμπίεσης"
+
+#: ../src/richtext/richtextstyles.cpp:780 ../src/common/fmapbase.cpp:820
+msgid "default"
+msgstr "προκαθορισμένο"
+
+#: ../src/common/cmdline.cpp:1319
+msgid "double"
+msgstr ""
+
+#: ../src/common/debugrpt.cpp:543
+msgid "dump of the process state (binary)"
+msgstr ""
+
+#: ../src/common/datetimefmt.cpp:1936
+msgid "eighteenth"
+msgstr "δέκατο όγδοο"
+
+#: ../src/common/datetimefmt.cpp:1926
+msgid "eighth"
+msgstr "όγδοο"
+
+#: ../src/common/datetimefmt.cpp:1929
+msgid "eleventh"
+msgstr "έβδομο"
+
+#: ../src/common/fileconf.cpp:1868
+#, c-format
+msgid "entry '%s' appears more than once in group '%s'"
+msgstr "η εισαγωγή(entry) '%s' εμφανίζεται πάνω από μία φορά στο γκρούπ '%s'"
+
+#: ../src/html/chm.cpp:343
+msgid "error in data format"
+msgstr "σφάλμα στη μορφή των δεδομένων"
+
+#: ../src/msdos/utilsdos.cpp:413
+#, fuzzy, c-format
+msgid "error opening '%s'"
+msgstr "σφάλμα κατά το άνοιγμα του αρχείου"
+
+#: ../src/html/chm.cpp:331
+msgid "error opening file"
+msgstr "σφάλμα κατά το άνοιγμα του αρχείου"
+
+#: ../src/common/zipstrm.cpp:1576
+msgid "error reading zip central directory"
+msgstr "σφάλμα κατα την ανάγνωση κεντρικού καταλόγου στο συμπιεσμένο αρχείο"
+
+#: ../src/common/zipstrm.cpp:1667
+msgid "error reading zip local header"
+msgstr "σφάλμα κατά την ανάγνωση τοπικής κεφαλίδας του συμπιεσμένου αρχείου"
+
+#: ../src/common/zipstrm.cpp:2396
+#, c-format
+msgid "error writing zip entry '%s': bad crc or length"
+msgstr "σφάλμα κατά την εγγραφή αρχείου zip '%s': εσφαλμένο crc ή μήκος"
+
+#: ../src/common/ffile.cpp:170
+#, c-format
+msgid "failed to flush the file '%s'"
+msgstr "Αποτυχία αδειάσματος buffer (flush) του αρχείου '%s'"
+
+#: ../src/common/datetimefmt.cpp:1933
+msgid "fifteenth"
+msgstr "δέκατο-πέμπτο"
+
+#: ../src/common/datetimefmt.cpp:1923
+msgid "fifth"
+msgstr "πέμπτο"
+
+#: ../src/common/fileconf.cpp:610
+#, c-format
+msgid "file '%s', line %d: '%s' ignored after group header."
+msgstr ""
+"αρχείο '%s', γραμμή %d: το '%s' αγνοήθηκε μετά την επικεφαλίδα του γκρούπ."
+
+#: ../src/common/fileconf.cpp:639
+#, c-format
+msgid "file '%s', line %d: '=' expected."
+msgstr "αρχείο '%s', γραμμή %d: αναμενόταν '=' ."
+
+#: ../src/common/fileconf.cpp:662
+#, c-format
+msgid "file '%s', line %d: key '%s' was first found at line %d."
+msgstr ""
+"αρχείο '%s', γραμμή %d: το κλειδί '%s' βρέθηκε για πρώτη φορά στη γραμμή %d."
+
+#: ../src/common/fileconf.cpp:652
+#, c-format
+msgid "file '%s', line %d: value for immutable key '%s' ignored."
+msgstr "αρχείο '%s', γραμμή %d: τιμή για αμετάβλητο κλειδί '%s' αγνοήθηκε."
+
+#: ../src/common/fileconf.cpp:574
+#, c-format
+msgid "file '%s': unexpected character %c at line %d."
+msgstr "αρχείο '%s': απροσδόκητος χαρακτήρας %c στη γραμμή %d."
+
+#: ../src/richtext/richtextbuffer.cpp:8358
+#, fuzzy
+msgid "files"
+msgstr "Αρχείο"
+
+#: ../src/common/datetimefmt.cpp:1919
+msgid "first"
+msgstr "πρώτο"
+
+#: ../src/html/helpwnd.cpp:1265
+msgid "font size"
+msgstr "μέγεθος γραμματοσειράς"
+
+#: ../src/common/datetimefmt.cpp:1932
+msgid "fourteenth"
+msgstr "δέκατο τέταρτο"
+
+#: ../src/common/datetimefmt.cpp:1922
+msgid "fourth"
+msgstr "τέταρτο"
+
+#: ../src/common/appbase.cpp:695
+msgid "generate verbose log messages"
+msgstr "δημιουργία αναλυτικών (verbose) μηνυμάτων καταγραφής (log)"
+
+#: ../src/richtext/richtextbuffer.cpp:12212
+#: ../src/richtext/richtextbuffer.cpp:12322
+#, fuzzy
+msgid "image"
+msgstr "Ώρα"
+
+#: ../src/common/tarstrm.cpp:796
+msgid "incomplete header block in tar"
+msgstr ""
+
+#: ../src/common/xtixml.cpp:489
+msgid "incorrect event handler string, missing dot"
+msgstr "εσφαλμένο string χειριστή event, λείπει τελεία"
+
+#: ../src/common/tarstrm.cpp:1381
+msgid "incorrect size given for tar entry"
+msgstr ""
+
+#: ../src/common/tarstrm.cpp:993
+msgid "invalid data in extended tar header"
+msgstr ""
+
+#: ../src/generic/logg.cpp:1050
+msgid "invalid message box return value"
+msgstr "μη αποδεκτή τιμή επιστροφής παράθυρου μηνύματος"
+
+#: ../src/common/zipstrm.cpp:1445
+msgid "invalid zip file"
+msgstr "μη έγκυρο συμπιεσμένο αρχείο"
+
+#: ../src/common/fontcmn.cpp:983
+msgid "italic"
+msgstr "πλάγιο"
+
+#: ../src/common/fontcmn.cpp:973
+msgid "light"
+msgstr "απαλό(light)"
+
+#: ../src/common/intl.cpp:293
+#, c-format
+msgid "locale '%s' cannot be set."
+msgstr "η γλώσσα '%s' δεν μπορει να οριστεί"
+
+#: ../src/common/datetimefmt.cpp:2092
+msgid "midnight"
+msgstr "μεσάνυκτα"
+
+#: ../src/common/datetimefmt.cpp:1937
+msgid "nineteenth"
+msgstr "δέκατο ένατο"
+
+#: ../src/common/datetimefmt.cpp:1927
+msgid "ninth"
+msgstr "ένατο"
+
+#: ../src/msw/dde.cpp:1119
+msgid "no DDE error."
+msgstr "κανένα λάθος DDE"
+
+#: ../src/html/chm.cpp:327
+msgid "no error"
+msgstr "κανένα λάθος"
+
+#: ../src/dfb/fontmgr.cpp:174
+#, c-format
+msgid "no fonts found in %s, using builtin font"
+msgstr ""
+
+#: ../src/html/helpdata.cpp:655
+msgid "noname"
+msgstr "ανώνυμο"
+
+#: ../src/common/datetimefmt.cpp:2091
+msgid "noon"
+msgstr "μεσημέρι"
+
+#: ../src/richtext/richtextstyles.cpp:779
+#, fuzzy
+msgid "normal"
+msgstr "Κανονικό"
+
+#: ../src/gtk/print.cpp:1218 ../src/gtk/print.cpp:1323
+msgid "not implemented"
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1315
+msgid "num"
+msgstr "num"
+
+#: ../src/common/xtixml.cpp:259
+msgid "objects cannot have XML Text Nodes"
+msgstr "τα αντικείμενα δεν μπορούν να έχουν XML κόμβους κειμένου"
+
+#: ../src/html/chm.cpp:339
+msgid "out of memory"
+msgstr "ανεπαρκής μνήμη"
+
+#: ../src/richtext/richtextsizepage.cpp:340
+#: ../src/richtext/richtextsizepage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:401
+#: ../src/richtext/richtextsizepage.cpp:428
+#: ../src/richtext/richtextsizepage.cpp:455
+#: ../src/richtext/richtextsizepage.cpp:482
+#: ../src/richtext/richtextsizepage.cpp:556
+#: ../src/richtext/richtextsizepage.cpp:591
+#: ../src/richtext/richtextsizepage.cpp:626
+#: ../src/richtext/richtextsizepage.cpp:661
+msgid "percent"
+msgstr ""
+
+#: ../src/common/debugrpt.cpp:519
+msgid "process context description"
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:186
+#: ../src/richtext/richtextfontpage.cpp:189
+msgid "pt"
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:187
+#: ../src/richtext/richtextborderspage.cpp:279
+#: ../src/richtext/richtextborderspage.cpp:281
+#: ../src/richtext/richtextborderspage.cpp:282
+#: ../src/richtext/richtextborderspage.cpp:309
+#: ../src/richtext/richtextborderspage.cpp:311
+#: ../src/richtext/richtextborderspage.cpp:312
+#: ../src/richtext/richtextborderspage.cpp:339
+#: ../src/richtext/richtextborderspage.cpp:341
+#: ../src/richtext/richtextborderspage.cpp:342
+#: ../src/richtext/richtextborderspage.cpp:369
+#: ../src/richtext/richtextborderspage.cpp:371
+#: ../src/richtext/richtextborderspage.cpp:372
+#: ../src/richtext/richtextborderspage.cpp:423
+#: ../src/richtext/richtextborderspage.cpp:425
+#: ../src/richtext/richtextborderspage.cpp:426
+#: ../src/richtext/richtextborderspage.cpp:453
+#: ../src/richtext/richtextborderspage.cpp:455
+#: ../src/richtext/richtextborderspage.cpp:456
+#: ../src/richtext/richtextborderspage.cpp:483
+#: ../src/richtext/richtextborderspage.cpp:485
+#: ../src/richtext/richtextborderspage.cpp:486
+#: ../src/richtext/richtextborderspage.cpp:513
+#: ../src/richtext/richtextborderspage.cpp:515
+#: ../src/richtext/richtextborderspage.cpp:516
+#: ../src/richtext/richtextmarginspage.cpp:201
+#: ../src/richtext/richtextmarginspage.cpp:203
+#: ../src/richtext/richtextmarginspage.cpp:204
+#: ../src/richtext/richtextmarginspage.cpp:226
+#: ../src/richtext/richtextmarginspage.cpp:228
+#: ../src/richtext/richtextmarginspage.cpp:229
+#: ../src/richtext/richtextmarginspage.cpp:249
+#: ../src/richtext/richtextmarginspage.cpp:251
+#: ../src/richtext/richtextmarginspage.cpp:252
+#: ../src/richtext/richtextmarginspage.cpp:274
+#: ../src/richtext/richtextmarginspage.cpp:276
+#: ../src/richtext/richtextmarginspage.cpp:277
+#: ../src/richtext/richtextmarginspage.cpp:315
+#: ../src/richtext/richtextmarginspage.cpp:317
+#: ../src/richtext/richtextmarginspage.cpp:318
+#: ../src/richtext/richtextmarginspage.cpp:340
+#: ../src/richtext/richtextmarginspage.cpp:342
+#: ../src/richtext/richtextmarginspage.cpp:343
+#: ../src/richtext/richtextmarginspage.cpp:363
+#: ../src/richtext/richtextmarginspage.cpp:365
+#: ../src/richtext/richtextmarginspage.cpp:366
+#: ../src/richtext/richtextmarginspage.cpp:388
+#: ../src/richtext/richtextmarginspage.cpp:390
+#: ../src/richtext/richtextmarginspage.cpp:391
+#: ../src/richtext/richtextsizepage.cpp:338
+#: ../src/richtext/richtextsizepage.cpp:341
+#: ../src/richtext/richtextsizepage.cpp:342
+#: ../src/richtext/richtextsizepage.cpp:372
+#: ../src/richtext/richtextsizepage.cpp:375
+#: ../src/richtext/richtextsizepage.cpp:376
+#: ../src/richtext/richtextsizepage.cpp:399
+#: ../src/richtext/richtextsizepage.cpp:402
+#: ../src/richtext/richtextsizepage.cpp:403
+#: ../src/richtext/richtextsizepage.cpp:426
+#: ../src/richtext/richtextsizepage.cpp:429
+#: ../src/richtext/richtextsizepage.cpp:430
+#: ../src/richtext/richtextsizepage.cpp:453
+#: ../src/richtext/richtextsizepage.cpp:456
+#: ../src/richtext/richtextsizepage.cpp:457
+#: ../src/richtext/richtextsizepage.cpp:480
+#: ../src/richtext/richtextsizepage.cpp:483
+#: ../src/richtext/richtextsizepage.cpp:484
+#: ../src/richtext/richtextsizepage.cpp:554
+#: ../src/richtext/richtextsizepage.cpp:557
+#: ../src/richtext/richtextsizepage.cpp:558
+#: ../src/richtext/richtextsizepage.cpp:589
+#: ../src/richtext/richtextsizepage.cpp:592
+#: ../src/richtext/richtextsizepage.cpp:593
+#: ../src/richtext/richtextsizepage.cpp:624
+#: ../src/richtext/richtextsizepage.cpp:627
+#: ../src/richtext/richtextsizepage.cpp:628
+#: ../src/richtext/richtextsizepage.cpp:659
+#: ../src/richtext/richtextsizepage.cpp:662
+#: ../src/richtext/richtextsizepage.cpp:663
+msgid "px"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:188
+#, fuzzy
+msgid "rawctrl"
+msgstr "ctrl"
+
+#: ../src/html/chm.cpp:333
+msgid "read error"
+msgstr "σφάλμα ανάγνωσης"
+
+#: ../src/common/zipstrm.cpp:1882
+#, c-format
+msgid "reading zip stream (entry %s): bad crc"
+msgstr "ανάγνωση ροής zip (εγγραφή %s): εσφαλμένο crc "
+
+#: ../src/common/zipstrm.cpp:1877
+#, c-format
+msgid "reading zip stream (entry %s): bad length"
+msgstr "ανάγνωση ροής zip (εγγραφή %s): λανθασμένο μήκος"
+
+#: ../src/msw/dde.cpp:1162
+msgid "reentrancy problem."
+msgstr "πρόβλημα επανεισαγωγής (reentrancy problem)."
+
+#: ../src/common/datetimefmt.cpp:1920
+msgid "second"
+msgstr "δεύτερο"
+
+#: ../src/html/chm.cpp:337
+msgid "seek error"
+msgstr "σφάλμα εντοπισμού"
+
+#: ../src/common/datetimefmt.cpp:1935
+msgid "seventeenth"
+msgstr "δέκατο-έβδομο"
+
+#: ../src/common/datetimefmt.cpp:1925
+msgid "seventh"
+msgstr "έβδομο"
+
+#: ../src/common/accelcmn.cpp:186
+msgid "shift"
+msgstr "shift"
+
+#: ../src/common/appbase.cpp:685
+msgid "show this help message"
+msgstr "εμφάνιση αυτού του μηνύματος βοηθείας"
+
+#: ../src/common/datetimefmt.cpp:1934
+msgid "sixteenth"
+msgstr "δέκατο έκτο"
+
+#: ../src/common/datetimefmt.cpp:1924
+msgid "sixth"
+msgstr "έκτο"
+
+#: ../src/common/appcmn.cpp:227
+msgid "specify display mode to use (e.g. 640x480-16)"
+msgstr ""
+"διευκρινήστε τον τρόπο απεικόνισης που θα χρησιμοποιηθεί (π.χ. 640x480-16)"
+
+#: ../src/common/appcmn.cpp:213
+msgid "specify the theme to use"
+msgstr "καθορίστε το θέμα που θα χρησιμοποιηθεί"
+
+#: ../src/richtext/richtextbuffer.cpp:8876
+msgid "standard/circle"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8877
+msgid "standard/circle-outline"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8879
+msgid "standard/diamond"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8878
+msgid "standard/square"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8880
+msgid "standard/triangle"
+msgstr ""
+
+#: ../src/common/zipstrm.cpp:1782
+msgid "stored file length not in Zip header"
+msgstr "το μήκος του αποθκευμένου αρχείου δεν υπάρχει στην κεφαλίδα Zip"
+
+#: ../src/common/cmdline.cpp:1311
+msgid "str"
+msgstr "str"
+
+#: ../src/common/fontcmn.cpp:794 ../src/common/fontcmn.cpp:969
+msgid "strikethrough"
+msgstr ""
+
+#: ../src/common/tarstrm.cpp:1003 ../src/common/tarstrm.cpp:1025
+#: ../src/common/tarstrm.cpp:1507 ../src/common/tarstrm.cpp:1529
+msgid "tar entry not open"
+msgstr ""
+
+#: ../src/common/datetimefmt.cpp:1928
+msgid "tenth"
+msgstr "δέκατο"
+
+#: ../src/msw/dde.cpp:1126
+msgid "the response to the transaction caused the DDE_FBUSY bit to be set."
+msgstr "η απάντηση στη συναλλαγή ανάγκασε το DDE_FBUSY bit να τεθεί."
+
+#: ../src/common/datetimefmt.cpp:1921
+msgid "third"
+msgstr "τρίτο"
+
+#: ../src/common/datetimefmt.cpp:1931
+msgid "thirteenth"
+msgstr "δέκατο τρίτο"
+
+#: ../src/common/datetimefmt.cpp:1725
+msgid "today"
+msgstr "σήμερα"
+
+#: ../src/common/datetimefmt.cpp:1727
+msgid "tomorrow"
+msgstr "αύριο"
+
+#: ../src/common/fileconf.cpp:1979
+#, c-format
+msgid "trailing backslash ignored in '%s'"
+msgstr ""
+
+#: ../src/gtk/aboutdlg.cpp:218
+msgid "translator-credits"
+msgstr ""
+
+#: ../src/common/datetimefmt.cpp:1930
+msgid "twelfth"
+msgstr "δωδέκατο"
+
+#: ../src/common/datetimefmt.cpp:1938
+msgid "twentieth"
+msgstr "εικοστό"
+
+#: ../src/common/fontcmn.cpp:789 ../src/common/fontcmn.cpp:965
+msgid "underlined"
+msgstr "υπογεγραμμένο"
+
+#: ../src/common/fileconf.cpp:2014
+#, c-format
+msgid "unexpected \" at position %d in '%s'."
+msgstr "απροσδόκητο \" στη θέση %d στο '%s'."
+
+#: ../src/common/tarstrm.cpp:1045
+#, fuzzy
+msgid "unexpected end of file"
+msgstr "Απροσδόκητο τέλος αρχείου κατά την ανάγνωση πόρου."
+
+#: ../src/generic/progdlgg.cpp:399 ../src/common/tarstrm.cpp:371
+#: ../src/common/tarstrm.cpp:394 ../src/common/tarstrm.cpp:425
+msgid "unknown"
+msgstr "άγνωστο"
+
+#: ../src/common/xtixml.cpp:253
+#, c-format
+msgid "unknown class %s"
+msgstr "άγνωστη κλάση %s"
+
+#: ../src/common/regex.cpp:261 ../src/html/chm.cpp:351
+msgid "unknown error"
+msgstr "άνωστο λάθος"
+
+#: ../src/msw/dialup.cpp:490
+#, c-format
+msgid "unknown error (error code %08x)."
+msgstr "άνωστο λάθος (κωδικός λάθους %08x)"
+
+#: ../src/msw/wince/filefnwce.cpp:172
+msgid "unknown seek origin"
+msgstr "άγνωστη αφετηρία(origin) αναζήτησης(seek)"
+
+#: ../src/common/fmapbase.cpp:834
+#, c-format
+msgid "unknown-%d"
+msgstr "άγνωστο-%d"
+
+#: ../src/common/docview.cpp:507
+msgid "unnamed"
+msgstr "απροσδιόριστο"
+
+#: ../src/common/docview.cpp:1606
+#, c-format
+msgid "unnamed%d"
+msgstr "απροσδιόριστο%d"
+
+#: ../src/common/zipstrm.cpp:1796 ../src/common/zipstrm.cpp:2184
+msgid "unsupported Zip compression method"
+msgstr "μη υποστηριζόμενη μέθοδος συμπίεσης Zip"
+
+#: ../src/common/translation.cpp:1883
+#, c-format
+msgid "using catalog '%s' from '%s'."
+msgstr "χρήση καταλόγου '%s' από '%s'"
+
+#: ../src/html/chm.cpp:335
+msgid "write error"
+msgstr "σφάλμα εγγραφής"
+
+#: ../src/common/time.cpp:318
+msgid "wxGetTimeOfDay failed."
+msgstr "το wxGetTimeOfDay απέτυχε."
+
+#: ../src/gtk/print.cpp:987
+msgid "wxPrintout::GetPageInfo gives a null maxPage."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1303
+msgid "wxWidget control pointer is not a data view pointer"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:907
+#, fuzzy
+msgid "wxWidget's control not initialized."
+msgstr "Δεν είναι δυνατή η αρχικοποίηση απεικόνησης."
+
+#: ../src/motif/app.cpp:245
+#, c-format
+msgid "wxWidgets could not open display for '%s': exiting."
+msgstr ""
+"Η βιλιοθήκη wxWidgets δεν μπορεί να ανοίξει την απεικόνιση για το '%s': "
+"έξοδος..."
+
+#: ../src/x11/app.cpp:164
+msgid "wxWidgets could not open display. Exiting."
+msgstr "Η βιλιοθήκη wxWidgets δεν μπορεί να ανοίξει την απεικόνιση. 'Εξοδος..."
+
+#: ../src/richtext/richtextsymboldlg.cpp:434
+msgid "xxxx"
+msgstr ""
+
+#: ../src/common/datetimefmt.cpp:1726
+msgid "yesterday"
+msgstr "χθες"
+
+#: ../src/common/zstream.cpp:251 ../src/common/zstream.cpp:426
+#, c-format
+msgid "zlib error %d"
+msgstr "σφάλμα zlib %d"
+
+#: ../src/richtext/richtextliststylepage.cpp:496
+#: ../src/richtext/richtextbulletspage.cpp:301
+msgid "~"
+msgstr ""
+
+#~ msgid "Print preview"
+#~ msgstr "Προεπισκόπηση εκτύπωσης"
+
+#, fuzzy
+#~ msgid "&Preview..."
+#~ msgstr " Προεπισκόπηση"
+
+#, fuzzy
+#~ msgid "Preview..."
+#~ msgstr " Προεπισκόπηση"
+
+#~ msgid "&Save..."
+#~ msgstr "&Αποθήκευση..."
+
+#, fuzzy
+#~ msgid "About "
+#~ msgstr "&Περί..."
+
+#~ msgid "All files (*.*)|*"
+#~ msgstr "Όλα τα αρχεία (*.*)|*"
+
+#~ msgid "Cannot initialize SciTech MGL!"
+#~ msgstr "Δεν είναι δυνατή η αρχικοποίηση του SciTech MGL"
+
+#~ msgid "Cannot initialize display."
+#~ msgstr "Δεν είναι δυνατή η αρχικοποίηση απεικόνησης."
+
+#~ msgid "Cannot start thread: error writing TLS"
+#~ msgstr ""
+#~ "Δεν είναι δυνατή η εκκίνηση του ΄νηματος εκτέλεσης (thread): σφάλμα κατά "
+#~ "την εγγραφή του TLS"
+
+#~ msgid "Close\tAlt-F4"
+#~ msgstr "Κλείσιμο\tAlt-F4"
+
+#~ msgid "Couldn't create cursor."
+#~ msgstr "Δεν ήταν δυνατή η δημιουργία δείκτη ποντικιού."
+
+#~ msgid "Directory '%s' doesn't exist!"
+#~ msgstr "Ο κατάλογος '%s' δεν υπάρχει!"
+
+#~ msgid "File %s does not exist."
+#~ msgstr "Το αρχείο %s δεν υπάρχει."
+
+#~ msgid "Mode %ix%i-%i not available."
+#~ msgstr "Η κατάσταση λειτουργίας (mode) %ix%i-%i δεν είναι διαθέσιμη."
+
+#~ msgid "Paper Size"
+#~ msgstr "Μέγεθος Χαρτιού"
+
+#~ msgid "&Goto..."
+#~ msgstr "&Μετάβαση..."
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">>|"
+#~ msgstr ">>|"
+
+#~ msgid "Archive doesnt contain #SYSTEM file"
+#~ msgstr "Το αρχείο δεν περιέχει αρχείο #SYSTEM"
+
+#~ msgid "Can't check image format of file '%s': file does not exist."
+#~ msgstr ""
+#~ "Δεν είναι δυνατή η εξακρίβωση του τύπου του αρχείου %s: το αρχείο δεν "
+#~ "υπάρχει."
+
+#~ msgid "Can't load image from file '%s': file does not exist."
+#~ msgstr ""
+#~ "Δεν είναι δυνατή η ανάγνωση της εικόνας από το αρχείο '%s': Το αρχείο δεν "
+#~ "υπάρχει."
+
+#~ msgid "Cannot convert dialog units: dialog unknown."
+#~ msgstr ""
+#~ "Δεν είναι δυνατή η μετατροπή των μονάδων διαλόγου(dialog units): άγνωστο "
+#~ "παράθυρο διαλόγου."
+
+#~ msgid "Cannot convert from the charset '%s'!"
+#~ msgstr "Δεν είναι δυνατή η μετατροπη από το σύνολο χαρακτήρων '%s'!"
+
+#~ msgid "Cannot find container for unknown control '%s'."
+#~ msgstr ""
+#~ "Δεν είναι δυνατή η εύρεση φορέα(container) για άγνωστο στοιχείο ελέγχου"
+#~ "(control) '%s'."
+
+#~ msgid "Cannot find font node '%s'."
+#~ msgstr ""
+#~ "Δεν είναι δυνατή η εύρεση καταστάσεως γραμματοσειράς(font mode) '%s'."
+
+#~ msgid "Cannot open file '%s'."
+#~ msgstr "Δεν είναι δυνατό το άνοιγμα του αρχείου '%s'."
+
+#~ msgid "Cannot parse coordinates from '%s'."
+#~ msgstr "Δεν είναι δυνατή η ανάγνωση συντεταγμένων από '%s'."
+
+#~ msgid "Cannot parse dimension from '%s'."
+#~ msgstr "Δεν είναι δυνατή η ανάγνωση διαστάσεων από '%s'."
+
+#~ msgid "Cant create the thread event queue"
+#~ msgstr "Δεν είναι δυνατή η δημιουργία της ουράς συμβάντων των νημάτων"
+
+#, fuzzy
+#~ msgid "Click to cancel this window."
+#~ msgstr "Κλείσιμο αυτού του παραθύρου."
+
+#, fuzzy
+#~ msgid "Click to confirm your selection."
+#~ msgstr "Κάνετε κλικ για να επιβεβαιώσετε την επιλογή γραμματοσειράς."
+
+#~ msgid "Could not unlock mutex"
+#~ msgstr "Δεν ήταν δυνατό το ξεκλείδωμα του mutex"
+
+#~ msgid "Error while waiting on semaphore"
+#~ msgstr "Σφάλμα κατά την αναμονή στη σημαφόρο"
+
+#, fuzzy
+#~ msgid "Failed to connect to session manager: %s"
+#~ msgstr "Αποτυχία %s της σύνδεσης μέσω τηλεφώνου : %s"
+
+#~ msgid "Failed to create a status bar."
+#~ msgstr "Αποτυχία δημιουργίας μιας μπάρας κατάστασης (status bar)"
+
+#~ msgid "Failed to register OpenGL window class."
+#~ msgstr "Απέτυχε η θέση της κλάσης του παραθύρου OpenGL"
+
+#~ msgid "Fatal error"
+#~ msgstr "Μοιραίο σφάλμα"
+
+#~ msgid "Fatal error: "
+#~ msgstr "Μοιραίο σφάλμα: "
+
+#~ msgid "Goto Page"
+#~ msgstr "Μετάβαση στη Σελίδα"
+
+#, fuzzy
+#~ msgid "Help : %s"
+#~ msgstr "Βοήθεια: %s"
+
+#~ msgid "I64"
+#~ msgstr "I64"
+
+#~ msgid "Internal error, illegal wxCustomTypeInfo"
+#~ msgstr "Εσωτερικό σφάλμα, μη έγκυρο wxCustomTypeInfo"
+
+#~ msgid "Invalid XRC resource '%s': doesn't have root node 'resource'."
+#~ msgstr ""
+#~ "Λανθασμένος XRC πόρος '%s': δεν έχει ριζικό(root) κόμβο(node) 'resource'."
+
+#~ msgid "No handler found for XML node '%s', class '%s'!"
+#~ msgstr ""
+#~ "Δεν βρέθηκε κανένας χειριστής (handler) για τον XML κόμβο(node) '%s', τάξη"
+#~ "(class) '%s'!"
+
+#, fuzzy
+#~ msgid "No image handler for type %ld defined."
+#~ msgstr "Δεν έχει οριστεί χειριστής εικόνας για τον τύπο %d."
+
+#, fuzzy
+#~ msgid "Owner not initialized."
+#~ msgstr "Δεν είναι δυνατή η αρχικοποίηση απεικόνησης."
+
+#, fuzzy
+#~ msgid "Passed item is invalid."
+#~ msgstr "'%s' δεν ισχύει"
+
+#~ msgid "Passing a already registered object to SetObjectName"
+#~ msgstr "Δόθηκε ένα ήδη registered αντικείμενο στην SetObjectName"
+
+#~ msgid "Program aborted."
+#~ msgstr "Το πρόγραμμα ματαιώθηκε."
+
+#~ msgid "Referenced object node with ref=\"%s\" not found!"
+#~ msgstr "Ο αναφερόμενος κομβος αντικειμένου με ref=\"%s\" δεν βρέθηκε!"
+
+#~ msgid "Resource files must have same version number!"
+#~ msgstr "Τα αρχεία πόρων πρέπει να έχουν τον ίδιο αριθμό έκδοσης!"
+
+#, fuzzy
+#~ msgid "Search!"
+#~ msgstr "Αναζήτηση"
+
+#~ msgid "Sorry, could not open this file for saving."
+#~ msgstr ""
+#~ "Συγγνώμη, είναι αδύνατο το άνοιγμα αυτού του αρχείου για αποθήκευση."
+
+#~ msgid "Sorry, could not save this file."
+#~ msgstr "Συγγνώμη, δεν μπόρεσε να αποθηκευθεί αυτό το αρχείο."
+
+#~ msgid "Sorry, print preview needs a printer to be installed."
+#~ msgstr ""
+#~ "Συγγνώμη, η προεπισκόπηση εκτύπωσης χρειάζεται έναν εγκατεστημένο "
+#~ "εκτυπωτή."
+
+#~ msgid "Status: "
+#~ msgstr "Κατάσταση: "
+
+#~ msgid ""
+#~ "Streaming delegates for not already streamed objects not yet supported"
+#~ msgstr ""
+#~ "Οι εκπροσωπήσεις ροών για μη ροοποιημένα αντικείμενα δεν υποστηρίζονται "
+#~ "ακόμα"
+
+#~ msgid "Subclass '%s' not found for resource '%s', not subclassing!"
+#~ msgstr ""
+#~ "Η υπο-κλάση '%s' δεν βρέθηκε για τον πόρο '%s', δεν θα γίνει subclassing!"
+
+#~ msgid ""
+#~ "The file '%s' couldn't be opened.\n"
+#~ "It has been removed from the most recently used files list."
+#~ msgstr ""
+#~ "Το αρχείο '%s' δεν μπόρεσε να ανοιχτεί.\n"
+#~ "Αφαιρέθηκε από την λίστα με τα πρόσφατα χρησιμοποιημένα αρχεία."
+
+#~ msgid "The path '%s' contains too many \"..\"!"
+#~ msgstr "Η διαδρομή '%s' περιέχει πάρα πολλά \"..\"!"
+
+#~ msgid "Trying to solve a NULL hostname: giving up"
+#~ msgstr ""
+#~ "Προσπάθεια διαλεύκανσης ενός NULL ονόματος διακομιστή(hostname): γίνεται "
+#~ "παραίτηση"
+
+#~ msgid "Unknown style flag "
+#~ msgstr "’γνωστη σημαία στύλ (style flag)."
+
+#~ msgid "Warning"
+#~ msgstr "Προειδοποίηση"
+
+#~ msgid "XRC resource '%s' (class '%s') not found!"
+#~ msgstr "XRC resource '%s' (τάξη(class) '%s') δεν βρέθηκε!"
+
+#, fuzzy
+#~ msgid "XRC resource: Cannot create animation from '%s'."
+#~ msgstr "XRC resource: Δεν είναι δυνατή η δημιουργία bitmap από '%s'."
+
+#~ msgid "XRC resource: Cannot create bitmap from '%s'."
+#~ msgstr "XRC resource: Δεν είναι δυνατή η δημιουργία bitmap από '%s'."
+
+#, fuzzy
+#~ msgid ""
+#~ "XRC resource: Incorrect colour specification '%s' for attribute '%s'."
+#~ msgstr ""
+#~ "XRC resource: Λανθασμένος καθορισμός χρώματος '%s' για την ιδιότητα '%s'."
+
+#~ msgid "[EMPTY]"
+#~ msgstr "[ΚΕΝΟ]"
+
+#~ msgid "catalog file for domain '%s' not found."
+#~ msgstr "αρχείο καταλόγου για την περιοχή (domain) '%s' δεν βρέθηκε."
+
+#~ msgid "delegate has no type info"
+#~ msgstr "ο εκπρόσωπος(delegate) δεν έχει πληροφορίες τύπου"
+
+#, fuzzy
+#~ msgid "encoding %i"
+#~ msgstr "κωδικοποίηση %s"
+
+#~ msgid "looking for catalog '%s' in path '%s'."
+#~ msgstr "γίνεται εύρεση του καταλόγου '%s' στο μονοπάτι '%s'."
+
+#~ msgid "wxSocket: invalid signature in ReadMsg."
+#~ msgstr "wxSocket: λανθασμένη υπογραφή (invalid signature) στο ReadMsg."
+
+#~ msgid "wxSocket: unknown event!."
+#~ msgstr "wxSocket: άγνωστο γεγονός (event)!"
+
+#~ msgid "|<<"
+#~ msgstr "|<<"
+
+#, fuzzy
+#~ msgid " Couldn't create the UnicodeConverter"
+#~ msgstr "Δεν ήταν δυνατή η δημιουργία χρονοδιακόπτη (timer)"
+
+#~ msgid "#define %s must be an integer."
+#~ msgstr "#define %s πρέπει να είναι ακέραιος (integer)."
+
+#~ msgid "%s not a bitmap resource specification."
+#~ msgstr "%s δεν είναι καθορισμός πόρου τύπου bitmap ( bitmap resource )"
+
+#~ msgid "%s not an icon resource specification."
+#~ msgstr "%s δεν είναι καθορισμός πόρου τύπου εικονιδίου ( icon resource )"
+
+#~ msgid "%s: ill-formed resource file syntax."
+#~ msgstr "%s: κακή (ill-formed) σύνταξη αρχείου πόρων. ( resource file )"
+
+#~ msgid "&Open"
+#~ msgstr "&Ανοιγμα"
+
+#~ msgid "&Print"
+#~ msgstr "&Εκτύπωση"
+
+#~ msgid ""
+#~ ", expected static, #include or #define\n"
+#~ "while parsing resource."
+#~ msgstr ""
+#~ ", αναμενόταν static, #include ή #define\n"
+#~ "κατά την ανάγνωση του πόρου."
+
+#~ msgid "Bitmap resource specification %s not found."
+#~ msgstr "Δεν βρέθηκε ο καθοριμός πόρου bitmap %s"
+
+#~ msgid ""
+#~ "Could not resolve control class or id '%s'. Use (non-zero) integer "
+#~ "instead\n"
+#~ " or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "Δεν ήταν δυνατή η αντιστοίχηση της κλάσης ελέγχου ή του id '%s'. "
+#~ "Χρησιμοποιήστε (μη-μηδενικό) ακέραιο\n"
+#~ " ή μία οδηγία #define (ανατρέξατε στο εγχειρίδιο για λεπτομέρειες)"
+
+#~ msgid ""
+#~ "Could not resolve menu id '%s'. Use (non-zero) integer instead\n"
+#~ "or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "Δεν ήταν δυνατή η αντιστοίχηση του menu id '%s'. Χρησιμοποιήστε (μη-"
+#~ "μηδενικό) ακέραιο\n"
+#~ "ή μία οδηγία #define (ανατρέξατε στο εγχειρίδιο για λεπτομέρειες)"
+
+#, fuzzy
+#~ msgid "Couldn't end the context on the overlay window"
+#~ msgstr ""
+#~ "Δεν ήταν δυνατή η ανάκτηση toy τρέχοντος δείκτη νήματος εκτέλεσης(thread)"
+
+#~ msgid "Expected '*' while parsing resource."
+#~ msgstr "Αναμενόταν '*' κατά την ανάγνωση του πόρου(resource)."
+
+#~ msgid "Expected '=' while parsing resource."
+#~ msgstr "Αναμενόταν '=' κατά την ανάγνωση του πόρου(resource)."
+
+#~ msgid "Expected 'char' while parsing resource."
+#~ msgstr "Αναμενόταν 'char' κατά την ανάγνωση του πόρου(resource)."
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "Απέτυχε η έυρεση XBM πόρου %s.\n"
+#~ "Ξεχάσατε να χρησιμοποιήσετε το wxResourceLoadBitmapData ;"
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadIconData?"
+#~ msgstr ""
+#~ "Απέτυχε η έυρεση XBM πόρου %s.\n"
+#~ "Ξεχάσατε να χρησιμοποιήσετε το wxResourceLoadIconData ;"
+
+#~ msgid ""
+#~ "Failed to find XPM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "Απέτυχε η έυρεση XPM πόρου %s.\n"
+#~ "Ξεχάσατε να χρησιμοποιήσετε το wxResourceLoadBitmapData ;"
+
+#~ msgid "Failed to get clipboard data."
+#~ msgstr "Αποτυχία λήψης των δεδομένων του προχείρου (clipboard)."
+
+#~ msgid "Failed to load shared library '%s' Error '%s'"
+#~ msgstr ""
+#~ "Αποτυχία φόρτωσης της κοινής βιβλιοθήκης (shared library) '%s' Σφάλμα '%s'"
+
+#~ msgid "Found "
+#~ msgstr "Βρέθηκαν "
+
+#~ msgid "Icon resource specification %s not found."
+#~ msgstr "Δεν βρέθηκε ο καθοριμός πόρου bitmap %s"
+
+#~ msgid "Ill-formed resource file syntax."
+#~ msgstr "Λανθασμένη συνταξη αρχείου πόρου."
+
+#~ msgid "Long Conversions not supported"
+#~ msgstr "Οι μετατροπές Long δεν υποστηρίζονται"
+
+#~ msgid "No XPM icon facility available!"
+#~ msgstr "Δεν υπάρχει μονάδα(facility) εικονιδίων XPM διαθέσιμη!"
+
+#~ msgid "Option '%s' requires a value, '=' expected."
+#~ msgstr "Η επιλογή '%s' απαιτεί μια τιμή, αναμενόταν '='."
+
+#, fuzzy
+#~ msgid "Select all"
+#~ msgstr "Επιλογή &Ολων"
+
+#~ msgid "String conversions not supported"
+#~ msgstr "Οι μετατροπές strings δεν υποστηρίζονται"
+
+#~ msgid "Unexpected end of file while parsing resource."
+#~ msgstr "Απροσδόκητο τέλος αρχείου κατά την ανάγνωση πόρου."
+
+#~ msgid "Unrecognized style %s while parsing resource."
+#~ msgstr "Μη-αναγνωρίσιμο στύλ %s κατα την ανάγνωση πόρου."
+
+#~ msgid "Video Output"
+#~ msgstr "Έξοδος Εικόνας"
+
+#~ msgid "Warning: attempt to remove HTML tag handler from empty stack."
+#~ msgstr ""
+#~ "Προειδοποίηση: προσπάθεια απομάκρυνσης διαχειριστή ετικετών (tag handler) "
+#~ "HTML από άδεια στοίβα (stack)."
+
+#~ msgid "establish"
+#~ msgstr "εδραίωσε"
+
+#~ msgid "initiate"
+#~ msgstr "αρχικοποίησε"
+
+#~ msgid "invalid eof() return value."
+#~ msgstr "λανθασμένη τιμή επιστροφής του eof()."
+
+#~ msgid "unknown line terminator"
+#~ msgstr "άγνωστο τερματικό γραμμής"
+
+#~ msgid "writing"
+#~ msgstr "γίνεται εγγραφή"
+
+#~ msgid "."
+#~ msgstr "."
+
+#~ msgid "Cannot open URL '%s'"
+#~ msgstr "Δεν είναι δυνατό to άνοιγμα του URL '%s'"
+
+#~ msgid "Error "
+#~ msgstr "Σφάλμα "
+
+#~ msgid "Failed to create directory %s/.gnome."
+#~ msgstr "Απέτυχε η δημιουργία καταλόγου '%s'/.gnome."
+
+#~ msgid "Failed to create directory %s/mime-info."
+#~ msgstr "Απέτυχε η δημιουργία καταλόγου '%s'/mime-info."
+
+#~ msgid "MP Thread Support is not available on this System"
+#~ msgstr "Η υποστήριξη MP νημάτων δεν είναι διαθέσιμη σε αυτό το σύστημα"
+
+#~ msgid "Mailcap file %s, line %d: incomplete entry ignored."
+#~ msgstr "Mailcap αρχείο %s, γραμμή %d: ημιτελής εγγραφή αγνοήθηκε."
+
+#~ msgid "Mime.types file %s, line %d: unterminated quoted string."
+#~ msgstr "Mime.types αρχείο %s, γραμμή %d: μη τερματιζόμενο quoted string."
+
+#~ msgid "Unknown field in file %s, line %d: '%s'."
+#~ msgstr "’γνωστο πεδίο στο αρχείο %s, γραμμή %d: '%s'."
+
+#~ msgid "bold "
+#~ msgstr "έντονο "
+
+#~ msgid "can't query for GUI plugins name in console applications"
+#~ msgstr ""
+#~ "δεν είναι δυνατή η αναζήτηση για επεκτάσεις GUI σε εφαρμογές κονσόλας"
+
+#~ msgid "light "
+#~ msgstr "απαλό(light) "
+
+#~ msgid "underlined "
+#~ msgstr "υπογεγραμμένο "
+
+#~ msgid "unsupported zip archive"
+#~ msgstr "Μη υποστηριζόμενο συμπιεσμένο αρχείο zip"
+
+#, fuzzy
+#~ msgid ""
+#~ "Failed to get stack backtrace:\n"
+#~ "%s"
+#~ msgstr "Αποτυχία λήψης πορείας στοίβας"
+
+#~ msgid "Loading Grey Ascii PNM image is not yet implemented."
+#~ msgstr "Η φόρτωση εικόνας Grey Ascii PNM δεν έχει υλοποιηθεί ακόμα."
+
+#~ msgid "Loading Grey Raw PNM image is not yet implemented."
+#~ msgstr "Η φόρτωση εικόνας Grey Raw PNM δεν έχει υλοποιηθεί ακόμα."
+
+#~ msgid "Cannot wait on thread to exit."
+#~ msgstr "Δεν είναι δυνατή η αναμονή για τον τερματισμό του νήματος."
+
+#~ msgid "Could not load Rich Edit DLL '%s'"
+#~ msgstr "Δεν ήταν δυνατή η φόρτωση του Rich DLL '%s'"
+
+#~ msgid "ZIP handler currently supports only local files!"
+#~ msgstr "ο χειριστής ZIP προς το παρόν υποστηρίζει μόνο τοπικά αρχεία!"
+
+#~ msgid ""
+#~ "can't seek on file descriptor %d, large files support is not enabled."
+#~ msgstr ""
+#~ "αδύνατη η αναζήτηση(seek) στον περιγραφέα(descriptor) αρχείου %d, η "
+#~ "υποστήριξη μεγάλων αρχείων δεν είναι ενεργοποιημένη."
+
+#~ msgid "More..."
+#~ msgstr "Περισσότερα..."
+
+#~ msgid "Setup"
+#~ msgstr "Οργάνωση(Setup)"
+
+#~ msgid "/#SYSTEM"
+#~ msgstr "/#SYSTEM"
+
+#~ msgid "GetUnusedColour:: No Unused Color in image "
+#~ msgstr "GetUnusedColour:: Κανένα Αχρησιμοποίητο Χρώμα στην εικόνα "
+
+#~ msgid ""
+#~ "Can't create list control window, check that comctl32.dll is installed."
+#~ msgstr ""
+#~ "Δεν είναι δυνατή η δημιουργία του στοιχείου ελέγχου λίστας (list "
+#~ "control). Ελέγξτε ότι το comctl32.dll είναι εγατεστημένο."
+
+#~ msgid "Can't delete value of key '%s'"
+#~ msgstr "Δεν είναι δυνατή η διαγρσφή του κλειδιού '%s'"
+
+#~ msgid "gmtime() failed"
+#~ msgstr "το gmtime() απέτυχε"
+
+#~ msgid "mktime() failed"
+#~ msgstr "η mktime() απέτυχε"
+
+#~ msgid "%d"
+#~ msgstr "%d"
+
+#~ msgid "%d...%d"
+#~ msgstr "%d...%d"
+
+#~ msgid "Can't create dialog using memory template"
+#~ msgstr ""
+#~ "Δεν είναι δυνατή η δημιουργία του διαλόγου με τη χρήση προτύπου μνήμης. "
+#~ "(memory template)"
+
+#~ msgid "Can't create dialog using template '%ul'"
+#~ msgstr ""
+#~ "Δεν είναι δυνατή η δημιουργία του διαλόγου με τη χρήση του προτύπου '%ul'"
+
+#~ msgid "Did you forget to include wx/os2/wx.rc in your resources?"
+#~ msgstr ""
+#~ "Ξεχάσατε να συμπεριλάβετε (include) το wx/os2/wx.rc στους πόρους σας "
+#~ "(resources) ;"
+
+#~ msgid "Failed to create dialog. Incorrect DLGTEMPLATE?"
+#~ msgstr "Απέτυχε η δημιουργία παράθυρου διαλόγου. Λανθασμένο DLGTEMPLATE ;"
+
+#~ msgid "Fatal error: exiting"
+#~ msgstr "Μοιραίο σφάλμα: έξοδος"
+
+#~ msgid ""
+#~ "HTML files (*.htm)|*.htm|HTML files (*.html)|*.html|Help books (*.htb)|*."
+#~ "htb|Help books (*.zip)|*.zip|HTML Help Project (*.hhp)|*.hhp|All files (*."
+#~ "*)|*"
+#~ msgstr ""
+#~ "Αρχεία HTML (*.htm)|*.htm|Αρχεία HTML (*.html)|*.html|Βιβλία βοηθείας (*."
+#~ "htb)|*.htb|Βιβλία βοηθείας (*.zip)|*.zip|Project HTML βοήθειας (*.hhp)|*."
+#~ "hhp|Ολα τα αρχεία (*.*)|*"
+
+#~ msgid "Load file"
+#~ msgstr "Φόρτωση αρχείου"
+
+#~ msgid "Save file"
+#~ msgstr "Αποθήκευση αρχείου"
+
+#~ msgid "illegal scrollbar selector %d"
+#~ msgstr "παράνομος επιλογέας(selector) γραμμής κύλισης(scrollbar) %d"
+
+#~ msgid "wxDllLoader failed to GetSymbol '%s'"
+#~ msgstr "Αποτυχία του wxDllLoader να κάνει GetSymbol '%s'"
+
+#~ msgid "wxDynamicLibrary failed to GetSymbol '%s'"
+#~ msgstr "Αποτυχία του wxDynamicLibrary να κάνει GetSymbol '%s'"
diff --git a/cadxcore/lang/es/cadxcore.mo b/cadxcore/lang/es/cadxcore.mo
new file mode 100644
index 0000000..7dcd059
Binary files /dev/null and b/cadxcore/lang/es/cadxcore.mo differ
diff --git a/cadxcore/lang/es/cadxcore.po b/cadxcore/lang/es/cadxcore.po
new file mode 100644
index 0000000..0aeb277
--- /dev/null
+++ b/cadxcore/lang/es/cadxcore.po
@@ -0,0 +1,8697 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-07-16 08:43+0100\n"
+"PO-Revision-Date: 2014-07-16 08:44+0100\n"
+"Last-Translator: Javier Tovar\n"
+"Language-Team: Metaemotion <ginkgo at metaemotion.com>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-Bookmarks: -1,-1,-1,-1,-1,-1,-1,296,-1,-1\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: ..\\..\n"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr "B/N"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr "B/N inverso"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr "Barten"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr "Cuerpo negro"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr "Cardiac"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr "VR huesos"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr "VR músculos y huesos"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Red Vessels"
+msgstr "VR vasos rojos"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr "Arcoiris gris"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr "Stern"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr "Espectro"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Metal"
+msgstr "Metal caliente"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr "Hierro caliente"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Green"
+msgstr "Verde caliente"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "GE Color"
+msgstr "GE color"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr "PERFusión"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PET"
+msgstr "PET"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr "Flujo"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr "LONI"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr "LONI2"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr "Asimétrico"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "P-Value"
+msgstr "P-Value"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr "ROI"
+
+#: ..\../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr "Intentando desreferencia un puntero nulo"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#: ..\../api/dicom/idicomconformance.cpp:214
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "GIL/DICOM/Conformance"
+msgstr "GIL/DICOM/Conformance"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid "Unable to add supported transfer syntax "
+msgstr "No es posible añadir los transfer syntax soportados "
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid " to SOP Class "
+msgstr " a SOP Class"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr ".. El Transfer Syntax no existe en el modelo: Añádelo primero"
+
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr ".. SOP Class no existe en el modelo: Añádelo primero."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid "Unable to add supported SOP Class "
+msgstr "No es posible añadir el SOP Class soportado"
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " to Modality "
+msgstr " a la Modalidad"
+
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr ".. La modalidad no existe en el modelo: Añádela primero."
+
+#: ..\../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr "Error cargando el fichero de conformidad DICOM"
+
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr "Fichero de conformidad DICOM inválido"
+
+#: ..\../api/iannotator.cpp:97
+msgid "Slice"
+msgstr "Corte"
+
+#: ..\../api/iannotator.cpp:97
+msgid "of"
+msgstr "de"
+
+#: ..\../api/iannotator.cpp:97
+msgid "Volume"
+msgstr "Volumen"
+
+#: ..\../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr "Voxel:"
+
+#: ..\../api/iannotator.cpp:110
+msgid "Image without metric information"
+msgstr "Imagen sin información métrica"
+
+#: ..\../api/iannotator.cpp:119
+msgid "Slice thickness"
+msgstr "Grosor del corte"
+
+#: ..\../api/iannotator.cpp:127
+msgid "Slice location"
+msgstr "Ubicación"
+
+#: ..\../api/iannotator.cpp:139
+msgid "Scale"
+msgstr "Escala"
+
+#: ..\../api/iannotator.cpp:147
+msgid "Right"
+msgstr "Derecha"
+
+#: ..\../api/iannotator.cpp:149
+msgid "Left"
+msgstr "Izquierda"
+
+#: ..\../api/iannotator.cpp:169
+msgid "%Y-%m-%d"
+msgstr "%d/%m/%Y"
+
+#: ..\../api/iannotator.cpp:177
+msgid "%H:%M:%S"
+msgstr "%H:%M:%S"
+
+#: ..\../api/iannotator.cpp:245
+msgid "Position:"
+msgstr "Posición:"
+
+#: ..\../api/iannotator.cpp:299
+msgid "Value:"
+msgstr "Valor:"
+
+#: ..\../api/iexception.cpp:52
+msgid "Exception in component"
+msgstr "Excepción en el componente"
+
+#: ..\../api/initwx.cpp:439
+msgid "Initializing environment ..."
+msgstr "Inicializando entorno..."
+
+#: ..\../api/initwx.cpp:446 ..\../api/initwx.cpp:447 ..\../api/initwx.cpp:448
+#: ..\../api/initwx.cpp:449 ..\../api/initwx.cpp:450 ..\../api/initwx.cpp:451
+#: ..\../api/initwx.cpp:452 ..\../api/initwx.cpp:453
+msgid "Ginkgo CADx restrictions"
+msgstr "Restricciones de Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr "Abrir una pestaña para cada estudio"
+
+#: ..\../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr "Modo anónimo (el historial se limpia al cerrar Ginkgo CADx)"
+
+#: ..\../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr "Número máximo de pestañas abiertas"
+
+#: ..\../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr "Segundos máximos de inactividad de Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr "Cerrar automáticamente Ginkgo CADx después de dicomizar"
+
+#: ..\../api/initwx.cpp:451
+msgid "Export images"
+msgstr "Exportar imágenes"
+
+#: ..\../api/initwx.cpp:452
+msgid "Acquire DICOM files"
+msgstr "Adquiriendo ficheros DICOM"
+
+#: ..\../api/initwx.cpp:453
+msgid "Import files to DICOM format"
+msgstr "Importar ficheros a formato DICOM"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "Online manual"
+msgstr "Manual en línea"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "URL of manual"
+msgstr "URL del manual"
+
+#: ..\../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr "doc\\manual_ginkgo_cadx_pro_es.pdf"
+
+#: ..\../api/initwx.cpp:459
+msgid "Online support"
+msgstr "Soporte online"
+
+#: ..\../api/initwx.cpp:459
+msgid "URL of online support"
+msgstr "URL del soporte en línea"
+
+#: ..\../api/initwx.cpp:459
+msgid "http://ginkgo-cadx.com/"
+msgstr "http://ginkgo-cadx.com/"
+
+#: ..\../api/initwx.cpp:460 ..\../api/initwx.cpp:461
+msgid "Program Updates"
+msgstr "Actualizaciones del programa"
+
+#: ..\../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr "Avisar de nuevas actualizaciones de Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:461
+msgid "Update period (days)"
+msgstr "Periodo de actualización (en días)"
+
+#: ..\../api/initwx.cpp:462
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr "Seguridad"
+
+#: ..\../api/initwx.cpp:462
+msgid "Setup Security"
+msgstr "Configurar Seguridad"
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup"
+msgstr "Mostrar al inicio"
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup default value"
+msgstr "Valor por defecto para mostrar al inicio"
+
+#: ..\../api/initwx.cpp:465 ..\../api/initwx.cpp:466
+#: ..\../main/gui/history3/historypanel3.cpp:328
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr "Herramientas"
+
+#: ..\../api/initwx.cpp:465
+msgid "Settings menu"
+msgstr "Menú de configuración"
+
+#: ..\../api/initwx.cpp:466
+msgid "License menu"
+msgstr "Menú de licencia"
+
+#: ..\../api/initwx.cpp:467 ..\../api/initwx.cpp:468 ..\../api/initwx.cpp:469
+#: ..\../api/initwx.cpp:470 ..\../api/initwx.cpp:471 ..\../api/initwx.cpp:472
+#: ..\../api/initwx.cpp:473 ..\../api/initwx.cpp:474
+msgid "PACS Limits"
+msgstr "Limitaciones del PACS"
+
+#: ..\../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr "Número máximo de respuestas C-Find permitidas"
+
+#: ..\../api/initwx.cpp:468
+msgid "Upload images to a PACS server"
+msgstr "Subir imágenes a un servidor PACS"
+
+#: ..\../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr "Adquirir imágenes desde un servidor PACS"
+
+#: ..\../api/initwx.cpp:470
+msgid "Enable remote PACS configuration"
+msgstr "Habilitar la configuración de PACS"
+
+#: ..\../api/initwx.cpp:471
+msgid "Enable TLS configuration"
+msgstr "Habilitar la configuración TLS"
+
+#: ..\../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr "Restringir la búsqueda sobre un paciente seleccionado"
+
+#: ..\../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr "Restringir el tamaño máximo de descarga por estudio (KB)"
+
+#: ..\../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr "Forzar recodificar a JPEG Lossless al subir al PACS"
+
+#: ..\../api/initwx.cpp:475 ..\../api/initwx.cpp:476 ..\../api/initwx.cpp:477
+#: ..\../api/initwx.cpp:478 ..\../api/initwx.cpp:479 ..\../api/initwx.cpp:480
+msgid "Import"
+msgstr "Importación"
+
+#: ..\../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr "Especificar este Storage SOP Class al dicomizar"
+
+#: ..\../api/initwx.cpp:476
+msgid "Show accession number input"
+msgstr "Mostrar campo de texto de Accession Number"
+
+#: ..\../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr "Nivel de compresión, 0 implica sin compresión (0..14)"
+
+#: ..\../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+"Codec de recompresión (0=JPEG Baseline(default), 1=JPEG Progresivo, 2=JPEG "
+"Lossless)"
+
+#: ..\../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr "No cambiar la codificación de la imagen (si es posible)"
+
+#: ..\../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr "Saltar elpaso de datos demográficos (si es posible)"
+
+#: ..\../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr "Servicio HL7"
+
+#: ..\../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr "Iniciar automáticamente el servicio de envío HL7"
+
+#: ..\../api/initwx.cpp:483 ..\../api/initwx.cpp:484 ..\../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr "Dicomización desde XML"
+
+#: ..\../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr "Enviar mensaje HL7 al importar"
+
+#: ..\../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr "Enviar estudio al PACS al importar"
+
+#: ..\../api/initwx.cpp:485
+msgid "Default ORU template"
+msgstr "Plantilla ORU por defecto"
+
+#: ..\../api/initwx.cpp:488 ..\../api/initwx.cpp:489 ..\../api/initwx.cpp:491
+#: ..\../api/initwx.cpp:493 ..\../api/initwx.cpp:494 ..\../api/initwx.cpp:495
+#: ..\../api/initwx.cpp:496 ..\../api/initwx.cpp:498
+msgid "Style"
+msgstr "Estilo"
+
+#: ..\../api/initwx.cpp:503
+#, c-format
+msgid "Download %s images"
+msgstr "Descargar modalidad %s"
+
+#: ..\../api/initwx.cpp:504 ..\../api/initwx.cpp:508
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+msgid "PACS"
+msgstr "PACS"
+
+#: ..\../api/initwx.cpp:507
+msgid "Download all modalities"
+msgstr "Descargar todas las modalidades"
+
+#: ..\../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr "OpenGL"
+
+#: ..\../api/initwx.cpp:510
+msgid "Enable shaders"
+msgstr "Habilitar shaders"
+
+#: ..\../api/initwx.cpp:513
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+msgid "Ginkgo Cloud"
+msgstr "Ginkgo Cloud"
+
+#: ..\../api/initwx.cpp:513
+msgid "Download from Ginkgo Cloud"
+msgstr "Descargando de Ginkgo Cloud"
+
+#: ..\../api/initwx.cpp:560
+msgid "Tools loading base ..."
+msgstr "Cargando herramientas base..."
+
+#: ..\../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr "Arrancando herramientas..."
+
+#: ..\../api/initwx.cpp:566
+msgid "Loading plugins ..."
+msgstr "Cargando plugins..."
+
+#: ..\../api/initwx.cpp:580
+msgid "Unable to start GinkgoCADx:\n"
+msgstr "No se pudo iniciar GinkgoCADx:\n"
+
+#: ..\../api/initwx.cpp:580 ..\../api/initwx.cpp:621
+msgid "error"
+msgstr "error"
+
+#: ..\../api/initwx.cpp:584
+msgid "Loading resources ..."
+msgstr "Cargando recursos..."
+
+#: ..\../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr "Arrancando servicios..."
+
+#: ..\../api/initwx.cpp:601
+msgid "Configuring environment ..."
+msgstr "Configurando entorno..."
+
+#: ..\../api/initwx.cpp:621
+msgid "Failed to set permissions:\n"
+msgstr "Error al establecer los permisos:\n"
+
+#: ..\../api/initwx.cpp:634
+msgid "Updating ..."
+msgstr "Actualizando..."
+
+#: ..\../api/initwx.cpp:638
+msgid "Interpreting parameters ..."
+msgstr "Interpretando parámetros..."
+
+#: ..\../api/initwx.cpp:689
+msgid "Error unregistering tools: "
+msgstr "Error al des-registrar herramientas: "
+
+#: ..\../api/initwx.cpp:769
+msgid "Starting"
+msgstr "Arrancando"
+
+#: ..\../api/ivista.cpp:36 ..\../commands/comandocarga.cpp:73
+msgid "Loading..."
+msgstr "Cargando..."
+
+#: ..\../api/iwidgets.cpp:268
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ..\../main/gui/import/pasosimportacionbase.cpp:151
+msgid "Name"
+msgstr "Nombre"
+
+#: ..\../api/iwidgets.cpp:285
+msgid "Area"
+msgstr "Área"
+
+#: ..\../api/iwidgets.cpp:302
+msgid "Perimeter"
+msgstr "Perímetro"
+
+#: ..\../api/iwidgets.cpp:316
+msgid "Travel (I)"
+msgstr "Recorrido (I)"
+
+#: ..\../api/iwidgets.cpp:326
+msgid "Travel (M)"
+msgstr "Recorrido (M)"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#: ..\../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr "Threading"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid "Error while running thread: "
+msgstr "Error al arrancar el hilo: "
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid " : "
+msgstr " : "
+
+#: ..\../api/threads/thread.cpp:120
+msgid "Internal error while running thread: "
+msgstr "Error interno al arrancar el hilo: "
+
+#: ..\../api/widgetserializable.cpp:60
+msgid "Creation Date"
+msgstr "Fecha de creación"
+
+#: ..\../api/widgetserializable.cpp:65
+msgid "Modification Date"
+msgstr "Fecha de modificación"
+
+#: ..\../api/widgetserializable.cpp:68
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:40
+msgid "Physician"
+msgstr "Médico"
+
+#: ..\../commands/acquirefromurlcommand.cpp:55
+#: ..\../commands/pacsdownloadcommand.cpp:88
+#: ..\../commands/synchronizationcommand.cpp:70
+msgid "Downloading files ..."
+msgstr "Descargando ficheros..."
+
+#: ..\../commands/acquirefromurlcommand.cpp:69
+#: ..\../commands/synchronizationcommand.cpp:91
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, c-format
+msgid "Downloading file %d"
+msgstr "Descargando fichero %d"
+
+#: ..\../commands/acquirefromurlcommand.cpp:81
+msgid "Error downloading file: "
+msgstr "Error al descargar el fichero: "
+
+#: ..\../commands/acquirefromurlcommand.cpp:95
+#: ..\../commands/pacsdownloadcommand.cpp:114
+#: ..\../commands/synchronizationcommand.cpp:121
+msgid "Internal Error"
+msgstr "Error interno"
+
+#: ..\../commands/acquirefromurlcommand.cpp:115
+msgid "Error downloading files: "
+msgstr "Error al descargar los ficheros:"
+
+#: ..\../commands/autocleaningcommand.cpp:62
+msgid "Cleaning dicomdir..."
+msgstr "Borrando dicomdir..."
+
+#: ..\../commands/cloudcommand.cpp:67
+msgid "Downloading files..."
+msgstr "Descargando ficheros..."
+
+#: ..\../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr "ComandoCloud"
+
+#: ..\../commands/cloudcommand.cpp:183
+msgid "Unknown operation"
+msgstr "Operación desconocida"
+
+#: ..\../commands/cloudcommand.cpp:188
+msgid "Error in cloud operation. See log to get more details..."
+msgstr ""
+"Error en la operación con Ginkgo Cloud. Revise el log para obtener más "
+"detalles..."
+
+#: ..\../commands/cloudcommand.cpp:249
+msgid "Could to retrieve study."
+msgstr "Error al recuperar el estudio."
+
+#: ..\../commands/cloudcommand.cpp:260 ..\../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+"Esta versión de Ginkgo Cadx no es compatible con la versión actual de Ginkgo "
+"Cloud."
+
+#: ..\../commands/cloudcommand.cpp:262
+msgid "Error retrieving study."
+msgstr "Error descargando el estudio."
+
+#: ..\../commands/cloudcommand.cpp:271
+msgid "Study successfully retrieved."
+msgstr "Estudio recuperado con éxito."
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "Speed"
+msgstr "Velocidad"
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "bytes/sec during"
+msgstr "bytes/sec durante"
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "seconds"
+msgstr "segundos"
+
+#: ..\../commands/cloudcommand.cpp:275
+msgid "Empty Response"
+msgstr "Respuesta vacía"
+
+#: ..\../commands/cloudcommand.cpp:289
+msgid "Extracting files..."
+msgstr "Extrayendo ficheros..."
+
+#: ..\../commands/cloudcommand.cpp:313 ..\../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr "Se ha descargado un fichero inválido"
+
+#: ..\../commands/cloudcommand.cpp:383
+msgid "Could to perform query."
+msgstr "Error al realizar la consulta."
+
+#: ..\../commands/cloudcommand.cpp:396
+msgid "Error perfoming the query."
+msgstr "Error al realizar la consulta."
+
+#: ..\../commands/cloudcommand.cpp:405
+msgid "Query successfully performed."
+msgstr "Búsqueda ejecutada con éxito."
+
+#: ..\../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr "Respuesta JSon"
+
+#: ..\../commands/cloudcommand.cpp:472
+msgid "Unknown JSon attribute:"
+msgstr "Atributo JSon desconocido:"
+
+#: ..\../commands/cloudcommand.cpp:482
+msgid "Error parsing JSon: "
+msgstr "Error al interpretar JSon:"
+
+#: ..\../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr "Respuesta nula"
+
+#: ..\../commands/cloudcommand.cpp:515
+#: ..\../commands/openremovableunit.cpp:148 ..\../main/gui/open/abrir.cpp:119
+#: ..\../main/gui/open/abrir.cpp:159 ..\../main/gui/open/opendialogs.cpp:146
+msgid "Storing in the history..."
+msgstr "Incluyendo en el historial..."
+
+#: ..\../commands/comandoactualizaciones.cpp:46
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:536
+msgid "Check Updates"
+msgstr "Comprobar Actualizaciones"
+
+#: ..\../commands/comandoactualizaciones.cpp:136
+msgid "Not enough parameters found on XML"
+msgstr "No se han encontrado suficientes parámetros en el XML"
+
+#: ..\../commands/comandoactualizaciones.cpp:145
+msgid "XML parsing internal error"
+msgstr "Error interno al procesar el XML"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Error checking application updates"
+msgstr "Error al comprobar las actualizaciones de la aplicación"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Ginkgo CADx updates"
+msgstr "Actualizaciones de Ginkgo CADx"
+
+#: ..\../commands/comandoactualizaciones.cpp:170
+msgid "Internal error checking updates"
+msgstr "Error interno al comprobar actualizaciones"
+
+#: ..\../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr "No se ha podido encontrar la serie"
+
+#: ..\../commands/comandocarga.cpp:92 ..\../commands/comandocarga.cpp:96
+msgid "Exception loading:"
+msgstr "Excepción en la carga:"
+
+#: ..\../commands/comandocarga.cpp:100
+msgid "Study malformed or unsupported"
+msgstr "Estudio mal formado o no soportado"
+
+#: ..\../commands/comandocarga.cpp:129 ..\../commands/comandocarga.cpp:139
+msgid "Error loading study: "
+msgstr "Error al cargar el estudio: "
+
+#: ..\../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr "Error al cargar el estudio, memoria insuficiente"
+
+#: ..\../commands/comandocarga.cpp:144
+msgid "Error loading study."
+msgstr "Error al cargar el estudio."
+
+#: ..\../commands/comandocarga.cpp:149
+msgid "Load canceled by user"
+msgstr "Carga cancelada por el usuario"
+
+#: ..\../commands/comandocarga.cpp:156
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+#: ..\../main/gui/history3/historypanel3.cpp:1063
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+msgid "Error loading study"
+msgstr "Error al cargar el estudio"
+
+#: ..\../commands/comandoexportacion.cpp:81
+#: ..\../commands/exporttodicomdircommand.cpp:214
+msgid "Exporting files..."
+msgstr "Exportando imágenes..."
+
+#: ..\../commands/comandoexportacion.cpp:105
+#: ..\../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr "La exportación ha finalizado con éxito"
+
+#: ..\../commands/comandoexportacion.cpp:158
+#, c-format
+msgid "Exporting file %d of %d"
+msgstr "Exportando fichero %d de %d"
+
+#: ..\../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr ""
+"Error al almacenar el fichero, revise los permisos sobre el directorio."
+
+#: ..\../commands/comandoexportacion.cpp:233
+msgid "image_%m-%d-%Y_"
+msgstr "imagen_%d-%m-%Y_"
+
+#: ..\../commands/comandoincluirhistorial.cpp:108
+msgid "Exploring directory ..."
+msgstr "Explorando directorio..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:122
+msgid "Reading DICOMDIR ..."
+msgstr "Leyendo DICOMDIR..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:142
+#: ..\../commands/comandoincluirhistorial.cpp:156
+#: ..\../commands/comandoincluirhistorial.cpp:177
+msgid "Including files in the history .."
+msgstr "Incluyendo en el historial..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:196
+msgid "Exploring directory "
+msgstr "Explorando directorio"
+
+#: ..\../commands/comandoincluirhistorial.cpp:256
+#: ..\../commands/linkhistorycommand.cpp:118
+msgid "Image acquisition finished."
+msgstr "Adquisición de imágenes finalizada."
+
+#: ..\../commands/comandoincluirhistorial.cpp:258
+#, c-format
+msgid "There have been included %d images."
+msgstr "Se han incluido %d imágenes."
+
+#: ..\../commands/comandoincluirhistorial.cpp:261
+#: ..\../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+"\n"
+"Han ocurrido %d errores (mirar el log para una descripción más detallada)"
+
+#: ..\../commands/comandoincluirhistorial.cpp:273
+#: ..\../commands/linkhistorycommand.cpp:133
+msgid "This files doesn't exist:"
+msgstr "Este fichero no existe: "
+
+#: ..\../commands/comandoincluirhistorial.cpp:284
+#: ..\../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr "Estos ficheros no tienen formato DICOM:"
+
+#: ..\../commands/comandoincluirhistorial.cpp:296
+#: ..\../commands/linkhistorycommand.cpp:156
+msgid "This files are Dicom Dirs:"
+msgstr "Estos ficheros son Dicom Dirs:"
+
+#: ..\../commands/comandopacs.cpp:58 ..\../commands/pacsdownloadcommand.cpp:61
+#: ..\../commands/sendpacscommand.cpp:137
+msgid "There is not any Remote PACS configured"
+msgstr "No existe ningún servidor PACS configurado"
+
+#: ..\../commands/comandopacs.cpp:84
+msgid "Querying PACS ..."
+msgstr "Consultando PACS ..."
+
+#: ..\../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr ""
+"Error al acceder al controlador del subsistema de integración: (GIL::DICOM)."
+
+#: ..\../commands/comandopacs.cpp:98
+msgid "Starting Search ..."
+msgstr "Comenzando búsqueda..."
+
+#: ..\../commands/comandopacs.cpp:108
+#: ..\../commands/pacsdownloadcommand.cpp:101
+msgid "Server ID not found. ID = "
+msgstr "No se encontró el ID de servidor. ID = "
+
+#: ..\../commands/comandopacs.cpp:110 ..\../commands/comandopacs.cpp:112
+#: ..\../commands/comandopacs.cpp:114 ..\../commands/comandopacs.cpp:116
+msgid "Query error with PACS Id "
+msgstr "Error en la petición con Id PACS "
+
+#: ..\../commands/comandopacs.cpp:116
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error"
+msgstr "Error interno"
+
+#: ..\../commands/comandopacs.cpp:135
+msgid "Failed to perform search: "
+msgstr "Error al realizar la búsqueda: "
+
+#: ..\../commands/dbmigrationcommand.cpp:94
+#: ..\../commands/dbmigrationcommand.cpp:103
+msgid "Migrating old DICOM Dir ..."
+msgstr "Migrando DICOMDIR antiguo ..."
+
+#: ..\../commands/dbmigrationcommand.cpp:99
+#: ..\../commands/dbmigrationcommand.cpp:108
+msgid "Including files ..."
+msgstr "Incluyendo ficheros ..."
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+"Migración completada satisfactoriamente. Ahora Ginkgo CADx borrará el "
+"fichero:\n"
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+"y todos sus subdirectorios\n"
+"¿Desea confirmar el borrado?"
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+#: ..\../commands/dicomizecommand.cpp:181
+#: ..\../commands/openremovableunit.cpp:74
+#: ..\../commands/openremovableunit.cpp:110
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../commands/pdfextractercommand.cpp:130
+#: ..\../main/controllers/historycontroller.cpp:447
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+#: ..\../main/controllers/historycontroller.cpp:1976
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ..\../main/gui/login/dialogologin.cpp:50
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ..\../main/gui/open/opendialogs.cpp:58
+#: ..\../main/gui/open/opendialogs.cpp:62
+#: ..\../main/gui/open/opendialogs.cpp:134
+#: ..\../main/gui/progress/statusbarprogreso.cpp:284
+#: ..\../main/gui/progress/statusbarprogreso.cpp:287
+#: ..\../main/gui/progress/statusbarprogreso.cpp:292
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Info"
+msgstr "Info"
+
+#: ..\../commands/dbmigrationcommand.cpp:123
+msgid "Migration finisthed successfully"
+msgstr "La migración ha finalizado correctamente"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:27
+#: ..\../commands/dialogopathssobreescribirbase.cpp:62
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid "Overwrite"
+msgstr "Sobreescribir"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr " ¿Desea sobreescribirlos?"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:65
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ..\../main/gui/history3/historypanel3base.cpp:339
+#: ..\../main/gui/history3/historypanel3base.cpp:415
+#: ..\../main/gui/history3/historypanel3base.cpp:486
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ..\../main/gui/open/opendialogsbase.cpp:53
+#: ..\../main/gui/open/opendialogsbase.cpp:131
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ..\../widgets/gui/calibracionbase.cpp:86
+#: ..\../widgets/gui/selecciontextobase.cpp:60
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: ..\../commands/dicomizationcompletebase.cpp:24
+#: ..\../commands/dicomizationcompletebase.cpp:33
+#: ..\../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr "Dicomización completada"
+
+#: ..\../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr "La dicomización ha finalizado correctamente"
+
+#: ..\../commands/dicomizationcompletebase.cpp:56
+msgid "Don't show this message again"
+msgstr "No volver a mostrar este mensaje"
+
+#: ..\../commands/dicomizationcompletebase.cpp:62
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ..\../main/gui/history3/historypanel3base.cpp:411
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ..\../widgets/gui/calibracionbase.cpp:82
+#: ..\../widgets/gui/selecciontextobase.cpp:56
+msgid "Accept"
+msgstr "Aceptar"
+
+#: ..\../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr "Paso 1 de 3: Importando imágenes"
+
+#: ..\../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr "Paso 2 de 3: Copiando imágenes"
+
+#: ..\../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr "Paso 3 de 3: Subiendo imágenes"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid "Import process failed:"
+msgstr "El proceso de importación ha fallado:"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+"\n"
+"¿Desea reintentarlo?"
+
+#: ..\../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr "Importando..."
+
+#: ..\../commands/dicomizecommand.cpp:370
+msgid "Unknown error in dicomization process"
+msgstr "Error desconocido en el proceso de dicomización"
+
+#: ..\../commands/dicomizecommand.cpp:431
+#: ..\../commands/dicomizecommand.cpp:442
+#: ..\../commands/sendpacscommand.cpp:185
+msgid "Error sending evidences:"
+msgstr "Error al enviar evidencias: "
+
+#: ..\../commands/dicomizecommand.cpp:437
+#: ..\../commands/dicomizecommand.cpp:448
+msgid "Can not upload to the PACS:\n"
+msgstr "No se ha podido subir al PACS:\n"
+
+#: ..\../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+"No se ha podido subir al PACS:\n"
+"Error interno"
+
+#: ..\../commands/exporttodicomdircommand.cpp:261
+#: ..\../commands/exporttodicomdircommand.cpp:338
+#, c-format
+msgid "Exporting series %d of %d"
+msgstr "Exportando serie %d de %d"
+
+#: ..\../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr "Alguna de las series seleccionadas ha sido eliminada"
+
+#: ..\../commands/exporttodicomdircommand.cpp:279
+#: ..\../commands/exporttodicomdircommand.cpp:385
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+msgid "There was an error creating directory"
+msgstr "Se ha producido un error al crear el directorio"
+
+#: ..\../commands/exporttodicomdircommand.cpp:303
+#: ..\../commands/exporttodicomdircommand.cpp:408
+msgid "There was an error writing file"
+msgstr "Ha ocurrido un error al escribir el fichero"
+
+#: ..\../commands/exporttodicomdircommand.cpp:358
+msgid "There was an error anonymizing files"
+msgstr "Ha ocurrido un error al anonimizar los ficheros"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr "el elemento patient id no existe en el conjunto de datos"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr "el elemento study instance uid no existe en el conjunto de datos"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr "el elemento series instance uid no existe en el conjunto de datos"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr "el elemento sop instance uid no existe en el conjunto de datos"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Ignoring incoming operation "
+msgstr "Ignorando la operación entrante"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:298
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr "No implementado"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:473
+#: ..\../commands/pacsdownloadcommand.cpp:170
+#: ..\../commands/pacsdownloadcommand.cpp:179
+msgid "Including files..."
+msgstr "Incluyendo ficheros..."
+
+#: ..\../commands/linkhistorycommand.cpp:68
+msgid "Linking study..."
+msgstr "Enlazando estudio..."
+
+#: ..\../commands/openremovableunit.cpp:42
+#: ..\../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr "Explorando unidades..."
+
+#: ..\../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+"No se ha encontrado ningún DICOMDIR en las unidades extraíbles.\n"
+"¿Quiere escanear otro directorio recursivamente?"
+
+#: ..\../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+"No se ha encontrado ningún DICOMDIR en las unidades extraíbles.\n"
+"¿Quiere escanear recursivamente la unidad %s?"
+
+#: ..\../commands/openremovableunit.cpp:130
+msgid "Select drive you want to open"
+msgstr "Seleccione la unidad que desea abrir"
+
+#: ..\../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+"Ginkgo CADx ha detectado más de una unidad extraíble,\n"
+"pero ninguna de ellas incluye un DICOMDIR en la raíz.\n"
+"Seleccione la unidad desde la que deseas adquirir recursivamente"
+
+#: ..\../commands/pacsdownloadcommand.cpp:134
+msgid "Error downloading study: "
+msgstr "Error al descargar el estudio: "
+
+#: ..\../commands/pdfextractercommand.cpp:103
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr "Error al extraer el pdf, Ginkgo CADx no puede cargar este formato"
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ..\../main/gui/progress/statusbarprogreso.cpp:278
+#: ..\../widgets/gui/calibracion.cpp:205 ..\../widgets/gui/calibracion.cpp:209
+#: ..\../widgets/gui/calibracion.cpp:219 ..\../widgets/gui/calibracion.cpp:225
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "Error"
+msgstr "Error"
+
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr "No existe ningún lector de pdf registrado en el sistema"
+
+#: ..\../commands/pdfextractercommand.cpp:130
+msgid "PDF files extracted successfully..."
+msgstr "PDF extraido con éxito..."
+
+#: ..\../commands/secondarycapturedicomizecommand.cpp:73
+msgid "Ginkgo CADx Secondary Capture"
+msgstr "Captura Secundaria de Ginkgo CADx"
+
+#: ..\../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr "Enviando mensaje HL7 %d de %d"
+
+#: ..\../commands/sendhl7command.cpp:73
+msgid "Message successfully sent"
+msgstr "Mensaje enviado con éxito"
+
+#: ..\../commands/sendhl7command.cpp:77
+msgid "Unknown protocol"
+msgstr "Protocolo desconocido"
+
+#: ..\../commands/sendhl7command.cpp:80 ..\../commands/sendhl7command.cpp:93
+#: ..\../commands/sendhl7command.cpp:145
+msgid "Error sending message:"
+msgstr "Error al enviar mensaje: "
+
+#: ..\../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr "Error al enviar el mensaje HL7 (ver log para más información)"
+
+#: ..\../commands/sendhl7command.cpp:93 ..\../commands/sendhl7command.cpp:94
+msgid "Unknown error"
+msgstr "Error desconocido"
+
+#: ..\../commands/sendhl7command.cpp:134
+msgid "Failed to start connection"
+msgstr "Error al iniciar la conexión"
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid "Error sending message. It was sent "
+msgstr "Error al enviar mensaje. Se enviaron "
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr " bytes de un total de "
+
+#: ..\../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr ""
+"Error en la lógica de confirmación. El identificador del mensaje no se "
+"corresponde"
+
+#: ..\../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr "NACK recibido: "
+
+#: ..\../commands/sendhl7command.cpp:258
+msgid "Failed delivery confirmation:"
+msgstr "Error en la confirmación de entrega: "
+
+#: ..\../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr ""
+"Error en la confirmación de entrega: Entrega no reconocida por el extremo "
+"remoto"
+
+#: ..\../commands/sendpacscommand.cpp:51
+msgid "Send files to PACS"
+msgstr "Envío de ficheros al PACS"
+
+#: ..\../commands/sendpacscommand.cpp:155
+msgid "Uploading files ..."
+msgstr "Subiendo ficheros..."
+
+#: ..\../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr "Error: Entrada de configuración del PACS no encontrada: "
+
+#: ..\../commands/sendpacscommand.cpp:181
+msgid "Error:"
+msgstr "Error: "
+
+#: ..\../commands/sendpacscommand.cpp:189
+msgid "Error sending evidences: Internal error."
+msgstr "Error al enviar evidencias: Error interno."
+
+#: ..\../commands/sendpacscommand.cpp:203
+msgid "Error uploading the study to PACS: "
+msgstr "Error al subir el estudio al PACS: "
+
+#: ..\../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+"\n"
+"¿Desea reintentarlo (se reintentará automáticamente en %d segundos)?"
+
+#: ..\../commands/sendpacscommand.cpp:206
+msgid "Retry send to PACS"
+msgstr "Reintentar el envío al PACS"
+
+#: ..\../commands/synchronizationcommand.cpp:104
+msgid "Error downloading file"
+msgstr "Error al descargar el fichero"
+
+#: ..\../commands/synchronizationcommand.cpp:141
+msgid "Error synchronizing study: "
+msgstr "Error al sincronizar el estudio: "
+
+#: ..\../commands/thumbnailscommand.cpp:107
+#: ..\../commands/thumbnailscommand.cpp:133
+#: ..\../commands/thumbnailscommand.cpp:247
+#: ..\../commands/thumbnailscommand.cpp:376
+#: ..\../commands/thumbnailscommand.cpp:382
+#: ..\../main/gui/import/selectimagesimportation.cpp:504
+msgid "Creating Thumbnail..."
+msgstr "Generando thumbnail..."
+
+#: ..\../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr "Generando thumbnail..."
+
+#: ..\../export/tools/iaddfiletohistorytool.cpp:19
+#: ..\../main/gui/history3/historypanel3.cpp:632
+msgid "Open study"
+msgstr "Abrir estudio"
+
+#: ..\../export/tools/iangletool.cpp:19
+msgid "Angle \tCtrl+A"
+msgstr "Ángulo \tCtrl+A"
+
+#: ..\../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr "Brillo/contraste \tCtrl+B"
+
+#: ..\../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr "Rotar cámara"
+
+#: ..\../export/tools/icolormaptool.cpp:20
+msgid "Color Map"
+msgstr "Mapa de color"
+
+#: ..\../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ..\../main/gui/open/opendialogsbase.cpp:46
+#: ..\../main/gui/open/opendialogsbase.cpp:198
+msgid "Copy"
+msgstr "Copiar"
+
+#: ..\../export/tools/icornerannotationstool.cpp:20
+msgid "Window annotations"
+msgstr "Anotaciones de la ventana"
+
+#: ..\../export/tools/idetachwindowtool.cpp:19
+msgid "Detach window"
+msgstr "Desencajar ventana"
+
+#: ..\../export/tools/iimageexporttool.cpp:19
+msgid "Export image..."
+msgstr "Exportar imagen..."
+
+#: ..\../export/tools/imarkertool.cpp:20
+msgid "Marking Tools \tCtrl+M"
+msgstr "Herramientas de marcado \tCtrl+M"
+
+#: ..\../export/tools/imetricgridtool.cpp:20
+msgid "Metric grid"
+msgstr "Rejilla métrica"
+
+#: ..\../export/tools/inotetool.cpp:19
+msgid "Text Note \tCtrl+N"
+msgstr "Nota de texto \tCtrl+N"
+
+#: ..\../export/tools/ipacsuploadtool.cpp:19
+msgid "Upload study..."
+msgstr "Subir estudio..."
+
+#: ..\../export/tools/ipixelsbluringtool.cpp:20
+msgid "Pixels blurring"
+msgstr "Suavizado de pixels"
+
+#: ..\../export/tools/ipointertool.cpp:19
+msgid "Pointer \tEsc"
+msgstr "Puntero \tEsc"
+
+#: ..\../export/tools/iqueryretrievetool.cpp:19
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#: ..\../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr "Adquirir un estudio DICOM desde el PACS"
+
+#: ..\../export/tools/iresettool.cpp:19
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+msgid "Reset"
+msgstr "Reset"
+
+#: ..\../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr "Rotar y voltear"
+
+#: ..\../export/tools/iruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr "Regla \tCtrl+R"
+
+#: ..\../export/tools/isecondarycapturetool.cpp:19
+msgid "Save snapshot as new series..."
+msgstr "Guardar captura como nueva serie..."
+
+#: ..\../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr "Mostrar historial \tAlt+h"
+
+#: ..\../export/tools/ishowtagstool.cpp:19
+#: ..\../main/tools/showtagshistorytool.cpp:27
+msgid "DICOM inspector"
+msgstr "Inspector DICOM"
+
+#: ..\../export/tools/isimpleprinttool.cpp:19
+#: ..\../main/tools/simpleprinttool.cpp:226
+msgid "Print"
+msgstr "Imprimir"
+
+#: ..\../export/tools/istartdicomizationtool.cpp:19
+msgid "Dicomize..."
+msgstr "Dicomizar..."
+
+#: ..\../export/tools/itoolpan.cpp:19
+msgid "Pan \tCtrl+P"
+msgstr "Mover \tCtrl+P"
+
+#: ..\../export/tools/itoolslider.cpp:19
+msgid "Slider \tCtrl+S"
+msgstr "Desplazamiento \tCtrl+S"
+
+#: ..\../export/tools/itoolwindowlevel.cpp:19
+msgid "Window/Level \tCtrl+W"
+msgstr "Window/Level \tCtrl+W"
+
+#: ..\../export/tools/itoolzoom.cpp:19
+msgid "Zoom \tCtrl+O"
+msgstr "Zoom \tCtrl+O"
+
+#: ..\../export/tools/itrackballtool.cpp:19
+msgid "Trackball \tCtrl+T"
+msgstr "Trackball \tCtrl+T"
+
+#: ..\../export/tools/iundotool.cpp:20 ..\../main/tools/undotool.cpp:109
+msgid "Undo"
+msgstr "Deshacer "
+
+#: ..\../export/tools/ivideotool.cpp:19
+msgid "Video \tCtrl+Space"
+msgstr "Vídeo \tCtrl+Espacio"
+
+#: ..\../export/tools/iwindowlayouttool.cpp:20
+msgid "Window layout"
+msgstr "Layout de la ventana"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid "Studies with"
+msgstr "Estudios con "
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr " componentes no soportados"
+
+#: ..\../main/controllers/controladorcarga.cpp:210
+msgid "Reading properties"
+msgstr "Interpretando propiedades"
+
+#: ..\../main/controllers/controladorcarga.cpp:219
+#: ..\../main/controllers/controladorcarga.cpp:642
+#: ..\../main/controllers/controladorcarga.cpp:888
+#: ..\../main/controllers/streaming/streamingloader.cpp:600
+msgid "Error reading the study: "
+msgstr "Error al leer el estudio."
+
+#: ..\../main/controllers/controladorcarga.cpp:224
+#: ..\../main/controllers/controladorcarga.cpp:229
+#: ..\../main/controllers/controladorcarga.cpp:647
+#: ..\../main/controllers/controladorcarga.cpp:893
+msgid "Internal error reading the study: "
+msgstr "Error interno al leer el estudio: "
+
+#: ..\../main/controllers/controladorcarga.cpp:269
+#: ..\../main/controllers/controladorcarga.cpp:281
+#: ..\../main/controllers/controladorcarga.cpp:905
+msgid "Spacing is not valid: ("
+msgstr "El espaciado de la imagen es inválido: ("
+
+#: ..\../main/controllers/controladorcarga.cpp:305
+#: ..\../main/controllers/controladorcarga.cpp:338
+#: ..\../main/controllers/controladorcarga.cpp:372
+#: ..\../main/controllers/controladorcarga.cpp:408
+#: ..\../main/controllers/controladorcarga.cpp:441
+#: ..\../main/controllers/controladorcarga.cpp:474
+#: ..\../main/controllers/controladorcarga.cpp:507
+#: ..\../main/controllers/controladorcarga.cpp:540
+#: ..\../main/controllers/controladorcarga.cpp:573
+#: ..\../main/controllers/controladorcarga.cpp:606
+#: ..\../main/controllers/controladorcarga.cpp:935
+msgid "Error loading the study: Out of memory"
+msgstr "Error al cargar el estudio: Memoria insuficiente"
+
+#: ..\../main/controllers/controladorcarga.cpp:375
+msgid "Error loading the study: Internal Error"
+msgstr "Error al cargar el estudio: Error interno"
+
+#: ..\../main/controllers/controladorcarga.cpp:630
+#: ..\../main/controllers/streaming/streamingloader.cpp:1023
+#: ..\../main/controllers/streaming/streamingloader.cpp:1223
+#: ..\../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr "Error al leer el estudio: Formato de pixel no soportado"
+
+#: ..\../main/controllers/controladorcarga.cpp:651
+#: ..\../main/controllers/controladorcarga.cpp:960
+msgid "Process canceled by user."
+msgstr "Proceso cancelado por el usuario."
+
+#: ..\../main/controllers/controladorcarga.cpp:878
+msgid "Interpreting properties"
+msgstr "Interpretando propiedades"
+
+#: ..\../main/controllers/controladorcarga.cpp:917
+msgid "Spacing of the image is invalid: ("
+msgstr "El espaciado de la imagen es inválido: ("
+
+#: ..\../main/controllers/controladorcarga.cpp:942
+msgid "Reading dataset"
+msgstr "Leyendo dataset"
+
+#: ..\../main/controllers/controladorcarga.cpp:951
+msgid "Error reading the study:"
+msgstr "Error al leer el estudio: "
+
+#: ..\../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr "Error interno al leer el estudio: "
+
+#: ..\../main/controllers/controladorcarga.cpp:972
+msgid "load"
+msgstr "carga"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:40
+msgid "Stopping HL7 sender"
+msgstr "Parando servicio de envío HL7"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:63
+#: ..\../main/controllers/controladorenviohl7.cpp:76
+msgid "Error starting HL7 sender"
+msgstr "Error al inciciar el servicio de envío HL7"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:65
+#: ..\../main/controllers/controladorenviohl7.cpp:78
+msgid "HL7 sender started"
+msgstr "Servicio de envío HL7 iniciado"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:108
+msgid "HL7 controller destroyed"
+msgstr "Controlador HL7 destruído"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:150
+msgid "Error processing message"
+msgstr "Error al procesar el mensaje"
+
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/controllers/pacscontroller.cpp:1549
+#: ..\../main/controllers/pacscontroller.cpp:1553
+#: ..\../main/controllers/pacscontroller.cpp:1557
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:184
+msgid "Unknown"
+msgstr "Desconocido"
+
+#: ..\../main/controllers/controladorextensiones.cpp:110
+msgid "Loading"
+msgstr "Cargando"
+
+#: ..\../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr "No se pudo cargar la biblioteca. "
+
+#: ..\../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr "No se pudo cargar la biblioteca. Compruebe el log"
+
+#: ..\../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr "El descriptor de la extensión no coincide"
+
+#: ..\../main/controllers/controladorextensiones.cpp:153
+msgid "Could not find entry point"
+msgstr "No se pudo encontrar el punto de entrada"
+
+#: ..\../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr "Ignorando extensión con SID duplicado:"
+
+#: ..\../main/controllers/controladorhl7.cpp:74
+msgid "Integration engine hostname not set"
+msgstr "Hostname del motor de integración no configurado"
+
+#: ..\../main/controllers/controladorhl7.cpp:77
+msgid "Integration engine port not set"
+msgstr "Puerto del motor de integración no configurado"
+
+#: ..\../main/controllers/controladorhl7.cpp:91
+msgid "Unsupported protocol"
+msgstr "Protocolo no soportado"
+
+#: ..\../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr "Error al insertar el mensaje en la cola, consulte a su proveedor"
+
+#: ..\../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr "Se han encontrado %d resultados"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, c-format
+msgid "Downloading file %d/%d"
+msgstr "Descargando fichero %d/%d"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr "Se ha excedido el tamaño límite de descarga"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr "No se ha podido reservar memorioa para la dicomización del PDF"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr "No se ha podido reservar memorioa para la dicomización de la imagen"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+msgid "Image format not supported"
+msgstr "Formato de imagen no soportado"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr "No ha sido posible crear la capa de transporte TLS"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr "La clave privada y el certificado no coinciden"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr "Error al configurar la capa TLS: "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:200
+msgid "Receiving Association failed: "
+msgstr "La asociación receptora ha fallado: "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:209
+msgid "Association received"
+msgstr "Asociación recibida"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:210
+msgid "Parameters:"
+msgstr "Parámetros"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr "Asociación Rechazada: Application Context Name incorrecto: "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr "Asociación rechazada: no se ha provisto de Implementation Class UID"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr "Asociación Admitida (Max Send PDV: "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ")"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:274
+msgid "No valid presentation contexts"
+msgstr "No se obtuvieron contextos de presentación válidos"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "Association(dicom://"
+msgstr "Association(dicom://"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr "@"
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr "Ginkgo CADx no puede comprimir desde "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr " hasta "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, c-format
+msgid "Uploading file %d of %d"
+msgstr "Subiendo fichero %d de %d"
+
+#: ..\../main/controllers/dicommanager.cpp:504
+#: ..\../main/controllers/dicommanager.cpp:531
+msgid "Extracting file..."
+msgstr "Extrayendo el fichero..."
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid "Error creating history database "
+msgstr "Error al crear la base de datos del historial"
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr " probando temporal"
+
+#: ..\../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+"No tiene permisos para escribir en el DICOM DIR, las preferencias se "
+"almacenaran en el directorio temporal"
+
+#: ..\../main/controllers/historycontroller.cpp:343
+msgid "Error creating dicomDir database "
+msgstr "Error al crear la base de datos del DICOM Dir"
+
+#: ..\../main/controllers/historycontroller.cpp:425
+#: ..\../main/controllers/historycontroller.cpp:441
+msgid "Error creating thumbnails database "
+msgstr "Error al crear la base de datos de thumbnails"
+
+#: ..\../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr "Error al crear la base de datos: \n"
+
+#: ..\../main/controllers/historycontroller.cpp:560
+msgid "Including image "
+msgstr "Incluyendo imagen "
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr " de "
+
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid "Linking image "
+msgstr "Enlazando imagen"
+
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr "Error al leer el estudio. \n"
+
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr "Error al eliminar la serie de la base de datos: \n"
+
+#: ..\../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr "Error al vaciar el historial: \n"
+
+#: ..\../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+"Ginkgo CADx ha detectado inactividad y se cerrará en %d segundos.\n"
+"¿Desea continuar?"
+
+#: ..\../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr "¡Error fatal! No se pueden registrar dos parsers con la misma clave"
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+msgid "Malformed template Id ("
+msgstr "Id de plantilla mal formado ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+"):\n"
+"No es un identificador HL7 válido (ej: codigo^description^namespaceId)"
+
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr "Id de plantilla mal formado en la configuración del módulo "
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid "Template Id unsupported ("
+msgstr "Id de plantilla no soportado ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr ""
+"):\n"
+"Revise la configuración y asócielo si lo considera necesario"
+
+#: ..\../main/controllers/integrationcontroller.cpp:566
+msgid "Unknown module Id ("
+msgstr "Id de módulo desconocido ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:592
+msgid "Empty configuration"
+msgstr "Configuración vacía"
+
+#: ..\../main/controllers/integrationcontroller.cpp:631
+msgid "XML Parser Not Found. Key="
+msgstr "XML Parser No encontrado. Clave="
+
+#: ..\../main/controllers/log4cplus/guiappender.cpp:75
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr "%d/%m/%Y %H:%M:%S.%q"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ..\../main/gui/history3/historypanel3base.cpp:48
+#: ..\../main/gui/import/pasosimportacionbase.cpp:227
+msgid "Patient"
+msgstr "Paciente"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+msgid "Patient ID"
+msgstr "Id del paciente"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:86
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ..\../main/gui/history3/historypanel3.cpp:227
+#: ..\../main/gui/open/opendialogs.cpp:50
+msgid "Modality"
+msgstr "Modalidad"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:98
+msgid "Dimensions"
+msgstr "Dimensiones"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:109
+#, c-format
+msgid "Made with %s"
+msgstr "Hecho con %s"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:167
+#: ..\../main/controllers/modalitysettingscontroller.cpp:338
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr "Valor por defecto"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr "Auto calcular"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr "COLUMNA"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr "CRÁNEO"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr "HUESO"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr "HUESO DEL CRÁNEO"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr "MEDIASTINO"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr "PULMÓN"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr "PECHO"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr "VERTEBRA"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr "ANGIO"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr "CT CRÁNEO"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr "T1 CRÁNEO"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr "T2 CRÁNEO"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr "RODILLA"
+
+#: ..\../main/controllers/pacscontroller.cpp:1212
+msgid "Downloading file"
+msgstr "Descargando fichero"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Error downloading WADO file"
+msgstr "Error al descargar el fichero WADO"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Check PACS configuration"
+msgstr "Compruebe la configuración del PACS"
+
+#: ..\../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr "Nivel de query/retrieve desconocido"
+
+#: ..\../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr "Nivel de query/retrieve no especificado"
+
+#: ..\../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr "Error al procesar la petición HTTP"
+
+#: ..\../main/controllers/pacscontroller.cpp:1428
+msgid "Invalid HTTP response"
+msgstr "Respuesta HTTP inválida"
+
+#: ..\../main/controllers/pacscontroller.cpp:1433
+msgid "Invalid HTTP code"
+msgstr "Código HTTP inválido"
+
+#: ..\../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr "No se puede iniciar el subsistema HTTP"
+
+#: ..\../main/controllers/pacscontroller.cpp:1472
+msgid "PACS-Service"
+msgstr "Servicio-PACS"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:97
+#: ..\../main/controllers/parserxmlspanish.cpp:94
+msgid "Omitted Identificator"
+msgstr "Identificador omitido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:105
+#: ..\../main/controllers/parserxmlspanish.cpp:102
+msgid "Omitted AET"
+msgstr "AET omitida"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:113
+#: ..\../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr "Hostname omitido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:121
+#: ..\../main/controllers/parserxmlspanish.cpp:118
+msgid "Omitted port"
+msgstr "Puerto omitido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:206
+#: ..\../main/controllers/parserxmlenglish.cpp:237
+#: ..\../main/controllers/parserxmlspanish.cpp:188
+#: ..\../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr "El tamaño de pdu no es un número válido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:212
+#: ..\../main/controllers/parserxmlspanish.cpp:194
+msgid "Port is not a valid number"
+msgstr "El valor de puerto no es un número valido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:248
+#: ..\../main/controllers/parserxmlspanish.cpp:228
+msgid "The port is not a valid number"
+msgstr "El valor de puerto no es un número valido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:265
+#: ..\../main/controllers/parserxmlspanish.cpp:246
+msgid "Setting not found"
+msgstr "Configuración no encontrada"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr "Atributo \"action\" inválido al procesar tag \"gnkworkflow\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr "Atributo \"action\" no especificado al procesar tag \"gnkworkflow\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr "Atributo \"pacs_retrieve_sid\" vacío al procesar tag \"gnkworkflow\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr "Atributo \"pacs_store_sid\" vacío al procesar tag \"gnkworkflow\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr ""
+"Atributo \"value\" no especificado al procesar tag \"query-retrieve-level/id"
+"\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:391
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr "Atributo \"code\" no especificado al procesar tag \"patient\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:427
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr "Atributo \"code\" no especificado al procesar tag \"physician\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:434
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr "Atributo \"value\" no especificado al procesar tag \"physician\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:445
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr "Atributo \"iid\" no especificado al procesar tag \"institution\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr "Atributo \"code\" no especificado al procesar tag \"metadata\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:483
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr "Atributo \"key\" no especificado al procesar tag \"metadata\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:548
+#: ..\../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr "Debe especificar los atributos que deseas usar en la consulta"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:552
+#: ..\../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr "Se ha leído un tag \"patient\" sin identificadores"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:570
+#: ..\../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr ""
+"Se tiene que definir un PACS por defecto en en menú de configuración o en el "
+"XML de integración"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr "Atributo \"accion\" inválido al procesar tag \"plantilla\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr "Atributo \"accion\" no especificado al procesar tag \"plantilla\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr "Atributo \"pacs_retrieve_sid\" vacío al procesar tag \"plantilla\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr "Atributo \"pacs_store_sid\" vacío al procesar tag \"plantilla\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:340
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr "Atributo \"uid\" no especificado al procesar tag \"dimse\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr "Atributo \"ambito\" inválido al procesar tag \"medico/id\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr "Atributo \"ambito\" no especificado al procesar tag \"dimse\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:402
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr "Atributo \"codigo\" no especificado al procesar tag \"paciente/id\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:438
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr "Atributo \"codigo\" no especificado al procesar tag \"medico/id\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:445
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr "Atributo \"valor\" no especificado al procesar tag \"medico/id\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr "Atributo \"cid\" no especificado al procesar tag \"centro\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr "Atributo \"aid\" no especificado al procesar tag \"hce\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:486
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr "Atributo \"codigo\" no especificado al procesar tag \"metadato\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr "Atributo \"clave\" no especificado al procesar tag \"metadato\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:524
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr "Atributo \"id_peticion\" no encontrado en el nivel \"gnkworkflow\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr "Atributo \"ambito\" no especificado al procesar tag \"plantilla\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:559
+msgid "id_application expected"
+msgstr "Atributo \"id_aplicacion\" no especificado"
+
+#: ..\../main/controllers/smartretrievecontroller.cpp:126
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:920
+msgid "Downloading from PACS..."
+msgstr "Descargando ficheros..."
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:303
+#: ..\../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+"Error al leer el estudio: El valor más alto de pixel no es coherente con la "
+"combinación de los valores de Pixel Representation y High bit"
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr "Error interno al leer el estudio, formato desconocido"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ..\../main/gui/history3/historytablemodel.cpp:403
+#: ..\../main/gui/history3/historytablemodel.cpp:415
+#: ..\../main/gui/history3/historytablemodel.cpp:470
+#: ..\../main/gui/history3/historytablemodel.cpp:482
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:102
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr "%d/%m/%Y %H:%M:%S"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr "%d/%m/%Y 00:00:00"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+msgid "Exploring PACS..."
+msgstr "Consultando PACS..."
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ..\../main/gui/history3/historypanel3.cpp:225
+#: ..\../main/gui/open/opendialogs.cpp:49
+msgid "Patient id"
+msgstr "Id del paciente"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ..\../main/gui/history3/historypanel3.cpp:224
+#: ..\../main/gui/open/opendialogs.cpp:48
+msgid "Patient name"
+msgstr "Nombre de paciente"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:479
+msgid "Study Instance UID"
+msgstr "UID de estudio"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ..\../main/gui/history3/historypanel3.cpp:231
+#: ..\../main/gui/open/opendialogs.cpp:53
+msgid "Accession number"
+msgstr "Accession number"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:481
+msgid "Study date"
+msgstr "Fecha del estudio"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:482
+msgid "Study time"
+msgstr "Hora del estudio"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:490
+msgid "Series Instance UID"
+msgstr "UID de serie"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:492
+msgid "Series date"
+msgstr "Fecha de la serie"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:493
+msgid "Series time"
+msgstr "Hora de la serie"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:519
+msgid "No results found"
+msgstr "No se obtuvieron resultados"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+msgid "Write query name"
+msgstr "Escriba el nombre de la consulta"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr "Este nombre de consulta está en uso, ¿desea sobreescribirlo?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+msgid "Id"
+msgstr "Id"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+msgid "Date Time"
+msgstr "Fecha Hora"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ..\../main/gui/history3/historypanel3.cpp:229
+#: ..\../main/gui/import/pasosimportacionbase.cpp:298
+#: ..\../main/gui/import/pasosimportacionbase.cpp:340
+#: ..\../main/gui/open/opendialogs.cpp:52
+msgid "Description"
+msgstr "Descripción"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ..\../main/gui/import/pasosimportacionbase.cpp:276
+msgid "Accession Number"
+msgstr "Accession Number"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:210
+msgid "Store query"
+msgstr "Guardar consulta"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:211
+msgid "Remove query"
+msgstr "Eliminar consulta"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:278
+msgid "There is no any PACS configured"
+msgstr "No existe ningún servidor PACS configurado"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr "Acc#"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+msgid "Study UID"
+msgstr "UID de estudio"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+"La búsqueda sin parámetros puede tardar mucho tiempo\n"
+"¿Desea continuar?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid "Search"
+msgstr "Buscar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:519
+msgid "Download series"
+msgstr "Descargar series"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+msgid "Download study"
+msgstr "Descargar estudio"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:535
+msgid "Link series"
+msgstr "Enlazar serie"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:537
+msgid "Link study"
+msgstr "Enlazar estudio"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:551
+msgid "Properties..."
+msgstr "Propiedades..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+msgid "You must specify at least a modality or a period of time"
+msgstr ""
+"Se debe especificar al menos un filtro de modalidad o un periodo de tiempo"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr "Esta consulta se eliminará permanentemente, ¿confirma su eliminación?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+msgid "Select a valid query"
+msgstr "Seleccione una consulta válida"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+msgid "Select a valid PACS Server"
+msgstr "Seleccione un Servidor PACS valido"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid "Download of modality "
+msgstr "Descarga de la modalidad "
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr " no permitido"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr "No está autorizado para descargar este tipo de modalidades."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "Modality download error"
+msgstr "Error de descarga de modalidades"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:786
+msgid "search results"
+msgstr "resultados de la búsqueda"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:913
+msgid "Downloading serie..."
+msgstr "Descargando serie..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:916
+msgid "Downloading study..."
+msgstr "Descargando estudio..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+msgid "PACS acquisition is restricted"
+msgstr "La búsqueda sobre servidores PACS está restringida"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+msgid "Server"
+msgstr "Servidor"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ..\../main/gui/import/pasosimportacionbase.cpp:284
+#: ..\../main/gui/import/pasosimportacionbase.cpp:326
+#: ..\../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr "Fecha"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ..\../main/gui/history3/historypanel3base.cpp:81
+msgid "Any date"
+msgstr "Cualquier fecha"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ..\../main/gui/history3/historypanel3base.cpp:85
+msgid "Today AM"
+msgstr "Hoy mañana"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ..\../main/gui/history3/historypanel3base.cpp:88
+msgid "Today PM"
+msgstr "Hoy tarde"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ..\../main/gui/history3/historypanel3base.cpp:91
+msgid "Today"
+msgstr "Hoy"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ..\../main/gui/history3/historypanel3base.cpp:100
+msgid "Yesterday"
+msgstr "Ayer"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ..\../main/gui/history3/historypanel3base.cpp:103
+msgid "Last 7 days"
+msgstr "Últimos 7 días"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ..\../main/gui/history3/historypanel3base.cpp:106
+msgid "Last 30 days"
+msgstr "Últimos 30 días"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ..\../main/gui/history3/historypanel3base.cpp:109
+msgid "Last 3 months"
+msgstr "Últimos 3 meses"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ..\../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr "Entre:"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ..\../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr "Modalidades"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+msgid "Stored queries"
+msgstr "Consultas almacenadas"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+msgid "Select stored queries..."
+msgstr "Seleccionar consultas almacenadas..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ..\../main/gui/open/opendialogsbase.cpp:50
+#: ..\../main/gui/open/opendialogsbase.cpp:202
+msgid "Link"
+msgstr "Enlace"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr "Sólo disponible en servidores WADO"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+msgid "Download"
+msgstr "Descargar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ..\../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr "Cerrar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+msgid "Series does not exist"
+msgstr "La serie no existe"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr "Estas series se han borrado del historial local"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr "Continuar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ..\../main/gui/open/opendialogsbase.cpp:127
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ..\../main/tools/metricgridtool.cpp:101
+msgid "Ok"
+msgstr "Ok"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:151
+msgid "Download again"
+msgstr "Volver a descargar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+msgid "Open"
+msgstr "Abrir"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:179
+msgid "Set query name"
+msgstr "Configurar el nombre de la consulta"
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:32
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+"Esta seria ya ha sido descargada en el historial local. ¿Desea volverla a "
+"descargar?"
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:34
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+"Este estudio ya ha sido descargado en el historial local. ¿Desea  volverlo a "
+"descargar?"
+
+#: ..\../main/gui/anonymize/anonymizedialog.cpp:64
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ..\../main/gui/export/parametrosprincipales.cpp:194
+msgid "Exporting images ..."
+msgstr "Exportando imágenes..."
+
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr "El campo elemento o grupo tienen valores no válidos"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:21
+msgid "Common tags"
+msgstr "Tags comunes"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+msgid "Patient's name and surname"
+msgstr "Nombre y apellidos del paciente"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+msgid "Patient Id"
+msgstr "Id del paciente"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr "Instituciones"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr "Médico "
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr "Comentarios"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:44
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr "Campos Ginkgo CADx (Mapas de valoración...)"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr "Tags (doble click para cambiar el valor)"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:71
+msgid "Add new..."
+msgstr "Añadir..."
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ..\../main/tools/anonymizetool.cpp:26
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr "Anonimizar"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:136
+msgid "Create new"
+msgstr "Crear nuevo"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:136
+msgid "Add DICOM tag"
+msgstr "Añadir tag DICOM"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:199
+msgid "Group"
+msgstr "Grupo"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:203
+msgid "Element"
+msgstr "Elemento"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ..\../widgets/wangulo.cpp:1116
+msgid "Value"
+msgstr "Valor"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+msgid "Top right corner annotation"
+msgstr "Anotación de la esquina superior derecha"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+msgid "Top left corner annotation"
+msgstr "Anotación de la esquina superior izquierda"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+msgid "Bottom left corner annotation"
+msgstr "Anotación de la esquina inferior izquierda"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+msgid "Bottom right corner annotation"
+msgstr "Anotación de la esquina inferior derecha"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+msgid "You must fill in all fields"
+msgstr "Debe de rellenar todos los campos"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+msgid "Window/level label in use"
+msgstr "Etiqueta de window/level en uso"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr "Escriba valores válidos en los campos window y level."
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr "Etiqueta"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+msgid "Window"
+msgstr "Window"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+msgid "Level"
+msgstr "Nivel"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr "Vecino más próximo"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr "Lineal"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr "Cúbico"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+msgid "Do you confirm the removal of the preset?"
+msgstr "¿Confirma la eliminación del perfil?"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Data modified"
+msgstr "Datos modificados"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+msgid "Modality settings"
+msgstr "Configuración de modalidad"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+msgid "Default modality settings"
+msgstr "Configuración por defecto de las modalidades"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, c-format
+msgid "%s settings"
+msgstr "%s configuración"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:60
+msgid "settings"
+msgstr "configuración"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Export Configuration"
+msgstr "Exportar configuración"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Ini Files(*.ini)|*.ini"
+msgstr "Archivos ini (*.ini)|*.ini"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+"El fichero existe\n"
+"¿Confirma que desea sobreescribirlo?"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+msgid "Existing file"
+msgstr "Fichero existente"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+msgid "Export successfully completed"
+msgstr "Exportación completada correctamente"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+msgid "There was an error during exportation"
+msgstr "Ha ocurrido un error durante la exportación"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Import Configuration"
+msgstr "Importar configuración"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Ini files(*.ini)|*.ini"
+msgstr "Ficheros ini (*.ini)|*.ini"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr ""
+"Importación completada correctamente, reinicie Ginkgo CADx para aplicar los "
+"cambios"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+msgid "There was an error during importation, check permissions"
+msgstr ""
+"Ha ocurrido un error durante el proceso de importación, compruebe que tiene "
+"permisos"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+msgid "Dicom tag"
+msgstr "Tag dicom"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+msgid "Split horizontally..."
+msgstr "Dividir horizontalmente"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+msgid "Split vertically..."
+msgstr "Dividir verticalmente"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ..\../main/tools/windowlayouttool.cpp:273
+msgid "Split active horizontally"
+msgstr "Dividir activa horizontalmente"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ..\../main/tools/windowlayouttool.cpp:274
+msgid "Split active vertically"
+msgstr "Dividir activa verticalmente"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+msgid "New hanging protocol"
+msgstr "Nuevo protocolo de visualización"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, c-format
+msgid "Window %d"
+msgstr "Ventana %d"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr "Esta vista no soporta varias ventanas"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr "Activo"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "Yes"
+msgstr "Si"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr "No"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+msgid "Hanging protocols"
+msgstr "Protocolos de visualización"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+msgid "One day"
+msgstr "Un día"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+msgid "Two days"
+msgstr "Dos días"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+msgid "Three days"
+msgstr "Tres días"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr "Una semana"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+msgid "Two weeks"
+msgstr "Dos semanas"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+msgid "One month"
+msgstr "Un mes"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+msgid "Three months"
+msgstr "Tres meses"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr "Un año"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+msgid "Local database"
+msgstr "Base de datos local"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+msgid "Local DICOM Dir setup"
+msgstr "Configuración de DICOM Dir local"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+"El directorio seleccionado no existe,\n"
+"¿Desea Crearlo?"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+"Ha ocurrido un error al crear el directorio, asegurese de que la ruta es "
+"correcta y tiene permisos sobre el directorio padre"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+"Ha ocurrido un error al leer el directorio, asegurese de que tiene permisos "
+"de escritura sobre el mismo"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+msgid "Select DICOMDIR"
+msgstr "Seleccione el DICOMDIR"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+"Atención, para modificar el directorio, es necesario cerrar todas las series "
+"abiertas."
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr "Estación de trabajo"
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr "Configuración de parámetros de la estación local"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr "Extensiones"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+msgid "Extensions settings"
+msgstr "Configuración de extensiones"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr ""
+"Debe reiniciar Ginkgo CADx para que los cambios en la extensiones se lleven "
+"a cabo"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+msgid "Port has to be a valid number"
+msgstr "El valor de puerto no es un número valido"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr "General"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+msgid "General configuration parameters"
+msgstr "Configuración de parámetros generales"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr "Debe reiniciar Ginkgo CADx para que los cambios tengan efecto"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr "Historia Clínica Electrónica"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr "Configuración de la historia clínica electrónica"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:134
+msgid "Testing conectivity with the server..."
+msgstr "Probando la conexión con el servidor..."
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:144
+msgid "Error connecting to url"
+msgstr "Error al conectar con la url "
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+msgid "hostname/port not set"
+msgstr "nombre de host/puerto no establecido"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr "Test de conexión fallido"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr "Conexión realizada con éxito"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "Select certificate"
+msgstr "Seleccionar certificado"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr "Ficheros PEM (*.pem;*.key)|*.pem;*.key|Todos los ficheros (*.*)|*.*"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr "Es obligatorio configurar la clave pública y la clave privada"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:255
+msgid "Change ..."
+msgstr "Cambiar ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+msgid "Import ..."
+msgstr "Importar ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:279
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr ""
+"Para usar SSL/TLS se debe configurar un certificado y una clave privada "
+"válidos"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:472
+msgid "There are this errors: "
+msgstr "Se han producido los siguientes errores:"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+"\n"
+"- El identificador de PACS ya se está usando"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+" - El puerto debe de ser un entero corto positivo (16 bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+"\n"
+" - El puerto es demasiado grande"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+"\n"
+" - La longitud máxima del AET son 16 caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+"\n"
+" - El tamaño de la PDU debe ser mayor o igual que cero (default = 16384)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+"\n"
+" - El valor máximo de la PDU es "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+"\n"
+" - El valor mínimo de la PDU es "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+"\n"
+"- Para usar SSL/TLS se debe configurar un certificado y una clave privada "
+"válidos"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:525
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+"\n"
+"- Si necesita usar WADO, debe rellenar la URL wado."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+"\n"
+"- La URL WADO no contiene el esquema (por ejemplo http://)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+"\n"
+"- La URL WADO no contiene el host"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr "Debe de rellenar todos los campos para continuar"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:558
+msgid "Testing the connection to the node ..."
+msgstr "Probando la conexión con el nodo DICOM..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:561
+msgid "DICOM Error"
+msgstr "Error DICOM"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr "Imposible realizar la conexión: No se pudo iniciar el soporte de red."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr "El servicio no respondió correctamente a C-ECHO"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:607
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr "El servicio no respondió correctamente al estandar DICOM"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:616
+msgid "Invalid port number"
+msgstr "Número de puerto incorrecto"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:622
+msgid "WADO Error"
+msgstr "Error WADO"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:703
+msgid "Use by default"
+msgstr "Usar por defecto"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:795
+msgid "DICOM nodes"
+msgstr "Nodos DICOM"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:800
+msgid "DICOM nodes settings"
+msgstr "Configuración de los nodos DICOM"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr "Se han producido los siguientes errores: "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+" - El puerto local debe de ser un entero corto positivo (16 bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+"\n"
+" - El puerto local es demasiado grande"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+"\n"
+" - La longitud máxima del AET local son 16 caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr "Confirme la eliminación del nodo "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Debe configurar el AET local, que se utilizará al comunicarse con los nodos "
+"DICOM. El puerto indicado debe de estar abierto en el firewall, ya que es "
+"imprescindible para las transferencias."
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ..\../main/gui/export/pasosexportacionbase.cpp:20
+msgid "Profile"
+msgstr "Perfil"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr "Valor por defecto"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+msgid "Set property active"
+msgstr "Activar la propiedad"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr "Inactivo"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Set property inactive"
+msgstr "Desactivar la propiedad"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+msgid "Set default value"
+msgstr "Valor por defecto"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+msgid "Set by user"
+msgstr "Establecido por el usuario"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+msgid "Profile name can't be repeated"
+msgstr "No se puede repetir el nombre del perfil"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr "Debe de rellenar el nombre para continuar"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr "Perfiles"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+msgid "Profiles Settings"
+msgstr "Configuración de perfiles"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr "Debe reiniciar Ginkgo CADx para que los cambios tengan efecto"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+msgid "Confirm the removal of the profile "
+msgstr "Confirma la eliminación del perfil "
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+msgid "New User"
+msgstr "Nuevo usuario"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr "El nombre de usuario debe contener al menos 4 caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+msgid "User name repeated"
+msgstr "El nombre de usuario está repetido"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr "La contraseña y su confirmación no pueden ser diferentes."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+msgid "Password has to contain at least 6 characters"
+msgstr "La contraseña debe contener al menos 6 caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+msgid "No login"
+msgstr "Sin login"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+msgid "User/Password"
+msgstr "Usuario/Contraseña"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+msgid "Password"
+msgstr "Contraseña"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+msgid "Password is setted"
+msgstr "La contraseña está establecida"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr "Cambiar contraseña"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+msgid "Password is not setted"
+msgstr "La contraseña no está establecida"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+msgid "Set password"
+msgstr "Establecer contraseña"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+msgid "Security Setting"
+msgstr "Configuración de Seguridad"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr "Debe crear al menos un usuario"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr "Debes establecer la contraseña principal"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+msgid "User inserted successfully"
+msgstr "Usuario insertado con éxito"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr ""
+"Ocurrió un error al insertar el usuario. Para más información abra el LOG."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+msgid "Password changed successfully"
+msgstr "La contraseña se ha cambiado con éxito."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr ""
+"Ocurrió un error al cambiar la contraseña. Para más información abra el LOG."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+msgid "User deleted successfully"
+msgstr "Usuario eliminado con éxito"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr ""
+"Ocurrió un error al eliminar el usuario. Para más información abra el LOG."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr "Debe de existir al menos un paciente en Ginkgo CADx"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ..\../main/gui/login/dialogologin.cpp:27
+msgid "User"
+msgstr "Usuario"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ..\../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr "Seleccione un directorio"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr "Los títulos de las ubicaciones no se pueden repetir"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+msgid "Maximum length of title is 8 characters"
+msgstr "La longitud máxima del título son 8 caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr "El directorio seleccionado no puede abrirse"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr "Debe de rellenar el título y la ubicación para continuar"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+msgid "Title"
+msgstr "Título"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+msgid "Path"
+msgstr "Directorio"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr "Monitorizar"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+msgid "Clean before"
+msgstr "Limpiar antes"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+msgid "Clean after"
+msgstr "Limpiar después"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr "Ubicaciones"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+msgid "Location Settings"
+msgstr "Configuración de ubicaciones"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr "Anonimización"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:96
+msgid "Anonymization settings"
+msgstr "Opciones de anonimización"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1370
+msgid "Settings"
+msgstr "Configuración"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+msgid "Export config..."
+msgstr "Exportar configuración..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+msgid "Import config..."
+msgstr "Importar configuración..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr "Aplicar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+msgid "Physician's name"
+msgstr "Nombre del médico"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+msgid "Physician's Id"
+msgstr "Identificador del médico"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+msgid "Service"
+msgstr "Servicio"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+msgid "Service's name"
+msgstr "Nombre del servicio"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+msgid "Service's Id"
+msgstr "Identificador del servicio"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+msgid "Local institution"
+msgstr "Centro local"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+msgid "Institution's name"
+msgstr "Nombre del centro"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+msgid "Institution's Id"
+msgstr "Identificador del centro"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+msgid "Dicomized files"
+msgstr "Ficheros dicomizados"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+msgid "Charset"
+msgstr "Charset"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr "ISO_IR 192"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr "ISO_IR 6"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr "ISO_IR 100"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr "ISO_IR 101"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr "ISO_IR 109"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr "ISO_IR 110"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr "ISO_IR 126"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr "ISO_IR 127"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr "ISO_IR 138"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr "ISO_IR 144"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+msgid "ISO_IR 148"
+msgstr "ISO_IR 148"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr "Idioma"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr "Misc"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+msgid "Automatically check for updates"
+msgstr "Buscar actualizaciones automáticamente"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+"Ayudanos envando datos anónimos de uso (no se enviarán datos de paciente)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+msgid "Proxy settings"
+msgstr "Configuración de proxy"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+msgid "Enable http proxy"
+msgstr "Habilitar proxy http"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+msgid "Proxy Settings"
+msgstr "Configuración de proxy"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+msgid "Server settings"
+msgstr "Configuración de servidor"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+msgid "Host"
+msgstr "Host"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+msgid "Port"
+msgstr "Puerto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr "Autenticación"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr "El servidor proxy requiere autenticación"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+msgid "Username"
+msgstr "Nombre de usuario"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr "Excepciones"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+msgid "No proxy for addresses containing"
+msgstr "No utilizar proxy para las direcciones que contengan"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr "Separar las direcciones con comas."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+msgid "DICOM Dir"
+msgstr "DICOM Dir"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr ""
+"El directorio DICOM Dir es el directorio local donde está almacenado el "
+"historial."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr "..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+"Atención, para modificar el directorio, es necesario cerrar todas las series "
+"abiertas."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+msgid "Auto-cleaning"
+msgstr "Auto-borrado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr "Borrar estudios con fecha de adquisición más antigua de:"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+"Borrar estudios antiguos cuando el espacio libre del disco sea menor de:"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+msgid "MB"
+msgstr "MB"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr "Borrar estudios cuando el DICOM Dir sea más grande de:"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+"Esta característica sólo afecta a los estudios COPIADOS en el DICOMDIR que "
+"no estén en uso."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ..\../main/tools/toolwindowlevel.cpp:201
+msgid "Reset to default"
+msgstr "Restaurar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr "PACS Local"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Se debe configurar el AET local, que se utilizará al comunicarse con el "
+"servidor PACS. El puerto indicado debe de estar abierto en el firewall, ya "
+"que es imprescindible para las transferencias."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+msgid "Local AET"
+msgstr "AET Local"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+"Para implantación masiva en entornos homogéneos, pueden especificarse los "
+"siguientes comodines en la AET local:\n"
+"\t%IP Dirección IP\n"
+"\t%IP<n> Octeto n-avo (1~4)\n"
+"\t%HOSTNAME Nombre de Host"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr "Configuración avanzada..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+msgid "DICOM Nodes"
+msgstr "Nodos DICOM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+msgid "New ..."
+msgstr "Nuevo..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+msgid "Edit ..."
+msgstr "Editar..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+#: ..\../main/managers/widgetsmanager.cpp:1100
+msgid "Delete"
+msgstr "Eliminar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+msgid "Set Default"
+msgstr "Por defecto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+msgid "DICOM Node"
+msgstr "Nodo DICOM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr "AET"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+msgid "PDU (KB)"
+msgstr "PDU (KB)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+msgid "Retrieve method"
+msgstr "Método de obtención"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Move"
+msgstr "Move"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Get"
+msgstr "Get"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr "WADO"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+msgid "WADO URL"
+msgstr "URL WADO"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+msgid "Retrieve mode"
+msgstr "Modo de obtención"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ..\../main/gui/import/pasosimportacionbase.cpp:319
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1395
+msgid "Series"
+msgstr "Serie"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+msgid "Studies"
+msgstr "Estudios"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr "Reutilizar conexión"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr "Reutilizar conexiónes cuando se necesite hacer más de una consulta"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+msgid "Worklists"
+msgstr "Listas de trabajo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+msgid "Select how do you want to handle MPPS items"
+msgstr "Seleccione cómo desea manipular los items MPPS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+msgid "DICOM MPPS"
+msgstr "DICOM MPPS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+msgid "HL7 messages"
+msgstr "Mensajes HL7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+msgid "HL7"
+msgstr "HL7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+msgid "Abort message"
+msgstr "Abortar mensaje"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+msgid "Completed message"
+msgstr "Completar mensaje"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+msgid "In progress message"
+msgstr "Mensaje en progreso"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+msgid "Default values"
+msgstr "Valores por defecto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+msgid "Worklist"
+msgstr "Lista de trabajo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+msgid "SSL/TLS"
+msgstr "SSL/TLS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+msgid "Verify server credentials"
+msgstr "Verificar credenciales del servidor"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+msgid "Use SSL/TLS"
+msgstr "Usar SSL/TLS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr "Certificado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+msgid "Certificate to use in this connection"
+msgstr "Certificado para usar en esta conexión"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr "Configuración avanzada..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+msgid "Default charset"
+msgstr "Juego de caracteres por defecto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+msgid "Advanced"
+msgstr "Avanzado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr "Probar conexión"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr "Verificar credenciales del cliente"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+msgid "Local AET certificate"
+msgstr "Certificado del AET local"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+msgid "Certificate used by Ginkgo CADx"
+msgstr "Certificado usado por Ginkgo CADx"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr ""
+"El ID de la aplicación Ginkgo CADx utilizado para rellenar el campo MSH.3"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+msgid "Receiver organization Id"
+msgstr "Identificador de la organización receptora"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr "Identificador único de la organización receptora del mensaje."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+msgid "Petitioner System Id"
+msgstr "Identificador del sistema peticionario"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr "Identificador único del sistema que realiza la petición (SIID)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+msgid "Filler Application Id"
+msgstr "Identificador de aplicación de la \"Filler Application\""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr "Identificador único de la \"Filler Application\" (SIID/Ginkgo CADx)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr "Identificador único de la \"Filler Application\" (SIID/Ginkgo)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+msgid "Ginkgo CADx Application Id"
+msgstr "Identificador de aplicación Ginkgo CADx"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+"Identificador único de aplicación del Sistema de Comunicación y "
+"Almacenamiento de Imágenes (SIID/PACS)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+msgid "Integration engine"
+msgstr "Motor de integración"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+msgid "Hostname / Port"
+msgstr "Hostname / Puerto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr "Nombre de host (IP o DNS) del motor de integración"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr "/"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+msgid "Protocol"
+msgstr "Protocolo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr "Protocolo de la capa de transporte del motor de integración"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr "MLLP"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ..\../main/gui/export/pasosexportacionbase.cpp:28
+msgid "Format"
+msgstr "Formato"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+msgid "Message's format"
+msgstr "Formato del mensaje"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr "ER7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+msgid "Test engine"
+msgstr "Probar servidor"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+msgid "Test Integration Engine connectivity"
+msgstr "Probar conectividad con el motor de integración"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+msgid "Ginkgo Extension Title"
+msgstr "Título de la Extensión de Ginkgo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+msgid "Edit public key"
+msgstr "Editar clave pública"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr ""
+"Usar certificado por defecto (certificado configurado en configuración del "
+"AET local)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+msgid "Public key"
+msgstr "Clave pública"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+msgid "Public key in PEM format"
+msgstr "Clave pública en formato PEM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+msgid "Load ..."
+msgstr "Cargar..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+msgid "Private key"
+msgstr "Clave privada"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+msgid "Private key in PEM format"
+msgstr "Clave privada en formato PEM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+msgid "Profile name"
+msgstr "Nombre del perfil"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+msgid "Set active"
+msgstr "Activar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr ""
+"Las ubicaciones son rutas predefinidas conocidas (ej: unidades remotas "
+"compartidas)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+msgid "Configure location"
+msgstr "Configurar ubicación"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+msgid "Location"
+msgstr "Ubicación"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr "Limpiar directorio después de la importación"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr "Limpiar directorio antes de la importación"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+msgid "Security type"
+msgstr "Tipo de seguridad"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr "Usuarios"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+msgid "Change Password ..."
+msgstr "Cambiar contraseña..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+msgid "Set main password"
+msgstr "Establecer contraseña principal"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+msgid "Set Password"
+msgstr "Establecer contraseña"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+msgid "Edit User"
+msgstr "Editar usuario"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+msgid "User Name"
+msgstr "Nombre de usuario"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+msgid "Confirm Password"
+msgstr "Confirmar contraseña"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+msgid "Properties"
+msgstr "Propiedades"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+msgid "Edit corner annotations"
+msgstr "Editar anotaciones de las esquinas"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue:Format}  where GGGG is the tag's group in hexadecimal and EEEE "
+"is the tag's element. DefaultValue and Format are optional values, Format "
+"admit two special formats (date and time)."
+msgstr ""
+"Para configurar las anotaciones de las esquinas puedes usar tags DICOM con "
+"sintaxis ${GGGG|EEEE:ValorPorDefecto:Formato} donde GGGG es el grupo del tag "
+"en código hexadecimal y EEEE es el tag del elemento. ValorPorDefecto y "
+"Formato son valores opcionales, Formato admite dos formatos especiales (date "
+"y time)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+"Puedes usar tags especiales listados en el texto de ayuda sobre el botón de "
+"información."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+msgid "Window/level"
+msgstr "Window/Level"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr "Añadir"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ..\../main/gui/history3/historytoolmenu.cpp:149
+#: ..\../widgets/gui/selecciontextobase.h:58
+msgid "Edit"
+msgstr "Editar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+msgid "Default Window/Level"
+msgstr "Window/Level por defecto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+msgid "Corner annotations"
+msgstr "Anotaciones de las esquinas"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+msgid "Setup corner annotations"
+msgstr "Configurar anotaciones de las esquinas"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+msgid "Setup..."
+msgstr "Configurar..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+msgid "Other settings"
+msgstr "Otras configuraciones"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+msgid "Interpolate pixel data"
+msgstr "Interpolar pixel data"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+msgid "Hanging protocol"
+msgstr "Protocolo de visualización"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+msgid "Opening mode"
+msgstr "Modo de apertura"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+msgid "Study opening criteria"
+msgstr "Criterio de apertura del estudio"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr "+"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+msgid "Workspace"
+msgstr "Espacio de trabajo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+msgid "Enable/Disable"
+msgstr "Habilitar/Deshabilitar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+msgid "Top left corner annotations"
+msgstr "Anotación de la esquina superior izquierda"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+msgid "Setup window"
+msgstr "Configurar ventana"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr "Pulse el botón de configuración y situe la ventana donde desee"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+msgid "Set default"
+msgstr "Por defecto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+msgid "Open in main window"
+msgstr "Abrir en ventana principal"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+msgid "Setup position..."
+msgstr "Configurar posición..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+msgid "Setup undocked window position"
+msgstr "Configurar posición de la ventan"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+msgid "Layout"
+msgstr "Layout"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+msgid "Current layout"
+msgstr "Layout actual"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr "Filas"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+msgid "Columns"
+msgstr "Columnas"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+msgid "Series criteria"
+msgstr "Criterio de la serie"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+msgid "Select opening mode"
+msgstr "Seleccionar modo de apertura"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+msgid "Tag"
+msgstr "Tag"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+"Configurar la posición y el tamaño de la ventana donde se abrirá el estudio"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+msgid "Save"
+msgstr "Guardar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+msgid "Enable background queries"
+msgstr "Habilitar consultas en segundo plano"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+msgid "Smart retrieve"
+msgstr "Adquisición automática"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+msgid "Smart retrieve settings"
+msgstr "Configuración de consultas automáticas"
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr "Detectada inactividad"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.h:64
+msgid "Export DICOM"
+msgstr "Exportar DICOM"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr "Médico especialista"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+msgid "Ginkgo CADx private tags"
+msgstr "Tags privados de Ginkgo CADx"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ..\../main/gui/history3/historypanel3.cpp:340
+#: ..\../main/gui/history3/historytoolmenu.cpp:158
+msgid "Export"
+msgstr "Exportar"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ..\../main/gui/export/parametrosprincipales.cpp:157
+msgid "Select the directory where the files will be stored"
+msgstr "Seleccione el directorio donde se guardarán los ficheros"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+"El directorio seleccionado no existe,\n"
+"¿Desea Crearlo?"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr "Existe otro DICOM dir en el directorio seleccionado"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+"Ginkgo CADx ha dectado un DICOMDIR de historial creado con una versión más "
+"antigua\n"
+"de Ginkgo CADx (BBDD v.%d). ¿Qué desea hacer?"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+"El DICOMDIR ha sido creado con una versión más nueva de Ginkgo CADx. (BBDD v"
+"%d).\n"
+"Esta versión no puede abrirla."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+"Error al cambiar el nomver del antiguo dicomidir a <name>_old, asegurese de "
+"que tiene permisos para hacerlo"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+msgid "Select the DICOM Dir folder"
+msgstr "Seleccione un directorio DICOMDIR válido"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+msgid "DICOM Dir migration"
+msgstr "Migración de DICOMDIR"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+msgid "Migrate existing (recommended)"
+msgstr "Migrar existente (recomendado)"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+"Migrar DICOMDIR existente. Los ficheros existentes serán añadidos al nuevo "
+"DICOMDIR. No cierre  GinkgoCADx hasta que finalice la operación."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr ""
+"Borrar DICOMDIR antiguo después de la migración (se renombrará como *_old)"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+msgid "Continue..."
+msgstr "Continuar..."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+msgid "Select other"
+msgstr "Seleccionar otro"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+"Seleccionar otra ruta. Si la ruta no contiene un DICOM Dir de Ginkgo CADx, "
+"se crerará uno nuevo. En cualquier otro caso, se usará el DICOMDIR actual."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+msgid "Browse..."
+msgstr "Navegar..."
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:106
+msgid "DICOM Export"
+msgstr "Exportación DICOM"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:110
+msgid "Select the format and the images you want to export"
+msgstr "Seleccione el formato y las imágenes a exportar"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:143
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr "DICOM (*.dcm;)|*.dcm|Todos los ficheros (*.*)|*.*"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|Todos los ficheros "
+"(*.*)|*.*"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:150
+msgid "Select file"
+msgstr "Seleccione un fichero"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "DICOM (native format)"
+msgstr "DICOM (formato nativo)"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "Image (jpg, bmp, png)"
+msgstr "Imagen (jpg, bmp, png)"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:38
+msgid "Export all files of opened tab"
+msgstr "Exportar todos los ficheros de la pestaña abierta"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:55
+msgid "JPEG"
+msgstr "JPEG"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr "Calidad"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:40
+msgid "Image Export Wizard"
+msgstr "Asistente de exportación de imágenes"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ..\../main/gui/license/aboutdialogbase.cpp:67
+#: ..\../main/gui/license/aboutdialogbase.cpp:152
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:54
+msgid "&Accept"
+msgstr "&Aceptar"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr "&Siguiente >"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+msgid "Open link"
+msgstr "Abrir enlace"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+msgid "File link:"
+msgstr "Enlace al fichero"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ..\../main/gui/import/pasosimportacionbase.cpp:270
+msgid "Study"
+msgstr "Estudio"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+msgid "User name"
+msgstr "Nombre de usuario"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+msgid "Ginkgo Cloud link"
+msgstr "Enlace Ginkgo Cloud"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+"Puede copiar y pegar el enlace para usarlo en e-mails y páginas web, el "
+"único requisito para descargar los estudios es tener instalado Ginkgo CADx."
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr "Enviar enlace por e-mail"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+msgid "Copy to clipboard"
+msgstr "Copiar al portapapeles"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "New Ginkgo Cloud study"
+msgstr "Nuevo estudio en Ginkgo Cloud"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "To download the study, paste this url "
+msgstr "Para descargar el estudio, pegue esta url"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+"en la herramienta del historial de Ginkgo CADx \"Abrir enlace Ginkgo Cloud"
+"\", o péguelo en la barra de direcciones de su navegador."
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+msgid "Creator"
+msgstr "Creador"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+msgid "Last Modificator"
+msgstr "Última modificación"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+msgid "Show link..."
+msgstr "Mostrar enlace..."
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr "?"
+
+#: ..\../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+msgid "Invalid link"
+msgstr "Enlace inválido"
+
+#: ..\../main/gui/history3/historypanel3.cpp:117
+#: ..\../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr "Abrir serie"
+
+#: ..\../main/gui/history3/historypanel3.cpp:119
+#: ..\../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr "Abrir serie con.."
+
+#: ..\../main/gui/history3/historypanel3.cpp:226
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr "Edad"
+
+#: ..\../main/gui/history3/historypanel3.cpp:228
+msgid "Date acquired"
+msgstr "Fecha adquisición"
+
+#: ..\../main/gui/history3/historypanel3.cpp:230
+msgid "Date added"
+msgstr "Fecha recepción"
+
+#: ..\../main/gui/history3/historypanel3.cpp:308
+#: ..\../main/gui/history3/historytoolmenu.cpp:82
+#: ..\../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr "Adquirir"
+
+#: ..\../main/gui/history3/historypanel3.cpp:316
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize"
+msgstr "Dicomizar"
+
+#: ..\../main/gui/history3/historypanel3.cpp:363
+msgid "All patients"
+msgstr "Todos los pacientes"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+msgid "Results"
+msgstr "Resultados"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, c-format
+msgid " (%d images)"
+msgstr " (%d imágenes)"
+
+#: ..\../main/gui/history3/historypanel3.cpp:634
+msgid "Open study with .."
+msgstr "Abrir estudio con.."
+
+#: ..\../main/gui/history3/historypanel3.cpp:663
+#: ..\../main/gui/history3/historypanel3base.cpp:482
+msgid "Synchronize"
+msgstr "Sincronizar"
+
+#: ..\../main/gui/history3/historypanel3.cpp:677
+msgid "&Delete from history"
+msgstr "&Eliminar del historial"
+
+#: ..\../main/gui/history3/historypanel3.cpp:686
+msgid "&Clear history"
+msgstr "&Limpiar historial"
+
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr ""
+"Se ha alcanzado el número máximo de pestañas abiertas, cierre alguna pestaña "
+"e intentelo de nuevo"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid "Unable to open modality "
+msgstr "No es posible abrir la modalidad "
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr " con transfer syntax "
+
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+"Error al cargar el estudio, compruebe la configuración del protocolo de "
+"visualización"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr ""
+"Error al limpiar el historial, se tienen que cerrar los estudios abiertos"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1086
+msgid "all files"
+msgstr "todos los ficheros"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+msgid "Select at least one series"
+msgstr "Debe seleccionar al menos una serie"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr "No se pueden eliminar series abiertas"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "those series"
+msgstr "estas series"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "this series"
+msgstr "esta serie"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:57
+msgid "Advanced search"
+msgstr "Búsqueda avanzada"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:73
+msgid "Acquisition date"
+msgstr "Fecha de la adquisición"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:302
+#: ..\../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr "Confirmar eliminación"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr "¿Está seguro de que desea eliminar "
+
+#: ..\../main/gui/history3/historypanel3base.cpp:336
+#: ..\../main/gui/history3/historytoolmenu.cpp:102
+#: ..\../main/gui/history3/historytoolmenu.cpp:200
+#: ..\../main/gui/history3/historytoolmenu.cpp:229
+msgid "Remove"
+msgstr "Eliminar"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr "Elija la vista que desea utilizar para abrir el/los archivo/s"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr "Utilizar siempre esta vista para abrir este tipo de archivos"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:454
+#: ..\../main/gui/history3/historypanel3base.h:187
+msgid "Synchronize files"
+msgstr "Sincronizar ficheros"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+"Hay ficheros que se tienen que descargar a la base de datos local antes de "
+"ejecutar esta acción, \n"
+"¿Desea sincronizar los ficheros ahora?"
+
+#: ..\../main/gui/history3/historytablemodel.cpp:406
+#: ..\../main/gui/history3/historytablemodel.cpp:418
+#: ..\../main/gui/history3/historytablemodel.cpp:473
+#: ..\../main/gui/history3/historytablemodel.cpp:485
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:105
+msgid "00/00/0000 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:138
+msgid "Close history"
+msgstr "Cerrar  historial"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:139
+#: ..\../main/gui/startup/startupform.cpp:53
+msgid "History"
+msgstr "Historial"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:201
+#: ..\../main/gui/history3/historytoolmenu.cpp:230
+msgid "Clear history"
+msgstr "&Limpiar historial"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:232
+msgid "Select all"
+msgstr "Seleccionar Todos"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:233
+msgid "Deselect all"
+msgstr "Deseleccionar todos"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+msgid "Destination"
+msgstr "Destino"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+msgid "Status"
+msgstr "Estado"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+msgid "Error message"
+msgstr "Mensaje de error"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+msgid "Show Message"
+msgstr "Mostrar Mensaje"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+msgid "Edit Message"
+msgstr "Editar Mensaje"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+msgid "Delete message"
+msgstr "Eliminar mensaje"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+msgid "Error editing message"
+msgstr "Error al editar el mensaje"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+msgid "Error purguing messages"
+msgstr "Error al purgar los mensajes"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Stop"
+msgstr "Parar"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Sent"
+msgstr "Enviado"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr "Pendiente"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/progress/statusbarprogreso.cpp:281
+msgid "Warning"
+msgstr "Aviso"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+msgid "Error getting message"
+msgstr "Error al obtener mensajes"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+msgid "Running"
+msgstr "Procesando"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr "El proceso de envío está arrancado y listo para enviar mensajes"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr "Parado"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+msgid "Usually due to an error in sending a message"
+msgstr "Suele ser debido a un error en el envío de un mensaje"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Start"
+msgstr "Iniciar"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr "¿Confirma la eliminación de estos mensajes?"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+msgid "Error deleting messages"
+msgstr "Error al eliminar mensajes"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+msgid "Remove sent messages"
+msgstr "Eliminar mensajes enviados"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+msgid "Exit"
+msgstr "Salir"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+msgid "Messages"
+msgstr "Mensajes"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+msgid "Refresh"
+msgstr "Actualizar"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1394
+msgid "View"
+msgstr "Ver"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+msgid "Send task status:"
+msgstr "Estado del proceso de envío:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr "Habilitado"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+msgid "Message"
+msgstr "Mensaje"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr "Fecha:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+msgid "Destination:"
+msgstr "Destino:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+msgid "Status:"
+msgstr "Estado:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+msgid "Message content:"
+msgstr "Contenido del mensaje:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:142
+msgid "OK"
+msgstr "OK"
+
+#: ..\../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr "Datos generales de los ficheros DICOM"
+
+#: ..\../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr "Se pueden configurar los datos DICOM de los ficheros a generar"
+
+#: ..\../main/gui/import/generaldata.cpp:210
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+"\n"
+"* El ID de paciente es obligatorio."
+
+#: ..\../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+"\n"
+"* La concatenación del nombre del paciente y los apellidos no puede ser "
+"mayor que 61."
+
+#: ..\../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+"\n"
+"* El formato de la altura en centímetros no es correcto."
+
+#: ..\../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+"\n"
+"* La fecha de naciemiento del paciente es posterior a la fecha del estudio"
+
+#: ..\../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+"\n"
+"* El formato del peso no es correcto. El rango válido está entre 0 y 400 Kg."
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr "Los siguientes errores han ocurrido al validar los campos"
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "Error validating fields"
+msgstr " "
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:148
+msgid "Selecting Import Profile"
+msgstr "Selección de perfil de Importación"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:152
+msgid "You must select the profile you want to use import"
+msgstr "Debe seleccionar el perfil de importación a utilizar"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+msgid "You must select the import profile"
+msgstr "Debe seleccionar el perfil de importación"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr "Error inesperado, seleccione de nuevo el módulo"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:21
+msgid "Selected images"
+msgstr "Imágenes seleccionadas"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:56
+msgid "Preview"
+msgstr "Previsualización"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:62
+msgid "Remove all"
+msgstr "Eliminar todas"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:113
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:65
+msgid "Demographic data"
+msgstr "Datos demográficos"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr "Identificador *"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr "(DNI o Número de historia clínica)"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:159
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "Birth date"
+msgstr "Fecha de nacimiento"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr "Apellidos"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr "Sexo"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr "Masculino"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr "Femenino"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr "Otros"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:217
+msgid "Study Details"
+msgstr "Detalles del estudio"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:234
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:122
+msgid "Weight"
+msgstr "Peso"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:245
+msgid "Kg"
+msgstr "Kg"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:252
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:119
+msgid "Height"
+msgstr "Altura"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr "cm"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:291
+#: ..\../main/gui/import/pasosimportacionbase.cpp:333
+msgid "Time"
+msgstr "Hora"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr "El path de la ubicación no existe"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+"Imágenes (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|Imágenes JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|Imágenes "
+"BMP (*.bmp)|*.bmp|Imágenes PNG (*.png)|*.png|Imágenes TIFF (*.tif;*.tiff)|*."
+"tif;*.tiff|Documentos PDF(*.pdf)|*.pdf|Todos los Ficheros (*.*)|*.*"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+"Imágenes (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|Imágenes "
+"JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|Imágenes BMP (*.bmp)|*.bmp;"
+"*BMP|Imágenes PNG (*.png)|*.png;*PNG|Imágenes TIFF (*.tif;*.tiff)|*.tif;*."
+"tiff;*TIF;*TIFF|Documentos PDF (*.pdf;*.PDF)|*.PDF;*.pdf|Todos los Ficheros "
+"(*.*)|*.*"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files..."
+msgstr "Seleccionar archivos..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr "Seleccionar imágenes desde el sistema de ficheros"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste"
+msgstr "Pegar"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste from clipboard"
+msgstr "Pegar desde el portapapeles"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr "Atrás"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr "¿Confirma que desea eliminar este fichero del sistema de ficheros?"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:330
+msgid "Delete selected items"
+msgstr "Eliminar elementos seleccionados"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+msgid "You must select an image"
+msgstr "Debe seleccionar al menos una imagen"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:346
+msgid "Generating preview..."
+msgstr "Generando thumbnail..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:500
+msgid "Select images"
+msgstr "Seleccionar imágenes"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr "Generando thumbnails..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:715
+msgid "Image selection"
+msgstr "Selección de imágenes"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr "Debe de seleccionar las imágenes que desea importar"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr "Debe seleccionar al menos una imagen"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:760
+msgid "The file"
+msgstr "El fichero "
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr " no existe"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:52
+msgid "Image Import Wizard"
+msgstr "Asistente de importación de imágenes"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr "El módulo solicitado no soporta importación"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr "No hay registrado ningún módulo que soporte importación"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr "No hay registrado ningún módulo que soporte importación"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr "El módulo solicitado no está registrado"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr "El módulo solicitado no está registrado"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:167
+msgid "free of"
+msgstr "libres de"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:181
+msgid "in dicomization dir."
+msgstr "en el directorio de dicomización"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr "¿Confirma que desea cancelar el proceso de importación?"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, c-format
+msgid "Step %d of %d: "
+msgstr "Paso %d de %d: "
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr "&Terminar"
+
+#: ..\../main/gui/license/aboutdialog.cpp:25
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About"
+msgstr "Acerca de"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:22
+msgid "Ginkgo CADx"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr "Créditos"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:55
+msgid "Licenses"
+msgstr "Licencias"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:58
+msgid "UPDATE_INFO"
+msgstr "UPDATE_INFO"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:108
+#: ..\../main/gui/license/aboutdialogbase.h:88
+msgid "Open Source Licenses"
+msgstr "Licencias Open Source"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr "Cairo"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr "DCMTK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:119
+msgid "FamFamFam Icons"
+msgstr "FamFamFam Icons"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:120
+msgid "Fugue Icons"
+msgstr "Fugue Icons"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr "ITK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr "LibJpeg"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr "LibPng"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr "OpenSSL"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr "VTK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:126
+msgid "WxWidgets"
+msgstr "WxWidgets"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:127
+msgid "Zlib"
+msgstr "Zlib"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr "SQL Lite"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr "CharLS"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:130
+msgid "Dark Glass Icons"
+msgstr "Dark Glass Icons"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr "Libcurl"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr "JsonCpp"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:133
+msgid "AIRS"
+msgstr "AIRS"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ..\../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr "Acuerdo de licencia"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+"Si acepta todos los términos del acuerdo, seleccione \"Acepto la licencia\" "
+"para continuar. Debe aceptar el acuerdo para instalar Ginkgo CADx."
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:53
+msgid "Check for updates automatically"
+msgstr "Buscar actualizaciones automáticamente"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:66
+msgid "I Accept the license"
+msgstr "Acepto la licencia"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr "NO acepto la licencia"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Save logs"
+msgstr "Guardar logs"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr "Archivo log (*.log)|*.log| Archivo de texto (*.txt)|*.txt"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+msgid "File couldn't be stored "
+msgstr "No se ha podido escribir en el fichero"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+msgid "Could not write to file"
+msgstr "No se pudo escribir en el fichero "
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+msgid "Save log..."
+msgstr "Guardar log..."
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+msgid "Clear log"
+msgstr "Limpiar log"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+msgid "Log"
+msgstr "Log"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr "Limpiar"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr "LogText"
+
+#: ..\../main/gui/login/dialogologin.cpp:50
+msgid "The username or password is incorrect"
+msgstr "El nombre de usuario o la contraseña son incorrectos"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:250
+msgid "Tasks"
+msgstr "Tareas"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1139
+msgid "Included in the history ..."
+msgstr "Incluyendo en el historial..."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr "No hay URL para comprobar actualizaciones en la configuración actual."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "Check update error"
+msgstr "Comprobar error en actualización"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr ""
+"Error sintáctico/semántico al interpretar la URL de integración (vea el "
+"registro de log para más detalles):\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+msgid "Malformed XML"
+msgstr "XML mal formado"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1192
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr "Error al interpretar los parámetros de la línea de comandos. ("
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr ""
+"Error sintáctico/semántico al interpretar el XML de integración (vea el "
+"registro de log para más detalles):\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+msgid "Error parsing integration XML:\n"
+msgstr "Error al interpretar el XML de integración:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+msgid "PACS error:\n"
+msgstr "Error en el PACS:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+msgid "Error executing WorkFlow\n"
+msgstr "Error al ejecutar WorkFlow\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+"Error al ejecutar WorkFlow\n"
+"Error interno"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+msgid "Close current view"
+msgstr "Cerrar vista actual"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all"
+msgstr "&Cerrar todas"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all views"
+msgstr "Cerrar todas las vistas"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr "&Salir"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "Exit application"
+msgstr "Salir de la aplicación"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr "Pantalla completa"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Show full screen"
+msgstr "Ver en Pantalla Completa"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1302
+msgid "Tab grouping"
+msgstr "Agrupar pestañas"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1329
+msgid "Ginkgo CADx manual ..."
+msgstr "Manual de Ginkgo CADx ..."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1330
+msgid "Open test card"
+msgstr "Abrir carta de ajuste"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr "Buscar actualizaciones"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for newest versions"
+msgstr "Buscar versiones nuevas"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1332
+msgid "Need support ..."
+msgstr "Necesita ayuda ..."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About "
+msgstr "Acerca de "
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+msgid "HL7 monitor"
+msgstr "Monitorizador HL7"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+msgid "HL7 message control"
+msgstr "Control de mensajes HL7"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+msgid "Log monitor"
+msgstr "Monitorizador de log"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+msgid "Log monitored"
+msgstr "Monitorizador de log"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1390
+msgid "&File"
+msgstr "&Archivo"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr "&Edición"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr "&Ayuda"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr "Error al cargar el historial. Ginkgo CADx se cerrará."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr "Mosaico"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr "¿Desea guardar los cambios en el estudio: "
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1664
+msgid "Unsaved data"
+msgstr "Datos no guardados"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr "Han ocurrido errores al guardar la serie. ¿Desea continuar?"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid "Error saving"
+msgstr "Error al guardar"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "Full Screen"
+msgstr "Pantalla completa"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "View Full Screen"
+msgstr "Ver en pantalla completa"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1708
+msgid "Tab Regroup"
+msgstr "Reagrupar pestañas"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr "&Cerrar"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "&Close all"
+msgstr "&Cerrar todas"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "Close all windows"
+msgstr "Cerrar todas las ventanas"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1728
+msgid "Tabbed organization"
+msgstr "Organización en pestañas"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr "No existe una nueva versión de Ginkgo CADx en este momento."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "Ginkgo CADx updated"
+msgstr "Ginkgo CADx actualizado"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1782
+msgid "New version available ("
+msgstr "Nueva versión disponible ("
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr "Error interno durante el proceso de autenticación"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+msgid "New Update"
+msgstr "Nueva actualización"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+msgid "New version available"
+msgstr "Nueva versión disponible"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr "No avisarme de nuevo sobre esta actualización"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+msgid "X"
+msgstr "X"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+msgid "Close this notification"
+msgstr "Cerrar esta notificación"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+msgid "The following commands will be aborted if you close the application"
+msgstr "Los siguientes comandos se abortarán si cierra la aplicación"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+msgid "Close Ginkgo CADx"
+msgstr "Cerrar Ginkgo CADx"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr "Cierra al aplicación y aborta los comandos pendientes"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr "No cierra la aplicación y mantiene procesando los comandos"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:138
+msgid "User login"
+msgstr "Login de usuario"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+msgid "System authentication"
+msgstr "Autenticación del sistema"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+msgid "Login"
+msgstr "Login"
+
+#: ..\../main/gui/open/abrir.cpp:80 ..\../main/gui/open/abrir.cpp:82
+msgid "Open..."
+msgstr "Abrir..."
+
+#: ..\../main/gui/open/opendialogs.cpp:58
+msgid "There was an error reading DICOMDIR file"
+msgstr "Ha ocurrido un error leer el fichero DICOMDIR"
+
+#: ..\../main/gui/open/opendialogs.cpp:62
+msgid "Select a valid DICOMDIR file"
+msgstr "Seleccione un fichero DICOMDIR válido"
+
+#: ..\../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr "Seleccione los ficheros que desea adquirir desde el DICOMDIR"
+
+#: ..\../main/gui/open/opendialogs.cpp:180
+#: ..\../main/gui/open/opendialogsbase.cpp:170
+#: ..\../main/gui/open/opendialogsbase.h:112
+msgid "Copy or link"
+msgstr "Copiar o enlazar"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:22
+#: ..\../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr "Adquirir desde DICOM Dir"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:94
+#: ..\../main/gui/open/opendialogsbase.h:85
+msgid "Select drive"
+msgstr "Seleccionar unidad"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:175
+msgid "Do you want to copy or link files?"
+msgstr "¿Desea copiar o enlazar los ficheros?"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ..\../main/gui/selectpacsserver/selectpacsserver.cpp:30
+msgid "There aren't any PACS configured"
+msgstr "No existe ningún servidor PACS configurado"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:69
+msgid "0000/00/00 00:00:00"
+msgstr "0000/00/00 00:00:00"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.h:57
+msgid "Upload study"
+msgstr "Subir estudio"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+msgid "Select PACS server"
+msgstr "Seleccionar servidor PACS"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:119
+msgid "Metadata"
+msgstr "Metadatos"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:120
+msgid "Identification information"
+msgstr "Identificación de la prueba"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:121
+msgid "Patient information"
+msgstr "Información del paciente"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:122
+msgid "Acquisition information"
+msgstr "Información sobre la adquisición"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:123
+msgid "Relationship information"
+msgstr "Información de referencias"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:124
+msgid "Image presentation information"
+msgstr "Información de presentación"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:125 ..\../widgets/wtextbox.cpp:541
+msgid "Text"
+msgstr "Texto"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:126
+msgid "Other"
+msgstr "Otros"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:137
+#: ..\../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr "Datos"
+
+#: ..\../main/gui/previewpanel/previewpanel.cpp:47
+msgid "Hide"
+msgstr "Ocultar"
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr "javi"
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:207
+msgid "Previews"
+msgstr "Previsualizaciones"
+
+#: ..\../main/gui/progress/progresobase.cpp:23
+msgid "There is no running tasks"
+msgstr "No hay tareas en ejecución"
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:165
+msgid "0 running tasks."
+msgstr "0 tareas en ejecución."
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:192
+#, c-format
+msgid "There are %d pending tasks"
+msgstr "Existen %d tareas pendientes"
+
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.h:55
+msgid "Select PACS"
+msgstr "Seleccionar PACS"
+
+#: ..\../main/gui/startup/startupformbase.cpp:29
+msgid "http://ginkgo-cadx.com"
+msgstr "http://ginkgo-cadx.com"
+
+#: ..\../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr "No apto para uso diagnóstico. Por favor, considere actualizar a "
+
+#: ..\../main/gui/startup/startupformbase.cpp:47
+msgid "Ginkgo CADx Pro"
+msgstr "Ginkgo CADx Pro"
+
+#: ..\../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+"Recuede que comprando Ginkgo CADx Pro, está contribuyendo a su desarrollo"
+
+#: ..\../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr "Powered by"
+
+#: ..\../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr "MetaEmotion Healthcare"
+
+#: ..\../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr "Página de inicio"
+
+#: ..\../main/managers/widgetsmanager.cpp:1100
+msgid "Delete Widget"
+msgstr "Eliminar widget"
+
+#: ..\../main/managers/widgetsmanager.cpp:1111
+msgid "Properties ..."
+msgstr "Propiedades..."
+
+#: ..\../main/managers/widgetsmanager.cpp:1111
+msgid "Widget Properties"
+msgstr "Propiedades del widget"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:114
+msgid "Open file"
+msgstr "Abrir fichero"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:115
+#: ..\../main/tools/openfoldertool.cpp:27
+msgid "Open folder"
+msgstr "Abrir directorio"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:116
+#: ..\../main/tools/openremovabletool.cpp:28
+msgid "Open removable unit"
+msgstr "Abrir unidad extraíble"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:117
+#: ..\../main/tools/openginkgocloudlinktool.cpp:27
+msgid "Open Ginkgo Cloud link"
+msgstr "Abrir enlace Ginkgo Cloud"
+
+#: ..\../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr "Ángulo normal (3 puntos)"
+
+#: ..\../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr "Ángulo de cobb (2 rectas)"
+
+#: ..\../main/tools/colormaptool.cpp:110
+msgid "Invert color map"
+msgstr "Invertir mapa de color"
+
+#: ..\../main/tools/cornerannotationstool.cpp:44
+msgid "Hide corner annotations"
+msgstr "Ocultar anotaciones de las esquinas"
+
+#: ..\../main/tools/cornerannotationstool.cpp:46
+msgid "Show corner annotations"
+msgstr "Mostrar anotaciones de las esquinas"
+
+#: ..\../main/tools/detachwindowtool.cpp:42
+msgid "Attach View"
+msgstr "Encajar vista"
+
+#: ..\../main/tools/detachwindowtool.cpp:44
+msgid "Detach view"
+msgstr "Desencajar vista"
+
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize files"
+msgstr "Dicomizar ficheros"
+
+#: ..\../main/tools/exportdicomdirtool.cpp:32
+msgid "Export to DICOM Dir"
+msgstr "Exportar a DICOM Dir"
+
+#: ..\../main/tools/markertool.cpp:171
+msgid "Point"
+msgstr "Punto"
+
+#: ..\../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr "Flecha"
+
+#: ..\../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr "Elipse"
+
+#: ..\../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr "Trapezoide"
+
+#: ..\../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr "Poligono"
+
+#: ..\../main/tools/markertool.cpp:176
+msgid "Free form"
+msgstr "Forma libre"
+
+#: ..\../main/tools/metricgridtool.cpp:57
+msgid "Grid"
+msgstr "Rejilla"
+
+#: ..\../main/tools/metricgridtool.cpp:67
+msgid "Grid Scale"
+msgstr "Escala rejilla"
+
+#: ..\../main/tools/metricgridtool.cpp:74
+msgid "Scale X"
+msgstr "Escala X"
+
+#: ..\../main/tools/metricgridtool.cpp:78
+msgid "X axis scale"
+msgstr "Escala del eje X"
+
+#: ..\../main/tools/metricgridtool.cpp:87
+msgid "Scale Y"
+msgstr "Escala Y"
+
+#: ..\../main/tools/metricgridtool.cpp:91
+msgid "Y axis scale"
+msgstr "Escala del eje Y"
+
+#: ..\../main/tools/metricgridtool.cpp:206
+msgid "Show grid"
+msgstr "Mostrar rejilla"
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr "Configurar rejilla..."
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr "Configurar rejilla"
+
+#: ..\../main/tools/metricgridtool.cpp:250
+msgid "Hide Grid"
+msgstr "Ocultar rejilla"
+
+#: ..\../main/tools/metricgridtool.cpp:252
+msgid "Show Grid"
+msgstr "Mostrar rejilla"
+
+#: ..\../main/tools/openfiletool.cpp:28
+msgid "Open File"
+msgstr "Abrir fichero"
+
+#: ..\../main/tools/pacsuploadtool.cpp:54
+msgid "Send to PACS..."
+msgstr "Enviar al PACS..."
+
+#: ..\../main/tools/pixelsbluringtool.cpp:59
+msgid "Unset pixels blurring"
+msgstr "Desactivar suavizado de pixels"
+
+#: ..\../main/tools/pixelsbluringtool.cpp:61
+msgid "Set pixels blurring"
+msgstr "Activar suavizado de pixels"
+
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+msgid "PACS Q/R"
+msgstr "PACS Q/R"
+
+#: ..\../main/tools/queryretrievetool.cpp:94
+#: ..\../main/tools/searchginkgocloudhistorytool.cpp:28
+msgid "Search Ginkgo Cloud"
+msgstr "Buscar en Ginkgo Cloud"
+
+#: ..\../main/tools/rotateandfliptool.cpp:151
+msgid "Undo rotate and flip"
+msgstr "Deshacer rotaciones y volteos"
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr "Rotar 90"
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr "antihorario"
+
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr "horario"
+
+#: ..\../main/tools/rotateandfliptool.cpp:156
+msgid "Flip horizontal"
+msgstr "Volteo horizontal"
+
+#: ..\../main/tools/rotateandfliptool.cpp:157
+msgid "Flip vertical"
+msgstr "Volteo vertical"
+
+#: ..\../main/tools/sendpacstool.cpp:34
+msgid "Send to PACS"
+msgstr "Enviar al PACS"
+
+#: ..\../main/tools/sendpacstool.cpp:70
+msgid "Sending to PACS..."
+msgstr "Enviando al PACS..."
+
+#: ..\../main/tools/showtagstool.cpp:42
+msgid "Hide DICOM inspector"
+msgstr "Ocultar el inspector de DICOM"
+
+#: ..\../main/tools/showtagstool.cpp:44
+msgid "Show DICOM inspector"
+msgstr "Mostrar el inspector de DICOM"
+
+#: ..\../main/tools/simpleprinttool.cpp:119
+msgid "Image printing"
+msgstr "Impresión de imágenes"
+
+#: ..\../main/tools/simpleprinttool.cpp:224
+msgid "Page setup"
+msgstr "Configurar página"
+
+#: ..\../main/tools/simpleprinttool.cpp:225
+msgid "Print preview"
+msgstr "Previsualización"
+
+#: ..\../main/tools/simpleprinttool.cpp:272
+msgid "Print image"
+msgstr "Imprimir imagen"
+
+#: ..\../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr "Auto calcular"
+
+#: ..\../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr "Resetear tamaño a la resolución del dispositivo"
+
+#: ..\../main/tools/undotool.cpp:110
+msgid "Redo"
+msgstr "Rehacer"
+
+#: ..\../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr "Deshabilitar bucle"
+
+#: ..\../main/tools/videotool.cpp:153
+msgid "Enable loop"
+msgstr "Habilitar bucle"
+
+#: ..\../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr "%.1f fps"
+
+#: ..\../main/tools/windowlayouttool.cpp:267
+msgid "Add column"
+msgstr "Añadir columna"
+
+#: ..\../main/tools/windowlayouttool.cpp:268
+msgid "Add row"
+msgstr "Añadir fila"
+
+#: ..\../main/tools/windowlayouttool.cpp:270
+msgid "Remove column"
+msgstr "Eliminar columna"
+
+#: ..\../main/tools/windowlayouttool.cpp:271
+msgid "Remove row"
+msgstr "Eliminar fila"
+
+#: ..\../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr "Layout 1x1"
+
+#: ..\../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr "Layout 1x2"
+
+#: ..\../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr "Layout 2x1"
+
+#: ..\../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr "Layout 2x2"
+
+#: ..\../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr "Layout 3x3"
+
+#: ..\../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr "Layout 4x4"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr ""
+"La herramienta de módulo aún estaba registrada cuando se destruyó el "
+"registro de herramientas ToolsRegistry."
+
+#: ..\../main/toolsystem/toolsregistry.cpp:82
+msgid "The tool is already registered"
+msgstr "La herramienta ya está registrada"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:187
+msgid "The module "
+msgstr "El módulo "
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:49
+msgid "Unable to load PNG bitmap resource"
+msgstr "No se pudo cargar el recurso de bitmap PNG"
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:56
+msgid "Unable to load PNG image resource"
+msgstr "No se pudo cargar el recurso de imagen PNG"
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:63
+msgid "Unable to load GIF animation resource"
+msgstr "No se pudo cargar el recurso de animación GIF"
+
+#: ..\../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr "El valor de calibración ha de ser un número decimal"
+
+#: ..\../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr "El valor de calibración es demasiado bajo"
+
+#: ..\../widgets/gui/calibracion.cpp:219
+msgid "Enter the calibration value"
+msgstr "Introduzca el valor de calibración"
+
+#: ..\../widgets/gui/calibracion.cpp:225
+msgid "The calibration value is too low"
+msgstr "El valor de calibración es demasiado bajo"
+
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "The calibration value is too high"
+msgstr "El valor de calibración es demasiado alto"
+
+#: ..\../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr "Realizando calibración..."
+
+#: ..\../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr "Medida real"
+
+#: ..\../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr "Distancia:"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr "Micras"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr "Milímetros"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr "Centímetros"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr "Metros"
+
+#: ..\../widgets/gui/selecciontextobase.cpp:26
+msgid "Note"
+msgstr "Nota"
+
+#: ..\../widgets/wangulo.cpp:1103 ..\../widgets/wangulo.cpp:1105
+msgid "Type"
+msgstr "Tipo"
+
+#: ..\../widgets/wangulo.cpp:1103
+msgid "Normal"
+msgstr "Normal"
+
+#: ..\../widgets/wangulo.cpp:1105
+msgid "Cobb"
+msgstr "Cobb"
+
+#: ..\../widgets/welipse.cpp:779 ..\../widgets/wfreeform.cpp:510
+#: ..\../widgets/wpolygon.cpp:572
+msgid "Center (I)"
+msgstr "Centro (I)"
+
+#: ..\../widgets/welipse.cpp:785 ..\../widgets/wfreeform.cpp:516
+#: ..\../widgets/wpolygon.cpp:578
+msgid "Center (M)"
+msgstr "Centro (M)"
+
+#: ..\../widgets/welipse.cpp:820 ..\../widgets/welipse.cpp:824
+msgid "Greater Radius"
+msgstr "Radio mayor"
+
+#: ..\../widgets/welipse.cpp:821 ..\../widgets/welipse.cpp:825
+msgid "Lower Radius"
+msgstr "Radio menor"
+
+#: ..\../widgets/wfreeform.cpp:522 ..\../widgets/wpolygon.cpp:584
+msgid "Number of Vertex"
+msgstr "Número de vértices"
+
+#: ..\../widgets/wpunto.cpp:382
+msgid "Position (I)"
+msgstr "Posición (I)"
+
+#: ..\../widgets/wpunto.cpp:387
+msgid "Position (M)"
+msgstr "Posición (M)"
+
+#: ..\../widgets/wrule.cpp:558
+msgid "Image Calibration"
+msgstr "Calibración"
+
+#: ..\../widgets/wrule.cpp:665
+msgid "Length"
+msgstr "Longitud"
+
+#: ..\../widgets/wrule.cpp:670
+msgid "Points (I)"
+msgstr "Puntos (I)"
+
+#: ..\../widgets/wrule.cpp:677
+msgid "Points (M)"
+msgstr "Puntos (M)"
+
+#: ..\../widgets/wtextbox.cpp:461
+msgid "Default text"
+msgstr "Texto por defecto"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:41
+msgid "Commit date"
+msgstr "Fecha de consolidación"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr "DESCONOCIDO"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr "<Id desconocido>"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr "%d/%m/%Y"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:214
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr "Consolidado"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:219
+msgid "Modified"
+msgstr "Modificado"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr "No consolidado"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr "NAME SURNAME SECOND_SURNAME"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr "644654645"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:130
+msgid "Commit inform"
+msgstr "Consolidar informe"
+
+#: ..\../wx/propiedades/wxpropiedades.cpp:30
+msgid "Properties of "
+msgstr "Propiedades de "
+
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:31
+msgid "Widget's Name"
+msgstr "Nombre del widget"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr "< &Anterior"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr "&Cancelar"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3701
+msgid "Regular expression invalid: '"
+msgstr "Expresión regular inválida: '"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr ""
+"REGEXP invocada con un número incorrecto de argumentos: %d en lugar de 2."
+
+#: ..\../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+"Error en la lógica: El estudio no está asociado con ningún paciente "
+"existente en el modelo"
+
+#: ..\../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+"Error en la lógica: La serie no está asociado con ningún studio existente en "
+"el modelo"
+
+#: ..\../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+"Error en la lógica: La imagen no está asociada con ninguna serie existente "
+"en el modelo"
+
+#: ..\../commands/dialogopathssobreescribirbase.h:56
+msgid "Overwrite Paths"
+msgstr "Sobreescribir rutas"
+
+#: ..\../ginkgopro/ginkgo_pro_defines.h:21
+msgid "Professional DICOM CADx environment"
+msgstr "Entorno profesional DICOM "
+
+#: ..\../main/controllers/dcmtk/dicomservers.h:39
+msgid "Server not found"
+msgstr "Servidor no encontrado"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:99
+msgid "DICOM Query/Retrieve"
+msgstr "DICOM Consulta/Descarga"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:123
+msgid "Not found"
+msgstr "No encontrado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+msgid "Advanced Settings"
+msgstr "Configuración avanzada"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+msgid "Edit profile"
+msgstr "Editar perfil"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+msgid "Add/Edit Location"
+msgstr "Añadir/Editar ubicación"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+msgid "Add window/level"
+msgstr "Añadir window/level"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+msgid "Add tag"
+msgstr "Añadir tag"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+msgid "Setup window position"
+msgstr "Configurar la posición de la ventana"
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.h:61
+msgid "Closing"
+msgstr "Cerrando"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+msgid "DICOM Dir configuration"
+msgstr "Configuración de DICOMDIR"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:70
+msgid "Open Ginkgo Cloud"
+msgstr "Abrir Ginkgo Cloud"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:123
+msgid "Ginkgo Cloud search"
+msgstr "Búsqueda en Ginkgo Cloud"
+
+#: ..\../main/gui/history3/confirmdeletedialog.h:24
+msgid " from History?"
+msgstr " del Historial?"
+
+#: ..\../main/gui/history3/historypanel3base.h:100
+msgid "Medical history"
+msgstr "Historial médico"
+
+#: ..\../main/gui/history3/historypanel3base.h:161
+msgid "Open With ..."
+msgstr "Abrir con..."
+
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Select a View"
+msgstr "Seleccione una vista"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+msgid "Message detail"
+msgstr "Detalles del mensaje"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+msgid "Log node"
+msgstr "Log node"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:87
+msgid "Closing Ginkgo CADx"
+msgstr "Cerrando Ginkgo CADx"
+
+#: ..\../main/gui/paneltags/paneltagsbase.h:57
+msgid "DICOM Inspector"
+msgstr "Inspector DICOM"
+
+#: ..\../main/license.h:31
+msgid "Open Source DICOM CADx environment"
+msgstr "Entorno CADx DICOM Open Source"
+
+#: ..\../widgets/gui/calibracionbase.h:65
+msgid "Calibration"
+msgstr "Calibración"
+
+#: ..\../wx/propiedades/wxpropiedadesbase.h:62
+msgid "Properties of ..."
+msgstr "Propiedades de..."
+
+#: ..\../wx/thumbnailctrl/thumbnailwidget.h:44
+msgid "Image Browser Dialog"
+msgstr "Image Browser Dialog"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+msgid "Test title"
+msgstr "Título de prueba"
+
+#~ msgid "Tile Horizontally"
+#~ msgstr "Mosaico horizontal"
+
+#~ msgid "Tile Vertically"
+#~ msgstr "Mosaico vertical"
+
+#~ msgid "Grid (two columns)"
+#~ msgstr "Rejilla (dos columnas)"
+
+#~ msgid "Grid (three columns)"
+#~ msgstr "Rejilla (tres columnas)"
+
+#~ msgid "Grid organization"
+#~ msgstr "Organización en rejilla"
+
+#~ msgid ""
+#~ "Unexpected Error exporting, the view is not allowed to export to the "
+#~ "format selected"
+#~ msgstr ""
+#~ "Error inexperado al exportar, la vista no permite exportar al formato "
+#~ "seleccionado"
+
+#~ msgid "Failed to store the file, check permissions on the directory"
+#~ msgstr ""
+#~ "Error al almacenar el fichero, revise los permisos sobre el directorio"
+
+#~ msgid "The key files will not be exported"
+#~ msgstr "Los ficheros clave no se exportarán"
+
+#~ msgid "Current"
+#~ msgstr "Actual"
+
+#~ msgid "All"
+#~ msgstr "Todas"
+
+#~ msgid "JPG"
+#~ msgstr "JPG"
+
+#~ msgid "BMP"
+#~ msgstr "BMP"
+
+#~ msgid "PNG"
+#~ msgstr "PNG"
+
+#~ msgid "Content"
+#~ msgstr "Contenido"
+
+#~ msgid "Include annotation Widgets"
+#~ msgstr "Incluir widgets de anotación"
+
+#~ msgid "Evaluation maps"
+#~ msgstr "Mapas de valoración"
+
+#~ msgid "Color"
+#~ msgstr "Color:"
+
+#~ msgid "Vertex (I)"
+#~ msgstr "Vértices (I)"
+
+#~ msgid "Vertex (M)"
+#~ msgstr "Vértices (M)"
+
+#~ msgid "Center"
+#~ msgstr "Centro"
+
+#~ msgid "0"
+#~ msgstr "0"
+
+#~ msgid "Select PACS servera"
+#~ msgstr "Seleccionar servidor PACS"
+
+#~ msgid "You have to specify at least uid study or accession number"
+#~ msgstr ""
+#~ "Se debe especificar al menos un study instance uid o accession number"
+
+#~ msgid "You have to specify at least uid series"
+#~ msgstr "Se debe especificar al menos un uid de series"
+
+#~ msgid "You have to specify uid series"
+#~ msgstr "Debe especificarse el uid de la serie"
+
+#~ msgid "Patient's Id"
+#~ msgstr "Id del paciente"
+
+#~ msgid "Patient's name"
+#~ msgstr "Nombre de paciente"
+
+#~ msgid "%D{%Y/%m/%d %H:%M:%S.%q} [%t] %-5p %c %x - %m%n"
+#~ msgstr "%D{%d/%m/%Y %H:%M:%S.%q} [%t] %-5p %c %x - %m%n"
+
+#~ msgid "Checking program updates..."
+#~ msgstr "Comprobando actualizaciones del programa..."
+
+#~ msgid "Subsystem integration error: uninitialized result data container."
+#~ msgstr ""
+#~ "Error en subsistema de integración: Contenedor de resultado no "
+#~ "inicializado."
+
+#~ msgid "Untitled"
+#~ msgstr "Sin título"
+
+#~ msgid "UID"
+#~ msgstr "UID"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">"
+#~ msgstr ">"
+
+#~ msgid "<"
+#~ msgstr "<"
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid "You are not allowed to download this kind of modalities ("
+#~ msgstr "No se permite la descarga de estas modalidades ("
+
+#~ msgid "Searching..."
+#~ msgstr "Buscando..."
+
+#~ msgid "unknown column"
+#~ msgstr "columna desconocida"
+
+#~ msgid "URL"
+#~ msgstr "URL"
+
+#~ msgid "BucketId"
+#~ msgstr "BucketId"
+
+#~ msgid "Pending tasks"
+#~ msgstr "Tareas pendientes"
+
+#~ msgid "Restart pending tasks"
+#~ msgstr "Reiniciar tareas pendientes"
+
+#~ msgid "Remove pending tasks"
+#~ msgstr "Eliminar tareas pendientes"
+
+#~ msgid "Advanced tasks management..."
+#~ msgstr "Gestión avanzada de tareas..."
+
+#~ msgid "You can't remove series with pending tasks, cancel tasks and retry"
+#~ msgstr ""
+#~ "No se pueden eliminar series contareas pendientes, cancele las tareas "
+#~ "pendientes y vuelvalo a intentar"
+
+#~ msgid "Are you sure you want to delete task?"
+#~ msgstr "¿Está seguro de que desea eliminar la tarea?"
+
+#~ msgid "Delete tasks"
+#~ msgstr "Eliminar tareas"
+
+#~ msgid "Sort by"
+#~ msgstr "Ordenar por"
+
+#~ msgid "Pateint id"
+#~ msgstr "Id del paciente"
+
+#~ msgid "Horizontal mosaic"
+#~ msgstr "Mosaico horizontal"
+
+#~ msgid "Vertical mosaic"
+#~ msgstr "Mosaico vertical"
+
+#~ msgid "Include Annotations"
+#~ msgstr "Incluir anotaciones"
+
+#~ msgid "Evaluation Maps"
+#~ msgstr "Mapas de valoración"
+
+#~ msgid "Zoom"
+#~ msgstr "Zoom"
+
+#~ msgid "Options"
+#~ msgstr "Opciones"
+
+#~ msgid "Images per sheet"
+#~ msgstr "Imágenes por hoja"
+
+#~ msgid "Print ..."
+#~ msgstr "Imprimir..."
+
+#~ msgid "Completed"
+#~ msgstr "Completado"
+
+#~ msgid "Delete task"
+#~ msgstr "Eliminar tarea"
+
+#~ msgid "Restart task"
+#~ msgstr "Reiniciar tarea"
+
+#~ msgid "Delete all"
+#~ msgstr "Eliminar todos"
+
+#~ msgid "Are you sure you want to delete tasks?"
+#~ msgstr "¿Está seguro de que desea eliminar la tarea?"
+
+#~ msgid "ID"
+#~ msgstr "ID"
+
+#~ msgid "Point Size"
+#~ msgstr "Tamaño del punto"
+
+#~ msgid "Family"
+#~ msgstr "Familia"
+
+#~ msgid "Face Name"
+#~ msgstr "Face Name"
+
+#~ msgid "Underline"
+#~ msgstr "Subrayado"
+
+#~ msgid "Make a selection:"
+#~ msgstr "Seleccione:"
+
+#~ msgid "Categorized Mode"
+#~ msgstr "Modo por categorías"
+
+#~ msgid "Alphabetic Mode"
+#~ msgstr "Modo alfabético"
+
+#~ msgid "False"
+#~ msgstr "Falso"
+
+#~ msgid "True"
+#~ msgstr "Verdadero"
+
+#~ msgid "Unspecified"
+#~ msgstr "Sin especificar"
+
+#~ msgid ""
+#~ "Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", "
+#~ "NOT \"%s\"."
+#~ msgstr ""
+#~ "El tipo de la operación \"%s\" falló: Propiedad con nombre \"%s\" es del "
+#~ "tipo \"%s\", NO \"%s\"."
+
+#~ msgid "Error in resource: %s"
+#~ msgstr "Error en el recurso: %s"
+
+#~ msgid "Value must be %lld or higher"
+#~ msgstr "El valor tiene que ser mayor o igual a %lld"
+
+#~ msgid "Value must be %llu or higher"
+#~ msgstr "El valor tiene que ser mayor o igual a %llu"
+
+#~ msgid "Value must be %llu or less"
+#~ msgstr "El valor tiene que ser menor o igual a %llu"
+
+#~ msgid "Value must be %f or higher"
+#~ msgstr "El valor tiene que ser mayor o igual a %f"
+
+#~ msgid "Value must be %f or less"
+#~ msgstr "El valor tiene que ser menor o igual a %f"
+
+#~ msgid "Not %s"
+#~ msgstr "No %s"
+
+#~ msgid "Choose a directory:"
+#~ msgstr "Seleccione un directorio:"
+
+#~ msgid "Choose a file"
+#~ msgstr "Seleccione un fichero"
+
+#~ msgid "All files (*.*)|*.*"
+#~ msgstr "Todos los Archivos (*.*)|*.*"
+
+#~ msgid "Update"
+#~ msgstr "Actualizar"
+
+#~ msgid "Up"
+#~ msgstr "Arriba"
+
+#~ msgid "Down"
+#~ msgstr "Abajo"
+
+#~ msgid "Page %i"
+#~ msgstr "Página %i"
+
+#~ msgid "Configure proxy"
+#~ msgstr "Configurar proxy"
+
+#~ msgid "Use system settings"
+#~ msgstr "Usar configuración del sistema"
+
+#~ msgid "Manual configuration of proxy:"
+#~ msgstr "Configuración manual del proxy:"
+
+#~ msgid "Host:"
+#~ msgstr "Host:"
+
+#~ msgid "Port:"
+#~ msgstr "Puerto:"
+
+#~ msgid "Password:"
+#~ msgstr "Contraseña:"
+
+#~ msgid "Authenticate"
+#~ msgstr "Autenticar"
+
+#~ msgid "Show / Hide DICOM tags panel"
+#~ msgstr "Mostrar/Ocultar el panel de tags DICOM"
+
+#~ msgid "Select tag..."
+#~ msgstr "Seleccionar tag..."
+
+#~ msgid "Show metadatada"
+#~ msgstr "Mostrar metadatos"
+
+#~ msgid "usage data (no patient data will be sent)"
+#~ msgstr "estadísticas de uso"
+
+#~ msgid "Updates"
+#~ msgstr "Actualizaciones"
+
+#~ msgid "Visualization"
+#~ msgstr "Visualización"
+
+#~ msgid "http://ginkgo-cadx.com/en/services/"
+#~ msgstr "http://ginkgo-cadx.com/es/servicios/"
+
+#~ msgid "Reset window level and zoom"
+#~ msgstr "Resetear window level y zoom"
+
+#~ msgid "Abdomen"
+#~ msgstr "Abdomen"
+
+#~ msgid "Lung"
+#~ msgstr "Pulmón"
+
+#~ msgid "Vertebra"
+#~ msgstr "Vertebra"
+
+#~ msgid "Cranium"
+#~ msgstr "Cráneo"
+
+#~ msgid "Mediastinum"
+#~ msgstr "Mediastino"
+
+#~ msgid "Spine"
+#~ msgstr "Columna"
+
+#~ msgid "Double click to edit"
+#~ msgstr "Doble click para editar"
+
+#~ msgid "Dicomize images..."
+#~ msgstr "Dicomizar imágenes..."
+
+#~ msgid "Dicomize images"
+#~ msgstr "Dicomizar imágenes"
+
+#~ msgid "Reset 1:1"
+#~ msgstr "Reset 1:1"
+
+#~ msgid "Open again"
+#~ msgstr "Abrir de nuevo"
+
+#~ msgid "Copy image to clipboard"
+#~ msgstr "Copiar al portapapeles"
+
+#~ msgid "Click on this url"
+#~ msgstr "Haga clic en esta url"
+
+#~ msgid "Sychronize files"
+#~ msgstr "Ficheros dicomizados"
+
+#~ msgid "Sychornize files"
+#~ msgstr "Ficheros dicomizados"
+
+#~ msgid "Download finished"
+#~ msgstr "Descarga completada"
+
+#~ msgid "Download finished with errors"
+#~ msgstr "Descarga finalizada con errores"
+
+#~ msgid "Successful connection test."
+#~ msgstr "Prueba de conexión satisfactoria."
+
+#~ msgid "The service did not respond properly:"
+#~ msgstr "El servicio no respondió correctamente:"
+
+#~ msgid "Error starting network support"
+#~ msgstr "Error al iniciar el soporte de red"
+
+#~ msgid "Association Release"
+#~ msgstr "Liberando la asociación"
+
+#~ msgid "Association Aborted"
+#~ msgstr "Asociación Abortada"
+
+#~ msgid "No results obtained."
+#~ msgstr "No se obtuvieron resultados."
+
+#~ msgid ""
+#~ "No results where obtained in PACS retrieve.\n"
+#~ "Maybe study doesn't exist or you have a wrong PACS server configuration."
+#~ msgstr ""
+#~ "No se obtuvieron resultados en la adquisición desde PACS.\n"
+#~ "Tal vez no exista el estudio o la configuración del servidor PACS sea "
+#~ "incorrecta."
+
+#~ msgid "Wado url"
+#~ msgstr "URL Wado"
+
+#~ msgid "PACS Consulting ..."
+#~ msgstr "Consultando PACS..."
+
+#~ msgid "Serie download complete"
+#~ msgstr "Descarga de serie completada"
+
+#~ msgid "Study download complete"
+#~ msgstr "Descarga de estudio completada"
+
+#~ msgid ""
+#~ "No results obtained. Maybe you have a wrong PACS server configuration"
+#~ msgstr ""
+#~ "No se obtuvieron resultados. Tal vez tenga una configuración incorrecta "
+#~ "del servidor PACS"
+
+#~ msgid "\"petition-id\" attribute expected at \"gnkworkflow\" scope"
+#~ msgstr ""
+#~ "Atributo \"petition-id\" no especificado al procesar tag \"gnkworkflow\""
+
+#~ msgid ""
+#~ "Studies are already in the download queue.\n"
+#~ "Do you want to repeat download?"
+#~ msgstr ""
+#~ "Los estudios  ya están en la cola de descargas.\n"
+#~ "¿Desea repetir la descarga?"
+
+#~ msgid ""
+#~ "Series were already in the download queue.\n"
+#~ "Do you want to force download?"
+#~ msgstr ""
+#~ "La serie ya está en la cola de descargas.\n"
+#~ "¿Desea forzar la descarga?"
+
+#~ msgid "Downloads"
+#~ msgstr "Descargas"
+
+#~ msgid "Study description"
+#~ msgstr "Descripción del estudio"
+
+#~ msgid "Clean"
+#~ msgstr "Limpiar"
+
+#~ msgid "Clean finished downloads"
+#~ msgstr "Limpiar descargas finalizadas"
+
+#~ msgid "Starting..."
+#~ msgstr "Arrancando..."
+
+#~ msgid ""
+#~ "Diagnostic files can't be opened, you have to open the diagnosed series"
+#~ msgstr ""
+#~ "Los ficheros de diagnóstico no se pueden abrir, se tiene que abrir la "
+#~ "serie diagnosticada"
+
+#~ msgid "Error: "
+#~ msgstr "Error: "
+
+#~ msgid "Error: No images were downloaded"
+#~ msgstr "Error: No se obtuvieron imágenes"
+
+#~ msgid "Finished"
+#~ msgstr "Finalizado"
+
+#~ msgid "Play"
+#~ msgstr "Continuar"
+
+#~ msgid "Retry"
+#~ msgstr "Reintentar"
+
+#~ msgid "The selected directory does must be empty"
+#~ msgstr "El directorio seleccionado debe estar vacío"
+
+#~ msgid "Migrate..."
+#~ msgstr "Migrar..."
+
+#~ msgid "Choose the import profile"
+#~ msgstr "Seleccione el perfil de importación"
+
+#~ msgid "Import profile"
+#~ msgstr "Perfil de importación"
+
+#~ msgid "What do you want to do?"
+#~ msgstr "¿Que desea hacer?"
+
+#~ msgid "This version is unabled to open it."
+#~ msgstr "Esta versión es incapaz de abrirlo."
+
+#~ msgid "Brain oasc asdf"
+#~ msgstr "Brain oasc asdf"
+
+#~ msgid "An error ocurred loading Ginkgo News check your internet connection"
+#~ msgstr ""
+#~ "Ha ocurrido un error mientras se cargaban las Noticias de Ginkgo CADx, "
+#~ "comprueba tu conexión a internet"
+
+#~ msgid "Welcome"
+#~ msgstr "Bienvenido"
+
+#~ msgid "Twitter"
+#~ msgstr "Twitter"
+
+#~ msgid "rows"
+#~ msgstr "filas"
+
+#~ msgid "%d/%m/%Y %H:%M:%S"
+#~ msgstr "%d/%m/%Y %H:%M:%S"
+
+#~ msgid "Reprocess Series"
+#~ msgstr "Reprocesar serie"
+
+#~ msgid ""
+#~ "If you reprocess this series it will be uploaded to PACS server and \n"
+#~ "integration message will be resent to integration engine.\n"
+#~ "Do you want to continue?"
+#~ msgstr ""
+#~ "Si reprocesas esta serie se subirá al servidor PACS y\n"
+#~ "se enviará de nuevo un mensaje al motor de integración.\n"
+#~ "¿Confirma que desea continuar?"
+
+#~ msgid ""
+#~ "Unable to reprocess this series. This series hasn't been dicomized with "
+#~ "Ginkgo CADx."
+#~ msgstr ""
+#~ "No es posible reprocesar esta serie. Esta serie no se ha dicomizado con "
+#~ "Ginkgo CADx."
+
+#~ msgid "Loading modules ..."
+#~ msgstr "Cargando módulos..."
+
+#~ msgid "TODO Ginkgo CADx online manual ..."
+#~ msgstr "Manual en línea de Ginkgo CADx ..."
+
+#~ msgid "Export global..."
+#~ msgstr "Exportar global..."
+
+#~ msgid "Import global..."
+#~ msgstr "Importar global..."
+
+#~ msgid "Skipping invalid extension without required keys:"
+#~ msgstr "Ignorando extensión con descriptor inválido:"
+
+#~ msgid "Closing windows..."
+#~ msgstr "Cerrando ventanas..."
+
+#~ msgid "You have to set a valid port"
+#~ msgstr "Debe especificarse un puerto válido"
+
+#~ msgid "XML-RPC Server"
+#~ msgstr "Servicio XML-RPC"
+
+#~ msgid "Enable XML-RPC server"
+#~ msgstr "Habilitar servicio XML-RPC"
+
+#~ msgid ""
+#~ "Enable/Disable XML RPC Server for listening remote operations from EHR "
+#~ "System"
+#~ msgstr ""
+#~ "Habilitar/Deshabilitar el Servicio XML RPC de escuchar de solicitudes "
+#~ "remotas desde la HCE"
+
+#~ msgid "TCP listening port for XML-RPC server"
+#~ msgstr "Puerto TCP de escucha del servicio XML-RPC"
+
+#~ msgid "XmlRpc++"
+#~ msgstr "XmlRpc++"
+
+#~ msgid "Redo "
+#~ msgstr "Rehacer"
+
+#~ msgid "Ginkgo CADx Pro "
+#~ msgstr "Ginkgo CADx Pro"
+
+#~ msgid "TODO FILL IN ABOUT DIALOG CREDITS"
+#~ msgstr "TODO FILL IN ABOUT DIALOG CREDITS"
+
+#~ msgid "We want to thanks "
+#~ msgstr "¡Queremos agradecer a "
+
+#~ msgid " for all their support in Ginkgo CADx creation!"
+#~ msgstr " por todo el apoyo en la creación de Ginkgo CADx!"
+
+#~ msgid "Translators"
+#~ msgstr "Traductores"
+
+#~ msgid "Japanese: Noriya Yokohama"
+#~ msgstr "Japonés: Noriya Yokohama"
+
+#~ msgid "German: Sebastian Hilbert"
+#~ msgstr "Alemán: Sebastian Hilbert"
+
+#~ msgid "Turkish: zeugma (sunder67)"
+#~ msgstr "Turco: zeugma (sunder67)"
+
+#~ msgid "Spanish: JFLP (jluna80)"
+#~ msgstr "Español: JFLP (jluna80)"
+
+#~ msgid "Brazillian Portuguese: Marcel Ribeiro Dantas"
+#~ msgstr "Portugués (Brasil): Marcel Ribeiro Dantas"
+
+#~ msgid "Greetings"
+#~ msgstr "Agradecimientos"
+
+#~ msgid ""
+#~ "Debian-Med team specially Andreas Tille and Karlsten Hilbert: packaging, "
+#~ "testing and bug reporting"
+#~ msgstr ""
+#~ "Debian-Med team especialmente a Andreas Tille and Karlsten Hilbert: "
+#~ "empaquetado, pruebas y reporte de errores"
+
+#~ msgid "Ross Boswell: PACS compliance testing"
+#~ msgstr "Ross Boswell: pruebas de compatibilidad con PACS"
+
+#~ msgid "Andre Alvim Tolentino: Printing issues"
+#~ msgstr "Andre Alvim Tolentino: módulo de impresión"
+
+#~ msgid "Ginkgo CADx license agreement version  "
+#~ msgstr "Acuerdo de licencia de uso de Ginkgo CADx version  "
+
+#~ msgid ""
+#~ "\n"
+#~ "Ginkgo CADx license agreement <version>\n"
+#~ "-----------------------------------\n"
+#~ "\n"
+#~ "This version is a trial version for <customer>, and therefore its use is "
+#~ "restricted for this purpose.\n"
+#~ "\n"
+#~ "\n"
+#~ "\n"
+#~ "S.L MetaEmotion Healthcare\n"
+#~ "http://healthcare.metaemotion.com/en/welcome\n"
+#~ "contacto at metaemotion.com"
+#~ msgstr ""
+#~ "\n"
+#~ "Acuerdo de licencia de uso de Ginkgo CADx <version>\n"
+#~ "-----------------------------------\n"
+#~ "\n"
+#~ "\n"
+#~ "La presente versión constituye una versión de evaluación para <cliente>, "
+#~ "y por tanto su uso está restringido a este fin.\n"
+#~ "\n"
+#~ "\n"
+#~ "\n"
+#~ "MetaEmotion S.L\n"
+#~ "www.metaemotion.com\n"
+#~ "contacto at metaemotion.com"
+
+#~ msgid "About &Ginkgo CADx ..."
+#~ msgstr "Acerca de Ginkgo CADx..."
+
+#~ msgid "About Ginkgo CADx ..."
+#~ msgstr "Acerca de Ginkgo CADx..."
+
+#~ msgid "Ginkgo CADx settings"
+#~ msgstr "Configuración de Ginkgo CADx"
+
+#~ msgid "Ginkgo CADx v"
+#~ msgstr "Ginkgo CADx v"
+
+#~ msgid "Show history window"
+#~ msgstr "Mostrar ventana de historial"
+
+#~ msgid "Ginkgo CADx Settings"
+#~ msgstr "Configuración de Ginkgo CADx"
+
+#~ msgid "About Ginkgo CADx..."
+#~ msgstr "Acerca de Ginkgo CADx..."
+
+#~ msgid "Export diagnostic"
+#~ msgstr "Exportar diagnóstico"
+
+#~ msgid "Start page ..."
+#~ msgstr "Página de inicio"
+
+#~ msgid "Ginkgo CADx start page ..."
+#~ msgstr "Página de inicio de Ginkgo CADx ..."
+
+#~ msgid "Show On Startup"
+#~ msgstr "Mostrar al inicio"
+
+#~ msgid "Hide history window"
+#~ msgstr "Ocultar ventana de historial"
+
+#~ msgid "Extensions Support"
+#~ msgstr "Soporte de extensiones"
+
+#~ msgid "URL for new extensions"
+#~ msgstr "URL para nuevas extensiones"
+
+#~ msgid "Aborting incoming association"
+#~ msgstr "Abortando la asociación entrante"
+
+#~ msgid "Disengage"
+#~ msgstr "Desencajar"
+
+#~ msgid "Column organization (2 columns)"
+#~ msgstr "Organización en columnas (2 columnas)"
+
+#~ msgid "Maximize"
+#~ msgstr "Maximizar"
+
+#~ msgid "Display Options"
+#~ msgstr "Opciones visualización"
+
+#~ msgid "Close Panel"
+#~ msgstr "Cerrar panel"
+
+#~ msgid "Close All"
+#~ msgstr "&Cerrar todas"
+
+#~ msgid "Close all tabs"
+#~ msgstr "Cerrar todas las vistas"
+
+#~ msgid "Grid Organization"
+#~ msgstr "Organización en rejilla"
+
+#~ msgid "Obtain extensions..."
+#~ msgstr "Obtener extensiones..."
+
+#~ msgid "Get extensions ..."
+#~ msgstr "Obtener extensiones ..."
+
+#~ msgid "Image"
+#~ msgstr "Imagen"
+
+#~ msgid "3D tools"
+#~ msgstr "Herramientas 3D"
+
+#~ msgid "Segmenting Chroma Local ..."
+#~ msgstr "Segmentando chroma local..."
+
+#~ msgid "Chroma Segmenting Global ..."
+#~ msgstr "Segmentando chroma global..."
+
+#~ msgid "Extracting cut ..."
+#~ msgstr "Extrayendo recorte..."
+
+#~ msgid ""
+#~ "\n"
+#~ "There are %d files that overwrite existing files"
+#~ msgstr ""
+#~ "\n"
+#~ "Existen %d ficheros que ya están presentes en el historial"
+
+#~ msgid "This files has to be overwritten"
+#~ msgstr "Estos ficheros tienen que sobreescribirse"
+
+#~ msgid "Finished .."
+#~ msgstr "Finalizado..."
+
+#~ msgid "Merge diagnostic"
+#~ msgstr "Mezclando con diagnóstico"
+
+#~ msgid "Merging files..."
+#~ msgstr "Mezclando ficheros..."
+
+#~ msgid "Waiting upload..."
+#~ msgstr "Esperando por la subida..."
+
+#~ msgid "Merging file %d of %d"
+#~ msgstr "Mezclando fichero %d de %d"
+
+#~ msgid ""
+#~ "Extension is incompatible with current core. Please, check for upgrades."
+#~ msgstr ""
+#~ "La extensión no es compatible con la versión actual del núcleo. Por "
+#~ "favor, comprueba actualizaciones."
+
+#~ msgid "Null Tool"
+#~ msgstr "Herramienta nula"
+
+#~ msgid "Duplicate Tool"
+#~ msgstr "Herramienta duplicada"
+
+#~ msgid "Error deleting the patient in the database:\n"
+#~ msgstr "Error al eliminar el paciente de la base de datos: \n"
+
+#~ msgid "Error deleting the Study of database:\n"
+#~ msgstr "Error al eliminar el Estudio de la base de datos: \n"
+
+#~ msgid "Error deleting file from de database: \n"
+#~ msgstr "Error al eliminar el fichero de la base de datos: \n"
+
+#~ msgid "Error deleting file from database:\n"
+#~ msgstr "Error al eliminar el fichero de la base de datos: \n"
+
+#~ msgid "All modalities"
+#~ msgstr "Todas las modalidades"
+
+#~ msgid "Opening series..."
+#~ msgstr "Abriendo series..."
+
+#~ msgid "Deleting series..."
+#~ msgstr "Eliminando series..."
+
+#~ msgid "Activate"
+#~ msgstr "Activar"
+
+#~ msgid "Not loaded"
+#~ msgstr "No cargada"
+
+#~ msgid "Plugin's path"
+#~ msgstr "Directorio de extensiones"
+
+#~ msgid "1.0"
+#~ msgstr "1.0"
+
+#~ msgid "Metaemotion S.L."
+#~ msgstr "MetaEmotion S.L."
+
+#~ msgid "Select files you want to export"
+#~ msgstr "Seleccione los ficheros que desea exportar"
+
+#~ msgid ""
+#~ "There are selected diagnostics with pending modifications\n"
+#~ "Do you want to save it before uploading?"
+#~ msgstr ""
+#~ "Los diagnósticos seleccionados tienen modificaciones pendientes\n"
+#~ "¿Desea guardar los cambios antes de enviar al PACS?"
+
+#~ msgid "Select Series you want to export"
+#~ msgstr "Seleccione las series que desea exportar"
+
+#~ msgid "No description"
+#~ msgstr "Sin descripción"
+
+#~ msgid "Send to PACS server"
+#~ msgstr "Enviar a un servidor PACS"
+
+#~ msgid "You can't remove opened studies"
+#~ msgstr "No se pueden elminar estudios abiertos"
+
+#~ msgid "this Study"
+#~ msgstr "este estudio"
+
+#~ msgid "error, have tried to select a file that is not added to history"
+#~ msgstr ""
+#~ "error, se ha intentado activar un fichero que no esta añadido al historial"
+
+#~ msgid "Last week"
+#~ msgstr "Última semana"
+
+#~ msgid ""
+#~ "\n"
+#~ "There aren't any stored study that matches with the search filter.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "No existen estudios cargados que cumplan los criterios de filtrado.\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "To begin working must change filter criteria, acquire an existing study "
+#~ "or import images in DICOM format.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Para comenzar a trabajar debe cambiar los criterios de filtrado, adquirir "
+#~ "un estudio DICOM existente o importar imágenes a formato DICOM.\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "There is no size in the medical history to show every patients\n"
+#~ msgstr ""
+#~ "\n"
+#~ "No hay sitio en el historial para mostrar a todos los pacientes\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Try using filters or collapsing nodes and refresh search\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Intente usar filtros o colapsar nodos y refresque la búsqueda\n"
+
+#~ msgid "&DICOM &Acquisition"
+#~ msgstr "&Adquirir DICOM"
+
+#~ msgid "Acquiring a new DICOM study"
+#~ msgstr "Adquirir un estudio DICOM"
+
+#~ msgid "&Open File"
+#~ msgstr "&Abrir fichero"
+
+#~ msgid "Open a DICOM file"
+#~ msgstr "Abrir un fichero DICOM"
+
+#~ msgid "&Open Folder"
+#~ msgstr "&Abrir directorio"
+
+#~ msgid "Acquire from a local folder"
+#~ msgstr "Adquirir un directorio local"
+
+#~ msgid "&Import ..."
+#~ msgstr "Importar..."
+
+#~ msgid "Import images"
+#~ msgstr "Importar imágenes"
+
+#~ msgid "12412012 Q"
+#~ msgstr "12412012 Q"
+
+#~ msgid "31/08/1983"
+#~ msgstr "31/08/1983"
+
+#~ msgid "Javier Tovar Velasco"
+#~ msgstr "Javier Tovar Velasco"
+
+#~ msgid "Esto es un texto algo largo para probar "
+#~ msgstr "Esto es un texto algo largo para probar "
+
+#~ msgid "10:20"
+#~ msgstr "10:20"
+
+#~ msgid "31/02/2010"
+#~ msgstr "31/02/20010"
+
+#~ msgid "CT"
+#~ msgstr "CT"
+
+#~ msgid "Filters"
+#~ msgstr "Filtros"
+
+#~ msgid "to"
+#~ msgstr "a"
+
+#~ msgid "Id: "
+#~ msgstr "Id: "
+
+#~ msgid "Name: "
+#~ msgstr "Nombre: "
+
+#~ msgid "<Unknow ID>"
+#~ msgstr "<Id desconocido>"
+
+#~ msgid "Sex: male"
+#~ msgstr "Sexo: masculino"
+
+#~ msgid "Sex: female"
+#~ msgstr "Sexo: femenino"
+
+#~ msgid "Birth date: "
+#~ msgstr "Fecha de nacimiento:"
+
+#~ msgid "&Delete Patient from History"
+#~ msgstr "&Eliminar el paciente del Historial"
+
+#~ msgid "Failed to remove patient, you have to close opened studies"
+#~ msgstr ""
+#~ "Error al eliminar el paciente, se tienen que cerrar los estudios abiertos"
+
+#~ msgid "this Patient"
+#~ msgstr "el paciente"
+
+#~ msgid "Description: "
+#~ msgstr "Descripción: "
+
+#~ msgid "Date: "
+#~ msgstr "Fecha: "
+
+#~ msgid "Time: "
+#~ msgstr "Hora: "
+
+#~ msgid "Modality: "
+#~ msgstr "Modalidad: "
+
+#~ msgid "Series UID: "
+#~ msgstr "UID serie: "
+
+#~ msgid "UID Importer: "
+#~ msgstr "UID importador: "
+
+#~ msgid "Acquire from a removable unit"
+#~ msgstr "Adquirir desde una unidad extraíble"
+
+#~ msgid ""
+#~ "The study you want to export is modified.\n"
+#~ "Would you like to save it?"
+#~ msgstr ""
+#~ "El estudio que desea exportar está modificado.\n"
+#~ "¿Desea guardarlo?"
+
+#~ msgid "Import Images"
+#~ msgstr "Importar imágenes"
+
+#~ msgid "DICOM &acquisition from PACS"
+#~ msgstr "&Adquirir DICOM desde el PACS"
+
+#~ msgid "&Import images..."
+#~ msgstr "Importar imágenes..."
+
+#~ msgid "&Save"
+#~ msgstr "&Guardar"
+
+#~ msgid "Save the active study."
+#~ msgstr "Guardar el estudio activo."
+
+#~ msgid "Export current series..."
+#~ msgstr "Exportar serie actual..."
+
+#~ msgid "Export the active study to other formats"
+#~ msgstr "Exportar el estudio activo a otros formatos"
+
+#~ msgid "Print..."
+#~ msgstr "Imprimir..."
+
+#~ msgid "Export ..."
+#~ msgstr "Exportar..."
+
+#~ msgid "Upload to PACS"
+#~ msgstr "Enviar al PACS"
+
+#~ msgid "Select Series you want to upload"
+#~ msgstr "Seleccione las series que desea subir"
+
+#~ msgid "Creating new images ..."
+#~ msgstr "Creando nuevas imágenes ..."
+
+#~ msgid "Select files you want to upload"
+#~ msgstr "Seleccione los archivos que desea enviar"
+
+#~ msgid "PACS server"
+#~ msgstr "Servidor PACS"
+
+#~ msgid "Assistant to send files to PACS"
+#~ msgstr "Asistente para el envío de archivos al PACS"
+
+#~ msgid "Undo\tCtrl+z"
+#~ msgstr "Deshacer\tCtrl+z"
+
+#~ msgid "Redo\tCtrl+y"
+#~ msgstr "Rehacer\tCtrl+y"
+
+#~ msgid "Decrease"
+#~ msgstr "Disminuir"
+
+#~ msgid "Decrease value"
+#~ msgstr "Disminuir la valoración"
+
+#~ msgid "Increase"
+#~ msgstr "Aumentar"
+
+#~ msgid "Increase value"
+#~ msgstr "Aumentar la valoración"
+
+#~ msgid "Radious"
+#~ msgstr "Radio"
+
+#~ msgid "Factor (0.50)"
+#~ msgstr "Factor (0.50)"
+
+#~ msgid "Factor"
+#~ msgstr "Factor"
+
+#~ msgid "Factor (%.2f)"
+#~ msgstr "Factor (%.2f)"
+
+#~ msgid "Elevation"
+#~ msgstr "Elevación"
+
+#~ msgid "Add Column"
+#~ msgstr "Agregar columna"
+
+#~ msgid "Deleting a Column"
+#~ msgstr "Eliminar una columna"
+
+#~ msgid "Deleting a Row"
+#~ msgstr "Eliminar una fila"
+
+#~ msgid "1x1"
+#~ msgstr "1x1"
+
+#~ msgid "1x2"
+#~ msgstr "1x2"
+
+#~ msgid "2x1"
+#~ msgstr "2x1"
+
+#~ msgid "2X2"
+#~ msgstr "2x2"
+
+#~ msgid "3x3"
+#~ msgstr "3x3"
+
+#~ msgid "4x4"
+#~ msgstr "4x4"
+
+#~ msgid "Zoom +"
+#~ msgstr "Zoom +"
+
+#~ msgid "Zoom -"
+#~ msgstr "Zoom -"
+
+#~ msgid "Magnifying glass"
+#~ msgstr "Lupa"
+
+#~ msgid "Browse slices\tCtrl+S"
+#~ msgstr "Navegador de cortes\tCtrl+S"
+
+#~ msgid "PACS Servers"
+#~ msgstr "Servidores PACS"
+
+#~ msgid "Test node"
+#~ msgstr "Probar conexión"
+
+#~ msgid "Confirm the removal of the server"
+#~ msgstr "Confirma la eliminación del servidor "
+
+#~ msgid "Test server"
+#~ msgstr "Probar servidor"
+
+#~ msgid "PACS Server"
+#~ msgstr "Servidor PACS"
+
+#~ msgid "PACS Server Settings"
+#~ msgstr "Configuración de servidores PACS"
+
+#~ msgid "Auto close after dicomize"
+#~ msgstr "Auto cerrar después de dicomizar"
+
+#~ msgid "Open video"
+#~ msgstr "Abrir fichero"
+
+#~ msgid "Minimize after import"
+#~ msgstr "Minimizar después de importar"
+
+#~ msgid "Electronic medical history"
+#~ msgstr "Historia clínica electrónica"
+
+#~ msgid "Birthdate"
+#~ msgstr "Fecha de nacimiento"
+
+#~ msgid "Surname 2"
+#~ msgstr "Apellido 2"
+
+#~ msgid "Birthday"
+#~ msgstr "Fecha nacimiento"
+
+#~ msgid "Filter menu"
+#~ msgstr "Menú de filtrado"
+
+#~ msgid "Error sending evidences: "
+#~ msgstr "Error al enviar evidencias: "
+
+#~ msgid "Fatal error, can not write the history database"
+#~ msgstr "Error fatal, no se puede escribir la base de datos del historial"
+
+#~ msgid "Could not get the associated module"
+#~ msgstr "No se pudo obtener el módulo asociado"
+
+#~ msgid "\"scope\" attribute expected at \"gnkworkflow\" scope"
+#~ msgstr "Atributo \"scope\" no especificado al procesar tag \"gnkworkflow\""
+
+#~ msgid "It has been read a \"medico\" tag without identifiers"
+#~ msgstr "Se ha leído un tag \"medico\" sin identificadores"
+
+#~ msgid "\"id_peticion\" attribute expected at \"plantilla\" scope"
+#~ msgstr ""
+#~ "Atributo \"id_peticion\" no especificado al procesar tag \"plantilla\""
+
+#~ msgid "It has been read a \"paciente\" tag without identifiers"
+#~ msgstr "Se ha leído un tag \"paciente\" sin identificadores"
+
+#~ msgid "Correction"
+#~ msgstr "Corrección"
+
+#~ msgid "Smooth"
+#~ msgstr "Suavizar"
+
+#~ msgid "Edges"
+#~ msgstr "Bordes"
+
+#~ msgid "Levels"
+#~ msgstr "Niveles"
+
+#~ msgid "Median 3x3"
+#~ msgstr "Mediana 3x3"
+
+#~ msgid "Median smooth filter"
+#~ msgstr "Filtro de suavizado de mediana"
+
+#~ msgid "Gaussian 3x3"
+#~ msgstr "Gausiano 3x3"
+
+#~ msgid "Gaussian smooth filter"
+#~ msgstr "Filtro de suavizado gausiano"
+
+#~ msgid "Curvature Flow"
+#~ msgstr "Curvature flow"
+
+#~ msgid "Edge preserving smooth filter"
+#~ msgstr "Filtro de suavizado manteniendo bordes"
+
+#~ msgid "Sobel edges 3x3"
+#~ msgstr "Bordes sobel 3x3"
+
+#~ msgid "Sobel filter 3x3"
+#~ msgstr "Filtro sobel 3x3"
+
+#~ msgid "Auto Levels"
+#~ msgstr "Auto niveles"
+
+#~ msgid "You must specify an absolute directory path"
+#~ msgstr "Es necesario especificar una ruta de directorio absoluta"
+
+#~ msgid "Environment"
+#~ msgstr "Entorno"
+
+#~ msgid "System Environment of Electronic Health Record"
+#~ msgstr "Entorno del Sistema de Historia Clínica Electrónica"
+
+#~ msgid "Sacyl (CyL, Spain)"
+#~ msgstr "Sacyl (CyL, España)"
+
+#~ msgid ""
+#~ "Is possible to build dynamic paths with the following wildcards filled "
+#~ "from Ginkgo CADx integration XML's HL7 identifiers:\n"
+#~ "\t#PID.NNESP : Patient's spanish NIF number.\n"
+#~ "\t#PID.HC : Patient's healthcare card number.\n"
+#~ "\t#PID.PI : Patient's center-spacific History number.\n"
+#~ "\t#PID.SS : Patient's spanish social healthcare number.\n"
+#~ "\t#MID.NNESP : Medic's spanish NIF number.\n"
+#~ "\t#MID.MD : Medic's college number. "
+#~ msgstr ""
+#~ "Es posible construir rutas de manera dinámica usando los siguientes "
+#~ "comodines rellenados\n"
+#~ "a partir de campos HL7 de ficheros XML de integración de Ginkgo CADx:\n"
+#~ "\t#PID.NNESP : Número de identificación fiscal del paciente.\n"
+#~ "\t#PID.HC : Número de tarjeta sanitaria del paciente.\n"
+#~ "\t#PID.PI : Número de historia clínica del paciente en el hospital.\n"
+#~ "\t#PID.SS : Número de seguridad social del paciente.\n"
+#~ "\t#MID.NNESP : Número de identificación fiscal del médico.\n"
+#~ "\t#MID.MD : Número de colegiado del médico."
+
+#~ msgid "License"
+#~ msgstr "Licencia"
+
+#~ msgid "License Data"
+#~ msgstr "Datos de la licencia"
+
+#~ msgid "Organization"
+#~ msgstr "Organización"
+
+#~ msgid "Expiration Date"
+#~ msgstr "Fecha expiración"
+
+#~ msgid "Evaluation"
+#~ msgstr "Evaluación"
+
+#~ msgid "User Defined"
+#~ msgstr "Definido por el usuario"
+
+#~ msgid " WW"
+#~ msgstr "WW"
+
+#~ msgid " WL"
+#~ msgstr "WL"
+
+#~ msgid "Reset Window/Level"
+#~ msgstr "Resetear Window/Level "
+
+#~ msgid "Poligono"
+#~ msgstr "Poligono"
+
+#~ msgid "Open Folder"
+#~ msgstr "Abrir directorio"
+
+#~ msgid "Open Removable"
+#~ msgstr "Abrir unidad extraíble"
+
+#~ msgid "Unsupported scope"
+#~ msgstr "Ámbito no soportado"
+
+#~ msgid "No options"
+#~ msgstr "Sin opciones"
+
+#~ msgid "XML Files(*.xml)|*.xml"
+#~ msgstr "Ficheros XML(*.xml)|*.xml"
+
+#~ msgid "Failed to save the file"
+#~ msgstr "Ha ocurrido un error al guardar el fichero"
+
+#~ msgid "The xml format is not correct"
+#~ msgstr "El formato del xml no es correcto"
+
+#~ msgid "Information"
+#~ msgstr "Información"
+
+#~ msgid "Show node plain text"
+#~ msgstr "Mostrar el nodo en texto plano"
+
+#~ msgid "Thread / Scope"
+#~ msgstr "Hilo / Ámbito"
+
+#~ msgid "List"
+#~ msgstr "Lista"
+
+#~ msgid "SOAP invocation error\n"
+#~ msgstr "Error en invocación SOAP\n"
+
+#~ msgid "In connection openssl Exception:"
+#~ msgstr "Excepcion En conexion Openssl: "
+
+#~ msgid "The invocation XML is malformed"
+#~ msgstr "El XML de invocacion esta mal formado"
+
+#~ msgid ""
+#~ "Failed to perform the HTTP request, the server returned the error code "
+#~ msgstr ""
+#~ "Error al realizar la petición HTTP, el servidor devolvió el código de "
+#~ "error "
+
+#~ msgid "Not specified the server protocol"
+#~ msgstr "No se ha especificado el protocolo del servidor"
+
+#~ msgid "Unsupported Protocol"
+#~ msgstr "Protocolo no soportado"
+
+#~ msgid "Malformed server response"
+#~ msgstr "Respuesta del servidor mal formada"
+
+#~ msgid "There was an error when you invoke the Web service"
+#~ msgstr "Se ha producido un error al invocar el servicio web"
+
+#~ msgid "Code:"
+#~ msgstr "Código: "
+
+#~ msgid "Reason:"
+#~ msgstr "Razón: "
+
+#~ msgid "Error connecting"
+#~ msgstr "Error al realizar la conexión "
+
+#~ msgid "Error when making SSL connection"
+#~ msgstr "Error al realizar la conexión SSL"
+
+#~ msgid "Error when making the request, writing incomplete"
+#~ msgstr "Error al realizar la petición, escritura incompleta"
+
+#~ msgid "Error in receiving the response"
+#~ msgstr "Error al recibir la respuesta"
+
+#~ msgid "The certificate has not been verified"
+#~ msgstr "El certificado no ha podido verificarse"
+
+#~ msgid "The CN field does not match the hostname"
+#~ msgstr "El campo CN no se corresponde con el nombre de host"
+
+#~ msgid "Export Certificate"
+#~ msgstr "Exportar certificado"
+
+#~ msgid "PEM file (*.pem) | *.pem"
+#~ msgstr "Fichero PEM(*.pem)|*.pem"
+
+#~ msgid ""
+#~ "The following certificate has not been able to verify\n"
+#~ "Do you want to save to import into the system?"
+#~ msgstr ""
+#~ "El siguiente certificado no se ha podido comprobar\n"
+#~ "¿Desea guardarlo para poder importarlo en el sistema?"
+
+#~ msgid "Saving ..."
+#~ msgstr "Guardar..."
+
+#~ msgid "Save Certificate"
+#~ msgstr "Guardar Certificado"
+
+#~ msgid "Rss url is not valid check configuration"
+#~ msgstr "La url RSS no es válida comprueba la configuración"
+
+#~ msgid "It was impossible to connect server "
+#~ msgstr "Ha sido imposible conectar al servidor"
+
+#~ msgid "Exception sending request"
+#~ msgstr "Excepción al enviar la petición"
+
+#~ msgid "Exception reading response"
+#~ msgstr "Excepción al leer la respuesta"
+
+#~ msgid "Generalitat de Catalunya: ECG compliance support"
+#~ msgstr "Generalitat de Catalunya: soporte en compatibilidad de ECG"
+
+#~ msgid "Breaking the world"
+#~ msgstr "Rompiendo el mundo "
+
+#~ msgid "Cancels current task"
+#~ msgstr "Cancela la tarea actual"
+
+#~ msgid "Fill the fields to continue."
+#~ msgstr "Rellene los dos campos para continuar."
+
+#~ msgid "Setting tags on export will be anonymized"
+#~ msgstr "Configuración de tags que se anonimizarán en la exportación"
+
+#~ msgid "Are you sure to delete the tag"
+#~ msgstr "¿Confirma la eliminación del tag "
+
+#~ msgid "Modify"
+#~ msgstr "Modificar"
+
+#~ msgid "Default Value"
+#~ msgstr "Valor por defecto"
+
+#~ msgid "Anonymized tags default value"
+#~ msgstr "Valor por defecto para los tags anonimizados"
+
+#~ msgid "Configure tags to anonymize"
+#~ msgstr "Configure los campos que desea anonimizar"
+
+#~ msgid "The group ID and the item must be encoded in hexadecimal"
+#~ msgstr ""
+#~ "El identificador de grupo y el de elemento han de estar codificados en "
+#~ "hexadecimal"
+
+#~ msgid "Tags defined in settings"
+#~ msgstr "Campos definidos en el menu Configuración"
+
+#~ msgid "New Tag"
+#~ msgstr "Nuevo Tag"
+
+#~ msgid "Select the server where the files will be sent"
+#~ msgstr "Seleccione el servidor PACS donde se enviarán los ficheros"
+
+#~ msgid "Tab Grouping"
+#~ msgstr "Agrupar pestañas"
+
+#~ msgid "Horizontal Mosaic"
+#~ msgstr "Mosaico Horizontal"
+
+#~ msgid "Vertical Mosaic"
+#~ msgstr "Mosaico Vertical"
+
+#~ msgid "Tab organization"
+#~ msgstr "Organización en pestañas"
+
+#~ msgid "HL7 Monitor"
+#~ msgstr "Monitorizador HL7"
+
+#~ msgid "Log Monitor"
+#~ msgstr "Monitorizador de Log"
+
+#~ msgid "Remove finished"
+#~ msgstr "Eliminar terminados"
+
+#~ msgid "Select the DICOM files you wish to upload"
+#~ msgstr "Seleccione los archivos DICOM que desea subir"
+
+#~ msgid "Extension "
+#~ msgstr "Extensión "
+
+#~ msgid " is compatible with Ginkgo CADx "
+#~ msgstr " es compatible con Ginkgo CADx "
+
+#~ msgid "http://ginkgo-cadx.com/en/extensions/"
+#~ msgstr "http://ginkgo-cadx.com/es/extensiones/"
+
+#~ msgid "Loading Ginkgo CADx news..."
+#~ msgstr "Cargando las Noticias de Ginkgo CADx"
+
+#~ msgid "Error opening file downloaded"
+#~ msgstr "Error al abrir el fichero descargado"
+
+#~ msgid "Progress"
+#~ msgstr "Progreso"
+
+#~ msgid "There is no PACS server configured"
+#~ msgstr "No existe ningún servidor PACS configurado"
+
+#~ msgid "Address"
+#~ msgstr "Dirección"
+
+#~ msgid "Mode"
+#~ msgstr "Modo"
+
+#~ msgid "Open Selected completed downloads"
+#~ msgstr "Abrir las descargas seleccionadas"
+
+#~ msgid "Start/Stop selected downloads"
+#~ msgstr "Iniciar/Parar las descargas seleccionadas"
+
+#~ msgid ""
+#~ "The functional extensions are plugins that perform advanced procedures."
+#~ msgstr ""
+#~ "Las extensiones funcionales son plugins que realizan procedimientos "
+#~ "avanzados."
+
+#~ msgid ""
+#~ "The functional extensions are plugins that perform advanced procedures. "
+#~ msgstr ""
+#~ "Las extensiones funcionales son plugins que realizan procedimientos "
+#~ "avanzados."
+
+#~ msgid "Actions"
+#~ msgstr "Acciones"
+
+#~ msgid "Reload"
+#~ msgstr "Recargar"
+
+#~ msgid "Extension"
+#~ msgstr "Extensión"
+
+#~ msgid "Version"
+#~ msgstr "Versión"
+
+#~ msgid "Comp. Date"
+#~ msgstr "Fecha Comp."
+
+#~ msgid "Provider"
+#~ msgstr "Proveedor"
+
+#~ msgid "Angle"
+#~ msgstr "Ángulo"
+
+#~ msgid "Rule"
+#~ msgstr "Regla"
+
+#~ msgid "\"tid\" attribute omitted"
+#~ msgstr "Atributo \"tid\" no especificado"
+
+#~ msgid " couldn't be readed"
+#~ msgstr " no se ha podido leer"
+
+#~ msgid ""
+#~ "All images must have the same dimensions.\n"
+#~ "Do you want to continue resizing the images to the size of the largest?"
+#~ msgstr ""
+#~ "Todas las imágenes deben de tener las mismas dimensiones.\n"
+#~ "¿Desea continuar redimensionando las imágenes al tamaño de la mayor?"
+
+#~ msgid "Different dimensions between images"
+#~ msgstr "Distintas dimensiones entre imágenes"
+
+#~ msgid "Scaling images, may take a while ..."
+#~ msgstr "Escalando imágenes, puede tardar unos instantes..."
+
+#~ msgid ""
+#~ "Unable to reprocess this series. You have to register Ginkgo CADx module "
+#~ "that dicomized this file."
+#~ msgstr ""
+#~ "No es posible reprocesar esta serie. Se tiene que registrar el módulo de "
+#~ "Ginkgo CADx que dicomizó este fichero."
+
+#~ msgid "License ..."
+#~ msgstr "Licencia..."
+
+#~ msgid "Ginkgo CADx License ..."
+#~ msgstr "Licencia de Ginkgo CADx..."
+
+#~ msgid "Browse image"
+#~ msgstr "Buscar imagen"
+
+#~ msgid "Local file"
+#~ msgstr "Fichero local"
+
+#~ msgid "Template"
+#~ msgstr "Plantilla"
+
+#~ msgid "*.*"
+#~ msgstr "*.*"
+
+#~ msgid ""
+#~ "The file or directory can't be acquired, make sure that you have read "
+#~ "permissions on it"
+#~ msgstr ""
+#~ "No se puede adquirir el fichero o directorio, asegúrese de que dispone de "
+#~ "permisos de lectura sobre el mismo"
+
+#~ msgid ": Not implemented"
+#~ msgstr ": No implementado"
+
+#~ msgid "Importation"
+#~ msgstr "Importación"
+
+#~ msgid "&Delete from History"
+#~ msgstr "&Eliminar del Historial"
+
+#~ msgid "aa"
+#~ msgstr "Datos"
+
+#~ msgid "Setting display options"
+#~ msgstr "Configuración de las opciones de visualización"
+
+#~ msgid ""
+#~ "This option enables stereoscopic vision (must bear the graphics card and "
+#~ "requires the use of 3D glasses)"
+#~ msgstr ""
+#~ "Esta opción activa la vision estereoscópica (debe de soportarla la "
+#~ "tarjeta gráfica y requiere el uso de gafas 3D)"
+
+#~ msgid "Stereoscopic Vision"
+#~ msgstr "Visión Estereoscópica"
+
+#~ msgid "Activate stereoscopic vision (press 'S' in the viewer)"
+#~ msgstr "Activar vision estereoscopica (pulsar 'S' en el visualizador)"
+
+#~ msgid ""
+#~ "Some of the currently acquired files are the same than already present in "
+#~ "medical history.\n"
+#~ "Would you like to overwrite them?"
+#~ msgstr ""
+#~ "Algunos ficheros adquiridos tienen versiones presentes en el historial\n"
+#~ "¿Desea sobreescribir dichas imágenes?"
+
+#~ msgid "License error"
+#~ msgstr "Error de licencia"
+
+#~ msgid ""
+#~ "Some of the diagnostic files that have been acquired refer to images that "
+#~ "are not present in Ginkgo"
+#~ msgstr ""
+#~ "Alguno de los ficheros de diagnóstico que se han obtenido hacen "
+#~ "referencia a imágenes que no están presentes en Ginkgo"
+
+#~ msgid ""
+#~ "You can search for referenced images manually, or try downloading from a "
+#~ "PACS server"
+#~ msgstr ""
+#~ "Puede buscar las imágenes referenciadas manualmente, o intentar "
+#~ "descargarlas desde un servidor PACS"
+
+#~ msgid "Disc Searching"
+#~ msgstr "Buscar en Disco"
+
+#~ msgid "Disk searching..."
+#~ msgstr "Buscar en disco..."
+
+#~ msgid "PACS Download"
+#~ msgstr "Descargar de PACS"
+
+#~ msgid "Select the server you want to use to download images"
+#~ msgstr "Seleccione el servidor desde donde desea descargar las imágenes"
+
+#~ msgid "Searching Disk ..."
+#~ msgstr "Buscar en disco..."
+
+#~ msgid "Scope"
+#~ msgstr "Ámbito"
+
+#~ msgid "DIEGO GARCÍA MORATE"
+#~ msgstr "DIEGO GARCÍA MORATE"
+
+#~ msgid ""
+#~ "Due some PACS restrictions, only study scope is supported. (\"ambito\" at "
+#~ "\"dimse\" scope)"
+#~ msgstr ""
+#~ "Debido a restricciones en algunos PACS, sólo está soportado el ámbito "
+#~ "STUDY.  (Atributo \"ambito\" en tag \"dimse\")"
+
+#~ msgid ""
+#~ "The functional extensions are plugins that perform advanced procedures. "
+#~ "You can enable, disable and / or choose specific versions to use at run "
+#~ "time.\n"
+#~ "This section lets you adjust and keep them updated."
+#~ msgstr ""
+#~ "Las extensiones son plugins funcionales que realizan procedimientos "
+#~ "avanzados. Es posible activarlas, desactivarlas y/o elegir versiones "
+#~ "concretas a usar en tiempo de ejecución.\n"
+#~ "Este apartado permite ajustarlas y mantenerlas actualizadas."
+
+#~ msgid "Spanish"
+#~ msgstr "Español"
+
+#~ msgid "English"
+#~ msgstr "Inglés"
+
+#~ msgid "Japanese"
+#~ msgstr "Japonés"
+
+#~ msgid "Use always SSL/TLS"
+#~ msgstr "Usar siempre SSL/TLS"
+
+#~ msgid "Echo"
+#~ msgstr "Echo"
+
+#~ msgid "None"
+#~ msgstr "Ninguna"
+
+#~ msgid "Find"
+#~ msgstr "Find"
+
+#~ msgid ""
+#~ "The study you want to send to PACS is modified.\n"
+#~ "Would you like to save it?"
+#~ msgstr ""
+#~ "El estudio que desea enviar al PACS está modificado.\n"
+#~ "¿Desea guardarlo?"
+
+#~ msgid "Transfer Syntax"
+#~ msgstr "Transfer Syntax"
+
+#~ msgid "Explicit Little Endian"
+#~ msgstr "Explicit Little Endian"
+
+#~ msgid "Implicit Little Endian"
+#~ msgstr "Implicit Little Endian"
+
+#~ msgid "JPEG Lossless"
+#~ msgstr "JPEG Lossless"
+
+#~ msgid "JPEG Lossy - High quality"
+#~ msgstr "JPEG Lossy - Calidad alta"
+
+#~ msgid "JPEG Lossy - Normal quality"
+#~ msgstr "JPEG Lossy - Calidad normal"
+
+#~ msgid "JPEG Lossy - Low quality"
+#~ msgstr "JPEG Lossy - Calidad baja"
+
+#~ msgid "JPEG 2000 Lossless"
+#~ msgstr "JPEG 2000 Lossless"
+
+#~ msgid "Files"
+#~ msgstr "Ficheros"
+
+#~ msgid "Original images"
+#~ msgstr "Imágenes originales"
+
+#~ msgid "Modified images"
+#~ msgstr "Imágenes modificadas"
+
+#~ msgid "Need Help ..."
+#~ msgstr "Necesita ayuda ..."
+
+#~ msgid "Failed to update the study with uid"
+#~ msgstr "Ha ocurrido un error al actualizar el estudio con uid "
+
+#~ msgid "Failed to update the series with uid"
+#~ msgstr "Ha ocurrido un error al actualizar la serie con uid "
+
+#~ msgid "Failed to update the file with path"
+#~ msgstr "Ha ocurrido un error al actualizar el fichero con path "
+
+#~ msgid "Failed to update the file in the database:\n"
+#~ msgstr "Error al actualizar el fichero en la base de datos: \n"
+
+#~ msgid "Global Path"
+#~ msgstr "Directorio global"
+
+#~ msgid "Delete region (Ctrl + 1)"
+#~ msgstr "Eliminar región (Ctrl + 1)"
+
+#~ msgid "Remove from chroma"
+#~ msgstr "Eliminar del chroma"
+
+#~ msgid "Insert region (Ctrl + 2)"
+#~ msgstr "Insertar región (Ctrl + 2)"
+
+#~ msgid "Insert in the chroma"
+#~ msgstr "Insertar en el chroma"
+
+#~ msgid "Reset chroma"
+#~ msgstr "Resetear chroma"
+
+#~ msgid "Reverse"
+#~ msgstr "Invertir"
+
+#~ msgid "Reverse chroma"
+#~ msgstr "Invertir chroma"
+
+#~ msgid "Lasso Chroma"
+#~ msgstr "Lazo de Chroma"
+
+#~ msgid "Segmenting lasso..."
+#~ msgstr "Segmentando Lazo..."
+
+#~ msgid "Removing Background ..."
+#~ msgstr "Eliminando Fondo..."
+
+#~ msgid "Inserting Background ..."
+#~ msgstr "Insertando Fondo..."
+
+#~ msgid "Resetting Background ..."
+#~ msgstr "Reseteando Fondo..."
+
+#~ msgid "Background reversion ..."
+#~ msgstr "Inviertiendo Fondo..."
+
+#~ msgid "Canceling selection ..."
+#~ msgstr "Cancelando seleccion..."
+
+#~ msgid "Local"
+#~ msgstr "Local"
+
+#~ msgid "Local cope of selection"
+#~ msgstr "Ambito de selección contiguo"
+
+#~ msgid "Global"
+#~ msgstr "Global"
+
+#~ msgid "Global scope of selection"
+#~ msgstr "Ambito de selección global"
+
+#~ msgid "Sensitivity"
+#~ msgstr "Sensibilidad"
+
+#~ msgid "Sensitivity of the wand"
+#~ msgstr "Sensibilidad de la varita"
+
+#~ msgid "System"
+#~ msgstr "Sistema"
+
+#~ msgid "Primary Care (MEDORA)"
+#~ msgstr "Atencion Primaria (MEDORA)"
+
+#~ msgid "Specialized Care (JIMENA)"
+#~ msgstr "Atencion Especializada (JIMENA)"
+
+#~ msgid "Series was already in the download queue."
+#~ msgstr "La serie ya está en la cola de descargas."
+
+#~ msgid "Include diagnostic"
+#~ msgstr "Incluir diagnóstico"
+
+#~ msgid "Ginkgo CADx is updated"
+#~ msgstr "Ginkgo CADx está actualizado"
+
+#~ msgid "Ginkgo CADx is outdated ("
+#~ msgstr "Ginkgo CADx está desactualizado ("
+
+#~ msgid " available)"
+#~ msgstr " disponible)"
+
+#~ msgid "Ginkgo CADx update still not checked"
+#~ msgstr "La actualización de Ginkgo CADx no se ha comprobado todavía"
+
+#~ msgid ""
+#~ "Locations are predefined paths to set locations from well known paths "
+#~ "(ex: Remote shared disk)\n"
+#~ "Is possible to build dynamic paths with the following wildcards filled "
+#~ "from Ginkgo Integration XML's HL7 Ids:\n"
+#~ "\t#PID.NNESP : Patient's spanish NIF number.\n"
+#~ "\t#PID.HC : Patient's Healthcare card number.\n"
+#~ "\t#PID.PI : Patient's center-spacific History number.\n"
+#~ "\t#PID.SS : Patient's Spanish Social Healthcare number.\n"
+#~ "\t#MID.NNESP : Medic's spanish NIF number.\n"
+#~ "\t#MID.MD : Medic's college number."
+#~ msgstr ""
+#~ "Las ubicaciones son rutas predefinidas conocidas (ej: Unidades remotas "
+#~ "compartidas)\n"
+#~ "Es posible construir rutas de manera dinámicas usando los siguientes "
+#~ "comodines rellenados\n"
+#~ "a partir de campos HL7 de ficheros XML de integración de Ginkgo :\n"
+#~ "\t#PID.NNESP : Número de Identificación Fiscal del paciente.\n"
+#~ "\t#PID.HC : Número de tarjeta sanitaria del paciente.\n"
+#~ "\t#PID.PI : Número de historia clínica del paciente en el hospital.\n"
+#~ "\t#PID.SS : Número de Seguridad Social del paciente.\n"
+#~ "\t#MID.NNESP : Número de Identificación Fiscal del médico.\n"
+#~ "\t#MID.MD : Número de colegiado del médico."
+
+#~ msgid "TCP Port Number (1-65534)"
+#~ msgstr "Número de puerto TCP (1-65534)"
+
+#~ msgid "Using license"
+#~ msgstr "Licencia de uso"
+
+#~ msgid "Perform search"
+#~ msgstr "Buscar"
+
+#~ msgid "From"
+#~ msgstr "Desde"
+
+#~ msgid "To"
+#~ msgstr "Hasta"
+
+#~ msgid "Ginkgo"
+#~ msgstr "Ginkgo"
+
+#~ msgid "VERSION"
+#~ msgstr "VERSION"
+
+#~ msgid ""
+#~ "Copyright 2008-2010 MetaEmotion S.L. http://healthcare.metaemotion.com. "
+#~ "All rights reserved."
+#~ msgstr ""
+#~ "Copyright 2008-2010 MetaEmotion S.L. http://healthcare.metaemotion.com. "
+#~ "Todos los derechos reservados."
+
+#~ msgid "Installed Components"
+#~ msgstr "Componentes instalados"
+
+#~ msgid "Component"
+#~ msgstr "Componente"
+
+#~ msgid "About Ginkgo..."
+#~ msgstr "Acerca de Ginkgo..."
+
+#~ msgid "* (All)"
+#~ msgstr "* (Todas)"
+
+#~ msgid "Period"
+#~ msgstr "Periodo"
+
+#~ msgid "CT, CR"
+#~ msgstr "CT, CR"
+
+#~ msgid "PACS Application ID"
+#~ msgstr "ID de aplicación del PACS"
+
+#~ msgid "Combo!"
+#~ msgstr "Cobb"
+
+#~ msgid "Updating records ..."
+#~ msgstr "Actualizando historial..."
+
+#~ msgid "Pulmón"
+#~ msgstr "Lung"
+
+#~ msgid "Cráneo"
+#~ msgstr "Cranium"
+
+#~ msgid "Regroup tabs"
+#~ msgstr "Reagrupar pestañas"
+
+#~ msgid "HCE port not set"
+#~ msgstr "Puerto de la HCE no configurado"
+
+#~ msgid "Stopped."
+#~ msgstr "Parado"
+
+#~ msgid "Stopping..."
+#~ msgstr "Parando..."
+
+#~ msgid "Configure Remote PACS"
+#~ msgstr "Configurar PACS remoto"
+
+#~ msgid ""
+#~ "This is an evaluation version. The authors make no warranties as to "
+#~ "performance or fitness for a particular purpose, or any other warranties "
+#~ "whether expressed or implied. The user must assume the entire risk of "
+#~ "using this program. Under no circumstances shall the authors be liable "
+#~ "for direct, indirect, special, incidental, consequential damages or "
+#~ "misdiagnosis resulting from the use, misuse, or inability to use the "
+#~ "software, even if the authors have been advised of the possibility of "
+#~ "such damages. This software may not be sold, redistributed, or "
+#~ "commercially used in any other way without prior approval of the authors."
+#~ msgstr ""
+#~ "Esta es una versión de evaluación. Los autores no dan garantías de "
+#~ "eficiencia para casos particulares o cualquier otra garantía expresada o "
+#~ "implícita. El usuario debe de asumir todo el riesgo al usar este "
+#~ "programa. Bajo ninguna los autores podrán ser responsable por daños "
+#~ "directos, indirectos, especiales, incidentales o consecuentes o "
+#~ "diagnósticos erróneos resultantes del uso o mal uso del programa. Este "
+#~ "software no debe ser vendido, redistribuido o usado comercialmente o de "
+#~ "cualquier otra forma sin la autorización previa de los autores."
+
+#~ msgid "NombreWidget"
+#~ msgstr "NombreWidget"
+
+#~ msgid "&Aceptar"
+#~ msgstr "&Aceptar"
+
+#~ msgid "Propiedades de ..."
+#~ msgstr "Propiedades..."
+
+#~ msgid "Export sucessfully finished"
+#~ msgstr "Exportación finalizada correctamente"
+
+#~ msgid "Save study"
+#~ msgstr "Guardar estudio"
+
+#~ msgid "DICOM Files (*. dcm) | *. dcm"
+#~ msgstr "Archivos DICOM (*.dcm)|*.dcm"
+
+#~ msgid "Error loading the study:"
+#~ msgstr "Error al cargar el estudio: "
+
+#~ msgid "Require user login"
+#~ msgstr "Petición del nombre de usuario"
+
+#~ msgid "Auth method"
+#~ msgstr "Método de autenticación"
+
+#~ msgid "Auth params"
+#~ msgstr "Parámetros de autenticación"
+
+#~ msgid "1"
+#~ msgstr "1"
+
+#~ msgid "Modality1"
+#~ msgstr "Modalidad"
+
+#~ msgid "Date1"
+#~ msgstr "Fecha"
+
+#~ msgid "Physician1"
+#~ msgstr "Médico"
+
+#~ msgid "Accession Number1"
+#~ msgstr "Accession Number"
+
+#~ msgid "UID1"
+#~ msgstr "UID1"
+
+#~ msgid "Modules"
+#~ msgstr "Módulos"
+
+#~ msgid "ACCENT LOW SHIPPING PROCESS"
+#~ msgstr "PROCESO DE ENVIO FALTA ACENTO"
+
+#~ msgid "Rompiendo el mundo "
+#~ msgstr "Rompiendo el mundo"
+
+#~ msgid "Error loading study, memory full"
+#~ msgstr "Error al cargar el estudio: Memoria insuficiente"
+
+#~ msgid "Looking for images matching the search criteria"
+#~ msgstr "Buscando imágenes que cumplan con los criterios de búsqueda"
+
+#~ msgid "Exploring patient "
+#~ msgstr "Explorando Paciente "
+
+#~ msgid "Exploring Patient"
+#~ msgstr "Explorando Paciente "
+
+#~ msgid "Error in consultation with id pacs "
+#~ msgstr "Error en la consulta al pacs con id "
+
+#~ msgid "Error in consultation with id pacs"
+#~ msgstr "Error en la consulta al pacs con id "
+
+#~ msgid "Adquire a DICOM study"
+#~ msgstr "Adquirir un estudio DICOM"
+
+#~ msgid "It has been read a \"paciente\" tag without episode number"
+#~ msgstr "Se ha leído un tag \"paciente\" sin número de episodio"
+
+#~ msgid "No results were found for the specified search"
+#~ msgstr "No se han obtenido resultados para la búsqueda indicada"
+
+#~ msgid "Select the DICOM files you want to open"
+#~ msgstr "Seleccione los archivos DICOM que desea abrir"
+
+#~ msgid "Select a directory containing DICOM files"
+#~ msgstr "Seleccione un directorio que contenga ficheros DICOM"
+
+#~ msgid "Select the number of the server you want to download"
+#~ msgstr "Seleccione la serie del servidor que desea descargar"
+
+#~ msgid "DICOM  Files (*.dcm, *.*)|*.*"
+#~ msgstr "Archivos DICOM (*.dcm, *.*)|*.*"
+
+#~ msgid "Search recursively"
+#~ msgstr "Buscar recursivamente"
+
+#~ msgid "Medical institution (Local Organization)"
+#~ msgstr "Centro (Organización local)"
+
+#~ msgid "Acquire a new DICOM study"
+#~ msgstr "Adquirir un estudio DICOM"
+
+#~ msgid "&Import..."
+#~ msgstr "&Importar..."
+
+#~ msgid "License data"
+#~ msgstr "Datos de la Licencia"
+
+#~ msgid "Test subtitle"
+#~ msgstr "Subtítulo de prueba"
+
+#~ msgid "Ongoing Tasks"
+#~ msgstr "Tareas en curso"
+
+#~ msgid "Licensing"
+#~ msgstr "Licencia de uso"
+
+#~ msgid " but no valid presentation contexts"
+#~ msgstr " pero no existen contextos de  presentación válidos"
+
+#~ msgid "%m-%d-%y %H:%M:%S,%q"
+#~ msgstr "%d-%m-%y %H:%M:%S,%q"
+
+#~ msgid "Association Received"
+#~ msgstr "Asociación recibida"
+
+#~ msgid "DICOM Dir has been created with a new version of Ginkgo CADx."
+#~ msgstr ""
+#~ "El DICOMDIR ha sido creado con una versión más nueva de Ginkgo CADx."
+
+#~ msgid "Download warning"
+#~ msgstr "Advertencia en la descarga"
+
+#~ msgid ""
+#~ "Error in interpreting the parameters of the command line. The file or "
+#~ "directory doesn't exist ("
+#~ msgstr ""
+#~ "Error al interpretar los parámetros de la línea de comandos. No existe el "
+#~ "fichero o directorio ("
+
+#~ msgid "Exception in component "
+#~ msgstr "Excepción en el componente "
+
+#~ msgid ""
+#~ "Ginkgo CADx has detected a default DICOM Dir created with an old version "
+#~ "of Ginkgo CADx"
+#~ msgstr ""
+#~ "Ginkgo CADx ha dectado un DICOMDIR de historial creado con una versión "
+#~ "más antigua de Ginkgo CADx"
+
+#~ msgid ""
+#~ "No results obtained in PACS retrieve.\n"
+#~ "Maybe study doesn't exist or you have a wrong PACS server configuration."
+#~ msgstr ""
+#~ "No se obtuvieron resultados.\n"
+#~ "Tal vez no exista el estudio o la configuración del servidor PACS sea "
+#~ "incorrecta."
+
+#~ msgid "Pixels bluring"
+#~ msgstr "Suavizado de pixels"
+
+#~ msgid "Remove old DICOM Dir after migration"
+#~ msgstr "Borrar DICOMDIR antiguo después de la migración"
+
+#~ msgid "Set pixels bluring"
+#~ msgstr "Activar suavizado de pixels"
+
+#~ msgid "Study successfully sent to PACS"
+#~ msgstr "Estudio enviado al PACS correctamente"
+
+#~ msgid "The following commands will abort if you close the application"
+#~ msgstr "Los siguientes comandos se abortarán si cierra la aplicación"
+
+#~ msgid ""
+#~ "The series selected is already open\n"
+#~ "Do you want to open it again?"
+#~ msgstr ""
+#~ "La serie seleccionada ya está abierta\n"
+#~ "¿Desea abrirla de nuevo?"
+
+#~ msgid "The service did not respond correctly to the DICOM standard:"
+#~ msgstr "El servicio no respondió correctamente al estandar DICOM:"
+
+#~ msgid "Unset pixels bluring"
+#~ msgstr "Desactivar suavizado de pixels"
+
+#~ msgid "Uploading to the PACS ..."
+#~ msgstr "Subiendo al PACS..."
+
+#~ msgid "clockWise"
+#~ msgstr "horario"
+
+#~ msgid "counter-clockWise"
+#~ msgstr "antihorario"
+
+#~ msgid "No proxy for addresses containing:"
+#~ msgstr "No utilizar proxy para las direcciones que contengan:"
+
+#~ msgid "Page Setup ..."
+#~ msgstr "Configurar página..."
+
+#~ msgid "Print image..."
+#~ msgstr "Imprimir..."
+
+#~ msgid "Username:"
+#~ msgstr "Nombre de usuario:"
+
+#~ msgid "%d{%Y/%m/%d %H:%M:%S.%q} [%t] %-5p %c %x - %m%n"
+#~ msgstr "%d{%d/%m/%Y %H:%M:%S.%q} [%t] %-5p %c %x - %m%n"
+
+#~ msgid "There are pending tasks, do you want to execute them?"
+#~ msgstr "Existen tareas pendientes, ¿desea ejecutarlas ahora?"
diff --git a/cadxcore/lang/es/wxstd.mo b/cadxcore/lang/es/wxstd.mo
new file mode 100644
index 0000000..7dbd3ce
Binary files /dev/null and b/cadxcore/lang/es/wxstd.mo differ
diff --git a/cadxcore/lang/es/wxstd.po b/cadxcore/lang/es/wxstd.po
new file mode 100644
index 0000000..017f6ad
--- /dev/null
+++ b/cadxcore/lang/es/wxstd.po
@@ -0,0 +1,9244 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: wxWidgets 3.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-01 19:04+0200\n"
+"PO-Revision-Date: 2009-03-25 10:12-0000\n"
+"Last-Translator: Julian Smart <julian at anthemion.co.uk>\n"
+"Language-Team: wxWidgets translators <wx-translators at wxwidgets.org>\n"
+"Language: es\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Language: Spanish\n"
+"X-Poedit-Country: SPAIN\n"
+"X-Poedit-SourceCharset: utf-8\n"
+
+#: ../src/common/debugrpt.cpp:591
+msgid ""
+"\n"
+"Please send this report to the program maintainer, thank you!\n"
+msgstr ""
+"\n"
+"Por favor, envie este informe al mantenedor del programa, gracias\n"
+
+#: ../src/richtext/richtextstyledlg.cpp:210
+#: ../src/richtext/richtextstyledlg.cpp:222
+msgid " "
+msgstr " "
+
+#: ../src/generic/dbgrptg.cpp:326
+msgid "              Thank you and we're sorry for the inconvenience!\n"
+msgstr "              Gracias y perdón por las molestias\n"
+
+#: ../src/common/prntbase.cpp:546
+#, fuzzy, c-format
+msgid " (copy %d of %d)"
+msgstr "Página %d de %d"
+
+#: ../src/common/log.cpp:425
+#, c-format
+msgid " (error %ld: %s)"
+msgstr " (error %ld: %s)"
+
+#: ../src/common/imagtiff.cpp:75
+#, fuzzy, c-format
+msgid " (in module \"%s\")"
+msgstr "módulo de TIFF: %s"
+
+#: ../src/common/docview.cpp:1624
+msgid " - "
+msgstr " - "
+
+#: ../src/richtext/richtextprint.cpp:588 ../src/html/htmprint.cpp:704
+msgid " Preview"
+msgstr " Previsualización"
+
+#: ../src/common/fontcmn.cpp:811
+msgid " bold"
+msgstr "negrita"
+
+#: ../src/common/fontcmn.cpp:827
+msgid " italic"
+msgstr "cursiva"
+
+#: ../src/common/fontcmn.cpp:807
+msgid " light"
+msgstr " ligera"
+
+#: ../src/common/paper.cpp:118
+msgid "#10 Envelope, 4 1/8 x 9 1/2 in"
+msgstr "Sobre #10, 4 1/8 x 9 1/2 in"
+
+#: ../src/common/paper.cpp:119
+msgid "#11 Envelope, 4 1/2 x 10 3/8 in"
+msgstr "Sobre #11, 4 1/2 x 10 3/8 in"
+
+#: ../src/common/paper.cpp:120
+msgid "#12 Envelope, 4 3/4 x 11 in"
+msgstr "Sobre #12, 4 3/4 x 11 in"
+
+#: ../src/common/paper.cpp:121
+msgid "#14 Envelope, 5 x 11 1/2 in"
+msgstr "Sobre #14, 5 x 11 1/2 in"
+
+#: ../src/common/paper.cpp:117
+msgid "#9 Envelope, 3 7/8 x 8 7/8 in"
+msgstr "Sobre #9, 3 7/8 x 8 7/8 in"
+
+#: ../src/html/helpwnd.cpp:1044
+#, fuzzy, c-format
+msgid "%d of %lu"
+msgstr "%i de %i"
+
+#: ../src/html/helpwnd.cpp:1681 ../src/html/helpwnd.cpp:1719
+#, c-format
+msgid "%i of %i"
+msgstr "%i de %i"
+
+#: ../src/generic/filectrlg.cpp:315
+#, fuzzy, c-format
+msgid "%ld byte"
+msgid_plural "%ld bytes"
+msgstr[0] "%ld bytes"
+msgstr[1] "%ld bytes"
+
+#: ../src/html/helpwnd.cpp:1046
+#, fuzzy, c-format
+msgid "%lu of %lu"
+msgstr "%i de %i"
+
+#: ../src/common/cmdline.cpp:1050
+#, c-format
+msgid "%s (or %s)"
+msgstr "%s (o %s)"
+
+#: ../src/generic/logg.cpp:230
+#, c-format
+msgid "%s Error"
+msgstr "%s Error"
+
+#: ../src/generic/logg.cpp:242
+#, c-format
+msgid "%s Information"
+msgstr "%s Información"
+
+#: ../src/generic/preferencesg.cpp:110
+#, fuzzy, c-format
+msgid "%s Preferences"
+msgstr "&Preferencias"
+
+#: ../src/generic/logg.cpp:234
+#, c-format
+msgid "%s Warning"
+msgstr "Aviso de %s"
+
+#: ../src/common/tarstrm.cpp:1319
+#, c-format
+msgid "%s did not fit the tar header for entry '%s'"
+msgstr "%s did not fit the tar header for entry '%s'"
+
+#: ../src/common/fldlgcmn.cpp:106
+#, c-format
+msgid "%s files (%s)|%s"
+msgstr "archivos %s (%s)|%s"
+
+#: ../src/common/stockitem.cpp:139 ../src/html/helpfrm.cpp:142
+#: ../src/html/helpfrm.cpp:144
+msgid "&About"
+msgstr "&Acerca de"
+
+#: ../src/common/stockitem.cpp:207
+msgid "&Actual Size"
+msgstr "Tamaño re&al"
+
+#: ../src/richtext/richtextindentspage.cpp:262
+#, fuzzy
+msgid "&After a paragraph:"
+msgstr "Después de un párrafo:"
+
+#: ../src/richtext/richtextindentspage.cpp:128
+#: ../src/richtext/richtextliststylepage.cpp:319
+msgid "&Alignment"
+msgstr "&Alinear"
+
+#: ../src/common/stockitem.cpp:141
+msgid "&Apply"
+msgstr "&Aplicar"
+
+#: ../src/richtext/richtextstyledlg.cpp:251
+msgid "&Apply Style"
+msgstr "&Aplicar Estilo"
+
+#: ../src/msw/mdi.cpp:175
+msgid "&Arrange Icons"
+msgstr "&Organizar iconos"
+
+#: ../src/common/stockitem.cpp:195
+msgid "&Ascending"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:142
+msgid "&Back"
+msgstr "&Atrás"
+
+#: ../src/richtext/richtextstylepage.cpp:113
+msgid "&Based on:"
+msgstr "&Basado en:"
+
+#: ../src/richtext/richtextindentspage.cpp:253
+#, fuzzy
+msgid "&Before a paragraph:"
+msgstr "Antes de un párrafo:"
+
+#: ../src/richtext/richtextfontpage.cpp:271
+#, fuzzy
+msgid "&Bg colour:"
+msgstr "&Color:"
+
+#: ../src/common/stockitem.cpp:143
+msgid "&Bold"
+msgstr "&Negrita"
+
+#: ../src/common/stockitem.cpp:144
+msgid "&Bottom"
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:359
+#: ../src/richtext/richtextborderspage.cpp:503
+#: ../src/richtext/richtextmarginspage.cpp:260
+#: ../src/richtext/richtextmarginspage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:637
+#: ../src/richtext/richtextsizepage.cpp:644
+msgid "&Bottom:"
+msgstr ""
+
+#: ../include/wx/richtext/richtextbuffer.h:3530
+#, fuzzy
+msgid "&Box"
+msgstr "&Negrita"
+
+#: ../src/richtext/richtextliststylepage.cpp:210
+#: ../src/richtext/richtextbulletspage.cpp:159
+msgid "&Bullet style:"
+msgstr "Estilo de &viñeta:"
+
+#: ../src/common/stockitem.cpp:146
+msgid "&CD-Rom"
+msgstr ""
+
+#: ../src/generic/wizard.cpp:432 ../src/generic/fontdlgg.cpp:470
+#: ../src/generic/fontdlgg.cpp:489 ../src/osx/carbon/fontdlg.cpp:588
+#: ../src/common/stockitem.cpp:145
+msgid "&Cancel"
+msgstr "&Cancelar"
+
+#: ../src/msw/mdi.cpp:171
+msgid "&Cascade"
+msgstr "&Cascada"
+
+#: ../include/wx/richtext/richtextbuffer.h:5587
+#, fuzzy
+msgid "&Cell"
+msgstr "&Cancelar"
+
+#: ../src/richtext/richtextsymboldlg.cpp:439
+msgid "&Character code:"
+msgstr "&Código de caracter:"
+
+#: ../src/common/stockitem.cpp:147
+msgid "&Clear"
+msgstr "&Limpiar"
+
+#: ../src/generic/logg.cpp:522 ../src/common/stockitem.cpp:148
+#: ../src/common/prntbase.cpp:1570 ../src/univ/themes/win32.cpp:3756
+#: ../src/html/helpfrm.cpp:139
+msgid "&Close"
+msgstr "&Cerrar"
+
+#: ../src/common/stockitem.cpp:193
+#, fuzzy
+msgid "&Color"
+msgstr "&Color:"
+
+#: ../src/richtext/richtextfontpage.cpp:258
+msgid "&Colour:"
+msgstr "&Color:"
+
+#: ../src/common/stockitem.cpp:149
+#, fuzzy
+msgid "&Convert"
+msgstr "Contenidos"
+
+#: ../src/richtext/richtextctrl.cpp:326 ../src/osx/textctrl_osx.cpp:583
+#: ../src/common/stockitem.cpp:150 ../src/msw/textctrl.cpp:2284
+msgid "&Copy"
+msgstr "&Copiar"
+
+#: ../src/generic/hyperlinkg.cpp:156
+#, fuzzy
+msgid "&Copy URL"
+msgstr "&Copiar"
+
+#: ../src/common/headerctrlcmn.cpp:328
+#, fuzzy
+msgid "&Customize..."
+msgstr "tamaño de fuente"
+
+#: ../src/generic/dbgrptg.cpp:334
+msgid "&Debug report preview:"
+msgstr "&Vista previa del informe de depuración:"
+
+#: ../src/richtext/richtexttabspage.cpp:142
+#: ../src/richtext/richtextctrl.cpp:328 ../src/osx/textctrl_osx.cpp:585
+#: ../src/common/stockitem.cpp:152 ../src/msw/textctrl.cpp:2286
+msgid "&Delete"
+msgstr "&Eliminar"
+
+#: ../src/richtext/richtextstyledlg.cpp:269
+msgid "&Delete Style..."
+msgstr "&Eliminar Estilo..."
+
+#: ../src/common/stockitem.cpp:196
+msgid "&Descending"
+msgstr ""
+
+#: ../src/generic/logg.cpp:688
+msgid "&Details"
+msgstr "&Detalles"
+
+#: ../src/common/stockitem.cpp:153
+msgid "&Down"
+msgstr "A&bajo"
+
+#: ../src/common/stockitem.cpp:154
+msgid "&Edit"
+msgstr "&Editar"
+
+#: ../src/richtext/richtextstyledlg.cpp:263
+msgid "&Edit Style..."
+msgstr "&Editar Estilo..."
+
+#: ../src/common/stockitem.cpp:155
+msgid "&Execute"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:157 ../src/html/helpfrm.cpp:146
+msgid "&File"
+msgstr "&Archivo"
+
+#: ../src/common/stockitem.cpp:158
+msgid "&Find"
+msgstr "&Buscar"
+
+#: ../src/generic/wizard.cpp:626
+msgid "&Finish"
+msgstr "&Finalizar"
+
+#: ../src/common/stockitem.cpp:159
+#, fuzzy
+msgid "&First"
+msgstr "primero"
+
+#: ../src/richtext/richtextsizepage.cpp:244
+msgid "&Floating mode:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:160
+#, fuzzy
+msgid "&Floppy"
+msgstr "&Copiar"
+
+#: ../src/common/stockitem.cpp:194
+#, fuzzy
+msgid "&Font"
+msgstr "&Fuente:"
+
+#: ../src/generic/fontdlgg.cpp:371
+msgid "&Font family:"
+msgstr "&Fuente:"
+
+#: ../src/richtext/richtextliststylepage.cpp:194
+msgid "&Font for Level..."
+msgstr "&Fuente para el Nivel..."
+
+#: ../src/richtext/richtextfontpage.cpp:156
+#: ../src/richtext/richtextsymboldlg.cpp:400
+msgid "&Font:"
+msgstr "&Fuente:"
+
+#: ../src/common/stockitem.cpp:161
+msgid "&Forward"
+msgstr "Adelante"
+
+#: ../src/richtext/richtextsymboldlg.cpp:451
+msgid "&From:"
+msgstr "&Desde:"
+
+#: ../src/common/stockitem.cpp:162
+msgid "&Harddisk"
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:351
+#: ../src/richtext/richtextsizepage.cpp:358
+#, fuzzy
+msgid "&Height:"
+msgstr "Peso"
+
+#: ../src/generic/wizard.cpp:435 ../src/richtext/richtextstyledlg.cpp:303
+#: ../src/richtext/richtextsymboldlg.cpp:479 ../src/osx/menu_osx.cpp:785
+#: ../src/common/stockitem.cpp:163 ../src/html/helpfrm.cpp:147
+msgid "&Help"
+msgstr "&Ayuda"
+
+#: ../include/wx/richmsgdlg.h:30
+#, fuzzy
+msgid "&Hide details"
+msgstr "&Detalles"
+
+#: ../src/common/stockitem.cpp:164
+msgid "&Home"
+msgstr "&Inicio"
+
+#: ../src/richtext/richtextindentspage.cpp:184
+#: ../src/richtext/richtextliststylepage.cpp:372
+msgid "&Indentation (tenths of a mm)"
+msgstr "&Escalonado (décimas de mm)"
+
+#: ../src/richtext/richtextindentspage.cpp:167
+#: ../src/richtext/richtextliststylepage.cpp:356
+msgid "&Indeterminate"
+msgstr "&Indeterminado"
+
+#: ../src/common/stockitem.cpp:166
+msgid "&Index"
+msgstr "Índ&ice"
+
+#: ../src/common/stockitem.cpp:167
+#, fuzzy
+msgid "&Info"
+msgstr "&Deshacer"
+
+#: ../src/common/stockitem.cpp:168
+msgid "&Italic"
+msgstr "Curs&iva"
+
+#: ../src/common/stockitem.cpp:169
+msgid "&Jump to"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:153
+#: ../src/richtext/richtextliststylepage.cpp:342
+msgid "&Justified"
+msgstr "&Justificado"
+
+#: ../src/common/stockitem.cpp:174
+#, fuzzy
+msgid "&Last"
+msgstr "&Pegar"
+
+#: ../src/richtext/richtextindentspage.cpp:139
+#: ../src/richtext/richtextliststylepage.cpp:328
+msgid "&Left"
+msgstr "&Izquierda"
+
+#: ../src/richtext/richtextindentspage.cpp:195
+#: ../src/richtext/richtextborderspage.cpp:269
+#: ../src/richtext/richtextborderspage.cpp:413
+#: ../src/richtext/richtextliststylepage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:187
+#: ../src/richtext/richtextmarginspage.cpp:301
+#: ../src/richtext/richtextsizepage.cpp:532
+#: ../src/richtext/richtextsizepage.cpp:539
+msgid "&Left:"
+msgstr "&Izquierda:"
+
+#: ../src/richtext/richtextliststylepage.cpp:183
+msgid "&List level:"
+msgstr "Nivel de &Lista:"
+
+#: ../src/generic/logg.cpp:523
+msgid "&Log"
+msgstr "&Log"
+
+#: ../src/univ/themes/win32.cpp:3748
+msgid "&Move"
+msgstr "&Mover"
+
+#: ../src/richtext/richtextsizepage.cpp:672
+msgid "&Move the object to:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:175
+#, fuzzy
+msgid "&Network"
+msgstr "&Nuevo"
+
+#: ../src/richtext/richtexttabspage.cpp:136 ../src/common/stockitem.cpp:176
+msgid "&New"
+msgstr "&Nuevo"
+
+#: ../src/aui/tabmdi.cpp:111 ../src/generic/mdig.cpp:100
+#: ../src/msw/mdi.cpp:176
+msgid "&Next"
+msgstr "&Siguiente"
+
+#: ../src/generic/wizard.cpp:431 ../src/generic/wizard.cpp:626
+msgid "&Next >"
+msgstr "&Siguiente >"
+
+#: ../src/richtext/richtextsizepage.cpp:681
+#, fuzzy
+msgid "&Next Paragraph"
+msgstr "Después de un párrafo:"
+
+#: ../src/generic/tipdlg.cpp:276
+msgid "&Next Tip"
+msgstr "&Siguiente Sugerencia"
+
+#: ../src/richtext/richtextstylepage.cpp:123
+msgid "&Next style:"
+msgstr "&Siguiente Estilo"
+
+#: ../src/common/stockitem.cpp:177 ../src/msw/msgdlg.cpp:476
+msgid "&No"
+msgstr "&No"
+
+#: ../src/generic/dbgrptg.cpp:356
+msgid "&Notes:"
+msgstr "&Notas:"
+
+#: ../src/richtext/richtextbulletspage.cpp:264
+msgid "&Number:"
+msgstr "&Número:"
+
+#: ../src/generic/fontdlgg.cpp:475 ../src/generic/fontdlgg.cpp:482
+#: ../src/osx/carbon/fontdlg.cpp:594 ../src/common/stockitem.cpp:178
+msgid "&OK"
+msgstr "&Aceptar"
+
+#: ../src/generic/dbgrptg.cpp:342 ../src/common/stockitem.cpp:179
+#: ../src/html/helpfrm.cpp:137
+msgid "&Open..."
+msgstr "A&brir..."
+
+#: ../src/richtext/richtextindentspage.cpp:222
+#, fuzzy
+msgid "&Outline level:"
+msgstr "Nivel de &Lista:"
+
+#: ../src/richtext/richtextindentspage.cpp:293
+msgid "&Page Break"
+msgstr ""
+
+#: ../src/richtext/richtextctrl.cpp:327 ../src/osx/textctrl_osx.cpp:584
+#: ../src/common/stockitem.cpp:180 ../src/msw/textctrl.cpp:2285
+msgid "&Paste"
+msgstr "&Pegar"
+
+#: ../include/wx/richtext/richtextbuffer.h:4655
+msgid "&Picture"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:422
+msgid "&Point size:"
+msgstr "Tamaño de &punto:"
+
+#: ../src/richtext/richtexttabspage.cpp:114
+msgid "&Position (tenths of a mm):"
+msgstr "&Posición (décimas de mm):"
+
+#: ../src/richtext/richtextsizepage.cpp:514
+#, fuzzy
+msgid "&Position mode:"
+msgstr "Pregunta"
+
+#: ../src/common/stockitem.cpp:181
+msgid "&Preferences"
+msgstr "&Preferencias"
+
+#: ../src/aui/tabmdi.cpp:112 ../src/generic/mdig.cpp:101
+#: ../src/msw/mdi.cpp:177
+msgid "&Previous"
+msgstr "&Anterior"
+
+#: ../src/richtext/richtextsizepage.cpp:675
+#, fuzzy
+msgid "&Previous Paragraph"
+msgstr "Página anterior"
+
+#: ../src/common/stockitem.cpp:183
+msgid "&Print..."
+msgstr "Im&primir..."
+
+#: ../src/richtext/richtextctrl.cpp:332 ../src/richtext/richtextctrl.cpp:4945
+#: ../src/common/stockitem.cpp:184
+msgid "&Properties"
+msgstr "&Propiedades"
+
+#: ../src/common/stockitem.cpp:156
+msgid "&Quit"
+msgstr "&Salir"
+
+#: ../src/richtext/richtextctrl.cpp:323 ../src/osx/textctrl_osx.cpp:580
+#: ../src/common/stockitem.cpp:185 ../src/common/cmdproc.cpp:293
+#: ../src/common/cmdproc.cpp:300 ../src/msw/textctrl.cpp:2281
+msgid "&Redo"
+msgstr "&Rehacer"
+
+#: ../src/common/cmdproc.cpp:289 ../src/common/cmdproc.cpp:309
+msgid "&Redo "
+msgstr "&Rehacer "
+
+#: ../src/richtext/richtextstyledlg.cpp:257
+msgid "&Rename Style..."
+msgstr "&Renombrar Estilo..."
+
+#: ../src/generic/fdrepdlg.cpp:179
+msgid "&Replace"
+msgstr "&Sustituir"
+
+#: ../src/richtext/richtextstyledlg.cpp:287
+msgid "&Restart numbering"
+msgstr "&Recomenzar numeración"
+
+#: ../src/univ/themes/win32.cpp:3747
+msgid "&Restore"
+msgstr "&Restaurar"
+
+#: ../src/richtext/richtextindentspage.cpp:146
+#: ../src/richtext/richtextliststylepage.cpp:335
+msgid "&Right"
+msgstr "&Derecha"
+
+#: ../src/richtext/richtextindentspage.cpp:213
+#: ../src/richtext/richtextborderspage.cpp:299
+#: ../src/richtext/richtextborderspage.cpp:443
+#: ../src/richtext/richtextliststylepage.cpp:399
+#: ../src/richtext/richtextmarginspage.cpp:212
+#: ../src/richtext/richtextmarginspage.cpp:326
+#: ../src/richtext/richtextsizepage.cpp:602
+#: ../src/richtext/richtextsizepage.cpp:609
+msgid "&Right:"
+msgstr "&Derecha:"
+
+#: ../src/common/stockitem.cpp:190
+msgid "&Save"
+msgstr "&Guardar"
+
+#: ../src/common/stockitem.cpp:191
+#, fuzzy
+msgid "&Save as"
+msgstr "Guardar como"
+
+#: ../include/wx/richmsgdlg.h:29
+#, fuzzy
+msgid "&See details"
+msgstr "&Detalles"
+
+#: ../src/generic/tipdlg.cpp:270
+msgid "&Show tips at startup"
+msgstr "&Mostrar sugerencias al inicio"
+
+#: ../src/univ/themes/win32.cpp:3750
+msgid "&Size"
+msgstr "&Tamaño"
+
+#: ../src/richtext/richtextfontpage.cpp:168
+msgid "&Size:"
+msgstr "&Tamaño:"
+
+#: ../src/generic/progdlgg.cpp:282
+#, fuzzy
+msgid "&Skip"
+msgstr "Saltar"
+
+#: ../src/richtext/richtextindentspage.cpp:242
+#: ../src/richtext/richtextliststylepage.cpp:417
+msgid "&Spacing (tenths of a mm)"
+msgstr "&Espaciado (décimas de mm)"
+
+#: ../src/common/stockitem.cpp:197
+msgid "&Spell Check"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:198
+msgid "&Stop"
+msgstr "&Detener"
+
+#: ../src/richtext/richtextfontpage.cpp:284 ../src/common/stockitem.cpp:199
+msgid "&Strikethrough"
+msgstr "&Tachado"
+
+#: ../src/generic/fontdlgg.cpp:382 ../src/richtext/richtextstylepage.cpp:104
+msgid "&Style:"
+msgstr "E&stilo:"
+
+#: ../src/richtext/richtextstyledlg.cpp:198
+msgid "&Styles:"
+msgstr "E&stilos:"
+
+#: ../src/richtext/richtextsymboldlg.cpp:413
+msgid "&Subset:"
+msgstr "&Subjuego:"
+
+#: ../src/richtext/richtextliststylepage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:222
+msgid "&Symbol:"
+msgstr "&Símbolo:"
+
+#: ../include/wx/richtext/richtextbuffer.h:5679
+#, fuzzy
+msgid "&Table"
+msgstr "Tabulaciones"
+
+#: ../src/common/stockitem.cpp:200
+#, fuzzy
+msgid "&Top"
+msgstr "&Copiar"
+
+#: ../src/richtext/richtextborderspage.cpp:329
+#: ../src/richtext/richtextborderspage.cpp:473
+#: ../src/richtext/richtextmarginspage.cpp:235
+#: ../src/richtext/richtextmarginspage.cpp:349
+#: ../src/richtext/richtextsizepage.cpp:567
+#: ../src/richtext/richtextsizepage.cpp:574
+#, fuzzy
+msgid "&Top:"
+msgstr "Hasta:"
+
+#: ../src/generic/fontdlgg.cpp:444 ../src/common/stockitem.cpp:202
+msgid "&Underline"
+msgstr "Subrayado"
+
+#: ../src/richtext/richtextfontpage.cpp:243
+msgid "&Underlining:"
+msgstr "&Subrayado:"
+
+#: ../src/richtext/richtextctrl.cpp:322 ../src/osx/textctrl_osx.cpp:579
+#: ../src/common/stockitem.cpp:203 ../src/common/cmdproc.cpp:271
+#: ../src/msw/textctrl.cpp:2280
+msgid "&Undo"
+msgstr "&Deshacer"
+
+#: ../src/common/cmdproc.cpp:265
+msgid "&Undo "
+msgstr "&Deshacer "
+
+#: ../src/common/stockitem.cpp:204
+msgid "&Unindent"
+msgstr "&No escalonado"
+
+#: ../src/common/stockitem.cpp:205
+msgid "&Up"
+msgstr "Arriba"
+
+#: ../src/richtext/richtextsizepage.cpp:278
+#, fuzzy
+msgid "&Vertical alignment:"
+msgstr "&Alineación de viñeta:"
+
+#: ../src/generic/dbgrptg.cpp:340
+#, fuzzy
+msgid "&View..."
+msgstr "A&brir..."
+
+#: ../src/generic/fontdlgg.cpp:393
+msgid "&Weight:"
+msgstr "Peso"
+
+#: ../src/richtext/richtextsizepage.cpp:317
+#: ../src/richtext/richtextsizepage.cpp:324
+#, fuzzy
+msgid "&Width:"
+msgstr "Peso"
+
+#: ../src/aui/tabmdi.cpp:311 ../src/aui/tabmdi.cpp:327
+#: ../src/aui/tabmdi.cpp:329 ../src/generic/mdig.cpp:294
+#: ../src/generic/mdig.cpp:310 ../src/generic/mdig.cpp:314
+#: ../src/msw/mdi.cpp:77
+msgid "&Window"
+msgstr "&Ventana"
+
+#: ../src/common/stockitem.cpp:206 ../src/msw/msgdlg.cpp:476
+msgid "&Yes"
+msgstr "&Sí"
+
+#: ../src/common/config.cpp:523 ../src/msw/regconf.cpp:258
+#, c-format
+msgid "'%s' has extra '..', ignored."
+msgstr "'%s' tiene '..' adicional, se ignora."
+
+#: ../src/common/valtext.cpp:249 ../src/common/valtext.cpp:251
+#: ../src/common/valtext.cpp:253 ../src/common/valtext.cpp:255
+#, c-format
+msgid "'%s' is invalid"
+msgstr "'%s' es inválido"
+
+#: ../src/common/cmdline.cpp:948 ../src/common/cmdline.cpp:966
+#, c-format
+msgid "'%s' is not a correct numeric value for option '%s'."
+msgstr "'%s' no es un valor numérico correcto para el parámetro '%s'."
+
+#: ../src/common/translation.cpp:1086
+#, c-format
+msgid "'%s' is not a valid message catalog."
+msgstr "'%s' no es un catálogo de mensajes válido."
+
+#: ../src/common/textbuf.cpp:239
+#, c-format
+msgid "'%s' is probably a binary buffer."
+msgstr "'%s' es probablemente un archivo binario."
+
+#: ../src/common/valtext.cpp:247
+#, c-format
+msgid "'%s' should be numeric."
+msgstr "'%s debe ser numérico."
+
+#: ../src/common/valtext.cpp:239
+#, c-format
+msgid "'%s' should only contain ASCII characters."
+msgstr "'%s' debe contener sólo caracteres ASCII."
+
+#: ../src/common/valtext.cpp:241
+#, c-format
+msgid "'%s' should only contain alphabetic characters."
+msgstr "'%s' debe contener sólo caracteres de texto."
+
+#: ../src/common/valtext.cpp:243
+#, c-format
+msgid "'%s' should only contain alphabetic or numeric characters."
+msgstr "'%s debe contener sólo caracteres alfanuméricos."
+
+#: ../src/common/valtext.cpp:245
+#, fuzzy, c-format
+msgid "'%s' should only contain digits."
+msgstr "'%s' debe contener sólo caracteres ASCII."
+
+#: ../src/richtext/richtextliststylepage.cpp:229
+#: ../src/richtext/richtextbulletspage.cpp:179
+msgid "(*)"
+msgstr "(*)"
+
+#: ../src/html/helpwnd.cpp:976
+msgid "(Help)"
+msgstr "(Ayuda)"
+
+#: ../src/richtext/richtextliststylepage.cpp:481
+#: ../src/richtext/richtextbulletspage.cpp:286
+msgid "(None)"
+msgstr "(Ninguno)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:504
+msgid "(Normal text)"
+msgstr "(Texto normal)"
+
+#: ../src/html/helpwnd.cpp:426 ../src/html/helpwnd.cpp:1119
+#: ../src/html/helpwnd.cpp:1745
+msgid "(bookmarks)"
+msgstr "(favoritos)"
+
+#: ../src/richtext/richtextindentspage.cpp:274
+#: ../src/richtext/richtextindentspage.cpp:286
+#: ../src/richtext/richtextindentspage.cpp:287
+#: ../src/richtext/richtextindentspage.cpp:311
+#: ../src/richtext/richtextindentspage.cpp:326
+#: ../src/richtext/richtextformatdlg.cpp:831
+#: ../src/richtext/richtextfontpage.cpp:331
+#: ../src/richtext/richtextfontpage.cpp:335
+#: ../src/richtext/richtextfontpage.cpp:339
+#: ../src/richtext/richtextliststylepage.cpp:448
+#: ../src/richtext/richtextliststylepage.cpp:460
+#: ../src/richtext/richtextliststylepage.cpp:461
+msgid "(none)"
+msgstr "(ninguno)"
+
+#: ../src/richtext/richtextliststylepage.cpp:492
+#: ../src/richtext/richtextbulletspage.cpp:297
+msgid "*"
+msgstr "*"
+
+#: ../src/richtext/richtextliststylepage.cpp:236
+#: ../src/richtext/richtextbulletspage.cpp:186
+msgid "*)"
+msgstr "*)"
+
+#: ../src/richtext/richtextliststylepage.cpp:495
+#: ../src/richtext/richtextbulletspage.cpp:300
+msgid "+"
+msgstr "+"
+
+#: ../src/msw/utils.cpp:1324
+msgid ", 64-bit edition"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:493
+#: ../src/richtext/richtextbulletspage.cpp:298
+msgid "-"
+msgstr "-"
+
+#: ../src/generic/filepickerg.cpp:66
+#, fuzzy
+msgid "..."
+msgstr ".."
+
+#: ../src/richtext/richtextindentspage.cpp:276
+#: ../src/richtext/richtextliststylepage.cpp:450
+#, fuzzy
+msgid "1.1"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:277
+#: ../src/richtext/richtextliststylepage.cpp:451
+#, fuzzy
+msgid "1.2"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:278
+#: ../src/richtext/richtextliststylepage.cpp:452
+#, fuzzy
+msgid "1.3"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:279
+#: ../src/richtext/richtextliststylepage.cpp:453
+#, fuzzy
+msgid "1.4"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:280
+#: ../src/richtext/richtextliststylepage.cpp:454
+msgid "1.5"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:455
+#, fuzzy
+msgid "1.6"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:282
+#: ../src/richtext/richtextliststylepage.cpp:456
+#, fuzzy
+msgid "1.7"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:283
+#: ../src/richtext/richtextliststylepage.cpp:457
+#, fuzzy
+msgid "1.8"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:284
+#: ../src/richtext/richtextliststylepage.cpp:458
+#, fuzzy
+msgid "1.9"
+msgstr "1.5"
+
+#: ../src/common/paper.cpp:141
+msgid "10 x 11 in"
+msgstr "10 x 11 in"
+
+#: ../src/common/paper.cpp:114
+msgid "10 x 14 in"
+msgstr "10 x 14 in"
+
+#: ../src/common/paper.cpp:115
+msgid "11 x 17 in"
+msgstr "11 x 17 in"
+
+#: ../src/common/paper.cpp:185
+msgid "12 x 11 in"
+msgstr "12 x 11 in"
+
+#: ../src/common/paper.cpp:142
+msgid "15 x 11 in"
+msgstr "15 x 11 in"
+
+#: ../src/richtext/richtextindentspage.cpp:285
+#: ../src/richtext/richtextliststylepage.cpp:459
+msgid "2"
+msgstr "2"
+
+#: ../src/common/paper.cpp:133
+msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in"
+msgstr "Sobre 6 3/4, 3 5/8 x 6 1/2 in"
+
+#: ../src/common/paper.cpp:140
+msgid "9 x 11 in"
+msgstr "9 x 11 in"
+
+#: ../src/html/htmprint.cpp:431
+msgid ": file does not exist!"
+msgstr ": ¡el archivo no existe!"
+
+#: ../src/common/fontmap.cpp:199
+msgid ": unknown charset"
+msgstr ": conjunto de caracteres desconocido"
+
+#: ../src/common/fontmap.cpp:413
+msgid ": unknown encoding"
+msgstr ": codificación desconocida"
+
+#: ../src/generic/wizard.cpp:437
+msgid "< &Back"
+msgstr "< &Atrás"
+
+#: ../src/osx/carbon/fontdlg.cpp:608 ../src/osx/carbon/fontdlg.cpp:815
+#: ../src/osx/carbon/fontdlg.cpp:835
+msgid "<Any Decorative>"
+msgstr "<Cualquier Decorativo>"
+
+#: ../src/osx/carbon/fontdlg.cpp:609 ../src/osx/carbon/fontdlg.cpp:817
+#: ../src/osx/carbon/fontdlg.cpp:837
+msgid "<Any Modern>"
+msgstr "<Cualquier Moderno>"
+
+#: ../src/osx/carbon/fontdlg.cpp:607 ../src/osx/carbon/fontdlg.cpp:813
+#: ../src/osx/carbon/fontdlg.cpp:833
+msgid "<Any Roman>"
+msgstr "<Cualquier Roman>"
+
+#: ../src/osx/carbon/fontdlg.cpp:610 ../src/osx/carbon/fontdlg.cpp:819
+#: ../src/osx/carbon/fontdlg.cpp:839
+msgid "<Any Script>"
+msgstr "<Cualquier Script>"
+
+#: ../src/osx/carbon/fontdlg.cpp:611 ../src/osx/carbon/fontdlg.cpp:824
+#: ../src/osx/carbon/fontdlg.cpp:843
+msgid "<Any Swiss>"
+msgstr "<Cualquier Swiss>"
+
+#: ../src/osx/carbon/fontdlg.cpp:612 ../src/osx/carbon/fontdlg.cpp:821
+#: ../src/osx/carbon/fontdlg.cpp:841
+msgid "<Any Teletype>"
+msgstr "<Cualquier Teletipo>"
+
+#: ../src/osx/carbon/fontdlg.cpp:606
+msgid "<Any>"
+msgstr "<Cualquiera>"
+
+#: ../src/generic/filectrlg.cpp:286 ../src/generic/filectrlg.cpp:309
+msgid "<DIR>"
+msgstr "<DIR>"
+
+#: ../src/generic/filectrlg.cpp:290 ../src/generic/filectrlg.cpp:313
+msgid "<DRIVE>"
+msgstr "<UNIDAD>"
+
+#: ../src/generic/filectrlg.cpp:288 ../src/generic/filectrlg.cpp:311
+msgid "<LINK>"
+msgstr "<ENLACE>"
+
+#: ../src/html/helpwnd.cpp:1279
+msgid "<b><i>Bold italic face.</i></b><br>"
+msgstr "<b><i>Negrita cursiva.</i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1283
+msgid "<b><i>bold italic <u>underlined</u></i></b><br>"
+msgstr "<b><i>negrita cursiva <u>subrayada</u></i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1278
+msgid "<b>Bold face.</b> "
+msgstr "<b>Negrita.</b> "
+
+#: ../src/html/helpwnd.cpp:1277
+msgid "<i>Italic face.</i> "
+msgstr "<i>Cursiva.</i> "
+
+#: ../src/richtext/richtextliststylepage.cpp:494
+#: ../src/richtext/richtextbulletspage.cpp:299
+msgid ">"
+msgstr ">"
+
+#: ../src/generic/dbgrptg.cpp:318
+msgid "A debug report has been generated in the directory\n"
+msgstr "Se ha generado un informe de depuración en el directorio\n"
+
+#: ../src/common/debugrpt.cpp:578
+#, fuzzy
+msgid "A debug report has been generated. It can be found in"
+msgstr "Se ha generado un informe de depuración en el directorio\n"
+
+#: ../src/common/xtixml.cpp:418
+msgid "A non empty collection must consist of 'element' nodes"
+msgstr "Una colección no vacía debe consistir en nodos del tipo 'elemento'"
+
+#: ../src/richtext/richtextliststylepage.cpp:304
+#: ../src/richtext/richtextliststylepage.cpp:306
+#: ../src/richtext/richtextbulletspage.cpp:257
+#: ../src/richtext/richtextbulletspage.cpp:259
+msgid "A standard bullet name."
+msgstr "Un nombre de viñeta estándar."
+
+#: ../src/common/paper.cpp:218
+#, fuzzy
+msgid "A0 sheet, 841 x 1189 mm"
+msgstr "Hoja A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:219
+#, fuzzy
+msgid "A1 sheet, 594 x 841 mm"
+msgstr "Hoja A3, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:160
+msgid "A2 420 x 594 mm"
+msgstr "A2 420 x 594 mm"
+
+#: ../src/common/paper.cpp:157
+msgid "A3 Extra 322 x 445 mm"
+msgstr "A3 Extra 322 x 445 mm"
+
+#: ../src/common/paper.cpp:162
+msgid "A3 Extra Transverse 322 x 445 mm"
+msgstr "A3 Extra Transversal 322 x 445 mm"
+
+#: ../src/common/paper.cpp:171
+msgid "A3 Rotated 420 x 297 mm"
+msgstr "A3 Girada 420 x 297 mm"
+
+#: ../src/common/paper.cpp:161
+msgid "A3 Transverse 297 x 420 mm"
+msgstr "A3 Transversal 297 x 420 mm"
+
+#: ../src/common/paper.cpp:107
+msgid "A3 sheet, 297 x 420 mm"
+msgstr "Hoja A3, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:147
+msgid "A4 Extra 9.27 x 12.69 in"
+msgstr "A4 Extra 9.27 x 12.69 in"
+
+#: ../src/common/paper.cpp:154
+msgid "A4 Plus 210 x 330 mm"
+msgstr "A4 Plus 210 x 330 mm"
+
+#: ../src/common/paper.cpp:172
+msgid "A4 Rotated 297 x 210 mm"
+msgstr "A4 Girada 297 x 210 mm"
+
+#: ../src/common/paper.cpp:149
+msgid "A4 Transverse 210 x 297 mm"
+msgstr "A4 Transversal 210 x 297 mm"
+
+#: ../src/common/paper.cpp:98
+msgid "A4 sheet, 210 x 297 mm"
+msgstr "Hoja A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:108
+msgid "A4 small sheet, 210 x 297 mm"
+msgstr "Hoja Pequeña A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:158
+msgid "A5 Extra 174 x 235 mm"
+msgstr "A5 Extra 174 x 235 mm"
+
+#: ../src/common/paper.cpp:173
+msgid "A5 Rotated 210 x 148 mm"
+msgstr "A5 Girado 210 x 148 mm"
+
+#: ../src/common/paper.cpp:155
+msgid "A5 Transverse 148 x 210 mm"
+msgstr "A5 Transversal 148 x 210 mm"
+
+#: ../src/common/paper.cpp:109
+msgid "A5 sheet, 148 x 210 mm"
+msgstr "Hoja A5, 148 x 210 mm"
+
+#: ../src/common/paper.cpp:165
+msgid "A6 105 x 148 mm"
+msgstr "A6 105 x 148 mm"
+
+#: ../src/common/paper.cpp:178
+msgid "A6 Rotated 148 x 105 mm"
+msgstr "A6 Girada 148 x 105 mm"
+
+#: ../src/generic/fontdlgg.cpp:83 ../src/richtext/richtextformatdlg.cpp:526
+#: ../src/osx/carbon/fontdlg.cpp:339
+msgid "ABCDEFGabcdefg12345"
+msgstr "ABCDEFGabcdefg12345"
+
+#: ../src/common/accelcmn.cpp:76
+msgid "ADD"
+msgstr "AÑADIR"
+
+#: ../src/richtext/richtextsymboldlg.cpp:458 ../src/common/ftp.cpp:405
+msgid "ASCII"
+msgstr "ASCII"
+
+#: ../src/osx/menu_osx.cpp:630 ../src/common/stockitem.cpp:139
+#, fuzzy
+msgid "About"
+msgstr "&Acerca de"
+
+#: ../src/generic/aboutdlgg.cpp:140 ../src/msw/aboutdlg.cpp:64
+#, fuzzy, c-format
+msgid "About %s"
+msgstr "Acerca de"
+
+#: ../src/richtext/richtextsizepage.cpp:520
+msgid "Absolute"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:207
+#, fuzzy
+msgid "Actual Size"
+msgstr "Tamaño re&al"
+
+#: ../src/common/stockitem.cpp:140
+msgid "Add"
+msgstr "Añadir"
+
+#: ../src/richtext/richtextbuffer.cpp:10751
+msgid "Add Column"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:10688
+msgid "Add Row"
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:439
+msgid "Add current page to bookmarks"
+msgstr "Añadir página actual a favoritos"
+
+#: ../src/generic/colrdlgg.cpp:283
+msgid "Add to custom colours"
+msgstr "Añadir a colores personalizados"
+
+#: ../include/wx/xtiprop.h:259
+msgid "AddToPropertyCollection called on a generic accessor"
+msgstr "Se llamó a AddToPropertyCollection sobre un accedente genérico"
+
+#: ../include/wx/xtiprop.h:197
+msgid "AddToPropertyCollection called w/o valid adder"
+msgstr "Se llamó a AddToPropertyCollection sin añadidor válido"
+
+#: ../src/html/helpctrl.cpp:159
+#, c-format
+msgid "Adding book %s"
+msgstr "Añadiendo libro %s"
+
+#: ../src/osx/carbon/dataview.cpp:1933
+msgid "Adding flavor TEXT failed"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1954
+msgid "Adding flavor utxt failed"
+msgstr ""
+
+#: ../src/common/preferencescmn.cpp:41
+msgid "Advanced"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:435
+msgid "After a paragraph:"
+msgstr "Después de un párrafo:"
+
+#: ../src/common/stockitem.cpp:172
+msgid "Align Left"
+msgstr "Alinear a la izquierda"
+
+#: ../src/common/stockitem.cpp:173
+msgid "Align Right"
+msgstr "Alinear a la derecha"
+
+#: ../src/richtext/richtextsizepage.cpp:266
+#, fuzzy
+msgid "Alignment"
+msgstr "&Alinear"
+
+#: ../src/generic/prntdlgg.cpp:215
+msgid "All"
+msgstr "Todo"
+
+#: ../src/generic/filectrlg.cpp:1205 ../src/common/fldlgcmn.cpp:89
+#, c-format
+msgid "All files (%s)|%s"
+msgstr "Todos los archivos (%s)|%s"
+
+#: ../include/wx/defs.h:2922
+msgid "All files (*)|*"
+msgstr "Todos los archivos (*)|*"
+
+#: ../include/wx/defs.h:2919
+msgid "All files (*.*)|*.*"
+msgstr "Todos los archivos (*.*)|*"
+
+#: ../src/richtext/richtextstyles.cpp:1057
+msgid "All styles"
+msgstr "Todos los estilos"
+
+#: ../src/propgrid/manager.cpp:1496
+msgid "Alphabetic Mode"
+msgstr ""
+
+#: ../src/common/xtistrm.cpp:429
+msgid "Already Registered Object passed to SetObjectClassInfo"
+msgstr "Se pasó Objeto Ya Registrado a SetObjectClassInfo"
+
+#: ../src/unix/dialup.cpp:353
+msgid "Already dialling ISP."
+msgstr "Llamando al ISP"
+
+#: ../src/common/accelcmn.cpp:320 ../src/univ/themes/win32.cpp:3756
+#, fuzzy
+msgid "Alt+"
+msgstr "Alt-"
+
+#: ../src/common/debugrpt.cpp:581
+#, fuzzy
+msgid "And includes the following files:\n"
+msgstr "*** E incluye los siguientes archivos:\n"
+
+#: ../src/generic/animateg.cpp:162
+#, c-format
+msgid "Animation file is not of type %ld."
+msgstr "Archivo de animación no es de tipo %ld."
+
+#: ../src/generic/logg.cpp:1034
+#, c-format
+msgid "Append log to file '%s' (choosing [No] will overwrite it)?"
+msgstr ""
+"¿Añadir el log al archivo '%s'? (elegir [No] sobreescribirá el archivo)?"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:610
+#: ../src/osx/menu_osx.cpp:649 ../src/osx/menu_osx.cpp:657
+#, fuzzy
+msgid "Application"
+msgstr "Selección"
+
+#: ../src/common/stockitem.cpp:141
+#, fuzzy
+msgid "Apply"
+msgstr "&Aplicar"
+
+#: ../src/richtext/richtextliststylepage.cpp:482
+#: ../src/richtext/richtextbulletspage.cpp:287
+msgid "Arabic"
+msgstr "Árabe"
+
+#: ../src/common/fmapbase.cpp:153
+msgid "Arabic (ISO-8859-6)"
+msgstr "Arabic (ISO-8859-6)"
+
+#: ../src/msw/ole/automtn.cpp:661
+#, fuzzy, c-format
+msgid "Argument %u not found."
+msgstr "Archivo de ayuda \"%s\" no encontrado."
+
+#: ../src/generic/aboutdlgg.cpp:184
+msgid "Artists"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:195
+#, fuzzy
+msgid "Ascending"
+msgstr "leyendo"
+
+#: ../src/generic/filectrlg.cpp:468
+msgid "Attributes"
+msgstr "Atributos"
+
+#: ../src/richtext/richtextliststylepage.cpp:294
+#: ../src/richtext/richtextbulletspage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:247
+msgid "Available fonts."
+msgstr "Fuentes disponibles."
+
+#: ../src/common/paper.cpp:138
+msgid "B4 (ISO) 250 x 353 mm"
+msgstr "B4 (ISO) 250 x 353 mm"
+
+#: ../src/common/paper.cpp:174
+msgid "B4 (JIS) Rotated 364 x 257 mm"
+msgstr "B4 (JIS) Girado 364 x 257 mm"
+
+#: ../src/common/paper.cpp:128
+msgid "B4 Envelope, 250 x 353 mm"
+msgstr "Sobre B4, 250 x 353 mm"
+
+#: ../src/common/paper.cpp:110
+msgid "B4 sheet, 250 x 354 mm"
+msgstr "Hoja B4, 250 x 354 mm"
+
+#: ../src/common/paper.cpp:159
+msgid "B5 (ISO) Extra 201 x 276 mm"
+msgstr "B5 (ISO) Extra 201 x 276 mm"
+
+#: ../src/common/paper.cpp:175
+msgid "B5 (JIS) Rotated 257 x 182 mm"
+msgstr "B5 (JIS) Girado 257 x 182 mm"
+
+#: ../src/common/paper.cpp:156
+msgid "B5 (JIS) Transverse 182 x 257 mm"
+msgstr "B5 (JIS) Transversal 182 x 257 mm"
+
+#: ../src/common/paper.cpp:129
+msgid "B5 Envelope, 176 x 250 mm"
+msgstr "Sobre B5, 176 x 250 mm"
+
+#: ../src/common/paper.cpp:111
+msgid "B5 sheet, 182 x 257 millimeter"
+msgstr "Hoja B5, 182 x 257 mm"
+
+#: ../src/common/paper.cpp:183
+msgid "B6 (JIS) 128 x 182 mm"
+msgstr "B6 (JIS) 128 x 182 mm"
+
+#: ../src/common/paper.cpp:184
+msgid "B6 (JIS) Rotated 182 x 128 mm"
+msgstr "B6 (JIS) Girado 182 x 128 mm"
+
+#: ../src/common/paper.cpp:130
+msgid "B6 Envelope, 176 x 125 mm"
+msgstr "Sobre B6, 176 x 125 mm"
+
+#: ../src/common/accelcmn.cpp:49
+msgid "BACK"
+msgstr "ATRÁS"
+
+#: ../src/common/imagbmp.cpp:523 ../src/common/imagbmp.cpp:553
+#: ../src/common/imagbmp.cpp:568
+msgid "BMP: Couldn't allocate memory."
+msgstr "BMP: No se pudo reservar memoria."
+
+#: ../src/common/imagbmp.cpp:97
+msgid "BMP: Couldn't save invalid image."
+msgstr "BMP: No se pudo guardar imagen no válida."
+
+#: ../src/common/imagbmp.cpp:338
+msgid "BMP: Couldn't write RGB color map."
+msgstr "BMP: No se pudo escribir el mapa de color RGB."
+
+#: ../src/common/imagbmp.cpp:473
+msgid "BMP: Couldn't write data."
+msgstr "BMP: No se pudieron escribir datos."
+
+#: ../src/common/imagbmp.cpp:239
+msgid "BMP: Couldn't write the file (Bitmap) header."
+msgstr "BMP: No se pudo escribir la cabecera (Bitmap) del archivo."
+
+#: ../src/common/imagbmp.cpp:262
+msgid "BMP: Couldn't write the file (BitmapInfo) header."
+msgstr "BMP: No se pudo escribir la cabecera (BitmapInfo) del archivo."
+
+#: ../src/common/imagbmp.cpp:133
+msgid "BMP: wxImage doesn't have own wxPalette."
+msgstr "BMP: wxImage no tiene su propia wxPalette."
+
+#: ../src/common/stockitem.cpp:142
+#, fuzzy
+msgid "Back"
+msgstr "&Atrás"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:119
+#: ../src/richtext/richtextformatdlg.cpp:374
+#, fuzzy
+msgid "Background"
+msgstr "Color de fondo"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:131
+#, fuzzy
+msgid "Background &colour:"
+msgstr "Color de fondo"
+
+#: ../src/osx/carbon/fontdlg.cpp:406
+msgid "Background colour"
+msgstr "Color de fondo"
+
+#: ../src/common/fmapbase.cpp:160
+msgid "Baltic (ISO-8859-13)"
+msgstr "Baltic (ISO-8859-13)"
+
+#: ../src/common/fmapbase.cpp:151
+msgid "Baltic (old) (ISO-8859-4)"
+msgstr "Baltic (old) (ISO-8859-4)"
+
+#: ../src/richtext/richtextliststylepage.cpp:426
+msgid "Before a paragraph:"
+msgstr "Antes de un párrafo:"
+
+#: ../src/richtext/richtextliststylepage.cpp:489
+#: ../src/richtext/richtextbulletspage.cpp:294
+msgid "Bitmap"
+msgstr "Mapa de bits"
+
+#: ../src/osx/carbon/dataview.cpp:2396
+msgid "Bitmap renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:333 ../src/richtext/richtextfontpage.cpp:337
+#: ../src/osx/carbon/fontdlg.cpp:540 ../src/common/stockitem.cpp:143
+msgid "Bold"
+msgstr "Gruesa"
+
+#: ../src/richtext/richtextborderspage.cpp:256
+#: ../src/richtext/richtextborderspage.cpp:389
+#, fuzzy
+msgid "Border"
+msgstr "Modern"
+
+#: ../src/richtext/richtextformatdlg.cpp:368
+#, fuzzy
+msgid "Borders"
+msgstr "Modern"
+
+#: ../src/richtext/richtextsizepage.cpp:288 ../src/common/stockitem.cpp:144
+msgid "Bottom"
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:893
+msgid "Bottom margin (mm):"
+msgstr "Margen inferior (mm):"
+
+#: ../src/richtext/richtextbuffer.cpp:8919
+#, fuzzy
+msgid "Box Properties"
+msgstr "&Propiedades"
+
+#: ../src/richtext/richtextstyles.cpp:1061
+#, fuzzy
+msgid "Box styles"
+msgstr "Todos los estilos"
+
+#: ../src/common/filepickercmn.cpp:43 ../src/common/filepickercmn.cpp:44
+msgid "Browse"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:195
+msgid "Bullet &Alignment:"
+msgstr "&Alineación de viñeta:"
+
+#: ../src/richtext/richtextliststylepage.cpp:309
+msgid "Bullet style"
+msgstr "Estilo de viñeta"
+
+#: ../src/richtext/richtextformatdlg.cpp:342
+msgid "Bullets"
+msgstr "Viñetas"
+
+#: ../src/common/paper.cpp:99
+msgid "C sheet, 17 x 22 in"
+msgstr "Hoja C, 17 x 22 in"
+
+#: ../src/generic/logg.cpp:520
+msgid "C&lear"
+msgstr "&Limpiar"
+
+#: ../src/generic/fontdlgg.cpp:406
+msgid "C&olour:"
+msgstr "C&olor:"
+
+#: ../src/common/paper.cpp:124
+msgid "C3 Envelope, 324 x 458 mm"
+msgstr "Sobre C3, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:125
+msgid "C4 Envelope, 229 x 324 mm"
+msgstr "Sobre C4, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:123
+msgid "C5 Envelope, 162 x 229 mm"
+msgstr "Sobre C5, 162 x 229 mm"
+
+#: ../src/common/paper.cpp:126
+msgid "C6 Envelope, 114 x 162 mm"
+msgstr "Sobre C6, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:127
+msgid "C65 Envelope, 114 x 229 mm"
+msgstr "Sobre C65, 114 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:66
+msgid "CANCEL"
+msgstr "CANCELAR"
+
+#: ../src/common/accelcmn.cpp:70
+msgid "CAPITAL"
+msgstr "MAYÚSCULAS"
+
+#: ../src/common/stockitem.cpp:146
+msgid "CD-Rom"
+msgstr ""
+
+#: ../src/html/chm.cpp:815 ../src/html/chm.cpp:874
+msgid "CHM handler currently supports only local files!"
+msgstr "¡El manejador CHM actualmente sólo permite archivos locales!"
+
+#: ../src/common/accelcmn.cpp:67
+msgid "CLEAR"
+msgstr "BORRAR"
+
+#: ../src/common/accelcmn.cpp:111
+msgid "COMMAND"
+msgstr "COMANDO"
+
+#: ../src/richtext/richtextfontpage.cpp:291
+msgid "Ca&pitals"
+msgstr "Ca&pitulares"
+
+#: ../src/common/cmdproc.cpp:267
+msgid "Can't &Undo "
+msgstr "No se puede deshacer "
+
+#: ../src/common/image.cpp:2686
+msgid "Can't automatically determine the image format for non-seekable input."
+msgstr ""
+
+#: ../src/msw/registry.cpp:505
+#, c-format
+msgid "Can't close registry key '%s'"
+msgstr "No se puede cerrar la clave del registro '%s'"
+
+#: ../src/msw/registry.cpp:583
+#, c-format
+msgid "Can't copy values of unsupported type %d."
+msgstr "No se pueden copiar valores del tipo no soportado %d."
+
+#: ../src/msw/registry.cpp:486
+#, c-format
+msgid "Can't create registry key '%s'"
+msgstr "No se puede crear la clave del registro '%s'"
+
+#: ../src/msw/thread.cpp:696 ../src/os2/thread.cpp:494
+msgid "Can't create thread"
+msgstr "No se puede crear el hilo de ejecución"
+
+#: ../src/msw/window.cpp:3793
+#, c-format
+msgid "Can't create window of class %s"
+msgstr "No se puede crear la ventana de clase %s"
+
+#: ../src/msw/registry.cpp:776
+#, c-format
+msgid "Can't delete key '%s'"
+msgstr "No se puede eliminar la clave '%s'"
+
+#: ../src/msw/iniconf.cpp:458 ../src/os2/iniconf.cpp:471
+#, c-format
+msgid "Can't delete the INI file '%s'"
+msgstr "No se puede elimininar el archivo INI '%s'"
+
+#: ../src/msw/registry.cpp:804
+#, c-format
+msgid "Can't delete value '%s' from key '%s'"
+msgstr "No se puede eliminar el valor '%s' de la clave '%s'"
+
+#: ../src/msw/registry.cpp:1161
+#, c-format
+msgid "Can't enumerate subkeys of key '%s'"
+msgstr "No se pueden enumerar las subclaves de la clave '%s'"
+
+#: ../src/msw/registry.cpp:1116
+#, c-format
+msgid "Can't enumerate values of key '%s'"
+msgstr "No se pueden enumerar los valores de la clave '%s'"
+
+#: ../src/msw/registry.cpp:1379
+#, c-format
+msgid "Can't export value of unsupported type %d."
+msgstr "No se puede exportar el valor del tipo no soportado %d."
+
+#: ../src/common/ffile.cpp:236
+#, c-format
+msgid "Can't find current position in file '%s'"
+msgstr "No se puede encontrar la posición actual en el archivo '%s'"
+
+#: ../src/msw/registry.cpp:416
+#, c-format
+msgid "Can't get info about registry key '%s'"
+msgstr "No se pudo obtener información de la clave del registro '%s'"
+
+#: ../src/common/zstream.cpp:346
+msgid "Can't initialize zlib deflate stream."
+msgstr "No se puede inicializar el flujo de compresión de zlib."
+
+#: ../src/common/zstream.cpp:185
+msgid "Can't initialize zlib inflate stream."
+msgstr "No se puede inicializar el flujo de descompresión de zlib."
+
+#: ../src/msw/fswatcher.cpp:432
+#, c-format
+msgid "Can't monitor non-existent directory \"%s\" for changes."
+msgstr ""
+
+#: ../src/msw/registry.cpp:452
+#, c-format
+msgid "Can't open registry key '%s'"
+msgstr "No se puede abrir la clave del registro '%s'"
+
+#: ../src/common/zstream.cpp:252
+#, c-format
+msgid "Can't read from inflate stream: %s"
+msgstr "No se puede leer desde el flujo de descompresión %s"
+
+#: ../src/common/zstream.cpp:244
+msgid "Can't read inflate stream: unexpected EOF in underlying stream."
+msgstr ""
+"Imposible leer flujo de descompresión: EOF inesperado en el flujo subyacente."
+
+#: ../src/msw/registry.cpp:1048
+#, c-format
+msgid "Can't read value of '%s'"
+msgstr "No se puede leer el valor de '%s'"
+
+#: ../src/msw/registry.cpp:877 ../src/msw/registry.cpp:909
+#: ../src/msw/registry.cpp:971
+#, c-format
+msgid "Can't read value of key '%s'"
+msgstr "No se puede leer el valor de la clave '%s'"
+
+#: ../src/common/image.cpp:2483
+#, c-format
+msgid "Can't save image to file '%s': unknown extension."
+msgstr "No se puede guardar imagen en archivo '%s': extensión desconocida."
+
+#: ../src/generic/logg.cpp:579 ../src/generic/logg.cpp:996
+msgid "Can't save log contents to file."
+msgstr "No se pueden guardar los contenidos del log a un archivo."
+
+#: ../src/msw/thread.cpp:652 ../src/os2/thread.cpp:477
+msgid "Can't set thread priority"
+msgstr "No se puede establecer la prioridad del hilo de ejecución"
+
+#: ../src/msw/registry.cpp:895 ../src/msw/registry.cpp:939
+#: ../src/msw/registry.cpp:1065
+#, c-format
+msgid "Can't set value of '%s'"
+msgstr "No se puede establecer valor de '%s'"
+
+#: ../src/unix/utilsunx.cpp:357
+#, fuzzy
+msgid "Can't write to child process's stdin"
+msgstr "Error al matar el proceso %d"
+
+#: ../src/common/zstream.cpp:427
+#, c-format
+msgid "Can't write to deflate stream: %s"
+msgstr "No se puede escribir en el flujo de compresión %s"
+
+#: ../include/wx/msgdlg.h:274 ../src/generic/dirdlgg.cpp:107
+#: ../src/richtext/richtextstyledlg.cpp:300 ../src/common/stockitem.cpp:145
+#: ../src/msw/msgdlg.cpp:489 ../src/msw/progdlg.cpp:673
+#: ../src/gtk1/fontdlg.cpp:144 ../src/motif/msgdlg.cpp:196
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: ../src/os2/thread.cpp:116
+msgid "Cannot create mutex."
+msgstr "No se puede crear el mutex"
+
+#: ../src/osx/carbon/dataview.cpp:895
+msgid "Cannot create new column's ID. Probably max. number of columns reached."
+msgstr ""
+
+#: ../src/common/filefn.cpp:1336
+#, c-format
+msgid "Cannot enumerate files '%s'"
+msgstr "No se pueden enumerar los archivos '%s'"
+
+#: ../src/msw/dir.cpp:264
+#, c-format
+msgid "Cannot enumerate files in directory '%s'"
+msgstr "No se pueden enumerar los archivos en carpeta '%s'"
+
+#: ../src/msw/dialup.cpp:542
+#, c-format
+msgid "Cannot find active dialup connection: %s"
+msgstr "No se puede encontrar conexión activa: %s"
+
+#: ../src/msw/dialup.cpp:848
+msgid "Cannot find the location of address book file"
+msgstr "No se puede localizar el archivo de libreta de direcciones"
+
+#: ../src/msw/ole/automtn.cpp:562
+#, fuzzy, c-format
+msgid "Cannot get an active instance of \"%s\""
+msgstr "No se puede encontrar conexión activa: %s"
+
+#: ../src/unix/threadpsx.cpp:1030
+#, c-format
+msgid "Cannot get priority range for scheduling policy %d."
+msgstr ""
+"No se puede obtener un rango de prioridades para la política de "
+"planificación %d."
+
+#: ../src/unix/utilsunx.cpp:988
+msgid "Cannot get the hostname"
+msgstr "No se puede obtener el nombre de la máquina (hostname)"
+
+#: ../src/unix/utilsunx.cpp:1024
+msgid "Cannot get the official hostname"
+msgstr "No se puede obtener el nombre oficial de la máquina (hostname)"
+
+#: ../src/msw/dialup.cpp:949
+msgid "Cannot hang up - no active dialup connection."
+msgstr "No se puede colgar - no hay conexiones activas."
+
+#: ../include/wx/msw/ole/oleutils.h:52
+msgid "Cannot initialize OLE"
+msgstr "No se puede inicializar OLE"
+
+#: ../src/common/socket.cpp:847
+#, fuzzy
+msgid "Cannot initialize sockets"
+msgstr "No se puede inicializar OLE"
+
+#: ../src/msw/volume.cpp:620
+#, c-format
+msgid "Cannot load icon from '%s'."
+msgstr "No se puede cargar el icono de '%s'."
+
+#: ../src/xrc/xmlres.cpp:361
+#, fuzzy, c-format
+msgid "Cannot load resources from '%s'."
+msgstr "No puede cargar el archivo de recursos %s."
+
+#: ../src/xrc/xmlres.cpp:746
+#, c-format
+msgid "Cannot load resources from file '%s'."
+msgstr "No puede cargar el archivo de recursos %s."
+
+#: ../src/html/htmlfilt.cpp:137
+#, c-format
+msgid "Cannot open HTML document: %s"
+msgstr "No se puede abrir el documento HTML: %s"
+
+#: ../src/html/helpdata.cpp:665
+#, c-format
+msgid "Cannot open HTML help book: %s"
+msgstr "No se puede abrir el libro de ayuda HTML: %s"
+
+#: ../src/html/helpdata.cpp:297
+#, c-format
+msgid "Cannot open contents file: %s"
+msgstr "No se puede abrir el archivo de contenidos: %s"
+
+#: ../src/generic/dcpsg.cpp:1751
+msgid "Cannot open file for PostScript printing!"
+msgstr "¡No se puede abrir el archivo para impresión PostScript!"
+
+#: ../src/html/helpdata.cpp:311
+#, c-format
+msgid "Cannot open index file: %s"
+msgstr "No se puede abrir el archivo índice: %s"
+
+#: ../src/xrc/xmlres.cpp:728
+#, fuzzy, c-format
+msgid "Cannot open resources file '%s'."
+msgstr "No puede cargar el archivo de recursos %s."
+
+#: ../src/html/helpwnd.cpp:1537
+msgid "Cannot print empty page."
+msgstr "No se puede imprimir una página vacía."
+
+#: ../src/msw/volume.cpp:507
+#, c-format
+msgid "Cannot read typename from '%s'!"
+msgstr "¡No se puede leer tipo desde '%s'!"
+
+#: ../src/os2/thread.cpp:527
+#, c-format
+msgid "Cannot resume thread %lu"
+msgstr "No se puede continuar el hilo de ejecución %lu"
+
+#: ../src/msw/thread.cpp:923
+#, fuzzy, c-format
+msgid "Cannot resume thread %lx"
+msgstr "No se puede continuar hilo de ejecución %x"
+
+#: ../src/unix/threadpsx.cpp:1011
+msgid "Cannot retrieve thread scheduling policy."
+msgstr ""
+"No se puede recuperar la política de planificación de hilos de ejecución."
+
+#: ../src/common/intl.cpp:542
+#, c-format
+msgid "Cannot set locale to language \"%s\"."
+msgstr ""
+
+#: ../src/unix/threadpsx.cpp:831 ../src/msw/thread.cpp:569
+msgid "Cannot start thread: error writing TLS."
+msgstr "No se puede empezar el hilo de ejecución: error al escribir TLS."
+
+#: ../src/os2/thread.cpp:513
+#, c-format
+msgid "Cannot suspend thread %lu"
+msgstr "No se puede suspender el hilo de ejecución %lu"
+
+#: ../src/msw/thread.cpp:907
+#, fuzzy, c-format
+msgid "Cannot suspend thread %lx"
+msgstr "No se puede suspender el hilo de ejecución %x"
+
+#: ../src/msw/thread.cpp:830
+msgid "Cannot wait for thread termination"
+msgstr "No se puede esperar a la finalización del hilo de ejecución"
+
+#: ../src/html/helpwnd.cpp:546
+msgid "Case sensitive"
+msgstr "Sensible a May/Min"
+
+#: ../src/propgrid/manager.cpp:1495
+msgid "Categorized Mode"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:9347
+#, fuzzy
+msgid "Cell Properties"
+msgstr "&Propiedades"
+
+#: ../src/common/fmapbase.cpp:161
+msgid "Celtic (ISO-8859-14)"
+msgstr "Celtic (ISO-8859-14)"
+
+#: ../src/richtext/richtextindentspage.cpp:160
+#: ../src/richtext/richtextliststylepage.cpp:349
+msgid "Cen&tred"
+msgstr "Cen&trado"
+
+#: ../src/common/stockitem.cpp:170
+msgid "Centered"
+msgstr "Centrado"
+
+#: ../src/common/fmapbase.cpp:149
+msgid "Central European (ISO-8859-2)"
+msgstr "Europa Central (ISO-8859-2)"
+
+#: ../src/richtext/richtextliststylepage.cpp:250
+#: ../src/richtext/richtextbulletspage.cpp:200
+msgid "Centre"
+msgstr "Centrar"
+
+#: ../src/richtext/richtextindentspage.cpp:162
+#: ../src/richtext/richtextindentspage.cpp:164
+#: ../src/richtext/richtextliststylepage.cpp:351
+#: ../src/richtext/richtextliststylepage.cpp:353
+msgid "Centre text."
+msgstr "Texto centrado."
+
+#: ../src/richtext/richtextsizepage.cpp:287
+#, fuzzy
+msgid "Centred"
+msgstr "Cen&trado"
+
+#: ../src/richtext/richtextliststylepage.cpp:280
+#: ../src/richtext/richtextbulletspage.cpp:232
+msgid "Ch&oose..."
+msgstr "&Elegir..."
+
+#: ../src/richtext/richtextbuffer.cpp:4041
+msgid "Change List Style"
+msgstr "Cambiar Estilo de Lista"
+
+#: ../src/richtext/richtextbuffer.cpp:3392
+#, fuzzy
+msgid "Change Object Style"
+msgstr "Cambiar Estilo de Lista"
+
+#: ../src/richtext/richtextbuffer.cpp:3658
+#: ../src/richtext/richtextbuffer.cpp:7749
+#, fuzzy
+msgid "Change Properties"
+msgstr "&Propiedades"
+
+#: ../src/richtext/richtextbuffer.cpp:3209
+msgid "Change Style"
+msgstr "Cambiar Estilo"
+
+#: ../src/common/fileconf.cpp:372
+#, c-format
+msgid "Changes won't be saved to avoid overwriting the existing file \"%s\""
+msgstr ""
+
+#: ../src/richtext/richtextstyles.cpp:1059
+msgid "Character styles"
+msgstr "Estilos de caracter"
+
+#: ../src/richtext/richtextliststylepage.cpp:224
+#: ../src/richtext/richtextliststylepage.cpp:226
+#: ../src/richtext/richtextbulletspage.cpp:174
+#: ../src/richtext/richtextbulletspage.cpp:176
+msgid "Check to add a period after the bullet."
+msgstr "Marcar para añadir un punto después de la viñeta."
+
+#: ../src/richtext/richtextliststylepage.cpp:238
+#: ../src/richtext/richtextliststylepage.cpp:240
+#: ../src/richtext/richtextbulletspage.cpp:188
+#: ../src/richtext/richtextbulletspage.cpp:190
+msgid "Check to add a right parenthesis."
+msgstr "Marcar para añadir un paréntesis derecho."
+
+#: ../src/richtext/richtextliststylepage.cpp:231
+#: ../src/richtext/richtextliststylepage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:181
+#: ../src/richtext/richtextbulletspage.cpp:183
+msgid "Check to enclose the bullet in parentheses."
+msgstr "Marcar para encerrar la viñeta entre paréntesis."
+
+#: ../src/osx/carbon/fontdlg.cpp:542 ../src/osx/carbon/fontdlg.cpp:544
+msgid "Check to make the font bold."
+msgstr "Marcar para establecer la fuente negrita."
+
+#: ../src/osx/carbon/fontdlg.cpp:549 ../src/osx/carbon/fontdlg.cpp:551
+msgid "Check to make the font italic."
+msgstr "Marcar para establecer la fuente cursiva."
+
+#: ../src/osx/carbon/fontdlg.cpp:558 ../src/osx/carbon/fontdlg.cpp:560
+msgid "Check to make the font underlined."
+msgstr "Marcar para establecer la fuente subrayada."
+
+#: ../src/richtext/richtextstyledlg.cpp:289
+#: ../src/richtext/richtextstyledlg.cpp:291
+msgid "Check to restart numbering."
+msgstr "Marcar para reiniciar numeración"
+
+#: ../src/richtext/richtextfontpage.cpp:286
+#: ../src/richtext/richtextfontpage.cpp:288
+#, fuzzy
+msgid "Check to show a line through the text."
+msgstr "Marcar para añadir un punto después de la viñeta."
+
+#: ../src/richtext/richtextfontpage.cpp:293
+#: ../src/richtext/richtextfontpage.cpp:295
+#, fuzzy
+msgid "Check to show the text in capitals."
+msgstr "Marcar para establecer la fuente cursiva."
+
+#: ../src/richtext/richtextfontpage.cpp:300
+#: ../src/richtext/richtextfontpage.cpp:302
+#, fuzzy
+msgid "Check to show the text in small capitals."
+msgstr "Marcar para establecer la fuente cursiva."
+
+#: ../src/richtext/richtextfontpage.cpp:314
+#: ../src/richtext/richtextfontpage.cpp:316
+#, fuzzy
+msgid "Check to show the text in subscript."
+msgstr "Haga clic para cambiar el color del texto."
+
+#: ../src/richtext/richtextfontpage.cpp:307
+#: ../src/richtext/richtextfontpage.cpp:309
+#, fuzzy
+msgid "Check to show the text in superscript."
+msgstr "Marcar para encerrar la viñeta entre paréntesis."
+
+#: ../src/msw/dialup.cpp:784
+msgid "Choose ISP to dial"
+msgstr "Elegir ISP al que conectar"
+
+#: ../src/propgrid/props.cpp:1643
+#, fuzzy
+msgid "Choose a directory:"
+msgstr "Crear directorio"
+
+#: ../src/propgrid/props.cpp:1702
+#, fuzzy
+msgid "Choose a file"
+msgstr "Elegir fuente"
+
+#: ../src/generic/colrdlgg.cpp:144 ../src/gtk/colordlg.cpp:63
+msgid "Choose colour"
+msgstr "Elegir color"
+
+#: ../src/generic/fontpickerg.cpp:50 ../src/gtk/fontdlg.cpp:75
+#: ../src/gtk1/fontdlg.cpp:125
+msgid "Choose font"
+msgstr "Elegir fuente"
+
+#: ../src/common/module.cpp:74
+#, c-format
+msgid "Circular dependency involving module \"%s\" detected."
+msgstr "Se ha detectado dependencia circular concerniente al módulo \"%s\"."
+
+#: ../src/aui/tabmdi.cpp:108 ../src/generic/mdig.cpp:97
+msgid "Cl&ose"
+msgstr "&Cerrar"
+
+#: ../src/msw/ole/automtn.cpp:673
+#, fuzzy
+msgid "Class not registered."
+msgstr "No se puede crear el hilo de ejecución"
+
+#: ../src/common/stockitem.cpp:147
+#, fuzzy
+msgid "Clear"
+msgstr "&Limpiar"
+
+#: ../src/generic/logg.cpp:520
+msgid "Clear the log contents"
+msgstr "Eliminar los contenidos del log"
+
+#: ../src/richtext/richtextstyledlg.cpp:252
+#: ../src/richtext/richtextstyledlg.cpp:254
+msgid "Click to apply the selected style."
+msgstr "Haga clic para aplicar el estilo seleccionado."
+
+#: ../src/richtext/richtextliststylepage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:283
+#: ../src/richtext/richtextbulletspage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:235
+msgid "Click to browse for a symbol."
+msgstr "Haga click para buscar un símbolo."
+
+#: ../src/osx/carbon/fontdlg.cpp:589 ../src/osx/carbon/fontdlg.cpp:591
+msgid "Click to cancel changes to the font."
+msgstr "Haga clic para cancelar los cambios a la fuente."
+
+#: ../src/generic/fontdlgg.cpp:472 ../src/generic/fontdlgg.cpp:491
+msgid "Click to cancel the font selection."
+msgstr "Haga clic para cancelar selección de fuente"
+
+#: ../src/osx/carbon/fontdlg.cpp:570 ../src/osx/carbon/fontdlg.cpp:572
+msgid "Click to change the font colour."
+msgstr "Haga clic para cambiar el color de la fuente."
+
+#: ../src/richtext/richtextfontpage.cpp:276
+#: ../src/richtext/richtextfontpage.cpp:278
+#, fuzzy
+msgid "Click to change the text background colour."
+msgstr "Haga clic para cambiar el color del texto."
+
+#: ../src/richtext/richtextfontpage.cpp:263
+#: ../src/richtext/richtextfontpage.cpp:265
+msgid "Click to change the text colour."
+msgstr "Haga clic para cambiar el color del texto."
+
+#: ../src/richtext/richtextliststylepage.cpp:195
+#: ../src/richtext/richtextliststylepage.cpp:197
+msgid "Click to choose the font for this level."
+msgstr "Haga clic para elegir la fuente para este nivel."
+
+#: ../src/richtext/richtextstyledlg.cpp:279
+#: ../src/richtext/richtextstyledlg.cpp:281
+msgid "Click to close this window."
+msgstr "Haga clic para cerrar esta ventana."
+
+#: ../src/osx/carbon/fontdlg.cpp:596 ../src/osx/carbon/fontdlg.cpp:598
+msgid "Click to confirm changes to the font."
+msgstr "Haga clic para confirmar los cambios a la fuente."
+
+#: ../src/generic/fontdlgg.cpp:477 ../src/generic/fontdlgg.cpp:479
+#: ../src/generic/fontdlgg.cpp:484 ../src/generic/fontdlgg.cpp:486
+msgid "Click to confirm the font selection."
+msgstr "Haga clic para confirmar la selección de fuente"
+
+#: ../src/richtext/richtextstyledlg.cpp:244
+#: ../src/richtext/richtextstyledlg.cpp:246
+#, fuzzy
+msgid "Click to create a new box style."
+msgstr "Haga clic para carear una nueva lista de estilo."
+
+#: ../src/richtext/richtextstyledlg.cpp:226
+#: ../src/richtext/richtextstyledlg.cpp:228
+msgid "Click to create a new character style."
+msgstr "Haga click para crear un nuevo estilo de caracter."
+
+#: ../src/richtext/richtextstyledlg.cpp:238
+#: ../src/richtext/richtextstyledlg.cpp:240
+msgid "Click to create a new list style."
+msgstr "Haga clic para carear una nueva lista de estilo."
+
+#: ../src/richtext/richtextstyledlg.cpp:232
+#: ../src/richtext/richtextstyledlg.cpp:234
+msgid "Click to create a new paragraph style."
+msgstr "Haga click para crear un nuevo estilo de párrafo."
+
+#: ../src/richtext/richtexttabspage.cpp:137
+#: ../src/richtext/richtexttabspage.cpp:139
+msgid "Click to create a new tab position."
+msgstr "Haga clic para crear una nueva posición de tabulador."
+
+#: ../src/richtext/richtexttabspage.cpp:149
+#: ../src/richtext/richtexttabspage.cpp:151
+msgid "Click to delete all tab positions."
+msgstr "Haga clic para borrar todas las posiciones de tabulador."
+
+#: ../src/richtext/richtextstyledlg.cpp:270
+#: ../src/richtext/richtextstyledlg.cpp:272
+msgid "Click to delete the selected style."
+msgstr "Haga clic para borrar el estilo seleccionado."
+
+#: ../src/richtext/richtexttabspage.cpp:143
+#: ../src/richtext/richtexttabspage.cpp:145
+msgid "Click to delete the selected tab position."
+msgstr "Haga clic para borrar la posición de tabulador seleccionada."
+
+#: ../src/richtext/richtextstyledlg.cpp:264
+#: ../src/richtext/richtextstyledlg.cpp:266
+msgid "Click to edit the selected style."
+msgstr "Haga clic para editar el estilo seleccionado."
+
+#: ../src/richtext/richtextstyledlg.cpp:258
+#: ../src/richtext/richtextstyledlg.cpp:260
+msgid "Click to rename the selected style."
+msgstr "Haga clic para renombrar el estilo seleccionado."
+
+#: ../src/generic/dbgrptg.cpp:97 ../src/generic/progdlgg.cpp:804
+#: ../src/generic/progdlgg.cpp:809 ../src/richtext/richtextstyledlg.cpp:277
+#: ../src/richtext/richtextsymboldlg.cpp:476 ../src/common/stockitem.cpp:148
+#: ../src/msw/progdlg.cpp:170 ../src/msw/progdlg.cpp:679
+#: ../src/html/helpdlg.cpp:90
+msgid "Close"
+msgstr "Cerrar"
+
+#: ../src/aui/tabmdi.cpp:109 ../src/generic/mdig.cpp:98
+msgid "Close All"
+msgstr "Cerrar Todo"
+
+#: ../src/common/stockitem.cpp:266
+msgid "Close current document"
+msgstr "Cerrar documento actual."
+
+#: ../src/generic/logg.cpp:522
+msgid "Close this window"
+msgstr "Cerrar esta ventana"
+
+#: ../src/common/stockitem.cpp:193
+#, fuzzy
+msgid "Color"
+msgstr "Color:"
+
+#: ../src/richtext/richtextformatdlg.cpp:725
+#, fuzzy
+msgid "Colour"
+msgstr "Color:"
+
+#: ../src/msw/colordlg.cpp:156
+#, fuzzy, c-format
+msgid "Colour selection dialog failed with error %0lx."
+msgstr "Falló la ejecución del comando '%s' con el error: %ul"
+
+#: ../src/osx/carbon/fontdlg.cpp:566
+msgid "Colour:"
+msgstr "Color:"
+
+#: ../src/osx/carbon/dataview.cpp:900
+#, fuzzy
+msgid "Column could not be added."
+msgstr "No se pudo abrir el archivo."
+
+#: ../src/osx/carbon/dataview.cpp:899
+msgid "Column description could not be initialized."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1538 ../src/osx/carbon/dataview.cpp:1559
+#, fuzzy
+msgid "Column index not found."
+msgstr "Archivo de ayuda \"%s\" no encontrado."
+
+#: ../src/osx/carbon/dataview.cpp:1614
+msgid "Column width could not be determined"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:901
+msgid "Column width could not be set."
+msgstr ""
+
+#: ../src/common/init.cpp:188
+#, c-format
+msgid ""
+"Command line argument %d couldn't be converted to Unicode and will be "
+"ignored."
+msgstr ""
+
+#: ../src/msw/fontdlg.cpp:119
+#, fuzzy, c-format
+msgid "Common dialog failed with error code %0lx."
+msgstr "Falló la ejecución del comando '%s' con el error: %ul"
+
+#: ../src/gtk/window.cpp:4306
+msgid ""
+"Compositing not supported by this system, please enable it in your Window "
+"Manager."
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:1554
+msgid "Compressed HTML Help file (*.chm)|*.chm|"
+msgstr "Archivo de ayuda HTML comprimido (*.chm)|*.chm|"
+
+#: ../src/generic/dirctrlg.cpp:544
+msgid "Computer"
+msgstr "Ordenador"
+
+#: ../src/common/fileconf.cpp:965
+#, c-format
+msgid "Config entry name cannot start with '%c'."
+msgstr "Un nombre de entrada de configuracón no puede empezar por '%c'."
+
+#: ../src/gtk/filedlg.cpp:59
+msgid "Confirm"
+msgstr "Confirmar"
+
+#: ../src/msw/mimetype.cpp:739
+msgid "Confirm registry update"
+msgstr "Confirmar actualización del registro"
+
+#: ../src/html/htmlwin.cpp:544
+msgid "Connecting..."
+msgstr "Conectando..."
+
+#: ../src/html/helpwnd.cpp:482
+msgid "Contents"
+msgstr "Contenidos"
+
+#: ../src/common/strconv.cpp:2261
+#, c-format
+msgid "Conversion to charset '%s' doesn't work."
+msgstr "Conversión a juego de caracteres '%s' no funciona."
+
+#: ../src/common/stockitem.cpp:149
+#, fuzzy
+msgid "Convert"
+msgstr "Contenidos"
+
+#: ../src/html/htmlwin.cpp:1057
+#, c-format
+msgid "Copied to clipboard:\"%s\""
+msgstr "Copiado en el portapapeles:\"%s\""
+
+#: ../src/generic/prntdlgg.cpp:247
+msgid "Copies:"
+msgstr "Copias:"
+
+#: ../src/common/stockitem.cpp:150 ../src/stc/stc_i18n.cpp:18
+#, fuzzy
+msgid "Copy"
+msgstr "&Copiar"
+
+#: ../src/common/stockitem.cpp:258
+msgid "Copy selection"
+msgstr "Copiar selección"
+
+#: ../src/html/chm.cpp:718
+#, c-format
+msgid "Could not create temporary file '%s'"
+msgstr "No se puedo crear el archivo temporal '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:1285 ../src/osx/carbon/dataview.cpp:1672
+#, fuzzy
+msgid "Could not determine column index."
+msgstr "No puede iniciarse la previsualización del documento."
+
+#: ../src/osx/carbon/dataview.cpp:876
+msgid "Could not determine column's position"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:843
+#, fuzzy
+msgid "Could not determine number of columns."
+msgstr "No puede encontrarse el archivo de inclusión de recursos %s."
+
+#: ../src/osx/carbon/dataview.cpp:975
+#, fuzzy
+msgid "Could not determine number of items"
+msgstr "No puede encontrarse el archivo de inclusión de recursos %s."
+
+#: ../src/html/chm.cpp:273
+#, c-format
+msgid "Could not extract %s into %s: %s"
+msgstr "No se pudo extraer %s en %s: %s"
+
+#: ../src/generic/tabg.cpp:1048
+msgid "Could not find tab for id"
+msgstr "No se puede encontrar pestaña para id"
+
+#: ../src/osx/carbon/dataview.cpp:2556 ../src/osx/carbon/dataview.cpp:2591
+#: ../src/osx/carbon/dataview.cpp:2615 ../src/osx/carbon/dataview.cpp:2636
+#: ../src/osx/carbon/dataview.cpp:2773
+#, fuzzy
+msgid "Could not get header description."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/osx/carbon/dataview.cpp:1169 ../src/osx/carbon/dataview.cpp:1195
+#, fuzzy
+msgid "Could not get items."
+msgstr "No se pudo encontrar el archivo '%s'."
+
+#: ../src/osx/carbon/dataview.cpp:2659 ../src/osx/carbon/dataview.cpp:2724
+#, fuzzy
+msgid "Could not get property flags."
+msgstr "No se puedo crear el archivo temporal '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:726
+#, fuzzy
+msgid "Could not get selected items."
+msgstr "No se pudo encontrar el archivo '%s'."
+
+#: ../src/html/chm.cpp:444
+#, c-format
+msgid "Could not locate file '%s'."
+msgstr "No se pudo encontrar el archivo '%s'."
+
+#: ../src/osx/carbon/dataview.cpp:845
+#, fuzzy
+msgid "Could not remove column."
+msgstr "No se puedo crear el cursor."
+
+#: ../src/osx/carbon/dataview.cpp:642
+#, fuzzy
+msgid "Could not retrieve number of items"
+msgstr "No se puedo crear el archivo temporal '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:2572
+#, fuzzy
+msgid "Could not set alignment."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/osx/carbon/dataview.cpp:2803
+#, fuzzy
+msgid "Could not set column width."
+msgstr "No puede iniciarse la previsualización del documento."
+
+#: ../src/common/filefn.cpp:1569
+#, fuzzy
+msgid "Could not set current working directory"
+msgstr "Error al obtener el directorio de trabajo"
+
+#: ../src/osx/carbon/dataview.cpp:2775
+#, fuzzy
+msgid "Could not set header description."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/osx/carbon/dataview.cpp:2596
+#, fuzzy
+msgid "Could not set icon."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/osx/carbon/dataview.cpp:2617
+#, fuzzy
+msgid "Could not set maximum width."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/osx/carbon/dataview.cpp:2638
+#, fuzzy
+msgid "Could not set minimum width."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/osx/carbon/dataview.cpp:2664 ../src/osx/carbon/dataview.cpp:2729
+#, fuzzy
+msgid "Could not set property flags."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/common/prntbase.cpp:1985
+msgid "Could not start document preview."
+msgstr "No puede iniciarse la previsualización del documento."
+
+#: ../src/generic/printps.cpp:178 ../src/msw/printwin.cpp:210
+#: ../src/gtk/print.cpp:1077
+msgid "Could not start printing."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/common/wincmn.cpp:2131
+msgid "Could not transfer data to window"
+msgstr "No puede transferir datos a la ventana"
+
+#: ../src/os2/thread.cpp:160
+msgid "Couldn't acquire a mutex lock"
+msgstr "No se pudo adquirir un bloqueo de mutex"
+
+#: ../src/msw/imaglist.cpp:166 ../src/msw/imaglist.cpp:197
+#: ../src/msw/imaglist.cpp:209 ../src/msw/dragimag.cpp:193
+#: ../src/msw/dragimag.cpp:232
+msgid "Couldn't add an image to the image list."
+msgstr "No se puede añadir imagen a lista de imagenes."
+
+#: ../src/msw/timer.cpp:134 ../src/os2/timer.cpp:113
+msgid "Couldn't create a timer"
+msgstr "No se puede crear un temporizador"
+
+#: ../src/osx/carbon/overlay.cpp:122
+msgid "Couldn't create the overlay window"
+msgstr "No se pudo crear la ventana de superposición"
+
+#: ../src/common/translation.cpp:2015
+#, fuzzy
+msgid "Couldn't enumerate translations"
+msgstr "No se puedo finalizar el hilo de ejecución"
+
+#: ../src/common/dynlib.cpp:152
+#, c-format
+msgid "Couldn't find symbol '%s' in a dynamic library"
+msgstr "No se pudo encontrar el símbolo '%s' en la librería dinámica"
+
+#: ../src/gtk/print.cpp:2014
+msgid "Couldn't get hatch style from wxBrush."
+msgstr ""
+
+#: ../src/msw/thread.cpp:950
+msgid "Couldn't get the current thread pointer"
+msgstr "No se pudo obtener el puntero al hilo de ejecución actual"
+
+#: ../src/osx/carbon/overlay.cpp:129
+msgid "Couldn't init the context on the overlay window"
+msgstr "No se pudo inicializar el contexto en la ventana de superposición"
+
+#: ../src/common/imaggif.cpp:263
+#, fuzzy
+msgid "Couldn't initialize GIF hash table."
+msgstr "No se puede inicializar el flujo de compresión de zlib."
+
+#: ../src/common/imagpng.cpp:657
+msgid "Couldn't load a PNG image - file is corrupted or not enough memory."
+msgstr ""
+"No se pudo abrir imagen PNG - el archivo está corrupto o no hay suficiente "
+"memoria."
+
+#: ../src/unix/sound.cpp:470
+#, c-format
+msgid "Couldn't load sound data from '%s'."
+msgstr "No se pudieron cargar los datos de sonido desde '%s'."
+
+#: ../src/msw/dirdlg.cpp:441
+#, fuzzy
+msgid "Couldn't obtain folder name"
+msgstr "No se puede crear un temporizador"
+
+#: ../src/unix/sound_sdl.cpp:229
+#, c-format
+msgid "Couldn't open audio: %s"
+msgstr "No se pudo abrir el dispositivo de sonido '%s'"
+
+#: ../src/msw/ole/dataobj.cpp:350
+#, c-format
+msgid "Couldn't register clipboard format '%s'."
+msgstr "No se puede registrar formato de portapapeles '%s'"
+
+#: ../src/os2/thread.cpp:177
+msgid "Couldn't release a mutex"
+msgstr "No se pudo liberar un mutex"
+
+#: ../src/msw/listctrl.cpp:756
+#, c-format
+msgid "Couldn't retrieve information about list control item %d."
+msgstr "No se puede recuperar información sobre el elemento %d de la lista."
+
+#: ../src/common/imagpng.cpp:746 ../src/common/imagpng.cpp:757
+#: ../src/common/imagpng.cpp:767
+msgid "Couldn't save PNG image."
+msgstr "No se puede guardar la imagen PNG."
+
+#: ../src/msw/thread.cpp:715
+msgid "Couldn't terminate thread"
+msgstr "No se puedo finalizar el hilo de ejecución"
+
+#: ../src/common/xtistrm.cpp:170
+#, fuzzy, c-format
+msgid "Create Parameter %s not found in declared RTTI Parameters"
+msgstr ""
+"No se encontró el parámetro de creación en los parámetros RTTI declarados"
+
+#: ../src/generic/dirdlgg.cpp:317
+msgid "Create directory"
+msgstr "Crear directorio"
+
+#: ../src/generic/filedlgg.cpp:228 ../src/generic/dirdlgg.cpp:131
+msgid "Create new directory"
+msgstr "Crear nuevo directorio"
+
+#: ../src/common/accelcmn.cpp:322
+#, fuzzy
+msgid "Ctrl+"
+msgstr "Ctrl-"
+
+#: ../src/richtext/richtextctrl.cpp:325 ../src/osx/textctrl_osx.cpp:582
+#: ../src/common/stockitem.cpp:151 ../src/msw/textctrl.cpp:2283
+msgid "Cu&t"
+msgstr "&Cortar"
+
+#: ../src/generic/filectrlg.cpp:956
+msgid "Current directory:"
+msgstr "Directorio actual:"
+
+#: ../src/gtk/print.cpp:759
+#, fuzzy
+msgid "Custom size"
+msgstr "tamaño de fuente"
+
+#: ../src/common/headerctrlcmn.cpp:60
+#, fuzzy
+msgid "Customize Columns"
+msgstr "tamaño de fuente"
+
+#: ../src/common/stockitem.cpp:151 ../src/stc/stc_i18n.cpp:17
+#, fuzzy
+msgid "Cut"
+msgstr "&Cortar"
+
+#: ../src/common/stockitem.cpp:259
+msgid "Cut selection"
+msgstr "Cortar selección"
+
+#: ../src/common/fmapbase.cpp:152
+msgid "Cyrillic (ISO-8859-5)"
+msgstr "Cirílico (ISO-8859-14)"
+
+#: ../src/common/paper.cpp:100
+msgid "D sheet, 22 x 34 in"
+msgstr "Hoja D, 22 x 34 in"
+
+#: ../src/msw/dde.cpp:708
+msgid "DDE poke request failed"
+msgstr "Fallo en la petición de rastreo DDE"
+
+#: ../src/common/accelcmn.cpp:79
+msgid "DECIMAL"
+msgstr "DECIMAL"
+
+#: ../src/common/accelcmn.cpp:47
+msgid "DEL"
+msgstr "BORR"
+
+#: ../src/common/accelcmn.cpp:48
+msgid "DELETE"
+msgstr "BORRAR"
+
+#: ../src/common/imagbmp.cpp:1092
+msgid "DIB Header: Encoding doesn't match bitdepth."
+msgstr "Cabecera DIB: La codificación no coincide con la profundidad de bits."
+
+#: ../src/common/imagbmp.cpp:1040
+msgid "DIB Header: Image height > 32767 pixels for file."
+msgstr "Cabecera DIB: Altura de la imagen > 32767 pixels por archivo."
+
+#: ../src/common/imagbmp.cpp:1032
+msgid "DIB Header: Image width > 32767 pixels for file."
+msgstr "Cabecera DIB: Anchura de imagen > 32767 pixels por archivo."
+
+#: ../src/common/imagbmp.cpp:1060
+msgid "DIB Header: Unknown bitdepth in file."
+msgstr "Cabecera DIB: Profundidad de color desconocida en archivo."
+
+#: ../src/common/imagbmp.cpp:1074
+msgid "DIB Header: Unknown encoding in file."
+msgstr "Cabecera DIB: Codificación desconocida en archivo."
+
+#: ../src/common/accelcmn.cpp:80
+msgid "DIVIDE"
+msgstr "DIVIDE"
+
+#: ../src/common/paper.cpp:122
+msgid "DL Envelope, 110 x 220 mm"
+msgstr "Sobre DL, 110 x 220 mm"
+
+#: ../src/common/accelcmn.cpp:59
+msgid "DOWN"
+msgstr "ABAJO"
+
+#: ../src/richtext/richtextborderspage.cpp:545
+msgid "Dashed"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1921
+msgid "Data object has invalid data format"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:2491
+msgid "Date renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:300
+#, c-format
+msgid "Debug report \"%s\""
+msgstr "Informe de depuración \"%s\""
+
+#: ../src/common/debugrpt.cpp:210
+msgid "Debug report couldn't be created."
+msgstr "El informe de depuración no pudo crearse."
+
+#: ../src/common/debugrpt.cpp:558
+msgid "Debug report generation has failed."
+msgstr "No se pudo crear el informe de depuración."
+
+#: ../src/generic/fontdlgg.cpp:323
+msgid "Decorative"
+msgstr "Decorative"
+
+#: ../src/common/fmapbase.cpp:796
+msgid "Default encoding"
+msgstr "Codificación predeterminada"
+
+#: ../src/dfb/fontmgr.cpp:180
+#, fuzzy
+msgid "Default font"
+msgstr "Impresora predeterminada"
+
+#: ../src/generic/prntdlgg.cpp:510
+msgid "Default printer"
+msgstr "Impresora predeterminada"
+
+#: ../src/richtext/richtextbuffer.cpp:7841 ../src/common/stockitem.cpp:152
+#: ../src/stc/stc_i18n.cpp:20
+msgid "Delete"
+msgstr "Eliminar"
+
+#: ../src/richtext/richtexttabspage.cpp:148
+msgid "Delete A&ll"
+msgstr "Eliminar &Todo"
+
+#: ../src/richtext/richtextbuffer.cpp:10637
+#, fuzzy
+msgid "Delete Column"
+msgstr "Borrar selección"
+
+#: ../src/richtext/richtextbuffer.cpp:10587
+#, fuzzy
+msgid "Delete Row"
+msgstr "Eliminar"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+msgid "Delete Style"
+msgstr "Eliminar Estilo"
+
+#: ../src/richtext/richtextctrl.cpp:1231 ../src/richtext/richtextctrl.cpp:1452
+msgid "Delete Text"
+msgstr "Eliminar Texto"
+
+#: ../src/generic/editlbox.cpp:274
+msgid "Delete item"
+msgstr "&Eliminar elemento"
+
+#: ../src/common/stockitem.cpp:260
+msgid "Delete selection"
+msgstr "Borrar selección"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+#, c-format
+msgid "Delete style %s?"
+msgstr "¿Eliminar estilo %s?"
+
+#: ../src/unix/snglinst.cpp:295
+#, c-format
+msgid "Deleted stale lock file '%s'."
+msgstr "Archivo antiguo de bloqueo '%s' eliminado."
+
+#: ../src/common/module.cpp:124
+#, c-format
+msgid "Dependency \"%s\" of module \"%s\" doesn't exist."
+msgstr "No existe la dependencia \"%s\" de módulo \"%s\"."
+
+#: ../src/common/stockitem.cpp:196
+#, fuzzy
+msgid "Descending"
+msgstr "Codificación predeterminada"
+
+#: ../src/generic/dirctrlg.cpp:626
+msgid "Desktop"
+msgstr "Escritorio"
+
+#: ../src/generic/aboutdlgg.cpp:70
+msgid "Developed by "
+msgstr "Programado por"
+
+#: ../src/generic/aboutdlgg.cpp:176
+#, fuzzy
+msgid "Developers"
+msgstr "Programado por"
+
+#: ../src/msw/dialup.cpp:393
+msgid ""
+"Dial up functions are unavailable because the remote access service (RAS) is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Las funciones de marcado no están disponibles porque los servicios de acceso "
+"remoto (RAS) no están instalados. Por favor instálelos."
+
+#: ../src/generic/tipdlg.cpp:230
+msgid "Did you know..."
+msgstr "¿Sabías que...?"
+
+#: ../src/dfb/wrapdfb.cpp:63
+#, fuzzy, c-format
+msgid "DirectFB error %d occurred."
+msgstr "Ha ocurrido un error DirectFB %d."
+
+#: ../src/motif/filedlg.cpp:219
+msgid "Directories"
+msgstr "Directorios"
+
+#: ../src/common/filefn.cpp:1251
+#, c-format
+msgid "Directory '%s' couldn't be created"
+msgstr "No pudo crearse directorio '%s'"
+
+#: ../src/common/filefn.cpp:1271
+#, fuzzy, c-format
+msgid "Directory '%s' couldn't be deleted"
+msgstr "No pudo crearse directorio '%s'"
+
+#: ../src/generic/dirdlgg.cpp:233
+msgid "Directory does not exist"
+msgstr "El directorio no existe"
+
+#: ../src/generic/filectrlg.cpp:1412
+msgid "Directory doesn't exist."
+msgstr "El directorio no existe"
+
+#: ../src/common/docview.cpp:455
+msgid "Discard changes and reload the last saved version?"
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:512
+msgid ""
+"Display all index items that contain given substring. Search is case "
+"insensitive."
+msgstr ""
+"Mostrar todos los elementos del índice que contengan la subcadena dada. La "
+"búsqueda es Insensitiva."
+
+#: ../src/html/helpwnd.cpp:692
+msgid "Display options dialog"
+msgstr "Mostrar el diálogo de opciones"
+
+#: ../src/html/helpwnd.cpp:326
+msgid "Displays help as you browse the books on the left."
+msgstr "Muestra la ayuda con el navegador de libros a la izquierda."
+
+#: ../src/msw/mimetype.cpp:732
+msgid ""
+"Do you want to overwrite the command used to %s files with extension \"%s"
+"\" ?\n"
+"Current value is \n"
+"%s, \n"
+"New value is \n"
+"%s %1"
+msgstr ""
+"¿Quiere sobreescribir el comando usado en archivos %s con la extensión \"%s"
+"\"?\n"
+"Valor actual es \n"
+"%s, \n"
+"Nuevo valor es \n"
+"%s %1"
+
+#: ../src/common/docview.cpp:531
+#, fuzzy, c-format
+msgid "Do you want to save changes to %s?"
+msgstr "¿Desea guardar los cambios hechos al documento %s?"
+
+#: ../src/common/prntbase.cpp:525
+#, fuzzy
+msgid "Document:"
+msgstr "Documentación por "
+
+#: ../src/generic/aboutdlgg.cpp:73
+msgid "Documentation by "
+msgstr "Documentación por "
+
+#: ../src/generic/aboutdlgg.cpp:180
+#, fuzzy
+msgid "Documentation writers"
+msgstr "Documentación por "
+
+#: ../src/common/sizer.cpp:2680
+msgid "Don't Save"
+msgstr "No guardar"
+
+#: ../src/msw/frame.cpp:122 ../src/html/htmlwin.cpp:611
+msgid "Done"
+msgstr "Hecho"
+
+#: ../src/generic/progdlgg.cpp:481 ../src/msw/progdlg.cpp:407
+msgid "Done."
+msgstr "Hecho."
+
+#: ../src/richtext/richtextborderspage.cpp:544
+#, fuzzy
+msgid "Dotted"
+msgstr "Hecho"
+
+#: ../src/richtext/richtextborderspage.cpp:546
+#, fuzzy
+msgid "Double"
+msgstr "Hecho"
+
+#: ../src/common/paper.cpp:177
+msgid "Double Japanese Postcard Rotated 148 x 200 mm"
+msgstr "Tarjeta Japonesa Doble Girada 148 x 200 mm"
+
+#: ../src/common/xtixml.cpp:273
+#, c-format
+msgid "Doubly used id : %d"
+msgstr "Identificador duplicado: %d"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:153
+msgid "Down"
+msgstr "Abajo"
+
+#: ../src/richtext/richtextctrl.cpp:814
+msgid "Drag"
+msgstr ""
+
+#: ../src/common/paper.cpp:101
+msgid "E sheet, 34 x 44 in"
+msgstr "Hoja E, 34 x 44 in"
+
+#: ../src/common/accelcmn.cpp:61
+msgid "END"
+msgstr "END"
+
+#: ../src/common/accelcmn.cpp:52
+msgid "ENTER"
+msgstr "INTRO"
+
+#: ../src/unix/fswatcher_inotify.cpp:535
+#, fuzzy
+msgid "EOF while reading from inotify descriptor"
+msgstr "no se puede leer desde el descriptor de archivo %d"
+
+#: ../src/common/accelcmn.cpp:64
+msgid "ESC"
+msgstr "ESC"
+
+#: ../src/common/accelcmn.cpp:65
+msgid "ESCAPE"
+msgstr "ESCAPE"
+
+#: ../src/common/accelcmn.cpp:73
+msgid "EXECUTE"
+msgstr "EJECUTAR"
+
+#: ../src/common/stockitem.cpp:154
+#, fuzzy
+msgid "Edit"
+msgstr "&Editar"
+
+#: ../src/generic/editlbox.cpp:272
+msgid "Edit item"
+msgstr "Editar elemento"
+
+#: ../include/wx/generic/progdlgg.h:84
+#, fuzzy
+msgid "Elapsed time:"
+msgstr "Tiempo transcurrido : "
+
+#: ../src/richtext/richtextsizepage.cpp:353
+#: ../src/richtext/richtextsizepage.cpp:355
+#: ../src/richtext/richtextsizepage.cpp:465
+#: ../src/richtext/richtextsizepage.cpp:467
+msgid "Enable the height value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:438
+#: ../src/richtext/richtextsizepage.cpp:440
+#, fuzzy
+msgid "Enable the maximum width value."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/richtext/richtextsizepage.cpp:411
+#: ../src/richtext/richtextsizepage.cpp:413
+msgid "Enable the minimum height value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:384
+#: ../src/richtext/richtextsizepage.cpp:386
+#, fuzzy
+msgid "Enable the minimum width value."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/richtext/richtextsizepage.cpp:319
+#: ../src/richtext/richtextsizepage.cpp:321
+msgid "Enable the width value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:280
+#: ../src/richtext/richtextsizepage.cpp:282
+#, fuzzy
+msgid "Enable vertical alignment."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:133
+#: ../src/richtext/richtextbackgroundpage.cpp:135
+#, fuzzy
+msgid "Enables a background colour."
+msgstr "Color de fondo"
+
+#: ../src/richtext/richtextstyledlg.cpp:931
+#, fuzzy
+msgid "Enter a box style name"
+msgstr "Introduzca un nombre de estilo de lista"
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+msgid "Enter a character style name"
+msgstr "Introduzca un nombre de estilo de caracter"
+
+#: ../src/richtext/richtextstyledlg.cpp:817
+msgid "Enter a list style name"
+msgstr "Introduzca un nombre de estilo de lista"
+
+#: ../src/richtext/richtextstyledlg.cpp:890
+#, fuzzy
+msgid "Enter a new style name"
+msgstr "Introduzca un nombre de estilo de lista"
+
+#: ../src/richtext/richtextstyledlg.cpp:651
+msgid "Enter a paragraph style name"
+msgstr "Introduzca un nombre de estilo de párrafo"
+
+#: ../src/generic/dbgrptg.cpp:174
+#, c-format
+msgid "Enter command to open file \"%s\":"
+msgstr "Introduzca comando para abrir archivo \"%s\":"
+
+#: ../src/generic/helpext.cpp:463
+msgid "Entries found"
+msgstr "Documentos encontrados"
+
+#: ../src/common/paper.cpp:143
+msgid "Envelope Invite 220 x 220 mm"
+msgstr "Envelope Invite 220 x 220 mm"
+
+#: ../src/common/config.cpp:473
+#, c-format
+msgid ""
+"Environment variables expansion failed: missing '%c' at position %u in '%s'."
+msgstr ""
+"Fallo en expansión de variable de entorno: falta '%c' en la posición %u en "
+"'%s'."
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/dirctrlg.cpp:688
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:791
+#: ../src/generic/filectrlg.cpp:805 ../src/generic/filectrlg.cpp:821
+#: ../src/generic/filectrlg.cpp:1381 ../src/generic/filectrlg.cpp:1412
+#: ../src/gtk/filedlg.cpp:73 ../src/gtk1/fontdlg.cpp:74
+msgid "Error"
+msgstr "Error"
+
+#: ../src/unix/epolldispatcher.cpp:103
+#, fuzzy
+msgid "Error closing epoll descriptor"
+msgstr "Error creando directorio"
+
+#: ../src/unix/fswatcher_kqueue.cpp:114
+#, fuzzy
+msgid "Error closing kqueue instance"
+msgstr "Error creando directorio"
+
+#: ../src/generic/dirdlgg.cpp:251
+msgid "Error creating directory"
+msgstr "Error creando directorio"
+
+#: ../src/common/imagbmp.cpp:1103
+msgid "Error in reading image DIB."
+msgstr "Error al leer imagen DIB."
+
+#: ../src/propgrid/propgrid.cpp:6563
+#, c-format
+msgid "Error in resource: %s"
+msgstr ""
+
+#: ../src/common/fileconf.cpp:453
+msgid "Error reading config options."
+msgstr "Error al leer las opciones de configuración."
+
+#: ../src/common/fileconf.cpp:1064
+msgid "Error saving user configuration data."
+msgstr "Error al guardar los datos de configuración del usuario."
+
+#: ../src/gtk/print.cpp:671
+#, fuzzy
+msgid "Error while printing: "
+msgstr "Error al escribir en el semáforo"
+
+#: ../src/common/log.cpp:223
+msgid "Error: "
+msgstr "Error: "
+
+#: ../src/common/fmapbase.cpp:150
+msgid "Esperanto (ISO-8859-3)"
+msgstr "Esperanto (ISO-8859-3)"
+
+#: ../include/wx/generic/progdlgg.h:85
+#, fuzzy
+msgid "Estimated time:"
+msgstr "Tiempo estimado : "
+
+#: ../src/unix/fswatcher_inotify.cpp:639
+msgid "Event queue overflowed"
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:234
+#, fuzzy
+msgid "Executable files (*.exe)|*.exe|"
+msgstr "Archivos ejecutable (*.exe)|*.exe|Todos los archivos (*.*)|*.*||"
+
+#: ../src/common/stockitem.cpp:155
+msgid "Execute"
+msgstr ""
+
+#: ../src/msw/utilsexc.cpp:888
+#, c-format
+msgid "Execution of command '%s' failed"
+msgstr "Falló la ejecución del comando '%s'"
+
+#: ../src/os2/utilsexc.cpp:163
+#, c-format
+msgid "Execution of command '%s' failed with error: %ul"
+msgstr "Falló la ejecución del comando '%s' con el error: %ul"
+
+#: ../src/common/paper.cpp:106
+msgid "Executive, 7 1/4 x 10 1/2 in"
+msgstr "Executive, 7 1/4 x 10 1/2 in"
+
+#: ../src/msw/registry.cpp:1230
+#, c-format
+msgid ""
+"Exporting registry key: file \"%s\" already exists and won't be overwritten."
+msgstr ""
+"Exportando clave de registro: archivo \"%s\" existente que no se "
+"sobreescribirá."
+
+#: ../src/common/fmapbase.cpp:195
+msgid "Extended Unix Codepage for Japanese (EUC-JP)"
+msgstr "Página de Códigos Unix Extendida para Japonés (EUC-JP)"
+
+#: ../src/html/chm.cpp:725
+#, c-format
+msgid "Extraction of '%s' into '%s' failed."
+msgstr "Falló la extracción de '%s' de '%s'"
+
+#: ../src/common/accelcmn.cpp:238 ../src/common/accelcmn.cpp:333
+msgid "F"
+msgstr "F"
+
+#: ../src/propgrid/advprops.cpp:640
+#, fuzzy
+msgid "Face Name"
+msgstr "Nuevo Nombre"
+
+#: ../src/unix/snglinst.cpp:269
+msgid "Failed to access lock file."
+msgstr "Fallo al acceder al archivo de bloqueo."
+
+#: ../src/unix/epolldispatcher.cpp:116
+#, fuzzy, c-format
+msgid "Failed to add descriptor %d to epoll descriptor %d"
+msgstr "no se puede escribir el descriptor de archivo %d"
+
+#: ../src/msw/dib.cpp:548
+#, fuzzy, c-format
+msgid "Failed to allocate %luKb of memory for bitmap data."
+msgstr ""
+"No se pudieron reservar %luKb de memoria para los datos del mapa de bits."
+
+#: ../src/common/glcmn.cpp:87
+#, fuzzy
+msgid "Failed to allocate colour for OpenGL"
+msgstr "Fallo al crear el cursor."
+
+#: ../src/unix/displayx11.cpp:288
+msgid "Failed to change video mode"
+msgstr "Error al cambiar el modo de vídeo"
+
+#: ../src/common/image.cpp:3139
+#, fuzzy, c-format
+msgid "Failed to check format of image file \"%s\"."
+msgstr "No se pudo guardar la imagen de mapa de bits en el archivo \"%s\"."
+
+#: ../src/common/debugrpt.cpp:244
+#, c-format
+msgid "Failed to clean up debug report directory \"%s\""
+msgstr "No se pudo vaciar el directorio de informe de depuración \"%s\""
+
+#: ../src/common/filename.cpp:211
+msgid "Failed to close file handle"
+msgstr "Error al cerrar el manejador del archivo"
+
+#: ../src/unix/snglinst.cpp:334
+#, c-format
+msgid "Failed to close lock file '%s'"
+msgstr "No se pudo cerrar el archivo de bloqueo '%s'"
+
+#: ../src/msw/clipbrd.cpp:115
+msgid "Failed to close the clipboard."
+msgstr "Error al cerrar el portapapeles."
+
+#: ../src/x11/utils.cpp:204
+#, c-format
+msgid "Failed to close the display \"%s\""
+msgstr "No se pudo cerrar el display \"%s\""
+
+#: ../src/msw/dialup.cpp:818
+msgid "Failed to connect: missing username/password."
+msgstr "Fallo al conectar: faltan usuario/contraseña."
+
+#: ../src/msw/dialup.cpp:764
+msgid "Failed to connect: no ISP to dial."
+msgstr "Fallo al conectar: no hay ISP al que llamar."
+
+#: ../src/common/textfile.cpp:200
+#, fuzzy, c-format
+msgid "Failed to convert file \"%s\" to Unicode."
+msgstr "Error al convertir los contenidos del archivo a Unicode."
+
+#: ../src/generic/logg.cpp:976
+#, fuzzy
+msgid "Failed to copy dialog contents to the clipboard."
+msgstr "Error al abrir el portapapeles."
+
+#: ../src/msw/registry.cpp:691
+#, c-format
+msgid "Failed to copy registry value '%s'"
+msgstr "Error al copiar el valor '%s' del registro"
+
+#: ../src/msw/registry.cpp:700
+#, c-format
+msgid "Failed to copy the contents of registry key '%s' to '%s'."
+msgstr "Fallo al copiar los contenidos de la clave del registro '%s' a '%s'."
+
+#: ../src/common/filefn.cpp:1058
+#, c-format
+msgid "Failed to copy the file '%s' to '%s'"
+msgstr "No se pudo copiar el archivo '%s' a '%s'"
+
+#: ../src/msw/registry.cpp:678
+#, c-format
+msgid "Failed to copy the registry subkey '%s' to '%s'."
+msgstr "Error al copiar la subclave del registro '%s' en '%s'."
+
+#: ../src/msw/dde.cpp:1073
+msgid "Failed to create DDE string"
+msgstr "Fallo al crear cadena DDE"
+
+#: ../src/msw/mdi.cpp:590
+msgid "Failed to create MDI parent frame."
+msgstr "Fallo al crear panel MDI padre"
+
+#: ../src/common/filename.cpp:1080
+msgid "Failed to create a temporary file name"
+msgstr "No se pudo crear un nombre temporal de archivo"
+
+#: ../src/msw/utilsexc.cpp:235
+msgid "Failed to create an anonymous pipe"
+msgstr "Fallo al crear canal anónimo"
+
+#: ../src/msw/ole/automtn.cpp:522
+#, fuzzy, c-format
+msgid "Failed to create an instance of \"%s\""
+msgstr "No se pudo crear el directorio \"%s\""
+
+#: ../src/msw/dde.cpp:442
+#, c-format
+msgid "Failed to create connection to server '%s' on topic '%s'"
+msgstr "Fallo al crear la conexión al servidor '%s' en '%s'"
+
+#: ../src/msw/cursor.cpp:212
+msgid "Failed to create cursor."
+msgstr "Fallo al crear el cursor."
+
+#: ../src/common/debugrpt.cpp:209
+#, c-format
+msgid "Failed to create directory \"%s\""
+msgstr "No se pudo crear el directorio \"%s\""
+
+#: ../src/generic/dirdlgg.cpp:249
+#, c-format
+msgid ""
+"Failed to create directory '%s'\n"
+"(Do you have the required permissions?)"
+msgstr ""
+"Fallo al crear directorio '%s'\n"
+"(¿Tiene los permisos necesarios?)"
+
+#: ../src/unix/epolldispatcher.cpp:84
+#, fuzzy
+msgid "Failed to create epoll descriptor"
+msgstr "Fallo al crear el cursor."
+
+#: ../src/msw/mimetype.cpp:198
+#, c-format
+msgid "Failed to create registry entry for '%s' files."
+msgstr "No se pudo crear entrada del registro para los archivos '%s'."
+
+#: ../src/msw/fdrepdlg.cpp:442
+#, c-format
+msgid "Failed to create the standard find/replace dialog (error code %d)"
+msgstr ""
+"Fallo al crear el diálogo estándar de buscar/reemplazar (código error %d)"
+
+#: ../src/unix/wakeuppipe.cpp:52
+#, fuzzy
+msgid "Failed to create wake up pipe used by event loop."
+msgstr "Fallo al crear barra de estado."
+
+#: ../src/html/winpars.cpp:739
+#, c-format
+msgid "Failed to display HTML document in %s encoding"
+msgstr "Error al mostrar el documento HTML con codificación %s"
+
+#: ../src/msw/clipbrd.cpp:127
+msgid "Failed to empty the clipboard."
+msgstr "Fallo al vaciar el portapapeles."
+
+#: ../src/unix/displayx11.cpp:265
+msgid "Failed to enumerate video modes"
+msgstr "Fallo al enumerar los modos de vídeo."
+
+#: ../src/msw/dde.cpp:727
+msgid "Failed to establish an advise loop with DDE server"
+msgstr "Fallo al establecer un lazo de aviso con el servidor DDE"
+
+#: ../src/msw/dialup.cpp:650 ../src/msw/dialup.cpp:884
+#, c-format
+msgid "Failed to establish dialup connection: %s"
+msgstr "Fallo al establecer la conexión: %s"
+
+#: ../src/unix/utilsunx.cpp:617
+#, c-format
+msgid "Failed to execute '%s'\n"
+msgstr "Error al ejecutar '%s'\n"
+
+#: ../src/common/debugrpt.cpp:725
+msgid "Failed to execute curl, please install it in PATH."
+msgstr "Fallo al ejecutar bucle, por favor, instálelo en el PATH."
+
+#: ../src/msw/ole/automtn.cpp:505
+#, fuzzy, c-format
+msgid "Failed to find CLSID of \"%s\""
+msgstr "No se pudo abrir display \"%s\"."
+
+#: ../src/common/regex.cpp:434 ../src/common/regex.cpp:482
+#, c-format
+msgid "Failed to find match for regular expression: %s"
+msgstr "Failed to find match for regular expression: %s"
+
+#: ../src/msw/dialup.cpp:716
+#, c-format
+msgid "Failed to get ISP names: %s"
+msgstr "Error al obtener nombres de ISP: %s"
+
+#: ../src/msw/ole/automtn.cpp:574
+#, fuzzy, c-format
+msgid "Failed to get OLE automation interface for \"%s\""
+msgstr "No se pudo crear el directorio \"%s\""
+
+#: ../src/msw/clipbrd.cpp:747
+msgid "Failed to get data from the clipboard"
+msgstr "Error al obtener datos del portapapeles"
+
+#: ../src/common/time.cpp:249
+msgid "Failed to get the local system time"
+msgstr "Error al obtener el sistema horario local"
+
+#: ../src/common/filefn.cpp:1453
+msgid "Failed to get the working directory"
+msgstr "Error al obtener el directorio de trabajo"
+
+#: ../src/univ/theme.cpp:113
+msgid "Failed to initialize GUI: no built-in themes found."
+msgstr "Fallo al inicializar GUI: no se encontraron temas."
+
+#: ../src/msw/helpchm.cpp:63
+msgid "Failed to initialize MS HTML Help."
+msgstr "Fallo al inicializar Ayuda MS HTML."
+
+#: ../src/msw/glcanvas.cpp:892
+msgid "Failed to initialize OpenGL"
+msgstr "Fallo al inicializar OpenGL."
+
+#: ../src/msw/dialup.cpp:879
+#, fuzzy, c-format
+msgid "Failed to initiate dialup connection: %s"
+msgstr "Error al terminar la conexión: %s"
+
+#: ../src/gtk/textctrl.cpp:1117
+msgid "Failed to insert text in the control."
+msgstr "No se pudo insertar texto en el control."
+
+#: ../src/unix/snglinst.cpp:241
+#, c-format
+msgid "Failed to inspect the lock file '%s'"
+msgstr "Error al inspeccionar el archivo de bloqueo '%s'"
+
+#: ../src/unix/appunix.cpp:182
+#, fuzzy
+msgid "Failed to install signal handler"
+msgstr "Error al cerrar el manejador del archivo"
+
+#: ../src/unix/threadpsx.cpp:1162
+msgid ""
+"Failed to join a thread, potential memory leak detected - please restart the "
+"program"
+msgstr ""
+"Error al sincronizar con un hilo de ejecución, pérdida potencial de memoría "
+"detectada - por favor reinicie el programa"
+
+#: ../src/msw/utils.cpp:745
+#, c-format
+msgid "Failed to kill process %d"
+msgstr "Error al matar el proceso %d"
+
+#: ../src/common/image.cpp:2365
+#, fuzzy, c-format
+msgid "Failed to load bitmap \"%s\" from resources."
+msgstr "No se pudo abrir imagen %d desde el archivo '%s'."
+
+#: ../src/common/image.cpp:2374
+#, fuzzy, c-format
+msgid "Failed to load icon \"%s\" from resources."
+msgstr "No se pudo abrir imagen %d desde el archivo '%s'."
+
+#: ../src/common/iconbndl.cpp:182
+#, fuzzy, c-format
+msgid "Failed to load image %%d from file '%s'."
+msgstr "No se pudo abrir imagen %d desde el archivo '%s'."
+
+#: ../src/common/iconbndl.cpp:190
+#, fuzzy, c-format
+msgid "Failed to load image %d from stream."
+msgstr "No se pudo abrir imagen %d desde el archivo '%s'."
+
+#: ../src/common/image.cpp:2450 ../src/common/image.cpp:2469
+#, fuzzy, c-format
+msgid "Failed to load image from file \"%s\"."
+msgstr "No se pudo abrir imagen %d desde el archivo '%s'."
+
+#: ../src/msw/enhmeta.cpp:97
+#, c-format
+msgid "Failed to load metafile from file \"%s\"."
+msgstr "No se pudo abrir el metaarchivo desde el archivo \"%s\"."
+
+#: ../src/msw/volume.cpp:327
+msgid "Failed to load mpr.dll."
+msgstr "Error al cargar mpr.dll."
+
+#: ../src/msw/utils.cpp:1120
+#, fuzzy, c-format
+msgid "Failed to load resource \"%s\"."
+msgstr "No se pudo abrir el metaarchivo desde el archivo \"%s\"."
+
+#: ../src/common/dynlib.cpp:100
+#, c-format
+msgid "Failed to load shared library '%s'"
+msgstr "No se pudo abrir la librería dinámica '%s'"
+
+#: ../src/msw/utils.cpp:1127
+#, fuzzy, c-format
+msgid "Failed to lock resource \"%s\"."
+msgstr "No se pudo bloquear el bloqueo del archivo '%s'"
+
+#: ../src/unix/snglinst.cpp:198
+#, c-format
+msgid "Failed to lock the lock file '%s'"
+msgstr "No se pudo bloquear el bloqueo del archivo '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:136
+#, c-format
+msgid "Failed to modify descriptor %d in epoll descriptor %d"
+msgstr ""
+
+#: ../src/common/filename.cpp:2681
+#, c-format
+msgid "Failed to modify file times for '%s'"
+msgstr "No se pudo modificar la horas del archivo para '%s'"
+
+#: ../src/common/selectdispatcher.cpp:252
+msgid "Failed to monitor I/O channels"
+msgstr ""
+
+#: ../src/common/filename.cpp:194
+#, fuzzy, c-format
+msgid "Failed to open '%s' for reading"
+msgstr "Error al abrir '%s' para '%s'"
+
+#: ../src/common/filename.cpp:199
+#, fuzzy, c-format
+msgid "Failed to open '%s' for writing"
+msgstr "Error al abrir '%s' para '%s'"
+
+#: ../src/html/chm.cpp:141
+#, c-format
+msgid "Failed to open CHM archive '%s'."
+msgstr "Error al abrir el archivo CHM '%s'"
+
+#: ../src/common/utilscmn.cpp:1135
+#, fuzzy, c-format
+msgid "Failed to open URL \"%s\" in default browser."
+msgstr "Error al abrir '%s' para '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:92
+#, fuzzy, c-format
+msgid "Failed to open directory \"%s\" for monitoring."
+msgstr "Error al abrir '%s' para '%s'"
+
+#: ../src/x11/utils.cpp:223
+#, c-format
+msgid "Failed to open display \"%s\"."
+msgstr "No se pudo abrir display \"%s\"."
+
+#: ../src/common/filename.cpp:1115
+msgid "Failed to open temporary file."
+msgstr "No se pudo abrir archivo temporal."
+
+#: ../src/msw/clipbrd.cpp:94
+msgid "Failed to open the clipboard."
+msgstr "Error al abrir el portapapeles."
+
+#: ../src/common/translation.cpp:1170
+#, fuzzy, c-format
+msgid "Failed to parse Plural-Forms: '%s'"
+msgstr "No se pueden analizar las formas plurales '%s'."
+
+#: ../src/unix/mediactrl.cpp:1268
+#, fuzzy, c-format
+msgid "Failed to prepare playing \"%s\"."
+msgstr "No se pudo abrir display \"%s\"."
+
+#: ../src/msw/clipbrd.cpp:647
+msgid "Failed to put data on the clipboard"
+msgstr "Error al poner datos en el portapapeles"
+
+#: ../src/unix/snglinst.cpp:278
+msgid "Failed to read PID from lock file."
+msgstr "Error al leer PID de archivo de bloqueo."
+
+#: ../src/common/fileconf.cpp:464
+#, fuzzy
+msgid "Failed to read config options."
+msgstr "Error al leer las opciones de configuración."
+
+#: ../src/common/docview.cpp:678
+#, fuzzy, c-format
+msgid "Failed to read document from the file \"%s\"."
+msgstr "No se pudo abrir el metaarchivo desde el archivo \"%s\"."
+
+#: ../src/dfb/evtloop.cpp:98
+#, fuzzy
+msgid "Failed to read event from DirectFB pipe"
+msgstr "Error al leer PID de archivo de bloqueo."
+
+#: ../src/unix/wakeuppipe.cpp:120
+#, fuzzy
+msgid "Failed to read from wake-up pipe"
+msgstr "Error al leer PID de archivo de bloqueo."
+
+#: ../src/unix/utilsunx.cpp:685
+msgid "Failed to redirect child process input/output"
+msgstr "Error en la redirección de la entrada/salida del proceso hijo"
+
+#: ../src/msw/utilsexc.cpp:697
+msgid "Failed to redirect the child process IO"
+msgstr "Error en la redirección de la entrada/salida del proceso hijo"
+
+#: ../src/msw/dde.cpp:293
+#, c-format
+msgid "Failed to register DDE server '%s'"
+msgstr "Error al registrar el servidor DDE '%s'"
+
+#: ../src/common/fontmap.cpp:245
+#, c-format
+msgid "Failed to remember the encoding for the charset '%s'."
+msgstr "Error al recordar la codificación para el conjunto de caracteres '%s'."
+
+#: ../src/common/debugrpt.cpp:227
+#, c-format
+msgid "Failed to remove debug report file \"%s\""
+msgstr "No se pudo eliminar el archivo de informe de depuración '%s'"
+
+#: ../src/unix/snglinst.cpp:322
+#, c-format
+msgid "Failed to remove lock file '%s'"
+msgstr "No se pudo quitar el archivo de bloqueo '%s'"
+
+#: ../src/unix/snglinst.cpp:288
+#, c-format
+msgid "Failed to remove stale lock file '%s'."
+msgstr "No se pudo eliminar el antiguo archivo de bloqueo '%s'."
+
+#: ../src/msw/registry.cpp:528
+#, c-format
+msgid "Failed to rename registry value '%s' to '%s'."
+msgstr "Fallo al renombrar valor del registro '%s' a '%s'."
+
+#: ../src/common/filefn.cpp:1168
+#, c-format
+msgid ""
+"Failed to rename the file '%s' to '%s' because the destination file already "
+"exists."
+msgstr ""
+"No se pudo renombrar el archivo '%s' a '%s' porque el archivo de destino ya "
+"existe."
+
+#: ../src/msw/registry.cpp:633
+#, c-format
+msgid "Failed to rename the registry key '%s' to '%s'."
+msgstr "Error al renombrar la clave del registro '%s' a '%s'."
+
+#: ../src/msw/clipbrd.cpp:497
+msgid "Failed to retrieve data from the clipboard."
+msgstr "Error al obtener datos del portapapeles."
+
+#: ../src/common/filename.cpp:2777
+#, c-format
+msgid "Failed to retrieve file times for '%s'"
+msgstr "No se pudo obtener horas del archivo para '%s'"
+
+#: ../src/msw/dialup.cpp:487
+msgid "Failed to retrieve text of RAS error message"
+msgstr "Fallo al recuperar el mensaje de error de RAS"
+
+#: ../src/msw/clipbrd.cpp:784
+msgid "Failed to retrieve the supported clipboard formats"
+msgstr "Fallo al recuperar los formatos soportados del portapapeles"
+
+#: ../src/common/docview.cpp:649
+#, fuzzy, c-format
+msgid "Failed to save document to the file \"%s\"."
+msgstr "No se pudo guardar la imagen de mapa de bits en el archivo \"%s\"."
+
+#: ../src/msw/dib.cpp:326
+#, c-format
+msgid "Failed to save the bitmap image to file \"%s\"."
+msgstr "No se pudo guardar la imagen de mapa de bits en el archivo \"%s\"."
+
+#: ../src/msw/dde.cpp:768
+msgid "Failed to send DDE advise notification"
+msgstr "Fallo al enviar notificación de aviso DDE"
+
+#: ../src/common/ftp.cpp:404
+#, c-format
+msgid "Failed to set FTP transfer mode to %s."
+msgstr "Error al establecer modo de transferencia FTP a '%s'"
+
+#: ../src/msw/clipbrd.cpp:373
+msgid "Failed to set clipboard data."
+msgstr "Error al colocar datos en el portapapeles."
+
+#: ../src/unix/snglinst.cpp:181
+#, c-format
+msgid "Failed to set permissions on lock file '%s'"
+msgstr "No se pudieron establecer permisos para el archivo de bloqueo '%s'"
+
+#: ../src/unix/utilsunx.cpp:674
+#, fuzzy
+msgid "Failed to set process priority"
+msgstr "Error al establecer la prioridad del hilo de ejecución %d."
+
+#: ../src/common/file.cpp:576
+msgid "Failed to set temporary file permissions"
+msgstr "No se pudieron cambiar permisos del archivo temporal"
+
+#: ../src/gtk/textctrl.cpp:1058
+msgid "Failed to set text in the text control."
+msgstr "No se pudo colocar texto en el control de texto."
+
+#: ../src/unix/threadpsx.cpp:1293
+#, fuzzy, c-format
+msgid "Failed to set thread concurrency level to %lu"
+msgstr "Error al establecer la prioridad del hilo de ejecución %d."
+
+#: ../src/unix/threadpsx.cpp:1377 ../src/unix/threadpsx.cpp:1387
+#, c-format
+msgid "Failed to set thread priority %d."
+msgstr "Error al establecer la prioridad del hilo de ejecución %d."
+
+#: ../src/unix/utilsunx.cpp:791
+msgid "Failed to set up non-blocking pipe, the program might hang."
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:261
+#, c-format
+msgid "Failed to store image '%s' to memory VFS!"
+msgstr "¡Error al almacenar la imagen '%s' en VFS de memoria!"
+
+#: ../src/dfb/evtloop.cpp:170
+msgid "Failed to switch DirectFB pipe to non-blocking mode"
+msgstr ""
+
+#: ../src/unix/wakeuppipe.cpp:59
+msgid "Failed to switch wake up pipe to non-blocking mode"
+msgstr ""
+
+#: ../src/unix/threadpsx.cpp:1569
+msgid "Failed to terminate a thread."
+msgstr "Error al terminar un hilo de ejecución."
+
+#: ../src/msw/dde.cpp:746
+msgid "Failed to terminate the advise loop with DDE server"
+msgstr "Error al terminar el bucle de aviso con el servidor DDE"
+
+#: ../src/msw/dialup.cpp:959
+#, c-format
+msgid "Failed to terminate the dialup connection: %s"
+msgstr "Error al terminar la conexión: %s"
+
+#: ../src/common/filename.cpp:2696
+#, c-format
+msgid "Failed to touch the file '%s'"
+msgstr "No se pudo  retocar' el archivo '%s'"
+
+#: ../src/unix/snglinst.cpp:328
+#, c-format
+msgid "Failed to unlock lock file '%s'"
+msgstr "No se pudo desbloquear el archivo de bloqueo '%s'"
+
+#: ../src/msw/dde.cpp:314
+#, c-format
+msgid "Failed to unregister DDE server '%s'"
+msgstr "Error al desregistrar el servidor DDE '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:155
+#, fuzzy, c-format
+msgid "Failed to unregister descriptor %d from epoll descriptor %d"
+msgstr "Error al obtener datos del portapapeles."
+
+#: ../src/common/fileconf.cpp:1037
+msgid "Failed to update user configuration file."
+msgstr "No se pudo actualizar el archivo de configuración de usuario."
+
+#: ../src/common/debugrpt.cpp:738
+#, c-format
+msgid "Failed to upload the debug report (error code %d)."
+msgstr "Fallo al enviar el informe de depuración (código error %d)"
+
+#: ../src/unix/snglinst.cpp:168
+#, c-format
+msgid "Failed to write to lock file '%s'"
+msgstr "No se pudo escribir al bloquear el archivo '%s'"
+
+#: ../src/propgrid/propgrid.cpp:172
+#, fuzzy
+msgid "False"
+msgstr "Archivo"
+
+#: ../src/propgrid/advprops.cpp:658
+#, fuzzy
+msgid "Family"
+msgstr "&Fuente:"
+
+#: ../src/common/stockitem.cpp:157 ../src/msw/wince/filedlgwce.cpp:121
+msgid "File"
+msgstr "Archivo"
+
+#: ../src/common/docview.cpp:666
+#, fuzzy, c-format
+msgid "File \"%s\" could not be opened for reading."
+msgstr "Error al abrir '%s' para '%s'"
+
+#: ../src/common/docview.cpp:643
+#, fuzzy, c-format
+msgid "File \"%s\" could not be opened for writing."
+msgstr "Error al abrir '%s' para '%s'"
+
+#: ../src/gtk/filedlg.cpp:56
+#, c-format
+msgid "File '%s' already exists, do you really want to overwrite it?"
+msgstr "El archivo '%s' ya existe, ¿realmente quiere sobreescribirlo?"
+
+#: ../src/os2/filedlg.cpp:310
+#, c-format
+msgid ""
+"File '%s' already exists.\n"
+"Do you want to replace it?"
+msgstr ""
+"El archivo '%s' ya existe.\n"
+"¿Realmente quiere sobreescribirlo?"
+
+#: ../src/common/filefn.cpp:1207
+#, fuzzy, c-format
+msgid "File '%s' couldn't be removed"
+msgstr "No pudo crearse directorio '%s'"
+
+#: ../src/common/filefn.cpp:1187
+#, fuzzy, c-format
+msgid "File '%s' couldn't be renamed '%s'"
+msgstr "No pudo crearse directorio '%s'"
+
+#: ../src/richtext/richtextctrl.cpp:2688 ../src/common/textcmn.cpp:921
+msgid "File couldn't be loaded."
+msgstr "No se pudo abrir el archivo."
+
+#: ../src/msw/filedlg.cpp:458
+#, fuzzy, c-format
+msgid "File dialog failed with error code %0lx."
+msgstr "Falló la ejecución del comando '%s' con el error: %ul"
+
+#: ../src/common/docview.cpp:1771
+msgid "File error"
+msgstr "Error de archivo"
+
+#: ../src/generic/dirctrlg.cpp:688 ../src/generic/filectrlg.cpp:805
+msgid "File name exists already."
+msgstr "Ya existe un archivo con el mismo nombre."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Files"
+msgstr "Archivos"
+
+#: ../src/common/filefn.cpp:1761
+#, c-format
+msgid "Files (%s)"
+msgstr "Archivos (%s)"
+
+#: ../src/motif/filedlg.cpp:218
+msgid "Filter"
+msgstr "Filtro"
+
+#: ../src/common/stockitem.cpp:158 ../src/html/helpwnd.cpp:500
+msgid "Find"
+msgstr "Buscar"
+
+#: ../src/common/stockitem.cpp:159
+#, fuzzy
+msgid "First"
+msgstr "primero"
+
+#: ../src/common/prntbase.cpp:1518
+#, fuzzy
+msgid "First page"
+msgstr "Página siguiente"
+
+#: ../src/richtext/richtextsizepage.cpp:521
+#, fuzzy
+msgid "Fixed"
+msgstr "Fuente fija:"
+
+#: ../src/html/helpwnd.cpp:1219
+msgid "Fixed font:"
+msgstr "Fuente fija:"
+
+#: ../src/html/helpwnd.cpp:1282
+msgid "Fixed size face.<br> <b>bold</b> <i>italic</i> "
+msgstr "Monoespaciado.<br> <b>negrita</b> <i>cursiva</i> "
+
+#: ../src/richtext/richtextsizepage.cpp:229
+#, fuzzy
+msgid "Floating"
+msgstr "Formateando"
+
+#: ../src/common/stockitem.cpp:160
+#, fuzzy
+msgid "Floppy"
+msgstr "&Copiar"
+
+#: ../src/common/paper.cpp:112
+msgid "Folio, 8 1/2 x 13 in"
+msgstr "Folio, 8 1/2 x 13 in"
+
+#: ../src/richtext/richtextformatdlg.cpp:324 ../src/osx/carbon/fontdlg.cpp:473
+#: ../src/common/stockitem.cpp:194
+msgid "Font"
+msgstr "Fuente"
+
+#: ../src/richtext/richtextfontpage.cpp:230
+msgid "Font &weight:"
+msgstr "&Peso de la fuente:"
+
+#: ../src/html/helpwnd.cpp:1220
+msgid "Font size:"
+msgstr "Tamaño de fuente:"
+
+#: ../src/richtext/richtextfontpage.cpp:217
+msgid "Font st&yle:"
+msgstr "&Estilo de fuente:"
+
+#: ../src/osx/carbon/fontdlg.cpp:515
+msgid "Font:"
+msgstr "Fuente:"
+
+#: ../src/dfb/fontmgr.cpp:198
+#, c-format
+msgid "Fonts index file %s disappeared while loading fonts."
+msgstr ""
+
+#: ../src/unix/utilsunx.cpp:651
+msgid "Fork failed"
+msgstr "Error en bifurcación de proceso (fork)"
+
+#: ../src/common/stockitem.cpp:161
+#, fuzzy
+msgid "Forward"
+msgstr "Adelante"
+
+#: ../src/common/xtixml.cpp:235
+msgid "Forward hrefs are not supported"
+msgstr "Las hiper-referencias del tipo \"forward\" no están soportadas"
+
+#: ../src/html/helpwnd.cpp:888
+#, c-format
+msgid "Found %i matches"
+msgstr "Encontrada(s) %i coincidencias"
+
+#: ../src/generic/prntdlgg.cpp:238
+msgid "From:"
+msgstr "De:"
+
+#: ../src/common/imaggif.cpp:160
+msgid "GIF: Invalid gif index."
+msgstr "GIF: Indice de gif no válido."
+
+#: ../src/common/imaggif.cpp:150
+msgid "GIF: data stream seems to be truncated."
+msgstr "GIF: flujo de datos parece haberse truncado."
+
+#: ../src/common/imaggif.cpp:134
+msgid "GIF: error in GIF image format."
+msgstr "GIF: error en formato de imagen GIF."
+
+#: ../src/common/imaggif.cpp:137
+msgid "GIF: not enough memory."
+msgstr "GIF: memoria insuficiente."
+
+#: ../src/common/imaggif.cpp:140
+msgid "GIF: unknown error!!!"
+msgstr "¡¡GIF: error desconocido!!"
+
+#: ../src/gtk/window.cpp:4288
+msgid ""
+"GTK+ installed on this machine is too old to support screen compositing, "
+"please install GTK+ 2.12 or later."
+msgstr ""
+
+#: ../src/univ/themes/gtk.cpp:525
+msgid "GTK+ theme"
+msgstr "Tema GTK+"
+
+#: ../src/common/preferencescmn.cpp:39
+msgid "General"
+msgstr ""
+
+#: ../src/common/prntbase.cpp:243
+msgid "Generic PostScript"
+msgstr "PostScript genérica"
+
+#: ../src/common/paper.cpp:136
+msgid "German Legal Fanfold, 8 1/2 x 13 in"
+msgstr "German Legal Fanfold, 8 1/2 x 13 in"
+
+#: ../src/common/paper.cpp:135
+msgid "German Std Fanfold, 8 1/2 x 12 in"
+msgstr "German Std Fanfold, 8 1/2 x 12 in"
+
+#: ../include/wx/xtiprop.h:188
+msgid "GetProperty called w/o valid getter"
+msgstr "Se llamó a GetProperty sin un obtenedor válido"
+
+#: ../include/wx/xtiprop.h:266
+msgid "GetPropertyCollection called on a generic accessor"
+msgstr "Se llamó a GetPropertyCollection sobre un accedente genérico"
+
+#: ../include/wx/xtiprop.h:206
+msgid "GetPropertyCollection called w/o valid collection getter"
+msgstr "Se llamó a GetPropertyCollection sin un obtenedor de colección válido"
+
+#: ../src/html/helpwnd.cpp:673
+msgid "Go back"
+msgstr "Atrás"
+
+#: ../src/html/helpwnd.cpp:674
+msgid "Go forward"
+msgstr "Adelante"
+
+#: ../src/html/helpwnd.cpp:676
+msgid "Go one level up in document hierarchy"
+msgstr "Subir un nivel en la jerarquía del documento"
+
+#: ../src/generic/filedlgg.cpp:223 ../src/generic/dirdlgg.cpp:136
+msgid "Go to home directory"
+msgstr "Ir al directorio principal"
+
+#: ../src/generic/filedlgg.cpp:219
+msgid "Go to parent directory"
+msgstr "Ir al directorio superior"
+
+#: ../src/generic/aboutdlgg.cpp:76
+msgid "Graphics art by "
+msgstr "Gráficos por"
+
+#: ../src/common/fmapbase.cpp:154
+msgid "Greek (ISO-8859-7)"
+msgstr "Greek (ISO-8859-7)"
+
+#: ../src/richtext/richtextborderspage.cpp:547
+msgid "Groove"
+msgstr ""
+
+#: ../src/common/zstream.cpp:158 ../src/common/zstream.cpp:318
+msgid "Gzip not supported by this version of zlib"
+msgstr "Gzip no está soportado por esta versión de zlib"
+
+#: ../src/common/accelcmn.cpp:75
+msgid "HELP"
+msgstr "AYUDA"
+
+#: ../src/common/accelcmn.cpp:60
+msgid "HOME"
+msgstr "INICIO"
+
+#: ../src/html/helpwnd.cpp:1552
+msgid "HTML Help Project (*.hhp)|*.hhp|"
+msgstr "Proyecto de ayuda HTML (*.hhp)|*.hhp|"
+
+#: ../src/html/htmlwin.cpp:659
+#, c-format
+msgid "HTML anchor %s does not exist."
+msgstr "El anclaje HTML %s no existe."
+
+#: ../src/html/helpwnd.cpp:1550
+msgid "HTML files (*.html;*.htm)|*.html;*.htm|"
+msgstr "Archivos HTML (*.html;*.htm)|*.html;*.htm|"
+
+#: ../src/common/stockitem.cpp:162
+msgid "Harddisk"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:155
+msgid "Hebrew (ISO-8859-8)"
+msgstr "Hebrew (ISO-8859-8)"
+
+#: ../include/wx/msgdlg.h:275 ../src/osx/button_osx.cpp:39
+#: ../src/common/stockitem.cpp:163 ../src/html/helpdlg.cpp:66
+#: ../src/html/helpfrm.cpp:116
+msgid "Help"
+msgstr "Ayuda"
+
+#: ../src/html/helpwnd.cpp:1213
+msgid "Help Browser Options"
+msgstr "Opciones del Navegador de la Ayuda"
+
+#: ../src/generic/helpext.cpp:458 ../src/generic/helpext.cpp:459
+msgid "Help Index"
+msgstr "Indice de la Ayuda"
+
+#: ../src/html/helpwnd.cpp:1534
+msgid "Help Printing"
+msgstr "Ayuda de Impresión"
+
+#: ../src/html/helpwnd.cpp:814
+msgid "Help Topics"
+msgstr "Temas de ayuda"
+
+#: ../src/html/helpwnd.cpp:1551
+msgid "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+msgstr "Libros de ayuda (*.htb)|*.htb|Libros de ayuda (*.zip)|*.zip|"
+
+#: ../src/generic/helpext.cpp:271
+#, c-format
+msgid "Help directory \"%s\" not found."
+msgstr "Directorio de ayuda \"%s\" no encontrado."
+
+#: ../src/generic/helpext.cpp:279
+#, c-format
+msgid "Help file \"%s\" not found."
+msgstr "Archivo de ayuda \"%s\" no encontrado."
+
+#: ../src/html/helpctrl.cpp:63
+#, c-format
+msgid "Help: %s"
+msgstr "Ayuda: %s"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:649
+#, fuzzy, c-format
+msgid "Hide %s"
+msgstr "Ayuda: %s"
+
+#: ../src/osx/menu_osx.cpp:604 ../src/osx/menu_osx.cpp:651
+msgid "Hide Others"
+msgstr ""
+
+#: ../src/generic/infobar.cpp:85
+msgid "Hide this notification message."
+msgstr ""
+
+#: ../src/generic/dirdlgg.cpp:98 ../src/common/stockitem.cpp:164
+msgid "Home"
+msgstr "Inicio"
+
+#: ../src/generic/dirctrlg.cpp:624
+msgid "Home directory"
+msgstr "Carpeta de inicio"
+
+#: ../src/richtext/richtextsizepage.cpp:253
+#: ../src/richtext/richtextsizepage.cpp:255
+msgid "How the object will float relative to the text."
+msgstr ""
+
+#: ../src/common/imagbmp.cpp:1118
+msgid "ICO: Error in reading mask DIB."
+msgstr "ICO: Error al leer máscara DIB."
+
+#: ../src/common/imagbmp.cpp:1233 ../src/common/imagbmp.cpp:1294
+#: ../src/common/imagbmp.cpp:1305 ../src/common/imagbmp.cpp:1318
+#: ../src/common/imagbmp.cpp:1363 ../src/common/imagbmp.cpp:1375
+#: ../src/common/imagbmp.cpp:1386
+msgid "ICO: Error writing the image file!"
+msgstr "ICO: ¡Error al escribir el archivo de imagen!"
+
+#: ../src/common/imagbmp.cpp:1198
+msgid "ICO: Image too tall for an icon."
+msgstr "ICO: Imagen demasiado alta para un icono."
+
+#: ../src/common/imagbmp.cpp:1206
+msgid "ICO: Image too wide for an icon."
+msgstr "ICO: Imagen demasiado ancha para un icono."
+
+#: ../src/common/imagbmp.cpp:1466
+msgid "ICO: Invalid icon index."
+msgstr "ICO: Indice de icono no válido."
+
+#: ../src/common/imagiff.cpp:759
+msgid "IFF: data stream seems to be truncated."
+msgstr "IFF: el flujo de datos parece truncado."
+
+#: ../src/common/imagiff.cpp:743
+msgid "IFF: error in IFF image format."
+msgstr "IFF: error en formato de imagen IFF."
+
+#: ../src/common/imagiff.cpp:746
+msgid "IFF: not enough memory."
+msgstr "IFF: memoria insuficiente."
+
+#: ../src/common/imagiff.cpp:749
+msgid "IFF: unknown error!!!"
+msgstr "IFF: ¡¡¡error desconocido!!!"
+
+#: ../src/common/accelcmn.cpp:50
+msgid "INS"
+msgstr "INS"
+
+#: ../src/common/accelcmn.cpp:51
+msgid "INSERT"
+msgstr "INSERT"
+
+#: ../src/common/fmapbase.cpp:197
+msgid "ISO-2022-JP"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:2420
+msgid "Icon & text renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/html/htmprint.cpp:282
+msgid ""
+"If possible, try changing the layout parameters to make the printout more "
+"narrow."
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:358
+msgid ""
+"If you have any additional information pertaining to this bug\n"
+"report, please enter it here and it will be joined to it:"
+msgstr ""
+"Si tiene alguna información adicional concerniente a este informe\n"
+"de error, por favor, introdúzcalo aquí y será adjuntado:"
+
+#: ../src/generic/dbgrptg.cpp:324
+msgid ""
+"If you wish to suppress this debug report completely, please choose the "
+"\"Cancel\" button,\n"
+"but be warned that it may hinder improving the program, so if\n"
+"at all possible please do continue with the report generation.\n"
+msgstr ""
+"Si desea eliminar este informe de depuración completamente, por favor, elija "
+"el botón \"Cancelar\",\n"
+"pero sepa que ésto no ayuda a la mejora del programa, por tanto, si\n"
+"es posible, por favor, continue con la generación del informe.\n"
+
+#: ../src/msw/registry.cpp:1395
+#, c-format
+msgid "Ignoring value \"%s\" of the key \"%s\"."
+msgstr "Se ignorará el valor \"%s\" de la clave \"%s\"."
+
+#: ../src/common/xtistrm.cpp:299
+msgid "Illegal Object Class (Non-wxEvtHandler) as Event Source"
+msgstr "Clase de objeto (Non-wxEvtHandler) como Event Source ilegal"
+
+#: ../src/common/xti.cpp:513
+msgid "Illegal Parameter Count for ConstructObject Method"
+msgstr "Número ilegal de parámetros para el método ConstructObject"
+
+#: ../src/common/xti.cpp:501
+msgid "Illegal Parameter Count for Create Method"
+msgstr "Número ilegal de parámetros para el método Create"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/filectrlg.cpp:791
+msgid "Illegal directory name."
+msgstr "Nombre de directorio ilegal"
+
+#: ../src/generic/filectrlg.cpp:1380
+msgid "Illegal file specification."
+msgstr "Especificación de archivo ilegal"
+
+#: ../src/common/image.cpp:2158
+msgid "Image and mask have different sizes."
+msgstr "La imagen y la máscara tienen tamaños diferentes"
+
+#: ../src/common/image.cpp:2609
+#, fuzzy, c-format
+msgid "Image file is not of type %d."
+msgstr "El archivo de imagen no es del tipo %ld."
+
+#: ../src/common/image.cpp:2739
+#, fuzzy, c-format
+msgid "Image is not of type %s."
+msgstr "El archivo de imagen no es del tipo %s."
+
+#: ../src/msw/textctrl.cpp:399
+msgid ""
+"Impossible to create a rich edit control, using simple text control instead. "
+"Please reinstall riched32.dll"
+msgstr ""
+"Imposible crear control 'rich edit', se usará el control de texto simple. "
+"Por favor instale riched32.dll"
+
+#: ../src/unix/utilsunx.cpp:307
+msgid "Impossible to get child process input"
+msgstr "Imposible obtener la entrada del proceso hijo"
+
+#: ../src/common/filefn.cpp:1074
+#, c-format
+msgid "Impossible to get permissions for file '%s'"
+msgstr "Imposible obtener permisos para el archivo '%s'"
+
+#: ../src/common/filefn.cpp:1088
+#, c-format
+msgid "Impossible to overwrite the file '%s'"
+msgstr "Imposible sobreescribir el archivo '%s'"
+
+#: ../src/common/filefn.cpp:1142
+#, c-format
+msgid "Impossible to set permissions for the file '%s'"
+msgstr "Imposible establecer permisos para el archivo '%s'"
+
+#: ../src/common/gifdecod.cpp:818
+#, c-format
+msgid "Incorrect GIF frame size (%u, %d) for the frame #%u"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:624
+msgid "Incorrect number of arguments."
+msgstr ""
+
+#: ../src/common/stockitem.cpp:165
+msgid "Indent"
+msgstr "Escalonado"
+
+#: ../src/richtext/richtextformatdlg.cpp:330
+msgid "Indents && Spacing"
+msgstr "Espaciado && de Escalonados"
+
+#: ../src/common/stockitem.cpp:166 ../src/html/helpwnd.cpp:525
+msgid "Index"
+msgstr "Índice"
+
+#: ../src/common/fmapbase.cpp:159
+msgid "Indian (ISO-8859-12)"
+msgstr "Indian (ISO-8859-12)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "Info"
+msgstr ""
+
+#: ../src/common/init.cpp:276
+msgid "Initialization failed in post init, aborting."
+msgstr "Fallo en inicialización en post init, abortando."
+
+#: ../src/richtext/richtextsymboldlg.cpp:472
+msgid "Insert"
+msgstr "Insertar"
+
+#: ../src/richtext/richtextbuffer.cpp:7687
+#, fuzzy
+msgid "Insert Field"
+msgstr "Insertar Texto"
+
+#: ../src/richtext/richtextbuffer.cpp:7598
+#: ../src/richtext/richtextbuffer.cpp:8551
+msgid "Insert Image"
+msgstr "Insertar Imagen"
+
+#: ../src/richtext/richtextbuffer.cpp:7645
+#, fuzzy
+msgid "Insert Object"
+msgstr "Insertar Texto"
+
+#: ../src/richtext/richtextctrl.cpp:1172 ../src/richtext/richtextctrl.cpp:1362
+#: ../src/richtext/richtextbuffer.cpp:7440
+#: ../src/richtext/richtextbuffer.cpp:7470
+#: ../src/richtext/richtextbuffer.cpp:7514
+msgid "Insert Text"
+msgstr "Insertar Texto"
+
+#: ../src/richtext/richtextindentspage.cpp:295
+#: ../src/richtext/richtextindentspage.cpp:297
+#, fuzzy
+msgid "Inserts a page break before the paragraph."
+msgstr "El espaciado antes de párrafo."
+
+#: ../src/richtext/richtextborderspage.cpp:549
+#, fuzzy
+msgid "Inset"
+msgstr "Insertar"
+
+#: ../src/gtk/app.cpp:429
+#, c-format
+msgid "Invalid GTK+ command line option, use \"%s --help\""
+msgstr ""
+
+#: ../src/common/imagtiff.cpp:314
+msgid "Invalid TIFF image index."
+msgstr "Índice de imagen TIFF no válido."
+
+#: ../src/osx/carbon/dataview.cpp:1782 ../src/osx/carbon/dataview.cpp:1877
+msgid "Invalid data view item"
+msgstr ""
+
+#: ../src/common/appcmn.cpp:266
+#, c-format
+msgid "Invalid display mode specification '%s'."
+msgstr "Especificación de 'display' no válida: '%s'."
+
+#: ../src/x11/app.cpp:121
+#, c-format
+msgid "Invalid geometry specification '%s'"
+msgstr "Especificación de geometría no válida: '%s'"
+
+#: ../src/unix/fswatcher_inotify.cpp:298
+#, c-format
+msgid "Invalid inotify event for \"%s\""
+msgstr ""
+
+#: ../src/unix/snglinst.cpp:306
+#, c-format
+msgid "Invalid lock file '%s'."
+msgstr "Archivo de bloqueo '%s' no válido."
+
+#: ../src/common/translation.cpp:1111
+#, fuzzy
+msgid "Invalid message catalog."
+msgstr "'%s' no es un catálogo de mensajes válido."
+
+#: ../src/common/xtistrm.cpp:409 ../src/common/xtistrm.cpp:424
+msgid "Invalid or Null Object ID passed to GetObjectClassInfo"
+msgstr "Identificador de objeto pasado a GetObjectClassInfo nulo o inválido"
+
+#: ../src/common/xtistrm.cpp:439
+msgid "Invalid or Null Object ID passed to HasObjectClassInfo"
+msgstr "Identificador de objeto pasado a HasObjectClassInfo nulo o inválido"
+
+#: ../src/common/regex.cpp:313
+#, c-format
+msgid "Invalid regular expression '%s': %s"
+msgstr "Expresión regular no válida '%s': %s"
+
+#: ../src/common/config.cpp:226
+#, c-format
+msgid "Invalid value %ld for a boolean key \"%s\" in config file."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:329 ../src/richtext/richtextfontpage.cpp:333
+#: ../src/osx/carbon/fontdlg.cpp:547 ../src/common/stockitem.cpp:168
+msgid "Italic"
+msgstr "Itálica"
+
+#: ../src/common/paper.cpp:131
+msgid "Italy Envelope, 110 x 230 mm"
+msgstr "Sobre Italy, 110 x 230 mm"
+
+#: ../src/common/imagjpeg.cpp:255
+msgid "JPEG: Couldn't load - file is probably corrupted."
+msgstr "JPEG: No se pudo abrir - el archivo está probablemente corrupto."
+
+#: ../src/common/imagjpeg.cpp:434
+msgid "JPEG: Couldn't save image."
+msgstr "JPEG: No pudo guardarse imagen."
+
+#: ../src/common/paper.cpp:164
+msgid "Japanese Double Postcard 200 x 148 mm"
+msgstr "Tarjeta Japonesa Doble 200 x 148 mm"
+
+#: ../src/common/paper.cpp:168
+msgid "Japanese Envelope Chou #3"
+msgstr "Japanese Envelope Chou #3"
+
+#: ../src/common/paper.cpp:181
+msgid "Japanese Envelope Chou #3 Rotated"
+msgstr "Japanese Envelope Chou #3 Girado"
+
+#: ../src/common/paper.cpp:169
+msgid "Japanese Envelope Chou #4"
+msgstr "Japanese Envelope Chou #4"
+
+#: ../src/common/paper.cpp:182
+msgid "Japanese Envelope Chou #4 Rotated"
+msgstr "Japanese Envelope Chou #4 Girado"
+
+#: ../src/common/paper.cpp:166
+msgid "Japanese Envelope Kaku #2"
+msgstr "Japanese Envelope Kaku #2"
+
+#: ../src/common/paper.cpp:179
+msgid "Japanese Envelope Kaku #2 Rotated"
+msgstr "Japanese Envelope Kaku #2 Girado"
+
+#: ../src/common/paper.cpp:167
+msgid "Japanese Envelope Kaku #3"
+msgstr "Japanese Envelope Kaku #3"
+
+#: ../src/common/paper.cpp:180
+msgid "Japanese Envelope Kaku #3 Rotated"
+msgstr "Japanese Envelope Kaku #3 Girado"
+
+#: ../src/common/paper.cpp:186
+msgid "Japanese Envelope You #4"
+msgstr "Japanese Envelope You #4"
+
+#: ../src/common/paper.cpp:187
+msgid "Japanese Envelope You #4 Rotated"
+msgstr "Japanese Envelope You #4 Girado"
+
+#: ../src/common/paper.cpp:139
+msgid "Japanese Postcard 100 x 148 mm"
+msgstr "Tarjeta Japonesa 100 x 148 mm"
+
+#: ../src/common/paper.cpp:176
+msgid "Japanese Postcard Rotated 148 x 100 mm"
+msgstr "Tarjeta Japonesa Girada 148 x 100 mm"
+
+#: ../src/common/stockitem.cpp:169
+msgid "Jump to"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:171
+msgid "Justified"
+msgstr "Justificado"
+
+#: ../src/richtext/richtextindentspage.cpp:155
+#: ../src/richtext/richtextindentspage.cpp:157
+#: ../src/richtext/richtextliststylepage.cpp:344
+#: ../src/richtext/richtextliststylepage.cpp:346
+msgid "Justify text left and right."
+msgstr "Justificar texto a izquierda y derecha."
+
+#: ../src/common/fmapbase.cpp:163
+msgid "KOI8-R"
+msgstr "KOI8-R"
+
+#: ../src/common/fmapbase.cpp:164
+msgid "KOI8-U"
+msgstr "KOI8-U"
+
+#: ../src/common/accelcmn.cpp:254 ../src/common/accelcmn.cpp:336
+msgid "KP_"
+msgstr "KP_"
+
+#: ../src/common/accelcmn.cpp:103
+msgid "KP_ADD"
+msgstr "KP_SUMAR"
+
+#: ../src/common/accelcmn.cpp:98
+msgid "KP_BEGIN"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:106
+msgid "KP_DECIMAL"
+msgstr "KP_DECIMAL"
+
+#: ../src/common/accelcmn.cpp:100
+msgid "KP_DELETE"
+msgstr "KP_SUPR"
+
+#: ../src/common/accelcmn.cpp:107
+msgid "KP_DIVIDE"
+msgstr "KP_DIVIDIR"
+
+#: ../src/common/accelcmn.cpp:92
+msgid "KP_DOWN"
+msgstr "KP_ABAJO"
+
+#: ../src/common/accelcmn.cpp:97
+msgid "KP_END"
+msgstr "KP_FIN"
+
+#: ../src/common/accelcmn.cpp:87
+msgid "KP_ENTER"
+msgstr "KP_INTRO"
+
+#: ../src/common/accelcmn.cpp:101
+msgid "KP_EQUAL"
+msgstr "KP_IGUAL"
+
+#: ../src/common/accelcmn.cpp:88
+msgid "KP_HOME"
+msgstr "KP_INICIO"
+
+#: ../src/common/accelcmn.cpp:99
+msgid "KP_INSERT"
+msgstr "KP_INSERT"
+
+#: ../src/common/accelcmn.cpp:89
+msgid "KP_LEFT"
+msgstr "KP_IZQUIERDA"
+
+#: ../src/common/accelcmn.cpp:102
+msgid "KP_MULTIPLY"
+msgstr "KP_MULTIPLICAR"
+
+#: ../src/common/accelcmn.cpp:95
+msgid "KP_NEXT"
+msgstr "KP_SIGUIENTE"
+
+#: ../src/common/accelcmn.cpp:96
+msgid "KP_PAGEDOWN"
+msgstr "KP_AVPÁG"
+
+#: ../src/common/accelcmn.cpp:94
+msgid "KP_PAGEUP"
+msgstr "KP_REPÁG"
+
+#: ../src/common/accelcmn.cpp:93
+msgid "KP_PRIOR"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:91
+msgid "KP_RIGHT"
+msgstr "KP_DERECHA"
+
+#: ../src/common/accelcmn.cpp:104
+msgid "KP_SEPARATOR"
+msgstr "KP_SEPARADOR"
+
+#: ../src/common/accelcmn.cpp:85
+msgid "KP_SPACE"
+msgstr "KP_ESPACIO"
+
+#: ../src/common/accelcmn.cpp:105
+msgid "KP_SUBTRACT"
+msgstr "KP_RESTAR"
+
+#: ../src/common/accelcmn.cpp:86
+msgid "KP_TAB"
+msgstr "KP_TAB"
+
+#: ../src/common/accelcmn.cpp:90
+msgid "KP_UP"
+msgstr "KP_ARRIBA"
+
+#: ../src/richtext/richtextindentspage.cpp:270
+#, fuzzy
+msgid "L&ine spacing:"
+msgstr "Espaciado de línea:"
+
+#: ../src/common/accelcmn.cpp:56
+msgid "LEFT"
+msgstr "IZQUIERDA"
+
+#: ../src/generic/prntdlgg.cpp:613 ../src/generic/prntdlgg.cpp:868
+msgid "Landscape"
+msgstr "Horizontal"
+
+#: ../src/common/stockitem.cpp:174
+#, fuzzy
+msgid "Last"
+msgstr "Pegar"
+
+#: ../src/common/prntbase.cpp:1542
+#, fuzzy
+msgid "Last page"
+msgstr "Página siguiente"
+
+#: ../src/common/log.cpp:309
+#, c-format
+msgid "Last repeated message (\"%s\", %lu time) wasn't output"
+msgid_plural "Last repeated message (\"%s\", %lu times) wasn't output"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../src/common/paper.cpp:104
+msgid "Ledger, 17 x 11 in"
+msgstr "Libro Mayor, 17 x 11 in"
+
+#: ../src/richtext/richtextliststylepage.cpp:249
+#: ../src/richtext/richtextliststylepage.cpp:252
+#: ../src/richtext/richtextliststylepage.cpp:253
+#: ../src/richtext/richtextbulletspage.cpp:199
+#: ../src/richtext/richtextbulletspage.cpp:202
+#: ../src/richtext/richtextbulletspage.cpp:203
+#: ../src/richtext/richtextsizepage.cpp:249
+msgid "Left"
+msgstr "Izquierda"
+
+#: ../src/richtext/richtextindentspage.cpp:204
+#: ../src/richtext/richtextliststylepage.cpp:390
+msgid "Left (&first line):"
+msgstr "Izquierda (&primera línea):"
+
+#: ../src/generic/prntdlgg.cpp:880
+msgid "Left margin (mm):"
+msgstr "Margen Izquierdo (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:141
+#: ../src/richtext/richtextindentspage.cpp:143
+#: ../src/richtext/richtextliststylepage.cpp:330
+#: ../src/richtext/richtextliststylepage.cpp:332
+msgid "Left-align text."
+msgstr "Texto alineado a la izquierda."
+
+#: ../src/common/paper.cpp:145
+msgid "Legal Extra 9 1/2 x 15 in"
+msgstr "Legal Extra 9 1/2 x 15 in"
+
+#: ../src/common/paper.cpp:97
+msgid "Legal, 8 1/2 x 14 in"
+msgstr "Legal, 8 1/2 x 14 in"
+
+#: ../src/common/paper.cpp:144
+msgid "Letter Extra 9 1/2 x 12 in"
+msgstr "Sobre Extra 9 1/2 x 12 in"
+
+#: ../src/common/paper.cpp:150
+msgid "Letter Extra Transverse 9.275 x 12 in"
+msgstr "Sobre Extra Transversal 9.275 x 12 in"
+
+#: ../src/common/paper.cpp:153
+msgid "Letter Plus 8 1/2 x 12.69 in"
+msgstr "Sobre Plus 8 1/2 x 12.69 in"
+
+#: ../src/common/paper.cpp:170
+msgid "Letter Rotated 11 x 8 1/2 in"
+msgstr "Sobre Girado 11 x 8 1/2 in"
+
+#: ../src/common/paper.cpp:102
+msgid "Letter Small, 8 1/2 x 11 in"
+msgstr "Sobre Pequeño, 8 1/2 x 11 in"
+
+#: ../src/common/paper.cpp:148
+msgid "Letter Transverse 8 1/2 x 11 in"
+msgstr "Sobre Transversal 8 1/2 x 11 in"
+
+#: ../src/common/paper.cpp:96
+msgid "Letter, 8 1/2 x 11 in"
+msgstr "Sobre, 8 1/2 x 11 in"
+
+#: ../src/generic/aboutdlgg.cpp:173
+msgid "License"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:332
+msgid "Light"
+msgstr "Ligera"
+
+#: ../src/generic/helpext.cpp:298
+#, c-format
+msgid "Line %lu of map file \"%s\" has invalid syntax, skipped."
+msgstr "Línea %lu de archivo de mapa \"%s\" tiene síntaxis no válida, saltado."
+
+#: ../src/richtext/richtextliststylepage.cpp:444
+msgid "Line spacing:"
+msgstr "Espaciado de línea:"
+
+#: ../src/html/chm.cpp:838
+msgid "Link contained '//', converted to absolute link."
+msgstr "El enlace contiene '//', convertido a enlace absoluto."
+
+#: ../src/richtext/richtextformatdlg.cpp:349
+msgid "List Style"
+msgstr "Estilo de Lista"
+
+#: ../src/richtext/richtextstyles.cpp:1060
+msgid "List styles"
+msgstr "Estilos de Lista"
+
+#: ../src/richtext/richtextfontpage.cpp:206
+#: ../src/richtext/richtextfontpage.cpp:208
+msgid "Lists font sizes in points."
+msgstr "Tamaños de fuente de listas en puntos."
+
+#: ../src/richtext/richtextfontpage.cpp:199
+#: ../src/richtext/richtextfontpage.cpp:201
+msgid "Lists the available fonts."
+msgstr "Muestra las fuentes disponibles."
+
+#: ../src/common/fldlgcmn.cpp:325
+#, c-format
+msgid "Load %s file"
+msgstr "Abrir el archivo %s"
+
+#: ../src/html/htmlwin.cpp:575
+msgid "Loading : "
+msgstr "Cargando :"
+
+#: ../src/unix/snglinst.cpp:246
+#, c-format
+msgid "Lock file '%s' has incorrect owner."
+msgstr "El archivo de bloqueo '%s' tiene un propietario incorrecto."
+
+#: ../src/unix/snglinst.cpp:251
+#, c-format
+msgid "Lock file '%s' has incorrect permissions."
+msgstr "El archivo de bloqueo '%s' tiene permisos incorrectos."
+
+#: ../src/generic/logg.cpp:582
+#, c-format
+msgid "Log saved to the file '%s'."
+msgstr "Log guardado en archivo '%s'."
+
+#: ../src/richtext/richtextliststylepage.cpp:484
+#: ../src/richtext/richtextbulletspage.cpp:289
+msgid "Lower case letters"
+msgstr "Letras minúsculas"
+
+#: ../src/richtext/richtextliststylepage.cpp:486
+#: ../src/richtext/richtextbulletspage.cpp:291
+msgid "Lower case roman numerals"
+msgstr "Números romanos en minúscula"
+
+#: ../src/gtk/mdi.cpp:422 ../src/gtk1/mdi.cpp:431
+msgid "MDI child"
+msgstr "Ventana hija MDI"
+
+#: ../src/common/accelcmn.cpp:68
+msgid "MENU"
+msgstr "MENU"
+
+#: ../src/msw/helpchm.cpp:56
+msgid ""
+"MS HTML Help functions are unavailable because the MS HTML Help library is "
+"not installed on this machine. Please install it."
+msgstr ""
+"La funciones de Ayuda MS HTML no están disponibles porque la librería de "
+"Ayuda MS HTML no está instalada. Por favor instálela."
+
+#: ../src/univ/themes/win32.cpp:3754
+msgid "Ma&ximize"
+msgstr "Ma&ximizar"
+
+#: ../src/common/fmapbase.cpp:203
+#, fuzzy
+msgid "MacArabic"
+msgstr "Árabe"
+
+#: ../src/common/fmapbase.cpp:222
+msgid "MacArmenian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:211
+msgid "MacBengali"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:217
+msgid "MacBurmese"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:236
+msgid "MacCeltic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:227
+msgid "MacCentralEurRoman"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:223
+msgid "MacChineseSimp"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:201
+msgid "MacChineseTrad"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:233
+msgid "MacCroatian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:206
+msgid "MacCyrillic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:207
+msgid "MacDevanagari"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:231
+msgid "MacDingbats"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:226
+msgid "MacEthiopic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:229
+#, fuzzy
+msgid "MacExtArabic"
+msgstr "Árabe"
+
+#: ../src/common/fmapbase.cpp:237
+msgid "MacGaelic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:221
+msgid "MacGeorgian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:205
+msgid "MacGreek"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:209
+msgid "MacGujarati"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:208
+msgid "MacGurmukhi"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:204
+msgid "MacHebrew"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:234
+msgid "MacIcelandic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:200
+msgid "MacJapanese"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:214
+msgid "MacKannada"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:238
+msgid "MacKeyboardGlyphs"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:218
+msgid "MacKhmer"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:202
+msgid "MacKorean"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:220
+msgid "MacLaotian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:215
+msgid "MacMalayalam"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:225
+msgid "MacMongolian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:210
+msgid "MacOriya"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:199
+#, fuzzy
+msgid "MacRoman"
+msgstr "Roman"
+
+#: ../src/common/fmapbase.cpp:235
+#, fuzzy
+msgid "MacRomanian"
+msgstr "Roman"
+
+#: ../src/common/fmapbase.cpp:216
+#, fuzzy
+msgid "MacSinhalese"
+msgstr "Coincidir may./min."
+
+#: ../src/common/fmapbase.cpp:230
+#, fuzzy
+msgid "MacSymbol"
+msgstr "Símbolo"
+
+#: ../src/common/fmapbase.cpp:212
+msgid "MacTamil"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:213
+msgid "MacTelugu"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:219
+msgid "MacThai"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:224
+msgid "MacTibetan"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:232
+msgid "MacTurkish"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:228
+msgid "MacVietnamese"
+msgstr ""
+
+#: ../src/propgrid/advprops.cpp:2031
+#, fuzzy
+msgid "Make a selection:"
+msgstr "Pegar selección"
+
+#: ../src/richtext/richtextformatdlg.cpp:362
+#: ../src/richtext/richtextmarginspage.cpp:172
+msgid "Margins"
+msgstr ""
+
+#: ../src/generic/fdrepdlg.cpp:147
+msgid "Match case"
+msgstr "Coincidir may./min."
+
+#: ../src/richtext/richtextsizepage.cpp:463
+#, fuzzy
+msgid "Max height:"
+msgstr "Peso"
+
+#: ../src/richtext/richtextsizepage.cpp:436
+#, fuzzy
+msgid "Max width:"
+msgstr "Sustituir por:"
+
+#: ../src/unix/mediactrl.cpp:1006
+#, c-format
+msgid "Media playback error: %s"
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:175
+#, c-format
+msgid "Memory VFS already contains file '%s'!"
+msgstr "¡VFS en memoria ya contiene el archivo '%s'!"
+
+#: ../src/msw/frame.cpp:347
+msgid "Menu"
+msgstr "Menú"
+
+#: ../src/common/msgout.cpp:124
+#, fuzzy
+msgid "Message"
+msgstr "%s mensaje"
+
+#: ../src/univ/themes/metal.cpp:168
+msgid "Metal theme"
+msgstr "Tema Metal"
+
+#: ../src/msw/ole/automtn.cpp:641
+msgid "Method or property not found."
+msgstr ""
+
+#: ../src/univ/themes/win32.cpp:3752
+msgid "Mi&nimize"
+msgstr "Mi&nimizar"
+
+#: ../src/richtext/richtextsizepage.cpp:409
+#, fuzzy
+msgid "Min height:"
+msgstr "&Peso de la fuente:"
+
+#: ../src/richtext/richtextsizepage.cpp:382
+msgid "Min width:"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:657
+msgid "Missing a required parameter."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:324
+msgid "Modern"
+msgstr "Modern"
+
+#: ../src/generic/filectrlg.cpp:462
+msgid "Modified"
+msgstr "Modificado"
+
+#: ../src/common/module.cpp:133
+#, c-format
+msgid "Module \"%s\" initialization failed"
+msgstr "No se pudo inicializar Módulo \"%s\""
+
+#: ../src/common/paper.cpp:132
+msgid "Monarch Envelope, 3 7/8 x 7 1/2 in"
+msgstr "Sobre Monarch, 3 7/8 x 7 1/2 in"
+
+#: ../src/msw/fswatcher.cpp:143
+msgid "Monitoring individual files for changes is not supported currently."
+msgstr ""
+
+#: ../src/generic/editlbox.cpp:276
+msgid "Move down"
+msgstr "Mover hacia abajo"
+
+#: ../src/generic/editlbox.cpp:275
+msgid "Move up"
+msgstr "Subir"
+
+#: ../src/richtext/richtextsizepage.cpp:682
+#: ../src/richtext/richtextsizepage.cpp:684
+#, fuzzy
+msgid "Moves the object to the next paragraph."
+msgstr "El estilo por defecto para el siguiente párrafo."
+
+#: ../src/richtext/richtextsizepage.cpp:676
+#: ../src/richtext/richtextsizepage.cpp:678
+#, fuzzy
+msgid "Moves the object to the previous paragraph."
+msgstr "Ir a la página HTML anterior"
+
+#: ../src/richtext/richtextbuffer.cpp:9345
+msgid "Multiple Cell Properties"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:81
+msgid "NUM_LOCK"
+msgstr "BLOQ_NUM"
+
+#: ../src/generic/filectrlg.cpp:459
+msgid "Name"
+msgstr "Nombre"
+
+#: ../src/common/stockitem.cpp:175
+msgid "Network"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:176
+#, fuzzy
+msgid "New"
+msgstr "&Nuevo"
+
+#: ../src/richtext/richtextstyledlg.cpp:243
+#, fuzzy
+msgid "New &Box Style..."
+msgstr "Nuevo Estilo de &Lista..."
+
+#: ../src/richtext/richtextstyledlg.cpp:225
+msgid "New &Character Style..."
+msgstr "Nuevo Estilo de &Caracter..."
+
+#: ../src/richtext/richtextstyledlg.cpp:237
+msgid "New &List Style..."
+msgstr "Nuevo Estilo de &Lista..."
+
+#: ../src/richtext/richtextstyledlg.cpp:231
+msgid "New &Paragraph Style..."
+msgstr "Nuevo Estilo de &Párrafo..."
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:651
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:817
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:890
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:931
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "New Style"
+msgstr "Nuevo Estilo"
+
+#: ../src/generic/dirdlgg.cpp:102
+msgid "New directory"
+msgstr "Crear directorio"
+
+#: ../src/generic/editlbox.cpp:273
+msgid "New item"
+msgstr "Elemento nuevo"
+
+#: ../src/generic/dirdlgg.cpp:326 ../src/generic/dirdlgg.cpp:336
+#: ../src/generic/filectrlg.cpp:653 ../src/generic/filectrlg.cpp:662
+msgid "NewName"
+msgstr "Nuevo Nombre"
+
+#: ../src/generic/tipdlg.cpp:305
+msgid "Next"
+msgstr "Siguiente"
+
+#: ../src/common/prntbase.cpp:1537 ../src/html/helpwnd.cpp:678
+msgid "Next page"
+msgstr "Página siguiente"
+
+#: ../include/wx/msgdlg.h:272 ../src/common/stockitem.cpp:177
+#: ../src/motif/msgdlg.cpp:196
+msgid "No"
+msgstr "No"
+
+#: ../src/generic/animateg.cpp:150
+#, c-format
+msgid "No animation handler for type %ld defined."
+msgstr "No hay definido ningún manipulador de animación para tipo %ld."
+
+#: ../src/dfb/bitmap.cpp:642 ../src/dfb/bitmap.cpp:676
+#, fuzzy, c-format
+msgid "No bitmap handler for type %d defined."
+msgstr "No hay definido ningún manipulador de imagen para tipo %d."
+
+#: ../src/osx/carbon/dataview.cpp:1784
+msgid "No column existing."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1674
+msgid "No column for the specified column existing."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1423
+msgid "No column for the specified column position existing."
+msgstr ""
+
+#: ../src/common/utilscmn.cpp:1049
+msgid "No default application configured for HTML files."
+msgstr ""
+
+#: ../src/generic/helpext.cpp:449
+msgid "No entries found."
+msgstr "No se han encontrado documentos."
+
+#: ../src/common/fontmap.cpp:421
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found,\n"
+"but an alternative encoding '%s' is available.\n"
+"Do you want to use this encoding (otherwise you will have to choose another "
+"one)?"
+msgstr ""
+"No hay un tipo de letra para la codificación '%s',\n"
+"pero existe una codificación '%s' alternativa.\n"
+"¿Le gustaría usar esta codificación (de otra forma deberá elegir otra)?"
+
+#: ../src/common/fontmap.cpp:426
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found.\n"
+"Would you like to select a font to be used for this encoding\n"
+"(otherwise the text in this encoding will not be shown correctly)?"
+msgstr ""
+"No existe un tipo de letra para la codificación '%s'.\n"
+"¿Le gustaría seleccionar una fuente para usarse con esta codificación\n"
+"(de otra forma el texto con esta codificación no se mostrará correctamente)?"
+
+#: ../src/generic/animateg.cpp:142
+msgid "No handler found for animation type."
+msgstr "No se ha encontrado ningún manipulador para el tipo de animación."
+
+#: ../src/common/image.cpp:2591
+msgid "No handler found for image type."
+msgstr "No se ha encontrado ningún manipulador para el tipo de imagen."
+
+#: ../src/common/image.cpp:2599 ../src/common/image.cpp:2710
+#: ../src/common/image.cpp:2763
+#, c-format
+msgid "No image handler for type %d defined."
+msgstr "No hay definido ningún manipulador de imagen para tipo %d."
+
+#: ../src/common/image.cpp:2733 ../src/common/image.cpp:2777
+#, c-format
+msgid "No image handler for type %s defined."
+msgstr "No hay definido ningún manipulador de imagen para tipo %s."
+
+#: ../src/html/helpwnd.cpp:871
+msgid "No matching page found yet"
+msgstr "Todavía no se ha encontrado una página con coincidencias"
+
+#: ../src/osx/carbon/dataview.cpp:1676 ../src/osx/carbon/dataview.cpp:1786
+msgid "No renderer or invalid renderer type specified for custom data column."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1424
+msgid "No renderer specified for column."
+msgstr ""
+
+#: ../src/unix/sound.cpp:81
+msgid "No sound"
+msgstr "No hay ningún sonido"
+
+#: ../src/common/image.cpp:2166 ../src/common/image.cpp:2207
+msgid "No unused colour in image being masked."
+msgstr "No hay ningún color sin utilizar en la imagen que se está enmascarando"
+
+#: ../src/common/image.cpp:3236
+msgid "No unused colour in image."
+msgstr "No hay ningún color sin usar en la imagen."
+
+#: ../src/generic/helpext.cpp:306
+#, c-format
+msgid "No valid mappings found in the file \"%s\"."
+msgstr "No se han encontrado mapeados válidos en el archivo \"%s\"."
+
+#: ../src/richtext/richtextborderspage.cpp:542
+#: ../src/richtext/richtextsizepage.cpp:248
+#: ../src/richtext/richtextsizepage.cpp:252
+#, fuzzy
+msgid "None"
+msgstr "(Ninguno)"
+
+#: ../src/common/fmapbase.cpp:157
+msgid "Nordic (ISO-8859-10)"
+msgstr "Nordic (ISO-8859-10)"
+
+#: ../src/generic/fontdlgg.cpp:328 ../src/generic/fontdlgg.cpp:331
+msgid "Normal"
+msgstr "Normal"
+
+#: ../src/html/helpwnd.cpp:1276
+msgid "Normal face<br>and <u>underlined</u>. "
+msgstr "Nnormal<br>y <u>subrayado</u>. "
+
+#: ../src/html/helpwnd.cpp:1218
+msgid "Normal font:"
+msgstr "Fuente normal:"
+
+#: ../src/propgrid/props.cpp:887
+#, fuzzy, c-format
+msgid "Not %s"
+msgstr "Acerca de"
+
+#: ../include/wx/filename.h:586 ../include/wx/filename.h:591
+#, fuzzy
+msgid "Not available"
+msgstr "¡No está disponible el soporte XBM!"
+
+#: ../src/richtext/richtextfontpage.cpp:340
+msgid "Not underlined"
+msgstr "No subrayado"
+
+#: ../src/common/paper.cpp:116
+msgid "Note, 8 1/2 x 11 in"
+msgstr "Nota, 8 1/2 x 11 in"
+
+#: ../src/generic/notifmsgg.cpp:104
+#, fuzzy
+msgid "Notice"
+msgstr "&Notas:"
+
+#: ../src/osx/carbon/dataview.cpp:902
+#, fuzzy
+msgid "Number of columns could not be determined."
+msgstr "No se pudo abrir el archivo."
+
+#: ../src/richtext/richtextliststylepage.cpp:487
+#: ../src/richtext/richtextbulletspage.cpp:292
+msgid "Numbered outline"
+msgstr ""
+
+#: ../include/wx/msgdlg.h:273 ../src/richtext/richtextstyledlg.cpp:297
+#: ../src/common/stockitem.cpp:178 ../src/msw/msgdlg.cpp:489
+#: ../src/msw/msgdlg.cpp:799 ../src/msw/dialog.cpp:120
+#: ../src/gtk1/fontdlg.cpp:138
+msgid "OK"
+msgstr "Aceptar"
+
+#: ../src/msw/ole/automtn.cpp:681
+#, c-format
+msgid "OLE Automation error in %s: %s"
+msgstr ""
+
+#: ../include/wx/richtext/richtextimagedlg.h:39
+#, fuzzy
+msgid "Object Properties"
+msgstr "&Propiedades"
+
+#: ../src/msw/ole/automtn.cpp:649
+msgid "Object implementation does not support named arguments."
+msgstr ""
+
+#: ../src/common/xtixml.cpp:264
+msgid "Objects must have an id attribute"
+msgstr "Los objetos deben tener un atributo de identificación"
+
+#: ../src/common/docview.cpp:1755 ../src/common/docview.cpp:1797
+msgid "Open File"
+msgstr "Abrir archivo"
+
+#: ../src/html/helpwnd.cpp:684 ../src/html/helpwnd.cpp:1557
+msgid "Open HTML document"
+msgstr "Abrir documento HTML"
+
+#: ../src/generic/dbgrptg.cpp:163
+#, c-format
+msgid "Open file \"%s\""
+msgstr "Abrir archivo \"%s\""
+
+#: ../src/common/stockitem.cpp:179
+#, fuzzy
+msgid "Open..."
+msgstr "A&brir..."
+
+#: ../src/osx/carbon/glcanvas.cpp:48
+#, c-format
+msgid "OpenGL function \"%s\" failed: %s (error %d)"
+msgstr ""
+
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:821
+msgid "Operation not permitted."
+msgstr "Operación no permitida"
+
+#: ../src/common/cmdline.cpp:735
+#, fuzzy, c-format
+msgid "Option '%s' can't be negated"
+msgstr "No pudo crearse directorio '%s'"
+
+#: ../src/common/cmdline.cpp:899
+#, c-format
+msgid "Option '%s' requires a value."
+msgstr "El parámetro '%s' necesita un valor."
+
+#: ../src/common/cmdline.cpp:982
+#, c-format
+msgid "Option '%s': '%s' cannot be converted to a date."
+msgstr "El parámetro '%s': '%s' no puede convertirse a fecha."
+
+#: ../src/generic/dirdlgg.cpp:187 ../src/generic/prntdlgg.cpp:618
+msgid "Options"
+msgstr "Opciones"
+
+#: ../src/generic/prntdlgg.cpp:615 ../src/generic/prntdlgg.cpp:869
+msgid "Orientation"
+msgstr "Orientación"
+
+#: ../src/common/windowid.cpp:259
+msgid "Out of window IDs.  Recommend shutting down application."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:400
+#: ../src/richtext/richtextborderspage.cpp:533
+#, fuzzy
+msgid "Outline"
+msgstr "Nivel de &Lista:"
+
+#: ../src/richtext/richtextborderspage.cpp:550
+msgid "Outset"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:645
+msgid "Overflow while coercing argument values."
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:84
+msgid "PAGEDOWN"
+msgstr "AVANZAPÁGINA"
+
+#: ../src/common/accelcmn.cpp:83
+msgid "PAGEUP"
+msgstr "RETROCEDEPÁGINA"
+
+#: ../src/common/accelcmn.cpp:69
+msgid "PAUSE"
+msgstr "PAUSA"
+
+#: ../src/common/imagpcx.cpp:457 ../src/common/imagpcx.cpp:480
+msgid "PCX: couldn't allocate memory"
+msgstr "PCX: no pudo reservarse memoria"
+
+#: ../src/common/imagpcx.cpp:456
+msgid "PCX: image format unsupported"
+msgstr "PCX: formato de imagen no soportado"
+
+#: ../src/common/imagpcx.cpp:479
+msgid "PCX: invalid image"
+msgstr "PCX: imagen inválida"
+
+#: ../src/common/imagpcx.cpp:442
+msgid "PCX: this is not a PCX file."
+msgstr "PCX: éste no es un archivo PCX."
+
+#: ../src/common/imagpcx.cpp:459 ../src/common/imagpcx.cpp:481
+msgid "PCX: unknown error !!!"
+msgstr "PCX: ¡¡¡error desconocido!!!"
+
+#: ../src/common/imagpcx.cpp:458
+msgid "PCX: version number too low"
+msgstr "PCX: número de versión demasiado antigua"
+
+#: ../src/common/accelcmn.cpp:55
+msgid "PGDN"
+msgstr "AVPÁG"
+
+#: ../src/common/accelcmn.cpp:54
+msgid "PGUP"
+msgstr "REPÁG"
+
+#: ../src/common/imagpnm.cpp:91
+msgid "PNM: Couldn't allocate memory."
+msgstr "PNM: No se pudo reservar memoria."
+
+#: ../src/common/imagpnm.cpp:73
+msgid "PNM: File format is not recognized."
+msgstr "PNM: Formato de archivo no reconocido."
+
+#: ../src/common/imagpnm.cpp:112 ../src/common/imagpnm.cpp:134
+#: ../src/common/imagpnm.cpp:156
+msgid "PNM: File seems truncated."
+msgstr "PNM: El archivo parece estar truncado."
+
+#: ../src/common/paper.cpp:188
+msgid "PRC 16K 146 x 215 mm"
+msgstr "PRC 16K 146 x 215 mm"
+
+#: ../src/common/paper.cpp:201
+msgid "PRC 16K Rotated"
+msgstr "PRC 16K Girado"
+
+#: ../src/common/paper.cpp:189
+msgid "PRC 32K 97 x 151 mm"
+msgstr "PRC 32K 97 x 151 mm"
+
+#: ../src/common/paper.cpp:202
+msgid "PRC 32K Rotated"
+msgstr "PRC 32K Girado"
+
+#: ../src/common/paper.cpp:190
+msgid "PRC 32K(Big) 97 x 151 mm"
+msgstr "PRC 32K(Grande) 97 x 151 mm"
+
+#: ../src/common/paper.cpp:203
+msgid "PRC 32K(Big) Rotated"
+msgstr "PRC 32K(Grande) Girado"
+
+#: ../src/common/paper.cpp:191
+msgid "PRC Envelope #1 102 x 165 mm"
+msgstr "PRC Envelope #1 102 x 165 mm"
+
+#: ../src/common/paper.cpp:204
+msgid "PRC Envelope #1 Rotated 165 x 102 mm"
+msgstr "PRC Envelope #1 Girado 165 x 102 mm"
+
+#: ../src/common/paper.cpp:200
+msgid "PRC Envelope #10 324 x 458 mm"
+msgstr "PRC Envelope #10 324 x 458 mm"
+
+#: ../src/common/paper.cpp:213
+msgid "PRC Envelope #10 Rotated 458 x 324 mm"
+msgstr "PRC Envelope #10 Girado 458 x 324 mm"
+
+#: ../src/common/paper.cpp:192
+msgid "PRC Envelope #2 102 x 176 mm"
+msgstr "PRC Envelope #2 102 x 176 mm"
+
+#: ../src/common/paper.cpp:205
+msgid "PRC Envelope #2 Rotated 176 x 102 mm"
+msgstr "PRC Envelope #2 Girado 176 x 102 mm"
+
+#: ../src/common/paper.cpp:193
+msgid "PRC Envelope #3 125 x 176 mm"
+msgstr "PRC Envelope #3 125 x 176 mm"
+
+#: ../src/common/paper.cpp:206
+msgid "PRC Envelope #3 Rotated 176 x 125 mm"
+msgstr "PRC Envelope #3 Girado 176 x 125 mm"
+
+#: ../src/common/paper.cpp:194
+msgid "PRC Envelope #4 110 x 208 mm"
+msgstr "PRC Envelope #4 110 x 208 mm"
+
+#: ../src/common/paper.cpp:207
+msgid "PRC Envelope #4 Rotated 208 x 110 mm"
+msgstr "PRC Envelope #4 Girado 208 x 110 mm"
+
+#: ../src/common/paper.cpp:195
+msgid "PRC Envelope #5 110 x 220 mm"
+msgstr "PRC Envelope #5 110 x 220 mm"
+
+#: ../src/common/paper.cpp:208
+msgid "PRC Envelope #5 Rotated 220 x 110 mm"
+msgstr "PRC Envelope #5 Girado 220 x 110 mm"
+
+#: ../src/common/paper.cpp:196
+msgid "PRC Envelope #6 120 x 230 mm"
+msgstr "PRC Envelope #6 120 x 230 mm"
+
+#: ../src/common/paper.cpp:209
+msgid "PRC Envelope #6 Rotated 230 x 120 mm"
+msgstr "PRC Envelope #6 Girado 230 x 120 mm"
+
+#: ../src/common/paper.cpp:197
+msgid "PRC Envelope #7 160 x 230 mm"
+msgstr "PRC Envelope #7 160 x 230 mm"
+
+#: ../src/common/paper.cpp:210
+msgid "PRC Envelope #7 Rotated 230 x 160 mm"
+msgstr "PRC Envelope #7 Girado 230 x 160 mm"
+
+#: ../src/common/paper.cpp:198
+msgid "PRC Envelope #8 120 x 309 mm"
+msgstr "PRC Envelope #8 120 x 309 mm"
+
+#: ../src/common/paper.cpp:211
+msgid "PRC Envelope #8 Rotated 309 x 120 mm"
+msgstr "PRC Envelope #8 Girado 309 x 120 mm"
+
+#: ../src/common/paper.cpp:199
+msgid "PRC Envelope #9 229 x 324 mm"
+msgstr "PRC Envelope #9 229 x 324 mm"
+
+#: ../src/common/paper.cpp:212
+msgid "PRC Envelope #9 Rotated 324 x 229 mm"
+msgstr "PRC Envelope #9 Girado 324 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:72
+msgid "PRINT"
+msgstr "IMPRIMIR"
+
+#: ../src/richtext/richtextmarginspage.cpp:286
+#, fuzzy
+msgid "Padding"
+msgstr "leyendo"
+
+#: ../src/common/prntbase.cpp:2044
+#, c-format
+msgid "Page %d"
+msgstr "Página %d"
+
+#: ../src/common/prntbase.cpp:2042
+#, c-format
+msgid "Page %d of %d"
+msgstr "Página %d de %d"
+
+#: ../src/gtk/print.cpp:774
+msgid "Page Setup"
+msgstr "Configurar Página"
+
+#: ../src/generic/prntdlgg.cpp:828 ../src/common/prntbase.cpp:467
+msgid "Page setup"
+msgstr "Configurar página"
+
+#: ../src/generic/prntdlgg.cpp:216
+msgid "Pages"
+msgstr "Páginas"
+
+#: ../src/generic/prntdlgg.cpp:602 ../src/generic/prntdlgg.cpp:801
+#: ../src/generic/prntdlgg.cpp:842 ../src/generic/prntdlgg.cpp:855
+#: ../src/generic/prntdlgg.cpp:1052 ../src/generic/prntdlgg.cpp:1057
+msgid "Paper size"
+msgstr "Tamaño del papel"
+
+#: ../src/richtext/richtextstyles.cpp:1058
+msgid "Paragraph styles"
+msgstr "estilos de párrafo"
+
+#: ../src/common/xtistrm.cpp:469
+msgid "Passing a already registered object to SetObject"
+msgstr "Paso de un objeto ya registrado a SetObject"
+
+#: ../src/common/xtistrm.cpp:480
+#, fuzzy
+msgid "Passing an unknown object to GetObject"
+msgstr "Paso de un objeto desconocido a GetObject"
+
+#: ../src/richtext/richtextctrl.cpp:3117 ../src/common/stockitem.cpp:180
+#: ../src/stc/stc_i18n.cpp:19
+msgid "Paste"
+msgstr "Pegar"
+
+#: ../src/common/stockitem.cpp:262
+msgid "Paste selection"
+msgstr "Pegar selección"
+
+#: ../src/richtext/richtextliststylepage.cpp:222
+#: ../src/richtext/richtextbulletspage.cpp:172
+msgid "Peri&od"
+msgstr "Peri&odo"
+
+#: ../src/generic/filectrlg.cpp:465
+msgid "Permissions"
+msgstr "Permisos"
+
+#: ../src/richtext/richtextbuffer.cpp:11942
+#, fuzzy
+msgid "Picture Properties"
+msgstr "&Propiedades"
+
+#: ../include/wx/unix/pipe.h:47
+msgid "Pipe creation failed"
+msgstr "Error en la creación de la tubería"
+
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Please choose a valid font."
+msgstr "Por favor elija una fuente válida."
+
+#: ../src/gtk/filedlg.cpp:72
+msgid "Please choose an existing file."
+msgstr "Por favor, elija un archivo existente."
+
+#: ../src/html/helpwnd.cpp:813
+msgid "Please choose the page to display:"
+msgstr "Por favor elija la página que quiere presentar:"
+
+#: ../src/msw/dialup.cpp:785
+msgid "Please choose which ISP do you want to connect to"
+msgstr "Por favor elija el ISP al que se quiere conectar"
+
+#: ../src/msw/listctrl.cpp:372
+#, c-format
+msgid ""
+"Please install a newer version of comctl32.dll\n"
+"(at least version 4.70 is required but you have %d.%02d)\n"
+"or this program won't operate correctly."
+msgstr ""
+"Por favor instale una versión más nueva de comctl32.dll\n"
+"(se necesita al menos la versión 4.70 pero Ud. tiene %d.%02d)\n"
+"o este programa no funcionará correctamente."
+
+#: ../src/common/headerctrlcmn.cpp:59
+msgid "Please select the columns to show and define their order:"
+msgstr ""
+
+#: ../src/common/prntbase.cpp:521
+#, fuzzy
+msgid "Please wait while printing..."
+msgstr "Imprimiendo. Por favor espere\n"
+
+#: ../src/propgrid/advprops.cpp:631
+#, fuzzy
+msgid "Point Size"
+msgstr "Tamaño de &punto:"
+
+#: ../src/osx/carbon/dataview.cpp:1278 ../src/osx/carbon/dataview.cpp:1329
+#: ../src/osx/carbon/dataview.cpp:1420 ../src/osx/carbon/dataview.cpp:1443
+#: ../src/osx/carbon/dataview.cpp:1460 ../src/osx/carbon/dataview.cpp:1477
+#: ../src/osx/carbon/dataview.cpp:1670 ../src/osx/carbon/dataview.cpp:1779
+#: ../src/osx/carbon/dataview.cpp:1821 ../src/osx/carbon/dataview.cpp:1874
+#: ../src/osx/carbon/dataview.cpp:1997
+msgid "Pointer to data view control not set correctly."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1279 ../src/osx/carbon/dataview.cpp:1338
+#: ../src/osx/carbon/dataview.cpp:1421 ../src/osx/carbon/dataview.cpp:1478
+#: ../src/osx/carbon/dataview.cpp:1671 ../src/osx/carbon/dataview.cpp:1780
+#: ../src/osx/carbon/dataview.cpp:1822 ../src/osx/carbon/dataview.cpp:1875
+#: ../src/osx/carbon/dataview.cpp:1998
+msgid "Pointer to model not set correctly."
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:612 ../src/generic/prntdlgg.cpp:867
+msgid "Portrait"
+msgstr "Vertical"
+
+#: ../src/richtext/richtextsizepage.cpp:496
+#, fuzzy
+msgid "Position"
+msgstr "Pregunta"
+
+#: ../src/generic/prntdlgg.cpp:298
+msgid "PostScript file"
+msgstr "Archivo PostScript"
+
+#: ../src/common/stockitem.cpp:181
+#, fuzzy
+msgid "Preferences"
+msgstr "&Preferencias"
+
+#: ../src/osx/menu_osx.cpp:643
+#, fuzzy
+msgid "Preferences..."
+msgstr "&Preferencias"
+
+#: ../src/common/prntbase.cpp:529
+msgid "Preparing"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:455 ../src/osx/carbon/fontdlg.cpp:576
+#: ../src/html/helpwnd.cpp:1235
+msgid "Preview:"
+msgstr "Previsualización:"
+
+#: ../src/common/prntbase.cpp:1523 ../src/html/helpwnd.cpp:677
+msgid "Previous page"
+msgstr "Página anterior"
+
+#: ../src/generic/prntdlgg.cpp:143 ../src/generic/prntdlgg.cpp:157
+#: ../src/common/prntbase.cpp:409 ../src/common/prntbase.cpp:1511
+#: ../src/gtk/print.cpp:584 ../src/gtk/print.cpp:597
+msgid "Print"
+msgstr "Imprimir"
+
+#: ../include/wx/prntbase.h:395 ../src/common/docview.cpp:1250
+msgid "Print Preview"
+msgstr "Previsualización de la impresión"
+
+#: ../src/common/prntbase.cpp:1985 ../src/common/prntbase.cpp:2027
+#: ../src/common/prntbase.cpp:2035
+msgid "Print Preview Failure"
+msgstr "Error en previsualización de impresión"
+
+#: ../src/generic/prntdlgg.cpp:224
+msgid "Print Range"
+msgstr "Rango de Impresión"
+
+#: ../src/generic/prntdlgg.cpp:449
+msgid "Print Setup"
+msgstr "Configuración de Impresión"
+
+#: ../src/generic/prntdlgg.cpp:621
+msgid "Print in colour"
+msgstr "Impresión en color"
+
+#: ../src/common/stockitem.cpp:182
+#, fuzzy
+msgid "Print previe&w..."
+msgstr "&Vista previa de impresión"
+
+#: ../src/common/docview.cpp:1244
+#, fuzzy
+msgid "Print preview creation failed."
+msgstr "Error en la creación de la tubería"
+
+#: ../src/common/stockitem.cpp:182
+#, fuzzy
+msgid "Print preview..."
+msgstr "Vista previa de impresión"
+
+#: ../src/generic/prntdlgg.cpp:630
+msgid "Print spooling"
+msgstr "Cola de Impresión"
+
+#: ../src/html/helpwnd.cpp:688
+msgid "Print this page"
+msgstr "Imprimir esta página"
+
+#: ../src/generic/prntdlgg.cpp:185
+msgid "Print to File"
+msgstr "Imprimir a Archivo "
+
+#: ../src/common/stockitem.cpp:183
+#, fuzzy
+msgid "Print..."
+msgstr "Im&primir..."
+
+#: ../src/generic/prntdlgg.cpp:493
+msgid "Printer"
+msgstr "Impresora"
+
+#: ../src/generic/prntdlgg.cpp:633
+msgid "Printer command:"
+msgstr "Comando de impresión: "
+
+#: ../src/generic/prntdlgg.cpp:180
+msgid "Printer options"
+msgstr "Opciones de impresión"
+
+#: ../src/generic/prntdlgg.cpp:645
+msgid "Printer options:"
+msgstr "Opciones de impresora:"
+
+#: ../src/generic/prntdlgg.cpp:916
+msgid "Printer..."
+msgstr "Impresora..."
+
+#: ../src/generic/prntdlgg.cpp:196
+msgid "Printer:"
+msgstr "Impresora:"
+
+#: ../include/wx/richtext/richtextprint.h:163 ../src/common/prntbase.cpp:518
+#: ../src/html/htmprint.cpp:277
+#, fuzzy
+msgid "Printing"
+msgstr "Imprimiendo"
+
+#: ../src/common/prntbase.cpp:586
+msgid "Printing "
+msgstr "Imprimiendo"
+
+#: ../src/common/prntbase.cpp:330
+msgid "Printing Error"
+msgstr "Error de impresión"
+
+#: ../src/common/prntbase.cpp:544
+#, fuzzy, c-format
+msgid "Printing page %d of %d"
+msgstr "Imprimiendo página %d..."
+
+#: ../src/generic/printps.cpp:201
+#, c-format
+msgid "Printing page %d..."
+msgstr "Imprimiendo página %d..."
+
+#: ../src/generic/printps.cpp:161
+msgid "Printing..."
+msgstr "Imprimiendo..."
+
+#: ../include/wx/richtext/richtextprint.h:109 ../include/wx/prntbase.h:263
+#: ../src/common/docview.cpp:2124
+#, fuzzy
+msgid "Printout"
+msgstr "Imprimir"
+
+#: ../src/common/debugrpt.cpp:565
+#, c-format
+msgid ""
+"Processing debug report has failed, leaving the files in \"%s\" directory."
+msgstr ""
+"El procesado del informe de depuración ha fallado, los archivos quedan en el "
+"directorio \"%s\"."
+
+#: ../src/osx/carbon/dataview.cpp:2472
+msgid "Progress renderer cannot render value type; value type: "
+msgstr ""
+
+#: ../src/common/prntbase.cpp:528
+msgid "Progress:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:184
+#, fuzzy
+msgid "Properties"
+msgstr "&Propiedades"
+
+#: ../src/propgrid/manager.cpp:237
+#, fuzzy
+msgid "Property"
+msgstr "&Propiedades"
+
+#: ../src/propgrid/propgrid.cpp:3144 ../src/propgrid/propgrid.cpp:3276
+#, fuzzy
+msgid "Property Error"
+msgstr "Error de impresión"
+
+#: ../src/common/paper.cpp:113
+msgid "Quarto, 215 x 275 mm"
+msgstr "Quarto, 215 x 275 mm"
+
+#: ../src/generic/logg.cpp:1036
+msgid "Question"
+msgstr "Pregunta"
+
+#: ../src/common/stockitem.cpp:156
+#, fuzzy
+msgid "Quit"
+msgstr "&Salir"
+
+#: ../src/osx/menu_osx.cpp:610 ../src/osx/menu_osx.cpp:657
+#, fuzzy, c-format
+msgid "Quit %s"
+msgstr "&Salir"
+
+#: ../src/common/stockitem.cpp:263
+msgid "Quit this program"
+msgstr "Salir de este programa"
+
+#: ../src/common/accelcmn.cpp:53
+msgid "RETURN"
+msgstr "RETURN"
+
+#: ../src/common/accelcmn.cpp:57
+msgid "RIGHT"
+msgstr "DERECHA"
+
+#: ../src/common/accelcmn.cpp:327
+#, fuzzy
+msgid "RawCtrl+"
+msgstr "Ctrl-"
+
+#: ../src/common/ffile.cpp:113 ../src/common/ffile.cpp:134
+#, c-format
+msgid "Read error on file '%s'"
+msgstr "Error de lectura en el archivo '%s'"
+
+#: ../src/common/prntbase.cpp:257
+msgid "Ready"
+msgstr "Listo"
+
+#: ../src/common/stockitem.cpp:185 ../src/stc/stc_i18n.cpp:16
+#, fuzzy
+msgid "Redo"
+msgstr "&Rehacer"
+
+#: ../src/common/stockitem.cpp:264
+msgid "Redo last action"
+msgstr "Rehacer la última acción"
+
+#: ../src/common/stockitem.cpp:186
+msgid "Refresh"
+msgstr "Refrescar"
+
+#: ../src/msw/registry.cpp:625
+#, c-format
+msgid "Registry key '%s' already exists."
+msgstr "La clave del registro '%s' ya existe."
+
+#: ../src/msw/registry.cpp:594
+#, c-format
+msgid "Registry key '%s' does not exist, cannot rename it."
+msgstr "La clave del registro '%s' no existe, no se puede renombrar."
+
+#: ../src/msw/registry.cpp:726
+#, c-format
+msgid ""
+"Registry key '%s' is needed for normal system operation,\n"
+"deleting it will leave your system in unusable state:\n"
+"operation aborted."
+msgstr ""
+"La clave del registro '%s' se necesita para el funcionamiento normal del "
+"sistema,\n"
+"si se elimina puede dejar el sistema en un estado inestable:\n"
+"operación abortada."
+
+#: ../src/msw/registry.cpp:520
+#, c-format
+msgid "Registry value '%s' already exists."
+msgstr "La clave del registro '%s' ya existe."
+
+#: ../src/richtext/richtextfontpage.cpp:332
+#: ../src/richtext/richtextfontpage.cpp:336
+msgid "Regular"
+msgstr "Normal"
+
+#: ../src/richtext/richtextsizepage.cpp:519
+#, fuzzy
+msgid "Relative"
+msgstr "Decorative"
+
+#: ../src/generic/helpext.cpp:462
+msgid "Relevant entries:"
+msgstr "Documentos significantivos:"
+
+#: ../include/wx/generic/progdlgg.h:86
+#, fuzzy
+msgid "Remaining time:"
+msgstr "Tiempo restante : "
+
+#: ../src/common/stockitem.cpp:187
+msgid "Remove"
+msgstr "Eliminar"
+
+#: ../src/richtext/richtextctrl.cpp:1430
+#, fuzzy
+msgid "Remove Bullet"
+msgstr "Eliminar"
+
+#: ../src/html/helpwnd.cpp:440
+msgid "Remove current page from bookmarks"
+msgstr "Eliminar la página actual de favoritos"
+
+#: ../src/common/rendcmn.cpp:194
+#, c-format
+msgid "Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."
+msgstr ""
+"El renderizador \"%s\" tiene una versión %d.%d incompatible y no se ha "
+"podido abrir."
+
+#: ../src/osx/carbon/dataview.cpp:1430
+#, fuzzy
+msgid "Rendering failed."
+msgstr "Error en la creación del temporizador"
+
+#: ../src/richtext/richtextbuffer.cpp:4214
+msgid "Renumber List"
+msgstr "Renumerar Lista"
+
+#: ../src/common/stockitem.cpp:188
+msgid "Rep&lace"
+msgstr "&Sustituir"
+
+#: ../src/richtext/richtextctrl.cpp:3277 ../src/common/stockitem.cpp:188
+msgid "Replace"
+msgstr "Sustituir"
+
+#: ../src/generic/fdrepdlg.cpp:182
+msgid "Replace &all"
+msgstr "Sustituir &todo"
+
+#: ../src/common/stockitem.cpp:261
+msgid "Replace selection"
+msgstr "Reemplazar selección"
+
+#: ../src/generic/fdrepdlg.cpp:124
+msgid "Replace with:"
+msgstr "Sustituir por:"
+
+#: ../src/common/valtext.cpp:161
+msgid "Required information entry is empty."
+msgstr ""
+
+#: ../src/common/translation.cpp:1966
+#, fuzzy, c-format
+msgid "Resource '%s' is not a valid message catalog."
+msgstr "'%s' no es un catálogo de mensajes válido."
+
+#: ../src/common/stockitem.cpp:189
+msgid "Revert to Saved"
+msgstr "Recuperar versión guardada"
+
+#: ../src/richtext/richtextborderspage.cpp:548
+#, fuzzy
+msgid "Ridge"
+msgstr "Derecha"
+
+#: ../src/richtext/richtextliststylepage.cpp:251
+#: ../src/richtext/richtextbulletspage.cpp:201
+#: ../src/richtext/richtextsizepage.cpp:250
+msgid "Right"
+msgstr "Derecha"
+
+#: ../src/generic/prntdlgg.cpp:892
+msgid "Right margin (mm):"
+msgstr "Margen derecho (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:148
+#: ../src/richtext/richtextindentspage.cpp:150
+#: ../src/richtext/richtextliststylepage.cpp:337
+#: ../src/richtext/richtextliststylepage.cpp:339
+msgid "Right-align text."
+msgstr "Texto alineado a la derecha."
+
+#: ../src/generic/fontdlgg.cpp:322
+msgid "Roman"
+msgstr "Roman"
+
+#: ../src/richtext/richtextliststylepage.cpp:299
+#: ../src/richtext/richtextbulletspage.cpp:252
+msgid "S&tandard bullet name:"
+msgstr "Nombre de viñeta es&tándar:"
+
+#: ../src/common/accelcmn.cpp:82
+msgid "SCROLL_LOCK"
+msgstr "BLOQ_DESPL"
+
+#: ../src/common/accelcmn.cpp:71
+msgid "SELECT"
+msgstr "SELECCIONAR"
+
+#: ../src/common/accelcmn.cpp:77
+msgid "SEPARATOR"
+msgstr "SEPARADOR"
+
+#: ../src/common/accelcmn.cpp:74
+msgid "SNAPSHOT"
+msgstr "IMP_PANT"
+
+#: ../src/common/accelcmn.cpp:62
+msgid "SPACE"
+msgstr "ESPACIO"
+
+#: ../src/common/accelcmn.cpp:257 ../src/common/accelcmn.cpp:339
+msgid "SPECIAL"
+msgstr "ESPECIAL"
+
+#: ../src/common/accelcmn.cpp:78
+msgid "SUBTRACT"
+msgstr "RESTAR"
+
+#: ../src/common/stockitem.cpp:190 ../src/common/sizer.cpp:2678
+msgid "Save"
+msgstr "&Guardar"
+
+#: ../src/common/fldlgcmn.cpp:327
+#, c-format
+msgid "Save %s file"
+msgstr "Guardar el archivo %s"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save &As..."
+msgstr "Guardar &como..."
+
+#: ../src/common/docview.cpp:360
+#, fuzzy
+msgid "Save As"
+msgstr "Guardar como"
+
+#: ../src/common/stockitem.cpp:191
+#, fuzzy
+msgid "Save as"
+msgstr "Guardar como"
+
+#: ../src/common/stockitem.cpp:267
+msgid "Save current document"
+msgstr "Guardar documento actual"
+
+#: ../src/common/stockitem.cpp:268
+msgid "Save current document with a different filename"
+msgstr "Grabar el documento actual con otro nombre"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save log contents to file"
+msgstr "Guardar los contenidos del log a un archivo"
+
+#: ../src/generic/fontdlgg.cpp:325
+msgid "Script"
+msgstr "Script"
+
+#: ../src/generic/srchctlg.cpp:67 ../src/html/helpwnd.cpp:548
+#: ../src/html/helpwnd.cpp:563
+msgid "Search"
+msgstr "Buscar"
+
+#: ../src/html/helpwnd.cpp:550
+#, fuzzy
+msgid ""
+"Search contents of help book(s) for all occurrences of the text you typed "
+"above"
+msgstr ""
+"Buscar contenidos en libro(s) de ayuda para todas las ocurrencias del texto "
+"escrito"
+
+#: ../src/generic/fdrepdlg.cpp:160
+msgid "Search direction"
+msgstr "Dirección de búsqueda"
+
+#: ../src/generic/fdrepdlg.cpp:112
+msgid "Search for:"
+msgstr "Buscar:"
+
+#: ../src/html/helpwnd.cpp:1065
+msgid "Search in all books"
+msgstr "Buscar en todos los libros"
+
+#: ../src/html/helpwnd.cpp:870
+msgid "Searching..."
+msgstr "Buscando..."
+
+#: ../src/generic/dirctrlg.cpp:546
+msgid "Sections"
+msgstr "Secciones"
+
+#: ../src/common/ffile.cpp:220
+#, c-format
+msgid "Seek error on file '%s'"
+msgstr "Buscar error en el archivo '%s'"
+
+#: ../src/common/ffile.cpp:210
+#, c-format
+msgid "Seek error on file '%s' (large files not supported by stdio)"
+msgstr ""
+"Error de acceso en el archivo '%s' (los archivos grandes no están soportados "
+"por stdio)"
+
+#: ../src/richtext/richtextctrl.cpp:330 ../src/osx/textctrl_osx.cpp:587
+#: ../src/common/stockitem.cpp:192 ../src/msw/textctrl.cpp:2288
+msgid "Select &All"
+msgstr "Seleccionar &Todo"
+
+#: ../src/common/stockitem.cpp:192 ../src/stc/stc_i18n.cpp:21
+#, fuzzy
+msgid "Select All"
+msgstr "Seleccionar &Todo"
+
+#: ../src/common/docview.cpp:1877
+msgid "Select a document template"
+msgstr "Seleccionar una plantilla de documento"
+
+#: ../src/common/docview.cpp:1951
+msgid "Select a document view"
+msgstr "Seleccionar una vista de documento"
+
+#: ../src/richtext/richtextfontpage.cpp:235
+#: ../src/richtext/richtextfontpage.cpp:237
+msgid "Select regular or bold."
+msgstr "Seleccionar normal o negrita."
+
+#: ../src/richtext/richtextfontpage.cpp:222
+#: ../src/richtext/richtextfontpage.cpp:224
+msgid "Select regular or italic style."
+msgstr "Seleccionar estilo normal o cursiva."
+
+#: ../src/richtext/richtextfontpage.cpp:248
+#: ../src/richtext/richtextfontpage.cpp:250
+msgid "Select underlining or no underlining."
+msgstr "Seleccionar subrayado o no subrayado."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Selection"
+msgstr "Selección"
+
+#: ../src/richtext/richtextliststylepage.cpp:187
+#: ../src/richtext/richtextliststylepage.cpp:189
+msgid "Selects the list level to edit."
+msgstr "Selecciona el nivel de lista a editar."
+
+#: ../src/common/cmdline.cpp:918
+#, c-format
+msgid "Separator expected after the option '%s'."
+msgstr "Se esperaba separador después de opción '%s'."
+
+#: ../src/richtext/richtextbuffer.cpp:10513
+#, fuzzy
+msgid "Set Cell Style"
+msgstr "Eliminar Estilo"
+
+#: ../include/wx/xtiprop.h:179
+msgid "SetProperty called w/o valid setter"
+msgstr "Se llamó a SetProperty sin un establecedor válido"
+
+#: ../src/common/filename.cpp:2632
+msgid "Setting directory access times is not supported under this OS version"
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:188
+msgid "Setup..."
+msgstr "Configuración..."
+
+#: ../src/msw/dialup.cpp:563
+msgid "Several active dialup connections found, choosing one randomly."
+msgstr ""
+"Se han encontrado varias conexiones activas, eligiendo una aleatoriamente."
+
+#: ../src/common/accelcmn.cpp:324
+#, fuzzy
+msgid "Shift+"
+msgstr "Mayúsculas-"
+
+#: ../src/generic/dirdlgg.cpp:170
+msgid "Show &hidden directories"
+msgstr "Mostrar directorios &ocultos"
+
+#: ../src/generic/filectrlg.cpp:1003
+msgid "Show &hidden files"
+msgstr "Mostrar archivos &ocultos"
+
+#: ../src/osx/menu_osx.cpp:605 ../src/osx/menu_osx.cpp:652
+#, fuzzy
+msgid "Show All"
+msgstr "Mostrar todo"
+
+#: ../src/common/stockitem.cpp:257
+msgid "Show about dialog"
+msgstr "Muestra el diálogo Acerca de"
+
+#: ../src/html/helpwnd.cpp:502
+msgid "Show all"
+msgstr "Mostrar todo"
+
+#: ../src/html/helpwnd.cpp:513
+msgid "Show all items in index"
+msgstr "Mostrar todos los datos en el índice"
+
+#: ../src/generic/dirdlgg.cpp:105
+msgid "Show hidden directories"
+msgstr "Mostrar directorios ocultos"
+
+#: ../src/html/helpwnd.cpp:671
+msgid "Show/hide navigation panel"
+msgstr "Mostrar/Ocultar panel de navegación"
+
+#: ../src/richtext/richtextsymboldlg.cpp:421
+#: ../src/richtext/richtextsymboldlg.cpp:423
+msgid "Shows a Unicode subset."
+msgstr "Muestra un subjuego Unicode"
+
+#: ../src/richtext/richtextliststylepage.cpp:472
+#: ../src/richtext/richtextliststylepage.cpp:474
+#: ../src/richtext/richtextbulletspage.cpp:276
+#: ../src/richtext/richtextbulletspage.cpp:278
+msgid "Shows a preview of the bullet settings."
+msgstr "Muestra una previsualización de los opciones de viñeta."
+
+#: ../src/richtext/richtextfontpage.cpp:322
+#: ../src/richtext/richtextfontpage.cpp:324
+msgid "Shows a preview of the font settings."
+msgstr "Muestra una vista previa de la fuente."
+
+#: ../src/osx/carbon/fontdlg.cpp:580 ../src/osx/carbon/fontdlg.cpp:582
+msgid "Shows a preview of the font."
+msgstr "Muestra una vista previa de la fuente."
+
+#: ../src/richtext/richtextindentspage.cpp:303
+#: ../src/richtext/richtextindentspage.cpp:305
+msgid "Shows a preview of the paragraph settings."
+msgstr "Muestra una previsualización de las opciones de párrafo."
+
+#: ../src/generic/fontdlgg.cpp:460 ../src/generic/fontdlgg.cpp:462
+msgid "Shows the font preview."
+msgstr "Muestra la vista previa de la fuente."
+
+#: ../src/univ/themes/mono.cpp:516
+msgid "Simple monochrome theme"
+msgstr "Tema monocromo sencillo"
+
+#: ../src/richtext/richtextindentspage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:449
+msgid "Single"
+msgstr "Sencillo"
+
+#: ../src/generic/filectrlg.cpp:460 ../src/richtext/richtextformatdlg.cpp:356
+#: ../src/richtext/richtextsizepage.cpp:299
+msgid "Size"
+msgstr "Tamaño"
+
+#: ../src/osx/carbon/fontdlg.cpp:525
+msgid "Size:"
+msgstr "Tamaño:"
+
+#: ../src/generic/progdlgg.cpp:262 ../src/generic/progdlgg.cpp:773
+#: ../src/msw/progdlg.cpp:801
+msgid "Skip"
+msgstr "Saltar"
+
+#: ../src/generic/fontdlgg.cpp:330
+msgid "Slant"
+msgstr "Cursiva"
+
+#: ../src/richtext/richtextfontpage.cpp:298
+#, fuzzy
+msgid "Small C&apitals"
+msgstr "Ca&pitulares"
+
+#: ../src/richtext/richtextborderspage.cpp:543
+#, fuzzy
+msgid "Solid"
+msgstr "Gruesa"
+
+#: ../src/common/docview.cpp:1773
+msgid "Sorry, could not open this file."
+msgstr "No pudo abrirse este archivo."
+
+#: ../src/common/prntbase.cpp:2027 ../src/common/prntbase.cpp:2035
+msgid "Sorry, not enough memory to create a preview."
+msgstr "Memoria insuficiente para crear previsualización."
+
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "Sorry, that name is taken. Please choose another."
+msgstr "Lo siento, ese nombre ya está en uso. Por favor, elija otro."
+
+#: ../src/common/docview.cpp:1796
+msgid "Sorry, the format for this file is unknown."
+msgstr "Lo sentimos, el formato de este archivo se desconoce."
+
+#: ../src/unix/sound.cpp:492
+msgid "Sound data are in unsupported format."
+msgstr "Los datos de sonido están en un formato no soportado."
+
+#: ../src/unix/sound.cpp:477
+#, c-format
+msgid "Sound file '%s' is in unsupported format."
+msgstr "El archivo de sonido '%s' está en un formato no soportado."
+
+#: ../src/richtext/richtextliststylepage.cpp:467
+msgid "Spacing"
+msgstr "Espaciado"
+
+#: ../src/common/stockitem.cpp:197
+msgid "Spell Check"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:490
+#: ../src/richtext/richtextbulletspage.cpp:295
+msgid "Standard"
+msgstr "Estándar"
+
+#: ../src/common/paper.cpp:105
+msgid "Statement, 5 1/2 x 8 1/2 in"
+msgstr "Statement, 5 1/2 x 8 1/2 in"
+
+#: ../src/richtext/richtextsizepage.cpp:518
+#: ../src/richtext/richtextsizepage.cpp:523
+#, fuzzy
+msgid "Static"
+msgstr "Estado: "
+
+#: ../src/generic/prntdlgg.cpp:204
+msgid "Status:"
+msgstr "Estado: "
+
+#: ../src/common/stockitem.cpp:198
+#, fuzzy
+msgid "Stop"
+msgstr "&Detener"
+
+#: ../src/common/stockitem.cpp:199
+#, fuzzy
+msgid "Strikethrough"
+msgstr "&Tachado"
+
+#: ../src/common/colourcmn.cpp:45
+#, c-format
+msgid "String To Colour : Incorrect colour specification : %s"
+msgstr "Cadena a Color: Especificación de color '%s' incorrecta."
+
+#: ../src/richtext/richtextformatdlg.cpp:318 ../src/propgrid/advprops.cpp:647
+msgid "Style"
+msgstr "Estilo"
+
+#: ../include/wx/richtext/richtextstyledlg.h:47
+msgid "Style Organiser"
+msgstr "Organizador de Estilos"
+
+#: ../src/osx/carbon/fontdlg.cpp:534
+msgid "Style:"
+msgstr "Estilo:"
+
+#: ../src/richtext/richtextfontpage.cpp:312
+#, fuzzy
+msgid "Subscrip&t"
+msgstr "Script"
+
+#: ../src/richtext/richtextfontpage.cpp:305
+#, fuzzy
+msgid "Supe&rscript"
+msgstr "Script"
+
+#: ../src/common/paper.cpp:151
+msgid "SuperA/SuperA/A4 227 x 356 mm"
+msgstr "SuperA/SuperA/A4 227 x 356 mm"
+
+#: ../src/common/paper.cpp:152
+msgid "SuperB/SuperB/A3 305 x 487 mm"
+msgstr "SuperB/SuperB/A3 305 x 487 mm"
+
+#: ../src/generic/fontdlgg.cpp:326
+msgid "Swiss"
+msgstr "Swiss"
+
+#: ../src/richtext/richtextliststylepage.cpp:488
+#: ../src/richtext/richtextbulletspage.cpp:293
+msgid "Symbol"
+msgstr "Símbolo"
+
+#: ../src/richtext/richtextliststylepage.cpp:288
+#: ../src/richtext/richtextbulletspage.cpp:240
+msgid "Symbol &font:"
+msgstr "Fuente Símbolos:"
+
+#: ../include/wx/richtext/richtextsymboldlg.h:47
+msgid "Symbols"
+msgstr "Símbolos"
+
+#: ../src/common/accelcmn.cpp:63
+msgid "TAB"
+msgstr "TAB"
+
+#: ../src/common/imagtiff.cpp:372 ../src/common/imagtiff.cpp:385
+#: ../src/common/imagtiff.cpp:744
+msgid "TIFF: Couldn't allocate memory."
+msgstr "TIFF: No se pudo reservar memoria."
+
+#: ../src/common/imagtiff.cpp:304
+msgid "TIFF: Error loading image."
+msgstr "TIFF: Error al abrir imagen."
+
+#: ../src/common/imagtiff.cpp:471
+msgid "TIFF: Error reading image."
+msgstr "TIFF: Error al leer imagen."
+
+#: ../src/common/imagtiff.cpp:611
+msgid "TIFF: Error saving image."
+msgstr "TIFF: Error al guardar imagen."
+
+#: ../src/common/imagtiff.cpp:849
+msgid "TIFF: Error writing image."
+msgstr "TIFF: Error al escribir imagen."
+
+#: ../src/common/imagtiff.cpp:358
+msgid "TIFF: Image size is abnormally big."
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:10794
+#, fuzzy
+msgid "Table Properties"
+msgstr "&Propiedades"
+
+#: ../src/common/paper.cpp:146
+msgid "Tabloid Extra 11.69 x 18 in"
+msgstr "Tabloide Extra 11.69 x 18 in"
+
+#: ../src/common/paper.cpp:103
+msgid "Tabloid, 11 x 17 in"
+msgstr "Tabloide, 11 x 17 in"
+
+#: ../src/richtext/richtextformatdlg.cpp:336
+msgid "Tabs"
+msgstr "Tabulaciones"
+
+#: ../src/generic/fontdlgg.cpp:327
+msgid "Teletype"
+msgstr "Teletipo"
+
+#: ../src/common/docview.cpp:1878
+msgid "Templates"
+msgstr "Plantillas"
+
+#: ../src/osx/carbon/dataview.cpp:2373
+msgid "Text renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:158
+msgid "Thai (ISO-8859-11)"
+msgstr "Tailandés (ISO-8859-11)"
+
+#: ../src/common/ftp.cpp:620
+msgid "The FTP server doesn't support passive mode."
+msgstr "El servidor FTP no soporta el modo pasivo."
+
+#: ../src/common/ftp.cpp:606
+msgid "The FTP server doesn't support the PORT command."
+msgstr "El servidor FTP no soporta el comando PORT."
+
+#: ../src/richtext/richtextliststylepage.cpp:215
+#: ../src/richtext/richtextliststylepage.cpp:217
+#: ../src/richtext/richtextbulletspage.cpp:164
+#: ../src/richtext/richtextbulletspage.cpp:166
+msgid "The available bullet styles."
+msgstr "Los estilos de viñeta disponibles."
+
+#: ../src/richtext/richtextstyledlg.cpp:202
+#: ../src/richtext/richtextstyledlg.cpp:204
+msgid "The available styles."
+msgstr "Los estilos disponibles."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:139
+#: ../src/richtext/richtextbackgroundpage.cpp:141
+#, fuzzy
+msgid "The background colour."
+msgstr "Color de fondo"
+
+#: ../src/richtext/richtextmarginspage.cpp:268
+#: ../src/richtext/richtextmarginspage.cpp:270
+#, fuzzy
+msgid "The bottom margin size."
+msgstr "Tamaño en puntos:"
+
+#: ../src/richtext/richtextmarginspage.cpp:382
+#: ../src/richtext/richtextmarginspage.cpp:384
+#, fuzzy
+msgid "The bottom padding size."
+msgstr "Tamaño en puntos:"
+
+#: ../src/richtext/richtextsizepage.cpp:639
+#: ../src/richtext/richtextsizepage.cpp:641
+#: ../src/richtext/richtextsizepage.cpp:653
+#: ../src/richtext/richtextsizepage.cpp:655
+#, fuzzy
+msgid "The bottom position."
+msgstr "La posición del tabulador."
+
+#: ../src/richtext/richtextliststylepage.cpp:254
+#: ../src/richtext/richtextliststylepage.cpp:256
+#: ../src/richtext/richtextliststylepage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:277
+#: ../src/richtext/richtextbulletspage.cpp:204
+#: ../src/richtext/richtextbulletspage.cpp:206
+#: ../src/richtext/richtextbulletspage.cpp:227
+#: ../src/richtext/richtextbulletspage.cpp:229
+msgid "The bullet character."
+msgstr "El caracter de viñeta."
+
+#: ../src/richtext/richtextsymboldlg.cpp:443
+#: ../src/richtext/richtextsymboldlg.cpp:445
+msgid "The character code."
+msgstr "El código de caracter."
+
+#: ../src/common/fontmap.cpp:203
+#, c-format
+msgid ""
+"The charset '%s' is unknown. You may select\n"
+"another charset to replace it with or choose\n"
+"[Cancel] if it cannot be replaced"
+msgstr ""
+"El conjunto de caracteres '%s' es desconocido. Puede\n"
+"seleccionar otro conjunto para reemplazarlo o elegir\n"
+"[Cancelar] si no puede ser reemplazado"
+
+#: ../src/msw/ole/dataobj.cpp:367
+#, c-format
+msgid "The clipboard format '%d' doesn't exist."
+msgstr "El formato %d del portapapeles no existe."
+
+#: ../src/richtext/richtextstylepage.cpp:128
+#: ../src/richtext/richtextstylepage.cpp:130
+msgid "The default style for the next paragraph."
+msgstr "El estilo por defecto para el siguiente párrafo."
+
+#: ../src/generic/dirdlgg.cpp:231
+#, c-format
+msgid ""
+"The directory '%s' does not exist\n"
+"Create it now?"
+msgstr ""
+"El directorio '%s' no existe\n"
+"¿Crearlo ahora?"
+
+#: ../src/html/htmprint.cpp:271
+#, c-format
+msgid ""
+"The document \"%s\" doesn't fit on the page horizontally and will be "
+"truncated if printed.\n"
+"\n"
+"Would you like to proceed with printing it nevertheless?"
+msgstr ""
+
+#: ../src/common/docview.cpp:1184
+#, c-format
+msgid ""
+"The file '%s' doesn't exist and couldn't be opened.\n"
+"It has been removed from the most recently used files list."
+msgstr ""
+"El archivo '%s' no existe y no puede abrirse.\n"
+"También ha sido eliminado de la lista de archivos recientes."
+
+#: ../src/richtext/richtextindentspage.cpp:208
+#: ../src/richtext/richtextindentspage.cpp:210
+#: ../src/richtext/richtextliststylepage.cpp:394
+#: ../src/richtext/richtextliststylepage.cpp:396
+msgid "The first line indent."
+msgstr "El escalonado de la primera línea."
+
+#: ../src/gtk/utilsgtk.cpp:427
+msgid "The following standard GTK+ options are also supported:\n"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:414 ../src/generic/fontdlgg.cpp:416
+msgid "The font colour."
+msgstr "El color de fuente."
+
+#: ../src/generic/fontdlgg.cpp:375 ../src/generic/fontdlgg.cpp:377
+msgid "The font family."
+msgstr "El tipo de fuente."
+
+#: ../src/richtext/richtextsymboldlg.cpp:405
+#: ../src/richtext/richtextsymboldlg.cpp:407
+msgid "The font from which to take the symbol."
+msgstr "La fuente de la que tomar el símbolo."
+
+#: ../src/generic/fontdlgg.cpp:427 ../src/generic/fontdlgg.cpp:429
+#: ../src/generic/fontdlgg.cpp:434 ../src/generic/fontdlgg.cpp:436
+msgid "The font point size."
+msgstr "Tamaño en puntos:"
+
+#: ../src/osx/carbon/fontdlg.cpp:529 ../src/osx/carbon/fontdlg.cpp:531
+msgid "The font size in points."
+msgstr "El tamaño de fuente en puntos."
+
+#: ../src/richtext/richtextfontpage.cpp:190
+#: ../src/richtext/richtextfontpage.cpp:192
+#, fuzzy
+msgid "The font size units, points or pixels."
+msgstr "El tamaño de fuente en puntos."
+
+#: ../src/generic/fontdlgg.cpp:386 ../src/generic/fontdlgg.cpp:388
+msgid "The font style."
+msgstr "El estilo de fuente."
+
+#: ../src/generic/fontdlgg.cpp:397 ../src/generic/fontdlgg.cpp:399
+msgid "The font weight."
+msgstr "El peso de la fuente."
+
+#: ../src/common/docview.cpp:1465
+#, fuzzy, c-format
+msgid "The format of file '%s' couldn't be determined."
+msgstr "No pudo crearse directorio '%s'"
+
+#: ../src/richtext/richtextindentspage.cpp:199
+#: ../src/richtext/richtextindentspage.cpp:201
+#: ../src/richtext/richtextliststylepage.cpp:385
+#: ../src/richtext/richtextliststylepage.cpp:387
+msgid "The left indent."
+msgstr "El escalonado izquierdo."
+
+#: ../src/richtext/richtextmarginspage.cpp:195
+#: ../src/richtext/richtextmarginspage.cpp:197
+#, fuzzy
+msgid "The left margin size."
+msgstr "Tamaño en puntos:"
+
+#: ../src/richtext/richtextmarginspage.cpp:309
+#: ../src/richtext/richtextmarginspage.cpp:311
+#, fuzzy
+msgid "The left padding size."
+msgstr "Tamaño en puntos:"
+
+#: ../src/richtext/richtextsizepage.cpp:534
+#: ../src/richtext/richtextsizepage.cpp:536
+#: ../src/richtext/richtextsizepage.cpp:548
+#: ../src/richtext/richtextsizepage.cpp:550
+#, fuzzy
+msgid "The left position."
+msgstr "La posición del tabulador."
+
+#: ../src/richtext/richtextindentspage.cpp:288
+#: ../src/richtext/richtextindentspage.cpp:290
+#: ../src/richtext/richtextliststylepage.cpp:462
+#: ../src/richtext/richtextliststylepage.cpp:464
+msgid "The line spacing."
+msgstr "El espaciado de línea."
+
+#: ../src/richtext/richtextbulletspage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:270
+msgid "The list item number."
+msgstr "El número de elemento de la lista."
+
+#: ../src/msw/ole/automtn.cpp:653
+msgid "The locale ID is unknown."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:366
+#: ../src/richtext/richtextsizepage.cpp:368
+#, fuzzy
+msgid "The object height."
+msgstr "El peso de la fuente."
+
+#: ../src/richtext/richtextsizepage.cpp:474
+#: ../src/richtext/richtextsizepage.cpp:476
+#, fuzzy
+msgid "The object maximum height."
+msgstr "El peso de la fuente."
+
+#: ../src/richtext/richtextsizepage.cpp:447
+#: ../src/richtext/richtextsizepage.cpp:449
+#, fuzzy
+msgid "The object maximum width."
+msgstr "El peso de la fuente."
+
+#: ../src/richtext/richtextsizepage.cpp:420
+#: ../src/richtext/richtextsizepage.cpp:422
+#, fuzzy
+msgid "The object minimum height."
+msgstr "El peso de la fuente."
+
+#: ../src/richtext/richtextsizepage.cpp:393
+#: ../src/richtext/richtextsizepage.cpp:395
+#, fuzzy
+msgid "The object minimum width."
+msgstr "El peso de la fuente."
+
+#: ../src/richtext/richtextsizepage.cpp:332
+#: ../src/richtext/richtextsizepage.cpp:334
+#, fuzzy
+msgid "The object width."
+msgstr "El peso de la fuente."
+
+#: ../src/richtext/richtextindentspage.cpp:227
+#: ../src/richtext/richtextindentspage.cpp:229
+#, fuzzy
+msgid "The outline level."
+msgstr "La vista previa del estilo."
+
+#: ../src/common/log.cpp:281
+#, c-format
+msgid "The previous message repeated %lu time."
+msgid_plural "The previous message repeated %lu times."
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../src/common/log.cpp:274
+msgid "The previous message repeated once."
+msgstr ""
+
+#: ../src/gtk/print.cpp:931 ../src/gtk/print.cpp:1114
+msgid "The print dialog returned an error."
+msgstr ""
+
+#: ../src/richtext/richtextsymboldlg.cpp:462
+#: ../src/richtext/richtextsymboldlg.cpp:464
+msgid "The range to show."
+msgstr "El rango a mostrar."
+
+#: ../src/generic/dbgrptg.cpp:322
+msgid ""
+"The report contains the files listed below. If any of these files contain "
+"private information,\n"
+"please uncheck them and they will be removed from the report.\n"
+msgstr ""
+"El informe contiene los archivos mostrados abajo. Si alguno de estos "
+"archivos contiene información privada,\n"
+"por favor, desmárquelos y serán eliminados del informe.\n"
+
+#: ../src/common/cmdline.cpp:1083
+#, c-format
+msgid "The required parameter '%s' was not specified."
+msgstr "El parámetro '%s' no fue especificado."
+
+#: ../src/richtext/richtextindentspage.cpp:217
+#: ../src/richtext/richtextindentspage.cpp:219
+#: ../src/richtext/richtextliststylepage.cpp:403
+#: ../src/richtext/richtextliststylepage.cpp:405
+msgid "The right indent."
+msgstr "El escalonado derecho."
+
+#: ../src/richtext/richtextmarginspage.cpp:220
+#: ../src/richtext/richtextmarginspage.cpp:222
+#, fuzzy
+msgid "The right margin size."
+msgstr "El escalonado derecho."
+
+#: ../src/richtext/richtextmarginspage.cpp:334
+#: ../src/richtext/richtextmarginspage.cpp:336
+#, fuzzy
+msgid "The right padding size."
+msgstr "El escalonado derecho."
+
+#: ../src/richtext/richtextsizepage.cpp:604
+#: ../src/richtext/richtextsizepage.cpp:606
+#: ../src/richtext/richtextsizepage.cpp:618
+#: ../src/richtext/richtextsizepage.cpp:620
+#, fuzzy
+msgid "The right position."
+msgstr "La posición del tabulador."
+
+#: ../src/richtext/richtextindentspage.cpp:267
+#: ../src/richtext/richtextliststylepage.cpp:439
+#: ../src/richtext/richtextliststylepage.cpp:441
+msgid "The spacing after the paragraph."
+msgstr "El espaciado depués del párrafo."
+
+#: ../src/richtext/richtextindentspage.cpp:257
+#: ../src/richtext/richtextindentspage.cpp:259
+#: ../src/richtext/richtextliststylepage.cpp:430
+#: ../src/richtext/richtextliststylepage.cpp:432
+msgid "The spacing before the paragraph."
+msgstr "El espaciado antes de párrafo."
+
+#: ../src/richtext/richtextstylepage.cpp:108
+#: ../src/richtext/richtextstylepage.cpp:110
+msgid "The style name."
+msgstr "El nombre del estilo."
+
+#: ../src/richtext/richtextstylepage.cpp:118
+#: ../src/richtext/richtextstylepage.cpp:120
+msgid "The style on which this style is based."
+msgstr "El estilo en que se basa este estilo."
+
+#: ../src/richtext/richtextstyledlg.cpp:214
+#: ../src/richtext/richtextstyledlg.cpp:216
+msgid "The style preview."
+msgstr "La vista previa del estilo."
+
+#: ../src/msw/ole/automtn.cpp:669
+msgid "The system cannot find the file specified."
+msgstr ""
+
+#: ../src/richtext/richtexttabspage.cpp:118
+#: ../src/richtext/richtexttabspage.cpp:120
+msgid "The tab position."
+msgstr "La posición del tabulador."
+
+#: ../src/richtext/richtexttabspage.cpp:124
+msgid "The tab positions."
+msgstr "Las posiciones del tabulador."
+
+#: ../src/richtext/richtextctrl.cpp:2705
+msgid "The text couldn't be saved."
+msgstr "El texto no pudo ser guardado."
+
+#: ../src/richtext/richtextmarginspage.cpp:243
+#: ../src/richtext/richtextmarginspage.cpp:245
+#, fuzzy
+msgid "The top margin size."
+msgstr "Tamaño en puntos:"
+
+#: ../src/richtext/richtextmarginspage.cpp:357
+#: ../src/richtext/richtextmarginspage.cpp:359
+#, fuzzy
+msgid "The top padding size."
+msgstr "Tamaño en puntos:"
+
+#: ../src/richtext/richtextsizepage.cpp:569
+#: ../src/richtext/richtextsizepage.cpp:571
+#: ../src/richtext/richtextsizepage.cpp:583
+#: ../src/richtext/richtextsizepage.cpp:585
+#, fuzzy
+msgid "The top position."
+msgstr "La posición del tabulador."
+
+#: ../src/common/cmdline.cpp:1061
+#, c-format
+msgid "The value for the option '%s' must be specified."
+msgstr "El valor para el parámetro '%s' debe especificarse."
+
+#: ../src/msw/dialup.cpp:452
+#, fuzzy, c-format
+msgid ""
+"The version of remote access service (RAS) installed on this machine is too "
+"old, please upgrade (the following required function is missing: %s)."
+msgstr ""
+"La versión del servicio de acceso remoto (RAS) instalada en esta máquina es "
+"demasiado vieja, por favor actualícela (la siguiente función no está "
+"disponible: %s)."
+
+#: ../src/gtk/print.cpp:959
+msgid "The wxGtkPrinterDC cannot be used."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1340
+msgid "There is no column or renderer for the specified column index."
+msgstr ""
+
+#: ../src/richtext/richtextprint.cpp:614 ../src/html/htmprint.cpp:735
+msgid ""
+"There was a problem during page setup: you may need to set a default printer."
+msgstr ""
+"Hubo un problema al configurar la página: se necesita una impresora "
+"predeterminada."
+
+#: ../src/html/htmprint.cpp:255
+msgid ""
+"This document doesn't fit on the page horizontally and will be truncated "
+"when it is printed."
+msgstr ""
+
+#: ../src/common/image.cpp:2716
+#, fuzzy, c-format
+msgid "This is not a %s."
+msgstr "PCX: éste no es un archivo PCX."
+
+#: ../src/common/wincmn.cpp:1653
+msgid "This platform does not support background transparency."
+msgstr ""
+
+#: ../src/gtk/window.cpp:4317
+msgid ""
+"This program was compiled with a too old version of GTK+, please rebuild "
+"with GTK+ 2.12 or newer."
+msgstr ""
+
+#: ../src/msw/datecontrols.cpp:59
+#, fuzzy
+msgid ""
+"This system doesn't support date controls, please upgrade your version of "
+"comctl32.dll"
+msgstr ""
+"El sistema no soporta el control de selección de fecha, sírvase actualizar "
+"la versión de comctl32.dll"
+
+#: ../src/msw/thread.cpp:1300
+msgid ""
+"Thread module initialization failed: cannot store value in thread local "
+"storage"
+msgstr ""
+"Error en la inicialización del módulo de hilos de ejecución: no se pudo "
+"almacenar valor en el almacen local de hilos"
+
+#: ../src/unix/threadpsx.cpp:1758
+msgid "Thread module initialization failed: failed to create thread key"
+msgstr ""
+"Error en la inicialización del módulo de hilos de ejecución: error al crear "
+"clave de hilo"
+
+#: ../src/msw/thread.cpp:1288
+msgid ""
+"Thread module initialization failed: impossible to allocate index in thread "
+"local storage"
+msgstr ""
+"Error en la inicialización del módulo de hilos de ejecución: imposible "
+"reservar índice en el almacen local de hilos"
+
+#: ../src/unix/threadpsx.cpp:1038
+msgid "Thread priority setting is ignored."
+msgstr "La configuración de la prioridad del hilo de ejecución es ignorada."
+
+#: ../src/msw/mdi.cpp:172
+msgid "Tile &Horizontally"
+msgstr "Mosaico &Horizontal"
+
+#: ../src/msw/mdi.cpp:173
+msgid "Tile &Vertically"
+msgstr "Mosaico &Vertical"
+
+#: ../src/common/ftp.cpp:202
+msgid "Timeout while waiting for FTP server to connect, try passive mode."
+msgstr ""
+"Tiempo de espera de la conexión del servidor FTP excedido, pruebe a "
+"establecer el modo pasivo."
+
+#: ../src/os2/timer.cpp:99
+msgid "Timer creation failed."
+msgstr "Error en la creación del temporizador"
+
+#: ../src/generic/tipdlg.cpp:220
+msgid "Tip of the Day"
+msgstr "Sugerencia del Día"
+
+#: ../src/generic/tipdlg.cpp:154
+msgid "Tips not available, sorry!"
+msgstr "Sugerencias no disponibles, ¡lástima!"
+
+#: ../src/generic/prntdlgg.cpp:242
+msgid "To:"
+msgstr "Hasta:"
+
+#: ../src/osx/carbon/dataview.cpp:2451
+msgid "Toggle renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:7983
+msgid "Too many EndStyle calls!"
+msgstr "¡Demasiadas llamadas EndStyle!"
+
+#: ../src/common/imagpng.cpp:286
+msgid "Too many colours in PNG, the image may be slightly blurred."
+msgstr "Demasiados colores en el PNG, la imagen podría estar algo borrosa."
+
+#: ../src/richtext/richtextsizepage.cpp:286
+#: ../src/richtext/richtextsizepage.cpp:290 ../src/common/stockitem.cpp:200
+#, fuzzy
+msgid "Top"
+msgstr "Hasta:"
+
+#: ../src/generic/prntdlgg.cpp:881
+msgid "Top margin (mm):"
+msgstr "Margen superior (mm):"
+
+#: ../src/generic/aboutdlgg.cpp:79
+msgid "Translations by "
+msgstr "Traducciones por"
+
+#: ../src/generic/aboutdlgg.cpp:188
+#, fuzzy
+msgid "Translators"
+msgstr "Traducciones por"
+
+#: ../src/propgrid/propgrid.cpp:173
+msgid "True"
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:227
+#, c-format
+msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!"
+msgstr ""
+"¡Intentando eliminar el archivo '%s' de VFS de memoria, pero no está abierto!"
+
+#: ../src/common/fmapbase.cpp:156
+msgid "Turkish (ISO-8859-9)"
+msgstr "Turco (ISO-8859-9)"
+
+#: ../src/generic/filectrlg.cpp:461
+msgid "Type"
+msgstr "Tipo"
+
+#: ../src/richtext/richtextfontpage.cpp:160
+#: ../src/richtext/richtextfontpage.cpp:162
+msgid "Type a font name."
+msgstr "Escriba un nombre de fuente."
+
+#: ../src/richtext/richtextfontpage.cpp:175
+#: ../src/richtext/richtextfontpage.cpp:177
+msgid "Type a size in points."
+msgstr "Escribir un tamaño en puntos."
+
+#: ../src/msw/ole/automtn.cpp:665
+#, c-format
+msgid "Type mismatch in argument %u."
+msgstr ""
+
+#: ../src/common/xtixml.cpp:356 ../src/common/xtixml.cpp:509
+#: ../src/common/xtistrm.cpp:322
+msgid "Type must have enum - long conversion"
+msgstr "El tipo debe tener conversión de enum a long"
+
+#: ../src/propgrid/propgridiface.cpp:382
+#, c-format
+msgid ""
+"Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT "
+"\"%s\"."
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:58
+msgid "UP"
+msgstr "ARRIBA"
+
+#: ../src/common/paper.cpp:134
+msgid "US Std Fanfold, 14 7/8 x 11 in"
+msgstr "US Std Fanfold, 14 7/8 x 11 in"
+
+#: ../src/common/fmapbase.cpp:196
+msgid "US-ASCII"
+msgstr "US-ASCII"
+
+#: ../src/unix/fswatcher_inotify.cpp:109
+msgid "Unable to add inotify watch"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:136
+msgid "Unable to add kqueue watch"
+msgstr ""
+
+#: ../include/wx/msw/private/fswatcher.h:142
+msgid "Unable to associate handle with I/O completion port"
+msgstr ""
+
+#: ../include/wx/msw/private/fswatcher.h:125
+#, fuzzy
+msgid "Unable to close I/O completion port handle"
+msgstr "Error al cerrar el manejador del archivo"
+
+#: ../src/unix/fswatcher_inotify.cpp:97
+#, fuzzy
+msgid "Unable to close inotify instance"
+msgstr "Error al cerrar el manejador del archivo"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:74
+#, fuzzy, c-format
+msgid "Unable to close path '%s'"
+msgstr "No se pudo cerrar el archivo de bloqueo '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:48
+#, fuzzy, c-format
+msgid "Unable to close the handle for '%s'"
+msgstr "Error al cerrar el manejador del archivo"
+
+#: ../include/wx/msw/private/fswatcher.h:240
+#, fuzzy
+msgid "Unable to create I/O completion port"
+msgstr "No se pudo crear TextEncodingConverter"
+
+#: ../src/msw/fswatcher.cpp:84
+#, fuzzy
+msgid "Unable to create IOCP worker thread"
+msgstr "No se pudo crear TextEncodingConverter"
+
+#: ../src/unix/fswatcher_inotify.cpp:74
+#, fuzzy
+msgid "Unable to create inotify instance"
+msgstr "No se pudo crear TextEncodingConverter"
+
+#: ../src/unix/fswatcher_kqueue.cpp:97
+#, fuzzy
+msgid "Unable to create kqueue instance"
+msgstr "No se pudo crear TextEncodingConverter"
+
+#: ../include/wx/msw/private/fswatcher.h:229
+msgid "Unable to dequeue completion packet"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:185
+msgid "Unable to get events from kqueue"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1903
+msgid "Unable to handle native drag&drop data"
+msgstr ""
+
+#: ../src/gtk/app.cpp:439
+msgid "Unable to initialize GTK+, is DISPLAY set properly?"
+msgstr ""
+
+#: ../src/gtk/app.cpp:276
+#, fuzzy
+msgid "Unable to initialize Hildon program"
+msgstr "Fallo al inicializar OpenGL."
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:57
+#, fuzzy, c-format
+msgid "Unable to open path '%s'"
+msgstr "Error al abrir el archivo CHM '%s'"
+
+#: ../src/html/htmlwin.cpp:561
+#, c-format
+msgid "Unable to open requested HTML document: %s"
+msgstr "Incapaz de abrir el docuemento HTML pedido: %s"
+
+#: ../src/unix/sound.cpp:368
+msgid "Unable to play sound asynchronously."
+msgstr "Imposible reproducir el sonido de forma asíncrona."
+
+#: ../include/wx/msw/private/fswatcher.h:207
+msgid "Unable to post completion status"
+msgstr ""
+
+#: ../src/unix/fswatcher_inotify.cpp:530
+#, fuzzy
+msgid "Unable to read from inotify descriptor"
+msgstr "no se puede leer desde el descriptor de archivo %d"
+
+#: ../src/unix/fswatcher_inotify.cpp:132
+msgid "Unable to remove inotify watch"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:153
+msgid "Unable to remove kqueue watch"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:168
+#, fuzzy, c-format
+msgid "Unable to set up watch for '%s'"
+msgstr "No se pudo  retocar' el archivo '%s'"
+
+#: ../src/msw/fswatcher.cpp:91
+msgid "Unable to start IOCP worker thread"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:201
+msgid "Undelete"
+msgstr "Restaurar"
+
+#: ../src/common/stockitem.cpp:202
+#, fuzzy
+msgid "Underline"
+msgstr "Subrayado"
+
+#: ../src/richtext/richtextfontpage.cpp:341 ../src/osx/carbon/fontdlg.cpp:556
+#: ../src/propgrid/advprops.cpp:655
+msgid "Underlined"
+msgstr "Subrayado"
+
+#: ../src/common/stockitem.cpp:203 ../src/stc/stc_i18n.cpp:15
+#, fuzzy
+msgid "Undo"
+msgstr "&Deshacer"
+
+#: ../src/common/stockitem.cpp:265
+msgid "Undo last action"
+msgstr "Deshacer la última acción"
+
+#: ../src/common/cmdline.cpp:864
+#, c-format
+msgid "Unexpected characters following option '%s'."
+msgstr "Caracteres inesperadostras la opción '%s' "
+
+#: ../src/unix/fswatcher_inotify.cpp:261
+#, c-format
+msgid "Unexpected event for \"%s\": no matching watch descriptor."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1024
+#, c-format
+msgid "Unexpected parameter '%s'"
+msgstr "Parámetro '%s' inesperado"
+
+#: ../include/wx/msw/private/fswatcher.h:148
+msgid "Unexpectedly new I/O completion port was created"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:70
+#, fuzzy
+msgid "Ungraceful worker thread termination"
+msgstr "No se puede esperar a la finalización del hilo de ejecución"
+
+#: ../src/richtext/richtextsymboldlg.cpp:459
+#: ../src/richtext/richtextsymboldlg.cpp:460
+#: ../src/richtext/richtextsymboldlg.cpp:461
+msgid "Unicode"
+msgstr "Unicode"
+
+#: ../src/common/fmapbase.cpp:185 ../src/common/fmapbase.cpp:191
+msgid "Unicode 16 bit (UTF-16)"
+msgstr "Unicode 16 bits (UTF-16)"
+
+#: ../src/common/fmapbase.cpp:190
+msgid "Unicode 16 bit Big Endian (UTF-16BE)"
+msgstr "Unicode 16 bits Endian Grande (UTF-16BE)"
+
+#: ../src/common/fmapbase.cpp:186
+msgid "Unicode 16 bit Little Endian (UTF-16LE)"
+msgstr "Unicode 16 bits Endian Pequeña (UTF-16LE)"
+
+#: ../src/common/fmapbase.cpp:187 ../src/common/fmapbase.cpp:193
+msgid "Unicode 32 bit (UTF-32)"
+msgstr "Unicode 32 bits (UTF-32)"
+
+#: ../src/common/fmapbase.cpp:192
+msgid "Unicode 32 bit Big Endian (UTF-32BE)"
+msgstr "Unicode 32 bits Endian Grande (UTF-32BE)"
+
+#: ../src/common/fmapbase.cpp:188
+msgid "Unicode 32 bit Little Endian (UTF-32LE)"
+msgstr "Unicode 32 bits Endian Pequeña (UTF-32LE)"
+
+#: ../src/common/fmapbase.cpp:182
+msgid "Unicode 7 bit (UTF-7)"
+msgstr "Unicode 7 bit (UTF-7)"
+
+#: ../src/common/fmapbase.cpp:183
+msgid "Unicode 8 bit (UTF-8)"
+msgstr "Unicode 8 bit (UTF-8)"
+
+#: ../src/common/stockitem.cpp:204
+#, fuzzy
+msgid "Unindent"
+msgstr "&No escalonado"
+
+#: ../src/richtext/richtextborderspage.cpp:373
+#: ../src/richtext/richtextborderspage.cpp:375
+msgid "Units for the bottom border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:278
+#: ../src/richtext/richtextmarginspage.cpp:280
+msgid "Units for the bottom margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:517
+#: ../src/richtext/richtextborderspage.cpp:519
+msgid "Units for the bottom outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:392
+#: ../src/richtext/richtextmarginspage.cpp:394
+msgid "Units for the bottom padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:664
+#: ../src/richtext/richtextsizepage.cpp:666
+#, fuzzy
+msgid "Units for the bottom position."
+msgstr "No se puede esperar a la finalización del hilo."
+
+#: ../src/richtext/richtextborderspage.cpp:283
+#: ../src/richtext/richtextborderspage.cpp:285
+msgid "Units for the left border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:205
+#: ../src/richtext/richtextmarginspage.cpp:207
+msgid "Units for the left margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:427
+#: ../src/richtext/richtextborderspage.cpp:429
+msgid "Units for the left outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:319
+#: ../src/richtext/richtextmarginspage.cpp:321
+msgid "Units for the left padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:559
+#: ../src/richtext/richtextsizepage.cpp:561
+#, fuzzy
+msgid "Units for the left position."
+msgstr "No se puede esperar a la finalización del hilo."
+
+#: ../src/richtext/richtextsizepage.cpp:485
+#: ../src/richtext/richtextsizepage.cpp:487
+#, fuzzy
+msgid "Units for the maximum object height."
+msgstr "El peso de la fuente."
+
+#: ../src/richtext/richtextsizepage.cpp:458
+#: ../src/richtext/richtextsizepage.cpp:460
+#, fuzzy
+msgid "Units for the maximum object width."
+msgstr "El peso de la fuente."
+
+#: ../src/richtext/richtextsizepage.cpp:431
+#: ../src/richtext/richtextsizepage.cpp:433
+#, fuzzy
+msgid "Units for the minimum object height."
+msgstr "El peso de la fuente."
+
+#: ../src/richtext/richtextsizepage.cpp:404
+#: ../src/richtext/richtextsizepage.cpp:406
+#, fuzzy
+msgid "Units for the minimum object width."
+msgstr "El peso de la fuente."
+
+#: ../src/richtext/richtextsizepage.cpp:377
+#: ../src/richtext/richtextsizepage.cpp:379
+msgid "Units for the object height."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:343
+#: ../src/richtext/richtextsizepage.cpp:345
+msgid "Units for the object width."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:313
+#: ../src/richtext/richtextborderspage.cpp:315
+msgid "Units for the right border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:230
+#: ../src/richtext/richtextmarginspage.cpp:232
+msgid "Units for the right margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:457
+#: ../src/richtext/richtextborderspage.cpp:459
+msgid "Units for the right outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:344
+#: ../src/richtext/richtextmarginspage.cpp:346
+msgid "Units for the right padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:629
+#: ../src/richtext/richtextsizepage.cpp:631
+#, fuzzy
+msgid "Units for the right position."
+msgstr "No se puede esperar a la finalización del hilo."
+
+#: ../src/richtext/richtextborderspage.cpp:343
+#: ../src/richtext/richtextborderspage.cpp:345
+msgid "Units for the top border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:253
+#: ../src/richtext/richtextmarginspage.cpp:255
+#, fuzzy
+msgid "Units for the top margin."
+msgstr "No se puede esperar a la finalización del hilo."
+
+#: ../src/richtext/richtextborderspage.cpp:487
+#: ../src/richtext/richtextborderspage.cpp:489
+msgid "Units for the top outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:367
+#: ../src/richtext/richtextmarginspage.cpp:369
+msgid "Units for the top padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:594
+#: ../src/richtext/richtextsizepage.cpp:596
+#, fuzzy
+msgid "Units for the top position."
+msgstr "No se puede esperar a la finalización del hilo."
+
+#: ../src/generic/progdlgg.cpp:382 ../src/generic/progdlgg.cpp:655
+msgid "Unknown"
+msgstr "Desconocido"
+
+#: ../src/msw/dde.cpp:1177
+#, c-format
+msgid "Unknown DDE error %08x"
+msgstr "Error DDE desconocido %08x"
+
+#: ../src/common/xtistrm.cpp:414
+msgid "Unknown Object passed to GetObjectClassInfo"
+msgstr "Objeto desconocido pasado a GetObjectClassInfo"
+
+#: ../src/common/imagpng.cpp:614
+#, fuzzy, c-format
+msgid "Unknown PNG resolution unit %d"
+msgstr "El parámetro '%s' es desconocido"
+
+#: ../src/common/xtixml.cpp:327
+#, fuzzy, c-format
+msgid "Unknown Property %s"
+msgstr "Propiedad '%s' desconocida"
+
+#: ../src/common/imagtiff.cpp:532
+#, c-format
+msgid "Unknown TIFF resolution unit %d ignored"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1978
+#, fuzzy
+msgid "Unknown data format"
+msgstr "error en formato de datos"
+
+#: ../src/unix/dlunix.cpp:325
+msgid "Unknown dynamic library error"
+msgstr "Error desconocido de biblioteca dinámica"
+
+#: ../src/common/fmapbase.cpp:810
+#, c-format
+msgid "Unknown encoding (%d)"
+msgstr "Codificación desconocida (%d)"
+
+#: ../src/msw/ole/automtn.cpp:677
+#, fuzzy, c-format
+msgid "Unknown error %08x"
+msgstr "Error DDE desconocido %08x"
+
+#: ../src/msw/ole/automtn.cpp:636
+#, fuzzy
+msgid "Unknown exception"
+msgstr "El parámetro '%s' es desconocido"
+
+#: ../src/common/image.cpp:2701
+#, fuzzy
+msgid "Unknown image data format."
+msgstr "error en formato de datos"
+
+#: ../src/common/cmdline.cpp:749
+#, c-format
+msgid "Unknown long option '%s'"
+msgstr "El parámetro '%s' de entero largo es desconocido"
+
+#: ../src/msw/ole/automtn.cpp:620
+msgid "Unknown name or named argument."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:764 ../src/common/cmdline.cpp:786
+#, c-format
+msgid "Unknown option '%s'"
+msgstr "El parámetro '%s' es desconocido"
+
+#: ../src/common/mimecmn.cpp:230
+#, c-format
+msgid "Unmatched '{' in an entry for mime type %s."
+msgstr "Paréntesis '(' no emparejado en una entrada para tipo mime %s."
+
+#: ../src/common/cmdproc.cpp:262 ../src/common/cmdproc.cpp:288
+#: ../src/common/cmdproc.cpp:308
+msgid "Unnamed command"
+msgstr "Mandato sin nombre"
+
+#: ../src/propgrid/propgrid.cpp:398
+#, fuzzy
+msgid "Unspecified"
+msgstr "Justificado"
+
+#: ../src/msw/clipbrd.cpp:271 ../src/msw/clipbrd.cpp:439
+msgid "Unsupported clipboard format."
+msgstr "Formato de portapapeles no soportado."
+
+#: ../src/common/appcmn.cpp:249
+#, c-format
+msgid "Unsupported theme '%s'."
+msgstr "Tema no soportado '%s'."
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:205
+msgid "Up"
+msgstr "Arriba"
+
+#: ../src/richtext/richtextliststylepage.cpp:483
+#: ../src/richtext/richtextbulletspage.cpp:288
+msgid "Upper case letters"
+msgstr "Letras mayúsculas"
+
+#: ../src/richtext/richtextliststylepage.cpp:485
+#: ../src/richtext/richtextbulletspage.cpp:290
+msgid "Upper case roman numerals"
+msgstr "Números romanos en mayúsculas"
+
+#: ../src/common/cmdline.cpp:1155
+#, c-format
+msgid "Usage: %s"
+msgstr "Uso: %s"
+
+#: ../src/richtext/richtextindentspage.cpp:169
+#: ../src/richtext/richtextindentspage.cpp:171
+#: ../src/richtext/richtextliststylepage.cpp:358
+#: ../src/richtext/richtextliststylepage.cpp:360
+msgid "Use the current alignment setting."
+msgstr "Utilizar el alineamiento actual."
+
+#: ../src/osx/carbon/dataview.cpp:2658 ../src/osx/carbon/dataview.cpp:2723
+msgid "Valid pointer to native data view control does not exist"
+msgstr ""
+
+#: ../src/common/valtext.cpp:174
+msgid "Validation conflict"
+msgstr "Conflicto de validación."
+
+#: ../src/propgrid/manager.cpp:238
+msgid "Value"
+msgstr ""
+
+#: ../src/propgrid/props.cpp:384
+#, c-format
+msgid "Value must be %s or higher."
+msgstr ""
+
+#: ../src/propgrid/props.cpp:411
+#, c-format
+msgid "Value must be %s or less."
+msgstr ""
+
+#: ../src/propgrid/props.cpp:388 ../src/propgrid/props.cpp:415
+#, fuzzy, c-format
+msgid "Value must be between %s and %s."
+msgstr "Introduzca un número de página entre %d y %d:"
+
+#: ../src/generic/aboutdlgg.cpp:128
+#, fuzzy
+msgid "Version "
+msgstr "Versión"
+
+#: ../src/richtext/richtextsizepage.cpp:291
+#: ../src/richtext/richtextsizepage.cpp:293
+#, fuzzy
+msgid "Vertical alignment."
+msgstr "No se puede iniciar la impresión."
+
+#: ../src/generic/filedlgg.cpp:216
+msgid "View files as a detailed view"
+msgstr "Ver archivos en vista Detalles"
+
+#: ../src/generic/filedlgg.cpp:214
+msgid "View files as a list view"
+msgstr "Ver archivos en vista Lista"
+
+#: ../src/common/docview.cpp:1952
+msgid "Views"
+msgstr "Vistas"
+
+#: ../src/common/accelcmn.cpp:108
+msgid "WINDOWS_LEFT"
+msgstr "WINDOWS_IZQUIERDO"
+
+#: ../src/common/accelcmn.cpp:110
+msgid "WINDOWS_MENU"
+msgstr "WINDOWS_MENU"
+
+#: ../src/common/accelcmn.cpp:109
+msgid "WINDOWS_RIGHT"
+msgstr "WINDOWS_DERECHO"
+
+#: ../src/unix/epolldispatcher.cpp:213
+#, fuzzy, c-format
+msgid "Waiting for IO on epoll descriptor %d failed"
+msgstr "Error en la espera de la terminación del subproceso"
+
+#: ../src/common/log.cpp:227
+msgid "Warning: "
+msgstr "Aviso: "
+
+#: ../src/propgrid/advprops.cpp:651
+#, fuzzy
+msgid "Weight"
+msgstr "Peso"
+
+#: ../src/common/fmapbase.cpp:148
+msgid "Western European (ISO-8859-1)"
+msgstr "Europa Occidental (ISO-8859-1)"
+
+#: ../src/common/fmapbase.cpp:162
+msgid "Western European with Euro (ISO-8859-15)"
+msgstr "Europa Occidental con Euro (ISO-8859-15)"
+
+#: ../src/generic/fontdlgg.cpp:446 ../src/generic/fontdlgg.cpp:448
+msgid "Whether the font is underlined."
+msgstr "Si la fuente está subrayada."
+
+#: ../src/generic/fdrepdlg.cpp:144
+msgid "Whole word"
+msgstr "Palabra completa"
+
+#: ../src/html/helpwnd.cpp:547
+msgid "Whole words only"
+msgstr "Sólo palabras completas"
+
+#: ../src/univ/themes/win32.cpp:1102
+msgid "Win32 theme"
+msgstr "Tema Win32"
+
+#: ../src/msw/utils.cpp:1220
+msgid "Win32s on Windows 3.1"
+msgstr "Win32s en Windows 3.1"
+
+#: ../src/msw/utils.cpp:1270
+#, fuzzy
+msgid "Windows 2000"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1302
+#, fuzzy
+msgid "Windows 7"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1234
+msgid "Windows 95"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1230
+msgid "Windows 95 OSR2"
+msgstr "Windows 95 OSR2"
+
+#: ../src/msw/utils.cpp:1245
+msgid "Windows 98"
+msgstr "Windows 98"
+
+#: ../src/msw/utils.cpp:1241
+msgid "Windows 98 SE"
+msgstr "Windows 98 SE"
+
+#: ../src/msw/utils.cpp:1252
+#, c-format
+msgid "Windows 9x (%d.%d)"
+msgstr "Windows 9x (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:177
+msgid "Windows Arabic (CP 1256)"
+msgstr "Windows Árabe (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:178
+msgid "Windows Baltic (CP 1257)"
+msgstr "Windows Báltico (CP 1257)"
+
+#: ../src/msw/utils.cpp:1214
+#, c-format
+msgid "Windows CE (%d.%d)"
+msgstr "Windows CE (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:171
+msgid "Windows Central European (CP 1250)"
+msgstr "Windows Centro Europeo (CP 1250)"
+
+#: ../src/common/fmapbase.cpp:168
+#, fuzzy
+msgid "Windows Chinese Simplified (CP 936) or GB-2312"
+msgstr "Windows Chino Simplificado (CP 936)"
+
+#: ../src/common/fmapbase.cpp:170
+#, fuzzy
+msgid "Windows Chinese Traditional (CP 950) or Big-5"
+msgstr "Windows Chino Tradicional (CP 950)"
+
+#: ../src/common/fmapbase.cpp:172
+msgid "Windows Cyrillic (CP 1251)"
+msgstr "Windows Cirílico (CP 1251)"
+
+#: ../src/common/fmapbase.cpp:174
+msgid "Windows Greek (CP 1253)"
+msgstr "Windows Griego (CP 1253)"
+
+#: ../src/common/fmapbase.cpp:176
+msgid "Windows Hebrew (CP 1255)"
+msgstr "Windows Hebreo (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:167
+#, fuzzy
+msgid "Windows Japanese (CP 932) or Shift-JIS"
+msgstr "Windows Japonés (CP 932)"
+
+#: ../src/common/fmapbase.cpp:180
+#, fuzzy
+msgid "Windows Johab (CP 1361)"
+msgstr "Windows Árabe (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:169
+msgid "Windows Korean (CP 949)"
+msgstr "Windows Coreano (CP 949)"
+
+#: ../src/msw/utils.cpp:1249
+msgid "Windows ME"
+msgstr "Windows ME"
+
+#: ../src/msw/utils.cpp:1310
+#, fuzzy, c-format
+msgid "Windows NT %lu.%lu"
+msgstr "Windows NT %lu.%lu (build %lu"
+
+#: ../src/msw/utils.cpp:1279
+#, fuzzy
+msgid "Windows Server 2003"
+msgstr "Windows Server 2003 (build %lu"
+
+#: ../src/msw/utils.cpp:1295
+#, fuzzy
+msgid "Windows Server 2008"
+msgstr "Windows Server 2003 (build %lu"
+
+#: ../src/msw/utils.cpp:1301
+#, fuzzy
+msgid "Windows Server 2008 R2"
+msgstr "Windows Server 2003 (build %lu"
+
+#: ../src/common/fmapbase.cpp:166
+msgid "Windows Thai (CP 874)"
+msgstr "Windows Tailandés (CP 874)"
+
+#: ../src/common/fmapbase.cpp:175
+msgid "Windows Turkish (CP 1254)"
+msgstr "Windows Turco (CP 1254)"
+
+#: ../src/common/fmapbase.cpp:179
+#, fuzzy
+msgid "Windows Vietnamese (CP 1258)"
+msgstr "Windows Griego (CP 1253)"
+
+#: ../src/msw/utils.cpp:1296
+#, fuzzy
+msgid "Windows Vista"
+msgstr "Windows 95"
+
+#: ../src/common/fmapbase.cpp:173
+msgid "Windows Western European (CP 1252)"
+msgstr "Windows European Occidental (CP 1252)"
+
+#: ../src/msw/utils.cpp:1285
+#, fuzzy
+msgid "Windows XP"
+msgstr "Windows 95"
+
+#: ../src/common/fmapbase.cpp:181
+msgid "Windows/DOS OEM (CP 437)"
+msgstr "Windows/DOS OEM (CP 437)"
+
+#: ../src/common/fmapbase.cpp:165
+#, fuzzy
+msgid "Windows/DOS OEM Cyrillic (CP 866)"
+msgstr "Windows Cirílico (CP 1251)"
+
+#: ../src/common/ffile.cpp:148
+#, c-format
+msgid "Write error on file '%s'"
+msgstr "Error de escritura en el archivo '%s'"
+
+#: ../src/xml/xml.cpp:844
+#, c-format
+msgid "XML parsing error: '%s' at line %d"
+msgstr "Error de parseo de XML: '%s' en la línea %d"
+
+#: ../src/common/xpmdecod.cpp:796
+msgid "XPM: Malformed pixel data!"
+msgstr "XPM: ¡Datos de píxel erróneos!"
+
+#: ../src/common/xpmdecod.cpp:705
+#, c-format
+msgid "XPM: incorrect colour description in line %d"
+msgstr "XPM:  errónea definición de color en línea %d"
+
+#: ../src/common/xpmdecod.cpp:680
+msgid "XPM: incorrect header format!"
+msgstr "XPM: ¡formato de cabecera incorrecto!"
+
+#: ../src/common/xpmdecod.cpp:716 ../src/common/xpmdecod.cpp:725
+#, c-format
+msgid "XPM: malformed colour definition '%s' at line %d!"
+msgstr "XPM:  errónea definición de color '%s' en línea %d"
+
+#: ../src/common/xpmdecod.cpp:755
+#, fuzzy
+msgid "XPM: no colors left to use for mask!"
+msgstr "XPM: ¡formato de cabecera incorrecto!"
+
+#: ../src/common/xpmdecod.cpp:782
+#, c-format
+msgid "XPM: truncated image data at line %d!"
+msgstr "XPM: ¡datos de imagen truncados en la línea %d!"
+
+#: ../include/wx/msgdlg.h:271 ../src/common/stockitem.cpp:206
+#: ../src/motif/msgdlg.cpp:196
+msgid "Yes"
+msgstr "Sí"
+
+#: ../src/osx/carbon/overlay.cpp:155
+msgid "You cannot Clear an overlay that is not inited"
+msgstr "No puede quitar una superposición que no ha sido inicializada"
+
+#: ../src/osx/carbon/overlay.cpp:107 ../src/dfb/overlay.cpp:61
+msgid "You cannot Init an overlay twice"
+msgstr "No puede Inicializar una superposición dos veces"
+
+#: ../src/generic/dirdlgg.cpp:316
+msgid "You cannot add a new directory to this section."
+msgstr "No puede añadir un nuevo directorio a esta sección."
+
+#: ../src/propgrid/propgrid.cpp:3258
+msgid "You have entered invalid value. Press ESC to cancel editing."
+msgstr ""
+
+#: ../src/common/stockitem.cpp:209
+msgid "Zoom &In"
+msgstr "A&cercar"
+
+#: ../src/common/stockitem.cpp:210
+msgid "Zoom &Out"
+msgstr "A&lejar"
+
+#: ../src/common/stockitem.cpp:209 ../src/common/prntbase.cpp:1564
+#, fuzzy
+msgid "Zoom In"
+msgstr "A&cercar"
+
+#: ../src/common/stockitem.cpp:210 ../src/common/prntbase.cpp:1550
+#, fuzzy
+msgid "Zoom Out"
+msgstr "A&lejar"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to &Fit"
+msgstr "&Ajustar al tamaño"
+
+#: ../src/common/stockitem.cpp:208
+#, fuzzy
+msgid "Zoom to Fit"
+msgstr "&Ajustar al tamaño"
+
+#: ../src/msw/dde.cpp:1144
+msgid "a DDEML application has created a prolonged race condition."
+msgstr "una aplicación DDEML ha creado una condición acelerada prolongada."
+
+#: ../src/msw/dde.cpp:1132
+msgid ""
+"a DDEML function was called without first calling the DdeInitialize "
+"function,\n"
+"or an invalid instance identifier\n"
+"was passed to a DDEML function."
+msgstr ""
+"una función DDEML fue llamada sin llamar primero a la función "
+"DdeInitialize,\n"
+"o se pasó un identificador de instancia no válido\n"
+"a una función DDEML."
+
+#: ../src/msw/dde.cpp:1150
+msgid "a client's attempt to establish a conversation has failed."
+msgstr "el intento de un cliente de establece conversación falló."
+
+#: ../src/msw/dde.cpp:1147
+msgid "a memory allocation failed."
+msgstr "fallo al reservar memoria."
+
+#: ../src/msw/dde.cpp:1141
+msgid "a parameter failed to be validated by the DDEML."
+msgstr "fallo al validar un parémetro por DDEML."
+
+#: ../src/msw/dde.cpp:1123
+msgid "a request for a synchronous advise transaction has timed out."
+msgstr "una petición para una transación síncrona ha finalizado."
+
+#: ../src/msw/dde.cpp:1129
+msgid "a request for a synchronous data transaction has timed out."
+msgstr "una petición para una transacción de datos síncrona ha finalizado."
+
+#: ../src/msw/dde.cpp:1138
+msgid "a request for a synchronous execute transaction has timed out."
+msgstr "una petición para una transación de ejecución síncrona ha finalizado."
+
+#: ../src/msw/dde.cpp:1156
+msgid "a request for a synchronous poke transaction has timed out."
+msgstr "una petición para una transacción síncrona de revisión ha finalizado."
+
+#: ../src/msw/dde.cpp:1171
+msgid "a request to end an advise transaction has timed out."
+msgstr "una petición para una transacción síncrona de auditoría ha finalizado."
+
+#: ../src/msw/dde.cpp:1165
+msgid ""
+"a server-side transaction was attempted on a conversation\n"
+"that was terminated by the client, or the server\n"
+"terminated before completing a transaction."
+msgstr ""
+"se intentó una transacción de servidor en una conversación\n"
+"que fue finalizada por el cliente, o el servidor\n"
+"terminó antes de completar una transacción."
+
+#: ../src/msw/dde.cpp:1153
+msgid "a transaction failed."
+msgstr "fallo en la traducción."
+
+#: ../src/common/accelcmn.cpp:184
+msgid "alt"
+msgstr "alt"
+
+#: ../src/msw/dde.cpp:1135
+msgid ""
+"an application initialized as APPCLASS_MONITOR has\n"
+"attempted to perform a DDE transaction,\n"
+"or an application initialized as APPCMD_CLIENTONLY has \n"
+"attempted to perform server transactions."
+msgstr ""
+"una aplicación inicializada como APPCLASS_MONITOR ha\n"
+"intentado llevar a cabo una transacción DDE,\n"
+"o una aplicación inicializada como APPCMD_CLIENTONLY ha\n"
+"intentado realizar transacciones de servidor."
+
+#: ../src/msw/dde.cpp:1159
+msgid "an internal call to the PostMessage function has failed. "
+msgstr "ha fallado una llamada interna a la función PostMessage."
+
+#: ../src/msw/dde.cpp:1168
+msgid "an internal error has occurred in the DDEML."
+msgstr "ha ocurrido un error interno en DDEML."
+
+#: ../src/msw/dde.cpp:1174
+msgid ""
+"an invalid transaction identifier was passed to a DDEML function.\n"
+"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n"
+"the transaction identifier for that callback is no longer valid."
+msgstr ""
+"se pasó un identificador de transacción no válido a la función DDEML.\n"
+"Una vez que la aplicación haya retornado desde una llamada "
+"XTYP_XACT_COMPLETE,\n"
+"el identificador de la transacción para esa llamada deja de ser válido."
+
+#: ../src/common/zipstrm.cpp:1272
+msgid "assuming this is a multi-part zip concatenated"
+msgstr "suponemos que es un archivo zip multiparte concatenado"
+
+#: ../src/common/fileconf.cpp:1882
+#, c-format
+msgid "attempt to change immutable key '%s' ignored."
+msgstr "intento de cambiar clave inmutable '%s', ignorado."
+
+#: ../src/html/chm.cpp:329
+msgid "bad arguments to library function"
+msgstr "argumentos erróneos a la función de biblioteca"
+
+#: ../src/html/chm.cpp:341
+msgid "bad signature"
+msgstr "firma errónea"
+
+#: ../src/common/zipstrm.cpp:1715
+msgid "bad zipfile offset to entry"
+msgstr "desplazamiento erróneo al elemento del archivo zip"
+
+#: ../src/common/ftp.cpp:405
+msgid "binary"
+msgstr "binario"
+
+#: ../src/common/fontcmn.cpp:978
+msgid "bold"
+msgstr "negrita"
+
+#: ../src/os2/iniconf.cpp:463
+msgid "buffer is too small for Windows directory."
+msgstr "el buffer es demasiado pequeño para el directorio Windows."
+
+#: ../src/msw/utils.cpp:1316
+#, fuzzy, c-format
+msgid "build %lu"
+msgstr "Windows XP (build %lu"
+
+#: ../src/common/ffile.cpp:79
+#, c-format
+msgid "can't close file '%s'"
+msgstr "no se puede cerrar el archivo '%s'"
+
+#: ../src/common/file.cpp:278
+#, c-format
+msgid "can't close file descriptor %d"
+msgstr "no se puede cerrar el descriptor de archivo %d"
+
+#: ../src/common/file.cpp:604
+#, c-format
+msgid "can't commit changes to file '%s'"
+msgstr "no se pueden hacer efectivos los cambios en archivo '%s'"
+
+#: ../src/common/file.cpp:212
+#, c-format
+msgid "can't create file '%s'"
+msgstr "no se puede crear el archivo '%s'"
+
+#: ../src/common/fileconf.cpp:1176
+#, c-format
+msgid "can't delete user configuration file '%s'"
+msgstr "no se puede eliminar el archivo de configuración de usuario '%s'"
+
+#: ../src/common/file.cpp:511
+#, c-format
+msgid "can't determine if the end of file is reached on descriptor %d"
+msgstr ""
+"no se puede determinar si el final del archivo con descriptor %d se ha "
+"alcanzado"
+
+#: ../src/msdos/utilsdos.cpp:310 ../src/msdos/utilsdos.cpp:475
+#, c-format
+msgid "can't execute '%s'"
+msgstr "No se puede ejecutar '%s'"
+
+#: ../src/common/zipstrm.cpp:1490
+msgid "can't find central directory in zip"
+msgstr "no se puede encontrar el directorio central en el zip"
+
+#: ../src/common/file.cpp:481
+#, c-format
+msgid "can't find length of file on file descriptor %d"
+msgstr "no se puede obtener el tamaño del archivo con descriptor %d"
+
+#: ../src/msw/utils.cpp:373
+msgid "can't find user's HOME, using current directory."
+msgstr "no se encontró HOME del usuario, usando el directorio actual."
+
+#: ../src/common/file.cpp:382
+#, c-format
+msgid "can't flush file descriptor %d"
+msgstr "no se puede vaciar el descriptor de archivo %d"
+
+#: ../src/common/file.cpp:438 ../src/msw/wince/filefnwce.cpp:204
+#, c-format
+msgid "can't get seek position on file descriptor %d"
+msgstr ""
+"no se puede alcanzar posición de búsqueda en el descriptor de archivo %d"
+
+#: ../src/common/fontmap.cpp:325
+msgid "can't load any font, aborting"
+msgstr "no se puede cargar ninguna fuente, abortando"
+
+#: ../src/common/file.cpp:264 ../src/common/ffile.cpp:63
+#, c-format
+msgid "can't open file '%s'"
+msgstr "no se puede abrir el archivo '%s'"
+
+#: ../src/common/fileconf.cpp:351
+#, c-format
+msgid "can't open global configuration file '%s'."
+msgstr "no se puede abrir el archivo de configuración global '%s'."
+
+#: ../src/common/fileconf.cpp:367
+#, c-format
+msgid "can't open user configuration file '%s'."
+msgstr "no se puede abrir el archivo de configuración de usuario '%s'."
+
+#: ../src/common/fileconf.cpp:1017
+msgid "can't open user configuration file."
+msgstr "no puede abrirse el archivo de configuración de usuario"
+
+#: ../src/common/zipstrm.cpp:527
+msgid "can't re-initialize zlib deflate stream"
+msgstr "no se puede reinicializar el flujo de compresión de zlib."
+
+#: ../src/common/zipstrm.cpp:552
+msgid "can't re-initialize zlib inflate stream"
+msgstr "no se puede reinicializar el flujo de descompresión de zlib."
+
+#: ../src/common/file.cpp:334
+#, c-format
+msgid "can't read from file descriptor %d"
+msgstr "no se puede leer desde el descriptor de archivo %d"
+
+#: ../src/common/file.cpp:599
+#, c-format
+msgid "can't remove file '%s'"
+msgstr "no se puede eliminar el archivo '%s'"
+
+#: ../src/common/file.cpp:616
+#, c-format
+msgid "can't remove temporary file '%s'"
+msgstr "no se puede eliminar el archivo temporal '%s'"
+
+#: ../src/common/file.cpp:424 ../src/msw/wince/filefnwce.cpp:190
+#, c-format
+msgid "can't seek on file descriptor %d"
+msgstr "no se puede buscar en el descriptor de archivo %d"
+
+#: ../src/common/textfile.cpp:299
+#, c-format
+msgid "can't write buffer '%s' to disk."
+msgstr "no se puede guardar el buffer '%s' al disco."
+
+#: ../src/common/file.cpp:350
+#, c-format
+msgid "can't write to file descriptor %d"
+msgstr "no se puede escribir el descriptor de archivo %d"
+
+#: ../src/common/fileconf.cpp:1031
+msgid "can't write user configuration file."
+msgstr "no puede escribirse el archivo de configuración de usuario"
+
+#: ../src/html/chm.cpp:345
+msgid "checksum error"
+msgstr "error de suma de comprobación"
+
+#: ../src/common/tarstrm.cpp:820
+msgid "checksum failure reading tar header block"
+msgstr "fallo de suma de comprobación leyendo bloque de cabecera de tar"
+
+#: ../src/richtext/richtextborderspage.cpp:280
+#: ../src/richtext/richtextborderspage.cpp:310
+#: ../src/richtext/richtextborderspage.cpp:340
+#: ../src/richtext/richtextborderspage.cpp:370
+#: ../src/richtext/richtextborderspage.cpp:424
+#: ../src/richtext/richtextborderspage.cpp:454
+#: ../src/richtext/richtextborderspage.cpp:484
+#: ../src/richtext/richtextborderspage.cpp:514
+#: ../src/richtext/richtextmarginspage.cpp:202
+#: ../src/richtext/richtextmarginspage.cpp:227
+#: ../src/richtext/richtextmarginspage.cpp:250
+#: ../src/richtext/richtextmarginspage.cpp:275
+#: ../src/richtext/richtextmarginspage.cpp:316
+#: ../src/richtext/richtextmarginspage.cpp:341
+#: ../src/richtext/richtextmarginspage.cpp:364
+#: ../src/richtext/richtextmarginspage.cpp:389
+#: ../src/richtext/richtextsizepage.cpp:339
+#: ../src/richtext/richtextsizepage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:400
+#: ../src/richtext/richtextsizepage.cpp:427
+#: ../src/richtext/richtextsizepage.cpp:454
+#: ../src/richtext/richtextsizepage.cpp:481
+#: ../src/richtext/richtextsizepage.cpp:555
+#: ../src/richtext/richtextsizepage.cpp:590
+#: ../src/richtext/richtextsizepage.cpp:625
+#: ../src/richtext/richtextsizepage.cpp:660
+msgid "cm"
+msgstr ""
+
+#: ../src/html/chm.cpp:347
+msgid "compression error"
+msgstr "error de compresión"
+
+#: ../src/common/regex.cpp:239
+msgid "conversion to 8-bit encoding failed"
+msgstr "falló la conversión a codifiación de 8 bits"
+
+#: ../src/common/accelcmn.cpp:182
+msgid "ctrl"
+msgstr "ctrl"
+
+#: ../src/common/cmdline.cpp:1323
+msgid "date"
+msgstr "fecha"
+
+#: ../src/html/chm.cpp:349
+msgid "decompression error"
+msgstr "error de descompresión"
+
+#: ../src/richtext/richtextstyles.cpp:780 ../src/common/fmapbase.cpp:820
+msgid "default"
+msgstr "predeterminado"
+
+#: ../src/common/cmdline.cpp:1319
+msgid "double"
+msgstr ""
+
+#: ../src/common/debugrpt.cpp:543
+msgid "dump of the process state (binary)"
+msgstr "volcado de estado de proceso (binario)"
+
+#: ../src/common/datetimefmt.cpp:1936
+msgid "eighteenth"
+msgstr "décimo octavo"
+
+#: ../src/common/datetimefmt.cpp:1926
+msgid "eighth"
+msgstr "octavo"
+
+#: ../src/common/datetimefmt.cpp:1929
+msgid "eleventh"
+msgstr "undécimo"
+
+#: ../src/common/fileconf.cpp:1868
+#, c-format
+msgid "entry '%s' appears more than once in group '%s'"
+msgstr "la entrada '%s' aparece más de una vez en el grupo '%s'"
+
+#: ../src/html/chm.cpp:343
+msgid "error in data format"
+msgstr "error en formato de datos"
+
+#: ../src/msdos/utilsdos.cpp:413
+#, c-format
+msgid "error opening '%s'"
+msgstr "error al abrir '%s'"
+
+#: ../src/html/chm.cpp:331
+msgid "error opening file"
+msgstr "error al abrir el archivo "
+
+#: ../src/common/zipstrm.cpp:1576
+msgid "error reading zip central directory"
+msgstr "error al leer el directorio central del zip"
+
+#: ../src/common/zipstrm.cpp:1667
+msgid "error reading zip local header"
+msgstr "error al leer la cabecera local del archivo zip"
+
+#: ../src/common/zipstrm.cpp:2396
+#, c-format
+msgid "error writing zip entry '%s': bad crc or length"
+msgstr "error al escribir el elemento de zip '%s': crc o longitud erróneos"
+
+#: ../src/common/ffile.cpp:170
+#, c-format
+msgid "failed to flush the file '%s'"
+msgstr "no se pudo limpiar el archivo '%s'"
+
+#: ../src/common/datetimefmt.cpp:1933
+msgid "fifteenth"
+msgstr "décimo quinto"
+
+#: ../src/common/datetimefmt.cpp:1923
+msgid "fifth"
+msgstr "quinto"
+
+#: ../src/common/fileconf.cpp:610
+#, c-format
+msgid "file '%s', line %d: '%s' ignored after group header."
+msgstr "archivo '%s', línea %d: '%s' ignorado después de cabecera de grupo."
+
+#: ../src/common/fileconf.cpp:639
+#, c-format
+msgid "file '%s', line %d: '=' expected."
+msgstr "archivo '%s', línea %d: '=' esperado."
+
+#: ../src/common/fileconf.cpp:662
+#, c-format
+msgid "file '%s', line %d: key '%s' was first found at line %d."
+msgstr ""
+"archivo '%s', línea %d: clave '%s' fue encontrada por primera vez en la "
+"línea %d."
+
+#: ../src/common/fileconf.cpp:652
+#, c-format
+msgid "file '%s', line %d: value for immutable key '%s' ignored."
+msgstr "archivo '%s', línea %d: valor ignorado para clave inmutable '%s'."
+
+#: ../src/common/fileconf.cpp:574
+#, c-format
+msgid "file '%s': unexpected character %c at line %d."
+msgstr "archivo '%s': carácter %c inesperado en línea %d."
+
+#: ../src/richtext/richtextbuffer.cpp:8358
+msgid "files"
+msgstr "archivos"
+
+#: ../src/common/datetimefmt.cpp:1919
+msgid "first"
+msgstr "primero"
+
+#: ../src/html/helpwnd.cpp:1265
+msgid "font size"
+msgstr "tamaño de fuente"
+
+#: ../src/common/datetimefmt.cpp:1932
+msgid "fourteenth"
+msgstr "décimo cuarto"
+
+#: ../src/common/datetimefmt.cpp:1922
+msgid "fourth"
+msgstr "cuarto"
+
+#: ../src/common/appbase.cpp:695
+msgid "generate verbose log messages"
+msgstr "generar mensajes de log explicativos"
+
+#: ../src/richtext/richtextbuffer.cpp:12212
+#: ../src/richtext/richtextbuffer.cpp:12322
+msgid "image"
+msgstr "imagen"
+
+#: ../src/common/tarstrm.cpp:796
+msgid "incomplete header block in tar"
+msgstr "bloque de cabecera incompleto en tar"
+
+#: ../src/common/xtixml.cpp:489
+msgid "incorrect event handler string, missing dot"
+msgstr "cadena de identificador de evento  incorrecta, falta el punto"
+
+#: ../src/common/tarstrm.cpp:1381
+msgid "incorrect size given for tar entry"
+msgstr "tamaño incorrecto para elemento de tar"
+
+#: ../src/common/tarstrm.cpp:993
+msgid "invalid data in extended tar header"
+msgstr "datos no válido en la cabecera de tar extendido"
+
+#: ../src/generic/logg.cpp:1050
+msgid "invalid message box return value"
+msgstr "valor de retorno de bandeja de entrada no válido"
+
+#: ../src/common/zipstrm.cpp:1445
+msgid "invalid zip file"
+msgstr "archivo zip no válido"
+
+#: ../src/common/fontcmn.cpp:983
+msgid "italic"
+msgstr "cursiva"
+
+#: ../src/common/fontcmn.cpp:973
+msgid "light"
+msgstr "ligera"
+
+#: ../src/common/intl.cpp:293
+#, c-format
+msgid "locale '%s' cannot be set."
+msgstr "'%s' local no pudo establecerse."
+
+#: ../src/common/datetimefmt.cpp:2092
+msgid "midnight"
+msgstr "medianoche"
+
+#: ../src/common/datetimefmt.cpp:1937
+msgid "nineteenth"
+msgstr "décimo noveno"
+
+#: ../src/common/datetimefmt.cpp:1927
+msgid "ninth"
+msgstr "noveno"
+
+#: ../src/msw/dde.cpp:1119
+msgid "no DDE error."
+msgstr "no hay error DDE."
+
+#: ../src/html/chm.cpp:327
+msgid "no error"
+msgstr "ningún error"
+
+#: ../src/dfb/fontmgr.cpp:174
+#, c-format
+msgid "no fonts found in %s, using builtin font"
+msgstr ""
+
+#: ../src/html/helpdata.cpp:655
+msgid "noname"
+msgstr "sin nombre"
+
+#: ../src/common/datetimefmt.cpp:2091
+msgid "noon"
+msgstr "mediodía"
+
+#: ../src/richtext/richtextstyles.cpp:779
+#, fuzzy
+msgid "normal"
+msgstr "Normal"
+
+#: ../src/gtk/print.cpp:1218 ../src/gtk/print.cpp:1323
+msgid "not implemented"
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1315
+msgid "num"
+msgstr "núm"
+
+#: ../src/common/xtixml.cpp:259
+msgid "objects cannot have XML Text Nodes"
+msgstr "los objetos no pueden tener nodos XML de texto"
+
+#: ../src/html/chm.cpp:339
+msgid "out of memory"
+msgstr "memoria agotada"
+
+#: ../src/richtext/richtextsizepage.cpp:340
+#: ../src/richtext/richtextsizepage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:401
+#: ../src/richtext/richtextsizepage.cpp:428
+#: ../src/richtext/richtextsizepage.cpp:455
+#: ../src/richtext/richtextsizepage.cpp:482
+#: ../src/richtext/richtextsizepage.cpp:556
+#: ../src/richtext/richtextsizepage.cpp:591
+#: ../src/richtext/richtextsizepage.cpp:626
+#: ../src/richtext/richtextsizepage.cpp:661
+msgid "percent"
+msgstr ""
+
+#: ../src/common/debugrpt.cpp:519
+msgid "process context description"
+msgstr "descripción del contexto de proceso"
+
+#: ../src/richtext/richtextfontpage.cpp:186
+#: ../src/richtext/richtextfontpage.cpp:189
+msgid "pt"
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:187
+#: ../src/richtext/richtextborderspage.cpp:279
+#: ../src/richtext/richtextborderspage.cpp:281
+#: ../src/richtext/richtextborderspage.cpp:282
+#: ../src/richtext/richtextborderspage.cpp:309
+#: ../src/richtext/richtextborderspage.cpp:311
+#: ../src/richtext/richtextborderspage.cpp:312
+#: ../src/richtext/richtextborderspage.cpp:339
+#: ../src/richtext/richtextborderspage.cpp:341
+#: ../src/richtext/richtextborderspage.cpp:342
+#: ../src/richtext/richtextborderspage.cpp:369
+#: ../src/richtext/richtextborderspage.cpp:371
+#: ../src/richtext/richtextborderspage.cpp:372
+#: ../src/richtext/richtextborderspage.cpp:423
+#: ../src/richtext/richtextborderspage.cpp:425
+#: ../src/richtext/richtextborderspage.cpp:426
+#: ../src/richtext/richtextborderspage.cpp:453
+#: ../src/richtext/richtextborderspage.cpp:455
+#: ../src/richtext/richtextborderspage.cpp:456
+#: ../src/richtext/richtextborderspage.cpp:483
+#: ../src/richtext/richtextborderspage.cpp:485
+#: ../src/richtext/richtextborderspage.cpp:486
+#: ../src/richtext/richtextborderspage.cpp:513
+#: ../src/richtext/richtextborderspage.cpp:515
+#: ../src/richtext/richtextborderspage.cpp:516
+#: ../src/richtext/richtextmarginspage.cpp:201
+#: ../src/richtext/richtextmarginspage.cpp:203
+#: ../src/richtext/richtextmarginspage.cpp:204
+#: ../src/richtext/richtextmarginspage.cpp:226
+#: ../src/richtext/richtextmarginspage.cpp:228
+#: ../src/richtext/richtextmarginspage.cpp:229
+#: ../src/richtext/richtextmarginspage.cpp:249
+#: ../src/richtext/richtextmarginspage.cpp:251
+#: ../src/richtext/richtextmarginspage.cpp:252
+#: ../src/richtext/richtextmarginspage.cpp:274
+#: ../src/richtext/richtextmarginspage.cpp:276
+#: ../src/richtext/richtextmarginspage.cpp:277
+#: ../src/richtext/richtextmarginspage.cpp:315
+#: ../src/richtext/richtextmarginspage.cpp:317
+#: ../src/richtext/richtextmarginspage.cpp:318
+#: ../src/richtext/richtextmarginspage.cpp:340
+#: ../src/richtext/richtextmarginspage.cpp:342
+#: ../src/richtext/richtextmarginspage.cpp:343
+#: ../src/richtext/richtextmarginspage.cpp:363
+#: ../src/richtext/richtextmarginspage.cpp:365
+#: ../src/richtext/richtextmarginspage.cpp:366
+#: ../src/richtext/richtextmarginspage.cpp:388
+#: ../src/richtext/richtextmarginspage.cpp:390
+#: ../src/richtext/richtextmarginspage.cpp:391
+#: ../src/richtext/richtextsizepage.cpp:338
+#: ../src/richtext/richtextsizepage.cpp:341
+#: ../src/richtext/richtextsizepage.cpp:342
+#: ../src/richtext/richtextsizepage.cpp:372
+#: ../src/richtext/richtextsizepage.cpp:375
+#: ../src/richtext/richtextsizepage.cpp:376
+#: ../src/richtext/richtextsizepage.cpp:399
+#: ../src/richtext/richtextsizepage.cpp:402
+#: ../src/richtext/richtextsizepage.cpp:403
+#: ../src/richtext/richtextsizepage.cpp:426
+#: ../src/richtext/richtextsizepage.cpp:429
+#: ../src/richtext/richtextsizepage.cpp:430
+#: ../src/richtext/richtextsizepage.cpp:453
+#: ../src/richtext/richtextsizepage.cpp:456
+#: ../src/richtext/richtextsizepage.cpp:457
+#: ../src/richtext/richtextsizepage.cpp:480
+#: ../src/richtext/richtextsizepage.cpp:483
+#: ../src/richtext/richtextsizepage.cpp:484
+#: ../src/richtext/richtextsizepage.cpp:554
+#: ../src/richtext/richtextsizepage.cpp:557
+#: ../src/richtext/richtextsizepage.cpp:558
+#: ../src/richtext/richtextsizepage.cpp:589
+#: ../src/richtext/richtextsizepage.cpp:592
+#: ../src/richtext/richtextsizepage.cpp:593
+#: ../src/richtext/richtextsizepage.cpp:624
+#: ../src/richtext/richtextsizepage.cpp:627
+#: ../src/richtext/richtextsizepage.cpp:628
+#: ../src/richtext/richtextsizepage.cpp:659
+#: ../src/richtext/richtextsizepage.cpp:662
+#: ../src/richtext/richtextsizepage.cpp:663
+msgid "px"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:188
+#, fuzzy
+msgid "rawctrl"
+msgstr "ctrl"
+
+#: ../src/html/chm.cpp:333
+msgid "read error"
+msgstr "error de lectura"
+
+#: ../src/common/zipstrm.cpp:1882
+#, c-format
+msgid "reading zip stream (entry %s): bad crc"
+msgstr "al leer flujo de zip (elemento %s): crc erróneo"
+
+#: ../src/common/zipstrm.cpp:1877
+#, c-format
+msgid "reading zip stream (entry %s): bad length"
+msgstr "al leer flujo de zip (elemento %s): longitud errónea"
+
+#: ../src/msw/dde.cpp:1162
+msgid "reentrancy problem."
+msgstr "problema de reentrada."
+
+#: ../src/common/datetimefmt.cpp:1920
+msgid "second"
+msgstr "segundo"
+
+#: ../src/html/chm.cpp:337
+msgid "seek error"
+msgstr "error de búsqueda"
+
+#: ../src/common/datetimefmt.cpp:1935
+msgid "seventeenth"
+msgstr "décimo séptimo"
+
+#: ../src/common/datetimefmt.cpp:1925
+msgid "seventh"
+msgstr "séptimo"
+
+#: ../src/common/accelcmn.cpp:186
+msgid "shift"
+msgstr "mayúsculas"
+
+#: ../src/common/appbase.cpp:685
+msgid "show this help message"
+msgstr "mostrar este mensaje de ayuda"
+
+#: ../src/common/datetimefmt.cpp:1934
+msgid "sixteenth"
+msgstr "décimo sexto"
+
+#: ../src/common/datetimefmt.cpp:1924
+msgid "sixth"
+msgstr "sexto"
+
+#: ../src/common/appcmn.cpp:227
+msgid "specify display mode to use (e.g. 640x480-16)"
+msgstr "especifique el modo a usar (ej.: 640x480-16)"
+
+#: ../src/common/appcmn.cpp:213
+msgid "specify the theme to use"
+msgstr "especifique el tema a usar"
+
+#: ../src/richtext/richtextbuffer.cpp:8876
+#, fuzzy
+msgid "standard/circle"
+msgstr "Estándar"
+
+#: ../src/richtext/richtextbuffer.cpp:8877
+msgid "standard/circle-outline"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8879
+msgid "standard/diamond"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8878
+#, fuzzy
+msgid "standard/square"
+msgstr "Estándar"
+
+#: ../src/richtext/richtextbuffer.cpp:8880
+msgid "standard/triangle"
+msgstr ""
+
+#: ../src/common/zipstrm.cpp:1782
+msgid "stored file length not in Zip header"
+msgstr "longitud del archivo almacenada no está en la cabecera del Zip"
+
+#: ../src/common/cmdline.cpp:1311
+msgid "str"
+msgstr "cad"
+
+#: ../src/common/fontcmn.cpp:794 ../src/common/fontcmn.cpp:969
+#, fuzzy
+msgid "strikethrough"
+msgstr "&Tachado"
+
+#: ../src/common/tarstrm.cpp:1003 ../src/common/tarstrm.cpp:1025
+#: ../src/common/tarstrm.cpp:1507 ../src/common/tarstrm.cpp:1529
+msgid "tar entry not open"
+msgstr "elemento tar no abierto"
+
+#: ../src/common/datetimefmt.cpp:1928
+msgid "tenth"
+msgstr "décimo"
+
+#: ../src/msw/dde.cpp:1126
+msgid "the response to the transaction caused the DDE_FBUSY bit to be set."
+msgstr "la respuesta a la transacción causó que se activase el bit DDE_FBUSY."
+
+#: ../src/common/datetimefmt.cpp:1921
+msgid "third"
+msgstr "tercero"
+
+#: ../src/common/datetimefmt.cpp:1931
+msgid "thirteenth"
+msgstr "décimo tercero"
+
+#: ../src/common/datetimefmt.cpp:1725
+msgid "today"
+msgstr "hoy"
+
+#: ../src/common/datetimefmt.cpp:1727
+msgid "tomorrow"
+msgstr "mañana"
+
+#: ../src/common/fileconf.cpp:1979
+#, c-format
+msgid "trailing backslash ignored in '%s'"
+msgstr ""
+
+#: ../src/gtk/aboutdlg.cpp:218
+msgid "translator-credits"
+msgstr "traductor-créditos"
+
+#: ../src/common/datetimefmt.cpp:1930
+msgid "twelfth"
+msgstr "duodécimo"
+
+#: ../src/common/datetimefmt.cpp:1938
+msgid "twentieth"
+msgstr "vigésimo"
+
+#: ../src/common/fontcmn.cpp:789 ../src/common/fontcmn.cpp:965
+msgid "underlined"
+msgstr "subrayado"
+
+#: ../src/common/fileconf.cpp:2014
+#, c-format
+msgid "unexpected \" at position %d in '%s'."
+msgstr "\" inesperado en la posición %d en '%s'."
+
+#: ../src/common/tarstrm.cpp:1045
+msgid "unexpected end of file"
+msgstr "fin de archivo inesperado"
+
+#: ../src/generic/progdlgg.cpp:399 ../src/common/tarstrm.cpp:371
+#: ../src/common/tarstrm.cpp:394 ../src/common/tarstrm.cpp:425
+msgid "unknown"
+msgstr "desconocido"
+
+#: ../src/common/xtixml.cpp:253
+#, c-format
+msgid "unknown class %s"
+msgstr "clase %s desconocida"
+
+#: ../src/common/regex.cpp:261 ../src/html/chm.cpp:351
+msgid "unknown error"
+msgstr "error desconocido"
+
+#: ../src/msw/dialup.cpp:490
+#, c-format
+msgid "unknown error (error code %08x)."
+msgstr "error desconocido (código %08x)."
+
+#: ../src/msw/wince/filefnwce.cpp:172
+msgid "unknown seek origin"
+msgstr "origen de búsqueda desconocido"
+
+#: ../src/common/fmapbase.cpp:834
+#, c-format
+msgid "unknown-%d"
+msgstr "desconocido-%d"
+
+#: ../src/common/docview.cpp:507
+msgid "unnamed"
+msgstr "sin nombre"
+
+#: ../src/common/docview.cpp:1606
+#, c-format
+msgid "unnamed%d"
+msgstr "sin nombre%d"
+
+#: ../src/common/zipstrm.cpp:1796 ../src/common/zipstrm.cpp:2184
+msgid "unsupported Zip compression method"
+msgstr "método de compresión de Zip no soportado"
+
+#: ../src/common/translation.cpp:1883
+#, c-format
+msgid "using catalog '%s' from '%s'."
+msgstr "usando catálogo '%s' de '%s'."
+
+#: ../src/html/chm.cpp:335
+msgid "write error"
+msgstr "error de escritura"
+
+#: ../src/common/time.cpp:318
+msgid "wxGetTimeOfDay failed."
+msgstr "Error en wxGetTimeOfDay"
+
+#: ../src/gtk/print.cpp:987
+msgid "wxPrintout::GetPageInfo gives a null maxPage."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1303
+msgid "wxWidget control pointer is not a data view pointer"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:907
+#, fuzzy
+msgid "wxWidget's control not initialized."
+msgstr "No se puede inicializar el 'display'."
+
+#: ../src/motif/app.cpp:245
+#, c-format
+msgid "wxWidgets could not open display for '%s': exiting."
+msgstr "wxWidgets no pudo abrir el 'display' para '%s': saliendo."
+
+#: ../src/x11/app.cpp:164
+msgid "wxWidgets could not open display. Exiting."
+msgstr "wxWidgets no pudo abrir el 'display'. Saliendo."
+
+#: ../src/richtext/richtextsymboldlg.cpp:434
+msgid "xxxx"
+msgstr "xxxx"
+
+#: ../src/common/datetimefmt.cpp:1726
+msgid "yesterday"
+msgstr "ayer"
+
+#: ../src/common/zstream.cpp:251 ../src/common/zstream.cpp:426
+#, c-format
+msgid "zlib error %d"
+msgstr "error de zlib %d"
+
+#: ../src/richtext/richtextliststylepage.cpp:496
+#: ../src/richtext/richtextbulletspage.cpp:301
+msgid "~"
+msgstr "~"
+
+#~ msgid "Print preview"
+#~ msgstr "Vista previa de impresión"
+
+#, fuzzy
+#~ msgid "&Preview..."
+#~ msgstr " Previsualización"
+
+#, fuzzy
+#~ msgid "Preview..."
+#~ msgstr " Previsualización"
+
+#, fuzzy
+#~ msgid "The vertical offset relative to the paragraph."
+#~ msgstr "El estilo por defecto para el siguiente párrafo."
+
+#~ msgid "&Save..."
+#~ msgstr "&Guardar..."
+
+#~ msgid "About "
+#~ msgstr "Acerca de"
+
+#~ msgid "All files (*.*)|*"
+#~ msgstr "Todos los archivos (*.*)|*"
+
+#~ msgid "Cannot initialize SciTech MGL!"
+#~ msgstr "¡No se puede inicialzar SciTech MGL!"
+
+#~ msgid "Cannot initialize display."
+#~ msgstr "No se puede inicializar el 'display'."
+
+#~ msgid "Cannot start thread: error writing TLS"
+#~ msgstr "No se puede empezar el hilo de ejecución: error escribiendo TLS"
+
+#~ msgid "Close\tAlt-F4"
+#~ msgstr "Cerrar\tAlt-F4"
+
+#~ msgid "Couldn't create cursor."
+#~ msgstr "No se puedo crear el cursor."
+
+#~ msgid "Directory '%s' doesn't exist!"
+#~ msgstr "¡El directorio '%s' no existe!"
+
+#~ msgid "File %s does not exist."
+#~ msgstr "El archivo %s no existe."
+
+#~ msgid "Mode %ix%i-%i not available."
+#~ msgstr "Modo %ix%i-%i no disponible."
+
+#~ msgid "Paper Size"
+#~ msgstr "Tamaño del Papel"
+
+#~ msgid "%.*f GB"
+#~ msgstr "%.*f GB"
+
+#~ msgid "%.*f MB"
+#~ msgstr "%.*f MB"
+
+#~ msgid "%.*f TB"
+#~ msgstr "%.*f TB"
+
+#~ msgid "%.*f kB"
+#~ msgstr "%.*f kB"
+
+#, fuzzy
+#~ msgid "%s"
+#~ msgstr "%s B"
+
+#~ msgid "%s B"
+#~ msgstr "%s B"
+
+#~ msgid "&Goto..."
+#~ msgstr "&Ir a..."
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">>|"
+#~ msgstr ">>|"
+
+#~ msgid "Archive doesnt contain #SYSTEM file"
+#~ msgstr "El paquete no contiene un archivo #SYSTEM"
+
+#~ msgid "BIG5"
+#~ msgstr "BIG5"
+
+#~ msgid "Can't check image format of file '%s': file does not exist."
+#~ msgstr ""
+#~ "No se puede comprobar formato de imagen de archivo '%s': el archivo no "
+#~ "existe."
+
+#~ msgid "Can't load image from file '%s': file does not exist."
+#~ msgstr "No se pudo abrir imagen de archivo '%s': el archivo no existe."
+
+#~ msgid "Cannot convert dialog units: dialog unknown."
+#~ msgstr "No se pueden convertir unidades: diálogo desconocido."
+
+#~ msgid "Cannot convert from the charset '%s'!"
+#~ msgstr "¡No se puede convertir desde el conjunto de caracteres '%s'!"
+
+#~ msgid "Cannot find container for unknown control '%s'."
+#~ msgstr ""
+#~ "No se puede encontrar el contenedor para el control desconocido '%s'."
+
+#~ msgid "Cannot find font node '%s'."
+#~ msgstr "No se puede encontrar nodo de tipo de letra '%s'."
+
+#~ msgid "Cannot open file '%s'."
+#~ msgstr "No se puede abrir el archivo '%s'."
+
+#~ msgid "Cannot parse coordinates from '%s'."
+#~ msgstr "No se pueden parsear coordenadas desde '%s'."
+
+#~ msgid "Cannot parse dimension from '%s'."
+#~ msgstr "No se puede parsear dimensión desde '%s'."
+
+#~ msgid "Cant create the thread event queue"
+#~ msgstr "No se puede crear la cola de eventos del hilo de ejecución"
+
+#~ msgid "Click to cancel this window."
+#~ msgstr "Haga click para cerrar esta ventana."
+
+#~ msgid "Click to confirm your selection."
+#~ msgstr "Haga clic para confirmar la selección."
+
+#~ msgid "Could not unlock mutex"
+#~ msgstr "No se pudo desbloquear el mutex"
+
+#~ msgid "Error while waiting on semaphore"
+#~ msgstr "Error al escribir en el semáforo"
+
+#, fuzzy
+#~ msgid "Failed to connect to session manager: %s"
+#~ msgstr "Fallo al %s marcado de la conexión: %s"
+
+#~ msgid "Failed to create a status bar."
+#~ msgstr "Fallo al crear barra de estado."
+
+#~ msgid "Failed to register OpenGL window class."
+#~ msgstr "Fallo al registrar la clase de ventana OpenGL."
+
+#~ msgid "Fatal error"
+#~ msgstr "Error fatal"
+
+#~ msgid "Fatal error: "
+#~ msgstr "Error fatal: "
+
+#~ msgid "GB-2312"
+#~ msgstr "GB-2312"
+
+#~ msgid "Go forward to the next HTML page"
+#~ msgstr "Ir a la página HTML siguiente"
+
+#~ msgid "Goto Page"
+#~ msgstr "Ir a Página"
+
+#, fuzzy
+#~ msgid ""
+#~ "HTML pagination algorithm generated more than the allowed maximum number "
+#~ "of pages and it can't continue any longer!"
+#~ msgstr ""
+#~ "¡El algoritmo de paginación de HTML generó más páginas de las máximas "
+#~ "permitidas y no puede continuar!"
+
+#~ msgid "Help : %s"
+#~ msgstr "Ayuda: %s"
+
+#~ msgid "I64"
+#~ msgstr "I64"
+
+#~ msgid "Internal error, illegal wxCustomTypeInfo"
+#~ msgstr "Error interno, wxCustomTypeInfo ilegal"
+
+#~ msgid "Invalid XRC resource '%s': doesn't have root node 'resource'."
+#~ msgstr "Recurso XRC no válido '%s': no tiene el nodo raíz 'resource'."
+
+#~ msgid "No handler found for XML node '%s', class '%s'!"
+#~ msgstr "¡No se encontró manejador para el nodo XML '%s', clase '%s'!"
+
+#~ msgid "No image handler for type %ld defined."
+#~ msgstr "No hay definido ningún manipulador de imagen para tipo %ld."
+
+#, fuzzy
+#~ msgid "Owner not initialized."
+#~ msgstr "No se puede inicializar el 'display'."
+
+#, fuzzy
+#~ msgid "Passed item is invalid."
+#~ msgstr "'%s' es inválido"
+
+#~ msgid "Passing a already registered object to SetObjectName"
+#~ msgstr "Paso de un objeto ya registrado a SetObjectName"
+
+#~ msgid "Preparing help window..."
+#~ msgstr "Preparando ventana de ayuda..."
+
+#~ msgid "Program aborted."
+#~ msgstr "Programa abortado."
+
+#~ msgid "Referenced object node with ref=\"%s\" not found!"
+#~ msgstr "¡No se ha encontrado objeto nodo referenciado con ref=\"%s\"!"
+
+#~ msgid "Resource files must have same version number!"
+#~ msgstr "¡Los archivo de recursos deben tener la misma versión!"
+
+#~ msgid "SHIFT-JIS"
+#~ msgstr "MAYÚS"
+
+#~ msgid "Search!"
+#~ msgstr "¡Buscar!"
+
+#~ msgid "Sorry, could not open this file for saving."
+#~ msgstr "No pudo abrirse este archivo para guardar."
+
+#~ msgid "Sorry, could not save this file."
+#~ msgstr "No pudo guardarse este archivo."
+
+#~ msgid "Sorry, print preview needs a printer to be installed."
+#~ msgstr ""
+#~ "Disculpe, la impresión de vista previa requiere que se instale una "
+#~ "impresora."
+
+#~ msgid "Status: "
+#~ msgstr "Estado: "
+
+#~ msgid ""
+#~ "Streaming delegates for not already streamed objects not yet supported"
+#~ msgstr ""
+#~ "Aún no están soportados los delegados de flujo para los objetos que no "
+#~ "son ya de flujo"
+
+#~ msgid "Subclass '%s' not found for resource '%s', not subclassing!"
+#~ msgstr "¡No se encontró la subclase '%s' para el recurso '%s'!"
+
+#~ msgid "TIFF library error."
+#~ msgstr "Error en librería TIFF."
+
+#~ msgid "TIFF library warning."
+#~ msgstr "Aviso de librería TIFF."
+
+#~ msgid ""
+#~ "The file '%s' couldn't be opened.\n"
+#~ "It has been removed from the most recently used files list."
+#~ msgstr ""
+#~ "El archivo '%s' no puede abrirse.\n"
+#~ "Ha sido eliminado de la lista de archivos recientes."
+
+#~ msgid "The path '%s' contains too many \"..\"!"
+#~ msgstr "¡La ruta '%s' contiene demasiados \"..\"!"
+
+#~ msgid "Trying to solve a NULL hostname: giving up"
+#~ msgstr ""
+#~ "Intentando resolver un nombre de máquina (hostname) nulo: imposible de "
+#~ "resolver"
+
+#~ msgid "Unknown style flag "
+#~ msgstr "Flag de estilo desconocido"
+
+#~ msgid "Warning"
+#~ msgstr "Aviso"
+
+#~ msgid "Windows 2000 (build %lu"
+#~ msgstr "Windows 2000 (build %lu"
+
+#~ msgid "XRC resource '%s' (class '%s') not found!"
+#~ msgstr "¡Recurso XRC '%s' (clase '%s') no encontrado!"
+
+#~ msgid "XRC resource: Cannot create animation from '%s'."
+#~ msgstr "Recurso XRC: No se pudo crear la animación desde '%s'."
+
+#~ msgid "XRC resource: Cannot create bitmap from '%s'."
+#~ msgstr "Recurso XRC: No se pudo crear el mapa de bits desde '%s'."
+
+#, fuzzy
+#~ msgid ""
+#~ "XRC resource: Incorrect colour specification '%s' for attribute '%s'."
+#~ msgstr ""
+#~ "Recurso XRC: Especificación de color '%s' incorrecta para la propiedad "
+#~ "'%s'."
+
+#~ msgid "[EMPTY]"
+#~ msgstr "[VACÍO]"
+
+#~ msgid "catalog file for domain '%s' not found."
+#~ msgstr "archivo de catálogo para dominio '%s' no encontrado."
+
+#~ msgid "delegate has no type info"
+#~ msgstr "el delegado no tiene información de tipo"
+
+#~ msgid "encoding %i"
+#~ msgstr "codificación %i"
+
+#~ msgid "looking for catalog '%s' in path '%s'."
+#~ msgstr "buscando catálogo '%s' en directorio '%s'."
+
+#~ msgid "wxRichTextFontPage"
+#~ msgstr "wxRichTextFontPage"
+
+#~ msgid "wxSearchEngine::LookFor must be called before scanning!"
+#~ msgstr "wxSearchEngine::¡LookFor debe ser llamado antes de escanear!"
+
+#~ msgid "wxSocket: invalid signature in ReadMsg."
+#~ msgstr "wxSocket: firma inválida en ReadMsg"
+
+#~ msgid "wxSocket: unknown event!."
+#~ msgstr "wxSocket: ¡evento desconocido!."
+
+#~ msgid "|<<"
+#~ msgstr "|<<"
+
+#~ msgid "\t%s: %s\n"
+#~ msgstr "\t%s: %s\n"
+
+#~ msgid " Couldn't create the UnicodeConverter"
+#~ msgstr "No se puede crear el Convertidor a Unicode"
+
+#~ msgid "#define %s must be an integer."
+#~ msgstr "#define %s debe ser un entero."
+
+#~ msgid "%s not a bitmap resource specification."
+#~ msgstr "%s no es una especificación de recurso de mapa de bits."
+
+#~ msgid "%s not an icon resource specification."
+#~ msgstr "%s no es una especificación de recurso de icono."
+
+#~ msgid "%s: ill-formed resource file syntax."
+#~ msgstr "%s: Sintaxis incorrecta del archivo de recursos."
+
+#~ msgid "&Open"
+#~ msgstr "A&brir..."
+
+#~ msgid "&Print"
+#~ msgstr "Im&primir"
+
+#~ msgid "*** A debug report has been generated\n"
+#~ msgstr "*** Se ha generado un informe de depuración\n"
+
+#~ msgid "*** It can be found in \"%s\"\n"
+#~ msgstr "*** Se encuentra en \"%s\"\n"
+
+#~ msgid ""
+#~ ", expected static, #include or #define\n"
+#~ "while parsing resource."
+#~ msgstr ""
+#~ ", se esperaba static, #include o #define\n"
+#~ "al analizar recurso."
+
+#~ msgid "Bitmap resource specification %s not found."
+#~ msgstr "Especificación de  recurso de mapa de bits %s no encontrada."
+
+#~ msgid "Closes the dialog without inserting a symbol."
+#~ msgstr "Cierra el diálogo sin insertar un símbolo."
+
+#~ msgid ""
+#~ "Could not resolve control class or id '%s'. Use (non-zero) integer "
+#~ "instead\n"
+#~ " or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "No se puede resolver la clase de control o el id '%s'. Usar un entero "
+#~ "distinto de cero\n"
+#~ " o proporcionar el #define (ver consejos del manual)"
+
+#~ msgid ""
+#~ "Could not resolve menu id '%s'. Use (non-zero) integer instead\n"
+#~ "or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "No se puede resolver el id de menu '%s'. Usar un entero distinto de cero\n"
+#~ " o proporcionar el #define (ver consejos del manual)"
+
+#~ msgid "Couldn't end the context on the overlay window"
+#~ msgstr "No se pudo finalizar el contexto en la ventana de superposición"
+
+#~ msgid "Expected '*' while parsing resource."
+#~ msgstr "Se esperaba '*' al analizar el recurso."
+
+#~ msgid "Expected '=' while parsing resource."
+#~ msgstr "Se esperaba '=' al analizar el recurso."
+
+#~ msgid "Expected 'char' while parsing resource."
+#~ msgstr "Se esperaba 'char' al analizar el recurso."
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "No se pudo encontrar el recurso XPBM %s. \n"
+#~ "¿Se olvidó de usar xwResourceLoadBitmapData?"
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadIconData?"
+#~ msgstr ""
+#~ "No se pudo encontrar recurso XBM %s. \n"
+#~ "¿Se olvidó de usar wxResourceLoadIconData?"
+
+#~ msgid ""
+#~ "Failed to find XPM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "No se pudo encontrar el recurso XPM %s. \n"
+#~ "¿Se olvidó de usar wxResourceLoadBitmapData?"
+
+#~ msgid "Failed to get clipboard data."
+#~ msgstr "Error al obtener información portapapeles."
+
+#~ msgid "Failed to load shared library '%s' Error '%s'"
+#~ msgstr "No se pudo abrir la librería dinámica '%s'. Error '%s'"
+
+#~ msgid "Found "
+#~ msgstr "Encontrado "
+
+#~ msgid "Icon resource specification %s not found."
+#~ msgstr "Especificación de recursos de iconos %s no encontrada."
+
+#~ msgid "Ill-formed resource file syntax."
+#~ msgstr "Sintaxis incorrecta del archivo de recursos."
+
+#~ msgid "Inserts the chosen symbol."
+#~ msgstr "Inserta el símbolo seleccionado."
+
+#~ msgid "Long Conversions not supported"
+#~ msgstr "Las conversiones Long no están soportadas"
+
+#~ msgid "No XPM icon facility available!"
+#~ msgstr "¡No está disponible el soporte para iconos XPM!"
+
+#~ msgid "Option '%s' requires a value, '=' expected."
+#~ msgstr "El parámetro '%s' necesita un valor, falta '='."
+
+#~ msgid "Select all"
+#~ msgstr "Seleccionar todo"
+
+#~ msgid ""
+#~ "Sorry, docking is not supported for ports other than wxMSW, wxMac and "
+#~ "wxGTK"
+#~ msgstr ""
+#~ "Lo siento, pero la reducción no es soportada por versiones que no sean "
+#~ "wxMSW, wxMac y wxGTK"
+
+#~ msgid "String conversions not supported"
+#~ msgstr "Conersiones de cadena no soportadas"
+
+#~ msgid "Unexpected end of file while parsing resource."
+#~ msgstr "Fin de archivo inesperado al analizar el recurso."
+
+#~ msgid "Unrecognized style %s while parsing resource."
+#~ msgstr "Estilo %s no reconocido al analizar el recurso."
+
+#~ msgid "Video Output"
+#~ msgstr "Salida de vídeo"
+
+#~ msgid "Warning: attempt to remove HTML tag handler from empty stack."
+#~ msgstr "Atención: intentando eliminar una etiqueta HTML de una pila vacía "
+
+#~ msgid "establish"
+#~ msgstr "establecer"
+
+#~ msgid "initiate"
+#~ msgstr "iniciar"
+
+#~ msgid "invalid eof() return value."
+#~ msgstr "valor devuelto por eof() no válido"
+
+#~ msgid "unknown line terminator"
+#~ msgstr "terminador de linea desconocido"
+
+#~ msgid "writing"
+#~ msgstr "escribiendo"
+
+#~ msgid "wxRichTextBulletsPage"
+#~ msgstr "wxRichTextBulletsPage"
+
+#~ msgid "wxRichTextListStylePage"
+#~ msgstr "wxRichTextListStylePage"
+
+#~ msgid "wxRichTextStylePage"
+#~ msgstr "wxRichTextStylePage"
+
+#~ msgid "."
+#~ msgstr "."
+
+#~ msgid "Cannot open URL '%s'"
+#~ msgstr "No se puede abrir la URL '%s'"
+
+#~ msgid "Error "
+#~ msgstr "Error "
+
+#, fuzzy
+#~ msgid "Failed to create directory %s/.gnome."
+#~ msgstr "Fallo al crear directorio %s/mime-info."
+
+#~ msgid "Failed to create directory %s/mime-info."
+#~ msgstr "Fallo al crear directorio %s/mime-info."
+
+#~ msgid "MP Thread Support is not available on this System"
+#~ msgstr "El soporte para hilos MP no está disponible en este sistema"
+
+#~ msgid "Mailcap file %s, line %d: incomplete entry ignored."
+#~ msgstr "Archivo Mailcap %s, linea %d: entrada incompleta ignorada."
+
+#~ msgid "Mime.types file %s, line %d: unterminated quoted string."
+#~ msgstr ""
+#~ "Archivo de Tipos Mime %s, linea %d: cadena entrecomillada no terminada."
+
+#~ msgid "Unknown field in file %s, line %d: '%s'."
+#~ msgstr "Campo desconocido en el archivo %s, linea %d: '%s'."
+
+#~ msgid "bold "
+#~ msgstr "negrita"
+
+#~ msgid "can't query for GUI plugins name in console applications"
+#~ msgstr ""
+#~ "no se pueden solicitar los nombres complementos del GUI en las "
+#~ "aplicaciones de consola"
+
+#~ msgid "light "
+#~ msgstr "ligera"
+
+#~ msgid "underlined "
+#~ msgstr "subrayado"
+
+#~ msgid "unsupported zip archive"
+#~ msgstr "paquete zip no soportado"
+
+#~ msgid "Select a file"
+#~ msgstr "Seleccionar un archivo"
diff --git a/cadxcore/lang/fr/cadxcore.mo b/cadxcore/lang/fr/cadxcore.mo
new file mode 100644
index 0000000..72438ef
Binary files /dev/null and b/cadxcore/lang/fr/cadxcore.mo differ
diff --git a/cadxcore/lang/fr/cadxcore.po b/cadxcore/lang/fr/cadxcore.po
new file mode 100644
index 0000000..7326a9b
--- /dev/null
+++ b/cadxcore/lang/fr/cadxcore.po
@@ -0,0 +1,6856 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-06-11 15:50+0100\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: French <fr at li.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-KeywordsList: _Std;_\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Poedit-SearchPath-0: ..\\..\n"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr "N/B"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr "N/B inversé"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr "Fanon"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr "Corps noir"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr "Cardiaque"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr "VR Os"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr "VR Muscles & Os"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Red Vessels"
+msgstr "VR Vaisseaux rouges"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr "Arc-en-ciel gris"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr "Croupe"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr "Spectre"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Metal"
+msgstr "Métal chaud"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr "Acier chaud"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Green"
+msgstr "Vert chaud"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "GE Color"
+msgstr "Couleur GE"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr "PERFusion"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PET"
+msgstr "PET"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr "Flux"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr "LONI"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr "LONI2"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr "Asymétrie"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "P-Value"
+msgstr "Valeur P"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr "ROI"
+
+#: ..\../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr "Tentative de dé-référence d'un pointeur nul"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#: ..\../api/dicom/idicomconformance.cpp:214
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "GIL/DICOM/Conformance"
+msgstr "GIL/DICOM/Conformité"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid "Unable to add supported transfer syntax "
+msgstr "Impossible d'ajouter une syntaxe de transfert supportée "
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid " to SOP Class "
+msgstr " dans la classe SOP"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr ""
+". La syntaxe de transfert n'existe pas dans le modèle : ajoutez-la d'abord."
+
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr ". La classe SOP n'existe pas dans le modèle : ajoutez-la d'abord."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid "Unable to add supported SOP Class "
+msgstr "Impossible d'ajouter une classe SOP supportée"
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " to Modality "
+msgstr " à la modalité "
+
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr ". La modalité n'existe pas dans le modèle : ajoutez-la d'abord."
+
+#: ..\../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr "Erreur de chargement du fichier de conformité DICOM"
+
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr "Fichier de conformité DICOM invalide"
+
+#: ..\../api/iannotator.cpp:97
+msgid "Slice"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+#, fuzzy
+msgid "of"
+msgstr " de "
+
+#: ..\../api/iannotator.cpp:97
+#, fuzzy
+msgid "Volume"
+msgstr "Colonnes"
+
+#: ..\../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:110
+#, fuzzy
+msgid "Image without metric information"
+msgstr "Information de présentation d'image"
+
+#: ..\../api/iannotator.cpp:119
+msgid "Slice thickness"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:127
+#, fuzzy
+msgid "Slice location"
+msgstr "Emplacement"
+
+#: ..\../api/iannotator.cpp:139
+#, fuzzy
+msgid "Scale"
+msgstr "Grille de mesure"
+
+#: ..\../api/iannotator.cpp:147
+#, fuzzy
+msgid "Right"
+msgstr "&Droite"
+
+#: ..\../api/iannotator.cpp:149
+#, fuzzy
+msgid "Left"
+msgstr "&Gauche"
+
+#: ..\../api/iannotator.cpp:219
+#, fuzzy
+msgid "Position:"
+msgstr "La position du taquet de tabulation."
+
+#: ..\../api/iannotator.cpp:272
+#, fuzzy
+msgid "Value:"
+msgstr "Valeur"
+
+#: ..\../api/iexception.cpp:52
+msgid "Exception in component"
+msgstr "Exception dans le composant"
+
+#: ..\../api/initwx.cpp:439
+msgid "Initializing environment ..."
+msgstr "Initialisation de l'environnement ..."
+
+#: ..\../api/initwx.cpp:446 ..\../api/initwx.cpp:447 ..\../api/initwx.cpp:448
+#: ..\../api/initwx.cpp:449 ..\../api/initwx.cpp:450 ..\../api/initwx.cpp:451
+#: ..\../api/initwx.cpp:452 ..\../api/initwx.cpp:453
+msgid "Ginkgo CADx restrictions"
+msgstr "Restrictions Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr "Ouvrir uniquement un onglet pour chaque étude"
+
+#: ..\../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr "Mode anonyme (l'historique est effacé)"
+
+#: ..\../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr "Nombre max d'onglets ouverts"
+
+#: ..\../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr "Temps d'inactivité maximum de l'application Ginkgo CADx (s)"
+
+#: ..\../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr "Fermer automatiquement Ginkgo CADx après dicomisation"
+
+#: ..\../api/initwx.cpp:451
+msgid "Export images"
+msgstr "Exporter images"
+
+#: ..\../api/initwx.cpp:452
+msgid "Acquire DICOM files"
+msgstr "Acquérir fichiers DICOM"
+
+#: ..\../api/initwx.cpp:453
+msgid "Import files to DICOM format"
+msgstr "Importer des fichiers au format DICOM"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "Online manual"
+msgstr "Manuel en ligne"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "URL of manual"
+msgstr "URL du manuel"
+
+#: ..\../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr "doc\\manual_ginkgo_cadx_pro_en.pdf"
+
+#: ..\../api/initwx.cpp:459
+msgid "Online support"
+msgstr "Support en ligne"
+
+#: ..\../api/initwx.cpp:459
+msgid "URL of online support"
+msgstr "URL du support en ligne"
+
+#: ..\../api/initwx.cpp:459
+msgid "http://ginkgo-cadx.com/"
+msgstr "http://ginkgo-cadx.com/"
+
+#: ..\../api/initwx.cpp:460 ..\../api/initwx.cpp:461
+msgid "Program Updates"
+msgstr "Mises à jour du programme"
+
+#: ..\../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr "Alerter à propos de nouvelles mises à jour de Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:461
+msgid "Update period (days)"
+msgstr "Période de mise à jour (jours)"
+
+#: ..\../api/initwx.cpp:462
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr "Sécurité"
+
+#: ..\../api/initwx.cpp:462
+msgid "Setup Security"
+msgstr "Configuration de la sécurité"
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup"
+msgstr "Voir au démarrage"
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup default value"
+msgstr "Voir au démarrage la valeur par défaut"
+
+#: ..\../api/initwx.cpp:465 ..\../api/initwx.cpp:466
+#: ..\../main/gui/history3/historypanel3.cpp:328
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr "Outils"
+
+#: ..\../api/initwx.cpp:465
+msgid "Settings menu"
+msgstr "Menu configuration"
+
+#: ..\../api/initwx.cpp:466
+msgid "License menu"
+msgstr "Menu licence"
+
+#: ..\../api/initwx.cpp:467 ..\../api/initwx.cpp:468 ..\../api/initwx.cpp:469
+#: ..\../api/initwx.cpp:470 ..\../api/initwx.cpp:471 ..\../api/initwx.cpp:472
+#: ..\../api/initwx.cpp:473 ..\../api/initwx.cpp:474
+msgid "PACS Limits"
+msgstr "Limite PACS"
+
+#: ..\../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr ""
+
+#: ..\../api/initwx.cpp:468
+msgid "Upload images to a PACS server"
+msgstr "Envoi d'image au serveur PACS"
+
+#: ..\../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr "Importer des images du PACS"
+
+#: ..\../api/initwx.cpp:470
+msgid "Enable remote PACS configuration"
+msgstr "Activer la configuration du PACS distant"
+
+#: ..\../api/initwx.cpp:471
+msgid "Enable TLS configuration"
+msgstr "Activer la configuration TLS"
+
+#: ..\../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr "Limiter la recherche aux patients sélectionnés"
+
+#: ..\../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr "Limiter la recherche d'étude par une taille maximale (kB)"
+
+#: ..\../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr "Forcer le \"sens-perte\" lors de l'envoi"
+
+#: ..\../api/initwx.cpp:475 ..\../api/initwx.cpp:476 ..\../api/initwx.cpp:477
+#: ..\../api/initwx.cpp:478 ..\../api/initwx.cpp:479 ..\../api/initwx.cpp:480
+msgid "Import"
+msgstr "Import"
+
+#: ..\../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr "Spécifier ce stockage de classes SOP dans la dicomisation"
+
+#: ..\../api/initwx.cpp:476
+msgid "Show accession number input"
+msgstr "Montrer le numéro d'accès"
+
+#: ..\../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr "Compression, 0 implique pas de compression (0..14)"
+
+#: ..\../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+"Codec de recompression (0=JPEG Baseline(défaut), 1=JPEG progressif, 2=JPEG "
+"sans perte)"
+
+#: ..\../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr "Ne pas changer le codec de l'image (si possible)"
+
+#: ..\../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr "Passer l'étape démographique si c'est possible"
+
+#: ..\../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr "Service HL7"
+
+#: ..\../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr "Démarrer automatiquement le service d'envoi HL7"
+
+#: ..\../api/initwx.cpp:483 ..\../api/initwx.cpp:484 ..\../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr "Dicomisation XML"
+
+#: ..\../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr "Envoi de message HL7 pendant l'import"
+
+#: ..\../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr "Envoi de l'étude au PACS pendant l'import"
+
+#: ..\../api/initwx.cpp:485
+msgid "Default ORU template"
+msgstr "Template ORU par défaut"
+
+#: ..\../api/initwx.cpp:488 ..\../api/initwx.cpp:489 ..\../api/initwx.cpp:491
+#: ..\../api/initwx.cpp:493 ..\../api/initwx.cpp:494 ..\../api/initwx.cpp:495
+#: ..\../api/initwx.cpp:496 ..\../api/initwx.cpp:498
+msgid "Style"
+msgstr "Style"
+
+#: ..\../api/initwx.cpp:503
+#, c-format
+msgid "Download %s images"
+msgstr "Téléchargement de %s images"
+
+#: ..\../api/initwx.cpp:504 ..\../api/initwx.cpp:508
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+msgid "PACS"
+msgstr "PACS"
+
+#: ..\../api/initwx.cpp:507
+msgid "Download all modalities"
+msgstr "Téléchargement de toutes les modalités"
+
+#: ..\../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr "OpenGL"
+
+#: ..\../api/initwx.cpp:510
+msgid "Enable shaders"
+msgstr "Activer shaders"
+
+#: ..\../api/initwx.cpp:513
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+msgid "Ginkgo Cloud"
+msgstr "Cloud Ginkgo"
+
+#: ..\../api/initwx.cpp:513
+msgid "Download from Ginkgo Cloud"
+msgstr "Téléchargement du Ginkgo Cloud"
+
+#: ..\../api/initwx.cpp:560
+msgid "Tools loading base ..."
+msgstr "Outil de chargement de base ..."
+
+#: ..\../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr "Démarrage des outils"
+
+#: ..\../api/initwx.cpp:566
+msgid "Loading plugins ..."
+msgstr "Chargement des plugins"
+
+#: ..\../api/initwx.cpp:580
+msgid "Unable to start GinkgoCADx:\n"
+msgstr "Impossible de démarrer GinkgoCADx:\n"
+
+#: ..\../api/initwx.cpp:580 ..\../api/initwx.cpp:621
+msgid "error"
+msgstr "erreur"
+
+#: ..\../api/initwx.cpp:584
+msgid "Loading resources ..."
+msgstr "Chargement des ressources ..."
+
+#: ..\../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr "Démarrage des services"
+
+#: ..\../api/initwx.cpp:601
+msgid "Configuring environment ..."
+msgstr "Configuration de l'environnement ..."
+
+#: ..\../api/initwx.cpp:621
+msgid "Failed to set permissions:\n"
+msgstr "Echec de la modification des permissions:\n"
+
+#: ..\../api/initwx.cpp:634
+msgid "Updating ..."
+msgstr "Mise à jour ..."
+
+#: ..\../api/initwx.cpp:638
+msgid "Interpreting parameters ..."
+msgstr "Interprétations des paramètres ..."
+
+#: ..\../api/initwx.cpp:689
+msgid "Error unregistering tools: "
+msgstr "Erreur à l'enregistrement d'outils :"
+
+#: ..\../api/initwx.cpp:769
+msgid "Starting"
+msgstr "Démarrage"
+
+#: ..\../api/ivista.cpp:36 ..\../commands/comandocarga.cpp:73
+msgid "Loading..."
+msgstr "Chargement..."
+
+#: ..\../api/iwidgets.cpp:268
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ..\../main/gui/import/pasosimportacionbase.cpp:151
+msgid "Name"
+msgstr "Nom"
+
+#: ..\../api/iwidgets.cpp:285
+msgid "Area"
+msgstr "Aire"
+
+#: ..\../api/iwidgets.cpp:302
+msgid "Perimeter"
+msgstr "Périmètre"
+
+#: ..\../api/iwidgets.cpp:316
+msgid "Travel (I)"
+msgstr "Voyage (I)"
+
+#: ..\../api/iwidgets.cpp:326
+msgid "Travel (M)"
+msgstr "Voyage (M)"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#: ..\../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr "Threading"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid "Error while running thread: "
+msgstr "Erreur pendant l'exécution du thread :"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid " : "
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:120
+msgid "Internal error while running thread: "
+msgstr "Erreur interne pendant l'exécution du thread :"
+
+#: ..\../api/widgetserializable.cpp:60
+msgid "Creation Date"
+msgstr "Date de création"
+
+#: ..\../api/widgetserializable.cpp:65
+msgid "Modification Date"
+msgstr "Date de modification"
+
+#: ..\../api/widgetserializable.cpp:68
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:40
+msgid "Physician"
+msgstr "Médecin"
+
+#: ..\../commands/acquirefromurlcommand.cpp:55
+#: ..\../commands/pacsdownloadcommand.cpp:88
+#: ..\../commands/synchronizationcommand.cpp:70
+msgid "Downloading files ..."
+msgstr "Téléchargement des fichiers ..."
+
+#: ..\../commands/acquirefromurlcommand.cpp:69
+#: ..\../commands/synchronizationcommand.cpp:91
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, c-format
+msgid "Downloading file %d"
+msgstr "Téléchargement du fichier %d"
+
+#: ..\../commands/acquirefromurlcommand.cpp:81
+#, fuzzy
+msgid "Error downloading file: "
+msgstr "Erreur de téléchargement de fichier"
+
+#: ..\../commands/acquirefromurlcommand.cpp:95
+#: ..\../commands/pacsdownloadcommand.cpp:114
+#: ..\../commands/synchronizationcommand.cpp:121
+msgid "Internal Error"
+msgstr "Erreur interne"
+
+#: ..\../commands/acquirefromurlcommand.cpp:115
+#, fuzzy
+msgid "Error downloading files: "
+msgstr "Téléchargement des fichiers ..."
+
+#: ..\../commands/autocleaningcommand.cpp:62
+msgid "Cleaning dicomdir..."
+msgstr "Nettoyage de dicomdir"
+
+#: ..\../commands/cloudcommand.cpp:67
+msgid "Downloading files..."
+msgstr "Téléchargement de fichiers..."
+
+#: ..\../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:183
+msgid "Unknown operation"
+msgstr "Opération inconnue"
+
+#: ..\../commands/cloudcommand.cpp:188
+msgid "Error in cloud operation. See log to get more details..."
+msgstr ""
+"Erreur dans l'opération Cloud. Voir les journaux pour avoir plus de "
+"détails..."
+
+#: ..\../commands/cloudcommand.cpp:249
+msgid "Could to retrieve study."
+msgstr "Ne peut récupérer l'étude."
+
+#: ..\../commands/cloudcommand.cpp:260 ..\../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+"Cette version de Ginkgo CADx n'est pas compatible avec la version actuelle "
+"de Ginkgo Cloud"
+
+#: ..\../commands/cloudcommand.cpp:262
+msgid "Error retrieving study."
+msgstr "Erreur à la récupération de l'étude"
+
+#: ..\../commands/cloudcommand.cpp:271
+msgid "Study successfully retrieved."
+msgstr "Etude récupérée avec succès"
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "Speed"
+msgstr "Vitesse"
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "bytes/sec during"
+msgstr "o/s pendant"
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "seconds"
+msgstr "secondes"
+
+#: ..\../commands/cloudcommand.cpp:275
+msgid "Empty Response"
+msgstr "Réponse vide"
+
+#: ..\../commands/cloudcommand.cpp:289
+msgid "Extracting files..."
+msgstr "Extraction des fichiers..."
+
+#: ..\../commands/cloudcommand.cpp:313 ..\../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr "Le fichier téléchargé est invalide"
+
+#: ..\../commands/cloudcommand.cpp:383
+msgid "Could to perform query."
+msgstr "Ne peut exécuter la requête."
+
+#: ..\../commands/cloudcommand.cpp:396
+msgid "Error perfoming the query."
+msgstr "Erreur à l'exécution de la requête."
+
+#: ..\../commands/cloudcommand.cpp:405
+msgid "Query successfully performed."
+msgstr "Requête exécutée avec succès."
+
+#: ..\../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr "Réponse JSON"
+
+#: ..\../commands/cloudcommand.cpp:472
+msgid "Unknown JSon attribute:"
+msgstr "Attribut JSON inconnu :"
+
+#: ..\../commands/cloudcommand.cpp:482
+msgid "Error parsing JSon: "
+msgstr "Erreur à l'analyse du JSON :"
+
+#: ..\../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr "Réponse vide"
+
+#: ..\../commands/cloudcommand.cpp:515
+#: ..\../commands/openremovableunit.cpp:148 ..\../main/gui/open/abrir.cpp:119
+#: ..\../main/gui/open/abrir.cpp:159 ..\../main/gui/open/opendialogs.cpp:146
+msgid "Storing in the history..."
+msgstr "Enregistrement dans l'historique"
+
+#: ..\../commands/comandoactualizaciones.cpp:46
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:536
+msgid "Check Updates"
+msgstr "Vérifications des mises à jour"
+
+#: ..\../commands/comandoactualizaciones.cpp:136
+msgid "Not enough parameters found on XML"
+msgstr "Pas assez de paramètres trouvés dans le XML"
+
+#: ..\../commands/comandoactualizaciones.cpp:145
+msgid "XML parsing internal error"
+msgstr "Erreur interne à l'analyse XML"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Error checking application updates"
+msgstr "Erreur à la vérification des mises à jour de l'application"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Ginkgo CADx updates"
+msgstr "Mise à jour Ginkgo CADx"
+
+#: ..\../commands/comandoactualizaciones.cpp:170
+msgid "Internal error checking updates"
+msgstr "Erreur interne à la vérification de mises à jour"
+
+#: ..\../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr "Chemin des séries introuvable"
+
+#: ..\../commands/comandocarga.cpp:92 ..\../commands/comandocarga.cpp:96
+msgid "Exception loading:"
+msgstr "Exception au chargement :"
+
+#: ..\../commands/comandocarga.cpp:100
+msgid "Study malformed or unsupported"
+msgstr "Étude mal formée ou non supportée"
+
+#: ..\../commands/comandocarga.cpp:129 ..\../commands/comandocarga.cpp:139
+msgid "Error loading study: "
+msgstr "Erreur au chargement de l'étude :"
+
+#: ..\../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr "Erreur au chargement de l'étude : mémoire insuffisante"
+
+#: ..\../commands/comandocarga.cpp:144
+msgid "Error loading study."
+msgstr "Erreur au chargement de l'étude."
+
+#: ..\../commands/comandocarga.cpp:149
+msgid "Load canceled by user"
+msgstr "Chargement annulé par l'utilisateur"
+
+#: ..\../commands/comandocarga.cpp:156
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+#: ..\../main/gui/history3/historypanel3.cpp:1063
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+msgid "Error loading study"
+msgstr "Erreur au chargement de l'étude."
+
+#: ..\../commands/comandoexportacion.cpp:81
+#: ..\../commands/exporttodicomdircommand.cpp:214
+msgid "Exporting files..."
+msgstr "Export des fichiers..."
+
+#: ..\../commands/comandoexportacion.cpp:105
+#: ..\../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr "L'export s'est fini avec succès"
+
+#: ..\../commands/comandoexportacion.cpp:158
+#, c-format
+msgid "Exporting file %d of %d"
+msgstr "Exportation du fichier %d sur %d"
+
+#: ..\../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr ""
+"Erreur à l'enregistrement du fichier, vérifiez les permissions du répertoire."
+
+#: ..\../commands/comandoexportacion.cpp:233
+msgid "image_%m-%d-%Y_"
+msgstr "image_%Y-%m-%d_"
+
+#: ..\../commands/comandoincluirhistorial.cpp:108
+msgid "Exploring directory ..."
+msgstr "Parcours du répertoire..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:122
+msgid "Reading DICOMDIR ..."
+msgstr "Lecture du DICOMDIR"
+
+#: ..\../commands/comandoincluirhistorial.cpp:142
+#: ..\../commands/comandoincluirhistorial.cpp:156
+#: ..\../commands/comandoincluirhistorial.cpp:177
+msgid "Including files in the history .."
+msgstr "Ajouter les fichiers dans l'historique .."
+
+#: ..\../commands/comandoincluirhistorial.cpp:196
+msgid "Exploring directory "
+msgstr "Explorer le répertoire"
+
+#: ..\../commands/comandoincluirhistorial.cpp:256
+#: ..\../commands/linkhistorycommand.cpp:118
+msgid "Image acquisition finished."
+msgstr "Acquisition de l'image terminée."
+
+#: ..\../commands/comandoincluirhistorial.cpp:258
+#, c-format
+msgid "There have been included %d images."
+msgstr "%d images ont été incluses."
+
+#: ..\../commands/comandoincluirhistorial.cpp:261
+#: ..\../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+"\n"
+"Il y a %d erreurs (Regardez les fichiers journaux pour plus une description "
+"plus détaillée)"
+
+#: ..\../commands/comandoincluirhistorial.cpp:273
+#: ..\../commands/linkhistorycommand.cpp:133
+msgid "This files doesn't exist:"
+msgstr "Ce fichier n'existe pas:"
+
+#: ..\../commands/comandoincluirhistorial.cpp:284
+#: ..\../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr "Ce fichier n'est pas au format DICOM"
+
+#: ..\../commands/comandoincluirhistorial.cpp:296
+#: ..\../commands/linkhistorycommand.cpp:156
+msgid "This files are Dicom Dirs:"
+msgstr "Ces fichiers ne sont pas des DICOM Dirs"
+
+#: ..\../commands/comandopacs.cpp:58 ..\../commands/pacsdownloadcommand.cpp:61
+#: ..\../commands/sendpacscommand.cpp:137
+msgid "There is not any Remote PACS configured"
+msgstr "Il n'y a pas de PACS distant de configuré"
+
+#: ..\../commands/comandopacs.cpp:84
+msgid "Querying PACS ..."
+msgstr "Requête du PACS ..."
+
+#: ..\../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr ""
+"Erreur d'accès à l'intégration du sous-système contrôleur : (GIL:: DICOM)."
+
+#: ..\../commands/comandopacs.cpp:98
+msgid "Starting Search ..."
+msgstr "Démarrage de le recherche..."
+
+#: ..\../commands/comandopacs.cpp:108
+#: ..\../commands/pacsdownloadcommand.cpp:101
+msgid "Server ID not found. ID = "
+msgstr "ID Serveur introuvable. ID ="
+
+#: ..\../commands/comandopacs.cpp:110 ..\../commands/comandopacs.cpp:112
+#: ..\../commands/comandopacs.cpp:114 ..\../commands/comandopacs.cpp:116
+msgid "Query error with PACS Id "
+msgstr "Erreur de la requête avec l'Id PACS"
+
+#: ..\../commands/comandopacs.cpp:116
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error"
+msgstr "Erreur interne"
+
+#: ..\../commands/comandopacs.cpp:135
+msgid "Failed to perform search: "
+msgstr "Échec à l'exécution de la recherche :"
+
+#: ..\../commands/dbmigrationcommand.cpp:94
+#: ..\../commands/dbmigrationcommand.cpp:103
+msgid "Migrating old DICOM Dir ..."
+msgstr "Migration des anciens DICOMDIR ..."
+
+#: ..\../commands/dbmigrationcommand.cpp:99
+#: ..\../commands/dbmigrationcommand.cpp:108
+msgid "Including files ..."
+msgstr "Ajout de fichiers ..."
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+"La migration est terminée avec succès, maintenant Ginkgo CADx détruira le "
+"répertoire :\n"
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+"et tous ses sous-répertoires\n"
+"Confirmez-vous la suppression ?"
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+#: ..\../commands/dicomizecommand.cpp:181
+#: ..\../commands/openremovableunit.cpp:74
+#: ..\../commands/openremovableunit.cpp:110
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../commands/pdfextractercommand.cpp:130
+#: ..\../main/controllers/historycontroller.cpp:447
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+#: ..\../main/controllers/historycontroller.cpp:1976
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ..\../main/gui/login/dialogologin.cpp:50
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ..\../main/gui/open/opendialogs.cpp:58
+#: ..\../main/gui/open/opendialogs.cpp:62
+#: ..\../main/gui/open/opendialogs.cpp:134
+#: ..\../main/gui/progress/statusbarprogreso.cpp:284
+#: ..\../main/gui/progress/statusbarprogreso.cpp:287
+#: ..\../main/gui/progress/statusbarprogreso.cpp:292
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Info"
+msgstr "Info"
+
+#: ..\../commands/dbmigrationcommand.cpp:123
+msgid "Migration finisthed successfully"
+msgstr "Migration terminée avec succès"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:27
+#: ..\../commands/dialogopathssobreescribirbase.cpp:62
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid "Overwrite"
+msgstr "Ecraser"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr "Voulez-vous les écraser ?"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:65
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ..\../main/gui/history3/historypanel3base.cpp:339
+#: ..\../main/gui/history3/historypanel3base.cpp:415
+#: ..\../main/gui/history3/historypanel3base.cpp:486
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ..\../main/gui/open/opendialogsbase.cpp:53
+#: ..\../main/gui/open/opendialogsbase.cpp:131
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ..\../widgets/gui/calibracionbase.cpp:86
+#: ..\../widgets/gui/selecciontextobase.cpp:60
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr "Annuler"
+
+#: ..\../commands/dicomizationcompletebase.cpp:24
+#: ..\../commands/dicomizationcompletebase.cpp:33
+#: ..\../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr "Dicomisation complete"
+
+#: ..\../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr "Dicomisation terminée avec succès"
+
+#: ..\../commands/dicomizationcompletebase.cpp:56
+msgid "Don't show this message again"
+msgstr "Ne plus revoir ce message"
+
+#: ..\../commands/dicomizationcompletebase.cpp:62
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ..\../main/gui/history3/historypanel3base.cpp:411
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ..\../widgets/gui/calibracionbase.cpp:82
+#: ..\../widgets/gui/selecciontextobase.cpp:56
+msgid "Accept"
+msgstr "Accepter"
+
+#: ..\../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr "Etape 1 sur 3: Import d'images"
+
+#: ..\../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr "Etape 2 sur 3 : Copie d'images"
+
+#: ..\../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr "Etape 3 sur 3 : Envoi d'images"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid "Import process failed:"
+msgstr "Echec de l'import :"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+"\n"
+"Voulez-vous réessayer ?"
+
+#: ..\../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr "Import..."
+
+#: ..\../commands/dicomizecommand.cpp:370
+msgid "Unknown error in dicomization process"
+msgstr "Erreur inconnu lors de la dicomisation"
+
+#: ..\../commands/dicomizecommand.cpp:431
+#: ..\../commands/dicomizecommand.cpp:442
+#: ..\../commands/sendpacscommand.cpp:185
+msgid "Error sending evidences:"
+msgstr "Erreur à l'envoi des preuves"
+
+#: ..\../commands/dicomizecommand.cpp:437
+#: ..\../commands/dicomizecommand.cpp:448
+msgid "Can not upload to the PACS:\n"
+msgstr "Ne peut pas envoyer au PACS:\n"
+
+#: ..\../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+"Ne peut pas envoyer au PACS:\n"
+"Erreur interne"
+
+#: ..\../commands/exporttodicomdircommand.cpp:261
+#: ..\../commands/exporttodicomdircommand.cpp:338
+#, c-format
+msgid "Exporting series %d of %d"
+msgstr "Export des séries %d sur %d"
+
+#: ..\../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr "Certaines des séries sélectionnées ont été détruites"
+
+#: ..\../commands/exporttodicomdircommand.cpp:279
+#: ..\../commands/exporttodicomdircommand.cpp:385
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+msgid "There was an error creating directory"
+msgstr "Il y a eu une erreur à la création du répertoire"
+
+#: ..\../commands/exporttodicomdircommand.cpp:303
+#: ..\../commands/exporttodicomdircommand.cpp:408
+msgid "There was an error writing file"
+msgstr "Il y a eu une erreur à l'écriture du fichier"
+
+#: ..\../commands/exporttodicomdircommand.cpp:358
+msgid "There was an error anonymizing files"
+msgstr "Il y a eu une erreur à l'anonymisation de fichier"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr "élément id patient absent de l'ensemble de données"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr "élément uid étude absent de l'ensemble de données"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr "élément uid instance de série absent de l'ensemble de données"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr "élément uid instance sop absent de l'ensemble de données"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Ignoring incoming operation "
+msgstr "Ignorer l'opération entrante"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:298
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr "Non implémenté"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:473
+#: ..\../commands/pacsdownloadcommand.cpp:170
+#: ..\../commands/pacsdownloadcommand.cpp:179
+msgid "Including files..."
+msgstr "Ajout de fichiers..."
+
+#: ..\../commands/linkhistorycommand.cpp:68
+msgid "Linking study..."
+msgstr "Lien des études..."
+
+#: ..\../commands/openremovableunit.cpp:42
+#: ..\../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr "Parcours des lecteurs..."
+
+#: ..\../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+"Pas de DICOMDIR trouvé sur les unités amovibles.\n"
+"Voulez-vous scanner un autre répertoire récursivement ?"
+
+#: ..\../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+"Pas de DICOMDIR trouvé sur les unités amovibles. Voulez-vous scanner "
+"récursivement le lecteur %s"
+
+#: ..\../commands/openremovableunit.cpp:130
+msgid "Select drive you want to open"
+msgstr "Sélectionner un lecteur à ouvrir"
+
+#: ..\../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+"Ginkgo CADx a détecté plus d'une unité amovible,\n"
+"mais aucune d'elles ne contient de DICOMDIR à sa racine\n"
+"Sélectionner un lecteur que vous voulez acquérir récursivement"
+
+#: ..\../commands/pacsdownloadcommand.cpp:134
+msgid "Error downloading study: "
+msgstr "Erreur de téléchargement de l'étude :"
+
+#: ..\../commands/pdfextractercommand.cpp:103
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr ""
+"Erreur d'extraction PDF. Ginkgo CADx est incapable de charger ce format"
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ..\../main/gui/progress/statusbarprogreso.cpp:278
+#: ..\../widgets/gui/calibracion.cpp:205 ..\../widgets/gui/calibracion.cpp:209
+#: ..\../widgets/gui/calibracion.cpp:219 ..\../widgets/gui/calibracion.cpp:225
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "Error"
+msgstr "Erreur"
+
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr "Il n'y a pas de lecteur PDF enregistré sur ce système"
+
+#: ..\../commands/pdfextractercommand.cpp:130
+msgid "PDF files extracted successfully..."
+msgstr "Fichiers PDF extraits avec succès..."
+
+#: ..\../commands/secondarycapturedicomizecommand.cpp:73
+msgid "Ginkgo CADx Secondary Capture"
+msgstr "Capture secondaire Ginkgo CADx"
+
+#: ..\../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr "Envoi de message HL7 %d sur %d"
+
+#: ..\../commands/sendhl7command.cpp:73
+msgid "Message successfully sent"
+msgstr "Message envoyé avec succès"
+
+#: ..\../commands/sendhl7command.cpp:77
+msgid "Unknown protocol"
+msgstr "Protocole inconnu"
+
+#: ..\../commands/sendhl7command.cpp:80 ..\../commands/sendhl7command.cpp:93
+#: ..\../commands/sendhl7command.cpp:145
+msgid "Error sending message:"
+msgstr "Erreur à l'envoi du message :"
+
+#: ..\../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr ""
+"Erreur à l'envoi de message HL7. Regardez les journaux pour plus de détails"
+
+#: ..\../commands/sendhl7command.cpp:93 ..\../commands/sendhl7command.cpp:94
+msgid "Unknown error"
+msgstr "Erreur inconnue"
+
+#: ..\../commands/sendhl7command.cpp:134
+msgid "Failed to start connection"
+msgstr "Echec d'ouverture de connexion"
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid "Error sending message. It was sent "
+msgstr "Erreur d'envoi de message. Il y a eu"
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr " octets sur un total de "
+
+#: ..\../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr ""
+"Erreur dans la logique de la confirmation. L'ID message n'est pas reconnnu"
+
+#: ..\../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr "NACK reçu :"
+
+#: ..\../commands/sendhl7command.cpp:258
+msgid "Failed delivery confirmation:"
+msgstr "Échec de la confirmation de livraison :"
+
+#: ..\../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr ""
+"Échec de la confirmation de livraison : : La livraison n'est pas reconnu par "
+"l'extrémité distante"
+
+#: ..\../commands/sendpacscommand.cpp:51
+msgid "Send files to PACS"
+msgstr "Envoi de fichier au PACS"
+
+#: ..\../commands/sendpacscommand.cpp:155
+msgid "Uploading files ..."
+msgstr "Envoi de fichiers ..."
+
+#: ..\../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr "Erreur : Configuration d'entrée PACS introuvable :"
+
+#: ..\../commands/sendpacscommand.cpp:181
+msgid "Error:"
+msgstr "Erreur :"
+
+#: ..\../commands/sendpacscommand.cpp:189
+msgid "Error sending evidences: Internal error."
+msgstr "Erreur d'envoi des preuves : Erreur interne."
+
+#: ..\../commands/sendpacscommand.cpp:203
+msgid "Error uploading the study to PACS: "
+msgstr "Erreur d'envoi des études au PACS :"
+
+#: ..\../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+"\n"
+"Voulez-vous réessayer (essai automatique dans %d secondes) ?"
+
+#: ..\../commands/sendpacscommand.cpp:206
+msgid "Retry send to PACS"
+msgstr "Réessai d'envoi au PACS"
+
+#: ..\../commands/synchronizationcommand.cpp:104
+msgid "Error downloading file"
+msgstr "Erreur de téléchargement de fichier"
+
+#: ..\../commands/synchronizationcommand.cpp:141
+msgid "Error synchronizing study: "
+msgstr "Erreur de synchronisation de l'étude :"
+
+#: ..\../commands/thumbnailscommand.cpp:107
+#: ..\../commands/thumbnailscommand.cpp:133
+#: ..\../commands/thumbnailscommand.cpp:247
+#: ..\../commands/thumbnailscommand.cpp:376
+#: ..\../commands/thumbnailscommand.cpp:382
+#: ..\../main/gui/import/selectimagesimportation.cpp:504
+msgid "Creating Thumbnail..."
+msgstr "Création de miniature..."
+
+#: ..\../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr "Génération de miniature..."
+
+#: ..\../export/tools/iaddfiletohistorytool.cpp:19
+#: ..\../main/gui/history3/historypanel3.cpp:632
+msgid "Open study"
+msgstr "Ouvrir l'étude"
+
+#: ..\../export/tools/iangletool.cpp:19
+msgid "Angle \tCtrl+A"
+msgstr "Angle \tCtrl+A"
+
+#: ..\../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr "Luminosité/Contraste \tCtrl+B"
+
+#: ..\../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr "Tourner la caméra"
+
+#: ..\../export/tools/icolormaptool.cpp:20
+msgid "Color Map"
+msgstr "Palette de couleur"
+
+#: ..\../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ..\../main/gui/open/opendialogsbase.cpp:46
+#: ..\../main/gui/open/opendialogsbase.cpp:198
+msgid "Copy"
+msgstr "Copie"
+
+#: ..\../export/tools/icornerannotationstool.cpp:20
+msgid "Window annotations"
+msgstr "Annocations de fenêtre"
+
+#: ..\../export/tools/idetachwindowtool.cpp:19
+msgid "Detach window"
+msgstr "Détacher la fenêtre"
+
+#: ..\../export/tools/iimageexporttool.cpp:19
+msgid "Export image..."
+msgstr "Export d'image..."
+
+#: ..\../export/tools/imarkertool.cpp:20
+msgid "Marking Tools \tCtrl+M"
+msgstr "Outils de marquage \tCtrl+M"
+
+#: ..\../export/tools/imetricgridtool.cpp:20
+msgid "Metric grid"
+msgstr "Grille de mesure"
+
+#: ..\../export/tools/inotetool.cpp:19
+msgid "Text Note \tCtrl+N"
+msgstr "Note Texte\tCtrl+N"
+
+#: ..\../export/tools/ipacsuploadtool.cpp:19
+msgid "Upload study..."
+msgstr "Envoyer l'étude..."
+
+#: ..\../export/tools/ipixelsbluringtool.cpp:20
+msgid "Pixels blurring"
+msgstr "Pixels flous"
+
+#: ..\../export/tools/ipointertool.cpp:19
+msgid "Pointer \tEsc"
+msgstr "Pointeur \tEsc"
+
+#: ..\../export/tools/iqueryretrievetool.cpp:19
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#: ..\../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr "Acquérir une étude DICOM d'un PACS"
+
+#: ..\../export/tools/iresettool.cpp:19
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+msgid "Reset"
+msgstr "Réinitialiser"
+
+#: ..\../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr "Rotation et flip"
+
+#: ..\../export/tools/iruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr "Règle \tCtrl+R"
+
+#: ..\../export/tools/isecondarycapturetool.cpp:19
+msgid "Save snapshot as new series..."
+msgstr "Sauvegarder l'instantané comme une nouvelle série..."
+
+#: ..\../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr "Voir l'historique \tAlt+h"
+
+#: ..\../export/tools/ishowtagstool.cpp:19
+#: ..\../main/tools/showtagshistorytool.cpp:27
+#, fuzzy
+msgid "DICOM inspector"
+msgstr "Inspecteur DICOM"
+
+#: ..\../export/tools/isimpleprinttool.cpp:19
+#: ..\../main/tools/simpleprinttool.cpp:226
+msgid "Print"
+msgstr "Imprimer"
+
+#: ..\../export/tools/istartdicomizationtool.cpp:19
+msgid "Dicomize..."
+msgstr "Dicomiser..."
+
+#: ..\../export/tools/itoolpan.cpp:19
+msgid "Pan \tCtrl+P"
+msgstr "Panoramique \tCtrl+P"
+
+#: ..\../export/tools/itoolslider.cpp:19
+msgid "Slider \tCtrl+S"
+msgstr "Curseur \tCtrl+S"
+
+#: ..\../export/tools/itoolwindowlevel.cpp:19
+msgid "Window/Level \tCtrl+W"
+msgstr "Fenêtre/Niveau \tCtrl+W"
+
+#: ..\../export/tools/itoolzoom.cpp:19
+msgid "Zoom \tCtrl+O"
+msgstr "Zoom \tCtrl+O"
+
+#: ..\../export/tools/itrackballtool.cpp:19
+msgid "Trackball \tCtrl+T"
+msgstr "Trackball \tCtrl+T"
+
+#: ..\../export/tools/iundotool.cpp:20 ..\../main/tools/undotool.cpp:109
+msgid "Undo"
+msgstr "Défaire"
+
+#: ..\../export/tools/ivideotool.cpp:19
+msgid "Video \tCtrl+Space"
+msgstr "Vidéo \tCtrl+Space"
+
+#: ..\../export/tools/iwindowlayouttool.cpp:20
+msgid "Window layout"
+msgstr "Mise en page des fenêtres"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid "Studies with"
+msgstr "Étude avec"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr " composants non supportés"
+
+#: ..\../main/controllers/controladorcarga.cpp:210
+msgid "Reading properties"
+msgstr "Lecture des propriétés"
+
+#: ..\../main/controllers/controladorcarga.cpp:219
+#: ..\../main/controllers/controladorcarga.cpp:642
+#: ..\../main/controllers/controladorcarga.cpp:888
+#: ..\../main/controllers/streaming/streamingloader.cpp:600
+msgid "Error reading the study: "
+msgstr "Erreur de lecture de l'étude :"
+
+#: ..\../main/controllers/controladorcarga.cpp:224
+#: ..\../main/controllers/controladorcarga.cpp:229
+#: ..\../main/controllers/controladorcarga.cpp:647
+#: ..\../main/controllers/controladorcarga.cpp:893
+msgid "Internal error reading the study: "
+msgstr "Erreur interne à la lecture de l'étude :"
+
+#: ..\../main/controllers/controladorcarga.cpp:269
+#: ..\../main/controllers/controladorcarga.cpp:281
+#: ..\../main/controllers/controladorcarga.cpp:905
+msgid "Spacing is not valid: ("
+msgstr "L'espacement n'est pas valide : ("
+
+#: ..\../main/controllers/controladorcarga.cpp:305
+#: ..\../main/controllers/controladorcarga.cpp:338
+#: ..\../main/controllers/controladorcarga.cpp:372
+#: ..\../main/controllers/controladorcarga.cpp:408
+#: ..\../main/controllers/controladorcarga.cpp:441
+#: ..\../main/controllers/controladorcarga.cpp:474
+#: ..\../main/controllers/controladorcarga.cpp:507
+#: ..\../main/controllers/controladorcarga.cpp:540
+#: ..\../main/controllers/controladorcarga.cpp:573
+#: ..\../main/controllers/controladorcarga.cpp:606
+#: ..\../main/controllers/controladorcarga.cpp:935
+msgid "Error loading the study: Out of memory"
+msgstr "Erreur à la lecture de l'étude : Mémoire saturée"
+
+#: ..\../main/controllers/controladorcarga.cpp:375
+msgid "Error loading the study: Internal Error"
+msgstr "Erreur à la lecture de l'étude : Mémoire interne"
+
+#: ..\../main/controllers/controladorcarga.cpp:630
+#: ..\../main/controllers/streaming/streamingloader.cpp:1023
+#: ..\../main/controllers/streaming/streamingloader.cpp:1223
+#: ..\../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr "Erreur à la lecture de l'étude : Format de pixel non supporté"
+
+#: ..\../main/controllers/controladorcarga.cpp:651
+#: ..\../main/controllers/controladorcarga.cpp:960
+msgid "Process canceled by user."
+msgstr "Processus annulé par l'utilisateur."
+
+#: ..\../main/controllers/controladorcarga.cpp:878
+msgid "Interpreting properties"
+msgstr "Interprétation des propriétés"
+
+#: ..\../main/controllers/controladorcarga.cpp:917
+msgid "Spacing of the image is invalid: ("
+msgstr "L'espacement de l'image est invalide : ("
+
+#: ..\../main/controllers/controladorcarga.cpp:942
+msgid "Reading dataset"
+msgstr "Lecture de l'ensemble de données"
+
+#: ..\../main/controllers/controladorcarga.cpp:951
+msgid "Error reading the study:"
+msgstr "Erreur de lecture de l'étude :"
+
+#: ..\../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr "Erreur interne pendant la lecture de l'étude :"
+
+#: ..\../main/controllers/controladorcarga.cpp:972
+msgid "load"
+msgstr "charger"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:40
+msgid "Stopping HL7 sender"
+msgstr "Arrêt de l'expéditeur HL7"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:63
+#: ..\../main/controllers/controladorenviohl7.cpp:76
+msgid "Error starting HL7 sender"
+msgstr "Erreur au démarrage de l'expéditeur HL7"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:65
+#: ..\../main/controllers/controladorenviohl7.cpp:78
+msgid "HL7 sender started"
+msgstr "Expéditeur HL7 démarré"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:108
+msgid "HL7 controller destroyed"
+msgstr "Contrôleur HL7 détruit"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:150
+msgid "Error processing message"
+msgstr "Erreur de traitement du message"
+
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/controllers/pacscontroller.cpp:1549
+#: ..\../main/controllers/pacscontroller.cpp:1553
+#: ..\../main/controllers/pacscontroller.cpp:1557
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:184
+msgid "Unknown"
+msgstr "Inconnu"
+
+#: ..\../main/controllers/controladorextensiones.cpp:110
+msgid "Loading"
+msgstr "Chargement"
+
+#: ..\../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr "Ne peut charger la bibliothèque d'extension"
+
+#: ..\../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr "Ne peut charger la bibliothèque. Vérifier les journaux"
+
+#: ..\../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr "Le descripteur d'extension ne correspond pas"
+
+#: ..\../main/controllers/controladorextensiones.cpp:153
+msgid "Could not find entry point"
+msgstr "Impossible de trouver le point d'entrée"
+
+#: ..\../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr "Saut de l'extension avec un SID dupliqué :"
+
+#: ..\../main/controllers/controladorhl7.cpp:74
+msgid "Integration engine hostname not set"
+msgstr "Le nom d'hôte du moteur d'intégration pas défini"
+
+#: ..\../main/controllers/controladorhl7.cpp:77
+msgid "Integration engine port not set"
+msgstr "Le port du moteur d'intégration n'est pas défini"
+
+#: ..\../main/controllers/controladorhl7.cpp:91
+msgid "Unsupported protocol"
+msgstr "Protocol non supporté"
+
+#: ..\../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr ""
+"Erreur de mise en file d'attente du message. Vérifiez votre fournisseur"
+
+#: ..\../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr "%d résultats ont été trouvés"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, c-format
+msgid "Downloading file %d/%d"
+msgstr "Téléchargement du fichier %d/%d"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr "Taille maximale de téléchargement d'étude dépassée"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr "Impossible de réserver de la mémoire pour la dicomisation PDF"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr "Impossible de réserver de la mémoire pour la dicomisation d'image"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+msgid "Image format not supported"
+msgstr "Format d'image non supporté"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr "Impossible de créer une couche de transport TLS"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr "La clef privée et le certificat ne correspondent pas"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr "Erreur de configuration de la couche TLS : "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:200
+msgid "Receiving Association failed: "
+msgstr "Echec de la réception d'association : "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:209
+msgid "Association received"
+msgstr "Association reçue"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:210
+msgid "Parameters:"
+msgstr "Paramètres : "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr "Association rejetée : Mauvais nom de contexte d'application : "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr "Association rejetée : Pas d'UID de classe d'implémentation fourni"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr "Association reconnue (PDV max d'envoi : "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ")"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:274
+msgid "No valid presentation contexts"
+msgstr "Pas de contexte de présentation valide"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "Association(dicom://"
+msgstr "Association (dicom://"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr "@"
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr "Ginkgo CADx est incapable de compresse de "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr " vers "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, c-format
+msgid "Uploading file %d of %d"
+msgstr "Envoi de fichier %d sur %d"
+
+#: ..\../main/controllers/dicommanager.cpp:504
+#: ..\../main/controllers/dicommanager.cpp:531
+msgid "Extracting file..."
+msgstr "Extraction de fichier..."
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid "Error creating history database "
+msgstr "Erreur à la création de la base d'historique"
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+"Vous n'avez pas la permission d'écrire dans le DICOMDIR, les préférences "
+"seront sauvegardées dans un répertoire temporaire"
+
+#: ..\../main/controllers/historycontroller.cpp:343
+msgid "Error creating dicomDir database "
+msgstr "Erreur de création de la base de données DICOMDIR"
+
+#: ..\../main/controllers/historycontroller.cpp:425
+#: ..\../main/controllers/historycontroller.cpp:441
+msgid "Error creating thumbnails database "
+msgstr "Erreur de création de la base de données de miniatures"
+
+#: ..\../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr "Erreur à la création de la base de données:\n"
+
+#: ..\../main/controllers/historycontroller.cpp:560
+msgid "Including image "
+msgstr "Ajout de l'image "
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr " de "
+
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid "Linking image "
+msgstr "Lien image"
+
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr "Erreur à la lecture de l'historique : \n"
+
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr "Échec de suppression du numéro de la base de données :\n"
+
+#: ..\../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr "Echec du nettoyage de l'historique :\n"
+
+#: ..\../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+"Ginkgo CADx a détecté une inactivité et se fermera dans %d secondes.\n"
+"Voulez-vous continuer ?"
+
+#: ..\../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr ""
+"Erreur fatale ! Vous ne pouvez pas enregistrer deux analyseurs avec la même "
+"clef"
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+msgid "Malformed template Id ("
+msgstr "Id template mal formé ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+"):\n"
+"N'est pas un identifiant HL7 valide (ie: code^description^namespaceId)"
+
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr "Id du template mal renseigné dans la configuration du module"
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid "Template Id unsupported ("
+msgstr "Id Template non supporté ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr ""
+"):\n"
+"Vérifiez la configuration et attachez-le si nécessaire"
+
+#: ..\../main/controllers/integrationcontroller.cpp:566
+msgid "Unknown module Id ("
+msgstr "Id module inconnu ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:592
+msgid "Empty configuration"
+msgstr "Configuration vide"
+
+#: ..\../main/controllers/integrationcontroller.cpp:631
+msgid "XML Parser Not Found. Key="
+msgstr "Analyseur XML non trouvé. Key="
+
+#: ..\../main/controllers/log4cplus/guiappender.cpp:75
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr "%Y/%m/%d %H:%M:%S.%q"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ..\../main/gui/history3/historypanel3base.cpp:48
+#: ..\../main/gui/import/pasosimportacionbase.cpp:227
+msgid "Patient"
+msgstr "Patient"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#, fuzzy
+msgid "Patient ID"
+msgstr "ID du patient"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:86
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ..\../main/gui/history3/historypanel3.cpp:227
+#: ..\../main/gui/open/opendialogs.cpp:50
+msgid "Modality"
+msgstr "Modalité"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:98
+#, fuzzy
+msgid "Dimensions"
+msgstr "Extensions"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:109
+#, fuzzy, c-format
+msgid "Made with %s"
+msgstr "%s (ou %s)"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:167
+#: ..\../main/controllers/modalitysettingscontroller.cpp:338
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr "Défaut"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr "Autocalcul"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr "SPINAL"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr "CRANE"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr "OS"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr "OS DU CRANE"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr "MEDIASTIN"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr "POUMON"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr "POITRINE"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr "VERTEBRE"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr "ANGIO"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr "CRANE CT"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr "CRANE T1"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr "CRANE T2"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr "GENOU"
+
+#: ..\../main/controllers/pacscontroller.cpp:1212
+msgid "Downloading file"
+msgstr "Téléchargement de fichier"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Error downloading WADO file"
+msgstr "Erreur au téléchargement du fichier WADO"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Check PACS configuration"
+msgstr "Vérifier la configuration PACS"
+
+#: ..\../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr "Niveau de requête / récupération inconnu"
+
+#: ..\../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr "Niveau de requête / récupération non spécifié"
+
+#: ..\../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr "Impossible d'exécuter la requête HTTP"
+
+#: ..\../main/controllers/pacscontroller.cpp:1428
+msgid "Invalid HTTP response"
+msgstr "Réponse HTTP invalide"
+
+#: ..\../main/controllers/pacscontroller.cpp:1433
+msgid "Invalid HTTP code"
+msgstr "code HTTP invalide"
+
+#: ..\../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr "Impossible d'initialiser le sous-système HTTP"
+
+#: ..\../main/controllers/pacscontroller.cpp:1472
+msgid "PACS-Service"
+msgstr "Service PACS"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:97
+#: ..\../main/controllers/parserxmlspanish.cpp:94
+msgid "Omitted Identificator"
+msgstr "Identifiant omis"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:105
+#: ..\../main/controllers/parserxmlspanish.cpp:102
+msgid "Omitted AET"
+msgstr "AET omis"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:113
+#: ..\../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr "Nom d'hôte manquant"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:121
+#: ..\../main/controllers/parserxmlspanish.cpp:118
+msgid "Omitted port"
+msgstr "Port omis"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:206
+#: ..\../main/controllers/parserxmlenglish.cpp:237
+#: ..\../main/controllers/parserxmlspanish.cpp:188
+#: ..\../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr "Le taille du pdu n'est pas un nombre valide"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:212
+#: ..\../main/controllers/parserxmlspanish.cpp:194
+msgid "Port is not a valid number"
+msgstr "Le port n'est pas un nombre valide"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:248
+#: ..\../main/controllers/parserxmlspanish.cpp:228
+msgid "The port is not a valid number"
+msgstr "Le port n'est pas un nombre valide"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:265
+#: ..\../main/controllers/parserxmlspanish.cpp:246
+msgid "Setting not found"
+msgstr "Configuration non trouvée"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr "Attribut \"action\" invalide dans le périmètre \"gnkworkflow\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr "Attribut \"action\" attendu dans le périmètre \"gnkworkflow\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr "Attribut \"pacs-retrieve-sid\" vide dans le périmètre \"gnkworkflow\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr "Attribut \"pacs-store-sid\" vide dans le périmètre \"gnkworkflow\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr "Attribut \"value\" attendu dans le périmètre \"query-retrieve-level\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:391
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr "Attribut \"code\" attendu dans le périmètre \"patient\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:427
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr "Attribut \"code\" attendu dans le périmètre \"médecin\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:434
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr "Attribut \"value\" attendu dans le périmètre \"patient\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:445
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr "Attribut \"iid\" attendu dans le périmètre \"institution\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr "Attribut \"code\" attendu dans le périmètre \"metadata\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:483
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr "Attribut \"key\" attendu dans le périmètre \"metadata\""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:548
+#: ..\../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr ""
+"Vous devez spécifier les attributs que vous voulez utiliser dans la requête"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:552
+#: ..\../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr "Une balise \"patient\" sans identifiant a été lue"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:570
+#: ..\../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr ""
+"Vous devez définir un PACS par défaut dans l'intégration XML ou le menu de "
+"configuration"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr "Attribut \"accion\" invalide dans le périmètre \"plantilla\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr "Attribut \"accion\" attendu dans le périmètre \"plantilla\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr "Attribut \"pacs_retrieve_sid\" vide dans le périmètre \"plantilla\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr "Attribut \"pacs_store_sid\" vide dans le périmètre \"plantilla\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:340
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr "Attribut \"uid\" attendu dans le périmètre \"dimse\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr "Attribut \"ambito\" invalide dans le périmètre \"dimse\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr "Attribut \"ambito\" attendu dans le périmètre \"dimse\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:402
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr "Attribut \"codigo\" attendu dans le périmètre \"paciente\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:438
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr "Attribut \"codigo\" attendu dans le périmètre \"medico\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:445
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr "Attribut \"valor\" attendu dans le périmètre \"medico\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr "Attribut \"cid\" attendu dans le périmètre \"centro\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr "Attribut \"aid\" attendu dans le périmètre \"hce\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:486
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr "Attribut \"codigo\" attendu dans le périmètre \"metadato\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr "Attribut \"clave\" attendu dans le périmètre \"metadato\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:524
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr "Attribut \"id_peticion\" attendu dans le périmètre \"gnkworkflow\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr "Attribut \"ambito\" attendu dans le périmètre \"plantilla\""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:559
+msgid "id_application expected"
+msgstr "id_application attendu"
+
+#: ..\../main/controllers/smartretrievecontroller.cpp:124
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:920
+msgid "Downloading from PACS..."
+msgstr "Téléchargement du PACS..."
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:303
+#: ..\../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+"Erreur à la lecture de l'étude : la valeur de la pixel la plus grande n'est "
+"pas cohérente avec la combinaison de Pixel Representation et High bit"
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr "Erreur interne pendant la lecture de l'étude, format inconnu "
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ..\../main/gui/history3/historytablemodel.cpp:403
+#: ..\../main/gui/history3/historytablemodel.cpp:415
+#: ..\../main/gui/history3/historytablemodel.cpp:470
+#: ..\../main/gui/history3/historytablemodel.cpp:482
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:102
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr "%d/%m/%Y %H:%M:%S"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr "%d/%m/%Y 00:00:00"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+msgid "Exploring PACS..."
+msgstr "Parcours du PACS..."
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ..\../main/gui/history3/historypanel3.cpp:225
+#: ..\../main/gui/open/opendialogs.cpp:49
+msgid "Patient id"
+msgstr "ID du patient"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ..\../main/gui/history3/historypanel3.cpp:224
+#: ..\../main/gui/open/opendialogs.cpp:48
+msgid "Patient name"
+msgstr "Nom du patient"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:479
+msgid "Study Instance UID"
+msgstr "UID de l'instance d'étude"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ..\../main/gui/history3/historypanel3.cpp:231
+#: ..\../main/gui/open/opendialogs.cpp:53
+msgid "Accession number"
+msgstr "Numéro d'accès"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:481
+msgid "Study date"
+msgstr "Date de l'étude"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:482
+#, fuzzy
+msgid "Study time"
+msgstr "Temps"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:490
+msgid "Series Instance UID"
+msgstr "UID de l'instance de la série"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:492
+msgid "Series date"
+msgstr "Date de la série"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:493
+#, fuzzy
+msgid "Series time"
+msgstr "Temps"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:519
+msgid "No results found"
+msgstr "Aucun résultat trouvé"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#, fuzzy
+msgid "Write query name"
+msgstr "Nom"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#, fuzzy
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr "Il y a des tâches en attente, voulez-vous les exécuter ?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+msgid "Id"
+msgstr "Id"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+msgid "Date Time"
+msgstr "Date Heure"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ..\../main/gui/history3/historypanel3.cpp:229
+#: ..\../main/gui/import/pasosimportacionbase.cpp:298
+#: ..\../main/gui/import/pasosimportacionbase.cpp:340
+#: ..\../main/gui/open/opendialogs.cpp:52
+msgid "Description"
+msgstr "Description"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ..\../main/gui/import/pasosimportacionbase.cpp:276
+msgid "Accession Number"
+msgstr "Numéro d'accès"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:210
+msgid "Store query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:211
+#, fuzzy
+msgid "Remove query"
+msgstr "Supprimer"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:278
+msgid "There is no any PACS configured"
+msgstr "Il n'y a aucun PACS configuré"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr "Acc#"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+msgid "Study UID"
+msgstr "UID d'étude"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+"La recherche sans paramètre peut prendre beaucoup de temps\n"
+"Voulez-vous continuer ?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid "Search"
+msgstr "Recherche"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:519
+msgid "Download series"
+msgstr "Télécharger série"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+msgid "Download study"
+msgstr "Télécharger étude"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:535
+msgid "Link series"
+msgstr "Séries liées"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:537
+msgid "Link study"
+msgstr "Etude liée"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:551
+msgid "Properties..."
+msgstr "Propriétés..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#, fuzzy
+msgid "You must specify at least a modality or a period of time"
+msgstr "Vous devez spécifier au moins l'uid d'étude ou le numéro d'accès"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#, fuzzy
+msgid "Select a valid query"
+msgstr "Sélectionner un serveur PACS valide"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+msgid "Select a valid PACS Server"
+msgstr "Sélectionner un serveur PACS valide"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid "Download of modality "
+msgstr "Télécharger les modalités"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr "non autorisé"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr "Vous n'êtes pas autorisé à télécharger ce genre de modalités."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "Modality download error"
+msgstr "Erreur au téléchargement des modalités"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:786
+msgid "search results"
+msgstr "Résultats de la recherche"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:913
+msgid "Downloading serie..."
+msgstr "Téléchargement d'une série..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:916
+msgid "Downloading study..."
+msgstr "Téléchargement d'une étude..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+msgid "PACS acquisition is restricted"
+msgstr "L'acquisition PACS est restreinte"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+msgid "Server"
+msgstr "Serveur"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ..\../main/gui/import/pasosimportacionbase.cpp:284
+#: ..\../main/gui/import/pasosimportacionbase.cpp:326
+#: ..\../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr "Date"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ..\../main/gui/history3/historypanel3base.cpp:81
+msgid "Any date"
+msgstr "Toute date"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ..\../main/gui/history3/historypanel3base.cpp:85
+msgid "Today AM"
+msgstr "Ce matin"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ..\../main/gui/history3/historypanel3base.cpp:88
+msgid "Today PM"
+msgstr "Cet après-midi"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ..\../main/gui/history3/historypanel3base.cpp:91
+msgid "Today"
+msgstr "Aujourd'hui"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ..\../main/gui/history3/historypanel3base.cpp:100
+msgid "Yesterday"
+msgstr "Hier"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ..\../main/gui/history3/historypanel3base.cpp:103
+msgid "Last 7 days"
+msgstr "Les 7 derniers jours"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ..\../main/gui/history3/historypanel3base.cpp:106
+msgid "Last 30 days"
+msgstr "Les 30 derniers jours"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ..\../main/gui/history3/historypanel3base.cpp:109
+msgid "Last 3 months"
+msgstr "Les 3 derniers mois"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ..\../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr "Entre :"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ..\../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr "Modalités"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+#, fuzzy
+msgid "Stored queries"
+msgstr "Le fichier n'a pu être enregistré"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+#, fuzzy
+msgid "Select stored queries..."
+msgstr "Sélectionnez le répertoire dans lequel les fichiers seront enregistrés"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ..\../main/gui/open/opendialogsbase.cpp:50
+#: ..\../main/gui/open/opendialogsbase.cpp:202
+msgid "Link"
+msgstr "Lien"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr "Disponible uniquement sur serveurs WADO"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+msgid "Download"
+msgstr "Téléchargement"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ..\../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr "Fermeture"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+msgid "Series does not exist"
+msgstr "La série n'existe pas"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr "Ces séries ont été détruites de l'historique local"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr "Continuer"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ..\../main/gui/open/opendialogsbase.cpp:127
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ..\../main/tools/metricgridtool.cpp:101
+msgid "Ok"
+msgstr "Ok"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:151
+msgid "Download again"
+msgstr "Télécharger encore"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+msgid "Open"
+msgstr "Ouvrir"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:179
+#, fuzzy
+msgid "Set query name"
+msgstr "Nom"
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:32
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+"Cette série a été déjà téléchargée dans l'historique local. Voulez-vous la "
+"retélécharger ?"
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:34
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+"Cette étude a été déjà téléchargée dans l'historique local. Voulez-vous la "
+"retélécharger ?"
+
+#: ..\../main/gui/anonymize/anonymizedialog.cpp:64
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ..\../main/gui/export/parametrosprincipales.cpp:194
+msgid "Exporting images ..."
+msgstr "Export d'images ..."
+
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:21
+msgid "Common tags"
+msgstr "Balises communes"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+msgid "Patient's name and surname"
+msgstr "Prénom et nom du patient"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+msgid "Patient Id"
+msgstr "Id Patient"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr "Etablissements"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr "Médecin référent"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr "Commentaires"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:44
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr "Balises Ginkgo CADx (Carte d'évaluation...)"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr "Balises (double-clic pour changer la valeur)"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:71
+#, fuzzy
+msgid "Add new..."
+msgstr "Vous ne pouvez pas ajouter de nouveau répertoire à cette section."
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ..\../main/tools/anonymizetool.cpp:26
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr "Anonymiser"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:136
+msgid "Create new"
+msgstr "Créer nouveau"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:136
+msgid "Add DICOM tag"
+msgstr "Ajouter une balise DICOM"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:199
+#, fuzzy
+msgid "Group"
+msgstr "l'entrée « %s » apparaît plus d'une fois dans le groupe « %s »"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:203
+#, fuzzy
+msgid "Element"
+msgstr "élément id patient absent de l'ensemble de données"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ..\../widgets/wangulo.cpp:1114
+msgid "Value"
+msgstr "Valeur"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+#, fuzzy
+msgid "Top right corner annotation"
+msgstr "Cacher les annotations des coins"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+#, fuzzy
+msgid "Top left corner annotation"
+msgstr "Cacher les annotations des coins"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+#, fuzzy
+msgid "Bottom left corner annotation"
+msgstr "Cacher les annotations des coins"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+#, fuzzy
+msgid "Bottom right corner annotation"
+msgstr "Cacher les annotations des coins"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+msgid "You must fill in all fields"
+msgstr "Vous devez remplir tous les champs"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+msgid "Window/level label in use"
+msgstr "Étiquette fenêtre / niveau utilisée"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr "Mettez un nombre valide dans les champs fenêtre et niveau."
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr "Etiquette"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+msgid "Window"
+msgstr "Fenêtre"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+msgid "Level"
+msgstr "Niveau"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr "Voisin le plus proche"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr "Linéaire"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr "Cubique"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+msgid "Do you confirm the removal of the preset?"
+msgstr "Confirmez-vous la suppression de la présélection ?"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Data modified"
+msgstr "Donnée modifiée"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+#, fuzzy
+msgid "Modality settings"
+msgstr " à la modalité "
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+#, fuzzy
+msgid "Default modality settings"
+msgstr " à la modalité "
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, c-format
+msgid "%s settings"
+msgstr "Configuration %s"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:60
+msgid "settings"
+msgstr "configuration"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Export Configuration"
+msgstr "Exporter la configuration"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Ini Files(*.ini)|*.ini"
+msgstr "Fichiers Ini(*.ini)|*.ini"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+"Le fichier existe\n"
+"Voulez-vous l'écraser ?"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+msgid "Existing file"
+msgstr "Fichier existant"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+msgid "Export successfully completed"
+msgstr "Export terminé avec succès"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+msgid "There was an error during exportation"
+msgstr "Il y a eu une erreur pendant l'export"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Import Configuration"
+msgstr "Configuration de l'import"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Ini files(*.ini)|*.ini"
+msgstr "Fichiers Ini (*.ini)|*.ini"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr ""
+"Import terminé avec succès, redémarrez Ginkgo CADx pour appliquer les "
+"changements"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+msgid "There was an error during importation, check permissions"
+msgstr "Il y a eu une erreur pendant l'export, vérifiez les permissions"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+msgid "Dicom tag"
+msgstr "Balise DICOM"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+msgid "Split horizontally..."
+msgstr "Diviser horizontalement..."
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+msgid "Split vertically..."
+msgstr "Diviser verticalement..."
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ..\../main/tools/windowlayouttool.cpp:273
+msgid "Split active horizontally"
+msgstr "Division horizontale active"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ..\../main/tools/windowlayouttool.cpp:274
+msgid "Split active vertically"
+msgstr "Division verticale active"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+msgid "New hanging protocol"
+msgstr "Nouveau protocole hanging"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, c-format
+msgid "Window %d"
+msgstr "Fenêtre %d"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr "Cette vue ne supporte pas les fenêtres multiples"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr "Actif"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "Yes"
+msgstr "Oui"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr "Non"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+msgid "Hanging protocols"
+msgstr "Protocole Hanging"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+msgid "One day"
+msgstr "Un jour"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+msgid "Two days"
+msgstr "Deux jours"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+msgid "Three days"
+msgstr "Trois jours"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr "Une semaine"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+msgid "Two weeks"
+msgstr "Deux semaines"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+msgid "One month"
+msgstr "Un mois"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+msgid "Three months"
+msgstr "Trois mois"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr "Une année"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+msgid "Local database"
+msgstr "Base de données locale"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+msgid "Local DICOM Dir setup"
+msgstr "Configuration du DICOMDIR local"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+"Le répertoire sélectionné n'existe pas\n"
+"Voulez-vous le créer ?"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+"Échec de création du répertoire. Assurez-vous que le chemin est correct et "
+"que vous avez les permissions sur le répertoire parent"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+"Il y a eu une erreur de lecture du répertoire. Assurez-vous d'avoir les "
+"droits d'écriture dessus"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+msgid "Select DICOMDIR"
+msgstr "Sélectionnez une DICOMDIR"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+"Attention, pour modifier le répertoire, vous devez fermer les séries "
+"actuellement ouvertes."
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr "Station de travail"
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr "Paramètres de configuration de la station locale"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr "Extensions"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+msgid "Extensions settings"
+msgstr "Configuration des extensions"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr ""
+"Ginkgo CADx doit redémarrer pour que les changements d'extensions prennent "
+"effet"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#, fuzzy
+msgid "Port has to be a valid number"
+msgstr "Le port n'est pas un nombre valide"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr "Géneral"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+msgid "General configuration parameters"
+msgstr "Paramètres de configuration générale"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr "Ginkgo CADx doit redémarrer pour que les changements prennent effet"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr "Dossier de santé électronique"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr "Configuration du système de dossier de santé électronique"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:134
+msgid "Testing conectivity with the server..."
+msgstr "Test de la connectivité avec le serveur..."
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:144
+msgid "Error connecting to url"
+msgstr "Erreur de connexion à l'URL"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#, fuzzy
+msgid "hostname/port not set"
+msgstr "Nom d'hôte / Port"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr "Échec du test de connexion"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr "succès du test de connexion"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "Select certificate"
+msgstr "Sélectionnez un certificat"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr "Fichiers PEM (*.pem;*.key)|*.pem;*.key|Tout fichier (*.*)|*.*"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr "Vous avez à définir les clefs privée et publique"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:255
+msgid "Change ..."
+msgstr "Changement ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+msgid "Import ..."
+msgstr "Import ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:279
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr ""
+"Si vous voulez utiliser SSL/TLS, vous devez définir un certificat et une "
+"clef privée valides"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:472
+msgid "There are this errors: "
+msgstr "Il y a des erreurs : "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+"\n"
+"- Cet Id PACS est utilisé"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"- Le port doit être un entier positif court (16 bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+"\n"
+"- Le port est trop grand"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+"\n"
+"- La taille maximum d'un AET est 16 caractères"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+"\n"
+"- La taille du PDU doit être supérieur ou égal à zéro (par défaut = 16384)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+"\n"
+"- La valeur maximale du PDU est "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+"\n"
+"- La valeur minimum du PDU est "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+"\n"
+"- Si vous voulez utiliser SSL/TLS, vous devez définir un certificat et une "
+"clef privée valides"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:525
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+"\n"
+"- Si vous voulez utiliser WADO, vous devez remplir l'URL WADO"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+"\n"
+"- L'URL WADO URL ne contient pas de schéma (i.e. http://)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+"\n"
+"- L'URL WADO ne contient pas d'hôte"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr "Vous devez remplir tous les champs pour continuer"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:558
+msgid "Testing the connection to the node ..."
+msgstr "Test de la connexion au nœud..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:561
+msgid "DICOM Error"
+msgstr "Erreur DICOM"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr "Impossible de se connecter : Ne peut démarrer le support réseau."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr "Le service n'a pas répondu correctement au C-ECHO"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:607
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr "Le service n'a pas répondu correctement au standard DICOM"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:616
+msgid "Invalid port number"
+msgstr "Numéro de port invalide"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:622
+msgid "WADO Error"
+msgstr "Erreur WADO"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:703
+msgid "Use by default"
+msgstr "Utilisé par défaut"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:795
+msgid "DICOM nodes"
+msgstr "Noeuds DICOM"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:800
+msgid "DICOM nodes settings"
+msgstr "Configuration des noeuds DICOM"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr "Ils ont produit les erreurs suivantes :"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"- Le port local doit être un entier positif court (16 bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+"\n"
+"- Le port local est trop grand"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+"\n"
+"- La longueur maximale de l'AET local est 16 caractères"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr "Confirmez la suppression du nœud"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Vous devez configurer un AET local qui est utilisé pour communiquer avec les "
+"noeuds DICOM. Le port spécifié doit être ouvert dans le pare-feu car il est "
+"essentiel pour les transferts."
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ..\../main/gui/export/pasosexportacionbase.cpp:20
+msgid "Profile"
+msgstr "Profil"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr "Valeur par défaut"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+msgid "Set property active"
+msgstr "Définir la propriété active"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr "Inactif"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Set property inactive"
+msgstr "Définir la propriété inactive"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+msgid "Set default value"
+msgstr "Définir la valeur par défaut"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+msgid "Set by user"
+msgstr "Définir par utilisateur"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+msgid "Profile name can't be repeated"
+msgstr "Le nom du profil ne peut être répété"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr "Vous devez remplir le champ nom pour continuer"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr "Profils"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+msgid "Profiles Settings"
+msgstr "Configuration des profils"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr ""
+"Ginkgo CADx doit redémarrer pour que les changements de permission prennent "
+"effet"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+msgid "Confirm the removal of the profile "
+msgstr "Confirmation de la suppression du profil"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+msgid "New User"
+msgstr "Nouvel utilisateur"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr "Le nom d'utilisateur doit contenir au moins 4 caractères"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+msgid "User name repeated"
+msgstr "Nom d'utilisateur répété"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr "Le mot de passe et sa confirmation ne peuvent être différents."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+msgid "Password has to contain at least 6 characters"
+msgstr "Le mot de passe doit contenir au moins 6 caractères"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+msgid "No login"
+msgstr "Pas de login"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+msgid "User/Password"
+msgstr "Utilisateur / Mot de passe"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+msgid "Password"
+msgstr "Mot de passe"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+msgid "Password is setted"
+msgstr "Le mot de passe est défini"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr "Changer le mot de passe"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+msgid "Password is not setted"
+msgstr "Le mot de passe n'est pas défini"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+msgid "Set password"
+msgstr "Définir le mot de passe"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+msgid "Security Setting"
+msgstr "Configuration de la sécurité"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr "Vous devez créer au moins un utilisateur"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr "Vous devez définir le mot de passe principal"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+msgid "User inserted successfully"
+msgstr "Utilisateur ajouté avec succès"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr ""
+"Il y a eu un problème d'ajout d'utilisateur. Voir les journaux pour plus "
+"d'informations."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+msgid "Password changed successfully"
+msgstr "Mot de passe changé avec succès"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr ""
+"Il y a eu un problème au changement de mot de passe. Voir les journaux pour "
+"plus d'informations."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+msgid "User deleted successfully"
+msgstr "Utilisateur supprimé avec succès"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr ""
+"Il y a eu un problème de suppression d'utilisateur. Voir les journaux pour "
+"plus d'informations."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr "Ginkgo CADx doit avoir au moins un utilisateur."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ..\../main/gui/login/dialogologin.cpp:27
+msgid "User"
+msgstr "Utilisateur"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ..\../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr "Choisir un répertoire"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr "Les titres d'emplacement ne peuvent être répétés"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+msgid "Maximum length of title is 8 characters"
+msgstr "La longueur maximale du titre est de 8 caractères"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr "Le répertoire sélectionné ne peut être ouvert"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr "Vous devez remplir les champs titre et emplacement pour continuer"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+msgid "Title"
+msgstr "Titre"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+msgid "Path"
+msgstr "Chemin"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr "Monitorer"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+msgid "Clean before"
+msgstr "Nettoyer avant"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+msgid "Clean after"
+msgstr "Nettoyer après"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr "Emplacements"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+msgid "Location Settings"
+msgstr "Configurations des emplacements"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr "Anonymisation"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:96
+msgid "Anonymization settings"
+msgstr "Configuration de l'anonymisation"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1370
+msgid "Settings"
+msgstr "Configuration"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+msgid "Export config..."
+msgstr "Exporter la configuration..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+msgid "Import config..."
+msgstr "Importer la configuration..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr "Appliquer"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+msgid "Physician's name"
+msgstr "Nom du médecin"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+msgid "Physician's Id"
+msgstr "Id du Médecin"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+msgid "Service"
+msgstr "Service"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+msgid "Service's name"
+msgstr "Nom du Service"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+msgid "Service's Id"
+msgstr "Id du Service"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+msgid "Local institution"
+msgstr "Établissement local"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+msgid "Institution's name"
+msgstr "Nom de l'établissement"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+msgid "Institution's Id"
+msgstr "Id de l'établissement"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+msgid "Dicomized files"
+msgstr "Fichiers dicomisés"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+msgid "Charset"
+msgstr "Encodage de caractère"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr "ISO_IR 192 - UTF8"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr "ISO_IR 6"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr "ISO_IR 100 - Latin 1"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr "ISO_IR 101 - Latin 2"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr "ISO_IR 109 - Latin 3"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr "ISO_IR 110 - Latin 4"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr "ISO_IR 126 - Grec"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr "ISO_IR 127 - Arabe"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr "ISO_IR 138 - Hébreux"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr "ISO_IR 144 - Cyrillique"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+msgid "ISO_IR 148"
+msgstr "ISO_IR 148 - Latin 5"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr "Langue"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+msgid "Automatically check for updates"
+msgstr "Automatiquement vérifier les mises à jour"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+msgid "Proxy settings"
+msgstr "Configuration proxy"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+msgid "Enable http proxy"
+msgstr "Activer le proxy HTTP"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+#, fuzzy
+msgid "Proxy Settings"
+msgstr "Configuration proxy"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+msgid "Server settings"
+msgstr "Configuration serveur"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+msgid "Host"
+msgstr "Hôte"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+msgid "Port"
+msgstr "Port"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr "Authentification"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr "Le serveur proxy requiert une authentification"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+#, fuzzy
+msgid "Username"
+msgstr "Le nom d'utilisateur ou le mot de passe est incorrect"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr "Exceptions"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+#, fuzzy
+msgid "No proxy for addresses containing"
+msgstr "Séparez les adresses par des virgules."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr "Séparez les adresses par des virgules."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+msgid "DICOM Dir"
+msgstr "DICOMDIR"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr ""
+"La DICOMDIR est dans le répertoire local où l'historique est enregistré"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr "..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+"Attention, pour mettre à jour le répertoire, vous devez fermer toutes les "
+"séries ouvertes"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+msgid "Auto-cleaning"
+msgstr "Auto-nettoyage"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr ""
+"Supprimer les études dont la date d'acquisition est plus ancienne que :"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+"Supprimer les anciennes études quand l'espace disque libre est inférieur à :"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+msgid "MB"
+msgstr "MB"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr "Supprimer les études quand le DICOMDIR est plus gros que :"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+"Cette fonctionnalité affecte seulement les études COPIEES dans le DICOMDIR "
+"et non celles en utilisation."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ..\../main/tools/toolwindowlevel.cpp:201
+msgid "Reset to default"
+msgstr "Remettre par défaut"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr "PACS local"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Vous devez configurer l'AET local qui est utilisé pour communiquer avec le "
+"serveur PACS. Le port spécifié doit être ouvert dans le pare-feu, c'est "
+"indispensable pour les transferts."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+msgid "Local AET"
+msgstr "AET local"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+"Pour la mise en œuvre à grande échelle dans un environnement homogène, vous "
+"devez spécifier les caractères génériques suivants dans l'AET local :\n"
+"\t%IP Adresse IP\n"
+"\t%IP<n> n-ème Octet (1~4)\n"
+"\t%HOSTNAME Nom d'hôte\""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr "Configuration avancée."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+msgid "DICOM Nodes"
+msgstr "Noeuds DICOM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+msgid "New ..."
+msgstr "Nouveau ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+msgid "Edit ..."
+msgstr "Editer ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete"
+msgstr "Supprimer"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+msgid "Set Default"
+msgstr "Définir par défaut"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+msgid "DICOM Node"
+msgstr "Noeud DICOM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr "AET"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+msgid "PDU (KB)"
+msgstr "PDU (KB)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+msgid "Retrieve method"
+msgstr "Méthode de récupération"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Move"
+msgstr "Bouger"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Get"
+msgstr "Mettre"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr "WADO"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+msgid "WADO URL"
+msgstr "URL WADO"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+msgid "Retrieve mode"
+msgstr "Mode de récupération"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ..\../main/gui/import/pasosimportacionbase.cpp:319
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1395
+msgid "Series"
+msgstr "Séries"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+msgid "Studies"
+msgstr "Etudes"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr "Réutilisation de la connexion"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr "Réutilisation de la connexion quand plusieurs requêtes sont requises"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+msgid "Worklists"
+msgstr "Listes de travail"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+msgid "Select how do you want to handle MPPS items"
+msgstr "Sélectionnez la façon dont vous voulez gérer les éléments MPPS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+msgid "DICOM MPPS"
+msgstr "MPPS DICOM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+msgid "HL7 messages"
+msgstr "Messages HL7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+msgid "HL7"
+msgstr "HL7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+msgid "Abort message"
+msgstr "Annuler message"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+msgid "Completed message"
+msgstr "Message complété"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+msgid "In progress message"
+msgstr "Message en cours"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+msgid "Default values"
+msgstr "Valeurs par défaut"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+msgid "Worklist"
+msgstr "Liste de travail"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+msgid "SSL/TLS"
+msgstr "SSL/TLS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+msgid "Verify server credentials"
+msgstr "Vérifier les accréditations du serveur"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+msgid "Use SSL/TLS"
+msgstr "Utiliser SSL/TLS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr "Certificat"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+msgid "Certificate to use in this connection"
+msgstr "Certificat à utiliser pour cette connexion"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr "Configuration avancée..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+msgid "Default charset"
+msgstr "Charset par défaut"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+msgid "Advanced"
+msgstr "Avancée"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr "Test de connexion"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr "Vérifier les accréditations du client"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+msgid "Local AET certificate"
+msgstr "Certificat de l'AET local"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+msgid "Certificate used by Ginkgo CADx"
+msgstr "Certificat utilisé par Ginkgo CADx"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr "L'ID application Gingo CADx est utilisée pour remplir le champ MSH.3"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+msgid "Receiver organization Id"
+msgstr "Id de l'organisation réceptrice"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr "L'identifiant unique de l'organisation qui reçoit le message."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+msgid "Petitioner System Id"
+msgstr "Id du système demandeur"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr "L'identifiant unique du système demandeur."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+msgid "Filler Application Id"
+msgstr "Id de l'application contenante"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr ""
+"L'identifiant unique de l'application de remplissage (SIID / Ginkgo CADx)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr "L'identifiant unique de l'application de remplissage (SIID / Ginkgo)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+msgid "Ginkgo CADx Application Id"
+msgstr "Id d'application Ginkgo CADx"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+"L'identifiant unique de l'application Picture Archiving and Communication "
+"System (SIID/PACS)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+msgid "Integration engine"
+msgstr "Moteur d'intégration"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+msgid "Hostname / Port"
+msgstr "Nom d'hôte / Port"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr "Nom d'hôte (IP ou DNS) du moteur d'intégration"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr "/"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+msgid "Protocol"
+msgstr "Protocole"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr "Le protocole de couche de transfert du moteur d'intégration"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr "MLLP"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ..\../main/gui/export/pasosexportacionbase.cpp:28
+msgid "Format"
+msgstr "Format"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+msgid "Message's format"
+msgstr "Format du message"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr "ER7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+msgid "Test engine"
+msgstr "Moteur de test"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+msgid "Test Integration Engine connectivity"
+msgstr "Test de connectivité du moteur d'intégration"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+msgid "Ginkgo Extension Title"
+msgstr "Titre d'extension Ginkgo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+msgid "Edit public key"
+msgstr "Éditer la clef publique"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr ""
+"Utiliser le certificat par défaut (certificat configuré dans la "
+"configuration local AET)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+msgid "Public key"
+msgstr "Clef publique"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+msgid "Public key in PEM format"
+msgstr "Clef publique au format PEM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+msgid "Load ..."
+msgstr "Chargement ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+msgid "Private key"
+msgstr "Clef privée"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+msgid "Private key in PEM format"
+msgstr "Clef privée au format PEM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+msgid "Profile name"
+msgstr "Nom du profile"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+msgid "Set active"
+msgstr "Activer"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr ""
+"Les emplacements sont des chemins prédéfinis pour définir les emplacements "
+"des chemins bien connus (ex : disque réseau)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+msgid "Configure location"
+msgstr "Configurer emplacement"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+msgid "Location"
+msgstr "Emplacement"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr "Nettoyer le répertoire après dicomisation"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr "Nettoyer le répertoire avant dicomisation"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+msgid "Security type"
+msgstr "Type de sécurité"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr "Utilisateurs"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+msgid "Change Password ..."
+msgstr "Changement du mot de passe ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+msgid "Set main password"
+msgstr "Définir mot de passe principal"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+msgid "Set Password"
+msgstr "Définir mot de passe"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+msgid "Edit User"
+msgstr "Editer un utilisateur"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+msgid "User Name"
+msgstr "Nom d'utilisateur"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+msgid "Confirm Password"
+msgstr "Confirmez mot de passe"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+msgid "Properties"
+msgstr "Propriétés"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+#, fuzzy
+msgid "Edit corner annotations"
+msgstr "Cacher les annotations des coins"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue}  where GGGG is the tag's group in hexadecimal and EEEE is the "
+"tag's element."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+msgid "Window/level"
+msgstr "Fenêtre/niveau"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr "Ajout"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ..\../main/gui/history3/historytoolmenu.cpp:149
+#: ..\../widgets/gui/selecciontextobase.h:58
+msgid "Edit"
+msgstr "Editer"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+msgid "Default Window/Level"
+msgstr "Fenêtre/Niveau par défaut"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+#, fuzzy
+msgid "Corner annotations"
+msgstr "Cacher les annotations des coins"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+#, fuzzy
+msgid "Setup corner annotations"
+msgstr "Cacher les annotations des coins"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+#, fuzzy
+msgid "Setup..."
+msgstr "Configurer..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+msgid "Other settings"
+msgstr "Autre configuration"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+msgid "Interpolate pixel data"
+msgstr "Interpoler des données des pixels"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+msgid "Hanging protocol"
+msgstr "Protocole Hanging"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+msgid "Opening mode"
+msgstr "Mode d'ouverture"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+msgid "Study opening criteria"
+msgstr "Critère d'ouverture d'étude"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr "+"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+msgid "Workspace"
+msgstr "Espace de travail"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+msgid "Enable/Disable"
+msgstr "Activer/désactiver"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+#, fuzzy
+msgid "Top left corner annotations"
+msgstr "Cacher les annotations des coins"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+msgid "Setup window"
+msgstr "Fenêtre de configuration"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr ""
+"Appuyez sur le bouton de configuration et placez la fenêtre où vous voulez"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+msgid "Set default"
+msgstr "Définir par défaut"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+msgid "Open in main window"
+msgstr "Ouvrir dans la fenêtre principale"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+msgid "Setup position..."
+msgstr "Configurer la position..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+msgid "Setup undocked window position"
+msgstr "Définir la position de la fenêtre détachée"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+msgid "Layout"
+msgstr "Calque"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+msgid "Current layout"
+msgstr "Calque courant"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr "Lignes"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+msgid "Columns"
+msgstr "Colonnes"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+msgid "Series criteria"
+msgstr "Critères de la série"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+msgid "Select opening mode"
+msgstr "Sélectionnez un mode d'ouverture"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+msgid "Tag"
+msgstr "Balise"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+"Définir la position et la taille de la fenêtre dans laquelle vous voulez "
+"ouvrir l'étude"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+msgid "Save"
+msgstr "Enregistrer"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+#, fuzzy
+msgid "Enable background queries"
+msgstr "Couleur d'arrière plan"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+#, fuzzy
+msgid "Smart retrieve"
+msgstr "Méthode de récupération"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+#, fuzzy
+msgid "Smart retrieve settings"
+msgstr "configuration"
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr "Inactivité détectée"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.h:64
+msgid "Export DICOM"
+msgstr "Exporter DICOM"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr "Médecin référent"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+msgid "Ginkgo CADx private tags"
+msgstr "Balises privées Ginkgo CADx"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ..\../main/gui/history3/historypanel3.cpp:340
+#: ..\../main/gui/history3/historytoolmenu.cpp:158
+msgid "Export"
+msgstr "Exporter"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ..\../main/gui/export/parametrosprincipales.cpp:157
+msgid "Select the directory where the files will be stored"
+msgstr "Sélectionnez le répertoire dans lequel les fichiers seront enregistrés"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+"Le répertoire sélectionné n'existe pas\n"
+"Voulez-vous le créer ?"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr "Il y a d'autres DICOMDIR dans le chemin sélectionné"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+"Ginkgo CADx a détecté une DICOMDIR par défaut créée avec une ancienne \n"
+"version de Ginkgo CADx (BBDD v.%d). Que voulez-vous faire ?"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+"La DICOMDIR a été créée avec une version trop récente de Ginkgo CADx (BBDD v."
+"%d).\n"
+"Cette version est incapable de l'ouvrir."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+"Erreur de renommage de l'ancienne DICOMDIR en <nom>_old, vérifiez que vous "
+"avez les permissions de faire ça"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+msgid "Select the DICOM Dir folder"
+msgstr "Sélectionnez un répertoire DICOMDIR"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+msgid "DICOM Dir migration"
+msgstr "Migration DICOMDIR"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+msgid "Migrate existing (recommended)"
+msgstr "Migrer l'existant (recommandé)"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+"Migrer le DICOMDIR existant. Les fichiers seront automatiquement ajouter au "
+"nouveau DICOMCIR. Ne pas fermer Ginkgo CADx avant que la migration ne soit "
+"terminée."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr "Supprimer les anciens DICOMDIR après la migration (renommage en *_old)"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+msgid "Continue..."
+msgstr "Continuer..."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+msgid "Select other"
+msgstr "Sélectionner un autre"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+"Selectionner un autre chemin. Si ce chemin ne contient pas de DICOMDIR "
+"Ginkgo CADx, un nouveau sera créé. Sinon, le DICOMDIR existant sera utilisé."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+msgid "Browse..."
+msgstr "Parcourir..."
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:106
+msgid "DICOM Export"
+msgstr "Export DICOM"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:110
+msgid "Select the format and the images you want to export"
+msgstr "Sélectionner le format et les images que vous voulez exporter"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:143
+#, fuzzy
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr "Fichiers PEM (*.pem;*.key)|*.pem;*.key|Tout fichier (*.*)|*.*"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:150
+#, fuzzy
+msgid "Select file"
+msgstr "Sélectionner un fichier"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "DICOM (native format)"
+msgstr "DICOM (format natif)"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+#, fuzzy
+msgid "Image (jpg, bmp, png)"
+msgstr "Impossible de sauvegarder l'image PNG."
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:38
+#, fuzzy
+msgid "Export all files of opened tab"
+msgstr "Exportation du fichier %d sur %d"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:55
+msgid "JPEG"
+msgstr "JPEG"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr "Qualité"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:40
+msgid "Image Export Wizard"
+msgstr "Assistant d'exportation d'image"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ..\../main/gui/license/aboutdialogbase.cpp:67
+#: ..\../main/gui/license/aboutdialogbase.cpp:151
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:54
+msgid "&Accept"
+msgstr "&Accepter"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr "&Suivant >"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+msgid "Open link"
+msgstr "Ouvrir lien"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+msgid "File link:"
+msgstr "Lien fichier :"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ..\../main/gui/import/pasosimportacionbase.cpp:270
+msgid "Study"
+msgstr "Etude"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+msgid "User name"
+msgstr "Nom utilisateur"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+msgid "Ginkgo Cloud link"
+msgstr "Lien Ginkgo Cloud"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+"Vous pouvez copier et coller le lien à utiliser dans les e-mails et les "
+"pages web. Vous avez à installer Ginkgo CADx pour le télécharger et le "
+"visualiser."
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr "Envoyer le lien par email"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+msgid "Copy to clipboard"
+msgstr "Copier dans le presse-papier"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "New Ginkgo Cloud study"
+msgstr "Nouvelle étude Ginkgo Cloud"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "To download the study, paste this url "
+msgstr "Pour télécharger l'étude, collez cet URL"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+"dans l'outil \"Ouvrir un lien Ginkgo Cloud\" de l'historique Ginkgo CADx, ou "
+"le coller dans la barre d'adresse de votre navigateur."
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+msgid "Creator"
+msgstr "Créateur"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+msgid "Last Modificator"
+msgstr "Dernier modificateur"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+msgid "Show link..."
+msgstr "Montrer les liens..."
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr "?"
+
+#: ..\../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+msgid "Invalid link"
+msgstr "Lien invalide"
+
+#: ..\../main/gui/history3/historypanel3.cpp:117
+#: ..\../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr "Ouvrir séries"
+
+#: ..\../main/gui/history3/historypanel3.cpp:119
+#: ..\../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr "Ouvrir séries avec..."
+
+#: ..\../main/gui/history3/historypanel3.cpp:226
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr "Age"
+
+#: ..\../main/gui/history3/historypanel3.cpp:228
+#, fuzzy
+msgid "Date acquired"
+msgstr "date"
+
+#: ..\../main/gui/history3/historypanel3.cpp:230
+#, fuzzy
+msgid "Date added"
+msgstr "date"
+
+#: ..\../main/gui/history3/historypanel3.cpp:308
+#: ..\../main/gui/history3/historytoolmenu.cpp:82
+#: ..\../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr "Acquérir"
+
+#: ..\../main/gui/history3/historypanel3.cpp:316
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize"
+msgstr "Dicomiser"
+
+#: ..\../main/gui/history3/historypanel3.cpp:363
+msgid "All patients"
+msgstr "Tous les patients"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+msgid "Results"
+msgstr "Résultats"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, c-format
+msgid " (%d images)"
+msgstr " (%d images)"
+
+#: ..\../main/gui/history3/historypanel3.cpp:634
+msgid "Open study with .."
+msgstr "Ouvrir l'étude avec..."
+
+#: ..\../main/gui/history3/historypanel3.cpp:663
+#: ..\../main/gui/history3/historypanel3base.cpp:482
+msgid "Synchronize"
+msgstr "Synchroniser"
+
+#: ..\../main/gui/history3/historypanel3.cpp:677
+msgid "&Delete from history"
+msgstr "&Détruire de l'historique"
+
+#: ..\../main/gui/history3/historypanel3.cpp:686
+msgid "&Clear history"
+msgstr "&Effacer l'historique"
+
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr ""
+"Vous avez atteint le nombre maximal d'onglet ouvert. Fermez quelques onglets "
+"et réessayez."
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid "Unable to open modality "
+msgstr "Impossible d'ouvrir la modalité"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr " avec la syntaxe de transfert"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+"Erreur au chargement de l'étude, vérifiez la configuration du protocole "
+"hanging"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr "Echec au vidage de l'historique, vous devez fermer les études ouvertes"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1086
+msgid "all files"
+msgstr "tout fichier"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+msgid "Select at least one series"
+msgstr "Sélectionnez au moins une série"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr "Vous ne pouvez supprimer les séries ouvertes"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "those series"
+msgstr "ces séries"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "this series"
+msgstr "cette série"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:57
+msgid "Advanced search"
+msgstr "Recherche avancée"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:73
+msgid "Acquisition date"
+msgstr "Date d'acquisition"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:302
+#: ..\../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr "Confirmer la suppression"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr "Etes-vous sûr de vouloir supprimer"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:336
+#: ..\../main/gui/history3/historytoolmenu.cpp:102
+#: ..\../main/gui/history3/historytoolmenu.cpp:200
+#: ..\../main/gui/history3/historytoolmenu.cpp:229
+msgid "Remove"
+msgstr "Suppression"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr ""
+"Choisissez la vue que vous voulez utiliser pour ouvrir ce(s) fichier(s)"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr "Toujours utiliser cette vue pour ouvrir ces fichiers"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:454
+#: ..\../main/gui/history3/historypanel3base.h:187
+msgid "Synchronize files"
+msgstr "Synchroniser les fichiers"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+"Il y a des fichiers à télécharger dans la base de données locale avant "
+"d'exécuter cette action, \n"
+"Voulez-vous synchroniser ces fichiers maintenant ?"
+
+#: ..\../main/gui/history3/historytablemodel.cpp:406
+#: ..\../main/gui/history3/historytablemodel.cpp:418
+#: ..\../main/gui/history3/historytablemodel.cpp:473
+#: ..\../main/gui/history3/historytablemodel.cpp:485
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:105
+msgid "00/00/0000 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:138
+msgid "Close history"
+msgstr "Fermer l'historique"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:139
+#: ..\../main/gui/startup/startupform.cpp:53
+msgid "History"
+msgstr "Historique"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:201
+#: ..\../main/gui/history3/historytoolmenu.cpp:230
+msgid "Clear history"
+msgstr "Effacer l'historique"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:232
+msgid "Select all"
+msgstr "Sélectionner tout"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:233
+msgid "Deselect all"
+msgstr "Déselectionner tout"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+msgid "Destination"
+msgstr "Destination"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+msgid "Status"
+msgstr "Statut"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+msgid "Error message"
+msgstr "Message d'erreur"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+msgid "Show Message"
+msgstr "Voir le message"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+msgid "Edit Message"
+msgstr "Editer le message"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+msgid "Delete message"
+msgstr "Détruire le message"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+msgid "Error editing message"
+msgstr "Erreur à l'édition du message"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+msgid "Error purguing messages"
+msgstr "Erreur de purge des messages"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Stop"
+msgstr "Arrêter"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Sent"
+msgstr "Envoyé"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr "En attente"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/progress/statusbarprogreso.cpp:281
+msgid "Warning"
+msgstr "Alerte"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+msgid "Error getting message"
+msgstr "Erreur de réception du message"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+msgid "Running"
+msgstr "En cours"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr "Le processus de soumission est démarré et prêt à envoyer"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr "Arrêté"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+msgid "Usually due to an error in sending a message"
+msgstr "Généralement due à une erreur dans l'envoi d'un message"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Start"
+msgstr "Démarré"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr "Voulez-vous détruire ces messages ?"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+msgid "Error deleting messages"
+msgstr "Erreur à la suppression des messages"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+msgid "Remove sent messages"
+msgstr "Supprimer les messages envoyés"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+msgid "Exit"
+msgstr "Quitter"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+msgid "Messages"
+msgstr "Messages"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+msgid "Refresh"
+msgstr "Rafraichir"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1394
+msgid "View"
+msgstr "Vue"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+msgid "Send task status:"
+msgstr "Statut de la tâche envoyée :"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr "Activer"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+msgid "Message"
+msgstr "Message"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr "Date :"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+msgid "Destination:"
+msgstr "Destination :"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+msgid "Status:"
+msgstr "Statut :"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+msgid "Message content:"
+msgstr "Contenu du message :"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:142
+msgid "OK"
+msgstr "OK"
+
+#: ..\../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr "Données d'aperçu des fichiers DICOM"
+
+#: ..\../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr "Les données DICOM des fichiers à générer peuvent être remplies"
+
+#: ..\../main/gui/import/generaldata.cpp:210
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+"\n"
+"* L'ID patient ID est requis."
+
+#: ..\../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+"\n"
+"* La concaténation du nom et du prénom du patient ne doivent pas dépasser 61 "
+"caractères."
+
+#: ..\../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+"\n"
+"* La taille en centimètre n'est pas correcte."
+
+#: ..\../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+"\n"
+"* La date de naissance du patient est ultérieur à celle de l'étude"
+
+#: ..\../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+"\n"
+"* Le poids est incorrect. La plage valide est entre 0 et 400 kg."
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr ""
+"Les erreurs suivantes ont été rencontrées lors de la validation des champs"
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "Error validating fields"
+msgstr "Erreur de validation des champs"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:148
+msgid "Selecting Import Profile"
+msgstr "Sélectionner le profil d'import"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:152
+msgid "You must select the profile you want to use import"
+msgstr "Vous devez sélectionner le profil voulu pour utiliser l'import"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+msgid "You must select the import profile"
+msgstr "Vous devez sélectionner le profil d'import"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr "Erreur inattendue, sélectionner le module encore"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:21
+msgid "Selected images"
+msgstr "Images sélectionnées"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:56
+msgid "Preview"
+msgstr "Aperçu"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:62
+msgid "Remove all"
+msgstr "Tout enlever"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:113
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:65
+msgid "Demographic data"
+msgstr "Données démographique"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr "Identifiant *"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr "(ID ou numéro d'historique médical)"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:159
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "Birth date"
+msgstr "Date de naissance"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr "Nom de famille"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr "Genre"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr "Mâle"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr "Femelle"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr "Autres"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:217
+msgid "Study Details"
+msgstr "Détails de l'étude"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:234
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:122
+msgid "Weight"
+msgstr "Poids"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:245
+msgid "Kg"
+msgstr "kg"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:252
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:119
+msgid "Height"
+msgstr "Taille"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr "cm"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:291
+#: ..\../main/gui/import/pasosimportacionbase.cpp:333
+msgid "Time"
+msgstr "Temps"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr "Le chemin de l'emplacement n'existe pas"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|Images JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg|Images BMP (*."
+"bmp)|*.bmp|Images PNG (*.png)|*.png|Images TIFF (*.tif;*.tiff)|*.tif;*.tiff|"
+"Documents PDF (*.pdf)|*.pdf|Tout fichier(*.*)|*.*"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|Images "
+"JPEG (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|Images BMP (*.bmp)|*.bmp;*BMP|"
+"Images PNG (*.png)|*.png;*PNG|Images TIFF (*.tif;*.tiff)|*.tif;*.tiff;*TIF;"
+"*TIFF|Documents PDF (*.pdf;*.PDF)|*.PDF;*.pdf|Tout fichier (*.*)|*.*"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files..."
+msgstr "Sélectionner des fichiers..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr "Sélectionner des fichiers du système de fichier"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste"
+msgstr "Coller"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste from clipboard"
+msgstr "Coller du blocnote"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr "Retour"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr "Etes-vous sûr de détruire ce fichier du disque ?"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:330
+msgid "Delete selected items"
+msgstr "Détruire les articles sélectionnés"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+msgid "You must select an image"
+msgstr "Vous devez sélectionner une image"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:346
+msgid "Generating preview..."
+msgstr "Génération d'un aperçu..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:500
+msgid "Select images"
+msgstr "Sélection d'images"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr "Création de miniatures..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:715
+msgid "Image selection"
+msgstr "Sélection d'image"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr "Vous devez sélection les images que vous voulez importer"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr "Vous devez sélectionner au moins une image"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:760
+msgid "The file"
+msgstr "Le fichier"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr "n'existe pas"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:52
+msgid "Image Import Wizard"
+msgstr "Assistant d'import d'image"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr "Le module demandé ne support pas l'import"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr "Il n'y a aucun module enregistré avec le support de l'import"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr "Il n'y a aucun module avec le support de l'import"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr "Le module demandé n'est pas enregistré"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr "Le module demandé n'est pas enregistré"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:167
+msgid "free of"
+msgstr "de libre sur"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:181
+msgid "in dicomization dir."
+msgstr "dans le répertoire de dicomisation."
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr "Êtes-vous sûr de vouloir annuler l'import ?"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, c-format
+msgid "Step %d of %d: "
+msgstr "Étape %d sur %d : "
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr "&Finir"
+
+#: ..\../main/gui/license/aboutdialog.cpp:25
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About"
+msgstr "A propos de"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:22
+msgid "Ginkgo CADx"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr "Crédits"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:55
+msgid "Licenses"
+msgstr "Licences"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:58
+#, fuzzy
+msgid "UPDATE_INFO"
+msgstr "Info"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:108
+#: ..\../main/gui/license/aboutdialogbase.h:88
+msgid "Open Source Licenses"
+msgstr "Licences Open Source"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr "Cairo"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr "DCMTK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:119
+msgid "FamFamFam Icons"
+msgstr "Icônes FamFamFam"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:120
+msgid "Fugue Icons"
+msgstr "Icônes Fugue"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr "ITK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr "LibJpeg"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr "LibPng"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr "OpenSSL"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr "VTK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:126
+msgid "WxWidgets"
+msgstr "WxWidgets"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:127
+msgid "Zlib"
+msgstr "Zlib"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr "SQLite"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr "CharLS"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:130
+msgid "Dark Glass Icons"
+msgstr "Icônes Dark Glass"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr "Libcurl"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr "JsonCpp"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ..\../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr "Accord de licence"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+"Si vous acceptez les termes de l'agrément, cliquez sur \"J'accepte la licence"
+"\" pour continuer. Vous devez accepter la licence pour commencer à utiliser "
+"Ginkgo CADx."
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:53
+msgid "Check for updates automatically"
+msgstr "Vérifier les mises à jour automatiquement"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:66
+msgid "I Accept the license"
+msgstr "J'accepte la licence"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr "Je n'accepte PAS la licence"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Save logs"
+msgstr "Enregistrer journaux"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr "Fichier journal (*.log) | *.log | Fichier texte (*.txt) | *.txt"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+msgid "File couldn't be stored "
+msgstr "Le fichier n'a pu être enregistré"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+msgid "Could not write to file"
+msgstr "Impossible d'écrire dans le fichier"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+msgid "Save log..."
+msgstr "Enregistrer journal..."
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+msgid "Clear log"
+msgstr "Effacer journal"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+msgid "Log"
+msgstr "Journal"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr "Effacer"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr ""
+
+#: ..\../main/gui/login/dialogologin.cpp:50
+msgid "The username or password is incorrect"
+msgstr "Le nom d'utilisateur ou le mot de passe est incorrect"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:250
+msgid "Tasks"
+msgstr "Tâches"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1139
+msgid "Included in the history ..."
+msgstr "Ajout dans l'historique..."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr ""
+"Il n'y a pas d'URL pour vérifier les mises à jour dans la configuration "
+"actuelle."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "Check update error"
+msgstr "Vérifier les erreurs de mise à jour"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr ""
+"Erreur d'analyse sémantique/syntaxique de l'URL d'intégration (voir les "
+"journaux pour les détails) :\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+msgid "Malformed XML"
+msgstr "XML mal formé"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1192
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr "Erreur dans l'interprétation des paramètres de la ligne de commande. ("
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr ""
+"Erreur d'analyse sémantique/syntaxique de l'XML d'intégration (voir les "
+"journaux pour les détails) :\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+msgid "Error parsing integration XML:\n"
+msgstr "Erreur d'analyse de l'XML d'intégration :\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+msgid "PACS error:\n"
+msgstr "Erreur du PACS :\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+msgid "Error executing WorkFlow\n"
+msgstr "Erreur à l'exécution du workflow\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+"Error executing WorkFlow\n"
+"Erreur interne"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+msgid "Close current view"
+msgstr "Fermer la vue actuelle"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all"
+msgstr "Tout fermer"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all views"
+msgstr "Fermer toutes les vues"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr "&Quitter"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "Exit application"
+msgstr "Quitter l'application"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr "Plein écran"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Show full screen"
+msgstr "Voir en plein écran"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1302
+msgid "Tab grouping"
+msgstr "Grouper les onglets"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1329
+msgid "Ginkgo CADx manual ..."
+msgstr "Manuel Ginkgo CADx ..."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1330
+msgid "Open test card"
+msgstr "Ouvrir une carte de test"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr "Vérifier les mises à jour"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for newest versions"
+msgstr "Vérifier les nouvelles versions"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1332
+msgid "Need support ..."
+msgstr "Besoin de support ..."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About "
+msgstr "A propos de"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+msgid "HL7 monitor"
+msgstr "Moniteur HL7"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+msgid "HL7 message control"
+msgstr "Contrôle des messages HL7"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+msgid "Log monitor"
+msgstr "Moniteur de journaux"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+msgid "Log monitored"
+msgstr "Journaux monitoré"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1390
+msgid "&File"
+msgstr "&Fichier"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr "&Edition"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr "&Aide"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr "Erreur au chargement de l'historique, Ginkgo CADx va être fermé"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr "Mosaïque"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr "Voulez-vous sauvegarder les changements dans l'étude :"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1664
+msgid "Unsaved data"
+msgstr "Données non sauvegardées"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr ""
+"Des erreurs ont été rencontrées à la sauvegarde de la série.\n"
+"Voulez-vous continuer la fermeture ? "
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid "Error saving"
+msgstr "Erreur d'enregistrement"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "Full Screen"
+msgstr "Plein écran"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "View Full Screen"
+msgstr "Voir en plein écran"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1708
+msgid "Tab Regroup"
+msgstr "Regrouper les onglets"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr "&Fermer"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "&Close all"
+msgstr "&Tout fermer"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "Close all windows"
+msgstr "Fermer toutes les fenêtres"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1728
+msgid "Tabbed organization"
+msgstr "Organisation des onglets"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr "Il n'y a pas de nouvelle version de Ginkgo CADx actuellement."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "Ginkgo CADx updated"
+msgstr "Ginkgo CADx mis à jour"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1782
+msgid "New version available ("
+msgstr "Nouvelle version disponible ("
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr "Erreur interne pendant le processus d'authentification"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+msgid "New Update"
+msgstr "Nouvelle mise à jour"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+msgid "New version available"
+msgstr "Nouvelle version disponible"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr "Ne plus m'avertir à propos de cette mise à jour"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+msgid "X"
+msgstr "X"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+msgid "Close this notification"
+msgstr "Fermer la notification"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+msgid "The following commands will be aborted if you close the application"
+msgstr ""
+"Les commandes suivantes seront abandonnées si vous fermez  l'application"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+msgid "Close Ginkgo CADx"
+msgstr "Fermer Ginkgo CADx"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr "Fermer l'application et abandonner les commandes en attente"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr "Ne pas fermer l'application et laisser les commandes tourner"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:138
+msgid "User login"
+msgstr "Identifiant utilisateur"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+msgid "System authentication"
+msgstr "Authentification système"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+msgid "Login"
+msgstr "Identifiant"
+
+#: ..\../main/gui/open/abrir.cpp:80 ..\../main/gui/open/abrir.cpp:82
+msgid "Open..."
+msgstr "Ouvrir..."
+
+#: ..\../main/gui/open/opendialogs.cpp:58
+#, fuzzy
+msgid "There was an error reading DICOMDIR file"
+msgstr "Lecture du DICOMDIR"
+
+#: ..\../main/gui/open/opendialogs.cpp:62
+msgid "Select a valid DICOMDIR file"
+msgstr "Sélectionnez un fichier DICOMDIR valide"
+
+#: ..\../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr "Sélectionner le fichier DICOMDIR que vous voulez acquérir"
+
+#: ..\../main/gui/open/opendialogs.cpp:180
+#: ..\../main/gui/open/opendialogsbase.cpp:170
+#: ..\../main/gui/open/opendialogsbase.h:112
+msgid "Copy or link"
+msgstr "Copier ou lier"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:22
+#: ..\../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr "Acquérir DICOMDIR"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:94
+#: ..\../main/gui/open/opendialogsbase.h:85
+msgid "Select drive"
+msgstr "Choisir un lecteur"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:175
+msgid "Do you want to copy or link files?"
+msgstr "Voulez-vous copier ou lier les fichiers ?"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ..\../main/gui/selectpacsserver/selectpacsserver.cpp:30
+msgid "There aren't any PACS configured"
+msgstr "Il n'y a pas de PACS configuré"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:69
+msgid "0000/00/00 00:00:00"
+msgstr "0000/00/00 00:00:00"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.h:57
+msgid "Upload study"
+msgstr "Envoyer étude"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+msgid "Select PACS server"
+msgstr "Choisir un serveur PACS"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:119
+msgid "Metadata"
+msgstr "Metadata"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:120
+msgid "Identification information"
+msgstr "Information d'identification"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:121
+msgid "Patient information"
+msgstr "Information patient"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:122
+msgid "Acquisition information"
+msgstr "Information d'acquisition"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:123
+msgid "Relationship information"
+msgstr "Information de relation"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:124
+msgid "Image presentation information"
+msgstr "Information de présentation d'image"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:125 ..\../widgets/wtextbox.cpp:525
+msgid "Text"
+msgstr "Texte"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:126
+msgid "Other"
+msgstr "Autre"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:137
+#: ..\../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr "Donnée"
+
+#: ..\../main/gui/previewpanel/previewpanel.cpp:47
+msgid "Hide"
+msgstr "Cacher"
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:207
+msgid "Previews"
+msgstr "Aperçu"
+
+#: ..\../main/gui/progress/progresobase.cpp:23
+msgid "There is no running tasks"
+msgstr "Il n'y a pas de tâche en cours"
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:165
+msgid "0 running tasks."
+msgstr "0 tâche en cours."
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:192
+#, c-format
+msgid "There are %d pending tasks"
+msgstr "Il y a %d tâche en attente"
+
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.h:55
+msgid "Select PACS"
+msgstr "Sélectionner PACS"
+
+#: ..\../main/gui/startup/startupformbase.cpp:29
+msgid "http://ginkgo-cadx.com"
+msgstr "http://ginkgo-cadx.com"
+
+#: ..\../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:47
+#, fuzzy
+msgid "Ginkgo CADx Pro"
+msgstr "doc\\manual_ginkgo_cadx_pro_en.pdf"
+
+#: ..\../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr "Propulsé par"
+
+#: ..\../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr "MetaEmotion Healthcare"
+
+#: ..\../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr "Page de démarrage"
+
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete Widget"
+msgstr "Détruire widget"
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Properties ..."
+msgstr "Propriétés ..."
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Widget Properties"
+msgstr "Propriétés du widget"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:114
+msgid "Open file"
+msgstr "Ouvrir fichier"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:115
+#: ..\../main/tools/openfoldertool.cpp:27
+msgid "Open folder"
+msgstr "Ouvrir répertoire"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:116
+#: ..\../main/tools/openremovabletool.cpp:28
+msgid "Open removable unit"
+msgstr "Ouvrir un support amovible"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:117
+#: ..\../main/tools/openginkgocloudlinktool.cpp:27
+msgid "Open Ginkgo Cloud link"
+msgstr "Ouvrir un lien Ginkgo Cloud"
+
+#: ..\../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr "Angle normal (3 points)"
+
+#: ..\../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr "Angle Cobb (2 lignes droites)"
+
+#: ..\../main/tools/colormaptool.cpp:110
+msgid "Invert color map"
+msgstr "Inverser les couleurs"
+
+#: ..\../main/tools/cornerannotationstool.cpp:44
+msgid "Hide corner annotations"
+msgstr "Cacher les annotations des coins"
+
+#: ..\../main/tools/cornerannotationstool.cpp:46
+msgid "Show corner annotations"
+msgstr "Afficher les annotations dans les coins"
+
+#: ..\../main/tools/detachwindowtool.cpp:42
+msgid "Attach View"
+msgstr "Attacher la vue"
+
+#: ..\../main/tools/detachwindowtool.cpp:44
+msgid "Detach view"
+msgstr "Détacher la vue"
+
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize files"
+msgstr "Dicomiser des fichiers"
+
+#: ..\../main/tools/exportdicomdirtool.cpp:32
+msgid "Export to DICOM Dir"
+msgstr "Exporter vers la DICOM Dir"
+
+#: ..\../main/tools/markertool.cpp:171
+msgid "Point"
+msgstr "Point"
+
+#: ..\../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr "Flèche"
+
+#: ..\../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr "Ellipse"
+
+#: ..\../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr "Trapèze"
+
+#: ..\../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr "Polygone"
+
+#: ..\../main/tools/markertool.cpp:176
+#, fuzzy
+msgid "Free form"
+msgstr "de libre sur"
+
+#: ..\../main/tools/metricgridtool.cpp:57
+msgid "Grid"
+msgstr "Grille"
+
+#: ..\../main/tools/metricgridtool.cpp:67
+msgid "Grid Scale"
+msgstr "Grille de mesure"
+
+#: ..\../main/tools/metricgridtool.cpp:74
+msgid "Scale X"
+msgstr "Echelle X"
+
+#: ..\../main/tools/metricgridtool.cpp:78
+msgid "X axis scale"
+msgstr "Échelle de l'axe X"
+
+#: ..\../main/tools/metricgridtool.cpp:87
+msgid "Scale Y"
+msgstr "Echelle Y"
+
+#: ..\../main/tools/metricgridtool.cpp:91
+msgid "Y axis scale"
+msgstr "Échelle de l'axe Y"
+
+#: ..\../main/tools/metricgridtool.cpp:206
+msgid "Show grid"
+msgstr "Afficher la grille"
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr "Configurer la grille ..."
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr "Configurer la grille"
+
+#: ..\../main/tools/metricgridtool.cpp:250
+msgid "Hide Grid"
+msgstr "Cacher la grille"
+
+#: ..\../main/tools/metricgridtool.cpp:252
+msgid "Show Grid"
+msgstr "Afficher la grille"
+
+#: ..\../main/tools/openfiletool.cpp:28
+msgid "Open File"
+msgstr "Ouvrir fichier"
+
+#: ..\../main/tools/pacsuploadtool.cpp:54
+msgid "Send to PACS..."
+msgstr "Envoyer au PACS..."
+
+#: ..\../main/tools/pixelsbluringtool.cpp:59
+msgid "Unset pixels blurring"
+msgstr "Désactiver pixels flous"
+
+#: ..\../main/tools/pixelsbluringtool.cpp:61
+msgid "Set pixels blurring"
+msgstr "Activer pixels flous"
+
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+msgid "PACS Q/R"
+msgstr "I/O PACS"
+
+#: ..\../main/tools/queryretrievetool.cpp:94
+#: ..\../main/tools/searchginkgocloudhistorytool.cpp:28
+msgid "Search Ginkgo Cloud"
+msgstr "Rechercher dans Ginkgo Cloud"
+
+#: ..\../main/tools/rotateandfliptool.cpp:151
+msgid "Undo rotate and flip"
+msgstr "Annuler rotation/flip"
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr "Rotation 90"
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr "sens antihoraire"
+
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr "sens horaire"
+
+#: ..\../main/tools/rotateandfliptool.cpp:156
+msgid "Flip horizontal"
+msgstr "Flip horizontal"
+
+#: ..\../main/tools/rotateandfliptool.cpp:157
+msgid "Flip vertical"
+msgstr "Flip vertical"
+
+#: ..\../main/tools/sendpacstool.cpp:34
+msgid "Send to PACS"
+msgstr "Envoi au PACS"
+
+#: ..\../main/tools/sendpacstool.cpp:70
+msgid "Sending to PACS..."
+msgstr "Envoi au PACS..."
+
+#: ..\../main/tools/showtagstool.cpp:42
+msgid "Hide DICOM inspector"
+msgstr "Cacher l'inspecteur DICOM"
+
+#: ..\../main/tools/showtagstool.cpp:44
+msgid "Show DICOM inspector"
+msgstr "Afficher l'inspecteur DICOM"
+
+#: ..\../main/tools/simpleprinttool.cpp:119
+#, fuzzy
+msgid "Image printing"
+msgstr "Impression en cours"
+
+#: ..\../main/tools/simpleprinttool.cpp:224
+#, fuzzy
+msgid "Page setup"
+msgstr "Mise en page"
+
+#: ..\../main/tools/simpleprinttool.cpp:225
+#, fuzzy
+msgid "Print preview"
+msgstr "Aperçu avant impression"
+
+#: ..\../main/tools/simpleprinttool.cpp:272
+#, fuzzy
+msgid "Print image"
+msgstr "&Imprimer"
+
+#: ..\../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr "Autocalculer"
+
+#: ..\../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr "Réinitialiser la taille de la résolution d'affichage"
+
+#: ..\../main/tools/undotool.cpp:110
+msgid "Redo"
+msgstr "Refaire"
+
+#: ..\../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr "Désactiver boucle"
+
+#: ..\../main/tools/videotool.cpp:153
+msgid "Enable loop"
+msgstr "Activer boucle"
+
+#: ..\../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr "%.1f fps"
+
+#: ..\../main/tools/windowlayouttool.cpp:267
+msgid "Add column"
+msgstr "Ajouter une colonne"
+
+#: ..\../main/tools/windowlayouttool.cpp:268
+msgid "Add row"
+msgstr "Ajouter une ligne"
+
+#: ..\../main/tools/windowlayouttool.cpp:270
+msgid "Remove column"
+msgstr "Supprimer une colonne"
+
+#: ..\../main/tools/windowlayouttool.cpp:271
+msgid "Remove row"
+msgstr "Supprimer une ligne"
+
+#: ..\../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr "Mise en page 1x1"
+
+#: ..\../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr "Mise en page 1x2"
+
+#: ..\../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr "Mise en page 2x1"
+
+#: ..\../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr "Mise en page 2x2"
+
+#: ..\../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr "Mise en page 3x3"
+
+#: ..\../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr "Mise en page 4x4"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr "Outil de module toujours enregistré quand ToolsRegistry est défini"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:82
+msgid "The tool is already registered"
+msgstr "L'outil est déjà enregistré"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:187
+msgid "The module "
+msgstr "Le module"
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:49
+msgid "Unable to load PNG bitmap resource"
+msgstr "Impossible de charger la ressource bitmap PNG"
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:56
+msgid "Unable to load PNG image resource"
+msgstr "Impossible de charger la ressource image PNG"
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:63
+msgid "Unable to load GIF animation resource"
+msgstr "Impossible de charger l'animation GIF"
+
+#: ..\../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr "La valeur de calibrage doit être un nombre décimal"
+
+#: ..\../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr "La valeur de calibrage est trop basse"
+
+#: ..\../widgets/gui/calibracion.cpp:219
+msgid "Enter the calibration value"
+msgstr "Entrez la valeur de calibrage"
+
+#: ..\../widgets/gui/calibracion.cpp:225
+msgid "The calibration value is too low"
+msgstr "La valeur du calibrage est trop faible"
+
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "The calibration value is too high"
+msgstr "La valeur du calibrage est trop haute"
+
+#: ..\../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr "Calibrage..."
+
+#: ..\../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr "Mesure réelle"
+
+#: ..\../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr "Distance"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr "Microns"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr "Millimètres"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr "Centimètres"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr "Mètres"
+
+#: ..\../widgets/gui/selecciontextobase.cpp:26
+msgid "Note"
+msgstr "Note"
+
+#: ..\../widgets/wangulo.cpp:1101 ..\../widgets/wangulo.cpp:1103
+msgid "Type"
+msgstr "Type"
+
+#: ..\../widgets/wangulo.cpp:1101
+msgid "Normal"
+msgstr "Normal"
+
+#: ..\../widgets/wangulo.cpp:1103
+msgid "Cobb"
+msgstr "Cobb"
+
+#: ..\../widgets/welipse.cpp:721 ..\../widgets/wfreeform.cpp:470
+#: ..\../widgets/wpolygon.cpp:574
+msgid "Center (I)"
+msgstr "Centre (I)"
+
+#: ..\../widgets/welipse.cpp:727 ..\../widgets/wfreeform.cpp:476
+#: ..\../widgets/wpolygon.cpp:580
+msgid "Center (M)"
+msgstr "Centre (M)"
+
+#: ..\../widgets/welipse.cpp:762 ..\../widgets/welipse.cpp:766
+msgid "Greater Radius"
+msgstr "Grand rayon"
+
+#: ..\../widgets/welipse.cpp:763 ..\../widgets/welipse.cpp:767
+msgid "Lower Radius"
+msgstr "Petit rayon"
+
+#: ..\../widgets/wfreeform.cpp:482 ..\../widgets/wpolygon.cpp:586
+msgid "Number of Vertex"
+msgstr "Nombre de Vertex"
+
+#: ..\../widgets/wpunto.cpp:353
+msgid "Position (I)"
+msgstr "Position (I)"
+
+#: ..\../widgets/wpunto.cpp:358
+msgid "Position (M)"
+msgstr "Position (M)"
+
+#: ..\../widgets/wrule.cpp:558
+msgid "Image Calibration"
+msgstr "Calibrage Image"
+
+#: ..\../widgets/wrule.cpp:663
+msgid "Length"
+msgstr "Longueur"
+
+#: ..\../widgets/wrule.cpp:668
+msgid "Points (I)"
+msgstr "Points (I)"
+
+#: ..\../widgets/wrule.cpp:675
+msgid "Points (M)"
+msgstr "Points (M)"
+
+#: ..\../widgets/wtextbox.cpp:445
+msgid "Default text"
+msgstr "Texte par défaut"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:41
+msgid "Commit date"
+msgstr "Date d'engagement"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr "INCONNU"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr "<ID inconnu>"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr "%d/%m/%Y"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:214
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr "Engagé"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:219
+msgid "Modified"
+msgstr "Modifié"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr "Non engagé"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr "644654645"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:130
+#, fuzzy
+msgid "Commit inform"
+msgstr "Date d'engagement"
+
+#: ..\../wx/propiedades/wxpropiedades.cpp:30
+msgid "Properties of "
+msgstr "Propriétés de"
+
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:31
+msgid "Widget's Name"
+msgstr "Nom du widget"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr "< &Précédent"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr "&Annuler"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3701
+msgid "Regular expression invalid: '"
+msgstr "Expression régulière invalide : '"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr "REGEXP appelée avec un mauvais nombre d'arguments : %d au lieu de 2."
+
+#: ..\../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+"Erreur logique : l'étude n'est pas associée avec un patient existant dans le "
+"modèle"
+
+#: ..\../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+"Erreur logique : la série n'est pas associée avec un patient existant dans "
+"le modèle"
+
+#: ..\../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+"Erreur logique : l'image n'est pas associée avec un patient existant dans le "
+"modèle"
+
+#: ..\../commands/dialogopathssobreescribirbase.h:56
+msgid "Overwrite Paths"
+msgstr "Écraser chemins"
+
+#: ..\../ginkgopro/ginkgo_pro_defines.h:21
+msgid "Professional DICOM CADx environment"
+msgstr "Environnement DICOM CADx Professionnel"
+
+#: ..\../main/controllers/dcmtk/dicomservers.h:39
+msgid "Server not found"
+msgstr "Serveur non trouvé"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:99
+msgid "DICOM Query/Retrieve"
+msgstr "Requête/Récupération DICOM"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:123
+msgid "Not found"
+msgstr "Non trouvé"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+msgid "Advanced Settings"
+msgstr "Configuration avancée"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+msgid "Edit profile"
+msgstr "Editer le profil"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+msgid "Add/Edit Location"
+msgstr "Ajout/Modification d'emplacement"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+msgid "Add window/level"
+msgstr "Ajout d'une fenêtre/d'un niveau"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+msgid "Add tag"
+msgstr "Ajout d'un tag"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+msgid "Setup window position"
+msgstr "Définir position de la fenêtre"
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.h:61
+msgid "Closing"
+msgstr "Fermeture"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+msgid "DICOM Dir configuration"
+msgstr "Configuration DICOM Dir"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:70
+msgid "Open Ginkgo Cloud"
+msgstr "Ouvrir Ginkgo Cloud"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:123
+msgid "Ginkgo Cloud search"
+msgstr "Recherche Ginkgo Cloud"
+
+#: ..\../main/gui/history3/confirmdeletedialog.h:24
+msgid " from History?"
+msgstr " de l'historique ?"
+
+#: ..\../main/gui/history3/historypanel3base.h:100
+msgid "Medical history"
+msgstr "Historique médical"
+
+#: ..\../main/gui/history3/historypanel3base.h:161
+msgid "Open With ..."
+msgstr "Ouvrir avec ..."
+
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Select a View"
+msgstr "Sélectionner une vue"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+msgid "Message detail"
+msgstr "Détail du message"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+msgid "Log node"
+msgstr "Nœud journal"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:87
+msgid "Closing Ginkgo CADx"
+msgstr "Fermeture de Ginkgo CADx"
+
+#: ..\../main/gui/paneltags/paneltagsbase.h:57
+msgid "DICOM Inspector"
+msgstr "Inspecteur DICOM"
+
+#: ..\../main/license.h:31
+msgid "Open Source DICOM CADx environment"
+msgstr "Environnement DICOM CADx OpenSource"
+
+#: ..\../widgets/gui/calibracionbase.h:65
+msgid "Calibration"
+msgstr "Calibrage"
+
+#: ..\../wx/propiedades/wxpropiedadesbase.h:62
+msgid "Properties of ..."
+msgstr "Propriétés de ..."
+
+#: ..\../wx/thumbnailctrl/thumbnailwidget.h:44
+msgid "Image Browser Dialog"
+msgstr "Explorateur d'image"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+msgid "Test title"
+msgstr "Titre test"
+
+#~ msgid "Checking program updates..."
+#~ msgstr "Vérification des mises à jour du programme..."
+
+#~ msgid ""
+#~ "Unexpected Error exporting, the view is not allowed to export to the "
+#~ "format selected"
+#~ msgstr ""
+#~ "Erreur inattendue à l'export : la vue n'est pas autorisée à exporter vers "
+#~ "le format sélectionné"
+
+#~ msgid "Failed to store the file, check permissions on the directory"
+#~ msgstr ""
+#~ "Echec à l'enregistrement du fichier, vérifiez les permissions du "
+#~ "répertoire"
+
+#~ msgid "The key files will not be exported"
+#~ msgstr "Les fichiers clefs ne seront pas exportés"
+
+#~ msgid "Subsystem integration error: uninitialized result data container."
+#~ msgstr ""
+#~ "Erreur du sous-système d'intégration : conteneur de données de résultat "
+#~ "non initialisé."
+
+#~ msgid "Show / Hide DICOM tags panel"
+#~ msgstr "Montrer / Cacher le panel de balise DICOM"
+
+#~ msgid "%d{%Y/%m/%d %H:%M:%S.%q} [%t] %-5p %c %x - %m%n"
+#~ msgstr "%d{%Y/%m/%d %H:%M:%S.%q} [%t] %-5p %c %x - %m%n"
+
+#~ msgid "You have to specify at least uid series"
+#~ msgstr "Vous devez spécifier au moins l'uid de série"
+
+#~ msgid "You have to specify uid series"
+#~ msgstr "Vous devez spécifier l'uid de série"
+
+#~ msgid "Untitled"
+#~ msgstr "Sans titre"
+
+#~ msgid "UID"
+#~ msgstr "UID"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">"
+#~ msgstr ">"
+
+#~ msgid "<"
+#~ msgstr "<"
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid "Patient's Id"
+#~ msgstr "Id Patient"
+
+#~ msgid "You are not allowed to download this kind of modalities ("
+#~ msgstr "Vous n'êtes pas autorisé à télécharger ce genre de modalité ("
+
+#~ msgid "Searching..."
+#~ msgstr "Recherche..."
+
+#~ msgid "unknown column"
+#~ msgstr "Colonne inconnue"
+
+#~ msgid "Updates"
+#~ msgstr "Mises à jour"
+
+#~ msgid "Visualization"
+#~ msgstr "Visualisation"
+
+#~ msgid "Current"
+#~ msgstr "Courant"
+
+#~ msgid "All"
+#~ msgstr "Tout"
+
+#~ msgid "JPG"
+#~ msgstr "JPG"
+
+#~ msgid "BMP"
+#~ msgstr "BMP"
+
+#~ msgid "PNG"
+#~ msgstr "PNG"
+
+#~ msgid "Content"
+#~ msgstr "Contenu"
+
+#~ msgid "Include annotation Widgets"
+#~ msgstr "Ajout de Widgets d'annotation"
+
+#~ msgid "Evaluation maps"
+#~ msgstr "Cartes d'évaluation"
+
+#~ msgid "URL"
+#~ msgstr "URL"
+
+#~ msgid "BucketId"
+#~ msgstr "BucketId"
+
+#~ msgid "Pending tasks"
+#~ msgstr "Tâches en attente"
+
+#~ msgid "Restart pending tasks"
+#~ msgstr "Redémarrer les tâches en attente."
+
+#~ msgid "Remove pending tasks"
+#~ msgstr "Supprimer les tâches en attente"
+
+#~ msgid "Advanced tasks management..."
+#~ msgstr "Gestion des tâches avancées..."
+
+#~ msgid "You can't remove series with pending tasks, cancel tasks and retry"
+#~ msgstr ""
+#~ "Vous ne pouvez pas supprimer une série qui a des tâches en attente. "
+#~ "Annulez ces tâches et réessayez."
+
+#~ msgid "Are you sure you want to delete task?"
+#~ msgstr "Êtes-vous sûr de vouloir détruire ces tâches ?"
+
+#~ msgid "Delete tasks"
+#~ msgstr "Détruire les tâches"
+
+#~ msgid "Sort by"
+#~ msgstr "Trier par"
+
+#~ msgid "Pateint id"
+#~ msgstr "ID du patient"
+
+#~ msgid "Horizontal mosaic"
+#~ msgstr "Mosaïque horizontale"
+
+#~ msgid "Vertical mosaic"
+#~ msgstr "Mosaïque verticale"
+
+#~ msgid "Grid (two columns)"
+#~ msgstr "Grille (deux colonnes)"
+
+#~ msgid "Grid (three columns)"
+#~ msgstr "Grilles (trois colonnes)"
+
+#~ msgid "Grid organization"
+#~ msgstr "Organisation de la grille"
+
+#~ msgid "Include Annotations"
+#~ msgstr "Ajouter des annotations"
+
+#~ msgid "Evaluation Maps"
+#~ msgstr "Cartes d'évaluation"
+
+#~ msgid "Zoom"
+#~ msgstr "Zoom"
+
+#~ msgid "Options"
+#~ msgstr "Options"
+
+#~ msgid "Images per sheet"
+#~ msgstr "Images par tableau"
+
+#~ msgid "Print ..."
+#~ msgstr "Imprimer ..."
+
+#~ msgid "Completed"
+#~ msgstr "Terminé"
+
+#~ msgid "Delete task"
+#~ msgstr "Détruire tâche"
+
+#~ msgid "Restart task"
+#~ msgstr "Redémarrer tâche"
+
+#~ msgid "Delete all"
+#~ msgstr "Détruite tout"
+
+#~ msgid "Are you sure you want to delete tasks?"
+#~ msgstr "Êtes-vous sûr de vouloir détruire cette tâche ?"
+
+#~ msgid "ID"
+#~ msgstr "ID"
+
+#~ msgid "Show metadatada"
+#~ msgstr "Montrer metadata"
+
+#~ msgid "Vertex (I)"
+#~ msgstr "Sommet (I)"
+
+#~ msgid "Vertex (M)"
+#~ msgstr "Sommet (M)"
+
+#~ msgid "Center"
+#~ msgstr "Centre"
+
+#~ msgid "Color"
+#~ msgstr "Couleur"
+
+#~ msgid "Point Size"
+#~ msgstr "Taille du point"
+
+#~ msgid "Family"
+#~ msgstr "Famille"
+
+#~ msgid "Underline"
+#~ msgstr "Souligné"
+
+#~ msgid "Make a selection:"
+#~ msgstr "Faire une sélection :"
+
+#~ msgid "Categorized Mode"
+#~ msgstr "Mode catégorie"
+
+#~ msgid "Alphabetic Mode"
+#~ msgstr "Mode alphabétique"
+
+#~ msgid "False"
+#~ msgstr "Faux"
+
+#~ msgid "True"
+#~ msgstr "Vrai"
+
+#~ msgid "Unspecified"
+#~ msgstr "Non spécifié"
+
+#~ msgid ""
+#~ "Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", "
+#~ "NOT \"%s\"."
+#~ msgstr ""
+#~ "Echec de l'opération \"%s\" : La propriété étiquette \"%s\" est de type "
+#~ "\"%s\", ET PAS \"%s\"."
+
+#~ msgid "Error in resource: %s"
+#~ msgstr "Erreur à la ressource : %s"
+
+#~ msgid "Value must be %lld or higher"
+#~ msgstr "La valeur doit être au moins %lld "
+
+#~ msgid "Value must be %llu or higher"
+#~ msgstr "La valeur doit être au moins %llu"
+
+#~ msgid "Value must be %llu or less"
+#~ msgstr "La valeur doit être au plus %llu "
+
+#~ msgid "Value must be %f or higher"
+#~ msgstr "La valeur doit être au moins %f"
+
+#~ msgid "Value must be %f or less"
+#~ msgstr "La valeur doit être au plus %f"
+
+#~ msgid "Not %s"
+#~ msgstr "Pas %s"
+
+#~ msgid "Choose a directory:"
+#~ msgstr "Choisissez un répertoire :"
+
+#~ msgid "Choose a file"
+#~ msgstr "Choisissez un fichier"
+
+#~ msgid "All files (*.*)|*.*"
+#~ msgstr "Tout fichier (*.*)|*.*"
+
+#~ msgid "Update"
+#~ msgstr "Mise à jour"
+
+#~ msgid "Up"
+#~ msgstr "Haut"
+
+#~ msgid "Down"
+#~ msgstr "Bas"
+
+#~ msgid "Page %i"
+#~ msgstr "Page %i"
+
+#~ msgid "Configure proxy"
+#~ msgstr "Configuration proxy"
+
+#~ msgid "Use system settings"
+#~ msgstr "Utilisation de la configuration système"
+
+#~ msgid "Manual configuration of proxy:"
+#~ msgstr "Configuration manuelle du proxy :"
+
+#~ msgid "Host:"
+#~ msgstr "Host :"
+
+#~ msgid "Port:"
+#~ msgstr "Port :"
+
+#~ msgid "Password:"
+#~ msgstr "Mot de passe :"
+
+#~ msgid "Authenticate"
+#~ msgstr "Authentification"
diff --git a/cadxcore/lang/fr/wxstd.mo b/cadxcore/lang/fr/wxstd.mo
new file mode 100644
index 0000000..7baa46b
Binary files /dev/null and b/cadxcore/lang/fr/wxstd.mo differ
diff --git a/cadxcore/lang/fr/wxstd.po b/cadxcore/lang/fr/wxstd.po
new file mode 100644
index 0000000..30a44be
--- /dev/null
+++ b/cadxcore/lang/fr/wxstd.po
@@ -0,0 +1,9056 @@
+# Initial translation by Stephane Junique <pttlapinblanc at chez.com>
+# Updated by Nicolas Velin <nsv at fr.st>
+msgid ""
+msgstr ""
+"Project-Id-Version: wxWidgets 3.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-01 19:04+0200\n"
+"PO-Revision-Date: 2013-06-11 22:58+0100\n"
+"Last-Translator: Xaviou <x.psoud at gmail.com>\n"
+"Language-Team: French <debian-l10n-french at lists.debian.org>\n"
+"Language: fr\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/common/debugrpt.cpp:591
+msgid ""
+"\n"
+"Please send this report to the program maintainer, thank you!\n"
+msgstr ""
+"\n"
+"Merci d'envoyer ce rapport au responsable du programme !\n"
+
+#: ../src/richtext/richtextstyledlg.cpp:210
+#: ../src/richtext/richtextstyledlg.cpp:222
+msgid " "
+msgstr " "
+
+#: ../src/generic/dbgrptg.cpp:326
+msgid "              Thank you and we're sorry for the inconvenience!\n"
+msgstr "              Merci et désolé pour le dérangement.\n"
+
+#: ../src/common/prntbase.cpp:546
+#, c-format
+msgid " (copy %d of %d)"
+msgstr "(copie %d sur %d)"
+
+#: ../src/common/log.cpp:425
+#, c-format
+msgid " (error %ld: %s)"
+msgstr " (erreur %ld : %s)"
+
+#: ../src/common/imagtiff.cpp:75
+#, c-format
+msgid " (in module \"%s\")"
+msgstr " (dans le module \"%s\")"
+
+#: ../src/common/docview.cpp:1624
+msgid " - "
+msgstr " - "
+
+#: ../src/richtext/richtextprint.cpp:588 ../src/html/htmprint.cpp:704
+msgid " Preview"
+msgstr " Aperçu"
+
+#: ../src/common/fontcmn.cpp:811
+msgid " bold"
+msgstr "gras"
+
+#: ../src/common/fontcmn.cpp:827
+msgid " italic"
+msgstr "italique"
+
+#: ../src/common/fontcmn.cpp:807
+msgid " light"
+msgstr "léger"
+
+#: ../src/common/paper.cpp:118
+msgid "#10 Envelope, 4 1/8 x 9 1/2 in"
+msgstr "Enveloppe n° 10 (4,125 x 9,5 pouces)"
+
+#: ../src/common/paper.cpp:119
+msgid "#11 Envelope, 4 1/2 x 10 3/8 in"
+msgstr "Enveloppe n° 11 (4,5 x 10,375 pouces)"
+
+#: ../src/common/paper.cpp:120
+msgid "#12 Envelope, 4 3/4 x 11 in"
+msgstr "Enveloppe n° 12 (4,75 x 11 pouces)"
+
+#: ../src/common/paper.cpp:121
+msgid "#14 Envelope, 5 x 11 1/2 in"
+msgstr "Enveloppe n° 14 (5 x 11,5 pouces)"
+
+#: ../src/common/paper.cpp:117
+msgid "#9 Envelope, 3 7/8 x 8 7/8 in"
+msgstr "Enveloppe n° 9 (3,875 x 8,875 pouces)"
+
+#: ../src/html/helpwnd.cpp:1044
+#, c-format
+msgid "%d of %lu"
+msgstr "%d dur %lu"
+
+#: ../src/html/helpwnd.cpp:1681 ../src/html/helpwnd.cpp:1719
+#, c-format
+msgid "%i of %i"
+msgstr "%i de %i"
+
+#: ../src/generic/filectrlg.cpp:315
+#, c-format
+msgid "%ld byte"
+msgid_plural "%ld bytes"
+msgstr[0] "%ld octet"
+msgstr[1] "%ld octets"
+
+#: ../src/html/helpwnd.cpp:1046
+#, c-format
+msgid "%lu of %lu"
+msgstr "%lu sur %lu"
+
+#: ../src/common/cmdline.cpp:1050
+#, c-format
+msgid "%s (or %s)"
+msgstr "%s (ou %s)"
+
+#: ../src/generic/logg.cpp:230
+#, c-format
+msgid "%s Error"
+msgstr "%s Erreur"
+
+#: ../src/generic/logg.cpp:242
+#, c-format
+msgid "%s Information"
+msgstr "%s Information"
+
+#: ../src/generic/preferencesg.cpp:110
+#, c-format
+msgid "%s Preferences"
+msgstr "Préférences %s"
+
+#: ../src/generic/logg.cpp:234
+#, c-format
+msgid "%s Warning"
+msgstr "%s Avertissement"
+
+#: ../src/common/tarstrm.cpp:1319
+#, c-format
+msgid "%s did not fit the tar header for entry '%s'"
+msgstr "%s ne rentre pas dans l'entête tar pour l'entrée '%s'"
+
+#: ../src/common/fldlgcmn.cpp:106
+#, c-format
+msgid "%s files (%s)|%s"
+msgstr "%s fichiers (%s)|%s"
+
+#: ../src/common/stockitem.cpp:139 ../src/html/helpfrm.cpp:142
+#: ../src/html/helpfrm.cpp:144
+msgid "&About"
+msgstr "À &propos"
+
+#: ../src/common/stockitem.cpp:207
+msgid "&Actual Size"
+msgstr "&Taille actuelle"
+
+#: ../src/richtext/richtextindentspage.cpp:262
+msgid "&After a paragraph:"
+msgstr "&Après un paragraphe :"
+
+#: ../src/richtext/richtextindentspage.cpp:128
+#: ../src/richtext/richtextliststylepage.cpp:319
+msgid "&Alignment"
+msgstr "&Alignement"
+
+#: ../src/common/stockitem.cpp:141
+msgid "&Apply"
+msgstr "&Appliquer"
+
+#: ../src/richtext/richtextstyledlg.cpp:251
+msgid "&Apply Style"
+msgstr "&Appliquer le style"
+
+#: ../src/msw/mdi.cpp:175
+msgid "&Arrange Icons"
+msgstr "&Arranger les icônes"
+
+#: ../src/common/stockitem.cpp:195
+msgid "&Ascending"
+msgstr "Croiss&ant"
+
+#: ../src/common/stockitem.cpp:142
+msgid "&Back"
+msgstr "&Retour"
+
+#: ../src/richtext/richtextstylepage.cpp:113
+msgid "&Based on:"
+msgstr "&Basé sur:"
+
+#: ../src/richtext/richtextindentspage.cpp:253
+msgid "&Before a paragraph:"
+msgstr "Avant un paragraphe :"
+
+#: ../src/richtext/richtextfontpage.cpp:271
+#, fuzzy
+msgid "&Bg colour:"
+msgstr "C&ouleur :"
+
+#: ../src/common/stockitem.cpp:143
+msgid "&Bold"
+msgstr "&Gras"
+
+#: ../src/common/stockitem.cpp:144
+msgid "&Bottom"
+msgstr "&Bas"
+
+#: ../src/richtext/richtextborderspage.cpp:359
+#: ../src/richtext/richtextborderspage.cpp:503
+#: ../src/richtext/richtextmarginspage.cpp:260
+#: ../src/richtext/richtextmarginspage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:637
+#: ../src/richtext/richtextsizepage.cpp:644
+msgid "&Bottom:"
+msgstr "&Bas :"
+
+#: ../include/wx/richtext/richtextbuffer.h:3530
+msgid "&Box"
+msgstr "&Boîte"
+
+#: ../src/richtext/richtextliststylepage.cpp:210
+#: ../src/richtext/richtextbulletspage.cpp:159
+msgid "&Bullet style:"
+msgstr "Style de ti&ret:"
+
+#: ../src/common/stockitem.cpp:146
+msgid "&CD-Rom"
+msgstr "&CD-Rom"
+
+#: ../src/generic/wizard.cpp:432 ../src/generic/fontdlgg.cpp:470
+#: ../src/generic/fontdlgg.cpp:489 ../src/osx/carbon/fontdlg.cpp:588
+#: ../src/common/stockitem.cpp:145
+msgid "&Cancel"
+msgstr "&Annuler"
+
+#: ../src/msw/mdi.cpp:171
+msgid "&Cascade"
+msgstr "&Cascade"
+
+#: ../include/wx/richtext/richtextbuffer.h:5587
+msgid "&Cell"
+msgstr "&Cellule"
+
+#: ../src/richtext/richtextsymboldlg.cpp:439
+msgid "&Character code:"
+msgstr "&Code caractère"
+
+#: ../src/common/stockitem.cpp:147
+msgid "&Clear"
+msgstr "&Supprimer"
+
+#: ../src/generic/logg.cpp:522 ../src/common/stockitem.cpp:148
+#: ../src/common/prntbase.cpp:1570 ../src/univ/themes/win32.cpp:3756
+#: ../src/html/helpfrm.cpp:139
+msgid "&Close"
+msgstr "&Fermer"
+
+#: ../src/common/stockitem.cpp:193
+msgid "&Color"
+msgstr "&Couleur :"
+
+#: ../src/richtext/richtextfontpage.cpp:258
+msgid "&Colour:"
+msgstr "C&ouleur :"
+
+#: ../src/common/stockitem.cpp:149
+msgid "&Convert"
+msgstr "&Convertir"
+
+#: ../src/richtext/richtextctrl.cpp:326 ../src/osx/textctrl_osx.cpp:583
+#: ../src/common/stockitem.cpp:150 ../src/msw/textctrl.cpp:2284
+msgid "&Copy"
+msgstr "&Copier"
+
+#: ../src/generic/hyperlinkg.cpp:156
+msgid "&Copy URL"
+msgstr "&Copier l'adresse"
+
+#: ../src/common/headerctrlcmn.cpp:328
+msgid "&Customize..."
+msgstr "&Personnaliser..."
+
+#: ../src/generic/dbgrptg.cpp:334
+msgid "&Debug report preview:"
+msgstr "Aperçu du rapport de &débogage :"
+
+#: ../src/richtext/richtexttabspage.cpp:142
+#: ../src/richtext/richtextctrl.cpp:328 ../src/osx/textctrl_osx.cpp:585
+#: ../src/common/stockitem.cpp:152 ../src/msw/textctrl.cpp:2286
+msgid "&Delete"
+msgstr "&Supprimer"
+
+#: ../src/richtext/richtextstyledlg.cpp:269
+msgid "&Delete Style..."
+msgstr "Su&pprimer le style"
+
+#: ../src/common/stockitem.cpp:196
+msgid "&Descending"
+msgstr "&Décroissant"
+
+#: ../src/generic/logg.cpp:688
+msgid "&Details"
+msgstr "&Détails"
+
+#: ../src/common/stockitem.cpp:153
+msgid "&Down"
+msgstr "&Bas"
+
+#: ../src/common/stockitem.cpp:154
+msgid "&Edit"
+msgstr "&Edition"
+
+#: ../src/richtext/richtextstyledlg.cpp:263
+msgid "&Edit Style..."
+msgstr "Édit&er le style..."
+
+#: ../src/common/stockitem.cpp:155
+msgid "&Execute"
+msgstr "&Exécuter"
+
+#: ../src/common/stockitem.cpp:157 ../src/html/helpfrm.cpp:146
+msgid "&File"
+msgstr "&Fichier"
+
+#: ../src/common/stockitem.cpp:158
+msgid "&Find"
+msgstr "&Trouver"
+
+#: ../src/generic/wizard.cpp:626
+msgid "&Finish"
+msgstr "&Finir"
+
+#: ../src/common/stockitem.cpp:159
+msgid "&First"
+msgstr "&Premier"
+
+#: ../src/richtext/richtextsizepage.cpp:244
+msgid "&Floating mode:"
+msgstr "Mode &Flottant :"
+
+#: ../src/common/stockitem.cpp:160
+msgid "&Floppy"
+msgstr "&Disquette"
+
+#: ../src/common/stockitem.cpp:194
+msgid "&Font"
+msgstr "&Police"
+
+#: ../src/generic/fontdlgg.cpp:371
+msgid "&Font family:"
+msgstr "&Famille de polices :"
+
+#: ../src/richtext/richtextliststylepage.cpp:194
+msgid "&Font for Level..."
+msgstr "&Police de caractères pour le niveau..."
+
+#: ../src/richtext/richtextfontpage.cpp:156
+#: ../src/richtext/richtextsymboldlg.cpp:400
+msgid "&Font:"
+msgstr "&Famille de polices :"
+
+#: ../src/common/stockitem.cpp:161
+msgid "&Forward"
+msgstr "&Suivant"
+
+#: ../src/richtext/richtextsymboldlg.cpp:451
+msgid "&From:"
+msgstr "De :"
+
+#: ../src/common/stockitem.cpp:162
+msgid "&Harddisk"
+msgstr "&Disque-dur"
+
+#: ../src/richtext/richtextsizepage.cpp:351
+#: ../src/richtext/richtextsizepage.cpp:358
+msgid "&Height:"
+msgstr "&Hauteur :"
+
+#: ../src/generic/wizard.cpp:435 ../src/richtext/richtextstyledlg.cpp:303
+#: ../src/richtext/richtextsymboldlg.cpp:479 ../src/osx/menu_osx.cpp:785
+#: ../src/common/stockitem.cpp:163 ../src/html/helpfrm.cpp:147
+msgid "&Help"
+msgstr "&Aide"
+
+#: ../include/wx/richmsgdlg.h:30
+msgid "&Hide details"
+msgstr "Cac&her les détails"
+
+#: ../src/common/stockitem.cpp:164
+msgid "&Home"
+msgstr "&Répertoire personnel"
+
+#: ../src/richtext/richtextindentspage.cpp:184
+#: ../src/richtext/richtextliststylepage.cpp:372
+msgid "&Indentation (tenths of a mm)"
+msgstr "&Indentation (dixièmes de mm)"
+
+#: ../src/richtext/richtextindentspage.cpp:167
+#: ../src/richtext/richtextliststylepage.cpp:356
+msgid "&Indeterminate"
+msgstr "&Indeterminé"
+
+#: ../src/common/stockitem.cpp:166
+msgid "&Index"
+msgstr "&Index"
+
+#: ../src/common/stockitem.cpp:167
+msgid "&Info"
+msgstr "&Info"
+
+#: ../src/common/stockitem.cpp:168
+msgid "&Italic"
+msgstr "&Italique"
+
+#: ../src/common/stockitem.cpp:169
+msgid "&Jump to"
+msgstr "&Aller à"
+
+#: ../src/richtext/richtextindentspage.cpp:153
+#: ../src/richtext/richtextliststylepage.cpp:342
+msgid "&Justified"
+msgstr "&Justifié"
+
+#: ../src/common/stockitem.cpp:174
+msgid "&Last"
+msgstr "&Dernier"
+
+#: ../src/richtext/richtextindentspage.cpp:139
+#: ../src/richtext/richtextliststylepage.cpp:328
+msgid "&Left"
+msgstr "&Gauche"
+
+#: ../src/richtext/richtextindentspage.cpp:195
+#: ../src/richtext/richtextborderspage.cpp:269
+#: ../src/richtext/richtextborderspage.cpp:413
+#: ../src/richtext/richtextliststylepage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:187
+#: ../src/richtext/richtextmarginspage.cpp:301
+#: ../src/richtext/richtextsizepage.cpp:532
+#: ../src/richtext/richtextsizepage.cpp:539
+msgid "&Left:"
+msgstr "&Gauche:"
+
+#: ../src/richtext/richtextliststylepage.cpp:183
+msgid "&List level:"
+msgstr "Niveau de &Liste:"
+
+#: ../src/generic/logg.cpp:523
+msgid "&Log"
+msgstr "&Journal"
+
+#: ../src/univ/themes/win32.cpp:3748
+msgid "&Move"
+msgstr "&Déplacer"
+
+#: ../src/richtext/richtextsizepage.cpp:672
+msgid "&Move the object to:"
+msgstr "&Déplacer l'objet vers :"
+
+#: ../src/common/stockitem.cpp:175
+msgid "&Network"
+msgstr "&Reseau"
+
+#: ../src/richtext/richtexttabspage.cpp:136 ../src/common/stockitem.cpp:176
+msgid "&New"
+msgstr "&Nouveau"
+
+#: ../src/aui/tabmdi.cpp:111 ../src/generic/mdig.cpp:100
+#: ../src/msw/mdi.cpp:176
+msgid "&Next"
+msgstr "&Suivant"
+
+#: ../src/generic/wizard.cpp:431 ../src/generic/wizard.cpp:626
+msgid "&Next >"
+msgstr "&Suivant >"
+
+#: ../src/richtext/richtextsizepage.cpp:681
+msgid "&Next Paragraph"
+msgstr "Paragraphe Suiva&nt"
+
+#: ../src/generic/tipdlg.cpp:276
+msgid "&Next Tip"
+msgstr "&Astuce suivante"
+
+#: ../src/richtext/richtextstylepage.cpp:123
+msgid "&Next style:"
+msgstr "&Style Suivant :"
+
+#: ../src/common/stockitem.cpp:177 ../src/msw/msgdlg.cpp:476
+msgid "&No"
+msgstr "&Non"
+
+#: ../src/generic/dbgrptg.cpp:356
+msgid "&Notes:"
+msgstr "&Notes :"
+
+#: ../src/richtext/richtextbulletspage.cpp:264
+msgid "&Number:"
+msgstr "&Numéro"
+
+#: ../src/generic/fontdlgg.cpp:475 ../src/generic/fontdlgg.cpp:482
+#: ../src/osx/carbon/fontdlg.cpp:594 ../src/common/stockitem.cpp:178
+msgid "&OK"
+msgstr "&Accepter"
+
+#: ../src/generic/dbgrptg.cpp:342 ../src/common/stockitem.cpp:179
+#: ../src/html/helpfrm.cpp:137
+msgid "&Open..."
+msgstr "&Ouvrir..."
+
+#: ../src/richtext/richtextindentspage.cpp:222
+msgid "&Outline level:"
+msgstr "Niveau de C&ontour :"
+
+#: ../src/richtext/richtextindentspage.cpp:293
+msgid "&Page Break"
+msgstr "Saut de &Page"
+
+#: ../src/richtext/richtextctrl.cpp:327 ../src/osx/textctrl_osx.cpp:584
+#: ../src/common/stockitem.cpp:180 ../src/msw/textctrl.cpp:2285
+msgid "&Paste"
+msgstr "&Coller"
+
+#: ../include/wx/richtext/richtextbuffer.h:4655
+msgid "&Picture"
+msgstr "&Image"
+
+#: ../src/generic/fontdlgg.cpp:422
+msgid "&Point size:"
+msgstr "Taille de &point :"
+
+#: ../src/richtext/richtexttabspage.cpp:114
+msgid "&Position (tenths of a mm):"
+msgstr "&Position (dizièmes de mm):"
+
+#: ../src/richtext/richtextsizepage.cpp:514
+msgid "&Position mode:"
+msgstr "Mode de &position :"
+
+#: ../src/common/stockitem.cpp:181
+msgid "&Preferences"
+msgstr "&Préférences"
+
+#: ../src/aui/tabmdi.cpp:112 ../src/generic/mdig.cpp:101
+#: ../src/msw/mdi.cpp:177
+msgid "&Previous"
+msgstr "&Précédent"
+
+#: ../src/richtext/richtextsizepage.cpp:675
+msgid "&Previous Paragraph"
+msgstr "Paragraphe &Précédent"
+
+#: ../src/common/stockitem.cpp:183
+msgid "&Print..."
+msgstr "&Imprimer..."
+
+#: ../src/richtext/richtextctrl.cpp:332 ../src/richtext/richtextctrl.cpp:4945
+#: ../src/common/stockitem.cpp:184
+msgid "&Properties"
+msgstr "&Propriétés"
+
+#: ../src/common/stockitem.cpp:156
+msgid "&Quit"
+msgstr "&Quitter"
+
+#: ../src/richtext/richtextctrl.cpp:323 ../src/osx/textctrl_osx.cpp:580
+#: ../src/common/stockitem.cpp:185 ../src/common/cmdproc.cpp:293
+#: ../src/common/cmdproc.cpp:300 ../src/msw/textctrl.cpp:2281
+msgid "&Redo"
+msgstr "&Refaire"
+
+#: ../src/common/cmdproc.cpp:289 ../src/common/cmdproc.cpp:309
+msgid "&Redo "
+msgstr "&Refaire "
+
+#: ../src/richtext/richtextstyledlg.cpp:257
+msgid "&Rename Style..."
+msgstr "&Renommer le style..."
+
+#: ../src/generic/fdrepdlg.cpp:179
+msgid "&Replace"
+msgstr "&Remplacer"
+
+#: ../src/richtext/richtextstyledlg.cpp:287
+msgid "&Restart numbering"
+msgstr "&Recommencer la numérotation"
+
+#: ../src/univ/themes/win32.cpp:3747
+msgid "&Restore"
+msgstr "&Restaurer"
+
+#: ../src/richtext/richtextindentspage.cpp:146
+#: ../src/richtext/richtextliststylepage.cpp:335
+msgid "&Right"
+msgstr "&Droite"
+
+#: ../src/richtext/richtextindentspage.cpp:213
+#: ../src/richtext/richtextborderspage.cpp:299
+#: ../src/richtext/richtextborderspage.cpp:443
+#: ../src/richtext/richtextliststylepage.cpp:399
+#: ../src/richtext/richtextmarginspage.cpp:212
+#: ../src/richtext/richtextmarginspage.cpp:326
+#: ../src/richtext/richtextsizepage.cpp:602
+#: ../src/richtext/richtextsizepage.cpp:609
+msgid "&Right:"
+msgstr "&Droite :"
+
+#: ../src/common/stockitem.cpp:190
+msgid "&Save"
+msgstr "&Enregistrer"
+
+#: ../src/common/stockitem.cpp:191
+msgid "&Save as"
+msgstr "Enregistrer &Sous"
+
+#: ../include/wx/richmsgdlg.h:29
+msgid "&See details"
+msgstr "Voir les détail&s"
+
+#: ../src/generic/tipdlg.cpp:270
+msgid "&Show tips at startup"
+msgstr "&Afficher les astuces au démarrage"
+
+#: ../src/univ/themes/win32.cpp:3750
+msgid "&Size"
+msgstr "&Taille"
+
+#: ../src/richtext/richtextfontpage.cpp:168
+msgid "&Size:"
+msgstr "&Taille :"
+
+#: ../src/generic/progdlgg.cpp:282
+msgid "&Skip"
+msgstr "Pa&sser"
+
+#: ../src/richtext/richtextindentspage.cpp:242
+#: ../src/richtext/richtextliststylepage.cpp:417
+msgid "&Spacing (tenths of a mm)"
+msgstr "E&spacement (dixièmes de mm)"
+
+#: ../src/common/stockitem.cpp:197
+msgid "&Spell Check"
+msgstr "&Vérification Orthographique"
+
+#: ../src/common/stockitem.cpp:198
+msgid "&Stop"
+msgstr "&Arrêter"
+
+#: ../src/richtext/richtextfontpage.cpp:284 ../src/common/stockitem.cpp:199
+msgid "&Strikethrough"
+msgstr "&Barré"
+
+#: ../src/generic/fontdlgg.cpp:382 ../src/richtext/richtextstylepage.cpp:104
+msgid "&Style:"
+msgstr "&Style :"
+
+#: ../src/richtext/richtextstyledlg.cpp:198
+msgid "&Styles:"
+msgstr "&Style :"
+
+#: ../src/richtext/richtextsymboldlg.cpp:413
+msgid "&Subset:"
+msgstr "&Sous-ensemble:"
+
+#: ../src/richtext/richtextliststylepage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:222
+msgid "&Symbol:"
+msgstr "&Symbole :"
+
+#: ../include/wx/richtext/richtextbuffer.h:5679
+#, fuzzy
+msgid "&Table"
+msgstr "Tabulations"
+
+#: ../src/common/stockitem.cpp:200
+msgid "&Top"
+msgstr "Hau&t"
+
+#: ../src/richtext/richtextborderspage.cpp:329
+#: ../src/richtext/richtextborderspage.cpp:473
+#: ../src/richtext/richtextmarginspage.cpp:235
+#: ../src/richtext/richtextmarginspage.cpp:349
+#: ../src/richtext/richtextsizepage.cpp:567
+#: ../src/richtext/richtextsizepage.cpp:574
+msgid "&Top:"
+msgstr "Hau&t :"
+
+#: ../src/generic/fontdlgg.cpp:444 ../src/common/stockitem.cpp:202
+msgid "&Underline"
+msgstr "&Souligner"
+
+#: ../src/richtext/richtextfontpage.cpp:243
+msgid "&Underlining:"
+msgstr "So&uligner:"
+
+#: ../src/richtext/richtextctrl.cpp:322 ../src/osx/textctrl_osx.cpp:579
+#: ../src/common/stockitem.cpp:203 ../src/common/cmdproc.cpp:271
+#: ../src/msw/textctrl.cpp:2280
+msgid "&Undo"
+msgstr "&Annuler"
+
+#: ../src/common/cmdproc.cpp:265
+msgid "&Undo "
+msgstr "&Annuler "
+
+#: ../src/common/stockitem.cpp:204
+msgid "&Unindent"
+msgstr "&Désindenter"
+
+#: ../src/common/stockitem.cpp:205
+msgid "&Up"
+msgstr "&Haut"
+
+#: ../src/richtext/richtextsizepage.cpp:278
+msgid "&Vertical alignment:"
+msgstr "Alignement &vertical :"
+
+#: ../src/generic/dbgrptg.cpp:340
+#, fuzzy
+msgid "&View..."
+msgstr "&Ouvrir..."
+
+#: ../src/generic/fontdlgg.cpp:393
+msgid "&Weight:"
+msgstr "&Largeur :"
+
+#: ../src/richtext/richtextsizepage.cpp:317
+#: ../src/richtext/richtextsizepage.cpp:324
+msgid "&Width:"
+msgstr "&Largeur :"
+
+#: ../src/aui/tabmdi.cpp:311 ../src/aui/tabmdi.cpp:327
+#: ../src/aui/tabmdi.cpp:329 ../src/generic/mdig.cpp:294
+#: ../src/generic/mdig.cpp:310 ../src/generic/mdig.cpp:314
+#: ../src/msw/mdi.cpp:77
+msgid "&Window"
+msgstr "&Fenêtre"
+
+#: ../src/common/stockitem.cpp:206 ../src/msw/msgdlg.cpp:476
+msgid "&Yes"
+msgstr "&Oui"
+
+#: ../src/common/config.cpp:523 ../src/msw/regconf.cpp:258
+#, c-format
+msgid "'%s' has extra '..', ignored."
+msgstr "« %s » a trop de « .. » : ils sont ignorés."
+
+#: ../src/common/valtext.cpp:249 ../src/common/valtext.cpp:251
+#: ../src/common/valtext.cpp:253 ../src/common/valtext.cpp:255
+#, c-format
+msgid "'%s' is invalid"
+msgstr "« %s » n'est pas valable"
+
+#: ../src/common/cmdline.cpp:948 ../src/common/cmdline.cpp:966
+#, c-format
+msgid "'%s' is not a correct numeric value for option '%s'."
+msgstr "« %s » n'est pas une valeur numérique correcte pour l'option « %s »."
+
+#: ../src/common/translation.cpp:1086
+#, c-format
+msgid "'%s' is not a valid message catalog."
+msgstr "« %s » n'est pas un catalogue valable de messages."
+
+#: ../src/common/textbuf.cpp:239
+#, c-format
+msgid "'%s' is probably a binary buffer."
+msgstr "« %s » est probablement un tampon binaire."
+
+#: ../src/common/valtext.cpp:247
+#, c-format
+msgid "'%s' should be numeric."
+msgstr "« %s » doit être numérique."
+
+#: ../src/common/valtext.cpp:239
+#, c-format
+msgid "'%s' should only contain ASCII characters."
+msgstr "« %s » ne doit contenir que des caractères ASCII."
+
+#: ../src/common/valtext.cpp:241
+#, c-format
+msgid "'%s' should only contain alphabetic characters."
+msgstr "« %s » ne doit contenir que des caractères alphabétiques."
+
+#: ../src/common/valtext.cpp:243
+#, c-format
+msgid "'%s' should only contain alphabetic or numeric characters."
+msgstr "« %s » ne doit contenir que des caractères alphanumériques."
+
+#: ../src/common/valtext.cpp:245
+#, c-format
+msgid "'%s' should only contain digits."
+msgstr "« %s » ne doit contenir que des chiffres."
+
+#: ../src/richtext/richtextliststylepage.cpp:229
+#: ../src/richtext/richtextbulletspage.cpp:179
+msgid "(*)"
+msgstr "(*)"
+
+#: ../src/html/helpwnd.cpp:976
+msgid "(Help)"
+msgstr "(Aide)"
+
+#: ../src/richtext/richtextliststylepage.cpp:481
+#: ../src/richtext/richtextbulletspage.cpp:286
+msgid "(None)"
+msgstr "(Aucun)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:504
+msgid "(Normal text)"
+msgstr "(Texte normale)"
+
+#: ../src/html/helpwnd.cpp:426 ../src/html/helpwnd.cpp:1119
+#: ../src/html/helpwnd.cpp:1745
+msgid "(bookmarks)"
+msgstr "(signets)"
+
+#: ../src/richtext/richtextindentspage.cpp:274
+#: ../src/richtext/richtextindentspage.cpp:286
+#: ../src/richtext/richtextindentspage.cpp:287
+#: ../src/richtext/richtextindentspage.cpp:311
+#: ../src/richtext/richtextindentspage.cpp:326
+#: ../src/richtext/richtextformatdlg.cpp:831
+#: ../src/richtext/richtextfontpage.cpp:331
+#: ../src/richtext/richtextfontpage.cpp:335
+#: ../src/richtext/richtextfontpage.cpp:339
+#: ../src/richtext/richtextliststylepage.cpp:448
+#: ../src/richtext/richtextliststylepage.cpp:460
+#: ../src/richtext/richtextliststylepage.cpp:461
+msgid "(none)"
+msgstr "(aucun)"
+
+#: ../src/richtext/richtextliststylepage.cpp:492
+#: ../src/richtext/richtextbulletspage.cpp:297
+msgid "*"
+msgstr "*"
+
+#: ../src/richtext/richtextliststylepage.cpp:236
+#: ../src/richtext/richtextbulletspage.cpp:186
+msgid "*)"
+msgstr "*)"
+
+#: ../src/richtext/richtextliststylepage.cpp:495
+#: ../src/richtext/richtextbulletspage.cpp:300
+msgid "+"
+msgstr "+"
+
+#: ../src/msw/utils.cpp:1324
+msgid ", 64-bit edition"
+msgstr ", édition 64-bit"
+
+#: ../src/richtext/richtextliststylepage.cpp:493
+#: ../src/richtext/richtextbulletspage.cpp:298
+msgid "-"
+msgstr "-"
+
+#: ../src/generic/filepickerg.cpp:66
+msgid "..."
+msgstr "..."
+
+#: ../src/richtext/richtextindentspage.cpp:276
+#: ../src/richtext/richtextliststylepage.cpp:450
+msgid "1.1"
+msgstr "1.1"
+
+#: ../src/richtext/richtextindentspage.cpp:277
+#: ../src/richtext/richtextliststylepage.cpp:451
+msgid "1.2"
+msgstr "1.2"
+
+#: ../src/richtext/richtextindentspage.cpp:278
+#: ../src/richtext/richtextliststylepage.cpp:452
+msgid "1.3"
+msgstr "1.3"
+
+#: ../src/richtext/richtextindentspage.cpp:279
+#: ../src/richtext/richtextliststylepage.cpp:453
+msgid "1.4"
+msgstr "1.4"
+
+#: ../src/richtext/richtextindentspage.cpp:280
+#: ../src/richtext/richtextliststylepage.cpp:454
+msgid "1.5"
+msgstr "1,5"
+
+#: ../src/richtext/richtextindentspage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:455
+msgid "1.6"
+msgstr "1.6"
+
+#: ../src/richtext/richtextindentspage.cpp:282
+#: ../src/richtext/richtextliststylepage.cpp:456
+msgid "1.7"
+msgstr "1.7"
+
+#: ../src/richtext/richtextindentspage.cpp:283
+#: ../src/richtext/richtextliststylepage.cpp:457
+msgid "1.8"
+msgstr "1.8"
+
+#: ../src/richtext/richtextindentspage.cpp:284
+#: ../src/richtext/richtextliststylepage.cpp:458
+msgid "1.9"
+msgstr "1.9"
+
+#: ../src/common/paper.cpp:141
+msgid "10 x 11 in"
+msgstr "10 x 11 pouces"
+
+#: ../src/common/paper.cpp:114
+msgid "10 x 14 in"
+msgstr "10 x 14 pouces"
+
+#: ../src/common/paper.cpp:115
+msgid "11 x 17 in"
+msgstr "11 x 17 pouces"
+
+#: ../src/common/paper.cpp:185
+msgid "12 x 11 in"
+msgstr "12 x 11 pouces"
+
+#: ../src/common/paper.cpp:142
+msgid "15 x 11 in"
+msgstr "15 x 11 pouces"
+
+#: ../src/richtext/richtextindentspage.cpp:285
+#: ../src/richtext/richtextliststylepage.cpp:459
+msgid "2"
+msgstr "2"
+
+#: ../src/common/paper.cpp:133
+msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in"
+msgstr "Enveloppe 6 3/4 (3,625 x 6,5 pouces)"
+
+#: ../src/common/paper.cpp:140
+msgid "9 x 11 in"
+msgstr "9 x 11 pouces"
+
+#: ../src/html/htmprint.cpp:431
+msgid ": file does not exist!"
+msgstr " : le fichier n'existe pas."
+
+#: ../src/common/fontmap.cpp:199
+msgid ": unknown charset"
+msgstr " : jeu de caractères inconnu"
+
+#: ../src/common/fontmap.cpp:413
+msgid ": unknown encoding"
+msgstr " : codage inconnu"
+
+#: ../src/generic/wizard.cpp:437
+msgid "< &Back"
+msgstr "< &Retour"
+
+#: ../src/osx/carbon/fontdlg.cpp:608 ../src/osx/carbon/fontdlg.cpp:815
+#: ../src/osx/carbon/fontdlg.cpp:835
+msgid "<Any Decorative>"
+msgstr "<N'importe quelle décoration>"
+
+#: ../src/osx/carbon/fontdlg.cpp:609 ../src/osx/carbon/fontdlg.cpp:817
+#: ../src/osx/carbon/fontdlg.cpp:837
+msgid "<Any Modern>"
+msgstr "<N'importe quel Moderne>"
+
+#: ../src/osx/carbon/fontdlg.cpp:607 ../src/osx/carbon/fontdlg.cpp:813
+#: ../src/osx/carbon/fontdlg.cpp:833
+msgid "<Any Roman>"
+msgstr "<N'importe quel Roman>"
+
+#: ../src/osx/carbon/fontdlg.cpp:610 ../src/osx/carbon/fontdlg.cpp:819
+#: ../src/osx/carbon/fontdlg.cpp:839
+msgid "<Any Script>"
+msgstr "<N'importe quel Script>"
+
+#: ../src/osx/carbon/fontdlg.cpp:611 ../src/osx/carbon/fontdlg.cpp:824
+#: ../src/osx/carbon/fontdlg.cpp:843
+msgid "<Any Swiss>"
+msgstr "<N'importe quel Suisse>"
+
+#: ../src/osx/carbon/fontdlg.cpp:612 ../src/osx/carbon/fontdlg.cpp:821
+#: ../src/osx/carbon/fontdlg.cpp:841
+msgid "<Any Teletype>"
+msgstr "<N'importe quel télétype>"
+
+#: ../src/osx/carbon/fontdlg.cpp:606
+msgid "<Any>"
+msgstr "<n'importe lequel>"
+
+#: ../src/generic/filectrlg.cpp:286 ../src/generic/filectrlg.cpp:309
+msgid "<DIR>"
+msgstr "<RÉP.>"
+
+#: ../src/generic/filectrlg.cpp:290 ../src/generic/filectrlg.cpp:313
+msgid "<DRIVE>"
+msgstr "<DISQUE>"
+
+#: ../src/generic/filectrlg.cpp:288 ../src/generic/filectrlg.cpp:311
+msgid "<LINK>"
+msgstr "<LIEN>"
+
+#: ../src/html/helpwnd.cpp:1279
+msgid "<b><i>Bold italic face.</i></b><br>"
+msgstr "<b><i>Gras italique.</i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1283
+msgid "<b><i>bold italic <u>underlined</u></i></b><br>"
+msgstr "<b><i>gras italique <u>souligné</u></i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1278
+msgid "<b>Bold face.</b> "
+msgstr "<b>Gras.</b> "
+
+#: ../src/html/helpwnd.cpp:1277
+msgid "<i>Italic face.</i> "
+msgstr "<i>Italique.</i> "
+
+#: ../src/richtext/richtextliststylepage.cpp:494
+#: ../src/richtext/richtextbulletspage.cpp:299
+msgid ">"
+msgstr ">"
+
+#: ../src/generic/dbgrptg.cpp:318
+msgid "A debug report has been generated in the directory\n"
+msgstr "Un rapport de débogage a été créé dans le dossier\n"
+
+#: ../src/common/debugrpt.cpp:578
+msgid "A debug report has been generated. It can be found in"
+msgstr "Un rapport de débogage a été généré. Il peut être trouvé dans"
+
+#: ../src/common/xtixml.cpp:418
+msgid "A non empty collection must consist of 'element' nodes"
+msgstr "Une collection non vide doit comprendre des noeuds « éléments »"
+
+#: ../src/richtext/richtextliststylepage.cpp:304
+#: ../src/richtext/richtextliststylepage.cpp:306
+#: ../src/richtext/richtextbulletspage.cpp:257
+#: ../src/richtext/richtextbulletspage.cpp:259
+msgid "A standard bullet name."
+msgstr "Un nom de tiret standard."
+
+#: ../src/common/paper.cpp:218
+msgid "A0 sheet, 841 x 1189 mm"
+msgstr "Feuille A0, 841 x 1189 mm"
+
+#: ../src/common/paper.cpp:219
+msgid "A1 sheet, 594 x 841 mm"
+msgstr "Feuille A1, 594 x 841 mm"
+
+#: ../src/common/paper.cpp:160
+msgid "A2 420 x 594 mm"
+msgstr "A2 420 x 594 mm"
+
+#: ../src/common/paper.cpp:157
+msgid "A3 Extra 322 x 445 mm"
+msgstr "A3 Extra 322 x 445 mm"
+
+#: ../src/common/paper.cpp:162
+msgid "A3 Extra Transverse 322 x 445 mm"
+msgstr "A3 Extra, Paysage, 322 x 445 mm"
+
+#: ../src/common/paper.cpp:171
+msgid "A3 Rotated 420 x 297 mm"
+msgstr "A3 Paysage 420 x 297 mm"
+
+#: ../src/common/paper.cpp:161
+msgid "A3 Transverse 297 x 420 mm"
+msgstr "A3 Portrait 297 x 420 mm"
+
+#: ../src/common/paper.cpp:107
+msgid "A3 sheet, 297 x 420 mm"
+msgstr "Feuille A3, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:147
+msgid "A4 Extra 9.27 x 12.69 in"
+msgstr "A4 Extra 9.27 x 12.69 pouces"
+
+#: ../src/common/paper.cpp:154
+msgid "A4 Plus 210 x 330 mm"
+msgstr "A4 Plus 210 x 330 mm"
+
+#: ../src/common/paper.cpp:172
+msgid "A4 Rotated 297 x 210 mm"
+msgstr "A4 Paysage 297 x 210 mm"
+
+#: ../src/common/paper.cpp:149
+msgid "A4 Transverse 210 x 297 mm"
+msgstr "A4 Portrait 210 x 297 mm"
+
+#: ../src/common/paper.cpp:98
+msgid "A4 sheet, 210 x 297 mm"
+msgstr "Feuille A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:108
+msgid "A4 small sheet, 210 x 297 mm"
+msgstr "Petite feuille A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:158
+msgid "A5 Extra 174 x 235 mm"
+msgstr "A5 Extra 174 x 235 mm"
+
+#: ../src/common/paper.cpp:173
+msgid "A5 Rotated 210 x 148 mm"
+msgstr "A5 Paysage 210 x 148 mm"
+
+#: ../src/common/paper.cpp:155
+msgid "A5 Transverse 148 x 210 mm"
+msgstr "A5 Portrait 148 x 210 mm"
+
+#: ../src/common/paper.cpp:109
+msgid "A5 sheet, 148 x 210 mm"
+msgstr "Feuille A5, 148 x 210 mm"
+
+#: ../src/common/paper.cpp:165
+msgid "A6 105 x 148 mm"
+msgstr "A6 105 x 148 mm"
+
+#: ../src/common/paper.cpp:178
+msgid "A6 Rotated 148 x 105 mm"
+msgstr "A6 Paysage 148 x 105 mm"
+
+#: ../src/generic/fontdlgg.cpp:83 ../src/richtext/richtextformatdlg.cpp:526
+#: ../src/osx/carbon/fontdlg.cpp:339
+msgid "ABCDEFGabcdefg12345"
+msgstr "ABCDEFGabcdefg12345"
+
+#: ../src/common/accelcmn.cpp:76
+msgid "ADD"
+msgstr "AJOUTER"
+
+#: ../src/richtext/richtextsymboldlg.cpp:458 ../src/common/ftp.cpp:405
+msgid "ASCII"
+msgstr "ASCII"
+
+#: ../src/osx/menu_osx.cpp:630 ../src/common/stockitem.cpp:139
+msgid "About"
+msgstr "À propos"
+
+#: ../src/generic/aboutdlgg.cpp:140 ../src/msw/aboutdlg.cpp:64
+#, c-format
+msgid "About %s"
+msgstr "À propos de %s"
+
+#: ../src/richtext/richtextsizepage.cpp:520
+msgid "Absolute"
+msgstr "Absolue"
+
+#: ../src/common/stockitem.cpp:207
+msgid "Actual Size"
+msgstr "Taille Actuelle"
+
+#: ../src/common/stockitem.cpp:140
+msgid "Add"
+msgstr "Ajouter"
+
+#: ../src/richtext/richtextbuffer.cpp:10751
+#, fuzzy
+msgid "Add Column"
+msgstr "Ajouter une colonne"
+
+#: ../src/richtext/richtextbuffer.cpp:10688
+#, fuzzy
+msgid "Add Row"
+msgstr "Ajouter une ligne"
+
+#: ../src/html/helpwnd.cpp:439
+msgid "Add current page to bookmarks"
+msgstr "Ajouter la page courante aux signets"
+
+#: ../src/generic/colrdlgg.cpp:283
+msgid "Add to custom colours"
+msgstr "Ajouter aux couleurs personnalisées"
+
+#: ../include/wx/xtiprop.h:259
+msgid "AddToPropertyCollection called on a generic accessor"
+msgstr "AddToPropertyCollection appelé sur un assesseur générique"
+
+#: ../include/wx/xtiprop.h:197
+msgid "AddToPropertyCollection called w/o valid adder"
+msgstr "AddToPropertyCollection appelé sans additionneur valable"
+
+#: ../src/html/helpctrl.cpp:159
+#, c-format
+msgid "Adding book %s"
+msgstr "Ajouter le manuel %s"
+
+#: ../src/osx/carbon/dataview.cpp:1933
+msgid "Adding flavor TEXT failed"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1954
+msgid "Adding flavor utxt failed"
+msgstr ""
+
+#: ../src/common/preferencescmn.cpp:41
+msgid "Advanced"
+msgstr "Avancé"
+
+#: ../src/richtext/richtextliststylepage.cpp:435
+msgid "After a paragraph:"
+msgstr "Après un paragraphe:"
+
+#: ../src/common/stockitem.cpp:172
+msgid "Align Left"
+msgstr "Aligner à gauche"
+
+#: ../src/common/stockitem.cpp:173
+msgid "Align Right"
+msgstr "Aligner à droite"
+
+#: ../src/richtext/richtextsizepage.cpp:266
+msgid "Alignment"
+msgstr "Alignement"
+
+#: ../src/generic/prntdlgg.cpp:215
+msgid "All"
+msgstr "Tout"
+
+#: ../src/generic/filectrlg.cpp:1205 ../src/common/fldlgcmn.cpp:89
+#, c-format
+msgid "All files (%s)|%s"
+msgstr "Tous les fichiers (%s)|%s"
+
+#: ../include/wx/defs.h:2922
+msgid "All files (*)|*"
+msgstr "Tous les fichiers (*)|*"
+
+#: ../include/wx/defs.h:2919
+msgid "All files (*.*)|*.*"
+msgstr "Tous les fichiers (*.*)|*.*"
+
+#: ../src/richtext/richtextstyles.cpp:1057
+msgid "All styles"
+msgstr "Tous les styles"
+
+#: ../src/propgrid/manager.cpp:1496
+msgid "Alphabetic Mode"
+msgstr "Mode Alphabétique"
+
+#: ../src/common/xtistrm.cpp:429
+msgid "Already Registered Object passed to SetObjectClassInfo"
+msgstr "Objet déjà enregistré envoyé à SetObjectClassInfo"
+
+#: ../src/unix/dialup.cpp:353
+msgid "Already dialling ISP."
+msgstr "Déjà en cours d'appel du FAI."
+
+#: ../src/common/accelcmn.cpp:320 ../src/univ/themes/win32.cpp:3756
+msgid "Alt+"
+msgstr "Alt+"
+
+#: ../src/common/debugrpt.cpp:581
+msgid "And includes the following files:\n"
+msgstr "Et inclut les fichiers suivants :\n"
+
+#: ../src/generic/animateg.cpp:162
+#, c-format
+msgid "Animation file is not of type %ld."
+msgstr "Le fichier animé n'est pas du type %ld."
+
+#: ../src/generic/logg.cpp:1034
+#, c-format
+msgid "Append log to file '%s' (choosing [No] will overwrite it)?"
+msgstr "Ajouter le journal au fichier « %s » (choisir [Non] l'écrasera) ?"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:610
+#: ../src/osx/menu_osx.cpp:649 ../src/osx/menu_osx.cpp:657
+msgid "Application"
+msgstr "Application"
+
+#: ../src/common/stockitem.cpp:141
+msgid "Apply"
+msgstr "Appliquer"
+
+#: ../src/richtext/richtextliststylepage.cpp:482
+#: ../src/richtext/richtextbulletspage.cpp:287
+msgid "Arabic"
+msgstr "Arabe"
+
+#: ../src/common/fmapbase.cpp:153
+msgid "Arabic (ISO-8859-6)"
+msgstr "Arabe (ISO-8859-6)"
+
+#: ../src/msw/ole/automtn.cpp:661
+#, c-format
+msgid "Argument %u not found."
+msgstr "Argument %u non trouvé."
+
+#: ../src/generic/aboutdlgg.cpp:184
+msgid "Artists"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:195
+msgid "Ascending"
+msgstr "Croissant"
+
+#: ../src/generic/filectrlg.cpp:468
+msgid "Attributes"
+msgstr "Attributs"
+
+#: ../src/richtext/richtextliststylepage.cpp:294
+#: ../src/richtext/richtextbulletspage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:247
+msgid "Available fonts."
+msgstr "Polices de caractères disponibles."
+
+#: ../src/common/paper.cpp:138
+msgid "B4 (ISO) 250 x 353 mm"
+msgstr "B4 (ISO) 250 x 353 mm"
+
+#: ../src/common/paper.cpp:174
+msgid "B4 (JIS) Rotated 364 x 257 mm"
+msgstr "B4 (JIS) Paysage 364 x 257 mm"
+
+#: ../src/common/paper.cpp:128
+msgid "B4 Envelope, 250 x 353 mm"
+msgstr "Enveloppe B4, 250 x 353 mm"
+
+#: ../src/common/paper.cpp:110
+msgid "B4 sheet, 250 x 354 mm"
+msgstr "Feuille B4, 250 x 354 mm"
+
+#: ../src/common/paper.cpp:159
+msgid "B5 (ISO) Extra 201 x 276 mm"
+msgstr "B5 (ISO) Extra 201 x 276 mm"
+
+#: ../src/common/paper.cpp:175
+msgid "B5 (JIS) Rotated 257 x 182 mm"
+msgstr "B5 (JIS) Paysage 257 x 182 mm"
+
+#: ../src/common/paper.cpp:156
+msgid "B5 (JIS) Transverse 182 x 257 mm"
+msgstr "B5 (JIS), Paysage, 182 x 257 mm"
+
+#: ../src/common/paper.cpp:129
+msgid "B5 Envelope, 176 x 250 mm"
+msgstr "Enveloppe B5, 176 x 250 mm"
+
+#: ../src/common/paper.cpp:111
+msgid "B5 sheet, 182 x 257 millimeter"
+msgstr "Feuille B5, 182 x 257 mm"
+
+#: ../src/common/paper.cpp:183
+msgid "B6 (JIS) 128 x 182 mm"
+msgstr "B6 (JIS) 128 x 182 mm"
+
+#: ../src/common/paper.cpp:184
+msgid "B6 (JIS) Rotated 182 x 128 mm"
+msgstr "B6 (JIS) Paysage 182 x 128 mm"
+
+#: ../src/common/paper.cpp:130
+msgid "B6 Envelope, 176 x 125 mm"
+msgstr "Enveloppe B6, 176 x 125 mm"
+
+#: ../src/common/accelcmn.cpp:49
+msgid "BACK"
+msgstr "RETOUR"
+
+#: ../src/common/imagbmp.cpp:523 ../src/common/imagbmp.cpp:553
+#: ../src/common/imagbmp.cpp:568
+msgid "BMP: Couldn't allocate memory."
+msgstr "BMP : impossible d'allouer de la mémoire."
+
+#: ../src/common/imagbmp.cpp:97
+msgid "BMP: Couldn't save invalid image."
+msgstr "BMP : impossible de sauvegarder une image non valable."
+
+#: ../src/common/imagbmp.cpp:338
+msgid "BMP: Couldn't write RGB color map."
+msgstr "BMP : impossible d'écrire la palette de couleurs RGB."
+
+#: ../src/common/imagbmp.cpp:473
+msgid "BMP: Couldn't write data."
+msgstr "BMP : impossible d'écrire les données."
+
+#: ../src/common/imagbmp.cpp:239
+msgid "BMP: Couldn't write the file (Bitmap) header."
+msgstr "BMP : impossible d'écrire l'en-tête du fichier (Bitmap)."
+
+#: ../src/common/imagbmp.cpp:262
+msgid "BMP: Couldn't write the file (BitmapInfo) header."
+msgstr "BMP : impossible d'écrire l'en-tête du fichier (BitmapInfo)."
+
+#: ../src/common/imagbmp.cpp:133
+msgid "BMP: wxImage doesn't have own wxPalette."
+msgstr "BMP : wxImage n'a pas sa propre wxPalette."
+
+#: ../src/common/stockitem.cpp:142
+msgid "Back"
+msgstr "Retour"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:119
+#: ../src/richtext/richtextformatdlg.cpp:374
+msgid "Background"
+msgstr "Arrière plan"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:131
+msgid "Background &colour:"
+msgstr "&Couleur d'arrière plan :"
+
+#: ../src/osx/carbon/fontdlg.cpp:406
+msgid "Background colour"
+msgstr "Couleur d'arrière plan"
+
+#: ../src/common/fmapbase.cpp:160
+msgid "Baltic (ISO-8859-13)"
+msgstr "Balte (ISO-8859-13)"
+
+#: ../src/common/fmapbase.cpp:151
+msgid "Baltic (old) (ISO-8859-4)"
+msgstr "Balte (ancien) (ISO-8859-4)"
+
+#: ../src/richtext/richtextliststylepage.cpp:426
+msgid "Before a paragraph:"
+msgstr "Avant un paragraphe:"
+
+#: ../src/richtext/richtextliststylepage.cpp:489
+#: ../src/richtext/richtextbulletspage.cpp:294
+msgid "Bitmap"
+msgstr "Image bitmap"
+
+#: ../src/osx/carbon/dataview.cpp:2396
+msgid "Bitmap renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:333 ../src/richtext/richtextfontpage.cpp:337
+#: ../src/osx/carbon/fontdlg.cpp:540 ../src/common/stockitem.cpp:143
+msgid "Bold"
+msgstr "Gras"
+
+#: ../src/richtext/richtextborderspage.cpp:256
+#: ../src/richtext/richtextborderspage.cpp:389
+msgid "Border"
+msgstr "Bord"
+
+#: ../src/richtext/richtextformatdlg.cpp:368
+msgid "Borders"
+msgstr "Bords"
+
+#: ../src/richtext/richtextsizepage.cpp:288 ../src/common/stockitem.cpp:144
+msgid "Bottom"
+msgstr "Haut"
+
+#: ../src/generic/prntdlgg.cpp:893
+msgid "Bottom margin (mm):"
+msgstr "Marge de bas de page (mm) :"
+
+#: ../src/richtext/richtextbuffer.cpp:8919
+msgid "Box Properties"
+msgstr "Propriétés de la boîte"
+
+#: ../src/richtext/richtextstyles.cpp:1061
+msgid "Box styles"
+msgstr "Styles de boîte"
+
+#: ../src/common/filepickercmn.cpp:43 ../src/common/filepickercmn.cpp:44
+msgid "Browse"
+msgstr "Parcourir"
+
+#: ../src/richtext/richtextliststylepage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:195
+msgid "Bullet &Alignment:"
+msgstr "&Alignement des tirets:"
+
+#: ../src/richtext/richtextliststylepage.cpp:309
+msgid "Bullet style"
+msgstr "Style des tirets"
+
+#: ../src/richtext/richtextformatdlg.cpp:342
+msgid "Bullets"
+msgstr "Tirets"
+
+#: ../src/common/paper.cpp:99
+msgid "C sheet, 17 x 22 in"
+msgstr "Feuille C, 17 x 22 mm"
+
+#: ../src/generic/logg.cpp:520
+msgid "C&lear"
+msgstr "&Effacer"
+
+#: ../src/generic/fontdlgg.cpp:406
+msgid "C&olour:"
+msgstr "C&ouleur :"
+
+#: ../src/common/paper.cpp:124
+msgid "C3 Envelope, 324 x 458 mm"
+msgstr "Enveloppe C3, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:125
+msgid "C4 Envelope, 229 x 324 mm"
+msgstr "Enveloppe C4, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:123
+msgid "C5 Envelope, 162 x 229 mm"
+msgstr "Enveloppe C5, 162 x 229 mm"
+
+#: ../src/common/paper.cpp:126
+msgid "C6 Envelope, 114 x 162 mm"
+msgstr "Enveloppe C6, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:127
+msgid "C65 Envelope, 114 x 229 mm"
+msgstr "Enveloppe C65, 114 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:66
+msgid "CANCEL"
+msgstr "ANNULER"
+
+#: ../src/common/accelcmn.cpp:70
+msgid "CAPITAL"
+msgstr "MAJUSCULE"
+
+#: ../src/common/stockitem.cpp:146
+msgid "CD-Rom"
+msgstr "CD-Rom"
+
+#: ../src/html/chm.cpp:815 ../src/html/chm.cpp:874
+msgid "CHM handler currently supports only local files!"
+msgstr "Le gestionnaire CHM ne gère actuellement que les fichiers locaux."
+
+#: ../src/common/accelcmn.cpp:67
+msgid "CLEAR"
+msgstr "SUPPRIMER"
+
+#: ../src/common/accelcmn.cpp:111
+msgid "COMMAND"
+msgstr "COMMANDE"
+
+#: ../src/richtext/richtextfontpage.cpp:291
+msgid "Ca&pitals"
+msgstr "Majuscules"
+
+#: ../src/common/cmdproc.cpp:267
+msgid "Can't &Undo "
+msgstr "Impossible d'&annuler "
+
+#: ../src/common/image.cpp:2686
+msgid "Can't automatically determine the image format for non-seekable input."
+msgstr ""
+
+#: ../src/msw/registry.cpp:505
+#, c-format
+msgid "Can't close registry key '%s'"
+msgstr "Impossible de fermer la clé de registre « %s »"
+
+#: ../src/msw/registry.cpp:583
+#, c-format
+msgid "Can't copy values of unsupported type %d."
+msgstr "Impossible de copier les valeurs de type %d non géré."
+
+#: ../src/msw/registry.cpp:486
+#, c-format
+msgid "Can't create registry key '%s'"
+msgstr "Impossible de créer la clé de registre « %s »"
+
+#: ../src/msw/thread.cpp:696 ../src/os2/thread.cpp:494
+msgid "Can't create thread"
+msgstr "Impossible de créer le processus"
+
+#: ../src/msw/window.cpp:3793
+#, c-format
+msgid "Can't create window of class %s"
+msgstr "Impossible de créer la fenêtre de classe %s"
+
+#: ../src/msw/registry.cpp:776
+#, c-format
+msgid "Can't delete key '%s'"
+msgstr "Impossible d'effacer la clé « %s »"
+
+#: ../src/msw/iniconf.cpp:458 ../src/os2/iniconf.cpp:471
+#, c-format
+msgid "Can't delete the INI file '%s'"
+msgstr "Impossible d'effacer le fichier INI « %s »"
+
+#: ../src/msw/registry.cpp:804
+#, c-format
+msgid "Can't delete value '%s' from key '%s'"
+msgstr "Impossible d'effacer la valeur « %s » de la clé « %s »"
+
+#: ../src/msw/registry.cpp:1161
+#, c-format
+msgid "Can't enumerate subkeys of key '%s'"
+msgstr "Impossible d'énumérer les sous-clés de la clé « %s »"
+
+#: ../src/msw/registry.cpp:1116
+#, c-format
+msgid "Can't enumerate values of key '%s'"
+msgstr "Impossible d'énumérer les valeurs de la clé « %s »"
+
+#: ../src/msw/registry.cpp:1379
+#, c-format
+msgid "Can't export value of unsupported type %d."
+msgstr "Impossible d'exporter les valeurs de type non géré %d."
+
+#: ../src/common/ffile.cpp:236
+#, c-format
+msgid "Can't find current position in file '%s'"
+msgstr "Impossible de trouver la position courante dans le fichier « %s »"
+
+#: ../src/msw/registry.cpp:416
+#, c-format
+msgid "Can't get info about registry key '%s'"
+msgstr "Impossible d'obtenir des informations sur la clé de registre « %s »"
+
+#: ../src/common/zstream.cpp:346
+msgid "Can't initialize zlib deflate stream."
+msgstr "Impossible d'initialiser le flux de déchargement de zlib"
+
+#: ../src/common/zstream.cpp:185
+msgid "Can't initialize zlib inflate stream."
+msgstr "Impossible d'initialiser le flux de chargement de zlib"
+
+#: ../src/msw/fswatcher.cpp:432
+#, c-format
+msgid "Can't monitor non-existent directory \"%s\" for changes."
+msgstr ""
+
+#: ../src/msw/registry.cpp:452
+#, c-format
+msgid "Can't open registry key '%s'"
+msgstr "Impossible d'ouvrir la clé de registre « %s »"
+
+#: ../src/common/zstream.cpp:252
+#, c-format
+msgid "Can't read from inflate stream: %s"
+msgstr "Impossible de lire le flux de chargement : %s"
+
+#: ../src/common/zstream.cpp:244
+msgid "Can't read inflate stream: unexpected EOF in underlying stream."
+msgstr ""
+"Impossible de lire le flux de chargement : EOF inattendu dans le flux "
+"inférieur."
+
+#: ../src/msw/registry.cpp:1048
+#, c-format
+msgid "Can't read value of '%s'"
+msgstr "Impossible de lire la valeur de « %s »"
+
+#: ../src/msw/registry.cpp:877 ../src/msw/registry.cpp:909
+#: ../src/msw/registry.cpp:971
+#, c-format
+msgid "Can't read value of key '%s'"
+msgstr "Impossible de lire la valeur de la clé « %s »"
+
+#: ../src/common/image.cpp:2483
+#, c-format
+msgid "Can't save image to file '%s': unknown extension."
+msgstr ""
+"Impossible d'enregistrer l'image dans le fichier « %s » : extension inconnue."
+
+#: ../src/generic/logg.cpp:579 ../src/generic/logg.cpp:996
+msgid "Can't save log contents to file."
+msgstr "Impossible d'enregistrer le contenu du journal dans le fichier."
+
+#: ../src/msw/thread.cpp:652 ../src/os2/thread.cpp:477
+msgid "Can't set thread priority"
+msgstr "Impossible de spécifier la priorité du processus"
+
+#: ../src/msw/registry.cpp:895 ../src/msw/registry.cpp:939
+#: ../src/msw/registry.cpp:1065
+#, c-format
+msgid "Can't set value of '%s'"
+msgstr "Impossible de spécifier la valeur de « %s »"
+
+#: ../src/unix/utilsunx.cpp:357
+msgid "Can't write to child process's stdin"
+msgstr "Ne peut écrire sur l'entrée du processus enfant."
+
+#: ../src/common/zstream.cpp:427
+#, c-format
+msgid "Can't write to deflate stream: %s"
+msgstr "impossible d'écrire pour décharger le flux : %s"
+
+#: ../include/wx/msgdlg.h:274 ../src/generic/dirdlgg.cpp:107
+#: ../src/richtext/richtextstyledlg.cpp:300 ../src/common/stockitem.cpp:145
+#: ../src/msw/msgdlg.cpp:489 ../src/msw/progdlg.cpp:673
+#: ../src/gtk1/fontdlg.cpp:144 ../src/motif/msgdlg.cpp:196
+msgid "Cancel"
+msgstr "Annuler"
+
+#: ../src/os2/thread.cpp:116
+msgid "Cannot create mutex."
+msgstr "Impossible de créer le mutex."
+
+#: ../src/osx/carbon/dataview.cpp:895
+msgid "Cannot create new column's ID. Probably max. number of columns reached."
+msgstr ""
+"Impossible de créer un nouvel ID de colonne. Le nombre max. de colonnes a "
+"probablement été atteint."
+
+#: ../src/common/filefn.cpp:1336
+#, c-format
+msgid "Cannot enumerate files '%s'"
+msgstr "Impossible d'énumérer les fichiers « %s »"
+
+#: ../src/msw/dir.cpp:264
+#, c-format
+msgid "Cannot enumerate files in directory '%s'"
+msgstr "Impossible d'énumérer les fichiers dans le répertoire « %s »"
+
+#: ../src/msw/dialup.cpp:542
+#, c-format
+msgid "Cannot find active dialup connection: %s"
+msgstr "Impossible de trouver une connexion active : %s"
+
+#: ../src/msw/dialup.cpp:848
+msgid "Cannot find the location of address book file"
+msgstr "Impossible de trouver l'emplacement du fichier du manuel des adresses"
+
+#: ../src/msw/ole/automtn.cpp:562
+#, c-format
+msgid "Cannot get an active instance of \"%s\""
+msgstr "Impossible d'obtenir une instance active de : \"%s\""
+
+#: ../src/unix/threadpsx.cpp:1030
+#, c-format
+msgid "Cannot get priority range for scheduling policy %d."
+msgstr ""
+"Impossible d'obtenir une gamme de priorités pour la charte de planification "
+"%d."
+
+#: ../src/unix/utilsunx.cpp:988
+msgid "Cannot get the hostname"
+msgstr "Impossible d'obtenir le nom d'hôte"
+
+#: ../src/unix/utilsunx.cpp:1024
+msgid "Cannot get the official hostname"
+msgstr "Impossible d'obtenir le nom d'hôte officiel"
+
+#: ../src/msw/dialup.cpp:949
+msgid "Cannot hang up - no active dialup connection."
+msgstr "Impossible de raccrocher - pas de connexion active."
+
+#: ../include/wx/msw/ole/oleutils.h:52
+msgid "Cannot initialize OLE"
+msgstr "Impossible d'initialiser l'OLE"
+
+#: ../src/common/socket.cpp:847
+msgid "Cannot initialize sockets"
+msgstr "Impossible d'initialiser les sockets"
+
+#: ../src/msw/volume.cpp:620
+#, c-format
+msgid "Cannot load icon from '%s'."
+msgstr "Impossible de charger l'icône depuis « %s »."
+
+#: ../src/xrc/xmlres.cpp:361
+#, c-format
+msgid "Cannot load resources from '%s'."
+msgstr "Impossible de charger les ressources depuis « %s »."
+
+#: ../src/xrc/xmlres.cpp:746
+#, c-format
+msgid "Cannot load resources from file '%s'."
+msgstr "Impossible de charger les ressources du fichier « %s »."
+
+#: ../src/html/htmlfilt.cpp:137
+#, c-format
+msgid "Cannot open HTML document: %s"
+msgstr "Impossible d'ouvrir le document HTML : %s"
+
+#: ../src/html/helpdata.cpp:665
+#, c-format
+msgid "Cannot open HTML help book: %s"
+msgstr "Impossible d'ouvrir le manuel d'aide HTML : %s"
+
+#: ../src/html/helpdata.cpp:297
+#, c-format
+msgid "Cannot open contents file: %s"
+msgstr "Impossible d'ouvrir le fichier de table des matières : %s"
+
+#: ../src/generic/dcpsg.cpp:1751
+msgid "Cannot open file for PostScript printing!"
+msgstr "Impossible d'ouvrir le fichier pour une impression PostScript."
+
+#: ../src/html/helpdata.cpp:311
+#, c-format
+msgid "Cannot open index file: %s"
+msgstr "Impossible d'ouvrir le fichier d'index : %s"
+
+#: ../src/xrc/xmlres.cpp:728
+#, c-format
+msgid "Cannot open resources file '%s'."
+msgstr "Impossible d'ouvrir le fichier de ressources « %s »."
+
+#: ../src/html/helpwnd.cpp:1537
+msgid "Cannot print empty page."
+msgstr "Impossible d'imprimer une page vide."
+
+#: ../src/msw/volume.cpp:507
+#, c-format
+msgid "Cannot read typename from '%s'!"
+msgstr "Impossible de lire le nom de type de « %s »."
+
+#: ../src/os2/thread.cpp:527
+#, c-format
+msgid "Cannot resume thread %lu"
+msgstr "Impossible de reprendre le processus %lu"
+
+#: ../src/msw/thread.cpp:923
+#, c-format
+msgid "Cannot resume thread %lx"
+msgstr "Impossible de reprendre le thread %lx"
+
+#: ../src/unix/threadpsx.cpp:1011
+msgid "Cannot retrieve thread scheduling policy."
+msgstr "Impossible de récupérer la charte de planification des processus."
+
+#: ../src/common/intl.cpp:542
+#, c-format
+msgid "Cannot set locale to language \"%s\"."
+msgstr ""
+
+#: ../src/unix/threadpsx.cpp:831 ../src/msw/thread.cpp:569
+msgid "Cannot start thread: error writing TLS."
+msgstr "Impossible de lancer le processus : erreur lors de l'écriture de TLS."
+
+#: ../src/os2/thread.cpp:513
+#, c-format
+msgid "Cannot suspend thread %lu"
+msgstr "Impossible de suspendre le processus %lu"
+
+#: ../src/msw/thread.cpp:907
+#, c-format
+msgid "Cannot suspend thread %lx"
+msgstr "Impossible de suspendre le thread %lx"
+
+#: ../src/msw/thread.cpp:830
+msgid "Cannot wait for thread termination"
+msgstr "Impossible d'attendre la fin du processus"
+
+#: ../src/html/helpwnd.cpp:546
+msgid "Case sensitive"
+msgstr "Sensible à la casse"
+
+#: ../src/propgrid/manager.cpp:1495
+msgid "Categorized Mode"
+msgstr "Mode Catégories"
+
+#: ../src/richtext/richtextbuffer.cpp:9347
+msgid "Cell Properties"
+msgstr "Propriétés de Cellule"
+
+#: ../src/common/fmapbase.cpp:161
+msgid "Celtic (ISO-8859-14)"
+msgstr "Celtique (ISO-8859-14)"
+
+#: ../src/richtext/richtextindentspage.cpp:160
+#: ../src/richtext/richtextliststylepage.cpp:349
+msgid "Cen&tred"
+msgstr "Cen&tré"
+
+#: ../src/common/stockitem.cpp:170
+msgid "Centered"
+msgstr "Centré"
+
+#: ../src/common/fmapbase.cpp:149
+msgid "Central European (ISO-8859-2)"
+msgstr "Europe centrale (ISO-8859-2)"
+
+#: ../src/richtext/richtextliststylepage.cpp:250
+#: ../src/richtext/richtextbulletspage.cpp:200
+msgid "Centre"
+msgstr "Centre"
+
+#: ../src/richtext/richtextindentspage.cpp:162
+#: ../src/richtext/richtextindentspage.cpp:164
+#: ../src/richtext/richtextliststylepage.cpp:351
+#: ../src/richtext/richtextliststylepage.cpp:353
+msgid "Centre text."
+msgstr "Centrer le texte."
+
+#: ../src/richtext/richtextsizepage.cpp:287
+msgid "Centred"
+msgstr "Centré"
+
+#: ../src/richtext/richtextliststylepage.cpp:280
+#: ../src/richtext/richtextbulletspage.cpp:232
+msgid "Ch&oose..."
+msgstr "&Choisir..."
+
+#: ../src/richtext/richtextbuffer.cpp:4041
+msgid "Change List Style"
+msgstr "Changer la liste de styles"
+
+#: ../src/richtext/richtextbuffer.cpp:3392
+msgid "Change Object Style"
+msgstr "Changer le Style de l'Objet"
+
+#: ../src/richtext/richtextbuffer.cpp:3658
+#: ../src/richtext/richtextbuffer.cpp:7749
+msgid "Change Properties"
+msgstr "Changer les Propriétés"
+
+#: ../src/richtext/richtextbuffer.cpp:3209
+msgid "Change Style"
+msgstr "Changer le style"
+
+#: ../src/common/fileconf.cpp:372
+#, c-format
+msgid "Changes won't be saved to avoid overwriting the existing file \"%s\""
+msgstr ""
+"Les changements ne seront pas sauvés pour éviter l'écrasement du fichier "
+"existant « %s »"
+
+#: ../src/richtext/richtextstyles.cpp:1059
+msgid "Character styles"
+msgstr "Styles de caractères"
+
+#: ../src/richtext/richtextliststylepage.cpp:224
+#: ../src/richtext/richtextliststylepage.cpp:226
+#: ../src/richtext/richtextbulletspage.cpp:174
+#: ../src/richtext/richtextbulletspage.cpp:176
+msgid "Check to add a period after the bullet."
+msgstr "Cochez pour ajouter un point après le tiret."
+
+#: ../src/richtext/richtextliststylepage.cpp:238
+#: ../src/richtext/richtextliststylepage.cpp:240
+#: ../src/richtext/richtextbulletspage.cpp:188
+#: ../src/richtext/richtextbulletspage.cpp:190
+msgid "Check to add a right parenthesis."
+msgstr "Cocher pour ajouter une parenthèse à droite."
+
+#: ../src/richtext/richtextliststylepage.cpp:231
+#: ../src/richtext/richtextliststylepage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:181
+#: ../src/richtext/richtextbulletspage.cpp:183
+msgid "Check to enclose the bullet in parentheses."
+msgstr "Cocher pour mettre le tiret entre parenthèses."
+
+#: ../src/osx/carbon/fontdlg.cpp:542 ../src/osx/carbon/fontdlg.cpp:544
+msgid "Check to make the font bold."
+msgstr "Cochez pour mettre la police en gras."
+
+#: ../src/osx/carbon/fontdlg.cpp:549 ../src/osx/carbon/fontdlg.cpp:551
+msgid "Check to make the font italic."
+msgstr "Cochez pour mettre la police en italique."
+
+#: ../src/osx/carbon/fontdlg.cpp:558 ../src/osx/carbon/fontdlg.cpp:560
+msgid "Check to make the font underlined."
+msgstr "Cochez pour mettre la police en souligné."
+
+#: ../src/richtext/richtextstyledlg.cpp:289
+#: ../src/richtext/richtextstyledlg.cpp:291
+msgid "Check to restart numbering."
+msgstr "Cocher pour recommencer la numérotation."
+
+#: ../src/richtext/richtextfontpage.cpp:286
+#: ../src/richtext/richtextfontpage.cpp:288
+msgid "Check to show a line through the text."
+msgstr "Cochez pour afficher une ligne à travers le texte."
+
+#: ../src/richtext/richtextfontpage.cpp:293
+#: ../src/richtext/richtextfontpage.cpp:295
+msgid "Check to show the text in capitals."
+msgstr "Cochez pour afficher le texte en majuscules."
+
+#: ../src/richtext/richtextfontpage.cpp:300
+#: ../src/richtext/richtextfontpage.cpp:302
+msgid "Check to show the text in small capitals."
+msgstr "Cochez pour afficher le texte en petites majuscules."
+
+#: ../src/richtext/richtextfontpage.cpp:314
+#: ../src/richtext/richtextfontpage.cpp:316
+msgid "Check to show the text in subscript."
+msgstr "Cochez pour afficher le texte en indice."
+
+#: ../src/richtext/richtextfontpage.cpp:307
+#: ../src/richtext/richtextfontpage.cpp:309
+msgid "Check to show the text in superscript."
+msgstr "Cochez pour afficher le texte en exposant."
+
+#: ../src/msw/dialup.cpp:784
+msgid "Choose ISP to dial"
+msgstr "Choisir le FAI à appeler"
+
+#: ../src/propgrid/props.cpp:1643
+msgid "Choose a directory:"
+msgstr "Choisir un répertoire :"
+
+#: ../src/propgrid/props.cpp:1702
+msgid "Choose a file"
+msgstr "Choisir un fichier :"
+
+#: ../src/generic/colrdlgg.cpp:144 ../src/gtk/colordlg.cpp:63
+msgid "Choose colour"
+msgstr "Choisir la couleur"
+
+#: ../src/generic/fontpickerg.cpp:50 ../src/gtk/fontdlg.cpp:75
+#: ../src/gtk1/fontdlg.cpp:125
+msgid "Choose font"
+msgstr "Choisir la police"
+
+#: ../src/common/module.cpp:74
+#, c-format
+msgid "Circular dependency involving module \"%s\" detected."
+msgstr "Dépendance en boucle détectée, impliquant le module \"%s\"."
+
+#: ../src/aui/tabmdi.cpp:108 ../src/generic/mdig.cpp:97
+msgid "Cl&ose"
+msgstr "&Fermer"
+
+#: ../src/msw/ole/automtn.cpp:673
+msgid "Class not registered."
+msgstr "Classe non-enregistrée."
+
+#: ../src/common/stockitem.cpp:147
+msgid "Clear"
+msgstr "Effacer"
+
+#: ../src/generic/logg.cpp:520
+msgid "Clear the log contents"
+msgstr "Effacer le contenu du journal"
+
+#: ../src/richtext/richtextstyledlg.cpp:252
+#: ../src/richtext/richtextstyledlg.cpp:254
+msgid "Click to apply the selected style."
+msgstr "Cliquez pour appliquer le style sélectionné."
+
+#: ../src/richtext/richtextliststylepage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:283
+#: ../src/richtext/richtextbulletspage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:235
+msgid "Click to browse for a symbol."
+msgstr "Cliquer pour rechercher un symbole"
+
+#: ../src/osx/carbon/fontdlg.cpp:589 ../src/osx/carbon/fontdlg.cpp:591
+msgid "Click to cancel changes to the font."
+msgstr "Cliquez pour annuler les changements sur la police."
+
+#: ../src/generic/fontdlgg.cpp:472 ../src/generic/fontdlgg.cpp:491
+msgid "Click to cancel the font selection."
+msgstr "Cliquer pour annuler la sélection de la police."
+
+#: ../src/osx/carbon/fontdlg.cpp:570 ../src/osx/carbon/fontdlg.cpp:572
+msgid "Click to change the font colour."
+msgstr "Cliquez pour changer la couleur de la police."
+
+#: ../src/richtext/richtextfontpage.cpp:276
+#: ../src/richtext/richtextfontpage.cpp:278
+msgid "Click to change the text background colour."
+msgstr "Cliquez pour changer la couleur d'arrière-plan du texte."
+
+#: ../src/richtext/richtextfontpage.cpp:263
+#: ../src/richtext/richtextfontpage.cpp:265
+msgid "Click to change the text colour."
+msgstr "Cliquez pour changer la couleur du texte."
+
+#: ../src/richtext/richtextliststylepage.cpp:195
+#: ../src/richtext/richtextliststylepage.cpp:197
+msgid "Click to choose the font for this level."
+msgstr "Cliquez pour choisir la police de ce niveau."
+
+#: ../src/richtext/richtextstyledlg.cpp:279
+#: ../src/richtext/richtextstyledlg.cpp:281
+msgid "Click to close this window."
+msgstr "Cliquez pour fermer cette fenêtre."
+
+#: ../src/osx/carbon/fontdlg.cpp:596 ../src/osx/carbon/fontdlg.cpp:598
+msgid "Click to confirm changes to the font."
+msgstr "Cliquez pour confirmer les changements de la police."
+
+#: ../src/generic/fontdlgg.cpp:477 ../src/generic/fontdlgg.cpp:479
+#: ../src/generic/fontdlgg.cpp:484 ../src/generic/fontdlgg.cpp:486
+msgid "Click to confirm the font selection."
+msgstr "Cliquer pour confirmer la sélection de la police."
+
+#: ../src/richtext/richtextstyledlg.cpp:244
+#: ../src/richtext/richtextstyledlg.cpp:246
+msgid "Click to create a new box style."
+msgstr "Cliquez pour créer un nouveau style de boîte."
+
+#: ../src/richtext/richtextstyledlg.cpp:226
+#: ../src/richtext/richtextstyledlg.cpp:228
+msgid "Click to create a new character style."
+msgstr "Cliquer pour créer un nouveau style de caractère."
+
+#: ../src/richtext/richtextstyledlg.cpp:238
+#: ../src/richtext/richtextstyledlg.cpp:240
+msgid "Click to create a new list style."
+msgstr "Cliquez pour créer un nouveau style de liste."
+
+#: ../src/richtext/richtextstyledlg.cpp:232
+#: ../src/richtext/richtextstyledlg.cpp:234
+msgid "Click to create a new paragraph style."
+msgstr "Cliquer pour créer un nouveau style de paragraphe."
+
+#: ../src/richtext/richtexttabspage.cpp:137
+#: ../src/richtext/richtexttabspage.cpp:139
+msgid "Click to create a new tab position."
+msgstr "Cliquez pour créer une nouvelle position de tabulation."
+
+#: ../src/richtext/richtexttabspage.cpp:149
+#: ../src/richtext/richtexttabspage.cpp:151
+msgid "Click to delete all tab positions."
+msgstr "Cliquez pour supprimer toutes les positions de tabulation."
+
+#: ../src/richtext/richtextstyledlg.cpp:270
+#: ../src/richtext/richtextstyledlg.cpp:272
+msgid "Click to delete the selected style."
+msgstr "Cliquez suprimer le style sélectionné."
+
+#: ../src/richtext/richtexttabspage.cpp:143
+#: ../src/richtext/richtexttabspage.cpp:145
+msgid "Click to delete the selected tab position."
+msgstr "Cliquez pour supprimer la position de tabulation sélectionnée."
+
+#: ../src/richtext/richtextstyledlg.cpp:264
+#: ../src/richtext/richtextstyledlg.cpp:266
+msgid "Click to edit the selected style."
+msgstr "Cliquez éditer le style sélectionné."
+
+#: ../src/richtext/richtextstyledlg.cpp:258
+#: ../src/richtext/richtextstyledlg.cpp:260
+msgid "Click to rename the selected style."
+msgstr "Cliquez renommer le style sélectionné."
+
+#: ../src/generic/dbgrptg.cpp:97 ../src/generic/progdlgg.cpp:804
+#: ../src/generic/progdlgg.cpp:809 ../src/richtext/richtextstyledlg.cpp:277
+#: ../src/richtext/richtextsymboldlg.cpp:476 ../src/common/stockitem.cpp:148
+#: ../src/msw/progdlg.cpp:170 ../src/msw/progdlg.cpp:679
+#: ../src/html/helpdlg.cpp:90
+msgid "Close"
+msgstr "Fermer"
+
+#: ../src/aui/tabmdi.cpp:109 ../src/generic/mdig.cpp:98
+msgid "Close All"
+msgstr "Fermer tout"
+
+#: ../src/common/stockitem.cpp:266
+msgid "Close current document"
+msgstr "Fermer le document courant"
+
+#: ../src/generic/logg.cpp:522
+msgid "Close this window"
+msgstr "Fermer cette fenêtre"
+
+#: ../src/common/stockitem.cpp:193
+msgid "Color"
+msgstr "Couleur"
+
+#: ../src/richtext/richtextformatdlg.cpp:725
+msgid "Colour"
+msgstr "Couleur"
+
+#: ../src/msw/colordlg.cpp:156
+#, c-format
+msgid "Colour selection dialog failed with error %0lx."
+msgstr "Échec du dialogue de sélection de couleur avec l'erreur %0lx."
+
+#: ../src/osx/carbon/fontdlg.cpp:566
+msgid "Colour:"
+msgstr "Couleur :"
+
+#: ../src/osx/carbon/dataview.cpp:900
+msgid "Column could not be added."
+msgstr "La colonne n'a pas pu être ajoutée."
+
+#: ../src/osx/carbon/dataview.cpp:899
+msgid "Column description could not be initialized."
+msgstr "La description de la colonne n'a pas pu être initialisée."
+
+#: ../src/osx/carbon/dataview.cpp:1538 ../src/osx/carbon/dataview.cpp:1559
+msgid "Column index not found."
+msgstr "Index de colonne non trouvé."
+
+#: ../src/osx/carbon/dataview.cpp:1614
+msgid "Column width could not be determined"
+msgstr "La largeur de la colonne n'a pas pu être déterminée"
+
+#: ../src/osx/carbon/dataview.cpp:901
+msgid "Column width could not be set."
+msgstr "La largeur de la colonne n'a pas pu être définie."
+
+#: ../src/common/init.cpp:188
+#, c-format
+msgid ""
+"Command line argument %d couldn't be converted to Unicode and will be "
+"ignored."
+msgstr ""
+"L'argument %d de la ligne de commande n'a pas pu être converti en Unicode et "
+"sera ignoré."
+
+#: ../src/msw/fontdlg.cpp:119
+#, c-format
+msgid "Common dialog failed with error code %0lx."
+msgstr "Échec du dialogue commun avec le code d'erreur %0lx."
+
+#: ../src/gtk/window.cpp:4306
+msgid ""
+"Compositing not supported by this system, please enable it in your Window "
+"Manager."
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:1554
+msgid "Compressed HTML Help file (*.chm)|*.chm|"
+msgstr "Fichier HTML compilé (*.chm)|*.chm|"
+
+#: ../src/generic/dirctrlg.cpp:544
+msgid "Computer"
+msgstr "L'ordinateur"
+
+#: ../src/common/fileconf.cpp:965
+#, c-format
+msgid "Config entry name cannot start with '%c'."
+msgstr "Le nom d'entrée de configuration ne peut pas commencer par « %c »."
+
+#: ../src/gtk/filedlg.cpp:59
+msgid "Confirm"
+msgstr "Confirmer"
+
+#: ../src/msw/mimetype.cpp:739
+msgid "Confirm registry update"
+msgstr "Confirmer la mise à jour du registre"
+
+#: ../src/html/htmlwin.cpp:544
+msgid "Connecting..."
+msgstr "Connexion en cours..."
+
+#: ../src/html/helpwnd.cpp:482
+msgid "Contents"
+msgstr "Table des matières"
+
+#: ../src/common/strconv.cpp:2261
+#, c-format
+msgid "Conversion to charset '%s' doesn't work."
+msgstr "La conversion vers le jeu de caractères « %s » ne fonctionne pas."
+
+#: ../src/common/stockitem.cpp:149
+msgid "Convert"
+msgstr "Convertir"
+
+#: ../src/html/htmlwin.cpp:1057
+#, c-format
+msgid "Copied to clipboard:\"%s\""
+msgstr "Copié dans le presse-papiers « %s »"
+
+#: ../src/generic/prntdlgg.cpp:247
+msgid "Copies:"
+msgstr "Copies :"
+
+#: ../src/common/stockitem.cpp:150 ../src/stc/stc_i18n.cpp:18
+msgid "Copy"
+msgstr "Copier"
+
+#: ../src/common/stockitem.cpp:258
+msgid "Copy selection"
+msgstr "Copier la sélection"
+
+#: ../src/html/chm.cpp:718
+#, c-format
+msgid "Could not create temporary file '%s'"
+msgstr "Impossible de créer le fichier temporaire « %s »"
+
+#: ../src/osx/carbon/dataview.cpp:1285 ../src/osx/carbon/dataview.cpp:1672
+msgid "Could not determine column index."
+msgstr "Impossible de déterminer l'index de la colonne."
+
+#: ../src/osx/carbon/dataview.cpp:876
+msgid "Could not determine column's position"
+msgstr "Impossible de déterminer la position de la colonne"
+
+#: ../src/osx/carbon/dataview.cpp:843
+msgid "Could not determine number of columns."
+msgstr "Impossible de déterminer le nombre de colonnes."
+
+#: ../src/osx/carbon/dataview.cpp:975
+msgid "Could not determine number of items"
+msgstr "Impossible de déterminer le nombre d'éléments"
+
+#: ../src/html/chm.cpp:273
+#, c-format
+msgid "Could not extract %s into %s: %s"
+msgstr "Impossible d'extraire %s de %s : %s"
+
+#: ../src/generic/tabg.cpp:1048
+msgid "Could not find tab for id"
+msgstr "Impossible de trouver l'onglet pour l'identifiant"
+
+#: ../src/osx/carbon/dataview.cpp:2556 ../src/osx/carbon/dataview.cpp:2591
+#: ../src/osx/carbon/dataview.cpp:2615 ../src/osx/carbon/dataview.cpp:2636
+#: ../src/osx/carbon/dataview.cpp:2773
+msgid "Could not get header description."
+msgstr "Impossible d'obtenir la description de l'en-tête."
+
+#: ../src/osx/carbon/dataview.cpp:1169 ../src/osx/carbon/dataview.cpp:1195
+msgid "Could not get items."
+msgstr "Impossible d'obtenir les éléments."
+
+#: ../src/osx/carbon/dataview.cpp:2659 ../src/osx/carbon/dataview.cpp:2724
+#, fuzzy
+msgid "Could not get property flags."
+msgstr "Impossible de créer le fichier temporaire « %s »"
+
+#: ../src/osx/carbon/dataview.cpp:726
+msgid "Could not get selected items."
+msgstr "Impossible d'obtenir les éléments sélectionnés."
+
+#: ../src/html/chm.cpp:444
+#, c-format
+msgid "Could not locate file '%s'."
+msgstr "Impossible de localiser le fichier « %s »."
+
+#: ../src/osx/carbon/dataview.cpp:845
+msgid "Could not remove column."
+msgstr "Impossible de supprimer la colonne."
+
+#: ../src/osx/carbon/dataview.cpp:642
+msgid "Could not retrieve number of items"
+msgstr "Impossible de retrouver le nombre d'éléments"
+
+#: ../src/osx/carbon/dataview.cpp:2572
+msgid "Could not set alignment."
+msgstr "Impossible de définir l'alignement."
+
+#: ../src/osx/carbon/dataview.cpp:2803
+msgid "Could not set column width."
+msgstr "Impossible de définir la largeur de la colonne."
+
+#: ../src/common/filefn.cpp:1569
+msgid "Could not set current working directory"
+msgstr "Impossible de définir le répertoire de travail courant"
+
+#: ../src/osx/carbon/dataview.cpp:2775
+msgid "Could not set header description."
+msgstr "Impossible de définir la description de l'en-tête."
+
+#: ../src/osx/carbon/dataview.cpp:2596
+msgid "Could not set icon."
+msgstr "Impossible de définir l'icône."
+
+#: ../src/osx/carbon/dataview.cpp:2617
+msgid "Could not set maximum width."
+msgstr "Impossible de définir la largeur maximale."
+
+#: ../src/osx/carbon/dataview.cpp:2638
+msgid "Could not set minimum width."
+msgstr "Impossible de définir la largeur minimale."
+
+#: ../src/osx/carbon/dataview.cpp:2664 ../src/osx/carbon/dataview.cpp:2729
+#, fuzzy
+msgid "Could not set property flags."
+msgstr "Impossible de lancer l'impression."
+
+#: ../src/common/prntbase.cpp:1985
+msgid "Could not start document preview."
+msgstr "Impossible de lancer l'aperçu du document."
+
+#: ../src/generic/printps.cpp:178 ../src/msw/printwin.cpp:210
+#: ../src/gtk/print.cpp:1077
+msgid "Could not start printing."
+msgstr "Impossible de lancer l'impression."
+
+#: ../src/common/wincmn.cpp:2131
+msgid "Could not transfer data to window"
+msgstr "Impossible de transférer les données à la fenêtre"
+
+#: ../src/os2/thread.cpp:160
+msgid "Couldn't acquire a mutex lock"
+msgstr "Impossible de récupérer un verrou pour le mutex"
+
+#: ../src/msw/imaglist.cpp:166 ../src/msw/imaglist.cpp:197
+#: ../src/msw/imaglist.cpp:209 ../src/msw/dragimag.cpp:193
+#: ../src/msw/dragimag.cpp:232
+msgid "Couldn't add an image to the image list."
+msgstr "Impossible d'ajouter une image à la liste des images."
+
+#: ../src/msw/timer.cpp:134 ../src/os2/timer.cpp:113
+msgid "Couldn't create a timer"
+msgstr "Impossible de créer un minuteur"
+
+#: ../src/osx/carbon/overlay.cpp:122
+msgid "Couldn't create the overlay window"
+msgstr "Impossible de créer une fenêtre de recouvrement"
+
+#: ../src/common/translation.cpp:2015
+msgid "Couldn't enumerate translations"
+msgstr "Impossible d'énumérer les traductions"
+
+#: ../src/common/dynlib.cpp:152
+#, c-format
+msgid "Couldn't find symbol '%s' in a dynamic library"
+msgstr "Impossible de trouver le symbole « %s » dans la bibliothèque dynamique"
+
+#: ../src/gtk/print.cpp:2014
+msgid "Couldn't get hatch style from wxBrush."
+msgstr ""
+
+#: ../src/msw/thread.cpp:950
+msgid "Couldn't get the current thread pointer"
+msgstr "Impossible d'obtenir le pointeur du processus actuel"
+
+#: ../src/osx/carbon/overlay.cpp:129
+msgid "Couldn't init the context on the overlay window"
+msgstr "Impossible d'initialiser le contexte de la fenêtre de recouvrement"
+
+#: ../src/common/imaggif.cpp:263
+msgid "Couldn't initialize GIF hash table."
+msgstr "Impossible d'initialiser la tablme de hachage GIF."
+
+#: ../src/common/imagpng.cpp:657
+msgid "Couldn't load a PNG image - file is corrupted or not enough memory."
+msgstr ""
+"Impossible de charger une image PNG - fichier corrompu ou mémoire "
+"insuffisante"
+
+#: ../src/unix/sound.cpp:470
+#, c-format
+msgid "Couldn't load sound data from '%s'."
+msgstr "Impossible de charger les données sonores depuis « %s »."
+
+#: ../src/msw/dirdlg.cpp:441
+msgid "Couldn't obtain folder name"
+msgstr "Impossible d'obtenir le nom du dossier"
+
+#: ../src/unix/sound_sdl.cpp:229
+#, c-format
+msgid "Couldn't open audio: %s"
+msgstr "Impossible d'ouvrir le fichier audio : %s"
+
+#: ../src/msw/ole/dataobj.cpp:350
+#, c-format
+msgid "Couldn't register clipboard format '%s'."
+msgstr "Impossible d'enregistrer le format de presse-papiers « %s »."
+
+#: ../src/os2/thread.cpp:177
+msgid "Couldn't release a mutex"
+msgstr "Impossible de libérer un mutex"
+
+#: ../src/msw/listctrl.cpp:756
+#, c-format
+msgid "Couldn't retrieve information about list control item %d."
+msgstr ""
+"Impossible de récupérer des informations sur l'élément « %d » de contrôle "
+"des listes."
+
+#: ../src/common/imagpng.cpp:746 ../src/common/imagpng.cpp:757
+#: ../src/common/imagpng.cpp:767
+msgid "Couldn't save PNG image."
+msgstr "Impossible de sauvegarder l'image PNG."
+
+#: ../src/msw/thread.cpp:715
+msgid "Couldn't terminate thread"
+msgstr "Impossible d'arrêter le processus"
+
+#: ../src/common/xtistrm.cpp:170
+#, fuzzy, c-format
+msgid "Create Parameter %s not found in declared RTTI Parameters"
+msgstr "Paramètre de création non trouvé dans les paramètres RTTI déclarés"
+
+#: ../src/generic/dirdlgg.cpp:317
+msgid "Create directory"
+msgstr "Créer le répertoire"
+
+#: ../src/generic/filedlgg.cpp:228 ../src/generic/dirdlgg.cpp:131
+msgid "Create new directory"
+msgstr "Créer un nouveau répertoire"
+
+#: ../src/common/accelcmn.cpp:322
+msgid "Ctrl+"
+msgstr "Ctrl+"
+
+#: ../src/richtext/richtextctrl.cpp:325 ../src/osx/textctrl_osx.cpp:582
+#: ../src/common/stockitem.cpp:151 ../src/msw/textctrl.cpp:2283
+msgid "Cu&t"
+msgstr "Cou&per"
+
+#: ../src/generic/filectrlg.cpp:956
+msgid "Current directory:"
+msgstr "Répertoire courant :"
+
+#: ../src/gtk/print.cpp:759
+msgid "Custom size"
+msgstr "Taille personnalisée"
+
+#: ../src/common/headerctrlcmn.cpp:60
+msgid "Customize Columns"
+msgstr "Personnaliser les Colonnes"
+
+#: ../src/common/stockitem.cpp:151 ../src/stc/stc_i18n.cpp:17
+msgid "Cut"
+msgstr "Couper"
+
+#: ../src/common/stockitem.cpp:259
+msgid "Cut selection"
+msgstr "Couper la sélection"
+
+#: ../src/common/fmapbase.cpp:152
+msgid "Cyrillic (ISO-8859-5)"
+msgstr "Cyrillique (ISO-8859-5)"
+
+#: ../src/common/paper.cpp:100
+msgid "D sheet, 22 x 34 in"
+msgstr "Feuille D, 22 x 34 mm"
+
+#: ../src/msw/dde.cpp:708
+msgid "DDE poke request failed"
+msgstr "Échec de la demande de transfert DDE"
+
+#: ../src/common/accelcmn.cpp:79
+msgid "DECIMAL"
+msgstr "DECIMAL"
+
+#: ../src/common/accelcmn.cpp:47
+msgid "DEL"
+msgstr "EFFACER"
+
+#: ../src/common/accelcmn.cpp:48
+msgid "DELETE"
+msgstr "EFFACER"
+
+#: ../src/common/imagbmp.cpp:1092
+msgid "DIB Header: Encoding doesn't match bitdepth."
+msgstr "En-tête DIB : le codage ne correspond pas au nombre de bits par pixel."
+
+#: ../src/common/imagbmp.cpp:1040
+msgid "DIB Header: Image height > 32767 pixels for file."
+msgstr ""
+"En-tête DIB : hauteur de l'image supérieure à 32 767 pixels pour le fichier."
+
+#: ../src/common/imagbmp.cpp:1032
+msgid "DIB Header: Image width > 32767 pixels for file."
+msgstr ""
+"En-tête DIB : largeur de l'image supérieure à 32 767 pixels pour le fichier."
+
+#: ../src/common/imagbmp.cpp:1060
+msgid "DIB Header: Unknown bitdepth in file."
+msgstr "En-tête DIB : nombre de bits par pixel inconnu dans le fichier."
+
+#: ../src/common/imagbmp.cpp:1074
+msgid "DIB Header: Unknown encoding in file."
+msgstr "En-tête DIB : codage inconnu dans le fichier."
+
+#: ../src/common/accelcmn.cpp:80
+msgid "DIVIDE"
+msgstr "DIVISER"
+
+#: ../src/common/paper.cpp:122
+msgid "DL Envelope, 110 x 220 mm"
+msgstr "Enveloppe DL, 110 x 220 mm"
+
+#: ../src/common/accelcmn.cpp:59
+msgid "DOWN"
+msgstr "BAS"
+
+#: ../src/richtext/richtextborderspage.cpp:545
+msgid "Dashed"
+msgstr "Tirets"
+
+#: ../src/osx/carbon/dataview.cpp:1921
+msgid "Data object has invalid data format"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:2491
+msgid "Date renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:300
+#, c-format
+msgid "Debug report \"%s\""
+msgstr "Rapport de débogage « %s »"
+
+#: ../src/common/debugrpt.cpp:210
+msgid "Debug report couldn't be created."
+msgstr "Échec de la création du rapport de débogage."
+
+#: ../src/common/debugrpt.cpp:558
+msgid "Debug report generation has failed."
+msgstr "Échec de la création du rapport de débogage."
+
+#: ../src/generic/fontdlgg.cpp:323
+msgid "Decorative"
+msgstr "Décoratif"
+
+#: ../src/common/fmapbase.cpp:796
+msgid "Default encoding"
+msgstr "Codage par défaut"
+
+#: ../src/dfb/fontmgr.cpp:180
+msgid "Default font"
+msgstr "Police par défaut"
+
+#: ../src/generic/prntdlgg.cpp:510
+msgid "Default printer"
+msgstr "Imprimante par défaut"
+
+#: ../src/richtext/richtextbuffer.cpp:7841 ../src/common/stockitem.cpp:152
+#: ../src/stc/stc_i18n.cpp:20
+msgid "Delete"
+msgstr "Supprimer"
+
+#: ../src/richtext/richtexttabspage.cpp:148
+msgid "Delete A&ll"
+msgstr "&Tout supprimer"
+
+#: ../src/richtext/richtextbuffer.cpp:10637
+#, fuzzy
+msgid "Delete Column"
+msgstr "Supprimer la colonne"
+
+#: ../src/richtext/richtextbuffer.cpp:10587
+#, fuzzy
+msgid "Delete Row"
+msgstr "Supprimer la ligne"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+msgid "Delete Style"
+msgstr "Supprimer le style"
+
+#: ../src/richtext/richtextctrl.cpp:1231 ../src/richtext/richtextctrl.cpp:1452
+msgid "Delete Text"
+msgstr "Supprimer le texte"
+
+#: ../src/generic/editlbox.cpp:274
+msgid "Delete item"
+msgstr "Supprimer l'élément"
+
+#: ../src/common/stockitem.cpp:260
+msgid "Delete selection"
+msgstr "Effacer la sélection"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+#, c-format
+msgid "Delete style %s?"
+msgstr "Supprimer le style %s ?"
+
+#: ../src/unix/snglinst.cpp:295
+#, c-format
+msgid "Deleted stale lock file '%s'."
+msgstr "Suppression du fichier verrou périmé « %s »."
+
+#: ../src/common/module.cpp:124
+#, c-format
+msgid "Dependency \"%s\" of module \"%s\" doesn't exist."
+msgstr "La dépendance \"%s\" du module \"%s\" n'existe pas."
+
+#: ../src/common/stockitem.cpp:196
+msgid "Descending"
+msgstr "Décroissant"
+
+#: ../src/generic/dirctrlg.cpp:626
+msgid "Desktop"
+msgstr "Bureau"
+
+#: ../src/generic/aboutdlgg.cpp:70
+msgid "Developed by "
+msgstr "Développé par "
+
+#: ../src/generic/aboutdlgg.cpp:176
+msgid "Developers"
+msgstr "Développeurs"
+
+#: ../src/msw/dialup.cpp:393
+msgid ""
+"Dial up functions are unavailable because the remote access service (RAS) is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Les fonctions d'appel ne sont pas disponibles car le service d'accès à "
+"distance (RAS) n'est pas installé sur cet ordinateur. Veuillez l'installer."
+
+#: ../src/generic/tipdlg.cpp:230
+msgid "Did you know..."
+msgstr "Saviez-vous que..."
+
+#: ../src/dfb/wrapdfb.cpp:63
+#, c-format
+msgid "DirectFB error %d occurred."
+msgstr "L'erreur DirectFB %d est survenue."
+
+#: ../src/motif/filedlg.cpp:219
+msgid "Directories"
+msgstr "Dossiers"
+
+#: ../src/common/filefn.cpp:1251
+#, c-format
+msgid "Directory '%s' couldn't be created"
+msgstr "Le répertoire « %s » n'a pas pu être créé"
+
+#: ../src/common/filefn.cpp:1271
+#, c-format
+msgid "Directory '%s' couldn't be deleted"
+msgstr "Le répertoire « %s » n'a pas pu être supprimé"
+
+#: ../src/generic/dirdlgg.cpp:233
+msgid "Directory does not exist"
+msgstr "Répertoire inexistant"
+
+#: ../src/generic/filectrlg.cpp:1412
+msgid "Directory doesn't exist."
+msgstr "Répertoire inexistant."
+
+#: ../src/common/docview.cpp:455
+msgid "Discard changes and reload the last saved version?"
+msgstr ""
+"Ignorer les modifications et recharger la dernière version enregistrée ?"
+
+#: ../src/html/helpwnd.cpp:512
+msgid ""
+"Display all index items that contain given substring. Search is case "
+"insensitive."
+msgstr ""
+"Afficher tous les éléments de l'index qui contiennent une sous-chaîne "
+"donnée. Recherche non sensible à la casse."
+
+#: ../src/html/helpwnd.cpp:692
+msgid "Display options dialog"
+msgstr "Dialogue d'options de l'affichage"
+
+#: ../src/html/helpwnd.cpp:326
+msgid "Displays help as you browse the books on the left."
+msgstr "Affiche l'aide pendant que vous parcourez les livre sur la gauche."
+
+#: ../src/msw/mimetype.cpp:732
+msgid ""
+"Do you want to overwrite the command used to %s files with extension \"%s"
+"\" ?\n"
+"Current value is \n"
+"%s, \n"
+"New value is \n"
+"%s %1"
+msgstr ""
+"Voulez-vous remplacer la commande utilisée pour %s les fichiers avec "
+"l'extension « %s » ?\n"
+"La valeur actuelle est \n"
+"%s, \n"
+"La nouvelle valeur est \n"
+"%s %1"
+
+#: ../src/common/docview.cpp:531
+#, c-format
+msgid "Do you want to save changes to %s?"
+msgstr "Voulez-vous enregistrer les modifications vers %s ?"
+
+#: ../src/common/prntbase.cpp:525
+msgid "Document:"
+msgstr "Document :"
+
+#: ../src/generic/aboutdlgg.cpp:73
+msgid "Documentation by "
+msgstr "Documentation par "
+
+#: ../src/generic/aboutdlgg.cpp:180
+msgid "Documentation writers"
+msgstr "Rédacteurs de la documentation"
+
+#: ../src/common/sizer.cpp:2680
+msgid "Don't Save"
+msgstr "Ne pas enregistrer"
+
+#: ../src/msw/frame.cpp:122 ../src/html/htmlwin.cpp:611
+msgid "Done"
+msgstr "Fait"
+
+#: ../src/generic/progdlgg.cpp:481 ../src/msw/progdlg.cpp:407
+msgid "Done."
+msgstr "Fait."
+
+#: ../src/richtext/richtextborderspage.cpp:544
+msgid "Dotted"
+msgstr "Pointillé"
+
+#: ../src/richtext/richtextborderspage.cpp:546
+msgid "Double"
+msgstr "Double"
+
+#: ../src/common/paper.cpp:177
+msgid "Double Japanese Postcard Rotated 148 x 200 mm"
+msgstr "Carte postale japonaise double Paysage 148 x 200 mm"
+
+#: ../src/common/xtixml.cpp:273
+#, c-format
+msgid "Doubly used id : %d"
+msgstr "Identifiant utilisé deux fois : %d"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:153
+msgid "Down"
+msgstr "Bas"
+
+#: ../src/richtext/richtextctrl.cpp:814
+msgid "Drag"
+msgstr ""
+
+#: ../src/common/paper.cpp:101
+msgid "E sheet, 34 x 44 in"
+msgstr "Feuille E (34 x 44 pouces)"
+
+#: ../src/common/accelcmn.cpp:61
+msgid "END"
+msgstr "FIN"
+
+#: ../src/common/accelcmn.cpp:52
+msgid "ENTER"
+msgstr "ENTRÉE"
+
+#: ../src/unix/fswatcher_inotify.cpp:535
+#, fuzzy
+msgid "EOF while reading from inotify descriptor"
+msgstr "impossible de lire le descripteur de fichier %d"
+
+#: ../src/common/accelcmn.cpp:64
+msgid "ESC"
+msgstr "ÉCHAP"
+
+#: ../src/common/accelcmn.cpp:65
+msgid "ESCAPE"
+msgstr "ÉCHAPPEMENT"
+
+#: ../src/common/accelcmn.cpp:73
+msgid "EXECUTE"
+msgstr "ÉXÉCUTER"
+
+#: ../src/common/stockitem.cpp:154
+msgid "Edit"
+msgstr "Édition"
+
+#: ../src/generic/editlbox.cpp:272
+msgid "Edit item"
+msgstr "Éditer l'élément"
+
+#: ../include/wx/generic/progdlgg.h:84
+#, fuzzy
+msgid "Elapsed time:"
+msgstr "Temps écoulé : "
+
+#: ../src/richtext/richtextsizepage.cpp:353
+#: ../src/richtext/richtextsizepage.cpp:355
+#: ../src/richtext/richtextsizepage.cpp:465
+#: ../src/richtext/richtextsizepage.cpp:467
+msgid "Enable the height value."
+msgstr "Activer la valeur de hauteur."
+
+#: ../src/richtext/richtextsizepage.cpp:438
+#: ../src/richtext/richtextsizepage.cpp:440
+msgid "Enable the maximum width value."
+msgstr "Activer la valeur maximale de largeur."
+
+#: ../src/richtext/richtextsizepage.cpp:411
+#: ../src/richtext/richtextsizepage.cpp:413
+msgid "Enable the minimum height value."
+msgstr "Activer la valeur minimale de hauteur."
+
+#: ../src/richtext/richtextsizepage.cpp:384
+#: ../src/richtext/richtextsizepage.cpp:386
+msgid "Enable the minimum width value."
+msgstr "Activer la valeur minimale de largeur."
+
+#: ../src/richtext/richtextsizepage.cpp:319
+#: ../src/richtext/richtextsizepage.cpp:321
+msgid "Enable the width value."
+msgstr "Activer la valeur de largeur."
+
+#: ../src/richtext/richtextsizepage.cpp:280
+#: ../src/richtext/richtextsizepage.cpp:282
+msgid "Enable vertical alignment."
+msgstr "Activer l'alignement vertical."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:133
+#: ../src/richtext/richtextbackgroundpage.cpp:135
+msgid "Enables a background colour."
+msgstr "Active une couleur d'arrière plan."
+
+#: ../src/richtext/richtextstyledlg.cpp:931
+msgid "Enter a box style name"
+msgstr "Entrer le nom d'un style de boîte"
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+msgid "Enter a character style name"
+msgstr "Entrer le nom d'un style de caractère"
+
+#: ../src/richtext/richtextstyledlg.cpp:817
+msgid "Enter a list style name"
+msgstr "Entrer le nom d'un style de liste"
+
+#: ../src/richtext/richtextstyledlg.cpp:890
+msgid "Enter a new style name"
+msgstr "Entrer le nom d'un nouveau style"
+
+#: ../src/richtext/richtextstyledlg.cpp:651
+msgid "Enter a paragraph style name"
+msgstr "Entrer le nom d'un style de paragraphe"
+
+#: ../src/generic/dbgrptg.cpp:174
+#, c-format
+msgid "Enter command to open file \"%s\":"
+msgstr "Entrer la commande pour ouvrir le fichier « %s » :"
+
+#: ../src/generic/helpext.cpp:463
+msgid "Entries found"
+msgstr "Entrées trouvées"
+
+#: ../src/common/paper.cpp:143
+msgid "Envelope Invite 220 x 220 mm"
+msgstr "Enveloppe Invite 220 x 220 mm"
+
+#: ../src/common/config.cpp:473
+#, c-format
+msgid ""
+"Environment variables expansion failed: missing '%c' at position %u in '%s'."
+msgstr ""
+"Échec de l'expansion des variables d'environnement : « %c » manquant à la "
+"position %u dans « %s »."
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/dirctrlg.cpp:688
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:791
+#: ../src/generic/filectrlg.cpp:805 ../src/generic/filectrlg.cpp:821
+#: ../src/generic/filectrlg.cpp:1381 ../src/generic/filectrlg.cpp:1412
+#: ../src/gtk/filedlg.cpp:73 ../src/gtk1/fontdlg.cpp:74
+msgid "Error"
+msgstr "Erreur"
+
+#: ../src/unix/epolldispatcher.cpp:103
+msgid "Error closing epoll descriptor"
+msgstr "Erreur lors de la fermeture du descripteur epoll"
+
+#: ../src/unix/fswatcher_kqueue.cpp:114
+#, fuzzy
+msgid "Error closing kqueue instance"
+msgstr "Erreur lors de la création du répertoire"
+
+#: ../src/generic/dirdlgg.cpp:251
+msgid "Error creating directory"
+msgstr "Erreur lors de la création du répertoire"
+
+#: ../src/common/imagbmp.cpp:1103
+msgid "Error in reading image DIB."
+msgstr "Erreur lors de la lecture d'une image DIB."
+
+#: ../src/propgrid/propgrid.cpp:6563
+#, c-format
+msgid "Error in resource: %s"
+msgstr ""
+
+#: ../src/common/fileconf.cpp:453
+msgid "Error reading config options."
+msgstr "Erreur lors de la lecture des options de configuration."
+
+#: ../src/common/fileconf.cpp:1064
+msgid "Error saving user configuration data."
+msgstr ""
+"Erreur lors de l'enregistrement des données de configuration de "
+"l'utilisateur."
+
+#: ../src/gtk/print.cpp:671
+msgid "Error while printing: "
+msgstr "Erreur lors de l'impression :"
+
+#: ../src/common/log.cpp:223
+msgid "Error: "
+msgstr "Erreur : "
+
+#: ../src/common/fmapbase.cpp:150
+msgid "Esperanto (ISO-8859-3)"
+msgstr "Espéranto (ISO-8859-3)"
+
+#: ../include/wx/generic/progdlgg.h:85
+#, fuzzy
+msgid "Estimated time:"
+msgstr "Temps estimé : "
+
+#: ../src/unix/fswatcher_inotify.cpp:639
+msgid "Event queue overflowed"
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:234
+msgid "Executable files (*.exe)|*.exe|"
+msgstr "Fichiers exécutables (*.exe)|*.exe|"
+
+#: ../src/common/stockitem.cpp:155
+msgid "Execute"
+msgstr "Executer"
+
+#: ../src/msw/utilsexc.cpp:888
+#, c-format
+msgid "Execution of command '%s' failed"
+msgstr "Échec de l'exécution de la commande « %s »"
+
+#: ../src/os2/utilsexc.cpp:163
+#, c-format
+msgid "Execution of command '%s' failed with error: %ul"
+msgstr "Échec de l'exécution de la commande « %s » avec l'erreur : %ul"
+
+#: ../src/common/paper.cpp:106
+msgid "Executive, 7 1/4 x 10 1/2 in"
+msgstr "Executive (7,25 x 10,5 pouces)"
+
+#: ../src/msw/registry.cpp:1230
+#, c-format
+msgid ""
+"Exporting registry key: file \"%s\" already exists and won't be overwritten."
+msgstr ""
+"Exportation de la clé de registre : le fichier « %s » existe déjà et ne sera "
+"pas écrasé."
+
+#: ../src/common/fmapbase.cpp:195
+msgid "Extended Unix Codepage for Japanese (EUC-JP)"
+msgstr "Codepage Unix étendu pour le japonais (EUC-JP)"
+
+#: ../src/html/chm.cpp:725
+#, c-format
+msgid "Extraction of '%s' into '%s' failed."
+msgstr "Échec de l'extraction de « %s » de « %s »."
+
+#: ../src/common/accelcmn.cpp:238 ../src/common/accelcmn.cpp:333
+msgid "F"
+msgstr "F"
+
+#: ../src/propgrid/advprops.cpp:640
+#, fuzzy
+msgid "Face Name"
+msgstr "NouveauNom"
+
+#: ../src/unix/snglinst.cpp:269
+msgid "Failed to access lock file."
+msgstr "Échec de l'accès au fichier verrou."
+
+#: ../src/unix/epolldispatcher.cpp:116
+#, fuzzy, c-format
+msgid "Failed to add descriptor %d to epoll descriptor %d"
+msgstr "impossible d'écrire dans le descripteur de fichier %d"
+
+#: ../src/msw/dib.cpp:548
+#, c-format
+msgid "Failed to allocate %luKb of memory for bitmap data."
+msgstr "Échec de l'allocation de %lu Ko de mémoire pour les données bitmap."
+
+#: ../src/common/glcmn.cpp:87
+msgid "Failed to allocate colour for OpenGL"
+msgstr "Échec de l'allocation de couleur pour OpenGL"
+
+#: ../src/unix/displayx11.cpp:288
+msgid "Failed to change video mode"
+msgstr "Impossible de changer le mode vidéo"
+
+#: ../src/common/image.cpp:3139
+#, c-format
+msgid "Failed to check format of image file \"%s\"."
+msgstr "Échec de la vérification de format du fichier image « %s »."
+
+#: ../src/common/debugrpt.cpp:244
+#, c-format
+msgid "Failed to clean up debug report directory \"%s\""
+msgstr "Échec du nettoyage du répertoire « %s » des rapports de débogage"
+
+#: ../src/common/filename.cpp:211
+msgid "Failed to close file handle"
+msgstr "Échec de la fermeture du gestionnaire de fichier"
+
+#: ../src/unix/snglinst.cpp:334
+#, c-format
+msgid "Failed to close lock file '%s'"
+msgstr "Échec de la fermeture du fichier verrou « %s »"
+
+#: ../src/msw/clipbrd.cpp:115
+msgid "Failed to close the clipboard."
+msgstr "Échec de la fermeture du presse-papiers."
+
+#: ../src/x11/utils.cpp:204
+#, c-format
+msgid "Failed to close the display \"%s\""
+msgstr "Échec de la fermeture de l'écran \"%s\"."
+
+#: ../src/msw/dialup.cpp:818
+msgid "Failed to connect: missing username/password."
+msgstr "Échec de la connexion : nom d'utilisateur ou mot de passe manquant."
+
+#: ../src/msw/dialup.cpp:764
+msgid "Failed to connect: no ISP to dial."
+msgstr "Échec de la connexion : pas de FAI à appeler."
+
+#: ../src/common/textfile.cpp:200
+#, c-format
+msgid "Failed to convert file \"%s\" to Unicode."
+msgstr "Échec de la conversion du fichier « %s » en Unicode."
+
+#: ../src/generic/logg.cpp:976
+#, fuzzy
+msgid "Failed to copy dialog contents to the clipboard."
+msgstr "Échec de l'ouverture du presse-papiers."
+
+#: ../src/msw/registry.cpp:691
+#, c-format
+msgid "Failed to copy registry value '%s'"
+msgstr "Échec de la copie de la valeur de registre « %s »"
+
+#: ../src/msw/registry.cpp:700
+#, c-format
+msgid "Failed to copy the contents of registry key '%s' to '%s'."
+msgstr "Échec de la copie du contenu de la clé de registre « %s » vers « %s »"
+
+#: ../src/common/filefn.cpp:1058
+#, c-format
+msgid "Failed to copy the file '%s' to '%s'"
+msgstr "Échec de la copie du fichier « %s » vers « %s »"
+
+#: ../src/msw/registry.cpp:678
+#, c-format
+msgid "Failed to copy the registry subkey '%s' to '%s'."
+msgstr "Échec de la copie de la sous-clé de registre « %s » vers « %s »."
+
+#: ../src/msw/dde.cpp:1073
+msgid "Failed to create DDE string"
+msgstr "Échec de la création de la chaîne DDE"
+
+#: ../src/msw/mdi.cpp:590
+msgid "Failed to create MDI parent frame."
+msgstr "Échec de la création du cadre parent MDI."
+
+#: ../src/common/filename.cpp:1080
+msgid "Failed to create a temporary file name"
+msgstr "Échec de la création d'un nom de fichier temporaire."
+
+#: ../src/msw/utilsexc.cpp:235
+msgid "Failed to create an anonymous pipe"
+msgstr "Échec de la création d'un tube anonyme"
+
+#: ../src/msw/ole/automtn.cpp:522
+#, c-format
+msgid "Failed to create an instance of \"%s\""
+msgstr "Échec de la création d'une instance de « %s »"
+
+#: ../src/msw/dde.cpp:442
+#, c-format
+msgid "Failed to create connection to server '%s' on topic '%s'"
+msgstr ""
+"Échec de la création d'une connexion au serveur « %s » sur le sujet « %s »"
+
+#: ../src/msw/cursor.cpp:212
+msgid "Failed to create cursor."
+msgstr "Échec de la création d'un curseur."
+
+#: ../src/common/debugrpt.cpp:209
+#, c-format
+msgid "Failed to create directory \"%s\""
+msgstr "Échec de la création du répertoire « %s »"
+
+#: ../src/generic/dirdlgg.cpp:249
+#, c-format
+msgid ""
+"Failed to create directory '%s'\n"
+"(Do you have the required permissions?)"
+msgstr ""
+"Échec de la création du répertoire « %s »\n"
+"(Avez-vous les permissions requises ?)"
+
+#: ../src/unix/epolldispatcher.cpp:84
+msgid "Failed to create epoll descriptor"
+msgstr "Échec de la création du descripteur epoll"
+
+#: ../src/msw/mimetype.cpp:198
+#, c-format
+msgid "Failed to create registry entry for '%s' files."
+msgstr ""
+"Échec de la création d'une entrée dans le registre pour les fichiers « %s »."
+
+#: ../src/msw/fdrepdlg.cpp:442
+#, c-format
+msgid "Failed to create the standard find/replace dialog (error code %d)"
+msgstr ""
+"Échec de la création de la boîte de dialogue standard rechercher/remplacer "
+"(code d'erreur %d)"
+
+#: ../src/unix/wakeuppipe.cpp:52
+#, fuzzy
+msgid "Failed to create wake up pipe used by event loop."
+msgstr "Échec de la création d'une barre d'état."
+
+#: ../src/html/winpars.cpp:739
+#, c-format
+msgid "Failed to display HTML document in %s encoding"
+msgstr "Échec de l'affichage du document HTML avec le codage %s"
+
+#: ../src/msw/clipbrd.cpp:127
+msgid "Failed to empty the clipboard."
+msgstr "Échec du vidage du presse-papiers."
+
+#: ../src/unix/displayx11.cpp:265
+msgid "Failed to enumerate video modes"
+msgstr "Échec de l'énumération des modes vidéo"
+
+#: ../src/msw/dde.cpp:727
+msgid "Failed to establish an advise loop with DDE server"
+msgstr ""
+"Échec de l'établissement d'une boucle d'instructions avec le serveur DDE"
+
+#: ../src/msw/dialup.cpp:650 ../src/msw/dialup.cpp:884
+#, c-format
+msgid "Failed to establish dialup connection: %s"
+msgstr "Échec de l'établissement d'une connexion : %s"
+
+#: ../src/unix/utilsunx.cpp:617
+#, c-format
+msgid "Failed to execute '%s'\n"
+msgstr "Échec de l'exécution de « %s »\n"
+
+#: ../src/common/debugrpt.cpp:725
+msgid "Failed to execute curl, please install it in PATH."
+msgstr "Échec de l'exécution de curl, veuillez l'installer dans le PATH"
+
+#: ../src/msw/ole/automtn.cpp:505
+#, c-format
+msgid "Failed to find CLSID of \"%s\""
+msgstr "Échec de la recherche du CLSID de « %s »"
+
+#: ../src/common/regex.cpp:434 ../src/common/regex.cpp:482
+#, c-format
+msgid "Failed to find match for regular expression: %s"
+msgstr ""
+"Aucune correspondance pour l'expression régulière « %s » n'a été trouvée."
+
+#: ../src/msw/dialup.cpp:716
+#, c-format
+msgid "Failed to get ISP names: %s"
+msgstr "Échec de l'obtention des noms des FAI : %s"
+
+#: ../src/msw/ole/automtn.cpp:574
+#, c-format
+msgid "Failed to get OLE automation interface for \"%s\""
+msgstr "Échec de l'obtention de l'interface OLE Automatino pour « %s »"
+
+#: ../src/msw/clipbrd.cpp:747
+msgid "Failed to get data from the clipboard"
+msgstr "Échec de l'obtention des données du presse-papiers"
+
+#: ../src/common/time.cpp:249
+msgid "Failed to get the local system time"
+msgstr "Échec de l'obtention de l'heure locale du système"
+
+#: ../src/common/filefn.cpp:1453
+msgid "Failed to get the working directory"
+msgstr "Échec de l'obtention du répertoire courant"
+
+#: ../src/univ/theme.cpp:113
+msgid "Failed to initialize GUI: no built-in themes found."
+msgstr ""
+"Échec de l'initialisation de l'interface graphique : aucun thème préfabriqué "
+"n'a été trouvé."
+
+#: ../src/msw/helpchm.cpp:63
+msgid "Failed to initialize MS HTML Help."
+msgstr "Échec de l'initialisation de l'aide MS HTML."
+
+#: ../src/msw/glcanvas.cpp:892
+msgid "Failed to initialize OpenGL"
+msgstr "Échec de l'initialisation d'OpenGL"
+
+#: ../src/msw/dialup.cpp:879
+#, fuzzy, c-format
+msgid "Failed to initiate dialup connection: %s"
+msgstr "Échec de la terminaison de la connexion : %s"
+
+#: ../src/gtk/textctrl.cpp:1117
+msgid "Failed to insert text in the control."
+msgstr "Échec de l'insertion de texte dans le contrôle."
+
+#: ../src/unix/snglinst.cpp:241
+#, c-format
+msgid "Failed to inspect the lock file '%s'"
+msgstr "Échec de l'inspection du fichier verrou « %s »"
+
+#: ../src/unix/appunix.cpp:182
+msgid "Failed to install signal handler"
+msgstr "Échec de l'installation du gestionnaire de signal"
+
+#: ../src/unix/threadpsx.cpp:1162
+msgid ""
+"Failed to join a thread, potential memory leak detected - please restart the "
+"program"
+msgstr ""
+"Échec de l'adjonction d'un processus : fuite potentielle de mémoire "
+"détectée, redémarrez le programme"
+
+#: ../src/msw/utils.cpp:745
+#, c-format
+msgid "Failed to kill process %d"
+msgstr "Échec de l'arrêt du processus %d"
+
+#: ../src/common/image.cpp:2365
+#, c-format
+msgid "Failed to load bitmap \"%s\" from resources."
+msgstr "Échec du chargement du bitmap « %s » depuis les ressources."
+
+#: ../src/common/image.cpp:2374
+#, c-format
+msgid "Failed to load icon \"%s\" from resources."
+msgstr "Échec du chargement de l'icône « %s » depuis les ressources."
+
+#: ../src/common/iconbndl.cpp:182
+#, c-format
+msgid "Failed to load image %%d from file '%s'."
+msgstr "Échec du chargement de l'image %%d depuis le fichier « %s »."
+
+#: ../src/common/iconbndl.cpp:190
+#, c-format
+msgid "Failed to load image %d from stream."
+msgstr "Échec du chargement de l'image %d depuis le flux."
+
+#: ../src/common/image.cpp:2450 ../src/common/image.cpp:2469
+#, c-format
+msgid "Failed to load image from file \"%s\"."
+msgstr "Échec du chargement de l'image depuis le fichier « %s »."
+
+#: ../src/msw/enhmeta.cpp:97
+#, c-format
+msgid "Failed to load metafile from file \"%s\"."
+msgstr "Échec du chargement du métafichier depuis le fichier « %s »."
+
+#: ../src/msw/volume.cpp:327
+msgid "Failed to load mpr.dll."
+msgstr "Échec du chargement de mpr.dll"
+
+#: ../src/msw/utils.cpp:1120
+#, c-format
+msgid "Failed to load resource \"%s\"."
+msgstr "Échec du chargement de la ressource « %s »."
+
+#: ../src/common/dynlib.cpp:100
+#, c-format
+msgid "Failed to load shared library '%s'"
+msgstr "Échec du chargement de la bibliothèque partagée « %s »"
+
+#: ../src/msw/utils.cpp:1127
+#, c-format
+msgid "Failed to lock resource \"%s\"."
+msgstr "Échec du verrouillage de la ressource « %s »"
+
+#: ../src/unix/snglinst.cpp:198
+#, c-format
+msgid "Failed to lock the lock file '%s'"
+msgstr "Échec du verrouillage du fichier verrou « %s »"
+
+#: ../src/unix/epolldispatcher.cpp:136
+#, c-format
+msgid "Failed to modify descriptor %d in epoll descriptor %d"
+msgstr ""
+
+#: ../src/common/filename.cpp:2681
+#, c-format
+msgid "Failed to modify file times for '%s'"
+msgstr "Échec de la modification de la date du fichier « %s »"
+
+#: ../src/common/selectdispatcher.cpp:252
+msgid "Failed to monitor I/O channels"
+msgstr "Impossible de contrôler les canaux d'E/S"
+
+#: ../src/common/filename.cpp:194
+#, c-format
+msgid "Failed to open '%s' for reading"
+msgstr "Échec de l'ouverture de « %s » en lecture"
+
+#: ../src/common/filename.cpp:199
+#, c-format
+msgid "Failed to open '%s' for writing"
+msgstr "Échec de l'ouverture de « %s » en écriture"
+
+#: ../src/html/chm.cpp:141
+#, c-format
+msgid "Failed to open CHM archive '%s'."
+msgstr "Échec de l'ouverture de l'archive CHM « %s »."
+
+#: ../src/common/utilscmn.cpp:1135
+#, c-format
+msgid "Failed to open URL \"%s\" in default browser."
+msgstr "Échec de l'ouverture de l'URL « %s » avec le navigateur par défaut."
+
+#: ../include/wx/msw/private/fswatcher.h:92
+#, c-format
+msgid "Failed to open directory \"%s\" for monitoring."
+msgstr "Échec de l'ouverture du répertoire « %s » pour surveillance."
+
+#: ../src/x11/utils.cpp:223
+#, c-format
+msgid "Failed to open display \"%s\"."
+msgstr "Échec de l'ouverture de l'écran « %s »."
+
+#: ../src/common/filename.cpp:1115
+msgid "Failed to open temporary file."
+msgstr "Échec de l'ouverture d'un fichier temporaire."
+
+#: ../src/msw/clipbrd.cpp:94
+msgid "Failed to open the clipboard."
+msgstr "Échec de l'ouverture du presse-papiers."
+
+#: ../src/common/translation.cpp:1170
+#, c-format
+msgid "Failed to parse Plural-Forms: '%s'"
+msgstr "Écher de l'analyse des formes plurielles  : « %s »"
+
+#: ../src/unix/mediactrl.cpp:1268
+#, c-format
+msgid "Failed to prepare playing \"%s\"."
+msgstr "Échec de la préparation à la lecture « %s »."
+
+#: ../src/msw/clipbrd.cpp:647
+msgid "Failed to put data on the clipboard"
+msgstr "Échec de l'ajout de données dans le presse-papiers"
+
+#: ../src/unix/snglinst.cpp:278
+msgid "Failed to read PID from lock file."
+msgstr ""
+"Échec de la lecture du numéro de processus (PID) depuis le fichier verrou."
+
+#: ../src/common/fileconf.cpp:464
+msgid "Failed to read config options."
+msgstr "Échec de la lecture des options de configuration."
+
+#: ../src/common/docview.cpp:678
+#, c-format
+msgid "Failed to read document from the file \"%s\"."
+msgstr "Échec de la lecture du document depuis le fichier « %s »."
+
+#: ../src/dfb/evtloop.cpp:98
+#, fuzzy
+msgid "Failed to read event from DirectFB pipe"
+msgstr ""
+"Échec de la lecture du numéro de processus (PID) depuis le fichier verrou."
+
+#: ../src/unix/wakeuppipe.cpp:120
+#, fuzzy
+msgid "Failed to read from wake-up pipe"
+msgstr ""
+"Échec de la lecture du numéro de processus (PID) depuis le fichier verrou."
+
+#: ../src/unix/utilsunx.cpp:685
+msgid "Failed to redirect child process input/output"
+msgstr "Échec de la redirection des entrées et sorties du processus fils"
+
+#: ../src/msw/utilsexc.cpp:697
+msgid "Failed to redirect the child process IO"
+msgstr "Échec de la redirection des entrées et sorties du processus fils"
+
+#: ../src/msw/dde.cpp:293
+#, c-format
+msgid "Failed to register DDE server '%s'"
+msgstr "Échec de l'enregistrement du serveur DDE « %s »"
+
+#: ../src/common/fontmap.cpp:245
+#, c-format
+msgid "Failed to remember the encoding for the charset '%s'."
+msgstr "Échec du rappel du codage du jeu de caractères « %s »."
+
+#: ../src/common/debugrpt.cpp:227
+#, c-format
+msgid "Failed to remove debug report file \"%s\""
+msgstr "Échec de la suppression du fichier de rapport de débogage « %s »"
+
+#: ../src/unix/snglinst.cpp:322
+#, c-format
+msgid "Failed to remove lock file '%s'"
+msgstr "Échec de la suppression du fichier verrou « %s »"
+
+#: ../src/unix/snglinst.cpp:288
+#, c-format
+msgid "Failed to remove stale lock file '%s'."
+msgstr "Échec de la suppression du fichier verrou périmé « %s »."
+
+#: ../src/msw/registry.cpp:528
+#, c-format
+msgid "Failed to rename registry value '%s' to '%s'."
+msgstr "Échec du renommage de la valeur de registre « %s » en « %s »."
+
+#: ../src/common/filefn.cpp:1168
+#, c-format
+msgid ""
+"Failed to rename the file '%s' to '%s' because the destination file already "
+"exists."
+msgstr ""
+"Erreur lors du changement de nom de '%s' vers '%s': il existe déjà un "
+"fichier avec le nom de destination."
+
+#: ../src/msw/registry.cpp:633
+#, c-format
+msgid "Failed to rename the registry key '%s' to '%s'."
+msgstr "Échec du renommage de la clé de registre « %s » en « %s »."
+
+#: ../src/msw/clipbrd.cpp:497
+msgid "Failed to retrieve data from the clipboard."
+msgstr "Échec de la récupération de données du presse-papiers."
+
+#: ../src/common/filename.cpp:2777
+#, c-format
+msgid "Failed to retrieve file times for '%s'"
+msgstr "Échec de la récupération de la date du fichier « %s »"
+
+#: ../src/msw/dialup.cpp:487
+msgid "Failed to retrieve text of RAS error message"
+msgstr "Échec de la récupération du texte du message d'erreur RAS"
+
+#: ../src/msw/clipbrd.cpp:784
+msgid "Failed to retrieve the supported clipboard formats"
+msgstr "Échec de la récupération des formats de presse-papiers gérés"
+
+#: ../src/common/docview.cpp:649
+#, c-format
+msgid "Failed to save document to the file \"%s\"."
+msgstr "Échec de l'enregistrement du document dans le fichier « %s »."
+
+#: ../src/msw/dib.cpp:326
+#, c-format
+msgid "Failed to save the bitmap image to file \"%s\"."
+msgstr "Échec de l'enregistrement de l'image bitmap dans le fichier « %s »"
+
+#: ../src/msw/dde.cpp:768
+msgid "Failed to send DDE advise notification"
+msgstr "Échec de l'envoi d'une notification d'instructions au DDE"
+
+#: ../src/common/ftp.cpp:404
+#, c-format
+msgid "Failed to set FTP transfer mode to %s."
+msgstr "Échec de la configuration du mode de transfert FTP en %s."
+
+#: ../src/msw/clipbrd.cpp:373
+msgid "Failed to set clipboard data."
+msgstr "Échec de la configuration des données du presse-papiers."
+
+#: ../src/unix/snglinst.cpp:181
+#, c-format
+msgid "Failed to set permissions on lock file '%s'"
+msgstr "Échec de la configuration des permissions du fichier verrou « %s »"
+
+#: ../src/unix/utilsunx.cpp:674
+msgid "Failed to set process priority"
+msgstr "Échec de la définition de la priorité du processus"
+
+#: ../src/common/file.cpp:576
+msgid "Failed to set temporary file permissions"
+msgstr "Échec de la configuration des permissions du fichier temporaire"
+
+#: ../src/gtk/textctrl.cpp:1058
+msgid "Failed to set text in the text control."
+msgstr "Échec: le texte n'a pas pu être placé dans le contrôle de texte."
+
+#: ../src/unix/threadpsx.cpp:1293
+#, fuzzy, c-format
+msgid "Failed to set thread concurrency level to %lu"
+msgstr "Échec de la configuration de la priorité %d du processus."
+
+#: ../src/unix/threadpsx.cpp:1377 ../src/unix/threadpsx.cpp:1387
+#, c-format
+msgid "Failed to set thread priority %d."
+msgstr "Échec de la configuration de la priorité %d du processus."
+
+#: ../src/unix/utilsunx.cpp:791
+msgid "Failed to set up non-blocking pipe, the program might hang."
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:261
+#, c-format
+msgid "Failed to store image '%s' to memory VFS!"
+msgstr "Échec du stockage de l'image « %s » dans la mémoire VFS."
+
+#: ../src/dfb/evtloop.cpp:170
+msgid "Failed to switch DirectFB pipe to non-blocking mode"
+msgstr ""
+
+#: ../src/unix/wakeuppipe.cpp:59
+msgid "Failed to switch wake up pipe to non-blocking mode"
+msgstr ""
+
+#: ../src/unix/threadpsx.cpp:1569
+msgid "Failed to terminate a thread."
+msgstr "Échec de la terminaison d'un processus."
+
+#: ../src/msw/dde.cpp:746
+msgid "Failed to terminate the advise loop with DDE server"
+msgstr ""
+"Échec de la terminaison de la boucle d'instructions avec le serveur DDE"
+
+#: ../src/msw/dialup.cpp:959
+#, c-format
+msgid "Failed to terminate the dialup connection: %s"
+msgstr "Échec de la terminaison de la connexion : %s"
+
+#: ../src/common/filename.cpp:2696
+#, c-format
+msgid "Failed to touch the file '%s'"
+msgstr "Échec de la mise à jour de la date du fichier « %s »"
+
+#: ../src/unix/snglinst.cpp:328
+#, c-format
+msgid "Failed to unlock lock file '%s'"
+msgstr "Échec du déverrouillage du fichier verrou « %s »"
+
+#: ../src/msw/dde.cpp:314
+#, c-format
+msgid "Failed to unregister DDE server '%s'"
+msgstr "Échec du désenregistrement du serveur DDE « %s »"
+
+#: ../src/unix/epolldispatcher.cpp:155
+#, fuzzy, c-format
+msgid "Failed to unregister descriptor %d from epoll descriptor %d"
+msgstr "Échec de la récupération de données du presse-papiers."
+
+#: ../src/common/fileconf.cpp:1037
+msgid "Failed to update user configuration file."
+msgstr "Échec de la mise à jour du fichier de configuration utilisateur"
+
+#: ../src/common/debugrpt.cpp:738
+#, c-format
+msgid "Failed to upload the debug report (error code %d)."
+msgstr "Échec de l'envoi du rapport de bogue (code d'erreur %d)."
+
+#: ../src/unix/snglinst.cpp:168
+#, c-format
+msgid "Failed to write to lock file '%s'"
+msgstr "Échec de l'écriture dans le fichier verrou « %s »"
+
+#: ../src/propgrid/propgrid.cpp:172
+msgid "False"
+msgstr "Faux"
+
+#: ../src/propgrid/advprops.cpp:658
+msgid "Family"
+msgstr "Famille"
+
+#: ../src/common/stockitem.cpp:157 ../src/msw/wince/filedlgwce.cpp:121
+msgid "File"
+msgstr "Fichier"
+
+#: ../src/common/docview.cpp:666
+#, c-format
+msgid "File \"%s\" could not be opened for reading."
+msgstr "Le fichier « %s » n'a pas pu être ouvert en lecture."
+
+#: ../src/common/docview.cpp:643
+#, c-format
+msgid "File \"%s\" could not be opened for writing."
+msgstr "Le fichier « %s » n'a pas pu être ouvert en écriture."
+
+#: ../src/gtk/filedlg.cpp:56
+#, c-format
+msgid "File '%s' already exists, do you really want to overwrite it?"
+msgstr "Le fichier « %s » existe déjà, voulez-vous vraiment l'écraser ?"
+
+#: ../src/os2/filedlg.cpp:310
+#, c-format
+msgid ""
+"File '%s' already exists.\n"
+"Do you want to replace it?"
+msgstr ""
+"Le fichier « %s » existe déjà.\n"
+"Voulez-vous le remplacer ?"
+
+#: ../src/common/filefn.cpp:1207
+#, c-format
+msgid "File '%s' couldn't be removed"
+msgstr "Le fichier « %s » n'a pas pu être supprimé"
+
+#: ../src/common/filefn.cpp:1187
+#, c-format
+msgid "File '%s' couldn't be renamed '%s'"
+msgstr "Le fichier « %s » n'a pas pu être renommé « %s »"
+
+#: ../src/richtext/richtextctrl.cpp:2688 ../src/common/textcmn.cpp:921
+msgid "File couldn't be loaded."
+msgstr "Le fichier n'a pas pu être chargé."
+
+#: ../src/msw/filedlg.cpp:458
+#, c-format
+msgid "File dialog failed with error code %0lx."
+msgstr "Échec du dialogue de fichier avec le code d'erreur %0lx."
+
+#: ../src/common/docview.cpp:1771
+msgid "File error"
+msgstr "Erreur fichier"
+
+#: ../src/generic/dirctrlg.cpp:688 ../src/generic/filectrlg.cpp:805
+msgid "File name exists already."
+msgstr "Nom de fichier existant."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Files"
+msgstr "Fichiers"
+
+#: ../src/common/filefn.cpp:1761
+#, c-format
+msgid "Files (%s)"
+msgstr "Fichiers (%s)"
+
+#: ../src/motif/filedlg.cpp:218
+msgid "Filter"
+msgstr "Filtre"
+
+#: ../src/common/stockitem.cpp:158 ../src/html/helpwnd.cpp:500
+msgid "Find"
+msgstr "Trouver"
+
+#: ../src/common/stockitem.cpp:159
+msgid "First"
+msgstr "Premier"
+
+#: ../src/common/prntbase.cpp:1518
+msgid "First page"
+msgstr "Première page"
+
+#: ../src/richtext/richtextsizepage.cpp:521
+msgid "Fixed"
+msgstr "Fixe"
+
+#: ../src/html/helpwnd.cpp:1219
+msgid "Fixed font:"
+msgstr "Police de taille fixe :"
+
+#: ../src/html/helpwnd.cpp:1282
+msgid "Fixed size face.<br> <b>bold</b> <i>italic</i> "
+msgstr "Police de taille fixe.<br> <b>gras</b> <i>italique</i> "
+
+#: ../src/richtext/richtextsizepage.cpp:229
+#, fuzzy
+msgid "Floating"
+msgstr "Mise en forme"
+
+#: ../src/common/stockitem.cpp:160
+msgid "Floppy"
+msgstr "Disquette"
+
+#: ../src/common/paper.cpp:112
+msgid "Folio, 8 1/2 x 13 in"
+msgstr "Folio (8,5 x 13 pouces)"
+
+#: ../src/richtext/richtextformatdlg.cpp:324 ../src/osx/carbon/fontdlg.cpp:473
+#: ../src/common/stockitem.cpp:194
+msgid "Font"
+msgstr "Police de caractères"
+
+#: ../src/richtext/richtextfontpage.cpp:230
+msgid "Font &weight:"
+msgstr "Lar&geur de police."
+
+#: ../src/html/helpwnd.cpp:1220
+msgid "Font size:"
+msgstr "Taille de la police :"
+
+#: ../src/richtext/richtextfontpage.cpp:217
+msgid "Font st&yle:"
+msgstr "St&yle de la police :"
+
+#: ../src/osx/carbon/fontdlg.cpp:515
+msgid "Font:"
+msgstr "Police de caractères:"
+
+#: ../src/dfb/fontmgr.cpp:198
+#, c-format
+msgid "Fonts index file %s disappeared while loading fonts."
+msgstr ""
+
+#: ../src/unix/utilsunx.cpp:651
+msgid "Fork failed"
+msgstr "Échec du clonage"
+
+#: ../src/common/stockitem.cpp:161
+msgid "Forward"
+msgstr "Suivant"
+
+#: ../src/common/xtixml.cpp:235
+msgid "Forward hrefs are not supported"
+msgstr "Transferts href non gérés"
+
+#: ../src/html/helpwnd.cpp:888
+#, c-format
+msgid "Found %i matches"
+msgstr "A trouvé %i correspondances"
+
+#: ../src/generic/prntdlgg.cpp:238
+msgid "From:"
+msgstr "De :"
+
+#: ../src/common/imaggif.cpp:160
+msgid "GIF: Invalid gif index."
+msgstr "GIF : index gif non valable."
+
+#: ../src/common/imaggif.cpp:150
+msgid "GIF: data stream seems to be truncated."
+msgstr "GIF : le flux des données semble être tronqué."
+
+#: ../src/common/imaggif.cpp:134
+msgid "GIF: error in GIF image format."
+msgstr "GIF : erreur dans le format de l'image GIF."
+
+#: ../src/common/imaggif.cpp:137
+msgid "GIF: not enough memory."
+msgstr "GIF : mémoire insuffisante."
+
+#: ../src/common/imaggif.cpp:140
+msgid "GIF: unknown error!!!"
+msgstr "GIF : erreur non référencée."
+
+#: ../src/gtk/window.cpp:4288
+msgid ""
+"GTK+ installed on this machine is too old to support screen compositing, "
+"please install GTK+ 2.12 or later."
+msgstr ""
+
+#: ../src/univ/themes/gtk.cpp:525
+msgid "GTK+ theme"
+msgstr "Thème GTK+"
+
+#: ../src/common/preferencescmn.cpp:39
+msgid "General"
+msgstr "Général"
+
+#: ../src/common/prntbase.cpp:243
+msgid "Generic PostScript"
+msgstr "Fichier PostScript"
+
+#: ../src/common/paper.cpp:136
+msgid "German Legal Fanfold, 8 1/2 x 13 in"
+msgstr "Légal allemand en accordéon (8,5 x 13 pouces)"
+
+#: ../src/common/paper.cpp:135
+msgid "German Std Fanfold, 8 1/2 x 12 in"
+msgstr "Standard allemand en accordéon (8,5 x 12 pouces)"
+
+#: ../include/wx/xtiprop.h:188
+msgid "GetProperty called w/o valid getter"
+msgstr "GetProperty appelé sans récupérateur valable"
+
+#: ../include/wx/xtiprop.h:266
+msgid "GetPropertyCollection called on a generic accessor"
+msgstr "GetPropertyCollection appelé sur un assesseur générique"
+
+#: ../include/wx/xtiprop.h:206
+msgid "GetPropertyCollection called w/o valid collection getter"
+msgstr "GetPropertyCollection appelé sans récupérateur de collection valable"
+
+#: ../src/html/helpwnd.cpp:673
+msgid "Go back"
+msgstr "Revenir"
+
+#: ../src/html/helpwnd.cpp:674
+msgid "Go forward"
+msgstr "Continuer"
+
+#: ../src/html/helpwnd.cpp:676
+msgid "Go one level up in document hierarchy"
+msgstr "Monter au niveau supérieur dans la hiérarchie du document"
+
+#: ../src/generic/filedlgg.cpp:223 ../src/generic/dirdlgg.cpp:136
+msgid "Go to home directory"
+msgstr "Aller au répertoire personnel"
+
+#: ../src/generic/filedlgg.cpp:219
+msgid "Go to parent directory"
+msgstr "Aller au répertoire parent"
+
+#: ../src/generic/aboutdlgg.cpp:76
+msgid "Graphics art by "
+msgstr "Arts graphiques par "
+
+#: ../src/common/fmapbase.cpp:154
+msgid "Greek (ISO-8859-7)"
+msgstr "Grec (ISO-8859-7)"
+
+#: ../src/richtext/richtextborderspage.cpp:547
+msgid "Groove"
+msgstr ""
+
+#: ../src/common/zstream.cpp:158 ../src/common/zstream.cpp:318
+msgid "Gzip not supported by this version of zlib"
+msgstr "Gzip n'est pas géré par cette version de zlib"
+
+#: ../src/common/accelcmn.cpp:75
+msgid "HELP"
+msgstr "AIDE"
+
+#: ../src/common/accelcmn.cpp:60
+msgid "HOME"
+msgstr "DEBUT"
+
+#: ../src/html/helpwnd.cpp:1552
+msgid "HTML Help Project (*.hhp)|*.hhp|"
+msgstr "Projet d'aide HTML (*.hhp)|*.hhp|"
+
+#: ../src/html/htmlwin.cpp:659
+#, c-format
+msgid "HTML anchor %s does not exist."
+msgstr "Ancre HTML %s inexistante."
+
+#: ../src/html/helpwnd.cpp:1550
+msgid "HTML files (*.html;*.htm)|*.html;*.htm|"
+msgstr "Fichiers HTML (*.html;*.htm)|*.html;*.htm|"
+
+#: ../src/common/stockitem.cpp:162
+msgid "Harddisk"
+msgstr "Disque-dur"
+
+#: ../src/common/fmapbase.cpp:155
+msgid "Hebrew (ISO-8859-8)"
+msgstr "Hébreu (ISO-8859-8)"
+
+#: ../include/wx/msgdlg.h:275 ../src/osx/button_osx.cpp:39
+#: ../src/common/stockitem.cpp:163 ../src/html/helpdlg.cpp:66
+#: ../src/html/helpfrm.cpp:116
+msgid "Help"
+msgstr "Aide"
+
+#: ../src/html/helpwnd.cpp:1213
+msgid "Help Browser Options"
+msgstr "Aide Options Navigateur"
+
+#: ../src/generic/helpext.cpp:458 ../src/generic/helpext.cpp:459
+msgid "Help Index"
+msgstr "Aide Index"
+
+#: ../src/html/helpwnd.cpp:1534
+msgid "Help Printing"
+msgstr "Aide Impression"
+
+#: ../src/html/helpwnd.cpp:814
+msgid "Help Topics"
+msgstr "Sujets Aide"
+
+#: ../src/html/helpwnd.cpp:1551
+msgid "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+msgstr "Livres d'aide (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+
+#: ../src/generic/helpext.cpp:271
+#, c-format
+msgid "Help directory \"%s\" not found."
+msgstr "Dossier d'aide \"%s\" non trouvé."
+
+#: ../src/generic/helpext.cpp:279
+#, c-format
+msgid "Help file \"%s\" not found."
+msgstr "fichier d'aide « %s » non trouvé."
+
+#: ../src/html/helpctrl.cpp:63
+#, c-format
+msgid "Help: %s"
+msgstr "Aide : %s"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:649
+#, c-format
+msgid "Hide %s"
+msgstr "Cacher %s"
+
+#: ../src/osx/menu_osx.cpp:604 ../src/osx/menu_osx.cpp:651
+msgid "Hide Others"
+msgstr ""
+
+#: ../src/generic/infobar.cpp:85
+msgid "Hide this notification message."
+msgstr "Cacher ce message de notification."
+
+#: ../src/generic/dirdlgg.cpp:98 ../src/common/stockitem.cpp:164
+msgid "Home"
+msgstr "Répertoire personnel"
+
+#: ../src/generic/dirctrlg.cpp:624
+msgid "Home directory"
+msgstr "Répertoire personnel"
+
+#: ../src/richtext/richtextsizepage.cpp:253
+#: ../src/richtext/richtextsizepage.cpp:255
+msgid "How the object will float relative to the text."
+msgstr ""
+
+#: ../src/common/imagbmp.cpp:1118
+msgid "ICO: Error in reading mask DIB."
+msgstr "ICO : erreur à la lecture du masque DIB."
+
+#: ../src/common/imagbmp.cpp:1233 ../src/common/imagbmp.cpp:1294
+#: ../src/common/imagbmp.cpp:1305 ../src/common/imagbmp.cpp:1318
+#: ../src/common/imagbmp.cpp:1363 ../src/common/imagbmp.cpp:1375
+#: ../src/common/imagbmp.cpp:1386
+msgid "ICO: Error writing the image file!"
+msgstr "ICO : erreur à l'écriture du fichier image."
+
+#: ../src/common/imagbmp.cpp:1198
+msgid "ICO: Image too tall for an icon."
+msgstr "ICO : image trop grande pour une icône."
+
+#: ../src/common/imagbmp.cpp:1206
+msgid "ICO: Image too wide for an icon."
+msgstr "ICO : image trop large pour une icône."
+
+#: ../src/common/imagbmp.cpp:1466
+msgid "ICO: Invalid icon index."
+msgstr "ICO : index de l'icône non valable."
+
+#: ../src/common/imagiff.cpp:759
+msgid "IFF: data stream seems to be truncated."
+msgstr "IFF : le flux de données semble être tronqué."
+
+#: ../src/common/imagiff.cpp:743
+msgid "IFF: error in IFF image format."
+msgstr "IFF : erreur dans le format de l'image IFF."
+
+#: ../src/common/imagiff.cpp:746
+msgid "IFF: not enough memory."
+msgstr "IFF : mémoire insuffisante."
+
+#: ../src/common/imagiff.cpp:749
+msgid "IFF: unknown error!!!"
+msgstr "IFF : erreur inconnue."
+
+#: ../src/common/accelcmn.cpp:50
+msgid "INS"
+msgstr "INS"
+
+#: ../src/common/accelcmn.cpp:51
+msgid "INSERT"
+msgstr "INSERTION"
+
+#: ../src/common/fmapbase.cpp:197
+msgid "ISO-2022-JP"
+msgstr "ISO-2022-JP"
+
+#: ../src/osx/carbon/dataview.cpp:2420
+msgid "Icon & text renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/html/htmprint.cpp:282
+msgid ""
+"If possible, try changing the layout parameters to make the printout more "
+"narrow."
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:358
+msgid ""
+"If you have any additional information pertaining to this bug\n"
+"report, please enter it here and it will be joined to it:"
+msgstr ""
+"Si vous avez des informations supplémentaires concernant ce rapport\n"
+"de bogue, veuillez les saisir ici pour qu'elles soient incluses :"
+
+#: ../src/generic/dbgrptg.cpp:324
+msgid ""
+"If you wish to suppress this debug report completely, please choose the "
+"\"Cancel\" button,\n"
+"but be warned that it may hinder improving the program, so if\n"
+"at all possible please do continue with the report generation.\n"
+msgstr ""
+"Si vous voulez supprimer entièrement ce rapport de débogage, veuillez\n"
+"choisir le bouton « Annuler », mais cela peut empêcher l'amélioration du\n"
+"programme, donc veuillez si possible continuer la création de ce rapport.\n"
+
+#: ../src/msw/registry.cpp:1395
+#, c-format
+msgid "Ignoring value \"%s\" of the key \"%s\"."
+msgstr "Valeur « %s » de la clé « %s » ignorée."
+
+#: ../src/common/xtistrm.cpp:299
+msgid "Illegal Object Class (Non-wxEvtHandler) as Event Source"
+msgstr ""
+"Classe d'objet non valable en tant que source d'événement (Non-wxEvtHandler)"
+
+#: ../src/common/xti.cpp:513
+msgid "Illegal Parameter Count for ConstructObject Method"
+msgstr "Nombre de paramètres illégal pour la méthode ConstructObject"
+
+#: ../src/common/xti.cpp:501
+msgid "Illegal Parameter Count for Create Method"
+msgstr "Nombre de paramètres illégal pour la méthode Create"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/filectrlg.cpp:791
+msgid "Illegal directory name."
+msgstr "Nom de répertoire illégal."
+
+#: ../src/generic/filectrlg.cpp:1380
+msgid "Illegal file specification."
+msgstr "Spécification de fichier illégale."
+
+#: ../src/common/image.cpp:2158
+msgid "Image and mask have different sizes."
+msgstr "L'image et le masque sont de tailles différentes."
+
+#: ../src/common/image.cpp:2609
+#, c-format
+msgid "Image file is not of type %d."
+msgstr "Le fichier image n'est pas du type %d."
+
+#: ../src/common/image.cpp:2739
+#, c-format
+msgid "Image is not of type %s."
+msgstr "Le fichier image n'est pas du type %s."
+
+#: ../src/msw/textctrl.cpp:399
+msgid ""
+"Impossible to create a rich edit control, using simple text control instead. "
+"Please reinstall riched32.dll"
+msgstr ""
+"Impossible de créer un contrôle d'édition riche, va utiliser un contrôle de "
+"texte simple à la place. Veuillez réinstaller riched32.dll"
+
+#: ../src/unix/utilsunx.cpp:307
+msgid "Impossible to get child process input"
+msgstr "Impossible d'obtenir l'entrée du processus fils"
+
+#: ../src/common/filefn.cpp:1074
+#, c-format
+msgid "Impossible to get permissions for file '%s'"
+msgstr "Impossible d'obtenir les permissions du fichier « %s »"
+
+#: ../src/common/filefn.cpp:1088
+#, c-format
+msgid "Impossible to overwrite the file '%s'"
+msgstr "Impossible d'écraser le fichier « %s »"
+
+#: ../src/common/filefn.cpp:1142
+#, c-format
+msgid "Impossible to set permissions for the file '%s'"
+msgstr "Impossible de configurer les permissions du fichier « %s »"
+
+#: ../src/common/gifdecod.cpp:818
+#, c-format
+msgid "Incorrect GIF frame size (%u, %d) for the frame #%u"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:624
+msgid "Incorrect number of arguments."
+msgstr "Nombre d'arguments incorrect."
+
+#: ../src/common/stockitem.cpp:165
+msgid "Indent"
+msgstr "Indenter"
+
+#: ../src/richtext/richtextformatdlg.cpp:330
+msgid "Indents && Spacing"
+msgstr "Indentations && Espacements"
+
+#: ../src/common/stockitem.cpp:166 ../src/html/helpwnd.cpp:525
+msgid "Index"
+msgstr "Index"
+
+#: ../src/common/fmapbase.cpp:159
+msgid "Indian (ISO-8859-12)"
+msgstr "Indien (ISO-8859-12)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "Info"
+msgstr "Info"
+
+#: ../src/common/init.cpp:276
+msgid "Initialization failed in post init, aborting."
+msgstr "L'initialisation a échoué dans post init; abandon."
+
+#: ../src/richtext/richtextsymboldlg.cpp:472
+msgid "Insert"
+msgstr "Insérer"
+
+#: ../src/richtext/richtextbuffer.cpp:7687
+msgid "Insert Field"
+msgstr "Insérer un Champ"
+
+#: ../src/richtext/richtextbuffer.cpp:7598
+#: ../src/richtext/richtextbuffer.cpp:8551
+msgid "Insert Image"
+msgstr "Insérer une image"
+
+#: ../src/richtext/richtextbuffer.cpp:7645
+msgid "Insert Object"
+msgstr "Insérer un Objet"
+
+#: ../src/richtext/richtextctrl.cpp:1172 ../src/richtext/richtextctrl.cpp:1362
+#: ../src/richtext/richtextbuffer.cpp:7440
+#: ../src/richtext/richtextbuffer.cpp:7470
+#: ../src/richtext/richtextbuffer.cpp:7514
+msgid "Insert Text"
+msgstr "Insérer du texte"
+
+#: ../src/richtext/richtextindentspage.cpp:295
+#: ../src/richtext/richtextindentspage.cpp:297
+msgid "Inserts a page break before the paragraph."
+msgstr "Insère un saut de page avant le paragraphe."
+
+#: ../src/richtext/richtextborderspage.cpp:549
+#, fuzzy
+msgid "Inset"
+msgstr "Insérer"
+
+#: ../src/gtk/app.cpp:429
+#, c-format
+msgid "Invalid GTK+ command line option, use \"%s --help\""
+msgstr ""
+
+#: ../src/common/imagtiff.cpp:314
+msgid "Invalid TIFF image index."
+msgstr "Index d'image TIFF non valable."
+
+#: ../src/osx/carbon/dataview.cpp:1782 ../src/osx/carbon/dataview.cpp:1877
+msgid "Invalid data view item"
+msgstr ""
+
+#: ../src/common/appcmn.cpp:266
+#, c-format
+msgid "Invalid display mode specification '%s'."
+msgstr "Spécification du mode d'affichage « %s » non valable."
+
+#: ../src/x11/app.cpp:121
+#, c-format
+msgid "Invalid geometry specification '%s'"
+msgstr "Spécification géométrique « %s » non valable"
+
+#: ../src/unix/fswatcher_inotify.cpp:298
+#, c-format
+msgid "Invalid inotify event for \"%s\""
+msgstr ""
+
+#: ../src/unix/snglinst.cpp:306
+#, c-format
+msgid "Invalid lock file '%s'."
+msgstr "Fichier verrou « %s » non valable."
+
+#: ../src/common/translation.cpp:1111
+msgid "Invalid message catalog."
+msgstr "Catalogue de message invalide."
+
+#: ../src/common/xtistrm.cpp:409 ../src/common/xtistrm.cpp:424
+msgid "Invalid or Null Object ID passed to GetObjectClassInfo"
+msgstr "Identifiant d'objet non valable ou vide indiqué à GetObjectClassInfo"
+
+#: ../src/common/xtistrm.cpp:439
+msgid "Invalid or Null Object ID passed to HasObjectClassInfo"
+msgstr "Identifiant d'objet non valable ou vide indiqué à HasObjectClassInfo"
+
+#: ../src/common/regex.cpp:313
+#, c-format
+msgid "Invalid regular expression '%s': %s"
+msgstr "Expression rationnelle « %s » non valable : %s"
+
+#: ../src/common/config.cpp:226
+#, c-format
+msgid "Invalid value %ld for a boolean key \"%s\" in config file."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:329 ../src/richtext/richtextfontpage.cpp:333
+#: ../src/osx/carbon/fontdlg.cpp:547 ../src/common/stockitem.cpp:168
+msgid "Italic"
+msgstr "Italique"
+
+#: ../src/common/paper.cpp:131
+msgid "Italy Envelope, 110 x 230 mm"
+msgstr "Enveloppe italienne, 110 x 230 mm"
+
+#: ../src/common/imagjpeg.cpp:255
+msgid "JPEG: Couldn't load - file is probably corrupted."
+msgstr "JPEG : échec du chargement - le fichier est probablement corrompu."
+
+#: ../src/common/imagjpeg.cpp:434
+msgid "JPEG: Couldn't save image."
+msgstr "JPEG : échec de la sauvegarde de l'image."
+
+#: ../src/common/paper.cpp:164
+msgid "Japanese Double Postcard 200 x 148 mm"
+msgstr "Carte postale double japonaise 200 x148 mm"
+
+#: ../src/common/paper.cpp:168
+msgid "Japanese Envelope Chou #3"
+msgstr "Enveloppe japonaise Chou n. 3"
+
+#: ../src/common/paper.cpp:181
+msgid "Japanese Envelope Chou #3 Rotated"
+msgstr "Enveloppe japonaise Chou n. 3 Paysage"
+
+#: ../src/common/paper.cpp:169
+msgid "Japanese Envelope Chou #4"
+msgstr "Enveloppe japonaise Chou n. 4"
+
+#: ../src/common/paper.cpp:182
+msgid "Japanese Envelope Chou #4 Rotated"
+msgstr "Enveloppe japonaise Chou n. 4 Paysage"
+
+#: ../src/common/paper.cpp:166
+msgid "Japanese Envelope Kaku #2"
+msgstr "Enveloppe japonaise Kaky  n. 2"
+
+#: ../src/common/paper.cpp:179
+msgid "Japanese Envelope Kaku #2 Rotated"
+msgstr "Enveloppe japonaise Kaky  n. 2 Paysage"
+
+#: ../src/common/paper.cpp:167
+msgid "Japanese Envelope Kaku #3"
+msgstr "Enveloppe japonaise Kaky  n. 3"
+
+#: ../src/common/paper.cpp:180
+msgid "Japanese Envelope Kaku #3 Rotated"
+msgstr "Enveloppe japonaise Kaky  n. 3 Paysage"
+
+#: ../src/common/paper.cpp:186
+msgid "Japanese Envelope You #4"
+msgstr "Enveloppe japonaise Kaky  n. 4"
+
+#: ../src/common/paper.cpp:187
+msgid "Japanese Envelope You #4 Rotated"
+msgstr "Enveloppe japonaise Kaky  n. 4 Paysage"
+
+#: ../src/common/paper.cpp:139
+msgid "Japanese Postcard 100 x 148 mm"
+msgstr "Enveloppe japonaise 100 x 148 mm"
+
+#: ../src/common/paper.cpp:176
+msgid "Japanese Postcard Rotated 148 x 100 mm"
+msgstr "Enveloppe japonaise Paysage 148 x 100 mm"
+
+#: ../src/common/stockitem.cpp:169
+msgid "Jump to"
+msgstr "Aller à"
+
+#: ../src/common/stockitem.cpp:171
+msgid "Justified"
+msgstr "Justifié"
+
+#: ../src/richtext/richtextindentspage.cpp:155
+#: ../src/richtext/richtextindentspage.cpp:157
+#: ../src/richtext/richtextliststylepage.cpp:344
+#: ../src/richtext/richtextliststylepage.cpp:346
+msgid "Justify text left and right."
+msgstr "Justifier le texte."
+
+#: ../src/common/fmapbase.cpp:163
+msgid "KOI8-R"
+msgstr "KOI8-R"
+
+#: ../src/common/fmapbase.cpp:164
+msgid "KOI8-U"
+msgstr "KOI8-U"
+
+#: ../src/common/accelcmn.cpp:254 ../src/common/accelcmn.cpp:336
+msgid "KP_"
+msgstr "KP_"
+
+#: ../src/common/accelcmn.cpp:103
+msgid "KP_ADD"
+msgstr "KP_PLUS"
+
+#: ../src/common/accelcmn.cpp:98
+msgid "KP_BEGIN"
+msgstr "KP_DEBUT"
+
+#: ../src/common/accelcmn.cpp:106
+msgid "KP_DECIMAL"
+msgstr "KP_VIRGULE"
+
+#: ../src/common/accelcmn.cpp:100
+msgid "KP_DELETE"
+msgstr "KP_EFFACER"
+
+#: ../src/common/accelcmn.cpp:107
+msgid "KP_DIVIDE"
+msgstr "KP_DIVISER"
+
+#: ../src/common/accelcmn.cpp:92
+msgid "KP_DOWN"
+msgstr "KP_BAS"
+
+#: ../src/common/accelcmn.cpp:97
+msgid "KP_END"
+msgstr "KP_FIN"
+
+#: ../src/common/accelcmn.cpp:87
+msgid "KP_ENTER"
+msgstr "KP_ENTRER"
+
+#: ../src/common/accelcmn.cpp:101
+msgid "KP_EQUAL"
+msgstr "KP_EGAL"
+
+#: ../src/common/accelcmn.cpp:88
+msgid "KP_HOME"
+msgstr "KP_DEBUT"
+
+#: ../src/common/accelcmn.cpp:99
+msgid "KP_INSERT"
+msgstr "KP_INSERER"
+
+#: ../src/common/accelcmn.cpp:89
+msgid "KP_LEFT"
+msgstr "KP_GAUCHE"
+
+#: ../src/common/accelcmn.cpp:102
+msgid "KP_MULTIPLY"
+msgstr "KP_MULTIPLIER"
+
+#: ../src/common/accelcmn.cpp:95
+msgid "KP_NEXT"
+msgstr "KP_SUIVANT"
+
+#: ../src/common/accelcmn.cpp:96
+msgid "KP_PAGEDOWN"
+msgstr "KP_PAGESUIVANTE"
+
+#: ../src/common/accelcmn.cpp:94
+msgid "KP_PAGEUP"
+msgstr "KP_PAGEPRECEDENTE"
+
+#: ../src/common/accelcmn.cpp:93
+msgid "KP_PRIOR"
+msgstr "KP_PRECEDENT"
+
+#: ../src/common/accelcmn.cpp:91
+msgid "KP_RIGHT"
+msgstr "KP_DROITE"
+
+#: ../src/common/accelcmn.cpp:104
+msgid "KP_SEPARATOR"
+msgstr "KP_SEPARATEUR"
+
+#: ../src/common/accelcmn.cpp:85
+msgid "KP_SPACE"
+msgstr "KP_ESPACE"
+
+#: ../src/common/accelcmn.cpp:105
+msgid "KP_SUBTRACT"
+msgstr "KP_MOINS"
+
+#: ../src/common/accelcmn.cpp:86
+msgid "KP_TAB"
+msgstr "KP_TABULATION"
+
+#: ../src/common/accelcmn.cpp:90
+msgid "KP_UP"
+msgstr "KP_HAUT"
+
+#: ../src/richtext/richtextindentspage.cpp:270
+#, fuzzy
+msgid "L&ine spacing:"
+msgstr "Espacement interligne:"
+
+#: ../src/common/accelcmn.cpp:56
+msgid "LEFT"
+msgstr "GAUCHE"
+
+#: ../src/generic/prntdlgg.cpp:613 ../src/generic/prntdlgg.cpp:868
+msgid "Landscape"
+msgstr "Paysage"
+
+#: ../src/common/stockitem.cpp:174
+msgid "Last"
+msgstr "Dernier"
+
+#: ../src/common/prntbase.cpp:1542
+msgid "Last page"
+msgstr "Dernière page"
+
+#: ../src/common/log.cpp:309
+#, c-format
+msgid "Last repeated message (\"%s\", %lu time) wasn't output"
+msgid_plural "Last repeated message (\"%s\", %lu times) wasn't output"
+msgstr[0] "Le dernier message répété (\"%s\", %lu fois) n'a pas été affiché"
+msgstr[1] "Le dernier message répété (\"%s\", %lu fois) n'a pas été affiché"
+
+#: ../src/common/paper.cpp:104
+msgid "Ledger, 17 x 11 in"
+msgstr "Grand livre (17 x 11 pouces)"
+
+#: ../src/richtext/richtextliststylepage.cpp:249
+#: ../src/richtext/richtextliststylepage.cpp:252
+#: ../src/richtext/richtextliststylepage.cpp:253
+#: ../src/richtext/richtextbulletspage.cpp:199
+#: ../src/richtext/richtextbulletspage.cpp:202
+#: ../src/richtext/richtextbulletspage.cpp:203
+#: ../src/richtext/richtextsizepage.cpp:249
+msgid "Left"
+msgstr "Gauche"
+
+#: ../src/richtext/richtextindentspage.cpp:204
+#: ../src/richtext/richtextliststylepage.cpp:390
+msgid "Left (&first line):"
+msgstr "Gauche (&Première ligne):"
+
+#: ../src/generic/prntdlgg.cpp:880
+msgid "Left margin (mm):"
+msgstr "Marge gauche (mm) :"
+
+#: ../src/richtext/richtextindentspage.cpp:141
+#: ../src/richtext/richtextindentspage.cpp:143
+#: ../src/richtext/richtextliststylepage.cpp:330
+#: ../src/richtext/richtextliststylepage.cpp:332
+msgid "Left-align text."
+msgstr "Aligne le texte à gauche"
+
+#: ../src/common/paper.cpp:145
+msgid "Legal Extra 9 1/2 x 15 in"
+msgstr "Légal Extra 9,5 x 15 pouces"
+
+#: ../src/common/paper.cpp:97
+msgid "Legal, 8 1/2 x 14 in"
+msgstr "Légal (8,5 x 14 pouces)"
+
+#: ../src/common/paper.cpp:144
+msgid "Letter Extra 9 1/2 x 12 in"
+msgstr "Lettre Extra 9.5 x 12 pouces"
+
+#: ../src/common/paper.cpp:150
+msgid "Letter Extra Transverse 9.275 x 12 in"
+msgstr "Lettre Extra Portrait 9.275 x 12 pouces"
+
+#: ../src/common/paper.cpp:153
+msgid "Letter Plus 8 1/2 x 12.69 in"
+msgstr "Lettre Plus 8,5 x 11.69 pouces"
+
+#: ../src/common/paper.cpp:170
+msgid "Letter Rotated 11 x 8 1/2 in"
+msgstr "Lettre paysage 11 x 8.5 pouces"
+
+#: ../src/common/paper.cpp:102
+msgid "Letter Small, 8 1/2 x 11 in"
+msgstr "Lettre réduite (8,5 x 11 pouces)"
+
+#: ../src/common/paper.cpp:148
+msgid "Letter Transverse 8 1/2 x 11 in"
+msgstr "Lettre 8,5 x 11 pouces"
+
+#: ../src/common/paper.cpp:96
+msgid "Letter, 8 1/2 x 11 in"
+msgstr "Lettre (8,5 x 11 pouces)"
+
+#: ../src/generic/aboutdlgg.cpp:173
+msgid "License"
+msgstr "Licence"
+
+#: ../src/generic/fontdlgg.cpp:332
+msgid "Light"
+msgstr "Léger"
+
+#: ../src/generic/helpext.cpp:298
+#, c-format
+msgid "Line %lu of map file \"%s\" has invalid syntax, skipped."
+msgstr ""
+"La ligne %lu du fichier carte \"%s\" a une syntaxe invalide et a été sautée."
+
+#: ../src/richtext/richtextliststylepage.cpp:444
+msgid "Line spacing:"
+msgstr "Espacement interligne:"
+
+#: ../src/html/chm.cpp:838
+msgid "Link contained '//', converted to absolute link."
+msgstr "Le lien contenait « // » et a été converti en lien absolu."
+
+#: ../src/richtext/richtextformatdlg.cpp:349
+msgid "List Style"
+msgstr "Style de liste"
+
+#: ../src/richtext/richtextstyles.cpp:1060
+msgid "List styles"
+msgstr "Styles de liste"
+
+#: ../src/richtext/richtextfontpage.cpp:206
+#: ../src/richtext/richtextfontpage.cpp:208
+msgid "Lists font sizes in points."
+msgstr "Liste des tailles de polices en points."
+
+#: ../src/richtext/richtextfontpage.cpp:199
+#: ../src/richtext/richtextfontpage.cpp:201
+msgid "Lists the available fonts."
+msgstr "Liste des polices de caractères disponibles."
+
+#: ../src/common/fldlgcmn.cpp:325
+#, c-format
+msgid "Load %s file"
+msgstr "Charger le fichier %s"
+
+#: ../src/html/htmlwin.cpp:575
+msgid "Loading : "
+msgstr "Chargement : "
+
+#: ../src/unix/snglinst.cpp:246
+#, c-format
+msgid "Lock file '%s' has incorrect owner."
+msgstr "Le fichier verrou « %s » a un propriétaire incorrect"
+
+#: ../src/unix/snglinst.cpp:251
+#, c-format
+msgid "Lock file '%s' has incorrect permissions."
+msgstr "Le fichier verrou « %s » a des permissions incorrectes."
+
+#: ../src/generic/logg.cpp:582
+#, c-format
+msgid "Log saved to the file '%s'."
+msgstr "Journal sauvé dans le fichier « %s »."
+
+#: ../src/richtext/richtextliststylepage.cpp:484
+#: ../src/richtext/richtextbulletspage.cpp:289
+msgid "Lower case letters"
+msgstr "Lettres minuscules"
+
+#: ../src/richtext/richtextliststylepage.cpp:486
+#: ../src/richtext/richtextbulletspage.cpp:291
+msgid "Lower case roman numerals"
+msgstr "Chiffres romains minuscules"
+
+#: ../src/gtk/mdi.cpp:422 ../src/gtk1/mdi.cpp:431
+msgid "MDI child"
+msgstr "Fils MDI"
+
+#: ../src/common/accelcmn.cpp:68
+msgid "MENU"
+msgstr "MENU"
+
+#: ../src/msw/helpchm.cpp:56
+msgid ""
+"MS HTML Help functions are unavailable because the MS HTML Help library is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Les fonctions de l'aide MS HTML ne sont pas disponibles car la bibliothèque "
+"MS HTML Help n'est pas présente sur cette machine. Veuillez l'installer."
+
+#: ../src/univ/themes/win32.cpp:3754
+msgid "Ma&ximize"
+msgstr "Ma&ximiser"
+
+#: ../src/common/fmapbase.cpp:203
+msgid "MacArabic"
+msgstr "MacArabe"
+
+#: ../src/common/fmapbase.cpp:222
+msgid "MacArmenian"
+msgstr "MacArménien"
+
+#: ../src/common/fmapbase.cpp:211
+msgid "MacBengali"
+msgstr "MacBengali"
+
+#: ../src/common/fmapbase.cpp:217
+msgid "MacBurmese"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:236
+msgid "MacCeltic"
+msgstr "MacCelte"
+
+#: ../src/common/fmapbase.cpp:227
+msgid "MacCentralEurRoman"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:223
+msgid "MacChineseSimp"
+msgstr "MacChinoisSimp"
+
+#: ../src/common/fmapbase.cpp:201
+msgid "MacChineseTrad"
+msgstr "MacChinoisTrad"
+
+#: ../src/common/fmapbase.cpp:233
+msgid "MacCroatian"
+msgstr "MacCroate"
+
+#: ../src/common/fmapbase.cpp:206
+msgid "MacCyrillic"
+msgstr "MacCyrillique"
+
+#: ../src/common/fmapbase.cpp:207
+msgid "MacDevanagari"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:231
+msgid "MacDingbats"
+msgstr "MacDingbats"
+
+#: ../src/common/fmapbase.cpp:226
+msgid "MacEthiopic"
+msgstr "MacÉthiopien"
+
+#: ../src/common/fmapbase.cpp:229
+msgid "MacExtArabic"
+msgstr "MacArabeÉtendu"
+
+#: ../src/common/fmapbase.cpp:237
+msgid "MacGaelic"
+msgstr "MacGaélic"
+
+#: ../src/common/fmapbase.cpp:221
+msgid "MacGeorgian"
+msgstr "MacGéorgien"
+
+#: ../src/common/fmapbase.cpp:205
+msgid "MacGreek"
+msgstr "MacGrec"
+
+#: ../src/common/fmapbase.cpp:209
+msgid "MacGujarati"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:208
+msgid "MacGurmukhi"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:204
+msgid "MacHebrew"
+msgstr "MacHébreu"
+
+#: ../src/common/fmapbase.cpp:234
+msgid "MacIcelandic"
+msgstr "MacIslandais"
+
+#: ../src/common/fmapbase.cpp:200
+msgid "MacJapanese"
+msgstr "MacJaponais"
+
+#: ../src/common/fmapbase.cpp:214
+msgid "MacKannada"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:238
+msgid "MacKeyboardGlyphs"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:218
+msgid "MacKhmer"
+msgstr "MacKhmer"
+
+#: ../src/common/fmapbase.cpp:202
+msgid "MacKorean"
+msgstr "MacCoréen"
+
+#: ../src/common/fmapbase.cpp:220
+msgid "MacLaotian"
+msgstr "MacLaotien"
+
+#: ../src/common/fmapbase.cpp:215
+msgid "MacMalayalam"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:225
+msgid "MacMongolian"
+msgstr "MacMongol"
+
+#: ../src/common/fmapbase.cpp:210
+msgid "MacOriya"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:199
+msgid "MacRoman"
+msgstr "MacRoman"
+
+#: ../src/common/fmapbase.cpp:235
+msgid "MacRomanian"
+msgstr "MacRoumain"
+
+#: ../src/common/fmapbase.cpp:216
+#, fuzzy
+msgid "MacSinhalese"
+msgstr "Respecter la casse"
+
+#: ../src/common/fmapbase.cpp:230
+msgid "MacSymbol"
+msgstr "MacSymbole"
+
+#: ../src/common/fmapbase.cpp:212
+msgid "MacTamil"
+msgstr "MacTamoul"
+
+#: ../src/common/fmapbase.cpp:213
+msgid "MacTelugu"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:219
+msgid "MacThai"
+msgstr "MacThaï"
+
+#: ../src/common/fmapbase.cpp:224
+msgid "MacTibetan"
+msgstr "MacTibétain"
+
+#: ../src/common/fmapbase.cpp:232
+msgid "MacTurkish"
+msgstr "MacTurque"
+
+#: ../src/common/fmapbase.cpp:228
+msgid "MacVietnamese"
+msgstr "MacVietnamien"
+
+#: ../src/propgrid/advprops.cpp:2031
+msgid "Make a selection:"
+msgstr "Créer une sélection :"
+
+#: ../src/richtext/richtextformatdlg.cpp:362
+#: ../src/richtext/richtextmarginspage.cpp:172
+msgid "Margins"
+msgstr "Marges"
+
+#: ../src/generic/fdrepdlg.cpp:147
+msgid "Match case"
+msgstr "Respecter la casse"
+
+#: ../src/richtext/richtextsizepage.cpp:463
+msgid "Max height:"
+msgstr "Hauteur max :"
+
+#: ../src/richtext/richtextsizepage.cpp:436
+msgid "Max width:"
+msgstr "Largeur Max :"
+
+#: ../src/unix/mediactrl.cpp:1006
+#, c-format
+msgid "Media playback error: %s"
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:175
+#, c-format
+msgid "Memory VFS already contains file '%s'!"
+msgstr "La mémoire VFS contient déjà le fichier « %s »."
+
+#: ../src/msw/frame.cpp:347
+msgid "Menu"
+msgstr "Menu"
+
+#: ../src/common/msgout.cpp:124
+msgid "Message"
+msgstr "Message"
+
+#: ../src/univ/themes/metal.cpp:168
+msgid "Metal theme"
+msgstr "Thème métallique"
+
+#: ../src/msw/ole/automtn.cpp:641
+msgid "Method or property not found."
+msgstr "Méthode ou propriété non trouvée."
+
+#: ../src/univ/themes/win32.cpp:3752
+msgid "Mi&nimize"
+msgstr "Mi&nimiser"
+
+#: ../src/richtext/richtextsizepage.cpp:409
+msgid "Min height:"
+msgstr "Hauteur min :"
+
+#: ../src/richtext/richtextsizepage.cpp:382
+msgid "Min width:"
+msgstr "Largeur min :"
+
+#: ../src/msw/ole/automtn.cpp:657
+msgid "Missing a required parameter."
+msgstr "Un paramètre requis est manquant."
+
+#: ../src/generic/fontdlgg.cpp:324
+msgid "Modern"
+msgstr "Moderne"
+
+#: ../src/generic/filectrlg.cpp:462
+msgid "Modified"
+msgstr "Modifié"
+
+#: ../src/common/module.cpp:133
+#, c-format
+msgid "Module \"%s\" initialization failed"
+msgstr "L'initialisation du module \"%s\" a échoué"
+
+#: ../src/common/paper.cpp:132
+msgid "Monarch Envelope, 3 7/8 x 7 1/2 in"
+msgstr "Enveloppe monarchique (3,875 x 7,5 pouces)"
+
+#: ../src/msw/fswatcher.cpp:143
+msgid "Monitoring individual files for changes is not supported currently."
+msgstr ""
+"La surveillance des modifications de fichiers individuels n'est actuellement "
+"pas supporté."
+
+#: ../src/generic/editlbox.cpp:276
+msgid "Move down"
+msgstr "Descendre"
+
+#: ../src/generic/editlbox.cpp:275
+msgid "Move up"
+msgstr "Monter"
+
+#: ../src/richtext/richtextsizepage.cpp:682
+#: ../src/richtext/richtextsizepage.cpp:684
+msgid "Moves the object to the next paragraph."
+msgstr "Déplacer l'objet vers le paragraphe suivant."
+
+#: ../src/richtext/richtextsizepage.cpp:676
+#: ../src/richtext/richtextsizepage.cpp:678
+msgid "Moves the object to the previous paragraph."
+msgstr "Déplacer l'objet vers le paragraphe précédent."
+
+#: ../src/richtext/richtextbuffer.cpp:9345
+msgid "Multiple Cell Properties"
+msgstr "Propriétés de Plusieurs Cellules"
+
+#: ../src/common/accelcmn.cpp:81
+msgid "NUM_LOCK"
+msgstr "NUM_LOCK"
+
+#: ../src/generic/filectrlg.cpp:459
+msgid "Name"
+msgstr "Nom"
+
+#: ../src/common/stockitem.cpp:175
+msgid "Network"
+msgstr "Réseau"
+
+#: ../src/common/stockitem.cpp:176
+msgid "New"
+msgstr "Nouveau"
+
+#: ../src/richtext/richtextstyledlg.cpp:243
+msgid "New &Box Style..."
+msgstr "Nouveau Style de &Boîte..."
+
+#: ../src/richtext/richtextstyledlg.cpp:225
+msgid "New &Character Style..."
+msgstr "Nouveau Style de &Caractères..."
+
+#: ../src/richtext/richtextstyledlg.cpp:237
+msgid "New &List Style..."
+msgstr "Nouveau Style de &Liste..."
+
+#: ../src/richtext/richtextstyledlg.cpp:231
+msgid "New &Paragraph Style..."
+msgstr "Nouveau Style de &Paragraphe..."
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:651
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:817
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:890
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:931
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "New Style"
+msgstr "Nouveau style"
+
+#: ../src/generic/dirdlgg.cpp:102
+msgid "New directory"
+msgstr "Nouveau répertoire"
+
+#: ../src/generic/editlbox.cpp:273
+msgid "New item"
+msgstr "Nouvel élément"
+
+#: ../src/generic/dirdlgg.cpp:326 ../src/generic/dirdlgg.cpp:336
+#: ../src/generic/filectrlg.cpp:653 ../src/generic/filectrlg.cpp:662
+msgid "NewName"
+msgstr "NouveauNom"
+
+#: ../src/generic/tipdlg.cpp:305
+msgid "Next"
+msgstr "Suivant"
+
+#: ../src/common/prntbase.cpp:1537 ../src/html/helpwnd.cpp:678
+msgid "Next page"
+msgstr "Page suivante"
+
+#: ../include/wx/msgdlg.h:272 ../src/common/stockitem.cpp:177
+#: ../src/motif/msgdlg.cpp:196
+msgid "No"
+msgstr "Non"
+
+#: ../src/generic/animateg.cpp:150
+#, c-format
+msgid "No animation handler for type %ld defined."
+msgstr "Aucun gestionnaire d'animation n'est défini pour le type %ld."
+
+#: ../src/dfb/bitmap.cpp:642 ../src/dfb/bitmap.cpp:676
+#, c-format
+msgid "No bitmap handler for type %d defined."
+msgstr "Aucun gestionnaire d'image défini pour le type %d."
+
+#: ../src/osx/carbon/dataview.cpp:1784
+msgid "No column existing."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1674
+msgid "No column for the specified column existing."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1423
+msgid "No column for the specified column position existing."
+msgstr ""
+
+#: ../src/common/utilscmn.cpp:1049
+msgid "No default application configured for HTML files."
+msgstr "Pas d'application configurée pour les fichiers HTML."
+
+#: ../src/generic/helpext.cpp:449
+msgid "No entries found."
+msgstr "Aucune entrée trouvée."
+
+#: ../src/common/fontmap.cpp:421
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found,\n"
+"but an alternative encoding '%s' is available.\n"
+"Do you want to use this encoding (otherwise you will have to choose another "
+"one)?"
+msgstr ""
+"Aucune police trouvée pour afficher du texte avec le codage « %s »,\n"
+"mais le codage similaire « %s » est disponible.\n"
+"Souhaitez-vous l'utiliser (sinon, vous devrez en choisir un autre) ?"
+
+#: ../src/common/fontmap.cpp:426
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found.\n"
+"Would you like to select a font to be used for this encoding\n"
+"(otherwise the text in this encoding will not be shown correctly)?"
+msgstr ""
+"Aucune police trouvée pour afficher du texte avec le codage « %s »,\n"
+"Souhaitez-vous choisir une police à utiliser pour ce codage\n"
+"(sinon le texte avec ce codage n'apparaîtra pas correctement) ?"
+
+#: ../src/generic/animateg.cpp:142
+msgid "No handler found for animation type."
+msgstr "Aucun gestionnaire trouvé pour le type d'animation."
+
+#: ../src/common/image.cpp:2591
+msgid "No handler found for image type."
+msgstr "Aucun gestionnaire trouvé pour le type d'image."
+
+#: ../src/common/image.cpp:2599 ../src/common/image.cpp:2710
+#: ../src/common/image.cpp:2763
+#, c-format
+msgid "No image handler for type %d defined."
+msgstr "Aucun gestionnaire d'image défini pour le type %d."
+
+#: ../src/common/image.cpp:2733 ../src/common/image.cpp:2777
+#, c-format
+msgid "No image handler for type %s defined."
+msgstr "Aucun gestionnaire d'image défini pour le type %s."
+
+#: ../src/html/helpwnd.cpp:871
+msgid "No matching page found yet"
+msgstr "Aucune page correspondante n'a encore été trouvée"
+
+#: ../src/osx/carbon/dataview.cpp:1676 ../src/osx/carbon/dataview.cpp:1786
+msgid "No renderer or invalid renderer type specified for custom data column."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1424
+msgid "No renderer specified for column."
+msgstr ""
+
+#: ../src/unix/sound.cpp:81
+msgid "No sound"
+msgstr "Pas de son"
+
+#: ../src/common/image.cpp:2166 ../src/common/image.cpp:2207
+msgid "No unused colour in image being masked."
+msgstr "Aucune couleur n'est disponible dans l'image en cours de masquage."
+
+#: ../src/common/image.cpp:3236
+msgid "No unused colour in image."
+msgstr "Aucune couleur n'est disponible dans l'image."
+
+#: ../src/generic/helpext.cpp:306
+#, c-format
+msgid "No valid mappings found in the file \"%s\"."
+msgstr ""
+"Aucune table de correspondance valide n'a été trouvée dans le fichier \"%s\"."
+
+#: ../src/richtext/richtextborderspage.cpp:542
+#: ../src/richtext/richtextsizepage.cpp:248
+#: ../src/richtext/richtextsizepage.cpp:252
+msgid "None"
+msgstr "Aucun"
+
+#: ../src/common/fmapbase.cpp:157
+msgid "Nordic (ISO-8859-10)"
+msgstr "Nordique (ISO-8859-10)"
+
+#: ../src/generic/fontdlgg.cpp:328 ../src/generic/fontdlgg.cpp:331
+msgid "Normal"
+msgstr "Normal"
+
+#: ../src/html/helpwnd.cpp:1276
+msgid "Normal face<br>and <u>underlined</u>. "
+msgstr "Normal<br>et <u>souligné</u>. "
+
+#: ../src/html/helpwnd.cpp:1218
+msgid "Normal font:"
+msgstr "Police normale :"
+
+#: ../src/propgrid/props.cpp:887
+#, fuzzy, c-format
+msgid "Not %s"
+msgstr "À propos"
+
+#: ../include/wx/filename.h:586 ../include/wx/filename.h:591
+msgid "Not available"
+msgstr "Non disponible"
+
+#: ../src/richtext/richtextfontpage.cpp:340
+msgid "Not underlined"
+msgstr "Non souligné"
+
+#: ../src/common/paper.cpp:116
+msgid "Note, 8 1/2 x 11 in"
+msgstr "Note (8,5 x 11 pouces)"
+
+#: ../src/generic/notifmsgg.cpp:104
+#, fuzzy
+msgid "Notice"
+msgstr "&Notes :"
+
+#: ../src/osx/carbon/dataview.cpp:902
+msgid "Number of columns could not be determined."
+msgstr "Le nombre de colonnes n'a pas pu être déterminé."
+
+#: ../src/richtext/richtextliststylepage.cpp:487
+#: ../src/richtext/richtextbulletspage.cpp:292
+msgid "Numbered outline"
+msgstr "Table des matières numérotée"
+
+#: ../include/wx/msgdlg.h:273 ../src/richtext/richtextstyledlg.cpp:297
+#: ../src/common/stockitem.cpp:178 ../src/msw/msgdlg.cpp:489
+#: ../src/msw/msgdlg.cpp:799 ../src/msw/dialog.cpp:120
+#: ../src/gtk1/fontdlg.cpp:138
+msgid "OK"
+msgstr "OK"
+
+#: ../src/msw/ole/automtn.cpp:681
+#, c-format
+msgid "OLE Automation error in %s: %s"
+msgstr "Erreur OLE Automation dans %s : %s"
+
+#: ../include/wx/richtext/richtextimagedlg.h:39
+msgid "Object Properties"
+msgstr "Propriétés de l'Objet"
+
+#: ../src/msw/ole/automtn.cpp:649
+msgid "Object implementation does not support named arguments."
+msgstr "L'implémentation de l'objet ne supporte pas les arguments nommés."
+
+#: ../src/common/xtixml.cpp:264
+msgid "Objects must have an id attribute"
+msgstr "Les objets doivent avoir un attribut id"
+
+#: ../src/common/docview.cpp:1755 ../src/common/docview.cpp:1797
+msgid "Open File"
+msgstr "Ouvrir un Fichier"
+
+#: ../src/html/helpwnd.cpp:684 ../src/html/helpwnd.cpp:1557
+msgid "Open HTML document"
+msgstr "Ouvrir un document HTML"
+
+#: ../src/generic/dbgrptg.cpp:163
+#, c-format
+msgid "Open file \"%s\""
+msgstr "Ouvrir le fichier « %s »"
+
+#: ../src/common/stockitem.cpp:179
+msgid "Open..."
+msgstr "Ouvrir..."
+
+#: ../src/osx/carbon/glcanvas.cpp:48
+#, c-format
+msgid "OpenGL function \"%s\" failed: %s (error %d)"
+msgstr "La fonction OpenGL \"%s\" a échoué : %s (erreur %d)"
+
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:821
+msgid "Operation not permitted."
+msgstr "Opération interdite."
+
+#: ../src/common/cmdline.cpp:735
+#, fuzzy, c-format
+msgid "Option '%s' can't be negated"
+msgstr "Le répertoire « %s » n'a pas pu être créé"
+
+#: ../src/common/cmdline.cpp:899
+#, c-format
+msgid "Option '%s' requires a value."
+msgstr "L'option « %s » nécessite une valeur."
+
+#: ../src/common/cmdline.cpp:982
+#, c-format
+msgid "Option '%s': '%s' cannot be converted to a date."
+msgstr "Option « %s » : « %s » ne peut pas être converti en date."
+
+#: ../src/generic/dirdlgg.cpp:187 ../src/generic/prntdlgg.cpp:618
+msgid "Options"
+msgstr "Options"
+
+#: ../src/generic/prntdlgg.cpp:615 ../src/generic/prntdlgg.cpp:869
+msgid "Orientation"
+msgstr "Orientation"
+
+#: ../src/common/windowid.cpp:259
+msgid "Out of window IDs.  Recommend shutting down application."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:400
+#: ../src/richtext/richtextborderspage.cpp:533
+msgid "Outline"
+msgstr "Contour"
+
+#: ../src/richtext/richtextborderspage.cpp:550
+msgid "Outset"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:645
+msgid "Overflow while coercing argument values."
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:84
+msgid "PAGEDOWN"
+msgstr "PAGESUIVANTE"
+
+#: ../src/common/accelcmn.cpp:83
+msgid "PAGEUP"
+msgstr "PAGEPRECEDENTE"
+
+#: ../src/common/accelcmn.cpp:69
+msgid "PAUSE"
+msgstr "PAUSE"
+
+#: ../src/common/imagpcx.cpp:457 ../src/common/imagpcx.cpp:480
+msgid "PCX: couldn't allocate memory"
+msgstr "PCX : impossible d'allouer de la mémoire"
+
+#: ../src/common/imagpcx.cpp:456
+msgid "PCX: image format unsupported"
+msgstr "PCX : format d'image non géré"
+
+#: ../src/common/imagpcx.cpp:479
+msgid "PCX: invalid image"
+msgstr "PCX : image non valable"
+
+#: ../src/common/imagpcx.cpp:442
+msgid "PCX: this is not a PCX file."
+msgstr "PCX : ce n'est pas un fichier PCX."
+
+#: ../src/common/imagpcx.cpp:459 ../src/common/imagpcx.cpp:481
+msgid "PCX: unknown error !!!"
+msgstr "PCX : erreur inconnue."
+
+#: ../src/common/imagpcx.cpp:458
+msgid "PCX: version number too low"
+msgstr "PCX : numéro de version trop petit"
+
+#: ../src/common/accelcmn.cpp:55
+msgid "PGDN"
+msgstr "PAGESUIVANTE"
+
+#: ../src/common/accelcmn.cpp:54
+msgid "PGUP"
+msgstr "PAGEPRECEDENTE"
+
+#: ../src/common/imagpnm.cpp:91
+msgid "PNM: Couldn't allocate memory."
+msgstr "PNM : impossible d'allouer de la mémoire."
+
+#: ../src/common/imagpnm.cpp:73
+msgid "PNM: File format is not recognized."
+msgstr "PNM : le format de fichier n'est pas reconnu."
+
+#: ../src/common/imagpnm.cpp:112 ../src/common/imagpnm.cpp:134
+#: ../src/common/imagpnm.cpp:156
+msgid "PNM: File seems truncated."
+msgstr "PNM : le fichier semble tronqué."
+
+#: ../src/common/paper.cpp:188
+msgid "PRC 16K 146 x 215 mm"
+msgstr "PRC 16K 146 x 215 mm"
+
+#: ../src/common/paper.cpp:201
+msgid "PRC 16K Rotated"
+msgstr "PRC 16K Paysage"
+
+#: ../src/common/paper.cpp:189
+msgid "PRC 32K 97 x 151 mm"
+msgstr "PRC 32K 97 x 151 mm"
+
+#: ../src/common/paper.cpp:202
+msgid "PRC 32K Rotated"
+msgstr "PRC 32K Paysage"
+
+#: ../src/common/paper.cpp:190
+msgid "PRC 32K(Big) 97 x 151 mm"
+msgstr "Format PRC 32K (Large), 97 x 151 mm"
+
+#: ../src/common/paper.cpp:203
+msgid "PRC 32K(Big) Rotated"
+msgstr "Format PRC 32K (Large), Paysage"
+
+#: ../src/common/paper.cpp:191
+msgid "PRC Envelope #1 102 x 165 mm"
+msgstr "Enveloppe PRC n. 1, 102 x 165 mm"
+
+#: ../src/common/paper.cpp:204
+msgid "PRC Envelope #1 Rotated 165 x 102 mm"
+msgstr "Enveloppe PRC n. 1, Paysage, 165 x 102 mm"
+
+#: ../src/common/paper.cpp:200
+msgid "PRC Envelope #10 324 x 458 mm"
+msgstr "Enveloppe PRC n. 10, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:213
+msgid "PRC Envelope #10 Rotated 458 x 324 mm"
+msgstr "Enveloppe PRC n. 10, Paysage, 458 x 324 mm"
+
+#: ../src/common/paper.cpp:192
+msgid "PRC Envelope #2 102 x 176 mm"
+msgstr "Enveloppe PRC n. 2, 102 x 176 mm"
+
+#: ../src/common/paper.cpp:205
+msgid "PRC Envelope #2 Rotated 176 x 102 mm"
+msgstr "Enveloppe PRC n. 2, Paysage, 176 x 102 mm"
+
+#: ../src/common/paper.cpp:193
+msgid "PRC Envelope #3 125 x 176 mm"
+msgstr "Enveloppe PRC n. 3, 125 x 176 mm"
+
+#: ../src/common/paper.cpp:206
+msgid "PRC Envelope #3 Rotated 176 x 125 mm"
+msgstr "Enveloppe PRC n. 3, Paysage, 176 x 125 mm"
+
+#: ../src/common/paper.cpp:194
+msgid "PRC Envelope #4 110 x 208 mm"
+msgstr "Enveloppe PRC n. 4, 110 x 208 mm"
+
+#: ../src/common/paper.cpp:207
+msgid "PRC Envelope #4 Rotated 208 x 110 mm"
+msgstr "Enveloppe PRC n. 4, Paysage, 208 x 110 mm"
+
+#: ../src/common/paper.cpp:195
+msgid "PRC Envelope #5 110 x 220 mm"
+msgstr "Enveloppe PRC n. 5, 110 x 220 mm"
+
+#: ../src/common/paper.cpp:208
+msgid "PRC Envelope #5 Rotated 220 x 110 mm"
+msgstr "Enveloppe PRC n. 5, Paysage, 220 x 110 mm"
+
+#: ../src/common/paper.cpp:196
+msgid "PRC Envelope #6 120 x 230 mm"
+msgstr "Enveloppe PRC n. 6, 120 x 230 mm"
+
+#: ../src/common/paper.cpp:209
+msgid "PRC Envelope #6 Rotated 230 x 120 mm"
+msgstr "Enveloppe PRC n. 6, Paysage, 230 x 120 mm"
+
+#: ../src/common/paper.cpp:197
+msgid "PRC Envelope #7 160 x 230 mm"
+msgstr "Enveloppe PRC n. 7, 160 x 230 mm"
+
+#: ../src/common/paper.cpp:210
+msgid "PRC Envelope #7 Rotated 230 x 160 mm"
+msgstr "Enveloppe PRC n. 7, Paysage, 230 x 160 mm"
+
+#: ../src/common/paper.cpp:198
+msgid "PRC Envelope #8 120 x 309 mm"
+msgstr "Enveloppe PRC n. 8, 120 x 309 mm"
+
+#: ../src/common/paper.cpp:211
+msgid "PRC Envelope #8 Rotated 309 x 120 mm"
+msgstr "Enveloppe PRC n. 8, Paysage, 309 x 120 mm"
+
+#: ../src/common/paper.cpp:199
+msgid "PRC Envelope #9 229 x 324 mm"
+msgstr "Enveloppe PRC n. 9, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:212
+msgid "PRC Envelope #9 Rotated 324 x 229 mm"
+msgstr "Enveloppe PRC n. 9, Paysage, 324 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:72
+msgid "PRINT"
+msgstr "IMPRIMER"
+
+#: ../src/richtext/richtextmarginspage.cpp:286
+msgid "Padding"
+msgstr "Espacement"
+
+#: ../src/common/prntbase.cpp:2044
+#, c-format
+msgid "Page %d"
+msgstr "Page %d"
+
+#: ../src/common/prntbase.cpp:2042
+#, c-format
+msgid "Page %d of %d"
+msgstr "Page %d de %d"
+
+#: ../src/gtk/print.cpp:774
+msgid "Page Setup"
+msgstr "Mise en page"
+
+#: ../src/generic/prntdlgg.cpp:828 ../src/common/prntbase.cpp:467
+msgid "Page setup"
+msgstr "Mise en page"
+
+#: ../src/generic/prntdlgg.cpp:216
+msgid "Pages"
+msgstr "Pages"
+
+#: ../src/generic/prntdlgg.cpp:602 ../src/generic/prntdlgg.cpp:801
+#: ../src/generic/prntdlgg.cpp:842 ../src/generic/prntdlgg.cpp:855
+#: ../src/generic/prntdlgg.cpp:1052 ../src/generic/prntdlgg.cpp:1057
+msgid "Paper size"
+msgstr "Taille de la page"
+
+#: ../src/richtext/richtextstyles.cpp:1058
+msgid "Paragraph styles"
+msgstr "Styles de paragraphe"
+
+#: ../src/common/xtistrm.cpp:469
+msgid "Passing a already registered object to SetObject"
+msgstr "Objet déjà enregistré indiqué à SetObject"
+
+#: ../src/common/xtistrm.cpp:480
+#, fuzzy
+msgid "Passing an unknown object to GetObject"
+msgstr "Objet inconnu indiqué à GetObject"
+
+#: ../src/richtext/richtextctrl.cpp:3117 ../src/common/stockitem.cpp:180
+#: ../src/stc/stc_i18n.cpp:19
+msgid "Paste"
+msgstr "Coller"
+
+#: ../src/common/stockitem.cpp:262
+msgid "Paste selection"
+msgstr "Coller la sélection"
+
+#: ../src/richtext/richtextliststylepage.cpp:222
+#: ../src/richtext/richtextbulletspage.cpp:172
+msgid "Peri&od"
+msgstr "&Virgule"
+
+#: ../src/generic/filectrlg.cpp:465
+msgid "Permissions"
+msgstr "Permissions"
+
+#: ../src/richtext/richtextbuffer.cpp:11942
+msgid "Picture Properties"
+msgstr "Propriétés de l'Image"
+
+#: ../include/wx/unix/pipe.h:47
+msgid "Pipe creation failed"
+msgstr "Échec de la création du tube"
+
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Please choose a valid font."
+msgstr "Choisissez une police valable."
+
+#: ../src/gtk/filedlg.cpp:72
+msgid "Please choose an existing file."
+msgstr "Choisissez un fichier existant."
+
+#: ../src/html/helpwnd.cpp:813
+msgid "Please choose the page to display:"
+msgstr "Choisissez la page à afficher :"
+
+#: ../src/msw/dialup.cpp:785
+msgid "Please choose which ISP do you want to connect to"
+msgstr "Veuillez choisir à quel FAI vous voulez vous connecter"
+
+#: ../src/msw/listctrl.cpp:372
+#, c-format
+msgid ""
+"Please install a newer version of comctl32.dll\n"
+"(at least version 4.70 is required but you have %d.%02d)\n"
+"or this program won't operate correctly."
+msgstr ""
+"Veuillez installer une nouvelle version de comctl32.dll\n"
+"(la version 4.70 au minimum est nécessaire, contre la version %d.%02d\n"
+"actuellement), sinon ce programme ne fonctionnera pas correctement."
+
+#: ../src/common/headerctrlcmn.cpp:59
+msgid "Please select the columns to show and define their order:"
+msgstr "SVP, sélectionnez les colonnes à afficher et définissez leur ordre :"
+
+#: ../src/common/prntbase.cpp:521
+msgid "Please wait while printing..."
+msgstr "Patientez pendant l'impression..."
+
+#: ../src/propgrid/advprops.cpp:631
+msgid "Point Size"
+msgstr "Taille de Point"
+
+#: ../src/osx/carbon/dataview.cpp:1278 ../src/osx/carbon/dataview.cpp:1329
+#: ../src/osx/carbon/dataview.cpp:1420 ../src/osx/carbon/dataview.cpp:1443
+#: ../src/osx/carbon/dataview.cpp:1460 ../src/osx/carbon/dataview.cpp:1477
+#: ../src/osx/carbon/dataview.cpp:1670 ../src/osx/carbon/dataview.cpp:1779
+#: ../src/osx/carbon/dataview.cpp:1821 ../src/osx/carbon/dataview.cpp:1874
+#: ../src/osx/carbon/dataview.cpp:1997
+msgid "Pointer to data view control not set correctly."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1279 ../src/osx/carbon/dataview.cpp:1338
+#: ../src/osx/carbon/dataview.cpp:1421 ../src/osx/carbon/dataview.cpp:1478
+#: ../src/osx/carbon/dataview.cpp:1671 ../src/osx/carbon/dataview.cpp:1780
+#: ../src/osx/carbon/dataview.cpp:1822 ../src/osx/carbon/dataview.cpp:1875
+#: ../src/osx/carbon/dataview.cpp:1998
+msgid "Pointer to model not set correctly."
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:612 ../src/generic/prntdlgg.cpp:867
+msgid "Portrait"
+msgstr "Portrait"
+
+#: ../src/richtext/richtextsizepage.cpp:496
+msgid "Position"
+msgstr "Position"
+
+#: ../src/generic/prntdlgg.cpp:298
+msgid "PostScript file"
+msgstr "Fichier PostScript"
+
+#: ../src/common/stockitem.cpp:181
+msgid "Preferences"
+msgstr "Préférences"
+
+#: ../src/osx/menu_osx.cpp:643
+msgid "Preferences..."
+msgstr "Préférences..."
+
+#: ../src/common/prntbase.cpp:529
+msgid "Preparing"
+msgstr "Préparation"
+
+#: ../src/generic/fontdlgg.cpp:455 ../src/osx/carbon/fontdlg.cpp:576
+#: ../src/html/helpwnd.cpp:1235
+msgid "Preview:"
+msgstr "Aperçu :"
+
+#: ../src/common/prntbase.cpp:1523 ../src/html/helpwnd.cpp:677
+msgid "Previous page"
+msgstr "Page précédente"
+
+#: ../src/generic/prntdlgg.cpp:143 ../src/generic/prntdlgg.cpp:157
+#: ../src/common/prntbase.cpp:409 ../src/common/prntbase.cpp:1511
+#: ../src/gtk/print.cpp:584 ../src/gtk/print.cpp:597
+msgid "Print"
+msgstr "Imprimer"
+
+#: ../include/wx/prntbase.h:395 ../src/common/docview.cpp:1250
+msgid "Print Preview"
+msgstr "Aperçu avant impression"
+
+#: ../src/common/prntbase.cpp:1985 ../src/common/prntbase.cpp:2027
+#: ../src/common/prntbase.cpp:2035
+msgid "Print Preview Failure"
+msgstr "Erreur de l'aperçu avant impression"
+
+#: ../src/generic/prntdlgg.cpp:224
+msgid "Print Range"
+msgstr "Pages à imprimer"
+
+#: ../src/generic/prntdlgg.cpp:449
+msgid "Print Setup"
+msgstr "Configuration de l'impression"
+
+#: ../src/generic/prntdlgg.cpp:621
+msgid "Print in colour"
+msgstr "Imprimer en couleur"
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print previe&w..."
+msgstr "&Aperçu avant impression..."
+
+#: ../src/common/docview.cpp:1244
+msgid "Print preview creation failed."
+msgstr "Échec de la création de l'aperçu avant impression."
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print preview..."
+msgstr "Aperçu avant impression..."
+
+#: ../src/generic/prntdlgg.cpp:630
+msgid "Print spooling"
+msgstr "Queue d'impression"
+
+#: ../src/html/helpwnd.cpp:688
+msgid "Print this page"
+msgstr "Imprimer cette page"
+
+#: ../src/generic/prntdlgg.cpp:185
+msgid "Print to File"
+msgstr "Imprimer dans un fichier"
+
+#: ../src/common/stockitem.cpp:183
+msgid "Print..."
+msgstr "&Imprimer..."
+
+#: ../src/generic/prntdlgg.cpp:493
+msgid "Printer"
+msgstr "Imprimante"
+
+#: ../src/generic/prntdlgg.cpp:633
+msgid "Printer command:"
+msgstr "Commande pour l'imprimante :"
+
+#: ../src/generic/prntdlgg.cpp:180
+msgid "Printer options"
+msgstr "Options de l'imprimante"
+
+#: ../src/generic/prntdlgg.cpp:645
+msgid "Printer options:"
+msgstr "Options de l'imprimante :"
+
+#: ../src/generic/prntdlgg.cpp:916
+msgid "Printer..."
+msgstr "Imprimante..."
+
+#: ../src/generic/prntdlgg.cpp:196
+msgid "Printer:"
+msgstr "Imprimante :"
+
+#: ../include/wx/richtext/richtextprint.h:163 ../src/common/prntbase.cpp:518
+#: ../src/html/htmprint.cpp:277
+msgid "Printing"
+msgstr "Impression"
+
+#: ../src/common/prntbase.cpp:586
+msgid "Printing "
+msgstr "Impression en cours"
+
+#: ../src/common/prntbase.cpp:330
+msgid "Printing Error"
+msgstr "Erreur d'impression"
+
+#: ../src/common/prntbase.cpp:544
+#, c-format
+msgid "Printing page %d of %d"
+msgstr "Impression de la page %d sur %d"
+
+#: ../src/generic/printps.cpp:201
+#, c-format
+msgid "Printing page %d..."
+msgstr "Impression de la page %d..."
+
+#: ../src/generic/printps.cpp:161
+msgid "Printing..."
+msgstr "Impression en cours..."
+
+#: ../include/wx/richtext/richtextprint.h:109 ../include/wx/prntbase.h:263
+#: ../src/common/docview.cpp:2124
+msgid "Printout"
+msgstr "Impression"
+
+#: ../src/common/debugrpt.cpp:565
+#, c-format
+msgid ""
+"Processing debug report has failed, leaving the files in \"%s\" directory."
+msgstr ""
+"Échec du traitement du rapport de débogage, les fichiers sont maintenus dans "
+"le répertoire « %s »."
+
+#: ../src/osx/carbon/dataview.cpp:2472
+msgid "Progress renderer cannot render value type; value type: "
+msgstr ""
+
+#: ../src/common/prntbase.cpp:528
+msgid "Progress:"
+msgstr "Avancement :"
+
+#: ../src/common/stockitem.cpp:184
+msgid "Properties"
+msgstr "Propriétés"
+
+#: ../src/propgrid/manager.cpp:237
+msgid "Property"
+msgstr "Propriété"
+
+#: ../src/propgrid/propgrid.cpp:3144 ../src/propgrid/propgrid.cpp:3276
+msgid "Property Error"
+msgstr "Erreur de Propriété"
+
+#: ../src/common/paper.cpp:113
+msgid "Quarto, 215 x 275 mm"
+msgstr "Quarto, 215 x 275 mm"
+
+#: ../src/generic/logg.cpp:1036
+msgid "Question"
+msgstr "Question"
+
+#: ../src/common/stockitem.cpp:156
+msgid "Quit"
+msgstr "Quitter"
+
+#: ../src/osx/menu_osx.cpp:610 ../src/osx/menu_osx.cpp:657
+#, c-format
+msgid "Quit %s"
+msgstr "Quitter %s"
+
+#: ../src/common/stockitem.cpp:263
+msgid "Quit this program"
+msgstr "Quitter ce programme"
+
+#: ../src/common/accelcmn.cpp:53
+msgid "RETURN"
+msgstr "RETOUR"
+
+#: ../src/common/accelcmn.cpp:57
+msgid "RIGHT"
+msgstr "DROITE"
+
+#: ../src/common/accelcmn.cpp:327
+#, fuzzy
+msgid "RawCtrl+"
+msgstr "Ctrl-ctrl"
+
+#: ../src/common/ffile.cpp:113 ../src/common/ffile.cpp:134
+#, c-format
+msgid "Read error on file '%s'"
+msgstr "Erreur de lecture dans le fichier « %s »"
+
+#: ../src/common/prntbase.cpp:257
+msgid "Ready"
+msgstr "Prêt"
+
+#: ../src/common/stockitem.cpp:185 ../src/stc/stc_i18n.cpp:16
+msgid "Redo"
+msgstr "Refaire"
+
+#: ../src/common/stockitem.cpp:264
+msgid "Redo last action"
+msgstr "Exécuter à nouveau la dernière action"
+
+#: ../src/common/stockitem.cpp:186
+msgid "Refresh"
+msgstr "Actualiser"
+
+#: ../src/msw/registry.cpp:625
+#, c-format
+msgid "Registry key '%s' already exists."
+msgstr "La clé de registre « %s » existe déjà."
+
+#: ../src/msw/registry.cpp:594
+#, c-format
+msgid "Registry key '%s' does not exist, cannot rename it."
+msgstr ""
+"Impossible de renommer la clé de registre « %s », celle-ci n'existe pas."
+
+#: ../src/msw/registry.cpp:726
+#, c-format
+msgid ""
+"Registry key '%s' is needed for normal system operation,\n"
+"deleting it will leave your system in unusable state:\n"
+"operation aborted."
+msgstr ""
+"La clé de registre « %s » est nécessaire pour un fonctionnement correct\n"
+"du système ; sa suppression laissera votre système inutilisable :\n"
+"opération abandonnée."
+
+#: ../src/msw/registry.cpp:520
+#, c-format
+msgid "Registry value '%s' already exists."
+msgstr "La valeur de registre « %s » existe déjà."
+
+#: ../src/richtext/richtextfontpage.cpp:332
+#: ../src/richtext/richtextfontpage.cpp:336
+msgid "Regular"
+msgstr "Régulier"
+
+#: ../src/richtext/richtextsizepage.cpp:519
+msgid "Relative"
+msgstr "Relatif"
+
+#: ../src/generic/helpext.cpp:462
+msgid "Relevant entries:"
+msgstr "Entrées pertinentes :"
+
+#: ../include/wx/generic/progdlgg.h:86
+#, fuzzy
+msgid "Remaining time:"
+msgstr "Temps restant : "
+
+#: ../src/common/stockitem.cpp:187
+msgid "Remove"
+msgstr "Supprimer"
+
+#: ../src/richtext/richtextctrl.cpp:1430
+#, fuzzy
+msgid "Remove Bullet"
+msgstr "Supprimer"
+
+#: ../src/html/helpwnd.cpp:440
+msgid "Remove current page from bookmarks"
+msgstr "Retirer la page courante de vos signets"
+
+#: ../src/common/rendcmn.cpp:194
+#, c-format
+msgid "Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."
+msgstr ""
+"Le moteur de rendu « %s » a une version %d.%d incompatible et n'a pas pu "
+"être chargé."
+
+#: ../src/osx/carbon/dataview.cpp:1430
+msgid "Rendering failed."
+msgstr "Échec du rendu."
+
+#: ../src/richtext/richtextbuffer.cpp:4214
+msgid "Renumber List"
+msgstr "Renuméroter la liste"
+
+#: ../src/common/stockitem.cpp:188
+msgid "Rep&lace"
+msgstr "Remp&lacer"
+
+#: ../src/richtext/richtextctrl.cpp:3277 ../src/common/stockitem.cpp:188
+msgid "Replace"
+msgstr "Remplacer"
+
+#: ../src/generic/fdrepdlg.cpp:182
+msgid "Replace &all"
+msgstr "Rempl&acer tout"
+
+#: ../src/common/stockitem.cpp:261
+msgid "Replace selection"
+msgstr "Remplacer la sélection"
+
+#: ../src/generic/fdrepdlg.cpp:124
+msgid "Replace with:"
+msgstr "Remplacer par :"
+
+#: ../src/common/valtext.cpp:161
+msgid "Required information entry is empty."
+msgstr ""
+
+#: ../src/common/translation.cpp:1966
+#, c-format
+msgid "Resource '%s' is not a valid message catalog."
+msgstr "La ressource « %s » n'est pas un catalogue messages valide."
+
+#: ../src/common/stockitem.cpp:189
+msgid "Revert to Saved"
+msgstr "Changer en enregistré"
+
+#: ../src/richtext/richtextborderspage.cpp:548
+#, fuzzy
+msgid "Ridge"
+msgstr "Droite"
+
+#: ../src/richtext/richtextliststylepage.cpp:251
+#: ../src/richtext/richtextbulletspage.cpp:201
+#: ../src/richtext/richtextsizepage.cpp:250
+msgid "Right"
+msgstr "Droite"
+
+#: ../src/generic/prntdlgg.cpp:892
+msgid "Right margin (mm):"
+msgstr "Marge droite (mm) :"
+
+#: ../src/richtext/richtextindentspage.cpp:148
+#: ../src/richtext/richtextindentspage.cpp:150
+#: ../src/richtext/richtextliststylepage.cpp:337
+#: ../src/richtext/richtextliststylepage.cpp:339
+msgid "Right-align text."
+msgstr "Alignement à droite du texte"
+
+#: ../src/generic/fontdlgg.cpp:322
+msgid "Roman"
+msgstr "Roman"
+
+#: ../src/richtext/richtextliststylepage.cpp:299
+#: ../src/richtext/richtextbulletspage.cpp:252
+msgid "S&tandard bullet name:"
+msgstr "Nom s&tandard de tiret:"
+
+#: ../src/common/accelcmn.cpp:82
+msgid "SCROLL_LOCK"
+msgstr "SCROLL_LOCK"
+
+#: ../src/common/accelcmn.cpp:71
+msgid "SELECT"
+msgstr "SELECTION"
+
+#: ../src/common/accelcmn.cpp:77
+msgid "SEPARATOR"
+msgstr "SEPARATEUR"
+
+#: ../src/common/accelcmn.cpp:74
+msgid "SNAPSHOT"
+msgstr "CAPTURE_D_ECRAN"
+
+#: ../src/common/accelcmn.cpp:62
+msgid "SPACE"
+msgstr "ESPACE"
+
+#: ../src/common/accelcmn.cpp:257 ../src/common/accelcmn.cpp:339
+msgid "SPECIAL"
+msgstr "SPECIAL"
+
+#: ../src/common/accelcmn.cpp:78
+msgid "SUBTRACT"
+msgstr "SOUSTRAIRE"
+
+#: ../src/common/stockitem.cpp:190 ../src/common/sizer.cpp:2678
+msgid "Save"
+msgstr "Enregistrer"
+
+#: ../src/common/fldlgcmn.cpp:327
+#, c-format
+msgid "Save %s file"
+msgstr "Enregistrer le fichier %s"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save &As..."
+msgstr "Enregistrer &sous..."
+
+#: ../src/common/docview.cpp:360
+msgid "Save As"
+msgstr "Enregistrer Sous"
+
+#: ../src/common/stockitem.cpp:191
+msgid "Save as"
+msgstr "Enregistrer sous"
+
+#: ../src/common/stockitem.cpp:267
+msgid "Save current document"
+msgstr "Enregistrer le document courant"
+
+#: ../src/common/stockitem.cpp:268
+msgid "Save current document with a different filename"
+msgstr "Enregistrer le document courant avec un nouveau nom"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save log contents to file"
+msgstr "Enregistrer le contenu du journal dans un fichier"
+
+#: ../src/generic/fontdlgg.cpp:325
+msgid "Script"
+msgstr "Script"
+
+#: ../src/generic/srchctlg.cpp:67 ../src/html/helpwnd.cpp:548
+#: ../src/html/helpwnd.cpp:563
+msgid "Search"
+msgstr "Chercher"
+
+#: ../src/html/helpwnd.cpp:550
+msgid ""
+"Search contents of help book(s) for all occurrences of the text you typed "
+"above"
+msgstr ""
+"Rechercher dans le contenu du/des manuel(s) d'aide toutes les occurrences du "
+"texte que vous avez tapé ci-dessus"
+
+#: ../src/generic/fdrepdlg.cpp:160
+msgid "Search direction"
+msgstr "Direction de la recherche"
+
+#: ../src/generic/fdrepdlg.cpp:112
+msgid "Search for:"
+msgstr "Chercher :"
+
+#: ../src/html/helpwnd.cpp:1065
+msgid "Search in all books"
+msgstr "Chercher dans tous les manuels"
+
+#: ../src/html/helpwnd.cpp:870
+msgid "Searching..."
+msgstr "Recherche..."
+
+#: ../src/generic/dirctrlg.cpp:546
+msgid "Sections"
+msgstr "Sections"
+
+#: ../src/common/ffile.cpp:220
+#, c-format
+msgid "Seek error on file '%s'"
+msgstr "Erreur de recherche dans le fichier « %s »"
+
+#: ../src/common/ffile.cpp:210
+#, c-format
+msgid "Seek error on file '%s' (large files not supported by stdio)"
+msgstr ""
+"Erreur de recherche dans le fichier « %s » (les fichiers importants ne sont "
+"pas gérés par stdio)"
+
+#: ../src/richtext/richtextctrl.cpp:330 ../src/osx/textctrl_osx.cpp:587
+#: ../src/common/stockitem.cpp:192 ../src/msw/textctrl.cpp:2288
+msgid "Select &All"
+msgstr "&Tout sélectionner"
+
+#: ../src/common/stockitem.cpp:192 ../src/stc/stc_i18n.cpp:21
+msgid "Select All"
+msgstr "Tout sélectionner"
+
+#: ../src/common/docview.cpp:1877
+msgid "Select a document template"
+msgstr "Sélectionner un modèle de document"
+
+#: ../src/common/docview.cpp:1951
+msgid "Select a document view"
+msgstr "Sélectionner une vue du document"
+
+#: ../src/richtext/richtextfontpage.cpp:235
+#: ../src/richtext/richtextfontpage.cpp:237
+msgid "Select regular or bold."
+msgstr "Choisir normal ou gras."
+
+#: ../src/richtext/richtextfontpage.cpp:222
+#: ../src/richtext/richtextfontpage.cpp:224
+msgid "Select regular or italic style."
+msgstr "Choisir normal ou italique."
+
+#: ../src/richtext/richtextfontpage.cpp:248
+#: ../src/richtext/richtextfontpage.cpp:250
+msgid "Select underlining or no underlining."
+msgstr "Choisir normal ou souligné."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Selection"
+msgstr "Sélection"
+
+#: ../src/richtext/richtextliststylepage.cpp:187
+#: ../src/richtext/richtextliststylepage.cpp:189
+msgid "Selects the list level to edit."
+msgstr "Choisissez le niveau de liste à éditer."
+
+#: ../src/common/cmdline.cpp:918
+#, c-format
+msgid "Separator expected after the option '%s'."
+msgstr "Séparateur attendu après l'option « %s »."
+
+#: ../src/richtext/richtextbuffer.cpp:10513
+msgid "Set Cell Style"
+msgstr "Définir le Style de Cellule"
+
+#: ../include/wx/xtiprop.h:179
+msgid "SetProperty called w/o valid setter"
+msgstr "SetProperty appelé sans monteur valable"
+
+#: ../src/common/filename.cpp:2632
+msgid "Setting directory access times is not supported under this OS version"
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:188
+msgid "Setup..."
+msgstr "Configurer..."
+
+#: ../src/msw/dialup.cpp:563
+msgid "Several active dialup connections found, choosing one randomly."
+msgstr "Plusieurs connexions actives trouvées, sélection unique aléatoire."
+
+#: ../src/common/accelcmn.cpp:324
+msgid "Shift+"
+msgstr "Majuscule+"
+
+#: ../src/generic/dirdlgg.cpp:170
+msgid "Show &hidden directories"
+msgstr "Montrer les répertoires cac&hés"
+
+#: ../src/generic/filectrlg.cpp:1003
+msgid "Show &hidden files"
+msgstr "Montrer les fichiers cac&hés"
+
+#: ../src/osx/menu_osx.cpp:605 ../src/osx/menu_osx.cpp:652
+msgid "Show All"
+msgstr "Tout Montrer"
+
+#: ../src/common/stockitem.cpp:257
+msgid "Show about dialog"
+msgstr "Montrer la fenêtre d'à propos"
+
+#: ../src/html/helpwnd.cpp:502
+msgid "Show all"
+msgstr "Tout montrer"
+
+#: ../src/html/helpwnd.cpp:513
+msgid "Show all items in index"
+msgstr "Montrer tous les éléments de l'index"
+
+#: ../src/generic/dirdlgg.cpp:105
+msgid "Show hidden directories"
+msgstr "Montrer les répertoires cachés"
+
+#: ../src/html/helpwnd.cpp:671
+msgid "Show/hide navigation panel"
+msgstr "Montrer/cacher le panneau de navigation"
+
+#: ../src/richtext/richtextsymboldlg.cpp:421
+#: ../src/richtext/richtextsymboldlg.cpp:423
+msgid "Shows a Unicode subset."
+msgstr "Affiche un échantillon d'Unicode"
+
+#: ../src/richtext/richtextliststylepage.cpp:472
+#: ../src/richtext/richtextliststylepage.cpp:474
+#: ../src/richtext/richtextbulletspage.cpp:276
+#: ../src/richtext/richtextbulletspage.cpp:278
+msgid "Shows a preview of the bullet settings."
+msgstr "Affiche un aperçu des réglages pour les tirets."
+
+#: ../src/richtext/richtextfontpage.cpp:322
+#: ../src/richtext/richtextfontpage.cpp:324
+msgid "Shows a preview of the font settings."
+msgstr "Affiche un aperçu de réglages de la police."
+
+#: ../src/osx/carbon/fontdlg.cpp:580 ../src/osx/carbon/fontdlg.cpp:582
+msgid "Shows a preview of the font."
+msgstr "Montre un aperçu de la liste."
+
+#: ../src/richtext/richtextindentspage.cpp:303
+#: ../src/richtext/richtextindentspage.cpp:305
+msgid "Shows a preview of the paragraph settings."
+msgstr "Affiche un aperçu des réglages de paragraphe."
+
+#: ../src/generic/fontdlgg.cpp:460 ../src/generic/fontdlgg.cpp:462
+msgid "Shows the font preview."
+msgstr "Montrer un aperçu des polices."
+
+#: ../src/univ/themes/mono.cpp:516
+msgid "Simple monochrome theme"
+msgstr "Simple thème monochrome"
+
+#: ../src/richtext/richtextindentspage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:449
+msgid "Single"
+msgstr "Simple"
+
+#: ../src/generic/filectrlg.cpp:460 ../src/richtext/richtextformatdlg.cpp:356
+#: ../src/richtext/richtextsizepage.cpp:299
+msgid "Size"
+msgstr "Taille"
+
+#: ../src/osx/carbon/fontdlg.cpp:525
+msgid "Size:"
+msgstr "Taille:"
+
+#: ../src/generic/progdlgg.cpp:262 ../src/generic/progdlgg.cpp:773
+#: ../src/msw/progdlg.cpp:801
+msgid "Skip"
+msgstr "Sauter"
+
+#: ../src/generic/fontdlgg.cpp:330
+msgid "Slant"
+msgstr "Incliné"
+
+#: ../src/richtext/richtextfontpage.cpp:298
+msgid "Small C&apitals"
+msgstr "Petites M&ajuscules"
+
+#: ../src/richtext/richtextborderspage.cpp:543
+msgid "Solid"
+msgstr "Solide"
+
+#: ../src/common/docview.cpp:1773
+msgid "Sorry, could not open this file."
+msgstr "Impossible d'ouvrir ce fichier."
+
+#: ../src/common/prntbase.cpp:2027 ../src/common/prntbase.cpp:2035
+msgid "Sorry, not enough memory to create a preview."
+msgstr "Mémoire insuffisante pour créer un aperçu."
+
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "Sorry, that name is taken. Please choose another."
+msgstr "Désole mais ce nom est déjà pris. Veuillez en choisir un autre."
+
+#: ../src/common/docview.cpp:1796
+msgid "Sorry, the format for this file is unknown."
+msgstr "Format de fichier inconnu."
+
+#: ../src/unix/sound.cpp:492
+msgid "Sound data are in unsupported format."
+msgstr "Format des données sonores non géré."
+
+#: ../src/unix/sound.cpp:477
+#, c-format
+msgid "Sound file '%s' is in unsupported format."
+msgstr "Format du fichier sonore « %s » non géré."
+
+#: ../src/richtext/richtextliststylepage.cpp:467
+msgid "Spacing"
+msgstr "Espacement"
+
+#: ../src/common/stockitem.cpp:197
+msgid "Spell Check"
+msgstr "Vérification Orthographique"
+
+#: ../src/richtext/richtextliststylepage.cpp:490
+#: ../src/richtext/richtextbulletspage.cpp:295
+msgid "Standard"
+msgstr "Standard"
+
+#: ../src/common/paper.cpp:105
+msgid "Statement, 5 1/2 x 8 1/2 in"
+msgstr "Communiqué (5,5 x 8,5 pouces)"
+
+#: ../src/richtext/richtextsizepage.cpp:518
+#: ../src/richtext/richtextsizepage.cpp:523
+msgid "Static"
+msgstr "Statique"
+
+#: ../src/generic/prntdlgg.cpp:204
+msgid "Status:"
+msgstr "État :"
+
+#: ../src/common/stockitem.cpp:198
+msgid "Stop"
+msgstr "Arrêter"
+
+#: ../src/common/stockitem.cpp:199
+msgid "Strikethrough"
+msgstr "Barré"
+
+#: ../src/common/colourcmn.cpp:45
+#, c-format
+msgid "String To Colour : Incorrect colour specification : %s"
+msgstr ""
+"Conversion de chaîne en couleur : spécification de la couleur non valable : "
+"%s"
+
+#: ../src/richtext/richtextformatdlg.cpp:318 ../src/propgrid/advprops.cpp:647
+msgid "Style"
+msgstr "Style"
+
+#: ../include/wx/richtext/richtextstyledlg.h:47
+msgid "Style Organiser"
+msgstr "Organiseur de styles"
+
+#: ../src/osx/carbon/fontdlg.cpp:534
+msgid "Style:"
+msgstr "Style"
+
+#: ../src/richtext/richtextfontpage.cpp:312
+msgid "Subscrip&t"
+msgstr "Indice"
+
+#: ../src/richtext/richtextfontpage.cpp:305
+msgid "Supe&rscript"
+msgstr "Exposant"
+
+#: ../src/common/paper.cpp:151
+msgid "SuperA/SuperA/A4 227 x 356 mm"
+msgstr "SuperA/SuperA/A4 227 x 356 mm"
+
+#: ../src/common/paper.cpp:152
+msgid "SuperB/SuperB/A3 305 x 487 mm"
+msgstr "SuperB/SuperB/A3 305 x 487 mm"
+
+#: ../src/generic/fontdlgg.cpp:326
+msgid "Swiss"
+msgstr "Suisse"
+
+#: ../src/richtext/richtextliststylepage.cpp:488
+#: ../src/richtext/richtextbulletspage.cpp:293
+msgid "Symbol"
+msgstr "Symbole"
+
+#: ../src/richtext/richtextliststylepage.cpp:288
+#: ../src/richtext/richtextbulletspage.cpp:240
+msgid "Symbol &font:"
+msgstr "Police du symbole:"
+
+#: ../include/wx/richtext/richtextsymboldlg.h:47
+msgid "Symbols"
+msgstr "Symboles"
+
+#: ../src/common/accelcmn.cpp:63
+msgid "TAB"
+msgstr "TAB"
+
+#: ../src/common/imagtiff.cpp:372 ../src/common/imagtiff.cpp:385
+#: ../src/common/imagtiff.cpp:744
+msgid "TIFF: Couldn't allocate memory."
+msgstr "TIFF : allocation de mémoire impossible."
+
+#: ../src/common/imagtiff.cpp:304
+msgid "TIFF: Error loading image."
+msgstr "TIFF : erreur au chargement de l'image."
+
+#: ../src/common/imagtiff.cpp:471
+msgid "TIFF: Error reading image."
+msgstr "TIFF : erreur à la lecture de l'image."
+
+#: ../src/common/imagtiff.cpp:611
+msgid "TIFF: Error saving image."
+msgstr "TIFF : erreur à la sauvegarde de l'image."
+
+#: ../src/common/imagtiff.cpp:849
+msgid "TIFF: Error writing image."
+msgstr "TIFF : erreur à l'écriture de l'image."
+
+#: ../src/common/imagtiff.cpp:358
+msgid "TIFF: Image size is abnormally big."
+msgstr "TIFF : La taille de l'image est anormalement grande."
+
+#: ../src/richtext/richtextbuffer.cpp:10794
+msgid "Table Properties"
+msgstr "Propriétés du Tableau"
+
+#: ../src/common/paper.cpp:146
+msgid "Tabloid Extra 11.69 x 18 in"
+msgstr "Tabloïde Extra 11.69 x 18 pouces"
+
+#: ../src/common/paper.cpp:103
+msgid "Tabloid, 11 x 17 in"
+msgstr "Tabloïde (11 x 17 pouces)"
+
+#: ../src/richtext/richtextformatdlg.cpp:336
+msgid "Tabs"
+msgstr "Tabulations"
+
+#: ../src/generic/fontdlgg.cpp:327
+msgid "Teletype"
+msgstr "Télétype"
+
+#: ../src/common/docview.cpp:1878
+msgid "Templates"
+msgstr "Modèles"
+
+#: ../src/osx/carbon/dataview.cpp:2373
+msgid "Text renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:158
+msgid "Thai (ISO-8859-11)"
+msgstr "Thaï (ISO-8859-11)"
+
+#: ../src/common/ftp.cpp:620
+msgid "The FTP server doesn't support passive mode."
+msgstr "Mode passif non géré par le serveur FTP."
+
+#: ../src/common/ftp.cpp:606
+msgid "The FTP server doesn't support the PORT command."
+msgstr "Commande PORT non gérée par le serveur FTP."
+
+#: ../src/richtext/richtextliststylepage.cpp:215
+#: ../src/richtext/richtextliststylepage.cpp:217
+#: ../src/richtext/richtextbulletspage.cpp:164
+#: ../src/richtext/richtextbulletspage.cpp:166
+msgid "The available bullet styles."
+msgstr "Les styles de tirets disponibles."
+
+#: ../src/richtext/richtextstyledlg.cpp:202
+#: ../src/richtext/richtextstyledlg.cpp:204
+msgid "The available styles."
+msgstr "Les styles disponibles."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:139
+#: ../src/richtext/richtextbackgroundpage.cpp:141
+msgid "The background colour."
+msgstr "La couleur d'arrière plan."
+
+#: ../src/richtext/richtextmarginspage.cpp:268
+#: ../src/richtext/richtextmarginspage.cpp:270
+msgid "The bottom margin size."
+msgstr "La taille de la marge inférieure."
+
+#: ../src/richtext/richtextmarginspage.cpp:382
+#: ../src/richtext/richtextmarginspage.cpp:384
+msgid "The bottom padding size."
+msgstr "La taille de l'espacement inférieur."
+
+#: ../src/richtext/richtextsizepage.cpp:639
+#: ../src/richtext/richtextsizepage.cpp:641
+#: ../src/richtext/richtextsizepage.cpp:653
+#: ../src/richtext/richtextsizepage.cpp:655
+msgid "The bottom position."
+msgstr "La position inférieure."
+
+#: ../src/richtext/richtextliststylepage.cpp:254
+#: ../src/richtext/richtextliststylepage.cpp:256
+#: ../src/richtext/richtextliststylepage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:277
+#: ../src/richtext/richtextbulletspage.cpp:204
+#: ../src/richtext/richtextbulletspage.cpp:206
+#: ../src/richtext/richtextbulletspage.cpp:227
+#: ../src/richtext/richtextbulletspage.cpp:229
+msgid "The bullet character."
+msgstr "Le caractère de tiret."
+
+#: ../src/richtext/richtextsymboldlg.cpp:443
+#: ../src/richtext/richtextsymboldlg.cpp:445
+msgid "The character code."
+msgstr "Le code caractère."
+
+#: ../src/common/fontmap.cpp:203
+#, c-format
+msgid ""
+"The charset '%s' is unknown. You may select\n"
+"another charset to replace it with or choose\n"
+"[Cancel] if it cannot be replaced"
+msgstr ""
+"Jeu de caractères « %s » inconnu. Sélectionner un autre en remplacement\n"
+"ou [Annuler] s'il ne peut pas être remplacé"
+
+#: ../src/msw/ole/dataobj.cpp:367
+#, c-format
+msgid "The clipboard format '%d' doesn't exist."
+msgstr "Format « %d » de presse-papiers inexistant."
+
+#: ../src/richtext/richtextstylepage.cpp:128
+#: ../src/richtext/richtextstylepage.cpp:130
+msgid "The default style for the next paragraph."
+msgstr "Le style par défaut pour le paragraphe suivant."
+
+#: ../src/generic/dirdlgg.cpp:231
+#, c-format
+msgid ""
+"The directory '%s' does not exist\n"
+"Create it now?"
+msgstr ""
+"Répertoire « %s » inexistant\n"
+"Le créer maintenant ?"
+
+#: ../src/html/htmprint.cpp:271
+#, c-format
+msgid ""
+"The document \"%s\" doesn't fit on the page horizontally and will be "
+"truncated if printed.\n"
+"\n"
+"Would you like to proceed with printing it nevertheless?"
+msgstr ""
+"Le document \"%s\" ne tient pas sur la page horizontalement et sera tronqué "
+"s'il est imprimé.\n"
+"\n"
+"Voulez-vous néanmoins procéder à l'impression ?"
+
+#: ../src/common/docview.cpp:1184
+#, c-format
+msgid ""
+"The file '%s' doesn't exist and couldn't be opened.\n"
+"It has been removed from the most recently used files list."
+msgstr ""
+"Le fichier « %s » n'existe pas et n'a pas pu être ouvert.\n"
+"Il a été retiré de la liste des fichiers récemment utilisés."
+
+#: ../src/richtext/richtextindentspage.cpp:208
+#: ../src/richtext/richtextindentspage.cpp:210
+#: ../src/richtext/richtextliststylepage.cpp:394
+#: ../src/richtext/richtextliststylepage.cpp:396
+msgid "The first line indent."
+msgstr "Indentation de la première ligne"
+
+#: ../src/gtk/utilsgtk.cpp:427
+msgid "The following standard GTK+ options are also supported:\n"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:414 ../src/generic/fontdlgg.cpp:416
+msgid "The font colour."
+msgstr "Couleur de police."
+
+#: ../src/generic/fontdlgg.cpp:375 ../src/generic/fontdlgg.cpp:377
+msgid "The font family."
+msgstr "Famille de police."
+
+#: ../src/richtext/richtextsymboldlg.cpp:405
+#: ../src/richtext/richtextsymboldlg.cpp:407
+msgid "The font from which to take the symbol."
+msgstr "La police de laquelle prendre le symbole."
+
+#: ../src/generic/fontdlgg.cpp:427 ../src/generic/fontdlgg.cpp:429
+#: ../src/generic/fontdlgg.cpp:434 ../src/generic/fontdlgg.cpp:436
+msgid "The font point size."
+msgstr "Taille du point de la police."
+
+#: ../src/osx/carbon/fontdlg.cpp:529 ../src/osx/carbon/fontdlg.cpp:531
+msgid "The font size in points."
+msgstr "Taille de la police en points."
+
+#: ../src/richtext/richtextfontpage.cpp:190
+#: ../src/richtext/richtextfontpage.cpp:192
+#, fuzzy
+msgid "The font size units, points or pixels."
+msgstr "Taille de la police en points."
+
+#: ../src/generic/fontdlgg.cpp:386 ../src/generic/fontdlgg.cpp:388
+msgid "The font style."
+msgstr "Style de police."
+
+#: ../src/generic/fontdlgg.cpp:397 ../src/generic/fontdlgg.cpp:399
+msgid "The font weight."
+msgstr "Largeur de police."
+
+#: ../src/common/docview.cpp:1465
+#, c-format
+msgid "The format of file '%s' couldn't be determined."
+msgstr "Le format du fichier « %s » n'a pas pu être déterminé."
+
+#: ../src/richtext/richtextindentspage.cpp:199
+#: ../src/richtext/richtextindentspage.cpp:201
+#: ../src/richtext/richtextliststylepage.cpp:385
+#: ../src/richtext/richtextliststylepage.cpp:387
+msgid "The left indent."
+msgstr "L'indentintion de gauche."
+
+#: ../src/richtext/richtextmarginspage.cpp:195
+#: ../src/richtext/richtextmarginspage.cpp:197
+msgid "The left margin size."
+msgstr "La taille de la marge gauche."
+
+#: ../src/richtext/richtextmarginspage.cpp:309
+#: ../src/richtext/richtextmarginspage.cpp:311
+msgid "The left padding size."
+msgstr "La taille de l'espacement gauche."
+
+#: ../src/richtext/richtextsizepage.cpp:534
+#: ../src/richtext/richtextsizepage.cpp:536
+#: ../src/richtext/richtextsizepage.cpp:548
+#: ../src/richtext/richtextsizepage.cpp:550
+msgid "The left position."
+msgstr "La position gauche."
+
+#: ../src/richtext/richtextindentspage.cpp:288
+#: ../src/richtext/richtextindentspage.cpp:290
+#: ../src/richtext/richtextliststylepage.cpp:462
+#: ../src/richtext/richtextliststylepage.cpp:464
+msgid "The line spacing."
+msgstr "'espacemetn interligne."
+
+#: ../src/richtext/richtextbulletspage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:270
+msgid "The list item number."
+msgstr "Le numéro de l'élément de la liste."
+
+#: ../src/msw/ole/automtn.cpp:653
+msgid "The locale ID is unknown."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:366
+#: ../src/richtext/richtextsizepage.cpp:368
+msgid "The object height."
+msgstr "La hauteur de l'objet."
+
+#: ../src/richtext/richtextsizepage.cpp:474
+#: ../src/richtext/richtextsizepage.cpp:476
+msgid "The object maximum height."
+msgstr "La hauteur maximum de l'objet."
+
+#: ../src/richtext/richtextsizepage.cpp:447
+#: ../src/richtext/richtextsizepage.cpp:449
+msgid "The object maximum width."
+msgstr "La largeur maximum de l'objet."
+
+#: ../src/richtext/richtextsizepage.cpp:420
+#: ../src/richtext/richtextsizepage.cpp:422
+msgid "The object minimum height."
+msgstr "La hauteur minimum de l'objet."
+
+#: ../src/richtext/richtextsizepage.cpp:393
+#: ../src/richtext/richtextsizepage.cpp:395
+msgid "The object minimum width."
+msgstr "La largeur minimum de l'objet."
+
+#: ../src/richtext/richtextsizepage.cpp:332
+#: ../src/richtext/richtextsizepage.cpp:334
+msgid "The object width."
+msgstr "La largeur de l'objet."
+
+#: ../src/richtext/richtextindentspage.cpp:227
+#: ../src/richtext/richtextindentspage.cpp:229
+msgid "The outline level."
+msgstr "Le niveau du contour."
+
+#: ../src/common/log.cpp:281
+#, c-format
+msgid "The previous message repeated %lu time."
+msgid_plural "The previous message repeated %lu times."
+msgstr[0] "Le message précédent répété %lu fois."
+msgstr[1] "Le message précédent répété %lu fois."
+
+#: ../src/common/log.cpp:274
+msgid "The previous message repeated once."
+msgstr "Le message précédent répété une fois."
+
+#: ../src/gtk/print.cpp:931 ../src/gtk/print.cpp:1114
+msgid "The print dialog returned an error."
+msgstr "Le dialogue d'impression a retourné une erreur."
+
+#: ../src/richtext/richtextsymboldlg.cpp:462
+#: ../src/richtext/richtextsymboldlg.cpp:464
+msgid "The range to show."
+msgstr "L'intervalle à afficher."
+
+#: ../src/generic/dbgrptg.cpp:322
+msgid ""
+"The report contains the files listed below. If any of these files contain "
+"private information,\n"
+"please uncheck them and they will be removed from the report.\n"
+msgstr ""
+"Le rapport contient les fichiers listés ci-dessous. Si l'un de ces\n"
+"fichiers contient des informations sensibles, le décocher pour le\n"
+"retirer de ce rapport.\n"
+
+#: ../src/common/cmdline.cpp:1083
+#, c-format
+msgid "The required parameter '%s' was not specified."
+msgstr "Paramètre nécessaire « %s » non fourni."
+
+#: ../src/richtext/richtextindentspage.cpp:217
+#: ../src/richtext/richtextindentspage.cpp:219
+#: ../src/richtext/richtextliststylepage.cpp:403
+#: ../src/richtext/richtextliststylepage.cpp:405
+msgid "The right indent."
+msgstr "L'indentation à droite."
+
+#: ../src/richtext/richtextmarginspage.cpp:220
+#: ../src/richtext/richtextmarginspage.cpp:222
+msgid "The right margin size."
+msgstr "La taille de la marge droite."
+
+#: ../src/richtext/richtextmarginspage.cpp:334
+#: ../src/richtext/richtextmarginspage.cpp:336
+msgid "The right padding size."
+msgstr "La taille de l'espacement droit."
+
+#: ../src/richtext/richtextsizepage.cpp:604
+#: ../src/richtext/richtextsizepage.cpp:606
+#: ../src/richtext/richtextsizepage.cpp:618
+#: ../src/richtext/richtextsizepage.cpp:620
+msgid "The right position."
+msgstr "La position droite."
+
+#: ../src/richtext/richtextindentspage.cpp:267
+#: ../src/richtext/richtextliststylepage.cpp:439
+#: ../src/richtext/richtextliststylepage.cpp:441
+msgid "The spacing after the paragraph."
+msgstr "L'espacement après le paragraphe."
+
+#: ../src/richtext/richtextindentspage.cpp:257
+#: ../src/richtext/richtextindentspage.cpp:259
+#: ../src/richtext/richtextliststylepage.cpp:430
+#: ../src/richtext/richtextliststylepage.cpp:432
+msgid "The spacing before the paragraph."
+msgstr "L'espacement avant le paragraphe."
+
+#: ../src/richtext/richtextstylepage.cpp:108
+#: ../src/richtext/richtextstylepage.cpp:110
+msgid "The style name."
+msgstr "Le nom du Style."
+
+#: ../src/richtext/richtextstylepage.cpp:118
+#: ../src/richtext/richtextstylepage.cpp:120
+msgid "The style on which this style is based."
+msgstr "Le style sur lequel ce style est basé."
+
+#: ../src/richtext/richtextstyledlg.cpp:214
+#: ../src/richtext/richtextstyledlg.cpp:216
+msgid "The style preview."
+msgstr "Aperçu des styles."
+
+#: ../src/msw/ole/automtn.cpp:669
+msgid "The system cannot find the file specified."
+msgstr "Le système ne peut pas trouver le fichier spécifié."
+
+#: ../src/richtext/richtexttabspage.cpp:118
+#: ../src/richtext/richtexttabspage.cpp:120
+msgid "The tab position."
+msgstr "La position du taquet de tabulation."
+
+#: ../src/richtext/richtexttabspage.cpp:124
+msgid "The tab positions."
+msgstr "La position des taquets de tabulation."
+
+#: ../src/richtext/richtextctrl.cpp:2705
+msgid "The text couldn't be saved."
+msgstr "Le texte n'a pas pu être enregistré."
+
+#: ../src/richtext/richtextmarginspage.cpp:243
+#: ../src/richtext/richtextmarginspage.cpp:245
+msgid "The top margin size."
+msgstr "La taille de la marge supérieure."
+
+#: ../src/richtext/richtextmarginspage.cpp:357
+#: ../src/richtext/richtextmarginspage.cpp:359
+msgid "The top padding size."
+msgstr "La taille de l'espacement supérieur."
+
+#: ../src/richtext/richtextsizepage.cpp:569
+#: ../src/richtext/richtextsizepage.cpp:571
+#: ../src/richtext/richtextsizepage.cpp:583
+#: ../src/richtext/richtextsizepage.cpp:585
+msgid "The top position."
+msgstr "La position supérieure."
+
+#: ../src/common/cmdline.cpp:1061
+#, c-format
+msgid "The value for the option '%s' must be specified."
+msgstr "La valeur de l'option « %s » doit être précisée."
+
+#: ../src/msw/dialup.cpp:452
+#, c-format
+msgid ""
+"The version of remote access service (RAS) installed on this machine is too "
+"old, please upgrade (the following required function is missing: %s)."
+msgstr ""
+"La version du service d'accès distant (RAS) installée sur cette machine est "
+"trop ancienne. Veuillez la mettre à niveau (la fonction suivante manque : "
+"%s)."
+
+#: ../src/gtk/print.cpp:959
+msgid "The wxGtkPrinterDC cannot be used."
+msgstr "Le wxGtkPrinterDC ne peut être utilisé."
+
+#: ../src/osx/carbon/dataview.cpp:1340
+msgid "There is no column or renderer for the specified column index."
+msgstr ""
+
+#: ../src/richtext/richtextprint.cpp:614 ../src/html/htmprint.cpp:735
+msgid ""
+"There was a problem during page setup: you may need to set a default printer."
+msgstr ""
+"Un problème est apparu lors de la mise en page : la configuration d'une "
+"imprimante par défaut peut être nécessaire."
+
+#: ../src/html/htmprint.cpp:255
+msgid ""
+"This document doesn't fit on the page horizontally and will be truncated "
+"when it is printed."
+msgstr ""
+"Ce document ne tient pas sur la page horizontalement et sera tronqué lors de "
+"l'impression."
+
+#: ../src/common/image.cpp:2716
+#, fuzzy, c-format
+msgid "This is not a %s."
+msgstr "PCX : ce n'est pas un fichier PCX."
+
+#: ../src/common/wincmn.cpp:1653
+msgid "This platform does not support background transparency."
+msgstr "Cette plateforme ne supporte pas la transparence d'arrière plan."
+
+#: ../src/gtk/window.cpp:4317
+msgid ""
+"This program was compiled with a too old version of GTK+, please rebuild "
+"with GTK+ 2.12 or newer."
+msgstr ""
+"Ce programme a été compilé avec une version trop ancienne de GTK+, veuillez "
+"recompiler avec GTK+ 2.12 ou plus récent."
+
+#: ../src/msw/datecontrols.cpp:59
+msgid ""
+"This system doesn't support date controls, please upgrade your version of "
+"comctl32.dll"
+msgstr ""
+"Ce système ne gère pas les contrôles de date, veuillez mettre à niveau votre "
+"version de comctl32.dll"
+
+#: ../src/msw/thread.cpp:1300
+msgid ""
+"Thread module initialization failed: cannot store value in thread local "
+"storage"
+msgstr ""
+"Échec de l'initialisation du module du processus : enregistrement impossible "
+"de la valeur dans le stockage local des processus"
+
+#: ../src/unix/threadpsx.cpp:1758
+msgid "Thread module initialization failed: failed to create thread key"
+msgstr ""
+"Échec de l'initialisation du module du processus : échec de la création de "
+"la clé du processus"
+
+#: ../src/msw/thread.cpp:1288
+msgid ""
+"Thread module initialization failed: impossible to allocate index in thread "
+"local storage"
+msgstr ""
+"Échec de l'initialisation du module du processus : impossible d'allouer un "
+"index dans le stockage local des processus"
+
+#: ../src/unix/threadpsx.cpp:1038
+msgid "Thread priority setting is ignored."
+msgstr "La priorité donnée au processus est ignorée."
+
+#: ../src/msw/mdi.cpp:172
+msgid "Tile &Horizontally"
+msgstr "Répartir &horizontalement"
+
+#: ../src/msw/mdi.cpp:173
+msgid "Tile &Vertically"
+msgstr "Répartir &verticalement"
+
+#: ../src/common/ftp.cpp:202
+msgid "Timeout while waiting for FTP server to connect, try passive mode."
+msgstr ""
+"Temps dépassé lors de la connexion du serveur FTP, essai du mode passif."
+
+#: ../src/os2/timer.cpp:99
+msgid "Timer creation failed."
+msgstr "Échec de la création d'un minuteur."
+
+#: ../src/generic/tipdlg.cpp:220
+msgid "Tip of the Day"
+msgstr "Astuce du Jour"
+
+#: ../src/generic/tipdlg.cpp:154
+msgid "Tips not available, sorry!"
+msgstr "Astuces non disponibles."
+
+#: ../src/generic/prntdlgg.cpp:242
+msgid "To:"
+msgstr "À :"
+
+#: ../src/osx/carbon/dataview.cpp:2451
+msgid "Toggle renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:7983
+msgid "Too many EndStyle calls!"
+msgstr "Trop d'appels à EndStyle !"
+
+#: ../src/common/imagpng.cpp:286
+msgid "Too many colours in PNG, the image may be slightly blurred."
+msgstr "Trop de couleurs dans l'image PNG, elle peut être légèrement trouble."
+
+#: ../src/richtext/richtextsizepage.cpp:286
+#: ../src/richtext/richtextsizepage.cpp:290 ../src/common/stockitem.cpp:200
+msgid "Top"
+msgstr "Haut"
+
+#: ../src/generic/prntdlgg.cpp:881
+msgid "Top margin (mm):"
+msgstr "Marge de haut de page (mm) :"
+
+#: ../src/generic/aboutdlgg.cpp:79
+msgid "Translations by "
+msgstr "Traductions par "
+
+#: ../src/generic/aboutdlgg.cpp:188
+msgid "Translators"
+msgstr "Traducteurs"
+
+#: ../src/propgrid/propgrid.cpp:173
+msgid "True"
+msgstr "Vrai"
+
+#: ../src/common/fs_mem.cpp:227
+#, c-format
+msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!"
+msgstr ""
+"Tentative de suppression du fichier « %s » de la mémoire VFS, mais il n'est "
+"pas chargé."
+
+#: ../src/common/fmapbase.cpp:156
+msgid "Turkish (ISO-8859-9)"
+msgstr "Turc (ISO-8859-9)"
+
+#: ../src/generic/filectrlg.cpp:461
+msgid "Type"
+msgstr "Type"
+
+#: ../src/richtext/richtextfontpage.cpp:160
+#: ../src/richtext/richtextfontpage.cpp:162
+msgid "Type a font name."
+msgstr "Taper le nom d'une police de caractères."
+
+#: ../src/richtext/richtextfontpage.cpp:175
+#: ../src/richtext/richtextfontpage.cpp:177
+msgid "Type a size in points."
+msgstr "Entrez une taille en points."
+
+#: ../src/msw/ole/automtn.cpp:665
+#, c-format
+msgid "Type mismatch in argument %u."
+msgstr ""
+
+#: ../src/common/xtixml.cpp:356 ../src/common/xtixml.cpp:509
+#: ../src/common/xtistrm.cpp:322
+msgid "Type must have enum - long conversion"
+msgstr "Le type doit être énumérable - conversion longue"
+
+#: ../src/propgrid/propgridiface.cpp:382
+#, c-format
+msgid ""
+"Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT "
+"\"%s\"."
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:58
+msgid "UP"
+msgstr "HAUT"
+
+#: ../src/common/paper.cpp:134
+msgid "US Std Fanfold, 14 7/8 x 11 in"
+msgstr "Standard US en accordéon (14,875 x 11 pouces)"
+
+#: ../src/common/fmapbase.cpp:196
+msgid "US-ASCII"
+msgstr "US-ASCII"
+
+#: ../src/unix/fswatcher_inotify.cpp:109
+msgid "Unable to add inotify watch"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:136
+msgid "Unable to add kqueue watch"
+msgstr ""
+
+#: ../include/wx/msw/private/fswatcher.h:142
+msgid "Unable to associate handle with I/O completion port"
+msgstr ""
+
+#: ../include/wx/msw/private/fswatcher.h:125
+#, fuzzy
+msgid "Unable to close I/O completion port handle"
+msgstr "Échec de la fermeture du gestionnaire de fichier"
+
+#: ../src/unix/fswatcher_inotify.cpp:97
+#, fuzzy
+msgid "Unable to close inotify instance"
+msgstr "Échec de la fermeture du gestionnaire de fichier"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:74
+#, c-format
+msgid "Unable to close path '%s'"
+msgstr "Impossible de fermer le chemin « %s »"
+
+#: ../include/wx/msw/private/fswatcher.h:48
+#, c-format
+msgid "Unable to close the handle for '%s'"
+msgstr "Impossible de fermer le gestionnaire pour « %s »"
+
+#: ../include/wx/msw/private/fswatcher.h:240
+#, fuzzy
+msgid "Unable to create I/O completion port"
+msgstr "Impossible de créer TextEncodingConverter"
+
+#: ../src/msw/fswatcher.cpp:84
+#, fuzzy
+msgid "Unable to create IOCP worker thread"
+msgstr "Impossible de créer TextEncodingConverter"
+
+#: ../src/unix/fswatcher_inotify.cpp:74
+#, fuzzy
+msgid "Unable to create inotify instance"
+msgstr "Impossible de créer TextEncodingConverter"
+
+#: ../src/unix/fswatcher_kqueue.cpp:97
+#, fuzzy
+msgid "Unable to create kqueue instance"
+msgstr "Impossible de créer TextEncodingConverter"
+
+#: ../include/wx/msw/private/fswatcher.h:229
+msgid "Unable to dequeue completion packet"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:185
+msgid "Unable to get events from kqueue"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1903
+msgid "Unable to handle native drag&drop data"
+msgstr ""
+
+#: ../src/gtk/app.cpp:439
+msgid "Unable to initialize GTK+, is DISPLAY set properly?"
+msgstr ""
+
+#: ../src/gtk/app.cpp:276
+#, fuzzy
+msgid "Unable to initialize Hildon program"
+msgstr "Échec de l'initialisation d'OpenGL"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:57
+#, c-format
+msgid "Unable to open path '%s'"
+msgstr "Impossible d'ouvrir le chemin « %s »"
+
+#: ../src/html/htmlwin.cpp:561
+#, c-format
+msgid "Unable to open requested HTML document: %s"
+msgstr "Impossible d'ouvrir le document HTML demandé : %s"
+
+#: ../src/unix/sound.cpp:368
+msgid "Unable to play sound asynchronously."
+msgstr "Impossible de jouer les sons de manière non synchrone"
+
+#: ../include/wx/msw/private/fswatcher.h:207
+msgid "Unable to post completion status"
+msgstr ""
+
+#: ../src/unix/fswatcher_inotify.cpp:530
+#, fuzzy
+msgid "Unable to read from inotify descriptor"
+msgstr "impossible de lire le descripteur de fichier %d"
+
+#: ../src/unix/fswatcher_inotify.cpp:132
+msgid "Unable to remove inotify watch"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:153
+msgid "Unable to remove kqueue watch"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:168
+#, fuzzy, c-format
+msgid "Unable to set up watch for '%s'"
+msgstr "Échec de la mise à jour de la date du fichier « %s »"
+
+#: ../src/msw/fswatcher.cpp:91
+msgid "Unable to start IOCP worker thread"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:201
+msgid "Undelete"
+msgstr "Rétablir"
+
+#: ../src/common/stockitem.cpp:202
+msgid "Underline"
+msgstr "Souligner"
+
+#: ../src/richtext/richtextfontpage.cpp:341 ../src/osx/carbon/fontdlg.cpp:556
+#: ../src/propgrid/advprops.cpp:655
+msgid "Underlined"
+msgstr "Souligné"
+
+#: ../src/common/stockitem.cpp:203 ../src/stc/stc_i18n.cpp:15
+msgid "Undo"
+msgstr "Annuler"
+
+#: ../src/common/stockitem.cpp:265
+msgid "Undo last action"
+msgstr "Annuler la dernière action"
+
+#: ../src/common/cmdline.cpp:864
+#, c-format
+msgid "Unexpected characters following option '%s'."
+msgstr "Caractères non attendus suivant l'option « %s »."
+
+#: ../src/unix/fswatcher_inotify.cpp:261
+#, c-format
+msgid "Unexpected event for \"%s\": no matching watch descriptor."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1024
+#, c-format
+msgid "Unexpected parameter '%s'"
+msgstr "Paramètre « %s » inattendu"
+
+#: ../include/wx/msw/private/fswatcher.h:148
+msgid "Unexpectedly new I/O completion port was created"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:70
+#, fuzzy
+msgid "Ungraceful worker thread termination"
+msgstr "Impossible d'attendre la fin du processus"
+
+#: ../src/richtext/richtextsymboldlg.cpp:459
+#: ../src/richtext/richtextsymboldlg.cpp:460
+#: ../src/richtext/richtextsymboldlg.cpp:461
+msgid "Unicode"
+msgstr "Unicode"
+
+#: ../src/common/fmapbase.cpp:185 ../src/common/fmapbase.cpp:191
+msgid "Unicode 16 bit (UTF-16)"
+msgstr "Unicode 16 bit (UTF-16)"
+
+#: ../src/common/fmapbase.cpp:190
+msgid "Unicode 16 bit Big Endian (UTF-16BE)"
+msgstr "Unicode 16 bit gros-boutiste (UTF-16BE)"
+
+#: ../src/common/fmapbase.cpp:186
+msgid "Unicode 16 bit Little Endian (UTF-16LE)"
+msgstr "Unicode 16 bit petit-boutiste (UTF-16LE)"
+
+#: ../src/common/fmapbase.cpp:187 ../src/common/fmapbase.cpp:193
+msgid "Unicode 32 bit (UTF-32)"
+msgstr "Unicode 32 bit (UTF-32)"
+
+#: ../src/common/fmapbase.cpp:192
+msgid "Unicode 32 bit Big Endian (UTF-32BE)"
+msgstr "Unicode 32 bit gros-boutiste (UTF-32BE)"
+
+#: ../src/common/fmapbase.cpp:188
+msgid "Unicode 32 bit Little Endian (UTF-32LE)"
+msgstr "Unicode 32 bit petit-boutiste (UTF-8)"
+
+#: ../src/common/fmapbase.cpp:182
+msgid "Unicode 7 bit (UTF-7)"
+msgstr "Unicode 7 bit (UTF-7)"
+
+#: ../src/common/fmapbase.cpp:183
+msgid "Unicode 8 bit (UTF-8)"
+msgstr "Unicode 8 bit (UTF-8)"
+
+#: ../src/common/stockitem.cpp:204
+msgid "Unindent"
+msgstr "Désindenter"
+
+#: ../src/richtext/richtextborderspage.cpp:373
+#: ../src/richtext/richtextborderspage.cpp:375
+msgid "Units for the bottom border width."
+msgstr "Unités pour l'épaisseur du bord inférieur."
+
+#: ../src/richtext/richtextmarginspage.cpp:278
+#: ../src/richtext/richtextmarginspage.cpp:280
+msgid "Units for the bottom margin."
+msgstr "Unités pour la marge inférieure."
+
+#: ../src/richtext/richtextborderspage.cpp:517
+#: ../src/richtext/richtextborderspage.cpp:519
+msgid "Units for the bottom outline width."
+msgstr "Unités pour l'épaisseur du contour inférieur."
+
+#: ../src/richtext/richtextmarginspage.cpp:392
+#: ../src/richtext/richtextmarginspage.cpp:394
+msgid "Units for the bottom padding."
+msgstr "Unités pour l'espacement inférieur."
+
+#: ../src/richtext/richtextsizepage.cpp:664
+#: ../src/richtext/richtextsizepage.cpp:666
+msgid "Units for the bottom position."
+msgstr "Unités pour la position inférieure."
+
+#: ../src/richtext/richtextborderspage.cpp:283
+#: ../src/richtext/richtextborderspage.cpp:285
+msgid "Units for the left border width."
+msgstr "Unités pour l'épaisseur du bord gauche."
+
+#: ../src/richtext/richtextmarginspage.cpp:205
+#: ../src/richtext/richtextmarginspage.cpp:207
+msgid "Units for the left margin."
+msgstr "Unités pour la marge gauche."
+
+#: ../src/richtext/richtextborderspage.cpp:427
+#: ../src/richtext/richtextborderspage.cpp:429
+msgid "Units for the left outline width."
+msgstr "Unités pour l'épaisseur du contour gauche."
+
+#: ../src/richtext/richtextmarginspage.cpp:319
+#: ../src/richtext/richtextmarginspage.cpp:321
+msgid "Units for the left padding."
+msgstr "Unités pour l'espacement gauche."
+
+#: ../src/richtext/richtextsizepage.cpp:559
+#: ../src/richtext/richtextsizepage.cpp:561
+msgid "Units for the left position."
+msgstr "Unités pour la position gauche."
+
+#: ../src/richtext/richtextsizepage.cpp:485
+#: ../src/richtext/richtextsizepage.cpp:487
+msgid "Units for the maximum object height."
+msgstr "Unités pour la hauteur maximum de l'objet."
+
+#: ../src/richtext/richtextsizepage.cpp:458
+#: ../src/richtext/richtextsizepage.cpp:460
+msgid "Units for the maximum object width."
+msgstr "Unités pour la largeurmaximum de l'objet."
+
+#: ../src/richtext/richtextsizepage.cpp:431
+#: ../src/richtext/richtextsizepage.cpp:433
+msgid "Units for the minimum object height."
+msgstr "Unités pour la hauteur minimum de l'objet."
+
+#: ../src/richtext/richtextsizepage.cpp:404
+#: ../src/richtext/richtextsizepage.cpp:406
+msgid "Units for the minimum object width."
+msgstr "Unités pour la largeur minimum de l'objet."
+
+#: ../src/richtext/richtextsizepage.cpp:377
+#: ../src/richtext/richtextsizepage.cpp:379
+msgid "Units for the object height."
+msgstr "Unités pour la hauteur de l'objet."
+
+#: ../src/richtext/richtextsizepage.cpp:343
+#: ../src/richtext/richtextsizepage.cpp:345
+msgid "Units for the object width."
+msgstr "Unités pour la largeur de l'objet."
+
+#: ../src/richtext/richtextborderspage.cpp:313
+#: ../src/richtext/richtextborderspage.cpp:315
+msgid "Units for the right border width."
+msgstr "Unités pour l'épaisseur du bord droit."
+
+#: ../src/richtext/richtextmarginspage.cpp:230
+#: ../src/richtext/richtextmarginspage.cpp:232
+msgid "Units for the right margin."
+msgstr "Unités pour la marge droite."
+
+#: ../src/richtext/richtextborderspage.cpp:457
+#: ../src/richtext/richtextborderspage.cpp:459
+msgid "Units for the right outline width."
+msgstr "Unités pour l'épaisseur du contour droit."
+
+#: ../src/richtext/richtextmarginspage.cpp:344
+#: ../src/richtext/richtextmarginspage.cpp:346
+msgid "Units for the right padding."
+msgstr "Unités pour l'espacement droit."
+
+#: ../src/richtext/richtextsizepage.cpp:629
+#: ../src/richtext/richtextsizepage.cpp:631
+msgid "Units for the right position."
+msgstr "Unités pour la position droite."
+
+#: ../src/richtext/richtextborderspage.cpp:343
+#: ../src/richtext/richtextborderspage.cpp:345
+msgid "Units for the top border width."
+msgstr "Unités pour l'épaisseur du bord supérieur."
+
+#: ../src/richtext/richtextmarginspage.cpp:253
+#: ../src/richtext/richtextmarginspage.cpp:255
+msgid "Units for the top margin."
+msgstr "Unités pour la marge supérieure."
+
+#: ../src/richtext/richtextborderspage.cpp:487
+#: ../src/richtext/richtextborderspage.cpp:489
+msgid "Units for the top outline width."
+msgstr "Unités pour l'épaisseur du contour supérieur."
+
+#: ../src/richtext/richtextmarginspage.cpp:367
+#: ../src/richtext/richtextmarginspage.cpp:369
+msgid "Units for the top padding."
+msgstr "Unités pour l'espacement supérieur."
+
+#: ../src/richtext/richtextsizepage.cpp:594
+#: ../src/richtext/richtextsizepage.cpp:596
+msgid "Units for the top position."
+msgstr "Unités pour la position supérieure."
+
+#: ../src/generic/progdlgg.cpp:382 ../src/generic/progdlgg.cpp:655
+msgid "Unknown"
+msgstr "Inconnu"
+
+#: ../src/msw/dde.cpp:1177
+#, c-format
+msgid "Unknown DDE error %08x"
+msgstr "Erreur DDE inconnue : %08x"
+
+#: ../src/common/xtistrm.cpp:414
+msgid "Unknown Object passed to GetObjectClassInfo"
+msgstr "Objet inconnu indiqué à GetObjectClassInfo"
+
+#: ../src/common/imagpng.cpp:614
+#, c-format
+msgid "Unknown PNG resolution unit %d"
+msgstr "Unité %d de résolution PNG inconnue"
+
+#: ../src/common/xtixml.cpp:327
+#, c-format
+msgid "Unknown Property %s"
+msgstr "Propriété « %s » inconnue"
+
+#: ../src/common/imagtiff.cpp:532
+#, c-format
+msgid "Unknown TIFF resolution unit %d ignored"
+msgstr "Résolution TIFF inconnue Unité %d ignorée"
+
+#: ../src/osx/carbon/dataview.cpp:1978
+msgid "Unknown data format"
+msgstr "Format de donnée inconnu"
+
+#: ../src/unix/dlunix.cpp:325
+msgid "Unknown dynamic library error"
+msgstr "Erreur de bibliothèque dynamique inconnue"
+
+#: ../src/common/fmapbase.cpp:810
+#, c-format
+msgid "Unknown encoding (%d)"
+msgstr "Codage inconnu (%d)"
+
+#: ../src/msw/ole/automtn.cpp:677
+#, c-format
+msgid "Unknown error %08x"
+msgstr "Erreur inconnue %08x"
+
+#: ../src/msw/ole/automtn.cpp:636
+msgid "Unknown exception"
+msgstr "Exception inconnue"
+
+#: ../src/common/image.cpp:2701
+msgid "Unknown image data format."
+msgstr "Format de données d'image inconnu."
+
+#: ../src/common/cmdline.cpp:749
+#, c-format
+msgid "Unknown long option '%s'"
+msgstr "Option longue « %s » inconnue"
+
+#: ../src/msw/ole/automtn.cpp:620
+msgid "Unknown name or named argument."
+msgstr "Nom ou argument nommé inconnu."
+
+#: ../src/common/cmdline.cpp:764 ../src/common/cmdline.cpp:786
+#, c-format
+msgid "Unknown option '%s'"
+msgstr "Option « %s » inconnue"
+
+#: ../src/common/mimecmn.cpp:230
+#, c-format
+msgid "Unmatched '{' in an entry for mime type %s."
+msgstr "Symbole « { » non assorti dans une entrée pour le type mime %s."
+
+#: ../src/common/cmdproc.cpp:262 ../src/common/cmdproc.cpp:288
+#: ../src/common/cmdproc.cpp:308
+msgid "Unnamed command"
+msgstr "Commande sans nom"
+
+#: ../src/propgrid/propgrid.cpp:398
+msgid "Unspecified"
+msgstr "Non-spécifié"
+
+#: ../src/msw/clipbrd.cpp:271 ../src/msw/clipbrd.cpp:439
+msgid "Unsupported clipboard format."
+msgstr "Format de presse-papiers non géré."
+
+#: ../src/common/appcmn.cpp:249
+#, c-format
+msgid "Unsupported theme '%s'."
+msgstr "Thème « %s » non géré."
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:205
+msgid "Up"
+msgstr "Haut"
+
+#: ../src/richtext/richtextliststylepage.cpp:483
+#: ../src/richtext/richtextbulletspage.cpp:288
+msgid "Upper case letters"
+msgstr "Lettres majuscules"
+
+#: ../src/richtext/richtextliststylepage.cpp:485
+#: ../src/richtext/richtextbulletspage.cpp:290
+msgid "Upper case roman numerals"
+msgstr "Chiffres romains majuscules"
+
+#: ../src/common/cmdline.cpp:1155
+#, c-format
+msgid "Usage: %s"
+msgstr "Utilisation : %s"
+
+#: ../src/richtext/richtextindentspage.cpp:169
+#: ../src/richtext/richtextindentspage.cpp:171
+#: ../src/richtext/richtextliststylepage.cpp:358
+#: ../src/richtext/richtextliststylepage.cpp:360
+msgid "Use the current alignment setting."
+msgstr "Utiliser les réglages courants d'alignement."
+
+#: ../src/osx/carbon/dataview.cpp:2658 ../src/osx/carbon/dataview.cpp:2723
+msgid "Valid pointer to native data view control does not exist"
+msgstr ""
+
+#: ../src/common/valtext.cpp:174
+msgid "Validation conflict"
+msgstr "Conflit de validation"
+
+#: ../src/propgrid/manager.cpp:238
+msgid "Value"
+msgstr "Valeur"
+
+#: ../src/propgrid/props.cpp:384
+#, c-format
+msgid "Value must be %s or higher."
+msgstr "La valeur doit être %s ou plus."
+
+#: ../src/propgrid/props.cpp:411
+#, c-format
+msgid "Value must be %s or less."
+msgstr "La valeur doit être %s ou moins."
+
+#: ../src/propgrid/props.cpp:388 ../src/propgrid/props.cpp:415
+#, c-format
+msgid "Value must be between %s and %s."
+msgstr "La valeur doit être entre %s et %s."
+
+#: ../src/generic/aboutdlgg.cpp:128
+msgid "Version "
+msgstr "Version "
+
+#: ../src/richtext/richtextsizepage.cpp:291
+#: ../src/richtext/richtextsizepage.cpp:293
+msgid "Vertical alignment."
+msgstr "Alignement vertical."
+
+#: ../src/generic/filedlgg.cpp:216
+msgid "View files as a detailed view"
+msgstr "Voir les fichiers - vue détaillée"
+
+#: ../src/generic/filedlgg.cpp:214
+msgid "View files as a list view"
+msgstr "Voir les fichiers - liste"
+
+#: ../src/common/docview.cpp:1952
+msgid "Views"
+msgstr "Vues"
+
+#: ../src/common/accelcmn.cpp:108
+msgid "WINDOWS_LEFT"
+msgstr "WINDOWS_GAUCHE"
+
+#: ../src/common/accelcmn.cpp:110
+msgid "WINDOWS_MENU"
+msgstr "WINDOWS_MENU"
+
+#: ../src/common/accelcmn.cpp:109
+msgid "WINDOWS_RIGHT"
+msgstr "WINDOWS_DROITE"
+
+#: ../src/unix/epolldispatcher.cpp:213
+#, fuzzy, c-format
+msgid "Waiting for IO on epoll descriptor %d failed"
+msgstr "Échec de l'attente de fin du sous-processus"
+
+#: ../src/common/log.cpp:227
+msgid "Warning: "
+msgstr "Avertissement :"
+
+#: ../src/propgrid/advprops.cpp:651
+msgid "Weight"
+msgstr "Poids"
+
+#: ../src/common/fmapbase.cpp:148
+msgid "Western European (ISO-8859-1)"
+msgstr "Europe de l'Ouest (ISO-8859-1)"
+
+#: ../src/common/fmapbase.cpp:162
+msgid "Western European with Euro (ISO-8859-15)"
+msgstr "Europe de l'Ouest avec l'Euro (ISO-8859-15)"
+
+#: ../src/generic/fontdlgg.cpp:446 ../src/generic/fontdlgg.cpp:448
+msgid "Whether the font is underlined."
+msgstr "Si la police est soulignée."
+
+#: ../src/generic/fdrepdlg.cpp:144
+msgid "Whole word"
+msgstr "Mot complet"
+
+#: ../src/html/helpwnd.cpp:547
+msgid "Whole words only"
+msgstr "Mots complets seulement"
+
+#: ../src/univ/themes/win32.cpp:1102
+msgid "Win32 theme"
+msgstr "Thème Win32"
+
+#: ../src/msw/utils.cpp:1220
+msgid "Win32s on Windows 3.1"
+msgstr "Win32s sur Windows 3.1"
+
+#: ../src/msw/utils.cpp:1270
+msgid "Windows 2000"
+msgstr "Windows 2000"
+
+#: ../src/msw/utils.cpp:1302
+msgid "Windows 7"
+msgstr "Windows 7"
+
+#: ../src/msw/utils.cpp:1234
+msgid "Windows 95"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1230
+msgid "Windows 95 OSR2"
+msgstr "Windows 95 OSR2"
+
+#: ../src/msw/utils.cpp:1245
+msgid "Windows 98"
+msgstr "Windows 98"
+
+#: ../src/msw/utils.cpp:1241
+msgid "Windows 98 SE"
+msgstr "Windows 98 SE"
+
+#: ../src/msw/utils.cpp:1252
+#, c-format
+msgid "Windows 9x (%d.%d)"
+msgstr "Windows 9x (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:177
+msgid "Windows Arabic (CP 1256)"
+msgstr "Arabe limité à Windows (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:178
+msgid "Windows Baltic (CP 1257)"
+msgstr "Balte limité à Windows (CP 1257)"
+
+#: ../src/msw/utils.cpp:1214
+#, c-format
+msgid "Windows CE (%d.%d)"
+msgstr "Windows CE (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:171
+msgid "Windows Central European (CP 1250)"
+msgstr "Européen central limité à Windows (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:168
+msgid "Windows Chinese Simplified (CP 936) or GB-2312"
+msgstr "Chinois Simplifié Windows (CP 936) ou GB-2312"
+
+#: ../src/common/fmapbase.cpp:170
+msgid "Windows Chinese Traditional (CP 950) or Big-5"
+msgstr "Chinois Traditionnel Windows (CP 950) ou Big-5"
+
+#: ../src/common/fmapbase.cpp:172
+msgid "Windows Cyrillic (CP 1251)"
+msgstr "Cyrillique limité à Windows (CP 1251)"
+
+#: ../src/common/fmapbase.cpp:174
+msgid "Windows Greek (CP 1253)"
+msgstr "Grec limité à Windows (CP 1253)"
+
+#: ../src/common/fmapbase.cpp:176
+msgid "Windows Hebrew (CP 1255)"
+msgstr "Hébreu limité à Windows (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:167
+msgid "Windows Japanese (CP 932) or Shift-JIS"
+msgstr "Japonais Windows (CP 932) ou Shift-JIS"
+
+#: ../src/common/fmapbase.cpp:180
+msgid "Windows Johab (CP 1361)"
+msgstr "Johab Windows (CP 1361)"
+
+#: ../src/common/fmapbase.cpp:169
+msgid "Windows Korean (CP 949)"
+msgstr "Coréen limité à Windows (CP 949)"
+
+#: ../src/msw/utils.cpp:1249
+msgid "Windows ME"
+msgstr "Windows ME"
+
+#: ../src/msw/utils.cpp:1310
+#, c-format
+msgid "Windows NT %lu.%lu"
+msgstr "Windows NT %lu.%lu"
+
+#: ../src/msw/utils.cpp:1279
+msgid "Windows Server 2003"
+msgstr "Windows Server 2003"
+
+#: ../src/msw/utils.cpp:1295
+msgid "Windows Server 2008"
+msgstr "Windows Server 2008"
+
+#: ../src/msw/utils.cpp:1301
+msgid "Windows Server 2008 R2"
+msgstr "Windows Server 2008 R2"
+
+#: ../src/common/fmapbase.cpp:166
+msgid "Windows Thai (CP 874)"
+msgstr "Windows Thai (CP 874)"
+
+#: ../src/common/fmapbase.cpp:175
+msgid "Windows Turkish (CP 1254)"
+msgstr "Turc limité à Windows (CP 1254)"
+
+#: ../src/common/fmapbase.cpp:179
+msgid "Windows Vietnamese (CP 1258)"
+msgstr "Vietnamien Windows (CP 1258)"
+
+#: ../src/msw/utils.cpp:1296
+msgid "Windows Vista"
+msgstr "Windows Vista"
+
+#: ../src/common/fmapbase.cpp:173
+msgid "Windows Western European (CP 1252)"
+msgstr "Européen occidental limité à Windows (CP 1252 )"
+
+#: ../src/msw/utils.cpp:1285
+msgid "Windows XP"
+msgstr "Windows XP"
+
+#: ../src/common/fmapbase.cpp:181
+msgid "Windows/DOS OEM (CP 437)"
+msgstr "Windows/DOS OEM (CP 437)"
+
+#: ../src/common/fmapbase.cpp:165
+msgid "Windows/DOS OEM Cyrillic (CP 866)"
+msgstr "Cyrillique OEM Windows/DOS (CP 866)"
+
+#: ../src/common/ffile.cpp:148
+#, c-format
+msgid "Write error on file '%s'"
+msgstr "Erreur d'écriture dans le fichier « %s »"
+
+#: ../src/xml/xml.cpp:844
+#, c-format
+msgid "XML parsing error: '%s' at line %d"
+msgstr "Erreur d'analyse XML : « %s » à la ligne %d"
+
+#: ../src/common/xpmdecod.cpp:796
+msgid "XPM: Malformed pixel data!"
+msgstr "XPM : données de pixel malformées."
+
+#: ../src/common/xpmdecod.cpp:705
+#, c-format
+msgid "XPM: incorrect colour description in line %d"
+msgstr "XPM : définition de couleur incorrecte à la ligne %d"
+
+#: ../src/common/xpmdecod.cpp:680
+msgid "XPM: incorrect header format!"
+msgstr "XPM: format de l'entête incorrecte !"
+
+#: ../src/common/xpmdecod.cpp:716 ../src/common/xpmdecod.cpp:725
+#, c-format
+msgid "XPM: malformed colour definition '%s' at line %d!"
+msgstr "XPM : définition de couleur « %s » malformée à la ligne %d !"
+
+#: ../src/common/xpmdecod.cpp:755
+msgid "XPM: no colors left to use for mask!"
+msgstr "XPM : pas de couleur restant à utiliser comme masque !"
+
+#: ../src/common/xpmdecod.cpp:782
+#, c-format
+msgid "XPM: truncated image data at line %d!"
+msgstr "XPM: les données de l'image sont tronquées à la ligne %d !"
+
+#: ../include/wx/msgdlg.h:271 ../src/common/stockitem.cpp:206
+#: ../src/motif/msgdlg.cpp:196
+msgid "Yes"
+msgstr "Oui"
+
+#: ../src/osx/carbon/overlay.cpp:155
+msgid "You cannot Clear an overlay that is not inited"
+msgstr ""
+"Vous ne pouvez pas effectuer un Clear sur une zone de recouvrement avant "
+"qu'elle ne soit initialisée."
+
+#: ../src/osx/carbon/overlay.cpp:107 ../src/dfb/overlay.cpp:61
+msgid "You cannot Init an overlay twice"
+msgstr "Vous ne pouvez pas initialiser deux fois un overlay"
+
+#: ../src/generic/dirdlgg.cpp:316
+msgid "You cannot add a new directory to this section."
+msgstr "Vous ne pouvez pas ajouter de nouveau répertoire à cette section."
+
+#: ../src/propgrid/propgrid.cpp:3258
+msgid "You have entered invalid value. Press ESC to cancel editing."
+msgstr ""
+"Vous avez entrée une valeur invalide. Pressez ESC pour annuler l'édition."
+
+#: ../src/common/stockitem.cpp:209
+msgid "Zoom &In"
+msgstr "Zoom &avant"
+
+#: ../src/common/stockitem.cpp:210
+msgid "Zoom &Out"
+msgstr "Zoom a&rrière"
+
+#: ../src/common/stockitem.cpp:209 ../src/common/prntbase.cpp:1564
+msgid "Zoom In"
+msgstr "Zoom Avant"
+
+#: ../src/common/stockitem.cpp:210 ../src/common/prntbase.cpp:1550
+msgid "Zoom Out"
+msgstr "Zoom Arrière"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to &Fit"
+msgstr "Zoom a&justé"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to Fit"
+msgstr "Zoom Ajusté"
+
+#: ../src/msw/dde.cpp:1144
+msgid "a DDEML application has created a prolonged race condition."
+msgstr "une application DDEML a créé une situation de concurrence prolongée."
+
+#: ../src/msw/dde.cpp:1132
+msgid ""
+"a DDEML function was called without first calling the DdeInitialize "
+"function,\n"
+"or an invalid instance identifier\n"
+"was passed to a DDEML function."
+msgstr ""
+"une fonction DDEML a été appelée sans appel préalable à la fonction\n"
+"DdeInitialize, ou un identifiant non valable a été fourni à la fonction\n"
+"DDEML."
+
+#: ../src/msw/dde.cpp:1150
+msgid "a client's attempt to establish a conversation has failed."
+msgstr "une tentative d'un client pour établir une conversation a échoué."
+
+#: ../src/msw/dde.cpp:1147
+msgid "a memory allocation failed."
+msgstr "une allocation de mémoire a échoué."
+
+#: ../src/msw/dde.cpp:1141
+msgid "a parameter failed to be validated by the DDEML."
+msgstr "un paramètre n'a pas pu être validé par la DDEML."
+
+#: ../src/msw/dde.cpp:1123
+msgid "a request for a synchronous advise transaction has timed out."
+msgstr "une demande de transaction synchrone d'instructions a expiré."
+
+#: ../src/msw/dde.cpp:1129
+msgid "a request for a synchronous data transaction has timed out."
+msgstr "une demande de transaction synchrone de données a expiré."
+
+#: ../src/msw/dde.cpp:1138
+msgid "a request for a synchronous execute transaction has timed out."
+msgstr "une demande de transaction synchrone d'exécutions a expiré."
+
+#: ../src/msw/dde.cpp:1156
+msgid "a request for a synchronous poke transaction has timed out."
+msgstr "une demande de transaction synchrone de stockage a expiré."
+
+#: ../src/msw/dde.cpp:1171
+msgid "a request to end an advise transaction has timed out."
+msgstr "une demande pour terminer une transaction d'instructions a expiré."
+
+#: ../src/msw/dde.cpp:1165
+msgid ""
+"a server-side transaction was attempted on a conversation\n"
+"that was terminated by the client, or the server\n"
+"terminated before completing a transaction."
+msgstr ""
+"une transaction a été tentée du côté serveur lors d'une conversation déjà\n"
+"terminée par le client, ou le serveur a achevé la transaction avant la fin."
+
+#: ../src/msw/dde.cpp:1153
+msgid "a transaction failed."
+msgstr "une transaction a échoué."
+
+#: ../src/common/accelcmn.cpp:184
+msgid "alt"
+msgstr "alt"
+
+#: ../src/msw/dde.cpp:1135
+msgid ""
+"an application initialized as APPCLASS_MONITOR has\n"
+"attempted to perform a DDE transaction,\n"
+"or an application initialized as APPCMD_CLIENTONLY has \n"
+"attempted to perform server transactions."
+msgstr ""
+"une application initialisée en tant que APPCLASS_MONITOR a tenté\n"
+"d'effectuer une transaction DDE, ou une application initialisée en tant\n"
+"que APPCMD_CLIENTONLY a tenté d'effectuer des transactions serveur."
+
+#: ../src/msw/dde.cpp:1159
+msgid "an internal call to the PostMessage function has failed. "
+msgstr "un appel interne à la fonction PostMessage a échoué."
+
+#: ../src/msw/dde.cpp:1168
+msgid "an internal error has occurred in the DDEML."
+msgstr "une erreur interne s'est produite dans le DDEML."
+
+#: ../src/msw/dde.cpp:1174
+msgid ""
+"an invalid transaction identifier was passed to a DDEML function.\n"
+"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n"
+"the transaction identifier for that callback is no longer valid."
+msgstr ""
+"un identifiant de transaction non valable a été fourni à la fonction DDEML.\n"
+"Quand l'application sort d'un rappel XTYP_XACT_COMPLETE, l'identifiant de\n"
+"transaction pour ce rappel n'est plus valable."
+
+#: ../src/common/zipstrm.cpp:1272
+msgid "assuming this is a multi-part zip concatenated"
+msgstr "suppose qu'il s'agit d'un zip recombiné"
+
+#: ../src/common/fileconf.cpp:1882
+#, c-format
+msgid "attempt to change immutable key '%s' ignored."
+msgstr "tentative de modifier la touche non configurable « %s » ignorée."
+
+#: ../src/html/chm.cpp:329
+msgid "bad arguments to library function"
+msgstr "mauvais paramètres à la fonction de bibliothèque"
+
+#: ../src/html/chm.cpp:341
+msgid "bad signature"
+msgstr "mauvaise signature"
+
+#: ../src/common/zipstrm.cpp:1715
+msgid "bad zipfile offset to entry"
+msgstr "Mauvais décalage de fichier zip dans l'entrée"
+
+#: ../src/common/ftp.cpp:405
+msgid "binary"
+msgstr "binaire"
+
+#: ../src/common/fontcmn.cpp:978
+msgid "bold"
+msgstr "gras"
+
+#: ../src/os2/iniconf.cpp:463
+msgid "buffer is too small for Windows directory."
+msgstr "Le tampon est trop petit pour le dossier Windows."
+
+#: ../src/msw/utils.cpp:1316
+#, fuzzy, c-format
+msgid "build %lu"
+msgstr "Windows XP (construction %lu"
+
+#: ../src/common/ffile.cpp:79
+#, c-format
+msgid "can't close file '%s'"
+msgstr "impossible de fermer le fichier « %s »"
+
+#: ../src/common/file.cpp:278
+#, c-format
+msgid "can't close file descriptor %d"
+msgstr "impossible de fermer le descripteur de fichier %d"
+
+#: ../src/common/file.cpp:604
+#, c-format
+msgid "can't commit changes to file '%s'"
+msgstr "impossible d'appliquer les changements au fichier « %s »"
+
+#: ../src/common/file.cpp:212
+#, c-format
+msgid "can't create file '%s'"
+msgstr "impossible de créer le fichier « %s »"
+
+#: ../src/common/fileconf.cpp:1176
+#, c-format
+msgid "can't delete user configuration file '%s'"
+msgstr "impossible d'effacer le fichier de configuration utilisateur « %s »"
+
+#: ../src/common/file.cpp:511
+#, c-format
+msgid "can't determine if the end of file is reached on descriptor %d"
+msgstr ""
+"impossible de déterminer si la fin du fichier est atteinte dans le "
+"descripteur %d"
+
+#: ../src/msdos/utilsdos.cpp:310 ../src/msdos/utilsdos.cpp:475
+#, c-format
+msgid "can't execute '%s'"
+msgstr "Échec de l'exécution de « %s »"
+
+#: ../src/common/zipstrm.cpp:1490
+msgid "can't find central directory in zip"
+msgstr "impossible de trouver le répertoire principale dans le zip"
+
+#: ../src/common/file.cpp:481
+#, c-format
+msgid "can't find length of file on file descriptor %d"
+msgstr ""
+"impossible de trouver la taille du fichier dans le descripteur de fichier %d"
+
+#: ../src/msw/utils.cpp:373
+msgid "can't find user's HOME, using current directory."
+msgstr ""
+"impossible de trouver le répertoire HOME de l'utilisateur - utilisation du "
+"répertoire courant."
+
+#: ../src/common/file.cpp:382
+#, c-format
+msgid "can't flush file descriptor %d"
+msgstr ""
+"impossible de forcer l'écriture sur disque du descripteur de fichier %d"
+
+#: ../src/common/file.cpp:438 ../src/msw/wince/filefnwce.cpp:204
+#, c-format
+msgid "can't get seek position on file descriptor %d"
+msgstr ""
+"impossible de trouver la position de recherche sur le descripteur de fichier "
+"%d"
+
+#: ../src/common/fontmap.cpp:325
+msgid "can't load any font, aborting"
+msgstr "impossible de charger une police de caractères - abandon"
+
+#: ../src/common/file.cpp:264 ../src/common/ffile.cpp:63
+#, c-format
+msgid "can't open file '%s'"
+msgstr "impossible d'ouvrir le fichier « %s »"
+
+#: ../src/common/fileconf.cpp:351
+#, c-format
+msgid "can't open global configuration file '%s'."
+msgstr "impossible d'ouvrir le fichier de configuration global « %s »."
+
+#: ../src/common/fileconf.cpp:367
+#, c-format
+msgid "can't open user configuration file '%s'."
+msgstr "impossible d'ouvrir le fichier de configuration utilisateur « %s »."
+
+#: ../src/common/fileconf.cpp:1017
+msgid "can't open user configuration file."
+msgstr "impossible d'ouvrir le fichier de configuration utilisateur."
+
+#: ../src/common/zipstrm.cpp:527
+msgid "can't re-initialize zlib deflate stream"
+msgstr "impossible de réinitialiser le flux de déchargement de zlib"
+
+#: ../src/common/zipstrm.cpp:552
+msgid "can't re-initialize zlib inflate stream"
+msgstr "impossible de réinitialiser le flux de chargement de zlib"
+
+#: ../src/common/file.cpp:334
+#, c-format
+msgid "can't read from file descriptor %d"
+msgstr "impossible de lire le descripteur de fichier %d"
+
+#: ../src/common/file.cpp:599
+#, c-format
+msgid "can't remove file '%s'"
+msgstr "impossible de supprimer le fichier « %s »"
+
+#: ../src/common/file.cpp:616
+#, c-format
+msgid "can't remove temporary file '%s'"
+msgstr "impossible de supprimer le fichier temporaire « %s »"
+
+#: ../src/common/file.cpp:424 ../src/msw/wince/filefnwce.cpp:190
+#, c-format
+msgid "can't seek on file descriptor %d"
+msgstr "recherche impossible sur le descripteur de fichier %d"
+
+#: ../src/common/textfile.cpp:299
+#, c-format
+msgid "can't write buffer '%s' to disk."
+msgstr "impossible d'écrire le tampon « %s » sur le disque."
+
+#: ../src/common/file.cpp:350
+#, c-format
+msgid "can't write to file descriptor %d"
+msgstr "impossible d'écrire dans le descripteur de fichier %d"
+
+#: ../src/common/fileconf.cpp:1031
+msgid "can't write user configuration file."
+msgstr "impossible d'écrire le fichier de configuration utilisateur."
+
+#: ../src/html/chm.cpp:345
+msgid "checksum error"
+msgstr "erreur de la somme de contrôle"
+
+#: ../src/common/tarstrm.cpp:820
+msgid "checksum failure reading tar header block"
+msgstr ""
+"Erreur de la somme de contrôle lors de la lecture du bloc d'entête de tar"
+
+#: ../src/richtext/richtextborderspage.cpp:280
+#: ../src/richtext/richtextborderspage.cpp:310
+#: ../src/richtext/richtextborderspage.cpp:340
+#: ../src/richtext/richtextborderspage.cpp:370
+#: ../src/richtext/richtextborderspage.cpp:424
+#: ../src/richtext/richtextborderspage.cpp:454
+#: ../src/richtext/richtextborderspage.cpp:484
+#: ../src/richtext/richtextborderspage.cpp:514
+#: ../src/richtext/richtextmarginspage.cpp:202
+#: ../src/richtext/richtextmarginspage.cpp:227
+#: ../src/richtext/richtextmarginspage.cpp:250
+#: ../src/richtext/richtextmarginspage.cpp:275
+#: ../src/richtext/richtextmarginspage.cpp:316
+#: ../src/richtext/richtextmarginspage.cpp:341
+#: ../src/richtext/richtextmarginspage.cpp:364
+#: ../src/richtext/richtextmarginspage.cpp:389
+#: ../src/richtext/richtextsizepage.cpp:339
+#: ../src/richtext/richtextsizepage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:400
+#: ../src/richtext/richtextsizepage.cpp:427
+#: ../src/richtext/richtextsizepage.cpp:454
+#: ../src/richtext/richtextsizepage.cpp:481
+#: ../src/richtext/richtextsizepage.cpp:555
+#: ../src/richtext/richtextsizepage.cpp:590
+#: ../src/richtext/richtextsizepage.cpp:625
+#: ../src/richtext/richtextsizepage.cpp:660
+msgid "cm"
+msgstr "cm"
+
+#: ../src/html/chm.cpp:347
+msgid "compression error"
+msgstr "erreur de compression"
+
+#: ../src/common/regex.cpp:239
+msgid "conversion to 8-bit encoding failed"
+msgstr "échec de la conversion dans un codage 8 bits"
+
+#: ../src/common/accelcmn.cpp:182
+msgid "ctrl"
+msgstr "ctrl"
+
+#: ../src/common/cmdline.cpp:1323
+msgid "date"
+msgstr "date"
+
+#: ../src/html/chm.cpp:349
+msgid "decompression error"
+msgstr "erreur de décompression"
+
+#: ../src/richtext/richtextstyles.cpp:780 ../src/common/fmapbase.cpp:820
+msgid "default"
+msgstr "défaut"
+
+#: ../src/common/cmdline.cpp:1319
+msgid "double"
+msgstr "double"
+
+#: ../src/common/debugrpt.cpp:543
+msgid "dump of the process state (binary)"
+msgstr "Décharger l'état du processus (binaire)"
+
+#: ../src/common/datetimefmt.cpp:1936
+msgid "eighteenth"
+msgstr "dix-huitième"
+
+#: ../src/common/datetimefmt.cpp:1926
+msgid "eighth"
+msgstr "huitième"
+
+#: ../src/common/datetimefmt.cpp:1929
+msgid "eleventh"
+msgstr "onzième"
+
+#: ../src/common/fileconf.cpp:1868
+#, c-format
+msgid "entry '%s' appears more than once in group '%s'"
+msgstr "l'entrée « %s » apparaît plus d'une fois dans le groupe « %s »"
+
+#: ../src/html/chm.cpp:343
+msgid "error in data format"
+msgstr "erreur dans le format des données"
+
+#: ../src/msdos/utilsdos.cpp:413
+#, c-format
+msgid "error opening '%s'"
+msgstr "erreur à l'ouverture du fichier « %s »"
+
+#: ../src/html/chm.cpp:331
+msgid "error opening file"
+msgstr "erreur à l'ouverture du fichier"
+
+#: ../src/common/zipstrm.cpp:1576
+msgid "error reading zip central directory"
+msgstr "erreur à la lecture du répertoire principale du zip"
+
+#: ../src/common/zipstrm.cpp:1667
+msgid "error reading zip local header"
+msgstr "erreur à la lecture de l'en-tête local du zip"
+
+#: ../src/common/zipstrm.cpp:2396
+#, c-format
+msgid "error writing zip entry '%s': bad crc or length"
+msgstr "erreur à l'écriture de l'entrée zip « %s » : mauvaise crc ou longueur"
+
+#: ../src/common/ffile.cpp:170
+#, c-format
+msgid "failed to flush the file '%s'"
+msgstr "échec de la mise à jour du fichier « %s »"
+
+#: ../src/common/datetimefmt.cpp:1933
+msgid "fifteenth"
+msgstr "quinzième"
+
+#: ../src/common/datetimefmt.cpp:1923
+msgid "fifth"
+msgstr "cinquième"
+
+#: ../src/common/fileconf.cpp:610
+#, c-format
+msgid "file '%s', line %d: '%s' ignored after group header."
+msgstr ""
+"fichier « %s », ligne %d : « %s » est ignoré après l'en-tête de groupe."
+
+#: ../src/common/fileconf.cpp:639
+#, c-format
+msgid "file '%s', line %d: '=' expected."
+msgstr "fichier « %s », ligne %d : symbole « = » attendu."
+
+#: ../src/common/fileconf.cpp:662
+#, c-format
+msgid "file '%s', line %d: key '%s' was first found at line %d."
+msgstr ""
+"fichier « %s », ligne %d : première occurrence de la clé %s à la ligne %d."
+
+#: ../src/common/fileconf.cpp:652
+#, c-format
+msgid "file '%s', line %d: value for immutable key '%s' ignored."
+msgstr ""
+"fichier « %s », ligne %d : valeur pour la touche non configurable « %s » "
+"ignorée."
+
+#: ../src/common/fileconf.cpp:574
+#, c-format
+msgid "file '%s': unexpected character %c at line %d."
+msgstr "fichier %s : caractère %c inattendu a la ligne %d."
+
+#: ../src/richtext/richtextbuffer.cpp:8358
+msgid "files"
+msgstr "Fichiers"
+
+#: ../src/common/datetimefmt.cpp:1919
+msgid "first"
+msgstr "premier"
+
+#: ../src/html/helpwnd.cpp:1265
+msgid "font size"
+msgstr "taille de police"
+
+#: ../src/common/datetimefmt.cpp:1932
+msgid "fourteenth"
+msgstr "quatorzième"
+
+#: ../src/common/datetimefmt.cpp:1922
+msgid "fourth"
+msgstr "quatrième"
+
+#: ../src/common/appbase.cpp:695
+msgid "generate verbose log messages"
+msgstr "créer des messages de journalisation verbeux"
+
+#: ../src/richtext/richtextbuffer.cpp:12212
+#: ../src/richtext/richtextbuffer.cpp:12322
+msgid "image"
+msgstr "image"
+
+#: ../src/common/tarstrm.cpp:796
+msgid "incomplete header block in tar"
+msgstr "le bloc d'entête de tar est incomplet"
+
+#: ../src/common/xtixml.cpp:489
+msgid "incorrect event handler string, missing dot"
+msgstr "chaîne de gestion des événements non valable, point manquant"
+
+#: ../src/common/tarstrm.cpp:1381
+msgid "incorrect size given for tar entry"
+msgstr "la taille fournie pour l'entrée tar est incorrecte"
+
+#: ../src/common/tarstrm.cpp:993
+msgid "invalid data in extended tar header"
+msgstr "donnée invalide dans l'entête étendu de tar"
+
+#: ../src/generic/logg.cpp:1050
+msgid "invalid message box return value"
+msgstr "la boîte de message a renvoyé une valeur non valable"
+
+#: ../src/common/zipstrm.cpp:1445
+msgid "invalid zip file"
+msgstr "fichier zip non valable"
+
+#: ../src/common/fontcmn.cpp:983
+msgid "italic"
+msgstr "italique"
+
+#: ../src/common/fontcmn.cpp:973
+msgid "light"
+msgstr "léger"
+
+#: ../src/common/intl.cpp:293
+#, c-format
+msgid "locale '%s' cannot be set."
+msgstr "la locale « %s » ne peut pas être spécifiée."
+
+#: ../src/common/datetimefmt.cpp:2092
+msgid "midnight"
+msgstr "minuit"
+
+#: ../src/common/datetimefmt.cpp:1937
+msgid "nineteenth"
+msgstr "dix-neuvième"
+
+#: ../src/common/datetimefmt.cpp:1927
+msgid "ninth"
+msgstr "neuvième"
+
+#: ../src/msw/dde.cpp:1119
+msgid "no DDE error."
+msgstr "erreur - pas de DDE."
+
+#: ../src/html/chm.cpp:327
+msgid "no error"
+msgstr "aucune erreur"
+
+#: ../src/dfb/fontmgr.cpp:174
+#, c-format
+msgid "no fonts found in %s, using builtin font"
+msgstr ""
+
+#: ../src/html/helpdata.cpp:655
+msgid "noname"
+msgstr "pas de nom"
+
+#: ../src/common/datetimefmt.cpp:2091
+msgid "noon"
+msgstr "midi"
+
+#: ../src/richtext/richtextstyles.cpp:779
+msgid "normal"
+msgstr "normal"
+
+#: ../src/gtk/print.cpp:1218 ../src/gtk/print.cpp:1323
+msgid "not implemented"
+msgstr "non implémenté"
+
+#: ../src/common/cmdline.cpp:1315
+msgid "num"
+msgstr "num"
+
+#: ../src/common/xtixml.cpp:259
+msgid "objects cannot have XML Text Nodes"
+msgstr "les objets ne peuvent pas avoir de noeuds texte XML"
+
+#: ../src/html/chm.cpp:339
+msgid "out of memory"
+msgstr "capacité mémoire dépassée"
+
+#: ../src/richtext/richtextsizepage.cpp:340
+#: ../src/richtext/richtextsizepage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:401
+#: ../src/richtext/richtextsizepage.cpp:428
+#: ../src/richtext/richtextsizepage.cpp:455
+#: ../src/richtext/richtextsizepage.cpp:482
+#: ../src/richtext/richtextsizepage.cpp:556
+#: ../src/richtext/richtextsizepage.cpp:591
+#: ../src/richtext/richtextsizepage.cpp:626
+#: ../src/richtext/richtextsizepage.cpp:661
+msgid "percent"
+msgstr "pourcent"
+
+#: ../src/common/debugrpt.cpp:519
+msgid "process context description"
+msgstr "description du contexte du processus"
+
+#: ../src/richtext/richtextfontpage.cpp:186
+#: ../src/richtext/richtextfontpage.cpp:189
+msgid "pt"
+msgstr "pt"
+
+#: ../src/richtext/richtextfontpage.cpp:187
+#: ../src/richtext/richtextborderspage.cpp:279
+#: ../src/richtext/richtextborderspage.cpp:281
+#: ../src/richtext/richtextborderspage.cpp:282
+#: ../src/richtext/richtextborderspage.cpp:309
+#: ../src/richtext/richtextborderspage.cpp:311
+#: ../src/richtext/richtextborderspage.cpp:312
+#: ../src/richtext/richtextborderspage.cpp:339
+#: ../src/richtext/richtextborderspage.cpp:341
+#: ../src/richtext/richtextborderspage.cpp:342
+#: ../src/richtext/richtextborderspage.cpp:369
+#: ../src/richtext/richtextborderspage.cpp:371
+#: ../src/richtext/richtextborderspage.cpp:372
+#: ../src/richtext/richtextborderspage.cpp:423
+#: ../src/richtext/richtextborderspage.cpp:425
+#: ../src/richtext/richtextborderspage.cpp:426
+#: ../src/richtext/richtextborderspage.cpp:453
+#: ../src/richtext/richtextborderspage.cpp:455
+#: ../src/richtext/richtextborderspage.cpp:456
+#: ../src/richtext/richtextborderspage.cpp:483
+#: ../src/richtext/richtextborderspage.cpp:485
+#: ../src/richtext/richtextborderspage.cpp:486
+#: ../src/richtext/richtextborderspage.cpp:513
+#: ../src/richtext/richtextborderspage.cpp:515
+#: ../src/richtext/richtextborderspage.cpp:516
+#: ../src/richtext/richtextmarginspage.cpp:201
+#: ../src/richtext/richtextmarginspage.cpp:203
+#: ../src/richtext/richtextmarginspage.cpp:204
+#: ../src/richtext/richtextmarginspage.cpp:226
+#: ../src/richtext/richtextmarginspage.cpp:228
+#: ../src/richtext/richtextmarginspage.cpp:229
+#: ../src/richtext/richtextmarginspage.cpp:249
+#: ../src/richtext/richtextmarginspage.cpp:251
+#: ../src/richtext/richtextmarginspage.cpp:252
+#: ../src/richtext/richtextmarginspage.cpp:274
+#: ../src/richtext/richtextmarginspage.cpp:276
+#: ../src/richtext/richtextmarginspage.cpp:277
+#: ../src/richtext/richtextmarginspage.cpp:315
+#: ../src/richtext/richtextmarginspage.cpp:317
+#: ../src/richtext/richtextmarginspage.cpp:318
+#: ../src/richtext/richtextmarginspage.cpp:340
+#: ../src/richtext/richtextmarginspage.cpp:342
+#: ../src/richtext/richtextmarginspage.cpp:343
+#: ../src/richtext/richtextmarginspage.cpp:363
+#: ../src/richtext/richtextmarginspage.cpp:365
+#: ../src/richtext/richtextmarginspage.cpp:366
+#: ../src/richtext/richtextmarginspage.cpp:388
+#: ../src/richtext/richtextmarginspage.cpp:390
+#: ../src/richtext/richtextmarginspage.cpp:391
+#: ../src/richtext/richtextsizepage.cpp:338
+#: ../src/richtext/richtextsizepage.cpp:341
+#: ../src/richtext/richtextsizepage.cpp:342
+#: ../src/richtext/richtextsizepage.cpp:372
+#: ../src/richtext/richtextsizepage.cpp:375
+#: ../src/richtext/richtextsizepage.cpp:376
+#: ../src/richtext/richtextsizepage.cpp:399
+#: ../src/richtext/richtextsizepage.cpp:402
+#: ../src/richtext/richtextsizepage.cpp:403
+#: ../src/richtext/richtextsizepage.cpp:426
+#: ../src/richtext/richtextsizepage.cpp:429
+#: ../src/richtext/richtextsizepage.cpp:430
+#: ../src/richtext/richtextsizepage.cpp:453
+#: ../src/richtext/richtextsizepage.cpp:456
+#: ../src/richtext/richtextsizepage.cpp:457
+#: ../src/richtext/richtextsizepage.cpp:480
+#: ../src/richtext/richtextsizepage.cpp:483
+#: ../src/richtext/richtextsizepage.cpp:484
+#: ../src/richtext/richtextsizepage.cpp:554
+#: ../src/richtext/richtextsizepage.cpp:557
+#: ../src/richtext/richtextsizepage.cpp:558
+#: ../src/richtext/richtextsizepage.cpp:589
+#: ../src/richtext/richtextsizepage.cpp:592
+#: ../src/richtext/richtextsizepage.cpp:593
+#: ../src/richtext/richtextsizepage.cpp:624
+#: ../src/richtext/richtextsizepage.cpp:627
+#: ../src/richtext/richtextsizepage.cpp:628
+#: ../src/richtext/richtextsizepage.cpp:659
+#: ../src/richtext/richtextsizepage.cpp:662
+#: ../src/richtext/richtextsizepage.cpp:663
+msgid "px"
+msgstr "px"
+
+#: ../src/common/accelcmn.cpp:188
+#, fuzzy
+msgid "rawctrl"
+msgstr "ctrl"
+
+#: ../src/html/chm.cpp:333
+msgid "read error"
+msgstr "erreur de lecture"
+
+#: ../src/common/zipstrm.cpp:1882
+#, c-format
+msgid "reading zip stream (entry %s): bad crc"
+msgstr "lecture du flux zip (entrée %s) : mauvaise crc"
+
+#: ../src/common/zipstrm.cpp:1877
+#, c-format
+msgid "reading zip stream (entry %s): bad length"
+msgstr "lecture du flux zip (entrée %s) : mauvaise longueur"
+
+#: ../src/msw/dde.cpp:1162
+msgid "reentrancy problem."
+msgstr "problème de double entrée."
+
+#: ../src/common/datetimefmt.cpp:1920
+msgid "second"
+msgstr "deuxième"
+
+#: ../src/html/chm.cpp:337
+msgid "seek error"
+msgstr "erreur de recherche"
+
+#: ../src/common/datetimefmt.cpp:1935
+msgid "seventeenth"
+msgstr "dix-septième"
+
+#: ../src/common/datetimefmt.cpp:1925
+msgid "seventh"
+msgstr "septième"
+
+#: ../src/common/accelcmn.cpp:186
+msgid "shift"
+msgstr "majuscule"
+
+#: ../src/common/appbase.cpp:685
+msgid "show this help message"
+msgstr "montrer ce message d'aide"
+
+#: ../src/common/datetimefmt.cpp:1934
+msgid "sixteenth"
+msgstr "seizième"
+
+#: ../src/common/datetimefmt.cpp:1924
+msgid "sixth"
+msgstr "sixième"
+
+#: ../src/common/appcmn.cpp:227
+msgid "specify display mode to use (e.g. 640x480-16)"
+msgstr "spécifier le mode d'affichage à utiliser (par ex. 640x480-16)"
+
+#: ../src/common/appcmn.cpp:213
+msgid "specify the theme to use"
+msgstr "spécifier le thème à utiliser"
+
+#: ../src/richtext/richtextbuffer.cpp:8876
+msgid "standard/circle"
+msgstr "standard/circulaire"
+
+#: ../src/richtext/richtextbuffer.cpp:8877
+msgid "standard/circle-outline"
+msgstr "standard/contour circulaire"
+
+#: ../src/richtext/richtextbuffer.cpp:8879
+msgid "standard/diamond"
+msgstr "standard/diamant"
+
+#: ../src/richtext/richtextbuffer.cpp:8878
+msgid "standard/square"
+msgstr "standard/carré"
+
+#: ../src/richtext/richtextbuffer.cpp:8880
+msgid "standard/triangle"
+msgstr "standard/triangle"
+
+#: ../src/common/zipstrm.cpp:1782
+msgid "stored file length not in Zip header"
+msgstr "longueur du fichier enregistré absente de l'en-tête du Zip"
+
+#: ../src/common/cmdline.cpp:1311
+msgid "str"
+msgstr "str"
+
+#: ../src/common/fontcmn.cpp:794 ../src/common/fontcmn.cpp:969
+msgid "strikethrough"
+msgstr "barré"
+
+#: ../src/common/tarstrm.cpp:1003 ../src/common/tarstrm.cpp:1025
+#: ../src/common/tarstrm.cpp:1507 ../src/common/tarstrm.cpp:1529
+msgid "tar entry not open"
+msgstr "l'entrée tar n'est pas ouverte"
+
+#: ../src/common/datetimefmt.cpp:1928
+msgid "tenth"
+msgstr "dixième"
+
+#: ../src/msw/dde.cpp:1126
+msgid "the response to the transaction caused the DDE_FBUSY bit to be set."
+msgstr ""
+"la réponse à la transaction a provoqué la spécification du bit DDE_FBUSY."
+
+#: ../src/common/datetimefmt.cpp:1921
+msgid "third"
+msgstr "troisième"
+
+#: ../src/common/datetimefmt.cpp:1931
+msgid "thirteenth"
+msgstr "treizième"
+
+#: ../src/common/datetimefmt.cpp:1725
+msgid "today"
+msgstr "aujourd'hui"
+
+#: ../src/common/datetimefmt.cpp:1727
+msgid "tomorrow"
+msgstr "demain"
+
+#: ../src/common/fileconf.cpp:1979
+#, c-format
+msgid "trailing backslash ignored in '%s'"
+msgstr "anti-slash de fin ignoré dans '%s'"
+
+#: ../src/gtk/aboutdlg.cpp:218
+msgid "translator-credits"
+msgstr "Liste des traducteurs"
+
+#: ../src/common/datetimefmt.cpp:1930
+msgid "twelfth"
+msgstr "douzième"
+
+#: ../src/common/datetimefmt.cpp:1938
+msgid "twentieth"
+msgstr "vingtième"
+
+#: ../src/common/fontcmn.cpp:789 ../src/common/fontcmn.cpp:965
+msgid "underlined"
+msgstr "souligné"
+
+#: ../src/common/fileconf.cpp:2014
+#, c-format
+msgid "unexpected \" at position %d in '%s'."
+msgstr "symbole \" inattendu à la position %d dans « %s »."
+
+#: ../src/common/tarstrm.cpp:1045
+msgid "unexpected end of file"
+msgstr "Fin de fichier inattendue"
+
+#: ../src/generic/progdlgg.cpp:399 ../src/common/tarstrm.cpp:371
+#: ../src/common/tarstrm.cpp:394 ../src/common/tarstrm.cpp:425
+msgid "unknown"
+msgstr "inconnu"
+
+#: ../src/common/xtixml.cpp:253
+#, c-format
+msgid "unknown class %s"
+msgstr "classe « %s » inconnue"
+
+#: ../src/common/regex.cpp:261 ../src/html/chm.cpp:351
+msgid "unknown error"
+msgstr "erreur inconnue"
+
+#: ../src/msw/dialup.cpp:490
+#, c-format
+msgid "unknown error (error code %08x)."
+msgstr "erreur inconnue (code d'erreur %08x)."
+
+#: ../src/msw/wince/filefnwce.cpp:172
+msgid "unknown seek origin"
+msgstr "origine de la recherche inconnue"
+
+#: ../src/common/fmapbase.cpp:834
+#, c-format
+msgid "unknown-%d"
+msgstr "inconnu-%d"
+
+#: ../src/common/docview.cpp:507
+msgid "unnamed"
+msgstr "sans nom"
+
+#: ../src/common/docview.cpp:1606
+#, c-format
+msgid "unnamed%d"
+msgstr "sans nom %d"
+
+#: ../src/common/zipstrm.cpp:1796 ../src/common/zipstrm.cpp:2184
+msgid "unsupported Zip compression method"
+msgstr "méthode de compression zip non gérée"
+
+#: ../src/common/translation.cpp:1883
+#, c-format
+msgid "using catalog '%s' from '%s'."
+msgstr "utilisation du catalogue « %s » de « %s »."
+
+#: ../src/html/chm.cpp:335
+msgid "write error"
+msgstr "erreur d'écriture"
+
+#: ../src/common/time.cpp:318
+msgid "wxGetTimeOfDay failed."
+msgstr "wxGetTimeOfDay a échoué."
+
+#: ../src/gtk/print.cpp:987
+msgid "wxPrintout::GetPageInfo gives a null maxPage."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1303
+msgid "wxWidget control pointer is not a data view pointer"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:907
+#, fuzzy
+msgid "wxWidget's control not initialized."
+msgstr "Impossible d'initialiser l'affichage."
+
+#: ../src/motif/app.cpp:245
+#, c-format
+msgid "wxWidgets could not open display for '%s': exiting."
+msgstr "wxWidgets n'a pas pu ouvrir d'affichage pour %s : abandon."
+
+#: ../src/x11/app.cpp:164
+msgid "wxWidgets could not open display. Exiting."
+msgstr "wxWidgets n'a pas pu ouvrir d'affichage : abandon."
+
+#: ../src/richtext/richtextsymboldlg.cpp:434
+msgid "xxxx"
+msgstr "xxxx"
+
+#: ../src/common/datetimefmt.cpp:1726
+msgid "yesterday"
+msgstr "hier"
+
+#: ../src/common/zstream.cpp:251 ../src/common/zstream.cpp:426
+#, c-format
+msgid "zlib error %d"
+msgstr "erreur zlib %d"
+
+#: ../src/richtext/richtextliststylepage.cpp:496
+#: ../src/richtext/richtextbulletspage.cpp:301
+msgid "~"
+msgstr "~"
+
+#~ msgid "Print preview"
+#~ msgstr "Aperçu avant impression"
+
+#, fuzzy
+#~ msgid "&Preview..."
+#~ msgstr " Aperçu"
+
+#, fuzzy
+#~ msgid "Preview..."
+#~ msgstr " Aperçu"
+
+#, fuzzy
+#~ msgid "The vertical offset relative to the paragraph."
+#~ msgstr "Le style par défaut pour le paragraphe suivant."
+
+#~ msgid "&Save..."
+#~ msgstr "&Enregistrer..."
+
+#~ msgid "About "
+#~ msgstr "À propos"
+
+#~ msgid "All files (*.*)|*"
+#~ msgstr "Tous les fichiers (*.*)|*"
+
+#~ msgid "Cannot initialize SciTech MGL!"
+#~ msgstr "Impossible d'initialiser SciTech MGL."
+
+#~ msgid "Cannot initialize display."
+#~ msgstr "Impossible d'initialiser l'affichage."
+
+#~ msgid "Cannot start thread: error writing TLS"
+#~ msgstr ""
+#~ "Impossible de lancer le processus : erreur lors de l'écriture de TLS"
+
+#~ msgid "Close\tAlt-F4"
+#~ msgstr "Fermer\tAlt-F4"
+
+#~ msgid "Couldn't create cursor."
+#~ msgstr "Impossible de créer un curseur."
+
+#~ msgid "Directory '%s' doesn't exist!"
+#~ msgstr "Répertoire « %s » inexistant."
+
+#~ msgid "File %s does not exist."
+#~ msgstr "Fichier « %s » inexistant."
+
+#~ msgid "Mode %ix%i-%i not available."
+#~ msgstr "Le mode %ix%i-%i n'est pas disponible."
+
+#~ msgid "Paper Size"
+#~ msgstr "Taille de la page"
+
+#~ msgid "%.*f GB"
+#~ msgstr "%.*f GB"
+
+#~ msgid "%.*f MB"
+#~ msgstr "%.*f MB"
+
+#~ msgid "%.*f TB"
+#~ msgstr "%.*f TB"
+
+#~ msgid "%.*f kB"
+#~ msgstr "%.*f kB"
+
+#, fuzzy
+#~ msgid "%s"
+#~ msgstr "%s B"
+
+#~ msgid "%s B"
+#~ msgstr "%s B"
+
+#~ msgid "&Goto..."
+#~ msgstr "&Aller à..."
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">>|"
+#~ msgstr ">>|"
+
+#~ msgid "Archive doesnt contain #SYSTEM file"
+#~ msgstr "L'archive ne contient pas de fichier #SYSTEM"
+
+#~ msgid "BIG5"
+#~ msgstr "BIG5"
+
+#~ msgid "Can't check image format of file '%s': file does not exist."
+#~ msgstr ""
+#~ "Impossible de vérifier le format d'image du fichier « %s » : le fichier "
+#~ "n'existe pas."
+
+#~ msgid "Can't load image from file '%s': file does not exist."
+#~ msgstr ""
+#~ "Impossible de charger l'image du fichier « %s » : le fichier n'existe pas."
+
+#~ msgid "Cannot convert dialog units: dialog unknown."
+#~ msgstr ""
+#~ "Impossible de convertir les unités de la fenêtre de dialogue : fenêtre de "
+#~ "dialogue inconnue."
+
+#~ msgid "Cannot convert from the charset '%s'!"
+#~ msgstr "Impossible de convertir depuis le jeu de caractères « %s »."
+
+#~ msgid "Cannot find container for unknown control '%s'."
+#~ msgstr "Impossible de trouver un conteneur pour le contrôle inconnu « %s »"
+
+#~ msgid "Cannot find font node '%s'."
+#~ msgstr "Impossible de trouver le noeud de la police de caractères « %s »."
+
+#~ msgid "Cannot open file '%s'."
+#~ msgstr "Impossible d'ouvrir le fichier « %s »."
+
+#~ msgid "Cannot parse coordinates from '%s'."
+#~ msgstr "Impossible de parcourir les coordonnées dans « %s »."
+
+#~ msgid "Cannot parse dimension from '%s'."
+#~ msgstr "Impossible de parcourir les dimensions dans « %s »."
+
+#~ msgid "Cant create the thread event queue"
+#~ msgstr "Impossible de créer la queue d'événements du processus"
+
+#~ msgid "Click to cancel this window."
+#~ msgstr "Cliquez pour annuler cette fenêtre."
+
+#~ msgid "Click to confirm your selection."
+#~ msgstr "Cliquez pour confirmer votre sélection."
+
+#~ msgid "Could not unlock mutex"
+#~ msgstr "Impossible de déverrouiller le mutex"
+
+#~ msgid "Error while waiting on semaphore"
+#~ msgstr "Erreur lors de l'attente d'une sémaphore"
+
+#, fuzzy
+#~ msgid "Failed to connect to session manager: %s"
+#~ msgstr "N'a pas réussi à %s la connexion : %s"
+
+#~ msgid "Failed to create a status bar."
+#~ msgstr "Échec de la création d'une barre d'état."
+
+#~ msgid "Failed to register OpenGL window class."
+#~ msgstr "Échec de l'enregistrement de la classe de fenêtres OpenGL."
+
+#~ msgid "Fatal error"
+#~ msgstr "Erreur fatale"
+
+#~ msgid "Fatal error: "
+#~ msgstr "Erreur fatale : "
+
+#~ msgid "GB-2312"
+#~ msgstr "GB-2312"
+
+#~ msgid "Go forward to the next HTML page"
+#~ msgstr "Aller vers la page HTML suivante"
+
+#~ msgid "Goto Page"
+#~ msgstr "Aller à la page"
+
+#, fuzzy
+#~ msgid ""
+#~ "HTML pagination algorithm generated more than the allowed maximum number "
+#~ "of pages and it can't continue any longer!"
+#~ msgstr ""
+#~ "L'algorithme de mise en page a généré plus de pages que le nombre maximum "
+#~ "admissible et il ne peut poursuivre !"
+
+#~ msgid "Help : %s"
+#~ msgstr "Aide : %s"
+
+#~ msgid "I64"
+#~ msgstr "I64"
+
+#~ msgid "Internal error, illegal wxCustomTypeInfo"
+#~ msgstr "Erreur interne : wxCustomTypeInfo illégal"
+
+#~ msgid "Invalid XRC resource '%s': doesn't have root node 'resource'."
+#~ msgstr ""
+#~ "Ressource XRC « %s » non valable : absence du noeud racine « resource »."
+
+#~ msgid "No handler found for XML node '%s', class '%s'!"
+#~ msgstr ""
+#~ "Aucun gestionnaire trouvé pour le noeud XML « %s » de la classe « %s »."
+
+#~ msgid "No image handler for type %ld defined."
+#~ msgstr "Aucun gestionnaire d'image défini pour le type %ld."
+
+#, fuzzy
+#~ msgid "Owner not initialized."
+#~ msgstr "Impossible d'initialiser l'affichage."
+
+#, fuzzy
+#~ msgid "Passed item is invalid."
+#~ msgstr "« %s » n'est pas valable"
+
+#~ msgid "Passing a already registered object to SetObjectName"
+#~ msgstr "Objet déjà enregistré indiqué à SetObjectName"
+
+#~ msgid "Preparing help window..."
+#~ msgstr "Préparation de la fenêtre d'aide..."
+
+#~ msgid "Program aborted."
+#~ msgstr "Programme interrompu."
+
+#~ msgid "Referenced object node with ref=\"%s\" not found!"
+#~ msgstr "Le noeud objet référencé par ref=\"%s\" est introuvable."
+
+#~ msgid "Resource files must have same version number!"
+#~ msgstr "Les fichiers de ressource doivent avoir le même numéro de version."
+
+#~ msgid "SHIFT-JIS"
+#~ msgstr "SHIFT-JIS"
+
+#~ msgid "Search!"
+#~ msgstr "Chercher !"
+
+#~ msgid "Sorry, could not open this file for saving."
+#~ msgstr "Impossible d'ouvrir ce fichier pour l'enregistrement."
+
+#~ msgid "Sorry, could not save this file."
+#~ msgstr "Impossible d'enregistrer ce fichier."
+
+#~ msgid "Sorry, print preview needs a printer to be installed."
+#~ msgstr "L'aperçu avant impression nécessite une imprimante installée."
+
+#~ msgid "Status: "
+#~ msgstr "État : "
+
+#~ msgid ""
+#~ "Streaming delegates for not already streamed objects not yet supported"
+#~ msgstr ""
+#~ "Les flux délégués pour les objets non transformés en flux ne sont pas "
+#~ "encore gérés"
+
+#~ msgid "Subclass '%s' not found for resource '%s', not subclassing!"
+#~ msgstr ""
+#~ "Sous-classe « %s » non trouvée pour la ressource « %s », pas de sous-"
+#~ "classement."
+
+#~ msgid "TIFF library error."
+#~ msgstr "Erreur dans la bibliothèque TIFF"
+
+#~ msgid "TIFF library warning."
+#~ msgstr "Alarme dans la bibliothèque TIFF"
+
+#~ msgid ""
+#~ "The file '%s' couldn't be opened.\n"
+#~ "It has been removed from the most recently used files list."
+#~ msgstr ""
+#~ "Le fichier « %s » n'a pas pu être ouvert et a été retiré\n"
+#~ "de la liste des fichiers récemment utilisés."
+
+#~ msgid "The path '%s' contains too many \"..\"!"
+#~ msgstr "Le chemin « %s » contient trop de « .. »."
+
+#~ msgid "Trying to solve a NULL hostname: giving up"
+#~ msgstr "Tentative de résoudre le nom d'hôte NULL : abandon"
+
+#~ msgid "Unknown style flag "
+#~ msgstr "Indicateur de style inconnu"
+
+#~ msgid "Warning"
+#~ msgstr "Avertissement"
+
+#~ msgid "Windows 2000 (build %lu"
+#~ msgstr "Windows 2000 (construction %lu"
+
+#~ msgid "XRC resource '%s' (class '%s') not found!"
+#~ msgstr "Ressource XRC « %s » (classe « %s ») introuvable."
+
+#~ msgid "XRC resource: Cannot create animation from '%s'."
+#~ msgstr "Ressource XRC : impossible de créer une animation de « %s »."
+
+#~ msgid "XRC resource: Cannot create bitmap from '%s'."
+#~ msgstr ""
+#~ "Ressource XRC : impossible de créer une image bitmap à partir de « %s »."
+
+#, fuzzy
+#~ msgid ""
+#~ "XRC resource: Incorrect colour specification '%s' for attribute '%s'."
+#~ msgstr ""
+#~ "Ressource XRC : spécification de couleur « %s » non valable pour la "
+#~ "propriété « %s »."
+
+#~ msgid "[EMPTY]"
+#~ msgstr "[VIDE]"
+
+#~ msgid "catalog file for domain '%s' not found."
+#~ msgstr "fichier catalogue introuvable pour le domaine « %s »."
+
+#~ msgid "delegate has no type info"
+#~ msgstr "Le délégué n'a pas d'information sur le type"
+
+#~ msgid "encoding %i"
+#~ msgstr "codage %i"
+
+#~ msgid "looking for catalog '%s' in path '%s'."
+#~ msgstr "recherche le catalogue « %s » dans « %s »."
+
+#~ msgid "wxRichTextFontPage"
+#~ msgstr "wxRichTextFontPage"
+
+#~ msgid "wxSearchEngine::LookFor must be called before scanning!"
+#~ msgstr "wxSearchEngine::LookFor doit être appelé avant de scanner !"
+
+#~ msgid "wxSocket: invalid signature in ReadMsg."
+#~ msgstr "wxSocket : signature non valable dans ReadMsg."
+
+#~ msgid "wxSocket: unknown event!."
+#~ msgstr "wxSocket : événement inconnu."
+
+#~ msgid "|<<"
+#~ msgstr "|<<"
+
+#~ msgid "\t%s: %s\n"
+#~ msgstr "\t%s : %s\n"
+
+#~ msgid " Couldn't create the UnicodeConverter"
+#~ msgstr "Impossible de créer le UnicodeConverter"
+
+#~ msgid "#define %s must be an integer."
+#~ msgstr "#define %s doit être un entier."
+
+#~ msgid "%s not a bitmap resource specification."
+#~ msgstr "%s n'est pas une spécification d'une ressource bitmap."
+
+#~ msgid "%s not an icon resource specification."
+#~ msgstr "%s n'est pas une spécification d'une ressource icône."
+
+#~ msgid "%s: ill-formed resource file syntax."
+#~ msgstr "%s : syntaxe du fichier de ressource malformée."
+
+#~ msgid "&Open"
+#~ msgstr "&Ouvrir"
+
+#~ msgid "&Print"
+#~ msgstr "&Imprimer"
+
+#~ msgid "*** A debug report has been generated\n"
+#~ msgstr "*** Un rapport de débogage a été créé\n"
+
+#~ msgid "*** It can be found in \"%s\"\n"
+#~ msgstr "*** Il peut être trouvé dans « %s »\n"
+
+#~ msgid ""
+#~ ", expected static, #include or #define\n"
+#~ "while parsing resource."
+#~ msgstr ""
+#~ ", static, #include ou #define\n"
+#~ "attendu lors de l'analyse des ressources."
+
+#~ msgid "Bitmap resource specification %s not found."
+#~ msgstr "Spécification %s de la ressource bitmap introuvable."
+
+#~ msgid "Closes the dialog without inserting a symbol."
+#~ msgstr "Ferme la fenêtre sans insérer de symbole."
+
+#~ msgid ""
+#~ "Could not resolve control class or id '%s'. Use (non-zero) integer "
+#~ "instead\n"
+#~ " or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "Impossible de résoudre la classe de contrôle ou l'identifiant « %s ».\n"
+#~ "Utiliser à la place un entier (non nul) ou spécifier un #define\n"
+#~ "(voir le manuel pour les mises en garde)"
+
+#~ msgid ""
+#~ "Could not resolve menu id '%s'. Use (non-zero) integer instead\n"
+#~ "or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "Impossible de résoudre l'identifiant « %s » du menu. Utiliser à la place\n"
+#~ "un entier (non nul) ou spécifier un #define (voir le manuel pour les "
+#~ "mises\n"
+#~ "en garde)"
+
+#~ msgid "Couldn't end the context on the overlay window"
+#~ msgstr "Impossible de changer le contexte de le fenêtre de recouvrement"
+
+#~ msgid "Expected '*' while parsing resource."
+#~ msgstr "« * » attendue lors du parcours de la ressource."
+
+#~ msgid "Expected '=' while parsing resource."
+#~ msgstr "« = » attendu lors du parcours de la ressource."
+
+#~ msgid "Expected 'char' while parsing resource."
+#~ msgstr "« char » attendu lors du parcours de la ressource."
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "Ressource XBM %s introuvable.\n"
+#~ "Avez-vous oublié d'utiliser wxResourceLoadBitmapData ?"
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadIconData?"
+#~ msgstr ""
+#~ "Ressource XBM %s introuvable.\n"
+#~ "Avez-vous oublié d'utiliser wxResourceLoadIconData ?"
+
+#~ msgid ""
+#~ "Failed to find XPM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "Ressource XPM %s introuvable.\n"
+#~ "Avez-vous oublié d'utiliser wxResourceLoadBitmapData ?"
+
+#~ msgid "Failed to get clipboard data."
+#~ msgstr "Échec de l'obtention des données du presse-papiers."
+
+#~ msgid "Failed to load shared library '%s' Error '%s'"
+#~ msgstr ""
+#~ "Échec du chargement de la bibliothèque partagée « %s » : erreur « %s »"
+
+#~ msgid "Found "
+#~ msgstr "A trouvé "
+
+#~ msgid "Icon resource specification %s not found."
+#~ msgstr "Spécification %s de la ressource de l'icône non trouvée."
+
+#~ msgid "Ill-formed resource file syntax."
+#~ msgstr "Syntaxe du fichier de ressource malformée."
+
+#~ msgid "Inserts the chosen symbol."
+#~ msgstr "Insérer le symbole choisi."
+
+#~ msgid "Long Conversions not supported"
+#~ msgstr "Conversions longues non gérées"
+
+#~ msgid "No XPM icon facility available!"
+#~ msgstr "Aucune fonctionnalité disponible pour les icônes XPM."
+
+#~ msgid "Option '%s' requires a value, '=' expected."
+#~ msgstr "L'option « %s » nécessite une valeur, « = » attendu."
+
+#~ msgid "Select all"
+#~ msgstr "Tout sélectionner"
+
+#~ msgid ""
+#~ "Sorry, docking is not supported for ports other than wxMSW, wxMac and "
+#~ "wxGTK"
+#~ msgstr "Désolé, l'arrimage n'est supporté que pour wxMSW, wxMAC et wxGTK"
+
+#~ msgid "String conversions not supported"
+#~ msgstr "Conversion des chaînes non gérée"
+
+#~ msgid "Unexpected end of file while parsing resource."
+#~ msgstr "Fin de fichier inattendue lors de l'analyse des ressources."
+
+#~ msgid "Unrecognized style %s while parsing resource."
+#~ msgstr "Style %s non reconnu pendant l'analyse des ressources."
+
+#~ msgid "Video Output"
+#~ msgstr "Sortie vidéo"
+
+#~ msgid "Warning: attempt to remove HTML tag handler from empty stack."
+#~ msgstr ""
+#~ "Avertissement : tentative de suppression d'un gestionnaire d'étiquette "
+#~ "HTML d'une pile vide."
+
+#~ msgid "establish"
+#~ msgstr "établir"
+
+#~ msgid "initiate"
+#~ msgstr "initialiser"
+
+#~ msgid "invalid eof() return value."
+#~ msgstr "eof() a renvoyé une valeur non valable."
+
+#~ msgid "unknown line terminator"
+#~ msgstr "fin de ligne inconnue"
+
+#~ msgid "writing"
+#~ msgstr "écriture"
+
+#~ msgid "wxRichTextBulletsPage"
+#~ msgstr "wxRichTextBulletsPage"
+
+#~ msgid "wxRichTextListStylePage"
+#~ msgstr "wxRichTextListStylePage"
+
+#~ msgid "wxRichTextStylePage"
+#~ msgstr "wxRichTextStylePage"
+
+#~ msgid "."
+#~ msgstr "."
+
+#~ msgid "Cannot open URL '%s'"
+#~ msgstr "Impossible d'ouvrir le lien « %s »"
+
+#~ msgid "Error "
+#~ msgstr "Erreur "
+
+#~ msgid "Failed to create directory %s/.gnome."
+#~ msgstr "Échec de la création du répertoire %s/.gnome."
+
+#~ msgid "Failed to create directory %s/mime-info."
+#~ msgstr "Échec de la création du répertoire %s/mime-info."
+
+#~ msgid ""
+#~ "Failed to get stack backtrace:\n"
+#~ "%s"
+#~ msgstr ""
+#~ "Échec de l'obtention de la pile d'appel :\n"
+#~ "%s"
+
+#~ msgid "Loading Grey Ascii PNM image is not yet implemented."
+#~ msgstr ""
+#~ "Le chargement d'une image PNM ASCII en niveau de gris n'est pas encore "
+#~ "implémenté."
+
+#~ msgid "Loading Grey Raw PNM image is not yet implemented."
+#~ msgstr ""
+#~ "Le chargement d'une image PNM source en niveau de gris n'est pas encore "
+#~ "implémenté."
+
+#~ msgid "MP Thread Support is not available on this System"
+#~ msgstr "Gestion des processus MP non disponible sur ce système"
+
+#~ msgid "Mailcap file %s, line %d: incomplete entry ignored."
+#~ msgstr "Fichier mailcap %s, ligne %d : entrée incomplète ignorée."
+
+#~ msgid "Mime.types file %s, line %d: unterminated quoted string."
+#~ msgstr ""
+#~ "Fichier mime.types %s, ligne %d : chaîne entre guillemets non terminée."
+
+#~ msgid "Unknown field in file %s, line %d: '%s'."
+#~ msgstr "Champ inconnu dans le fichier %s, ligne %d : « %s »."
+
+#~ msgid "bold "
+#~ msgstr "gras "
+
+#~ msgid "can't query for GUI plugins name in console applications"
+#~ msgstr ""
+#~ "ne peut chercher des noms de greffon graphique dans les applications en "
+#~ "console"
+
+#~ msgid "light "
+#~ msgstr "léger "
+
+#~ msgid "underlined "
+#~ msgstr "souligné "
+
+#~ msgid "unsupported zip archive"
+#~ msgstr "archive zip non gérée"
diff --git a/cadxcore/lang/ja/cadxcore.mo b/cadxcore/lang/ja/cadxcore.mo
new file mode 100644
index 0000000..5396940
Binary files /dev/null and b/cadxcore/lang/ja/cadxcore.mo differ
diff --git a/cadxcore/lang/ja/cadxcore.po b/cadxcore/lang/ja/cadxcore.po
new file mode 100644
index 0000000..c4d39bc
--- /dev/null
+++ b/cadxcore/lang/ja/cadxcore.po
@@ -0,0 +1,7954 @@
+# Japanese translation for ginkgocadx
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the ginkgocadx package.
+# YOKOHAMA <nyokohama at gmail.com>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: ginkgo at metaemotion.com\n"
+"POT-Creation-Date: 2014-06-11 15:50+0100\n"
+"PO-Revision-Date: 2014-06-11 15:50+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: YOKOHAMA <Unknown>\n"
+"Language: ja_JP\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: ..\\..\n"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr "B/W"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr "B/W Inverse"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr "Barten"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr "Black Body"
+
+# A Window/Level preset
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr "心臓"
+
+# a LookupTable name VR == Volume Render
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr "VR Bones"
+
+# a LookupTable name VR == Volume Render
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr "VR Muscles & Bones"
+
+# a LookupTable name VR == Volume Render
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Red Vessels"
+msgstr "VR Red Vessels"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr "Gray Rainbow"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr "Stern"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr "Spectrum"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Metal"
+msgstr "Hot Metal"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr "Hot Iron"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Green"
+msgstr "Hot Green"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "GE Color"
+msgstr "GE Color"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PET"
+msgstr ""
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr "フロー"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr "LONI"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr "LONI2"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr "非対称"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "P-Value"
+msgstr "P-Value"
+
+# a LookupTable name
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr "ROI"
+
+#: ..\../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#: ..\../api/dicom/idicomconformance.cpp:214
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "GIL/DICOM/Conformance"
+msgstr "GIL/DICOM/Conformance"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid "Unable to add supported transfer syntax "
+msgstr "サポートされた転送構文が追加できません"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid " to SOP Class "
+msgstr " SOP Class へ "
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr " . このモデルには転送構文がありません: 最初に追加してね."
+
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr " . このモデルには SOP クラスがありません: 最初に追加してね."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid "Unable to add supported SOP Class "
+msgstr "サポートされた SOP クラスが追加できません "
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " to Modality "
+msgstr " モダリティへ "
+
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr " . このモデルにモダリティがありません: 最初に追加してね."
+
+#: ..\../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr "エラー DICOM コンフォーマンスファイルのロード"
+
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr "無効な DICOM コンフォーマンスファイル"
+
+#: ..\../api/iannotator.cpp:97
+#, fuzzy
+msgid "Slice"
+msgstr "スライス: "
+
+#: ..\../api/iannotator.cpp:97
+msgid "of"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+#, fuzzy
+msgid "Volume"
+msgstr "3D ボリュームレンダリング"
+
+#: ..\../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:110
+#, fuzzy
+msgid "Image without metric information"
+msgstr "画像提示情報"
+
+#: ..\../api/iannotator.cpp:119
+#, fuzzy
+msgid "Slice thickness"
+msgstr "スライス: "
+
+#: ..\../api/iannotator.cpp:127
+#, fuzzy
+msgid "Slice location"
+msgstr "スライス: "
+
+#: ..\../api/iannotator.cpp:139
+#, fuzzy
+msgid "Scale"
+msgstr "グリッド寸法"
+
+#: ..\../api/iannotator.cpp:147
+msgid "Right"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:149
+msgid "Left"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:219
+#, fuzzy
+msgid "Position:"
+msgstr "位置   : "
+
+#: ..\../api/iannotator.cpp:272
+#, fuzzy
+msgid "Value:"
+msgstr "値"
+
+#: ..\../api/iexception.cpp:52
+#, fuzzy
+msgid "Exception in component"
+msgstr "例外を読み込み中:"
+
+#: ..\../api/initwx.cpp:439
+msgid "Initializing environment ..."
+msgstr "環境を初期化中..."
+
+#: ..\../api/initwx.cpp:446 ..\../api/initwx.cpp:447 ..\../api/initwx.cpp:448
+#: ..\../api/initwx.cpp:449 ..\../api/initwx.cpp:450 ..\../api/initwx.cpp:451
+#: ..\../api/initwx.cpp:452 ..\../api/initwx.cpp:453
+msgid "Ginkgo CADx restrictions"
+msgstr "Ginkgo CADx 制約事項"
+
+#: ..\../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr ""
+
+#: ..\../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr "匿名化モード(履歴はクリアされます)"
+
+#: ..\../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr "タブが最大数に達しました"
+
+#: ..\../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr "最大の Ginkgo CADx アプリケーションが不活性"
+
+#: ..\../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr "DICOM化の後、Ginkgo CADxは自動的に閉じます"
+
+#: ..\../api/initwx.cpp:451
+msgid "Export images"
+msgstr "画像書き出し"
+
+#: ..\../api/initwx.cpp:452
+msgid "Acquire DICOM files"
+msgstr "DICOM 取得ファイル"
+
+#: ..\../api/initwx.cpp:453
+msgid "Import files to DICOM format"
+msgstr "読み込みファイルをDICOMフォーマットへ"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "Online manual"
+msgstr "オンラインマニュアル"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+#, fuzzy
+msgid "URL of manual"
+msgstr "オンラインマニュアル"
+
+#: ..\../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "Online support"
+msgstr "オンラインサポート"
+
+#: ..\../api/initwx.cpp:459
+msgid "URL of online support"
+msgstr "オンラインサポートのURL"
+
+#: ..\../api/initwx.cpp:459
+#, fuzzy
+msgid "http://ginkgo-cadx.com/"
+msgstr "HTTPプロキシを有効"
+
+#: ..\../api/initwx.cpp:460 ..\../api/initwx.cpp:461
+msgid "Program Updates"
+msgstr "プログラムアップデート"
+
+#: ..\../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr "最新の Ginkgo CADx アップデートの注意"
+
+# Ginkgo check-for-updates period
+#: ..\../api/initwx.cpp:461
+msgid "Update period (days)"
+msgstr "アップデート周期(日数)"
+
+#: ..\../api/initwx.cpp:462
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr "セキュリティ"
+
+#: ..\../api/initwx.cpp:462
+msgid "Setup Security"
+msgstr "セキュリティ設定"
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup"
+msgstr "開始時に表示"
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup default value"
+msgstr "開始時の規定値を表示"
+
+#: ..\../api/initwx.cpp:465 ..\../api/initwx.cpp:466
+#: ..\../main/gui/history3/historypanel3.cpp:328
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr "ツール"
+
+#: ..\../api/initwx.cpp:465
+msgid "Settings menu"
+msgstr "メニューを設定"
+
+#: ..\../api/initwx.cpp:466
+msgid "License menu"
+msgstr "ライセンスメニュー"
+
+#: ..\../api/initwx.cpp:467 ..\../api/initwx.cpp:468 ..\../api/initwx.cpp:469
+#: ..\../api/initwx.cpp:470 ..\../api/initwx.cpp:471 ..\../api/initwx.cpp:472
+#: ..\../api/initwx.cpp:473 ..\../api/initwx.cpp:474
+msgid "PACS Limits"
+msgstr "PACSの制限"
+
+#: ..\../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr ""
+
+#: ..\../api/initwx.cpp:468
+msgid "Upload images to a PACS server"
+msgstr "PACSサーバへ画像をアップロード"
+
+#: ..\../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr "PACSから画像を取得"
+
+#: ..\../api/initwx.cpp:470
+msgid "Enable remote PACS configuration"
+msgstr "リモートPACS設定を有効"
+
+#: ..\../api/initwx.cpp:471
+msgid "Enable TLS configuration"
+msgstr "TLS設定を有効"
+
+#: ..\../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr "選択患者以外の検索を制限"
+
+#: ..\../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr "最大サイズで検査検索を制限"
+
+# DICOM option (LossLess image compression)
+#: ..\../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr "アップロード時に強制ロスレス圧縮"
+
+#: ..\../api/initwx.cpp:475 ..\../api/initwx.cpp:476 ..\../api/initwx.cpp:477
+#: ..\../api/initwx.cpp:478 ..\../api/initwx.cpp:479 ..\../api/initwx.cpp:480
+msgid "Import"
+msgstr "読み込み"
+
+#: ..\../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:476
+#, fuzzy
+msgid "Show accession number input"
+msgstr "アソシエーション番号"
+
+#: ..\../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr "圧縮設定, 0は圧縮無し(0..14)"
+
+#: ..\../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+"再圧縮コーディック(0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+
+#: ..\../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr "画像コーディックを変えません(可能なら)"
+
+#: ..\../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr "HL7サービス"
+
+#: ..\../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr "HL7送信サービスを自動開始"
+
+#: ..\../api/initwx.cpp:483 ..\../api/initwx.cpp:484 ..\../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr "XML DICOM化"
+
+#: ..\../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr "インポート中にHL7メッセージを送信"
+
+#: ..\../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr "インポート中にPACSへ検査を送信"
+
+#: ..\../api/initwx.cpp:485
+msgid "Default ORU template"
+msgstr "規定の ORU テンプレート"
+
+#: ..\../api/initwx.cpp:488 ..\../api/initwx.cpp:489 ..\../api/initwx.cpp:491
+#: ..\../api/initwx.cpp:493 ..\../api/initwx.cpp:494 ..\../api/initwx.cpp:495
+#: ..\../api/initwx.cpp:496 ..\../api/initwx.cpp:498
+msgid "Style"
+msgstr "スタイル"
+
+#: ..\../api/initwx.cpp:503
+#, c-format
+msgid "Download %s images"
+msgstr "%s画像をダウンロード"
+
+#: ..\../api/initwx.cpp:504 ..\../api/initwx.cpp:508
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+msgid "PACS"
+msgstr "PACS"
+
+#: ..\../api/initwx.cpp:507
+msgid "Download all modalities"
+msgstr "全てのモダリティをダウンロード"
+
+#: ..\../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr "OpenGL"
+
+#: ..\../api/initwx.cpp:510
+msgid "Enable shaders"
+msgstr "シェーダを有効"
+
+#: ..\../api/initwx.cpp:513
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+#, fuzzy
+msgid "Ginkgo Cloud"
+msgstr "Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:513
+#, fuzzy
+msgid "Download from Ginkgo Cloud"
+msgstr "Ginkgo CADx は次の項目から圧縮できません"
+
+#: ..\../api/initwx.cpp:560
+msgid "Tools loading base ..."
+msgstr "ベースツールを読み込み中..."
+
+#: ..\../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr "ツールを開始中..."
+
+#: ..\../api/initwx.cpp:566
+msgid "Loading plugins ..."
+msgstr "プラグインを読み込み中..."
+
+#: ..\../api/initwx.cpp:580
+#, fuzzy
+msgid "Unable to start GinkgoCADx:\n"
+msgstr "接続できません: ネットワークサポートを開始できません"
+
+#: ..\../api/initwx.cpp:580 ..\../api/initwx.cpp:621
+msgid "error"
+msgstr "エラー"
+
+#: ..\../api/initwx.cpp:584
+msgid "Loading resources ..."
+msgstr "リソースをロード中 ..."
+
+#: ..\../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr "サービスを開始中..."
+
+#: ..\../api/initwx.cpp:601
+msgid "Configuring environment ..."
+msgstr "環境を設定中..."
+
+#: ..\../api/initwx.cpp:621
+msgid "Failed to set permissions:\n"
+msgstr "権限設定に失敗:\n"
+
+#: ..\../api/initwx.cpp:634
+msgid "Updating ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:638
+msgid "Interpreting parameters ..."
+msgstr "パラメータを解釈中..."
+
+#: ..\../api/initwx.cpp:689
+#, fuzzy
+msgid "Error unregistering tools: "
+msgstr "ツール"
+
+#: ..\../api/initwx.cpp:769
+#, fuzzy
+msgid "Starting"
+msgstr "ツールを開始中..."
+
+#: ..\../api/ivista.cpp:36 ..\../commands/comandocarga.cpp:73
+msgid "Loading..."
+msgstr "読み込み中..."
+
+#: ..\../api/iwidgets.cpp:268
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ..\../main/gui/import/pasosimportacionbase.cpp:151
+msgid "Name"
+msgstr "氏名"
+
+#: ..\../api/iwidgets.cpp:285
+msgid "Area"
+msgstr "領域"
+
+#: ..\../api/iwidgets.cpp:302
+msgid "Perimeter"
+msgstr "周囲長"
+
+#: ..\../api/iwidgets.cpp:316
+msgid "Travel (I)"
+msgstr "進む (I)"
+
+#: ..\../api/iwidgets.cpp:326
+msgid "Travel (M)"
+msgstr "進む (M)"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#: ..\../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr "スレッディング"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid "Error while running thread: "
+msgstr "エラー スレッド動作中: "
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid " : "
+msgstr " : "
+
+#: ..\../api/threads/thread.cpp:120
+msgid "Internal error while running thread: "
+msgstr "スレッド動作中の内部エラー: "
+
+#: ..\../api/widgetserializable.cpp:60
+msgid "Creation Date"
+msgstr "作成日"
+
+#: ..\../api/widgetserializable.cpp:65
+msgid "Modification Date"
+msgstr "修正日"
+
+#: ..\../api/widgetserializable.cpp:68
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:40
+msgid "Physician"
+msgstr "医師"
+
+#: ..\../commands/acquirefromurlcommand.cpp:55
+#: ..\../commands/pacsdownloadcommand.cpp:88
+#: ..\../commands/synchronizationcommand.cpp:70
+msgid "Downloading files ..."
+msgstr "ファイルをダウンロード中..."
+
+#: ..\../commands/acquirefromurlcommand.cpp:69
+#: ..\../commands/synchronizationcommand.cpp:91
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, c-format
+msgid "Downloading file %d"
+msgstr "%d ファイルをダウンロード中"
+
+#: ..\../commands/acquirefromurlcommand.cpp:81
+#, fuzzy
+msgid "Error downloading file: "
+msgstr "%d ファイルをダウンロード中"
+
+#: ..\../commands/acquirefromurlcommand.cpp:95
+#: ..\../commands/pacsdownloadcommand.cpp:114
+#: ..\../commands/synchronizationcommand.cpp:121
+msgid "Internal Error"
+msgstr "内部エラー"
+
+#: ..\../commands/acquirefromurlcommand.cpp:115
+#, fuzzy
+msgid "Error downloading files: "
+msgstr "ファイルをダウンロード中..."
+
+#: ..\../commands/autocleaningcommand.cpp:62
+#, fuzzy
+msgid "Cleaning dicomdir..."
+msgstr "DICOMDIRを選択"
+
+#: ..\../commands/cloudcommand.cpp:67
+#, fuzzy
+msgid "Downloading files..."
+msgstr "ファイルをダウンロード中..."
+
+#: ..\../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:183
+#, fuzzy
+msgid "Unknown operation"
+msgstr "不明"
+
+#: ..\../commands/cloudcommand.cpp:188
+msgid "Error in cloud operation. See log to get more details..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:249
+#, fuzzy
+msgid "Could to retrieve study."
+msgstr "リトリーブ方法"
+
+#: ..\../commands/cloudcommand.cpp:260 ..\../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:262
+#, fuzzy
+msgid "Error retrieving study."
+msgstr "検査読み込みエラー: 内部エラー"
+
+#: ..\../commands/cloudcommand.cpp:271
+#, fuzzy
+msgid "Study successfully retrieved."
+msgstr "検査"
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "Speed"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "bytes/sec during"
+msgstr " バイト量: "
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "seconds"
+msgstr "最大の Ginkgo CADx アプリケーションが不活性"
+
+#: ..\../commands/cloudcommand.cpp:275
+#, fuzzy
+msgid "Empty Response"
+msgstr "設定をクリア"
+
+#: ..\../commands/cloudcommand.cpp:289
+#, fuzzy
+msgid "Extracting files..."
+msgstr "ファイルを展開中..."
+
+#: ..\../commands/cloudcommand.cpp:313 ..\../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:383
+#, fuzzy
+msgid "Could to perform query."
+msgstr "検索失敗: "
+
+#: ..\../commands/cloudcommand.cpp:396
+#, fuzzy
+msgid "Error perfoming the query."
+msgstr "PACS id検索エラー "
+
+#: ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "Query successfully performed."
+msgstr "PACS id検索エラー "
+
+#: ..\../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:472
+#, fuzzy
+msgid "Unknown JSon attribute:"
+msgstr "不明"
+
+#: ..\../commands/cloudcommand.cpp:482
+#, fuzzy
+msgid "Error parsing JSon: "
+msgstr "XMLパースの内部エラー"
+
+#: ..\../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:515
+#: ..\../commands/openremovableunit.cpp:148 ..\../main/gui/open/abrir.cpp:119
+#: ..\../main/gui/open/abrir.cpp:159 ..\../main/gui/open/opendialogs.cpp:146
+msgid "Storing in the history..."
+msgstr "履歴を格納中..."
+
+#: ..\../commands/comandoactualizaciones.cpp:46
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:536
+msgid "Check Updates"
+msgstr "アップデートをチェック"
+
+#: ..\../commands/comandoactualizaciones.cpp:136
+msgid "Not enough parameters found on XML"
+msgstr "XML に十分なパラメータが見つかりません"
+
+#: ..\../commands/comandoactualizaciones.cpp:145
+msgid "XML parsing internal error"
+msgstr "XMLパースの内部エラー"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Error checking application updates"
+msgstr "アプリケーションのアップデートチェックエラー"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Ginkgo CADx updates"
+msgstr "Ginkgo CADxのアップデート"
+
+#: ..\../commands/comandoactualizaciones.cpp:170
+msgid "Internal error checking updates"
+msgstr "アップデートチェックの内部エラー"
+
+#: ..\../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr "シリーズパスが見つかりません"
+
+#: ..\../commands/comandocarga.cpp:92 ..\../commands/comandocarga.cpp:96
+msgid "Exception loading:"
+msgstr "例外を読み込み中:"
+
+#: ..\../commands/comandocarga.cpp:100
+msgid "Study malformed or unsupported"
+msgstr "検査が不正かサポートされていません"
+
+#: ..\../commands/comandocarga.cpp:129 ..\../commands/comandocarga.cpp:139
+msgid "Error loading study: "
+msgstr "検査読み込み中にエラー: "
+
+#: ..\../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr "検査読み込み中にメモリ不足でエラー"
+
+#: ..\../commands/comandocarga.cpp:144
+msgid "Error loading study."
+msgstr "エラー 検査ロード中."
+
+#: ..\../commands/comandocarga.cpp:149
+msgid "Load canceled by user"
+msgstr "ユーザによって読み込みがキャンセルされました"
+
+#: ..\../commands/comandocarga.cpp:156
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+#: ..\../main/gui/history3/historypanel3.cpp:1063
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+msgid "Error loading study"
+msgstr "検査読み込み中にエラー"
+
+#: ..\../commands/comandoexportacion.cpp:81
+#: ..\../commands/exporttodicomdircommand.cpp:214
+msgid "Exporting files..."
+msgstr "ファイルを書き出し中..."
+
+#: ..\../commands/comandoexportacion.cpp:105
+#: ..\../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr "書き出しに成功しました"
+
+#: ..\../commands/comandoexportacion.cpp:158
+#, c-format
+msgid "Exporting file %d of %d"
+msgstr "%d の %d ファイルを書き出し中"
+
+#: ..\../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr "ファイル格納中にエラー, ディレクトリ権限をチェックしてください"
+
+#: ..\../commands/comandoexportacion.cpp:233
+msgid "image_%m-%d-%Y_"
+msgstr "画像_%m-%d-%Y_"
+
+#: ..\../commands/comandoincluirhistorial.cpp:108
+msgid "Exploring directory ..."
+msgstr "ディレクトリを探索中..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:122
+#, fuzzy
+msgid "Reading DICOMDIR ..."
+msgstr "DICOMDIRを選択"
+
+#: ..\../commands/comandoincluirhistorial.cpp:142
+#: ..\../commands/comandoincluirhistorial.cpp:156
+#: ..\../commands/comandoincluirhistorial.cpp:177
+msgid "Including files in the history .."
+msgstr "履歴にあるファイルを含め中..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:196
+msgid "Exploring directory "
+msgstr "ディレクトリを探索"
+
+#: ..\../commands/comandoincluirhistorial.cpp:256
+#: ..\../commands/linkhistorycommand.cpp:118
+msgid "Image acquisition finished."
+msgstr "画像の取得が完了."
+
+#: ..\../commands/comandoincluirhistorial.cpp:258
+#, c-format
+msgid "There have been included %d images."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:261
+#: ..\../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+"\n"
+" %d エラーがあります (詳細はログを参照してください)"
+
+#: ..\../commands/comandoincluirhistorial.cpp:273
+#: ..\../commands/linkhistorycommand.cpp:133
+msgid "This files doesn't exist:"
+msgstr "このファイルは存在しません:"
+
+#: ..\../commands/comandoincluirhistorial.cpp:284
+#: ..\../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr "このファイルは DICOM フォーマットではありません:"
+
+#: ..\../commands/comandoincluirhistorial.cpp:296
+#: ..\../commands/linkhistorycommand.cpp:156
+msgid "This files are Dicom Dirs:"
+msgstr "このファイルは Dicom Dirs:"
+
+#: ..\../commands/comandopacs.cpp:58 ..\../commands/pacsdownloadcommand.cpp:61
+#: ..\../commands/sendpacscommand.cpp:137
+#, fuzzy
+msgid "There is not any Remote PACS configured"
+msgstr "PACS設定がありません"
+
+#: ..\../commands/comandopacs.cpp:84
+#, fuzzy
+msgid "Querying PACS ..."
+msgstr "PACS"
+
+#: ..\../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+
+#: ..\../commands/comandopacs.cpp:98
+msgid "Starting Search ..."
+msgstr "検索を開始中..."
+
+#: ..\../commands/comandopacs.cpp:108
+#: ..\../commands/pacsdownloadcommand.cpp:101
+msgid "Server ID not found. ID = "
+msgstr "サーバIDが見つかりません ID = "
+
+#: ..\../commands/comandopacs.cpp:110 ..\../commands/comandopacs.cpp:112
+#: ..\../commands/comandopacs.cpp:114 ..\../commands/comandopacs.cpp:116
+msgid "Query error with PACS Id "
+msgstr "PACS id検索エラー "
+
+#: ..\../commands/comandopacs.cpp:116
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error"
+msgstr "内部エラー"
+
+#: ..\../commands/comandopacs.cpp:135
+msgid "Failed to perform search: "
+msgstr "検索失敗: "
+
+#: ..\../commands/dbmigrationcommand.cpp:94
+#: ..\../commands/dbmigrationcommand.cpp:103
+#, fuzzy
+msgid "Migrating old DICOM Dir ..."
+msgstr "DICOM Dir"
+
+#: ..\../commands/dbmigrationcommand.cpp:99
+#: ..\../commands/dbmigrationcommand.cpp:108
+#, fuzzy
+msgid "Including files ..."
+msgstr "ファイルを含めています..."
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+#: ..\../commands/dicomizecommand.cpp:181
+#: ..\../commands/openremovableunit.cpp:74
+#: ..\../commands/openremovableunit.cpp:110
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../commands/pdfextractercommand.cpp:130
+#: ..\../main/controllers/historycontroller.cpp:447
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+#: ..\../main/controllers/historycontroller.cpp:1976
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ..\../main/gui/login/dialogologin.cpp:50
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ..\../main/gui/open/opendialogs.cpp:58
+#: ..\../main/gui/open/opendialogs.cpp:62
+#: ..\../main/gui/open/opendialogs.cpp:134
+#: ..\../main/gui/progress/statusbarprogreso.cpp:284
+#: ..\../main/gui/progress/statusbarprogreso.cpp:287
+#: ..\../main/gui/progress/statusbarprogreso.cpp:292
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Info"
+msgstr "情報"
+
+#: ..\../commands/dbmigrationcommand.cpp:123
+#, fuzzy
+msgid "Migration finisthed successfully"
+msgstr "DICOM化が成功"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:27
+#: ..\../commands/dialogopathssobreescribirbase.cpp:62
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid "Overwrite"
+msgstr "上書き"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr "これらを上書きしますか?"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:65
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ..\../main/gui/history3/historypanel3base.cpp:339
+#: ..\../main/gui/history3/historypanel3base.cpp:415
+#: ..\../main/gui/history3/historypanel3base.cpp:486
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ..\../main/gui/open/opendialogsbase.cpp:53
+#: ..\../main/gui/open/opendialogsbase.cpp:131
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ..\../widgets/gui/calibracionbase.cpp:86
+#: ..\../widgets/gui/selecciontextobase.cpp:60
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr "キャンセル"
+
+#: ..\../commands/dicomizationcompletebase.cpp:24
+#: ..\../commands/dicomizationcompletebase.cpp:33
+#: ..\../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr "DICOM化完了"
+
+#: ..\../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr "DICOM化が成功"
+
+#: ..\../commands/dicomizationcompletebase.cpp:56
+msgid "Don't show this message again"
+msgstr "今後、このメッセージを表示しない"
+
+#: ..\../commands/dicomizationcompletebase.cpp:62
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ..\../main/gui/history3/historypanel3base.cpp:411
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ..\../widgets/gui/calibracionbase.cpp:82
+#: ..\../widgets/gui/selecciontextobase.cpp:56
+msgid "Accept"
+msgstr "受諾"
+
+#: ..\../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr "Step 1 of 3: 画像を読み込み"
+
+#: ..\../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr "Step 2 of 3: 画像をコピー"
+
+#: ..\../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr "Step 3 of 3: 画像をアップロード"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid "Import process failed:"
+msgstr "読み込み処理が失敗:"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+"\n"
+"リトライしますか?"
+
+#: ..\../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr "読み込み..."
+
+#: ..\../commands/dicomizecommand.cpp:370
+#, fuzzy
+msgid "Unknown error in dicomization process"
+msgstr "不明なエラー"
+
+#: ..\../commands/dicomizecommand.cpp:431
+#: ..\../commands/dicomizecommand.cpp:442
+#: ..\../commands/sendpacscommand.cpp:185
+msgid "Error sending evidences:"
+msgstr "エビデンス送信エラー:"
+
+#: ..\../commands/dicomizecommand.cpp:437
+#: ..\../commands/dicomizecommand.cpp:448
+msgid "Can not upload to the PACS:\n"
+msgstr "PACSへアップロードできません:\n"
+
+#: ..\../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+"PACSへアップロードできません:\n"
+"内部エラー"
+
+#: ..\../commands/exporttodicomdircommand.cpp:261
+#: ..\../commands/exporttodicomdircommand.cpp:338
+#, c-format
+msgid "Exporting series %d of %d"
+msgstr "シリーズ書き出し %d の %d"
+
+#: ..\../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr "選択されたシリーズのいくつかは削除されました"
+
+#: ..\../commands/exporttodicomdircommand.cpp:279
+#: ..\../commands/exporttodicomdircommand.cpp:385
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+msgid "There was an error creating directory"
+msgstr "ディレクトリ作成中にエラーが発生しました"
+
+#: ..\../commands/exporttodicomdircommand.cpp:303
+#: ..\../commands/exporttodicomdircommand.cpp:408
+msgid "There was an error writing file"
+msgstr "ファイル書き込み中にエラーがありました"
+
+#: ..\../commands/exporttodicomdircommand.cpp:358
+msgid "There was an error anonymizing files"
+msgstr "匿名化中にエラーが発生しました"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr "データセットに患者 id が欠落しています"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr "データセットにスタディインスタンス uid が欠落しています"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr "データセットにシリーズインスタンス uid が欠落しています"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr "データセットに SOP インスタンス uid が欠落しています"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Ignoring incoming operation "
+msgstr "入ってくる操作を無視"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:298
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr "未実装"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:473
+#: ..\../commands/pacsdownloadcommand.cpp:170
+#: ..\../commands/pacsdownloadcommand.cpp:179
+msgid "Including files..."
+msgstr "ファイルを含めています..."
+
+#: ..\../commands/linkhistorycommand.cpp:68
+#, fuzzy
+msgid "Linking study..."
+msgstr "検査"
+
+#: ..\../commands/openremovableunit.cpp:42
+#: ..\../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr "ドライブ探索中..."
+
+#: ..\../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+"リムーバブル装置に DICOMDIR がありません.\n"
+"他のパスを再帰的にスキャンしますか?"
+
+#: ..\../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+"リムーバブル装置に DICOMDIR がありません, %s ドライブを再帰的にスキャンします"
+"か"
+
+#: ..\../commands/openremovableunit.cpp:130
+msgid "Select drive you want to open"
+msgstr "開きたいドライブを選択"
+
+#: ..\../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+"Ginkgo CADx 1つ以上のリムーバブル装置を検出しました,\n"
+"ルートディレクトリにDICOMDIRがありません.\n"
+"取得したいドライブを再帰的に選択して下さい"
+
+#: ..\../commands/pacsdownloadcommand.cpp:134
+msgid "Error downloading study: "
+msgstr "検査のダウンロードに失敗: "
+
+#: ..\../commands/pdfextractercommand.cpp:103
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ..\../main/gui/progress/statusbarprogreso.cpp:278
+#: ..\../widgets/gui/calibracion.cpp:205 ..\../widgets/gui/calibracion.cpp:209
+#: ..\../widgets/gui/calibracion.cpp:219 ..\../widgets/gui/calibracion.cpp:225
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "Error"
+msgstr "エラー"
+
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:130
+msgid "PDF files extracted successfully..."
+msgstr ""
+
+#: ..\../commands/secondarycapturedicomizecommand.cpp:73
+#, fuzzy
+msgid "Ginkgo CADx Secondary Capture"
+msgstr "Ginkgo CADx"
+
+#: ..\../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr "HL7 メッセージを送信 %d の %d"
+
+#: ..\../commands/sendhl7command.cpp:73
+msgid "Message successfully sent"
+msgstr "メッセージ 送信成功"
+
+#: ..\../commands/sendhl7command.cpp:77
+msgid "Unknown protocol"
+msgstr "不明なプロトコル"
+
+#: ..\../commands/sendhl7command.cpp:80 ..\../commands/sendhl7command.cpp:93
+#: ..\../commands/sendhl7command.cpp:145
+msgid "Error sending message:"
+msgstr "送信エラーメッセージ:"
+
+#: ..\../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr "エラー HL7 メッセージ送信 詳細はログを見て下さい"
+
+#: ..\../commands/sendhl7command.cpp:93 ..\../commands/sendhl7command.cpp:94
+msgid "Unknown error"
+msgstr "不明なエラー"
+
+#: ..\../commands/sendhl7command.cpp:134
+msgid "Failed to start connection"
+msgstr "接続開始に失敗しました"
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid "Error sending message. It was sent "
+msgstr "送信エラーメッセージ. 送信されました "
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr " バイト量: "
+
+#: ..\../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr "認可ロジックでエラー. メッセージIDのコントロールは承認されません"
+
+#: ..\../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr "NACKを受信:"
+
+#: ..\../commands/sendhl7command.cpp:258
+msgid "Failed delivery confirmation:"
+msgstr "認可配信に失敗"
+
+#: ..\../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr "認可配信エラー: 配信はリモートエンドで承認されません"
+
+#: ..\../commands/sendpacscommand.cpp:51
+#, fuzzy
+msgid "Send files to PACS"
+msgstr "インポート中にPACSへ検査を送信"
+
+#: ..\../commands/sendpacscommand.cpp:155
+msgid "Uploading files ..."
+msgstr "ファイルをアップロード中..."
+
+#: ..\../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr "エラー: PACSエントリ設定が見つかりません "
+
+#: ..\../commands/sendpacscommand.cpp:181
+msgid "Error:"
+msgstr "エラー:"
+
+#: ..\../commands/sendpacscommand.cpp:189
+msgid "Error sending evidences: Internal error."
+msgstr "エビデンス送信エラー: 内部エラー"
+
+#: ..\../commands/sendpacscommand.cpp:203
+msgid "Error uploading the study to PACS: "
+msgstr "PACSへ検査をアップロード中にエラー: "
+
+#: ..\../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:206
+#, fuzzy
+msgid "Retry send to PACS"
+msgstr "インポート中にPACSへ検査を送信"
+
+#: ..\../commands/synchronizationcommand.cpp:104
+#, fuzzy
+msgid "Error downloading file"
+msgstr "%d ファイルをダウンロード中"
+
+#: ..\../commands/synchronizationcommand.cpp:141
+#, fuzzy
+msgid "Error synchronizing study: "
+msgstr "検査読み込みエラー: 内部エラー"
+
+#: ..\../commands/thumbnailscommand.cpp:107
+#: ..\../commands/thumbnailscommand.cpp:133
+#: ..\../commands/thumbnailscommand.cpp:247
+#: ..\../commands/thumbnailscommand.cpp:376
+#: ..\../commands/thumbnailscommand.cpp:382
+#: ..\../main/gui/import/selectimagesimportation.cpp:504
+msgid "Creating Thumbnail..."
+msgstr "サムネイルを作成中..."
+
+#: ..\../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr "サムネイルを生成中..."
+
+#: ..\../export/tools/iaddfiletohistorytool.cpp:19
+#: ..\../main/gui/history3/historypanel3.cpp:632
+#, fuzzy
+msgid "Open study"
+msgstr "開く"
+
+#: ..\../export/tools/iangletool.cpp:19
+#, fuzzy
+msgid "Angle \tCtrl+A"
+msgstr "ノーマル角度 (3点)"
+
+#: ..\../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr ""
+
+#: ..\../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr ""
+
+#: ..\../export/tools/icolormaptool.cpp:20
+#, fuzzy
+msgid "Color Map"
+msgstr "色"
+
+#: ..\../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ..\../main/gui/open/opendialogsbase.cpp:46
+#: ..\../main/gui/open/opendialogsbase.cpp:198
+msgid "Copy"
+msgstr ""
+
+#: ..\../export/tools/icornerannotationstool.cpp:20
+msgid "Window annotations"
+msgstr "ウインドウアノテーション"
+
+#: ..\../export/tools/idetachwindowtool.cpp:19
+#, fuzzy
+msgid "Detach window"
+msgstr "ウインドウアノテーション"
+
+#: ..\../export/tools/iimageexporttool.cpp:19
+#, fuzzy
+msgid "Export image..."
+msgstr "画像書きだしウィザード"
+
+#: ..\../export/tools/imarkertool.cpp:20
+msgid "Marking Tools \tCtrl+M"
+msgstr ""
+
+#: ..\../export/tools/imetricgridtool.cpp:20
+msgid "Metric grid"
+msgstr "計量グリッド"
+
+#: ..\../export/tools/inotetool.cpp:19
+msgid "Text Note \tCtrl+N"
+msgstr ""
+
+#: ..\../export/tools/ipacsuploadtool.cpp:19
+#, fuzzy
+msgid "Upload study..."
+msgstr "PACSサーバへ画像をアップロード"
+
+#: ..\../export/tools/ipixelsbluringtool.cpp:20
+msgid "Pixels blurring"
+msgstr ""
+
+#: ..\../export/tools/ipointertool.cpp:19
+msgid "Pointer \tEsc"
+msgstr ""
+
+#: ..\../export/tools/iqueryretrievetool.cpp:19
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#: ..\../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr "PACSからDICOM検査を取得"
+
+#: ..\../export/tools/iresettool.cpp:19
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+#, fuzzy
+msgid "Reset"
+msgstr "デフォルトにリセット"
+
+#: ..\../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr ""
+
+#: ..\../export/tools/iruletool.cpp:19
+#, fuzzy
+msgid "Rule \tCtrl+R"
+msgstr "P-R-T axes: "
+
+#: ..\../export/tools/isecondarycapturetool.cpp:19
+msgid "Save snapshot as new series..."
+msgstr ""
+
+#: ..\../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr ""
+
+#: ..\../export/tools/ishowtagstool.cpp:19
+#: ..\../main/tools/showtagshistorytool.cpp:27
+#, fuzzy
+msgid "DICOM inspector"
+msgstr "DICOMタグパネルを隠す"
+
+#: ..\../export/tools/isimpleprinttool.cpp:19
+#: ..\../main/tools/simpleprinttool.cpp:226
+msgid "Print"
+msgstr "印刷"
+
+#: ..\../export/tools/istartdicomizationtool.cpp:19
+#, fuzzy
+msgid "Dicomize..."
+msgstr "DICOM化の後、Ginkgo CADxは自動的に閉じます"
+
+#: ..\../export/tools/itoolpan.cpp:19
+#, fuzzy
+msgid "Pan \tCtrl+P"
+msgstr "P-Value"
+
+#: ..\../export/tools/itoolslider.cpp:19
+#, fuzzy
+msgid "Slider \tCtrl+S"
+msgstr "%s画像をダウンロード"
+
+#: ..\../export/tools/itoolwindowlevel.cpp:19
+msgid "Window/Level \tCtrl+W"
+msgstr ""
+
+#: ..\../export/tools/itoolzoom.cpp:19
+msgid "Zoom \tCtrl+O"
+msgstr ""
+
+#: ..\../export/tools/itrackballtool.cpp:19
+#, fuzzy
+msgid "Trackball \tCtrl+T"
+msgstr "P-R-T axes: "
+
+#: ..\../export/tools/iundotool.cpp:20 ..\../main/tools/undotool.cpp:109
+msgid "Undo"
+msgstr "元に戻す"
+
+#: ..\../export/tools/ivideotool.cpp:19
+msgid "Video \tCtrl+Space"
+msgstr ""
+
+#: ..\../export/tools/iwindowlayouttool.cpp:20
+#, fuzzy
+msgid "Window layout"
+msgstr "1x1 レイアウト"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid "Studies with"
+msgstr "検査と一緒に"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr " サポートされないコンポーネント"
+
+#: ..\../main/controllers/controladorcarga.cpp:210
+msgid "Reading properties"
+msgstr "プロパティ読み込み"
+
+#: ..\../main/controllers/controladorcarga.cpp:219
+#: ..\../main/controllers/controladorcarga.cpp:642
+#: ..\../main/controllers/controladorcarga.cpp:888
+#: ..\../main/controllers/streaming/streamingloader.cpp:600
+msgid "Error reading the study: "
+msgstr "検査読み込みエラー: "
+
+#: ..\../main/controllers/controladorcarga.cpp:224
+#: ..\../main/controllers/controladorcarga.cpp:229
+#: ..\../main/controllers/controladorcarga.cpp:647
+#: ..\../main/controllers/controladorcarga.cpp:893
+msgid "Internal error reading the study: "
+msgstr "検査読み込み内部エラー: "
+
+#: ..\../main/controllers/controladorcarga.cpp:269
+#: ..\../main/controllers/controladorcarga.cpp:281
+#: ..\../main/controllers/controladorcarga.cpp:905
+msgid "Spacing is not valid: ("
+msgstr "間隔が有効ではありません: ("
+
+#: ..\../main/controllers/controladorcarga.cpp:305
+#: ..\../main/controllers/controladorcarga.cpp:338
+#: ..\../main/controllers/controladorcarga.cpp:372
+#: ..\../main/controllers/controladorcarga.cpp:408
+#: ..\../main/controllers/controladorcarga.cpp:441
+#: ..\../main/controllers/controladorcarga.cpp:474
+#: ..\../main/controllers/controladorcarga.cpp:507
+#: ..\../main/controllers/controladorcarga.cpp:540
+#: ..\../main/controllers/controladorcarga.cpp:573
+#: ..\../main/controllers/controladorcarga.cpp:606
+#: ..\../main/controllers/controladorcarga.cpp:935
+msgid "Error loading the study: Out of memory"
+msgstr "検査読み込みエラー: 空きメモリがありません"
+
+#: ..\../main/controllers/controladorcarga.cpp:375
+msgid "Error loading the study: Internal Error"
+msgstr "検査読み込みエラー: 内部エラー"
+
+#: ..\../main/controllers/controladorcarga.cpp:630
+#: ..\../main/controllers/streaming/streamingloader.cpp:1023
+#: ..\../main/controllers/streaming/streamingloader.cpp:1223
+#: ..\../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr "検査読み込みエラー: サポートされないピクセルフォーマット"
+
+#: ..\../main/controllers/controladorcarga.cpp:651
+#: ..\../main/controllers/controladorcarga.cpp:960
+msgid "Process canceled by user."
+msgstr "ユーザーによって処理がキャンセルされました"
+
+#: ..\../main/controllers/controladorcarga.cpp:878
+msgid "Interpreting properties"
+msgstr "プロパティ解釈中"
+
+#: ..\../main/controllers/controladorcarga.cpp:917
+msgid "Spacing of the image is invalid: ("
+msgstr "画像の間隔が有効ではありません: ("
+
+#: ..\../main/controllers/controladorcarga.cpp:942
+msgid "Reading dataset"
+msgstr "データセットを読み込み中"
+
+#: ..\../main/controllers/controladorcarga.cpp:951
+msgid "Error reading the study:"
+msgstr "検査読み込みエラー:"
+
+#: ..\../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr "検査読み込み中の内部エラー:"
+
+#: ..\../main/controllers/controladorcarga.cpp:972
+msgid "load"
+msgstr "読み込み"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:40
+#, fuzzy
+msgid "Stopping HL7 sender"
+msgstr "HL7送信サービスを自動開始"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:63
+#: ..\../main/controllers/controladorenviohl7.cpp:76
+#, fuzzy
+msgid "Error starting HL7 sender"
+msgstr "HL7送信サービスを自動開始"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:65
+#: ..\../main/controllers/controladorenviohl7.cpp:78
+#, fuzzy
+msgid "HL7 sender started"
+msgstr "HL7送信サービスを自動開始"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:108
+msgid "HL7 controller destroyed"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:150
+#, fuzzy
+msgid "Error processing message"
+msgstr "エラーメッセージ"
+
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/controllers/pacscontroller.cpp:1549
+#: ..\../main/controllers/pacscontroller.cpp:1553
+#: ..\../main/controllers/pacscontroller.cpp:1557
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:184
+msgid "Unknown"
+msgstr "不明"
+
+#: ..\../main/controllers/controladorextensiones.cpp:110
+msgid "Loading"
+msgstr "読み込み中"
+
+#: ..\../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr "拡張ライブラリが読み込み出来ません"
+
+#: ..\../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr "ライブラリが読み込めません. ログをチェックしてください"
+
+#: ..\../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr "拡張機能記述子が一致しません"
+
+#: ..\../main/controllers/controladorextensiones.cpp:153
+msgid "Could not find entry point"
+msgstr "エントリポイントが見つかりません"
+
+#: ..\../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr "重複した SID 拡張機能はスキップします:"
+
+#: ..\../main/controllers/controladorhl7.cpp:74
+msgid "Integration engine hostname not set"
+msgstr "組み込みエンジンのホストネームがセットされていません"
+
+#: ..\../main/controllers/controladorhl7.cpp:77
+msgid "Integration engine port not set"
+msgstr "組み込みエンジンのポートがセットされていません"
+
+#: ..\../main/controllers/controladorhl7.cpp:91
+msgid "Unsupported protocol"
+msgstr "サポートされていないプロトコル"
+
+#: ..\../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr "メッセージキューイングエラー. サプライヤをチェックして下さい"
+
+#: ..\../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr "%d 結果を見つけました"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, c-format
+msgid "Downloading file %d/%d"
+msgstr "%d/%d ファイルをダウンロード中"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr "検査ダウンロードサイズの上限を超えました"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr "PDF DICOM化のための予約メモリがありません"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr "画像DICOM化のための予約メモリがありません"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+msgid "Image format not supported"
+msgstr "サポートされてない画像フォーマット"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr "TLS 転送層が作成できません"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr "公開鍵と認証鍵が一致しません"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr "エラー  TLS 層の設定: "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:200
+msgid "Receiving Association failed: "
+msgstr "アソシエーション受信に失敗: "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:209
+#, fuzzy
+msgid "Association received"
+msgstr "NACKを受信:"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:210
+msgid "Parameters:"
+msgstr "パラメータ:"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr "アソシエーション拒否: 悪いアプリケーションコンテキスト名: "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr "アソシエーション拒否: 未実装のクラス UID が規定されました"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr "承認されたアソシエーション (Max Send PDV: "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ")"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:274
+#, fuzzy
+msgid "No valid presentation contexts"
+msgstr "画像提示情報"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "Association(dicom://"
+msgstr "アソシエーション(dicom://"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr "@"
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr "Ginkgo CADx は次の項目から圧縮できません"
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr " から "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, c-format
+msgid "Uploading file %d of %d"
+msgstr "ファイルをアップロード %d のうち %d"
+
+#: ..\../main/controllers/dicommanager.cpp:504
+#: ..\../main/controllers/dicommanager.cpp:531
+msgid "Extracting file..."
+msgstr "ファイルを展開中..."
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid "Error creating history database "
+msgstr "エラー 履歴データベース作成 "
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr " trying temp"
+
+#: ..\../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+"DICOM DIRへの書込権限がありません. プレファレンスはテンポラリディレクトリへ格"
+"納されます"
+
+#: ..\../main/controllers/historycontroller.cpp:343
+msgid "Error creating dicomDir database "
+msgstr "エラー dicomDirデータベース作成"
+
+#: ..\../main/controllers/historycontroller.cpp:425
+#: ..\../main/controllers/historycontroller.cpp:441
+msgid "Error creating thumbnails database "
+msgstr "エラー サムネイルデータベース作成 "
+
+#: ..\../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr "データベース作成エラー:\n"
+
+#: ..\../main/controllers/historycontroller.cpp:560
+msgid "Including image "
+msgstr "画像を含めています "
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr " の "
+
+#: ..\../main/controllers/historycontroller.cpp:707
+#, fuzzy
+msgid "Linking image "
+msgstr "この画像にオーバーレイはありません"
+
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr "履歴読み込みエラー: \n"
+
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr "データベース内のナンバー削除に失敗:\n"
+
+#: ..\../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr "履歴クリアに失敗:\n"
+
+#: ..\../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+"Ginkgo CADx は不活性を検出して %d 秒以内に閉じます\n"
+"続けてもいいですか?"
+
+#: ..\../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+msgid "Malformed template Id ("
+msgstr "不定型なテンプレートId ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+"):\n"
+"は、HL7 IDとして有効ではありません(例: code^description^namespaceId)"
+
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr "モジュール設定内の不定型なIdテンプレート"
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid "Template Id unsupported ("
+msgstr "サポートされないテンプレートId ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr ""
+"):\n"
+"必要ならばアタッチして設定をチェックして下さい"
+
+#: ..\../main/controllers/integrationcontroller.cpp:566
+msgid "Unknown module Id ("
+msgstr "不明なモジュール Id ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:592
+msgid "Empty configuration"
+msgstr "設定をクリア"
+
+#: ..\../main/controllers/integrationcontroller.cpp:631
+msgid "XML Parser Not Found. Key="
+msgstr "XML パーサが見つかりません. キー="
+
+#: ..\../main/controllers/log4cplus/guiappender.cpp:75
+#, fuzzy
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr "%m/%d/%Y %h:%M:%s"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ..\../main/gui/history3/historypanel3base.cpp:48
+#: ..\../main/gui/import/pasosimportacionbase.cpp:227
+msgid "Patient"
+msgstr "患者"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#, fuzzy
+msgid "Patient ID"
+msgstr "患者ID"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:86
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ..\../main/gui/history3/historypanel3.cpp:227
+#: ..\../main/gui/open/opendialogs.cpp:50
+msgid "Modality"
+msgstr "モダリティ"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:98
+msgid "Dimensions"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:109
+#, fuzzy, c-format
+msgid "Made with %s"
+msgstr "%s画像をダウンロード"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:167
+#: ..\../main/controllers/modalitysettingscontroller.cpp:338
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr "デフォルト"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1212
+#, fuzzy
+msgid "Downloading file"
+msgstr "%d ファイルをダウンロード中"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+#, fuzzy
+msgid "Error downloading WADO file"
+msgstr "%d ファイルをダウンロード中"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+#, fuzzy
+msgid "Check PACS configuration"
+msgstr "現在の設定にアップデートチェックするためのURLがありません"
+
+#: ..\../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr "不明なクエリ/リトリーブレベル"
+
+#: ..\../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr "クエリリトリーブレベルが明示されていません"
+
+#: ..\../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1428
+#, fuzzy
+msgid "Invalid HTTP response"
+msgstr "HTTPプロキシを有効"
+
+#: ..\../main/controllers/pacscontroller.cpp:1433
+#, fuzzy
+msgid "Invalid HTTP code"
+msgstr "HTTPプロキシを有効"
+
+#: ..\../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1472
+msgid "PACS-Service"
+msgstr "PACS-サービス"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:97
+#: ..\../main/controllers/parserxmlspanish.cpp:94
+msgid "Omitted Identificator"
+msgstr "ID省略"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:105
+#: ..\../main/controllers/parserxmlspanish.cpp:102
+msgid "Omitted AET"
+msgstr "AET省略"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:113
+#: ..\../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr "ホストネームがありません"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:121
+#: ..\../main/controllers/parserxmlspanish.cpp:118
+msgid "Omitted port"
+msgstr "ポート省略"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:206
+#: ..\../main/controllers/parserxmlenglish.cpp:237
+#: ..\../main/controllers/parserxmlspanish.cpp:188
+#: ..\../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr "PDUサイズは有効な数ではありません"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:212
+#: ..\../main/controllers/parserxmlspanish.cpp:194
+msgid "Port is not a valid number"
+msgstr "ポートは有効な数ではありません"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:248
+#: ..\../main/controllers/parserxmlspanish.cpp:228
+msgid "The port is not a valid number"
+msgstr "ポートは有効な数ではありません"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:265
+#: ..\../main/controllers/parserxmlspanish.cpp:246
+msgid "Setting not found"
+msgstr "設定が見つかりません"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr "\"action\" attribute invalid at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr "\"action\" attribute expected at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr "\"value\" attribute expected at \"query-retrieve-level\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:391
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr "\"code\" attribute expected at \"patient\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:427
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr "\"code\" attribute expected at \"physician\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:434
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr "\"value\" attribute expected at \"physician\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:445
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr "\"iid\" atribute expected at \"institution\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr "\"code\" attribute expected at \"metadata\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:483
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr "\"key\" attribute expected at \"metadata\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:548
+#: ..\../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr "クエリで使用したい属性を明示してください。"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:552
+#: ..\../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr "識別子なしの \"patient\" タグの読み込んでいます"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:570
+#: ..\../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr "組込XMLか設定メニューで、デフォルトPACSを指定して下さい"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr "\"accion\" 属性は \"plantilla\" スコープで無効"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr "\"accion\" 属性は \"plantilla\" スコープで予期"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:340
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr "\"uid\" attribute expected at \"dimse\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr "\"ambito\" attribute invalid at \"dimse\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr "\"ambito\" attribute expected at \"dimse\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:402
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr "\"codigo\" attribute expected at \"paciente\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:438
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr "\"codigo\" attribute expected at \"medico\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:445
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr "\"valor\" attribute expected at \"medico\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr "\"cid\" atribute expected at \"centro\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr "\"aid\" attribute expected at \"hce\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:486
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr "\"codigo\" attribute expected at \"metadato\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr "\"clave\" attribute expected at \"metadato\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:524
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr "\"petition-id\" attribute expected at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr "\"ambito\" attribute expected at \"plantilla\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:559
+msgid "id_application expected"
+msgstr "id_application expected"
+
+#: ..\../main/controllers/smartretrievecontroller.cpp:124
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:920
+msgid "Downloading from PACS..."
+msgstr "PACSからダウンロード中"
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:303
+#: ..\../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr "検査読み込みで内部エラー, 不明なフォーマット"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ..\../main/gui/history3/historytablemodel.cpp:403
+#: ..\../main/gui/history3/historytablemodel.cpp:415
+#: ..\../main/gui/history3/historytablemodel.cpp:470
+#: ..\../main/gui/history3/historytablemodel.cpp:482
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:102
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr "%m/%d/%Y %h:%M:%s"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr "%m/%d/%Y 00:00:00"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+msgid "Exploring PACS..."
+msgstr "PACSを探索..."
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ..\../main/gui/history3/historypanel3.cpp:225
+#: ..\../main/gui/open/opendialogs.cpp:49
+#, fuzzy
+msgid "Patient id"
+msgstr "患者ID"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ..\../main/gui/history3/historypanel3.cpp:224
+#: ..\../main/gui/open/opendialogs.cpp:48
+msgid "Patient name"
+msgstr "患者氏名"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:479
+msgid "Study Instance UID"
+msgstr "スタディ インスタンス UID"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ..\../main/gui/history3/historypanel3.cpp:231
+#: ..\../main/gui/open/opendialogs.cpp:53
+msgid "Accession number"
+msgstr "アソシエーション番号"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:481
+msgid "Study date"
+msgstr "検査日"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:482
+#, fuzzy
+msgid "Study time"
+msgstr "時間"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:490
+msgid "Series Instance UID"
+msgstr "シリーズ インスタンス UID"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:492
+msgid "Series date"
+msgstr "シリーズ日"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:493
+#, fuzzy
+msgid "Series time"
+msgstr "時間"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:519
+msgid "No results found"
+msgstr "結果が見つかりません"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#, fuzzy
+msgid "Write query name"
+msgstr "氏名"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#, fuzzy
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr ""
+"ファイルは存在します\n"
+"上書きしますか?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+msgid "Id"
+msgstr "Id"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+msgid "Date Time"
+msgstr "日時"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ..\../main/gui/history3/historypanel3.cpp:229
+#: ..\../main/gui/import/pasosimportacionbase.cpp:298
+#: ..\../main/gui/import/pasosimportacionbase.cpp:340
+#: ..\../main/gui/open/opendialogs.cpp:52
+msgid "Description"
+msgstr "概要"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ..\../main/gui/import/pasosimportacionbase.cpp:276
+msgid "Accession Number"
+msgstr "Accession Number"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:210
+#, fuzzy
+msgid "Store query"
+msgstr "PACS id検索エラー "
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:211
+#, fuzzy
+msgid "Remove query"
+msgstr "削除"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:278
+msgid "There is no any PACS configured"
+msgstr "PACS設定がありません"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr "Acc#"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+msgid "Study UID"
+msgstr "検査UID"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+"パラメータなしの検索は長い時間が必要です\n"
+"続けますか?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid "Search"
+msgstr "検索"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:519
+msgid "Download series"
+msgstr "シリーズをダウンロード"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+msgid "Download study"
+msgstr "検査をダウンロード"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:535
+#, fuzzy
+msgid "Link series"
+msgstr "シリーズ"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:537
+#, fuzzy
+msgid "Link study"
+msgstr "検査"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:551
+msgid "Properties..."
+msgstr "プロパティ..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#, fuzzy
+msgid "You must specify at least a modality or a period of time"
+msgstr "uid 検査か受付番号の少ない方を明示する必要があります"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#, fuzzy
+msgid "Select a valid query"
+msgstr "有効なPACSサーバを選択して下さい"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+msgid "Select a valid PACS Server"
+msgstr "有効なPACSサーバを選択して下さい"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid "Download of modality "
+msgstr "モダリティのダウンロード "
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr " 無許可"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr "この種類のモジュールをダウンロードすることは許可されていません."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "Modality download error"
+msgstr "モダリティダウンロードエラー"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:786
+msgid "search results"
+msgstr "検索結果"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:913
+#, fuzzy
+msgid "Downloading serie..."
+msgstr "ファイルをダウンロード中..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:916
+#, fuzzy
+msgid "Downloading study..."
+msgstr "検査のダウンロードに失敗: "
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+msgid "PACS acquisition is restricted"
+msgstr "PACS からの取得は制約されます"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+msgid "Server"
+msgstr "サーバ"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ..\../main/gui/import/pasosimportacionbase.cpp:284
+#: ..\../main/gui/import/pasosimportacionbase.cpp:326
+#: ..\../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr "日付"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ..\../main/gui/history3/historypanel3base.cpp:81
+msgid "Any date"
+msgstr "いつでも"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ..\../main/gui/history3/historypanel3base.cpp:85
+msgid "Today AM"
+msgstr "本日午前"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ..\../main/gui/history3/historypanel3base.cpp:88
+msgid "Today PM"
+msgstr "本日午後"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ..\../main/gui/history3/historypanel3base.cpp:91
+msgid "Today"
+msgstr "本日"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ..\../main/gui/history3/historypanel3base.cpp:100
+msgid "Yesterday"
+msgstr "昨日"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ..\../main/gui/history3/historypanel3base.cpp:103
+msgid "Last 7 days"
+msgstr "7日以内"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ..\../main/gui/history3/historypanel3base.cpp:106
+msgid "Last 30 days"
+msgstr "30日以内"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ..\../main/gui/history3/historypanel3base.cpp:109
+msgid "Last 3 months"
+msgstr "3ヶ月前"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ..\../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr "間隔:"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ..\../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr "モダリティ"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+#, fuzzy
+msgid "Stored queries"
+msgstr "ファイルは格納できません "
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+#, fuzzy
+msgid "Select stored queries..."
+msgstr "ファイルを格納したいディレクトリを選択して下さい"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ..\../main/gui/open/opendialogsbase.cpp:50
+#: ..\../main/gui/open/opendialogsbase.cpp:202
+msgid "Link"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+msgid "Download"
+msgstr "ダウンロード"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ..\../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr "閉じる"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+msgid "Series does not exist"
+msgstr "シリーズは存在しません"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr "このシリーズはローカル履歴から削除されています"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr "続く"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ..\../main/gui/open/opendialogsbase.cpp:127
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ..\../main/tools/metricgridtool.cpp:101
+msgid "Ok"
+msgstr "Ok"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:151
+#, fuzzy
+msgid "Download again"
+msgstr "ダウンロード"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+msgid "Open"
+msgstr "開く"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:179
+#, fuzzy
+msgid "Set query name"
+msgstr "氏名"
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:32
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:34
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizedialog.cpp:64
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ..\../main/gui/export/parametrosprincipales.cpp:194
+msgid "Exporting images ..."
+msgstr "画像書き出し中..."
+
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:21
+#, fuzzy
+msgid "Common tags"
+msgstr "Ginkgo CADxプライベートタグ"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+msgid "Patient's name and surname"
+msgstr "患者の氏名"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+msgid "Patient Id"
+msgstr "患者ID"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr "施設"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr "依頼元医師ID"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr "コメント"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:44
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr "Ginkgo CADxタグ  (評価マップ...)"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:71
+#, fuzzy
+msgid "Add new..."
+msgstr "新規..."
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ..\../main/tools/anonymizetool.cpp:26
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr "匿名化"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:136
+#, fuzzy
+msgid "Create new"
+msgstr "新規..."
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:136
+#, fuzzy
+msgid "Add DICOM tag"
+msgstr "加える"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:199
+msgid "Group"
+msgstr "グループ"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:203
+msgid "Element"
+msgstr "エレメント"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ..\../widgets/wangulo.cpp:1114
+msgid "Value"
+msgstr "値"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+msgid "Top right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+msgid "Top left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+msgid "Bottom left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+msgid "Bottom right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#, fuzzy
+msgid "You must fill in all fields"
+msgstr "続けるには全ての項目を埋めて下さい"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+msgid "Window/level label in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+#, fuzzy
+msgid "Window"
+msgstr "ウインドウアノテーション"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+msgid "Level"
+msgstr "レベル"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+msgid "Do you confirm the removal of the preset?"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Data modified"
+msgstr "データが修正されました"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+#, fuzzy
+msgid "Modality settings"
+msgstr " モダリティへ "
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+#, fuzzy
+msgid "Default modality settings"
+msgstr " モダリティへ "
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, fuzzy, c-format
+msgid "%s settings"
+msgstr "設定"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:60
+#, fuzzy
+msgid "settings"
+msgstr "設定"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Export Configuration"
+msgstr "設定書き出し"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Ini Files(*.ini)|*.ini"
+msgstr "Ini Files(*.ini)|*.ini"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+"ファイルは存在します\n"
+"上書きしますか?"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+msgid "Existing file"
+msgstr "ファイルが既に存在する"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+msgid "Export successfully completed"
+msgstr "書き出し完了"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+msgid "There was an error during exportation"
+msgstr "書き出し中にエラーが発生しました"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Import Configuration"
+msgstr "読み込み設定"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Ini files(*.ini)|*.ini"
+msgstr "Ini files(*.ini)|*.ini"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr "読み込みが完全に成功, 変更を反映するにはGinkgo CADx を再起動して下さい"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+msgid "There was an error during importation, check permissions"
+msgstr "読み込み中にエラーがありました, 属性をチェックしてください"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+msgid "Dicom tag"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+#, fuzzy
+msgid "Split horizontally..."
+msgstr "水平にタイリング"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+#, fuzzy
+msgid "Split vertically..."
+msgstr "垂直にタイリング"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ..\../main/tools/windowlayouttool.cpp:273
+#, fuzzy
+msgid "Split active horizontally"
+msgstr "アクティブ"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ..\../main/tools/windowlayouttool.cpp:274
+#, fuzzy
+msgid "Split active vertically"
+msgstr "アクティブ"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+#, fuzzy
+msgid "New hanging protocol"
+msgstr "プロトコル"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, fuzzy, c-format
+msgid "Window %d"
+msgstr "ウインドウアノテーション"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr "アクティブ"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "Yes"
+msgstr "はい"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr "いいえ"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+msgid "Hanging protocols"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+msgid "One day"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+#, fuzzy
+msgid "Two days"
+msgstr "グリッド (2カラム)"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+#, fuzzy
+msgid "Three days"
+msgstr "グリッド (3カラム)"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+#, fuzzy
+msgid "Two weeks"
+msgstr "グリッド (2カラム)"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+msgid "One month"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+#, fuzzy
+msgid "Three months"
+msgstr "3ヶ月前"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+#, fuzzy
+msgid "Local database"
+msgstr "エラー 履歴データベース作成 "
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+msgid "Local DICOM Dir setup"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+"選択されたディレクトリは存在しません\n"
+"このディレクトリを作成しますか?"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+"ディレクトリ作成に失敗しました. パスが正確か上位ディレクトリに権限があるかを"
+"確認して下さい"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+"ディレクトリ読み込み中にエラーがありました. 書き込み権限を確認して下さい"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+msgid "Select DICOMDIR"
+msgstr "DICOMDIRを選択"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+"注意. ディレクトリをアップデートするには、現在開いているシリーズを閉じて下さ"
+"い"
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr "Workstation"
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr "ローカルステーションのパラメータ設定"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr "拡張機能"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+msgid "Extensions settings"
+msgstr "拡張機能設定"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr "拡張機能の変更を有効にするには Ginkgo CADx の再起動が必要です"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#, fuzzy
+msgid "Port has to be a valid number"
+msgstr "ポートは有効な数ではありません"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr "総合"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+msgid "General configuration parameters"
+msgstr "総合設定パラメータ"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr "変更を有効にするには Ginkgo CADx の再起動が必要です"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr "電子健康記録システム"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr "電子健康記録システムの設定"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:134
+msgid "Testing conectivity with the server..."
+msgstr "サーバ接続をテスト中..."
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:144
+msgid "Error connecting to url"
+msgstr "URL接続エラー"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#, fuzzy
+msgid "hostname/port not set"
+msgstr "ホスト名 / ポート"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr "接続テスト失敗"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr "接続テスト成功"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "Select certificate"
+msgstr "証明書の選択"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr "プライベートキーとパブリックキーを選択して下さい"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:255
+msgid "Change ..."
+msgstr "変更..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+msgid "Import ..."
+msgstr "読み込み..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:279
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr "SSL/TLSを使用したいなら、有効な証明書とプライベートキーが必要です"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:472
+msgid "There are this errors: "
+msgstr "エラーがあります: "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+"\n"
+"- この PACS id は使用済み"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"- ポートは正整数です(16bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+"\n"
+"- ポートが大きすぎます"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+"\n"
+"- AETの最大長は16文字です"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+"\n"
+"- PDUサイズは0かそれ以上にすべきです(デフォルトは16384)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+"\n"
+"- PDUの最大サイズは "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+"\n"
+"- PDUの最小サイズは "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+"\n"
+"- SSL/TLSを使用したいなら、有効な証明書とプライベートキーを設定してください"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:525
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr "続けるには全ての項目を埋めて下さい"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:558
+msgid "Testing the connection to the node ..."
+msgstr "サーバ接続をテスト中..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:561
+msgid "DICOM Error"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr "接続できません: ネットワークサポートを開始できません"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr "このサービスは正しくC-ECHOに反応しない"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:607
+#, fuzzy
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr "このサービスは正しくC-ECHOに反応しない"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:616
+#, fuzzy
+msgid "Invalid port number"
+msgstr "ポートは有効な数ではありません"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:622
+#, fuzzy
+msgid "WADO Error"
+msgstr "エラー"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:703
+msgid "Use by default"
+msgstr "デフォルトとして使用"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:795
+msgid "DICOM nodes"
+msgstr "DICOM ノード"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:800
+msgid "DICOM nodes settings"
+msgstr "DICOM ノード設定"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr "エラーの発生原因:"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"- ローカルポートは正整数です(16bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+"\n"
+"- ローカルポートが大きすぎます"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+"\n"
+"- ローカルAETの最大長は16文字です"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr "ノードの取外しを承認 "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"PACSサーバとコミュニケーションするために使用するローカルAETを設定する必要があ"
+"ります. 転送のキモとして、ポートは火壁でオープンしてください."
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ..\../main/gui/export/pasosexportacionbase.cpp:20
+msgid "Profile"
+msgstr "プロファイル"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr "デフォルト値"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+msgid "Set property active"
+msgstr "プロパティの活性を設定"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr "不活性"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Set property inactive"
+msgstr "プロパティの不活性を設定"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+msgid "Set default value"
+msgstr "規定値にセット"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+msgid "Set by user"
+msgstr "ユーザーにより設定"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+msgid "Profile name can't be repeated"
+msgstr "プロファイル名は重複できません"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr "続けるには全ての項目を埋めて下さい"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr "プロファイル"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+msgid "Profiles Settings"
+msgstr "プロファイル設定"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr "権限変更を適応するにはGinkgo CADxの再起動が必要です"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+msgid "Confirm the removal of the profile "
+msgstr "プロファイル削除の確認 "
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+msgid "New User"
+msgstr "新しいユーザー"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr "ユーザー名は4文字以上にしてください"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+msgid "User name repeated"
+msgstr "ユーザ名重複"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr "パスワードと確認パスワードは同一にしてください"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+msgid "Password has to contain at least 6 characters"
+msgstr "パスワードは6文字以上にしてください"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+msgid "No login"
+msgstr "ログインしていません"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+msgid "User/Password"
+msgstr "ユーザー/パスワード"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+msgid "Password"
+msgstr "パスワード"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+msgid "Password is setted"
+msgstr "パスワードは設定されています"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr "パスワード変更"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+msgid "Password is not setted"
+msgstr "パスワードは設定されていません"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+msgid "Set password"
+msgstr "パスワード設定"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+msgid "Security Setting"
+msgstr "セキュリティ設定"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr "一つ以上のユーザーを作成して下さい"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr "メインパスワードを設定して下さい"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+msgid "User inserted successfully"
+msgstr "ユーザー追加に成功"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr "ユーザー追加でエラーがありました. 詳細はログで"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+msgid "Password changed successfully"
+msgstr "パスワード変更に成功"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr "パスワード変更でエラーがありました. 詳細はログで"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+msgid "User deleted successfully"
+msgstr "ユーザー削除に成功"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr "ユーザー削除でエラーがありました. 詳細はログで"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr "Ginkgo CADxは、一つ以上のユーザーが必要です"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ..\../main/gui/login/dialogologin.cpp:27
+msgid "User"
+msgstr "ユーザー"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ..\../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr "ディレクトリを選択"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr "ローカルタイトルは重複できません"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+msgid "Maximum length of title is 8 characters"
+msgstr "タイトルは最大8文字です"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr "選択されたディレクトリは開けません"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr "続けるにはタイトルと場所の項目を埋めて下さい"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+msgid "Title"
+msgstr "タイトル"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+msgid "Path"
+msgstr "パス"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr "モニタ"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+msgid "Clean before"
+msgstr "クリーン前"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+msgid "Clean after"
+msgstr "クリーン後"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr "場所"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+msgid "Location Settings"
+msgstr "場所設定"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr "匿名"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:96
+msgid "Anonymization settings"
+msgstr "匿名設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1370
+msgid "Settings"
+msgstr "設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+#, fuzzy
+msgid "Export config..."
+msgstr "画像書き出し"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+#, fuzzy
+msgid "Import config..."
+msgstr "読み込み"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr "適応"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+msgid "Physician's name"
+msgstr "医師名"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+msgid "Physician's Id"
+msgstr "医師ID"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+msgid "Service"
+msgstr "サービス"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+msgid "Service's name"
+msgstr "サービス名"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+msgid "Service's Id"
+msgstr "サービスID"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+msgid "Local institution"
+msgstr "ローカル施設"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+msgid "Institution's name"
+msgstr "施設名"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+msgid "Institution's Id"
+msgstr "施設ID"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+msgid "Dicomized files"
+msgstr "DICOM化ファイル"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+msgid "Charset"
+msgstr "文字セット"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr "ISO_IR 192"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr "ISO_IR 6"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr "ISO_IR 100"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr "ISO_IR 101"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr "ISO_IR 109"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr "ISO_IR 110"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr "ISO_IR 126"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr "ISO_IR 127"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr "ISO_IR 138"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr "ISO_IR 144"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+msgid "ISO_IR 148"
+msgstr "ISO_IR 148"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr "言語"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+msgid "Automatically check for updates"
+msgstr "アップデートの自動チェック"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+msgid "Proxy settings"
+msgstr "プロキシ設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+msgid "Enable http proxy"
+msgstr "HTTPプロキシを有効"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+#, fuzzy
+msgid "Proxy Settings"
+msgstr "プロキシ設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+msgid "Server settings"
+msgstr "サーバ設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+msgid "Host"
+msgstr "ホスト"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+msgid "Port"
+msgstr "ポート"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr "システム認証"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr "プロキシサーバには認証が必要です"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+#, fuzzy
+msgid "Username"
+msgstr "ユーザーネームかパスワードが不正確です"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr "例外"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+#, fuzzy
+msgid "No proxy for addresses containing"
+msgstr "コンマでアドレスを区切って下さい."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr "コンマでアドレスを区切って下さい."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+msgid "DICOM Dir"
+msgstr "DICOM Dir"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr "DICOM Dirは履歴が格納されたローカルディレクトリです"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr "..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+"注意. ディレクトリを更新するには、開いている全てのシリーズを閉じて下さい"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+#, fuzzy
+msgid "Auto-cleaning"
+msgstr "自動計算"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+msgid "MB"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ..\../main/tools/toolwindowlevel.cpp:201
+msgid "Reset to default"
+msgstr "デフォルトにリセット"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr "ローカルPACS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"PACSサーバとコミュニケーションするために使用するローカルAETを設定する必要があ"
+"ります. 転送のキモとして、ポートは火壁でオープンしてください."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+msgid "Local AET"
+msgstr "ローカルAET"
+
+# DICOM Network entries from PACS Configuration
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+"同等環境における大規模な実装のために、 ローカルAETに特別なワイルドカードが使"
+"用可能です:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr "上位設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+msgid "DICOM Nodes"
+msgstr "DICOM ノード"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+msgid "New ..."
+msgstr "新規..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+msgid "Edit ..."
+msgstr "編集..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete"
+msgstr "削除"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+msgid "Set Default"
+msgstr "デフォルトにセット"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+msgid "DICOM Node"
+msgstr "ログノード"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr "AET"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+msgid "PDU (KB)"
+msgstr "PDU (KB)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+msgid "Retrieve method"
+msgstr "リトリーブ方法"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Move"
+msgstr "Move"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Get"
+msgstr "Get"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+#, fuzzy
+msgid "WADO URL"
+msgstr "オンラインサポートのURL"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+msgid "Retrieve mode"
+msgstr "リトリーブモード"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ..\../main/gui/import/pasosimportacionbase.cpp:319
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1395
+msgid "Series"
+msgstr "シリーズ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+msgid "Studies"
+msgstr "スタディ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr "接続の再利用"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr "接続を再利用するには1つ以上のクエリが必要です"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+msgid "Worklists"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+msgid "Select how do you want to handle MPPS items"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+#, fuzzy
+msgid "DICOM MPPS"
+msgstr "アソシエーション(dicom://"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+#, fuzzy
+msgid "HL7 messages"
+msgstr "メッセージ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+#, fuzzy
+msgid "HL7"
+msgstr "HL7サービス"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+#, fuzzy
+msgid "Abort message"
+msgstr "メッセージ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+#, fuzzy
+msgid "Completed message"
+msgstr "書き出し完了"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+#, fuzzy
+msgid "In progress message"
+msgstr "メッセージ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+#, fuzzy
+msgid "Default values"
+msgstr "デフォルト"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+msgid "Worklist"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+msgid "SSL/TLS"
+msgstr "SSL/TLS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+msgid "Verify server credentials"
+msgstr "サーバ証明書を照合"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+msgid "Use SSL/TLS"
+msgstr "SSL/TLS を使用"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr "証明書"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+msgid "Certificate to use in this connection"
+msgstr "この接続に証明書を使用"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr "上位設定..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+#, fuzzy
+msgid "Default charset"
+msgstr "文字セット"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+msgid "Advanced"
+msgstr "上位設定..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr "接続テスト"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr "クライアント証明書を照合"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+msgid "Local AET certificate"
+msgstr "ローカルAET証明書"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+msgid "Certificate used by Ginkgo CADx"
+msgstr "Ginkgo CADx に使用される認証"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr "Gingo CADx Application ID used to fill MSH.3 field"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+msgid "Receiver organization Id"
+msgstr "Receiver organization ID"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr "Unique identifier of the organization receiving the message."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+msgid "Petitioner System Id"
+msgstr "Petitioner System ID"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr "Unique identifier of the requesting system."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+msgid "Filler Application Id"
+msgstr "Filler Application ID"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr "アプリケーションの一意な識別子  (SIID/Ginkgo CADx)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr "Unique identifier of the filler application (SIID/Ginkgo)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+msgid "Ginkgo CADx Application Id"
+msgstr "Ginkgo CADx Application Id"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+msgid "Integration engine"
+msgstr "Integration engine"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+msgid "Hostname / Port"
+msgstr "ホスト名 / ポート"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr "Hostname (IP or DNS) integration engine"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr "/"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+msgid "Protocol"
+msgstr "プロトコル"
+
+# EHR/Integration entries from EHR Configuration
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr "実装エンジンの転送レイヤープロトコル"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr "MLLP"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ..\../main/gui/export/pasosexportacionbase.cpp:28
+msgid "Format"
+msgstr "フォーマット"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+msgid "Message's format"
+msgstr "メッセージフォーマット"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr "ER7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+msgid "Test engine"
+msgstr "Test engine"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+msgid "Test Integration Engine connectivity"
+msgstr "テスト実装エンジンの接続性"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+msgid "Ginkgo Extension Title"
+msgstr "Ginkgo 拡張タイトル"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+msgid "Edit public key"
+msgstr "パブリックキーの編集"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr "デフォルト証明書を使用"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+msgid "Public key"
+msgstr "パブリックキー"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+msgid "Public key in PEM format"
+msgstr "PEMフォーマットのパブリックキー"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+msgid "Load ..."
+msgstr "読み込み..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+msgid "Private key"
+msgstr "プライベートキー"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+msgid "Private key in PEM format"
+msgstr "PEMフォーマットのプライベートキー"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+msgid "Profile name"
+msgstr "プロファイル名"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+msgid "Set active"
+msgstr "アクティブに設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr "既知のパスが組み込まれた場所(例:遠隔共有ディスク)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+msgid "Configure location"
+msgstr "場所設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+msgid "Location"
+msgstr "場所"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr "DICOM化の後にディレクトリを削除"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr "DICOM化の前にディレクトリを削除"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+msgid "Security type"
+msgstr "セキュリティタイプ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr "ユーザー"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+msgid "Change Password ..."
+msgstr "パスワード変更..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+msgid "Set main password"
+msgstr "メインパスワード設定..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+msgid "Set Password"
+msgstr "パスワード設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+msgid "Edit User"
+msgstr "ユーザー編集"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+msgid "User Name"
+msgstr "ユーザー名"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+msgid "Confirm Password"
+msgstr "パスワード確認"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+msgid "Properties"
+msgstr "プロパティ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+#, fuzzy
+msgid "Edit corner annotations"
+msgstr "コーナーアノテーションを隠す"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue}  where GGGG is the tag's group in hexadecimal and EEEE is the "
+"tag's element."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+#, fuzzy
+msgid "Window/level"
+msgstr "レベル"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr "加える"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ..\../main/gui/history3/historytoolmenu.cpp:149
+#: ..\../widgets/gui/selecciontextobase.h:58
+#, fuzzy
+msgid "Edit"
+msgstr "編集..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+#, fuzzy
+msgid "Default Window/Level"
+msgstr "レベル"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+#, fuzzy
+msgid "Corner annotations"
+msgstr "コーナーアノテーションを隠す"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+#, fuzzy
+msgid "Setup corner annotations"
+msgstr "コーナーアノテーションを隠す"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+#, fuzzy
+msgid "Setup..."
+msgstr "セキュリティ設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+#, fuzzy
+msgid "Other settings"
+msgstr "その他"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+#, fuzzy
+msgid "Interpolate pixel data"
+msgstr "日付"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+#, fuzzy
+msgid "Hanging protocol"
+msgstr "プロトコル"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+#, fuzzy
+msgid "Opening mode"
+msgstr "リトリーブモード"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+#, fuzzy
+msgid "Study opening criteria"
+msgstr "検査を開く時にエラー"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+msgid "Workspace"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+#, fuzzy
+msgid "Enable/Disable"
+msgstr "シェーダを有効"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+#, fuzzy
+msgid "Top left corner annotations"
+msgstr "コーナーアノテーションを隠す"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+#, fuzzy
+msgid "Setup window"
+msgstr "セキュリティ設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+#, fuzzy
+msgid "Set default"
+msgstr "デフォルトにセット"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+#, fuzzy
+msgid "Open in main window"
+msgstr "メインパスワード設定..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+#, fuzzy
+msgid "Setup position..."
+msgstr "位置   : "
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+msgid "Setup undocked window position"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+#, fuzzy
+msgid "Layout"
+msgstr "1x1 レイアウト"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+#, fuzzy
+msgid "Current layout"
+msgstr "現在"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+#, fuzzy
+msgid "Columns"
+msgstr "グリッド (2カラム)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+#, fuzzy
+msgid "Series criteria"
+msgstr "シリーズ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+#, fuzzy
+msgid "Select opening mode"
+msgstr "リトリーブモード"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+#, fuzzy
+msgid "Tag"
+msgstr "識別子なしの \"patient\" タグの読み込んでいます"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+msgid "Save"
+msgstr "保存"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+#, fuzzy
+msgid "Enable background queries"
+msgstr "シェーダを有効"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+#, fuzzy
+msgid "Smart retrieve"
+msgstr "リトリーブ方法"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+#, fuzzy
+msgid "Smart retrieve settings"
+msgstr "設定"
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr "不活性を検出"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.h:64
+#, fuzzy
+msgid "Export DICOM"
+msgstr "DICOM DIRへ書き出し"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr "依頼医師ID"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+msgid "Ginkgo CADx private tags"
+msgstr "Ginkgo CADxプライベートタグ"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ..\../main/gui/history3/historypanel3.cpp:340
+#: ..\../main/gui/history3/historytoolmenu.cpp:158
+#, fuzzy
+msgid "Export"
+msgstr "画像書き出し"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ..\../main/gui/export/parametrosprincipales.cpp:157
+msgid "Select the directory where the files will be stored"
+msgstr "ファイルを格納したいディレクトリを選択して下さい"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+"選択されたディレクトリは存在しません\n"
+"作成しますか?"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr "選択されたパスに他のDICOMディレクトリが存在します"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+msgid "Select the DICOM Dir folder"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+#, fuzzy
+msgid "DICOM Dir migration"
+msgstr "DICOM Dir"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+#, fuzzy
+msgid "Migrate existing (recommended)"
+msgstr "ファイルが既に存在する"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+#, fuzzy
+msgid "Continue..."
+msgstr "続く"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+#, fuzzy
+msgid "Select other"
+msgstr "その他"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+msgid "Browse..."
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:106
+msgid "DICOM Export"
+msgstr "DICOM書き出し"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:110
+msgid "Select the format and the images you want to export"
+msgstr "書き出したい画像とフォーマットを選択してください"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:143
+#, fuzzy
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:150
+#, fuzzy
+msgid "Select file"
+msgstr "有効なDICOMDIRファイルを選択"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "DICOM (native format)"
+msgstr "DICOM (ネイティブフォーマット)"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "Image (jpg, bmp, png)"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:38
+#, fuzzy
+msgid "Export all files of opened tab"
+msgstr "%d の %d ファイルを書き出し中"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:55
+msgid "JPEG"
+msgstr "JPEG"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr "品質"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:40
+msgid "Image Export Wizard"
+msgstr "画像書きだしウィザード"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ..\../main/gui/license/aboutdialogbase.cpp:67
+#: ..\../main/gui/license/aboutdialogbase.cpp:151
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:54
+msgid "&Accept"
+msgstr "&受諾"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr "&次へ >"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+#, fuzzy
+msgid "Open link"
+msgstr "開く"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+#, fuzzy
+msgid "File link:"
+msgstr "このファイル"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ..\../main/gui/import/pasosimportacionbase.cpp:270
+msgid "Study"
+msgstr "検査"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+msgid "User name"
+msgstr "ユーザー名"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+#, fuzzy
+msgid "Ginkgo Cloud link"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+msgid "Copy to clipboard"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "New Ginkgo Cloud study"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+#, fuzzy
+msgid "To download the study, paste this url "
+msgstr "検査をダウンロード"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+msgid "Creator"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+#, fuzzy
+msgid "Last Modificator"
+msgstr "7日以内"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+#, fuzzy
+msgid "Show link..."
+msgstr "開始時に表示"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+#, fuzzy
+msgid "Invalid link"
+msgstr "無効な DICOM コンフォーマンスファイル"
+
+#: ..\../main/gui/history3/historypanel3.cpp:117
+#: ..\../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr "シリーズを開く"
+
+#: ..\../main/gui/history3/historypanel3.cpp:119
+#: ..\../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr "次と一緒にシリーズを開く..."
+
+#: ..\../main/gui/history3/historypanel3.cpp:226
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr "年齢"
+
+#: ..\../main/gui/history3/historypanel3.cpp:228
+#, fuzzy
+msgid "Date acquired"
+msgstr "日付"
+
+#: ..\../main/gui/history3/historypanel3.cpp:230
+#, fuzzy
+msgid "Date added"
+msgstr "日付"
+
+#: ..\../main/gui/history3/historypanel3.cpp:308
+#: ..\../main/gui/history3/historytoolmenu.cpp:82
+#: ..\../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr "取得"
+
+#: ..\../main/gui/history3/historypanel3.cpp:316
+#: ..\../main/tools/dicomizetool.cpp:28
+#, fuzzy
+msgid "Dicomize"
+msgstr "DICOM化の後、Ginkgo CADxは自動的に閉じます"
+
+#: ..\../main/gui/history3/historypanel3.cpp:363
+msgid "All patients"
+msgstr "全ての患者"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+msgid "Results"
+msgstr "結果"
+
+# Number of series (for activity report)
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, fuzzy, c-format
+msgid " (%d images)"
+msgstr "画像書き出し"
+
+#: ..\../main/gui/history3/historypanel3.cpp:634
+#, fuzzy
+msgid "Open study with .."
+msgstr "開く"
+
+#: ..\../main/gui/history3/historypanel3.cpp:663
+#: ..\../main/gui/history3/historypanel3base.cpp:482
+#, fuzzy
+msgid "Synchronize"
+msgstr "同期"
+
+#: ..\../main/gui/history3/historypanel3.cpp:677
+msgid "&Delete from history"
+msgstr "&履歴から削除"
+
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#, fuzzy
+msgid "&Clear history"
+msgstr "クリア"
+
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr "タブが最大数に達したので, いくつかのタブを閉じてから再度試して下さい"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid "Unable to open modality "
+msgstr "モダリティを開くことができません"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr " 転送構文と一緒に "
+
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr "履歴を空にする事に失敗しました. 開いている検査を閉じて下さい"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1086
+msgid "all files"
+msgstr "全てのファイル"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#, fuzzy
+msgid "Select at least one series"
+msgstr "一つ以上の画像を選択して下さい"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr "開いているシリーズは削除できません"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+#, fuzzy
+msgid "those series"
+msgstr "シリーズ"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+#, fuzzy
+msgid "this series"
+msgstr "シリーズ"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:57
+#, fuzzy
+msgid "Advanced search"
+msgstr "上位設定..."
+
+#: ..\../main/gui/history3/historypanel3base.cpp:73
+#, fuzzy
+msgid "Acquisition date"
+msgstr "日付"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:302
+#: ..\../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr "取り外しを承認"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr "削除してもいいですか "
+
+#: ..\../main/gui/history3/historypanel3base.cpp:336
+#: ..\../main/gui/history3/historytoolmenu.cpp:102
+#: ..\../main/gui/history3/historytoolmenu.cpp:200
+#: ..\../main/gui/history3/historytoolmenu.cpp:229
+msgid "Remove"
+msgstr "削除"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr "開きたいファイルを選んで下さい/s"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr "いつも表示されているこれらのファイルを使用"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:454
+#: ..\../main/gui/history3/historypanel3base.h:187
+#, fuzzy
+msgid "Synchronize files"
+msgstr "同期"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+
+#: ..\../main/gui/history3/historytablemodel.cpp:406
+#: ..\../main/gui/history3/historytablemodel.cpp:418
+#: ..\../main/gui/history3/historytablemodel.cpp:473
+#: ..\../main/gui/history3/historytablemodel.cpp:485
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:105
+msgid "00/00/0000 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:138
+msgid "Close history"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:139
+#: ..\../main/gui/startup/startupform.cpp:53
+#, fuzzy
+msgid "History"
+msgstr "履歴を格納中..."
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:201
+#: ..\../main/gui/history3/historytoolmenu.cpp:230
+#, fuzzy
+msgid "Clear history"
+msgstr "クリア"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:232
+#, fuzzy
+msgid "Select all"
+msgstr "全て"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:233
+#, fuzzy
+msgid "Deselect all"
+msgstr "全て"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+msgid "Destination"
+msgstr "送信先"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+msgid "Status"
+msgstr "ステータス"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+msgid "Error message"
+msgstr "エラーメッセージ"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+msgid "Show Message"
+msgstr "メッセージを表示"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+msgid "Edit Message"
+msgstr "メッセージを編集"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+msgid "Delete message"
+msgstr "メッセージを削除"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+msgid "Error editing message"
+msgstr "メッセージ編集エラー"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+msgid "Error purguing messages"
+msgstr "メッセージパージエラー"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Stop"
+msgstr "停止"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Sent"
+msgstr "送信"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr "保留"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/progress/statusbarprogreso.cpp:281
+msgid "Warning"
+msgstr "注意"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+msgid "Error getting message"
+msgstr "メッセージ取得エラー"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+msgid "Running"
+msgstr "動作中"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr "投入プロセスは、送信する準備が開始されています"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr "停止"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+msgid "Usually due to an error in sending a message"
+msgstr "通常、送信中メッセージのエラーによる"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Start"
+msgstr "開始"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr "これらのメッセージを削除しますか?"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+msgid "Error deleting messages"
+msgstr "メッセージ削除中にエラー"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+msgid "Remove sent messages"
+msgstr "送信メッセージを削除"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+msgid "Exit"
+msgstr "終了"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+msgid "Messages"
+msgstr "メッセージ"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+msgid "Refresh"
+msgstr "リフレッシュ"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1394
+msgid "View"
+msgstr "表示"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+msgid "Send task status:"
+msgstr "送信タスクステータス:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr "有効"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+msgid "Message"
+msgstr "メッセージ"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr "日付:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+msgid "Destination:"
+msgstr "送信先:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+msgid "Status:"
+msgstr "ステータス:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+msgid "Message content:"
+msgstr "メッセージコンテンツ:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:142
+msgid "OK"
+msgstr "OK"
+
+#: ..\../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr "DICOMファイルのデータを概観"
+
+#: ..\../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr "DICOM data from the files to be generated can be populated"
+
+#: ..\../main/gui/import/generaldata.cpp:210
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+"\n"
+"* 患者IDが必要です"
+
+#: ..\../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+"\n"
+"* 患者の名字と名前を合わせて、61文字以上にはできません."
+
+#: ..\../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+"\n"
+"* 身長のフォーマットがセンチメーターでは正しくありません "
+
+#: ..\../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+"\n"
+"* 患者の誕生日が検査日の後です"
+
+#: ..\../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+"\n"
+"* 体重のフォーマットが正しくありません. 有効な範囲は0から400kgです."
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr "フィールドの検証中にエラーが起こりました"
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "Error validating fields"
+msgstr "フィールドを検証中にエラー"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:148
+msgid "Selecting Import Profile"
+msgstr "プロファイル読み込み選択中"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:152
+msgid "You must select the profile you want to use import"
+msgstr "読み込みに使用するプロファイルを選択して下さい"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+msgid "You must select the import profile"
+msgstr "読み込みプロファイルを選択して下さい"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr "予期せぬエラー. モジュールを再選択して下さい"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:21
+msgid "Selected images"
+msgstr "選択された画像"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:56
+msgid "Preview"
+msgstr "プレビュー"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:62
+msgid "Remove all"
+msgstr "全て削除"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:113
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:65
+msgid "Demographic data"
+msgstr "デモデータ"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr "Identificator *"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr "(IDあるいは医療履歴番号)"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:159
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "Birth date"
+msgstr "誕生日 "
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr "名字"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr "性別"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr "男性"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr "女性"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr "その他"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:217
+msgid "Study Details"
+msgstr "検査詳細"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:234
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:122
+msgid "Weight"
+msgstr "体重"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:245
+msgid "Kg"
+msgstr "Kg"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:252
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:119
+msgid "Height"
+msgstr "身長"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr "cm"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:291
+#: ..\../main/gui/import/pasosimportacionbase.cpp:333
+msgid "Time"
+msgstr "時間"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr "パスの場所が見つかりません"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files..."
+msgstr "ファイル選択..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr "ファイルシステムからファイル選択"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+#, fuzzy
+msgid "Paste from clipboard"
+msgstr "PACSから画像を取得"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr "戻る"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr "このファイルをディスクから削除してもいいですか?"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:330
+msgid "Delete selected items"
+msgstr "選択項目を削除"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+msgid "You must select an image"
+msgstr "画像を選択してください"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:346
+msgid "Generating preview..."
+msgstr "プレビュー作成中..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:500
+msgid "Select images"
+msgstr "画像を選択"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr "サムネイル作成中..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:715
+msgid "Image selection"
+msgstr "画像選択"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr "読み込みたい画像を選択して下さい"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr "一つ以上の画像を選択して下さい"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:760
+msgid "The file"
+msgstr "このファイル"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr " 存在しません"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:52
+msgid "Image Import Wizard"
+msgstr "画像読み込みウィザード"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr "要求されたモジュールに導入サポートはありません"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr "いくつかの導入サポートモジュールは登録されていません"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr "いくつかの導入サポートモジュールはありません"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr "要求されたモジュールは登録されていません"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr "要求されたモジュールは登録されていません"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:167
+#, fuzzy
+msgid "free of"
+msgstr "エラー: システムメモリ不足. メモリ確保のためスタディを閉じて下さい."
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:181
+#, fuzzy
+msgid "in dicomization dir."
+msgstr "XML DICOM化"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr "読み込み処理をキャンセルしてもいいですか?"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, c-format
+msgid "Step %d of %d: "
+msgstr "Step %d of %d: "
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr "&終了"
+
+#: ..\../main/gui/license/aboutdialog.cpp:25
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+#, fuzzy
+msgid "About"
+msgstr "最新の Ginkgo CADx アップデートの注意"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:22
+msgid "Ginkgo CADx"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr "Credits"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:55
+msgid "Licenses"
+msgstr "ライセンス"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:58
+msgid "UPDATE_INFO"
+msgstr "UPDATE_INFO"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:108
+#: ..\../main/gui/license/aboutdialogbase.h:88
+msgid "Open Source Licenses"
+msgstr "オープンソースライセンス"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr "Cairo"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr "DCMTK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:119
+msgid "FamFamFam Icons"
+msgstr "FamFamFam Icons"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:120
+msgid "Fugue Icons"
+msgstr "Fugue Icons"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr "ITK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr "LibJpeg"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr "LibPng"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr "OpenSSL"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr "VTK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:126
+msgid "WxWidgets"
+msgstr "WxWidgets"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:127
+msgid "Zlib"
+msgstr "Zlib"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr "SQL Lite"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr "CharLS"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:130
+#, fuzzy
+msgid "Dark Glass Icons"
+msgstr "FamFamFam Icons"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ..\../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr "ライセンスに同意"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:53
+msgid "Check for updates automatically"
+msgstr "アップデートの自動チェック"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:66
+msgid "I Accept the license"
+msgstr "ライセンスを受け入れます"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr "ライセンスを受け入れません"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Save logs"
+msgstr "保存ログ"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+msgid "File couldn't be stored "
+msgstr "ファイルは格納できません "
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+msgid "Could not write to file"
+msgstr "ファイル書き込みができません"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+msgid "Save log..."
+msgstr "ログ保存..."
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+msgid "Clear log"
+msgstr "ログクリア..."
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+msgid "Log"
+msgstr "Log"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr "クリア"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr "ログテキスト"
+
+#: ..\../main/gui/login/dialogologin.cpp:50
+msgid "The username or password is incorrect"
+msgstr "ユーザーネームかパスワードが不正確です"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:250
+msgid "Tasks"
+msgstr "タスク"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1139
+msgid "Included in the history ..."
+msgstr "履歴を含めています..."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr "現在の設定にアップデートチェックするためのURLがありません"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "Check update error"
+msgstr "アップデートチェックエラー"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#, fuzzy
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr "XMLパース中にセマンティックエラー(詳細はログを見ろよ):\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+msgid "Malformed XML"
+msgstr "不正なXML"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1192
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr "XMLパース中にセマンティックエラー(詳細はログを見ろよ):\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+msgid "Error parsing integration XML:\n"
+msgstr "XMLパースエラー:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+msgid "PACS error:\n"
+msgstr "PACSエラー:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+msgid "Error executing WorkFlow\n"
+msgstr "ワークフロー実行エラー\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+"ワークフロー実行エラー\n"
+"内部エラー"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+msgid "Close current view"
+msgstr "現在のビューを閉じる"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all"
+msgstr "全て閉じる"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all views"
+msgstr "全てのビューを閉じる"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr "&終了"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "Exit application"
+msgstr "アプリケーションを終了"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr "フルスクリーン"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Show full screen"
+msgstr "フルスクリーンで表示"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1302
+msgid "Tab grouping"
+msgstr "タブをグループ化"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1329
+#, fuzzy
+msgid "Ginkgo CADx manual ..."
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1330
+#, fuzzy
+msgid "Open test card"
+msgstr "接続テスト"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr "アップデートのチェック"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for newest versions"
+msgstr "新しいヴァージョンをチェック"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1332
+msgid "Need support ..."
+msgstr "サポートが必要 ..."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+#, fuzzy
+msgid "About "
+msgstr "最新の Ginkgo CADx アップデートの注意"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+msgid "HL7 monitor"
+msgstr "HL7モニタ"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+msgid "HL7 message control"
+msgstr "HL7メッセージコントロール"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+msgid "Log monitor"
+msgstr "ログモニタ"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+msgid "Log monitored"
+msgstr "ログモニター"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1390
+msgid "&File"
+msgstr "&ファイル"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr "&編集"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr "&ヘルプ"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr "寄せ集める"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr "この検査の変更を保存してもいいですか"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1664
+msgid "Unsaved data"
+msgstr "保存していないデータ"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr ""
+"シリーズ保存中にエラーが起きました\n"
+"閉じてもいいですか? "
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid "Error saving"
+msgstr "保存エラー"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "Full Screen"
+msgstr "フルスクリーン"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "View Full Screen"
+msgstr "フルスクリーン表示"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1708
+msgid "Tab Regroup"
+msgstr "タブを再グループ化"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr "&閉じる"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "&Close all"
+msgstr "&全て閉じる"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "Close all windows"
+msgstr "全てのウインドウを閉じる"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1728
+msgid "Tabbed organization"
+msgstr "タブ構成"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr "新しいヴァージョンのGinkgo CADxはありません"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "Ginkgo CADx updated"
+msgstr "Ginkgo CADxはアップデートされました"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1782
+msgid "New version available ("
+msgstr "新しいヴァージョンがあります ("
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr "認証プロセス中の内部エラー"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+msgid "New Update"
+msgstr "新しいアップデート"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+msgid "New version available"
+msgstr "新しいヴァージョンがあります"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr "このアップデートについて再び通知しない"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+msgid "X"
+msgstr "X"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+msgid "Close this notification"
+msgstr "この通知を閉じる"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+msgid "The following commands will be aborted if you close the application"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+msgid "Close Ginkgo CADx"
+msgstr "Ginkgo CADx を閉じる"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr "アプリケーションを閉じて、保留中コマンドを中断する"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr "コマンド実行中はアプリケーションを閉じないで下さい"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:138
+msgid "User login"
+msgstr "ユーザーログイン"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+msgid "System authentication"
+msgstr "システム認証"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+msgid "Login"
+msgstr "ログイン"
+
+#: ..\../main/gui/open/abrir.cpp:80 ..\../main/gui/open/abrir.cpp:82
+msgid "Open..."
+msgstr "開く..."
+
+#: ..\../main/gui/open/opendialogs.cpp:58
+#, fuzzy
+msgid "There was an error reading DICOMDIR file"
+msgstr "有効なDICOMDIRファイルを選択"
+
+#: ..\../main/gui/open/opendialogs.cpp:62
+msgid "Select a valid DICOMDIR file"
+msgstr "有効なDICOMDIRファイルを選択"
+
+#: ..\../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr "取得したいDICOMDIRファイルを選択"
+
+#: ..\../main/gui/open/opendialogs.cpp:180
+#: ..\../main/gui/open/opendialogsbase.cpp:170
+#: ..\../main/gui/open/opendialogsbase.h:112
+msgid "Copy or link"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:22
+#: ..\../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr "DICOM DIRから取得"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:94
+#: ..\../main/gui/open/opendialogsbase.h:85
+msgid "Select drive"
+msgstr "ドライブを選択"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:175
+msgid "Do you want to copy or link files?"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ..\../main/gui/selectpacsserver/selectpacsserver.cpp:30
+#, fuzzy
+msgid "There aren't any PACS configured"
+msgstr "PACS設定がありません"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:69
+#, fuzzy
+msgid "0000/00/00 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.h:57
+#, fuzzy
+msgid "Upload study"
+msgstr "PACSサーバへ画像をアップロード"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+#, fuzzy
+msgid "Select PACS server"
+msgstr "有効なPACSサーバを選択して下さい"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:119
+msgid "Metadata"
+msgstr "メタデータ"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:120
+msgid "Identification information"
+msgstr "識別情報"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:121
+msgid "Patient information"
+msgstr "患者情報"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:122
+msgid "Acquisition information"
+msgstr "取得情報"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:123
+msgid "Relationship information"
+msgstr "関連情報"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:124
+msgid "Image presentation information"
+msgstr "画像提示情報"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:125 ..\../widgets/wtextbox.cpp:525
+msgid "Text"
+msgstr "テキスト"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:126
+msgid "Other"
+msgstr "その他"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:137
+#: ..\../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr "日付"
+
+#: ..\../main/gui/previewpanel/previewpanel.cpp:47
+msgid "Hide"
+msgstr "隠す"
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:207
+msgid "Previews"
+msgstr ""
+
+#: ..\../main/gui/progress/progresobase.cpp:23
+msgid "There is no running tasks"
+msgstr "動作タスクはありません"
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:165
+msgid "0 running tasks."
+msgstr "動作タスクは0"
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:192
+#, c-format
+msgid "There are %d pending tasks"
+msgstr "%d の保留タスクがあります"
+
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.h:55
+#, fuzzy
+msgid "Select PACS"
+msgstr "有効なPACSサーバを選択して下さい"
+
+#: ..\../main/gui/startup/startupformbase.cpp:29
+#, fuzzy
+msgid "http://ginkgo-cadx.com"
+msgstr "HTTPプロキシを有効"
+
+#: ..\../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:47
+#, fuzzy
+msgid "Ginkgo CADx Pro"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr "Powered by"
+
+#: ..\../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr "MetaEmotion Healthcare"
+
+#: ..\../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr "開始ページ"
+
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete Widget"
+msgstr "ウィジット削除"
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Properties ..."
+msgstr "プロパティ..."
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Widget Properties"
+msgstr "ウィジットプロパティ"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:114
+msgid "Open file"
+msgstr "ファイルを開く"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:115
+#: ..\../main/tools/openfoldertool.cpp:27
+msgid "Open folder"
+msgstr "フォルダを開く"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:116
+#: ..\../main/tools/openremovabletool.cpp:28
+msgid "Open removable unit"
+msgstr "リムーバブル装置を開く"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:117
+#: ..\../main/tools/openginkgocloudlinktool.cpp:27
+#, fuzzy
+msgid "Open Ginkgo Cloud link"
+msgstr "Ginkgo CADx visualizator はオープンソースです"
+
+#: ..\../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr "ノーマル角度 (3点)"
+
+#: ..\../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr "コブ角度 (2直線)"
+
+#: ..\../main/tools/colormaptool.cpp:110
+#, fuzzy
+msgid "Invert color map"
+msgstr "色"
+
+#: ..\../main/tools/cornerannotationstool.cpp:44
+msgid "Hide corner annotations"
+msgstr "コーナーアノテーションを隠す"
+
+#: ..\../main/tools/cornerannotationstool.cpp:46
+msgid "Show corner annotations"
+msgstr "コーナーアノテーションを表示"
+
+#: ..\../main/tools/detachwindowtool.cpp:42
+#, fuzzy
+msgid "Attach View"
+msgstr "表示"
+
+#: ..\../main/tools/detachwindowtool.cpp:44
+#, fuzzy
+msgid "Detach view"
+msgstr "表示"
+
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize files"
+msgstr ""
+
+#: ..\../main/tools/exportdicomdirtool.cpp:32
+msgid "Export to DICOM Dir"
+msgstr "DICOM DIRへ書き出し"
+
+#: ..\../main/tools/markertool.cpp:171
+msgid "Point"
+msgstr "点"
+
+#: ..\../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr "矢印"
+
+#: ..\../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr "楕円"
+
+#: ..\../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr "台形"
+
+#: ..\../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr "多角形"
+
+#: ..\../main/tools/markertool.cpp:176
+#, fuzzy
+msgid "Free form"
+msgstr "エラー: システムメモリ不足. メモリ確保のためスタディを閉じて下さい."
+
+#: ..\../main/tools/metricgridtool.cpp:57
+msgid "Grid"
+msgstr "グリッド"
+
+#: ..\../main/tools/metricgridtool.cpp:67
+msgid "Grid Scale"
+msgstr "グリッド寸法"
+
+#: ..\../main/tools/metricgridtool.cpp:74
+msgid "Scale X"
+msgstr "X寸法"
+
+#: ..\../main/tools/metricgridtool.cpp:78
+msgid "X axis scale"
+msgstr "X軸寸法"
+
+#: ..\../main/tools/metricgridtool.cpp:87
+msgid "Scale Y"
+msgstr "Y寸法"
+
+#: ..\../main/tools/metricgridtool.cpp:91
+msgid "Y axis scale"
+msgstr "Y軸寸法"
+
+#: ..\../main/tools/metricgridtool.cpp:206
+msgid "Show grid"
+msgstr "グリッド表示"
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr "グリッド設定"
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr "グリッド設定"
+
+#: ..\../main/tools/metricgridtool.cpp:250
+msgid "Hide Grid"
+msgstr "グリッドを隠す"
+
+#: ..\../main/tools/metricgridtool.cpp:252
+msgid "Show Grid"
+msgstr "グリッド表示"
+
+#: ..\../main/tools/openfiletool.cpp:28
+msgid "Open File"
+msgstr "ファイルを開く"
+
+#: ..\../main/tools/pacsuploadtool.cpp:54
+msgid "Send to PACS..."
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:59
+msgid "Unset pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:61
+#, fuzzy
+msgid "Set pixels blurring"
+msgstr "ユーザーにより設定"
+
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#, fuzzy
+msgid "PACS Q/R"
+msgstr "P-R-T axes: "
+
+#: ..\../main/tools/queryretrievetool.cpp:94
+#: ..\../main/tools/searchginkgocloudhistorytool.cpp:28
+#, fuzzy
+msgid "Search Ginkgo Cloud"
+msgstr "検索"
+
+#: ..\../main/tools/rotateandfliptool.cpp:151
+#, fuzzy
+msgid "Undo rotate and flip"
+msgstr "元に戻す"
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:156
+msgid "Flip horizontal"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:157
+msgid "Flip vertical"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:34
+msgid "Send to PACS"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:70
+#, fuzzy
+msgid "Sending to PACS..."
+msgstr "PACS"
+
+#: ..\../main/tools/showtagstool.cpp:42
+msgid "Hide DICOM inspector"
+msgstr "DICOMタグパネルを隠す"
+
+#: ..\../main/tools/showtagstool.cpp:44
+msgid "Show DICOM inspector"
+msgstr "DICOMパネルを表示"
+
+#: ..\../main/tools/simpleprinttool.cpp:119
+#, fuzzy
+msgid "Image printing"
+msgstr "この画像にオーバーレイはありません"
+
+#: ..\../main/tools/simpleprinttool.cpp:224
+#, fuzzy
+msgid "Page setup"
+msgstr "開始ページ"
+
+#: ..\../main/tools/simpleprinttool.cpp:225
+#, fuzzy
+msgid "Print preview"
+msgstr "印刷"
+
+#: ..\../main/tools/simpleprinttool.cpp:272
+#, fuzzy
+msgid "Print image"
+msgstr "印刷"
+
+#: ..\../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr "自動計算"
+
+#: ..\../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr ""
+
+#: ..\../main/tools/undotool.cpp:110
+msgid "Redo"
+msgstr "再実行"
+
+#: ..\../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:153
+#, fuzzy
+msgid "Enable loop"
+msgstr "シェーダを有効"
+
+#: ..\../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:267
+#, fuzzy
+msgid "Add column"
+msgstr "加える"
+
+#: ..\../main/tools/windowlayouttool.cpp:268
+#, fuzzy
+msgid "Add row"
+msgstr "加える"
+
+#: ..\../main/tools/windowlayouttool.cpp:270
+#, fuzzy
+msgid "Remove column"
+msgstr "削除"
+
+#: ..\../main/tools/windowlayouttool.cpp:271
+#, fuzzy
+msgid "Remove row"
+msgstr "削除"
+
+#: ..\../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr "1x1 レイアウト"
+
+#: ..\../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr "1x2 レイアウト"
+
+#: ..\../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr "2x1 レイアウト"
+
+#: ..\../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr "2x2 レイアウト"
+
+#: ..\../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr "3x3 レイアウト"
+
+#: ..\../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr "4x4 レイアウト"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:82
+#, fuzzy
+msgid "The tool is already registered"
+msgstr "要求されたモジュールは登録されていません"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:187
+#, fuzzy
+msgid "The module "
+msgstr "不明なモジュール Id ("
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:49
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:56
+msgid "Unable to load PNG image resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:63
+msgid "Unable to load GIF animation resource"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr "キャリブレーション値は十進法数にしてください"
+
+#: ..\../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr "キャリブレーション値が低すぎます"
+
+#: ..\../widgets/gui/calibracion.cpp:219
+msgid "Enter the calibration value"
+msgstr "キャリブレーション値を入力してください"
+
+#: ..\../widgets/gui/calibracion.cpp:225
+msgid "The calibration value is too low"
+msgstr "キャリブレーション値が低すぎます"
+
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "The calibration value is too high"
+msgstr "キャリブレーション値が高すぎます"
+
+#: ..\../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr "キャリブレーション中..."
+
+#: ..\../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr "実測値"
+
+#: ..\../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr "距離"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr "ミクロン"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr "ミリメーター"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr "センチメーター"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr "メーター"
+
+#: ..\../widgets/gui/selecciontextobase.cpp:26
+msgid "Note"
+msgstr "ノート"
+
+#: ..\../widgets/wangulo.cpp:1101 ..\../widgets/wangulo.cpp:1103
+msgid "Type"
+msgstr "タイプ"
+
+#: ..\../widgets/wangulo.cpp:1101
+msgid "Normal"
+msgstr "ノーマル"
+
+#: ..\../widgets/wangulo.cpp:1103
+msgid "Cobb"
+msgstr "コブ"
+
+#: ..\../widgets/welipse.cpp:721 ..\../widgets/wfreeform.cpp:470
+#: ..\../widgets/wpolygon.cpp:574
+msgid "Center (I)"
+msgstr "中央 (I)"
+
+#: ..\../widgets/welipse.cpp:727 ..\../widgets/wfreeform.cpp:476
+#: ..\../widgets/wpolygon.cpp:580
+msgid "Center (M)"
+msgstr "中央 (M)"
+
+#: ..\../widgets/welipse.cpp:762 ..\../widgets/welipse.cpp:766
+msgid "Greater Radius"
+msgstr "大半径"
+
+#: ..\../widgets/welipse.cpp:763 ..\../widgets/welipse.cpp:767
+msgid "Lower Radius"
+msgstr "下半径"
+
+#: ..\../widgets/wfreeform.cpp:482 ..\../widgets/wpolygon.cpp:586
+msgid "Number of Vertex"
+msgstr "頂点の数"
+
+#: ..\../widgets/wpunto.cpp:353
+msgid "Position (I)"
+msgstr "位置 (I)"
+
+#: ..\../widgets/wpunto.cpp:358
+msgid "Position (M)"
+msgstr "位置 (M)"
+
+#: ..\../widgets/wrule.cpp:558
+msgid "Image Calibration"
+msgstr "画像キャリブレーション"
+
+#: ..\../widgets/wrule.cpp:663
+msgid "Length"
+msgstr "長さ"
+
+#: ..\../widgets/wrule.cpp:668
+msgid "Points (I)"
+msgstr "点 (I)"
+
+#: ..\../widgets/wrule.cpp:675
+msgid "Points (M)"
+msgstr "点 (M)"
+
+#: ..\../widgets/wtextbox.cpp:445
+#, fuzzy
+msgid "Default text"
+msgstr "テキスト"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:41
+msgid "Commit date"
+msgstr "日付をコミット"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr "UNKNOW"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr "<unknown ID>"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr "%m/%d/%Y"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:214
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr "コミット済み"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:219
+msgid "Modified"
+msgstr "修正済み"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr "コミットしていない"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr "NAME SURNAME SECOND_SURNAME"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr "644654645"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:130
+msgid "Commit inform"
+msgstr "コミット情報"
+
+#: ..\../wx/propiedades/wxpropiedades.cpp:30
+msgid "Properties of "
+msgstr "次のプロパティ "
+
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:31
+msgid "Widget's Name"
+msgstr "ウィジット名"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr "< &前へ"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr "&キャンセル"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3701
+msgid "Regular expression invalid: '"
+msgstr "規則表現が無効: '"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr "REGEXP 引数の数が不正に呼び出されました: 2の代わりに %d."
+
+#: ..\../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.h:56
+#, fuzzy
+msgid "Overwrite Paths"
+msgstr "上書き"
+
+#: ..\../ginkgopro/ginkgo_pro_defines.h:21
+#, fuzzy
+msgid "Professional DICOM CADx environment"
+msgstr "Open Source DICOM CADx environment"
+
+#: ..\../main/controllers/dcmtk/dicomservers.h:39
+#, fuzzy
+msgid "Server not found"
+msgstr "サーバIDが見つかりません ID = "
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:99
+#, fuzzy
+msgid "DICOM Query/Retrieve"
+msgstr "不明なクエリ/リトリーブレベル"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:123
+#, fuzzy
+msgid "Not found"
+msgstr "計測が見つかりません"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+#, fuzzy
+msgid "Advanced Settings"
+msgstr "上位設定"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+#, fuzzy
+msgid "Edit profile"
+msgstr "プロファイル"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+#, fuzzy
+msgid "Add/Edit Location"
+msgstr "場所"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+#, fuzzy
+msgid "Add window/level"
+msgstr "レベル"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+#, fuzzy
+msgid "Add tag"
+msgstr "加える"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+#, fuzzy
+msgid "Setup window position"
+msgstr "位置   : "
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.h:61
+#, fuzzy
+msgid "Closing"
+msgstr "GinkgoCADxを閉じる..."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+#, fuzzy
+msgid "DICOM Dir configuration"
+msgstr "DICOM Dir"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:70
+#, fuzzy
+msgid "Open Ginkgo Cloud"
+msgstr "Ginkgo CADx visualizator はオープンソースです"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:123
+#, fuzzy
+msgid "Ginkgo Cloud search"
+msgstr "検索"
+
+#: ..\../main/gui/history3/confirmdeletedialog.h:24
+#, fuzzy
+msgid " from History?"
+msgstr "&履歴から削除"
+
+#: ..\../main/gui/history3/historypanel3base.h:100
+#, fuzzy
+msgid "Medical history"
+msgstr "(IDあるいは医療履歴番号)"
+
+#: ..\../main/gui/history3/historypanel3base.h:161
+#, fuzzy
+msgid "Open With ..."
+msgstr "開く"
+
+#: ..\../main/gui/history3/openwithdialog.h:72
+#, fuzzy
+msgid "Select a View"
+msgstr "同期したい現在のデータ表示を選択"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+#, fuzzy
+msgid "Message detail"
+msgstr "メッセージ"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+#, fuzzy
+msgid "Log node"
+msgstr "Log"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:87
+msgid "Closing Ginkgo CADx"
+msgstr "GinkgoCADxを閉じる..."
+
+#: ..\../main/gui/paneltags/paneltagsbase.h:57
+#, fuzzy
+msgid "DICOM Inspector"
+msgstr "DICOMタグパネルを隠す"
+
+#: ..\../main/license.h:31
+msgid "Open Source DICOM CADx environment"
+msgstr "Open Source DICOM CADx environment"
+
+#: ..\../widgets/gui/calibracionbase.h:65
+#, fuzzy
+msgid "Calibration"
+msgstr "画像キャリブレーション"
+
+#: ..\../wx/propiedades/wxpropiedadesbase.h:62
+#, fuzzy
+msgid "Properties of ..."
+msgstr "プロパティ..."
+
+#: ..\../wx/thumbnailctrl/thumbnailwidget.h:44
+#, fuzzy
+msgid "Image Browser Dialog"
+msgstr "この画像にオーバーレイはありません"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+msgid "Test title"
+msgstr "テストタイトル"
+
+#~ msgid ""
+#~ "Unexpected Error exporting, the view is not allowed to export to the "
+#~ "format selected"
+#~ msgstr ""
+#~ "予期しない書き出しエラー, このビューは選択されたフォーマットで書き出しでき"
+#~ "ません"
+
+#~ msgid "Failed to store the file, check permissions on the directory"
+#~ msgstr "ファイル格納に失敗, ディレクトリ権限をチェックしてください"
+
+#~ msgid "The key files will not be exported"
+#~ msgstr "このキーファイルは書き出しされません"
+
+#~ msgid "Current"
+#~ msgstr "現在"
+
+#~ msgid "All"
+#~ msgstr "全て"
+
+#~ msgid "JPG"
+#~ msgstr "JPG"
+
+#~ msgid "BMP"
+#~ msgstr "BMP"
+
+#~ msgid "PNG"
+#~ msgstr "PNG"
+
+#~ msgid "Content"
+#~ msgstr "コンテンツ"
+
+#~ msgid "Include annotation Widgets"
+#~ msgstr "Include annotation Widgets"
+
+#~ msgid "Evaluation maps"
+#~ msgstr "評価マップ"
+
+#~ msgid "Tile Horizontally"
+#~ msgstr "水平にタイリング"
+
+#~ msgid "Tile Vertically"
+#~ msgstr "垂直にタイリング"
+
+#~ msgid "Grid (two columns)"
+#~ msgstr "グリッド (2カラム)"
+
+#~ msgid "Grid (three columns)"
+#~ msgstr "グリッド (3カラム)"
+
+#~ msgid "Grid organization"
+#~ msgstr "グリッド構成"
+
+#~ msgid "Color"
+#~ msgstr "色"
+
+#~ msgid "Vertex (I)"
+#~ msgstr "頂点 (I)"
+
+#~ msgid "Vertex (M)"
+#~ msgstr "頂点 (M)"
+
+#~ msgid "Center"
+#~ msgstr "中央"
+
+#~ msgid "0"
+#~ msgstr "0"
+
+#~ msgid "Checking program updates..."
+#~ msgstr "プログラムアップデートをチェック中..."
+
+#~ msgid "Subsystem integration error: uninitialized result data container."
+#~ msgstr "Subsystem integration error: uninitialized result data container."
+
+#~ msgid "You have to specify at least uid series"
+#~ msgstr "最小の uid シリーズの明示が必要です"
+
+#~ msgid "You have to specify uid series"
+#~ msgstr "uid シリーズの明示が必要です"
+
+#~ msgid "Untitled"
+#~ msgstr "無題"
+
+#~ msgid "UID"
+#~ msgstr "UID"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">"
+#~ msgstr ">"
+
+#~ msgid "<"
+#~ msgstr "<"
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid "Patient's Id"
+#~ msgstr "患者 Id"
+
+#~ msgid "You are not allowed to download this kind of modalities ("
+#~ msgstr "この種類のモジュールをダウンロードすることは許可されていません ("
+
+#~ msgid "Searching..."
+#~ msgstr "検索中..."
+
+#~ msgid "unknown column"
+#~ msgstr "不明なカラム"
+
+#~ msgid "Horizontal mosaic"
+#~ msgstr "水平に寄せ集める"
+
+#~ msgid "Vertical mosaic"
+#~ msgstr "垂直に寄せ集める"
+
+#~ msgid "Include Annotations"
+#~ msgstr "アノテーションを含む"
+
+#~ msgid "Evaluation Maps"
+#~ msgstr "評価マップ"
+
+#~ msgid "Zoom"
+#~ msgstr "拡大率"
+
+#~ msgid "Options"
+#~ msgstr "オプション"
+
+#~ msgid "Images per sheet"
+#~ msgstr "シート当たりの画像"
+
+#~ msgid "Print ..."
+#~ msgstr "印刷..."
+
+#~ msgid "Point Size"
+#~ msgstr "点サイズ"
+
+#~ msgid "Family"
+#~ msgstr "ファミリー"
+
+#~ msgid "Face Name"
+#~ msgstr "Face Name"
+
+#~ msgid "Underline"
+#~ msgstr "下線"
+
+#~ msgid "Make a selection:"
+#~ msgstr "選択する:"
+
+#~ msgid "Categorized Mode"
+#~ msgstr "カテゴライズモード"
+
+#~ msgid "Alphabetic Mode"
+#~ msgstr "アルファベットモード"
+
+#~ msgid "False"
+#~ msgstr "偽"
+
+#~ msgid "True"
+#~ msgstr "真"
+
+#~ msgid "Unspecified"
+#~ msgstr "不特定"
+
+#~ msgid ""
+#~ "Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", "
+#~ "NOT \"%s\"."
+#~ msgstr ""
+#~ "Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", "
+#~ "NOT \"%s\"."
+
+#~ msgid "Error in resource: %s"
+#~ msgstr "リソースエラー: %s"
+
+#~ msgid "Value must be %lld or higher"
+#~ msgstr "値は %lld か、それ以上にしてください"
+
+#~ msgid "Value must be %llu or higher"
+#~ msgstr "値は %llu か、それ以上にしてください"
+
+#~ msgid "Value must be %llu or less"
+#~ msgstr "値は %llu か、それ以下にしてください"
+
+#~ msgid "Value must be %f or higher"
+#~ msgstr "値は %f か、それ以上にしてください"
+
+#~ msgid "Value must be %f or less"
+#~ msgstr "値は %f か、それ以下にしてください"
+
+#~ msgid "Not %s"
+#~ msgstr "%s ではない"
+
+#~ msgid "Choose a directory:"
+#~ msgstr "ディレクトリ選択:"
+
+#~ msgid "Choose a file"
+#~ msgstr "ファイル選択"
+
+#~ msgid "All files (*.*)|*.*"
+#~ msgstr "全てのファイル (*.*)|*.*"
+
+#~ msgid "Update"
+#~ msgstr "更新"
+
+#~ msgid "Up"
+#~ msgstr "アップ"
+
+#~ msgid "Down"
+#~ msgstr "ダウン"
+
+#~ msgid "Page %i"
+#~ msgstr "Page %i"
+
+#~ msgid "Configure proxy"
+#~ msgstr "プロキシ設定"
+
+#~ msgid "Use system settings"
+#~ msgstr "システム設定を使用"
+
+#~ msgid "Manual configuration of proxy:"
+#~ msgstr "プロキシの手動設定:"
+
+#~ msgid "Host:"
+#~ msgstr "ホスト:"
+
+#~ msgid "Port:"
+#~ msgstr "ポート:"
+
+#~ msgid "Password:"
+#~ msgstr "パスワード"
+
+#~ msgid "Show / Hide DICOM tags panel"
+#~ msgstr "DICOMタグパネルを、表示/隠す"
+
+#~ msgid "Updates"
+#~ msgstr "更新"
+
+#~ msgid "Visualization"
+#~ msgstr "ヒストグラム均等化"
+
+#~ msgid "Show metadatada"
+#~ msgstr "メタデータ"
+
+#~ msgid "http://ginkgo-cadx.com/en/services/"
+#~ msgstr "http://ginkgo-cadx.com/en/services/"
+
+#~ msgid "Lung"
+#~ msgstr "長さ"
+
+#~ msgid "Reset window level and zoom"
+#~ msgstr "ウインドウレベルと拡大率をリセット"
+
+#~ msgid "Dicomize images..."
+#~ msgstr "DICOM化ファイル"
+
+#~ msgid "Dicomize images"
+#~ msgstr "DICOM化ファイル"
+
+#~ msgid "Double click to edit"
+#~ msgstr "ダブルクリックで編集"
+
+#~ msgid "Uploading to the PACS ..."
+#~ msgstr "PACSへアップロード中..."
+
+#~ msgid ""
+#~ "No results obtained. Maybe you have a wrong PACS server configuration"
+#~ msgstr "結果が得られません。たぶん、PACSサーバの設定が悪いのではないかと"
+
+#~ msgid ""
+#~ "No results obtained in PACS retrieve.\n"
+#~ "Maybe study doesn't exist or you have a wrong PACS server configuration."
+#~ msgstr ""
+#~ "結果が得られません.\n"
+#~ "たぶん、検査がないかPACSサーバの設定が悪いのではないかと."
+
+#~ msgid "PACS Consulting ..."
+#~ msgstr "PACS診断中..."
+
+#~ msgid "Association Release"
+#~ msgstr "アソシエーションをリリース"
+
+#~ msgid "Association Aborted"
+#~ msgstr "アソシエーションを中断"
+
+#~ msgid "\"petition-id\" attribute expected at \"gnkworkflow\" scope"
+#~ msgstr "\"petition-id\" attribute expected at \"gnkworkflow\" scope"
+
+#~ msgid ""
+#~ "Studies are already in the download queue.\n"
+#~ "Do you want to repeat download?"
+#~ msgstr ""
+#~ "シリーズはすでにダウンロードキューに入っています\n"
+#~ "再度、ダウンロードしますか?"
+
+#~ msgid ""
+#~ "Series were already in the download queue.\n"
+#~ "Do you want to force download?"
+#~ msgstr ""
+#~ "シリーズはすでにダウンロードキューに入っています\n"
+#~ "強制的にダウンロードしますか?"
+
+#~ msgid "Downloads"
+#~ msgstr "ダウンロード"
+
+#~ msgid "Study description"
+#~ msgstr "検査部位"
+
+#~ msgid "Clean"
+#~ msgstr "クリーン"
+
+#~ msgid "Clean finished downloads"
+#~ msgstr "画像ダウンロード完了"
+
+#~ msgid "Starting..."
+#~ msgstr "開始中..."
+
+#~ msgid ""
+#~ "Diagnostic files can't be opened, you have to open the diagnosed series"
+#~ msgstr "診断ファイルは開けません. 診断されたシリーズを開く必要があります"
+
+#~ msgid "Error: "
+#~ msgstr "エラー: "
+
+#~ msgid "Error: No images were downloaded"
+#~ msgstr "エラー: 画像はダウンロードされていません"
+
+#~ msgid "Finished"
+#~ msgstr "終了"
+
+#~ msgid "Play"
+#~ msgstr "再生"
+
+#~ msgid "Retry"
+#~ msgstr "再試行"
+
+#~ msgid "Successful connection test."
+#~ msgstr "テスト接続が成功"
+
+#~ msgid "The service did not respond properly:"
+#~ msgstr "このサービスはプロパティに反応しない:"
+
+#~ msgid "Error starting network support"
+#~ msgstr "ネットワークサポート開始エラー"
+
+#~ msgid "The selected directory does must be empty"
+#~ msgstr "選択されたディレクトリは開けません"
+
+#~ msgid "What do you want to do?"
+#~ msgstr "何をしたいですか?"
+
+#~ msgid "Choose the import profile"
+#~ msgstr "読み込みプロファイルの選択"
+
+#~ msgid "Import profile"
+#~ msgstr "読み込みプロファイル"
+
+#~ msgid "Brain oasc asdf"
+#~ msgstr "Brain oasc asdf"
+
+#~ msgid "An error ocurred loading Ginkgo News check your internet connection"
+#~ msgstr ""
+#~ "Ginkgo ニュースをロードするため、インターネット接続のチェックでエラーが発"
+#~ "生しました"
+
+#~ msgid "Welcome"
+#~ msgstr "ようこそ"
+
+#~ msgid "Twitter"
+#~ msgstr "Twitter"
+
+#~ msgid "%m-%d-%y %H:%M:%S,%q"
+#~ msgstr "%m-%d-%y %H:%M:%S,%q"
+
+#~ msgid "Reprocess Series"
+#~ msgstr "シリーズの再処理"
+
+#~ msgid ""
+#~ "If you reprocess this series it will be uploaded to PACS server and \n"
+#~ "integration message will be resent to integration engine.\n"
+#~ "Do you want to continue?"
+#~ msgstr ""
+#~ "このシリーズの再処理には、PACSサーバへアップロードして \n"
+#~ "実装メッセージが実装エンジンへ再送信されます.\n"
+#~ "続けてもいいですか?"
+
+#~ msgid ""
+#~ "Unable to reprocess this series. This series hasn't been dicomized with "
+#~ "Ginkgo CADx."
+#~ msgstr ""
+#~ "このシリーズの再処理ができません. このシリーズは Ginkgo CADx でDICOM化され"
+#~ "ていません."
+
+#~ msgid ""
+#~ "\n"
+#~ "Ginkgo CADx license agreement <version>\n"
+#~ "-----------------------------------\n"
+#~ "\n"
+#~ "This version is a trial version for <customer>, and therefore its use is "
+#~ "restricted for this purpose.\n"
+#~ "\n"
+#~ "\n"
+#~ "\n"
+#~ "S.L MetaEmotion Healthcare\n"
+#~ "http://healthcare.metaemotion.com/en/welcome\n"
+#~ "contacto at metaemotion.com"
+#~ msgstr ""
+#~ "\n"
+#~ "Ginkgo CADx license agreement <version>\n"
+#~ "-----------------------------------\n"
+#~ "\n"
+#~ "This version is a trial version for <customer>, and therefore its use is "
+#~ "restricted for this purpose.\n"
+#~ "\n"
+#~ "\n"
+#~ "\n"
+#~ "S.L MetaEmotion Healthcare\n"
+#~ "http://healthcare.metaemotion.com/en/welcome\n"
+#~ "contacto at metaemotion.com"
+
+#~ msgid ""
+#~ "\n"
+#~ "There are %d files that overwrite existing files"
+#~ msgstr ""
+#~ "\n"
+#~ " %d ファイルが既存のファイルを上書き"
+
+#~ msgid ""
+#~ "\n"
+#~ "There aren't any stored study that matches with the search filter.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "検索フィルタにマッチしている格納済み検査はありません.\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "There is no size in the medical history to show every patients\n"
+#~ msgstr ""
+#~ "\n"
+#~ "全患者を表示する医療履歴に存在しない\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "To begin working must change filter criteria, acquire an existing study "
+#~ "or import images in DICOM format.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "動作を始めるにはフィルター基準を変化させて, 既存の検査あるいはDICOMフォー"
+#~ "マットで画像読み込みして取得してください.\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Try using filters or collapsing nodes and refresh search\n"
+#~ msgstr ""
+#~ "\n"
+#~ "フィルタを使うか、ノードを削除して新たに検索してみて下さい\n"
+
+#~ msgid " for all their support in Ginkgo CADx creation!"
+#~ msgstr " for all their support in Ginkgo CADx creation!"
+
+#~ msgid "&DICOM &Acquisition"
+#~ msgstr "&DICOM &Acquisition"
+
+#~ msgid "&Delete Patient from History"
+#~ msgstr "&履歴から患者を削除"
+
+#~ msgid "&Import ..."
+#~ msgstr "&読み込み..."
+
+#~ msgid "&Import images..."
+#~ msgstr "&読み込み画像..."
+
+#~ msgid "&Open File"
+#~ msgstr "&ファイルを開く"
+
+#~ msgid "&Open Folder"
+#~ msgstr "&フォルダを開く"
+
+#~ msgid "&Save"
+#~ msgstr "&保存"
+
+#~ msgid "1.0"
+#~ msgstr "1.0"
+
+#~ msgid "10:20"
+#~ msgstr "10:20"
+
+#~ msgid "12412012 Q"
+#~ msgstr "12412012 Q"
+
+#~ msgid "1x1"
+#~ msgstr "1x1"
+
+#~ msgid "1x2"
+#~ msgstr "1x2"
+
+#~ msgid "2X2"
+#~ msgstr "2X2"
+
+#~ msgid "2x1"
+#~ msgstr "2x1"
+
+#~ msgid "31/02/2010"
+#~ msgstr "31/02/2010"
+
+#~ msgid "31/08/1983"
+#~ msgstr "31/08/1983"
+
+#~ msgid "3D tools"
+#~ msgstr "3Dツール"
+
+#~ msgid "3x3"
+#~ msgstr "3x3"
+
+#~ msgid "4x4"
+#~ msgstr "4x4"
+
+#~ msgid "<Unknow ID>"
+#~ msgstr "<Unknow ID>"
+
+#~ msgid "Aborting incoming association"
+#~ msgstr "アソシエーション読み込みを中断"
+
+#~ msgid "About &Ginkgo CADx ..."
+#~ msgstr "&Ginkgo CADxについて..."
+
+#~ msgid "About Ginkgo CADx ..."
+#~ msgstr "Ginkgo CADxについて..."
+
+#~ msgid "Acquire from a local folder"
+#~ msgstr "ローカルフォルダから取得"
+
+#~ msgid "Acquire from a removable unit"
+#~ msgstr "リームーバブル装置から取得"
+
+#~ msgid "Acquiring a new DICOM study"
+#~ msgstr "新しいDICOM検査を取得"
+
+#~ msgid "Activate"
+#~ msgstr "有効化"
+
+#~ msgid "All modalities"
+#~ msgstr "全てのモダリティをダウンロード"
+
+#~ msgid "Andre Alvim Tolentino: Printing issues"
+#~ msgstr "Andre Alvim Tolentino: Printing issues"
+
+#~ msgid "Assistant to send files to PACS"
+#~ msgstr "ファイルをPACSへ送信する補助"
+
+#~ msgid "Birth date: "
+#~ msgstr "誕生日: "
+
+#~ msgid "Brazillian Portuguese: Marcel Ribeiro Dantas"
+#~ msgstr "Brazillian Portuguese: Marcel Ribeiro Dantas"
+
+#~ msgid "Browse slices\tCtrl+S"
+#~ msgstr "スライス表示\tCtrl+S"
+
+#~ msgid "CT"
+#~ msgstr "CT"
+
+#~ msgid "Chroma Segmenting Global ..."
+#~ msgstr "全体の彩度を分割中..."
+
+#~ msgid "Close All"
+#~ msgstr "全てを閉じる"
+
+#~ msgid "Close Panel"
+#~ msgstr "パネルを閉じる"
+
+#~ msgid "Close all tabs"
+#~ msgstr "全てのタブを閉じる"
+
+#~ msgid "Closing windows..."
+#~ msgstr "ウインドウを閉じる"
+
+#~ msgid "Column organization (2 columns)"
+#~ msgstr "カラム構成 (2カラム)"
+
+#~ msgid "Creating new images ..."
+#~ msgstr "新規画像を作成中..."
+
+#~ msgid "DICOM &acquisition from PACS"
+#~ msgstr "DICOM &PACS から習得"
+
+#~ msgid "Date: "
+#~ msgstr "日付: "
+
+#~ msgid ""
+#~ "Debian-Med team specially Andreas Tille and Karlsten Hilbert: packaging, "
+#~ "testing and bug reporting"
+#~ msgstr ""
+#~ "Debian-Med team specially Andreas Tille and Karlsten Hilbert: packaging, "
+#~ "testing and bug reporting"
+
+#~ msgid "Decrease"
+#~ msgstr "減少"
+
+#~ msgid "Decrease value"
+#~ msgstr "値減少"
+
+#~ msgid "Deleting a Column"
+#~ msgstr "カラム削除"
+
+#~ msgid "Deleting a Row"
+#~ msgstr "行削除"
+
+#~ msgid "Deleting series..."
+#~ msgstr "シリーズを削除中"
+
+#~ msgid "Description: "
+#~ msgstr "概要: "
+
+#~ msgid "Disengage"
+#~ msgstr "解除"
+
+#~ msgid "Display Options"
+#~ msgstr "ディスプレイオプション"
+
+#~ msgid "Duplicate Tool"
+#~ msgstr "重複ツール"
+
+#~ msgid "Elevation"
+#~ msgstr "仰角"
+
+#~ msgid "Enable XML-RPC server"
+#~ msgstr "XML-RPCサーバを有効にする"
+
+#~ msgid ""
+#~ "Enable/Disable XML RPC Server for listening remote operations from EHR "
+#~ "System"
+#~ msgstr "有効/無効 EHRシステムからの遠隔操作監視のためのXML RPCサーバ"
+
+#~ msgid "Error deleting file from database:\n"
+#~ msgstr "データベースからのファイル削除エラー:\n"
+
+#~ msgid "Error deleting file from de database: \n"
+#~ msgstr "データベースからのファイル削除エラー: \n"
+
+#~ msgid "Error deleting the Study of database:\n"
+#~ msgstr "データベース内の検査削除エラー:\n"
+
+#~ msgid "Error deleting the patient in the database:\n"
+#~ msgstr "データベース内の患者削除エラー:\n"
+
+#~ msgid "Esto es un texto algo largo para probar "
+#~ msgstr "Esto es un texto algo largo para probar "
+
+#~ msgid "Export current series..."
+#~ msgstr "現在のシリーズを書き出し中..."
+
+#~ msgid "Export diagnostic"
+#~ msgstr "診断書き出し"
+
+#~ msgid "Export global..."
+#~ msgstr "総合書き出し中..."
+
+#~ msgid "Export the active study to other formats"
+#~ msgstr "アクティブな検査を他のフォーマットへ書き出し"
+
+#~ msgid ""
+#~ "Extension is incompatible with current core. Please, check for upgrades."
+#~ msgstr "拡張機能は現在のコアと互換性がありません. アップグレードして下さい."
+
+#~ msgid "Extensions Support"
+#~ msgstr "拡張機能のサポート"
+
+#~ msgid "Extracting cut ..."
+#~ msgstr "カットを抽出中..."
+
+#~ msgid "Factor"
+#~ msgstr "ファクター"
+
+#~ msgid "Factor (%.2f)"
+#~ msgstr "ファクター (%.2f)"
+
+#~ msgid "Factor (0.50)"
+#~ msgstr "ファクター (0.50)"
+
+#~ msgid "Failed to remove patient, you have to close opened studies"
+#~ msgstr "患者削除に失敗しました. 開いている検査を閉じて下さい."
+
+#~ msgid "Filters"
+#~ msgstr "フィルター"
+
+#~ msgid "Finished .."
+#~ msgstr "完了.."
+
+#~ msgid "German: Sebastian Hilbert"
+#~ msgstr "German: Sebastian Hilbert"
+
+#~ msgid "Get extensions ..."
+#~ msgstr "拡張機能をゲット ..."
+
+#~ msgid "Ginkgo CADx license agreement version  "
+#~ msgstr "Ginkgo CADx license agreement version  "
+
+#~ msgid "Ginkgo CADx settings"
+#~ msgstr "Ginkgo CADx設定"
+
+#~ msgid "Ginkgo CADx start page ..."
+#~ msgstr "Ginkgo CADx 開始ページ ..."
+
+#~ msgid "Greetings"
+#~ msgstr "ご挨拶"
+
+#~ msgid "Grid Organization"
+#~ msgstr "グリッド構成"
+
+#~ msgid "Id: "
+#~ msgstr "Id: "
+
+#~ msgid "Image"
+#~ msgstr "画像"
+
+#~ msgid "Import Images"
+#~ msgstr "読み込み画像"
+
+#~ msgid "Import global..."
+#~ msgstr "総合読み込み中..."
+
+#~ msgid "Import images"
+#~ msgstr "画像を読み込み"
+
+#~ msgid "Increase"
+#~ msgstr "増加"
+
+#~ msgid "Increase value"
+#~ msgstr "値増加"
+
+#~ msgid "Japanese: Noriya Yokohama"
+#~ msgstr "Japanese: Noriya Yokohama"
+
+#~ msgid "Javier Tovar Velasco"
+#~ msgstr "Javier Tovar Velasco"
+
+#~ msgid "Last week"
+#~ msgstr "先週"
+
+#~ msgid "Loading modules ..."
+#~ msgstr "モジュールを読み込み中..."
+
+#~ msgid "Magnifying glass"
+#~ msgstr "拡大鏡"
+
+#~ msgid "Maximize"
+#~ msgstr "最大化"
+
+#~ msgid "Merge diagnostic"
+#~ msgstr "診断結合"
+
+#~ msgid "Merging file %d of %d"
+#~ msgstr "%d の %d ファイルを結合中"
+
+#~ msgid "Merging files..."
+#~ msgstr "ファイルを結合中..."
+
+#~ msgid "Metaemotion S.L."
+#~ msgstr "Metaemotion S.L."
+
+#~ msgid "Modality: "
+#~ msgstr "モダリティ: "
+
+#~ msgid "Name: "
+#~ msgstr "氏名: "
+
+#~ msgid "No description"
+#~ msgstr "概要なし"
+
+#~ msgid "Not loaded"
+#~ msgstr "読み込み無し"
+
+#~ msgid "Null Tool"
+#~ msgstr "ヌルツール"
+
+#~ msgid "Obtain extensions..."
+#~ msgstr "拡張を適応 ..."
+
+#~ msgid "Open a DICOM file"
+#~ msgstr "DICOMファイルを開く"
+
+#~ msgid "Opening series..."
+#~ msgstr "シリーズを開く"
+
+#~ msgid "PACS server"
+#~ msgstr "PACSサーバー"
+
+#~ msgid "Plugin's path"
+#~ msgstr "プラグインのパス"
+
+#~ msgid "Print..."
+#~ msgstr "印刷..."
+
+#~ msgid "Radious"
+#~ msgstr "半径"
+
+#~ msgid "Redo\tCtrl+y"
+#~ msgstr "再実行\tCtrl+y"
+
+#~ msgid "Redo "
+#~ msgstr "やり直す "
+
+#~ msgid "Ross Boswell: PACS compliance testing"
+#~ msgstr "Ross Boswell: PACS compliance testing"
+
+#~ msgid "Segmenting Chroma Local ..."
+#~ msgstr "ローカルの彩度を分割中..."
+
+#~ msgid "Select Series you want to export"
+#~ msgstr "書き出したいシリーズを選択"
+
+#~ msgid "Select Series you want to upload"
+#~ msgstr "アップロードしたいシリーズを選択"
+
+#~ msgid "Select files you want to export"
+#~ msgstr "書き出したいファイルを選択"
+
+#~ msgid "Select files you want to upload"
+#~ msgstr "アップロードしたいファイルを選択"
+
+#~ msgid "Send to PACS server"
+#~ msgstr "PACS サーバへ送信"
+
+#~ msgid "Series UID: "
+#~ msgstr "Series UID: "
+
+#~ msgid "Sex: female"
+#~ msgstr "性別: 女性"
+
+#~ msgid "Sex: male"
+#~ msgstr "性別: 男性"
+
+#~ msgid "Show On Startup"
+#~ msgstr "開始時に表示"
+
+#~ msgid "Skipping invalid extension without required keys:"
+#~ msgstr "要求されたキーがない不正な拡張機能はスキップします:"
+
+#~ msgid "Spanish: JFLP (jluna80)"
+#~ msgstr "Spanish: JFLP (jluna80)"
+
+#~ msgid "Start page ..."
+#~ msgstr "開始ページ ..."
+
+#~ msgid "Study download size limit exceded"
+#~ msgstr "検査ダウンロードサイズ制限"
+
+#~ msgid "TCP listening port for XML-RPC server"
+#~ msgstr "XML-RPCサーバのTCP監視ポート"
+
+#~ msgid ""
+#~ "The study you want to export is modified.\n"
+#~ "Would you like to save it?"
+#~ msgstr ""
+#~ "書き出ししようとしているこの検査は、修正されています\n"
+#~ "保存しますか?"
+
+#~ msgid ""
+#~ "There are selected diagnostics with pending modifications\n"
+#~ "Do you want to save it before uploading?"
+#~ msgstr ""
+#~ "変更が保留になっている選択された診断があります\n"
+#~ "アップロードする前に保存しますか?"
+
+#~ msgid "This files has to be overwritten"
+#~ msgstr "このファイルは上書きされます"
+
+#~ msgid "Time: "
+#~ msgstr "時間: "
+
+#~ msgid "Translators"
+#~ msgstr "Translators"
+
+#~ msgid "Turkish: zeugma (sunder67)"
+#~ msgstr "Turkish: zeugma (sunder67)"
+
+#~ msgid "UID Importer: "
+#~ msgstr "UID Importer: "
+
+#~ msgid "URL for new extensions"
+#~ msgstr "新しい拡張機能のURL"
+
+#~ msgid "Undo\tCtrl+z"
+#~ msgstr "やり直し\tCtrl+z"
+
+#~ msgid "Upload to PACS"
+#~ msgstr "PACSへアップロード"
+
+#~ msgid "We want to thanks "
+#~ msgstr "We want to thanks "
+
+#~ msgid "XML-RPC Server"
+#~ msgstr "XML-RPC Server"
+
+#~ msgid "XmlRpc++"
+#~ msgstr "XmlRpc++"
+
+#~ msgid "You can't remove opened studies"
+#~ msgstr "開いている検査は削除できません"
+
+#~ msgid "You have to set a valid port"
+#~ msgstr "有効なポートをセットして下さい"
+
+#~ msgid "Zoom +"
+#~ msgstr "拡大率 +"
+
+#~ msgid "Zoom -"
+#~ msgstr "拡大率 -"
+
+#~ msgid "error, have tried to select a file that is not added to history"
+#~ msgstr "エラー. 履歴に追加されないファイルを選択しています"
+
+#~ msgid "this Patient"
+#~ msgstr "この患者"
+
+#~ msgid "to"
+#~ msgstr "から"
+
+#~ msgid "Ginkgo CADx Settings"
+#~ msgstr "Ginkgo CADx設定"
+
+#~ msgid "About Ginkgo CADx..."
+#~ msgstr "Ginkgo CADxについて..."
+
+#~ msgid "Filter menu"
+#~ msgstr "フィルターメニュー"
+
+#~ msgid "No results obtained"
+#~ msgstr "結果が得られません"
+
+#~ msgid "Unsupported scope"
+#~ msgstr "サポートされないスコープ"
+
+#~ msgid "Error sending evidences: "
+#~ msgstr "エビデンス送信エラー "
+
+#~ msgid "No options"
+#~ msgstr "オプションなし"
+
+#~ msgid "Fatal error, can not write the history database"
+#~ msgstr "致命的なエラー. 履歴データベースへ書き込みできません"
+
+#~ msgid "Could not get the associated module"
+#~ msgstr "付属モジュールを取得できません"
+
+#~ msgid "It has been read a \"medico\" tag without identifiers"
+#~ msgstr "It has been read a \"medico\" tag without identifiers"
+
+#~ msgid "It has been read a \"paciente\" tag without identifiers"
+#~ msgstr "It has been read a \"paciente\" tag without identifiers"
+
+#~ msgid "Correction"
+#~ msgstr "コレクション"
+
+#~ msgid "Smooth"
+#~ msgstr "スムーズ"
+
+#~ msgid "Edges"
+#~ msgstr "エッジ"
+
+#~ msgid "Levels"
+#~ msgstr "レベル"
+
+#~ msgid "Median 3x3"
+#~ msgstr "メディアン 3x3"
+
+#~ msgid "Median smooth filter"
+#~ msgstr "メディアンスムーズフィルター"
+
+#~ msgid "Gaussian 3x3"
+#~ msgstr "ガウシアン 3x3"
+
+#~ msgid "Gaussian smooth filter"
+#~ msgstr "ガウシアンスムーズフィルター"
+
+#~ msgid "Curvature Flow"
+#~ msgstr "曲率フロー"
+
+#~ msgid "Edge preserving smooth filter"
+#~ msgstr "エッジプレサービングスムーズフィルター"
+
+#~ msgid "Sobel edges 3x3"
+#~ msgstr "ソーベルエッジ 3x3"
+
+#~ msgid "Sobel filter 3x3"
+#~ msgstr "ソーベルフィルター 3x3"
+
+#~ msgid "Auto Levels"
+#~ msgstr "自動レベル"
+
+#~ msgid "Remove finished"
+#~ msgstr "明確に終了しました"
+
+#~ msgid "XML Files(*.xml)|*.xml"
+#~ msgstr "XMLファイル(*.xml)|*.xml"
+
+#~ msgid "Failed to save the file"
+#~ msgstr "ファイル保存に失敗"
+
+#~ msgid "The xml format is not correct"
+#~ msgstr "XMLフォーマットが不正です"
+
+#~ msgid "Fill the fields to continue."
+#~ msgstr "続けるには項目を埋めて下さい"
+
+#~ msgid "Setting tags on export will be anonymized"
+#~ msgstr "書き出し設定タグは匿名化されます"
+
+#~ msgid "Are you sure to delete the tag"
+#~ msgstr "タグを削除してもいいですか"
+
+#~ msgid "You must specify an absolute directory path"
+#~ msgstr "ちゃんとしたディレクトリパスを指定して下さい"
+
+#~ msgid "PACS Servers"
+#~ msgstr "PACSサーバ"
+
+#~ msgid "Confirm the removal of the server"
+#~ msgstr "サーバ削除の確認"
+
+#~ msgid "Test server"
+#~ msgstr "サーバテスト"
+
+#~ msgid "Environment"
+#~ msgstr "環境"
+
+#~ msgid "System Environment of Electronic Health Record"
+#~ msgstr "電子健康記録システム環境"
+
+#~ msgid "Sacyl (CyL, Spain)"
+#~ msgstr "Sacyl (CyL, Spain)"
+
+#~ msgid "Modify"
+#~ msgstr "修正"
+
+#~ msgid "Default Value"
+#~ msgstr "デフォルト値"
+
+#~ msgid "Anonymized tags default value"
+#~ msgstr "匿名化タグのデフォルト値"
+
+#~ msgid "Configure tags to anonymize"
+#~ msgstr "匿名化のタグ設定"
+
+#~ msgid "The group ID and the item must be encoded in hexadecimal"
+#~ msgstr "グループIDとアイテムは16進法エンコードにしてください"
+
+#~ msgid "Tags defined in settings"
+#~ msgstr "設定のタグ定義"
+
+#~ msgid "License"
+#~ msgstr "ライセンス"
+
+#~ msgid "License Data"
+#~ msgstr "ライセンスデータ"
+
+#~ msgid "Organization"
+#~ msgstr "組織"
+
+#~ msgid "Expiration Date"
+#~ msgstr "満了日"
+
+#~ msgid "List"
+#~ msgstr "リスト"
+
+#~ msgid "SOAP invocation error\n"
+#~ msgstr "SOAP呼び出しエラー\n"
+
+#~ msgid "HL7 Monitor"
+#~ msgstr "HL7モニター"
+
+#~ msgid "Log Monitor"
+#~ msgstr "ログモニター"
+
+#~ msgid "Tab Organization"
+#~ msgstr "タブ構成"
+
+#~ msgid "Select the DICOM files you wish to upload"
+#~ msgstr "アップロードしたいDICOMファイルを選択してください"
+
+#~ msgid "Select the server where the files will be sent"
+#~ msgstr "ファイルを送信したいサーバを選択してください"
+
+#~ msgid "Breaking the world"
+#~ msgstr "Breaking the world"
+
+#~ msgid "Cancels current task"
+#~ msgstr "現在のタスクをキャンセル"
+
+#~ msgid "Exception sending request"
+#~ msgstr "例外を読み込み中:"
+
+#~ msgid "Exception reading response"
+#~ msgstr "例外を読み込み中:"
+
+#~ msgid "Poligono"
+#~ msgstr "多角形"
+
+#~ msgid "User Defined"
+#~ msgstr "ユーザー定義"
+
+#~ msgid " WW"
+#~ msgstr " WW"
+
+#~ msgid " WL"
+#~ msgstr " WL"
+
+#~ msgid "Reset Window/Level"
+#~ msgstr "リセット Window/Level"
+
+#~ msgid "In connection openssl Exception:"
+#~ msgstr "openssl接続を除外:"
+
+#~ msgid "The invocation XML is malformed"
+#~ msgstr "XML呼び出しは不定形"
+
+#~ msgid ""
+#~ "Failed to perform the HTTP request, the server returned the error code "
+#~ msgstr "HTTPリクエストは失敗しました. サーバはエラーコードを返しました "
+
+#~ msgid "Not specified the server protocol"
+#~ msgstr "サーバプロトコルが特定されていません"
+
+#~ msgid "Unsupported Protocol"
+#~ msgstr "サポートされないプロトコル"
+
+#~ msgid "Malformed server response"
+#~ msgstr "不定型なサーバレスポンス"
+
+#~ msgid "There was an error when you invoke the Web service"
+#~ msgstr "Webサービスを実行したときにエラーが発生しました"
+
+#~ msgid "Code:"
+#~ msgstr "コード:"
+
+#~ msgid "Reason:"
+#~ msgstr "理由:"
+
+#~ msgid "Error when making SSL connection"
+#~ msgstr "SSL接続時にエラー"
+
+#~ msgid "Error when making the request, writing incomplete"
+#~ msgstr "リクエスト中にエラー. 不完全書き込み中"
+
+#~ msgid "Error in receiving the response"
+#~ msgstr "レスポンス受信エラー"
+
+#~ msgid "The certificate has not been verified"
+#~ msgstr "証明書は照合されません"
+
+#~ msgid "The CN field does not match the hostname"
+#~ msgstr "CN項目はホスト名と一致しません"
+
+#~ msgid "Export Certificate"
+#~ msgstr "証明書書き出し"
+
+#~ msgid "PEM file (*.pem) | *.pem"
+#~ msgstr "PEM file (*.pem) | *.pem"
+
+#~ msgid ""
+#~ "The following certificate has not been able to verify\n"
+#~ "Do you want to save to import into the system?"
+#~ msgstr ""
+#~ "証明書が照合できません\n"
+#~ "システムへ読み込み保存しますか?"
+
+#~ msgid "Birthday"
+#~ msgstr "誕生日"
+
+#~ msgid "Evaluation"
+#~ msgstr "評価マップ"
+
+#~ msgid "Save Certificate"
+#~ msgstr "証明書"
+
+#~ msgid "Actions"
+#~ msgstr "アクション"
+
+#~ msgid "Address"
+#~ msgstr "アドレス"
+
+#~ msgid "Angle"
+#~ msgstr "角度"
+
+#~ msgid "Comp. Date"
+#~ msgstr "Comp. Date"
+
+#~ msgid "Extension"
+#~ msgstr "拡張機能"
+
+#~ msgid "Open Selected completed downloads"
+#~ msgstr "選択済み完了ダウンロードを開く"
+
+#~ msgid "Progress"
+#~ msgstr "進捗"
+
+#~ msgid "Provider"
+#~ msgstr "プロバイダ"
+
+#~ msgid "Reload"
+#~ msgstr "再読込"
+
+#~ msgid "Rule"
+#~ msgstr "ルーラー"
+
+#~ msgid "Start/Stop selected downloads"
+#~ msgstr "開始/停止 選択されたダウンロード"
+
+#~ msgid "There is no PACS server configured"
+#~ msgstr "PACSサーバ設定がありません"
+
+#~ msgid "Version"
+#~ msgstr "ヴァージョン"
+
+#~ msgid " but no valid presentation contexts"
+#~ msgstr " 有効なプレゼンテーションコンテキストがありません"
+
+#~ msgid "%d/%m/%Y %H:%M:%S"
+#~ msgstr "%d/%m/%Y %H:%M:%S"
+
+#~ msgid "Association Received"
+#~ msgstr "アソシエーション受信"
+
+#~ msgid "Download warning"
+#~ msgstr "ダウンロード注意"
+
+#~ msgid ""
+#~ "Error in interpreting the parameters of the command line. The file or "
+#~ "directory doesn't exist ("
+#~ msgstr ""
+#~ "コマンドラインパラメータの解釈でエラー。ファイルあるいはディレクトリが存在"
+#~ "しません ("
+
+#~ msgid "Exception in component "
+#~ msgstr "コンポーネントで例外 "
+
+#~ msgid "Open again"
+#~ msgstr "再度開く"
+
+#~ msgid "Pixels bluring"
+#~ msgstr "ピクセルボケ"
+
+#~ msgid "Set pixels bluring"
+#~ msgstr "ピクセルボケをセット"
+
+#~ msgid "Study successfully sent to PACS"
+#~ msgstr "PACSへの検査送信が成功"
+
+#~ msgid "The following commands will abort if you close the application"
+#~ msgstr "アプリケーションを閉じると、実行中コマンドは中断されます"
+
+#~ msgid ""
+#~ "The series selected is already open\n"
+#~ "Do you want to open it again?"
+#~ msgstr ""
+#~ "選択されたシリーズはすでに開いています\n"
+#~ "開き直しますか?"
+
+#~ msgid "The service did not respond correctly to the DICOM standard:"
+#~ msgstr "このサービスは正しくDICOMスタンダードに反応しない:"
+
+#~ msgid "Unset pixels bluring"
+#~ msgstr "ピクセルボケをなし"
+
+#~ msgid "No proxy for addresses containing:"
+#~ msgstr "アドレスを含んだプロキシがありません:"
+
+#~ msgid "Page Setup ..."
+#~ msgstr "ページ設定..."
+
+#~ msgid "Username:"
+#~ msgstr "ユーザー名:"
+
+#~ msgid "You have to specify at least uid study or accession number"
+#~ msgstr "uid 検査か受付番号の少ない方を明示する必要があります"
diff --git a/cadxcore/lang/ja/wxstd.mo b/cadxcore/lang/ja/wxstd.mo
new file mode 100644
index 0000000..b212113
Binary files /dev/null and b/cadxcore/lang/ja/wxstd.mo differ
diff --git a/cadxcore/lang/ja/wxstd.po b/cadxcore/lang/ja/wxstd.po
new file mode 100644
index 0000000..909b0ee
--- /dev/null
+++ b/cadxcore/lang/ja/wxstd.po
@@ -0,0 +1,9171 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: wxWidgets 3.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-01 19:04+0200\n"
+"PO-Revision-Date: 2011-03-02 18:30+0900\n"
+"Last-Translator: Suzumizaki-Kimitaka(鈴見咲君高) <suzumizaki at free."
+"japandesign.ne.jp>\n"
+"Language-Team: Japanese <wx-translators at wxwindows.org>\n"
+"Language: ja\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+
+#: ../src/common/debugrpt.cpp:591
+msgid ""
+"\n"
+"Please send this report to the program maintainer, thank you!\n"
+msgstr ""
+"\n"
+"お手数ですがこのレポートをプログラムの保守担当者に送信ください。\n"
+
+#: ../src/richtext/richtextstyledlg.cpp:210
+#: ../src/richtext/richtextstyledlg.cpp:222
+msgid " "
+msgstr " "
+
+#: ../src/generic/dbgrptg.cpp:326
+msgid "              Thank you and we're sorry for the inconvenience!\n"
+msgstr "              ご不便をおかけして申し訳ございません。\n"
+
+#: ../src/common/prntbase.cpp:546
+#, fuzzy, c-format
+msgid " (copy %d of %d)"
+msgstr "%dページ (%dページ中)"
+
+#: ../src/common/log.cpp:425
+#, c-format
+msgid " (error %ld: %s)"
+msgstr " (エラー %ld: %s)"
+
+#: ../src/common/imagtiff.cpp:75
+#, c-format
+msgid " (in module \"%s\")"
+msgstr "(モジュール \"%s\")"
+
+#: ../src/common/docview.cpp:1624
+msgid " - "
+msgstr " - "
+
+#: ../src/richtext/richtextprint.cpp:588 ../src/html/htmprint.cpp:704
+msgid " Preview"
+msgstr " プレビュー"
+
+#: ../src/common/fontcmn.cpp:811
+msgid " bold"
+msgstr " 太字"
+
+#: ../src/common/fontcmn.cpp:827
+msgid " italic"
+msgstr " イタリック"
+
+#: ../src/common/fontcmn.cpp:807
+msgid " light"
+msgstr " 軽量"
+
+#: ../src/common/paper.cpp:118
+msgid "#10 Envelope, 4 1/8 x 9 1/2 in"
+msgstr "#10 封筒, 4 1/8 x 9 1/2 インチ"
+
+#: ../src/common/paper.cpp:119
+msgid "#11 Envelope, 4 1/2 x 10 3/8 in"
+msgstr "#11 封筒, 4 1/2 x 10 3/8 インチ"
+
+#: ../src/common/paper.cpp:120
+msgid "#12 Envelope, 4 3/4 x 11 in"
+msgstr "#12 封筒, 4 3/4 x 11 インチ"
+
+#: ../src/common/paper.cpp:121
+msgid "#14 Envelope, 5 x 11 1/2 in"
+msgstr "#14 封筒, 5 x 11 1/2 インチ"
+
+#: ../src/common/paper.cpp:117
+msgid "#9 Envelope, 3 7/8 x 8 7/8 in"
+msgstr "#9 封筒, 3 7/8 x 8 7/8 インチ"
+
+#: ../src/html/helpwnd.cpp:1044
+#, fuzzy, c-format
+msgid "%d of %lu"
+msgstr "%i / %i"
+
+#: ../src/html/helpwnd.cpp:1681 ../src/html/helpwnd.cpp:1719
+#, c-format
+msgid "%i of %i"
+msgstr "%i / %i"
+
+#: ../src/generic/filectrlg.cpp:315
+#, c-format
+msgid "%ld byte"
+msgid_plural "%ld bytes"
+msgstr[0] "%ld バイト"
+
+#: ../src/html/helpwnd.cpp:1046
+#, fuzzy, c-format
+msgid "%lu of %lu"
+msgstr "%i / %i"
+
+#: ../src/common/cmdline.cpp:1050
+#, c-format
+msgid "%s (or %s)"
+msgstr "%s (または %s)"
+
+#: ../src/generic/logg.cpp:230
+#, c-format
+msgid "%s Error"
+msgstr "%s エラー"
+
+#: ../src/generic/logg.cpp:242
+#, c-format
+msgid "%s Information"
+msgstr "%s 情報"
+
+#: ../src/generic/preferencesg.cpp:110
+#, fuzzy, c-format
+msgid "%s Preferences"
+msgstr "設定 (&P)"
+
+#: ../src/generic/logg.cpp:234
+#, c-format
+msgid "%s Warning"
+msgstr "%s 警告"
+
+#: ../src/common/tarstrm.cpp:1319
+#, c-format
+msgid "%s did not fit the tar header for entry '%s'"
+msgstr "%s は tar のヘッダとして認識できませんでした '%s'"
+
+#: ../src/common/fldlgcmn.cpp:106
+#, c-format
+msgid "%s files (%s)|%s"
+msgstr "%s 形式 (%s)|%s"
+
+#: ../src/common/stockitem.cpp:139 ../src/html/helpfrm.cpp:142
+#: ../src/html/helpfrm.cpp:144
+msgid "&About"
+msgstr "詳細 (&A)"
+
+#: ../src/common/stockitem.cpp:207
+msgid "&Actual Size"
+msgstr "原寸 (&A)"
+
+#: ../src/richtext/richtextindentspage.cpp:262
+msgid "&After a paragraph:"
+msgstr "段落の後 (&A):"
+
+#: ../src/richtext/richtextindentspage.cpp:128
+#: ../src/richtext/richtextliststylepage.cpp:319
+msgid "&Alignment"
+msgstr "整列 (&A)"
+
+#: ../src/common/stockitem.cpp:141
+msgid "&Apply"
+msgstr "適用 (&A)"
+
+#: ../src/richtext/richtextstyledlg.cpp:251
+msgid "&Apply Style"
+msgstr "スタイルの適用 (&A)"
+
+#: ../src/msw/mdi.cpp:175
+msgid "&Arrange Icons"
+msgstr "アイコンの整列 (&A)"
+
+#: ../src/common/stockitem.cpp:195
+msgid "&Ascending"
+msgstr "昇順 (&A)"
+
+#: ../src/common/stockitem.cpp:142
+msgid "&Back"
+msgstr "戻る (&B)"
+
+#: ../src/richtext/richtextstylepage.cpp:113
+msgid "&Based on:"
+msgstr "基底 (&B):"
+
+#: ../src/richtext/richtextindentspage.cpp:253
+msgid "&Before a paragraph:"
+msgstr "段落の前 (&B):"
+
+#: ../src/richtext/richtextfontpage.cpp:271
+msgid "&Bg colour:"
+msgstr "背景色 (&C):"
+
+#: ../src/common/stockitem.cpp:143
+msgid "&Bold"
+msgstr "太字 (&B)"
+
+#: ../src/common/stockitem.cpp:144
+msgid "&Bottom"
+msgstr "下端 (&B)"
+
+#: ../src/richtext/richtextborderspage.cpp:359
+#: ../src/richtext/richtextborderspage.cpp:503
+#: ../src/richtext/richtextmarginspage.cpp:260
+#: ../src/richtext/richtextmarginspage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:637
+#: ../src/richtext/richtextsizepage.cpp:644
+#, fuzzy
+msgid "&Bottom:"
+msgstr "下端 (&B)"
+
+#: ../include/wx/richtext/richtextbuffer.h:3530
+#, fuzzy
+msgid "&Box"
+msgstr "太字 (&B)"
+
+#: ../src/richtext/richtextliststylepage.cpp:210
+#: ../src/richtext/richtextbulletspage.cpp:159
+msgid "&Bullet style:"
+msgstr "行頭文字のスタイル (&B):"
+
+#: ../src/common/stockitem.cpp:146
+msgid "&CD-Rom"
+msgstr "CD-ROM (&C)"
+
+#: ../src/generic/wizard.cpp:432 ../src/generic/fontdlgg.cpp:470
+#: ../src/generic/fontdlgg.cpp:489 ../src/osx/carbon/fontdlg.cpp:588
+#: ../src/common/stockitem.cpp:145
+msgid "&Cancel"
+msgstr "キャンセル (&C)"
+
+#: ../src/msw/mdi.cpp:171
+msgid "&Cascade"
+msgstr "重ねて表示 (&C)"
+
+#: ../include/wx/richtext/richtextbuffer.h:5587
+#, fuzzy
+msgid "&Cell"
+msgstr "キャンセル (&C)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:439
+msgid "&Character code:"
+msgstr "文字コード (&C):"
+
+#: ../src/common/stockitem.cpp:147
+msgid "&Clear"
+msgstr "消去 (&C)"
+
+#: ../src/generic/logg.cpp:522 ../src/common/stockitem.cpp:148
+#: ../src/common/prntbase.cpp:1570 ../src/univ/themes/win32.cpp:3756
+#: ../src/html/helpfrm.cpp:139
+msgid "&Close"
+msgstr "閉じる (&C)"
+
+#: ../src/common/stockitem.cpp:193
+msgid "&Color"
+msgstr "色 (&C)"
+
+#: ../src/richtext/richtextfontpage.cpp:258
+msgid "&Colour:"
+msgstr "色 (&C):"
+
+#: ../src/common/stockitem.cpp:149
+msgid "&Convert"
+msgstr "変換 (&C)"
+
+#: ../src/richtext/richtextctrl.cpp:326 ../src/osx/textctrl_osx.cpp:583
+#: ../src/common/stockitem.cpp:150 ../src/msw/textctrl.cpp:2284
+msgid "&Copy"
+msgstr "コピー (&C)"
+
+#: ../src/generic/hyperlinkg.cpp:156
+msgid "&Copy URL"
+msgstr "URLをコピー (&C)"
+
+#: ../src/common/headerctrlcmn.cpp:328
+msgid "&Customize..."
+msgstr "列の編集 (&C) ..."
+
+#: ../src/generic/dbgrptg.cpp:334
+msgid "&Debug report preview:"
+msgstr "デバッグレポートプレビュー (&D):"
+
+#: ../src/richtext/richtexttabspage.cpp:142
+#: ../src/richtext/richtextctrl.cpp:328 ../src/osx/textctrl_osx.cpp:585
+#: ../src/common/stockitem.cpp:152 ../src/msw/textctrl.cpp:2286
+msgid "&Delete"
+msgstr "削除 (&D)"
+
+#: ../src/richtext/richtextstyledlg.cpp:269
+msgid "&Delete Style..."
+msgstr "スタイルの削除 (&D)..."
+
+#: ../src/common/stockitem.cpp:196
+msgid "&Descending"
+msgstr "降順 (&D)"
+
+#: ../src/generic/logg.cpp:688
+msgid "&Details"
+msgstr "詳細 (&D)"
+
+#: ../src/common/stockitem.cpp:153
+msgid "&Down"
+msgstr "下(&D)"
+
+#: ../src/common/stockitem.cpp:154
+msgid "&Edit"
+msgstr "編集(&E)"
+
+#: ../src/richtext/richtextstyledlg.cpp:263
+msgid "&Edit Style..."
+msgstr "スタイルの編集 (&E) ..."
+
+#: ../src/common/stockitem.cpp:155
+msgid "&Execute"
+msgstr "実行 (&E)"
+
+#: ../src/common/stockitem.cpp:157 ../src/html/helpfrm.cpp:146
+msgid "&File"
+msgstr "ファイル(&F)"
+
+#: ../src/common/stockitem.cpp:158
+msgid "&Find"
+msgstr "検索(&F)"
+
+#: ../src/generic/wizard.cpp:626
+msgid "&Finish"
+msgstr "完了 (&F)"
+
+#: ../src/common/stockitem.cpp:159
+msgid "&First"
+msgstr "最初 (&F)"
+
+#: ../src/richtext/richtextsizepage.cpp:244
+msgid "&Floating mode:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:160
+msgid "&Floppy"
+msgstr "フロッピーディスク (&F)"
+
+#: ../src/common/stockitem.cpp:194
+msgid "&Font"
+msgstr "フォント (&F)"
+
+#: ../src/generic/fontdlgg.cpp:371
+msgid "&Font family:"
+msgstr "フォントファミリー (&F):"
+
+#: ../src/richtext/richtextliststylepage.cpp:194
+msgid "&Font for Level..."
+msgstr "レベル毎のフォント (&F)..."
+
+#: ../src/richtext/richtextfontpage.cpp:156
+#: ../src/richtext/richtextsymboldlg.cpp:400
+msgid "&Font:"
+msgstr "フォント (&F):"
+
+#: ../src/common/stockitem.cpp:161
+msgid "&Forward"
+msgstr "進行 (&F)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:451
+msgid "&From:"
+msgstr "取得元 (&F):"
+
+#: ../src/common/stockitem.cpp:162
+msgid "&Harddisk"
+msgstr "ハードディスク (&H)"
+
+#: ../src/richtext/richtextsizepage.cpp:351
+#: ../src/richtext/richtextsizepage.cpp:358
+#, fuzzy
+msgid "&Height:"
+msgstr "ウエイト (&W):"
+
+#: ../src/generic/wizard.cpp:435 ../src/richtext/richtextstyledlg.cpp:303
+#: ../src/richtext/richtextsymboldlg.cpp:479 ../src/osx/menu_osx.cpp:785
+#: ../src/common/stockitem.cpp:163 ../src/html/helpfrm.cpp:147
+msgid "&Help"
+msgstr "ヘルプ (&H)"
+
+#: ../include/wx/richmsgdlg.h:30
+#, fuzzy
+msgid "&Hide details"
+msgstr "詳細 (&D)"
+
+#: ../src/common/stockitem.cpp:164
+msgid "&Home"
+msgstr "ホーム (&H)"
+
+#: ../src/richtext/richtextindentspage.cpp:184
+#: ../src/richtext/richtextliststylepage.cpp:372
+msgid "&Indentation (tenths of a mm)"
+msgstr "字下げ(1/10ミリ単位) (&I)"
+
+#: ../src/richtext/richtextindentspage.cpp:167
+#: ../src/richtext/richtextliststylepage.cpp:356
+msgid "&Indeterminate"
+msgstr "指定しない (&I)"
+
+#: ../src/common/stockitem.cpp:166
+msgid "&Index"
+msgstr "索引 (&I)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "&Info"
+msgstr "情報 (&I)"
+
+#: ../src/common/stockitem.cpp:168
+msgid "&Italic"
+msgstr "イタリック (&I)"
+
+#: ../src/common/stockitem.cpp:169
+msgid "&Jump to"
+msgstr "移動 (&J)"
+
+#: ../src/richtext/richtextindentspage.cpp:153
+#: ../src/richtext/richtextliststylepage.cpp:342
+msgid "&Justified"
+msgstr "両端揃え (&J)"
+
+#: ../src/common/stockitem.cpp:174
+msgid "&Last"
+msgstr "最後 (&L)"
+
+#: ../src/richtext/richtextindentspage.cpp:139
+#: ../src/richtext/richtextliststylepage.cpp:328
+msgid "&Left"
+msgstr "左 (&L)"
+
+#: ../src/richtext/richtextindentspage.cpp:195
+#: ../src/richtext/richtextborderspage.cpp:269
+#: ../src/richtext/richtextborderspage.cpp:413
+#: ../src/richtext/richtextliststylepage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:187
+#: ../src/richtext/richtextmarginspage.cpp:301
+#: ../src/richtext/richtextsizepage.cpp:532
+#: ../src/richtext/richtextsizepage.cpp:539
+msgid "&Left:"
+msgstr "左 (&L):"
+
+#: ../src/richtext/richtextliststylepage.cpp:183
+msgid "&List level:"
+msgstr "リストレベル (&L):"
+
+#: ../src/generic/logg.cpp:523
+msgid "&Log"
+msgstr "ログ (&L)"
+
+#: ../src/univ/themes/win32.cpp:3748
+msgid "&Move"
+msgstr "移動 (&M)"
+
+#: ../src/richtext/richtextsizepage.cpp:672
+msgid "&Move the object to:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:175
+msgid "&Network"
+msgstr "ネットワーク (&N)"
+
+#: ../src/richtext/richtexttabspage.cpp:136 ../src/common/stockitem.cpp:176
+msgid "&New"
+msgstr "新規作成 (&N)"
+
+#: ../src/aui/tabmdi.cpp:111 ../src/generic/mdig.cpp:100
+#: ../src/msw/mdi.cpp:176
+msgid "&Next"
+msgstr "次 (&N)"
+
+#: ../src/generic/wizard.cpp:431 ../src/generic/wizard.cpp:626
+msgid "&Next >"
+msgstr "次へ (&N) >"
+
+#: ../src/richtext/richtextsizepage.cpp:681
+#, fuzzy
+msgid "&Next Paragraph"
+msgstr "段落の後 (&A):"
+
+#: ../src/generic/tipdlg.cpp:276
+msgid "&Next Tip"
+msgstr "次のチップ (&N)"
+
+#: ../src/richtext/richtextstylepage.cpp:123
+msgid "&Next style:"
+msgstr "次のスタイル (&N):"
+
+#: ../src/common/stockitem.cpp:177 ../src/msw/msgdlg.cpp:476
+msgid "&No"
+msgstr "いいえ (&N)"
+
+#: ../src/generic/dbgrptg.cpp:356
+msgid "&Notes:"
+msgstr "注意書き (&N):"
+
+#: ../src/richtext/richtextbulletspage.cpp:264
+msgid "&Number:"
+msgstr "番号 (&N):"
+
+#: ../src/generic/fontdlgg.cpp:475 ../src/generic/fontdlgg.cpp:482
+#: ../src/osx/carbon/fontdlg.cpp:594 ../src/common/stockitem.cpp:178
+msgid "&OK"
+msgstr "OK (&O)"
+
+#: ../src/generic/dbgrptg.cpp:342 ../src/common/stockitem.cpp:179
+#: ../src/html/helpfrm.cpp:137
+msgid "&Open..."
+msgstr "開く (&O) ..."
+
+#: ../src/richtext/richtextindentspage.cpp:222
+msgid "&Outline level:"
+msgstr "アウトラインレベル (&O):"
+
+#: ../src/richtext/richtextindentspage.cpp:293
+msgid "&Page Break"
+msgstr ""
+
+#: ../src/richtext/richtextctrl.cpp:327 ../src/osx/textctrl_osx.cpp:584
+#: ../src/common/stockitem.cpp:180 ../src/msw/textctrl.cpp:2285
+msgid "&Paste"
+msgstr "貼り付け (&P)"
+
+#: ../include/wx/richtext/richtextbuffer.h:4655
+msgid "&Picture"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:422
+msgid "&Point size:"
+msgstr "大きさ-ポイント (&P):"
+
+#: ../src/richtext/richtexttabspage.cpp:114
+msgid "&Position (tenths of a mm):"
+msgstr "位置(1/10ミリ単位) (&P)"
+
+#: ../src/richtext/richtextsizepage.cpp:514
+#, fuzzy
+msgid "&Position mode:"
+msgstr "印刷"
+
+#: ../src/common/stockitem.cpp:181
+msgid "&Preferences"
+msgstr "設定 (&P)"
+
+#: ../src/aui/tabmdi.cpp:112 ../src/generic/mdig.cpp:101
+#: ../src/msw/mdi.cpp:177
+msgid "&Previous"
+msgstr "前 (&P)"
+
+#: ../src/richtext/richtextsizepage.cpp:675
+#, fuzzy
+msgid "&Previous Paragraph"
+msgstr "前のページ"
+
+#: ../src/common/stockitem.cpp:183
+msgid "&Print..."
+msgstr "印刷 (&P) ..."
+
+#: ../src/richtext/richtextctrl.cpp:332 ../src/richtext/richtextctrl.cpp:4945
+#: ../src/common/stockitem.cpp:184
+msgid "&Properties"
+msgstr "プロパティー (&P)"
+
+#: ../src/common/stockitem.cpp:156
+msgid "&Quit"
+msgstr "終了 (&Q)"
+
+#: ../src/richtext/richtextctrl.cpp:323 ../src/osx/textctrl_osx.cpp:580
+#: ../src/common/stockitem.cpp:185 ../src/common/cmdproc.cpp:293
+#: ../src/common/cmdproc.cpp:300 ../src/msw/textctrl.cpp:2281
+msgid "&Redo"
+msgstr "再実行 (&R)"
+
+#: ../src/common/cmdproc.cpp:289 ../src/common/cmdproc.cpp:309
+msgid "&Redo "
+msgstr "再実行 (&R)"
+
+#: ../src/richtext/richtextstyledlg.cpp:257
+msgid "&Rename Style..."
+msgstr "スタイル名を変更 (&R)..."
+
+#: ../src/generic/fdrepdlg.cpp:179
+msgid "&Replace"
+msgstr "置換 (&R)"
+
+#: ../src/richtext/richtextstyledlg.cpp:287
+msgid "&Restart numbering"
+msgstr "番号付けのリセット (&R)"
+
+#: ../src/univ/themes/win32.cpp:3747
+msgid "&Restore"
+msgstr "復元 (&R)"
+
+#: ../src/richtext/richtextindentspage.cpp:146
+#: ../src/richtext/richtextliststylepage.cpp:335
+msgid "&Right"
+msgstr "右 (&R)"
+
+#: ../src/richtext/richtextindentspage.cpp:213
+#: ../src/richtext/richtextborderspage.cpp:299
+#: ../src/richtext/richtextborderspage.cpp:443
+#: ../src/richtext/richtextliststylepage.cpp:399
+#: ../src/richtext/richtextmarginspage.cpp:212
+#: ../src/richtext/richtextmarginspage.cpp:326
+#: ../src/richtext/richtextsizepage.cpp:602
+#: ../src/richtext/richtextsizepage.cpp:609
+msgid "&Right:"
+msgstr "右 (&R):"
+
+#: ../src/common/stockitem.cpp:190
+msgid "&Save"
+msgstr "保存 (&S)"
+
+#: ../src/common/stockitem.cpp:191
+#, fuzzy
+msgid "&Save as"
+msgstr "Save As"
+
+#: ../include/wx/richmsgdlg.h:29
+#, fuzzy
+msgid "&See details"
+msgstr "詳細 (&D)"
+
+#: ../src/generic/tipdlg.cpp:270
+msgid "&Show tips at startup"
+msgstr "チップを起動時に表示 (&S)"
+
+#: ../src/univ/themes/win32.cpp:3750
+msgid "&Size"
+msgstr "大きさ (&S)"
+
+#: ../src/richtext/richtextfontpage.cpp:168
+msgid "&Size:"
+msgstr "大きさ (&S):"
+
+#: ../src/generic/progdlgg.cpp:282
+msgid "&Skip"
+msgstr "スキップ (&S)"
+
+#: ../src/richtext/richtextindentspage.cpp:242
+#: ../src/richtext/richtextliststylepage.cpp:417
+msgid "&Spacing (tenths of a mm)"
+msgstr "間隔 - 1/10mm単位 (&S)"
+
+#: ../src/common/stockitem.cpp:197
+msgid "&Spell Check"
+msgstr "スペルチェック (&S)"
+
+#: ../src/common/stockitem.cpp:198
+msgid "&Stop"
+msgstr "停止 (&S)"
+
+#: ../src/richtext/richtextfontpage.cpp:284 ../src/common/stockitem.cpp:199
+msgid "&Strikethrough"
+msgstr "打ち消し線 (&S)"
+
+#: ../src/generic/fontdlgg.cpp:382 ../src/richtext/richtextstylepage.cpp:104
+msgid "&Style:"
+msgstr "スタイル (&S):"
+
+#: ../src/richtext/richtextstyledlg.cpp:198
+msgid "&Styles:"
+msgstr "スタイル一覧 (&S):"
+
+#: ../src/richtext/richtextsymboldlg.cpp:413
+msgid "&Subset:"
+msgstr "部分表示 (&S):"
+
+#: ../src/richtext/richtextliststylepage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:222
+msgid "&Symbol:"
+msgstr "記号 (&S):"
+
+#: ../include/wx/richtext/richtextbuffer.h:5679
+#, fuzzy
+msgid "&Table"
+msgstr "タブ"
+
+#: ../src/common/stockitem.cpp:200
+msgid "&Top"
+msgstr "上端 (&T)"
+
+#: ../src/richtext/richtextborderspage.cpp:329
+#: ../src/richtext/richtextborderspage.cpp:473
+#: ../src/richtext/richtextmarginspage.cpp:235
+#: ../src/richtext/richtextmarginspage.cpp:349
+#: ../src/richtext/richtextsizepage.cpp:567
+#: ../src/richtext/richtextsizepage.cpp:574
+#, fuzzy
+msgid "&Top:"
+msgstr "上端 (&T)"
+
+#: ../src/generic/fontdlgg.cpp:444 ../src/common/stockitem.cpp:202
+msgid "&Underline"
+msgstr "下線 (&U)"
+
+#: ../src/richtext/richtextfontpage.cpp:243
+msgid "&Underlining:"
+msgstr "下線 (&U):"
+
+#: ../src/richtext/richtextctrl.cpp:322 ../src/osx/textctrl_osx.cpp:579
+#: ../src/common/stockitem.cpp:203 ../src/common/cmdproc.cpp:271
+#: ../src/msw/textctrl.cpp:2280
+msgid "&Undo"
+msgstr "元に戻す (&U)"
+
+#: ../src/common/cmdproc.cpp:265
+msgid "&Undo "
+msgstr "元に戻す (&U)"
+
+#: ../src/common/stockitem.cpp:204
+msgid "&Unindent"
+msgstr "字下げ解除 (&U)"
+
+#: ../src/common/stockitem.cpp:205
+msgid "&Up"
+msgstr "上 (&U)"
+
+#: ../src/richtext/richtextsizepage.cpp:278
+#, fuzzy
+msgid "&Vertical alignment:"
+msgstr "行頭文字の位置(&A):"
+
+#: ../src/generic/dbgrptg.cpp:340
+msgid "&View..."
+msgstr "見る (&V) ..."
+
+#: ../src/generic/fontdlgg.cpp:393
+msgid "&Weight:"
+msgstr "ウエイト (&W):"
+
+#: ../src/richtext/richtextsizepage.cpp:317
+#: ../src/richtext/richtextsizepage.cpp:324
+#, fuzzy
+msgid "&Width:"
+msgstr "ウエイト (&W):"
+
+#: ../src/aui/tabmdi.cpp:311 ../src/aui/tabmdi.cpp:327
+#: ../src/aui/tabmdi.cpp:329 ../src/generic/mdig.cpp:294
+#: ../src/generic/mdig.cpp:310 ../src/generic/mdig.cpp:314
+#: ../src/msw/mdi.cpp:77
+msgid "&Window"
+msgstr "ウィンドウ (&W)"
+
+#: ../src/common/stockitem.cpp:206 ../src/msw/msgdlg.cpp:476
+msgid "&Yes"
+msgstr "はい (&Y)"
+
+#: ../src/common/config.cpp:523 ../src/msw/regconf.cpp:258
+#, c-format
+msgid "'%s' has extra '..', ignored."
+msgstr "'%s' に余分な '..' がありました。無視します。"
+
+#: ../src/common/valtext.cpp:249 ../src/common/valtext.cpp:251
+#: ../src/common/valtext.cpp:253 ../src/common/valtext.cpp:255
+#, c-format
+msgid "'%s' is invalid"
+msgstr "'%s' は不正です"
+
+#: ../src/common/cmdline.cpp:948 ../src/common/cmdline.cpp:966
+#, c-format
+msgid "'%s' is not a correct numeric value for option '%s'."
+msgstr "'%s' はオプション '%s' に使えない数値です。"
+
+#: ../src/common/translation.cpp:1086
+#, c-format
+msgid "'%s' is not a valid message catalog."
+msgstr "'%s' は正しいメッセージカタログではありません。"
+
+#: ../src/common/textbuf.cpp:239
+#, c-format
+msgid "'%s' is probably a binary buffer."
+msgstr "'%s' はおそらくバイナリーバッファーです。"
+
+#: ../src/common/valtext.cpp:247
+#, c-format
+msgid "'%s' should be numeric."
+msgstr "'%s' は数字でなくてはなりません。"
+
+#: ../src/common/valtext.cpp:239
+#, c-format
+msgid "'%s' should only contain ASCII characters."
+msgstr "'%s' は ASCII 文字以外を受け付けません。"
+
+#: ../src/common/valtext.cpp:241
+#, c-format
+msgid "'%s' should only contain alphabetic characters."
+msgstr "'%s' はアルファベット以外を受け付けません。"
+
+#: ../src/common/valtext.cpp:243
+#, c-format
+msgid "'%s' should only contain alphabetic or numeric characters."
+msgstr "'%s' はアルファベットと数字のみ受け付けます。"
+
+#: ../src/common/valtext.cpp:245
+#, c-format
+msgid "'%s' should only contain digits."
+msgstr "'%s' は数字以外を受け付けません。"
+
+#: ../src/richtext/richtextliststylepage.cpp:229
+#: ../src/richtext/richtextbulletspage.cpp:179
+msgid "(*)"
+msgstr "(*)"
+
+#: ../src/html/helpwnd.cpp:976
+msgid "(Help)"
+msgstr "(ヘルプ)"
+
+#: ../src/richtext/richtextliststylepage.cpp:481
+#: ../src/richtext/richtextbulletspage.cpp:286
+msgid "(None)"
+msgstr "(なし)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:504
+msgid "(Normal text)"
+msgstr "(通常のテキスト)"
+
+#: ../src/html/helpwnd.cpp:426 ../src/html/helpwnd.cpp:1119
+#: ../src/html/helpwnd.cpp:1745
+msgid "(bookmarks)"
+msgstr "(ブックマーク)"
+
+#: ../src/richtext/richtextindentspage.cpp:274
+#: ../src/richtext/richtextindentspage.cpp:286
+#: ../src/richtext/richtextindentspage.cpp:287
+#: ../src/richtext/richtextindentspage.cpp:311
+#: ../src/richtext/richtextindentspage.cpp:326
+#: ../src/richtext/richtextformatdlg.cpp:831
+#: ../src/richtext/richtextfontpage.cpp:331
+#: ../src/richtext/richtextfontpage.cpp:335
+#: ../src/richtext/richtextfontpage.cpp:339
+#: ../src/richtext/richtextliststylepage.cpp:448
+#: ../src/richtext/richtextliststylepage.cpp:460
+#: ../src/richtext/richtextliststylepage.cpp:461
+msgid "(none)"
+msgstr "(なし)"
+
+#: ../src/richtext/richtextliststylepage.cpp:492
+#: ../src/richtext/richtextbulletspage.cpp:297
+msgid "*"
+msgstr "*"
+
+#: ../src/richtext/richtextliststylepage.cpp:236
+#: ../src/richtext/richtextbulletspage.cpp:186
+msgid "*)"
+msgstr "*)"
+
+#: ../src/richtext/richtextliststylepage.cpp:495
+#: ../src/richtext/richtextbulletspage.cpp:300
+msgid "+"
+msgstr "+"
+
+#: ../src/msw/utils.cpp:1324
+msgid ", 64-bit edition"
+msgstr ", 64ビットエディション"
+
+#: ../src/richtext/richtextliststylepage.cpp:493
+#: ../src/richtext/richtextbulletspage.cpp:298
+msgid "-"
+msgstr "-"
+
+#: ../src/generic/filepickerg.cpp:66
+msgid "..."
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:276
+#: ../src/richtext/richtextliststylepage.cpp:450
+msgid "1.1"
+msgstr "1.1"
+
+#: ../src/richtext/richtextindentspage.cpp:277
+#: ../src/richtext/richtextliststylepage.cpp:451
+msgid "1.2"
+msgstr "1.2"
+
+#: ../src/richtext/richtextindentspage.cpp:278
+#: ../src/richtext/richtextliststylepage.cpp:452
+msgid "1.3"
+msgstr "1.3"
+
+#: ../src/richtext/richtextindentspage.cpp:279
+#: ../src/richtext/richtextliststylepage.cpp:453
+msgid "1.4"
+msgstr "1.4"
+
+#: ../src/richtext/richtextindentspage.cpp:280
+#: ../src/richtext/richtextliststylepage.cpp:454
+msgid "1.5"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:455
+msgid "1.6"
+msgstr "1.6"
+
+#: ../src/richtext/richtextindentspage.cpp:282
+#: ../src/richtext/richtextliststylepage.cpp:456
+msgid "1.7"
+msgstr "1.7"
+
+#: ../src/richtext/richtextindentspage.cpp:283
+#: ../src/richtext/richtextliststylepage.cpp:457
+msgid "1.8"
+msgstr "1.8"
+
+#: ../src/richtext/richtextindentspage.cpp:284
+#: ../src/richtext/richtextliststylepage.cpp:458
+msgid "1.9"
+msgstr "1.9"
+
+#: ../src/common/paper.cpp:141
+msgid "10 x 11 in"
+msgstr "10×11インチ"
+
+#: ../src/common/paper.cpp:114
+msgid "10 x 14 in"
+msgstr "10×14インチ"
+
+#: ../src/common/paper.cpp:115
+msgid "11 x 17 in"
+msgstr "11×17インチ"
+
+#: ../src/common/paper.cpp:185
+msgid "12 x 11 in"
+msgstr "12×11インチ"
+
+#: ../src/common/paper.cpp:142
+msgid "15 x 11 in"
+msgstr "15×11インチ"
+
+#: ../src/richtext/richtextindentspage.cpp:285
+#: ../src/richtext/richtextliststylepage.cpp:459
+msgid "2"
+msgstr "2"
+
+#: ../src/common/paper.cpp:133
+msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in"
+msgstr "6 3/4 封筒, 3 5/8 × 6 1/2インチ"
+
+#: ../src/common/paper.cpp:140
+msgid "9 x 11 in"
+msgstr "9×11インチ"
+
+#: ../src/html/htmprint.cpp:431
+msgid ": file does not exist!"
+msgstr ": ファイルがありません。"
+
+#: ../src/common/fontmap.cpp:199
+msgid ": unknown charset"
+msgstr ": 未知の文字集合"
+
+#: ../src/common/fontmap.cpp:413
+msgid ": unknown encoding"
+msgstr ": 未知のエンコーディング"
+
+#: ../src/generic/wizard.cpp:437
+msgid "< &Back"
+msgstr "< 戻る (&B)"
+
+#: ../src/osx/carbon/fontdlg.cpp:608 ../src/osx/carbon/fontdlg.cpp:815
+#: ../src/osx/carbon/fontdlg.cpp:835
+msgid "<Any Decorative>"
+msgstr "<Decorativeのいずれか>"
+
+#: ../src/osx/carbon/fontdlg.cpp:609 ../src/osx/carbon/fontdlg.cpp:817
+#: ../src/osx/carbon/fontdlg.cpp:837
+msgid "<Any Modern>"
+msgstr "<Modernのいずれか>"
+
+#: ../src/osx/carbon/fontdlg.cpp:607 ../src/osx/carbon/fontdlg.cpp:813
+#: ../src/osx/carbon/fontdlg.cpp:833
+msgid "<Any Roman>"
+msgstr "<Romanのいずれか>"
+
+#: ../src/osx/carbon/fontdlg.cpp:610 ../src/osx/carbon/fontdlg.cpp:819
+#: ../src/osx/carbon/fontdlg.cpp:839
+msgid "<Any Script>"
+msgstr "<Scriptのいずれか>"
+
+#: ../src/osx/carbon/fontdlg.cpp:611 ../src/osx/carbon/fontdlg.cpp:824
+#: ../src/osx/carbon/fontdlg.cpp:843
+msgid "<Any Swiss>"
+msgstr "<Swissのいずれか>"
+
+#: ../src/osx/carbon/fontdlg.cpp:612 ../src/osx/carbon/fontdlg.cpp:821
+#: ../src/osx/carbon/fontdlg.cpp:841
+msgid "<Any Teletype>"
+msgstr "<Teletypeのいずれか>"
+
+#: ../src/osx/carbon/fontdlg.cpp:606
+msgid "<Any>"
+msgstr "<いずれか>"
+
+#: ../src/generic/filectrlg.cpp:286 ../src/generic/filectrlg.cpp:309
+msgid "<DIR>"
+msgstr "<ディレクトリー>"
+
+#: ../src/generic/filectrlg.cpp:290 ../src/generic/filectrlg.cpp:313
+msgid "<DRIVE>"
+msgstr "<ドライブ>"
+
+#: ../src/generic/filectrlg.cpp:288 ../src/generic/filectrlg.cpp:311
+msgid "<LINK>"
+msgstr "<リンク>"
+
+#: ../src/html/helpwnd.cpp:1279
+msgid "<b><i>Bold italic face.</i></b><br>"
+msgstr "<b><i>太字でイタリック体。</i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1283
+msgid "<b><i>bold italic <u>underlined</u></i></b><br>"
+msgstr "<b><i>太字でイタリック体 <u>下線</u></i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1278
+msgid "<b>Bold face.</b> "
+msgstr "<b>太字。</b> "
+
+#: ../src/html/helpwnd.cpp:1277
+msgid "<i>Italic face.</i> "
+msgstr "<i>イタリック体。</i> "
+
+#: ../src/richtext/richtextliststylepage.cpp:494
+#: ../src/richtext/richtextbulletspage.cpp:299
+msgid ">"
+msgstr ">"
+
+#: ../src/generic/dbgrptg.cpp:318
+msgid "A debug report has been generated in the directory\n"
+msgstr "デバッグレポートが次のディレクトリーに作成されます\n"
+
+#: ../src/common/debugrpt.cpp:578
+msgid "A debug report has been generated. It can be found in"
+msgstr "デバッグレポートが作成されました。次の場所にあります:"
+
+#: ../src/common/xtixml.cpp:418
+msgid "A non empty collection must consist of 'element' nodes"
+msgstr "空でないコレクションは 'element' ノードを必須とします"
+
+#: ../src/richtext/richtextliststylepage.cpp:304
+#: ../src/richtext/richtextliststylepage.cpp:306
+#: ../src/richtext/richtextbulletspage.cpp:257
+#: ../src/richtext/richtextbulletspage.cpp:259
+msgid "A standard bullet name."
+msgstr "標準の行頭文字名を指定します。"
+
+#: ../src/common/paper.cpp:218
+msgid "A0 sheet, 841 x 1189 mm"
+msgstr "A0 シート, 841 x 1189 mm"
+
+#: ../src/common/paper.cpp:219
+msgid "A1 sheet, 594 x 841 mm"
+msgstr "A1 シート, 594 x 841 mm"
+
+#: ../src/common/paper.cpp:160
+msgid "A2 420 x 594 mm"
+msgstr "A2 420×594 mm"
+
+#: ../src/common/paper.cpp:157
+msgid "A3 Extra 322 x 445 mm"
+msgstr "A3 Extra 322 x 445 mm"
+
+#: ../src/common/paper.cpp:162
+msgid "A3 Extra Transverse 322 x 445 mm"
+msgstr "A3 Extra Transverse 322 x 445 mm"
+
+#: ../src/common/paper.cpp:171
+msgid "A3 Rotated 420 x 297 mm"
+msgstr "A3横置き 420×297mm"
+
+#: ../src/common/paper.cpp:161
+msgid "A3 Transverse 297 x 420 mm"
+msgstr "A3 Transverse 297 x 420 mm"
+
+#: ../src/common/paper.cpp:107
+msgid "A3 sheet, 297 x 420 mm"
+msgstr "A3 シート, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:147
+msgid "A4 Extra 9.27 x 12.69 in"
+msgstr "A4 Extra 9.27 x 12.69インチ"
+
+#: ../src/common/paper.cpp:154
+msgid "A4 Plus 210 x 330 mm"
+msgstr "A4 Plus 210 x 330 mm"
+
+#: ../src/common/paper.cpp:172
+msgid "A4 Rotated 297 x 210 mm"
+msgstr "A4横置き 297×210mm"
+
+#: ../src/common/paper.cpp:149
+msgid "A4 Transverse 210 x 297 mm"
+msgstr "A4 Transverse 210 x 297 mm"
+
+#: ../src/common/paper.cpp:98
+msgid "A4 sheet, 210 x 297 mm"
+msgstr "A4 シート, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:108
+msgid "A4 small sheet, 210 x 297 mm"
+msgstr "A4 small sheet, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:158
+msgid "A5 Extra 174 x 235 mm"
+msgstr "A5 Extra 174 x 235 mm"
+
+#: ../src/common/paper.cpp:173
+msgid "A5 Rotated 210 x 148 mm"
+msgstr "A5横置き 210×148mm"
+
+#: ../src/common/paper.cpp:155
+msgid "A5 Transverse 148 x 210 mm"
+msgstr "A5 Transverse 148 x 210 mm"
+
+#: ../src/common/paper.cpp:109
+msgid "A5 sheet, 148 x 210 mm"
+msgstr "A5 シート, 148 x 210 mm"
+
+#: ../src/common/paper.cpp:165
+msgid "A6 105 x 148 mm"
+msgstr "A6 105×148mm"
+
+#: ../src/common/paper.cpp:178
+msgid "A6 Rotated 148 x 105 mm"
+msgstr "A6横置き 148×105mm"
+
+#: ../src/generic/fontdlgg.cpp:83 ../src/richtext/richtextformatdlg.cpp:526
+#: ../src/osx/carbon/fontdlg.cpp:339
+msgid "ABCDEFGabcdefg12345"
+msgstr "ABCDEFGabcdefg12345"
+
+#: ../src/common/accelcmn.cpp:76
+msgid "ADD"
+msgstr "ADD"
+
+#: ../src/richtext/richtextsymboldlg.cpp:458 ../src/common/ftp.cpp:405
+msgid "ASCII"
+msgstr "ASCII"
+
+#: ../src/osx/menu_osx.cpp:630 ../src/common/stockitem.cpp:139
+#, fuzzy
+msgid "About"
+msgstr "詳細 (&A)"
+
+#: ../src/generic/aboutdlgg.cpp:140 ../src/msw/aboutdlg.cpp:64
+#, c-format
+msgid "About %s"
+msgstr "%s について"
+
+#: ../src/richtext/richtextsizepage.cpp:520
+msgid "Absolute"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:207
+#, fuzzy
+msgid "Actual Size"
+msgstr "原寸 (&A)"
+
+#: ../src/common/stockitem.cpp:140
+msgid "Add"
+msgstr "追加"
+
+#: ../src/richtext/richtextbuffer.cpp:10751
+msgid "Add Column"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:10688
+msgid "Add Row"
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:439
+msgid "Add current page to bookmarks"
+msgstr "現在のページをブックマークに追加します"
+
+#: ../src/generic/colrdlgg.cpp:283
+msgid "Add to custom colours"
+msgstr "カスタムカラーへ追加します"
+
+#: ../include/wx/xtiprop.h:259
+msgid "AddToPropertyCollection called on a generic accessor"
+msgstr "非特殊化アクセサーの AddToPropertyCollection が呼び出されました"
+
+#: ../include/wx/xtiprop.h:197
+msgid "AddToPropertyCollection called w/o valid adder"
+msgstr "不適切な adder から AddToPropertyCollection が呼び出されました"
+
+#: ../src/html/helpctrl.cpp:159
+#, c-format
+msgid "Adding book %s"
+msgstr "ブック %s を追加しています"
+
+#: ../src/osx/carbon/dataview.cpp:1933
+msgid "Adding flavor TEXT failed"
+msgstr "フレーバー TEXT を追加できませんでした"
+
+#: ../src/osx/carbon/dataview.cpp:1954
+msgid "Adding flavor utxt failed"
+msgstr "フレーバー utxt を追加できませんでした"
+
+#: ../src/common/preferencescmn.cpp:41
+msgid "Advanced"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:435
+msgid "After a paragraph:"
+msgstr "段落の後:"
+
+#: ../src/common/stockitem.cpp:172
+msgid "Align Left"
+msgstr "左寄せ"
+
+#: ../src/common/stockitem.cpp:173
+msgid "Align Right"
+msgstr "右寄せ"
+
+#: ../src/richtext/richtextsizepage.cpp:266
+#, fuzzy
+msgid "Alignment"
+msgstr "整列 (&A)"
+
+#: ../src/generic/prntdlgg.cpp:215
+msgid "All"
+msgstr "すべて"
+
+#: ../src/generic/filectrlg.cpp:1205 ../src/common/fldlgcmn.cpp:89
+#, c-format
+msgid "All files (%s)|%s"
+msgstr "すべてのファイル (%s)|%s"
+
+#: ../include/wx/defs.h:2922
+msgid "All files (*)|*"
+msgstr "すべてのファイル (*)|*"
+
+#: ../include/wx/defs.h:2919
+msgid "All files (*.*)|*.*"
+msgstr "すべてのファイル (*.*)|*.*"
+
+#: ../src/richtext/richtextstyles.cpp:1057
+msgid "All styles"
+msgstr "すべてのスタイル"
+
+#: ../src/propgrid/manager.cpp:1496
+msgid "Alphabetic Mode"
+msgstr "名前順"
+
+#: ../src/common/xtistrm.cpp:429
+msgid "Already Registered Object passed to SetObjectClassInfo"
+msgstr "登録済みのオブジェクトが SetObjectClassInfo に渡されました"
+
+#: ../src/unix/dialup.cpp:353
+msgid "Already dialling ISP."
+msgstr "すでに ISP にダイヤル中です。"
+
+#: ../src/common/accelcmn.cpp:320 ../src/univ/themes/win32.cpp:3756
+msgid "Alt+"
+msgstr "Alt+"
+
+#: ../src/common/debugrpt.cpp:581
+msgid "And includes the following files:\n"
+msgstr "次のファイルが含まれています:\n"
+
+#: ../src/generic/animateg.cpp:162
+#, c-format
+msgid "Animation file is not of type %ld."
+msgstr "アニメーションファイルが %ld 型ではありません。"
+
+#: ../src/generic/logg.cpp:1034
+#, c-format
+msgid "Append log to file '%s' (choosing [No] will overwrite it)?"
+msgstr ""
+"ログをファイル '%s' に追加しますか? [いいえ]を選択すると再作成で上書きしま"
+"す。"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:610
+#: ../src/osx/menu_osx.cpp:649 ../src/osx/menu_osx.cpp:657
+#, fuzzy
+msgid "Application"
+msgstr "選択"
+
+#: ../src/common/stockitem.cpp:141
+#, fuzzy
+msgid "Apply"
+msgstr "適用 (&A)"
+
+#: ../src/richtext/richtextliststylepage.cpp:482
+#: ../src/richtext/richtextbulletspage.cpp:287
+msgid "Arabic"
+msgstr "算用数字"
+
+#: ../src/common/fmapbase.cpp:153
+msgid "Arabic (ISO-8859-6)"
+msgstr "アラビア語 (ISO-8859-6)"
+
+#: ../src/msw/ole/automtn.cpp:661
+#, fuzzy, c-format
+msgid "Argument %u not found."
+msgstr "列の索引が見つかりません。"
+
+#: ../src/generic/aboutdlgg.cpp:184
+msgid "Artists"
+msgstr "デザイン"
+
+#: ../src/common/stockitem.cpp:195
+#, fuzzy
+msgid "Ascending"
+msgstr "昇順 (&A)"
+
+#: ../src/generic/filectrlg.cpp:468
+msgid "Attributes"
+msgstr "属性"
+
+#: ../src/richtext/richtextliststylepage.cpp:294
+#: ../src/richtext/richtextbulletspage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:247
+msgid "Available fonts."
+msgstr "有効なフォントです。"
+
+#: ../src/common/paper.cpp:138
+msgid "B4 (ISO) 250 x 353 mm"
+msgstr "B4 (ISO) 250 x 353 mm"
+
+#: ../src/common/paper.cpp:174
+msgid "B4 (JIS) Rotated 364 x 257 mm"
+msgstr "B4 (JIS) 横置き 364×257mm"
+
+#: ../src/common/paper.cpp:128
+msgid "B4 Envelope, 250 x 353 mm"
+msgstr "B4 封筒, 250 x 353 mm"
+
+#: ../src/common/paper.cpp:110
+msgid "B4 sheet, 250 x 354 mm"
+msgstr "B4 シート, 250 x 354 mm"
+
+#: ../src/common/paper.cpp:159
+msgid "B5 (ISO) Extra 201 x 276 mm"
+msgstr "B5 (ISO) Extra 201 x 276 mm"
+
+#: ../src/common/paper.cpp:175
+msgid "B5 (JIS) Rotated 257 x 182 mm"
+msgstr "B5 (JIS) 横置き 257×182mm"
+
+#: ../src/common/paper.cpp:156
+msgid "B5 (JIS) Transverse 182 x 257 mm"
+msgstr "B5 (JIS) Transverse 182 x 257 mm"
+
+#: ../src/common/paper.cpp:129
+msgid "B5 Envelope, 176 x 250 mm"
+msgstr "B5 封筒, 176 x 250 mm"
+
+#: ../src/common/paper.cpp:111
+msgid "B5 sheet, 182 x 257 millimeter"
+msgstr "B5 シート, 182 x 257 mm"
+
+#: ../src/common/paper.cpp:183
+msgid "B6 (JIS) 128 x 182 mm"
+msgstr "B6 (JIS) 128×182 mm"
+
+#: ../src/common/paper.cpp:184
+msgid "B6 (JIS) Rotated 182 x 128 mm"
+msgstr "B6 (JIS) 横置き 182×128mm"
+
+#: ../src/common/paper.cpp:130
+msgid "B6 Envelope, 176 x 125 mm"
+msgstr "B6 封筒, 176 x 125 mm"
+
+#: ../src/common/accelcmn.cpp:49
+msgid "BACK"
+msgstr "BS"
+
+#: ../src/common/imagbmp.cpp:523 ../src/common/imagbmp.cpp:553
+#: ../src/common/imagbmp.cpp:568
+msgid "BMP: Couldn't allocate memory."
+msgstr "BMP: メモリ割り当てに失敗しました。"
+
+#: ../src/common/imagbmp.cpp:97
+msgid "BMP: Couldn't save invalid image."
+msgstr "BMP: 不正な画像で保存できませんでした。"
+
+#: ../src/common/imagbmp.cpp:338
+msgid "BMP: Couldn't write RGB color map."
+msgstr "BMP: RGB色索引を書き出せませんでした。"
+
+#: ../src/common/imagbmp.cpp:473
+msgid "BMP: Couldn't write data."
+msgstr "BMP: データ書き出しに失敗しました。"
+
+#: ../src/common/imagbmp.cpp:239
+msgid "BMP: Couldn't write the file (Bitmap) header."
+msgstr "BMP: Bitmapヘッダの書き出しに失敗しました。"
+
+#: ../src/common/imagbmp.cpp:262
+msgid "BMP: Couldn't write the file (BitmapInfo) header."
+msgstr "BMP: BitmapInfoヘッダの書き出しに失敗しました。"
+
+#: ../src/common/imagbmp.cpp:133
+msgid "BMP: wxImage doesn't have own wxPalette."
+msgstr "BMP: wxImage は自身の wxPalette を保有していません。"
+
+#: ../src/common/stockitem.cpp:142
+#, fuzzy
+msgid "Back"
+msgstr "戻る (&B)"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:119
+#: ../src/richtext/richtextformatdlg.cpp:374
+#, fuzzy
+msgid "Background"
+msgstr "背景色"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:131
+#, fuzzy
+msgid "Background &colour:"
+msgstr "背景色"
+
+#: ../src/osx/carbon/fontdlg.cpp:406
+msgid "Background colour"
+msgstr "背景色"
+
+#: ../src/common/fmapbase.cpp:160
+msgid "Baltic (ISO-8859-13)"
+msgstr "バルト言語 (ISO-8859-13)"
+
+#: ../src/common/fmapbase.cpp:151
+msgid "Baltic (old) (ISO-8859-4)"
+msgstr "バルト言語(旧規格) (ISO-8859-4)"
+
+#: ../src/richtext/richtextliststylepage.cpp:426
+msgid "Before a paragraph:"
+msgstr "段落の前:"
+
+#: ../src/richtext/richtextliststylepage.cpp:489
+#: ../src/richtext/richtextbulletspage.cpp:294
+msgid "Bitmap"
+msgstr "ビットマップ"
+
+#: ../src/osx/carbon/dataview.cpp:2396
+msgid "Bitmap renderer cannot render value; value type: "
+msgstr "ビットマップレンダラーが値をレンダリングできません; 値の型:"
+
+#: ../src/generic/fontdlgg.cpp:333 ../src/richtext/richtextfontpage.cpp:337
+#: ../src/osx/carbon/fontdlg.cpp:540 ../src/common/stockitem.cpp:143
+msgid "Bold"
+msgstr "太字"
+
+#: ../src/richtext/richtextborderspage.cpp:256
+#: ../src/richtext/richtextborderspage.cpp:389
+#, fuzzy
+msgid "Border"
+msgstr "Modern"
+
+#: ../src/richtext/richtextformatdlg.cpp:368
+#, fuzzy
+msgid "Borders"
+msgstr "Modern"
+
+#: ../src/richtext/richtextsizepage.cpp:288 ../src/common/stockitem.cpp:144
+#, fuzzy
+msgid "Bottom"
+msgstr "下端 (&B)"
+
+#: ../src/generic/prntdlgg.cpp:893
+msgid "Bottom margin (mm):"
+msgstr "余白-地 (mm):"
+
+#: ../src/richtext/richtextbuffer.cpp:8919
+#, fuzzy
+msgid "Box Properties"
+msgstr "プロパティー (&P)"
+
+#: ../src/richtext/richtextstyles.cpp:1061
+#, fuzzy
+msgid "Box styles"
+msgstr "すべてのスタイル"
+
+#: ../src/common/filepickercmn.cpp:43 ../src/common/filepickercmn.cpp:44
+msgid "Browse"
+msgstr "ファイルの選択"
+
+#: ../src/richtext/richtextliststylepage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:195
+msgid "Bullet &Alignment:"
+msgstr "行頭文字の位置(&A):"
+
+#: ../src/richtext/richtextliststylepage.cpp:309
+msgid "Bullet style"
+msgstr "行頭文字のスタイル"
+
+#: ../src/richtext/richtextformatdlg.cpp:342
+msgid "Bullets"
+msgstr "行頭文字"
+
+#: ../src/common/paper.cpp:99
+msgid "C sheet, 17 x 22 in"
+msgstr "Cサイズシート, 17 x 22インチ"
+
+#: ../src/generic/logg.cpp:520
+msgid "C&lear"
+msgstr "消去 (&L)"
+
+#: ../src/generic/fontdlgg.cpp:406
+msgid "C&olour:"
+msgstr "色 (&C):"
+
+#: ../src/common/paper.cpp:124
+msgid "C3 Envelope, 324 x 458 mm"
+msgstr "C3 封筒, 324×458mm"
+
+#: ../src/common/paper.cpp:125
+msgid "C4 Envelope, 229 x 324 mm"
+msgstr "C4 封筒, 229×324mm"
+
+#: ../src/common/paper.cpp:123
+msgid "C5 Envelope, 162 x 229 mm"
+msgstr "C5 封筒, 162×229mm"
+
+#: ../src/common/paper.cpp:126
+msgid "C6 Envelope, 114 x 162 mm"
+msgstr "消去 (&L)"
+
+#: ../src/common/paper.cpp:127
+msgid "C65 Envelope, 114 x 229 mm"
+msgstr "C65 封筒, 114×229mm"
+
+#: ../src/common/accelcmn.cpp:66
+msgid "CANCEL"
+msgstr "CANCEL"
+
+#: ../src/common/accelcmn.cpp:70
+msgid "CAPITAL"
+msgstr "CapsLock"
+
+#: ../src/common/stockitem.cpp:146
+#, fuzzy
+msgid "CD-Rom"
+msgstr "CD-ROM (&C)"
+
+#: ../src/html/chm.cpp:815 ../src/html/chm.cpp:874
+msgid "CHM handler currently supports only local files!"
+msgstr "CHM ハンドラーは現在ローカルファイルのみに対応しています。"
+
+#: ../src/common/accelcmn.cpp:67
+msgid "CLEAR"
+msgstr "CLEAR"
+
+#: ../src/common/accelcmn.cpp:111
+msgid "COMMAND"
+msgstr "COMMAND"
+
+#: ../src/richtext/richtextfontpage.cpp:291
+msgid "Ca&pitals"
+msgstr "大文字化 (&P)"
+
+#: ../src/common/cmdproc.cpp:267
+msgid "Can't &Undo "
+msgstr "戻せません (&U)"
+
+#: ../src/common/image.cpp:2686
+msgid "Can't automatically determine the image format for non-seekable input."
+msgstr ""
+
+#: ../src/msw/registry.cpp:505
+#, c-format
+msgid "Can't close registry key '%s'"
+msgstr "レジストリーキー '%s' を閉じることができません"
+
+#: ../src/msw/registry.cpp:583
+#, c-format
+msgid "Can't copy values of unsupported type %d."
+msgstr "未対応型 %d の値はコピーできません"
+
+#: ../src/msw/registry.cpp:486
+#, c-format
+msgid "Can't create registry key '%s'"
+msgstr "レジストリーキー '%s' を作成できません"
+
+#: ../src/msw/thread.cpp:696 ../src/os2/thread.cpp:494
+msgid "Can't create thread"
+msgstr "スレッドを作成できません"
+
+#: ../src/msw/window.cpp:3793
+#, c-format
+msgid "Can't create window of class %s"
+msgstr "%s クラスのウィンドウを作成できません"
+
+#: ../src/msw/registry.cpp:776
+#, c-format
+msgid "Can't delete key '%s'"
+msgstr "キー '%s' を削除できません"
+
+#: ../src/msw/iniconf.cpp:458 ../src/os2/iniconf.cpp:471
+#, c-format
+msgid "Can't delete the INI file '%s'"
+msgstr "INIファイル '%s' を削除できません"
+
+#: ../src/msw/registry.cpp:804
+#, c-format
+msgid "Can't delete value '%s' from key '%s'"
+msgstr "値 '%s' をキー '%s' から削除できません"
+
+#: ../src/msw/registry.cpp:1161
+#, c-format
+msgid "Can't enumerate subkeys of key '%s'"
+msgstr "キー '%s' のサブキーを列挙できません"
+
+#: ../src/msw/registry.cpp:1116
+#, c-format
+msgid "Can't enumerate values of key '%s'"
+msgstr "キー '%s' の値を列挙できません"
+
+#: ../src/msw/registry.cpp:1379
+#, c-format
+msgid "Can't export value of unsupported type %d."
+msgstr "未対応型 %d の値はエクスポートできません。"
+
+#: ../src/common/ffile.cpp:236
+#, c-format
+msgid "Can't find current position in file '%s'"
+msgstr "ファイル '%s' の現在位置を見つけられません"
+
+#: ../src/msw/registry.cpp:416
+#, c-format
+msgid "Can't get info about registry key '%s'"
+msgstr "レジストリーキー '%s' の情報を取得できません"
+
+#: ../src/common/zstream.cpp:346
+msgid "Can't initialize zlib deflate stream."
+msgstr "zlib の deflate ストリームを初期化できません。"
+
+#: ../src/common/zstream.cpp:185
+msgid "Can't initialize zlib inflate stream."
+msgstr "zlib の inflate ストリームを初期化できません。"
+
+#: ../src/msw/fswatcher.cpp:432
+#, fuzzy, c-format
+msgid "Can't monitor non-existent directory \"%s\" for changes."
+msgstr "監視対象のディレクトリー \"%s\" を開くことができませんでした。"
+
+#: ../src/msw/registry.cpp:452
+#, c-format
+msgid "Can't open registry key '%s'"
+msgstr "レジストリーキー '%s' を開くことができません"
+
+#: ../src/common/zstream.cpp:252
+#, c-format
+msgid "Can't read from inflate stream: %s"
+msgstr "inflateストリームから読み取ることができません: %s"
+
+#: ../src/common/zstream.cpp:244
+msgid "Can't read inflate stream: unexpected EOF in underlying stream."
+msgstr ""
+"inflate ストリームを読み取ることができません: 想定外の条件でEOFが元のストリー"
+"ムから検出されました。"
+
+#: ../src/msw/registry.cpp:1048
+#, c-format
+msgid "Can't read value of '%s'"
+msgstr "'%s' の値を読み取ることができません"
+
+#: ../src/msw/registry.cpp:877 ../src/msw/registry.cpp:909
+#: ../src/msw/registry.cpp:971
+#, c-format
+msgid "Can't read value of key '%s'"
+msgstr "キー '%s' の値を読み取ることができません"
+
+#: ../src/common/image.cpp:2483
+#, c-format
+msgid "Can't save image to file '%s': unknown extension."
+msgstr "画像を保存できません。'%s' は未対応の拡張子を持っています。"
+
+#: ../src/generic/logg.cpp:579 ../src/generic/logg.cpp:996
+msgid "Can't save log contents to file."
+msgstr "ログの内容をファイルに保存できませんでした。"
+
+#: ../src/msw/thread.cpp:652 ../src/os2/thread.cpp:477
+msgid "Can't set thread priority"
+msgstr "スレッド優先度を設定できません"
+
+#: ../src/msw/registry.cpp:895 ../src/msw/registry.cpp:939
+#: ../src/msw/registry.cpp:1065
+#, c-format
+msgid "Can't set value of '%s'"
+msgstr "'%s' の値を設定できません"
+
+#: ../src/unix/utilsunx.cpp:357
+#, fuzzy
+msgid "Can't write to child process's stdin"
+msgstr "プロセス %d の kill に失敗しました"
+
+#: ../src/common/zstream.cpp:427
+#, c-format
+msgid "Can't write to deflate stream: %s"
+msgstr "deflateストリームに書き出すことができません: %s"
+
+#: ../include/wx/msgdlg.h:274 ../src/generic/dirdlgg.cpp:107
+#: ../src/richtext/richtextstyledlg.cpp:300 ../src/common/stockitem.cpp:145
+#: ../src/msw/msgdlg.cpp:489 ../src/msw/progdlg.cpp:673
+#: ../src/gtk1/fontdlg.cpp:144 ../src/motif/msgdlg.cpp:196
+msgid "Cancel"
+msgstr "キャンセル"
+
+#: ../src/os2/thread.cpp:116
+msgid "Cannot create mutex."
+msgstr "Mutex を作成できません。"
+
+#: ../src/osx/carbon/dataview.cpp:895
+msgid "Cannot create new column's ID. Probably max. number of columns reached."
+msgstr ""
+"新しい列への識別子を作成できません。作成数が上限に達した可能性があります。"
+
+#: ../src/common/filefn.cpp:1336
+#, c-format
+msgid "Cannot enumerate files '%s'"
+msgstr "ファイルを列挙できません '%s'"
+
+#: ../src/msw/dir.cpp:264
+#, c-format
+msgid "Cannot enumerate files in directory '%s'"
+msgstr "ディレクトリー '%s' のファイルは列挙できません"
+
+#: ../src/msw/dialup.cpp:542
+#, c-format
+msgid "Cannot find active dialup connection: %s"
+msgstr "使用中のダイヤルアップ接続が見つかりません: %s"
+
+#: ../src/msw/dialup.cpp:848
+msgid "Cannot find the location of address book file"
+msgstr "住所録の位置を特定できません"
+
+#: ../src/msw/ole/automtn.cpp:562
+#, fuzzy, c-format
+msgid "Cannot get an active instance of \"%s\""
+msgstr "使用中のダイヤルアップ接続が見つかりません: %s"
+
+#: ../src/unix/threadpsx.cpp:1030
+#, c-format
+msgid "Cannot get priority range for scheduling policy %d."
+msgstr "スケジューリングポリシー %d への優先度範囲を取得できません。"
+
+#: ../src/unix/utilsunx.cpp:988
+msgid "Cannot get the hostname"
+msgstr "ホスト名を取得できません"
+
+#: ../src/unix/utilsunx.cpp:1024
+msgid "Cannot get the official hostname"
+msgstr "公的なホスト名を取得できません"
+
+#: ../src/msw/dialup.cpp:949
+msgid "Cannot hang up - no active dialup connection."
+msgstr "接続を切るよう指示されましたが、有効なダイヤルアップ接続がありません。"
+
+#: ../include/wx/msw/ole/oleutils.h:52
+msgid "Cannot initialize OLE"
+msgstr "OLEを初期化できません"
+
+#: ../src/common/socket.cpp:847
+msgid "Cannot initialize sockets"
+msgstr "socket を初期化できません"
+
+#: ../src/msw/volume.cpp:620
+#, c-format
+msgid "Cannot load icon from '%s'."
+msgstr "'%s' からアイコンを読み取れません。"
+
+#: ../src/xrc/xmlres.cpp:361
+#, c-format
+msgid "Cannot load resources from '%s'."
+msgstr "ファイル '%s' からリソースを読み取れません。"
+
+#: ../src/xrc/xmlres.cpp:746
+#, c-format
+msgid "Cannot load resources from file '%s'."
+msgstr "ファイル '%s' からリソースを読み取れません。"
+
+#: ../src/html/htmlfilt.cpp:137
+#, c-format
+msgid "Cannot open HTML document: %s"
+msgstr "HTML文書を開くことができません: %s"
+
+#: ../src/html/helpdata.cpp:665
+#, c-format
+msgid "Cannot open HTML help book: %s"
+msgstr "HTMLヘルプブックを開くことができません: %s"
+
+#: ../src/html/helpdata.cpp:297
+#, c-format
+msgid "Cannot open contents file: %s"
+msgstr "目次ファイルを開くことができません: %s"
+
+#: ../src/generic/dcpsg.cpp:1751
+msgid "Cannot open file for PostScript printing!"
+msgstr "PostScript 印刷のためのファイルを開くことができません。"
+
+#: ../src/html/helpdata.cpp:311
+#, c-format
+msgid "Cannot open index file: %s"
+msgstr "索引ファイルを開くことができません: %s"
+
+#: ../src/xrc/xmlres.cpp:728
+#, fuzzy, c-format
+msgid "Cannot open resources file '%s'."
+msgstr "ファイル '%s' からリソースを読み取れません。"
+
+#: ../src/html/helpwnd.cpp:1537
+msgid "Cannot print empty page."
+msgstr "空のページは印刷できません。"
+
+#: ../src/msw/volume.cpp:507
+#, c-format
+msgid "Cannot read typename from '%s'!"
+msgstr "'%s' の型名を読み出すことができません。"
+
+#: ../src/os2/thread.cpp:527
+#, c-format
+msgid "Cannot resume thread %lu"
+msgstr "スレッド %lu のリジュームができません"
+
+#: ../src/msw/thread.cpp:923
+#, fuzzy, c-format
+msgid "Cannot resume thread %lx"
+msgstr "スレッド %x のリジュームができません"
+
+#: ../src/unix/threadpsx.cpp:1011
+msgid "Cannot retrieve thread scheduling policy."
+msgstr "スレッドスケジュールポリシーを取得できません。"
+
+#: ../src/common/intl.cpp:542
+#, c-format
+msgid "Cannot set locale to language \"%s\"."
+msgstr "ロケールを言語 \"%s\" に設定できません。"
+
+#: ../src/unix/threadpsx.cpp:831 ../src/msw/thread.cpp:569
+msgid "Cannot start thread: error writing TLS."
+msgstr "スレッドを開始できませんでした: TLS への書き込みに失敗しています。"
+
+#: ../src/os2/thread.cpp:513
+#, c-format
+msgid "Cannot suspend thread %lu"
+msgstr "スレッド %lu のサスペンドができません"
+
+#: ../src/msw/thread.cpp:907
+#, fuzzy, c-format
+msgid "Cannot suspend thread %lx"
+msgstr "スレッド %x のサスペンドができません"
+
+#: ../src/msw/thread.cpp:830
+msgid "Cannot wait for thread termination"
+msgstr "スレッドの終了を待つことはできません"
+
+#: ../src/html/helpwnd.cpp:546
+msgid "Case sensitive"
+msgstr "大文字小文字を区別"
+
+#: ../src/propgrid/manager.cpp:1495
+msgid "Categorized Mode"
+msgstr "種類順"
+
+#: ../src/richtext/richtextbuffer.cpp:9347
+#, fuzzy
+msgid "Cell Properties"
+msgstr "プロパティー (&P)"
+
+#: ../src/common/fmapbase.cpp:161
+msgid "Celtic (ISO-8859-14)"
+msgstr "ケルト語 (ISO-8859-14)"
+
+#: ../src/richtext/richtextindentspage.cpp:160
+#: ../src/richtext/richtextliststylepage.cpp:349
+msgid "Cen&tred"
+msgstr "中央寄せ (&T)"
+
+#: ../src/common/stockitem.cpp:170
+msgid "Centered"
+msgstr "中央寄せ"
+
+#: ../src/common/fmapbase.cpp:149
+msgid "Central European (ISO-8859-2)"
+msgstr "中央ヨーロッパ (ISO-8859-2)"
+
+#: ../src/richtext/richtextliststylepage.cpp:250
+#: ../src/richtext/richtextbulletspage.cpp:200
+msgid "Centre"
+msgstr "中央寄せ"
+
+#: ../src/richtext/richtextindentspage.cpp:162
+#: ../src/richtext/richtextindentspage.cpp:164
+#: ../src/richtext/richtextliststylepage.cpp:351
+#: ../src/richtext/richtextliststylepage.cpp:353
+msgid "Centre text."
+msgstr "テキストを中央寄せにします。"
+
+#: ../src/richtext/richtextsizepage.cpp:287
+#, fuzzy
+msgid "Centred"
+msgstr "中央寄せ (&T)"
+
+#: ../src/richtext/richtextliststylepage.cpp:280
+#: ../src/richtext/richtextbulletspage.cpp:232
+msgid "Ch&oose..."
+msgstr "選択 (&O)..."
+
+#: ../src/richtext/richtextbuffer.cpp:4041
+msgid "Change List Style"
+msgstr "リストスタイルを変更します"
+
+#: ../src/richtext/richtextbuffer.cpp:3392
+#, fuzzy
+msgid "Change Object Style"
+msgstr "リストスタイルを変更します"
+
+#: ../src/richtext/richtextbuffer.cpp:3658
+#: ../src/richtext/richtextbuffer.cpp:7749
+#, fuzzy
+msgid "Change Properties"
+msgstr "プロパティー (&P)"
+
+#: ../src/richtext/richtextbuffer.cpp:3209
+msgid "Change Style"
+msgstr "スタイルの変更"
+
+#: ../src/common/fileconf.cpp:372
+#, c-format
+msgid "Changes won't be saved to avoid overwriting the existing file \"%s\""
+msgstr "ファイル \"%s\" への上書きが拒否されたため変更内容は保存されていません"
+
+#: ../src/richtext/richtextstyles.cpp:1059
+msgid "Character styles"
+msgstr "文字のスタイル"
+
+#: ../src/richtext/richtextliststylepage.cpp:224
+#: ../src/richtext/richtextliststylepage.cpp:226
+#: ../src/richtext/richtextbulletspage.cpp:174
+#: ../src/richtext/richtextbulletspage.cpp:176
+msgid "Check to add a period after the bullet."
+msgstr "行頭文字の後にピリオドを付ける場合にチェックしてください。"
+
+#: ../src/richtext/richtextliststylepage.cpp:238
+#: ../src/richtext/richtextliststylepage.cpp:240
+#: ../src/richtext/richtextbulletspage.cpp:188
+#: ../src/richtext/richtextbulletspage.cpp:190
+msgid "Check to add a right parenthesis."
+msgstr "右丸括弧を加える場合はチェックしてください。"
+
+#: ../src/richtext/richtextliststylepage.cpp:231
+#: ../src/richtext/richtextliststylepage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:181
+#: ../src/richtext/richtextbulletspage.cpp:183
+msgid "Check to enclose the bullet in parentheses."
+msgstr "行頭文字を丸括弧でくくる場合にチェックしてください。"
+
+#: ../src/osx/carbon/fontdlg.cpp:542 ../src/osx/carbon/fontdlg.cpp:544
+msgid "Check to make the font bold."
+msgstr "フォントを太字にするときにチェックしてください。"
+
+#: ../src/osx/carbon/fontdlg.cpp:549 ../src/osx/carbon/fontdlg.cpp:551
+msgid "Check to make the font italic."
+msgstr "フォントをイタリックにするときにチェックしてください。"
+
+#: ../src/osx/carbon/fontdlg.cpp:558 ../src/osx/carbon/fontdlg.cpp:560
+msgid "Check to make the font underlined."
+msgstr "フォントに下線を付けるときにチェックしてください。"
+
+#: ../src/richtext/richtextstyledlg.cpp:289
+#: ../src/richtext/richtextstyledlg.cpp:291
+msgid "Check to restart numbering."
+msgstr "連番の初期化を指示する場合にチェックしてください。"
+
+#: ../src/richtext/richtextfontpage.cpp:286
+#: ../src/richtext/richtextfontpage.cpp:288
+msgid "Check to show a line through the text."
+msgstr "テキストを貫く打ち消し線を表示する場合にチェックしてください。"
+
+#: ../src/richtext/richtextfontpage.cpp:293
+#: ../src/richtext/richtextfontpage.cpp:295
+msgid "Check to show the text in capitals."
+msgstr "テキストを大文字にする場合にチェックしてください。"
+
+#: ../src/richtext/richtextfontpage.cpp:300
+#: ../src/richtext/richtextfontpage.cpp:302
+#, fuzzy
+msgid "Check to show the text in small capitals."
+msgstr "テキストを大文字にする場合にチェックしてください。"
+
+#: ../src/richtext/richtextfontpage.cpp:314
+#: ../src/richtext/richtextfontpage.cpp:316
+msgid "Check to show the text in subscript."
+msgstr "テキストを下付き文字にする場合にチェックしてください。"
+
+#: ../src/richtext/richtextfontpage.cpp:307
+#: ../src/richtext/richtextfontpage.cpp:309
+msgid "Check to show the text in superscript."
+msgstr "テキストを上付き文字にする場合にチェックしてください。"
+
+#: ../src/msw/dialup.cpp:784
+msgid "Choose ISP to dial"
+msgstr "ダイヤル先のISPを選んでください"
+
+#: ../src/propgrid/props.cpp:1643
+msgid "Choose a directory:"
+msgstr "ディレクトリーを選んでください:"
+
+#: ../src/propgrid/props.cpp:1702
+msgid "Choose a file"
+msgstr "フォントを選んでください"
+
+#: ../src/generic/colrdlgg.cpp:144 ../src/gtk/colordlg.cpp:63
+msgid "Choose colour"
+msgstr "色を選んでください"
+
+#: ../src/generic/fontpickerg.cpp:50 ../src/gtk/fontdlg.cpp:75
+#: ../src/gtk1/fontdlg.cpp:125
+msgid "Choose font"
+msgstr "フォントを選んでください"
+
+#: ../src/common/module.cpp:74
+#, c-format
+msgid "Circular dependency involving module \"%s\" detected."
+msgstr "モジュール \"%s\" の解決を試みているときに循環参照を検出しました。"
+
+#: ../src/aui/tabmdi.cpp:108 ../src/generic/mdig.cpp:97
+msgid "Cl&ose"
+msgstr "閉じる(&O)"
+
+#: ../src/msw/ole/automtn.cpp:673
+#, fuzzy
+msgid "Class not registered."
+msgstr "スレッドを作成できません"
+
+#: ../src/common/stockitem.cpp:147
+#, fuzzy
+msgid "Clear"
+msgstr "消去 (&C)"
+
+#: ../src/generic/logg.cpp:520
+msgid "Clear the log contents"
+msgstr "ログの内容を消去します"
+
+#: ../src/richtext/richtextstyledlg.cpp:252
+#: ../src/richtext/richtextstyledlg.cpp:254
+msgid "Click to apply the selected style."
+msgstr "クリックで選択したスタイルを適用します。"
+
+#: ../src/richtext/richtextliststylepage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:283
+#: ../src/richtext/richtextbulletspage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:235
+msgid "Click to browse for a symbol."
+msgstr "クリックで記号を一覧できます。"
+
+#: ../src/osx/carbon/fontdlg.cpp:589 ../src/osx/carbon/fontdlg.cpp:591
+msgid "Click to cancel changes to the font."
+msgstr "クリックでフォントの変更をキャンセルします。"
+
+#: ../src/generic/fontdlgg.cpp:472 ../src/generic/fontdlgg.cpp:491
+msgid "Click to cancel the font selection."
+msgstr "クリックでフォントの選択をキャンセルします。"
+
+#: ../src/osx/carbon/fontdlg.cpp:570 ../src/osx/carbon/fontdlg.cpp:572
+msgid "Click to change the font colour."
+msgstr "クリックでフォントの色を変更します。"
+
+#: ../src/richtext/richtextfontpage.cpp:276
+#: ../src/richtext/richtextfontpage.cpp:278
+msgid "Click to change the text background colour."
+msgstr "クリックで背景色を変更します。"
+
+#: ../src/richtext/richtextfontpage.cpp:263
+#: ../src/richtext/richtextfontpage.cpp:265
+msgid "Click to change the text colour."
+msgstr "クリックで文字色を変更します。"
+
+#: ../src/richtext/richtextliststylepage.cpp:195
+#: ../src/richtext/richtextliststylepage.cpp:197
+msgid "Click to choose the font for this level."
+msgstr "クリックでこのレベルのフォントを選択します。"
+
+#: ../src/richtext/richtextstyledlg.cpp:279
+#: ../src/richtext/richtextstyledlg.cpp:281
+msgid "Click to close this window."
+msgstr "クリックでこのウィンドウを閉じます。"
+
+#: ../src/osx/carbon/fontdlg.cpp:596 ../src/osx/carbon/fontdlg.cpp:598
+msgid "Click to confirm changes to the font."
+msgstr "クリックでフォントの変更を確定します。"
+
+#: ../src/generic/fontdlgg.cpp:477 ../src/generic/fontdlgg.cpp:479
+#: ../src/generic/fontdlgg.cpp:484 ../src/generic/fontdlgg.cpp:486
+msgid "Click to confirm the font selection."
+msgstr "クリックでフォントの選択を確定します。"
+
+#: ../src/richtext/richtextstyledlg.cpp:244
+#: ../src/richtext/richtextstyledlg.cpp:246
+#, fuzzy
+msgid "Click to create a new box style."
+msgstr "クリックで新しいリストスタイルを作成できます。"
+
+#: ../src/richtext/richtextstyledlg.cpp:226
+#: ../src/richtext/richtextstyledlg.cpp:228
+msgid "Click to create a new character style."
+msgstr "クリックで新しい文字スタイルを作成できます。"
+
+#: ../src/richtext/richtextstyledlg.cpp:238
+#: ../src/richtext/richtextstyledlg.cpp:240
+msgid "Click to create a new list style."
+msgstr "クリックで新しいリストスタイルを作成できます。"
+
+#: ../src/richtext/richtextstyledlg.cpp:232
+#: ../src/richtext/richtextstyledlg.cpp:234
+msgid "Click to create a new paragraph style."
+msgstr "クリックで新しい段落スタイルを作成できます。"
+
+#: ../src/richtext/richtexttabspage.cpp:137
+#: ../src/richtext/richtexttabspage.cpp:139
+msgid "Click to create a new tab position."
+msgstr "クリックで新しいタブ位置を作成できます。"
+
+#: ../src/richtext/richtexttabspage.cpp:149
+#: ../src/richtext/richtexttabspage.cpp:151
+msgid "Click to delete all tab positions."
+msgstr "クリックですべてのタブ位置を削除できます。"
+
+#: ../src/richtext/richtextstyledlg.cpp:270
+#: ../src/richtext/richtextstyledlg.cpp:272
+msgid "Click to delete the selected style."
+msgstr "クリックで選択したスタイルを削除できます。"
+
+#: ../src/richtext/richtexttabspage.cpp:143
+#: ../src/richtext/richtexttabspage.cpp:145
+msgid "Click to delete the selected tab position."
+msgstr "クリックで選択した他部位置を削除できます。"
+
+#: ../src/richtext/richtextstyledlg.cpp:264
+#: ../src/richtext/richtextstyledlg.cpp:266
+msgid "Click to edit the selected style."
+msgstr "クリックで選択したスタイルを編集できます。"
+
+#: ../src/richtext/richtextstyledlg.cpp:258
+#: ../src/richtext/richtextstyledlg.cpp:260
+msgid "Click to rename the selected style."
+msgstr "クリックで選択したスタイルの名前を変更できます。"
+
+#: ../src/generic/dbgrptg.cpp:97 ../src/generic/progdlgg.cpp:804
+#: ../src/generic/progdlgg.cpp:809 ../src/richtext/richtextstyledlg.cpp:277
+#: ../src/richtext/richtextsymboldlg.cpp:476 ../src/common/stockitem.cpp:148
+#: ../src/msw/progdlg.cpp:170 ../src/msw/progdlg.cpp:679
+#: ../src/html/helpdlg.cpp:90
+msgid "Close"
+msgstr "閉じる"
+
+#: ../src/aui/tabmdi.cpp:109 ../src/generic/mdig.cpp:98
+msgid "Close All"
+msgstr "すべて閉じる"
+
+#: ../src/common/stockitem.cpp:266
+msgid "Close current document"
+msgstr "現在の文書を閉じます"
+
+#: ../src/generic/logg.cpp:522
+msgid "Close this window"
+msgstr "このウィンドウを閉じます"
+
+#: ../src/common/stockitem.cpp:193
+#, fuzzy
+msgid "Color"
+msgstr "色 (&C)"
+
+#: ../src/richtext/richtextformatdlg.cpp:725
+msgid "Colour"
+msgstr "色"
+
+#: ../src/msw/colordlg.cpp:156
+#, c-format
+msgid "Colour selection dialog failed with error %0lx."
+msgstr "色選択ダイアログがエラー %0lx で失敗しました。"
+
+#: ../src/osx/carbon/fontdlg.cpp:566
+msgid "Colour:"
+msgstr "色:"
+
+#: ../src/osx/carbon/dataview.cpp:900
+msgid "Column could not be added."
+msgstr "列を追加できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:899
+msgid "Column description could not be initialized."
+msgstr "列の記述を初期化できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:1538 ../src/osx/carbon/dataview.cpp:1559
+msgid "Column index not found."
+msgstr "列の索引が見つかりません。"
+
+#: ../src/osx/carbon/dataview.cpp:1614
+msgid "Column width could not be determined"
+msgstr "列の幅を決定できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:901
+msgid "Column width could not be set."
+msgstr "列の幅を設定できませんでした。"
+
+#: ../src/common/init.cpp:188
+#, c-format
+msgid ""
+"Command line argument %d couldn't be converted to Unicode and will be "
+"ignored."
+msgstr "コマンドライン引数 %d はユニコードに変換できません。無視されます。"
+
+#: ../src/msw/fontdlg.cpp:119
+#, c-format
+msgid "Common dialog failed with error code %0lx."
+msgstr "共通ダイアログがエラー %0lx で失敗しました。"
+
+#: ../src/gtk/window.cpp:4306
+msgid ""
+"Compositing not supported by this system, please enable it in your Window "
+"Manager."
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:1554
+msgid "Compressed HTML Help file (*.chm)|*.chm|"
+msgstr "圧縮HTMLヘルプ (*.chm)|*.chm|"
+
+#: ../src/generic/dirctrlg.cpp:544
+msgid "Computer"
+msgstr "コンピューター"
+
+#: ../src/common/fileconf.cpp:965
+#, c-format
+msgid "Config entry name cannot start with '%c'."
+msgstr "設定項目名は '%c' で始めることができません。"
+
+#: ../src/gtk/filedlg.cpp:59
+msgid "Confirm"
+msgstr "確定"
+
+#: ../src/msw/mimetype.cpp:739
+msgid "Confirm registry update"
+msgstr "レジストリーの更新を確定"
+
+#: ../src/html/htmlwin.cpp:544
+msgid "Connecting..."
+msgstr "接続中 ..."
+
+#: ../src/html/helpwnd.cpp:482
+msgid "Contents"
+msgstr "目次"
+
+#: ../src/common/strconv.cpp:2261
+#, c-format
+msgid "Conversion to charset '%s' doesn't work."
+msgstr "文字集合 '%s' への変換が機能していません。"
+
+#: ../src/common/stockitem.cpp:149
+#, fuzzy
+msgid "Convert"
+msgstr "変換 (&C)"
+
+#: ../src/html/htmlwin.cpp:1057
+#, c-format
+msgid "Copied to clipboard:\"%s\""
+msgstr "クリップボードへコピー:\"%s\""
+
+#: ../src/generic/prntdlgg.cpp:247
+msgid "Copies:"
+msgstr "部数:"
+
+#: ../src/common/stockitem.cpp:150 ../src/stc/stc_i18n.cpp:18
+msgid "Copy"
+msgstr "コピー"
+
+#: ../src/common/stockitem.cpp:258
+msgid "Copy selection"
+msgstr "選択範囲をコピーします"
+
+#: ../src/html/chm.cpp:718
+#, c-format
+msgid "Could not create temporary file '%s'"
+msgstr "一時ファイル '%s' を作成できませんでした"
+
+#: ../src/osx/carbon/dataview.cpp:1285 ../src/osx/carbon/dataview.cpp:1672
+msgid "Could not determine column index."
+msgstr "列の索引番号を特定できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:876
+msgid "Could not determine column's position"
+msgstr "列の位置を特定できませんでした"
+
+#: ../src/osx/carbon/dataview.cpp:843
+msgid "Could not determine number of columns."
+msgstr "列の数を取得できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:975
+msgid "Could not determine number of items"
+msgstr "項目数を取得できませんでした。"
+
+#: ../src/html/chm.cpp:273
+#, c-format
+msgid "Could not extract %s into %s: %s"
+msgstr "%s を %s に展開できませんでした: %s"
+
+#: ../src/generic/tabg.cpp:1048
+msgid "Could not find tab for id"
+msgstr "識別子に対応したタブが見つかりませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:2556 ../src/osx/carbon/dataview.cpp:2591
+#: ../src/osx/carbon/dataview.cpp:2615 ../src/osx/carbon/dataview.cpp:2636
+#: ../src/osx/carbon/dataview.cpp:2773
+msgid "Could not get header description."
+msgstr "ヘッダ記述を取得できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:1169 ../src/osx/carbon/dataview.cpp:1195
+msgid "Could not get items."
+msgstr "項目を取得できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:2659 ../src/osx/carbon/dataview.cpp:2724
+msgid "Could not get property flags."
+msgstr "プロパティフラグを取得できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:726
+msgid "Could not get selected items."
+msgstr "選択された項目を取得できませんでした。"
+
+#: ../src/html/chm.cpp:444
+#, c-format
+msgid "Could not locate file '%s'."
+msgstr "ファイル '%s' の場所を特定できません。"
+
+#: ../src/osx/carbon/dataview.cpp:845
+msgid "Could not remove column."
+msgstr "列を削除できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:642
+msgid "Could not retrieve number of items"
+msgstr "項目数を取得できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:2572
+msgid "Could not set alignment."
+msgstr "整列方法を設定できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:2803
+msgid "Could not set column width."
+msgstr "列の幅を設定できませんでした。"
+
+#: ../src/common/filefn.cpp:1569
+#, fuzzy
+msgid "Could not set current working directory"
+msgstr "作業ディレクトリーを取得できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:2775
+msgid "Could not set header description."
+msgstr "ヘッダ記述を設定できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:2596
+msgid "Could not set icon."
+msgstr "アイコンを設定できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:2617
+msgid "Could not set maximum width."
+msgstr "最大幅を設定できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:2638
+msgid "Could not set minimum width."
+msgstr "最小幅を設定できませんでした。"
+
+#: ../src/osx/carbon/dataview.cpp:2664 ../src/osx/carbon/dataview.cpp:2729
+msgid "Could not set property flags."
+msgstr "プロパティフラグを設定できませんでした。"
+
+#: ../src/common/prntbase.cpp:1985
+msgid "Could not start document preview."
+msgstr "文書プレビューを開始できませんでした。"
+
+#: ../src/generic/printps.cpp:178 ../src/msw/printwin.cpp:210
+#: ../src/gtk/print.cpp:1077
+msgid "Could not start printing."
+msgstr "印刷を始められませんでした。"
+
+#: ../src/common/wincmn.cpp:2131
+msgid "Could not transfer data to window"
+msgstr "ウィンドウへデータを転送できませんでした。"
+
+#: ../src/os2/thread.cpp:160
+msgid "Couldn't acquire a mutex lock"
+msgstr "Mutexロックを取得できませんでした。"
+
+#: ../src/msw/imaglist.cpp:166 ../src/msw/imaglist.cpp:197
+#: ../src/msw/imaglist.cpp:209 ../src/msw/dragimag.cpp:193
+#: ../src/msw/dragimag.cpp:232
+msgid "Couldn't add an image to the image list."
+msgstr "イメージリストに画像を追加できませんでした。"
+
+#: ../src/msw/timer.cpp:134 ../src/os2/timer.cpp:113
+msgid "Couldn't create a timer"
+msgstr "タイマーを作成できませんでした"
+
+#: ../src/osx/carbon/overlay.cpp:122
+msgid "Couldn't create the overlay window"
+msgstr "オーバーレイウィンドウを作成できませんでした"
+
+#: ../src/common/translation.cpp:2015
+#, fuzzy
+msgid "Couldn't enumerate translations"
+msgstr "スレッドを終了できませんでした"
+
+#: ../src/common/dynlib.cpp:152
+#, c-format
+msgid "Couldn't find symbol '%s' in a dynamic library"
+msgstr "シンボル '%s' が動的ライブラリーの中に見つかりませんでした"
+
+#: ../src/gtk/print.cpp:2014
+msgid "Couldn't get hatch style from wxBrush."
+msgstr "wxBrush からハッチスタイルを取得できませんでした。"
+
+#: ../src/msw/thread.cpp:950
+msgid "Couldn't get the current thread pointer"
+msgstr "現在のスレッドを示すポインタを取得できませんでした。"
+
+#: ../src/osx/carbon/overlay.cpp:129
+msgid "Couldn't init the context on the overlay window"
+msgstr "オーバーレイウィンドウの内容を初期化できませんでした。"
+
+#: ../src/common/imaggif.cpp:263
+#, fuzzy
+msgid "Couldn't initialize GIF hash table."
+msgstr "zlib の deflate ストリームを初期化できません。"
+
+#: ../src/common/imagpng.cpp:657
+msgid "Couldn't load a PNG image - file is corrupted or not enough memory."
+msgstr "PNG画像を読み出せませんでした。ファイルが壊れているかメモリ不足です。"
+
+#: ../src/unix/sound.cpp:470
+#, c-format
+msgid "Couldn't load sound data from '%s'."
+msgstr "音声データを '%s' から取得できませんでした。"
+
+#: ../src/msw/dirdlg.cpp:441
+#, fuzzy
+msgid "Couldn't obtain folder name"
+msgstr "タイマーを作成できませんでした"
+
+#: ../src/unix/sound_sdl.cpp:229
+#, c-format
+msgid "Couldn't open audio: %s"
+msgstr "音声を開くことができませんでした: %s"
+
+#: ../src/msw/ole/dataobj.cpp:350
+#, c-format
+msgid "Couldn't register clipboard format '%s'."
+msgstr "クリップボードの様式 '%s' を登録できませんでした。"
+
+#: ../src/os2/thread.cpp:177
+msgid "Couldn't release a mutex"
+msgstr "Mutexを解放できませんでした"
+
+#: ../src/msw/listctrl.cpp:756
+#, c-format
+msgid "Couldn't retrieve information about list control item %d."
+msgstr "リストコントロールの項目 %d に関する情報を取得できませんでした。"
+
+#: ../src/common/imagpng.cpp:746 ../src/common/imagpng.cpp:757
+#: ../src/common/imagpng.cpp:767
+msgid "Couldn't save PNG image."
+msgstr "PNG画像を保存できませんでした"
+
+#: ../src/msw/thread.cpp:715
+msgid "Couldn't terminate thread"
+msgstr "スレッドを終了できませんでした"
+
+#: ../src/common/xtistrm.cpp:170
+#, fuzzy, c-format
+msgid "Create Parameter %s not found in declared RTTI Parameters"
+msgstr "宣言された RTTI 変数の中には Create で指定されたものがありません"
+
+#: ../src/generic/dirdlgg.cpp:317
+msgid "Create directory"
+msgstr "ディレクトリーを作成します"
+
+#: ../src/generic/filedlgg.cpp:228 ../src/generic/dirdlgg.cpp:131
+msgid "Create new directory"
+msgstr "新しいディレクトリーを作成します"
+
+#: ../src/common/accelcmn.cpp:322
+msgid "Ctrl+"
+msgstr "Ctrl+"
+
+#: ../src/richtext/richtextctrl.cpp:325 ../src/osx/textctrl_osx.cpp:582
+#: ../src/common/stockitem.cpp:151 ../src/msw/textctrl.cpp:2283
+msgid "Cu&t"
+msgstr "切り取り (&T)"
+
+#: ../src/generic/filectrlg.cpp:956
+msgid "Current directory:"
+msgstr "カレントディレクトリー:"
+
+#: ../src/gtk/print.cpp:759
+msgid "Custom size"
+msgstr "任意の寸法指定"
+
+#: ../src/common/headerctrlcmn.cpp:60
+msgid "Customize Columns"
+msgstr "列の編集"
+
+#: ../src/common/stockitem.cpp:151 ../src/stc/stc_i18n.cpp:17
+msgid "Cut"
+msgstr "切り取り"
+
+#: ../src/common/stockitem.cpp:259
+msgid "Cut selection"
+msgstr "選択範囲を切り取ります"
+
+#: ../src/common/fmapbase.cpp:152
+msgid "Cyrillic (ISO-8859-5)"
+msgstr "キリル言語 (ISO-8859-5)"
+
+#: ../src/common/paper.cpp:100
+msgid "D sheet, 22 x 34 in"
+msgstr "Dサイズシート, 22 x 34インチ"
+
+#: ../src/msw/dde.cpp:708
+msgid "DDE poke request failed"
+msgstr "DDE の poke 要求が失敗しました"
+
+#: ../src/common/accelcmn.cpp:79
+msgid "DECIMAL"
+msgstr "DECIMAL"
+
+#: ../src/common/accelcmn.cpp:47
+msgid "DEL"
+msgstr "DEL"
+
+#: ../src/common/accelcmn.cpp:48
+msgid "DELETE"
+msgstr "DELETE"
+
+#: ../src/common/imagbmp.cpp:1092
+msgid "DIB Header: Encoding doesn't match bitdepth."
+msgstr "DIB ヘッダー: エンコーディングがビット深さに対応していません。"
+
+#: ../src/common/imagbmp.cpp:1040
+msgid "DIB Header: Image height > 32767 pixels for file."
+msgstr "DIB ヘッダー: 画像の高さが32767ピクセルを超えています。"
+
+#: ../src/common/imagbmp.cpp:1032
+msgid "DIB Header: Image width > 32767 pixels for file."
+msgstr "DIB ヘッダー: 画像の幅が32767ピクセルを超えています。"
+
+#: ../src/common/imagbmp.cpp:1060
+msgid "DIB Header: Unknown bitdepth in file."
+msgstr "DIB ヘッダー: 未知のビット深さがファイルに含まれています。"
+
+#: ../src/common/imagbmp.cpp:1074
+msgid "DIB Header: Unknown encoding in file."
+msgstr "DIB ヘッダー: 未知のエンコーディングがファイルに含まれています。"
+
+#: ../src/common/accelcmn.cpp:80
+msgid "DIVIDE"
+msgstr "DIVIDE"
+
+#: ../src/common/paper.cpp:122
+msgid "DL Envelope, 110 x 220 mm"
+msgstr "DL 封筒, 110×220mm"
+
+#: ../src/common/accelcmn.cpp:59
+msgid "DOWN"
+msgstr "↓"
+
+#: ../src/richtext/richtextborderspage.cpp:545
+msgid "Dashed"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1921
+msgid "Data object has invalid data format"
+msgstr "データオブジェクトが不適切な様式を保有しています"
+
+#: ../src/osx/carbon/dataview.cpp:2491
+msgid "Date renderer cannot render value; value type: "
+msgstr "日付レンダラーが値をレンダリングできません; 値の型:"
+
+#: ../src/generic/dbgrptg.cpp:300
+#, c-format
+msgid "Debug report \"%s\""
+msgstr "デバッグレポート \"%s\""
+
+#: ../src/common/debugrpt.cpp:210
+msgid "Debug report couldn't be created."
+msgstr "デバッグレポートを作成できません。"
+
+#: ../src/common/debugrpt.cpp:558
+msgid "Debug report generation has failed."
+msgstr "デバッグレポートの作成に失敗しました。"
+
+#: ../src/generic/fontdlgg.cpp:323
+msgid "Decorative"
+msgstr "Decorative"
+
+#: ../src/common/fmapbase.cpp:796
+msgid "Default encoding"
+msgstr "既定のエンコーディング"
+
+#: ../src/dfb/fontmgr.cpp:180
+msgid "Default font"
+msgstr "既定のフォント"
+
+#: ../src/generic/prntdlgg.cpp:510
+msgid "Default printer"
+msgstr "既定のプリンター"
+
+#: ../src/richtext/richtextbuffer.cpp:7841 ../src/common/stockitem.cpp:152
+#: ../src/stc/stc_i18n.cpp:20
+msgid "Delete"
+msgstr "削除"
+
+#: ../src/richtext/richtexttabspage.cpp:148
+msgid "Delete A&ll"
+msgstr "すべて削除(&L)"
+
+#: ../src/richtext/richtextbuffer.cpp:10637
+#, fuzzy
+msgid "Delete Column"
+msgstr "選択範囲の削除"
+
+#: ../src/richtext/richtextbuffer.cpp:10587
+#, fuzzy
+msgid "Delete Row"
+msgstr "削除"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+msgid "Delete Style"
+msgstr "スタイルの削除"
+
+#: ../src/richtext/richtextctrl.cpp:1231 ../src/richtext/richtextctrl.cpp:1452
+msgid "Delete Text"
+msgstr "テキストの削除"
+
+#: ../src/generic/editlbox.cpp:274
+msgid "Delete item"
+msgstr "項目の削除"
+
+#: ../src/common/stockitem.cpp:260
+msgid "Delete selection"
+msgstr "選択範囲の削除"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+#, c-format
+msgid "Delete style %s?"
+msgstr "スタイル %s を削除しますか?"
+
+#: ../src/unix/snglinst.cpp:295
+#, c-format
+msgid "Deleted stale lock file '%s'."
+msgstr "無効なロックファイル '%s' を削除しました。"
+
+#: ../src/common/module.cpp:124
+#, c-format
+msgid "Dependency \"%s\" of module \"%s\" doesn't exist."
+msgstr "依存先の \"%s\" (モジュール \"%s\" 内) は存在しません。"
+
+#: ../src/common/stockitem.cpp:196
+#, fuzzy
+msgid "Descending"
+msgstr "降順 (&D)"
+
+#: ../src/generic/dirctrlg.cpp:626
+msgid "Desktop"
+msgstr "デスクトップ"
+
+#: ../src/generic/aboutdlgg.cpp:70
+msgid "Developed by "
+msgstr "開発 : "
+
+#: ../src/generic/aboutdlgg.cpp:176
+msgid "Developers"
+msgstr "開発者"
+
+#: ../src/msw/dialup.cpp:393
+msgid ""
+"Dial up functions are unavailable because the remote access service (RAS) is "
+"not installed on this machine. Please install it."
+msgstr ""
+"リモートアクセスサービス(RAS)がインストールされていないため、ダイヤルアップは"
+"機能しません。RASをインストールしてください。"
+
+#: ../src/generic/tipdlg.cpp:230
+msgid "Did you know..."
+msgstr "ご存じですか?"
+
+#: ../src/dfb/wrapdfb.cpp:63
+#, fuzzy, c-format
+msgid "DirectFB error %d occurred."
+msgstr "DirectFB エラー %d が発生しました。"
+
+#: ../src/motif/filedlg.cpp:219
+msgid "Directories"
+msgstr "ディレクトリー"
+
+#: ../src/common/filefn.cpp:1251
+#, c-format
+msgid "Directory '%s' couldn't be created"
+msgstr "ディレクトリー '%s' を作成できませんでした"
+
+#: ../src/common/filefn.cpp:1271
+#, c-format
+msgid "Directory '%s' couldn't be deleted"
+msgstr "ディレクトリー '%s' を削除できませんでした"
+
+#: ../src/generic/dirdlgg.cpp:233
+msgid "Directory does not exist"
+msgstr "ディレクトリーが存在しません"
+
+#: ../src/generic/filectrlg.cpp:1412
+msgid "Directory doesn't exist."
+msgstr "ディレクトリーが存在しません。"
+
+#: ../src/common/docview.cpp:455
+msgid "Discard changes and reload the last saved version?"
+msgstr "変更を破棄して最後に保存したものを読み直しますか?"
+
+#: ../src/html/helpwnd.cpp:512
+msgid ""
+"Display all index items that contain given substring. Search is case "
+"insensitive."
+msgstr ""
+"与えられた文字列を含む索引項目を表示します。大文字小文字は区別しません。"
+
+#: ../src/html/helpwnd.cpp:692
+msgid "Display options dialog"
+msgstr "オプションダイアログを表示します"
+
+#: ../src/html/helpwnd.cpp:326
+msgid "Displays help as you browse the books on the left."
+msgstr "横に置く本のようにヘルプを表示します。"
+
+#: ../src/msw/mimetype.cpp:732
+msgid ""
+"Do you want to overwrite the command used to %s files with extension \"%s"
+"\" ?\n"
+"Current value is \n"
+"%s, \n"
+"New value is \n"
+"%s %1"
+msgstr ""
+"%s コマンドを拡張子 \"%s\" に適用するときの値を上書きしますか?\n"
+"現在の値 :\n"
+"%s, \n"
+"新しい値 :\n"
+"%s %1"
+
+#: ../src/common/docview.cpp:531
+#, c-format
+msgid "Do you want to save changes to %s?"
+msgstr "変更結果を %s へ保存しますか?"
+
+#: ../src/common/prntbase.cpp:525
+#, fuzzy
+msgid "Document:"
+msgstr "説明書 : "
+
+#: ../src/generic/aboutdlgg.cpp:73
+msgid "Documentation by "
+msgstr "説明書 : "
+
+#: ../src/generic/aboutdlgg.cpp:180
+msgid "Documentation writers"
+msgstr "説明書の著者"
+
+#: ../src/common/sizer.cpp:2680
+msgid "Don't Save"
+msgstr "保存しない"
+
+#: ../src/msw/frame.cpp:122 ../src/html/htmlwin.cpp:611
+msgid "Done"
+msgstr "完了"
+
+#: ../src/generic/progdlgg.cpp:481 ../src/msw/progdlg.cpp:407
+msgid "Done."
+msgstr "完了しました。"
+
+#: ../src/richtext/richtextborderspage.cpp:544
+#, fuzzy
+msgid "Dotted"
+msgstr "完了"
+
+#: ../src/richtext/richtextborderspage.cpp:546
+#, fuzzy
+msgid "Double"
+msgstr "double値"
+
+#: ../src/common/paper.cpp:177
+msgid "Double Japanese Postcard Rotated 148 x 200 mm"
+msgstr "往復はがき横置き 148×200mm"
+
+#: ../src/common/xtixml.cpp:273
+#, c-format
+msgid "Doubly used id : %d"
+msgstr "識別子が重複しています: %d"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:153
+msgid "Down"
+msgstr "下へ"
+
+#: ../src/richtext/richtextctrl.cpp:814
+msgid "Drag"
+msgstr ""
+
+#: ../src/common/paper.cpp:101
+msgid "E sheet, 34 x 44 in"
+msgstr "Eサイズシート, 34 x 44インチ"
+
+#: ../src/common/accelcmn.cpp:61
+msgid "END"
+msgstr "END"
+
+#: ../src/common/accelcmn.cpp:52
+msgid "ENTER"
+msgstr "ENTER"
+
+#: ../src/unix/fswatcher_inotify.cpp:535
+msgid "EOF while reading from inotify descriptor"
+msgstr "inotify 記述子 %d の読み取り中にEOFを検出しました"
+
+#: ../src/common/accelcmn.cpp:64
+msgid "ESC"
+msgstr "ESC"
+
+#: ../src/common/accelcmn.cpp:65
+msgid "ESCAPE"
+msgstr "ESCAPE"
+
+#: ../src/common/accelcmn.cpp:73
+msgid "EXECUTE"
+msgstr "EXECUTE"
+
+#: ../src/common/stockitem.cpp:154
+#, fuzzy
+msgid "Edit"
+msgstr "編集(&E)"
+
+#: ../src/generic/editlbox.cpp:272
+msgid "Edit item"
+msgstr "項目の編集"
+
+#: ../include/wx/generic/progdlgg.h:84
+msgid "Elapsed time:"
+msgstr "経過時間:"
+
+#: ../src/richtext/richtextsizepage.cpp:353
+#: ../src/richtext/richtextsizepage.cpp:355
+#: ../src/richtext/richtextsizepage.cpp:465
+#: ../src/richtext/richtextsizepage.cpp:467
+msgid "Enable the height value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:438
+#: ../src/richtext/richtextsizepage.cpp:440
+#, fuzzy
+msgid "Enable the maximum width value."
+msgstr "最大幅を設定できませんでした。"
+
+#: ../src/richtext/richtextsizepage.cpp:411
+#: ../src/richtext/richtextsizepage.cpp:413
+msgid "Enable the minimum height value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:384
+#: ../src/richtext/richtextsizepage.cpp:386
+#, fuzzy
+msgid "Enable the minimum width value."
+msgstr "最小幅を設定できませんでした。"
+
+#: ../src/richtext/richtextsizepage.cpp:319
+#: ../src/richtext/richtextsizepage.cpp:321
+msgid "Enable the width value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:280
+#: ../src/richtext/richtextsizepage.cpp:282
+#, fuzzy
+msgid "Enable vertical alignment."
+msgstr "整列方法を設定できませんでした。"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:133
+#: ../src/richtext/richtextbackgroundpage.cpp:135
+#, fuzzy
+msgid "Enables a background colour."
+msgstr "背景色"
+
+#: ../src/richtext/richtextstyledlg.cpp:931
+#, fuzzy
+msgid "Enter a box style name"
+msgstr "新しいスタイル名を入力してください。"
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+msgid "Enter a character style name"
+msgstr "文字スタイル名を入力してください。"
+
+#: ../src/richtext/richtextstyledlg.cpp:817
+msgid "Enter a list style name"
+msgstr "リストスタイル名を入力してください。"
+
+#: ../src/richtext/richtextstyledlg.cpp:890
+msgid "Enter a new style name"
+msgstr "新しいスタイル名を入力してください。"
+
+#: ../src/richtext/richtextstyledlg.cpp:651
+msgid "Enter a paragraph style name"
+msgstr "段落スタイル名を指定してください。"
+
+#: ../src/generic/dbgrptg.cpp:174
+#, c-format
+msgid "Enter command to open file \"%s\":"
+msgstr "\"%s\" ファイルを開くためのコマンドを入力してください:"
+
+#: ../src/generic/helpext.cpp:463
+msgid "Entries found"
+msgstr "候補が見つかりました"
+
+#: ../src/common/paper.cpp:143
+msgid "Envelope Invite 220 x 220 mm"
+msgstr "封筒 Invite 220 x 220 mm"
+
+#: ../src/common/config.cpp:473
+#, c-format
+msgid ""
+"Environment variables expansion failed: missing '%c' at position %u in '%s'."
+msgstr ""
+"環境変数拡張に失敗しました: '%c' が %u 文字目 ('%s' 内) に欠けています。"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/dirctrlg.cpp:688
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:791
+#: ../src/generic/filectrlg.cpp:805 ../src/generic/filectrlg.cpp:821
+#: ../src/generic/filectrlg.cpp:1381 ../src/generic/filectrlg.cpp:1412
+#: ../src/gtk/filedlg.cpp:73 ../src/gtk1/fontdlg.cpp:74
+msgid "Error"
+msgstr "エラー"
+
+#: ../src/unix/epolldispatcher.cpp:103
+msgid "Error closing epoll descriptor"
+msgstr "epoll記述子を閉じる際のエラー"
+
+#: ../src/unix/fswatcher_kqueue.cpp:114
+msgid "Error closing kqueue instance"
+msgstr "kqueue 実体を閉じる際のエラー"
+
+#: ../src/generic/dirdlgg.cpp:251
+msgid "Error creating directory"
+msgstr "ディレクトリー作成エラー"
+
+#: ../src/common/imagbmp.cpp:1103
+msgid "Error in reading image DIB."
+msgstr "画像のDIB読み取りエラー。"
+
+#: ../src/propgrid/propgrid.cpp:6563
+#, c-format
+msgid "Error in resource: %s"
+msgstr "リソースにエラー: %s"
+
+#: ../src/common/fileconf.cpp:453
+msgid "Error reading config options."
+msgstr "設定オプションの読み取りエラー"
+
+#: ../src/common/fileconf.cpp:1064
+msgid "Error saving user configuration data."
+msgstr "ユーザー設定データの保存中にエラーが発生しました。"
+
+#: ../src/gtk/print.cpp:671
+msgid "Error while printing: "
+msgstr "印刷中にエラー発生: "
+
+#: ../src/common/log.cpp:223
+msgid "Error: "
+msgstr "エラー:"
+
+#: ../src/common/fmapbase.cpp:150
+msgid "Esperanto (ISO-8859-3)"
+msgstr "エスペラントほか (Latin-3, ISO-8859-3)"
+
+#: ../include/wx/generic/progdlgg.h:85
+msgid "Estimated time:"
+msgstr "予定時間:"
+
+#: ../src/unix/fswatcher_inotify.cpp:639
+msgid "Event queue overflowed"
+msgstr "イベントキューが溢れました"
+
+#: ../src/generic/dbgrptg.cpp:234
+#, fuzzy
+msgid "Executable files (*.exe)|*.exe|"
+msgstr "実行ファイル (*.exe)|*.exe|すべてのファイル (*.*)|*.*||"
+
+#: ../src/common/stockitem.cpp:155
+#, fuzzy
+msgid "Execute"
+msgstr "実行 (&E)"
+
+#: ../src/msw/utilsexc.cpp:888
+#, c-format
+msgid "Execution of command '%s' failed"
+msgstr "コマンド '%s' を実行できませんでした。"
+
+#: ../src/os2/utilsexc.cpp:163
+#, c-format
+msgid "Execution of command '%s' failed with error: %ul"
+msgstr "コマンド '%s' を実行できませんでした。エラーコード: %ul"
+
+#: ../src/common/paper.cpp:106
+msgid "Executive, 7 1/4 x 10 1/2 in"
+msgstr "エグゼキュティブ, 7 1/4 x 10 1/2インチ"
+
+#: ../src/msw/registry.cpp:1230
+#, c-format
+msgid ""
+"Exporting registry key: file \"%s\" already exists and won't be overwritten."
+msgstr ""
+"レジストリーのエクスポート: ファイル \"%s\" はすでに存在します。上書きも行い"
+"ません。"
+
+#: ../src/common/fmapbase.cpp:195
+msgid "Extended Unix Codepage for Japanese (EUC-JP)"
+msgstr "日本語EUC (EUC-JP)"
+
+#: ../src/html/chm.cpp:725
+#, c-format
+msgid "Extraction of '%s' into '%s' failed."
+msgstr "'%s' を '%s' に展開できませんでした。"
+
+#: ../src/common/accelcmn.cpp:238 ../src/common/accelcmn.cpp:333
+msgid "F"
+msgstr "F"
+
+#: ../src/propgrid/advprops.cpp:640
+msgid "Face Name"
+msgstr "フォント名"
+
+#: ../src/unix/snglinst.cpp:269
+msgid "Failed to access lock file."
+msgstr "ロックファイルへアクセスできませんでした。"
+
+#: ../src/unix/epolldispatcher.cpp:116
+#, c-format
+msgid "Failed to add descriptor %d to epoll descriptor %d"
+msgstr "記述子 %d を epoll 記述子 %d に追加できませんでした"
+
+#: ../src/msw/dib.cpp:548
+#, c-format
+msgid "Failed to allocate %luKb of memory for bitmap data."
+msgstr "ビットマップデータ用のメモリ割り当て(%luKb)に失敗しました。"
+
+#: ../src/common/glcmn.cpp:87
+msgid "Failed to allocate colour for OpenGL"
+msgstr "OpenGL に色を割り当てることができませんでした。"
+
+#: ../src/unix/displayx11.cpp:288
+msgid "Failed to change video mode"
+msgstr "画面モード変更に失敗しました。"
+
+#: ../src/common/image.cpp:3139
+#, fuzzy, c-format
+msgid "Failed to check format of image file \"%s\"."
+msgstr "ファイル \"%s\" にビットマップイメージを保存できませんでした。"
+
+#: ../src/common/debugrpt.cpp:244
+#, c-format
+msgid "Failed to clean up debug report directory \"%s\""
+msgstr "デバッグレポートディレクトリーを全削除できませんでした \"%s\""
+
+#: ../src/common/filename.cpp:211
+msgid "Failed to close file handle"
+msgstr "ファイルハンドルを閉じることができませんでした。"
+
+#: ../src/unix/snglinst.cpp:334
+#, c-format
+msgid "Failed to close lock file '%s'"
+msgstr "ロックファイル '%s' を閉じることができませんでした。"
+
+#: ../src/msw/clipbrd.cpp:115
+msgid "Failed to close the clipboard."
+msgstr "クリップボードを閉じることができませんでした。"
+
+#: ../src/x11/utils.cpp:204
+#, c-format
+msgid "Failed to close the display \"%s\""
+msgstr "ディスプレイ \"%s\" を閉じることができませんでした。"
+
+#: ../src/msw/dialup.cpp:818
+msgid "Failed to connect: missing username/password."
+msgstr "接続に失敗: username/password が欠けています。"
+
+#: ../src/msw/dialup.cpp:764
+msgid "Failed to connect: no ISP to dial."
+msgstr "接続失敗: ダイヤル先のISPがありません。"
+
+#: ../src/common/textfile.cpp:200
+#, c-format
+msgid "Failed to convert file \"%s\" to Unicode."
+msgstr "ファイル \"%s\" を Unicode に変換できませんでした。"
+
+#: ../src/generic/logg.cpp:976
+msgid "Failed to copy dialog contents to the clipboard."
+msgstr "ダイアログの内容をクリップボードにコピーできませんでした。"
+
+#: ../src/msw/registry.cpp:691
+#, c-format
+msgid "Failed to copy registry value '%s'"
+msgstr "レジストリーの値 '%s' をコピーできませんでした。"
+
+#: ../src/msw/registry.cpp:700
+#, c-format
+msgid "Failed to copy the contents of registry key '%s' to '%s'."
+msgstr "レジストリーキー '%s' の内容を '%s' へコピーできませんでした。"
+
+#: ../src/common/filefn.cpp:1058
+#, c-format
+msgid "Failed to copy the file '%s' to '%s'"
+msgstr "ファイル '%s' を '%s' へコピーできませんでした。"
+
+#: ../src/msw/registry.cpp:678
+#, c-format
+msgid "Failed to copy the registry subkey '%s' to '%s'."
+msgstr "レジストリーのサブキー '%s' を '%s' へコピーできませんでした。"
+
+#: ../src/msw/dde.cpp:1073
+msgid "Failed to create DDE string"
+msgstr "DDE文字列を作成できませんでした。"
+
+#: ../src/msw/mdi.cpp:590
+msgid "Failed to create MDI parent frame."
+msgstr "MDI親フレームを作成できませんでした。"
+
+#: ../src/common/filename.cpp:1080
+msgid "Failed to create a temporary file name"
+msgstr "一時ファイルの名前を作成できませんでした。"
+
+#: ../src/msw/utilsexc.cpp:235
+msgid "Failed to create an anonymous pipe"
+msgstr "匿名パイプを作成できませんでした。"
+
+#: ../src/msw/ole/automtn.cpp:522
+#, fuzzy, c-format
+msgid "Failed to create an instance of \"%s\""
+msgstr "ディレクトリー \"%s\" を作成できませんでした。"
+
+#: ../src/msw/dde.cpp:442
+#, c-format
+msgid "Failed to create connection to server '%s' on topic '%s'"
+msgstr "サーバー '%s' へのトピック '%s' 接続を確立できませんでした。"
+
+#: ../src/msw/cursor.cpp:212
+msgid "Failed to create cursor."
+msgstr "カーソルを作成できませんでした。"
+
+#: ../src/common/debugrpt.cpp:209
+#, c-format
+msgid "Failed to create directory \"%s\""
+msgstr "ディレクトリー \"%s\" を作成できませんでした。"
+
+#: ../src/generic/dirdlgg.cpp:249
+#, c-format
+msgid ""
+"Failed to create directory '%s'\n"
+"(Do you have the required permissions?)"
+msgstr ""
+"'%s' を作成できませんでした。\n"
+"処理に必要なパーミッションをお持ちですか?"
+
+#: ../src/unix/epolldispatcher.cpp:84
+msgid "Failed to create epoll descriptor"
+msgstr "epoll 記述子を作成できませんでした"
+
+#: ../src/msw/mimetype.cpp:198
+#, c-format
+msgid "Failed to create registry entry for '%s' files."
+msgstr "'%s' 用のレジストリエントリを作成できませんでした。"
+
+#: ../src/msw/fdrepdlg.cpp:442
+#, c-format
+msgid "Failed to create the standard find/replace dialog (error code %d)"
+msgstr "標準の検索置換ダイアログを作成できませんでした (エラーコード %d)"
+
+#: ../src/unix/wakeuppipe.cpp:52
+msgid "Failed to create wake up pipe used by event loop."
+msgstr "イベントループが使う起動パイプの作成に失敗しました。"
+
+#: ../src/html/winpars.cpp:739
+#, c-format
+msgid "Failed to display HTML document in %s encoding"
+msgstr "%s エンコーディングで HTML 文書を表示できませんでした。"
+
+#: ../src/msw/clipbrd.cpp:127
+msgid "Failed to empty the clipboard."
+msgstr "クリップボードを空にできませんでした。"
+
+#: ../src/unix/displayx11.cpp:265
+msgid "Failed to enumerate video modes"
+msgstr "画面モードを列挙できませんでした。"
+
+#: ../src/msw/dde.cpp:727
+msgid "Failed to establish an advise loop with DDE server"
+msgstr "DDE サーバーとのアドバイスループを確立できませんでした。"
+
+#: ../src/msw/dialup.cpp:650 ../src/msw/dialup.cpp:884
+#, c-format
+msgid "Failed to establish dialup connection: %s"
+msgstr "ダイヤルアップ接続を確立できませんでした: %s"
+
+#: ../src/unix/utilsunx.cpp:617
+#, c-format
+msgid "Failed to execute '%s'\n"
+msgstr "'%s' の実行に失敗しました\n"
+
+#: ../src/common/debugrpt.cpp:725
+msgid "Failed to execute curl, please install it in PATH."
+msgstr "curl を実行できません。PATHの参照先にインストールしてください。"
+
+#: ../src/msw/ole/automtn.cpp:505
+#, fuzzy, c-format
+msgid "Failed to find CLSID of \"%s\""
+msgstr "リソース \"%s\" を読み取れませんでした。"
+
+#: ../src/common/regex.cpp:434 ../src/common/regex.cpp:482
+#, c-format
+msgid "Failed to find match for regular expression: %s"
+msgstr "正規表現に合致する部分が見つかりませんでした: %s"
+
+#: ../src/msw/dialup.cpp:716
+#, c-format
+msgid "Failed to get ISP names: %s"
+msgstr "ISP名を取得できませんでした: %s"
+
+#: ../src/msw/ole/automtn.cpp:574
+#, fuzzy, c-format
+msgid "Failed to get OLE automation interface for \"%s\""
+msgstr "ディレクトリー \"%s\" を作成できませんでした。"
+
+#: ../src/msw/clipbrd.cpp:747
+msgid "Failed to get data from the clipboard"
+msgstr "クリップボードからデータを取得できませんでした。"
+
+#: ../src/common/time.cpp:249
+msgid "Failed to get the local system time"
+msgstr "ローカルのシステム時刻を取得できませんでした。"
+
+#: ../src/common/filefn.cpp:1453
+msgid "Failed to get the working directory"
+msgstr "作業ディレクトリーを取得できませんでした。"
+
+#: ../src/univ/theme.cpp:113
+msgid "Failed to initialize GUI: no built-in themes found."
+msgstr "GUIの初期化に失敗: ビルトインテーマがありません。"
+
+#: ../src/msw/helpchm.cpp:63
+msgid "Failed to initialize MS HTML Help."
+msgstr "Microsoft HTML Help を初期化できませんでした。"
+
+#: ../src/msw/glcanvas.cpp:892
+msgid "Failed to initialize OpenGL"
+msgstr "OpenGLを初期化できませんでした。"
+
+#: ../src/msw/dialup.cpp:879
+#, c-format
+msgid "Failed to initiate dialup connection: %s"
+msgstr "ダイヤルアップ接続の初期化に失敗しました: %s "
+
+#: ../src/gtk/textctrl.cpp:1117
+msgid "Failed to insert text in the control."
+msgstr "そのコントロールにテキストを挿入できませんでした。"
+
+#: ../src/unix/snglinst.cpp:241
+#, c-format
+msgid "Failed to inspect the lock file '%s'"
+msgstr "ロックファイル '%s' を検査できませんでした"
+
+#: ../src/unix/appunix.cpp:182
+msgid "Failed to install signal handler"
+msgstr "シグナルハンドラーのインストールに失敗しました。"
+
+#: ../src/unix/threadpsx.cpp:1162
+msgid ""
+"Failed to join a thread, potential memory leak detected - please restart the "
+"program"
+msgstr ""
+"スレッド接合に失敗しました。メモリリーク発生の可能性があります。プログラムを"
+"再起動してください。"
+
+#: ../src/msw/utils.cpp:745
+#, c-format
+msgid "Failed to kill process %d"
+msgstr "プロセス %d の kill に失敗しました"
+
+#: ../src/common/image.cpp:2365
+#, fuzzy, c-format
+msgid "Failed to load bitmap \"%s\" from resources."
+msgstr "画像 %d をストリームから読み取れませんでした。"
+
+#: ../src/common/image.cpp:2374
+#, fuzzy, c-format
+msgid "Failed to load icon \"%s\" from resources."
+msgstr "画像 %d をストリームから読み取れませんでした。"
+
+#: ../src/common/iconbndl.cpp:182
+#, c-format
+msgid "Failed to load image %%d from file '%s'."
+msgstr "画像 %%d をファイル '%s' から読み取れませんでした。"
+
+#: ../src/common/iconbndl.cpp:190
+#, c-format
+msgid "Failed to load image %d from stream."
+msgstr "画像 %d をストリームから読み取れませんでした。"
+
+#: ../src/common/image.cpp:2450 ../src/common/image.cpp:2469
+#, fuzzy, c-format
+msgid "Failed to load image from file \"%s\"."
+msgstr "ファイル \"%s\" からメタファイルを読み取れませんでした。"
+
+#: ../src/msw/enhmeta.cpp:97
+#, c-format
+msgid "Failed to load metafile from file \"%s\"."
+msgstr "ファイル \"%s\" からメタファイルを読み取れませんでした。"
+
+#: ../src/msw/volume.cpp:327
+msgid "Failed to load mpr.dll."
+msgstr "mpr.dll を読み取れませんでした。"
+
+#: ../src/msw/utils.cpp:1120
+#, c-format
+msgid "Failed to load resource \"%s\"."
+msgstr "リソース \"%s\" を読み取れませんでした。"
+
+#: ../src/common/dynlib.cpp:100
+#, c-format
+msgid "Failed to load shared library '%s'"
+msgstr "共有ライブラリ '%s' を読み取れませんでした。"
+
+#: ../src/msw/utils.cpp:1127
+#, c-format
+msgid "Failed to lock resource \"%s\"."
+msgstr "リソース \"%s\" をロックできませんでした。"
+
+#: ../src/unix/snglinst.cpp:198
+#, c-format
+msgid "Failed to lock the lock file '%s'"
+msgstr "ロックファイル '%s' をロックできませんでした"
+
+#: ../src/unix/epolldispatcher.cpp:136
+#, c-format
+msgid "Failed to modify descriptor %d in epoll descriptor %d"
+msgstr "記述子 %d の変更が epoll 記述子 %d 内でできませんでした"
+
+#: ../src/common/filename.cpp:2681
+#, c-format
+msgid "Failed to modify file times for '%s'"
+msgstr "'%s' のファイル時刻を変更できませんでした"
+
+#: ../src/common/selectdispatcher.cpp:252
+msgid "Failed to monitor I/O channels"
+msgstr "I/O チャンネルの監視に失敗しました。"
+
+#: ../src/common/filename.cpp:194
+#, c-format
+msgid "Failed to open '%s' for reading"
+msgstr "読み取りのためのファイル '%s' を開くことができません"
+
+#: ../src/common/filename.cpp:199
+#, c-format
+msgid "Failed to open '%s' for writing"
+msgstr "ファイル '%s' を書き込み用に開くことができません"
+
+#: ../src/html/chm.cpp:141
+#, c-format
+msgid "Failed to open CHM archive '%s'."
+msgstr "CHM 書庫 '%s' を開くことができませんでした。"
+
+#: ../src/common/utilscmn.cpp:1135
+#, c-format
+msgid "Failed to open URL \"%s\" in default browser."
+msgstr "デフォルトブラウザでURL \"%s\" を開けませんでした。"
+
+#: ../include/wx/msw/private/fswatcher.h:92
+#, c-format
+msgid "Failed to open directory \"%s\" for monitoring."
+msgstr "監視対象のディレクトリー \"%s\" を開くことができませんでした。"
+
+#: ../src/x11/utils.cpp:223
+#, c-format
+msgid "Failed to open display \"%s\"."
+msgstr "ディスプレイ \"%s\" を開くことができませんでした。"
+
+#: ../src/common/filename.cpp:1115
+msgid "Failed to open temporary file."
+msgstr "一時ファイルを開くことができませんでした。"
+
+#: ../src/msw/clipbrd.cpp:94
+msgid "Failed to open the clipboard."
+msgstr "クリップボードを開くことができませんでした。"
+
+#: ../src/common/translation.cpp:1170
+#, c-format
+msgid "Failed to parse Plural-Forms: '%s'"
+msgstr "複数形を解析できません: '%s'"
+
+#: ../src/unix/mediactrl.cpp:1268
+#, fuzzy, c-format
+msgid "Failed to prepare playing \"%s\"."
+msgstr "ディスプレイ \"%s\" を開くことができませんでした。"
+
+#: ../src/msw/clipbrd.cpp:647
+msgid "Failed to put data on the clipboard"
+msgstr "データをクリップボードに置けませんでした。"
+
+#: ../src/unix/snglinst.cpp:278
+msgid "Failed to read PID from lock file."
+msgstr "ロックファイルからPIDを読み取れませんでした。"
+
+#: ../src/common/fileconf.cpp:464
+msgid "Failed to read config options."
+msgstr "設定オプションを読み取ることができませんでした。"
+
+#: ../src/common/docview.cpp:678
+#, c-format
+msgid "Failed to read document from the file \"%s\"."
+msgstr "ファイル \"%s\" から文書を読み取れませんでした。"
+
+#: ../src/dfb/evtloop.cpp:98
+msgid "Failed to read event from DirectFB pipe"
+msgstr "DirectFB パイプからのイベント読み取りに失敗しました。"
+
+#: ../src/unix/wakeuppipe.cpp:120
+msgid "Failed to read from wake-up pipe"
+msgstr "起動パイプからの読み取りに失敗しました。"
+
+#: ../src/unix/utilsunx.cpp:685
+msgid "Failed to redirect child process input/output"
+msgstr "子プロセスの入出力をリダイレクトできませんでした。"
+
+#: ../src/msw/utilsexc.cpp:697
+msgid "Failed to redirect the child process IO"
+msgstr "子プロセスの入出力をリダイレクトできませんでした。"
+
+#: ../src/msw/dde.cpp:293
+#, c-format
+msgid "Failed to register DDE server '%s'"
+msgstr "DDEサーバー '%s' を登録できませんでした。"
+
+#: ../src/common/fontmap.cpp:245
+#, c-format
+msgid "Failed to remember the encoding for the charset '%s'."
+msgstr "文字集合 '%s' に対するエンコーディングの記録に失敗しました。"
+
+#: ../src/common/debugrpt.cpp:227
+#, c-format
+msgid "Failed to remove debug report file \"%s\""
+msgstr "デバッグレポートファイル \"%s\" を削除できませんでした。"
+
+#: ../src/unix/snglinst.cpp:322
+#, c-format
+msgid "Failed to remove lock file '%s'"
+msgstr "ロックファイル '%s' を削除できませんでした。"
+
+#: ../src/unix/snglinst.cpp:288
+#, c-format
+msgid "Failed to remove stale lock file '%s'."
+msgstr "失効ロックファイル '%s' を削除できませんでした。"
+
+#: ../src/msw/registry.cpp:528
+#, c-format
+msgid "Failed to rename registry value '%s' to '%s'."
+msgstr "レジストリーの値を '%s' から '%s' に改名できませんでした。"
+
+#: ../src/common/filefn.cpp:1168
+#, c-format
+msgid ""
+"Failed to rename the file '%s' to '%s' because the destination file already "
+"exists."
+msgstr ""
+"ファイル '%s' を '%s' に改名できませんでした。改名先のファイルがすでに存在し"
+"ています。"
+
+#: ../src/msw/registry.cpp:633
+#, c-format
+msgid "Failed to rename the registry key '%s' to '%s'."
+msgstr "レジストリーキー '%s' を '%s' に改名できませんでした。"
+
+#: ../src/msw/clipbrd.cpp:497
+msgid "Failed to retrieve data from the clipboard."
+msgstr "クリップボードからデータを受け取ることができませんでした。"
+
+#: ../src/common/filename.cpp:2777
+#, c-format
+msgid "Failed to retrieve file times for '%s'"
+msgstr "'%s' のファイル時刻を取得できませんでした。"
+
+#: ../src/msw/dialup.cpp:487
+msgid "Failed to retrieve text of RAS error message"
+msgstr "RAS エラーメッセージのテキストを取得できませんでした。"
+
+#: ../src/msw/clipbrd.cpp:784
+msgid "Failed to retrieve the supported clipboard formats"
+msgstr "対応しているクリップボードの様式を取得できませんでした。"
+
+#: ../src/common/docview.cpp:649
+#, c-format
+msgid "Failed to save document to the file \"%s\"."
+msgstr "文書をファイル \"%s\" に保存できませんでした。"
+
+#: ../src/msw/dib.cpp:326
+#, c-format
+msgid "Failed to save the bitmap image to file \"%s\"."
+msgstr "ファイル \"%s\" にビットマップイメージを保存できませんでした。"
+
+#: ../src/msw/dde.cpp:768
+msgid "Failed to send DDE advise notification"
+msgstr "DDE アドバイス通知を送信できませんでした。"
+
+#: ../src/common/ftp.cpp:404
+#, c-format
+msgid "Failed to set FTP transfer mode to %s."
+msgstr "FTP転送モードを %s に変更できませんでした。"
+
+#: ../src/msw/clipbrd.cpp:373
+msgid "Failed to set clipboard data."
+msgstr "クリップボードデータを設定できませんでした。"
+
+#: ../src/unix/snglinst.cpp:181
+#, c-format
+msgid "Failed to set permissions on lock file '%s'"
+msgstr "ロックファイル '%s' のパーミッションを設定できませんでした。"
+
+#: ../src/unix/utilsunx.cpp:674
+#, fuzzy
+msgid "Failed to set process priority"
+msgstr "スレッド優先度を %d に設定できませんでした。"
+
+#: ../src/common/file.cpp:576
+msgid "Failed to set temporary file permissions"
+msgstr "一時ファイルのパーミッションを設定できませんでした。"
+
+#: ../src/gtk/textctrl.cpp:1058
+msgid "Failed to set text in the text control."
+msgstr "そのテキストコントロールにテキストを設定できませんでした。"
+
+#: ../src/unix/threadpsx.cpp:1293
+#, fuzzy, c-format
+msgid "Failed to set thread concurrency level to %lu"
+msgstr "スレッド優先度を %d に設定できませんでした。"
+
+#: ../src/unix/threadpsx.cpp:1377 ../src/unix/threadpsx.cpp:1387
+#, c-format
+msgid "Failed to set thread priority %d."
+msgstr "スレッド優先度を %d に設定できませんでした。"
+
+#: ../src/unix/utilsunx.cpp:791
+msgid "Failed to set up non-blocking pipe, the program might hang."
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:261
+#, c-format
+msgid "Failed to store image '%s' to memory VFS!"
+msgstr "メモリーVFS にイメージ '%s' を格納できませんでした。"
+
+#: ../src/dfb/evtloop.cpp:170
+msgid "Failed to switch DirectFB pipe to non-blocking mode"
+msgstr ""
+"DirectFB パイプを non-blocking モードに切り替えることができませんでした"
+
+#: ../src/unix/wakeuppipe.cpp:59
+msgid "Failed to switch wake up pipe to non-blocking mode"
+msgstr "起動パイプをnon-blockingモードに切り替えることができませんでした"
+
+#: ../src/unix/threadpsx.cpp:1569
+msgid "Failed to terminate a thread."
+msgstr "スレッドを終了できませんでした。"
+
+#: ../src/msw/dde.cpp:746
+msgid "Failed to terminate the advise loop with DDE server"
+msgstr "DDE サーバ他とのアドバイスループを終了できませんでした。"
+
+#: ../src/msw/dialup.cpp:959
+#, c-format
+msgid "Failed to terminate the dialup connection: %s"
+msgstr "ダイヤルアップ接続を終了できませんでした: %s"
+
+#: ../src/common/filename.cpp:2696
+#, c-format
+msgid "Failed to touch the file '%s'"
+msgstr "ファイル '%s' の属性を変更できませんでした。"
+
+#: ../src/unix/snglinst.cpp:328
+#, c-format
+msgid "Failed to unlock lock file '%s'"
+msgstr "ロックファイル '%s' のロック解除ができませんでした。"
+
+#: ../src/msw/dde.cpp:314
+#, c-format
+msgid "Failed to unregister DDE server '%s'"
+msgstr "DDE サーバ '%s' の登録を削除できませんでした。"
+
+#: ../src/unix/epolldispatcher.cpp:155
+#, c-format
+msgid "Failed to unregister descriptor %d from epoll descriptor %d"
+msgstr "記述子 %d を epoll記述子 %d から削除できませんでした。"
+
+#: ../src/common/fileconf.cpp:1037
+msgid "Failed to update user configuration file."
+msgstr "ユーザー設定ファイルを更新できませんでした。"
+
+#: ../src/common/debugrpt.cpp:738
+#, c-format
+msgid "Failed to upload the debug report (error code %d)."
+msgstr "デバッグレポートのアップロードができませんでした (エラーコード %d)。"
+
+#: ../src/unix/snglinst.cpp:168
+#, c-format
+msgid "Failed to write to lock file '%s'"
+msgstr "ロックファイル '%s' に書き込めませんでした。"
+
+#: ../src/propgrid/propgrid.cpp:172
+msgid "False"
+msgstr "偽"
+
+#: ../src/propgrid/advprops.cpp:658
+msgid "Family"
+msgstr "フォントファミリー"
+
+#: ../src/common/stockitem.cpp:157 ../src/msw/wince/filedlgwce.cpp:121
+msgid "File"
+msgstr "ファイル"
+
+#: ../src/common/docview.cpp:666
+#, c-format
+msgid "File \"%s\" could not be opened for reading."
+msgstr "ファイル '%s' を読み取ろうとしましたが開くことができません"
+
+#: ../src/common/docview.cpp:643
+#, c-format
+msgid "File \"%s\" could not be opened for writing."
+msgstr "ファイル '%s' に書き込もうとしましたが開くことができません"
+
+#: ../src/gtk/filedlg.cpp:56
+#, c-format
+msgid "File '%s' already exists, do you really want to overwrite it?"
+msgstr "ファイル %s はすでに存在します。上書きしてよろしいですか?"
+
+#: ../src/os2/filedlg.cpp:310
+#, c-format
+msgid ""
+"File '%s' already exists.\n"
+"Do you want to replace it?"
+msgstr ""
+"ファイル '%s' はすでに存在します。\n"
+"置き換えますか?"
+
+#: ../src/common/filefn.cpp:1207
+#, fuzzy, c-format
+msgid "File '%s' couldn't be removed"
+msgstr "ファイル '%s' を開くことができません。"
+
+#: ../src/common/filefn.cpp:1187
+#, fuzzy, c-format
+msgid "File '%s' couldn't be renamed '%s'"
+msgstr "ファイル '%s' を開くことができません。"
+
+#: ../src/richtext/richtextctrl.cpp:2688 ../src/common/textcmn.cpp:921
+msgid "File couldn't be loaded."
+msgstr "ファイルを読み取ることができません。"
+
+#: ../src/msw/filedlg.cpp:458
+#, c-format
+msgid "File dialog failed with error code %0lx."
+msgstr "ファイルダイアログがエラー %0lx で失敗しました。"
+
+#: ../src/common/docview.cpp:1771
+msgid "File error"
+msgstr "ファイルエラー"
+
+#: ../src/generic/dirctrlg.cpp:688 ../src/generic/filectrlg.cpp:805
+msgid "File name exists already."
+msgstr "その名前のファイルはすでに存在します。"
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Files"
+msgstr "ファイル"
+
+#: ../src/common/filefn.cpp:1761
+#, c-format
+msgid "Files (%s)"
+msgstr "ファイル (%s)"
+
+#: ../src/motif/filedlg.cpp:218
+msgid "Filter"
+msgstr "フィルター"
+
+#: ../src/common/stockitem.cpp:158 ../src/html/helpwnd.cpp:500
+msgid "Find"
+msgstr "検索"
+
+#: ../src/common/stockitem.cpp:159
+#, fuzzy
+msgid "First"
+msgstr "最初 (&F)"
+
+#: ../src/common/prntbase.cpp:1518
+#, fuzzy
+msgid "First page"
+msgstr "次のページ"
+
+#: ../src/richtext/richtextsizepage.cpp:521
+#, fuzzy
+msgid "Fixed"
+msgstr "固定幅フォント:"
+
+#: ../src/html/helpwnd.cpp:1219
+msgid "Fixed font:"
+msgstr "固定幅フォント:"
+
+#: ../src/html/helpwnd.cpp:1282
+msgid "Fixed size face.<br> <b>bold</b> <i>italic</i> "
+msgstr "固定幅。<br> <b>太字</b><i>イタリック</i>"
+
+#: ../src/richtext/richtextsizepage.cpp:229
+msgid "Floating"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:160
+#, fuzzy
+msgid "Floppy"
+msgstr "フロッピーディスク (&F)"
+
+#: ../src/common/paper.cpp:112
+msgid "Folio, 8 1/2 x 13 in"
+msgstr "フォリオ, 8 1/2 x 13インチ"
+
+#: ../src/richtext/richtextformatdlg.cpp:324 ../src/osx/carbon/fontdlg.cpp:473
+#: ../src/common/stockitem.cpp:194
+msgid "Font"
+msgstr "フォント"
+
+#: ../src/richtext/richtextfontpage.cpp:230
+msgid "Font &weight:"
+msgstr "フォントのウエイト(&W):"
+
+#: ../src/html/helpwnd.cpp:1220
+msgid "Font size:"
+msgstr "フォントの大きさ:"
+
+#: ../src/richtext/richtextfontpage.cpp:217
+msgid "Font st&yle:"
+msgstr "フォントのスタイル(&Y):"
+
+#: ../src/osx/carbon/fontdlg.cpp:515
+msgid "Font:"
+msgstr "フォント:"
+
+#: ../src/dfb/fontmgr.cpp:198
+#, c-format
+msgid "Fonts index file %s disappeared while loading fonts."
+msgstr "フォントの読み取り中に索引ファイル %s が失われました。"
+
+#: ../src/unix/utilsunx.cpp:651
+msgid "Fork failed"
+msgstr "フォークに失敗しました"
+
+#: ../src/common/stockitem.cpp:161
+#, fuzzy
+msgid "Forward"
+msgstr "進行 (&F)"
+
+#: ../src/common/xtixml.cpp:235
+msgid "Forward hrefs are not supported"
+msgstr "前方参照のhrefには未対応です"
+
+#: ../src/html/helpwnd.cpp:888
+#, c-format
+msgid "Found %i matches"
+msgstr "%i 件の該当部を発見"
+
+#: ../src/generic/prntdlgg.cpp:238
+msgid "From:"
+msgstr "開始ページ:"
+
+#: ../src/common/imaggif.cpp:160
+msgid "GIF: Invalid gif index."
+msgstr "GIF: gifの索引が正しくないようです。"
+
+#: ../src/common/imaggif.cpp:150
+msgid "GIF: data stream seems to be truncated."
+msgstr "GIF: データストリームに欠落があるようです。"
+
+#: ../src/common/imaggif.cpp:134
+msgid "GIF: error in GIF image format."
+msgstr "GIF: GIF画像形式にエラーがありました。"
+
+#: ../src/common/imaggif.cpp:137
+msgid "GIF: not enough memory."
+msgstr "GIF: メモリ不足です。"
+
+#: ../src/common/imaggif.cpp:140
+msgid "GIF: unknown error!!!"
+msgstr "GIF: 未知のエラーを検出しました。"
+
+#: ../src/gtk/window.cpp:4288
+msgid ""
+"GTK+ installed on this machine is too old to support screen compositing, "
+"please install GTK+ 2.12 or later."
+msgstr ""
+
+#: ../src/univ/themes/gtk.cpp:525
+msgid "GTK+ theme"
+msgstr "GTK+ テーマ"
+
+#: ../src/common/preferencescmn.cpp:39
+msgid "General"
+msgstr ""
+
+#: ../src/common/prntbase.cpp:243
+msgid "Generic PostScript"
+msgstr "汎用 PostScipt"
+
+#: ../src/common/paper.cpp:136
+msgid "German Legal Fanfold, 8 1/2 x 13 in"
+msgstr "ドイツリーガル折りたたみ連続紙, 8 1/2 x 13インチ"
+
+#: ../src/common/paper.cpp:135
+msgid "German Std Fanfold, 8 1/2 x 12 in"
+msgstr "ドイツ標準折りたたみ連続紙, 8 1/2 x 12インチ"
+
+#: ../include/wx/xtiprop.h:188
+msgid "GetProperty called w/o valid getter"
+msgstr "適切な getter なしに GetPropertyが呼び出されました。"
+
+#: ../include/wx/xtiprop.h:266
+msgid "GetPropertyCollection called on a generic accessor"
+msgstr "汎用アクセサーに対して GetPropertyCollection が呼び出されました。"
+
+#: ../include/wx/xtiprop.h:206
+msgid "GetPropertyCollection called w/o valid collection getter"
+msgstr ""
+"適切なコレクション getter なしに GetPropertyCollection が呼び出されました。"
+
+#: ../src/html/helpwnd.cpp:673
+msgid "Go back"
+msgstr "戻る"
+
+#: ../src/html/helpwnd.cpp:674
+msgid "Go forward"
+msgstr "進む"
+
+#: ../src/html/helpwnd.cpp:676
+msgid "Go one level up in document hierarchy"
+msgstr "文書構造のひとつ上へ"
+
+#: ../src/generic/filedlgg.cpp:223 ../src/generic/dirdlgg.cpp:136
+msgid "Go to home directory"
+msgstr "ホームディレクトリーへ移動"
+
+#: ../src/generic/filedlgg.cpp:219
+msgid "Go to parent directory"
+msgstr "親ディレクトリーへ移動"
+
+#: ../src/generic/aboutdlgg.cpp:76
+msgid "Graphics art by "
+msgstr "デザイナー"
+
+#: ../src/common/fmapbase.cpp:154
+msgid "Greek (ISO-8859-7)"
+msgstr "ギリシャ語 (ISO-8859-7)"
+
+#: ../src/richtext/richtextborderspage.cpp:547
+msgid "Groove"
+msgstr ""
+
+#: ../src/common/zstream.cpp:158 ../src/common/zstream.cpp:318
+msgid "Gzip not supported by this version of zlib"
+msgstr "このバージョンの zlib は Gzip を処理できません"
+
+#: ../src/common/accelcmn.cpp:75
+msgid "HELP"
+msgstr "HELP"
+
+#: ../src/common/accelcmn.cpp:60
+msgid "HOME"
+msgstr "HOME"
+
+#: ../src/html/helpwnd.cpp:1552
+msgid "HTML Help Project (*.hhp)|*.hhp|"
+msgstr "HTMLヘルププロジェクト (*.hhp)|*.hhp|"
+
+#: ../src/html/htmlwin.cpp:659
+#, c-format
+msgid "HTML anchor %s does not exist."
+msgstr "HTMLアンカー %s は存在しません。"
+
+#: ../src/html/helpwnd.cpp:1550
+msgid "HTML files (*.html;*.htm)|*.html;*.htm|"
+msgstr "HTML ファイル (*.html;*.htm)|*.html;*.htm|"
+
+#: ../src/common/stockitem.cpp:162
+#, fuzzy
+msgid "Harddisk"
+msgstr "ハードディスク (&H)"
+
+#: ../src/common/fmapbase.cpp:155
+msgid "Hebrew (ISO-8859-8)"
+msgstr "ヘブライ語 (ISO-8859-8)"
+
+#: ../include/wx/msgdlg.h:275 ../src/osx/button_osx.cpp:39
+#: ../src/common/stockitem.cpp:163 ../src/html/helpdlg.cpp:66
+#: ../src/html/helpfrm.cpp:116
+msgid "Help"
+msgstr "ヘルプ"
+
+#: ../src/html/helpwnd.cpp:1213
+msgid "Help Browser Options"
+msgstr "ヘルプブラウザのオプション"
+
+#: ../src/generic/helpext.cpp:458 ../src/generic/helpext.cpp:459
+msgid "Help Index"
+msgstr "ヘルプの索引"
+
+#: ../src/html/helpwnd.cpp:1534
+msgid "Help Printing"
+msgstr "ヘルプの印刷"
+
+#: ../src/html/helpwnd.cpp:814
+msgid "Help Topics"
+msgstr "ヘルプトピック"
+
+#: ../src/html/helpwnd.cpp:1551
+msgid "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+msgstr "ヘルプブック (*.htb)|*.htb|ヘルプブック (*.zip)|*.zip|"
+
+#: ../src/generic/helpext.cpp:271
+#, c-format
+msgid "Help directory \"%s\" not found."
+msgstr "ヘルプディレクトリー \"%s\" が見つかりません。"
+
+#: ../src/generic/helpext.cpp:279
+#, c-format
+msgid "Help file \"%s\" not found."
+msgstr "ヘルプファイル \"%s\" が見つかりません。"
+
+#: ../src/html/helpctrl.cpp:63
+#, c-format
+msgid "Help: %s"
+msgstr "ヘルプ: %s"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:649
+#, fuzzy, c-format
+msgid "Hide %s"
+msgstr "ヘルプ: %s"
+
+#: ../src/osx/menu_osx.cpp:604 ../src/osx/menu_osx.cpp:651
+msgid "Hide Others"
+msgstr ""
+
+#: ../src/generic/infobar.cpp:85
+msgid "Hide this notification message."
+msgstr "この通知メッセージを隠します。"
+
+#: ../src/generic/dirdlgg.cpp:98 ../src/common/stockitem.cpp:164
+msgid "Home"
+msgstr "ホーム"
+
+#: ../src/generic/dirctrlg.cpp:624
+msgid "Home directory"
+msgstr "ホームディレクトリー"
+
+#: ../src/richtext/richtextsizepage.cpp:253
+#: ../src/richtext/richtextsizepage.cpp:255
+msgid "How the object will float relative to the text."
+msgstr ""
+
+#: ../src/common/imagbmp.cpp:1118
+msgid "ICO: Error in reading mask DIB."
+msgstr "ICO: マスクDIBの読み取り中にエラーを検出しました。"
+
+#: ../src/common/imagbmp.cpp:1233 ../src/common/imagbmp.cpp:1294
+#: ../src/common/imagbmp.cpp:1305 ../src/common/imagbmp.cpp:1318
+#: ../src/common/imagbmp.cpp:1363 ../src/common/imagbmp.cpp:1375
+#: ../src/common/imagbmp.cpp:1386
+msgid "ICO: Error writing the image file!"
+msgstr "ICO: 画像ファイルの書き出し中にエラーが発生しました。"
+
+#: ../src/common/imagbmp.cpp:1198
+msgid "ICO: Image too tall for an icon."
+msgstr "ICO: 縦に長すぎます。アイコンに変換できません。"
+
+#: ../src/common/imagbmp.cpp:1206
+msgid "ICO: Image too wide for an icon."
+msgstr "ICO: 幅が大きすぎます。アイコンに変換できません。"
+
+#: ../src/common/imagbmp.cpp:1466
+msgid "ICO: Invalid icon index."
+msgstr "ICO: アイコンの索引が不正のようです。"
+
+#: ../src/common/imagiff.cpp:759
+msgid "IFF: data stream seems to be truncated."
+msgstr "IFF: データストリームに欠落があるようです。"
+
+#: ../src/common/imagiff.cpp:743
+msgid "IFF: error in IFF image format."
+msgstr "IFF: IFF画像形式にエラーがありました。"
+
+#: ../src/common/imagiff.cpp:746
+msgid "IFF: not enough memory."
+msgstr "IFF: メモリ不足です。"
+
+#: ../src/common/imagiff.cpp:749
+msgid "IFF: unknown error!!!"
+msgstr "IFF: 未対応のエラーが発生しました。"
+
+#: ../src/common/accelcmn.cpp:50
+msgid "INS"
+msgstr "INS"
+
+#: ../src/common/accelcmn.cpp:51
+msgid "INSERT"
+msgstr "INSERT"
+
+#: ../src/common/fmapbase.cpp:197
+msgid "ISO-2022-JP"
+msgstr "ISO-2022-JP"
+
+#: ../src/osx/carbon/dataview.cpp:2420
+msgid "Icon & text renderer cannot render value; value type: "
+msgstr "アイコンとテキストのレンダラーが値を処理できません; 値の型: "
+
+#: ../src/html/htmprint.cpp:282
+msgid ""
+"If possible, try changing the layout parameters to make the printout more "
+"narrow."
+msgstr "出力結果がより狭い範囲に収まるように印刷設定値を変更してください。"
+
+#: ../src/generic/dbgrptg.cpp:358
+msgid ""
+"If you have any additional information pertaining to this bug\n"
+"report, please enter it here and it will be joined to it:"
+msgstr ""
+"このバグレポートに関連する追加情報をお持ちの場合は\n"
+"ここに記入頂くことでバグレポートに追加されます:"
+
+#: ../src/generic/dbgrptg.cpp:324
+msgid ""
+"If you wish to suppress this debug report completely, please choose the "
+"\"Cancel\" button,\n"
+"but be warned that it may hinder improving the program, so if\n"
+"at all possible please do continue with the report generation.\n"
+msgstr ""
+"以後のデバッグレポート表示を完全に抑制したい場合は\"キャンセル\"ボタンを使っ"
+"てください。\n"
+"ただし、その抑制指示はプログラムの修正を遠ざけることになりますので\n"
+"できる限りレポート生成を続けるようにしてください。\n"
+
+#: ../src/msw/registry.cpp:1395
+#, c-format
+msgid "Ignoring value \"%s\" of the key \"%s\"."
+msgstr "値 \"%s\" を無視します (キー \"%s\")。"
+
+#: ../src/common/xtistrm.cpp:299
+msgid "Illegal Object Class (Non-wxEvtHandler) as Event Source"
+msgstr "wxEvtHandler ではないオブジェクトクラスがイベントソースになっています"
+
+#: ../src/common/xti.cpp:513
+msgid "Illegal Parameter Count for ConstructObject Method"
+msgstr "ConstructObject メソッドに不正なカウント引数が与えられました。"
+
+#: ../src/common/xti.cpp:501
+msgid "Illegal Parameter Count for Create Method"
+msgstr "Create メソッドに不正なカウント引数が与えられました。"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/filectrlg.cpp:791
+msgid "Illegal directory name."
+msgstr "不正なディレクトリー名です。"
+
+#: ../src/generic/filectrlg.cpp:1380
+msgid "Illegal file specification."
+msgstr "ファイル記述子が不正です。"
+
+#: ../src/common/image.cpp:2158
+msgid "Image and mask have different sizes."
+msgstr "画像とマスクが異なる大きさになっています。"
+
+#: ../src/common/image.cpp:2609
+#, fuzzy, c-format
+msgid "Image file is not of type %d."
+msgstr "画像ファイルは %ld 形式ではないようです。"
+
+#: ../src/common/image.cpp:2739
+#, fuzzy, c-format
+msgid "Image is not of type %s."
+msgstr "画像ファイルは %s 形式ではないようです。"
+
+#: ../src/msw/textctrl.cpp:399
+msgid ""
+"Impossible to create a rich edit control, using simple text control instead. "
+"Please reinstall riched32.dll"
+msgstr ""
+"リッチエディットコントロールを作成できませんでした。代わりに簡素なテキストコ"
+"ントロールを使います。 riched32.dllを再インストールしてください。"
+
+#: ../src/unix/utilsunx.cpp:307
+msgid "Impossible to get child process input"
+msgstr "子プロセスの入力は取得不可能です。"
+
+#: ../src/common/filefn.cpp:1074
+#, c-format
+msgid "Impossible to get permissions for file '%s'"
+msgstr "ファイル '%s' へのパーミッションは取得不可能です"
+
+#: ../src/common/filefn.cpp:1088
+#, c-format
+msgid "Impossible to overwrite the file '%s'"
+msgstr "ファイル '%s' の上書きは不可能です"
+
+#: ../src/common/filefn.cpp:1142
+#, c-format
+msgid "Impossible to set permissions for the file '%s'"
+msgstr "ファイル '%s' へのパーミッションは設定不可能です"
+
+#: ../src/common/gifdecod.cpp:818
+#, c-format
+msgid "Incorrect GIF frame size (%u, %d) for the frame #%u"
+msgstr "GIF フレームの大きさ (%u, %d) が不適切です (フレーム #%u)"
+
+#: ../src/msw/ole/automtn.cpp:624
+msgid "Incorrect number of arguments."
+msgstr ""
+
+#: ../src/common/stockitem.cpp:165
+msgid "Indent"
+msgstr "字下げ"
+
+#: ../src/richtext/richtextformatdlg.cpp:330
+msgid "Indents && Spacing"
+msgstr "字下げと間隔"
+
+#: ../src/common/stockitem.cpp:166 ../src/html/helpwnd.cpp:525
+msgid "Index"
+msgstr "索引"
+
+#: ../src/common/fmapbase.cpp:159
+msgid "Indian (ISO-8859-12)"
+msgstr "ISO-8859-12 (ケルト語→14/デーヴァナーガリー→破棄)"
+
+#: ../src/common/stockitem.cpp:167
+#, fuzzy
+msgid "Info"
+msgstr "情報 (&I)"
+
+#: ../src/common/init.cpp:276
+msgid "Initialization failed in post init, aborting."
+msgstr "PostInit の初期化に失敗しました。中断します。"
+
+#: ../src/richtext/richtextsymboldlg.cpp:472
+msgid "Insert"
+msgstr "挿入"
+
+#: ../src/richtext/richtextbuffer.cpp:7687
+#, fuzzy
+msgid "Insert Field"
+msgstr "テキストの挿入"
+
+#: ../src/richtext/richtextbuffer.cpp:7598
+#: ../src/richtext/richtextbuffer.cpp:8551
+msgid "Insert Image"
+msgstr "画像の挿入"
+
+#: ../src/richtext/richtextbuffer.cpp:7645
+#, fuzzy
+msgid "Insert Object"
+msgstr "テキストの挿入"
+
+#: ../src/richtext/richtextctrl.cpp:1172 ../src/richtext/richtextctrl.cpp:1362
+#: ../src/richtext/richtextbuffer.cpp:7440
+#: ../src/richtext/richtextbuffer.cpp:7470
+#: ../src/richtext/richtextbuffer.cpp:7514
+msgid "Insert Text"
+msgstr "テキストの挿入"
+
+#: ../src/richtext/richtextindentspage.cpp:295
+#: ../src/richtext/richtextindentspage.cpp:297
+#, fuzzy
+msgid "Inserts a page break before the paragraph."
+msgstr "段落の前の空間を指定します。"
+
+#: ../src/richtext/richtextborderspage.cpp:549
+#, fuzzy
+msgid "Inset"
+msgstr "挿入"
+
+#: ../src/gtk/app.cpp:429
+#, c-format
+msgid "Invalid GTK+ command line option, use \"%s --help\""
+msgstr ""
+"不適切な GTK+ コマンドラインオプションです。\"%s --help\" で確認してくださ"
+"い。"
+
+#: ../src/common/imagtiff.cpp:314
+msgid "Invalid TIFF image index."
+msgstr "TIFF 画像索引が不正です。"
+
+#: ../src/osx/carbon/dataview.cpp:1782 ../src/osx/carbon/dataview.cpp:1877
+msgid "Invalid data view item"
+msgstr "不適切なデータビュー項目です"
+
+#: ../src/common/appcmn.cpp:266
+#, c-format
+msgid "Invalid display mode specification '%s'."
+msgstr "画面モード '%s' は正しい指定ではありません。"
+
+#: ../src/x11/app.cpp:121
+#, c-format
+msgid "Invalid geometry specification '%s'"
+msgstr "画面設定 '%s' は正しい指定ではありません"
+
+#: ../src/unix/fswatcher_inotify.cpp:298
+#, c-format
+msgid "Invalid inotify event for \"%s\""
+msgstr ""
+
+#: ../src/unix/snglinst.cpp:306
+#, c-format
+msgid "Invalid lock file '%s'."
+msgstr "不正なロックファイルです: '%s'"
+
+#: ../src/common/translation.cpp:1111
+msgid "Invalid message catalog."
+msgstr "正しいメッセージカタログではありません。"
+
+#: ../src/common/xtistrm.cpp:409 ../src/common/xtistrm.cpp:424
+msgid "Invalid or Null Object ID passed to GetObjectClassInfo"
+msgstr ""
+"Null または不正なオブジェクト識別子が GetObjectClassInfo に渡されました。"
+
+#: ../src/common/xtistrm.cpp:439
+msgid "Invalid or Null Object ID passed to HasObjectClassInfo"
+msgstr ""
+"Null または不正なオブジェクト識別子が HasObjectClassInfo に渡されました。"
+
+#: ../src/common/regex.cpp:313
+#, c-format
+msgid "Invalid regular expression '%s': %s"
+msgstr "不正な正規表現です '%s': %s"
+
+#: ../src/common/config.cpp:226
+#, c-format
+msgid "Invalid value %ld for a boolean key \"%s\" in config file."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:329 ../src/richtext/richtextfontpage.cpp:333
+#: ../src/osx/carbon/fontdlg.cpp:547 ../src/common/stockitem.cpp:168
+msgid "Italic"
+msgstr "イタリック"
+
+#: ../src/common/paper.cpp:131
+msgid "Italy Envelope, 110 x 230 mm"
+msgstr "イタリア封筒, 110 x 230mm"
+
+#: ../src/common/imagjpeg.cpp:255
+msgid "JPEG: Couldn't load - file is probably corrupted."
+msgstr "JPEG: 読み取れません。おそらくファイルが壊れています。"
+
+#: ../src/common/imagjpeg.cpp:434
+msgid "JPEG: Couldn't save image."
+msgstr "JPEG: 画像を保存できません。"
+
+#: ../src/common/paper.cpp:164
+msgid "Japanese Double Postcard 200 x 148 mm"
+msgstr "往復はがき 200×248mm"
+
+#: ../src/common/paper.cpp:168
+msgid "Japanese Envelope Chou #3"
+msgstr "長形3号"
+
+#: ../src/common/paper.cpp:181
+msgid "Japanese Envelope Chou #3 Rotated"
+msgstr "長形3号横置き"
+
+#: ../src/common/paper.cpp:169
+msgid "Japanese Envelope Chou #4"
+msgstr "長形4号"
+
+#: ../src/common/paper.cpp:182
+msgid "Japanese Envelope Chou #4 Rotated"
+msgstr "長形4号横置き"
+
+#: ../src/common/paper.cpp:166
+msgid "Japanese Envelope Kaku #2"
+msgstr "角形2号"
+
+#: ../src/common/paper.cpp:179
+msgid "Japanese Envelope Kaku #2 Rotated"
+msgstr "角形2号横置き"
+
+#: ../src/common/paper.cpp:167
+msgid "Japanese Envelope Kaku #3"
+msgstr "角形3号"
+
+#: ../src/common/paper.cpp:180
+msgid "Japanese Envelope Kaku #3 Rotated"
+msgstr "角形3号横置き"
+
+#: ../src/common/paper.cpp:186
+msgid "Japanese Envelope You #4"
+msgstr "洋形4号"
+
+#: ../src/common/paper.cpp:187
+msgid "Japanese Envelope You #4 Rotated"
+msgstr "洋形4号横置き"
+
+#: ../src/common/paper.cpp:139
+msgid "Japanese Postcard 100 x 148 mm"
+msgstr "はがき 100×148mm"
+
+#: ../src/common/paper.cpp:176
+msgid "Japanese Postcard Rotated 148 x 100 mm"
+msgstr "はがき横置き 148×100mm"
+
+#: ../src/common/stockitem.cpp:169
+#, fuzzy
+msgid "Jump to"
+msgstr "移動 (&J)"
+
+#: ../src/common/stockitem.cpp:171
+msgid "Justified"
+msgstr "両端揃え"
+
+#: ../src/richtext/richtextindentspage.cpp:155
+#: ../src/richtext/richtextindentspage.cpp:157
+#: ../src/richtext/richtextliststylepage.cpp:344
+#: ../src/richtext/richtextliststylepage.cpp:346
+msgid "Justify text left and right."
+msgstr "左右端いっぱいにテキストを表示します。"
+
+#: ../src/common/fmapbase.cpp:163
+msgid "KOI8-R"
+msgstr "KOI8-R"
+
+#: ../src/common/fmapbase.cpp:164
+msgid "KOI8-U"
+msgstr "KOI8-U"
+
+#: ../src/common/accelcmn.cpp:254 ../src/common/accelcmn.cpp:336
+msgid "KP_"
+msgstr "Num"
+
+#: ../src/common/accelcmn.cpp:103
+msgid "KP_ADD"
+msgstr "Num+"
+
+#: ../src/common/accelcmn.cpp:98
+msgid "KP_BEGIN"
+msgstr "KP_BEGIN"
+
+#: ../src/common/accelcmn.cpp:106
+msgid "KP_DECIMAL"
+msgstr "KP_DECIMAL"
+
+#: ../src/common/accelcmn.cpp:100
+msgid "KP_DELETE"
+msgstr "KP_DELETE"
+
+#: ../src/common/accelcmn.cpp:107
+msgid "KP_DIVIDE"
+msgstr "Num/"
+
+#: ../src/common/accelcmn.cpp:92
+msgid "KP_DOWN"
+msgstr "Num↓"
+
+#: ../src/common/accelcmn.cpp:97
+msgid "KP_END"
+msgstr "NumEnd"
+
+#: ../src/common/accelcmn.cpp:87
+msgid "KP_ENTER"
+msgstr "NumEnter"
+
+#: ../src/common/accelcmn.cpp:101
+msgid "KP_EQUAL"
+msgstr "Num="
+
+#: ../src/common/accelcmn.cpp:88
+msgid "KP_HOME"
+msgstr "NumHome"
+
+#: ../src/common/accelcmn.cpp:99
+msgid "KP_INSERT"
+msgstr "NumInsert"
+
+#: ../src/common/accelcmn.cpp:89
+msgid "KP_LEFT"
+msgstr "Num←"
+
+#: ../src/common/accelcmn.cpp:102
+msgid "KP_MULTIPLY"
+msgstr "Num*"
+
+#: ../src/common/accelcmn.cpp:95
+msgid "KP_NEXT"
+msgstr "KP_NEXT"
+
+#: ../src/common/accelcmn.cpp:96
+msgid "KP_PAGEDOWN"
+msgstr "NumPageDown"
+
+#: ../src/common/accelcmn.cpp:94
+msgid "KP_PAGEUP"
+msgstr "NumPageUp"
+
+#: ../src/common/accelcmn.cpp:93
+msgid "KP_PRIOR"
+msgstr "KP_PRIOR"
+
+#: ../src/common/accelcmn.cpp:91
+msgid "KP_RIGHT"
+msgstr "Num→"
+
+#: ../src/common/accelcmn.cpp:104
+msgid "KP_SEPARATOR"
+msgstr "KP_SEPARATOR"
+
+#: ../src/common/accelcmn.cpp:85
+msgid "KP_SPACE"
+msgstr "KP_SPACE"
+
+#: ../src/common/accelcmn.cpp:105
+msgid "KP_SUBTRACT"
+msgstr "Num-"
+
+#: ../src/common/accelcmn.cpp:86
+msgid "KP_TAB"
+msgstr "KP_TAB"
+
+#: ../src/common/accelcmn.cpp:90
+msgid "KP_UP"
+msgstr "Num↑"
+
+#: ../src/richtext/richtextindentspage.cpp:270
+msgid "L&ine spacing:"
+msgstr "行間隔 (&I):"
+
+#: ../src/common/accelcmn.cpp:56
+msgid "LEFT"
+msgstr "←"
+
+#: ../src/generic/prntdlgg.cpp:613 ../src/generic/prntdlgg.cpp:868
+msgid "Landscape"
+msgstr "横置き"
+
+#: ../src/common/stockitem.cpp:174
+#, fuzzy
+msgid "Last"
+msgstr "最後 (&L)"
+
+#: ../src/common/prntbase.cpp:1542
+#, fuzzy
+msgid "Last page"
+msgstr "次のページ"
+
+#: ../src/common/log.cpp:309
+#, c-format
+msgid "Last repeated message (\"%s\", %lu time) wasn't output"
+msgid_plural "Last repeated message (\"%s\", %lu times) wasn't output"
+msgstr[0] ""
+
+#: ../src/common/paper.cpp:104
+msgid "Ledger, 17 x 11 in"
+msgstr "Ledger(帳簿), 17 x 11インチ"
+
+#: ../src/richtext/richtextliststylepage.cpp:249
+#: ../src/richtext/richtextliststylepage.cpp:252
+#: ../src/richtext/richtextliststylepage.cpp:253
+#: ../src/richtext/richtextbulletspage.cpp:199
+#: ../src/richtext/richtextbulletspage.cpp:202
+#: ../src/richtext/richtextbulletspage.cpp:203
+#: ../src/richtext/richtextsizepage.cpp:249
+msgid "Left"
+msgstr "左"
+
+#: ../src/richtext/richtextindentspage.cpp:204
+#: ../src/richtext/richtextliststylepage.cpp:390
+msgid "Left (&first line):"
+msgstr "左-一行目 (&F):"
+
+#: ../src/generic/prntdlgg.cpp:880
+msgid "Left margin (mm):"
+msgstr "余白-左 (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:141
+#: ../src/richtext/richtextindentspage.cpp:143
+#: ../src/richtext/richtextliststylepage.cpp:330
+#: ../src/richtext/richtextliststylepage.cpp:332
+msgid "Left-align text."
+msgstr "テキストを左寄せにします。"
+
+#: ../src/common/paper.cpp:145
+msgid "Legal Extra 9 1/2 x 15 in"
+msgstr "リーガル Extra 9 1/2 x 15インチ"
+
+#: ../src/common/paper.cpp:97
+msgid "Legal, 8 1/2 x 14 in"
+msgstr "リーガル, 8 1/2 x 14インチ"
+
+#: ../src/common/paper.cpp:144
+msgid "Letter Extra 9 1/2 x 12 in"
+msgstr "レター Extra 9 1/2 x 12インチ"
+
+#: ../src/common/paper.cpp:150
+msgid "Letter Extra Transverse 9.275 x 12 in"
+msgstr "レター Extra Transverse 9.275 x 12 インチ"
+
+#: ../src/common/paper.cpp:153
+msgid "Letter Plus 8 1/2 x 12.69 in"
+msgstr "レター Plus 8 1/2 x 12.69インチ"
+
+#: ../src/common/paper.cpp:170
+msgid "Letter Rotated 11 x 8 1/2 in"
+msgstr "レター 横置き 11 x 8 1/2インチ"
+
+#: ../src/common/paper.cpp:102
+msgid "Letter Small, 8 1/2 x 11 in"
+msgstr "レター Small, 8 1/2 x 11インチ"
+
+#: ../src/common/paper.cpp:148
+msgid "Letter Transverse 8 1/2 x 11 in"
+msgstr "レター Transverse 8 1/2 x 11インチ"
+
+#: ../src/common/paper.cpp:96
+msgid "Letter, 8 1/2 x 11 in"
+msgstr "レター, 8 1/2 x 11インチ"
+
+#: ../src/generic/aboutdlgg.cpp:173
+msgid "License"
+msgstr "許諾"
+
+#: ../src/generic/fontdlgg.cpp:332
+msgid "Light"
+msgstr "軽量"
+
+#: ../src/generic/helpext.cpp:298
+#, c-format
+msgid "Line %lu of map file \"%s\" has invalid syntax, skipped."
+msgstr ""
+"%lu 行目 (マップファイル \"%s\" ) に文法不適合がありました。無視します。"
+
+#: ../src/richtext/richtextliststylepage.cpp:444
+msgid "Line spacing:"
+msgstr "行間隔:"
+
+#: ../src/html/chm.cpp:838
+msgid "Link contained '//', converted to absolute link."
+msgstr "リンクは '//' を含んでいます。絶対パスリンクに変換しました。"
+
+#: ../src/richtext/richtextformatdlg.cpp:349
+msgid "List Style"
+msgstr "リストスタイル"
+
+#: ../src/richtext/richtextstyles.cpp:1060
+msgid "List styles"
+msgstr "リストスタイル"
+
+#: ../src/richtext/richtextfontpage.cpp:206
+#: ../src/richtext/richtextfontpage.cpp:208
+msgid "Lists font sizes in points."
+msgstr "利用できるポイント指定の大きさ一覧です。"
+
+#: ../src/richtext/richtextfontpage.cpp:199
+#: ../src/richtext/richtextfontpage.cpp:201
+msgid "Lists the available fonts."
+msgstr "利用できるフォントの一覧です。"
+
+#: ../src/common/fldlgcmn.cpp:325
+#, c-format
+msgid "Load %s file"
+msgstr "%s ファイルの読み取り"
+
+#: ../src/html/htmlwin.cpp:575
+msgid "Loading : "
+msgstr "読み取り中 : "
+
+#: ../src/unix/snglinst.cpp:246
+#, c-format
+msgid "Lock file '%s' has incorrect owner."
+msgstr "ロックファイル '%s' は不正な所有者を示しています。"
+
+#: ../src/unix/snglinst.cpp:251
+#, c-format
+msgid "Lock file '%s' has incorrect permissions."
+msgstr "ロックファイル '%s' は不正なパーミッションを示しています。"
+
+#: ../src/generic/logg.cpp:582
+#, c-format
+msgid "Log saved to the file '%s'."
+msgstr "ファイル '%s' にログを保存しました。"
+
+#: ../src/richtext/richtextliststylepage.cpp:484
+#: ../src/richtext/richtextbulletspage.cpp:289
+msgid "Lower case letters"
+msgstr "小文字単語"
+
+#: ../src/richtext/richtextliststylepage.cpp:486
+#: ../src/richtext/richtextbulletspage.cpp:291
+msgid "Lower case roman numerals"
+msgstr "小文字ローマ数字"
+
+#: ../src/gtk/mdi.cpp:422 ../src/gtk1/mdi.cpp:431
+msgid "MDI child"
+msgstr "MDI子ウィンドウ"
+
+#: ../src/common/accelcmn.cpp:68
+msgid "MENU"
+msgstr "MENU"
+
+#: ../src/msw/helpchm.cpp:56
+msgid ""
+"MS HTML Help functions are unavailable because the MS HTML Help library is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Microsoft Help ライブラリーがインストールされていないので Microsoft HTML "
+"Help 機能が使えません。そのライブラリーをインストールしてください。"
+
+#: ../src/univ/themes/win32.cpp:3754
+msgid "Ma&ximize"
+msgstr "最大化 (&X)"
+
+#: ../src/common/fmapbase.cpp:203
+msgid "MacArabic"
+msgstr "MacArabic"
+
+#: ../src/common/fmapbase.cpp:222
+msgid "MacArmenian"
+msgstr "MacArmenian"
+
+#: ../src/common/fmapbase.cpp:211
+msgid "MacBengali"
+msgstr "MacBengali"
+
+#: ../src/common/fmapbase.cpp:217
+msgid "MacBurmese"
+msgstr "MacBurmese"
+
+#: ../src/common/fmapbase.cpp:236
+msgid "MacCeltic"
+msgstr "MacCeltic"
+
+#: ../src/common/fmapbase.cpp:227
+msgid "MacCentralEurRoman"
+msgstr "MacCentralEurRoman"
+
+#: ../src/common/fmapbase.cpp:223
+msgid "MacChineseSimp"
+msgstr "MacChineseSimp"
+
+#: ../src/common/fmapbase.cpp:201
+msgid "MacChineseTrad"
+msgstr "MacChineseTrad"
+
+#: ../src/common/fmapbase.cpp:233
+msgid "MacCroatian"
+msgstr "MacCroatian"
+
+#: ../src/common/fmapbase.cpp:206
+msgid "MacCyrillic"
+msgstr "MacCyrillic"
+
+#: ../src/common/fmapbase.cpp:207
+msgid "MacDevanagari"
+msgstr "MacDevanagari"
+
+#: ../src/common/fmapbase.cpp:231
+msgid "MacDingbats"
+msgstr "MacDingbats"
+
+#: ../src/common/fmapbase.cpp:226
+msgid "MacEthiopic"
+msgstr "MacEthiopic"
+
+#: ../src/common/fmapbase.cpp:229
+msgid "MacExtArabic"
+msgstr "MacExtArabic"
+
+#: ../src/common/fmapbase.cpp:237
+msgid "MacGaelic"
+msgstr "MacGaelic"
+
+#: ../src/common/fmapbase.cpp:221
+msgid "MacGeorgian"
+msgstr "MacGeorgian"
+
+#: ../src/common/fmapbase.cpp:205
+msgid "MacGreek"
+msgstr "MacGreek"
+
+#: ../src/common/fmapbase.cpp:209
+msgid "MacGujarati"
+msgstr "MacGujarati"
+
+#: ../src/common/fmapbase.cpp:208
+msgid "MacGurmukhi"
+msgstr "MacGurmukhi"
+
+#: ../src/common/fmapbase.cpp:204
+msgid "MacHebrew"
+msgstr "MacHebrew"
+
+#: ../src/common/fmapbase.cpp:234
+msgid "MacIcelandic"
+msgstr "MacIcelandic"
+
+#: ../src/common/fmapbase.cpp:200
+msgid "MacJapanese"
+msgstr "MacJapanese"
+
+#: ../src/common/fmapbase.cpp:214
+msgid "MacKannada"
+msgstr "MacKannada"
+
+#: ../src/common/fmapbase.cpp:238
+msgid "MacKeyboardGlyphs"
+msgstr "MacKeyboardGlyphs"
+
+#: ../src/common/fmapbase.cpp:218
+msgid "MacKhmer"
+msgstr "MacKhmer"
+
+#: ../src/common/fmapbase.cpp:202
+msgid "MacKorean"
+msgstr "MacKorean"
+
+#: ../src/common/fmapbase.cpp:220
+msgid "MacLaotian"
+msgstr "MacLaotian"
+
+#: ../src/common/fmapbase.cpp:215
+msgid "MacMalayalam"
+msgstr "MacMalayalam"
+
+#: ../src/common/fmapbase.cpp:225
+msgid "MacMongolian"
+msgstr "MacMongolian"
+
+#: ../src/common/fmapbase.cpp:210
+msgid "MacOriya"
+msgstr "MacOriya"
+
+#: ../src/common/fmapbase.cpp:199
+msgid "MacRoman"
+msgstr "MacRoman"
+
+#: ../src/common/fmapbase.cpp:235
+msgid "MacRomanian"
+msgstr "MacRomanian"
+
+#: ../src/common/fmapbase.cpp:216
+msgid "MacSinhalese"
+msgstr "MacSinhalese"
+
+#: ../src/common/fmapbase.cpp:230
+msgid "MacSymbol"
+msgstr "MacSymbol"
+
+#: ../src/common/fmapbase.cpp:212
+msgid "MacTamil"
+msgstr "MacTamil"
+
+#: ../src/common/fmapbase.cpp:213
+msgid "MacTelugu"
+msgstr "MacTelugu"
+
+#: ../src/common/fmapbase.cpp:219
+msgid "MacThai"
+msgstr "MacThai"
+
+#: ../src/common/fmapbase.cpp:224
+msgid "MacTibetan"
+msgstr "MacTibetan"
+
+#: ../src/common/fmapbase.cpp:232
+msgid "MacTurkish"
+msgstr "MacTurkish"
+
+#: ../src/common/fmapbase.cpp:228
+msgid "MacVietnamese"
+msgstr "MacVietnamese"
+
+#: ../src/propgrid/advprops.cpp:2031
+msgid "Make a selection:"
+msgstr "選択してください:"
+
+#: ../src/richtext/richtextformatdlg.cpp:362
+#: ../src/richtext/richtextmarginspage.cpp:172
+#, fuzzy
+msgid "Margins"
+msgstr "MacGeorgian"
+
+#: ../src/generic/fdrepdlg.cpp:147
+msgid "Match case"
+msgstr "大文字小文字を区別"
+
+#: ../src/richtext/richtextsizepage.cpp:463
+#, fuzzy
+msgid "Max height:"
+msgstr "ウエイト (&W):"
+
+#: ../src/richtext/richtextsizepage.cpp:436
+#, fuzzy
+msgid "Max width:"
+msgstr "置換先:"
+
+#: ../src/unix/mediactrl.cpp:1006
+#, c-format
+msgid "Media playback error: %s"
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:175
+#, c-format
+msgid "Memory VFS already contains file '%s'!"
+msgstr "メモリーVFSにはファイル '%s' がすでにあります。"
+
+#: ../src/msw/frame.cpp:347
+msgid "Menu"
+msgstr "メニュー"
+
+#: ../src/common/msgout.cpp:124
+#, fuzzy
+msgid "Message"
+msgstr "%s からの通知"
+
+#: ../src/univ/themes/metal.cpp:168
+msgid "Metal theme"
+msgstr "メタルテーマ"
+
+#: ../src/msw/ole/automtn.cpp:641
+msgid "Method or property not found."
+msgstr ""
+
+#: ../src/univ/themes/win32.cpp:3752
+msgid "Mi&nimize"
+msgstr "最小化 (&N)"
+
+#: ../src/richtext/richtextsizepage.cpp:409
+#, fuzzy
+msgid "Min height:"
+msgstr "フォントのウエイト(&W):"
+
+#: ../src/richtext/richtextsizepage.cpp:382
+msgid "Min width:"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:657
+msgid "Missing a required parameter."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:324
+msgid "Modern"
+msgstr "Modern"
+
+#: ../src/generic/filectrlg.cpp:462
+msgid "Modified"
+msgstr "更新"
+
+#: ../src/common/module.cpp:133
+#, c-format
+msgid "Module \"%s\" initialization failed"
+msgstr "モジュール \"%s\" の初期化に失敗しました"
+
+#: ../src/common/paper.cpp:132
+msgid "Monarch Envelope, 3 7/8 x 7 1/2 in"
+msgstr "Monarch 封筒, 3 7/8 x 7 1/2インチ"
+
+#: ../src/msw/fswatcher.cpp:143
+msgid "Monitoring individual files for changes is not supported currently."
+msgstr ""
+
+#: ../src/generic/editlbox.cpp:276
+msgid "Move down"
+msgstr "下に移動"
+
+#: ../src/generic/editlbox.cpp:275
+msgid "Move up"
+msgstr "上に移動"
+
+#: ../src/richtext/richtextsizepage.cpp:682
+#: ../src/richtext/richtextsizepage.cpp:684
+#, fuzzy
+msgid "Moves the object to the next paragraph."
+msgstr "次の段落に適用されるスタイルを指定します。"
+
+#: ../src/richtext/richtextsizepage.cpp:676
+#: ../src/richtext/richtextsizepage.cpp:678
+#, fuzzy
+msgid "Moves the object to the previous paragraph."
+msgstr "前のHTMLページに戻る"
+
+#: ../src/richtext/richtextbuffer.cpp:9345
+msgid "Multiple Cell Properties"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:81
+msgid "NUM_LOCK"
+msgstr "NumLock"
+
+#: ../src/generic/filectrlg.cpp:459
+msgid "Name"
+msgstr "名前"
+
+#: ../src/common/stockitem.cpp:175
+#, fuzzy
+msgid "Network"
+msgstr "ネットワーク (&N)"
+
+#: ../src/common/stockitem.cpp:176
+#, fuzzy
+msgid "New"
+msgstr "新規作成 (&N)"
+
+#: ../src/richtext/richtextstyledlg.cpp:243
+#, fuzzy
+msgid "New &Box Style..."
+msgstr "新規リストスタイル (&L) ..."
+
+#: ../src/richtext/richtextstyledlg.cpp:225
+msgid "New &Character Style..."
+msgstr "新規文字スタイル (&C) ..."
+
+#: ../src/richtext/richtextstyledlg.cpp:237
+msgid "New &List Style..."
+msgstr "新規リストスタイル (&L) ..."
+
+#: ../src/richtext/richtextstyledlg.cpp:231
+msgid "New &Paragraph Style..."
+msgstr "新規段落スタイル (&P) ..."
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:651
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:817
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:890
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:931
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "New Style"
+msgstr "新規スタイル"
+
+#: ../src/generic/dirdlgg.cpp:102
+msgid "New directory"
+msgstr "新規ディレクトリー"
+
+#: ../src/generic/editlbox.cpp:273
+msgid "New item"
+msgstr "新規項目"
+
+#: ../src/generic/dirdlgg.cpp:326 ../src/generic/dirdlgg.cpp:336
+#: ../src/generic/filectrlg.cpp:653 ../src/generic/filectrlg.cpp:662
+msgid "NewName"
+msgstr "新しい名前"
+
+#: ../src/generic/tipdlg.cpp:305
+msgid "Next"
+msgstr "次"
+
+#: ../src/common/prntbase.cpp:1537 ../src/html/helpwnd.cpp:678
+msgid "Next page"
+msgstr "次のページ"
+
+#: ../include/wx/msgdlg.h:272 ../src/common/stockitem.cpp:177
+#: ../src/motif/msgdlg.cpp:196
+msgid "No"
+msgstr "いいえ"
+
+#: ../src/generic/animateg.cpp:150
+#, c-format
+msgid "No animation handler for type %ld defined."
+msgstr "%ld 型のアニメーションハンドラーは未定義です。"
+
+#: ../src/dfb/bitmap.cpp:642 ../src/dfb/bitmap.cpp:676
+#, c-format
+msgid "No bitmap handler for type %d defined."
+msgstr "'%d' 型のイメージハンドラは定義されていません。"
+
+#: ../src/osx/carbon/dataview.cpp:1784
+msgid "No column existing."
+msgstr "列がありません。"
+
+#: ../src/osx/carbon/dataview.cpp:1674
+msgid "No column for the specified column existing."
+msgstr "プロパティーに対応する列がありません。"
+
+#: ../src/osx/carbon/dataview.cpp:1423
+msgid "No column for the specified column position existing."
+msgstr "指定された位置には列がありません。"
+
+#: ../src/common/utilscmn.cpp:1049
+msgid "No default application configured for HTML files."
+msgstr "HTMLファイルに対する既定のアプリケーション設定がありません。"
+
+#: ../src/generic/helpext.cpp:449
+msgid "No entries found."
+msgstr "項目が見つかりません。"
+
+#: ../src/common/fontmap.cpp:421
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found,\n"
+"but an alternative encoding '%s' is available.\n"
+"Do you want to use this encoding (otherwise you will have to choose another "
+"one)?"
+msgstr ""
+"エンコーディング '%s' のテキストを表示するフォントはありません\n"
+"他のエンコーディング '%s' でありば利用可能です。\n"
+"このエンコーディングを使いますか(そうでなければ別のものを選びます)?"
+
+#: ../src/common/fontmap.cpp:426
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found.\n"
+"Would you like to select a font to be used for this encoding\n"
+"(otherwise the text in this encoding will not be shown correctly)?"
+msgstr ""
+"エンコーディング '%s' のテキストを表示するフォントはありません\n"
+"このエンコーディングに使うフォントを選択しますか\n"
+"(そうでなければこのエンコーディングのテキストは正しく表示されません)?"
+
+#: ../src/generic/animateg.cpp:142
+msgid "No handler found for animation type."
+msgstr "アニメーションタイプのハンドラーが見つかりません。"
+
+#: ../src/common/image.cpp:2591
+msgid "No handler found for image type."
+msgstr "イメージタイプのハンドラーが見つかりません。"
+
+#: ../src/common/image.cpp:2599 ../src/common/image.cpp:2710
+#: ../src/common/image.cpp:2763
+#, c-format
+msgid "No image handler for type %d defined."
+msgstr "%d 型のイメージハンドラーが定義されていません。"
+
+#: ../src/common/image.cpp:2733 ../src/common/image.cpp:2777
+#, c-format
+msgid "No image handler for type %s defined."
+msgstr "%s 型のイメージハンドラーが定義されていません。"
+
+#: ../src/html/helpwnd.cpp:871
+msgid "No matching page found yet"
+msgstr "一致するページがまだありません。"
+
+#: ../src/osx/carbon/dataview.cpp:1676 ../src/osx/carbon/dataview.cpp:1786
+msgid "No renderer or invalid renderer type specified for custom data column."
+msgstr ""
+"カスタムデータ列に不適切なレンダラーまたは不適切なその型が与えられました。"
+
+#: ../src/osx/carbon/dataview.cpp:1424
+msgid "No renderer specified for column."
+msgstr "列に対してレンダラーが与えられていません。"
+
+#: ../src/unix/sound.cpp:81
+msgid "No sound"
+msgstr "音声なし"
+
+#: ../src/common/image.cpp:2166 ../src/common/image.cpp:2207
+msgid "No unused colour in image being masked."
+msgstr "マスクされるべき未使用色が画像にありません。"
+
+#: ../src/common/image.cpp:3236
+msgid "No unused colour in image."
+msgstr "画像に未使用色がありません。"
+
+#: ../src/generic/helpext.cpp:306
+#, c-format
+msgid "No valid mappings found in the file \"%s\"."
+msgstr "ファイル \"%s\" には適切なマップが含まれていません。"
+
+#: ../src/richtext/richtextborderspage.cpp:542
+#: ../src/richtext/richtextsizepage.cpp:248
+#: ../src/richtext/richtextsizepage.cpp:252
+#, fuzzy
+msgid "None"
+msgstr "(なし)"
+
+#: ../src/common/fmapbase.cpp:157
+msgid "Nordic (ISO-8859-10)"
+msgstr "北欧言語 (Latin-6, ISO-8859-10)"
+
+#: ../src/generic/fontdlgg.cpp:328 ../src/generic/fontdlgg.cpp:331
+msgid "Normal"
+msgstr "通常"
+
+#: ../src/html/helpwnd.cpp:1276
+msgid "Normal face<br>and <u>underlined</u>. "
+msgstr "通常<br> と <u>下線付き</u>"
+
+#: ../src/html/helpwnd.cpp:1218
+msgid "Normal font:"
+msgstr "通常のフォント:"
+
+#: ../src/propgrid/props.cpp:887
+#, c-format
+msgid "Not %s"
+msgstr "%sではない"
+
+#: ../include/wx/filename.h:586 ../include/wx/filename.h:591
+msgid "Not available"
+msgstr "利用できません"
+
+#: ../src/richtext/richtextfontpage.cpp:340
+msgid "Not underlined"
+msgstr "下線なし"
+
+#: ../src/common/paper.cpp:116
+msgid "Note, 8 1/2 x 11 in"
+msgstr "ノート, 8 1/2×11インチ"
+
+#: ../src/generic/notifmsgg.cpp:104
+msgid "Notice"
+msgstr "お知らせ"
+
+#: ../src/osx/carbon/dataview.cpp:902
+msgid "Number of columns could not be determined."
+msgstr "列の数を決定できませんでした。"
+
+#: ../src/richtext/richtextliststylepage.cpp:487
+#: ../src/richtext/richtextbulletspage.cpp:292
+msgid "Numbered outline"
+msgstr "番号付きアウトライン"
+
+#: ../include/wx/msgdlg.h:273 ../src/richtext/richtextstyledlg.cpp:297
+#: ../src/common/stockitem.cpp:178 ../src/msw/msgdlg.cpp:489
+#: ../src/msw/msgdlg.cpp:799 ../src/msw/dialog.cpp:120
+#: ../src/gtk1/fontdlg.cpp:138
+msgid "OK"
+msgstr "OK"
+
+#: ../src/msw/ole/automtn.cpp:681
+#, c-format
+msgid "OLE Automation error in %s: %s"
+msgstr ""
+
+#: ../include/wx/richtext/richtextimagedlg.h:39
+#, fuzzy
+msgid "Object Properties"
+msgstr "プロパティー (&P)"
+
+#: ../src/msw/ole/automtn.cpp:649
+msgid "Object implementation does not support named arguments."
+msgstr ""
+
+#: ../src/common/xtixml.cpp:264
+msgid "Objects must have an id attribute"
+msgstr "オブジェクトには id 属性が必須です。"
+
+#: ../src/common/docview.cpp:1755 ../src/common/docview.cpp:1797
+msgid "Open File"
+msgstr "ファイルを開く"
+
+#: ../src/html/helpwnd.cpp:684 ../src/html/helpwnd.cpp:1557
+msgid "Open HTML document"
+msgstr "HTML文書を開く"
+
+#: ../src/generic/dbgrptg.cpp:163
+#, c-format
+msgid "Open file \"%s\""
+msgstr "ファイル \"%s\" を開く"
+
+#: ../src/common/stockitem.cpp:179
+#, fuzzy
+msgid "Open..."
+msgstr "開く (&O) ..."
+
+#: ../src/osx/carbon/glcanvas.cpp:48
+#, c-format
+msgid "OpenGL function \"%s\" failed: %s (error %d)"
+msgstr "OpenGL 関数 \"%s\" が失敗: %s (エラー %d)"
+
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:821
+msgid "Operation not permitted."
+msgstr "処理が許可されていません。"
+
+#: ../src/common/cmdline.cpp:735
+#, fuzzy, c-format
+msgid "Option '%s' can't be negated"
+msgstr "ディレクトリー '%s' を作成できませんでした"
+
+#: ../src/common/cmdline.cpp:899
+#, c-format
+msgid "Option '%s' requires a value."
+msgstr "オプション '%s' には値の指定が必要です。"
+
+#: ../src/common/cmdline.cpp:982
+#, c-format
+msgid "Option '%s': '%s' cannot be converted to a date."
+msgstr "オプション '%s': '%s' という表現は日付に変換できません。"
+
+#: ../src/generic/dirdlgg.cpp:187 ../src/generic/prntdlgg.cpp:618
+msgid "Options"
+msgstr "オプション"
+
+#: ../src/generic/prntdlgg.cpp:615 ../src/generic/prntdlgg.cpp:869
+msgid "Orientation"
+msgstr "向き"
+
+#: ../src/common/windowid.cpp:259
+msgid "Out of window IDs.  Recommend shutting down application."
+msgstr ""
+"ウィンドウIDが制限範囲を超えました。アプリケーションの再起動をおすすめしま"
+"す。"
+
+#: ../src/richtext/richtextborderspage.cpp:400
+#: ../src/richtext/richtextborderspage.cpp:533
+#, fuzzy
+msgid "Outline"
+msgstr "アウトラインレベル (&O):"
+
+#: ../src/richtext/richtextborderspage.cpp:550
+msgid "Outset"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:645
+msgid "Overflow while coercing argument values."
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:84
+msgid "PAGEDOWN"
+msgstr "PAGEDOWN"
+
+#: ../src/common/accelcmn.cpp:83
+msgid "PAGEUP"
+msgstr "PAGEUP"
+
+#: ../src/common/accelcmn.cpp:69
+msgid "PAUSE"
+msgstr "PAUSE"
+
+#: ../src/common/imagpcx.cpp:457 ../src/common/imagpcx.cpp:480
+msgid "PCX: couldn't allocate memory"
+msgstr "PCX: メモリを割り当てることができません"
+
+#: ../src/common/imagpcx.cpp:456
+msgid "PCX: image format unsupported"
+msgstr "PCX: 画像形式は未対応です"
+
+#: ../src/common/imagpcx.cpp:479
+msgid "PCX: invalid image"
+msgstr "PCX: 不正な画像です"
+
+#: ../src/common/imagpcx.cpp:442
+msgid "PCX: this is not a PCX file."
+msgstr "PCX: PCXファイルではないようです。"
+
+#: ../src/common/imagpcx.cpp:459 ../src/common/imagpcx.cpp:481
+msgid "PCX: unknown error !!!"
+msgstr "PCX: 未対応のエラーが発生しました。"
+
+#: ../src/common/imagpcx.cpp:458
+msgid "PCX: version number too low"
+msgstr "PCX: バージョン番号が低すぎるようです。"
+
+#: ../src/common/accelcmn.cpp:55
+msgid "PGDN"
+msgstr "PGDN"
+
+#: ../src/common/accelcmn.cpp:54
+msgid "PGUP"
+msgstr "PGUP"
+
+#: ../src/common/imagpnm.cpp:91
+msgid "PNM: Couldn't allocate memory."
+msgstr "PNM: メモリを割り当てることができません。"
+
+#: ../src/common/imagpnm.cpp:73
+msgid "PNM: File format is not recognized."
+msgstr "PNM: ファイル形式を解析できません。"
+
+#: ../src/common/imagpnm.cpp:112 ../src/common/imagpnm.cpp:134
+#: ../src/common/imagpnm.cpp:156
+msgid "PNM: File seems truncated."
+msgstr "PNM: ファイルが欠けているようです。"
+
+#: ../src/common/paper.cpp:188
+msgid "PRC 16K 146 x 215 mm"
+msgstr "中国 16K 146 x 215 mm"
+
+#: ../src/common/paper.cpp:201
+msgid "PRC 16K Rotated"
+msgstr "中国 16K 横置き"
+
+#: ../src/common/paper.cpp:189
+msgid "PRC 32K 97 x 151 mm"
+msgstr "中国 32K 97 x 151 mm"
+
+#: ../src/common/paper.cpp:202
+msgid "PRC 32K Rotated"
+msgstr "中国 32K 横置き"
+
+#: ../src/common/paper.cpp:190
+msgid "PRC 32K(Big) 97 x 151 mm"
+msgstr "中国 32K(Big) 97 x 151 mm"
+
+#: ../src/common/paper.cpp:203
+msgid "PRC 32K(Big) Rotated"
+msgstr "中国 32K(Big) 横置き"
+
+#: ../src/common/paper.cpp:191
+msgid "PRC Envelope #1 102 x 165 mm"
+msgstr "中国封筒 #1 102 x 165 mm"
+
+#: ../src/common/paper.cpp:204
+msgid "PRC Envelope #1 Rotated 165 x 102 mm"
+msgstr "中国封筒 #1 横置き 165 x 102 mm"
+
+#: ../src/common/paper.cpp:200
+msgid "PRC Envelope #10 324 x 458 mm"
+msgstr "中国封筒 #10 324 x 458 mm"
+
+#: ../src/common/paper.cpp:213
+msgid "PRC Envelope #10 Rotated 458 x 324 mm"
+msgstr "中国封筒 #10 横置き 458 x 324 mm"
+
+#: ../src/common/paper.cpp:192
+msgid "PRC Envelope #2 102 x 176 mm"
+msgstr "中国封筒 #2 102 x 176 mm"
+
+#: ../src/common/paper.cpp:205
+msgid "PRC Envelope #2 Rotated 176 x 102 mm"
+msgstr "中国封筒 #2 横置き 176 x 102 mm"
+
+#: ../src/common/paper.cpp:193
+msgid "PRC Envelope #3 125 x 176 mm"
+msgstr "中国封筒 #3 125 x 176 mm"
+
+#: ../src/common/paper.cpp:206
+msgid "PRC Envelope #3 Rotated 176 x 125 mm"
+msgstr "中国封筒 #3 横置き 176 x 125 mm"
+
+#: ../src/common/paper.cpp:194
+msgid "PRC Envelope #4 110 x 208 mm"
+msgstr "中国封筒 #4 110 x 208 mm"
+
+#: ../src/common/paper.cpp:207
+msgid "PRC Envelope #4 Rotated 208 x 110 mm"
+msgstr "中国封筒 #4 横置き 208 x 110 mm"
+
+#: ../src/common/paper.cpp:195
+msgid "PRC Envelope #5 110 x 220 mm"
+msgstr "中国封筒 #5 110 x 220 mm"
+
+#: ../src/common/paper.cpp:208
+msgid "PRC Envelope #5 Rotated 220 x 110 mm"
+msgstr "中国封筒 #5 横置き 220 x 110 mm"
+
+#: ../src/common/paper.cpp:196
+msgid "PRC Envelope #6 120 x 230 mm"
+msgstr "中国封筒 #6 120 x 230 mm"
+
+#: ../src/common/paper.cpp:209
+msgid "PRC Envelope #6 Rotated 230 x 120 mm"
+msgstr "中国封筒 #6 横置き 230 x 120 mm"
+
+#: ../src/common/paper.cpp:197
+msgid "PRC Envelope #7 160 x 230 mm"
+msgstr "中国封筒 #7 160 x 230 mm"
+
+#: ../src/common/paper.cpp:210
+msgid "PRC Envelope #7 Rotated 230 x 160 mm"
+msgstr "中国封筒 #7 横置き 230 x 160 mm"
+
+#: ../src/common/paper.cpp:198
+msgid "PRC Envelope #8 120 x 309 mm"
+msgstr "中国封筒 #8 120 x 309 mm"
+
+#: ../src/common/paper.cpp:211
+msgid "PRC Envelope #8 Rotated 309 x 120 mm"
+msgstr "中国封筒 #8 横置き 309 x 120 mm"
+
+#: ../src/common/paper.cpp:199
+msgid "PRC Envelope #9 229 x 324 mm"
+msgstr "中国封筒 #9 229 x 324 mm"
+
+#: ../src/common/paper.cpp:212
+msgid "PRC Envelope #9 Rotated 324 x 229 mm"
+msgstr "中国封筒 #9 横置き 324 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:72
+msgid "PRINT"
+msgstr "PrintScreen"
+
+#: ../src/richtext/richtextmarginspage.cpp:286
+#, fuzzy
+msgid "Padding"
+msgstr "読み取り"
+
+#: ../src/common/prntbase.cpp:2044
+#, c-format
+msgid "Page %d"
+msgstr "%dページ"
+
+#: ../src/common/prntbase.cpp:2042
+#, c-format
+msgid "Page %d of %d"
+msgstr "%dページ (%dページ中)"
+
+#: ../src/gtk/print.cpp:774
+msgid "Page Setup"
+msgstr "ページの設定"
+
+#: ../src/generic/prntdlgg.cpp:828 ../src/common/prntbase.cpp:467
+msgid "Page setup"
+msgstr "ページの設定"
+
+#: ../src/generic/prntdlgg.cpp:216
+msgid "Pages"
+msgstr "指定"
+
+#: ../src/generic/prntdlgg.cpp:602 ../src/generic/prntdlgg.cpp:801
+#: ../src/generic/prntdlgg.cpp:842 ../src/generic/prntdlgg.cpp:855
+#: ../src/generic/prntdlgg.cpp:1052 ../src/generic/prntdlgg.cpp:1057
+msgid "Paper size"
+msgstr "用紙サイズ"
+
+#: ../src/richtext/richtextstyles.cpp:1058
+msgid "Paragraph styles"
+msgstr "段落スタイル"
+
+#: ../src/common/xtistrm.cpp:469
+msgid "Passing a already registered object to SetObject"
+msgstr "SetObject に登録済みのオブジェクトが渡されました"
+
+#: ../src/common/xtistrm.cpp:480
+msgid "Passing an unknown object to GetObject"
+msgstr "GetObject に未知のオブジェクトが渡されました"
+
+#: ../src/richtext/richtextctrl.cpp:3117 ../src/common/stockitem.cpp:180
+#: ../src/stc/stc_i18n.cpp:19
+msgid "Paste"
+msgstr "貼り付け"
+
+#: ../src/common/stockitem.cpp:262
+msgid "Paste selection"
+msgstr "選択部分を貼り付け"
+
+#: ../src/richtext/richtextliststylepage.cpp:222
+#: ../src/richtext/richtextbulletspage.cpp:172
+msgid "Peri&od"
+msgstr "ピリオド (&O)"
+
+#: ../src/generic/filectrlg.cpp:465
+msgid "Permissions"
+msgstr "パーミッション"
+
+#: ../src/richtext/richtextbuffer.cpp:11942
+#, fuzzy
+msgid "Picture Properties"
+msgstr "プロパティー (&P)"
+
+#: ../include/wx/unix/pipe.h:47
+msgid "Pipe creation failed"
+msgstr "パイプを作成できませんでした"
+
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Please choose a valid font."
+msgstr "有効なフォントを選んでください。"
+
+#: ../src/gtk/filedlg.cpp:72
+msgid "Please choose an existing file."
+msgstr "存在するファイルを選んでください。"
+
+#: ../src/html/helpwnd.cpp:813
+msgid "Please choose the page to display:"
+msgstr "表示するページを選んでください:"
+
+#: ../src/msw/dialup.cpp:785
+msgid "Please choose which ISP do you want to connect to"
+msgstr "接続したいISPを選んでください"
+
+#: ../src/msw/listctrl.cpp:372
+#, c-format
+msgid ""
+"Please install a newer version of comctl32.dll\n"
+"(at least version 4.70 is required but you have %d.%02d)\n"
+"or this program won't operate correctly."
+msgstr ""
+"comctl32.dll の新しい版をインストールしてください。\n"
+"4.70 以上の版が必要ですが現在インストールされているのは %d.%02d です。\n"
+"適切な版がないと正しく動作いたしません。"
+
+#: ../src/common/headerctrlcmn.cpp:59
+msgid "Please select the columns to show and define their order:"
+msgstr "表示する列とその順番を選んでください:"
+
+#: ../src/common/prntbase.cpp:521
+#, fuzzy
+msgid "Please wait while printing..."
+msgstr "印刷が終わるまでお待ちください\n"
+
+#: ../src/propgrid/advprops.cpp:631
+msgid "Point Size"
+msgstr "大きさ(ポイント):"
+
+#: ../src/osx/carbon/dataview.cpp:1278 ../src/osx/carbon/dataview.cpp:1329
+#: ../src/osx/carbon/dataview.cpp:1420 ../src/osx/carbon/dataview.cpp:1443
+#: ../src/osx/carbon/dataview.cpp:1460 ../src/osx/carbon/dataview.cpp:1477
+#: ../src/osx/carbon/dataview.cpp:1670 ../src/osx/carbon/dataview.cpp:1779
+#: ../src/osx/carbon/dataview.cpp:1821 ../src/osx/carbon/dataview.cpp:1874
+#: ../src/osx/carbon/dataview.cpp:1997
+msgid "Pointer to data view control not set correctly."
+msgstr "データビューコントロールへのポインタが正しく設定されていません。"
+
+#: ../src/osx/carbon/dataview.cpp:1279 ../src/osx/carbon/dataview.cpp:1338
+#: ../src/osx/carbon/dataview.cpp:1421 ../src/osx/carbon/dataview.cpp:1478
+#: ../src/osx/carbon/dataview.cpp:1671 ../src/osx/carbon/dataview.cpp:1780
+#: ../src/osx/carbon/dataview.cpp:1822 ../src/osx/carbon/dataview.cpp:1875
+#: ../src/osx/carbon/dataview.cpp:1998
+msgid "Pointer to model not set correctly."
+msgstr "モデルへのポインタが正しく設定されていません。"
+
+#: ../src/generic/prntdlgg.cpp:612 ../src/generic/prntdlgg.cpp:867
+msgid "Portrait"
+msgstr "縦置き"
+
+#: ../src/richtext/richtextsizepage.cpp:496
+#, fuzzy
+msgid "Position"
+msgstr "印刷"
+
+#: ../src/generic/prntdlgg.cpp:298
+msgid "PostScript file"
+msgstr "PostScript ファイル"
+
+#: ../src/common/stockitem.cpp:181
+#, fuzzy
+msgid "Preferences"
+msgstr "設定 (&P)"
+
+#: ../src/osx/menu_osx.cpp:643
+#, fuzzy
+msgid "Preferences..."
+msgstr "設定 (&P)"
+
+#: ../src/common/prntbase.cpp:529
+msgid "Preparing"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:455 ../src/osx/carbon/fontdlg.cpp:576
+#: ../src/html/helpwnd.cpp:1235
+msgid "Preview:"
+msgstr "プレビュー:"
+
+#: ../src/common/prntbase.cpp:1523 ../src/html/helpwnd.cpp:677
+msgid "Previous page"
+msgstr "前のページ"
+
+#: ../src/generic/prntdlgg.cpp:143 ../src/generic/prntdlgg.cpp:157
+#: ../src/common/prntbase.cpp:409 ../src/common/prntbase.cpp:1511
+#: ../src/gtk/print.cpp:584 ../src/gtk/print.cpp:597
+msgid "Print"
+msgstr "印刷"
+
+#: ../include/wx/prntbase.h:395 ../src/common/docview.cpp:1250
+msgid "Print Preview"
+msgstr "印刷プレビュー"
+
+#: ../src/common/prntbase.cpp:1985 ../src/common/prntbase.cpp:2027
+#: ../src/common/prntbase.cpp:2035
+msgid "Print Preview Failure"
+msgstr "印刷プレビュー失敗"
+
+#: ../src/generic/prntdlgg.cpp:224
+msgid "Print Range"
+msgstr "印刷範囲"
+
+#: ../src/generic/prntdlgg.cpp:449
+msgid "Print Setup"
+msgstr "印刷設定"
+
+#: ../src/generic/prntdlgg.cpp:621
+msgid "Print in colour"
+msgstr "カラー印刷"
+
+#: ../src/common/stockitem.cpp:182
+#, fuzzy
+msgid "Print previe&w..."
+msgstr "印刷プレビュー(&W)"
+
+#: ../src/common/docview.cpp:1244
+msgid "Print preview creation failed."
+msgstr "印刷プレビューを作成できませんでした。"
+
+#: ../src/common/stockitem.cpp:182
+#, fuzzy
+msgid "Print preview..."
+msgstr "印刷プレビュー"
+
+#: ../src/generic/prntdlgg.cpp:630
+msgid "Print spooling"
+msgstr "印刷予約設定"
+
+#: ../src/html/helpwnd.cpp:688
+msgid "Print this page"
+msgstr "このページを印刷"
+
+#: ../src/generic/prntdlgg.cpp:185
+msgid "Print to File"
+msgstr "ファイルへ印刷"
+
+#: ../src/common/stockitem.cpp:183
+#, fuzzy
+msgid "Print..."
+msgstr "印刷 (&P) ..."
+
+#: ../src/generic/prntdlgg.cpp:493
+msgid "Printer"
+msgstr "プリンター"
+
+#: ../src/generic/prntdlgg.cpp:633
+msgid "Printer command:"
+msgstr "プリンターへのコマンド:"
+
+#: ../src/generic/prntdlgg.cpp:180
+msgid "Printer options"
+msgstr "プリンターのオプション"
+
+#: ../src/generic/prntdlgg.cpp:645
+msgid "Printer options:"
+msgstr "プリンターのオプション:"
+
+#: ../src/generic/prntdlgg.cpp:916
+msgid "Printer..."
+msgstr "プリンター ..."
+
+#: ../src/generic/prntdlgg.cpp:196
+msgid "Printer:"
+msgstr "プリンター:"
+
+#: ../include/wx/richtext/richtextprint.h:163 ../src/common/prntbase.cpp:518
+#: ../src/html/htmprint.cpp:277
+msgid "Printing"
+msgstr "印刷"
+
+#: ../src/common/prntbase.cpp:586
+msgid "Printing "
+msgstr "印刷"
+
+#: ../src/common/prntbase.cpp:330
+msgid "Printing Error"
+msgstr "印刷エラー"
+
+#: ../src/common/prntbase.cpp:544
+#, fuzzy, c-format
+msgid "Printing page %d of %d"
+msgstr "%d ページを印刷中 ..."
+
+#: ../src/generic/printps.cpp:201
+#, c-format
+msgid "Printing page %d..."
+msgstr "%d ページを印刷中 ..."
+
+#: ../src/generic/printps.cpp:161
+msgid "Printing..."
+msgstr "印刷中 ..."
+
+#: ../include/wx/richtext/richtextprint.h:109 ../include/wx/prntbase.h:263
+#: ../src/common/docview.cpp:2124
+msgid "Printout"
+msgstr "印刷出力"
+
+#: ../src/common/debugrpt.cpp:565
+#, c-format
+msgid ""
+"Processing debug report has failed, leaving the files in \"%s\" directory."
+msgstr ""
+"デバッグレポートの処理に失敗しました。ディレクトリー \"%s\" にファイルを残し"
+"ます。"
+
+#: ../src/osx/carbon/dataview.cpp:2472
+msgid "Progress renderer cannot render value type; value type: "
+msgstr "進行状況レンダラーが値を処理できません: 値の型: "
+
+#: ../src/common/prntbase.cpp:528
+msgid "Progress:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:184
+#, fuzzy
+msgid "Properties"
+msgstr "プロパティー (&P)"
+
+#: ../src/propgrid/manager.cpp:237
+msgid "Property"
+msgstr "プロパティー"
+
+#: ../src/propgrid/propgrid.cpp:3144 ../src/propgrid/propgrid.cpp:3276
+#, fuzzy
+msgid "Property Error"
+msgstr "プロパティー"
+
+#: ../src/common/paper.cpp:113
+msgid "Quarto, 215 x 275 mm"
+msgstr "クォート(四つ折り版), 215 x 275 mm"
+
+#: ../src/generic/logg.cpp:1036
+msgid "Question"
+msgstr "お尋ねします"
+
+#: ../src/common/stockitem.cpp:156
+#, fuzzy
+msgid "Quit"
+msgstr "終了 (&Q)"
+
+#: ../src/osx/menu_osx.cpp:610 ../src/osx/menu_osx.cpp:657
+#, fuzzy, c-format
+msgid "Quit %s"
+msgstr "終了 (&Q)"
+
+#: ../src/common/stockitem.cpp:263
+msgid "Quit this program"
+msgstr "このプログラムを終了します"
+
+#: ../src/common/accelcmn.cpp:53
+msgid "RETURN"
+msgstr "RETURN"
+
+#: ../src/common/accelcmn.cpp:57
+msgid "RIGHT"
+msgstr "→"
+
+#: ../src/common/accelcmn.cpp:327
+#, fuzzy
+msgid "RawCtrl+"
+msgstr "Ctrl+"
+
+#: ../src/common/ffile.cpp:113 ../src/common/ffile.cpp:134
+#, c-format
+msgid "Read error on file '%s'"
+msgstr "ファイル '%s' の読み取りエラー"
+
+#: ../src/common/prntbase.cpp:257
+msgid "Ready"
+msgstr "準備完了"
+
+#: ../src/common/stockitem.cpp:185 ../src/stc/stc_i18n.cpp:16
+msgid "Redo"
+msgstr "再実行"
+
+#: ../src/common/stockitem.cpp:264
+msgid "Redo last action"
+msgstr "最後に取り消した編集を再実行します"
+
+#: ../src/common/stockitem.cpp:186
+msgid "Refresh"
+msgstr "更新"
+
+#: ../src/msw/registry.cpp:625
+#, c-format
+msgid "Registry key '%s' already exists."
+msgstr "レジストリーキー '%s' はすでに存在します。"
+
+#: ../src/msw/registry.cpp:594
+#, c-format
+msgid "Registry key '%s' does not exist, cannot rename it."
+msgstr "改名元に指定されたレジストリーキー '%s' は存在しません。"
+
+#: ../src/msw/registry.cpp:726
+#, c-format
+msgid ""
+"Registry key '%s' is needed for normal system operation,\n"
+"deleting it will leave your system in unusable state:\n"
+"operation aborted."
+msgstr ""
+"レジストリーキー '%s' は通常のシステム動作に必要です。\n"
+"これを削除するとシステムを不安定にします:\n"
+"処理を中断しました。"
+
+#: ../src/msw/registry.cpp:520
+#, c-format
+msgid "Registry value '%s' already exists."
+msgstr "レジストリの値 '%s' はすでに存在します。"
+
+#: ../src/richtext/richtextfontpage.cpp:332
+#: ../src/richtext/richtextfontpage.cpp:336
+msgid "Regular"
+msgstr "通常"
+
+#: ../src/richtext/richtextsizepage.cpp:519
+#, fuzzy
+msgid "Relative"
+msgstr "Decorative"
+
+#: ../src/generic/helpext.cpp:462
+msgid "Relevant entries:"
+msgstr "関連項目:"
+
+#: ../include/wx/generic/progdlgg.h:86
+msgid "Remaining time:"
+msgstr "残り時間:"
+
+#: ../src/common/stockitem.cpp:187
+msgid "Remove"
+msgstr "削除"
+
+#: ../src/richtext/richtextctrl.cpp:1430
+#, fuzzy
+msgid "Remove Bullet"
+msgstr "削除"
+
+#: ../src/html/helpwnd.cpp:440
+msgid "Remove current page from bookmarks"
+msgstr "ブックマークから現在のページを削除します"
+
+#: ../src/common/rendcmn.cpp:194
+#, c-format
+msgid "Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."
+msgstr ""
+"レンダラー \"%s\" は非互換バージョン %d.%d で実装されているため読み取ることが"
+"できません。"
+
+#: ../src/osx/carbon/dataview.cpp:1430
+msgid "Rendering failed."
+msgstr "レンダリングに失敗しました。"
+
+#: ../src/richtext/richtextbuffer.cpp:4214
+msgid "Renumber List"
+msgstr "リスト連番の初期化"
+
+#: ../src/common/stockitem.cpp:188
+msgid "Rep&lace"
+msgstr "置換(&L)"
+
+#: ../src/richtext/richtextctrl.cpp:3277 ../src/common/stockitem.cpp:188
+msgid "Replace"
+msgstr "置換"
+
+#: ../src/generic/fdrepdlg.cpp:182
+msgid "Replace &all"
+msgstr "すべて置換(&A)"
+
+#: ../src/common/stockitem.cpp:261
+msgid "Replace selection"
+msgstr "選択範囲を置換します"
+
+#: ../src/generic/fdrepdlg.cpp:124
+msgid "Replace with:"
+msgstr "置換先:"
+
+#: ../src/common/valtext.cpp:161
+msgid "Required information entry is empty."
+msgstr "必須情報項目が空です。"
+
+#: ../src/common/translation.cpp:1966
+#, c-format
+msgid "Resource '%s' is not a valid message catalog."
+msgstr "'%s' は正しいメッセージカタログではありません。"
+
+#: ../src/common/stockitem.cpp:189
+msgid "Revert to Saved"
+msgstr "保存した状態まで戻します"
+
+#: ../src/richtext/richtextborderspage.cpp:548
+#, fuzzy
+msgid "Ridge"
+msgstr "右"
+
+#: ../src/richtext/richtextliststylepage.cpp:251
+#: ../src/richtext/richtextbulletspage.cpp:201
+#: ../src/richtext/richtextsizepage.cpp:250
+msgid "Right"
+msgstr "右"
+
+#: ../src/generic/prntdlgg.cpp:892
+msgid "Right margin (mm):"
+msgstr "余白-右 (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:148
+#: ../src/richtext/richtextindentspage.cpp:150
+#: ../src/richtext/richtextliststylepage.cpp:337
+#: ../src/richtext/richtextliststylepage.cpp:339
+msgid "Right-align text."
+msgstr "右寄せにします。"
+
+#: ../src/generic/fontdlgg.cpp:322
+msgid "Roman"
+msgstr "Roman"
+
+#: ../src/richtext/richtextliststylepage.cpp:299
+#: ../src/richtext/richtextbulletspage.cpp:252
+msgid "S&tandard bullet name:"
+msgstr "標準行頭文字名(&T):"
+
+#: ../src/common/accelcmn.cpp:82
+msgid "SCROLL_LOCK"
+msgstr "ScrollLock"
+
+#: ../src/common/accelcmn.cpp:71
+msgid "SELECT"
+msgstr "SELECT"
+
+#: ../src/common/accelcmn.cpp:77
+msgid "SEPARATOR"
+msgstr "SEPARATOR"
+
+#: ../src/common/accelcmn.cpp:74
+msgid "SNAPSHOT"
+msgstr "SNAPSHOT"
+
+#: ../src/common/accelcmn.cpp:62
+msgid "SPACE"
+msgstr "SPACE"
+
+#: ../src/common/accelcmn.cpp:257 ../src/common/accelcmn.cpp:339
+msgid "SPECIAL"
+msgstr "SPECIAL"
+
+#: ../src/common/accelcmn.cpp:78
+msgid "SUBTRACT"
+msgstr "SUBTRACT"
+
+#: ../src/common/stockitem.cpp:190 ../src/common/sizer.cpp:2678
+msgid "Save"
+msgstr "保存"
+
+#: ../src/common/fldlgcmn.cpp:327
+#, c-format
+msgid "Save %s file"
+msgstr "%s ファイルを保存"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save &As..."
+msgstr "別名で保存(&A) ..."
+
+#: ../src/common/docview.cpp:360
+msgid "Save As"
+msgstr "Save As"
+
+#: ../src/common/stockitem.cpp:191
+#, fuzzy
+msgid "Save as"
+msgstr "Save As"
+
+#: ../src/common/stockitem.cpp:267
+msgid "Save current document"
+msgstr "現在の文書を保存します"
+
+#: ../src/common/stockitem.cpp:268
+msgid "Save current document with a different filename"
+msgstr "現在の文書を別名で保存します"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save log contents to file"
+msgstr "ログの内容をファイルに保存します"
+
+#: ../src/generic/fontdlgg.cpp:325
+msgid "Script"
+msgstr "Script"
+
+#: ../src/generic/srchctlg.cpp:67 ../src/html/helpwnd.cpp:548
+#: ../src/html/helpwnd.cpp:563
+msgid "Search"
+msgstr "検索"
+
+#: ../src/html/helpwnd.cpp:550
+msgid ""
+"Search contents of help book(s) for all occurrences of the text you typed "
+"above"
+msgstr "上で入力したテキストがある部分をヘルプブックの全体に渡って検索します"
+
+#: ../src/generic/fdrepdlg.cpp:160
+msgid "Search direction"
+msgstr "検索の方向"
+
+#: ../src/generic/fdrepdlg.cpp:112
+msgid "Search for:"
+msgstr "検索内容:"
+
+#: ../src/html/helpwnd.cpp:1065
+msgid "Search in all books"
+msgstr "すべてのブックを検索"
+
+#: ../src/html/helpwnd.cpp:870
+msgid "Searching..."
+msgstr "検索中..."
+
+#: ../src/generic/dirctrlg.cpp:546
+msgid "Sections"
+msgstr "セクション"
+
+#: ../src/common/ffile.cpp:220
+#, c-format
+msgid "Seek error on file '%s'"
+msgstr "ファイル '%s' のシークエラー"
+
+#: ../src/common/ffile.cpp:210
+#, c-format
+msgid "Seek error on file '%s' (large files not supported by stdio)"
+msgstr "ファイル '%s' のシークエラー(stdioでは大きなファイルに対応できません)"
+
+#: ../src/richtext/richtextctrl.cpp:330 ../src/osx/textctrl_osx.cpp:587
+#: ../src/common/stockitem.cpp:192 ../src/msw/textctrl.cpp:2288
+msgid "Select &All"
+msgstr "すべて選択(&A)"
+
+#: ../src/common/stockitem.cpp:192 ../src/stc/stc_i18n.cpp:21
+msgid "Select All"
+msgstr "すべて選択"
+
+#: ../src/common/docview.cpp:1877
+msgid "Select a document template"
+msgstr "文書の雛形を選んでください"
+
+#: ../src/common/docview.cpp:1951
+msgid "Select a document view"
+msgstr "文書ビューの選択"
+
+#: ../src/richtext/richtextfontpage.cpp:235
+#: ../src/richtext/richtextfontpage.cpp:237
+msgid "Select regular or bold."
+msgstr "太字にするかしないかを選んでください。"
+
+#: ../src/richtext/richtextfontpage.cpp:222
+#: ../src/richtext/richtextfontpage.cpp:224
+msgid "Select regular or italic style."
+msgstr "イタリックにするかしないかを選んでください。"
+
+#: ../src/richtext/richtextfontpage.cpp:248
+#: ../src/richtext/richtextfontpage.cpp:250
+msgid "Select underlining or no underlining."
+msgstr "下線を付けるか付けないかを選んでください"
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Selection"
+msgstr "選択"
+
+#: ../src/richtext/richtextliststylepage.cpp:187
+#: ../src/richtext/richtextliststylepage.cpp:189
+msgid "Selects the list level to edit."
+msgstr "編集したいリストレベルを選んでください。"
+
+#: ../src/common/cmdline.cpp:918
+#, c-format
+msgid "Separator expected after the option '%s'."
+msgstr "オプション '%s' の後には区切り文字が必要です。"
+
+#: ../src/richtext/richtextbuffer.cpp:10513
+#, fuzzy
+msgid "Set Cell Style"
+msgstr "スタイルの削除"
+
+#: ../include/wx/xtiprop.h:179
+msgid "SetProperty called w/o valid setter"
+msgstr "SetProperty が適切なsetterなしで呼び出されました"
+
+#: ../src/common/filename.cpp:2632
+msgid "Setting directory access times is not supported under this OS version"
+msgstr "このバージョンの OS ではディレクトリアクセス時刻を設定できません"
+
+#: ../src/generic/prntdlgg.cpp:188
+msgid "Setup..."
+msgstr "設定 ..."
+
+#: ../src/msw/dialup.cpp:563
+msgid "Several active dialup connections found, choosing one randomly."
+msgstr "複数のダイヤルアップ接続が有効です。乱数でひとつ選びます。"
+
+#: ../src/common/accelcmn.cpp:324
+msgid "Shift+"
+msgstr "Shift+"
+
+#: ../src/generic/dirdlgg.cpp:170
+msgid "Show &hidden directories"
+msgstr "隠しディレクトリーを表示する(&H)"
+
+#: ../src/generic/filectrlg.cpp:1003
+msgid "Show &hidden files"
+msgstr "隠しファイルを表示する(&H)"
+
+#: ../src/osx/menu_osx.cpp:605 ../src/osx/menu_osx.cpp:652
+#, fuzzy
+msgid "Show All"
+msgstr "すべて表示"
+
+#: ../src/common/stockitem.cpp:257
+msgid "Show about dialog"
+msgstr "詳細ダイアログを表示します。"
+
+#: ../src/html/helpwnd.cpp:502
+msgid "Show all"
+msgstr "すべて表示"
+
+#: ../src/html/helpwnd.cpp:513
+msgid "Show all items in index"
+msgstr "索引に全項目を表示します"
+
+#: ../src/generic/dirdlgg.cpp:105
+msgid "Show hidden directories"
+msgstr "隠しディレクトリーを表示します"
+
+#: ../src/html/helpwnd.cpp:671
+msgid "Show/hide navigation panel"
+msgstr "ナビゲーションパネルの表示/非表示を切り替えます"
+
+#: ../src/richtext/richtextsymboldlg.cpp:421
+#: ../src/richtext/richtextsymboldlg.cpp:423
+msgid "Shows a Unicode subset."
+msgstr "ユニコードの部分集合を表示します。"
+
+#: ../src/richtext/richtextliststylepage.cpp:472
+#: ../src/richtext/richtextliststylepage.cpp:474
+#: ../src/richtext/richtextbulletspage.cpp:276
+#: ../src/richtext/richtextbulletspage.cpp:278
+msgid "Shows a preview of the bullet settings."
+msgstr "行頭文字設定のプレビューを表示します。"
+
+#: ../src/richtext/richtextfontpage.cpp:322
+#: ../src/richtext/richtextfontpage.cpp:324
+msgid "Shows a preview of the font settings."
+msgstr "フォント設定のプレビューを表示します。"
+
+#: ../src/osx/carbon/fontdlg.cpp:580 ../src/osx/carbon/fontdlg.cpp:582
+msgid "Shows a preview of the font."
+msgstr "フォントのプレビューを表示します。"
+
+#: ../src/richtext/richtextindentspage.cpp:303
+#: ../src/richtext/richtextindentspage.cpp:305
+msgid "Shows a preview of the paragraph settings."
+msgstr "段落設定のプレビューを表示します。"
+
+#: ../src/generic/fontdlgg.cpp:460 ../src/generic/fontdlgg.cpp:462
+msgid "Shows the font preview."
+msgstr "フォントのプレビューを表示します。"
+
+#: ../src/univ/themes/mono.cpp:516
+msgid "Simple monochrome theme"
+msgstr "簡素なモノクロのテーマ"
+
+#: ../src/richtext/richtextindentspage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:449
+msgid "Single"
+msgstr "1"
+
+#: ../src/generic/filectrlg.cpp:460 ../src/richtext/richtextformatdlg.cpp:356
+#: ../src/richtext/richtextsizepage.cpp:299
+msgid "Size"
+msgstr "大きさ"
+
+#: ../src/osx/carbon/fontdlg.cpp:525
+msgid "Size:"
+msgstr "大きさ:"
+
+#: ../src/generic/progdlgg.cpp:262 ../src/generic/progdlgg.cpp:773
+#: ../src/msw/progdlg.cpp:801
+msgid "Skip"
+msgstr "スキップ"
+
+#: ../src/generic/fontdlgg.cpp:330
+msgid "Slant"
+msgstr "斜体"
+
+#: ../src/richtext/richtextfontpage.cpp:298
+#, fuzzy
+msgid "Small C&apitals"
+msgstr "大文字化 (&P)"
+
+#: ../src/richtext/richtextborderspage.cpp:543
+#, fuzzy
+msgid "Solid"
+msgstr "太字"
+
+#: ../src/common/docview.cpp:1773
+msgid "Sorry, could not open this file."
+msgstr "ファイルを開くことができませんでした。"
+
+#: ../src/common/prntbase.cpp:2027 ../src/common/prntbase.cpp:2035
+msgid "Sorry, not enough memory to create a preview."
+msgstr "プレビューのためのメモリが足りません。"
+
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "Sorry, that name is taken. Please choose another."
+msgstr "その名前はすでに使われています。他の名前を選んでください。"
+
+#: ../src/common/docview.cpp:1796
+msgid "Sorry, the format for this file is unknown."
+msgstr "このファイルの形式は未対応です。"
+
+#: ../src/unix/sound.cpp:492
+msgid "Sound data are in unsupported format."
+msgstr "未対応の様式が使われている音声データです。"
+
+#: ../src/unix/sound.cpp:477
+#, c-format
+msgid "Sound file '%s' is in unsupported format."
+msgstr "'%s' は未対応の様式が使われている音声ファイルです。"
+
+#: ../src/richtext/richtextliststylepage.cpp:467
+msgid "Spacing"
+msgstr "間隔"
+
+#: ../src/common/stockitem.cpp:197
+#, fuzzy
+msgid "Spell Check"
+msgstr "スペルチェック (&S)"
+
+#: ../src/richtext/richtextliststylepage.cpp:490
+#: ../src/richtext/richtextbulletspage.cpp:295
+msgid "Standard"
+msgstr "標準"
+
+#: ../src/common/paper.cpp:105
+msgid "Statement, 5 1/2 x 8 1/2 in"
+msgstr "ステートメント(計算書), 5 1/2 x 8 1/2インチ"
+
+#: ../src/richtext/richtextsizepage.cpp:518
+#: ../src/richtext/richtextsizepage.cpp:523
+#, fuzzy
+msgid "Static"
+msgstr "状態:"
+
+#: ../src/generic/prntdlgg.cpp:204
+msgid "Status:"
+msgstr "状態:"
+
+#: ../src/common/stockitem.cpp:198
+#, fuzzy
+msgid "Stop"
+msgstr "停止 (&S)"
+
+#: ../src/common/stockitem.cpp:199
+#, fuzzy
+msgid "Strikethrough"
+msgstr "打ち消し線 (&S)"
+
+#: ../src/common/colourcmn.cpp:45
+#, c-format
+msgid "String To Colour : Incorrect colour specification : %s"
+msgstr "文字列から色へ : 変換に失敗しました : %s"
+
+#: ../src/richtext/richtextformatdlg.cpp:318 ../src/propgrid/advprops.cpp:647
+msgid "Style"
+msgstr "スタイル"
+
+#: ../include/wx/richtext/richtextstyledlg.h:47
+msgid "Style Organiser"
+msgstr "スタイルの構成"
+
+#: ../src/osx/carbon/fontdlg.cpp:534
+msgid "Style:"
+msgstr "スタイル:"
+
+#: ../src/richtext/richtextfontpage.cpp:312
+msgid "Subscrip&t"
+msgstr "下付き文字(&T)"
+
+#: ../src/richtext/richtextfontpage.cpp:305
+msgid "Supe&rscript"
+msgstr "上付き文字(&R)"
+
+#: ../src/common/paper.cpp:151
+msgid "SuperA/SuperA/A4 227 x 356 mm"
+msgstr "SuperA/SuperA/A4 227 x 356 mm"
+
+#: ../src/common/paper.cpp:152
+msgid "SuperB/SuperB/A3 305 x 487 mm"
+msgstr "SuperB/SuperB/A3 305 x 487 mm"
+
+#: ../src/generic/fontdlgg.cpp:326
+msgid "Swiss"
+msgstr "Swiss"
+
+#: ../src/richtext/richtextliststylepage.cpp:488
+#: ../src/richtext/richtextbulletspage.cpp:293
+msgid "Symbol"
+msgstr "記号"
+
+#: ../src/richtext/richtextliststylepage.cpp:288
+#: ../src/richtext/richtextbulletspage.cpp:240
+msgid "Symbol &font:"
+msgstr "記号フォント (&F) :"
+
+#: ../include/wx/richtext/richtextsymboldlg.h:47
+msgid "Symbols"
+msgstr "記号"
+
+#: ../src/common/accelcmn.cpp:63
+msgid "TAB"
+msgstr "TAB"
+
+#: ../src/common/imagtiff.cpp:372 ../src/common/imagtiff.cpp:385
+#: ../src/common/imagtiff.cpp:744
+msgid "TIFF: Couldn't allocate memory."
+msgstr "TIFF: メモリ割り当てに失敗しました。"
+
+#: ../src/common/imagtiff.cpp:304
+msgid "TIFF: Error loading image."
+msgstr "TIFF: 画像の読み取りエラーを検出しました。"
+
+#: ../src/common/imagtiff.cpp:471
+msgid "TIFF: Error reading image."
+msgstr "TIFF: 画像の読み取りエラーを検出しました。"
+
+#: ../src/common/imagtiff.cpp:611
+msgid "TIFF: Error saving image."
+msgstr "TIFF: 画像の書き出しエラーを検出しました。"
+
+#: ../src/common/imagtiff.cpp:849
+msgid "TIFF: Error writing image."
+msgstr "TIFF: 画像の書き出しエラーを検出しました。"
+
+#: ../src/common/imagtiff.cpp:358
+msgid "TIFF: Image size is abnormally big."
+msgstr "TIFF: 画像の大きさが極端に大きいようです。"
+
+#: ../src/richtext/richtextbuffer.cpp:10794
+#, fuzzy
+msgid "Table Properties"
+msgstr "プロパティー (&P)"
+
+#: ../src/common/paper.cpp:146
+msgid "Tabloid Extra 11.69 x 18 in"
+msgstr "タブロイド Extra 11.69 x 18インチ"
+
+#: ../src/common/paper.cpp:103
+msgid "Tabloid, 11 x 17 in"
+msgstr "タブロイド, 11 x 17インチ"
+
+#: ../src/richtext/richtextformatdlg.cpp:336
+msgid "Tabs"
+msgstr "タブ"
+
+#: ../src/generic/fontdlgg.cpp:327
+msgid "Teletype"
+msgstr "Teletype"
+
+#: ../src/common/docview.cpp:1878
+msgid "Templates"
+msgstr "雛形"
+
+#: ../src/osx/carbon/dataview.cpp:2373
+msgid "Text renderer cannot render value; value type: "
+msgstr "テキストレンダラーは次の値を処理できません; 値の型: "
+
+#: ../src/common/fmapbase.cpp:158
+msgid "Thai (ISO-8859-11)"
+msgstr "タイ語 (ISO-8859-11)"
+
+#: ../src/common/ftp.cpp:620
+msgid "The FTP server doesn't support passive mode."
+msgstr "そのFTPサーバーはPASSIVEモードに対応していません。"
+
+#: ../src/common/ftp.cpp:606
+msgid "The FTP server doesn't support the PORT command."
+msgstr "そのFTPサーバーはPORTコマンドに対応していません。"
+
+#: ../src/richtext/richtextliststylepage.cpp:215
+#: ../src/richtext/richtextliststylepage.cpp:217
+#: ../src/richtext/richtextbulletspage.cpp:164
+#: ../src/richtext/richtextbulletspage.cpp:166
+msgid "The available bullet styles."
+msgstr "使用できる行頭文字スタイルです。"
+
+#: ../src/richtext/richtextstyledlg.cpp:202
+#: ../src/richtext/richtextstyledlg.cpp:204
+msgid "The available styles."
+msgstr "使用できるスタイルです。"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:139
+#: ../src/richtext/richtextbackgroundpage.cpp:141
+#, fuzzy
+msgid "The background colour."
+msgstr "背景色"
+
+#: ../src/richtext/richtextmarginspage.cpp:268
+#: ../src/richtext/richtextmarginspage.cpp:270
+#, fuzzy
+msgid "The bottom margin size."
+msgstr "フォントの大きさをポイントで記します。"
+
+#: ../src/richtext/richtextmarginspage.cpp:382
+#: ../src/richtext/richtextmarginspage.cpp:384
+#, fuzzy
+msgid "The bottom padding size."
+msgstr "フォントの大きさをポイントで記します。"
+
+#: ../src/richtext/richtextsizepage.cpp:639
+#: ../src/richtext/richtextsizepage.cpp:641
+#: ../src/richtext/richtextsizepage.cpp:653
+#: ../src/richtext/richtextsizepage.cpp:655
+#, fuzzy
+msgid "The bottom position."
+msgstr "タブ位置です。"
+
+#: ../src/richtext/richtextliststylepage.cpp:254
+#: ../src/richtext/richtextliststylepage.cpp:256
+#: ../src/richtext/richtextliststylepage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:277
+#: ../src/richtext/richtextbulletspage.cpp:204
+#: ../src/richtext/richtextbulletspage.cpp:206
+#: ../src/richtext/richtextbulletspage.cpp:227
+#: ../src/richtext/richtextbulletspage.cpp:229
+msgid "The bullet character."
+msgstr "行頭文字を指定します。"
+
+#: ../src/richtext/richtextsymboldlg.cpp:443
+#: ../src/richtext/richtextsymboldlg.cpp:445
+msgid "The character code."
+msgstr "文字コードです。"
+
+#: ../src/common/fontmap.cpp:203
+#, c-format
+msgid ""
+"The charset '%s' is unknown. You may select\n"
+"another charset to replace it with or choose\n"
+"[Cancel] if it cannot be replaced"
+msgstr ""
+"文字集合 '%s' は未対応です。\n"
+"他の文字集合で置き換えるかそれができないときは\n"
+"キャンセルしてください"
+
+#: ../src/msw/ole/dataobj.cpp:367
+#, c-format
+msgid "The clipboard format '%d' doesn't exist."
+msgstr "クリップボード様式 '%d' は存在しません。"
+
+#: ../src/richtext/richtextstylepage.cpp:128
+#: ../src/richtext/richtextstylepage.cpp:130
+msgid "The default style for the next paragraph."
+msgstr "次の段落に適用されるスタイルを指定します。"
+
+#: ../src/generic/dirdlgg.cpp:231
+#, c-format
+msgid ""
+"The directory '%s' does not exist\n"
+"Create it now?"
+msgstr ""
+"ディレクトリー '%s' は存在しません\n"
+"作成しますか?"
+
+#: ../src/html/htmprint.cpp:271
+#, c-format
+msgid ""
+"The document \"%s\" doesn't fit on the page horizontally and will be "
+"truncated if printed.\n"
+"\n"
+"Would you like to proceed with printing it nevertheless?"
+msgstr ""
+"文書 \"%s\" はページの水平方向にあわせることができません。印刷すると切り詰め"
+"られます。\n"
+"\n"
+"ご承知の上で印刷処理を進めますか?"
+
+#: ../src/common/docview.cpp:1184
+#, fuzzy, c-format
+msgid ""
+"The file '%s' doesn't exist and couldn't be opened.\n"
+"It has been removed from the most recently used files list."
+msgstr "最近使ったファイルのリストから削除されています。"
+
+#: ../src/richtext/richtextindentspage.cpp:208
+#: ../src/richtext/richtextindentspage.cpp:210
+#: ../src/richtext/richtextliststylepage.cpp:394
+#: ../src/richtext/richtextliststylepage.cpp:396
+msgid "The first line indent."
+msgstr "最初の行の字下げです。"
+
+#: ../src/gtk/utilsgtk.cpp:427
+msgid "The following standard GTK+ options are also supported:\n"
+msgstr "次の標準GTK+オプションも利用できます:\n"
+
+#: ../src/generic/fontdlgg.cpp:414 ../src/generic/fontdlgg.cpp:416
+msgid "The font colour."
+msgstr "フォントの色を指定できます。"
+
+#: ../src/generic/fontdlgg.cpp:375 ../src/generic/fontdlgg.cpp:377
+msgid "The font family."
+msgstr "フォントのファミリーを指定できます。"
+
+#: ../src/richtext/richtextsymboldlg.cpp:405
+#: ../src/richtext/richtextsymboldlg.cpp:407
+msgid "The font from which to take the symbol."
+msgstr "記号の取得元フォントを指定できます。"
+
+#: ../src/generic/fontdlgg.cpp:427 ../src/generic/fontdlgg.cpp:429
+#: ../src/generic/fontdlgg.cpp:434 ../src/generic/fontdlgg.cpp:436
+msgid "The font point size."
+msgstr "フォントの大きさをポイントで記します。"
+
+#: ../src/osx/carbon/fontdlg.cpp:529 ../src/osx/carbon/fontdlg.cpp:531
+msgid "The font size in points."
+msgstr "フォントの大きさをポイントで記します。"
+
+#: ../src/richtext/richtextfontpage.cpp:190
+#: ../src/richtext/richtextfontpage.cpp:192
+#, fuzzy
+msgid "The font size units, points or pixels."
+msgstr "フォントの大きさをポイントで記します。"
+
+#: ../src/generic/fontdlgg.cpp:386 ../src/generic/fontdlgg.cpp:388
+msgid "The font style."
+msgstr "フォントのスタイルを指定できます。"
+
+#: ../src/generic/fontdlgg.cpp:397 ../src/generic/fontdlgg.cpp:399
+msgid "The font weight."
+msgstr "フォントのウエイトを指定できます。"
+
+#: ../src/common/docview.cpp:1465
+#, c-format
+msgid "The format of file '%s' couldn't be determined."
+msgstr "ファイル '%s' の様式を決定できませんでした。"
+
+#: ../src/richtext/richtextindentspage.cpp:199
+#: ../src/richtext/richtextindentspage.cpp:201
+#: ../src/richtext/richtextliststylepage.cpp:385
+#: ../src/richtext/richtextliststylepage.cpp:387
+msgid "The left indent."
+msgstr "左側の字下げを指定できます。"
+
+#: ../src/richtext/richtextmarginspage.cpp:195
+#: ../src/richtext/richtextmarginspage.cpp:197
+#, fuzzy
+msgid "The left margin size."
+msgstr "フォントの大きさをポイントで記します。"
+
+#: ../src/richtext/richtextmarginspage.cpp:309
+#: ../src/richtext/richtextmarginspage.cpp:311
+#, fuzzy
+msgid "The left padding size."
+msgstr "フォントの大きさをポイントで記します。"
+
+#: ../src/richtext/richtextsizepage.cpp:534
+#: ../src/richtext/richtextsizepage.cpp:536
+#: ../src/richtext/richtextsizepage.cpp:548
+#: ../src/richtext/richtextsizepage.cpp:550
+#, fuzzy
+msgid "The left position."
+msgstr "タブ位置です。"
+
+#: ../src/richtext/richtextindentspage.cpp:288
+#: ../src/richtext/richtextindentspage.cpp:290
+#: ../src/richtext/richtextliststylepage.cpp:462
+#: ../src/richtext/richtextliststylepage.cpp:464
+msgid "The line spacing."
+msgstr "行間隔を指定できます。"
+
+#: ../src/richtext/richtextbulletspage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:270
+msgid "The list item number."
+msgstr "連番の番号を指定できます。"
+
+#: ../src/msw/ole/automtn.cpp:653
+msgid "The locale ID is unknown."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:366
+#: ../src/richtext/richtextsizepage.cpp:368
+#, fuzzy
+msgid "The object height."
+msgstr "フォントのウエイトを指定できます。"
+
+#: ../src/richtext/richtextsizepage.cpp:474
+#: ../src/richtext/richtextsizepage.cpp:476
+#, fuzzy
+msgid "The object maximum height."
+msgstr "フォントのウエイトを指定できます。"
+
+#: ../src/richtext/richtextsizepage.cpp:447
+#: ../src/richtext/richtextsizepage.cpp:449
+#, fuzzy
+msgid "The object maximum width."
+msgstr "フォントのウエイトを指定できます。"
+
+#: ../src/richtext/richtextsizepage.cpp:420
+#: ../src/richtext/richtextsizepage.cpp:422
+#, fuzzy
+msgid "The object minimum height."
+msgstr "フォントのウエイトを指定できます。"
+
+#: ../src/richtext/richtextsizepage.cpp:393
+#: ../src/richtext/richtextsizepage.cpp:395
+#, fuzzy
+msgid "The object minimum width."
+msgstr "フォントのウエイトを指定できます。"
+
+#: ../src/richtext/richtextsizepage.cpp:332
+#: ../src/richtext/richtextsizepage.cpp:334
+#, fuzzy
+msgid "The object width."
+msgstr "フォントのウエイトを指定できます。"
+
+#: ../src/richtext/richtextindentspage.cpp:227
+#: ../src/richtext/richtextindentspage.cpp:229
+msgid "The outline level."
+msgstr "アウトラインレベルを指定できます。"
+
+#: ../src/common/log.cpp:281
+#, fuzzy, c-format
+msgid "The previous message repeated %lu time."
+msgid_plural "The previous message repeated %lu times."
+msgstr[0] "直前のメッセージは %lu 回繰り返されました。"
+
+#: ../src/common/log.cpp:274
+#, fuzzy
+msgid "The previous message repeated once."
+msgstr "直前のメッセージは %lu 回繰り返されました。"
+
+#: ../src/gtk/print.cpp:931 ../src/gtk/print.cpp:1114
+msgid "The print dialog returned an error."
+msgstr "印刷ダイアログがエラーを返しました。"
+
+#: ../src/richtext/richtextsymboldlg.cpp:462
+#: ../src/richtext/richtextsymboldlg.cpp:464
+msgid "The range to show."
+msgstr "表示する範囲を指定できます。"
+
+#: ../src/generic/dbgrptg.cpp:322
+msgid ""
+"The report contains the files listed below. If any of these files contain "
+"private information,\n"
+"please uncheck them and they will be removed from the report.\n"
+msgstr ""
+"レポートに含まれるファイルは下記の通りです。公開すべきでないファイルが含まれ"
+"ている場合は\n"
+"そのファイルのチェックを外せばレポートから取り除かれます。\n"
+
+#: ../src/common/cmdline.cpp:1083
+#, c-format
+msgid "The required parameter '%s' was not specified."
+msgstr "必須引数 '%s' が与えられていません。"
+
+#: ../src/richtext/richtextindentspage.cpp:217
+#: ../src/richtext/richtextindentspage.cpp:219
+#: ../src/richtext/richtextliststylepage.cpp:403
+#: ../src/richtext/richtextliststylepage.cpp:405
+msgid "The right indent."
+msgstr "右側の字下げです。"
+
+#: ../src/richtext/richtextmarginspage.cpp:220
+#: ../src/richtext/richtextmarginspage.cpp:222
+#, fuzzy
+msgid "The right margin size."
+msgstr "右側の字下げです。"
+
+#: ../src/richtext/richtextmarginspage.cpp:334
+#: ../src/richtext/richtextmarginspage.cpp:336
+#, fuzzy
+msgid "The right padding size."
+msgstr "右側の字下げです。"
+
+#: ../src/richtext/richtextsizepage.cpp:604
+#: ../src/richtext/richtextsizepage.cpp:606
+#: ../src/richtext/richtextsizepage.cpp:618
+#: ../src/richtext/richtextsizepage.cpp:620
+#, fuzzy
+msgid "The right position."
+msgstr "タブ位置です。"
+
+#: ../src/richtext/richtextindentspage.cpp:267
+#: ../src/richtext/richtextliststylepage.cpp:439
+#: ../src/richtext/richtextliststylepage.cpp:441
+msgid "The spacing after the paragraph."
+msgstr "段落の後の空間を指定します。"
+
+#: ../src/richtext/richtextindentspage.cpp:257
+#: ../src/richtext/richtextindentspage.cpp:259
+#: ../src/richtext/richtextliststylepage.cpp:430
+#: ../src/richtext/richtextliststylepage.cpp:432
+msgid "The spacing before the paragraph."
+msgstr "段落の前の空間を指定します。"
+
+#: ../src/richtext/richtextstylepage.cpp:108
+#: ../src/richtext/richtextstylepage.cpp:110
+msgid "The style name."
+msgstr "スタイル名です。"
+
+#: ../src/richtext/richtextstylepage.cpp:118
+#: ../src/richtext/richtextstylepage.cpp:120
+msgid "The style on which this style is based."
+msgstr "このスタイルの元となるスタイルです。"
+
+#: ../src/richtext/richtextstyledlg.cpp:214
+#: ../src/richtext/richtextstyledlg.cpp:216
+msgid "The style preview."
+msgstr "スタイルのプレビューです。"
+
+#: ../src/msw/ole/automtn.cpp:669
+msgid "The system cannot find the file specified."
+msgstr ""
+
+#: ../src/richtext/richtexttabspage.cpp:118
+#: ../src/richtext/richtexttabspage.cpp:120
+msgid "The tab position."
+msgstr "タブ位置です。"
+
+#: ../src/richtext/richtexttabspage.cpp:124
+msgid "The tab positions."
+msgstr "タブ位置の一覧です。"
+
+#: ../src/richtext/richtextctrl.cpp:2705
+msgid "The text couldn't be saved."
+msgstr "テキストが保存できませんでした。"
+
+#: ../src/richtext/richtextmarginspage.cpp:243
+#: ../src/richtext/richtextmarginspage.cpp:245
+#, fuzzy
+msgid "The top margin size."
+msgstr "フォントの大きさをポイントで記します。"
+
+#: ../src/richtext/richtextmarginspage.cpp:357
+#: ../src/richtext/richtextmarginspage.cpp:359
+#, fuzzy
+msgid "The top padding size."
+msgstr "フォントの大きさをポイントで記します。"
+
+#: ../src/richtext/richtextsizepage.cpp:569
+#: ../src/richtext/richtextsizepage.cpp:571
+#: ../src/richtext/richtextsizepage.cpp:583
+#: ../src/richtext/richtextsizepage.cpp:585
+#, fuzzy
+msgid "The top position."
+msgstr "タブ位置です。"
+
+#: ../src/common/cmdline.cpp:1061
+#, c-format
+msgid "The value for the option '%s' must be specified."
+msgstr "オプション '%s' とその値は必ず指定してください。"
+
+#: ../src/msw/dialup.cpp:452
+#, c-format
+msgid ""
+"The version of remote access service (RAS) installed on this machine is too "
+"old, please upgrade (the following required function is missing: %s)."
+msgstr ""
+"このコンピューターにインストールされているリモートアクセスサービス(RAS)は古す"
+"ぎるようです。新しいものを用意してください(機能 %s が必要です)。"
+
+#: ../src/gtk/print.cpp:959
+msgid "The wxGtkPrinterDC cannot be used."
+msgstr "wxGtkPrinterDC が利用できません。"
+
+#: ../src/osx/carbon/dataview.cpp:1340
+msgid "There is no column or renderer for the specified column index."
+msgstr "指定された列のレンダラーまたは列そのものが存在しません。"
+
+#: ../src/richtext/richtextprint.cpp:614 ../src/html/htmprint.cpp:735
+msgid ""
+"There was a problem during page setup: you may need to set a default printer."
+msgstr ""
+"ページの準備中に問題が検出されました: 既定のプリンターが未指定なら指定してく"
+"ださい。"
+
+#: ../src/html/htmprint.cpp:255
+msgid ""
+"This document doesn't fit on the page horizontally and will be truncated "
+"when it is printed."
+msgstr ""
+"この文書はページの水平方向にあわせることができません。印刷すると切り詰められ"
+"ます。"
+
+#: ../src/common/image.cpp:2716
+#, fuzzy, c-format
+msgid "This is not a %s."
+msgstr "PCX: PCXファイルではないようです。"
+
+#: ../src/common/wincmn.cpp:1653
+msgid "This platform does not support background transparency."
+msgstr ""
+
+#: ../src/gtk/window.cpp:4317
+msgid ""
+"This program was compiled with a too old version of GTK+, please rebuild "
+"with GTK+ 2.12 or newer."
+msgstr ""
+
+#: ../src/msw/datecontrols.cpp:59
+msgid ""
+"This system doesn't support date controls, please upgrade your version of "
+"comctl32.dll"
+msgstr ""
+"このシステムは、date コントロールに未対応です。comctl32.dllを更新してください"
+
+#: ../src/msw/thread.cpp:1300
+msgid ""
+"Thread module initialization failed: cannot store value in thread local "
+"storage"
+msgstr ""
+"スレッドモジュールの初期化に失敗: スレッドローカルストレージに値を保存できま"
+"せんでした"
+
+#: ../src/unix/threadpsx.cpp:1758
+msgid "Thread module initialization failed: failed to create thread key"
+msgstr "スレッドモジュールの初期化に失敗: スレッドキーを作成できませんでした"
+
+#: ../src/msw/thread.cpp:1288
+msgid ""
+"Thread module initialization failed: impossible to allocate index in thread "
+"local storage"
+msgstr ""
+"スレッドモジュールの初期化に失敗: スレッドローカルストレージに索引を割り当て"
+"られませんでした"
+
+#: ../src/unix/threadpsx.cpp:1038
+msgid "Thread priority setting is ignored."
+msgstr "スレッド優先度の設定は無視されました。"
+
+#: ../src/msw/mdi.cpp:172
+msgid "Tile &Horizontally"
+msgstr "横に並べる(&H)"
+
+#: ../src/msw/mdi.cpp:173
+msgid "Tile &Vertically"
+msgstr "縦に並べる(&V)"
+
+#: ../src/common/ftp.cpp:202
+msgid "Timeout while waiting for FTP server to connect, try passive mode."
+msgstr ""
+"FTPサーバーとの接続を待機中に時間切れになりました。PASSIVEモードで試してみて"
+"ください。"
+
+#: ../src/os2/timer.cpp:99
+msgid "Timer creation failed."
+msgstr "タイマーの作成に失敗しました。"
+
+#: ../src/generic/tipdlg.cpp:220
+msgid "Tip of the Day"
+msgstr "今日のチップ"
+
+#: ../src/generic/tipdlg.cpp:154
+msgid "Tips not available, sorry!"
+msgstr "チップが使えません、ごめんね!"
+
+#: ../src/generic/prntdlgg.cpp:242
+msgid "To:"
+msgstr "末尾ページ:"
+
+#: ../src/osx/carbon/dataview.cpp:2451
+msgid "Toggle renderer cannot render value; value type: "
+msgstr "トグルレンダラーが値を処理できません: 値の型: "
+
+#: ../src/richtext/richtextbuffer.cpp:7983
+msgid "Too many EndStyle calls!"
+msgstr "EndStyle の呼び出しが多すぎます。"
+
+#: ../src/common/imagpng.cpp:286
+msgid "Too many colours in PNG, the image may be slightly blurred."
+msgstr "PNGにある色が多すぎます。少しぼやけた感じになるかもしれません。"
+
+#: ../src/richtext/richtextsizepage.cpp:286
+#: ../src/richtext/richtextsizepage.cpp:290 ../src/common/stockitem.cpp:200
+#, fuzzy
+msgid "Top"
+msgstr "上端 (&T)"
+
+#: ../src/generic/prntdlgg.cpp:881
+msgid "Top margin (mm):"
+msgstr "余白-天 (mm):"
+
+#: ../src/generic/aboutdlgg.cpp:79
+msgid "Translations by "
+msgstr "翻訳 : "
+
+#: ../src/generic/aboutdlgg.cpp:188
+msgid "Translators"
+msgstr "翻訳者"
+
+#: ../src/propgrid/propgrid.cpp:173
+msgid "True"
+msgstr "真"
+
+#: ../src/common/fs_mem.cpp:227
+#, c-format
+msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!"
+msgstr "メモリVFSにまだ読み込まれていない '%s' の削除を要求されました。"
+
+#: ../src/common/fmapbase.cpp:156
+msgid "Turkish (ISO-8859-9)"
+msgstr "トルコ語 (ISO-8859-9)"
+
+#: ../src/generic/filectrlg.cpp:461
+msgid "Type"
+msgstr "種類"
+
+#: ../src/richtext/richtextfontpage.cpp:160
+#: ../src/richtext/richtextfontpage.cpp:162
+msgid "Type a font name."
+msgstr "フォント名を指定します。"
+
+#: ../src/richtext/richtextfontpage.cpp:175
+#: ../src/richtext/richtextfontpage.cpp:177
+msgid "Type a size in points."
+msgstr "ポイントで大きさを指定します。"
+
+#: ../src/msw/ole/automtn.cpp:665
+#, c-format
+msgid "Type mismatch in argument %u."
+msgstr ""
+
+#: ../src/common/xtixml.cpp:356 ../src/common/xtixml.cpp:509
+#: ../src/common/xtistrm.cpp:322
+msgid "Type must have enum - long conversion"
+msgstr "型は列挙からlongへの変換が可能でなくてはなりません。"
+
+#: ../src/propgrid/propgridiface.cpp:382
+#, c-format
+msgid ""
+"Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT "
+"\"%s\"."
+msgstr ""
+"型の処理 \"%s\" に失敗:  \"%s\" とラベルされたプロパティーは \"%s\" 型で"
+"す。\"%s\" ではありません。"
+
+#: ../src/common/accelcmn.cpp:58
+msgid "UP"
+msgstr "↑"
+
+#: ../src/common/paper.cpp:134
+msgid "US Std Fanfold, 14 7/8 x 11 in"
+msgstr "米国標準折りたたみ連続紙, 14 7/8 x 11インチ"
+
+#: ../src/common/fmapbase.cpp:196
+msgid "US-ASCII"
+msgstr "US-ASCII"
+
+#: ../src/unix/fswatcher_inotify.cpp:109
+msgid "Unable to add inotify watch"
+msgstr "inotify 監視を追加できませんでした"
+
+#: ../src/unix/fswatcher_kqueue.cpp:136
+msgid "Unable to add kqueue watch"
+msgstr "kqueue 監視を追加できませんでした"
+
+#: ../include/wx/msw/private/fswatcher.h:142
+msgid "Unable to associate handle with I/O completion port"
+msgstr "ハンドルをI/O完了ポートに関連づけることができませんでした"
+
+#: ../include/wx/msw/private/fswatcher.h:125
+msgid "Unable to close I/O completion port handle"
+msgstr "I/O完了ポートハンドルを閉じることができませんでした"
+
+#: ../src/unix/fswatcher_inotify.cpp:97
+msgid "Unable to close inotify instance"
+msgstr "inotify 実体を閉じることができませんでした。"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:74
+#, c-format
+msgid "Unable to close path '%s'"
+msgstr "パス '%s' を閉じることができませんでした。"
+
+#: ../include/wx/msw/private/fswatcher.h:48
+#, c-format
+msgid "Unable to close the handle for '%s'"
+msgstr "'%s' へのハンドルを閉じることができませんでした。"
+
+#: ../include/wx/msw/private/fswatcher.h:240
+msgid "Unable to create I/O completion port"
+msgstr "I/O完了ポートを作成できません"
+
+#: ../src/msw/fswatcher.cpp:84
+msgid "Unable to create IOCP worker thread"
+msgstr "IOCP ワーカースレッドを作成できません"
+
+#: ../src/unix/fswatcher_inotify.cpp:74
+msgid "Unable to create inotify instance"
+msgstr "inotify 実体を作成できません"
+
+#: ../src/unix/fswatcher_kqueue.cpp:97
+msgid "Unable to create kqueue instance"
+msgstr "kqueue 実体を作成できません"
+
+#: ../include/wx/msw/private/fswatcher.h:229
+msgid "Unable to dequeue completion packet"
+msgstr "完了パケットを双方向に扱えませんでした"
+
+#: ../src/unix/fswatcher_kqueue.cpp:185
+msgid "Unable to get events from kqueue"
+msgstr "kqueue からのイベントを取得できませんでした"
+
+#: ../src/osx/carbon/dataview.cpp:1903
+msgid "Unable to handle native drag&drop data"
+msgstr "ネイティブのドラッグアンドドロップデータを制御できませんでした"
+
+#: ../src/gtk/app.cpp:439
+msgid "Unable to initialize GTK+, is DISPLAY set properly?"
+msgstr "GTK+を初期化できません。 DISPLAY の設定が不適切の可能性があります。"
+
+#: ../src/gtk/app.cpp:276
+msgid "Unable to initialize Hildon program"
+msgstr "Hildon プログラムを初期化できません"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:57
+#, c-format
+msgid "Unable to open path '%s'"
+msgstr "パス '%s' を開くことができません"
+
+#: ../src/html/htmlwin.cpp:561
+#, c-format
+msgid "Unable to open requested HTML document: %s"
+msgstr "要求されたHTML文書を開くことができません: %s"
+
+#: ../src/unix/sound.cpp:368
+msgid "Unable to play sound asynchronously."
+msgstr "音の非同期演奏はできません。"
+
+#: ../include/wx/msw/private/fswatcher.h:207
+msgid "Unable to post completion status"
+msgstr "完了状態を post できませんでした"
+
+#: ../src/unix/fswatcher_inotify.cpp:530
+msgid "Unable to read from inotify descriptor"
+msgstr "inotify 記述子から読み取ることができません"
+
+#: ../src/unix/fswatcher_inotify.cpp:132
+msgid "Unable to remove inotify watch"
+msgstr "inotify 監視を削除できませんでした"
+
+#: ../src/unix/fswatcher_kqueue.cpp:153
+msgid "Unable to remove kqueue watch"
+msgstr "kqueue 監視を削除できませんでした"
+
+#: ../src/msw/fswatcher.cpp:168
+#, c-format
+msgid "Unable to set up watch for '%s'"
+msgstr "'%s' の監視を準備できませんでした。"
+
+#: ../src/msw/fswatcher.cpp:91
+msgid "Unable to start IOCP worker thread"
+msgstr "IOCP ワーカースレッドを開始できませんでした"
+
+#: ../src/common/stockitem.cpp:201
+msgid "Undelete"
+msgstr "削除の取り消し"
+
+#: ../src/common/stockitem.cpp:202
+#, fuzzy
+msgid "Underline"
+msgstr "下線 (&U)"
+
+#: ../src/richtext/richtextfontpage.cpp:341 ../src/osx/carbon/fontdlg.cpp:556
+#: ../src/propgrid/advprops.cpp:655
+msgid "Underlined"
+msgstr "下線付き"
+
+#: ../src/common/stockitem.cpp:203 ../src/stc/stc_i18n.cpp:15
+msgid "Undo"
+msgstr "元に戻す"
+
+#: ../src/common/stockitem.cpp:265
+msgid "Undo last action"
+msgstr "最後の編集を取り消します"
+
+#: ../src/common/cmdline.cpp:864
+#, c-format
+msgid "Unexpected characters following option '%s'."
+msgstr "オプション '%s' に想定外の文字が続いています。"
+
+#: ../src/unix/fswatcher_inotify.cpp:261
+#, c-format
+msgid "Unexpected event for \"%s\": no matching watch descriptor."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1024
+#, c-format
+msgid "Unexpected parameter '%s'"
+msgstr "想定外の変数 '%s' があります"
+
+#: ../include/wx/msw/private/fswatcher.h:148
+msgid "Unexpectedly new I/O completion port was created"
+msgstr "予期しない新しいI/O完了ポートが作成されました"
+
+#: ../src/msw/fswatcher.cpp:70
+msgid "Ungraceful worker thread termination"
+msgstr "ワーカースレッドを強引に停止させます"
+
+#: ../src/richtext/richtextsymboldlg.cpp:459
+#: ../src/richtext/richtextsymboldlg.cpp:460
+#: ../src/richtext/richtextsymboldlg.cpp:461
+msgid "Unicode"
+msgstr "ユニコード"
+
+#: ../src/common/fmapbase.cpp:185 ../src/common/fmapbase.cpp:191
+msgid "Unicode 16 bit (UTF-16)"
+msgstr "ユニコード 16 ビット (UTF-16)"
+
+#: ../src/common/fmapbase.cpp:190
+msgid "Unicode 16 bit Big Endian (UTF-16BE)"
+msgstr "ユニコード 16 ビット Big Endian (UTF-16BE)"
+
+#: ../src/common/fmapbase.cpp:186
+msgid "Unicode 16 bit Little Endian (UTF-16LE)"
+msgstr "ユニコード 16ビット Little Endian (UTF-16LE)"
+
+#: ../src/common/fmapbase.cpp:187 ../src/common/fmapbase.cpp:193
+msgid "Unicode 32 bit (UTF-32)"
+msgstr "ユニコード 32 ビット (UTF-32)"
+
+#: ../src/common/fmapbase.cpp:192
+msgid "Unicode 32 bit Big Endian (UTF-32BE)"
+msgstr "ユニコード 32 ビット Big Endian (UTF-32BE)"
+
+#: ../src/common/fmapbase.cpp:188
+msgid "Unicode 32 bit Little Endian (UTF-32LE)"
+msgstr "ユニコード 32 ビット Little Endian (UTF-32LE)"
+
+#: ../src/common/fmapbase.cpp:182
+msgid "Unicode 7 bit (UTF-7)"
+msgstr "ユニコード 7 ビット (UTF-7)"
+
+#: ../src/common/fmapbase.cpp:183
+msgid "Unicode 8 bit (UTF-8)"
+msgstr "ユニコード 8 ビット (UTF-8)"
+
+#: ../src/common/stockitem.cpp:204
+#, fuzzy
+msgid "Unindent"
+msgstr "字下げ解除 (&U)"
+
+#: ../src/richtext/richtextborderspage.cpp:373
+#: ../src/richtext/richtextborderspage.cpp:375
+msgid "Units for the bottom border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:278
+#: ../src/richtext/richtextmarginspage.cpp:280
+msgid "Units for the bottom margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:517
+#: ../src/richtext/richtextborderspage.cpp:519
+msgid "Units for the bottom outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:392
+#: ../src/richtext/richtextmarginspage.cpp:394
+msgid "Units for the bottom padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:664
+#: ../src/richtext/richtextsizepage.cpp:666
+#, fuzzy
+msgid "Units for the bottom position."
+msgstr "スレッドの終了待ちに失敗しました。"
+
+#: ../src/richtext/richtextborderspage.cpp:283
+#: ../src/richtext/richtextborderspage.cpp:285
+msgid "Units for the left border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:205
+#: ../src/richtext/richtextmarginspage.cpp:207
+msgid "Units for the left margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:427
+#: ../src/richtext/richtextborderspage.cpp:429
+msgid "Units for the left outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:319
+#: ../src/richtext/richtextmarginspage.cpp:321
+msgid "Units for the left padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:559
+#: ../src/richtext/richtextsizepage.cpp:561
+#, fuzzy
+msgid "Units for the left position."
+msgstr "スレッドの終了待ちに失敗しました。"
+
+#: ../src/richtext/richtextsizepage.cpp:485
+#: ../src/richtext/richtextsizepage.cpp:487
+#, fuzzy
+msgid "Units for the maximum object height."
+msgstr "フォントのウエイトを指定できます。"
+
+#: ../src/richtext/richtextsizepage.cpp:458
+#: ../src/richtext/richtextsizepage.cpp:460
+#, fuzzy
+msgid "Units for the maximum object width."
+msgstr "フォントのウエイトを指定できます。"
+
+#: ../src/richtext/richtextsizepage.cpp:431
+#: ../src/richtext/richtextsizepage.cpp:433
+#, fuzzy
+msgid "Units for the minimum object height."
+msgstr "フォントのウエイトを指定できます。"
+
+#: ../src/richtext/richtextsizepage.cpp:404
+#: ../src/richtext/richtextsizepage.cpp:406
+#, fuzzy
+msgid "Units for the minimum object width."
+msgstr "フォントのウエイトを指定できます。"
+
+#: ../src/richtext/richtextsizepage.cpp:377
+#: ../src/richtext/richtextsizepage.cpp:379
+msgid "Units for the object height."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:343
+#: ../src/richtext/richtextsizepage.cpp:345
+msgid "Units for the object width."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:313
+#: ../src/richtext/richtextborderspage.cpp:315
+msgid "Units for the right border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:230
+#: ../src/richtext/richtextmarginspage.cpp:232
+msgid "Units for the right margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:457
+#: ../src/richtext/richtextborderspage.cpp:459
+msgid "Units for the right outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:344
+#: ../src/richtext/richtextmarginspage.cpp:346
+msgid "Units for the right padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:629
+#: ../src/richtext/richtextsizepage.cpp:631
+#, fuzzy
+msgid "Units for the right position."
+msgstr "スレッドの終了待ちに失敗しました。"
+
+#: ../src/richtext/richtextborderspage.cpp:343
+#: ../src/richtext/richtextborderspage.cpp:345
+msgid "Units for the top border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:253
+#: ../src/richtext/richtextmarginspage.cpp:255
+#, fuzzy
+msgid "Units for the top margin."
+msgstr "スレッドの終了待ちに失敗しました。"
+
+#: ../src/richtext/richtextborderspage.cpp:487
+#: ../src/richtext/richtextborderspage.cpp:489
+msgid "Units for the top outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:367
+#: ../src/richtext/richtextmarginspage.cpp:369
+msgid "Units for the top padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:594
+#: ../src/richtext/richtextsizepage.cpp:596
+#, fuzzy
+msgid "Units for the top position."
+msgstr "スレッドの終了待ちに失敗しました。"
+
+#: ../src/generic/progdlgg.cpp:382 ../src/generic/progdlgg.cpp:655
+msgid "Unknown"
+msgstr "不明"
+
+#: ../src/msw/dde.cpp:1177
+#, c-format
+msgid "Unknown DDE error %08x"
+msgstr "想定外のDDE エラー 0x%08x"
+
+#: ../src/common/xtistrm.cpp:414
+msgid "Unknown Object passed to GetObjectClassInfo"
+msgstr "未知のオブジェクトが GetObjectClassInfo に渡されました"
+
+#: ../src/common/imagpng.cpp:614
+#, fuzzy, c-format
+msgid "Unknown PNG resolution unit %d"
+msgstr "未知の解像度単位 %d を無視しました"
+
+#: ../src/common/xtixml.cpp:327
+#, c-format
+msgid "Unknown Property %s"
+msgstr "未知のプロパティ %s"
+
+#: ../src/common/imagtiff.cpp:532
+#, c-format
+msgid "Unknown TIFF resolution unit %d ignored"
+msgstr "未知の解像度単位 %d を無視しました"
+
+#: ../src/osx/carbon/dataview.cpp:1978
+msgid "Unknown data format"
+msgstr "未知のデータ様式です"
+
+#: ../src/unix/dlunix.cpp:325
+msgid "Unknown dynamic library error"
+msgstr "想定外の動的ライブラリーエラー"
+
+#: ../src/common/fmapbase.cpp:810
+#, c-format
+msgid "Unknown encoding (%d)"
+msgstr "未知のエンコーディング (%d)"
+
+#: ../src/msw/ole/automtn.cpp:677
+#, fuzzy, c-format
+msgid "Unknown error %08x"
+msgstr "想定外のDDE エラー 0x%08x"
+
+#: ../src/msw/ole/automtn.cpp:636
+#, fuzzy
+msgid "Unknown exception"
+msgstr "未定義の簡易オプション名 '%s'"
+
+#: ../src/common/image.cpp:2701
+#, fuzzy
+msgid "Unknown image data format."
+msgstr "未知のデータ様式です"
+
+#: ../src/common/cmdline.cpp:749
+#, c-format
+msgid "Unknown long option '%s'"
+msgstr "未定義の詳細オプション名 '%s'"
+
+#: ../src/msw/ole/automtn.cpp:620
+#, fuzzy
+msgid "Unknown name or named argument."
+msgstr "未知のデータ様式です"
+
+#: ../src/common/cmdline.cpp:764 ../src/common/cmdline.cpp:786
+#, c-format
+msgid "Unknown option '%s'"
+msgstr "未定義の簡易オプション名 '%s'"
+
+#: ../src/common/mimecmn.cpp:230
+#, c-format
+msgid "Unmatched '{' in an entry for mime type %s."
+msgstr "MIME型 %s の項目に閉じていない '{' がありました。"
+
+#: ../src/common/cmdproc.cpp:262 ../src/common/cmdproc.cpp:288
+#: ../src/common/cmdproc.cpp:308
+msgid "Unnamed command"
+msgstr "無名コマンド"
+
+#: ../src/propgrid/propgrid.cpp:398
+msgid "Unspecified"
+msgstr "未指定"
+
+#: ../src/msw/clipbrd.cpp:271 ../src/msw/clipbrd.cpp:439
+msgid "Unsupported clipboard format."
+msgstr "未対応のクリップボード様式です。"
+
+#: ../src/common/appcmn.cpp:249
+#, c-format
+msgid "Unsupported theme '%s'."
+msgstr "テーマ '%s' は未対応です。"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:205
+msgid "Up"
+msgstr "上へ"
+
+#: ../src/richtext/richtextliststylepage.cpp:483
+#: ../src/richtext/richtextbulletspage.cpp:288
+msgid "Upper case letters"
+msgstr "大文字単語"
+
+#: ../src/richtext/richtextliststylepage.cpp:485
+#: ../src/richtext/richtextbulletspage.cpp:290
+msgid "Upper case roman numerals"
+msgstr "大文字ローマ数字"
+
+#: ../src/common/cmdline.cpp:1155
+#, c-format
+msgid "Usage: %s"
+msgstr "使い方: %s"
+
+#: ../src/richtext/richtextindentspage.cpp:169
+#: ../src/richtext/richtextindentspage.cpp:171
+#: ../src/richtext/richtextliststylepage.cpp:358
+#: ../src/richtext/richtextliststylepage.cpp:360
+msgid "Use the current alignment setting."
+msgstr "現在の整列設定を用います。"
+
+#: ../src/osx/carbon/dataview.cpp:2658 ../src/osx/carbon/dataview.cpp:2723
+msgid "Valid pointer to native data view control does not exist"
+msgstr "ネイティブデータビューコントロールへの有効なポインタがありません。"
+
+#: ../src/common/valtext.cpp:174
+msgid "Validation conflict"
+msgstr "確認処理に矛盾があります"
+
+#: ../src/propgrid/manager.cpp:238
+msgid "Value"
+msgstr "値"
+
+#: ../src/propgrid/props.cpp:384
+#, fuzzy, c-format
+msgid "Value must be %s or higher."
+msgstr "%f 以上の値にしてください"
+
+#: ../src/propgrid/props.cpp:411
+#, fuzzy, c-format
+msgid "Value must be %s or less."
+msgstr "%f 以下の値にしてください"
+
+#: ../src/propgrid/props.cpp:388 ../src/propgrid/props.cpp:415
+#, fuzzy, c-format
+msgid "Value must be between %s and %s."
+msgstr "%f 以下の値にしてください"
+
+#: ../src/generic/aboutdlgg.cpp:128
+msgid "Version "
+msgstr "バージョン "
+
+#: ../src/richtext/richtextsizepage.cpp:291
+#: ../src/richtext/richtextsizepage.cpp:293
+#, fuzzy
+msgid "Vertical alignment."
+msgstr "整列方法を設定できませんでした。"
+
+#: ../src/generic/filedlgg.cpp:216
+msgid "View files as a detailed view"
+msgstr "詳細情報付きでファイル一覧を見る"
+
+#: ../src/generic/filedlgg.cpp:214
+msgid "View files as a list view"
+msgstr "リスト形式でファイル一覧を見る"
+
+#: ../src/common/docview.cpp:1952
+msgid "Views"
+msgstr "ビュー"
+
+#: ../src/common/accelcmn.cpp:108
+msgid "WINDOWS_LEFT"
+msgstr "左Windows"
+
+#: ../src/common/accelcmn.cpp:110
+msgid "WINDOWS_MENU"
+msgstr "Application"
+
+#: ../src/common/accelcmn.cpp:109
+msgid "WINDOWS_RIGHT"
+msgstr "右Windows"
+
+#: ../src/unix/epolldispatcher.cpp:213
+#, c-format
+msgid "Waiting for IO on epoll descriptor %d failed"
+msgstr "epoll 記述子 %d の IO 待ちに失敗しました"
+
+#: ../src/common/log.cpp:227
+msgid "Warning: "
+msgstr "警告:"
+
+#: ../src/propgrid/advprops.cpp:651
+msgid "Weight"
+msgstr "ウエイト"
+
+#: ../src/common/fmapbase.cpp:148
+msgid "Western European (ISO-8859-1)"
+msgstr "西ヨーロッパ言語 (ISO-8859-1)"
+
+#: ../src/common/fmapbase.cpp:162
+msgid "Western European with Euro (ISO-8859-15)"
+msgstr "西ヨーロッパ言語ユーロ記号付き (Latin-9, ISO-8859-15)"
+
+#: ../src/generic/fontdlgg.cpp:446 ../src/generic/fontdlgg.cpp:448
+msgid "Whether the font is underlined."
+msgstr "フォントに下線が付くかどうか。"
+
+#: ../src/generic/fdrepdlg.cpp:144
+msgid "Whole word"
+msgstr "単語全体"
+
+#: ../src/html/helpwnd.cpp:547
+msgid "Whole words only"
+msgstr "全体一致のみ"
+
+#: ../src/univ/themes/win32.cpp:1102
+msgid "Win32 theme"
+msgstr "Win32 テーマ"
+
+#: ../src/msw/utils.cpp:1220
+msgid "Win32s on Windows 3.1"
+msgstr "Windows 3.1 上の Win32s"
+
+#: ../src/msw/utils.cpp:1270
+#, fuzzy
+msgid "Windows 2000"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1302
+#, fuzzy
+msgid "Windows 7"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1234
+msgid "Windows 95"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1230
+msgid "Windows 95 OSR2"
+msgstr "Windows 95 OSR2"
+
+#: ../src/msw/utils.cpp:1245
+msgid "Windows 98"
+msgstr "Windows 98"
+
+#: ../src/msw/utils.cpp:1241
+msgid "Windows 98 SE"
+msgstr "Windows 98 SE"
+
+#: ../src/msw/utils.cpp:1252
+#, c-format
+msgid "Windows 9x (%d.%d)"
+msgstr "Windows 9x (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:177
+msgid "Windows Arabic (CP 1256)"
+msgstr "Windows アラビア語 (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:178
+msgid "Windows Baltic (CP 1257)"
+msgstr "Windows バルト言語 (CP 1257)"
+
+#: ../src/msw/utils.cpp:1214
+#, c-format
+msgid "Windows CE (%d.%d)"
+msgstr "Windows CE (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:171
+msgid "Windows Central European (CP 1250)"
+msgstr "Windows 中央ヨーロッパ言語 (CP 1250)"
+
+#: ../src/common/fmapbase.cpp:168
+#, fuzzy
+msgid "Windows Chinese Simplified (CP 936) or GB-2312"
+msgstr "Windows 簡体字中国語 (CP 936)"
+
+#: ../src/common/fmapbase.cpp:170
+#, fuzzy
+msgid "Windows Chinese Traditional (CP 950) or Big-5"
+msgstr "Windows 繁体字中国語 (CP 950)"
+
+#: ../src/common/fmapbase.cpp:172
+msgid "Windows Cyrillic (CP 1251)"
+msgstr "Windows キリル言語 (CP 1251)"
+
+#: ../src/common/fmapbase.cpp:174
+msgid "Windows Greek (CP 1253)"
+msgstr "Windows ギリシャ語 (CP 1253)"
+
+#: ../src/common/fmapbase.cpp:176
+msgid "Windows Hebrew (CP 1255)"
+msgstr "Windows ヘブライ語 (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:167
+#, fuzzy
+msgid "Windows Japanese (CP 932) or Shift-JIS"
+msgstr "Windows 日本語/Windows シフトJIS (CP 932)"
+
+#: ../src/common/fmapbase.cpp:180
+#, fuzzy
+msgid "Windows Johab (CP 1361)"
+msgstr "Windows アラビア語 (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:169
+msgid "Windows Korean (CP 949)"
+msgstr "Windows 韓国語 (CP 949)"
+
+#: ../src/msw/utils.cpp:1249
+msgid "Windows ME"
+msgstr "Windows ME"
+
+#: ../src/msw/utils.cpp:1310
+#, fuzzy, c-format
+msgid "Windows NT %lu.%lu"
+msgstr "Windows NT %lu.%lu (ビルド %lu"
+
+#: ../src/msw/utils.cpp:1279
+#, fuzzy
+msgid "Windows Server 2003"
+msgstr "Windows Server 2003 (ビルド %lu"
+
+#: ../src/msw/utils.cpp:1295
+#, fuzzy
+msgid "Windows Server 2008"
+msgstr "Windows Server 2003 (ビルド %lu"
+
+#: ../src/msw/utils.cpp:1301
+#, fuzzy
+msgid "Windows Server 2008 R2"
+msgstr "Windows Server 2003 (ビルド %lu"
+
+#: ../src/common/fmapbase.cpp:166
+msgid "Windows Thai (CP 874)"
+msgstr "Windows タイ語 (CP 874)"
+
+#: ../src/common/fmapbase.cpp:175
+msgid "Windows Turkish (CP 1254)"
+msgstr "Windows トルコ語 (CP 1254)"
+
+#: ../src/common/fmapbase.cpp:179
+#, fuzzy
+msgid "Windows Vietnamese (CP 1258)"
+msgstr "Windows ギリシャ語 (CP 1253)"
+
+#: ../src/msw/utils.cpp:1296
+#, fuzzy
+msgid "Windows Vista"
+msgstr "Windows Vista (ビルド %lu"
+
+#: ../src/common/fmapbase.cpp:173
+msgid "Windows Western European (CP 1252)"
+msgstr "Windows 西ヨーロッパ言語 (CP 1252)"
+
+#: ../src/msw/utils.cpp:1285
+#, fuzzy
+msgid "Windows XP"
+msgstr "Windows 95"
+
+#: ../src/common/fmapbase.cpp:181
+msgid "Windows/DOS OEM (CP 437)"
+msgstr "Windows/DOS OEM (CP 437)"
+
+#: ../src/common/fmapbase.cpp:165
+#, fuzzy
+msgid "Windows/DOS OEM Cyrillic (CP 866)"
+msgstr "Windows キリル言語 (CP 1251)"
+
+#: ../src/common/ffile.cpp:148
+#, c-format
+msgid "Write error on file '%s'"
+msgstr "ファイル '%s' への書き出しエラー"
+
+#: ../src/xml/xml.cpp:844
+#, c-format
+msgid "XML parsing error: '%s' at line %d"
+msgstr "XML 解析エラー: '%s' (%d行目)"
+
+#: ../src/common/xpmdecod.cpp:796
+msgid "XPM: Malformed pixel data!"
+msgstr "XPM: 定形外のピクセルデータがありました"
+
+#: ../src/common/xpmdecod.cpp:705
+#, c-format
+msgid "XPM: incorrect colour description in line %d"
+msgstr "XPM: %d行目の色記述に問題があります"
+
+#: ../src/common/xpmdecod.cpp:680
+msgid "XPM: incorrect header format!"
+msgstr "XPM: ヘッダーが必要な様式を満たしていません。"
+
+#: ../src/common/xpmdecod.cpp:716 ../src/common/xpmdecod.cpp:725
+#, c-format
+msgid "XPM: malformed colour definition '%s' at line %d!"
+msgstr "XPM: 定形外の色定義 '%s' が%d行目にありました。"
+
+#: ../src/common/xpmdecod.cpp:755
+msgid "XPM: no colors left to use for mask!"
+msgstr "XPM: マスクに使うための色が残っていません。"
+
+#: ../src/common/xpmdecod.cpp:782
+#, c-format
+msgid "XPM: truncated image data at line %d!"
+msgstr "XPM: %d行目に不完全な画像データがありました。"
+
+#: ../include/wx/msgdlg.h:271 ../src/common/stockitem.cpp:206
+#: ../src/motif/msgdlg.cpp:196
+msgid "Yes"
+msgstr "はい"
+
+#: ../src/osx/carbon/overlay.cpp:155
+msgid "You cannot Clear an overlay that is not inited"
+msgstr "オーバーレイは初期化する前に Clear できません"
+
+#: ../src/osx/carbon/overlay.cpp:107 ../src/dfb/overlay.cpp:61
+msgid "You cannot Init an overlay twice"
+msgstr "オーバーレイは二度 Init できません"
+
+#: ../src/generic/dirdlgg.cpp:316
+msgid "You cannot add a new directory to this section."
+msgstr "このセクションに新しいディレクトリーは追加できません。"
+
+#: ../src/propgrid/propgrid.cpp:3258
+msgid "You have entered invalid value. Press ESC to cancel editing."
+msgstr ""
+
+#: ../src/common/stockitem.cpp:209
+msgid "Zoom &In"
+msgstr "拡大(&I)"
+
+#: ../src/common/stockitem.cpp:210
+msgid "Zoom &Out"
+msgstr "縮小(&O)"
+
+#: ../src/common/stockitem.cpp:209 ../src/common/prntbase.cpp:1564
+#, fuzzy
+msgid "Zoom In"
+msgstr "拡大(&I)"
+
+#: ../src/common/stockitem.cpp:210 ../src/common/prntbase.cpp:1550
+#, fuzzy
+msgid "Zoom Out"
+msgstr "縮小(&O)"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to &Fit"
+msgstr "画面に合わせる(&F)"
+
+#: ../src/common/stockitem.cpp:208
+#, fuzzy
+msgid "Zoom to Fit"
+msgstr "画面に合わせる(&F)"
+
+#: ../src/msw/dde.cpp:1144
+msgid "a DDEML application has created a prolonged race condition."
+msgstr "DDEML アプリケーションが競合状態の延長として作成されています。"
+
+#: ../src/msw/dde.cpp:1132
+msgid ""
+"a DDEML function was called without first calling the DdeInitialize "
+"function,\n"
+"or an invalid instance identifier\n"
+"was passed to a DDEML function."
+msgstr ""
+"DdeInitalize 関数より先に別の DDEML 関数が呼び出されたか、\n"
+"無効な実体識別子が DDEML 関数に渡されました。\n"
+" "
+
+#: ../src/msw/dde.cpp:1150
+msgid "a client's attempt to establish a conversation has failed."
+msgstr "クライアントによる通信対話の確立が試みられましたが失敗しました。"
+
+#: ../src/msw/dde.cpp:1147
+msgid "a memory allocation failed."
+msgstr "メモリ割り当てに失敗しました。"
+
+#: ../src/msw/dde.cpp:1141
+msgid "a parameter failed to be validated by the DDEML."
+msgstr "DDEML の評価により引数の失敗が検出されました。"
+
+#: ../src/msw/dde.cpp:1123
+msgid "a request for a synchronous advise transaction has timed out."
+msgstr "非同期 advise トランザクションの要求が時間切れになりました。"
+
+#: ../src/msw/dde.cpp:1129
+msgid "a request for a synchronous data transaction has timed out."
+msgstr "非同期 data トランザクションの要求が時間切れになりました。"
+
+#: ../src/msw/dde.cpp:1138
+msgid "a request for a synchronous execute transaction has timed out."
+msgstr "非同期 execute トランザクションの要求が時間切れになりました。"
+
+#: ../src/msw/dde.cpp:1156
+msgid "a request for a synchronous poke transaction has timed out."
+msgstr "非同期 poke トランザクションの要求が時間切れになりました。"
+
+#: ../src/msw/dde.cpp:1171
+msgid "a request to end an advise transaction has timed out."
+msgstr "advise トランザクション終了の要求が時間切れになりました。"
+
+#: ../src/msw/dde.cpp:1165
+msgid ""
+"a server-side transaction was attempted on a conversation\n"
+"that was terminated by the client, or the server\n"
+"terminated before completing a transaction."
+msgstr ""
+"サーバーサイドトランザクションが通信対話の確立を試みましたが\n"
+"クライアントによって終了されたかトランザクション成立前に\n"
+"終了してしまいました。"
+
+#: ../src/msw/dde.cpp:1153
+msgid "a transaction failed."
+msgstr "トランザクションが失敗しました。"
+
+#: ../src/common/accelcmn.cpp:184
+msgid "alt"
+msgstr "Alt"
+
+#: ../src/msw/dde.cpp:1135
+msgid ""
+"an application initialized as APPCLASS_MONITOR has\n"
+"attempted to perform a DDE transaction,\n"
+"or an application initialized as APPCMD_CLIENTONLY has \n"
+"attempted to perform server transactions."
+msgstr ""
+"APPCLASS_MONITOR として初期化されたアプリケーションが\n"
+"DDEトランザクションの実現を試みたか、\n"
+"APPCMD_CLIENTONLY で初期化されたものが\n"
+"サーバートランザクションの実現を試みようとしました。"
+
+#: ../src/msw/dde.cpp:1159
+msgid "an internal call to the PostMessage function has failed. "
+msgstr "PostMessage関数の内部呼び出しが失敗しました。"
+
+#: ../src/msw/dde.cpp:1168
+msgid "an internal error has occurred in the DDEML."
+msgstr "DDEMLの内部エラーが発生しました。"
+
+#: ../src/msw/dde.cpp:1174
+msgid ""
+"an invalid transaction identifier was passed to a DDEML function.\n"
+"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n"
+"the transaction identifier for that callback is no longer valid."
+msgstr ""
+"不正なトランザクション識別子が DDEML 関数に渡されました。\n"
+"XTYP_XACT_COMPLETE コールバックで識別子を使った後復帰した\n"
+"アプリケーションはその識別子を以後の呼び出しで使うことができません。"
+
+#: ../src/common/zipstrm.cpp:1272
+msgid "assuming this is a multi-part zip concatenated"
+msgstr "複数のzipファイルが結合されるよう意図されたデータです"
+
+#: ../src/common/fileconf.cpp:1882
+#, c-format
+msgid "attempt to change immutable key '%s' ignored."
+msgstr "不変キー '%s' への変更要求を無視しました。"
+
+#: ../src/html/chm.cpp:329
+msgid "bad arguments to library function"
+msgstr "ライブラリ関数への引数に問題があります"
+
+#: ../src/html/chm.cpp:341
+msgid "bad signature"
+msgstr "未対応の識別文字です"
+
+#: ../src/common/zipstrm.cpp:1715
+msgid "bad zipfile offset to entry"
+msgstr "項目へのzipfileオフセットが不適当です"
+
+#: ../src/common/ftp.cpp:405
+msgid "binary"
+msgstr "バイナリー"
+
+#: ../src/common/fontcmn.cpp:978
+msgid "bold"
+msgstr "太字"
+
+#: ../src/os2/iniconf.cpp:463
+msgid "buffer is too small for Windows directory."
+msgstr "バッファーが小さいので Windows ディレクトリーを格納できません。"
+
+#: ../src/msw/utils.cpp:1316
+#, fuzzy, c-format
+msgid "build %lu"
+msgstr "Windows XP (ビルド %lu"
+
+#: ../src/common/ffile.cpp:79
+#, c-format
+msgid "can't close file '%s'"
+msgstr "ファイル '%s' を閉じることができません"
+
+#: ../src/common/file.cpp:278
+#, c-format
+msgid "can't close file descriptor %d"
+msgstr "記述子 %d のファイルを閉じることができません"
+
+#: ../src/common/file.cpp:604
+#, c-format
+msgid "can't commit changes to file '%s'"
+msgstr "変更をファイル '%s' に反映できません。"
+
+#: ../src/common/file.cpp:212
+#, c-format
+msgid "can't create file '%s'"
+msgstr "ファイル '%s' を作成できません"
+
+#: ../src/common/fileconf.cpp:1176
+#, c-format
+msgid "can't delete user configuration file '%s'"
+msgstr "ユーザー設定ファイル '%s' を削除できません"
+
+#: ../src/common/file.cpp:511
+#, c-format
+msgid "can't determine if the end of file is reached on descriptor %d"
+msgstr "記述子 %d のファイルがEOFに達したかどうかを判断できません"
+
+#: ../src/msdos/utilsdos.cpp:310 ../src/msdos/utilsdos.cpp:475
+#, c-format
+msgid "can't execute '%s'"
+msgstr "'%s' を実行できません。"
+
+#: ../src/common/zipstrm.cpp:1490
+msgid "can't find central directory in zip"
+msgstr "zip内にセントラルディレクトリー部が見つかりません。"
+
+#: ../src/common/file.cpp:481
+#, c-format
+msgid "can't find length of file on file descriptor %d"
+msgstr "記述子 %d のファイルから長さを取得できません"
+
+#: ../src/msw/utils.cpp:373
+msgid "can't find user's HOME, using current directory."
+msgstr "ユーザーのHOMEが見つかりません。カレントディレクトリーを使用します。"
+
+#: ../src/common/file.cpp:382
+#, c-format
+msgid "can't flush file descriptor %d"
+msgstr "記述子 %d のファイルをフラッシュできません"
+
+#: ../src/common/file.cpp:438 ../src/msw/wince/filefnwce.cpp:204
+#, c-format
+msgid "can't get seek position on file descriptor %d"
+msgstr "記述子 %d のファイルからシーク位置を取得できません"
+
+#: ../src/common/fontmap.cpp:325
+msgid "can't load any font, aborting"
+msgstr "フォントが一切読み取れません、中止します"
+
+#: ../src/common/file.cpp:264 ../src/common/ffile.cpp:63
+#, c-format
+msgid "can't open file '%s'"
+msgstr "ファイル '%s' を開くことができません。"
+
+#: ../src/common/fileconf.cpp:351
+#, c-format
+msgid "can't open global configuration file '%s'."
+msgstr "共有設定ファイル '%s' を開くことができません。"
+
+#: ../src/common/fileconf.cpp:367
+#, c-format
+msgid "can't open user configuration file '%s'."
+msgstr "ユーザー設定ファイル '%s' を開くことができません。"
+
+#: ../src/common/fileconf.cpp:1017
+msgid "can't open user configuration file."
+msgstr "ユーザー設定ファイルを開くことができません。"
+
+#: ../src/common/zipstrm.cpp:527
+msgid "can't re-initialize zlib deflate stream"
+msgstr "zlibをdeflateストリームで再初期化できません"
+
+#: ../src/common/zipstrm.cpp:552
+msgid "can't re-initialize zlib inflate stream"
+msgstr "zlibをinflateストリームで再初期化できません"
+
+#: ../src/common/file.cpp:334
+#, c-format
+msgid "can't read from file descriptor %d"
+msgstr "記述子 %d のファイルから読み取ることができません"
+
+#: ../src/common/file.cpp:599
+#, c-format
+msgid "can't remove file '%s'"
+msgstr "ファイル '%s' を削除できません"
+
+#: ../src/common/file.cpp:616
+#, c-format
+msgid "can't remove temporary file '%s'"
+msgstr "一時ファイル '%s' を削除できません"
+
+#: ../src/common/file.cpp:424 ../src/msw/wince/filefnwce.cpp:190
+#, c-format
+msgid "can't seek on file descriptor %d"
+msgstr "記述子 %d のファイル上をシークできません"
+
+#: ../src/common/textfile.cpp:299
+#, c-format
+msgid "can't write buffer '%s' to disk."
+msgstr "バッファー '%s' をディスクに書き出すことができません。"
+
+#: ../src/common/file.cpp:350
+#, c-format
+msgid "can't write to file descriptor %d"
+msgstr "記述子 %d のファイルへ書き出すことができません。"
+
+#: ../src/common/fileconf.cpp:1031
+msgid "can't write user configuration file."
+msgstr "ユーザー設定ファイルを書き出すことができません。"
+
+#: ../src/html/chm.cpp:345
+msgid "checksum error"
+msgstr "チェックサムエラー"
+
+#: ../src/common/tarstrm.cpp:820
+msgid "checksum failure reading tar header block"
+msgstr "ヘッダーブロックを読み取り中にチェックサムの不整合が見つかりました"
+
+#: ../src/richtext/richtextborderspage.cpp:280
+#: ../src/richtext/richtextborderspage.cpp:310
+#: ../src/richtext/richtextborderspage.cpp:340
+#: ../src/richtext/richtextborderspage.cpp:370
+#: ../src/richtext/richtextborderspage.cpp:424
+#: ../src/richtext/richtextborderspage.cpp:454
+#: ../src/richtext/richtextborderspage.cpp:484
+#: ../src/richtext/richtextborderspage.cpp:514
+#: ../src/richtext/richtextmarginspage.cpp:202
+#: ../src/richtext/richtextmarginspage.cpp:227
+#: ../src/richtext/richtextmarginspage.cpp:250
+#: ../src/richtext/richtextmarginspage.cpp:275
+#: ../src/richtext/richtextmarginspage.cpp:316
+#: ../src/richtext/richtextmarginspage.cpp:341
+#: ../src/richtext/richtextmarginspage.cpp:364
+#: ../src/richtext/richtextmarginspage.cpp:389
+#: ../src/richtext/richtextsizepage.cpp:339
+#: ../src/richtext/richtextsizepage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:400
+#: ../src/richtext/richtextsizepage.cpp:427
+#: ../src/richtext/richtextsizepage.cpp:454
+#: ../src/richtext/richtextsizepage.cpp:481
+#: ../src/richtext/richtextsizepage.cpp:555
+#: ../src/richtext/richtextsizepage.cpp:590
+#: ../src/richtext/richtextsizepage.cpp:625
+#: ../src/richtext/richtextsizepage.cpp:660
+msgid "cm"
+msgstr ""
+
+#: ../src/html/chm.cpp:347
+msgid "compression error"
+msgstr "圧縮エラー"
+
+#: ../src/common/regex.cpp:239
+msgid "conversion to 8-bit encoding failed"
+msgstr "8ビットエンコーディングへの変換に失敗しました"
+
+#: ../src/common/accelcmn.cpp:182
+msgid "ctrl"
+msgstr "Ctrl"
+
+#: ../src/common/cmdline.cpp:1323
+msgid "date"
+msgstr "日付"
+
+#: ../src/html/chm.cpp:349
+msgid "decompression error"
+msgstr "展開エラー"
+
+#: ../src/richtext/richtextstyles.cpp:780 ../src/common/fmapbase.cpp:820
+msgid "default"
+msgstr "規定"
+
+#: ../src/common/cmdline.cpp:1319
+msgid "double"
+msgstr "double値"
+
+#: ../src/common/debugrpt.cpp:543
+msgid "dump of the process state (binary)"
+msgstr "バイナリーによるプロセス状態のダンプ"
+
+#: ../src/common/datetimefmt.cpp:1936
+msgid "eighteenth"
+msgstr "18日"
+
+#: ../src/common/datetimefmt.cpp:1926
+msgid "eighth"
+msgstr "8日"
+
+#: ../src/common/datetimefmt.cpp:1929
+msgid "eleventh"
+msgstr "11日"
+
+#: ../src/common/fileconf.cpp:1868
+#, c-format
+msgid "entry '%s' appears more than once in group '%s'"
+msgstr "項目 '%s' が二回以上グループ '%s' に現れています"
+
+#: ../src/html/chm.cpp:343
+msgid "error in data format"
+msgstr "データ様式にエラーがありました"
+
+#: ../src/msdos/utilsdos.cpp:413
+#, c-format
+msgid "error opening '%s'"
+msgstr "'%s' を開く際にエラーが発生しました"
+
+#: ../src/html/chm.cpp:331
+msgid "error opening file"
+msgstr "ファイルを開く際にエラーが発生しました"
+
+#: ../src/common/zipstrm.cpp:1576
+msgid "error reading zip central directory"
+msgstr "zipのセントラルディレクトリーを読み取り中にエラーを検出しました"
+
+#: ../src/common/zipstrm.cpp:1667
+msgid "error reading zip local header"
+msgstr "zipのローカルヘッダーを読み取り中にエラーを検出しました。"
+
+#: ../src/common/zipstrm.cpp:2396
+#, c-format
+msgid "error writing zip entry '%s': bad crc or length"
+msgstr "zip項目 '%s' の書き出しエラー: CRCまたは長さが不正です"
+
+#: ../src/common/ffile.cpp:170
+#, c-format
+msgid "failed to flush the file '%s'"
+msgstr "ファイル '%s' のフラッシュができませんでした"
+
+#: ../src/common/datetimefmt.cpp:1933
+msgid "fifteenth"
+msgstr "15日"
+
+#: ../src/common/datetimefmt.cpp:1923
+msgid "fifth"
+msgstr "5日"
+
+#: ../src/common/fileconf.cpp:610
+#, c-format
+msgid "file '%s', line %d: '%s' ignored after group header."
+msgstr "ファイル '%s' %d行目: グループヘッダの後にある '%s' は無視されます。"
+
+#: ../src/common/fileconf.cpp:639
+#, c-format
+msgid "file '%s', line %d: '=' expected."
+msgstr "ファイル '%s' %d行目: '=' がありません。"
+
+#: ../src/common/fileconf.cpp:662
+#, c-format
+msgid "file '%s', line %d: key '%s' was first found at line %d."
+msgstr "ファイル '%s' %d行目: キー '%s' はすでに %d行目に出てきました。"
+
+#: ../src/common/fileconf.cpp:652
+#, c-format
+msgid "file '%s', line %d: value for immutable key '%s' ignored."
+msgstr "ファイル '%s'  %d行目: 不変キー '%s' への値は無視されます。"
+
+#: ../src/common/fileconf.cpp:574
+#, c-format
+msgid "file '%s': unexpected character %c at line %d."
+msgstr "ファイル '%s': 想定外の文字 %c が %d 行目にありました。"
+
+#: ../src/richtext/richtextbuffer.cpp:8358
+msgid "files"
+msgstr "ファイル"
+
+#: ../src/common/datetimefmt.cpp:1919
+msgid "first"
+msgstr "1日"
+
+#: ../src/html/helpwnd.cpp:1265
+msgid "font size"
+msgstr "フォントの大きさ"
+
+#: ../src/common/datetimefmt.cpp:1932
+msgid "fourteenth"
+msgstr "14日"
+
+#: ../src/common/datetimefmt.cpp:1922
+msgid "fourth"
+msgstr "4日"
+
+#: ../src/common/appbase.cpp:695
+msgid "generate verbose log messages"
+msgstr "冗長なログメッセージを生成します。"
+
+#: ../src/richtext/richtextbuffer.cpp:12212
+#: ../src/richtext/richtextbuffer.cpp:12322
+msgid "image"
+msgstr "画像一時ファイル"
+
+#: ../src/common/tarstrm.cpp:796
+msgid "incomplete header block in tar"
+msgstr "不完全なtarヘッダブロックです"
+
+#: ../src/common/xtixml.cpp:489
+msgid "incorrect event handler string, missing dot"
+msgstr "点が付いていない不正なイベントハンドラー文字列です"
+
+#: ../src/common/tarstrm.cpp:1381
+msgid "incorrect size given for tar entry"
+msgstr "tar項目に不正な大きさが与えられています"
+
+#: ../src/common/tarstrm.cpp:993
+msgid "invalid data in extended tar header"
+msgstr "拡張tarヘッダに不正なデータがあります"
+
+#: ../src/generic/logg.cpp:1050
+msgid "invalid message box return value"
+msgstr "メッセージボックスの戻り値は不正なものになります。"
+
+#: ../src/common/zipstrm.cpp:1445
+msgid "invalid zip file"
+msgstr "不完全なzipファイルです"
+
+#: ../src/common/fontcmn.cpp:983
+msgid "italic"
+msgstr "イタリック"
+
+#: ../src/common/fontcmn.cpp:973
+msgid "light"
+msgstr "軽量"
+
+#: ../src/common/intl.cpp:293
+#, c-format
+msgid "locale '%s' cannot be set."
+msgstr "ロケールに '%s' を指定できませんでした。"
+
+#: ../src/common/datetimefmt.cpp:2092
+msgid "midnight"
+msgstr "0時"
+
+#: ../src/common/datetimefmt.cpp:1937
+msgid "nineteenth"
+msgstr "19日"
+
+#: ../src/common/datetimefmt.cpp:1927
+msgid "ninth"
+msgstr "9日"
+
+#: ../src/msw/dde.cpp:1119
+msgid "no DDE error."
+msgstr "DDE エラーはありませんでした。"
+
+#: ../src/html/chm.cpp:327
+msgid "no error"
+msgstr "エラーなし"
+
+#: ../src/dfb/fontmgr.cpp:174
+#, c-format
+msgid "no fonts found in %s, using builtin font"
+msgstr "%s にフォントが含まれていません。ビルトインフォントを使用します"
+
+#: ../src/html/helpdata.cpp:655
+msgid "noname"
+msgstr "名称未設定"
+
+#: ../src/common/datetimefmt.cpp:2091
+msgid "noon"
+msgstr "正午"
+
+#: ../src/richtext/richtextstyles.cpp:779
+msgid "normal"
+msgstr "通常"
+
+#: ../src/gtk/print.cpp:1218 ../src/gtk/print.cpp:1323
+msgid "not implemented"
+msgstr "実装されていません"
+
+#: ../src/common/cmdline.cpp:1315
+msgid "num"
+msgstr "数値"
+
+#: ../src/common/xtixml.cpp:259
+msgid "objects cannot have XML Text Nodes"
+msgstr "オブジェクトは XML テキストノードを持つことができません"
+
+#: ../src/html/chm.cpp:339
+msgid "out of memory"
+msgstr "メモリ不足"
+
+#: ../src/richtext/richtextsizepage.cpp:340
+#: ../src/richtext/richtextsizepage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:401
+#: ../src/richtext/richtextsizepage.cpp:428
+#: ../src/richtext/richtextsizepage.cpp:455
+#: ../src/richtext/richtextsizepage.cpp:482
+#: ../src/richtext/richtextsizepage.cpp:556
+#: ../src/richtext/richtextsizepage.cpp:591
+#: ../src/richtext/richtextsizepage.cpp:626
+#: ../src/richtext/richtextsizepage.cpp:661
+msgid "percent"
+msgstr ""
+
+#: ../src/common/debugrpt.cpp:519
+msgid "process context description"
+msgstr "プロセスコンテキストの記述"
+
+#: ../src/richtext/richtextfontpage.cpp:186
+#: ../src/richtext/richtextfontpage.cpp:189
+msgid "pt"
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:187
+#: ../src/richtext/richtextborderspage.cpp:279
+#: ../src/richtext/richtextborderspage.cpp:281
+#: ../src/richtext/richtextborderspage.cpp:282
+#: ../src/richtext/richtextborderspage.cpp:309
+#: ../src/richtext/richtextborderspage.cpp:311
+#: ../src/richtext/richtextborderspage.cpp:312
+#: ../src/richtext/richtextborderspage.cpp:339
+#: ../src/richtext/richtextborderspage.cpp:341
+#: ../src/richtext/richtextborderspage.cpp:342
+#: ../src/richtext/richtextborderspage.cpp:369
+#: ../src/richtext/richtextborderspage.cpp:371
+#: ../src/richtext/richtextborderspage.cpp:372
+#: ../src/richtext/richtextborderspage.cpp:423
+#: ../src/richtext/richtextborderspage.cpp:425
+#: ../src/richtext/richtextborderspage.cpp:426
+#: ../src/richtext/richtextborderspage.cpp:453
+#: ../src/richtext/richtextborderspage.cpp:455
+#: ../src/richtext/richtextborderspage.cpp:456
+#: ../src/richtext/richtextborderspage.cpp:483
+#: ../src/richtext/richtextborderspage.cpp:485
+#: ../src/richtext/richtextborderspage.cpp:486
+#: ../src/richtext/richtextborderspage.cpp:513
+#: ../src/richtext/richtextborderspage.cpp:515
+#: ../src/richtext/richtextborderspage.cpp:516
+#: ../src/richtext/richtextmarginspage.cpp:201
+#: ../src/richtext/richtextmarginspage.cpp:203
+#: ../src/richtext/richtextmarginspage.cpp:204
+#: ../src/richtext/richtextmarginspage.cpp:226
+#: ../src/richtext/richtextmarginspage.cpp:228
+#: ../src/richtext/richtextmarginspage.cpp:229
+#: ../src/richtext/richtextmarginspage.cpp:249
+#: ../src/richtext/richtextmarginspage.cpp:251
+#: ../src/richtext/richtextmarginspage.cpp:252
+#: ../src/richtext/richtextmarginspage.cpp:274
+#: ../src/richtext/richtextmarginspage.cpp:276
+#: ../src/richtext/richtextmarginspage.cpp:277
+#: ../src/richtext/richtextmarginspage.cpp:315
+#: ../src/richtext/richtextmarginspage.cpp:317
+#: ../src/richtext/richtextmarginspage.cpp:318
+#: ../src/richtext/richtextmarginspage.cpp:340
+#: ../src/richtext/richtextmarginspage.cpp:342
+#: ../src/richtext/richtextmarginspage.cpp:343
+#: ../src/richtext/richtextmarginspage.cpp:363
+#: ../src/richtext/richtextmarginspage.cpp:365
+#: ../src/richtext/richtextmarginspage.cpp:366
+#: ../src/richtext/richtextmarginspage.cpp:388
+#: ../src/richtext/richtextmarginspage.cpp:390
+#: ../src/richtext/richtextmarginspage.cpp:391
+#: ../src/richtext/richtextsizepage.cpp:338
+#: ../src/richtext/richtextsizepage.cpp:341
+#: ../src/richtext/richtextsizepage.cpp:342
+#: ../src/richtext/richtextsizepage.cpp:372
+#: ../src/richtext/richtextsizepage.cpp:375
+#: ../src/richtext/richtextsizepage.cpp:376
+#: ../src/richtext/richtextsizepage.cpp:399
+#: ../src/richtext/richtextsizepage.cpp:402
+#: ../src/richtext/richtextsizepage.cpp:403
+#: ../src/richtext/richtextsizepage.cpp:426
+#: ../src/richtext/richtextsizepage.cpp:429
+#: ../src/richtext/richtextsizepage.cpp:430
+#: ../src/richtext/richtextsizepage.cpp:453
+#: ../src/richtext/richtextsizepage.cpp:456
+#: ../src/richtext/richtextsizepage.cpp:457
+#: ../src/richtext/richtextsizepage.cpp:480
+#: ../src/richtext/richtextsizepage.cpp:483
+#: ../src/richtext/richtextsizepage.cpp:484
+#: ../src/richtext/richtextsizepage.cpp:554
+#: ../src/richtext/richtextsizepage.cpp:557
+#: ../src/richtext/richtextsizepage.cpp:558
+#: ../src/richtext/richtextsizepage.cpp:589
+#: ../src/richtext/richtextsizepage.cpp:592
+#: ../src/richtext/richtextsizepage.cpp:593
+#: ../src/richtext/richtextsizepage.cpp:624
+#: ../src/richtext/richtextsizepage.cpp:627
+#: ../src/richtext/richtextsizepage.cpp:628
+#: ../src/richtext/richtextsizepage.cpp:659
+#: ../src/richtext/richtextsizepage.cpp:662
+#: ../src/richtext/richtextsizepage.cpp:663
+msgid "px"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:188
+#, fuzzy
+msgid "rawctrl"
+msgstr "Ctrl"
+
+#: ../src/html/chm.cpp:333
+msgid "read error"
+msgstr "読み取りエラー"
+
+#: ../src/common/zipstrm.cpp:1882
+#, c-format
+msgid "reading zip stream (entry %s): bad crc"
+msgstr "zipストリームの読み取り中 (項目 %s): CRC 不一致"
+
+#: ../src/common/zipstrm.cpp:1877
+#, c-format
+msgid "reading zip stream (entry %s): bad length"
+msgstr "zipストリームの読み取り中 (項目 %s): 不正な長さ"
+
+#: ../src/msw/dde.cpp:1162
+msgid "reentrancy problem."
+msgstr "同期トランザクションが別の同期トランザクションを開始しようとしました。"
+
+#: ../src/common/datetimefmt.cpp:1920
+msgid "second"
+msgstr "2日"
+
+#: ../src/html/chm.cpp:337
+msgid "seek error"
+msgstr "シークエラー"
+
+#: ../src/common/datetimefmt.cpp:1935
+msgid "seventeenth"
+msgstr "17日"
+
+#: ../src/common/datetimefmt.cpp:1925
+msgid "seventh"
+msgstr "7日"
+
+#: ../src/common/accelcmn.cpp:186
+msgid "shift"
+msgstr "Shift"
+
+#: ../src/common/appbase.cpp:685
+msgid "show this help message"
+msgstr "このヘルプメッセージを表示します"
+
+#: ../src/common/datetimefmt.cpp:1934
+msgid "sixteenth"
+msgstr "16日"
+
+#: ../src/common/datetimefmt.cpp:1924
+msgid "sixth"
+msgstr "6日"
+
+#: ../src/common/appcmn.cpp:227
+msgid "specify display mode to use (e.g. 640x480-16)"
+msgstr "使用する画面モードを指定ください(例: 640x480-16)"
+
+#: ../src/common/appcmn.cpp:213
+msgid "specify the theme to use"
+msgstr "使用するテーマを指定ください"
+
+#: ../src/richtext/richtextbuffer.cpp:8876
+msgid "standard/circle"
+msgstr "標準/丸"
+
+#: ../src/richtext/richtextbuffer.cpp:8877
+#, fuzzy
+msgid "standard/circle-outline"
+msgstr "標準/丸"
+
+#: ../src/richtext/richtextbuffer.cpp:8879
+msgid "standard/diamond"
+msgstr "標準/ひし形"
+
+#: ../src/richtext/richtextbuffer.cpp:8878
+msgid "standard/square"
+msgstr "標準/四角"
+
+#: ../src/richtext/richtextbuffer.cpp:8880
+msgid "standard/triangle"
+msgstr "標準/三角"
+
+#: ../src/common/zipstrm.cpp:1782
+msgid "stored file length not in Zip header"
+msgstr "Zipヘッダーにファイルの長さが記されていません"
+
+#: ../src/common/cmdline.cpp:1311
+msgid "str"
+msgstr "文字列"
+
+#: ../src/common/fontcmn.cpp:794 ../src/common/fontcmn.cpp:969
+#, fuzzy
+msgid "strikethrough"
+msgstr "打ち消し線 (&S)"
+
+#: ../src/common/tarstrm.cpp:1003 ../src/common/tarstrm.cpp:1025
+#: ../src/common/tarstrm.cpp:1507 ../src/common/tarstrm.cpp:1529
+msgid "tar entry not open"
+msgstr "TARの項目を開くことができません"
+
+#: ../src/common/datetimefmt.cpp:1928
+msgid "tenth"
+msgstr "10日"
+
+#: ../src/msw/dde.cpp:1126
+msgid "the response to the transaction caused the DDE_FBUSY bit to be set."
+msgstr "トランザクションへの応答が DDE_FBUSY ビットの設定を引き起こしました。"
+
+#: ../src/common/datetimefmt.cpp:1921
+msgid "third"
+msgstr "3日"
+
+#: ../src/common/datetimefmt.cpp:1931
+msgid "thirteenth"
+msgstr "13日"
+
+#: ../src/common/datetimefmt.cpp:1725
+msgid "today"
+msgstr "今日"
+
+#: ../src/common/datetimefmt.cpp:1727
+msgid "tomorrow"
+msgstr "明日"
+
+#: ../src/common/fileconf.cpp:1979
+#, c-format
+msgid "trailing backslash ignored in '%s'"
+msgstr "'%s' の末尾にある / は無視されました"
+
+#: ../src/gtk/aboutdlg.cpp:218
+msgid "translator-credits"
+msgstr "翻訳者-謝辞"
+
+#: ../src/common/datetimefmt.cpp:1930
+msgid "twelfth"
+msgstr "12日"
+
+#: ../src/common/datetimefmt.cpp:1938
+msgid "twentieth"
+msgstr "20日"
+
+#: ../src/common/fontcmn.cpp:789 ../src/common/fontcmn.cpp:965
+msgid "underlined"
+msgstr "下線"
+
+#: ../src/common/fileconf.cpp:2014
+#, c-format
+msgid "unexpected \" at position %d in '%s'."
+msgstr "%d文字目に想定外の\"があります '%s'。"
+
+#: ../src/common/tarstrm.cpp:1045
+msgid "unexpected end of file"
+msgstr "想定外の状況でファイル末尾に達しました"
+
+#: ../src/generic/progdlgg.cpp:399 ../src/common/tarstrm.cpp:371
+#: ../src/common/tarstrm.cpp:394 ../src/common/tarstrm.cpp:425
+msgid "unknown"
+msgstr "不明"
+
+#: ../src/common/xtixml.cpp:253
+#, c-format
+msgid "unknown class %s"
+msgstr "不明なクラス %s"
+
+#: ../src/common/regex.cpp:261 ../src/html/chm.cpp:351
+msgid "unknown error"
+msgstr "想定外のエラーです"
+
+#: ../src/msw/dialup.cpp:490
+#, c-format
+msgid "unknown error (error code %08x)."
+msgstr "想定外のエラーです (エラーコード 0x%08x)."
+
+#: ../src/msw/wince/filefnwce.cpp:172
+msgid "unknown seek origin"
+msgstr "未対応のシーク方法です"
+
+#: ../src/common/fmapbase.cpp:834
+#, c-format
+msgid "unknown-%d"
+msgstr "未知-%d"
+
+#: ../src/common/docview.cpp:507
+msgid "unnamed"
+msgstr "名称未指定"
+
+#: ../src/common/docview.cpp:1606
+#, c-format
+msgid "unnamed%d"
+msgstr "名称未指定%d"
+
+#: ../src/common/zipstrm.cpp:1796 ../src/common/zipstrm.cpp:2184
+msgid "unsupported Zip compression method"
+msgstr "この Zip 圧縮法には未対応です"
+
+#: ../src/common/translation.cpp:1883
+#, c-format
+msgid "using catalog '%s' from '%s'."
+msgstr "カタログ '%s' を '%s' から利用します。"
+
+#: ../src/html/chm.cpp:335
+msgid "write error"
+msgstr "書き出しエラー"
+
+#: ../src/common/time.cpp:318
+msgid "wxGetTimeOfDay failed."
+msgstr "wxGetTimeOfDay が失敗しました。"
+
+#: ../src/gtk/print.cpp:987
+msgid "wxPrintout::GetPageInfo gives a null maxPage."
+msgstr "wxPrintout::GetPageInfo が maxPage に 0 を返しました。"
+
+#: ../src/osx/carbon/dataview.cpp:1303
+msgid "wxWidget control pointer is not a data view pointer"
+msgstr "wxWidgets コントロールポインターはデータビューポインターではありません"
+
+#: ../src/osx/carbon/dataview.cpp:907
+msgid "wxWidget's control not initialized."
+msgstr "wxWidgetsのコントロールが初期化されていません。"
+
+#: ../src/motif/app.cpp:245
+#, c-format
+msgid "wxWidgets could not open display for '%s': exiting."
+msgstr ""
+"wxWidgets はディスプレイ '%s' を開くことができませんでした: 終了します。"
+
+#: ../src/x11/app.cpp:164
+msgid "wxWidgets could not open display. Exiting."
+msgstr "wxWidgets はディスプレイを開くことができませんでした。終了します。"
+
+#: ../src/richtext/richtextsymboldlg.cpp:434
+msgid "xxxx"
+msgstr "xxxx"
+
+#: ../src/common/datetimefmt.cpp:1726
+msgid "yesterday"
+msgstr "昨日"
+
+#: ../src/common/zstream.cpp:251 ../src/common/zstream.cpp:426
+#, c-format
+msgid "zlib error %d"
+msgstr "zlib エラー %d"
+
+#: ../src/richtext/richtextliststylepage.cpp:496
+#: ../src/richtext/richtextbulletspage.cpp:301
+msgid "~"
+msgstr "~"
+
+#~ msgid "Print preview"
+#~ msgstr "印刷プレビュー"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "1"
+#~ msgstr "1"
+
+#, fuzzy
+#~ msgid "10"
+#~ msgstr "1"
+
+#~ msgid "3"
+#~ msgstr "3"
+
+#~ msgid "4"
+#~ msgstr "4"
+
+#~ msgid "5"
+#~ msgstr "5"
+
+#~ msgid "6"
+#~ msgstr "6"
+
+#~ msgid "7"
+#~ msgstr "7"
+
+#~ msgid "8"
+#~ msgstr "8"
+
+#~ msgid "9"
+#~ msgstr "9"
+
+#~ msgid "File system containing watched object was unmounted"
+#~ msgstr "監視中のオブジェクトを持つファイルシステムがアンマウントされました"
+
+#, fuzzy
+#~ msgid "&Preview..."
+#~ msgstr " プレビュー"
+
+#~ msgid "Passing an unkown object to GetObject"
+#~ msgstr "GetObject に未知のオブジェクトが渡されました"
+
+#, fuzzy
+#~ msgid "Preview..."
+#~ msgstr " プレビュー"
+
+#, fuzzy
+#~ msgid "The vertical offset relative to the paragraph."
+#~ msgstr "次の段落に適用されるスタイルを指定します。"
+
+#~ msgid "&Save..."
+#~ msgstr "保存 (&S) ..."
+
+#~ msgid "About "
+#~ msgstr "詳細"
+
+#~ msgid "All files (*.*)|*"
+#~ msgstr "すべてのファイル (*.*)|*"
+
+#~ msgid "Cannot initialize SciTech MGL!"
+#~ msgstr "SciTech MGL を初期化できません。"
+
+#~ msgid "Cannot initialize display."
+#~ msgstr "ディスプレイを初期化できません。"
+
+#~ msgid "Cannot start thread: error writing TLS"
+#~ msgstr "スレッドを開始できません: TLSへの書き込みに失敗しています。"
+
+#~ msgid "Close\tAlt-F4"
+#~ msgstr "閉じる\tAlt-F4"
+
+#~ msgid "Couldn't create cursor."
+#~ msgstr "カーソルを作成できませんでした"
+
+#~ msgid "Directory '%s' doesn't exist!"
+#~ msgstr "ディレクトリー '%s' は存在しません。"
+
+#~ msgid "File %s does not exist."
+#~ msgstr "ファイル %s は存在しません。"
+
+#~ msgid "Mode %ix%i-%i not available."
+#~ msgstr "モード %ix%i-%i は使えません。"
+
+#~ msgid "Paper Size"
+#~ msgstr "用紙サイズ"
+
+#~ msgid "%s"
+#~ msgstr "%s"
+
+#~ msgid "&Goto..."
+#~ msgstr "移動 (&G)..."
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">>|"
+#~ msgstr ">>|"
+
+#~ msgid "Added item is invalid."
+#~ msgstr "追加された項目は正しくないようです。"
+
+#~ msgid "BIG5"
+#~ msgstr "BIG5"
+
+#~ msgid "Can't check image format of file '%s': file does not exist."
+#~ msgstr "ファイル '%s' が存在しないため画像形式の調査はできません。"
+
+#~ msgid "Can't load image from file '%s': file does not exist."
+#~ msgstr "ファイル '%s' は存在しないため画像の読み取りができません。"
+
+#~ msgid "Cannot open file '%s'."
+#~ msgstr "ファイル '%s' を開くことができません。"
+
+#~ msgid "Changed item is invalid."
+#~ msgstr "変更された項目が不正のようです。"
+
+#~ msgid "Click to cancel this window."
+#~ msgstr "クリックでこのウィンドウをキャンセルします。"
+
+#~ msgid "Click to confirm your selection."
+#~ msgstr "クリックで選択を確定します。"
+
+#~ msgid "Column could not be added to native control."
+#~ msgstr "列をネイティブコントロールに追加できませんでした。"
+
+#~ msgid "Column does not have a renderer."
+#~ msgstr "列のレンダラーがありません。"
+
+#~ msgid "Column pointer must not be NULL."
+#~ msgstr "列のポインタは NULL にはできません。"
+
+#~ msgid "Column's model column has no equivalent in the associated model."
+#~ msgstr "関連づけられたモデルの中には列のモデルに適合するものがありません。"
+
+#~ msgid "Could not add column to internal structures."
+#~ msgstr "内部構造に列を追加できませんでした。"
+
+#~ msgid "Enter a page number between %d and %d:"
+#~ msgstr "%d から %d までの値でページを指定してください:"
+
+#~ msgid "Failed to create a status bar."
+#~ msgstr "ステータスバーを作成できませんでした。"
+
+#~ msgid "GB-2312"
+#~ msgstr "GB-2312"
+
+#~ msgid "Goto Page"
+#~ msgstr "ページ番号指定"
+
+#~ msgid ""
+#~ "HTML pagination algorithm generated more than the allowed maximum number "
+#~ "of pages and it can't continue any longer!"
+#~ msgstr ""
+#~ "HTMLのページ化アルゴリズムが出力可能数より多くのページを生成しました。生成"
+#~ "を中断します。"
+
+#~ msgid "I64"
+#~ msgstr "I64"
+
+#~ msgid "Internal error, illegal wxCustomTypeInfo"
+#~ msgstr "内部エラーです。不正な wxCustomTypeInfo を検出しました"
+
+#~ msgid "Model pointer not initialized."
+#~ msgstr "モデルポインターは初期化されていません。"
+
+#~ msgid "No image handler for type %ld defined."
+#~ msgstr "%ld 型のイメージハンドラーが定義されていません。"
+
+#~ msgid "No model associated with control."
+#~ msgstr "コントロールにモデルが関連づけられていません。"
+
+#~ msgid "Owner not initialized."
+#~ msgstr "Ownerは初期化されていません。"
+
+#~ msgid "Passed item is invalid."
+#~ msgstr "与えられた項目は無効です。"
+
+#~ msgid "Passing a already registered object to SetObjectName"
+#~ msgstr "SetObjectName に登録済みのオブジェクトが渡されました"
+
+#~ msgid "Pointer to dataview control must not be NULL"
+#~ msgstr "データビューコントロールへのポインタには NULL を指定できません"
+
+#~ msgid "Pointer to native control must not be NULL."
+#~ msgstr "ネイティブコントロールへのポインタには NULL を指定できません。"
+
+#~ msgid "SHIFT-JIS"
+#~ msgstr "SHIFT-JIS"
+
+#~ msgid ""
+#~ "Streaming delegates for not already streamed objects not yet supported"
+#~ msgstr ""
+#~ "ストリーム化されていないオブジェクトへのストリーム委譲は実装されていませ"
+#~ "ん。"
+
+#~ msgid ""
+#~ "The data format for the GET-direction of the to be added data object "
+#~ "already exists"
+#~ msgstr ""
+#~ "追加しようとしているデータオブジェクトのGET方向に関するデータ様式はすでに"
+#~ "存在します。"
+
+#~ msgid ""
+#~ "The data format for the SET-direction of the to be added data object "
+#~ "already exists"
+#~ msgstr ""
+#~ "追加しようとしているデータオブジェクトのSET方向に関するデータ様式はすでに"
+#~ "存在します。"
+
+#~ msgid "The file '%s' doesn't exist and couldn't be opened."
+#~ msgstr "ファイル '%s' を開こうとしましたが存在しませんでした。"
+
+#~ msgid "The path '%s' contains too many \"..\"!"
+#~ msgstr "パス '%s' に含まれる \"..\" が多すぎます。"
+
+#~ msgid "To be deleted item is invalid."
+#~ msgstr "削除しようとしている項目の指定が正しくないようです。"
+
+#~ msgid "Update"
+#~ msgstr "更新"
+
+#~ msgid "Value must be %lld or higher"
+#~ msgstr "%lld 以上の値にしてください"
+
+#~ msgid "Value must be %llu or higher"
+#~ msgstr "%llu 以上の値にしてください"
+
+#~ msgid "Value must be %llu or less"
+#~ msgstr "%llu 以下の値にしてください"
+
+#~ msgid "Warning"
+#~ msgstr "警告"
+
+#~ msgid "Windows 2000 (build %lu"
+#~ msgstr "Windows 2000 (ビルド %lu"
+
+#~ msgid "delegate has no type info"
+#~ msgstr "委譲の型情報がありません"
+
+#~ msgid "wxSearchEngine::LookFor must be called before scanning!"
+#~ msgstr "検索に先立って wxSearchEngine::LookFor を呼び出す必要があります。"
+
+#~ msgid "|<<"
+#~ msgstr "|<<"
+
+#~ msgid "\t%s: %s\n"
+#~ msgstr "\t%s: %s\n"
+
+#~ msgid " Couldn't create the UnicodeConverter"
+#~ msgstr " UnicodeConverterを作成できません"
+
+#~ msgid "#define %s must be an integer."
+#~ msgstr "#define %s は整数でなくてはなりません。"
+
+#~ msgid "%.*f GB"
+#~ msgstr "%.*f GiB"
+
+#~ msgid "%.*f MB"
+#~ msgstr "%.*f MiB"
+
+#~ msgid "%.*f TB"
+#~ msgstr "%.*f TiB"
+
+#~ msgid "%.*f kB"
+#~ msgstr "%.*f KiB"
+
+#~ msgid "%s not a bitmap resource specification."
+#~ msgstr "%s をビットマップリソースとして認識できません。"
+
+#~ msgid "%s not an icon resource specification."
+#~ msgstr "%s をアイコンリソースとして認識できません。"
+
+#~ msgid "%s: ill-formed resource file syntax."
+#~ msgstr "%s: リソース文法が満たされていないようです。"
+
+#~ msgid "&Open"
+#~ msgstr "開く (&O)"
+
+#~ msgid "&Print"
+#~ msgstr "印刷 (&P)"
+
+#~ msgid ""
+#~ ", expected static, #include or #define\n"
+#~ "while parsing resource."
+#~ msgstr ""
+#~ "を見つけましたが static, #include, #defineの\n"
+#~ "どれでもありません。"
+
+#~ msgid "Archive doesnt contain #SYSTEM file"
+#~ msgstr "書庫は #SYSTEM ファイルを含んでいません"
+
+#~ msgid "Bitmap resource specification %s not found."
+#~ msgstr "ビットマップリソース仕様 %s は未対応です。"
+
+#~ msgid "Cannot convert dialog units: dialog unknown."
+#~ msgstr "ダイアログ単位に変換できません: ダイアログが未知です。"
+
+#~ msgid "Cannot convert from the charset '%s'!"
+#~ msgstr "文字集合 '%s' から変換できません。"
+
+#~ msgid "Cannot find container for unknown control '%s'."
+#~ msgstr "未知のコントロール '%s' に対するコンテナを見つけられません。"
+
+#~ msgid "Cannot find font node '%s'."
+#~ msgstr "フォントノード '%s' が見つかりません。"
+
+#~ msgid "Cannot parse coordinates from '%s'."
+#~ msgstr "寸法を '%s' から取得できません。"
+
+#~ msgid "Cannot parse dimension from '%s'."
+#~ msgstr "'%s' から大きさの値を解析できません。"
+
+#~ msgid "Cant create the thread event queue"
+#~ msgstr "スレッドイベントキューを作成できませんでした"
+
+#~ msgid "Closes the dialog without inserting a symbol."
+#~ msgstr "記号を挿入せずにダイアログを閉じます。"
+
+#~ msgid "Control is wrongly initialized."
+#~ msgstr "コントロールが正しく初期化されていません。"
+
+#~ msgid "Could not find resource include file %s."
+#~ msgstr "リソースインクルードファイル %s が見つかりません。"
+
+#~ msgid ""
+#~ "Could not resolve control class or id '%s'. Use (non-zero) integer "
+#~ "instead\n"
+#~ " or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "制御クラスまたは識別子 '%s' を解決できません。\n"
+#~ "0以外の整数を使うか #defineを用いてください (説明書の注意参照) 。"
+
+#~ msgid ""
+#~ "Could not resolve menu id '%s'. Use (non-zero) integer instead\n"
+#~ "or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "識別子 '%s' を解決できません。\n"
+#~ "0以外の整数を使うか #define を用いてください (説明書の注意参照) 。"
+
+#~ msgid "Could not unlock mutex"
+#~ msgstr "Mutexのアンロックができませんでした"
+
+#~ msgid "Couldn't end the context on the overlay window"
+#~ msgstr "オーバーレイウィンドウの内容末尾にたどり着けませんでした。"
+
+#~ msgid "Data view control is not correctly initialized"
+#~ msgstr "データビューコントロールが正しく初期化されていません。"
+
+#~ msgid "Error while waiting on semaphore"
+#~ msgstr "セマフォー待ちの中途でエラーを検出しました"
+
+#~ msgid "Expected '*' while parsing resource."
+#~ msgstr "リソース解析中、必要な '*' がない場所を検出しました。"
+
+#~ msgid "Expected '=' while parsing resource."
+#~ msgstr "リソース解析中、必要な '=' がない場所を検出しました。"
+
+#~ msgid "Expected 'char' while parsing resource."
+#~ msgstr "リソース解析中、必要な 'char' がない場所を検出しました。"
+
+#~ msgid "Failed to %s dialup connection: %s"
+#~ msgstr "%s ダイヤルアップ接続に失敗しました: %s"
+
+#~ msgid "Failed to connect to session manager: %s"
+#~ msgstr "セッションマネージャへの接続に失敗しました: %s"
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "XBM リソース %s が見つかりません。\n"
+#~ "wxResourceLoadBitmapData を使うのを忘れていませんか?"
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadIconData?"
+#~ msgstr ""
+#~ "XBM リソース %s が見つかりません。\n"
+#~ "wxResourceLoadIconData を使うのを忘れていませんか?"
+
+#~ msgid ""
+#~ "Failed to find XPM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "XPM リソース %s が見つかりません。\n"
+#~ "wxResourceLoadBitmapData を使うのを忘れていませんか?"
+
+#~ msgid "Failed to get clipboard data."
+#~ msgstr "クリップボードのデータを取得できませんでした。"
+
+#~ msgid "Failed to load shared library '%s' Error '%s'"
+#~ msgstr "共有ライブラリ '%s' はエラー '%s' により読み取れませんでした。"
+
+#~ msgid "Failed to open '%s' for %s"
+#~ msgstr "'%s' を開くことができませんでした(%s)"
+
+#~ msgid "Failed to register OpenGL window class."
+#~ msgstr "OpenGL ウィンドウクラスを登録できませんでした。"
+
+#~ msgid "Fatal error"
+#~ msgstr "重大なエラー"
+
+#~ msgid "Fatal error: "
+#~ msgstr "重大なエラー:"
+
+#~ msgid "Found "
+#~ msgstr "リソース解析中に"
+
+#~ msgid "Go forward to the next HTML page"
+#~ msgstr "次のHTMLページに進む"
+
+#~ msgid "Help : %s"
+#~ msgstr "ヘルプ: %s"
+
+#~ msgid "Icon resource specification %s not found."
+#~ msgstr "アイコンリソース %s が見つかりません。"
+
+#~ msgid "Ill-formed resource file syntax."
+#~ msgstr "リソースファイルの書式に不整合があります。"
+
+#~ msgid "Inserts the chosen symbol."
+#~ msgstr "選択した記号を挿入します"
+
+#~ msgid "Invalid XRC resource '%s': doesn't have root node 'resource'."
+#~ msgstr "不正な XRC リソース '%s': ルートノードが 'resource' ではありません。"
+
+#~ msgid "Long Conversions not supported"
+#~ msgstr "Long 型への変換には対応していません"
+
+#~ msgid "No XPM icon facility available!"
+#~ msgstr "XPM アイコン機能は利用できません。"
+
+#~ msgid "No fonts found in %s."
+#~ msgstr "%s にフォントがありません。"
+
+#~ msgid "No handler found for XML node '%s', class '%s'!"
+#~ msgstr "XMLノード '%s' 、class='%s'に対するハンドラーがありません。"
+
+#~ msgid "Option '%s' requires a value, '=' expected."
+#~ msgstr "オプション '%s' は '=' を挟んで値の指定が必要です。"
+
+#~ msgid "Preparing help window..."
+#~ msgstr "ヘルプウィンドウ準備中..."
+
+#~ msgid "Program aborted."
+#~ msgstr "プログラムを中断しました。"
+
+#~ msgid "Referenced object node with ref=\"%s\" not found!"
+#~ msgstr "ref=\"%s\" で参照されているノードが見つかりません。"
+
+#~ msgid "Resource files must have same version number!"
+#~ msgstr "リソースファイルは同じバージョン番号でなくてはなりません。"
+
+#~ msgid "Search!"
+#~ msgstr "検索"
+
+#~ msgid "Select a file"
+#~ msgstr "ファイルを選んでください"
+
+#~ msgid "Select all"
+#~ msgstr "すべて選択"
+
+#~ msgid "Sorry, could not open this file for saving."
+#~ msgstr "保存のためにこのファイルを開くことができませんでした。"
+
+#~ msgid "Sorry, could not save this file."
+#~ msgstr "ファイルを保存することができませんでした。"
+
+#~ msgid ""
+#~ "Sorry, docking is not supported for ports other than wxMSW, wxMac and "
+#~ "wxGTK"
+#~ msgstr "ドッキングに対応しているのは wxMSW, wxMac, wxGTK だけです"
+
+#~ msgid "Sorry, print preview needs a printer to be installed."
+#~ msgstr "プレビューにはプリンターのインストールが必要です。"
+
+#~ msgid "Status: "
+#~ msgstr "状態:"
+
+#~ msgid "String conversions not supported"
+#~ msgstr "文字列変換は未対応です"
+
+#~ msgid "Subclass '%s' not found for resource '%s', not subclassing!"
+#~ msgstr ""
+#~ "サブクラスの元 '%s' がありませんでした。リソース '%s' はサブクラスにしま"
+#~ "せん。"
+
+#~ msgid "TIFF library error."
+#~ msgstr "TIFFライブラリーエラー。"
+
+#~ msgid "TIFF library warning."
+#~ msgstr "TIFFライブラリーの警告。"
+
+#~ msgid ""
+#~ "This system doesn't support date picker control, please upgrade your "
+#~ "version of comctl32.dll"
+#~ msgstr ""
+#~ "お使いのシステムは date picker コントロールに未対応です。comctl32.dll を新"
+#~ "しいものに更新してください"
+
+#~ msgid "Trying to solve a NULL hostname: giving up"
+#~ msgstr "NULLホスト名の解決を試行: 試行を中止しました"
+
+#~ msgid "Unexpected end of file while parsing resource."
+#~ msgstr "リソース解析中に想定外のEOFが検出されました。"
+
+#~ msgid "Unknown style flag "
+#~ msgstr "未知のスタイルフラグ"
+
+#~ msgid "Unkown Property %s"
+#~ msgstr "未定義の特性 %s"
+
+#~ msgid "Unrecognized style %s while parsing resource."
+#~ msgstr "リソース解析中に想定外のスタイル %s を検出しました。"
+
+#~ msgid "Version %s"
+#~ msgstr "version %s"
+
+#~ msgid "Video Output"
+#~ msgstr "映像出力"
+
+#~ msgid "Warning: attempt to remove HTML tag handler from empty stack."
+#~ msgstr "警告: 空のスタックからHTMLタグハンドラーを除去しようとしました。"
+
+#~ msgid "XRC resource '%s' (class '%s') not found!"
+#~ msgstr "XRC リソース '%s' (クラス '%s') が見つかりません。"
+
+#~ msgid "XRC resource: Cannot create animation from '%s'."
+#~ msgstr "XRC リソース: '%s' からアニメーションを作成できません。"
+
+#~ msgid "XRC resource: Cannot create bitmap from '%s'."
+#~ msgstr "XRC リソース: '%s' からビットマップを作成できません。"
+
+#~ msgid "XRC resource: Incorrect colour specification '%s' for property '%s'."
+#~ msgstr "XRC リソース: 色の設定値 '%s' は不正です(特性 '%s')"
+
+#~ msgid "[EMPTY]"
+#~ msgstr "[空]"
+
+#~ msgid "catalog file for domain '%s' not found."
+#~ msgstr "地域 '%s' に対するカタログファイルが見つかりません。"
+
+#~ msgid "encoding %i"
+#~ msgstr "エンコーディング %i"
+
+#~ msgid "establish"
+#~ msgstr "同期確立"
+
+#~ msgid "initiate"
+#~ msgstr "非同期確立"
+
+#~ msgid "invalid eof() return value."
+#~ msgstr "eof() の戻り値は不正なものになります。"
+
+#~ msgid "looking for catalog '%s' in path '%s'."
+#~ msgstr "カタログ '%s' をパス '%s' から探します。"
+
+#~ msgid "m_peer is not or incorrectly initialized"
+#~ msgstr "m_peer が正しく初期化されていません"
+
+#~ msgid "unknown line terminator"
+#~ msgstr "未対応の改行子です"
+
+#~ msgid "writing"
+#~ msgstr "書き出し"
+
+#~ msgid "wxRichTextBulletsPage"
+#~ msgstr "wxRichTextBulletsPage"
+
+#~ msgid "wxRichTextFontPage"
+#~ msgstr "wxRichTextFontPage"
+
+#~ msgid "wxRichTextListStylePage"
+#~ msgstr "wxRichTextListStylePage"
+
+#~ msgid "wxRichTextStylePage"
+#~ msgstr "wxRichTextStylePage"
+
+#~ msgid "wxSocket: invalid signature in ReadMsg."
+#~ msgstr "wxSocket: ReadMsgに不正なシグネチャーがありました。"
+
+#~ msgid "wxSocket: unknown event!."
+#~ msgstr "wxSocket: 未対応のイベントです。"
diff --git a/cadxcore/lang/pl/cadxcore.mo b/cadxcore/lang/pl/cadxcore.mo
new file mode 100644
index 0000000..050e57c
Binary files /dev/null and b/cadxcore/lang/pl/cadxcore.mo differ
diff --git a/cadxcore/lang/pl/cadxcore.po b/cadxcore/lang/pl/cadxcore.po
new file mode 100644
index 0000000..0ed3c54
--- /dev/null
+++ b/cadxcore/lang/pl/cadxcore.po
@@ -0,0 +1,7663 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR MetaEmotion S.L
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Ginkgo CADx Core 2.12.0.4869\n"
+"Report-Msgid-Bugs-To: ginkgo at metaemotion.com\n"
+"POT-Creation-Date: 2014-06-11 15:51+0100\n"
+"PO-Revision-Date: 2014-06-11 15:51+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: IGICHP <jsmieszek at zpigichp.edu.pl>\n"
+"Language: pl_PL\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Poedit-SearchPath-0: ..\\..\n"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr "Cz/B"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr "Cz/B negatyw"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr "VR kości"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr "VR mięśnie i kości"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "VR Red Vessels"
+msgstr "VR kości"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr "Szara tęcza"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr "Tył"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr "Spektrum"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Metal"
+msgstr "Gorący metal"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr "Gorące żelazo"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Green"
+msgstr "Gorąca zieleń"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "GE Color"
+msgstr "Kolor GE"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "PET"
+msgstr "AET"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr "LONI"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr "LONI2"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr "Asymetria"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "P-Value"
+msgstr "Wartość P"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr ""
+
+#: ..\../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#: ..\../api/dicom/idicomconformance.cpp:214
+#: ..\../api/dicom/idicomconformance.cpp:220
+#, fuzzy
+msgid "GIL/DICOM/Conformance"
+msgstr "Węzły DICOM"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#, fuzzy
+msgid "Unable to add supported transfer syntax "
+msgstr " . W modelu nie istnieje Składnia Transferu: Najpierw ją dodaj."
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid " to SOP Class "
+msgstr " do Klasy SOP"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr " . W modelu nie istnieje Składnia Transferu: Najpierw ją dodaj."
+
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr " . W modelu nie istnieje klasa SOP: Najpierw ją dodaj."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#, fuzzy
+msgid "Unable to add supported SOP Class "
+msgstr " . W modelu nie istnieje klasa SOP: Najpierw ją dodaj."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " to Modality "
+msgstr "do Rodzaju badania"
+
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr " . W modelu nie istnieje rodzaj badania: Najpierw go dodaj."
+
+#: ..\../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "Slice"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+#, fuzzy
+msgid "of"
+msgstr "z"
+
+#: ..\../api/iannotator.cpp:97
+#, fuzzy
+msgid "Volume"
+msgstr "Dodaj kolumnę"
+
+#: ..\../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:110
+#, fuzzy
+msgid "Image without metric information"
+msgstr "Informacja o sposobie prezentacji zdjęcia"
+
+#: ..\../api/iannotator.cpp:119
+msgid "Slice thickness"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:127
+#, fuzzy
+msgid "Slice location"
+msgstr "Lokalizacja"
+
+#: ..\../api/iannotator.cpp:139
+#, fuzzy
+msgid "Scale"
+msgstr "Skala siatki"
+
+#: ..\../api/iannotator.cpp:147
+#, fuzzy
+msgid "Right"
+msgstr "Waga"
+
+#: ..\../api/iannotator.cpp:149
+msgid "Left"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:219
+#, fuzzy
+msgid "Position:"
+msgstr "Poycja (I)"
+
+#: ..\../api/iannotator.cpp:272
+#, fuzzy
+msgid "Value:"
+msgstr "Wartość"
+
+#: ..\../api/iexception.cpp:52
+#, fuzzy
+msgid "Exception in component"
+msgstr "Ładowanie wyjątku:"
+
+#: ..\../api/initwx.cpp:439
+msgid "Initializing environment ..."
+msgstr "Inicjalizacja środowiska ..."
+
+#: ..\../api/initwx.cpp:446 ..\../api/initwx.cpp:447 ..\../api/initwx.cpp:448
+#: ..\../api/initwx.cpp:449 ..\../api/initwx.cpp:450 ..\../api/initwx.cpp:451
+#: ..\../api/initwx.cpp:452 ..\../api/initwx.cpp:453
+msgid "Ginkgo CADx restrictions"
+msgstr "Ograniczenia Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr ""
+
+#: ..\../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr "Tryb anonimowy (historia jest wyczyszczona)"
+
+#: ..\../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr "Otwarto maksymalną liczbę zakładek"
+
+#: ..\../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr "Maksymalna liczba sekund bezczynności programu Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr "Automatycznie zamknij Ginkgo CADx po dikomizacji"
+
+#: ..\../api/initwx.cpp:451
+msgid "Export images"
+msgstr "Eksportuj zdjęcia"
+
+#: ..\../api/initwx.cpp:452
+msgid "Acquire DICOM files"
+msgstr "Pobierz pliki DICOM"
+
+#: ..\../api/initwx.cpp:453
+msgid "Import files to DICOM format"
+msgstr "Importuj pliki do formatu DICOM"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "Online manual"
+msgstr "Podręcznik online"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+#, fuzzy
+msgid "URL of manual"
+msgstr "Podręcznik online"
+
+#: ..\../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "Online support"
+msgstr "Wsparcie online"
+
+#: ..\../api/initwx.cpp:459
+msgid "URL of online support"
+msgstr "URL do wsparcia online"
+
+#: ..\../api/initwx.cpp:459
+#, fuzzy
+msgid "http://ginkgo-cadx.com/"
+msgstr "Umożliw http proxy"
+
+#: ..\../api/initwx.cpp:460 ..\../api/initwx.cpp:461
+msgid "Program Updates"
+msgstr "Aktualizacje programu"
+
+#: ..\../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr "Przypomnij o najnowszych aktualizacjach Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:461
+msgid "Update period (days)"
+msgstr "Czas aktualizacji (dni)"
+
+#: ..\../api/initwx.cpp:462
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr "Bezpieczeństwo"
+
+#: ..\../api/initwx.cpp:462
+#, fuzzy
+msgid "Setup Security"
+msgstr "Bezpieczeństwo"
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup"
+msgstr "Pokaż przy starcie"
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup default value"
+msgstr "Pokaż wartości domyślne przy starcie"
+
+#: ..\../api/initwx.cpp:465 ..\../api/initwx.cpp:466
+#: ..\../main/gui/history3/historypanel3.cpp:328
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr "Narzędzia"
+
+#: ..\../api/initwx.cpp:465
+msgid "Settings menu"
+msgstr "Menu ustawień"
+
+#: ..\../api/initwx.cpp:466
+#, fuzzy
+msgid "License menu"
+msgstr "Menu ustawień"
+
+#: ..\../api/initwx.cpp:467 ..\../api/initwx.cpp:468 ..\../api/initwx.cpp:469
+#: ..\../api/initwx.cpp:470 ..\../api/initwx.cpp:471 ..\../api/initwx.cpp:472
+#: ..\../api/initwx.cpp:473 ..\../api/initwx.cpp:474
+msgid "PACS Limits"
+msgstr "Ograniczenia PACS-a"
+
+#: ..\../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr ""
+
+#: ..\../api/initwx.cpp:468
+msgid "Upload images to a PACS server"
+msgstr "Wczytaj zdjęcia do serwera PACS-a"
+
+#: ..\../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr "Pobierz zdjęcia z PACS-a"
+
+#: ..\../api/initwx.cpp:470
+msgid "Enable remote PACS configuration"
+msgstr "Umożliw zdalną konfigurację PACS-a"
+
+#: ..\../api/initwx.cpp:471
+msgid "Enable TLS configuration"
+msgstr "Umożliw konfigurację TLS"
+
+#: ..\../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr ""
+
+#: ..\../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr ""
+
+#: ..\../api/initwx.cpp:475 ..\../api/initwx.cpp:476 ..\../api/initwx.cpp:477
+#: ..\../api/initwx.cpp:478 ..\../api/initwx.cpp:479 ..\../api/initwx.cpp:480
+msgid "Import"
+msgstr "Import"
+
+#: ..\../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:476
+#, fuzzy
+msgid "Show accession number input"
+msgstr "Numer dostępu"
+
+#: ..\../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr "Ustaw poziom kompresji 0-14). ) oznacza brak kompresji. "
+
+#: ..\../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr "Nie zmieniaj  kodeka zdjęcia (jeśli to możliwe)"
+
+#: ..\../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr "Usługa HL7"
+
+#: ..\../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483 ..\../api/initwx.cpp:484 ..\../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr "Dikomizacja XML"
+
+#: ..\../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr "Wyślij komunikat HL7 podczas importu"
+
+#: ..\../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr "Wyślij badanie do PACS-a podczas importu"
+
+#: ..\../api/initwx.cpp:485
+msgid "Default ORU template"
+msgstr "Domyślny szablon ORU"
+
+#: ..\../api/initwx.cpp:488 ..\../api/initwx.cpp:489 ..\../api/initwx.cpp:491
+#: ..\../api/initwx.cpp:493 ..\../api/initwx.cpp:494 ..\../api/initwx.cpp:495
+#: ..\../api/initwx.cpp:496 ..\../api/initwx.cpp:498
+msgid "Style"
+msgstr "Styl"
+
+#: ..\../api/initwx.cpp:503
+#, c-format
+msgid "Download %s images"
+msgstr "Ściągnij %s zdjęcia/ć"
+
+#: ..\../api/initwx.cpp:504 ..\../api/initwx.cpp:508
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+msgid "PACS"
+msgstr "PACS"
+
+#: ..\../api/initwx.cpp:507
+msgid "Download all modalities"
+msgstr "Ściągnij wszystkie rodzaje badań"
+
+#: ..\../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr "OtwórzGL"
+
+#: ..\../api/initwx.cpp:510
+#, fuzzy
+msgid "Enable shaders"
+msgstr "Umożliw zdalną konfigurację PACS-a"
+
+#: ..\../api/initwx.cpp:513
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+#, fuzzy
+msgid "Ginkgo Cloud"
+msgstr "Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:513
+#, fuzzy
+msgid "Download from Ginkgo Cloud"
+msgstr "Ginkgo CADx nie może dokonać kompresji z "
+
+#: ..\../api/initwx.cpp:560
+#, fuzzy
+msgid "Tools loading base ..."
+msgstr "Narzędzia"
+
+#: ..\../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr "Uruchamianie narzędzi ..."
+
+#: ..\../api/initwx.cpp:566
+msgid "Loading plugins ..."
+msgstr "Ładuje dodatki ..."
+
+#: ..\../api/initwx.cpp:580
+#, fuzzy
+msgid "Unable to start GinkgoCADx:\n"
+msgstr "Uruchamianie Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:580 ..\../api/initwx.cpp:621
+msgid "error"
+msgstr "błąd"
+
+#: ..\../api/initwx.cpp:584
+msgid "Loading resources ..."
+msgstr "Ładowanie zasobów ..."
+
+#: ..\../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr "Uruchamianie usług ..."
+
+#: ..\../api/initwx.cpp:601
+msgid "Configuring environment ..."
+msgstr "Konfigurowanie środowiska ..."
+
+#: ..\../api/initwx.cpp:621
+msgid "Failed to set permissions:\n"
+msgstr "Niepowodzenie przy ustawianiu uprawnień:\n"
+
+#: ..\../api/initwx.cpp:634
+#, fuzzy
+msgid "Updating ..."
+msgstr "Uruchamianie ..."
+
+#: ..\../api/initwx.cpp:638
+msgid "Interpreting parameters ..."
+msgstr "Interpretowanie parametrów ..."
+
+#: ..\../api/initwx.cpp:689
+#, fuzzy
+msgid "Error unregistering tools: "
+msgstr "Narzędzia"
+
+#: ..\../api/initwx.cpp:769
+#, fuzzy
+msgid "Starting"
+msgstr "Uruchamianie narzędzi ..."
+
+#: ..\../api/ivista.cpp:36 ..\../commands/comandocarga.cpp:73
+msgid "Loading..."
+msgstr "Ładuje ..."
+
+#: ..\../api/iwidgets.cpp:268
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ..\../main/gui/import/pasosimportacionbase.cpp:151
+msgid "Name"
+msgstr "Nazwa"
+
+#: ..\../api/iwidgets.cpp:285
+msgid "Area"
+msgstr "Obszar"
+
+#: ..\../api/iwidgets.cpp:302
+msgid "Perimeter"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:316
+#, fuzzy
+msgid "Travel (I)"
+msgstr "Poycja (I)"
+
+#: ..\../api/iwidgets.cpp:326
+#, fuzzy
+msgid "Travel (M)"
+msgstr "Poycja (M)"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#: ..\../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#, fuzzy
+msgid "Error while running thread: "
+msgstr "Błąd wewnętrzny podczas czytania badania:"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid " : "
+msgstr " : "
+
+#: ..\../api/threads/thread.cpp:120
+#, fuzzy
+msgid "Internal error while running thread: "
+msgstr "Błąd wewnętrzny podczas czytania badania:"
+
+#: ..\../api/widgetserializable.cpp:60
+msgid "Creation Date"
+msgstr "Data utworzenia"
+
+#: ..\../api/widgetserializable.cpp:65
+msgid "Modification Date"
+msgstr "Data modyfikacji"
+
+#: ..\../api/widgetserializable.cpp:68
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:40
+msgid "Physician"
+msgstr "Lekarz"
+
+#: ..\../commands/acquirefromurlcommand.cpp:55
+#: ..\../commands/pacsdownloadcommand.cpp:88
+#: ..\../commands/synchronizationcommand.cpp:70
+msgid "Downloading files ..."
+msgstr "Ściąganie plików ..."
+
+#: ..\../commands/acquirefromurlcommand.cpp:69
+#: ..\../commands/synchronizationcommand.cpp:91
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, c-format
+msgid "Downloading file %d"
+msgstr "Ściąganie pliku %d"
+
+#: ..\../commands/acquirefromurlcommand.cpp:81
+#, fuzzy
+msgid "Error downloading file: "
+msgstr "Ściąganie pliku %d"
+
+#: ..\../commands/acquirefromurlcommand.cpp:95
+#: ..\../commands/pacsdownloadcommand.cpp:114
+#: ..\../commands/synchronizationcommand.cpp:121
+msgid "Internal Error"
+msgstr "Błąd wewnętrzny"
+
+#: ..\../commands/acquirefromurlcommand.cpp:115
+#, fuzzy
+msgid "Error downloading files: "
+msgstr "Ściąganie plików ..."
+
+#: ..\../commands/autocleaningcommand.cpp:62
+#, fuzzy
+msgid "Cleaning dicomdir..."
+msgstr "Wybierz katalog DICOM"
+
+#: ..\../commands/cloudcommand.cpp:67
+#, fuzzy
+msgid "Downloading files..."
+msgstr "Ściąganie plików ..."
+
+#: ..\../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:183
+#, fuzzy
+msgid "Unknown operation"
+msgstr "Nieznany"
+
+#: ..\../commands/cloudcommand.cpp:188
+#, fuzzy
+msgid "Error in cloud operation. See log to get more details..."
+msgstr "Błąd wysyłania komunikatu HL7. Więcej szczegółów w logu."
+
+#: ..\../commands/cloudcommand.cpp:249
+#, fuzzy
+msgid "Could to retrieve study."
+msgstr "Metoda odbioru"
+
+#: ..\../commands/cloudcommand.cpp:260 ..\../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:262
+#, fuzzy
+msgid "Error retrieving study."
+msgstr "Błąd ładowania badania: błąd wewnętrzny"
+
+#: ..\../commands/cloudcommand.cpp:271
+#, fuzzy
+msgid "Study successfully retrieved."
+msgstr "Badanie"
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "Speed"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "bytes/sec during"
+msgstr "bajtów z całkowitej liczby  "
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "seconds"
+msgstr "Maksymalna liczba sekund bezczynności programu Ginkgo CADx"
+
+#: ..\../commands/cloudcommand.cpp:275
+#, fuzzy
+msgid "Empty Response"
+msgstr "Opróżnij konfigurację"
+
+#: ..\../commands/cloudcommand.cpp:289
+#, fuzzy
+msgid "Extracting files..."
+msgstr "Ściąganie plików ..."
+
+#: ..\../commands/cloudcommand.cpp:313 ..\../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:383
+#, fuzzy
+msgid "Could to perform query."
+msgstr "Niepowodzenie w wykonianiu szukania:"
+
+#: ..\../commands/cloudcommand.cpp:396
+#, fuzzy
+msgid "Error perfoming the query."
+msgstr "błąd"
+
+#: ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "Query successfully performed."
+msgstr "Dikomizacja zakończona pomyślnie"
+
+#: ..\../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:472
+#, fuzzy
+msgid "Unknown JSon attribute:"
+msgstr "Nieznany"
+
+#: ..\../commands/cloudcommand.cpp:482
+#, fuzzy
+msgid "Error parsing JSon: "
+msgstr "Błąd wewnętrzny parsowania XML"
+
+#: ..\../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:515
+#: ..\../commands/openremovableunit.cpp:148 ..\../main/gui/open/abrir.cpp:119
+#: ..\../main/gui/open/abrir.cpp:159 ..\../main/gui/open/opendialogs.cpp:146
+msgid "Storing in the history..."
+msgstr "Zapisywanie w Historii ..."
+
+#: ..\../commands/comandoactualizaciones.cpp:46
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:536
+msgid "Check Updates"
+msgstr "Sprawdź aktualizacje"
+
+#: ..\../commands/comandoactualizaciones.cpp:136
+msgid "Not enough parameters found on XML"
+msgstr "Brak wystarczającej liczby parametrów w XML"
+
+#: ..\../commands/comandoactualizaciones.cpp:145
+msgid "XML parsing internal error"
+msgstr "Błąd wewnętrzny parsowania XML"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Error checking application updates"
+msgstr "Błąd przy sprawdzaniu istnienia aktualizacji aplikacji"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Ginkgo CADx updates"
+msgstr "Aktualizacje Ginkgo CADx "
+
+#: ..\../commands/comandoactualizaciones.cpp:170
+msgid "Internal error checking updates"
+msgstr "Błąd wewnętrzny przy sprawdzaniu istnienia aktualizacji"
+
+#: ..\../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr "Ścieżka serii  nie mogła zostać odnaleziona."
+
+#: ..\../commands/comandocarga.cpp:92 ..\../commands/comandocarga.cpp:96
+msgid "Exception loading:"
+msgstr "Ładowanie wyjątku:"
+
+#: ..\../commands/comandocarga.cpp:100
+msgid "Study malformed or unsupported"
+msgstr "Badanie o złym formacie lub nieobsługiwane"
+
+#: ..\../commands/comandocarga.cpp:129 ..\../commands/comandocarga.cpp:139
+msgid "Error loading study: "
+msgstr "Błąd ładowania badania:"
+
+#: ..\../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr "Błąd ładowania badania - brak wystarczającej pamięci"
+
+#: ..\../commands/comandocarga.cpp:144
+msgid "Error loading study."
+msgstr "Błąd ładowania badania."
+
+#: ..\../commands/comandocarga.cpp:149
+msgid "Load canceled by user"
+msgstr "Ładowanie anulowane przez użytkownika"
+
+#: ..\../commands/comandocarga.cpp:156
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+#: ..\../main/gui/history3/historypanel3.cpp:1063
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+msgid "Error loading study"
+msgstr "Błąd ładowania badania"
+
+#: ..\../commands/comandoexportacion.cpp:81
+#: ..\../commands/exporttodicomdircommand.cpp:214
+msgid "Exporting files..."
+msgstr "Eksportowanie plików ..."
+
+#: ..\../commands/comandoexportacion.cpp:105
+#: ..\../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr "Eksport został zakończony pomyślnie"
+
+#: ..\../commands/comandoexportacion.cpp:158
+#, c-format
+msgid "Exporting file %d of %d"
+msgstr "Eksportowanie pliku %d z %d"
+
+#: ..\../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr ""
+"Błąd przy zachowywaniu pliku, należy sprawdzić uprawnienia do katalogu."
+
+#: ..\../commands/comandoexportacion.cpp:233
+msgid "image_%m-%d-%Y_"
+msgstr "zdjęcie_%d-%m-%R_"
+
+#: ..\../commands/comandoincluirhistorial.cpp:108
+msgid "Exploring directory ..."
+msgstr "Przeglądanie katalogu ..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:122
+#, fuzzy
+msgid "Reading DICOMDIR ..."
+msgstr "Wybierz katalog DICOM"
+
+#: ..\../commands/comandoincluirhistorial.cpp:142
+#: ..\../commands/comandoincluirhistorial.cpp:156
+#: ..\../commands/comandoincluirhistorial.cpp:177
+msgid "Including files in the history .."
+msgstr "Włączanie plików do historii ..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:196
+msgid "Exploring directory "
+msgstr "Przeglądanie katalogu"
+
+#: ..\../commands/comandoincluirhistorial.cpp:256
+#: ..\../commands/linkhistorycommand.cpp:118
+msgid "Image acquisition finished."
+msgstr "Pobieranie zdjęcia zakończone."
+
+#: ..\../commands/comandoincluirhistorial.cpp:258
+#, fuzzy, c-format
+msgid "There have been included %d images."
+msgstr "Zostały włączone %d badania, %d serie and %d zdjęcia."
+
+#: ..\../commands/comandoincluirhistorial.cpp:261
+#: ..\../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+"\n"
+"Są %d błędy (patrz logi dla berdziej szczegółowego opisu)"
+
+#: ..\../commands/comandoincluirhistorial.cpp:273
+#: ..\../commands/linkhistorycommand.cpp:133
+msgid "This files doesn't exist:"
+msgstr "Ten plik nie istnieje"
+
+#: ..\../commands/comandoincluirhistorial.cpp:284
+#: ..\../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr "Ten plik nie ma formatu DICOM:"
+
+#: ..\../commands/comandoincluirhistorial.cpp:296
+#: ..\../commands/linkhistorycommand.cpp:156
+#, fuzzy
+msgid "This files are Dicom Dirs:"
+msgstr "Pobierz pliki DICOM"
+
+#: ..\../commands/comandopacs.cpp:58 ..\../commands/pacsdownloadcommand.cpp:61
+#: ..\../commands/sendpacscommand.cpp:137
+#, fuzzy
+msgid "There is not any Remote PACS configured"
+msgstr "Nie ma żadnego skonfigurowanego PACS-a"
+
+#: ..\../commands/comandopacs.cpp:84
+#, fuzzy
+msgid "Querying PACS ..."
+msgstr "PACS"
+
+#: ..\../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:98
+msgid "Starting Search ..."
+msgstr "Początek szukania  ..."
+
+#: ..\../commands/comandopacs.cpp:108
+#: ..\../commands/pacsdownloadcommand.cpp:101
+msgid "Server ID not found. ID = "
+msgstr "Id serwera nie odnalezione. Id ="
+
+#: ..\../commands/comandopacs.cpp:110 ..\../commands/comandopacs.cpp:112
+#: ..\../commands/comandopacs.cpp:114 ..\../commands/comandopacs.cpp:116
+#, fuzzy
+msgid "Query error with PACS Id "
+msgstr ""
+"\n"
+"- Ten PACS jest używany"
+
+#: ..\../commands/comandopacs.cpp:116
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error"
+msgstr "Błąd wewnętrzny"
+
+#: ..\../commands/comandopacs.cpp:135
+msgid "Failed to perform search: "
+msgstr "Niepowodzenie w wykonianiu szukania:"
+
+#: ..\../commands/dbmigrationcommand.cpp:94
+#: ..\../commands/dbmigrationcommand.cpp:103
+#, fuzzy
+msgid "Migrating old DICOM Dir ..."
+msgstr "Katalog DICOM"
+
+#: ..\../commands/dbmigrationcommand.cpp:99
+#: ..\../commands/dbmigrationcommand.cpp:108
+#, fuzzy
+msgid "Including files ..."
+msgstr "Załączanie plików ..."
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+#: ..\../commands/dicomizecommand.cpp:181
+#: ..\../commands/openremovableunit.cpp:74
+#: ..\../commands/openremovableunit.cpp:110
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../commands/pdfextractercommand.cpp:130
+#: ..\../main/controllers/historycontroller.cpp:447
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+#: ..\../main/controllers/historycontroller.cpp:1976
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ..\../main/gui/login/dialogologin.cpp:50
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ..\../main/gui/open/opendialogs.cpp:58
+#: ..\../main/gui/open/opendialogs.cpp:62
+#: ..\../main/gui/open/opendialogs.cpp:134
+#: ..\../main/gui/progress/statusbarprogreso.cpp:284
+#: ..\../main/gui/progress/statusbarprogreso.cpp:287
+#: ..\../main/gui/progress/statusbarprogreso.cpp:292
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Info"
+msgstr "Info"
+
+#: ..\../commands/dbmigrationcommand.cpp:123
+#, fuzzy
+msgid "Migration finisthed successfully"
+msgstr "Dikomizacja zakończona pomyślnie"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:27
+#: ..\../commands/dialogopathssobreescribirbase.cpp:62
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid "Overwrite"
+msgstr "Nadpisz"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr "Chcesz je nadpisać?"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:65
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ..\../main/gui/history3/historypanel3base.cpp:339
+#: ..\../main/gui/history3/historypanel3base.cpp:415
+#: ..\../main/gui/history3/historypanel3base.cpp:486
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ..\../main/gui/open/opendialogsbase.cpp:53
+#: ..\../main/gui/open/opendialogsbase.cpp:131
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ..\../widgets/gui/calibracionbase.cpp:86
+#: ..\../widgets/gui/selecciontextobase.cpp:60
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr "Anuluj"
+
+#: ..\../commands/dicomizationcompletebase.cpp:24
+#: ..\../commands/dicomizationcompletebase.cpp:33
+#: ..\../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr "Dikomizacja zakończona"
+
+#: ..\../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr "Dikomizacja zakończona pomyślnie"
+
+#: ..\../commands/dicomizationcompletebase.cpp:56
+msgid "Don't show this message again"
+msgstr "Nie pokazuj ponownie tego komunikatu"
+
+#: ..\../commands/dicomizationcompletebase.cpp:62
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ..\../main/gui/history3/historypanel3base.cpp:411
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ..\../widgets/gui/calibracionbase.cpp:82
+#: ..\../widgets/gui/selecciontextobase.cpp:56
+msgid "Accept"
+msgstr "Akceptuj"
+
+#: ..\../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr "Etap 1 z 3: Importowanie zdjęć"
+
+#: ..\../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr "Etap 2 z 3: Kopiowanie zdjęć"
+
+#: ..\../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr "Etap 3 z 3: Wczytywanie zdjęć"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid "Import process failed:"
+msgstr "Niepowodzenie procesu importu:"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+"\n"
+"Chcesz ponowić próbę?"
+
+#: ..\../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr "Importowanie"
+
+#: ..\../commands/dicomizecommand.cpp:370
+#, fuzzy
+msgid "Unknown error in dicomization process"
+msgstr "Nieznany błąd"
+
+#: ..\../commands/dicomizecommand.cpp:431
+#: ..\../commands/dicomizecommand.cpp:442
+#: ..\../commands/sendpacscommand.cpp:185
+#, fuzzy
+msgid "Error sending evidences:"
+msgstr "Błąd wysyłania komunikatu"
+
+#: ..\../commands/dicomizecommand.cpp:437
+#: ..\../commands/dicomizecommand.cpp:448
+msgid "Can not upload to the PACS:\n"
+msgstr "Nie można wczytać do PACS-a:\n"
+
+#: ..\../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+"Nie można wczytać do PACS-a:\n"
+"błąd wewnętrzny"
+
+#: ..\../commands/exporttodicomdircommand.cpp:261
+#: ..\../commands/exporttodicomdircommand.cpp:338
+#, c-format
+msgid "Exporting series %d of %d"
+msgstr "Eksportowanie serii %d z %d"
+
+#: ..\../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr "Niektóre z wybranych serii zostały usunięte"
+
+#: ..\../commands/exporttodicomdircommand.cpp:279
+#: ..\../commands/exporttodicomdircommand.cpp:385
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+msgid "There was an error creating directory"
+msgstr "Błąd przy tworzeniu katalogu"
+
+#: ..\../commands/exporttodicomdircommand.cpp:303
+#: ..\../commands/exporttodicomdircommand.cpp:408
+msgid "There was an error writing file"
+msgstr "Błąd przy zapisie pliku"
+
+#: ..\../commands/exporttodicomdircommand.cpp:358
+msgid "There was an error anonymizing files"
+msgstr "Wystąpił błąd przy anonimizacji plików"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Ignoring incoming operation "
+msgstr "Ignorowanie przychodzących operacji"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:298
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr "Niezaimplementowany"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:473
+#: ..\../commands/pacsdownloadcommand.cpp:170
+#: ..\../commands/pacsdownloadcommand.cpp:179
+msgid "Including files..."
+msgstr "Załączanie plików ..."
+
+#: ..\../commands/linkhistorycommand.cpp:68
+#, fuzzy
+msgid "Linking study..."
+msgstr "Badanie"
+
+#: ..\../commands/openremovableunit.cpp:42
+#: ..\../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr "Przeglądanie napędów ..."
+
+#: ..\../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+"Nie znaleziono katalogi DICOM na nośniku wymiennym.\n"
+"Czy chcesz rekurencyjnie przeskanować inną ścieżkę?"
+
+#: ..\../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+"Nie znaleziono katalogi DICOM na nośniku wymiennym. Czy chcesz rekurencyjnie "
+"przeskanować napęd %s?"
+
+#: ..\../commands/openremovableunit.cpp:130
+msgid "Select drive you want to open"
+msgstr "Wybierz napędz, który chcesz otworzyć"
+
+#: ..\../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+"Ginkgo CADx wykrył więcej niż jeden wymienny nośnik,\n"
+"ale żaden z nich nie zawiera w głównym katalogu DICOMDIR.\n"
+"Select drive where you want to acquire recursively"
+
+#: ..\../commands/pacsdownloadcommand.cpp:134
+msgid "Error downloading study: "
+msgstr "Błąd ściągania badania:"
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#, fuzzy
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr "Ginkgo CADx nie może dokonać kompresji z "
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ..\../main/gui/progress/statusbarprogreso.cpp:278
+#: ..\../widgets/gui/calibracion.cpp:205 ..\../widgets/gui/calibracion.cpp:209
+#: ..\../widgets/gui/calibracion.cpp:219 ..\../widgets/gui/calibracion.cpp:225
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "Error"
+msgstr "Błąd"
+
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:130
+#, fuzzy
+msgid "PDF files extracted successfully..."
+msgstr "Użytkownik wstawiony pomyślnie"
+
+#: ..\../commands/secondarycapturedicomizecommand.cpp:73
+#, fuzzy
+msgid "Ginkgo CADx Secondary Capture"
+msgstr "Ginkgo CADx"
+
+#: ..\../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr "Wysyłanie komunikatu HL7 %d z %d"
+
+#: ..\../commands/sendhl7command.cpp:73
+msgid "Message successfully sent"
+msgstr "Komunikat wysłany pomyślnie"
+
+#: ..\../commands/sendhl7command.cpp:77
+msgid "Unknown protocol"
+msgstr "Nieznany protokół"
+
+#: ..\../commands/sendhl7command.cpp:80 ..\../commands/sendhl7command.cpp:93
+#: ..\../commands/sendhl7command.cpp:145
+msgid "Error sending message:"
+msgstr "Błąd wysyłania komunikatu"
+
+#: ..\../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr "Błąd wysyłania komunikatu HL7. Więcej szczegółów w logu."
+
+#: ..\../commands/sendhl7command.cpp:93 ..\../commands/sendhl7command.cpp:94
+msgid "Unknown error"
+msgstr "Nieznany błąd"
+
+#: ..\../commands/sendhl7command.cpp:134
+msgid "Failed to start connection"
+msgstr "Niepowodzenie przy inicjowaniu połączenia"
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid "Error sending message. It was sent "
+msgstr "Błąd wysyłania komunikatu. Komunikat został wysłany."
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr "bajtów z całkowitej liczby  "
+
+#: ..\../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:258
+msgid "Failed delivery confirmation:"
+msgstr "Niepowodzenie w dostarczeniu potwierdzenia:"
+
+#: ..\../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:51
+#, fuzzy
+msgid "Send files to PACS"
+msgstr "Wyślij badanie do PACS-a podczas importu"
+
+#: ..\../commands/sendpacscommand.cpp:155
+msgid "Uploading files ..."
+msgstr "Wczytywanie plików ..."
+
+#: ..\../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:181
+msgid "Error:"
+msgstr "Błąd:"
+
+#: ..\../commands/sendpacscommand.cpp:189
+msgid "Error sending evidences: Internal error."
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:203
+msgid "Error uploading the study to PACS: "
+msgstr "Błąd wczytywania badania do PACS-a"
+
+#: ..\../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:206
+#, fuzzy
+msgid "Retry send to PACS"
+msgstr "Wyślij badanie do PACS-a podczas importu"
+
+#: ..\../commands/synchronizationcommand.cpp:104
+#, fuzzy
+msgid "Error downloading file"
+msgstr "Ściąganie pliku %d"
+
+#: ..\../commands/synchronizationcommand.cpp:141
+#, fuzzy
+msgid "Error synchronizing study: "
+msgstr "Błąd ładowania badania: błąd wewnętrzny"
+
+#: ..\../commands/thumbnailscommand.cpp:107
+#: ..\../commands/thumbnailscommand.cpp:133
+#: ..\../commands/thumbnailscommand.cpp:247
+#: ..\../commands/thumbnailscommand.cpp:376
+#: ..\../commands/thumbnailscommand.cpp:382
+#: ..\../main/gui/import/selectimagesimportation.cpp:504
+msgid "Creating Thumbnail..."
+msgstr "Tworzenie miniaturki"
+
+#: ..\../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr "Tworzenie miniaturki ..."
+
+#: ..\../export/tools/iaddfiletohistorytool.cpp:19
+#: ..\../main/gui/history3/historypanel3.cpp:632
+#, fuzzy
+msgid "Open study"
+msgstr "Otwórz"
+
+#: ..\../export/tools/iangletool.cpp:19
+#, fuzzy
+msgid "Angle \tCtrl+A"
+msgstr "Kąt standardowy (3 punkty)"
+
+#: ..\../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr ""
+
+#: ..\../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr ""
+
+#: ..\../export/tools/icolormaptool.cpp:20
+#, fuzzy
+msgid "Color Map"
+msgstr "Kolor"
+
+#: ..\../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ..\../main/gui/open/opendialogsbase.cpp:46
+#: ..\../main/gui/open/opendialogsbase.cpp:198
+msgid "Copy"
+msgstr ""
+
+#: ..\../export/tools/icornerannotationstool.cpp:20
+#, fuzzy
+msgid "Window annotations"
+msgstr "Ukryj adnotacje narożne"
+
+#: ..\../export/tools/idetachwindowtool.cpp:19
+#, fuzzy
+msgid "Detach window"
+msgstr "Zamknij wszystkie okna"
+
+#: ..\../export/tools/iimageexporttool.cpp:19
+#, fuzzy
+msgid "Export image..."
+msgstr "Asystent eksportu zdjęć"
+
+#: ..\../export/tools/imarkertool.cpp:20
+#, fuzzy
+msgid "Marking Tools \tCtrl+M"
+msgstr "Narzędzia do zaznaczania\tCtrl+M"
+
+#: ..\../export/tools/imetricgridtool.cpp:20
+msgid "Metric grid"
+msgstr "Siatka metryczna"
+
+#: ..\../export/tools/inotetool.cpp:19
+#, fuzzy
+msgid "Text Note \tCtrl+N"
+msgstr "Notatka\tCtrl+N"
+
+#: ..\../export/tools/ipacsuploadtool.cpp:19
+#, fuzzy
+msgid "Upload study..."
+msgstr "Wczytaj zdjęcia do serwera PACS-a"
+
+#: ..\../export/tools/ipixelsbluringtool.cpp:20
+#, fuzzy
+msgid "Pixels blurring"
+msgstr "Rozmycie pikseli"
+
+#: ..\../export/tools/ipointertool.cpp:19
+#, fuzzy
+msgid "Pointer \tEsc"
+msgstr "Wskaźnik\tEsc"
+
+#: ..\../export/tools/iqueryretrievetool.cpp:19
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#: ..\../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr "Pobierz badanie DICOM z PACS-a"
+
+#: ..\../export/tools/iresettool.cpp:19
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+#, fuzzy
+msgid "Reset"
+msgstr "Pwróć do ustawień domyślnych"
+
+#: ..\../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr ""
+
+#: ..\../export/tools/iruletool.cpp:19
+#, fuzzy
+msgid "Rule \tCtrl+R"
+msgstr "Linijka/Prowadnica \tCtrl+R"
+
+#: ..\../export/tools/isecondarycapturetool.cpp:19
+#, fuzzy
+msgid "Save snapshot as new series..."
+msgstr "Należy wybrać przynajmniej 1 zdjęcie"
+
+#: ..\../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr ""
+
+#: ..\../export/tools/ishowtagstool.cpp:19
+#: ..\../main/tools/showtagshistorytool.cpp:27
+#, fuzzy
+msgid "DICOM inspector"
+msgstr "Ukryj inspektora DICOM"
+
+#: ..\../export/tools/isimpleprinttool.cpp:19
+#: ..\../main/tools/simpleprinttool.cpp:226
+msgid "Print"
+msgstr "Drukuj"
+
+#: ..\../export/tools/istartdicomizationtool.cpp:19
+#, fuzzy
+msgid "Dicomize..."
+msgstr "Automatycznie zamknij Ginkgo CADx po dikomizacji"
+
+#: ..\../export/tools/itoolpan.cpp:19
+#, fuzzy
+msgid "Pan \tCtrl+P"
+msgstr "Wartość P"
+
+#: ..\../export/tools/itoolslider.cpp:19
+#, fuzzy
+msgid "Slider \tCtrl+S"
+msgstr "Ściągnij %s zdjęcia/ć"
+
+#: ..\../export/tools/itoolwindowlevel.cpp:19
+#, fuzzy
+msgid "Window/Level \tCtrl+W"
+msgstr "Okno/poziom\tCtrl+W"
+
+#: ..\../export/tools/itoolzoom.cpp:19
+#, fuzzy
+msgid "Zoom \tCtrl+O"
+msgstr "Powiększ\tCtrl+Z"
+
+#: ..\../export/tools/itrackballtool.cpp:19
+msgid "Trackball \tCtrl+T"
+msgstr ""
+
+#: ..\../export/tools/iundotool.cpp:20 ..\../main/tools/undotool.cpp:109
+msgid "Undo"
+msgstr "Cofnij"
+
+#: ..\../export/tools/ivideotool.cpp:19
+msgid "Video \tCtrl+Space"
+msgstr ""
+
+#: ..\../export/tools/iwindowlayouttool.cpp:20
+#, fuzzy
+msgid "Window layout"
+msgstr "Układ 1x1"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+#, fuzzy
+msgid "Studies with"
+msgstr "Badania"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr "nieobsługiwane komponenty"
+
+#: ..\../main/controllers/controladorcarga.cpp:210
+#, fuzzy
+msgid "Reading properties"
+msgstr "Właściwości ..."
+
+#: ..\../main/controllers/controladorcarga.cpp:219
+#: ..\../main/controllers/controladorcarga.cpp:642
+#: ..\../main/controllers/controladorcarga.cpp:888
+#: ..\../main/controllers/streaming/streamingloader.cpp:600
+msgid "Error reading the study: "
+msgstr "Błąd czytania badania:"
+
+#: ..\../main/controllers/controladorcarga.cpp:224
+#: ..\../main/controllers/controladorcarga.cpp:229
+#: ..\../main/controllers/controladorcarga.cpp:647
+#: ..\../main/controllers/controladorcarga.cpp:893
+msgid "Internal error reading the study: "
+msgstr "Błąd wewnętrzny przy czytaniu badania:"
+
+#: ..\../main/controllers/controladorcarga.cpp:269
+#: ..\../main/controllers/controladorcarga.cpp:281
+#: ..\../main/controllers/controladorcarga.cpp:905
+#, fuzzy
+msgid "Spacing is not valid: ("
+msgstr "Żądany moduł nie jest zarejestrowany"
+
+#: ..\../main/controllers/controladorcarga.cpp:305
+#: ..\../main/controllers/controladorcarga.cpp:338
+#: ..\../main/controllers/controladorcarga.cpp:372
+#: ..\../main/controllers/controladorcarga.cpp:408
+#: ..\../main/controllers/controladorcarga.cpp:441
+#: ..\../main/controllers/controladorcarga.cpp:474
+#: ..\../main/controllers/controladorcarga.cpp:507
+#: ..\../main/controllers/controladorcarga.cpp:540
+#: ..\../main/controllers/controladorcarga.cpp:573
+#: ..\../main/controllers/controladorcarga.cpp:606
+#: ..\../main/controllers/controladorcarga.cpp:935
+msgid "Error loading the study: Out of memory"
+msgstr "Błąd ładowania badania: brak pamięci"
+
+#: ..\../main/controllers/controladorcarga.cpp:375
+msgid "Error loading the study: Internal Error"
+msgstr "Błąd ładowania badania: błąd wewnętrzny"
+
+#: ..\../main/controllers/controladorcarga.cpp:630
+#: ..\../main/controllers/streaming/streamingloader.cpp:1023
+#: ..\../main/controllers/streaming/streamingloader.cpp:1223
+#: ..\../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr "Błąd czytania badania: nieobsługiwany format piksela"
+
+#: ..\../main/controllers/controladorcarga.cpp:651
+#: ..\../main/controllers/controladorcarga.cpp:960
+msgid "Process canceled by user."
+msgstr "Proces anulowany przez użytkownika"
+
+#: ..\../main/controllers/controladorcarga.cpp:878
+msgid "Interpreting properties"
+msgstr "Interpretowanie właściwości"
+
+#: ..\../main/controllers/controladorcarga.cpp:917
+#, fuzzy
+msgid "Spacing of the image is invalid: ("
+msgstr "Załącz zdjęcie"
+
+#: ..\../main/controllers/controladorcarga.cpp:942
+msgid "Reading dataset"
+msgstr "Czytanie zbioru danych"
+
+#: ..\../main/controllers/controladorcarga.cpp:951
+msgid "Error reading the study:"
+msgstr "Błąd czytania badania:"
+
+#: ..\../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr "Błąd wewnętrzny podczas czytania badania:"
+
+#: ..\../main/controllers/controladorcarga.cpp:972
+msgid "load"
+msgstr "ładuj"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:40
+#, fuzzy
+msgid "Stopping HL7 sender"
+msgstr "Usługa HL7"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:63
+#: ..\../main/controllers/controladorenviohl7.cpp:76
+#, fuzzy
+msgid "Error starting HL7 sender"
+msgstr "Błąd ustawienia warstwy TLS:"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:65
+#: ..\../main/controllers/controladorenviohl7.cpp:78
+#, fuzzy
+msgid "HL7 sender started"
+msgstr "Usługa HL7"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:108
+#, fuzzy
+msgid "HL7 controller destroyed"
+msgstr "Usługa HL7"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:150
+#, fuzzy
+msgid "Error processing message"
+msgstr "Komunikat o błędzie"
+
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/controllers/pacscontroller.cpp:1549
+#: ..\../main/controllers/pacscontroller.cpp:1553
+#: ..\../main/controllers/pacscontroller.cpp:1557
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:184
+msgid "Unknown"
+msgstr "Nieznany"
+
+#: ..\../main/controllers/controladorextensiones.cpp:110
+msgid "Loading"
+msgstr "Ładowanie"
+
+#: ..\../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr "Nie mógł być załadowany plik biblioteki rozszerzenia"
+
+#: ..\../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr "Nie można załadować pliku biblioteki. Sprawdź logi"
+
+#: ..\../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:153
+msgid "Could not find entry point"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr "Pomijanie rozszerzenia ze zduplikowanym SID-em"
+
+#: ..\../main/controllers/controladorhl7.cpp:74
+msgid "Integration engine hostname not set"
+msgstr "Nie podano nazwy maszyny integrującej"
+
+#: ..\../main/controllers/controladorhl7.cpp:77
+msgid "Integration engine port not set"
+msgstr "Nie podano portu maszyny integrującej"
+
+#: ..\../main/controllers/controladorhl7.cpp:91
+msgid "Unsupported protocol"
+msgstr "Nieobsługiwany protokół"
+
+#: ..\../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr "Zostało znalezionych %d wyników"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, c-format
+msgid "Downloading file %d/%d"
+msgstr "Ściąganie pliku %d/%d"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr "Przekroczony limit rozmiaru ściąganego badania"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr "Nie może zarezerwować pamięci na dikomizację pliku pdf"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr "Nie może zarezerwować pamięci na dikomizację zdjęcia"
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+msgid "Image format not supported"
+msgstr "Nierozpoznany format zdjęcia"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr "Klucz prywatny i certyfikat nie pokrywają się"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr "Błąd ustawienia warstwy TLS:"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:200
+#, fuzzy
+msgid "Receiving Association failed: "
+msgstr "Unikalny identyfikator jednostki otrzymującej komunikat"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:209
+msgid "Association received"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:210
+msgid "Parameters:"
+msgstr "Parametry:"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ")"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:274
+#, fuzzy
+msgid "No valid presentation contexts"
+msgstr "Informacja o sposobie prezentacji zdjęcia"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+#, fuzzy
+msgid "Association(dicom://"
+msgstr "Węzły DICOM"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr "@"
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr "Ginkgo CADx nie może dokonać kompresji z "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr "do"
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, c-format
+msgid "Uploading file %d of %d"
+msgstr "Wczytywanie pliku %d z %d"
+
+#: ..\../main/controllers/dicommanager.cpp:504
+#: ..\../main/controllers/dicommanager.cpp:531
+#, fuzzy
+msgid "Extracting file..."
+msgstr "Plik"
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid "Error creating history database "
+msgstr "Błąd tworzenia historii bazy danych"
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr "próba temp"
+
+#: ..\../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+"Nie posiadać uprawnień do zapisu w katalogu DICOM, preferencje zostanoą "
+"przechowane w tymczasowym katalogu"
+
+#: ..\../main/controllers/historycontroller.cpp:343
+#, fuzzy
+msgid "Error creating dicomDir database "
+msgstr "Błąd tworzenia historii bazy danych"
+
+#: ..\../main/controllers/historycontroller.cpp:425
+#: ..\../main/controllers/historycontroller.cpp:441
+msgid "Error creating thumbnails database "
+msgstr "Błąd przy tworzeniu bazy miniaturek"
+
+#: ..\../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr "Błąd przy tworzeniu bazy danych:\n"
+
+#: ..\../main/controllers/historycontroller.cpp:560
+msgid "Including image "
+msgstr "Załącz zdjęcie"
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr "z"
+
+#: ..\../main/controllers/historycontroller.cpp:707
+#, fuzzy
+msgid "Linking image "
+msgstr "Załącz zdjęcie"
+
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr "Błąd czytania historii: \n"
+
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr "Niepowodzenie przy opróżnianiu historii:\n"
+
+#: ..\../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+"Ginkgo CADx wykrył brak aktywności i zostanie zamknięty w ciągu %d sekund.\n"
+"czy chcesz kontynuować?"
+
+#: ..\../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#, fuzzy
+msgid "Malformed template Id ("
+msgstr "Nieobsługiwany id szablonu ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid "Template Id unsupported ("
+msgstr "Nieobsługiwany id szablonu ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr ""
+"):\n"
+"Sprawdź konfigurację i podłącz ją w razie konieczności"
+
+#: ..\../main/controllers/integrationcontroller.cpp:566
+msgid "Unknown module Id ("
+msgstr "Nieznane id modułu ("
+
+#: ..\../main/controllers/integrationcontroller.cpp:592
+msgid "Empty configuration"
+msgstr "Opróżnij konfigurację"
+
+#: ..\../main/controllers/integrationcontroller.cpp:631
+#, fuzzy
+msgid "XML Parser Not Found. Key="
+msgstr "Brak wystarczającej liczby parametrów w XML"
+
+#: ..\../main/controllers/log4cplus/guiappender.cpp:75
+#, fuzzy
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr "%m/%d/%Y %H:%M:%S"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ..\../main/gui/history3/historypanel3base.cpp:48
+#: ..\../main/gui/import/pasosimportacionbase.cpp:227
+msgid "Patient"
+msgstr "Pacjent"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#, fuzzy
+msgid "Patient ID"
+msgstr "Id pacjenta"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:86
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ..\../main/gui/history3/historypanel3.cpp:227
+#: ..\../main/gui/open/opendialogs.cpp:50
+msgid "Modality"
+msgstr "Rodzaj badania"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:98
+#, fuzzy
+msgid "Dimensions"
+msgstr "Rozszerzenia"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:109
+#, fuzzy, c-format
+msgid "Made with %s"
+msgstr "Ściągnij %s zdjęcia/ć"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:167
+#: ..\../main/controllers/modalitysettingscontroller.cpp:338
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr "Domyślny"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1212
+#, fuzzy
+msgid "Downloading file"
+msgstr "Ściąganie pliku %d"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+#, fuzzy
+msgid "Error downloading WADO file"
+msgstr "Ściąganie pliku %d"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+#, fuzzy
+msgid "Check PACS configuration"
+msgstr "Brak adresu URL do sprawdzania aktualizacji w bieżącej konfiguracji."
+
+#: ..\../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1428
+#, fuzzy
+msgid "Invalid HTTP response"
+msgstr "Umożliw http proxy"
+
+#: ..\../main/controllers/pacscontroller.cpp:1433
+#, fuzzy
+msgid "Invalid HTTP code"
+msgstr "Umożliw http proxy"
+
+#: ..\../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1472
+msgid "PACS-Service"
+msgstr "Usługa PACS"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:97
+#: ..\../main/controllers/parserxmlspanish.cpp:94
+msgid "Omitted Identificator"
+msgstr "Pominięty identyfikator"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:105
+#: ..\../main/controllers/parserxmlspanish.cpp:102
+msgid "Omitted AET"
+msgstr "Pominięty AET"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:113
+#: ..\../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr "Brak nazwy hosta"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:121
+#: ..\../main/controllers/parserxmlspanish.cpp:118
+msgid "Omitted port"
+msgstr "Pominięty port"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:206
+#: ..\../main/controllers/parserxmlenglish.cpp:237
+#: ..\../main/controllers/parserxmlspanish.cpp:188
+#: ..\../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr "Żądany moduł nie jest zarejestrowany"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:212
+#: ..\../main/controllers/parserxmlspanish.cpp:194
+msgid "Port is not a valid number"
+msgstr "Port nie jest poprawną liczbą"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:248
+#: ..\../main/controllers/parserxmlspanish.cpp:228
+msgid "The port is not a valid number"
+msgstr "Port nie jest właściwą liczbą"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:265
+#: ..\../main/controllers/parserxmlspanish.cpp:246
+msgid "Setting not found"
+msgstr "Nie odnaleziono ustawienia"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr "\"action\" attribute invalid at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr "\"action\" attribute expected at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:391
+#, fuzzy
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr "\"code\" attribute expected at \"metadata\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:427
+#, fuzzy
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr "\"code\" attribute expected at \"metadata\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:434
+#, fuzzy
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr "\"action\" attribute expected at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:445
+#, fuzzy
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr "\"cid\" atribute expected at \"centro\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr "\"code\" attribute expected at \"metadata\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:483
+#, fuzzy
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr "\"code\" attribute expected at \"metadata\" scope"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:548
+#: ..\../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr "Należy podać atrybuty, które chcemy zastosować w zapytaniu"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:552
+#: ..\../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr "Przeczytano zakładkę \"pacjent\" bez identyfikatorów"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:570
+#: ..\../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr ""
+"Należy zdefiniować domyślny serwer PACS-a w integracji XML lub w menu "
+"ustawień"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr "\"accion\" attribute invalid at \"plantilla\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr "\"accion\" attribute expected at \"plantilla\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:340
+#, fuzzy
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr "\"ambito\" attribute expected at \"dimse\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr "\"ambito\" attribute invalid at \"dimse\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr "\"ambito\" attribute expected at \"dimse\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:402
+#, fuzzy
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr "\"action\" attribute expected at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:438
+#, fuzzy
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr "\"action\" attribute expected at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:445
+#, fuzzy
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr "\"action\" attribute expected at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr "\"cid\" atribute expected at \"centro\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr "\"aid\" attribute expected at \"hce\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:486
+#, fuzzy
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr "\"clave\" attribute expected at \"metadato\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr "\"clave\" attribute expected at \"metadato\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:524
+#, fuzzy
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr "\"action\" attribute expected at \"gnkworkflow\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr "\"ambito\" attribute expected at \"plantilla\" scope"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:559
+msgid "id_application expected"
+msgstr "oczekiwane jest id aplikacji"
+
+#: ..\../main/controllers/smartretrievecontroller.cpp:124
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:920
+msgid "Downloading from PACS..."
+msgstr "Ściąganie z PACS-a ..."
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:303
+#: ..\../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr "Błąd wewnętrzny przy czytania badania, nieznany format"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ..\../main/gui/history3/historytablemodel.cpp:403
+#: ..\../main/gui/history3/historytablemodel.cpp:415
+#: ..\../main/gui/history3/historytablemodel.cpp:470
+#: ..\../main/gui/history3/historytablemodel.cpp:482
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:102
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr "%m/%d/%Y %H:%M:%S"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr "%m/%d/%Y 00:00:00"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+msgid "Exploring PACS..."
+msgstr "Przeglądanie PACS-a"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ..\../main/gui/history3/historypanel3.cpp:225
+#: ..\../main/gui/open/opendialogs.cpp:49
+#, fuzzy
+msgid "Patient id"
+msgstr "Id pacjenta"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ..\../main/gui/history3/historypanel3.cpp:224
+#: ..\../main/gui/open/opendialogs.cpp:48
+msgid "Patient name"
+msgstr "Nazwisko pacjenta"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:479
+#, fuzzy
+msgid "Study Instance UID"
+msgstr "UID badania"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ..\../main/gui/history3/historypanel3.cpp:231
+#: ..\../main/gui/open/opendialogs.cpp:53
+msgid "Accession number"
+msgstr "Numer dostępu"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:481
+msgid "Study date"
+msgstr "Data badania"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:482
+#, fuzzy
+msgid "Study time"
+msgstr "Czas"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:490
+#, fuzzy
+msgid "Series Instance UID"
+msgstr "Seria"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:492
+msgid "Series date"
+msgstr "Data serii"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:493
+#, fuzzy
+msgid "Series time"
+msgstr "Czas"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:519
+msgid "No results found"
+msgstr "Brak rezultatów"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#, fuzzy
+msgid "Write query name"
+msgstr "Nazwa"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#, fuzzy
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr ""
+"Plik istnieje\n"
+"Czy chcesz go nadpisać?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+msgid "Id"
+msgstr "Id"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+msgid "Date Time"
+msgstr "Data czas"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ..\../main/gui/history3/historypanel3.cpp:229
+#: ..\../main/gui/import/pasosimportacionbase.cpp:298
+#: ..\../main/gui/import/pasosimportacionbase.cpp:340
+#: ..\../main/gui/open/opendialogs.cpp:52
+msgid "Description"
+msgstr "Opis"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ..\../main/gui/import/pasosimportacionbase.cpp:276
+msgid "Accession Number"
+msgstr "Numer dostępu"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:210
+msgid "Store query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:211
+#, fuzzy
+msgid "Remove query"
+msgstr "Usuń"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:278
+msgid "There is no any PACS configured"
+msgstr "Nie ma żadnego skonfigurowanego PACS-a"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr "Acc#"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+msgid "Study UID"
+msgstr "UID badania"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+"Wyszukiwanie bez parametrów może zająć dużo czasu\n"
+"Czy mimo tego chcesz kontynuować?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid "Search"
+msgstr "Szukaj"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:519
+msgid "Download series"
+msgstr "Ściągnij serię"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+msgid "Download study"
+msgstr "Ściągnij badanie"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:535
+#, fuzzy
+msgid "Link series"
+msgstr "Seria"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:537
+#, fuzzy
+msgid "Link study"
+msgstr "Badanie"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:551
+msgid "Properties..."
+msgstr "Właściwości ..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#, fuzzy
+msgid "You must specify at least a modality or a period of time"
+msgstr "Należy podać przynajmniej uid badania lub numer dostępu"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#, fuzzy
+msgid "Select a valid query"
+msgstr "Wybierz serwer PACS-a"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+msgid "Select a valid PACS Server"
+msgstr "Wybierz serwer PACS-a"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid "Download of modality "
+msgstr "Ściąganie rodzaju badania"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr "niedozwolone"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr "Nie masz pozwolenia na ściągnięcie tego rodzaju badań."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "Modality download error"
+msgstr "Błąd ściągania rodzaju badania"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:786
+msgid "search results"
+msgstr "Rezultaty szukania"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:913
+#, fuzzy
+msgid "Downloading serie..."
+msgstr "Ściąganie plików ..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:916
+#, fuzzy
+msgid "Downloading study..."
+msgstr "Błąd ściągania badania:"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+msgid "PACS acquisition is restricted"
+msgstr "Pobieranie z PACS-a jest ograniczone"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+msgid "Server"
+msgstr "Serwer"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ..\../main/gui/import/pasosimportacionbase.cpp:284
+#: ..\../main/gui/import/pasosimportacionbase.cpp:326
+#: ..\../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr "Data badania"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ..\../main/gui/history3/historypanel3base.cpp:81
+msgid "Any date"
+msgstr "Dowolna data"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ..\../main/gui/history3/historypanel3base.cpp:85
+msgid "Today AM"
+msgstr "Dzisiaj przed południem"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ..\../main/gui/history3/historypanel3base.cpp:88
+msgid "Today PM"
+msgstr "Dzisiaj po południu"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ..\../main/gui/history3/historypanel3base.cpp:91
+msgid "Today"
+msgstr "Dzisiaj"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ..\../main/gui/history3/historypanel3base.cpp:100
+msgid "Yesterday"
+msgstr "Wczoraj"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ..\../main/gui/history3/historypanel3base.cpp:103
+msgid "Last 7 days"
+msgstr "Ostatnie 7 dni"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ..\../main/gui/history3/historypanel3base.cpp:106
+msgid "Last 30 days"
+msgstr "Ostatnie 30 dni"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ..\../main/gui/history3/historypanel3base.cpp:109
+msgid "Last 3 months"
+msgstr "Ostatnie 3 miesiące"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ..\../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr "Od  do:"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ..\../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr "Rodzaje badań"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+#, fuzzy
+msgid "Stored queries"
+msgstr "Plik nie może zostać zapisany"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+#, fuzzy
+msgid "Select stored queries..."
+msgstr "Wybierz katalog, w którym pliki zostaną zapisane"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ..\../main/gui/open/opendialogsbase.cpp:50
+#: ..\../main/gui/open/opendialogsbase.cpp:202
+msgid "Link"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+msgid "Download"
+msgstr "Ściąganie"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ..\../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr "Zamknij"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+msgid "Series does not exist"
+msgstr "Seria nie istnieje"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr "Seria została usunięta z lokalnej historii"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr "Kontynuuj"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ..\../main/gui/open/opendialogsbase.cpp:127
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ..\../main/tools/metricgridtool.cpp:101
+msgid "Ok"
+msgstr "Ok"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:151
+#, fuzzy
+msgid "Download again"
+msgstr "Ściąganie"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+msgid "Open"
+msgstr "Otwórz"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:179
+#, fuzzy
+msgid "Set query name"
+msgstr "Nazwa"
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:32
+#, fuzzy
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+"Wybrana seria jest już otwarta\n"
+"Czy otworzyć ją ponownie?"
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:34
+#, fuzzy
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+"Wybrana seria jest już otwarta\n"
+"Czy otworzyć ją ponownie?"
+
+#: ..\../main/gui/anonymize/anonymizedialog.cpp:64
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ..\../main/gui/export/parametrosprincipales.cpp:194
+msgid "Exporting images ..."
+msgstr "Eksportowanie zdjęć ..."
+
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:21
+#, fuzzy
+msgid "Common tags"
+msgstr "Prywatne tagi Ginkgo CADx"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+msgid "Patient's name and surname"
+msgstr "Imię i nazwisko pacjenta"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+msgid "Patient Id"
+msgstr "Id pacjenta"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr "Jednostki"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr "Lekarz kierujący"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr "Komentarze"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:44
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr "Ginkgo CADxTagi (Mapy ewaluacyjne...)"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:71
+#, fuzzy
+msgid "Add new..."
+msgstr "Nowy ..."
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ..\../main/tools/anonymizetool.cpp:26
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr "Anonimizuj"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:136
+#, fuzzy
+msgid "Create new"
+msgstr "Nowy ..."
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:136
+#, fuzzy
+msgid "Add DICOM tag"
+msgstr "Dodaj"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:199
+msgid "Group"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:203
+msgid "Element"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ..\../widgets/wangulo.cpp:1114
+msgid "Value"
+msgstr "Wartość"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+#, fuzzy
+msgid "Top right corner annotation"
+msgstr "Ukryj adnotacje narożne"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+#, fuzzy
+msgid "Top left corner annotation"
+msgstr "Ukryj adnotacje narożne"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+#, fuzzy
+msgid "Bottom left corner annotation"
+msgstr "Ukryj adnotacje narożne"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+#, fuzzy
+msgid "Bottom right corner annotation"
+msgstr "Ukryj adnotacje narożne"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#, fuzzy
+msgid "You must fill in all fields"
+msgstr "Aby kontynuować, należy wypełnić wszystkie pola"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+msgid "Window/level label in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+#, fuzzy
+msgid "Window"
+msgstr "Układ okna"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+msgid "Level"
+msgstr "Poziom"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#, fuzzy
+msgid "Do you confirm the removal of the preset?"
+msgstr "Potwierdź usunięcie profilu"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Data modified"
+msgstr "Dane zmodyfikowane"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+#, fuzzy
+msgid "Modality settings"
+msgstr "do Rodzaju badania"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+#, fuzzy
+msgid "Default modality settings"
+msgstr "do Rodzaju badania"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, fuzzy, c-format
+msgid "%s settings"
+msgstr "Ustawienia"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:60
+#, fuzzy
+msgid "settings"
+msgstr "Ustawienia"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Export Configuration"
+msgstr "Eksportuj konfigurację"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Ini Files(*.ini)|*.ini"
+msgstr "Pliki ini (*.ini)|*.ini"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+"Plik istnieje\n"
+"Czy chcesz go nadpisać?"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+msgid "Existing file"
+msgstr "Istniejący plik"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+msgid "Export successfully completed"
+msgstr "Eksport pomyślnie zakończony"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+msgid "There was an error during exportation"
+msgstr "Błąd podczas eksportu"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Import Configuration"
+msgstr "Konfiguracja importu"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Ini files(*.ini)|*.ini"
+msgstr "Pliki ini (*.ini)|*.ini"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr ""
+"Import zakończony pomyślnie. Uruchom ponownie Ginkgo CADx, by zastosować "
+"zmiany."
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+msgid "There was an error during importation, check permissions"
+msgstr "Wystąpił błąd podczas eksportu, sprawdź uprawnienia"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+#, fuzzy
+msgid "Dicom tag"
+msgstr "Zdikomizowane pliki"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+#, fuzzy
+msgid "Split horizontally..."
+msgstr "Ułóż obrazki w poziomie"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+#, fuzzy
+msgid "Split vertically..."
+msgstr "Ułóż obrazki w pionie"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ..\../main/tools/windowlayouttool.cpp:273
+#, fuzzy
+msgid "Split active horizontally"
+msgstr "Aktywny"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ..\../main/tools/windowlayouttool.cpp:274
+#, fuzzy
+msgid "Split active vertically"
+msgstr "Aktywny"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+#, fuzzy
+msgid "New hanging protocol"
+msgstr "Nowy ..."
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, fuzzy, c-format
+msgid "Window %d"
+msgstr "Eksportowanie pliku %d z %d"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr "Aktywny"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "Yes"
+msgstr "Tak"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr "Nie"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+#, fuzzy
+msgid "Hanging protocols"
+msgstr "Nieznany protokół"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+msgid "One day"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+#, fuzzy
+msgid "Two days"
+msgstr "Siatka (2 kolumny)"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+#, fuzzy
+msgid "Three days"
+msgstr "Siatka (3 kolumny)"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+#, fuzzy
+msgid "Two weeks"
+msgstr "Siatka (2 kolumny)"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+#, fuzzy
+msgid "One month"
+msgstr "Ostatni miesiąc"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+#, fuzzy
+msgid "Three months"
+msgstr "Ostatnie 3 miesiące"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+#, fuzzy
+msgid "Local database"
+msgstr "Błąd tworzenia historii bazy danych"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+#, fuzzy
+msgid "Local DICOM Dir setup"
+msgstr "Katalog DICOM"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+"Wybrany katalog nie istnieje.\n"
+"Chcesz go utworzyć?"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+"Tworzenie katalogu zakończone niepowodzeniem. Upewnij się czy ścieżka jest "
+"prawidłowa i masz odpowiednie uprawnienia do katalogu nadrzędnego."
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+"Wystąpił błąd przy czytaniu katalogu. Upewnij się czy masz uprawnienia "
+"zapisywania w nim."
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+msgid "Select DICOMDIR"
+msgstr "Wybierz katalog DICOM"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+"Ostrzeżenie. Aby uaktualnić katalog, należy zamknąć wszystkie otwarte serie"
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr "Stacja robocza"
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr "Parametry konfiguracyjne lokalnej stacji"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr "Rozszerzenia"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+msgid "Extensions settings"
+msgstr "Ustawienia rozszerzeń"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr ""
+"Gingko CADx musi dokonać restartu, aby zmiany w rozszerzeniach mogły "
+"zadziałać"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#, fuzzy
+msgid "Port has to be a valid number"
+msgstr "Port nie jest poprawną liczbą"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr "Ogólne"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+msgid "General configuration parameters"
+msgstr "Ogólne parametry konfiguracyjne"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr "»Ginkgo CADx« musi dokonać restartu, aby zmiany mogły zadziałać"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr "Elektroniczne dane medyczne"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr "Ustawienia systemu elektronicznych danych medycznych"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:134
+msgid "Testing conectivity with the server..."
+msgstr "Testowanie łączności z serwerem ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:144
+msgid "Error connecting to url"
+msgstr "Błąd połączenia z url"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#, fuzzy
+msgid "hostname/port not set"
+msgstr "Nazwa hosta / Port"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr "Niepowodzenie test połączenia"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr "Pomyślny test połączenia"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "Select certificate"
+msgstr "Wybierz certyfikat"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr "Pliki PEM (*.pem;*.key)|*.pem;*.key|Wszystkie pliki (*.*)|*.*"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr "Należy ustawić klucz prywatny i publiczny"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:255
+msgid "Change ..."
+msgstr "Zmień ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+msgid "Import ..."
+msgstr "Import ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:279
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr ""
+"Jeśli chcesz używać SSL/TLS, należy ustawić ważny certyfikat i klucz prywatny"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:472
+#, fuzzy
+msgid "There are this errors: "
+msgstr "Wygenerowali następujące błędy:"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+"\n"
+"- Ten PACS jest używany"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"- lokalny port musi być dodatnią krótką liczbą całkowitą (16 bitów)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+"\n"
+"- Port jest za duży"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+"\n"
+"- Maksymalna długość AET wynosi16 znaków"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+"\n"
+"- Rozmiar PDU powinien być większy lub równy zero (domyślnie = 16384)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+"\n"
+"- Maksymalna wartość PDU wynosi"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+"\n"
+"- Minimalna wartość PDU wynosi "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+"\n"
+"- Jeśli chcesz używać SSL/TLS, należy ustawić ważny certyfikat i klucz "
+"prywatny"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:525
+#, fuzzy
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+"\n"
+"- Jeśli chcesz używać SSL/TLS, należy ustawić ważny certyfikat i klucz "
+"prywatny"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr "Aby kontynuować, należy wypełnić wszystkie pola"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:558
+msgid "Testing the connection to the node ..."
+msgstr "Testowanie połączenia z węzłem ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:561
+#, fuzzy
+msgid "DICOM Error"
+msgstr "błąd"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr "Usługa nie odpowiedziała prawidłowo C-ECHO-u"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:607
+#, fuzzy
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr "Usługa nie odpowiedziała prawidłowo C-ECHO-u"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:616
+#, fuzzy
+msgid "Invalid port number"
+msgstr "Port nie jest poprawną liczbą"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:622
+#, fuzzy
+msgid "WADO Error"
+msgstr "błąd"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:703
+msgid "Use by default"
+msgstr "Użyj domyślnie"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:795
+msgid "DICOM nodes"
+msgstr "Węzły DICOM"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:800
+msgid "DICOM nodes settings"
+msgstr "Ustawienia węzłów DICOM"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr "Wygenerowali następujące błędy:"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"- lokalny port musi być dodatnią krótką liczbą całkowitą (16 bitów)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+"\n"
+"- Lokalny port jest za duży"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+"\n"
+"- Maksymalna długość AET wynosi16 znaków"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr "Potwierdź usunięcie węzła"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Należy skonfigurować lokalny AET, który uzywany jest do komunikacji z "
+"węzłami DICOM. Port, co jest istotne, musi być otwarty na firewall-u"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ..\../main/gui/export/pasosexportacionbase.cpp:20
+msgid "Profile"
+msgstr "Profil"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr "Wartość domyślna"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+msgid "Set property active"
+msgstr "Aktywuj właściwość"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr "Nieaktywny"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Set property inactive"
+msgstr "Dezaktywuj właciwość"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+msgid "Set default value"
+msgstr "Ustaw wartość domyślną"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+msgid "Set by user"
+msgstr "Ustawnione przez użytkownika"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+msgid "Profile name can't be repeated"
+msgstr "Nazwa profilu nie może się powtarzać"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr "Aby kontynuować, należy wypełnić pole \"nazwa\""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr "Profile"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+msgid "Profiles Settings"
+msgstr "Ustawienia profili"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr ""
+"Ginkgo CADx musi dokonać restartu, aby zmiany w uprawnieniach mogły zadziałać"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+msgid "Confirm the removal of the profile "
+msgstr "Potwierdź usunięcie profilu"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+msgid "New User"
+msgstr "Nowy użytkownik"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr "Nazwa uzytkownika musi zawierać przynajmniej 4 znaki"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+msgid "User name repeated"
+msgstr "Powtórzona nazwa użytkownika"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr "Hasło i jego potwierdzenie nie mogą się różnić"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+msgid "Password has to contain at least 6 characters"
+msgstr "Hasło musi zawierać przynajmniej 6 znaków"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+msgid "No login"
+msgstr "Brak loginu"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+msgid "User/Password"
+msgstr "Użytkownik/Hasło"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+msgid "Password"
+msgstr "Hasło"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+msgid "Password is setted"
+msgstr "Hasło jest ustawione"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr "Zmień hasło"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+msgid "Password is not setted"
+msgstr "Hasło jest nie ustawione"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+msgid "Set password"
+msgstr "Ustaw hasło"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+msgid "Security Setting"
+msgstr "Ustawienia bezpieczeństwa"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr "Należy utworzyć przynajmniej 1 użytkownika"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr "Należy ustawić główne hasło"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+msgid "User inserted successfully"
+msgstr "Użytkownik wstawiony pomyślnie"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr ""
+"Wystąpił błąd przy wstawianiu użytkownika. Otwórz plik logów, by uzyskać "
+"więcej informacji."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+msgid "Password changed successfully"
+msgstr "Hasło pomyślnie zmienione"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr ""
+"Wystąpił błąd przy zmianie hasła. Otówrz plik logów, by uzyskać więcej "
+"informacji."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+msgid "User deleted successfully"
+msgstr "Użytkownik usunięty pomyślnie"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr ""
+"Wystąpił błąd przy usuwaniu użytkownika. Otwórz plik logów, by uzyskać "
+"więcej informacji."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr "Ginkgo CADx musi mieć przynajmniej 1 użytkownika"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ..\../main/gui/login/dialogologin.cpp:27
+msgid "User"
+msgstr "Użytkownik"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ..\../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr "Wybierz katalog"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr "Nagłówek lokalizacji nie może się powtarzać"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+msgid "Maximum length of title is 8 characters"
+msgstr "Maksymalna długość nagłówka wynosi 8 znaków"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr "Nie można otworzyć wybranego katalogu"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr ""
+"Aby kontynuować, należy wypełnić zarówno pole \"nagłówek/tytuł\" jak i pole "
+"\"lokalizacja\""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+msgid "Title"
+msgstr "Tytuł/nagłówek"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+msgid "Path"
+msgstr "Ścieżka"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+msgid "Clean before"
+msgstr "Wyczyść po"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+msgid "Clean after"
+msgstr "Wyczyść po"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr "Lokalizacje"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+msgid "Location Settings"
+msgstr "Ustawienia lokalizacji"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr "Anonimizacja"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:96
+msgid "Anonymization settings"
+msgstr "Ustawienia anonimizacji"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1370
+msgid "Settings"
+msgstr "Ustawienia"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+#, fuzzy
+msgid "Export config..."
+msgstr "Eksportuj zdjęcia"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+#, fuzzy
+msgid "Import config..."
+msgstr "Import"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr "Zastosuj"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+msgid "Physician's name"
+msgstr "Nazwisko lekarza"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+msgid "Physician's Id"
+msgstr "Id lekarza"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+msgid "Service"
+msgstr "Usługa"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+msgid "Service's name"
+msgstr "Nazwa usługi"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+msgid "Service's Id"
+msgstr "Id usługi"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+msgid "Local institution"
+msgstr "Jednostka lokalna"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+msgid "Institution's name"
+msgstr "Nazwa jednostki"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+msgid "Institution's Id"
+msgstr "Id jednostki"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+msgid "Dicomized files"
+msgstr "Zdikomizowane pliki"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+msgid "Charset"
+msgstr "Zestaw znaków/ Strona kodowa"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr "ISO_IR 192"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr "ISO_IR 6"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr "ISO_IR 100"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr "ISO_IR 101"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr "ISO_IR 109"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr "ISO_IR 110"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr "ISO_IR 126"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr "ISO_IR 127"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr "ISO_IR 138"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr "ISO_IR 144"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+msgid "ISO_IR 148"
+msgstr "ISO_IR 148"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr "Język"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+msgid "Automatically check for updates"
+msgstr "Automatycznie sprawdzaj istnienie aktualizacji"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+msgid "Proxy settings"
+msgstr "Ustawienia proxy"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+msgid "Enable http proxy"
+msgstr "Umożliw http proxy"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+#, fuzzy
+msgid "Proxy Settings"
+msgstr "Ustawienia proxy"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+msgid "Server settings"
+msgstr "Ustawienia serwera"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+msgid "Host"
+msgstr "Host"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+msgid "Port"
+msgstr "Port"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr "Uwierzytelnienie"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr "Serwer proxy wymaga uwierzytelnienia"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+#, fuzzy
+msgid "Username"
+msgstr "Nazwa użytkownika lub hasło są nieprawidłowe"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr "Wyjątki"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+#, fuzzy
+msgid "No proxy for addresses containing"
+msgstr "Oddziel adresy przecinkami."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr "Oddziel adresy przecinkami."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+msgid "DICOM Dir"
+msgstr "Katalog DICOM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr ""
+"Katalog DICOM jest lokalnym katalogiem, gdzie przechowywana jest historia"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr "..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+"Ostrzeżenie. Aby zaktualizować katalog, należy zamknąć wszystkie otwarte "
+"serie"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+msgid "Auto-cleaning"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+msgid "MB"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ..\../main/tools/toolwindowlevel.cpp:201
+msgid "Reset to default"
+msgstr "Pwróć do ustawień domyślnych"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr "Lokalny PACS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Należy skonfigurować lokalny AET, który uzywany jest do komunikacji z "
+"serwerem PACS-a. Port, co jest istotne, musi być otwarty na firewall-u"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+msgid "Local AET"
+msgstr "Lokalny AET"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+"Dla implementacji na szeroką skalę w środowisku jednorodnym,  można "
+"wyszczególnić następujące \"dzikie karty\" na lokalnym AET:\n"
+"\t%IP Adres IP \n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr "Ustawienia zaawansowane ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+msgid "DICOM Nodes"
+msgstr "Węzły DICOM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+msgid "New ..."
+msgstr "Nowy ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+msgid "Edit ..."
+msgstr "Edytuj ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete"
+msgstr "Usuń"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+msgid "Set Default"
+msgstr "Ustaw domyślnie"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+msgid "DICOM Node"
+msgstr "Węzeł DICOM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr "AET"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+#, fuzzy
+msgid "PDU (KB)"
+msgstr "Żądany moduł nie jest zarejestrowany"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+msgid "Retrieve method"
+msgstr "Metoda odbioru"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Move"
+msgstr "Przenieś"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Get"
+msgstr "Pobierz"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+#, fuzzy
+msgid "WADO URL"
+msgstr "URL do wsparcia online"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+msgid "Retrieve mode"
+msgstr "Tryb odbioru"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ..\../main/gui/import/pasosimportacionbase.cpp:319
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1395
+msgid "Series"
+msgstr "Seria"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+msgid "Studies"
+msgstr "Badania"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr "Połącz się ponownie"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+#, fuzzy
+msgid "Worklists"
+msgstr "Stacja robocza"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+#, fuzzy
+msgid "Select how do you want to handle MPPS items"
+msgstr "Wybierz pliki DICOM, które chcesz pobrać"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+#, fuzzy
+msgid "DICOM MPPS"
+msgstr "Węzły DICOM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+#, fuzzy
+msgid "HL7 messages"
+msgstr "Komunikaty"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+#, fuzzy
+msgid "HL7"
+msgstr "Usługa HL7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+#, fuzzy
+msgid "Abort message"
+msgstr "Komunikat"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+#, fuzzy
+msgid "Completed message"
+msgstr "Eksport pomyślnie zakończony"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+#, fuzzy
+msgid "In progress message"
+msgstr "Komunikat"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+#, fuzzy
+msgid "Default values"
+msgstr "Domyślny"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+#, fuzzy
+msgid "Worklist"
+msgstr "Stacja robocza"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+msgid "SSL/TLS"
+msgstr "SSL/TLS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+#, fuzzy
+msgid "Verify server credentials"
+msgstr "Serwer"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+msgid "Use SSL/TLS"
+msgstr "Użyj SSL/TLS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr "Certyfikat"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+msgid "Certificate to use in this connection"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr "Konfiguracja zaawansowana ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+#, fuzzy
+msgid "Default charset"
+msgstr "Zestaw znaków/ Strona kodowa"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+msgid "Advanced"
+msgstr "Zaawansowane"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr "Połączenie testowe"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+msgid "Local AET certificate"
+msgstr "Certyfikat lokalnego AET"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+msgid "Certificate used by Ginkgo CADx"
+msgstr "Certyfikat stosowany przez Ginkgo CADx"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr "Id aplikacji Gingo CADx użyte do wypełnienia pól MSH.3"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+msgid "Receiver organization Id"
+msgstr "Id jednostki odbiorczej"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr "Unikalny identyfikator jednostki otrzymującej komunikat"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+#, fuzzy
+msgid "Petitioner System Id"
+msgstr "Id"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr "Unikalny identyfikator systemu odbiorczego"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+#, fuzzy
+msgid "Filler Application Id"
+msgstr "oczekiwane jest id aplikacji"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+msgid "Ginkgo CADx Application Id"
+msgstr "Id aplikacji Ginkgo CADx"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+"Unikalny identyfikator Systemu Komunikacji i Archiwizacji Obrazu (SIID/PACS)."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+msgid "Integration engine"
+msgstr "Maszyna integrująca"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+msgid "Hostname / Port"
+msgstr "Nazwa hosta / Port"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr "Nazwa  (IP lub DNS) maszyny integrującej"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr "/"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+#, fuzzy
+msgid "Protocol"
+msgstr "Nieznany protokół"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ..\../main/gui/export/pasosexportacionbase.cpp:28
+msgid "Format"
+msgstr "Format"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+msgid "Message's format"
+msgstr "Format komunikatu"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr "ER7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+msgid "Test engine"
+msgstr "Maszyna testowa"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+#, fuzzy
+msgid "Test Integration Engine connectivity"
+msgstr "Maszyna testowa"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+msgid "Ginkgo Extension Title"
+msgstr "Nagłówek rozszerzenia Ginkgo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+msgid "Edit public key"
+msgstr "Edytuj klucz publiczny"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr ""
+"Użyj domyślnego certyfikatu (certyfikat skonfigurowany w ustawieniach "
+"lokalnego AET)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+msgid "Public key"
+msgstr "Klucz publiczny"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+msgid "Public key in PEM format"
+msgstr "Klucz publiczny w formacie PEM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+msgid "Load ..."
+msgstr "Ładuj ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+msgid "Private key"
+msgstr "Klucz prywatny"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+msgid "Private key in PEM format"
+msgstr "Klucz prywatny w formacie PEM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+msgid "Profile name"
+msgstr "Nazwa profilu"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+msgid "Set active"
+msgstr "Uaktywnij"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr ""
+"Lokalizacje to wcześniej zdefiniowane, dobrze znane lub często używane, "
+"ścieżki (np. udostępniony dysk sieciowy)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+msgid "Configure location"
+msgstr "Skonfiguruj lokalizację"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+msgid "Location"
+msgstr "Lokalizacja"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr "Wyczyść katalog po dikomizacji"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr "Wyczyść katalog przed dikomizacja"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+msgid "Security type"
+msgstr "Rodzaj bezpieczeństwa"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr "Użytkownicy"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+msgid "Change Password ..."
+msgstr "Zmień hasło ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+msgid "Set main password"
+msgstr "Ustaw główne hasło"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+msgid "Set Password"
+msgstr "Ustaw hasło"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+msgid "Edit User"
+msgstr "Edytuj użytkownika"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+msgid "User Name"
+msgstr "Nazwa użytkownika"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+msgid "Confirm Password"
+msgstr "Potwierdź hasło"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+msgid "Properties"
+msgstr "Właściwości"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+#, fuzzy
+msgid "Edit corner annotations"
+msgstr "Ukryj adnotacje narożne"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue}  where GGGG is the tag's group in hexadecimal and EEEE is the "
+"tag's element."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+#, fuzzy
+msgid "Window/level"
+msgstr "Poziom"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr "Dodaj"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ..\../main/gui/history3/historytoolmenu.cpp:149
+#: ..\../widgets/gui/selecciontextobase.h:58
+#, fuzzy
+msgid "Edit"
+msgstr "Edytuj ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+#, fuzzy
+msgid "Default Window/Level"
+msgstr "Poziom"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+#, fuzzy
+msgid "Corner annotations"
+msgstr "Ukryj adnotacje narożne"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+#, fuzzy
+msgid "Setup corner annotations"
+msgstr "Ukryj adnotacje narożne"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+#, fuzzy
+msgid "Setup..."
+msgstr "Ustawienie strony ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+#, fuzzy
+msgid "Other settings"
+msgstr "Inne"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+#, fuzzy
+msgid "Interpolate pixel data"
+msgstr "Dane"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+#, fuzzy
+msgid "Hanging protocol"
+msgstr "Nieznany protokół"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+#, fuzzy
+msgid "Opening mode"
+msgstr "Tryb odbioru"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+#, fuzzy
+msgid "Study opening criteria"
+msgstr "Badanie"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+#, fuzzy
+msgid "Workspace"
+msgstr "Stacja robocza"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+#, fuzzy
+msgid "Enable/Disable"
+msgstr "Umożliw zdalną konfigurację PACS-a"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+#, fuzzy
+msgid "Top left corner annotations"
+msgstr "Ukryj adnotacje narożne"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+#, fuzzy
+msgid "Setup window"
+msgstr "Zamknij wszystkie okna"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+#, fuzzy
+msgid "Set default"
+msgstr "Ustaw domyślnie"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+#, fuzzy
+msgid "Open in main window"
+msgstr "Ustaw główne hasło"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+#, fuzzy
+msgid "Setup position..."
+msgstr "Poycja (I)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+msgid "Setup undocked window position"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+#, fuzzy
+msgid "Layout"
+msgstr "Układ 1x1"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+#, fuzzy
+msgid "Current layout"
+msgstr "Bieżący"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+#, fuzzy
+msgid "Columns"
+msgstr "Siatka (2 kolumny)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+#, fuzzy
+msgid "Series criteria"
+msgstr "Seria"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+#, fuzzy
+msgid "Select opening mode"
+msgstr "Tryb odbioru"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+#, fuzzy
+msgid "Tag"
+msgstr "Przeczytano zakładkę \"pacjent\" bez identyfikatorów"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+msgid "Save"
+msgstr "Zapisz"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+#, fuzzy
+msgid "Enable background queries"
+msgstr "Umożliw zdalną konfigurację PACS-a"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+#, fuzzy
+msgid "Smart retrieve"
+msgstr "Metoda odbioru"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+#, fuzzy
+msgid "Smart retrieve settings"
+msgstr "Ustawienia"
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr "Wykryty brak aktywności"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.h:64
+#, fuzzy
+msgid "Export DICOM"
+msgstr "Eksportuj do katalogu DICOM"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr "Lekarz kierujący"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+msgid "Ginkgo CADx private tags"
+msgstr "Prywatne tagi Ginkgo CADx"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ..\../main/gui/history3/historypanel3.cpp:340
+#: ..\../main/gui/history3/historytoolmenu.cpp:158
+#, fuzzy
+msgid "Export"
+msgstr "Eksportuj zdjęcia"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ..\../main/gui/export/parametrosprincipales.cpp:157
+msgid "Select the directory where the files will be stored"
+msgstr "Wybierz katalog, w którym pliki zostaną zapisane"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+"Wybrany katalog nie istnieje.\n"
+"Chcesz go utworzyć?"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr "W wybranej ścieżce istnieje inny katalog DICOM"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#, fuzzy
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+"Wystąpił błąd przy czytaniu katalogu. Upewnij się czy masz uprawnienia "
+"zapisywania w nim."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+#, fuzzy
+msgid "Select the DICOM Dir folder"
+msgstr "Wybierz plik DICOM"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+#, fuzzy
+msgid "DICOM Dir migration"
+msgstr "Katalog DICOM"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+#, fuzzy
+msgid "Migrate existing (recommended)"
+msgstr "Istniejący plik"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+#, fuzzy
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+"Wersja DICOM  Ginkgo CADx jest stara, baza danych zostanie przeniesiona do "
+"nowej wersji, prosze nie zamykać Ginkgo CADx dopóki migracja nie zostanie "
+"zakończona."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+#, fuzzy
+msgid "Continue..."
+msgstr "Kontynuuj"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+#, fuzzy
+msgid "Select other"
+msgstr "Inne"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+msgid "Browse..."
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:106
+msgid "DICOM Export"
+msgstr "Eksport DICOM"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:110
+msgid "Select the format and the images you want to export"
+msgstr "Wybierz do eksportu pliki i ich format "
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:143
+#, fuzzy
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr "Pliki PEM (*.pem;*.key)|*.pem;*.key|Wszystkie pliki (*.*)|*.*"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:150
+#, fuzzy
+msgid "Select file"
+msgstr "Wybierz plik DICOM"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "DICOM (native format)"
+msgstr "DICOM (format oryginalny)"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "Image (jpg, bmp, png)"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:38
+#, fuzzy
+msgid "Export all files of opened tab"
+msgstr "Eksportowanie pliku %d z %d"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:55
+msgid "JPEG"
+msgstr "JPEG"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr "Jakość"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:40
+msgid "Image Export Wizard"
+msgstr "Asystent eksportu zdjęć"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ..\../main/gui/license/aboutdialogbase.cpp:67
+#: ..\../main/gui/license/aboutdialogbase.cpp:151
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:54
+msgid "&Accept"
+msgstr "&Zaakceptuj"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr "&Dalej >"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+#, fuzzy
+msgid "Open link"
+msgstr "Otwórz"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+#, fuzzy
+msgid "File link:"
+msgstr "Plik"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ..\../main/gui/import/pasosimportacionbase.cpp:270
+msgid "Study"
+msgstr "Badanie"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+msgid "User name"
+msgstr "Nazwa uzytkownika"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+#, fuzzy
+msgid "Ginkgo Cloud link"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+msgid "Copy to clipboard"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+#, fuzzy
+msgid "New Ginkgo Cloud study"
+msgstr "Ściągnij badanie"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+#, fuzzy
+msgid "To download the study, paste this url "
+msgstr "Ściągnij badanie"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+#, fuzzy
+msgid "Creator"
+msgstr "Data utworzenia"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+#, fuzzy
+msgid "Last Modificator"
+msgstr "Ostatnie 7 dni"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+#, fuzzy
+msgid "Show link..."
+msgstr "Pokaż przy starcie"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+msgid "Invalid link"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:117
+#: ..\../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr "Otwórz serię"
+
+#: ..\../main/gui/history3/historypanel3.cpp:119
+#: ..\../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr "Otwórz serię za pomocą ..."
+
+#: ..\../main/gui/history3/historypanel3.cpp:226
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr "Wiek"
+
+#: ..\../main/gui/history3/historypanel3.cpp:228
+#, fuzzy
+msgid "Date acquired"
+msgstr "Data badania"
+
+#: ..\../main/gui/history3/historypanel3.cpp:230
+#, fuzzy
+msgid "Date added"
+msgstr "Data badania"
+
+#: ..\../main/gui/history3/historypanel3.cpp:308
+#: ..\../main/gui/history3/historytoolmenu.cpp:82
+#: ..\../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr "Pobierz"
+
+#: ..\../main/gui/history3/historypanel3.cpp:316
+#: ..\../main/tools/dicomizetool.cpp:28
+#, fuzzy
+msgid "Dicomize"
+msgstr "Automatycznie zamknij Ginkgo CADx po dikomizacji"
+
+#: ..\../main/gui/history3/historypanel3.cpp:363
+msgid "All patients"
+msgstr "Wszyscy pacjenci"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+msgid "Results"
+msgstr "Wyniki"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, fuzzy, c-format
+msgid " (%d images)"
+msgstr "Eksportuj zdjęcia"
+
+#: ..\../main/gui/history3/historypanel3.cpp:634
+#, fuzzy
+msgid "Open study with .."
+msgstr "Otwórz"
+
+#: ..\../main/gui/history3/historypanel3.cpp:663
+#: ..\../main/gui/history3/historypanel3base.cpp:482
+msgid "Synchronize"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:677
+msgid "&Delete from history"
+msgstr "&Usuń z Historii"
+
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#, fuzzy
+msgid "&Clear history"
+msgstr "Wyczyść"
+
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr ""
+"Otwarta została maksymalna możliwa liczba zakładek. Zamknij kilka i spróbuj "
+"ponownie."
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid "Unable to open modality "
+msgstr "Nie można otworzyć rodzaju badania"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr "ze składnią transferu"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr "Niepowodzenie w opróżnieniu historii, trzeba zamknąć otwarte badania"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1086
+msgid "all files"
+msgstr "wszystkie pliki"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#, fuzzy
+msgid "Select at least one series"
+msgstr "Należy wybrać przynajmniej 1 zdjęcie"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr "Nie można usunąć otwartej serii"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+#, fuzzy
+msgid "those series"
+msgstr "Seria"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+#, fuzzy
+msgid "this series"
+msgstr "Seria"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:57
+#, fuzzy
+msgid "Advanced search"
+msgstr "Zaawansowane"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:73
+#, fuzzy
+msgid "Acquisition date"
+msgstr "Data badania"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:302
+#: ..\../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr "Potwierdź usunięcie"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr "Czy na pewno chcesz usunąć"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:336
+#: ..\../main/gui/history3/historytoolmenu.cpp:102
+#: ..\../main/gui/history3/historytoolmenu.cpp:200
+#: ..\../main/gui/history3/historytoolmenu.cpp:229
+msgid "Remove"
+msgstr "Usuń"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr "Wybierz widok, w którym chcesz otwierać pliki"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr "Zawsze używaj tego widoku do otwierania tego rodzaju plików"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:454
+#: ..\../main/gui/history3/historypanel3base.h:187
+#, fuzzy
+msgid "Synchronize files"
+msgstr "Ściąganie plików ..."
+
+#: ..\../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+
+#: ..\../main/gui/history3/historytablemodel.cpp:406
+#: ..\../main/gui/history3/historytablemodel.cpp:418
+#: ..\../main/gui/history3/historytablemodel.cpp:473
+#: ..\../main/gui/history3/historytablemodel.cpp:485
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:105
+#, fuzzy
+msgid "00/00/0000 00:00:00"
+msgstr "%m/%d/%Y 00:00:00"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:138
+#, fuzzy
+msgid "Close history"
+msgstr "&Wyszyść Historię"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:139
+#: ..\../main/gui/startup/startupform.cpp:53
+#, fuzzy
+msgid "History"
+msgstr "Zapisywanie w Historii ..."
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:201
+#: ..\../main/gui/history3/historytoolmenu.cpp:230
+#, fuzzy
+msgid "Clear history"
+msgstr "Wyczyść"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:232
+#, fuzzy
+msgid "Select all"
+msgstr "Wszyscy"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:233
+#, fuzzy
+msgid "Deselect all"
+msgstr "Wszyscy"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+msgid "Destination"
+msgstr "Przeznaczenie"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+msgid "Status"
+msgstr "Status"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+msgid "Error message"
+msgstr "Komunikat o błędzie"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+msgid "Show Message"
+msgstr "Pokaż komunikat"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+msgid "Edit Message"
+msgstr "Edytuj komunikat"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+msgid "Delete message"
+msgstr "Usuń komunikat"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+msgid "Error editing message"
+msgstr "Błąd edycji komunikatu"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+#, fuzzy
+msgid "Error purguing messages"
+msgstr "Błąd usuwania komunikatu"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Stop"
+msgstr "Zatrzymaj"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Sent"
+msgstr "Wysłane"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr "W toku"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/progress/statusbarprogreso.cpp:281
+msgid "Warning"
+msgstr "Ostrzeżenie"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+msgid "Error getting message"
+msgstr "Błąd pobierania komunikatu"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+msgid "Running"
+msgstr "Działa"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr "Zatrzymany"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+msgid "Usually due to an error in sending a message"
+msgstr "Zwykle z powodu błędu w wysyłaniu komunikatu"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Start"
+msgstr "Zacznij"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr "Czy chcesz usunąć te komunikaty?"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+msgid "Error deleting messages"
+msgstr "Błąd usuwania komunikatu"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+msgid "Remove sent messages"
+msgstr "Usuń wysłane komunikaty"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+msgid "Exit"
+msgstr "Wyjście"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+msgid "Messages"
+msgstr "Komunikaty"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+msgid "Refresh"
+msgstr "Odśwież"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1394
+msgid "View"
+msgstr "Widok"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+msgid "Send task status:"
+msgstr "Status zadania wysyłania:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr "Uaktywniony"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+msgid "Message"
+msgstr "Komunikat"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr "Data:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+msgid "Destination:"
+msgstr "Przeznaczenie:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+msgid "Status:"
+msgstr "Status:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+msgid "Message content:"
+msgstr "Zawartość komunikatu: "
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:142
+msgid "OK"
+msgstr "OK"
+
+#: ..\../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr "Przegląd plików DICOM"
+
+#: ..\../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:210
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+"\n"
+"* Wymagane jest id pacjenta"
+
+#: ..\../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+"\n"
+"* Konkatenacja imienia i nazwiska pacjenta nie powinna być większa niż 61 "
+"znaków."
+
+#: ..\../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+"\n"
+"* Format wzrostu w centymetrach nie jest poprawny. "
+
+#: ..\../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+"\n"
+"* Pacjent urodził się po dacie badania"
+
+#: ..\../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+"\n"
+"* Format wagi jest niepoprawny. Waga powinna zawierać się w przedziale od 0 "
+"do 400 Kg."
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr "Podczas walidacji pół wystąpiły następujące błędy"
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "Error validating fields"
+msgstr "Błąd walidacji pól"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:148
+msgid "Selecting Import Profile"
+msgstr "Wybieranie profilu importu"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:152
+msgid "You must select the profile you want to use import"
+msgstr "Należy wybrać profil, którego chcemy użyć w imporcie"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+msgid "You must select the import profile"
+msgstr "Należy wybrać profil importu"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr "Niespodziewany błąd, ponownie wybierz moduł"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:21
+msgid "Selected images"
+msgstr "Wybrane zdjęcia"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:56
+msgid "Preview"
+msgstr "Podgląd"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:62
+msgid "Remove all"
+msgstr "Usuń wszystko"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:113
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:65
+msgid "Demographic data"
+msgstr "Dane demograficzne"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr "Identifikator *"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr "(Id numer historii choroby)"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:159
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "Birth date"
+msgstr "Data urodzin"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr "Imię"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr "Płeć"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr "Mężczyzna"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr "Kobieta"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr "Inni"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:217
+msgid "Study Details"
+msgstr "Szczegóły badania"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:234
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:122
+msgid "Weight"
+msgstr "Waga"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:245
+msgid "Kg"
+msgstr "Kg"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:252
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:119
+msgid "Height"
+msgstr "Wzrost"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr "cm"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:291
+#: ..\../main/gui/import/pasosimportacionbase.cpp:333
+msgid "Time"
+msgstr "Czas"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr "Ścieżka lokalizacji nie istnieje"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+"Zdjęcia (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Zdjęcia (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Zdjęcia "
+"(*.bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Zdjęcia (*.tif;*.tiff)|*.tif;*."
+"tiff|Dokumenty PDF (*.pdf)|*.pdf|Wszystkie pliki(*.*)|*.*"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+"Zdjęcia (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Zdjęcia (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Zdjęcia "
+"(*.bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Zdjęcia (*.tif;*.tiff)|*.tif;*."
+"tiff|Dokumenty PDF (*.pdf)|*.pdf|Wszystkie pliki(*.*)|*.*"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files..."
+msgstr "Wybierz pliki ..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr "Wybierz plik z systemu plików"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+#, fuzzy
+msgid "Paste from clipboard"
+msgstr "Pobierz zdjęcia z PACS-a"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr "Z powrotem"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr "Czy na pewno chcesz usunąć ten plik z dysku?"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:330
+msgid "Delete selected items"
+msgstr "Usuń wybrane pozycje"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+msgid "You must select an image"
+msgstr "Należy wybrać zdjęcie"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:346
+msgid "Generating preview..."
+msgstr "Tworzenie podglądu ..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:500
+msgid "Select images"
+msgstr "Wybierz zdjęcia"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr "Tworzenie miniaturek ..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:715
+msgid "Image selection"
+msgstr "Wybór zdjęcia"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr "Należy wybrać zdjęcia, które chcemy zaimportować"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr "Należy wybrać przynajmniej 1 zdjęcie"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:760
+msgid "The file"
+msgstr "Plik"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr "nie istnieje"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:52
+msgid "Image Import Wizard"
+msgstr "Asystent importu zdjęć"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr "Żądany moduł nie obsługuje importu"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr "Nie ma żadnego zarejestrowanego modułu z obsługą importu"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr "Nie ma modułów obsługujących import"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr "Żądany moduł nie jest zarejestrowany"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr "Żądany moduł nie jest zarejestrowany"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:167
+msgid "free of"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:181
+#, fuzzy
+msgid "in dicomization dir."
+msgstr "Dikomizacja XML"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr "Czy na pewno chcesz anulować proces importu?"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, c-format
+msgid "Step %d of %d: "
+msgstr "Etap %d z %d: "
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr "&Zakończ"
+
+#: ..\../main/gui/license/aboutdialog.cpp:25
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+#, fuzzy
+msgid "About"
+msgstr "Przypomnij o najnowszych aktualizacjach Ginkgo CADx"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:22
+msgid "Ginkgo CADx"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr "Współtwórcy"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:55
+msgid "Licenses"
+msgstr "Licencje"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:58
+msgid "UPDATE_INFO"
+msgstr "Info o aktualizacji"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:108
+#: ..\../main/gui/license/aboutdialogbase.h:88
+msgid "Open Source Licenses"
+msgstr "Otwórz licencje źródłowe"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr "Kair"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:119
+msgid "FamFamFam Icons"
+msgstr "Ikony FamFamFam"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:120
+msgid "Fugue Icons"
+msgstr "Ikony Fugue"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr "LibJpeg"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr "LibPng"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr "OtwórzSSL"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:126
+msgid "WxWidgets"
+msgstr "GxGadżety"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:127
+msgid "Zlib"
+msgstr "Zlib"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr "SQL Lite"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:130
+#, fuzzy
+msgid "Dark Glass Icons"
+msgstr "Ikony FamFamFam"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ..\../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr "Umowa licencyjna"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+"Jeśli akceptujesz warunki umowy, kliknij \"Akceptuję licencję\", aby "
+"kontynuować. Musisz zaakceptować licencję, by korzystać z Ginkgo CADx."
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:53
+msgid "Check for updates automatically"
+msgstr "Automatycznie sprawdzaj istnienie aktualizacji"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:66
+msgid "I Accept the license"
+msgstr "Akceptuję licencję"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr "Nie akceptuję licencji"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Save logs"
+msgstr "Zapisz logi"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr "Plik logu (*.log) | *.log | Plik tekstowy (*.txt) | *.txt"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+msgid "File couldn't be stored "
+msgstr "Plik nie może zostać zapisany"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+msgid "Could not write to file"
+msgstr "Nie można zapisać do pliku"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+msgid "Save log..."
+msgstr "Zapisz log ..."
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+msgid "Clear log"
+msgstr "Wyczyść log"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+msgid "Log"
+msgstr "Log"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr "Wyczyść"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr ""
+
+#: ..\../main/gui/login/dialogologin.cpp:50
+msgid "The username or password is incorrect"
+msgstr "Nazwa użytkownika lub hasło są nieprawidłowe"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:250
+msgid "Tasks"
+msgstr "Zadania"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1139
+msgid "Included in the history ..."
+msgstr "Zawarty w historii"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr "Brak adresu URL do sprawdzania aktualizacji w bieżącej konfiguracji."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "Check update error"
+msgstr "Błąd przy sprawdzaniu istnienia aktualizacji"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+msgid "Malformed XML"
+msgstr "Zły format XML"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1192
+#, fuzzy
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr ""
+"Błąd interpretacji parametrów linii komend. Plik lub katalog nie istnieje"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#, fuzzy
+msgid "Error parsing integration XML:\n"
+msgstr "Błąd wewnętrzny parsowania XML"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+msgid "PACS error:\n"
+msgstr "PACS błąd:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#, fuzzy
+msgid "Error executing WorkFlow\n"
+msgstr "Błąd przy tworzeniu bazy danych:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#, fuzzy
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+"Nie można wczytać do PACS-a:\n"
+"błąd wewnętrzny"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+msgid "Close current view"
+msgstr "Zamknij bieżący widok"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all"
+msgstr "Zamknij wszystko"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all views"
+msgstr "Zamknij wszystkie widoki"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr "&Wyjście"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "Exit application"
+msgstr "Zakończ aplikację"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr "Pełny ekran"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Show full screen"
+msgstr "Pokaż pełny ekran"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1302
+msgid "Tab grouping"
+msgstr "Grupowanie zakładek"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1329
+#, fuzzy
+msgid "Ginkgo CADx manual ..."
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1330
+#, fuzzy
+msgid "Open test card"
+msgstr "Połączenie testowe"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr "Sprawdź istnienie aktualizacji"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for newest versions"
+msgstr "Sprawdź istnienie najnowszych wersji"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1332
+msgid "Need support ..."
+msgstr "Potrzeba wsparcia ..."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+#, fuzzy
+msgid "About "
+msgstr "Przypomnij o najnowszych aktualizacjach Ginkgo CADx"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+msgid "HL7 monitor"
+msgstr "Monitor HL7"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#, fuzzy
+msgid "HL7 message control"
+msgstr "Wyślij komunikat HL7 podczas importu"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+msgid "Log monitor"
+msgstr "Monitor logów"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+msgid "Log monitored"
+msgstr "Monitorowany log"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1390
+msgid "&File"
+msgstr "&Plik"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr "&Edytuj"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr "&Pomoc"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr "Mozaika"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr "Czy chcesz zachować zmiany w badaniu?"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1664
+msgid "Unsaved data"
+msgstr "Niezapisane dane"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr ""
+"Wystąpiły błędy podczas zapisu serii.\n"
+"Czy chcesz kontynuować zamykanie?"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid "Error saving"
+msgstr "Błąd przy zapisie"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "Full Screen"
+msgstr "Pełny ekran"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "View Full Screen"
+msgstr "Podgląd całego ekranu"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1708
+msgid "Tab Regroup"
+msgstr "Przegrupowanie zakładek"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr "&Zamknij"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "&Close all"
+msgstr "&Zamknij wszystko"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "Close all windows"
+msgstr "Zamknij wszystkie okna"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1728
+msgid "Tabbed organization"
+msgstr "Układ zakładek"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr "Obecnie nie ma najnowszych wersji Ginkgo CADx."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "Ginkgo CADx updated"
+msgstr "Ginkgo CADx uaktualniony"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1782
+msgid "New version available ("
+msgstr "Dostępna nowa wersja ("
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr "Błąd wewnętrzny podczas procesu uwierzytelniania"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+msgid "New Update"
+msgstr "Nowy plik aktualizacji"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+msgid "New version available"
+msgstr "Dostępna nowa wersja"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr "Nie przypominaj ponownie o tej aktualizacji"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+msgid "X"
+msgstr "X"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+#, fuzzy
+msgid "Close this notification"
+msgstr "Zamknij"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+#, fuzzy
+msgid "The following commands will be aborted if you close the application"
+msgstr "Jeśli zamkniesz aplikację, następujące komendy zostaną przerwane:"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+msgid "Close Ginkgo CADx"
+msgstr "Zamknij  Ginkgo CADx"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr "Zamyka aplikację i przerywa komendy w toku"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr "Nie zamykaj aplikacji i kontynuuj wykonywanie komend"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:138
+msgid "User login"
+msgstr "Login użytkownika"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+msgid "System authentication"
+msgstr "Uwierzytelnianie systemu"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+msgid "Login"
+msgstr "Login"
+
+#: ..\../main/gui/open/abrir.cpp:80 ..\../main/gui/open/abrir.cpp:82
+msgid "Open..."
+msgstr "Otwórz..."
+
+#: ..\../main/gui/open/opendialogs.cpp:58
+#, fuzzy
+msgid "There was an error reading DICOMDIR file"
+msgstr "Wybierz plik DICOM"
+
+#: ..\../main/gui/open/opendialogs.cpp:62
+msgid "Select a valid DICOMDIR file"
+msgstr "Wybierz plik DICOM"
+
+#: ..\../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr "Wybierz pliki DICOM, które chcesz pobrać"
+
+#: ..\../main/gui/open/opendialogs.cpp:180
+#: ..\../main/gui/open/opendialogsbase.cpp:170
+#: ..\../main/gui/open/opendialogsbase.h:112
+msgid "Copy or link"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:22
+#: ..\../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr "Pobierz z katalogu DICOM"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:94
+#: ..\../main/gui/open/opendialogsbase.h:85
+msgid "Select drive"
+msgstr "Wybierz napęd"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:175
+#, fuzzy
+msgid "Do you want to copy or link files?"
+msgstr "Wybierz widok, w którym chcesz otwierać pliki"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ..\../main/gui/selectpacsserver/selectpacsserver.cpp:30
+#, fuzzy
+msgid "There aren't any PACS configured"
+msgstr "Nie ma żadnego skonfigurowanego PACS-a"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:69
+#, fuzzy
+msgid "0000/00/00 00:00:00"
+msgstr "%m/%d/%Y 00:00:00"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.h:57
+#, fuzzy
+msgid "Upload study"
+msgstr "Wczytaj zdjęcia do serwera PACS-a"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+#, fuzzy
+msgid "Select PACS server"
+msgstr "Wybierz serwer PACS-a"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:119
+msgid "Metadata"
+msgstr "Metadane"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:120
+msgid "Identification information"
+msgstr "Informacja identyfikacyjna"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:121
+msgid "Patient information"
+msgstr "Informacja o pacjencie"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:122
+msgid "Acquisition information"
+msgstr "Informacja o pobieraniu"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:123
+msgid "Relationship information"
+msgstr "Informacja o powiązaniach"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:124
+msgid "Image presentation information"
+msgstr "Informacja o sposobie prezentacji zdjęcia"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:125 ..\../widgets/wtextbox.cpp:525
+msgid "Text"
+msgstr "Tekst"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:126
+msgid "Other"
+msgstr "Inne"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:137
+#: ..\../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr "Dane"
+
+#: ..\../main/gui/previewpanel/previewpanel.cpp:47
+msgid "Hide"
+msgstr "Ukryj"
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:207
+#, fuzzy
+msgid "Previews"
+msgstr "Podgląd"
+
+#: ..\../main/gui/progress/progresobase.cpp:23
+msgid "There is no running tasks"
+msgstr "Nie ma zadań w toku"
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:165
+msgid "0 running tasks."
+msgstr "0 zadań w toku."
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:192
+#, c-format
+msgid "There are %d pending tasks"
+msgstr "Jest %d zadań w toku"
+
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.h:55
+#, fuzzy
+msgid "Select PACS"
+msgstr "Wybierz serwer PACS-a"
+
+#: ..\../main/gui/startup/startupformbase.cpp:29
+#, fuzzy
+msgid "http://ginkgo-cadx.com"
+msgstr "Umożliw http proxy"
+
+#: ..\../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:47
+#, fuzzy
+msgid "Ginkgo CADx Pro"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr "Projekt prowadzony i rozwijany przez"
+
+#: ..\../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr "MetaEmotion Healthcare"
+
+#: ..\../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr "Strona startowa"
+
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete Widget"
+msgstr "Usuń gadżet"
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Properties ..."
+msgstr "Właściwości ..."
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Widget Properties"
+msgstr "Właściwości gadżetu"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:114
+msgid "Open file"
+msgstr "Otwórz plik"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:115
+#: ..\../main/tools/openfoldertool.cpp:27
+msgid "Open folder"
+msgstr "Otwórz katalog"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:116
+#: ..\../main/tools/openremovabletool.cpp:28
+msgid "Open removable unit"
+msgstr "Otwórz nośnik wymienny"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:117
+#: ..\../main/tools/openginkgocloudlinktool.cpp:27
+msgid "Open Ginkgo Cloud link"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr "Kąt standardowy (3 punkty)"
+
+#: ..\../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr "Kąt Cobb-a (2 proste linie)"
+
+#: ..\../main/tools/colormaptool.cpp:110
+#, fuzzy
+msgid "Invert color map"
+msgstr "Kolor"
+
+#: ..\../main/tools/cornerannotationstool.cpp:44
+msgid "Hide corner annotations"
+msgstr "Ukryj adnotacje narożne"
+
+#: ..\../main/tools/cornerannotationstool.cpp:46
+msgid "Show corner annotations"
+msgstr "Pokaż adnotacje narożne"
+
+#: ..\../main/tools/detachwindowtool.cpp:42
+#, fuzzy
+msgid "Attach View"
+msgstr "Widok"
+
+#: ..\../main/tools/detachwindowtool.cpp:44
+#, fuzzy
+msgid "Detach view"
+msgstr "Widok"
+
+#: ..\../main/tools/dicomizetool.cpp:28
+#, fuzzy
+msgid "Dicomize files"
+msgstr "Zdikomizowane pliki"
+
+#: ..\../main/tools/exportdicomdirtool.cpp:32
+msgid "Export to DICOM Dir"
+msgstr "Eksportuj do katalogu DICOM"
+
+#: ..\../main/tools/markertool.cpp:171
+msgid "Point"
+msgstr "Punkt"
+
+#: ..\../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr "Strzałka"
+
+#: ..\../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr "Elipsa"
+
+#: ..\../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr "Trapezoid"
+
+#: ..\../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr "Wielokąt"
+
+#: ..\../main/tools/markertool.cpp:176
+msgid "Free form"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:57
+msgid "Grid"
+msgstr "Siatka"
+
+#: ..\../main/tools/metricgridtool.cpp:67
+msgid "Grid Scale"
+msgstr "Skala siatki"
+
+#: ..\../main/tools/metricgridtool.cpp:74
+msgid "Scale X"
+msgstr "Skala X"
+
+#: ..\../main/tools/metricgridtool.cpp:78
+msgid "X axis scale"
+msgstr "Skala osi X"
+
+#: ..\../main/tools/metricgridtool.cpp:87
+msgid "Scale Y"
+msgstr "Skala Y"
+
+#: ..\../main/tools/metricgridtool.cpp:91
+msgid "Y axis scale"
+msgstr "Skala osi Y"
+
+#: ..\../main/tools/metricgridtool.cpp:206
+msgid "Show grid"
+msgstr "Pokaż siatkę"
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr "Skonfiguruj siatkę..."
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr "Skonfiguruj siatkę"
+
+#: ..\../main/tools/metricgridtool.cpp:250
+msgid "Hide Grid"
+msgstr "Ukryj siatką"
+
+#: ..\../main/tools/metricgridtool.cpp:252
+msgid "Show Grid"
+msgstr "Pokaż siatkę"
+
+#: ..\../main/tools/openfiletool.cpp:28
+msgid "Open File"
+msgstr "Otwórz plik"
+
+#: ..\../main/tools/pacsuploadtool.cpp:54
+#, fuzzy
+msgid "Send to PACS..."
+msgstr "Wyślij do PACS-a"
+
+#: ..\../main/tools/pixelsbluringtool.cpp:59
+#, fuzzy
+msgid "Unset pixels blurring"
+msgstr "Brak ustawienia rozmycia pikseli"
+
+#: ..\../main/tools/pixelsbluringtool.cpp:61
+#, fuzzy
+msgid "Set pixels blurring"
+msgstr "Ustawnione przez użytkownika"
+
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#, fuzzy
+msgid "PACS Q/R"
+msgstr "PACS"
+
+#: ..\../main/tools/queryretrievetool.cpp:94
+#: ..\../main/tools/searchginkgocloudhistorytool.cpp:28
+#, fuzzy
+msgid "Search Ginkgo Cloud"
+msgstr "Szukaj"
+
+#: ..\../main/tools/rotateandfliptool.cpp:151
+#, fuzzy
+msgid "Undo rotate and flip"
+msgstr "Cofnij"
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:156
+#, fuzzy
+msgid "Flip horizontal"
+msgstr "Ułóż obrazki w poziomie"
+
+#: ..\../main/tools/rotateandfliptool.cpp:157
+#, fuzzy
+msgid "Flip vertical"
+msgstr "Ułóż obrazki w pionie"
+
+#: ..\../main/tools/sendpacstool.cpp:34
+#, fuzzy
+msgid "Send to PACS"
+msgstr "Wyślij do PACS-a"
+
+#: ..\../main/tools/sendpacstool.cpp:70
+#, fuzzy
+msgid "Sending to PACS..."
+msgstr "PACS"
+
+#: ..\../main/tools/showtagstool.cpp:42
+msgid "Hide DICOM inspector"
+msgstr "Ukryj inspektora DICOM"
+
+#: ..\../main/tools/showtagstool.cpp:44
+msgid "Show DICOM inspector"
+msgstr "Pokaż inspektora DICOM"
+
+#: ..\../main/tools/simpleprinttool.cpp:119
+#, fuzzy
+msgid "Image printing"
+msgstr "Załącz zdjęcie"
+
+#: ..\../main/tools/simpleprinttool.cpp:224
+#, fuzzy
+msgid "Page setup"
+msgstr "Strona startowa"
+
+#: ..\../main/tools/simpleprinttool.cpp:225
+#, fuzzy
+msgid "Print preview"
+msgstr "Drukuj"
+
+#: ..\../main/tools/simpleprinttool.cpp:272
+#, fuzzy
+msgid "Print image"
+msgstr "Drukuj"
+
+#: ..\../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr ""
+
+#: ..\../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr ""
+
+#: ..\../main/tools/undotool.cpp:110
+msgid "Redo"
+msgstr "Ponów"
+
+#: ..\../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:153
+#, fuzzy
+msgid "Enable loop"
+msgstr "Umożliw zdalną konfigurację PACS-a"
+
+#: ..\../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:267
+#, fuzzy
+msgid "Add column"
+msgstr "Dodaj"
+
+#: ..\../main/tools/windowlayouttool.cpp:268
+#, fuzzy
+msgid "Add row"
+msgstr "Dodaj"
+
+#: ..\../main/tools/windowlayouttool.cpp:270
+#, fuzzy
+msgid "Remove column"
+msgstr "Usuń"
+
+#: ..\../main/tools/windowlayouttool.cpp:271
+#, fuzzy
+msgid "Remove row"
+msgstr "Usuń"
+
+#: ..\../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr "Układ 1x1"
+
+#: ..\../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr "Układ 1x2"
+
+#: ..\../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr "Układ 2x1"
+
+#: ..\../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr "Układ 2x2"
+
+#: ..\../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr "Układ 3x3"
+
+#: ..\../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr "Układ 4x4 "
+
+#: ..\../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:82
+#, fuzzy
+msgid "The tool is already registered"
+msgstr "Żądany moduł nie jest zarejestrowany"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:187
+#, fuzzy
+msgid "The module "
+msgstr "Nieznane id modułu ("
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:49
+#, fuzzy
+msgid "Unable to load PNG bitmap resource"
+msgstr "Nie można załadować rozszerzenia:"
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:56
+#, fuzzy
+msgid "Unable to load PNG image resource"
+msgstr "Nie można załadować rozszerzenia:"
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:63
+#, fuzzy
+msgid "Unable to load GIF animation resource"
+msgstr "Nie można załadować rozszerzenia:"
+
+#: ..\../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr "Wartość kalibracyjna musi być liczbą dziesiętną"
+
+#: ..\../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr "Wartość kalibracyjna jest za niska"
+
+#: ..\../widgets/gui/calibracion.cpp:219
+msgid "Enter the calibration value"
+msgstr "Wprowadź wartość kalibracyjną"
+
+#: ..\../widgets/gui/calibracion.cpp:225
+msgid "The calibration value is too low"
+msgstr "Wartość kalibracyjna jest za niska"
+
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "The calibration value is too high"
+msgstr "Wartość kalibracyjna jest za wysoka"
+
+#: ..\../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr "Kalibracja w toku ..."
+
+#: ..\../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr "Miara rzeczywista"
+
+#: ..\../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr "Odległość"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr "Mikrony/ów"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr "Milimetry/ów"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr "Centymetry/ów"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr "Metry/ów"
+
+#: ..\../widgets/gui/selecciontextobase.cpp:26
+msgid "Note"
+msgstr "Notatka"
+
+#: ..\../widgets/wangulo.cpp:1101 ..\../widgets/wangulo.cpp:1103
+msgid "Type"
+msgstr "Rodzaj"
+
+#: ..\../widgets/wangulo.cpp:1101
+msgid "Normal"
+msgstr "Normalny"
+
+#: ..\../widgets/wangulo.cpp:1103
+msgid "Cobb"
+msgstr "Cobb"
+
+#: ..\../widgets/welipse.cpp:721 ..\../widgets/wfreeform.cpp:470
+#: ..\../widgets/wpolygon.cpp:574
+#, fuzzy
+msgid "Center (I)"
+msgstr "Poycja (I)"
+
+#: ..\../widgets/welipse.cpp:727 ..\../widgets/wfreeform.cpp:476
+#: ..\../widgets/wpolygon.cpp:580
+#, fuzzy
+msgid "Center (M)"
+msgstr "Poycja (M)"
+
+#: ..\../widgets/welipse.cpp:762 ..\../widgets/welipse.cpp:766
+msgid "Greater Radius"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:763 ..\../widgets/welipse.cpp:767
+msgid "Lower Radius"
+msgstr ""
+
+#: ..\../widgets/wfreeform.cpp:482 ..\../widgets/wpolygon.cpp:586
+#, fuzzy
+msgid "Number of Vertex"
+msgstr "Numer dostępu"
+
+#: ..\../widgets/wpunto.cpp:353
+msgid "Position (I)"
+msgstr "Poycja (I)"
+
+#: ..\../widgets/wpunto.cpp:358
+msgid "Position (M)"
+msgstr "Poycja (M)"
+
+#: ..\../widgets/wrule.cpp:558
+msgid "Image Calibration"
+msgstr "Kalibracja zdjęcia"
+
+#: ..\../widgets/wrule.cpp:663
+msgid "Length"
+msgstr "Długość"
+
+#: ..\../widgets/wrule.cpp:668
+msgid "Points (I)"
+msgstr "Punkty (I)"
+
+#: ..\../widgets/wrule.cpp:675
+msgid "Points (M)"
+msgstr "Punkty (M)"
+
+#: ..\../widgets/wtextbox.cpp:445
+#, fuzzy
+msgid "Default text"
+msgstr "Tekst"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:41
+msgid "Commit date"
+msgstr "Data zatwierdzenia"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr "<nieznane ID>"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr "%m/%d/%Y"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:214
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr "Zatwierdzony"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:219
+msgid "Modified"
+msgstr "Zmodyfikowany"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr "Niezatwierdzone"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr "Nazwisko imię drugie_imię"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr "644654645"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:130
+msgid "Commit inform"
+msgstr "Informacja o zatwierdzeniu"
+
+#: ..\../wx/propiedades/wxpropiedades.cpp:30
+msgid "Properties of "
+msgstr "Właściwości "
+
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:31
+msgid "Widget's Name"
+msgstr "Nazwa gadżetu"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr "< &Wstecz"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr "&Anuluj"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3701
+#, fuzzy
+msgid "Regular expression invalid: '"
+msgstr "\"action\" attribute invalid at \"gnkworkflow\" scope"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr "REGEXP wywołane złą liczbą argumentów: %d zamiast 2."
+
+#: ..\../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.h:56
+#, fuzzy
+msgid "Overwrite Paths"
+msgstr "Nadpisz"
+
+#: ..\../ginkgopro/ginkgo_pro_defines.h:21
+#, fuzzy
+msgid "Professional DICOM CADx environment"
+msgstr "Środowisko Open Source programu DICOM CADx"
+
+#: ..\../main/controllers/dcmtk/dicomservers.h:39
+#, fuzzy
+msgid "Server not found"
+msgstr "Id serwera nie odnalezione. Id ="
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:99
+#, fuzzy
+msgid "DICOM Query/Retrieve"
+msgstr "Metoda odbioru"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:123
+#, fuzzy
+msgid "Not found"
+msgstr "Nie odnaleziono ustawienia"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+#, fuzzy
+msgid "Advanced Settings"
+msgstr "Ustawienia zaawansowane ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+#, fuzzy
+msgid "Edit profile"
+msgstr "Profil"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+#, fuzzy
+msgid "Add/Edit Location"
+msgstr "Lokalizacja"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+#, fuzzy
+msgid "Add window/level"
+msgstr "Poziom"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+#, fuzzy
+msgid "Add tag"
+msgstr "Dodaj"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+#, fuzzy
+msgid "Setup window position"
+msgstr "Poycja (I)"
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.h:61
+#, fuzzy
+msgid "Closing"
+msgstr ""
+"Wystąpiły błędy podczas zapisu serii.\n"
+"Czy chcesz kontynuować zamykanie?"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+#, fuzzy
+msgid "DICOM Dir configuration"
+msgstr "Katalog DICOM"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:70
+#, fuzzy
+msgid "Open Ginkgo Cloud"
+msgstr "Otwórz"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:123
+#, fuzzy
+msgid "Ginkgo Cloud search"
+msgstr "Szukaj"
+
+#: ..\../main/gui/history3/confirmdeletedialog.h:24
+#, fuzzy
+msgid " from History?"
+msgstr "&Usuń z Historii"
+
+#: ..\../main/gui/history3/historypanel3base.h:100
+#, fuzzy
+msgid "Medical history"
+msgstr "(Id numer historii choroby)"
+
+#: ..\../main/gui/history3/historypanel3base.h:161
+#, fuzzy
+msgid "Open With ..."
+msgstr "Otwórz"
+
+#: ..\../main/gui/history3/openwithdialog.h:72
+#, fuzzy
+msgid "Select a View"
+msgstr "Widok"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+#, fuzzy
+msgid "Message detail"
+msgstr "Komunikat"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+#, fuzzy
+msgid "Log node"
+msgstr "Log"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:87
+#, fuzzy
+msgid "Closing Ginkgo CADx"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/paneltags/paneltagsbase.h:57
+#, fuzzy
+msgid "DICOM Inspector"
+msgstr "Ukryj inspektora DICOM"
+
+#: ..\../main/license.h:31
+msgid "Open Source DICOM CADx environment"
+msgstr "Środowisko Open Source programu DICOM CADx"
+
+#: ..\../widgets/gui/calibracionbase.h:65
+#, fuzzy
+msgid "Calibration"
+msgstr "Kalibracja zdjęcia"
+
+#: ..\../wx/propiedades/wxpropiedadesbase.h:62
+#, fuzzy
+msgid "Properties of ..."
+msgstr "Właściwości ..."
+
+#: ..\../wx/thumbnailctrl/thumbnailwidget.h:44
+#, fuzzy
+msgid "Image Browser Dialog"
+msgstr "Załącz zdjęcie"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+#, fuzzy
+msgid "Test title"
+msgstr "Tytuł/nagłówek"
+
+#~ msgid ""
+#~ "Unexpected Error exporting, the view is not allowed to export to the "
+#~ "format selected"
+#~ msgstr ""
+#~ "Nieoczekiwany błąd eksportu. Widok nie ma pozwolenia na eksport do "
+#~ "wybranego formatu"
+
+#~ msgid "Failed to store the file, check permissions on the directory"
+#~ msgstr "Niepowodzenia w zapisie pliku. Sprawdź uprawnienia do katalogu."
+
+#~ msgid "The key files will not be exported"
+#~ msgstr "Kluczowe pliki nie zostaną wyeksportowane"
+
+#~ msgid "Current"
+#~ msgstr "Bieżący"
+
+#~ msgid "All"
+#~ msgstr "Wszyscy"
+
+#~ msgid "JPG"
+#~ msgstr "JPG"
+
+#~ msgid "BMP"
+#~ msgstr "BMP"
+
+#~ msgid "PNG"
+#~ msgstr "PNG"
+
+#~ msgid "Content"
+#~ msgstr "Zawartość"
+
+#~ msgid "Evaluation maps"
+#~ msgstr "Mapy ewaluacyjne"
+
+#~ msgid "Tile Horizontally"
+#~ msgstr "Ułóż obrazki w poziomie"
+
+#~ msgid "Tile Vertically"
+#~ msgstr "Ułóż obrazki w pionie"
+
+#~ msgid "Grid (two columns)"
+#~ msgstr "Siatka (2 kolumny)"
+
+#~ msgid "Grid (three columns)"
+#~ msgstr "Siatka (3 kolumny)"
+
+#~ msgid "Grid organization"
+#~ msgstr "Układ siatki"
+
+#~ msgid "Color"
+#~ msgstr "Kolor"
+
+#, fuzzy
+#~ msgid "Vertex (I)"
+#~ msgstr "Poycja (I)"
+
+#, fuzzy
+#~ msgid "Vertex (M)"
+#~ msgstr "Poycja (M)"
+
+#~ msgid "0"
+#~ msgstr "0"
+
+#~ msgid "Checking program updates..."
+#~ msgstr "Sprawdzanie istnienia aktualizacji programowych ..."
+
+#~ msgid "You have to specify at least uid series"
+#~ msgstr "Należy podać przynajmniej uid serii"
+
+#~ msgid "You have to specify uid series"
+#~ msgstr "Należy podać uid serii"
+
+#~ msgid "Untitled"
+#~ msgstr "Bez nagłówka"
+
+#~ msgid "UID"
+#~ msgstr "UID"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">"
+#~ msgstr ">"
+
+#~ msgid "<"
+#~ msgstr "<"
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid "Patient's Id"
+#~ msgstr "Id pacjenta"
+
+#~ msgid "You are not allowed to download this kind of modalities ("
+#~ msgstr "Nie masz pozwolenia na ściągnięcie tego rodzaju badań"
+
+#~ msgid "Searching..."
+#~ msgstr "Szukanie ..."
+
+#~ msgid "unknown column"
+#~ msgstr "NIeznana kolumna"
+
+#, fuzzy
+#~ msgid "Pending tasks"
+#~ msgstr "W toku"
+
+#, fuzzy
+#~ msgid "Restart pending tasks"
+#~ msgstr "Jest %d zadań w toku"
+
+#, fuzzy
+#~ msgid "Remove pending tasks"
+#~ msgstr "Jest %d zadań w toku"
+
+#, fuzzy
+#~ msgid "Advanced tasks management..."
+#~ msgstr "Ustawienia zaawansowane ..."
+
+#, fuzzy
+#~ msgid "Are you sure you want to delete task?"
+#~ msgstr "Czy na pewno chcesz usunąć"
+
+#, fuzzy
+#~ msgid "Delete tasks"
+#~ msgstr "Usuń komunikat"
+
+#, fuzzy
+#~ msgid "Pateint id"
+#~ msgstr "Rozmiar punktu"
+
+#~ msgid "Horizontal mosaic"
+#~ msgstr "Mozaika pozioma"
+
+#~ msgid "Vertical mosaic"
+#~ msgstr "Mozaika pionowa"
+
+#~ msgid "Include Annotations"
+#~ msgstr "Załącz adnotację"
+
+#~ msgid "Evaluation Maps"
+#~ msgstr "Mapy ewaluacyjne"
+
+#~ msgid "Zoom"
+#~ msgstr "Powiększ"
+
+#~ msgid "Options"
+#~ msgstr "Opcje"
+
+#~ msgid "Images per sheet"
+#~ msgstr "Zdjęć na stronie"
+
+#~ msgid "Print ..."
+#~ msgstr "Drukuj ..."
+
+#, fuzzy
+#~ msgid "Completed"
+#~ msgstr "Niezaimplementowany"
+
+#, fuzzy
+#~ msgid "Delete task"
+#~ msgstr "Usuń"
+
+#, fuzzy
+#~ msgid "Delete all"
+#~ msgstr "Wybierz zdjęcia"
+
+#, fuzzy
+#~ msgid "Are you sure you want to delete tasks?"
+#~ msgstr "Czy na pewno chcesz usunąć"
+
+#, fuzzy
+#~ msgid "ID"
+#~ msgstr "UID"
+
+#~ msgid "Point Size"
+#~ msgstr "Rozmiar punktu"
+
+#~ msgid "Underline"
+#~ msgstr "Podkreśl"
+
+#~ msgid "Make a selection:"
+#~ msgstr "Dokonaj wyboru:"
+
+#~ msgid "Alphabetic Mode"
+#~ msgstr "Tryb alfanumeryczny"
+
+#~ msgid "False"
+#~ msgstr "Fałsz"
+
+#~ msgid "True"
+#~ msgstr "Prawda"
+
+#~ msgid "Unspecified"
+#~ msgstr "Niepodany"
+
+#~ msgid "Error in resource: %s"
+#~ msgstr "Błąd w zasobie: %s"
+
+#~ msgid "Value must be %lld or higher"
+#~ msgstr "Wartość musi być %lld lub większa"
+
+#~ msgid "Value must be %llu or higher"
+#~ msgstr "Wartość musi być %llu lub większa"
+
+#~ msgid "Value must be %llu or less"
+#~ msgstr "Wartość musi być %llu lub mniejsza"
+
+#~ msgid "Value must be %f or higher"
+#~ msgstr "Wartość musi być %f lub większa"
+
+#~ msgid "Value must be %f or less"
+#~ msgstr "Wartość musi być %f lub mniejsza"
+
+#~ msgid "Not %s"
+#~ msgstr "Nie %s"
+
+#~ msgid "Choose a directory:"
+#~ msgstr "Wybierz katalog:"
+
+#~ msgid "Choose a file"
+#~ msgstr "Wybierz plik"
+
+#~ msgid "All files (*.*)|*.*"
+#~ msgstr "Wszystkie pliki (*.*)|*.*"
+
+#~ msgid "Update"
+#~ msgstr "Aktualizuj"
+
+#~ msgid "Up"
+#~ msgstr "W górę"
+
+#~ msgid "Down"
+#~ msgstr "W dół"
+
+#~ msgid "Page %i"
+#~ msgstr "Page %i"
+
+#~ msgid "Configure proxy"
+#~ msgstr "Skonfiguruj proxy"
+
+#~ msgid "Use system settings"
+#~ msgstr "Zastosuj ustawienia systemowe"
+
+#~ msgid "Manual configuration of proxy:"
+#~ msgstr "Ręczna konfiguracja proxy"
+
+#~ msgid "Host:"
+#~ msgstr "Host:"
+
+#~ msgid "Port:"
+#~ msgstr "Port:"
+
+#~ msgid "Password:"
+#~ msgstr "Hasło:"
+
+#, fuzzy
+#~ msgid "Authenticate"
+#~ msgstr "Uwierzytelnienie"
+
+#~ msgid "Show / Hide DICOM tags panel"
+#~ msgstr "Pokaż  / Ukryj panel tagów DICOM-a"
+
+#~ msgid "Updates"
+#~ msgstr "Aktualizacje"
+
+#, fuzzy
+#~ msgid "Visualization"
+#~ msgstr "Kalibracja w toku ..."
+
+#, fuzzy
+#~ msgid "Show metadatada"
+#~ msgstr "Metadane"
+
+#~ msgid "http://ginkgo-cadx.com/en/services/"
+#~ msgstr "http://ginkgo-cadx.com/en/services/"
+
+#~ msgid "Reset window level and zoom"
+#~ msgstr "Reset poziomu okna i powiększenia"
+
+#, fuzzy
+#~ msgid "Dicomize images..."
+#~ msgstr "Zdikomizowane pliki"
+
+#, fuzzy
+#~ msgid "Dicomize images"
+#~ msgstr "Zdikomizowane pliki"
+
+#~ msgid "Double click to edit"
+#~ msgstr "Kliknij dwa razy, by edytować"
+
+#~ msgid "Uploading to the PACS ..."
+#~ msgstr "Wczytywanie do PACS-a"
+
+#~ msgid ""
+#~ "No results obtained. Maybe you have a wrong PACS server configuration"
+#~ msgstr ""
+#~ "Nie uzyskano żadnych rezultatów. Być może konfiguracja PACS-a jest błędna."
+
+#~ msgid ""
+#~ "No results obtained in PACS retrieve.\n"
+#~ "Maybe study doesn't exist or you have a wrong PACS server configuration."
+#~ msgstr ""
+#~ "Brak rezultatów odbioru z PACS-a.\n"
+#~ "Być może badanie nie istnieje lub konfiguracja serwera PACS jest zła."
+
+#~ msgid ""
+#~ "Studies are already in the download queue.\n"
+#~ "Do you want to repeat download?"
+#~ msgstr ""
+#~ "Badania znajdują się już w kolejce do ściągnięcia.\n"
+#~ "Czy chcesz je ściągnąć ponownie?"
+
+#~ msgid ""
+#~ "Series were already in the download queue.\n"
+#~ "Do you want to force download?"
+#~ msgstr ""
+#~ "Serie były już w kolejce ściągania.\n"
+#~ "Czy chcesz wymusić ponowne ściągnięcie?"
+
+#~ msgid "Downloads"
+#~ msgstr "Obiekty ściągnięte"
+
+#~ msgid "Study description"
+#~ msgstr "Opis badania"
+
+#~ msgid "Clean"
+#~ msgstr "Wyczyść"
+
+#~ msgid "Clean finished downloads"
+#~ msgstr "Wyczyść listę ściągniętych obiektów"
+
+#~ msgid "Starting..."
+#~ msgstr "Uruchamianie ..."
+
+#~ msgid ""
+#~ "Diagnostic files can't be opened, you have to open the diagnosed series"
+#~ msgstr ""
+#~ "Nie można otworzyć plików diagnostycznych, należy otworzyć diagnozowaną "
+#~ "serię"
+
+#~ msgid "Error: "
+#~ msgstr "Błąd:"
+
+#~ msgid "Error: No images were downloaded"
+#~ msgstr "Błąd: Nie ściągnięto żadnych zdjęć"
+
+#~ msgid "Finished"
+#~ msgstr "Zakończone"
+
+#~ msgid "Play"
+#~ msgstr "Odtwórz"
+
+#~ msgid "Retry"
+#~ msgstr "Spróbuj ponownie"
+
+#~ msgid "Successful connection test."
+#~ msgstr "Pomyślny test połączenia."
+
+#~ msgid "The service did not respond properly:"
+#~ msgstr "Usługa nie odpowiedziała właściwie:"
+
+#, fuzzy
+#~ msgid "The selected directory does must be empty"
+#~ msgstr "Nie można otworzyć wybranego katalogu"
+
+#, fuzzy
+#~ msgid "What do you want to do?"
+#~ msgstr "Wybierz napędz, który chcesz otworzyć"
+
+#~ msgid "Choose the import profile"
+#~ msgstr "Wybierz profil importu"
+
+#~ msgid "Import profile"
+#~ msgstr "Importuj profil"
+
+#~ msgid "An error ocurred loading Ginkgo News check your internet connection"
+#~ msgstr ""
+#~ "Wystąpił błąd podczas ładowania Ginkgo New. Sprawdź Twoje połączenie "
+#~ "internetowe."
+
+#~ msgid "Welcome"
+#~ msgstr "Witamy"
+
+#~ msgid "Twitter"
+#~ msgstr "Twitter"
+
+#~ msgid "%m-%d-%y %H:%M:%S,%q"
+#~ msgstr "%m-%d-%y %H:%M:%S,%q"
+
+#~ msgid "Reprocess Series"
+#~ msgstr "Przetwórz ponownie serię"
+
+#~ msgid ""
+#~ "If you reprocess this series it will be uploaded to PACS server and \n"
+#~ "integration message will be resent to integration engine.\n"
+#~ "Do you want to continue?"
+#~ msgstr ""
+#~ "Jeśli seria zostanie ponownie przetworzona, zostanie wczytana do serwera "
+#~ "PACS-a  \n"
+#~ "i komunikat zostanie ponownie wysłany do maszyny integrującej.\n"
+#~ "Czy chcesz kontynuować?"
+
+#~ msgid ""
+#~ "Unable to reprocess this series. This series hasn't been dicomized with "
+#~ "Ginkgo CADx."
+#~ msgstr ""
+#~ "Nie może ponownie przetworzyć serii. Seria nie została zdikomizowana przy "
+#~ "pomocy Ginkgo CADx."
+
+#~ msgid ""
+#~ "\n"
+#~ "Ginkgo CADx license agreement <version>\n"
+#~ "-----------------------------------\n"
+#~ "\n"
+#~ "This version is a trial version for <customer>, and therefore its use is "
+#~ "restricted for this purpose.\n"
+#~ "\n"
+#~ "\n"
+#~ "\n"
+#~ "S.L MetaEmotion Healthcare\n"
+#~ "http://healthcare.metaemotion.com/en/welcome\n"
+#~ "contacto at metaemotion.com"
+#~ msgstr ""
+#~ "\n"
+#~ "Umowa licencyjna Ginkgo CADx <wersja>\n"
+#~ "-----------------------------------\n"
+#~ "\n"
+#~ "To jest wersja testowa dla <klienta>, i dlatego jesj użyczie ogranicza "
+#~ "się do tego celu.\n"
+#~ "\n"
+#~ "\n"
+#~ "\n"
+#~ "S.L MetaEmotion Healthcare\n"
+#~ "http://healthcare.metaemotion.com/en/welcome\n"
+#~ "contacto at metaemotion.com"
+
+#~ msgid ""
+#~ "\n"
+#~ "There are %d files that overwrite existing files"
+#~ msgstr ""
+#~ "\n"
+#~ "Są %d pliki, które zastąpią istniejące"
+
+#~ msgid ""
+#~ "\n"
+#~ "There aren't any stored study that matches with the search filter.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Nie istnieje żadne badanie, które odpowiada kryteriom filtru "
+#~ "przeszukiwania\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "There is no size in the medical history to show every patients\n"
+#~ msgstr ""
+#~ "\n"
+#~ "There is no size in the medical history to show every patients\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "To begin working must change filter criteria, acquire an existing study "
+#~ "or import images in DICOM format.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Aby zacząć pracę, trzeba zmienić kryteria filtru, pobrać istniejące "
+#~ "badanie lub zaimportować zdjęcia w formacie DICOM.\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Try using filters or collapsing nodes and refresh search\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Spróbuj zastosować filtr lub collapsing nodes i odswież szukanie\n"
+
+#~ msgid " for all their support in Ginkgo CADx creation!"
+#~ msgstr "   za wsparcie w tworzeniu Ginkgo CADx!"
+
+#~ msgid "&DICOM &Acquisition"
+#~ msgstr "Pobieranie DICOM"
+
+#~ msgid "&Delete Patient from History"
+#~ msgstr "&Usuń pacjenta z Historii"
+
+#~ msgid "&Import ..."
+#~ msgstr "&Import"
+
+#~ msgid "&Import images..."
+#~ msgstr "&Importuj zdjęcia ..."
+
+#~ msgid "&Open File"
+#~ msgstr "&Otwórz plik"
+
+#~ msgid "&Open Folder"
+#~ msgstr "&Otwórz katalog"
+
+#~ msgid "&Save"
+#~ msgstr "&Zapisz"
+
+#~ msgid "1.0"
+#~ msgstr "1.0"
+
+#~ msgid "10:20"
+#~ msgstr "10:20"
+
+#~ msgid "12412012 Q"
+#~ msgstr "12412012 Q"
+
+#~ msgid "1x1"
+#~ msgstr "1x1"
+
+#~ msgid "1x2"
+#~ msgstr "1x2"
+
+#~ msgid "2X2"
+#~ msgstr "2X2"
+
+#~ msgid "2x1"
+#~ msgstr "2x1"
+
+#~ msgid "31/02/2010"
+#~ msgstr "31/02/2010"
+
+#~ msgid "31/08/1983"
+#~ msgstr "31/08/1983"
+
+#~ msgid "3D tools"
+#~ msgstr "Narzędzia 3D"
+
+#~ msgid "3x3"
+#~ msgstr "3x3"
+
+#~ msgid "4x4"
+#~ msgstr "4x4"
+
+#~ msgid "<Unknow ID>"
+#~ msgstr "<Nieznane ID>"
+
+#~ msgid "About &Ginkgo CADx ..."
+#~ msgstr "O &Ginkgo CADx ..."
+
+#~ msgid "About Ginkgo CADx ..."
+#~ msgstr "O Ginkgo CADx ..."
+
+#~ msgid "Acquire from a local folder"
+#~ msgstr "Pobierz z lokalnego katalogu"
+
+#~ msgid "Acquire from a removable unit"
+#~ msgstr "Pobierz z nośnika wymiennego"
+
+#, fuzzy
+#~ msgid "Acquiring a new DICOM study"
+#~ msgstr "Utwórz nowe badanie DICOM"
+
+#~ msgid "Activate"
+#~ msgstr "Aktywuj"
+
+#~ msgid "All modalities"
+#~ msgstr "Wszystkie rodzaje badań"
+
+#~ msgid "Andre Alvim Tolentino: Printing issues"
+#~ msgstr "Andre Alvim Tolentino: Problemy z drukowaniem"
+
+#~ msgid "Assistant to send files to PACS"
+#~ msgstr "Asystent wysyłania plików do PACS-a"
+
+#~ msgid "Birth date: "
+#~ msgstr "Data urodzin:"
+
+#~ msgid "Brazillian Portuguese: Marcel Ribeiro Dantas"
+#~ msgstr "Brazylijski portugalski: Marcel Ribeiro Dantas"
+
+#~ msgid "Browse slices\tCtrl+S"
+#~ msgstr "Przeglądaj przekroje\tCtrl+S"
+
+#~ msgid "CT"
+#~ msgstr "TK"
+
+#~ msgid "Close All"
+#~ msgstr "Zamknij wszystko"
+
+#~ msgid "Close Panel"
+#~ msgstr "Zamknij Panel"
+
+#~ msgid "Close all tabs"
+#~ msgstr "Zamknij wszystkie zakładki"
+
+#~ msgid "Closing windows..."
+#~ msgstr "Zamykanie okien ..."
+
+#~ msgid "Column organization (2 columns)"
+#~ msgstr "Układ kolumn (2kolumny)"
+
+#~ msgid "Creating new images ..."
+#~ msgstr "Tworzenie nowych zdjęć ..."
+
+#~ msgid "DICOM &acquisition from PACS"
+#~ msgstr "Pobierz badanie DICOM z PACS-a"
+
+#~ msgid "Date: "
+#~ msgstr "Data:"
+
+#~ msgid "Decrease"
+#~ msgstr "Zmniejsz"
+
+#~ msgid "Decrease value"
+#~ msgstr "Zmniejsz wartość"
+
+#~ msgid "Deleting a Column"
+#~ msgstr "Usuwanie kolumny"
+
+#~ msgid "Deleting a Row"
+#~ msgstr "Usuwanie wiersza"
+
+#~ msgid "Deleting series..."
+#~ msgstr "Usuwanie serii ..."
+
+#~ msgid "Description: "
+#~ msgstr "Opis"
+
+#~ msgid "Display Options"
+#~ msgstr "Opcje wyświetlania"
+
+#~ msgid "Duplicate Tool"
+#~ msgstr "Narzędzie duplikacji"
+
+#~ msgid "Enable XML-RPC server"
+#~ msgstr "Uaktywnij serwer XML-RPC"
+
+#~ msgid "Error deleting file from database:\n"
+#~ msgstr "Błąd przy usuwaniu pliku z bazy danych:\n"
+
+#~ msgid "Error deleting file from de database: \n"
+#~ msgstr "Błąd przy usuwaniu pliku z bazy danych:\n"
+
+#~ msgid "Error deleting the patient in the database:\n"
+#~ msgstr "Błąd przy usuwaniu pacjenta z bazy danych:\n"
+
+#~ msgid "Export current series..."
+#~ msgstr "Eksportuj bieżącą serię"
+
+#~ msgid "Export global..."
+#~ msgstr "Eksportuj konfigurację ..."
+
+#~ msgid "Export the active study to other formats"
+#~ msgstr "Eksportuj aktywne badanie do innych formatów"
+
+#~ msgid ""
+#~ "Extension is incompatible with current core. Please, check for upgrades."
+#~ msgstr ""
+#~ "Rozszerzenie nie jest kompatybilne z aktualnym rdzeniem. Prosze sprawdzić "
+#~ "istnienie aktualizacji."
+
+#~ msgid "Factor"
+#~ msgstr "Czynnik"
+
+#~ msgid "Factor (%.2f)"
+#~ msgstr "Czynnik (% 2f)"
+
+#~ msgid "Factor (0.50)"
+#~ msgstr "Czynnik (0.50)"
+
+#~ msgid "Failed to remove patient, you have to close opened studies"
+#~ msgstr "Niepowodzenie w usunięciu pacjenta. Należy zamknąć otwarte badania."
+
+#~ msgid "Filters"
+#~ msgstr "Filtry"
+
+#~ msgid "Finished .."
+#~ msgstr "Zakończone ..."
+
+#~ msgid "German: Sebastian Hilbert"
+#~ msgstr "Niemiecki: Sebastian Hilbert"
+
+#~ msgid "Get extensions ..."
+#~ msgstr "Pobierz rozszerzenia ..."
+
+#~ msgid "Ginkgo CADx license agreement version  "
+#~ msgstr "Wersja umowy licencyjnej Ginkgo CADx"
+
+#~ msgid "Ginkgo CADx settings"
+#~ msgstr "Ustawienia Ginkgo CADx "
+
+#~ msgid "Ginkgo CADx start page ..."
+#~ msgstr "Strona startowa Ginkgo CADx ..."
+
+#~ msgid "Greetings"
+#~ msgstr "Pozdrowienia"
+
+#~ msgid "Grid Organization"
+#~ msgstr "Układ siatki"
+
+#~ msgid "Id: "
+#~ msgstr "Id: "
+
+#~ msgid "Image"
+#~ msgstr "Zdjęcie"
+
+#~ msgid "Import Images"
+#~ msgstr "Import zdjęć"
+
+#~ msgid "Import global..."
+#~ msgstr "Importuj konfigurację ..."
+
+#~ msgid "Import images"
+#~ msgstr "Importuj zdjęcia"
+
+#~ msgid "Increase"
+#~ msgstr "Zwiększ"
+
+#~ msgid "Increase value"
+#~ msgstr "Zwiększ wartość"
+
+#~ msgid "Japanese: Noriya Yokohama"
+#~ msgstr "Japoński: Noriya Yokohama"
+
+#~ msgid "Javier Tovar Velasco"
+#~ msgstr "Javier Tovar Velasco"
+
+#~ msgid "Last week"
+#~ msgstr "Ostatni tydzień"
+
+#~ msgid "Loading modules ..."
+#~ msgstr "Ładuje moduły ..."
+
+#~ msgid "Magnifying glass"
+#~ msgstr "Lupa"
+
+#~ msgid "Maximize"
+#~ msgstr "Maksymalizuj"
+
+#~ msgid "Merging file %d of %d"
+#~ msgstr "Łączenie plików %d z %d"
+
+#~ msgid "Merging files..."
+#~ msgstr "Łączy pliki ..."
+
+#~ msgid "Metaemotion S.L."
+#~ msgstr "Metaemotion S.L."
+
+#~ msgid "Modality: "
+#~ msgstr "Rodzaj badania:"
+
+#~ msgid "Name: "
+#~ msgstr "Nazwa:"
+
+#~ msgid "No description"
+#~ msgstr "Brak opisu"
+
+#~ msgid "Not loaded"
+#~ msgstr "Niezaładowane"
+
+#~ msgid "Obtain extensions..."
+#~ msgstr "Pobierz rozszerzenia ..."
+
+#~ msgid "Open a DICOM file"
+#~ msgstr "Otwórz plik DICOM"
+
+#~ msgid "Opening series..."
+#~ msgstr "Otwieranie serii..."
+
+#~ msgid "PACS server"
+#~ msgstr "Serwer PACS"
+
+#~ msgid "Plugin's path"
+#~ msgstr "Ścieżka dodatku"
+
+#~ msgid "Print..."
+#~ msgstr "Drukuj ..."
+
+#~ msgid "Redo\tCtrl+y"
+#~ msgstr "Ponów\tCtrl+y"
+
+#~ msgid "Redo "
+#~ msgstr "Ponów"
+
+#~ msgid "Select Series you want to export"
+#~ msgstr "Wybierz serię, którą chcesz wyeksportować"
+
+#~ msgid "Select Series you want to upload"
+#~ msgstr "Wybierz serię, którą chcesz wczytać"
+
+#~ msgid "Select files you want to export"
+#~ msgstr "Wybierz pliki do eksportu"
+
+#~ msgid "Select files you want to upload"
+#~ msgstr "Wybierz pliki do wczytania"
+
+#~ msgid "Send to PACS server"
+#~ msgstr "Wyślij do serwera PACS-a"
+
+#~ msgid "Series UID: "
+#~ msgstr "UID serii:"
+
+#~ msgid "Sex: female"
+#~ msgstr "Płeć: kobieta"
+
+#~ msgid "Sex: male"
+#~ msgstr "Płeć: mężczyzna"
+
+#~ msgid "Show On Startup"
+#~ msgstr "Pokaż przy starcie"
+
+#~ msgid "Spanish: JFLP (jluna80)"
+#~ msgstr "Hiszpański: JFLP (jluna80)"
+
+#~ msgid "Start page ..."
+#~ msgstr "Strona startowa ..."
+
+#~ msgid "Study download size limit exceded"
+#~ msgstr "Przekroczony limit rozmiaru ściąganego badania"
+
+#~ msgid "TCP listening port for XML-RPC server"
+#~ msgstr "Port nasłuchu TCP dla serwera XML-RPC"
+
+#~ msgid ""
+#~ "The study you want to export is modified.\n"
+#~ "Would you like to save it?"
+#~ msgstr ""
+#~ "Badanie, które chcesz wyeksportować jest zmodyfikowane.\n"
+#~ "Chcesz je zapisać?"
+
+#~ msgid "This files has to be overwritten"
+#~ msgstr "Ten plik należy nadpisać"
+
+#~ msgid "Time: "
+#~ msgstr "Czas:"
+
+#~ msgid "Translators"
+#~ msgstr "Tłumacze"
+
+#~ msgid "Turkish: zeugma (sunder67)"
+#~ msgstr "Turecki: zeugma (sunder67)"
+
+#~ msgid "UID Importer: "
+#~ msgstr "UID importera:"
+
+#~ msgid "URL for new extensions"
+#~ msgstr "Adres URL dla nowych rozszerzeń"
+
+#~ msgid "Undo\tCtrl+z"
+#~ msgstr "Cofnij\tCtrl+z"
+
+#~ msgid "Upload to PACS"
+#~ msgstr "Wczytaj do PACS-a"
+
+#~ msgid "We want to thanks "
+#~ msgstr "Wyrażamy nasze podziękowania   "
+
+#~ msgid "XML-RPC Server"
+#~ msgstr "Serwer XML-RPC"
+
+#~ msgid "XmlRpc++"
+#~ msgstr "XmlRpc++"
+
+#~ msgid "You can't remove opened studies"
+#~ msgstr "Nie można usunąć otwartych badań"
+
+#~ msgid "You have to set a valid port"
+#~ msgstr "Należy ustawić ważny port"
+
+#~ msgid "Zoom +"
+#~ msgstr "Powiększ +"
+
+#~ msgid "Zoom -"
+#~ msgstr "Pomniejsz -"
+
+#~ msgid "error, have tried to select a file that is not added to history"
+#~ msgstr "Błąd bróba wybrania pliku, który nie został dodany do Historii"
+
+#~ msgid "this Patient"
+#~ msgstr "ten pacjent"
+
+#~ msgid "to"
+#~ msgstr "do"
diff --git a/cadxcore/lang/pl/wxstd.mo b/cadxcore/lang/pl/wxstd.mo
new file mode 100644
index 0000000..a42a8e9
Binary files /dev/null and b/cadxcore/lang/pl/wxstd.mo differ
diff --git a/cadxcore/lang/pl/wxstd.po b/cadxcore/lang/pl/wxstd.po
new file mode 100644
index 0000000..2a7c03b
--- /dev/null
+++ b/cadxcore/lang/pl/wxstd.po
@@ -0,0 +1,9155 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: wxWidgets 3.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-08-23 18:18+0200\n"
+"PO-Revision-Date: 2013-09-29 14:09+0100\n"
+"Last-Translator: Grzegorz Zlotowicz <grzezlo at wp.pl>\n"
+"Language-Team: wxWidgets translators <wx-translators at wxwidgets.org>\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=utf-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2;\n"
+"X-Generator: Poedit 1.5.7\n"
+
+#: ../src/common/debugrpt.cpp:591
+msgid ""
+"\n"
+"Please send this report to the program maintainer, thank you!\n"
+msgstr ""
+"\n"
+"Proszę przesłać ten raport do autora programu, dziękuję!\n"
+
+#: ../src/richtext/richtextstyledlg.cpp:210
+#: ../src/richtext/richtextstyledlg.cpp:222
+msgid " "
+msgstr " "
+
+#: ../src/generic/dbgrptg.cpp:326
+msgid "              Thank you and we're sorry for the inconvenience!\n"
+msgstr "              Dziękujemy i przepraszamy za niedogodności!\n"
+
+#: ../src/common/prntbase.cpp:546
+#, c-format
+msgid " (copy %d of %d)"
+msgstr " (kopia %d z %d)"
+
+#: ../src/common/log.cpp:427
+#, c-format
+msgid " (error %ld: %s)"
+msgstr " (błąd %ld: %s)"
+
+#: ../src/common/imagtiff.cpp:75
+#, c-format
+msgid " (in module \"%s\")"
+msgstr " (w module \"%s\")"
+
+#: ../src/common/docview.cpp:1625
+msgid " - "
+msgstr " - "
+
+#: ../src/richtext/richtextprint.cpp:588 ../src/html/htmprint.cpp:704
+msgid " Preview"
+msgstr " Podgląd"
+
+#: ../src/common/fontcmn.cpp:811
+msgid " bold"
+msgstr "pogrubiony"
+
+#: ../src/common/fontcmn.cpp:827
+msgid " italic"
+msgstr "kursywa"
+
+#: ../src/common/fontcmn.cpp:807
+msgid " light"
+msgstr "lekki"
+
+#: ../src/common/paper.cpp:118
+msgid "#10 Envelope, 4 1/8 x 9 1/2 in"
+msgstr "Koperta #10, 4 1/8 x 9 1/2 cali"
+
+#: ../src/common/paper.cpp:119
+msgid "#11 Envelope, 4 1/2 x 10 3/8 in"
+msgstr "Koperta #11, 4 1/2 x 10 3/8 cali"
+
+#: ../src/common/paper.cpp:120
+msgid "#12 Envelope, 4 3/4 x 11 in"
+msgstr "Koperta #12, 4 3/4 x 11 cali"
+
+#: ../src/common/paper.cpp:121
+msgid "#14 Envelope, 5 x 11 1/2 in"
+msgstr "Koperta #14, 5 x 11 1/2 cali"
+
+#: ../src/common/paper.cpp:117
+msgid "#9 Envelope, 3 7/8 x 8 7/8 in"
+msgstr "Koperta #9, 3 7/8 x 8 7/8 cali"
+
+#: ../src/html/helpwnd.cpp:1044
+#, c-format
+msgid "%d of %lu"
+msgstr "%d z %lu"
+
+#: ../src/html/helpwnd.cpp:1681 ../src/html/helpwnd.cpp:1719
+#, c-format
+msgid "%i of %i"
+msgstr "%i z %i"
+
+#: ../src/generic/filectrlg.cpp:315
+#, c-format
+msgid "%ld byte"
+msgid_plural "%ld bytes"
+msgstr[0] "%ld bajt"
+msgstr[1] "%ld bajty"
+msgstr[2] "%ld bajtów"
+
+#: ../src/html/helpwnd.cpp:1046
+#, c-format
+msgid "%lu of %lu"
+msgstr "%lu z %lu"
+
+#: ../src/common/cmdline.cpp:1050
+#, c-format
+msgid "%s (or %s)"
+msgstr "%s (lub %s)"
+
+#: ../src/generic/logg.cpp:230
+#, c-format
+msgid "%s Error"
+msgstr "%s Błąd"
+
+#: ../src/generic/logg.cpp:242
+#, c-format
+msgid "%s Information"
+msgstr "%s Informacja"
+
+#: ../src/generic/preferencesg.cpp:110
+#, c-format
+msgid "%s Preferences"
+msgstr "Preferencje %s"
+
+#: ../src/generic/logg.cpp:234
+#, c-format
+msgid "%s Warning"
+msgstr "%s Ostrzeżenie"
+
+#: ../src/common/tarstrm.cpp:1319
+#, c-format
+msgid "%s did not fit the tar header for entry '%s'"
+msgstr "%s nie pasuje nagłówek tar do wpisu '%s'"
+
+#: ../src/common/fldlgcmn.cpp:106
+#, c-format
+msgid "%s files (%s)|%s"
+msgstr "%s pliki (%s)|%s"
+
+#: ../src/common/stockitem.cpp:139 ../src/html/helpfrm.cpp:142
+#: ../src/html/helpfrm.cpp:144
+msgid "&About"
+msgstr "Inform&acje"
+
+#: ../src/common/stockitem.cpp:207
+msgid "&Actual Size"
+msgstr "&Bieżący rozmiar"
+
+#: ../src/richtext/richtextindentspage.cpp:262
+msgid "&After a paragraph:"
+msgstr "&Po paragrafie:"
+
+#: ../src/richtext/richtextindentspage.cpp:128
+#: ../src/richtext/richtextliststylepage.cpp:319
+msgid "&Alignment"
+msgstr "&Wyrównanie"
+
+#: ../src/common/stockitem.cpp:141
+msgid "&Apply"
+msgstr "Z&astosuj"
+
+#: ../src/richtext/richtextstyledlg.cpp:251
+msgid "&Apply Style"
+msgstr "Z&astosuj styl"
+
+#: ../src/msw/mdi.cpp:175
+msgid "&Arrange Icons"
+msgstr "&Rozmieść ikony"
+
+#: ../src/common/stockitem.cpp:195
+msgid "&Ascending"
+msgstr "&Rosnąco"
+
+#: ../src/common/stockitem.cpp:142
+msgid "&Back"
+msgstr "&Wstecz"
+
+#: ../src/richtext/richtextstylepage.cpp:113
+msgid "&Based on:"
+msgstr "&Na podstawie:"
+
+#: ../src/richtext/richtextindentspage.cpp:253
+msgid "&Before a paragraph:"
+msgstr "&Przed paragrafem:"
+
+#: ../src/richtext/richtextfontpage.cpp:271
+msgid "&Bg colour:"
+msgstr "Kolor &tła:"
+
+#: ../src/common/stockitem.cpp:143
+msgid "&Bold"
+msgstr "Pogru&biony"
+
+#: ../src/common/stockitem.cpp:144
+msgid "&Bottom"
+msgstr "&Dolny"
+
+#: ../src/richtext/richtextborderspage.cpp:359
+#: ../src/richtext/richtextborderspage.cpp:503
+#: ../src/richtext/richtextmarginspage.cpp:260
+#: ../src/richtext/richtextmarginspage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:634
+#: ../src/richtext/richtextsizepage.cpp:641
+msgid "&Bottom:"
+msgstr "&Dolny:"
+
+#: ../include/wx/richtext/richtextbuffer.h:3523
+msgid "&Box"
+msgstr "&Blok"
+
+#: ../src/richtext/richtextliststylepage.cpp:210
+#: ../src/richtext/richtextbulletspage.cpp:159
+msgid "&Bullet style:"
+msgstr "&Styl wypunktowania:"
+
+#: ../src/common/stockitem.cpp:146
+msgid "&CD-Rom"
+msgstr "&CD-Rom"
+
+#: ../src/generic/wizard.cpp:432 ../src/generic/fontdlgg.cpp:470
+#: ../src/generic/fontdlgg.cpp:489 ../src/osx/carbon/fontdlg.cpp:588
+#: ../src/common/stockitem.cpp:145
+msgid "&Cancel"
+msgstr "&Anuluj"
+
+#: ../src/msw/mdi.cpp:171
+msgid "&Cascade"
+msgstr "&Kaskada"
+
+#: ../include/wx/richtext/richtextbuffer.h:5578
+msgid "&Cell"
+msgstr "&Komórka"
+
+#: ../src/richtext/richtextsymboldlg.cpp:439
+msgid "&Character code:"
+msgstr "&Kod znaku:"
+
+#: ../src/common/stockitem.cpp:147
+msgid "&Clear"
+msgstr "Wy&czyść"
+
+#: ../src/generic/logg.cpp:522 ../src/common/stockitem.cpp:148
+#: ../src/common/prntbase.cpp:1570 ../src/univ/themes/win32.cpp:3756
+#: ../src/html/helpfrm.cpp:139
+msgid "&Close"
+msgstr "Zam&knij"
+
+#: ../src/common/stockitem.cpp:193
+#, fuzzy
+msgid "&Color"
+msgstr "K&olor:"
+
+#: ../src/richtext/richtextfontpage.cpp:258
+msgid "&Colour:"
+msgstr "K&olor:"
+
+#: ../src/common/stockitem.cpp:149
+msgid "&Convert"
+msgstr "&Konwertuj"
+
+#: ../src/richtext/richtextctrl.cpp:326 ../src/osx/textctrl_osx.cpp:583
+#: ../src/common/stockitem.cpp:150 ../src/msw/textctrl.cpp:2284
+msgid "&Copy"
+msgstr "&Kopiuj"
+
+#: ../src/generic/hyperlinkg.cpp:156
+msgid "&Copy URL"
+msgstr "&Kopiuj URL"
+
+#: ../src/common/headerctrlcmn.cpp:328
+msgid "&Customize..."
+msgstr "&Dostosuj..."
+
+#: ../src/generic/dbgrptg.cpp:334
+msgid "&Debug report preview:"
+msgstr "Po&dgląd raportu błędów:"
+
+#: ../src/richtext/richtexttabspage.cpp:142
+#: ../src/richtext/richtextctrl.cpp:328 ../src/osx/textctrl_osx.cpp:585
+#: ../src/common/stockitem.cpp:152 ../src/msw/textctrl.cpp:2286
+msgid "&Delete"
+msgstr "&Usuń"
+
+#: ../src/richtext/richtextstyledlg.cpp:269
+msgid "&Delete Style..."
+msgstr "&Usuń styl..."
+
+#: ../src/common/stockitem.cpp:196
+msgid "&Descending"
+msgstr "&Malejąco"
+
+#: ../src/generic/logg.cpp:688
+msgid "&Details"
+msgstr "&Szczegóły"
+
+#: ../src/common/stockitem.cpp:153
+msgid "&Down"
+msgstr "W &dół"
+
+#: ../src/common/stockitem.cpp:154
+msgid "&Edit"
+msgstr "&Edytuj"
+
+#: ../src/richtext/richtextstyledlg.cpp:263
+msgid "&Edit Style..."
+msgstr "&Edytuj styl..."
+
+#: ../src/common/stockitem.cpp:155
+msgid "&Execute"
+msgstr "&Uruchom"
+
+#: ../src/common/stockitem.cpp:157 ../src/html/helpfrm.cpp:146
+msgid "&File"
+msgstr "&Plik"
+
+#: ../src/common/stockitem.cpp:158
+msgid "&Find"
+msgstr "&Znajdź"
+
+#: ../src/generic/wizard.cpp:626
+msgid "&Finish"
+msgstr "Za&kończ"
+
+#: ../src/common/stockitem.cpp:159
+#, fuzzy
+msgid "&First"
+msgstr "pierwszy"
+
+#: ../src/richtext/richtextsizepage.cpp:241
+msgid "&Floating mode:"
+msgstr "Tryb &ruchomy:"
+
+#: ../src/common/stockitem.cpp:160
+msgid "&Floppy"
+msgstr "&Dyskietka"
+
+#: ../src/common/stockitem.cpp:194
+#, fuzzy
+msgid "&Font"
+msgstr "&Czcionka:"
+
+#: ../src/generic/fontdlgg.cpp:371
+msgid "&Font family:"
+msgstr "&Rozmiar czcionki:"
+
+#: ../src/richtext/richtextliststylepage.cpp:194
+msgid "&Font for Level..."
+msgstr "&Czcionka dla poziomu..."
+
+#: ../src/richtext/richtextfontpage.cpp:156
+#: ../src/richtext/richtextsymboldlg.cpp:400
+msgid "&Font:"
+msgstr "&Czcionka:"
+
+#: ../src/common/stockitem.cpp:161
+msgid "&Forward"
+msgstr "&Dalej"
+
+#: ../src/richtext/richtextsymboldlg.cpp:451
+msgid "&From:"
+msgstr "&Od:"
+
+#: ../src/common/stockitem.cpp:162
+msgid "&Harddisk"
+msgstr "&Dysk twardy"
+
+#: ../src/richtext/richtextsizepage.cpp:348
+#: ../src/richtext/richtextsizepage.cpp:355
+msgid "&Height:"
+msgstr "&Wysokość:"
+
+#: ../src/generic/wizard.cpp:435 ../src/richtext/richtextstyledlg.cpp:303
+#: ../src/richtext/richtextsymboldlg.cpp:479 ../src/osx/menu_osx.cpp:785
+#: ../src/common/stockitem.cpp:163 ../src/html/helpfrm.cpp:147
+msgid "&Help"
+msgstr "&Pomoc"
+
+#: ../include/wx/richmsgdlg.h:30
+msgid "&Hide details"
+msgstr "&Ukryj szczegóły"
+
+#: ../src/common/stockitem.cpp:164
+msgid "&Home"
+msgstr "&Początek"
+
+#: ../src/richtext/richtextindentspage.cpp:184
+#: ../src/richtext/richtextliststylepage.cpp:372
+msgid "&Indentation (tenths of a mm)"
+msgstr "&Wcięcia (w dziesiątych częściach mm)"
+
+#: ../src/richtext/richtextindentspage.cpp:167
+#: ../src/richtext/richtextliststylepage.cpp:356
+msgid "&Indeterminate"
+msgstr "&Nieokreślony"
+
+#: ../src/common/stockitem.cpp:166
+msgid "&Index"
+msgstr "&Indeks"
+
+#: ../src/common/stockitem.cpp:167
+msgid "&Info"
+msgstr "&Info"
+
+#: ../src/common/stockitem.cpp:168
+msgid "&Italic"
+msgstr "&Kursywa"
+
+#: ../src/common/stockitem.cpp:169
+msgid "&Jump to"
+msgstr "&Skocz do"
+
+#: ../src/richtext/richtextindentspage.cpp:153
+#: ../src/richtext/richtextliststylepage.cpp:342
+msgid "&Justified"
+msgstr "&Wyrównanie obustronne"
+
+#: ../src/common/stockitem.cpp:174
+msgid "&Last"
+msgstr "&Ostatni"
+
+#: ../src/richtext/richtextindentspage.cpp:139
+#: ../src/richtext/richtextliststylepage.cpp:328
+msgid "&Left"
+msgstr "&Lewy"
+
+#: ../src/richtext/richtextindentspage.cpp:195
+#: ../src/richtext/richtextborderspage.cpp:269
+#: ../src/richtext/richtextborderspage.cpp:413
+#: ../src/richtext/richtextliststylepage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:187
+#: ../src/richtext/richtextmarginspage.cpp:301
+#: ../src/richtext/richtextsizepage.cpp:529
+#: ../src/richtext/richtextsizepage.cpp:536
+msgid "&Left:"
+msgstr "&Lewy:"
+
+#: ../src/richtext/richtextliststylepage.cpp:183
+msgid "&List level:"
+msgstr "Poziom &listy:"
+
+#: ../src/generic/logg.cpp:523
+msgid "&Log"
+msgstr "&Dziennik"
+
+#: ../src/univ/themes/win32.cpp:3748
+msgid "&Move"
+msgstr "Prz&enieś"
+
+#: ../src/richtext/richtextsizepage.cpp:669
+msgid "&Move the object to:"
+msgstr "&Przenieś obiekt do:"
+
+#: ../src/common/stockitem.cpp:175
+msgid "&Network"
+msgstr "&Sieć"
+
+#: ../src/richtext/richtexttabspage.cpp:136 ../src/common/stockitem.cpp:176
+msgid "&New"
+msgstr "&Nowy"
+
+#: ../src/aui/tabmdi.cpp:111 ../src/generic/mdig.cpp:100
+#: ../src/msw/mdi.cpp:176
+msgid "&Next"
+msgstr "&Następne"
+
+#: ../src/generic/wizard.cpp:431 ../src/generic/wizard.cpp:626
+msgid "&Next >"
+msgstr "&Dalej >"
+
+#: ../src/richtext/richtextsizepage.cpp:678
+msgid "&Next Paragraph"
+msgstr "&Następny akapit"
+
+#: ../src/generic/tipdlg.cpp:276
+msgid "&Next Tip"
+msgstr "&Następna porada"
+
+#: ../src/richtext/richtextstylepage.cpp:123
+msgid "&Next style:"
+msgstr "&Następny styl:"
+
+#: ../src/common/stockitem.cpp:177 ../src/msw/msgdlg.cpp:476
+msgid "&No"
+msgstr "&Nie"
+
+#: ../src/generic/dbgrptg.cpp:356
+msgid "&Notes:"
+msgstr "&Uwagi:"
+
+#: ../src/richtext/richtextbulletspage.cpp:264
+msgid "&Number:"
+msgstr "&Numer:"
+
+#: ../src/generic/fontdlgg.cpp:475 ../src/generic/fontdlgg.cpp:482
+#: ../src/osx/carbon/fontdlg.cpp:594 ../src/common/stockitem.cpp:178
+msgid "&OK"
+msgstr "&OK"
+
+#: ../src/generic/dbgrptg.cpp:342 ../src/common/stockitem.cpp:179
+#: ../src/html/helpfrm.cpp:137
+msgid "&Open..."
+msgstr "&Otwórz..."
+
+#: ../src/richtext/richtextindentspage.cpp:222
+msgid "&Outline level:"
+msgstr "Poziom &kontur:"
+
+#: ../src/richtext/richtextindentspage.cpp:293
+msgid "&Page Break"
+msgstr "&Podział strony"
+
+#: ../src/richtext/richtextctrl.cpp:327 ../src/osx/textctrl_osx.cpp:584
+#: ../src/common/stockitem.cpp:180 ../src/msw/textctrl.cpp:2285
+msgid "&Paste"
+msgstr "Wkl&ej"
+
+#: ../include/wx/richtext/richtextbuffer.h:4648
+msgid "&Picture"
+msgstr "&Obraz"
+
+#: ../src/generic/fontdlgg.cpp:422
+msgid "&Point size:"
+msgstr "&Rozmiar punktu:"
+
+#: ../src/richtext/richtexttabspage.cpp:114
+msgid "&Position (tenths of a mm):"
+msgstr "&Pozycja (w dziesiątych częściach mm):"
+
+#: ../src/richtext/richtextsizepage.cpp:511
+msgid "&Position mode:"
+msgstr "&Tryb pozycji:"
+
+#: ../src/common/stockitem.cpp:181
+msgid "&Preferences"
+msgstr "&Preferencje"
+
+#: ../src/aui/tabmdi.cpp:112 ../src/generic/mdig.cpp:101
+#: ../src/msw/mdi.cpp:177
+msgid "&Previous"
+msgstr "&Poprzednie"
+
+#: ../src/richtext/richtextsizepage.cpp:672
+msgid "&Previous Paragraph"
+msgstr "&Poprzedni akapit"
+
+#: ../src/common/stockitem.cpp:183
+msgid "&Print..."
+msgstr "&Drukuj..."
+
+#: ../src/richtext/richtextctrl.cpp:332 ../src/richtext/richtextctrl.cpp:4922
+#: ../src/common/stockitem.cpp:184
+msgid "&Properties"
+msgstr "&Właściwości"
+
+#: ../src/common/stockitem.cpp:156
+msgid "&Quit"
+msgstr "&Wyjście"
+
+#: ../src/richtext/richtextctrl.cpp:323 ../src/osx/textctrl_osx.cpp:580
+#: ../src/common/stockitem.cpp:185 ../src/common/cmdproc.cpp:293
+#: ../src/common/cmdproc.cpp:300 ../src/msw/textctrl.cpp:2281
+msgid "&Redo"
+msgstr "&Ponów"
+
+#: ../src/common/cmdproc.cpp:289 ../src/common/cmdproc.cpp:309
+msgid "&Redo "
+msgstr "&Ponów "
+
+#: ../src/richtext/richtextstyledlg.cpp:257
+msgid "&Rename Style..."
+msgstr "&Zmień nazwę stylu..."
+
+#: ../src/generic/fdrepdlg.cpp:179
+msgid "&Replace"
+msgstr "&Zastąp"
+
+#: ../src/richtext/richtextstyledlg.cpp:287
+msgid "&Restart numbering"
+msgstr "&Ponowienie numeracji"
+
+#: ../src/univ/themes/win32.cpp:3747
+msgid "&Restore"
+msgstr "&Przywróć"
+
+#: ../src/richtext/richtextindentspage.cpp:146
+#: ../src/richtext/richtextliststylepage.cpp:335
+msgid "&Right"
+msgstr "&Prawy"
+
+#: ../src/richtext/richtextindentspage.cpp:213
+#: ../src/richtext/richtextborderspage.cpp:299
+#: ../src/richtext/richtextborderspage.cpp:443
+#: ../src/richtext/richtextliststylepage.cpp:399
+#: ../src/richtext/richtextmarginspage.cpp:212
+#: ../src/richtext/richtextmarginspage.cpp:326
+#: ../src/richtext/richtextsizepage.cpp:599
+#: ../src/richtext/richtextsizepage.cpp:606
+msgid "&Right:"
+msgstr "&Prawy:"
+
+#: ../src/common/stockitem.cpp:190
+msgid "&Save"
+msgstr "Zapi&sz"
+
+#: ../src/common/stockitem.cpp:191
+msgid "&Save as"
+msgstr "Zapisz &Jako"
+
+#: ../include/wx/richmsgdlg.h:29
+msgid "&See details"
+msgstr "&Zobacz szczegóły"
+
+#: ../src/generic/tipdlg.cpp:270
+msgid "&Show tips at startup"
+msgstr "&Pokazuj porady przy uruchamianiu"
+
+#: ../src/univ/themes/win32.cpp:3750
+msgid "&Size"
+msgstr "&Rozmiar"
+
+#: ../src/richtext/richtextfontpage.cpp:168
+msgid "&Size:"
+msgstr "&Rozmiar:"
+
+#: ../src/generic/progdlgg.cpp:282
+msgid "&Skip"
+msgstr "&Pomiń"
+
+#: ../src/richtext/richtextindentspage.cpp:242
+#: ../src/richtext/richtextliststylepage.cpp:417
+msgid "&Spacing (tenths of a mm)"
+msgstr "&Odstępy (w dziesiątych częściach mm)"
+
+#: ../src/common/stockitem.cpp:197
+msgid "&Spell Check"
+msgstr "&Sprawdzanie pisowni"
+
+#: ../src/common/stockitem.cpp:198
+msgid "&Stop"
+msgstr "&Stop"
+
+#: ../src/richtext/richtextfontpage.cpp:284 ../src/common/stockitem.cpp:199
+msgid "&Strikethrough"
+msgstr "&Przekreślenie"
+
+#: ../src/generic/fontdlgg.cpp:382 ../src/richtext/richtextstylepage.cpp:104
+msgid "&Style:"
+msgstr "&Styl:"
+
+#: ../src/richtext/richtextstyledlg.cpp:198
+msgid "&Styles:"
+msgstr "&Style:"
+
+#: ../src/richtext/richtextsymboldlg.cpp:413
+msgid "&Subset:"
+msgstr "&Podzbiór:"
+
+#: ../src/richtext/richtextliststylepage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:222
+msgid "&Symbol:"
+msgstr "&Symbol:"
+
+#: ../include/wx/richtext/richtextbuffer.h:5668
+msgid "&Table"
+msgstr "&Tabela"
+
+#: ../src/common/stockitem.cpp:200
+msgid "&Top"
+msgstr "&Góra"
+
+#: ../src/richtext/richtextborderspage.cpp:329
+#: ../src/richtext/richtextborderspage.cpp:473
+#: ../src/richtext/richtextmarginspage.cpp:235
+#: ../src/richtext/richtextmarginspage.cpp:349
+#: ../src/richtext/richtextsizepage.cpp:564
+#: ../src/richtext/richtextsizepage.cpp:571
+msgid "&Top:"
+msgstr "&Góra:"
+
+#: ../src/generic/fontdlgg.cpp:444 ../src/common/stockitem.cpp:202
+msgid "&Underline"
+msgstr "&Podkreślony"
+
+#: ../src/richtext/richtextfontpage.cpp:243
+msgid "&Underlining:"
+msgstr "&Podkreślenie:"
+
+#: ../src/richtext/richtextctrl.cpp:322 ../src/osx/textctrl_osx.cpp:579
+#: ../src/common/stockitem.cpp:203 ../src/common/cmdproc.cpp:271
+#: ../src/msw/textctrl.cpp:2280
+msgid "&Undo"
+msgstr "&Cofnij"
+
+#: ../src/common/cmdproc.cpp:265
+msgid "&Undo "
+msgstr "&Cofnij "
+
+#: ../src/common/stockitem.cpp:204
+msgid "&Unindent"
+msgstr "&Cofnij wcięcie"
+
+#: ../src/common/stockitem.cpp:205
+msgid "&Up"
+msgstr "&W górę"
+
+#: ../src/richtext/richtextsizepage.cpp:275
+msgid "&Vertical alignment:"
+msgstr "&Wyrównanie pionowe:"
+
+#: ../src/generic/dbgrptg.cpp:340
+msgid "&View..."
+msgstr "&Widok..."
+
+#: ../src/generic/fontdlgg.cpp:393
+msgid "&Weight:"
+msgstr "&Waga"
+
+#: ../src/richtext/richtextsizepage.cpp:314
+#: ../src/richtext/richtextsizepage.cpp:321
+msgid "&Width:"
+msgstr "&Szerokość:"
+
+#: ../src/aui/tabmdi.cpp:311 ../src/aui/tabmdi.cpp:327
+#: ../src/aui/tabmdi.cpp:329 ../src/generic/mdig.cpp:294
+#: ../src/generic/mdig.cpp:310 ../src/generic/mdig.cpp:314
+#: ../src/msw/mdi.cpp:77
+msgid "&Window"
+msgstr "&Okno"
+
+#: ../src/common/stockitem.cpp:206 ../src/msw/msgdlg.cpp:476
+msgid "&Yes"
+msgstr "&Tak"
+
+#: ../src/common/config.cpp:523 ../src/msw/regconf.cpp:258
+#, c-format
+msgid "'%s' has extra '..', ignored."
+msgstr "'%s' ma nadmiarowe '..', zignorowane."
+
+#: ../src/common/valtext.cpp:249 ../src/common/valtext.cpp:251
+#: ../src/common/valtext.cpp:253 ../src/common/valtext.cpp:255
+#, c-format
+msgid "'%s' is invalid"
+msgstr "'%s' jest nieprawidłowy"
+
+#: ../src/common/cmdline.cpp:948 ../src/common/cmdline.cpp:966
+#, c-format
+msgid "'%s' is not a correct numeric value for option '%s'."
+msgstr "'%s' nie jest poprawną wartością numeryczną opcji '%s'."
+
+#: ../src/common/translation.cpp:1086
+#, c-format
+msgid "'%s' is not a valid message catalog."
+msgstr "'%s' nie jest prawidłowym katalogiem komunikatów."
+
+#: ../src/common/textbuf.cpp:239
+#, c-format
+msgid "'%s' is probably a binary buffer."
+msgstr "'%s' jest prawdopodobnie buforem binarnym."
+
+#: ../src/common/valtext.cpp:247
+#, c-format
+msgid "'%s' should be numeric."
+msgstr "'%s' powinno być numeryczne."
+
+#: ../src/common/valtext.cpp:239
+#, c-format
+msgid "'%s' should only contain ASCII characters."
+msgstr "'%s' powinien zawierać tylko znaki ASCII."
+
+#: ../src/common/valtext.cpp:241
+#, c-format
+msgid "'%s' should only contain alphabetic characters."
+msgstr "'%s' powinien zawierać tylko wartości znakowe."
+
+#: ../src/common/valtext.cpp:243
+#, c-format
+msgid "'%s' should only contain alphabetic or numeric characters."
+msgstr "'%s' powinien zawierać tylko wartości znakowe lub numeryczne."
+
+#: ../src/common/valtext.cpp:245
+#, c-format
+msgid "'%s' should only contain digits."
+msgstr "'%s' powinien zawierać tylko cyfry."
+
+#: ../src/richtext/richtextliststylepage.cpp:229
+#: ../src/richtext/richtextbulletspage.cpp:179
+msgid "(*)"
+msgstr "(*)"
+
+#: ../src/html/helpwnd.cpp:976
+msgid "(Help)"
+msgstr "(Pomoc)"
+
+#: ../src/richtext/richtextliststylepage.cpp:481
+#: ../src/richtext/richtextbulletspage.cpp:286
+msgid "(None)"
+msgstr "(Brak)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:504
+msgid "(Normal text)"
+msgstr "(Normalny tekst)"
+
+#: ../src/html/helpwnd.cpp:426 ../src/html/helpwnd.cpp:1119
+#: ../src/html/helpwnd.cpp:1745
+msgid "(bookmarks)"
+msgstr "(zakładki)"
+
+#: ../src/richtext/richtextindentspage.cpp:274
+#: ../src/richtext/richtextindentspage.cpp:286
+#: ../src/richtext/richtextindentspage.cpp:287
+#: ../src/richtext/richtextindentspage.cpp:311
+#: ../src/richtext/richtextindentspage.cpp:326
+#: ../src/richtext/richtextformatdlg.cpp:829
+#: ../src/richtext/richtextfontpage.cpp:331
+#: ../src/richtext/richtextfontpage.cpp:335
+#: ../src/richtext/richtextfontpage.cpp:339
+#: ../src/richtext/richtextliststylepage.cpp:448
+#: ../src/richtext/richtextliststylepage.cpp:460
+#: ../src/richtext/richtextliststylepage.cpp:461
+msgid "(none)"
+msgstr "(beznazwy)"
+
+#: ../src/richtext/richtextliststylepage.cpp:492
+#: ../src/richtext/richtextbulletspage.cpp:297
+msgid "*"
+msgstr "*"
+
+#: ../src/richtext/richtextliststylepage.cpp:236
+#: ../src/richtext/richtextbulletspage.cpp:186
+msgid "*)"
+msgstr "*)"
+
+#: ../src/richtext/richtextliststylepage.cpp:495
+#: ../src/richtext/richtextbulletspage.cpp:300
+msgid "+"
+msgstr "+"
+
+#: ../src/msw/utils.cpp:1324
+msgid ", 64-bit edition"
+msgstr ", wydanie 64-bitowe"
+
+#: ../src/richtext/richtextliststylepage.cpp:493
+#: ../src/richtext/richtextbulletspage.cpp:298
+msgid "-"
+msgstr "-"
+
+#: ../src/generic/filepickerg.cpp:66
+msgid "..."
+msgstr "..."
+
+#: ../src/richtext/richtextindentspage.cpp:276
+#: ../src/richtext/richtextliststylepage.cpp:450
+msgid "1.1"
+msgstr "1.1"
+
+#: ../src/richtext/richtextindentspage.cpp:277
+#: ../src/richtext/richtextliststylepage.cpp:451
+msgid "1.2"
+msgstr "1.2"
+
+#: ../src/richtext/richtextindentspage.cpp:278
+#: ../src/richtext/richtextliststylepage.cpp:452
+msgid "1.3"
+msgstr "1.3"
+
+#: ../src/richtext/richtextindentspage.cpp:279
+#: ../src/richtext/richtextliststylepage.cpp:453
+msgid "1.4"
+msgstr "1.4"
+
+#: ../src/richtext/richtextindentspage.cpp:280
+#: ../src/richtext/richtextliststylepage.cpp:454
+msgid "1.5"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:455
+msgid "1.6"
+msgstr "1.6"
+
+#: ../src/richtext/richtextindentspage.cpp:282
+#: ../src/richtext/richtextliststylepage.cpp:456
+msgid "1.7"
+msgstr "1.7"
+
+#: ../src/richtext/richtextindentspage.cpp:283
+#: ../src/richtext/richtextliststylepage.cpp:457
+msgid "1.8"
+msgstr "1.8"
+
+#: ../src/richtext/richtextindentspage.cpp:284
+#: ../src/richtext/richtextliststylepage.cpp:458
+msgid "1.9"
+msgstr "1.9"
+
+#: ../src/common/paper.cpp:141
+msgid "10 x 11 in"
+msgstr "10 x 11 cali"
+
+#: ../src/common/paper.cpp:114
+msgid "10 x 14 in"
+msgstr "10 x 14 cali"
+
+#: ../src/common/paper.cpp:115
+msgid "11 x 17 in"
+msgstr "11 x 17 cali"
+
+#: ../src/common/paper.cpp:185
+msgid "12 x 11 in"
+msgstr "12 x 11 cali"
+
+#: ../src/common/paper.cpp:142
+msgid "15 x 11 in"
+msgstr "15 x 11 cali"
+
+#: ../src/richtext/richtextindentspage.cpp:285
+#: ../src/richtext/richtextliststylepage.cpp:459
+msgid "2"
+msgstr "2"
+
+#: ../src/common/paper.cpp:133
+msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in"
+msgstr "Koperta 6 3/4, 3 5/8 x 6 1/2 cali"
+
+#: ../src/common/paper.cpp:140
+msgid "9 x 11 in"
+msgstr "9 x 11 cali"
+
+#: ../src/html/htmprint.cpp:431
+msgid ": file does not exist!"
+msgstr ": plik nie istnieje!"
+
+#: ../src/common/fontmap.cpp:199
+msgid ": unknown charset"
+msgstr ": nieznany zestaw znaków"
+
+#: ../src/common/fontmap.cpp:413
+msgid ": unknown encoding"
+msgstr ": nieznane kodowanie"
+
+#: ../src/generic/wizard.cpp:437
+msgid "< &Back"
+msgstr "< &Wstecz"
+
+#: ../src/osx/carbon/fontdlg.cpp:608 ../src/osx/carbon/fontdlg.cpp:815
+#: ../src/osx/carbon/fontdlg.cpp:835
+msgid "<Any Decorative>"
+msgstr "<dowolny ozdobny>"
+
+#: ../src/osx/carbon/fontdlg.cpp:609 ../src/osx/carbon/fontdlg.cpp:817
+#: ../src/osx/carbon/fontdlg.cpp:837
+msgid "<Any Modern>"
+msgstr "<dowolny współczesny>"
+
+#: ../src/osx/carbon/fontdlg.cpp:607 ../src/osx/carbon/fontdlg.cpp:813
+#: ../src/osx/carbon/fontdlg.cpp:833
+msgid "<Any Roman>"
+msgstr "<dowolny rzymski>"
+
+#: ../src/osx/carbon/fontdlg.cpp:610 ../src/osx/carbon/fontdlg.cpp:819
+#: ../src/osx/carbon/fontdlg.cpp:839
+msgid "<Any Script>"
+msgstr "<dowolny Skrypt>"
+
+#: ../src/osx/carbon/fontdlg.cpp:611 ../src/osx/carbon/fontdlg.cpp:824
+#: ../src/osx/carbon/fontdlg.cpp:843
+msgid "<Any Swiss>"
+msgstr "<dowolny szwajcarski>"
+
+#: ../src/osx/carbon/fontdlg.cpp:612 ../src/osx/carbon/fontdlg.cpp:821
+#: ../src/osx/carbon/fontdlg.cpp:841
+msgid "<Any Teletype>"
+msgstr "<dowolny Teletype>"
+
+#: ../src/osx/carbon/fontdlg.cpp:606
+msgid "<Any>"
+msgstr "<dowolny>"
+
+#: ../src/generic/filectrlg.cpp:286 ../src/generic/filectrlg.cpp:309
+msgid "<DIR>"
+msgstr "<KATALOG>"
+
+#: ../src/generic/filectrlg.cpp:290 ../src/generic/filectrlg.cpp:313
+msgid "<DRIVE>"
+msgstr "<NAPĘD>"
+
+#: ../src/generic/filectrlg.cpp:288 ../src/generic/filectrlg.cpp:311
+msgid "<LINK>"
+msgstr "<ŁĄCZE>"
+
+#: ../src/html/helpwnd.cpp:1279
+msgid "<b><i>Bold italic face.</i></b><br>"
+msgstr "<b><i>Pogrubiona kursywa.</i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1283
+msgid "<b><i>bold italic <u>underlined</u></i></b><br>"
+msgstr "<b><i>pogrubiona kursywa <u>z podkreśleniem</u></i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1278
+msgid "<b>Bold face.</b> "
+msgstr "<b>Pogrubienie.</b> "
+
+#: ../src/html/helpwnd.cpp:1277
+msgid "<i>Italic face.</i> "
+msgstr "<i>Kursywa.</i> "
+
+#: ../src/richtext/richtextliststylepage.cpp:494
+#: ../src/richtext/richtextbulletspage.cpp:299
+msgid ">"
+msgstr ">"
+
+#: ../src/generic/dbgrptg.cpp:318
+msgid "A debug report has been generated in the directory\n"
+msgstr "Raport błędów został wygenerowany w katalogu\n"
+
+#: ../src/common/debugrpt.cpp:578
+msgid "A debug report has been generated. It can be found in"
+msgstr "Raport błędów został wygenerowany. Znajduje się w"
+
+#: ../src/common/xtixml.cpp:418
+msgid "A non empty collection must consist of 'element' nodes"
+msgstr "Nie pusta kolekcja musi składać się z węzłów typu 'element'"
+
+#: ../src/richtext/richtextliststylepage.cpp:304
+#: ../src/richtext/richtextliststylepage.cpp:306
+#: ../src/richtext/richtextbulletspage.cpp:257
+#: ../src/richtext/richtextbulletspage.cpp:259
+msgid "A standard bullet name."
+msgstr "Standardowa nazwa wypunktowania."
+
+#: ../src/common/paper.cpp:218
+msgid "A0 sheet, 841 x 1189 mm"
+msgstr "Arkusz A0, 841 x 1189 mm"
+
+#: ../src/common/paper.cpp:219
+msgid "A1 sheet, 594 x 841 mm"
+msgstr "Arkusz A1, 594 x 841 mm"
+
+#: ../src/common/paper.cpp:160
+msgid "A2 420 x 594 mm"
+msgstr "A2 420 x 594 mm"
+
+#: ../src/common/paper.cpp:157
+msgid "A3 Extra 322 x 445 mm"
+msgstr "A3 Extra 322 x 445 mm"
+
+#: ../src/common/paper.cpp:162
+msgid "A3 Extra Transverse 322 x 445 mm"
+msgstr "A3 Extra Poprzecznie 322 x 445 mm"
+
+#: ../src/common/paper.cpp:171
+msgid "A3 Rotated 420 x 297 mm"
+msgstr "A3 Obrócone 420 x 297 mm"
+
+#: ../src/common/paper.cpp:161
+msgid "A3 Transverse 297 x 420 mm"
+msgstr "A3 Poprzecznie 297 x 420 mm"
+
+#: ../src/common/paper.cpp:107
+msgid "A3 sheet, 297 x 420 mm"
+msgstr "Arkusz A3, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:147
+msgid "A4 Extra 9.27 x 12.69 in"
+msgstr "A4 Extra 9.27 x 12.69 cali"
+
+#: ../src/common/paper.cpp:154
+msgid "A4 Plus 210 x 330 mm"
+msgstr "A4 Plus 210 x 330 mm"
+
+#: ../src/common/paper.cpp:172
+msgid "A4 Rotated 297 x 210 mm"
+msgstr "A4 Obrócone 297 x 210 mm"
+
+#: ../src/common/paper.cpp:149
+msgid "A4 Transverse 210 x 297 mm"
+msgstr "A4 Poprzecznie 210 x 297 mm"
+
+#: ../src/common/paper.cpp:98
+msgid "A4 sheet, 210 x 297 mm"
+msgstr "Arkusz A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:108
+msgid "A4 small sheet, 210 x 297 mm"
+msgstr "Mały arkusz A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:158
+msgid "A5 Extra 174 x 235 mm"
+msgstr "A5 Extra 174 x 235 mm"
+
+#: ../src/common/paper.cpp:173
+msgid "A5 Rotated 210 x 148 mm"
+msgstr "A5 Obrócone 210 x 148 mm"
+
+#: ../src/common/paper.cpp:155
+msgid "A5 Transverse 148 x 210 mm"
+msgstr "A5 Poprzecznie 148 x 210 mm"
+
+#: ../src/common/paper.cpp:109
+msgid "A5 sheet, 148 x 210 mm"
+msgstr "Arkusz A5, 148 x 210 mm"
+
+#: ../src/common/paper.cpp:165
+msgid "A6 105 x 148 mm"
+msgstr "A6 105 x 148 mm"
+
+#: ../src/common/paper.cpp:178
+msgid "A6 Rotated 148 x 105 mm"
+msgstr "A6 Obrócone 148 x 105 mm"
+
+#: ../src/generic/fontdlgg.cpp:83 ../src/richtext/richtextformatdlg.cpp:526
+#: ../src/osx/carbon/fontdlg.cpp:339
+msgid "ABCDEFGabcdefg12345"
+msgstr "ABCDEFGabcdefg12345"
+
+#: ../src/common/accelcmn.cpp:76
+msgid "ADD"
+msgstr "DODAJ"
+
+#: ../src/richtext/richtextsymboldlg.cpp:458 ../src/common/ftp.cpp:405
+msgid "ASCII"
+msgstr "ASCII"
+
+#: ../src/osx/menu_osx.cpp:630 ../src/common/stockitem.cpp:139
+#, fuzzy
+msgid "About"
+msgstr "Inform&acje"
+
+#: ../src/generic/aboutdlgg.cpp:140 ../src/msw/aboutdlg.cpp:64
+#, c-format
+msgid "About %s"
+msgstr "O %s"
+
+#: ../src/richtext/richtextsizepage.cpp:517
+msgid "Absolute"
+msgstr "Absolutne"
+
+#: ../src/common/stockitem.cpp:207
+#, fuzzy
+msgid "Actual Size"
+msgstr "&Bieżący rozmiar"
+
+#: ../src/common/stockitem.cpp:140
+msgid "Add"
+msgstr "Dodaj"
+
+#: ../src/richtext/richtextbuffer.cpp:10648
+msgid "Add column"
+msgstr "Dodaj kolumnę"
+
+#: ../src/html/helpwnd.cpp:439
+msgid "Add current page to bookmarks"
+msgstr "Dodaj bieżącą stronę do listy zakładek"
+
+#: ../src/richtext/richtextbuffer.cpp:10590
+msgid "Add row"
+msgstr "Dodaj wiersz"
+
+#: ../src/generic/colrdlgg.cpp:283
+msgid "Add to custom colours"
+msgstr "Dodaj do kolorów niestandardowych"
+
+#: ../include/wx/xtiprop.h:259
+msgid "AddToPropertyCollection called on a generic accessor"
+msgstr ""
+
+#: ../include/wx/xtiprop.h:197
+msgid "AddToPropertyCollection called w/o valid adder"
+msgstr ""
+
+#: ../src/html/helpctrl.cpp:159
+#, c-format
+msgid "Adding book %s"
+msgstr "Dodawanie książki %s"
+
+#: ../src/osx/carbon/dataview.cpp:1933
+msgid "Adding flavor TEXT failed"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1954
+msgid "Adding flavor utxt failed"
+msgstr ""
+
+#: ../src/common/preferencescmn.cpp:41
+msgid "Advanced"
+msgstr "Zaawansowane"
+
+#: ../src/richtext/richtextliststylepage.cpp:435
+msgid "After a paragraph:"
+msgstr "Za paragrafem:"
+
+#: ../src/common/stockitem.cpp:172
+msgid "Align Left"
+msgstr "Wyrównanie do lewej"
+
+#: ../src/common/stockitem.cpp:173
+msgid "Align Right"
+msgstr "Wyrównanie do prawej"
+
+#: ../src/richtext/richtextsizepage.cpp:263
+#, fuzzy
+msgid "Alignment"
+msgstr "&Wyrównanie"
+
+#: ../src/generic/prntdlgg.cpp:220
+msgid "All"
+msgstr "Wszystko"
+
+#: ../src/generic/filectrlg.cpp:1205 ../src/common/fldlgcmn.cpp:89
+#, c-format
+msgid "All files (%s)|%s"
+msgstr "Wszystkie pliki (%s)|%s"
+
+#: ../include/wx/defs.h:2884
+msgid "All files (*)|*"
+msgstr "Wszystkie pliki (*)|*"
+
+#: ../include/wx/defs.h:2881
+msgid "All files (*.*)|*.*"
+msgstr "Wszystkie pliki (*.*)|*.*"
+
+#: ../src/richtext/richtextstyles.cpp:1057
+msgid "All styles"
+msgstr "Wszystkie style"
+
+#: ../src/propgrid/manager.cpp:1496
+msgid "Alphabetic Mode"
+msgstr "Tryb Alfabetyczny"
+
+#: ../src/common/xtistrm.cpp:429
+msgid "Already Registered Object passed to SetObjectClassInfo"
+msgstr ""
+"Zarejestrowany wcześniej obiekt przekazany do funkcji SetObjectClassInfo"
+
+#: ../src/unix/dialup.cpp:354
+msgid "Already dialling ISP."
+msgstr "Już łączy z ISP."
+
+#: ../src/common/accelcmn.cpp:320 ../src/univ/themes/win32.cpp:3756
+#, fuzzy
+msgid "Alt+"
+msgstr "Alt-"
+
+#: ../src/common/debugrpt.cpp:581
+msgid "And includes the following files:\n"
+msgstr "I zawiera następujące pliki:\n"
+
+#: ../src/generic/animateg.cpp:162
+#, c-format
+msgid "Animation file is not of type %ld."
+msgstr "Plik animacyjny nie jest typu %ld."
+
+#: ../src/generic/logg.cpp:1034
+#, c-format
+msgid "Append log to file '%s' (choosing [No] will overwrite it)?"
+msgstr "Dołączyć dziennik do pliku '%s' (wybierając [Nie] zastąpisz go)?"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:610
+#: ../src/osx/menu_osx.cpp:649 ../src/osx/menu_osx.cpp:657
+msgid "Application"
+msgstr "Aplikacja"
+
+#: ../src/common/stockitem.cpp:141
+#, fuzzy
+msgid "Apply"
+msgstr "Z&astosuj"
+
+#: ../src/richtext/richtextliststylepage.cpp:482
+#: ../src/richtext/richtextbulletspage.cpp:287
+msgid "Arabic"
+msgstr "Arabski"
+
+#: ../src/common/fmapbase.cpp:153
+msgid "Arabic (ISO-8859-6)"
+msgstr "Arabski (ISO-8859-6)"
+
+# catalog file --> ?
+# domain --> ?
+#: ../src/msw/ole/automtn.cpp:661
+#, c-format
+msgid "Argument %u not found."
+msgstr "Nie znaleziono argumentu %u."
+
+#: ../src/generic/aboutdlgg.cpp:184
+msgid "Artists"
+msgstr "Artyści"
+
+#: ../src/common/stockitem.cpp:195
+msgid "Ascending"
+msgstr "Rosnąco"
+
+#: ../src/generic/filectrlg.cpp:468
+msgid "Attributes"
+msgstr "Właściwości"
+
+#: ../src/richtext/richtextliststylepage.cpp:294
+#: ../src/richtext/richtextbulletspage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:247
+msgid "Available fonts."
+msgstr "Dostępne czcionki."
+
+#: ../src/common/paper.cpp:138
+msgid "B4 (ISO) 250 x 353 mm"
+msgstr "B4 (ISO) 250 x 353 mm"
+
+#: ../src/common/paper.cpp:174
+msgid "B4 (JIS) Rotated 364 x 257 mm"
+msgstr "B4 (JIS) Obrócone 364 x 257 mm"
+
+#: ../src/common/paper.cpp:128
+msgid "B4 Envelope, 250 x 353 mm"
+msgstr "Koperta B4, 250 x 353 mm"
+
+#: ../src/common/paper.cpp:110
+msgid "B4 sheet, 250 x 354 mm"
+msgstr "Arkusz B4, 250 x 354 mm"
+
+#: ../src/common/paper.cpp:159
+msgid "B5 (ISO) Extra 201 x 276 mm"
+msgstr "B5 (ISO) Extra 201 x 276 mm"
+
+#: ../src/common/paper.cpp:175
+msgid "B5 (JIS) Rotated 257 x 182 mm"
+msgstr "B5 (JIS) Obrócone 257 x 182 mm"
+
+#: ../src/common/paper.cpp:156
+msgid "B5 (JIS) Transverse 182 x 257 mm"
+msgstr "B5 (JIS) Poprzecznie 182 x 257 mm"
+
+#: ../src/common/paper.cpp:129
+msgid "B5 Envelope, 176 x 250 mm"
+msgstr "Koperta B5, 176 x 250 mm"
+
+#: ../src/common/paper.cpp:111
+msgid "B5 sheet, 182 x 257 millimeter"
+msgstr "Arkusz B5, 182 x 257 mm"
+
+#: ../src/common/paper.cpp:183
+msgid "B6 (JIS) 128 x 182 mm"
+msgstr "B6 (JIS) 128 x 182 mm"
+
+#: ../src/common/paper.cpp:184
+msgid "B6 (JIS) Rotated 182 x 128 mm"
+msgstr "B6 (JIS) Obrócone 182 x 128 mm"
+
+#: ../src/common/paper.cpp:130
+msgid "B6 Envelope, 176 x 125 mm"
+msgstr "Koperta B6, 176 x 125 mm"
+
+#: ../src/common/accelcmn.cpp:49
+msgid "BACK"
+msgstr "WSTECZ"
+
+#: ../src/common/imagbmp.cpp:523 ../src/common/imagbmp.cpp:553
+#: ../src/common/imagbmp.cpp:568
+msgid "BMP: Couldn't allocate memory."
+msgstr "BMP: Nie można przydzielić pamięci."
+
+#: ../src/common/imagbmp.cpp:97
+msgid "BMP: Couldn't save invalid image."
+msgstr "BMP: Nie można zapisać nieprawidłowego obrazu.."
+
+#: ../src/common/imagbmp.cpp:338
+msgid "BMP: Couldn't write RGB color map."
+msgstr "BMP: Nie można zapisać mapy kolorów RGB."
+
+#: ../src/common/imagbmp.cpp:473
+msgid "BMP: Couldn't write data."
+msgstr "BMP: Nie można zapisać danych."
+
+#: ../src/common/imagbmp.cpp:239
+msgid "BMP: Couldn't write the file (Bitmap) header."
+msgstr "BMP: Nie można zapisać nagłówka pliku (Bitmap)."
+
+#: ../src/common/imagbmp.cpp:262
+msgid "BMP: Couldn't write the file (BitmapInfo) header."
+msgstr "BMP: Nie można zapisać nagłówka pliku (BitmapInfo)."
+
+#: ../src/common/imagbmp.cpp:133
+msgid "BMP: wxImage doesn't have own wxPalette."
+msgstr "BMP: wxImage nie ma własnej wxPalette."
+
+#: ../src/common/stockitem.cpp:142
+#, fuzzy
+msgid "Back"
+msgstr "&Wstecz"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:119
+#: ../src/richtext/richtextformatdlg.cpp:374
+msgid "Background"
+msgstr "Tło"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:131
+msgid "Background &colour:"
+msgstr "Kolor &tła"
+
+#: ../src/osx/carbon/fontdlg.cpp:406
+msgid "Background colour"
+msgstr "Kolor tła"
+
+#: ../src/common/fmapbase.cpp:160
+msgid "Baltic (ISO-8859-13)"
+msgstr "Bałtycki (ISO-8859-13)"
+
+#: ../src/common/fmapbase.cpp:151
+msgid "Baltic (old) (ISO-8859-4)"
+msgstr "Bałtycki (stary) (ISO-8859-4)"
+
+#: ../src/richtext/richtextliststylepage.cpp:426
+msgid "Before a paragraph:"
+msgstr "Przed paragrafem:"
+
+#: ../src/richtext/richtextliststylepage.cpp:489
+#: ../src/richtext/richtextbulletspage.cpp:294
+msgid "Bitmap"
+msgstr "Bitmap"
+
+#: ../src/osx/carbon/dataview.cpp:2396
+msgid "Bitmap renderer cannot render value; value type: "
+msgstr "Bitmap renderer nie mógł wyświetlić wartości; typ wartości:"
+
+#: ../src/generic/fontdlgg.cpp:333 ../src/richtext/richtextfontpage.cpp:337
+#: ../src/osx/carbon/fontdlg.cpp:540 ../src/common/stockitem.cpp:143
+msgid "Bold"
+msgstr "Pogrubiony"
+
+#: ../src/richtext/richtextborderspage.cpp:256
+#: ../src/richtext/richtextborderspage.cpp:389
+msgid "Border"
+msgstr "Obramowanie"
+
+#: ../src/richtext/richtextformatdlg.cpp:368
+msgid "Borders"
+msgstr "Ramki"
+
+#: ../src/richtext/richtextsizepage.cpp:285 ../src/common/stockitem.cpp:144
+msgid "Bottom"
+msgstr "Dolny"
+
+#: ../src/generic/prntdlgg.cpp:898
+msgid "Bottom margin (mm):"
+msgstr "Dolny margines (mm):"
+
+#: ../src/richtext/richtextbuffer.cpp:8861
+msgid "Box Properties"
+msgstr "&Właściwości bloku"
+
+#: ../src/richtext/richtextstyles.cpp:1061
+msgid "Box styles"
+msgstr "Style bloku"
+
+#: ../src/common/filepickercmn.cpp:43 ../src/common/filepickercmn.cpp:44
+msgid "Browse"
+msgstr "Przeglądaj"
+
+#: ../src/richtext/richtextliststylepage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:195
+msgid "Bullet &Alignment:"
+msgstr "&Wyrównanie wypunktowania:"
+
+#: ../src/richtext/richtextliststylepage.cpp:309
+msgid "Bullet style"
+msgstr "Styl wypunktowania"
+
+#: ../src/richtext/richtextformatdlg.cpp:342
+msgid "Bullets"
+msgstr "Wypunktowania"
+
+#: ../src/common/paper.cpp:99
+msgid "C sheet, 17 x 22 in"
+msgstr "Arkusz C, 17 x 22 cali"
+
+#: ../src/generic/logg.cpp:520
+msgid "C&lear"
+msgstr "&Wyczyść"
+
+#: ../src/generic/fontdlgg.cpp:406
+msgid "C&olour:"
+msgstr "K&olor:"
+
+#: ../src/common/paper.cpp:124
+msgid "C3 Envelope, 324 x 458 mm"
+msgstr "Koperta C3, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:125
+msgid "C4 Envelope, 229 x 324 mm"
+msgstr "Koperta C4, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:123
+msgid "C5 Envelope, 162 x 229 mm"
+msgstr "Koperta C5, 162 x 229 mm"
+
+#: ../src/common/paper.cpp:126
+msgid "C6 Envelope, 114 x 162 mm"
+msgstr "Koperta C6, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:127
+msgid "C65 Envelope, 114 x 229 mm"
+msgstr "Koperta C65, 114 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:66
+msgid "CANCEL"
+msgstr "ANULUJ"
+
+#: ../src/common/accelcmn.cpp:70
+msgid "CAPITAL"
+msgstr "CAPS"
+
+#: ../src/common/stockitem.cpp:146
+msgid "CD-Rom"
+msgstr "CD-Rom"
+
+#: ../src/html/chm.cpp:815 ../src/html/chm.cpp:874
+msgid "CHM handler currently supports only local files!"
+msgstr "Obsługa CHM obecnie wspiera tylko pliki lokalne!"
+
+#: ../src/common/accelcmn.cpp:67
+msgid "CLEAR"
+msgstr "WYCZYŚĆ"
+
+#: ../src/common/accelcmn.cpp:111
+msgid "COMMAND"
+msgstr "POLECENIE"
+
+#: ../src/richtext/richtextfontpage.cpp:291
+msgid "Ca&pitals"
+msgstr "&Duże litery"
+
+#: ../src/common/cmdproc.cpp:267
+msgid "Can't &Undo "
+msgstr "Nie można &cofnąć "
+
+#: ../src/common/image.cpp:2686
+msgid "Can't automatically determine the image format for non-seekable input."
+msgstr ""
+"Nie można automatycznie określić formatu obrazu dla nieprzeszukiwalnego "
+"wejścia."
+
+#: ../src/msw/registry.cpp:505
+#, c-format
+msgid "Can't close registry key '%s'"
+msgstr "Nie można zamknąć klucza rejestru '%s'"
+
+#: ../src/msw/registry.cpp:583
+#, c-format
+msgid "Can't copy values of unsupported type %d."
+msgstr "Nie można kopiować wartości nieobsługiwanego typu %d."
+
+#: ../src/msw/registry.cpp:486
+#, c-format
+msgid "Can't create registry key '%s'"
+msgstr "Nie można utworzyć klucza rejestru '%s'"
+
+#: ../src/msw/thread.cpp:696 ../src/os2/thread.cpp:494
+msgid "Can't create thread"
+msgstr "Nie można utworzyć wątku"
+
+#: ../src/msw/window.cpp:3783
+#, c-format
+msgid "Can't create window of class %s"
+msgstr "Nie można utworzyć okna klasy '%s'"
+
+#: ../src/msw/registry.cpp:776
+#, c-format
+msgid "Can't delete key '%s'"
+msgstr "Nie można usunąć klucza '%s'"
+
+#: ../src/msw/iniconf.cpp:458 ../src/os2/iniconf.cpp:471
+#, c-format
+msgid "Can't delete the INI file '%s'"
+msgstr "Nie można usunąć pliku INI '%s'"
+
+#: ../src/msw/registry.cpp:804
+#, c-format
+msgid "Can't delete value '%s' from key '%s'"
+msgstr "Nie można usunąć wartości '%s' z klucza '%s'"
+
+#: ../src/msw/registry.cpp:1161
+#, c-format
+msgid "Can't enumerate subkeys of key '%s'"
+msgstr "Nie można wyliczyć podkluczy klucza '%s'"
+
+#: ../src/msw/registry.cpp:1116
+#, c-format
+msgid "Can't enumerate values of key '%s'"
+msgstr "Nie można wyliczyć wartości klucza '%s'"
+
+#: ../src/msw/registry.cpp:1379
+#, c-format
+msgid "Can't export value of unsupported type %d."
+msgstr "Nie można wyeksportować wartości nieobsługiwanego typu %d."
+
+#: ../src/common/ffile.cpp:236
+#, c-format
+msgid "Can't find current position in file '%s'"
+msgstr "Nie można znaleźć bieżącej pozycji w pliku '%s'"
+
+#: ../src/msw/registry.cpp:416
+#, c-format
+msgid "Can't get info about registry key '%s'"
+msgstr "Nie można uzyskać informacji o kluczu rejestru '%s'"
+
+#: ../src/common/zstream.cpp:346
+msgid "Can't initialize zlib deflate stream."
+msgstr "Nie można zainicjować strumienia kompresji biblioteki zlib."
+
+#: ../src/common/zstream.cpp:185
+msgid "Can't initialize zlib inflate stream."
+msgstr "Nie można zainicjować strumienia dekompresji biblioteki zlib."
+
+#: ../src/msw/fswatcher.cpp:432
+#, c-format
+msgid "Can't monitor non-existent directory \"%s\" for changes."
+msgstr "Nie można monitorować zmian w nieistniejącym folderze \"%s\"."
+
+#: ../src/msw/registry.cpp:452
+#, c-format
+msgid "Can't open registry key '%s'"
+msgstr "Nie można otworzyć klucza rejestru '%s'"
+
+#: ../src/common/zstream.cpp:252
+#, c-format
+msgid "Can't read from inflate stream: %s"
+msgstr "Nie można czytać z dekompresowanego strumienia: %s"
+
+#: ../src/common/zstream.cpp:244
+msgid "Can't read inflate stream: unexpected EOF in underlying stream."
+msgstr ""
+"Nie można odczytać dekompresowanego strumienia: nieoczekiwany koniec w "
+"strumieniu."
+
+#: ../src/msw/registry.cpp:1048
+#, c-format
+msgid "Can't read value of '%s'"
+msgstr "Nie można odczytać wartości '%s'"
+
+#: ../src/msw/registry.cpp:877 ../src/msw/registry.cpp:909
+#: ../src/msw/registry.cpp:971
+#, c-format
+msgid "Can't read value of key '%s'"
+msgstr "Nie można odczytać wartości klucza '%s'"
+
+#: ../src/common/image.cpp:2483
+#, c-format
+msgid "Can't save image to file '%s': unknown extension."
+msgstr "Nie można zapisać obrazu do pliku '%s': nieznane rozszerzenie."
+
+#: ../src/generic/logg.cpp:579 ../src/generic/logg.cpp:996
+msgid "Can't save log contents to file."
+msgstr "Nie można zapisać zawartości dziennika w pliku."
+
+# ustalić?
+#: ../src/msw/thread.cpp:652 ../src/os2/thread.cpp:477
+msgid "Can't set thread priority"
+msgstr "Nie można zmienić priorytetu wątku"
+
+#: ../src/msw/registry.cpp:895 ../src/msw/registry.cpp:939
+#: ../src/msw/registry.cpp:1065
+#, c-format
+msgid "Can't set value of '%s'"
+msgstr "Nie można nadać wartości '%s'"
+
+#: ../src/unix/utilsunx.cpp:357
+msgid "Can't write to child process's stdin"
+msgstr ""
+
+#: ../src/common/zstream.cpp:427
+#, c-format
+msgid "Can't write to deflate stream: %s"
+msgstr "Nie można zapisywać do kompresowanego strumienia: %s"
+
+#: ../include/wx/msgdlg.h:274 ../src/generic/dirdlgg.cpp:107
+#: ../src/richtext/richtextstyledlg.cpp:300 ../src/common/stockitem.cpp:145
+#: ../src/msw/msgdlg.cpp:489 ../src/msw/progdlg.cpp:673
+#: ../src/gtk1/fontdlg.cpp:144 ../src/motif/msgdlg.cpp:196
+msgid "Cancel"
+msgstr "Zrezygnuj"
+
+#: ../src/os2/thread.cpp:116
+msgid "Cannot create mutex."
+msgstr "Nie można utworzyć muteksu."
+
+#: ../src/osx/carbon/dataview.cpp:895
+msgid "Cannot create new column's ID. Probably max. number of columns reached."
+msgstr ""
+"Nie można utworzyć nowego ID kolumny. Prawdopodobnie została osiągnięta "
+"maks. liczba kolumn."
+
+#: ../src/common/filefn.cpp:1335
+#, c-format
+msgid "Cannot enumerate files '%s'"
+msgstr "Nie można wyliczyć plików '%s'"
+
+#: ../src/msw/dir.cpp:264
+#, c-format
+msgid "Cannot enumerate files in directory '%s'"
+msgstr "Nie można wyliczyć plików w katalogu '%s'"
+
+#: ../src/msw/dialup.cpp:542
+#, c-format
+msgid "Cannot find active dialup connection: %s"
+msgstr "Nie można znaleźć aktywnego połączenia dialup: %s"
+
+#: ../src/msw/dialup.cpp:848
+msgid "Cannot find the location of address book file"
+msgstr "Nie można znaleźć lokalizacji pliku książki adresowej"
+
+#: ../src/msw/ole/automtn.cpp:562
+#, c-format
+msgid "Cannot get an active instance of \"%s\""
+msgstr "NIe można znaleźć aktywnej instancji \"%s\""
+
+#: ../src/unix/threadpsx.cpp:1030
+#, c-format
+msgid "Cannot get priority range for scheduling policy %d."
+msgstr "Nie można uzyskać zakresu priorytetów strategii harmogramowania %d."
+
+#: ../src/unix/utilsunx.cpp:983
+msgid "Cannot get the hostname"
+msgstr "Nie można pobrać nazwy serwera"
+
+#: ../src/unix/utilsunx.cpp:1019
+msgid "Cannot get the official hostname"
+msgstr "Nie można pobrać oficjalnej nazwy serwera"
+
+#: ../src/msw/dialup.cpp:949
+msgid "Cannot hang up - no active dialup connection."
+msgstr "Nie można rozłączyć - brak aktywnego połączenia dialup."
+
+#: ../include/wx/msw/ole/oleutils.h:52
+msgid "Cannot initialize OLE"
+msgstr "Nie można zainicjować OLE"
+
+#: ../src/common/socket.cpp:847
+msgid "Cannot initialize sockets"
+msgstr ""
+
+#: ../src/msw/volume.cpp:620
+#, c-format
+msgid "Cannot load icon from '%s'."
+msgstr "Nie można wczytać ikony z '%s'."
+
+#: ../src/xrc/xmlres.cpp:361
+#, c-format
+msgid "Cannot load resources from '%s'."
+msgstr "Nie można wczytać zasobów z pliku '%s'."
+
+#: ../src/xrc/xmlres.cpp:746
+#, c-format
+msgid "Cannot load resources from file '%s'."
+msgstr "Nie można wczytać zasobów z pliku '%s'."
+
+#: ../src/html/htmlfilt.cpp:137
+#, c-format
+msgid "Cannot open HTML document: %s"
+msgstr "Nie można otworzyć dokumentu HTML: %s"
+
+#: ../src/html/helpdata.cpp:664
+#, c-format
+msgid "Cannot open HTML help book: %s"
+msgstr "Nie można otworzyć książki pomocy HTML: %s"
+
+#: ../src/html/helpdata.cpp:297
+#, c-format
+msgid "Cannot open contents file: %s"
+msgstr "Nie można otworzyć pliku spisu treści: %s"
+
+#: ../src/generic/dcpsg.cpp:1751
+msgid "Cannot open file for PostScript printing!"
+msgstr "Nie można otworzyć pliku dla drukowania postscriptowego!"
+
+#: ../src/html/helpdata.cpp:311
+#, c-format
+msgid "Cannot open index file: %s"
+msgstr "Nie można otworzyć pliku indeksowego: %s"
+
+#: ../src/xrc/xmlres.cpp:728
+#, c-format
+msgid "Cannot open resources file '%s'."
+msgstr "Nie można wczytać zasobów z pliku '%s'."
+
+#: ../src/html/helpwnd.cpp:1537
+msgid "Cannot print empty page."
+msgstr "Nie można wydrukować pustej strony."
+
+#: ../src/msw/volume.cpp:507
+#, c-format
+msgid "Cannot read typename from '%s'!"
+msgstr "Nie można odczytać nazwy typu z  '%s'!"
+
+#: ../src/os2/thread.cpp:527
+#, c-format
+msgid "Cannot resume thread %lu"
+msgstr "Nie można wznowić wątku %lu"
+
+#: ../src/msw/thread.cpp:923
+#, c-format
+msgid "Cannot resume thread %lx"
+msgstr "Nie można wznowić wątku %lx"
+
+#: ../src/unix/threadpsx.cpp:1011
+msgid "Cannot retrieve thread scheduling policy."
+msgstr "Nie można uzyskać strategii harmonogramowania wątków."
+
+#: ../src/common/intl.cpp:542
+#, c-format
+msgid "Cannot set locale to language \"%s\"."
+msgstr "Nie można ustawić lokalizacji na język \"%s\"."
+
+#: ../src/unix/threadpsx.cpp:831 ../src/msw/thread.cpp:569
+msgid "Cannot start thread: error writing TLS."
+msgstr "Nie można wystartować wątku: błąd zapisu TLS."
+
+#: ../src/os2/thread.cpp:513
+#, c-format
+msgid "Cannot suspend thread %lu"
+msgstr "Nie można zawiesić wątku %lu"
+
+#: ../src/msw/thread.cpp:907
+#, c-format
+msgid "Cannot suspend thread %lx"
+msgstr "Nie można zawiesić wątku %lx"
+
+#: ../src/msw/thread.cpp:830
+msgid "Cannot wait for thread termination"
+msgstr "Nie można czekać na zakończenie wątku"
+
+#: ../src/html/helpwnd.cpp:546
+msgid "Case sensitive"
+msgstr "Uwzględniaj wielkość liter"
+
+#: ../src/propgrid/manager.cpp:1495
+msgid "Categorized Mode"
+msgstr "Tryb skategoryzowany"
+
+#: ../src/richtext/richtextbuffer.cpp:9273
+msgid "Cell Properties"
+msgstr "&Właściwości komórki"
+
+#: ../src/common/fmapbase.cpp:161
+msgid "Celtic (ISO-8859-14)"
+msgstr "Celtycki (ISO-8859-14)"
+
+#: ../src/richtext/richtextindentspage.cpp:160
+#: ../src/richtext/richtextliststylepage.cpp:349
+msgid "Cen&tred"
+msgstr "wyś&rodkowany"
+
+#: ../src/common/stockitem.cpp:170
+msgid "Centered"
+msgstr "Wyrównanie do środka"
+
+#: ../src/common/fmapbase.cpp:149
+msgid "Central European (ISO-8859-2)"
+msgstr "Środkowoeuropejski (ISO-8859-2)"
+
+#: ../src/richtext/richtextliststylepage.cpp:250
+#: ../src/richtext/richtextbulletspage.cpp:200
+msgid "Centre"
+msgstr "Wyrównanie do środka"
+
+#: ../src/richtext/richtextindentspage.cpp:162
+#: ../src/richtext/richtextindentspage.cpp:164
+#: ../src/richtext/richtextliststylepage.cpp:351
+#: ../src/richtext/richtextliststylepage.cpp:353
+msgid "Centre text."
+msgstr "Wyśrodkowanie tekstu."
+
+#: ../src/richtext/richtextsizepage.cpp:284
+msgid "Centred"
+msgstr "wyśrodkowany"
+
+#: ../src/richtext/richtextliststylepage.cpp:280
+#: ../src/richtext/richtextbulletspage.cpp:232
+msgid "Ch&oose..."
+msgstr "&Wybierz..."
+
+#: ../src/richtext/richtextbuffer.cpp:4029
+msgid "Change List Style"
+msgstr "Zmień styl listy"
+
+#: ../src/richtext/richtextbuffer.cpp:3380
+msgid "Change Object Style"
+msgstr "Zmień styl obiektu"
+
+#: ../src/richtext/richtextbuffer.cpp:3646
+msgid "Change Properties"
+msgstr "Zmień właściwości"
+
+#: ../src/richtext/richtextbuffer.cpp:3197
+msgid "Change Style"
+msgstr "Zmień styl"
+
+#: ../src/common/fileconf.cpp:372
+#, c-format
+msgid "Changes won't be saved to avoid overwriting the existing file \"%s\""
+msgstr ""
+"Zmiany nie zostaną zapisane, aby uniknąć nadpisania istniejącego pliku \"%s\""
+
+#: ../src/richtext/richtextstyles.cpp:1059
+msgid "Character styles"
+msgstr "Style znaku"
+
+#: ../src/richtext/richtextliststylepage.cpp:224
+#: ../src/richtext/richtextliststylepage.cpp:226
+#: ../src/richtext/richtextbulletspage.cpp:174
+#: ../src/richtext/richtextbulletspage.cpp:176
+msgid "Check to add a period after the bullet."
+msgstr "Zaznacz aby dodać kropkę po wypunktowaniu."
+
+#: ../src/richtext/richtextliststylepage.cpp:238
+#: ../src/richtext/richtextliststylepage.cpp:240
+#: ../src/richtext/richtextbulletspage.cpp:188
+#: ../src/richtext/richtextbulletspage.cpp:190
+msgid "Check to add a right parenthesis."
+msgstr "Zaznacz aby dodać prawy nawias."
+
+#: ../src/richtext/richtextliststylepage.cpp:231
+#: ../src/richtext/richtextliststylepage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:181
+#: ../src/richtext/richtextbulletspage.cpp:183
+msgid "Check to enclose the bullet in parentheses."
+msgstr "Zaznacz aby dołączyć wypunktowanie w nawiasach."
+
+#: ../src/osx/carbon/fontdlg.cpp:542 ../src/osx/carbon/fontdlg.cpp:544
+msgid "Check to make the font bold."
+msgstr "Zaznacz aby pogrubić czcionkę."
+
+#: ../src/osx/carbon/fontdlg.cpp:549 ../src/osx/carbon/fontdlg.cpp:551
+msgid "Check to make the font italic."
+msgstr "Zaznacz aby uzyskać kursywę czcionki."
+
+#: ../src/osx/carbon/fontdlg.cpp:558 ../src/osx/carbon/fontdlg.cpp:560
+msgid "Check to make the font underlined."
+msgstr "Zaznacz aby podkreślić czcionkę."
+
+#: ../src/richtext/richtextstyledlg.cpp:289
+#: ../src/richtext/richtextstyledlg.cpp:291
+msgid "Check to restart numbering."
+msgstr "Zaznacz aby ponownie uruchomić numerację."
+
+#: ../src/richtext/richtextfontpage.cpp:286
+#: ../src/richtext/richtextfontpage.cpp:288
+msgid "Check to show a line through the text."
+msgstr "Zaznacz aby pokazać linię poprzez tekst."
+
+#: ../src/richtext/richtextfontpage.cpp:293
+#: ../src/richtext/richtextfontpage.cpp:295
+msgid "Check to show the text in capitals."
+msgstr "Zaznacz aby wyświetlić tekst w dużych literach."
+
+#: ../src/richtext/richtextfontpage.cpp:300
+#: ../src/richtext/richtextfontpage.cpp:302
+msgid "Check to show the text in small capitals."
+msgstr "Zaznacz aby wyświetlić tekst w dużych literach."
+
+#: ../src/richtext/richtextfontpage.cpp:314
+#: ../src/richtext/richtextfontpage.cpp:316
+msgid "Check to show the text in subscript."
+msgstr "Zaznacz aby wyświetlić tekst w indeksie dolnym."
+
+#: ../src/richtext/richtextfontpage.cpp:307
+#: ../src/richtext/richtextfontpage.cpp:309
+msgid "Check to show the text in superscript."
+msgstr "Zaznacz aby wyświetlić tekst w indeksie górnym."
+
+#: ../src/msw/dialup.cpp:784
+msgid "Choose ISP to dial"
+msgstr "Wybierz ISP do połączenia"
+
+#: ../src/propgrid/props.cpp:1643
+msgid "Choose a directory:"
+msgstr "Wybierz katalog"
+
+#: ../src/propgrid/props.cpp:1702
+msgid "Choose a file"
+msgstr "Wybierz plik"
+
+#: ../src/generic/colrdlgg.cpp:144 ../src/gtk/colordlg.cpp:63
+msgid "Choose colour"
+msgstr "Wybierz kolor"
+
+#: ../src/generic/fontpickerg.cpp:50 ../src/gtk/fontdlg.cpp:75
+#: ../src/gtk1/fontdlg.cpp:125
+msgid "Choose font"
+msgstr "Wybierz czcionkę"
+
+#: ../src/common/module.cpp:74
+#, c-format
+msgid "Circular dependency involving module \"%s\" detected."
+msgstr ""
+
+#: ../src/aui/tabmdi.cpp:108 ../src/generic/mdig.cpp:97
+msgid "Cl&ose"
+msgstr "Zam&knij"
+
+#: ../src/msw/ole/automtn.cpp:673
+msgid "Class not registered."
+msgstr "Klasa niezarejestrowana."
+
+#: ../src/common/stockitem.cpp:147
+#, fuzzy
+msgid "Clear"
+msgstr "Wy&czyść"
+
+#: ../src/generic/logg.cpp:520
+msgid "Clear the log contents"
+msgstr "Wyczyść zawartość dziennika"
+
+#: ../src/richtext/richtextstyledlg.cpp:252
+#: ../src/richtext/richtextstyledlg.cpp:254
+msgid "Click to apply the selected style."
+msgstr "Kliknij, aby zastosować wybrany styl."
+
+#: ../src/richtext/richtextliststylepage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:283
+#: ../src/richtext/richtextbulletspage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:235
+msgid "Click to browse for a symbol."
+msgstr "Kliknij, aby wyszukać symbol."
+
+#: ../src/osx/carbon/fontdlg.cpp:589 ../src/osx/carbon/fontdlg.cpp:591
+msgid "Click to cancel changes to the font."
+msgstr "Kliknij, aby anulować zmiany czcionki."
+
+#: ../src/generic/fontdlgg.cpp:472 ../src/generic/fontdlgg.cpp:491
+msgid "Click to cancel the font selection."
+msgstr "Anulowanie wyboru czcionki"
+
+#: ../src/osx/carbon/fontdlg.cpp:570 ../src/osx/carbon/fontdlg.cpp:572
+msgid "Click to change the font colour."
+msgstr "Kliknij, aby zmienić kolor czcionki."
+
+#: ../src/richtext/richtextfontpage.cpp:276
+#: ../src/richtext/richtextfontpage.cpp:278
+msgid "Click to change the text background colour."
+msgstr "Kliknij, aby zmienić kolor tła tekstu."
+
+#: ../src/richtext/richtextfontpage.cpp:263
+#: ../src/richtext/richtextfontpage.cpp:265
+msgid "Click to change the text colour."
+msgstr "Kliknij, aby zmienić kolor tekstu."
+
+#: ../src/richtext/richtextliststylepage.cpp:195
+#: ../src/richtext/richtextliststylepage.cpp:197
+msgid "Click to choose the font for this level."
+msgstr "Kliknij, aby wybrać czcionkę dla tego poziomu."
+
+#: ../src/richtext/richtextstyledlg.cpp:279
+#: ../src/richtext/richtextstyledlg.cpp:281
+msgid "Click to close this window."
+msgstr "Kliknij, aby zamknąć to okno."
+
+#: ../src/osx/carbon/fontdlg.cpp:596 ../src/osx/carbon/fontdlg.cpp:598
+msgid "Click to confirm changes to the font."
+msgstr "Kliknij, aby potwierdzić zmiany czcionki."
+
+#: ../src/generic/fontdlgg.cpp:477 ../src/generic/fontdlgg.cpp:479
+#: ../src/generic/fontdlgg.cpp:484 ../src/generic/fontdlgg.cpp:486
+msgid "Click to confirm the font selection."
+msgstr "Potwierdzenie wyboru czcionki"
+
+#: ../src/richtext/richtextstyledlg.cpp:244
+#: ../src/richtext/richtextstyledlg.cpp:246
+msgid "Click to create a new box style."
+msgstr "Kliknij, aby utworzyć nowy styl bloku."
+
+#: ../src/richtext/richtextstyledlg.cpp:226
+#: ../src/richtext/richtextstyledlg.cpp:228
+msgid "Click to create a new character style."
+msgstr "Kliknij, aby utworzyć nowy styl znaków."
+
+#: ../src/richtext/richtextstyledlg.cpp:238
+#: ../src/richtext/richtextstyledlg.cpp:240
+msgid "Click to create a new list style."
+msgstr "Kliknij, aby utworzyć nowy styl listy."
+
+#: ../src/richtext/richtextstyledlg.cpp:232
+#: ../src/richtext/richtextstyledlg.cpp:234
+msgid "Click to create a new paragraph style."
+msgstr "Kliknij, aby utworzyć nowy styl paragrafu."
+
+#: ../src/richtext/richtexttabspage.cpp:137
+#: ../src/richtext/richtexttabspage.cpp:139
+msgid "Click to create a new tab position."
+msgstr "Kliknij, aby utworzyć nową pozycję karty."
+
+#: ../src/richtext/richtexttabspage.cpp:149
+#: ../src/richtext/richtexttabspage.cpp:151
+msgid "Click to delete all tab positions."
+msgstr "Kliknij, aby usunąć wszystkie pozycje kart."
+
+#: ../src/richtext/richtextstyledlg.cpp:270
+#: ../src/richtext/richtextstyledlg.cpp:272
+msgid "Click to delete the selected style."
+msgstr "Kliknij, aby usunąć wybrany styl."
+
+#: ../src/richtext/richtexttabspage.cpp:143
+#: ../src/richtext/richtexttabspage.cpp:145
+msgid "Click to delete the selected tab position."
+msgstr "Kliknij, aby usunąć wybraną pozycję karty."
+
+#: ../src/richtext/richtextstyledlg.cpp:264
+#: ../src/richtext/richtextstyledlg.cpp:266
+msgid "Click to edit the selected style."
+msgstr "Kliknij, aby edytować wybrany styl."
+
+#: ../src/richtext/richtextstyledlg.cpp:258
+#: ../src/richtext/richtextstyledlg.cpp:260
+msgid "Click to rename the selected style."
+msgstr "Kliknij, aby zmienić nazwę wybranego stylu."
+
+#: ../src/generic/dbgrptg.cpp:97 ../src/generic/progdlgg.cpp:804
+#: ../src/generic/progdlgg.cpp:809 ../src/richtext/richtextstyledlg.cpp:277
+#: ../src/richtext/richtextsymboldlg.cpp:476 ../src/common/stockitem.cpp:148
+#: ../src/msw/progdlg.cpp:170 ../src/msw/progdlg.cpp:679
+#: ../src/html/helpdlg.cpp:90
+msgid "Close"
+msgstr "Zamknij"
+
+#: ../src/aui/tabmdi.cpp:109 ../src/generic/mdig.cpp:98
+msgid "Close All"
+msgstr "Zamknij wszystko"
+
+#: ../src/common/stockitem.cpp:266
+msgid "Close current document"
+msgstr "Zamknij bieżący dokument"
+
+#: ../src/generic/logg.cpp:522
+msgid "Close this window"
+msgstr "Zamknij to okno"
+
+#: ../src/common/stockitem.cpp:193
+#, fuzzy
+msgid "Color"
+msgstr "Kolor"
+
+#: ../src/richtext/richtextformatdlg.cpp:723
+msgid "Colour"
+msgstr "Kolor"
+
+#: ../src/msw/colordlg.cpp:156
+#, c-format
+msgid "Colour selection dialog failed with error %0lx."
+msgstr "Okno wyboru koloru nie powiodło się z błędem %0lx."
+
+#: ../src/osx/carbon/fontdlg.cpp:566
+msgid "Colour:"
+msgstr "Kolor:"
+
+#: ../src/osx/carbon/dataview.cpp:900
+msgid "Column could not be added."
+msgstr "Kolumna nie mogła być dodana."
+
+#: ../src/osx/carbon/dataview.cpp:899
+msgid "Column description could not be initialized."
+msgstr "Opis kolumny nie może być zainicjowany."
+
+# catalog file --> ?
+# domain --> ?
+#: ../src/osx/carbon/dataview.cpp:1538 ../src/osx/carbon/dataview.cpp:1559
+msgid "Column index not found."
+msgstr "Nie znaleziono indeksu kolumny."
+
+#: ../src/osx/carbon/dataview.cpp:1614
+msgid "Column width could not be determined"
+msgstr "Szerokość kolumny nie może być ustalona"
+
+#: ../src/osx/carbon/dataview.cpp:901
+msgid "Column width could not be set."
+msgstr "Szerokość kolumny nie może być ustawiona."
+
+#: ../src/common/init.cpp:188
+#, c-format
+msgid ""
+"Command line argument %d couldn't be converted to Unicode and will be "
+"ignored."
+msgstr ""
+"Argument wiersza polecenia %d nie może zostać zamieniony na Unicode i "
+"zostanie zignorowany."
+
+#: ../src/msw/fontdlg.cpp:119
+#, c-format
+msgid "Common dialog failed with error code %0lx."
+msgstr ""
+
+#: ../src/gtk/window.cpp:4284
+msgid ""
+"Compositing not supported by this system, please enable it in your Window "
+"Manager."
+msgstr ""
+"Kompozycje nie są wspierane w tym systemie, proszę je włączyć w managerze."
+
+#: ../src/html/helpwnd.cpp:1554
+msgid "Compressed HTML Help file (*.chm)|*.chm|"
+msgstr "Skompresowane pliki pomocy HTML Help (*.chm)|*.chm|"
+
+#: ../src/generic/dirctrlg.cpp:544
+msgid "Computer"
+msgstr "Komputer"
+
+#: ../src/common/fileconf.cpp:965
+#, c-format
+msgid "Config entry name cannot start with '%c'."
+msgstr "Nazwa pozycji konfiguracji nie może zaczynać się od '%c'."
+
+#: ../src/gtk/filedlg.cpp:59
+msgid "Confirm"
+msgstr "Potwierdź"
+
+#: ../src/msw/mimetype.cpp:739
+msgid "Confirm registry update"
+msgstr "Potwierdź uaktualnienie rejestru"
+
+#: ../src/html/htmlwin.cpp:544
+msgid "Connecting..."
+msgstr "Łączenie..."
+
+#: ../src/html/helpwnd.cpp:482
+msgid "Contents"
+msgstr "Zawartość"
+
+#: ../src/common/strconv.cpp:2261
+#, c-format
+msgid "Conversion to charset '%s' doesn't work."
+msgstr "Nie działa konwersja do zestawu znaków '%s'."
+
+#: ../src/common/stockitem.cpp:149
+msgid "Convert"
+msgstr "KonwertujZawartość"
+
+#: ../src/html/htmlwin.cpp:1057
+#, c-format
+msgid "Copied to clipboard:\"%s\""
+msgstr "Skopiowano do schowka:\"%s\""
+
+#: ../src/generic/prntdlgg.cpp:252
+msgid "Copies:"
+msgstr "Kopie:"
+
+#: ../src/common/stockitem.cpp:150 ../src/stc/stc_i18n.cpp:18
+msgid "Copy"
+msgstr "Kopiuj"
+
+#: ../src/common/stockitem.cpp:258
+msgid "Copy selection"
+msgstr "Kopiuj wybór"
+
+#: ../src/html/chm.cpp:718
+#, c-format
+msgid "Could not create temporary file '%s'"
+msgstr "Nie można utworzyć tymczasowego pliku '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:1285 ../src/osx/carbon/dataview.cpp:1672
+msgid "Could not determine column index."
+msgstr "Nie można określić indeksu kolumny."
+
+#: ../src/osx/carbon/dataview.cpp:876
+msgid "Could not determine column's position"
+msgstr "Nie można określić pozycji kolumny"
+
+#: ../src/osx/carbon/dataview.cpp:843
+msgid "Could not determine number of columns."
+msgstr "Nie można określić ilości kolumn"
+
+#: ../src/osx/carbon/dataview.cpp:975
+msgid "Could not determine number of items"
+msgstr "Nie można określić ilości elementów"
+
+#: ../src/html/chm.cpp:273
+#, c-format
+msgid "Could not extract %s into %s: %s"
+msgstr "Nie można wydzielić %s do %s: %s"
+
+#: ../src/generic/tabg.cpp:1048
+msgid "Could not find tab for id"
+msgstr "Nie można znaleźć (tab) dla (id)"
+
+#: ../src/osx/carbon/dataview.cpp:2556 ../src/osx/carbon/dataview.cpp:2591
+#: ../src/osx/carbon/dataview.cpp:2615 ../src/osx/carbon/dataview.cpp:2636
+#: ../src/osx/carbon/dataview.cpp:2773
+msgid "Could not get header description."
+msgstr "Nie można uzyskać opisu nagłówku."
+
+#: ../src/osx/carbon/dataview.cpp:1169 ../src/osx/carbon/dataview.cpp:1195
+msgid "Could not get items."
+msgstr "Nie można uzyskać elementów."
+
+#: ../src/osx/carbon/dataview.cpp:2659 ../src/osx/carbon/dataview.cpp:2724
+msgid "Could not get property flags."
+msgstr "Nie można pobrać flag właściwości."
+
+#: ../src/osx/carbon/dataview.cpp:726
+msgid "Could not get selected items."
+msgstr "Nie można pobrać wybranych elementów."
+
+#: ../src/html/chm.cpp:444
+#, c-format
+msgid "Could not locate file '%s'."
+msgstr "Nie odnaleziono pliku '%s'."
+
+#: ../src/osx/carbon/dataview.cpp:845
+msgid "Could not remove column."
+msgstr "Nie można usunąć kolumny."
+
+#: ../src/osx/carbon/dataview.cpp:642
+msgid "Could not retrieve number of items"
+msgstr "Nie można pobrać ilości elementów"
+
+#: ../src/osx/carbon/dataview.cpp:2572
+msgid "Could not set alignment."
+msgstr "Nie można ustawić wyrównania."
+
+#: ../src/osx/carbon/dataview.cpp:2803
+msgid "Could not set column width."
+msgstr "Nie można ustawić szerokości kolumny."
+
+#: ../src/common/filefn.cpp:1568
+msgid "Could not set current working directory"
+msgstr "Nie udało się ustawić katalogu roboczego"
+
+#: ../src/osx/carbon/dataview.cpp:2775
+msgid "Could not set header description."
+msgstr "Nie można ustawić opisu nagłówka."
+
+#: ../src/osx/carbon/dataview.cpp:2596
+msgid "Could not set icon."
+msgstr "Nie można ustawić ikony."
+
+#: ../src/osx/carbon/dataview.cpp:2617
+msgid "Could not set maximum width."
+msgstr "Nie można ustawić maksymalnej szerokości."
+
+#: ../src/osx/carbon/dataview.cpp:2638
+msgid "Could not set minimum width."
+msgstr "Nie można ustawić minimalnej szerokości."
+
+#: ../src/osx/carbon/dataview.cpp:2664 ../src/osx/carbon/dataview.cpp:2729
+msgid "Could not set property flags."
+msgstr "Nie można ustawić flag własności."
+
+#: ../src/common/prntbase.cpp:1985
+msgid "Could not start document preview."
+msgstr "Nie można wystartować podglądu dokumentu."
+
+#: ../src/generic/printps.cpp:178 ../src/msw/printwin.cpp:210
+#: ../src/gtk/print.cpp:1086 ../src/gtk/gnome/gprint.cpp:922
+msgid "Could not start printing."
+msgstr "Nie można rozpocząć drukowania."
+
+# przenieść?
+#: ../src/common/wincmn.cpp:2114
+msgid "Could not transfer data to window"
+msgstr "Nie można przenieść danych do okna"
+
+#: ../src/os2/thread.cpp:160
+msgid "Couldn't acquire a mutex lock"
+msgstr "Nie można przechwycić muteksu"
+
+#: ../src/msw/imaglist.cpp:166 ../src/msw/imaglist.cpp:197
+#: ../src/msw/imaglist.cpp:209 ../src/msw/dragimag.cpp:193
+#: ../src/msw/dragimag.cpp:232
+msgid "Couldn't add an image to the image list."
+msgstr "Nie można dodać obrazu do listy obrazów."
+
+#: ../src/msw/timer.cpp:134 ../src/os2/timer.cpp:113
+msgid "Couldn't create a timer"
+msgstr "Nie można utworzyć stopera"
+
+#: ../src/osx/carbon/overlay.cpp:122
+msgid "Couldn't create the overlay window"
+msgstr "Nie można utworzyć okna nakładki"
+
+#: ../src/common/translation.cpp:2024
+msgid "Couldn't enumerate translations"
+msgstr "Nie można policzyć tłumaczeń"
+
+# dynamicznej? nieładne, a chyba zbędne
+#: ../src/common/dynlib.cpp:152
+#, c-format
+msgid "Couldn't find symbol '%s' in a dynamic library"
+msgstr "Nie można znaleźć symbolu '%s' w bibliotece"
+
+#: ../src/gtk/print.cpp:2023
+msgid "Couldn't get hatch style from wxBrush."
+msgstr "Nie można uzyskać stylów kreskowania z wxBrush."
+
+#: ../src/msw/thread.cpp:950
+msgid "Couldn't get the current thread pointer"
+msgstr "Nie można pobrać wskaźnika aktualnego wątku"
+
+#: ../src/osx/carbon/overlay.cpp:129
+msgid "Couldn't init the context on the overlay window"
+msgstr "Nie można zainicjować kontekstu w oknie nakładki"
+
+#: ../src/common/imaggif.cpp:263
+msgid "Couldn't initialize GIF hash table."
+msgstr ""
+
+#: ../src/common/imagpng.cpp:657
+msgid "Couldn't load a PNG image - file is corrupted or not enough memory."
+msgstr ""
+"Nie można wczytać obrazu PNG - plik jest uszkodzony lub zabrakło pamięci."
+
+#: ../src/unix/sound.cpp:470
+#, c-format
+msgid "Couldn't load sound data from '%s'."
+msgstr "Nie można wczytać danych dźwiękowych '%s'."
+
+#: ../src/msw/dirdlg.cpp:441
+msgid "Couldn't obtain folder name"
+msgstr "Nie można pobrać nazwy folderu"
+
+#: ../src/unix/sound_sdl.cpp:229
+#, c-format
+msgid "Couldn't open audio: %s"
+msgstr "Nie można otworzyć dźwięku: %s"
+
+#: ../src/msw/ole/dataobj.cpp:350
+#, c-format
+msgid "Couldn't register clipboard format '%s'."
+msgstr "Nie można zarejestrować formatu schowka '%s'."
+
+#: ../src/os2/thread.cpp:177
+msgid "Couldn't release a mutex"
+msgstr "Muteks nie mógł być uwolniony"
+
+#: ../src/msw/listctrl.cpp:756
+#, c-format
+msgid "Couldn't retrieve information about list control item %d."
+msgstr "Nie można pobrać informacji o elemencie listy kontroli %d."
+
+#: ../src/common/imagpng.cpp:746 ../src/common/imagpng.cpp:757
+#: ../src/common/imagpng.cpp:767
+msgid "Couldn't save PNG image."
+msgstr "Nie można zapisać obrazu PNG."
+
+#: ../src/msw/thread.cpp:715
+msgid "Couldn't terminate thread"
+msgstr "Nie można zakończyć wątku"
+
+#: ../src/common/xtistrm.cpp:170
+#, c-format
+msgid "Create Parameter %s not found in declared RTTI Parameters"
+msgstr ""
+
+#: ../src/generic/dirdlgg.cpp:317
+msgid "Create directory"
+msgstr "Tworzenie katalogu"
+
+#: ../src/generic/filedlgg.cpp:228 ../src/generic/dirdlgg.cpp:131
+msgid "Create new directory"
+msgstr "Utwórz nowy katalog"
+
+#: ../src/common/accelcmn.cpp:322
+#, fuzzy
+msgid "Ctrl+"
+msgstr "Ctrl-"
+
+#: ../src/richtext/richtextctrl.cpp:325 ../src/osx/textctrl_osx.cpp:582
+#: ../src/common/stockitem.cpp:151 ../src/msw/textctrl.cpp:2283
+msgid "Cu&t"
+msgstr "&Wytnij"
+
+#: ../src/generic/filectrlg.cpp:956
+msgid "Current directory:"
+msgstr "Bieżący katalog:"
+
+#: ../src/gtk/print.cpp:768
+msgid "Custom size"
+msgstr "Rozmiar użytkownika"
+
+#: ../src/common/headerctrlcmn.cpp:60
+msgid "Customize Columns"
+msgstr "Dostosuj kolumny"
+
+#: ../src/common/stockitem.cpp:151 ../src/stc/stc_i18n.cpp:17
+msgid "Cut"
+msgstr "Wytnij"
+
+#: ../src/common/stockitem.cpp:259
+msgid "Cut selection"
+msgstr "Wytnij wybór"
+
+#: ../src/common/fmapbase.cpp:152
+msgid "Cyrillic (ISO-8859-5)"
+msgstr "Cyrylica (ISO-8859-5)"
+
+#: ../src/common/paper.cpp:100
+msgid "D sheet, 22 x 34 in"
+msgstr "Arkusz D, 22 x 34 cali"
+
+#: ../src/msw/dde.cpp:708
+msgid "DDE poke request failed"
+msgstr "żądanie danych z serwera DDE nie powiodło się"
+
+#: ../src/common/accelcmn.cpp:79
+msgid "DECIMAL"
+msgstr "DECIMAL"
+
+#: ../src/common/accelcmn.cpp:47
+msgid "DEL"
+msgstr "DEL"
+
+#: ../src/common/accelcmn.cpp:48
+msgid "DELETE"
+msgstr "DELETE"
+
+#: ../src/common/imagbmp.cpp:1092
+msgid "DIB Header: Encoding doesn't match bitdepth."
+msgstr "Nagłówek DIB: kodowanie nie odpowiada rozdzielczości."
+
+#: ../src/common/imagbmp.cpp:1040
+msgid "DIB Header: Image height > 32767 pixels for file."
+msgstr "DIB nagłówek: Wysokość obrazu > 32767 pikseli."
+
+# dla pliku? moim zdaniem zbędne
+#: ../src/common/imagbmp.cpp:1032
+msgid "DIB Header: Image width > 32767 pixels for file."
+msgstr "Nagłówek DIB: Szerokość obrazu > 32767 pikseli."
+
+#: ../src/common/imagbmp.cpp:1060
+msgid "DIB Header: Unknown bitdepth in file."
+msgstr "Nagłówek DIB: Plik z nieznaną rozdzielczością."
+
+#: ../src/common/imagbmp.cpp:1074
+msgid "DIB Header: Unknown encoding in file."
+msgstr "Nagłówek DIB: Plik z nieznanym kodowaniem."
+
+#: ../src/common/accelcmn.cpp:80
+msgid "DIVIDE"
+msgstr "DZIELIĆ"
+
+#: ../src/common/paper.cpp:122
+msgid "DL Envelope, 110 x 220 mm"
+msgstr "Koperta DL, 110 x 220 mm"
+
+#: ../src/common/accelcmn.cpp:59
+msgid "DOWN"
+msgstr "DÓŁ"
+
+#: ../src/richtext/richtextborderspage.cpp:545
+msgid "Dashed"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1921
+msgid "Data object has invalid data format"
+msgstr "Obiekt danych ma nieprawidłowy format"
+
+#: ../src/osx/carbon/dataview.cpp:2491
+msgid "Date renderer cannot render value; value type: "
+msgstr "Render daty nie może renderować wartości; typ wartości:"
+
+#: ../src/generic/dbgrptg.cpp:300
+#, c-format
+msgid "Debug report \"%s\""
+msgstr "Raport błędów \"%s\""
+
+#: ../src/common/debugrpt.cpp:210
+msgid "Debug report couldn't be created."
+msgstr "Wygenerowanie raport błędów nie powiodło się."
+
+#: ../src/common/debugrpt.cpp:558
+msgid "Debug report generation has failed."
+msgstr "Generowanie raportu błędów nie powiodło się."
+
+#: ../src/generic/fontdlgg.cpp:323
+msgid "Decorative"
+msgstr "Decorative"
+
+#: ../src/common/fmapbase.cpp:796
+msgid "Default encoding"
+msgstr "Kodowanie domyślne"
+
+#: ../src/dfb/fontmgr.cpp:180
+msgid "Default font"
+msgstr "Domyślna czcionka"
+
+#: ../src/generic/prntdlgg.cpp:515
+msgid "Default printer"
+msgstr "Domyślna drukarka"
+
+#: ../src/richtext/richtextbuffer.cpp:7793 ../src/common/stockitem.cpp:152
+#: ../src/stc/stc_i18n.cpp:20
+msgid "Delete"
+msgstr "Usuń"
+
+#: ../src/richtext/richtexttabspage.cpp:148
+msgid "Delete A&ll"
+msgstr "&Usuń wszystko"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+msgid "Delete Style"
+msgstr "Usuń styl"
+
+#: ../src/richtext/richtextctrl.cpp:1231 ../src/richtext/richtextctrl.cpp:1452
+msgid "Delete Text"
+msgstr "Usuń tekst"
+
+#: ../src/richtext/richtextbuffer.cpp:10540
+msgid "Delete column"
+msgstr "Usuń kolumnęUsuń wybór"
+
+#: ../src/generic/editlbox.cpp:274
+msgid "Delete item"
+msgstr "Usuń pozycję"
+
+#: ../src/richtext/richtextbuffer.cpp:10472
+msgid "Delete row"
+msgstr "Usuń wiersz"
+
+#: ../src/common/stockitem.cpp:260
+msgid "Delete selection"
+msgstr "Usuń wybór"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+#, c-format
+msgid "Delete style %s?"
+msgstr "Usuń styl %s?"
+
+#: ../src/unix/snglinst.cpp:295
+#, c-format
+msgid "Deleted stale lock file '%s'."
+msgstr "Nieaktualny plik blokujący '%s' został usunięty."
+
+#: ../src/common/module.cpp:124
+#, c-format
+msgid "Dependency \"%s\" of module \"%s\" doesn't exist."
+msgstr "Zależność \"%s\" z modułu \"%s\" nie istnieje."
+
+#: ../src/common/stockitem.cpp:196
+msgid "Descending"
+msgstr "MalejącoKodowanie domyślne"
+
+#: ../src/generic/dirctrlg.cpp:626
+msgid "Desktop"
+msgstr "Pulpit"
+
+#: ../src/generic/aboutdlgg.cpp:70
+msgid "Developed by "
+msgstr "Opracowane przez"
+
+#: ../src/generic/aboutdlgg.cpp:176
+msgid "Developers"
+msgstr "Programiści"
+
+#: ../src/msw/dialup.cpp:393
+msgid ""
+"Dial up functions are unavailable because the remote access service (RAS) is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Funkcje Dial up nie są dostępne, ponieważ serwis zdalnego dostępu (RAS) nie "
+"jest zainstalowany na tej maszynie. Zainstaluj go."
+
+#: ../src/generic/tipdlg.cpp:230
+msgid "Did you know..."
+msgstr "Czy wiesz że..."
+
+#: ../src/dfb/wrapdfb.cpp:63
+#, c-format
+msgid "DirectFB error %d occurred."
+msgstr ""
+
+#: ../src/motif/filedlg.cpp:219
+msgid "Directories"
+msgstr "Katalogi"
+
+#: ../src/common/filefn.cpp:1250
+#, c-format
+msgid "Directory '%s' couldn't be created"
+msgstr "Nie można utworzyć katalogu '%s'"
+
+#: ../src/common/filefn.cpp:1270
+#, c-format
+msgid "Directory '%s' couldn't be deleted"
+msgstr "Nie można usunąć katalogu '%s'"
+
+#: ../src/generic/dirdlgg.cpp:233
+msgid "Directory does not exist"
+msgstr "Katalog nie istnieje"
+
+#: ../src/generic/filectrlg.cpp:1412
+msgid "Directory doesn't exist."
+msgstr "Katalog nie istnieje."
+
+#: ../src/common/docview.cpp:455
+msgid "Discard changes and reload the last saved version?"
+msgstr "Odrzucić zmiany i wczytać ponownie ostatnio zapisaną wersję?"
+
+#: ../src/html/helpwnd.cpp:512
+msgid ""
+"Display all index items that contain given substring. Search is case "
+"insensitive."
+msgstr ""
+"Wyświetla wszystkie elementy indeksu zawierające podany łańcuch. Szuka bez "
+"uwzględniania wielkości liter."
+
+#: ../src/html/helpwnd.cpp:692
+msgid "Display options dialog"
+msgstr "Wyświetl okno dialogowe opcji"
+
+#: ../src/html/helpwnd.cpp:326
+msgid "Displays help as you browse the books on the left."
+msgstr "Wyświetla pomoc podczas przeglądania książek po lewej."
+
+#: ../src/msw/mimetype.cpp:732
+msgid ""
+"Do you want to overwrite the command used to %s files with extension \"%s"
+"\" ?\n"
+"Current value is \n"
+"%s, \n"
+"New value is \n"
+"%s %1"
+msgstr ""
+"Chcesz zastąpić polecenie używane do plików %s z rozszerzeniem \"%s\" ?\n"
+"Bieżaca wartość to \n"
+"%s, \n"
+"Nowa wartość to \n"
+"%s %1"
+
+#: ../src/common/docview.cpp:531
+#, fuzzy, c-format
+msgid "Do you want to save changes to %s?"
+msgstr "Chcesz zapisać zmiany w dokumencie %s?"
+
+#: ../src/common/prntbase.cpp:525
+msgid "Document:"
+msgstr "Dokument:"
+
+#: ../src/generic/aboutdlgg.cpp:73
+msgid "Documentation by "
+msgstr "Dokumentacja autorstwa"
+
+#: ../src/generic/aboutdlgg.cpp:180
+msgid "Documentation writers"
+msgstr "Autorzy dokumentacji"
+
+#: ../src/common/sizer.cpp:2680
+msgid "Don't Save"
+msgstr "Nie Zapisuj"
+
+#: ../src/msw/frame.cpp:122 ../src/html/htmlwin.cpp:611
+msgid "Done"
+msgstr "Zrobione"
+
+#: ../src/generic/progdlgg.cpp:481 ../src/msw/progdlg.cpp:407
+msgid "Done."
+msgstr "Zrobione."
+
+#: ../src/richtext/richtextborderspage.cpp:544
+msgid "Dotted"
+msgstr "Kropkowany"
+
+#: ../src/richtext/richtextborderspage.cpp:546
+#, fuzzy
+msgid "Double"
+msgstr "podwójnie"
+
+#: ../src/common/paper.cpp:177
+msgid "Double Japanese Postcard Rotated 148 x 200 mm"
+msgstr "Podwójna Japońska Pocztówka Obrócona 148 x 200 mm"
+
+#: ../src/common/xtixml.cpp:273
+#, c-format
+msgid "Doubly used id : %d"
+msgstr "Dwukrotnie użyty identyfikator : %d"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:153
+msgid "Down"
+msgstr "W dół"
+
+#: ../src/richtext/richtextctrl.cpp:814
+msgid "Drag"
+msgstr "Przeciągnij"
+
+#: ../src/common/paper.cpp:101
+msgid "E sheet, 34 x 44 in"
+msgstr "Arkusz E, 34 x 44 cale"
+
+#: ../src/common/accelcmn.cpp:61
+msgid "END"
+msgstr "END"
+
+#: ../src/common/accelcmn.cpp:52
+msgid "ENTER"
+msgstr "ENTER"
+
+#: ../src/unix/fswatcher_inotify.cpp:535
+msgid "EOF while reading from inotify descriptor"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:64
+msgid "ESC"
+msgstr "ESC"
+
+#: ../src/common/accelcmn.cpp:65
+msgid "ESCAPE"
+msgstr "ESCAPE"
+
+#: ../src/common/accelcmn.cpp:73
+msgid "EXECUTE"
+msgstr "WYKONAĆ"
+
+#: ../src/common/stockitem.cpp:154
+#, fuzzy
+msgid "Edit"
+msgstr "&Edytuj"
+
+#: ../src/generic/editlbox.cpp:272
+msgid "Edit item"
+msgstr "Edytuj pozycję"
+
+#: ../include/wx/generic/progdlgg.h:84
+msgid "Elapsed time:"
+msgstr "Upłynęło już:"
+
+#: ../src/richtext/richtextsizepage.cpp:350
+#: ../src/richtext/richtextsizepage.cpp:352
+#: ../src/richtext/richtextsizepage.cpp:462
+#: ../src/richtext/richtextsizepage.cpp:464
+#, fuzzy
+msgid "Enable the height value."
+msgstr "włącz wartość wysokości."
+
+#: ../src/richtext/richtextsizepage.cpp:435
+#: ../src/richtext/richtextsizepage.cpp:437
+msgid "Enable the maximum width value."
+msgstr "Włącz wartość maksymalnej szerokości."
+
+#: ../src/richtext/richtextsizepage.cpp:408
+#: ../src/richtext/richtextsizepage.cpp:410
+#, fuzzy
+msgid "Enable the minimum height value."
+msgstr "Włącz minimalną wartość wysokości."
+
+#: ../src/richtext/richtextsizepage.cpp:381
+#: ../src/richtext/richtextsizepage.cpp:383
+msgid "Enable the minimum width value."
+msgstr "Włącz wartość minimalnej szerokości."
+
+#: ../src/richtext/richtextsizepage.cpp:316
+#: ../src/richtext/richtextsizepage.cpp:318
+msgid "Enable the width value."
+msgstr "Włącz wartość szerokości."
+
+#: ../src/richtext/richtextsizepage.cpp:277
+#: ../src/richtext/richtextsizepage.cpp:279
+msgid "Enable vertical alignment."
+msgstr "Włącz wyrównanie w pionie."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:133
+#: ../src/richtext/richtextbackgroundpage.cpp:135
+msgid "Enables a background colour."
+msgstr "Włącza kolor tła"
+
+#: ../src/richtext/richtextstyledlg.cpp:931
+msgid "Enter a box style name"
+msgstr "Podaj nową nazwę stylu bloku"
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+msgid "Enter a character style name"
+msgstr "Wprowadź nazwę stylu znaku"
+
+#: ../src/richtext/richtextstyledlg.cpp:817
+msgid "Enter a list style name"
+msgstr "Wprowadź nazwę listy stylu"
+
+#: ../src/richtext/richtextstyledlg.cpp:890
+msgid "Enter a new style name"
+msgstr "Podaj nową nazwę stylu"
+
+#: ../src/richtext/richtextstyledlg.cpp:651
+msgid "Enter a paragraph style name"
+msgstr "Wprowadź nazwę stylu paragrafu"
+
+#: ../src/generic/dbgrptg.cpp:174
+#, c-format
+msgid "Enter command to open file \"%s\":"
+msgstr "Wprowadź komendę otwierającą plik \"%s\":"
+
+#: ../src/generic/helpext.cpp:463
+msgid "Entries found"
+msgstr "Znalezione pozycje"
+
+#: ../src/common/paper.cpp:143
+msgid "Envelope Invite 220 x 220 mm"
+msgstr "Koperta Invite 220 x 220 mm"
+
+#: ../src/common/config.cpp:473
+#, c-format
+msgid ""
+"Environment variables expansion failed: missing '%c' at position %u in '%s'."
+msgstr ""
+"Rozwinięcie zmiennych środowiskowych nie powiodło się: zabrakło '%c' na "
+"pozycji '%u' w '%s'."
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/dirctrlg.cpp:688
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:791
+#: ../src/generic/filectrlg.cpp:805 ../src/generic/filectrlg.cpp:821
+#: ../src/generic/filectrlg.cpp:1381 ../src/generic/filectrlg.cpp:1412
+#: ../src/gtk/filedlg.cpp:73 ../src/gtk1/fontdlg.cpp:74
+msgid "Error"
+msgstr "Błąd"
+
+#: ../src/unix/epolldispatcher.cpp:103
+msgid "Error closing epoll descriptor"
+msgstr "Błąd zamknięcia deskryptora epoll"
+
+#: ../src/unix/fswatcher_kqueue.cpp:114
+msgid "Error closing kqueue instance"
+msgstr ""
+
+#: ../src/generic/dirdlgg.cpp:251
+msgid "Error creating directory"
+msgstr "Błąd przy tworzeniu katalogu"
+
+#: ../src/common/imagbmp.cpp:1103
+msgid "Error in reading image DIB."
+msgstr "Błąd odczytu obrazu DIB."
+
+#: ../src/propgrid/propgrid.cpp:6563
+#, c-format
+msgid "Error in resource: %s"
+msgstr "Błąd w zasobie: %s"
+
+#: ../src/common/fileconf.cpp:453
+msgid "Error reading config options."
+msgstr "Błąd odczytu opcji konfiguracji."
+
+#: ../src/common/fileconf.cpp:1064
+msgid "Error saving user configuration data."
+msgstr "Błąd zapisu konfiguracji użytkownika."
+
+#: ../src/gtk/print.cpp:680
+msgid "Error while printing: "
+msgstr "Błąd podczas drukowania:"
+
+#: ../src/common/log.cpp:225
+msgid "Error: "
+msgstr "Błąd: "
+
+#: ../src/common/fmapbase.cpp:150
+msgid "Esperanto (ISO-8859-3)"
+msgstr "Esperanto (ISO-8859-3)"
+
+#: ../include/wx/generic/progdlgg.h:85
+msgid "Estimated time:"
+msgstr "Szacowany czas:"
+
+#: ../src/unix/fswatcher_inotify.cpp:639
+msgid "Event queue overflowed"
+msgstr "Przepełniona kolejka zdarzeń"
+
+#: ../src/generic/dbgrptg.cpp:234
+msgid "Executable files (*.exe)|*.exe|"
+msgstr "Pliki wykonywalne (*.exe)|*.exe|"
+
+#: ../src/common/stockitem.cpp:155
+msgid "Execute"
+msgstr "Uruchom"
+
+#: ../src/msw/utilsexc.cpp:888
+#, c-format
+msgid "Execution of command '%s' failed"
+msgstr "Wykonanie polecenia '%s' nie powiodło się"
+
+#: ../src/os2/utilsexc.cpp:163
+#, c-format
+msgid "Execution of command '%s' failed with error: %ul"
+msgstr "Wykonanie polecenia '%s' nie powiodło się; błąd: %ul"
+
+#: ../src/common/paper.cpp:106
+msgid "Executive, 7 1/4 x 10 1/2 in"
+msgstr "Executive, 7 1/4 x 10 1/2 cali"
+
+#: ../src/msw/registry.cpp:1230
+#, c-format
+msgid ""
+"Exporting registry key: file \"%s\" already exists and won't be overwritten."
+msgstr ""
+"Eksport klucza rejestrów: plik \"%s\" już istnieje i nie może zostać "
+"nadpisany."
+
+#: ../src/common/fmapbase.cpp:195
+msgid "Extended Unix Codepage for Japanese (EUC-JP)"
+msgstr "Japońska rozszerzona strona kodowa UNIX (EUC-JP)"
+
+#: ../src/html/chm.cpp:725
+#, c-format
+msgid "Extraction of '%s' into '%s' failed."
+msgstr "Pobranie '%s' do '%s' nie powiodło się."
+
+#: ../src/common/accelcmn.cpp:238 ../src/common/accelcmn.cpp:333
+msgid "F"
+msgstr "F"
+
+# To jest maska do tworzenia nazw typu NowaNaz1 itd
+#: ../src/propgrid/advprops.cpp:640
+msgid "Face Name"
+msgstr ""
+
+#: ../src/unix/snglinst.cpp:269
+msgid "Failed to access lock file."
+msgstr "Nie udało się dostać do pliku blokującego."
+
+#: ../src/unix/epolldispatcher.cpp:116
+#, c-format
+msgid "Failed to add descriptor %d to epoll descriptor %d"
+msgstr "Nie udało się dodać deskryptora %d do deskryptora epoll %d"
+
+#: ../src/msw/dib.cpp:548
+#, fuzzy, c-format
+msgid "Failed to allocate %luKb of memory for bitmap data."
+msgstr "Nie udała się rezerwacja %luKb pamięci na dane obrazu."
+
+#: ../src/common/glcmn.cpp:87
+msgid "Failed to allocate colour for OpenGL"
+msgstr "Nie udało się przydzielić koloru dla OpenGL"
+
+# uchwyt chyba zbędny
+#: ../src/unix/displayx11.cpp:288
+msgid "Failed to change video mode"
+msgstr "Nie udało się zmienić trybu video"
+
+#: ../src/common/image.cpp:3139
+#, fuzzy, c-format
+msgid "Failed to check format of image file \"%s\"."
+msgstr "Nie udało się zapisać obrazu do pliku \"%s\"."
+
+#: ../src/common/debugrpt.cpp:244
+#, c-format
+msgid "Failed to clean up debug report directory \"%s\""
+msgstr "Nie udało się czyszczenie katalogu raportu błędów \"%s\""
+
+# uchwyt chyba zbędny
+#: ../src/common/filename.cpp:211
+msgid "Failed to close file handle"
+msgstr "Nie udało się zamknąć pliku."
+
+#: ../src/unix/snglinst.cpp:334
+#, c-format
+msgid "Failed to close lock file '%s'"
+msgstr "Nie udało się zamknąć pliku blokującego '%s'"
+
+#: ../src/msw/clipbrd.cpp:115
+msgid "Failed to close the clipboard."
+msgstr "Nie udało się zamknąć schowka."
+
+#: ../src/x11/utils.cpp:204
+#, c-format
+msgid "Failed to close the display \"%s\""
+msgstr "Nie udało się zamknąć ekranu \"%s\""
+
+#: ../src/msw/dialup.cpp:818
+msgid "Failed to connect: missing username/password."
+msgstr "Nie udało się połączyć: brakuje użytkownika/hasła."
+
+#: ../src/msw/dialup.cpp:764
+msgid "Failed to connect: no ISP to dial."
+msgstr "Nie udało się połączyć: brak ISP."
+
+# uchwyt chyba zbędny
+#: ../src/common/textfile.cpp:200
+#, c-format
+msgid "Failed to convert file \"%s\" to Unicode."
+msgstr "Nie udało się zamienić pliku \"%s\" na Unicode."
+
+#: ../src/generic/logg.cpp:976
+msgid "Failed to copy dialog contents to the clipboard."
+msgstr "Nie udało się skopiować treści dialogu do schowka."
+
+#: ../src/msw/registry.cpp:691
+#, c-format
+msgid "Failed to copy registry value '%s'"
+msgstr "Nie udało się skopiować wartości rejestru '%s'"
+
+#: ../src/msw/registry.cpp:700
+#, c-format
+msgid "Failed to copy the contents of registry key '%s' to '%s'."
+msgstr "Nie udało się skopiować zawartości klucza rejestru '%s' do '%s'."
+
+#: ../src/common/filefn.cpp:1058
+#, c-format
+msgid "Failed to copy the file '%s' to '%s'"
+msgstr "Nie udało się skopiować pliku '%s' do '%s'."
+
+#: ../src/msw/registry.cpp:678
+#, c-format
+msgid "Failed to copy the registry subkey '%s' to '%s'."
+msgstr "Nie udało się kopiowanie klucza rejestru '%s' na '%s'."
+
+#: ../src/msw/dde.cpp:1073
+msgid "Failed to create DDE string"
+msgstr "Nie udało się utworzyć łańcucha DDE"
+
+#: ../src/msw/mdi.cpp:590
+msgid "Failed to create MDI parent frame."
+msgstr "Nie udało się utworzyć ramki rodzica MDI."
+
+#: ../src/common/filename.cpp:1080
+msgid "Failed to create a temporary file name"
+msgstr "Nie udało się wygenerować nazwy dla pliku tymczasowego"
+
+# dlaczego anonimowego?
+#: ../src/msw/utilsexc.cpp:235
+msgid "Failed to create an anonymous pipe"
+msgstr "Nie udało się utworzyć potoku"
+
+#: ../src/msw/ole/automtn.cpp:522
+#, c-format
+msgid "Failed to create an instance of \"%s\""
+msgstr "Nie udało się utworzenie instancji \"%s\""
+
+#: ../src/msw/dde.cpp:442
+#, c-format
+msgid "Failed to create connection to server '%s' on topic '%s'"
+msgstr "Nie udało się utworzyć połączenia do serwera '%s' na temat '%s'"
+
+#: ../src/msw/cursor.cpp:212
+msgid "Failed to create cursor."
+msgstr "Nie udało się utworzyć kursora."
+
+#: ../src/common/debugrpt.cpp:209
+#, c-format
+msgid "Failed to create directory \"%s\""
+msgstr "Nie udało się utworzenie katalogu \"%s\""
+
+#: ../src/generic/dirdlgg.cpp:249
+#, c-format
+msgid ""
+"Failed to create directory '%s'\n"
+"(Do you have the required permissions?)"
+msgstr ""
+"Nie udało się utworzyć katalogu '%s'\n"
+"(Posiadasz wymagane prawa dostępu?)"
+
+#: ../src/unix/epolldispatcher.cpp:84
+msgid "Failed to create epoll descriptor"
+msgstr "Nie udało się utworzyć deskryptora epoll"
+
+#: ../src/msw/mimetype.cpp:198
+#, c-format
+msgid "Failed to create registry entry for '%s' files."
+msgstr "Nie udało się utworzyć pozycji rejestru dla plików '%s'."
+
+#: ../src/msw/fdrepdlg.cpp:442
+#, c-format
+msgid "Failed to create the standard find/replace dialog (error code %d)"
+msgstr ""
+"Nie udało się utworzyć standardowego okna dialogowego wyszukaj/zastąp (kod "
+"błędu %d)"
+
+#: ../src/unix/wakeuppipe.cpp:52
+msgid "Failed to create wake up pipe used by event loop."
+msgstr "Nie udało się utworzyć potoku budzącego używanego przez pętlę zdarzeń"
+
+#: ../src/html/winpars.cpp:739
+#, c-format
+msgid "Failed to display HTML document in %s encoding"
+msgstr "Nie udało się wyświelić dokumentu HTML w kodowaniu %s"
+
+#: ../src/msw/clipbrd.cpp:127
+msgid "Failed to empty the clipboard."
+msgstr "Nie udało się opróżnić schowka."
+
+#: ../src/unix/displayx11.cpp:265
+msgid "Failed to enumerate video modes"
+msgstr "Nie udało się pobranie listy trybów video"
+
+# to moja swobodna interpretacja
+#: ../src/msw/dde.cpp:727
+msgid "Failed to establish an advise loop with DDE server"
+msgstr ""
+"Nie udało się rozpocząć transakcji doradzającej (advise) z serwerem DDE"
+
+#: ../src/msw/dialup.cpp:650 ../src/msw/dialup.cpp:884
+#, c-format
+msgid "Failed to establish dialup connection: %s"
+msgstr "Nie udało się nawiązać połączenia dialup: %s"
+
+#: ../src/unix/utilsunx.cpp:617
+#, c-format
+msgid "Failed to execute '%s'\n"
+msgstr "Nie udało się wykonać '%s'\n"
+
+#: ../src/common/debugrpt.cpp:725
+msgid "Failed to execute curl, please install it in PATH."
+msgstr ""
+"Nie udało się uruchomienie curl, proszę zainstalować go w dostępnym katalogu "
+"(PATH)."
+
+#: ../src/msw/ole/automtn.cpp:505
+#, c-format
+msgid "Failed to find CLSID of \"%s\""
+msgstr ""
+
+#: ../src/common/regex.cpp:434 ../src/common/regex.cpp:482
+#, c-format
+msgid "Failed to find match for regular expression: %s"
+msgstr "Nie udało się znaleźć połączenia dla regularnego wyrażenia: %s"
+
+#: ../src/msw/dialup.cpp:716
+#, c-format
+msgid "Failed to get ISP names: %s"
+msgstr "Nie udało się usyskać listy ISP: %s"
+
+#: ../src/msw/ole/automtn.cpp:574
+#, c-format
+msgid "Failed to get OLE automation interface for \"%s\""
+msgstr ""
+
+#: ../src/msw/clipbrd.cpp:747
+msgid "Failed to get data from the clipboard"
+msgstr "Nie udało się pobrać danych ze schowka"
+
+#: ../src/common/time.cpp:249
+msgid "Failed to get the local system time"
+msgstr "Nie udało się pobrać lokalnego czasu systemowego"
+
+#: ../src/common/filefn.cpp:1452
+msgid "Failed to get the working directory"
+msgstr "Nie udało się uzyskać katalogu roboczego"
+
+#: ../src/univ/theme.cpp:113
+msgid "Failed to initialize GUI: no built-in themes found."
+msgstr "Nie udało się zainicjować GUI: brak wbudowanych kompozycji."
+
+#: ../src/msw/helpchm.cpp:63
+msgid "Failed to initialize MS HTML Help."
+msgstr "Nie udało się zainicjować pomocy MS HTML."
+
+#: ../src/msw/glcanvas.cpp:892
+msgid "Failed to initialize OpenGL"
+msgstr "Nie udało się zainicjować OpenGL"
+
+#: ../src/msw/dialup.cpp:879
+#, c-format
+msgid "Failed to initiate dialup connection: %s"
+msgstr "Nie udało się rozpocząć połączenia dialup: %s"
+
+#: ../src/gtk/textctrl.cpp:1117
+msgid "Failed to insert text in the control."
+msgstr "Nie udało się  wstawić tekstu w kontroli."
+
+#: ../src/unix/snglinst.cpp:241
+#, c-format
+msgid "Failed to inspect the lock file '%s'"
+msgstr "Nie udało się sprawdzenie blokady pliku '%s'"
+
+# uchwyt chyba zbędny
+#: ../src/unix/appunix.cpp:182
+msgid "Failed to install signal handler"
+msgstr "Nie udało się zainstalować obsługi sygnału"
+
+# połączyć?
+# wyciek?
+#: ../src/unix/threadpsx.cpp:1162
+msgid ""
+"Failed to join a thread, potential memory leak detected - please restart the "
+"program"
+msgstr ""
+"Nie udało połączyć się z wątkiem, potencjalny wyciek pamięci - uruchom "
+"program ponownie"
+
+#: ../src/msw/utils.cpp:745
+#, c-format
+msgid "Failed to kill process %d"
+msgstr "Nie udało się zabić procesu %d"
+
+#: ../src/common/image.cpp:2365
+#, c-format
+msgid "Failed to load bitmap \"%s\" from resources."
+msgstr "Nie udało się wczytanie obrazu \"%s\" z zasobów."
+
+#: ../src/common/image.cpp:2374
+#, c-format
+msgid "Failed to load icon \"%s\" from resources."
+msgstr "Nie udało się wczytanie ikony \"%s\" z zasobów."
+
+#: ../src/common/iconbndl.cpp:182
+#, c-format
+msgid "Failed to load image %%d from file '%s'."
+msgstr "Nie udało się wczytanie obrazu %%d z pliku '%s'."
+
+#: ../src/common/iconbndl.cpp:190
+#, c-format
+msgid "Failed to load image %d from stream."
+msgstr "Nie udało się wczytanie obrazu %d ze strumienia."
+
+#: ../src/common/image.cpp:2450 ../src/common/image.cpp:2469
+#, c-format
+msgid "Failed to load image from file \"%s\"."
+msgstr "Nie udało się wczytanie obrazu z pliku \"%s\"."
+
+#: ../src/msw/enhmeta.cpp:97
+#, c-format
+msgid "Failed to load metafile from file \"%s\"."
+msgstr "Nie udało się załadowanie pliku meta \"%s\"."
+
+#: ../src/msw/volume.cpp:327
+msgid "Failed to load mpr.dll."
+msgstr "Nie udało się wczytać mpr.dll."
+
+#: ../src/msw/utils.cpp:1120
+#, c-format
+msgid "Failed to load resource \"%s\"."
+msgstr "Nie udało się wczytanie zasobu \"%s\"."
+
+#: ../src/common/dynlib.cpp:100
+#, c-format
+msgid "Failed to load shared library '%s'"
+msgstr "Nie udało się wczytać biblioteki '%s'."
+
+#: ../src/msw/utils.cpp:1127
+#, c-format
+msgid "Failed to lock resource \"%s\"."
+msgstr "Nie udało się zablokowanie zasobu \"%s\"."
+
+#: ../src/unix/snglinst.cpp:198
+#, c-format
+msgid "Failed to lock the lock file '%s'"
+msgstr "Nie udało się zablokować pliku blokującego '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:136
+#, c-format
+msgid "Failed to modify descriptor %d in epoll descriptor %d"
+msgstr "Nie można zmienić hasła %d w deskryptorze epoll %d"
+
+# nieładne
+#: ../src/common/filename.cpp:2681
+#, c-format
+msgid "Failed to modify file times for '%s'"
+msgstr "Nie udało się zmodyfikować czasów pliku '%s'"
+
+#: ../src/common/selectdispatcher.cpp:252
+msgid "Failed to monitor I/O channels"
+msgstr "Nie udało się monitorować kanałów wejściowych/wyjściowych"
+
+#: ../src/common/filename.cpp:194
+#, c-format
+msgid "Failed to open '%s' for reading"
+msgstr "Nie udało się otworzyć '%s' do odczytu"
+
+#: ../src/common/filename.cpp:199
+#, c-format
+msgid "Failed to open '%s' for writing"
+msgstr "Nie udało się otworzyć '%s' do zapisu"
+
+#: ../src/html/chm.cpp:141
+#, c-format
+msgid "Failed to open CHM archive '%s'."
+msgstr "Nie udało się otworzyć archiwum CHM '%s'."
+
+#: ../src/common/utilscmn.cpp:1135
+#, c-format
+msgid "Failed to open URL \"%s\" in default browser."
+msgstr "Nie udało się otworzyć URL \"%s\" w domyślnej przeglądarce."
+
+#: ../include/wx/msw/private/fswatcher.h:92
+#, c-format
+msgid "Failed to open directory \"%s\" for monitoring."
+msgstr "Nie udało się otwarcie monitoringu katalogu \"%s\"."
+
+#: ../src/x11/utils.cpp:223
+#, c-format
+msgid "Failed to open display \"%s\"."
+msgstr "Nie udało się otworzyć ekranu \"%s\"."
+
+#: ../src/common/filename.cpp:1115
+msgid "Failed to open temporary file."
+msgstr "Nie udało się otworzyć pliku tymczasowego."
+
+#: ../src/msw/clipbrd.cpp:94
+msgid "Failed to open the clipboard."
+msgstr "Nie udało się otworzyć schowka."
+
+#: ../src/common/translation.cpp:1170
+#, fuzzy, c-format
+msgid "Failed to parse Plural-Forms: '%s'"
+msgstr "Nie można przetworzyć formy liczby mnogiej: '%s'"
+
+#: ../src/unix/mediactrl.cpp:1268
+#, c-format
+msgid "Failed to prepare playing \"%s\"."
+msgstr "Nie udało się przygotowanie odtwarzania \"%s\"."
+
+#: ../src/msw/clipbrd.cpp:647
+msgid "Failed to put data on the clipboard"
+msgstr "Nie udało się umieścić danych w schowku"
+
+#: ../src/unix/snglinst.cpp:278
+msgid "Failed to read PID from lock file."
+msgstr "Nie udało sie odczytać identyfikatora z pliku blokującego."
+
+#: ../src/common/fileconf.cpp:464
+msgid "Failed to read config options."
+msgstr "Nie udało się odczytać opcji konfiguracji."
+
+#: ../src/common/docview.cpp:678
+#, c-format
+msgid "Failed to read document from the file \"%s\"."
+msgstr "Nie udało się wczytanie dokumentu z pliku \"%s\"."
+
+#: ../src/dfb/evtloop.cpp:98
+msgid "Failed to read event from DirectFB pipe"
+msgstr ""
+
+#: ../src/unix/wakeuppipe.cpp:120
+msgid "Failed to read from wake-up pipe"
+msgstr "Nie udało się czytać z potoku budzącego "
+
+#: ../src/unix/utilsunx.cpp:685
+msgid "Failed to redirect child process input/output"
+msgstr "Nie udało się przekierować wejścia/wyjścia procesu potomnego."
+
+#: ../src/msw/utilsexc.cpp:697
+msgid "Failed to redirect the child process IO"
+msgstr "Nie udało się przekierować wejścia/wyjścia procesu potomnego"
+
+#: ../src/msw/dde.cpp:293
+#, c-format
+msgid "Failed to register DDE server '%s'"
+msgstr "Nie udało się zarejestrować serwera DDE '%s'"
+
+#: ../src/common/fontmap.cpp:245
+#, c-format
+msgid "Failed to remember the encoding for the charset '%s'."
+msgstr "Nie udało się zapamiętać kodowania dla zestawu znaków '%s'"
+
+#: ../src/common/debugrpt.cpp:227
+#, c-format
+msgid "Failed to remove debug report file \"%s\""
+msgstr "Nie udało się usunięcie pliku raportu błędów \"%s\""
+
+#: ../src/unix/snglinst.cpp:322
+#, c-format
+msgid "Failed to remove lock file '%s'"
+msgstr "Nie udało się usunąć pliku blokującego '%s'"
+
+# stale --> ?
+#: ../src/unix/snglinst.cpp:288
+#, c-format
+msgid "Failed to remove stale lock file '%s'."
+msgstr "Nie udało się usunąć nieaktualnego pliku blokującego '%s'."
+
+#: ../src/msw/registry.cpp:528
+#, c-format
+msgid "Failed to rename registry value '%s' to '%s'."
+msgstr "Nie udało się zmienić nazwy wartości rejestru '%s' do '%s'."
+
+#: ../src/common/filefn.cpp:1168
+#, c-format
+msgid ""
+"Failed to rename the file '%s' to '%s' because the destination file already "
+"exists."
+msgstr ""
+"Nie udało się zmienić nazwy pliku '%s' na '%s', ponieważ plik docelowy już "
+"istnieje."
+
+#: ../src/msw/registry.cpp:633
+#, c-format
+msgid "Failed to rename the registry key '%s' to '%s'."
+msgstr "Nie udało się zmienić nazwy klucza rejestru '%s' na '%s'."
+
+#: ../src/msw/clipbrd.cpp:497
+msgid "Failed to retrieve data from the clipboard."
+msgstr "Nie udało się odzyskać danych ze schowka."
+
+#: ../src/common/filename.cpp:2777
+#, c-format
+msgid "Failed to retrieve file times for '%s'"
+msgstr "Nie udało się odczytać czasów pliku '%s'"
+
+#: ../src/msw/dialup.cpp:487
+msgid "Failed to retrieve text of RAS error message"
+msgstr "Nie udało się uzyskać tekstu komunikatu błędu RAS"
+
+#: ../src/msw/clipbrd.cpp:784
+msgid "Failed to retrieve the supported clipboard formats"
+msgstr "Nie udało się uzyskać listy formatów obsługiwanych przez schowek"
+
+#: ../src/common/docview.cpp:649
+#, c-format
+msgid "Failed to save document to the file \"%s\"."
+msgstr "Nie udało się zapisać dokumentu do pliku \"%s\"."
+
+#: ../src/msw/dib.cpp:326
+#, c-format
+msgid "Failed to save the bitmap image to file \"%s\"."
+msgstr "Nie udało się zapisać obrazu do pliku \"%s\"."
+
+#: ../src/msw/dde.cpp:768
+msgid "Failed to send DDE advise notification"
+msgstr "Nie udało się wysłać powiadomienia DDE"
+
+#: ../src/common/ftp.cpp:404
+#, c-format
+msgid "Failed to set FTP transfer mode to %s."
+msgstr "FTP: Nie udało się ustawić trybu transmisji na '%s'."
+
+#: ../src/msw/clipbrd.cpp:373
+msgid "Failed to set clipboard data."
+msgstr "Nie udało się skorzystać ze schowka."
+
+#: ../src/unix/snglinst.cpp:181
+#, c-format
+msgid "Failed to set permissions on lock file '%s'"
+msgstr "Nie udało się nadanie praw dostępu na blokowanym pliku '%s'"
+
+#: ../src/unix/utilsunx.cpp:674
+msgid "Failed to set process priority"
+msgstr ""
+
+#: ../src/common/file.cpp:576
+msgid "Failed to set temporary file permissions"
+msgstr "Nie udało się nadać praw dostępu pliku tymczasowemu"
+
+#: ../src/gtk/textctrl.cpp:1058
+msgid "Failed to set text in the text control."
+msgstr "Nie udało się ustawić tekstu w kontroli tekstu."
+
+#: ../src/unix/threadpsx.cpp:1293
+#, c-format
+msgid "Failed to set thread concurrency level to %lu"
+msgstr ""
+
+#: ../src/unix/threadpsx.cpp:1377 ../src/unix/threadpsx.cpp:1387
+#, c-format
+msgid "Failed to set thread priority %d."
+msgstr "Nie udało się zmienić priorytetu wątku na %d."
+
+#: ../src/unix/utilsunx.cpp:791
+msgid "Failed to set up non-blocking pipe, the program might hang."
+msgstr "Nie udało się ustawić nieblokowego potoku, program może się zawiesić."
+
+#: ../src/common/fs_mem.cpp:261
+#, c-format
+msgid "Failed to store image '%s' to memory VFS!"
+msgstr "Nie udało się odłożyć obrazu '%s' do pamięci VFS!"
+
+#: ../src/dfb/evtloop.cpp:170
+msgid "Failed to switch DirectFB pipe to non-blocking mode"
+msgstr ""
+
+#: ../src/unix/wakeuppipe.cpp:59
+msgid "Failed to switch wake up pipe to non-blocking mode"
+msgstr "Nie udało się przełączyć potoku budzącego na modus nie-blokujący"
+
+#: ../src/unix/threadpsx.cpp:1569
+msgid "Failed to terminate a thread."
+msgstr "Nie udało się zakończyć wątku."
+
+#: ../src/msw/dde.cpp:746
+msgid "Failed to terminate the advise loop with DDE server"
+msgstr ""
+"Nie udało się zakończyć transakcji doradzającej (advise) z serwerem DDE"
+
+#: ../src/msw/dialup.cpp:959
+#, c-format
+msgid "Failed to terminate the dialup connection: %s"
+msgstr "Nie udało się zakończyć połączenia dialup: %s"
+
+#: ../src/common/filename.cpp:2696
+#, c-format
+msgid "Failed to touch the file '%s'"
+msgstr "Nie udało się zmienić czasów pliku '%s'"
+
+#: ../src/unix/snglinst.cpp:328
+#, c-format
+msgid "Failed to unlock lock file '%s'"
+msgstr "Nie udało się odblokować pliku blokującego '%s'"
+
+#: ../src/msw/dde.cpp:314
+#, c-format
+msgid "Failed to unregister DDE server '%s'"
+msgstr "Nie udało się wyrejestrować serwera DDE '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:155
+#, c-format
+msgid "Failed to unregister descriptor %d from epoll descriptor %d"
+msgstr "Nie udało się wyrejestrować deskryptora %d z deskryptora epoll %d"
+
+#: ../src/common/fileconf.cpp:1037
+msgid "Failed to update user configuration file."
+msgstr "Nie udała się aktualizacja pliku konfiguracyjnego użytkownika."
+
+#: ../src/common/debugrpt.cpp:738
+#, c-format
+msgid "Failed to upload the debug report (error code %d)."
+msgstr "Nie udało się przesłanie raportu błędów (kod błędu %d)"
+
+# ze źródeł wynika że chodzi o PID
+#: ../src/unix/snglinst.cpp:168
+#, c-format
+msgid "Failed to write to lock file '%s'"
+msgstr "Nie udało się zapisać identyfikatora do pliku blokującego '%s'"
+
+#: ../src/propgrid/propgrid.cpp:172
+msgid "False"
+msgstr ""
+
+#: ../src/propgrid/advprops.cpp:658
+msgid "Family"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:157 ../src/msw/wince/filedlgwce.cpp:121
+msgid "File"
+msgstr "Plik"
+
+#: ../src/common/docview.cpp:666
+#, fuzzy, c-format
+msgid "File \"%s\" could not be opened for reading."
+msgstr "Nie udało się otworzyć '%s' do odczytu"
+
+#: ../src/common/docview.cpp:643
+#, fuzzy, c-format
+msgid "File \"%s\" could not be opened for writing."
+msgstr "Nie udało się otworzyć '%s' do zapisu"
+
+#: ../src/gtk/filedlg.cpp:56
+#, c-format
+msgid "File '%s' already exists, do you really want to overwrite it?"
+msgstr "Plik '%s' już istnieje, naprawdę chcesz go zastąpić?"
+
+#: ../src/os2/filedlg.cpp:310
+#, c-format
+msgid ""
+"File '%s' already exists.\n"
+"Do you want to replace it?"
+msgstr ""
+"Plik '%s' już istnieje.\n"
+"Chcesz go zastąpić?"
+
+#: ../src/common/filefn.cpp:1206
+#, c-format
+msgid "File '%s' couldn't be removed"
+msgstr "Plik '%s' nie mógł zostać usunięty"
+
+#: ../src/common/filefn.cpp:1187
+#, c-format
+msgid "File '%s' couldn't be renamed '%s'"
+msgstr "Nazwa pliku '%s' nie mogła zostać zmieniona '%s'"
+
+#: ../src/richtext/richtextctrl.cpp:2688 ../src/common/textcmn.cpp:921
+msgid "File couldn't be loaded."
+msgstr "Plik nie może być wczytany."
+
+#: ../src/msw/filedlg.cpp:458
+#, c-format
+msgid "File dialog failed with error code %0lx."
+msgstr ""
+
+#: ../src/common/docview.cpp:1772
+msgid "File error"
+msgstr "Błąd plikowy"
+
+#: ../src/generic/dirctrlg.cpp:688 ../src/generic/filectrlg.cpp:805
+msgid "File name exists already."
+msgstr "Plik o tej nazwie już istnieje."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Files"
+msgstr "Pliki"
+
+#: ../src/common/filefn.cpp:1760
+#, c-format
+msgid "Files (%s)"
+msgstr "Pliki (%s)"
+
+#: ../src/motif/filedlg.cpp:218
+msgid "Filter"
+msgstr "Filtr"
+
+#: ../src/common/stockitem.cpp:158 ../src/html/helpwnd.cpp:500
+msgid "Find"
+msgstr "Znajdź"
+
+#: ../src/common/stockitem.cpp:159
+#, fuzzy
+msgid "First"
+msgstr "pierwszy"
+
+#: ../src/common/prntbase.cpp:1518
+msgid "First page"
+msgstr "Pierwsza strona"
+
+#: ../src/richtext/richtextsizepage.cpp:518
+#, fuzzy
+msgid "Fixed"
+msgstr "Czcionka o stałej szerokości:"
+
+#: ../src/html/helpwnd.cpp:1219
+msgid "Fixed font:"
+msgstr "Czcionka o stałej szerokości:"
+
+#: ../src/html/helpwnd.cpp:1282
+msgid "Fixed size face.<br> <b>bold</b> <i>italic</i> "
+msgstr "Ustalony rozmiar tekstu.<br> <b>pogrubienie</b> <i>kursywa</i> "
+
+#: ../src/richtext/richtextsizepage.cpp:226
+msgid "Floating"
+msgstr "Pływający"
+
+#: ../src/common/stockitem.cpp:160
+msgid "Floppy"
+msgstr "Dyskietka"
+
+#: ../src/common/paper.cpp:112
+msgid "Folio, 8 1/2 x 13 in"
+msgstr "Folio, 8 1/2 x 13 cali"
+
+#: ../src/richtext/richtextformatdlg.cpp:324 ../src/osx/carbon/fontdlg.cpp:473
+#: ../src/common/stockitem.cpp:194
+msgid "Font"
+msgstr "Czcionka"
+
+#: ../src/richtext/richtextfontpage.cpp:230
+msgid "Font &weight:"
+msgstr "&Waga czcionki:"
+
+#: ../src/html/helpwnd.cpp:1220
+msgid "Font size:"
+msgstr "Rozmiar czcionki:"
+
+#: ../src/richtext/richtextfontpage.cpp:217
+msgid "Font st&yle:"
+msgstr "&Styl czcionki:"
+
+#: ../src/osx/carbon/fontdlg.cpp:515
+msgid "Font:"
+msgstr "Czcionka:"
+
+#: ../src/dfb/fontmgr.cpp:198
+#, c-format
+msgid "Fonts index file %s disappeared while loading fonts."
+msgstr "Plik indeksu czcionek %s znikł podczas ładowania czcionek."
+
+#: ../src/unix/utilsunx.cpp:651
+msgid "Fork failed"
+msgstr "Rozwidlenie nie powiodło się"
+
+#: ../src/common/stockitem.cpp:161
+#, fuzzy
+msgid "Forward"
+msgstr "&Dalej"
+
+#: ../src/common/xtixml.cpp:235
+msgid "Forward hrefs are not supported"
+msgstr "Przekazywanie właściwości 'href' nie jest wspierane"
+
+#: ../src/html/helpwnd.cpp:888
+#, c-format
+msgid "Found %i matches"
+msgstr "Znaleziono %i odpowiednik(i/ów)"
+
+#: ../src/generic/prntdlgg.cpp:243
+msgid "From:"
+msgstr "Od:"
+
+# ...indeks w grafice (?)
+# ideks - katalog, wska?nik?
+#: ../src/common/imaggif.cpp:160
+msgid "GIF: Invalid gif index."
+msgstr "GIF: Brak obrazu o podanym indeksie."
+
+#: ../src/common/imaggif.cpp:150
+msgid "GIF: data stream seems to be truncated."
+msgstr "GIF: strumień daych wygląda na obcięty."
+
+#: ../src/common/imaggif.cpp:134
+msgid "GIF: error in GIF image format."
+msgstr "GIF: błąd w formacie obrazu GIF."
+
+#: ../src/common/imaggif.cpp:137
+msgid "GIF: not enough memory."
+msgstr "GIF: za mało pamięci."
+
+#: ../src/common/imaggif.cpp:140
+msgid "GIF: unknown error!!!"
+msgstr "GIF: neznany błąd !!!"
+
+#: ../src/gtk/window.cpp:4266
+msgid ""
+"GTK+ installed on this machine is too old to support screen compositing, "
+"please install GTK+ 2.12 or later."
+msgstr ""
+"GTK+ zainstalowana na tej maszynie jest zbyt stara i nie wspiera kompozycji "
+"ekranu, proszę zainstalować GTK+ 2.12 lub nowszą."
+
+#: ../src/univ/themes/gtk.cpp:525
+msgid "GTK+ theme"
+msgstr "Kompozycja GTK+"
+
+#: ../src/common/preferencescmn.cpp:39
+msgid "General"
+msgstr "Ogólne"
+
+#: ../src/common/prntbase.cpp:243
+msgid "Generic PostScript"
+msgstr "PostScript"
+
+#: ../src/common/paper.cpp:136
+msgid "German Legal Fanfold, 8 1/2 x 13 in"
+msgstr "Składanka German Legal, 8 1/2 x 13 cali"
+
+#: ../src/common/paper.cpp:135
+msgid "German Std Fanfold, 8 1/2 x 12 in"
+msgstr "Składanka German Std, 8 1/2 x 12 cali"
+
+#: ../include/wx/xtiprop.h:188
+msgid "GetProperty called w/o valid getter"
+msgstr "Funkcja GetProperty wywołana bez poprawnego modułu pobierającego"
+
+#: ../include/wx/xtiprop.h:266
+msgid "GetPropertyCollection called on a generic accessor"
+msgstr "Funkcja GetPropertyCollection wywołana w ogólnym akcesorze"
+
+#: ../include/wx/xtiprop.h:206
+msgid "GetPropertyCollection called w/o valid collection getter"
+msgstr ""
+"Funkcja GetPropertyCollection wywołana bez poprawnego modułu pobierającego"
+
+#: ../src/html/helpwnd.cpp:673
+msgid "Go back"
+msgstr "Idź wstecz"
+
+#: ../src/html/helpwnd.cpp:674
+msgid "Go forward"
+msgstr "Idź dalej"
+
+#: ../src/html/helpwnd.cpp:676
+msgid "Go one level up in document hierarchy"
+msgstr "Idź poziom wyżej w hierarchi dokumentu"
+
+#: ../src/generic/filedlgg.cpp:223 ../src/generic/dirdlgg.cpp:136
+msgid "Go to home directory"
+msgstr "Idź do katalogu domowego"
+
+#: ../src/generic/filedlgg.cpp:219
+msgid "Go to parent directory"
+msgstr "Idź do katalogu nadrzędnego"
+
+#: ../src/generic/aboutdlgg.cpp:76
+msgid "Graphics art by "
+msgstr "Grafika autorstwa"
+
+#: ../src/common/fmapbase.cpp:154
+msgid "Greek (ISO-8859-7)"
+msgstr "Grecki (ISO-8859-7)"
+
+#: ../src/richtext/richtextborderspage.cpp:547
+msgid "Groove"
+msgstr "Groove"
+
+#: ../src/common/zstream.cpp:158 ../src/common/zstream.cpp:318
+msgid "Gzip not supported by this version of zlib"
+msgstr "Format Gzip nie jest wspierany przez tę wersję biblioteki zlib"
+
+#: ../src/common/accelcmn.cpp:75
+msgid "HELP"
+msgstr "POMOC"
+
+#: ../src/common/accelcmn.cpp:60
+msgid "HOME"
+msgstr "HOME"
+
+#: ../src/html/helpwnd.cpp:1552
+msgid "HTML Help Project (*.hhp)|*.hhp|"
+msgstr "Plik projektu pomocy HTML Help (*.hhp)|*.hhp|"
+
+# Kotwica?
+#: ../src/html/htmlwin.cpp:659
+#, c-format
+msgid "HTML anchor %s does not exist."
+msgstr "HTML: kotwica %s ie istnieje."
+
+#: ../src/html/helpwnd.cpp:1550
+msgid "HTML files (*.html;*.htm)|*.html;*.htm|"
+msgstr "Pliki HTML (*.html;*.htm)|*.html;*.htm|"
+
+#: ../src/common/stockitem.cpp:162
+msgid "Harddisk"
+msgstr "Dysk twardy"
+
+#: ../src/common/fmapbase.cpp:155
+msgid "Hebrew (ISO-8859-8)"
+msgstr "Hebrajski (ISO-8859-8)"
+
+#: ../include/wx/msgdlg.h:275 ../src/osx/button_osx.cpp:39
+#: ../src/common/stockitem.cpp:163 ../src/html/helpdlg.cpp:66
+#: ../src/html/helpfrm.cpp:116
+msgid "Help"
+msgstr "Pomoc"
+
+#: ../src/html/helpwnd.cpp:1213
+msgid "Help Browser Options"
+msgstr "Opcje przeglądarki pomocy"
+
+#: ../src/generic/helpext.cpp:458 ../src/generic/helpext.cpp:459
+msgid "Help Index"
+msgstr "Spis treści"
+
+# pomoc do drukowania?
+#: ../src/html/helpwnd.cpp:1534
+msgid "Help Printing"
+msgstr "Drukowanie pomocy"
+
+#: ../src/html/helpwnd.cpp:814
+msgid "Help Topics"
+msgstr "Tematy Pomocy"
+
+#: ../src/html/helpwnd.cpp:1551
+msgid "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+msgstr "Pakiety pomocy (*.htb)|*.htb|Pakiety pomocy (*.zip)|*.zip|"
+
+#: ../src/generic/helpext.cpp:271
+#, c-format
+msgid "Help directory \"%s\" not found."
+msgstr "Nie znaleziono katalogu pomocy \"%s\"."
+
+# catalog file --> ?
+# domain --> ?
+#: ../src/generic/helpext.cpp:279
+#, c-format
+msgid "Help file \"%s\" not found."
+msgstr "Nie znaleziono pliku pomocy \"%s\"."
+
+#: ../src/html/helpctrl.cpp:63
+#, c-format
+msgid "Help: %s"
+msgstr "Pomoc: %s"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:649
+#, c-format
+msgid "Hide %s"
+msgstr "Ukryj %s"
+
+#: ../src/osx/menu_osx.cpp:604 ../src/osx/menu_osx.cpp:651
+msgid "Hide Others"
+msgstr "Ukryj inne"
+
+#: ../src/generic/infobar.cpp:85
+msgid "Hide this notification message."
+msgstr "Ukryj to powiadomienie."
+
+#: ../src/generic/dirdlgg.cpp:98 ../src/common/stockitem.cpp:164
+msgid "Home"
+msgstr "Katalog początkowy"
+
+#: ../src/generic/dirctrlg.cpp:624
+msgid "Home directory"
+msgstr "Katalog początkowy"
+
+#: ../src/richtext/richtextsizepage.cpp:250
+#: ../src/richtext/richtextsizepage.cpp:252
+msgid "How the object will float relative to the text."
+msgstr "Jak obiekt będzie pływać względem tekstu."
+
+#: ../src/common/imagbmp.cpp:1118
+msgid "ICO: Error in reading mask DIB."
+msgstr "ICO: Błąd odczytu maski DIB."
+
+#: ../src/common/imagbmp.cpp:1233 ../src/common/imagbmp.cpp:1294
+#: ../src/common/imagbmp.cpp:1305 ../src/common/imagbmp.cpp:1318
+#: ../src/common/imagbmp.cpp:1363 ../src/common/imagbmp.cpp:1375
+#: ../src/common/imagbmp.cpp:1386
+msgid "ICO: Error writing the image file!"
+msgstr "ICO: Błąd przy zapisie do pliku."
+
+#: ../src/common/imagbmp.cpp:1198
+msgid "ICO: Image too tall for an icon."
+msgstr "ICO: Obraz jest zbyt wysoki jak na ikonę."
+
+#: ../src/common/imagbmp.cpp:1206
+msgid "ICO: Image too wide for an icon."
+msgstr "ICO: Obraz jest zbyt szeroki jak na ikonę."
+
+# ...indeks w grafice (?)
+# ideks - katalog, wskaŸnik?
+#: ../src/common/imagbmp.cpp:1466
+msgid "ICO: Invalid icon index."
+msgstr "ICO: Brak ikony o podanym indeksie.."
+
+#: ../src/common/imagiff.cpp:759
+msgid "IFF: data stream seems to be truncated."
+msgstr "IFF: strumień daych wygląda na obcięty."
+
+#: ../src/common/imagiff.cpp:743
+msgid "IFF: error in IFF image format."
+msgstr "IFF: błąd w formacie obrazu IFF."
+
+#: ../src/common/imagiff.cpp:746
+msgid "IFF: not enough memory."
+msgstr "IFF: za mało pamięci."
+
+#: ../src/common/imagiff.cpp:749
+msgid "IFF: unknown error!!!"
+msgstr "IFF: nieznany błąd !!!"
+
+#: ../src/common/accelcmn.cpp:50
+msgid "INS"
+msgstr "INS"
+
+#: ../src/common/accelcmn.cpp:51
+msgid "INSERT"
+msgstr "WSTAW"
+
+#: ../src/common/fmapbase.cpp:197
+msgid "ISO-2022-JP"
+msgstr "ISO-2022-JP"
+
+#: ../src/osx/carbon/dataview.cpp:2420
+msgid "Icon & text renderer cannot render value; value type: "
+msgstr "Renderer ikony i tekstu nie może renderować wartości; typ wartości:"
+
+#: ../src/html/htmprint.cpp:282
+msgid ""
+"If possible, try changing the layout parameters to make the printout more "
+"narrow."
+msgstr ""
+"Jeżeli to możliwe, spróbuj zmodyfikować parametry układu, aby uczynić wydruk "
+"węższy."
+
+#: ../src/generic/dbgrptg.cpp:358
+msgid ""
+"If you have any additional information pertaining to this bug\n"
+"report, please enter it here and it will be joined to it:"
+msgstr ""
+"Jeśli masz jakiekolwiek dodatkowe informacje odnośnie\n"
+"raportowanego błędu, proszę dołącz je tu:"
+
+#: ../src/generic/dbgrptg.cpp:324
+msgid ""
+"If you wish to suppress this debug report completely, please choose the "
+"\"Cancel\" button,\n"
+"but be warned that it may hinder improving the program, so if\n"
+"at all possible please do continue with the report generation.\n"
+msgstr ""
+"Jeśli chcesz całkowicie pominąć raport błędów, wybierz \"Anuluj\",\n"
+"ale rozważ że to może utrudnić usprawnianie oprogramowania,\n"
+"w związku z tym zachęcamy do kontynuowania raportowania błędów.\n"
+
+#: ../src/msw/registry.cpp:1395
+#, c-format
+msgid "Ignoring value \"%s\" of the key \"%s\"."
+msgstr "Wartiść \"%s\" klucza \"%s\" zignorowana."
+
+#: ../src/common/xtistrm.cpp:299
+msgid "Illegal Object Class (Non-wxEvtHandler) as Event Source"
+msgstr "Błędna Klasa Obiekty (nie typu wxEvtHandler) jako Źródło Zdarzenia"
+
+#: ../src/common/xti.cpp:513
+msgid "Illegal Parameter Count for ConstructObject Method"
+msgstr "Nieprawidłowa Liczba Parametrów w Metodzie ConstructObject"
+
+#: ../src/common/xti.cpp:501
+msgid "Illegal Parameter Count for Create Method"
+msgstr "Nieprawidłowa Liczba Parametrów w Metodzie Create"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/filectrlg.cpp:791
+msgid "Illegal directory name."
+msgstr "Niedozwolona nazwa katalogu."
+
+#: ../src/generic/filectrlg.cpp:1380
+msgid "Illegal file specification."
+msgstr "Niedozwolona specyfikacja pliku."
+
+#: ../src/common/image.cpp:2158
+msgid "Image and mask have different sizes."
+msgstr "Obraz i maska mają różne rozmiary."
+
+#: ../src/common/image.cpp:2609
+#, c-format
+msgid "Image file is not of type %d."
+msgstr "Nie jest to obraz typu %d."
+
+#: ../src/common/image.cpp:2739
+#, fuzzy, c-format
+msgid "Image is not of type %s."
+msgstr "Nie jest to obraz typu %s."
+
+#: ../src/msw/textctrl.cpp:399
+msgid ""
+"Impossible to create a rich edit control, using simple text control instead. "
+"Please reinstall riched32.dll"
+msgstr ""
+"Nie jest możliwe utworzenie kontrolki rich edit, użyj zamiast tego prostego "
+"'text control'. Przeinstaluj riched32.dll"
+
+#: ../src/unix/utilsunx.cpp:307
+msgid "Impossible to get child process input"
+msgstr "Nie jest możliwe uzyskanie wejścia procesu potomnego"
+
+#: ../src/common/filefn.cpp:1074
+#, c-format
+msgid "Impossible to get permissions for file '%s'"
+msgstr "Uzyskanie praw dostępu do pliku '%s' jest niemożliwe"
+
+#: ../src/common/filefn.cpp:1088
+#, c-format
+msgid "Impossible to overwrite the file '%s'"
+msgstr "Zastąpienie pliku '%s' jest niemożliwe"
+
+#: ../src/common/filefn.cpp:1142
+#, c-format
+msgid "Impossible to set permissions for the file '%s'"
+msgstr "Nie jest możliwe nadanie praw dostępu plikowi '%s'"
+
+#: ../src/common/gifdecod.cpp:818
+#, c-format
+msgid "Incorrect GIF frame size (%u, %d) for the frame #%u"
+msgstr "Nieprawidłowy rozmiar ramki GIF (%u, %d) dla ramki #%u"
+
+#: ../src/msw/ole/automtn.cpp:624
+msgid "Incorrect number of arguments."
+msgstr "Nieprawidłowa liczba argumentów."
+
+#: ../src/common/stockitem.cpp:165
+msgid "Indent"
+msgstr "Wcięcie"
+
+#: ../src/richtext/richtextformatdlg.cpp:330
+msgid "Indents && Spacing"
+msgstr "Wcięcia i odstępy"
+
+#: ../src/common/stockitem.cpp:166 ../src/html/helpwnd.cpp:525
+msgid "Index"
+msgstr "Indeks"
+
+#: ../src/common/fmapbase.cpp:159
+msgid "Indian (ISO-8859-12)"
+msgstr "Hinduski (ISO-8859-12)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "Info"
+msgstr "Info"
+
+#: ../src/common/init.cpp:276
+msgid "Initialization failed in post init, aborting."
+msgstr "Inicjalizacja nie powiodła się powodując wyjście."
+
+#: ../src/richtext/richtextsymboldlg.cpp:472
+msgid "Insert"
+msgstr "Wstawić"
+
+#: ../src/richtext/richtextbuffer.cpp:7672
+msgid "Insert Field"
+msgstr "Wstaw pole"
+
+#: ../src/richtext/richtextbuffer.cpp:7583
+#: ../src/richtext/richtextbuffer.cpp:8493
+msgid "Insert Image"
+msgstr "Wstaw obraz"
+
+#: ../src/richtext/richtextbuffer.cpp:7630
+msgid "Insert Object"
+msgstr "Wstaw obiekt"
+
+#: ../src/richtext/richtextctrl.cpp:1172 ../src/richtext/richtextctrl.cpp:1362
+#: ../src/richtext/richtextbuffer.cpp:7428
+#: ../src/richtext/richtextbuffer.cpp:7455
+#: ../src/richtext/richtextbuffer.cpp:7499
+msgid "Insert Text"
+msgstr "Wstaw tekst"
+
+#: ../src/richtext/richtextindentspage.cpp:295
+#: ../src/richtext/richtextindentspage.cpp:297
+msgid "Inserts a page break before the paragraph."
+msgstr "Wstawia łamanie strony przed akapitem."
+
+#: ../src/richtext/richtextborderspage.cpp:549
+msgid "Inset"
+msgstr ""
+
+#: ../src/gtk/app.cpp:429
+#, c-format
+msgid "Invalid GTK+ command line option, use \"%s --help\""
+msgstr "Nieprawidłowa opcja GTK+ wiersza poleceń, należy użyć \"%s --help\""
+
+# ...indeks w grafice (?)
+# ideks - katalog, wska?nik?
+#: ../src/common/imagtiff.cpp:314
+msgid "Invalid TIFF image index."
+msgstr "TIFF: Brak obrazu o podanym indeksie."
+
+#: ../src/osx/carbon/dataview.cpp:1782 ../src/osx/carbon/dataview.cpp:1877
+msgid "Invalid data view item"
+msgstr "Nieprawidłowa pozycja widoku danych"
+
+#: ../src/common/appcmn.cpp:245
+#, c-format
+msgid "Invalid display mode specification '%s'."
+msgstr "Błędna specyfikacja trybu wyświetlania '%s'."
+
+# Pytanie X11
+#: ../src/x11/app.cpp:121
+#, c-format
+msgid "Invalid geometry specification '%s'"
+msgstr "Niedozwolona specyfikacja \"geometry\" '%s'."
+
+#: ../src/unix/fswatcher_inotify.cpp:298
+#, c-format
+msgid "Invalid inotify event for \"%s\""
+msgstr "Nieprawidłowe zdarzenie inotify dla \"%s\""
+
+#: ../src/unix/snglinst.cpp:306
+#, c-format
+msgid "Invalid lock file '%s'."
+msgstr "Nieprawidłowy plik blokujący '%s'."
+
+#: ../src/common/translation.cpp:1111
+msgid "Invalid message catalog."
+msgstr "Nieprawidłowy katalog komunikatów."
+
+#: ../src/common/xtistrm.cpp:409 ../src/common/xtistrm.cpp:424
+msgid "Invalid or Null Object ID passed to GetObjectClassInfo"
+msgstr ""
+"Błędny lub Pusty Identyfikator Obiektu przekazany do funkcji "
+"GetObjectClassInfo"
+
+#: ../src/common/xtistrm.cpp:439
+msgid "Invalid or Null Object ID passed to HasObjectClassInfo"
+msgstr ""
+"Błędny lub Pusty Identyfikator Obiektu przekazany do funkcji "
+"HasObjectClassInfo"
+
+#: ../src/common/regex.cpp:313
+#, c-format
+msgid "Invalid regular expression '%s': %s"
+msgstr "Nieprawidłowe wyrażenie regularne '%s': %s"
+
+#: ../src/common/config.cpp:226
+#, c-format
+msgid "Invalid value %ld for a boolean key \"%s\" in config file."
+msgstr ""
+"Nieprawidłowa wartość %ld dla klucza logicznego\"%s\" w pliku "
+"konfiguracyjnym."
+
+#: ../src/generic/fontdlgg.cpp:329 ../src/richtext/richtextfontpage.cpp:333
+#: ../src/osx/carbon/fontdlg.cpp:547 ../src/common/stockitem.cpp:168
+msgid "Italic"
+msgstr "Kursywa"
+
+#: ../src/common/paper.cpp:131
+msgid "Italy Envelope, 110 x 230 mm"
+msgstr "Koperta włoska, 110 x 230 mm"
+
+#: ../src/common/imagjpeg.cpp:255
+msgid "JPEG: Couldn't load - file is probably corrupted."
+msgstr "JPEG: Nie można wczytać - prawdopodobnie plik jest uszkodzony."
+
+#: ../src/common/imagjpeg.cpp:434
+msgid "JPEG: Couldn't save image."
+msgstr "JPEG: Nie można zapisać obrazu."
+
+#: ../src/common/paper.cpp:164
+msgid "Japanese Double Postcard 200 x 148 mm"
+msgstr "Japońska Podwójna Pocztówka 200 x 148 mm"
+
+#: ../src/common/paper.cpp:168
+msgid "Japanese Envelope Chou #3"
+msgstr "Japońska Koperta Chou #3"
+
+#: ../src/common/paper.cpp:181
+msgid "Japanese Envelope Chou #3 Rotated"
+msgstr "Japońska Koperta Chou #3 Obrócona"
+
+#: ../src/common/paper.cpp:169
+msgid "Japanese Envelope Chou #4"
+msgstr "Japońska Koperta Chou #4"
+
+#: ../src/common/paper.cpp:182
+msgid "Japanese Envelope Chou #4 Rotated"
+msgstr "Japońska Koperta Chou #4 Obrócona"
+
+#: ../src/common/paper.cpp:166
+msgid "Japanese Envelope Kaku #2"
+msgstr "Japońska Koperta Kaku #2"
+
+#: ../src/common/paper.cpp:179
+msgid "Japanese Envelope Kaku #2 Rotated"
+msgstr "Japońska Koperta Kaku #2 Obrócona"
+
+#: ../src/common/paper.cpp:167
+msgid "Japanese Envelope Kaku #3"
+msgstr "Japońska Koperta Kaku #3"
+
+#: ../src/common/paper.cpp:180
+msgid "Japanese Envelope Kaku #3 Rotated"
+msgstr "Japońska Koperta Kaku #3 Obrócona"
+
+#: ../src/common/paper.cpp:186
+msgid "Japanese Envelope You #4"
+msgstr "Japońska Koperta You #4"
+
+#: ../src/common/paper.cpp:187
+msgid "Japanese Envelope You #4 Rotated"
+msgstr "Japońska Koperta You #4 Obrócona"
+
+#: ../src/common/paper.cpp:139
+msgid "Japanese Postcard 100 x 148 mm"
+msgstr "Japońska Pocztówka 100 x 148 mm"
+
+#: ../src/common/paper.cpp:176
+msgid "Japanese Postcard Rotated 148 x 100 mm"
+msgstr "Japońska Pocztówka Obrócona 148 x 100 mm"
+
+#: ../src/common/stockitem.cpp:169
+msgid "Jump to"
+msgstr "Skocz do"
+
+#: ../src/common/stockitem.cpp:171
+msgid "Justified"
+msgstr "Wyrównanie obustronne"
+
+#: ../src/richtext/richtextindentspage.cpp:155
+#: ../src/richtext/richtextindentspage.cpp:157
+#: ../src/richtext/richtextliststylepage.cpp:344
+#: ../src/richtext/richtextliststylepage.cpp:346
+msgid "Justify text left and right."
+msgstr "Wyjustuj tekst w lewo i w prawo."
+
+#: ../src/common/fmapbase.cpp:163
+msgid "KOI8-R"
+msgstr "KOI8-R"
+
+#: ../src/common/fmapbase.cpp:164
+msgid "KOI8-U"
+msgstr "KOI8-U"
+
+#: ../src/common/accelcmn.cpp:254 ../src/common/accelcmn.cpp:336
+msgid "KP_"
+msgstr "KP_"
+
+#: ../src/common/accelcmn.cpp:103
+msgid "KP_ADD"
+msgstr "KP_ADD"
+
+#: ../src/common/accelcmn.cpp:98
+msgid "KP_BEGIN"
+msgstr "KP_BEGIN"
+
+#: ../src/common/accelcmn.cpp:106
+msgid "KP_DECIMAL"
+msgstr "KP_DECIMAL"
+
+#: ../src/common/accelcmn.cpp:100
+msgid "KP_DELETE"
+msgstr "KP_DELETE"
+
+#: ../src/common/accelcmn.cpp:107
+msgid "KP_DIVIDE"
+msgstr "KP_DIVIDE"
+
+#: ../src/common/accelcmn.cpp:92
+msgid "KP_DOWN"
+msgstr "KP_DOWN"
+
+#: ../src/common/accelcmn.cpp:97
+msgid "KP_END"
+msgstr "KP_END"
+
+#: ../src/common/accelcmn.cpp:87
+msgid "KP_ENTER"
+msgstr "KP_ENTER"
+
+#: ../src/common/accelcmn.cpp:101
+msgid "KP_EQUAL"
+msgstr "KP_EQUAL"
+
+#: ../src/common/accelcmn.cpp:88
+msgid "KP_HOME"
+msgstr "KP_HOME"
+
+#: ../src/common/accelcmn.cpp:99
+msgid "KP_INSERT"
+msgstr "KP_INSERT"
+
+#: ../src/common/accelcmn.cpp:89
+msgid "KP_LEFT"
+msgstr "KP_LEFT"
+
+#: ../src/common/accelcmn.cpp:102
+msgid "KP_MULTIPLY"
+msgstr "KP_MULTIPLY"
+
+#: ../src/common/accelcmn.cpp:95
+msgid "KP_NEXT"
+msgstr "KP_NEXT"
+
+#: ../src/common/accelcmn.cpp:96
+msgid "KP_PAGEDOWN"
+msgstr "KP_PAGEDOWN"
+
+#: ../src/common/accelcmn.cpp:94
+msgid "KP_PAGEUP"
+msgstr "KP_PAGEUP"
+
+#: ../src/common/accelcmn.cpp:93
+msgid "KP_PRIOR"
+msgstr "KP_PRIOR"
+
+#: ../src/common/accelcmn.cpp:91
+msgid "KP_RIGHT"
+msgstr "KP_RIGHT"
+
+#: ../src/common/accelcmn.cpp:104
+msgid "KP_SEPARATOR"
+msgstr "KP_SEPARATOR"
+
+#: ../src/common/accelcmn.cpp:85
+msgid "KP_SPACE"
+msgstr "KP_SPACE"
+
+#: ../src/common/accelcmn.cpp:105
+msgid "KP_SUBTRACT"
+msgstr "KP_SUBTRACT"
+
+#: ../src/common/accelcmn.cpp:86
+msgid "KP_TAB"
+msgstr "KP_TAB"
+
+#: ../src/common/accelcmn.cpp:90
+msgid "KP_UP"
+msgstr "KP_UP"
+
+#: ../src/richtext/richtextindentspage.cpp:270
+msgid "L&ine spacing:"
+msgstr "&Odstęp między wierszami:"
+
+#: ../src/common/accelcmn.cpp:56
+msgid "LEFT"
+msgstr "LEWO"
+
+#: ../src/generic/prntdlgg.cpp:618 ../src/generic/prntdlgg.cpp:873
+msgid "Landscape"
+msgstr "Pejzaż"
+
+#: ../src/common/stockitem.cpp:174
+msgid "Last"
+msgstr "Ostatni"
+
+#: ../src/common/prntbase.cpp:1542
+msgid "Last page"
+msgstr "Ostatnia strona"
+
+#: ../src/common/log.cpp:311
+#, c-format
+msgid "Last repeated message (\"%s\", %lu time) wasn't output"
+msgid_plural "Last repeated message (\"%s\", %lu times) wasn't output"
+msgstr[0] "Last repeated message (\"%s\", %lu time) wasn't output"
+msgstr[1] "Last repeated message (\"%s\", %lu times) wasn't output"
+msgstr[2] "Last repeated message (\"%s\", %lu times) wasn't output"
+
+#: ../src/common/paper.cpp:104
+msgid "Ledger, 17 x 11 in"
+msgstr "Ledger, 17 x 11 cali"
+
+#: ../src/richtext/richtextliststylepage.cpp:249
+#: ../src/richtext/richtextliststylepage.cpp:252
+#: ../src/richtext/richtextliststylepage.cpp:253
+#: ../src/richtext/richtextbulletspage.cpp:199
+#: ../src/richtext/richtextbulletspage.cpp:202
+#: ../src/richtext/richtextbulletspage.cpp:203
+#: ../src/richtext/richtextsizepage.cpp:246
+msgid "Left"
+msgstr "Lewo"
+
+#: ../src/richtext/richtextindentspage.cpp:204
+#: ../src/richtext/richtextliststylepage.cpp:390
+msgid "Left (&first line):"
+msgstr "Lewo (&pierwsza linijka):"
+
+#: ../src/generic/prntdlgg.cpp:885
+msgid "Left margin (mm):"
+msgstr "Lewy margines (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:141
+#: ../src/richtext/richtextindentspage.cpp:143
+#: ../src/richtext/richtextliststylepage.cpp:330
+#: ../src/richtext/richtextliststylepage.cpp:332
+msgid "Left-align text."
+msgstr "Lewe dostosowanie tekstu."
+
+#: ../src/common/paper.cpp:145
+msgid "Legal Extra 9 1/2 x 15 in"
+msgstr "Legal Extra 9 1/2 x 15 cali"
+
+#: ../src/common/paper.cpp:97
+msgid "Legal, 8 1/2 x 14 in"
+msgstr "Legal, 8 1/2 x 14 cali"
+
+#: ../src/common/paper.cpp:144
+msgid "Letter Extra 9 1/2 x 12 in"
+msgstr "List Extra 9 1/2 x 12 cali"
+
+#: ../src/common/paper.cpp:150
+msgid "Letter Extra Transverse 9.275 x 12 in"
+msgstr "List Extra Poprzecznie 9.275 x 12 cali"
+
+#: ../src/common/paper.cpp:153
+msgid "Letter Plus 8 1/2 x 12.69 in"
+msgstr "List Plus 8 1/2 x 12.69 cala"
+
+#: ../src/common/paper.cpp:170
+msgid "Letter Rotated 11 x 8 1/2 in"
+msgstr "List Obrócony 11 x 8 1/2 cala"
+
+#: ../src/common/paper.cpp:102
+msgid "Letter Small, 8 1/2 x 11 in"
+msgstr "Mały list, 8 1/2 x 11 cali"
+
+#: ../src/common/paper.cpp:148
+msgid "Letter Transverse 8 1/2 x 11 in"
+msgstr "List Poprzecznie 8 1/2 x 11 cali"
+
+#: ../src/common/paper.cpp:96
+msgid "Letter, 8 1/2 x 11 in"
+msgstr "List, 8 1/2 x 11 cali"
+
+#: ../src/generic/aboutdlgg.cpp:173
+msgid "License"
+msgstr "Licencja"
+
+#: ../src/generic/fontdlgg.cpp:332
+msgid "Light"
+msgstr "Cieńszy"
+
+#: ../src/generic/helpext.cpp:298
+#, c-format
+msgid "Line %lu of map file \"%s\" has invalid syntax, skipped."
+msgstr ""
+"Linijka %lu pliku mapy \"%s\" posiada nieprawidłową składnię, pominięta."
+
+#: ../src/richtext/richtextliststylepage.cpp:444
+msgid "Line spacing:"
+msgstr "Odstęp między wierszami:"
+
+#: ../src/html/chm.cpp:838
+msgid "Link contained '//', converted to absolute link."
+msgstr "Odsyłacz zawierający '//' przekonwertowano do adresu bezwzględnego."
+
+#: ../src/richtext/richtextformatdlg.cpp:349
+msgid "List Style"
+msgstr "Styl listy"
+
+#: ../src/richtext/richtextstyles.cpp:1060
+msgid "List styles"
+msgstr "Style listy"
+
+#: ../src/richtext/richtextfontpage.cpp:206
+#: ../src/richtext/richtextfontpage.cpp:208
+msgid "Lists font sizes in points."
+msgstr "Wielkość czcionki listy w punktach."
+
+#: ../src/richtext/richtextfontpage.cpp:199
+#: ../src/richtext/richtextfontpage.cpp:201
+msgid "Lists the available fonts."
+msgstr "Lista dostępnych czcionek."
+
+#: ../src/common/fldlgcmn.cpp:325
+#, c-format
+msgid "Load %s file"
+msgstr "Wczytaj plik %s"
+
+#: ../src/html/htmlwin.cpp:575
+msgid "Loading : "
+msgstr "Wczytywanie : "
+
+#: ../src/unix/snglinst.cpp:246
+#, c-format
+msgid "Lock file '%s' has incorrect owner."
+msgstr "Blokowany plik '%s' ma niewłaściwego właściciela."
+
+#: ../src/unix/snglinst.cpp:251
+#, c-format
+msgid "Lock file '%s' has incorrect permissions."
+msgstr "Blokowany plik '%s' ma niewłaściwe uprawnienia."
+
+#: ../src/generic/logg.cpp:582
+#, c-format
+msgid "Log saved to the file '%s'."
+msgstr "Log został zapisany do pliku '%s'."
+
+#: ../src/richtext/richtextliststylepage.cpp:484
+#: ../src/richtext/richtextbulletspage.cpp:289
+msgid "Lower case letters"
+msgstr "Małe litery"
+
+#: ../src/richtext/richtextliststylepage.cpp:486
+#: ../src/richtext/richtextbulletspage.cpp:291
+msgid "Lower case roman numerals"
+msgstr "Małe litery cyframi rzymskimi"
+
+#: ../src/gtk/mdi.cpp:422 ../src/gtk1/mdi.cpp:431
+msgid "MDI child"
+msgstr "potomek MDI"
+
+#: ../src/common/accelcmn.cpp:68
+msgid "MENU"
+msgstr "MENU"
+
+#: ../src/msw/helpchm.cpp:56
+msgid ""
+"MS HTML Help functions are unavailable because the MS HTML Help library is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Funkcje pomocy dla MS HTML Help nie są dostępne, ponieważ biblioteka MS HTML "
+"Help nie jest zainstalowana na tej maszynie. Zainstaluj ją."
+
+#: ../src/univ/themes/win32.cpp:3754
+msgid "Ma&ximize"
+msgstr "&Maksymalizuj"
+
+#: ../src/common/fmapbase.cpp:203
+msgid "MacArabic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:222
+msgid "MacArmenian"
+msgstr "MacOrmiański"
+
+#: ../src/common/fmapbase.cpp:211
+msgid "MacBengali"
+msgstr "MacBengalski"
+
+#: ../src/common/fmapbase.cpp:217
+msgid "MacBurmese"
+msgstr "MacBirmański"
+
+#: ../src/common/fmapbase.cpp:236
+msgid "MacCeltic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:227
+msgid "MacCentralEurRoman"
+msgstr "MacŚrodkowoEuroRzymski"
+
+#: ../src/common/fmapbase.cpp:223
+msgid "MacChineseSimp"
+msgstr "MacChińskiUpr"
+
+#: ../src/common/fmapbase.cpp:201
+msgid "MacChineseTrad"
+msgstr "MacChińskiTrad"
+
+#: ../src/common/fmapbase.cpp:233
+msgid "MacCroatian"
+msgstr "MacChorwacki"
+
+#: ../src/common/fmapbase.cpp:206
+msgid "MacCyrillic"
+msgstr "MacCyrylica"
+
+#: ../src/common/fmapbase.cpp:207
+msgid "MacDevanagari"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:231
+msgid "MacDingbats"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:226
+msgid "MacEthiopic"
+msgstr "MacEtiopski"
+
+#: ../src/common/fmapbase.cpp:229
+msgid "MacExtArabic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:237
+msgid "MacGaelic"
+msgstr "MacCeltycki"
+
+#: ../src/common/fmapbase.cpp:221
+msgid "MacGeorgian"
+msgstr "MacGruziński"
+
+#: ../src/common/fmapbase.cpp:205
+msgid "MacGreek"
+msgstr "MacGrecki"
+
+#: ../src/common/fmapbase.cpp:209
+msgid "MacGujarati"
+msgstr "MacGudżarati"
+
+#: ../src/common/fmapbase.cpp:208
+msgid "MacGurmukhi"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:204
+msgid "MacHebrew"
+msgstr "MacHebrajski"
+
+#: ../src/common/fmapbase.cpp:234
+msgid "MacIcelandic"
+msgstr "MacIslandzki"
+
+#: ../src/common/fmapbase.cpp:200
+msgid "MacJapanese"
+msgstr "MacJapoński"
+
+#: ../src/common/fmapbase.cpp:214
+msgid "MacKannada"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:238
+msgid "MacKeyboardGlyphs"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:218
+msgid "MacKhmer"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:202
+msgid "MacKorean"
+msgstr "MacKoreański"
+
+#: ../src/common/fmapbase.cpp:220
+msgid "MacLaotian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:215
+msgid "MacMalayalam"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:225
+msgid "MacMongolian"
+msgstr "MacMongolski"
+
+#: ../src/common/fmapbase.cpp:210
+msgid "MacOriya"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:199
+msgid "MacRoman"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:235
+msgid "MacRomanian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:216
+msgid "MacSinhalese"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:230
+msgid "MacSymbol"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:212
+msgid "MacTamil"
+msgstr "MacTamilski"
+
+#: ../src/common/fmapbase.cpp:213
+msgid "MacTelugu"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:219
+msgid "MacThai"
+msgstr "MacTajski"
+
+#: ../src/common/fmapbase.cpp:224
+msgid "MacTibetan"
+msgstr "MacTybetański"
+
+#: ../src/common/fmapbase.cpp:232
+msgid "MacTurkish"
+msgstr "MacTurecki"
+
+#: ../src/common/fmapbase.cpp:228
+msgid "MacVietnamese"
+msgstr "MacWietnamski"
+
+#: ../src/propgrid/advprops.cpp:2024
+msgid "Make a selection:"
+msgstr "Dokonaj wyboru:"
+
+#: ../src/richtext/richtextformatdlg.cpp:362
+#: ../src/richtext/richtextmarginspage.cpp:172
+msgid "Margins"
+msgstr "Marginesy"
+
+#: ../src/generic/fdrepdlg.cpp:147
+msgid "Match case"
+msgstr "Uwzględniaj wielkość liter"
+
+#: ../src/richtext/richtextsizepage.cpp:460
+msgid "Max height:"
+msgstr "Maksymalna wysokość:"
+
+#: ../src/richtext/richtextsizepage.cpp:433
+msgid "Max width:"
+msgstr "Maksymalna szerokość:"
+
+#: ../src/unix/mediactrl.cpp:1006
+#, c-format
+msgid "Media playback error: %s"
+msgstr "Błąd odtwarzania mediów: %s"
+
+#: ../src/common/fs_mem.cpp:175
+#, c-format
+msgid "Memory VFS already contains file '%s'!"
+msgstr "Pamięć VFS już zawiera plik '%s'!"
+
+#: ../src/msw/frame.cpp:347
+msgid "Menu"
+msgstr "Menu"
+
+#: ../src/common/msgout.cpp:124
+msgid "Message"
+msgstr "Komunikat"
+
+#: ../src/univ/themes/metal.cpp:168
+msgid "Metal theme"
+msgstr "Kompozycja metalowa"
+
+#: ../src/msw/ole/automtn.cpp:641
+msgid "Method or property not found."
+msgstr "Nie odnaleziono metody lub właściwości."
+
+#: ../src/univ/themes/win32.cpp:3752
+msgid "Mi&nimize"
+msgstr "Mi&nimalizuj"
+
+#: ../src/richtext/richtextsizepage.cpp:406
+msgid "Min height:"
+msgstr "Minimalna wysokość:"
+
+#: ../src/richtext/richtextsizepage.cpp:379
+msgid "Min width:"
+msgstr "Min szerokość:"
+
+#: ../src/msw/ole/automtn.cpp:657
+msgid "Missing a required parameter."
+msgstr "Brak wymaganego parametru."
+
+#: ../src/generic/fontdlgg.cpp:324
+msgid "Modern"
+msgstr "Modern"
+
+#: ../src/generic/filectrlg.cpp:462
+msgid "Modified"
+msgstr "Zmodyfikowany"
+
+#: ../src/common/module.cpp:133
+#, c-format
+msgid "Module \"%s\" initialization failed"
+msgstr "Inicjalizacja modułu \"%s\" nie powiodła się"
+
+#: ../src/common/paper.cpp:132
+msgid "Monarch Envelope, 3 7/8 x 7 1/2 in"
+msgstr "Koperta Monarch, 3 7/8 x 7 1/2 cala"
+
+#: ../src/msw/fswatcher.cpp:143
+msgid "Monitoring individual files for changes is not supported currently."
+msgstr ""
+"Monitorowanie zmian pojedynczych plików nie jest aktualnie obsługiwane."
+
+#: ../src/generic/editlbox.cpp:276
+msgid "Move down"
+msgstr "Przenieś w dół"
+
+#: ../src/generic/editlbox.cpp:275
+msgid "Move up"
+msgstr "Przenieś w górę"
+
+#: ../src/richtext/richtextsizepage.cpp:679
+#: ../src/richtext/richtextsizepage.cpp:681
+msgid "Moves the object to the next paragraph."
+msgstr "Przenosi obiekt do następnego akapitu."
+
+#: ../src/richtext/richtextsizepage.cpp:673
+#: ../src/richtext/richtextsizepage.cpp:675
+msgid "Moves the object to the previous paragraph."
+msgstr "Przenosi obiekt do poprzedniego paragrafu."
+
+#: ../src/richtext/richtextbuffer.cpp:9271
+msgid "Multiple Cell Properties"
+msgstr "Właściwości wielu komórek"
+
+#: ../src/common/accelcmn.cpp:81
+msgid "NUM_LOCK"
+msgstr "NUM_LOCK"
+
+#: ../src/generic/filectrlg.cpp:459
+msgid "Name"
+msgstr "Nazwa"
+
+#: ../src/common/stockitem.cpp:175
+msgid "Network"
+msgstr "Sieć"
+
+#: ../src/common/stockitem.cpp:176
+#, fuzzy
+msgid "New"
+msgstr "&Nowy"
+
+#: ../src/richtext/richtextstyledlg.cpp:243
+msgid "New &Box Style..."
+msgstr "Nowy styl &bloku..."
+
+#: ../src/richtext/richtextstyledlg.cpp:225
+msgid "New &Character Style..."
+msgstr "Nowy styl &znaku..."
+
+#: ../src/richtext/richtextstyledlg.cpp:237
+msgid "New &List Style..."
+msgstr "Nowy styl &listy..."
+
+#: ../src/richtext/richtextstyledlg.cpp:231
+msgid "New &Paragraph Style..."
+msgstr "Nowy styl &paragrafu..."
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:651
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:817
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:890
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:931
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "New Style"
+msgstr "Nowy styl"
+
+#: ../src/generic/dirdlgg.cpp:102
+msgid "New directory"
+msgstr "Nowy katalog"
+
+#: ../src/generic/editlbox.cpp:273
+msgid "New item"
+msgstr "Nowa pozycja"
+
+# To jest maska do tworzenia nazw typu NowaNaz1 itd
+#: ../src/generic/dirdlgg.cpp:326 ../src/generic/dirdlgg.cpp:336
+#: ../src/generic/filectrlg.cpp:653 ../src/generic/filectrlg.cpp:662
+msgid "NewName"
+msgstr "NowaNaz"
+
+#: ../src/generic/tipdlg.cpp:305
+msgid "Next"
+msgstr "Dalej"
+
+#: ../src/common/prntbase.cpp:1537 ../src/html/helpwnd.cpp:678
+msgid "Next page"
+msgstr "Następna strona"
+
+#: ../include/wx/msgdlg.h:272 ../src/common/stockitem.cpp:177
+#: ../src/motif/msgdlg.cpp:196
+msgid "No"
+msgstr "Nie"
+
+#: ../src/generic/animateg.cpp:150
+#, c-format
+msgid "No animation handler for type %ld defined."
+msgstr "Brak procedury obsługi animacji dla typu %ld."
+
+#: ../src/dfb/bitmap.cpp:642 ../src/dfb/bitmap.cpp:676
+#, c-format
+msgid "No bitmap handler for type %d defined."
+msgstr "Brak procedury obsługi bitmapy dla typu %d."
+
+#: ../src/osx/carbon/dataview.cpp:1784
+msgid "No column existing."
+msgstr "Nie istnieje kolumny."
+
+#: ../src/osx/carbon/dataview.cpp:1674
+msgid "No column for the specified column existing."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1423
+msgid "No column for the specified column position existing."
+msgstr "Nie istnieje kolumny dla określonej pozycji kolumny."
+
+#: ../src/common/utilscmn.cpp:1049
+msgid "No default application configured for HTML files."
+msgstr "Nie ma ustawionej domyślnej aplikacji dla plików HTML."
+
+#: ../src/generic/helpext.cpp:449
+msgid "No entries found."
+msgstr "Nie znaleziono pozycji."
+
+#: ../src/common/fontmap.cpp:421
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found,\n"
+"but an alternative encoding '%s' is available.\n"
+"Do you want to use this encoding (otherwise you will have to choose another "
+"one)?"
+msgstr ""
+"Brak czcionki do wyświelenia tekstu w kodowaniu '%s',\n"
+"jednak dostępne jest alternatywne kodowanie '%s'.\n"
+"Chesz użyć tego kodowania (możesz także wybrać inne)?"
+
+#: ../src/common/fontmap.cpp:426
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found.\n"
+"Would you like to select a font to be used for this encoding\n"
+"(otherwise the text in this encoding will not be shown correctly)?"
+msgstr ""
+"Brak czcionki do wyświelenia tekstu w kodowaniu '%s'.\n"
+"Chcesz wskazać czcionkę do użycia\n"
+"(inaczej tekst może nie być wyświetlony poprawnie)?"
+
+#: ../src/generic/animateg.cpp:142
+msgid "No handler found for animation type."
+msgstr "Brak procedury obsługi typu animacji."
+
+#: ../src/common/image.cpp:2591
+msgid "No handler found for image type."
+msgstr "Brak procedury obsługi grafiki."
+
+#: ../src/common/image.cpp:2599 ../src/common/image.cpp:2710
+#: ../src/common/image.cpp:2763
+#, c-format
+msgid "No image handler for type %d defined."
+msgstr "Brak procedury obsługi obrazów typu %d."
+
+#: ../src/common/image.cpp:2733 ../src/common/image.cpp:2777
+#, c-format
+msgid "No image handler for type %s defined."
+msgstr "Brak procedury obsługi obrazów typu %s."
+
+#: ../src/html/helpwnd.cpp:871
+msgid "No matching page found yet"
+msgstr "Jeszcze nie znaleziono pasującej strony"
+
+#: ../src/osx/carbon/dataview.cpp:1676 ../src/osx/carbon/dataview.cpp:1786
+msgid "No renderer or invalid renderer type specified for custom data column."
+msgstr ""
+"Nie ma rendera lub nieprawidłowy typ rendera określonego dla własnych danych "
+"kolumny."
+
+#: ../src/osx/carbon/dataview.cpp:1424
+msgid "No renderer specified for column."
+msgstr "Nie określono rendera dla kolumny."
+
+#: ../src/unix/sound.cpp:81
+msgid "No sound"
+msgstr "Brak dźwięku"
+
+#: ../src/common/image.cpp:2166 ../src/common/image.cpp:2207
+msgid "No unused colour in image being masked."
+msgstr "Brak nieużywanych kolorów w maskowanym obrazie."
+
+#: ../src/common/image.cpp:3236
+msgid "No unused colour in image."
+msgstr "Brak wolnych kolorów w obrazie."
+
+#: ../src/generic/helpext.cpp:306
+#, c-format
+msgid "No valid mappings found in the file \"%s\"."
+msgstr "Znaleziono nie ważne mapowania w pliku \"%s\"."
+
+#: ../src/richtext/richtextborderspage.cpp:542
+#: ../src/richtext/richtextsizepage.cpp:245
+#: ../src/richtext/richtextsizepage.cpp:249
+#, fuzzy
+msgid "None"
+msgstr "(Brak)"
+
+#: ../src/common/fmapbase.cpp:157
+msgid "Nordic (ISO-8859-10)"
+msgstr "Nordycki (ISO-8859-10)"
+
+#: ../src/generic/fontdlgg.cpp:328 ../src/generic/fontdlgg.cpp:331
+msgid "Normal"
+msgstr "Normalny"
+
+#: ../src/html/helpwnd.cpp:1276
+msgid "Normal face<br>and <u>underlined</u>. "
+msgstr "Zwykły tekst<br>i <u>podkreślony</u>. "
+
+#: ../src/html/helpwnd.cpp:1218
+msgid "Normal font:"
+msgstr "Normalna czcionka:"
+
+#: ../src/propgrid/props.cpp:887
+#, c-format
+msgid "Not %s"
+msgstr ""
+
+#: ../include/wx/filename.h:586 ../include/wx/filename.h:591
+msgid "Not available"
+msgstr "Niedostępne"
+
+#: ../src/richtext/richtextfontpage.cpp:340
+msgid "Not underlined"
+msgstr "Nie podkreślony"
+
+#: ../src/common/paper.cpp:116
+msgid "Note, 8 1/2 x 11 in"
+msgstr "Note, 8 1/2 x 11 cali"
+
+#: ../src/generic/notifmsgg.cpp:104
+msgid "Notice"
+msgstr "Uwaga"
+
+#: ../src/osx/carbon/dataview.cpp:902
+msgid "Number of columns could not be determined."
+msgstr "Ilość kolumn nie może być ustalona"
+
+#: ../src/richtext/richtextliststylepage.cpp:487
+#: ../src/richtext/richtextbulletspage.cpp:292
+msgid "Numbered outline"
+msgstr "Numerowane kontury"
+
+#: ../include/wx/msgdlg.h:273 ../src/richtext/richtextstyledlg.cpp:297
+#: ../src/common/stockitem.cpp:178 ../src/msw/msgdlg.cpp:489
+#: ../src/msw/msgdlg.cpp:795 ../src/msw/dialog.cpp:120
+#: ../src/gtk1/fontdlg.cpp:138
+msgid "OK"
+msgstr "OK"
+
+#: ../src/msw/ole/automtn.cpp:681
+#, c-format
+msgid "OLE Automation error in %s: %s"
+msgstr "Błąd automatyzacji OLE w %s: %s"
+
+#: ../include/wx/richtext/richtextimagedlg.h:39
+msgid "Object Properties"
+msgstr "&Właściwości obiektu"
+
+#: ../src/msw/ole/automtn.cpp:649
+msgid "Object implementation does not support named arguments."
+msgstr "Implementacja obiektu nie obsługuje nazywanych argumentów."
+
+#: ../src/common/xtixml.cpp:264
+msgid "Objects must have an id attribute"
+msgstr "Obiekty muszą posiadać właściwość typu 'id'"
+
+#: ../src/common/docview.cpp:1756 ../src/common/docview.cpp:1798
+msgid "Open File"
+msgstr "Otwieranie Pliku"
+
+#: ../src/html/helpwnd.cpp:684 ../src/html/helpwnd.cpp:1557
+msgid "Open HTML document"
+msgstr "Otwórz dokument HTML"
+
+#: ../src/generic/dbgrptg.cpp:163
+#, c-format
+msgid "Open file \"%s\""
+msgstr "Otwieranie pliku \"%s\""
+
+#: ../src/common/stockitem.cpp:179
+#, fuzzy
+msgid "Open..."
+msgstr "&Otwórz..."
+
+#: ../src/osx/carbon/glcanvas.cpp:48
+#, c-format
+msgid "OpenGL function \"%s\" failed: %s (error %d)"
+msgstr "Nie powiodła się funkcja \"%s\" OpenGL: %s (błąd %d)"
+
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:821
+msgid "Operation not permitted."
+msgstr "Operacja nie jest dozwolona."
+
+#: ../src/common/cmdline.cpp:735
+#, c-format
+msgid "Option '%s' can't be negated"
+msgstr ""
+
+#: ../src/common/cmdline.cpp:899
+#, c-format
+msgid "Option '%s' requires a value."
+msgstr "Opcja '%s' wymaga podania wartości."
+
+#: ../src/common/cmdline.cpp:982
+#, c-format
+msgid "Option '%s': '%s' cannot be converted to a date."
+msgstr "Opcja '%s': nie można przekształcić '%s' na datę."
+
+#: ../src/generic/dirdlgg.cpp:187 ../src/generic/prntdlgg.cpp:623
+msgid "Options"
+msgstr "Opcje"
+
+#: ../src/generic/prntdlgg.cpp:620 ../src/generic/prntdlgg.cpp:874
+msgid "Orientation"
+msgstr "Orientacja"
+
+#: ../src/common/windowid.cpp:259
+msgid "Out of window IDs.  Recommend shutting down application."
+msgstr "Po za identyfikatorami okna. Zalecane jest zamknięcie aplikacji."
+
+#: ../src/richtext/richtextborderspage.cpp:400
+#: ../src/richtext/richtextborderspage.cpp:533
+msgid "Outline"
+msgstr "kontur"
+
+#: ../src/richtext/richtextborderspage.cpp:550
+msgid "Outset"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:645
+msgid "Overflow while coercing argument values."
+msgstr "Przepełnienie podczas wymuszania wartości argumentów."
+
+#: ../src/common/accelcmn.cpp:84
+msgid "PAGEDOWN"
+msgstr "PAGEDOWN"
+
+#: ../src/common/accelcmn.cpp:83
+msgid "PAGEUP"
+msgstr "PAGEUP"
+
+#: ../src/common/accelcmn.cpp:69
+msgid "PAUSE"
+msgstr "PAUZA"
+
+#: ../src/common/imagpcx.cpp:457 ../src/common/imagpcx.cpp:480
+msgid "PCX: couldn't allocate memory"
+msgstr "PCX: Nie można przydzielić pamięci."
+
+#: ../src/common/imagpcx.cpp:456
+msgid "PCX: image format unsupported"
+msgstr "PCX: nieobsługiwany format obrazu."
+
+#: ../src/common/imagpcx.cpp:479
+msgid "PCX: invalid image"
+msgstr "PCX: nieprawidłowy obraz"
+
+#: ../src/common/imagpcx.cpp:442
+msgid "PCX: this is not a PCX file."
+msgstr "PCX: To nie jest plik w formacie PCX."
+
+#: ../src/common/imagpcx.cpp:459 ../src/common/imagpcx.cpp:481
+msgid "PCX: unknown error !!!"
+msgstr "PCX: nieznany błąd !!!"
+
+#: ../src/common/imagpcx.cpp:458
+msgid "PCX: version number too low"
+msgstr "PCX: zbyt niski numer wersji."
+
+#: ../src/common/accelcmn.cpp:55
+msgid "PGDN"
+msgstr "PGDN"
+
+#: ../src/common/accelcmn.cpp:54
+msgid "PGUP"
+msgstr "PGUP"
+
+#: ../src/common/imagpnm.cpp:91
+msgid "PNM: Couldn't allocate memory."
+msgstr "PNM: Nie można przydzielić pamięci."
+
+#: ../src/common/imagpnm.cpp:73
+msgid "PNM: File format is not recognized."
+msgstr "PNM: Nieznany format pliku."
+
+#: ../src/common/imagpnm.cpp:112 ../src/common/imagpnm.cpp:134
+#: ../src/common/imagpnm.cpp:156
+msgid "PNM: File seems truncated."
+msgstr "PNM: Plik wygląda na obcięty."
+
+#: ../src/common/paper.cpp:188
+msgid "PRC 16K 146 x 215 mm"
+msgstr "PRC 16K 146 x 215 mm"
+
+#: ../src/common/paper.cpp:201
+msgid "PRC 16K Rotated"
+msgstr "PRC 16K Obrócony"
+
+#: ../src/common/paper.cpp:189
+msgid "PRC 32K 97 x 151 mm"
+msgstr "PRC 32K 97 x 151 mm"
+
+#: ../src/common/paper.cpp:202
+msgid "PRC 32K Rotated"
+msgstr "PRC 32K Obrócony"
+
+#: ../src/common/paper.cpp:190
+msgid "PRC 32K(Big) 97 x 151 mm"
+msgstr "PRC 32K(Big) 97 x 151 mm"
+
+#: ../src/common/paper.cpp:203
+msgid "PRC 32K(Big) Rotated"
+msgstr "PRC 32K(Big) Obrócony"
+
+#: ../src/common/paper.cpp:191
+msgid "PRC Envelope #1 102 x 165 mm"
+msgstr "Koperta PRC #1, 102 x 165 mm"
+
+#: ../src/common/paper.cpp:204
+msgid "PRC Envelope #1 Rotated 165 x 102 mm"
+msgstr "Koperta PRC #1 Obrócona, 165 x 102 mm"
+
+#: ../src/common/paper.cpp:200
+msgid "PRC Envelope #10 324 x 458 mm"
+msgstr "Koperta PRC #10 324 x 458 mm"
+
+#: ../src/common/paper.cpp:213
+msgid "PRC Envelope #10 Rotated 458 x 324 mm"
+msgstr "Koperta PRC #10 Obrócona 458 x 324 mm"
+
+#: ../src/common/paper.cpp:192
+msgid "PRC Envelope #2 102 x 176 mm"
+msgstr "Koperta PRC #2 102 x 176 mm"
+
+#: ../src/common/paper.cpp:205
+msgid "PRC Envelope #2 Rotated 176 x 102 mm"
+msgstr "Koperta PRC #2 Obrócona 176 x 102 mm"
+
+#: ../src/common/paper.cpp:193
+msgid "PRC Envelope #3 125 x 176 mm"
+msgstr "Koperta PRC #3 125 x 176 mm"
+
+#: ../src/common/paper.cpp:206
+msgid "PRC Envelope #3 Rotated 176 x 125 mm"
+msgstr "Koperta PRC #3 Obrócona 176 x 125 mm"
+
+#: ../src/common/paper.cpp:194
+msgid "PRC Envelope #4 110 x 208 mm"
+msgstr "Koperta PRC #4 110 x 208 mm"
+
+#: ../src/common/paper.cpp:207
+msgid "PRC Envelope #4 Rotated 208 x 110 mm"
+msgstr "Koperta PRC #4 Obrócona 208 x 110 mm"
+
+#: ../src/common/paper.cpp:195
+msgid "PRC Envelope #5 110 x 220 mm"
+msgstr "Koperta PRC #5 110 x 220 mm"
+
+#: ../src/common/paper.cpp:208
+msgid "PRC Envelope #5 Rotated 220 x 110 mm"
+msgstr "Koperta PRC #5 Obrócona 220 x 110 mm"
+
+#: ../src/common/paper.cpp:196
+msgid "PRC Envelope #6 120 x 230 mm"
+msgstr "Koperta PRC #6 120 x 230 mm"
+
+#: ../src/common/paper.cpp:209
+msgid "PRC Envelope #6 Rotated 230 x 120 mm"
+msgstr "Koperta PRC #6 Obrócona 230 x 120 mm"
+
+#: ../src/common/paper.cpp:197
+msgid "PRC Envelope #7 160 x 230 mm"
+msgstr "Koperta PRC #7 160 x 230 mm"
+
+#: ../src/common/paper.cpp:210
+msgid "PRC Envelope #7 Rotated 230 x 160 mm"
+msgstr "Koperta PRC #7 Obrócona 230 x 160 mm"
+
+#: ../src/common/paper.cpp:198
+msgid "PRC Envelope #8 120 x 309 mm"
+msgstr "Koperta PRC #8 120 x 309 mm"
+
+#: ../src/common/paper.cpp:211
+msgid "PRC Envelope #8 Rotated 309 x 120 mm"
+msgstr "Koperta PRC #8 Obrócona 309 x 120 mm"
+
+#: ../src/common/paper.cpp:199
+msgid "PRC Envelope #9 229 x 324 mm"
+msgstr "Koperta PRC #9 229 x 324 mm"
+
+#: ../src/common/paper.cpp:212
+msgid "PRC Envelope #9 Rotated 324 x 229 mm"
+msgstr "Koperta PRC #9 Obrócona 324 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:72
+msgid "PRINT"
+msgstr "WYDRUK"
+
+#: ../src/richtext/richtextmarginspage.cpp:286
+msgid "Padding"
+msgstr ""
+
+#: ../src/common/prntbase.cpp:2044
+#, c-format
+msgid "Page %d"
+msgstr "Strona %d"
+
+#: ../src/common/prntbase.cpp:2042
+#, c-format
+msgid "Page %d of %d"
+msgstr "Strona %d z %d"
+
+#: ../src/gtk/print.cpp:783
+msgid "Page Setup"
+msgstr "Ustawienia strony"
+
+#: ../src/generic/prntdlgg.cpp:833 ../src/common/prntbase.cpp:467
+#: ../src/gtk/gnome/gprint.cpp:710
+msgid "Page setup"
+msgstr "Ustawienia strony"
+
+#: ../src/generic/prntdlgg.cpp:221
+msgid "Pages"
+msgstr "Strony"
+
+#: ../src/generic/prntdlgg.cpp:607 ../src/generic/prntdlgg.cpp:806
+#: ../src/generic/prntdlgg.cpp:847 ../src/generic/prntdlgg.cpp:860
+#: ../src/generic/prntdlgg.cpp:1057 ../src/generic/prntdlgg.cpp:1062
+msgid "Paper size"
+msgstr "Rozmiar papieru"
+
+#: ../src/richtext/richtextstyles.cpp:1058
+msgid "Paragraph styles"
+msgstr "Style paragrafu"
+
+#: ../src/common/xtistrm.cpp:469
+msgid "Passing a already registered object to SetObject"
+msgstr "Przekazano już zarejestrowany obiekt do funkcji SetObject"
+
+#: ../src/common/xtistrm.cpp:480
+#, fuzzy
+msgid "Passing an unknown object to GetObject"
+msgstr "Przekazanie nieznanego obiektu do funkcji GetObject"
+
+#: ../src/richtext/richtextctrl.cpp:3103 ../src/common/stockitem.cpp:180
+#: ../src/stc/stc_i18n.cpp:19
+msgid "Paste"
+msgstr "Wklej"
+
+#: ../src/common/stockitem.cpp:262
+msgid "Paste selection"
+msgstr "Wklej wybór"
+
+#: ../src/richtext/richtextliststylepage.cpp:222
+#: ../src/richtext/richtextbulletspage.cpp:172
+msgid "Peri&od"
+msgstr "&Okres"
+
+# prawa?
+#: ../src/generic/filectrlg.cpp:465
+msgid "Permissions"
+msgstr "Uprawnienia"
+
+#: ../src/richtext/richtextbuffer.cpp:11745
+msgid "Picture Properties"
+msgstr "&Właściwości obrazu"
+
+#: ../include/wx/unix/pipe.h:47
+msgid "Pipe creation failed"
+msgstr "Nie udało się utworzyć potoku."
+
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Please choose a valid font."
+msgstr "Proszę wybrać poprawną czcionkę."
+
+#: ../src/gtk/filedlg.cpp:72
+msgid "Please choose an existing file."
+msgstr "Proszę wybrać istniejący plik."
+
+#: ../src/html/helpwnd.cpp:813
+msgid "Please choose the page to display:"
+msgstr "Wybierz stronę do wyświetlenia:"
+
+#: ../src/msw/dialup.cpp:785
+msgid "Please choose which ISP do you want to connect to"
+msgstr "Wybierz ISP, z którym chcesz się połączyć"
+
+#: ../src/msw/listctrl.cpp:372
+#, c-format
+msgid ""
+"Please install a newer version of comctl32.dll\n"
+"(at least version 4.70 is required but you have %d.%02d)\n"
+"or this program won't operate correctly."
+msgstr ""
+"Proszę zainstalować nowszą wersję bliblioteki comctl32.dll\n"
+"(wymagana co najmniej 4.70, zainstalowana %d.%02d)\n"
+"inaczej program nie będzie działał poprawnie."
+
+#: ../src/common/headerctrlcmn.cpp:59
+msgid "Please select the columns to show and define their order:"
+msgstr "Proszę wybrać kolumny do pokazania i określić ich kolejność:"
+
+#: ../src/common/prntbase.cpp:521
+#, fuzzy
+msgid "Please wait while printing..."
+msgstr "Proszę czekać, trwa drukowanie\n"
+
+#: ../src/propgrid/advprops.cpp:631
+msgid "Point Size"
+msgstr "&Rozmiar punktu:"
+
+#: ../src/osx/carbon/dataview.cpp:1278 ../src/osx/carbon/dataview.cpp:1329
+#: ../src/osx/carbon/dataview.cpp:1420 ../src/osx/carbon/dataview.cpp:1443
+#: ../src/osx/carbon/dataview.cpp:1460 ../src/osx/carbon/dataview.cpp:1477
+#: ../src/osx/carbon/dataview.cpp:1670 ../src/osx/carbon/dataview.cpp:1779
+#: ../src/osx/carbon/dataview.cpp:1821 ../src/osx/carbon/dataview.cpp:1874
+#: ../src/osx/carbon/dataview.cpp:1997
+msgid "Pointer to data view control not set correctly."
+msgstr "Wskaźnik do kontroli widoku danych nie jest prawidłowo ustawiony."
+
+#: ../src/osx/carbon/dataview.cpp:1279 ../src/osx/carbon/dataview.cpp:1338
+#: ../src/osx/carbon/dataview.cpp:1421 ../src/osx/carbon/dataview.cpp:1478
+#: ../src/osx/carbon/dataview.cpp:1671 ../src/osx/carbon/dataview.cpp:1780
+#: ../src/osx/carbon/dataview.cpp:1822 ../src/osx/carbon/dataview.cpp:1875
+#: ../src/osx/carbon/dataview.cpp:1998
+msgid "Pointer to model not set correctly."
+msgstr "Wskaźnik do modelu nie jest prawidłowo ustawiony."
+
+#: ../src/generic/prntdlgg.cpp:617 ../src/generic/prntdlgg.cpp:872
+msgid "Portrait"
+msgstr "Portret"
+
+#: ../src/richtext/richtextsizepage.cpp:493
+msgid "Position"
+msgstr "PozycjaPytanie"
+
+#: ../src/generic/prntdlgg.cpp:303
+msgid "PostScript file"
+msgstr "plik PostScript"
+
+#: ../src/common/stockitem.cpp:181
+msgid "Preferences"
+msgstr "Preferencje"
+
+#: ../src/osx/menu_osx.cpp:643
+msgid "Preferences..."
+msgstr "&Preferencje..."
+
+#: ../src/common/prntbase.cpp:529
+msgid "Preparing"
+msgstr "Przygotowywanie"
+
+#: ../src/generic/fontdlgg.cpp:455 ../src/osx/carbon/fontdlg.cpp:576
+#: ../src/html/helpwnd.cpp:1235
+msgid "Preview:"
+msgstr "Podgląd:"
+
+#: ../src/common/prntbase.cpp:1523 ../src/html/helpwnd.cpp:677
+msgid "Previous page"
+msgstr "Poprzednia strona"
+
+#: ../src/generic/prntdlgg.cpp:148 ../src/generic/prntdlgg.cpp:162
+#: ../src/common/prntbase.cpp:409 ../src/common/prntbase.cpp:1511
+#: ../src/gtk/print.cpp:593 ../src/gtk/print.cpp:606
+#: ../src/gtk/gnome/gprint.cpp:537 ../src/gtk/gnome/gprint.cpp:549
+msgid "Print"
+msgstr "Drukuj"
+
+#: ../include/wx/prntbase.h:395 ../src/common/docview.cpp:1250
+msgid "Print Preview"
+msgstr "Podgląd wydruku"
+
+#: ../src/common/prntbase.cpp:1985 ../src/common/prntbase.cpp:2027
+#: ../src/common/prntbase.cpp:2035
+msgid "Print Preview Failure"
+msgstr "Awaria podglądu wydruku"
+
+#: ../src/generic/prntdlgg.cpp:229
+msgid "Print Range"
+msgstr "Zakres wydruku"
+
+#: ../src/generic/prntdlgg.cpp:454
+msgid "Print Setup"
+msgstr "Ustawienia wydruku"
+
+#: ../src/generic/prntdlgg.cpp:626
+msgid "Print in colour"
+msgstr "Wydruk w kolorze"
+
+#: ../src/common/stockitem.cpp:182
+#, fuzzy
+msgid "Print previe&w..."
+msgstr "Podgląd &wydruku"
+
+#: ../src/gtk/gnome/gprint.cpp:944
+msgid "Print preview"
+msgstr "Podgląd wydruku"
+
+#: ../src/common/docview.cpp:1244
+msgid "Print preview creation failed."
+msgstr "Nie udało się utworzyć podglądu wydruku."
+
+#: ../src/common/stockitem.cpp:182
+#, fuzzy
+msgid "Print preview..."
+msgstr "Podgląd wydruku"
+
+#: ../src/generic/prntdlgg.cpp:635
+msgid "Print spooling"
+msgstr "Kolejkowanie wydruków"
+
+#: ../src/html/helpwnd.cpp:688
+msgid "Print this page"
+msgstr "Drukuj stronę"
+
+#: ../src/generic/prntdlgg.cpp:190
+msgid "Print to File"
+msgstr "Drukuj do pliku"
+
+#: ../src/common/stockitem.cpp:183
+#, fuzzy
+msgid "Print..."
+msgstr "&Drukuj..."
+
+#: ../src/generic/prntdlgg.cpp:498
+msgid "Printer"
+msgstr "Drukarka"
+
+#: ../src/generic/prntdlgg.cpp:638
+msgid "Printer command:"
+msgstr "Polecenie drukarki:"
+
+#: ../src/generic/prntdlgg.cpp:185
+msgid "Printer options"
+msgstr "Opcje drukarki"
+
+#: ../src/generic/prntdlgg.cpp:650
+msgid "Printer options:"
+msgstr "Opcje drukarki:"
+
+#: ../src/generic/prntdlgg.cpp:921
+msgid "Printer..."
+msgstr "Drukarka..."
+
+#: ../src/generic/prntdlgg.cpp:201
+msgid "Printer:"
+msgstr "Drukarka:"
+
+#: ../include/wx/richtext/richtextprint.h:163 ../src/common/prntbase.cpp:518
+#: ../src/html/htmprint.cpp:277
+#, fuzzy
+msgid "Printing"
+msgstr "Drukowanie "
+
+#: ../src/common/prntbase.cpp:586
+msgid "Printing "
+msgstr "Drukowanie "
+
+#: ../src/common/prntbase.cpp:330
+msgid "Printing Error"
+msgstr "Błąd wydruku"
+
+#: ../src/common/prntbase.cpp:544
+#, c-format
+msgid "Printing page %d of %d"
+msgstr "Drukowanie strony %d z %d"
+
+#: ../src/generic/printps.cpp:201
+#, c-format
+msgid "Printing page %d..."
+msgstr "Drukowanie strony %d..."
+
+#: ../src/generic/printps.cpp:161
+msgid "Printing..."
+msgstr "Drukowanie..."
+
+#: ../include/wx/richtext/richtextprint.h:109 ../include/wx/prntbase.h:263
+#: ../src/common/docview.cpp:2125
+msgid "Printout"
+msgstr "Wydruk"
+
+#: ../src/common/debugrpt.cpp:565
+#, c-format
+msgid ""
+"Processing debug report has failed, leaving the files in \"%s\" directory."
+msgstr ""
+"Przetwarzanie raportu błędów nie powiodło się, pozostawiając pliku w "
+"katalogu \"%s\"."
+
+#: ../src/osx/carbon/dataview.cpp:2472
+msgid "Progress renderer cannot render value type; value type: "
+msgstr "Render postępu nie może renderować typu wartości; typ wartości:"
+
+#: ../src/common/prntbase.cpp:528
+msgid "Progress:"
+msgstr "Postęp:"
+
+#: ../src/common/stockitem.cpp:184
+#, fuzzy
+msgid "Properties"
+msgstr "&Właściwości"
+
+#: ../src/propgrid/manager.cpp:237
+msgid "Property"
+msgstr "Właściwość"
+
+#: ../src/propgrid/propgrid.cpp:3144 ../src/propgrid/propgrid.cpp:3276
+msgid "Property Error"
+msgstr "Błąd właściwości"
+
+#: ../src/common/paper.cpp:113
+msgid "Quarto, 215 x 275 mm"
+msgstr "Quarto, 215 x 275 mm"
+
+#: ../src/generic/logg.cpp:1036
+msgid "Question"
+msgstr "Pytanie"
+
+#: ../src/common/stockitem.cpp:156
+#, fuzzy
+msgid "Quit"
+msgstr "&Wyjście"
+
+#: ../src/osx/menu_osx.cpp:610 ../src/osx/menu_osx.cpp:657
+#, c-format
+msgid "Quit %s"
+msgstr "&Wyjście z %s"
+
+#: ../src/common/stockitem.cpp:263
+msgid "Quit this program"
+msgstr "Zamknij program"
+
+#: ../src/common/accelcmn.cpp:53
+msgid "RETURN"
+msgstr "RETURN"
+
+#: ../src/common/accelcmn.cpp:57
+msgid "RIGHT"
+msgstr "PRAWO"
+
+#: ../src/common/accelcmn.cpp:327
+msgid "RawCtrl+"
+msgstr ""
+
+#: ../src/common/ffile.cpp:113 ../src/common/ffile.cpp:134
+#, c-format
+msgid "Read error on file '%s'"
+msgstr "Błąd odczytu pliku '%s'"
+
+#: ../src/common/prntbase.cpp:257
+msgid "Ready"
+msgstr "Gotowy"
+
+#: ../src/common/stockitem.cpp:185 ../src/stc/stc_i18n.cpp:16
+msgid "Redo"
+msgstr "Ponów"
+
+#: ../src/common/stockitem.cpp:264
+msgid "Redo last action"
+msgstr "Powtórz ostatnią czynność"
+
+#: ../src/common/stockitem.cpp:186
+msgid "Refresh"
+msgstr "Odśwież"
+
+#: ../src/msw/registry.cpp:625
+#, c-format
+msgid "Registry key '%s' already exists."
+msgstr "Klucz rejestru '%s' już istnieje."
+
+#: ../src/msw/registry.cpp:594
+#, c-format
+msgid "Registry key '%s' does not exist, cannot rename it."
+msgstr "Klucz rejestru '%s' nie istnieje, nie można zmienić jego nazwy."
+
+#: ../src/msw/registry.cpp:726
+#, c-format
+msgid ""
+"Registry key '%s' is needed for normal system operation,\n"
+"deleting it will leave your system in unusable state:\n"
+"operation aborted."
+msgstr ""
+"Klucz rejestru '%s' jest potrzebny do normalnego funkcjonowania systemu,\n"
+"usunięcie go zdestabilizowałoby system:\n"
+"operacja została przerwana."
+
+#: ../src/msw/registry.cpp:520
+#, c-format
+msgid "Registry value '%s' already exists."
+msgstr "Wartość rejestru '%s' już istnieje."
+
+#: ../src/richtext/richtextfontpage.cpp:332
+#: ../src/richtext/richtextfontpage.cpp:336
+msgid "Regular"
+msgstr "Regularne"
+
+#: ../src/richtext/richtextsizepage.cpp:516
+msgid "Relative"
+msgstr ""
+
+#: ../src/generic/helpext.cpp:462
+msgid "Relevant entries:"
+msgstr "Pozycje związane:"
+
+#: ../include/wx/generic/progdlgg.h:86
+msgid "Remaining time:"
+msgstr "Pozostały czas:"
+
+#: ../src/common/stockitem.cpp:187
+msgid "Remove"
+msgstr "Usuń"
+
+#: ../src/richtext/richtextctrl.cpp:1430
+msgid "Remove Bullet"
+msgstr "Usuń wypunktowanie"
+
+#: ../src/html/helpwnd.cpp:440
+msgid "Remove current page from bookmarks"
+msgstr "Usuń bieżącą stronę z listy zakładek"
+
+#: ../src/common/rendcmn.cpp:194
+#, c-format
+msgid "Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."
+msgstr ""
+"Wizualizator \"%s\" ma niezgodną wersję %d.%d i nie może być załadowany."
+
+#: ../src/osx/carbon/dataview.cpp:1430
+msgid "Rendering failed."
+msgstr "Rendering nie powiodł się."
+
+#: ../src/richtext/richtextbuffer.cpp:4202
+msgid "Renumber List"
+msgstr "Zmień numerację listy"
+
+#: ../src/common/stockitem.cpp:188
+msgid "Rep&lace"
+msgstr "&Zastąp"
+
+#: ../src/richtext/richtextctrl.cpp:3263 ../src/common/stockitem.cpp:188
+msgid "Replace"
+msgstr "Zastąp"
+
+#: ../src/generic/fdrepdlg.cpp:182
+msgid "Replace &all"
+msgstr "Zastąp &wszystko"
+
+#: ../src/common/stockitem.cpp:261
+msgid "Replace selection"
+msgstr "Zastąp wybór"
+
+#: ../src/generic/fdrepdlg.cpp:124
+msgid "Replace with:"
+msgstr "Zastąp przez:"
+
+#: ../src/common/valtext.cpp:161
+msgid "Required information entry is empty."
+msgstr "Wymagane pole informacji jest puste."
+
+#: ../src/common/translation.cpp:1975
+#, c-format
+msgid "Resource '%s' is not a valid message catalog."
+msgstr "Zasób '%s' nie jest prawidłowym katalogiem komunikatów."
+
+#: ../src/common/stockitem.cpp:189
+msgid "Revert to Saved"
+msgstr "Przywróć zapisany"
+
+#: ../src/richtext/richtextborderspage.cpp:548
+msgid "Ridge"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:251
+#: ../src/richtext/richtextbulletspage.cpp:201
+#: ../src/richtext/richtextsizepage.cpp:247
+msgid "Right"
+msgstr "Prawy"
+
+#: ../src/generic/prntdlgg.cpp:897
+msgid "Right margin (mm):"
+msgstr "Prawy margines (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:148
+#: ../src/richtext/richtextindentspage.cpp:150
+#: ../src/richtext/richtextliststylepage.cpp:337
+#: ../src/richtext/richtextliststylepage.cpp:339
+msgid "Right-align text."
+msgstr "Prawe dostosowanie tekstu."
+
+#: ../src/generic/fontdlgg.cpp:322
+msgid "Roman"
+msgstr "Roman"
+
+#: ../src/richtext/richtextliststylepage.cpp:299
+#: ../src/richtext/richtextbulletspage.cpp:252
+msgid "S&tandard bullet name:"
+msgstr "Standardowy styl wypunktowania:"
+
+#: ../src/common/accelcmn.cpp:82
+msgid "SCROLL_LOCK"
+msgstr "SCROLL_LOCK"
+
+#: ../src/common/accelcmn.cpp:71
+msgid "SELECT"
+msgstr "WYBÓR"
+
+#: ../src/common/accelcmn.cpp:77
+msgid "SEPARATOR"
+msgstr "SEPARATOR"
+
+#: ../src/common/accelcmn.cpp:74
+msgid "SNAPSHOT"
+msgstr "ZRZUT EKRANU"
+
+#: ../src/common/accelcmn.cpp:62
+msgid "SPACE"
+msgstr "SPACJA"
+
+#: ../src/common/accelcmn.cpp:257 ../src/common/accelcmn.cpp:339
+msgid "SPECIAL"
+msgstr "SPECJALNY"
+
+#: ../src/common/accelcmn.cpp:78
+msgid "SUBTRACT"
+msgstr "DZIELENIE"
+
+#: ../src/common/stockitem.cpp:190 ../src/common/sizer.cpp:2678
+msgid "Save"
+msgstr "Zapisz"
+
+#: ../src/common/fldlgcmn.cpp:327
+#, c-format
+msgid "Save %s file"
+msgstr "Zapisz plik %s"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save &As..."
+msgstr "Zapisz J&ako..."
+
+#: ../src/common/docview.cpp:360
+msgid "Save As"
+msgstr "Zapisz Jako"
+
+#: ../src/common/stockitem.cpp:191
+#, fuzzy
+msgid "Save as"
+msgstr "Zapisz Jako"
+
+# perspektywę?
+#: ../src/common/stockitem.cpp:267
+msgid "Save current document"
+msgstr "Zapisz bieżący dokument"
+
+#: ../src/common/stockitem.cpp:268
+msgid "Save current document with a different filename"
+msgstr "Zapisz bieżący dokument pod inną nazwą pliku"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save log contents to file"
+msgstr "Zapisz zawartość dziennika do pliku"
+
+#: ../src/generic/fontdlgg.cpp:325
+msgid "Script"
+msgstr "Script"
+
+#: ../src/generic/srchctlg.cpp:67 ../src/html/helpwnd.cpp:548
+#: ../src/html/helpwnd.cpp:563
+msgid "Search"
+msgstr "Szukaj"
+
+#: ../src/html/helpwnd.cpp:550
+#, fuzzy
+msgid ""
+"Search contents of help book(s) for all occurrences of the text you typed "
+"above"
+msgstr ""
+"Przeszukuje zawartość pliku(ów) pomocy dla wszystkich wystąpień "
+"wprowadzonego powyżej tekstu"
+
+#: ../src/generic/fdrepdlg.cpp:160
+msgid "Search direction"
+msgstr "Kierunek szukania"
+
+#: ../src/generic/fdrepdlg.cpp:112
+msgid "Search for:"
+msgstr "Znajdź:"
+
+# spisach?
+#: ../src/html/helpwnd.cpp:1065
+msgid "Search in all books"
+msgstr "Szukaj we wszystkich plikach pomocy"
+
+#: ../src/html/helpwnd.cpp:870
+msgid "Searching..."
+msgstr "Wyszukiwanie..."
+
+#: ../src/generic/dirctrlg.cpp:546
+msgid "Sections"
+msgstr "Sekcje"
+
+#: ../src/common/ffile.cpp:220
+#, c-format
+msgid "Seek error on file '%s'"
+msgstr "Błąd pozycjonowania w pliku '%s'"
+
+#: ../src/common/ffile.cpp:210
+#, c-format
+msgid "Seek error on file '%s' (large files not supported by stdio)"
+msgstr "Błąd wyszukiwania w pliku '%s' (stdio nie wspiera olbrzymich plików)"
+
+#: ../src/richtext/richtextctrl.cpp:330 ../src/osx/textctrl_osx.cpp:587
+#: ../src/common/stockitem.cpp:192 ../src/msw/textctrl.cpp:2288
+msgid "Select &All"
+msgstr "&Zaznacz wszystko"
+
+#: ../src/common/stockitem.cpp:192 ../src/stc/stc_i18n.cpp:21
+msgid "Select All"
+msgstr "Zaznacz wszystko"
+
+#: ../src/common/docview.cpp:1878
+msgid "Select a document template"
+msgstr "Wybierz szablon dokumentu"
+
+# perspektywę?
+#: ../src/common/docview.cpp:1952
+msgid "Select a document view"
+msgstr "Wybierz widok dokumentu"
+
+#: ../src/richtext/richtextfontpage.cpp:235
+#: ../src/richtext/richtextfontpage.cpp:237
+msgid "Select regular or bold."
+msgstr "Wybierz regularną lub pogrubioną czcionkę."
+
+#: ../src/richtext/richtextfontpage.cpp:222
+#: ../src/richtext/richtextfontpage.cpp:224
+msgid "Select regular or italic style."
+msgstr "Wybierz regularny lub kursywny styl."
+
+#: ../src/richtext/richtextfontpage.cpp:248
+#: ../src/richtext/richtextfontpage.cpp:250
+msgid "Select underlining or no underlining."
+msgstr "Wybierz podkreślanie lub bez podkreślania."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Selection"
+msgstr "Wybór"
+
+#: ../src/richtext/richtextliststylepage.cpp:187
+#: ../src/richtext/richtextliststylepage.cpp:189
+msgid "Selects the list level to edit."
+msgstr "Wybiera poziom listy do edycji."
+
+#: ../src/common/cmdline.cpp:918
+#, c-format
+msgid "Separator expected after the option '%s'."
+msgstr "Oczekiwano separatora po opcji '%s'."
+
+#: ../src/richtext/richtextbuffer.cpp:10397
+msgid "Set Cell Style"
+msgstr "Usuń styl komórki"
+
+#: ../include/wx/xtiprop.h:179
+msgid "SetProperty called w/o valid setter"
+msgstr ""
+"Funkcja SetProperty wywołana bez poprawnej moduły ustawiającego właściwość"
+
+#: ../src/common/filename.cpp:2632
+msgid "Setting directory access times is not supported under this OS version"
+msgstr ""
+"Ustawienie czasu dostępu do katalogów nie jest obsługiwane w tej wersji "
+"systemu operacyjnego."
+
+#: ../src/generic/prntdlgg.cpp:193
+msgid "Setup..."
+msgstr "Ustawienia..."
+
+#: ../src/msw/dialup.cpp:563
+msgid "Several active dialup connections found, choosing one randomly."
+msgstr "Znalezione kilka dostępnych połączeń dialup, zostanie użyte pierwsze."
+
+#: ../src/common/accelcmn.cpp:324
+#, fuzzy
+msgid "Shift+"
+msgstr "Shift-"
+
+#: ../src/generic/dirdlgg.cpp:170
+msgid "Show &hidden directories"
+msgstr "Pokaż &ukryte katalogi"
+
+#: ../src/generic/filectrlg.cpp:1003
+msgid "Show &hidden files"
+msgstr "Pokazuj &ukryte pliki"
+
+#: ../src/osx/menu_osx.cpp:605 ../src/osx/menu_osx.cpp:652
+#, fuzzy
+msgid "Show All"
+msgstr "Pokaż wszystko"
+
+#: ../src/common/stockitem.cpp:257
+msgid "Show about dialog"
+msgstr "Pokazuje okno O"
+
+#: ../src/html/helpwnd.cpp:502
+msgid "Show all"
+msgstr "Pokaż wszystko"
+
+#: ../src/html/helpwnd.cpp:513
+msgid "Show all items in index"
+msgstr "Pokaż wszystkie elementy indeksu"
+
+#: ../src/generic/dirdlgg.cpp:105
+msgid "Show hidden directories"
+msgstr "Pokaż ukryte katalogi"
+
+#: ../src/html/helpwnd.cpp:671
+msgid "Show/hide navigation panel"
+msgstr "Pokaż/ukryj panel sterowania"
+
+#: ../src/richtext/richtextsymboldlg.cpp:421
+#: ../src/richtext/richtextsymboldlg.cpp:423
+msgid "Shows a Unicode subset."
+msgstr "Pokazuje podzbiór Unicode."
+
+#: ../src/richtext/richtextliststylepage.cpp:472
+#: ../src/richtext/richtextliststylepage.cpp:474
+#: ../src/richtext/richtextbulletspage.cpp:276
+#: ../src/richtext/richtextbulletspage.cpp:278
+msgid "Shows a preview of the bullet settings."
+msgstr "Pokazuje podgląd ustawień wypunktowania."
+
+#: ../src/richtext/richtextfontpage.cpp:322
+#: ../src/richtext/richtextfontpage.cpp:324
+msgid "Shows a preview of the font settings."
+msgstr "Pokazuje podgląd ustawień czcionki."
+
+#: ../src/osx/carbon/fontdlg.cpp:580 ../src/osx/carbon/fontdlg.cpp:582
+msgid "Shows a preview of the font."
+msgstr "Pokazuje podgląd czcionki."
+
+#: ../src/richtext/richtextindentspage.cpp:303
+#: ../src/richtext/richtextindentspage.cpp:305
+msgid "Shows a preview of the paragraph settings."
+msgstr "Pokazuje podgląd ustawień paragrafu."
+
+#: ../src/generic/fontdlgg.cpp:460 ../src/generic/fontdlgg.cpp:462
+msgid "Shows the font preview."
+msgstr "Podgląd czcionki."
+
+#: ../src/univ/themes/mono.cpp:516
+msgid "Simple monochrome theme"
+msgstr "Prosty czarno-biały motyw"
+
+#: ../src/richtext/richtextindentspage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:449
+msgid "Single"
+msgstr "Pojedynczy"
+
+#: ../src/generic/filectrlg.cpp:460 ../src/richtext/richtextformatdlg.cpp:356
+#: ../src/richtext/richtextsizepage.cpp:296
+msgid "Size"
+msgstr "Rozmiar"
+
+#: ../src/osx/carbon/fontdlg.cpp:525
+msgid "Size:"
+msgstr "Rozmiar:"
+
+#: ../src/generic/progdlgg.cpp:262 ../src/generic/progdlgg.cpp:773
+#: ../src/msw/progdlg.cpp:801
+msgid "Skip"
+msgstr "Pomiń"
+
+#: ../src/generic/fontdlgg.cpp:330
+msgid "Slant"
+msgstr "Pochylony"
+
+#: ../src/richtext/richtextfontpage.cpp:298
+msgid "Small C&apitals"
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:543
+msgid "Solid"
+msgstr ""
+
+#: ../src/common/docview.cpp:1774
+msgid "Sorry, could not open this file."
+msgstr "Niestety nie można otworzyć tego pliku."
+
+#: ../src/common/prntbase.cpp:2027 ../src/common/prntbase.cpp:2035
+msgid "Sorry, not enough memory to create a preview."
+msgstr "Niestety za mało pamięci aby przygotować podgląd."
+
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "Sorry, that name is taken. Please choose another."
+msgstr "Niestety, nazwa ta jest zajęta. Proszę wybrać inną."
+
+#: ../src/common/docview.cpp:1797
+msgid "Sorry, the format for this file is unknown."
+msgstr "Niestety, nieznany format pliku."
+
+#: ../src/unix/sound.cpp:492
+msgid "Sound data are in unsupported format."
+msgstr "Dane dźwiękowe są w formacie, który nie jest wspierany."
+
+#: ../src/unix/sound.cpp:477
+#, c-format
+msgid "Sound file '%s' is in unsupported format."
+msgstr "Plik z dźwiękiem '%s' jest w formacie, który nie jest wspierany."
+
+#: ../src/richtext/richtextliststylepage.cpp:467
+msgid "Spacing"
+msgstr "Odstępy"
+
+#: ../src/common/stockitem.cpp:197
+msgid "Spell Check"
+msgstr "Sprawdzanie pisowni"
+
+#: ../src/richtext/richtextliststylepage.cpp:490
+#: ../src/richtext/richtextbulletspage.cpp:295
+msgid "Standard"
+msgstr "Standard"
+
+#: ../src/common/paper.cpp:105
+msgid "Statement, 5 1/2 x 8 1/2 in"
+msgstr "Statement, 5 1/2 x 8 1/2 cala"
+
+#: ../src/richtext/richtextsizepage.cpp:515
+#: ../src/richtext/richtextsizepage.cpp:520
+msgid "Static"
+msgstr "Statyczny"
+
+#: ../src/generic/prntdlgg.cpp:209
+msgid "Status:"
+msgstr "Status:"
+
+#: ../src/common/stockitem.cpp:198
+msgid "Stop"
+msgstr "Stop"
+
+#: ../src/common/stockitem.cpp:199
+#, fuzzy
+msgid "Strikethrough"
+msgstr "&Przekreślenie"
+
+#: ../src/common/colourcmn.cpp:45
+#, c-format
+msgid "String To Colour : Incorrect colour specification : %s"
+msgstr "Nieprawidłowa specyfikacja koloru : %s"
+
+#: ../src/richtext/richtextformatdlg.cpp:318 ../src/propgrid/advprops.cpp:647
+msgid "Style"
+msgstr "Styl"
+
+#: ../include/wx/richtext/richtextstyledlg.h:47
+msgid "Style Organiser"
+msgstr "Organizator stylu"
+
+#: ../src/osx/carbon/fontdlg.cpp:534
+msgid "Style:"
+msgstr "Styl:"
+
+#: ../src/richtext/richtextfontpage.cpp:312
+msgid "Subscrip&t"
+msgstr "Indeks &dolny"
+
+#: ../src/richtext/richtextfontpage.cpp:305
+msgid "Supe&rscript"
+msgstr "Indeks &górny"
+
+#: ../src/common/paper.cpp:151
+msgid "SuperA/SuperA/A4 227 x 356 mm"
+msgstr "SuperA/SuperA/A4 227 x 356 mm"
+
+#: ../src/common/paper.cpp:152
+msgid "SuperB/SuperB/A3 305 x 487 mm"
+msgstr "SuperB/SuperB/A3 305 x 487 mm"
+
+#: ../src/generic/fontdlgg.cpp:326
+msgid "Swiss"
+msgstr "Swiss"
+
+#: ../src/richtext/richtextliststylepage.cpp:488
+#: ../src/richtext/richtextbulletspage.cpp:293
+msgid "Symbol"
+msgstr "Symbol"
+
+#: ../src/richtext/richtextliststylepage.cpp:288
+#: ../src/richtext/richtextbulletspage.cpp:240
+msgid "Symbol &font:"
+msgstr "&Czcionka symbolu:"
+
+#: ../include/wx/richtext/richtextsymboldlg.h:47
+msgid "Symbols"
+msgstr "Symbole"
+
+#: ../src/common/accelcmn.cpp:63
+msgid "TAB"
+msgstr "TAB"
+
+#: ../src/common/imagtiff.cpp:372 ../src/common/imagtiff.cpp:385
+#: ../src/common/imagtiff.cpp:744
+msgid "TIFF: Couldn't allocate memory."
+msgstr "TIFF: Nie można przydzielić pamięci."
+
+#: ../src/common/imagtiff.cpp:304
+msgid "TIFF: Error loading image."
+msgstr "TIFF: Błąd przy wczytywaniu obrazu."
+
+#: ../src/common/imagtiff.cpp:471
+msgid "TIFF: Error reading image."
+msgstr "TIFF: Błąd odczytu."
+
+#: ../src/common/imagtiff.cpp:611
+msgid "TIFF: Error saving image."
+msgstr "TIFF: Wystąpił błąd przy zapisie."
+
+#: ../src/common/imagtiff.cpp:849
+msgid "TIFF: Error writing image."
+msgstr "TIFF: Błąd zapisu."
+
+#: ../src/common/imagtiff.cpp:358
+msgid "TIFF: Image size is abnormally big."
+msgstr "TIFF: Rozmiar obrazu jest wyjątkowo duży."
+
+#: ../src/richtext/richtextbuffer.cpp:10687
+msgid "Table Properties"
+msgstr "&Właściwości tabeli"
+
+#: ../src/common/paper.cpp:146
+msgid "Tabloid Extra 11.69 x 18 in"
+msgstr "Tabloid Extra 11.69 x 18 cali"
+
+#: ../src/common/paper.cpp:103
+msgid "Tabloid, 11 x 17 in"
+msgstr "Tabloid, 11 x 17 cali"
+
+#: ../src/richtext/richtextformatdlg.cpp:336
+msgid "Tabs"
+msgstr "Karty"
+
+#: ../src/generic/fontdlgg.cpp:327
+msgid "Teletype"
+msgstr "Teletype"
+
+#: ../src/common/docview.cpp:1879
+msgid "Templates"
+msgstr "Szablony"
+
+#: ../src/osx/carbon/dataview.cpp:2373
+msgid "Text renderer cannot render value; value type: "
+msgstr "Render tekstu nie może renderować wartości; typ wartości:"
+
+#: ../src/common/fmapbase.cpp:158
+msgid "Thai (ISO-8859-11)"
+msgstr "Tajski (ISO-8859-11)"
+
+#: ../src/common/ftp.cpp:620
+msgid "The FTP server doesn't support passive mode."
+msgstr "Serwer FTP nie obsługuje trybu pasywnego."
+
+#: ../src/common/ftp.cpp:606
+msgid "The FTP server doesn't support the PORT command."
+msgstr "Serwer FTP nie obsługuje komendy PORT."
+
+#: ../src/richtext/richtextliststylepage.cpp:215
+#: ../src/richtext/richtextliststylepage.cpp:217
+#: ../src/richtext/richtextbulletspage.cpp:164
+#: ../src/richtext/richtextbulletspage.cpp:166
+msgid "The available bullet styles."
+msgstr "Dostępne style wypunktowania."
+
+#: ../src/richtext/richtextstyledlg.cpp:202
+#: ../src/richtext/richtextstyledlg.cpp:204
+msgid "The available styles."
+msgstr "Dostępne style."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:139
+#: ../src/richtext/richtextbackgroundpage.cpp:141
+#, fuzzy
+msgid "The background colour."
+msgstr "Kolor tła"
+
+#: ../src/richtext/richtextmarginspage.cpp:268
+#: ../src/richtext/richtextmarginspage.cpp:270
+msgid "The bottom margin size."
+msgstr "Rozmiar dolnego marginesu."
+
+#: ../src/richtext/richtextmarginspage.cpp:382
+#: ../src/richtext/richtextmarginspage.cpp:384
+msgid "The bottom padding size."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:636
+#: ../src/richtext/richtextsizepage.cpp:638
+#: ../src/richtext/richtextsizepage.cpp:650
+#: ../src/richtext/richtextsizepage.cpp:652
+msgid "The bottom position."
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:254
+#: ../src/richtext/richtextliststylepage.cpp:256
+#: ../src/richtext/richtextliststylepage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:277
+#: ../src/richtext/richtextbulletspage.cpp:204
+#: ../src/richtext/richtextbulletspage.cpp:206
+#: ../src/richtext/richtextbulletspage.cpp:227
+#: ../src/richtext/richtextbulletspage.cpp:229
+msgid "The bullet character."
+msgstr "Znak wypunktowania."
+
+#: ../src/richtext/richtextsymboldlg.cpp:443
+#: ../src/richtext/richtextsymboldlg.cpp:445
+msgid "The character code."
+msgstr "Kod znaku."
+
+#: ../src/common/fontmap.cpp:203
+#, c-format
+msgid ""
+"The charset '%s' is unknown. You may select\n"
+"another charset to replace it with or choose\n"
+"[Cancel] if it cannot be replaced"
+msgstr ""
+"Nieznany zestaw znaków '%s'. Możesz wybrać\n"
+"inny zestaw aby go zastąpić lub wybierz\n"
+"[Anuluj] jeśli nie można go zastąpić."
+
+#: ../src/msw/ole/dataobj.cpp:367
+#, c-format
+msgid "The clipboard format '%d' doesn't exist."
+msgstr "Format schowka '%d' nie istnieje."
+
+#: ../src/richtext/richtextstylepage.cpp:128
+#: ../src/richtext/richtextstylepage.cpp:130
+msgid "The default style for the next paragraph."
+msgstr "Domyślny styl dla następnego paragrafu."
+
+#: ../src/generic/dirdlgg.cpp:231
+#, c-format
+msgid ""
+"The directory '%s' does not exist\n"
+"Create it now?"
+msgstr ""
+"Katalog '%s' nie istnieje\n"
+"Utworzyć go teraz?"
+
+#: ../src/html/htmprint.cpp:271
+#, c-format
+msgid ""
+"The document \"%s\" doesn't fit on the page horizontally and will be "
+"truncated if printed.\n"
+"\n"
+"Would you like to proceed with printing it nevertheless?"
+msgstr ""
+"Dokument \"%s\" nie mieści się na stronie poziomo i będzie ucięty na "
+"wydruku.\n"
+"\n"
+"Chcesz kontynuować drukowanie mimo to?"
+
+#: ../src/common/docview.cpp:1184
+#, c-format
+msgid ""
+"The file '%s' doesn't exist and couldn't be opened.\n"
+"It has been removed from the most recently used files list."
+msgstr ""
+"Plik '%s' nie istnieje i nie można go otworzyć.\n"
+"Informacja o nim została usunięta z listy ostatnio używanych plików."
+
+#: ../src/richtext/richtextindentspage.cpp:208
+#: ../src/richtext/richtextindentspage.cpp:210
+#: ../src/richtext/richtextliststylepage.cpp:394
+#: ../src/richtext/richtextliststylepage.cpp:396
+msgid "The first line indent."
+msgstr "Wcięcie pierwszego wierszu."
+
+#: ../src/gtk/utilsgtk.cpp:427
+msgid "The following standard GTK+ options are also supported:\n"
+msgstr "Następujące opcje standardowe GTK+ także są obsługiwane:\n"
+
+#: ../src/generic/fontdlgg.cpp:414 ../src/generic/fontdlgg.cpp:416
+msgid "The font colour."
+msgstr "Kolor czcionki."
+
+#: ../src/generic/fontdlgg.cpp:375 ../src/generic/fontdlgg.cpp:377
+msgid "The font family."
+msgstr "Rodzina czcionki."
+
+#: ../src/richtext/richtextsymboldlg.cpp:405
+#: ../src/richtext/richtextsymboldlg.cpp:407
+msgid "The font from which to take the symbol."
+msgstr "Czcionka z której pobrać symbol."
+
+#: ../src/generic/fontdlgg.cpp:427 ../src/generic/fontdlgg.cpp:429
+#: ../src/generic/fontdlgg.cpp:434 ../src/generic/fontdlgg.cpp:436
+msgid "The font point size."
+msgstr "Rozmiar czcionki."
+
+#: ../src/osx/carbon/fontdlg.cpp:529 ../src/osx/carbon/fontdlg.cpp:531
+msgid "The font size in points."
+msgstr "Rozmiar czcionki w punktach."
+
+#: ../src/richtext/richtextfontpage.cpp:190
+#: ../src/richtext/richtextfontpage.cpp:192
+msgid "The font size units, points or pixels."
+msgstr "Rozmiar czcionki w punktach lub  pikselach ."
+
+#: ../src/generic/fontdlgg.cpp:386 ../src/generic/fontdlgg.cpp:388
+msgid "The font style."
+msgstr "Styl czcionki."
+
+#: ../src/generic/fontdlgg.cpp:397 ../src/generic/fontdlgg.cpp:399
+msgid "The font weight."
+msgstr "Waga czcionki."
+
+#: ../src/common/docview.cpp:1465
+#, c-format
+msgid "The format of file '%s' couldn't be determined."
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:199
+#: ../src/richtext/richtextindentspage.cpp:201
+#: ../src/richtext/richtextliststylepage.cpp:385
+#: ../src/richtext/richtextliststylepage.cpp:387
+msgid "The left indent."
+msgstr "Lewe wcięcie."
+
+#: ../src/richtext/richtextmarginspage.cpp:195
+#: ../src/richtext/richtextmarginspage.cpp:197
+msgid "The left margin size."
+msgstr "Rozmiar lewego marginesu."
+
+#: ../src/richtext/richtextmarginspage.cpp:309
+#: ../src/richtext/richtextmarginspage.cpp:311
+msgid "The left padding size."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:531
+#: ../src/richtext/richtextsizepage.cpp:533
+#: ../src/richtext/richtextsizepage.cpp:545
+#: ../src/richtext/richtextsizepage.cpp:547
+msgid "The left position."
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:288
+#: ../src/richtext/richtextindentspage.cpp:290
+#: ../src/richtext/richtextliststylepage.cpp:462
+#: ../src/richtext/richtextliststylepage.cpp:464
+msgid "The line spacing."
+msgstr "Odstęp między wierszami."
+
+#: ../src/richtext/richtextbulletspage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:270
+msgid "The list item number."
+msgstr "Numer pozycji listy."
+
+#: ../src/msw/ole/automtn.cpp:653
+msgid "The locale ID is unknown."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:363
+#: ../src/richtext/richtextsizepage.cpp:365
+msgid "The object height."
+msgstr "Wysokość obiektu"
+
+#: ../src/richtext/richtextsizepage.cpp:471
+#: ../src/richtext/richtextsizepage.cpp:473
+msgid "The object maximum height."
+msgstr "Maksymalna wysokość obiektu"
+
+#: ../src/richtext/richtextsizepage.cpp:444
+#: ../src/richtext/richtextsizepage.cpp:446
+msgid "The object maximum width."
+msgstr "Maksymalna szerokość obiektu"
+
+#: ../src/richtext/richtextsizepage.cpp:417
+#: ../src/richtext/richtextsizepage.cpp:419
+msgid "The object minimum height."
+msgstr "Minimalna wysokość obiektu"
+
+#: ../src/richtext/richtextsizepage.cpp:390
+#: ../src/richtext/richtextsizepage.cpp:392
+msgid "The object minimum width."
+msgstr "Minimalna szerokość obiektu."
+
+#: ../src/richtext/richtextsizepage.cpp:329
+#: ../src/richtext/richtextsizepage.cpp:331
+msgid "The object width."
+msgstr "Szerokość obiektu."
+
+#: ../src/richtext/richtextindentspage.cpp:227
+#: ../src/richtext/richtextindentspage.cpp:229
+msgid "The outline level."
+msgstr "Poziom kontur."
+
+#: ../src/common/log.cpp:283
+#, c-format
+msgid "The previous message repeated %lu time."
+msgid_plural "The previous message repeated %lu times."
+msgstr[0] ""
+msgstr[1] ""
+msgstr[2] ""
+
+#: ../src/common/log.cpp:276
+#, fuzzy
+msgid "The previous message repeated once."
+msgstr "Poprzednia wiadomość była raz powtórzona."
+
+#: ../src/gtk/print.cpp:940 ../src/gtk/print.cpp:1123
+msgid "The print dialog returned an error."
+msgstr "Okno dialogowe drukowania zwróciło błąd."
+
+#: ../src/richtext/richtextsymboldlg.cpp:462
+#: ../src/richtext/richtextsymboldlg.cpp:464
+msgid "The range to show."
+msgstr "Zakres do pokazania."
+
+#: ../src/generic/dbgrptg.cpp:322
+msgid ""
+"The report contains the files listed below. If any of these files contain "
+"private information,\n"
+"please uncheck them and they will be removed from the report.\n"
+msgstr ""
+"Raport zawiera pliki wymienione niżej. Jeśli którykolwiek z tych plików "
+"zawiera prywatne informacje,\n"
+"proszę odznacz go w celu usunięcia go z raportu.\n"
+
+#: ../src/common/cmdline.cpp:1083
+#, c-format
+msgid "The required parameter '%s' was not specified."
+msgstr "Wymagany parametr '%s' nie został podany."
+
+#: ../src/richtext/richtextindentspage.cpp:217
+#: ../src/richtext/richtextindentspage.cpp:219
+#: ../src/richtext/richtextliststylepage.cpp:403
+#: ../src/richtext/richtextliststylepage.cpp:405
+msgid "The right indent."
+msgstr "Prawidłowe wcięcie."
+
+#: ../src/richtext/richtextmarginspage.cpp:220
+#: ../src/richtext/richtextmarginspage.cpp:222
+msgid "The right margin size."
+msgstr "Rozmiar prawego marginesu."
+
+#: ../src/richtext/richtextmarginspage.cpp:334
+#: ../src/richtext/richtextmarginspage.cpp:336
+msgid "The right padding size."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:601
+#: ../src/richtext/richtextsizepage.cpp:603
+#: ../src/richtext/richtextsizepage.cpp:615
+#: ../src/richtext/richtextsizepage.cpp:617
+msgid "The right position."
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:267
+#: ../src/richtext/richtextliststylepage.cpp:439
+#: ../src/richtext/richtextliststylepage.cpp:441
+msgid "The spacing after the paragraph."
+msgstr "Odstępy po paragrafie."
+
+#: ../src/richtext/richtextindentspage.cpp:257
+#: ../src/richtext/richtextindentspage.cpp:259
+#: ../src/richtext/richtextliststylepage.cpp:430
+#: ../src/richtext/richtextliststylepage.cpp:432
+msgid "The spacing before the paragraph."
+msgstr "Odstępy przed paragrafem."
+
+#: ../src/richtext/richtextstylepage.cpp:108
+#: ../src/richtext/richtextstylepage.cpp:110
+msgid "The style name."
+msgstr "Nazwa stylu."
+
+#: ../src/richtext/richtextstylepage.cpp:118
+#: ../src/richtext/richtextstylepage.cpp:120
+msgid "The style on which this style is based."
+msgstr "Styl, na którym ten styl jest oparty."
+
+#: ../src/richtext/richtextstyledlg.cpp:214
+#: ../src/richtext/richtextstyledlg.cpp:216
+msgid "The style preview."
+msgstr "Podgląd stylu."
+
+#: ../src/msw/ole/automtn.cpp:669
+msgid "The system cannot find the file specified."
+msgstr "System nie może odnaleźć określonego pliku."
+
+#: ../src/richtext/richtexttabspage.cpp:118
+#: ../src/richtext/richtexttabspage.cpp:120
+msgid "The tab position."
+msgstr "Pozycja karty."
+
+#: ../src/richtext/richtexttabspage.cpp:124
+msgid "The tab positions."
+msgstr "Pozycje karty."
+
+#: ../src/richtext/richtextctrl.cpp:2705
+msgid "The text couldn't be saved."
+msgstr "Tekst nie może być zapisany.."
+
+#: ../src/richtext/richtextmarginspage.cpp:243
+#: ../src/richtext/richtextmarginspage.cpp:245
+msgid "The top margin size."
+msgstr "Rozmiar górnego marginesu."
+
+#: ../src/richtext/richtextmarginspage.cpp:357
+#: ../src/richtext/richtextmarginspage.cpp:359
+msgid "The top padding size."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:566
+#: ../src/richtext/richtextsizepage.cpp:568
+#: ../src/richtext/richtextsizepage.cpp:580
+#: ../src/richtext/richtextsizepage.cpp:582
+msgid "The top position."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1061
+#, c-format
+msgid "The value for the option '%s' must be specified."
+msgstr "Wartość opcji '%s' musi zostać podana."
+
+#: ../src/msw/dialup.cpp:452
+#, c-format
+msgid ""
+"The version of remote access service (RAS) installed on this machine is too "
+"old, please upgrade (the following required function is missing: %s)."
+msgstr ""
+"Zainstalowana wersja serwisu zdalnego dostępu (RAS) jest zbyt stara, "
+"zainstaluj nowszą (brakująca funkcja to: %s)."
+
+#: ../src/gtk/print.cpp:968
+msgid "The wxGtkPrinterDC cannot be used."
+msgstr "wxGtkPrinterDC nie może być używany."
+
+#: ../src/osx/carbon/dataview.cpp:1340
+msgid "There is no column or renderer for the specified column index."
+msgstr "Nie ma kolumny lub rendera dla określonej kolumny indeksu."
+
+#: ../src/richtext/richtextprint.cpp:614 ../src/html/htmprint.cpp:735
+msgid ""
+"There was a problem during page setup: you may need to set a default printer."
+msgstr ""
+"Wystąpił błąd podczas konfigurowania strony: powinieneś określić domyślną "
+"drukarkę."
+
+#: ../src/html/htmprint.cpp:255
+msgid ""
+"This document doesn't fit on the page horizontally and will be truncated "
+"when it is printed."
+msgstr ""
+"Ten dokument nie mieści się poziomo na stronie i będzie ucięty na wydruku."
+
+#: ../src/common/image.cpp:2716
+#, c-format
+msgid "This is not a %s."
+msgstr ""
+
+#: ../src/common/wincmn.cpp:1647
+msgid "This platform does not support background transparency."
+msgstr "Ta platforma nie obsługuje przezroczystości tła."
+
+#: ../src/gtk/window.cpp:4295
+msgid ""
+"This program was compiled with a too old version of GTK+, please rebuild "
+"with GTK+ 2.12 or newer."
+msgstr ""
+"Ten program został skompilowany przy użyciu zbyt starej wersji GTK+, proszę "
+"skompilować ponownie z użyciem GTK+ 2.12 or nowszej."
+
+#: ../src/msw/datecontrols.cpp:59
+msgid ""
+"This system doesn't support date controls, please upgrade your version of "
+"comctl32.dll"
+msgstr ""
+"Ten system nie wspiera wyboru daty, należy zaktualizować bibliotekę comctl32."
+"dll"
+
+#: ../src/msw/thread.cpp:1300
+msgid ""
+"Thread module initialization failed: cannot store value in thread local "
+"storage"
+msgstr ""
+"Zainicjowanie modułu wątków nie powiodło się: nie można odłożyć wartości do "
+"lokalnej pamięci wątków"
+
+#: ../src/unix/threadpsx.cpp:1758
+msgid "Thread module initialization failed: failed to create thread key"
+msgstr ""
+"Zainicjowanie modułu wątków nie powiodło się: nie udało się utworzyć klucza "
+"wątków"
+
+#: ../src/msw/thread.cpp:1288
+msgid ""
+"Thread module initialization failed: impossible to allocate index in thread "
+"local storage"
+msgstr ""
+"Zainicjowanie modułu wątków nie powiodło się: nie jest możliwe przydzielenie "
+"indeksu w lokalnej pamięci wątków."
+
+#: ../src/unix/threadpsx.cpp:1038
+msgid "Thread priority setting is ignored."
+msgstr "Ustawienie priorytetu wątku jest ignorowane."
+
+#: ../src/msw/mdi.cpp:172
+msgid "Tile &Horizontally"
+msgstr "&Sąsiadująco w poziomie"
+
+#: ../src/msw/mdi.cpp:173
+msgid "Tile &Vertically"
+msgstr "Sąsi&adująco w pionie"
+
+#: ../src/common/ftp.cpp:202
+msgid "Timeout while waiting for FTP server to connect, try passive mode."
+msgstr ""
+"Przekroczono czas oczekiwania dla serwera FTP, spróbuj trybu pasywnego."
+
+#: ../src/os2/timer.cpp:99
+msgid "Timer creation failed."
+msgstr "Nie powiodło się utworzenie stopera."
+
+#: ../src/generic/tipdlg.cpp:220
+msgid "Tip of the Day"
+msgstr "Porada dnia"
+
+#: ../src/generic/tipdlg.cpp:154
+msgid "Tips not available, sorry!"
+msgstr "Niestety, porady nie są dostępne!"
+
+#: ../src/generic/prntdlgg.cpp:247
+msgid "To:"
+msgstr "Do:"
+
+#: ../src/osx/carbon/dataview.cpp:2451
+msgid "Toggle renderer cannot render value; value type: "
+msgstr "Aktywny render nie może renderować wartości; typ wartości:"
+
+#: ../src/richtext/richtextbuffer.cpp:7925
+msgid "Too many EndStyle calls!"
+msgstr "Zbyt wiele wezwań EndStyle!"
+
+#: ../src/common/imagpng.cpp:286
+msgid "Too many colours in PNG, the image may be slightly blurred."
+msgstr "Zbyt wiele kolorów w formacie PNG, obraz może być zamazany."
+
+#: ../src/richtext/richtextsizepage.cpp:283
+#: ../src/richtext/richtextsizepage.cpp:287 ../src/common/stockitem.cpp:200
+msgid "Top"
+msgstr "Góra"
+
+#: ../src/generic/prntdlgg.cpp:886
+msgid "Top margin (mm):"
+msgstr "Górny margines (mm):"
+
+#: ../src/generic/aboutdlgg.cpp:79
+msgid "Translations by "
+msgstr "Tłumaczenia autorstwa"
+
+#: ../src/generic/aboutdlgg.cpp:188
+msgid "Translators"
+msgstr "Tłumacze"
+
+#: ../src/propgrid/propgrid.cpp:173
+msgid "True"
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:227
+#, c-format
+msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!"
+msgstr "Próbą usunięcia pliku '%s' z pamięci VFS, który nie został wczytany!"
+
+#: ../src/common/fmapbase.cpp:156
+msgid "Turkish (ISO-8859-9)"
+msgstr "Turecki (ISO-8859-9)"
+
+#: ../src/generic/filectrlg.cpp:461
+msgid "Type"
+msgstr "Typ"
+
+#: ../src/richtext/richtextfontpage.cpp:160
+#: ../src/richtext/richtextfontpage.cpp:162
+msgid "Type a font name."
+msgstr "Wpisz nazwę czcionki."
+
+#: ../src/richtext/richtextfontpage.cpp:175
+#: ../src/richtext/richtextfontpage.cpp:177
+msgid "Type a size in points."
+msgstr "Wpisz rozmiar w punktach."
+
+#: ../src/msw/ole/automtn.cpp:665
+#, c-format
+msgid "Type mismatch in argument %u."
+msgstr "Niezgodność typów argumentu %u."
+
+#: ../src/common/xtixml.cpp:356 ../src/common/xtixml.cpp:509
+#: ../src/common/xtistrm.cpp:322
+msgid "Type must have enum - long conversion"
+msgstr "Typ musi umożliwiać konswersję enum - long"
+
+#: ../src/propgrid/propgridiface.cpp:382
+#, c-format
+msgid ""
+"Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT "
+"\"%s\"."
+msgstr ""
+"Niepowodzenie operacji typu \"%s\": właściwość nazwana  \"%s\" jest typu \"%s"
+"\", nie \"%s\"."
+
+#: ../src/common/accelcmn.cpp:58
+msgid "UP"
+msgstr "GÓRA"
+
+#: ../src/common/paper.cpp:134
+msgid "US Std Fanfold, 14 7/8 x 11 in"
+msgstr "Składanka US Std, 14 7/8 x 11 cali"
+
+#: ../src/common/fmapbase.cpp:196
+msgid "US-ASCII"
+msgstr "US-ASCII"
+
+#: ../src/unix/fswatcher_inotify.cpp:109
+msgid "Unable to add inotify watch"
+msgstr "Nie można dodać czujki inotify"
+
+#: ../src/unix/fswatcher_kqueue.cpp:136
+msgid "Unable to add kqueue watch"
+msgstr "Nie można dodać czujki kolejki"
+
+#: ../include/wx/msw/private/fswatcher.h:142
+msgid "Unable to associate handle with I/O completion port"
+msgstr "Nie można skojarzyć uchwytu z portem kompletności We/Wy"
+
+# uchwyt chyba zbędny
+#: ../include/wx/msw/private/fswatcher.h:125
+msgid "Unable to close I/O completion port handle"
+msgstr ""
+
+# uchwyt chyba zbędny
+#: ../src/unix/fswatcher_inotify.cpp:97
+msgid "Unable to close inotify instance"
+msgstr ""
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:74
+#, c-format
+msgid "Unable to close path '%s'"
+msgstr ""
+
+# uchwyt chyba zbędny
+#: ../include/wx/msw/private/fswatcher.h:48
+#, c-format
+msgid "Unable to close the handle for '%s'"
+msgstr ""
+
+#: ../include/wx/msw/private/fswatcher.h:240
+msgid "Unable to create I/O completion port"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:84
+msgid "Unable to create IOCP worker thread"
+msgstr ""
+
+#: ../src/unix/fswatcher_inotify.cpp:74
+msgid "Unable to create inotify instance"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:97
+msgid "Unable to create kqueue instance"
+msgstr ""
+
+#: ../include/wx/msw/private/fswatcher.h:229
+#, fuzzy
+msgid "Unable to dequeue completion packet"
+msgstr "Nie można odkolejkować pakietu kompletności"
+
+#: ../src/unix/fswatcher_kqueue.cpp:185
+msgid "Unable to get events from kqueue"
+msgstr "Nie można pobrać zdarzeń z kolejki"
+
+#: ../src/osx/carbon/dataview.cpp:1903
+#, fuzzy
+msgid "Unable to handle native drag&drop data"
+msgstr "Nie można przetworzyć systemowych danych przeciągnij / upuść"
+
+#: ../src/gtk/app.cpp:439
+msgid "Unable to initialize GTK+, is DISPLAY set properly?"
+msgstr "Nie można ustawić GTK+, czy jest prawidłowo ustawiony EKRAN?"
+
+#: ../src/gtk/app.cpp:276
+msgid "Unable to initialize Hildon program"
+msgstr "Nie udało się zainicjować programu Hildon"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:57
+#, c-format
+msgid "Unable to open path '%s'"
+msgstr ""
+
+#: ../src/html/htmlwin.cpp:561
+#, c-format
+msgid "Unable to open requested HTML document: %s"
+msgstr "Nie można otworzyć wskazanego dokumentu HTML: %s"
+
+#: ../src/unix/sound.cpp:368
+msgid "Unable to play sound asynchronously."
+msgstr "Nie można odtowrzyć dźwięku asynchronicznie."
+
+#: ../include/wx/msw/private/fswatcher.h:207
+msgid "Unable to post completion status"
+msgstr ""
+
+#: ../src/unix/fswatcher_inotify.cpp:530
+msgid "Unable to read from inotify descriptor"
+msgstr ""
+
+#: ../src/unix/fswatcher_inotify.cpp:132
+msgid "Unable to remove inotify watch"
+msgstr "Nie można usunąć czujki inotify"
+
+#: ../src/unix/fswatcher_kqueue.cpp:153
+msgid "Unable to remove kqueue watch"
+msgstr "Nie można usunąć czujki kolejki"
+
+#: ../src/msw/fswatcher.cpp:168
+#, c-format
+msgid "Unable to set up watch for '%s'"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:91
+msgid "Unable to start IOCP worker thread"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:201
+msgid "Undelete"
+msgstr "Odzyskaj"
+
+#: ../src/common/stockitem.cpp:202
+msgid "Underline"
+msgstr "Podkreślenie"
+
+#: ../src/richtext/richtextfontpage.cpp:341 ../src/osx/carbon/fontdlg.cpp:556
+#: ../src/propgrid/advprops.cpp:655
+msgid "Underlined"
+msgstr "Podkreślony"
+
+#: ../src/common/stockitem.cpp:203 ../src/stc/stc_i18n.cpp:15
+msgid "Undo"
+msgstr "Cofnij"
+
+#: ../src/common/stockitem.cpp:265
+msgid "Undo last action"
+msgstr "Cofnij ostatnią czynność"
+
+#: ../src/common/cmdline.cpp:864
+#, c-format
+msgid "Unexpected characters following option '%s'."
+msgstr "Nieoczekiwane znaki następujących opcji '%s'."
+
+#: ../src/unix/fswatcher_inotify.cpp:261
+#, c-format
+msgid "Unexpected event for \"%s\": no matching watch descriptor."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1024
+#, c-format
+msgid "Unexpected parameter '%s'"
+msgstr "Nieoczekiwany parametr '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:148
+msgid "Unexpectedly new I/O completion port was created"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:70
+msgid "Ungraceful worker thread termination"
+msgstr ""
+
+#: ../src/richtext/richtextsymboldlg.cpp:459
+#: ../src/richtext/richtextsymboldlg.cpp:460
+#: ../src/richtext/richtextsymboldlg.cpp:461
+msgid "Unicode"
+msgstr "Unicode"
+
+#: ../src/common/fmapbase.cpp:185 ../src/common/fmapbase.cpp:191
+msgid "Unicode 16 bit (UTF-16)"
+msgstr "Unicode 16 bit (UTF-16)"
+
+#: ../src/common/fmapbase.cpp:190
+msgid "Unicode 16 bit Big Endian (UTF-16BE)"
+msgstr "Unicode 16 bit Big Endian (UTF-16BE)"
+
+#: ../src/common/fmapbase.cpp:186
+msgid "Unicode 16 bit Little Endian (UTF-16LE)"
+msgstr "Unicode 16 bit Little Endian (UTF-16LE)"
+
+#: ../src/common/fmapbase.cpp:187 ../src/common/fmapbase.cpp:193
+msgid "Unicode 32 bit (UTF-32)"
+msgstr "Unicode 32 bit (UTF-32)"
+
+#: ../src/common/fmapbase.cpp:192
+msgid "Unicode 32 bit Big Endian (UTF-32BE)"
+msgstr "Unicode 32 bit Big Endian (UTF-32BE)"
+
+#: ../src/common/fmapbase.cpp:188
+msgid "Unicode 32 bit Little Endian (UTF-32LE)"
+msgstr "Unicode 32 bit Little Endian (UTF-32LE)"
+
+#: ../src/common/fmapbase.cpp:182
+msgid "Unicode 7 bit (UTF-7)"
+msgstr "Unicode 7 bit (UTF-7)"
+
+#: ../src/common/fmapbase.cpp:183
+msgid "Unicode 8 bit (UTF-8)"
+msgstr "Unicode 8 bit (UTF-8)"
+
+#: ../src/common/stockitem.cpp:204
+#, fuzzy
+msgid "Unindent"
+msgstr "&Cofnij wcięcie"
+
+#: ../src/richtext/richtextborderspage.cpp:373
+#: ../src/richtext/richtextborderspage.cpp:375
+msgid "Units for the bottom border width."
+msgstr "jednostki szerokości dolnej ramki."
+
+#: ../src/richtext/richtextmarginspage.cpp:278
+#: ../src/richtext/richtextmarginspage.cpp:280
+msgid "Units for the bottom margin."
+msgstr "Jednostki dolnego marginesu."
+
+#: ../src/richtext/richtextborderspage.cpp:517
+#: ../src/richtext/richtextborderspage.cpp:519
+msgid "Units for the bottom outline width."
+msgstr "Jednostki szerokości dolnego konturu."
+
+#: ../src/richtext/richtextmarginspage.cpp:392
+#: ../src/richtext/richtextmarginspage.cpp:394
+msgid "Units for the bottom padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:661
+#: ../src/richtext/richtextsizepage.cpp:663
+msgid "Units for the bottom position."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:283
+#: ../src/richtext/richtextborderspage.cpp:285
+msgid "Units for the left border width."
+msgstr "Jednostki szerokości lewej ramki."
+
+#: ../src/richtext/richtextmarginspage.cpp:205
+#: ../src/richtext/richtextmarginspage.cpp:207
+msgid "Units for the left margin."
+msgstr "Jednostki lewego marginesu."
+
+#: ../src/richtext/richtextborderspage.cpp:427
+#: ../src/richtext/richtextborderspage.cpp:429
+msgid "Units for the left outline width."
+msgstr "Jednostki szerokości lewego konturu."
+
+#: ../src/richtext/richtextmarginspage.cpp:319
+#: ../src/richtext/richtextmarginspage.cpp:321
+msgid "Units for the left padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:556
+#: ../src/richtext/richtextsizepage.cpp:558
+msgid "Units for the left position."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:482
+#: ../src/richtext/richtextsizepage.cpp:484
+msgid "Units for the maximum object height."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:455
+#: ../src/richtext/richtextsizepage.cpp:457
+msgid "Units for the maximum object width."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:428
+#: ../src/richtext/richtextsizepage.cpp:430
+msgid "Units for the minimum object height."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:401
+#: ../src/richtext/richtextsizepage.cpp:403
+msgid "Units for the minimum object width."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:376
+msgid "Units for the object height."
+msgstr "Jednostki wysokości obiektu."
+
+#: ../src/richtext/richtextsizepage.cpp:340
+#: ../src/richtext/richtextsizepage.cpp:342
+msgid "Units for the object width."
+msgstr "Jednostki szerokości obiektu."
+
+#: ../src/richtext/richtextborderspage.cpp:313
+#: ../src/richtext/richtextborderspage.cpp:315
+msgid "Units for the right border width."
+msgstr "Jednostki szerokości prawej ramki."
+
+#: ../src/richtext/richtextmarginspage.cpp:230
+#: ../src/richtext/richtextmarginspage.cpp:232
+msgid "Units for the right margin."
+msgstr "Jednostki prawego marginesu."
+
+#: ../src/richtext/richtextborderspage.cpp:457
+#: ../src/richtext/richtextborderspage.cpp:459
+msgid "Units for the right outline width."
+msgstr "Jednostki szerokości prawego konturu."
+
+#: ../src/richtext/richtextmarginspage.cpp:344
+#: ../src/richtext/richtextmarginspage.cpp:346
+msgid "Units for the right padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:626
+#: ../src/richtext/richtextsizepage.cpp:628
+msgid "Units for the right position."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:343
+#: ../src/richtext/richtextborderspage.cpp:345
+msgid "Units for the top border width."
+msgstr "Jednostki szerokości górnej ramki."
+
+#: ../src/richtext/richtextmarginspage.cpp:253
+#: ../src/richtext/richtextmarginspage.cpp:255
+msgid "Units for the top margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:487
+#: ../src/richtext/richtextborderspage.cpp:489
+msgid "Units for the top outline width."
+msgstr "Jednostki szerokości prawego konturu."
+
+#: ../src/richtext/richtextmarginspage.cpp:367
+#: ../src/richtext/richtextmarginspage.cpp:369
+msgid "Units for the top padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:591
+#: ../src/richtext/richtextsizepage.cpp:593
+msgid "Units for the top position."
+msgstr ""
+
+#: ../src/generic/progdlgg.cpp:382 ../src/generic/progdlgg.cpp:655
+msgid "Unknown"
+msgstr "Nieznany"
+
+#: ../src/msw/dde.cpp:1177
+#, c-format
+msgid "Unknown DDE error %08x"
+msgstr "Nieznany błąd DDE %08x"
+
+#: ../src/common/xtistrm.cpp:414
+msgid "Unknown Object passed to GetObjectClassInfo"
+msgstr "Nieznany obiekt przekazany do funkcji GetObjectClassInfo"
+
+#: ../src/common/imagpng.cpp:614
+#, c-format
+msgid "Unknown PNG resolution unit %d"
+msgstr ""
+
+#: ../src/common/xtixml.cpp:327
+#, c-format
+msgid "Unknown Property %s"
+msgstr "Nieznana właściwość %s"
+
+#: ../src/common/imagtiff.cpp:532
+#, c-format
+msgid "Unknown TIFF resolution unit %d ignored"
+msgstr "Zignorowana nieznana jednostka %d rozdzielczości TIFF"
+
+#: ../src/osx/carbon/dataview.cpp:1978
+#, fuzzy
+msgid "Unknown data format"
+msgstr "błąd w formacie"
+
+#: ../src/unix/dlunix.cpp:325
+msgid "Unknown dynamic library error"
+msgstr "Nieznany błąd biblioteki dynamicznej"
+
+#: ../src/common/fmapbase.cpp:810
+#, c-format
+msgid "Unknown encoding (%d)"
+msgstr "Nieznane kodowanie (%d)"
+
+#: ../src/msw/ole/automtn.cpp:677
+#, c-format
+msgid "Unknown error %08x"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:636
+msgid "Unknown exception"
+msgstr ""
+
+#: ../src/common/image.cpp:2701
+msgid "Unknown image data format."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:749
+#, c-format
+msgid "Unknown long option '%s'"
+msgstr "Nieznana długa opcja '%s'"
+
+#: ../src/msw/ole/automtn.cpp:620
+msgid "Unknown name or named argument."
+msgstr "Nieprawidłowa nazwa lub nazwany argument."
+
+#: ../src/common/cmdline.cpp:764 ../src/common/cmdline.cpp:786
+#, c-format
+msgid "Unknown option '%s'"
+msgstr "Nieznana opcja '%s'"
+
+# inaczej
+#: ../src/common/mimecmn.cpp:230
+#, c-format
+msgid "Unmatched '{' in an entry for mime type %s."
+msgstr "Nieodpowiedni '{' w pozycji dla typu mime %s."
+
+#: ../src/common/cmdproc.cpp:262 ../src/common/cmdproc.cpp:288
+#: ../src/common/cmdproc.cpp:308
+msgid "Unnamed command"
+msgstr "Polecenie bez nazwy"
+
+#: ../src/propgrid/propgrid.cpp:398
+msgid "Unspecified"
+msgstr ""
+
+#: ../src/msw/clipbrd.cpp:271 ../src/msw/clipbrd.cpp:439
+msgid "Unsupported clipboard format."
+msgstr "Nieobsługiwany format schowka."
+
+#: ../src/common/appcmn.cpp:228
+#, c-format
+msgid "Unsupported theme '%s'."
+msgstr "Nieobsługiwana kompozycja '%s'."
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:205
+msgid "Up"
+msgstr "W górę"
+
+#: ../src/richtext/richtextliststylepage.cpp:483
+#: ../src/richtext/richtextbulletspage.cpp:288
+msgid "Upper case letters"
+msgstr "Duże litery"
+
+#: ../src/richtext/richtextliststylepage.cpp:485
+#: ../src/richtext/richtextbulletspage.cpp:290
+msgid "Upper case roman numerals"
+msgstr "Duże litery cyframi rzymskimi"
+
+# hm
+#: ../src/common/cmdline.cpp:1155
+#, c-format
+msgid "Usage: %s"
+msgstr "Użycie: %s"
+
+#: ../src/richtext/richtextindentspage.cpp:169
+#: ../src/richtext/richtextindentspage.cpp:171
+#: ../src/richtext/richtextliststylepage.cpp:358
+#: ../src/richtext/richtextliststylepage.cpp:360
+msgid "Use the current alignment setting."
+msgstr "Użyj bieżącego dostosowywania ustawień."
+
+#: ../src/osx/carbon/dataview.cpp:2658 ../src/osx/carbon/dataview.cpp:2723
+msgid "Valid pointer to native data view control does not exist"
+msgstr "Aktualny wskaźnik do rodzimego widoku danych kontroli nie istnieje"
+
+#: ../src/common/valtext.cpp:174
+msgid "Validation conflict"
+msgstr "Konflikt kontroli poprawności"
+
+#: ../src/propgrid/manager.cpp:238
+msgid "Value"
+msgstr "Wartość"
+
+#: ../src/propgrid/props.cpp:384
+#, c-format
+msgid "Value must be %s or higher."
+msgstr "Wartość musi wynosić %s lub więcej."
+
+#: ../src/propgrid/props.cpp:411
+#, c-format
+msgid "Value must be %s or less."
+msgstr "Wartość musi wynosić %s lub mniej."
+
+#: ../src/propgrid/props.cpp:388 ../src/propgrid/props.cpp:415
+#, c-format
+msgid "Value must be between %s and %s."
+msgstr ""
+
+# prawa?
+#: ../src/generic/aboutdlgg.cpp:128
+#, fuzzy
+msgid "Version "
+msgstr "Wersja %s"
+
+#: ../src/richtext/richtextsizepage.cpp:288
+#: ../src/richtext/richtextsizepage.cpp:290
+msgid "Vertical alignment."
+msgstr ""
+
+#: ../src/generic/filedlgg.cpp:216
+msgid "View files as a detailed view"
+msgstr "Przeglądaj pliki w formie szczegółowej listy"
+
+#: ../src/generic/filedlgg.cpp:214
+msgid "View files as a list view"
+msgstr "Przeglądaj pliki w formie listy"
+
+#: ../src/common/docview.cpp:1953
+msgid "Views"
+msgstr "Widoki"
+
+#: ../src/common/accelcmn.cpp:108
+msgid "WINDOWS_LEFT"
+msgstr "WINDOWS_LEWO"
+
+#: ../src/common/accelcmn.cpp:110
+msgid "WINDOWS_MENU"
+msgstr "WINDOWS_MENU"
+
+#: ../src/common/accelcmn.cpp:109
+msgid "WINDOWS_RIGHT"
+msgstr "WINDOWS_PRAWO"
+
+#: ../src/unix/epolldispatcher.cpp:213
+#, c-format
+msgid "Waiting for IO on epoll descriptor %d failed"
+msgstr "Oczekiwanie na IO w deskryptorze epoll %d nie powiodło się"
+
+#: ../src/common/log.cpp:229
+msgid "Warning: "
+msgstr "Ostrzeżenie: "
+
+#: ../src/propgrid/advprops.cpp:651
+#, fuzzy
+msgid "Weight"
+msgstr "&Waga"
+
+#: ../src/common/fmapbase.cpp:148
+msgid "Western European (ISO-8859-1)"
+msgstr "Zachodnioeuropejski (ISO-8859-1)"
+
+#: ../src/common/fmapbase.cpp:162
+msgid "Western European with Euro (ISO-8859-15)"
+msgstr "Zachodnioeuropejski z Euro (ISO-8859-15)"
+
+#: ../src/generic/fontdlgg.cpp:446 ../src/generic/fontdlgg.cpp:448
+msgid "Whether the font is underlined."
+msgstr "Określenie podkreślenia."
+
+#: ../src/generic/fdrepdlg.cpp:144
+msgid "Whole word"
+msgstr "Całe słowo"
+
+#: ../src/html/helpwnd.cpp:547
+msgid "Whole words only"
+msgstr "Tylko całe słowa"
+
+#: ../src/univ/themes/win32.cpp:1102
+msgid "Win32 theme"
+msgstr "Kompozycja Win32"
+
+#: ../src/msw/utils.cpp:1220
+msgid "Win32s on Windows 3.1"
+msgstr "Win32s na Windows 3.1"
+
+#: ../src/msw/utils.cpp:1270
+msgid "Windows 2000"
+msgstr ""
+
+#: ../src/msw/utils.cpp:1302
+msgid "Windows 7"
+msgstr ""
+
+#: ../src/msw/utils.cpp:1234
+msgid "Windows 95"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1230
+msgid "Windows 95 OSR2"
+msgstr "Windows 95 OSR2"
+
+#: ../src/msw/utils.cpp:1245
+msgid "Windows 98"
+msgstr "Windows 98"
+
+#: ../src/msw/utils.cpp:1241
+msgid "Windows 98 SE"
+msgstr "Windows 98 SE"
+
+#: ../src/msw/utils.cpp:1252
+#, c-format
+msgid "Windows 9x (%d.%d)"
+msgstr "Windows 9x (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:177
+msgid "Windows Arabic (CP 1256)"
+msgstr "Windows arabski (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:178
+msgid "Windows Baltic (CP 1257)"
+msgstr "Windows bałtycki (CP 1257)"
+
+#: ../src/msw/utils.cpp:1214
+#, c-format
+msgid "Windows CE (%d.%d)"
+msgstr "Windows CE (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:171
+msgid "Windows Central European (CP 1250)"
+msgstr "Windows środkowoeuropejski (CP 1250)"
+
+#: ../src/common/fmapbase.cpp:168
+#, fuzzy
+msgid "Windows Chinese Simplified (CP 936) or GB-2312"
+msgstr "Windows chiński uproszczony (CP 936)"
+
+#: ../src/common/fmapbase.cpp:170
+#, fuzzy
+msgid "Windows Chinese Traditional (CP 950) or Big-5"
+msgstr "Windows chiński tradycyjny (CP 950)"
+
+#: ../src/common/fmapbase.cpp:172
+msgid "Windows Cyrillic (CP 1251)"
+msgstr "Windows cyrylica (CP 1251)"
+
+#: ../src/common/fmapbase.cpp:174
+msgid "Windows Greek (CP 1253)"
+msgstr "Windows grecki (CP 1253)"
+
+#: ../src/common/fmapbase.cpp:176
+msgid "Windows Hebrew (CP 1255)"
+msgstr "Windows hebrajski (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:167
+#, fuzzy
+msgid "Windows Japanese (CP 932) or Shift-JIS"
+msgstr "Windows japoński (CP 932)"
+
+#: ../src/common/fmapbase.cpp:180
+msgid "Windows Johab (CP 1361)"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:169
+msgid "Windows Korean (CP 949)"
+msgstr "Windows koreański (CP 949)"
+
+#: ../src/msw/utils.cpp:1249
+msgid "Windows ME"
+msgstr "Windows ME"
+
+#: ../src/msw/utils.cpp:1310
+#, c-format
+msgid "Windows NT %lu.%lu"
+msgstr ""
+
+#: ../src/msw/utils.cpp:1279
+msgid "Windows Server 2003"
+msgstr ""
+
+#: ../src/msw/utils.cpp:1295
+msgid "Windows Server 2008"
+msgstr ""
+
+#: ../src/msw/utils.cpp:1301
+msgid "Windows Server 2008 R2"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:166
+msgid "Windows Thai (CP 874)"
+msgstr "Windows Thai (CP 874)"
+
+#: ../src/common/fmapbase.cpp:175
+msgid "Windows Turkish (CP 1254)"
+msgstr "Windows turecki (CP 1254)"
+
+#: ../src/common/fmapbase.cpp:179
+msgid "Windows Vietnamese (CP 1258)"
+msgstr ""
+
+#: ../src/msw/utils.cpp:1296
+msgid "Windows Vista"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:173
+msgid "Windows Western European (CP 1252)"
+msgstr "Windows zachodnioeuropejski (CP 1252)"
+
+#: ../src/msw/utils.cpp:1285
+msgid "Windows XP"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:181
+msgid "Windows/DOS OEM (CP 437)"
+msgstr "Windows/DOS OEM (CP 437)"
+
+#: ../src/common/fmapbase.cpp:165
+msgid "Windows/DOS OEM Cyrillic (CP 866)"
+msgstr ""
+
+#: ../src/common/ffile.cpp:148
+#, c-format
+msgid "Write error on file '%s'"
+msgstr "Błąd zapisu do pliku '%s'"
+
+#: ../src/xml/xml.cpp:844
+#, c-format
+msgid "XML parsing error: '%s' at line %d"
+msgstr "Błąd parsowania XML: '%s' w linii %d"
+
+#: ../src/common/xpmdecod.cpp:796
+msgid "XPM: Malformed pixel data!"
+msgstr "XPM: Zniekształcone dane obrazu!"
+
+#: ../src/common/xpmdecod.cpp:705
+#, c-format
+msgid "XPM: incorrect colour description in line %d"
+msgstr "XPM: niepoprawny opis koloru w linijce %d"
+
+#: ../src/common/xpmdecod.cpp:680
+msgid "XPM: incorrect header format!"
+msgstr "XPM: niepoprawna nagłówka formatu!"
+
+#: ../src/common/xpmdecod.cpp:716 ../src/common/xpmdecod.cpp:725
+#, c-format
+msgid "XPM: malformed colour definition '%s' at line %d!"
+msgstr "XPM: niepoprawna definicja koloru '%s 'w linijce %d!"
+
+#: ../src/common/xpmdecod.cpp:755
+msgid "XPM: no colors left to use for mask!"
+msgstr "XPM: nie zostało kolorów dla maski!"
+
+#: ../src/common/xpmdecod.cpp:782
+#, c-format
+msgid "XPM: truncated image data at line %d!"
+msgstr "XPM: obcięte dane obrazu w linijce %d!"
+
+#: ../include/wx/msgdlg.h:271 ../src/common/stockitem.cpp:206
+#: ../src/motif/msgdlg.cpp:196
+msgid "Yes"
+msgstr "Tak"
+
+#: ../src/osx/carbon/overlay.cpp:155
+msgid "You cannot Clear an overlay that is not inited"
+msgstr "Nie można wyczyścić nakładki, która nie jest zainicjowana"
+
+#: ../src/osx/carbon/overlay.cpp:107 ../src/dfb/overlay.cpp:61
+msgid "You cannot Init an overlay twice"
+msgstr "Nie można uruchomić nakładki podwójnie"
+
+#: ../src/generic/dirdlgg.cpp:316
+msgid "You cannot add a new directory to this section."
+msgstr "Nie możesz dodać nowego katalogu do tej sekcji."
+
+#: ../src/propgrid/propgrid.cpp:3258
+msgid "You have entered invalid value. Press ESC to cancel editing."
+msgstr "Wprowadzono nieprawidłową wartość. Naciśnij ESC by anulować edycję."
+
+#: ../src/common/stockitem.cpp:209
+msgid "Zoom &In"
+msgstr "Powiększen&ie"
+
+#: ../src/common/stockitem.cpp:210
+msgid "Zoom &Out"
+msgstr "P&omniejszenie"
+
+#: ../src/common/stockitem.cpp:209 ../src/common/prntbase.cpp:1564
+msgid "Zoom In"
+msgstr "Powiększenie"
+
+#: ../src/common/stockitem.cpp:210 ../src/common/prntbase.cpp:1550
+msgid "Zoom Out"
+msgstr "Pomniejszenie"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to &Fit"
+msgstr "&Dopasowanie powiększenia"
+
+#: ../src/common/stockitem.cpp:208
+#, fuzzy
+msgid "Zoom to Fit"
+msgstr "&Dopasowanie powiększenia"
+
+#: ../src/msw/dde.cpp:1144
+msgid "a DDEML application has created a prolonged race condition."
+msgstr "Aplikacja DDEML utworzyła przedłużony wyścig (race condition)."
+
+# instance -->
+#: ../src/msw/dde.cpp:1132
+msgid ""
+"a DDEML function was called without first calling the DdeInitialize "
+"function,\n"
+"or an invalid instance identifier\n"
+"was passed to a DDEML function."
+msgstr ""
+"została wywołana funkcja DDEML bez wcześniejszego wywołania funkcji "
+"DdeInitialize,\n"
+"lub do funkcji DDEML przesłano\n"
+"nieprawidłowy identyfikator instancji."
+
+#: ../src/msw/dde.cpp:1150
+msgid "a client's attempt to establish a conversation has failed."
+msgstr "próba nawiązania konwersacji przez klienta nie powiodła się."
+
+#: ../src/msw/dde.cpp:1147
+msgid "a memory allocation failed."
+msgstr "przydzielenie pamięci nie powiodło się."
+
+#: ../src/msw/dde.cpp:1141
+msgid "a parameter failed to be validated by the DDEML."
+msgstr "parametr nie przeszedł kontroli poprawności DDEML"
+
+#: ../src/msw/dde.cpp:1123
+msgid "a request for a synchronous advise transaction has timed out."
+msgstr ""
+"upłynął czas oczekiwania na rozpoczęcie synchronicznej transakcji advise."
+
+#: ../src/msw/dde.cpp:1129
+msgid "a request for a synchronous data transaction has timed out."
+msgstr ""
+"upłynął czas oczekiwania na rozpoczęcie synchronicznej transakcji data."
+
+#: ../src/msw/dde.cpp:1138
+msgid "a request for a synchronous execute transaction has timed out."
+msgstr ""
+"upłynął czas oczekiwania na rozpoczęcie synchronicznej transakcji execute."
+
+#: ../src/msw/dde.cpp:1156
+msgid "a request for a synchronous poke transaction has timed out."
+msgstr ""
+"upłynął czas oczekiwania na rozpoczęcie synchronicznej transakcji poke."
+
+#: ../src/msw/dde.cpp:1171
+msgid "a request to end an advise transaction has timed out."
+msgstr "upłynął czas oczekiwania na zakończenie trancakcji advise."
+
+#: ../src/msw/dde.cpp:1165
+msgid ""
+"a server-side transaction was attempted on a conversation\n"
+"that was terminated by the client, or the server\n"
+"terminated before completing a transaction."
+msgstr ""
+"transakcja server-side próbowała kontynuować konwersację\n"
+"zakończoną przez klienta, lub serwer\n"
+"zakończył pracę przez zakończeniem transakcji."
+
+#: ../src/msw/dde.cpp:1153
+msgid "a transaction failed."
+msgstr "transakcja nie powiodła się."
+
+#: ../src/common/accelcmn.cpp:184
+msgid "alt"
+msgstr "alt"
+
+# transakcję normalnie wykonywaną przez serwer, inaczej
+#: ../src/msw/dde.cpp:1135
+msgid ""
+"an application initialized as APPCLASS_MONITOR has\n"
+"attempted to perform a DDE transaction,\n"
+"or an application initialized as APPCMD_CLIENTONLY has \n"
+"attempted to perform server transactions."
+msgstr ""
+"aplikacja zainicjowana jako APPCLASS_MONITOR\n"
+"usiłowała wykonać transakcję DDE,\n"
+"lub aplikacja zainicjowana jako APPCMD_CLIENTONLY\n"
+"usiłowała wykonać transakcję serwera."
+
+#: ../src/msw/dde.cpp:1159
+msgid "an internal call to the PostMessage function has failed. "
+msgstr "wewnętrzne wywołanie funkcji PostMessage zakończyło się niepowodzeniem"
+
+#: ../src/msw/dde.cpp:1168
+msgid "an internal error has occurred in the DDEML."
+msgstr "wystąpił wewnętrzny błąd w DDEML."
+
+#: ../src/msw/dde.cpp:1174
+msgid ""
+"an invalid transaction identifier was passed to a DDEML function.\n"
+"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n"
+"the transaction identifier for that callback is no longer valid."
+msgstr ""
+"do funkcji DDEML przesłano nieprawidłowy identyfikator transakcji.\n"
+"Kiedy aplikacja kończy połączenie zwrotne XTYP_XACT_COMPLETE,\n"
+"identyfikator transakcji dla tego połączenia nie jest dłużej ważny."
+
+#: ../src/common/zipstrm.cpp:1272
+msgid "assuming this is a multi-part zip concatenated"
+msgstr "założenie że jest to połączony wieloczęściowy zip"
+
+#: ../src/common/fileconf.cpp:1882
+#, c-format
+msgid "attempt to change immutable key '%s' ignored."
+msgstr "zignorowano próbę zmiany niezmiennego klucza '%s'."
+
+#: ../src/html/chm.cpp:329
+msgid "bad arguments to library function"
+msgstr "błędne argumenty funkcji bibliotecznej"
+
+#: ../src/html/chm.cpp:341
+msgid "bad signature"
+msgstr "błędne oznaczenie"
+
+#: ../src/common/zipstrm.cpp:1715
+msgid "bad zipfile offset to entry"
+msgstr "błędne przemieszczenie w pliku zip"
+
+#: ../src/common/ftp.cpp:405
+msgid "binary"
+msgstr "binarny"
+
+#: ../src/common/fontcmn.cpp:978
+msgid "bold"
+msgstr "pogrubiony"
+
+#: ../src/os2/iniconf.cpp:463
+msgid "buffer is too small for Windows directory."
+msgstr "bufor jest zbyt mały na katalog Windows."
+
+#: ../src/msw/utils.cpp:1316
+#, c-format
+msgid "build %lu"
+msgstr ""
+
+#: ../src/common/ffile.cpp:79
+#, c-format
+msgid "can't close file '%s'"
+msgstr "nie można zamknąć pliku '%s'"
+
+#: ../src/common/file.cpp:278
+#, c-format
+msgid "can't close file descriptor %d"
+msgstr "nie można zamknąć deskryptora pliku %d"
+
+#: ../src/common/file.cpp:604
+#, c-format
+msgid "can't commit changes to file '%s'"
+msgstr "nie można zatwierdzić zmian w pliku '%s'"
+
+#: ../src/common/file.cpp:212
+#, c-format
+msgid "can't create file '%s'"
+msgstr "nie można utworzyć pliku '%s'"
+
+#: ../src/common/fileconf.cpp:1176
+#, c-format
+msgid "can't delete user configuration file '%s'"
+msgstr "nie można usunąć pliku konfiguracyjnego użytkownika '%s'"
+
+#: ../src/common/file.cpp:511
+#, c-format
+msgid "can't determine if the end of file is reached on descriptor %d"
+msgstr "nie można określić czy osiągnięto koniec pliku w deskryptorze %d"
+
+#: ../src/msdos/utilsdos.cpp:310 ../src/msdos/utilsdos.cpp:475
+#, c-format
+msgid "can't execute '%s'"
+msgstr "nie udało się wykonać '%s'"
+
+#: ../src/common/zipstrm.cpp:1490
+msgid "can't find central directory in zip"
+msgstr "nie można znaleźć centralnego katalogu zip"
+
+#: ../src/common/file.cpp:481
+#, c-format
+msgid "can't find length of file on file descriptor %d"
+msgstr "nie można znaleźć rozmiaru pliku w deskryptorze pliku %d"
+
+#: ../src/msw/utils.cpp:373
+msgid "can't find user's HOME, using current directory."
+msgstr "nie można znaleźć katalogu domowego, zostanie użyty bieżący."
+
+#: ../src/common/file.cpp:382
+#, c-format
+msgid "can't flush file descriptor %d"
+msgstr "nie można opróżnić deskryptora pliku %d"
+
+#: ../src/common/file.cpp:438 ../src/msw/wince/filefnwce.cpp:204
+#, c-format
+msgid "can't get seek position on file descriptor %d"
+msgstr "nie można odczytać bieżącej pozycji w deskryptorze pliku %d"
+
+#: ../src/common/fontmap.cpp:325
+msgid "can't load any font, aborting"
+msgstr "nie można załadować żadnej czcionki, program kończy pracę"
+
+#: ../src/common/file.cpp:264 ../src/common/ffile.cpp:63
+#, c-format
+msgid "can't open file '%s'"
+msgstr "nie można otworzyć pliku '%s'"
+
+# globalnej?
+#: ../src/common/fileconf.cpp:351
+#, c-format
+msgid "can't open global configuration file '%s'."
+msgstr "nie można otworzyć globalnego pliku konfiguracji '%s'."
+
+#: ../src/common/fileconf.cpp:367
+#, c-format
+msgid "can't open user configuration file '%s'."
+msgstr "nie można otworzyć pliku konfiguracyjnego użytkownika '%s'."
+
+#: ../src/common/fileconf.cpp:1017
+msgid "can't open user configuration file."
+msgstr "nie można otworzyć pliku konfiguracyjnego użytkownika."
+
+#: ../src/common/zipstrm.cpp:527
+msgid "can't re-initialize zlib deflate stream"
+msgstr "nie można ponownie zainicjować strumienia kompresji biblioteki zlib"
+
+#: ../src/common/zipstrm.cpp:552
+msgid "can't re-initialize zlib inflate stream"
+msgstr "nie można ponownie zainicjować strumienia dekompresji biblioteki zlib"
+
+#: ../src/common/file.cpp:334
+#, c-format
+msgid "can't read from file descriptor %d"
+msgstr "nie można czytać z deskryptora pliku %d"
+
+#: ../src/common/file.cpp:599
+#, c-format
+msgid "can't remove file '%s'"
+msgstr "nie można usunąć pliku '%s'"
+
+#: ../src/common/file.cpp:616
+#, c-format
+msgid "can't remove temporary file '%s'"
+msgstr "nie można usunąć tymczasowego pliku '%s'"
+
+#: ../src/common/file.cpp:424 ../src/msw/wince/filefnwce.cpp:190
+#, c-format
+msgid "can't seek on file descriptor %d"
+msgstr "nie można ustawić pozycji w deskryptorze pliku %d"
+
+#: ../src/common/textfile.cpp:299
+#, c-format
+msgid "can't write buffer '%s' to disk."
+msgstr "nie można zapisać bufora '%s' na dysk."
+
+#: ../src/common/file.cpp:350
+#, c-format
+msgid "can't write to file descriptor %d"
+msgstr "nie można zapisać do deskryptora pliku %d"
+
+#: ../src/common/fileconf.cpp:1031
+msgid "can't write user configuration file."
+msgstr "nie można zapisać pliku konfiguracyjnego użytkownika."
+
+#: ../src/html/chm.cpp:345
+msgid "checksum error"
+msgstr "błąd sumy kontrolnej"
+
+#: ../src/common/tarstrm.cpp:820
+msgid "checksum failure reading tar header block"
+msgstr "Niepowodzenie sumy kontrolnej czytania nagłówka bloku tar"
+
+#: ../src/richtext/richtextborderspage.cpp:280
+#: ../src/richtext/richtextborderspage.cpp:310
+#: ../src/richtext/richtextborderspage.cpp:340
+#: ../src/richtext/richtextborderspage.cpp:370
+#: ../src/richtext/richtextborderspage.cpp:424
+#: ../src/richtext/richtextborderspage.cpp:454
+#: ../src/richtext/richtextborderspage.cpp:484
+#: ../src/richtext/richtextborderspage.cpp:514
+#: ../src/richtext/richtextmarginspage.cpp:202
+#: ../src/richtext/richtextmarginspage.cpp:227
+#: ../src/richtext/richtextmarginspage.cpp:250
+#: ../src/richtext/richtextmarginspage.cpp:275
+#: ../src/richtext/richtextmarginspage.cpp:316
+#: ../src/richtext/richtextmarginspage.cpp:341
+#: ../src/richtext/richtextmarginspage.cpp:364
+#: ../src/richtext/richtextmarginspage.cpp:389
+#: ../src/richtext/richtextsizepage.cpp:336
+#: ../src/richtext/richtextsizepage.cpp:370
+#: ../src/richtext/richtextsizepage.cpp:397
+#: ../src/richtext/richtextsizepage.cpp:424
+#: ../src/richtext/richtextsizepage.cpp:451
+#: ../src/richtext/richtextsizepage.cpp:478
+#: ../src/richtext/richtextsizepage.cpp:552
+#: ../src/richtext/richtextsizepage.cpp:587
+#: ../src/richtext/richtextsizepage.cpp:622
+#: ../src/richtext/richtextsizepage.cpp:657
+msgid "cm"
+msgstr "cm"
+
+#: ../src/html/chm.cpp:347
+msgid "compression error"
+msgstr "błąd kompresji"
+
+#: ../src/common/regex.cpp:239
+msgid "conversion to 8-bit encoding failed"
+msgstr "nie powiodła się konwersja do kodowania '8-bit'"
+
+#: ../src/common/accelcmn.cpp:182
+msgid "ctrl"
+msgstr "ctrl"
+
+#: ../src/common/cmdline.cpp:1323
+msgid "date"
+msgstr "data"
+
+#: ../src/html/chm.cpp:349
+msgid "decompression error"
+msgstr "błąd dekompresji"
+
+#: ../src/richtext/richtextstyles.cpp:780 ../src/common/fmapbase.cpp:820
+msgid "default"
+msgstr "domyślny"
+
+#: ../src/common/cmdline.cpp:1319
+msgid "double"
+msgstr "podwójnie"
+
+#: ../src/common/debugrpt.cpp:543
+msgid "dump of the process state (binary)"
+msgstr "kopia stanu procesu (binarnie)"
+
+#: ../src/common/datetimefmt.cpp:1936
+msgid "eighteenth"
+msgstr "osiemnasty"
+
+#: ../src/common/datetimefmt.cpp:1926
+msgid "eighth"
+msgstr "ósmy"
+
+#: ../src/common/datetimefmt.cpp:1929
+msgid "eleventh"
+msgstr "jedenasty"
+
+#: ../src/common/fileconf.cpp:1868
+#, c-format
+msgid "entry '%s' appears more than once in group '%s'"
+msgstr "pozycja '%s' występuje w grupie '%s' więcej niż jeden raz"
+
+#: ../src/html/chm.cpp:343
+msgid "error in data format"
+msgstr "błąd w formacie"
+
+#: ../src/msdos/utilsdos.cpp:413
+#, c-format
+msgid "error opening '%s'"
+msgstr "błąd otwarcia '%s'"
+
+#: ../src/html/chm.cpp:331
+msgid "error opening file"
+msgstr "błąd otwarcia pliku"
+
+#: ../src/common/zipstrm.cpp:1576
+msgid "error reading zip central directory"
+msgstr "błąd przy odczycie centralnego katalogu zip"
+
+#: ../src/common/zipstrm.cpp:1667
+msgid "error reading zip local header"
+msgstr "błąd odczytu lokalnego nagłówka zip"
+
+#: ../src/common/zipstrm.cpp:2396
+#, c-format
+msgid "error writing zip entry '%s': bad crc or length"
+msgstr "błąd zapisu zip '%s': niepoprawna sygnatura crc lub długość"
+
+# nie do końca...
+#: ../src/common/ffile.cpp:170
+#, c-format
+msgid "failed to flush the file '%s'"
+msgstr "nie udało się opróżnić (flush) pliku '%s'"
+
+#: ../src/common/datetimefmt.cpp:1933
+msgid "fifteenth"
+msgstr "piętnasty"
+
+#: ../src/common/datetimefmt.cpp:1923
+msgid "fifth"
+msgstr "piąty"
+
+#: ../src/common/fileconf.cpp:610
+#, c-format
+msgid "file '%s', line %d: '%s' ignored after group header."
+msgstr "plik '%s', linia %d: zignorowano '%s' po nagłówku grupy."
+
+#: ../src/common/fileconf.cpp:639
+#, c-format
+msgid "file '%s', line %d: '=' expected."
+msgstr "plik '%s', linia %d: oczekiwano '='."
+
+#: ../src/common/fileconf.cpp:662
+#, c-format
+msgid "file '%s', line %d: key '%s' was first found at line %d."
+msgstr "plik '%s', linia %d: klucz '%s' wystąpił po raz pierwszy w lini %d."
+
+# niezmiennego?
+#: ../src/common/fileconf.cpp:652
+#, c-format
+msgid "file '%s', line %d: value for immutable key '%s' ignored."
+msgstr "plik '%s', linia %d: zignorowano wartość dla niezmiennego klucza '%s'."
+
+#: ../src/common/fileconf.cpp:574
+#, c-format
+msgid "file '%s': unexpected character %c at line %d."
+msgstr "plik '%s': nieoczekiwany znak %c w lini %d."
+
+#: ../src/richtext/richtextbuffer.cpp:8300
+msgid "files"
+msgstr "pliki"
+
+#: ../src/common/datetimefmt.cpp:1919
+msgid "first"
+msgstr "pierwszy"
+
+#: ../src/html/helpwnd.cpp:1265
+msgid "font size"
+msgstr "rozmiar czcionki"
+
+#: ../src/common/datetimefmt.cpp:1932
+msgid "fourteenth"
+msgstr "czternasty"
+
+#: ../src/common/datetimefmt.cpp:1922
+msgid "fourth"
+msgstr "czwarty"
+
+# inaczej
+#: ../src/common/appbase.cpp:695
+msgid "generate verbose log messages"
+msgstr "generuje listę komunikatów"
+
+#: ../src/richtext/richtextbuffer.cpp:12015
+#: ../src/richtext/richtextbuffer.cpp:12125
+msgid "image"
+msgstr "obraz"
+
+#: ../src/common/tarstrm.cpp:796
+msgid "incomplete header block in tar"
+msgstr "niekompletny blok nagłówka w tar"
+
+#: ../src/common/xtixml.cpp:489
+msgid "incorrect event handler string, missing dot"
+msgstr "nieprawidłowy uchwyt zdarzenia, brak kropki w nazwie"
+
+#: ../src/common/tarstrm.cpp:1381
+msgid "incorrect size given for tar entry"
+msgstr "nieprawidłowy rozmiar podany w wpisie tar"
+
+#: ../src/common/tarstrm.cpp:993
+msgid "invalid data in extended tar header"
+msgstr "nieprawidłowe dane w rozszerzonym nagłówku tar"
+
+#: ../src/generic/logg.cpp:1050
+msgid "invalid message box return value"
+msgstr "wartość zwrócona przez okno komunikatu jest nieprawidłowa"
+
+#: ../src/common/zipstrm.cpp:1445
+msgid "invalid zip file"
+msgstr "nieprawidłowy plik zip"
+
+#: ../src/common/fontcmn.cpp:983
+msgid "italic"
+msgstr "kursywa"
+
+#: ../src/common/fontcmn.cpp:973
+msgid "light"
+msgstr "lekki"
+
+#: ../src/common/intl.cpp:293
+#, c-format
+msgid "locale '%s' cannot be set."
+msgstr "lokalizacja '%s' nie może być ustawiona."
+
+#: ../src/common/datetimefmt.cpp:2092
+msgid "midnight"
+msgstr "północ"
+
+#: ../src/common/datetimefmt.cpp:1937
+msgid "nineteenth"
+msgstr "dziewiętnasty"
+
+#: ../src/common/datetimefmt.cpp:1927
+msgid "ninth"
+msgstr "dziewiąty"
+
+#: ../src/msw/dde.cpp:1119
+msgid "no DDE error."
+msgstr "bez błędu DDE."
+
+#: ../src/html/chm.cpp:327
+msgid "no error"
+msgstr "brak błędu"
+
+#: ../src/dfb/fontmgr.cpp:174
+#, c-format
+msgid "no fonts found in %s, using builtin font"
+msgstr "nie znaleziono czcionek w %s, wykorzystując czcionki wypunktowania"
+
+#: ../src/html/helpdata.cpp:654
+msgid "noname"
+msgstr "beznazwy"
+
+#: ../src/common/datetimefmt.cpp:2091
+msgid "noon"
+msgstr "południe"
+
+#: ../src/richtext/richtextstyles.cpp:779
+#, fuzzy
+msgid "normal"
+msgstr "Normalny"
+
+#: ../src/gtk/print.cpp:1227 ../src/gtk/print.cpp:1332
+msgid "not implemented"
+msgstr "nie zaimplementowany"
+
+#: ../src/common/cmdline.cpp:1315
+msgid "num"
+msgstr "liczba"
+
+#: ../src/common/xtixml.cpp:259
+msgid "objects cannot have XML Text Nodes"
+msgstr "obiekty nie może mieć węzłów typu 'XML Text'"
+
+#: ../src/html/chm.cpp:339
+msgid "out of memory"
+msgstr "brak wolnej pamięci"
+
+#: ../src/richtext/richtextsizepage.cpp:337
+#: ../src/richtext/richtextsizepage.cpp:371
+#: ../src/richtext/richtextsizepage.cpp:398
+#: ../src/richtext/richtextsizepage.cpp:425
+#: ../src/richtext/richtextsizepage.cpp:452
+#: ../src/richtext/richtextsizepage.cpp:479
+#: ../src/richtext/richtextsizepage.cpp:553
+#: ../src/richtext/richtextsizepage.cpp:588
+#: ../src/richtext/richtextsizepage.cpp:623
+#: ../src/richtext/richtextsizepage.cpp:658
+msgid "percent"
+msgstr "procent"
+
+#: ../src/common/debugrpt.cpp:519
+msgid "process context description"
+msgstr "opis kontekstu procesu"
+
+#: ../src/richtext/richtextfontpage.cpp:186
+#: ../src/richtext/richtextfontpage.cpp:189
+msgid "pt"
+msgstr "pt"
+
+#: ../src/richtext/richtextfontpage.cpp:187
+#: ../src/richtext/richtextborderspage.cpp:279
+#: ../src/richtext/richtextborderspage.cpp:281
+#: ../src/richtext/richtextborderspage.cpp:282
+#: ../src/richtext/richtextborderspage.cpp:309
+#: ../src/richtext/richtextborderspage.cpp:311
+#: ../src/richtext/richtextborderspage.cpp:312
+#: ../src/richtext/richtextborderspage.cpp:339
+#: ../src/richtext/richtextborderspage.cpp:341
+#: ../src/richtext/richtextborderspage.cpp:342
+#: ../src/richtext/richtextborderspage.cpp:369
+#: ../src/richtext/richtextborderspage.cpp:371
+#: ../src/richtext/richtextborderspage.cpp:372
+#: ../src/richtext/richtextborderspage.cpp:423
+#: ../src/richtext/richtextborderspage.cpp:425
+#: ../src/richtext/richtextborderspage.cpp:426
+#: ../src/richtext/richtextborderspage.cpp:453
+#: ../src/richtext/richtextborderspage.cpp:455
+#: ../src/richtext/richtextborderspage.cpp:456
+#: ../src/richtext/richtextborderspage.cpp:483
+#: ../src/richtext/richtextborderspage.cpp:485
+#: ../src/richtext/richtextborderspage.cpp:486
+#: ../src/richtext/richtextborderspage.cpp:513
+#: ../src/richtext/richtextborderspage.cpp:515
+#: ../src/richtext/richtextborderspage.cpp:516
+#: ../src/richtext/richtextmarginspage.cpp:201
+#: ../src/richtext/richtextmarginspage.cpp:203
+#: ../src/richtext/richtextmarginspage.cpp:204
+#: ../src/richtext/richtextmarginspage.cpp:226
+#: ../src/richtext/richtextmarginspage.cpp:228
+#: ../src/richtext/richtextmarginspage.cpp:229
+#: ../src/richtext/richtextmarginspage.cpp:249
+#: ../src/richtext/richtextmarginspage.cpp:251
+#: ../src/richtext/richtextmarginspage.cpp:252
+#: ../src/richtext/richtextmarginspage.cpp:274
+#: ../src/richtext/richtextmarginspage.cpp:276
+#: ../src/richtext/richtextmarginspage.cpp:277
+#: ../src/richtext/richtextmarginspage.cpp:315
+#: ../src/richtext/richtextmarginspage.cpp:317
+#: ../src/richtext/richtextmarginspage.cpp:318
+#: ../src/richtext/richtextmarginspage.cpp:340
+#: ../src/richtext/richtextmarginspage.cpp:342
+#: ../src/richtext/richtextmarginspage.cpp:343
+#: ../src/richtext/richtextmarginspage.cpp:363
+#: ../src/richtext/richtextmarginspage.cpp:365
+#: ../src/richtext/richtextmarginspage.cpp:366
+#: ../src/richtext/richtextmarginspage.cpp:388
+#: ../src/richtext/richtextmarginspage.cpp:390
+#: ../src/richtext/richtextmarginspage.cpp:391
+#: ../src/richtext/richtextsizepage.cpp:335
+#: ../src/richtext/richtextsizepage.cpp:338
+#: ../src/richtext/richtextsizepage.cpp:339
+#: ../src/richtext/richtextsizepage.cpp:369
+#: ../src/richtext/richtextsizepage.cpp:372
+#: ../src/richtext/richtextsizepage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:396
+#: ../src/richtext/richtextsizepage.cpp:399
+#: ../src/richtext/richtextsizepage.cpp:400
+#: ../src/richtext/richtextsizepage.cpp:423
+#: ../src/richtext/richtextsizepage.cpp:426
+#: ../src/richtext/richtextsizepage.cpp:427
+#: ../src/richtext/richtextsizepage.cpp:450
+#: ../src/richtext/richtextsizepage.cpp:453
+#: ../src/richtext/richtextsizepage.cpp:454
+#: ../src/richtext/richtextsizepage.cpp:477
+#: ../src/richtext/richtextsizepage.cpp:480
+#: ../src/richtext/richtextsizepage.cpp:481
+#: ../src/richtext/richtextsizepage.cpp:551
+#: ../src/richtext/richtextsizepage.cpp:554
+#: ../src/richtext/richtextsizepage.cpp:555
+#: ../src/richtext/richtextsizepage.cpp:586
+#: ../src/richtext/richtextsizepage.cpp:589
+#: ../src/richtext/richtextsizepage.cpp:590
+#: ../src/richtext/richtextsizepage.cpp:621
+#: ../src/richtext/richtextsizepage.cpp:624
+#: ../src/richtext/richtextsizepage.cpp:625
+#: ../src/richtext/richtextsizepage.cpp:656
+#: ../src/richtext/richtextsizepage.cpp:659
+#: ../src/richtext/richtextsizepage.cpp:660
+msgid "px"
+msgstr "px"
+
+#: ../src/common/accelcmn.cpp:188
+msgid "rawctrl"
+msgstr ""
+
+#: ../src/html/chm.cpp:333
+msgid "read error"
+msgstr "błąd odczytu"
+
+#: ../src/common/zipstrm.cpp:1882
+#, c-format
+msgid "reading zip stream (entry %s): bad crc"
+msgstr "odczyt strumienia zip (%s): niepoprawna sygnatura crc"
+
+#: ../src/common/zipstrm.cpp:1877
+#, c-format
+msgid "reading zip stream (entry %s): bad length"
+msgstr "odczyt strumienia zip (%s): niepoprawna długość"
+
+#: ../src/msw/dde.cpp:1162
+msgid "reentrancy problem."
+msgstr "problem współbieżności"
+
+#: ../src/common/datetimefmt.cpp:1920
+msgid "second"
+msgstr "drugi"
+
+#: ../src/html/chm.cpp:337
+msgid "seek error"
+msgstr "błąd przeszukiwania"
+
+#: ../src/common/datetimefmt.cpp:1935
+msgid "seventeenth"
+msgstr "siedemnasty"
+
+#: ../src/common/datetimefmt.cpp:1925
+msgid "seventh"
+msgstr "siódmy"
+
+#: ../src/common/accelcmn.cpp:186
+msgid "shift"
+msgstr "shift"
+
+#: ../src/common/appbase.cpp:685
+msgid "show this help message"
+msgstr "wyświetla ten komunikat"
+
+#: ../src/common/datetimefmt.cpp:1934
+msgid "sixteenth"
+msgstr "szesnasty"
+
+#: ../src/common/datetimefmt.cpp:1924
+msgid "sixth"
+msgstr "szósty"
+
+#: ../src/common/appcmn.cpp:206
+msgid "specify display mode to use (e.g. 640x480-16)"
+msgstr "określa tryb wyświetlania, który ma być użyty (np. 640x480-16)"
+
+#: ../src/common/appcmn.cpp:192
+msgid "specify the theme to use"
+msgstr "określa kompozycję, który ma być użyta"
+
+#: ../src/richtext/richtextbuffer.cpp:8818
+msgid "standard/circle"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8819
+msgid "standard/circle-outline"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8821
+msgid "standard/diamond"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8820
+msgid "standard/square"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8822
+msgid "standard/triangle"
+msgstr ""
+
+#: ../src/common/zipstrm.cpp:1782
+msgid "stored file length not in Zip header"
+msgstr "długość pliku nie w nagłówku Zip"
+
+#: ../src/common/cmdline.cpp:1311
+msgid "str"
+msgstr "tekst"
+
+#: ../src/common/fontcmn.cpp:794 ../src/common/fontcmn.cpp:969
+#, fuzzy
+msgid "strikethrough"
+msgstr "&Przekreślenie"
+
+#: ../src/common/tarstrm.cpp:1003 ../src/common/tarstrm.cpp:1025
+#: ../src/common/tarstrm.cpp:1507 ../src/common/tarstrm.cpp:1529
+msgid "tar entry not open"
+msgstr "wpis tar nie otwarty"
+
+#: ../src/common/datetimefmt.cpp:1928
+msgid "tenth"
+msgstr "dziesiąty"
+
+# niezręczne
+#: ../src/msw/dde.cpp:1126
+msgid "the response to the transaction caused the DDE_FBUSY bit to be set."
+msgstr "odpowiedź na transakcję spowodowała ustawienie bitu DDE_FBUSY."
+
+#: ../src/common/datetimefmt.cpp:1921
+msgid "third"
+msgstr "trzeci"
+
+#: ../src/common/datetimefmt.cpp:1931
+msgid "thirteenth"
+msgstr "trzynasty"
+
+#: ../src/common/datetimefmt.cpp:1725
+msgid "today"
+msgstr "dziś"
+
+#: ../src/common/datetimefmt.cpp:1727
+msgid "tomorrow"
+msgstr "jutro"
+
+#: ../src/common/fileconf.cpp:1979
+#, c-format
+msgid "trailing backslash ignored in '%s'"
+msgstr "końcowy ukośnik odwrotny zignorowany w '%s'"
+
+#: ../src/gtk/aboutdlg.cpp:218
+msgid "translator-credits"
+msgstr "Michał Trzebiatowski"
+
+#: ../src/common/datetimefmt.cpp:1930
+msgid "twelfth"
+msgstr "dwunasty"
+
+#: ../src/common/datetimefmt.cpp:1938
+msgid "twentieth"
+msgstr "dwudziesty"
+
+#: ../src/common/fontcmn.cpp:789 ../src/common/fontcmn.cpp:965
+msgid "underlined"
+msgstr "podkreślony"
+
+#: ../src/common/fileconf.cpp:2014
+#, c-format
+msgid "unexpected \" at position %d in '%s'."
+msgstr "nieoczekiwany \" na pozycji %d w '%s'."
+
+#: ../src/common/tarstrm.cpp:1045
+msgid "unexpected end of file"
+msgstr "nieoczekiwany koniec pliku"
+
+#: ../src/generic/progdlgg.cpp:399 ../src/common/tarstrm.cpp:371
+#: ../src/common/tarstrm.cpp:394 ../src/common/tarstrm.cpp:425
+msgid "unknown"
+msgstr "nieznany"
+
+#: ../src/common/xtixml.cpp:253
+#, c-format
+msgid "unknown class %s"
+msgstr "nieznana klasa %s"
+
+#: ../src/common/regex.cpp:261 ../src/html/chm.cpp:351
+msgid "unknown error"
+msgstr "nieznany błąd"
+
+#: ../src/msw/dialup.cpp:490
+#, c-format
+msgid "unknown error (error code %08x)."
+msgstr "nieznany błąd (kod błędu %08x)."
+
+#: ../src/msw/wince/filefnwce.cpp:172
+msgid "unknown seek origin"
+msgstr "nieznany odnośnik pozycjonowania"
+
+#: ../src/common/fmapbase.cpp:834
+#, c-format
+msgid "unknown-%d"
+msgstr "nieznany-%d"
+
+#: ../src/common/docview.cpp:507
+msgid "unnamed"
+msgstr "beznazwy"
+
+#: ../src/common/docview.cpp:1607
+#, c-format
+msgid "unnamed%d"
+msgstr "beznazwy%d"
+
+#: ../src/common/zipstrm.cpp:1796 ../src/common/zipstrm.cpp:2184
+msgid "unsupported Zip compression method"
+msgstr "niewspierana metoda kompresji Zip"
+
+#: ../src/common/translation.cpp:1892
+#, c-format
+msgid "using catalog '%s' from '%s'."
+msgstr "użycie katalogu '%s' z '%s'."
+
+#: ../src/html/chm.cpp:335
+msgid "write error"
+msgstr "błąd zapisu"
+
+#: ../src/common/time.cpp:318
+msgid "wxGetTimeOfDay failed."
+msgstr "wxGetTimeOfDay zwróciło błąd."
+
+#: ../src/gtk/print.cpp:996
+msgid "wxPrintout::GetPageInfo gives a null maxPage."
+msgstr "wxPrintout: GetPageInfo daje zero maxPage."
+
+#: ../src/osx/carbon/dataview.cpp:1303
+msgid "wxWidget control pointer is not a data view pointer"
+msgstr "Wskaźnik kontroli wxWidget nie jest wskaźnikiem widoku danych"
+
+#: ../src/osx/carbon/dataview.cpp:907
+msgid "wxWidget's control not initialized."
+msgstr ""
+
+#: ../src/motif/app.cpp:245
+#, c-format
+msgid "wxWidgets could not open display for '%s': exiting."
+msgstr "Nie można zainicjować wyświetlania dla '%s': program kończy pracę."
+
+#: ../src/x11/app.cpp:164
+msgid "wxWidgets could not open display. Exiting."
+msgstr "Nie można zainicjować wyświetlania. Program kończy pracę."
+
+#: ../src/richtext/richtextsymboldlg.cpp:434
+msgid "xxxx"
+msgstr "xxxx"
+
+#: ../src/common/datetimefmt.cpp:1726
+msgid "yesterday"
+msgstr "wczoraj"
+
+#: ../src/common/zstream.cpp:251 ../src/common/zstream.cpp:426
+#, c-format
+msgid "zlib error %d"
+msgstr "błąd biblioteki zlib %d"
+
+#: ../src/richtext/richtextliststylepage.cpp:496
+#: ../src/richtext/richtextbulletspage.cpp:301
+msgid "~"
+msgstr "~"
+
+#~ msgid "1"
+#~ msgstr "1"
+
+#, fuzzy
+#~ msgid "10"
+#~ msgstr "1"
+
+#~ msgid "3"
+#~ msgstr "3"
+
+#~ msgid "4"
+#~ msgstr "4"
+
+#~ msgid "5"
+#~ msgstr "5"
+
+#~ msgid "6"
+#~ msgstr "6"
+
+#~ msgid "7"
+#~ msgstr "7"
+
+#~ msgid "8"
+#~ msgstr "8"
+
+#~ msgid "9"
+#~ msgstr "9"
+
+#, fuzzy
+#~ msgid "&Preview..."
+#~ msgstr " Podgląd"
+
+#, fuzzy
+#~ msgid "Preview..."
+#~ msgstr " Podgląd"
+
+#, fuzzy
+#~ msgid "The vertical offset relative to the paragraph."
+#~ msgstr "Domyślny styl dla następnego paragrafu."
+
+#~ msgid "&Save..."
+#~ msgstr "&Zapisz..."
+
+#~ msgid "About "
+#~ msgstr "O"
+
+#~ msgid "All files (*.*)|*"
+#~ msgstr "Wszystkie pliki (*.*)|*"
+
+#~ msgid "Cannot initialize SciTech MGL!"
+#~ msgstr "Nie można zainicjować SciTech MGL!"
+
+#~ msgid "Cannot initialize display."
+#~ msgstr "Nie można zainicjować obsługi wyświetlania."
+
+#~ msgid "Cannot start thread: error writing TLS"
+#~ msgstr "Nie można wystartować wątku: błąd zapisu TLS"
+
+#~ msgid "Close\tAlt-F4"
+#~ msgstr "Zamknij\tAlt-F4"
+
+#~ msgid "Couldn't create cursor."
+#~ msgstr "Nie można utworzyć kursora."
+
+#~ msgid "Directory '%s' doesn't exist!"
+#~ msgstr "Katalog '%s' nie istnieje!"
+
+#~ msgid "File %s does not exist."
+#~ msgstr "Plik %s nie istnieje."
+
+# sprawdzić "tryb", może "nie jest", "nie" - razem czy osobno,
+#~ msgid "Mode %ix%i-%i not available."
+#~ msgstr "Tryb %ix%i-%i nie jest dostępny."
+
+#~ msgid "Paper Size"
+#~ msgstr "Rozmiar papieru"
+
+#~ msgid "%.*f GB"
+#~ msgstr "%.*f GB"
+
+#~ msgid "%.*f MB"
+#~ msgstr "%.*f MB"
+
+#~ msgid "%.*f TB"
+#~ msgstr "%.*f TB"
+
+#~ msgid "%.*f kB"
+#~ msgstr "%.*f kB"
+
+#~ msgid "%s"
+#~ msgstr "%s"
+
+#~ msgid "%s B"
+#~ msgstr "%s B"
+
+#~ msgid "&Goto..."
+#~ msgstr "&Przejdź do..."
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">>|"
+#~ msgstr ">>|"
+
+#~ msgid "Added item is invalid."
+#~ msgstr "Dodana pozycja jest nieprawidłowa."
+
+#~ msgid "Archive doesnt contain #SYSTEM file"
+#~ msgstr "Archiwum nie zawiera pliku #SYSTEM"
+
+#~ msgid "BIG5"
+#~ msgstr "BIG5"
+
+#~ msgid "Can't check image format of file '%s': file does not exist."
+#~ msgstr ""
+#~ "Nie można sprawdzić formatu graficznego pliku '%s': plik nie istnieje."
+
+#~ msgid "Can't load image from file '%s': file does not exist."
+#~ msgstr "Nie można wczytać obrazu z pliku '%s': plik nie istnieje."
+
+# units --> ?
+#~ msgid "Cannot convert dialog units: dialog unknown."
+#~ msgstr ""
+#~ "Nie można wykonać konwersji okien dialogowych: nieznane okno dialogowe."
+
+#~ msgid "Cannot convert from the charset '%s'!"
+#~ msgstr "Nie można dokonać konwersji z tablicy '%s'!"
+
+#~ msgid "Cannot find container for unknown control '%s'."
+#~ msgstr "NIe można znaleźć kontenera dla nieznanej kontrolki '%s'."
+
+#~ msgid "Cannot find font node '%s'."
+#~ msgstr "Nie można znaleźć węzła czcionki '%s'."
+
+#~ msgid "Cannot open file '%s'."
+#~ msgstr "Nie można otworzyć pliku '%s'."
+
+#~ msgid "Cannot parse coordinates from '%s'."
+#~ msgstr "Nie można wyciągnąć koordynatów z '%s'."
+
+#~ msgid "Cannot parse dimension from '%s'."
+#~ msgstr "Nie można wyciągnąć wymiaru z '%s'."
+
+#~ msgid "Cant create the thread event queue"
+#~ msgstr "Nie można utworzyć kolejki zdarzeń wątku"
+
+#~ msgid "Changed item is invalid."
+#~ msgstr "Zmieniona pozycja jest nieprawidłowa."
+
+#~ msgid "Click to cancel this window."
+#~ msgstr "Kliknij, aby anulować to okno."
+
+#~ msgid "Click to confirm your selection."
+#~ msgstr "Kliknij, aby potwierdzić wybór."
+
+#~ msgid "Column does not have a renderer."
+#~ msgstr "Kolumna nie ma rendera."
+
+#~ msgid "Column pointer must not be NULL."
+#~ msgstr "Wskaźnik kolumny nie może być ZERO."
+
+#~ msgid "Column's model column has no equivalent in the associated model."
+#~ msgstr "Kolumna modelu kolumny nie ma odpowiednika w powiązanym modelu."
+
+#~ msgid "Control is wrongly initialized."
+#~ msgstr "Kontrola jest niesłusznie zainicjalizowana."
+
+#~ msgid "Could not add column to internal structures."
+#~ msgstr "Nie można dodać kolumny do wewnętrznych struktur."
+
+#~ msgid "Could not unlock mutex"
+#~ msgstr "Nie odblokowano muteksu"
+
+#~ msgid "Data view control is not correctly initialized"
+#~ msgstr "Widok kontroli danych nie jest poprawnie inicjowany"
+
+#~ msgid "Error while waiting on semaphore"
+#~ msgstr "Błąd oczekiwania na semafor"
+
+#~ msgid "Failed to connect to session manager: %s"
+#~ msgstr "Nie udało połączyć się do menedżera sesji: %s"
+
+#~ msgid "Failed to create a status bar."
+#~ msgstr "Nie udało się utworzyć paska statusu."
+
+#~ msgid "Failed to register OpenGL window class."
+#~ msgstr "Nie udała się rejestracja klasy okna OpenGL."
+
+#~ msgid "Fatal error"
+#~ msgstr "Błąd krytyczny "
+
+#~ msgid "Fatal error: "
+#~ msgstr "Błąd krytyczny: "
+
+#~ msgid "GB-2312"
+#~ msgstr "GB-2312"
+
+#~ msgid "Go forward to the next HTML page"
+#~ msgstr "Przejdź do następnej strony HTML"
+
+#~ msgid "Goto Page"
+#~ msgstr "Skocz do strony"
+
+#~ msgid ""
+#~ "HTML pagination algorithm generated more than the allowed maximum number "
+#~ "of pages and it can't continue any longer!"
+#~ msgstr ""
+#~ "Algorytm paginacji HTML generował więcej niż dozwoloną maksymalną liczbę "
+#~ "stron i nie może być dłużej kontynuowany!"
+
+#~ msgid "Help : %s"
+#~ msgstr "Pomoc : %s"
+
+#~ msgid "I64"
+#~ msgstr "I64"
+
+#~ msgid "Internal error, illegal wxCustomTypeInfo"
+#~ msgstr "Błąd wewnętrzny, nieprawidłowości w wxCustomTypeInfo"
+
+# korzenia?
+#~ msgid "Invalid XRC resource '%s': doesn't have root node 'resource'."
+#~ msgstr "Nieprawidłowy zasób XRC '%s': brakuje głównego węzła 'resource'."
+
+#~ msgid "No handler found for XML node '%s', class '%s'!"
+#~ msgstr "Brak procedury obsługi dla węzła XML '%s', klasa '%s'!"
+
+#~ msgid "No image handler for type %ld defined."
+#~ msgstr "Brak procedury obsługi obrazów typu %ld."
+
+#~ msgid "No model associated with control."
+#~ msgstr "Nie ma modelu powiązanego z kontrolą."
+
+#~ msgid "Owner not initialized."
+#~ msgstr "Właściciel niezainicjowany."
+
+#~ msgid "Passed item is invalid."
+#~ msgstr "Ostatni element jest nieprawidłowy."
+
+#~ msgid "Passing a already registered object to SetObjectName"
+#~ msgstr "Przekazano już zarejestrowany obiekt do funkcji SetObjectName"
+
+#~ msgid "Preparing help window..."
+#~ msgstr "Przygotowanie okna pomocy..."
+
+#~ msgid "Program aborted."
+#~ msgstr "Program przerwany."
+
+#~ msgid "Referenced object node with ref=\"%s\" not found!"
+#~ msgstr "Nie znalezione węzła obiektu, do którego odwołuje się ref=\"%s\"!"
+
+#~ msgid "Resource files must have same version number!"
+#~ msgstr "Pliki zasobów muszę mieć zgodny numer wersji!"
+
+#~ msgid "SHIFT-JIS"
+#~ msgstr "SHIFT-JIS"
+
+#~ msgid "Search!"
+#~ msgstr "Szukaj!"
+
+#~ msgid "Sorry, could not open this file for saving."
+#~ msgstr "Niestety nie można otworzyć tego pliku do zapisu."
+
+#~ msgid "Sorry, could not save this file."
+#~ msgstr "Niestety nie można zapisać tego pliku."
+
+#~ msgid "Sorry, print preview needs a printer to be installed."
+#~ msgstr "Niestety, podgląd wydruku wymaga zainstalowania drukarki."
+
+#~ msgid "Status: "
+#~ msgstr "Status: "
+
+#~ msgid ""
+#~ "Streaming delegates for not already streamed objects not yet supported"
+#~ msgstr ""
+#~ "Delegacja w strumieniu dlaobiektu który nie jest już w strumieniu nie "
+#~ "jest jeszcze wspierana"
+
+#~ msgid "Subclass '%s' not found for resource '%s', not subclassing!"
+#~ msgstr "Nie znaleziono podklasy '%s' dla zasobu '%s', bez podklas!"
+
+#~ msgid "TIFF library error."
+#~ msgstr "Błąd biblioteki TIFF."
+
+#~ msgid "TIFF library warning."
+#~ msgstr "Ostrzeżenie biblioteki TIFF."
+
+#~ msgid ""
+#~ "The file '%s' couldn't be opened.\n"
+#~ "It has been removed from the most recently used files list."
+#~ msgstr ""
+#~ "Nie można otworzyć pliku '%s'.\n"
+#~ "Informacja o nim została usunięta z listy ostatnio używanych plików."
+
+#~ msgid "The path '%s' contains too many \"..\"!"
+#~ msgstr "Ścieżka '%s' zawiera za dużo \"..\"!"
+
+#~ msgid "Trying to solve a NULL hostname: giving up"
+#~ msgstr "próba użycia niezdefiniowej (NULL) nazwy serwera: rezygnacja"
+
+#~ msgid "Unknown style flag "
+#~ msgstr "Nieznana flaga stylu"
+
+#~ msgid "Warning"
+#~ msgstr "Ostrzeżenie"
+
+#~ msgid "Windows 2000 (build %lu"
+#~ msgstr "Windows 2000 (kompilacja %lu"
+
+#~ msgid "XRC resource '%s' (class '%s') not found!"
+#~ msgstr "Nie znaleziono zasobu XRC '%s' (klasa '%s')!"
+
+#~ msgid "XRC resource: Cannot create animation from '%s'."
+#~ msgstr "Zasoby XRC: Nie można utworzyć animacji z '%s'."
+
+#~ msgid "XRC resource: Cannot create bitmap from '%s'."
+#~ msgstr "Zasoby XRC: Nie można utworzyć mapy bitowej z '%s'."
+
+#~ msgid ""
+#~ "XRC resource: Incorrect colour specification '%s' for attribute '%s'."
+#~ msgstr ""
+#~ "Zasoby XRC: Nieprawidłowa specyfikacja koloru '%s' dla atrybutu '%s'."
+
+#~ msgid "[EMPTY]"
+#~ msgstr "[PUSTY]"
+
+# catalog file --> ?
+# domain --> ?
+#~ msgid "catalog file for domain '%s' not found."
+#~ msgstr "Nie znaleziono pliku katalogowego dla domeny '%s'."
+
+#~ msgid "delegate has no type info"
+#~ msgstr "brak informacji o delegowanym typie"
+
+#~ msgid "encoding %i"
+#~ msgstr "kodowanie %i"
+
+# w ścieżce - nieładne
+#~ msgid "looking for catalog '%s' in path '%s'."
+#~ msgstr "szukanie katalogu '%s' w ścieżce '%s'."
+
+#~ msgid "m_peer is not or incorrectly initialized"
+#~ msgstr "m_peer nie jest lub nieprawidłowo zainicjowany"
+
+#~ msgid "wxRichTextFontPage"
+#~ msgstr "wxRichTextFontPage"
+
+#~ msgid "wxSearchEngine::LookFor must be called before scanning!"
+#~ msgstr "wxSearchEngine::LookFor musi być wywołane przed skanowaniem!"
+
+#~ msgid "wxSocket: invalid signature in ReadMsg."
+#~ msgstr "wxSocket: błędna sygnatura w ReadMsg."
+
+#~ msgid "wxSocket: unknown event!."
+#~ msgstr "wxSocket: nieznane zdarzenie!"
+
+#~ msgid "|<<"
+#~ msgstr "|<<"
+
+#~ msgid "\t%s: %s\n"
+#~ msgstr "\t%s: %s\n"
+
+#, fuzzy
+#~ msgid " Couldn't create the UnicodeConverter"
+#~ msgstr "Nie można utworzyć stopera"
+
+#~ msgid "#define %s must be an integer."
+#~ msgstr "#define %s musi być liczbą całkowitą."
+
+#~ msgid "%s not a bitmap resource specification."
+#~ msgstr "%s nie jest specyfikacją zasobu mapy bitowej."
+
+#~ msgid "%s not an icon resource specification."
+#~ msgstr "%s nie jest specyfikacją zasobu ikony."
+
+#~ msgid "%s: ill-formed resource file syntax."
+#~ msgstr "%s: błędna składnia pliku zasobu."
+
+#~ msgid "&Open"
+#~ msgstr "&Otwórz"
+
+#~ msgid "&Print"
+#~ msgstr "&Drukuj"
+
+#~ msgid "*** A debug report has been generated\n"
+#~ msgstr "*** Raport błędów został wygenerowany\n"
+
+#~ msgid "*** It can be found in \"%s\"\n"
+#~ msgstr "*** Znajduje się w \"%s\"\n"
+
+#~ msgid ""
+#~ ", expected static, #include or #define\n"
+#~ "while parsing resource."
+#~ msgstr ""
+#~ ", oczekiwano static, #include or #define\n"
+#~ "podczas przetwarzania zasobu."
+
+#~ msgid "Bitmap resource specification %s not found."
+#~ msgstr "Nie znaleziono specyfikacji %s zasobu mapy bitowej."
+
+#~ msgid ""
+#~ "Could not resolve control class or id '%s'. Use (non-zero) integer "
+#~ "instead\n"
+#~ " or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "Nie rozpoznano klasy lub identyfikatora '%s'. Użyj (niezerową) liczbę "
+#~ "całkowitą \n"
+#~ " lub #define (szukaj szczegółów w dokumentacji)"
+
+#~ msgid ""
+#~ "Could not resolve menu id '%s'. Use (non-zero) integer instead\n"
+#~ "or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "Nie rozpoznano identyfikatora menu '%s'. Użyj (niezerową) liczbę "
+#~ "całkowitą \n"
+#~ " lub #define (szukaj szczegółów w dokumentacji)"
+
+#, fuzzy
+#~ msgid "Couldn't end the context on the overlay window"
+#~ msgstr "Nie można pobrać wskaźnika aktualnego wątku"
+
+#~ msgid "Expected '*' while parsing resource."
+#~ msgstr "Przetwarzając zasób oczekiwano '*'."
+
+#~ msgid "Expected '=' while parsing resource."
+#~ msgstr "Przetwarzając zasób oczekiwano '='."
+
+#~ msgid "Expected 'char' while parsing resource."
+#~ msgstr "Przetwarzając zasób oczekiwano 'char'."
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "Brak zasobu XBM %s.\n"
+#~ "Nie wywołano wxResourceLoadBitmapData?"
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadIconData?"
+#~ msgstr ""
+#~ "Brak zasobu XBM %s.\n"
+#~ "Nie wywołano wxResourceLoadIconData?"
+
+#~ msgid ""
+#~ "Failed to find XPM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "Brak zasobu XBM %s.\n"
+#~ "Nie wywołano wxResourceLoadBitmapData?"
+
+#~ msgid "Failed to get clipboard data."
+#~ msgstr "Nie udało się pobrać danych ze schowka."
+
+# shared -->?
+#~ msgid "Failed to load shared library '%s' Error '%s'"
+#~ msgstr "Nie udało się wczytać biblioteki '%s': błąd '%s'"
+
+#~ msgid "Found "
+#~ msgstr "Znaleziono "
+
+#~ msgid "Icon resource specification %s not found."
+#~ msgstr "Specyfikacja zasobu ikony %s nie znaleziona."
+
+#~ msgid "Ill-formed resource file syntax."
+#~ msgstr "Błędna składnia pliku zasobu"
+
+#~ msgid "Long Conversions not supported"
+#~ msgstr "Konwersja typu 'Long' nie jest wspierana."
+
+#~ msgid "No XPM icon facility available!"
+#~ msgstr "Brak wsparcia dla ikon XPM!"
+
+#~ msgid "Option '%s' requires a value, '=' expected."
+#~ msgstr "Opcja '%s' wymaga wartości, oczekiwane: '='."
+
+#, fuzzy
+#~ msgid "Select all"
+#~ msgstr "&Zaznacz wszystko"
+
+#~ msgid "String conversions not supported"
+#~ msgstr "Konwersja tekstu nie jest wspierana"
+
+#~ msgid "Unexpected end of file while parsing resource."
+#~ msgstr "Nieoczekiwany koniec pliku podczas przetwarzania zasobu."
+
+#~ msgid "Unrecognized style %s while parsing resource."
+#~ msgstr "Nierozpoznany styl %s podczas przetwarzania zasobu."
+
+#~ msgid "Video Output"
+#~ msgstr "Wyjście Video"
+
+#~ msgid "Warning: attempt to remove HTML tag handler from empty stack."
+#~ msgstr ""
+#~ "Ostrzeżenie: próba usunięcia procedury obsługi znacznika HTML z pustego "
+#~ "stosu."
+
+# ustalić? ustanowić?
+#~ msgid "establish"
+#~ msgstr "nawiązać"
+
+#~ msgid "initiate"
+#~ msgstr "zainicjować"
+
+#~ msgid "invalid eof() return value."
+#~ msgstr "błędna wartość znacznika końca pliku."
+
+#~ msgid "unknown line terminator"
+#~ msgstr "nieznany znacznik końca linii"
+
+#~ msgid "writing"
+#~ msgstr "zapisu"
+
+#~ msgid "."
+#~ msgstr "."
+
+#~ msgid "Cannot open URL '%s'"
+#~ msgstr "Nie można otworzyć URL '%s'"
+
+#~ msgid "Error "
+#~ msgstr "Błąd "
+
+#~ msgid "Failed to create directory %s/.gnome."
+#~ msgstr "Nie udało się utworzyć katalogu %s/.gnome"
+
+#~ msgid "Failed to create directory %s/mime-info."
+#~ msgstr "Nie udało się utworzyć katalogu %s/mime-info."
+
+#~ msgid "MP Thread Support is not available on this System"
+#~ msgstr "MP Thread Support jest niedostępny w tym systemie"
+
+#~ msgid "Mailcap file %s, line %d: incomplete entry ignored."
+#~ msgstr "Plik mailcap %s, linia %d: zignorowano niekompletny wpis."
+
+#~ msgid "Mime.types file %s, line %d: unterminated quoted string."
+#~ msgstr "Plik typów mime %s, linia %d: brak zamykającego cudzysłowu."
+
+#~ msgid "Unknown field in file %s, line %d: '%s'."
+#~ msgstr "Nieznane pole w pliku %s, linia %d: '%s'."
+
+#~ msgid "bold "
+#~ msgstr "pogrubiony "
+
+#~ msgid "can't query for GUI plugins name in console applications"
+#~ msgstr ""
+#~ "nie można pobierać nazw wtyczek interfejsu graficznego w aplikacji "
+#~ "przeznaczonej dla trybu tekstowego"
+
+#~ msgid "light "
+#~ msgstr "lekki "
+
+#~ msgid "underlined "
+#~ msgstr "podkreślony "
+
+#~ msgid "unsupported zip archive"
+#~ msgstr "niewspierane archiwum zip"
+
+#, fuzzy
+#~ msgid ""
+#~ "Failed to get stack backtrace:\n"
+#~ "%s"
+#~ msgstr "Nie udało się usyskać listy ISP: %s"
+
+#~ msgid "Loading Grey Ascii PNM image is not yet implemented."
+#~ msgstr "Ładowanie obrazów Grey Ascii PNM nie jest jeszcze zaimplementowane."
+
+#~ msgid "Loading Grey Raw PNM image is not yet implemented."
+#~ msgstr "Ładowanie obrazów Grey Raw PNM nie jest jeszcze zaimplementowane."
+
+#, fuzzy
+#~ msgid "Cannot wait on thread to exit."
+#~ msgstr "Nie można czekać na zakończenie wątku"
+
+#~ msgid "Could not load Rich Edit DLL '%s'"
+#~ msgstr "Nie można wczytać biblioteki Rich Edit '%s'"
+
+#~ msgid "ZIP handler currently supports only local files!"
+#~ msgstr "Obsługiwane są tylko lokalne pliki ZIP!"
+
+#, fuzzy
+#~ msgid ""
+#~ "can't seek on file descriptor %d, large files support is not enabled."
+#~ msgstr "nie można ustawić pozycji w deskryptorze pliku %d"
+
+#~ msgid "More..."
+#~ msgstr "Więcej..."
+
+#~ msgid "Setup"
+#~ msgstr "Ustawienia"
+
+#~ msgid "/#SYSTEM"
+#~ msgstr "/#SYSTEM"
+
+#~ msgid "Backward"
+#~ msgstr "Wstecz"
+
+#~ msgid "GetUnusedColour:: No Unused Color in image "
+#~ msgstr "Brak wolnych kolorów w obrazie (GetUnusedColour)"
diff --git a/cadxcore/lang/pt/cadxcore.mo b/cadxcore/lang/pt/cadxcore.mo
new file mode 100644
index 0000000..0d6d2c2
Binary files /dev/null and b/cadxcore/lang/pt/cadxcore.mo differ
diff --git a/cadxcore/lang/pt/cadxcore.po b/cadxcore/lang/pt/cadxcore.po
new file mode 100644
index 0000000..eca9325
--- /dev/null
+++ b/cadxcore/lang/pt/cadxcore.po
@@ -0,0 +1,7416 @@
+# Portuguese translation for ginkgocadx
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the ginkgocadx package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-06-11 15:51+0100\n"
+"PO-Revision-Date: 2014-06-11 15:51+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Brazilian Portuguese <pt_BR at li.org>\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-Bookmarks: -1,-1,-1,-1,-1,-1,-1,296,-1,-1\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: ..\\..\n"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr "P/B"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr "P/B Inverso"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr "Cardiaco"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Red Vessels"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "Hot Metal"
+msgstr "Tema Metal"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Green"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "GE Color"
+msgstr "Cor"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PET"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "P-Value"
+msgstr "Valor padrão"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr ""
+
+#: ..\../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#: ..\../api/dicom/idicomconformance.cpp:214
+#: ..\../api/dicom/idicomconformance.cpp:220
+#, fuzzy
+msgid "GIL/DICOM/Conformance"
+msgstr "Arquivo de conformidade DICOM inválido"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#, fuzzy
+msgid "Unable to add supported transfer syntax "
+msgstr " . Sintaxe de transferência não exite no modelo: Adicione-a primeiro."
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid " to SOP Class "
+msgstr " para classe SOP "
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr " . Sintaxe de transferência não exite no modelo: Adicione-a primeiro."
+
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr " . Classe SOP não existe no modelo: Adicione-a primeiro."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#, fuzzy
+msgid "Unable to add supported SOP Class "
+msgstr " . Classe SOP não existe no modelo: Adicione-a primeiro."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " to Modality "
+msgstr " para a modalidade "
+
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr " . Modalidade não existe no modelo: Adicione-a primeiro."
+
+#: ..\../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr "Erro ao carregar o arquivo de Conformidade DICOM"
+
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr "Arquivo de conformidade DICOM inválido"
+
+#: ..\../api/iannotator.cpp:97
+msgid "Slice"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "of"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "Volume"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:110
+msgid "Image without metric information"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:119
+msgid "Slice thickness"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:127
+#, fuzzy
+msgid "Slice location"
+msgstr "Configurar localização"
+
+#: ..\../api/iannotator.cpp:139
+msgid "Scale"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:147
+#, fuzzy
+msgid "Right"
+msgstr "Di&reita"
+
+#: ..\../api/iannotator.cpp:149
+#, fuzzy
+msgid "Left"
+msgstr "&Esquerda"
+
+#: ..\../api/iannotator.cpp:219
+#, fuzzy
+msgid "Position:"
+msgstr "A posição de tabulação."
+
+#: ..\../api/iannotator.cpp:272
+#, fuzzy
+msgid "Value:"
+msgstr "Valor padrão"
+
+#: ..\../api/iexception.cpp:52
+msgid "Exception in component"
+msgstr ""
+
+#: ..\../api/initwx.cpp:439
+#, fuzzy
+msgid "Initializing environment ..."
+msgstr "Configurando ambiente ..."
+
+#: ..\../api/initwx.cpp:446 ..\../api/initwx.cpp:447 ..\../api/initwx.cpp:448
+#: ..\../api/initwx.cpp:449 ..\../api/initwx.cpp:450 ..\../api/initwx.cpp:451
+#: ..\../api/initwx.cpp:452 ..\../api/initwx.cpp:453
+msgid "Ginkgo CADx restrictions"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr ""
+
+#: ..\../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr "Número máximo de abas aberto"
+
+#: ..\../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr ""
+
+#: ..\../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr ""
+
+#: ..\../api/initwx.cpp:451
+msgid "Export images"
+msgstr "Export images"
+
+#: ..\../api/initwx.cpp:452
+#, fuzzy
+msgid "Acquire DICOM files"
+msgstr "Adquirir de um diretório DICOM"
+
+#: ..\../api/initwx.cpp:453
+#, fuzzy
+msgid "Import files to DICOM format"
+msgstr "Este arquivo não tem formato DICOM:"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+#, fuzzy
+msgid "Online manual"
+msgstr "Online support"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+#, fuzzy
+msgid "URL of manual"
+msgstr "Erro ao conectar-se a url"
+
+#: ..\../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "Online support"
+msgstr "Online support"
+
+#: ..\../api/initwx.cpp:459
+#, fuzzy
+msgid "URL of online support"
+msgstr "Online support"
+
+#: ..\../api/initwx.cpp:459
+#, fuzzy
+msgid "http://ginkgo-cadx.com/"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../api/initwx.cpp:460 ..\../api/initwx.cpp:461
+#, fuzzy
+msgid "Program Updates"
+msgstr "Verificando atualizações para o programa..."
+
+#: ..\../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr ""
+
+#: ..\../api/initwx.cpp:461
+#, fuzzy
+msgid "Update period (days)"
+msgstr "Marcar para adicionar um ponto a seguir ao marcador."
+
+#: ..\../api/initwx.cpp:462
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr ""
+
+#: ..\../api/initwx.cpp:462
+#, fuzzy
+msgid "Setup Security"
+msgstr "Configurar..."
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup"
+msgstr "Exibir ao iniciar"
+
+#: ..\../api/initwx.cpp:463
+#, fuzzy
+msgid "Show on startup default value"
+msgstr "Exibir ao iniciar"
+
+#: ..\../api/initwx.cpp:465 ..\../api/initwx.cpp:466
+#: ..\../main/gui/history3/historypanel3.cpp:328
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr ""
+
+#: ..\../api/initwx.cpp:465
+#, fuzzy
+msgid "Settings menu"
+msgstr "MENU"
+
+#: ..\../api/initwx.cpp:466
+#, fuzzy
+msgid "License menu"
+msgstr "MENU"
+
+#: ..\../api/initwx.cpp:467 ..\../api/initwx.cpp:468 ..\../api/initwx.cpp:469
+#: ..\../api/initwx.cpp:470 ..\../api/initwx.cpp:471 ..\../api/initwx.cpp:472
+#: ..\../api/initwx.cpp:473 ..\../api/initwx.cpp:474
+#, fuzzy
+msgid "PACS Limits"
+msgstr "Adquirir imagens de um PACS"
+
+#: ..\../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr ""
+
+#: ..\../api/initwx.cpp:468
+#, fuzzy
+msgid "Upload images to a PACS server"
+msgstr "Adquirir imagens de um PACS"
+
+#: ..\../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr "Adquirir imagens de um PACS"
+
+#: ..\../api/initwx.cpp:470
+#, fuzzy
+msgid "Enable remote PACS configuration"
+msgstr "Erro: Configuração do PACS não encontrada: "
+
+#: ..\../api/initwx.cpp:471
+#, fuzzy
+msgid "Enable TLS configuration"
+msgstr "Erro ao configurar TLS: "
+
+#: ..\../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr ""
+
+#: ..\../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr ""
+
+#: ..\../api/initwx.cpp:475 ..\../api/initwx.cpp:476 ..\../api/initwx.cpp:477
+#: ..\../api/initwx.cpp:478 ..\../api/initwx.cpp:479 ..\../api/initwx.cpp:480
+#, fuzzy
+msgid "Import"
+msgstr "Tem certeza que quer cancelar o processo de importação?"
+
+#: ..\../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:476
+#, fuzzy
+msgid "Show accession number input"
+msgstr "Numero de Acesso"
+
+#: ..\../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483 ..\../api/initwx.cpp:484 ..\../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:485
+msgid "Default ORU template"
+msgstr "Default ORU template"
+
+#: ..\../api/initwx.cpp:488 ..\../api/initwx.cpp:489 ..\../api/initwx.cpp:491
+#: ..\../api/initwx.cpp:493 ..\../api/initwx.cpp:494 ..\../api/initwx.cpp:495
+#: ..\../api/initwx.cpp:496 ..\../api/initwx.cpp:498
+#, fuzzy
+msgid "Style"
+msgstr "E&stilo:"
+
+#: ..\../api/initwx.cpp:503
+#, fuzzy, c-format
+msgid "Download %s images"
+msgstr "Export images"
+
+#: ..\../api/initwx.cpp:504 ..\../api/initwx.cpp:508
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+#, fuzzy
+msgid "PACS"
+msgstr "Adquirir imagens de um PACS"
+
+#: ..\../api/initwx.cpp:507
+#, fuzzy
+msgid "Download all modalities"
+msgstr "Todos"
+
+#: ..\../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr "OpenGL"
+
+#: ..\../api/initwx.cpp:510
+msgid "Enable shaders"
+msgstr ""
+
+#: ..\../api/initwx.cpp:513
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+#, fuzzy
+msgid "Ginkgo Cloud"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../api/initwx.cpp:513
+msgid "Download from Ginkgo Cloud"
+msgstr ""
+
+#: ..\../api/initwx.cpp:560
+#, fuzzy
+msgid "Tools loading base ..."
+msgstr "A Abrir : "
+
+#: ..\../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:566
+#, fuzzy
+msgid "Loading plugins ..."
+msgstr "A Abrir : "
+
+#: ..\../api/initwx.cpp:580
+msgid "Unable to start GinkgoCADx:\n"
+msgstr ""
+
+#: ..\../api/initwx.cpp:580 ..\../api/initwx.cpp:621
+msgid "error"
+msgstr "erro"
+
+#: ..\../api/initwx.cpp:584
+#, fuzzy
+msgid "Loading resources ..."
+msgstr "A Abrir : "
+
+#: ..\../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:601
+msgid "Configuring environment ..."
+msgstr "Configurando ambiente ..."
+
+#: ..\../api/initwx.cpp:621
+#, fuzzy
+msgid "Failed to set permissions:\n"
+msgstr "Falha ao definir permissões do ficheiro temporário"
+
+#: ..\../api/initwx.cpp:634
+msgid "Updating ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:638
+msgid "Interpreting parameters ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:689
+#, fuzzy
+msgid "Error unregistering tools: "
+msgstr "Erro: "
+
+#: ..\../api/initwx.cpp:769
+msgid "Starting"
+msgstr ""
+
+#: ..\../api/ivista.cpp:36 ..\../commands/comandocarga.cpp:73
+#, fuzzy
+msgid "Loading..."
+msgstr "A Abrir : "
+
+#: ..\../api/iwidgets.cpp:268
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ..\../main/gui/import/pasosimportacionbase.cpp:151
+#, fuzzy
+msgid "Name"
+msgstr "Nome"
+
+#: ..\../api/iwidgets.cpp:285
+msgid "Area"
+msgstr "Área"
+
+#: ..\../api/iwidgets.cpp:302
+msgid "Perimeter"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:316
+#, fuzzy
+msgid "Travel (I)"
+msgstr "%i de %i"
+
+#: ..\../api/iwidgets.cpp:326
+msgid "Travel (M)"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#: ..\../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid "Error while running thread: "
+msgstr "Erro ao rodar a thread: "
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid " : "
+msgstr " : "
+
+#: ..\../api/threads/thread.cpp:120
+msgid "Internal error while running thread: "
+msgstr "Erro interno ao executar a thread: "
+
+#: ..\../api/widgetserializable.cpp:60
+msgid "Creation Date"
+msgstr "Data de criação"
+
+#: ..\../api/widgetserializable.cpp:65
+#, fuzzy
+msgid "Modification Date"
+msgstr "data"
+
+#: ..\../api/widgetserializable.cpp:68
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:40
+msgid "Physician"
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:55
+#: ..\../commands/pacsdownloadcommand.cpp:88
+#: ..\../commands/synchronizationcommand.cpp:70
+#, fuzzy
+msgid "Downloading files ..."
+msgstr "Ficheiros"
+
+#: ..\../commands/acquirefromurlcommand.cpp:69
+#: ..\../commands/synchronizationcommand.cpp:91
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, c-format
+msgid "Downloading file %d"
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:81
+#, fuzzy
+msgid "Error downloading file: "
+msgstr "Erro ao baixar estudo: "
+
+#: ..\../commands/acquirefromurlcommand.cpp:95
+#: ..\../commands/pacsdownloadcommand.cpp:114
+#: ..\../commands/synchronizationcommand.cpp:121
+msgid "Internal Error"
+msgstr "Erro Interno"
+
+#: ..\../commands/acquirefromurlcommand.cpp:115
+#, fuzzy
+msgid "Error downloading files: "
+msgstr "Erro ao baixar estudo: "
+
+#: ..\../commands/autocleaningcommand.cpp:62
+msgid "Cleaning dicomdir..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:67
+#, fuzzy
+msgid "Downloading files..."
+msgstr "Ficheiros"
+
+#: ..\../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:183
+#, fuzzy
+msgid "Unknown operation"
+msgstr "Operação não permitida."
+
+#: ..\../commands/cloudcommand.cpp:188
+msgid "Error in cloud operation. See log to get more details..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:249
+#, fuzzy
+msgid "Could to retrieve study."
+msgstr "Não foi possível localizar a tabulação para o id"
+
+#: ..\../commands/cloudcommand.cpp:260 ..\../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:262
+#, fuzzy
+msgid "Error retrieving study."
+msgstr "Erro ao carregar estudo: Erro Interno"
+
+#: ..\../commands/cloudcommand.cpp:271
+#, fuzzy
+msgid "Study successfully retrieved."
+msgstr "Erro ao carregar estudo: "
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "Speed"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "bytes/sec during"
+msgstr " bytes de "
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "seconds"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:275
+#, fuzzy
+msgid "Empty Response"
+msgstr "[VAZIO]"
+
+#: ..\../commands/cloudcommand.cpp:289
+#, fuzzy
+msgid "Extracting files..."
+msgstr "Extracting file..."
+
+#: ..\../commands/cloudcommand.cpp:313 ..\../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:383
+#, fuzzy
+msgid "Could to perform query."
+msgstr "Não foi possível localizar a tabulação para o id"
+
+#: ..\../commands/cloudcommand.cpp:396
+#, fuzzy
+msgid "Error perfoming the query."
+msgstr "Erro: "
+
+#: ..\../commands/cloudcommand.cpp:405
+msgid "Query successfully performed."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:472
+#, fuzzy
+msgid "Unknown JSon attribute:"
+msgstr "Desconhecido"
+
+#: ..\../commands/cloudcommand.cpp:482
+msgid "Error parsing JSon: "
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:515
+#: ..\../commands/openremovableunit.cpp:148 ..\../main/gui/open/abrir.cpp:119
+#: ..\../main/gui/open/abrir.cpp:159 ..\../main/gui/open/opendialogs.cpp:146
+msgid "Storing in the history..."
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:46
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:536
+msgid "Check Updates"
+msgstr "Verificar Atualizações"
+
+#: ..\../commands/comandoactualizaciones.cpp:136
+#, fuzzy
+msgid "Not enough parameters found on XML"
+msgstr "Create Parameter não encontrado nos Parâmetros RTTI declarados"
+
+#: ..\../commands/comandoactualizaciones.cpp:145
+#, fuzzy
+msgid "XML parsing internal error"
+msgstr "XML erro de verificação gramatical: '%s' na linha %d"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+#, fuzzy
+msgid "Error checking application updates"
+msgstr "Erro interno ao verificar atualizações"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+#, fuzzy
+msgid "Ginkgo CADx updates"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../commands/comandoactualizaciones.cpp:170
+msgid "Internal error checking updates"
+msgstr "Erro interno ao verificar atualizações"
+
+#: ..\../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:92 ..\../commands/comandocarga.cpp:96
+#, fuzzy
+msgid "Exception loading:"
+msgstr "A Abrir : "
+
+#: ..\../commands/comandocarga.cpp:100
+msgid "Study malformed or unsupported"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:129 ..\../commands/comandocarga.cpp:139
+msgid "Error loading study: "
+msgstr "Erro ao carregar estudo: "
+
+#: ..\../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr "Erro ao carregar estudo. Memória insuficiente"
+
+#: ..\../commands/comandocarga.cpp:144
+msgid "Error loading study."
+msgstr "Erro ao carregar estudo."
+
+#: ..\../commands/comandocarga.cpp:149
+#, fuzzy
+msgid "Load canceled by user"
+msgstr "carregar"
+
+#: ..\../commands/comandocarga.cpp:156
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+#: ..\../main/gui/history3/historypanel3.cpp:1063
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+msgid "Error loading study"
+msgstr "Erro ao carregar estudo"
+
+#: ..\../commands/comandoexportacion.cpp:81
+#: ..\../commands/exporttodicomdircommand.cpp:214
+#, fuzzy
+msgid "Exporting files..."
+msgstr "Ficheiros"
+
+#: ..\../commands/comandoexportacion.cpp:105
+#: ..\../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:158
+#, fuzzy, c-format
+msgid "Exporting file %d of %d"
+msgstr "impossível fechar o descritor do ficheiro %d"
+
+#: ..\../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr "Erro ao armazenar arquivo, verifique permissões do diretório."
+
+#: ..\../commands/comandoexportacion.cpp:233
+msgid "image_%m-%d-%Y_"
+msgstr "imagem_%d-%m-%Y_"
+
+#: ..\../commands/comandoincluirhistorial.cpp:108
+#, fuzzy
+msgid "Exploring directory ..."
+msgstr "Exploring drives..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:122
+#, fuzzy
+msgid "Reading DICOMDIR ..."
+msgstr "a ler"
+
+#: ..\../commands/comandoincluirhistorial.cpp:142
+#: ..\../commands/comandoincluirhistorial.cpp:156
+#: ..\../commands/comandoincluirhistorial.cpp:177
+#, fuzzy
+msgid "Including files in the history .."
+msgstr "Ficheiros"
+
+#: ..\../commands/comandoincluirhistorial.cpp:196
+#, fuzzy
+msgid "Exploring directory "
+msgstr "Exploring drives..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:256
+#: ..\../commands/linkhistorycommand.cpp:118
+#, fuzzy
+msgid "Image acquisition finished."
+msgstr "imagem"
+
+#: ..\../commands/comandoincluirhistorial.cpp:258
+#, c-format
+msgid "There have been included %d images."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:261
+#: ..\../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+"\n"
+"Existem %d erros (veja o log para descrição detalhada)"
+
+#: ..\../commands/comandoincluirhistorial.cpp:273
+#: ..\../commands/linkhistorycommand.cpp:133
+#, fuzzy
+msgid "This files doesn't exist:"
+msgstr " não existe"
+
+#: ..\../commands/comandoincluirhistorial.cpp:284
+#: ..\../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr "Este arquivo não tem formato DICOM:"
+
+#: ..\../commands/comandoincluirhistorial.cpp:296
+#: ..\../commands/linkhistorycommand.cpp:156
+#, fuzzy
+msgid "This files are Dicom Dirs:"
+msgstr "Overview data of DICOM files"
+
+#: ..\../commands/comandopacs.cpp:58 ..\../commands/pacsdownloadcommand.cpp:61
+#: ..\../commands/sendpacscommand.cpp:137
+msgid "There is not any Remote PACS configured"
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:84
+#, fuzzy
+msgid "Querying PACS ..."
+msgstr "Adquirir imagens de um PACS"
+
+#: ..\../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:98
+#, fuzzy
+msgid "Starting Search ..."
+msgstr "Procurar"
+
+#: ..\../commands/comandopacs.cpp:108
+#: ..\../commands/pacsdownloadcommand.cpp:101
+#, fuzzy
+msgid "Server ID not found. ID = "
+msgstr "<ID desconhecido>"
+
+#: ..\../commands/comandopacs.cpp:110 ..\../commands/comandopacs.cpp:112
+#: ..\../commands/comandopacs.cpp:114 ..\../commands/comandopacs.cpp:116
+#, fuzzy
+msgid "Query error with PACS Id "
+msgstr ""
+"\n"
+"Este ID de PACS está em uso"
+
+#: ..\../commands/comandopacs.cpp:116
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error"
+msgstr "Erro interno"
+
+#: ..\../commands/comandopacs.cpp:135
+#, fuzzy
+msgid "Failed to perform search: "
+msgstr "Procurar"
+
+#: ..\../commands/dbmigrationcommand.cpp:94
+#: ..\../commands/dbmigrationcommand.cpp:103
+#, fuzzy
+msgid "Migrating old DICOM Dir ..."
+msgstr "Diretório DICOM"
+
+#: ..\../commands/dbmigrationcommand.cpp:99
+#: ..\../commands/dbmigrationcommand.cpp:108
+#, fuzzy
+msgid "Including files ..."
+msgstr "Ficheiros"
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+#: ..\../commands/dicomizecommand.cpp:181
+#: ..\../commands/openremovableunit.cpp:74
+#: ..\../commands/openremovableunit.cpp:110
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../commands/pdfextractercommand.cpp:130
+#: ..\../main/controllers/historycontroller.cpp:447
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+#: ..\../main/controllers/historycontroller.cpp:1976
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ..\../main/gui/login/dialogologin.cpp:50
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ..\../main/gui/open/opendialogs.cpp:58
+#: ..\../main/gui/open/opendialogs.cpp:62
+#: ..\../main/gui/open/opendialogs.cpp:134
+#: ..\../main/gui/progress/statusbarprogreso.cpp:284
+#: ..\../main/gui/progress/statusbarprogreso.cpp:287
+#: ..\../main/gui/progress/statusbarprogreso.cpp:292
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#: ..\../main/gui/history3/openwithdialog.h:72
+#, fuzzy
+msgid "Info"
+msgstr "delegado não tem informação de tipo"
+
+#: ..\../commands/dbmigrationcommand.cpp:123
+msgid "Migration finisthed successfully"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:27
+#: ..\../commands/dialogopathssobreescribirbase.cpp:62
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+#, fuzzy
+msgid "Overwrite"
+msgstr "Não foi possível sobrepor o ficheiro '%s'"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:65
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ..\../main/gui/history3/historypanel3base.cpp:339
+#: ..\../main/gui/history3/historypanel3base.cpp:415
+#: ..\../main/gui/history3/historypanel3base.cpp:486
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ..\../main/gui/open/opendialogsbase.cpp:53
+#: ..\../main/gui/open/opendialogsbase.cpp:131
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ..\../widgets/gui/calibracionbase.cpp:86
+#: ..\../widgets/gui/selecciontextobase.cpp:60
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: ..\../commands/dicomizationcompletebase.cpp:24
+#: ..\../commands/dicomizationcompletebase.cpp:33
+#: ..\../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:56
+#, fuzzy
+msgid "Don't show this message again"
+msgstr "Mostrar Mensagem"
+
+#: ..\../commands/dicomizationcompletebase.cpp:62
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ..\../main/gui/history3/historypanel3base.cpp:411
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ..\../widgets/gui/calibracionbase.cpp:82
+#: ..\../widgets/gui/selecciontextobase.cpp:56
+msgid "Accept"
+msgstr "Aceitar"
+
+#: ..\../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:179
+#, fuzzy
+msgid "Import process failed:"
+msgstr "Falha no encerramento do processo %d"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:370
+#, fuzzy
+msgid "Unknown error in dicomization process"
+msgstr "erro desconhecido"
+
+#: ..\../commands/dicomizecommand.cpp:431
+#: ..\../commands/dicomizecommand.cpp:442
+#: ..\../commands/sendpacscommand.cpp:185
+#, fuzzy
+msgid "Error sending evidences:"
+msgstr "Erro ao enviar mensagem:"
+
+#: ..\../commands/dicomizecommand.cpp:437
+#: ..\../commands/dicomizecommand.cpp:448
+#, fuzzy
+msgid "Can not upload to the PACS:\n"
+msgstr ""
+"\n"
+"Este ID de PACS está em uso"
+
+#: ..\../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:261
+#: ..\../commands/exporttodicomdircommand.cpp:338
+#, fuzzy, c-format
+msgid "Exporting series %d of %d"
+msgstr "Página %d de %d"
+
+#: ..\../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:279
+#: ..\../commands/exporttodicomdircommand.cpp:385
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+msgid "There was an error creating directory"
+msgstr "Ocorreu um erro ao criar o diretório"
+
+#: ..\../commands/exporttodicomdircommand.cpp:303
+#: ..\../commands/exporttodicomdircommand.cpp:408
+#, fuzzy
+msgid "There was an error writing file"
+msgstr "ICO: Erro a escrever ficheiro de imagem!"
+
+#: ..\../commands/exporttodicomdircommand.cpp:358
+msgid "There was an error anonymizing files"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+#, fuzzy
+msgid "Ignoring incoming operation "
+msgstr "Operação não permitida."
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:298
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:473
+#: ..\../commands/pacsdownloadcommand.cpp:170
+#: ..\../commands/pacsdownloadcommand.cpp:179
+#, fuzzy
+msgid "Including files..."
+msgstr "Ficheiros"
+
+#: ..\../commands/linkhistorycommand.cpp:68
+#, fuzzy
+msgid "Linking study..."
+msgstr "Erro ao carregar estudo: "
+
+#: ..\../commands/openremovableunit.cpp:42
+#: ..\../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr "Exploring drives..."
+
+#: ..\../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:130
+msgid "Select drive you want to open"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+
+#: ..\../commands/pacsdownloadcommand.cpp:134
+msgid "Error downloading study: "
+msgstr "Erro ao baixar estudo: "
+
+#: ..\../commands/pdfextractercommand.cpp:103
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ..\../main/gui/progress/statusbarprogreso.cpp:278
+#: ..\../widgets/gui/calibracion.cpp:205 ..\../widgets/gui/calibracion.cpp:209
+#: ..\../widgets/gui/calibracion.cpp:219 ..\../widgets/gui/calibracion.cpp:225
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "Error"
+msgstr "Erro"
+
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:130
+msgid "PDF files extracted successfully..."
+msgstr ""
+
+#: ..\../commands/secondarycapturedicomizecommand.cpp:73
+#, fuzzy
+msgid "Ginkgo CADx Secondary Capture"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:73
+#, fuzzy
+msgid "Message successfully sent"
+msgstr "Erro ao enviar mensagem. Foi enviada "
+
+#: ..\../commands/sendhl7command.cpp:77
+#, fuzzy
+msgid "Unknown protocol"
+msgstr "Desconhecido"
+
+#: ..\../commands/sendhl7command.cpp:80 ..\../commands/sendhl7command.cpp:93
+#: ..\../commands/sendhl7command.cpp:145
+msgid "Error sending message:"
+msgstr "Erro ao enviar mensagem:"
+
+#: ..\../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr "Erro ao enviar mensagem HL7. Veja log para maiores detalhes"
+
+#: ..\../commands/sendhl7command.cpp:93 ..\../commands/sendhl7command.cpp:94
+msgid "Unknown error"
+msgstr "Erro desconhecido"
+
+#: ..\../commands/sendhl7command.cpp:134
+#, fuzzy
+msgid "Failed to start connection"
+msgstr "Falha ao %s a ligação telefónica: %s"
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid "Error sending message. It was sent "
+msgstr "Erro ao enviar mensagem. Foi enviada "
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr " bytes de "
+
+#: ..\../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:258
+#, fuzzy
+msgid "Failed delivery confirmation:"
+msgstr "Falha no fork"
+
+#: ..\../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:51
+#, fuzzy
+msgid "Send files to PACS"
+msgstr "Ficheiros"
+
+#: ..\../commands/sendpacscommand.cpp:155
+#, fuzzy
+msgid "Uploading files ..."
+msgstr "Erro ao carregar o estudo para o PACS: "
+
+#: ..\../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr "Erro: Configuração do PACS não encontrada: "
+
+#: ..\../commands/sendpacscommand.cpp:181
+msgid "Error:"
+msgstr "Erro:"
+
+#: ..\../commands/sendpacscommand.cpp:189
+msgid "Error sending evidences: Internal error."
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:203
+msgid "Error uploading the study to PACS: "
+msgstr "Erro ao carregar o estudo para o PACS: "
+
+#: ..\../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:206
+#, fuzzy
+msgid "Retry send to PACS"
+msgstr "Falha ao enviar aviso de notificação DDE"
+
+#: ..\../commands/synchronizationcommand.cpp:104
+#, fuzzy
+msgid "Error downloading file"
+msgstr "Erro ao baixar estudo: "
+
+#: ..\../commands/synchronizationcommand.cpp:141
+#, fuzzy
+msgid "Error synchronizing study: "
+msgstr "Erro ao carregar estudo: Erro Interno"
+
+#: ..\../commands/thumbnailscommand.cpp:107
+#: ..\../commands/thumbnailscommand.cpp:133
+#: ..\../commands/thumbnailscommand.cpp:247
+#: ..\../commands/thumbnailscommand.cpp:376
+#: ..\../commands/thumbnailscommand.cpp:382
+#: ..\../main/gui/import/selectimagesimportation.cpp:504
+#, fuzzy
+msgid "Creating Thumbnail..."
+msgstr "Criando Thumbnails..."
+
+#: ..\../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr ""
+
+#: ..\../export/tools/iaddfiletohistorytool.cpp:19
+#: ..\../main/gui/history3/historypanel3.cpp:632
+#, fuzzy
+msgid "Open study"
+msgstr "&Abrir"
+
+#: ..\../export/tools/iangletool.cpp:19
+msgid "Angle \tCtrl+A"
+msgstr ""
+
+#: ..\../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr ""
+
+#: ..\../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr ""
+
+#: ..\../export/tools/icolormaptool.cpp:20
+#, fuzzy
+msgid "Color Map"
+msgstr "BMP: Impossível escrever mapa de cores RGB."
+
+#: ..\../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ..\../main/gui/open/opendialogsbase.cpp:46
+#: ..\../main/gui/open/opendialogsbase.cpp:198
+#, fuzzy
+msgid "Copy"
+msgstr "&Copiar"
+
+#: ..\../export/tools/icornerannotationstool.cpp:20
+#, fuzzy
+msgid "Window annotations"
+msgstr "&Janela"
+
+#: ..\../export/tools/idetachwindowtool.cpp:19
+#, fuzzy
+msgid "Detach window"
+msgstr "&Janela"
+
+#: ..\../export/tools/iimageexporttool.cpp:19
+#, fuzzy
+msgid "Export image..."
+msgstr "imagem"
+
+#: ..\../export/tools/imarkertool.cpp:20
+msgid "Marking Tools \tCtrl+M"
+msgstr ""
+
+#: ..\../export/tools/imetricgridtool.cpp:20
+#, fuzzy
+msgid "Metric grid"
+msgstr "Grid organization"
+
+#: ..\../export/tools/inotetool.cpp:19
+msgid "Text Note \tCtrl+N"
+msgstr ""
+
+#: ..\../export/tools/ipacsuploadtool.cpp:19
+msgid "Upload study..."
+msgstr ""
+
+#: ..\../export/tools/ipixelsbluringtool.cpp:20
+msgid "Pixels blurring"
+msgstr ""
+
+#: ..\../export/tools/ipointertool.cpp:19
+msgid "Pointer \tEsc"
+msgstr ""
+
+#: ..\../export/tools/iqueryretrievetool.cpp:19
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#: ..\../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr "Acquire a DICOM study from PACS"
+
+#: ..\../export/tools/iresettool.cpp:19
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+msgid "Reset"
+msgstr ""
+
+#: ..\../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr ""
+
+#: ..\../export/tools/iruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: ..\../export/tools/isecondarycapturetool.cpp:19
+msgid "Save snapshot as new series..."
+msgstr ""
+
+#: ..\../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr ""
+
+#: ..\../export/tools/ishowtagstool.cpp:19
+#: ..\../main/tools/showtagshistorytool.cpp:27
+#, fuzzy
+msgid "DICOM inspector"
+msgstr "DICOM Inspector"
+
+#: ..\../export/tools/isimpleprinttool.cpp:19
+#: ..\../main/tools/simpleprinttool.cpp:226
+#, fuzzy
+msgid "Print"
+msgstr "&Imprimir"
+
+#: ..\../export/tools/istartdicomizationtool.cpp:19
+msgid "Dicomize..."
+msgstr ""
+
+#: ..\../export/tools/itoolpan.cpp:19
+msgid "Pan \tCtrl+P"
+msgstr ""
+
+#: ..\../export/tools/itoolslider.cpp:19
+#, fuzzy
+msgid "Slider \tCtrl+S"
+msgstr "%s (ou %s)"
+
+#: ..\../export/tools/itoolwindowlevel.cpp:19
+msgid "Window/Level \tCtrl+W"
+msgstr ""
+
+#: ..\../export/tools/itoolzoom.cpp:19
+#, fuzzy
+msgid "Zoom \tCtrl+O"
+msgstr "Ampl&iar"
+
+#: ..\../export/tools/itrackballtool.cpp:19
+#, fuzzy
+msgid "Trackball \tCtrl+T"
+msgstr "\t%s: %s\n"
+
+#: ..\../export/tools/iundotool.cpp:20 ..\../main/tools/undotool.cpp:109
+#, fuzzy
+msgid "Undo"
+msgstr "&Desfazer"
+
+#: ..\../export/tools/ivideotool.cpp:19
+#, fuzzy
+msgid "Video \tCtrl+Space"
+msgstr "SPACE"
+
+#: ..\../export/tools/iwindowlayouttool.cpp:20
+#, fuzzy
+msgid "Window layout"
+msgstr "&Janela"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+#, fuzzy
+msgid "Studies with"
+msgstr ""
+"Não foi possível esvaziar o histórico, você precisa fechar os estudos abertos"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr " componentes não suportados"
+
+#: ..\../main/controllers/controladorcarga.cpp:210
+#, fuzzy
+msgid "Reading properties"
+msgstr "&Propriedades"
+
+#: ..\../main/controllers/controladorcarga.cpp:219
+#: ..\../main/controllers/controladorcarga.cpp:642
+#: ..\../main/controllers/controladorcarga.cpp:888
+#: ..\../main/controllers/streaming/streamingloader.cpp:600
+msgid "Error reading the study: "
+msgstr "Erro ao ler o estudo: "
+
+#: ..\../main/controllers/controladorcarga.cpp:224
+#: ..\../main/controllers/controladorcarga.cpp:229
+#: ..\../main/controllers/controladorcarga.cpp:647
+#: ..\../main/controllers/controladorcarga.cpp:893
+msgid "Internal error reading the study: "
+msgstr "Erro interno ao ler o estudo: "
+
+#: ..\../main/controllers/controladorcarga.cpp:269
+#: ..\../main/controllers/controladorcarga.cpp:281
+#: ..\../main/controllers/controladorcarga.cpp:905
+#, fuzzy
+msgid "Spacing is not valid: ("
+msgstr "Espaçamento"
+
+#: ..\../main/controllers/controladorcarga.cpp:305
+#: ..\../main/controllers/controladorcarga.cpp:338
+#: ..\../main/controllers/controladorcarga.cpp:372
+#: ..\../main/controllers/controladorcarga.cpp:408
+#: ..\../main/controllers/controladorcarga.cpp:441
+#: ..\../main/controllers/controladorcarga.cpp:474
+#: ..\../main/controllers/controladorcarga.cpp:507
+#: ..\../main/controllers/controladorcarga.cpp:540
+#: ..\../main/controllers/controladorcarga.cpp:573
+#: ..\../main/controllers/controladorcarga.cpp:606
+#: ..\../main/controllers/controladorcarga.cpp:935
+#, fuzzy
+msgid "Error loading the study: Out of memory"
+msgstr "Erro ao carregar estudo. Memória insuficiente"
+
+#: ..\../main/controllers/controladorcarga.cpp:375
+msgid "Error loading the study: Internal Error"
+msgstr "Erro ao carregar estudo: Erro Interno"
+
+#: ..\../main/controllers/controladorcarga.cpp:630
+#: ..\../main/controllers/streaming/streamingloader.cpp:1023
+#: ..\../main/controllers/streaming/streamingloader.cpp:1223
+#: ..\../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr "Erro ao ler o estudo: Formato de pixel não suportado"
+
+#: ..\../main/controllers/controladorcarga.cpp:651
+#: ..\../main/controllers/controladorcarga.cpp:960
+#, fuzzy
+msgid "Process canceled by user."
+msgstr "Falha no encerramento do processo %d"
+
+#: ..\../main/controllers/controladorcarga.cpp:878
+#, fuzzy
+msgid "Interpreting properties"
+msgstr "&Propriedades"
+
+#: ..\../main/controllers/controladorcarga.cpp:917
+#, fuzzy
+msgid "Spacing of the image is invalid: ("
+msgstr "Índice inválido para imagem TIFF."
+
+#: ..\../main/controllers/controladorcarga.cpp:942
+#, fuzzy
+msgid "Reading dataset"
+msgstr "a ler"
+
+#: ..\../main/controllers/controladorcarga.cpp:951
+msgid "Error reading the study:"
+msgstr "Erro ao ler o estudo:"
+
+#: ..\../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr "Erro interno ao ler o estudo:"
+
+#: ..\../main/controllers/controladorcarga.cpp:972
+msgid "load"
+msgstr "carregar"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:40
+msgid "Stopping HL7 sender"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:63
+#: ..\../main/controllers/controladorenviohl7.cpp:76
+msgid "Error starting HL7 sender"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:65
+#: ..\../main/controllers/controladorenviohl7.cpp:78
+msgid "HL7 sender started"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:108
+msgid "HL7 controller destroyed"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:150
+#, fuzzy
+msgid "Error processing message"
+msgstr "Mensagem de erro"
+
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/controllers/pacscontroller.cpp:1549
+#: ..\../main/controllers/pacscontroller.cpp:1553
+#: ..\../main/controllers/pacscontroller.cpp:1557
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:184
+#, fuzzy
+msgid "Unknown"
+msgstr "Desconhecido"
+
+#: ..\../main/controllers/controladorextensiones.cpp:110
+#, fuzzy
+msgid "Loading"
+msgstr "A Abrir : "
+
+#: ..\../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:153
+#, fuzzy
+msgid "Could not find entry point"
+msgstr "Não foi possível localizar a tabulação para o id"
+
+#: ..\../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:74
+msgid "Integration engine hostname not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:77
+msgid "Integration engine port not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:91
+#, fuzzy
+msgid "Unsupported protocol"
+msgstr " componentes não suportados"
+
+#: ..\../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr "%d resultados foram encontrados"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, fuzzy, c-format
+msgid "Downloading file %d/%d"
+msgstr "impossível fechar o descritor do ficheiro %d"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+#, fuzzy
+msgid "Image format not supported"
+msgstr "PCX: formato de imagem não suportado"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr "Erro ao configurar TLS: "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:200
+#, fuzzy
+msgid "Receiving Association failed: "
+msgstr "Falha no fork"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:209
+msgid "Association received"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:210
+#, fuzzy
+msgid "Parameters:"
+msgstr "Create Parameter não encontrado nos Parâmetros RTTI declarados"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ")"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:274
+#, fuzzy
+msgid "No valid presentation contexts"
+msgstr "'%s' não é uma mensagem válida do catálogo."
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+#, fuzzy
+msgid "Association(dicom://"
+msgstr "DICOM nodes"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr "@"
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr " para "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, fuzzy, c-format
+msgid "Uploading file %d of %d"
+msgstr "impossível fechar o descritor do ficheiro %d"
+
+#: ..\../main/controllers/dicommanager.cpp:504
+#: ..\../main/controllers/dicommanager.cpp:531
+msgid "Extracting file..."
+msgstr "Extracting file..."
+
+#: ..\../main/controllers/historycontroller.cpp:323
+#, fuzzy
+msgid "Error creating history database "
+msgstr "Erro ao criar o banco de dados:\n"
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:343
+#, fuzzy
+msgid "Error creating dicomDir database "
+msgstr "Erro ao criar o banco de dados:\n"
+
+#: ..\../main/controllers/historycontroller.cpp:425
+#: ..\../main/controllers/historycontroller.cpp:441
+#, fuzzy
+msgid "Error creating thumbnails database "
+msgstr "Erro ao criar o banco de dados:\n"
+
+#: ..\../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr "Erro ao criar o banco de dados:\n"
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#, fuzzy
+msgid "Including image "
+msgstr "imagem"
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr " de "
+
+#: ..\../main/controllers/historycontroller.cpp:707
+#, fuzzy
+msgid "Linking image "
+msgstr "imagem"
+
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr "Erro ao ler histórico: \n"
+
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr ""
+
+#: ..\../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#, fuzzy
+msgid "Malformed template Id ("
+msgstr "XPM: Dados de pixeis mal formados!"
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+#, fuzzy
+msgid "Template Id unsupported ("
+msgstr " componentes não suportados"
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr ""
+"):\n"
+"Verifique a configuração e anexe-a se necessário"
+
+#: ..\../main/controllers/integrationcontroller.cpp:566
+#, fuzzy
+msgid "Unknown module Id ("
+msgstr "<ID desconhecido>"
+
+#: ..\../main/controllers/integrationcontroller.cpp:592
+#, fuzzy
+msgid "Empty configuration"
+msgstr "[VAZIO]"
+
+#: ..\../main/controllers/integrationcontroller.cpp:631
+msgid "XML Parser Not Found. Key="
+msgstr ""
+
+#: ..\../main/controllers/log4cplus/guiappender.cpp:75
+#, fuzzy
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr "%d/%m/%Y %H:%M:%S"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ..\../main/gui/history3/historypanel3base.cpp:48
+#: ..\../main/gui/import/pasosimportacionbase.cpp:227
+msgid "Patient"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#, fuzzy
+msgid "Patient ID"
+msgstr "<ID desconhecido>"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:86
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ..\../main/gui/history3/historypanel3.cpp:227
+#: ..\../main/gui/open/opendialogs.cpp:50
+#, fuzzy
+msgid "Modality"
+msgstr " para a modalidade "
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:98
+msgid "Dimensions"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:109
+#, fuzzy, c-format
+msgid "Made with %s"
+msgstr "%s (ou %s)"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:167
+#: ..\../main/controllers/modalitysettingscontroller.cpp:338
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr "Padrão"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1212
+#, fuzzy
+msgid "Downloading file"
+msgstr "&Ficheiro"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+#, fuzzy
+msgid "Error downloading WADO file"
+msgstr "Erro ao baixar estudo: "
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+#, fuzzy
+msgid "Check PACS configuration"
+msgstr "Erro: Configuração do PACS não encontrada: "
+
+#: ..\../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1428
+#, fuzzy
+msgid "Invalid HTTP response"
+msgstr "'%s' é inválido"
+
+#: ..\../main/controllers/pacscontroller.cpp:1433
+#, fuzzy
+msgid "Invalid HTTP code"
+msgstr "Código de &Caracter:"
+
+#: ..\../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1472
+#, fuzzy
+msgid "PACS-Service"
+msgstr "Adquirir imagens de um PACS"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:97
+#: ..\../main/controllers/parserxmlspanish.cpp:94
+#, fuzzy
+msgid "Omitted Identificator"
+msgstr "Identificator *"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:105
+#: ..\../main/controllers/parserxmlspanish.cpp:102
+#, fuzzy
+msgid "Omitted AET"
+msgstr "AET"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:113
+#: ..\../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:121
+#: ..\../main/controllers/parserxmlspanish.cpp:118
+#, fuzzy
+msgid "Omitted port"
+msgstr ""
+"\n"
+"A porta é muito grande"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:206
+#: ..\../main/controllers/parserxmlenglish.cpp:237
+#: ..\../main/controllers/parserxmlspanish.cpp:188
+#: ..\../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr "O tamanho do PDU não é um número válido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:212
+#: ..\../main/controllers/parserxmlspanish.cpp:194
+#, fuzzy
+msgid "Port is not a valid number"
+msgstr "O tamanho do PDU não é um número válido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:248
+#: ..\../main/controllers/parserxmlspanish.cpp:228
+#, fuzzy
+msgid "The port is not a valid number"
+msgstr "O tamanho do PDU não é um número válido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:265
+#: ..\../main/controllers/parserxmlspanish.cpp:246
+#, fuzzy
+msgid "Setting not found"
+msgstr "Encontrado "
+
+#: ..\../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:391
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:427
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:434
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:445
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:483
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:548
+#: ..\../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:552
+#: ..\../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:570
+#: ..\../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:340
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:402
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:438
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:445
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:486
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:524
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:559
+#, fuzzy
+msgid "id_application expected"
+msgstr "<ID desconhecido>"
+
+#: ..\../main/controllers/smartretrievecontroller.cpp:124
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:920
+#, fuzzy
+msgid "Downloading from PACS..."
+msgstr "Adquirir imagens de um PACS"
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:303
+#: ..\../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr "Erro interno ao ler o estudo, formato desconhecido "
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ..\../main/gui/history3/historytablemodel.cpp:403
+#: ..\../main/gui/history3/historytablemodel.cpp:415
+#: ..\../main/gui/history3/historytablemodel.cpp:470
+#: ..\../main/gui/history3/historytablemodel.cpp:482
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:102
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr "%d/%m/%Y %H:%M:%S"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr "%d/%m/%Y 00:00:00"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+#, fuzzy
+msgid "Exploring PACS..."
+msgstr "Exploring drives..."
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ..\../main/gui/history3/historypanel3.cpp:225
+#: ..\../main/gui/open/opendialogs.cpp:49
+#, fuzzy
+msgid "Patient id"
+msgstr "<ID desconhecido>"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ..\../main/gui/history3/historypanel3.cpp:224
+#: ..\../main/gui/open/opendialogs.cpp:48
+#, fuzzy
+msgid "Patient name"
+msgstr "Nome"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:479
+msgid "Study Instance UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ..\../main/gui/history3/historypanel3.cpp:231
+#: ..\../main/gui/open/opendialogs.cpp:53
+msgid "Accession number"
+msgstr "Numero de Acesso"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:481
+#, fuzzy
+msgid "Study date"
+msgstr "data"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:482
+#, fuzzy
+msgid "Study time"
+msgstr "Tempo passado : "
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:490
+#, fuzzy
+msgid "Series Instance UID"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:492
+#, fuzzy
+msgid "Series date"
+msgstr "data"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:493
+#, fuzzy
+msgid "Series time"
+msgstr "Tempo passado : "
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:519
+msgid "No results found"
+msgstr "Nenhum resultado encontrado"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#, fuzzy
+msgid "Write query name"
+msgstr "Nome"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+#, fuzzy
+msgid "Id"
+msgstr "<ID desconhecido>"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+#, fuzzy
+msgid "Date Time"
+msgstr "data"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ..\../main/gui/history3/historypanel3.cpp:229
+#: ..\../main/gui/import/pasosimportacionbase.cpp:298
+#: ..\../main/gui/import/pasosimportacionbase.cpp:340
+#: ..\../main/gui/open/opendialogs.cpp:52
+#, fuzzy
+msgid "Description"
+msgstr "descrição de contexto do processo"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ..\../main/gui/import/pasosimportacionbase.cpp:276
+msgid "Accession Number"
+msgstr "Numero de Acesso"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:210
+msgid "Store query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:211
+#, fuzzy
+msgid "Remove query"
+msgstr "Remover"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:278
+#, fuzzy
+msgid "There is no any PACS configured"
+msgstr "<Qualquer>"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+#, fuzzy
+msgid "Study UID"
+msgstr "Erro ao carregar estudo: "
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+#, fuzzy
+msgid "Search"
+msgstr "Procurar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:519
+#, fuzzy
+msgid "Download series"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+#, fuzzy
+msgid "Download study"
+msgstr "Erro ao baixar modalidade"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:535
+#, fuzzy
+msgid "Link series"
+msgstr "<LINK>"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:537
+#, fuzzy
+msgid "Link study"
+msgstr "<LINK>"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:551
+#, fuzzy
+msgid "Properties..."
+msgstr "&Propriedades"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+msgid "You must specify at least a modality or a period of time"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#, fuzzy
+msgid "Select a valid query"
+msgstr "SELECT"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+msgid "Select a valid PACS Server"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+#, fuzzy
+msgid "Download of modality "
+msgstr "Erro ao baixar modalidade"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr " não é permitido"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "Modality download error"
+msgstr "Erro ao baixar modalidade"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:786
+#, fuzzy
+msgid "search results"
+msgstr "Resultados"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:913
+#, fuzzy
+msgid "Downloading serie..."
+msgstr "Erro ao baixar estudo: "
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:916
+#, fuzzy
+msgid "Downloading study..."
+msgstr "Erro ao baixar estudo: "
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+#, fuzzy
+msgid "PACS acquisition is restricted"
+msgstr "Adquirir imagens de um PACS"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+#, fuzzy
+msgid "Server"
+msgstr "Server settings"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ..\../main/gui/import/pasosimportacionbase.cpp:284
+#: ..\../main/gui/import/pasosimportacionbase.cpp:326
+#: ..\../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr "Data"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ..\../main/gui/history3/historypanel3base.cpp:81
+msgid "Any date"
+msgstr "Qualquer data"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ..\../main/gui/history3/historypanel3base.cpp:85
+#, fuzzy
+msgid "Today AM"
+msgstr "hoje"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ..\../main/gui/history3/historypanel3base.cpp:88
+#, fuzzy
+msgid "Today PM"
+msgstr "hoje"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ..\../main/gui/history3/historypanel3base.cpp:91
+#, fuzzy
+msgid "Today"
+msgstr "hoje"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ..\../main/gui/history3/historypanel3base.cpp:100
+#, fuzzy
+msgid "Yesterday"
+msgstr "ontem"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ..\../main/gui/history3/historypanel3base.cpp:103
+#, fuzzy
+msgid "Last 7 days"
+msgstr "Unicode 7 bit (UTF-7)"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ..\../main/gui/history3/historypanel3base.cpp:106
+#, fuzzy
+msgid "Last 30 days"
+msgstr "Refazer última acção"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ..\../main/gui/history3/historypanel3base.cpp:109
+#, fuzzy
+msgid "Last 3 months"
+msgstr "Refazer última acção"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ..\../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr "Entre:"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ..\../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+msgid "Stored queries"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+#, fuzzy
+msgid "Select stored queries..."
+msgstr "SELECT"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ..\../main/gui/open/opendialogsbase.cpp:50
+#: ..\../main/gui/open/opendialogsbase.cpp:202
+#, fuzzy
+msgid "Link"
+msgstr "<LINK>"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+#, fuzzy
+msgid "Download"
+msgstr "Erro ao baixar modalidade"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ..\../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr "Fechar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+#, fuzzy
+msgid "Series does not exist"
+msgstr ": ficheiro inexistente!"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr "Avançar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ..\../main/gui/open/opendialogsbase.cpp:127
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ..\../main/tools/metricgridtool.cpp:101
+#, fuzzy
+msgid "Ok"
+msgstr "&OK"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:151
+#, fuzzy
+msgid "Download again"
+msgstr "Erro ao baixar modalidade"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+msgid "Open"
+msgstr "Abrir"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:179
+#, fuzzy
+msgid "Set query name"
+msgstr "Nome"
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:32
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:34
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizedialog.cpp:64
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ..\../main/gui/export/parametrosprincipales.cpp:194
+#, fuzzy
+msgid "Exporting images ..."
+msgstr "Export images"
+
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:21
+#, fuzzy
+msgid "Common tags"
+msgstr "Ginkgo CADx private tags"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+#, fuzzy
+msgid "Patient's name and surname"
+msgstr "Nome"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+#, fuzzy
+msgid "Patient Id"
+msgstr "<ID desconhecido>"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr "Comentários"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:44
+#, fuzzy
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr "Ginkgo CADx private tags"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:71
+#, fuzzy
+msgid "Add new..."
+msgstr "Não pode adicionar um novo directório a esta secção."
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ..\../main/tools/anonymizetool.cpp:26
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr "Deixar anônimo"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:136
+#, fuzzy
+msgid "Create new"
+msgstr "Criar novo directório"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:136
+#, fuzzy
+msgid "Add DICOM tag"
+msgstr "ADICIONAR"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:199
+#, fuzzy
+msgid "Group"
+msgstr "a entrada '%s' aparece mais do uma vez no grupo '%s'"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:203
+#, fuzzy
+msgid "Element"
+msgstr "uma colecção não vazia deve consistir em nós de 'element'"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ..\../widgets/wangulo.cpp:1114
+#, fuzzy
+msgid "Value"
+msgstr "Valor padrão"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+msgid "Top right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+msgid "Top left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+msgid "Bottom left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+msgid "Bottom right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+msgid "You must fill in all fields"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+msgid "Window/level label in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+#, fuzzy
+msgid "Window"
+msgstr "&Janela"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+#, fuzzy
+msgid "Level"
+msgstr "&Fonte para Nível..."
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+msgid "Do you confirm the removal of the preset?"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Data modified"
+msgstr "Dados modificados"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+#, fuzzy
+msgid "Modality settings"
+msgstr " para a modalidade "
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+#, fuzzy
+msgid "Default modality settings"
+msgstr " para a modalidade "
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, fuzzy, c-format
+msgid "%s settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:60
+#, fuzzy
+msgid "settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+#, fuzzy
+msgid "Export Configuration"
+msgstr "Export images"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+#, fuzzy
+msgid "Ini Files(*.ini)|*.ini"
+msgstr "Não é possível apagar o ficheiro INI '%s'"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#, fuzzy
+msgid "Existing file"
+msgstr "Por favor escolha um ficheiro existente."
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#, fuzzy
+msgid "Export successfully completed"
+msgstr "Export images"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+msgid "There was an error during exportation"
+msgstr "There was an error during exportation"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+#, fuzzy
+msgid "Import Configuration"
+msgstr "Configuração avançada ..."
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+#, fuzzy
+msgid "Ini files(*.ini)|*.ini"
+msgstr "Não é possível apagar o ficheiro INI '%s'"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#, fuzzy
+msgid "There was an error during importation, check permissions"
+msgstr "Erro ao armazenar arquivo, verifique permissões do diretório."
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+msgid "Dicom tag"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+#, fuzzy
+msgid "Split horizontally..."
+msgstr "Dispor &Horizontalmente"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+#, fuzzy
+msgid "Split vertically..."
+msgstr "Dispor &Verticalmente"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ..\../main/tools/windowlayouttool.cpp:273
+#, fuzzy
+msgid "Split active horizontally"
+msgstr "Ativo"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ..\../main/tools/windowlayouttool.cpp:274
+#, fuzzy
+msgid "Split active vertically"
+msgstr "Ativo"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+#, fuzzy
+msgid "New hanging protocol"
+msgstr "&Novo"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, fuzzy, c-format
+msgid "Window %d"
+msgstr "&Janela"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr "Ativo"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+#, fuzzy
+msgid "Yes"
+msgstr "&Sim"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+msgid "Hanging protocols"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+#, fuzzy
+msgid "One day"
+msgstr "Dica do Dia"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+msgid "Two days"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+msgid "Three days"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+msgid "Two weeks"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+msgid "One month"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+msgid "Three months"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+#, fuzzy
+msgid "Local database"
+msgstr "Erro ao criar o banco de dados:\n"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+msgid "Local DICOM Dir setup"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+"Ocorreu um erro ao acessar o diretório, verifique se você tem acesso de "
+"escrita nele"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+#, fuzzy
+msgid "Select DICOMDIR"
+msgstr "SELECT"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+"Aviso, para atualizar o conteúdo do diretório você precisa fechar séries "
+"abertas no momento."
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr "Extenções"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+msgid "Extensions settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr ""
+"Ginkgo CADx precisa ser reiniciado para que as alterações nas extensões "
+"surtam efeito."
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#, fuzzy
+msgid "Port has to be a valid number"
+msgstr "O tamanho do PDU não é um número válido"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+#, fuzzy
+msgid "General configuration parameters"
+msgstr "Configuração avançada ..."
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#, fuzzy
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr ""
+"Ginkgo CADx precisa ser reiniciado para que as alterações nas extensões "
+"surtam efeito."
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:134
+#, fuzzy
+msgid "Testing conectivity with the server..."
+msgstr "Server settings"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:144
+msgid "Error connecting to url"
+msgstr "Erro ao conectar-se a url"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#, fuzzy
+msgid "hostname/port not set"
+msgstr "Não foi possível obter o nome de computador"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr "Falha na conexão de teste"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr "Conexão de teste bem sucedida"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+#, fuzzy
+msgid "Select certificate"
+msgstr "Certificado"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:255
+msgid "Change ..."
+msgstr "Alterar ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+#, fuzzy
+msgid "Import ..."
+msgstr "Tem certeza que quer cancelar o processo de importação?"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:279
+#, fuzzy
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr ""
+"\n"
+"Se você deseja utilizar SSL/TLS, você terá que informar um certificado "
+"válido e uma chave privada"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:472
+msgid "There are this errors: "
+msgstr "Ocorreram os seguintes erros: "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+"\n"
+"Este ID de PACS está em uso"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"O número da porta deve ser um inteiro positivo curto (16 bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+"\n"
+"A porta é muito grande"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+"\n"
+"O comprimento máximo do AET é de 16 caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+"\n"
+"O tamanho do PDU deve ser maior ou igual a zero (padrão = 16384)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+"\n"
+"O valor máximo do PDU é "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+"\n"
+"O valor mínimo do PDU é "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+"\n"
+"Se você deseja utilizar SSL/TLS, você terá que informar um certificado "
+"válido e uma chave privada"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:525
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:558
+#, fuzzy
+msgid "Testing the connection to the node ..."
+msgstr "DICOM Node"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:561
+msgid "DICOM Error"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:607
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:616
+#, fuzzy
+msgid "Invalid port number"
+msgstr "&Número:"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:622
+#, fuzzy
+msgid "WADO Error"
+msgstr "Erro: "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:703
+#, fuzzy
+msgid "Use by default"
+msgstr "pré-definição"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:795
+msgid "DICOM nodes"
+msgstr "DICOM nodes"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:800
+msgid "DICOM nodes settings"
+msgstr "DICOM nodes settings"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"A porta local deve ser um inteiro curto positivo (16 bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+"\n"
+"A porta local é muito grande"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+"\n"
+"A quantidade máxima de caracteres para AET local é de 16 caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr "Confirm the removal of the node"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+#, fuzzy
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Você precisa configurar o AET local, o qual é usado para se comunicar com o "
+"servidor PACS. A porta especificada precisa ser aberta no firewall, já que é "
+"essencial para transferências."
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ..\../main/gui/export/pasosexportacionbase.cpp:20
+#, fuzzy
+msgid "Profile"
+msgstr "Confirmar remoção do perfil "
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr "Valor padrão"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#, fuzzy
+msgid "Set property active"
+msgstr "Ativo"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr "Inactive"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+#, fuzzy
+msgid "Set property inactive"
+msgstr "Inactive"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#, fuzzy
+msgid "Set default value"
+msgstr "Valor padrão"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+#, fuzzy
+msgid "Set by user"
+msgstr "Editar Usuário"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+msgid "Profile name can't be repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+#, fuzzy
+msgid "Profiles Settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#, fuzzy
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr ""
+"Ginkgo CADx precisa ser reiniciado para que as alterações nas extensões "
+"surtam efeito."
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+msgid "Confirm the removal of the profile "
+msgstr "Confirmar remoção do perfil "
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+#, fuzzy
+msgid "New User"
+msgstr "&Novo"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#, fuzzy
+msgid "User name repeated"
+msgstr "Nome"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+msgid "Password has to contain at least 6 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+msgid "No login"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+#, fuzzy
+msgid "User/Password"
+msgstr "Alterar senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+#, fuzzy
+msgid "Password"
+msgstr "Alterar senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+#, fuzzy
+msgid "Password is setted"
+msgstr "Alterar senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr "Alterar senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+#, fuzzy
+msgid "Password is not setted"
+msgstr "Alterar senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+#, fuzzy
+msgid "Set password"
+msgstr "Alterar senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+#, fuzzy
+msgid "Security Setting"
+msgstr "A definição de prioridade da thread é ignorada."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#, fuzzy
+msgid "User inserted successfully"
+msgstr "Editar Usuário"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr ""
+"Ocorreu um erro ao inserir o usuário. Para obter mais informações, abra o "
+"log."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#, fuzzy
+msgid "Password changed successfully"
+msgstr "Alterar senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr ""
+"Ocorreu um erro ao alterar a sua senha. Para obter mais informações, abra o "
+"log."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#, fuzzy
+msgid "User deleted successfully"
+msgstr "Ficheiro de bloqueio apagado '%s'."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr ""
+"Ocorreu um erro ao remover o usuário. Para obter mais informações, abra o "
+"log."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ..\../main/gui/login/dialogologin.cpp:27
+#, fuzzy
+msgid "User"
+msgstr "Editar Usuário"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ..\../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr "Escolha um diretório"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#, fuzzy
+msgid "Maximum length of title is 8 characters"
+msgstr ""
+"\n"
+"O comprimento máximo do AET é de 16 caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr "O diretório selecionado não pode ser aberto"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+msgid "Title"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+#, fuzzy
+msgid "Path"
+msgstr "O caminho '%s' contém demasiados \"..\"!"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+#, fuzzy
+msgid "Clean before"
+msgstr "Antes de um parágrafo:"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+#, fuzzy
+msgid "Clean after"
+msgstr "Depois de um parágrafo:"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+#, fuzzy
+msgid "Location Settings"
+msgstr "Configurar localização"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr "Anonimização"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:96
+#, fuzzy
+msgid "Anonymization settings"
+msgstr "Anonimização"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1370
+#, fuzzy
+msgid "Settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+#, fuzzy
+msgid "Export config..."
+msgstr "Erro ao ler opções de configuração."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+#, fuzzy
+msgid "Import config..."
+msgstr "Erro ao ler opções de configuração."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr "Aplicar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+#, fuzzy
+msgid "Physician's name"
+msgstr "Nome"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+#, fuzzy
+msgid "Physician's Id"
+msgstr "<ID desconhecido>"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+#, fuzzy
+msgid "Service"
+msgstr ""
+"Funções de ligação à telefónica não estão disponíveis, em virtude do serviço "
+"de acesso remoto (RAS) não estar instalado neste computador. Por favor "
+"Instale-o."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+#, fuzzy
+msgid "Service's name"
+msgstr "Nome"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+#, fuzzy
+msgid "Service's Id"
+msgstr "<ID desconhecido>"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+msgid "Local institution"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+#, fuzzy
+msgid "Institution's name"
+msgstr "Nome"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+#, fuzzy
+msgid "Institution's Id"
+msgstr "<ID desconhecido>"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+#, fuzzy
+msgid "Dicomized files"
+msgstr "Ficheiros"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+#, fuzzy
+msgid "Charset"
+msgstr ": conjunto de caracteres desconhecido"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+#, fuzzy
+msgid "ISO_IR 148"
+msgstr "A6 105 x 148 mm"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+msgid "Automatically check for updates"
+msgstr "Checar por atualizações automaticamente"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+msgid "Proxy settings"
+msgstr "Proxy settings"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+#, fuzzy
+msgid "Enable http proxy"
+msgstr "Proxy settings"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+#, fuzzy
+msgid "Proxy Settings"
+msgstr "Proxy settings"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+msgid "Server settings"
+msgstr "Server settings"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+msgid "Host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+#, fuzzy
+msgid "Port"
+msgstr ""
+"\n"
+"A porta é muito grande"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+#, fuzzy
+msgid "Username"
+msgstr "Falha na ligação: falta nome de utilizador/palavra passe."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+#, fuzzy
+msgid "No proxy for addresses containing"
+msgstr "Proxy settings"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+msgid "DICOM Dir"
+msgstr "Diretório DICOM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr "O diretório DICOM é o local onde o histórico é armazenado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr "..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+"Aviso, para atualizar o conteúdo do diretório você precisa fechar todas as "
+"séries abertas"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+msgid "Auto-cleaning"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+#, fuzzy
+msgid "MB"
+msgstr "%.*f MB"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ..\../main/tools/toolwindowlevel.cpp:201
+#, fuzzy
+msgid "Reset to default"
+msgstr "pré-definição"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Você precisa configurar o AET local, o qual é usado para se comunicar com o "
+"servidor PACS. A porta especificada precisa ser aberta no firewall, já que é "
+"essencial para transferências."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+#, fuzzy
+msgid "Local AET"
+msgstr ""
+"\n"
+"A quantidade máxima de caracteres para AET local é de 16 caracteres"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr "Configurações avançadas..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+msgid "DICOM Nodes"
+msgstr "DICOM Nodes"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+#, fuzzy
+msgid "New ..."
+msgstr "&Novo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+msgid "Edit ..."
+msgstr "Editar ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete"
+msgstr "Excluir"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+#, fuzzy
+msgid "Set Default"
+msgstr ""
+"Houve um problema durante a configuração da página: poderá necessitar de "
+"definir uma impressora pré-definida."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+msgid "DICOM Node"
+msgstr "DICOM Node"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr "AET"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+msgid "PDU (KB)"
+msgstr "PDU (KB)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+#, fuzzy
+msgid "Retrieve method"
+msgstr "método de compressão Zip não suportado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+#, fuzzy
+msgid "Move"
+msgstr "&Mover"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+#, fuzzy
+msgid "Get"
+msgstr "Não foi possível obter o nome de computador"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+#, fuzzy
+msgid "WADO URL"
+msgstr "Erro ao conectar-se a url"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+#, fuzzy
+msgid "Retrieve mode"
+msgstr "Modo Categorizado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ..\../main/gui/import/pasosimportacionbase.cpp:319
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1395
+#, fuzzy
+msgid "Series"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#, fuzzy
+msgid "Studies"
+msgstr ""
+"Não foi possível esvaziar o histórico, você precisa fechar os estudos abertos"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr "Reuse connection"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+msgid "Worklists"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+msgid "Select how do you want to handle MPPS items"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+#, fuzzy
+msgid "DICOM MPPS"
+msgstr "DICOM nodes"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+#, fuzzy
+msgid "HL7 messages"
+msgstr "gerar mensagens de registo verbosas"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+#, fuzzy
+msgid "HL7"
+msgstr "Erro ao enviar mensagem HL7. Veja log para maiores detalhes"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+#, fuzzy
+msgid "Abort message"
+msgstr "%s mensagem"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+#, fuzzy
+msgid "Completed message"
+msgstr "%s mensagem"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+#, fuzzy
+msgid "In progress message"
+msgstr "%s mensagem"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+#, fuzzy
+msgid "Default values"
+msgstr "pré-definição"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+msgid "Worklist"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+#, fuzzy
+msgid "SSL/TLS"
+msgstr ""
+"\n"
+"Se você deseja utilizar SSL/TLS, você terá que informar um certificado "
+"válido e uma chave privada"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+#, fuzzy
+msgid "Verify server credentials"
+msgstr "Server settings"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+#, fuzzy
+msgid "Use SSL/TLS"
+msgstr ""
+"\n"
+"Se você deseja utilizar SSL/TLS, você terá que informar um certificado "
+"válido e uma chave privada"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr "Certificado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+msgid "Certificate to use in this connection"
+msgstr "Certificado para usar nessa conexão"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr "Configuração avançada ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+#, fuzzy
+msgid "Default charset"
+msgstr ": conjunto de caracteres desconhecido"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+#, fuzzy
+msgid "Advanced"
+msgstr "Configurações avançadas..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr "Test connection"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+msgid "Local AET certificate"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+msgid "Certificate used by Ginkgo CADx"
+msgstr "Certificado usado pelo Ginkgo CADx"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+#, fuzzy
+msgid "Receiver organization Id"
+msgstr "Grid organization"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+#, fuzzy
+msgid "Petitioner System Id"
+msgstr "Use system settings"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+#, fuzzy
+msgid "Filler Application Id"
+msgstr "<ID desconhecido>"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+#, fuzzy
+msgid "Ginkgo CADx Application Id"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+msgid "Integration engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+#, fuzzy
+msgid "Hostname / Port"
+msgstr "Não foi possível obter o nome de computador"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr "/"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+msgid "Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ..\../main/gui/export/pasosexportacionbase.cpp:28
+#, fuzzy
+msgid "Format"
+msgstr "PCX: formato de imagem não suportado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+#, fuzzy
+msgid "Message's format"
+msgstr "%s mensagem"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+#, fuzzy
+msgid "Test engine"
+msgstr "Test connection"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+msgid "Test Integration Engine connectivity"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+msgid "Ginkgo Extension Title"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+msgid "Edit public key"
+msgstr "Editar chave pública"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+#, fuzzy
+msgid "Public key"
+msgstr "Editar chave pública"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+#, fuzzy
+msgid "Public key in PEM format"
+msgstr "Editar chave pública"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+#, fuzzy
+msgid "Load ..."
+msgstr "carregar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+#, fuzzy
+msgid "Private key"
+msgstr ""
+"\n"
+"Se você deseja utilizar SSL/TLS, você terá que informar um certificado "
+"válido e uma chave privada"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+msgid "Private key in PEM format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+#, fuzzy
+msgid "Profile name"
+msgstr "Nome"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+#, fuzzy
+msgid "Set active"
+msgstr "Ativo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+msgid "Configure location"
+msgstr "Configurar localização"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+#, fuzzy
+msgid "Location"
+msgstr "Configurar localização"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+#, fuzzy
+msgid "Security type"
+msgstr "Tipo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+msgid "Change Password ..."
+msgstr "Alterar senha ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+#, fuzzy
+msgid "Set main password"
+msgstr "Alterar senha"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+#, fuzzy
+msgid "Set Password"
+msgstr "Alterar senha"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+msgid "Edit User"
+msgstr "Editar Usuário"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+#, fuzzy
+msgid "User Name"
+msgstr "Nome"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+msgid "Confirm Password"
+msgstr "Confirmar Senha"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+#, fuzzy
+msgid "Properties"
+msgstr "&Propriedades"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+#, fuzzy
+msgid "Edit corner annotations"
+msgstr "Mostrar anotações de canto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue}  where GGGG is the tag's group in hexadecimal and EEEE is the "
+"tag's element."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+#, fuzzy
+msgid "Window/level"
+msgstr "&Janela"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr "Adicionar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ..\../main/gui/history3/historytoolmenu.cpp:149
+#: ..\../widgets/gui/selecciontextobase.h:58
+msgid "Edit"
+msgstr "Editar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+#, fuzzy
+msgid "Default Window/Level"
+msgstr "&Janela"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+#, fuzzy
+msgid "Corner annotations"
+msgstr "Mostrar anotações de canto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+#, fuzzy
+msgid "Setup corner annotations"
+msgstr "Mostrar anotações de canto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+#, fuzzy
+msgid "Setup..."
+msgstr "Configurar..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+#, fuzzy
+msgid "Other settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+#, fuzzy
+msgid "Interpolate pixel data"
+msgstr "XPM: Dados de pixeis mal formados!"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+msgid "Hanging protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+#, fuzzy
+msgid "Opening mode"
+msgstr "Modo Categorizado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+#, fuzzy
+msgid "Study opening criteria"
+msgstr "erro ao abrir '%s'"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+msgid "Workspace"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+msgid "Enable/Disable"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+#, fuzzy
+msgid "Top left corner annotations"
+msgstr "Mostrar anotações de canto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+#, fuzzy
+msgid "Setup window"
+msgstr "Configurar..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+#, fuzzy
+msgid "Set default"
+msgstr ""
+"Houve um problema durante a configuração da página: poderá necessitar de "
+"definir uma impressora pré-definida."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+#, fuzzy
+msgid "Open in main window"
+msgstr "&Janela"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+#, fuzzy
+msgid "Setup position..."
+msgstr "Configurar..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+msgid "Setup undocked window position"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+#, fuzzy
+msgid "Layout"
+msgstr "1x1 Layout"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+#, fuzzy
+msgid "Current layout"
+msgstr "Directório actual:"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+msgid "Columns"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+#, fuzzy
+msgid "Series criteria"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+#, fuzzy
+msgid "Select opening mode"
+msgstr "Modo Categorizado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+#, fuzzy
+msgid "Tag"
+msgstr ""
+"Aviso: tentativa de remover um manuseador de 'tag HTML' de uma pilha vazia."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+#, fuzzy
+msgid "Save"
+msgstr "&Guardar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+#, fuzzy
+msgid "Enable background queries"
+msgstr "Cor de fundo"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+msgid "Smart retrieve"
+msgstr ""
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+#, fuzzy
+msgid "Smart retrieve settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.h:64
+#, fuzzy
+msgid "Export DICOM"
+msgstr "Exportar DICOM"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+msgid "Ginkgo CADx private tags"
+msgstr "Ginkgo CADx private tags"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ..\../main/gui/history3/historypanel3.cpp:340
+#: ..\../main/gui/history3/historytoolmenu.cpp:158
+#, fuzzy
+msgid "Export"
+msgstr "Export images"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ..\../main/gui/export/parametrosprincipales.cpp:157
+#, fuzzy
+msgid "Select the directory where the files will be stored"
+msgstr "O diretório DICOM é o local onde o histórico é armazenado"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+#, fuzzy
+msgid "Select the DICOM Dir folder"
+msgstr "Diretório DICOM"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+#, fuzzy
+msgid "DICOM Dir migration"
+msgstr "Diretório DICOM"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+#, fuzzy
+msgid "Migrate existing (recommended)"
+msgstr "Por favor escolha um ficheiro existente."
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+#, fuzzy
+msgid "Continue..."
+msgstr "Avançar"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+#, fuzzy
+msgid "Select other"
+msgstr "SELECT"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+#, fuzzy
+msgid "Browse..."
+msgstr "Clique para procurar por um simbolo."
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:106
+msgid "DICOM Export"
+msgstr "Exportar DICOM"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:110
+msgid "Select the format and the images you want to export"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:143
+#, fuzzy
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr "Todos os arquivos (*.*)|*.*"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:150
+#, fuzzy
+msgid "Select file"
+msgstr "Seleccionar um ficheiro"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "DICOM (native format)"
+msgstr "DICOM (formato nativo)"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+#, fuzzy
+msgid "Image (jpg, bmp, png)"
+msgstr "Não foi possível gravar a imagem PNG."
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:38
+#, fuzzy
+msgid "Export all files of opened tab"
+msgstr "impossível fechar o descritor do ficheiro %d"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:55
+#, fuzzy
+msgid "JPEG"
+msgstr "JPEG: Impossível gravar imagem."
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr ""
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:40
+#, fuzzy
+msgid "Image Export Wizard"
+msgstr "imagem"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ..\../main/gui/license/aboutdialogbase.cpp:67
+#: ..\../main/gui/license/aboutdialogbase.cpp:151
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:54
+msgid "&Accept"
+msgstr "&Aceitar"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr "&Próximo >"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+#, fuzzy
+msgid "Open link"
+msgstr "<LINK>"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+#, fuzzy
+msgid "File link:"
+msgstr "<LINK>"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ..\../main/gui/import/pasosimportacionbase.cpp:270
+#, fuzzy
+msgid "Study"
+msgstr "Erro ao carregar estudo: "
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+#, fuzzy
+msgid "User name"
+msgstr "Nome"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+#, fuzzy
+msgid "Ginkgo Cloud link"
+msgstr "<LINK>"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+#, fuzzy
+msgid "Copy to clipboard"
+msgstr "&Copiar"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "New Ginkgo Cloud study"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "To download the study, paste this url "
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+msgid "Creator"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+#, fuzzy
+msgid "Last Modificator"
+msgstr "Refazer última acção"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+#, fuzzy
+msgid "Show link..."
+msgstr "<LINK>"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+#, fuzzy
+msgid "Invalid link"
+msgstr "<LINK>"
+
+#: ..\../main/gui/history3/historypanel3.cpp:117
+#: ..\../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/history3/historypanel3.cpp:119
+#: ..\../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr "Abrir Séries com .."
+
+#: ..\../main/gui/history3/historypanel3.cpp:226
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr "Idade"
+
+#: ..\../main/gui/history3/historypanel3.cpp:228
+#, fuzzy
+msgid "Date acquired"
+msgstr "data"
+
+#: ..\../main/gui/history3/historypanel3.cpp:230
+#, fuzzy
+msgid "Date added"
+msgstr "data"
+
+#: ..\../main/gui/history3/historypanel3.cpp:308
+#: ..\../main/gui/history3/historytoolmenu.cpp:82
+#: ..\../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr "Adquirir"
+
+#: ..\../main/gui/history3/historypanel3.cpp:316
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:363
+#, fuzzy
+msgid "All patients"
+msgstr "Todos"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+msgid "Results"
+msgstr "Resultados"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, fuzzy, c-format
+msgid " (%d images)"
+msgstr "Export images"
+
+#: ..\../main/gui/history3/historypanel3.cpp:634
+#, fuzzy
+msgid "Open study with .."
+msgstr "&Abrir"
+
+#: ..\../main/gui/history3/historypanel3.cpp:663
+#: ..\../main/gui/history3/historypanel3base.cpp:482
+msgid "Synchronize"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:677
+msgid "&Delete from history"
+msgstr "&Deletar do histórico"
+
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#, fuzzy
+msgid "&Clear history"
+msgstr "&Limpar"
+
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr ""
+"Você alcançou o número máximo de abas abertas, feche algumas e tente "
+"novamente"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid "Unable to open modality "
+msgstr "Não foi possível abrir a modalidade "
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr " com a sintaxe de transferência "
+
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr ""
+"Não foi possível esvaziar o histórico, você precisa fechar os estudos abertos"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1086
+msgid "all files"
+msgstr "todos os arquivos"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+msgid "Select at least one series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr "Você não pode remover séries abertas"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+#, fuzzy
+msgid "those series"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+#, fuzzy
+msgid "this series"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:57
+#, fuzzy
+msgid "Advanced search"
+msgstr "Procurar"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:73
+#, fuzzy
+msgid "Acquisition date"
+msgstr "data"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:302
+#: ..\../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr "Confirmar remoção"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr "Tem certeza que deseja excluir "
+
+#: ..\../main/gui/history3/historypanel3base.cpp:336
+#: ..\../main/gui/history3/historytoolmenu.cpp:102
+#: ..\../main/gui/history3/historytoolmenu.cpp:200
+#: ..\../main/gui/history3/historytoolmenu.cpp:229
+#, fuzzy
+msgid "Remove"
+msgstr "Remover"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:454
+#: ..\../main/gui/history3/historypanel3base.h:187
+#, fuzzy
+msgid "Synchronize files"
+msgstr "Ficheiros"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+
+#: ..\../main/gui/history3/historytablemodel.cpp:406
+#: ..\../main/gui/history3/historytablemodel.cpp:418
+#: ..\../main/gui/history3/historytablemodel.cpp:473
+#: ..\../main/gui/history3/historytablemodel.cpp:485
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:105
+msgid "00/00/0000 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:138
+msgid "Close history"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:139
+#: ..\../main/gui/startup/startupform.cpp:53
+#, fuzzy
+msgid "History"
+msgstr " from History?"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:201
+#: ..\../main/gui/history3/historytoolmenu.cpp:230
+#, fuzzy
+msgid "Clear history"
+msgstr "&Limpar"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:232
+#, fuzzy
+msgid "Select all"
+msgstr "Seleccion&ar Todos"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:233
+#, fuzzy
+msgid "Deselect all"
+msgstr "Todos"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+#, fuzzy
+msgid "Destination"
+msgstr ""
+"Falha ao renomear o ficheiro de '%s' para '%s' porque o ficheiro de destino "
+"já existe."
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+#, fuzzy
+msgid "Status"
+msgstr "Estado:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+msgid "Error message"
+msgstr "Mensagem de erro"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+msgid "Show Message"
+msgstr "Mostrar Mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+msgid "Edit Message"
+msgstr "Editar Mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+msgid "Delete message"
+msgstr "Excluir mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+msgid "Error editing message"
+msgstr "Erro ao editar mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+#, fuzzy
+msgid "Error purguing messages"
+msgstr "Erro ao deletar mensagens"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ..\../main/gui/progress/paneltarea.cpp:31
+#, fuzzy
+msgid "Stop"
+msgstr "&Parar"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#, fuzzy
+msgid "Sent"
+msgstr "Erro ao enviar mensagem. Foi enviada "
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/progress/statusbarprogreso.cpp:281
+#, fuzzy
+msgid "Warning"
+msgstr "Aviso"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+msgid "Error getting message"
+msgstr "Erro ao obter mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+#, fuzzy
+msgid "Running"
+msgstr "Erro ao rodar a thread: "
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+#, fuzzy
+msgid "Usually due to an error in sending a message"
+msgstr "Erro ao enviar mensagem:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ..\../main/gui/progress/paneltarea.cpp:31
+#, fuzzy
+msgid "Start"
+msgstr "Página inicial"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+msgid "Error deleting messages"
+msgstr "Erro ao deletar mensagens"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+#, fuzzy
+msgid "Remove sent messages"
+msgstr "Remover"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+#, fuzzy
+msgid "Exit"
+msgstr "&Sair"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+#, fuzzy
+msgid "Messages"
+msgstr "gerar mensagens de registo verbosas"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+#, fuzzy
+msgid "Refresh"
+msgstr "Refrescar"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1394
+#, fuzzy
+msgid "View"
+msgstr "Ver ficheiros como uma vista detalhada"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+#, fuzzy
+msgid "Send task status:"
+msgstr "Estado:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+#, fuzzy
+msgid "Message"
+msgstr "%s mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr "Data:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+#, fuzzy
+msgid "Destination:"
+msgstr ""
+"Falha ao renomear o ficheiro de '%s' para '%s' porque o ficheiro de destino "
+"já existe."
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+#, fuzzy
+msgid "Status:"
+msgstr "Estado:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+#, fuzzy
+msgid "Message content:"
+msgstr "Conteúdo"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:142
+#, fuzzy
+msgid "OK"
+msgstr "&OK"
+
+#: ..\../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr "Overview data of DICOM files"
+
+#: ..\../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:210
+#, fuzzy
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+"\n"
+"Este ID de PACS está em uso"
+
+#: ..\../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "Error validating fields"
+msgstr "Error validating fields"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:148
+#, fuzzy
+msgid "Selecting Import Profile"
+msgstr "Confirmar remoção do perfil "
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:152
+msgid "You must select the profile you want to use import"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+msgid "You must select the import profile"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:21
+#, fuzzy
+msgid "Selected images"
+msgstr "Export images"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:56
+#, fuzzy
+msgid "Preview"
+msgstr " Antevisão"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:62
+#, fuzzy
+msgid "Remove all"
+msgstr "Remover"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:113
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:65
+msgid "Demographic data"
+msgstr "Dados demográficos"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr "Identificator *"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:159
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+#, fuzzy
+msgid "Birth date"
+msgstr "data"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:217
+#, fuzzy
+msgid "Study Details"
+msgstr "&Detalhes"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:234
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:122
+#, fuzzy
+msgid "Weight"
+msgstr "&Peso:"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:245
+msgid "Kg"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:252
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:119
+#, fuzzy
+msgid "Height"
+msgstr "Cabeçalho DIB: Altura da imagem > 32767 pixeis para o ficheiro."
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:291
+#: ..\../main/gui/import/pasosimportacionbase.cpp:333
+#, fuzzy
+msgid "Time"
+msgstr "Tempo passado : "
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+#, fuzzy
+msgid "Select files..."
+msgstr "SELECT"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+#, fuzzy
+msgid "Paste"
+msgstr "&Colar"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+#, fuzzy
+msgid "Paste from clipboard"
+msgstr "Falha na obtenção de dados da área de transferência"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr "Voltar"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr "Tem certeza que deseja deletar este arquivo do disco?"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:330
+msgid "Delete selected items"
+msgstr "Excluir itens selecionados"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+msgid "You must select an image"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:346
+#, fuzzy
+msgid "Generating preview..."
+msgstr " Antevisão"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:500
+#, fuzzy
+msgid "Select images"
+msgstr "SELECT"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr "Criando Thumbnails..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:715
+#, fuzzy
+msgid "Image selection"
+msgstr "Selecção"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:760
+#, fuzzy
+msgid "The file"
+msgstr "&Ficheiro"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr " não existe"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:52
+#, fuzzy
+msgid "Image Import Wizard"
+msgstr "imagem"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:167
+msgid "free of"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:181
+#, fuzzy
+msgid "in dicomization dir."
+msgstr "<DIR>"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr "Tem certeza que quer cancelar o processo de importação?"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, fuzzy, c-format
+msgid "Step %d of %d: "
+msgstr "Página %d de %d"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr "&Fim"
+
+#: ..\../main/gui/license/aboutdialog.cpp:25
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+#, fuzzy
+msgid "About"
+msgstr "&Sobre"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:22
+#, fuzzy
+msgid "Ginkgo CADx"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr "Créditos"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:55
+#, fuzzy
+msgid "Licenses"
+msgstr "Licenças de Código Aberto"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:58
+#, fuzzy
+msgid "UPDATE_INFO"
+msgstr "delegado não tem informação de tipo"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:108
+#: ..\../main/gui/license/aboutdialogbase.h:88
+msgid "Open Source Licenses"
+msgstr "Licenças de Código Aberto"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr "Cairo"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr "DCMTK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:119
+#, fuzzy
+msgid "FamFamFam Icons"
+msgstr "&Organizar Ícones"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:120
+#, fuzzy
+msgid "Fugue Icons"
+msgstr "&Organizar Ícones"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr "OpenSSL"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:126
+#, fuzzy
+msgid "WxWidgets"
+msgstr "wxWidgets não foi possível abrir o ecrã. A sair."
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:127
+#, fuzzy
+msgid "Zlib"
+msgstr "Gzip não suportado nesta versão do zlib"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:130
+#, fuzzy
+msgid "Dark Glass Icons"
+msgstr "&Organizar Ícones"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ..\../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:53
+msgid "Check for updates automatically"
+msgstr "Verificar atualizações automaticamente"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:66
+#, fuzzy
+msgid "I Accept the license"
+msgstr "Aceitar"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+#, fuzzy
+msgid "Save logs"
+msgstr "&Guardar"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+#, fuzzy
+msgid "File couldn't be stored "
+msgstr "Não foi possível carregar o ficheiro."
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+msgid "Could not write to file"
+msgstr "Não foi possível escrever no arquivo"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+#, fuzzy
+msgid "Save log..."
+msgstr "Gravar conteúdos do registo para ficheiro"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+msgid "Clear log"
+msgstr "Limpar log"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+#, fuzzy
+msgid "Log"
+msgstr "&Registo"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr "Limpar"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr ""
+
+#: ..\../main/gui/login/dialogologin.cpp:50
+#, fuzzy
+msgid "The username or password is incorrect"
+msgstr "Falha na ligação: falta nome de utilizador/palavra passe."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:250
+#, fuzzy
+msgid "Tasks"
+msgstr "0 tarefas sendo executadas."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1139
+#, fuzzy
+msgid "Included in the history ..."
+msgstr " from History?"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "Check update error"
+msgstr "Erro verificando atualização"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#, fuzzy
+msgid "Malformed XML"
+msgstr "XPM: Dados de pixeis mal formados!"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1192
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#, fuzzy
+msgid "Error parsing integration XML:\n"
+msgstr "XML erro de verificação gramatical: '%s' na linha %d"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+msgid "PACS error:\n"
+msgstr "Erro do PACS:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#, fuzzy
+msgid "Error executing WorkFlow\n"
+msgstr "Erro ao criar o banco de dados:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#, fuzzy
+msgid "Close current view"
+msgstr "Fechar documento actual"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+#, fuzzy
+msgid "Close all"
+msgstr "Fechar Tudo"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+#, fuzzy
+msgid "Close all views"
+msgstr "Fechar Tudo"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr "&Sair"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+#, fuzzy
+msgid "Exit application"
+msgstr "&Sair"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr "Full screen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Show full screen"
+msgstr "Exibir em tela cheia"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1302
+#, fuzzy
+msgid "Tab grouping"
+msgstr "TAB"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1329
+#, fuzzy
+msgid "Ginkgo CADx manual ..."
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1330
+#, fuzzy
+msgid "Open test card"
+msgstr "Test connection"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr "Verificar Atualizações"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for newest versions"
+msgstr "Verificar novas versões"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1332
+#, fuzzy
+msgid "Need support ..."
+msgstr "Online support"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+#, fuzzy
+msgid "About "
+msgstr "&Sobre"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+msgid "HL7 monitor"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+msgid "HL7 message control"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+#, fuzzy
+msgid "Log monitor"
+msgstr "&Registo"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#, fuzzy
+msgid "Log monitored"
+msgstr "&Registo"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1390
+#, fuzzy
+msgid "&File"
+msgstr "&Ficheiro"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr "&Editar"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr "&Ajuda"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1664
+#, fuzzy
+msgid "Unsaved data"
+msgstr "Dados"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr ""
+"Erros ocorreram ao salvar as séries.\n"
+"Gostaria de fechar mesmo assim? "
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid "Error saving"
+msgstr "Erro ao salvar"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+#, fuzzy
+msgid "Full Screen"
+msgstr "Full screen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+#, fuzzy
+msgid "View Full Screen"
+msgstr "Full screen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1708
+#, fuzzy
+msgid "Tab Regroup"
+msgstr "TAB"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr "&Fechar"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "&Close all"
+msgstr "&Fechar todos"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "Close all windows"
+msgstr "Fechar todas as janelas"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1728
+#, fuzzy
+msgid "Tabbed organization"
+msgstr "Grid organization"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+#, fuzzy
+msgid "Ginkgo CADx updated"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1782
+#, fuzzy
+msgid "New version available ("
+msgstr " Versão "
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr "Erro interno no processo de autenticação"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+#, fuzzy
+msgid "New Update"
+msgstr "&Novo"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+#, fuzzy
+msgid "New version available"
+msgstr " Versão "
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+#, fuzzy
+msgid "X"
+msgstr "10 x 11 pol."
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+msgid "Close this notification"
+msgstr "Fechar esta notificação"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+msgid "The following commands will be aborted if you close the application"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+msgid "Close Ginkgo CADx"
+msgstr "Fechar Ginkgo CADx"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:138
+#, fuzzy
+msgid "User login"
+msgstr "Editar Usuário"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+#, fuzzy
+msgid "System authentication"
+msgstr "Use system settings"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+msgid "Login"
+msgstr ""
+
+#: ..\../main/gui/open/abrir.cpp:80 ..\../main/gui/open/abrir.cpp:82
+msgid "Open..."
+msgstr "Abrir..."
+
+#: ..\../main/gui/open/opendialogs.cpp:58
+#, fuzzy
+msgid "There was an error reading DICOMDIR file"
+msgstr "Erro na leitura do DIB da imagem."
+
+#: ..\../main/gui/open/opendialogs.cpp:62
+#, fuzzy
+msgid "Select a valid DICOMDIR file"
+msgstr "Seleccionar um ficheiro"
+
+#: ..\../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:180
+#: ..\../main/gui/open/opendialogsbase.cpp:170
+#: ..\../main/gui/open/opendialogsbase.h:112
+#, fuzzy
+msgid "Copy or link"
+msgstr "&Copiar"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:22
+#: ..\../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr "Adquirir de um diretório DICOM"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:94
+#: ..\../main/gui/open/opendialogsbase.h:85
+#, fuzzy
+msgid "Select drive"
+msgstr "<UNIDADE>"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:175
+msgid "Do you want to copy or link files?"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ..\../main/gui/selectpacsserver/selectpacsserver.cpp:30
+msgid "There aren't any PACS configured"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:69
+#, fuzzy
+msgid "0000/00/00 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.h:57
+msgid "Upload study"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+#, fuzzy
+msgid "Select PACS server"
+msgstr "SELECT"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:119
+msgid "Metadata"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:120
+#, fuzzy
+msgid "Identification information"
+msgstr "%s Informação"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:121
+#, fuzzy
+msgid "Patient information"
+msgstr "%s Informação"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:122
+#, fuzzy
+msgid "Acquisition information"
+msgstr "%s Informação"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:123
+#, fuzzy
+msgid "Relationship information"
+msgstr "%s Informação"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:124
+#, fuzzy
+msgid "Image presentation information"
+msgstr "%s Informação"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:125 ..\../widgets/wtextbox.cpp:525
+#, fuzzy
+msgid "Text"
+msgstr "(Texto normal)"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:126
+#, fuzzy
+msgid "Other"
+msgstr ""
+"Lamento, docking não é suportado por plataformas que não sejam wxMSW, wxMac "
+"e wxGTK"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:137
+#: ..\../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr "Dados"
+
+#: ..\../main/gui/previewpanel/previewpanel.cpp:47
+#, fuzzy
+msgid "Hide"
+msgstr "Mostra/esconde painel de navegação"
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:207
+msgid "Previews"
+msgstr ""
+
+#: ..\../main/gui/progress/progresobase.cpp:23
+#, fuzzy
+msgid "There is no running tasks"
+msgstr "0 tarefas sendo executadas."
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:165
+msgid "0 running tasks."
+msgstr "0 tarefas sendo executadas."
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:192
+#, fuzzy, c-format
+msgid "There are %d pending tasks"
+msgstr "0 tarefas sendo executadas."
+
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.h:55
+#, fuzzy
+msgid "Select PACS"
+msgstr "SELECT"
+
+#: ..\../main/gui/startup/startupformbase.cpp:29
+#, fuzzy
+msgid "http://ginkgo-cadx.com"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:47
+#, fuzzy
+msgid "Ginkgo CADx Pro"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr ""
+
+#: ..\../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr "Página inicial"
+
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete Widget"
+msgstr "Excluir Widget"
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+#, fuzzy
+msgid "Properties ..."
+msgstr "&Propriedades"
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+#, fuzzy
+msgid "Widget Properties"
+msgstr "&Propriedades"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:114
+#, fuzzy
+msgid "Open file"
+msgstr "Abrir Ficheiro"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:115
+#: ..\../main/tools/openfoldertool.cpp:27
+#, fuzzy
+msgid "Open folder"
+msgstr "&Abrir"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:116
+#: ..\../main/tools/openremovabletool.cpp:28
+#, fuzzy
+msgid "Open removable unit"
+msgstr "&Abrir"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:117
+#: ..\../main/tools/openginkgocloudlinktool.cpp:27
+msgid "Open Ginkgo Cloud link"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr ""
+
+#: ..\../main/tools/colormaptool.cpp:110
+msgid "Invert color map"
+msgstr ""
+
+#: ..\../main/tools/cornerannotationstool.cpp:44
+#, fuzzy
+msgid "Hide corner annotations"
+msgstr "Mostrar anotações de canto"
+
+#: ..\../main/tools/cornerannotationstool.cpp:46
+msgid "Show corner annotations"
+msgstr "Mostrar anotações de canto"
+
+#: ..\../main/tools/detachwindowtool.cpp:42
+#, fuzzy
+msgid "Attach View"
+msgstr ""
+"):\n"
+"Verifique a configuração e anexe-a se necessário"
+
+#: ..\../main/tools/detachwindowtool.cpp:44
+#, fuzzy
+msgid "Detach view"
+msgstr "Ver ficheiros como uma vista detalhada"
+
+#: ..\../main/tools/dicomizetool.cpp:28
+#, fuzzy
+msgid "Dicomize files"
+msgstr "Ficheiros"
+
+#: ..\../main/tools/exportdicomdirtool.cpp:32
+#, fuzzy
+msgid "Export to DICOM Dir"
+msgstr "Exportar DICOM"
+
+#: ..\../main/tools/markertool.cpp:171
+#, fuzzy
+msgid "Point"
+msgstr "Tamanho do &ponto:"
+
+#: ..\../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr "Seta"
+
+#: ..\../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:176
+msgid "Free form"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:57
+#, fuzzy
+msgid "Grid"
+msgstr "Grid organization"
+
+#: ..\../main/tools/metricgridtool.cpp:67
+#, fuzzy
+msgid "Grid Scale"
+msgstr "Grid organization"
+
+#: ..\../main/tools/metricgridtool.cpp:74
+#, fuzzy
+msgid "Scale X"
+msgstr "10 x 11 pol."
+
+#: ..\../main/tools/metricgridtool.cpp:78
+#, fuzzy
+msgid "X axis scale"
+msgstr "10 x 11 pol."
+
+#: ..\../main/tools/metricgridtool.cpp:87
+#, fuzzy
+msgid "Scale Y"
+msgstr "imagem_%d-%m-%Y_"
+
+#: ..\../main/tools/metricgridtool.cpp:91
+#, fuzzy
+msgid "Y axis scale"
+msgstr "imagem_%d-%m-%Y_"
+
+#: ..\../main/tools/metricgridtool.cpp:206
+msgid "Show grid"
+msgstr "Mostrar grade"
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr "Configurar Grade ..."
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr "Configurar Grade"
+
+#: ..\../main/tools/metricgridtool.cpp:250
+#, fuzzy
+msgid "Hide Grid"
+msgstr "Mostra/esconde painel de navegação"
+
+#: ..\../main/tools/metricgridtool.cpp:252
+msgid "Show Grid"
+msgstr "Mostrar Grade"
+
+#: ..\../main/tools/openfiletool.cpp:28
+msgid "Open File"
+msgstr "Abrir arquivo"
+
+#: ..\../main/tools/pacsuploadtool.cpp:54
+msgid "Send to PACS..."
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:59
+msgid "Unset pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:61
+msgid "Set pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#, fuzzy
+msgid "PACS Q/R"
+msgstr "Adquirir imagens de um PACS"
+
+#: ..\../main/tools/queryretrievetool.cpp:94
+#: ..\../main/tools/searchginkgocloudhistorytool.cpp:28
+#, fuzzy
+msgid "Search Ginkgo Cloud"
+msgstr "Procurar"
+
+#: ..\../main/tools/rotateandfliptool.cpp:151
+#, fuzzy
+msgid "Undo rotate and flip"
+msgstr "&Desfazer"
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:156
+msgid "Flip horizontal"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:157
+msgid "Flip vertical"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:34
+msgid "Send to PACS"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:70
+#, fuzzy
+msgid "Sending to PACS..."
+msgstr "Erro ao enviar mensagem:"
+
+#: ..\../main/tools/showtagstool.cpp:42
+#, fuzzy
+msgid "Hide DICOM inspector"
+msgstr "DICOM Inspector"
+
+#: ..\../main/tools/showtagstool.cpp:44
+#, fuzzy
+msgid "Show DICOM inspector"
+msgstr "DICOM Inspector"
+
+#: ..\../main/tools/simpleprinttool.cpp:119
+#, fuzzy
+msgid "Image printing"
+msgstr "A Imprimir "
+
+#: ..\../main/tools/simpleprinttool.cpp:224
+#, fuzzy
+msgid "Page setup"
+msgstr "Configuração de Página"
+
+#: ..\../main/tools/simpleprinttool.cpp:225
+#, fuzzy
+msgid "Print preview"
+msgstr "Antevisão de Impressão"
+
+#: ..\../main/tools/simpleprinttool.cpp:272
+#, fuzzy
+msgid "Print image"
+msgstr "&Imprimir"
+
+#: ..\../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr ""
+
+#: ..\../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr ""
+
+#: ..\../main/tools/undotool.cpp:110
+#, fuzzy
+msgid "Redo"
+msgstr "&Refazer"
+
+#: ..\../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:153
+msgid "Enable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:267
+#, fuzzy
+msgid "Add column"
+msgstr "coluna desconhecida"
+
+#: ..\../main/tools/windowlayouttool.cpp:268
+#, fuzzy
+msgid "Add row"
+msgstr "ADICIONAR"
+
+#: ..\../main/tools/windowlayouttool.cpp:270
+#, fuzzy
+msgid "Remove column"
+msgstr "coluna desconhecida"
+
+#: ..\../main/tools/windowlayouttool.cpp:271
+#, fuzzy
+msgid "Remove row"
+msgstr "Remover"
+
+#: ..\../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr "1x1 Layout"
+
+#: ..\../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr "1x2 Layout"
+
+#: ..\../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr "Plano 2x1"
+
+#: ..\../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr "Plano 2x2"
+
+#: ..\../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr "Plano 3x3"
+
+#: ..\../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr "Plano 4x4"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:82
+#, fuzzy
+msgid "The tool is already registered"
+msgstr "Objecto Já Registado passado para SetObjectClassInfo"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:187
+#, fuzzy
+msgid "The module "
+msgstr "Falha de inicialização do Módulo \"%s\""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:49
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:56
+msgid "Unable to load PNG image resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:63
+msgid "Unable to load GIF animation resource"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr "Valor de calibração é muito baixo"
+
+#: ..\../widgets/gui/calibracion.cpp:219
+#, fuzzy
+msgid "Enter the calibration value"
+msgstr "Valor de calibração é muito baixo"
+
+#: ..\../widgets/gui/calibracion.cpp:225
+#, fuzzy
+msgid "The calibration value is too low"
+msgstr "Valor de calibração é muito baixo"
+
+#: ..\../widgets/gui/calibracion.cpp:229
+#, fuzzy
+msgid "The calibration value is too high"
+msgstr "Valor de calibração é muito baixo"
+
+#: ..\../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr "Calibrando..."
+
+#: ..\../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr "Centímetros"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr ""
+
+#: ..\../widgets/gui/selecciontextobase.cpp:26
+#, fuzzy
+msgid "Note"
+msgstr "Nota, 8 1/2 x 11 pol."
+
+#: ..\../widgets/wangulo.cpp:1101 ..\../widgets/wangulo.cpp:1103
+#, fuzzy
+msgid "Type"
+msgstr "Tipo"
+
+#: ..\../widgets/wangulo.cpp:1101
+#, fuzzy
+msgid "Normal"
+msgstr "Normal"
+
+#: ..\../widgets/wangulo.cpp:1103
+msgid "Cobb"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:721 ..\../widgets/wfreeform.cpp:470
+#: ..\../widgets/wpolygon.cpp:574
+#, fuzzy
+msgid "Center (I)"
+msgstr "Centro"
+
+#: ..\../widgets/welipse.cpp:727 ..\../widgets/wfreeform.cpp:476
+#: ..\../widgets/wpolygon.cpp:580
+#, fuzzy
+msgid "Center (M)"
+msgstr "Centro"
+
+#: ..\../widgets/welipse.cpp:762 ..\../widgets/welipse.cpp:766
+msgid "Greater Radius"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:763 ..\../widgets/welipse.cpp:767
+#, fuzzy
+msgid "Lower Radius"
+msgstr "Letras minúsculas"
+
+#: ..\../widgets/wfreeform.cpp:482 ..\../widgets/wpolygon.cpp:586
+#, fuzzy
+msgid "Number of Vertex"
+msgstr "&Número:"
+
+#: ..\../widgets/wpunto.cpp:353
+#, fuzzy
+msgid "Position (I)"
+msgstr "%i de %i"
+
+#: ..\../widgets/wpunto.cpp:358
+#, fuzzy
+msgid "Position (M)"
+msgstr "A posição de tabulação."
+
+#: ..\../widgets/wrule.cpp:558
+#, fuzzy
+msgid "Image Calibration"
+msgstr "imagem"
+
+#: ..\../widgets/wrule.cpp:663
+#, fuzzy
+msgid "Length"
+msgstr "guardado tamanho do ficheiro não no cabeçalho Zip"
+
+#: ..\../widgets/wrule.cpp:668
+#, fuzzy
+msgid "Points (I)"
+msgstr "%i de %i"
+
+#: ..\../widgets/wrule.cpp:675
+#, fuzzy
+msgid "Points (M)"
+msgstr "Lista o tamanho das fontes em pontos."
+
+#: ..\../widgets/wtextbox.cpp:445
+#, fuzzy
+msgid "Default text"
+msgstr "pré-definição"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:41
+#, fuzzy
+msgid "Commit date"
+msgstr "data"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr "<ID desconhecido>"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr "%d/%m/%Y"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:214
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:219
+#, fuzzy
+msgid "Modified"
+msgstr "Modificado"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr "644654645"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:130
+msgid "Commit inform"
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedades.cpp:30
+#, fuzzy
+msgid "Properties of "
+msgstr "&Propriedades"
+
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:31
+#, fuzzy
+msgid "Widget's Name"
+msgstr "Excluir Widget"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr "< &Anterior"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr "&Cancelar"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3701
+#, fuzzy
+msgid "Regular expression invalid: '"
+msgstr "Expressão regular inválida '%s': %s"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.h:56
+#, fuzzy
+msgid "Overwrite Paths"
+msgstr "Não foi possível sobrepor o ficheiro '%s'"
+
+#: ..\../ginkgopro/ginkgo_pro_defines.h:21
+msgid "Professional DICOM CADx environment"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservers.h:39
+#, fuzzy
+msgid "Server not found"
+msgstr "Encontrado "
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:99
+#, fuzzy
+msgid "DICOM Query/Retrieve"
+msgstr "Não foi possível obter thread de política de agendamento."
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:123
+#, fuzzy
+msgid "Not found"
+msgstr "Encontrado "
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+#, fuzzy
+msgid "Advanced Settings"
+msgstr "Configurações avançadas..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+#, fuzzy
+msgid "Edit profile"
+msgstr "Editar ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+#, fuzzy
+msgid "Add/Edit Location"
+msgstr "Editar ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+#, fuzzy
+msgid "Add window/level"
+msgstr "ADICIONAR"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+#, fuzzy
+msgid "Add tag"
+msgstr "ADICIONAR"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+#, fuzzy
+msgid "Setup window position"
+msgstr "Configurar..."
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.h:61
+#, fuzzy
+msgid "Closing"
+msgstr ""
+"Erros ocorreram ao salvar as séries.\n"
+"Gostaria de fechar mesmo assim? "
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+#, fuzzy
+msgid "DICOM Dir configuration"
+msgstr "Diretório DICOM"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:70
+#, fuzzy
+msgid "Open Ginkgo Cloud"
+msgstr "&Abrir"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:123
+#, fuzzy
+msgid "Ginkgo Cloud search"
+msgstr "Procurar"
+
+#: ..\../main/gui/history3/confirmdeletedialog.h:24
+msgid " from History?"
+msgstr " from History?"
+
+#: ..\../main/gui/history3/historypanel3base.h:100
+#, fuzzy
+msgid "Medical history"
+msgstr " from History?"
+
+#: ..\../main/gui/history3/historypanel3base.h:161
+#, fuzzy
+msgid "Open With ..."
+msgstr "&Abrir"
+
+#: ..\../main/gui/history3/openwithdialog.h:72
+#, fuzzy
+msgid "Select a View"
+msgstr "Seleccionar uma vista de documento"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+#, fuzzy
+msgid "Message detail"
+msgstr "%s mensagem"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+#, fuzzy
+msgid "Log node"
+msgstr "&Registo"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:87
+#, fuzzy
+msgid "Closing Ginkgo CADx"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../main/gui/paneltags/paneltagsbase.h:57
+msgid "DICOM Inspector"
+msgstr "DICOM Inspector"
+
+#: ..\../main/license.h:31
+msgid "Open Source DICOM CADx environment"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.h:65
+#, fuzzy
+msgid "Calibration"
+msgstr "Valor de calibração é muito baixo"
+
+#: ..\../wx/propiedades/wxpropiedadesbase.h:62
+#, fuzzy
+msgid "Properties of ..."
+msgstr "&Propriedades"
+
+#: ..\../wx/thumbnailctrl/thumbnailwidget.h:44
+#, fuzzy
+msgid "Image Browser Dialog"
+msgstr "Opções do Navegador de Ajuda"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+#, fuzzy
+msgid "Test title"
+msgstr "Test connection"
+
+#, fuzzy
+#~ msgid "Failed to store the file, check permissions on the directory"
+#~ msgstr "Erro ao armazenar arquivo, verifique permissões do diretório."
+
+#, fuzzy
+#~ msgid "The key files will not be exported"
+#~ msgstr "Ficheiros"
+
+#, fuzzy
+#~ msgid "Current"
+#~ msgstr "Directório actual:"
+
+#~ msgid "All"
+#~ msgstr "Todos(as)"
+
+#~ msgid "BMP"
+#~ msgstr "BMP"
+
+#, fuzzy
+#~ msgid "PNG"
+#~ msgstr "Não foi possível gravar a imagem PNG."
+
+#~ msgid "Content"
+#~ msgstr "Conteúdo"
+
+#, fuzzy
+#~ msgid "Tile Horizontally"
+#~ msgstr "Dispor &Horizontalmente"
+
+#, fuzzy
+#~ msgid "Tile Vertically"
+#~ msgstr "Dispor &Verticalmente"
+
+#, fuzzy
+#~ msgid "Grid (two columns)"
+#~ msgstr "Grid organization"
+
+#, fuzzy
+#~ msgid "Grid (three columns)"
+#~ msgstr "Grid organization"
+
+#~ msgid "Grid organization"
+#~ msgstr "Grid organization"
+
+#~ msgid "Color"
+#~ msgstr "Cor"
+
+#, fuzzy
+#~ msgid "Vertex (I)"
+#~ msgstr "%i de %i"
+
+#~ msgid "Center"
+#~ msgstr "Centro"
+
+#~ msgid "0"
+#~ msgstr "0"
+
+#~ msgid "Checking program updates..."
+#~ msgstr "Verificando atualizações para o programa..."
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">"
+#~ msgstr ">"
+
+#~ msgid "<"
+#~ msgstr "<"
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid "unknown column"
+#~ msgstr "coluna desconhecida"
+
+#~ msgid "Options"
+#~ msgstr "Opções"
+
+#~ msgid "Categorized Mode"
+#~ msgstr "Modo Categorizado"
+
+#~ msgid "Alphabetic Mode"
+#~ msgstr "Modo Alfabético"
+
+#~ msgid "Error in resource: %s"
+#~ msgstr "Erro no recurso: %s"
+
+#~ msgid "Choose a directory:"
+#~ msgstr "Escolha um diretório:"
+
+#~ msgid "Choose a file"
+#~ msgstr "Escolha um arquivo"
+
+#~ msgid "Use system settings"
+#~ msgstr "Use system settings"
+
+#~ msgid "Authenticate"
+#~ msgstr "Authenticate"
+
+#~ msgid "Show / Hide DICOM tags panel"
+#~ msgstr "Mostrar / Esconder painel de tags DICOM"
+
+#~ msgid "Visualization"
+#~ msgstr "Calibrando..."
+
+#~ msgid "http://ginkgo-cadx.com/en/services/"
+#~ msgstr "http://ginkgo-cadx.com/en/services/"
+
+#~ msgid "Double click to edit"
+#~ msgstr "Clique duas vezes para editar"
+
+#~ msgid ""
+#~ "No results obtained. Maybe you have a wrong PACS server configuration"
+#~ msgstr ""
+#~ "Nenhum resultado obtido. Talvez você tenha uma configuração inválida do "
+#~ "servidor PACS"
+
+#~ msgid ""
+#~ "No results obtained in PACS retrieve.\n"
+#~ "Maybe study doesn't exist or you have a wrong PACS server configuration."
+#~ msgstr ""
+#~ "Nenhum resultado obtido. Talvez você tenha uma configuração inválida do "
+#~ "servidor PACS"
+
+#~ msgid "Clean"
+#~ msgstr "Limpar"
+
+#~ msgid "Error: "
+#~ msgstr "Erro: "
+
+#~ msgid "Error: No images were downloaded"
+#~ msgstr "Erro: Nenhuma imagem foi baixada"
+
+#~ msgid "Error starting network support"
+#~ msgstr "Erro ao iniciar o suporte a rede"
+
+#~ msgid "The selected directory does must be empty"
+#~ msgstr "O diretório selecionado não pode ser aberto"
+
+#~ msgid "Choose the import profile"
+#~ msgstr "Escolha o perfil de importação"
+
+#~ msgid "An error ocurred loading Ginkgo News check your internet connection"
+#~ msgstr ""
+#~ "Um erro ocorreu carregando o Ginkgo News. Verifique sua conexão com a "
+#~ "internet"
+
+#~ msgid "%m-%d-%y %H:%M:%S,%q"
+#~ msgstr "%d-%m-%y %H:%M:%S,%q"
+
+#~ msgid "Extensions Support"
+#~ msgstr "Suporte a extensões"
+
+#~ msgid "URL for new extensions"
+#~ msgstr "URL para novas extensões"
+
+#~ msgid ""
+#~ "\n"
+#~ "There are %d files that overwrite existing files"
+#~ msgstr ""
+#~ "\n"
+#~ "Existem %d arquivos que sobrescrevem arquivos existentes"
+
+#~ msgid "Display Options"
+#~ msgstr "Opções de Exibição"
+
+#~ msgid "Close Panel"
+#~ msgstr "Fechar Painel"
+
+#~ msgid "Close All"
+#~ msgstr "Fechar todos"
+
+#~ msgid "Error deleting the patient in the database:\n"
+#~ msgstr "Erro ao deletar o paciente no banco de dados:\n"
+
+#~ msgid "Error deleting the Study of database:\n"
+#~ msgstr "Erro ao deletar o Estudo do banco de dados:\n"
+
+#~ msgid "Error deleting file from de database: \n"
+#~ msgstr "Erro ao deletar arquivo do banco de dados: \n"
+
+#~ msgid "Error deleting file from database:\n"
+#~ msgstr "Erro ao deletar um arquivo do banco de dados:\n"
+
+#~ msgid "Closing windows..."
+#~ msgstr "Fechando janelas..."
+
+#~ msgid "Opening series..."
+#~ msgstr "Abrindo séries..."
+
+#~ msgid "Activate"
+#~ msgstr "Ativar"
+
+#~ msgid "Not loaded"
+#~ msgstr "Not loaded"
+
+#~ msgid "Import global..."
+#~ msgstr "&Importar ..."
+
+#~ msgid "Obtain extensions..."
+#~ msgstr "Obtain extensions..."
+
+#~ msgid "1.0"
+#~ msgstr "1.0"
+
+#~ msgid "Select files you want to export"
+#~ msgstr "Selecione os arquivos DICOM que você deseja enviar"
+
+#~ msgid "Select Series you want to export"
+#~ msgstr "Select Series you want to export"
+
+#~ msgid "You can't remove opened studies"
+#~ msgstr "Você não pode remover estudos abertos"
+
+#~ msgid "error, have tried to select a file that is not added to history"
+#~ msgstr ""
+#~ "erro, tentou-se selecionar um arquivo que não está adicionado ao histórico"
+
+#~ msgid ""
+#~ "\n"
+#~ "There aren't any stored study that matches with the search filter.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Não existem estudos guardados que correspondem com o filtro de busca\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "To begin working must change filter criteria, acquire an existing study "
+#~ "or import images in DICOM format.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Para começar é necessário alterar os critérios do filtro, adquirir um "
+#~ "estudo existente ou importar imagens no formato DICOM.\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "There is no size in the medical history to show every patients\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Não existe espaço no histórico médico para mostrar todos os pacientes\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Try using filters or collapsing nodes and refresh search\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Tente utilizar filtros ou reduzir nós e atualize a busca\n"
+
+#~ msgid "Acquiring a new DICOM study"
+#~ msgstr "Adquirindo um novo estudo DICOM"
+
+#~ msgid "&Open File"
+#~ msgstr "&Abrir Arquivo"
+
+#~ msgid "Open a DICOM file"
+#~ msgstr "Abrir um arquivo DICOM"
+
+#~ msgid "&Open Folder"
+#~ msgstr "&Abrir Diretório"
+
+#~ msgid "Acquire from a local folder"
+#~ msgstr "Adquirir de um diretório local"
+
+#~ msgid "&Import ..."
+#~ msgstr "&Importar ..."
+
+#~ msgid "12412012 Q"
+#~ msgstr "12412012 Q"
+
+#~ msgid "31/08/1983"
+#~ msgstr "31/08/1983"
+
+#~ msgid "10:20"
+#~ msgstr "10:20"
+
+#~ msgid "31/02/2010"
+#~ msgstr "31/02/2010"
+
+#~ msgid "CT"
+#~ msgstr "CT"
+
+#~ msgid "<Unknow ID>"
+#~ msgstr "<ID desconhecido>"
+
+#~ msgid "Birth date: "
+#~ msgstr "Data de nascimento: "
+
+#~ msgid "&Delete Patient from History"
+#~ msgstr "&Deletar paciente do histórico"
+
+#~ msgid "Failed to remove patient, you have to close opened studies"
+#~ msgstr ""
+#~ "Não foi possível remover paciente, você precisa fechar os estudos abertos"
+
+#~ msgid " for all their support in Ginkgo CADx creation!"
+#~ msgstr " por todo seu apoio na criação do Ginkgo CADx!"
+
+#~ msgid ""
+#~ "Debian-Med team specially Andreas Tille and Karlsten Hilbert: packaging, "
+#~ "testing and bug reporting"
+#~ msgstr ""
+#~ "time Debian-Med especialmente Andreas Tille e Karlsten Hilbert: "
+#~ "empacotamento, testes e relatórios de bug"
+
+#~ msgid "Acquire from a removable unit"
+#~ msgstr "Acquire from a removable unit"
+
+#~ msgid "DICOM &acquisition from PACS"
+#~ msgstr "DICOM &acquisition from PACS"
+
+#~ msgid "Get extensions ..."
+#~ msgstr "Obter extensões ..."
+
+#~ msgid "Start page ..."
+#~ msgstr "Página inicial ..."
+
+#~ msgid "About &Ginkgo CADx ..."
+#~ msgstr "Sobre o &Ginkgo CADx ..."
+
+#~ msgid "About Ginkgo CADx ..."
+#~ msgstr "Sobre o Ginkgo CADx ..."
+
+#~ msgid "Ginkgo CADx settings"
+#~ msgstr "Ginkgo CADx settings"
+
+#~ msgid "3D tools"
+#~ msgstr "Ferramentas 3D"
+
+#~ msgid "Creating new images ..."
+#~ msgstr "Criando novas imagens ..."
+
+#~ msgid "Show On Startup"
+#~ msgstr "Exibir ao Iniciar"
+
+#~ msgid "Deleting a Column"
+#~ msgstr "Deletando Coluna"
+
+#~ msgid "Deleting a Row"
+#~ msgstr "Deletando Linha"
+
+#~ msgid "1x1"
+#~ msgstr "1x1"
+
+#~ msgid "1x2"
+#~ msgstr "1x2"
+
+#~ msgid "2x1"
+#~ msgstr "2x1"
+
+#~ msgid "2X2"
+#~ msgstr "2X2"
+
+#~ msgid "3x3"
+#~ msgstr "3x3"
+
+#~ msgid "4x4"
+#~ msgstr "4x4"
+
+#~ msgid "About Ginkgo CADx..."
+#~ msgstr "Sobre o Ginkgo CADx ..."
+
+#~ msgid " WL"
+#~ msgstr " WL"
+
+#~ msgid " WW"
+#~ msgstr " WW"
+
+#~ msgid " is compatible with Ginkgo CADx "
+#~ msgstr " é compatível com o Ginkgo CADx "
+
+#~ msgid "Are you sure to delete the tag"
+#~ msgstr "Tem certeza que deseja deletar a tag"
+
+#~ msgid "Birthday"
+#~ msgstr "Data de nascimento"
+
+#~ msgid "Code:"
+#~ msgstr "Código:"
+
+#~ msgid "Confirm the removal of the server"
+#~ msgstr "Confirmar remoção do servidor"
+
+#~ msgid "Correction"
+#~ msgstr "Correção"
+
+#~ msgid "Error in receiving the response"
+#~ msgstr "Erro ao receber a resposta"
+
+#~ msgid "Error when making SSL connection"
+#~ msgstr "Erro ao fazer a conexão SSL"
+
+#~ msgid "Error when making the request, writing incomplete"
+#~ msgstr "Erro ao fazer a requisição, escrita incompleta"
+
+#~ msgid ""
+#~ "Failed to perform the HTTP request, the server returned the error code "
+#~ msgstr ""
+#~ "Falha ao fazer a requisição HTTP, o servidor retornou com código de erro "
+
+#~ msgid "In connection openssl Exception:"
+#~ msgstr "Exceção durante conexão openssl"
+
+#~ msgid "No options"
+#~ msgstr "Sem opções"
+
+#~ msgid "No results obtained"
+#~ msgstr "Nenhum resultado obtido"
+
+#~ msgid "http://ginkgo-cadx.com/en/extensions/"
+#~ msgstr "http://ginkgo-cadx.com/en/extensions/"
+
+#~ msgid "Association Aborted"
+#~ msgstr "Associação Abortada"
+
+#~ msgid ""
+#~ "Error in interpreting the parameters of the command line. The file or "
+#~ "directory doesn't exist ("
+#~ msgstr ""
+#~ "Erro ao interpretar os parâmetros da linha de comando. O arquivo ou "
+#~ "diretório não existe ("
+
+#~ msgid "Open again"
+#~ msgstr "Abrir novamente"
+
+#~ msgid ""
+#~ "The series selected is already open\n"
+#~ "Do you want to open it again?"
+#~ msgstr ""
+#~ "A série selecionada já está aberta\n"
+#~ "Você deseja abri-la novamente?"
+
+#~ msgid "The service did not respond correctly to the DICOM standard:"
+#~ msgstr "O serviço não respondeu corretamente ao padrão DICOM:"
diff --git a/cadxcore/lang/pt/wxstd.mo b/cadxcore/lang/pt/wxstd.mo
new file mode 100644
index 0000000..e311d24
Binary files /dev/null and b/cadxcore/lang/pt/wxstd.mo differ
diff --git a/cadxcore/lang/pt/wxstd.po b/cadxcore/lang/pt/wxstd.po
new file mode 100644
index 0000000..09910c8
--- /dev/null
+++ b/cadxcore/lang/pt/wxstd.po
@@ -0,0 +1,9210 @@
+# translation of wxstd.pt.po to Portuguese
+# Copyright (C) 2007 wxWidgets Development Team
+# This file is distributed under wxWindows licence.
+#
+# Mario Pereira <marionrpereira76 at hotmail.com>, 2007.
+# Antonio Cardoso Martins <digiplan.pt at gmail.com>, 2007.
+# Carlos Gonçalves <mail at cgoncalves.info>, 2007.
+msgid ""
+msgstr ""
+"Project-Id-Version: wxWidgets 3.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-01 19:04+0200\n"
+"PO-Revision-Date: 2007-09-20 21:59+0100\n"
+"Last-Translator: Antonio Cardoso Martins <digiplan.pt at gmail.com>\n"
+"Language-Team: Portuguese <opensuse-pt at opensuse.org>\n"
+"Language: pt\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-Generator: KBabel 1.11.4\n"
+
+#: ../src/common/debugrpt.cpp:591
+msgid ""
+"\n"
+"Please send this report to the program maintainer, thank you!\n"
+msgstr ""
+"\n"
+"Envie este relatório ao programador, Obrigado!\n"
+
+#: ../src/richtext/richtextstyledlg.cpp:210
+#: ../src/richtext/richtextstyledlg.cpp:222
+msgid " "
+msgstr " "
+
+#: ../src/generic/dbgrptg.cpp:326
+msgid "              Thank you and we're sorry for the inconvenience!\n"
+msgstr "              Obrigado e desculpe o inconveniência!\n"
+
+#: ../src/common/prntbase.cpp:546
+#, fuzzy, c-format
+msgid " (copy %d of %d)"
+msgstr "Página %d de %d"
+
+#: ../src/common/log.cpp:425
+#, c-format
+msgid " (error %ld: %s)"
+msgstr " (erro %ld: %s)"
+
+#: ../src/common/imagtiff.cpp:75
+#, fuzzy, c-format
+msgid " (in module \"%s\")"
+msgstr "módulo tiff: %s"
+
+#: ../src/common/docview.cpp:1624
+msgid " - "
+msgstr " - "
+
+#: ../src/richtext/richtextprint.cpp:588 ../src/html/htmprint.cpp:704
+msgid " Preview"
+msgstr " Antevisão"
+
+#: ../src/common/fontcmn.cpp:811
+msgid " bold"
+msgstr " destacado"
+
+#: ../src/common/fontcmn.cpp:827
+msgid " italic"
+msgstr " itálico"
+
+#: ../src/common/fontcmn.cpp:807
+msgid " light"
+msgstr " leve"
+
+#: ../src/common/paper.cpp:118
+msgid "#10 Envelope, 4 1/8 x 9 1/2 in"
+msgstr "Envelope #10, 4 1/8 x 9 1/2 pol."
+
+#: ../src/common/paper.cpp:119
+msgid "#11 Envelope, 4 1/2 x 10 3/8 in"
+msgstr "Envelope #11, 4 1/2 x 10 3/8 pol."
+
+#: ../src/common/paper.cpp:120
+msgid "#12 Envelope, 4 3/4 x 11 in"
+msgstr "Envelope #12, 4 3/4 x 11 pol."
+
+#: ../src/common/paper.cpp:121
+msgid "#14 Envelope, 5 x 11 1/2 in"
+msgstr "Envelope #14, 5 x 11 1/2 pol."
+
+#: ../src/common/paper.cpp:117
+msgid "#9 Envelope, 3 7/8 x 8 7/8 in"
+msgstr "Envelope #9, 3 7/8 x 8 7/8 pol."
+
+#: ../src/html/helpwnd.cpp:1044
+#, fuzzy, c-format
+msgid "%d of %lu"
+msgstr "%i de %i"
+
+#: ../src/html/helpwnd.cpp:1681 ../src/html/helpwnd.cpp:1719
+#, c-format
+msgid "%i of %i"
+msgstr "%i de %i"
+
+#: ../src/generic/filectrlg.cpp:315
+#, c-format
+msgid "%ld byte"
+msgid_plural "%ld bytes"
+msgstr[0] "%ld byte"
+msgstr[1] "%ld bytes"
+
+#: ../src/html/helpwnd.cpp:1046
+#, fuzzy, c-format
+msgid "%lu of %lu"
+msgstr "%i de %i"
+
+#: ../src/common/cmdline.cpp:1050
+#, c-format
+msgid "%s (or %s)"
+msgstr "%s (ou %s)"
+
+#: ../src/generic/logg.cpp:230
+#, c-format
+msgid "%s Error"
+msgstr "%s Erro"
+
+#: ../src/generic/logg.cpp:242
+#, c-format
+msgid "%s Information"
+msgstr "%s Informação"
+
+#: ../src/generic/preferencesg.cpp:110
+#, fuzzy, c-format
+msgid "%s Preferences"
+msgstr "&Preferências"
+
+#: ../src/generic/logg.cpp:234
+#, c-format
+msgid "%s Warning"
+msgstr "%s Aviso"
+
+#: ../src/common/tarstrm.cpp:1319
+#, c-format
+msgid "%s did not fit the tar header for entry '%s'"
+msgstr "%s não coube no cabeçalho tar para a entrada '%s'"
+
+#: ../src/common/fldlgcmn.cpp:106
+#, c-format
+msgid "%s files (%s)|%s"
+msgstr "%s ficheiros (%s)|%s"
+
+#: ../src/common/stockitem.cpp:139 ../src/html/helpfrm.cpp:142
+#: ../src/html/helpfrm.cpp:144
+msgid "&About"
+msgstr "&Sobre"
+
+#: ../src/common/stockitem.cpp:207
+msgid "&Actual Size"
+msgstr "T&amanho Actual"
+
+#: ../src/richtext/richtextindentspage.cpp:262
+#, fuzzy
+msgid "&After a paragraph:"
+msgstr "Depois de um parágrafo:"
+
+#: ../src/richtext/richtextindentspage.cpp:128
+#: ../src/richtext/richtextliststylepage.cpp:319
+msgid "&Alignment"
+msgstr "&Alinhamento"
+
+#: ../src/common/stockitem.cpp:141
+msgid "&Apply"
+msgstr "&Aplicar"
+
+#: ../src/richtext/richtextstyledlg.cpp:251
+msgid "&Apply Style"
+msgstr "&Aplicar Estilo"
+
+#: ../src/msw/mdi.cpp:175
+msgid "&Arrange Icons"
+msgstr "&Organizar Ícones"
+
+#: ../src/common/stockitem.cpp:195
+msgid "&Ascending"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:142
+msgid "&Back"
+msgstr "&Retroceder"
+
+#: ../src/richtext/richtextstylepage.cpp:113
+msgid "&Based on:"
+msgstr "&Baseado em:"
+
+#: ../src/richtext/richtextindentspage.cpp:253
+#, fuzzy
+msgid "&Before a paragraph:"
+msgstr "Antes de um parágrafo:"
+
+#: ../src/richtext/richtextfontpage.cpp:271
+#, fuzzy
+msgid "&Bg colour:"
+msgstr "&Cor:"
+
+#: ../src/common/stockitem.cpp:143
+msgid "&Bold"
+msgstr "&Destacado"
+
+#: ../src/common/stockitem.cpp:144
+msgid "&Bottom"
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:359
+#: ../src/richtext/richtextborderspage.cpp:503
+#: ../src/richtext/richtextmarginspage.cpp:260
+#: ../src/richtext/richtextmarginspage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:637
+#: ../src/richtext/richtextsizepage.cpp:644
+msgid "&Bottom:"
+msgstr ""
+
+#: ../include/wx/richtext/richtextbuffer.h:3530
+#, fuzzy
+msgid "&Box"
+msgstr "&Destacado"
+
+#: ../src/richtext/richtextliststylepage.cpp:210
+#: ../src/richtext/richtextbulletspage.cpp:159
+msgid "&Bullet style:"
+msgstr "Estilo do &Marcador:"
+
+#: ../src/common/stockitem.cpp:146
+msgid "&CD-Rom"
+msgstr ""
+
+#: ../src/generic/wizard.cpp:432 ../src/generic/fontdlgg.cpp:470
+#: ../src/generic/fontdlgg.cpp:489 ../src/osx/carbon/fontdlg.cpp:588
+#: ../src/common/stockitem.cpp:145
+msgid "&Cancel"
+msgstr "&Cancelar"
+
+#: ../src/msw/mdi.cpp:171
+msgid "&Cascade"
+msgstr "&Cascata"
+
+#: ../include/wx/richtext/richtextbuffer.h:5587
+#, fuzzy
+msgid "&Cell"
+msgstr "&Cancelar"
+
+#: ../src/richtext/richtextsymboldlg.cpp:439
+msgid "&Character code:"
+msgstr "Código de &Caracter:"
+
+#: ../src/common/stockitem.cpp:147
+msgid "&Clear"
+msgstr "&Limpar"
+
+#: ../src/generic/logg.cpp:522 ../src/common/stockitem.cpp:148
+#: ../src/common/prntbase.cpp:1570 ../src/univ/themes/win32.cpp:3756
+#: ../src/html/helpfrm.cpp:139
+msgid "&Close"
+msgstr "&Fechar"
+
+#: ../src/common/stockitem.cpp:193
+#, fuzzy
+msgid "&Color"
+msgstr "&Cor:"
+
+#: ../src/richtext/richtextfontpage.cpp:258
+msgid "&Colour:"
+msgstr "&Cor:"
+
+#: ../src/common/stockitem.cpp:149
+#, fuzzy
+msgid "&Convert"
+msgstr "Conteúdos"
+
+#: ../src/richtext/richtextctrl.cpp:326 ../src/osx/textctrl_osx.cpp:583
+#: ../src/common/stockitem.cpp:150 ../src/msw/textctrl.cpp:2284
+msgid "&Copy"
+msgstr "&Copiar"
+
+#: ../src/generic/hyperlinkg.cpp:156
+#, fuzzy
+msgid "&Copy URL"
+msgstr "&Copiar"
+
+#: ../src/common/headerctrlcmn.cpp:328
+#, fuzzy
+msgid "&Customize..."
+msgstr "tamanho da fonte"
+
+#: ../src/generic/dbgrptg.cpp:334
+msgid "&Debug report preview:"
+msgstr "Antevisão do relatório de &depuração:"
+
+#: ../src/richtext/richtexttabspage.cpp:142
+#: ../src/richtext/richtextctrl.cpp:328 ../src/osx/textctrl_osx.cpp:585
+#: ../src/common/stockitem.cpp:152 ../src/msw/textctrl.cpp:2286
+msgid "&Delete"
+msgstr "&Apagar"
+
+#: ../src/richtext/richtextstyledlg.cpp:269
+msgid "&Delete Style..."
+msgstr "&Apagar Estilo..."
+
+#: ../src/common/stockitem.cpp:196
+msgid "&Descending"
+msgstr ""
+
+#: ../src/generic/logg.cpp:688
+msgid "&Details"
+msgstr "&Detalhes"
+
+#: ../src/common/stockitem.cpp:153
+msgid "&Down"
+msgstr "&Baixo"
+
+#: ../src/common/stockitem.cpp:154
+msgid "&Edit"
+msgstr "&Editar"
+
+#: ../src/richtext/richtextstyledlg.cpp:263
+msgid "&Edit Style..."
+msgstr "&Editar Estilo..."
+
+#: ../src/common/stockitem.cpp:155
+msgid "&Execute"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:157 ../src/html/helpfrm.cpp:146
+msgid "&File"
+msgstr "&Ficheiro"
+
+#: ../src/common/stockitem.cpp:158
+msgid "&Find"
+msgstr "&Procurar"
+
+#: ../src/generic/wizard.cpp:626
+msgid "&Finish"
+msgstr "&Terminar"
+
+#: ../src/common/stockitem.cpp:159
+#, fuzzy
+msgid "&First"
+msgstr "primeiro"
+
+#: ../src/richtext/richtextsizepage.cpp:244
+msgid "&Floating mode:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:160
+#, fuzzy
+msgid "&Floppy"
+msgstr "&Copiar"
+
+#: ../src/common/stockitem.cpp:194
+#, fuzzy
+msgid "&Font"
+msgstr "&Fonte:"
+
+#: ../src/generic/fontdlgg.cpp:371
+msgid "&Font family:"
+msgstr "Família de &fonte:"
+
+#: ../src/richtext/richtextliststylepage.cpp:194
+msgid "&Font for Level..."
+msgstr "&Fonte para Nível..."
+
+#: ../src/richtext/richtextfontpage.cpp:156
+#: ../src/richtext/richtextsymboldlg.cpp:400
+msgid "&Font:"
+msgstr "&Fonte:"
+
+#: ../src/common/stockitem.cpp:161
+msgid "&Forward"
+msgstr "&Avançar"
+
+#: ../src/richtext/richtextsymboldlg.cpp:451
+msgid "&From:"
+msgstr "&De:"
+
+#: ../src/common/stockitem.cpp:162
+msgid "&Harddisk"
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:351
+#: ../src/richtext/richtextsizepage.cpp:358
+#, fuzzy
+msgid "&Height:"
+msgstr "&Peso:"
+
+#: ../src/generic/wizard.cpp:435 ../src/richtext/richtextstyledlg.cpp:303
+#: ../src/richtext/richtextsymboldlg.cpp:479 ../src/osx/menu_osx.cpp:785
+#: ../src/common/stockitem.cpp:163 ../src/html/helpfrm.cpp:147
+msgid "&Help"
+msgstr "&Ajuda"
+
+#: ../include/wx/richmsgdlg.h:30
+#, fuzzy
+msgid "&Hide details"
+msgstr "&Detalhes"
+
+#: ../src/common/stockitem.cpp:164
+msgid "&Home"
+msgstr "&Início"
+
+#: ../src/richtext/richtextindentspage.cpp:184
+#: ../src/richtext/richtextliststylepage.cpp:372
+msgid "&Indentation (tenths of a mm)"
+msgstr "&Indentação (décimos de mm)"
+
+#: ../src/richtext/richtextindentspage.cpp:167
+#: ../src/richtext/richtextliststylepage.cpp:356
+msgid "&Indeterminate"
+msgstr "&Indeterminado"
+
+#: ../src/common/stockitem.cpp:166
+msgid "&Index"
+msgstr "&Índice"
+
+#: ../src/common/stockitem.cpp:167
+#, fuzzy
+msgid "&Info"
+msgstr "&Desfazer"
+
+#: ../src/common/stockitem.cpp:168
+msgid "&Italic"
+msgstr "&Itálico"
+
+#: ../src/common/stockitem.cpp:169
+msgid "&Jump to"
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:153
+#: ../src/richtext/richtextliststylepage.cpp:342
+msgid "&Justified"
+msgstr "&Justificado"
+
+#: ../src/common/stockitem.cpp:174
+#, fuzzy
+msgid "&Last"
+msgstr "&Colar"
+
+#: ../src/richtext/richtextindentspage.cpp:139
+#: ../src/richtext/richtextliststylepage.cpp:328
+msgid "&Left"
+msgstr "&Esquerda"
+
+#: ../src/richtext/richtextindentspage.cpp:195
+#: ../src/richtext/richtextborderspage.cpp:269
+#: ../src/richtext/richtextborderspage.cpp:413
+#: ../src/richtext/richtextliststylepage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:187
+#: ../src/richtext/richtextmarginspage.cpp:301
+#: ../src/richtext/richtextsizepage.cpp:532
+#: ../src/richtext/richtextsizepage.cpp:539
+msgid "&Left:"
+msgstr "&Esquerda:"
+
+#: ../src/richtext/richtextliststylepage.cpp:183
+msgid "&List level:"
+msgstr "&Lista de nível:"
+
+#: ../src/generic/logg.cpp:523
+msgid "&Log"
+msgstr "&Registo"
+
+#: ../src/univ/themes/win32.cpp:3748
+msgid "&Move"
+msgstr "&Mover"
+
+#: ../src/richtext/richtextsizepage.cpp:672
+msgid "&Move the object to:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:175
+#, fuzzy
+msgid "&Network"
+msgstr "&Novo"
+
+#: ../src/richtext/richtexttabspage.cpp:136 ../src/common/stockitem.cpp:176
+msgid "&New"
+msgstr "&Novo"
+
+#: ../src/aui/tabmdi.cpp:111 ../src/generic/mdig.cpp:100
+#: ../src/msw/mdi.cpp:176
+msgid "&Next"
+msgstr "&Próximo"
+
+#: ../src/generic/wizard.cpp:431 ../src/generic/wizard.cpp:626
+msgid "&Next >"
+msgstr "&Próximo >"
+
+#: ../src/richtext/richtextsizepage.cpp:681
+#, fuzzy
+msgid "&Next Paragraph"
+msgstr "Depois de um parágrafo:"
+
+#: ../src/generic/tipdlg.cpp:276
+msgid "&Next Tip"
+msgstr "&Próxima Dica"
+
+#: ../src/richtext/richtextstylepage.cpp:123
+msgid "&Next style:"
+msgstr "&Próximo estilo:"
+
+#: ../src/common/stockitem.cpp:177 ../src/msw/msgdlg.cpp:476
+msgid "&No"
+msgstr "&Não"
+
+#: ../src/generic/dbgrptg.cpp:356
+msgid "&Notes:"
+msgstr "&Notas:"
+
+#: ../src/richtext/richtextbulletspage.cpp:264
+msgid "&Number:"
+msgstr "&Número:"
+
+#: ../src/generic/fontdlgg.cpp:475 ../src/generic/fontdlgg.cpp:482
+#: ../src/osx/carbon/fontdlg.cpp:594 ../src/common/stockitem.cpp:178
+msgid "&OK"
+msgstr "&OK"
+
+#: ../src/generic/dbgrptg.cpp:342 ../src/common/stockitem.cpp:179
+#: ../src/html/helpfrm.cpp:137
+msgid "&Open..."
+msgstr "&Abrir..."
+
+#: ../src/richtext/richtextindentspage.cpp:222
+#, fuzzy
+msgid "&Outline level:"
+msgstr "&Lista de nível:"
+
+#: ../src/richtext/richtextindentspage.cpp:293
+msgid "&Page Break"
+msgstr ""
+
+#: ../src/richtext/richtextctrl.cpp:327 ../src/osx/textctrl_osx.cpp:584
+#: ../src/common/stockitem.cpp:180 ../src/msw/textctrl.cpp:2285
+msgid "&Paste"
+msgstr "&Colar"
+
+#: ../include/wx/richtext/richtextbuffer.h:4655
+msgid "&Picture"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:422
+msgid "&Point size:"
+msgstr "Tamanho do &ponto:"
+
+#: ../src/richtext/richtexttabspage.cpp:114
+msgid "&Position (tenths of a mm):"
+msgstr "&Posição (décimos de mm):"
+
+#: ../src/richtext/richtextsizepage.cpp:514
+#, fuzzy
+msgid "&Position mode:"
+msgstr "Pergunta"
+
+#: ../src/common/stockitem.cpp:181
+msgid "&Preferences"
+msgstr "&Preferências"
+
+#: ../src/aui/tabmdi.cpp:112 ../src/generic/mdig.cpp:101
+#: ../src/msw/mdi.cpp:177
+msgid "&Previous"
+msgstr "&Anterior"
+
+#: ../src/richtext/richtextsizepage.cpp:675
+#, fuzzy
+msgid "&Previous Paragraph"
+msgstr "Página anterior"
+
+#: ../src/common/stockitem.cpp:183
+msgid "&Print..."
+msgstr "&Imprimir..."
+
+#: ../src/richtext/richtextctrl.cpp:332 ../src/richtext/richtextctrl.cpp:4945
+#: ../src/common/stockitem.cpp:184
+msgid "&Properties"
+msgstr "&Propriedades"
+
+#: ../src/common/stockitem.cpp:156
+msgid "&Quit"
+msgstr "&Desistir"
+
+#: ../src/richtext/richtextctrl.cpp:323 ../src/osx/textctrl_osx.cpp:580
+#: ../src/common/stockitem.cpp:185 ../src/common/cmdproc.cpp:293
+#: ../src/common/cmdproc.cpp:300 ../src/msw/textctrl.cpp:2281
+msgid "&Redo"
+msgstr "&Refazer"
+
+#: ../src/common/cmdproc.cpp:289 ../src/common/cmdproc.cpp:309
+msgid "&Redo "
+msgstr "&Refazer "
+
+#: ../src/richtext/richtextstyledlg.cpp:257
+msgid "&Rename Style..."
+msgstr "&Renomear Estilo..."
+
+#: ../src/generic/fdrepdlg.cpp:179
+msgid "&Replace"
+msgstr "&Substituir"
+
+#: ../src/richtext/richtextstyledlg.cpp:287
+msgid "&Restart numbering"
+msgstr "&Recomeçar numeração"
+
+#: ../src/univ/themes/win32.cpp:3747
+msgid "&Restore"
+msgstr "&Restaurar"
+
+#: ../src/richtext/richtextindentspage.cpp:146
+#: ../src/richtext/richtextliststylepage.cpp:335
+msgid "&Right"
+msgstr "Di&reita"
+
+#: ../src/richtext/richtextindentspage.cpp:213
+#: ../src/richtext/richtextborderspage.cpp:299
+#: ../src/richtext/richtextborderspage.cpp:443
+#: ../src/richtext/richtextliststylepage.cpp:399
+#: ../src/richtext/richtextmarginspage.cpp:212
+#: ../src/richtext/richtextmarginspage.cpp:326
+#: ../src/richtext/richtextsizepage.cpp:602
+#: ../src/richtext/richtextsizepage.cpp:609
+msgid "&Right:"
+msgstr "Di&reita:"
+
+#: ../src/common/stockitem.cpp:190
+msgid "&Save"
+msgstr "&Guardar"
+
+#: ../src/common/stockitem.cpp:191
+#, fuzzy
+msgid "&Save as"
+msgstr "Gravar Como"
+
+#: ../include/wx/richmsgdlg.h:29
+#, fuzzy
+msgid "&See details"
+msgstr "&Detalhes"
+
+#: ../src/generic/tipdlg.cpp:270
+msgid "&Show tips at startup"
+msgstr "&Mostrar dicas no inicio"
+
+#: ../src/univ/themes/win32.cpp:3750
+msgid "&Size"
+msgstr "&Tamanho"
+
+#: ../src/richtext/richtextfontpage.cpp:168
+msgid "&Size:"
+msgstr "&Tamanho:"
+
+#: ../src/generic/progdlgg.cpp:282
+#, fuzzy
+msgid "&Skip"
+msgstr "Saltar"
+
+#: ../src/richtext/richtextindentspage.cpp:242
+#: ../src/richtext/richtextliststylepage.cpp:417
+msgid "&Spacing (tenths of a mm)"
+msgstr "E&spaçamento (décimos de mm)"
+
+#: ../src/common/stockitem.cpp:197
+msgid "&Spell Check"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:198
+msgid "&Stop"
+msgstr "&Parar"
+
+#: ../src/richtext/richtextfontpage.cpp:284 ../src/common/stockitem.cpp:199
+msgid "&Strikethrough"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:382 ../src/richtext/richtextstylepage.cpp:104
+msgid "&Style:"
+msgstr "E&stilo:"
+
+#: ../src/richtext/richtextstyledlg.cpp:198
+msgid "&Styles:"
+msgstr "E&stilos:"
+
+#: ../src/richtext/richtextsymboldlg.cpp:413
+msgid "&Subset:"
+msgstr "&Subconjunto:"
+
+#: ../src/richtext/richtextliststylepage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:222
+msgid "&Symbol:"
+msgstr "&Símbolo:"
+
+#: ../include/wx/richtext/richtextbuffer.h:5679
+#, fuzzy
+msgid "&Table"
+msgstr "Tabs"
+
+#: ../src/common/stockitem.cpp:200
+#, fuzzy
+msgid "&Top"
+msgstr "&Copiar"
+
+#: ../src/richtext/richtextborderspage.cpp:329
+#: ../src/richtext/richtextborderspage.cpp:473
+#: ../src/richtext/richtextmarginspage.cpp:235
+#: ../src/richtext/richtextmarginspage.cpp:349
+#: ../src/richtext/richtextsizepage.cpp:567
+#: ../src/richtext/richtextsizepage.cpp:574
+#, fuzzy
+msgid "&Top:"
+msgstr "Para:"
+
+#: ../src/generic/fontdlgg.cpp:444 ../src/common/stockitem.cpp:202
+msgid "&Underline"
+msgstr "S&ublinhado"
+
+#: ../src/richtext/richtextfontpage.cpp:243
+msgid "&Underlining:"
+msgstr "S&ublinhar:"
+
+#: ../src/richtext/richtextctrl.cpp:322 ../src/osx/textctrl_osx.cpp:579
+#: ../src/common/stockitem.cpp:203 ../src/common/cmdproc.cpp:271
+#: ../src/msw/textctrl.cpp:2280
+msgid "&Undo"
+msgstr "&Desfazer"
+
+#: ../src/common/cmdproc.cpp:265
+msgid "&Undo "
+msgstr "&Desfazer "
+
+#: ../src/common/stockitem.cpp:204
+msgid "&Unindent"
+msgstr "&Desindentar"
+
+#: ../src/common/stockitem.cpp:205
+msgid "&Up"
+msgstr "&Cima"
+
+#: ../src/richtext/richtextsizepage.cpp:278
+#, fuzzy
+msgid "&Vertical alignment:"
+msgstr "&Alinhamento de Marcador:"
+
+#: ../src/generic/dbgrptg.cpp:340
+#, fuzzy
+msgid "&View..."
+msgstr "&Abrir..."
+
+#: ../src/generic/fontdlgg.cpp:393
+msgid "&Weight:"
+msgstr "&Peso:"
+
+#: ../src/richtext/richtextsizepage.cpp:317
+#: ../src/richtext/richtextsizepage.cpp:324
+#, fuzzy
+msgid "&Width:"
+msgstr "&Peso:"
+
+#: ../src/aui/tabmdi.cpp:311 ../src/aui/tabmdi.cpp:327
+#: ../src/aui/tabmdi.cpp:329 ../src/generic/mdig.cpp:294
+#: ../src/generic/mdig.cpp:310 ../src/generic/mdig.cpp:314
+#: ../src/msw/mdi.cpp:77
+msgid "&Window"
+msgstr "&Janela"
+
+#: ../src/common/stockitem.cpp:206 ../src/msw/msgdlg.cpp:476
+msgid "&Yes"
+msgstr "&Sim"
+
+#: ../src/common/config.cpp:523 ../src/msw/regconf.cpp:258
+#, c-format
+msgid "'%s' has extra '..', ignored."
+msgstr "'%s' tem extra '..', ignorado."
+
+#: ../src/common/valtext.cpp:249 ../src/common/valtext.cpp:251
+#: ../src/common/valtext.cpp:253 ../src/common/valtext.cpp:255
+#, c-format
+msgid "'%s' is invalid"
+msgstr "'%s' é inválido"
+
+#: ../src/common/cmdline.cpp:948 ../src/common/cmdline.cpp:966
+#, c-format
+msgid "'%s' is not a correct numeric value for option '%s'."
+msgstr "'%s' não é um valor numérico correcto para a opção '%s'."
+
+#: ../src/common/translation.cpp:1086
+#, c-format
+msgid "'%s' is not a valid message catalog."
+msgstr "'%s' não é uma mensagem válida do catálogo."
+
+#: ../src/common/textbuf.cpp:239
+#, c-format
+msgid "'%s' is probably a binary buffer."
+msgstr "'%s' é capaz de ser um buffer binário."
+
+#: ../src/common/valtext.cpp:247
+#, c-format
+msgid "'%s' should be numeric."
+msgstr "'%s' deve ser numérico."
+
+#: ../src/common/valtext.cpp:239
+#, c-format
+msgid "'%s' should only contain ASCII characters."
+msgstr "'%s' apenas deve conter caracteres ASCII."
+
+#: ../src/common/valtext.cpp:241
+#, c-format
+msgid "'%s' should only contain alphabetic characters."
+msgstr "'%s' deve apenas conter caracteres alfabéticos."
+
+#: ../src/common/valtext.cpp:243
+#, c-format
+msgid "'%s' should only contain alphabetic or numeric characters."
+msgstr "'%s' deve apenas conter caracteres alfabéticos e numéricos."
+
+#: ../src/common/valtext.cpp:245
+#, fuzzy, c-format
+msgid "'%s' should only contain digits."
+msgstr "'%s' apenas deve conter caracteres ASCII."
+
+#: ../src/richtext/richtextliststylepage.cpp:229
+#: ../src/richtext/richtextbulletspage.cpp:179
+msgid "(*)"
+msgstr "(*)"
+
+#: ../src/html/helpwnd.cpp:976
+msgid "(Help)"
+msgstr "(Ajuda)"
+
+#: ../src/richtext/richtextliststylepage.cpp:481
+#: ../src/richtext/richtextbulletspage.cpp:286
+msgid "(None)"
+msgstr "(Nenhum)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:504
+msgid "(Normal text)"
+msgstr "(Texto normal)"
+
+#: ../src/html/helpwnd.cpp:426 ../src/html/helpwnd.cpp:1119
+#: ../src/html/helpwnd.cpp:1745
+msgid "(bookmarks)"
+msgstr "(marcadores)"
+
+#: ../src/richtext/richtextindentspage.cpp:274
+#: ../src/richtext/richtextindentspage.cpp:286
+#: ../src/richtext/richtextindentspage.cpp:287
+#: ../src/richtext/richtextindentspage.cpp:311
+#: ../src/richtext/richtextindentspage.cpp:326
+#: ../src/richtext/richtextformatdlg.cpp:831
+#: ../src/richtext/richtextfontpage.cpp:331
+#: ../src/richtext/richtextfontpage.cpp:335
+#: ../src/richtext/richtextfontpage.cpp:339
+#: ../src/richtext/richtextliststylepage.cpp:448
+#: ../src/richtext/richtextliststylepage.cpp:460
+#: ../src/richtext/richtextliststylepage.cpp:461
+msgid "(none)"
+msgstr "(nenhum)"
+
+#: ../src/richtext/richtextliststylepage.cpp:492
+#: ../src/richtext/richtextbulletspage.cpp:297
+msgid "*"
+msgstr "*"
+
+#: ../src/richtext/richtextliststylepage.cpp:236
+#: ../src/richtext/richtextbulletspage.cpp:186
+msgid "*)"
+msgstr "*)"
+
+#: ../src/richtext/richtextliststylepage.cpp:495
+#: ../src/richtext/richtextbulletspage.cpp:300
+msgid "+"
+msgstr "+"
+
+#: ../src/msw/utils.cpp:1324
+msgid ", 64-bit edition"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:493
+#: ../src/richtext/richtextbulletspage.cpp:298
+msgid "-"
+msgstr "-"
+
+#: ../src/generic/filepickerg.cpp:66
+msgid "..."
+msgstr ""
+
+#: ../src/richtext/richtextindentspage.cpp:276
+#: ../src/richtext/richtextliststylepage.cpp:450
+#, fuzzy
+msgid "1.1"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:277
+#: ../src/richtext/richtextliststylepage.cpp:451
+#, fuzzy
+msgid "1.2"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:278
+#: ../src/richtext/richtextliststylepage.cpp:452
+#, fuzzy
+msgid "1.3"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:279
+#: ../src/richtext/richtextliststylepage.cpp:453
+#, fuzzy
+msgid "1.4"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:280
+#: ../src/richtext/richtextliststylepage.cpp:454
+msgid "1.5"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:455
+#, fuzzy
+msgid "1.6"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:282
+#: ../src/richtext/richtextliststylepage.cpp:456
+#, fuzzy
+msgid "1.7"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:283
+#: ../src/richtext/richtextliststylepage.cpp:457
+#, fuzzy
+msgid "1.8"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:284
+#: ../src/richtext/richtextliststylepage.cpp:458
+#, fuzzy
+msgid "1.9"
+msgstr "1.5"
+
+#: ../src/common/paper.cpp:141
+msgid "10 x 11 in"
+msgstr "10 x 11 pol."
+
+#: ../src/common/paper.cpp:114
+msgid "10 x 14 in"
+msgstr "10 x 14 pol."
+
+#: ../src/common/paper.cpp:115
+msgid "11 x 17 in"
+msgstr "11 x 17 pol."
+
+#: ../src/common/paper.cpp:185
+msgid "12 x 11 in"
+msgstr "12 x 11 pol."
+
+#: ../src/common/paper.cpp:142
+msgid "15 x 11 in"
+msgstr "15 x 11 pol."
+
+#: ../src/richtext/richtextindentspage.cpp:285
+#: ../src/richtext/richtextliststylepage.cpp:459
+msgid "2"
+msgstr "2"
+
+#: ../src/common/paper.cpp:133
+msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in"
+msgstr "Envelope 6 3/4, 3 5/8 x 6 1/2 pol."
+
+#: ../src/common/paper.cpp:140
+msgid "9 x 11 in"
+msgstr "9 x 11 pol."
+
+#: ../src/html/htmprint.cpp:431
+msgid ": file does not exist!"
+msgstr ": ficheiro inexistente!"
+
+#: ../src/common/fontmap.cpp:199
+msgid ": unknown charset"
+msgstr ": conjunto de caracteres desconhecido"
+
+#: ../src/common/fontmap.cpp:413
+msgid ": unknown encoding"
+msgstr ": codificação desconhecida"
+
+#: ../src/generic/wizard.cpp:437
+msgid "< &Back"
+msgstr "< &Atrás"
+
+#: ../src/osx/carbon/fontdlg.cpp:608 ../src/osx/carbon/fontdlg.cpp:815
+#: ../src/osx/carbon/fontdlg.cpp:835
+msgid "<Any Decorative>"
+msgstr "<Qualquer Decorative>"
+
+#: ../src/osx/carbon/fontdlg.cpp:609 ../src/osx/carbon/fontdlg.cpp:817
+#: ../src/osx/carbon/fontdlg.cpp:837
+msgid "<Any Modern>"
+msgstr "<Qualquer Modern>"
+
+#: ../src/osx/carbon/fontdlg.cpp:607 ../src/osx/carbon/fontdlg.cpp:813
+#: ../src/osx/carbon/fontdlg.cpp:833
+msgid "<Any Roman>"
+msgstr "<Qualquer Roman>"
+
+#: ../src/osx/carbon/fontdlg.cpp:610 ../src/osx/carbon/fontdlg.cpp:819
+#: ../src/osx/carbon/fontdlg.cpp:839
+msgid "<Any Script>"
+msgstr "<Qualquer Script>"
+
+#: ../src/osx/carbon/fontdlg.cpp:611 ../src/osx/carbon/fontdlg.cpp:824
+#: ../src/osx/carbon/fontdlg.cpp:843
+msgid "<Any Swiss>"
+msgstr "<Qualquer Swiss>"
+
+#: ../src/osx/carbon/fontdlg.cpp:612 ../src/osx/carbon/fontdlg.cpp:821
+#: ../src/osx/carbon/fontdlg.cpp:841
+msgid "<Any Teletype>"
+msgstr "<Qualquer Teletype>"
+
+#: ../src/osx/carbon/fontdlg.cpp:606
+msgid "<Any>"
+msgstr "<Qualquer>"
+
+#: ../src/generic/filectrlg.cpp:286 ../src/generic/filectrlg.cpp:309
+msgid "<DIR>"
+msgstr "<DIR>"
+
+#: ../src/generic/filectrlg.cpp:290 ../src/generic/filectrlg.cpp:313
+msgid "<DRIVE>"
+msgstr "<UNIDADE>"
+
+#: ../src/generic/filectrlg.cpp:288 ../src/generic/filectrlg.cpp:311
+msgid "<LINK>"
+msgstr "<LINK>"
+
+#: ../src/html/helpwnd.cpp:1279
+msgid "<b><i>Bold italic face.</i></b><br>"
+msgstr "<b><i>Face destacado itálico.</i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1283
+msgid "<b><i>bold italic <u>underlined</u></i></b><br>"
+msgstr "<b><i>destacado itálico <u>sublinhado</u></i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1278
+msgid "<b>Bold face.</b> "
+msgstr "<b>Face destacado.</b> "
+
+#: ../src/html/helpwnd.cpp:1277
+msgid "<i>Italic face.</i> "
+msgstr "<i>Face itálico.</i> "
+
+#: ../src/richtext/richtextliststylepage.cpp:494
+#: ../src/richtext/richtextbulletspage.cpp:299
+msgid ">"
+msgstr ">"
+
+#: ../src/generic/dbgrptg.cpp:318
+msgid "A debug report has been generated in the directory\n"
+msgstr "Um relatório de depuração de erros foi gerado no directório\n"
+
+#: ../src/common/debugrpt.cpp:578
+#, fuzzy
+msgid "A debug report has been generated. It can be found in"
+msgstr "Um relatório de depuração de erros foi gerado no directório\n"
+
+#: ../src/common/xtixml.cpp:418
+msgid "A non empty collection must consist of 'element' nodes"
+msgstr "uma colecção não vazia deve consistir em nós de 'element'"
+
+#: ../src/richtext/richtextliststylepage.cpp:304
+#: ../src/richtext/richtextliststylepage.cpp:306
+#: ../src/richtext/richtextbulletspage.cpp:257
+#: ../src/richtext/richtextbulletspage.cpp:259
+msgid "A standard bullet name."
+msgstr "Um nome standard para o marcador."
+
+#: ../src/common/paper.cpp:218
+#, fuzzy
+msgid "A0 sheet, 841 x 1189 mm"
+msgstr "Folha A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:219
+#, fuzzy
+msgid "A1 sheet, 594 x 841 mm"
+msgstr "Folha A3, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:160
+msgid "A2 420 x 594 mm"
+msgstr "A2 420 x 594 mm"
+
+#: ../src/common/paper.cpp:157
+msgid "A3 Extra 322 x 445 mm"
+msgstr "A3 Extra 322 x 445 mm"
+
+#: ../src/common/paper.cpp:162
+msgid "A3 Extra Transverse 322 x 445 mm"
+msgstr "A3 Extra Transverso 322 x 445 mm"
+
+#: ../src/common/paper.cpp:171
+msgid "A3 Rotated 420 x 297 mm"
+msgstr "A3 Rodado 420 x 297 mm"
+
+#: ../src/common/paper.cpp:161
+msgid "A3 Transverse 297 x 420 mm"
+msgstr "A3 Transverso 297 x 420 mm"
+
+#: ../src/common/paper.cpp:107
+msgid "A3 sheet, 297 x 420 mm"
+msgstr "Folha A3, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:147
+msgid "A4 Extra 9.27 x 12.69 in"
+msgstr "A4 Extra 9.27 x 12.69 pol."
+
+#: ../src/common/paper.cpp:154
+msgid "A4 Plus 210 x 330 mm"
+msgstr "A4+ 210 x 330 mm"
+
+#: ../src/common/paper.cpp:172
+msgid "A4 Rotated 297 x 210 mm"
+msgstr "A4 Rodado 297 x 210 mm"
+
+#: ../src/common/paper.cpp:149
+msgid "A4 Transverse 210 x 297 mm"
+msgstr "A4 Transverso 210 x 297 mm"
+
+#: ../src/common/paper.cpp:98
+msgid "A4 sheet, 210 x 297 mm"
+msgstr "Folha A4, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:108
+msgid "A4 small sheet, 210 x 297 mm"
+msgstr "A4 folha pequena, 210x297 mm"
+
+#: ../src/common/paper.cpp:158
+msgid "A5 Extra 174 x 235 mm"
+msgstr "A5 Extra 174 x 235 mm"
+
+#: ../src/common/paper.cpp:173
+msgid "A5 Rotated 210 x 148 mm"
+msgstr "A5 Rodado 210 x 148 mm"
+
+#: ../src/common/paper.cpp:155
+msgid "A5 Transverse 148 x 210 mm"
+msgstr "A5 Transverso 148 x 210 mm"
+
+#: ../src/common/paper.cpp:109
+msgid "A5 sheet, 148 x 210 mm"
+msgstr "A5 folha, 148 x 210 mm"
+
+#: ../src/common/paper.cpp:165
+msgid "A6 105 x 148 mm"
+msgstr "A6 105 x 148 mm"
+
+#: ../src/common/paper.cpp:178
+msgid "A6 Rotated 148 x 105 mm"
+msgstr "A6 Rodado 148 x 105 mm"
+
+#: ../src/generic/fontdlgg.cpp:83 ../src/richtext/richtextformatdlg.cpp:526
+#: ../src/osx/carbon/fontdlg.cpp:339
+msgid "ABCDEFGabcdefg12345"
+msgstr "ABCDEFGabcdefg12345"
+
+#: ../src/common/accelcmn.cpp:76
+msgid "ADD"
+msgstr "ADICIONAR"
+
+#: ../src/richtext/richtextsymboldlg.cpp:458 ../src/common/ftp.cpp:405
+msgid "ASCII"
+msgstr "ASCII"
+
+#: ../src/osx/menu_osx.cpp:630 ../src/common/stockitem.cpp:139
+#, fuzzy
+msgid "About"
+msgstr "&Sobre"
+
+#: ../src/generic/aboutdlgg.cpp:140 ../src/msw/aboutdlg.cpp:64
+#, fuzzy, c-format
+msgid "About %s"
+msgstr "Sobre "
+
+#: ../src/richtext/richtextsizepage.cpp:520
+msgid "Absolute"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:207
+#, fuzzy
+msgid "Actual Size"
+msgstr "T&amanho Actual"
+
+#: ../src/common/stockitem.cpp:140
+msgid "Add"
+msgstr "Adicionar"
+
+#: ../src/richtext/richtextbuffer.cpp:10751
+msgid "Add Column"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:10688
+msgid "Add Row"
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:439
+msgid "Add current page to bookmarks"
+msgstr "Adicionar página actual aos marcadores"
+
+#: ../src/generic/colrdlgg.cpp:283
+msgid "Add to custom colours"
+msgstr "Adicionar às cores personalizadas"
+
+#: ../include/wx/xtiprop.h:259
+msgid "AddToPropertyCollection called on a generic accessor"
+msgstr "AddToPropertyCollection chamando num acessor genérico"
+
+#: ../include/wx/xtiprop.h:197
+msgid "AddToPropertyCollection called w/o valid adder"
+msgstr "AddToPropertyCollection chamando com ou sem adicionador válido"
+
+#: ../src/html/helpctrl.cpp:159
+#, c-format
+msgid "Adding book %s"
+msgstr "A adicionar livro %s"
+
+#: ../src/osx/carbon/dataview.cpp:1933
+msgid "Adding flavor TEXT failed"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1954
+msgid "Adding flavor utxt failed"
+msgstr ""
+
+#: ../src/common/preferencescmn.cpp:41
+msgid "Advanced"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:435
+msgid "After a paragraph:"
+msgstr "Depois de um parágrafo:"
+
+#: ../src/common/stockitem.cpp:172
+msgid "Align Left"
+msgstr "Alinhar à Esquerda"
+
+#: ../src/common/stockitem.cpp:173
+msgid "Align Right"
+msgstr "Alinhar à Direita"
+
+#: ../src/richtext/richtextsizepage.cpp:266
+#, fuzzy
+msgid "Alignment"
+msgstr "&Alinhamento"
+
+#: ../src/generic/prntdlgg.cpp:215
+msgid "All"
+msgstr "Todos"
+
+#: ../src/generic/filectrlg.cpp:1205 ../src/common/fldlgcmn.cpp:89
+#, c-format
+msgid "All files (%s)|%s"
+msgstr "Todos os ficheiros (%s)|%s"
+
+#: ../include/wx/defs.h:2922
+msgid "All files (*)|*"
+msgstr "Todos os ficheiros (*)|*"
+
+#: ../include/wx/defs.h:2919
+msgid "All files (*.*)|*.*"
+msgstr "Todos os ficheiros (*.*)|*.*"
+
+#: ../src/richtext/richtextstyles.cpp:1057
+msgid "All styles"
+msgstr "Todos os estilos"
+
+#: ../src/propgrid/manager.cpp:1496
+msgid "Alphabetic Mode"
+msgstr ""
+
+#: ../src/common/xtistrm.cpp:429
+msgid "Already Registered Object passed to SetObjectClassInfo"
+msgstr "Objecto Já Registado passado para SetObjectClassInfo"
+
+#: ../src/unix/dialup.cpp:353
+msgid "Already dialling ISP."
+msgstr "Já está a ligar ao serviço ISP."
+
+#: ../src/common/accelcmn.cpp:320 ../src/univ/themes/win32.cpp:3756
+#, fuzzy
+msgid "Alt+"
+msgstr "Alt-"
+
+#: ../src/common/debugrpt.cpp:581
+#, fuzzy
+msgid "And includes the following files:\n"
+msgstr "*** E inclui os seguintes ficheiros:\n"
+
+#: ../src/generic/animateg.cpp:162
+#, c-format
+msgid "Animation file is not of type %ld."
+msgstr "Ficheiro de animação não é do tipo %ld."
+
+#: ../src/generic/logg.cpp:1034
+#, c-format
+msgid "Append log to file '%s' (choosing [No] will overwrite it)?"
+msgstr ""
+"Adicionar ao ficheiro de registo '%s' (escolher [Não] vai substitui-lo)?"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:610
+#: ../src/osx/menu_osx.cpp:649 ../src/osx/menu_osx.cpp:657
+#, fuzzy
+msgid "Application"
+msgstr "Selecção"
+
+#: ../src/common/stockitem.cpp:141
+#, fuzzy
+msgid "Apply"
+msgstr "&Aplicar"
+
+#: ../src/richtext/richtextliststylepage.cpp:482
+#: ../src/richtext/richtextbulletspage.cpp:287
+msgid "Arabic"
+msgstr "Árabe"
+
+#: ../src/common/fmapbase.cpp:153
+msgid "Arabic (ISO-8859-6)"
+msgstr "Árabe (ISO-8859-6)"
+
+#: ../src/msw/ole/automtn.cpp:661
+#, fuzzy, c-format
+msgid "Argument %u not found."
+msgstr "Ficheiro de ajuda \"%s\" não encontrado."
+
+#: ../src/generic/aboutdlgg.cpp:184
+msgid "Artists"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:195
+#, fuzzy
+msgid "Ascending"
+msgstr "a ler"
+
+#: ../src/generic/filectrlg.cpp:468
+msgid "Attributes"
+msgstr "Atributos"
+
+#: ../src/richtext/richtextliststylepage.cpp:294
+#: ../src/richtext/richtextbulletspage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:247
+msgid "Available fonts."
+msgstr "Fontes disponíveis."
+
+#: ../src/common/paper.cpp:138
+msgid "B4 (ISO) 250 x 353 mm"
+msgstr "B4 (ISO) 250 x 353 mm"
+
+#: ../src/common/paper.cpp:174
+msgid "B4 (JIS) Rotated 364 x 257 mm"
+msgstr "B4 (JIS) Rodado 364 x 257 mm"
+
+#: ../src/common/paper.cpp:128
+msgid "B4 Envelope, 250 x 353 mm"
+msgstr "Envelope B4, 250x353 mm"
+
+#: ../src/common/paper.cpp:110
+msgid "B4 sheet, 250 x 354 mm"
+msgstr "Folha B4, 250 x 354 mm"
+
+#: ../src/common/paper.cpp:159
+msgid "B5 (ISO) Extra 201 x 276 mm"
+msgstr "B5 (ISO) Extra 201 x 276 mm"
+
+#: ../src/common/paper.cpp:175
+msgid "B5 (JIS) Rotated 257 x 182 mm"
+msgstr "B5 (JIS) Rodado 257 x 182 mm"
+
+#: ../src/common/paper.cpp:156
+msgid "B5 (JIS) Transverse 182 x 257 mm"
+msgstr "B5 (JIS) Transverso 182 x 257 mm"
+
+#: ../src/common/paper.cpp:129
+msgid "B5 Envelope, 176 x 250 mm"
+msgstr "Envelope B5, 176 x 250 mm"
+
+#: ../src/common/paper.cpp:111
+msgid "B5 sheet, 182 x 257 millimeter"
+msgstr "B5 folha, 182 x 257 millimeter"
+
+#: ../src/common/paper.cpp:183
+msgid "B6 (JIS) 128 x 182 mm"
+msgstr "B6 (JIS) 128 x 182 mm"
+
+#: ../src/common/paper.cpp:184
+msgid "B6 (JIS) Rotated 182 x 128 mm"
+msgstr "B6 (JIS) Rodado 182 x 128 mm"
+
+#: ../src/common/paper.cpp:130
+msgid "B6 Envelope, 176 x 125 mm"
+msgstr "Envelope B6, 176 x 125 mm"
+
+#: ../src/common/accelcmn.cpp:49
+msgid "BACK"
+msgstr "RETROCEDER"
+
+#: ../src/common/imagbmp.cpp:523 ../src/common/imagbmp.cpp:553
+#: ../src/common/imagbmp.cpp:568
+msgid "BMP: Couldn't allocate memory."
+msgstr "BMP: Impossível alocar memória."
+
+#: ../src/common/imagbmp.cpp:97
+msgid "BMP: Couldn't save invalid image."
+msgstr "BMP: Impossível gravar imagem inválida."
+
+#: ../src/common/imagbmp.cpp:338
+msgid "BMP: Couldn't write RGB color map."
+msgstr "BMP: Impossível escrever mapa de cores RGB."
+
+#: ../src/common/imagbmp.cpp:473
+msgid "BMP: Couldn't write data."
+msgstr "BMP: Impossível escrever data."
+
+#: ../src/common/imagbmp.cpp:239
+msgid "BMP: Couldn't write the file (Bitmap) header."
+msgstr "BMP: Impossível escrever o cabeçalho do ficheiro (Bitmap)."
+
+#: ../src/common/imagbmp.cpp:262
+msgid "BMP: Couldn't write the file (BitmapInfo) header."
+msgstr "BMP: Impossível escrever o cabeçalho do ficheiro (BitmapInfo)."
+
+#: ../src/common/imagbmp.cpp:133
+msgid "BMP: wxImage doesn't have own wxPalette."
+msgstr "BMP: wxImage não tem a sua wxPalette."
+
+#: ../src/common/stockitem.cpp:142
+#, fuzzy
+msgid "Back"
+msgstr "&Retroceder"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:119
+#: ../src/richtext/richtextformatdlg.cpp:374
+#, fuzzy
+msgid "Background"
+msgstr "Cor de fundo"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:131
+#, fuzzy
+msgid "Background &colour:"
+msgstr "Cor de fundo"
+
+#: ../src/osx/carbon/fontdlg.cpp:406
+msgid "Background colour"
+msgstr "Cor de fundo"
+
+#: ../src/common/fmapbase.cpp:160
+msgid "Baltic (ISO-8859-13)"
+msgstr "Báltico (ISO-8859-13)"
+
+#: ../src/common/fmapbase.cpp:151
+msgid "Baltic (old) (ISO-8859-4)"
+msgstr "Báltico (antigo) (ISO-8859-4)"
+
+#: ../src/richtext/richtextliststylepage.cpp:426
+msgid "Before a paragraph:"
+msgstr "Antes de um parágrafo:"
+
+#: ../src/richtext/richtextliststylepage.cpp:489
+#: ../src/richtext/richtextbulletspage.cpp:294
+msgid "Bitmap"
+msgstr "Bitmap"
+
+#: ../src/osx/carbon/dataview.cpp:2396
+msgid "Bitmap renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:333 ../src/richtext/richtextfontpage.cpp:337
+#: ../src/osx/carbon/fontdlg.cpp:540 ../src/common/stockitem.cpp:143
+msgid "Bold"
+msgstr "Destacado"
+
+#: ../src/richtext/richtextborderspage.cpp:256
+#: ../src/richtext/richtextborderspage.cpp:389
+#, fuzzy
+msgid "Border"
+msgstr "Moderno"
+
+#: ../src/richtext/richtextformatdlg.cpp:368
+#, fuzzy
+msgid "Borders"
+msgstr "Moderno"
+
+#: ../src/richtext/richtextsizepage.cpp:288 ../src/common/stockitem.cpp:144
+msgid "Bottom"
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:893
+msgid "Bottom margin (mm):"
+msgstr "Margem de rodapé (mm):"
+
+#: ../src/richtext/richtextbuffer.cpp:8919
+#, fuzzy
+msgid "Box Properties"
+msgstr "&Propriedades"
+
+#: ../src/richtext/richtextstyles.cpp:1061
+#, fuzzy
+msgid "Box styles"
+msgstr "Todos os estilos"
+
+#: ../src/common/filepickercmn.cpp:43 ../src/common/filepickercmn.cpp:44
+msgid "Browse"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:195
+msgid "Bullet &Alignment:"
+msgstr "&Alinhamento de Marcador:"
+
+#: ../src/richtext/richtextliststylepage.cpp:309
+msgid "Bullet style"
+msgstr "Estilo de marcador"
+
+#: ../src/richtext/richtextformatdlg.cpp:342
+msgid "Bullets"
+msgstr "Marcadores"
+
+#: ../src/common/paper.cpp:99
+msgid "C sheet, 17 x 22 in"
+msgstr "Folha C, 17 x 22 pol."
+
+#: ../src/generic/logg.cpp:520
+msgid "C&lear"
+msgstr "&Limpar"
+
+#: ../src/generic/fontdlgg.cpp:406
+msgid "C&olour:"
+msgstr "C&or:"
+
+#: ../src/common/paper.cpp:124
+msgid "C3 Envelope, 324 x 458 mm"
+msgstr "Envelope C3, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:125
+msgid "C4 Envelope, 229 x 324 mm"
+msgstr "Envelope C4, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:123
+msgid "C5 Envelope, 162 x 229 mm"
+msgstr "Envelope C5, 162 x 229 mm"
+
+#: ../src/common/paper.cpp:126
+msgid "C6 Envelope, 114 x 162 mm"
+msgstr "Envelope C6, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:127
+msgid "C65 Envelope, 114 x 229 mm"
+msgstr "Envelope C65, 114 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:66
+msgid "CANCEL"
+msgstr "CANCELAR"
+
+#: ../src/common/accelcmn.cpp:70
+msgid "CAPITAL"
+msgstr "MAIÚSCULA"
+
+#: ../src/common/stockitem.cpp:146
+msgid "CD-Rom"
+msgstr ""
+
+#: ../src/html/chm.cpp:815 ../src/html/chm.cpp:874
+msgid "CHM handler currently supports only local files!"
+msgstr "O manuseador CHM actualmente apenas suporta ficheiros locais!"
+
+#: ../src/common/accelcmn.cpp:67
+msgid "CLEAR"
+msgstr "LIMPAR"
+
+#: ../src/common/accelcmn.cpp:111
+msgid "COMMAND"
+msgstr "COMANDO"
+
+#: ../src/richtext/richtextfontpage.cpp:291
+msgid "Ca&pitals"
+msgstr ""
+
+#: ../src/common/cmdproc.cpp:267
+msgid "Can't &Undo "
+msgstr "Não é possível &Desfazer "
+
+#: ../src/common/image.cpp:2686
+msgid "Can't automatically determine the image format for non-seekable input."
+msgstr ""
+
+#: ../src/msw/registry.cpp:505
+#, c-format
+msgid "Can't close registry key '%s'"
+msgstr "Não foi possível fechar a chave de registo '%s'"
+
+#: ../src/msw/registry.cpp:583
+#, c-format
+msgid "Can't copy values of unsupported type %d."
+msgstr "Não foi possível copiar valores do tipo %d não suportado."
+
+#: ../src/msw/registry.cpp:486
+#, c-format
+msgid "Can't create registry key '%s'"
+msgstr "Não foi possível criar a chave de registo '%s'"
+
+#: ../src/msw/thread.cpp:696 ../src/os2/thread.cpp:494
+msgid "Can't create thread"
+msgstr "Não é possível criar a thread"
+
+#: ../src/msw/window.cpp:3793
+#, c-format
+msgid "Can't create window of class %s"
+msgstr "Não é possível criar janela da classe %s"
+
+#: ../src/msw/registry.cpp:776
+#, c-format
+msgid "Can't delete key '%s'"
+msgstr "Não é possível apagar a chave '%s'"
+
+#: ../src/msw/iniconf.cpp:458 ../src/os2/iniconf.cpp:471
+#, c-format
+msgid "Can't delete the INI file '%s'"
+msgstr "Não é possível apagar o ficheiro INI '%s'"
+
+#: ../src/msw/registry.cpp:804
+#, c-format
+msgid "Can't delete value '%s' from key '%s'"
+msgstr "Não é possível apagar valor '%s' da chave '%s'"
+
+#: ../src/msw/registry.cpp:1161
+#, c-format
+msgid "Can't enumerate subkeys of key '%s'"
+msgstr "Não é possível enumerar as sub-chaves da chave '%s'"
+
+#: ../src/msw/registry.cpp:1116
+#, c-format
+msgid "Can't enumerate values of key '%s'"
+msgstr "Não é possível enumerar os valores da chave '%s'"
+
+#: ../src/msw/registry.cpp:1379
+#, c-format
+msgid "Can't export value of unsupported type %d."
+msgstr "Não foi possível exportar valores de tipo %d não suportado."
+
+#: ../src/common/ffile.cpp:236
+#, c-format
+msgid "Can't find current position in file '%s'"
+msgstr "Não foi possível encontrar a posição actual no ficheiro '%s'"
+
+#: ../src/msw/registry.cpp:416
+#, c-format
+msgid "Can't get info about registry key '%s'"
+msgstr "Não foi possível obter informação sobre a chave de registo '%s'"
+
+#: ../src/common/zstream.cpp:346
+msgid "Can't initialize zlib deflate stream."
+msgstr "Não é possível inicializar o zlib deflate stream."
+
+#: ../src/common/zstream.cpp:185
+msgid "Can't initialize zlib inflate stream."
+msgstr "Não é possível inicializar o zlib inflate stream."
+
+#: ../src/msw/fswatcher.cpp:432
+#, c-format
+msgid "Can't monitor non-existent directory \"%s\" for changes."
+msgstr ""
+
+#: ../src/msw/registry.cpp:452
+#, c-format
+msgid "Can't open registry key '%s'"
+msgstr "Não foi possível abrir chave de registo '%s'"
+
+#: ../src/common/zstream.cpp:252
+#, c-format
+msgid "Can't read from inflate stream: %s"
+msgstr "Não foi possível ler do inflate stream: %s"
+
+#: ../src/common/zstream.cpp:244
+msgid "Can't read inflate stream: unexpected EOF in underlying stream."
+msgstr ""
+"Não foi possível ler o inflate stream: EOF inexperado no stream subjacente."
+
+#: ../src/msw/registry.cpp:1048
+#, c-format
+msgid "Can't read value of '%s'"
+msgstr "Não foi possível ler valor de '%s'"
+
+#: ../src/msw/registry.cpp:877 ../src/msw/registry.cpp:909
+#: ../src/msw/registry.cpp:971
+#, c-format
+msgid "Can't read value of key '%s'"
+msgstr "Não foi possível ler valor da chave '%s'"
+
+#: ../src/common/image.cpp:2483
+#, c-format
+msgid "Can't save image to file '%s': unknown extension."
+msgstr ""
+"Não foi possível gravar imagem para ficheiro '%s': extensão desconhecida."
+
+#: ../src/generic/logg.cpp:579 ../src/generic/logg.cpp:996
+msgid "Can't save log contents to file."
+msgstr "Não foi possível gravar conteúdo do registo para ficheiro."
+
+#: ../src/msw/thread.cpp:652 ../src/os2/thread.cpp:477
+msgid "Can't set thread priority"
+msgstr "Não foi possível definir prioridade da thread"
+
+#: ../src/msw/registry.cpp:895 ../src/msw/registry.cpp:939
+#: ../src/msw/registry.cpp:1065
+#, c-format
+msgid "Can't set value of '%s'"
+msgstr "Não foi possível definir valor de '%s'"
+
+#: ../src/unix/utilsunx.cpp:357
+#, fuzzy
+msgid "Can't write to child process's stdin"
+msgstr "Falha no encerramento do processo %d"
+
+#: ../src/common/zstream.cpp:427
+#, c-format
+msgid "Can't write to deflate stream: %s"
+msgstr "Não foi possível escrever no edeflate stream: %s"
+
+#: ../include/wx/msgdlg.h:274 ../src/generic/dirdlgg.cpp:107
+#: ../src/richtext/richtextstyledlg.cpp:300 ../src/common/stockitem.cpp:145
+#: ../src/msw/msgdlg.cpp:489 ../src/msw/progdlg.cpp:673
+#: ../src/gtk1/fontdlg.cpp:144 ../src/motif/msgdlg.cpp:196
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: ../src/os2/thread.cpp:116
+msgid "Cannot create mutex."
+msgstr "Não foi possível criar o mutex."
+
+#: ../src/osx/carbon/dataview.cpp:895
+msgid "Cannot create new column's ID. Probably max. number of columns reached."
+msgstr ""
+
+#: ../src/common/filefn.cpp:1336
+#, c-format
+msgid "Cannot enumerate files '%s'"
+msgstr "Não foi possível enumerar os ficheiros '%s'"
+
+#: ../src/msw/dir.cpp:264
+#, c-format
+msgid "Cannot enumerate files in directory '%s'"
+msgstr "Não foi possível enumerar os ficheiros no directório '%s'"
+
+#: ../src/msw/dialup.cpp:542
+#, c-format
+msgid "Cannot find active dialup connection: %s"
+msgstr "Não foi possível encontrar a ligação telefónica activa: %s"
+
+#: ../src/msw/dialup.cpp:848
+msgid "Cannot find the location of address book file"
+msgstr ""
+"Não foi possível encontrar a localização do ficheiro do livro de endereços"
+
+#: ../src/msw/ole/automtn.cpp:562
+#, fuzzy, c-format
+msgid "Cannot get an active instance of \"%s\""
+msgstr "Não foi possível encontrar a ligação telefónica activa: %s"
+
+#: ../src/unix/threadpsx.cpp:1030
+#, c-format
+msgid "Cannot get priority range for scheduling policy %d."
+msgstr ""
+"Não foi possível obter a gama de prioridade para a política de agendamento "
+"%d."
+
+#: ../src/unix/utilsunx.cpp:988
+msgid "Cannot get the hostname"
+msgstr "Não foi possível obter o nome de computador"
+
+#: ../src/unix/utilsunx.cpp:1024
+msgid "Cannot get the official hostname"
+msgstr "Não foi possível obter o nome de computador oficial"
+
+#: ../src/msw/dialup.cpp:949
+msgid "Cannot hang up - no active dialup connection."
+msgstr "Não foi possível desligar - nenhuma ligação telefónica activa."
+
+#: ../include/wx/msw/ole/oleutils.h:52
+msgid "Cannot initialize OLE"
+msgstr "Não foi possível inicializar o OLE"
+
+#: ../src/common/socket.cpp:847
+#, fuzzy
+msgid "Cannot initialize sockets"
+msgstr "Não foi possível inicializar o OLE"
+
+#: ../src/msw/volume.cpp:620
+#, c-format
+msgid "Cannot load icon from '%s'."
+msgstr "Não foi possível carregar ícone de '%s'."
+
+#: ../src/xrc/xmlres.cpp:361
+#, fuzzy, c-format
+msgid "Cannot load resources from '%s'."
+msgstr "Não foi possível carregar recursos do ficheiro '%s'."
+
+#: ../src/xrc/xmlres.cpp:746
+#, c-format
+msgid "Cannot load resources from file '%s'."
+msgstr "Não foi possível carregar recursos do ficheiro '%s'."
+
+#: ../src/html/htmlfilt.cpp:137
+#, c-format
+msgid "Cannot open HTML document: %s"
+msgstr "Não foi possível abrir o documento HTML: %s"
+
+#: ../src/html/helpdata.cpp:665
+#, c-format
+msgid "Cannot open HTML help book: %s"
+msgstr "Não foi possível abrir o livro de ajuda HTML: %s"
+
+#: ../src/html/helpdata.cpp:297
+#, c-format
+msgid "Cannot open contents file: %s"
+msgstr "Não foi possível abrir o ficheiro de conteúdos: %s"
+
+#: ../src/generic/dcpsg.cpp:1751
+msgid "Cannot open file for PostScript printing!"
+msgstr "Não foi possível abrir o ficheiro para impressão em PostScript!"
+
+#: ../src/html/helpdata.cpp:311
+#, c-format
+msgid "Cannot open index file: %s"
+msgstr "Não foi possível abrir ficheiro de índice: %s"
+
+#: ../src/xrc/xmlres.cpp:728
+#, fuzzy, c-format
+msgid "Cannot open resources file '%s'."
+msgstr "Não foi possível carregar recursos do ficheiro '%s'."
+
+#: ../src/html/helpwnd.cpp:1537
+msgid "Cannot print empty page."
+msgstr "Não foi possível imprimir página vazia."
+
+#: ../src/msw/volume.cpp:507
+#, c-format
+msgid "Cannot read typename from '%s'!"
+msgstr "Não foi possível ler tipo de nome de '%s'!"
+
+#: ../src/os2/thread.cpp:527
+#, c-format
+msgid "Cannot resume thread %lu"
+msgstr "Não é possível retomar a thread %lu"
+
+#: ../src/msw/thread.cpp:923
+#, fuzzy, c-format
+msgid "Cannot resume thread %lx"
+msgstr "Não é possível retomar a thread %x"
+
+#: ../src/unix/threadpsx.cpp:1011
+msgid "Cannot retrieve thread scheduling policy."
+msgstr "Não foi possível obter thread de política de agendamento."
+
+#: ../src/common/intl.cpp:542
+#, c-format
+msgid "Cannot set locale to language \"%s\"."
+msgstr ""
+
+#: ../src/unix/threadpsx.cpp:831 ../src/msw/thread.cpp:569
+msgid "Cannot start thread: error writing TLS."
+msgstr "Não é possível iniciar a thread: erro ao escrever o TLS."
+
+#: ../src/os2/thread.cpp:513
+#, c-format
+msgid "Cannot suspend thread %lu"
+msgstr "Não é possível suspender a thread %lu"
+
+#: ../src/msw/thread.cpp:907
+#, fuzzy, c-format
+msgid "Cannot suspend thread %lx"
+msgstr "Não é possível suspender a thread %x"
+
+#: ../src/msw/thread.cpp:830
+msgid "Cannot wait for thread termination"
+msgstr "Não é possível esperar pela terminação da thread"
+
+#: ../src/html/helpwnd.cpp:546
+msgid "Case sensitive"
+msgstr "Sensível à capitulação"
+
+#: ../src/propgrid/manager.cpp:1495
+msgid "Categorized Mode"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:9347
+#, fuzzy
+msgid "Cell Properties"
+msgstr "&Propriedades"
+
+#: ../src/common/fmapbase.cpp:161
+msgid "Celtic (ISO-8859-14)"
+msgstr "Céltico (ISO-8859-14)"
+
+#: ../src/richtext/richtextindentspage.cpp:160
+#: ../src/richtext/richtextliststylepage.cpp:349
+msgid "Cen&tred"
+msgstr "Cen&trado"
+
+#: ../src/common/stockitem.cpp:170
+msgid "Centered"
+msgstr "Centrado"
+
+#: ../src/common/fmapbase.cpp:149
+msgid "Central European (ISO-8859-2)"
+msgstr "Europa Central (ISO-8859-2)"
+
+#: ../src/richtext/richtextliststylepage.cpp:250
+#: ../src/richtext/richtextbulletspage.cpp:200
+msgid "Centre"
+msgstr "Centro"
+
+#: ../src/richtext/richtextindentspage.cpp:162
+#: ../src/richtext/richtextindentspage.cpp:164
+#: ../src/richtext/richtextliststylepage.cpp:351
+#: ../src/richtext/richtextliststylepage.cpp:353
+msgid "Centre text."
+msgstr "Centrar texto."
+
+#: ../src/richtext/richtextsizepage.cpp:287
+#, fuzzy
+msgid "Centred"
+msgstr "Cen&trado"
+
+#: ../src/richtext/richtextliststylepage.cpp:280
+#: ../src/richtext/richtextbulletspage.cpp:232
+msgid "Ch&oose..."
+msgstr "Esc&olher..."
+
+#: ../src/richtext/richtextbuffer.cpp:4041
+msgid "Change List Style"
+msgstr "Alterar Lista de Estilos"
+
+#: ../src/richtext/richtextbuffer.cpp:3392
+#, fuzzy
+msgid "Change Object Style"
+msgstr "Alterar Lista de Estilos"
+
+#: ../src/richtext/richtextbuffer.cpp:3658
+#: ../src/richtext/richtextbuffer.cpp:7749
+#, fuzzy
+msgid "Change Properties"
+msgstr "&Propriedades"
+
+#: ../src/richtext/richtextbuffer.cpp:3209
+msgid "Change Style"
+msgstr "Alterar Estilo"
+
+#: ../src/common/fileconf.cpp:372
+#, c-format
+msgid "Changes won't be saved to avoid overwriting the existing file \"%s\""
+msgstr ""
+
+#: ../src/richtext/richtextstyles.cpp:1059
+msgid "Character styles"
+msgstr "Estilos de Caracteres"
+
+#: ../src/richtext/richtextliststylepage.cpp:224
+#: ../src/richtext/richtextliststylepage.cpp:226
+#: ../src/richtext/richtextbulletspage.cpp:174
+#: ../src/richtext/richtextbulletspage.cpp:176
+msgid "Check to add a period after the bullet."
+msgstr "Marcar para adicionar um ponto a seguir ao marcador."
+
+#: ../src/richtext/richtextliststylepage.cpp:238
+#: ../src/richtext/richtextliststylepage.cpp:240
+#: ../src/richtext/richtextbulletspage.cpp:188
+#: ../src/richtext/richtextbulletspage.cpp:190
+msgid "Check to add a right parenthesis."
+msgstr "Marcar para adicionar um parêntesis à direita."
+
+#: ../src/richtext/richtextliststylepage.cpp:231
+#: ../src/richtext/richtextliststylepage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:181
+#: ../src/richtext/richtextbulletspage.cpp:183
+msgid "Check to enclose the bullet in parentheses."
+msgstr "Marque para circundar o marcador entre parêntesis."
+
+#: ../src/osx/carbon/fontdlg.cpp:542 ../src/osx/carbon/fontdlg.cpp:544
+msgid "Check to make the font bold."
+msgstr "Marque para tornar a letra destacada."
+
+#: ../src/osx/carbon/fontdlg.cpp:549 ../src/osx/carbon/fontdlg.cpp:551
+msgid "Check to make the font italic."
+msgstr "Marque para tornar a letra itálica."
+
+#: ../src/osx/carbon/fontdlg.cpp:558 ../src/osx/carbon/fontdlg.cpp:560
+msgid "Check to make the font underlined."
+msgstr "Marque para tornar a letra sublinhada."
+
+#: ../src/richtext/richtextstyledlg.cpp:289
+#: ../src/richtext/richtextstyledlg.cpp:291
+msgid "Check to restart numbering."
+msgstr "Marque para reiniciar a numeração."
+
+#: ../src/richtext/richtextfontpage.cpp:286
+#: ../src/richtext/richtextfontpage.cpp:288
+#, fuzzy
+msgid "Check to show a line through the text."
+msgstr "Marcar para adicionar um ponto a seguir ao marcador."
+
+#: ../src/richtext/richtextfontpage.cpp:293
+#: ../src/richtext/richtextfontpage.cpp:295
+#, fuzzy
+msgid "Check to show the text in capitals."
+msgstr "Marque para tornar a letra itálica."
+
+#: ../src/richtext/richtextfontpage.cpp:300
+#: ../src/richtext/richtextfontpage.cpp:302
+#, fuzzy
+msgid "Check to show the text in small capitals."
+msgstr "Marque para tornar a letra itálica."
+
+#: ../src/richtext/richtextfontpage.cpp:314
+#: ../src/richtext/richtextfontpage.cpp:316
+#, fuzzy
+msgid "Check to show the text in subscript."
+msgstr "Clique para alterar a cor do texto."
+
+#: ../src/richtext/richtextfontpage.cpp:307
+#: ../src/richtext/richtextfontpage.cpp:309
+#, fuzzy
+msgid "Check to show the text in superscript."
+msgstr "Marque para circundar o marcador entre parêntesis."
+
+#: ../src/msw/dialup.cpp:784
+msgid "Choose ISP to dial"
+msgstr "Escolha o ISP para marcar"
+
+#: ../src/propgrid/props.cpp:1643
+#, fuzzy
+msgid "Choose a directory:"
+msgstr "Criar directório"
+
+#: ../src/propgrid/props.cpp:1702
+#, fuzzy
+msgid "Choose a file"
+msgstr "Escolher fonte"
+
+#: ../src/generic/colrdlgg.cpp:144 ../src/gtk/colordlg.cpp:63
+msgid "Choose colour"
+msgstr "Escolher cor"
+
+#: ../src/generic/fontpickerg.cpp:50 ../src/gtk/fontdlg.cpp:75
+#: ../src/gtk1/fontdlg.cpp:125
+msgid "Choose font"
+msgstr "Escolher fonte"
+
+#: ../src/common/module.cpp:74
+#, c-format
+msgid "Circular dependency involving module \"%s\" detected."
+msgstr "Foi detectada uma dependência circular envolvendo o módulo \"%s\"."
+
+#: ../src/aui/tabmdi.cpp:108 ../src/generic/mdig.cpp:97
+msgid "Cl&ose"
+msgstr "F&echar"
+
+#: ../src/msw/ole/automtn.cpp:673
+#, fuzzy
+msgid "Class not registered."
+msgstr "Não é possível criar a thread"
+
+#: ../src/common/stockitem.cpp:147
+#, fuzzy
+msgid "Clear"
+msgstr "&Limpar"
+
+#: ../src/generic/logg.cpp:520
+msgid "Clear the log contents"
+msgstr "Limpar o conteúdo do registo"
+
+#: ../src/richtext/richtextstyledlg.cpp:252
+#: ../src/richtext/richtextstyledlg.cpp:254
+msgid "Click to apply the selected style."
+msgstr "Clique para aplicar o estilo seleccionado."
+
+#: ../src/richtext/richtextliststylepage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:283
+#: ../src/richtext/richtextbulletspage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:235
+msgid "Click to browse for a symbol."
+msgstr "Clique para procurar por um simbolo."
+
+#: ../src/osx/carbon/fontdlg.cpp:589 ../src/osx/carbon/fontdlg.cpp:591
+msgid "Click to cancel changes to the font."
+msgstr "Clique para cancelar as alterações à fonte."
+
+#: ../src/generic/fontdlgg.cpp:472 ../src/generic/fontdlgg.cpp:491
+msgid "Click to cancel the font selection."
+msgstr "Clique para cancelar selecção de fonte."
+
+#: ../src/osx/carbon/fontdlg.cpp:570 ../src/osx/carbon/fontdlg.cpp:572
+msgid "Click to change the font colour."
+msgstr "Clique para alterar a cor da fonte."
+
+#: ../src/richtext/richtextfontpage.cpp:276
+#: ../src/richtext/richtextfontpage.cpp:278
+#, fuzzy
+msgid "Click to change the text background colour."
+msgstr "Clique para alterar a cor do texto."
+
+#: ../src/richtext/richtextfontpage.cpp:263
+#: ../src/richtext/richtextfontpage.cpp:265
+msgid "Click to change the text colour."
+msgstr "Clique para alterar a cor do texto."
+
+#: ../src/richtext/richtextliststylepage.cpp:195
+#: ../src/richtext/richtextliststylepage.cpp:197
+msgid "Click to choose the font for this level."
+msgstr "Clique para escolher a fonte para este nível."
+
+#: ../src/richtext/richtextstyledlg.cpp:279
+#: ../src/richtext/richtextstyledlg.cpp:281
+msgid "Click to close this window."
+msgstr "Clique para fechar esta janela."
+
+#: ../src/osx/carbon/fontdlg.cpp:596 ../src/osx/carbon/fontdlg.cpp:598
+msgid "Click to confirm changes to the font."
+msgstr "Clique para confirmar alterações a fonte."
+
+#: ../src/generic/fontdlgg.cpp:477 ../src/generic/fontdlgg.cpp:479
+#: ../src/generic/fontdlgg.cpp:484 ../src/generic/fontdlgg.cpp:486
+msgid "Click to confirm the font selection."
+msgstr "Clique para confirmar selecção de fonte."
+
+#: ../src/richtext/richtextstyledlg.cpp:244
+#: ../src/richtext/richtextstyledlg.cpp:246
+#, fuzzy
+msgid "Click to create a new box style."
+msgstr "Clique para criar uma nova lista de estilos."
+
+#: ../src/richtext/richtextstyledlg.cpp:226
+#: ../src/richtext/richtextstyledlg.cpp:228
+msgid "Click to create a new character style."
+msgstr "Clique para criar um novo estilo de caracter."
+
+#: ../src/richtext/richtextstyledlg.cpp:238
+#: ../src/richtext/richtextstyledlg.cpp:240
+msgid "Click to create a new list style."
+msgstr "Clique para criar uma nova lista de estilos."
+
+#: ../src/richtext/richtextstyledlg.cpp:232
+#: ../src/richtext/richtextstyledlg.cpp:234
+msgid "Click to create a new paragraph style."
+msgstr "Clique para criar um novo estilo de parágrafo."
+
+#: ../src/richtext/richtexttabspage.cpp:137
+#: ../src/richtext/richtexttabspage.cpp:139
+msgid "Click to create a new tab position."
+msgstr "Clique para criar uma nova posição de tabulação."
+
+#: ../src/richtext/richtexttabspage.cpp:149
+#: ../src/richtext/richtexttabspage.cpp:151
+msgid "Click to delete all tab positions."
+msgstr "Clique para apagar todas as posições de tabulação."
+
+#: ../src/richtext/richtextstyledlg.cpp:270
+#: ../src/richtext/richtextstyledlg.cpp:272
+msgid "Click to delete the selected style."
+msgstr "Clique para apagar o estilo seleccionado."
+
+#: ../src/richtext/richtexttabspage.cpp:143
+#: ../src/richtext/richtexttabspage.cpp:145
+msgid "Click to delete the selected tab position."
+msgstr "Clique para apagar a posição de tabulação seleccionada."
+
+#: ../src/richtext/richtextstyledlg.cpp:264
+#: ../src/richtext/richtextstyledlg.cpp:266
+msgid "Click to edit the selected style."
+msgstr "Clique para editar estilo seleccionado."
+
+#: ../src/richtext/richtextstyledlg.cpp:258
+#: ../src/richtext/richtextstyledlg.cpp:260
+msgid "Click to rename the selected style."
+msgstr "Clique para renomear estilo seleccionado."
+
+#: ../src/generic/dbgrptg.cpp:97 ../src/generic/progdlgg.cpp:804
+#: ../src/generic/progdlgg.cpp:809 ../src/richtext/richtextstyledlg.cpp:277
+#: ../src/richtext/richtextsymboldlg.cpp:476 ../src/common/stockitem.cpp:148
+#: ../src/msw/progdlg.cpp:170 ../src/msw/progdlg.cpp:679
+#: ../src/html/helpdlg.cpp:90
+msgid "Close"
+msgstr "Fechar"
+
+#: ../src/aui/tabmdi.cpp:109 ../src/generic/mdig.cpp:98
+msgid "Close All"
+msgstr "Fechar Tudo"
+
+#: ../src/common/stockitem.cpp:266
+msgid "Close current document"
+msgstr "Fechar documento actual"
+
+#: ../src/generic/logg.cpp:522
+msgid "Close this window"
+msgstr "Fechar esta janela"
+
+#: ../src/common/stockitem.cpp:193
+#, fuzzy
+msgid "Color"
+msgstr "Cor:"
+
+#: ../src/richtext/richtextformatdlg.cpp:725
+#, fuzzy
+msgid "Colour"
+msgstr "Cor:"
+
+#: ../src/msw/colordlg.cpp:156
+#, fuzzy, c-format
+msgid "Colour selection dialog failed with error %0lx."
+msgstr "Execução do comando '%s' terminou com o erro: %ul"
+
+#: ../src/osx/carbon/fontdlg.cpp:566
+msgid "Colour:"
+msgstr "Cor:"
+
+#: ../src/osx/carbon/dataview.cpp:900
+#, fuzzy
+msgid "Column could not be added."
+msgstr "Não foi possível carregar o ficheiro."
+
+#: ../src/osx/carbon/dataview.cpp:899
+msgid "Column description could not be initialized."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1538 ../src/osx/carbon/dataview.cpp:1559
+#, fuzzy
+msgid "Column index not found."
+msgstr "Ficheiro de ajuda \"%s\" não encontrado."
+
+#: ../src/osx/carbon/dataview.cpp:1614
+msgid "Column width could not be determined"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:901
+msgid "Column width could not be set."
+msgstr ""
+
+#: ../src/common/init.cpp:188
+#, c-format
+msgid ""
+"Command line argument %d couldn't be converted to Unicode and will be "
+"ignored."
+msgstr ""
+
+#: ../src/msw/fontdlg.cpp:119
+#, fuzzy, c-format
+msgid "Common dialog failed with error code %0lx."
+msgstr "Execução do comando '%s' terminou com o erro: %ul"
+
+#: ../src/gtk/window.cpp:4306
+msgid ""
+"Compositing not supported by this system, please enable it in your Window "
+"Manager."
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:1554
+msgid "Compressed HTML Help file (*.chm)|*.chm|"
+msgstr "Ficheiro de ajuda HTML comprimido (*.chm)|*.chm|"
+
+#: ../src/generic/dirctrlg.cpp:544
+msgid "Computer"
+msgstr "Computador"
+
+#: ../src/common/fileconf.cpp:965
+#, c-format
+msgid "Config entry name cannot start with '%c'."
+msgstr "Nome de entrada de configuração não pode começar por '%c'."
+
+#: ../src/gtk/filedlg.cpp:59
+msgid "Confirm"
+msgstr "Confirmar"
+
+#: ../src/msw/mimetype.cpp:739
+msgid "Confirm registry update"
+msgstr "Confirmar actualização de registo"
+
+#: ../src/html/htmlwin.cpp:544
+msgid "Connecting..."
+msgstr "A ligar..."
+
+#: ../src/html/helpwnd.cpp:482
+msgid "Contents"
+msgstr "Conteúdos"
+
+#: ../src/common/strconv.cpp:2261
+#, c-format
+msgid "Conversion to charset '%s' doesn't work."
+msgstr "Conversão código de caracteres '%s' não funciona."
+
+#: ../src/common/stockitem.cpp:149
+#, fuzzy
+msgid "Convert"
+msgstr "Conteúdos"
+
+#: ../src/html/htmlwin.cpp:1057
+#, c-format
+msgid "Copied to clipboard:\"%s\""
+msgstr "Copiado para a área de transferência:\"%s\""
+
+#: ../src/generic/prntdlgg.cpp:247
+msgid "Copies:"
+msgstr "Cópias:"
+
+#: ../src/common/stockitem.cpp:150 ../src/stc/stc_i18n.cpp:18
+#, fuzzy
+msgid "Copy"
+msgstr "&Copiar"
+
+#: ../src/common/stockitem.cpp:258
+msgid "Copy selection"
+msgstr "Copiar selecção"
+
+#: ../src/html/chm.cpp:718
+#, c-format
+msgid "Could not create temporary file '%s'"
+msgstr "Não foi possível criar ficheiro temporário '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:1285 ../src/osx/carbon/dataview.cpp:1672
+#, fuzzy
+msgid "Could not determine column index."
+msgstr "Não foi possível iniciar antevisão do documento."
+
+#: ../src/osx/carbon/dataview.cpp:876
+msgid "Could not determine column's position"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:843
+#, fuzzy
+msgid "Could not determine number of columns."
+msgstr "Não foi possível encontrar recursos de ficheiro incluído %s."
+
+#: ../src/osx/carbon/dataview.cpp:975
+#, fuzzy
+msgid "Could not determine number of items"
+msgstr "Não foi possível encontrar recursos de ficheiro incluído %s."
+
+#: ../src/html/chm.cpp:273
+#, c-format
+msgid "Could not extract %s into %s: %s"
+msgstr "Não foi possível extrair %s para %s: %s"
+
+#: ../src/generic/tabg.cpp:1048
+msgid "Could not find tab for id"
+msgstr "Não foi possível localizar a tabulação para o id"
+
+#: ../src/osx/carbon/dataview.cpp:2556 ../src/osx/carbon/dataview.cpp:2591
+#: ../src/osx/carbon/dataview.cpp:2615 ../src/osx/carbon/dataview.cpp:2636
+#: ../src/osx/carbon/dataview.cpp:2773
+#, fuzzy
+msgid "Could not get header description."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/osx/carbon/dataview.cpp:1169 ../src/osx/carbon/dataview.cpp:1195
+#, fuzzy
+msgid "Could not get items."
+msgstr "Não foi possível localizar o ficheiro '%s'."
+
+#: ../src/osx/carbon/dataview.cpp:2659 ../src/osx/carbon/dataview.cpp:2724
+#, fuzzy
+msgid "Could not get property flags."
+msgstr "Não foi possível criar ficheiro temporário '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:726
+#, fuzzy
+msgid "Could not get selected items."
+msgstr "Não foi possível localizar o ficheiro '%s'."
+
+#: ../src/html/chm.cpp:444
+#, c-format
+msgid "Could not locate file '%s'."
+msgstr "Não foi possível localizar o ficheiro '%s'."
+
+#: ../src/osx/carbon/dataview.cpp:845
+#, fuzzy
+msgid "Could not remove column."
+msgstr "Não foi possível criar um cursor."
+
+#: ../src/osx/carbon/dataview.cpp:642
+#, fuzzy
+msgid "Could not retrieve number of items"
+msgstr "Não foi possível criar ficheiro temporário '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:2572
+#, fuzzy
+msgid "Could not set alignment."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/osx/carbon/dataview.cpp:2803
+#, fuzzy
+msgid "Could not set column width."
+msgstr "Não foi possível iniciar antevisão do documento."
+
+#: ../src/common/filefn.cpp:1569
+#, fuzzy
+msgid "Could not set current working directory"
+msgstr "Falha na obtenção do directório de trabalho"
+
+#: ../src/osx/carbon/dataview.cpp:2775
+#, fuzzy
+msgid "Could not set header description."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/osx/carbon/dataview.cpp:2596
+#, fuzzy
+msgid "Could not set icon."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/osx/carbon/dataview.cpp:2617
+#, fuzzy
+msgid "Could not set maximum width."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/osx/carbon/dataview.cpp:2638
+#, fuzzy
+msgid "Could not set minimum width."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/osx/carbon/dataview.cpp:2664 ../src/osx/carbon/dataview.cpp:2729
+#, fuzzy
+msgid "Could not set property flags."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/common/prntbase.cpp:1985
+msgid "Could not start document preview."
+msgstr "Não foi possível iniciar antevisão do documento."
+
+#: ../src/generic/printps.cpp:178 ../src/msw/printwin.cpp:210
+#: ../src/gtk/print.cpp:1077
+msgid "Could not start printing."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/common/wincmn.cpp:2131
+msgid "Could not transfer data to window"
+msgstr "Não foi possível transferir dados para a janela"
+
+#: ../src/os2/thread.cpp:160
+msgid "Couldn't acquire a mutex lock"
+msgstr "Não foi possível adquirir um bloqueio à mutex"
+
+#: ../src/msw/imaglist.cpp:166 ../src/msw/imaglist.cpp:197
+#: ../src/msw/imaglist.cpp:209 ../src/msw/dragimag.cpp:193
+#: ../src/msw/dragimag.cpp:232
+msgid "Couldn't add an image to the image list."
+msgstr "Não foi possível adicionar uma imagem à lista de imagens."
+
+#: ../src/msw/timer.cpp:134 ../src/os2/timer.cpp:113
+msgid "Couldn't create a timer"
+msgstr "Não foi possível criar um temporizador"
+
+#: ../src/osx/carbon/overlay.cpp:122
+msgid "Couldn't create the overlay window"
+msgstr "Não foi possível criar a janela de sobreposição"
+
+#: ../src/common/translation.cpp:2015
+#, fuzzy
+msgid "Couldn't enumerate translations"
+msgstr "Não foi possível terminar a thread"
+
+#: ../src/common/dynlib.cpp:152
+#, c-format
+msgid "Couldn't find symbol '%s' in a dynamic library"
+msgstr "Não foi possível encontrar o símbolo '%s' numa livraria dinâmica"
+
+#: ../src/gtk/print.cpp:2014
+msgid "Couldn't get hatch style from wxBrush."
+msgstr ""
+
+#: ../src/msw/thread.cpp:950
+msgid "Couldn't get the current thread pointer"
+msgstr "impossível obter o ponteiro actual da thread"
+
+#: ../src/osx/carbon/overlay.cpp:129
+msgid "Couldn't init the context on the overlay window"
+msgstr "Não foi possível inicializar o contexto na janela de sobreposição"
+
+#: ../src/common/imaggif.cpp:263
+#, fuzzy
+msgid "Couldn't initialize GIF hash table."
+msgstr "Não é possível inicializar o zlib deflate stream."
+
+#: ../src/common/imagpng.cpp:657
+msgid "Couldn't load a PNG image - file is corrupted or not enough memory."
+msgstr ""
+"Não foi possível carregar uma imagem PNG - Ficheiro corrupto ou memória "
+"insuficiente."
+
+#: ../src/unix/sound.cpp:470
+#, c-format
+msgid "Couldn't load sound data from '%s'."
+msgstr "Não foi possível carregar dados de som a partir de '%s'."
+
+#: ../src/msw/dirdlg.cpp:441
+#, fuzzy
+msgid "Couldn't obtain folder name"
+msgstr "Não foi possível criar um temporizador"
+
+#: ../src/unix/sound_sdl.cpp:229
+#, c-format
+msgid "Couldn't open audio: %s"
+msgstr "Não foi possível abrir o áudio: %s"
+
+#: ../src/msw/ole/dataobj.cpp:350
+#, c-format
+msgid "Couldn't register clipboard format '%s'."
+msgstr "Não foi possível registar o formato da área de transferência '%s'."
+
+#: ../src/os2/thread.cpp:177
+msgid "Couldn't release a mutex"
+msgstr "Não foi possível libertar a mutex"
+
+#: ../src/msw/listctrl.cpp:756
+#, c-format
+msgid "Couldn't retrieve information about list control item %d."
+msgstr ""
+"Não foi possível obter informação sobre o item da lista de controlo %d."
+
+#: ../src/common/imagpng.cpp:746 ../src/common/imagpng.cpp:757
+#: ../src/common/imagpng.cpp:767
+msgid "Couldn't save PNG image."
+msgstr "Não foi possível gravar a imagem PNG."
+
+#: ../src/msw/thread.cpp:715
+msgid "Couldn't terminate thread"
+msgstr "Não foi possível terminar a thread"
+
+#: ../src/common/xtistrm.cpp:170
+#, fuzzy, c-format
+msgid "Create Parameter %s not found in declared RTTI Parameters"
+msgstr "Create Parameter não encontrado nos Parâmetros RTTI declarados"
+
+#: ../src/generic/dirdlgg.cpp:317
+msgid "Create directory"
+msgstr "Criar directório"
+
+#: ../src/generic/filedlgg.cpp:228 ../src/generic/dirdlgg.cpp:131
+msgid "Create new directory"
+msgstr "Criar novo directório"
+
+#: ../src/common/accelcmn.cpp:322
+#, fuzzy
+msgid "Ctrl+"
+msgstr "Ctrl-"
+
+#: ../src/richtext/richtextctrl.cpp:325 ../src/osx/textctrl_osx.cpp:582
+#: ../src/common/stockitem.cpp:151 ../src/msw/textctrl.cpp:2283
+msgid "Cu&t"
+msgstr "Cor&tar"
+
+#: ../src/generic/filectrlg.cpp:956
+msgid "Current directory:"
+msgstr "Directório actual:"
+
+#: ../src/gtk/print.cpp:759
+#, fuzzy
+msgid "Custom size"
+msgstr "tamanho da fonte"
+
+#: ../src/common/headerctrlcmn.cpp:60
+#, fuzzy
+msgid "Customize Columns"
+msgstr "tamanho da fonte"
+
+#: ../src/common/stockitem.cpp:151 ../src/stc/stc_i18n.cpp:17
+#, fuzzy
+msgid "Cut"
+msgstr "Cor&tar"
+
+#: ../src/common/stockitem.cpp:259
+msgid "Cut selection"
+msgstr "Cortar selecção"
+
+#: ../src/common/fmapbase.cpp:152
+msgid "Cyrillic (ISO-8859-5)"
+msgstr "Cirílico (ISO-8859-5)"
+
+#: ../src/common/paper.cpp:100
+msgid "D sheet, 22 x 34 in"
+msgstr "Folha D, 22 x 34 pol."
+
+#: ../src/msw/dde.cpp:708
+msgid "DDE poke request failed"
+msgstr "Falhou o pedido de poke DDE"
+
+#: ../src/common/accelcmn.cpp:79
+msgid "DECIMAL"
+msgstr "DÉCIMAL"
+
+#: ../src/common/accelcmn.cpp:47
+msgid "DEL"
+msgstr "APAGAR"
+
+#: ../src/common/accelcmn.cpp:48
+msgid "DELETE"
+msgstr "APAGAR"
+
+#: ../src/common/imagbmp.cpp:1092
+msgid "DIB Header: Encoding doesn't match bitdepth."
+msgstr "Cabeçalho DIB: Codificação não coincide com o bitdepth."
+
+#: ../src/common/imagbmp.cpp:1040
+msgid "DIB Header: Image height > 32767 pixels for file."
+msgstr "Cabeçalho DIB: Altura da imagem > 32767 pixeis para o ficheiro."
+
+#: ../src/common/imagbmp.cpp:1032
+msgid "DIB Header: Image width > 32767 pixels for file."
+msgstr "Cabeçalho DIB: Largura da imagem > 32767 pixeis para o ficheiro."
+
+#: ../src/common/imagbmp.cpp:1060
+msgid "DIB Header: Unknown bitdepth in file."
+msgstr "Cabeçalho DIB: Bitdepth desconhecido no ficheiro."
+
+#: ../src/common/imagbmp.cpp:1074
+msgid "DIB Header: Unknown encoding in file."
+msgstr "Cabeçalho DIB: Codificação desconhecida no ficheiro."
+
+#: ../src/common/accelcmn.cpp:80
+msgid "DIVIDE"
+msgstr "DIVIDIR"
+
+#: ../src/common/paper.cpp:122
+msgid "DL Envelope, 110 x 220 mm"
+msgstr "Envelope DL, 110 x 220 mm"
+
+#: ../src/common/accelcmn.cpp:59
+msgid "DOWN"
+msgstr "BAIXO"
+
+#: ../src/richtext/richtextborderspage.cpp:545
+msgid "Dashed"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1921
+msgid "Data object has invalid data format"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:2491
+msgid "Date renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:300
+#, c-format
+msgid "Debug report \"%s\""
+msgstr "Relatório de depuração \"%s\""
+
+#: ../src/common/debugrpt.cpp:210
+msgid "Debug report couldn't be created."
+msgstr "Relatório de depuração não pode ser criado."
+
+#: ../src/common/debugrpt.cpp:558
+msgid "Debug report generation has failed."
+msgstr "Falhou a geração do relatório de depuração."
+
+#: ../src/generic/fontdlgg.cpp:323
+msgid "Decorative"
+msgstr "Decorative"
+
+#: ../src/common/fmapbase.cpp:796
+msgid "Default encoding"
+msgstr "Codificação pré-definida"
+
+#: ../src/dfb/fontmgr.cpp:180
+#, fuzzy
+msgid "Default font"
+msgstr "Impressora pré-definida"
+
+#: ../src/generic/prntdlgg.cpp:510
+msgid "Default printer"
+msgstr "Impressora pré-definida"
+
+#: ../src/richtext/richtextbuffer.cpp:7841 ../src/common/stockitem.cpp:152
+#: ../src/stc/stc_i18n.cpp:20
+msgid "Delete"
+msgstr "Apagar"
+
+#: ../src/richtext/richtexttabspage.cpp:148
+msgid "Delete A&ll"
+msgstr "Apagar T&udo"
+
+#: ../src/richtext/richtextbuffer.cpp:10637
+#, fuzzy
+msgid "Delete Column"
+msgstr "Apagar selecção"
+
+#: ../src/richtext/richtextbuffer.cpp:10587
+#, fuzzy
+msgid "Delete Row"
+msgstr "Apagar"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+msgid "Delete Style"
+msgstr "Apagar Estilo"
+
+#: ../src/richtext/richtextctrl.cpp:1231 ../src/richtext/richtextctrl.cpp:1452
+msgid "Delete Text"
+msgstr "Apagar Texto"
+
+#: ../src/generic/editlbox.cpp:274
+msgid "Delete item"
+msgstr "Apagar Item"
+
+#: ../src/common/stockitem.cpp:260
+msgid "Delete selection"
+msgstr "Apagar selecção"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+#, c-format
+msgid "Delete style %s?"
+msgstr "Apagar estilo %s?"
+
+#: ../src/unix/snglinst.cpp:295
+#, c-format
+msgid "Deleted stale lock file '%s'."
+msgstr "Ficheiro de bloqueio apagado '%s'."
+
+#: ../src/common/module.cpp:124
+#, c-format
+msgid "Dependency \"%s\" of module \"%s\" doesn't exist."
+msgstr "Dependência  \"%s\" do módulo \"%s\" não existe."
+
+#: ../src/common/stockitem.cpp:196
+#, fuzzy
+msgid "Descending"
+msgstr "Codificação pré-definida"
+
+#: ../src/generic/dirctrlg.cpp:626
+msgid "Desktop"
+msgstr "Ambiente de Trabalho"
+
+#: ../src/generic/aboutdlgg.cpp:70
+msgid "Developed by "
+msgstr "Desenvolvido por "
+
+#: ../src/generic/aboutdlgg.cpp:176
+#, fuzzy
+msgid "Developers"
+msgstr "Desenvolvido por "
+
+#: ../src/msw/dialup.cpp:393
+msgid ""
+"Dial up functions are unavailable because the remote access service (RAS) is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Funções de ligação à telefónica não estão disponíveis, em virtude do serviço "
+"de acesso remoto (RAS) não estar instalado neste computador. Por favor "
+"Instale-o."
+
+#: ../src/generic/tipdlg.cpp:230
+msgid "Did you know..."
+msgstr "Sabia que..."
+
+#: ../src/dfb/wrapdfb.cpp:63
+#, fuzzy, c-format
+msgid "DirectFB error %d occurred."
+msgstr "Ocorreu um erro %d de DirectFB."
+
+#: ../src/motif/filedlg.cpp:219
+msgid "Directories"
+msgstr "Directórios"
+
+#: ../src/common/filefn.cpp:1251
+#, c-format
+msgid "Directory '%s' couldn't be created"
+msgstr "Não foi possível criar o directório '%s'"
+
+#: ../src/common/filefn.cpp:1271
+#, fuzzy, c-format
+msgid "Directory '%s' couldn't be deleted"
+msgstr "Não foi possível criar o directório '%s'"
+
+#: ../src/generic/dirdlgg.cpp:233
+msgid "Directory does not exist"
+msgstr "O directório não existe"
+
+#: ../src/generic/filectrlg.cpp:1412
+msgid "Directory doesn't exist."
+msgstr "O directório não existe."
+
+#: ../src/common/docview.cpp:455
+msgid "Discard changes and reload the last saved version?"
+msgstr ""
+
+#: ../src/html/helpwnd.cpp:512
+msgid ""
+"Display all index items that contain given substring. Search is case "
+"insensitive."
+msgstr ""
+"Mostrar todos os items de índice que contenham a seguinte cadeia. A pesquisa "
+"é insensível à capitulação."
+
+#: ../src/html/helpwnd.cpp:692
+msgid "Display options dialog"
+msgstr "Caixa de diálogo do ecrã"
+
+#: ../src/html/helpwnd.cpp:326
+msgid "Displays help as you browse the books on the left."
+msgstr "Mostrar ajuda à medida que navega nos livros à esquerda."
+
+#: ../src/msw/mimetype.cpp:732
+msgid ""
+"Do you want to overwrite the command used to %s files with extension \"%s"
+"\" ?\n"
+"Current value is \n"
+"%s, \n"
+"New value is \n"
+"%s %1"
+msgstr ""
+"Pretende substituir o comando utilizado para %s ficheiros com extensão \"%s"
+"\" ?\n"
+"O valor actual é \n"
+"%s, \n"
+"O novo valor é \n"
+"%s %1"
+
+#: ../src/common/docview.cpp:531
+#, fuzzy, c-format
+msgid "Do you want to save changes to %s?"
+msgstr "Deseja gravar as alterações ao documento %s?"
+
+#: ../src/common/prntbase.cpp:525
+#, fuzzy
+msgid "Document:"
+msgstr "Documentado por "
+
+#: ../src/generic/aboutdlgg.cpp:73
+msgid "Documentation by "
+msgstr "Documentado por "
+
+#: ../src/generic/aboutdlgg.cpp:180
+#, fuzzy
+msgid "Documentation writers"
+msgstr "Documentado por "
+
+#: ../src/common/sizer.cpp:2680
+msgid "Don't Save"
+msgstr "Não Gravar"
+
+#: ../src/msw/frame.cpp:122 ../src/html/htmlwin.cpp:611
+msgid "Done"
+msgstr "Feito"
+
+#: ../src/generic/progdlgg.cpp:481 ../src/msw/progdlg.cpp:407
+msgid "Done."
+msgstr "Feito."
+
+#: ../src/richtext/richtextborderspage.cpp:544
+#, fuzzy
+msgid "Dotted"
+msgstr "Feito"
+
+#: ../src/richtext/richtextborderspage.cpp:546
+#, fuzzy
+msgid "Double"
+msgstr "Feito"
+
+#: ../src/common/paper.cpp:177
+msgid "Double Japanese Postcard Rotated 148 x 200 mm"
+msgstr "Postal Japonês Duplo Rodado 148 x 200 mm"
+
+#: ../src/common/xtixml.cpp:273
+#, c-format
+msgid "Doubly used id : %d"
+msgstr "Id usado duplamente : %d"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:153
+msgid "Down"
+msgstr "Baixo"
+
+#: ../src/richtext/richtextctrl.cpp:814
+msgid "Drag"
+msgstr ""
+
+#: ../src/common/paper.cpp:101
+msgid "E sheet, 34 x 44 in"
+msgstr "Folha E, 34 x 44 pol."
+
+#: ../src/common/accelcmn.cpp:61
+msgid "END"
+msgstr "END"
+
+#: ../src/common/accelcmn.cpp:52
+msgid "ENTER"
+msgstr "ENTER"
+
+#: ../src/unix/fswatcher_inotify.cpp:535
+#, fuzzy
+msgid "EOF while reading from inotify descriptor"
+msgstr "não foi possível ler do descritor do ficheiro %d"
+
+#: ../src/common/accelcmn.cpp:64
+msgid "ESC"
+msgstr "ESC"
+
+#: ../src/common/accelcmn.cpp:65
+msgid "ESCAPE"
+msgstr "ESCAPE"
+
+#: ../src/common/accelcmn.cpp:73
+msgid "EXECUTE"
+msgstr "EXECUTAR"
+
+#: ../src/common/stockitem.cpp:154
+#, fuzzy
+msgid "Edit"
+msgstr "&Editar"
+
+#: ../src/generic/editlbox.cpp:272
+msgid "Edit item"
+msgstr "Editar item"
+
+#: ../include/wx/generic/progdlgg.h:84
+#, fuzzy
+msgid "Elapsed time:"
+msgstr "Tempo passado : "
+
+#: ../src/richtext/richtextsizepage.cpp:353
+#: ../src/richtext/richtextsizepage.cpp:355
+#: ../src/richtext/richtextsizepage.cpp:465
+#: ../src/richtext/richtextsizepage.cpp:467
+msgid "Enable the height value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:438
+#: ../src/richtext/richtextsizepage.cpp:440
+#, fuzzy
+msgid "Enable the maximum width value."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/richtext/richtextsizepage.cpp:411
+#: ../src/richtext/richtextsizepage.cpp:413
+msgid "Enable the minimum height value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:384
+#: ../src/richtext/richtextsizepage.cpp:386
+#, fuzzy
+msgid "Enable the minimum width value."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/richtext/richtextsizepage.cpp:319
+#: ../src/richtext/richtextsizepage.cpp:321
+msgid "Enable the width value."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:280
+#: ../src/richtext/richtextsizepage.cpp:282
+#, fuzzy
+msgid "Enable vertical alignment."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:133
+#: ../src/richtext/richtextbackgroundpage.cpp:135
+#, fuzzy
+msgid "Enables a background colour."
+msgstr "Cor de fundo"
+
+#: ../src/richtext/richtextstyledlg.cpp:931
+#, fuzzy
+msgid "Enter a box style name"
+msgstr "Introduza um nome de estilo de lista"
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+msgid "Enter a character style name"
+msgstr "Introduza um nome de estilo de caracter"
+
+#: ../src/richtext/richtextstyledlg.cpp:817
+msgid "Enter a list style name"
+msgstr "Introduza um nome de estilo de lista"
+
+#: ../src/richtext/richtextstyledlg.cpp:890
+#, fuzzy
+msgid "Enter a new style name"
+msgstr "Introduza um nome de estilo de lista"
+
+#: ../src/richtext/richtextstyledlg.cpp:651
+msgid "Enter a paragraph style name"
+msgstr "Introduza um nome de estilo de parágrafo"
+
+#: ../src/generic/dbgrptg.cpp:174
+#, c-format
+msgid "Enter command to open file \"%s\":"
+msgstr "Introduza o comando para abrir o ficheiro \"%s\":"
+
+#: ../src/generic/helpext.cpp:463
+msgid "Entries found"
+msgstr "Entradas encontradas"
+
+#: ../src/common/paper.cpp:143
+msgid "Envelope Invite 220 x 220 mm"
+msgstr "Envelope de Convite 220 x 220 mm"
+
+#: ../src/common/config.cpp:473
+#, c-format
+msgid ""
+"Environment variables expansion failed: missing '%c' at position %u in '%s'."
+msgstr ""
+"Falhou a expansão das variáveis de ambiente: falta %c na posição %u em '%s'."
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/dirctrlg.cpp:688
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:791
+#: ../src/generic/filectrlg.cpp:805 ../src/generic/filectrlg.cpp:821
+#: ../src/generic/filectrlg.cpp:1381 ../src/generic/filectrlg.cpp:1412
+#: ../src/gtk/filedlg.cpp:73 ../src/gtk1/fontdlg.cpp:74
+msgid "Error"
+msgstr "Erro"
+
+#: ../src/unix/epolldispatcher.cpp:103
+#, fuzzy
+msgid "Error closing epoll descriptor"
+msgstr "Erro ao criar directório"
+
+#: ../src/unix/fswatcher_kqueue.cpp:114
+#, fuzzy
+msgid "Error closing kqueue instance"
+msgstr "Erro ao criar directório"
+
+#: ../src/generic/dirdlgg.cpp:251
+msgid "Error creating directory"
+msgstr "Erro ao criar directório"
+
+#: ../src/common/imagbmp.cpp:1103
+msgid "Error in reading image DIB."
+msgstr "Erro na leitura do DIB da imagem."
+
+#: ../src/propgrid/propgrid.cpp:6563
+#, c-format
+msgid "Error in resource: %s"
+msgstr ""
+
+#: ../src/common/fileconf.cpp:453
+msgid "Error reading config options."
+msgstr "Erro ao ler opções de configuração."
+
+#: ../src/common/fileconf.cpp:1064
+msgid "Error saving user configuration data."
+msgstr "Erro ao gravar dados de configuração do utilizador."
+
+#: ../src/gtk/print.cpp:671
+#, fuzzy
+msgid "Error while printing: "
+msgstr "Erro durante a espera de um semáforo"
+
+#: ../src/common/log.cpp:223
+msgid "Error: "
+msgstr "Erro: "
+
+#: ../src/common/fmapbase.cpp:150
+msgid "Esperanto (ISO-8859-3)"
+msgstr "Esperanto (ISO-8859-3)"
+
+#: ../include/wx/generic/progdlgg.h:85
+#, fuzzy
+msgid "Estimated time:"
+msgstr "Tempo estimado : "
+
+#: ../src/unix/fswatcher_inotify.cpp:639
+msgid "Event queue overflowed"
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:234
+#, fuzzy
+msgid "Executable files (*.exe)|*.exe|"
+msgstr "Ficheiros executáveis (*.exe)|*.exe|Todos os ficheiros (*.*)|*.*||"
+
+#: ../src/common/stockitem.cpp:155
+msgid "Execute"
+msgstr ""
+
+#: ../src/msw/utilsexc.cpp:888
+#, c-format
+msgid "Execution of command '%s' failed"
+msgstr "Falhou a execução do comando '%s'"
+
+#: ../src/os2/utilsexc.cpp:163
+#, c-format
+msgid "Execution of command '%s' failed with error: %ul"
+msgstr "Execução do comando '%s' terminou com o erro: %ul"
+
+#: ../src/common/paper.cpp:106
+msgid "Executive, 7 1/4 x 10 1/2 in"
+msgstr "Executivo, 7 1/4 x 10 1/2 pol."
+
+#: ../src/msw/registry.cpp:1230
+#, c-format
+msgid ""
+"Exporting registry key: file \"%s\" already exists and won't be overwritten."
+msgstr ""
+"Exportação da chave de registo: o ficheiro \"%s\" já existe e não vai ser "
+"sobreposto."
+
+#: ../src/common/fmapbase.cpp:195
+msgid "Extended Unix Codepage for Japanese (EUC-JP)"
+msgstr "Código de Página Extendido para Japonês (EUC-JP)"
+
+#: ../src/html/chm.cpp:725
+#, c-format
+msgid "Extraction of '%s' into '%s' failed."
+msgstr "Falhou a extracção de '%s' para '%s'."
+
+#: ../src/common/accelcmn.cpp:238 ../src/common/accelcmn.cpp:333
+msgid "F"
+msgstr "F"
+
+#: ../src/propgrid/advprops.cpp:640
+#, fuzzy
+msgid "Face Name"
+msgstr "NovoNome"
+
+#: ../src/unix/snglinst.cpp:269
+msgid "Failed to access lock file."
+msgstr "Falha no acesso ao ficheiro de bloqueio."
+
+#: ../src/unix/epolldispatcher.cpp:116
+#, fuzzy, c-format
+msgid "Failed to add descriptor %d to epoll descriptor %d"
+msgstr "Não foi possível escrever no descritor de ficheiro %d"
+
+#: ../src/msw/dib.cpp:548
+#, fuzzy, c-format
+msgid "Failed to allocate %luKb of memory for bitmap data."
+msgstr "Falha ao alocar %luKb de memória para dados bitmap."
+
+#: ../src/common/glcmn.cpp:87
+#, fuzzy
+msgid "Failed to allocate colour for OpenGL"
+msgstr "Falha de criação de cursor."
+
+#: ../src/unix/displayx11.cpp:288
+msgid "Failed to change video mode"
+msgstr "Falha ao alterar o modo de vídeo"
+
+#: ../src/common/image.cpp:3139
+#, fuzzy, c-format
+msgid "Failed to check format of image file \"%s\"."
+msgstr "Falha ao gravar imagem de bitmap para ficheiro \"%s\"."
+
+#: ../src/common/debugrpt.cpp:244
+#, c-format
+msgid "Failed to clean up debug report directory \"%s\""
+msgstr "Falha ao limpar directório de relatório de depuração \"%s\""
+
+#: ../src/common/filename.cpp:211
+msgid "Failed to close file handle"
+msgstr "Falha ao fechar manuseador de ficheiro"
+
+#: ../src/unix/snglinst.cpp:334
+#, c-format
+msgid "Failed to close lock file '%s'"
+msgstr "Falha ao fechar o ficheiro de bloqueio '%s'"
+
+#: ../src/msw/clipbrd.cpp:115
+msgid "Failed to close the clipboard."
+msgstr "Falha ao fechar a área de transferência."
+
+#: ../src/x11/utils.cpp:204
+#, c-format
+msgid "Failed to close the display \"%s\""
+msgstr "Falha ao fechar o ecrã \"%s\""
+
+#: ../src/msw/dialup.cpp:818
+msgid "Failed to connect: missing username/password."
+msgstr "Falha na ligação: falta nome de utilizador/palavra passe."
+
+#: ../src/msw/dialup.cpp:764
+msgid "Failed to connect: no ISP to dial."
+msgstr "Falha na ligação: nenhum serviço ISP para marcar."
+
+#: ../src/common/textfile.cpp:200
+#, fuzzy, c-format
+msgid "Failed to convert file \"%s\" to Unicode."
+msgstr "Falha ao converter conteúdo do ficheiro para Unicode."
+
+#: ../src/generic/logg.cpp:976
+#, fuzzy
+msgid "Failed to copy dialog contents to the clipboard."
+msgstr "Falha na abertura da área de transferência."
+
+#: ../src/msw/registry.cpp:691
+#, c-format
+msgid "Failed to copy registry value '%s'"
+msgstr "Falha na cópia do valor do registo '%s'"
+
+#: ../src/msw/registry.cpp:700
+#, c-format
+msgid "Failed to copy the contents of registry key '%s' to '%s'."
+msgstr "Falha ao copiar os conteúdos da chave de registo '%s' para '%s'."
+
+#: ../src/common/filefn.cpp:1058
+#, c-format
+msgid "Failed to copy the file '%s' to '%s'"
+msgstr "Falha ao copiar o ficheiro '%s' para '%s'"
+
+#: ../src/msw/registry.cpp:678
+#, c-format
+msgid "Failed to copy the registry subkey '%s' to '%s'."
+msgstr "Falha ao copiar a sub-chave de registo '%s' para '%s'."
+
+#: ../src/msw/dde.cpp:1073
+msgid "Failed to create DDE string"
+msgstr "Falha ne criação da cadeia de caracteres DDE"
+
+#: ../src/msw/mdi.cpp:590
+msgid "Failed to create MDI parent frame."
+msgstr "Falha na criação da moldura MDI progenitora."
+
+#: ../src/common/filename.cpp:1080
+msgid "Failed to create a temporary file name"
+msgstr "Falha a criar nome de ficheiro temporário"
+
+#: ../src/msw/utilsexc.cpp:235
+msgid "Failed to create an anonymous pipe"
+msgstr "Falha ao criar pipeline anónimo"
+
+#: ../src/msw/ole/automtn.cpp:522
+#, fuzzy, c-format
+msgid "Failed to create an instance of \"%s\""
+msgstr "Falha de criação de directório \"%s\""
+
+#: ../src/msw/dde.cpp:442
+#, c-format
+msgid "Failed to create connection to server '%s' on topic '%s'"
+msgstr "Falha ao criar ligação ao servidor '%s' no tópico '%s'"
+
+#: ../src/msw/cursor.cpp:212
+msgid "Failed to create cursor."
+msgstr "Falha de criação de cursor."
+
+#: ../src/common/debugrpt.cpp:209
+#, c-format
+msgid "Failed to create directory \"%s\""
+msgstr "Falha de criação de directório \"%s\""
+
+#: ../src/generic/dirdlgg.cpp:249
+#, c-format
+msgid ""
+"Failed to create directory '%s'\n"
+"(Do you have the required permissions?)"
+msgstr ""
+"Falha ao criar o directório '%s'\n"
+"(Tem as permissões necessárias?)"
+
+#: ../src/unix/epolldispatcher.cpp:84
+#, fuzzy
+msgid "Failed to create epoll descriptor"
+msgstr "Falha de criação de cursor."
+
+#: ../src/msw/mimetype.cpp:198
+#, c-format
+msgid "Failed to create registry entry for '%s' files."
+msgstr "Falha de criação de entrada de registo para ficheiros '%s'."
+
+#: ../src/msw/fdrepdlg.cpp:442
+#, c-format
+msgid "Failed to create the standard find/replace dialog (error code %d)"
+msgstr ""
+"Falha a criar dialogo standard de procura/substitui (código de erro %d)"
+
+#: ../src/unix/wakeuppipe.cpp:52
+#, fuzzy
+msgid "Failed to create wake up pipe used by event loop."
+msgstr "Falha de criação de barra de estado."
+
+#: ../src/html/winpars.cpp:739
+#, c-format
+msgid "Failed to display HTML document in %s encoding"
+msgstr "Falha a mostrar documento HTML na codificação %s"
+
+#: ../src/msw/clipbrd.cpp:127
+msgid "Failed to empty the clipboard."
+msgstr "Falha a limpar a área de transferência."
+
+#: ../src/unix/displayx11.cpp:265
+msgid "Failed to enumerate video modes"
+msgstr "Falha a enumerar modos de vídeo"
+
+#: ../src/msw/dde.cpp:727
+msgid "Failed to establish an advise loop with DDE server"
+msgstr "Falha ao estabelecer um advise loop com o servidor DDE"
+
+#: ../src/msw/dialup.cpp:650 ../src/msw/dialup.cpp:884
+#, c-format
+msgid "Failed to establish dialup connection: %s"
+msgstr "Falha ao estabelecer ligação telefónica: %s"
+
+#: ../src/unix/utilsunx.cpp:617
+#, c-format
+msgid "Failed to execute '%s'\n"
+msgstr "Falha ao executar '%s'\n"
+
+#: ../src/common/debugrpt.cpp:725
+msgid "Failed to execute curl, please install it in PATH."
+msgstr "Falha a executar curl, por favor instale-o no PATH."
+
+#: ../src/msw/ole/automtn.cpp:505
+#, fuzzy, c-format
+msgid "Failed to find CLSID of \"%s\""
+msgstr "Falha na abertura do ecrã \"%s\"."
+
+#: ../src/common/regex.cpp:434 ../src/common/regex.cpp:482
+#, c-format
+msgid "Failed to find match for regular expression: %s"
+msgstr "Falha a encontrar resultados na procura por expressão regular: %s"
+
+#: ../src/msw/dialup.cpp:716
+#, c-format
+msgid "Failed to get ISP names: %s"
+msgstr "Falha ao obter nomes de ISP: %s"
+
+#: ../src/msw/ole/automtn.cpp:574
+#, fuzzy, c-format
+msgid "Failed to get OLE automation interface for \"%s\""
+msgstr "Falha de criação de directório \"%s\""
+
+#: ../src/msw/clipbrd.cpp:747
+msgid "Failed to get data from the clipboard"
+msgstr "Falha na obtenção de dados da área de transferência"
+
+#: ../src/common/time.cpp:249
+msgid "Failed to get the local system time"
+msgstr "Falha na obtenção da hora local do sistema"
+
+#: ../src/common/filefn.cpp:1453
+msgid "Failed to get the working directory"
+msgstr "Falha na obtenção do directório de trabalho"
+
+#: ../src/univ/theme.cpp:113
+msgid "Failed to initialize GUI: no built-in themes found."
+msgstr "Falha ao inicializar o GUI: não foram encontrados temas integrados."
+
+#: ../src/msw/helpchm.cpp:63
+msgid "Failed to initialize MS HTML Help."
+msgstr "Falha na inicialização da ajuda MS HTML."
+
+#: ../src/msw/glcanvas.cpp:892
+msgid "Failed to initialize OpenGL"
+msgstr "Falha ao inicializar o OpenGL"
+
+#: ../src/msw/dialup.cpp:879
+#, fuzzy, c-format
+msgid "Failed to initiate dialup connection: %s"
+msgstr "Falha ao terminar a ligação telefónica: %s "
+
+#: ../src/gtk/textctrl.cpp:1117
+msgid "Failed to insert text in the control."
+msgstr "Falha de inserção de texto no controlo."
+
+#: ../src/unix/snglinst.cpp:241
+#, c-format
+msgid "Failed to inspect the lock file '%s'"
+msgstr "Falha de inspecção no ficheiro de bloqueio '%s'"
+
+#: ../src/unix/appunix.cpp:182
+#, fuzzy
+msgid "Failed to install signal handler"
+msgstr "Falha ao fechar manuseador de ficheiro"
+
+#: ../src/unix/threadpsx.cpp:1162
+msgid ""
+"Failed to join a thread, potential memory leak detected - please restart the "
+"program"
+msgstr ""
+"Falha na associação a uma thread, foi detectada uma potencial fuga de "
+"memória - por favor reinicie o programa"
+
+#: ../src/msw/utils.cpp:745
+#, c-format
+msgid "Failed to kill process %d"
+msgstr "Falha no encerramento do processo %d"
+
+#: ../src/common/image.cpp:2365
+#, fuzzy, c-format
+msgid "Failed to load bitmap \"%s\" from resources."
+msgstr "Falha na abertura da imagem %d do ficheiro '%s'."
+
+#: ../src/common/image.cpp:2374
+#, fuzzy, c-format
+msgid "Failed to load icon \"%s\" from resources."
+msgstr "Falha na abertura da imagem %d do ficheiro '%s'."
+
+#: ../src/common/iconbndl.cpp:182
+#, fuzzy, c-format
+msgid "Failed to load image %%d from file '%s'."
+msgstr "Falha na abertura da imagem %d do ficheiro '%s'."
+
+#: ../src/common/iconbndl.cpp:190
+#, fuzzy, c-format
+msgid "Failed to load image %d from stream."
+msgstr "Falha na abertura da imagem %d do ficheiro '%s'."
+
+#: ../src/common/image.cpp:2450 ../src/common/image.cpp:2469
+#, fuzzy, c-format
+msgid "Failed to load image from file \"%s\"."
+msgstr "Falha na abertura da imagem %d do ficheiro '%s'."
+
+#: ../src/msw/enhmeta.cpp:97
+#, c-format
+msgid "Failed to load metafile from file \"%s\"."
+msgstr "Falha na leitura de metafile do ficheiro \"%s\"."
+
+#: ../src/msw/volume.cpp:327
+msgid "Failed to load mpr.dll."
+msgstr "Falha na abertura do mpr.dll."
+
+#: ../src/msw/utils.cpp:1120
+#, fuzzy, c-format
+msgid "Failed to load resource \"%s\"."
+msgstr "Falha na leitura de metafile do ficheiro \"%s\"."
+
+#: ../src/common/dynlib.cpp:100
+#, c-format
+msgid "Failed to load shared library '%s'"
+msgstr "Falha na abertura da livraria partilhada '%s'"
+
+#: ../src/msw/utils.cpp:1127
+#, fuzzy, c-format
+msgid "Failed to lock resource \"%s\"."
+msgstr "Falha no bloqueio do ficheiro de bloqueio '%s'"
+
+#: ../src/unix/snglinst.cpp:198
+#, c-format
+msgid "Failed to lock the lock file '%s'"
+msgstr "Falha no bloqueio do ficheiro de bloqueio '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:136
+#, c-format
+msgid "Failed to modify descriptor %d in epoll descriptor %d"
+msgstr ""
+
+#: ../src/common/filename.cpp:2681
+#, c-format
+msgid "Failed to modify file times for '%s'"
+msgstr "Falha a modificar o tempo do ficheiro para '%s'"
+
+#: ../src/common/selectdispatcher.cpp:252
+msgid "Failed to monitor I/O channels"
+msgstr ""
+
+#: ../src/common/filename.cpp:194
+#, fuzzy, c-format
+msgid "Failed to open '%s' for reading"
+msgstr "Falha ao abrir '%s' para %s"
+
+#: ../src/common/filename.cpp:199
+#, fuzzy, c-format
+msgid "Failed to open '%s' for writing"
+msgstr "Falha ao abrir '%s' para %s"
+
+#: ../src/html/chm.cpp:141
+#, c-format
+msgid "Failed to open CHM archive '%s'."
+msgstr "Falha na abertura do arquivo CHM '%s'."
+
+#: ../src/common/utilscmn.cpp:1135
+#, fuzzy, c-format
+msgid "Failed to open URL \"%s\" in default browser."
+msgstr "Falha ao abrir '%s' para %s"
+
+#: ../include/wx/msw/private/fswatcher.h:92
+#, fuzzy, c-format
+msgid "Failed to open directory \"%s\" for monitoring."
+msgstr "Falha ao abrir '%s' para %s"
+
+#: ../src/x11/utils.cpp:223
+#, c-format
+msgid "Failed to open display \"%s\"."
+msgstr "Falha na abertura do ecrã \"%s\"."
+
+#: ../src/common/filename.cpp:1115
+msgid "Failed to open temporary file."
+msgstr "Falha na abertura de ficheiro temporário."
+
+#: ../src/msw/clipbrd.cpp:94
+msgid "Failed to open the clipboard."
+msgstr "Falha na abertura da área de transferência."
+
+#: ../src/common/translation.cpp:1170
+#, fuzzy, c-format
+msgid "Failed to parse Plural-Forms: '%s'"
+msgstr "Não foi possível analisar gramaticalmente Plural-Forms: '%s'"
+
+#: ../src/unix/mediactrl.cpp:1268
+#, fuzzy, c-format
+msgid "Failed to prepare playing \"%s\"."
+msgstr "Falha na abertura do ecrã \"%s\"."
+
+#: ../src/msw/clipbrd.cpp:647
+msgid "Failed to put data on the clipboard"
+msgstr "Falha na inserção de dados na área de transferência"
+
+#: ../src/unix/snglinst.cpp:278
+msgid "Failed to read PID from lock file."
+msgstr "Falha na leitura do PID do ficheiro de bloqueio."
+
+#: ../src/common/fileconf.cpp:464
+#, fuzzy
+msgid "Failed to read config options."
+msgstr "Erro ao ler opções de configuração."
+
+#: ../src/common/docview.cpp:678
+#, fuzzy, c-format
+msgid "Failed to read document from the file \"%s\"."
+msgstr "Falha na leitura de metafile do ficheiro \"%s\"."
+
+#: ../src/dfb/evtloop.cpp:98
+#, fuzzy
+msgid "Failed to read event from DirectFB pipe"
+msgstr "Falha na leitura do PID do ficheiro de bloqueio."
+
+#: ../src/unix/wakeuppipe.cpp:120
+#, fuzzy
+msgid "Failed to read from wake-up pipe"
+msgstr "Falha na leitura do PID do ficheiro de bloqueio."
+
+#: ../src/unix/utilsunx.cpp:685
+msgid "Failed to redirect child process input/output"
+msgstr "Falha no redireccionamento do processo filho de entrada/saída"
+
+#: ../src/msw/utilsexc.cpp:697
+msgid "Failed to redirect the child process IO"
+msgstr "Falha no redireccionamento do processo filho ES"
+
+#: ../src/msw/dde.cpp:293
+#, c-format
+msgid "Failed to register DDE server '%s'"
+msgstr "Falha no registo do servidor DDE '%s'"
+
+#: ../src/common/fontmap.cpp:245
+#, c-format
+msgid "Failed to remember the encoding for the charset '%s'."
+msgstr "Falha ao recordar a codificação para o conjunto de caracteres '%s'."
+
+#: ../src/common/debugrpt.cpp:227
+#, c-format
+msgid "Failed to remove debug report file \"%s\""
+msgstr "Falha ao remover ficheiro de relatório de depuração \"%s\""
+
+#: ../src/unix/snglinst.cpp:322
+#, c-format
+msgid "Failed to remove lock file '%s'"
+msgstr "Falha ao remover ficheiro de bloqueio '%s'"
+
+#: ../src/unix/snglinst.cpp:288
+#, c-format
+msgid "Failed to remove stale lock file '%s'."
+msgstr "Falha ao remover ficheiro de bloqueio estagnado'%s'."
+
+#: ../src/msw/registry.cpp:528
+#, c-format
+msgid "Failed to rename registry value '%s' to '%s'."
+msgstr "Falha ao renomear valor de registo de '%s' para '%s'."
+
+#: ../src/common/filefn.cpp:1168
+#, c-format
+msgid ""
+"Failed to rename the file '%s' to '%s' because the destination file already "
+"exists."
+msgstr ""
+"Falha ao renomear o ficheiro de '%s' para '%s' porque o ficheiro de destino "
+"já existe."
+
+#: ../src/msw/registry.cpp:633
+#, c-format
+msgid "Failed to rename the registry key '%s' to '%s'."
+msgstr "Falha ao renomear a chave de registo de '%s' para '%s'."
+
+#: ../src/msw/clipbrd.cpp:497
+msgid "Failed to retrieve data from the clipboard."
+msgstr "Falha na obtenção dos dados da área de transferência."
+
+#: ../src/common/filename.cpp:2777
+#, c-format
+msgid "Failed to retrieve file times for '%s'"
+msgstr "Falha ao obter tempos do ficheiro para '%s'"
+
+#: ../src/msw/dialup.cpp:487
+msgid "Failed to retrieve text of RAS error message"
+msgstr "Falha na obtenção do texto da mensagem de erro RAS"
+
+#: ../src/msw/clipbrd.cpp:784
+msgid "Failed to retrieve the supported clipboard formats"
+msgstr "Falha na obtenção dos formatos suportados pela área de transferência"
+
+#: ../src/common/docview.cpp:649
+#, fuzzy, c-format
+msgid "Failed to save document to the file \"%s\"."
+msgstr "Falha ao gravar imagem de bitmap para ficheiro \"%s\"."
+
+#: ../src/msw/dib.cpp:326
+#, c-format
+msgid "Failed to save the bitmap image to file \"%s\"."
+msgstr "Falha ao gravar imagem de bitmap para ficheiro \"%s\"."
+
+#: ../src/msw/dde.cpp:768
+msgid "Failed to send DDE advise notification"
+msgstr "Falha ao enviar aviso de notificação DDE"
+
+#: ../src/common/ftp.cpp:404
+#, c-format
+msgid "Failed to set FTP transfer mode to %s."
+msgstr "Falha ao definir modo de transferência FTP para %s."
+
+#: ../src/msw/clipbrd.cpp:373
+msgid "Failed to set clipboard data."
+msgstr "Falha ao definir dados da área de transferência."
+
+#: ../src/unix/snglinst.cpp:181
+#, c-format
+msgid "Failed to set permissions on lock file '%s'"
+msgstr "Falha ao definir permissões no ficheiro de bloqueio '%s'"
+
+#: ../src/unix/utilsunx.cpp:674
+#, fuzzy
+msgid "Failed to set process priority"
+msgstr "Falha ao definir prioridade de thread %d."
+
+#: ../src/common/file.cpp:576
+msgid "Failed to set temporary file permissions"
+msgstr "Falha ao definir permissões do ficheiro temporário"
+
+#: ../src/gtk/textctrl.cpp:1058
+msgid "Failed to set text in the text control."
+msgstr "Falha ao definir texto no controlo de texto."
+
+#: ../src/unix/threadpsx.cpp:1293
+#, fuzzy, c-format
+msgid "Failed to set thread concurrency level to %lu"
+msgstr "Falha ao definir prioridade de thread %d."
+
+#: ../src/unix/threadpsx.cpp:1377 ../src/unix/threadpsx.cpp:1387
+#, c-format
+msgid "Failed to set thread priority %d."
+msgstr "Falha ao definir prioridade de thread %d."
+
+#: ../src/unix/utilsunx.cpp:791
+msgid "Failed to set up non-blocking pipe, the program might hang."
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:261
+#, c-format
+msgid "Failed to store image '%s' to memory VFS!"
+msgstr "Falha ao armazenar imagem '%s' para memória VFS!"
+
+#: ../src/dfb/evtloop.cpp:170
+msgid "Failed to switch DirectFB pipe to non-blocking mode"
+msgstr ""
+
+#: ../src/unix/wakeuppipe.cpp:59
+msgid "Failed to switch wake up pipe to non-blocking mode"
+msgstr ""
+
+#: ../src/unix/threadpsx.cpp:1569
+msgid "Failed to terminate a thread."
+msgstr "Falha ao matar a thread."
+
+#: ../src/msw/dde.cpp:746
+msgid "Failed to terminate the advise loop with DDE server"
+msgstr "Falha ao terminar o advise loop com o servidor DDE"
+
+#: ../src/msw/dialup.cpp:959
+#, c-format
+msgid "Failed to terminate the dialup connection: %s"
+msgstr "Falha ao terminar a ligação telefónica: %s "
+
+#: ../src/common/filename.cpp:2696
+#, c-format
+msgid "Failed to touch the file '%s'"
+msgstr "Falha ao tocar no ficheiro '%s'"
+
+#: ../src/unix/snglinst.cpp:328
+#, c-format
+msgid "Failed to unlock lock file '%s'"
+msgstr "Falha ao desbloquear ficheiro de bloqueio '%s'"
+
+#: ../src/msw/dde.cpp:314
+#, c-format
+msgid "Failed to unregister DDE server '%s'"
+msgstr "Falha ao desregistar servidor DDE '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:155
+#, fuzzy, c-format
+msgid "Failed to unregister descriptor %d from epoll descriptor %d"
+msgstr "Falha na obtenção dos dados da área de transferência."
+
+#: ../src/common/fileconf.cpp:1037
+msgid "Failed to update user configuration file."
+msgstr "Falha na actualização do ficheiro de configuração do utilizador."
+
+#: ../src/common/debugrpt.cpp:738
+#, c-format
+msgid "Failed to upload the debug report (error code %d)."
+msgstr "Falha ao enviar relatório de depuração (código de erro %d)."
+
+#: ../src/unix/snglinst.cpp:168
+#, c-format
+msgid "Failed to write to lock file '%s'"
+msgstr "Falha ao escrever para o ficheiro de bloqueio '%s'"
+
+#: ../src/propgrid/propgrid.cpp:172
+#, fuzzy
+msgid "False"
+msgstr "Ficheiro"
+
+#: ../src/propgrid/advprops.cpp:658
+#, fuzzy
+msgid "Family"
+msgstr "Família de &fonte:"
+
+#: ../src/common/stockitem.cpp:157 ../src/msw/wince/filedlgwce.cpp:121
+msgid "File"
+msgstr "Ficheiro"
+
+#: ../src/common/docview.cpp:666
+#, fuzzy, c-format
+msgid "File \"%s\" could not be opened for reading."
+msgstr "Falha ao abrir '%s' para %s"
+
+#: ../src/common/docview.cpp:643
+#, fuzzy, c-format
+msgid "File \"%s\" could not be opened for writing."
+msgstr "Falha ao abrir '%s' para %s"
+
+#: ../src/gtk/filedlg.cpp:56
+#, c-format
+msgid "File '%s' already exists, do you really want to overwrite it?"
+msgstr "O ficheiro '%s' já existe, deseja substituí-lo?"
+
+#: ../src/os2/filedlg.cpp:310
+#, c-format
+msgid ""
+"File '%s' already exists.\n"
+"Do you want to replace it?"
+msgstr ""
+"O ficheiro '%s' já existe.\n"
+"Deseja substituí-lo?"
+
+#: ../src/common/filefn.cpp:1207
+#, fuzzy, c-format
+msgid "File '%s' couldn't be removed"
+msgstr "Não foi possível criar o directório '%s'"
+
+#: ../src/common/filefn.cpp:1187
+#, fuzzy, c-format
+msgid "File '%s' couldn't be renamed '%s'"
+msgstr "Não foi possível criar o directório '%s'"
+
+#: ../src/richtext/richtextctrl.cpp:2688 ../src/common/textcmn.cpp:921
+msgid "File couldn't be loaded."
+msgstr "Não foi possível carregar o ficheiro."
+
+#: ../src/msw/filedlg.cpp:458
+#, fuzzy, c-format
+msgid "File dialog failed with error code %0lx."
+msgstr "Execução do comando '%s' terminou com o erro: %ul"
+
+#: ../src/common/docview.cpp:1771
+msgid "File error"
+msgstr "Erro de ficheiro"
+
+#: ../src/generic/dirctrlg.cpp:688 ../src/generic/filectrlg.cpp:805
+msgid "File name exists already."
+msgstr "Nome de ficheiro já existe."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Files"
+msgstr "Ficheiros"
+
+#: ../src/common/filefn.cpp:1761
+#, c-format
+msgid "Files (%s)"
+msgstr "Ficheiros (%s)"
+
+#: ../src/motif/filedlg.cpp:218
+msgid "Filter"
+msgstr "Filtro"
+
+#: ../src/common/stockitem.cpp:158 ../src/html/helpwnd.cpp:500
+msgid "Find"
+msgstr "Procurar"
+
+#: ../src/common/stockitem.cpp:159
+#, fuzzy
+msgid "First"
+msgstr "primeiro"
+
+#: ../src/common/prntbase.cpp:1518
+#, fuzzy
+msgid "First page"
+msgstr "Página seguinte"
+
+#: ../src/richtext/richtextsizepage.cpp:521
+#, fuzzy
+msgid "Fixed"
+msgstr "Fonte Fixa:"
+
+#: ../src/html/helpwnd.cpp:1219
+msgid "Fixed font:"
+msgstr "Fonte Fixa:"
+
+#: ../src/html/helpwnd.cpp:1282
+msgid "Fixed size face.<br> <b>bold</b> <i>italic</i> "
+msgstr "Tamanho fixo da face.<br> <b>destacado</b> <i>itálico</i> "
+
+#: ../src/richtext/richtextsizepage.cpp:229
+#, fuzzy
+msgid "Floating"
+msgstr "A formatar"
+
+#: ../src/common/stockitem.cpp:160
+#, fuzzy
+msgid "Floppy"
+msgstr "&Copiar"
+
+#: ../src/common/paper.cpp:112
+msgid "Folio, 8 1/2 x 13 in"
+msgstr "Folio, 8 1/2 x 13 pol."
+
+#: ../src/richtext/richtextformatdlg.cpp:324 ../src/osx/carbon/fontdlg.cpp:473
+#: ../src/common/stockitem.cpp:194
+msgid "Font"
+msgstr "Fonte"
+
+#: ../src/richtext/richtextfontpage.cpp:230
+msgid "Font &weight:"
+msgstr "&Peso da fonte:"
+
+#: ../src/html/helpwnd.cpp:1220
+msgid "Font size:"
+msgstr "Tamanho da Fonte:"
+
+#: ../src/richtext/richtextfontpage.cpp:217
+msgid "Font st&yle:"
+msgstr "Est&ilo da fonte:"
+
+#: ../src/osx/carbon/fontdlg.cpp:515
+msgid "Font:"
+msgstr "Fonte:"
+
+#: ../src/dfb/fontmgr.cpp:198
+#, c-format
+msgid "Fonts index file %s disappeared while loading fonts."
+msgstr ""
+
+#: ../src/unix/utilsunx.cpp:651
+msgid "Fork failed"
+msgstr "Falha no fork"
+
+#: ../src/common/stockitem.cpp:161
+#, fuzzy
+msgid "Forward"
+msgstr "&Avançar"
+
+#: ../src/common/xtixml.cpp:235
+msgid "Forward hrefs are not supported"
+msgstr "hrefs avançados não são suportados"
+
+#: ../src/html/helpwnd.cpp:888
+#, c-format
+msgid "Found %i matches"
+msgstr "Foram encontradas %i correspondências"
+
+#: ../src/generic/prntdlgg.cpp:238
+msgid "From:"
+msgstr "De:"
+
+#: ../src/common/imaggif.cpp:160
+msgid "GIF: Invalid gif index."
+msgstr "GIF: Índice gif inválido."
+
+#: ../src/common/imaggif.cpp:150
+msgid "GIF: data stream seems to be truncated."
+msgstr "GIF: corrente de dados parece estar truncada."
+
+#: ../src/common/imaggif.cpp:134
+msgid "GIF: error in GIF image format."
+msgstr "GIF: erro no formato de imagem GIF."
+
+#: ../src/common/imaggif.cpp:137
+msgid "GIF: not enough memory."
+msgstr "GIF: sem memória suficiente."
+
+#: ../src/common/imaggif.cpp:140
+msgid "GIF: unknown error!!!"
+msgstr "GIF: erro desconhecido!!!"
+
+#: ../src/gtk/window.cpp:4288
+msgid ""
+"GTK+ installed on this machine is too old to support screen compositing, "
+"please install GTK+ 2.12 or later."
+msgstr ""
+
+#: ../src/univ/themes/gtk.cpp:525
+msgid "GTK+ theme"
+msgstr "Tema GTK+"
+
+#: ../src/common/preferencescmn.cpp:39
+msgid "General"
+msgstr ""
+
+#: ../src/common/prntbase.cpp:243
+msgid "Generic PostScript"
+msgstr "PostScript Genérico"
+
+#: ../src/common/paper.cpp:136
+msgid "German Legal Fanfold, 8 1/2 x 13 in"
+msgstr "Legal Fanfold Alemão, 8 1/2 x 13 pol."
+
+#: ../src/common/paper.cpp:135
+msgid "German Std Fanfold, 8 1/2 x 12 in"
+msgstr "Std Fanfold Alemão, 8 1/2 x 12 pol."
+
+#: ../include/wx/xtiprop.h:188
+msgid "GetProperty called w/o valid getter"
+msgstr "GetProperty chamado sem 'get' válido"
+
+#: ../include/wx/xtiprop.h:266
+msgid "GetPropertyCollection called on a generic accessor"
+msgstr "GetPropertyCollection chamado num acessor genérico"
+
+#: ../include/wx/xtiprop.h:206
+msgid "GetPropertyCollection called w/o valid collection getter"
+msgstr "GetPropertyCollection chamado sem colecção de getter válido"
+
+#: ../src/html/helpwnd.cpp:673
+msgid "Go back"
+msgstr "Ir para trás"
+
+#: ../src/html/helpwnd.cpp:674
+msgid "Go forward"
+msgstr "Ir para a frente"
+
+#: ../src/html/helpwnd.cpp:676
+msgid "Go one level up in document hierarchy"
+msgstr "Subir um nível na hierarquia do documento"
+
+#: ../src/generic/filedlgg.cpp:223 ../src/generic/dirdlgg.cpp:136
+msgid "Go to home directory"
+msgstr "ir para o directório inicial"
+
+#: ../src/generic/filedlgg.cpp:219
+msgid "Go to parent directory"
+msgstr "Ir para o directório superior"
+
+#: ../src/generic/aboutdlgg.cpp:76
+msgid "Graphics art by "
+msgstr "Arte gráfica por "
+
+#: ../src/common/fmapbase.cpp:154
+msgid "Greek (ISO-8859-7)"
+msgstr "Grêgo (ISO-8859-7)"
+
+#: ../src/richtext/richtextborderspage.cpp:547
+msgid "Groove"
+msgstr ""
+
+#: ../src/common/zstream.cpp:158 ../src/common/zstream.cpp:318
+msgid "Gzip not supported by this version of zlib"
+msgstr "Gzip não suportado nesta versão do zlib"
+
+#: ../src/common/accelcmn.cpp:75
+msgid "HELP"
+msgstr "AJUDA"
+
+#: ../src/common/accelcmn.cpp:60
+msgid "HOME"
+msgstr "HOME"
+
+#: ../src/html/helpwnd.cpp:1552
+msgid "HTML Help Project (*.hhp)|*.hhp|"
+msgstr "HTML projecto de ajuda (*.hhp)|*.hhp|"
+
+#: ../src/html/htmlwin.cpp:659
+#, c-format
+msgid "HTML anchor %s does not exist."
+msgstr "Âncora HTML %s não existe."
+
+#: ../src/html/helpwnd.cpp:1550
+msgid "HTML files (*.html;*.htm)|*.html;*.htm|"
+msgstr "Ficheiros HTML (*.html;*.htm)|*.html;*.htm|"
+
+#: ../src/common/stockitem.cpp:162
+msgid "Harddisk"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:155
+msgid "Hebrew (ISO-8859-8)"
+msgstr "Hebreu (ISO-8859-8)"
+
+#: ../include/wx/msgdlg.h:275 ../src/osx/button_osx.cpp:39
+#: ../src/common/stockitem.cpp:163 ../src/html/helpdlg.cpp:66
+#: ../src/html/helpfrm.cpp:116
+msgid "Help"
+msgstr "Ajuda"
+
+#: ../src/html/helpwnd.cpp:1213
+msgid "Help Browser Options"
+msgstr "Opções do Navegador de Ajuda"
+
+#: ../src/generic/helpext.cpp:458 ../src/generic/helpext.cpp:459
+msgid "Help Index"
+msgstr "Índice de Ajuda"
+
+#: ../src/html/helpwnd.cpp:1534
+msgid "Help Printing"
+msgstr "Ajuda de Impressão"
+
+#: ../src/html/helpwnd.cpp:814
+msgid "Help Topics"
+msgstr "Tópicos de Ajuda"
+
+#: ../src/html/helpwnd.cpp:1551
+msgid "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+msgstr "Livros de ajuda(*.htb)|*.htb|Livros de ajuda(*.zip)|*.zip|"
+
+#: ../src/generic/helpext.cpp:271
+#, c-format
+msgid "Help directory \"%s\" not found."
+msgstr "Directório de ajuda \"%s\" não encontrado."
+
+#: ../src/generic/helpext.cpp:279
+#, c-format
+msgid "Help file \"%s\" not found."
+msgstr "Ficheiro de ajuda \"%s\" não encontrado."
+
+#: ../src/html/helpctrl.cpp:63
+#, c-format
+msgid "Help: %s"
+msgstr "Ajuda: %s"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:649
+#, fuzzy, c-format
+msgid "Hide %s"
+msgstr "Ajuda: %s"
+
+#: ../src/osx/menu_osx.cpp:604 ../src/osx/menu_osx.cpp:651
+msgid "Hide Others"
+msgstr ""
+
+#: ../src/generic/infobar.cpp:85
+msgid "Hide this notification message."
+msgstr ""
+
+#: ../src/generic/dirdlgg.cpp:98 ../src/common/stockitem.cpp:164
+msgid "Home"
+msgstr "Pasta Pessoal"
+
+#: ../src/generic/dirctrlg.cpp:624
+msgid "Home directory"
+msgstr "Directório pessoal"
+
+#: ../src/richtext/richtextsizepage.cpp:253
+#: ../src/richtext/richtextsizepage.cpp:255
+msgid "How the object will float relative to the text."
+msgstr ""
+
+#: ../src/common/imagbmp.cpp:1118
+msgid "ICO: Error in reading mask DIB."
+msgstr "ICO: Erro a ler máscara DIB."
+
+#: ../src/common/imagbmp.cpp:1233 ../src/common/imagbmp.cpp:1294
+#: ../src/common/imagbmp.cpp:1305 ../src/common/imagbmp.cpp:1318
+#: ../src/common/imagbmp.cpp:1363 ../src/common/imagbmp.cpp:1375
+#: ../src/common/imagbmp.cpp:1386
+msgid "ICO: Error writing the image file!"
+msgstr "ICO: Erro a escrever ficheiro de imagem!"
+
+#: ../src/common/imagbmp.cpp:1198
+msgid "ICO: Image too tall for an icon."
+msgstr "ICO: Imagem alta demais para um ícone."
+
+#: ../src/common/imagbmp.cpp:1206
+msgid "ICO: Image too wide for an icon."
+msgstr "ICO: Imagem larga demais para um ícone."
+
+#: ../src/common/imagbmp.cpp:1466
+msgid "ICO: Invalid icon index."
+msgstr "ICO: Índice inválido de ícone."
+
+#: ../src/common/imagiff.cpp:759
+msgid "IFF: data stream seems to be truncated."
+msgstr "IFF: Corrente de dados parece estar truncada."
+
+#: ../src/common/imagiff.cpp:743
+msgid "IFF: error in IFF image format."
+msgstr "IFF: erro no formato de imagem IFF."
+
+#: ../src/common/imagiff.cpp:746
+msgid "IFF: not enough memory."
+msgstr "IFF: sem memória suficiente."
+
+#: ../src/common/imagiff.cpp:749
+msgid "IFF: unknown error!!!"
+msgstr "IFF: erro desconhecido!!!"
+
+#: ../src/common/accelcmn.cpp:50
+msgid "INS"
+msgstr "INS"
+
+#: ../src/common/accelcmn.cpp:51
+msgid "INSERT"
+msgstr "INSERIR"
+
+#: ../src/common/fmapbase.cpp:197
+msgid "ISO-2022-JP"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:2420
+msgid "Icon & text renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/html/htmprint.cpp:282
+msgid ""
+"If possible, try changing the layout parameters to make the printout more "
+"narrow."
+msgstr ""
+
+#: ../src/generic/dbgrptg.cpp:358
+msgid ""
+"If you have any additional information pertaining to this bug\n"
+"report, please enter it here and it will be joined to it:"
+msgstr ""
+"Se tiver alguma informação adicional relativa a este relatório de erro,\n"
+"por favor digite-a aqui e esta será adicionada a ele:"
+
+#: ../src/generic/dbgrptg.cpp:324
+msgid ""
+"If you wish to suppress this debug report completely, please choose the "
+"\"Cancel\" button,\n"
+"but be warned that it may hinder improving the program, so if\n"
+"at all possible please do continue with the report generation.\n"
+msgstr ""
+"Se desejar suprimir completamente este relatorio de erro, pressione o botão "
+"\"Cancelar\",\n"
+"mas pode limitar a evolução do programa, sempre que possível\n"
+"por favor continue com a geração do relatório .\n"
+
+#: ../src/msw/registry.cpp:1395
+#, c-format
+msgid "Ignoring value \"%s\" of the key \"%s\"."
+msgstr "A ignorar valor \"%s\" da chave \"%s\"."
+
+#: ../src/common/xtistrm.cpp:299
+msgid "Illegal Object Class (Non-wxEvtHandler) as Event Source"
+msgstr "Classe de objecto ilegal (Não-wxEvtHandler) como EventSource"
+
+#: ../src/common/xti.cpp:513
+msgid "Illegal Parameter Count for ConstructObject Method"
+msgstr "Parâmetro de Contador Ilegal para o Método ConstructObject"
+
+#: ../src/common/xti.cpp:501
+msgid "Illegal Parameter Count for Create Method"
+msgstr "Parâmetro de Contador Ilegal para o Método Create"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/filectrlg.cpp:791
+msgid "Illegal directory name."
+msgstr "Nome do directório ilegal."
+
+#: ../src/generic/filectrlg.cpp:1380
+msgid "Illegal file specification."
+msgstr "Especificação de ficheiro ilegal."
+
+#: ../src/common/image.cpp:2158
+msgid "Image and mask have different sizes."
+msgstr "A imagem e a máscara têm tamanhos diferentes."
+
+#: ../src/common/image.cpp:2609
+#, fuzzy, c-format
+msgid "Image file is not of type %d."
+msgstr "O ficheiro de imagem não é do tipo %ld."
+
+#: ../src/common/image.cpp:2739
+#, fuzzy, c-format
+msgid "Image is not of type %s."
+msgstr "O ficheiro de imagem não é do tipo %s."
+
+#: ../src/msw/textctrl.cpp:399
+msgid ""
+"Impossible to create a rich edit control, using simple text control instead. "
+"Please reinstall riched32.dll"
+msgstr ""
+"Impossível criar um controlo de edição rico, alternativamente usar-se-á um "
+"controlo de texto simples. Por favor reinstale o riched32.dll"
+
+#: ../src/unix/utilsunx.cpp:307
+msgid "Impossible to get child process input"
+msgstr "Não foi possível obter a entrada do processo filho"
+
+#: ../src/common/filefn.cpp:1074
+#, c-format
+msgid "Impossible to get permissions for file '%s'"
+msgstr "Não foi possível obter permissões do ficheiro '%s'"
+
+#: ../src/common/filefn.cpp:1088
+#, c-format
+msgid "Impossible to overwrite the file '%s'"
+msgstr "Não foi possível sobrepor o ficheiro '%s'"
+
+#: ../src/common/filefn.cpp:1142
+#, c-format
+msgid "Impossible to set permissions for the file '%s'"
+msgstr "Não foi possível definir as permissões do ficheiro '%s'"
+
+#: ../src/common/gifdecod.cpp:818
+#, c-format
+msgid "Incorrect GIF frame size (%u, %d) for the frame #%u"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:624
+msgid "Incorrect number of arguments."
+msgstr ""
+
+#: ../src/common/stockitem.cpp:165
+msgid "Indent"
+msgstr "Indentar"
+
+#: ../src/richtext/richtextformatdlg.cpp:330
+msgid "Indents && Spacing"
+msgstr "Indentações e Espaçamentos"
+
+#: ../src/common/stockitem.cpp:166 ../src/html/helpwnd.cpp:525
+msgid "Index"
+msgstr "Índice"
+
+#: ../src/common/fmapbase.cpp:159
+msgid "Indian (ISO-8859-12)"
+msgstr "Indiano (ISO-8859-12)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "Info"
+msgstr ""
+
+#: ../src/common/init.cpp:276
+msgid "Initialization failed in post init, aborting."
+msgstr "Falha de inicialização no post init, a interromper."
+
+#: ../src/richtext/richtextsymboldlg.cpp:472
+msgid "Insert"
+msgstr "Inserir"
+
+#: ../src/richtext/richtextbuffer.cpp:7687
+#, fuzzy
+msgid "Insert Field"
+msgstr "Inserir Texto"
+
+#: ../src/richtext/richtextbuffer.cpp:7598
+#: ../src/richtext/richtextbuffer.cpp:8551
+msgid "Insert Image"
+msgstr "Inserir Imagem"
+
+#: ../src/richtext/richtextbuffer.cpp:7645
+#, fuzzy
+msgid "Insert Object"
+msgstr "Inserir Texto"
+
+#: ../src/richtext/richtextctrl.cpp:1172 ../src/richtext/richtextctrl.cpp:1362
+#: ../src/richtext/richtextbuffer.cpp:7440
+#: ../src/richtext/richtextbuffer.cpp:7470
+#: ../src/richtext/richtextbuffer.cpp:7514
+msgid "Insert Text"
+msgstr "Inserir Texto"
+
+#: ../src/richtext/richtextindentspage.cpp:295
+#: ../src/richtext/richtextindentspage.cpp:297
+#, fuzzy
+msgid "Inserts a page break before the paragraph."
+msgstr "O espaçamento antes do parágrafo."
+
+#: ../src/richtext/richtextborderspage.cpp:549
+#, fuzzy
+msgid "Inset"
+msgstr "Inserir"
+
+#: ../src/gtk/app.cpp:429
+#, c-format
+msgid "Invalid GTK+ command line option, use \"%s --help\""
+msgstr ""
+
+#: ../src/common/imagtiff.cpp:314
+msgid "Invalid TIFF image index."
+msgstr "Índice inválido para imagem TIFF."
+
+#: ../src/osx/carbon/dataview.cpp:1782 ../src/osx/carbon/dataview.cpp:1877
+msgid "Invalid data view item"
+msgstr ""
+
+#: ../src/common/appcmn.cpp:266
+#, c-format
+msgid "Invalid display mode specification '%s'."
+msgstr "Especificação de modo de ecrã inválida '%s'."
+
+#: ../src/x11/app.cpp:121
+#, c-format
+msgid "Invalid geometry specification '%s'"
+msgstr "Especificação de geometria inválida '%s'"
+
+#: ../src/unix/fswatcher_inotify.cpp:298
+#, c-format
+msgid "Invalid inotify event for \"%s\""
+msgstr ""
+
+#: ../src/unix/snglinst.cpp:306
+#, c-format
+msgid "Invalid lock file '%s'."
+msgstr "Ficheiro de bloqueio inválido '%s'."
+
+#: ../src/common/translation.cpp:1111
+#, fuzzy
+msgid "Invalid message catalog."
+msgstr "'%s' não é uma mensagem válida do catálogo."
+
+#: ../src/common/xtistrm.cpp:409 ../src/common/xtistrm.cpp:424
+msgid "Invalid or Null Object ID passed to GetObjectClassInfo"
+msgstr "ID Nulo de Objecto ou inválido passado para GetObjectClassInfo"
+
+#: ../src/common/xtistrm.cpp:439
+msgid "Invalid or Null Object ID passed to HasObjectClassInfo"
+msgstr "ID Nulo de Objecto ou inválido passado para HasObjectClassInfo"
+
+#: ../src/common/regex.cpp:313
+#, c-format
+msgid "Invalid regular expression '%s': %s"
+msgstr "Expressão regular inválida '%s': %s"
+
+#: ../src/common/config.cpp:226
+#, c-format
+msgid "Invalid value %ld for a boolean key \"%s\" in config file."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:329 ../src/richtext/richtextfontpage.cpp:333
+#: ../src/osx/carbon/fontdlg.cpp:547 ../src/common/stockitem.cpp:168
+msgid "Italic"
+msgstr "Itálico"
+
+#: ../src/common/paper.cpp:131
+msgid "Italy Envelope, 110 x 230 mm"
+msgstr "Envelope Italiano, 110 x 230 mm"
+
+#: ../src/common/imagjpeg.cpp:255
+msgid "JPEG: Couldn't load - file is probably corrupted."
+msgstr "JPEG: Impossível ler - o ficheiro provavelmente está corrupto."
+
+#: ../src/common/imagjpeg.cpp:434
+msgid "JPEG: Couldn't save image."
+msgstr "JPEG: Impossível gravar imagem."
+
+#: ../src/common/paper.cpp:164
+msgid "Japanese Double Postcard 200 x 148 mm"
+msgstr "Postal Duplo Japonês 200 x 148 mm"
+
+#: ../src/common/paper.cpp:168
+msgid "Japanese Envelope Chou #3"
+msgstr "Envelope Japonês Chou #3"
+
+#: ../src/common/paper.cpp:181
+msgid "Japanese Envelope Chou #3 Rotated"
+msgstr "Envelope Japonês Chou #3 Rodado"
+
+#: ../src/common/paper.cpp:169
+msgid "Japanese Envelope Chou #4"
+msgstr "Envelope Japonês Chou #4"
+
+#: ../src/common/paper.cpp:182
+msgid "Japanese Envelope Chou #4 Rotated"
+msgstr "Envelope Japonês Chou #4 Rodado"
+
+#: ../src/common/paper.cpp:166
+msgid "Japanese Envelope Kaku #2"
+msgstr "Envelope Japonês Kaku #2"
+
+#: ../src/common/paper.cpp:179
+msgid "Japanese Envelope Kaku #2 Rotated"
+msgstr "Envelope Japonês Kaku #2 Rodado"
+
+#: ../src/common/paper.cpp:167
+msgid "Japanese Envelope Kaku #3"
+msgstr "Envelope Japonês Kaku #3"
+
+#: ../src/common/paper.cpp:180
+msgid "Japanese Envelope Kaku #3 Rotated"
+msgstr "Envelope Japonês Kaku #3 Rodado"
+
+#: ../src/common/paper.cpp:186
+msgid "Japanese Envelope You #4"
+msgstr "Envelope Japonês You #4"
+
+#: ../src/common/paper.cpp:187
+msgid "Japanese Envelope You #4 Rotated"
+msgstr "Envelope Japonês You #4 Rodado"
+
+#: ../src/common/paper.cpp:139
+msgid "Japanese Postcard 100 x 148 mm"
+msgstr "Postal Japonês 100 x 148 mm"
+
+#: ../src/common/paper.cpp:176
+msgid "Japanese Postcard Rotated 148 x 100 mm"
+msgstr "Postal Japonês Rodado 148 x 100 mm"
+
+#: ../src/common/stockitem.cpp:169
+msgid "Jump to"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:171
+msgid "Justified"
+msgstr "Justificado"
+
+#: ../src/richtext/richtextindentspage.cpp:155
+#: ../src/richtext/richtextindentspage.cpp:157
+#: ../src/richtext/richtextliststylepage.cpp:344
+#: ../src/richtext/richtextliststylepage.cpp:346
+msgid "Justify text left and right."
+msgstr "Justificar texto à esquerda e à direita."
+
+#: ../src/common/fmapbase.cpp:163
+msgid "KOI8-R"
+msgstr "KOI8-R"
+
+#: ../src/common/fmapbase.cpp:164
+msgid "KOI8-U"
+msgstr "KOI8-U"
+
+#: ../src/common/accelcmn.cpp:254 ../src/common/accelcmn.cpp:336
+msgid "KP_"
+msgstr "KP_"
+
+#: ../src/common/accelcmn.cpp:103
+msgid "KP_ADD"
+msgstr "KP_ADD"
+
+#: ../src/common/accelcmn.cpp:98
+msgid "KP_BEGIN"
+msgstr "KP_BEGIN"
+
+#: ../src/common/accelcmn.cpp:106
+msgid "KP_DECIMAL"
+msgstr "KP_DECIMAL"
+
+#: ../src/common/accelcmn.cpp:100
+msgid "KP_DELETE"
+msgstr "KP_DELETE"
+
+#: ../src/common/accelcmn.cpp:107
+msgid "KP_DIVIDE"
+msgstr "KP_DIVIDE"
+
+#: ../src/common/accelcmn.cpp:92
+msgid "KP_DOWN"
+msgstr "KP_DOWN"
+
+#: ../src/common/accelcmn.cpp:97
+msgid "KP_END"
+msgstr "KP_END"
+
+#: ../src/common/accelcmn.cpp:87
+msgid "KP_ENTER"
+msgstr "KP_ENTER"
+
+#: ../src/common/accelcmn.cpp:101
+msgid "KP_EQUAL"
+msgstr "KP_EQUAL"
+
+#: ../src/common/accelcmn.cpp:88
+msgid "KP_HOME"
+msgstr "KP_HOME"
+
+#: ../src/common/accelcmn.cpp:99
+msgid "KP_INSERT"
+msgstr "KP_INSERT"
+
+#: ../src/common/accelcmn.cpp:89
+msgid "KP_LEFT"
+msgstr "KP_LEFT"
+
+#: ../src/common/accelcmn.cpp:102
+msgid "KP_MULTIPLY"
+msgstr "KP_MULTIPLY"
+
+#: ../src/common/accelcmn.cpp:95
+msgid "KP_NEXT"
+msgstr "KP_NEXT"
+
+#: ../src/common/accelcmn.cpp:96
+msgid "KP_PAGEDOWN"
+msgstr "KP_PAGEDOWN"
+
+#: ../src/common/accelcmn.cpp:94
+msgid "KP_PAGEUP"
+msgstr "KP_PAGEUP"
+
+#: ../src/common/accelcmn.cpp:93
+msgid "KP_PRIOR"
+msgstr "KP_PRIOR"
+
+#: ../src/common/accelcmn.cpp:91
+msgid "KP_RIGHT"
+msgstr "KP_RIGHT"
+
+#: ../src/common/accelcmn.cpp:104
+msgid "KP_SEPARATOR"
+msgstr "KP_SEPARATOR"
+
+#: ../src/common/accelcmn.cpp:85
+msgid "KP_SPACE"
+msgstr "KP_SPACE"
+
+#: ../src/common/accelcmn.cpp:105
+msgid "KP_SUBTRACT"
+msgstr "KP_SUBTRACT"
+
+#: ../src/common/accelcmn.cpp:86
+msgid "KP_TAB"
+msgstr "KP_TAB"
+
+#: ../src/common/accelcmn.cpp:90
+msgid "KP_UP"
+msgstr "KP_UP"
+
+#: ../src/richtext/richtextindentspage.cpp:270
+#, fuzzy
+msgid "L&ine spacing:"
+msgstr "Espaçamento de linhas:"
+
+#: ../src/common/accelcmn.cpp:56
+msgid "LEFT"
+msgstr "ESQUERDA"
+
+#: ../src/generic/prntdlgg.cpp:613 ../src/generic/prntdlgg.cpp:868
+msgid "Landscape"
+msgstr "Paisagem"
+
+#: ../src/common/stockitem.cpp:174
+#, fuzzy
+msgid "Last"
+msgstr "Colar"
+
+#: ../src/common/prntbase.cpp:1542
+#, fuzzy
+msgid "Last page"
+msgstr "Página seguinte"
+
+#: ../src/common/log.cpp:309
+#, c-format
+msgid "Last repeated message (\"%s\", %lu time) wasn't output"
+msgid_plural "Last repeated message (\"%s\", %lu times) wasn't output"
+msgstr[0] ""
+msgstr[1] ""
+
+#: ../src/common/paper.cpp:104
+msgid "Ledger, 17 x 11 in"
+msgstr "Agenda, 17 x 11 pol."
+
+#: ../src/richtext/richtextliststylepage.cpp:249
+#: ../src/richtext/richtextliststylepage.cpp:252
+#: ../src/richtext/richtextliststylepage.cpp:253
+#: ../src/richtext/richtextbulletspage.cpp:199
+#: ../src/richtext/richtextbulletspage.cpp:202
+#: ../src/richtext/richtextbulletspage.cpp:203
+#: ../src/richtext/richtextsizepage.cpp:249
+msgid "Left"
+msgstr "Esquerda"
+
+#: ../src/richtext/richtextindentspage.cpp:204
+#: ../src/richtext/richtextliststylepage.cpp:390
+msgid "Left (&first line):"
+msgstr "Esquerda (&primeira linha):"
+
+#: ../src/generic/prntdlgg.cpp:880
+msgid "Left margin (mm):"
+msgstr "Margem esquerda (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:141
+#: ../src/richtext/richtextindentspage.cpp:143
+#: ../src/richtext/richtextliststylepage.cpp:330
+#: ../src/richtext/richtextliststylepage.cpp:332
+msgid "Left-align text."
+msgstr "Alinhar texto à esquerda."
+
+#: ../src/common/paper.cpp:145
+msgid "Legal Extra 9 1/2 x 15 in"
+msgstr "Legal Extra 9 1/2 x 15 pol."
+
+#: ../src/common/paper.cpp:97
+msgid "Legal, 8 1/2 x 14 in"
+msgstr "Legal, 8 1/2 x 14 pol."
+
+#: ../src/common/paper.cpp:144
+msgid "Letter Extra 9 1/2 x 12 in"
+msgstr "Letter Extra 9 1/2 x 12 pol."
+
+#: ../src/common/paper.cpp:150
+msgid "Letter Extra Transverse 9.275 x 12 in"
+msgstr "Letter Extra Transversal 9.275 x 12 pol."
+
+#: ../src/common/paper.cpp:153
+msgid "Letter Plus 8 1/2 x 12.69 in"
+msgstr "Letter Plus 8 1/2 x 12.69 pol."
+
+#: ../src/common/paper.cpp:170
+msgid "Letter Rotated 11 x 8 1/2 in"
+msgstr "Letter Rodada 11 x 8 1/2 pol."
+
+#: ../src/common/paper.cpp:102
+msgid "Letter Small, 8 1/2 x 11 in"
+msgstr "Letter Pequena, 8 1/2 x 11 pol."
+
+#: ../src/common/paper.cpp:148
+msgid "Letter Transverse 8 1/2 x 11 in"
+msgstr "Letter Transversal 8 1/2 x 11 pol."
+
+#: ../src/common/paper.cpp:96
+msgid "Letter, 8 1/2 x 11 in"
+msgstr "Letter, 8 1/2 x 11 pol."
+
+#: ../src/generic/aboutdlgg.cpp:173
+msgid "License"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:332
+msgid "Light"
+msgstr "Leve"
+
+#: ../src/generic/helpext.cpp:298
+#, c-format
+msgid "Line %lu of map file \"%s\" has invalid syntax, skipped."
+msgstr ""
+"A linha %lu do ficheiro de mapa \"%s\" contém uma sintaxe inválida, saltado."
+
+#: ../src/richtext/richtextliststylepage.cpp:444
+msgid "Line spacing:"
+msgstr "Espaçamento de linhas:"
+
+#: ../src/html/chm.cpp:838
+msgid "Link contained '//', converted to absolute link."
+msgstr "O link contém '//', foi convertido para um link absoluto."
+
+#: ../src/richtext/richtextformatdlg.cpp:349
+msgid "List Style"
+msgstr "Estilo da Lista"
+
+#: ../src/richtext/richtextstyles.cpp:1060
+msgid "List styles"
+msgstr "Estilos da lista"
+
+#: ../src/richtext/richtextfontpage.cpp:206
+#: ../src/richtext/richtextfontpage.cpp:208
+msgid "Lists font sizes in points."
+msgstr "Lista o tamanho das fontes em pontos."
+
+#: ../src/richtext/richtextfontpage.cpp:199
+#: ../src/richtext/richtextfontpage.cpp:201
+msgid "Lists the available fonts."
+msgstr "Lista as fontes disponíveis."
+
+#: ../src/common/fldlgcmn.cpp:325
+#, c-format
+msgid "Load %s file"
+msgstr "Abrir %s ficheiros"
+
+#: ../src/html/htmlwin.cpp:575
+msgid "Loading : "
+msgstr "A Abrir : "
+
+#: ../src/unix/snglinst.cpp:246
+#, c-format
+msgid "Lock file '%s' has incorrect owner."
+msgstr "Ficheiro de bloqueio '%s' tem proprietário incorrecto."
+
+#: ../src/unix/snglinst.cpp:251
+#, c-format
+msgid "Lock file '%s' has incorrect permissions."
+msgstr "Ficheiro de bloqueio '%s' tem permissões incorrectas."
+
+#: ../src/generic/logg.cpp:582
+#, c-format
+msgid "Log saved to the file '%s'."
+msgstr "Registo gravado no ficheiro '%s'."
+
+#: ../src/richtext/richtextliststylepage.cpp:484
+#: ../src/richtext/richtextbulletspage.cpp:289
+msgid "Lower case letters"
+msgstr "Letras minúsculas"
+
+#: ../src/richtext/richtextliststylepage.cpp:486
+#: ../src/richtext/richtextbulletspage.cpp:291
+msgid "Lower case roman numerals"
+msgstr "Números romanos em minúsculas"
+
+#: ../src/gtk/mdi.cpp:422 ../src/gtk1/mdi.cpp:431
+msgid "MDI child"
+msgstr "Fillho MDI"
+
+#: ../src/common/accelcmn.cpp:68
+msgid "MENU"
+msgstr "MENU"
+
+#: ../src/msw/helpchm.cpp:56
+msgid ""
+"MS HTML Help functions are unavailable because the MS HTML Help library is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Funções de ajuda MS HTML não estão disponíveis devido à livraria de ajuda MS "
+"HTML não estar instalada neste computador. por favor instale-a."
+
+#: ../src/univ/themes/win32.cpp:3754
+msgid "Ma&ximize"
+msgstr "Ma&ximizar"
+
+#: ../src/common/fmapbase.cpp:203
+#, fuzzy
+msgid "MacArabic"
+msgstr "Árabe"
+
+#: ../src/common/fmapbase.cpp:222
+msgid "MacArmenian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:211
+msgid "MacBengali"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:217
+msgid "MacBurmese"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:236
+msgid "MacCeltic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:227
+msgid "MacCentralEurRoman"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:223
+msgid "MacChineseSimp"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:201
+msgid "MacChineseTrad"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:233
+msgid "MacCroatian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:206
+msgid "MacCyrillic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:207
+msgid "MacDevanagari"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:231
+msgid "MacDingbats"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:226
+msgid "MacEthiopic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:229
+#, fuzzy
+msgid "MacExtArabic"
+msgstr "Árabe"
+
+#: ../src/common/fmapbase.cpp:237
+msgid "MacGaelic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:221
+msgid "MacGeorgian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:205
+msgid "MacGreek"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:209
+msgid "MacGujarati"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:208
+msgid "MacGurmukhi"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:204
+msgid "MacHebrew"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:234
+msgid "MacIcelandic"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:200
+msgid "MacJapanese"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:214
+msgid "MacKannada"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:238
+msgid "MacKeyboardGlyphs"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:218
+msgid "MacKhmer"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:202
+msgid "MacKorean"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:220
+msgid "MacLaotian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:215
+msgid "MacMalayalam"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:225
+msgid "MacMongolian"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:210
+msgid "MacOriya"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:199
+#, fuzzy
+msgid "MacRoman"
+msgstr "Roman"
+
+#: ../src/common/fmapbase.cpp:235
+#, fuzzy
+msgid "MacRomanian"
+msgstr "Roman"
+
+#: ../src/common/fmapbase.cpp:216
+#, fuzzy
+msgid "MacSinhalese"
+msgstr "Coincidir capitulação"
+
+#: ../src/common/fmapbase.cpp:230
+#, fuzzy
+msgid "MacSymbol"
+msgstr "Symbol"
+
+#: ../src/common/fmapbase.cpp:212
+msgid "MacTamil"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:213
+msgid "MacTelugu"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:219
+msgid "MacThai"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:224
+msgid "MacTibetan"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:232
+msgid "MacTurkish"
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:228
+msgid "MacVietnamese"
+msgstr ""
+
+#: ../src/propgrid/advprops.cpp:2031
+#, fuzzy
+msgid "Make a selection:"
+msgstr "Colar selecção"
+
+#: ../src/richtext/richtextformatdlg.cpp:362
+#: ../src/richtext/richtextmarginspage.cpp:172
+msgid "Margins"
+msgstr ""
+
+#: ../src/generic/fdrepdlg.cpp:147
+msgid "Match case"
+msgstr "Coincidir capitulação"
+
+#: ../src/richtext/richtextsizepage.cpp:463
+#, fuzzy
+msgid "Max height:"
+msgstr "&Peso:"
+
+#: ../src/richtext/richtextsizepage.cpp:436
+#, fuzzy
+msgid "Max width:"
+msgstr "Substituir por:"
+
+#: ../src/unix/mediactrl.cpp:1006
+#, c-format
+msgid "Media playback error: %s"
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:175
+#, c-format
+msgid "Memory VFS already contains file '%s'!"
+msgstr "A memória VFS já contém o ficheiro '%s'!"
+
+#: ../src/msw/frame.cpp:347
+msgid "Menu"
+msgstr "Menu"
+
+#: ../src/common/msgout.cpp:124
+#, fuzzy
+msgid "Message"
+msgstr "%s mensagem"
+
+#: ../src/univ/themes/metal.cpp:168
+msgid "Metal theme"
+msgstr "Tema Metal"
+
+#: ../src/msw/ole/automtn.cpp:641
+msgid "Method or property not found."
+msgstr ""
+
+#: ../src/univ/themes/win32.cpp:3752
+msgid "Mi&nimize"
+msgstr "Mi&nimizar"
+
+#: ../src/richtext/richtextsizepage.cpp:409
+#, fuzzy
+msgid "Min height:"
+msgstr "&Peso da fonte:"
+
+#: ../src/richtext/richtextsizepage.cpp:382
+msgid "Min width:"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:657
+msgid "Missing a required parameter."
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:324
+msgid "Modern"
+msgstr "Moderno"
+
+#: ../src/generic/filectrlg.cpp:462
+msgid "Modified"
+msgstr "Modificado"
+
+#: ../src/common/module.cpp:133
+#, c-format
+msgid "Module \"%s\" initialization failed"
+msgstr "Falha de inicialização do Módulo \"%s\""
+
+#: ../src/common/paper.cpp:132
+msgid "Monarch Envelope, 3 7/8 x 7 1/2 in"
+msgstr "Envelope Monarch, 3 7/8 x 7 1/2 pol."
+
+#: ../src/msw/fswatcher.cpp:143
+msgid "Monitoring individual files for changes is not supported currently."
+msgstr ""
+
+#: ../src/generic/editlbox.cpp:276
+msgid "Move down"
+msgstr "Mover para baixo"
+
+#: ../src/generic/editlbox.cpp:275
+msgid "Move up"
+msgstr "Mover para cima"
+
+#: ../src/richtext/richtextsizepage.cpp:682
+#: ../src/richtext/richtextsizepage.cpp:684
+#, fuzzy
+msgid "Moves the object to the next paragraph."
+msgstr "O estilo pré-definido para o próximo parágrafo."
+
+#: ../src/richtext/richtextsizepage.cpp:676
+#: ../src/richtext/richtextsizepage.cpp:678
+#, fuzzy
+msgid "Moves the object to the previous paragraph."
+msgstr "Voltar para página HTML anterior"
+
+#: ../src/richtext/richtextbuffer.cpp:9345
+msgid "Multiple Cell Properties"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:81
+msgid "NUM_LOCK"
+msgstr "NUM_LOCK"
+
+#: ../src/generic/filectrlg.cpp:459
+msgid "Name"
+msgstr "Nome"
+
+#: ../src/common/stockitem.cpp:175
+msgid "Network"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:176
+#, fuzzy
+msgid "New"
+msgstr "&Novo"
+
+#: ../src/richtext/richtextstyledlg.cpp:243
+#, fuzzy
+msgid "New &Box Style..."
+msgstr "Novo &Estilo de Lista..."
+
+#: ../src/richtext/richtextstyledlg.cpp:225
+msgid "New &Character Style..."
+msgstr "Novo Estilo de &Caracter..."
+
+#: ../src/richtext/richtextstyledlg.cpp:237
+msgid "New &List Style..."
+msgstr "Novo &Estilo de Lista..."
+
+#: ../src/richtext/richtextstyledlg.cpp:231
+msgid "New &Paragraph Style..."
+msgstr "Novo Estilo de &Parágrafo..."
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:651
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:817
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:890
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:931
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "New Style"
+msgstr "Novo Estilo"
+
+#: ../src/generic/dirdlgg.cpp:102
+msgid "New directory"
+msgstr "Novo directório"
+
+#: ../src/generic/editlbox.cpp:273
+msgid "New item"
+msgstr "Novo item"
+
+#: ../src/generic/dirdlgg.cpp:326 ../src/generic/dirdlgg.cpp:336
+#: ../src/generic/filectrlg.cpp:653 ../src/generic/filectrlg.cpp:662
+msgid "NewName"
+msgstr "NovoNome"
+
+#: ../src/generic/tipdlg.cpp:305
+msgid "Next"
+msgstr "Seguinte"
+
+#: ../src/common/prntbase.cpp:1537 ../src/html/helpwnd.cpp:678
+msgid "Next page"
+msgstr "Página seguinte"
+
+#: ../include/wx/msgdlg.h:272 ../src/common/stockitem.cpp:177
+#: ../src/motif/msgdlg.cpp:196
+msgid "No"
+msgstr "Não"
+
+#: ../src/generic/animateg.cpp:150
+#, c-format
+msgid "No animation handler for type %ld defined."
+msgstr "Não existe um manuseador de animação definida para o tipo %ld."
+
+#: ../src/dfb/bitmap.cpp:642 ../src/dfb/bitmap.cpp:676
+#, fuzzy, c-format
+msgid "No bitmap handler for type %d defined."
+msgstr "Não existe um manuseador para o tipo %d definido."
+
+#: ../src/osx/carbon/dataview.cpp:1784
+msgid "No column existing."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1674
+msgid "No column for the specified column existing."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1423
+msgid "No column for the specified column position existing."
+msgstr ""
+
+#: ../src/common/utilscmn.cpp:1049
+msgid "No default application configured for HTML files."
+msgstr ""
+
+#: ../src/generic/helpext.cpp:449
+msgid "No entries found."
+msgstr "Não foram encontradas entradas."
+
+#: ../src/common/fontmap.cpp:421
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found,\n"
+"but an alternative encoding '%s' is available.\n"
+"Do you want to use this encoding (otherwise you will have to choose another "
+"one)?"
+msgstr ""
+"Não foi encontrada uma fonte para mostrar texto na codificação '%s',\n"
+"mas uma codificação alternativa '%s' está disponível.\n"
+"Pretende utilizar esta codificação (caso contrário terá de escolher outra)?"
+
+#: ../src/common/fontmap.cpp:426
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found.\n"
+"Would you like to select a font to be used for this encoding\n"
+"(otherwise the text in this encoding will not be shown correctly)?"
+msgstr ""
+"Não foi encontrada uma fonte para mostrar texto na codificação '%s',\n"
+"Deseja seleccionar uma fonte para ser usada nesta codificação\n"
+"(caso contrário o texto nesta codificação não será correctamente "
+"apresentado)?"
+
+#: ../src/generic/animateg.cpp:142
+msgid "No handler found for animation type."
+msgstr "Não foi encontrado um manuseador para o tipo de animação."
+
+#: ../src/common/image.cpp:2591
+msgid "No handler found for image type."
+msgstr "Não foi encontrado um manuseador para o tipo de imagem."
+
+#: ../src/common/image.cpp:2599 ../src/common/image.cpp:2710
+#: ../src/common/image.cpp:2763
+#, c-format
+msgid "No image handler for type %d defined."
+msgstr "Não existe um manuseador para o tipo %d definido."
+
+#: ../src/common/image.cpp:2733 ../src/common/image.cpp:2777
+#, c-format
+msgid "No image handler for type %s defined."
+msgstr "Não existe um manuseador de imagem para o tipo %s definido."
+
+#: ../src/html/helpwnd.cpp:871
+msgid "No matching page found yet"
+msgstr "Não foi encontrado até ao momento uma página coincidente"
+
+#: ../src/osx/carbon/dataview.cpp:1676 ../src/osx/carbon/dataview.cpp:1786
+msgid "No renderer or invalid renderer type specified for custom data column."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1424
+msgid "No renderer specified for column."
+msgstr ""
+
+#: ../src/unix/sound.cpp:81
+msgid "No sound"
+msgstr "Sem som"
+
+#: ../src/common/image.cpp:2166 ../src/common/image.cpp:2207
+msgid "No unused colour in image being masked."
+msgstr "Sem cor usada na imagem a ser mascarada."
+
+#: ../src/common/image.cpp:3236
+msgid "No unused colour in image."
+msgstr "Sem cor usada na imagem."
+
+#: ../src/generic/helpext.cpp:306
+#, c-format
+msgid "No valid mappings found in the file \"%s\"."
+msgstr "Não foram encontrados mapeamentos válidos no ficheiro \"%s\"."
+
+#: ../src/richtext/richtextborderspage.cpp:542
+#: ../src/richtext/richtextsizepage.cpp:248
+#: ../src/richtext/richtextsizepage.cpp:252
+#, fuzzy
+msgid "None"
+msgstr "(Nenhum)"
+
+#: ../src/common/fmapbase.cpp:157
+msgid "Nordic (ISO-8859-10)"
+msgstr "Nórdico (ISO-8859-10)"
+
+#: ../src/generic/fontdlgg.cpp:328 ../src/generic/fontdlgg.cpp:331
+msgid "Normal"
+msgstr "Normal"
+
+#: ../src/html/helpwnd.cpp:1276
+msgid "Normal face<br>and <u>underlined</u>. "
+msgstr "Face normal <br>e <u>sublinhado</u>. "
+
+#: ../src/html/helpwnd.cpp:1218
+msgid "Normal font:"
+msgstr "Fonte normal:"
+
+#: ../src/propgrid/props.cpp:887
+#, fuzzy, c-format
+msgid "Not %s"
+msgstr "Sobre "
+
+#: ../include/wx/filename.h:586 ../include/wx/filename.h:591
+#, fuzzy
+msgid "Not available"
+msgstr "Nenhuma funcionalidade XBM disponível!"
+
+#: ../src/richtext/richtextfontpage.cpp:340
+msgid "Not underlined"
+msgstr "Não sublinhado"
+
+#: ../src/common/paper.cpp:116
+msgid "Note, 8 1/2 x 11 in"
+msgstr "Nota, 8 1/2 x 11 pol."
+
+#: ../src/generic/notifmsgg.cpp:104
+#, fuzzy
+msgid "Notice"
+msgstr "&Notas:"
+
+#: ../src/osx/carbon/dataview.cpp:902
+#, fuzzy
+msgid "Number of columns could not be determined."
+msgstr "Não foi possível carregar o ficheiro."
+
+#: ../src/richtext/richtextliststylepage.cpp:487
+#: ../src/richtext/richtextbulletspage.cpp:292
+msgid "Numbered outline"
+msgstr "Contorno numerado"
+
+#: ../include/wx/msgdlg.h:273 ../src/richtext/richtextstyledlg.cpp:297
+#: ../src/common/stockitem.cpp:178 ../src/msw/msgdlg.cpp:489
+#: ../src/msw/msgdlg.cpp:799 ../src/msw/dialog.cpp:120
+#: ../src/gtk1/fontdlg.cpp:138
+msgid "OK"
+msgstr "OK"
+
+#: ../src/msw/ole/automtn.cpp:681
+#, c-format
+msgid "OLE Automation error in %s: %s"
+msgstr ""
+
+#: ../include/wx/richtext/richtextimagedlg.h:39
+#, fuzzy
+msgid "Object Properties"
+msgstr "&Propriedades"
+
+#: ../src/msw/ole/automtn.cpp:649
+msgid "Object implementation does not support named arguments."
+msgstr ""
+
+#: ../src/common/xtixml.cpp:264
+msgid "Objects must have an id attribute"
+msgstr "Os Objectos devem ter um atributo id"
+
+#: ../src/common/docview.cpp:1755 ../src/common/docview.cpp:1797
+msgid "Open File"
+msgstr "Abrir Ficheiro"
+
+#: ../src/html/helpwnd.cpp:684 ../src/html/helpwnd.cpp:1557
+msgid "Open HTML document"
+msgstr "Abrir documento HTML"
+
+#: ../src/generic/dbgrptg.cpp:163
+#, c-format
+msgid "Open file \"%s\""
+msgstr "Abrir ficheiro \"%s\""
+
+#: ../src/common/stockitem.cpp:179
+#, fuzzy
+msgid "Open..."
+msgstr "&Abrir..."
+
+#: ../src/osx/carbon/glcanvas.cpp:48
+#, c-format
+msgid "OpenGL function \"%s\" failed: %s (error %d)"
+msgstr ""
+
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:821
+msgid "Operation not permitted."
+msgstr "Operação não permitida."
+
+#: ../src/common/cmdline.cpp:735
+#, fuzzy, c-format
+msgid "Option '%s' can't be negated"
+msgstr "Não foi possível criar o directório '%s'"
+
+#: ../src/common/cmdline.cpp:899
+#, c-format
+msgid "Option '%s' requires a value."
+msgstr "A opção '%s' requer um valor."
+
+#: ../src/common/cmdline.cpp:982
+#, c-format
+msgid "Option '%s': '%s' cannot be converted to a date."
+msgstr "A opção '%s': '%s' não pode ser convertida para uma data."
+
+#: ../src/generic/dirdlgg.cpp:187 ../src/generic/prntdlgg.cpp:618
+msgid "Options"
+msgstr "Opções"
+
+#: ../src/generic/prntdlgg.cpp:615 ../src/generic/prntdlgg.cpp:869
+msgid "Orientation"
+msgstr "Orientação"
+
+#: ../src/common/windowid.cpp:259
+msgid "Out of window IDs.  Recommend shutting down application."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:400
+#: ../src/richtext/richtextborderspage.cpp:533
+#, fuzzy
+msgid "Outline"
+msgstr "&Lista de nível:"
+
+#: ../src/richtext/richtextborderspage.cpp:550
+msgid "Outset"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:645
+msgid "Overflow while coercing argument values."
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:84
+msgid "PAGEDOWN"
+msgstr "PAGEDOWN"
+
+#: ../src/common/accelcmn.cpp:83
+msgid "PAGEUP"
+msgstr "PAGEUP"
+
+#: ../src/common/accelcmn.cpp:69
+msgid "PAUSE"
+msgstr "PAUSE"
+
+#: ../src/common/imagpcx.cpp:457 ../src/common/imagpcx.cpp:480
+msgid "PCX: couldn't allocate memory"
+msgstr "PCX: não é possível alocar memória"
+
+#: ../src/common/imagpcx.cpp:456
+msgid "PCX: image format unsupported"
+msgstr "PCX: formato de imagem não suportado"
+
+#: ../src/common/imagpcx.cpp:479
+msgid "PCX: invalid image"
+msgstr "PCX: imagem inválida"
+
+#: ../src/common/imagpcx.cpp:442
+msgid "PCX: this is not a PCX file."
+msgstr "PCX: este não é um ficheiro PCX."
+
+#: ../src/common/imagpcx.cpp:459 ../src/common/imagpcx.cpp:481
+msgid "PCX: unknown error !!!"
+msgstr "PCX: erro desconhecido!!!"
+
+#: ../src/common/imagpcx.cpp:458
+msgid "PCX: version number too low"
+msgstr "PCX: número de versão muito baixo"
+
+#: ../src/common/accelcmn.cpp:55
+msgid "PGDN"
+msgstr "PGDN"
+
+#: ../src/common/accelcmn.cpp:54
+msgid "PGUP"
+msgstr "PGUP"
+
+#: ../src/common/imagpnm.cpp:91
+msgid "PNM: Couldn't allocate memory."
+msgstr "PNM: Não é possível alocar memória."
+
+#: ../src/common/imagpnm.cpp:73
+msgid "PNM: File format is not recognized."
+msgstr "PNM: Formato do ficheiro não é reconhecido."
+
+#: ../src/common/imagpnm.cpp:112 ../src/common/imagpnm.cpp:134
+#: ../src/common/imagpnm.cpp:156
+msgid "PNM: File seems truncated."
+msgstr "PNM: O ficheiro parece estar truncado."
+
+#: ../src/common/paper.cpp:188
+msgid "PRC 16K 146 x 215 mm"
+msgstr "PRC 16K 146 x 215 mm"
+
+#: ../src/common/paper.cpp:201
+msgid "PRC 16K Rotated"
+msgstr "PRC 16K Rodado"
+
+#: ../src/common/paper.cpp:189
+msgid "PRC 32K 97 x 151 mm"
+msgstr "PRC 32K 97 x 151 mm"
+
+#: ../src/common/paper.cpp:202
+msgid "PRC 32K Rotated"
+msgstr "PRC 32K Rodado"
+
+#: ../src/common/paper.cpp:190
+msgid "PRC 32K(Big) 97 x 151 mm"
+msgstr "PRC 32K(Grande) 97 x 151 mm"
+
+#: ../src/common/paper.cpp:203
+msgid "PRC 32K(Big) Rotated"
+msgstr "PRC 32K(Grande) Rodado"
+
+#: ../src/common/paper.cpp:191
+msgid "PRC Envelope #1 102 x 165 mm"
+msgstr "Envelope PRC #1 102 x 165 mm"
+
+#: ../src/common/paper.cpp:204
+msgid "PRC Envelope #1 Rotated 165 x 102 mm"
+msgstr "Envelope PRC #1 Rodado 165 x 102 mm"
+
+#: ../src/common/paper.cpp:200
+msgid "PRC Envelope #10 324 x 458 mm"
+msgstr "Envelope PRC #10 324 x 458 mm"
+
+#: ../src/common/paper.cpp:213
+msgid "PRC Envelope #10 Rotated 458 x 324 mm"
+msgstr "Envelope PRC #10 Rodado 458 x 324 mm"
+
+#: ../src/common/paper.cpp:192
+msgid "PRC Envelope #2 102 x 176 mm"
+msgstr "Envelope PRC #2 102 x 176 mm"
+
+#: ../src/common/paper.cpp:205
+msgid "PRC Envelope #2 Rotated 176 x 102 mm"
+msgstr "Envelope PRC #2 Rodado 176 x 102 mm"
+
+#: ../src/common/paper.cpp:193
+msgid "PRC Envelope #3 125 x 176 mm"
+msgstr "Envelope PRC #3 125 x 176 mm"
+
+#: ../src/common/paper.cpp:206
+msgid "PRC Envelope #3 Rotated 176 x 125 mm"
+msgstr "Envelope PRC #3 Rodado 176 x 125 mm"
+
+#: ../src/common/paper.cpp:194
+msgid "PRC Envelope #4 110 x 208 mm"
+msgstr "Envelope PRC #4 110 x 208 mm"
+
+#: ../src/common/paper.cpp:207
+msgid "PRC Envelope #4 Rotated 208 x 110 mm"
+msgstr "Envelope PRC #4 Rodado 208 x 110 mm"
+
+#: ../src/common/paper.cpp:195
+msgid "PRC Envelope #5 110 x 220 mm"
+msgstr "Envelope PRC #5 110 x 220 mm"
+
+#: ../src/common/paper.cpp:208
+msgid "PRC Envelope #5 Rotated 220 x 110 mm"
+msgstr "Envelope PRC #5 Rodado 220 x 110 mm"
+
+#: ../src/common/paper.cpp:196
+msgid "PRC Envelope #6 120 x 230 mm"
+msgstr "Envelope PRC #6 120 x 230 mm"
+
+#: ../src/common/paper.cpp:209
+msgid "PRC Envelope #6 Rotated 230 x 120 mm"
+msgstr "Envelope PRC #6 Rodado 230 x 120 mm"
+
+#: ../src/common/paper.cpp:197
+msgid "PRC Envelope #7 160 x 230 mm"
+msgstr "Envelope PRC #7 160 x 230 mm"
+
+#: ../src/common/paper.cpp:210
+msgid "PRC Envelope #7 Rotated 230 x 160 mm"
+msgstr "Envelope PRC #7 Rodado 230 x 160 mm"
+
+#: ../src/common/paper.cpp:198
+msgid "PRC Envelope #8 120 x 309 mm"
+msgstr "Envelope PRC #8 120 x 309 mm"
+
+#: ../src/common/paper.cpp:211
+msgid "PRC Envelope #8 Rotated 309 x 120 mm"
+msgstr "Envelope PRC #8 Rodado 309 x 120 mm"
+
+#: ../src/common/paper.cpp:199
+msgid "PRC Envelope #9 229 x 324 mm"
+msgstr "Envelope PRC #9 229 x 324 mm"
+
+#: ../src/common/paper.cpp:212
+msgid "PRC Envelope #9 Rotated 324 x 229 mm"
+msgstr "Envelope PRC #9 Rodado 324 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:72
+msgid "PRINT"
+msgstr "IMPRIMIR"
+
+#: ../src/richtext/richtextmarginspage.cpp:286
+#, fuzzy
+msgid "Padding"
+msgstr "a ler"
+
+#: ../src/common/prntbase.cpp:2044
+#, c-format
+msgid "Page %d"
+msgstr "Página %d"
+
+#: ../src/common/prntbase.cpp:2042
+#, c-format
+msgid "Page %d of %d"
+msgstr "Página %d de %d"
+
+#: ../src/gtk/print.cpp:774
+msgid "Page Setup"
+msgstr "Configuração de Página"
+
+#: ../src/generic/prntdlgg.cpp:828 ../src/common/prntbase.cpp:467
+msgid "Page setup"
+msgstr "Configuração de página"
+
+#: ../src/generic/prntdlgg.cpp:216
+msgid "Pages"
+msgstr "Páginas"
+
+#: ../src/generic/prntdlgg.cpp:602 ../src/generic/prntdlgg.cpp:801
+#: ../src/generic/prntdlgg.cpp:842 ../src/generic/prntdlgg.cpp:855
+#: ../src/generic/prntdlgg.cpp:1052 ../src/generic/prntdlgg.cpp:1057
+msgid "Paper size"
+msgstr "Tamanho do papel"
+
+#: ../src/richtext/richtextstyles.cpp:1058
+msgid "Paragraph styles"
+msgstr "Estilos de parágrafo"
+
+#: ../src/common/xtistrm.cpp:469
+msgid "Passing a already registered object to SetObject"
+msgstr "A passar um objecto já registado para SetObject"
+
+#: ../src/common/xtistrm.cpp:480
+#, fuzzy
+msgid "Passing an unknown object to GetObject"
+msgstr "A passar um objecto desconhecido para GetObject"
+
+#: ../src/richtext/richtextctrl.cpp:3117 ../src/common/stockitem.cpp:180
+#: ../src/stc/stc_i18n.cpp:19
+msgid "Paste"
+msgstr "Colar"
+
+#: ../src/common/stockitem.cpp:262
+msgid "Paste selection"
+msgstr "Colar selecção"
+
+#: ../src/richtext/richtextliststylepage.cpp:222
+#: ../src/richtext/richtextbulletspage.cpp:172
+msgid "Peri&od"
+msgstr "Perí&odo"
+
+#: ../src/generic/filectrlg.cpp:465
+msgid "Permissions"
+msgstr "Permissões"
+
+#: ../src/richtext/richtextbuffer.cpp:11942
+#, fuzzy
+msgid "Picture Properties"
+msgstr "&Propriedades"
+
+#: ../include/wx/unix/pipe.h:47
+msgid "Pipe creation failed"
+msgstr "Falha na criação do pipe"
+
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Please choose a valid font."
+msgstr "Por favor escolha uma fonte válida."
+
+#: ../src/gtk/filedlg.cpp:72
+msgid "Please choose an existing file."
+msgstr "Por favor escolha um ficheiro existente."
+
+#: ../src/html/helpwnd.cpp:813
+msgid "Please choose the page to display:"
+msgstr "Por favor escolha uma página para mostrar:"
+
+#: ../src/msw/dialup.cpp:785
+msgid "Please choose which ISP do you want to connect to"
+msgstr "Por favor escolha ISP a que pretende ligar"
+
+#: ../src/msw/listctrl.cpp:372
+#, c-format
+msgid ""
+"Please install a newer version of comctl32.dll\n"
+"(at least version 4.70 is required but you have %d.%02d)\n"
+"or this program won't operate correctly."
+msgstr ""
+"Por favor instale uma versão mais recente do comctl32.dll\n"
+"(no mínimo a versão 4.70 é necessária, mas actualmente tem a %d.%02d)\n"
+"ou este programa não operará correctamente."
+
+#: ../src/common/headerctrlcmn.cpp:59
+msgid "Please select the columns to show and define their order:"
+msgstr ""
+
+#: ../src/common/prntbase.cpp:521
+#, fuzzy
+msgid "Please wait while printing..."
+msgstr "Por favor aguarde enquanto imprime\n"
+
+#: ../src/propgrid/advprops.cpp:631
+#, fuzzy
+msgid "Point Size"
+msgstr "Tamanho do &ponto:"
+
+#: ../src/osx/carbon/dataview.cpp:1278 ../src/osx/carbon/dataview.cpp:1329
+#: ../src/osx/carbon/dataview.cpp:1420 ../src/osx/carbon/dataview.cpp:1443
+#: ../src/osx/carbon/dataview.cpp:1460 ../src/osx/carbon/dataview.cpp:1477
+#: ../src/osx/carbon/dataview.cpp:1670 ../src/osx/carbon/dataview.cpp:1779
+#: ../src/osx/carbon/dataview.cpp:1821 ../src/osx/carbon/dataview.cpp:1874
+#: ../src/osx/carbon/dataview.cpp:1997
+msgid "Pointer to data view control not set correctly."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1279 ../src/osx/carbon/dataview.cpp:1338
+#: ../src/osx/carbon/dataview.cpp:1421 ../src/osx/carbon/dataview.cpp:1478
+#: ../src/osx/carbon/dataview.cpp:1671 ../src/osx/carbon/dataview.cpp:1780
+#: ../src/osx/carbon/dataview.cpp:1822 ../src/osx/carbon/dataview.cpp:1875
+#: ../src/osx/carbon/dataview.cpp:1998
+msgid "Pointer to model not set correctly."
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:612 ../src/generic/prntdlgg.cpp:867
+msgid "Portrait"
+msgstr "Retrato"
+
+#: ../src/richtext/richtextsizepage.cpp:496
+#, fuzzy
+msgid "Position"
+msgstr "Pergunta"
+
+#: ../src/generic/prntdlgg.cpp:298
+msgid "PostScript file"
+msgstr "Ficheiro PostScript"
+
+#: ../src/common/stockitem.cpp:181
+#, fuzzy
+msgid "Preferences"
+msgstr "&Preferências"
+
+#: ../src/osx/menu_osx.cpp:643
+#, fuzzy
+msgid "Preferences..."
+msgstr "&Preferências"
+
+#: ../src/common/prntbase.cpp:529
+msgid "Preparing"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:455 ../src/osx/carbon/fontdlg.cpp:576
+#: ../src/html/helpwnd.cpp:1235
+msgid "Preview:"
+msgstr "Antevisão:"
+
+#: ../src/common/prntbase.cpp:1523 ../src/html/helpwnd.cpp:677
+msgid "Previous page"
+msgstr "Página anterior"
+
+#: ../src/generic/prntdlgg.cpp:143 ../src/generic/prntdlgg.cpp:157
+#: ../src/common/prntbase.cpp:409 ../src/common/prntbase.cpp:1511
+#: ../src/gtk/print.cpp:584 ../src/gtk/print.cpp:597
+msgid "Print"
+msgstr "Imprimir"
+
+#: ../include/wx/prntbase.h:395 ../src/common/docview.cpp:1250
+msgid "Print Preview"
+msgstr "Antevisão de Impressão"
+
+#: ../src/common/prntbase.cpp:1985 ../src/common/prntbase.cpp:2027
+#: ../src/common/prntbase.cpp:2035
+msgid "Print Preview Failure"
+msgstr "Falha na Antevisão de Impressão"
+
+#: ../src/generic/prntdlgg.cpp:224
+msgid "Print Range"
+msgstr "Alcance da Impressão"
+
+#: ../src/generic/prntdlgg.cpp:449
+msgid "Print Setup"
+msgstr "Configuração da Impressão"
+
+#: ../src/generic/prntdlgg.cpp:621
+msgid "Print in colour"
+msgstr "Imprimir a cores"
+
+#: ../src/common/stockitem.cpp:182
+#, fuzzy
+msgid "Print previe&w..."
+msgstr "&Antevisão de Impressão"
+
+#: ../src/common/docview.cpp:1244
+#, fuzzy
+msgid "Print preview creation failed."
+msgstr "Falha na criação do pipe"
+
+#: ../src/common/stockitem.cpp:182
+#, fuzzy
+msgid "Print preview..."
+msgstr "Antevisão de impressão"
+
+#: ../src/generic/prntdlgg.cpp:630
+msgid "Print spooling"
+msgstr "Spool de impressão"
+
+#: ../src/html/helpwnd.cpp:688
+msgid "Print this page"
+msgstr "Imprimir esta página"
+
+#: ../src/generic/prntdlgg.cpp:185
+msgid "Print to File"
+msgstr "Imprimir para Ficheiro"
+
+#: ../src/common/stockitem.cpp:183
+#, fuzzy
+msgid "Print..."
+msgstr "&Imprimir..."
+
+#: ../src/generic/prntdlgg.cpp:493
+msgid "Printer"
+msgstr "Impressora"
+
+#: ../src/generic/prntdlgg.cpp:633
+msgid "Printer command:"
+msgstr "Comando de impressora:"
+
+#: ../src/generic/prntdlgg.cpp:180
+msgid "Printer options"
+msgstr "Opções de impressora"
+
+#: ../src/generic/prntdlgg.cpp:645
+msgid "Printer options:"
+msgstr "Opções de impressora:"
+
+#: ../src/generic/prntdlgg.cpp:916
+msgid "Printer..."
+msgstr "Impressora..."
+
+#: ../src/generic/prntdlgg.cpp:196
+msgid "Printer:"
+msgstr "Impressora:"
+
+#: ../include/wx/richtext/richtextprint.h:163 ../src/common/prntbase.cpp:518
+#: ../src/html/htmprint.cpp:277
+#, fuzzy
+msgid "Printing"
+msgstr "A Imprimir "
+
+#: ../src/common/prntbase.cpp:586
+msgid "Printing "
+msgstr "A Imprimir "
+
+#: ../src/common/prntbase.cpp:330
+msgid "Printing Error"
+msgstr "Erro de Impressão"
+
+#: ../src/common/prntbase.cpp:544
+#, fuzzy, c-format
+msgid "Printing page %d of %d"
+msgstr "A imprimir página %d..."
+
+#: ../src/generic/printps.cpp:201
+#, c-format
+msgid "Printing page %d..."
+msgstr "A imprimir página %d..."
+
+#: ../src/generic/printps.cpp:161
+msgid "Printing..."
+msgstr "A Imprimir..."
+
+#: ../include/wx/richtext/richtextprint.h:109 ../include/wx/prntbase.h:263
+#: ../src/common/docview.cpp:2124
+#, fuzzy
+msgid "Printout"
+msgstr "Imprimir"
+
+#: ../src/common/debugrpt.cpp:565
+#, c-format
+msgid ""
+"Processing debug report has failed, leaving the files in \"%s\" directory."
+msgstr ""
+"O processamento do relatório de erro falhou, os ficheiros são deixados no "
+"directório \"%s\"."
+
+#: ../src/osx/carbon/dataview.cpp:2472
+msgid "Progress renderer cannot render value type; value type: "
+msgstr ""
+
+#: ../src/common/prntbase.cpp:528
+msgid "Progress:"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:184
+#, fuzzy
+msgid "Properties"
+msgstr "&Propriedades"
+
+#: ../src/propgrid/manager.cpp:237
+#, fuzzy
+msgid "Property"
+msgstr "&Propriedades"
+
+#: ../src/propgrid/propgrid.cpp:3144 ../src/propgrid/propgrid.cpp:3276
+#, fuzzy
+msgid "Property Error"
+msgstr "Erro de Impressão"
+
+#: ../src/common/paper.cpp:113
+msgid "Quarto, 215 x 275 mm"
+msgstr "Quarto, 215 x 275 mm"
+
+#: ../src/generic/logg.cpp:1036
+msgid "Question"
+msgstr "Pergunta"
+
+#: ../src/common/stockitem.cpp:156
+#, fuzzy
+msgid "Quit"
+msgstr "&Desistir"
+
+#: ../src/osx/menu_osx.cpp:610 ../src/osx/menu_osx.cpp:657
+#, fuzzy, c-format
+msgid "Quit %s"
+msgstr "&Desistir"
+
+#: ../src/common/stockitem.cpp:263
+msgid "Quit this program"
+msgstr "Terminar deste programa"
+
+#: ../src/common/accelcmn.cpp:53
+msgid "RETURN"
+msgstr "RETURN"
+
+#: ../src/common/accelcmn.cpp:57
+msgid "RIGHT"
+msgstr "DIREITO"
+
+#: ../src/common/accelcmn.cpp:327
+#, fuzzy
+msgid "RawCtrl+"
+msgstr "Ctrl-"
+
+#: ../src/common/ffile.cpp:113 ../src/common/ffile.cpp:134
+#, c-format
+msgid "Read error on file '%s'"
+msgstr "Erro de leitura no ficheiro '%s'"
+
+#: ../src/common/prntbase.cpp:257
+msgid "Ready"
+msgstr "Preparado"
+
+#: ../src/common/stockitem.cpp:185 ../src/stc/stc_i18n.cpp:16
+#, fuzzy
+msgid "Redo"
+msgstr "&Refazer"
+
+#: ../src/common/stockitem.cpp:264
+msgid "Redo last action"
+msgstr "Refazer última acção"
+
+#: ../src/common/stockitem.cpp:186
+msgid "Refresh"
+msgstr "Refrescar"
+
+#: ../src/msw/registry.cpp:625
+#, c-format
+msgid "Registry key '%s' already exists."
+msgstr "Chave de registo '%s' já existe."
+
+#: ../src/msw/registry.cpp:594
+#, c-format
+msgid "Registry key '%s' does not exist, cannot rename it."
+msgstr "Chave de registo '%s' não existe, impossível renomeá-la."
+
+#: ../src/msw/registry.cpp:726
+#, c-format
+msgid ""
+"Registry key '%s' is needed for normal system operation,\n"
+"deleting it will leave your system in unusable state:\n"
+"operation aborted."
+msgstr ""
+"A chave de registo '%s' é necessária para a operação normal do sistema,\n"
+"apagá-lo vai deixar o seu sistema num estado inutilizável:\n"
+"operação interrompida."
+
+#: ../src/msw/registry.cpp:520
+#, c-format
+msgid "Registry value '%s' already exists."
+msgstr "Valor de registo '%s' já existe."
+
+#: ../src/richtext/richtextfontpage.cpp:332
+#: ../src/richtext/richtextfontpage.cpp:336
+msgid "Regular"
+msgstr "Regular"
+
+#: ../src/richtext/richtextsizepage.cpp:519
+#, fuzzy
+msgid "Relative"
+msgstr "Decorative"
+
+#: ../src/generic/helpext.cpp:462
+msgid "Relevant entries:"
+msgstr "Entradas relevantes:"
+
+#: ../include/wx/generic/progdlgg.h:86
+#, fuzzy
+msgid "Remaining time:"
+msgstr "Tempo restante : "
+
+#: ../src/common/stockitem.cpp:187
+msgid "Remove"
+msgstr "Remover"
+
+#: ../src/richtext/richtextctrl.cpp:1430
+#, fuzzy
+msgid "Remove Bullet"
+msgstr "Remover"
+
+#: ../src/html/helpwnd.cpp:440
+msgid "Remove current page from bookmarks"
+msgstr "Remover página actual dos marcadores"
+
+#: ../src/common/rendcmn.cpp:194
+#, c-format
+msgid "Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."
+msgstr ""
+"Renderizador \"%s\" tem uma versão incompatível %d.%d e não pode ser "
+"carregado."
+
+#: ../src/osx/carbon/dataview.cpp:1430
+#, fuzzy
+msgid "Rendering failed."
+msgstr "Falha na criação do temporizador."
+
+#: ../src/richtext/richtextbuffer.cpp:4214
+msgid "Renumber List"
+msgstr "Renumerar Lista"
+
+#: ../src/common/stockitem.cpp:188
+msgid "Rep&lace"
+msgstr "Su&bstituir"
+
+#: ../src/richtext/richtextctrl.cpp:3277 ../src/common/stockitem.cpp:188
+msgid "Replace"
+msgstr "Substituir"
+
+#: ../src/generic/fdrepdlg.cpp:182
+msgid "Replace &all"
+msgstr "Substituir &todos"
+
+#: ../src/common/stockitem.cpp:261
+msgid "Replace selection"
+msgstr "Substituir selecção"
+
+#: ../src/generic/fdrepdlg.cpp:124
+msgid "Replace with:"
+msgstr "Substituir por:"
+
+#: ../src/common/valtext.cpp:161
+msgid "Required information entry is empty."
+msgstr ""
+
+#: ../src/common/translation.cpp:1966
+#, fuzzy, c-format
+msgid "Resource '%s' is not a valid message catalog."
+msgstr "'%s' não é uma mensagem válida do catálogo."
+
+#: ../src/common/stockitem.cpp:189
+msgid "Revert to Saved"
+msgstr "Reverter para o Gravado"
+
+#: ../src/richtext/richtextborderspage.cpp:548
+#, fuzzy
+msgid "Ridge"
+msgstr "Direita"
+
+#: ../src/richtext/richtextliststylepage.cpp:251
+#: ../src/richtext/richtextbulletspage.cpp:201
+#: ../src/richtext/richtextsizepage.cpp:250
+msgid "Right"
+msgstr "Direita"
+
+#: ../src/generic/prntdlgg.cpp:892
+msgid "Right margin (mm):"
+msgstr "Margem direita (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:148
+#: ../src/richtext/richtextindentspage.cpp:150
+#: ../src/richtext/richtextliststylepage.cpp:337
+#: ../src/richtext/richtextliststylepage.cpp:339
+msgid "Right-align text."
+msgstr "Alinhar texto à direita."
+
+#: ../src/generic/fontdlgg.cpp:322
+msgid "Roman"
+msgstr "Roman"
+
+#: ../src/richtext/richtextliststylepage.cpp:299
+#: ../src/richtext/richtextbulletspage.cpp:252
+msgid "S&tandard bullet name:"
+msgstr "Nome de Marcador S&tandard:"
+
+#: ../src/common/accelcmn.cpp:82
+msgid "SCROLL_LOCK"
+msgstr "SCROLL_LOCK"
+
+#: ../src/common/accelcmn.cpp:71
+msgid "SELECT"
+msgstr "SELECT"
+
+#: ../src/common/accelcmn.cpp:77
+msgid "SEPARATOR"
+msgstr "SEPARADOR"
+
+#: ../src/common/accelcmn.cpp:74
+msgid "SNAPSHOT"
+msgstr "SNAPSHOT"
+
+#: ../src/common/accelcmn.cpp:62
+msgid "SPACE"
+msgstr "SPACE"
+
+#: ../src/common/accelcmn.cpp:257 ../src/common/accelcmn.cpp:339
+msgid "SPECIAL"
+msgstr "SPECIAL"
+
+#: ../src/common/accelcmn.cpp:78
+msgid "SUBTRACT"
+msgstr "SUBTRAIR"
+
+#: ../src/common/stockitem.cpp:190 ../src/common/sizer.cpp:2678
+msgid "Save"
+msgstr "Gravar"
+
+#: ../src/common/fldlgcmn.cpp:327
+#, c-format
+msgid "Save %s file"
+msgstr "Gravar %s ficheiro"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save &As..."
+msgstr "Gravar &Como..."
+
+#: ../src/common/docview.cpp:360
+msgid "Save As"
+msgstr "Gravar Como"
+
+#: ../src/common/stockitem.cpp:191
+#, fuzzy
+msgid "Save as"
+msgstr "Gravar Como"
+
+#: ../src/common/stockitem.cpp:267
+msgid "Save current document"
+msgstr "Gravar documento actual"
+
+#: ../src/common/stockitem.cpp:268
+msgid "Save current document with a different filename"
+msgstr "Gravar documento actual com nome diferente"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save log contents to file"
+msgstr "Gravar conteúdos do registo para ficheiro"
+
+#: ../src/generic/fontdlgg.cpp:325
+msgid "Script"
+msgstr "Script"
+
+#: ../src/generic/srchctlg.cpp:67 ../src/html/helpwnd.cpp:548
+#: ../src/html/helpwnd.cpp:563
+msgid "Search"
+msgstr "Procurar"
+
+#: ../src/html/helpwnd.cpp:550
+#, fuzzy
+msgid ""
+"Search contents of help book(s) for all occurrences of the text you typed "
+"above"
+msgstr ""
+"Procurar conteúdos de livros de ajuda para todas as ocorrências do texto "
+"digitado acima"
+
+#: ../src/generic/fdrepdlg.cpp:160
+msgid "Search direction"
+msgstr "Direcção de procura"
+
+#: ../src/generic/fdrepdlg.cpp:112
+msgid "Search for:"
+msgstr "Procurar por:"
+
+#: ../src/html/helpwnd.cpp:1065
+msgid "Search in all books"
+msgstr "Procurar em todos os livros"
+
+#: ../src/html/helpwnd.cpp:870
+msgid "Searching..."
+msgstr "A Procurar..."
+
+#: ../src/generic/dirctrlg.cpp:546
+msgid "Sections"
+msgstr "Secções"
+
+#: ../src/common/ffile.cpp:220
+#, c-format
+msgid "Seek error on file '%s'"
+msgstr "Erro de pesquisa no ficheiro '%s'"
+
+#: ../src/common/ffile.cpp:210
+#, c-format
+msgid "Seek error on file '%s' (large files not supported by stdio)"
+msgstr ""
+"Erro de pesquisa no ficheiro '%s' (ficheiros grandes não são suportados pelo "
+"stdio)"
+
+#: ../src/richtext/richtextctrl.cpp:330 ../src/osx/textctrl_osx.cpp:587
+#: ../src/common/stockitem.cpp:192 ../src/msw/textctrl.cpp:2288
+msgid "Select &All"
+msgstr "Seleccion&ar Todos"
+
+#: ../src/common/stockitem.cpp:192 ../src/stc/stc_i18n.cpp:21
+#, fuzzy
+msgid "Select All"
+msgstr "Seleccion&ar Todos"
+
+#: ../src/common/docview.cpp:1877
+msgid "Select a document template"
+msgstr "Seleccionar um modelo de documento"
+
+#: ../src/common/docview.cpp:1951
+msgid "Select a document view"
+msgstr "Seleccionar uma vista de documento"
+
+#: ../src/richtext/richtextfontpage.cpp:235
+#: ../src/richtext/richtextfontpage.cpp:237
+msgid "Select regular or bold."
+msgstr "Seleccionar normal ou destacado."
+
+#: ../src/richtext/richtextfontpage.cpp:222
+#: ../src/richtext/richtextfontpage.cpp:224
+msgid "Select regular or italic style."
+msgstr "Seleccionar estilo normal ou itálico."
+
+#: ../src/richtext/richtextfontpage.cpp:248
+#: ../src/richtext/richtextfontpage.cpp:250
+msgid "Select underlining or no underlining."
+msgstr "Seleccionar sublinhado ou não sublinhado."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Selection"
+msgstr "Selecção"
+
+#: ../src/richtext/richtextliststylepage.cpp:187
+#: ../src/richtext/richtextliststylepage.cpp:189
+msgid "Selects the list level to edit."
+msgstr "Selecciona o nível de lista a editar."
+
+#: ../src/common/cmdline.cpp:918
+#, c-format
+msgid "Separator expected after the option '%s'."
+msgstr "Separador esperado depois da opção '%s'."
+
+#: ../src/richtext/richtextbuffer.cpp:10513
+#, fuzzy
+msgid "Set Cell Style"
+msgstr "Apagar Estilo"
+
+#: ../include/wx/xtiprop.h:179
+msgid "SetProperty called w/o valid setter"
+msgstr "SetProperty chamado sem 'set' válido"
+
+#: ../src/common/filename.cpp:2632
+msgid "Setting directory access times is not supported under this OS version"
+msgstr ""
+
+#: ../src/generic/prntdlgg.cpp:188
+msgid "Setup..."
+msgstr "Configurar..."
+
+#: ../src/msw/dialup.cpp:563
+msgid "Several active dialup connections found, choosing one randomly."
+msgstr ""
+"Foram encontradas várias ligações telefónicas activas, a escolher uma "
+"aleatoriamente."
+
+#: ../src/common/accelcmn.cpp:324
+#, fuzzy
+msgid "Shift+"
+msgstr "Shift-"
+
+#: ../src/generic/dirdlgg.cpp:170
+msgid "Show &hidden directories"
+msgstr "Mostrar directórios e&scondidos"
+
+#: ../src/generic/filectrlg.cpp:1003
+msgid "Show &hidden files"
+msgstr "Mostrar fic&heiros escondidos"
+
+#: ../src/osx/menu_osx.cpp:605 ../src/osx/menu_osx.cpp:652
+#, fuzzy
+msgid "Show All"
+msgstr "Mostrar tudo"
+
+#: ../src/common/stockitem.cpp:257
+msgid "Show about dialog"
+msgstr "Mostrar diálogo sobre"
+
+#: ../src/html/helpwnd.cpp:502
+msgid "Show all"
+msgstr "Mostrar tudo"
+
+#: ../src/html/helpwnd.cpp:513
+msgid "Show all items in index"
+msgstr "Mostrar todos os items no índice"
+
+#: ../src/generic/dirdlgg.cpp:105
+msgid "Show hidden directories"
+msgstr "Mostrar directórios escondidos"
+
+#: ../src/html/helpwnd.cpp:671
+msgid "Show/hide navigation panel"
+msgstr "Mostra/esconde painel de navegação"
+
+#: ../src/richtext/richtextsymboldlg.cpp:421
+#: ../src/richtext/richtextsymboldlg.cpp:423
+msgid "Shows a Unicode subset."
+msgstr "Mostra um sub-conjunto Unicode."
+
+#: ../src/richtext/richtextliststylepage.cpp:472
+#: ../src/richtext/richtextliststylepage.cpp:474
+#: ../src/richtext/richtextbulletspage.cpp:276
+#: ../src/richtext/richtextbulletspage.cpp:278
+msgid "Shows a preview of the bullet settings."
+msgstr "Mostra uma antevisão das definições de marcador."
+
+#: ../src/richtext/richtextfontpage.cpp:322
+#: ../src/richtext/richtextfontpage.cpp:324
+msgid "Shows a preview of the font settings."
+msgstr "Mostra uma antevisão das definições da fonte."
+
+#: ../src/osx/carbon/fontdlg.cpp:580 ../src/osx/carbon/fontdlg.cpp:582
+msgid "Shows a preview of the font."
+msgstr "Mostrar uma antevisão da fonte."
+
+#: ../src/richtext/richtextindentspage.cpp:303
+#: ../src/richtext/richtextindentspage.cpp:305
+msgid "Shows a preview of the paragraph settings."
+msgstr "Mostra uma antevisão das definições do parágrafo."
+
+#: ../src/generic/fontdlgg.cpp:460 ../src/generic/fontdlgg.cpp:462
+msgid "Shows the font preview."
+msgstr "Mostra a antevisão da fonte."
+
+#: ../src/univ/themes/mono.cpp:516
+msgid "Simple monochrome theme"
+msgstr "Tema monocromático simples"
+
+#: ../src/richtext/richtextindentspage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:449
+msgid "Single"
+msgstr "Único"
+
+#: ../src/generic/filectrlg.cpp:460 ../src/richtext/richtextformatdlg.cpp:356
+#: ../src/richtext/richtextsizepage.cpp:299
+msgid "Size"
+msgstr "Tamanho"
+
+#: ../src/osx/carbon/fontdlg.cpp:525
+msgid "Size:"
+msgstr "Tamanho:"
+
+#: ../src/generic/progdlgg.cpp:262 ../src/generic/progdlgg.cpp:773
+#: ../src/msw/progdlg.cpp:801
+msgid "Skip"
+msgstr "Saltar"
+
+#: ../src/generic/fontdlgg.cpp:330
+msgid "Slant"
+msgstr "Inclinação"
+
+#: ../src/richtext/richtextfontpage.cpp:298
+msgid "Small C&apitals"
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:543
+#, fuzzy
+msgid "Solid"
+msgstr "Destacado"
+
+#: ../src/common/docview.cpp:1773
+msgid "Sorry, could not open this file."
+msgstr "Lamento, não foi possível abrir este ficheiro."
+
+#: ../src/common/prntbase.cpp:2027 ../src/common/prntbase.cpp:2035
+msgid "Sorry, not enough memory to create a preview."
+msgstr "Lamento, não existe memória suficiente para criar a antevisão."
+
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "Sorry, that name is taken. Please choose another."
+msgstr "Lamento, este nome já está escolhido. Por favor escolha outro."
+
+#: ../src/common/docview.cpp:1796
+msgid "Sorry, the format for this file is unknown."
+msgstr "Lamento, o formato deste ficheiro é desconhecido."
+
+#: ../src/unix/sound.cpp:492
+msgid "Sound data are in unsupported format."
+msgstr "Dados de som estão num formato não suportado."
+
+#: ../src/unix/sound.cpp:477
+#, c-format
+msgid "Sound file '%s' is in unsupported format."
+msgstr "Ficheiro de som '%s' está num formato não suportado."
+
+#: ../src/richtext/richtextliststylepage.cpp:467
+msgid "Spacing"
+msgstr "Espaçamento"
+
+#: ../src/common/stockitem.cpp:197
+msgid "Spell Check"
+msgstr ""
+
+#: ../src/richtext/richtextliststylepage.cpp:490
+#: ../src/richtext/richtextbulletspage.cpp:295
+msgid "Standard"
+msgstr "Standard"
+
+#: ../src/common/paper.cpp:105
+msgid "Statement, 5 1/2 x 8 1/2 in"
+msgstr "Statement, 5 1/2 x 8 1/2 pol."
+
+#: ../src/richtext/richtextsizepage.cpp:518
+#: ../src/richtext/richtextsizepage.cpp:523
+#, fuzzy
+msgid "Static"
+msgstr "Estado:"
+
+#: ../src/generic/prntdlgg.cpp:204
+msgid "Status:"
+msgstr "Estado:"
+
+#: ../src/common/stockitem.cpp:198
+#, fuzzy
+msgid "Stop"
+msgstr "&Parar"
+
+#: ../src/common/stockitem.cpp:199
+msgid "Strikethrough"
+msgstr ""
+
+#: ../src/common/colourcmn.cpp:45
+#, c-format
+msgid "String To Colour : Incorrect colour specification : %s"
+msgstr "Cadeia de Caracteres para Cor :Especificação de cor incorrecta : %s"
+
+#: ../src/richtext/richtextformatdlg.cpp:318 ../src/propgrid/advprops.cpp:647
+msgid "Style"
+msgstr "Estilo"
+
+#: ../include/wx/richtext/richtextstyledlg.h:47
+msgid "Style Organiser"
+msgstr "Organizador de Estilos"
+
+#: ../src/osx/carbon/fontdlg.cpp:534
+msgid "Style:"
+msgstr "Estilo:"
+
+#: ../src/richtext/richtextfontpage.cpp:312
+#, fuzzy
+msgid "Subscrip&t"
+msgstr "Script"
+
+#: ../src/richtext/richtextfontpage.cpp:305
+#, fuzzy
+msgid "Supe&rscript"
+msgstr "Script"
+
+#: ../src/common/paper.cpp:151
+msgid "SuperA/SuperA/A4 227 x 356 mm"
+msgstr "SuperA/SuperA/A4 227 x 356 mm"
+
+#: ../src/common/paper.cpp:152
+msgid "SuperB/SuperB/A3 305 x 487 mm"
+msgstr "SuperB/SuperB/A3 305 x 487 mm"
+
+#: ../src/generic/fontdlgg.cpp:326
+msgid "Swiss"
+msgstr "Suíço"
+
+#: ../src/richtext/richtextliststylepage.cpp:488
+#: ../src/richtext/richtextbulletspage.cpp:293
+msgid "Symbol"
+msgstr "Symbol"
+
+#: ../src/richtext/richtextliststylepage.cpp:288
+#: ../src/richtext/richtextbulletspage.cpp:240
+msgid "Symbol &font:"
+msgstr "&Fonte Symbol:"
+
+#: ../include/wx/richtext/richtextsymboldlg.h:47
+msgid "Symbols"
+msgstr "Símbolos"
+
+#: ../src/common/accelcmn.cpp:63
+msgid "TAB"
+msgstr "TAB"
+
+#: ../src/common/imagtiff.cpp:372 ../src/common/imagtiff.cpp:385
+#: ../src/common/imagtiff.cpp:744
+msgid "TIFF: Couldn't allocate memory."
+msgstr "TIFF: Não é possível alocar memória."
+
+#: ../src/common/imagtiff.cpp:304
+msgid "TIFF: Error loading image."
+msgstr "TIFF: Erro ao carregar imagem."
+
+#: ../src/common/imagtiff.cpp:471
+msgid "TIFF: Error reading image."
+msgstr "TIFF: Erro ao ler imagem."
+
+#: ../src/common/imagtiff.cpp:611
+msgid "TIFF: Error saving image."
+msgstr "TIFF: Erro ao gravar imagem."
+
+#: ../src/common/imagtiff.cpp:849
+msgid "TIFF: Error writing image."
+msgstr "TIFF: Erro ao escrever imagem."
+
+#: ../src/common/imagtiff.cpp:358
+msgid "TIFF: Image size is abnormally big."
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:10794
+#, fuzzy
+msgid "Table Properties"
+msgstr "&Propriedades"
+
+#: ../src/common/paper.cpp:146
+msgid "Tabloid Extra 11.69 x 18 in"
+msgstr "Tabloid Extra 11.69 x 18 pol."
+
+#: ../src/common/paper.cpp:103
+msgid "Tabloid, 11 x 17 in"
+msgstr "Tabloid, 11 x 17 pol."
+
+#: ../src/richtext/richtextformatdlg.cpp:336
+msgid "Tabs"
+msgstr "Tabs"
+
+#: ../src/generic/fontdlgg.cpp:327
+msgid "Teletype"
+msgstr "Teletype"
+
+#: ../src/common/docview.cpp:1878
+msgid "Templates"
+msgstr "Modelos"
+
+#: ../src/osx/carbon/dataview.cpp:2373
+msgid "Text renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/common/fmapbase.cpp:158
+msgid "Thai (ISO-8859-11)"
+msgstr "Tailandês (ISO-8859-11)"
+
+#: ../src/common/ftp.cpp:620
+msgid "The FTP server doesn't support passive mode."
+msgstr "O servidor do FTP não suporta modo passivo."
+
+#: ../src/common/ftp.cpp:606
+msgid "The FTP server doesn't support the PORT command."
+msgstr "O servidor de FTP não suporta o comando PORT."
+
+#: ../src/richtext/richtextliststylepage.cpp:215
+#: ../src/richtext/richtextliststylepage.cpp:217
+#: ../src/richtext/richtextbulletspage.cpp:164
+#: ../src/richtext/richtextbulletspage.cpp:166
+msgid "The available bullet styles."
+msgstr "Os estilos de marcador disponíveis."
+
+#: ../src/richtext/richtextstyledlg.cpp:202
+#: ../src/richtext/richtextstyledlg.cpp:204
+msgid "The available styles."
+msgstr "Os estilos disponíveis."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:139
+#: ../src/richtext/richtextbackgroundpage.cpp:141
+#, fuzzy
+msgid "The background colour."
+msgstr "Cor de fundo"
+
+#: ../src/richtext/richtextmarginspage.cpp:268
+#: ../src/richtext/richtextmarginspage.cpp:270
+#, fuzzy
+msgid "The bottom margin size."
+msgstr "O tamanho do ponto da fonte."
+
+#: ../src/richtext/richtextmarginspage.cpp:382
+#: ../src/richtext/richtextmarginspage.cpp:384
+#, fuzzy
+msgid "The bottom padding size."
+msgstr "O tamanho do ponto da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:639
+#: ../src/richtext/richtextsizepage.cpp:641
+#: ../src/richtext/richtextsizepage.cpp:653
+#: ../src/richtext/richtextsizepage.cpp:655
+#, fuzzy
+msgid "The bottom position."
+msgstr "A posição de tabulação."
+
+#: ../src/richtext/richtextliststylepage.cpp:254
+#: ../src/richtext/richtextliststylepage.cpp:256
+#: ../src/richtext/richtextliststylepage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:277
+#: ../src/richtext/richtextbulletspage.cpp:204
+#: ../src/richtext/richtextbulletspage.cpp:206
+#: ../src/richtext/richtextbulletspage.cpp:227
+#: ../src/richtext/richtextbulletspage.cpp:229
+msgid "The bullet character."
+msgstr "O caracter do marcador."
+
+#: ../src/richtext/richtextsymboldlg.cpp:443
+#: ../src/richtext/richtextsymboldlg.cpp:445
+msgid "The character code."
+msgstr "Código do caracter."
+
+#: ../src/common/fontmap.cpp:203
+#, c-format
+msgid ""
+"The charset '%s' is unknown. You may select\n"
+"another charset to replace it with or choose\n"
+"[Cancel] if it cannot be replaced"
+msgstr ""
+"O conjunto de caracteres '%s' é desconhecido. Pode seleccionar\n"
+"outro conjunto de caracteres para substituir, ou escolher\n"
+"[Cancelar] se não puder ser trocado"
+
+#: ../src/msw/ole/dataobj.cpp:367
+#, c-format
+msgid "The clipboard format '%d' doesn't exist."
+msgstr "O formato da área de transferência '%d' não existe."
+
+#: ../src/richtext/richtextstylepage.cpp:128
+#: ../src/richtext/richtextstylepage.cpp:130
+msgid "The default style for the next paragraph."
+msgstr "O estilo pré-definido para o próximo parágrafo."
+
+#: ../src/generic/dirdlgg.cpp:231
+#, c-format
+msgid ""
+"The directory '%s' does not exist\n"
+"Create it now?"
+msgstr ""
+"O directório '%s' não existe\n"
+"Prtende criá-lo agora?"
+
+#: ../src/html/htmprint.cpp:271
+#, c-format
+msgid ""
+"The document \"%s\" doesn't fit on the page horizontally and will be "
+"truncated if printed.\n"
+"\n"
+"Would you like to proceed with printing it nevertheless?"
+msgstr ""
+
+#: ../src/common/docview.cpp:1184
+#, c-format
+msgid ""
+"The file '%s' doesn't exist and couldn't be opened.\n"
+"It has been removed from the most recently used files list."
+msgstr ""
+"O ficheiro '%s' não existe e não pode ser aberto.\n"
+"Este foi removido da lista de ficheiros usados mais recentemente."
+
+#: ../src/richtext/richtextindentspage.cpp:208
+#: ../src/richtext/richtextindentspage.cpp:210
+#: ../src/richtext/richtextliststylepage.cpp:394
+#: ../src/richtext/richtextliststylepage.cpp:396
+msgid "The first line indent."
+msgstr "A indentação da primeira linha."
+
+#: ../src/gtk/utilsgtk.cpp:427
+msgid "The following standard GTK+ options are also supported:\n"
+msgstr ""
+
+#: ../src/generic/fontdlgg.cpp:414 ../src/generic/fontdlgg.cpp:416
+msgid "The font colour."
+msgstr "A cor da fonte."
+
+#: ../src/generic/fontdlgg.cpp:375 ../src/generic/fontdlgg.cpp:377
+msgid "The font family."
+msgstr "A família da fonte."
+
+#: ../src/richtext/richtextsymboldlg.cpp:405
+#: ../src/richtext/richtextsymboldlg.cpp:407
+msgid "The font from which to take the symbol."
+msgstr "A fonte de onde se retira o símbolo."
+
+#: ../src/generic/fontdlgg.cpp:427 ../src/generic/fontdlgg.cpp:429
+#: ../src/generic/fontdlgg.cpp:434 ../src/generic/fontdlgg.cpp:436
+msgid "The font point size."
+msgstr "O tamanho do ponto da fonte."
+
+#: ../src/osx/carbon/fontdlg.cpp:529 ../src/osx/carbon/fontdlg.cpp:531
+msgid "The font size in points."
+msgstr "O tamanho da fonte em pontos."
+
+#: ../src/richtext/richtextfontpage.cpp:190
+#: ../src/richtext/richtextfontpage.cpp:192
+#, fuzzy
+msgid "The font size units, points or pixels."
+msgstr "O tamanho da fonte em pontos."
+
+#: ../src/generic/fontdlgg.cpp:386 ../src/generic/fontdlgg.cpp:388
+msgid "The font style."
+msgstr "O estilo da fonte."
+
+#: ../src/generic/fontdlgg.cpp:397 ../src/generic/fontdlgg.cpp:399
+msgid "The font weight."
+msgstr "O peso da fonte."
+
+#: ../src/common/docview.cpp:1465
+#, fuzzy, c-format
+msgid "The format of file '%s' couldn't be determined."
+msgstr "Não foi possível criar o directório '%s'"
+
+#: ../src/richtext/richtextindentspage.cpp:199
+#: ../src/richtext/richtextindentspage.cpp:201
+#: ../src/richtext/richtextliststylepage.cpp:385
+#: ../src/richtext/richtextliststylepage.cpp:387
+msgid "The left indent."
+msgstr "A indentação à esquerda."
+
+#: ../src/richtext/richtextmarginspage.cpp:195
+#: ../src/richtext/richtextmarginspage.cpp:197
+#, fuzzy
+msgid "The left margin size."
+msgstr "O tamanho do ponto da fonte."
+
+#: ../src/richtext/richtextmarginspage.cpp:309
+#: ../src/richtext/richtextmarginspage.cpp:311
+#, fuzzy
+msgid "The left padding size."
+msgstr "O tamanho do ponto da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:534
+#: ../src/richtext/richtextsizepage.cpp:536
+#: ../src/richtext/richtextsizepage.cpp:548
+#: ../src/richtext/richtextsizepage.cpp:550
+#, fuzzy
+msgid "The left position."
+msgstr "A posição de tabulação."
+
+#: ../src/richtext/richtextindentspage.cpp:288
+#: ../src/richtext/richtextindentspage.cpp:290
+#: ../src/richtext/richtextliststylepage.cpp:462
+#: ../src/richtext/richtextliststylepage.cpp:464
+msgid "The line spacing."
+msgstr "O espaçamento de linha."
+
+#: ../src/richtext/richtextbulletspage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:270
+msgid "The list item number."
+msgstr "O número de item da lista."
+
+#: ../src/msw/ole/automtn.cpp:653
+msgid "The locale ID is unknown."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:366
+#: ../src/richtext/richtextsizepage.cpp:368
+#, fuzzy
+msgid "The object height."
+msgstr "O peso da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:474
+#: ../src/richtext/richtextsizepage.cpp:476
+#, fuzzy
+msgid "The object maximum height."
+msgstr "O peso da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:447
+#: ../src/richtext/richtextsizepage.cpp:449
+#, fuzzy
+msgid "The object maximum width."
+msgstr "O peso da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:420
+#: ../src/richtext/richtextsizepage.cpp:422
+#, fuzzy
+msgid "The object minimum height."
+msgstr "O peso da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:393
+#: ../src/richtext/richtextsizepage.cpp:395
+#, fuzzy
+msgid "The object minimum width."
+msgstr "O peso da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:332
+#: ../src/richtext/richtextsizepage.cpp:334
+#, fuzzy
+msgid "The object width."
+msgstr "O peso da fonte."
+
+#: ../src/richtext/richtextindentspage.cpp:227
+#: ../src/richtext/richtextindentspage.cpp:229
+#, fuzzy
+msgid "The outline level."
+msgstr "A antevisão do estilo."
+
+#: ../src/common/log.cpp:281
+#, fuzzy, c-format
+msgid "The previous message repeated %lu time."
+msgid_plural "The previous message repeated %lu times."
+msgstr[0] "A mensagem anterior repetida uma vez."
+msgstr[1] "A mensagem anterior repetida %lu vezes."
+
+#: ../src/common/log.cpp:274
+#, fuzzy
+msgid "The previous message repeated once."
+msgstr "A mensagem anterior repetida uma vez."
+
+#: ../src/gtk/print.cpp:931 ../src/gtk/print.cpp:1114
+msgid "The print dialog returned an error."
+msgstr ""
+
+#: ../src/richtext/richtextsymboldlg.cpp:462
+#: ../src/richtext/richtextsymboldlg.cpp:464
+msgid "The range to show."
+msgstr "O alcance a mostrar."
+
+#: ../src/generic/dbgrptg.cpp:322
+msgid ""
+"The report contains the files listed below. If any of these files contain "
+"private information,\n"
+"please uncheck them and they will be removed from the report.\n"
+msgstr ""
+"O relatório os ficheiros listados abaixo. Se algum destes ficheiros contém "
+"informação privada,\n"
+"por favor desmarque-os e eles serão removidos do relatório.\n"
+
+#: ../src/common/cmdline.cpp:1083
+#, c-format
+msgid "The required parameter '%s' was not specified."
+msgstr "O parâmetro requerido '%s' não foi especificado."
+
+#: ../src/richtext/richtextindentspage.cpp:217
+#: ../src/richtext/richtextindentspage.cpp:219
+#: ../src/richtext/richtextliststylepage.cpp:403
+#: ../src/richtext/richtextliststylepage.cpp:405
+msgid "The right indent."
+msgstr "A indentação à direita."
+
+#: ../src/richtext/richtextmarginspage.cpp:220
+#: ../src/richtext/richtextmarginspage.cpp:222
+#, fuzzy
+msgid "The right margin size."
+msgstr "A indentação à direita."
+
+#: ../src/richtext/richtextmarginspage.cpp:334
+#: ../src/richtext/richtextmarginspage.cpp:336
+#, fuzzy
+msgid "The right padding size."
+msgstr "A indentação à direita."
+
+#: ../src/richtext/richtextsizepage.cpp:604
+#: ../src/richtext/richtextsizepage.cpp:606
+#: ../src/richtext/richtextsizepage.cpp:618
+#: ../src/richtext/richtextsizepage.cpp:620
+#, fuzzy
+msgid "The right position."
+msgstr "A posição de tabulação."
+
+#: ../src/richtext/richtextindentspage.cpp:267
+#: ../src/richtext/richtextliststylepage.cpp:439
+#: ../src/richtext/richtextliststylepage.cpp:441
+msgid "The spacing after the paragraph."
+msgstr "O espaçamento depois do parágrafo."
+
+#: ../src/richtext/richtextindentspage.cpp:257
+#: ../src/richtext/richtextindentspage.cpp:259
+#: ../src/richtext/richtextliststylepage.cpp:430
+#: ../src/richtext/richtextliststylepage.cpp:432
+msgid "The spacing before the paragraph."
+msgstr "O espaçamento antes do parágrafo."
+
+#: ../src/richtext/richtextstylepage.cpp:108
+#: ../src/richtext/richtextstylepage.cpp:110
+msgid "The style name."
+msgstr "O nome do estilo."
+
+#: ../src/richtext/richtextstylepage.cpp:118
+#: ../src/richtext/richtextstylepage.cpp:120
+msgid "The style on which this style is based."
+msgstr "O estilo do qual este estilo é baseado."
+
+#: ../src/richtext/richtextstyledlg.cpp:214
+#: ../src/richtext/richtextstyledlg.cpp:216
+msgid "The style preview."
+msgstr "A antevisão do estilo."
+
+#: ../src/msw/ole/automtn.cpp:669
+msgid "The system cannot find the file specified."
+msgstr ""
+
+#: ../src/richtext/richtexttabspage.cpp:118
+#: ../src/richtext/richtexttabspage.cpp:120
+msgid "The tab position."
+msgstr "A posição de tabulação."
+
+#: ../src/richtext/richtexttabspage.cpp:124
+msgid "The tab positions."
+msgstr "As posições de tabulação."
+
+#: ../src/richtext/richtextctrl.cpp:2705
+msgid "The text couldn't be saved."
+msgstr "O texto não pode ser gravado."
+
+#: ../src/richtext/richtextmarginspage.cpp:243
+#: ../src/richtext/richtextmarginspage.cpp:245
+#, fuzzy
+msgid "The top margin size."
+msgstr "O tamanho do ponto da fonte."
+
+#: ../src/richtext/richtextmarginspage.cpp:357
+#: ../src/richtext/richtextmarginspage.cpp:359
+#, fuzzy
+msgid "The top padding size."
+msgstr "O tamanho do ponto da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:569
+#: ../src/richtext/richtextsizepage.cpp:571
+#: ../src/richtext/richtextsizepage.cpp:583
+#: ../src/richtext/richtextsizepage.cpp:585
+#, fuzzy
+msgid "The top position."
+msgstr "A posição de tabulação."
+
+#: ../src/common/cmdline.cpp:1061
+#, c-format
+msgid "The value for the option '%s' must be specified."
+msgstr "O valor para a opção '%s' tem de ser especificado."
+
+#: ../src/msw/dialup.cpp:452
+#, fuzzy, c-format
+msgid ""
+"The version of remote access service (RAS) installed on this machine is too "
+"old, please upgrade (the following required function is missing: %s)."
+msgstr ""
+"A versão do serviço de acesso remoto (RAS) instalado nesta máquina é "
+"demasiado antigo, por favor actualize-o (as seguintes funções necessárias "
+"estão em falta: %s)."
+
+#: ../src/gtk/print.cpp:959
+msgid "The wxGtkPrinterDC cannot be used."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1340
+msgid "There is no column or renderer for the specified column index."
+msgstr ""
+
+#: ../src/richtext/richtextprint.cpp:614 ../src/html/htmprint.cpp:735
+msgid ""
+"There was a problem during page setup: you may need to set a default printer."
+msgstr ""
+"Houve um problema durante a configuração da página: poderá necessitar de "
+"definir uma impressora pré-definida."
+
+#: ../src/html/htmprint.cpp:255
+msgid ""
+"This document doesn't fit on the page horizontally and will be truncated "
+"when it is printed."
+msgstr ""
+
+#: ../src/common/image.cpp:2716
+#, fuzzy, c-format
+msgid "This is not a %s."
+msgstr "PCX: este não é um ficheiro PCX."
+
+#: ../src/common/wincmn.cpp:1653
+msgid "This platform does not support background transparency."
+msgstr ""
+
+#: ../src/gtk/window.cpp:4317
+msgid ""
+"This program was compiled with a too old version of GTK+, please rebuild "
+"with GTK+ 2.12 or newer."
+msgstr ""
+
+#: ../src/msw/datecontrols.cpp:59
+#, fuzzy
+msgid ""
+"This system doesn't support date controls, please upgrade your version of "
+"comctl32.dll"
+msgstr ""
+"Este sistema não suporta o controlo de selecção de data, por favor actualize "
+"a versão do comctl32.dll"
+
+#: ../src/msw/thread.cpp:1300
+msgid ""
+"Thread module initialization failed: cannot store value in thread local "
+"storage"
+msgstr ""
+"Falhou a inicialização do módulo da thread: não foi possível armazenar o "
+"valor no armazenamento local da thread"
+
+#: ../src/unix/threadpsx.cpp:1758
+msgid "Thread module initialization failed: failed to create thread key"
+msgstr ""
+"Falhou a inicialização do módulo da thread: falhou a criação da chave da "
+"thread"
+
+#: ../src/msw/thread.cpp:1288
+msgid ""
+"Thread module initialization failed: impossible to allocate index in thread "
+"local storage"
+msgstr ""
+"Falhou a inicialização do módulo da thread: impossível alocar índice no "
+"armazenamento local da thread"
+
+#: ../src/unix/threadpsx.cpp:1038
+msgid "Thread priority setting is ignored."
+msgstr "A definição de prioridade da thread é ignorada."
+
+#: ../src/msw/mdi.cpp:172
+msgid "Tile &Horizontally"
+msgstr "Dispor &Horizontalmente"
+
+#: ../src/msw/mdi.cpp:173
+msgid "Tile &Vertically"
+msgstr "Dispor &Verticalmente"
+
+#: ../src/common/ftp.cpp:202
+msgid "Timeout while waiting for FTP server to connect, try passive mode."
+msgstr ""
+"Tempo excedido enquanto esperava a ligação do servidor FTP, tente o modo "
+"passivo."
+
+#: ../src/os2/timer.cpp:99
+msgid "Timer creation failed."
+msgstr "Falha na criação do temporizador."
+
+#: ../src/generic/tipdlg.cpp:220
+msgid "Tip of the Day"
+msgstr "Dica do Dia"
+
+#: ../src/generic/tipdlg.cpp:154
+msgid "Tips not available, sorry!"
+msgstr "Dicas não disponíveis, desculpe!"
+
+#: ../src/generic/prntdlgg.cpp:242
+msgid "To:"
+msgstr "Para:"
+
+#: ../src/osx/carbon/dataview.cpp:2451
+msgid "Toggle renderer cannot render value; value type: "
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:7983
+msgid "Too many EndStyle calls!"
+msgstr "Demasiadas chamadas EndStyle!"
+
+#: ../src/common/imagpng.cpp:286
+msgid "Too many colours in PNG, the image may be slightly blurred."
+msgstr "Demasiadas cores no PNG, a imagem pode ficar ligeiramente desfocada."
+
+#: ../src/richtext/richtextsizepage.cpp:286
+#: ../src/richtext/richtextsizepage.cpp:290 ../src/common/stockitem.cpp:200
+#, fuzzy
+msgid "Top"
+msgstr "Para:"
+
+#: ../src/generic/prntdlgg.cpp:881
+msgid "Top margin (mm):"
+msgstr "Margem de topo (mm):"
+
+#: ../src/generic/aboutdlgg.cpp:79
+msgid "Translations by "
+msgstr "Traduções por "
+
+#: ../src/generic/aboutdlgg.cpp:188
+#, fuzzy
+msgid "Translators"
+msgstr "Traduções por "
+
+#: ../src/propgrid/propgrid.cpp:173
+msgid "True"
+msgstr ""
+
+#: ../src/common/fs_mem.cpp:227
+#, c-format
+msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!"
+msgstr ""
+"A Tentar remover o ficheiro '%s' da memória VFS, mas não foi carregado!"
+
+#: ../src/common/fmapbase.cpp:156
+msgid "Turkish (ISO-8859-9)"
+msgstr "Turco (ISO-8859-9)"
+
+#: ../src/generic/filectrlg.cpp:461
+msgid "Type"
+msgstr "Tipo"
+
+#: ../src/richtext/richtextfontpage.cpp:160
+#: ../src/richtext/richtextfontpage.cpp:162
+msgid "Type a font name."
+msgstr "Escreva o nome da fonte."
+
+#: ../src/richtext/richtextfontpage.cpp:175
+#: ../src/richtext/richtextfontpage.cpp:177
+msgid "Type a size in points."
+msgstr "Escreva um tamanho em pontos."
+
+#: ../src/msw/ole/automtn.cpp:665
+#, c-format
+msgid "Type mismatch in argument %u."
+msgstr ""
+
+#: ../src/common/xtixml.cpp:356 ../src/common/xtixml.cpp:509
+#: ../src/common/xtistrm.cpp:322
+msgid "Type must have enum - long conversion"
+msgstr "Tipo deve ter conversão enum - long"
+
+#: ../src/propgrid/propgridiface.cpp:382
+#, c-format
+msgid ""
+"Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT "
+"\"%s\"."
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:58
+msgid "UP"
+msgstr "CIMA"
+
+#: ../src/common/paper.cpp:134
+msgid "US Std Fanfold, 14 7/8 x 11 in"
+msgstr "US Std Fanfold, 14 7/8 x 11 pol."
+
+#: ../src/common/fmapbase.cpp:196
+msgid "US-ASCII"
+msgstr "US-ASCII"
+
+#: ../src/unix/fswatcher_inotify.cpp:109
+msgid "Unable to add inotify watch"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:136
+msgid "Unable to add kqueue watch"
+msgstr ""
+
+#: ../include/wx/msw/private/fswatcher.h:142
+msgid "Unable to associate handle with I/O completion port"
+msgstr ""
+
+#: ../include/wx/msw/private/fswatcher.h:125
+#, fuzzy
+msgid "Unable to close I/O completion port handle"
+msgstr "Falha ao fechar manuseador de ficheiro"
+
+#: ../src/unix/fswatcher_inotify.cpp:97
+#, fuzzy
+msgid "Unable to close inotify instance"
+msgstr "Falha ao fechar manuseador de ficheiro"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:74
+#, fuzzy, c-format
+msgid "Unable to close path '%s'"
+msgstr "Falha ao fechar o ficheiro de bloqueio '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:48
+#, fuzzy, c-format
+msgid "Unable to close the handle for '%s'"
+msgstr "Falha ao fechar manuseador de ficheiro"
+
+#: ../include/wx/msw/private/fswatcher.h:240
+#, fuzzy
+msgid "Unable to create I/O completion port"
+msgstr "Não foi possível criar TextEncodingConverter"
+
+#: ../src/msw/fswatcher.cpp:84
+#, fuzzy
+msgid "Unable to create IOCP worker thread"
+msgstr "Não foi possível criar TextEncodingConverter"
+
+#: ../src/unix/fswatcher_inotify.cpp:74
+#, fuzzy
+msgid "Unable to create inotify instance"
+msgstr "Não foi possível criar TextEncodingConverter"
+
+#: ../src/unix/fswatcher_kqueue.cpp:97
+#, fuzzy
+msgid "Unable to create kqueue instance"
+msgstr "Não foi possível criar TextEncodingConverter"
+
+#: ../include/wx/msw/private/fswatcher.h:229
+msgid "Unable to dequeue completion packet"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:185
+msgid "Unable to get events from kqueue"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1903
+msgid "Unable to handle native drag&drop data"
+msgstr ""
+
+#: ../src/gtk/app.cpp:439
+msgid "Unable to initialize GTK+, is DISPLAY set properly?"
+msgstr ""
+
+#: ../src/gtk/app.cpp:276
+#, fuzzy
+msgid "Unable to initialize Hildon program"
+msgstr "Falha ao inicializar o OpenGL"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:57
+#, fuzzy, c-format
+msgid "Unable to open path '%s'"
+msgstr "Falha na abertura do arquivo CHM '%s'."
+
+#: ../src/html/htmlwin.cpp:561
+#, c-format
+msgid "Unable to open requested HTML document: %s"
+msgstr "Não foi possível abrir documento HTML pretendido: %s"
+
+#: ../src/unix/sound.cpp:368
+msgid "Unable to play sound asynchronously."
+msgstr "Não foi possível reproduzir som assincronamente."
+
+#: ../include/wx/msw/private/fswatcher.h:207
+msgid "Unable to post completion status"
+msgstr ""
+
+#: ../src/unix/fswatcher_inotify.cpp:530
+#, fuzzy
+msgid "Unable to read from inotify descriptor"
+msgstr "não foi possível ler do descritor do ficheiro %d"
+
+#: ../src/unix/fswatcher_inotify.cpp:132
+msgid "Unable to remove inotify watch"
+msgstr ""
+
+#: ../src/unix/fswatcher_kqueue.cpp:153
+msgid "Unable to remove kqueue watch"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:168
+#, fuzzy, c-format
+msgid "Unable to set up watch for '%s'"
+msgstr "Falha ao tocar no ficheiro '%s'"
+
+#: ../src/msw/fswatcher.cpp:91
+msgid "Unable to start IOCP worker thread"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:201
+msgid "Undelete"
+msgstr "Recuperar"
+
+#: ../src/common/stockitem.cpp:202
+#, fuzzy
+msgid "Underline"
+msgstr "S&ublinhado"
+
+#: ../src/richtext/richtextfontpage.cpp:341 ../src/osx/carbon/fontdlg.cpp:556
+#: ../src/propgrid/advprops.cpp:655
+msgid "Underlined"
+msgstr "Sublinhado"
+
+#: ../src/common/stockitem.cpp:203 ../src/stc/stc_i18n.cpp:15
+#, fuzzy
+msgid "Undo"
+msgstr "&Desfazer"
+
+#: ../src/common/stockitem.cpp:265
+msgid "Undo last action"
+msgstr "Desfazer última acção"
+
+#: ../src/common/cmdline.cpp:864
+#, c-format
+msgid "Unexpected characters following option '%s'."
+msgstr "Caracteres inesperados a seguir à opção '%s'."
+
+#: ../src/unix/fswatcher_inotify.cpp:261
+#, c-format
+msgid "Unexpected event for \"%s\": no matching watch descriptor."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1024
+#, c-format
+msgid "Unexpected parameter '%s'"
+msgstr "Parâmetro inesperado '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:148
+msgid "Unexpectedly new I/O completion port was created"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:70
+#, fuzzy
+msgid "Ungraceful worker thread termination"
+msgstr "Não é possível esperar pela terminação da thread"
+
+#: ../src/richtext/richtextsymboldlg.cpp:459
+#: ../src/richtext/richtextsymboldlg.cpp:460
+#: ../src/richtext/richtextsymboldlg.cpp:461
+msgid "Unicode"
+msgstr "Unicode"
+
+#: ../src/common/fmapbase.cpp:185 ../src/common/fmapbase.cpp:191
+msgid "Unicode 16 bit (UTF-16)"
+msgstr "Unicode 16 bit (UTF-16)"
+
+#: ../src/common/fmapbase.cpp:190
+msgid "Unicode 16 bit Big Endian (UTF-16BE)"
+msgstr "Unicode 16 bit Big Endian (UTF-16BE)"
+
+#: ../src/common/fmapbase.cpp:186
+msgid "Unicode 16 bit Little Endian (UTF-16LE)"
+msgstr "Unicode 16 bit Little Endian (UTF-16LE)"
+
+#: ../src/common/fmapbase.cpp:187 ../src/common/fmapbase.cpp:193
+msgid "Unicode 32 bit (UTF-32)"
+msgstr "Unicode 32 bit (UTF-32)"
+
+#: ../src/common/fmapbase.cpp:192
+msgid "Unicode 32 bit Big Endian (UTF-32BE)"
+msgstr "Unicode 32 bit Big Endian (UTF-32BE)"
+
+#: ../src/common/fmapbase.cpp:188
+msgid "Unicode 32 bit Little Endian (UTF-32LE)"
+msgstr "Unicode 32 bit Little Endian (UTF-32LE)"
+
+#: ../src/common/fmapbase.cpp:182
+msgid "Unicode 7 bit (UTF-7)"
+msgstr "Unicode 7 bit (UTF-7)"
+
+#: ../src/common/fmapbase.cpp:183
+msgid "Unicode 8 bit (UTF-8)"
+msgstr "Unicode 8 bit (UTF-8)"
+
+#: ../src/common/stockitem.cpp:204
+#, fuzzy
+msgid "Unindent"
+msgstr "&Desindentar"
+
+#: ../src/richtext/richtextborderspage.cpp:373
+#: ../src/richtext/richtextborderspage.cpp:375
+msgid "Units for the bottom border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:278
+#: ../src/richtext/richtextmarginspage.cpp:280
+msgid "Units for the bottom margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:517
+#: ../src/richtext/richtextborderspage.cpp:519
+msgid "Units for the bottom outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:392
+#: ../src/richtext/richtextmarginspage.cpp:394
+msgid "Units for the bottom padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:664
+#: ../src/richtext/richtextsizepage.cpp:666
+#, fuzzy
+msgid "Units for the bottom position."
+msgstr "Não é possível esperar pela terminação da thread."
+
+#: ../src/richtext/richtextborderspage.cpp:283
+#: ../src/richtext/richtextborderspage.cpp:285
+msgid "Units for the left border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:205
+#: ../src/richtext/richtextmarginspage.cpp:207
+msgid "Units for the left margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:427
+#: ../src/richtext/richtextborderspage.cpp:429
+msgid "Units for the left outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:319
+#: ../src/richtext/richtextmarginspage.cpp:321
+msgid "Units for the left padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:559
+#: ../src/richtext/richtextsizepage.cpp:561
+#, fuzzy
+msgid "Units for the left position."
+msgstr "Não é possível esperar pela terminação da thread."
+
+#: ../src/richtext/richtextsizepage.cpp:485
+#: ../src/richtext/richtextsizepage.cpp:487
+#, fuzzy
+msgid "Units for the maximum object height."
+msgstr "O peso da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:458
+#: ../src/richtext/richtextsizepage.cpp:460
+#, fuzzy
+msgid "Units for the maximum object width."
+msgstr "O peso da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:431
+#: ../src/richtext/richtextsizepage.cpp:433
+#, fuzzy
+msgid "Units for the minimum object height."
+msgstr "O peso da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:404
+#: ../src/richtext/richtextsizepage.cpp:406
+#, fuzzy
+msgid "Units for the minimum object width."
+msgstr "O peso da fonte."
+
+#: ../src/richtext/richtextsizepage.cpp:377
+#: ../src/richtext/richtextsizepage.cpp:379
+msgid "Units for the object height."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:343
+#: ../src/richtext/richtextsizepage.cpp:345
+msgid "Units for the object width."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:313
+#: ../src/richtext/richtextborderspage.cpp:315
+msgid "Units for the right border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:230
+#: ../src/richtext/richtextmarginspage.cpp:232
+msgid "Units for the right margin."
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:457
+#: ../src/richtext/richtextborderspage.cpp:459
+msgid "Units for the right outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:344
+#: ../src/richtext/richtextmarginspage.cpp:346
+msgid "Units for the right padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:629
+#: ../src/richtext/richtextsizepage.cpp:631
+#, fuzzy
+msgid "Units for the right position."
+msgstr "Não é possível esperar pela terminação da thread."
+
+#: ../src/richtext/richtextborderspage.cpp:343
+#: ../src/richtext/richtextborderspage.cpp:345
+msgid "Units for the top border width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:253
+#: ../src/richtext/richtextmarginspage.cpp:255
+#, fuzzy
+msgid "Units for the top margin."
+msgstr "Não é possível esperar pela terminação da thread."
+
+#: ../src/richtext/richtextborderspage.cpp:487
+#: ../src/richtext/richtextborderspage.cpp:489
+msgid "Units for the top outline width."
+msgstr ""
+
+#: ../src/richtext/richtextmarginspage.cpp:367
+#: ../src/richtext/richtextmarginspage.cpp:369
+msgid "Units for the top padding."
+msgstr ""
+
+#: ../src/richtext/richtextsizepage.cpp:594
+#: ../src/richtext/richtextsizepage.cpp:596
+#, fuzzy
+msgid "Units for the top position."
+msgstr "Não é possível esperar pela terminação da thread."
+
+#: ../src/generic/progdlgg.cpp:382 ../src/generic/progdlgg.cpp:655
+msgid "Unknown"
+msgstr "Desconhecido"
+
+#: ../src/msw/dde.cpp:1177
+#, c-format
+msgid "Unknown DDE error %08x"
+msgstr "Erro DDE desconhecido %08x"
+
+#: ../src/common/xtistrm.cpp:414
+msgid "Unknown Object passed to GetObjectClassInfo"
+msgstr "Objecto desconhecido passado para GetObjectClassInfo"
+
+#: ../src/common/imagpng.cpp:614
+#, fuzzy, c-format
+msgid "Unknown PNG resolution unit %d"
+msgstr "Opção desconhecida '%s'"
+
+#: ../src/common/xtixml.cpp:327
+#, fuzzy, c-format
+msgid "Unknown Property %s"
+msgstr "Propriedade desconhecida %s"
+
+#: ../src/common/imagtiff.cpp:532
+#, c-format
+msgid "Unknown TIFF resolution unit %d ignored"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1978
+#, fuzzy
+msgid "Unknown data format"
+msgstr "erro no formato do dado"
+
+#: ../src/unix/dlunix.cpp:325
+msgid "Unknown dynamic library error"
+msgstr "Erro desconhecido de livraria dinâmica"
+
+#: ../src/common/fmapbase.cpp:810
+#, c-format
+msgid "Unknown encoding (%d)"
+msgstr "Codificação desconhecida (%d)"
+
+#: ../src/msw/ole/automtn.cpp:677
+#, fuzzy, c-format
+msgid "Unknown error %08x"
+msgstr "Erro DDE desconhecido %08x"
+
+#: ../src/msw/ole/automtn.cpp:636
+#, fuzzy
+msgid "Unknown exception"
+msgstr "Opção desconhecida '%s'"
+
+#: ../src/common/image.cpp:2701
+#, fuzzy
+msgid "Unknown image data format."
+msgstr "erro no formato do dado"
+
+#: ../src/common/cmdline.cpp:749
+#, c-format
+msgid "Unknown long option '%s'"
+msgstr "Opção longa desconhecida '%s'"
+
+#: ../src/msw/ole/automtn.cpp:620
+msgid "Unknown name or named argument."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:764 ../src/common/cmdline.cpp:786
+#, c-format
+msgid "Unknown option '%s'"
+msgstr "Opção desconhecida '%s'"
+
+#: ../src/common/mimecmn.cpp:230
+#, c-format
+msgid "Unmatched '{' in an entry for mime type %s."
+msgstr "Correspondência não encontrada de '{' numa entrada do tipo mime %s."
+
+#: ../src/common/cmdproc.cpp:262 ../src/common/cmdproc.cpp:288
+#: ../src/common/cmdproc.cpp:308
+msgid "Unnamed command"
+msgstr "Comando não nomeado"
+
+#: ../src/propgrid/propgrid.cpp:398
+#, fuzzy
+msgid "Unspecified"
+msgstr "Justificado"
+
+#: ../src/msw/clipbrd.cpp:271 ../src/msw/clipbrd.cpp:439
+msgid "Unsupported clipboard format."
+msgstr "Formato da área de transferência não suportado."
+
+#: ../src/common/appcmn.cpp:249
+#, c-format
+msgid "Unsupported theme '%s'."
+msgstr "Tema não suportado '%s'."
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:205
+msgid "Up"
+msgstr "Cima"
+
+#: ../src/richtext/richtextliststylepage.cpp:483
+#: ../src/richtext/richtextbulletspage.cpp:288
+msgid "Upper case letters"
+msgstr "Letras maiúsculas"
+
+#: ../src/richtext/richtextliststylepage.cpp:485
+#: ../src/richtext/richtextbulletspage.cpp:290
+msgid "Upper case roman numerals"
+msgstr "Números romanos em maiúsculas"
+
+#: ../src/common/cmdline.cpp:1155
+#, c-format
+msgid "Usage: %s"
+msgstr "Utilização: %s"
+
+#: ../src/richtext/richtextindentspage.cpp:169
+#: ../src/richtext/richtextindentspage.cpp:171
+#: ../src/richtext/richtextliststylepage.cpp:358
+#: ../src/richtext/richtextliststylepage.cpp:360
+msgid "Use the current alignment setting."
+msgstr "Utilizar a definição actual de alinhamento."
+
+#: ../src/osx/carbon/dataview.cpp:2658 ../src/osx/carbon/dataview.cpp:2723
+msgid "Valid pointer to native data view control does not exist"
+msgstr ""
+
+#: ../src/common/valtext.cpp:174
+msgid "Validation conflict"
+msgstr "Conflito de validação"
+
+#: ../src/propgrid/manager.cpp:238
+msgid "Value"
+msgstr ""
+
+#: ../src/propgrid/props.cpp:384
+#, c-format
+msgid "Value must be %s or higher."
+msgstr ""
+
+#: ../src/propgrid/props.cpp:411
+#, c-format
+msgid "Value must be %s or less."
+msgstr ""
+
+#: ../src/propgrid/props.cpp:388 ../src/propgrid/props.cpp:415
+#, fuzzy, c-format
+msgid "Value must be between %s and %s."
+msgstr "Introduza um número de página entre %d e %d:"
+
+#: ../src/generic/aboutdlgg.cpp:128
+#, fuzzy
+msgid "Version "
+msgstr " Versão "
+
+#: ../src/richtext/richtextsizepage.cpp:291
+#: ../src/richtext/richtextsizepage.cpp:293
+#, fuzzy
+msgid "Vertical alignment."
+msgstr "Não foi possível inicia a impressão."
+
+#: ../src/generic/filedlgg.cpp:216
+msgid "View files as a detailed view"
+msgstr "Ver ficheiros como uma vista detalhada"
+
+#: ../src/generic/filedlgg.cpp:214
+msgid "View files as a list view"
+msgstr "Ver ficheiros como uma vista em lista"
+
+#: ../src/common/docview.cpp:1952
+msgid "Views"
+msgstr "Vistas"
+
+#: ../src/common/accelcmn.cpp:108
+msgid "WINDOWS_LEFT"
+msgstr "WINDOWS_LEFT"
+
+#: ../src/common/accelcmn.cpp:110
+msgid "WINDOWS_MENU"
+msgstr "WINDOWS_MENU"
+
+#: ../src/common/accelcmn.cpp:109
+msgid "WINDOWS_RIGHT"
+msgstr "WINDOWS_RIGHT"
+
+#: ../src/unix/epolldispatcher.cpp:213
+#, fuzzy, c-format
+msgid "Waiting for IO on epoll descriptor %d failed"
+msgstr "Falha na espera do fim do subprocesso"
+
+#: ../src/common/log.cpp:227
+msgid "Warning: "
+msgstr "Aviso: "
+
+#: ../src/propgrid/advprops.cpp:651
+#, fuzzy
+msgid "Weight"
+msgstr "&Peso:"
+
+#: ../src/common/fmapbase.cpp:148
+msgid "Western European (ISO-8859-1)"
+msgstr "Europa Ocidental (ISO-8859-1)"
+
+#: ../src/common/fmapbase.cpp:162
+msgid "Western European with Euro (ISO-8859-15)"
+msgstr "Europa Ocidental com Euro (ISO-8859-15)"
+
+#: ../src/generic/fontdlgg.cpp:446 ../src/generic/fontdlgg.cpp:448
+msgid "Whether the font is underlined."
+msgstr "Se a fonte está sublinhada."
+
+#: ../src/generic/fdrepdlg.cpp:144
+msgid "Whole word"
+msgstr "Palavra completa"
+
+#: ../src/html/helpwnd.cpp:547
+msgid "Whole words only"
+msgstr "Apenas palavras completas"
+
+#: ../src/univ/themes/win32.cpp:1102
+msgid "Win32 theme"
+msgstr "Tema Win32"
+
+#: ../src/msw/utils.cpp:1220
+msgid "Win32s on Windows 3.1"
+msgstr "Win32s em Windows 3.1"
+
+#: ../src/msw/utils.cpp:1270
+#, fuzzy
+msgid "Windows 2000"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1302
+#, fuzzy
+msgid "Windows 7"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1234
+msgid "Windows 95"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1230
+msgid "Windows 95 OSR2"
+msgstr "Windows 95 OSR2"
+
+#: ../src/msw/utils.cpp:1245
+msgid "Windows 98"
+msgstr "Windows 98"
+
+#: ../src/msw/utils.cpp:1241
+msgid "Windows 98 SE"
+msgstr "Windows 98 SE"
+
+#: ../src/msw/utils.cpp:1252
+#, c-format
+msgid "Windows 9x (%d.%d)"
+msgstr "Windows 9x (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:177
+msgid "Windows Arabic (CP 1256)"
+msgstr "Árabe de Windows (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:178
+msgid "Windows Baltic (CP 1257)"
+msgstr "Báltico de Windows (CP 1257)"
+
+#: ../src/msw/utils.cpp:1214
+#, c-format
+msgid "Windows CE (%d.%d)"
+msgstr "Windows CE (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:171
+msgid "Windows Central European (CP 1250)"
+msgstr "Europeu Central de Windows (CP 1250)"
+
+#: ../src/common/fmapbase.cpp:168
+#, fuzzy
+msgid "Windows Chinese Simplified (CP 936) or GB-2312"
+msgstr "Chinês Simplificado de Windows (CP 936)"
+
+#: ../src/common/fmapbase.cpp:170
+#, fuzzy
+msgid "Windows Chinese Traditional (CP 950) or Big-5"
+msgstr "Chinês Tradicional de Windows (CP 950)"
+
+#: ../src/common/fmapbase.cpp:172
+msgid "Windows Cyrillic (CP 1251)"
+msgstr "Cirílico de Windows (CP 1251)"
+
+#: ../src/common/fmapbase.cpp:174
+msgid "Windows Greek (CP 1253)"
+msgstr "Grêgo de Windows (CP 1253)"
+
+#: ../src/common/fmapbase.cpp:176
+msgid "Windows Hebrew (CP 1255)"
+msgstr "Hebreu de Windows (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:167
+#, fuzzy
+msgid "Windows Japanese (CP 932) or Shift-JIS"
+msgstr "Japonês de Windows (CP 932)"
+
+#: ../src/common/fmapbase.cpp:180
+#, fuzzy
+msgid "Windows Johab (CP 1361)"
+msgstr "Árabe de Windows (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:169
+msgid "Windows Korean (CP 949)"
+msgstr "Coreano de Windows (CP 949)"
+
+#: ../src/msw/utils.cpp:1249
+msgid "Windows ME"
+msgstr "Windows ME"
+
+#: ../src/msw/utils.cpp:1310
+#, fuzzy, c-format
+msgid "Windows NT %lu.%lu"
+msgstr "Windows NT %lu.%lu (build %lu"
+
+#: ../src/msw/utils.cpp:1279
+#, fuzzy
+msgid "Windows Server 2003"
+msgstr "Windows Server 2003 (build %lu"
+
+#: ../src/msw/utils.cpp:1295
+#, fuzzy
+msgid "Windows Server 2008"
+msgstr "Windows Server 2003 (build %lu"
+
+#: ../src/msw/utils.cpp:1301
+#, fuzzy
+msgid "Windows Server 2008 R2"
+msgstr "Windows Server 2003 (build %lu"
+
+#: ../src/common/fmapbase.cpp:166
+msgid "Windows Thai (CP 874)"
+msgstr "Tailandês de Windows (CP 874)"
+
+#: ../src/common/fmapbase.cpp:175
+msgid "Windows Turkish (CP 1254)"
+msgstr "Turco de Windows (CP 1254)"
+
+#: ../src/common/fmapbase.cpp:179
+#, fuzzy
+msgid "Windows Vietnamese (CP 1258)"
+msgstr "Grêgo de Windows (CP 1253)"
+
+#: ../src/msw/utils.cpp:1296
+#, fuzzy
+msgid "Windows Vista"
+msgstr "Windows 95"
+
+#: ../src/common/fmapbase.cpp:173
+msgid "Windows Western European (CP 1252)"
+msgstr "Europeu Ocidental de Windows (CP 1252)"
+
+#: ../src/msw/utils.cpp:1285
+#, fuzzy
+msgid "Windows XP"
+msgstr "Windows 95"
+
+#: ../src/common/fmapbase.cpp:181
+msgid "Windows/DOS OEM (CP 437)"
+msgstr "Windows/DOS OEM (CP 437)"
+
+#: ../src/common/fmapbase.cpp:165
+#, fuzzy
+msgid "Windows/DOS OEM Cyrillic (CP 866)"
+msgstr "Cirílico de Windows (CP 1251)"
+
+#: ../src/common/ffile.cpp:148
+#, c-format
+msgid "Write error on file '%s'"
+msgstr "Erro de escrita no ficheiro '%s'"
+
+#: ../src/xml/xml.cpp:844
+#, c-format
+msgid "XML parsing error: '%s' at line %d"
+msgstr "XML erro de verificação gramatical: '%s' na linha %d"
+
+#: ../src/common/xpmdecod.cpp:796
+msgid "XPM: Malformed pixel data!"
+msgstr "XPM: Dados de pixeis mal formados!"
+
+#: ../src/common/xpmdecod.cpp:705
+#, c-format
+msgid "XPM: incorrect colour description in line %d"
+msgstr "XPM: descrição incorrecta de cor na linha %d"
+
+#: ../src/common/xpmdecod.cpp:680
+msgid "XPM: incorrect header format!"
+msgstr "XPM: formato de cabeçalho incorrecto!"
+
+#: ../src/common/xpmdecod.cpp:716 ../src/common/xpmdecod.cpp:725
+#, c-format
+msgid "XPM: malformed colour definition '%s' at line %d!"
+msgstr "XPM: definição de cor '%s' mal formada na linha %d!"
+
+#: ../src/common/xpmdecod.cpp:755
+#, fuzzy
+msgid "XPM: no colors left to use for mask!"
+msgstr "XPM: formato de cabeçalho incorrecto!"
+
+#: ../src/common/xpmdecod.cpp:782
+#, c-format
+msgid "XPM: truncated image data at line %d!"
+msgstr "XPM: dados de imagem truncados na linha %d!"
+
+#: ../include/wx/msgdlg.h:271 ../src/common/stockitem.cpp:206
+#: ../src/motif/msgdlg.cpp:196
+msgid "Yes"
+msgstr "Sim"
+
+#: ../src/osx/carbon/overlay.cpp:155
+msgid "You cannot Clear an overlay that is not inited"
+msgstr "Não pode Limpar uma sobreposição que não está inicializada"
+
+#: ../src/osx/carbon/overlay.cpp:107 ../src/dfb/overlay.cpp:61
+msgid "You cannot Init an overlay twice"
+msgstr "Não pode Inicializar uma sobreposição duas vezes"
+
+#: ../src/generic/dirdlgg.cpp:316
+msgid "You cannot add a new directory to this section."
+msgstr "Não pode adicionar um novo directório a esta secção."
+
+#: ../src/propgrid/propgrid.cpp:3258
+msgid "You have entered invalid value. Press ESC to cancel editing."
+msgstr ""
+
+#: ../src/common/stockitem.cpp:209
+msgid "Zoom &In"
+msgstr "Ampl&iar"
+
+#: ../src/common/stockitem.cpp:210
+msgid "Zoom &Out"
+msgstr "Red&uzir"
+
+#: ../src/common/stockitem.cpp:209 ../src/common/prntbase.cpp:1564
+#, fuzzy
+msgid "Zoom In"
+msgstr "Ampl&iar"
+
+#: ../src/common/stockitem.cpp:210 ../src/common/prntbase.cpp:1550
+#, fuzzy
+msgid "Zoom Out"
+msgstr "Red&uzir"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to &Fit"
+msgstr "Ampliar para &Caber"
+
+#: ../src/common/stockitem.cpp:208
+#, fuzzy
+msgid "Zoom to Fit"
+msgstr "Ampliar para &Caber"
+
+#: ../src/msw/dde.cpp:1144
+msgid "a DDEML application has created a prolonged race condition."
+msgstr "uma aplicação DDEML criou uma condição de corrida prolongada."
+
+#: ../src/msw/dde.cpp:1132
+msgid ""
+"a DDEML function was called without first calling the DdeInitialize "
+"function,\n"
+"or an invalid instance identifier\n"
+"was passed to a DDEML function."
+msgstr ""
+"uma função DDEML foi chamada sem chamar primeiro a função DdeInitialize,\n"
+"ou um identificador inválido instância\n"
+"foi passado a uma função DDEML."
+
+#: ../src/msw/dde.cpp:1150
+msgid "a client's attempt to establish a conversation has failed."
+msgstr ""
+"a tentativa por parte de um cliente de estabelecer uma conversação falhou."
+
+#: ../src/msw/dde.cpp:1147
+msgid "a memory allocation failed."
+msgstr "falhou uma alocação de memória."
+
+#: ../src/msw/dde.cpp:1141
+msgid "a parameter failed to be validated by the DDEML."
+msgstr "falhou a validação de um parâmetro pelo DDEML."
+
+#: ../src/msw/dde.cpp:1123
+msgid "a request for a synchronous advise transaction has timed out."
+msgstr ""
+"um pedido para uma transacção de conselho síncrona excedeu o tempo limite."
+
+#: ../src/msw/dde.cpp:1129
+msgid "a request for a synchronous data transaction has timed out."
+msgstr ""
+"um pedido para uma transacção de dados síncrona excedeu o tempo limite."
+
+#: ../src/msw/dde.cpp:1138
+msgid "a request for a synchronous execute transaction has timed out."
+msgstr ""
+"um pedido para uma transacção de execução síncrona excedeu o tempo limite."
+
+#: ../src/msw/dde.cpp:1156
+msgid "a request for a synchronous poke transaction has timed out."
+msgstr ""
+"um pedido para uma transacção de 'poke' síncrona excedeu o tempo limite."
+
+#: ../src/msw/dde.cpp:1171
+msgid "a request to end an advise transaction has timed out."
+msgstr ""
+"um pedido de término de uma transacção de conselho excedeu o tempo limite."
+
+#: ../src/msw/dde.cpp:1165
+msgid ""
+"a server-side transaction was attempted on a conversation\n"
+"that was terminated by the client, or the server\n"
+"terminated before completing a transaction."
+msgstr ""
+"foi tentada uma transacção do lado do servidor, numa conversação\n"
+"que foi terminada pelo cliente, ou o servidor\n"
+"terminou antes do fim da transacção."
+
+#: ../src/msw/dde.cpp:1153
+msgid "a transaction failed."
+msgstr "falhou uma transacção."
+
+#: ../src/common/accelcmn.cpp:184
+msgid "alt"
+msgstr "alt"
+
+#: ../src/msw/dde.cpp:1135
+msgid ""
+"an application initialized as APPCLASS_MONITOR has\n"
+"attempted to perform a DDE transaction,\n"
+"or an application initialized as APPCMD_CLIENTONLY has \n"
+"attempted to perform server transactions."
+msgstr ""
+"uma aplicação inicializada como APPCLASS_MONITOR tem\n"
+"tentado efectuar uma transacção DDE,\n"
+"ou uma aplicação inicaializada como APPCMD_CLIENTONLY tem\n"
+"tentado realizar transacções de servidor."
+
+#: ../src/msw/dde.cpp:1159
+msgid "an internal call to the PostMessage function has failed. "
+msgstr "falha numa chamada interna à função PostMessage. "
+
+#: ../src/msw/dde.cpp:1168
+msgid "an internal error has occurred in the DDEML."
+msgstr "ocorreu um erro interno no DDEML."
+
+#: ../src/msw/dde.cpp:1174
+msgid ""
+"an invalid transaction identifier was passed to a DDEML function.\n"
+"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n"
+"the transaction identifier for that callback is no longer valid."
+msgstr ""
+"um identificador inválido de transacção foi passado a uma função DDEML.\n"
+"Uma vez que a aplicação retornou de uma chamada de um XTYP_XACT_COMPLETE,\n"
+"o identificador de transacção dessa chamada deixou de ser válido."
+
+#: ../src/common/zipstrm.cpp:1272
+msgid "assuming this is a multi-part zip concatenated"
+msgstr "a assumir que este é um ficheiro zip multi-partes concatenado"
+
+#: ../src/common/fileconf.cpp:1882
+#, c-format
+msgid "attempt to change immutable key '%s' ignored."
+msgstr "tentativa de alteração da chave imutável '%s' ignorada."
+
+#: ../src/html/chm.cpp:329
+msgid "bad arguments to library function"
+msgstr "argumentos inválidos a uma função da livraria"
+
+#: ../src/html/chm.cpp:341
+msgid "bad signature"
+msgstr "má assinatura"
+
+#: ../src/common/zipstrm.cpp:1715
+msgid "bad zipfile offset to entry"
+msgstr "mau offset de entrada de ficheiro zip"
+
+#: ../src/common/ftp.cpp:405
+msgid "binary"
+msgstr "binário"
+
+#: ../src/common/fontcmn.cpp:978
+msgid "bold"
+msgstr "destacado"
+
+#: ../src/os2/iniconf.cpp:463
+msgid "buffer is too small for Windows directory."
+msgstr "buffer pequeno demais para directório Windows."
+
+#: ../src/msw/utils.cpp:1316
+#, fuzzy, c-format
+msgid "build %lu"
+msgstr "Windows XP (build %lu"
+
+#: ../src/common/ffile.cpp:79
+#, c-format
+msgid "can't close file '%s'"
+msgstr "impossível fechar o ficheiro '%s'"
+
+#: ../src/common/file.cpp:278
+#, c-format
+msgid "can't close file descriptor %d"
+msgstr "impossível fechar o descritor do ficheiro %d"
+
+#: ../src/common/file.cpp:604
+#, c-format
+msgid "can't commit changes to file '%s'"
+msgstr "não é possível garantir as alterações ao ficheiro '%s'"
+
+#: ../src/common/file.cpp:212
+#, c-format
+msgid "can't create file '%s'"
+msgstr "impossível criar o ficheiro '%s'"
+
+#: ../src/common/fileconf.cpp:1176
+#, c-format
+msgid "can't delete user configuration file '%s'"
+msgstr "não foi possível apagar o ficheiro de configuração do utilizador '%s'"
+
+#: ../src/common/file.cpp:511
+#, c-format
+msgid "can't determine if the end of file is reached on descriptor %d"
+msgstr ""
+"impossível determinar se o fim do ficheiro foi alcançado no descritor %d"
+
+#: ../src/msdos/utilsdos.cpp:310 ../src/msdos/utilsdos.cpp:475
+#, c-format
+msgid "can't execute '%s'"
+msgstr "impossível executar '%s'"
+
+#: ../src/common/zipstrm.cpp:1490
+msgid "can't find central directory in zip"
+msgstr "não foi possível localizar o directório central no zip"
+
+#: ../src/common/file.cpp:481
+#, c-format
+msgid "can't find length of file on file descriptor %d"
+msgstr ""
+"Não foi possível encontrar o comprimento do ficheiro no descritor do "
+"ficheiro %d"
+
+#: ../src/msw/utils.cpp:373
+msgid "can't find user's HOME, using current directory."
+msgstr ""
+"Não foi possível localizar a pasta pessoal do utilizador, a utilizar o "
+"directório actual."
+
+#: ../src/common/file.cpp:382
+#, c-format
+msgid "can't flush file descriptor %d"
+msgstr "Não foi possível escoar o descritor do ficheiro %d"
+
+#: ../src/common/file.cpp:438 ../src/msw/wince/filefnwce.cpp:204
+#, c-format
+msgid "can't get seek position on file descriptor %d"
+msgstr "Não foi possível obter posição de pesquisa no descritor do ficheiro %d"
+
+#: ../src/common/fontmap.cpp:325
+msgid "can't load any font, aborting"
+msgstr "não foi possível carregar nenhuma fonte, a abortar"
+
+#: ../src/common/file.cpp:264 ../src/common/ffile.cpp:63
+#, c-format
+msgid "can't open file '%s'"
+msgstr "impossível abrir ficheiro '%s'"
+
+#: ../src/common/fileconf.cpp:351
+#, c-format
+msgid "can't open global configuration file '%s'."
+msgstr "não foi possível abrir o ficheiro '%s' global de configuração."
+
+#: ../src/common/fileconf.cpp:367
+#, c-format
+msgid "can't open user configuration file '%s'."
+msgstr "não foi possível abrir o ficheiro '%s' de configuração do utilizador."
+
+#: ../src/common/fileconf.cpp:1017
+msgid "can't open user configuration file."
+msgstr "não foi possível abrir o ficheiro de configuração do utilizador."
+
+#: ../src/common/zipstrm.cpp:527
+msgid "can't re-initialize zlib deflate stream"
+msgstr "não foi possível re-inicializar o 'zlib deflate stream'"
+
+#: ../src/common/zipstrm.cpp:552
+msgid "can't re-initialize zlib inflate stream"
+msgstr "não foi possível re-inicializar o 'zlib inflate stream'"
+
+#: ../src/common/file.cpp:334
+#, c-format
+msgid "can't read from file descriptor %d"
+msgstr "não foi possível ler do descritor do ficheiro %d"
+
+#: ../src/common/file.cpp:599
+#, c-format
+msgid "can't remove file '%s'"
+msgstr "impossível remover ficheiro '%s'"
+
+#: ../src/common/file.cpp:616
+#, c-format
+msgid "can't remove temporary file '%s'"
+msgstr "Não foi possível remover ficheiro temporário '%s'"
+
+#: ../src/common/file.cpp:424 ../src/msw/wince/filefnwce.cpp:190
+#, c-format
+msgid "can't seek on file descriptor %d"
+msgstr "Não foi possível pesquisar no descritor de ficheiro %d"
+
+#: ../src/common/textfile.cpp:299
+#, c-format
+msgid "can't write buffer '%s' to disk."
+msgstr "Não foi possível escrever o buffer '%s' para o disco."
+
+#: ../src/common/file.cpp:350
+#, c-format
+msgid "can't write to file descriptor %d"
+msgstr "Não foi possível escrever no descritor de ficheiro %d"
+
+#: ../src/common/fileconf.cpp:1031
+msgid "can't write user configuration file."
+msgstr "Não foi possível gravar o ficheiro de configuração do utilizador."
+
+#: ../src/html/chm.cpp:345
+msgid "checksum error"
+msgstr "erro de checksum"
+
+#: ../src/common/tarstrm.cpp:820
+msgid "checksum failure reading tar header block"
+msgstr "falha de checksum a ler bloco de cabeçalho tar"
+
+#: ../src/richtext/richtextborderspage.cpp:280
+#: ../src/richtext/richtextborderspage.cpp:310
+#: ../src/richtext/richtextborderspage.cpp:340
+#: ../src/richtext/richtextborderspage.cpp:370
+#: ../src/richtext/richtextborderspage.cpp:424
+#: ../src/richtext/richtextborderspage.cpp:454
+#: ../src/richtext/richtextborderspage.cpp:484
+#: ../src/richtext/richtextborderspage.cpp:514
+#: ../src/richtext/richtextmarginspage.cpp:202
+#: ../src/richtext/richtextmarginspage.cpp:227
+#: ../src/richtext/richtextmarginspage.cpp:250
+#: ../src/richtext/richtextmarginspage.cpp:275
+#: ../src/richtext/richtextmarginspage.cpp:316
+#: ../src/richtext/richtextmarginspage.cpp:341
+#: ../src/richtext/richtextmarginspage.cpp:364
+#: ../src/richtext/richtextmarginspage.cpp:389
+#: ../src/richtext/richtextsizepage.cpp:339
+#: ../src/richtext/richtextsizepage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:400
+#: ../src/richtext/richtextsizepage.cpp:427
+#: ../src/richtext/richtextsizepage.cpp:454
+#: ../src/richtext/richtextsizepage.cpp:481
+#: ../src/richtext/richtextsizepage.cpp:555
+#: ../src/richtext/richtextsizepage.cpp:590
+#: ../src/richtext/richtextsizepage.cpp:625
+#: ../src/richtext/richtextsizepage.cpp:660
+msgid "cm"
+msgstr ""
+
+#: ../src/html/chm.cpp:347
+msgid "compression error"
+msgstr "erro de compressão"
+
+#: ../src/common/regex.cpp:239
+msgid "conversion to 8-bit encoding failed"
+msgstr "falhou a conversão para codificação de 8-bits"
+
+#: ../src/common/accelcmn.cpp:182
+msgid "ctrl"
+msgstr "ctrl"
+
+#: ../src/common/cmdline.cpp:1323
+msgid "date"
+msgstr "data"
+
+#: ../src/html/chm.cpp:349
+msgid "decompression error"
+msgstr "erro de descompressão"
+
+#: ../src/richtext/richtextstyles.cpp:780 ../src/common/fmapbase.cpp:820
+msgid "default"
+msgstr "pré-definição"
+
+#: ../src/common/cmdline.cpp:1319
+msgid "double"
+msgstr ""
+
+#: ../src/common/debugrpt.cpp:543
+msgid "dump of the process state (binary)"
+msgstr "dump do estado do processo (binário)"
+
+#: ../src/common/datetimefmt.cpp:1936
+msgid "eighteenth"
+msgstr "décimo oitavo"
+
+#: ../src/common/datetimefmt.cpp:1926
+msgid "eighth"
+msgstr "oitavo"
+
+#: ../src/common/datetimefmt.cpp:1929
+msgid "eleventh"
+msgstr "décimo primeiro"
+
+#: ../src/common/fileconf.cpp:1868
+#, c-format
+msgid "entry '%s' appears more than once in group '%s'"
+msgstr "a entrada '%s' aparece mais do uma vez no grupo '%s'"
+
+#: ../src/html/chm.cpp:343
+msgid "error in data format"
+msgstr "erro no formato do dado"
+
+#: ../src/msdos/utilsdos.cpp:413
+#, c-format
+msgid "error opening '%s'"
+msgstr "erro ao abrir '%s'"
+
+#: ../src/html/chm.cpp:331
+msgid "error opening file"
+msgstr "erro ao abrir ficheiro"
+
+#: ../src/common/zipstrm.cpp:1576
+msgid "error reading zip central directory"
+msgstr "erro a ler directório central de zip"
+
+#: ../src/common/zipstrm.cpp:1667
+msgid "error reading zip local header"
+msgstr "erro ao ler cabeçalho local de zip"
+
+#: ../src/common/zipstrm.cpp:2396
+#, c-format
+msgid "error writing zip entry '%s': bad crc or length"
+msgstr "erro ao escrever entrada zip '%s': mau comprimento ou crc"
+
+#: ../src/common/ffile.cpp:170
+#, c-format
+msgid "failed to flush the file '%s'"
+msgstr "Falha a escoar o ficheiro '%s'"
+
+#: ../src/common/datetimefmt.cpp:1933
+msgid "fifteenth"
+msgstr "décimo quinto"
+
+#: ../src/common/datetimefmt.cpp:1923
+msgid "fifth"
+msgstr "quinto"
+
+#: ../src/common/fileconf.cpp:610
+#, c-format
+msgid "file '%s', line %d: '%s' ignored after group header."
+msgstr "ficheiro '%s', linha %d: '%s' ignorado após cabeçalho de grupo."
+
+#: ../src/common/fileconf.cpp:639
+#, c-format
+msgid "file '%s', line %d: '=' expected."
+msgstr "ficheiro '%s', linha %d: '=' esperado."
+
+#: ../src/common/fileconf.cpp:662
+#, c-format
+msgid "file '%s', line %d: key '%s' was first found at line %d."
+msgstr ""
+"ficheiro '%s', linha %d: chave '%s' foi inicialmente encontrada na linha %d."
+
+#: ../src/common/fileconf.cpp:652
+#, c-format
+msgid "file '%s', line %d: value for immutable key '%s' ignored."
+msgstr "ficheiro '%s', linha %d: valor para chave imutável '%s' ignorado."
+
+#: ../src/common/fileconf.cpp:574
+#, c-format
+msgid "file '%s': unexpected character %c at line %d."
+msgstr "ficheiro '%s': caracter inesperado %c na linha %d."
+
+#: ../src/richtext/richtextbuffer.cpp:8358
+msgid "files"
+msgstr "ficheiros"
+
+#: ../src/common/datetimefmt.cpp:1919
+msgid "first"
+msgstr "primeiro"
+
+#: ../src/html/helpwnd.cpp:1265
+msgid "font size"
+msgstr "tamanho da fonte"
+
+#: ../src/common/datetimefmt.cpp:1932
+msgid "fourteenth"
+msgstr "décimo quarto"
+
+#: ../src/common/datetimefmt.cpp:1922
+msgid "fourth"
+msgstr "quarto"
+
+#: ../src/common/appbase.cpp:695
+msgid "generate verbose log messages"
+msgstr "gerar mensagens de registo verbosas"
+
+#: ../src/richtext/richtextbuffer.cpp:12212
+#: ../src/richtext/richtextbuffer.cpp:12322
+msgid "image"
+msgstr "imagem"
+
+#: ../src/common/tarstrm.cpp:796
+msgid "incomplete header block in tar"
+msgstr "bloco de cabeçalho incompleto no tar"
+
+#: ../src/common/xtixml.cpp:489
+msgid "incorrect event handler string, missing dot"
+msgstr ""
+"cadeia de caracteres de manuseamento de eventos incorrecta, falta um ponto"
+
+#: ../src/common/tarstrm.cpp:1381
+msgid "incorrect size given for tar entry"
+msgstr "tamanho incorrecto dado a entrada do tar"
+
+#: ../src/common/tarstrm.cpp:993
+msgid "invalid data in extended tar header"
+msgstr "dados inválidos no cabeçalho tar estendido"
+
+#: ../src/generic/logg.cpp:1050
+msgid "invalid message box return value"
+msgstr "valor de retorno de caixa de diálogo inválido"
+
+#: ../src/common/zipstrm.cpp:1445
+msgid "invalid zip file"
+msgstr "ficheiro zip inválido"
+
+#: ../src/common/fontcmn.cpp:983
+msgid "italic"
+msgstr "itálico"
+
+#: ../src/common/fontcmn.cpp:973
+msgid "light"
+msgstr "leve"
+
+#: ../src/common/intl.cpp:293
+#, c-format
+msgid "locale '%s' cannot be set."
+msgstr "localização '%s' não pode ser definida."
+
+#: ../src/common/datetimefmt.cpp:2092
+msgid "midnight"
+msgstr "meia noite"
+
+#: ../src/common/datetimefmt.cpp:1937
+msgid "nineteenth"
+msgstr "décimo nono"
+
+#: ../src/common/datetimefmt.cpp:1927
+msgid "ninth"
+msgstr "nono"
+
+#: ../src/msw/dde.cpp:1119
+msgid "no DDE error."
+msgstr "sem erro DDE."
+
+#: ../src/html/chm.cpp:327
+msgid "no error"
+msgstr "sem erro"
+
+#: ../src/dfb/fontmgr.cpp:174
+#, c-format
+msgid "no fonts found in %s, using builtin font"
+msgstr ""
+
+#: ../src/html/helpdata.cpp:655
+msgid "noname"
+msgstr "sem nome"
+
+#: ../src/common/datetimefmt.cpp:2091
+msgid "noon"
+msgstr "meio-dia"
+
+#: ../src/richtext/richtextstyles.cpp:779
+#, fuzzy
+msgid "normal"
+msgstr "Normal"
+
+#: ../src/gtk/print.cpp:1218 ../src/gtk/print.cpp:1323
+msgid "not implemented"
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1315
+msgid "num"
+msgstr "num"
+
+#: ../src/common/xtixml.cpp:259
+msgid "objects cannot have XML Text Nodes"
+msgstr "os objectos não podem ter TextNodes XML"
+
+#: ../src/html/chm.cpp:339
+msgid "out of memory"
+msgstr "memória esgotada"
+
+#: ../src/richtext/richtextsizepage.cpp:340
+#: ../src/richtext/richtextsizepage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:401
+#: ../src/richtext/richtextsizepage.cpp:428
+#: ../src/richtext/richtextsizepage.cpp:455
+#: ../src/richtext/richtextsizepage.cpp:482
+#: ../src/richtext/richtextsizepage.cpp:556
+#: ../src/richtext/richtextsizepage.cpp:591
+#: ../src/richtext/richtextsizepage.cpp:626
+#: ../src/richtext/richtextsizepage.cpp:661
+msgid "percent"
+msgstr ""
+
+#: ../src/common/debugrpt.cpp:519
+msgid "process context description"
+msgstr "descrição de contexto do processo"
+
+#: ../src/richtext/richtextfontpage.cpp:186
+#: ../src/richtext/richtextfontpage.cpp:189
+msgid "pt"
+msgstr ""
+
+#: ../src/richtext/richtextfontpage.cpp:187
+#: ../src/richtext/richtextborderspage.cpp:279
+#: ../src/richtext/richtextborderspage.cpp:281
+#: ../src/richtext/richtextborderspage.cpp:282
+#: ../src/richtext/richtextborderspage.cpp:309
+#: ../src/richtext/richtextborderspage.cpp:311
+#: ../src/richtext/richtextborderspage.cpp:312
+#: ../src/richtext/richtextborderspage.cpp:339
+#: ../src/richtext/richtextborderspage.cpp:341
+#: ../src/richtext/richtextborderspage.cpp:342
+#: ../src/richtext/richtextborderspage.cpp:369
+#: ../src/richtext/richtextborderspage.cpp:371
+#: ../src/richtext/richtextborderspage.cpp:372
+#: ../src/richtext/richtextborderspage.cpp:423
+#: ../src/richtext/richtextborderspage.cpp:425
+#: ../src/richtext/richtextborderspage.cpp:426
+#: ../src/richtext/richtextborderspage.cpp:453
+#: ../src/richtext/richtextborderspage.cpp:455
+#: ../src/richtext/richtextborderspage.cpp:456
+#: ../src/richtext/richtextborderspage.cpp:483
+#: ../src/richtext/richtextborderspage.cpp:485
+#: ../src/richtext/richtextborderspage.cpp:486
+#: ../src/richtext/richtextborderspage.cpp:513
+#: ../src/richtext/richtextborderspage.cpp:515
+#: ../src/richtext/richtextborderspage.cpp:516
+#: ../src/richtext/richtextmarginspage.cpp:201
+#: ../src/richtext/richtextmarginspage.cpp:203
+#: ../src/richtext/richtextmarginspage.cpp:204
+#: ../src/richtext/richtextmarginspage.cpp:226
+#: ../src/richtext/richtextmarginspage.cpp:228
+#: ../src/richtext/richtextmarginspage.cpp:229
+#: ../src/richtext/richtextmarginspage.cpp:249
+#: ../src/richtext/richtextmarginspage.cpp:251
+#: ../src/richtext/richtextmarginspage.cpp:252
+#: ../src/richtext/richtextmarginspage.cpp:274
+#: ../src/richtext/richtextmarginspage.cpp:276
+#: ../src/richtext/richtextmarginspage.cpp:277
+#: ../src/richtext/richtextmarginspage.cpp:315
+#: ../src/richtext/richtextmarginspage.cpp:317
+#: ../src/richtext/richtextmarginspage.cpp:318
+#: ../src/richtext/richtextmarginspage.cpp:340
+#: ../src/richtext/richtextmarginspage.cpp:342
+#: ../src/richtext/richtextmarginspage.cpp:343
+#: ../src/richtext/richtextmarginspage.cpp:363
+#: ../src/richtext/richtextmarginspage.cpp:365
+#: ../src/richtext/richtextmarginspage.cpp:366
+#: ../src/richtext/richtextmarginspage.cpp:388
+#: ../src/richtext/richtextmarginspage.cpp:390
+#: ../src/richtext/richtextmarginspage.cpp:391
+#: ../src/richtext/richtextsizepage.cpp:338
+#: ../src/richtext/richtextsizepage.cpp:341
+#: ../src/richtext/richtextsizepage.cpp:342
+#: ../src/richtext/richtextsizepage.cpp:372
+#: ../src/richtext/richtextsizepage.cpp:375
+#: ../src/richtext/richtextsizepage.cpp:376
+#: ../src/richtext/richtextsizepage.cpp:399
+#: ../src/richtext/richtextsizepage.cpp:402
+#: ../src/richtext/richtextsizepage.cpp:403
+#: ../src/richtext/richtextsizepage.cpp:426
+#: ../src/richtext/richtextsizepage.cpp:429
+#: ../src/richtext/richtextsizepage.cpp:430
+#: ../src/richtext/richtextsizepage.cpp:453
+#: ../src/richtext/richtextsizepage.cpp:456
+#: ../src/richtext/richtextsizepage.cpp:457
+#: ../src/richtext/richtextsizepage.cpp:480
+#: ../src/richtext/richtextsizepage.cpp:483
+#: ../src/richtext/richtextsizepage.cpp:484
+#: ../src/richtext/richtextsizepage.cpp:554
+#: ../src/richtext/richtextsizepage.cpp:557
+#: ../src/richtext/richtextsizepage.cpp:558
+#: ../src/richtext/richtextsizepage.cpp:589
+#: ../src/richtext/richtextsizepage.cpp:592
+#: ../src/richtext/richtextsizepage.cpp:593
+#: ../src/richtext/richtextsizepage.cpp:624
+#: ../src/richtext/richtextsizepage.cpp:627
+#: ../src/richtext/richtextsizepage.cpp:628
+#: ../src/richtext/richtextsizepage.cpp:659
+#: ../src/richtext/richtextsizepage.cpp:662
+#: ../src/richtext/richtextsizepage.cpp:663
+msgid "px"
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:188
+#, fuzzy
+msgid "rawctrl"
+msgstr "ctrl"
+
+#: ../src/html/chm.cpp:333
+msgid "read error"
+msgstr "erro de leitura"
+
+#: ../src/common/zipstrm.cpp:1882
+#, c-format
+msgid "reading zip stream (entry %s): bad crc"
+msgstr "a ler corrente de dados zip (entrada %s): mau crc"
+
+#: ../src/common/zipstrm.cpp:1877
+#, c-format
+msgid "reading zip stream (entry %s): bad length"
+msgstr "a ler corrente de dados zip (entrada %s): mau comprimento"
+
+#: ../src/msw/dde.cpp:1162
+msgid "reentrancy problem."
+msgstr "problema recursivo."
+
+#: ../src/common/datetimefmt.cpp:1920
+msgid "second"
+msgstr "segundo"
+
+#: ../src/html/chm.cpp:337
+msgid "seek error"
+msgstr "erro de pesquisa"
+
+#: ../src/common/datetimefmt.cpp:1935
+msgid "seventeenth"
+msgstr "décimo sétimo"
+
+#: ../src/common/datetimefmt.cpp:1925
+msgid "seventh"
+msgstr "sétimo"
+
+#: ../src/common/accelcmn.cpp:186
+msgid "shift"
+msgstr "deslocar"
+
+#: ../src/common/appbase.cpp:685
+msgid "show this help message"
+msgstr "mostra esta mensagem de ajuda"
+
+#: ../src/common/datetimefmt.cpp:1934
+msgid "sixteenth"
+msgstr "décimo sexto"
+
+#: ../src/common/datetimefmt.cpp:1924
+msgid "sixth"
+msgstr "sexto"
+
+#: ../src/common/appcmn.cpp:227
+msgid "specify display mode to use (e.g. 640x480-16)"
+msgstr "especificar modo de ecrã a utilizar (ex: 640x480-16)"
+
+#: ../src/common/appcmn.cpp:213
+msgid "specify the theme to use"
+msgstr "especifica o tema a utilizar"
+
+#: ../src/richtext/richtextbuffer.cpp:8876
+#, fuzzy
+msgid "standard/circle"
+msgstr "Standard"
+
+#: ../src/richtext/richtextbuffer.cpp:8877
+msgid "standard/circle-outline"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8879
+msgid "standard/diamond"
+msgstr ""
+
+#: ../src/richtext/richtextbuffer.cpp:8878
+#, fuzzy
+msgid "standard/square"
+msgstr "Standard"
+
+#: ../src/richtext/richtextbuffer.cpp:8880
+msgid "standard/triangle"
+msgstr ""
+
+#: ../src/common/zipstrm.cpp:1782
+msgid "stored file length not in Zip header"
+msgstr "guardado tamanho do ficheiro não no cabeçalho Zip"
+
+#: ../src/common/cmdline.cpp:1311
+msgid "str"
+msgstr "str"
+
+#: ../src/common/fontcmn.cpp:794 ../src/common/fontcmn.cpp:969
+msgid "strikethrough"
+msgstr ""
+
+#: ../src/common/tarstrm.cpp:1003 ../src/common/tarstrm.cpp:1025
+#: ../src/common/tarstrm.cpp:1507 ../src/common/tarstrm.cpp:1529
+msgid "tar entry not open"
+msgstr "entrada tar não aberta"
+
+#: ../src/common/datetimefmt.cpp:1928
+msgid "tenth"
+msgstr "décimo"
+
+#: ../src/msw/dde.cpp:1126
+msgid "the response to the transaction caused the DDE_FBUSY bit to be set."
+msgstr "a resposta à transacção causou a definição do bit DDE_FBUSY."
+
+#: ../src/common/datetimefmt.cpp:1921
+msgid "third"
+msgstr "terceiro"
+
+#: ../src/common/datetimefmt.cpp:1931
+msgid "thirteenth"
+msgstr "décimo terceiro"
+
+#: ../src/common/datetimefmt.cpp:1725
+msgid "today"
+msgstr "hoje"
+
+#: ../src/common/datetimefmt.cpp:1727
+msgid "tomorrow"
+msgstr "amanhã"
+
+#: ../src/common/fileconf.cpp:1979
+#, c-format
+msgid "trailing backslash ignored in '%s'"
+msgstr ""
+
+#: ../src/gtk/aboutdlg.cpp:218
+msgid "translator-credits"
+msgstr "créditos dos tradutores"
+
+#: ../src/common/datetimefmt.cpp:1930
+msgid "twelfth"
+msgstr "décimo segundo"
+
+#: ../src/common/datetimefmt.cpp:1938
+msgid "twentieth"
+msgstr "vigésimo"
+
+#: ../src/common/fontcmn.cpp:789 ../src/common/fontcmn.cpp:965
+msgid "underlined"
+msgstr "sublinhado"
+
+#: ../src/common/fileconf.cpp:2014
+#, c-format
+msgid "unexpected \" at position %d in '%s'."
+msgstr "\" inesperado na posição %d em '%s'."
+
+#: ../src/common/tarstrm.cpp:1045
+msgid "unexpected end of file"
+msgstr "fim de ficheiro inesperado"
+
+#: ../src/generic/progdlgg.cpp:399 ../src/common/tarstrm.cpp:371
+#: ../src/common/tarstrm.cpp:394 ../src/common/tarstrm.cpp:425
+msgid "unknown"
+msgstr "desconhecido"
+
+#: ../src/common/xtixml.cpp:253
+#, c-format
+msgid "unknown class %s"
+msgstr "classe %s desconhecida"
+
+#: ../src/common/regex.cpp:261 ../src/html/chm.cpp:351
+msgid "unknown error"
+msgstr "erro desconhecido"
+
+#: ../src/msw/dialup.cpp:490
+#, c-format
+msgid "unknown error (error code %08x)."
+msgstr "erro desconhecido ( código de erro %08x)."
+
+#: ../src/msw/wince/filefnwce.cpp:172
+msgid "unknown seek origin"
+msgstr "origem de pesquisa desconhecida"
+
+#: ../src/common/fmapbase.cpp:834
+#, c-format
+msgid "unknown-%d"
+msgstr "desconhecido %d"
+
+#: ../src/common/docview.cpp:507
+msgid "unnamed"
+msgstr "sem nome"
+
+#: ../src/common/docview.cpp:1606
+#, c-format
+msgid "unnamed%d"
+msgstr "sem nome%d"
+
+#: ../src/common/zipstrm.cpp:1796 ../src/common/zipstrm.cpp:2184
+msgid "unsupported Zip compression method"
+msgstr "método de compressão Zip não suportado"
+
+#: ../src/common/translation.cpp:1883
+#, c-format
+msgid "using catalog '%s' from '%s'."
+msgstr "a utilizar catálogo '%s' de '%s'."
+
+#: ../src/html/chm.cpp:335
+msgid "write error"
+msgstr "erro de escrita"
+
+#: ../src/common/time.cpp:318
+msgid "wxGetTimeOfDay failed."
+msgstr "falhou o wxGetTimeOfDay."
+
+#: ../src/gtk/print.cpp:987
+msgid "wxPrintout::GetPageInfo gives a null maxPage."
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1303
+msgid "wxWidget control pointer is not a data view pointer"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:907
+#, fuzzy
+msgid "wxWidget's control not initialized."
+msgstr "Não foi possível inicializar o ecrã."
+
+#: ../src/motif/app.cpp:245
+#, c-format
+msgid "wxWidgets could not open display for '%s': exiting."
+msgstr "wxWidgets não foi possível abrir ecrã para '%s': a sair."
+
+#: ../src/x11/app.cpp:164
+msgid "wxWidgets could not open display. Exiting."
+msgstr "wxWidgets não foi possível abrir o ecrã. A sair."
+
+#: ../src/richtext/richtextsymboldlg.cpp:434
+msgid "xxxx"
+msgstr "xxxx"
+
+#: ../src/common/datetimefmt.cpp:1726
+msgid "yesterday"
+msgstr "ontem"
+
+#: ../src/common/zstream.cpp:251 ../src/common/zstream.cpp:426
+#, c-format
+msgid "zlib error %d"
+msgstr "erro zlib %d"
+
+#: ../src/richtext/richtextliststylepage.cpp:496
+#: ../src/richtext/richtextbulletspage.cpp:301
+msgid "~"
+msgstr "~"
+
+#~ msgid "Print preview"
+#~ msgstr "Antevisão de impressão"
+
+#, fuzzy
+#~ msgid "&Preview..."
+#~ msgstr " Antevisão"
+
+#, fuzzy
+#~ msgid "Preview..."
+#~ msgstr " Antevisão"
+
+#, fuzzy
+#~ msgid "The vertical offset relative to the paragraph."
+#~ msgstr "O estilo pré-definido para o próximo parágrafo."
+
+#~ msgid "&Save..."
+#~ msgstr "&Guardar..."
+
+#~ msgid "About "
+#~ msgstr "Sobre "
+
+#~ msgid "All files (*.*)|*"
+#~ msgstr "Todos os ficheiros (*.*)|*"
+
+#~ msgid "Cannot initialize SciTech MGL!"
+#~ msgstr "Não foi possível inicializar o SciTech MGL!"
+
+#~ msgid "Cannot initialize display."
+#~ msgstr "Não foi possível inicializar o ecrã."
+
+#~ msgid "Cannot start thread: error writing TLS"
+#~ msgstr "Não foi possível iniciar a thread: erro ao escrever o TLS"
+
+#~ msgid "Close\tAlt-F4"
+#~ msgstr "Fechar\tAlt+F4"
+
+#~ msgid "Couldn't create cursor."
+#~ msgstr "Não foi possível criar um cursor."
+
+#~ msgid "Directory '%s' doesn't exist!"
+#~ msgstr "O directório '%s' não existe!"
+
+#~ msgid "File %s does not exist."
+#~ msgstr "Ficheiro %s não existe."
+
+#~ msgid "Mode %ix%i-%i not available."
+#~ msgstr "Modo %ix%i-%i não disponível."
+
+#~ msgid "Paper Size"
+#~ msgstr "Tamanho do Papel"
+
+#~ msgid "%.*f GB"
+#~ msgstr "%.*f GB"
+
+#~ msgid "%.*f MB"
+#~ msgstr "%.*f MB"
+
+#~ msgid "%.*f TB"
+#~ msgstr "%.*f TB"
+
+#~ msgid "%.*f kB"
+#~ msgstr "%.*f kB"
+
+#, fuzzy
+#~ msgid "%s"
+#~ msgstr "%s B"
+
+#~ msgid "%s B"
+#~ msgstr "%s B"
+
+#~ msgid "&Goto..."
+#~ msgstr "&Ir para..."
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">>|"
+#~ msgstr ">>|"
+
+#~ msgid "Archive doesnt contain #SYSTEM file"
+#~ msgstr "O arquivo não contém o ficheiro #SYSTEM"
+
+#~ msgid "BIG5"
+#~ msgstr "BIG5"
+
+#~ msgid "Can't check image format of file '%s': file does not exist."
+#~ msgstr ""
+#~ "Não foi possível verificar formato da imagem do ficheiro '%s':o ficheiro "
+#~ "não existe."
+
+#~ msgid "Can't load image from file '%s': file does not exist."
+#~ msgstr ""
+#~ "Não foi possível carregar imagem do ficheiro '%s': o ficheiro não existe."
+
+#~ msgid "Cannot convert dialog units: dialog unknown."
+#~ msgstr ""
+#~ "Não foi possível converter unidades de diálogo: diálogo desconhecido."
+
+#~ msgid "Cannot convert from the charset '%s'!"
+#~ msgstr "Não foi possível converter do código de caracteres '%s'!"
+
+#~ msgid "Cannot find container for unknown control '%s'."
+#~ msgstr ""
+#~ "Não foi possível encontrar o recipiente para controlo desconhecido '%s'."
+
+#~ msgid "Cannot find font node '%s'."
+#~ msgstr "Não foi possível encontrar o nodo de fonte '%s'."
+
+#~ msgid "Cannot open file '%s'."
+#~ msgstr "Não foi possível abrir o ficheiro '%s'."
+
+#~ msgid "Cannot parse coordinates from '%s'."
+#~ msgstr "Não foi possível analisar gramaticalmente coordenadas de '%s'."
+
+#~ msgid "Cannot parse dimension from '%s'."
+#~ msgstr "Não foi possível analisar gramaticalmente dimensões de '%s'."
+
+#~ msgid "Cant create the thread event queue"
+#~ msgstr "Não foi possível criar a fila de eventos da thread"
+
+#~ msgid "Click to cancel this window."
+#~ msgstr "Clique para cancelar esta janela."
+
+#~ msgid "Click to confirm your selection."
+#~ msgstr "Clique para confirmar a sua selecção."
+
+#~ msgid "Could not unlock mutex"
+#~ msgstr "Não foi possível desbloquear a mutex"
+
+#~ msgid "Error while waiting on semaphore"
+#~ msgstr "Erro durante a espera de um semáforo"
+
+#, fuzzy
+#~ msgid "Failed to connect to session manager: %s"
+#~ msgstr "Falha ao %s a ligação telefónica: %s"
+
+#~ msgid "Failed to create a status bar."
+#~ msgstr "Falha de criação de barra de estado."
+
+#~ msgid "Failed to register OpenGL window class."
+#~ msgstr "Falha ao registar classe de janela OpenGL."
+
+#~ msgid "Fatal error"
+#~ msgstr "Erro Fatal"
+
+#~ msgid "Fatal error: "
+#~ msgstr "Erro Fatal: "
+
+#~ msgid "GB-2312"
+#~ msgstr "GB-2312"
+
+#~ msgid "Go forward to the next HTML page"
+#~ msgstr "Ir para a página HTML seguinte"
+
+#~ msgid "Goto Page"
+#~ msgstr "Ir para a Página"
+
+#, fuzzy
+#~ msgid ""
+#~ "HTML pagination algorithm generated more than the allowed maximum number "
+#~ "of pages and it can't continue any longer!"
+#~ msgstr ""
+#~ "O algoritmo de paginação HTML gerou mais do que o número máximo permitido "
+#~ "de páginas e pode continuar ainda mais!"
+
+#~ msgid "Help : %s"
+#~ msgstr "Ajuda : %s"
+
+#~ msgid "I64"
+#~ msgstr "I64"
+
+#~ msgid "Internal error, illegal wxCustomTypeInfo"
+#~ msgstr "Erro Interno, wxCustomTypeInfo ilegal"
+
+#~ msgid "Invalid XRC resource '%s': doesn't have root node 'resource'."
+#~ msgstr "Recurso inválido de XRC '%s': não tem recursos de root."
+
+#~ msgid "No handler found for XML node '%s', class '%s'!"
+#~ msgstr "Não foi encontrado um manuseador para o nó XML '%s', classe '%s'!"
+
+#~ msgid "No image handler for type %ld defined."
+#~ msgstr "Não existe um manuseador de imagem para o tipo %ld definido."
+
+#, fuzzy
+#~ msgid "Owner not initialized."
+#~ msgstr "Não foi possível inicializar o ecrã."
+
+#, fuzzy
+#~ msgid "Passed item is invalid."
+#~ msgstr "'%s' é inválido"
+
+#~ msgid "Passing a already registered object to SetObjectName"
+#~ msgstr "A passar um objecto já registado para SetObjectName"
+
+#~ msgid "Preparing help window..."
+#~ msgstr "A preparar janela de ajuda..."
+
+#~ msgid "Program aborted."
+#~ msgstr "Programa interrompido."
+
+#~ msgid "Referenced object node with ref=\"%s\" not found!"
+#~ msgstr "Nó de objecto referenciado com ref=\"%s\" não encontrado!"
+
+#~ msgid "Resource files must have same version number!"
+#~ msgstr "Ficheiros de recurso devem ter a mesma versão!"
+
+#~ msgid "SHIFT-JIS"
+#~ msgstr "SHIFT-JIS"
+
+#~ msgid "Search!"
+#~ msgstr "Procurar!"
+
+#~ msgid "Sorry, could not open this file for saving."
+#~ msgstr "Lamento, não é possível abrir este ficheiro para escrita."
+
+#~ msgid "Sorry, could not save this file."
+#~ msgstr "Lamento, não foi possível gravar este ficheiro."
+
+#~ msgid "Sorry, print preview needs a printer to be installed."
+#~ msgstr ""
+#~ "Lamento, a antevisão de impressão necessita de uma impressora instalada."
+
+#~ msgid "Status: "
+#~ msgstr "Estado: "
+
+#~ msgid ""
+#~ "Streaming delegates for not already streamed objects not yet supported"
+#~ msgstr ""
+#~ "Delegações de 'streaming' para objectos ainda não 'streamed' não é ainda "
+#~ "suportado"
+
+#~ msgid "Subclass '%s' not found for resource '%s', not subclassing!"
+#~ msgstr ""
+#~ "Sub-Classe '%s' não encontrada para o recurso '%s', a sub-classe não é "
+#~ "criada!"
+
+#~ msgid "TIFF library error."
+#~ msgstr "Erro de livraria TIFF."
+
+#~ msgid "TIFF library warning."
+#~ msgstr "Aviso de livraria TIFF."
+
+#~ msgid ""
+#~ "The file '%s' couldn't be opened.\n"
+#~ "It has been removed from the most recently used files list."
+#~ msgstr ""
+#~ "O ficheiro '%s' não pode ser aberto.\n"
+#~ "Este foi removido da lista de ficheiros usados mais recentemente."
+
+#~ msgid "The path '%s' contains too many \"..\"!"
+#~ msgstr "O caminho '%s' contém demasiados \"..\"!"
+
+#~ msgid "Trying to solve a NULL hostname: giving up"
+#~ msgstr "Tentativa de resolver um nome de computador NULL: a desistir"
+
+#~ msgid "Unknown style flag "
+#~ msgstr "Bandeira de estilo desconhecida "
+
+#~ msgid "Warning"
+#~ msgstr "Aviso"
+
+#~ msgid "Windows 2000 (build %lu"
+#~ msgstr "Windows 2000 (build %lu"
+
+#~ msgid "XRC resource '%s' (class '%s') not found!"
+#~ msgstr "XRC recurso '%s' (classe '%s') não encontrada!"
+
+#~ msgid "XRC resource: Cannot create animation from '%s'."
+#~ msgstr "Recurso XRC: Não é possível criar animação a partir de '%s'."
+
+#~ msgid "XRC resource: Cannot create bitmap from '%s'."
+#~ msgstr "Recurso XRC: Não é possível criar bitmap a partir de '%s'."
+
+#, fuzzy
+#~ msgid ""
+#~ "XRC resource: Incorrect colour specification '%s' for attribute '%s'."
+#~ msgstr ""
+#~ "Recurso XRC: Especificação incorrecta de cor '%s' para a propriedade '%s'."
+
+#~ msgid "[EMPTY]"
+#~ msgstr "[VAZIO]"
+
+#~ msgid "catalog file for domain '%s' not found."
+#~ msgstr "ficheiro de catálogo para o domínio '%s' não foi encontrado."
+
+#~ msgid "delegate has no type info"
+#~ msgstr "delegado não tem informação de tipo"
+
+#~ msgid "encoding %i"
+#~ msgstr "a codificar %i"
+
+#~ msgid "looking for catalog '%s' in path '%s'."
+#~ msgstr "a localizar catálogo '%s' no caminho '%s'."
+
+#~ msgid "wxRichTextFontPage"
+#~ msgstr "wxRichTextFontPage"
+
+#~ msgid "wxSearchEngine::LookFor must be called before scanning!"
+#~ msgstr "wxSearchEngine::LookFor deve ser chamado antes do rastreio!"
+
+#~ msgid "wxSocket: invalid signature in ReadMsg."
+#~ msgstr "wxSocket: assinatura inválida em ReadMsg."
+
+#~ msgid "wxSocket: unknown event!."
+#~ msgstr "wxSocket: evento desconhecido!."
+
+#~ msgid "|<<"
+#~ msgstr "|<<"
+
+#~ msgid "\t%s: %s\n"
+#~ msgstr "\t%s: %s\n"
+
+#~ msgid " Couldn't create the UnicodeConverter"
+#~ msgstr " Não foi possível criar o UnicodeConverter"
+
+#~ msgid "#define %s must be an integer."
+#~ msgstr "#define %s tem de ser um inteiro."
+
+#~ msgid "%s not a bitmap resource specification."
+#~ msgstr "%s não é uma especificação de recurso bitmap."
+
+#~ msgid "%s not an icon resource specification."
+#~ msgstr "%s não é uma especificação de recurso de ícone."
+
+#~ msgid "%s: ill-formed resource file syntax."
+#~ msgstr "%s sintaxe de ficheiro de recurso mal formado."
+
+#~ msgid "&Open"
+#~ msgstr "&Abrir"
+
+#~ msgid "&Print"
+#~ msgstr "&Imprimir"
+
+#~ msgid "*** A debug report has been generated\n"
+#~ msgstr "*** Foi gerado um relatório de depuração de erros\n"
+
+#~ msgid "*** It can be found in \"%s\"\n"
+#~ msgstr "***Pode ser encontrado em \"%s\"\n"
+
+#~ msgid ""
+#~ ", expected static, #include or #define\n"
+#~ "while parsing resource."
+#~ msgstr ""
+#~ ", esperáva-se static, #include ou #define\n"
+#~ "enquanto se analisou gramaticalmente o recurso."
+
+#~ msgid "Bitmap resource specification %s not found."
+#~ msgstr "Especificação de recursos Bitmap %s não encontrada."
+
+#~ msgid "Closes the dialog without inserting a symbol."
+#~ msgstr "Fecha a caixa de diáogo sem inserir símbolo."
+
+#~ msgid ""
+#~ "Could not resolve control class or id '%s'. Use (non-zero) integer "
+#~ "instead\n"
+#~ " or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "Não foi possível resolver controlo de classe ou id '%s'. Use um inteiro "
+#~ "(não zero)\n"
+#~ " ou coloque um #define (ver manual para os detalhes)"
+
+#~ msgid ""
+#~ "Could not resolve menu id '%s'. Use (non-zero) integer instead\n"
+#~ "or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "Não foi possível resolver menu id '%s'. Use um inteiro (não zero)\n"
+#~ "ou coloque um #define (ver manual para os detalhes)"
+
+#~ msgid "Couldn't end the context on the overlay window"
+#~ msgstr "Não foi possível terminar o contexto na janela de sobreposição"
+
+#~ msgid "Expected '*' while parsing resource."
+#~ msgstr "Esperado '*' durante a interpretação do recurso."
+
+#~ msgid "Expected '=' while parsing resource."
+#~ msgstr "Esperado '=' durante a interpretação do recurso."
+
+#~ msgid "Expected 'char' while parsing resource."
+#~ msgstr "Esperado 'char' durante a interpretação do recurso."
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "Falha ao encontrar recurso XBM %s.\n"
+#~ "Esqueceu-se de usar wxResourceLoadBitmapData?"
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadIconData?"
+#~ msgstr ""
+#~ "Falha ao encontrar recurso XBM %s.\n"
+#~ "Esqueceu-se de usar wxResourceLoadIconData?"
+
+#~ msgid ""
+#~ "Failed to find XPM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "Falha ao encontrar recurso XBM %s.\n"
+#~ "Esqueceu-se de usar wxResourceLoadBitmapData?"
+
+#~ msgid "Failed to get clipboard data."
+#~ msgstr "Falha na obtenção de dados da área de transferência."
+
+#~ msgid "Failed to load shared library '%s' Error '%s'"
+#~ msgstr "Falha na abertura da livraria partilhada '%s' Erro de '%s'"
+
+#~ msgid "Found "
+#~ msgstr "Encontrado "
+
+#~ msgid "Icon resource specification %s not found."
+#~ msgstr "Especificação de recurso de ícone %s não encontrado."
+
+#~ msgid "Ill-formed resource file syntax."
+#~ msgstr "Sintaxe do ficheiro de recurso mal formado."
+
+#~ msgid "Inserts the chosen symbol."
+#~ msgstr "Insere o símbolo escolhido."
+
+#~ msgid "Long Conversions not supported"
+#~ msgstr "Conversões longas não suportadas"
+
+#~ msgid "No XPM icon facility available!"
+#~ msgstr "Nenhuma funcionalidade de ícone XPM disponível!"
+
+#~ msgid "Option '%s' requires a value, '=' expected."
+#~ msgstr "A opção '%s' requer um valor, '=' esperado."
+
+#~ msgid "Select all"
+#~ msgstr "Seleccionar todos"
+
+#~ msgid ""
+#~ "Sorry, docking is not supported for ports other than wxMSW, wxMac and "
+#~ "wxGTK"
+#~ msgstr ""
+#~ "Lamento, docking não é suportado por plataformas que não sejam wxMSW, "
+#~ "wxMac e wxGTK"
+
+#~ msgid "String conversions not supported"
+#~ msgstr "Não são suportadas conversões de cadeias de caracteres"
+
+#~ msgid "Unexpected end of file while parsing resource."
+#~ msgstr ""
+#~ "Fim de ficheiro inesperado enquanto se analisava gramaticalmente o "
+#~ "recurso."
+
+#~ msgid "Unrecognized style %s while parsing resource."
+#~ msgstr ""
+#~ "Estilo %s não reconhecido enquanto se analisava gramaticalmente o recurso."
+
+#~ msgid "Video Output"
+#~ msgstr "Saída de Vídeo"
+
+#~ msgid "Warning: attempt to remove HTML tag handler from empty stack."
+#~ msgstr ""
+#~ "Aviso: tentativa de remover um manuseador de 'tag HTML' de uma pilha "
+#~ "vazia."
+
+#~ msgid "establish"
+#~ msgstr "estabelecer"
+
+#~ msgid "initiate"
+#~ msgstr "iniciar"
+
+#~ msgid "invalid eof() return value."
+#~ msgstr "valor inválido de retorno de eof()."
+
+#~ msgid "unknown line terminator"
+#~ msgstr "terminador de linha desconhecido"
+
+#~ msgid "writing"
+#~ msgstr "a escrever"
+
+#~ msgid "wxRichTextBulletsPage"
+#~ msgstr "wxRichTextBulletsPage"
+
+#~ msgid "wxRichTextListStylePage"
+#~ msgstr "wxRichTextListStylePage"
+
+#~ msgid "wxRichTextStylePage"
+#~ msgstr "wxRichTextStylePage"
diff --git a/cadxcore/lang/pt_BR/cadxcore.mo b/cadxcore/lang/pt_BR/cadxcore.mo
new file mode 100644
index 0000000..7bb0b4c
Binary files /dev/null and b/cadxcore/lang/pt_BR/cadxcore.mo differ
diff --git a/cadxcore/lang/pt_BR/cadxcore.po b/cadxcore/lang/pt_BR/cadxcore.po
new file mode 100644
index 0000000..5ba8c75
--- /dev/null
+++ b/cadxcore/lang/pt_BR/cadxcore.po
@@ -0,0 +1,7480 @@
+# Brazilian Portuguese translation for ginkgocadx
+# Copyright (c) 2012 Rosetta Contributors and Canonical Ltd 2012
+# This file is distributed under the same license as the ginkgocadx package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, 2012.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-06-11 15:51+0100\n"
+"PO-Revision-Date: 2014-06-11 15:51+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Brazilian Portuguese <pt_BR at li.org>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-Bookmarks: -1,-1,-1,-1,-1,-1,-1,296,-1,-1\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: ..\\..\n"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr "P/B"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr "P/B Inverso"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr "Cardiaco"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Red Vessels"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "Hot Metal"
+msgstr "Tema Metal"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Green"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "GE Color"
+msgstr "Cor"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PET"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr "Assimetria"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "P-Value"
+msgstr "Valor"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr ""
+
+#: ..\../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#: ..\../api/dicom/idicomconformance.cpp:214
+#: ..\../api/dicom/idicomconformance.cpp:220
+#, fuzzy
+msgid "GIL/DICOM/Conformance"
+msgstr "Arquivo de conformidade DICOM inválido"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#, fuzzy
+msgid "Unable to add supported transfer syntax "
+msgstr " . Sintaxe de transferência não exite no modelo: Adicione-a primeiro."
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid " to SOP Class "
+msgstr " para classe SOP "
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr " . Sintaxe de transferência não exite no modelo: Adicione-a primeiro."
+
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr " . Classe SOP não existe no modelo: Adicione-a primeiro."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#, fuzzy
+msgid "Unable to add supported SOP Class "
+msgstr " . Classe SOP não existe no modelo: Adicione-a primeiro."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " to Modality "
+msgstr " para a modalidade "
+
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr " . Modalidade não existe no modelo: Adicione-a primeiro."
+
+#: ..\../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr "Erro ao carregar o arquivo de Conformidade DICOM"
+
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr "Arquivo de conformidade DICOM inválido"
+
+#: ..\../api/iannotator.cpp:97
+msgid "Slice"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "of"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+#, fuzzy
+msgid "Volume"
+msgstr "Renderização de volume 3D"
+
+#: ..\../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:110
+msgid "Image without metric information"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:119
+msgid "Slice thickness"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:127
+#, fuzzy
+msgid "Slice location"
+msgstr "Configurar localização"
+
+#: ..\../api/iannotator.cpp:139
+#, fuzzy
+msgid "Scale"
+msgstr "Escala da grade"
+
+#: ..\../api/iannotator.cpp:147
+#, fuzzy
+msgid "Right"
+msgstr "&Direita"
+
+#: ..\../api/iannotator.cpp:149
+#, fuzzy
+msgid "Left"
+msgstr "&Esquerda"
+
+#: ..\../api/iannotator.cpp:219
+#, fuzzy
+msgid "Position:"
+msgstr "A posi��o da tabula��o."
+
+#: ..\../api/iannotator.cpp:272
+#, fuzzy
+msgid "Value:"
+msgstr "Valor"
+
+#: ..\../api/iexception.cpp:52
+msgid "Exception in component"
+msgstr ""
+
+#: ..\../api/initwx.cpp:439
+#, fuzzy
+msgid "Initializing environment ..."
+msgstr "Configurando ambiente ..."
+
+#: ..\../api/initwx.cpp:446 ..\../api/initwx.cpp:447 ..\../api/initwx.cpp:448
+#: ..\../api/initwx.cpp:449 ..\../api/initwx.cpp:450 ..\../api/initwx.cpp:451
+#: ..\../api/initwx.cpp:452 ..\../api/initwx.cpp:453
+msgid "Ginkgo CADx restrictions"
+msgstr "Ginkgo CADx restrictions"
+
+#: ..\../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr ""
+
+#: ..\../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr "Modo anônimo (histórico será limpo)"
+
+#: ..\../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr "Número máximo de abas aberto"
+
+#: ..\../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr ""
+
+#: ..\../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr "Fechar automaticamente Ginkgo CADx após dicomização"
+
+#: ..\../api/initwx.cpp:451
+msgid "Export images"
+msgstr "Export images"
+
+#: ..\../api/initwx.cpp:452
+msgid "Acquire DICOM files"
+msgstr "Adquirir arquivos DICOM"
+
+#: ..\../api/initwx.cpp:453
+#, fuzzy
+msgid "Import files to DICOM format"
+msgstr "Este arquivo não tem formato DICOM:"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+#, fuzzy
+msgid "Online manual"
+msgstr "Online support"
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+#, fuzzy
+msgid "URL of manual"
+msgstr "Erro ao conectar-se a url"
+
+#: ..\../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "Online support"
+msgstr "Online support"
+
+#: ..\../api/initwx.cpp:459
+#, fuzzy
+msgid "URL of online support"
+msgstr "Online support"
+
+#: ..\../api/initwx.cpp:459
+#, fuzzy
+msgid "http://ginkgo-cadx.com/"
+msgstr "Habilitar proxy HTTP"
+
+#: ..\../api/initwx.cpp:460 ..\../api/initwx.cpp:461
+#, fuzzy
+msgid "Program Updates"
+msgstr "Programa interrompido."
+
+#: ..\../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr "Avisar sobre novas atualizações do Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:461
+msgid "Update period (days)"
+msgstr "Período de atualização (dias)"
+
+#: ..\../api/initwx.cpp:462
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr ""
+
+#: ..\../api/initwx.cpp:462
+#, fuzzy
+msgid "Setup Security"
+msgstr "Configurar..."
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup"
+msgstr "Exibir ao iniciar"
+
+#: ..\../api/initwx.cpp:463
+#, fuzzy
+msgid "Show on startup default value"
+msgstr "Exibir ao iniciar"
+
+#: ..\../api/initwx.cpp:465 ..\../api/initwx.cpp:466
+#: ..\../main/gui/history3/historypanel3.cpp:328
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr ""
+
+#: ..\../api/initwx.cpp:465
+#, fuzzy
+msgid "Settings menu"
+msgstr ""
+"Você precisa definir um PACS padrão no XML de integração ou no menu de "
+"configurações"
+
+#: ..\../api/initwx.cpp:466
+#, fuzzy
+msgid "License menu"
+msgstr "MENU"
+
+#: ..\../api/initwx.cpp:467 ..\../api/initwx.cpp:468 ..\../api/initwx.cpp:469
+#: ..\../api/initwx.cpp:470 ..\../api/initwx.cpp:471 ..\../api/initwx.cpp:472
+#: ..\../api/initwx.cpp:473 ..\../api/initwx.cpp:474
+#, fuzzy
+msgid "PACS Limits"
+msgstr "Explorando PACS..."
+
+#: ..\../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr ""
+
+#: ..\../api/initwx.cpp:468
+msgid "Upload images to a PACS server"
+msgstr "Enviar imagens para o servidor PACS"
+
+#: ..\../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr "Adquirir imagens de um PACS"
+
+#: ..\../api/initwx.cpp:470
+msgid "Enable remote PACS configuration"
+msgstr "Habilitar configuração remota do PACS"
+
+#: ..\../api/initwx.cpp:471
+msgid "Enable TLS configuration"
+msgstr "Ativar configuração do TLS"
+
+#: ..\../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr ""
+
+#: ..\../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr ""
+
+#: ..\../api/initwx.cpp:475 ..\../api/initwx.cpp:476 ..\../api/initwx.cpp:477
+#: ..\../api/initwx.cpp:478 ..\../api/initwx.cpp:479 ..\../api/initwx.cpp:480
+#, fuzzy
+msgid "Import"
+msgstr "Você precisa selecionar as imagens que você deseja importar"
+
+#: ..\../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:476
+#, fuzzy
+msgid "Show accession number input"
+msgstr "Numero de Acesso"
+
+#: ..\../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr "Serviço HL7"
+
+#: ..\../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483 ..\../api/initwx.cpp:484 ..\../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr "Dicomização XML"
+
+#: ..\../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:485
+msgid "Default ORU template"
+msgstr "Default ORU template"
+
+#: ..\../api/initwx.cpp:488 ..\../api/initwx.cpp:489 ..\../api/initwx.cpp:491
+#: ..\../api/initwx.cpp:493 ..\../api/initwx.cpp:494 ..\../api/initwx.cpp:495
+#: ..\../api/initwx.cpp:496 ..\../api/initwx.cpp:498
+#, fuzzy
+msgid "Style"
+msgstr "&Estilo:"
+
+#: ..\../api/initwx.cpp:503
+#, fuzzy, c-format
+msgid "Download %s images"
+msgstr "Download"
+
+#: ..\../api/initwx.cpp:504 ..\../api/initwx.cpp:508
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+#, fuzzy
+msgid "PACS"
+msgstr "Explorando PACS..."
+
+#: ..\../api/initwx.cpp:507
+#, fuzzy
+msgid "Download all modalities"
+msgstr "Download"
+
+#: ..\../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr "OpenGL"
+
+#: ..\../api/initwx.cpp:510
+#, fuzzy
+msgid "Enable shaders"
+msgstr "Habilitar configuração remota do PACS"
+
+#: ..\../api/initwx.cpp:513
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+#, fuzzy
+msgid "Ginkgo Cloud"
+msgstr "Ginkgo CADx"
+
+#: ..\../api/initwx.cpp:513
+#, fuzzy
+msgid "Download from Ginkgo Cloud"
+msgstr "O Ginkgo CADx não pode comprimir de "
+
+#: ..\../api/initwx.cpp:560
+#, fuzzy
+msgid "Tools loading base ..."
+msgstr "Carregando : "
+
+#: ..\../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:566
+#, fuzzy
+msgid "Loading plugins ..."
+msgstr "Carregando : "
+
+#: ..\../api/initwx.cpp:580
+msgid "Unable to start GinkgoCADx:\n"
+msgstr ""
+
+#: ..\../api/initwx.cpp:580 ..\../api/initwx.cpp:621
+msgid "error"
+msgstr "erro"
+
+#: ..\../api/initwx.cpp:584
+#, fuzzy
+msgid "Loading resources ..."
+msgstr "Carregando : "
+
+#: ..\../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:601
+msgid "Configuring environment ..."
+msgstr "Configurando ambiente ..."
+
+#: ..\../api/initwx.cpp:621
+msgid "Failed to set permissions:\n"
+msgstr "Ocorreu uma falha ao definir permissões:\n"
+
+#: ..\../api/initwx.cpp:634
+msgid "Updating ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:638
+#, fuzzy
+msgid "Interpreting parameters ..."
+msgstr "Parâmetros de configuração da estação local"
+
+#: ..\../api/initwx.cpp:689
+#, fuzzy
+msgid "Error unregistering tools: "
+msgstr "Erro: "
+
+#: ..\../api/initwx.cpp:769
+msgid "Starting"
+msgstr ""
+
+#: ..\../api/ivista.cpp:36 ..\../commands/comandocarga.cpp:73
+#, fuzzy
+msgid "Loading..."
+msgstr "Carregando : "
+
+#: ..\../api/iwidgets.cpp:268
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ..\../main/gui/import/pasosimportacionbase.cpp:151
+#, fuzzy
+msgid "Name"
+msgstr "Nome"
+
+#: ..\../api/iwidgets.cpp:285
+msgid "Area"
+msgstr "Área"
+
+#: ..\../api/iwidgets.cpp:302
+msgid "Perimeter"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:316
+#, fuzzy
+msgid "Travel (I)"
+msgstr "%i de %i"
+
+#: ..\../api/iwidgets.cpp:326
+#, fuzzy
+msgid "Travel (M)"
+msgstr "Centro (M)"
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#: ..\../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid "Error while running thread: "
+msgstr "Erro ao rodar a thread: "
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid " : "
+msgstr " : "
+
+#: ..\../api/threads/thread.cpp:120
+msgid "Internal error while running thread: "
+msgstr "Erro interno ao executar a thread: "
+
+#: ..\../api/widgetserializable.cpp:60
+msgid "Creation Date"
+msgstr "Data de criação"
+
+#: ..\../api/widgetserializable.cpp:65
+#, fuzzy
+msgid "Modification Date"
+msgstr "data"
+
+#: ..\../api/widgetserializable.cpp:68
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:40
+msgid "Physician"
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:55
+#: ..\../commands/pacsdownloadcommand.cpp:88
+#: ..\../commands/synchronizationcommand.cpp:70
+msgid "Downloading files ..."
+msgstr "Baixando arquivos ..."
+
+#: ..\../commands/acquirefromurlcommand.cpp:69
+#: ..\../commands/synchronizationcommand.cpp:91
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, c-format
+msgid "Downloading file %d"
+msgstr "Baixando arquivo %d"
+
+#: ..\../commands/acquirefromurlcommand.cpp:81
+#, fuzzy
+msgid "Error downloading file: "
+msgstr "Baixando arquivo %d"
+
+#: ..\../commands/acquirefromurlcommand.cpp:95
+#: ..\../commands/pacsdownloadcommand.cpp:114
+#: ..\../commands/synchronizationcommand.cpp:121
+msgid "Internal Error"
+msgstr "Erro Interno"
+
+#: ..\../commands/acquirefromurlcommand.cpp:115
+#, fuzzy
+msgid "Error downloading files: "
+msgstr "Baixando arquivos ..."
+
+#: ..\../commands/autocleaningcommand.cpp:62
+msgid "Cleaning dicomdir..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:67
+#, fuzzy
+msgid "Downloading files..."
+msgstr "Baixando arquivos ..."
+
+#: ..\../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:183
+#, fuzzy
+msgid "Unknown operation"
+msgstr "Operação não permitida."
+
+#: ..\../commands/cloudcommand.cpp:188
+msgid "Error in cloud operation. See log to get more details..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:249
+#, fuzzy
+msgid "Could to retrieve study."
+msgstr "Não foi possível localizar aba pela id"
+
+#: ..\../commands/cloudcommand.cpp:260 ..\../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:262
+#, fuzzy
+msgid "Error retrieving study."
+msgstr "Erro ao carregar estudo: Erro Interno"
+
+#: ..\../commands/cloudcommand.cpp:271
+#, fuzzy
+msgid "Study successfully retrieved."
+msgstr "A dicomização foi concluída com sucesso"
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "Speed"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "bytes/sec during"
+msgstr " bytes de "
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "seconds"
+msgstr ""
+"O Ginkgo CADx detectou inatividade e será fechado em %d segundos.\n"
+"Você gostaria de continuar?"
+
+#: ..\../commands/cloudcommand.cpp:275
+#, fuzzy
+msgid "Empty Response"
+msgstr "[EMPTY]"
+
+#: ..\../commands/cloudcommand.cpp:289
+#, fuzzy
+msgid "Extracting files..."
+msgstr "Extracting file..."
+
+#: ..\../commands/cloudcommand.cpp:313 ..\../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:383
+#, fuzzy
+msgid "Could to perform query."
+msgstr "Ocorreu uma falha durante a busca: "
+
+#: ..\../commands/cloudcommand.cpp:396
+#, fuzzy
+msgid "Error perfoming the query."
+msgstr "Erro: "
+
+#: ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "Query successfully performed."
+msgstr "A dicomização foi concluída com sucesso"
+
+#: ..\../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:472
+#, fuzzy
+msgid "Unknown JSon attribute:"
+msgstr "Desconhecido"
+
+#: ..\../commands/cloudcommand.cpp:482
+#, fuzzy
+msgid "Error parsing JSon: "
+msgstr "Erro interno na análise XML"
+
+#: ..\../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:515
+#: ..\../commands/openremovableunit.cpp:148 ..\../main/gui/open/abrir.cpp:119
+#: ..\../main/gui/open/abrir.cpp:159 ..\../main/gui/open/opendialogs.cpp:146
+msgid "Storing in the history..."
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:46
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:536
+msgid "Check Updates"
+msgstr "Verificar Atualizações"
+
+#: ..\../commands/comandoactualizaciones.cpp:136
+#, fuzzy
+msgid "Not enough parameters found on XML"
+msgstr "Parser XML não encontrado. Chave="
+
+#: ..\../commands/comandoactualizaciones.cpp:145
+msgid "XML parsing internal error"
+msgstr "Erro interno na análise XML"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Error checking application updates"
+msgstr "Erro ao checar atualizações da aplicação"
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Ginkgo CADx updates"
+msgstr "Atualizações do Ginkgo CADx"
+
+#: ..\../commands/comandoactualizaciones.cpp:170
+msgid "Internal error checking updates"
+msgstr "Erro interno ao verificar atualizações"
+
+#: ..\../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:92 ..\../commands/comandocarga.cpp:96
+#, fuzzy
+msgid "Exception loading:"
+msgstr "Carregando : "
+
+#: ..\../commands/comandocarga.cpp:100
+msgid "Study malformed or unsupported"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:129 ..\../commands/comandocarga.cpp:139
+msgid "Error loading study: "
+msgstr "Erro ao carregar estudo: "
+
+#: ..\../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr "Erro ao carregar estudo. Memória insuficiente"
+
+#: ..\../commands/comandocarga.cpp:144
+msgid "Error loading study."
+msgstr "Erro ao carregar estudo."
+
+#: ..\../commands/comandocarga.cpp:149
+#, fuzzy
+msgid "Load canceled by user"
+msgstr "carregar"
+
+#: ..\../commands/comandocarga.cpp:156
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+#: ..\../main/gui/history3/historypanel3.cpp:1063
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+msgid "Error loading study"
+msgstr "Erro ao carregar estudo"
+
+#: ..\../commands/comandoexportacion.cpp:81
+#: ..\../commands/exporttodicomdircommand.cpp:214
+msgid "Exporting files..."
+msgstr "Exportando arquivos..."
+
+#: ..\../commands/comandoexportacion.cpp:105
+#: ..\../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr "Exportação foi concluída com sucesso"
+
+#: ..\../commands/comandoexportacion.cpp:158
+#, c-format
+msgid "Exporting file %d of %d"
+msgstr "Exportando arquivo %d de %d"
+
+#: ..\../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr "Erro ao armazenar arquivo, verifique permissões do diretório."
+
+#: ..\../commands/comandoexportacion.cpp:233
+msgid "image_%m-%d-%Y_"
+msgstr "imagem_%d-%m-%Y_"
+
+#: ..\../commands/comandoincluirhistorial.cpp:108
+msgid "Exploring directory ..."
+msgstr "Explorando diretório ..."
+
+#: ..\../commands/comandoincluirhistorial.cpp:122
+#, fuzzy
+msgid "Reading DICOMDIR ..."
+msgstr "lendo"
+
+#: ..\../commands/comandoincluirhistorial.cpp:142
+#: ..\../commands/comandoincluirhistorial.cpp:156
+#: ..\../commands/comandoincluirhistorial.cpp:177
+#, fuzzy
+msgid "Including files in the history .."
+msgstr "Arquivos"
+
+#: ..\../commands/comandoincluirhistorial.cpp:196
+msgid "Exploring directory "
+msgstr "Explorando diretório "
+
+#: ..\../commands/comandoincluirhistorial.cpp:256
+#: ..\../commands/linkhistorycommand.cpp:118
+#, fuzzy
+msgid "Image acquisition finished."
+msgstr "A dicomização foi concluída com sucesso"
+
+#: ..\../commands/comandoincluirhistorial.cpp:258
+#, c-format
+msgid "There have been included %d images."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:261
+#: ..\../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+"\n"
+"Existem %d erros (veja o log para descrição detalhada)"
+
+#: ..\../commands/comandoincluirhistorial.cpp:273
+#: ..\../commands/linkhistorycommand.cpp:133
+#, fuzzy
+msgid "This files doesn't exist:"
+msgstr " não existe"
+
+#: ..\../commands/comandoincluirhistorial.cpp:284
+#: ..\../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr "Este arquivo não tem formato DICOM:"
+
+#: ..\../commands/comandoincluirhistorial.cpp:296
+#: ..\../commands/linkhistorycommand.cpp:156
+#, fuzzy
+msgid "This files are Dicom Dirs:"
+msgstr "Adquirir arquivos DICOM"
+
+#: ..\../commands/comandopacs.cpp:58 ..\../commands/pacsdownloadcommand.cpp:61
+#: ..\../commands/sendpacscommand.cpp:137
+#, fuzzy
+msgid "There is not any Remote PACS configured"
+msgstr "Habilitar configuração remota do PACS"
+
+#: ..\../commands/comandopacs.cpp:84
+#, fuzzy
+msgid "Querying PACS ..."
+msgstr "Explorando PACS..."
+
+#: ..\../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:98
+#, fuzzy
+msgid "Starting Search ..."
+msgstr "Pesquisar"
+
+#: ..\../commands/comandopacs.cpp:108
+#: ..\../commands/pacsdownloadcommand.cpp:101
+msgid "Server ID not found. ID = "
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:110 ..\../commands/comandopacs.cpp:112
+#: ..\../commands/comandopacs.cpp:114 ..\../commands/comandopacs.cpp:116
+#, fuzzy
+msgid "Query error with PACS Id "
+msgstr ""
+"\n"
+"Este ID de PACS está em uso"
+
+#: ..\../commands/comandopacs.cpp:116
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error"
+msgstr "Erro interno"
+
+#: ..\../commands/comandopacs.cpp:135
+msgid "Failed to perform search: "
+msgstr "Ocorreu uma falha durante a busca: "
+
+#: ..\../commands/dbmigrationcommand.cpp:94
+#: ..\../commands/dbmigrationcommand.cpp:103
+#, fuzzy
+msgid "Migrating old DICOM Dir ..."
+msgstr "Diretório DICOM"
+
+#: ..\../commands/dbmigrationcommand.cpp:99
+#: ..\../commands/dbmigrationcommand.cpp:108
+#, fuzzy
+msgid "Including files ..."
+msgstr "Arquivos"
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+#: ..\../commands/dicomizecommand.cpp:181
+#: ..\../commands/openremovableunit.cpp:74
+#: ..\../commands/openremovableunit.cpp:110
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../commands/pdfextractercommand.cpp:130
+#: ..\../main/controllers/historycontroller.cpp:447
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+#: ..\../main/controllers/historycontroller.cpp:1976
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ..\../main/gui/login/dialogologin.cpp:50
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ..\../main/gui/open/opendialogs.cpp:58
+#: ..\../main/gui/open/opendialogs.cpp:62
+#: ..\../main/gui/open/opendialogs.cpp:134
+#: ..\../main/gui/progress/statusbarprogreso.cpp:284
+#: ..\../main/gui/progress/statusbarprogreso.cpp:287
+#: ..\../main/gui/progress/statusbarprogreso.cpp:292
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#: ..\../main/gui/history3/openwithdialog.h:72
+#, fuzzy
+msgid "Info"
+msgstr "delegate has não tipo_devolvido info"
+
+#: ..\../commands/dbmigrationcommand.cpp:123
+#, fuzzy
+msgid "Migration finisthed successfully"
+msgstr "A dicomização foi concluída com sucesso"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:27
+#: ..\../commands/dialogopathssobreescribirbase.cpp:62
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+#, fuzzy
+msgid "Overwrite"
+msgstr "Impossível sobrescrever o arquivo '%s'"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr "Você gostaria de sobrescrevê-los?"
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:65
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ..\../main/gui/history3/historypanel3base.cpp:339
+#: ..\../main/gui/history3/historypanel3base.cpp:415
+#: ..\../main/gui/history3/historypanel3base.cpp:486
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ..\../main/gui/open/opendialogsbase.cpp:53
+#: ..\../main/gui/open/opendialogsbase.cpp:131
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ..\../widgets/gui/calibracionbase.cpp:86
+#: ..\../widgets/gui/selecciontextobase.cpp:60
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: ..\../commands/dicomizationcompletebase.cpp:24
+#: ..\../commands/dicomizationcompletebase.cpp:33
+#: ..\../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr "Dicomização completa"
+
+#: ..\../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr "A dicomização foi concluída com sucesso"
+
+#: ..\../commands/dicomizationcompletebase.cpp:56
+msgid "Don't show this message again"
+msgstr "Não exibir esta mensagem novamente"
+
+#: ..\../commands/dicomizationcompletebase.cpp:62
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ..\../main/gui/history3/historypanel3base.cpp:411
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ..\../widgets/gui/calibracionbase.cpp:82
+#: ..\../widgets/gui/selecciontextobase.cpp:56
+msgid "Accept"
+msgstr "Aceitar"
+
+#: ..\../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:179
+#, fuzzy
+msgid "Import process failed:"
+msgstr "Falha ao destruir processo %d"
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+"\n"
+"Gostaria de tentar novamente?"
+
+#: ..\../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:370
+#, fuzzy
+msgid "Unknown error in dicomization process"
+msgstr "erro desconhecido"
+
+#: ..\../commands/dicomizecommand.cpp:431
+#: ..\../commands/dicomizecommand.cpp:442
+#: ..\../commands/sendpacscommand.cpp:185
+#, fuzzy
+msgid "Error sending evidences:"
+msgstr "Erro ao enviar mensagem:"
+
+#: ..\../commands/dicomizecommand.cpp:437
+#: ..\../commands/dicomizecommand.cpp:448
+msgid "Can not upload to the PACS:\n"
+msgstr "Não foi possível enviar para o PACS:\n"
+
+#: ..\../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+"Não foi possível enviar para o PACS:\n"
+"Erro interno"
+
+#: ..\../commands/exporttodicomdircommand.cpp:261
+#: ..\../commands/exporttodicomdircommand.cpp:338
+#, c-format
+msgid "Exporting series %d of %d"
+msgstr "Exportando série %d de %d"
+
+#: ..\../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:279
+#: ..\../commands/exporttodicomdircommand.cpp:385
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+msgid "There was an error creating directory"
+msgstr "Ocorreu um erro ao criar o diretório"
+
+#: ..\../commands/exporttodicomdircommand.cpp:303
+#: ..\../commands/exporttodicomdircommand.cpp:408
+#, fuzzy
+msgid "There was an error writing file"
+msgstr "ICO: Erro ao gravar o arquivo de imagem!"
+
+#: ..\../commands/exporttodicomdircommand.cpp:358
+#, fuzzy
+msgid "There was an error anonymizing files"
+msgstr "Arquivos"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+#, fuzzy
+msgid "Ignoring incoming operation "
+msgstr "Operação não permitida."
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:298
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:473
+#: ..\../commands/pacsdownloadcommand.cpp:170
+#: ..\../commands/pacsdownloadcommand.cpp:179
+#, fuzzy
+msgid "Including files..."
+msgstr "Arquivos"
+
+#: ..\../commands/linkhistorycommand.cpp:68
+#, fuzzy
+msgid "Linking study..."
+msgstr "Erro ao carregar estudo: "
+
+#: ..\../commands/openremovableunit.cpp:42
+#: ..\../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr "Exploring drives..."
+
+#: ..\../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:130
+#, fuzzy
+msgid "Select drive you want to open"
+msgstr "Você precisa selecionar as imagens que você deseja importar"
+
+#: ..\../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+"O Ginkgo CADx detectou mais de uma unidade removível,\n"
+"mas nenhuma delas inclui um DICOMDIR na raiz.\n"
+"Selecione o dispositivo onde você gostaria de adquirir recursivamente"
+
+#: ..\../commands/pacsdownloadcommand.cpp:134
+msgid "Error downloading study: "
+msgstr "Erro ao baixar estudo: "
+
+#: ..\../commands/pdfextractercommand.cpp:103
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ..\../main/gui/progress/statusbarprogreso.cpp:278
+#: ..\../widgets/gui/calibracion.cpp:205 ..\../widgets/gui/calibracion.cpp:209
+#: ..\../widgets/gui/calibracion.cpp:219 ..\../widgets/gui/calibracion.cpp:225
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "Error"
+msgstr "Erro"
+
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:130
+msgid "PDF files extracted successfully..."
+msgstr ""
+
+#: ..\../commands/secondarycapturedicomizecommand.cpp:73
+#, fuzzy
+msgid "Ginkgo CADx Secondary Capture"
+msgstr "Ginkgo CADx"
+
+#: ..\../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:73
+#, fuzzy
+msgid "Message successfully sent"
+msgstr "Erro ao enviar mensagem. Foi enviada "
+
+#: ..\../commands/sendhl7command.cpp:77
+msgid "Unknown protocol"
+msgstr "Protocolo desconhecido"
+
+#: ..\../commands/sendhl7command.cpp:80 ..\../commands/sendhl7command.cpp:93
+#: ..\../commands/sendhl7command.cpp:145
+msgid "Error sending message:"
+msgstr "Erro ao enviar mensagem:"
+
+#: ..\../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr "Erro ao enviar mensagem HL7. Veja log para maiores detalhes"
+
+#: ..\../commands/sendhl7command.cpp:93 ..\../commands/sendhl7command.cpp:94
+msgid "Unknown error"
+msgstr "Erro desconhecido"
+
+#: ..\../commands/sendhl7command.cpp:134
+msgid "Failed to start connection"
+msgstr "Ocorreu uma falha ao iniciar a conexão"
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid "Error sending message. It was sent "
+msgstr "Erro ao enviar mensagem. Foi enviada "
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr " bytes de "
+
+#: ..\../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:258
+#, fuzzy
+msgid "Failed delivery confirmation:"
+msgstr "Falha no \"fork\""
+
+#: ..\../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:51
+#, fuzzy
+msgid "Send files to PACS"
+msgstr "Arquivos"
+
+#: ..\../commands/sendpacscommand.cpp:155
+msgid "Uploading files ..."
+msgstr "Enviando arquivos ..."
+
+#: ..\../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr "Erro: Configuração do PACS não encontrada: "
+
+#: ..\../commands/sendpacscommand.cpp:181
+msgid "Error:"
+msgstr "Erro:"
+
+#: ..\../commands/sendpacscommand.cpp:189
+msgid "Error sending evidences: Internal error."
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:203
+msgid "Error uploading the study to PACS: "
+msgstr "Erro ao carregar o estudo para o PACS: "
+
+#: ..\../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:206
+#, fuzzy
+msgid "Retry send to PACS"
+msgstr ""
+"\n"
+"Gostaria de tentar novamente?"
+
+#: ..\../commands/synchronizationcommand.cpp:104
+#, fuzzy
+msgid "Error downloading file"
+msgstr "Baixando arquivo %d"
+
+#: ..\../commands/synchronizationcommand.cpp:141
+#, fuzzy
+msgid "Error synchronizing study: "
+msgstr "Erro ao carregar estudo: Erro Interno"
+
+#: ..\../commands/thumbnailscommand.cpp:107
+#: ..\../commands/thumbnailscommand.cpp:133
+#: ..\../commands/thumbnailscommand.cpp:247
+#: ..\../commands/thumbnailscommand.cpp:376
+#: ..\../commands/thumbnailscommand.cpp:382
+#: ..\../main/gui/import/selectimagesimportation.cpp:504
+msgid "Creating Thumbnail..."
+msgstr "Criando Thumbnail..."
+
+#: ..\../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr "Gerando thumbnail ..."
+
+#: ..\../export/tools/iaddfiletohistorytool.cpp:19
+#: ..\../main/gui/history3/historypanel3.cpp:632
+#, fuzzy
+msgid "Open study"
+msgstr "&Abrir"
+
+#: ..\../export/tools/iangletool.cpp:19
+msgid "Angle \tCtrl+A"
+msgstr ""
+
+#: ..\../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr ""
+
+#: ..\../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr ""
+
+#: ..\../export/tools/icolormaptool.cpp:20
+#, fuzzy
+msgid "Color Map"
+msgstr "BMP: Não foi possível gravar mapa de cores RGB."
+
+#: ..\../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ..\../main/gui/open/opendialogsbase.cpp:46
+#: ..\../main/gui/open/opendialogsbase.cpp:198
+#, fuzzy
+msgid "Copy"
+msgstr "&Copiar"
+
+#: ..\../export/tools/icornerannotationstool.cpp:20
+msgid "Window annotations"
+msgstr "Anotações de janela"
+
+#: ..\../export/tools/idetachwindowtool.cpp:19
+#, fuzzy
+msgid "Detach window"
+msgstr "&Janela"
+
+#: ..\../export/tools/iimageexporttool.cpp:19
+#, fuzzy
+msgid "Export image..."
+msgstr "imagem"
+
+#: ..\../export/tools/imarkertool.cpp:20
+msgid "Marking Tools \tCtrl+M"
+msgstr ""
+
+#: ..\../export/tools/imetricgridtool.cpp:20
+#, fuzzy
+msgid "Metric grid"
+msgstr "Grade"
+
+#: ..\../export/tools/inotetool.cpp:19
+msgid "Text Note \tCtrl+N"
+msgstr ""
+
+#: ..\../export/tools/ipacsuploadtool.cpp:19
+#, fuzzy
+msgid "Upload study..."
+msgstr "Enviar imagens para o servidor PACS"
+
+#: ..\../export/tools/ipixelsbluringtool.cpp:20
+msgid "Pixels blurring"
+msgstr ""
+
+#: ..\../export/tools/ipointertool.cpp:19
+msgid "Pointer \tEsc"
+msgstr ""
+
+#: ..\../export/tools/iqueryretrievetool.cpp:19
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#: ..\../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr "Acquire a DICOM study from PACS"
+
+#: ..\../export/tools/iresettool.cpp:19
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+msgid "Reset"
+msgstr ""
+
+#: ..\../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr ""
+
+#: ..\../export/tools/iruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: ..\../export/tools/isecondarycapturetool.cpp:19
+msgid "Save snapshot as new series..."
+msgstr ""
+
+#: ..\../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr ""
+
+#: ..\../export/tools/ishowtagstool.cpp:19
+#: ..\../main/tools/showtagshistorytool.cpp:27
+#, fuzzy
+msgid "DICOM inspector"
+msgstr "DICOM Inspector"
+
+#: ..\../export/tools/isimpleprinttool.cpp:19
+#: ..\../main/tools/simpleprinttool.cpp:226
+#, fuzzy
+msgid "Print"
+msgstr "&Imprimir"
+
+#: ..\../export/tools/istartdicomizationtool.cpp:19
+#, fuzzy
+msgid "Dicomize..."
+msgstr "Fechar automaticamente Ginkgo CADx após dicomização"
+
+#: ..\../export/tools/itoolpan.cpp:19
+msgid "Pan \tCtrl+P"
+msgstr ""
+
+#: ..\../export/tools/itoolslider.cpp:19
+#, fuzzy
+msgid "Slider \tCtrl+S"
+msgstr "%s (ou %s)"
+
+#: ..\../export/tools/itoolwindowlevel.cpp:19
+msgid "Window/Level \tCtrl+W"
+msgstr ""
+
+#: ..\../export/tools/itoolzoom.cpp:19
+#, fuzzy
+msgid "Zoom \tCtrl+O"
+msgstr "Zoom &In"
+
+#: ..\../export/tools/itrackballtool.cpp:19
+#, fuzzy
+msgid "Trackball \tCtrl+T"
+msgstr "\t%s: %s\n"
+
+#: ..\../export/tools/iundotool.cpp:20 ..\../main/tools/undotool.cpp:109
+#, fuzzy
+msgid "Undo"
+msgstr "&Desfazer"
+
+#: ..\../export/tools/ivideotool.cpp:19
+#, fuzzy
+msgid "Video \tCtrl+Space"
+msgstr "ESPA�O"
+
+#: ..\../export/tools/iwindowlayouttool.cpp:20
+#, fuzzy
+msgid "Window layout"
+msgstr "&Janela"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+#, fuzzy
+msgid "Studies with"
+msgstr ""
+"Não foi possível esvaziar o histórico, você precisa fechar os estudos abertos"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr " componentes não suportados"
+
+#: ..\../main/controllers/controladorcarga.cpp:210
+#, fuzzy
+msgid "Reading properties"
+msgstr "&Propriedades"
+
+#: ..\../main/controllers/controladorcarga.cpp:219
+#: ..\../main/controllers/controladorcarga.cpp:642
+#: ..\../main/controllers/controladorcarga.cpp:888
+#: ..\../main/controllers/streaming/streamingloader.cpp:600
+msgid "Error reading the study: "
+msgstr "Erro ao ler o estudo: "
+
+#: ..\../main/controllers/controladorcarga.cpp:224
+#: ..\../main/controllers/controladorcarga.cpp:229
+#: ..\../main/controllers/controladorcarga.cpp:647
+#: ..\../main/controllers/controladorcarga.cpp:893
+msgid "Internal error reading the study: "
+msgstr "Erro interno ao ler o estudo: "
+
+#: ..\../main/controllers/controladorcarga.cpp:269
+#: ..\../main/controllers/controladorcarga.cpp:281
+#: ..\../main/controllers/controladorcarga.cpp:905
+#, fuzzy
+msgid "Spacing is not valid: ("
+msgstr "Espa�amento"
+
+#: ..\../main/controllers/controladorcarga.cpp:305
+#: ..\../main/controllers/controladorcarga.cpp:338
+#: ..\../main/controllers/controladorcarga.cpp:372
+#: ..\../main/controllers/controladorcarga.cpp:408
+#: ..\../main/controllers/controladorcarga.cpp:441
+#: ..\../main/controllers/controladorcarga.cpp:474
+#: ..\../main/controllers/controladorcarga.cpp:507
+#: ..\../main/controllers/controladorcarga.cpp:540
+#: ..\../main/controllers/controladorcarga.cpp:573
+#: ..\../main/controllers/controladorcarga.cpp:606
+#: ..\../main/controllers/controladorcarga.cpp:935
+msgid "Error loading the study: Out of memory"
+msgstr "Erro ao carregar o estudo: Sem memória"
+
+#: ..\../main/controllers/controladorcarga.cpp:375
+msgid "Error loading the study: Internal Error"
+msgstr "Erro ao carregar estudo: Erro Interno"
+
+#: ..\../main/controllers/controladorcarga.cpp:630
+#: ..\../main/controllers/streaming/streamingloader.cpp:1023
+#: ..\../main/controllers/streaming/streamingloader.cpp:1223
+#: ..\../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr "Erro ao ler o estudo: Formato de pixel não suportado"
+
+#: ..\../main/controllers/controladorcarga.cpp:651
+#: ..\../main/controllers/controladorcarga.cpp:960
+#, fuzzy
+msgid "Process canceled by user."
+msgstr "Usuário"
+
+#: ..\../main/controllers/controladorcarga.cpp:878
+#, fuzzy
+msgid "Interpreting properties"
+msgstr "&Propriedades"
+
+#: ..\../main/controllers/controladorcarga.cpp:917
+#, fuzzy
+msgid "Spacing of the image is invalid: ("
+msgstr "Índice de imagem TIFF inválido "
+
+#: ..\../main/controllers/controladorcarga.cpp:942
+#, fuzzy
+msgid "Reading dataset"
+msgstr "lendo"
+
+#: ..\../main/controllers/controladorcarga.cpp:951
+msgid "Error reading the study:"
+msgstr "Erro ao ler o estudo:"
+
+#: ..\../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr "Erro interno ao ler o estudo:"
+
+#: ..\../main/controllers/controladorcarga.cpp:972
+msgid "load"
+msgstr "carregar"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:40
+#, fuzzy
+msgid "Stopping HL7 sender"
+msgstr "Serviço HL7"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:63
+#: ..\../main/controllers/controladorenviohl7.cpp:76
+msgid "Error starting HL7 sender"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:65
+#: ..\../main/controllers/controladorenviohl7.cpp:78
+#, fuzzy
+msgid "HL7 sender started"
+msgstr "Serviço HL7"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:108
+#, fuzzy
+msgid "HL7 controller destroyed"
+msgstr "Serviço HL7"
+
+#: ..\../main/controllers/controladorenviohl7.cpp:150
+#, fuzzy
+msgid "Error processing message"
+msgstr "Mensagem de erro"
+
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/controllers/pacscontroller.cpp:1549
+#: ..\../main/controllers/pacscontroller.cpp:1553
+#: ..\../main/controllers/pacscontroller.cpp:1557
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:184
+#, fuzzy
+msgid "Unknown"
+msgstr "Desconhecido"
+
+#: ..\../main/controllers/controladorextensiones.cpp:110
+#, fuzzy
+msgid "Loading"
+msgstr "Carregando : "
+
+#: ..\../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr "Não foi possível carregar arquivo da biblioteca de extensão."
+
+#: ..\../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr "Não foi possível carregar arquivo da biblioteca. Verifique o log"
+
+#: ..\../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:153
+msgid "Could not find entry point"
+msgstr "Não foi possível encontrar ponto de entrada"
+
+#: ..\../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:74
+msgid "Integration engine hostname not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:77
+msgid "Integration engine port not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:91
+msgid "Unsupported protocol"
+msgstr "Protocolo não suportado"
+
+#: ..\../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr "%d resultados foram encontrados"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, c-format
+msgid "Downloading file %d/%d"
+msgstr "Baixando arquivo %d/%d"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+#, fuzzy
+msgid "Image format not supported"
+msgstr "PCX: formato de imagem não suportado"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr "Erro ao configurar TLS: "
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:200
+#, fuzzy
+msgid "Receiving Association failed: "
+msgstr "Falha no \"fork\""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:209
+msgid "Association received"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:210
+#, fuzzy
+msgid "Parameters:"
+msgstr "Parâmetros de configuração da estação local"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ")"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:274
+#, fuzzy
+msgid "No valid presentation contexts"
+msgstr "'%s' não é um catálogo de mensagens válido."
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+#, fuzzy
+msgid "Association(dicom://"
+msgstr "DICOM nodes"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr "@"
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr "O Ginkgo CADx não pode comprimir de "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr " para "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, c-format
+msgid "Uploading file %d of %d"
+msgstr "Enviando arquivo %d de %d"
+
+#: ..\../main/controllers/dicommanager.cpp:504
+#: ..\../main/controllers/dicommanager.cpp:531
+msgid "Extracting file..."
+msgstr "Extracting file..."
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid "Error creating history database "
+msgstr "Erro ao criar histórico do banco de dados "
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:343
+#, fuzzy
+msgid "Error creating dicomDir database "
+msgstr "Erro ao criar histórico do banco de dados "
+
+#: ..\../main/controllers/historycontroller.cpp:425
+#: ..\../main/controllers/historycontroller.cpp:441
+#, fuzzy
+msgid "Error creating thumbnails database "
+msgstr "Erro ao criar histórico do banco de dados "
+
+#: ..\../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr "Erro ao criar o banco de dados:\n"
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#, fuzzy
+msgid "Including image "
+msgstr "imagem"
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr " de "
+
+#: ..\../main/controllers/historycontroller.cpp:707
+#, fuzzy
+msgid "Linking image "
+msgstr "imagem"
+
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr "Erro ao ler histórico: \n"
+
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr "Ocorreu uma falha ao esvaziar o histórico:\n"
+
+#: ..\../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+"O Ginkgo CADx detectou inatividade e será fechado em %d segundos.\n"
+"Você gostaria de continuar?"
+
+#: ..\../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#, fuzzy
+msgid "Malformed template Id ("
+msgstr "Identificador"
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+"):\n"
+"não é um identificador HL7 válido (ie: code^description^namespaceid)"
+
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+#, fuzzy
+msgid "Template Id unsupported ("
+msgstr "Identificador"
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr ""
+"):\n"
+"Verifique a configuração e anexe-a se necessário"
+
+#: ..\../main/controllers/integrationcontroller.cpp:566
+#, fuzzy
+msgid "Unknown module Id ("
+msgstr "<ID desconhecido>"
+
+#: ..\../main/controllers/integrationcontroller.cpp:592
+msgid "Empty configuration"
+msgstr "Configuração vazia"
+
+#: ..\../main/controllers/integrationcontroller.cpp:631
+msgid "XML Parser Not Found. Key="
+msgstr "Parser XML não encontrado. Chave="
+
+#: ..\../main/controllers/log4cplus/guiappender.cpp:75
+#, fuzzy
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr "%d/%m/%Y %H:%M:%S"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ..\../main/gui/history3/historypanel3base.cpp:48
+#: ..\../main/gui/import/pasosimportacionbase.cpp:227
+#, fuzzy
+msgid "Patient"
+msgstr ""
+"\n"
+"* É necessário o ID do paciente."
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#, fuzzy
+msgid "Patient ID"
+msgstr ""
+"\n"
+"* É necessário o ID do paciente."
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:86
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ..\../main/gui/history3/historypanel3.cpp:227
+#: ..\../main/gui/open/opendialogs.cpp:50
+#, fuzzy
+msgid "Modality"
+msgstr " para a modalidade "
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:98
+msgid "Dimensions"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:109
+#, fuzzy, c-format
+msgid "Made with %s"
+msgstr "%s (ou %s)"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:167
+#: ..\../main/controllers/modalitysettingscontroller.cpp:338
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr "Padrão"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1212
+#, fuzzy
+msgid "Downloading file"
+msgstr "Baixando arquivo %d"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+#, fuzzy
+msgid "Error downloading WADO file"
+msgstr "Baixando arquivo %d"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+#, fuzzy
+msgid "Check PACS configuration"
+msgstr "Habilitar configuração remota do PACS"
+
+#: ..\../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1428
+#, fuzzy
+msgid "Invalid HTTP response"
+msgstr "Habilitar proxy HTTP"
+
+#: ..\../main/controllers/pacscontroller.cpp:1433
+#, fuzzy
+msgid "Invalid HTTP code"
+msgstr "&C�digo do caractere:"
+
+#: ..\../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1472
+#, fuzzy
+msgid "PACS-Service"
+msgstr "Serviço HL7"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:97
+#: ..\../main/controllers/parserxmlspanish.cpp:94
+#, fuzzy
+msgid "Omitted Identificator"
+msgstr "Identificator *"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:105
+#: ..\../main/controllers/parserxmlspanish.cpp:102
+#, fuzzy
+msgid "Omitted AET"
+msgstr "AET"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:113
+#: ..\../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:121
+#: ..\../main/controllers/parserxmlspanish.cpp:118
+#, fuzzy
+msgid "Omitted port"
+msgstr ""
+"\n"
+"A porta é muito grande"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:206
+#: ..\../main/controllers/parserxmlenglish.cpp:237
+#: ..\../main/controllers/parserxmlspanish.cpp:188
+#: ..\../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr "O tamanho do PDU não é um número válido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:212
+#: ..\../main/controllers/parserxmlspanish.cpp:194
+#, fuzzy
+msgid "Port is not a valid number"
+msgstr "O tamanho do PDU não é um número válido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:248
+#: ..\../main/controllers/parserxmlspanish.cpp:228
+#, fuzzy
+msgid "The port is not a valid number"
+msgstr "O tamanho do PDU não é um número válido"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:265
+#: ..\../main/controllers/parserxmlspanish.cpp:246
+#, fuzzy
+msgid "Setting not found"
+msgstr "Encontrado"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:391
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:427
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:434
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:445
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:483
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:548
+#: ..\../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:552
+#: ..\../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:570
+#: ..\../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr ""
+"Você precisa definir um PACS padrão no XML de integração ou no menu de "
+"configurações"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:340
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:402
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:438
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:445
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:486
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:524
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:559
+#, fuzzy
+msgid "id_application expected"
+msgstr "Identificador"
+
+#: ..\../main/controllers/smartretrievecontroller.cpp:124
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:920
+msgid "Downloading from PACS..."
+msgstr "Baixando do PACS..."
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:303
+#: ..\../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr "Erro interno ao ler o estudo, formato desconhecido "
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ..\../main/gui/history3/historytablemodel.cpp:403
+#: ..\../main/gui/history3/historytablemodel.cpp:415
+#: ..\../main/gui/history3/historytablemodel.cpp:470
+#: ..\../main/gui/history3/historytablemodel.cpp:482
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:102
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr "%d/%m/%Y %H:%M:%S"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr "%d/%m/%Y 00:00:00"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+msgid "Exploring PACS..."
+msgstr "Explorando PACS..."
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ..\../main/gui/history3/historypanel3.cpp:225
+#: ..\../main/gui/open/opendialogs.cpp:49
+#, fuzzy
+msgid "Patient id"
+msgstr ""
+"\n"
+"* É necessário o ID do paciente."
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ..\../main/gui/history3/historypanel3.cpp:224
+#: ..\../main/gui/open/opendialogs.cpp:48
+#, fuzzy
+msgid "Patient name"
+msgstr ""
+"\n"
+"* Concatenação do nome e sobrenome do paciente não pode ultrapassar 61 "
+"caracteres."
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:479
+msgid "Study Instance UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ..\../main/gui/history3/historypanel3.cpp:231
+#: ..\../main/gui/open/opendialogs.cpp:53
+msgid "Accession number"
+msgstr "Numero de Acesso"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:481
+msgid "Study date"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:482
+#, fuzzy
+msgid "Study time"
+msgstr "Tempo decorrido: "
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:490
+#, fuzzy
+msgid "Series Instance UID"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:492
+#, fuzzy
+msgid "Series date"
+msgstr "data"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:493
+#, fuzzy
+msgid "Series time"
+msgstr "Tempo decorrido: "
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:519
+msgid "No results found"
+msgstr "Nenhum resultado encontrado"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#, fuzzy
+msgid "Write query name"
+msgstr "Nome"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#, fuzzy
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr ""
+"O arquivo existe\n"
+"Você gostaria de sobrescrevê-lo?"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+msgid "Id"
+msgstr "Identificador"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+msgid "Date Time"
+msgstr "Data e Hora"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ..\../main/gui/history3/historypanel3.cpp:229
+#: ..\../main/gui/import/pasosimportacionbase.cpp:298
+#: ..\../main/gui/import/pasosimportacionbase.cpp:340
+#: ..\../main/gui/open/opendialogs.cpp:52
+msgid "Description"
+msgstr "Descrição"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ..\../main/gui/import/pasosimportacionbase.cpp:276
+msgid "Accession Number"
+msgstr "Numero de Acesso"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:210
+msgid "Store query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:211
+#, fuzzy
+msgid "Remove query"
+msgstr "Remove"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:278
+#, fuzzy
+msgid "There is no any PACS configured"
+msgstr "<Qualquer>"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+#, fuzzy
+msgid "Study UID"
+msgstr "Erro ao carregar estudo: "
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+#, fuzzy
+msgid "Search"
+msgstr "Pesquisar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:519
+#, fuzzy
+msgid "Download series"
+msgstr "Download"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+#, fuzzy
+msgid "Download study"
+msgstr "Download"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:535
+#, fuzzy
+msgid "Link series"
+msgstr "<LINK>"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:537
+#, fuzzy
+msgid "Link study"
+msgstr "<LINK>"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:551
+#, fuzzy
+msgid "Properties..."
+msgstr "&Propriedades"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#, fuzzy
+msgid "You must specify at least a modality or a period of time"
+msgstr "Você precisa selecionar ao menos uma imagem"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#, fuzzy
+msgid "Select a valid query"
+msgstr "SELECT"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#, fuzzy
+msgid "Select a valid PACS Server"
+msgstr "Enviar imagens para o servidor PACS"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid "Download of modality "
+msgstr "Download da modalidade "
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr " não é permitido"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "Modality download error"
+msgstr "Erro ao baixar modalidade"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:786
+msgid "search results"
+msgstr "Resultados da busca"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:913
+#, fuzzy
+msgid "Downloading serie..."
+msgstr "Baixando arquivos ..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:916
+#, fuzzy
+msgid "Downloading study..."
+msgstr "Erro ao baixar estudo: "
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+#, fuzzy
+msgid "PACS acquisition is restricted"
+msgstr "Explorando PACS..."
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+#, fuzzy
+msgid "Server"
+msgstr "Server settings"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ..\../main/gui/import/pasosimportacionbase.cpp:284
+#: ..\../main/gui/import/pasosimportacionbase.cpp:326
+#: ..\../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr "Data"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ..\../main/gui/history3/historypanel3base.cpp:81
+msgid "Any date"
+msgstr "Qualquer data"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ..\../main/gui/history3/historypanel3base.cpp:85
+#, fuzzy
+msgid "Today AM"
+msgstr "hoje"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ..\../main/gui/history3/historypanel3base.cpp:88
+#, fuzzy
+msgid "Today PM"
+msgstr "hoje"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ..\../main/gui/history3/historypanel3base.cpp:91
+#, fuzzy
+msgid "Today"
+msgstr "hoje"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ..\../main/gui/history3/historypanel3base.cpp:100
+msgid "Yesterday"
+msgstr "Ontem"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ..\../main/gui/history3/historypanel3base.cpp:103
+#, fuzzy
+msgid "Last 7 days"
+msgstr "7"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ..\../main/gui/history3/historypanel3base.cpp:106
+#, fuzzy
+msgid "Last 30 days"
+msgstr "Refazer �ltima a��o"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ..\../main/gui/history3/historypanel3base.cpp:109
+#, fuzzy
+msgid "Last 3 months"
+msgstr "3"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ..\../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr "Entre:"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ..\../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+#, fuzzy
+msgid "Stored queries"
+msgstr "O arquivo não pode ser armazenado "
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+#, fuzzy
+msgid "Select stored queries..."
+msgstr "SELECT"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ..\../main/gui/open/opendialogsbase.cpp:50
+#: ..\../main/gui/open/opendialogsbase.cpp:202
+#, fuzzy
+msgid "Link"
+msgstr "<LINK>"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+msgid "Download"
+msgstr "Download"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ..\../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr "Fechar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+#, fuzzy
+msgid "Series does not exist"
+msgstr ": arquivo não existe!"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr "Avançar"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ..\../main/gui/open/opendialogsbase.cpp:127
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ..\../main/tools/metricgridtool.cpp:101
+#, fuzzy
+msgid "Ok"
+msgstr "&OK"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:151
+#, fuzzy
+msgid "Download again"
+msgstr "Download"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+msgid "Open"
+msgstr "Abrir"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:179
+#, fuzzy
+msgid "Set query name"
+msgstr "Nome"
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:32
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:34
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizedialog.cpp:64
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ..\../main/gui/export/parametrosprincipales.cpp:194
+msgid "Exporting images ..."
+msgstr "Exportando imagens ..."
+
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:21
+#, fuzzy
+msgid "Common tags"
+msgstr "Ginkgo CADx private tags"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+msgid "Patient's name and surname"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+#, fuzzy
+msgid "Patient Id"
+msgstr ""
+"\n"
+"* É necessário o ID do paciente."
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr "Comentários"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:44
+#, fuzzy
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr "Ginkgo CADx private tags"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:71
+#, fuzzy
+msgid "Add new..."
+msgstr "Não é possível adicionar um novo diretório a esta seção."
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ..\../main/tools/anonymizetool.cpp:26
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr "Deixar anônimo"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:136
+#, fuzzy
+msgid "Create new"
+msgstr "Criar novo diretório"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:136
+#, fuzzy
+msgid "Add DICOM tag"
+msgstr "SOMA"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:199
+#, fuzzy
+msgid "Group"
+msgstr "a entrada '%s' aparece mais de uma vez no grupo '%s'"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:203
+#, fuzzy
+msgid "Element"
+msgstr "Uma coleção que não seja vazia precisa consistir de nós 'elementos'"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ..\../widgets/wangulo.cpp:1114
+msgid "Value"
+msgstr "Valor"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+msgid "Top right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+msgid "Top left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+msgid "Bottom left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+msgid "Bottom right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#, fuzzy
+msgid "You must fill in all fields"
+msgstr "Você precisa preencher todos os campos para continuar"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+msgid "Window/level label in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+#, fuzzy
+msgid "Window"
+msgstr "&Janela"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+#, fuzzy
+msgid "Level"
+msgstr "&Fonte para n�vel..."
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+msgid "Do you confirm the removal of the preset?"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Data modified"
+msgstr "Dados modificados"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+#, fuzzy
+msgid "Modality settings"
+msgstr " para a modalidade "
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+#, fuzzy
+msgid "Default modality settings"
+msgstr " para a modalidade "
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, fuzzy, c-format
+msgid "%s settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:60
+#, fuzzy
+msgid "settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Export Configuration"
+msgstr "Exportar configuração"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+#, fuzzy
+msgid "Ini Files(*.ini)|*.ini"
+msgstr "Impossível excluir o arquivo INI '%s'"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+"O arquivo existe\n"
+"Você gostaria de sobrescrevê-lo?"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+msgid "Existing file"
+msgstr "Arquivo existente"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+msgid "Export successfully completed"
+msgstr "Exportação concluída com sucesso"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+msgid "There was an error during exportation"
+msgstr "There was an error during exportation"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+#, fuzzy
+msgid "Import Configuration"
+msgstr "Configuração vazia"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+#, fuzzy
+msgid "Ini files(*.ini)|*.ini"
+msgstr "Impossível excluir o arquivo INI '%s'"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#, fuzzy
+msgid "There was an error during importation, check permissions"
+msgstr "Erro ao armazenar arquivo, verifique permissões do diretório."
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+msgid "Dicom tag"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+#, fuzzy
+msgid "Split horizontally..."
+msgstr "Lado a lado &horizontalmente"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+#, fuzzy
+msgid "Split vertically..."
+msgstr "Lado a lado &verticalmente"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ..\../main/tools/windowlayouttool.cpp:273
+#, fuzzy
+msgid "Split active horizontally"
+msgstr "Ativo"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ..\../main/tools/windowlayouttool.cpp:274
+#, fuzzy
+msgid "Split active vertically"
+msgstr "Ativo"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+#, fuzzy
+msgid "New hanging protocol"
+msgstr "&Novo"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, fuzzy, c-format
+msgid "Window %d"
+msgstr "&Janela"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr "Ativo"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "Yes"
+msgstr "Sim"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+msgid "Hanging protocols"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+#, fuzzy
+msgid "One day"
+msgstr "Dica do dia"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+#, fuzzy
+msgid "Two days"
+msgstr "Grade (duas colunas)"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+#, fuzzy
+msgid "Three days"
+msgstr "Grade (três colunas)"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+#, fuzzy
+msgid "Two weeks"
+msgstr "Grade (duas colunas)"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+msgid "One month"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+#, fuzzy
+msgid "Three months"
+msgstr "Grade (três colunas)"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+#, fuzzy
+msgid "Local database"
+msgstr "Erro ao criar histórico do banco de dados "
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+msgid "Local DICOM Dir setup"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+"Ocorreu uma falha ao criar o diretório, verifique se o caminho está correto "
+"e se você tem permissões no diretório principal"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+"Ocorreu um erro ao acessar o diretório, verifique se você tem acesso de "
+"escrita nele"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+#, fuzzy
+msgid "Select DICOMDIR"
+msgstr "SELECT"
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+"Aviso, para atualizar o conteúdo do diretório você precisa fechar séries "
+"abertas no momento."
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr "Estação de Trabalho"
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr "Parâmetros de configuração da estação local"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr "Extenções"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+msgid "Extensions settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr ""
+"Ginkgo CADx precisa ser reiniciado para que as alterações nas extensões "
+"surtam efeito."
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#, fuzzy
+msgid "Port has to be a valid number"
+msgstr "O tamanho do PDU não é um número válido"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr "Geral"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+msgid "General configuration parameters"
+msgstr "Parâmetros de configuração geral"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr ""
+"O Ginkgo CADx precisa ser reiniciado para que as mudanças surtam efeito."
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:134
+#, fuzzy
+msgid "Testing conectivity with the server..."
+msgstr "Server settings"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:144
+msgid "Error connecting to url"
+msgstr "Erro ao conectar-se a url"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#, fuzzy
+msgid "hostname/port not set"
+msgstr "Impossível obter o nome da máquina"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr "Falha na conexão de teste"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr "Conexão de teste bem sucedida"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+#, fuzzy
+msgid "Select certificate"
+msgstr "Certificado"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr "Você precisa configurar uma chave pública e uma privada"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:255
+msgid "Change ..."
+msgstr "Alterar ..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+#, fuzzy
+msgid "Import ..."
+msgstr "Você precisa selecionar as imagens que você deseja importar"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:279
+#, fuzzy
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr ""
+"\n"
+"Se você deseja utilizar SSL/TLS, você terá que informar um certificado "
+"válido e uma chave privada"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:472
+msgid "There are this errors: "
+msgstr "Ocorreram os seguintes erros: "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+"\n"
+"Este ID de PACS está em uso"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"O número da porta deve ser um inteiro positivo curto (16 bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+"\n"
+"A porta é muito grande"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+"\n"
+"O comprimento máximo do AET é de 16 caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+"\n"
+"O tamanho do PDU deve ser maior ou igual a zero (padrão = 16384)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+"\n"
+"O valor máximo do PDU é "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+"\n"
+"O valor mínimo do PDU é "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+"\n"
+"Se você deseja utilizar SSL/TLS, você terá que informar um certificado "
+"válido e uma chave privada"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:525
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr "Você precisa preencher todos os campos para continuar"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:558
+#, fuzzy
+msgid "Testing the connection to the node ..."
+msgstr "DICOM Node"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:561
+msgid "DICOM Error"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:607
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:616
+#, fuzzy
+msgid "Invalid port number"
+msgstr "&N�mero:"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:622
+#, fuzzy
+msgid "WADO Error"
+msgstr "Erro: "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:703
+msgid "Use by default"
+msgstr "Usar por padrão"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:795
+msgid "DICOM nodes"
+msgstr "DICOM nodes"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:800
+msgid "DICOM nodes settings"
+msgstr "DICOM nodes settings"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"A porta local deve ser um inteiro curto positivo (16 bits)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+"\n"
+"A porta local é muito grande"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+"\n"
+"A quantidade máxima de caracteres para AET local é de 16 caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr "Confirm the removal of the node"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Você precisa configurar o AET local, o qual é usado para se comunicar com os "
+"nós DICOM. A porta especificada deve ser liberada no firewall, já que ela é "
+"essencial para as transferências."
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ..\../main/gui/export/pasosexportacionbase.cpp:20
+#, fuzzy
+msgid "Profile"
+msgstr "Confirmar remoção do perfil "
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr "Valor padrão"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#, fuzzy
+msgid "Set property active"
+msgstr "Ativo"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr "Inactive"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+#, fuzzy
+msgid "Set property inactive"
+msgstr "Inactive"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#, fuzzy
+msgid "Set default value"
+msgstr "Valor padrão"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+#, fuzzy
+msgid "Set by user"
+msgstr "Usuário"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#, fuzzy
+msgid "Profile name can't be repeated"
+msgstr "Nome de usuário repetido"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr "Você precisa preencher o campo nome para continuar"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+#, fuzzy
+msgid "Profiles Settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr ""
+"O Ginkgo CADx precisa ser reiniciado para que as mudanças de permissão "
+"surtam efeito."
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+msgid "Confirm the removal of the profile "
+msgstr "Confirmar remoção do perfil "
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+#, fuzzy
+msgid "New User"
+msgstr "&Novo"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr "Nome de usuário precisa ter ao menos quatro caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+msgid "User name repeated"
+msgstr "Nome de usuário repetido"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#, fuzzy
+msgid "Password has to contain at least 6 characters"
+msgstr "Nome de usuário precisa ter ao menos quatro caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+#, fuzzy
+msgid "No login"
+msgstr "Login do usuário"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+msgid "User/Password"
+msgstr "Usuário/Senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+#, fuzzy
+msgid "Password"
+msgstr "Usuário/Senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+#, fuzzy
+msgid "Password is setted"
+msgstr "Usuário/Senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr "Alterar senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+#, fuzzy
+msgid "Password is not setted"
+msgstr "Usuário/Senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+msgid "Set password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+#, fuzzy
+msgid "Security Setting"
+msgstr "A configuração de prioridade da thread foi ignorada."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr "Você precisa criar ao menos um usuário"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr "Você precisa escolher a senha principal"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+msgid "User inserted successfully"
+msgstr "Usuário criado com sucesso"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr ""
+"Ocorreu um erro ao inserir o usuário. Para obter mais informações, abra o "
+"log."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#, fuzzy
+msgid "Password changed successfully"
+msgstr "Usuário/Senha"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr ""
+"Ocorreu um erro ao alterar a sua senha. Para obter mais informações, abra o "
+"log."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+msgid "User deleted successfully"
+msgstr "Usuário deletado com sucesso"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr ""
+"Ocorreu um erro ao remover o usuário. Para obter mais informações, abra o "
+"log."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr "O Ginkgo CADx precisa ter ao menos um usuário."
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ..\../main/gui/login/dialogologin.cpp:27
+msgid "User"
+msgstr "Usuário"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ..\../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr "Escolha um diretório"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#, fuzzy
+msgid "Maximum length of title is 8 characters"
+msgstr ""
+"\n"
+"O comprimento máximo do AET é de 16 caracteres"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr "O diretório selecionado não pode ser aberto"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr "Você precisa preencher os campos título e o local para continuar"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+#, fuzzy
+msgid "Title"
+msgstr "Você precisa preencher os campos título e o local para continuar"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+#, fuzzy
+msgid "Path"
+msgstr "The caminho '%s' contém muitos \"..\"!"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+msgid "Clean before"
+msgstr "Limpar antes"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+msgid "Clean after"
+msgstr "Limpar depois"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+#, fuzzy
+msgid "Location Settings"
+msgstr "Configurar localização"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr "Anonimização"
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:96
+msgid "Anonymization settings"
+msgstr "Configurações de anonimização"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1370
+#, fuzzy
+msgid "Settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+#, fuzzy
+msgid "Export config..."
+msgstr "Erro ao ler opções de configuração."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+#, fuzzy
+msgid "Import config..."
+msgstr "Erro ao ler opções de configuração."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr "Aplicar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+#, fuzzy
+msgid "Physician's name"
+msgstr "Nome"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+#, fuzzy
+msgid "Physician's Id"
+msgstr "Identificador"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+#, fuzzy
+msgid "Service"
+msgstr "Serviço HL7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+#, fuzzy
+msgid "Service's name"
+msgstr "Nome"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+#, fuzzy
+msgid "Service's Id"
+msgstr "Identificador"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+#, fuzzy
+msgid "Local institution"
+msgstr "Parâmetros de configuração da estação local"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+#, fuzzy
+msgid "Institution's name"
+msgstr "Nome"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+#, fuzzy
+msgid "Institution's Id"
+msgstr "Identificador"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+msgid "Dicomized files"
+msgstr "Arquivos dicomizados"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+msgid "Charset"
+msgstr "Codificação de caracteres"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr "ISO_IR 192"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr "ISO_IR 6"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr "ISO_IR 100"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr "ISO_IR 101"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr "SO_IR 109"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr "ISO_IR 110"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr "ISO_IR 126"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr "ISO_IR 127"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr "ISO_IR 138"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr "ISO_IR 144"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+msgid "ISO_IR 148"
+msgstr "ISO_IR 148"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+msgid "Automatically check for updates"
+msgstr "Checar por atualizações automaticamente"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+msgid "Proxy settings"
+msgstr "Proxy settings"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+msgid "Enable http proxy"
+msgstr "Habilitar proxy HTTP"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+#, fuzzy
+msgid "Proxy Settings"
+msgstr "Proxy settings"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+msgid "Server settings"
+msgstr "Server settings"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+#, fuzzy
+msgid "Host"
+msgstr ""
+"Para implementação em larga-escala em um ambiente homogêneo, você pode "
+"especificar os seguintes curingas para o AET local:\n"
+"\t%IP Endereço IP\n"
+"\t%IP<n> n-ésimo octeto (1~4)\n"
+"\t%HOSTNAME hostname\""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+#, fuzzy
+msgid "Port"
+msgstr ""
+"\n"
+"A porta é muito grande"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr "Autenticação"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+#, fuzzy
+msgid "Username"
+msgstr "Falha na conexão: faltando usuário/senha."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr "Exceções"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+#, fuzzy
+msgid "No proxy for addresses containing"
+msgstr "Proxy settings"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+msgid "DICOM Dir"
+msgstr "Diretório DICOM"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr "O diretório DICOM é o local onde o histórico é armazenado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr "..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+"Aviso, para atualizar o conteúdo do diretório você precisa fechar todas as "
+"séries abertas"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+#, fuzzy
+msgid "Auto-cleaning"
+msgstr "Calcular automaticamente"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+#, fuzzy
+msgid "MB"
+msgstr "%.*f MB"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ..\../main/tools/toolwindowlevel.cpp:201
+#, fuzzy
+msgid "Reset to default"
+msgstr "padrão"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+"Você precisa configurar o AET local, o qual é usado para se comunicar com o "
+"servidor PACS. A porta especificada precisa ser aberta no firewall, já que é "
+"essencial para transferências."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+#, fuzzy
+msgid "Local AET"
+msgstr ""
+"\n"
+"A quantidade máxima de caracteres para AET local é de 16 caracteres"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+"Para implementação em larga-escala em um ambiente homogêneo, você pode "
+"especificar os seguintes curingas para o AET local:\n"
+"\t%IP Endereço IP\n"
+"\t%IP<n> n-ésimo octeto (1~4)\n"
+"\t%HOSTNAME hostname\""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr "Configurações avançadas..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+msgid "DICOM Nodes"
+msgstr "DICOM Nodes"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+#, fuzzy
+msgid "New ..."
+msgstr "&Novo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+msgid "Edit ..."
+msgstr "Editar ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete"
+msgstr "Excluir"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+#, fuzzy
+msgid "Set Default"
+msgstr ""
+"Existe um problema durante a configuração da página: você pode precisar "
+"configurar a impressora default"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+msgid "DICOM Node"
+msgstr "DICOM Node"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr "AET"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+msgid "PDU (KB)"
+msgstr "PDU (KB)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+#, fuzzy
+msgid "Retrieve method"
+msgstr "m�todo de compacta��o Zip n�o suportado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+#, fuzzy
+msgid "Move"
+msgstr "&Mover"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Get"
+msgstr "Obter"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+#, fuzzy
+msgid "WADO URL"
+msgstr "Erro ao conectar-se a url"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+#, fuzzy
+msgid "Retrieve mode"
+msgstr "Falha na mudança do modo de vídeo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ..\../main/gui/import/pasosimportacionbase.cpp:319
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1395
+#, fuzzy
+msgid "Series"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#, fuzzy
+msgid "Studies"
+msgstr ""
+"Não foi possível esvaziar o histórico, você precisa fechar os estudos abertos"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr "Reuse connection"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+msgid "Worklists"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+msgid "Select how do you want to handle MPPS items"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+#, fuzzy
+msgid "DICOM MPPS"
+msgstr "DICOM nodes"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+#, fuzzy
+msgid "HL7 messages"
+msgstr "Serviço HL7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+#, fuzzy
+msgid "HL7"
+msgstr "Serviço HL7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+#, fuzzy
+msgid "Abort message"
+msgstr "mensagem %s"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+#, fuzzy
+msgid "Completed message"
+msgstr "Exportação concluída com sucesso"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+#, fuzzy
+msgid "In progress message"
+msgstr "mensagem %s"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+#, fuzzy
+msgid "Default values"
+msgstr "padrão"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+msgid "Worklist"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+#, fuzzy
+msgid "SSL/TLS"
+msgstr "Usar SSL/TLS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+msgid "Verify server credentials"
+msgstr "Verificar credenciais do servidor"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+msgid "Use SSL/TLS"
+msgstr "Usar SSL/TLS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr "Certificado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+msgid "Certificate to use in this connection"
+msgstr "Certificado para usar nessa conexão"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr "Configuração avançada ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+#, fuzzy
+msgid "Default charset"
+msgstr "Codificação de caracteres"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+msgid "Advanced"
+msgstr "Avançado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr "Test connection"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr "Verificar credenciais de cliente"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+msgid "Local AET certificate"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+msgid "Certificate used by Ginkgo CADx"
+msgstr "Certificado usado pelo Ginkgo CADx"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+#, fuzzy
+msgid "Receiver organization Id"
+msgstr "Grid organization"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+#, fuzzy
+msgid "Petitioner System Id"
+msgstr "Identificador"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+#, fuzzy
+msgid "Filler Application Id"
+msgstr "Identificador"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+#, fuzzy
+msgid "Ginkgo CADx Application Id"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+msgid "Integration engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+#, fuzzy
+msgid "Hostname / Port"
+msgstr "Impossível obter o nome da máquina"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr "/"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+#, fuzzy
+msgid "Protocol"
+msgstr "Protocolo desconhecido"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ..\../main/gui/export/pasosexportacionbase.cpp:28
+#, fuzzy
+msgid "Format"
+msgstr "PCX: formato de imagem não suportado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+#, fuzzy
+msgid "Message's format"
+msgstr "mensagem %s"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr "ER7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+#, fuzzy
+msgid "Test engine"
+msgstr "Test connection"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+msgid "Test Integration Engine connectivity"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+#, fuzzy
+msgid "Ginkgo Extension Title"
+msgstr "Não foi possível carregar arquivo da biblioteca de extensão."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+msgid "Edit public key"
+msgstr "Editar chave pública"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr ""
+"Usar certificado padrão (certificado configurado nas configurações do AET "
+"local)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+#, fuzzy
+msgid "Public key"
+msgstr "Editar chave pública"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+#, fuzzy
+msgid "Public key in PEM format"
+msgstr "Editar chave pública"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+#, fuzzy
+msgid "Load ..."
+msgstr "carregar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+#, fuzzy
+msgid "Private key"
+msgstr ""
+"\n"
+"Se você deseja utilizar SSL/TLS, você terá que informar um certificado "
+"válido e uma chave privada"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+#, fuzzy
+msgid "Private key in PEM format"
+msgstr "Você precisa configurar uma chave pública e uma privada"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+#, fuzzy
+msgid "Profile name"
+msgstr "Nome"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+#, fuzzy
+msgid "Set active"
+msgstr "Ativo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+msgid "Configure location"
+msgstr "Configurar localização"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+#, fuzzy
+msgid "Location"
+msgstr "Configurar localização"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr "Limpar diretório após dicomização"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr "Limpar diretório antes da dicomização"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+#, fuzzy
+msgid "Security type"
+msgstr "Tipo"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr "Usuários"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+msgid "Change Password ..."
+msgstr "Alterar senha ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+#, fuzzy
+msgid "Set main password"
+msgstr "Você precisa escolher a senha principal"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+msgid "Set Password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+msgid "Edit User"
+msgstr "Editar Usuário"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+msgid "User Name"
+msgstr "Nome de usuário"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+msgid "Confirm Password"
+msgstr "Confirmar Senha"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+#, fuzzy
+msgid "Properties"
+msgstr "&Propriedades"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+#, fuzzy
+msgid "Edit corner annotations"
+msgstr "Ocultar anotações de canto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue}  where GGGG is the tag's group in hexadecimal and EEEE is the "
+"tag's element."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+#, fuzzy
+msgid "Window/level"
+msgstr "&Janela"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr "Adicionar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ..\../main/gui/history3/historytoolmenu.cpp:149
+#: ..\../widgets/gui/selecciontextobase.h:58
+msgid "Edit"
+msgstr "Editar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+#, fuzzy
+msgid "Default Window/Level"
+msgstr "&Janela"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+#, fuzzy
+msgid "Corner annotations"
+msgstr "Ocultar anotações de canto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+#, fuzzy
+msgid "Setup corner annotations"
+msgstr "Ocultar anotações de canto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+#, fuzzy
+msgid "Setup..."
+msgstr "Configurar..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+#, fuzzy
+msgid "Other settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+#, fuzzy
+msgid "Interpolate pixel data"
+msgstr "XPM: Dados de pixel defeituosos!"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+#, fuzzy
+msgid "Hanging protocol"
+msgstr "Protocolo desconhecido"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+#, fuzzy
+msgid "Opening mode"
+msgstr "erro ao abrir '%s'"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+#, fuzzy
+msgid "Study opening criteria"
+msgstr "erro ao abrir '%s'"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+msgid "Workspace"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+#, fuzzy
+msgid "Enable/Disable"
+msgstr "Habilitar configuração remota do PACS"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+#, fuzzy
+msgid "Top left corner annotations"
+msgstr "Ocultar anotações de canto"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+#, fuzzy
+msgid "Setup window"
+msgstr "Configurar..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+#, fuzzy
+msgid "Set default"
+msgstr ""
+"Existe um problema durante a configuração da página: você pode precisar "
+"configurar a impressora default"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+#, fuzzy
+msgid "Open in main window"
+msgstr "&Janela"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+#, fuzzy
+msgid "Setup position..."
+msgstr "Configurar..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+msgid "Setup undocked window position"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+#, fuzzy
+msgid "Layout"
+msgstr "1x1 Layout"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+#, fuzzy
+msgid "Current layout"
+msgstr "Atual"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+#, fuzzy
+msgid "Columns"
+msgstr "Grade (duas colunas)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+#, fuzzy
+msgid "Series criteria"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+#, fuzzy
+msgid "Select opening mode"
+msgstr "erro ao abrir '%s'"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+#, fuzzy
+msgid "Tag"
+msgstr ""
+"Aviso: tentativa de remoção de manipulador de tag HTML de uma pilha vazia."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+#, fuzzy
+msgid "Save"
+msgstr "&Salvar"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+#, fuzzy
+msgid "Enable background queries"
+msgstr "Cor do fundo"
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+msgid "Smart retrieve"
+msgstr ""
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+#, fuzzy
+msgid "Smart retrieve settings"
+msgstr "Configurações das extensões"
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.h:64
+#, fuzzy
+msgid "Export DICOM"
+msgstr "Exportar DICOM"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+msgid "Ginkgo CADx private tags"
+msgstr "Ginkgo CADx private tags"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ..\../main/gui/history3/historypanel3.cpp:340
+#: ..\../main/gui/history3/historytoolmenu.cpp:158
+#, fuzzy
+msgid "Export"
+msgstr "Export images"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ..\../main/gui/export/parametrosprincipales.cpp:157
+#, fuzzy
+msgid "Select the directory where the files will be stored"
+msgstr "O diretório DICOM é o local onde o histórico é armazenado"
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+#, fuzzy
+msgid "Select the DICOM Dir folder"
+msgstr "Diretório DICOM"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+#, fuzzy
+msgid "DICOM Dir migration"
+msgstr "Diretório DICOM"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+#, fuzzy
+msgid "Migrate existing (recommended)"
+msgstr "Arquivo existente"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+#, fuzzy
+msgid "Continue..."
+msgstr "Avançar"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+#, fuzzy
+msgid "Select other"
+msgstr "SELECT"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+#, fuzzy
+msgid "Browse..."
+msgstr "Clique para procurar por um s�mbolo."
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:106
+msgid "DICOM Export"
+msgstr "Exportar DICOM"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:110
+#, fuzzy
+msgid "Select the format and the images you want to export"
+msgstr "Você precisa selecionar as imagens que você deseja importar"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:143
+#, fuzzy
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr "Todos os arquivos (*.*)|*.*"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:150
+#, fuzzy
+msgid "Select file"
+msgstr "Selecionar um arquivo"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "DICOM (native format)"
+msgstr "DICOM (formato nativo)"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+#, fuzzy
+msgid "Image (jpg, bmp, png)"
+msgstr "Não foi possível salvar imagem PNG."
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:38
+#, fuzzy
+msgid "Export all files of opened tab"
+msgstr "Exportando arquivo %d de %d"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:55
+#, fuzzy
+msgid "JPEG"
+msgstr "JPEG: Não foi possível salvar imagem."
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr ""
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:40
+#, fuzzy
+msgid "Image Export Wizard"
+msgstr "imagem"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ..\../main/gui/license/aboutdialogbase.cpp:67
+#: ..\../main/gui/license/aboutdialogbase.cpp:151
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:54
+msgid "&Accept"
+msgstr "&Aceitar"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr "&Próximo >"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+#, fuzzy
+msgid "Open link"
+msgstr "<LINK>"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+#, fuzzy
+msgid "File link:"
+msgstr "<LINK>"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ..\../main/gui/import/pasosimportacionbase.cpp:270
+#, fuzzy
+msgid "Study"
+msgstr "Erro ao carregar estudo: "
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+msgid "User name"
+msgstr "Nome de usuário"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+#, fuzzy
+msgid "Ginkgo Cloud link"
+msgstr "<LINK>"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+#, fuzzy
+msgid "Copy to clipboard"
+msgstr "&Copiar"
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "New Ginkgo Cloud study"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "To download the study, paste this url "
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+msgid "Creator"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+#, fuzzy
+msgid "Last Modificator"
+msgstr "Refazer �ltima a��o"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+#, fuzzy
+msgid "Show link..."
+msgstr "<LINK>"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+#, fuzzy
+msgid "Invalid link"
+msgstr "<LINK>"
+
+#: ..\../main/gui/history3/historypanel3.cpp:117
+#: ..\../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/history3/historypanel3.cpp:119
+#: ..\../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr "Abrir Séries com .."
+
+#: ..\../main/gui/history3/historypanel3.cpp:226
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr "Idade"
+
+#: ..\../main/gui/history3/historypanel3.cpp:228
+#, fuzzy
+msgid "Date acquired"
+msgstr "data"
+
+#: ..\../main/gui/history3/historypanel3.cpp:230
+#, fuzzy
+msgid "Date added"
+msgstr "data"
+
+#: ..\../main/gui/history3/historypanel3.cpp:308
+#: ..\../main/gui/history3/historytoolmenu.cpp:82
+#: ..\../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr "Adquirir"
+
+#: ..\../main/gui/history3/historypanel3.cpp:316
+#: ..\../main/tools/dicomizetool.cpp:28
+#, fuzzy
+msgid "Dicomize"
+msgstr "Fechar automaticamente Ginkgo CADx após dicomização"
+
+#: ..\../main/gui/history3/historypanel3.cpp:363
+msgid "All patients"
+msgstr "Todos os pacientes"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+msgid "Results"
+msgstr "Resultados"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, c-format
+msgid " (%d images)"
+msgstr " (%d imagens)"
+
+#: ..\../main/gui/history3/historypanel3.cpp:634
+#, fuzzy
+msgid "Open study with .."
+msgstr "&Abrir"
+
+#: ..\../main/gui/history3/historypanel3.cpp:663
+#: ..\../main/gui/history3/historypanel3base.cpp:482
+msgid "Synchronize"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:677
+msgid "&Delete from history"
+msgstr "&Deletar do histórico"
+
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#, fuzzy
+msgid "&Clear history"
+msgstr "&Limpar"
+
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr ""
+"Você alcançou o número máximo de abas abertas, feche algumas e tente "
+"novamente"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid "Unable to open modality "
+msgstr "Não foi possível abrir a modalidade "
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr " com a sintaxe de transferência "
+
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr ""
+"Não foi possível esvaziar o histórico, você precisa fechar os estudos abertos"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1086
+msgid "all files"
+msgstr "todos os arquivos"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#, fuzzy
+msgid "Select at least one series"
+msgstr "Você precisa selecionar ao menos uma imagem"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr "Você não pode remover séries abertas"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+#, fuzzy
+msgid "those series"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+#, fuzzy
+msgid "this series"
+msgstr "Abrir Séries"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:57
+#, fuzzy
+msgid "Advanced search"
+msgstr "Avançado"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:73
+#, fuzzy
+msgid "Acquisition date"
+msgstr "data"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:302
+#: ..\../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr "Confirmar remoção"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr "Tem certeza que deseja excluir "
+
+#: ..\../main/gui/history3/historypanel3base.cpp:336
+#: ..\../main/gui/history3/historytoolmenu.cpp:102
+#: ..\../main/gui/history3/historytoolmenu.cpp:200
+#: ..\../main/gui/history3/historytoolmenu.cpp:229
+#, fuzzy
+msgid "Remove"
+msgstr "Remove"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:454
+#: ..\../main/gui/history3/historypanel3base.h:187
+#, fuzzy
+msgid "Synchronize files"
+msgstr "Arquivos"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+
+#: ..\../main/gui/history3/historytablemodel.cpp:406
+#: ..\../main/gui/history3/historytablemodel.cpp:418
+#: ..\../main/gui/history3/historytablemodel.cpp:473
+#: ..\../main/gui/history3/historytablemodel.cpp:485
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:105
+msgid "00/00/0000 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:138
+msgid "Close history"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:139
+#: ..\../main/gui/startup/startupform.cpp:53
+#, fuzzy
+msgid "History"
+msgstr " from History?"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:201
+#: ..\../main/gui/history3/historytoolmenu.cpp:230
+#, fuzzy
+msgid "Clear history"
+msgstr "&Limpar"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:232
+#, fuzzy
+msgid "Select all"
+msgstr "Selecionar &tudo"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:233
+#, fuzzy
+msgid "Deselect all"
+msgstr "Tudo"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+msgid "Destination"
+msgstr "Destino"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+#, fuzzy
+msgid "Status"
+msgstr "Status: "
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+msgid "Error message"
+msgstr "Mensagem de erro"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+msgid "Show Message"
+msgstr "Mostrar Mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+msgid "Edit Message"
+msgstr "Editar Mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+msgid "Delete message"
+msgstr "Excluir mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+msgid "Error editing message"
+msgstr "Erro ao editar mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+#, fuzzy
+msgid "Error purguing messages"
+msgstr "Erro ao deletar mensagens"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ..\../main/gui/progress/paneltarea.cpp:31
+#, fuzzy
+msgid "Stop"
+msgstr "&Parar"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#, fuzzy
+msgid "Sent"
+msgstr "Erro ao enviar mensagem. Foi enviada "
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/progress/statusbarprogreso.cpp:281
+msgid "Warning"
+msgstr "Atenção"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+msgid "Error getting message"
+msgstr "Erro ao obter mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+#, fuzzy
+msgid "Running"
+msgstr "Erro ao rodar a thread: "
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+msgid "Usually due to an error in sending a message"
+msgstr "Geralmente devido a um erro no envio de mensagem"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ..\../main/gui/progress/paneltarea.cpp:31
+#, fuzzy
+msgid "Start"
+msgstr "Página inicial"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr "Gostaria de remover estas mensagens?"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+msgid "Error deleting messages"
+msgstr "Erro ao deletar mensagens"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+#, fuzzy
+msgid "Remove sent messages"
+msgstr "Gostaria de remover estas mensagens?"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+msgid "Exit"
+msgstr "Sair"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+#, fuzzy
+msgid "Messages"
+msgstr "gerar mensagens de log detalhadas"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+#, fuzzy
+msgid "Refresh"
+msgstr "Atualizar"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1394
+#, fuzzy
+msgid "View"
+msgstr "Exibir arquivos de forma detalhada"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+#, fuzzy
+msgid "Send task status:"
+msgstr "Status: "
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr "Habilitado"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+#, fuzzy
+msgid "Message"
+msgstr "mensagem %s"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr "Data:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+msgid "Destination:"
+msgstr "Destino:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+#, fuzzy
+msgid "Status:"
+msgstr "Status: "
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+#, fuzzy
+msgid "Message content:"
+msgstr "Conteúdo"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:142
+#, fuzzy
+msgid "OK"
+msgstr "&OK"
+
+#: ..\../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr "Overview data of DICOM files"
+
+#: ..\../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:210
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+"\n"
+"* É necessário o ID do paciente."
+
+#: ..\../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+"\n"
+"* Concatenação do nome e sobrenome do paciente não pode ultrapassar 61 "
+"caracteres."
+
+#: ..\../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+"\n"
+"* O formato da altura em centímetros não está correto. "
+
+#: ..\../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+"\n"
+"* A data de nascimento do paciente é mais recente que a data do estudo"
+
+#: ..\../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+"\n"
+"* O formato do peso não está correto. A faixa válida é entre 0 e 400 Kg."
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "Error validating fields"
+msgstr "Error validating fields"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:148
+#, fuzzy
+msgid "Selecting Import Profile"
+msgstr "Confirmar remoção do perfil "
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:152
+#, fuzzy
+msgid "You must select the profile you want to use import"
+msgstr "Você precisa selecionar as imagens que você deseja importar"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#, fuzzy
+msgid "You must select the import profile"
+msgstr "Você precisa selecionar as imagens que você deseja importar"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:21
+#, fuzzy
+msgid "Selected images"
+msgstr "Export images"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:56
+#, fuzzy
+msgid "Preview"
+msgstr " Visualizar"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:62
+#, fuzzy
+msgid "Remove all"
+msgstr "Remove"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:113
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:65
+msgid "Demographic data"
+msgstr "Dados demográficos"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr "Identificator *"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr "(ID ou número do histórico médico)"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:159
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "Birth date"
+msgstr "Data de nascimento"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr "Sexo feminino"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:217
+#, fuzzy
+msgid "Study Details"
+msgstr "&Detalhes"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:234
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:122
+msgid "Weight"
+msgstr "Peso"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:245
+#, fuzzy
+msgid "Kg"
+msgstr ""
+"\n"
+"* O formato do peso não está correto. A faixa válida é entre 0 e 400 Kg."
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:252
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:119
+msgid "Height"
+msgstr "Altura"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr "cm"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:291
+#: ..\../main/gui/import/pasosimportacionbase.cpp:333
+#, fuzzy
+msgid "Time"
+msgstr "Tempo decorrido: "
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+#, fuzzy
+msgid "Select files..."
+msgstr "SELECT"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+#, fuzzy
+msgid "Paste"
+msgstr "&Colar"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+#, fuzzy
+msgid "Paste from clipboard"
+msgstr "Falha ao obter dados da área de transferência"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr "Voltar"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr "Tem certeza que deseja deletar este arquivo do disco?"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:330
+msgid "Delete selected items"
+msgstr "Excluir itens selecionados"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+msgid "You must select an image"
+msgstr "Você precisa selecionar uma imagem"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:346
+msgid "Generating preview..."
+msgstr "Gerando pré-visualização..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:500
+#, fuzzy
+msgid "Select images"
+msgstr "Você precisa selecionar as imagens que você deseja importar"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr "Criando Thumbnails..."
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:715
+#, fuzzy
+msgid "Image selection"
+msgstr "Sele��o"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr "Você precisa selecionar as imagens que você deseja importar"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr "Você precisa selecionar ao menos uma imagem"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:760
+#, fuzzy
+msgid "The file"
+msgstr "Arquivo"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr " não existe"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:52
+#, fuzzy
+msgid "Image Import Wizard"
+msgstr "imagem"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:167
+msgid "free of"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:181
+#, fuzzy
+msgid "in dicomization dir."
+msgstr "<DIR>"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr "Tem certeza que quer cancelar o processo de importação?"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, fuzzy, c-format
+msgid "Step %d of %d: "
+msgstr "Página %d de %d"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr "&Fim"
+
+#: ..\../main/gui/license/aboutdialog.cpp:25
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+#, fuzzy
+msgid "About"
+msgstr "&Sobre"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:22
+msgid "Ginkgo CADx"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr "Créditos"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:55
+#, fuzzy
+msgid "Licenses"
+msgstr "Licenças de Código Aberto"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:58
+#, fuzzy
+msgid "UPDATE_INFO"
+msgstr "delegate has não tipo_devolvido info"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:108
+#: ..\../main/gui/license/aboutdialogbase.h:88
+msgid "Open Source Licenses"
+msgstr "Licenças de Código Aberto"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr "Cairo"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr "DCMTK"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:119
+#, fuzzy
+msgid "FamFamFam Icons"
+msgstr "&Organizar ícones"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:120
+#, fuzzy
+msgid "Fugue Icons"
+msgstr "&Organizar ícones"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr "OpenSSL"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:126
+msgid "WxWidgets"
+msgstr "WxWidgets"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:127
+msgid "Zlib"
+msgstr "Zlib"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:130
+#, fuzzy
+msgid "Dark Glass Icons"
+msgstr "&Organizar ícones"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ..\../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+"Se você aceita os termos do acordo, clique em \"Eu aceito a licença\" para "
+"continuar. Você precisa aceitar a licença para começar a usar o Ginkgo CADx."
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:53
+msgid "Check for updates automatically"
+msgstr "Verificar atualizações automaticamente"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:66
+msgid "I Accept the license"
+msgstr "Eu aceito a licença"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr "Eu NÃO aceito a licença"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+#, fuzzy
+msgid "Save logs"
+msgstr "&Salvar"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+msgid "File couldn't be stored "
+msgstr "O arquivo não pode ser armazenado "
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+msgid "Could not write to file"
+msgstr "Não foi possível escrever no arquivo"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+#, fuzzy
+msgid "Save log..."
+msgstr "Salvar conteúdo do log no arquivo"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+msgid "Clear log"
+msgstr "Limpar log"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+#, fuzzy
+msgid "Log"
+msgstr "&Log"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr "Limpar"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr ""
+
+#: ..\../main/gui/login/dialogologin.cpp:50
+#, fuzzy
+msgid "The username or password is incorrect"
+msgstr "Falha na conexão: faltando usuário/senha."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:250
+#, fuzzy
+msgid "Tasks"
+msgstr "0 tarefas sendo executadas."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1139
+#, fuzzy
+msgid "Included in the history ..."
+msgstr " from History?"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "Check update error"
+msgstr "Erro verificando atualização"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#, fuzzy
+msgid "Malformed XML"
+msgstr "Dicomização XML"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1192
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#, fuzzy
+msgid "Error parsing integration XML:\n"
+msgstr "Erro interno na análise XML"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+msgid "PACS error:\n"
+msgstr "Erro do PACS:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#, fuzzy
+msgid "Error executing WorkFlow\n"
+msgstr "Erro ao criar o banco de dados:\n"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#, fuzzy
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+"Não foi possível enviar para o PACS:\n"
+"Erro interno"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#, fuzzy
+msgid "Close current view"
+msgstr "Fecha o documento atual"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+#, fuzzy
+msgid "Close all"
+msgstr "Fechar tudo"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+#, fuzzy
+msgid "Close all views"
+msgstr "Fechar tudo"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr "&Sair"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "Exit application"
+msgstr "Sair da aplicação"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr "Full screen"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Show full screen"
+msgstr "Exibir em tela cheia"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1302
+#, fuzzy
+msgid "Tab grouping"
+msgstr "TAB"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1329
+#, fuzzy
+msgid "Ginkgo CADx manual ..."
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1330
+#, fuzzy
+msgid "Open test card"
+msgstr "Test connection"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr "Verificar Atualizações"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for newest versions"
+msgstr "Verificar novas versões"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1332
+#, fuzzy
+msgid "Need support ..."
+msgstr "Online support"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+#, fuzzy
+msgid "About "
+msgstr "&Sobre"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+msgid "HL7 monitor"
+msgstr "Monitor do HL7"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+msgid "HL7 message control"
+msgstr "Controle de mensagem do HL7"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+#, fuzzy
+msgid "Log monitor"
+msgstr "Monitor do HL7"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#, fuzzy
+msgid "Log monitored"
+msgstr "&Log"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1390
+msgid "&File"
+msgstr "&Arquivo"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr "&Editar"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr "&Ajuda"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr "Gostaria de salvar as modificações no estudo:"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1664
+msgid "Unsaved data"
+msgstr "Dados não salvos"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr ""
+"Erros ocorreram ao salvar as séries.\n"
+"Gostaria de fechar mesmo assim? "
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid "Error saving"
+msgstr "Erro ao salvar"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "Full Screen"
+msgstr "Tela cheia"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "View Full Screen"
+msgstr "Ver em tela-cheia"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1708
+#, fuzzy
+msgid "Tab Regroup"
+msgstr "TAB"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr "&Fechar"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "&Close all"
+msgstr "&Fechar todos"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "Close all windows"
+msgstr "Fechar todas as janelas"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1728
+#, fuzzy
+msgid "Tabbed organization"
+msgstr "Grid organization"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+#, fuzzy
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr "Avisar sobre novas atualizações do Ginkgo CADx"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "Ginkgo CADx updated"
+msgstr "O Ginkgo CADX foi atualizado"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1782
+#, fuzzy
+msgid "New version available ("
+msgstr " Vers�o "
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr "Erro interno no processo de autenticação"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+#, fuzzy
+msgid "New Update"
+msgstr "&Novo"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+#, fuzzy
+msgid "New version available"
+msgstr " Vers�o "
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr "Não me avisar novamente sobre essa atualização"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+msgid "X"
+msgstr "X"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+msgid "Close this notification"
+msgstr "Fechar esta notificação"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+msgid "The following commands will be aborted if you close the application"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+msgid "Close Ginkgo CADx"
+msgstr "Fechar Ginkgo CADx"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:138
+msgid "User login"
+msgstr "Login do usuário"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+#, fuzzy
+msgid "System authentication"
+msgstr "Autenticação"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+#, fuzzy
+msgid "Login"
+msgstr "Login do usuário"
+
+#: ..\../main/gui/open/abrir.cpp:80 ..\../main/gui/open/abrir.cpp:82
+msgid "Open..."
+msgstr "Abrir..."
+
+#: ..\../main/gui/open/opendialogs.cpp:58
+#, fuzzy
+msgid "There was an error reading DICOMDIR file"
+msgstr "Erro ao ler imagem DIB."
+
+#: ..\../main/gui/open/opendialogs.cpp:62
+#, fuzzy
+msgid "Select a valid DICOMDIR file"
+msgstr "Selecionar um arquivo"
+
+#: ..\../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:180
+#: ..\../main/gui/open/opendialogsbase.cpp:170
+#: ..\../main/gui/open/opendialogsbase.h:112
+#, fuzzy
+msgid "Copy or link"
+msgstr "&Copiar"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:22
+#: ..\../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr "Adquirir de um diretório DICOM"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:94
+#: ..\../main/gui/open/opendialogsbase.h:85
+#, fuzzy
+msgid "Select drive"
+msgstr "<DRIVE>"
+
+#: ..\../main/gui/open/opendialogsbase.cpp:175
+msgid "Do you want to copy or link files?"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ..\../main/gui/selectpacsserver/selectpacsserver.cpp:30
+msgid "There aren't any PACS configured"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:69
+#, fuzzy
+msgid "0000/00/00 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.h:57
+#, fuzzy
+msgid "Upload study"
+msgstr "Enviar imagens para o servidor PACS"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+#, fuzzy
+msgid "Select PACS server"
+msgstr "Enviar imagens para o servidor PACS"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:119
+msgid "Metadata"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:120
+msgid "Identification information"
+msgstr "Informações de identificação"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:121
+#, fuzzy
+msgid "Patient information"
+msgstr "Informação %s"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:122
+#, fuzzy
+msgid "Acquisition information"
+msgstr "Informação %s"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:123
+#, fuzzy
+msgid "Relationship information"
+msgstr "Informação %s"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:124
+#, fuzzy
+msgid "Image presentation information"
+msgstr "Informação %s"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:125 ..\../widgets/wtextbox.cpp:525
+#, fuzzy
+msgid "Text"
+msgstr "(Texto normal)"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:126
+#, fuzzy
+msgid "Other"
+msgstr "O encaixamento s� � suportado nas vers�es wxMSW, wxMac e wxGTK"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:137
+#: ..\../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr "Dados"
+
+#: ..\../main/gui/previewpanel/previewpanel.cpp:47
+msgid "Hide"
+msgstr "Ocultar"
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:207
+msgid "Previews"
+msgstr ""
+
+#: ..\../main/gui/progress/progresobase.cpp:23
+#, fuzzy
+msgid "There is no running tasks"
+msgstr "0 tarefas sendo executadas."
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:165
+msgid "0 running tasks."
+msgstr "0 tarefas sendo executadas."
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:192
+#, fuzzy, c-format
+msgid "There are %d pending tasks"
+msgstr "0 tarefas sendo executadas."
+
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.h:55
+#, fuzzy
+msgid "Select PACS"
+msgstr "SELECT"
+
+#: ..\../main/gui/startup/startupformbase.cpp:29
+#, fuzzy
+msgid "http://ginkgo-cadx.com"
+msgstr "Habilitar proxy HTTP"
+
+#: ..\../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:47
+#, fuzzy
+msgid "Ginkgo CADx Pro"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr ""
+
+#: ..\../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr "Página inicial"
+
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete Widget"
+msgstr "Excluir Widget"
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+#, fuzzy
+msgid "Properties ..."
+msgstr "&Propriedades"
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+#, fuzzy
+msgid "Widget Properties"
+msgstr "&Propriedades"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:114
+#, fuzzy
+msgid "Open file"
+msgstr "Abrir arquivo"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:115
+#: ..\../main/tools/openfoldertool.cpp:27
+#, fuzzy
+msgid "Open folder"
+msgstr "&Abrir"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:116
+#: ..\../main/tools/openremovabletool.cpp:28
+#, fuzzy
+msgid "Open removable unit"
+msgstr "&Abrir"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:117
+#: ..\../main/tools/openginkgocloudlinktool.cpp:27
+msgid "Open Ginkgo Cloud link"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr ""
+
+#: ..\../main/tools/colormaptool.cpp:110
+msgid "Invert color map"
+msgstr ""
+
+#: ..\../main/tools/cornerannotationstool.cpp:44
+msgid "Hide corner annotations"
+msgstr "Ocultar anotações de canto"
+
+#: ..\../main/tools/cornerannotationstool.cpp:46
+msgid "Show corner annotations"
+msgstr "Mostrar anotações de canto"
+
+#: ..\../main/tools/detachwindowtool.cpp:42
+#, fuzzy
+msgid "Attach View"
+msgstr ""
+"):\n"
+"Verifique a configuração e anexe-a se necessário"
+
+#: ..\../main/tools/detachwindowtool.cpp:44
+#, fuzzy
+msgid "Detach view"
+msgstr "Exibir arquivos de forma detalhada"
+
+#: ..\../main/tools/dicomizetool.cpp:28
+#, fuzzy
+msgid "Dicomize files"
+msgstr "Arquivos"
+
+#: ..\../main/tools/exportdicomdirtool.cpp:32
+#, fuzzy
+msgid "Export to DICOM Dir"
+msgstr "Exportar DICOM"
+
+#: ..\../main/tools/markertool.cpp:171
+#, fuzzy
+msgid "Point"
+msgstr "Tamanho da fonte:"
+
+#: ..\../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr "Seta"
+
+#: ..\../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr "Elipse"
+
+#: ..\../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:176
+msgid "Free form"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:57
+msgid "Grid"
+msgstr "Grade"
+
+#: ..\../main/tools/metricgridtool.cpp:67
+msgid "Grid Scale"
+msgstr "Escala da grade"
+
+#: ..\../main/tools/metricgridtool.cpp:74
+#, fuzzy
+msgid "Scale X"
+msgstr "Escala no eixo X"
+
+#: ..\../main/tools/metricgridtool.cpp:78
+msgid "X axis scale"
+msgstr "Escala no eixo X"
+
+#: ..\../main/tools/metricgridtool.cpp:87
+#, fuzzy
+msgid "Scale Y"
+msgstr "Escala no eixo Y"
+
+#: ..\../main/tools/metricgridtool.cpp:91
+msgid "Y axis scale"
+msgstr "Escala no eixo Y"
+
+#: ..\../main/tools/metricgridtool.cpp:206
+msgid "Show grid"
+msgstr "Mostrar grade"
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr "Configurar Grade ..."
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr "Configurar Grade"
+
+#: ..\../main/tools/metricgridtool.cpp:250
+msgid "Hide Grid"
+msgstr "Ocultar grade"
+
+#: ..\../main/tools/metricgridtool.cpp:252
+msgid "Show Grid"
+msgstr "Mostrar Grade"
+
+#: ..\../main/tools/openfiletool.cpp:28
+msgid "Open File"
+msgstr "Abrir arquivo"
+
+#: ..\../main/tools/pacsuploadtool.cpp:54
+msgid "Send to PACS..."
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:59
+msgid "Unset pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:61
+msgid "Set pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#, fuzzy
+msgid "PACS Q/R"
+msgstr "Explorando PACS..."
+
+#: ..\../main/tools/queryretrievetool.cpp:94
+#: ..\../main/tools/searchginkgocloudhistorytool.cpp:28
+#, fuzzy
+msgid "Search Ginkgo Cloud"
+msgstr "Pesquisar"
+
+#: ..\../main/tools/rotateandfliptool.cpp:151
+#, fuzzy
+msgid "Undo rotate and flip"
+msgstr "&Desfazer"
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:156
+msgid "Flip horizontal"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:157
+msgid "Flip vertical"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:34
+msgid "Send to PACS"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:70
+#, fuzzy
+msgid "Sending to PACS..."
+msgstr "Erro ao enviar mensagem:"
+
+#: ..\../main/tools/showtagstool.cpp:42
+#, fuzzy
+msgid "Hide DICOM inspector"
+msgstr "DICOM Inspector"
+
+#: ..\../main/tools/showtagstool.cpp:44
+#, fuzzy
+msgid "Show DICOM inspector"
+msgstr "DICOM Inspector"
+
+#: ..\../main/tools/simpleprinttool.cpp:119
+#, fuzzy
+msgid "Image printing"
+msgstr "Imprimindo "
+
+#: ..\../main/tools/simpleprinttool.cpp:224
+#, fuzzy
+msgid "Page setup"
+msgstr "Configurar Página"
+
+#: ..\../main/tools/simpleprinttool.cpp:225
+#, fuzzy
+msgid "Print preview"
+msgstr "Visualizar impressão"
+
+#: ..\../main/tools/simpleprinttool.cpp:272
+#, fuzzy
+msgid "Print image"
+msgstr "&Imprimir"
+
+#: ..\../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr "Calcular automaticamente"
+
+#: ..\../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr ""
+
+#: ..\../main/tools/undotool.cpp:110
+#, fuzzy
+msgid "Redo"
+msgstr "&Refazer"
+
+#: ..\../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:153
+#, fuzzy
+msgid "Enable loop"
+msgstr "Habilitar configuração remota do PACS"
+
+#: ..\../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:267
+#, fuzzy
+msgid "Add column"
+msgstr "SOMA"
+
+#: ..\../main/tools/windowlayouttool.cpp:268
+#, fuzzy
+msgid "Add row"
+msgstr "SOMA"
+
+#: ..\../main/tools/windowlayouttool.cpp:270
+#, fuzzy
+msgid "Remove column"
+msgstr "Remove"
+
+#: ..\../main/tools/windowlayouttool.cpp:271
+#, fuzzy
+msgid "Remove row"
+msgstr "Remove"
+
+#: ..\../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr "1x1 Layout"
+
+#: ..\../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr "1x2 Layout"
+
+#: ..\../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr "Plano 2x1"
+
+#: ..\../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr "Plano 2x2"
+
+#: ..\../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr "Plano 3x3"
+
+#: ..\../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr "Plano 4x4"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:82
+#, fuzzy
+msgid "The tool is already registered"
+msgstr "Objeto já registrado passado a SetObjectClassInfo"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:187
+#, fuzzy
+msgid "The module "
+msgstr "Inicialização do modulo \"%s\" falhou"
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:49
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:56
+msgid "Unable to load PNG image resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:63
+msgid "Unable to load GIF animation resource"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr "Valor de calibração é muito baixo"
+
+#: ..\../widgets/gui/calibracion.cpp:219
+msgid "Enter the calibration value"
+msgstr "Informe o valor de calibração"
+
+#: ..\../widgets/gui/calibracion.cpp:225
+#, fuzzy
+msgid "The calibration value is too low"
+msgstr "Valor de calibração é muito baixo"
+
+#: ..\../widgets/gui/calibracion.cpp:229
+#, fuzzy
+msgid "The calibration value is too high"
+msgstr "Valor de calibração é muito baixo"
+
+#: ..\../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr "Calibrando..."
+
+#: ..\../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr "Distância"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr "Centímetros"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr ""
+
+#: ..\../widgets/gui/selecciontextobase.cpp:26
+#, fuzzy
+msgid "Note"
+msgstr "Nota, 8 1/2 x 11 in"
+
+#: ..\../widgets/wangulo.cpp:1101 ..\../widgets/wangulo.cpp:1103
+#, fuzzy
+msgid "Type"
+msgstr "Tipo"
+
+#: ..\../widgets/wangulo.cpp:1101
+#, fuzzy
+msgid "Normal"
+msgstr "Normal"
+
+#: ..\../widgets/wangulo.cpp:1103
+msgid "Cobb"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:721 ..\../widgets/wfreeform.cpp:470
+#: ..\../widgets/wpolygon.cpp:574
+msgid "Center (I)"
+msgstr "Centro (I)"
+
+#: ..\../widgets/welipse.cpp:727 ..\../widgets/wfreeform.cpp:476
+#: ..\../widgets/wpolygon.cpp:580
+msgid "Center (M)"
+msgstr "Centro (M)"
+
+#: ..\../widgets/welipse.cpp:762 ..\../widgets/welipse.cpp:766
+msgid "Greater Radius"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:763 ..\../widgets/welipse.cpp:767
+#, fuzzy
+msgid "Lower Radius"
+msgstr "Letras min�sculas"
+
+#: ..\../widgets/wfreeform.cpp:482 ..\../widgets/wpolygon.cpp:586
+#, fuzzy
+msgid "Number of Vertex"
+msgstr "&N�mero:"
+
+#: ..\../widgets/wpunto.cpp:353
+#, fuzzy
+msgid "Position (I)"
+msgstr "%i de %i"
+
+#: ..\../widgets/wpunto.cpp:358
+#, fuzzy
+msgid "Position (M)"
+msgstr "A posi��o da tabula��o."
+
+#: ..\../widgets/wrule.cpp:558
+#, fuzzy
+msgid "Image Calibration"
+msgstr "imagem"
+
+#: ..\../widgets/wrule.cpp:663
+#, fuzzy
+msgid "Length"
+msgstr "tamanho do arquivo armazenado n�o consta do cabe�alho Zip"
+
+#: ..\../widgets/wrule.cpp:668
+#, fuzzy
+msgid "Points (I)"
+msgstr "%i de %i"
+
+#: ..\../widgets/wrule.cpp:675
+#, fuzzy
+msgid "Points (M)"
+msgstr "Lista o tamanho das fontes em pontos."
+
+#: ..\../widgets/wtextbox.cpp:445
+#, fuzzy
+msgid "Default text"
+msgstr "padrão"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:41
+#, fuzzy
+msgid "Commit date"
+msgstr "data"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr "<ID desconhecido>"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr "%d/%m/%Y"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:214
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:219
+#, fuzzy
+msgid "Modified"
+msgstr "Modificado"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr "644654645"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:130
+msgid "Commit inform"
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedades.cpp:30
+#, fuzzy
+msgid "Properties of "
+msgstr "&Propriedades"
+
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:31
+#, fuzzy
+msgid "Widget's Name"
+msgstr "Excluir Widget"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr "< &Anterior"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr "&Cancelar"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3701
+#, fuzzy
+msgid "Regular expression invalid: '"
+msgstr "Expressão regular '%s' inválida: %s"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.h:56
+#, fuzzy
+msgid "Overwrite Paths"
+msgstr "Impossível sobrescrever o arquivo '%s'"
+
+#: ..\../ginkgopro/ginkgo_pro_defines.h:21
+msgid "Professional DICOM CADx environment"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservers.h:39
+#, fuzzy
+msgid "Server not found"
+msgstr "Encontrado"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:99
+#, fuzzy
+msgid "DICOM Query/Retrieve"
+msgstr "Impossível obter política de agendamento de threads."
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:123
+#, fuzzy
+msgid "Not found"
+msgstr "Encontrado"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+#, fuzzy
+msgid "Advanced Settings"
+msgstr "Configurações avançadas..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+#, fuzzy
+msgid "Edit profile"
+msgstr "Editar ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+#, fuzzy
+msgid "Add/Edit Location"
+msgstr "Editar ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+#, fuzzy
+msgid "Add window/level"
+msgstr "&Janela"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+#, fuzzy
+msgid "Add tag"
+msgstr "SOMA"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+#, fuzzy
+msgid "Setup window position"
+msgstr "Configurar..."
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.h:61
+#, fuzzy
+msgid "Closing"
+msgstr ""
+"Erros ocorreram ao salvar as séries.\n"
+"Gostaria de fechar mesmo assim? "
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+#, fuzzy
+msgid "DICOM Dir configuration"
+msgstr "Diretório DICOM"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:70
+#, fuzzy
+msgid "Open Ginkgo Cloud"
+msgstr "&Abrir"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:123
+#, fuzzy
+msgid "Ginkgo Cloud search"
+msgstr "Pesquisar"
+
+#: ..\../main/gui/history3/confirmdeletedialog.h:24
+msgid " from History?"
+msgstr " from History?"
+
+#: ..\../main/gui/history3/historypanel3base.h:100
+#, fuzzy
+msgid "Medical history"
+msgstr "(ID ou número do histórico médico)"
+
+#: ..\../main/gui/history3/historypanel3base.h:161
+#, fuzzy
+msgid "Open With ..."
+msgstr "&Abrir"
+
+#: ..\../main/gui/history3/openwithdialog.h:72
+#, fuzzy
+msgid "Select a View"
+msgstr "Selecionar uma visualização do documento"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+#, fuzzy
+msgid "Message detail"
+msgstr "mensagem %s"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+#, fuzzy
+msgid "Log node"
+msgstr "&Log"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:87
+#, fuzzy
+msgid "Closing Ginkgo CADx"
+msgstr "Ginkgo CADx"
+
+#: ..\../main/gui/paneltags/paneltagsbase.h:57
+msgid "DICOM Inspector"
+msgstr "DICOM Inspector"
+
+#: ..\../main/license.h:31
+msgid "Open Source DICOM CADx environment"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.h:65
+#, fuzzy
+msgid "Calibration"
+msgstr "Valor de calibração é muito baixo"
+
+#: ..\../wx/propiedades/wxpropiedadesbase.h:62
+#, fuzzy
+msgid "Properties of ..."
+msgstr "&Propriedades"
+
+#: ..\../wx/thumbnailctrl/thumbnailwidget.h:44
+#, fuzzy
+msgid "Image Browser Dialog"
+msgstr "Opções da Ajuda do Navegador"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+#, fuzzy
+msgid "Test title"
+msgstr "Test connection"
+
+#~ msgid "Failed to store the file, check permissions on the directory"
+#~ msgstr ""
+#~ "Ocorreu uma falha ao armazenar o arquivo, verifique permissões no "
+#~ "diretório"
+
+#, fuzzy
+#~ msgid "The key files will not be exported"
+#~ msgstr "Arquivos"
+
+#~ msgid "Current"
+#~ msgstr "Atual"
+
+#~ msgid "All"
+#~ msgstr "Todos(as)"
+
+#~ msgid "BMP"
+#~ msgstr "BMP"
+
+#, fuzzy
+#~ msgid "PNG"
+#~ msgstr "Não foi possível salvar imagem PNG."
+
+#~ msgid "Content"
+#~ msgstr "Conteúdo"
+
+#, fuzzy
+#~ msgid "Tile Horizontally"
+#~ msgstr "Lado a lado &horizontalmente"
+
+#, fuzzy
+#~ msgid "Tile Vertically"
+#~ msgstr "Lado a lado &verticalmente"
+
+#~ msgid "Grid (two columns)"
+#~ msgstr "Grade (duas colunas)"
+
+#~ msgid "Grid (three columns)"
+#~ msgstr "Grade (três colunas)"
+
+#~ msgid "Grid organization"
+#~ msgstr "Grid organization"
+
+#~ msgid "Color"
+#~ msgstr "Cor"
+
+#, fuzzy
+#~ msgid "Vertex (I)"
+#~ msgstr "%i de %i"
+
+#, fuzzy
+#~ msgid "Vertex (M)"
+#~ msgstr "Centro (M)"
+
+#~ msgid "Center"
+#~ msgstr "Centro"
+
+#~ msgid "0"
+#~ msgstr "0"
+
+#~ msgid "Checking program updates..."
+#~ msgstr "Verificando atualizações para o programa..."
+
+#~ msgid "Untitled"
+#~ msgstr "Sem nome"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">"
+#~ msgstr ">"
+
+#~ msgid "<"
+#~ msgstr "<"
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid "unknown column"
+#~ msgstr "coluna desconhecida"
+
+#~ msgid "Zoom"
+#~ msgstr "Zoom"
+
+#~ msgid "Options"
+#~ msgstr "Opções"
+
+#~ msgid "Family"
+#~ msgstr "Família"
+
+#~ msgid "Face Name"
+#~ msgstr "Nome da Face"
+
+#~ msgid "Categorized Mode"
+#~ msgstr "Modo Categorizado"
+
+#~ msgid "Alphabetic Mode"
+#~ msgstr "Modo Alfabético"
+
+#~ msgid "False"
+#~ msgstr "Falso"
+
+#~ msgid "Unspecified"
+#~ msgstr "Não especificado"
+
+#~ msgid "Error in resource: %s"
+#~ msgstr "Erro no recurso: %s"
+
+#~ msgid "Value must be %lld or higher"
+#~ msgstr "O valor precisa ser %lld ou maior"
+
+#~ msgid "Value must be %llu or higher"
+#~ msgstr "O valor precisa ser %llu ou maior"
+
+#~ msgid "Value must be %llu or less"
+#~ msgstr "O valor precisa ser %llu ou menor"
+
+#~ msgid "Value must be %f or higher"
+#~ msgstr "O valor precisa ser %f ou maior"
+
+#~ msgid "Value must be %f or less"
+#~ msgstr "O valor precisa ser %f ou menor"
+
+#~ msgid "Choose a directory:"
+#~ msgstr "Escolha um diretório:"
+
+#~ msgid "Choose a file"
+#~ msgstr "Escolha um arquivo"
+
+#~ msgid "Configure proxy"
+#~ msgstr "Configurar proxy"
+
+#~ msgid "Use system settings"
+#~ msgstr "Use system settings"
+
+#~ msgid "Authenticate"
+#~ msgstr "Authenticate"
+
+#~ msgid "Show / Hide DICOM tags panel"
+#~ msgstr "Mostrar / Esconder painel de tags DICOM"
+
+#~ msgid "Visualization"
+#~ msgstr "Calibrando..."
+
+#~ msgid "http://ginkgo-cadx.com/en/services/"
+#~ msgstr "http://ginkgo-cadx.com/en/services/"
+
+#~ msgid "Double click to edit"
+#~ msgstr "Clique duas vezes para editar"
+
+#~ msgid ""
+#~ "No results obtained. Maybe you have a wrong PACS server configuration"
+#~ msgstr ""
+#~ "Nenhum resultado obtido. Talvez você tenha uma configuração inválida do "
+#~ "servidor PACS"
+
+#~ msgid ""
+#~ "No results obtained in PACS retrieve.\n"
+#~ "Maybe study doesn't exist or you have a wrong PACS server configuration."
+#~ msgstr ""
+#~ "Nenhum resultado obtido. Talvez você tenha uma configuração inválida do "
+#~ "servidor PACS"
+
+#~ msgid "Clean"
+#~ msgstr "Limpar"
+
+#~ msgid "Error: "
+#~ msgstr "Erro: "
+
+#~ msgid "Error: No images were downloaded"
+#~ msgstr "Erro: Nenhuma imagem foi baixada"
+
+#~ msgid "Error starting network support"
+#~ msgstr "Erro ao iniciar o suporte a rede"
+
+#~ msgid "The selected directory does must be empty"
+#~ msgstr "O diretório selecionado não pode ser aberto"
+
+#~ msgid "Choose the import profile"
+#~ msgstr "Escolha o perfil de importação"
+
+#~ msgid "An error ocurred loading Ginkgo News check your internet connection"
+#~ msgstr ""
+#~ "Um erro ocorreu carregando o Ginkgo News. Verifique sua conexão com a "
+#~ "internet"
+
+#~ msgid "%m-%d-%y %H:%M:%S,%q"
+#~ msgstr "%d-%m-%y %H:%M:%S,%q"
+
+#~ msgid "Extensions Support"
+#~ msgstr "Suporte a extensões"
+
+#~ msgid "URL for new extensions"
+#~ msgstr "URL para novas extensões"
+
+#~ msgid ""
+#~ "\n"
+#~ "There are %d files that overwrite existing files"
+#~ msgstr ""
+#~ "\n"
+#~ "Existem %d arquivos que sobrescrevem arquivos existentes"
+
+#~ msgid "Display Options"
+#~ msgstr "Opções de Exibição"
+
+#~ msgid "Close Panel"
+#~ msgstr "Fechar Painel"
+
+#~ msgid "Close All"
+#~ msgstr "Fechar todos"
+
+#~ msgid "Error deleting the patient in the database:\n"
+#~ msgstr "Erro ao deletar o paciente no banco de dados:\n"
+
+#~ msgid "Error deleting the Study of database:\n"
+#~ msgstr "Erro ao deletar o Estudo do banco de dados:\n"
+
+#~ msgid "Error deleting file from de database: \n"
+#~ msgstr "Erro ao deletar arquivo do banco de dados: \n"
+
+#~ msgid "Error deleting file from database:\n"
+#~ msgstr "Erro ao deletar um arquivo do banco de dados:\n"
+
+#~ msgid "Closing windows..."
+#~ msgstr "Fechando janelas..."
+
+#~ msgid "Opening series..."
+#~ msgstr "Abrindo séries..."
+
+#~ msgid "Activate"
+#~ msgstr "Ativar"
+
+#~ msgid "Not loaded"
+#~ msgstr "Not loaded"
+
+#~ msgid "Import global..."
+#~ msgstr "&Importar ..."
+
+#~ msgid "Obtain extensions..."
+#~ msgstr "Obtain extensions..."
+
+#~ msgid "1.0"
+#~ msgstr "1.0"
+
+#~ msgid "Select files you want to export"
+#~ msgstr "Selecione os arquivos DICOM que você deseja enviar"
+
+#~ msgid "Select Series you want to export"
+#~ msgstr "Select Series you want to export"
+
+#~ msgid "You can't remove opened studies"
+#~ msgstr "Você não pode remover estudos abertos"
+
+#~ msgid "error, have tried to select a file that is not added to history"
+#~ msgstr ""
+#~ "erro, tentou-se selecionar um arquivo que não está adicionado ao histórico"
+
+#~ msgid ""
+#~ "\n"
+#~ "There aren't any stored study that matches with the search filter.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Não existem estudos guardados que correspondem com o filtro de busca\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "To begin working must change filter criteria, acquire an existing study "
+#~ "or import images in DICOM format.\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Para começar é necessário alterar os critérios do filtro, adquirir um "
+#~ "estudo existente ou importar imagens no formato DICOM.\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "There is no size in the medical history to show every patients\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Não existe espaço no histórico médico para mostrar todos os pacientes\n"
+
+#~ msgid ""
+#~ "\n"
+#~ "Try using filters or collapsing nodes and refresh search\n"
+#~ msgstr ""
+#~ "\n"
+#~ "Tente utilizar filtros ou reduzir nós e atualize a busca\n"
+
+#~ msgid "Acquiring a new DICOM study"
+#~ msgstr "Adquirindo um novo estudo DICOM"
+
+#~ msgid "&Open File"
+#~ msgstr "&Abrir Arquivo"
+
+#~ msgid "Open a DICOM file"
+#~ msgstr "Abrir um arquivo DICOM"
+
+#~ msgid "&Open Folder"
+#~ msgstr "&Abrir Diretório"
+
+#~ msgid "Acquire from a local folder"
+#~ msgstr "Adquirir de um diretório local"
+
+#~ msgid "&Import ..."
+#~ msgstr "&Importar ..."
+
+#~ msgid "12412012 Q"
+#~ msgstr "12412012 Q"
+
+#~ msgid "31/08/1983"
+#~ msgstr "31/08/1983"
+
+#~ msgid "10:20"
+#~ msgstr "10:20"
+
+#~ msgid "31/02/2010"
+#~ msgstr "31/02/2010"
+
+#~ msgid "CT"
+#~ msgstr "CT"
+
+#~ msgid "<Unknow ID>"
+#~ msgstr "<ID desconhecido>"
+
+#~ msgid "Birth date: "
+#~ msgstr "Data de nascimento: "
+
+#~ msgid "&Delete Patient from History"
+#~ msgstr "&Deletar paciente do histórico"
+
+#~ msgid "Failed to remove patient, you have to close opened studies"
+#~ msgstr ""
+#~ "Não foi possível remover paciente, você precisa fechar os estudos abertos"
+
+#~ msgid "Date: "
+#~ msgstr "Data: "
+
+#~ msgid " for all their support in Ginkgo CADx creation!"
+#~ msgstr " por todo seu apoio na criação do Ginkgo CADx!"
+
+#~ msgid ""
+#~ "Debian-Med team specially Andreas Tille and Karlsten Hilbert: packaging, "
+#~ "testing and bug reporting"
+#~ msgstr ""
+#~ "time Debian-Med especialmente Andreas Tille e Karlsten Hilbert: "
+#~ "empacotamento, testes e relatórios de bug"
+
+#~ msgid "Acquire from a removable unit"
+#~ msgstr "Acquire from a removable unit"
+
+#~ msgid "DICOM &acquisition from PACS"
+#~ msgstr "DICOM &acquisition from PACS"
+
+#~ msgid "Get extensions ..."
+#~ msgstr "Obter extensões ..."
+
+#~ msgid "Start page ..."
+#~ msgstr "Página inicial ..."
+
+#~ msgid "About &Ginkgo CADx ..."
+#~ msgstr "Sobre o &Ginkgo CADx ..."
+
+#~ msgid "About Ginkgo CADx ..."
+#~ msgstr "Sobre o Ginkgo CADx ..."
+
+#~ msgid "Ginkgo CADx settings"
+#~ msgstr "Ginkgo CADx settings"
+
+#~ msgid "3D tools"
+#~ msgstr "Ferramentas 3D"
+
+#~ msgid "Creating new images ..."
+#~ msgstr "Criando novas imagens ..."
+
+#~ msgid "Show On Startup"
+#~ msgstr "Exibir ao Iniciar"
+
+#~ msgid "Deleting a Column"
+#~ msgstr "Deletando Coluna"
+
+#~ msgid "Deleting a Row"
+#~ msgstr "Deletando Linha"
+
+#~ msgid "1x1"
+#~ msgstr "1x1"
+
+#~ msgid "1x2"
+#~ msgstr "1x2"
+
+#~ msgid "2x1"
+#~ msgstr "2x1"
+
+#~ msgid "2X2"
+#~ msgstr "2X2"
+
+#~ msgid "3x3"
+#~ msgstr "3x3"
+
+#~ msgid "4x4"
+#~ msgstr "4x4"
+
+#~ msgid "About Ginkgo CADx..."
+#~ msgstr "Sobre o Ginkgo CADx ..."
+
+#~ msgid " WL"
+#~ msgstr " WL"
+
+#~ msgid " WW"
+#~ msgstr " WW"
+
+#~ msgid " is compatible with Ginkgo CADx "
+#~ msgstr " é compatível com o Ginkgo CADx "
+
+#~ msgid "Are you sure to delete the tag"
+#~ msgstr "Tem certeza que deseja deletar a tag"
+
+#~ msgid "Birthday"
+#~ msgstr "Data de nascimento"
+
+#~ msgid "Code:"
+#~ msgstr "Código:"
+
+#~ msgid "Confirm the removal of the server"
+#~ msgstr "Confirmar remoção do servidor"
+
+#~ msgid "Correction"
+#~ msgstr "Correção"
+
+#~ msgid "Error in receiving the response"
+#~ msgstr "Erro ao receber a resposta"
+
+#~ msgid "Error when making SSL connection"
+#~ msgstr "Erro ao fazer a conexão SSL"
+
+#~ msgid "Error when making the request, writing incomplete"
+#~ msgstr "Erro ao fazer a requisição, escrita incompleta"
+
+#~ msgid ""
+#~ "Failed to perform the HTTP request, the server returned the error code "
+#~ msgstr ""
+#~ "Falha ao fazer a requisição HTTP, o servidor retornou com código de erro "
+
+#~ msgid "In connection openssl Exception:"
+#~ msgstr "Exceção durante conexão openssl"
+
+#~ msgid "No options"
+#~ msgstr "Sem opções"
+
+#~ msgid "No results obtained"
+#~ msgstr "Nenhum resultado obtido"
+
+#~ msgid "http://ginkgo-cadx.com/en/extensions/"
+#~ msgstr "http://ginkgo-cadx.com/en/extensions/"
+
+#~ msgid "%d/%m/%Y %H:%M:%S"
+#~ msgstr "%d/%m/%Y %H:%M:%S"
+
+#~ msgid "Association Aborted"
+#~ msgstr "Associação Abortada"
+
+#~ msgid "Clean finished downloads"
+#~ msgstr "Limpar downloads concluídos"
+
+#~ msgid ""
+#~ "Diagnostic files can't be opened, you have to open the diagnosed series"
+#~ msgstr ""
+#~ "Arquivos de diagnóstico não podem ser abertos, você precisa abrir a série "
+#~ "de diagnóstico."
+
+#~ msgid "Downloads"
+#~ msgstr "Downloads"
+
+#~ msgid ""
+#~ "Error in interpreting the parameters of the command line. The file or "
+#~ "directory doesn't exist ("
+#~ msgstr ""
+#~ "Erro ao interpretar os parâmetros da linha de comando. O arquivo ou "
+#~ "diretório não existe ("
+
+#~ msgid "Finished"
+#~ msgstr "Concluído."
+
+#~ msgid "Open again"
+#~ msgstr "Abrir novamente"
+
+#~ msgid ""
+#~ "The series selected is already open\n"
+#~ "Do you want to open it again?"
+#~ msgstr ""
+#~ "A série selecionada já está aberta\n"
+#~ "Você deseja abri-la novamente?"
+
+#~ msgid "The service did not respond correctly to the DICOM standard:"
+#~ msgstr "O serviço não respondeu corretamente ao padrão DICOM:"
+
+#~ msgid "Updates"
+#~ msgstr "Atualizações"
+
+#~ msgid "Uploading to the PACS ..."
+#~ msgstr "Enviando para o PACS ..."
+
+#~ msgid "Welcome"
+#~ msgstr "Bem-vindo"
+
+#~ msgid "Username:"
+#~ msgstr "Nome do usuário:"
diff --git a/cadxcore/lang/pt_BR/wxstd.mo b/cadxcore/lang/pt_BR/wxstd.mo
new file mode 100644
index 0000000..0866ce0
Binary files /dev/null and b/cadxcore/lang/pt_BR/wxstd.mo differ
diff --git a/cadxcore/lang/pt_BR/wxstd.po b/cadxcore/lang/pt_BR/wxstd.po
new file mode 100644
index 0000000..8bddb9a
--- /dev/null
+++ b/cadxcore/lang/pt_BR/wxstd.po
@@ -0,0 +1,9009 @@
+# translation of pt_BR2.po to
+# Adiel Mittmann <adiel at inf.ufsc.br>, 2007.
+# Allann Jones <allanjos at gmail.com>, 2009.
+# translation of pt_BR.po to
+msgid ""
+msgstr ""
+"Project-Id-Version: wxWidgets 3.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-01 19:04+0200\n"
+"PO-Revision-Date: 2013-10-02 16:24-0300\n"
+"Last-Translator: Felipe <felipefpl at ig.com.br>\n"
+"Language-Team: Felipe <felipefpl at ig.com.br>\n"
+"Language: pt_BR\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-Generator: Poedit 1.5.7\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+
+#: ../src/common/debugrpt.cpp:591
+msgid ""
+"\n"
+"Please send this report to the program maintainer, thank you!\n"
+msgstr ""
+"\n"
+"Por favor, envie este relatório ao mantedor do programa, obrigado a você!\n"
+
+#: ../src/richtext/richtextstyledlg.cpp:210
+#: ../src/richtext/richtextstyledlg.cpp:222
+msgid " "
+msgstr " "
+
+#: ../src/generic/dbgrptg.cpp:326
+msgid "              Thank you and we're sorry for the inconvenience!\n"
+msgstr "              Obrigado a você e nós lamentamos pela inconveniência!\n"
+
+#: ../src/common/prntbase.cpp:546
+#, c-format
+msgid " (copy %d of %d)"
+msgstr "(cópia %d de %d)"
+
+#: ../src/common/log.cpp:425
+#, c-format
+msgid " (error %ld: %s)"
+msgstr " (erro %ld: %s)"
+
+#: ../src/common/imagtiff.cpp:75
+#, c-format
+msgid " (in module \"%s\")"
+msgstr " (no módulo \"%s\")"
+
+#: ../src/common/docview.cpp:1624
+msgid " - "
+msgstr " - "
+
+#: ../src/richtext/richtextprint.cpp:588 ../src/html/htmprint.cpp:704
+msgid " Preview"
+msgstr " Pré-visualizar"
+
+#: ../src/common/fontcmn.cpp:811
+msgid " bold"
+msgstr "negrito"
+
+#: ../src/common/fontcmn.cpp:827
+msgid " italic"
+msgstr "itálico"
+
+#: ../src/common/fontcmn.cpp:807
+msgid " light"
+msgstr "leve"
+
+#: ../src/common/paper.cpp:118
+msgid "#10 Envelope, 4 1/8 x 9 1/2 in"
+msgstr "Envelope #10, 4 1/8 x 9 1/2 em"
+
+#: ../src/common/paper.cpp:119
+msgid "#11 Envelope, 4 1/2 x 10 3/8 in"
+msgstr "Envelope #11, 4 1/2 x 10 3/8 em"
+
+#: ../src/common/paper.cpp:120
+msgid "#12 Envelope, 4 3/4 x 11 in"
+msgstr "Envelope #12, 4 3/4 x 11 em"
+
+#: ../src/common/paper.cpp:121
+msgid "#14 Envelope, 5 x 11 1/2 in"
+msgstr "Envelope #14, 5 x 11 1/2 em"
+
+#: ../src/common/paper.cpp:117
+msgid "#9 Envelope, 3 7/8 x 8 7/8 in"
+msgstr "Envelope #9, 3 7/8 x 8 7/8 em"
+
+#: ../src/html/helpwnd.cpp:1044
+#, c-format
+msgid "%d of %lu"
+msgstr "%d de %lu"
+
+#: ../src/html/helpwnd.cpp:1681 ../src/html/helpwnd.cpp:1719
+#, c-format
+msgid "%i of %i"
+msgstr "%i de %i"
+
+#: ../src/generic/filectrlg.cpp:315
+#, c-format
+msgid "%ld byte"
+msgid_plural "%ld bytes"
+msgstr[0] "%ld byte"
+msgstr[1] "%ld bytes"
+
+#: ../src/html/helpwnd.cpp:1046
+#, c-format
+msgid "%lu of %lu"
+msgstr "%lu de %lu"
+
+#: ../src/common/cmdline.cpp:1050
+#, c-format
+msgid "%s (or %s)"
+msgstr "%s (ou %s)"
+
+#: ../src/generic/logg.cpp:230
+#, c-format
+msgid "%s Error"
+msgstr "Erro do %s"
+
+#: ../src/generic/logg.cpp:242
+#, c-format
+msgid "%s Information"
+msgstr "Informação %s"
+
+#: ../src/generic/preferencesg.cpp:110
+#, c-format
+msgid "%s Preferences"
+msgstr "%s Preferências"
+
+#: ../src/generic/logg.cpp:234
+#, c-format
+msgid "%s Warning"
+msgstr "Aviso do %s"
+
+#: ../src/common/tarstrm.cpp:1319
+#, c-format
+msgid "%s did not fit the tar header for entry '%s'"
+msgstr "%s não encaixou no cabeçalho tar para a entrada '%s'"
+
+#: ../src/common/fldlgcmn.cpp:106
+#, c-format
+msgid "%s files (%s)|%s"
+msgstr "Arquivos %s (%s)|%s"
+
+#: ../src/common/stockitem.cpp:139 ../src/html/helpfrm.cpp:142
+#: ../src/html/helpfrm.cpp:144
+msgid "&About"
+msgstr "&Sobre"
+
+#: ../src/common/stockitem.cpp:207
+msgid "&Actual Size"
+msgstr "&Tamanho Real"
+
+#: ../src/richtext/richtextindentspage.cpp:262
+msgid "&After a paragraph:"
+msgstr "&Após um parágrafo:"
+
+#: ../src/richtext/richtextindentspage.cpp:128
+#: ../src/richtext/richtextliststylepage.cpp:319
+msgid "&Alignment"
+msgstr "&Alinhamento"
+
+#: ../src/common/stockitem.cpp:141
+msgid "&Apply"
+msgstr "&Aplicar"
+
+#: ../src/richtext/richtextstyledlg.cpp:251
+msgid "&Apply Style"
+msgstr "&Aplicar Estilo"
+
+#: ../src/msw/mdi.cpp:175
+msgid "&Arrange Icons"
+msgstr "&Organizar Ícones"
+
+#: ../src/common/stockitem.cpp:195
+msgid "&Ascending"
+msgstr "&Ascendente"
+
+#: ../src/common/stockitem.cpp:142
+msgid "&Back"
+msgstr "&Voltar"
+
+#: ../src/richtext/richtextstylepage.cpp:113
+msgid "&Based on:"
+msgstr "&Baseado em:"
+
+#: ../src/richtext/richtextindentspage.cpp:253
+msgid "&Before a paragraph:"
+msgstr "&Antes de um parágrafo:"
+
+#: ../src/richtext/richtextfontpage.cpp:271
+msgid "&Bg colour:"
+msgstr "&Côr de fundo:"
+
+#: ../src/common/stockitem.cpp:143
+msgid "&Bold"
+msgstr "&Negrito"
+
+#: ../src/common/stockitem.cpp:144
+msgid "&Bottom"
+msgstr "&Fundo"
+
+#: ../src/richtext/richtextborderspage.cpp:359
+#: ../src/richtext/richtextborderspage.cpp:503
+#: ../src/richtext/richtextmarginspage.cpp:260
+#: ../src/richtext/richtextmarginspage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:637
+#: ../src/richtext/richtextsizepage.cpp:644
+msgid "&Bottom:"
+msgstr "&Fundo:"
+
+#: ../include/wx/richtext/richtextbuffer.h:3530
+msgid "&Box"
+msgstr "&Caixa"
+
+#: ../src/richtext/richtextliststylepage.cpp:210
+#: ../src/richtext/richtextbulletspage.cpp:159
+msgid "&Bullet style:"
+msgstr "&Estilo de Bala:"
+
+#: ../src/common/stockitem.cpp:146
+msgid "&CD-Rom"
+msgstr "&CD-Rom"
+
+#: ../src/generic/wizard.cpp:432 ../src/generic/fontdlgg.cpp:470
+#: ../src/generic/fontdlgg.cpp:489 ../src/osx/carbon/fontdlg.cpp:588
+#: ../src/common/stockitem.cpp:145
+msgid "&Cancel"
+msgstr "&Cancelar"
+
+#: ../src/msw/mdi.cpp:171
+msgid "&Cascade"
+msgstr "&Em cascata"
+
+#: ../include/wx/richtext/richtextbuffer.h:5587
+msgid "&Cell"
+msgstr "&Célula"
+
+#: ../src/richtext/richtextsymboldlg.cpp:439
+msgid "&Character code:"
+msgstr "&Código dos caracteres:"
+
+#: ../src/common/stockitem.cpp:147
+msgid "&Clear"
+msgstr "&Limpar"
+
+#: ../src/generic/logg.cpp:522 ../src/common/stockitem.cpp:148
+#: ../src/common/prntbase.cpp:1570 ../src/univ/themes/win32.cpp:3756
+#: ../src/html/helpfrm.cpp:139
+msgid "&Close"
+msgstr "&Fechar"
+
+#: ../src/common/stockitem.cpp:193
+msgid "&Color"
+msgstr "&Côr"
+
+#: ../src/richtext/richtextfontpage.cpp:258
+msgid "&Colour:"
+msgstr "&Cor:"
+
+#: ../src/common/stockitem.cpp:149
+msgid "&Convert"
+msgstr "&Converter"
+
+#: ../src/richtext/richtextctrl.cpp:326 ../src/osx/textctrl_osx.cpp:583
+#: ../src/common/stockitem.cpp:150 ../src/msw/textctrl.cpp:2284
+msgid "&Copy"
+msgstr "&Copiar"
+
+#: ../src/generic/hyperlinkg.cpp:156
+msgid "&Copy URL"
+msgstr "&Copiar URL"
+
+#: ../src/common/headerctrlcmn.cpp:328
+msgid "&Customize..."
+msgstr "&Personalizar..."
+
+#: ../src/generic/dbgrptg.cpp:334
+msgid "&Debug report preview:"
+msgstr "&Pré-visualizar o relatório do debug:"
+
+#: ../src/richtext/richtexttabspage.cpp:142
+#: ../src/richtext/richtextctrl.cpp:328 ../src/osx/textctrl_osx.cpp:585
+#: ../src/common/stockitem.cpp:152 ../src/msw/textctrl.cpp:2286
+msgid "&Delete"
+msgstr "&Apagar"
+
+#: ../src/richtext/richtextstyledlg.cpp:269
+msgid "&Delete Style..."
+msgstr "&Apagar o Estilo..."
+
+#: ../src/common/stockitem.cpp:196
+msgid "&Descending"
+msgstr "&Descendente"
+
+#: ../src/generic/logg.cpp:688
+msgid "&Details"
+msgstr "&Detalhes"
+
+#: ../src/common/stockitem.cpp:153
+msgid "&Down"
+msgstr "&Para baixo"
+
+#: ../src/common/stockitem.cpp:154
+msgid "&Edit"
+msgstr "&Editar"
+
+#: ../src/richtext/richtextstyledlg.cpp:263
+msgid "&Edit Style..."
+msgstr "&Editar Estilo..."
+
+#: ../src/common/stockitem.cpp:155
+msgid "&Execute"
+msgstr "&Executar"
+
+#: ../src/common/stockitem.cpp:157 ../src/html/helpfrm.cpp:146
+msgid "&File"
+msgstr "&Arquivo"
+
+#: ../src/common/stockitem.cpp:158
+msgid "&Find"
+msgstr "&Achar"
+
+#: ../src/generic/wizard.cpp:626
+msgid "&Finish"
+msgstr "&Concluir"
+
+#: ../src/common/stockitem.cpp:159
+msgid "&First"
+msgstr "&Primeiro"
+
+#: ../src/richtext/richtextsizepage.cpp:244
+msgid "&Floating mode:"
+msgstr "&Modo flutuante:"
+
+#: ../src/common/stockitem.cpp:160
+msgid "&Floppy"
+msgstr "&Disquete"
+
+#: ../src/common/stockitem.cpp:194
+msgid "&Font"
+msgstr "&Fonte"
+
+#: ../src/generic/fontdlgg.cpp:371
+msgid "&Font family:"
+msgstr "&Família da fonte:"
+
+#: ../src/richtext/richtextliststylepage.cpp:194
+msgid "&Font for Level..."
+msgstr "&Fonte para o Nível..."
+
+#: ../src/richtext/richtextfontpage.cpp:156
+#: ../src/richtext/richtextsymboldlg.cpp:400
+msgid "&Font:"
+msgstr "&Fonte:"
+
+#: ../src/common/stockitem.cpp:161
+msgid "&Forward"
+msgstr "&Para frente"
+
+#: ../src/richtext/richtextsymboldlg.cpp:451
+msgid "&From:"
+msgstr "&De:"
+
+#: ../src/common/stockitem.cpp:162
+msgid "&Harddisk"
+msgstr "&Disco rígido"
+
+#: ../src/richtext/richtextsizepage.cpp:351
+#: ../src/richtext/richtextsizepage.cpp:358
+msgid "&Height:"
+msgstr "&Altura:"
+
+#: ../src/generic/wizard.cpp:435 ../src/richtext/richtextstyledlg.cpp:303
+#: ../src/richtext/richtextsymboldlg.cpp:479 ../src/osx/menu_osx.cpp:785
+#: ../src/common/stockitem.cpp:163 ../src/html/helpfrm.cpp:147
+msgid "&Help"
+msgstr "&Ajuda"
+
+#: ../include/wx/richmsgdlg.h:30
+msgid "&Hide details"
+msgstr "&Esconder detalhes"
+
+#: ../src/common/stockitem.cpp:164
+msgid "&Home"
+msgstr "&Home"
+
+#: ../src/richtext/richtextindentspage.cpp:184
+#: ../src/richtext/richtextliststylepage.cpp:372
+msgid "&Indentation (tenths of a mm)"
+msgstr "&Recorte (décimos de um mm)"
+
+#: ../src/richtext/richtextindentspage.cpp:167
+#: ../src/richtext/richtextliststylepage.cpp:356
+msgid "&Indeterminate"
+msgstr "&Indeterminado"
+
+#: ../src/common/stockitem.cpp:166
+msgid "&Index"
+msgstr "&Índice"
+
+#: ../src/common/stockitem.cpp:167
+msgid "&Info"
+msgstr "&Info"
+
+#: ../src/common/stockitem.cpp:168
+msgid "&Italic"
+msgstr "&Itálico"
+
+#: ../src/common/stockitem.cpp:169
+msgid "&Jump to"
+msgstr "&Pular para"
+
+#: ../src/richtext/richtextindentspage.cpp:153
+#: ../src/richtext/richtextliststylepage.cpp:342
+msgid "&Justified"
+msgstr "&Justificado"
+
+#: ../src/common/stockitem.cpp:174
+msgid "&Last"
+msgstr "&Último"
+
+#: ../src/richtext/richtextindentspage.cpp:139
+#: ../src/richtext/richtextliststylepage.cpp:328
+msgid "&Left"
+msgstr "&Esquerda"
+
+#: ../src/richtext/richtextindentspage.cpp:195
+#: ../src/richtext/richtextborderspage.cpp:269
+#: ../src/richtext/richtextborderspage.cpp:413
+#: ../src/richtext/richtextliststylepage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:187
+#: ../src/richtext/richtextmarginspage.cpp:301
+#: ../src/richtext/richtextsizepage.cpp:532
+#: ../src/richtext/richtextsizepage.cpp:539
+msgid "&Left:"
+msgstr "&Esquerda:"
+
+#: ../src/richtext/richtextliststylepage.cpp:183
+msgid "&List level:"
+msgstr "&Nível da lista:"
+
+#: ../src/generic/logg.cpp:523
+msgid "&Log"
+msgstr "&Log"
+
+#: ../src/univ/themes/win32.cpp:3748
+msgid "&Move"
+msgstr "&Mover"
+
+#: ../src/richtext/richtextsizepage.cpp:672
+msgid "&Move the object to:"
+msgstr "&Mover o objeto para:"
+
+#: ../src/common/stockitem.cpp:175
+msgid "&Network"
+msgstr "&Rede"
+
+#: ../src/richtext/richtexttabspage.cpp:136 ../src/common/stockitem.cpp:176
+msgid "&New"
+msgstr "&Novo"
+
+#: ../src/aui/tabmdi.cpp:111 ../src/generic/mdig.cpp:100
+#: ../src/msw/mdi.cpp:176
+msgid "&Next"
+msgstr "&Próximo"
+
+#: ../src/generic/wizard.cpp:431 ../src/generic/wizard.cpp:626
+msgid "&Next >"
+msgstr "&Próximo >"
+
+#: ../src/richtext/richtextsizepage.cpp:681
+msgid "&Next Paragraph"
+msgstr "&Parágrafo Seguinte"
+
+#: ../src/generic/tipdlg.cpp:276
+msgid "&Next Tip"
+msgstr "&Próxima Dica"
+
+#: ../src/richtext/richtextstylepage.cpp:123
+msgid "&Next style:"
+msgstr "&Próximo estilo:"
+
+#: ../src/common/stockitem.cpp:177 ../src/msw/msgdlg.cpp:476
+msgid "&No"
+msgstr "&Não"
+
+#: ../src/generic/dbgrptg.cpp:356
+msgid "&Notes:"
+msgstr "&Notas:"
+
+#: ../src/richtext/richtextbulletspage.cpp:264
+msgid "&Number:"
+msgstr "&Número:"
+
+#: ../src/generic/fontdlgg.cpp:475 ../src/generic/fontdlgg.cpp:482
+#: ../src/osx/carbon/fontdlg.cpp:594 ../src/common/stockitem.cpp:178
+msgid "&OK"
+msgstr "&OK"
+
+#: ../src/generic/dbgrptg.cpp:342 ../src/common/stockitem.cpp:179
+#: ../src/html/helpfrm.cpp:137
+msgid "&Open..."
+msgstr "&Abrir..."
+
+#: ../src/richtext/richtextindentspage.cpp:222
+msgid "&Outline level:"
+msgstr "&Nível do contorno:"
+
+#: ../src/richtext/richtextindentspage.cpp:293
+msgid "&Page Break"
+msgstr "&Quebra da Página"
+
+#: ../src/richtext/richtextctrl.cpp:327 ../src/osx/textctrl_osx.cpp:584
+#: ../src/common/stockitem.cpp:180 ../src/msw/textctrl.cpp:2285
+msgid "&Paste"
+msgstr "&Colar"
+
+#: ../include/wx/richtext/richtextbuffer.h:4655
+msgid "&Picture"
+msgstr "&Foto"
+
+#: ../src/generic/fontdlgg.cpp:422
+msgid "&Point size:"
+msgstr "&Tamanho do ponto:"
+
+#: ../src/richtext/richtexttabspage.cpp:114
+msgid "&Position (tenths of a mm):"
+msgstr "&Posição (décimos de um milímetro):"
+
+#: ../src/richtext/richtextsizepage.cpp:514
+msgid "&Position mode:"
+msgstr "&Modo da posição:"
+
+#: ../src/common/stockitem.cpp:181
+msgid "&Preferences"
+msgstr "&Preferências"
+
+#: ../src/aui/tabmdi.cpp:112 ../src/generic/mdig.cpp:101
+#: ../src/msw/mdi.cpp:177
+msgid "&Previous"
+msgstr "&Anterior"
+
+#: ../src/richtext/richtextsizepage.cpp:675
+msgid "&Previous Paragraph"
+msgstr "&Parágrafo Anterior"
+
+#: ../src/common/stockitem.cpp:183
+msgid "&Print..."
+msgstr "&Imprimir..."
+
+#: ../src/richtext/richtextctrl.cpp:332 ../src/richtext/richtextctrl.cpp:4945
+#: ../src/common/stockitem.cpp:184
+msgid "&Properties"
+msgstr "&Propriedades"
+
+#: ../src/common/stockitem.cpp:156
+msgid "&Quit"
+msgstr "&Sair"
+
+#: ../src/richtext/richtextctrl.cpp:323 ../src/osx/textctrl_osx.cpp:580
+#: ../src/common/stockitem.cpp:185 ../src/common/cmdproc.cpp:293
+#: ../src/common/cmdproc.cpp:300 ../src/msw/textctrl.cpp:2281
+msgid "&Redo"
+msgstr "&Refazer"
+
+#: ../src/common/cmdproc.cpp:289 ../src/common/cmdproc.cpp:309
+msgid "&Redo "
+msgstr "&Refazer "
+
+#: ../src/richtext/richtextstyledlg.cpp:257
+msgid "&Rename Style..."
+msgstr "&Renomear Estilo..."
+
+#: ../src/generic/fdrepdlg.cpp:179
+msgid "&Replace"
+msgstr "&Substituir"
+
+#: ../src/richtext/richtextstyledlg.cpp:287
+msgid "&Restart numbering"
+msgstr "&Reiniciar a numeração"
+
+#: ../src/univ/themes/win32.cpp:3747
+msgid "&Restore"
+msgstr "&Restaurar"
+
+#: ../src/richtext/richtextindentspage.cpp:146
+#: ../src/richtext/richtextliststylepage.cpp:335
+msgid "&Right"
+msgstr "&Direita"
+
+#: ../src/richtext/richtextindentspage.cpp:213
+#: ../src/richtext/richtextborderspage.cpp:299
+#: ../src/richtext/richtextborderspage.cpp:443
+#: ../src/richtext/richtextliststylepage.cpp:399
+#: ../src/richtext/richtextmarginspage.cpp:212
+#: ../src/richtext/richtextmarginspage.cpp:326
+#: ../src/richtext/richtextsizepage.cpp:602
+#: ../src/richtext/richtextsizepage.cpp:609
+msgid "&Right:"
+msgstr "&Direita:"
+
+#: ../src/common/stockitem.cpp:190
+msgid "&Save"
+msgstr "&Salvar"
+
+#: ../src/common/stockitem.cpp:191
+msgid "&Save as"
+msgstr "&Salvar como"
+
+#: ../include/wx/richmsgdlg.h:29
+msgid "&See details"
+msgstr "&Ver detalhes"
+
+#: ../src/generic/tipdlg.cpp:270
+msgid "&Show tips at startup"
+msgstr "&Mostrar dicas ao iniciar"
+
+#: ../src/univ/themes/win32.cpp:3750
+msgid "&Size"
+msgstr "&Tamanho"
+
+#: ../src/richtext/richtextfontpage.cpp:168
+msgid "&Size:"
+msgstr "&Tamanho:"
+
+#: ../src/generic/progdlgg.cpp:282
+msgid "&Skip"
+msgstr "&Pular"
+
+#: ../src/richtext/richtextindentspage.cpp:242
+#: ../src/richtext/richtextliststylepage.cpp:417
+msgid "&Spacing (tenths of a mm)"
+msgstr "&Espaçamento (décimos de um milímetro)"
+
+#: ../src/common/stockitem.cpp:197
+msgid "&Spell Check"
+msgstr "&"
+
+#: ../src/common/stockitem.cpp:198
+msgid "&Stop"
+msgstr "&Parar"
+
+#: ../src/richtext/richtextfontpage.cpp:284 ../src/common/stockitem.cpp:199
+msgid "&Strikethrough"
+msgstr "&Penetrar"
+
+#: ../src/generic/fontdlgg.cpp:382 ../src/richtext/richtextstylepage.cpp:104
+msgid "&Style:"
+msgstr "&Estilo:"
+
+#: ../src/richtext/richtextstyledlg.cpp:198
+msgid "&Styles:"
+msgstr "&Estilos:"
+
+#: ../src/richtext/richtextsymboldlg.cpp:413
+msgid "&Subset:"
+msgstr "&Subset:"
+
+#: ../src/richtext/richtextliststylepage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:222
+msgid "&Symbol:"
+msgstr "&Símbolo:"
+
+#: ../include/wx/richtext/richtextbuffer.h:5679
+msgid "&Table"
+msgstr "&Tabela"
+
+#: ../src/common/stockitem.cpp:200
+msgid "&Top"
+msgstr "&Topo"
+
+#: ../src/richtext/richtextborderspage.cpp:329
+#: ../src/richtext/richtextborderspage.cpp:473
+#: ../src/richtext/richtextmarginspage.cpp:235
+#: ../src/richtext/richtextmarginspage.cpp:349
+#: ../src/richtext/richtextsizepage.cpp:567
+#: ../src/richtext/richtextsizepage.cpp:574
+msgid "&Top:"
+msgstr "&Topo:"
+
+#: ../src/generic/fontdlgg.cpp:444 ../src/common/stockitem.cpp:202
+msgid "&Underline"
+msgstr "&Sublinhar"
+
+#: ../src/richtext/richtextfontpage.cpp:243
+msgid "&Underlining:"
+msgstr "&Sublinhado:"
+
+#: ../src/richtext/richtextctrl.cpp:322 ../src/osx/textctrl_osx.cpp:579
+#: ../src/common/stockitem.cpp:203 ../src/common/cmdproc.cpp:271
+#: ../src/msw/textctrl.cpp:2280
+msgid "&Undo"
+msgstr "&Desfazer"
+
+#: ../src/common/cmdproc.cpp:265
+msgid "&Undo "
+msgstr "&Desfazer "
+
+#: ../src/common/stockitem.cpp:204
+msgid "&Unindent"
+msgstr "&Sem parágrafo"
+
+#: ../src/common/stockitem.cpp:205
+msgid "&Up"
+msgstr "&Para cima"
+
+#: ../src/richtext/richtextsizepage.cpp:278
+msgid "&Vertical alignment:"
+msgstr "&Alinhamento vertical:"
+
+#: ../src/generic/dbgrptg.cpp:340
+msgid "&View..."
+msgstr "&Visualizar..."
+
+#: ../src/generic/fontdlgg.cpp:393
+msgid "&Weight:"
+msgstr "&Peso:"
+
+#: ../src/richtext/richtextsizepage.cpp:317
+#: ../src/richtext/richtextsizepage.cpp:324
+msgid "&Width:"
+msgstr "&Largura:"
+
+#: ../src/aui/tabmdi.cpp:311 ../src/aui/tabmdi.cpp:327
+#: ../src/aui/tabmdi.cpp:329 ../src/generic/mdig.cpp:294
+#: ../src/generic/mdig.cpp:310 ../src/generic/mdig.cpp:314
+#: ../src/msw/mdi.cpp:77
+msgid "&Window"
+msgstr "&Janela"
+
+#: ../src/common/stockitem.cpp:206 ../src/msw/msgdlg.cpp:476
+msgid "&Yes"
+msgstr "&Sim"
+
+#: ../src/common/config.cpp:523 ../src/msw/regconf.cpp:258
+#, c-format
+msgid "'%s' has extra '..', ignored."
+msgstr "'%s' tem '..' extras; ignorados."
+
+#: ../src/common/valtext.cpp:249 ../src/common/valtext.cpp:251
+#: ../src/common/valtext.cpp:253 ../src/common/valtext.cpp:255
+#, c-format
+msgid "'%s' is invalid"
+msgstr "'%s' é inválido"
+
+#: ../src/common/cmdline.cpp:948 ../src/common/cmdline.cpp:966
+#, c-format
+msgid "'%s' is not a correct numeric value for option '%s'."
+msgstr "'%s' não é um valor numérico correto para a opçãoo '%s'."
+
+#: ../src/common/translation.cpp:1086
+#, c-format
+msgid "'%s' is not a valid message catalog."
+msgstr "'%s' não é um catálogo de mensagens válido."
+
+#: ../src/common/textbuf.cpp:239
+#, c-format
+msgid "'%s' is probably a binary buffer."
+msgstr "'%s' é provavelmente um buffer binário."
+
+#: ../src/common/valtext.cpp:247
+#, c-format
+msgid "'%s' should be numeric."
+msgstr "'%s' deve ser numérico."
+
+#: ../src/common/valtext.cpp:239
+#, c-format
+msgid "'%s' should only contain ASCII characters."
+msgstr "'%s' deve conter apenas caracteres ASCII."
+
+#: ../src/common/valtext.cpp:241
+#, c-format
+msgid "'%s' should only contain alphabetic characters."
+msgstr "'%s' deve conter apenas caracteres alfabéticos."
+
+#: ../src/common/valtext.cpp:243
+#, c-format
+msgid "'%s' should only contain alphabetic or numeric characters."
+msgstr "'%s' deve conter apenas caracteres alfabéticos ou numéricos."
+
+#: ../src/common/valtext.cpp:245
+#, c-format
+msgid "'%s' should only contain digits."
+msgstr "'%s' só deve conter dígitos."
+
+#: ../src/richtext/richtextliststylepage.cpp:229
+#: ../src/richtext/richtextbulletspage.cpp:179
+msgid "(*)"
+msgstr "(*)"
+
+#: ../src/html/helpwnd.cpp:976
+msgid "(Help)"
+msgstr "(Ajuda)"
+
+#: ../src/richtext/richtextliststylepage.cpp:481
+#: ../src/richtext/richtextbulletspage.cpp:286
+msgid "(None)"
+msgstr "(Nenhum)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:504
+msgid "(Normal text)"
+msgstr "(Texto normal)"
+
+#: ../src/html/helpwnd.cpp:426 ../src/html/helpwnd.cpp:1119
+#: ../src/html/helpwnd.cpp:1745
+msgid "(bookmarks)"
+msgstr "(favoritos)"
+
+#: ../src/richtext/richtextindentspage.cpp:274
+#: ../src/richtext/richtextindentspage.cpp:286
+#: ../src/richtext/richtextindentspage.cpp:287
+#: ../src/richtext/richtextindentspage.cpp:311
+#: ../src/richtext/richtextindentspage.cpp:326
+#: ../src/richtext/richtextformatdlg.cpp:831
+#: ../src/richtext/richtextfontpage.cpp:331
+#: ../src/richtext/richtextfontpage.cpp:335
+#: ../src/richtext/richtextfontpage.cpp:339
+#: ../src/richtext/richtextliststylepage.cpp:448
+#: ../src/richtext/richtextliststylepage.cpp:460
+#: ../src/richtext/richtextliststylepage.cpp:461
+msgid "(none)"
+msgstr "(nenhum)"
+
+#: ../src/richtext/richtextliststylepage.cpp:492
+#: ../src/richtext/richtextbulletspage.cpp:297
+msgid "*"
+msgstr "*"
+
+#: ../src/richtext/richtextliststylepage.cpp:236
+#: ../src/richtext/richtextbulletspage.cpp:186
+msgid "*)"
+msgstr "*)"
+
+#: ../src/richtext/richtextliststylepage.cpp:495
+#: ../src/richtext/richtextbulletspage.cpp:300
+msgid "+"
+msgstr "+"
+
+#: ../src/msw/utils.cpp:1324
+msgid ", 64-bit edition"
+msgstr ", edição 64 bits"
+
+#: ../src/richtext/richtextliststylepage.cpp:493
+#: ../src/richtext/richtextbulletspage.cpp:298
+msgid "-"
+msgstr "-"
+
+#: ../src/generic/filepickerg.cpp:66
+msgid "..."
+msgstr "..."
+
+#: ../src/richtext/richtextindentspage.cpp:276
+#: ../src/richtext/richtextliststylepage.cpp:450
+msgid "1.1"
+msgstr "1.1"
+
+#: ../src/richtext/richtextindentspage.cpp:277
+#: ../src/richtext/richtextliststylepage.cpp:451
+msgid "1.2"
+msgstr "1.2"
+
+#: ../src/richtext/richtextindentspage.cpp:278
+#: ../src/richtext/richtextliststylepage.cpp:452
+msgid "1.3"
+msgstr "1.3"
+
+#: ../src/richtext/richtextindentspage.cpp:279
+#: ../src/richtext/richtextliststylepage.cpp:453
+msgid "1.4"
+msgstr "1.4"
+
+#: ../src/richtext/richtextindentspage.cpp:280
+#: ../src/richtext/richtextliststylepage.cpp:454
+msgid "1.5"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:455
+msgid "1.6"
+msgstr "1.6"
+
+#: ../src/richtext/richtextindentspage.cpp:282
+#: ../src/richtext/richtextliststylepage.cpp:456
+msgid "1.7"
+msgstr "1.7"
+
+#: ../src/richtext/richtextindentspage.cpp:283
+#: ../src/richtext/richtextliststylepage.cpp:457
+msgid "1.8"
+msgstr "1.8"
+
+#: ../src/richtext/richtextindentspage.cpp:284
+#: ../src/richtext/richtextliststylepage.cpp:458
+msgid "1.9"
+msgstr "1.9"
+
+#: ../src/common/paper.cpp:141
+msgid "10 x 11 in"
+msgstr "10 x 11 em"
+
+#: ../src/common/paper.cpp:114
+msgid "10 x 14 in"
+msgstr "10 x 14 em"
+
+#: ../src/common/paper.cpp:115
+msgid "11 x 17 in"
+msgstr "11 x 17 em"
+
+#: ../src/common/paper.cpp:185
+msgid "12 x 11 in"
+msgstr "12 x 11 em"
+
+#: ../src/common/paper.cpp:142
+msgid "15 x 11 in"
+msgstr "15 x 11 em"
+
+#: ../src/richtext/richtextindentspage.cpp:285
+#: ../src/richtext/richtextliststylepage.cpp:459
+msgid "2"
+msgstr "2"
+
+#: ../src/common/paper.cpp:133
+msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in"
+msgstr "Envelope 6 3/4, 3 5/8 x 6 1/2 em\""
+
+#: ../src/common/paper.cpp:140
+msgid "9 x 11 in"
+msgstr "9 x 11 em"
+
+#: ../src/html/htmprint.cpp:431
+msgid ": file does not exist!"
+msgstr ": o arquivo não existe!"
+
+#: ../src/common/fontmap.cpp:199
+msgid ": unknown charset"
+msgstr ": conjunto de caracteres desconhecido"
+
+#: ../src/common/fontmap.cpp:413
+msgid ": unknown encoding"
+msgstr ": codificação desconhecida"
+
+#: ../src/generic/wizard.cpp:437
+msgid "< &Back"
+msgstr "< &Voltar"
+
+#: ../src/osx/carbon/fontdlg.cpp:608 ../src/osx/carbon/fontdlg.cpp:815
+#: ../src/osx/carbon/fontdlg.cpp:835
+msgid "<Any Decorative>"
+msgstr "<Qualquer Decorativo>"
+
+#: ../src/osx/carbon/fontdlg.cpp:609 ../src/osx/carbon/fontdlg.cpp:817
+#: ../src/osx/carbon/fontdlg.cpp:837
+msgid "<Any Modern>"
+msgstr "<Qualquer Moderno>"
+
+#: ../src/osx/carbon/fontdlg.cpp:607 ../src/osx/carbon/fontdlg.cpp:813
+#: ../src/osx/carbon/fontdlg.cpp:833
+msgid "<Any Roman>"
+msgstr "<Qualquer Romano>"
+
+#: ../src/osx/carbon/fontdlg.cpp:610 ../src/osx/carbon/fontdlg.cpp:819
+#: ../src/osx/carbon/fontdlg.cpp:839
+msgid "<Any Script>"
+msgstr "<Qualquer Script>"
+
+#: ../src/osx/carbon/fontdlg.cpp:611 ../src/osx/carbon/fontdlg.cpp:824
+#: ../src/osx/carbon/fontdlg.cpp:843
+msgid "<Any Swiss>"
+msgstr "<Qualquer Suíço>"
+
+#: ../src/osx/carbon/fontdlg.cpp:612 ../src/osx/carbon/fontdlg.cpp:821
+#: ../src/osx/carbon/fontdlg.cpp:841
+msgid "<Any Teletype>"
+msgstr "<Qualquer Teletype>"
+
+#: ../src/osx/carbon/fontdlg.cpp:606
+msgid "<Any>"
+msgstr "<Qualquer>"
+
+#: ../src/generic/filectrlg.cpp:286 ../src/generic/filectrlg.cpp:309
+msgid "<DIR>"
+msgstr "<DIR>"
+
+#: ../src/generic/filectrlg.cpp:290 ../src/generic/filectrlg.cpp:313
+msgid "<DRIVE>"
+msgstr "<DRIVE>"
+
+#: ../src/generic/filectrlg.cpp:288 ../src/generic/filectrlg.cpp:311
+msgid "<LINK>"
+msgstr "<LINK>"
+
+#: ../src/html/helpwnd.cpp:1279
+msgid "<b><i>Bold italic face.</i></b><br>"
+msgstr "<b><i>Face em negrito itálico.</i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1283
+msgid "<b><i>bold italic <u>underlined</u></i></b><br>"
+msgstr "<b><i>negrito itálico <u>sublinhado</u></i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1278
+msgid "<b>Bold face.</b> "
+msgstr "<b>Face em negrito.</b>"
+
+#: ../src/html/helpwnd.cpp:1277
+msgid "<i>Italic face.</i> "
+msgstr "<i>Face em itálico.</i> "
+
+#: ../src/richtext/richtextliststylepage.cpp:494
+#: ../src/richtext/richtextbulletspage.cpp:299
+msgid ">"
+msgstr ">"
+
+#: ../src/generic/dbgrptg.cpp:318
+msgid "A debug report has been generated in the directory\n"
+msgstr "Um relatório de debug foi gerado no diretório\n"
+
+#: ../src/common/debugrpt.cpp:578
+msgid "A debug report has been generated. It can be found in"
+msgstr "Um relatório de debug foi gerado. Ele pode ser achado em"
+
+#: ../src/common/xtixml.cpp:418
+msgid "A non empty collection must consist of 'element' nodes"
+msgstr "Uma coleção não vazia deve consistir de nodes do 'elemento'"
+
+#: ../src/richtext/richtextliststylepage.cpp:304
+#: ../src/richtext/richtextliststylepage.cpp:306
+#: ../src/richtext/richtextbulletspage.cpp:257
+#: ../src/richtext/richtextbulletspage.cpp:259
+msgid "A standard bullet name."
+msgstr "Um nome para o projétil padrão."
+
+#: ../src/common/paper.cpp:218
+msgid "A0 sheet, 841 x 1189 mm"
+msgstr "Folha A0, 841 x 1189 mm"
+
+#: ../src/common/paper.cpp:219
+msgid "A1 sheet, 594 x 841 mm"
+msgstr "Folha A1, 594 x 841 mm"
+
+#: ../src/common/paper.cpp:160
+msgid "A2 420 x 594 mm"
+msgstr "A2 420 x 594 mm"
+
+#: ../src/common/paper.cpp:157
+msgid "A3 Extra 322 x 445 mm"
+msgstr "A3 Extra 322 x 445 mm"
+
+#: ../src/common/paper.cpp:162
+msgid "A3 Extra Transverse 322 x 445 mm"
+msgstr "A3 Extra transversal 322 x 445 mm"
+
+#: ../src/common/paper.cpp:171
+msgid "A3 Rotated 420 x 297 mm"
+msgstr "A3 Rotacionada 420 x 297 mm"
+
+#: ../src/common/paper.cpp:161
+msgid "A3 Transverse 297 x 420 mm"
+msgstr "A3 transversal 297 x 420 mm"
+
+#: ../src/common/paper.cpp:107
+msgid "A3 sheet, 297 x 420 mm"
+msgstr "Folha A3, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:147
+msgid "A4 Extra 9.27 x 12.69 in"
+msgstr "A4 Extra, 9.27 x 12.69 em"
+
+#: ../src/common/paper.cpp:154
+msgid "A4 Plus 210 x 330 mm"
+msgstr "A4 Plus, 210 x 330 mm"
+
+#: ../src/common/paper.cpp:172
+msgid "A4 Rotated 297 x 210 mm"
+msgstr "A4 Rotacionada, 297 x 210 mm"
+
+#: ../src/common/paper.cpp:149
+msgid "A4 Transverse 210 x 297 mm"
+msgstr "A4 Transversal 210 x 297 mm"
+
+#: ../src/common/paper.cpp:98
+msgid "A4 sheet, 210 x 297 mm"
+msgstr "Folha A4 210 x 297 mm"
+
+#: ../src/common/paper.cpp:108
+msgid "A4 small sheet, 210 x 297 mm"
+msgstr "Folha A4 pequena 210 x 297 mm"
+
+#: ../src/common/paper.cpp:158
+msgid "A5 Extra 174 x 235 mm"
+msgstr "A5 Extra 174 x 235 mm"
+
+#: ../src/common/paper.cpp:173
+msgid "A5 Rotated 210 x 148 mm"
+msgstr "A5 Rotacionada 210 x 148 mm"
+
+#: ../src/common/paper.cpp:155
+msgid "A5 Transverse 148 x 210 mm"
+msgstr "A5 Tranversal 148 x 210 mm"
+
+#: ../src/common/paper.cpp:109
+msgid "A5 sheet, 148 x 210 mm"
+msgstr "Folha A5, 148 x 210 mm"
+
+#: ../src/common/paper.cpp:165
+msgid "A6 105 x 148 mm"
+msgstr "A6 105 x 148 mm"
+
+#: ../src/common/paper.cpp:178
+msgid "A6 Rotated 148 x 105 mm"
+msgstr "A6 Rotacionada 148 x 105 mm"
+
+#: ../src/generic/fontdlgg.cpp:83 ../src/richtext/richtextformatdlg.cpp:526
+#: ../src/osx/carbon/fontdlg.cpp:339
+msgid "ABCDEFGabcdefg12345"
+msgstr "ABCDEFGabcdefg12345"
+
+#: ../src/common/accelcmn.cpp:76
+msgid "ADD"
+msgstr "ADICIONAR"
+
+#: ../src/richtext/richtextsymboldlg.cpp:458 ../src/common/ftp.cpp:405
+msgid "ASCII"
+msgstr "ASCII"
+
+#: ../src/osx/menu_osx.cpp:630 ../src/common/stockitem.cpp:139
+msgid "About"
+msgstr "Sobre"
+
+#: ../src/generic/aboutdlgg.cpp:140 ../src/msw/aboutdlg.cpp:64
+#, c-format
+msgid "About %s"
+msgstr "Sobre o %s"
+
+#: ../src/richtext/richtextsizepage.cpp:520
+msgid "Absolute"
+msgstr "Absoluto"
+
+#: ../src/common/stockitem.cpp:207
+msgid "Actual Size"
+msgstr "Tamanho Real"
+
+#: ../src/common/stockitem.cpp:140
+msgid "Add"
+msgstr "Adicionar"
+
+#: ../src/richtext/richtextbuffer.cpp:10751
+msgid "Add Column"
+msgstr "Adicionar Coluna"
+
+#: ../src/richtext/richtextbuffer.cpp:10688
+msgid "Add Row"
+msgstr "Adicionar Fileira"
+
+#: ../src/html/helpwnd.cpp:439
+msgid "Add current page to bookmarks"
+msgstr "Adicionar a página atual aos favoritos"
+
+#: ../src/generic/colrdlgg.cpp:283
+msgid "Add to custom colours"
+msgstr "Adicionar as cores personalizadas"
+
+#: ../include/wx/xtiprop.h:259
+msgid "AddToPropertyCollection called on a generic accessor"
+msgstr "AddToPropertyCollection chamada em um m�todo de acesso gen�rico"
+
+#: ../include/wx/xtiprop.h:197
+msgid "AddToPropertyCollection called w/o valid adder"
+msgstr "AddToPropertyCollection chamada sem adicionador v�lido"
+
+#: ../src/html/helpctrl.cpp:159
+#, c-format
+msgid "Adding book %s"
+msgstr "Adicionando o livro %s"
+
+#: ../src/osx/carbon/dataview.cpp:1933
+msgid "Adding flavor TEXT failed"
+msgstr "Falhou em adicionar o sabor TEXT"
+
+#: ../src/osx/carbon/dataview.cpp:1954
+msgid "Adding flavor utxt failed"
+msgstr "Falhou em adicionar o sabor utxt"
+
+#: ../src/common/preferencescmn.cpp:41
+msgid "Advanced"
+msgstr "Avançado"
+
+#: ../src/richtext/richtextliststylepage.cpp:435
+msgid "After a paragraph:"
+msgstr "Após um parágrafo:"
+
+#: ../src/common/stockitem.cpp:172
+msgid "Align Left"
+msgstr "Alinhar a Esquerda"
+
+#: ../src/common/stockitem.cpp:173
+msgid "Align Right"
+msgstr "Alinhar a Direita"
+
+#: ../src/richtext/richtextsizepage.cpp:266
+msgid "Alignment"
+msgstr "Alinhamento"
+
+#: ../src/generic/prntdlgg.cpp:215
+msgid "All"
+msgstr "Tudo"
+
+#: ../src/generic/filectrlg.cpp:1205 ../src/common/fldlgcmn.cpp:89
+#, c-format
+msgid "All files (%s)|%s"
+msgstr "Todos os arquivos (%s)|%s"
+
+#: ../include/wx/defs.h:2922
+msgid "All files (*)|*"
+msgstr "Todos os arquivos (*)|*"
+
+#: ../include/wx/defs.h:2919
+msgid "All files (*.*)|*.*"
+msgstr "Todos os arquivos (*.*)|*.*"
+
+#: ../src/richtext/richtextstyles.cpp:1057
+msgid "All styles"
+msgstr "Todos os estilos"
+
+#: ../src/propgrid/manager.cpp:1496
+msgid "Alphabetic Mode"
+msgstr "Modo Alfabético"
+
+#: ../src/common/xtistrm.cpp:429
+msgid "Already Registered Object passed to SetObjectClassInfo"
+msgstr "Objeto Já Registrado passado para o SetObjectClassInfo"
+
+#: ../src/unix/dialup.cpp:353
+msgid "Already dialling ISP."
+msgstr "Já discando para o ISP."
+
+#: ../src/common/accelcmn.cpp:320 ../src/univ/themes/win32.cpp:3756
+msgid "Alt+"
+msgstr "Alt+"
+
+#: ../src/common/debugrpt.cpp:581
+msgid "And includes the following files:\n"
+msgstr "E inclui os seguintes arquivos:\n"
+
+#: ../src/generic/animateg.cpp:162
+#, c-format
+msgid "Animation file is not of type %ld."
+msgstr "O arquivo de animação não é do tipo %ld."
+
+#: ../src/generic/logg.cpp:1034
+#, c-format
+msgid "Append log to file '%s' (choosing [No] will overwrite it)?"
+msgstr "Anexar o log ao arquivo '%s'? (escolher [Não] o sobrescreverá)"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:610
+#: ../src/osx/menu_osx.cpp:649 ../src/osx/menu_osx.cpp:657
+msgid "Application"
+msgstr "Aplicativo"
+
+#: ../src/common/stockitem.cpp:141
+msgid "Apply"
+msgstr "Aplicar"
+
+#: ../src/richtext/richtextliststylepage.cpp:482
+#: ../src/richtext/richtextbulletspage.cpp:287
+msgid "Arabic"
+msgstr "Árabe"
+
+#: ../src/common/fmapbase.cpp:153
+msgid "Arabic (ISO-8859-6)"
+msgstr "Árabe (ISO-8859-6)"
+
+#: ../src/msw/ole/automtn.cpp:661
+#, c-format
+msgid "Argument %u not found."
+msgstr "Argumento %u não achado."
+
+#: ../src/generic/aboutdlgg.cpp:184
+msgid "Artists"
+msgstr "Artistas"
+
+#: ../src/common/stockitem.cpp:195
+msgid "Ascending"
+msgstr "Ascendente"
+
+#: ../src/generic/filectrlg.cpp:468
+msgid "Attributes"
+msgstr "Atributos"
+
+#: ../src/richtext/richtextliststylepage.cpp:294
+#: ../src/richtext/richtextbulletspage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:247
+msgid "Available fonts."
+msgstr "Fontes disponíveis."
+
+#: ../src/common/paper.cpp:138
+msgid "B4 (ISO) 250 x 353 mm"
+msgstr "B4 (ISO), 250 x 353 mm"
+
+#: ../src/common/paper.cpp:174
+msgid "B4 (JIS) Rotated 364 x 257 mm"
+msgstr "B4 (JIS) Rotacionada 364 x 257 mm"
+
+#: ../src/common/paper.cpp:128
+msgid "B4 Envelope, 250 x 353 mm"
+msgstr "Envelope B4, 250 x 353 mm"
+
+#: ../src/common/paper.cpp:110
+msgid "B4 sheet, 250 x 354 mm"
+msgstr "Folha B4, 250 x 354 mm"
+
+#: ../src/common/paper.cpp:159
+msgid "B5 (ISO) Extra 201 x 276 mm"
+msgstr "B5 (ISO) Extra, 201 x 276 mm"
+
+#: ../src/common/paper.cpp:175
+msgid "B5 (JIS) Rotated 257 x 182 mm"
+msgstr "B5 (JIS) Rotacionada 257 x 182 mm"
+
+#: ../src/common/paper.cpp:156
+msgid "B5 (JIS) Transverse 182 x 257 mm"
+msgstr "B5 (JIS) Transversal 182 x 257 mm"
+
+#: ../src/common/paper.cpp:129
+msgid "B5 Envelope, 176 x 250 mm"
+msgstr "Envelope B5, 176 x 250 mm"
+
+#: ../src/common/paper.cpp:111
+msgid "B5 sheet, 182 x 257 millimeter"
+msgstr "Folha B5, 182 x 257 milímetros"
+
+#: ../src/common/paper.cpp:183
+msgid "B6 (JIS) 128 x 182 mm"
+msgstr "B6 (JIS) 128 x 182 mm"
+
+#: ../src/common/paper.cpp:184
+msgid "B6 (JIS) Rotated 182 x 128 mm"
+msgstr "B6 (JIS) Rotacionada 182 x 128 mm"
+
+#: ../src/common/paper.cpp:130
+msgid "B6 Envelope, 176 x 125 mm"
+msgstr "Envelope B6, 176 x 125 mm"
+
+#: ../src/common/accelcmn.cpp:49
+msgid "BACK"
+msgstr "BACK"
+
+#: ../src/common/imagbmp.cpp:523 ../src/common/imagbmp.cpp:553
+#: ../src/common/imagbmp.cpp:568
+msgid "BMP: Couldn't allocate memory."
+msgstr "BMP: Não pôde distribuir a memória."
+
+#: ../src/common/imagbmp.cpp:97
+msgid "BMP: Couldn't save invalid image."
+msgstr "BMP: Não pôde salvar a imagem inválida."
+
+#: ../src/common/imagbmp.cpp:338
+msgid "BMP: Couldn't write RGB color map."
+msgstr "BMP: Não pôde escrever o mapa de cores RGB."
+
+#: ../src/common/imagbmp.cpp:473
+msgid "BMP: Couldn't write data."
+msgstr "BMP: Não pôde escrever os dados."
+
+#: ../src/common/imagbmp.cpp:239
+msgid "BMP: Couldn't write the file (Bitmap) header."
+msgstr "BMP: Não pôde escrever o cabeçalho do arquivo (Bitmap)."
+
+#: ../src/common/imagbmp.cpp:262
+msgid "BMP: Couldn't write the file (BitmapInfo) header."
+msgstr "BMP: Não pôde escrever o cabeçalho do arquivo (BitmapInfo)."
+
+#: ../src/common/imagbmp.cpp:133
+msgid "BMP: wxImage doesn't have own wxPalette."
+msgstr "BMP: o wxImage não tem sua própria wxPalette."
+
+#: ../src/common/stockitem.cpp:142
+msgid "Back"
+msgstr "Voltar"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:119
+#: ../src/richtext/richtextformatdlg.cpp:374
+msgid "Background"
+msgstr "2º plano"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:131
+msgid "Background &colour:"
+msgstr "Cor do &2º plano:"
+
+#: ../src/osx/carbon/fontdlg.cpp:406
+msgid "Background colour"
+msgstr "Cor do 2º plano"
+
+#: ../src/common/fmapbase.cpp:160
+msgid "Baltic (ISO-8859-13)"
+msgstr "Báltico (ISO-8859-13)"
+
+#: ../src/common/fmapbase.cpp:151
+msgid "Baltic (old) (ISO-8859-4)"
+msgstr "Báltico (antigo) (ISO-8859-4)"
+
+#: ../src/richtext/richtextliststylepage.cpp:426
+msgid "Before a paragraph:"
+msgstr "Antes de um parágrafo:"
+
+#: ../src/richtext/richtextliststylepage.cpp:489
+#: ../src/richtext/richtextbulletspage.cpp:294
+msgid "Bitmap"
+msgstr "Bitmap"
+
+#: ../src/osx/carbon/dataview.cpp:2396
+msgid "Bitmap renderer cannot render value; value type: "
+msgstr "O renderizador do bitmap não pode renderizar o valor; tipo de valor:"
+
+#: ../src/generic/fontdlgg.cpp:333 ../src/richtext/richtextfontpage.cpp:337
+#: ../src/osx/carbon/fontdlg.cpp:540 ../src/common/stockitem.cpp:143
+msgid "Bold"
+msgstr "Negrito"
+
+#: ../src/richtext/richtextborderspage.cpp:256
+#: ../src/richtext/richtextborderspage.cpp:389
+msgid "Border"
+msgstr "Margem"
+
+#: ../src/richtext/richtextformatdlg.cpp:368
+msgid "Borders"
+msgstr "Margens"
+
+#: ../src/richtext/richtextsizepage.cpp:288 ../src/common/stockitem.cpp:144
+msgid "Bottom"
+msgstr "Fundo"
+
+#: ../src/generic/prntdlgg.cpp:893
+msgid "Bottom margin (mm):"
+msgstr "Margem na parte de baixo (mm):"
+
+#: ../src/richtext/richtextbuffer.cpp:8919
+msgid "Box Properties"
+msgstr "Propriedades da Caixa"
+
+#: ../src/richtext/richtextstyles.cpp:1061
+msgid "Box styles"
+msgstr "Estilos da caixa"
+
+#: ../src/common/filepickercmn.cpp:43 ../src/common/filepickercmn.cpp:44
+msgid "Browse"
+msgstr "Procurar"
+
+#: ../src/richtext/richtextliststylepage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:195
+msgid "Bullet &Alignment:"
+msgstr "Alinhamento do &Projétilr:"
+
+#: ../src/richtext/richtextliststylepage.cpp:309
+msgid "Bullet style"
+msgstr "Estilo do projétil"
+
+#: ../src/richtext/richtextformatdlg.cpp:342
+msgid "Bullets"
+msgstr "Projéteis"
+
+#: ../src/common/paper.cpp:99
+msgid "C sheet, 17 x 22 in"
+msgstr "Folha C, 17 x 22 em"
+
+#: ../src/generic/logg.cpp:520
+msgid "C&lear"
+msgstr "L&impar"
+
+#: ../src/generic/fontdlgg.cpp:406
+msgid "C&olour:"
+msgstr "C&or:"
+
+#: ../src/common/paper.cpp:124
+msgid "C3 Envelope, 324 x 458 mm"
+msgstr "Envelope C3, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:125
+msgid "C4 Envelope, 229 x 324 mm"
+msgstr "Envelope C4, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:123
+msgid "C5 Envelope, 162 x 229 mm"
+msgstr "Envelope C5, 162 x 229 mm"
+
+#: ../src/common/paper.cpp:126
+msgid "C6 Envelope, 114 x 162 mm"
+msgstr "Envelope C6, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:127
+msgid "C65 Envelope, 114 x 229 mm"
+msgstr "Envelope C65, 114 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:66
+msgid "CANCEL"
+msgstr "CANCELAR"
+
+#: ../src/common/accelcmn.cpp:70
+msgid "CAPITAL"
+msgstr "MAIÚSCULAS"
+
+#: ../src/common/stockitem.cpp:146
+msgid "CD-Rom"
+msgstr "CD-Rom"
+
+#: ../src/html/chm.cpp:815 ../src/html/chm.cpp:874
+msgid "CHM handler currently supports only local files!"
+msgstr "O manejador CHM suporta atualmente apenas arquivos locais!"
+
+#: ../src/common/accelcmn.cpp:67
+msgid "CLEAR"
+msgstr "LIMPAR"
+
+#: ../src/common/accelcmn.cpp:111
+msgid "COMMAND"
+msgstr "COMANDO"
+
+#: ../src/richtext/richtextfontpage.cpp:291
+msgid "Ca&pitals"
+msgstr "Ma&iúsculas"
+
+#: ../src/common/cmdproc.cpp:267
+msgid "Can't &Undo "
+msgstr "Não Pode &Desfazer "
+
+#: ../src/common/image.cpp:2686
+msgid "Can't automatically determine the image format for non-seekable input."
+msgstr ""
+"Não consegue determinar automaticamente o formato da imagem para entrada de "
+"dados não-procurável."
+
+#: ../src/msw/registry.cpp:505
+#, c-format
+msgid "Can't close registry key '%s'"
+msgstr "Não pode fechar a chave de registro '%s'"
+
+#: ../src/msw/registry.cpp:583
+#, c-format
+msgid "Can't copy values of unsupported type %d."
+msgstr "Não pode copiar os valores do tipo não suportado %d."
+
+#: ../src/msw/registry.cpp:486
+#, c-format
+msgid "Can't create registry key '%s'"
+msgstr "Não pode criar a chave de registro '%s'"
+
+#: ../src/msw/thread.cpp:696 ../src/os2/thread.cpp:494
+msgid "Can't create thread"
+msgstr "Não pode criar o thread"
+
+#: ../src/msw/window.cpp:3793
+#, c-format
+msgid "Can't create window of class %s"
+msgstr "Não pode criar a janela da classe %s"
+
+#: ../src/msw/registry.cpp:776
+#, c-format
+msgid "Can't delete key '%s'"
+msgstr "Não pode apagar a chave '%s'"
+
+#: ../src/msw/iniconf.cpp:458 ../src/os2/iniconf.cpp:471
+#, c-format
+msgid "Can't delete the INI file '%s'"
+msgstr "Não pode apagar o arquivo INI '%s'"
+
+#: ../src/msw/registry.cpp:804
+#, c-format
+msgid "Can't delete value '%s' from key '%s'"
+msgstr "Não pode apagar o valor '%s' da chave '%s'"
+
+#: ../src/msw/registry.cpp:1161
+#, c-format
+msgid "Can't enumerate subkeys of key '%s'"
+msgstr "Não pode enumerar as sub-chaves da chave '%s'"
+
+#: ../src/msw/registry.cpp:1116
+#, c-format
+msgid "Can't enumerate values of key '%s'"
+msgstr "Não pode enumerar os valores da chave '%s'"
+
+#: ../src/msw/registry.cpp:1379
+#, c-format
+msgid "Can't export value of unsupported type %d."
+msgstr "Não pode exportar o valor do tipo não suportado %d."
+
+#: ../src/common/ffile.cpp:236
+#, c-format
+msgid "Can't find current position in file '%s'"
+msgstr "Não pode achar a posição atual no arquivo '%s'"
+
+#: ../src/msw/registry.cpp:416
+#, c-format
+msgid "Can't get info about registry key '%s'"
+msgstr "Não pode obter a info sobre a chave de registro '%s'"
+
+#: ../src/common/zstream.cpp:346
+msgid "Can't initialize zlib deflate stream."
+msgstr "Não pode inicializar o fluxo de deflação do zlib."
+
+#: ../src/common/zstream.cpp:185
+msgid "Can't initialize zlib inflate stream."
+msgstr "Não pode inicializar o fluxo de inflação do zlib."
+
+#: ../src/msw/fswatcher.cpp:432
+#, c-format
+msgid "Can't monitor non-existent directory \"%s\" for changes."
+msgstr "Não consegue monitorar o diretório não-existente \"%s\" por mudanças."
+
+#: ../src/msw/registry.cpp:452
+#, c-format
+msgid "Can't open registry key '%s'"
+msgstr "Não pode abrir a chave do registro '%s'"
+
+#: ../src/common/zstream.cpp:252
+#, c-format
+msgid "Can't read from inflate stream: %s"
+msgstr "Não pode ler do fluxo da inflação: %s"
+
+#: ../src/common/zstream.cpp:244
+msgid "Can't read inflate stream: unexpected EOF in underlying stream."
+msgstr "Não pode ler o fluxo da inflação: EOF inexperado no fluxo básico."
+
+#: ../src/msw/registry.cpp:1048
+#, c-format
+msgid "Can't read value of '%s'"
+msgstr "Não pode ler o valor de '%s'"
+
+#: ../src/msw/registry.cpp:877 ../src/msw/registry.cpp:909
+#: ../src/msw/registry.cpp:971
+#, c-format
+msgid "Can't read value of key '%s'"
+msgstr "Não pode ler o valor da chave '%s'"
+
+#: ../src/common/image.cpp:2483
+#, c-format
+msgid "Can't save image to file '%s': unknown extension."
+msgstr "Nâo pode salvar imagem no arquivo '%s': extensão desconhecida."
+
+#: ../src/generic/logg.cpp:579 ../src/generic/logg.cpp:996
+msgid "Can't save log contents to file."
+msgstr "Não pode salvar os conteúdos do log no arquivo."
+
+#: ../src/msw/thread.cpp:652 ../src/os2/thread.cpp:477
+msgid "Can't set thread priority"
+msgstr "Não pode definir a prioridade do thread"
+
+#: ../src/msw/registry.cpp:895 ../src/msw/registry.cpp:939
+#: ../src/msw/registry.cpp:1065
+#, c-format
+msgid "Can't set value of '%s'"
+msgstr "Não pode definir o valor de '%s'"
+
+#: ../src/unix/utilsunx.cpp:357
+msgid "Can't write to child process's stdin"
+msgstr "Não pôde gravar como processo criança stdin"
+
+#: ../src/common/zstream.cpp:427
+#, c-format
+msgid "Can't write to deflate stream: %s"
+msgstr "Não pode escrever no fluxo de deflação: %s"
+
+#: ../include/wx/msgdlg.h:274 ../src/generic/dirdlgg.cpp:107
+#: ../src/richtext/richtextstyledlg.cpp:300 ../src/common/stockitem.cpp:145
+#: ../src/msw/msgdlg.cpp:489 ../src/msw/progdlg.cpp:673
+#: ../src/gtk1/fontdlg.cpp:144 ../src/motif/msgdlg.cpp:196
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: ../src/os2/thread.cpp:116
+msgid "Cannot create mutex."
+msgstr "Não pôde criar o mutex."
+
+#: ../src/osx/carbon/dataview.cpp:895
+msgid "Cannot create new column's ID. Probably max. number of columns reached."
+msgstr ""
+"Não pode criar a ID da nova coluna. O nº máx. de colunas provavelmente foi "
+"alcançado."
+
+#: ../src/common/filefn.cpp:1336
+#, c-format
+msgid "Cannot enumerate files '%s'"
+msgstr "Não pôde enumerar os arquivos '%s'"
+
+#: ../src/msw/dir.cpp:264
+#, c-format
+msgid "Cannot enumerate files in directory '%s'"
+msgstr "Não pôde enumerar os arquivos no diretório '%s'"
+
+#: ../src/msw/dialup.cpp:542
+#, c-format
+msgid "Cannot find active dialup connection: %s"
+msgstr "Não pode achar a conexão dial-up ativa: %s"
+
+#: ../src/msw/dialup.cpp:848
+msgid "Cannot find the location of address book file"
+msgstr "Não pode achar o local do arquivo do livro de endereços"
+
+#: ../src/msw/ole/automtn.cpp:562
+#, c-format
+msgid "Cannot get an active instance of \"%s\""
+msgstr "Não pôde obter uma instância ativa de \"%s\""
+
+#: ../src/unix/threadpsx.cpp:1030
+#, c-format
+msgid "Cannot get priority range for scheduling policy %d."
+msgstr ""
+"Não pode obter o alcance da prioridade para a norma de conduta do "
+"agendamento %d."
+
+#: ../src/unix/utilsunx.cpp:988
+msgid "Cannot get the hostname"
+msgstr "Não pode obter o nome do host"
+
+#: ../src/unix/utilsunx.cpp:1024
+msgid "Cannot get the official hostname"
+msgstr "Não pode obter o nome oficial do host"
+
+#: ../src/msw/dialup.cpp:949
+msgid "Cannot hang up - no active dialup connection."
+msgstr "Não pode desligar - nenhuma conexão dial-up ativa."
+
+#: ../include/wx/msw/ole/oleutils.h:52
+msgid "Cannot initialize OLE"
+msgstr "Não pode inicializar o OLE"
+
+#: ../src/common/socket.cpp:847
+msgid "Cannot initialize sockets"
+msgstr "Não pôde inicializar os sockets"
+
+#: ../src/msw/volume.cpp:620
+#, c-format
+msgid "Cannot load icon from '%s'."
+msgstr "Não pode carregar o ícone do '%s'."
+
+#: ../src/xrc/xmlres.cpp:361
+#, c-format
+msgid "Cannot load resources from '%s'."
+msgstr "Não pôde carregar os recursos de '%s'."
+
+#: ../src/xrc/xmlres.cpp:746
+#, c-format
+msgid "Cannot load resources from file '%s'."
+msgstr "Não pode carregar os recursos do arquivo '%s'."
+
+#: ../src/html/htmlfilt.cpp:137
+#, c-format
+msgid "Cannot open HTML document: %s"
+msgstr "Não pode abrir o documento HTML: %s"
+
+#: ../src/html/helpdata.cpp:665
+#, c-format
+msgid "Cannot open HTML help book: %s"
+msgstr "Não pode abrir o livro de ajuda HTML: %s"
+
+#: ../src/html/helpdata.cpp:297
+#, c-format
+msgid "Cannot open contents file: %s"
+msgstr "Não pode abrir o arquivo dos conteúdos: %s"
+
+#: ../src/generic/dcpsg.cpp:1751
+msgid "Cannot open file for PostScript printing!"
+msgstr "Não pode abrir o arquivo para a impressão PostScript!"
+
+#: ../src/html/helpdata.cpp:311
+#, c-format
+msgid "Cannot open index file: %s"
+msgstr "Não pode abrir o arquivo do índice: %s"
+
+#: ../src/xrc/xmlres.cpp:728
+#, c-format
+msgid "Cannot open resources file '%s'."
+msgstr "Não pôde abrir os recursos de '%s'."
+
+#: ../src/html/helpwnd.cpp:1537
+msgid "Cannot print empty page."
+msgstr "Não pode imprimir a página vazia."
+
+#: ../src/msw/volume.cpp:507
+#, c-format
+msgid "Cannot read typename from '%s'!"
+msgstr "Não pode ler o nome do tipo de '%s'!"
+
+#: ../src/os2/thread.cpp:527
+#, c-format
+msgid "Cannot resume thread %lu"
+msgstr "Não pôde resumir o thread %lu"
+
+#: ../src/msw/thread.cpp:923
+#, c-format
+msgid "Cannot resume thread %lx"
+msgstr "Não pôde resumir o thread %lx"
+
+#: ../src/unix/threadpsx.cpp:1011
+msgid "Cannot retrieve thread scheduling policy."
+msgstr "Não pode recuperar a norma de conduta do agendamento dos threads."
+
+#: ../src/common/intl.cpp:542
+#, c-format
+msgid "Cannot set locale to language \"%s\"."
+msgstr "Não pode definir o locale para o idioma \"%s\"."
+
+#: ../src/unix/threadpsx.cpp:831 ../src/msw/thread.cpp:569
+msgid "Cannot start thread: error writing TLS."
+msgstr "Não pôde iniciar o thread: erro ao gravar o TLS."
+
+#: ../src/os2/thread.cpp:513
+#, c-format
+msgid "Cannot suspend thread %lu"
+msgstr "Não pôde suspender o thread %lu"
+
+#: ../src/msw/thread.cpp:907
+#, c-format
+msgid "Cannot suspend thread %lx"
+msgstr "Não pôde suspender o thread %lx"
+
+#: ../src/msw/thread.cpp:830
+msgid "Cannot wait for thread termination"
+msgstr "Não pôde esperar pelo término do thread"
+
+#: ../src/html/helpwnd.cpp:546
+msgid "Case sensitive"
+msgstr "Caso sensitivo"
+
+#: ../src/propgrid/manager.cpp:1495
+msgid "Categorized Mode"
+msgstr "Modo Categorizado"
+
+#: ../src/richtext/richtextbuffer.cpp:9347
+msgid "Cell Properties"
+msgstr "&Propriedades da Célula"
+
+#: ../src/common/fmapbase.cpp:161
+msgid "Celtic (ISO-8859-14)"
+msgstr "Celta (ISO-8859-14)"
+
+#: ../src/richtext/richtextindentspage.cpp:160
+#: ../src/richtext/richtextliststylepage.cpp:349
+msgid "Cen&tred"
+msgstr "Cen&tralizado"
+
+#: ../src/common/stockitem.cpp:170
+msgid "Centered"
+msgstr "Centralizado"
+
+#: ../src/common/fmapbase.cpp:149
+msgid "Central European (ISO-8859-2)"
+msgstr "Europeu central (ISO-8859-2)"
+
+#: ../src/richtext/richtextliststylepage.cpp:250
+#: ../src/richtext/richtextbulletspage.cpp:200
+msgid "Centre"
+msgstr "Centro"
+
+#: ../src/richtext/richtextindentspage.cpp:162
+#: ../src/richtext/richtextindentspage.cpp:164
+#: ../src/richtext/richtextliststylepage.cpp:351
+#: ../src/richtext/richtextliststylepage.cpp:353
+msgid "Centre text."
+msgstr "Centralizar texto."
+
+#: ../src/richtext/richtextsizepage.cpp:287
+msgid "Centred"
+msgstr "Centrado"
+
+#: ../src/richtext/richtextliststylepage.cpp:280
+#: ../src/richtext/richtextbulletspage.cpp:232
+msgid "Ch&oose..."
+msgstr "Es&colher..."
+
+#: ../src/richtext/richtextbuffer.cpp:4041
+msgid "Change List Style"
+msgstr "Mudar o Estilo da Lista"
+
+#: ../src/richtext/richtextbuffer.cpp:3392
+msgid "Change Object Style"
+msgstr "Mudar o Estilo do Objeto"
+
+#: ../src/richtext/richtextbuffer.cpp:3658
+#: ../src/richtext/richtextbuffer.cpp:7749
+msgid "Change Properties"
+msgstr "Mudar Propriedades"
+
+#: ../src/richtext/richtextbuffer.cpp:3209
+msgid "Change Style"
+msgstr "Mudar o Estilo"
+
+#: ../src/common/fileconf.cpp:372
+#, c-format
+msgid "Changes won't be saved to avoid overwriting the existing file \"%s\""
+msgstr ""
+"As mudanças não serão salvas para evitar sobrescrever o arquivo existente "
+"\"%s\""
+
+#: ../src/richtext/richtextstyles.cpp:1059
+msgid "Character styles"
+msgstr "Estilos dos caracteres"
+
+#: ../src/richtext/richtextliststylepage.cpp:224
+#: ../src/richtext/richtextliststylepage.cpp:226
+#: ../src/richtext/richtextbulletspage.cpp:174
+#: ../src/richtext/richtextbulletspage.cpp:176
+msgid "Check to add a period after the bullet."
+msgstr "Marque para adicionar um período após o projétil."
+
+#: ../src/richtext/richtextliststylepage.cpp:238
+#: ../src/richtext/richtextliststylepage.cpp:240
+#: ../src/richtext/richtextbulletspage.cpp:188
+#: ../src/richtext/richtextbulletspage.cpp:190
+msgid "Check to add a right parenthesis."
+msgstr "Marque para adicionar um parêntese direito."
+
+#: ../src/richtext/richtextliststylepage.cpp:231
+#: ../src/richtext/richtextliststylepage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:181
+#: ../src/richtext/richtextbulletspage.cpp:183
+msgid "Check to enclose the bullet in parentheses."
+msgstr "Marque para cercar o projétil com parênteses."
+
+#: ../src/osx/carbon/fontdlg.cpp:542 ../src/osx/carbon/fontdlg.cpp:544
+msgid "Check to make the font bold."
+msgstr "Marque para fazer a fonte ficar em negrito."
+
+#: ../src/osx/carbon/fontdlg.cpp:549 ../src/osx/carbon/fontdlg.cpp:551
+msgid "Check to make the font italic."
+msgstr "Marque para fazer a fonte ficar em itálico."
+
+#: ../src/osx/carbon/fontdlg.cpp:558 ../src/osx/carbon/fontdlg.cpp:560
+msgid "Check to make the font underlined."
+msgstr "Marque para fazer a fonte ficar sublinhada."
+
+#: ../src/richtext/richtextstyledlg.cpp:289
+#: ../src/richtext/richtextstyledlg.cpp:291
+msgid "Check to restart numbering."
+msgstr "Marque para reiniciar a numeração."
+
+#: ../src/richtext/richtextfontpage.cpp:286
+#: ../src/richtext/richtextfontpage.cpp:288
+msgid "Check to show a line through the text."
+msgstr "Marque para mostrar uma linha através do texto."
+
+#: ../src/richtext/richtextfontpage.cpp:293
+#: ../src/richtext/richtextfontpage.cpp:295
+msgid "Check to show the text in capitals."
+msgstr "Marque para mostrar o texto em maiúsculas."
+
+#: ../src/richtext/richtextfontpage.cpp:300
+#: ../src/richtext/richtextfontpage.cpp:302
+msgid "Check to show the text in small capitals."
+msgstr "Marque para mostrar o texto em minúsculas."
+
+#: ../src/richtext/richtextfontpage.cpp:314
+#: ../src/richtext/richtextfontpage.cpp:316
+msgid "Check to show the text in subscript."
+msgstr "Marque para mostrar o texto no subscript."
+
+#: ../src/richtext/richtextfontpage.cpp:307
+#: ../src/richtext/richtextfontpage.cpp:309
+msgid "Check to show the text in superscript."
+msgstr "Marque para mostrar o texto em superscript."
+
+#: ../src/msw/dialup.cpp:784
+msgid "Choose ISP to dial"
+msgstr "Escolha um ISP para discar"
+
+#: ../src/propgrid/props.cpp:1643
+msgid "Choose a directory:"
+msgstr "Escolher um diretório:"
+
+#: ../src/propgrid/props.cpp:1702
+msgid "Choose a file"
+msgstr "Escolha um arquivo"
+
+#: ../src/generic/colrdlgg.cpp:144 ../src/gtk/colordlg.cpp:63
+msgid "Choose colour"
+msgstr "Escolha uma cor"
+
+#: ../src/generic/fontpickerg.cpp:50 ../src/gtk/fontdlg.cpp:75
+#: ../src/gtk1/fontdlg.cpp:125
+msgid "Choose font"
+msgstr "Escolha uma fonte"
+
+#: ../src/common/module.cpp:74
+#, c-format
+msgid "Circular dependency involving module \"%s\" detected."
+msgstr "Dependência circular envolvendo o módulo \"%s\" detectada."
+
+#: ../src/aui/tabmdi.cpp:108 ../src/generic/mdig.cpp:97
+msgid "Cl&ose"
+msgstr "&Fechar"
+
+#: ../src/msw/ole/automtn.cpp:673
+msgid "Class not registered."
+msgstr "Classe não registrada."
+
+#: ../src/common/stockitem.cpp:147
+msgid "Clear"
+msgstr "Limpar"
+
+#: ../src/generic/logg.cpp:520
+msgid "Clear the log contents"
+msgstr "Limpar os conteúdos do log"
+
+#: ../src/richtext/richtextstyledlg.cpp:252
+#: ../src/richtext/richtextstyledlg.cpp:254
+msgid "Click to apply the selected style."
+msgstr "Clique para aplicar o estilo selecionado."
+
+#: ../src/richtext/richtextliststylepage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:283
+#: ../src/richtext/richtextbulletspage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:235
+msgid "Click to browse for a symbol."
+msgstr "Clique para procurar por um símbolo."
+
+#: ../src/osx/carbon/fontdlg.cpp:589 ../src/osx/carbon/fontdlg.cpp:591
+msgid "Click to cancel changes to the font."
+msgstr "Clique para cancelar as mudanças na fonte."
+
+#: ../src/generic/fontdlgg.cpp:472 ../src/generic/fontdlgg.cpp:491
+msgid "Click to cancel the font selection."
+msgstr "Clique para cancelar a seleção da fonte."
+
+#: ../src/osx/carbon/fontdlg.cpp:570 ../src/osx/carbon/fontdlg.cpp:572
+msgid "Click to change the font colour."
+msgstr "Clique para mudar a cor da fonte."
+
+#: ../src/richtext/richtextfontpage.cpp:276
+#: ../src/richtext/richtextfontpage.cpp:278
+msgid "Click to change the text background colour."
+msgstr "Clique pra mudar a cor de fundo do texto."
+
+#: ../src/richtext/richtextfontpage.cpp:263
+#: ../src/richtext/richtextfontpage.cpp:265
+msgid "Click to change the text colour."
+msgstr "Clique para mudar a cor do texto."
+
+#: ../src/richtext/richtextliststylepage.cpp:195
+#: ../src/richtext/richtextliststylepage.cpp:197
+msgid "Click to choose the font for this level."
+msgstr "Clique para escolher a fonte para este nível."
+
+#: ../src/richtext/richtextstyledlg.cpp:279
+#: ../src/richtext/richtextstyledlg.cpp:281
+msgid "Click to close this window."
+msgstr "Clique para fechar esta janela"
+
+#: ../src/osx/carbon/fontdlg.cpp:596 ../src/osx/carbon/fontdlg.cpp:598
+msgid "Click to confirm changes to the font."
+msgstr "Clique para confirmar as mudanças na fonte."
+
+#: ../src/generic/fontdlgg.cpp:477 ../src/generic/fontdlgg.cpp:479
+#: ../src/generic/fontdlgg.cpp:484 ../src/generic/fontdlgg.cpp:486
+msgid "Click to confirm the font selection."
+msgstr "Clique para confirmar a seleção da fonte."
+
+#: ../src/richtext/richtextstyledlg.cpp:244
+#: ../src/richtext/richtextstyledlg.cpp:246
+msgid "Click to create a new box style."
+msgstr "Clique para criar um novo estilo de caixas."
+
+#: ../src/richtext/richtextstyledlg.cpp:226
+#: ../src/richtext/richtextstyledlg.cpp:228
+msgid "Click to create a new character style."
+msgstr "Clique para criar um novo estilo de caracteres."
+
+#: ../src/richtext/richtextstyledlg.cpp:238
+#: ../src/richtext/richtextstyledlg.cpp:240
+msgid "Click to create a new list style."
+msgstr "Clique para criar um novo estilo de listas."
+
+#: ../src/richtext/richtextstyledlg.cpp:232
+#: ../src/richtext/richtextstyledlg.cpp:234
+msgid "Click to create a new paragraph style."
+msgstr "Clique para criar um novo estilo de parágrafo."
+
+#: ../src/richtext/richtexttabspage.cpp:137
+#: ../src/richtext/richtexttabspage.cpp:139
+msgid "Click to create a new tab position."
+msgstr "Clique para criar uma nova posição para a aba."
+
+#: ../src/richtext/richtexttabspage.cpp:149
+#: ../src/richtext/richtexttabspage.cpp:151
+msgid "Click to delete all tab positions."
+msgstr "Clique para apagar todas as posições da aba."
+
+#: ../src/richtext/richtextstyledlg.cpp:270
+#: ../src/richtext/richtextstyledlg.cpp:272
+msgid "Click to delete the selected style."
+msgstr "Clique para apagar o estilo selecionado."
+
+#: ../src/richtext/richtexttabspage.cpp:143
+#: ../src/richtext/richtexttabspage.cpp:145
+msgid "Click to delete the selected tab position."
+msgstr "Clique para apagar a posição da aba selecionada."
+
+#: ../src/richtext/richtextstyledlg.cpp:264
+#: ../src/richtext/richtextstyledlg.cpp:266
+msgid "Click to edit the selected style."
+msgstr "Clique para editar o estilo selecionado."
+
+#: ../src/richtext/richtextstyledlg.cpp:258
+#: ../src/richtext/richtextstyledlg.cpp:260
+msgid "Click to rename the selected style."
+msgstr "Clique para renomear o estilo selecionado."
+
+#: ../src/generic/dbgrptg.cpp:97 ../src/generic/progdlgg.cpp:804
+#: ../src/generic/progdlgg.cpp:809 ../src/richtext/richtextstyledlg.cpp:277
+#: ../src/richtext/richtextsymboldlg.cpp:476 ../src/common/stockitem.cpp:148
+#: ../src/msw/progdlg.cpp:170 ../src/msw/progdlg.cpp:679
+#: ../src/html/helpdlg.cpp:90
+msgid "Close"
+msgstr "Fechar"
+
+#: ../src/aui/tabmdi.cpp:109 ../src/generic/mdig.cpp:98
+msgid "Close All"
+msgstr "Fechar Tudo"
+
+#: ../src/common/stockitem.cpp:266
+msgid "Close current document"
+msgstr "Fecha o documento atual"
+
+#: ../src/generic/logg.cpp:522
+msgid "Close this window"
+msgstr "Fechar esta janela"
+
+#: ../src/common/stockitem.cpp:193
+msgid "Color"
+msgstr "Côr"
+
+#: ../src/richtext/richtextformatdlg.cpp:725
+msgid "Colour"
+msgstr "Cor"
+
+#: ../src/msw/colordlg.cpp:156
+#, c-format
+msgid "Colour selection dialog failed with error %0lx."
+msgstr "O diálogo da seleção de cores falhou com o erro %0lx."
+
+#: ../src/osx/carbon/fontdlg.cpp:566
+msgid "Colour:"
+msgstr "Cor:"
+
+#: ../src/osx/carbon/dataview.cpp:900
+msgid "Column could not be added."
+msgstr "A coluna não pôde ser adicionada."
+
+#: ../src/osx/carbon/dataview.cpp:899
+msgid "Column description could not be initialized."
+msgstr "A descrição da coluna não pôde ser inicializada."
+
+#: ../src/osx/carbon/dataview.cpp:1538 ../src/osx/carbon/dataview.cpp:1559
+msgid "Column index not found."
+msgstr "Índice da coluna não achado."
+
+#: ../src/osx/carbon/dataview.cpp:1614
+msgid "Column width could not be determined"
+msgstr "A largura da coluna não pôde ser determinada"
+
+#: ../src/osx/carbon/dataview.cpp:901
+msgid "Column width could not be set."
+msgstr "A largura da coluna não pôde ser definida."
+
+#: ../src/common/init.cpp:188
+#, c-format
+msgid ""
+"Command line argument %d couldn't be converted to Unicode and will be "
+"ignored."
+msgstr ""
+"O argumento da linha de comando %d não pôde ser convertido para o Unicode e "
+"será ignorado."
+
+#: ../src/msw/fontdlg.cpp:119
+#, c-format
+msgid "Common dialog failed with error code %0lx."
+msgstr "O diálogo comum falhou com o código do erro %0lx."
+
+#: ../src/gtk/window.cpp:4306
+msgid ""
+"Compositing not supported by this system, please enable it in your Window "
+"Manager."
+msgstr ""
+"Composição não suportado por este sistema, por favor ative-a no seu "
+"Gerenciador de Janelas."
+
+#: ../src/html/helpwnd.cpp:1554
+msgid "Compressed HTML Help file (*.chm)|*.chm|"
+msgstr "Arquivo de ajuda HTML Compactado (*.chm)|*.chm|"
+
+#: ../src/generic/dirctrlg.cpp:544
+msgid "Computer"
+msgstr "Computador"
+
+#: ../src/common/fileconf.cpp:965
+#, c-format
+msgid "Config entry name cannot start with '%c'."
+msgstr "O nome da entrada da config não pode iniciar com '%c'."
+
+#: ../src/gtk/filedlg.cpp:59
+msgid "Confirm"
+msgstr "Confirmar"
+
+#: ../src/msw/mimetype.cpp:739
+msgid "Confirm registry update"
+msgstr "Confirmar a atualização do registro"
+
+#: ../src/html/htmlwin.cpp:544
+msgid "Connecting..."
+msgstr "Conectando..."
+
+#: ../src/html/helpwnd.cpp:482
+msgid "Contents"
+msgstr "Conteúdos"
+
+#: ../src/common/strconv.cpp:2261
+#, c-format
+msgid "Conversion to charset '%s' doesn't work."
+msgstr "A conversão para o conjunto de caracteres '%s' não funciona."
+
+#: ../src/common/stockitem.cpp:149
+msgid "Convert"
+msgstr "Converter"
+
+#: ../src/html/htmlwin.cpp:1057
+#, c-format
+msgid "Copied to clipboard:\"%s\""
+msgstr "Copiado para a área de transferência:\"%s\""
+
+#: ../src/generic/prntdlgg.cpp:247
+msgid "Copies:"
+msgstr "Cópias:"
+
+#: ../src/common/stockitem.cpp:150 ../src/stc/stc_i18n.cpp:18
+msgid "Copy"
+msgstr "Copiar"
+
+#: ../src/common/stockitem.cpp:258
+msgid "Copy selection"
+msgstr "Copiar a seleção"
+
+#: ../src/html/chm.cpp:718
+#, c-format
+msgid "Could not create temporary file '%s'"
+msgstr "Não pôde criar o arquivo temporário '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:1285 ../src/osx/carbon/dataview.cpp:1672
+msgid "Could not determine column index."
+msgstr "Não pôde determinar o índice da coluna."
+
+#: ../src/osx/carbon/dataview.cpp:876
+msgid "Could not determine column's position"
+msgstr "Não pôde determinar a posição da coluna"
+
+#: ../src/osx/carbon/dataview.cpp:843
+msgid "Could not determine number of columns."
+msgstr "Não pôde determinar o número de colunas."
+
+#: ../src/osx/carbon/dataview.cpp:975
+msgid "Could not determine number of items"
+msgstr "Não pôde determinar o número de itens"
+
+#: ../src/html/chm.cpp:273
+#, c-format
+msgid "Could not extract %s into %s: %s"
+msgstr "Não pôde extrair %s para %s: %s"
+
+#: ../src/generic/tabg.cpp:1048
+msgid "Could not find tab for id"
+msgstr "Não pôde achar a aba pela id"
+
+#: ../src/osx/carbon/dataview.cpp:2556 ../src/osx/carbon/dataview.cpp:2591
+#: ../src/osx/carbon/dataview.cpp:2615 ../src/osx/carbon/dataview.cpp:2636
+#: ../src/osx/carbon/dataview.cpp:2773
+msgid "Could not get header description."
+msgstr "Não pôde obter a descrição do cabeçalho."
+
+#: ../src/osx/carbon/dataview.cpp:1169 ../src/osx/carbon/dataview.cpp:1195
+msgid "Could not get items."
+msgstr "Não pôde obter os itens."
+
+#: ../src/osx/carbon/dataview.cpp:2659 ../src/osx/carbon/dataview.cpp:2724
+msgid "Could not get property flags."
+msgstr "Não pôde obter as bandeiras de propriedade."
+
+#: ../src/osx/carbon/dataview.cpp:726
+msgid "Could not get selected items."
+msgstr "Não pôde obter os itens selecionados."
+
+#: ../src/html/chm.cpp:444
+#, c-format
+msgid "Could not locate file '%s'."
+msgstr "Não pôde localizar o arquivo '%s'."
+
+#: ../src/osx/carbon/dataview.cpp:845
+msgid "Could not remove column."
+msgstr "Não pôde remover a coluna."
+
+#: ../src/osx/carbon/dataview.cpp:642
+msgid "Could not retrieve number of items"
+msgstr "Não pôde recuperar o número de itens"
+
+#: ../src/osx/carbon/dataview.cpp:2572
+msgid "Could not set alignment."
+msgstr "Não pôde definir o alinhamento."
+
+#: ../src/osx/carbon/dataview.cpp:2803
+msgid "Could not set column width."
+msgstr "Não pôde definir a largura da coluna."
+
+#: ../src/common/filefn.cpp:1569
+msgid "Could not set current working directory"
+msgstr "Não pôde definir o diretório de trabalho atual"
+
+#: ../src/osx/carbon/dataview.cpp:2775
+msgid "Could not set header description."
+msgstr "Não pôde definir a descrição do cabeçalho."
+
+#: ../src/osx/carbon/dataview.cpp:2596
+msgid "Could not set icon."
+msgstr "Não pôde definir o ícone."
+
+#: ../src/osx/carbon/dataview.cpp:2617
+msgid "Could not set maximum width."
+msgstr "Não pôde definir a largura máxima."
+
+#: ../src/osx/carbon/dataview.cpp:2638
+msgid "Could not set minimum width."
+msgstr "Não pôde definir a largura mínima."
+
+#: ../src/osx/carbon/dataview.cpp:2664 ../src/osx/carbon/dataview.cpp:2729
+msgid "Could not set property flags."
+msgstr "Não pode definir as bandeiras de propriedade."
+
+#: ../src/common/prntbase.cpp:1985
+msgid "Could not start document preview."
+msgstr "Não pôde iniciar a pré-visualização do documento."
+
+#: ../src/generic/printps.cpp:178 ../src/msw/printwin.cpp:210
+#: ../src/gtk/print.cpp:1077
+msgid "Could not start printing."
+msgstr "Não pôde iniciar a impressão."
+
+#: ../src/common/wincmn.cpp:2131
+msgid "Could not transfer data to window"
+msgstr "Não pôde transferir os dados para a janela"
+
+#: ../src/os2/thread.cpp:160
+msgid "Couldn't acquire a mutex lock"
+msgstr "Não pôde adquirir uma tranca mutex"
+
+#: ../src/msw/imaglist.cpp:166 ../src/msw/imaglist.cpp:197
+#: ../src/msw/imaglist.cpp:209 ../src/msw/dragimag.cpp:193
+#: ../src/msw/dragimag.cpp:232
+msgid "Couldn't add an image to the image list."
+msgstr "Não pôde adicionar uma imagem a lista de imagens."
+
+#: ../src/msw/timer.cpp:134 ../src/os2/timer.cpp:113
+msgid "Couldn't create a timer"
+msgstr "Não pôde criar um timer"
+
+#: ../src/osx/carbon/overlay.cpp:122
+msgid "Couldn't create the overlay window"
+msgstr "Não pôde crirar a janela overlay"
+
+#: ../src/common/translation.cpp:2015
+msgid "Couldn't enumerate translations"
+msgstr "Não pôde enumerar as traduções"
+
+#: ../src/common/dynlib.cpp:152
+#, c-format
+msgid "Couldn't find symbol '%s' in a dynamic library"
+msgstr "Não pôde achar o símbolo '%s' em uma biblioteca dinâmica"
+
+#: ../src/gtk/print.cpp:2014
+msgid "Couldn't get hatch style from wxBrush."
+msgstr "Não pôde obter o estilo hatch do wxBrush."
+
+#: ../src/msw/thread.cpp:950
+msgid "Couldn't get the current thread pointer"
+msgstr "Não pôde obter o ponteiro atual do thread"
+
+#: ../src/osx/carbon/overlay.cpp:129
+msgid "Couldn't init the context on the overlay window"
+msgstr "Não pôde inicializar o contexto na janela overlay"
+
+#: ../src/common/imaggif.cpp:263
+msgid "Couldn't initialize GIF hash table."
+msgstr "Não pôde inicializar a tabela de hash do GIF."
+
+#: ../src/common/imagpng.cpp:657
+msgid "Couldn't load a PNG image - file is corrupted or not enough memory."
+msgstr ""
+"Não pôde carregar uma imagem PNG - o arquivo está corrompido ou memória "
+"insuficiente."
+
+#: ../src/unix/sound.cpp:470
+#, c-format
+msgid "Couldn't load sound data from '%s'."
+msgstr "Não pôde carregar os dados do som de '%s'."
+
+#: ../src/msw/dirdlg.cpp:441
+msgid "Couldn't obtain folder name"
+msgstr "Não pôde obter o nome da pasta"
+
+#: ../src/unix/sound_sdl.cpp:229
+#, c-format
+msgid "Couldn't open audio: %s"
+msgstr "Não pôde abrir o áudio: %s"
+
+#: ../src/msw/ole/dataobj.cpp:350
+#, c-format
+msgid "Couldn't register clipboard format '%s'."
+msgstr "Não pôde registrar o formato da área de transferência '%s'."
+
+#: ../src/os2/thread.cpp:177
+msgid "Couldn't release a mutex"
+msgstr "Não pôde liberar um mutex"
+
+#: ../src/msw/listctrl.cpp:756
+#, c-format
+msgid "Couldn't retrieve information about list control item %d."
+msgstr ""
+"Não pôde recuperar a informação sobre o item de controle das listas %d."
+
+#: ../src/common/imagpng.cpp:746 ../src/common/imagpng.cpp:757
+#: ../src/common/imagpng.cpp:767
+msgid "Couldn't save PNG image."
+msgstr "Não pôde salvar a imagem PNG."
+
+#: ../src/msw/thread.cpp:715
+msgid "Couldn't terminate thread"
+msgstr "Não pôde concluir o thread"
+
+#: ../src/common/xtistrm.cpp:170
+#, c-format
+msgid "Create Parameter %s not found in declared RTTI Parameters"
+msgstr "Criar Parâmetro %s não achado nos Parâmetros RTTI declarados"
+
+#: ../src/generic/dirdlgg.cpp:317
+msgid "Create directory"
+msgstr "Criar diretório"
+
+#: ../src/generic/filedlgg.cpp:228 ../src/generic/dirdlgg.cpp:131
+msgid "Create new directory"
+msgstr "Criar novo diretório"
+
+#: ../src/common/accelcmn.cpp:322
+msgid "Ctrl+"
+msgstr "Ctrl+"
+
+#: ../src/richtext/richtextctrl.cpp:325 ../src/osx/textctrl_osx.cpp:582
+#: ../src/common/stockitem.cpp:151 ../src/msw/textctrl.cpp:2283
+msgid "Cu&t"
+msgstr "Co&rtar"
+
+#: ../src/generic/filectrlg.cpp:956
+msgid "Current directory:"
+msgstr "Diretório atual:"
+
+#: ../src/gtk/print.cpp:759
+msgid "Custom size"
+msgstr "Tamanho personalizado"
+
+#: ../src/common/headerctrlcmn.cpp:60
+msgid "Customize Columns"
+msgstr "Personalizar Colunas"
+
+#: ../src/common/stockitem.cpp:151 ../src/stc/stc_i18n.cpp:17
+msgid "Cut"
+msgstr "Cortar"
+
+#: ../src/common/stockitem.cpp:259
+msgid "Cut selection"
+msgstr "Cortar a seleção"
+
+#: ../src/common/fmapbase.cpp:152
+msgid "Cyrillic (ISO-8859-5)"
+msgstr "Cirílico (ISO-8859-5)"
+
+#: ../src/common/paper.cpp:100
+msgid "D sheet, 22 x 34 in"
+msgstr "Folha D, 22 x 34 em"
+
+#: ../src/msw/dde.cpp:708
+msgid "DDE poke request failed"
+msgstr "Pedido para cutucar do DDE falhou"
+
+#: ../src/common/accelcmn.cpp:79
+msgid "DECIMAL"
+msgstr "DECIMAL"
+
+#: ../src/common/accelcmn.cpp:47
+msgid "DEL"
+msgstr "DEL"
+
+#: ../src/common/accelcmn.cpp:48
+msgid "DELETE"
+msgstr "APAGAR"
+
+#: ../src/common/imagbmp.cpp:1092
+msgid "DIB Header: Encoding doesn't match bitdepth."
+msgstr "Cabeçalho DIB: A codificação não combina com a profundidade dos bits."
+
+#: ../src/common/imagbmp.cpp:1040
+msgid "DIB Header: Image height > 32767 pixels for file."
+msgstr "Cabeçalho DIB: Altura da imagem > 32767 pixels no arquivo."
+
+#: ../src/common/imagbmp.cpp:1032
+msgid "DIB Header: Image width > 32767 pixels for file."
+msgstr "Cabeçalho DIB: Largura da imagem > 32767 pixels no arquivo."
+
+#: ../src/common/imagbmp.cpp:1060
+msgid "DIB Header: Unknown bitdepth in file."
+msgstr "Cabeçalho DIB: Profundidade dos de bits desconhecida no arquivo."
+
+#: ../src/common/imagbmp.cpp:1074
+msgid "DIB Header: Unknown encoding in file."
+msgstr "Cabeçalho DIB: Codificação desconhecida no arquivo."
+
+#: ../src/common/accelcmn.cpp:80
+msgid "DIVIDE"
+msgstr "DIVIDIR"
+
+#: ../src/common/paper.cpp:122
+msgid "DL Envelope, 110 x 220 mm"
+msgstr "Envelope DL, 110 x 220 mm"
+
+#: ../src/common/accelcmn.cpp:59
+msgid "DOWN"
+msgstr "PARA_BAIXO"
+
+#: ../src/richtext/richtextborderspage.cpp:545
+msgid "Dashed"
+msgstr "Tracejado"
+
+#: ../src/osx/carbon/dataview.cpp:1921
+msgid "Data object has invalid data format"
+msgstr "Objeto dos dados tem o formato dos dados inválido"
+
+#: ../src/osx/carbon/dataview.cpp:2491
+msgid "Date renderer cannot render value; value type: "
+msgstr "O renderizador da data não pode renderizar o valor; tipo de valor:"
+
+#: ../src/generic/dbgrptg.cpp:300
+#, c-format
+msgid "Debug report \"%s\""
+msgstr "Relatório do debug \"%s\""
+
+#: ../src/common/debugrpt.cpp:210
+msgid "Debug report couldn't be created."
+msgstr "O relatório de debug não pôde ser criado."
+
+#: ../src/common/debugrpt.cpp:558
+msgid "Debug report generation has failed."
+msgstr "A geração do relatório de debug falhou."
+
+#: ../src/generic/fontdlgg.cpp:323
+msgid "Decorative"
+msgstr "Decorativo"
+
+#: ../src/common/fmapbase.cpp:796
+msgid "Default encoding"
+msgstr "Codificação padrão"
+
+#: ../src/dfb/fontmgr.cpp:180
+msgid "Default font"
+msgstr "Fonte padrão"
+
+#: ../src/generic/prntdlgg.cpp:510
+msgid "Default printer"
+msgstr "Impressora padrão"
+
+#: ../src/richtext/richtextbuffer.cpp:7841 ../src/common/stockitem.cpp:152
+#: ../src/stc/stc_i18n.cpp:20
+msgid "Delete"
+msgstr "Apagar"
+
+#: ../src/richtext/richtexttabspage.cpp:148
+msgid "Delete A&ll"
+msgstr "Apagar T&udo"
+
+#: ../src/richtext/richtextbuffer.cpp:10637
+msgid "Delete Column"
+msgstr "Apagar a Coluna"
+
+#: ../src/richtext/richtextbuffer.cpp:10587
+msgid "Delete Row"
+msgstr "Apagar a Fileira"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+msgid "Delete Style"
+msgstr "Apagar o Estilo"
+
+#: ../src/richtext/richtextctrl.cpp:1231 ../src/richtext/richtextctrl.cpp:1452
+msgid "Delete Text"
+msgstr "Apagar o Texto"
+
+#: ../src/generic/editlbox.cpp:274
+msgid "Delete item"
+msgstr "Apagar o item"
+
+#: ../src/common/stockitem.cpp:260
+msgid "Delete selection"
+msgstr "Apagar a seleção"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+#, c-format
+msgid "Delete style %s?"
+msgstr "Apagar o estilo %s?"
+
+#: ../src/unix/snglinst.cpp:295
+#, c-format
+msgid "Deleted stale lock file '%s'."
+msgstr "Arquivo de stale lock apagado '%s'."
+
+#: ../src/common/module.cpp:124
+#, c-format
+msgid "Dependency \"%s\" of module \"%s\" doesn't exist."
+msgstr "A dependência \"%s\" do módulo \"%s\" não existe."
+
+#: ../src/common/stockitem.cpp:196
+msgid "Descending"
+msgstr "Descendente"
+
+#: ../src/generic/dirctrlg.cpp:626
+msgid "Desktop"
+msgstr "Área de trabalho"
+
+#: ../src/generic/aboutdlgg.cpp:70
+msgid "Developed by "
+msgstr "Desenvolvido por "
+
+#: ../src/generic/aboutdlgg.cpp:176
+msgid "Developers"
+msgstr "Desenvolvedores"
+
+#: ../src/msw/dialup.cpp:393
+msgid ""
+"Dial up functions are unavailable because the remote access service (RAS) is "
+"not installed on this machine. Please install it."
+msgstr ""
+"As funções de discagem estão indisponíveis porque o serviço de acesso remoto "
+"(RAS) não foi instalado nesta máquina. Por favor instale-o."
+
+#: ../src/generic/tipdlg.cpp:230
+msgid "Did you know..."
+msgstr "Você sabia..."
+
+#: ../src/dfb/wrapdfb.cpp:63
+#, c-format
+msgid "DirectFB error %d occurred."
+msgstr "Ocorreu um erro DirectFB %d."
+
+#: ../src/motif/filedlg.cpp:219
+msgid "Directories"
+msgstr "Diretórios"
+
+#: ../src/common/filefn.cpp:1251
+#, c-format
+msgid "Directory '%s' couldn't be created"
+msgstr "O diretório '%s' não pôde ser criado"
+
+#: ../src/common/filefn.cpp:1271
+#, c-format
+msgid "Directory '%s' couldn't be deleted"
+msgstr "O diretório '%s' não pôde ser apagado"
+
+#: ../src/generic/dirdlgg.cpp:233
+msgid "Directory does not exist"
+msgstr "O diretório não existe"
+
+#: ../src/generic/filectrlg.cpp:1412
+msgid "Directory doesn't exist."
+msgstr "O diretório não existe."
+
+#: ../src/common/docview.cpp:455
+msgid "Discard changes and reload the last saved version?"
+msgstr "Descartar mudanças e recarregar a última versão salva?"
+
+#: ../src/html/helpwnd.cpp:512
+msgid ""
+"Display all index items that contain given substring. Search is case "
+"insensitive."
+msgstr ""
+"Exibe todos os itens do índice que contém a substring dada. A busca é caso "
+"sensitivo."
+
+#: ../src/html/helpwnd.cpp:692
+msgid "Display options dialog"
+msgstr "Exibir o diálogo das opções"
+
+#: ../src/html/helpwnd.cpp:326
+msgid "Displays help as you browse the books on the left."
+msgstr "Exibe a ajuda enquanto você navega pelos livros a esquerda."
+
+#: ../src/msw/mimetype.cpp:732
+msgid ""
+"Do you want to overwrite the command used to %s files with extension \"%s"
+"\" ?\n"
+"Current value is \n"
+"%s, \n"
+"New value is \n"
+"%s %1"
+msgstr ""
+"Você quer sobrescrever o comando usado para %s arquivos com extensão \"%s"
+"\" ?\n"
+"O valor atual é \n"
+"%s, \n"
+"O novo valor é \n"
+"%s %1"
+
+#: ../src/common/docview.cpp:531
+#, c-format
+msgid "Do you want to save changes to %s?"
+msgstr "Você quer salvar as mudanças em %s?"
+
+#: ../src/common/prntbase.cpp:525
+msgid "Document:"
+msgstr "Documento:"
+
+#: ../src/generic/aboutdlgg.cpp:73
+msgid "Documentation by "
+msgstr "Documentação de"
+
+#: ../src/generic/aboutdlgg.cpp:180
+msgid "Documentation writers"
+msgstr "Escritores da documentação"
+
+#: ../src/common/sizer.cpp:2680
+msgid "Don't Save"
+msgstr "Não Salvar"
+
+#: ../src/msw/frame.cpp:122 ../src/html/htmlwin.cpp:611
+msgid "Done"
+msgstr "Feito"
+
+#: ../src/generic/progdlgg.cpp:481 ../src/msw/progdlg.cpp:407
+msgid "Done."
+msgstr "Feito."
+
+#: ../src/richtext/richtextborderspage.cpp:544
+msgid "Dotted"
+msgstr "Pontilhado"
+
+#: ../src/richtext/richtextborderspage.cpp:546
+msgid "Double"
+msgstr "Duplo"
+
+#: ../src/common/paper.cpp:177
+msgid "Double Japanese Postcard Rotated 148 x 200 mm"
+msgstr "Cartão Postal Japonês Duplo Rotacionado 148 x 200 mm"
+
+#: ../src/common/xtixml.cpp:273
+#, c-format
+msgid "Doubly used id : %d"
+msgstr "ID usada duas vezes : %d"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:153
+msgid "Down"
+msgstr "Para baixo"
+
+#: ../src/richtext/richtextctrl.cpp:814
+msgid "Drag"
+msgstr "Arrastar"
+
+#: ../src/common/paper.cpp:101
+msgid "E sheet, 34 x 44 in"
+msgstr "Folha E 34 x 44"
+
+#: ../src/common/accelcmn.cpp:61
+msgid "END"
+msgstr "END"
+
+#: ../src/common/accelcmn.cpp:52
+msgid "ENTER"
+msgstr "ENTER"
+
+#: ../src/unix/fswatcher_inotify.cpp:535
+msgid "EOF while reading from inotify descriptor"
+msgstr "EOF enquanto lia do descritor inotify"
+
+#: ../src/common/accelcmn.cpp:64
+msgid "ESC"
+msgstr "ESC"
+
+#: ../src/common/accelcmn.cpp:65
+msgid "ESCAPE"
+msgstr "ESCAPE"
+
+#: ../src/common/accelcmn.cpp:73
+msgid "EXECUTE"
+msgstr "EXECUTAR"
+
+#: ../src/common/stockitem.cpp:154
+msgid "Edit"
+msgstr "Editar"
+
+#: ../src/generic/editlbox.cpp:272
+msgid "Edit item"
+msgstr "Editar item"
+
+#: ../include/wx/generic/progdlgg.h:84
+msgid "Elapsed time:"
+msgstr "Tempo decorrido:"
+
+#: ../src/richtext/richtextsizepage.cpp:353
+#: ../src/richtext/richtextsizepage.cpp:355
+#: ../src/richtext/richtextsizepage.cpp:465
+#: ../src/richtext/richtextsizepage.cpp:467
+msgid "Enable the height value."
+msgstr "Ativar o valor altura."
+
+#: ../src/richtext/richtextsizepage.cpp:438
+#: ../src/richtext/richtextsizepage.cpp:440
+msgid "Enable the maximum width value."
+msgstr "Ativar o valor máximo da largura."
+
+#: ../src/richtext/richtextsizepage.cpp:411
+#: ../src/richtext/richtextsizepage.cpp:413
+msgid "Enable the minimum height value."
+msgstr "Ativar o valor mínimo da altura."
+
+#: ../src/richtext/richtextsizepage.cpp:384
+#: ../src/richtext/richtextsizepage.cpp:386
+msgid "Enable the minimum width value."
+msgstr "Ativar o valor mínimo da largura."
+
+#: ../src/richtext/richtextsizepage.cpp:319
+#: ../src/richtext/richtextsizepage.cpp:321
+msgid "Enable the width value."
+msgstr "Ativar o valor largura"
+
+#: ../src/richtext/richtextsizepage.cpp:280
+#: ../src/richtext/richtextsizepage.cpp:282
+msgid "Enable vertical alignment."
+msgstr "Ativar alinhamento vertical."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:133
+#: ../src/richtext/richtextbackgroundpage.cpp:135
+msgid "Enables a background colour."
+msgstr "Ativar uma côr de fundo."
+
+#: ../src/richtext/richtextstyledlg.cpp:931
+msgid "Enter a box style name"
+msgstr "Insira um nome do estilo da caixa"
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+msgid "Enter a character style name"
+msgstr "Insira um nome de estilo de caracteres:"
+
+#: ../src/richtext/richtextstyledlg.cpp:817
+msgid "Enter a list style name"
+msgstr "Insira um nome de estilo de listas:"
+
+#: ../src/richtext/richtextstyledlg.cpp:890
+msgid "Enter a new style name"
+msgstr "Insira um novo nome de estilo:"
+
+#: ../src/richtext/richtextstyledlg.cpp:651
+msgid "Enter a paragraph style name"
+msgstr "Insira um nome de estilo do parágrafo:"
+
+#: ../src/generic/dbgrptg.cpp:174
+#, c-format
+msgid "Enter command to open file \"%s\":"
+msgstr "Insira o comando para abrir o arquivo \"%s\":"
+
+#: ../src/generic/helpext.cpp:463
+msgid "Entries found"
+msgstr "Entradas achadas"
+
+#: ../src/common/paper.cpp:143
+msgid "Envelope Invite 220 x 220 mm"
+msgstr "Envelope de Convite 220 x 220 mm"
+
+#: ../src/common/config.cpp:473
+#, c-format
+msgid ""
+"Environment variables expansion failed: missing '%c' at position %u in '%s'."
+msgstr ""
+"A expansão das variáveis do ambiente falhou: '%c' desaparecido na posição %u "
+"em '%s'."
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/dirctrlg.cpp:688
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:791
+#: ../src/generic/filectrlg.cpp:805 ../src/generic/filectrlg.cpp:821
+#: ../src/generic/filectrlg.cpp:1381 ../src/generic/filectrlg.cpp:1412
+#: ../src/gtk/filedlg.cpp:73 ../src/gtk1/fontdlg.cpp:74
+msgid "Error"
+msgstr "Erro"
+
+#: ../src/unix/epolldispatcher.cpp:103
+msgid "Error closing epoll descriptor"
+msgstr "Erro ao fechar o descritor epoll"
+
+#: ../src/unix/fswatcher_kqueue.cpp:114
+msgid "Error closing kqueue instance"
+msgstr "Erro ao fechar a instância kqueue"
+
+#: ../src/generic/dirdlgg.cpp:251
+msgid "Error creating directory"
+msgstr "Erro ao criar o diretório"
+
+#: ../src/common/imagbmp.cpp:1103
+msgid "Error in reading image DIB."
+msgstr "Erro ao ler a imagem DIB."
+
+#: ../src/propgrid/propgrid.cpp:6563
+#, c-format
+msgid "Error in resource: %s"
+msgstr "Erro no recurso: %s"
+
+#: ../src/common/fileconf.cpp:453
+msgid "Error reading config options."
+msgstr "Erro ao ler as opções da config."
+
+#: ../src/common/fileconf.cpp:1064
+msgid "Error saving user configuration data."
+msgstr "Erro ao salvar os dados de configuração do usuário."
+
+#: ../src/gtk/print.cpp:671
+msgid "Error while printing: "
+msgstr "Erro enquanto imprimia:"
+
+#: ../src/common/log.cpp:223
+msgid "Error: "
+msgstr "Erro: "
+
+#: ../src/common/fmapbase.cpp:150
+msgid "Esperanto (ISO-8859-3)"
+msgstr "Esperanto (ISO-8859-3)"
+
+#: ../include/wx/generic/progdlgg.h:85
+msgid "Estimated time:"
+msgstr "Tempo estimado:"
+
+#: ../src/unix/fswatcher_inotify.cpp:639
+msgid "Event queue overflowed"
+msgstr "Fila do evento sobrecarregada"
+
+#: ../src/generic/dbgrptg.cpp:234
+msgid "Executable files (*.exe)|*.exe|"
+msgstr "Arquivos executáveis (*.exe)|*.exe|"
+
+#: ../src/common/stockitem.cpp:155
+msgid "Execute"
+msgstr "Executar"
+
+#: ../src/msw/utilsexc.cpp:888
+#, c-format
+msgid "Execution of command '%s' failed"
+msgstr "A execução do comando '%s' falhou"
+
+#: ../src/os2/utilsexc.cpp:163
+#, c-format
+msgid "Execution of command '%s' failed with error: %ul"
+msgstr "A execução do comando '%s' falhou com o erro: %ul"
+
+#: ../src/common/paper.cpp:106
+msgid "Executive, 7 1/4 x 10 1/2 in"
+msgstr "Executivo, 7 1/4 x 10 1/2 em"
+
+#: ../src/msw/registry.cpp:1230
+#, c-format
+msgid ""
+"Exporting registry key: file \"%s\" already exists and won't be overwritten."
+msgstr ""
+"Exportando a chave de registro: o arquivo \"%s\" já existe e não será "
+"sobrescrito."
+
+#: ../src/common/fmapbase.cpp:195
+msgid "Extended Unix Codepage for Japanese (EUC-JP)"
+msgstr "Página de Código Unix Extendida para Japon�s (EUC-JP)"
+
+#: ../src/html/chm.cpp:725
+#, c-format
+msgid "Extraction of '%s' into '%s' failed."
+msgstr "A extração de '%s' para '%s' falhou."
+
+#: ../src/common/accelcmn.cpp:238 ../src/common/accelcmn.cpp:333
+msgid "F"
+msgstr "F"
+
+#: ../src/propgrid/advprops.cpp:640
+msgid "Face Name"
+msgstr "Nome da Face"
+
+#: ../src/unix/snglinst.cpp:269
+msgid "Failed to access lock file."
+msgstr "Falhou em acessar o arquivo da tranca."
+
+#: ../src/unix/epolldispatcher.cpp:116
+#, c-format
+msgid "Failed to add descriptor %d to epoll descriptor %d"
+msgstr "Falhou em adicionar o descritor %d ao descritor epoll %d"
+
+#: ../src/msw/dib.cpp:548
+#, c-format
+msgid "Failed to allocate %luKb of memory for bitmap data."
+msgstr "Falhou em distribuir %luKb de memória pros dados do bitmap."
+
+#: ../src/common/glcmn.cpp:87
+msgid "Failed to allocate colour for OpenGL"
+msgstr "Falhou em distribuir a cor para o OpenGL"
+
+#: ../src/unix/displayx11.cpp:288
+msgid "Failed to change video mode"
+msgstr "Falhou em mudar o modo de vídeo"
+
+#: ../src/common/image.cpp:3139
+#, c-format
+msgid "Failed to check format of image file \"%s\"."
+msgstr "Falhou em verificar o formato do arquivo de imagem \"%s\"."
+
+#: ../src/common/debugrpt.cpp:244
+#, c-format
+msgid "Failed to clean up debug report directory \"%s\""
+msgstr "Falhou em limpar o diretório do relatório de debug \"%s\"."
+
+#: ../src/common/filename.cpp:211
+msgid "Failed to close file handle"
+msgstr "Falhou em fechar o manejamento dos arquivos"
+
+#: ../src/unix/snglinst.cpp:334
+#, c-format
+msgid "Failed to close lock file '%s'"
+msgstr "Falhou em fechar o arquivo da tranca '%s'"
+
+#: ../src/msw/clipbrd.cpp:115
+msgid "Failed to close the clipboard."
+msgstr "Falhou em fechar a área de transferência."
+
+#: ../src/x11/utils.cpp:204
+#, c-format
+msgid "Failed to close the display \"%s\""
+msgstr "Falhou em fechar a exibição \"%s\""
+
+#: ../src/msw/dialup.cpp:818
+msgid "Failed to connect: missing username/password."
+msgstr "Falhou em conectar: faltando o nome de usuário/senha."
+
+#: ../src/msw/dialup.cpp:764
+msgid "Failed to connect: no ISP to dial."
+msgstr "Falhou em conectar nenhum ISP para discar."
+
+#: ../src/common/textfile.cpp:200
+#, c-format
+msgid "Failed to convert file \"%s\" to Unicode."
+msgstr "Falhou em converter o arquivo \"%s\" para o Unicode."
+
+#: ../src/generic/logg.cpp:976
+msgid "Failed to copy dialog contents to the clipboard."
+msgstr "Falhou em copiar os conteúdos do diálogo pra área de transferência."
+
+#: ../src/msw/registry.cpp:691
+#, c-format
+msgid "Failed to copy registry value '%s'"
+msgstr "Falhou em copiar o valor de registro '%s'"
+
+#: ../src/msw/registry.cpp:700
+#, c-format
+msgid "Failed to copy the contents of registry key '%s' to '%s'."
+msgstr "Falhou em copiar os conteúdos da chave de registro '%s' para '%s'."
+
+#: ../src/common/filefn.cpp:1058
+#, c-format
+msgid "Failed to copy the file '%s' to '%s'"
+msgstr "Falhou em copiar o arquivo '%s' para '%s'"
+
+#: ../src/msw/registry.cpp:678
+#, c-format
+msgid "Failed to copy the registry subkey '%s' to '%s'."
+msgstr "Falhou em copiar a sub-chave do registro '%s' para '%s'"
+
+#: ../src/msw/dde.cpp:1073
+msgid "Failed to create DDE string"
+msgstr "Falhou em criar a string DDE"
+
+#: ../src/msw/mdi.cpp:590
+msgid "Failed to create MDI parent frame."
+msgstr "Falhou em criar o MDI parent frame."
+
+#: ../src/common/filename.cpp:1080
+msgid "Failed to create a temporary file name"
+msgstr "Falhou em criar um nome de arquivo temporário"
+
+#: ../src/msw/utilsexc.cpp:235
+msgid "Failed to create an anonymous pipe"
+msgstr "Falhou em criar um pipe anônimo"
+
+#: ../src/msw/ole/automtn.cpp:522
+#, c-format
+msgid "Failed to create an instance of \"%s\""
+msgstr "Falhou em criar uma instância de  \"%s\""
+
+#: ../src/msw/dde.cpp:442
+#, c-format
+msgid "Failed to create connection to server '%s' on topic '%s'"
+msgstr "Falhou em criar uma conexão com o servidor '%s' no tópico '%s'"
+
+#: ../src/msw/cursor.cpp:212
+msgid "Failed to create cursor."
+msgstr "Falhou em criar o cursor."
+
+#: ../src/common/debugrpt.cpp:209
+#, c-format
+msgid "Failed to create directory \"%s\""
+msgstr "Falhou em criar diretório \"%s\""
+
+#: ../src/generic/dirdlgg.cpp:249
+#, c-format
+msgid ""
+"Failed to create directory '%s'\n"
+"(Do you have the required permissions?)"
+msgstr ""
+"Falhou em criar o diretório '%s'\n"
+"(Você tem as permissões requeridas?)"
+
+#: ../src/unix/epolldispatcher.cpp:84
+msgid "Failed to create epoll descriptor"
+msgstr "Falhou em criar o descritor epoll"
+
+#: ../src/msw/mimetype.cpp:198
+#, c-format
+msgid "Failed to create registry entry for '%s' files."
+msgstr "Falhou em criar a entrada no registro para os arquivos '%s'."
+
+#: ../src/msw/fdrepdlg.cpp:442
+#, c-format
+msgid "Failed to create the standard find/replace dialog (error code %d)"
+msgstr "Falhou em criar o diálogo achar/substituir padrão (código do erro %d)"
+
+#: ../src/unix/wakeuppipe.cpp:52
+msgid "Failed to create wake up pipe used by event loop."
+msgstr "Falhou em criar wake up pipe usado para o loop de evento."
+
+#: ../src/html/winpars.cpp:739
+#, c-format
+msgid "Failed to display HTML document in %s encoding"
+msgstr "Falhou em exibir o documento HTML na codificação %s"
+
+#: ../src/msw/clipbrd.cpp:127
+msgid "Failed to empty the clipboard."
+msgstr "Falhou em esvaziar a área de transferência."
+
+#: ../src/unix/displayx11.cpp:265
+msgid "Failed to enumerate video modes"
+msgstr "Falhou em enumerar os modos de vídeo"
+
+#: ../src/msw/dde.cpp:727
+msgid "Failed to establish an advise loop with DDE server"
+msgstr "Falhou em estabelecer um loop de recomendação com o servidor DDE"
+
+#: ../src/msw/dialup.cpp:650 ../src/msw/dialup.cpp:884
+#, c-format
+msgid "Failed to establish dialup connection: %s"
+msgstr "Falhou em estabelecer uma conexão dial-up: %s"
+
+#: ../src/unix/utilsunx.cpp:617
+#, c-format
+msgid "Failed to execute '%s'\n"
+msgstr "Falhou em executar o '%s'\n"
+
+#: ../src/common/debugrpt.cpp:725
+msgid "Failed to execute curl, please install it in PATH."
+msgstr "Falhou ao executar o curl, por favor instale-o no PATH."
+
+#: ../src/msw/ole/automtn.cpp:505
+#, c-format
+msgid "Failed to find CLSID of \"%s\""
+msgstr "Falhou em achar a CLSID de \"%s\""
+
+#: ../src/common/regex.cpp:434 ../src/common/regex.cpp:482
+#, c-format
+msgid "Failed to find match for regular expression: %s"
+msgstr "Falhou em achar a combinação para a expressãoo regular: %s"
+
+#: ../src/msw/dialup.cpp:716
+#, c-format
+msgid "Failed to get ISP names: %s"
+msgstr "Falhou em obter os nomes dos ISPs: %s"
+
+#: ../src/msw/ole/automtn.cpp:574
+#, c-format
+msgid "Failed to get OLE automation interface for \"%s\""
+msgstr "Falhou em obter a interface de automação do OLE para \"%s\""
+
+#: ../src/msw/clipbrd.cpp:747
+msgid "Failed to get data from the clipboard"
+msgstr "Falhou em obter os dados da área de transferência"
+
+#: ../src/common/time.cpp:249
+msgid "Failed to get the local system time"
+msgstr "Falhou em obter a hora local do sistema"
+
+#: ../src/common/filefn.cpp:1453
+msgid "Failed to get the working directory"
+msgstr "Falhou em obter o diretório de trabalho"
+
+#: ../src/univ/theme.cpp:113
+msgid "Failed to initialize GUI: no built-in themes found."
+msgstr "Falhou em inicializar a GUI: não foram achados temas embutidos."
+
+#: ../src/msw/helpchm.cpp:63
+msgid "Failed to initialize MS HTML Help."
+msgstr "Falhou ao inicializar a Ajuda do MS HTML Help."
+
+#: ../src/msw/glcanvas.cpp:892
+msgid "Failed to initialize OpenGL"
+msgstr "Falhou ao inicializar o OpenGL"
+
+#: ../src/msw/dialup.cpp:879
+#, c-format
+msgid "Failed to initiate dialup connection: %s"
+msgstr "Falhou em iniciar a conexão dialup: %s"
+
+#: ../src/gtk/textctrl.cpp:1117
+msgid "Failed to insert text in the control."
+msgstr "Falhou em inserir o texto no controle."
+
+#: ../src/unix/snglinst.cpp:241
+#, c-format
+msgid "Failed to inspect the lock file '%s'"
+msgstr "Falhou em inspecionar o arquivo da tranca '%s'"
+
+#: ../src/unix/appunix.cpp:182
+msgid "Failed to install signal handler"
+msgstr "Falhou em instalar o manejador do sinal"
+
+#: ../src/unix/threadpsx.cpp:1162
+msgid ""
+"Failed to join a thread, potential memory leak detected - please restart the "
+"program"
+msgstr ""
+"Falhou em se juntar a um thread, vazamento potencial de memória detectado - "
+"por favor reinicie o programa"
+
+#: ../src/msw/utils.cpp:745
+#, c-format
+msgid "Failed to kill process %d"
+msgstr "Falhou em matar o processo %d"
+
+#: ../src/common/image.cpp:2365
+#, c-format
+msgid "Failed to load bitmap \"%s\" from resources."
+msgstr "Falhou em carregar o bitmap \"%s\" dos recursos."
+
+#: ../src/common/image.cpp:2374
+#, c-format
+msgid "Failed to load icon \"%s\" from resources."
+msgstr "Falhou em carregar o ícone \"%s\" dos recursos."
+
+#: ../src/common/iconbndl.cpp:182
+#, c-format
+msgid "Failed to load image %%d from file '%s'."
+msgstr "Falhou em carregar a imagem %%d do arquivo '%s'."
+
+#: ../src/common/iconbndl.cpp:190
+#, c-format
+msgid "Failed to load image %d from stream."
+msgstr "Falhou em carregar a imagem %d da stream."
+
+#: ../src/common/image.cpp:2450 ../src/common/image.cpp:2469
+#, c-format
+msgid "Failed to load image from file \"%s\"."
+msgstr "Falhou em carregar a imagem do arquivo \"%s\"."
+
+#: ../src/msw/enhmeta.cpp:97
+#, c-format
+msgid "Failed to load metafile from file \"%s\"."
+msgstr "Falhou em carregar o meta-arquivo do arquivo \"%s\"."
+
+#: ../src/msw/volume.cpp:327
+msgid "Failed to load mpr.dll."
+msgstr "Falhou em carregar o mpr.dll."
+
+#: ../src/msw/utils.cpp:1120
+#, c-format
+msgid "Failed to load resource \"%s\"."
+msgstr "Falhou em carregar o recurso \"%s\"."
+
+#: ../src/common/dynlib.cpp:100
+#, c-format
+msgid "Failed to load shared library '%s'"
+msgstr "Falhou em carregar a biblioteca compartilhada '%s'"
+
+#: ../src/msw/utils.cpp:1127
+#, c-format
+msgid "Failed to lock resource \"%s\"."
+msgstr "Falhou em trancar o recurso \"%s\"."
+
+#: ../src/unix/snglinst.cpp:198
+#, c-format
+msgid "Failed to lock the lock file '%s'"
+msgstr "Falhou em trancar o arquivo da tranca '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:136
+#, c-format
+msgid "Failed to modify descriptor %d in epoll descriptor %d"
+msgstr "Falhou em modificar o descritor %d no descritor epoll %d"
+
+#: ../src/common/filename.cpp:2681
+#, c-format
+msgid "Failed to modify file times for '%s'"
+msgstr "Falhou em modificar as horas do arquivo para '%s'"
+
+#: ../src/common/selectdispatcher.cpp:252
+msgid "Failed to monitor I/O channels"
+msgstr "Falhou em monitorar os canais de E/S"
+
+#: ../src/common/filename.cpp:194
+#, c-format
+msgid "Failed to open '%s' for reading"
+msgstr "Falhou em abrir '%s' para leitura"
+
+#: ../src/common/filename.cpp:199
+#, c-format
+msgid "Failed to open '%s' for writing"
+msgstr "Falhou em abrir '%s' para escrita"
+
+#: ../src/html/chm.cpp:141
+#, c-format
+msgid "Failed to open CHM archive '%s'."
+msgstr "Falhou em abrir o arquivo CHM '%s'."
+
+#: ../src/common/utilscmn.cpp:1135
+#, c-format
+msgid "Failed to open URL \"%s\" in default browser."
+msgstr "Falhou em abrir a URL '%s' no navegador padrão."
+
+#: ../include/wx/msw/private/fswatcher.h:92
+#, c-format
+msgid "Failed to open directory \"%s\" for monitoring."
+msgstr "Falhou em abrir o diretório \"%s\" para o monitoramento."
+
+#: ../src/x11/utils.cpp:223
+#, c-format
+msgid "Failed to open display \"%s\"."
+msgstr "Falhou em abrir a exibição \"%s\""
+
+#: ../src/common/filename.cpp:1115
+msgid "Failed to open temporary file."
+msgstr "Falhou em abrir o arquivo temporário."
+
+#: ../src/msw/clipbrd.cpp:94
+msgid "Failed to open the clipboard."
+msgstr "Falhou em abrir a área de transferência."
+
+#: ../src/common/translation.cpp:1170
+#, c-format
+msgid "Failed to parse Plural-Forms: '%s'"
+msgstr "Falhou em analisar as Formas-do-Plural: '%s'"
+
+#: ../src/unix/mediactrl.cpp:1268
+#, c-format
+msgid "Failed to prepare playing \"%s\"."
+msgstr "Falhou em preparar a reprodução do \"%s\"."
+
+#: ../src/msw/clipbrd.cpp:647
+msgid "Failed to put data on the clipboard"
+msgstr "Falhou em pôr os dados na área de transferência"
+
+#: ../src/unix/snglinst.cpp:278
+msgid "Failed to read PID from lock file."
+msgstr "Falhou em ler o PID do arquivo da tranca."
+
+#: ../src/common/fileconf.cpp:464
+msgid "Failed to read config options."
+msgstr "Falhou em ler as opções de config."
+
+#: ../src/common/docview.cpp:678
+#, c-format
+msgid "Failed to read document from the file \"%s\"."
+msgstr "Falhou em ler o documento do arquivo \"%s\"."
+
+#: ../src/dfb/evtloop.cpp:98
+msgid "Failed to read event from DirectFB pipe"
+msgstr "Falhou em ler o evento do DirectFB pipe"
+
+#: ../src/unix/wakeuppipe.cpp:120
+msgid "Failed to read from wake-up pipe"
+msgstr "Falhou em ler do wake-up pipe"
+
+#: ../src/unix/utilsunx.cpp:685
+msgid "Failed to redirect child process input/output"
+msgstr "Falhou em redirecionar a entrada/saída do processo filho"
+
+#: ../src/msw/utilsexc.cpp:697
+msgid "Failed to redirect the child process IO"
+msgstr "Falhou em redirecionar a E/S do processo filho"
+
+#: ../src/msw/dde.cpp:293
+#, c-format
+msgid "Failed to register DDE server '%s'"
+msgstr "Falhou em registrar o servidor DDE '%s'"
+
+#: ../src/common/fontmap.cpp:245
+#, c-format
+msgid "Failed to remember the encoding for the charset '%s'."
+msgstr "Falhou em lembrar a codificação do conjunto de caracteres '%s'."
+
+#: ../src/common/debugrpt.cpp:227
+#, c-format
+msgid "Failed to remove debug report file \"%s\""
+msgstr "Falhou em remover o arquivo do relatório do debug \"%s\""
+
+#: ../src/unix/snglinst.cpp:322
+#, c-format
+msgid "Failed to remove lock file '%s'"
+msgstr "Falhou em remover o arquivo da tranca '%s'"
+
+#: ../src/unix/snglinst.cpp:288
+#, c-format
+msgid "Failed to remove stale lock file '%s'."
+msgstr "Falhou em remover o arquivo do stale lock '%s'."
+
+#: ../src/msw/registry.cpp:528
+#, c-format
+msgid "Failed to rename registry value '%s' to '%s'."
+msgstr "Falhou em renomear o valor do registro de '%s' para '%s'."
+
+#: ../src/common/filefn.cpp:1168
+#, c-format
+msgid ""
+"Failed to rename the file '%s' to '%s' because the destination file already "
+"exists."
+msgstr ""
+"Falhou em renomear o arquivo '%s' para '%s' porque o arquivo destino já "
+"existe."
+
+#: ../src/msw/registry.cpp:633
+#, c-format
+msgid "Failed to rename the registry key '%s' to '%s'."
+msgstr "Falhou em renomear a chave do registro de '%s' para '%s'."
+
+#: ../src/msw/clipbrd.cpp:497
+msgid "Failed to retrieve data from the clipboard."
+msgstr "Falhou em recuperar os dados da área de transferência."
+
+#: ../src/common/filename.cpp:2777
+#, c-format
+msgid "Failed to retrieve file times for '%s'"
+msgstr "Falhou em recuperar as horas do arquivo para '%s'"
+
+#: ../src/msw/dialup.cpp:487
+msgid "Failed to retrieve text of RAS error message"
+msgstr "Falhou em recuperar o texto da mensagem de erro do RAS"
+
+#: ../src/msw/clipbrd.cpp:784
+msgid "Failed to retrieve the supported clipboard formats"
+msgstr "Falhou em recuperar os formatos da área de transferência suportados"
+
+#: ../src/common/docview.cpp:649
+#, c-format
+msgid "Failed to save document to the file \"%s\"."
+msgstr "Falhou em salvar o documento como o arquivo \"%s\"."
+
+#: ../src/msw/dib.cpp:326
+#, c-format
+msgid "Failed to save the bitmap image to file \"%s\"."
+msgstr "Falhou em salvar a imagem bitmap como o arquivo \"%s\"."
+
+#: ../src/msw/dde.cpp:768
+msgid "Failed to send DDE advise notification"
+msgstr "Falhou em enviar a notificação de recomendação do DDE"
+
+#: ../src/common/ftp.cpp:404
+#, c-format
+msgid "Failed to set FTP transfer mode to %s."
+msgstr "Falhou em definir o modo de transferência do FTP para %s."
+
+#: ../src/msw/clipbrd.cpp:373
+msgid "Failed to set clipboard data."
+msgstr "Falhou em definir os dados da área de transferência."
+
+#: ../src/unix/snglinst.cpp:181
+#, c-format
+msgid "Failed to set permissions on lock file '%s'"
+msgstr "Falhou em definir as permissões sobre o arquivo da tranca '%s'"
+
+#: ../src/unix/utilsunx.cpp:674
+msgid "Failed to set process priority"
+msgstr "Falhou em definir a prioridade do processo"
+
+#: ../src/common/file.cpp:576
+msgid "Failed to set temporary file permissions"
+msgstr "Falhou em definir as permissões do arquivo temporário"
+
+#: ../src/gtk/textctrl.cpp:1058
+msgid "Failed to set text in the text control."
+msgstr "Falhou em definir o texto no controle de texto."
+
+#: ../src/unix/threadpsx.cpp:1293
+#, c-format
+msgid "Failed to set thread concurrency level to %lu"
+msgstr "Falhou em definir o nível de concordância do thread em %lu."
+
+#: ../src/unix/threadpsx.cpp:1377 ../src/unix/threadpsx.cpp:1387
+#, c-format
+msgid "Failed to set thread priority %d."
+msgstr "Falhou em definir a prioridade do thread %d."
+
+#: ../src/unix/utilsunx.cpp:791
+msgid "Failed to set up non-blocking pipe, the program might hang."
+msgstr "Falhou em configurar o pipe não-bloqueador, o programa poderia travar."
+
+#: ../src/common/fs_mem.cpp:261
+#, c-format
+msgid "Failed to store image '%s' to memory VFS!"
+msgstr "Falhou em armazenar a imagem '%s' na memória VFS!"
+
+#: ../src/dfb/evtloop.cpp:170
+msgid "Failed to switch DirectFB pipe to non-blocking mode"
+msgstr "Falhou em trocar o DirectFB pipe pro modo não bloqueador"
+
+#: ../src/unix/wakeuppipe.cpp:59
+msgid "Failed to switch wake up pipe to non-blocking mode"
+msgstr "Falhou em trocar o wake up pipe para o modo não bloqueador"
+
+#: ../src/unix/threadpsx.cpp:1569
+msgid "Failed to terminate a thread."
+msgstr "Falhou em concluir um thread."
+
+#: ../src/msw/dde.cpp:746
+msgid "Failed to terminate the advise loop with DDE server"
+msgstr "Falhou em concluir o loop de recomendação com o servidor DDE"
+
+#: ../src/msw/dialup.cpp:959
+#, c-format
+msgid "Failed to terminate the dialup connection: %s"
+msgstr "Falhou em finalizar a conexão dial-up: %s"
+
+#: ../src/common/filename.cpp:2696
+#, c-format
+msgid "Failed to touch the file '%s'"
+msgstr "Falhou em tocar o arquivo '%s'"
+
+#: ../src/unix/snglinst.cpp:328
+#, c-format
+msgid "Failed to unlock lock file '%s'"
+msgstr "Falhou em destrancar o arquivo da tranca '%s'"
+
+#: ../src/msw/dde.cpp:314
+#, c-format
+msgid "Failed to unregister DDE server '%s'"
+msgstr "Falhou em des-registrar o servidor DDE '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:155
+#, c-format
+msgid "Failed to unregister descriptor %d from epoll descriptor %d"
+msgstr "Falhou em des-registrar o descritor %d do descritor epoll %d"
+
+#: ../src/common/fileconf.cpp:1037
+msgid "Failed to update user configuration file."
+msgstr "Falhou em atualizar o arquivo de configuração do usuário."
+
+#: ../src/common/debugrpt.cpp:738
+#, c-format
+msgid "Failed to upload the debug report (error code %d)."
+msgstr "Falhou em enviar o relatório de debug (código do erro %d)."
+
+#: ../src/unix/snglinst.cpp:168
+#, c-format
+msgid "Failed to write to lock file '%s'"
+msgstr "Falhou em escrever no arquivo da tranca '%s'"
+
+#: ../src/propgrid/propgrid.cpp:172
+msgid "False"
+msgstr "Falso"
+
+#: ../src/propgrid/advprops.cpp:658
+msgid "Family"
+msgstr "Família"
+
+#: ../src/common/stockitem.cpp:157 ../src/msw/wince/filedlgwce.cpp:121
+msgid "File"
+msgstr "Arquivo"
+
+#: ../src/common/docview.cpp:666
+#, c-format
+msgid "File \"%s\" could not be opened for reading."
+msgstr "O arquivo \"%s\" não pôde ser aberto para leitura."
+
+#: ../src/common/docview.cpp:643
+#, c-format
+msgid "File \"%s\" could not be opened for writing."
+msgstr "O arquivo \"%s\" não pôde ser aberto para gravação."
+
+#: ../src/gtk/filedlg.cpp:56
+#, c-format
+msgid "File '%s' already exists, do you really want to overwrite it?"
+msgstr "O arquivo '%s' já existe; você realmente quer sobrescrevê-lo?"
+
+#: ../src/os2/filedlg.cpp:310
+#, c-format
+msgid ""
+"File '%s' already exists.\n"
+"Do you want to replace it?"
+msgstr ""
+"O arquivo '%s' já existe.\n"
+"Você quer substituí-lo?"
+
+#: ../src/common/filefn.cpp:1207
+#, c-format
+msgid "File '%s' couldn't be removed"
+msgstr "O arquivo '%s' não pôde ser removido"
+
+#: ../src/common/filefn.cpp:1187
+#, c-format
+msgid "File '%s' couldn't be renamed '%s'"
+msgstr "O arquivo '%s' não pôde ser renomeado '%s'"
+
+#: ../src/richtext/richtextctrl.cpp:2688 ../src/common/textcmn.cpp:921
+msgid "File couldn't be loaded."
+msgstr "O arquivo não pôde ser carregado."
+
+#: ../src/msw/filedlg.cpp:458
+#, c-format
+msgid "File dialog failed with error code %0lx."
+msgstr "O diálogo do arquivo falhou com o código de erro %0lx."
+
+#: ../src/common/docview.cpp:1771
+msgid "File error"
+msgstr "Erro do arquivo"
+
+#: ../src/generic/dirctrlg.cpp:688 ../src/generic/filectrlg.cpp:805
+msgid "File name exists already."
+msgstr "O nome do arquivo já existe."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Files"
+msgstr "Arquivos"
+
+#: ../src/common/filefn.cpp:1761
+#, c-format
+msgid "Files (%s)"
+msgstr "Arquivos (%s)"
+
+#: ../src/motif/filedlg.cpp:218
+msgid "Filter"
+msgstr "Filtro"
+
+#: ../src/common/stockitem.cpp:158 ../src/html/helpwnd.cpp:500
+msgid "Find"
+msgstr "Achar"
+
+#: ../src/common/stockitem.cpp:159
+msgid "First"
+msgstr "Primeiro"
+
+#: ../src/common/prntbase.cpp:1518
+msgid "First page"
+msgstr "Primeira página"
+
+#: ../src/richtext/richtextsizepage.cpp:521
+msgid "Fixed"
+msgstr "Fixo"
+
+#: ../src/html/helpwnd.cpp:1219
+msgid "Fixed font:"
+msgstr "Fonte fixa:"
+
+#: ../src/html/helpwnd.cpp:1282
+msgid "Fixed size face.<br> <b>bold</b> <i>italic</i> "
+msgstr "Face do tamanho fixo.<br> <b>negrito</b> <i>itálico</i> "
+
+#: ../src/richtext/richtextsizepage.cpp:229
+msgid "Floating"
+msgstr "Flutuante"
+
+#: ../src/common/stockitem.cpp:160
+msgid "Floppy"
+msgstr "Disquete"
+
+#: ../src/common/paper.cpp:112
+msgid "Folio, 8 1/2 x 13 in"
+msgstr "Folio, 8 1/2 x 13 em"
+
+#: ../src/richtext/richtextformatdlg.cpp:324 ../src/osx/carbon/fontdlg.cpp:473
+#: ../src/common/stockitem.cpp:194
+msgid "Font"
+msgstr "Fonte"
+
+#: ../src/richtext/richtextfontpage.cpp:230
+msgid "Font &weight:"
+msgstr "Peso da &fonte:"
+
+#: ../src/html/helpwnd.cpp:1220
+msgid "Font size:"
+msgstr "Tamanho da fonte:"
+
+#: ../src/richtext/richtextfontpage.cpp:217
+msgid "Font st&yle:"
+msgstr "Estilo da f&onte:"
+
+#: ../src/osx/carbon/fontdlg.cpp:515
+msgid "Font:"
+msgstr "Fonte:"
+
+#: ../src/dfb/fontmgr.cpp:198
+#, c-format
+msgid "Fonts index file %s disappeared while loading fonts."
+msgstr ""
+"O arquivo do índice das fontes %s desapareceu enquanto carregava as fontes."
+
+#: ../src/unix/utilsunx.cpp:651
+msgid "Fork failed"
+msgstr "O fork falhou"
+
+#: ../src/common/stockitem.cpp:161
+msgid "Forward"
+msgstr "Pra frente"
+
+#: ../src/common/xtixml.cpp:235
+msgid "Forward hrefs are not supported"
+msgstr "hrefs adiantadas não são suportadas"
+
+#: ../src/html/helpwnd.cpp:888
+#, c-format
+msgid "Found %i matches"
+msgstr "Achou %i combinações"
+
+#: ../src/generic/prntdlgg.cpp:238
+msgid "From:"
+msgstr "De:"
+
+#: ../src/common/imaggif.cpp:160
+msgid "GIF: Invalid gif index."
+msgstr "GIF: Índice gif inválido."
+
+#: ../src/common/imaggif.cpp:150
+msgid "GIF: data stream seems to be truncated."
+msgstr "GIF: fluxo de dados parece estar truncado."
+
+#: ../src/common/imaggif.cpp:134
+msgid "GIF: error in GIF image format."
+msgstr "GIF: erro no formato da imagem GIF."
+
+#: ../src/common/imaggif.cpp:137
+msgid "GIF: not enough memory."
+msgstr "GIF: memória insuficiente."
+
+#: ../src/common/imaggif.cpp:140
+msgid "GIF: unknown error!!!"
+msgstr "GIF: erro desconhecido!!!"
+
+#: ../src/gtk/window.cpp:4288
+msgid ""
+"GTK+ installed on this machine is too old to support screen compositing, "
+"please install GTK+ 2.12 or later."
+msgstr ""
+"O GTK+ instalado nesta máquina é muito antigo pra suportar a composição de "
+"tela, por favor instale GTK+ 2.12 ou superior."
+
+#: ../src/univ/themes/gtk.cpp:525
+msgid "GTK+ theme"
+msgstr "Tema GTK+"
+
+#: ../src/common/preferencescmn.cpp:39
+msgid "General"
+msgstr "Geral"
+
+#: ../src/common/prntbase.cpp:243
+msgid "Generic PostScript"
+msgstr "PostScript Genérico"
+
+#: ../src/common/paper.cpp:136
+msgid "German Legal Fanfold, 8 1/2 x 13 in"
+msgstr "Fanfold Legal Alemão, 8 1/2 x 13 em"
+
+#: ../src/common/paper.cpp:135
+msgid "German Std Fanfold, 8 1/2 x 12 in"
+msgstr "Fanfold Std Alemão, 8 1/2 x 12 em"
+
+#: ../include/wx/xtiprop.h:188
+msgid "GetProperty called w/o valid getter"
+msgstr "GetProperty chamada sem um \"getter\" v�lido"
+
+#: ../include/wx/xtiprop.h:266
+msgid "GetPropertyCollection called on a generic accessor"
+msgstr "GetPropertyCollection chamada num acessor gen�rico"
+
+#: ../include/wx/xtiprop.h:206
+msgid "GetPropertyCollection called w/o valid collection getter"
+msgstr "GetPropertyCollection chamada sem um \"collection getter\" v�lido"
+
+#: ../src/html/helpwnd.cpp:673
+msgid "Go back"
+msgstr "Voltar"
+
+#: ../src/html/helpwnd.cpp:674
+msgid "Go forward"
+msgstr "Avançar"
+
+#: ../src/html/helpwnd.cpp:676
+msgid "Go one level up in document hierarchy"
+msgstr "Ir um nível aciima na hierarquia do documento"
+
+#: ../src/generic/filedlgg.cpp:223 ../src/generic/dirdlgg.cpp:136
+msgid "Go to home directory"
+msgstr "Ir para o diretório home"
+
+#: ../src/generic/filedlgg.cpp:219
+msgid "Go to parent directory"
+msgstr "Ir para o diretório pai"
+
+#: ../src/generic/aboutdlgg.cpp:76
+msgid "Graphics art by "
+msgstr "Arte gráfica de"
+
+#: ../src/common/fmapbase.cpp:154
+msgid "Greek (ISO-8859-7)"
+msgstr "Grego (ISO-8859-7)"
+
+#: ../src/richtext/richtextborderspage.cpp:547
+msgid "Groove"
+msgstr "Ranhura"
+
+#: ../src/common/zstream.cpp:158 ../src/common/zstream.cpp:318
+msgid "Gzip not supported by this version of zlib"
+msgstr "Gzip não suportado por esta versão do zlib"
+
+#: ../src/common/accelcmn.cpp:75
+msgid "HELP"
+msgstr "AJUDA"
+
+#: ../src/common/accelcmn.cpp:60
+msgid "HOME"
+msgstr "HOME"
+
+#: ../src/html/helpwnd.cpp:1552
+msgid "HTML Help Project (*.hhp)|*.hhp|"
+msgstr "Projeto de Ajuda HTML (*.hhp)|*.hhp|"
+
+#: ../src/html/htmlwin.cpp:659
+#, c-format
+msgid "HTML anchor %s does not exist."
+msgstr "Âncora HTML %s não existe."
+
+#: ../src/html/helpwnd.cpp:1550
+msgid "HTML files (*.html;*.htm)|*.html;*.htm|"
+msgstr "Arquivos HTML (*.html;*.htm)|*.html;*.htm|"
+
+#: ../src/common/stockitem.cpp:162
+msgid "Harddisk"
+msgstr "Disco rígido"
+
+#: ../src/common/fmapbase.cpp:155
+msgid "Hebrew (ISO-8859-8)"
+msgstr "Hebraico (ISO-8859-8)"
+
+#: ../include/wx/msgdlg.h:275 ../src/osx/button_osx.cpp:39
+#: ../src/common/stockitem.cpp:163 ../src/html/helpdlg.cpp:66
+#: ../src/html/helpfrm.cpp:116
+msgid "Help"
+msgstr "Ajuda"
+
+#: ../src/html/helpwnd.cpp:1213
+msgid "Help Browser Options"
+msgstr "Opções do Navegador da Ajuda"
+
+#: ../src/generic/helpext.cpp:458 ../src/generic/helpext.cpp:459
+msgid "Help Index"
+msgstr "Índice da Ajuda"
+
+#: ../src/html/helpwnd.cpp:1534
+msgid "Help Printing"
+msgstr "Ajuda com a Impressão"
+
+#: ../src/html/helpwnd.cpp:814
+msgid "Help Topics"
+msgstr "Tópicos da Ajuda"
+
+#: ../src/html/helpwnd.cpp:1551
+msgid "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+msgstr "Livros de ajuda (*.htb)|*.htb|Livros de ajuda (*.zip)|*.zip|"
+
+#: ../src/generic/helpext.cpp:271
+#, c-format
+msgid "Help directory \"%s\" not found."
+msgstr "Diretório de ajuda \"%s\" não achado."
+
+#: ../src/generic/helpext.cpp:279
+#, c-format
+msgid "Help file \"%s\" not found."
+msgstr "O arquivo de ajuda \"%s\" não foi achado."
+
+#: ../src/html/helpctrl.cpp:63
+#, c-format
+msgid "Help: %s"
+msgstr "Ajuda: %s"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:649
+#, c-format
+msgid "Hide %s"
+msgstr "Esconder %s"
+
+#: ../src/osx/menu_osx.cpp:604 ../src/osx/menu_osx.cpp:651
+msgid "Hide Others"
+msgstr "Esconder Outros"
+
+#: ../src/generic/infobar.cpp:85
+msgid "Hide this notification message."
+msgstr "Esconder esta mensagem de notificação."
+
+#: ../src/generic/dirdlgg.cpp:98 ../src/common/stockitem.cpp:164
+msgid "Home"
+msgstr "Home"
+
+#: ../src/generic/dirctrlg.cpp:624
+msgid "Home directory"
+msgstr "Diretório home"
+
+#: ../src/richtext/richtextsizepage.cpp:253
+#: ../src/richtext/richtextsizepage.cpp:255
+msgid "How the object will float relative to the text."
+msgstr "Como o objeto flutuará relativo ao texto."
+
+#: ../src/common/imagbmp.cpp:1118
+msgid "ICO: Error in reading mask DIB."
+msgstr "ICO: Erro ao ler a máscara DIB."
+
+#: ../src/common/imagbmp.cpp:1233 ../src/common/imagbmp.cpp:1294
+#: ../src/common/imagbmp.cpp:1305 ../src/common/imagbmp.cpp:1318
+#: ../src/common/imagbmp.cpp:1363 ../src/common/imagbmp.cpp:1375
+#: ../src/common/imagbmp.cpp:1386
+msgid "ICO: Error writing the image file!"
+msgstr "ICO: Erro ao escrever o arquivo de imagem!"
+
+#: ../src/common/imagbmp.cpp:1198
+msgid "ICO: Image too tall for an icon."
+msgstr "ICO: Imagem muito alta para um ícone."
+
+#: ../src/common/imagbmp.cpp:1206
+msgid "ICO: Image too wide for an icon."
+msgstr "ICO: Imagem muito larga para um ícone."
+
+#: ../src/common/imagbmp.cpp:1466
+msgid "ICO: Invalid icon index."
+msgstr "ICO: Índice do ícone inválido ."
+
+#: ../src/common/imagiff.cpp:759
+msgid "IFF: data stream seems to be truncated."
+msgstr "IFF: fluxo de dados parece estar truncado."
+
+#: ../src/common/imagiff.cpp:743
+msgid "IFF: error in IFF image format."
+msgstr "IFF: erro no formato da imagem IFF."
+
+#: ../src/common/imagiff.cpp:746
+msgid "IFF: not enough memory."
+msgstr "IFF: memória insuficiente."
+
+#: ../src/common/imagiff.cpp:749
+msgid "IFF: unknown error!!!"
+msgstr "IFF: erro desconhecido!!!"
+
+#: ../src/common/accelcmn.cpp:50
+msgid "INS"
+msgstr "INS"
+
+#: ../src/common/accelcmn.cpp:51
+msgid "INSERT"
+msgstr "INSERT"
+
+#: ../src/common/fmapbase.cpp:197
+msgid "ISO-2022-JP"
+msgstr "ISO-2022-JP"
+
+#: ../src/osx/carbon/dataview.cpp:2420
+msgid "Icon & text renderer cannot render value; value type: "
+msgstr ""
+"Renderizador de ícone & texto não pode renderizar o valor; tipo de valor:"
+
+#: ../src/html/htmprint.cpp:282
+msgid ""
+"If possible, try changing the layout parameters to make the printout more "
+"narrow."
+msgstr ""
+"Se possível, tente mudar os parâmetros do layout pra tornar a impressão mais "
+"restrita."
+
+#: ../src/generic/dbgrptg.cpp:358
+msgid ""
+"If you have any additional information pertaining to this bug\n"
+"report, please enter it here and it will be joined to it:"
+msgstr ""
+"Se você tem qualquer informação adicional pertinente a este relatório\n"
+"de erro, por favor insira-a aqui e ela será adicionada a ele:"
+
+#: ../src/generic/dbgrptg.cpp:324
+msgid ""
+"If you wish to suppress this debug report completely, please choose the "
+"\"Cancel\" button,\n"
+"but be warned that it may hinder improving the program, so if\n"
+"at all possible please do continue with the report generation.\n"
+msgstr ""
+"Se você deseja suprimir este relatório de debug completamente, por favor "
+"escolha o botão \"Cancelar\",\n"
+"mas esteja avisado que pode impedir de melhorar o programa, então se\n"
+"possível de algum modo por favor continue com a geraçãoo do relatório.\n"
+
+#: ../src/msw/registry.cpp:1395
+#, c-format
+msgid "Ignoring value \"%s\" of the key \"%s\"."
+msgstr "Ignorando o valor \"%s\" da chave \"%s\"."
+
+#: ../src/common/xtistrm.cpp:299
+msgid "Illegal Object Class (Non-wxEvtHandler) as Event Source"
+msgstr "Classe de Objeto Ilegal (Não-wxEvtHandler) como Fonte do Evento"
+
+#: ../src/common/xti.cpp:513
+msgid "Illegal Parameter Count for ConstructObject Method"
+msgstr "N�mero ilegal de par�metros para m�todo ConstructObject"
+
+#: ../src/common/xti.cpp:501
+msgid "Illegal Parameter Count for Create Method"
+msgstr "N�mero ilegal de par�metros para o m�todo Create"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/filectrlg.cpp:791
+msgid "Illegal directory name."
+msgstr "Nome ilegal de diretório."
+
+#: ../src/generic/filectrlg.cpp:1380
+msgid "Illegal file specification."
+msgstr "Especificação ilegal do arquivo."
+
+#: ../src/common/image.cpp:2158
+msgid "Image and mask have different sizes."
+msgstr "Imagem e máscara tem tamanhos diferentes."
+
+#: ../src/common/image.cpp:2609
+#, c-format
+msgid "Image file is not of type %d."
+msgstr "O arquivo de imagem não é do tipo %d."
+
+#: ../src/common/image.cpp:2739
+#, c-format
+msgid "Image is not of type %s."
+msgstr "A imagem não é do tipo %s."
+
+#: ../src/msw/textctrl.cpp:399
+msgid ""
+"Impossible to create a rich edit control, using simple text control instead. "
+"Please reinstall riched32.dll"
+msgstr ""
+"Impossível criar um controle de edição rica, usando o controle de texto "
+"simples em vez disso. Por favor reinstale o riched32.dll"
+
+#: ../src/unix/utilsunx.cpp:307
+msgid "Impossible to get child process input"
+msgstr "Impossível obter a entrada do processo filho"
+
+#: ../src/common/filefn.cpp:1074
+#, c-format
+msgid "Impossible to get permissions for file '%s'"
+msgstr "Impossível obter as permissões para o arquivo '%s'"
+
+#: ../src/common/filefn.cpp:1088
+#, c-format
+msgid "Impossible to overwrite the file '%s'"
+msgstr "Impossível sobrescrever o arquivo '%s'"
+
+#: ../src/common/filefn.cpp:1142
+#, c-format
+msgid "Impossible to set permissions for the file '%s'"
+msgstr "Impossível definir as permissões para o arquivo '%s'"
+
+#: ../src/common/gifdecod.cpp:818
+#, c-format
+msgid "Incorrect GIF frame size (%u, %d) for the frame #%u"
+msgstr "Tamanho do frame do GIF incorreto (%u, %d) para o frame #%u"
+
+#: ../src/msw/ole/automtn.cpp:624
+msgid "Incorrect number of arguments."
+msgstr "Número incorreto de argumentos."
+
+#: ../src/common/stockitem.cpp:165
+msgid "Indent"
+msgstr "Recuo"
+
+#: ../src/richtext/richtextformatdlg.cpp:330
+msgid "Indents && Spacing"
+msgstr "Recuos && Espaçamento"
+
+#: ../src/common/stockitem.cpp:166 ../src/html/helpwnd.cpp:525
+msgid "Index"
+msgstr "Índice"
+
+#: ../src/common/fmapbase.cpp:159
+msgid "Indian (ISO-8859-12)"
+msgstr "Indiano (ISO-8859-12)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "Info"
+msgstr "Info"
+
+#: ../src/common/init.cpp:276
+msgid "Initialization failed in post init, aborting."
+msgstr "A inicialização falhou no post init, abortando."
+
+#: ../src/richtext/richtextsymboldlg.cpp:472
+msgid "Insert"
+msgstr "Inserir"
+
+#: ../src/richtext/richtextbuffer.cpp:7687
+msgid "Insert Field"
+msgstr "Inserir Campo"
+
+#: ../src/richtext/richtextbuffer.cpp:7598
+#: ../src/richtext/richtextbuffer.cpp:8551
+msgid "Insert Image"
+msgstr "Inserir Imagem"
+
+#: ../src/richtext/richtextbuffer.cpp:7645
+msgid "Insert Object"
+msgstr "Inserir Objeto"
+
+#: ../src/richtext/richtextctrl.cpp:1172 ../src/richtext/richtextctrl.cpp:1362
+#: ../src/richtext/richtextbuffer.cpp:7440
+#: ../src/richtext/richtextbuffer.cpp:7470
+#: ../src/richtext/richtextbuffer.cpp:7514
+msgid "Insert Text"
+msgstr "Inserir Texto"
+
+#: ../src/richtext/richtextindentspage.cpp:295
+#: ../src/richtext/richtextindentspage.cpp:297
+msgid "Inserts a page break before the paragraph."
+msgstr "Insere uma quebra de página antes do parágrafo."
+
+#: ../src/richtext/richtextborderspage.cpp:549
+msgid "Inset"
+msgstr "Inserir"
+
+#: ../src/gtk/app.cpp:429
+#, c-format
+msgid "Invalid GTK+ command line option, use \"%s --help\""
+msgstr "Opção da linha de comando GTK+ inválida, use \"%s --help\""
+
+#: ../src/common/imagtiff.cpp:314
+msgid "Invalid TIFF image index."
+msgstr "Índice da imagem TIFF inválido."
+
+#: ../src/osx/carbon/dataview.cpp:1782 ../src/osx/carbon/dataview.cpp:1877
+msgid "Invalid data view item"
+msgstr "Item de visualização dos dados inválido"
+
+#: ../src/common/appcmn.cpp:266
+#, c-format
+msgid "Invalid display mode specification '%s'."
+msgstr "Especificação do modo de exibição '%s' inválida."
+
+#: ../src/x11/app.cpp:121
+#, c-format
+msgid "Invalid geometry specification '%s'"
+msgstr "Especificação da geometria '%s' inválida "
+
+#: ../src/unix/fswatcher_inotify.cpp:298
+#, c-format
+msgid "Invalid inotify event for \"%s\""
+msgstr "Evento inotify inválido para \"%s\""
+
+#: ../src/unix/snglinst.cpp:306
+#, c-format
+msgid "Invalid lock file '%s'."
+msgstr "Arquivo da tranca '%s' inválido."
+
+#: ../src/common/translation.cpp:1111
+msgid "Invalid message catalog."
+msgstr "Catálogo de mensagens inválido."
+
+#: ../src/common/xtistrm.cpp:409 ../src/common/xtistrm.cpp:424
+msgid "Invalid or Null Object ID passed to GetObjectClassInfo"
+msgstr "ID do Objeto passada para o GetObjectClassInfo Inválida ou Nula"
+
+#: ../src/common/xtistrm.cpp:439
+msgid "Invalid or Null Object ID passed to HasObjectClassInfo"
+msgstr "ID do Objeto passada para o HasObjectClassInfo Inválida ou Nula"
+
+#: ../src/common/regex.cpp:313
+#, c-format
+msgid "Invalid regular expression '%s': %s"
+msgstr "Expressão regular '%s' inválida: %s"
+
+#: ../src/common/config.cpp:226
+#, c-format
+msgid "Invalid value %ld for a boolean key \"%s\" in config file."
+msgstr "Valor inválido %ld para uma chave boolean \"%s\" no arquivo config."
+
+#: ../src/generic/fontdlgg.cpp:329 ../src/richtext/richtextfontpage.cpp:333
+#: ../src/osx/carbon/fontdlg.cpp:547 ../src/common/stockitem.cpp:168
+msgid "Italic"
+msgstr "Itálico"
+
+#: ../src/common/paper.cpp:131
+msgid "Italy Envelope, 110 x 230 mm"
+msgstr "Envelope da Itália, 110 x 230 mm"
+
+#: ../src/common/imagjpeg.cpp:255
+msgid "JPEG: Couldn't load - file is probably corrupted."
+msgstr "JPEG: Não pôde carregar - o arquivo está provavelmente corrompido."
+
+#: ../src/common/imagjpeg.cpp:434
+msgid "JPEG: Couldn't save image."
+msgstr "JPEG: Não pôde salvar a imagem."
+
+#: ../src/common/paper.cpp:164
+msgid "Japanese Double Postcard 200 x 148 mm"
+msgstr "Cartão Postal Japonês Duplo 200 x 148 mm"
+
+#: ../src/common/paper.cpp:168
+msgid "Japanese Envelope Chou #3"
+msgstr "Envelope Japonês Chou #3"
+
+#: ../src/common/paper.cpp:181
+msgid "Japanese Envelope Chou #3 Rotated"
+msgstr "Envelope Japonês Chou #3 Rotacionado"
+
+#: ../src/common/paper.cpp:169
+msgid "Japanese Envelope Chou #4"
+msgstr "Envelope Japonês Chou #4"
+
+#: ../src/common/paper.cpp:182
+msgid "Japanese Envelope Chou #4 Rotated"
+msgstr "Envelope Japonês Chou #4 Rotacionado"
+
+#: ../src/common/paper.cpp:166
+msgid "Japanese Envelope Kaku #2"
+msgstr "Envelope Japonês Kaku #2"
+
+#: ../src/common/paper.cpp:179
+msgid "Japanese Envelope Kaku #2 Rotated"
+msgstr "Envelope Japonês Kaku #2 Rotacionado"
+
+#: ../src/common/paper.cpp:167
+msgid "Japanese Envelope Kaku #3"
+msgstr "Envelope Japonês Kaku #3"
+
+#: ../src/common/paper.cpp:180
+msgid "Japanese Envelope Kaku #3 Rotated"
+msgstr "Envelope Japonês Kaku #3 Rotacionado"
+
+#: ../src/common/paper.cpp:186
+msgid "Japanese Envelope You #4"
+msgstr "Envelope Japonês You #4"
+
+#: ../src/common/paper.cpp:187
+msgid "Japanese Envelope You #4 Rotated"
+msgstr "Envelope Japonês You #4 Rotacionado"
+
+#: ../src/common/paper.cpp:139
+msgid "Japanese Postcard 100 x 148 mm"
+msgstr "Cartão Postal Japonês 100 x 148 mm"
+
+#: ../src/common/paper.cpp:176
+msgid "Japanese Postcard Rotated 148 x 100 mm"
+msgstr "Cartão Postal Japonês Rotacionado 148 x 100 mm"
+
+#: ../src/common/stockitem.cpp:169
+msgid "Jump to"
+msgstr "Pular para"
+
+#: ../src/common/stockitem.cpp:171
+msgid "Justified"
+msgstr "Justificado"
+
+#: ../src/richtext/richtextindentspage.cpp:155
+#: ../src/richtext/richtextindentspage.cpp:157
+#: ../src/richtext/richtextliststylepage.cpp:344
+#: ../src/richtext/richtextliststylepage.cpp:346
+msgid "Justify text left and right."
+msgstr "Justificar o texto a esquerda e a direita."
+
+#: ../src/common/fmapbase.cpp:163
+msgid "KOI8-R"
+msgstr "KOI8-R"
+
+#: ../src/common/fmapbase.cpp:164
+msgid "KOI8-U"
+msgstr "KOI8-U"
+
+#: ../src/common/accelcmn.cpp:254 ../src/common/accelcmn.cpp:336
+msgid "KP_"
+msgstr "KP_"
+
+#: ../src/common/accelcmn.cpp:103
+msgid "KP_ADD"
+msgstr "KP_ADD"
+
+#: ../src/common/accelcmn.cpp:98
+msgid "KP_BEGIN"
+msgstr "KP_BEGIN"
+
+#: ../src/common/accelcmn.cpp:106
+msgid "KP_DECIMAL"
+msgstr "KP_DECIMAL"
+
+#: ../src/common/accelcmn.cpp:100
+msgid "KP_DELETE"
+msgstr "KP_DELETE"
+
+#: ../src/common/accelcmn.cpp:107
+msgid "KP_DIVIDE"
+msgstr "KP_DIVIDE"
+
+#: ../src/common/accelcmn.cpp:92
+msgid "KP_DOWN"
+msgstr "KP_DOWN"
+
+#: ../src/common/accelcmn.cpp:97
+msgid "KP_END"
+msgstr "KP_END"
+
+#: ../src/common/accelcmn.cpp:87
+msgid "KP_ENTER"
+msgstr "KP_ENTER"
+
+#: ../src/common/accelcmn.cpp:101
+msgid "KP_EQUAL"
+msgstr "KP_EQUAL"
+
+#: ../src/common/accelcmn.cpp:88
+msgid "KP_HOME"
+msgstr "KP_HOME"
+
+#: ../src/common/accelcmn.cpp:99
+msgid "KP_INSERT"
+msgstr "KP_INSERT"
+
+#: ../src/common/accelcmn.cpp:89
+msgid "KP_LEFT"
+msgstr "KP_LEFT"
+
+#: ../src/common/accelcmn.cpp:102
+msgid "KP_MULTIPLY"
+msgstr "KP_MULTIPLY"
+
+#: ../src/common/accelcmn.cpp:95
+msgid "KP_NEXT"
+msgstr "KP_NEXT"
+
+#: ../src/common/accelcmn.cpp:96
+msgid "KP_PAGEDOWN"
+msgstr "KP_PAGEDOWN"
+
+#: ../src/common/accelcmn.cpp:94
+msgid "KP_PAGEUP"
+msgstr "KP_PAGEUP"
+
+#: ../src/common/accelcmn.cpp:93
+msgid "KP_PRIOR"
+msgstr "KP_PRIOR"
+
+#: ../src/common/accelcmn.cpp:91
+msgid "KP_RIGHT"
+msgstr "KP_RIGHT"
+
+#: ../src/common/accelcmn.cpp:104
+msgid "KP_SEPARATOR"
+msgstr "KP_SEPARATOR"
+
+#: ../src/common/accelcmn.cpp:85
+msgid "KP_SPACE"
+msgstr "KP_SPACE"
+
+#: ../src/common/accelcmn.cpp:105
+msgid "KP_SUBTRACT"
+msgstr "KP_SUBTRACT"
+
+#: ../src/common/accelcmn.cpp:86
+msgid "KP_TAB"
+msgstr "KP_TAB"
+
+#: ../src/common/accelcmn.cpp:90
+msgid "KP_UP"
+msgstr "KP_UP"
+
+#: ../src/richtext/richtextindentspage.cpp:270
+msgid "L&ine spacing:"
+msgstr "E&spaçamento entre as linhas:"
+
+#: ../src/common/accelcmn.cpp:56
+msgid "LEFT"
+msgstr "ESQUERDA"
+
+#: ../src/generic/prntdlgg.cpp:613 ../src/generic/prntdlgg.cpp:868
+msgid "Landscape"
+msgstr "Paisagem"
+
+#: ../src/common/stockitem.cpp:174
+msgid "Last"
+msgstr "Último"
+
+#: ../src/common/prntbase.cpp:1542
+msgid "Last page"
+msgstr "Última página"
+
+#: ../src/common/log.cpp:309
+#, c-format
+msgid "Last repeated message (\"%s\", %lu time) wasn't output"
+msgid_plural "Last repeated message (\"%s\", %lu times) wasn't output"
+msgstr[0] ""
+"A última mensagens repetida (tempo \"%s\", %lu) não era da saída de dados"
+msgstr[1] ""
+"As últimas mensagens repetidas (tempo \"%s\", %lu) não eram da saída de dados"
+
+#: ../src/common/paper.cpp:104
+msgid "Ledger, 17 x 11 in"
+msgstr "Ledger, 17 x 11 em"
+
+#: ../src/richtext/richtextliststylepage.cpp:249
+#: ../src/richtext/richtextliststylepage.cpp:252
+#: ../src/richtext/richtextliststylepage.cpp:253
+#: ../src/richtext/richtextbulletspage.cpp:199
+#: ../src/richtext/richtextbulletspage.cpp:202
+#: ../src/richtext/richtextbulletspage.cpp:203
+#: ../src/richtext/richtextsizepage.cpp:249
+msgid "Left"
+msgstr "Esquerda"
+
+#: ../src/richtext/richtextindentspage.cpp:204
+#: ../src/richtext/richtextliststylepage.cpp:390
+msgid "Left (&first line):"
+msgstr "Esquerda (&primeira linha):"
+
+#: ../src/generic/prntdlgg.cpp:880
+msgid "Left margin (mm):"
+msgstr "Margem esquerda (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:141
+#: ../src/richtext/richtextindentspage.cpp:143
+#: ../src/richtext/richtextliststylepage.cpp:330
+#: ../src/richtext/richtextliststylepage.cpp:332
+msgid "Left-align text."
+msgstr "Alinhar o texto a esquerda."
+
+#: ../src/common/paper.cpp:145
+msgid "Legal Extra 9 1/2 x 15 in"
+msgstr "Extra Legal, 9 1/2 x 15 em"
+
+#: ../src/common/paper.cpp:97
+msgid "Legal, 8 1/2 x 14 in"
+msgstr "Legal, 8 1/2 x 14 em"
+
+#: ../src/common/paper.cpp:144
+msgid "Letter Extra 9 1/2 x 12 in"
+msgstr "Carta Extra 9 1/2 x 12 em"
+
+#: ../src/common/paper.cpp:150
+msgid "Letter Extra Transverse 9.275 x 12 in"
+msgstr "Carta Extra Transversal 9.275 x 12 em"
+
+#: ../src/common/paper.cpp:153
+msgid "Letter Plus 8 1/2 x 12.69 in"
+msgstr "Carta Plus, 8 1/2 x 12.69 em"
+
+#: ../src/common/paper.cpp:170
+msgid "Letter Rotated 11 x 8 1/2 in"
+msgstr "Carta Rotacionada 11 x 8 1/2 em"
+
+#: ../src/common/paper.cpp:102
+msgid "Letter Small, 8 1/2 x 11 in"
+msgstr "Carta Pequena, 8 1/2 x 11 em"
+
+#: ../src/common/paper.cpp:148
+msgid "Letter Transverse 8 1/2 x 11 in"
+msgstr "Carta Transversal 8 1/2 x 11 em"
+
+#: ../src/common/paper.cpp:96
+msgid "Letter, 8 1/2 x 11 in"
+msgstr "Carta, 8 1/2 x 11 em"
+
+#: ../src/generic/aboutdlgg.cpp:173
+msgid "License"
+msgstr "Licença"
+
+#: ../src/generic/fontdlgg.cpp:332
+msgid "Light"
+msgstr "Leve"
+
+#: ../src/generic/helpext.cpp:298
+#, c-format
+msgid "Line %lu of map file \"%s\" has invalid syntax, skipped."
+msgstr "A linha %lu do arquivo de mapa \"%s\" tem sintaxe inválida, pulada."
+
+#: ../src/richtext/richtextliststylepage.cpp:444
+msgid "Line spacing:"
+msgstr "Espaçamento entre as linhas:"
+
+#: ../src/html/chm.cpp:838
+msgid "Link contained '//', converted to absolute link."
+msgstr "O link continha '//'; convertido para link absoluto."
+
+#: ../src/richtext/richtextformatdlg.cpp:349
+msgid "List Style"
+msgstr "Estilo das Listas"
+
+#: ../src/richtext/richtextstyles.cpp:1060
+msgid "List styles"
+msgstr "Estilos das listas"
+
+#: ../src/richtext/richtextfontpage.cpp:206
+#: ../src/richtext/richtextfontpage.cpp:208
+msgid "Lists font sizes in points."
+msgstr "Lista os tamanhos das fontes em pontos."
+
+#: ../src/richtext/richtextfontpage.cpp:199
+#: ../src/richtext/richtextfontpage.cpp:201
+msgid "Lists the available fonts."
+msgstr "Lista as fontes disponíveis."
+
+#: ../src/common/fldlgcmn.cpp:325
+#, c-format
+msgid "Load %s file"
+msgstr "Carregar o arquivo %s"
+
+#: ../src/html/htmlwin.cpp:575
+msgid "Loading : "
+msgstr "Carregando : "
+
+#: ../src/unix/snglinst.cpp:246
+#, c-format
+msgid "Lock file '%s' has incorrect owner."
+msgstr "O arquivo da tranca '%s' tem dono incorreto."
+
+#: ../src/unix/snglinst.cpp:251
+#, c-format
+msgid "Lock file '%s' has incorrect permissions."
+msgstr "O arquivo da tranca '%s' tem permissões incorretas."
+
+#: ../src/generic/logg.cpp:582
+#, c-format
+msgid "Log saved to the file '%s'."
+msgstr "Log salvo no arquivo '%s'."
+
+#: ../src/richtext/richtextliststylepage.cpp:484
+#: ../src/richtext/richtextbulletspage.cpp:289
+msgid "Lower case letters"
+msgstr "Letras minúsculas"
+
+#: ../src/richtext/richtextliststylepage.cpp:486
+#: ../src/richtext/richtextbulletspage.cpp:291
+msgid "Lower case roman numerals"
+msgstr "Numerais romanos minúsculos"
+
+#: ../src/gtk/mdi.cpp:422 ../src/gtk1/mdi.cpp:431
+msgid "MDI child"
+msgstr "Filha MDI"
+
+#: ../src/common/accelcmn.cpp:68
+msgid "MENU"
+msgstr "MENU"
+
+#: ../src/msw/helpchm.cpp:56
+msgid ""
+"MS HTML Help functions are unavailable because the MS HTML Help library is "
+"not installed on this machine. Please install it."
+msgstr ""
+"As funções da Ajuda do MS HTML não estão disponíveis porque a biblioteca de "
+"Ajuda do MS HTML não está instalada nesta máquina. Por favor instale-a."
+
+#: ../src/univ/themes/win32.cpp:3754
+msgid "Ma&ximize"
+msgstr "Ma&ximizar"
+
+#: ../src/common/fmapbase.cpp:203
+msgid "MacArabic"
+msgstr "Árabe"
+
+#: ../src/common/fmapbase.cpp:222
+msgid "MacArmenian"
+msgstr "Armênio"
+
+#: ../src/common/fmapbase.cpp:211
+msgid "MacBengali"
+msgstr "Bengalês"
+
+#: ../src/common/fmapbase.cpp:217
+msgid "MacBurmese"
+msgstr "Birmanês"
+
+#: ../src/common/fmapbase.cpp:236
+msgid "MacCeltic"
+msgstr "Celta"
+
+#: ../src/common/fmapbase.cpp:227
+msgid "MacCentralEurRoman"
+msgstr "CentralEurRoman"
+
+#: ../src/common/fmapbase.cpp:223
+msgid "MacChineseSimp"
+msgstr "Chinês Simplificado"
+
+#: ../src/common/fmapbase.cpp:201
+msgid "MacChineseTrad"
+msgstr "Chinês Tradicional"
+
+#: ../src/common/fmapbase.cpp:233
+msgid "MacCroatian"
+msgstr "Croata"
+
+#: ../src/common/fmapbase.cpp:206
+msgid "MacCyrillic"
+msgstr "Cirílico"
+
+#: ../src/common/fmapbase.cpp:207
+msgid "MacDevanagari"
+msgstr "Devanagari"
+
+#: ../src/common/fmapbase.cpp:231
+msgid "MacDingbats"
+msgstr "Dingbats"
+
+#: ../src/common/fmapbase.cpp:226
+msgid "MacEthiopic"
+msgstr "Etíope"
+
+#: ../src/common/fmapbase.cpp:229
+msgid "MacExtArabic"
+msgstr "Árabe"
+
+#: ../src/common/fmapbase.cpp:237
+msgid "MacGaelic"
+msgstr "Galês"
+
+#: ../src/common/fmapbase.cpp:221
+msgid "MacGeorgian"
+msgstr "Georgiano"
+
+#: ../src/common/fmapbase.cpp:205
+msgid "MacGreek"
+msgstr "Grego"
+
+#: ../src/common/fmapbase.cpp:209
+msgid "MacGujarati"
+msgstr "Guzerate"
+
+#: ../src/common/fmapbase.cpp:208
+msgid "MacGurmukhi"
+msgstr "Gurmukhi"
+
+#: ../src/common/fmapbase.cpp:204
+msgid "MacHebrew"
+msgstr "Hebreu"
+
+#: ../src/common/fmapbase.cpp:234
+msgid "MacIcelandic"
+msgstr "Islandês"
+
+#: ../src/common/fmapbase.cpp:200
+msgid "MacJapanese"
+msgstr "Japonês"
+
+#: ../src/common/fmapbase.cpp:214
+msgid "MacKannada"
+msgstr "Kannada"
+
+#: ../src/common/fmapbase.cpp:238
+msgid "MacKeyboardGlyphs"
+msgstr "Glifos do Teclado"
+
+#: ../src/common/fmapbase.cpp:218
+msgid "MacKhmer"
+msgstr "Khmer"
+
+#: ../src/common/fmapbase.cpp:202
+msgid "MacKorean"
+msgstr "Coreano"
+
+#: ../src/common/fmapbase.cpp:220
+msgid "MacLaotian"
+msgstr "Lao"
+
+#: ../src/common/fmapbase.cpp:215
+msgid "MacMalayalam"
+msgstr "Malaio"
+
+#: ../src/common/fmapbase.cpp:225
+msgid "MacMongolian"
+msgstr "Mongol"
+
+#: ../src/common/fmapbase.cpp:210
+msgid "MacOriya"
+msgstr "Oriá"
+
+#: ../src/common/fmapbase.cpp:199
+msgid "MacRoman"
+msgstr "Romano"
+
+#: ../src/common/fmapbase.cpp:235
+msgid "MacRomanian"
+msgstr "Romeno"
+
+#: ../src/common/fmapbase.cpp:216
+msgid "MacSinhalese"
+msgstr "Cingalês"
+
+#: ../src/common/fmapbase.cpp:230
+msgid "MacSymbol"
+msgstr "Símbolo"
+
+#: ../src/common/fmapbase.cpp:212
+msgid "MacTamil"
+msgstr "Tâmil"
+
+#: ../src/common/fmapbase.cpp:213
+msgid "MacTelugu"
+msgstr "Telugu"
+
+#: ../src/common/fmapbase.cpp:219
+msgid "MacThai"
+msgstr "Tailandês"
+
+#: ../src/common/fmapbase.cpp:224
+msgid "MacTibetan"
+msgstr "Tibetano"
+
+#: ../src/common/fmapbase.cpp:232
+msgid "MacTurkish"
+msgstr "Turco"
+
+#: ../src/common/fmapbase.cpp:228
+msgid "MacVietnamese"
+msgstr "Vietnamita"
+
+#: ../src/propgrid/advprops.cpp:2031
+msgid "Make a selection:"
+msgstr "Fazer uma seleção:"
+
+#: ../src/richtext/richtextformatdlg.cpp:362
+#: ../src/richtext/richtextmarginspage.cpp:172
+msgid "Margins"
+msgstr "Margens"
+
+#: ../src/generic/fdrepdlg.cpp:147
+msgid "Match case"
+msgstr "Combinar com maiúsculas ou minúsculas"
+
+#: ../src/richtext/richtextsizepage.cpp:463
+msgid "Max height:"
+msgstr "Altura máx:"
+
+#: ../src/richtext/richtextsizepage.cpp:436
+msgid "Max width:"
+msgstr "Largura máx:"
+
+#: ../src/unix/mediactrl.cpp:1006
+#, c-format
+msgid "Media playback error: %s"
+msgstr "Erro do playback da mídia: %s"
+
+#: ../src/common/fs_mem.cpp:175
+#, c-format
+msgid "Memory VFS already contains file '%s'!"
+msgstr "A memória VFS já contém o arquivo '%s'!"
+
+#: ../src/msw/frame.cpp:347
+msgid "Menu"
+msgstr "Menu"
+
+#: ../src/common/msgout.cpp:124
+msgid "Message"
+msgstr "Mensagem"
+
+#: ../src/univ/themes/metal.cpp:168
+msgid "Metal theme"
+msgstr "Tema Metal"
+
+#: ../src/msw/ole/automtn.cpp:641
+msgid "Method or property not found."
+msgstr "Método ou propriedade não achado."
+
+#: ../src/univ/themes/win32.cpp:3752
+msgid "Mi&nimize"
+msgstr "Mi&nimizar"
+
+#: ../src/richtext/richtextsizepage.cpp:409
+msgid "Min height:"
+msgstr "Altura mín:"
+
+#: ../src/richtext/richtextsizepage.cpp:382
+msgid "Min width:"
+msgstr "Largura mín:"
+
+#: ../src/msw/ole/automtn.cpp:657
+msgid "Missing a required parameter."
+msgstr "Um parâmetro requerido está desaparecido."
+
+#: ../src/generic/fontdlgg.cpp:324
+msgid "Modern"
+msgstr "Moderno"
+
+#: ../src/generic/filectrlg.cpp:462
+msgid "Modified"
+msgstr "Modificado"
+
+#: ../src/common/module.cpp:133
+#, c-format
+msgid "Module \"%s\" initialization failed"
+msgstr "A inicialização do módulo \"%s\" falhou"
+
+#: ../src/common/paper.cpp:132
+msgid "Monarch Envelope, 3 7/8 x 7 1/2 in"
+msgstr "Envelope Monarca, 3 7/8 x 7 1/2 em"
+
+#: ../src/msw/fswatcher.cpp:143
+msgid "Monitoring individual files for changes is not supported currently."
+msgstr ""
+"O monitoramento de arquivos individuais por mudanças não é suportado "
+"atualmente."
+
+#: ../src/generic/editlbox.cpp:276
+msgid "Move down"
+msgstr "Mover para baixo"
+
+#: ../src/generic/editlbox.cpp:275
+msgid "Move up"
+msgstr "Mover para cima"
+
+#: ../src/richtext/richtextsizepage.cpp:682
+#: ../src/richtext/richtextsizepage.cpp:684
+msgid "Moves the object to the next paragraph."
+msgstr "Move o objeto para o próximo parágrafo."
+
+#: ../src/richtext/richtextsizepage.cpp:676
+#: ../src/richtext/richtextsizepage.cpp:678
+msgid "Moves the object to the previous paragraph."
+msgstr "Move o objeto para o parágrafo anterior."
+
+#: ../src/richtext/richtextbuffer.cpp:9345
+msgid "Multiple Cell Properties"
+msgstr "Propriedades Múltiplas das Células"
+
+#: ../src/common/accelcmn.cpp:81
+msgid "NUM_LOCK"
+msgstr "NUM_LOCK"
+
+#: ../src/generic/filectrlg.cpp:459
+msgid "Name"
+msgstr "Nome"
+
+#: ../src/common/stockitem.cpp:175
+msgid "Network"
+msgstr "Rede"
+
+#: ../src/common/stockitem.cpp:176
+msgid "New"
+msgstr "Novo"
+
+#: ../src/richtext/richtextstyledlg.cpp:243
+msgid "New &Box Style..."
+msgstr "Novo &Estilo da Caixa..."
+
+#: ../src/richtext/richtextstyledlg.cpp:225
+msgid "New &Character Style..."
+msgstr "Novo &Estilo de Caractere..."
+
+#: ../src/richtext/richtextstyledlg.cpp:237
+msgid "New &List Style..."
+msgstr "Novo &Estilo de Lista..."
+
+#: ../src/richtext/richtextstyledlg.cpp:231
+msgid "New &Paragraph Style..."
+msgstr "Novo &Estilo de Parágrafo..."
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:651
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:817
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:890
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:931
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "New Style"
+msgstr "Novo Estilo"
+
+#: ../src/generic/dirdlgg.cpp:102
+msgid "New directory"
+msgstr "Novo diretório"
+
+#: ../src/generic/editlbox.cpp:273
+msgid "New item"
+msgstr "Novo item"
+
+#: ../src/generic/dirdlgg.cpp:326 ../src/generic/dirdlgg.cpp:336
+#: ../src/generic/filectrlg.cpp:653 ../src/generic/filectrlg.cpp:662
+msgid "NewName"
+msgstr "NovoNome"
+
+#: ../src/generic/tipdlg.cpp:305
+msgid "Next"
+msgstr "&Próximo"
+
+#: ../src/common/prntbase.cpp:1537 ../src/html/helpwnd.cpp:678
+msgid "Next page"
+msgstr "Próxima página"
+
+#: ../include/wx/msgdlg.h:272 ../src/common/stockitem.cpp:177
+#: ../src/motif/msgdlg.cpp:196
+msgid "No"
+msgstr "Não"
+
+#: ../src/generic/animateg.cpp:150
+#, c-format
+msgid "No animation handler for type %ld defined."
+msgstr "Nenhum manejador de animação para o tipo %ld definido."
+
+#: ../src/dfb/bitmap.cpp:642 ../src/dfb/bitmap.cpp:676
+#, c-format
+msgid "No bitmap handler for type %d defined."
+msgstr "Nenhum manejador de bitmap para o tipo %d definido."
+
+#: ../src/osx/carbon/dataview.cpp:1784
+msgid "No column existing."
+msgstr "Nenhuma coluna existente."
+
+#: ../src/osx/carbon/dataview.cpp:1674
+msgid "No column for the specified column existing."
+msgstr "Nenhuma coluna para a coluna especificada existente."
+
+#: ../src/osx/carbon/dataview.cpp:1423
+msgid "No column for the specified column position existing."
+msgstr "Nenhuma coluna para a posição da coluna especificada existente."
+
+#: ../src/common/utilscmn.cpp:1049
+msgid "No default application configured for HTML files."
+msgstr "Nenhum aplicativo padrão configurado para os arquivos HTML."
+
+#: ../src/generic/helpext.cpp:449
+msgid "No entries found."
+msgstr "Não foram achadas entradas."
+
+#: ../src/common/fontmap.cpp:421
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found,\n"
+"but an alternative encoding '%s' is available.\n"
+"Do you want to use this encoding (otherwise you will have to choose another "
+"one)?"
+msgstr ""
+"Nenhuma fonte para exibir o texto na codificação '%s' achada,\n"
+"mas uma codificação alternativa '%s' está disponível.\n"
+"Você quer usar esta codificação? (de outro modo você terá que escolher outra)"
+
+#: ../src/common/fontmap.cpp:426
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found.\n"
+"Would you like to select a font to be used for this encoding\n"
+"(otherwise the text in this encoding will not be shown correctly)?"
+msgstr ""
+"Nenhuma fonte para exibir o texto na codificação '%s' achada.\n"
+"Você gostaria de selecionar a fonte a ser usada para esta codificação?\n"
+"(de outro modo o texto nesta codificação não será mostrado corretamente)"
+
+#: ../src/generic/animateg.cpp:142
+msgid "No handler found for animation type."
+msgstr "Nenhum manejador achado para o tipo de animação."
+
+#: ../src/common/image.cpp:2591
+msgid "No handler found for image type."
+msgstr "Nenhum manejador achado para o tipo de imagem."
+
+#: ../src/common/image.cpp:2599 ../src/common/image.cpp:2710
+#: ../src/common/image.cpp:2763
+#, c-format
+msgid "No image handler for type %d defined."
+msgstr "Nenhum manejador de imagem para o tipo %d definido."
+
+#: ../src/common/image.cpp:2733 ../src/common/image.cpp:2777
+#, c-format
+msgid "No image handler for type %s defined."
+msgstr "Nenhum manipulador de imagem para o tipo %s definido."
+
+#: ../src/html/helpwnd.cpp:871
+msgid "No matching page found yet"
+msgstr "Nenhuma página que combine achada"
+
+#: ../src/osx/carbon/dataview.cpp:1676 ../src/osx/carbon/dataview.cpp:1786
+msgid "No renderer or invalid renderer type specified for custom data column."
+msgstr ""
+"Nenhum renderizador ou tipo de renderizador inválido especificado para a "
+"coluna de dados personalizada."
+
+#: ../src/osx/carbon/dataview.cpp:1424
+msgid "No renderer specified for column."
+msgstr "Nenhum renderizador especificado para a coluna."
+
+#: ../src/unix/sound.cpp:81
+msgid "No sound"
+msgstr "Sem som"
+
+#: ../src/common/image.cpp:2166 ../src/common/image.cpp:2207
+msgid "No unused colour in image being masked."
+msgstr "Sem cores não usadas na imagem sendo mascarada."
+
+#: ../src/common/image.cpp:3236
+msgid "No unused colour in image."
+msgstr "Sem cor não usada na imagem."
+
+#: ../src/generic/helpext.cpp:306
+#, c-format
+msgid "No valid mappings found in the file \"%s\"."
+msgstr "Nenhum mapeamento válido achado no arquivo \"%s\"."
+
+#: ../src/richtext/richtextborderspage.cpp:542
+#: ../src/richtext/richtextsizepage.cpp:248
+#: ../src/richtext/richtextsizepage.cpp:252
+msgid "None"
+msgstr "Nenhum"
+
+#: ../src/common/fmapbase.cpp:157
+msgid "Nordic (ISO-8859-10)"
+msgstr "Nórdico (ISO-8859-10)"
+
+#: ../src/generic/fontdlgg.cpp:328 ../src/generic/fontdlgg.cpp:331
+msgid "Normal"
+msgstr "Normal"
+
+#: ../src/html/helpwnd.cpp:1276
+msgid "Normal face<br>and <u>underlined</u>. "
+msgstr "Face normal<br>e <u>sublinhado</u>. "
+
+#: ../src/html/helpwnd.cpp:1218
+msgid "Normal font:"
+msgstr "Fonte normal:"
+
+#: ../src/propgrid/props.cpp:887
+#, c-format
+msgid "Not %s"
+msgstr "Não %s"
+
+#: ../include/wx/filename.h:586 ../include/wx/filename.h:591
+msgid "Not available"
+msgstr "Não disponível"
+
+#: ../src/richtext/richtextfontpage.cpp:340
+msgid "Not underlined"
+msgstr "Não sublinhado"
+
+#: ../src/common/paper.cpp:116
+msgid "Note, 8 1/2 x 11 in"
+msgstr "Nota, 8 1/2 x 11 em"
+
+#: ../src/generic/notifmsgg.cpp:104
+msgid "Notice"
+msgstr "Nota"
+
+#: ../src/osx/carbon/dataview.cpp:902
+msgid "Number of columns could not be determined."
+msgstr "O número de colunas não pôde ser determinado."
+
+#: ../src/richtext/richtextliststylepage.cpp:487
+#: ../src/richtext/richtextbulletspage.cpp:292
+msgid "Numbered outline"
+msgstr "Numerados no contorno"
+
+#: ../include/wx/msgdlg.h:273 ../src/richtext/richtextstyledlg.cpp:297
+#: ../src/common/stockitem.cpp:178 ../src/msw/msgdlg.cpp:489
+#: ../src/msw/msgdlg.cpp:799 ../src/msw/dialog.cpp:120
+#: ../src/gtk1/fontdlg.cpp:138
+msgid "OK"
+msgstr "OK"
+
+#: ../src/msw/ole/automtn.cpp:681
+#, c-format
+msgid "OLE Automation error in %s: %s"
+msgstr "Erro de automação OLE em %s: %s"
+
+#: ../include/wx/richtext/richtextimagedlg.h:39
+msgid "Object Properties"
+msgstr "Propriedades do Objeto"
+
+#: ../src/msw/ole/automtn.cpp:649
+msgid "Object implementation does not support named arguments."
+msgstr "A implementação do objeto não suporta argumentos nomeados."
+
+#: ../src/common/xtixml.cpp:264
+msgid "Objects must have an id attribute"
+msgstr "Os objetos devem ter um atributo id"
+
+#: ../src/common/docview.cpp:1755 ../src/common/docview.cpp:1797
+msgid "Open File"
+msgstr "Abrir Arquivo"
+
+#: ../src/html/helpwnd.cpp:684 ../src/html/helpwnd.cpp:1557
+msgid "Open HTML document"
+msgstr "Abrir documento HTML"
+
+#: ../src/generic/dbgrptg.cpp:163
+#, c-format
+msgid "Open file \"%s\""
+msgstr "Abrir arquivo \"%s\""
+
+#: ../src/common/stockitem.cpp:179
+msgid "Open..."
+msgstr "Abrir..."
+
+#: ../src/osx/carbon/glcanvas.cpp:48
+#, c-format
+msgid "OpenGL function \"%s\" failed: %s (error %d)"
+msgstr "A função OpenGL \"%s\" falhou: %s (erro %d)"
+
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:821
+msgid "Operation not permitted."
+msgstr "Operação não permitida."
+
+#: ../src/common/cmdline.cpp:735
+#, c-format
+msgid "Option '%s' can't be negated"
+msgstr "A opção '%s' não pode ser negada"
+
+#: ../src/common/cmdline.cpp:899
+#, c-format
+msgid "Option '%s' requires a value."
+msgstr "A opção '%s' requer um valor."
+
+#: ../src/common/cmdline.cpp:982
+#, c-format
+msgid "Option '%s': '%s' cannot be converted to a date."
+msgstr "A opção '%s': '%s' não pode ser convertida para uma data."
+
+#: ../src/generic/dirdlgg.cpp:187 ../src/generic/prntdlgg.cpp:618
+msgid "Options"
+msgstr "Opções"
+
+#: ../src/generic/prntdlgg.cpp:615 ../src/generic/prntdlgg.cpp:869
+msgid "Orientation"
+msgstr "Orientação"
+
+#: ../src/common/windowid.cpp:259
+msgid "Out of window IDs.  Recommend shutting down application."
+msgstr "IDs fora da janela. Recomendar o fechamento do aplicativo."
+
+#: ../src/richtext/richtextborderspage.cpp:400
+#: ../src/richtext/richtextborderspage.cpp:533
+msgid "Outline"
+msgstr "Contorno"
+
+#: ../src/richtext/richtextborderspage.cpp:550
+msgid "Outset"
+msgstr "Começo"
+
+#: ../src/msw/ole/automtn.cpp:645
+msgid "Overflow while coercing argument values."
+msgstr "Sobrecarga enquanto força os valores do argumento."
+
+#: ../src/common/accelcmn.cpp:84
+msgid "PAGEDOWN"
+msgstr "PAGEDOWN"
+
+#: ../src/common/accelcmn.cpp:83
+msgid "PAGEUP"
+msgstr "PAGEUP"
+
+#: ../src/common/accelcmn.cpp:69
+msgid "PAUSE"
+msgstr "PAUSE"
+
+#: ../src/common/imagpcx.cpp:457 ../src/common/imagpcx.cpp:480
+msgid "PCX: couldn't allocate memory"
+msgstr "PCX: não pôde distribuir a memória"
+
+#: ../src/common/imagpcx.cpp:456
+msgid "PCX: image format unsupported"
+msgstr "PCX: formato da imagem não suportado"
+
+#: ../src/common/imagpcx.cpp:479
+msgid "PCX: invalid image"
+msgstr "PCX: imagem inválida"
+
+#: ../src/common/imagpcx.cpp:442
+msgid "PCX: this is not a PCX file."
+msgstr "PCX: este não é um arquivo PCX."
+
+#: ../src/common/imagpcx.cpp:459 ../src/common/imagpcx.cpp:481
+msgid "PCX: unknown error !!!"
+msgstr "PCX: erro desconhecido !!!"
+
+#: ../src/common/imagpcx.cpp:458
+msgid "PCX: version number too low"
+msgstr "PCX: número de versão muito baixo"
+
+#: ../src/common/accelcmn.cpp:55
+msgid "PGDN"
+msgstr "PGDN"
+
+#: ../src/common/accelcmn.cpp:54
+msgid "PGUP"
+msgstr "PGUP"
+
+#: ../src/common/imagpnm.cpp:91
+msgid "PNM: Couldn't allocate memory."
+msgstr "PNM: Não pôde distribuir a memória."
+
+#: ../src/common/imagpnm.cpp:73
+msgid "PNM: File format is not recognized."
+msgstr "PNM: O formato do arquivo não é reconhecido."
+
+#: ../src/common/imagpnm.cpp:112 ../src/common/imagpnm.cpp:134
+#: ../src/common/imagpnm.cpp:156
+msgid "PNM: File seems truncated."
+msgstr "PNM: O arquivo parece truncado."
+
+#: ../src/common/paper.cpp:188
+msgid "PRC 16K 146 x 215 mm"
+msgstr "PRC 16K 146 x 215 mm"
+
+#: ../src/common/paper.cpp:201
+msgid "PRC 16K Rotated"
+msgstr "PRC 16K Rotacionado"
+
+#: ../src/common/paper.cpp:189
+msgid "PRC 32K 97 x 151 mm"
+msgstr "PRC 32K 97 x 151 mm"
+
+#: ../src/common/paper.cpp:202
+msgid "PRC 32K Rotated"
+msgstr "PRC 32K Rotacionado"
+
+#: ../src/common/paper.cpp:190
+msgid "PRC 32K(Big) 97 x 151 mm"
+msgstr "PRC 32K (Grande) 97 x 151 mm"
+
+#: ../src/common/paper.cpp:203
+msgid "PRC 32K(Big) Rotated"
+msgstr "PRC 32K (Grande) Rotacionado"
+
+#: ../src/common/paper.cpp:191
+msgid "PRC Envelope #1 102 x 165 mm"
+msgstr "Envelope PRC #1 102 x 165 mm"
+
+#: ../src/common/paper.cpp:204
+msgid "PRC Envelope #1 Rotated 165 x 102 mm"
+msgstr "Envelope PRC #1 Rotacionado 165 x 102 mm"
+
+#: ../src/common/paper.cpp:200
+msgid "PRC Envelope #10 324 x 458 mm"
+msgstr "Envelope PRC #10 324 x 458 mm"
+
+#: ../src/common/paper.cpp:213
+msgid "PRC Envelope #10 Rotated 458 x 324 mm"
+msgstr "Envelope PRC #10 Rotacionado 458 x 324 mm"
+
+#: ../src/common/paper.cpp:192
+msgid "PRC Envelope #2 102 x 176 mm"
+msgstr "Envelope PRC #2 102 x 176 mm"
+
+#: ../src/common/paper.cpp:205
+msgid "PRC Envelope #2 Rotated 176 x 102 mm"
+msgstr "Envelope PRC #2 Rotacionado 176 x 102 mm"
+
+#: ../src/common/paper.cpp:193
+msgid "PRC Envelope #3 125 x 176 mm"
+msgstr "Envelope PRC #3 125 x 176 mm"
+
+#: ../src/common/paper.cpp:206
+msgid "PRC Envelope #3 Rotated 176 x 125 mm"
+msgstr "Envelope B6 #3 Rotacionado 176 x 125 mm"
+
+#: ../src/common/paper.cpp:194
+msgid "PRC Envelope #4 110 x 208 mm"
+msgstr "Envelope PRC #4 110 x 208 mm"
+
+#: ../src/common/paper.cpp:207
+msgid "PRC Envelope #4 Rotated 208 x 110 mm"
+msgstr "Envelope PRC #4 Rotacionado 208 x 110 mm"
+
+#: ../src/common/paper.cpp:195
+msgid "PRC Envelope #5 110 x 220 mm"
+msgstr "Envelope PRC #5 110 x 220 mm"
+
+#: ../src/common/paper.cpp:208
+msgid "PRC Envelope #5 Rotated 220 x 110 mm"
+msgstr "Envelope PRC #5 Rotacionado 220 x 110 mm"
+
+#: ../src/common/paper.cpp:196
+msgid "PRC Envelope #6 120 x 230 mm"
+msgstr "Envelope PRC #6 120 x 230 mm"
+
+#: ../src/common/paper.cpp:209
+msgid "PRC Envelope #6 Rotated 230 x 120 mm"
+msgstr "Envelope PRC #6 Rotacionado 230 x 120 mm"
+
+#: ../src/common/paper.cpp:197
+msgid "PRC Envelope #7 160 x 230 mm"
+msgstr "Envelope PRC #7 160 x 230 mm"
+
+#: ../src/common/paper.cpp:210
+msgid "PRC Envelope #7 Rotated 230 x 160 mm"
+msgstr "Envelope PRC #7 Rotacionado 230 x 160 mm"
+
+#: ../src/common/paper.cpp:198
+msgid "PRC Envelope #8 120 x 309 mm"
+msgstr "Envelope PRC #8 120 x 309 mm"
+
+#: ../src/common/paper.cpp:211
+msgid "PRC Envelope #8 Rotated 309 x 120 mm"
+msgstr "Envelope PRC #8 Rotacionado 309 x 120 mm"
+
+#: ../src/common/paper.cpp:199
+msgid "PRC Envelope #9 229 x 324 mm"
+msgstr "Envelope PRC #9 229 x 324 mm"
+
+#: ../src/common/paper.cpp:212
+msgid "PRC Envelope #9 Rotated 324 x 229 mm"
+msgstr "Envelope PRC #9 Rotacionado 324 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:72
+msgid "PRINT"
+msgstr "PRINT"
+
+#: ../src/richtext/richtextmarginspage.cpp:286
+msgid "Padding"
+msgstr "Enchimento"
+
+#: ../src/common/prntbase.cpp:2044
+#, c-format
+msgid "Page %d"
+msgstr "Página %d"
+
+#: ../src/common/prntbase.cpp:2042
+#, c-format
+msgid "Page %d of %d"
+msgstr "Página %d de %d"
+
+#: ../src/gtk/print.cpp:774
+msgid "Page Setup"
+msgstr "Configuração da Página"
+
+#: ../src/generic/prntdlgg.cpp:828 ../src/common/prntbase.cpp:467
+msgid "Page setup"
+msgstr "Configuração da página"
+
+#: ../src/generic/prntdlgg.cpp:216
+msgid "Pages"
+msgstr "Páginas"
+
+#: ../src/generic/prntdlgg.cpp:602 ../src/generic/prntdlgg.cpp:801
+#: ../src/generic/prntdlgg.cpp:842 ../src/generic/prntdlgg.cpp:855
+#: ../src/generic/prntdlgg.cpp:1052 ../src/generic/prntdlgg.cpp:1057
+msgid "Paper size"
+msgstr "Tamanho do papel"
+
+#: ../src/richtext/richtextstyles.cpp:1058
+msgid "Paragraph styles"
+msgstr "Estilos de parágrafo"
+
+#: ../src/common/xtistrm.cpp:469
+msgid "Passing a already registered object to SetObject"
+msgstr "Passando um objeto já registrado para o SetObject"
+
+#: ../src/common/xtistrm.cpp:480
+msgid "Passing an unknown object to GetObject"
+msgstr "Passando um objeto desconhecido pro GetObject"
+
+#: ../src/richtext/richtextctrl.cpp:3117 ../src/common/stockitem.cpp:180
+#: ../src/stc/stc_i18n.cpp:19
+msgid "Paste"
+msgstr "Colar"
+
+#: ../src/common/stockitem.cpp:262
+msgid "Paste selection"
+msgstr "Colar a seleção"
+
+#: ../src/richtext/richtextliststylepage.cpp:222
+#: ../src/richtext/richtextbulletspage.cpp:172
+msgid "Peri&od"
+msgstr "Pont&o"
+
+#: ../src/generic/filectrlg.cpp:465
+msgid "Permissions"
+msgstr "Permissões"
+
+#: ../src/richtext/richtextbuffer.cpp:11942
+msgid "Picture Properties"
+msgstr "Propriedades da Foto"
+
+#: ../include/wx/unix/pipe.h:47
+msgid "Pipe creation failed"
+msgstr "A criação do pipe falhou"
+
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Please choose a valid font."
+msgstr "Por favor escolha uma fonte válida."
+
+#: ../src/gtk/filedlg.cpp:72
+msgid "Please choose an existing file."
+msgstr "Por favor escolha um arquivo existente."
+
+#: ../src/html/helpwnd.cpp:813
+msgid "Please choose the page to display:"
+msgstr "Por favor escolha a página a exibir:"
+
+#: ../src/msw/dialup.cpp:785
+msgid "Please choose which ISP do you want to connect to"
+msgstr "Por favor escolha a qual ISP vocé quer se conectar"
+
+#: ../src/msw/listctrl.cpp:372
+#, c-format
+msgid ""
+"Please install a newer version of comctl32.dll\n"
+"(at least version 4.70 is required but you have %d.%02d)\n"
+"or this program won't operate correctly."
+msgstr ""
+"Por favor instale uma versão mais nova do comctl32.dll\n"
+"(no mínimo a versão 4.70 é requerida mas você tem %d.%02d)\n"
+"ou este programa não operará corretamente."
+
+#: ../src/common/headerctrlcmn.cpp:59
+msgid "Please select the columns to show and define their order:"
+msgstr "Por favor selecione as colunas a mostrar e defina a ordem delas:"
+
+#: ../src/common/prntbase.cpp:521
+msgid "Please wait while printing..."
+msgstr "Por favor espere enquanto imprime..."
+
+#: ../src/propgrid/advprops.cpp:631
+msgid "Point Size"
+msgstr "Tamanho do Ponto"
+
+#: ../src/osx/carbon/dataview.cpp:1278 ../src/osx/carbon/dataview.cpp:1329
+#: ../src/osx/carbon/dataview.cpp:1420 ../src/osx/carbon/dataview.cpp:1443
+#: ../src/osx/carbon/dataview.cpp:1460 ../src/osx/carbon/dataview.cpp:1477
+#: ../src/osx/carbon/dataview.cpp:1670 ../src/osx/carbon/dataview.cpp:1779
+#: ../src/osx/carbon/dataview.cpp:1821 ../src/osx/carbon/dataview.cpp:1874
+#: ../src/osx/carbon/dataview.cpp:1997
+msgid "Pointer to data view control not set correctly."
+msgstr ""
+"Ponteiro para o controle da visualização de dados não definidos corretamente."
+
+#: ../src/osx/carbon/dataview.cpp:1279 ../src/osx/carbon/dataview.cpp:1338
+#: ../src/osx/carbon/dataview.cpp:1421 ../src/osx/carbon/dataview.cpp:1478
+#: ../src/osx/carbon/dataview.cpp:1671 ../src/osx/carbon/dataview.cpp:1780
+#: ../src/osx/carbon/dataview.cpp:1822 ../src/osx/carbon/dataview.cpp:1875
+#: ../src/osx/carbon/dataview.cpp:1998
+msgid "Pointer to model not set correctly."
+msgstr "Ponteiro para o modelo não definido corretamente."
+
+#: ../src/generic/prntdlgg.cpp:612 ../src/generic/prntdlgg.cpp:867
+msgid "Portrait"
+msgstr "Retrato"
+
+#: ../src/richtext/richtextsizepage.cpp:496
+msgid "Position"
+msgstr "Posição"
+
+#: ../src/generic/prntdlgg.cpp:298
+msgid "PostScript file"
+msgstr "Arquivo PostScript"
+
+#: ../src/common/stockitem.cpp:181
+msgid "Preferences"
+msgstr "Preferências"
+
+#: ../src/osx/menu_osx.cpp:643
+msgid "Preferences..."
+msgstr "Preferências..."
+
+#: ../src/common/prntbase.cpp:529
+msgid "Preparing"
+msgstr "Preparando"
+
+#: ../src/generic/fontdlgg.cpp:455 ../src/osx/carbon/fontdlg.cpp:576
+#: ../src/html/helpwnd.cpp:1235
+msgid "Preview:"
+msgstr "Pré-visualização:"
+
+#: ../src/common/prntbase.cpp:1523 ../src/html/helpwnd.cpp:677
+msgid "Previous page"
+msgstr "Página anterior"
+
+#: ../src/generic/prntdlgg.cpp:143 ../src/generic/prntdlgg.cpp:157
+#: ../src/common/prntbase.cpp:409 ../src/common/prntbase.cpp:1511
+#: ../src/gtk/print.cpp:584 ../src/gtk/print.cpp:597
+msgid "Print"
+msgstr "Imprimir"
+
+#: ../include/wx/prntbase.h:395 ../src/common/docview.cpp:1250
+msgid "Print Preview"
+msgstr "Pré-visualização de Impressão"
+
+#: ../src/common/prntbase.cpp:1985 ../src/common/prntbase.cpp:2027
+#: ../src/common/prntbase.cpp:2035
+msgid "Print Preview Failure"
+msgstr "Falha ao Pré-visualizar a Impressãoo"
+
+#: ../src/generic/prntdlgg.cpp:224
+msgid "Print Range"
+msgstr "Alcance da Impressão"
+
+#: ../src/generic/prntdlgg.cpp:449
+msgid "Print Setup"
+msgstr "Configuraçãoo da Impressão"
+
+#: ../src/generic/prntdlgg.cpp:621
+msgid "Print in colour"
+msgstr "Imprimir em cores"
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print previe&w..."
+msgstr "Pré-visualizar impressã&o..."
+
+#: ../src/common/docview.cpp:1244
+msgid "Print preview creation failed."
+msgstr "A criação da pré-visualização da impressão falhou."
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print preview..."
+msgstr "Pré-visualização da impressão..."
+
+#: ../src/generic/prntdlgg.cpp:630
+msgid "Print spooling"
+msgstr "Spooling de impressão"
+
+#: ../src/html/helpwnd.cpp:688
+msgid "Print this page"
+msgstr "Imprimir esta página"
+
+#: ../src/generic/prntdlgg.cpp:185
+msgid "Print to File"
+msgstr "Imprimir para o Arquivo"
+
+#: ../src/common/stockitem.cpp:183
+msgid "Print..."
+msgstr "Imprimir..."
+
+#: ../src/generic/prntdlgg.cpp:493
+msgid "Printer"
+msgstr "Impressora"
+
+#: ../src/generic/prntdlgg.cpp:633
+msgid "Printer command:"
+msgstr "Comando da impressora:"
+
+#: ../src/generic/prntdlgg.cpp:180
+msgid "Printer options"
+msgstr "Opções da impressora"
+
+#: ../src/generic/prntdlgg.cpp:645
+msgid "Printer options:"
+msgstr "Opções da impressora:"
+
+#: ../src/generic/prntdlgg.cpp:916
+msgid "Printer..."
+msgstr "Impressora..."
+
+#: ../src/generic/prntdlgg.cpp:196
+msgid "Printer:"
+msgstr "Impressora:"
+
+#: ../include/wx/richtext/richtextprint.h:163 ../src/common/prntbase.cpp:518
+#: ../src/html/htmprint.cpp:277
+msgid "Printing"
+msgstr "Imprimindo"
+
+#: ../src/common/prntbase.cpp:586
+msgid "Printing "
+msgstr "Imprimindo "
+
+#: ../src/common/prntbase.cpp:330
+msgid "Printing Error"
+msgstr "Erro ao imprimir"
+
+#: ../src/common/prntbase.cpp:544
+#, c-format
+msgid "Printing page %d of %d"
+msgstr "Imprimindo a página %d de %d"
+
+#: ../src/generic/printps.cpp:201
+#, c-format
+msgid "Printing page %d..."
+msgstr "Imprimindo a página %d..."
+
+#: ../src/generic/printps.cpp:161
+msgid "Printing..."
+msgstr "Imprimindo..."
+
+#: ../include/wx/richtext/richtextprint.h:109 ../include/wx/prntbase.h:263
+#: ../src/common/docview.cpp:2124
+msgid "Printout"
+msgstr "Imprimir"
+
+#: ../src/common/debugrpt.cpp:565
+#, c-format
+msgid ""
+"Processing debug report has failed, leaving the files in \"%s\" directory."
+msgstr ""
+"O processamento do relatório do debug falhou, deixando os arquivos no "
+"diretório \"%s\"."
+
+#: ../src/osx/carbon/dataview.cpp:2472
+msgid "Progress renderer cannot render value type; value type: "
+msgstr ""
+"O renderizador do progresso não pode renderizar o tipo de valor; tipo de "
+"valor:"
+
+#: ../src/common/prntbase.cpp:528
+msgid "Progress:"
+msgstr "Progresso:"
+
+#: ../src/common/stockitem.cpp:184
+msgid "Properties"
+msgstr "Propriedades"
+
+#: ../src/propgrid/manager.cpp:237
+msgid "Property"
+msgstr "Propriedade"
+
+#: ../src/propgrid/propgrid.cpp:3144 ../src/propgrid/propgrid.cpp:3276
+msgid "Property Error"
+msgstr "Erro da Propriedade"
+
+#: ../src/common/paper.cpp:113
+msgid "Quarto, 215 x 275 mm"
+msgstr "Quarto, 215 x 275 mm"
+
+#: ../src/generic/logg.cpp:1036
+msgid "Question"
+msgstr "Pergunta"
+
+#: ../src/common/stockitem.cpp:156
+msgid "Quit"
+msgstr "Sair"
+
+#: ../src/osx/menu_osx.cpp:610 ../src/osx/menu_osx.cpp:657
+#, c-format
+msgid "Quit %s"
+msgstr "Sair %s"
+
+#: ../src/common/stockitem.cpp:263
+msgid "Quit this program"
+msgstr "Sair deste programa"
+
+#: ../src/common/accelcmn.cpp:53
+msgid "RETURN"
+msgstr "RETURN"
+
+#: ../src/common/accelcmn.cpp:57
+msgid "RIGHT"
+msgstr "RIGHT"
+
+#: ../src/common/accelcmn.cpp:327
+msgid "RawCtrl+"
+msgstr "RawCtrl+"
+
+#: ../src/common/ffile.cpp:113 ../src/common/ffile.cpp:134
+#, c-format
+msgid "Read error on file '%s'"
+msgstr "Erro de leitura no arquivo '%s'"
+
+#: ../src/common/prntbase.cpp:257
+msgid "Ready"
+msgstr "Pronto"
+
+#: ../src/common/stockitem.cpp:185 ../src/stc/stc_i18n.cpp:16
+msgid "Redo"
+msgstr "Refazer"
+
+#: ../src/common/stockitem.cpp:264
+msgid "Redo last action"
+msgstr "Refazer a última ação"
+
+#: ../src/common/stockitem.cpp:186
+msgid "Refresh"
+msgstr "Atualizar"
+
+#: ../src/msw/registry.cpp:625
+#, c-format
+msgid "Registry key '%s' already exists."
+msgstr "A chave de registro '%s' já existe."
+
+#: ../src/msw/registry.cpp:594
+#, c-format
+msgid "Registry key '%s' does not exist, cannot rename it."
+msgstr "A chave de registro '%s' não existe; não pode renomeá-la."
+
+#: ../src/msw/registry.cpp:726
+#, c-format
+msgid ""
+"Registry key '%s' is needed for normal system operation,\n"
+"deleting it will leave your system in unusable state:\n"
+"operation aborted."
+msgstr ""
+"A chave de registro '%s' é necessária para a operação normal do sistema,\n"
+"apagando-a deixará seu sistema num estado inutilizável:\n"
+"operação abortada."
+
+#: ../src/msw/registry.cpp:520
+#, c-format
+msgid "Registry value '%s' already exists."
+msgstr "O valor do registro '%s' já existe."
+
+#: ../src/richtext/richtextfontpage.cpp:332
+#: ../src/richtext/richtextfontpage.cpp:336
+msgid "Regular"
+msgstr "Normal"
+
+#: ../src/richtext/richtextsizepage.cpp:519
+msgid "Relative"
+msgstr "Relativo"
+
+#: ../src/generic/helpext.cpp:462
+msgid "Relevant entries:"
+msgstr "Entradas relevantes:"
+
+#: ../include/wx/generic/progdlgg.h:86
+msgid "Remaining time:"
+msgstr "Tempo restante:"
+
+#: ../src/common/stockitem.cpp:187
+msgid "Remove"
+msgstr "Remover"
+
+#: ../src/richtext/richtextctrl.cpp:1430
+msgid "Remove Bullet"
+msgstr "Remover a Bala"
+
+#: ../src/html/helpwnd.cpp:440
+msgid "Remove current page from bookmarks"
+msgstr "Remover a página atual dos favoritos"
+
+#: ../src/common/rendcmn.cpp:194
+#, c-format
+msgid "Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."
+msgstr ""
+"O renderizador \"%s\" tem uma versão incompatível, %d.%d; e não pôde ser "
+"carregado."
+
+#: ../src/osx/carbon/dataview.cpp:1430
+msgid "Rendering failed."
+msgstr "A renderização falhou."
+
+#: ../src/richtext/richtextbuffer.cpp:4214
+msgid "Renumber List"
+msgstr "Re-numerar a Lista"
+
+#: ../src/common/stockitem.cpp:188
+msgid "Rep&lace"
+msgstr "Sub&stituir"
+
+#: ../src/richtext/richtextctrl.cpp:3277 ../src/common/stockitem.cpp:188
+msgid "Replace"
+msgstr "Substituir"
+
+#: ../src/generic/fdrepdlg.cpp:182
+msgid "Replace &all"
+msgstr "Substituir &tudo"
+
+#: ../src/common/stockitem.cpp:261
+msgid "Replace selection"
+msgstr "Substituir a seleção"
+
+#: ../src/generic/fdrepdlg.cpp:124
+msgid "Replace with:"
+msgstr "Substituir por:"
+
+#: ../src/common/valtext.cpp:161
+msgid "Required information entry is empty."
+msgstr "O espaço da informação requerida está vazio."
+
+#: ../src/common/translation.cpp:1966
+#, c-format
+msgid "Resource '%s' is not a valid message catalog."
+msgstr "O recurso '%s' não é um catálogo de mensagens válido."
+
+#: ../src/common/stockitem.cpp:189
+msgid "Revert to Saved"
+msgstr "Reverter ao Salvo"
+
+#: ../src/richtext/richtextborderspage.cpp:548
+msgid "Ridge"
+msgstr "Cordilheira"
+
+#: ../src/richtext/richtextliststylepage.cpp:251
+#: ../src/richtext/richtextbulletspage.cpp:201
+#: ../src/richtext/richtextsizepage.cpp:250
+msgid "Right"
+msgstr "Direita"
+
+#: ../src/generic/prntdlgg.cpp:892
+msgid "Right margin (mm):"
+msgstr "Margem direita (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:148
+#: ../src/richtext/richtextindentspage.cpp:150
+#: ../src/richtext/richtextliststylepage.cpp:337
+#: ../src/richtext/richtextliststylepage.cpp:339
+msgid "Right-align text."
+msgstr "Alinhar o texto a direita."
+
+#: ../src/generic/fontdlgg.cpp:322
+msgid "Roman"
+msgstr "Romano"
+
+#: ../src/richtext/richtextliststylepage.cpp:299
+#: ../src/richtext/richtextbulletspage.cpp:252
+msgid "S&tandard bullet name:"
+msgstr "N&ome do projétil padrão"
+
+#: ../src/common/accelcmn.cpp:82
+msgid "SCROLL_LOCK"
+msgstr "SCROLL_LOCK"
+
+#: ../src/common/accelcmn.cpp:71
+msgid "SELECT"
+msgstr "SELECT"
+
+#: ../src/common/accelcmn.cpp:77
+msgid "SEPARATOR"
+msgstr "SEPARATOR"
+
+#: ../src/common/accelcmn.cpp:74
+msgid "SNAPSHOT"
+msgstr "SNAPSHOT"
+
+#: ../src/common/accelcmn.cpp:62
+msgid "SPACE"
+msgstr "SPACE"
+
+#: ../src/common/accelcmn.cpp:257 ../src/common/accelcmn.cpp:339
+msgid "SPECIAL"
+msgstr "SPECIAL"
+
+#: ../src/common/accelcmn.cpp:78
+msgid "SUBTRACT"
+msgstr "SUBTRACT"
+
+#: ../src/common/stockitem.cpp:190 ../src/common/sizer.cpp:2678
+msgid "Save"
+msgstr "Salvar"
+
+#: ../src/common/fldlgcmn.cpp:327
+#, c-format
+msgid "Save %s file"
+msgstr "Salvar arquivo %s"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save &As..."
+msgstr "Salvar &Como..."
+
+#: ../src/common/docview.cpp:360
+msgid "Save As"
+msgstr "Salvar Como"
+
+#: ../src/common/stockitem.cpp:191
+msgid "Save as"
+msgstr "Salvar como"
+
+#: ../src/common/stockitem.cpp:267
+msgid "Save current document"
+msgstr "Salvar o documento atual"
+
+#: ../src/common/stockitem.cpp:268
+msgid "Save current document with a different filename"
+msgstr "Salvar o documento atual com um nome de arquivo diferente"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save log contents to file"
+msgstr "Salvar os conteúdos do log com arquivo"
+
+#: ../src/generic/fontdlgg.cpp:325
+msgid "Script"
+msgstr "Script"
+
+#: ../src/generic/srchctlg.cpp:67 ../src/html/helpwnd.cpp:548
+#: ../src/html/helpwnd.cpp:563
+msgid "Search"
+msgstr "Procurar"
+
+#: ../src/html/helpwnd.cpp:550
+msgid ""
+"Search contents of help book(s) for all occurrences of the text you typed "
+"above"
+msgstr ""
+"Pesquisar conteúdos do(s) livro(s) de ajuda para todas as ocorrências do "
+"texto que você digitou acima"
+
+#: ../src/generic/fdrepdlg.cpp:160
+msgid "Search direction"
+msgstr "Direção da busca"
+
+#: ../src/generic/fdrepdlg.cpp:112
+msgid "Search for:"
+msgstr "Procurar por:"
+
+#: ../src/html/helpwnd.cpp:1065
+msgid "Search in all books"
+msgstr "Procurar em todos os livros"
+
+#: ../src/html/helpwnd.cpp:870
+msgid "Searching..."
+msgstr "Procurando..."
+
+#: ../src/generic/dirctrlg.cpp:546
+msgid "Sections"
+msgstr "Seções"
+
+#: ../src/common/ffile.cpp:220
+#, c-format
+msgid "Seek error on file '%s'"
+msgstr "Erro de busca no arquivo '%s'"
+
+#: ../src/common/ffile.cpp:210
+#, c-format
+msgid "Seek error on file '%s' (large files not supported by stdio)"
+msgstr ""
+"Erro de busca no arquivo '%s' (arquivos grandes não suportados pela stdio)"
+
+#: ../src/richtext/richtextctrl.cpp:330 ../src/osx/textctrl_osx.cpp:587
+#: ../src/common/stockitem.cpp:192 ../src/msw/textctrl.cpp:2288
+msgid "Select &All"
+msgstr "Selecionar &Tudo"
+
+#: ../src/common/stockitem.cpp:192 ../src/stc/stc_i18n.cpp:21
+msgid "Select All"
+msgstr "Selecionar Tudo"
+
+#: ../src/common/docview.cpp:1877
+msgid "Select a document template"
+msgstr "Selecione um modelo de documento"
+
+#: ../src/common/docview.cpp:1951
+msgid "Select a document view"
+msgstr "Selecione uma visualização do documento"
+
+#: ../src/richtext/richtextfontpage.cpp:235
+#: ../src/richtext/richtextfontpage.cpp:237
+msgid "Select regular or bold."
+msgstr "Selecione regular ou negrito."
+
+#: ../src/richtext/richtextfontpage.cpp:222
+#: ../src/richtext/richtextfontpage.cpp:224
+msgid "Select regular or italic style."
+msgstr "Selecione o estilo regular ou itálico."
+
+#: ../src/richtext/richtextfontpage.cpp:248
+#: ../src/richtext/richtextfontpage.cpp:250
+msgid "Select underlining or no underlining."
+msgstr "Selecione sublinhado ou sem sublinhado."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Selection"
+msgstr "Seleção"
+
+#: ../src/richtext/richtextliststylepage.cpp:187
+#: ../src/richtext/richtextliststylepage.cpp:189
+msgid "Selects the list level to edit."
+msgstr "Seleciona o nível da lista para editar."
+
+#: ../src/common/cmdline.cpp:918
+#, c-format
+msgid "Separator expected after the option '%s'."
+msgstr "Separador esperado após a opção '%s'."
+
+#: ../src/richtext/richtextbuffer.cpp:10513
+msgid "Set Cell Style"
+msgstr "Definir o Estilo da Célula"
+
+#: ../include/wx/xtiprop.h:179
+msgid "SetProperty called w/o valid setter"
+msgstr "SetProperty chamada sem um \"setter\" v�lido"
+
+#: ../src/common/filename.cpp:2632
+msgid "Setting directory access times is not supported under this OS version"
+msgstr ""
+"Configurar os tempos de acesso do diretório não é suportado por esta versão "
+"do SO"
+
+#: ../src/generic/prntdlgg.cpp:188
+msgid "Setup..."
+msgstr "Configurar..."
+
+#: ../src/msw/dialup.cpp:563
+msgid "Several active dialup connections found, choosing one randomly."
+msgstr "Várias conexões dial-up ativas achadas, escolhendo uma aleatoriamente."
+
+#: ../src/common/accelcmn.cpp:324
+msgid "Shift+"
+msgstr "Shift+"
+
+#: ../src/generic/dirdlgg.cpp:170
+msgid "Show &hidden directories"
+msgstr "Mostrar &diretórios ocultos"
+
+#: ../src/generic/filectrlg.cpp:1003
+msgid "Show &hidden files"
+msgstr "Mostrar &arquivos ocultos"
+
+#: ../src/osx/menu_osx.cpp:605 ../src/osx/menu_osx.cpp:652
+msgid "Show All"
+msgstr "Mostrar Tudo"
+
+#: ../src/common/stockitem.cpp:257
+msgid "Show about dialog"
+msgstr "Mostrar o diálogo sobre"
+
+#: ../src/html/helpwnd.cpp:502
+msgid "Show all"
+msgstr "Mostrar tudo"
+
+#: ../src/html/helpwnd.cpp:513
+msgid "Show all items in index"
+msgstr "Mostrar todos os itens no índice"
+
+#: ../src/generic/dirdlgg.cpp:105
+msgid "Show hidden directories"
+msgstr "Mostrar diretórios ocultos"
+
+#: ../src/html/helpwnd.cpp:671
+msgid "Show/hide navigation panel"
+msgstr "Mostrar/ocultar o painel de navegação"
+
+#: ../src/richtext/richtextsymboldlg.cpp:421
+#: ../src/richtext/richtextsymboldlg.cpp:423
+msgid "Shows a Unicode subset."
+msgstr "Mostra um subset do Unicode."
+
+#: ../src/richtext/richtextliststylepage.cpp:472
+#: ../src/richtext/richtextliststylepage.cpp:474
+#: ../src/richtext/richtextbulletspage.cpp:276
+#: ../src/richtext/richtextbulletspage.cpp:278
+msgid "Shows a preview of the bullet settings."
+msgstr "Mostra uma pré-visualização das configurações dos projéteis."
+
+#: ../src/richtext/richtextfontpage.cpp:322
+#: ../src/richtext/richtextfontpage.cpp:324
+msgid "Shows a preview of the font settings."
+msgstr "Mostra uma pré-visualização das configurações da fonte."
+
+#: ../src/osx/carbon/fontdlg.cpp:580 ../src/osx/carbon/fontdlg.cpp:582
+msgid "Shows a preview of the font."
+msgstr "Mostra uma pré-visualização da fonte."
+
+#: ../src/richtext/richtextindentspage.cpp:303
+#: ../src/richtext/richtextindentspage.cpp:305
+msgid "Shows a preview of the paragraph settings."
+msgstr "Mostra uma pré-visualizaçãoo das configurações do parágrafo."
+
+#: ../src/generic/fontdlgg.cpp:460 ../src/generic/fontdlgg.cpp:462
+msgid "Shows the font preview."
+msgstr "Mostra a pré-visualização da fonte."
+
+#: ../src/univ/themes/mono.cpp:516
+msgid "Simple monochrome theme"
+msgstr "Tema monocromático simples"
+
+#: ../src/richtext/richtextindentspage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:449
+msgid "Single"
+msgstr "Único"
+
+#: ../src/generic/filectrlg.cpp:460 ../src/richtext/richtextformatdlg.cpp:356
+#: ../src/richtext/richtextsizepage.cpp:299
+msgid "Size"
+msgstr "Tamanho"
+
+#: ../src/osx/carbon/fontdlg.cpp:525
+msgid "Size:"
+msgstr "Tamanho:"
+
+#: ../src/generic/progdlgg.cpp:262 ../src/generic/progdlgg.cpp:773
+#: ../src/msw/progdlg.cpp:801
+msgid "Skip"
+msgstr "Pular"
+
+#: ../src/generic/fontdlgg.cpp:330
+msgid "Slant"
+msgstr "Inclinação"
+
+#: ../src/richtext/richtextfontpage.cpp:298
+msgid "Small C&apitals"
+msgstr "Mi&núsculas"
+
+#: ../src/richtext/richtextborderspage.cpp:543
+msgid "Solid"
+msgstr "Sólido"
+
+#: ../src/common/docview.cpp:1773
+msgid "Sorry, could not open this file."
+msgstr "Lamento, não pude abrir este arquivo."
+
+#: ../src/common/prntbase.cpp:2027 ../src/common/prntbase.cpp:2035
+msgid "Sorry, not enough memory to create a preview."
+msgstr "Lamento, memória não o suficiente para criar uma pré-visualização."
+
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "Sorry, that name is taken. Please choose another."
+msgstr "Lamento, este nome está tomado. Por favor escolha outro."
+
+#: ../src/common/docview.cpp:1796
+msgid "Sorry, the format for this file is unknown."
+msgstr "Lamento, o formato para este arquivo é desconhecido."
+
+#: ../src/unix/sound.cpp:492
+msgid "Sound data are in unsupported format."
+msgstr "Os dados de som estão num formato não suportado."
+
+#: ../src/unix/sound.cpp:477
+#, c-format
+msgid "Sound file '%s' is in unsupported format."
+msgstr "O arquivo de som '%s' está num formato não suportado."
+
+#: ../src/richtext/richtextliststylepage.cpp:467
+msgid "Spacing"
+msgstr "Espaçamento"
+
+#: ../src/common/stockitem.cpp:197
+msgid "Spell Check"
+msgstr "Verificação da Escrita"
+
+#: ../src/richtext/richtextliststylepage.cpp:490
+#: ../src/richtext/richtextbulletspage.cpp:295
+msgid "Standard"
+msgstr "Padrão"
+
+#: ../src/common/paper.cpp:105
+msgid "Statement, 5 1/2 x 8 1/2 in"
+msgstr "Declaração, 5 1/2 x 8 1/2 em"
+
+#: ../src/richtext/richtextsizepage.cpp:518
+#: ../src/richtext/richtextsizepage.cpp:523
+msgid "Static"
+msgstr "Estático"
+
+#: ../src/generic/prntdlgg.cpp:204
+msgid "Status:"
+msgstr "Status: "
+
+#: ../src/common/stockitem.cpp:198
+msgid "Stop"
+msgstr "Parar"
+
+#: ../src/common/stockitem.cpp:199
+msgid "Strikethrough"
+msgstr "Penetrar"
+
+#: ../src/common/colourcmn.cpp:45
+#, c-format
+msgid "String To Colour : Incorrect colour specification : %s"
+msgstr "String para a Cor: Especificação da cor incorreta: %s"
+
+#: ../src/richtext/richtextformatdlg.cpp:318 ../src/propgrid/advprops.cpp:647
+msgid "Style"
+msgstr "Estilo"
+
+#: ../include/wx/richtext/richtextstyledlg.h:47
+msgid "Style Organiser"
+msgstr "Organizador de Estilos"
+
+#: ../src/osx/carbon/fontdlg.cpp:534
+msgid "Style:"
+msgstr "Estilo:"
+
+#: ../src/richtext/richtextfontpage.cpp:312
+msgid "Subscrip&t"
+msgstr "SubScrip&t"
+
+#: ../src/richtext/richtextfontpage.cpp:305
+msgid "Supe&rscript"
+msgstr "Supe&rscript"
+
+#: ../src/common/paper.cpp:151
+msgid "SuperA/SuperA/A4 227 x 356 mm"
+msgstr "SuperA/SuperA/A4 227 x 356 mm"
+
+#: ../src/common/paper.cpp:152
+msgid "SuperB/SuperB/A3 305 x 487 mm"
+msgstr "SuperB/SuperB/A3 305 x 487 mm"
+
+#: ../src/generic/fontdlgg.cpp:326
+msgid "Swiss"
+msgstr "Suíço"
+
+#: ../src/richtext/richtextliststylepage.cpp:488
+#: ../src/richtext/richtextbulletspage.cpp:293
+msgid "Symbol"
+msgstr "Símbolo"
+
+#: ../src/richtext/richtextliststylepage.cpp:288
+#: ../src/richtext/richtextbulletspage.cpp:240
+msgid "Symbol &font:"
+msgstr "Fonte dos &símbolos:"
+
+#: ../include/wx/richtext/richtextsymboldlg.h:47
+msgid "Symbols"
+msgstr "Símbolos"
+
+#: ../src/common/accelcmn.cpp:63
+msgid "TAB"
+msgstr "TAB"
+
+#: ../src/common/imagtiff.cpp:372 ../src/common/imagtiff.cpp:385
+#: ../src/common/imagtiff.cpp:744
+msgid "TIFF: Couldn't allocate memory."
+msgstr "TIFF: Não pôde distribuir a memória."
+
+#: ../src/common/imagtiff.cpp:304
+msgid "TIFF: Error loading image."
+msgstr "TIFF: Erro carregando a imagem."
+
+#: ../src/common/imagtiff.cpp:471
+msgid "TIFF: Error reading image."
+msgstr "TIFF: Erro ao ler a imagem."
+
+#: ../src/common/imagtiff.cpp:611
+msgid "TIFF: Error saving image."
+msgstr "TIFF: Erro ao salvar a imagem."
+
+#: ../src/common/imagtiff.cpp:849
+msgid "TIFF: Error writing image."
+msgstr "TIFF: Erro ao gravar imagem."
+
+#: ../src/common/imagtiff.cpp:358
+msgid "TIFF: Image size is abnormally big."
+msgstr "TiFF: o tamanho da imagem é anormalmente grande."
+
+#: ../src/richtext/richtextbuffer.cpp:10794
+msgid "Table Properties"
+msgstr "Propriedades da Tabela"
+
+#: ../src/common/paper.cpp:146
+msgid "Tabloid Extra 11.69 x 18 in"
+msgstr "Tablóide Extra 11.69 x 18 em"
+
+#: ../src/common/paper.cpp:103
+msgid "Tabloid, 11 x 17 in"
+msgstr "Tablóide, 11 x 17 em"
+
+#: ../src/richtext/richtextformatdlg.cpp:336
+msgid "Tabs"
+msgstr "Abas"
+
+#: ../src/generic/fontdlgg.cpp:327
+msgid "Teletype"
+msgstr "Teletype"
+
+#: ../src/common/docview.cpp:1878
+msgid "Templates"
+msgstr "Modelos"
+
+#: ../src/osx/carbon/dataview.cpp:2373
+msgid "Text renderer cannot render value; value type: "
+msgstr "O renderizador de texto não pode renderizar o valor; tipo de valor:"
+
+#: ../src/common/fmapbase.cpp:158
+msgid "Thai (ISO-8859-11)"
+msgstr "Tailandês (ISO-8859-11)"
+
+#: ../src/common/ftp.cpp:620
+msgid "The FTP server doesn't support passive mode."
+msgstr "O servidor FTP não suporta o modo passivo."
+
+#: ../src/common/ftp.cpp:606
+msgid "The FTP server doesn't support the PORT command."
+msgstr "O servidor FTP não suporta o comando \"PORT\"."
+
+#: ../src/richtext/richtextliststylepage.cpp:215
+#: ../src/richtext/richtextliststylepage.cpp:217
+#: ../src/richtext/richtextbulletspage.cpp:164
+#: ../src/richtext/richtextbulletspage.cpp:166
+msgid "The available bullet styles."
+msgstr "Os estilos de projéteis disponíveis."
+
+#: ../src/richtext/richtextstyledlg.cpp:202
+#: ../src/richtext/richtextstyledlg.cpp:204
+msgid "The available styles."
+msgstr "Os estilos disponíveis."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:139
+#: ../src/richtext/richtextbackgroundpage.cpp:141
+msgid "The background colour."
+msgstr "A côr de fundo."
+
+#: ../src/richtext/richtextmarginspage.cpp:268
+#: ../src/richtext/richtextmarginspage.cpp:270
+msgid "The bottom margin size."
+msgstr "O tamanho da margem do fundo."
+
+#: ../src/richtext/richtextmarginspage.cpp:382
+#: ../src/richtext/richtextmarginspage.cpp:384
+msgid "The bottom padding size."
+msgstr "O tamanho do enchimento do fundo."
+
+#: ../src/richtext/richtextsizepage.cpp:639
+#: ../src/richtext/richtextsizepage.cpp:641
+#: ../src/richtext/richtextsizepage.cpp:653
+#: ../src/richtext/richtextsizepage.cpp:655
+msgid "The bottom position."
+msgstr "A posição do rodapé."
+
+#: ../src/richtext/richtextliststylepage.cpp:254
+#: ../src/richtext/richtextliststylepage.cpp:256
+#: ../src/richtext/richtextliststylepage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:277
+#: ../src/richtext/richtextbulletspage.cpp:204
+#: ../src/richtext/richtextbulletspage.cpp:206
+#: ../src/richtext/richtextbulletspage.cpp:227
+#: ../src/richtext/richtextbulletspage.cpp:229
+msgid "The bullet character."
+msgstr "O caractere projétil."
+
+#: ../src/richtext/richtextsymboldlg.cpp:443
+#: ../src/richtext/richtextsymboldlg.cpp:445
+msgid "The character code."
+msgstr "O código do caracteres."
+
+#: ../src/common/fontmap.cpp:203
+#, c-format
+msgid ""
+"The charset '%s' is unknown. You may select\n"
+"another charset to replace it with or choose\n"
+"[Cancel] if it cannot be replaced"
+msgstr ""
+"O conjunto de caracteres '%s' é desconhecido. Você pode selecionar\n"
+"outro conjunto de caracteres para substituí-lo ou escolher\n"
+"[Cancelar] se ele não pode ser substituído"
+
+#: ../src/msw/ole/dataobj.cpp:367
+#, c-format
+msgid "The clipboard format '%d' doesn't exist."
+msgstr "O formato '%d' da área de transferência não existe."
+
+#: ../src/richtext/richtextstylepage.cpp:128
+#: ../src/richtext/richtextstylepage.cpp:130
+msgid "The default style for the next paragraph."
+msgstr "O estilo padrão para o próximo parágrafo."
+
+#: ../src/generic/dirdlgg.cpp:231
+#, c-format
+msgid ""
+"The directory '%s' does not exist\n"
+"Create it now?"
+msgstr ""
+"O diretório '%s' não existe\n"
+"Criá-lo agora?"
+
+#: ../src/html/htmprint.cpp:271
+#, c-format
+msgid ""
+"The document \"%s\" doesn't fit on the page horizontally and will be "
+"truncated if printed.\n"
+"\n"
+"Would you like to proceed with printing it nevertheless?"
+msgstr ""
+"O documento \"%s\" não se encaixa na página horizontalmente e será truncado "
+"se impresso.\n"
+"\n"
+"Você gostaria de prosseguir com a impressão apesar disso?"
+
+#: ../src/common/docview.cpp:1184
+#, c-format
+msgid ""
+"The file '%s' doesn't exist and couldn't be opened.\n"
+"It has been removed from the most recently used files list."
+msgstr ""
+"O arquivo '%s' não existe e não pôde ser aberto.\n"
+"Foi removido da lista dos arquivos mais usados recentemente."
+
+#: ../src/richtext/richtextindentspage.cpp:208
+#: ../src/richtext/richtextindentspage.cpp:210
+#: ../src/richtext/richtextliststylepage.cpp:394
+#: ../src/richtext/richtextliststylepage.cpp:396
+msgid "The first line indent."
+msgstr "O recuo da primeira linha."
+
+#: ../src/gtk/utilsgtk.cpp:427
+msgid "The following standard GTK+ options are also supported:\n"
+msgstr "As seguintes opções GTK+ padrão também são suportadas:\n"
+
+#: ../src/generic/fontdlgg.cpp:414 ../src/generic/fontdlgg.cpp:416
+msgid "The font colour."
+msgstr "A cor da fonte"
+
+#: ../src/generic/fontdlgg.cpp:375 ../src/generic/fontdlgg.cpp:377
+msgid "The font family."
+msgstr "A família da fonte"
+
+#: ../src/richtext/richtextsymboldlg.cpp:405
+#: ../src/richtext/richtextsymboldlg.cpp:407
+msgid "The font from which to take the symbol."
+msgstr "A fonte da qual tomar o símbolo."
+
+#: ../src/generic/fontdlgg.cpp:427 ../src/generic/fontdlgg.cpp:429
+#: ../src/generic/fontdlgg.cpp:434 ../src/generic/fontdlgg.cpp:436
+msgid "The font point size."
+msgstr "O tamanho do ponto da fonte."
+
+#: ../src/osx/carbon/fontdlg.cpp:529 ../src/osx/carbon/fontdlg.cpp:531
+msgid "The font size in points."
+msgstr "O tamanho da fonte em pontos."
+
+#: ../src/richtext/richtextfontpage.cpp:190
+#: ../src/richtext/richtextfontpage.cpp:192
+msgid "The font size units, points or pixels."
+msgstr "As unidades de tamanho da fonte, pontos ou pixels."
+
+#: ../src/generic/fontdlgg.cpp:386 ../src/generic/fontdlgg.cpp:388
+msgid "The font style."
+msgstr "O estilo da fonte."
+
+#: ../src/generic/fontdlgg.cpp:397 ../src/generic/fontdlgg.cpp:399
+msgid "The font weight."
+msgstr "O peso da fonte."
+
+#: ../src/common/docview.cpp:1465
+#, c-format
+msgid "The format of file '%s' couldn't be determined."
+msgstr "O formato do arquivo '%s' não pôde ser determinado."
+
+#: ../src/richtext/richtextindentspage.cpp:199
+#: ../src/richtext/richtextindentspage.cpp:201
+#: ../src/richtext/richtextliststylepage.cpp:385
+#: ../src/richtext/richtextliststylepage.cpp:387
+msgid "The left indent."
+msgstr "O recuo a esquerda."
+
+#: ../src/richtext/richtextmarginspage.cpp:195
+#: ../src/richtext/richtextmarginspage.cpp:197
+msgid "The left margin size."
+msgstr "O tamanho da margem esquerda."
+
+#: ../src/richtext/richtextmarginspage.cpp:309
+#: ../src/richtext/richtextmarginspage.cpp:311
+msgid "The left padding size."
+msgstr "O tamanho do enchimento a esquerda."
+
+#: ../src/richtext/richtextsizepage.cpp:534
+#: ../src/richtext/richtextsizepage.cpp:536
+#: ../src/richtext/richtextsizepage.cpp:548
+#: ../src/richtext/richtextsizepage.cpp:550
+msgid "The left position."
+msgstr "A posição da esquerda."
+
+#: ../src/richtext/richtextindentspage.cpp:288
+#: ../src/richtext/richtextindentspage.cpp:290
+#: ../src/richtext/richtextliststylepage.cpp:462
+#: ../src/richtext/richtextliststylepage.cpp:464
+msgid "The line spacing."
+msgstr "O espaçamento entre linhas."
+
+#: ../src/richtext/richtextbulletspage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:270
+msgid "The list item number."
+msgstr "O número do item da lista."
+
+#: ../src/msw/ole/automtn.cpp:653
+msgid "The locale ID is unknown."
+msgstr "A ID local é desconhecida."
+
+#: ../src/richtext/richtextsizepage.cpp:366
+#: ../src/richtext/richtextsizepage.cpp:368
+msgid "The object height."
+msgstr "A altura do objeto."
+
+#: ../src/richtext/richtextsizepage.cpp:474
+#: ../src/richtext/richtextsizepage.cpp:476
+msgid "The object maximum height."
+msgstr "A altura máxima do objeto."
+
+#: ../src/richtext/richtextsizepage.cpp:447
+#: ../src/richtext/richtextsizepage.cpp:449
+msgid "The object maximum width."
+msgstr "A largura máxima do objeto."
+
+#: ../src/richtext/richtextsizepage.cpp:420
+#: ../src/richtext/richtextsizepage.cpp:422
+msgid "The object minimum height."
+msgstr "A altura mínima do objeto."
+
+#: ../src/richtext/richtextsizepage.cpp:393
+#: ../src/richtext/richtextsizepage.cpp:395
+msgid "The object minimum width."
+msgstr "A largura mínima do objeto."
+
+#: ../src/richtext/richtextsizepage.cpp:332
+#: ../src/richtext/richtextsizepage.cpp:334
+msgid "The object width."
+msgstr "A largura do objeto."
+
+#: ../src/richtext/richtextindentspage.cpp:227
+#: ../src/richtext/richtextindentspage.cpp:229
+msgid "The outline level."
+msgstr "O nível do contorno."
+
+#: ../src/common/log.cpp:281
+#, c-format
+msgid "The previous message repeated %lu time."
+msgid_plural "The previous message repeated %lu times."
+msgstr[0] "A mensagem anterior repetida uma vez."
+msgstr[1] "A mensagem anterior repetida %lu vezes"
+
+#: ../src/common/log.cpp:274
+msgid "The previous message repeated once."
+msgstr "A mensagem anterior repetida uma vez."
+
+#: ../src/gtk/print.cpp:931 ../src/gtk/print.cpp:1114
+msgid "The print dialog returned an error."
+msgstr "O diálogo da impressão retornou um erro."
+
+#: ../src/richtext/richtextsymboldlg.cpp:462
+#: ../src/richtext/richtextsymboldlg.cpp:464
+msgid "The range to show."
+msgstr "O alcance a mostrar."
+
+#: ../src/generic/dbgrptg.cpp:322
+msgid ""
+"The report contains the files listed below. If any of these files contain "
+"private information,\n"
+"please uncheck them and they will be removed from the report.\n"
+msgstr ""
+"O relatório contém os arquivos listados abaixo. Se alguns destes arquivos "
+"contém informação privada,\n"
+"por favor desmarque-os e eles serão removidos do relatório.\n"
+
+#: ../src/common/cmdline.cpp:1083
+#, c-format
+msgid "The required parameter '%s' was not specified."
+msgstr "O parâmetro requerido '%s' não foi especificado."
+
+#: ../src/richtext/richtextindentspage.cpp:217
+#: ../src/richtext/richtextindentspage.cpp:219
+#: ../src/richtext/richtextliststylepage.cpp:403
+#: ../src/richtext/richtextliststylepage.cpp:405
+msgid "The right indent."
+msgstr "O recuo a direita."
+
+#: ../src/richtext/richtextmarginspage.cpp:220
+#: ../src/richtext/richtextmarginspage.cpp:222
+msgid "The right margin size."
+msgstr "O tamanho da margem a direita."
+
+#: ../src/richtext/richtextmarginspage.cpp:334
+#: ../src/richtext/richtextmarginspage.cpp:336
+msgid "The right padding size."
+msgstr "O tamanho do enchimento a direita."
+
+#: ../src/richtext/richtextsizepage.cpp:604
+#: ../src/richtext/richtextsizepage.cpp:606
+#: ../src/richtext/richtextsizepage.cpp:618
+#: ../src/richtext/richtextsizepage.cpp:620
+msgid "The right position."
+msgstr "A posição da direta."
+
+#: ../src/richtext/richtextindentspage.cpp:267
+#: ../src/richtext/richtextliststylepage.cpp:439
+#: ../src/richtext/richtextliststylepage.cpp:441
+msgid "The spacing after the paragraph."
+msgstr "O espaçamento após o parágrafo."
+
+#: ../src/richtext/richtextindentspage.cpp:257
+#: ../src/richtext/richtextindentspage.cpp:259
+#: ../src/richtext/richtextliststylepage.cpp:430
+#: ../src/richtext/richtextliststylepage.cpp:432
+msgid "The spacing before the paragraph."
+msgstr "O espaçamento antes do parágrafo."
+
+#: ../src/richtext/richtextstylepage.cpp:108
+#: ../src/richtext/richtextstylepage.cpp:110
+msgid "The style name."
+msgstr "O nome do estilo."
+
+#: ../src/richtext/richtextstylepage.cpp:118
+#: ../src/richtext/richtextstylepage.cpp:120
+msgid "The style on which this style is based."
+msgstr "O estilo no qual este estilo é baseado."
+
+#: ../src/richtext/richtextstyledlg.cpp:214
+#: ../src/richtext/richtextstyledlg.cpp:216
+msgid "The style preview."
+msgstr "A pré-visualização do estilo."
+
+#: ../src/msw/ole/automtn.cpp:669
+msgid "The system cannot find the file specified."
+msgstr "O sistema não consegue acessar o arquivo especificado."
+
+#: ../src/richtext/richtexttabspage.cpp:118
+#: ../src/richtext/richtexttabspage.cpp:120
+msgid "The tab position."
+msgstr "A posição da aba."
+
+#: ../src/richtext/richtexttabspage.cpp:124
+msgid "The tab positions."
+msgstr "As posições das abas."
+
+#: ../src/richtext/richtextctrl.cpp:2705
+msgid "The text couldn't be saved."
+msgstr "O texto não pôde ser salvo."
+
+#: ../src/richtext/richtextmarginspage.cpp:243
+#: ../src/richtext/richtextmarginspage.cpp:245
+msgid "The top margin size."
+msgstr "O tamanho da margem do topo."
+
+#: ../src/richtext/richtextmarginspage.cpp:357
+#: ../src/richtext/richtextmarginspage.cpp:359
+msgid "The top padding size."
+msgstr "O tamanho do enchimento do topo."
+
+#: ../src/richtext/richtextsizepage.cpp:569
+#: ../src/richtext/richtextsizepage.cpp:571
+#: ../src/richtext/richtextsizepage.cpp:583
+#: ../src/richtext/richtextsizepage.cpp:585
+msgid "The top position."
+msgstr "A posição do topo."
+
+#: ../src/common/cmdline.cpp:1061
+#, c-format
+msgid "The value for the option '%s' must be specified."
+msgstr "O valor para a opção '%s' deve ser especificado."
+
+#: ../src/msw/dialup.cpp:452
+#, c-format
+msgid ""
+"The version of remote access service (RAS) installed on this machine is too "
+"old, please upgrade (the following required function is missing: %s)."
+msgstr ""
+"A versão do serviço de acesso remoto (RAS) instalado nesta máquina é muito "
+"antiga, por favor atualize (a seguinte função requerida está desaparecida: "
+"%s)."
+
+#: ../src/gtk/print.cpp:959
+msgid "The wxGtkPrinterDC cannot be used."
+msgstr "O wxGtkPrinterDC não pode ser usado."
+
+#: ../src/osx/carbon/dataview.cpp:1340
+msgid "There is no column or renderer for the specified column index."
+msgstr "Não há coluna ou renderizador para o índice da coluna especificado."
+
+#: ../src/richtext/richtextprint.cpp:614 ../src/html/htmprint.cpp:735
+msgid ""
+"There was a problem during page setup: you may need to set a default printer."
+msgstr ""
+"Houve um problema durante a configuração da página: talvez você precise "
+"definir uma impressora padrão."
+
+#: ../src/html/htmprint.cpp:255
+msgid ""
+"This document doesn't fit on the page horizontally and will be truncated "
+"when it is printed."
+msgstr ""
+"Este documento não se encaixa na página horizontalmente e será truncado "
+"quando for impresso."
+
+#: ../src/common/image.cpp:2716
+#, c-format
+msgid "This is not a %s."
+msgstr "Isto não é um %s."
+
+#: ../src/common/wincmn.cpp:1653
+msgid "This platform does not support background transparency."
+msgstr "Esta plataforma não suporta transparência de fundo."
+
+#: ../src/gtk/window.cpp:4317
+msgid ""
+"This program was compiled with a too old version of GTK+, please rebuild "
+"with GTK+ 2.12 or newer."
+msgstr ""
+"Este programa foi compilado com uma versão muito velha do GTK+, por favor "
+"reconstrua com GTK+ 2.12 ou mais novo."
+
+#: ../src/msw/datecontrols.cpp:59
+msgid ""
+"This system doesn't support date controls, please upgrade your version of "
+"comctl32.dll"
+msgstr ""
+"Este sistema não suporta os controles de data, por favor atualize sua versão "
+"do comctl32.dll"
+
+#: ../src/msw/thread.cpp:1300
+msgid ""
+"Thread module initialization failed: cannot store value in thread local "
+"storage"
+msgstr ""
+"O módulo de inicialização do thread falhou: não pôde armazenar o valor no "
+"armazém local do thread"
+
+#: ../src/unix/threadpsx.cpp:1758
+msgid "Thread module initialization failed: failed to create thread key"
+msgstr ""
+"A inicialização do módulo dos threads falhou: falhou em criar a chave do "
+"thread"
+
+#: ../src/msw/thread.cpp:1288
+msgid ""
+"Thread module initialization failed: impossible to allocate index in thread "
+"local storage"
+msgstr ""
+"A inicialização do módulo dos threads falhou: impossível distribuir o índice "
+"no armazém local dos threads"
+
+#: ../src/unix/threadpsx.cpp:1038
+msgid "Thread priority setting is ignored."
+msgstr "A configuração da prioridade do thread é ignorada."
+
+#: ../src/msw/mdi.cpp:172
+msgid "Tile &Horizontally"
+msgstr "Lado a Lado &Horizontalmente"
+
+#: ../src/msw/mdi.cpp:173
+msgid "Tile &Vertically"
+msgstr "Lado a Lado &Verticalmente"
+
+#: ../src/common/ftp.cpp:202
+msgid "Timeout while waiting for FTP server to connect, try passive mode."
+msgstr ""
+"Tempo para esgotar enquanto espera o servidor FTP se conectar, tente o modo "
+"passivo."
+
+#: ../src/os2/timer.cpp:99
+msgid "Timer creation failed."
+msgstr "A criação do timer falhou."
+
+#: ../src/generic/tipdlg.cpp:220
+msgid "Tip of the Day"
+msgstr "Dica do Dia"
+
+#: ../src/generic/tipdlg.cpp:154
+msgid "Tips not available, sorry!"
+msgstr "Dicas não disponíveis, lamento!"
+
+#: ../src/generic/prntdlgg.cpp:242
+msgid "To:"
+msgstr "Para:"
+
+#: ../src/osx/carbon/dataview.cpp:2451
+msgid "Toggle renderer cannot render value; value type: "
+msgstr "O renderizador ativado não pode renderizar o valor; tipo de valor:"
+
+#: ../src/richtext/richtextbuffer.cpp:7983
+msgid "Too many EndStyle calls!"
+msgstr "Chamadas demais ao EndStyle!"
+
+#: ../src/common/imagpng.cpp:286
+msgid "Too many colours in PNG, the image may be slightly blurred."
+msgstr "Cores demais no PNG; a imagem pode ficar levemente borrada."
+
+#: ../src/richtext/richtextsizepage.cpp:286
+#: ../src/richtext/richtextsizepage.cpp:290 ../src/common/stockitem.cpp:200
+msgid "Top"
+msgstr "Topo"
+
+#: ../src/generic/prntdlgg.cpp:881
+msgid "Top margin (mm):"
+msgstr "Margem superior (mm):"
+
+#: ../src/generic/aboutdlgg.cpp:79
+msgid "Translations by "
+msgstr "Traduções de"
+
+#: ../src/generic/aboutdlgg.cpp:188
+msgid "Translators"
+msgstr "Tradutores"
+
+#: ../src/propgrid/propgrid.cpp:173
+msgid "True"
+msgstr "Verdadeiro"
+
+#: ../src/common/fs_mem.cpp:227
+#, c-format
+msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!"
+msgstr ""
+"Tentando remover o arquivo '%s' da memória VFS, mas ele não está carregado!"
+
+#: ../src/common/fmapbase.cpp:156
+msgid "Turkish (ISO-8859-9)"
+msgstr "Turco (ISO-8859-9)"
+
+#: ../src/generic/filectrlg.cpp:461
+msgid "Type"
+msgstr "Tipo"
+
+#: ../src/richtext/richtextfontpage.cpp:160
+#: ../src/richtext/richtextfontpage.cpp:162
+msgid "Type a font name."
+msgstr "Digite um nome de fonte."
+
+#: ../src/richtext/richtextfontpage.cpp:175
+#: ../src/richtext/richtextfontpage.cpp:177
+msgid "Type a size in points."
+msgstr "Digite um tamanho em pontos."
+
+#: ../src/msw/ole/automtn.cpp:665
+#, c-format
+msgid "Type mismatch in argument %u."
+msgstr "Mal combinação do tipo no argumento %u."
+
+#: ../src/common/xtixml.cpp:356 ../src/common/xtixml.cpp:509
+#: ../src/common/xtistrm.cpp:322
+msgid "Type must have enum - long conversion"
+msgstr "O tipo precisa ter conversão enum - long"
+
+#: ../src/propgrid/propgridiface.cpp:382
+#, c-format
+msgid ""
+"Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT "
+"\"%s\"."
+msgstr ""
+"A operação do tipo \"%s\" falhou: A propriedade rotulada \"%s\" é do tipo "
+"\"%s\", NÃO \"%s\"."
+
+#: ../src/common/accelcmn.cpp:58
+msgid "UP"
+msgstr "UP"
+
+#: ../src/common/paper.cpp:134
+msgid "US Std Fanfold, 14 7/8 x 11 in"
+msgstr "Fanfold Std US, 14 7/8 x 11 em"
+
+#: ../src/common/fmapbase.cpp:196
+msgid "US-ASCII"
+msgstr "US-ASCII"
+
+#: ../src/unix/fswatcher_inotify.cpp:109
+msgid "Unable to add inotify watch"
+msgstr "Incapaz de adicionar a observação inotify"
+
+#: ../src/unix/fswatcher_kqueue.cpp:136
+msgid "Unable to add kqueue watch"
+msgstr "Incapaz de adicionar a observação kqueue"
+
+#: ../include/wx/msw/private/fswatcher.h:142
+msgid "Unable to associate handle with I/O completion port"
+msgstr "Incapaz de associar o manejar com a porta de término de E/S"
+
+#: ../include/wx/msw/private/fswatcher.h:125
+msgid "Unable to close I/O completion port handle"
+msgstr "Incapaz de fechar o manejamento do término da porta de E/S"
+
+#: ../src/unix/fswatcher_inotify.cpp:97
+msgid "Unable to close inotify instance"
+msgstr "Incapaz de fechar a instância inotify"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:74
+#, c-format
+msgid "Unable to close path '%s'"
+msgstr "Incapaz de fechar o caminho '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:48
+#, c-format
+msgid "Unable to close the handle for '%s'"
+msgstr "Incapaz de fechar o manejamento para '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:240
+msgid "Unable to create I/O completion port"
+msgstr "Incapaz de criar a porta do término da E/S"
+
+#: ../src/msw/fswatcher.cpp:84
+msgid "Unable to create IOCP worker thread"
+msgstr "Incapaz de criar o thread do trabalhador IOCP"
+
+#: ../src/unix/fswatcher_inotify.cpp:74
+msgid "Unable to create inotify instance"
+msgstr "Incapaz de criar a instância inotify"
+
+#: ../src/unix/fswatcher_kqueue.cpp:97
+msgid "Unable to create kqueue instance"
+msgstr "Incapaz de criar a instância kqueue"
+
+#: ../include/wx/msw/private/fswatcher.h:229
+msgid "Unable to dequeue completion packet"
+msgstr "Incapaz de tirar da fila o pacote de término"
+
+#: ../src/unix/fswatcher_kqueue.cpp:185
+msgid "Unable to get events from kqueue"
+msgstr "Incapaz de obter eventos do kqueue"
+
+#: ../src/osx/carbon/dataview.cpp:1903
+msgid "Unable to handle native drag&drop data"
+msgstr "Incapaz de manejar dados arrastar&soltar nativos"
+
+#: ../src/gtk/app.cpp:439
+msgid "Unable to initialize GTK+, is DISPLAY set properly?"
+msgstr ""
+"Incapaz de inicializar o GTK+, o DISPLAY está configurado apropriadamente?"
+
+#: ../src/gtk/app.cpp:276
+msgid "Unable to initialize Hildon program"
+msgstr "Incapaz de inicializar o programa Hildon"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:57
+#, c-format
+msgid "Unable to open path '%s'"
+msgstr "Incapaz de abrir o caminho '%s'"
+
+#: ../src/html/htmlwin.cpp:561
+#, c-format
+msgid "Unable to open requested HTML document: %s"
+msgstr "Incapaz de abrir o documento HTML pedido: %s"
+
+#: ../src/unix/sound.cpp:368
+msgid "Unable to play sound asynchronously."
+msgstr "Incapaz de reproduzir o som de forma assíncrona."
+
+#: ../include/wx/msw/private/fswatcher.h:207
+msgid "Unable to post completion status"
+msgstr "Incapaz de postar o status do término"
+
+#: ../src/unix/fswatcher_inotify.cpp:530
+msgid "Unable to read from inotify descriptor"
+msgstr "Incapaz de ler do descritor inotify"
+
+#: ../src/unix/fswatcher_inotify.cpp:132
+msgid "Unable to remove inotify watch"
+msgstr "Incapaz de remover a observação inotify"
+
+#: ../src/unix/fswatcher_kqueue.cpp:153
+msgid "Unable to remove kqueue watch"
+msgstr "Incapaz de removar a observação kqueue"
+
+#: ../src/msw/fswatcher.cpp:168
+#, c-format
+msgid "Unable to set up watch for '%s'"
+msgstr "Incapaz de configurar a observação para '%s'"
+
+#: ../src/msw/fswatcher.cpp:91
+msgid "Unable to start IOCP worker thread"
+msgstr "Incapaz de iniciar o thread do trabalhador IOCP"
+
+#: ../src/common/stockitem.cpp:201
+msgid "Undelete"
+msgstr "Restaurar"
+
+#: ../src/common/stockitem.cpp:202
+msgid "Underline"
+msgstr "Sublinhar"
+
+#: ../src/richtext/richtextfontpage.cpp:341 ../src/osx/carbon/fontdlg.cpp:556
+#: ../src/propgrid/advprops.cpp:655
+msgid "Underlined"
+msgstr "&Sublinhado"
+
+#: ../src/common/stockitem.cpp:203 ../src/stc/stc_i18n.cpp:15
+msgid "Undo"
+msgstr "Desfazer"
+
+#: ../src/common/stockitem.cpp:265
+msgid "Undo last action"
+msgstr "Desfazer a última ação"
+
+#: ../src/common/cmdline.cpp:864
+#, c-format
+msgid "Unexpected characters following option '%s'."
+msgstr "Caracteres inexperados seguindo a opção '%s'."
+
+#: ../src/unix/fswatcher_inotify.cpp:261
+#, c-format
+msgid "Unexpected event for \"%s\": no matching watch descriptor."
+msgstr ""
+"Evento inesperado para \"%s\": sem descritor de observação que combine."
+
+#: ../src/common/cmdline.cpp:1024
+#, c-format
+msgid "Unexpected parameter '%s'"
+msgstr "Parâmetro '%s' inexperado"
+
+#: ../include/wx/msw/private/fswatcher.h:148
+msgid "Unexpectedly new I/O completion port was created"
+msgstr "Inesperadamente a nova porta do término de E/S foi criada"
+
+#: ../src/msw/fswatcher.cpp:70
+msgid "Ungraceful worker thread termination"
+msgstr "Término do thread do trabalhador não grato"
+
+#: ../src/richtext/richtextsymboldlg.cpp:459
+#: ../src/richtext/richtextsymboldlg.cpp:460
+#: ../src/richtext/richtextsymboldlg.cpp:461
+msgid "Unicode"
+msgstr "Unicode"
+
+#: ../src/common/fmapbase.cpp:185 ../src/common/fmapbase.cpp:191
+msgid "Unicode 16 bit (UTF-16)"
+msgstr "Unicode 16 bits (UTF-16)"
+
+#: ../src/common/fmapbase.cpp:190
+msgid "Unicode 16 bit Big Endian (UTF-16BE)"
+msgstr "Unicode 16 bits Big Endian (UTF-16BE)"
+
+#: ../src/common/fmapbase.cpp:186
+msgid "Unicode 16 bit Little Endian (UTF-16LE)"
+msgstr "Unicode 16 bits Little Endian (UTF-16LE)"
+
+#: ../src/common/fmapbase.cpp:187 ../src/common/fmapbase.cpp:193
+msgid "Unicode 32 bit (UTF-32)"
+msgstr "Unicode 32 bits (UTF-32)"
+
+#: ../src/common/fmapbase.cpp:192
+msgid "Unicode 32 bit Big Endian (UTF-32BE)"
+msgstr "Unicode 32 bits Big Endian (UTF-32BE)"
+
+#: ../src/common/fmapbase.cpp:188
+msgid "Unicode 32 bit Little Endian (UTF-32LE)"
+msgstr "Unicode 32 bits Little Endian (UTF-32LE)"
+
+#: ../src/common/fmapbase.cpp:182
+msgid "Unicode 7 bit (UTF-7)"
+msgstr "Unicode 7 bits (UTF-7)"
+
+#: ../src/common/fmapbase.cpp:183
+msgid "Unicode 8 bit (UTF-8)"
+msgstr "Unicode 8 bits (UTF-8)"
+
+#: ../src/common/stockitem.cpp:204
+msgid "Unindent"
+msgstr "Sem parágrafo"
+
+#: ../src/richtext/richtextborderspage.cpp:373
+#: ../src/richtext/richtextborderspage.cpp:375
+msgid "Units for the bottom border width."
+msgstr "Unidades para a largura da borda da parte de baixo."
+
+#: ../src/richtext/richtextmarginspage.cpp:278
+#: ../src/richtext/richtextmarginspage.cpp:280
+msgid "Units for the bottom margin."
+msgstr "Unidades para a margem do fundo."
+
+#: ../src/richtext/richtextborderspage.cpp:517
+#: ../src/richtext/richtextborderspage.cpp:519
+msgid "Units for the bottom outline width."
+msgstr "Unidades para a largura do contorno do fundo."
+
+#: ../src/richtext/richtextmarginspage.cpp:392
+#: ../src/richtext/richtextmarginspage.cpp:394
+msgid "Units for the bottom padding."
+msgstr "Unidades para o enchimento do fundo."
+
+#: ../src/richtext/richtextsizepage.cpp:664
+#: ../src/richtext/richtextsizepage.cpp:666
+msgid "Units for the bottom position."
+msgstr "Unidades para a posição do rodapé."
+
+#: ../src/richtext/richtextborderspage.cpp:283
+#: ../src/richtext/richtextborderspage.cpp:285
+msgid "Units for the left border width."
+msgstr "Unidades para a largura da borda a esquerda."
+
+#: ../src/richtext/richtextmarginspage.cpp:205
+#: ../src/richtext/richtextmarginspage.cpp:207
+msgid "Units for the left margin."
+msgstr "Unidades para a margem esquerda."
+
+#: ../src/richtext/richtextborderspage.cpp:427
+#: ../src/richtext/richtextborderspage.cpp:429
+msgid "Units for the left outline width."
+msgstr "Unidades para a largura do contorno a esquerda."
+
+#: ../src/richtext/richtextmarginspage.cpp:319
+#: ../src/richtext/richtextmarginspage.cpp:321
+msgid "Units for the left padding."
+msgstr "Unidades para o enchimento a esquerda."
+
+#: ../src/richtext/richtextsizepage.cpp:559
+#: ../src/richtext/richtextsizepage.cpp:561
+msgid "Units for the left position."
+msgstr "Unidades para a posição da esquerda."
+
+#: ../src/richtext/richtextsizepage.cpp:485
+#: ../src/richtext/richtextsizepage.cpp:487
+msgid "Units for the maximum object height."
+msgstr "Unidades para a altura máxima do objeto."
+
+#: ../src/richtext/richtextsizepage.cpp:458
+#: ../src/richtext/richtextsizepage.cpp:460
+msgid "Units for the maximum object width."
+msgstr "Unidades para a largura máxima do objeto."
+
+#: ../src/richtext/richtextsizepage.cpp:431
+#: ../src/richtext/richtextsizepage.cpp:433
+msgid "Units for the minimum object height."
+msgstr "Unidades para a altura mínima do objeto."
+
+#: ../src/richtext/richtextsizepage.cpp:404
+#: ../src/richtext/richtextsizepage.cpp:406
+msgid "Units for the minimum object width."
+msgstr "Unidades para a largura mínima do objeto."
+
+#: ../src/richtext/richtextsizepage.cpp:377
+#: ../src/richtext/richtextsizepage.cpp:379
+msgid "Units for the object height."
+msgstr "Unidades para a altura do objeto."
+
+#: ../src/richtext/richtextsizepage.cpp:343
+#: ../src/richtext/richtextsizepage.cpp:345
+msgid "Units for the object width."
+msgstr "Unidades para a largura do objeto."
+
+#: ../src/richtext/richtextborderspage.cpp:313
+#: ../src/richtext/richtextborderspage.cpp:315
+msgid "Units for the right border width."
+msgstr "Unidades para a largura da borda a direita."
+
+#: ../src/richtext/richtextmarginspage.cpp:230
+#: ../src/richtext/richtextmarginspage.cpp:232
+msgid "Units for the right margin."
+msgstr "Unidades para a margem a direita."
+
+#: ../src/richtext/richtextborderspage.cpp:457
+#: ../src/richtext/richtextborderspage.cpp:459
+msgid "Units for the right outline width."
+msgstr "Unidades para a largura do contorno a direita."
+
+#: ../src/richtext/richtextmarginspage.cpp:344
+#: ../src/richtext/richtextmarginspage.cpp:346
+msgid "Units for the right padding."
+msgstr "Unidades para o enchimento a direita."
+
+#: ../src/richtext/richtextsizepage.cpp:629
+#: ../src/richtext/richtextsizepage.cpp:631
+msgid "Units for the right position."
+msgstr "Unidades para a posição da direita."
+
+#: ../src/richtext/richtextborderspage.cpp:343
+#: ../src/richtext/richtextborderspage.cpp:345
+msgid "Units for the top border width."
+msgstr "Unidades para a largura da borda do topo."
+
+#: ../src/richtext/richtextmarginspage.cpp:253
+#: ../src/richtext/richtextmarginspage.cpp:255
+msgid "Units for the top margin."
+msgstr "Unidades para a margem do topo."
+
+#: ../src/richtext/richtextborderspage.cpp:487
+#: ../src/richtext/richtextborderspage.cpp:489
+msgid "Units for the top outline width."
+msgstr "Unidades para a largura do contorno do topo."
+
+#: ../src/richtext/richtextmarginspage.cpp:367
+#: ../src/richtext/richtextmarginspage.cpp:369
+msgid "Units for the top padding."
+msgstr "Unidades para o enchimento do topo."
+
+#: ../src/richtext/richtextsizepage.cpp:594
+#: ../src/richtext/richtextsizepage.cpp:596
+msgid "Units for the top position."
+msgstr "Unidades para a posição do topo."
+
+#: ../src/generic/progdlgg.cpp:382 ../src/generic/progdlgg.cpp:655
+msgid "Unknown"
+msgstr "Desconhecido"
+
+#: ../src/msw/dde.cpp:1177
+#, c-format
+msgid "Unknown DDE error %08x"
+msgstr "Erro DDE desconhecido %08x"
+
+#: ../src/common/xtistrm.cpp:414
+msgid "Unknown Object passed to GetObjectClassInfo"
+msgstr "Objeto Desconhecido passado para o GetObjectClassInfo"
+
+#: ../src/common/imagpng.cpp:614
+#, c-format
+msgid "Unknown PNG resolution unit %d"
+msgstr "Unidade de resolução PNG %d desconhecida"
+
+#: ../src/common/xtixml.cpp:327
+#, c-format
+msgid "Unknown Property %s"
+msgstr "Propriedade %s Desconhecida"
+
+#: ../src/common/imagtiff.cpp:532
+#, c-format
+msgid "Unknown TIFF resolution unit %d ignored"
+msgstr "Unidade de resolução TIFF desconhecida %d ignorada"
+
+#: ../src/osx/carbon/dataview.cpp:1978
+msgid "Unknown data format"
+msgstr "Formato dos dados desconhecido"
+
+#: ../src/unix/dlunix.cpp:325
+msgid "Unknown dynamic library error"
+msgstr "Erro da biblioteca dinâmica desconhecido"
+
+#: ../src/common/fmapbase.cpp:810
+#, c-format
+msgid "Unknown encoding (%d)"
+msgstr "Codificação desconhecida (%d)"
+
+#: ../src/msw/ole/automtn.cpp:677
+#, c-format
+msgid "Unknown error %08x"
+msgstr "Erro %08x desconhecido"
+
+#: ../src/msw/ole/automtn.cpp:636
+msgid "Unknown exception"
+msgstr "Exceção desconhecida"
+
+#: ../src/common/image.cpp:2701
+msgid "Unknown image data format."
+msgstr "Formato dos dados da imagem desconhecido."
+
+#: ../src/common/cmdline.cpp:749
+#, c-format
+msgid "Unknown long option '%s'"
+msgstr "Opção longa '%s' desconhecida"
+
+#: ../src/msw/ole/automtn.cpp:620
+msgid "Unknown name or named argument."
+msgstr "Nome desconhecido ou argumento desconhecido."
+
+#: ../src/common/cmdline.cpp:764 ../src/common/cmdline.cpp:786
+#, c-format
+msgid "Unknown option '%s'"
+msgstr "Opção '%s' desconhecida"
+
+#: ../src/common/mimecmn.cpp:230
+#, c-format
+msgid "Unmatched '{' in an entry for mime type %s."
+msgstr "Não combinada '{' em uma entrada para o tipo mime %s."
+
+#: ../src/common/cmdproc.cpp:262 ../src/common/cmdproc.cpp:288
+#: ../src/common/cmdproc.cpp:308
+msgid "Unnamed command"
+msgstr "Comando sem nome"
+
+#: ../src/propgrid/propgrid.cpp:398
+msgid "Unspecified"
+msgstr "Não especificado"
+
+#: ../src/msw/clipbrd.cpp:271 ../src/msw/clipbrd.cpp:439
+msgid "Unsupported clipboard format."
+msgstr "Formato da área de transferência não suportado."
+
+#: ../src/common/appcmn.cpp:249
+#, c-format
+msgid "Unsupported theme '%s'."
+msgstr "Tema '%s' não suportado"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:205
+msgid "Up"
+msgstr "Para cima"
+
+#: ../src/richtext/richtextliststylepage.cpp:483
+#: ../src/richtext/richtextbulletspage.cpp:288
+msgid "Upper case letters"
+msgstr "Letras maiúsculas"
+
+#: ../src/richtext/richtextliststylepage.cpp:485
+#: ../src/richtext/richtextbulletspage.cpp:290
+msgid "Upper case roman numerals"
+msgstr "Numerais romanos maiúsculos"
+
+#: ../src/common/cmdline.cpp:1155
+#, c-format
+msgid "Usage: %s"
+msgstr "Uso: %s"
+
+#: ../src/richtext/richtextindentspage.cpp:169
+#: ../src/richtext/richtextindentspage.cpp:171
+#: ../src/richtext/richtextliststylepage.cpp:358
+#: ../src/richtext/richtextliststylepage.cpp:360
+msgid "Use the current alignment setting."
+msgstr "Usar a configuração de alinhamento atual."
+
+#: ../src/osx/carbon/dataview.cpp:2658 ../src/osx/carbon/dataview.cpp:2723
+msgid "Valid pointer to native data view control does not exist"
+msgstr ""
+"Ponteiro válido para o controle de visualização dos dados nativos não existe"
+
+#: ../src/common/valtext.cpp:174
+msgid "Validation conflict"
+msgstr "Conflito de validação"
+
+#: ../src/propgrid/manager.cpp:238
+msgid "Value"
+msgstr "Valor"
+
+#: ../src/propgrid/props.cpp:384
+#, c-format
+msgid "Value must be %s or higher."
+msgstr "O valor deve ser %s ou maior."
+
+#: ../src/propgrid/props.cpp:411
+#, c-format
+msgid "Value must be %s or less."
+msgstr "O valor deve ser %s ou menor."
+
+#: ../src/propgrid/props.cpp:388 ../src/propgrid/props.cpp:415
+#, c-format
+msgid "Value must be between %s and %s."
+msgstr "O valor deve estar entre %s e %s."
+
+#: ../src/generic/aboutdlgg.cpp:128
+msgid "Version "
+msgstr "Versão"
+
+#: ../src/richtext/richtextsizepage.cpp:291
+#: ../src/richtext/richtextsizepage.cpp:293
+msgid "Vertical alignment."
+msgstr "Alinhamento vertical."
+
+#: ../src/generic/filedlgg.cpp:216
+msgid "View files as a detailed view"
+msgstr "Visualizar osr arquivos em uma visualização detalhada"
+
+#: ../src/generic/filedlgg.cpp:214
+msgid "View files as a list view"
+msgstr "Visualizar os arquivos em uma visualização de listas"
+
+#: ../src/common/docview.cpp:1952
+msgid "Views"
+msgstr "Visualizações"
+
+#: ../src/common/accelcmn.cpp:108
+msgid "WINDOWS_LEFT"
+msgstr "WINDOWS_LEFT"
+
+#: ../src/common/accelcmn.cpp:110
+msgid "WINDOWS_MENU"
+msgstr "WINDOWS_MENU"
+
+#: ../src/common/accelcmn.cpp:109
+msgid "WINDOWS_RIGHT"
+msgstr "WINDOWS_RIGHT"
+
+#: ../src/unix/epolldispatcher.cpp:213
+#, c-format
+msgid "Waiting for IO on epoll descriptor %d failed"
+msgstr "Esperando pelo IO no descritor epoll %d falhou"
+
+#: ../src/common/log.cpp:227
+msgid "Warning: "
+msgstr "Aviso: "
+
+#: ../src/propgrid/advprops.cpp:651
+msgid "Weight"
+msgstr "Peso"
+
+#: ../src/common/fmapbase.cpp:148
+msgid "Western European (ISO-8859-1)"
+msgstr "Europeu Ocidental (ISO-8859-1)"
+
+#: ../src/common/fmapbase.cpp:162
+msgid "Western European with Euro (ISO-8859-15)"
+msgstr "Europeu Ocidental com Euro (ISO-8859-15)"
+
+#: ../src/generic/fontdlgg.cpp:446 ../src/generic/fontdlgg.cpp:448
+msgid "Whether the font is underlined."
+msgstr "Se a fonte está sublinhada."
+
+#: ../src/generic/fdrepdlg.cpp:144
+msgid "Whole word"
+msgstr "Palavra inteira"
+
+#: ../src/html/helpwnd.cpp:547
+msgid "Whole words only"
+msgstr "Apenas palavras inteiras"
+
+#: ../src/univ/themes/win32.cpp:1102
+msgid "Win32 theme"
+msgstr "Tema Win32"
+
+#: ../src/msw/utils.cpp:1220
+msgid "Win32s on Windows 3.1"
+msgstr "Win32s no Windows 3.1"
+
+#: ../src/msw/utils.cpp:1270
+msgid "Windows 2000"
+msgstr "Windows 2000"
+
+#: ../src/msw/utils.cpp:1302
+msgid "Windows 7"
+msgstr "Windows 7"
+
+#: ../src/msw/utils.cpp:1234
+msgid "Windows 95"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1230
+msgid "Windows 95 OSR2"
+msgstr "Windows 95 OSR2"
+
+#: ../src/msw/utils.cpp:1245
+msgid "Windows 98"
+msgstr "Windows 98"
+
+#: ../src/msw/utils.cpp:1241
+msgid "Windows 98 SE"
+msgstr "Windows 98 SE"
+
+#: ../src/msw/utils.cpp:1252
+#, c-format
+msgid "Windows 9x (%d.%d)"
+msgstr "Windows 9x (%d %d)"
+
+#: ../src/common/fmapbase.cpp:177
+msgid "Windows Arabic (CP 1256)"
+msgstr "Windows Árabe (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:178
+msgid "Windows Baltic (CP 1257)"
+msgstr "Windows Báltico (CP 1257)"
+
+#: ../src/msw/utils.cpp:1214
+#, c-format
+msgid "Windows CE (%d.%d)"
+msgstr "Windows CE (%d %d)"
+
+#: ../src/common/fmapbase.cpp:171
+msgid "Windows Central European (CP 1250)"
+msgstr "Windows Europeu Central (CP 1250)"
+
+#: ../src/common/fmapbase.cpp:168
+msgid "Windows Chinese Simplified (CP 936) or GB-2312"
+msgstr "Windows Chinês Simplificado (CP 936) ou GB-2312"
+
+#: ../src/common/fmapbase.cpp:170
+msgid "Windows Chinese Traditional (CP 950) or Big-5"
+msgstr "Windows Chinês Tradicional (CP 950) ou Big-5"
+
+#: ../src/common/fmapbase.cpp:172
+msgid "Windows Cyrillic (CP 1251)"
+msgstr "Windows Cirílico (CP 1251)"
+
+#: ../src/common/fmapbase.cpp:174
+msgid "Windows Greek (CP 1253)"
+msgstr "Windows Grego (CP 1253)"
+
+#: ../src/common/fmapbase.cpp:176
+msgid "Windows Hebrew (CP 1255)"
+msgstr "Windows Hebraico (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:167
+msgid "Windows Japanese (CP 932) or Shift-JIS"
+msgstr "Windows Japonês (CP 932) ou Shift-JIS"
+
+#: ../src/common/fmapbase.cpp:180
+msgid "Windows Johab (CP 1361)"
+msgstr "Windows Johab (CP 1361)"
+
+#: ../src/common/fmapbase.cpp:169
+msgid "Windows Korean (CP 949)"
+msgstr "Windows Coreano (CP 949)"
+
+#: ../src/msw/utils.cpp:1249
+msgid "Windows ME"
+msgstr "Windows ME"
+
+#: ../src/msw/utils.cpp:1310
+#, c-format
+msgid "Windows NT %lu.%lu"
+msgstr "Windows NT %lu.%lu"
+
+#: ../src/msw/utils.cpp:1279
+msgid "Windows Server 2003"
+msgstr "Windows Server 2003"
+
+#: ../src/msw/utils.cpp:1295
+msgid "Windows Server 2008"
+msgstr "Windows Server 2008"
+
+#: ../src/msw/utils.cpp:1301
+msgid "Windows Server 2008 R2"
+msgstr "Windows Server 2008 R2"
+
+#: ../src/common/fmapbase.cpp:166
+msgid "Windows Thai (CP 874)"
+msgstr "Windows Tailandês (CP 874)"
+
+#: ../src/common/fmapbase.cpp:175
+msgid "Windows Turkish (CP 1254)"
+msgstr "Windows Turco (CP 1254)"
+
+#: ../src/common/fmapbase.cpp:179
+msgid "Windows Vietnamese (CP 1258)"
+msgstr "Windows Vietnamita (CP 1258)"
+
+#: ../src/msw/utils.cpp:1296
+msgid "Windows Vista"
+msgstr "Windows Vista"
+
+#: ../src/common/fmapbase.cpp:173
+msgid "Windows Western European (CP 1252)"
+msgstr "Windows Europeu Ocidental (CP 1252)"
+
+#: ../src/msw/utils.cpp:1285
+msgid "Windows XP"
+msgstr "Windows XP"
+
+#: ../src/common/fmapbase.cpp:181
+msgid "Windows/DOS OEM (CP 437)"
+msgstr "Windows/DOS OEM (CP 437)"
+
+#: ../src/common/fmapbase.cpp:165
+msgid "Windows/DOS OEM Cyrillic (CP 866)"
+msgstr "Windows/DOS OEM Cirílico (CP 866)"
+
+#: ../src/common/ffile.cpp:148
+#, c-format
+msgid "Write error on file '%s'"
+msgstr "Erro de escrita no arquivo '%s'"
+
+#: ../src/xml/xml.cpp:844
+#, c-format
+msgid "XML parsing error: '%s' at line %d"
+msgstr "Erro de análise do XML: '%s' na linha %d"
+
+#: ../src/common/xpmdecod.cpp:796
+msgid "XPM: Malformed pixel data!"
+msgstr "XPM: Dados dos pixels mal formados!"
+
+#: ../src/common/xpmdecod.cpp:705
+#, c-format
+msgid "XPM: incorrect colour description in line %d"
+msgstr "XPM: descrição da cor incorreta na linha %d!"
+
+#: ../src/common/xpmdecod.cpp:680
+msgid "XPM: incorrect header format!"
+msgstr "XPM: formato do cabeçalho inválido!"
+
+#: ../src/common/xpmdecod.cpp:716 ../src/common/xpmdecod.cpp:725
+#, c-format
+msgid "XPM: malformed colour definition '%s' at line %d!"
+msgstr "XPM: definição da cor mal formada '%s' na linha %d!"
+
+#: ../src/common/xpmdecod.cpp:755
+msgid "XPM: no colors left to use for mask!"
+msgstr "XPM: sem cores restantes para usar para a máscara!"
+
+#: ../src/common/xpmdecod.cpp:782
+#, c-format
+msgid "XPM: truncated image data at line %d!"
+msgstr "XPM: dados da imagem truncados na linha %d!"
+
+#: ../include/wx/msgdlg.h:271 ../src/common/stockitem.cpp:206
+#: ../src/motif/msgdlg.cpp:196
+msgid "Yes"
+msgstr "Sim"
+
+#: ../src/osx/carbon/overlay.cpp:155
+msgid "You cannot Clear an overlay that is not inited"
+msgstr "Você não pode limpar um overlay que não é iniciado"
+
+#: ../src/osx/carbon/overlay.cpp:107 ../src/dfb/overlay.cpp:61
+msgid "You cannot Init an overlay twice"
+msgstr "Você não pode iniciar um overlay duas vezes"
+
+#: ../src/generic/dirdlgg.cpp:316
+msgid "You cannot add a new directory to this section."
+msgstr "Você não pode adicionar um novo diretório a esta seção."
+
+#: ../src/propgrid/propgrid.cpp:3258
+msgid "You have entered invalid value. Press ESC to cancel editing."
+msgstr "Você inseriu um valor inválido. Pressione ESC pra cancelar a edição."
+
+#: ../src/common/stockitem.cpp:209
+msgid "Zoom &In"
+msgstr "Aumentar &Zoom"
+
+#: ../src/common/stockitem.cpp:210
+msgid "Zoom &Out"
+msgstr "Diminuir &Zoom"
+
+#: ../src/common/stockitem.cpp:209 ../src/common/prntbase.cpp:1564
+msgid "Zoom In"
+msgstr "Aumentar Zoom"
+
+#: ../src/common/stockitem.cpp:210 ../src/common/prntbase.cpp:1550
+msgid "Zoom Out"
+msgstr "Diminuir Zoom"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to &Fit"
+msgstr "Zoom para &Encaixar"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to Fit"
+msgstr "Zoom pra Encaixar"
+
+#: ../src/msw/dde.cpp:1144
+msgid "a DDEML application has created a prolonged race condition."
+msgstr "um aplicativo DDEML criou uma condição de corrida prolongada."
+
+#: ../src/msw/dde.cpp:1132
+msgid ""
+"a DDEML function was called without first calling the DdeInitialize "
+"function,\n"
+"or an invalid instance identifier\n"
+"was passed to a DDEML function."
+msgstr ""
+"uma função DDEML foi chamada sem primeiro chamar a função DdeInitialize,\n"
+"ou um identificador de instância inválido\n"
+"foi passado para uma função DDEML."
+
+#: ../src/msw/dde.cpp:1150
+msgid "a client's attempt to establish a conversation has failed."
+msgstr "Uma tentativa de um cliente de estabelecer uma conversação falhou."
+
+#: ../src/msw/dde.cpp:1147
+msgid "a memory allocation failed."
+msgstr "Uma distribuição de memória falhou."
+
+#: ../src/msw/dde.cpp:1141
+msgid "a parameter failed to be validated by the DDEML."
+msgstr "Um parâmetro falhou em ser validado pelo DDEML."
+
+#: ../src/msw/dde.cpp:1123
+msgid "a request for a synchronous advise transaction has timed out."
+msgstr ""
+"o tempo para um pedido para uma transação de recomendação síncrona se "
+"esgotou."
+
+#: ../src/msw/dde.cpp:1129
+msgid "a request for a synchronous data transaction has timed out."
+msgstr ""
+"o tempo para um pedido para uma transação de dados síncrona se esgotou."
+
+#: ../src/msw/dde.cpp:1138
+msgid "a request for a synchronous execute transaction has timed out."
+msgstr ""
+"o tempo para um pedido para uma transação de execução síncrona se esgotou."
+
+#: ../src/msw/dde.cpp:1156
+msgid "a request for a synchronous poke transaction has timed out."
+msgstr ""
+"o tempo para um pedido para uma transação de empurrão síncrona se esgotou."
+
+#: ../src/msw/dde.cpp:1171
+msgid "a request to end an advise transaction has timed out."
+msgstr "o tempo para terminar uma transação de recomendação se esgotou."
+
+#: ../src/msw/dde.cpp:1165
+msgid ""
+"a server-side transaction was attempted on a conversation\n"
+"that was terminated by the client, or the server\n"
+"terminated before completing a transaction."
+msgstr ""
+"uma transação do lado do servidor foi tentada em uma conversação\n"
+"que foi terminada pelo cliente, ou o servidor\n"
+"terminou antes de completar uma transação."
+
+#: ../src/msw/dde.cpp:1153
+msgid "a transaction failed."
+msgstr "um transação falhou."
+
+#: ../src/common/accelcmn.cpp:184
+msgid "alt"
+msgstr "alt"
+
+#: ../src/msw/dde.cpp:1135
+msgid ""
+"an application initialized as APPCLASS_MONITOR has\n"
+"attempted to perform a DDE transaction,\n"
+"or an application initialized as APPCMD_CLIENTONLY has \n"
+"attempted to perform server transactions."
+msgstr ""
+"um aplicativo inicializado como APPCLASS_MONITOR tentou,\n"
+"realizar uma transação DDE,\n"
+"ou um aplicativo inicializado como APPCMD_CLIENTONLY tentou \n"
+"realizar transações de servidor."
+
+#: ../src/msw/dde.cpp:1159
+msgid "an internal call to the PostMessage function has failed. "
+msgstr "uma chamada interna para a função PostMessage falhou."
+
+#: ../src/msw/dde.cpp:1168
+msgid "an internal error has occurred in the DDEML."
+msgstr "um erro interno ocorreu no DDEML."
+
+#: ../src/msw/dde.cpp:1174
+msgid ""
+"an invalid transaction identifier was passed to a DDEML function.\n"
+"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n"
+"the transaction identifier for that callback is no longer valid."
+msgstr ""
+"um identificador de transação inválido foi passado para uma função DDEML.\n"
+"Uma vez que o aplicativo retornou de um callback XTYP_XACT_COMPLETE,\n"
+"o identificador da transação para aquele callback não é mais válido."
+
+#: ../src/common/zipstrm.cpp:1272
+msgid "assuming this is a multi-part zip concatenated"
+msgstr "assumindo que este é um zip multi-partes concatenado"
+
+#: ../src/common/fileconf.cpp:1882
+#, c-format
+msgid "attempt to change immutable key '%s' ignored."
+msgstr "tentativa de mudar a chave imutável '%s' ignorada."
+
+#: ../src/html/chm.cpp:329
+msgid "bad arguments to library function"
+msgstr "argumentos ruins para a função da biblioteca"
+
+#: ../src/html/chm.cpp:341
+msgid "bad signature"
+msgstr "assinatura ruim"
+
+#: ../src/common/zipstrm.cpp:1715
+msgid "bad zipfile offset to entry"
+msgstr "offset do arquivo zip ruim para a entrada"
+
+#: ../src/common/ftp.cpp:405
+msgid "binary"
+msgstr "binário"
+
+#: ../src/common/fontcmn.cpp:978
+msgid "bold"
+msgstr "negrito"
+
+#: ../src/os2/iniconf.cpp:463
+msgid "buffer is too small for Windows directory."
+msgstr "o buffer é muito pequeno para o diretório do Windows"
+
+#: ../src/msw/utils.cpp:1316
+#, c-format
+msgid "build %lu"
+msgstr "build %lu"
+
+#: ../src/common/ffile.cpp:79
+#, c-format
+msgid "can't close file '%s'"
+msgstr "não pode fechar o arquivo '%s'"
+
+#: ../src/common/file.cpp:278
+#, c-format
+msgid "can't close file descriptor %d"
+msgstr "não pode fechar o descritor de arquivo %d"
+
+#: ../src/common/file.cpp:604
+#, c-format
+msgid "can't commit changes to file '%s'"
+msgstr "não pode entregar as mudanças para o arquivo '%s'"
+
+#: ../src/common/file.cpp:212
+#, c-format
+msgid "can't create file '%s'"
+msgstr "não pode criar o arquivo '%s'"
+
+#: ../src/common/fileconf.cpp:1176
+#, c-format
+msgid "can't delete user configuration file '%s'"
+msgstr "não pode apagar o arquivo de configuração do usuário '%s'"
+
+#: ../src/common/file.cpp:511
+#, c-format
+msgid "can't determine if the end of file is reached on descriptor %d"
+msgstr "não pode determinar se o final do arquivo é alcançado no descritor %d"
+
+#: ../src/msdos/utilsdos.cpp:310 ../src/msdos/utilsdos.cpp:475
+#, c-format
+msgid "can't execute '%s'"
+msgstr "não pode executar '%s'"
+
+#: ../src/common/zipstrm.cpp:1490
+msgid "can't find central directory in zip"
+msgstr "não pode achar o diretório central no zip"
+
+#: ../src/common/file.cpp:481
+#, c-format
+msgid "can't find length of file on file descriptor %d"
+msgstr "não pode achar o tamanho do arquivo no descritor de arquivos %d"
+
+#: ../src/msw/utils.cpp:373
+msgid "can't find user's HOME, using current directory."
+msgstr "não pode achar o HOME do usuário, usando o diretório atual."
+
+#: ../src/common/file.cpp:382
+#, c-format
+msgid "can't flush file descriptor %d"
+msgstr "não pode dar descarga no descritor de arquivos %d"
+
+#: ../src/common/file.cpp:438 ../src/msw/wince/filefnwce.cpp:204
+#, c-format
+msgid "can't get seek position on file descriptor %d"
+msgstr "não pode obter a posição de procura no descritor de arquivos %d"
+
+#: ../src/common/fontmap.cpp:325
+msgid "can't load any font, aborting"
+msgstr "não pode carregar qualquer fonte, abortando"
+
+#: ../src/common/file.cpp:264 ../src/common/ffile.cpp:63
+#, c-format
+msgid "can't open file '%s'"
+msgstr "não pode abrir o arquivo '%s'"
+
+#: ../src/common/fileconf.cpp:351
+#, c-format
+msgid "can't open global configuration file '%s'."
+msgstr "não pode abrir o arquivo de configuração global '%s'."
+
+#: ../src/common/fileconf.cpp:367
+#, c-format
+msgid "can't open user configuration file '%s'."
+msgstr "não pode abrir o arquivo de configuração do usuário '%s'."
+
+#: ../src/common/fileconf.cpp:1017
+msgid "can't open user configuration file."
+msgstr "não pode abrir o arquivo de configuração do usuário."
+
+#: ../src/common/zipstrm.cpp:527
+msgid "can't re-initialize zlib deflate stream"
+msgstr "não pode reinicializar o fluxo de deflação zlib"
+
+#: ../src/common/zipstrm.cpp:552
+msgid "can't re-initialize zlib inflate stream"
+msgstr "não pode reinicializar o sistema de inflação zlib"
+
+#: ../src/common/file.cpp:334
+#, c-format
+msgid "can't read from file descriptor %d"
+msgstr "não pode ler do descritor de arquivos %d"
+
+#: ../src/common/file.cpp:599
+#, c-format
+msgid "can't remove file '%s'"
+msgstr "não pode remover o arquivo '%s'"
+
+#: ../src/common/file.cpp:616
+#, c-format
+msgid "can't remove temporary file '%s'"
+msgstr "não pode remover o arquivo temporário '%s'"
+
+#: ../src/common/file.cpp:424 ../src/msw/wince/filefnwce.cpp:190
+#, c-format
+msgid "can't seek on file descriptor %d"
+msgstr "não pode procurar no descritor de arquivos %d"
+
+#: ../src/common/textfile.cpp:299
+#, c-format
+msgid "can't write buffer '%s' to disk."
+msgstr "não pode escrever o '%s' no disco."
+
+#: ../src/common/file.cpp:350
+#, c-format
+msgid "can't write to file descriptor %d"
+msgstr "não pode escrever no descritor de arquivos %d"
+
+#: ../src/common/fileconf.cpp:1031
+msgid "can't write user configuration file."
+msgstr "não pode escrever o arquivo de configuração do usuário."
+
+#: ../src/html/chm.cpp:345
+msgid "checksum error"
+msgstr "erro de checksum"
+
+#: ../src/common/tarstrm.cpp:820
+msgid "checksum failure reading tar header block"
+msgstr "falhou do checksum ao ler o bloco do cabeçalho tar"
+
+#: ../src/richtext/richtextborderspage.cpp:280
+#: ../src/richtext/richtextborderspage.cpp:310
+#: ../src/richtext/richtextborderspage.cpp:340
+#: ../src/richtext/richtextborderspage.cpp:370
+#: ../src/richtext/richtextborderspage.cpp:424
+#: ../src/richtext/richtextborderspage.cpp:454
+#: ../src/richtext/richtextborderspage.cpp:484
+#: ../src/richtext/richtextborderspage.cpp:514
+#: ../src/richtext/richtextmarginspage.cpp:202
+#: ../src/richtext/richtextmarginspage.cpp:227
+#: ../src/richtext/richtextmarginspage.cpp:250
+#: ../src/richtext/richtextmarginspage.cpp:275
+#: ../src/richtext/richtextmarginspage.cpp:316
+#: ../src/richtext/richtextmarginspage.cpp:341
+#: ../src/richtext/richtextmarginspage.cpp:364
+#: ../src/richtext/richtextmarginspage.cpp:389
+#: ../src/richtext/richtextsizepage.cpp:339
+#: ../src/richtext/richtextsizepage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:400
+#: ../src/richtext/richtextsizepage.cpp:427
+#: ../src/richtext/richtextsizepage.cpp:454
+#: ../src/richtext/richtextsizepage.cpp:481
+#: ../src/richtext/richtextsizepage.cpp:555
+#: ../src/richtext/richtextsizepage.cpp:590
+#: ../src/richtext/richtextsizepage.cpp:625
+#: ../src/richtext/richtextsizepage.cpp:660
+msgid "cm"
+msgstr "cm"
+
+#: ../src/html/chm.cpp:347
+msgid "compression error"
+msgstr "erro de compressão"
+
+#: ../src/common/regex.cpp:239
+msgid "conversion to 8-bit encoding failed"
+msgstr "conversão para a codificação de 8 bits falhou"
+
+#: ../src/common/accelcmn.cpp:182
+msgid "ctrl"
+msgstr "ctrl"
+
+#: ../src/common/cmdline.cpp:1323
+msgid "date"
+msgstr "data"
+
+#: ../src/html/chm.cpp:349
+msgid "decompression error"
+msgstr "erro de descompressão"
+
+#: ../src/richtext/richtextstyles.cpp:780 ../src/common/fmapbase.cpp:820
+msgid "default"
+msgstr "padrão"
+
+#: ../src/common/cmdline.cpp:1319
+msgid "double"
+msgstr "duplo"
+
+#: ../src/common/debugrpt.cpp:543
+msgid "dump of the process state (binary)"
+msgstr "dump do estado do processo (binário)"
+
+#: ../src/common/datetimefmt.cpp:1936
+msgid "eighteenth"
+msgstr "décimo-oitavo"
+
+#: ../src/common/datetimefmt.cpp:1926
+msgid "eighth"
+msgstr "oitavo"
+
+#: ../src/common/datetimefmt.cpp:1929
+msgid "eleventh"
+msgstr "décimo-primeiro"
+
+#: ../src/common/fileconf.cpp:1868
+#, c-format
+msgid "entry '%s' appears more than once in group '%s'"
+msgstr "a entrada '%s' aparece mais de uma vez no grupo '%s'"
+
+#: ../src/html/chm.cpp:343
+msgid "error in data format"
+msgstr "erro no formato dos dados"
+
+#: ../src/msdos/utilsdos.cpp:413
+#, c-format
+msgid "error opening '%s'"
+msgstr "erro ao abrir '%s'"
+
+#: ../src/html/chm.cpp:331
+msgid "error opening file"
+msgstr "erro ao abrir o arquivo"
+
+#: ../src/common/zipstrm.cpp:1576
+msgid "error reading zip central directory"
+msgstr "erro lendo o diretório central do zip"
+
+#: ../src/common/zipstrm.cpp:1667
+msgid "error reading zip local header"
+msgstr "erro lendo o cabeçalho local do zip"
+
+#: ../src/common/zipstrm.cpp:2396
+#, c-format
+msgid "error writing zip entry '%s': bad crc or length"
+msgstr "erro escrevendo a entrada do zip '%s': crc ou tamanho ruim"
+
+#: ../src/common/ffile.cpp:170
+#, c-format
+msgid "failed to flush the file '%s'"
+msgstr "falhou em dar descarga no arquivo '%s'"
+
+#: ../src/common/datetimefmt.cpp:1933
+msgid "fifteenth"
+msgstr "décimo-quinto"
+
+#: ../src/common/datetimefmt.cpp:1923
+msgid "fifth"
+msgstr "quinto"
+
+#: ../src/common/fileconf.cpp:610
+#, c-format
+msgid "file '%s', line %d: '%s' ignored after group header."
+msgstr "arquivo '%s', linha %d: '%s' ignorado após o cabeçalho do grupo."
+
+#: ../src/common/fileconf.cpp:639
+#, c-format
+msgid "file '%s', line %d: '=' expected."
+msgstr "arquivo '%s', linha %d: '=' esperado."
+
+#: ../src/common/fileconf.cpp:662
+#, c-format
+msgid "file '%s', line %d: key '%s' was first found at line %d."
+msgstr "arquivo '%s', linha %d: chave '%s' foi achada primeiro na linha %d."
+
+#: ../src/common/fileconf.cpp:652
+#, c-format
+msgid "file '%s', line %d: value for immutable key '%s' ignored."
+msgstr "arquivo '%s', linha %d: valor para a chave imutável '%s' ignorado."
+
+#: ../src/common/fileconf.cpp:574
+#, c-format
+msgid "file '%s': unexpected character %c at line %d."
+msgstr "arquivo '%s': caractere %c ineperado na linha %d."
+
+#: ../src/richtext/richtextbuffer.cpp:8358
+msgid "files"
+msgstr "arquivos"
+
+#: ../src/common/datetimefmt.cpp:1919
+msgid "first"
+msgstr "primeiro"
+
+#: ../src/html/helpwnd.cpp:1265
+msgid "font size"
+msgstr "tamanho da fonte"
+
+#: ../src/common/datetimefmt.cpp:1932
+msgid "fourteenth"
+msgstr "décimo-quarto"
+
+#: ../src/common/datetimefmt.cpp:1922
+msgid "fourth"
+msgstr "quarto"
+
+#: ../src/common/appbase.cpp:695
+msgid "generate verbose log messages"
+msgstr "gerar mensagens de log verbose"
+
+#: ../src/richtext/richtextbuffer.cpp:12212
+#: ../src/richtext/richtextbuffer.cpp:12322
+msgid "image"
+msgstr "imagem"
+
+#: ../src/common/tarstrm.cpp:796
+msgid "incomplete header block in tar"
+msgstr "bloco do cabeçalho incompleto no tar"
+
+#: ../src/common/xtixml.cpp:489
+msgid "incorrect event handler string, missing dot"
+msgstr "string do manejador de eventos incorreta; ponto desaparecido"
+
+#: ../src/common/tarstrm.cpp:1381
+msgid "incorrect size given for tar entry"
+msgstr "tamanho incorreto dado para a entrada tar"
+
+#: ../src/common/tarstrm.cpp:993
+msgid "invalid data in extended tar header"
+msgstr "dados inválidos no cabeçalho estendido tar"
+
+#: ../src/generic/logg.cpp:1050
+msgid "invalid message box return value"
+msgstr "valor de retorno da caixa de mensagem inválido"
+
+#: ../src/common/zipstrm.cpp:1445
+msgid "invalid zip file"
+msgstr "arquivo zip inválido"
+
+#: ../src/common/fontcmn.cpp:983
+msgid "italic"
+msgstr "itálico"
+
+#: ../src/common/fontcmn.cpp:973
+msgid "light"
+msgstr "leve"
+
+#: ../src/common/intl.cpp:293
+#, c-format
+msgid "locale '%s' cannot be set."
+msgstr "local '%s' não pode ser definido."
+
+#: ../src/common/datetimefmt.cpp:2092
+msgid "midnight"
+msgstr "meia-noite"
+
+#: ../src/common/datetimefmt.cpp:1937
+msgid "nineteenth"
+msgstr "décimo-nono"
+
+#: ../src/common/datetimefmt.cpp:1927
+msgid "ninth"
+msgstr "nono"
+
+#: ../src/msw/dde.cpp:1119
+msgid "no DDE error."
+msgstr "nenhum erro DDE."
+
+#: ../src/html/chm.cpp:327
+msgid "no error"
+msgstr "nenhum erro"
+
+#: ../src/dfb/fontmgr.cpp:174
+#, c-format
+msgid "no fonts found in %s, using builtin font"
+msgstr "sem fontes achadas em %s, usando a fonte embutida"
+
+#: ../src/html/helpdata.cpp:655
+msgid "noname"
+msgstr "sem nome"
+
+#: ../src/common/datetimefmt.cpp:2091
+msgid "noon"
+msgstr "meio-dia"
+
+#: ../src/richtext/richtextstyles.cpp:779
+msgid "normal"
+msgstr "nrmal"
+
+#: ../src/gtk/print.cpp:1218 ../src/gtk/print.cpp:1323
+msgid "not implemented"
+msgstr "não implementado"
+
+#: ../src/common/cmdline.cpp:1315
+msgid "num"
+msgstr "num"
+
+#: ../src/common/xtixml.cpp:259
+msgid "objects cannot have XML Text Nodes"
+msgstr "objetos não podem ter Nodes de Texto XML"
+
+#: ../src/html/chm.cpp:339
+msgid "out of memory"
+msgstr "falta memória"
+
+#: ../src/richtext/richtextsizepage.cpp:340
+#: ../src/richtext/richtextsizepage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:401
+#: ../src/richtext/richtextsizepage.cpp:428
+#: ../src/richtext/richtextsizepage.cpp:455
+#: ../src/richtext/richtextsizepage.cpp:482
+#: ../src/richtext/richtextsizepage.cpp:556
+#: ../src/richtext/richtextsizepage.cpp:591
+#: ../src/richtext/richtextsizepage.cpp:626
+#: ../src/richtext/richtextsizepage.cpp:661
+msgid "percent"
+msgstr "por cento"
+
+#: ../src/common/debugrpt.cpp:519
+msgid "process context description"
+msgstr "descrição do contexto do processo"
+
+#: ../src/richtext/richtextfontpage.cpp:186
+#: ../src/richtext/richtextfontpage.cpp:189
+msgid "pt"
+msgstr "pt"
+
+#: ../src/richtext/richtextfontpage.cpp:187
+#: ../src/richtext/richtextborderspage.cpp:279
+#: ../src/richtext/richtextborderspage.cpp:281
+#: ../src/richtext/richtextborderspage.cpp:282
+#: ../src/richtext/richtextborderspage.cpp:309
+#: ../src/richtext/richtextborderspage.cpp:311
+#: ../src/richtext/richtextborderspage.cpp:312
+#: ../src/richtext/richtextborderspage.cpp:339
+#: ../src/richtext/richtextborderspage.cpp:341
+#: ../src/richtext/richtextborderspage.cpp:342
+#: ../src/richtext/richtextborderspage.cpp:369
+#: ../src/richtext/richtextborderspage.cpp:371
+#: ../src/richtext/richtextborderspage.cpp:372
+#: ../src/richtext/richtextborderspage.cpp:423
+#: ../src/richtext/richtextborderspage.cpp:425
+#: ../src/richtext/richtextborderspage.cpp:426
+#: ../src/richtext/richtextborderspage.cpp:453
+#: ../src/richtext/richtextborderspage.cpp:455
+#: ../src/richtext/richtextborderspage.cpp:456
+#: ../src/richtext/richtextborderspage.cpp:483
+#: ../src/richtext/richtextborderspage.cpp:485
+#: ../src/richtext/richtextborderspage.cpp:486
+#: ../src/richtext/richtextborderspage.cpp:513
+#: ../src/richtext/richtextborderspage.cpp:515
+#: ../src/richtext/richtextborderspage.cpp:516
+#: ../src/richtext/richtextmarginspage.cpp:201
+#: ../src/richtext/richtextmarginspage.cpp:203
+#: ../src/richtext/richtextmarginspage.cpp:204
+#: ../src/richtext/richtextmarginspage.cpp:226
+#: ../src/richtext/richtextmarginspage.cpp:228
+#: ../src/richtext/richtextmarginspage.cpp:229
+#: ../src/richtext/richtextmarginspage.cpp:249
+#: ../src/richtext/richtextmarginspage.cpp:251
+#: ../src/richtext/richtextmarginspage.cpp:252
+#: ../src/richtext/richtextmarginspage.cpp:274
+#: ../src/richtext/richtextmarginspage.cpp:276
+#: ../src/richtext/richtextmarginspage.cpp:277
+#: ../src/richtext/richtextmarginspage.cpp:315
+#: ../src/richtext/richtextmarginspage.cpp:317
+#: ../src/richtext/richtextmarginspage.cpp:318
+#: ../src/richtext/richtextmarginspage.cpp:340
+#: ../src/richtext/richtextmarginspage.cpp:342
+#: ../src/richtext/richtextmarginspage.cpp:343
+#: ../src/richtext/richtextmarginspage.cpp:363
+#: ../src/richtext/richtextmarginspage.cpp:365
+#: ../src/richtext/richtextmarginspage.cpp:366
+#: ../src/richtext/richtextmarginspage.cpp:388
+#: ../src/richtext/richtextmarginspage.cpp:390
+#: ../src/richtext/richtextmarginspage.cpp:391
+#: ../src/richtext/richtextsizepage.cpp:338
+#: ../src/richtext/richtextsizepage.cpp:341
+#: ../src/richtext/richtextsizepage.cpp:342
+#: ../src/richtext/richtextsizepage.cpp:372
+#: ../src/richtext/richtextsizepage.cpp:375
+#: ../src/richtext/richtextsizepage.cpp:376
+#: ../src/richtext/richtextsizepage.cpp:399
+#: ../src/richtext/richtextsizepage.cpp:402
+#: ../src/richtext/richtextsizepage.cpp:403
+#: ../src/richtext/richtextsizepage.cpp:426
+#: ../src/richtext/richtextsizepage.cpp:429
+#: ../src/richtext/richtextsizepage.cpp:430
+#: ../src/richtext/richtextsizepage.cpp:453
+#: ../src/richtext/richtextsizepage.cpp:456
+#: ../src/richtext/richtextsizepage.cpp:457
+#: ../src/richtext/richtextsizepage.cpp:480
+#: ../src/richtext/richtextsizepage.cpp:483
+#: ../src/richtext/richtextsizepage.cpp:484
+#: ../src/richtext/richtextsizepage.cpp:554
+#: ../src/richtext/richtextsizepage.cpp:557
+#: ../src/richtext/richtextsizepage.cpp:558
+#: ../src/richtext/richtextsizepage.cpp:589
+#: ../src/richtext/richtextsizepage.cpp:592
+#: ../src/richtext/richtextsizepage.cpp:593
+#: ../src/richtext/richtextsizepage.cpp:624
+#: ../src/richtext/richtextsizepage.cpp:627
+#: ../src/richtext/richtextsizepage.cpp:628
+#: ../src/richtext/richtextsizepage.cpp:659
+#: ../src/richtext/richtextsizepage.cpp:662
+#: ../src/richtext/richtextsizepage.cpp:663
+msgid "px"
+msgstr "px"
+
+#: ../src/common/accelcmn.cpp:188
+msgid "rawctrl"
+msgstr "rawctrl"
+
+#: ../src/html/chm.cpp:333
+msgid "read error"
+msgstr "erro de leitura"
+
+#: ../src/common/zipstrm.cpp:1882
+#, c-format
+msgid "reading zip stream (entry %s): bad crc"
+msgstr "lendo o fluxo zip (entrada %s): crc ruim"
+
+#: ../src/common/zipstrm.cpp:1877
+#, c-format
+msgid "reading zip stream (entry %s): bad length"
+msgstr "lendo o fluxo zip (entrada %s): tamanho ruim"
+
+#: ../src/msw/dde.cpp:1162
+msgid "reentrancy problem."
+msgstr "problema na re-entrada."
+
+#: ../src/common/datetimefmt.cpp:1920
+msgid "second"
+msgstr "segundo"
+
+#: ../src/html/chm.cpp:337
+msgid "seek error"
+msgstr "erro de busca"
+
+#: ../src/common/datetimefmt.cpp:1935
+msgid "seventeenth"
+msgstr "décimo-sétimo"
+
+#: ../src/common/datetimefmt.cpp:1925
+msgid "seventh"
+msgstr "sétimo"
+
+#: ../src/common/accelcmn.cpp:186
+msgid "shift"
+msgstr "shift"
+
+#: ../src/common/appbase.cpp:685
+msgid "show this help message"
+msgstr "mostrar esta mensagem de ajuda"
+
+#: ../src/common/datetimefmt.cpp:1934
+msgid "sixteenth"
+msgstr "décimo-sexto"
+
+#: ../src/common/datetimefmt.cpp:1924
+msgid "sixth"
+msgstr "sexto"
+
+#: ../src/common/appcmn.cpp:227
+msgid "specify display mode to use (e.g. 640x480-16)"
+msgstr "especificar o modo de exibição a usar ( ex: 640x480-16)"
+
+#: ../src/common/appcmn.cpp:213
+msgid "specify the theme to use"
+msgstr "especificar o tema a usar"
+
+#: ../src/richtext/richtextbuffer.cpp:8876
+msgid "standard/circle"
+msgstr "padrão/círculo"
+
+#: ../src/richtext/richtextbuffer.cpp:8877
+msgid "standard/circle-outline"
+msgstr "padrão/círculo-contorno"
+
+#: ../src/richtext/richtextbuffer.cpp:8879
+msgid "standard/diamond"
+msgstr "padrão/diamante"
+
+#: ../src/richtext/richtextbuffer.cpp:8878
+msgid "standard/square"
+msgstr "padrão/quadrado"
+
+#: ../src/richtext/richtextbuffer.cpp:8880
+msgid "standard/triangle"
+msgstr "padrão/triângulo"
+
+#: ../src/common/zipstrm.cpp:1782
+msgid "stored file length not in Zip header"
+msgstr "tamanho do arquivo armazenado não no cabeçalho Zip"
+
+#: ../src/common/cmdline.cpp:1311
+msgid "str"
+msgstr "str"
+
+#: ../src/common/fontcmn.cpp:794 ../src/common/fontcmn.cpp:969
+msgid "strikethrough"
+msgstr "strikethrough"
+
+#: ../src/common/tarstrm.cpp:1003 ../src/common/tarstrm.cpp:1025
+#: ../src/common/tarstrm.cpp:1507 ../src/common/tarstrm.cpp:1529
+msgid "tar entry not open"
+msgstr "entrada tar não aberta"
+
+#: ../src/common/datetimefmt.cpp:1928
+msgid "tenth"
+msgstr "décimo"
+
+#: ../src/msw/dde.cpp:1126
+msgid "the response to the transaction caused the DDE_FBUSY bit to be set."
+msgstr "a resposta para a transação fez o bit DDE_FBUSY ser definido."
+
+#: ../src/common/datetimefmt.cpp:1921
+msgid "third"
+msgstr "terceiro"
+
+#: ../src/common/datetimefmt.cpp:1931
+msgid "thirteenth"
+msgstr "décimo-terceiro"
+
+#: ../src/common/datetimefmt.cpp:1725
+msgid "today"
+msgstr "hoje"
+
+#: ../src/common/datetimefmt.cpp:1727
+msgid "tomorrow"
+msgstr "amanhã"
+
+#: ../src/common/fileconf.cpp:1979
+#, c-format
+msgid "trailing backslash ignored in '%s'"
+msgstr "backslash de rastreamente ignorado em '%s'"
+
+#: ../src/gtk/aboutdlg.cpp:218
+msgid "translator-credits"
+msgstr "tradutor-créditos"
+
+#: ../src/common/datetimefmt.cpp:1930
+msgid "twelfth"
+msgstr "décimo-segundo"
+
+#: ../src/common/datetimefmt.cpp:1938
+msgid "twentieth"
+msgstr "vigésimo"
+
+#: ../src/common/fontcmn.cpp:789 ../src/common/fontcmn.cpp:965
+msgid "underlined"
+msgstr "sublinhado"
+
+#: ../src/common/fileconf.cpp:2014
+#, c-format
+msgid "unexpected \" at position %d in '%s'."
+msgstr "inesperado \" na posição %d de '%s'."
+
+#: ../src/common/tarstrm.cpp:1045
+msgid "unexpected end of file"
+msgstr "fim de arquivo inesperado"
+
+#: ../src/generic/progdlgg.cpp:399 ../src/common/tarstrm.cpp:371
+#: ../src/common/tarstrm.cpp:394 ../src/common/tarstrm.cpp:425
+msgid "unknown"
+msgstr "desconhecido"
+
+#: ../src/common/xtixml.cpp:253
+#, c-format
+msgid "unknown class %s"
+msgstr "classe %s desconhecida"
+
+#: ../src/common/regex.cpp:261 ../src/html/chm.cpp:351
+msgid "unknown error"
+msgstr "erro desconhecido"
+
+#: ../src/msw/dialup.cpp:490
+#, c-format
+msgid "unknown error (error code %08x)."
+msgstr "erro desconhecido (código do erro %08x)."
+
+#: ../src/msw/wince/filefnwce.cpp:172
+msgid "unknown seek origin"
+msgstr "origem da busca desconhecida"
+
+#: ../src/common/fmapbase.cpp:834
+#, c-format
+msgid "unknown-%d"
+msgstr "desconhecido- %d"
+
+#: ../src/common/docview.cpp:507
+msgid "unnamed"
+msgstr "sem nome"
+
+#: ../src/common/docview.cpp:1606
+#, c-format
+msgid "unnamed%d"
+msgstr "%d sem nome"
+
+#: ../src/common/zipstrm.cpp:1796 ../src/common/zipstrm.cpp:2184
+msgid "unsupported Zip compression method"
+msgstr "método de compressão do Zip não suportado"
+
+#: ../src/common/translation.cpp:1883
+#, c-format
+msgid "using catalog '%s' from '%s'."
+msgstr "usando o catálogo '%s' de '%s'."
+
+#: ../src/html/chm.cpp:335
+msgid "write error"
+msgstr "erro de escrita"
+
+#: ../src/common/time.cpp:318
+msgid "wxGetTimeOfDay failed."
+msgstr "wxGetTimeOfDay falhou."
+
+#: ../src/gtk/print.cpp:987
+msgid "wxPrintout::GetPageInfo gives a null maxPage."
+msgstr "wxPrintout::GetPageInfo dá um maxPage nulo."
+
+#: ../src/osx/carbon/dataview.cpp:1303
+msgid "wxWidget control pointer is not a data view pointer"
+msgstr ""
+"O ponteiro do controle wxWidget não é um ponteiro de visualização dos dados"
+
+#: ../src/osx/carbon/dataview.cpp:907
+msgid "wxWidget's control not initialized."
+msgstr "Controle do wxWidgets não inicializado."
+
+#: ../src/motif/app.cpp:245
+#, c-format
+msgid "wxWidgets could not open display for '%s': exiting."
+msgstr "O wxWidgets não pôde abrir a exibição para '%s': saindo."
+
+#: ../src/x11/app.cpp:164
+msgid "wxWidgets could not open display. Exiting."
+msgstr "O wxWidgets não pôde a exibição. Saindo."
+
+#: ../src/richtext/richtextsymboldlg.cpp:434
+msgid "xxxx"
+msgstr "xxxx"
+
+#: ../src/common/datetimefmt.cpp:1726
+msgid "yesterday"
+msgstr "ontem"
+
+#: ../src/common/zstream.cpp:251 ../src/common/zstream.cpp:426
+#, c-format
+msgid "zlib error %d"
+msgstr "erro zlib %d"
+
+#: ../src/richtext/richtextliststylepage.cpp:496
+#: ../src/richtext/richtextbulletspage.cpp:301
+msgid "~"
+msgstr "~"
+
+#~ msgid "Print preview"
+#~ msgstr "Pré-visualização da impressão"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "1"
+#~ msgstr "1"
+
+#~ msgid "10"
+#~ msgstr "10"
+
+#~ msgid "3"
+#~ msgstr "3"
+
+#~ msgid "4"
+#~ msgstr "4"
+
+#~ msgid "5"
+#~ msgstr "5"
+
+#~ msgid "6"
+#~ msgstr "6"
+
+#~ msgid "7"
+#~ msgstr "7"
+
+#~ msgid "8"
+#~ msgstr "8"
+
+#~ msgid "9"
+#~ msgstr "9"
+
+#~ msgid "Can't monitor non-existent path \"%s\" for changes."
+#~ msgstr "Não consegue monitorar o caminho não-existente \"%s\" por mudanças."
+
+#~ msgid "File system containing watched object was unmounted"
+#~ msgstr "O sistema de arquivos contendo o objeto observado foi desmontado"
+
+#~ msgid "&Preview..."
+#~ msgstr "&Pré-visualização..."
+
+#~ msgid "Enable vertical offset."
+#~ msgstr "Ativar offset vertical."
+
+#~ msgid "Preview..."
+#~ msgstr "Pré-visualização..."
+
+#~ msgid "The vertical offset relative to the paragraph."
+#~ msgstr "O offset vertical relativo ao parágrafo."
+
+#~ msgid "Units for the object offset."
+#~ msgstr "Unidades para o offset do objeto."
+
+#~ msgid "Vertical &Offset:"
+#~ msgstr "Offset &Vertical:"
+
+#~ msgid "&About..."
+#~ msgstr "&Sobre..."
+
+#~ msgid "&Save..."
+#~ msgstr "&Salvar..."
+
+#~ msgid "About "
+#~ msgstr "Sobre"
+
+#~ msgid "About..."
+#~ msgstr "Sobre..."
+
+#~ msgid "All files (*.*)|*"
+#~ msgstr "Todos os arquivos (*.*)|*"
+
+#~ msgid "Cannot initialize SciTech MGL!"
+#~ msgstr "Não pode inicializar o SciTech MGL!"
+
+#~ msgid "Cannot initialize display."
+#~ msgstr "Não pode inicializar a exibição."
+
+#~ msgid "Cannot start thread: error writing TLS"
+#~ msgstr "Não pode iniciar o thread: erro ao escrever o TLS"
+
+#~ msgid "Close\tAlt-F4"
+#~ msgstr "Fechar\tAlt-F4"
+
+#~ msgid "Couldn't create cursor."
+#~ msgstr "Não pôde criar o cursor."
+
+#~ msgid "Directory '%s' doesn't exist!"
+#~ msgstr "O diretório '%s' não existe!"
+
+#~ msgid "File %s does not exist."
+#~ msgstr "O arquivo %s não existe."
+
+#~ msgid "Mode %ix%i-%i not available."
+#~ msgstr "Modo %ix%i-%i não disponível."
+
+#~ msgid "Paper Size"
+#~ msgstr "Tamanho do Papel"
+
+#~ msgid "%.*f GB"
+#~ msgstr "%.*f GB"
+
+#~ msgid "%.*f MB"
+#~ msgstr "%.*f MB"
+
+#~ msgid "%.*f TB"
+#~ msgstr "%.*f TB"
+
+#~ msgid "%.*f kB"
+#~ msgstr "%.*f kB"
+
+#~ msgid "%s"
+#~ msgstr "%s "
+
+#~ msgid "%s B"
+#~ msgstr "%s B"
+
+#~ msgid "&Goto..."
+#~ msgstr "&Ir para..."
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">>|"
+#~ msgstr ">>|"
+
+#~ msgid "Added item is invalid."
+#~ msgstr "O item adicionado é inválido."
+
+#~ msgid "Archive doesnt contain #SYSTEM file"
+#~ msgstr "O arquivo não contém o arquivo #SYSTEM"
+
+#~ msgid "BIG5"
+#~ msgstr "BIG5"
+
+#~ msgid "Can't check image format of file '%s': file does not exist."
+#~ msgstr ""
+#~ "Não pode verificar o formato da imagem do arquivo '%s': o arquivo não "
+#~ "existe."
+
+#~ msgid "Can't load image from file '%s': file does not exist."
+#~ msgstr "Não pode carregar a imagem do arquivo '%s': o arquivo não existe."
+
+#~ msgid "Cannot convert dialog units: dialog unknown."
+#~ msgstr "Não pode converter as unidades do diálogo: diálogo desconhecido."
+
+#~ msgid "Cannot convert from the charset '%s'!"
+#~ msgstr "Não pode converter do conjunto de caracteres '%s'!"
+
+#~ msgid "Cannot find container for unknown control '%s'."
+#~ msgstr "Não pode achar o recipiente para o controle desconhecido '%s'."
+
+#~ msgid "Cannot find font node '%s'."
+#~ msgstr "Não pode achar o node da fonte '%s'."
+
+#~ msgid "Cannot open file '%s'."
+#~ msgstr "Não pode abrir o arquivo '%s'."
+
+#~ msgid "Cannot parse coordinates from '%s'."
+#~ msgstr "Não pode analisar as coordenadas de '%s'."
+
+#~ msgid "Cannot parse dimension from '%s'."
+#~ msgstr "Não pode analisar a dimensão de '%s'."
+
+#~ msgid "Cant create the thread event queue"
+#~ msgstr "Não pode criar a fila de eventos do thread"
+
+#~ msgid "Changed item is invalid."
+#~ msgstr "O item mudado é inválido."
+
+#~ msgid "Click to cancel this window."
+#~ msgstr "Clique para cancelar esta janela."
+
+#~ msgid "Click to confirm your selection."
+#~ msgstr "Clique para confirmar a sua seleção."
+
+#~ msgid "Column does not have a renderer."
+#~ msgstr "A coluna não tem um renderizador."
+
+#~ msgid "Column pointer must not be NULL."
+#~ msgstr "O ponteiro da coluna não dever ser NULO."
+
+#~ msgid "Column's model column has no equivalent in the associated model."
+#~ msgstr "A coluna modelo da coluna não tem equivalente no modelo associado."
+
+#~ msgid "Control is wrongly initialized."
+#~ msgstr "O controle foi inicializado erroneamente."
+
+#~ msgid "Could not add column to internal structures."
+#~ msgstr "Não pôde adicionar a coluna as estruturas internas."
+
+#~ msgid "Could not unlock mutex"
+#~ msgstr "Não pôde destrancar o mutex"
+
+#~ msgid "Data view control is not correctly initialized"
+#~ msgstr ""
+#~ "O controle da visualização dos dados não foi inicializado corretamente"
+
+#~ msgid "Error while waiting on semaphore"
+#~ msgstr "Erro enquanto esperando no semáforo"
+
+#~ msgid "Failed to connect to session manager: %s"
+#~ msgstr "Falhou em conectar ao gerenciador da sessão: %s"
+
+#~ msgid "Failed to create a status bar."
+#~ msgstr "Falhou em criar uma barra de status."
+
+#~ msgid "Failed to register OpenGL window class."
+#~ msgstr "Falhou em registrar a classe de janela do OpenGL."
+
+#~ msgid "Fatal error"
+#~ msgstr "Erro fatal"
+
+#~ msgid "Fatal error: "
+#~ msgstr "Erro fatal: "
+
+#~ msgid "GB-2312"
+#~ msgstr "GB-2312"
+
+#~ msgid "Go forward to the next HTML page"
+#~ msgstr "Ir adiante para a próxima página HTML"
+
+#~ msgid "Goto Page"
+#~ msgstr "Ir para a página"
+
+#~ msgid ""
+#~ "HTML pagination algorithm generated more than the allowed maximum number "
+#~ "of pages and it can't continue any longer!"
+#~ msgstr ""
+#~ "O algorítmo de paginação HTML gerou mais do que o número máximo de "
+#~ "páginas permitidas e não pode mais continuar!"
+
+#~ msgid "Help : %s"
+#~ msgstr "Ajuda : %s"
+
+#~ msgid "I64"
+#~ msgstr "I64"
+
+#~ msgid "Internal error, illegal wxCustomTypeInfo"
+#~ msgstr "Erro interno; wxCustomTypeInfo ilegal"
+
+#~ msgid "Invalid XRC resource '%s': doesn't have root node 'resource'."
+#~ msgstr "Recurso XRC '%s' inválido: não tem o node da raiz 'resource'."
+
+#~ msgid "No handler found for XML node '%s', class '%s'!"
+#~ msgstr "Nenhum manejador achado para o node XML '%s', classe '%s'!"
+
+#~ msgid "No image handler for type %ld defined."
+#~ msgstr "Nenhum manipulador de imagem para o tipo %ld definido."
+
+#~ msgid "No model associated with control."
+#~ msgstr "Nenhum modelo associado com o controle."
+
+#~ msgid "Owner not initialized."
+#~ msgstr "Proprietário não inicializado."
+
+#~ msgid "Passed item is invalid."
+#~ msgstr "O item passado é inválido."
+
+#~ msgid "Passing a already registered object to SetObjectName"
+#~ msgstr "Passando um objeto já registrado para o SetObjectName"
+
+#~ msgid "Preparing help window..."
+#~ msgstr "Preparando a janela de ajuda..."
+
+#~ msgid "Program aborted."
+#~ msgstr "Programa abortado."
+
+#~ msgid "Referenced object node with ref=\"%s\" not found!"
+#~ msgstr "Node do objeto referenciado com ref=\"%s\" não achado!"
+
+#~ msgid "Resource files must have same version number!"
+#~ msgstr "Os arquivos de recurso devem ter o mesmo número da versão!"
+
+#~ msgid "SHIFT-JIS"
+#~ msgstr "SHIFT-JIS"
+
+#~ msgid "Search!"
+#~ msgstr "Procurar!"
+
+#~ msgid "Sorry, could not open this file for saving."
+#~ msgstr "Lamento, não pôde abrir este arquivo para salvar."
+
+#~ msgid "Sorry, could not save this file."
+#~ msgstr "Lamento, não pude salvar este arquivo."
+
+#~ msgid "Sorry, print preview needs a printer to be installed."
+#~ msgstr ""
+#~ "Lamento, a pré-visualização da impressão precisa que uma impressora "
+#~ "esteja instalada."
+
+#~ msgid "Status: "
+#~ msgstr "Status: "
+
+#~ msgid ""
+#~ "Streaming delegates for not already streamed objects not yet supported"
+#~ msgstr "O streaming delega para objetos não já streamed ainda não suportado"
+
+#~ msgid "Subclass '%s' not found for resource '%s', not subclassing!"
+#~ msgstr ""
+#~ "Sub-classe '%s' não achada para o recurso '%s'; não sub-classificando!"
+
+#~ msgid "TIFF library error."
+#~ msgstr "Erro da biblioteca TIFF."
+
+#~ msgid "TIFF library warning."
+#~ msgstr "Aviso da biblioteca TIFF."
+
+#~ msgid ""
+#~ "The file '%s' couldn't be opened.\n"
+#~ "It has been removed from the most recently used files list."
+#~ msgstr ""
+#~ "O arquivo '%s' não pôde ser aberto.\n"
+#~ "Foi removido da lista dos arquivos mais usados recentemente."
+
+#~ msgid "The path '%s' contains too many \"..\"!"
+#~ msgstr "O caminho '%s' contém \"..\" demais!"
+
+#~ msgid "Trying to solve a NULL hostname: giving up"
+#~ msgstr "Tentandoe resolver um nome de host NULO: desistindo"
+
+#~ msgid "Unknown style flag "
+#~ msgstr "Bandeira do estilo desconhecida"
+
+#~ msgid "Warning"
+#~ msgstr "Aviso"
+
+#~ msgid "Windows 2000 (build %lu"
+#~ msgstr "Windows 2000 (build %lu)"
+
+#~ msgid "XRC resource '%s' (class '%s') not found!"
+#~ msgstr "Recurso XRC '%s' (classe '%s') não achado!"
+
+#~ msgid "XRC resource: Cannot create animation from '%s'."
+#~ msgstr "Recurso XRC: Não pode criar a animação de '%s'."
+
+#~ msgid "XRC resource: Cannot create bitmap from '%s'."
+#~ msgstr "Recurso XRC: Não pode criar o bitmap de '%s'."
+
+#~ msgid ""
+#~ "XRC resource: Incorrect colour specification '%s' for attribute '%s'."
+#~ msgstr ""
+#~ "Recurso XRC: Especificação das cores '%s' incorreta para o atributo '%s'."
+
+#~ msgid "[EMPTY]"
+#~ msgstr "[VAZIO]"
+
+#~ msgid "catalog file for domain '%s' not found."
+#~ msgstr "arquivo do catálogo para o domínio '%s' não achado."
+
+#~ msgid "delegate has no type info"
+#~ msgstr "o delegate não tem info sobre o tipo"
+
+#~ msgid "encoding %i"
+#~ msgstr "codificação %i"
+
+#~ msgid "looking for catalog '%s' in path '%s'."
+#~ msgstr "procurando pelo catálogo '%s' no caminho '%s'."
+
+#~ msgid "m_peer is not or incorrectly initialized"
+#~ msgstr "m_peer não está ou foi incorretamente inicializado"
+
+#~ msgid "wxRichTextFontPage"
+#~ msgstr "wxRichTextFontPage"
+
+#~ msgid "wxSearchEngine::LookFor must be called before scanning!"
+#~ msgstr "wxSearchEngine::LookFor deve ser chamado antes de escanear!"
+
+#~ msgid "wxSocket: invalid signature in ReadMsg."
+#~ msgstr "wxSocket: assinatura inválida em ReadMsg."
+
+#~ msgid "wxSocket: unknown event!."
+#~ msgstr "wxSocket: evento desconhecido!"
+
+#~ msgid "|<<"
+#~ msgstr "|<<"
+
+#~ msgid "\t%s: %s\n"
+#~ msgstr "\t%s: %s\n"
+
+#~ msgid " Couldn't create the UnicodeConverter"
+#~ msgstr "Imposs�vel criar o UnicodeConverter"
+
+#~ msgid "#define %s must be an integer."
+#~ msgstr "#define %s deve ser um inteiro."
+
+#~ msgid "%s not a bitmap resource specification."
+#~ msgstr "%s n�o � uma especifica��o de um recurso de bitmap."
+
+#~ msgid "%s not an icon resource specification."
+#~ msgstr "%s n�o � uma especifica��o de um recurso de �cone."
+
+#~ msgid "%s: ill-formed resource file syntax."
+#~ msgstr "%s: sintaxe de arquivo de recurso mal-formada."
+
+#~ msgid "&Open"
+#~ msgstr "&Abrir"
+
+#~ msgid "&Print"
+#~ msgstr "&Imprimir"
+
+#, fuzzy
+#~ msgid "*** A debug report has been generated\n"
+#~ msgstr "Um relat�rio de depura��o foi gerado no diret�rio\n"
+
+#~ msgid ""
+#~ ", expected static, #include or #define\n"
+#~ "while parsing resource."
+#~ msgstr ""
+#~ ", era esperado static, #include ou #define\n"
+#~ "durante an�lise do recurso."
+
+#~ msgid "Bitmap resource specification %s not found."
+#~ msgstr "A especifica��o de recurso de bitmap %s n�o foi encontrada."
+
+#~ msgid "Closes the dialog without inserting a symbol."
+#~ msgstr "Fecha o di�logo sem inserir o s�mbolo."
+
+#~ msgid ""
+#~ "Could not resolve control class or id '%s'. Use (non-zero) integer "
+#~ "instead\n"
+#~ " or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "Controle da classe ou id '%s' n�o resolvido. Use inteiros (diferentes "
+#~ "zero)\n"
+#~ " ou disponibilize um #define (veja o manual para precau��es)"
+
+#~ msgid ""
+#~ "Could not resolve menu id '%s'. Use (non-zero) integer instead\n"
+#~ "or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "N�o foi poss�vel resolver id de menu '%s'. Use inteiros (diferentes "
+#~ "de zero)\n"
+#~ " ou disponibilize um #define (veja o manual para precau��es)"
+
+#~ msgid "Couldn't end the context on the overlay window"
+#~ msgstr "Imposs�vel finalizar o contexto na janela \"overlay\""
+
+#~ msgid "Expected '*' while parsing resource."
+#~ msgstr "Era esperado '*' durante a an�lise do recurso."
+
+#~ msgid "Expected '=' while parsing resource."
+#~ msgstr "Era esperado '=' durante a an�lise do recurso."
+
+#~ msgid "Expected 'char' while parsing resource."
+#~ msgstr "Era esperado 'char' durante a an�lise do recurso."
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "N�o foi poss�vel encontrar o recurso XBM %s.\n"
+#~ "Esqueceu-se de usar o wxResourceLoadBitmapData?"
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadIconData?"
+#~ msgstr ""
+#~ "N�o foi poss�vel encontrar o recurso XBM %s.\n"
+#~ "Esqueceu-se de usar o wxResourceLoadIconData?"
+
+#~ msgid ""
+#~ "Failed to find XPM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "N�o foi poss�vel encontrar o recurso XPM %s.\n"
+#~ "Esqueceu-se de usar o wxResourceLoadBitmapData?"
+
+#~ msgid "Failed to get clipboard data."
+#~ msgstr "Falha ao obter dados da �rea de transfer�ncia."
+
+#~ msgid "Failed to load shared library '%s' Error '%s'"
+#~ msgstr "Falha ao carregar biblioteca compartilhada '%s' Erro '%s'"
+
+#~ msgid "Found "
+#~ msgstr "Encontrado"
+
+#~ msgid "Icon resource specification %s not found."
+#~ msgstr "Especifica��o de recurso de �cone '%s' n�o encontrada."
+
+#~ msgid "Ill-formed resource file syntax."
+#~ msgstr "Sintaxe do arquivo de recursos mal-formada."
+
+#~ msgid "Inserts the chosen symbol."
+#~ msgstr "Insere o s�mbolo escolhido."
+
+#~ msgid "Long Conversions not supported"
+#~ msgstr "Convers�es do tipo \"long\" n�o suportadas"
+
+#~ msgid "No XPM icon facility available!"
+#~ msgstr "�cones XPM ainda n�o est�o dispon�ves no wxWidgets!"
+
+#~ msgid "Option '%s' requires a value, '=' expected."
+#~ msgstr "Op��o '%s' precisa de um valor, '=' era esperado."
+
+#~ msgid "Select all"
+#~ msgstr "Selecionar &tudo"
+
+#~ msgid ""
+#~ "Sorry, docking is not supported for ports other than wxMSW, wxMac and "
+#~ "wxGTK"
+#~ msgstr ""
+#~ "O encaixamento s� � suportado nas vers�es wxMSW, wxMac e wxGTK"
+
+#~ msgid "String conversions not supported"
+#~ msgstr "Convers�es de string n�o suportadas"
+
+#~ msgid "Unexpected end of file while parsing resource."
+#~ msgstr ""
+#~ "Fim de arquivo encontrado inesperadamento durante an�lise do recurso."
+
+#~ msgid "Unrecognized style %s while parsing resource."
+#~ msgstr "Estilo %s n�o foi reconhecido durante an�lise do recurso."
+
+#~ msgid "Video Output"
+#~ msgstr "Sa�da de v�deo"
+
+#~ msgid "Warning: attempt to remove HTML tag handler from empty stack."
+#~ msgstr ""
+#~ "Aviso: tentativa de remo��o de manipulador de tag HTML de uma pilha "
+#~ "vazia."
+
+#~ msgid "establish"
+#~ msgstr "estabelecer"
+
+#~ msgid "initiate"
+#~ msgstr "iniciar"
+
+#~ msgid "invalid eof() return value."
+#~ msgstr "valor de retorno de eof() inv�lido."
+
+#~ msgid "unknown line terminator"
+#~ msgstr "finalizador de linha desconhecido"
+
+#~ msgid "writing"
+#~ msgstr "gravando"
+
+#~ msgid "wxRichTextBulletsPage"
+#~ msgstr "wxRichTextBulletsPage"
+
+#~ msgid "wxRichTextListStylePage"
+#~ msgstr "wxRichTextListStylePage"
+
+#~ msgid "wxRichTextStylePage"
+#~ msgstr "wxRichTextStylePage"
diff --git a/cadxcore/lang/sr/cadxcore.mo b/cadxcore/lang/sr/cadxcore.mo
new file mode 100644
index 0000000..3ae3b40
Binary files /dev/null and b/cadxcore/lang/sr/cadxcore.mo differ
diff --git a/cadxcore/lang/sr/cadxcore.po b/cadxcore/lang/sr/cadxcore.po
new file mode 100644
index 0000000..c501cc9
--- /dev/null
+++ b/cadxcore/lang/sr/cadxcore.po
@@ -0,0 +1,6896 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: GinkgoCADx\n"
+"POT-Creation-Date: 2014-06-11 15:52+0100\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Serbian <sr at li.org>\n"
+"Language: sr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-KeywordsList: _Std;_\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Poedit-SearchPath-0: ..\\..\n"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Red Vessels"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Metal"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Green"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "GE Color"
+msgstr "Боја"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PET"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr "Асиметрија"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "P-Value"
+msgstr "П-Р-Т осе: "
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr ""
+
+#: ..\../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#: ..\../api/dicom/idicomconformance.cpp:214
+#: ..\../api/dicom/idicomconformance.cpp:220
+#, fuzzy
+msgid "GIL/DICOM/Conformance"
+msgstr "Придруживање(dicom://"
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#, fuzzy
+msgid "Unable to add supported transfer syntax "
+msgstr " . Синтакса преноса не постоји у моделу: Додајте је прво."
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid " to SOP Class "
+msgstr " у СОП разред "
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr " . Синтакса преноса не постоји у моделу: Додајте је прво."
+
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr " . СОП разред не постоји у моделу: Додајте га прво."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#, fuzzy
+msgid "Unable to add supported SOP Class "
+msgstr " . СОП разред не постоји у моделу: Додајте га прво."
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " to Modality "
+msgstr " у начин "
+
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr " . Начин не постоји у моделу: Додајте га прво."
+
+#: ..\../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+#, fuzzy
+msgid "Slice"
+msgstr "Парче: "
+
+#: ..\../api/iannotator.cpp:97
+msgid "of"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+#, fuzzy
+msgid "Volume"
+msgstr "Исцртавање 3Д запремине"
+
+#: ..\../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:110
+msgid "Image without metric information"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:119
+#, fuzzy
+msgid "Slice thickness"
+msgstr "Парче: "
+
+#: ..\../api/iannotator.cpp:127
+#, fuzzy
+msgid "Slice location"
+msgstr "Парче: "
+
+#: ..\../api/iannotator.cpp:139
+msgid "Scale"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:147
+msgid "Right"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:149
+msgid "Left"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:219
+#, fuzzy
+msgid "Position:"
+msgstr "Положај   : "
+
+#: ..\../api/iannotator.cpp:272
+#, fuzzy
+msgid "Value:"
+msgstr "Основна вредност"
+
+#: ..\../api/iexception.cpp:52
+msgid "Exception in component"
+msgstr ""
+
+#: ..\../api/initwx.cpp:439
+msgid "Initializing environment ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:446 ..\../api/initwx.cpp:447 ..\../api/initwx.cpp:448
+#: ..\../api/initwx.cpp:449 ..\../api/initwx.cpp:450 ..\../api/initwx.cpp:451
+#: ..\../api/initwx.cpp:452 ..\../api/initwx.cpp:453
+#, fuzzy
+msgid "Ginkgo CADx restrictions"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr ""
+
+#: ..\../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr "Режим безименог (историјат је очишћен)"
+
+#: ..\../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr ""
+
+#: ..\../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr ""
+
+#: ..\../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr ""
+
+#: ..\../api/initwx.cpp:451
+#, fuzzy
+msgid "Export images"
+msgstr " (слика — %d)"
+
+#: ..\../api/initwx.cpp:452
+#, fuzzy
+msgid "Acquire DICOM files"
+msgstr "Придруживање(dicom://"
+
+#: ..\../api/initwx.cpp:453
+msgid "Import files to DICOM format"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "Online manual"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "URL of manual"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+#, fuzzy
+msgid "Online support"
+msgstr "Радимо на подршци "
+
+#: ..\../api/initwx.cpp:459
+#, fuzzy
+msgid "URL of online support"
+msgstr "Радимо на подршци "
+
+#: ..\../api/initwx.cpp:459
+#, fuzzy
+msgid "http://ginkgo-cadx.com/"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../api/initwx.cpp:460 ..\../api/initwx.cpp:461
+msgid "Program Updates"
+msgstr ""
+
+#: ..\../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr ""
+
+#: ..\../api/initwx.cpp:461
+msgid "Update period (days)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:462
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr ""
+
+#: ..\../api/initwx.cpp:462
+msgid "Setup Security"
+msgstr ""
+
+#: ..\../api/initwx.cpp:463
+#, fuzzy
+msgid "Show on startup"
+msgstr "Прикажи/сакриј мета податке"
+
+#: ..\../api/initwx.cpp:463
+#, fuzzy
+msgid "Show on startup default value"
+msgstr "Основна вредност"
+
+#: ..\../api/initwx.cpp:465 ..\../api/initwx.cpp:466
+#: ..\../main/gui/history3/historypanel3.cpp:328
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr ""
+
+#: ..\../api/initwx.cpp:465
+#, fuzzy
+msgid "Settings menu"
+msgstr "Напредна подешавања..."
+
+#: ..\../api/initwx.cpp:466
+msgid "License menu"
+msgstr ""
+
+#: ..\../api/initwx.cpp:467 ..\../api/initwx.cpp:468 ..\../api/initwx.cpp:469
+#: ..\../api/initwx.cpp:470 ..\../api/initwx.cpp:471 ..\../api/initwx.cpp:472
+#: ..\../api/initwx.cpp:473 ..\../api/initwx.cpp:474
+#, fuzzy
+msgid "PACS Limits"
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr ""
+
+#: ..\../api/initwx.cpp:468
+msgid "Upload images to a PACS server"
+msgstr ""
+
+#: ..\../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr ""
+
+#: ..\../api/initwx.cpp:470
+msgid "Enable remote PACS configuration"
+msgstr ""
+
+#: ..\../api/initwx.cpp:471
+#, fuzzy
+msgid "Enable TLS configuration"
+msgstr "Напредна подешавања ..."
+
+#: ..\../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr ""
+
+#: ..\../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr ""
+
+#: ..\../api/initwx.cpp:475 ..\../api/initwx.cpp:476 ..\../api/initwx.cpp:477
+#: ..\../api/initwx.cpp:478 ..\../api/initwx.cpp:479 ..\../api/initwx.cpp:480
+#, fuzzy
+msgid "Import"
+msgstr "Да ли сте сигурни да желите да откажете поступак увоза?"
+
+#: ..\../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:476
+#, fuzzy
+msgid "Show accession number input"
+msgstr "Број напада"
+
+#: ..\../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483 ..\../api/initwx.cpp:484 ..\../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:485
+#, fuzzy
+msgid "Default ORU template"
+msgstr "Основно"
+
+#: ..\../api/initwx.cpp:488 ..\../api/initwx.cpp:489 ..\../api/initwx.cpp:491
+#: ..\../api/initwx.cpp:493 ..\../api/initwx.cpp:494 ..\../api/initwx.cpp:495
+#: ..\../api/initwx.cpp:496 ..\../api/initwx.cpp:498
+msgid "Style"
+msgstr ""
+
+#: ..\../api/initwx.cpp:503
+#, fuzzy, c-format
+msgid "Download %s images"
+msgstr " (слика — %d)"
+
+#: ..\../api/initwx.cpp:504 ..\../api/initwx.cpp:508
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+#, fuzzy
+msgid "PACS"
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../api/initwx.cpp:507
+#, fuzzy
+msgid "Download all modalities"
+msgstr "Све"
+
+#: ..\../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr ""
+
+#: ..\../api/initwx.cpp:510
+msgid "Enable shaders"
+msgstr ""
+
+#: ..\../api/initwx.cpp:513
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+#, fuzzy
+msgid "Ginkgo Cloud"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../api/initwx.cpp:513
+msgid "Download from Ginkgo Cloud"
+msgstr ""
+
+#: ..\../api/initwx.cpp:560
+msgid "Tools loading base ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:566
+msgid "Loading plugins ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:580
+msgid "Unable to start GinkgoCADx:\n"
+msgstr ""
+
+#: ..\../api/initwx.cpp:580 ..\../api/initwx.cpp:621
+#, fuzzy
+msgid "error"
+msgstr "Грeшкa"
+
+#: ..\../api/initwx.cpp:584
+msgid "Loading resources ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:601
+#, fuzzy
+msgid "Configuring environment ..."
+msgstr "Грешка подешавања мреже"
+
+#: ..\../api/initwx.cpp:621
+msgid "Failed to set permissions:\n"
+msgstr ""
+
+#: ..\../api/initwx.cpp:634
+msgid "Updating ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:638
+msgid "Interpreting parameters ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:689
+#, fuzzy
+msgid "Error unregistering tools: "
+msgstr "Грeшкa"
+
+#: ..\../api/initwx.cpp:769
+msgid "Starting"
+msgstr ""
+
+#: ..\../api/ivista.cpp:36 ..\../commands/comandocarga.cpp:73
+msgid "Loading..."
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:268
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ..\../main/gui/import/pasosimportacionbase.cpp:151
+#, fuzzy
+msgid "Name"
+msgstr ""
+"\n"
+"* Надовезивање имена и презимена пацијената не може бити више од 61."
+
+#: ..\../api/iwidgets.cpp:285
+msgid "Area"
+msgstr "Област"
+
+#: ..\../api/iwidgets.cpp:302
+#, fuzzy
+msgid "Perimeter"
+msgstr "Обим : "
+
+#: ..\../api/iwidgets.cpp:316
+msgid "Travel (I)"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:326
+msgid "Travel (M)"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#: ..\../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid "Error while running thread: "
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid " : "
+msgstr " : "
+
+#: ..\../api/threads/thread.cpp:120
+msgid "Internal error while running thread: "
+msgstr ""
+
+#: ..\../api/widgetserializable.cpp:60
+#, fuzzy
+msgid "Creation Date"
+msgstr "Датум"
+
+#: ..\../api/widgetserializable.cpp:65
+#, fuzzy
+msgid "Modification Date"
+msgstr "Датум"
+
+#: ..\../api/widgetserializable.cpp:68
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:40
+#, fuzzy
+msgid "Physician"
+msgstr "„code“ атрибут је очекиван на „physician“ досегу"
+
+#: ..\../commands/acquirefromurlcommand.cpp:55
+#: ..\../commands/pacsdownloadcommand.cpp:88
+#: ..\../commands/synchronizationcommand.cpp:70
+msgid "Downloading files ..."
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:69
+#: ..\../commands/synchronizationcommand.cpp:91
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, fuzzy, c-format
+msgid "Downloading file %d"
+msgstr "&Датотека"
+
+#: ..\../commands/acquirefromurlcommand.cpp:81
+#, fuzzy
+msgid "Error downloading file: "
+msgstr "&Датотека"
+
+#: ..\../commands/acquirefromurlcommand.cpp:95
+#: ..\../commands/pacsdownloadcommand.cpp:114
+#: ..\../commands/synchronizationcommand.cpp:121
+#, fuzzy
+msgid "Internal Error"
+msgstr "Грешка: Унутрашња грешка."
+
+#: ..\../commands/acquirefromurlcommand.cpp:115
+#, fuzzy
+msgid "Error downloading files: "
+msgstr "Грeшкa"
+
+#: ..\../commands/autocleaningcommand.cpp:62
+msgid "Cleaning dicomdir..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:67
+msgid "Downloading files..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:183
+#, fuzzy
+msgid "Unknown operation"
+msgstr "<непознат ИБ>"
+
+#: ..\../commands/cloudcommand.cpp:188
+msgid "Error in cloud operation. See log to get more details..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:249
+msgid "Could to retrieve study."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:260 ..\../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:262
+#, fuzzy
+msgid "Error retrieving study."
+msgstr "Грешка отварања студије"
+
+#: ..\../commands/cloudcommand.cpp:271
+#, fuzzy
+msgid "Study successfully retrieved."
+msgstr "Грешка отварања студије"
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "Speed"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+#, fuzzy
+msgid "bytes/sec during"
+msgstr " бајта од укупно "
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "seconds"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:275
+msgid "Empty Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:289
+msgid "Extracting files..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:313 ..\../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:383
+msgid "Could to perform query."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:396
+msgid "Error perfoming the query."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:405
+msgid "Query successfully performed."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:472
+#, fuzzy
+msgid "Unknown JSon attribute:"
+msgstr "<непознат ИБ>"
+
+#: ..\../commands/cloudcommand.cpp:482
+#, fuzzy
+msgid "Error parsing JSon: "
+msgstr "Грeшкa"
+
+#: ..\../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:515
+#: ..\../commands/openremovableunit.cpp:148 ..\../main/gui/open/abrir.cpp:119
+#: ..\../main/gui/open/abrir.cpp:159 ..\../main/gui/open/opendialogs.cpp:146
+#, fuzzy
+msgid "Storing in the history..."
+msgstr "&Очисти историјат"
+
+#: ..\../commands/comandoactualizaciones.cpp:46
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:536
+msgid "Check Updates"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:136
+msgid "Not enough parameters found on XML"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:145
+#, fuzzy
+msgid "XML parsing internal error"
+msgstr "Грешка: Унутрашња грешка."
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Error checking application updates"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+#, fuzzy
+msgid "Ginkgo CADx updates"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../commands/comandoactualizaciones.cpp:170
+#, fuzzy
+msgid "Internal error checking updates"
+msgstr "Грешка: Унутрашња грешка."
+
+#: ..\../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:92 ..\../commands/comandocarga.cpp:96
+msgid "Exception loading:"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:100
+#, fuzzy
+msgid "Study malformed or unsupported"
+msgstr " неподржани састојци"
+
+#: ..\../commands/comandocarga.cpp:129 ..\../commands/comandocarga.cpp:139
+#, fuzzy
+msgid "Error loading study: "
+msgstr "Грешка отварања студије"
+
+#: ..\../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:144
+#, fuzzy
+msgid "Error loading study."
+msgstr "Грешка отварања студије"
+
+#: ..\../commands/comandocarga.cpp:149
+msgid "Load canceled by user"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:156
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+#: ..\../main/gui/history3/historypanel3.cpp:1063
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#, fuzzy
+msgid "Error loading study"
+msgstr "Грешка отварања студије"
+
+#: ..\../commands/comandoexportacion.cpp:81
+#: ..\../commands/exporttodicomdircommand.cpp:214
+msgid "Exporting files..."
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:105
+#: ..\../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:158
+#, fuzzy, c-format
+msgid "Exporting file %d of %d"
+msgstr " (слика — %d)"
+
+#: ..\../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:233
+#, fuzzy
+msgid "image_%m-%d-%Y_"
+msgstr "%d. %m. %Y."
+
+#: ..\../commands/comandoincluirhistorial.cpp:108
+msgid "Exploring directory ..."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:122
+msgid "Reading DICOMDIR ..."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:142
+#: ..\../commands/comandoincluirhistorial.cpp:156
+#: ..\../commands/comandoincluirhistorial.cpp:177
+#, fuzzy
+msgid "Including files in the history .."
+msgstr "&Очисти историјат"
+
+#: ..\../commands/comandoincluirhistorial.cpp:196
+msgid "Exploring directory "
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:256
+#: ..\../commands/linkhistorycommand.cpp:118
+#, fuzzy
+msgid "Image acquisition finished."
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../commands/comandoincluirhistorial.cpp:258
+#, c-format
+msgid "There have been included %d images."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:261
+#: ..\../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+"\n"
+"Постоје %d грешке (погледајте дневник за опширнији опис)"
+
+#: ..\../commands/comandoincluirhistorial.cpp:273
+#: ..\../commands/linkhistorycommand.cpp:133
+#, fuzzy
+msgid "This files doesn't exist:"
+msgstr " не постоји"
+
+#: ..\../commands/comandoincluirhistorial.cpp:284
+#: ..\../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:296
+#: ..\../commands/linkhistorycommand.cpp:156
+#, fuzzy
+msgid "This files are Dicom Dirs:"
+msgstr "Придруживање(dicom://"
+
+#: ..\../commands/comandopacs.cpp:58 ..\../commands/pacsdownloadcommand.cpp:61
+#: ..\../commands/sendpacscommand.cpp:137
+msgid "There is not any Remote PACS configured"
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:84
+#, fuzzy
+msgid "Querying PACS ..."
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:98
+msgid "Starting Search ..."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:108
+#: ..\../commands/pacsdownloadcommand.cpp:101
+#, fuzzy
+msgid "Server ID not found. ID = "
+msgstr "<непознат ИБ>"
+
+#: ..\../commands/comandopacs.cpp:110 ..\../commands/comandopacs.cpp:112
+#: ..\../commands/comandopacs.cpp:114 ..\../commands/comandopacs.cpp:116
+#, fuzzy
+msgid "Query error with PACS Id "
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../commands/comandopacs.cpp:116
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+#, fuzzy
+msgid "Internal error"
+msgstr "Грешка: Унутрашња грешка."
+
+#: ..\../commands/comandopacs.cpp:135
+msgid "Failed to perform search: "
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:94
+#: ..\../commands/dbmigrationcommand.cpp:103
+msgid "Migrating old DICOM Dir ..."
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:99
+#: ..\../commands/dbmigrationcommand.cpp:108
+msgid "Including files ..."
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+#: ..\../commands/dicomizecommand.cpp:181
+#: ..\../commands/openremovableunit.cpp:74
+#: ..\../commands/openremovableunit.cpp:110
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../commands/pdfextractercommand.cpp:130
+#: ..\../main/controllers/historycontroller.cpp:447
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+#: ..\../main/controllers/historycontroller.cpp:1976
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ..\../main/gui/login/dialogologin.cpp:50
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ..\../main/gui/open/opendialogs.cpp:58
+#: ..\../main/gui/open/opendialogs.cpp:62
+#: ..\../main/gui/open/opendialogs.cpp:134
+#: ..\../main/gui/progress/statusbarprogreso.cpp:284
+#: ..\../main/gui/progress/statusbarprogreso.cpp:287
+#: ..\../main/gui/progress/statusbarprogreso.cpp:292
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#: ..\../main/gui/history3/openwithdialog.h:72
+#, fuzzy
+msgid "Info"
+msgstr "Подаци"
+
+#: ..\../commands/dbmigrationcommand.cpp:123
+msgid "Migration finisthed successfully"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:27
+#: ..\../commands/dialogopathssobreescribirbase.cpp:62
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid "Overwrite"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:65
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ..\../main/gui/history3/historypanel3base.cpp:339
+#: ..\../main/gui/history3/historypanel3base.cpp:415
+#: ..\../main/gui/history3/historypanel3base.cpp:486
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ..\../main/gui/open/opendialogsbase.cpp:53
+#: ..\../main/gui/open/opendialogsbase.cpp:131
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ..\../widgets/gui/calibracionbase.cpp:86
+#: ..\../widgets/gui/selecciontextobase.cpp:60
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr "Откажи"
+
+#: ..\../commands/dicomizationcompletebase.cpp:24
+#: ..\../commands/dicomizationcompletebase.cpp:33
+#: ..\../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:56
+msgid "Don't show this message again"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:62
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ..\../main/gui/history3/historypanel3base.cpp:411
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ..\../widgets/gui/calibracionbase.cpp:82
+#: ..\../widgets/gui/selecciontextobase.cpp:56
+msgid "Accept"
+msgstr "Прихвати"
+
+#: ..\../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid "Import process failed:"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+"\n"
+"Да ли желите да покушате поново?"
+
+#: ..\../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:370
+msgid "Unknown error in dicomization process"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:431
+#: ..\../commands/dicomizecommand.cpp:442
+#: ..\../commands/sendpacscommand.cpp:185
+#, fuzzy
+msgid "Error sending evidences:"
+msgstr "Грeшкa"
+
+#: ..\../commands/dicomizecommand.cpp:437
+#: ..\../commands/dicomizecommand.cpp:448
+#, fuzzy
+msgid "Can not upload to the PACS:\n"
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:261
+#: ..\../commands/exporttodicomdircommand.cpp:338
+#, fuzzy, c-format
+msgid "Exporting series %d of %d"
+msgstr " (слика — %d)"
+
+#: ..\../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:279
+#: ..\../commands/exporttodicomdircommand.cpp:385
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#, fuzzy
+msgid "There was an error creating directory"
+msgstr "Грeшкa"
+
+#: ..\../commands/exporttodicomdircommand.cpp:303
+#: ..\../commands/exporttodicomdircommand.cpp:408
+#, fuzzy
+msgid "There was an error writing file"
+msgstr "&Датотека"
+
+#: ..\../commands/exporttodicomdircommand.cpp:358
+#, fuzzy
+msgid "There was an error anonymizing files"
+msgstr "Грeшкa"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Ignoring incoming operation "
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:298
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:473
+#: ..\../commands/pacsdownloadcommand.cpp:170
+#: ..\../commands/pacsdownloadcommand.cpp:179
+msgid "Including files..."
+msgstr ""
+
+#: ..\../commands/linkhistorycommand.cpp:68
+#, fuzzy
+msgid "Linking study..."
+msgstr "Грешка отварања студије"
+
+#: ..\../commands/openremovableunit.cpp:42
+#: ..\../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:130
+#, fuzzy
+msgid "Select drive you want to open"
+msgstr "Изаберите преглед који желите да ускладите са текућим"
+
+#: ..\../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+
+#: ..\../commands/pacsdownloadcommand.cpp:134
+#, fuzzy
+msgid "Error downloading study: "
+msgstr "Грешка отварања студије"
+
+#: ..\../commands/pdfextractercommand.cpp:103
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ..\../main/gui/progress/statusbarprogreso.cpp:278
+#: ..\../widgets/gui/calibracion.cpp:205 ..\../widgets/gui/calibracion.cpp:209
+#: ..\../widgets/gui/calibracion.cpp:219 ..\../widgets/gui/calibracion.cpp:225
+#: ..\../widgets/gui/calibracion.cpp:229
+#, fuzzy
+msgid "Error"
+msgstr "Грeшкa"
+
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:130
+msgid "PDF files extracted successfully..."
+msgstr ""
+
+#: ..\../commands/secondarycapturedicomizecommand.cpp:73
+#, fuzzy
+msgid "Ginkgo CADx Secondary Capture"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:73
+msgid "Message successfully sent"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:77
+#, fuzzy
+msgid "Unknown protocol"
+msgstr "<непознат ИБ>"
+
+#: ..\../commands/sendhl7command.cpp:80 ..\../commands/sendhl7command.cpp:93
+#: ..\../commands/sendhl7command.cpp:145
+#, fuzzy
+msgid "Error sending message:"
+msgstr "Грeшкa"
+
+#: ..\../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:93 ..\../commands/sendhl7command.cpp:94
+#, fuzzy
+msgid "Unknown error"
+msgstr "<непознат ИБ>"
+
+#: ..\../commands/sendhl7command.cpp:134
+msgid "Failed to start connection"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid "Error sending message. It was sent "
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr " бајта од укупно "
+
+#: ..\../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:258
+msgid "Failed delivery confirmation:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:51
+#, fuzzy
+msgid "Send files to PACS"
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../commands/sendpacscommand.cpp:155
+msgid "Uploading files ..."
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:181
+#, fuzzy
+msgid "Error:"
+msgstr "Грeшкa"
+
+#: ..\../commands/sendpacscommand.cpp:189
+#, fuzzy
+msgid "Error sending evidences: Internal error."
+msgstr "Грешка: Унутрашња грешка."
+
+#: ..\../commands/sendpacscommand.cpp:203
+#, fuzzy
+msgid "Error uploading the study to PACS: "
+msgstr "Грешка отварања студије"
+
+#: ..\../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:206
+#, fuzzy
+msgid "Retry send to PACS"
+msgstr ""
+"\n"
+"Да ли желите да покушате поново?"
+
+#: ..\../commands/synchronizationcommand.cpp:104
+#, fuzzy
+msgid "Error downloading file"
+msgstr "&Датотека"
+
+#: ..\../commands/synchronizationcommand.cpp:141
+#, fuzzy
+msgid "Error synchronizing study: "
+msgstr "Грешка отварања студије"
+
+#: ..\../commands/thumbnailscommand.cpp:107
+#: ..\../commands/thumbnailscommand.cpp:133
+#: ..\../commands/thumbnailscommand.cpp:247
+#: ..\../commands/thumbnailscommand.cpp:376
+#: ..\../commands/thumbnailscommand.cpp:382
+#: ..\../main/gui/import/selectimagesimportation.cpp:504
+msgid "Creating Thumbnail..."
+msgstr ""
+
+#: ..\../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr ""
+
+#: ..\../export/tools/iaddfiletohistorytool.cpp:19
+#: ..\../main/gui/history3/historypanel3.cpp:632
+#, fuzzy
+msgid "Open study"
+msgstr "Грешка отварања студије"
+
+#: ..\../export/tools/iangletool.cpp:19
+msgid "Angle \tCtrl+A"
+msgstr "Угао   Ктрл+А"
+
+#: ..\../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr ""
+
+#: ..\../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr ""
+
+#: ..\../export/tools/icolormaptool.cpp:20
+msgid "Color Map"
+msgstr "Мапа боја"
+
+#: ..\../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ..\../main/gui/open/opendialogsbase.cpp:46
+#: ..\../main/gui/open/opendialogsbase.cpp:198
+msgid "Copy"
+msgstr ""
+
+#: ..\../export/tools/icornerannotationstool.cpp:20
+msgid "Window annotations"
+msgstr ""
+
+#: ..\../export/tools/idetachwindowtool.cpp:19
+#, fuzzy
+msgid "Detach window"
+msgstr "Откачи преглед"
+
+#: ..\../export/tools/iimageexporttool.cpp:19
+#, fuzzy
+msgid "Export image..."
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../export/tools/imarkertool.cpp:20
+msgid "Marking Tools \tCtrl+M"
+msgstr ""
+
+#: ..\../export/tools/imetricgridtool.cpp:20
+#, fuzzy
+msgid "Metric grid"
+msgstr "Мрежа"
+
+#: ..\../export/tools/inotetool.cpp:19
+msgid "Text Note \tCtrl+N"
+msgstr ""
+
+#: ..\../export/tools/ipacsuploadtool.cpp:19
+#, fuzzy
+msgid "Upload study..."
+msgstr "Грешка отварања студије"
+
+#: ..\../export/tools/ipixelsbluringtool.cpp:20
+msgid "Pixels blurring"
+msgstr ""
+
+#: ..\../export/tools/ipointertool.cpp:19
+msgid "Pointer \tEsc"
+msgstr ""
+
+#: ..\../export/tools/iqueryretrievetool.cpp:19
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#: ..\../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr ""
+
+#: ..\../export/tools/iresettool.cpp:19
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+msgid "Reset"
+msgstr ""
+
+#: ..\../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr ""
+
+#: ..\../export/tools/iruletool.cpp:19
+#, fuzzy
+msgid "Rule \tCtrl+R"
+msgstr "П-Р-Т осе: "
+
+#: ..\../export/tools/isecondarycapturetool.cpp:19
+msgid "Save snapshot as new series..."
+msgstr ""
+
+#: ..\../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr ""
+
+#: ..\../export/tools/ishowtagstool.cpp:19
+#: ..\../main/tools/showtagshistorytool.cpp:27
+#, fuzzy
+msgid "DICOM inspector"
+msgstr "Придруживање(dicom://"
+
+#: ..\../export/tools/isimpleprinttool.cpp:19
+#: ..\../main/tools/simpleprinttool.cpp:226
+msgid "Print"
+msgstr ""
+
+#: ..\../export/tools/istartdicomizationtool.cpp:19
+msgid "Dicomize..."
+msgstr ""
+
+#: ..\../export/tools/itoolpan.cpp:19
+#, fuzzy
+msgid "Pan \tCtrl+P"
+msgstr "П-Р-Т осе: "
+
+#: ..\../export/tools/itoolslider.cpp:19
+#, fuzzy
+msgid "Slider \tCtrl+S"
+msgstr "Угао   Ктрл+А"
+
+#: ..\../export/tools/itoolwindowlevel.cpp:19
+msgid "Window/Level \tCtrl+W"
+msgstr ""
+
+#: ..\../export/tools/itoolzoom.cpp:19
+#, fuzzy
+msgid "Zoom \tCtrl+O"
+msgstr "Угао   Ктрл+А"
+
+#: ..\../export/tools/itrackballtool.cpp:19
+#, fuzzy
+msgid "Trackball \tCtrl+T"
+msgstr "П-Р-Т осе: "
+
+#: ..\../export/tools/iundotool.cpp:20 ..\../main/tools/undotool.cpp:109
+msgid "Undo"
+msgstr ""
+
+#: ..\../export/tools/ivideotool.cpp:19
+#, fuzzy
+msgid "Video \tCtrl+Space"
+msgstr "Угао   Ктрл+А"
+
+#: ..\../export/tools/iwindowlayouttool.cpp:20
+#, fuzzy
+msgid "Window layout"
+msgstr "1x1 распоред"
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+#, fuzzy
+msgid "Studies with"
+msgstr ""
+"Грешка: Систем је остао без меморије. Затворите неке студије да ослободите "
+"меморију."
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr " неподржани састојци"
+
+#: ..\../main/controllers/controladorcarga.cpp:210
+msgid "Reading properties"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:219
+#: ..\../main/controllers/controladorcarga.cpp:642
+#: ..\../main/controllers/controladorcarga.cpp:888
+#: ..\../main/controllers/streaming/streamingloader.cpp:600
+#, fuzzy
+msgid "Error reading the study: "
+msgstr "Грешка отварања студије"
+
+#: ..\../main/controllers/controladorcarga.cpp:224
+#: ..\../main/controllers/controladorcarga.cpp:229
+#: ..\../main/controllers/controladorcarga.cpp:647
+#: ..\../main/controllers/controladorcarga.cpp:893
+#, fuzzy
+msgid "Internal error reading the study: "
+msgstr "Грешка: Унутрашња грешка."
+
+#: ..\../main/controllers/controladorcarga.cpp:269
+#: ..\../main/controllers/controladorcarga.cpp:281
+#: ..\../main/controllers/controladorcarga.cpp:905
+msgid "Spacing is not valid: ("
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:305
+#: ..\../main/controllers/controladorcarga.cpp:338
+#: ..\../main/controllers/controladorcarga.cpp:372
+#: ..\../main/controllers/controladorcarga.cpp:408
+#: ..\../main/controllers/controladorcarga.cpp:441
+#: ..\../main/controllers/controladorcarga.cpp:474
+#: ..\../main/controllers/controladorcarga.cpp:507
+#: ..\../main/controllers/controladorcarga.cpp:540
+#: ..\../main/controllers/controladorcarga.cpp:573
+#: ..\../main/controllers/controladorcarga.cpp:606
+#: ..\../main/controllers/controladorcarga.cpp:935
+msgid "Error loading the study: Out of memory"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:375
+#, fuzzy
+msgid "Error loading the study: Internal Error"
+msgstr "Грешка: Унутрашња грешка."
+
+#: ..\../main/controllers/controladorcarga.cpp:630
+#: ..\../main/controllers/streaming/streamingloader.cpp:1023
+#: ..\../main/controllers/streaming/streamingloader.cpp:1223
+#: ..\../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:651
+#: ..\../main/controllers/controladorcarga.cpp:960
+msgid "Process canceled by user."
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:878
+msgid "Interpreting properties"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:917
+#, fuzzy
+msgid "Spacing of the image is invalid: ("
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../main/controllers/controladorcarga.cpp:942
+msgid "Reading dataset"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:951
+#, fuzzy
+msgid "Error reading the study:"
+msgstr "Грешка отварања студије"
+
+#: ..\../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:972
+#, fuzzy
+msgid "load"
+msgstr ""
+"Грешка: Потрошили сте видео меморију система и због тога није могуће учитати "
+"слику. Затворите неке студије да ослободите меморију."
+
+#: ..\../main/controllers/controladorenviohl7.cpp:40
+msgid "Stopping HL7 sender"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:63
+#: ..\../main/controllers/controladorenviohl7.cpp:76
+msgid "Error starting HL7 sender"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:65
+#: ..\../main/controllers/controladorenviohl7.cpp:78
+msgid "HL7 sender started"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:108
+msgid "HL7 controller destroyed"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:150
+#, fuzzy
+msgid "Error processing message"
+msgstr "Грeшкa"
+
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/controllers/pacscontroller.cpp:1549
+#: ..\../main/controllers/pacscontroller.cpp:1553
+#: ..\../main/controllers/pacscontroller.cpp:1557
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:184
+#, fuzzy
+msgid "Unknown"
+msgstr "<непознат ИБ>"
+
+#: ..\../main/controllers/controladorextensiones.cpp:110
+msgid "Loading"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:153
+msgid "Could not find entry point"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:74
+msgid "Integration engine hostname not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:77
+msgid "Integration engine port not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:91
+#, fuzzy
+msgid "Unsupported protocol"
+msgstr " неподржани састојци"
+
+#: ..\../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr "Пронашао сам %d резултата"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, fuzzy, c-format
+msgid "Downloading file %d/%d"
+msgstr " (слика — %d)"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+#, fuzzy
+msgid "Image format not supported"
+msgstr "ЕЦГ запис није подржан"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:200
+#, fuzzy
+msgid "Receiving Association failed: "
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:209
+#, fuzzy
+msgid "Association received"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:210
+msgid "Parameters:"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ")"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:274
+msgid "No valid presentation contexts"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "Association(dicom://"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr "@"
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr " до "
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, fuzzy, c-format
+msgid "Uploading file %d of %d"
+msgstr " (слика — %d)"
+
+#: ..\../main/controllers/dicommanager.cpp:504
+#: ..\../main/controllers/dicommanager.cpp:531
+#, fuzzy
+msgid "Extracting file..."
+msgstr "&Датотека"
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid "Error creating history database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:343
+msgid "Error creating dicomDir database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:425
+#: ..\../main/controllers/historycontroller.cpp:441
+msgid "Error creating thumbnails database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#, fuzzy
+msgid "Including image "
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr " од "
+
+#: ..\../main/controllers/historycontroller.cpp:707
+#, fuzzy
+msgid "Linking image "
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr ""
+
+#: ..\../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#, fuzzy
+msgid "Malformed template Id ("
+msgstr "<непознат ИБ>"
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+#, fuzzy
+msgid "Template Id unsupported ("
+msgstr " неподржани састојци"
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr ""
+"):\n"
+"Проверите подешавање и приложите га ако је неопходно"
+
+#: ..\../main/controllers/integrationcontroller.cpp:566
+#, fuzzy
+msgid "Unknown module Id ("
+msgstr "<непознат ИБ>"
+
+#: ..\../main/controllers/integrationcontroller.cpp:592
+#, fuzzy
+msgid "Empty configuration"
+msgstr "Напредна подешавања ..."
+
+#: ..\../main/controllers/integrationcontroller.cpp:631
+msgid "XML Parser Not Found. Key="
+msgstr ""
+
+#: ..\../main/controllers/log4cplus/guiappender.cpp:75
+#, fuzzy
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr "%d. %m. %Y. %H:%M:%S"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ..\../main/gui/history3/historypanel3base.cpp:48
+#: ..\../main/gui/import/pasosimportacionbase.cpp:227
+#, fuzzy
+msgid "Patient"
+msgstr ""
+"\n"
+"* Потребан је ИБ пацијента."
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#, fuzzy
+msgid "Patient ID"
+msgstr ""
+"\n"
+"* Потребан је ИБ пацијента."
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:86
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ..\../main/gui/history3/historypanel3.cpp:227
+#: ..\../main/gui/open/opendialogs.cpp:50
+#, fuzzy
+msgid "Modality"
+msgstr " у начин "
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:98
+msgid "Dimensions"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:109
+#, c-format
+msgid "Made with %s"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:167
+#: ..\../main/controllers/modalitysettingscontroller.cpp:338
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr "Основно"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1212
+#, fuzzy
+msgid "Downloading file"
+msgstr "&Датотека"
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Error downloading WADO file"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+#, fuzzy
+msgid "Check PACS configuration"
+msgstr "Напредна подешавања ..."
+
+#: ..\../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1428
+#, fuzzy
+msgid "Invalid HTTP response"
+msgstr "„action“ атрибут је неисправан на „gnkworkflow“ досегу"
+
+#: ..\../main/controllers/pacscontroller.cpp:1433
+#, fuzzy
+msgid "Invalid HTTP code"
+msgstr "„code“ атрибут је очекиван на „patient“ досегу"
+
+#: ..\../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1472
+#, fuzzy
+msgid "PACS-Service"
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:97
+#: ..\../main/controllers/parserxmlspanish.cpp:94
+msgid "Omitted Identificator"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:105
+#: ..\../main/controllers/parserxmlspanish.cpp:102
+#, fuzzy
+msgid "Omitted AET"
+msgstr "АЕТ"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:113
+#: ..\../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:121
+#: ..\../main/controllers/parserxmlspanish.cpp:118
+#, fuzzy
+msgid "Omitted port"
+msgstr ""
+"\n"
+"— Прикључник је превелик"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:206
+#: ..\../main/controllers/parserxmlenglish.cpp:237
+#: ..\../main/controllers/parserxmlspanish.cpp:188
+#: ..\../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:212
+#: ..\../main/controllers/parserxmlspanish.cpp:194
+#, fuzzy
+msgid "Port is not a valid number"
+msgstr "Број напада"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:248
+#: ..\../main/controllers/parserxmlspanish.cpp:228
+#, fuzzy
+msgid "The port is not a valid number"
+msgstr "Број напада"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:265
+#: ..\../main/controllers/parserxmlspanish.cpp:246
+#, fuzzy
+msgid "Setting not found"
+msgstr "Нисам пронашао мерења"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr "„action“ атрибут је неисправан на „gnkworkflow“ досегу"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr "„action“ атрибут је очекиван на „gnkworkflow“ досегу"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr "„pacs-retrieve-sid“ атрибут је празан на „gnkworkflow“ досегу"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr "„pacs-store-sid“ атрибут је празан на „gnkworkflow“ досегу"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr "„value“ атрибут је очекиван на „query-retrieve-level“ досегу"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:391
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr "„code“ атрибут је очекиван на „patient“ досегу"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:427
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr "„code“ атрибут је очекиван на „physician“ досегу"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:434
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr "„value“ атрибут је очекиван на „physician“ досегу"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:445
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr "„iid“ атрибут је очекиван на „institution“ досегу"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr "„code“ атрибут је очекиван на „metadata“ досегу"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:483
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr "„key“ атрибут је очекиван на „metadata“ досегу"
+
+#: ..\../main/controllers/parserxmlenglish.cpp:548
+#: ..\../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:552
+#: ..\../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:570
+#: ..\../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr "„accion“ атрибут је неисправан на „plantilla“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr "„accion“ атрибут је очекиван на „plantilla“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr "„pacs_retrieve_sid“ атрибут је празан на „plantilla“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr "„pacs_store_sid“ атрибут је празан на „plantilla“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:340
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr "„uid“ атрибут је очекиван на „dimse“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr "„ambito“ атрибут је неисправан на „dimse“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr "„ambito“ атрибут је очекиван на „dimse“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:402
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr "„codigo“ атрибут је очекиван на „paciente“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:438
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr "„codigo“ атрибут је очекиван на „medico“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:445
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr "„valor“ атрибут је очекиван на „medico“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr "„cid“ атрибут је очекиван на „centro“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr "„aid“ атрибут је очекиван на „hce“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:486
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr "„codigo“ атрибут је очекиван на „metadato“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr "„clave“ атрибут је очекиван на „metadato“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:524
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr "„id_peticion“ атрибут је очекиван на „gnkworkflow“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr "„ambito“ атрибут је очекиван на „plantilla“ досегу"
+
+#: ..\../main/controllers/parserxmlspanish.cpp:559
+msgid "id_application expected"
+msgstr ""
+
+#: ..\../main/controllers/smartretrievecontroller.cpp:124
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:920
+#, fuzzy
+msgid "Downloading from PACS..."
+msgstr " бајта од укупно "
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:303
+#: ..\../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ..\../main/gui/history3/historytablemodel.cpp:403
+#: ..\../main/gui/history3/historytablemodel.cpp:415
+#: ..\../main/gui/history3/historytablemodel.cpp:470
+#: ..\../main/gui/history3/historytablemodel.cpp:482
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:102
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr "%d. %m. %Y. %H:%M:%S"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr "%d. %m. %Y. 00:00:00"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+#, fuzzy
+msgid "Exploring PACS..."
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ..\../main/gui/history3/historypanel3.cpp:225
+#: ..\../main/gui/open/opendialogs.cpp:49
+#, fuzzy
+msgid "Patient id"
+msgstr ""
+"\n"
+"* Потребан је ИБ пацијента."
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ..\../main/gui/history3/historypanel3.cpp:224
+#: ..\../main/gui/open/opendialogs.cpp:48
+#, fuzzy
+msgid "Patient name"
+msgstr ""
+"\n"
+"* Надовезивање имена и презимена пацијената не може бити више од 61."
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:479
+#, fuzzy
+msgid "Study Instance UID"
+msgstr "„uid“ атрибут је очекиван на „dimse“ досегу"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ..\../main/gui/history3/historypanel3.cpp:231
+#: ..\../main/gui/open/opendialogs.cpp:53
+msgid "Accession number"
+msgstr "Број напада"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:481
+msgid "Study date"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:482
+#, fuzzy
+msgid "Study time"
+msgstr "Грешка отварања студије"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:490
+#, fuzzy
+msgid "Series Instance UID"
+msgstr "„uid“ атрибут је очекиван на „dimse“ досегу"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:492
+#, fuzzy
+msgid "Series date"
+msgstr "Датум"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:493
+msgid "Series time"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:519
+msgid "No results found"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+msgid "Write query name"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+#, fuzzy
+msgid "Id"
+msgstr "<непознат ИБ>"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+#, fuzzy
+msgid "Date Time"
+msgstr "Датум"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ..\../main/gui/history3/historypanel3.cpp:229
+#: ..\../main/gui/import/pasosimportacionbase.cpp:298
+#: ..\../main/gui/import/pasosimportacionbase.cpp:340
+#: ..\../main/gui/open/opendialogs.cpp:52
+msgid "Description"
+msgstr "Опис"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ..\../main/gui/import/pasosimportacionbase.cpp:276
+msgid "Accession Number"
+msgstr "Број напада"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:210
+msgid "Store query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:211
+msgid "Remove query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:278
+#, fuzzy
+msgid "There is no any PACS configured"
+msgstr "Неки датум"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+msgid "Study UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid "Search"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:519
+msgid "Download series"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+#, fuzzy
+msgid "Download study"
+msgstr "Грешка отварања студије"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:535
+msgid "Link series"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:537
+#, fuzzy
+msgid "Link study"
+msgstr "Грешка отварања студије"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:551
+msgid "Properties..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+msgid "You must specify at least a modality or a period of time"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+msgid "Select a valid query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+msgid "Select a valid PACS Server"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+#, fuzzy
+msgid "Download of modality "
+msgstr " у начин "
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr " није допуштено"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+#, fuzzy
+msgid "Modality download error"
+msgstr " у начин "
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:786
+msgid "search results"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:913
+msgid "Downloading serie..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:916
+#, fuzzy
+msgid "Downloading study..."
+msgstr "Грешка отварања студије"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+#, fuzzy
+msgid "PACS acquisition is restricted"
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+msgid "Server"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ..\../main/gui/import/pasosimportacionbase.cpp:284
+#: ..\../main/gui/import/pasosimportacionbase.cpp:326
+#: ..\../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr "Датум"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ..\../main/gui/history3/historypanel3base.cpp:81
+msgid "Any date"
+msgstr "Неки датум"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ..\../main/gui/history3/historypanel3base.cpp:85
+msgid "Today AM"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ..\../main/gui/history3/historypanel3base.cpp:88
+msgid "Today PM"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ..\../main/gui/history3/historypanel3base.cpp:91
+msgid "Today"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ..\../main/gui/history3/historypanel3base.cpp:100
+msgid "Yesterday"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ..\../main/gui/history3/historypanel3base.cpp:103
+msgid "Last 7 days"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ..\../main/gui/history3/historypanel3base.cpp:106
+msgid "Last 30 days"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ..\../main/gui/history3/historypanel3base.cpp:109
+msgid "Last 3 months"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ..\../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr "Између:"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ..\../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+msgid "Stored queries"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+msgid "Select stored queries..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ..\../main/gui/open/opendialogsbase.cpp:50
+#: ..\../main/gui/open/opendialogsbase.cpp:202
+msgid "Link"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+msgid "Download"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ..\../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr "Затвори"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+#, fuzzy
+msgid "Series does not exist"
+msgstr " не постоји"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ..\../main/gui/open/opendialogsbase.cpp:127
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ..\../main/tools/metricgridtool.cpp:101
+msgid "Ok"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:151
+msgid "Download again"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+#, fuzzy
+msgid "Open"
+msgstr "Приказивач Гинкго КАДикс-а је отвореног кода"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:179
+msgid "Set query name"
+msgstr ""
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:32
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:34
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizedialog.cpp:64
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ..\../main/gui/export/parametrosprincipales.cpp:194
+#, fuzzy
+msgid "Exporting images ..."
+msgstr " (слика — %d)"
+
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:21
+msgid "Common tags"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+msgid "Patient's name and surname"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+#, fuzzy
+msgid "Patient Id"
+msgstr ""
+"\n"
+"* Потребан је ИБ пацијента."
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr "Напомене"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:44
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:71
+#, fuzzy
+msgid "Add new..."
+msgstr "Додај"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ..\../main/tools/anonymizetool.cpp:26
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:136
+msgid "Create new"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:136
+#, fuzzy
+msgid "Add DICOM tag"
+msgstr "Додај"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:199
+msgid "Group"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:203
+msgid "Element"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ..\../widgets/wangulo.cpp:1114
+#, fuzzy
+msgid "Value"
+msgstr "Основна вредност"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+msgid "Top right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+msgid "Top left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+msgid "Bottom left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+msgid "Bottom right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+msgid "You must fill in all fields"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+msgid "Window/level label in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+msgid "Window"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+#, fuzzy
+msgid "Level"
+msgstr "„value“ атрибут је очекиван на „query-retrieve-level“ досегу"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+msgid "Do you confirm the removal of the preset?"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+#, fuzzy
+msgid "Data modified"
+msgstr "Подаци"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+#, fuzzy
+msgid "Modality settings"
+msgstr " у начин "
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+#, fuzzy
+msgid "Default modality settings"
+msgstr " у начин "
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, fuzzy, c-format
+msgid "%s settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:60
+#, fuzzy
+msgid "settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+#, fuzzy
+msgid "Export Configuration"
+msgstr "Напредна подешавања ..."
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Ini Files(*.ini)|*.ini"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#, fuzzy
+msgid "Existing file"
+msgstr "&Датотека"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+msgid "Export successfully completed"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#, fuzzy
+msgid "There was an error during exportation"
+msgstr "Грeшкa"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+#, fuzzy
+msgid "Import Configuration"
+msgstr "Напредна подешавања ..."
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Ini files(*.ini)|*.ini"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+msgid "There was an error during importation, check permissions"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+#, fuzzy
+msgid "Dicom tag"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+msgid "Split horizontally..."
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+msgid "Split vertically..."
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ..\../main/tools/windowlayouttool.cpp:273
+msgid "Split active horizontally"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ..\../main/tools/windowlayouttool.cpp:274
+msgid "Split active vertically"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+msgid "New hanging protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, fuzzy, c-format
+msgid "Window %d"
+msgstr " (слика — %d)"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "Yes"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+msgid "Hanging protocols"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+msgid "One day"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+msgid "Two days"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+msgid "Three days"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+msgid "Two weeks"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+msgid "One month"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+msgid "Three months"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+msgid "Local database"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+msgid "Local DICOM Dir setup"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+msgid "Select DICOMDIR"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+#, fuzzy
+msgid "Extensions settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+msgid "Port has to be a valid number"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr "Опште"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+#, fuzzy
+msgid "General configuration parameters"
+msgstr "Опште"
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:134
+msgid "Testing conectivity with the server..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:144
+#, fuzzy
+msgid "Error connecting to url"
+msgstr "Грeшкa"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#, fuzzy
+msgid "hostname/port not set"
+msgstr ""
+"\n"
+"— Прикључник је превелик"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+#, fuzzy
+msgid "Select certificate"
+msgstr "Уверење"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:255
+#, fuzzy
+msgid "Change ..."
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+#, fuzzy
+msgid "Import ..."
+msgstr "Да ли сте сигурни да желите да откажете поступак увоза?"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:279
+#, fuzzy
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr ""
+"\n"
+"— Ако желите да користите ССЛ/ТЛС треба да подесите исправно уверење и лични "
+"кључ"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:472
+#, fuzzy
+msgid "There are this errors: "
+msgstr ""
+"\n"
+"Постоје %d грешке (погледајте дневник за опширнији опис)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"— Прикључник мора да буде позитиван краћи цео број (16 бита)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+"\n"
+"— Прикључник је превелик"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+"\n"
+"— Највећа дужина АЕТ-а је 16 знакова"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+"\n"
+"— ПДУ величина треба да буде већа или једнака нули (основно = 16384)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+"\n"
+"— Највећа вредност ПДУ-а је "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+"\n"
+"— Најмања вредност ПДУ-а је "
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+"\n"
+"— Ако желите да користите ССЛ/ТЛС треба да подесите исправно уверење и лични "
+"кључ"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:525
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:558
+msgid "Testing the connection to the node ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:561
+#, fuzzy
+msgid "DICOM Error"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:607
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:616
+#, fuzzy
+msgid "Invalid port number"
+msgstr "Број напада"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:622
+#, fuzzy
+msgid "WADO Error"
+msgstr "Грeшкa"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:703
+#, fuzzy
+msgid "Use by default"
+msgstr "Основно"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:795
+#, fuzzy
+msgid "DICOM nodes"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:800
+#, fuzzy
+msgid "DICOM nodes settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+"\n"
+"— Месни прикључник мора да буде позитиван краћи цео број (16 бита)"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+"\n"
+"— Месни прикључник је превелик"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+"\n"
+"— Највећа дужина месног АЕТ-а је 16 знакова"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ..\../main/gui/export/pasosexportacionbase.cpp:20
+msgid "Profile"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr "Основна вредност"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+msgid "Set property active"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Set property inactive"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#, fuzzy
+msgid "Set default value"
+msgstr "Основна вредност"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+msgid "Set by user"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+msgid "Profile name can't be repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+#, fuzzy
+msgid "Profiles Settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+msgid "Confirm the removal of the profile "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+msgid "New User"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+msgid "User name repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+msgid "Password has to contain at least 6 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+msgid "No login"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+#, fuzzy
+msgid "User/Password"
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+#, fuzzy
+msgid "Password"
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+#, fuzzy
+msgid "Password is setted"
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+#, fuzzy
+msgid "Password is not setted"
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+#, fuzzy
+msgid "Set password"
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+msgid "Security Setting"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+msgid "User inserted successfully"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#, fuzzy
+msgid "Password changed successfully"
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+msgid "User deleted successfully"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ..\../main/gui/login/dialogologin.cpp:27
+msgid "User"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ..\../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#, fuzzy
+msgid "Maximum length of title is 8 characters"
+msgstr ""
+"\n"
+"— Највећа дужина АЕТ-а је 16 знакова"
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+msgid "Title"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+msgid "Path"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+msgid "Clean before"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+msgid "Clean after"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+#, fuzzy
+msgid "Location Settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:96
+#, fuzzy
+msgid "Anonymization settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1370
+#, fuzzy
+msgid "Settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+msgid "Export config..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+msgid "Import config..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr "Примени"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+msgid "Physician's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+msgid "Physician's Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+msgid "Service"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+msgid "Service's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+#, fuzzy
+msgid "Service's Id"
+msgstr "<непознат ИБ>"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+msgid "Local institution"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+msgid "Institution's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+msgid "Institution's Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+msgid "Dicomized files"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+msgid "Charset"
+msgstr "Скуп знакова"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+msgid "ISO_IR 148"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+msgid "Automatically check for updates"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+#, fuzzy
+msgid "Proxy settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+msgid "Enable http proxy"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+#, fuzzy
+msgid "Proxy Settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+#, fuzzy
+msgid "Server settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+msgid "Host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+#, fuzzy
+msgid "Port"
+msgstr ""
+"\n"
+"— Прикључник је превелик"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+msgid "Username"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+msgid "No proxy for addresses containing"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+#, fuzzy
+msgid "DICOM Dir"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr "..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+msgid "Auto-cleaning"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+msgid "MB"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ..\../main/tools/toolwindowlevel.cpp:201
+#, fuzzy
+msgid "Reset to default"
+msgstr "Основно"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+#, fuzzy
+msgid "Local AET"
+msgstr ""
+"\n"
+"— Највећа дужина месног АЕТ-а је 16 знакова"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+#, fuzzy
+msgid "DICOM Nodes"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+msgid "New ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+#, fuzzy
+msgid "Edit ..."
+msgstr "&Уреди"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete"
+msgstr "Обриши"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+#, fuzzy
+msgid "Set Default"
+msgstr "Основно"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+#, fuzzy
+msgid "DICOM Node"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr "АЕТ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+#, fuzzy
+msgid "PDU (KB)"
+msgstr ""
+"\n"
+"— Највећа вредност ПДУ-а је "
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+msgid "Retrieve method"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Move"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Get"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+msgid "WADO URL"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+#, fuzzy
+msgid "Retrieve mode"
+msgstr "Режим безименог (историјат је очишћен)"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ..\../main/gui/import/pasosimportacionbase.cpp:319
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1395
+msgid "Series"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#, fuzzy
+msgid "Studies"
+msgstr ""
+"Грешка: Систем је остао без меморије. Затворите неке студије да ослободите "
+"меморију."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+msgid "Worklists"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+msgid "Select how do you want to handle MPPS items"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+#, fuzzy
+msgid "DICOM MPPS"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+msgid "HL7 messages"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+msgid "HL7"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+msgid "Abort message"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+msgid "Completed message"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+msgid "In progress message"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+#, fuzzy
+msgid "Default values"
+msgstr "Основно"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+msgid "Worklist"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+#, fuzzy
+msgid "SSL/TLS"
+msgstr ""
+"\n"
+"— Ако желите да користите ССЛ/ТЛС треба да подесите исправно уверење и лични "
+"кључ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+msgid "Verify server credentials"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+#, fuzzy
+msgid "Use SSL/TLS"
+msgstr ""
+"\n"
+"— Ако желите да користите ССЛ/ТЛС треба да подесите исправно уверење и лични "
+"кључ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr "Уверење"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+#, fuzzy
+msgid "Certificate to use in this connection"
+msgstr "Уверење"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr "Напредна подешавања ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+#, fuzzy
+msgid "Default charset"
+msgstr "Скуп знакова"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+msgid "Advanced"
+msgstr "Напредно"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+msgid "Local AET certificate"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+#, fuzzy
+msgid "Certificate used by Ginkgo CADx"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+#, fuzzy
+msgid "Receiver organization Id"
+msgstr "<непознат ИБ>"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+#, fuzzy
+msgid "Petitioner System Id"
+msgstr "<непознат ИБ>"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+#, fuzzy
+msgid "Filler Application Id"
+msgstr "<непознат ИБ>"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+#, fuzzy
+msgid "Ginkgo CADx Application Id"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+#, fuzzy
+msgid "Integration engine"
+msgstr "Обављам задатке обједињавања ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+#, fuzzy
+msgid "Hostname / Port"
+msgstr ""
+"\n"
+"— Прикључник је превелик"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr "/"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+msgid "Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ..\../main/gui/export/pasosexportacionbase.cpp:28
+#, fuzzy
+msgid "Format"
+msgstr "ЕЦГ запис није подржан"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+#, fuzzy
+msgid "Message's format"
+msgstr "ЕЦГ запис није подржан"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+msgid "Test engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+msgid "Test Integration Engine connectivity"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+#, fuzzy
+msgid "Ginkgo Extension Title"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+#, fuzzy
+msgid "Edit public key"
+msgstr "&Уреди"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+msgid "Public key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+msgid "Public key in PEM format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+#, fuzzy
+msgid "Load ..."
+msgstr ""
+"Грешка: Потрошили сте видео меморију система и због тога није могуће учитати "
+"слику. Затворите неке студије да ослободите меморију."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+#, fuzzy
+msgid "Private key"
+msgstr ""
+"\n"
+"— Ако желите да користите ССЛ/ТЛС треба да подесите исправно уверење и лични "
+"кључ"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+msgid "Private key in PEM format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+msgid "Profile name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+msgid "Set active"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+#, fuzzy
+msgid "Configure location"
+msgstr "Подеси мрежу ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+msgid "Location"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+msgid "Security type"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+#, fuzzy
+msgid "Change Password ..."
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+#, fuzzy
+msgid "Set main password"
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+#, fuzzy
+msgid "Set Password"
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+#, fuzzy
+msgid "Edit User"
+msgstr "&Уреди"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+msgid "User Name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+#, fuzzy
+msgid "Confirm Password"
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+msgid "Properties"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+#, fuzzy
+msgid "Edit corner annotations"
+msgstr "&Уреди"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue}  where GGGG is the tag's group in hexadecimal and EEEE is the "
+"tag's element."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+msgid "Window/level"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr "Додај"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ..\../main/gui/history3/historytoolmenu.cpp:149
+#: ..\../widgets/gui/selecciontextobase.h:58
+#, fuzzy
+msgid "Edit"
+msgstr "&Уреди"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+#, fuzzy
+msgid "Default Window/Level"
+msgstr "Основно"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+msgid "Corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+msgid "Setup corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+msgid "Setup..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+#, fuzzy
+msgid "Other settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+#, fuzzy
+msgid "Interpolate pixel data"
+msgstr "Подаци"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+msgid "Hanging protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+#, fuzzy
+msgid "Opening mode"
+msgstr "Грешка отварања студије"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+#, fuzzy
+msgid "Study opening criteria"
+msgstr "Грешка отварања студије"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+msgid "Workspace"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+msgid "Enable/Disable"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+msgid "Top left corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+msgid "Setup window"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+#, fuzzy
+msgid "Set default"
+msgstr "Основно"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+#, fuzzy
+msgid "Open in main window"
+msgstr "Приказивач Гинкго КАДикс-а је отвореног кода"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+#, fuzzy
+msgid "Setup position..."
+msgstr "Положај   : "
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+msgid "Setup undocked window position"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+#, fuzzy
+msgid "Layout"
+msgstr "1x1 распоред"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+#, fuzzy
+msgid "Current layout"
+msgstr "1x1 распоред"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+msgid "Columns"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+msgid "Series criteria"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+#, fuzzy
+msgid "Select opening mode"
+msgstr "Грешка отварања студије"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+msgid "Tag"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+msgid "Save"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+msgid "Enable background queries"
+msgstr ""
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+msgid "Smart retrieve"
+msgstr ""
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+#, fuzzy
+msgid "Smart retrieve settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.h:64
+#, fuzzy
+msgid "Export DICOM"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+#, fuzzy
+msgid "Ginkgo CADx private tags"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ..\../main/gui/history3/historypanel3.cpp:340
+#: ..\../main/gui/history3/historytoolmenu.cpp:158
+msgid "Export"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ..\../main/gui/export/parametrosprincipales.cpp:157
+msgid "Select the directory where the files will be stored"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+msgid "Select the DICOM Dir folder"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+#, fuzzy
+msgid "DICOM Dir migration"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+msgid "Migrate existing (recommended)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+msgid "Continue..."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+msgid "Select other"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+msgid "Browse..."
+msgstr "Разгледај..."
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:106
+#, fuzzy
+msgid "DICOM Export"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:110
+msgid "Select the format and the images you want to export"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:143
+#, fuzzy
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr "Све датотеке (*.*)|*.*"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:150
+#, fuzzy
+msgid "Select file"
+msgstr "&Датотека"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+#, fuzzy
+msgid "DICOM (native format)"
+msgstr "ЕЦГ запис није подржан"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "Image (jpg, bmp, png)"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:38
+#, fuzzy
+msgid "Export all files of opened tab"
+msgstr " (слика — %d)"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:55
+msgid "JPEG"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr ""
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:40
+#, fuzzy
+msgid "Image Export Wizard"
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ..\../main/gui/license/aboutdialogbase.cpp:67
+#: ..\../main/gui/license/aboutdialogbase.cpp:151
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:54
+msgid "&Accept"
+msgstr "&Прихвати"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr "&Следеће >"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+msgid "Open link"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+#, fuzzy
+msgid "File link:"
+msgstr "&Датотека"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ..\../main/gui/import/pasosimportacionbase.cpp:270
+#, fuzzy
+msgid "Study"
+msgstr "Грешка отварања студије"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+msgid "User name"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+#, fuzzy
+msgid "Ginkgo Cloud link"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+msgid "Copy to clipboard"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "New Ginkgo Cloud study"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "To download the study, paste this url "
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+msgid "Creator"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+msgid "Last Modificator"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+#, fuzzy
+msgid "Show link..."
+msgstr "Прикажи/сакриј мета податке"
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+msgid "Invalid link"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:117
+#: ..\../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:119
+#: ..\../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:226
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr "Године"
+
+#: ..\../main/gui/history3/historypanel3.cpp:228
+#, fuzzy
+msgid "Date acquired"
+msgstr "Датум"
+
+#: ..\../main/gui/history3/historypanel3.cpp:230
+#, fuzzy
+msgid "Date added"
+msgstr "Датум"
+
+#: ..\../main/gui/history3/historypanel3.cpp:308
+#: ..\../main/gui/history3/historytoolmenu.cpp:82
+#: ..\../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:316
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:363
+msgid "All patients"
+msgstr "Сви болесници"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, fuzzy
+msgid "Results"
+msgstr "Пронашао сам %d резултата"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, c-format
+msgid " (%d images)"
+msgstr " (слика — %d)"
+
+#: ..\../main/gui/history3/historypanel3.cpp:634
+#, fuzzy
+msgid "Open study with .."
+msgstr "Грешка отварања студије"
+
+#: ..\../main/gui/history3/historypanel3.cpp:663
+#: ..\../main/gui/history3/historypanel3base.cpp:482
+#, fuzzy
+msgid "Synchronize"
+msgstr "Усклади/Врати усклађивање"
+
+#: ..\../main/gui/history3/historypanel3.cpp:677
+msgid "&Delete from history"
+msgstr "&Обриши из историјата"
+
+#: ..\../main/gui/history3/historypanel3.cpp:686
+msgid "&Clear history"
+msgstr "&Очисти историјат"
+
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#, fuzzy
+msgid "Unable to open modality "
+msgstr " у начин "
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr " са синтаксом преноса "
+
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1086
+#, fuzzy
+msgid "all files"
+msgstr "Све"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+msgid "Select at least one series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "those series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "this series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:57
+#, fuzzy
+msgid "Advanced search"
+msgstr "Напредно"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:73
+#, fuzzy
+msgid "Acquisition date"
+msgstr "Датум"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:302
+#: ..\../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr "Да ли сте сигурни да желите да обришете "
+
+#: ..\../main/gui/history3/historypanel3base.cpp:336
+#: ..\../main/gui/history3/historytoolmenu.cpp:102
+#: ..\../main/gui/history3/historytoolmenu.cpp:200
+#: ..\../main/gui/history3/historytoolmenu.cpp:229
+msgid "Remove"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr "Увек користи овај преглед за отварање ових датотека"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:454
+#: ..\../main/gui/history3/historypanel3base.h:187
+#, fuzzy
+msgid "Synchronize files"
+msgstr "Усклади/Врати усклађивање"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+
+#: ..\../main/gui/history3/historytablemodel.cpp:406
+#: ..\../main/gui/history3/historytablemodel.cpp:418
+#: ..\../main/gui/history3/historytablemodel.cpp:473
+#: ..\../main/gui/history3/historytablemodel.cpp:485
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:105
+msgid "00/00/0000 00:00:00"
+msgstr "00/00/0000 00:00:00"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:138
+#, fuzzy
+msgid "Close history"
+msgstr "Затвори"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:139
+#: ..\../main/gui/startup/startupform.cpp:53
+#, fuzzy
+msgid "History"
+msgstr "&Очисти историјат"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:201
+#: ..\../main/gui/history3/historytoolmenu.cpp:230
+#, fuzzy
+msgid "Clear history"
+msgstr "&Очисти историјат"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:232
+#, fuzzy
+msgid "Select all"
+msgstr "Све"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:233
+msgid "Deselect all"
+msgstr "Одзначи све"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+msgid "Destination"
+msgstr "Одредиште"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+msgid "Status"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+#, fuzzy
+msgid "Error message"
+msgstr "Грeшкa"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+#, fuzzy
+msgid "Show Message"
+msgstr "Прикажи/сакриј мета податке"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+#, fuzzy
+msgid "Edit Message"
+msgstr "&Уреди"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+#, fuzzy
+msgid "Delete message"
+msgstr "Обриши"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+#, fuzzy
+msgid "Error editing message"
+msgstr "Грeшкa"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+#, fuzzy
+msgid "Error purguing messages"
+msgstr "Грeшкa"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Stop"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Sent"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/progress/statusbarprogreso.cpp:281
+msgid "Warning"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+#, fuzzy
+msgid "Error getting message"
+msgstr "Грeшкa"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+#, fuzzy
+msgid "Running"
+msgstr "0 покренутих задатака."
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+msgid "Usually due to an error in sending a message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Start"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+#, fuzzy
+msgid "Error deleting messages"
+msgstr "Грeшкa"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+msgid "Remove sent messages"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+#, fuzzy
+msgid "Exit"
+msgstr "&Изађи"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+msgid "Messages"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+msgid "Refresh"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1394
+#, fuzzy
+msgid "View"
+msgstr "Уништи преглед"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+msgid "Send task status:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+msgid "Message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr "Датум:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+msgid "Destination:"
+msgstr "Одредиште:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+msgid "Status:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+msgid "Message content:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:142
+msgid "OK"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:210
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+"\n"
+"* Потребан је ИБ пацијента."
+
+#: ..\../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+"\n"
+"* Надовезивање имена и презимена пацијената не може бити више од 61."
+
+#: ..\../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+"\n"
+"* Запис висине у центиметрима није исправан. "
+
+#: ..\../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+"\n"
+"* Датум рођења пацијента је након датума студије"
+
+#: ..\../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+"\n"
+"* Запис тежине није исправан. Исправан опсег је између 0 и 400 Kg."
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:231
+#, fuzzy
+msgid "Error validating fields"
+msgstr "Грeшкa"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:148
+msgid "Selecting Import Profile"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:152
+msgid "You must select the profile you want to use import"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+msgid "You must select the import profile"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:21
+#, fuzzy
+msgid "Selected images"
+msgstr " (слика — %d)"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:56
+msgid "Preview"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:62
+#, fuzzy
+msgid "Remove all"
+msgstr "Све"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:113
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:65
+#, fuzzy
+msgid "Demographic data"
+msgstr "Подаци"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr "(ИБ или број медицинске историје)"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:159
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "Birth date"
+msgstr "Датум рођења"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:217
+#, fuzzy
+msgid "Study Details"
+msgstr "Грешка отварања студије"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:234
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:122
+#, fuzzy
+msgid "Weight"
+msgstr ""
+"\n"
+"* Запис тежине није исправан. Исправан опсег је између 0 и 400 Kg."
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:245
+#, fuzzy
+msgid "Kg"
+msgstr ""
+"\n"
+"* Запис тежине није исправан. Исправан опсег је између 0 и 400 Kg."
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:252
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:119
+#, fuzzy
+msgid "Height"
+msgstr ""
+"\n"
+"* Запис висине у центиметрима није исправан. "
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:291
+#: ..\../main/gui/import/pasosimportacionbase.cpp:333
+msgid "Time"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files..."
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+#, fuzzy
+msgid "Paste from clipboard"
+msgstr " бајта од укупно "
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr "Назад"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr "Да ли сте сигурни да желите да обришете ову датотеку са диска?"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:330
+#, fuzzy
+msgid "Delete selected items"
+msgstr "Обриши"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#, fuzzy
+msgid "You must select an image"
+msgstr "Изаберите преглед који желите да ускладите са текућим"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:346
+msgid "Generating preview..."
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:500
+#, fuzzy
+msgid "Select images"
+msgstr " (слика — %d)"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:715
+#, fuzzy
+msgid "Image selection"
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:760
+#, fuzzy
+msgid "The file"
+msgstr "&Датотека"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr " не постоји"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:52
+#, fuzzy
+msgid "Image Import Wizard"
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:167
+#, fuzzy
+msgid "free of"
+msgstr ""
+"Грешка: Систем је остао без меморије. Затворите неке студије да ослободите "
+"меморију."
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:181
+msgid "in dicomization dir."
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr "Да ли сте сигурни да желите да откажете поступак увоза?"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, fuzzy, c-format
+msgid "Step %d of %d: "
+msgstr " (слика — %d)"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr "&Заврши"
+
+#: ..\../main/gui/license/aboutdialog.cpp:25
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:22
+#, fuzzy
+msgid "Ginkgo CADx"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:55
+msgid "Licenses"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:58
+#, fuzzy
+msgid "UPDATE_INFO"
+msgstr "Подаци"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:108
+#: ..\../main/gui/license/aboutdialogbase.h:88
+#, fuzzy
+msgid "Open Source Licenses"
+msgstr "Приказивач Гинкго КАДикс-а је отвореног кода"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr "Каиро"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:119
+msgid "FamFamFam Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:120
+msgid "Fugue Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:126
+msgid "WxWidgets"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:127
+msgid "Zlib"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:130
+msgid "Dark Glass Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ..\../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:53
+msgid "Check for updates automatically"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:66
+#, fuzzy
+msgid "I Accept the license"
+msgstr "Прихвати"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Save logs"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+#, fuzzy
+msgid "File couldn't be stored "
+msgstr "&Датотека"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+#, fuzzy
+msgid "Could not write to file"
+msgstr "&Датотека"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+msgid "Save log..."
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+#, fuzzy
+msgid "Clear log"
+msgstr "Избриши"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+#, fuzzy
+msgid "Log"
+msgstr ""
+"\n"
+"Постоје %d грешке (погледајте дневник за опширнији опис)"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr "Избриши"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr ""
+
+#: ..\../main/gui/login/dialogologin.cpp:50
+#, fuzzy
+msgid "The username or password is incorrect"
+msgstr "Промените лозинку"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:250
+#, fuzzy
+msgid "Tasks"
+msgstr "Обављам задатке обједињавања ..."
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1139
+#, fuzzy
+msgid "Included in the history ..."
+msgstr "&Очисти историјат"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+#, fuzzy
+msgid "Check update error"
+msgstr "Грeшкa"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+msgid "Malformed XML"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1192
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+msgid "Error parsing integration XML:\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#, fuzzy
+msgid "PACS error:\n"
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+msgid "Error executing WorkFlow\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+msgid "Close current view"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all"
+msgstr "Затвори све"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+#, fuzzy
+msgid "Close all views"
+msgstr "Затвори све"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr "&Изађи"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+#, fuzzy
+msgid "Exit application"
+msgstr "&Изађи"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+#, fuzzy
+msgid "Show full screen"
+msgstr "Прикажи/сакриј мета податке"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1302
+msgid "Tab grouping"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1329
+#, fuzzy
+msgid "Ginkgo CADx manual ..."
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1330
+#, fuzzy
+msgid "Open test card"
+msgstr "Приказивач Гинкго КАДикс-а је отвореног кода"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for newest versions"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1332
+#, fuzzy
+msgid "Need support ..."
+msgstr "Радимо на подршци "
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About "
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+msgid "HL7 monitor"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+msgid "HL7 message control"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+msgid "Log monitor"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+msgid "Log monitored"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1390
+msgid "&File"
+msgstr "&Датотека"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr "&Уреди"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr "По&моћ"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1664
+#, fuzzy
+msgid "Unsaved data"
+msgstr "Подаци"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+#, fuzzy
+msgid "Error saving"
+msgstr "Грeшкa"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "Full Screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+#, fuzzy
+msgid "View Full Screen"
+msgstr "Уништи преглед"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1708
+msgid "Tab Regroup"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr "&Затвори"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "&Close all"
+msgstr "&Затвори све"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "Close all windows"
+msgstr "Затвори све прозоре"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1728
+msgid "Tabbed organization"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+#, fuzzy
+msgid "Ginkgo CADx updated"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1782
+msgid "New version available ("
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+msgid "New Update"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+msgid "New version available"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+msgid "X"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+#, fuzzy
+msgid "Close this notification"
+msgstr "Затвори"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+msgid "The following commands will be aborted if you close the application"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+#, fuzzy
+msgid "Close Ginkgo CADx"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:138
+msgid "User login"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+msgid "System authentication"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+msgid "Login"
+msgstr ""
+
+#: ..\../main/gui/open/abrir.cpp:80 ..\../main/gui/open/abrir.cpp:82
+#, fuzzy
+msgid "Open..."
+msgstr "Приказивач Гинкго КАДикс-а је отвореног кода"
+
+#: ..\../main/gui/open/opendialogs.cpp:58
+msgid "There was an error reading DICOMDIR file"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:62
+msgid "Select a valid DICOMDIR file"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:180
+#: ..\../main/gui/open/opendialogsbase.cpp:170
+#: ..\../main/gui/open/opendialogsbase.h:112
+msgid "Copy or link"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:22
+#: ..\../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:94
+#: ..\../main/gui/open/opendialogsbase.h:85
+msgid "Select drive"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:175
+msgid "Do you want to copy or link files?"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ..\../main/gui/selectpacsserver/selectpacsserver.cpp:30
+msgid "There aren't any PACS configured"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:69
+msgid "0000/00/00 00:00:00"
+msgstr "0000/00/00 00:00:00"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.h:57
+#, fuzzy
+msgid "Upload study"
+msgstr "Грешка отварања студије"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+#, fuzzy
+msgid "Select PACS server"
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:119
+#, fuzzy
+msgid "Metadata"
+msgstr "Метаподаци"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:120
+msgid "Identification information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:121
+#, fuzzy
+msgid "Patient information"
+msgstr ""
+"\n"
+"* Потребан је ИБ пацијента."
+
+#: ..\../main/gui/paneltags/paneltags.cpp:122
+msgid "Acquisition information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:123
+msgid "Relationship information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:124
+#, fuzzy
+msgid "Image presentation information"
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../main/gui/paneltags/paneltags.cpp:125 ..\../widgets/wtextbox.cpp:525
+msgid "Text"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:126
+msgid "Other"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:137
+#: ..\../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr "Подаци"
+
+#: ..\../main/gui/previewpanel/previewpanel.cpp:47
+#, fuzzy
+msgid "Hide"
+msgstr "Прикажи/сакриј мета податке"
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:207
+msgid "Previews"
+msgstr ""
+
+#: ..\../main/gui/progress/progresobase.cpp:23
+#, fuzzy
+msgid "There is no running tasks"
+msgstr "0 покренутих задатака."
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:165
+msgid "0 running tasks."
+msgstr "0 покренутих задатака."
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:192
+#, fuzzy, c-format
+msgid "There are %d pending tasks"
+msgstr "Обављам задатке обједињавања ..."
+
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.h:55
+#, fuzzy
+msgid "Select PACS"
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../main/gui/startup/startupformbase.cpp:29
+#, fuzzy
+msgid "http://ginkgo-cadx.com"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:47
+#, fuzzy
+msgid "Ginkgo CADx Pro"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr ""
+
+#: ..\../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr ""
+
+#: ..\../main/managers/widgetsmanager.cpp:1079
+#, fuzzy
+msgid "Delete Widget"
+msgstr "Обриши"
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Properties ..."
+msgstr ""
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Widget Properties"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:114
+#, fuzzy
+msgid "Open file"
+msgstr "&Датотека"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:115
+#: ..\../main/tools/openfoldertool.cpp:27
+msgid "Open folder"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:116
+#: ..\../main/tools/openremovabletool.cpp:28
+#, fuzzy
+msgid "Open removable unit"
+msgstr "Приказивач Гинкго КАДикс-а је отвореног кода"
+
+#: ..\../main/tools/addfiletohistorytool.cpp:117
+#: ..\../main/tools/openginkgocloudlinktool.cpp:27
+#, fuzzy
+msgid "Open Ginkgo Cloud link"
+msgstr "Приказивач Гинкго КАДикс-а је отвореног кода"
+
+#: ..\../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr ""
+
+#: ..\../main/tools/colormaptool.cpp:110
+#, fuzzy
+msgid "Invert color map"
+msgstr "Мапа боја"
+
+#: ..\../main/tools/cornerannotationstool.cpp:44
+#, fuzzy
+msgid "Hide corner annotations"
+msgstr "Прикажи/сакриј мета податке"
+
+#: ..\../main/tools/cornerannotationstool.cpp:46
+#, fuzzy
+msgid "Show corner annotations"
+msgstr "Прикажи/сакриј мета податке"
+
+#: ..\../main/tools/detachwindowtool.cpp:42
+#, fuzzy
+msgid "Attach View"
+msgstr ""
+"):\n"
+"Проверите подешавање и приложите га ако је неопходно"
+
+#: ..\../main/tools/detachwindowtool.cpp:44
+msgid "Detach view"
+msgstr "Откачи преглед"
+
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize files"
+msgstr ""
+
+#: ..\../main/tools/exportdicomdirtool.cpp:32
+#, fuzzy
+msgid "Export to DICOM Dir"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/tools/markertool.cpp:171
+msgid "Point"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr "Стрелица"
+
+#: ..\../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:176
+#, fuzzy
+msgid "Free form"
+msgstr ""
+"Грешка: Систем је остао без меморије. Затворите неке студије да ослободите "
+"меморију."
+
+#: ..\../main/tools/metricgridtool.cpp:57
+msgid "Grid"
+msgstr "Мрежа"
+
+#: ..\../main/tools/metricgridtool.cpp:67
+#, fuzzy
+msgid "Grid Scale"
+msgstr "Мрежа"
+
+#: ..\../main/tools/metricgridtool.cpp:74
+msgid "Scale X"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:78
+msgid "X axis scale"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:87
+#, fuzzy
+msgid "Scale Y"
+msgstr "%d. %m. %Y."
+
+#: ..\../main/tools/metricgridtool.cpp:91
+#, fuzzy
+msgid "Y axis scale"
+msgstr "%d. %m. %Y."
+
+#: ..\../main/tools/metricgridtool.cpp:206
+#, fuzzy
+msgid "Show grid"
+msgstr "Мрежа"
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr "Подеси мрежу ..."
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr "Подеси мрежу"
+
+#: ..\../main/tools/metricgridtool.cpp:250
+#, fuzzy
+msgid "Hide Grid"
+msgstr "Мрежа"
+
+#: ..\../main/tools/metricgridtool.cpp:252
+#, fuzzy
+msgid "Show Grid"
+msgstr "Мрежа"
+
+#: ..\../main/tools/openfiletool.cpp:28
+#, fuzzy
+msgid "Open File"
+msgstr "&Датотека"
+
+#: ..\../main/tools/pacsuploadtool.cpp:54
+#, fuzzy
+msgid "Send to PACS..."
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../main/tools/pixelsbluringtool.cpp:59
+msgid "Unset pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:61
+msgid "Set pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#, fuzzy
+msgid "PACS Q/R"
+msgstr "П-Р-Т осе: "
+
+#: ..\../main/tools/queryretrievetool.cpp:94
+#: ..\../main/tools/searchginkgocloudhistorytool.cpp:28
+#, fuzzy
+msgid "Search Ginkgo Cloud"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/tools/rotateandfliptool.cpp:151
+msgid "Undo rotate and flip"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:156
+msgid "Flip horizontal"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:157
+msgid "Flip vertical"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:34
+#, fuzzy
+msgid "Send to PACS"
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../main/tools/sendpacstool.cpp:70
+#, fuzzy
+msgid "Sending to PACS..."
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: ..\../main/tools/showtagstool.cpp:42
+#, fuzzy
+msgid "Hide DICOM inspector"
+msgstr "Прикажи/сакриј мета податке"
+
+#: ..\../main/tools/showtagstool.cpp:44
+#, fuzzy
+msgid "Show DICOM inspector"
+msgstr "Прикажи/сакриј мета податке"
+
+#: ..\../main/tools/simpleprinttool.cpp:119
+#, fuzzy
+msgid "Image printing"
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../main/tools/simpleprinttool.cpp:224
+msgid "Page setup"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:225
+msgid "Print preview"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:272
+#, fuzzy
+msgid "Print image"
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr ""
+
+#: ..\../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr ""
+
+#: ..\../main/tools/undotool.cpp:110
+msgid "Redo"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:153
+msgid "Enable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:267
+msgid "Add column"
+msgstr "Додај колону"
+
+#: ..\../main/tools/windowlayouttool.cpp:268
+msgid "Add row"
+msgstr "Додај ред"
+
+#: ..\../main/tools/windowlayouttool.cpp:270
+#, fuzzy
+msgid "Remove column"
+msgstr "Додај колону"
+
+#: ..\../main/tools/windowlayouttool.cpp:271
+#, fuzzy
+msgid "Remove row"
+msgstr "Додај ред"
+
+#: ..\../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr "1x1 распоред"
+
+#: ..\../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr "1x2 распоред"
+
+#: ..\../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr "2x1 распоред"
+
+#: ..\../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr "2x2 распоред"
+
+#: ..\../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr "3x3 распоред"
+
+#: ..\../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr "4x4 распоред"
+
+#: ..\../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:82
+msgid "The tool is already registered"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:187
+msgid "The module "
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:49
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:56
+msgid "Unable to load PNG image resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:63
+msgid "Unable to load GIF animation resource"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:219
+#, fuzzy
+msgid "Enter the calibration value"
+msgstr "Основна вредност"
+
+#: ..\../widgets/gui/calibracion.cpp:225
+msgid "The calibration value is too low"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "The calibration value is too high"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr "Растојање"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr "Центиметри"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr ""
+
+#: ..\../widgets/gui/selecciontextobase.cpp:26
+msgid "Note"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1101 ..\../widgets/wangulo.cpp:1103
+msgid "Type"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1101
+msgid "Normal"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1103
+msgid "Cobb"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:721 ..\../widgets/wfreeform.cpp:470
+#: ..\../widgets/wpolygon.cpp:574
+msgid "Center (I)"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:727 ..\../widgets/wfreeform.cpp:476
+#: ..\../widgets/wpolygon.cpp:580
+msgid "Center (M)"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:762 ..\../widgets/welipse.cpp:766
+msgid "Greater Radius"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:763 ..\../widgets/welipse.cpp:767
+msgid "Lower Radius"
+msgstr ""
+
+#: ..\../widgets/wfreeform.cpp:482 ..\../widgets/wpolygon.cpp:586
+#, fuzzy
+msgid "Number of Vertex"
+msgstr "Број напада"
+
+#: ..\../widgets/wpunto.cpp:353
+#, fuzzy
+msgid "Position (I)"
+msgstr "Положај   : "
+
+#: ..\../widgets/wpunto.cpp:358
+#, fuzzy
+msgid "Position (M)"
+msgstr "Положај   : "
+
+#: ..\../widgets/wrule.cpp:558
+#, fuzzy
+msgid "Image Calibration"
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../widgets/wrule.cpp:663
+#, fuzzy
+msgid "Length"
+msgstr ""
+"\n"
+"— Највећа дужина АЕТ-а је 16 знакова"
+
+#: ..\../widgets/wrule.cpp:668
+msgid "Points (I)"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:675
+msgid "Points (M)"
+msgstr ""
+
+#: ..\../widgets/wtextbox.cpp:445
+#, fuzzy
+msgid "Default text"
+msgstr "Основно"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:41
+msgid "Commit date"
+msgstr "Датум предаје"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr "<непознат ИБ>"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr "%d. %m. %Y."
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:214
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:219
+msgid "Modified"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr "644654645"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:130
+#, fuzzy
+msgid "Commit inform"
+msgstr "Датум предаје"
+
+#: ..\../wx/propiedades/wxpropiedades.cpp:30
+msgid "Properties of "
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:31
+msgid "Widget's Name"
+msgstr ""
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr "< &Претходно"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr "&Откажи"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3701
+#, fuzzy
+msgid "Regular expression invalid: '"
+msgstr "„action“ атрибут је неисправан на „gnkworkflow“ досегу"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.h:56
+msgid "Overwrite Paths"
+msgstr ""
+
+#: ..\../ginkgopro/ginkgo_pro_defines.h:21
+msgid "Professional DICOM CADx environment"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservers.h:39
+#, fuzzy
+msgid "Server not found"
+msgstr "Нисам пронашао мерења"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:99
+msgid "DICOM Query/Retrieve"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:123
+#, fuzzy
+msgid "Not found"
+msgstr "Нисам пронашао мерења"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+#, fuzzy
+msgid "Advanced Settings"
+msgstr "Напредна подешавања..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+#, fuzzy
+msgid "Edit profile"
+msgstr "&Уреди"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+#, fuzzy
+msgid "Add/Edit Location"
+msgstr "&Уреди"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+#, fuzzy
+msgid "Add window/level"
+msgstr "Додај"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+#, fuzzy
+msgid "Add tag"
+msgstr "Додај"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+#, fuzzy
+msgid "Setup window position"
+msgstr "Положај   : "
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.h:61
+msgid "Closing"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+#, fuzzy
+msgid "DICOM Dir configuration"
+msgstr "Напредна подешавања ..."
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:70
+#, fuzzy
+msgid "Open Ginkgo Cloud"
+msgstr "Приказивач Гинкго КАДикс-а је отвореног кода"
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:123
+#, fuzzy
+msgid "Ginkgo Cloud search"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/history3/confirmdeletedialog.h:24
+#, fuzzy
+msgid " from History?"
+msgstr "&Обриши из историјата"
+
+#: ..\../main/gui/history3/historypanel3base.h:100
+#, fuzzy
+msgid "Medical history"
+msgstr "(ИБ или број медицинске историје)"
+
+#: ..\../main/gui/history3/historypanel3base.h:161
+#, fuzzy
+msgid "Open With ..."
+msgstr "Приказивач Гинкго КАДикс-а је отвореног кода"
+
+#: ..\../main/gui/history3/openwithdialog.h:72
+#, fuzzy
+msgid "Select a View"
+msgstr "Изаберите преглед који желите да ускладите са текућим"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+msgid "Message detail"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+msgid "Log node"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:87
+#, fuzzy
+msgid "Closing Ginkgo CADx"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: ..\../main/gui/paneltags/paneltagsbase.h:57
+#, fuzzy
+msgid "DICOM Inspector"
+msgstr "Придруживање(dicom://"
+
+#: ..\../main/license.h:31
+#, fuzzy
+msgid "Open Source DICOM CADx environment"
+msgstr "Приказивач Гинкго КАДикс-а је отвореног кода"
+
+#: ..\../widgets/gui/calibracionbase.h:65
+msgid "Calibration"
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedadesbase.h:62
+msgid "Properties of ..."
+msgstr ""
+
+#: ..\../wx/thumbnailctrl/thumbnailwidget.h:44
+#, fuzzy
+msgid "Image Browser Dialog"
+msgstr "Нема преклапања на овој слици"
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+msgid "Test title"
+msgstr ""
+
+#, fuzzy
+#~ msgid "The key files will not be exported"
+#~ msgstr "„key“ атрибут је очекиван на „metadata“ досегу"
+
+#, fuzzy
+#~ msgid "Current"
+#~ msgstr "Изаберите преглед који желите да ускладите са текућим"
+
+#~ msgid "All"
+#~ msgstr "Све"
+
+#~ msgid "BMP"
+#~ msgstr "БМП"
+
+#, fuzzy
+#~ msgid "Grid (two columns)"
+#~ msgstr "Мрежа"
+
+#, fuzzy
+#~ msgid "Grid (three columns)"
+#~ msgstr "Мрежа"
+
+#, fuzzy
+#~ msgid "Grid organization"
+#~ msgstr "Мрежа"
+
+#~ msgid "Color"
+#~ msgstr "Боја"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">"
+#~ msgstr ">"
+
+#~ msgid "<"
+#~ msgstr "<"
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid "Alphabetic Mode"
+#~ msgstr "Азбучни ред"
+
+#~ msgid " but no valid presentation contexts"
+#~ msgstr " али нема исправног садржаја презентације"
+
+#~ msgid "\"petition-id\" attribute expected at \"gnkworkflow\" scope"
+#~ msgstr "„petition-id“ атрибут је очекиван на „gnkworkflow“ досегу"
+
+#~ msgid "%d/%m/%Y %H:%M:%S"
+#~ msgstr "%d.%m.%Y, %H:%M:%S"
+
+#~ msgid "%m-%d-%y %H:%M:%S,%q"
+#~ msgstr "%d. %m. %y %H:%M:%S,%q"
+
+#~ msgid "Abdomen"
+#~ msgstr "Стомак"
+
+#~ msgid "An error ocurred loading Ginkgo News check your internet connection"
+#~ msgstr ""
+#~ "Дошло је до грешке учитавања вести Гинкго-а. Проверите везу на Интернет"
+
+#~ msgid "Association Aborted"
+#~ msgstr "Придруживање је прекинуто"
+
+#~ msgid "Association Received"
+#~ msgstr "Придруживање је примљено"
+
+#~ msgid "Clean"
+#~ msgstr "Очисти"
diff --git a/cadxcore/lang/tr/cadxcore.mo b/cadxcore/lang/tr/cadxcore.mo
new file mode 100644
index 0000000..0296ea0
Binary files /dev/null and b/cadxcore/lang/tr/cadxcore.mo differ
diff --git a/cadxcore/lang/tr/cadxcore.po b/cadxcore/lang/tr/cadxcore.po
new file mode 100644
index 0000000..5fd8b0a
--- /dev/null
+++ b/cadxcore/lang/tr/cadxcore.po
@@ -0,0 +1,6573 @@
+# Turkish translation for ginkgocadx
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the ginkgocadx package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-06-11 15:52+0100\n"
+"PO-Revision-Date: 2014-06-11 15:52+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Turkish <tr at li.org>\n"
+"Language: tr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2011-09-02 12:40+0000\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SearchPath-0: ..\\..\n"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Red Vessels"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Metal"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Green"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "GE Color"
+msgstr "Renk"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PET"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+#, fuzzy
+msgid "P-Value"
+msgstr "Varsayılan değer"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr ""
+
+#: ..\../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#: ..\../api/dicom/idicomconformance.cpp:214
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "GIL/DICOM/Conformance"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid "Unable to add supported transfer syntax "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid " to SOP Class "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid "Unable to add supported SOP Class "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " to Modality "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "Slice"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "of"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "Volume"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:110
+msgid "Image without metric information"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:119
+msgid "Slice thickness"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:127
+msgid "Slice location"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:139
+msgid "Scale"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:147
+msgid "Right"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:149
+msgid "Left"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:219
+msgid "Position:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:272
+#, fuzzy
+msgid "Value:"
+msgstr "Varsayılan değer"
+
+#: ..\../api/iexception.cpp:52
+msgid "Exception in component"
+msgstr ""
+
+#: ..\../api/initwx.cpp:439
+msgid "Initializing environment ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:446 ..\../api/initwx.cpp:447 ..\../api/initwx.cpp:448
+#: ..\../api/initwx.cpp:449 ..\../api/initwx.cpp:450 ..\../api/initwx.cpp:451
+#: ..\../api/initwx.cpp:452 ..\../api/initwx.cpp:453
+msgid "Ginkgo CADx restrictions"
+msgstr ""
+
+#: ..\../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr ""
+
+#: ..\../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr ""
+
+#: ..\../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr ""
+
+#: ..\../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr ""
+
+#: ..\../api/initwx.cpp:451
+msgid "Export images"
+msgstr ""
+
+#: ..\../api/initwx.cpp:452
+msgid "Acquire DICOM files"
+msgstr ""
+
+#: ..\../api/initwx.cpp:453
+msgid "Import files to DICOM format"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "Online manual"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "URL of manual"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "Online support"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "URL of online support"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "http://ginkgo-cadx.com/"
+msgstr ""
+
+#: ..\../api/initwx.cpp:460 ..\../api/initwx.cpp:461
+#, fuzzy
+msgid "Program Updates"
+msgstr "Güncellemeleri kontrol et"
+
+#: ..\../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr ""
+
+#: ..\../api/initwx.cpp:461
+msgid "Update period (days)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:462
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr ""
+
+#: ..\../api/initwx.cpp:462
+msgid "Setup Security"
+msgstr ""
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup"
+msgstr ""
+
+#: ..\../api/initwx.cpp:463
+#, fuzzy
+msgid "Show on startup default value"
+msgstr "Varsayılan değer"
+
+#: ..\../api/initwx.cpp:465 ..\../api/initwx.cpp:466
+#: ..\../main/gui/history3/historypanel3.cpp:328
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr ""
+
+#: ..\../api/initwx.cpp:465
+msgid "Settings menu"
+msgstr ""
+
+#: ..\../api/initwx.cpp:466
+msgid "License menu"
+msgstr ""
+
+#: ..\../api/initwx.cpp:467 ..\../api/initwx.cpp:468 ..\../api/initwx.cpp:469
+#: ..\../api/initwx.cpp:470 ..\../api/initwx.cpp:471 ..\../api/initwx.cpp:472
+#: ..\../api/initwx.cpp:473 ..\../api/initwx.cpp:474
+msgid "PACS Limits"
+msgstr ""
+
+#: ..\../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr ""
+
+#: ..\../api/initwx.cpp:468
+msgid "Upload images to a PACS server"
+msgstr ""
+
+#: ..\../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr ""
+
+#: ..\../api/initwx.cpp:470
+msgid "Enable remote PACS configuration"
+msgstr ""
+
+#: ..\../api/initwx.cpp:471
+msgid "Enable TLS configuration"
+msgstr ""
+
+#: ..\../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr ""
+
+#: ..\../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr ""
+
+#: ..\../api/initwx.cpp:475 ..\../api/initwx.cpp:476 ..\../api/initwx.cpp:477
+#: ..\../api/initwx.cpp:478 ..\../api/initwx.cpp:479 ..\../api/initwx.cpp:480
+msgid "Import"
+msgstr ""
+
+#: ..\../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:476
+msgid "Show accession number input"
+msgstr ""
+
+#: ..\../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483 ..\../api/initwx.cpp:484 ..\../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:485
+#, fuzzy
+msgid "Default ORU template"
+msgstr "Varsayılan"
+
+#: ..\../api/initwx.cpp:488 ..\../api/initwx.cpp:489 ..\../api/initwx.cpp:491
+#: ..\../api/initwx.cpp:493 ..\../api/initwx.cpp:494 ..\../api/initwx.cpp:495
+#: ..\../api/initwx.cpp:496 ..\../api/initwx.cpp:498
+msgid "Style"
+msgstr ""
+
+#: ..\../api/initwx.cpp:503
+#, c-format
+msgid "Download %s images"
+msgstr ""
+
+#: ..\../api/initwx.cpp:504 ..\../api/initwx.cpp:508
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+msgid "PACS"
+msgstr ""
+
+#: ..\../api/initwx.cpp:507
+#, fuzzy
+msgid "Download all modalities"
+msgstr "Tümü"
+
+#: ..\../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr ""
+
+#: ..\../api/initwx.cpp:510
+msgid "Enable shaders"
+msgstr ""
+
+#: ..\../api/initwx.cpp:513
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+msgid "Ginkgo Cloud"
+msgstr ""
+
+#: ..\../api/initwx.cpp:513
+msgid "Download from Ginkgo Cloud"
+msgstr ""
+
+#: ..\../api/initwx.cpp:560
+msgid "Tools loading base ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:566
+msgid "Loading plugins ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:580
+msgid "Unable to start GinkgoCADx:\n"
+msgstr ""
+
+#: ..\../api/initwx.cpp:580 ..\../api/initwx.cpp:621
+#, fuzzy
+msgid "error"
+msgstr "Hata"
+
+#: ..\../api/initwx.cpp:584
+msgid "Loading resources ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:601
+msgid "Configuring environment ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:621
+msgid "Failed to set permissions:\n"
+msgstr ""
+
+#: ..\../api/initwx.cpp:634
+msgid "Updating ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:638
+msgid "Interpreting parameters ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:689
+#, fuzzy
+msgid "Error unregistering tools: "
+msgstr "Hata"
+
+#: ..\../api/initwx.cpp:769
+msgid "Starting"
+msgstr ""
+
+#: ..\../api/ivista.cpp:36 ..\../commands/comandocarga.cpp:73
+msgid "Loading..."
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:268
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ..\../main/gui/import/pasosimportacionbase.cpp:151
+msgid "Name"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:285
+msgid "Area"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:302
+msgid "Perimeter"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:316
+msgid "Travel (I)"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:326
+msgid "Travel (M)"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#: ..\../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid "Error while running thread: "
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid " : "
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:120
+msgid "Internal error while running thread: "
+msgstr ""
+
+#: ..\../api/widgetserializable.cpp:60
+msgid "Creation Date"
+msgstr "Oluşturulma Tarihi"
+
+#: ..\../api/widgetserializable.cpp:65
+#, fuzzy
+msgid "Modification Date"
+msgstr "Tarih"
+
+#: ..\../api/widgetserializable.cpp:68
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:40
+msgid "Physician"
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:55
+#: ..\../commands/pacsdownloadcommand.cpp:88
+#: ..\../commands/synchronizationcommand.cpp:70
+msgid "Downloading files ..."
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:69
+#: ..\../commands/synchronizationcommand.cpp:91
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, fuzzy, c-format
+msgid "Downloading file %d"
+msgstr "%m/%d/%Y"
+
+#: ..\../commands/acquirefromurlcommand.cpp:81
+#, fuzzy
+msgid "Error downloading file: "
+msgstr "Hata"
+
+#: ..\../commands/acquirefromurlcommand.cpp:95
+#: ..\../commands/pacsdownloadcommand.cpp:114
+#: ..\../commands/synchronizationcommand.cpp:121
+#, fuzzy
+msgid "Internal Error"
+msgstr "Hata"
+
+#: ..\../commands/acquirefromurlcommand.cpp:115
+#, fuzzy
+msgid "Error downloading files: "
+msgstr "Hata"
+
+#: ..\../commands/autocleaningcommand.cpp:62
+msgid "Cleaning dicomdir..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:67
+msgid "Downloading files..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:183
+msgid "Unknown operation"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:188
+msgid "Error in cloud operation. See log to get more details..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:249
+msgid "Could to retrieve study."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:260 ..\../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:262
+#, fuzzy
+msgid "Error retrieving study."
+msgstr "Hata"
+
+#: ..\../commands/cloudcommand.cpp:271
+msgid "Study successfully retrieved."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "Speed"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "bytes/sec during"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "seconds"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:275
+msgid "Empty Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:289
+msgid "Extracting files..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:313 ..\../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:383
+msgid "Could to perform query."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:396
+#, fuzzy
+msgid "Error perfoming the query."
+msgstr "Hata"
+
+#: ..\../commands/cloudcommand.cpp:405
+msgid "Query successfully performed."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:472
+msgid "Unknown JSon attribute:"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:482
+#, fuzzy
+msgid "Error parsing JSon: "
+msgstr "Hata"
+
+#: ..\../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:515
+#: ..\../commands/openremovableunit.cpp:148 ..\../main/gui/open/abrir.cpp:119
+#: ..\../main/gui/open/abrir.cpp:159 ..\../main/gui/open/opendialogs.cpp:146
+msgid "Storing in the history..."
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:46
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:536
+#, fuzzy
+msgid "Check Updates"
+msgstr "Güncellemeleri kontrol et"
+
+#: ..\../commands/comandoactualizaciones.cpp:136
+msgid "Not enough parameters found on XML"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:145
+msgid "XML parsing internal error"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Error checking application updates"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+#, fuzzy
+msgid "Ginkgo CADx updates"
+msgstr "Güncellemeleri kontrol et"
+
+#: ..\../commands/comandoactualizaciones.cpp:170
+msgid "Internal error checking updates"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:92 ..\../commands/comandocarga.cpp:96
+msgid "Exception loading:"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:100
+msgid "Study malformed or unsupported"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:129 ..\../commands/comandocarga.cpp:139
+#, fuzzy
+msgid "Error loading study: "
+msgstr "Hata"
+
+#: ..\../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:144
+#, fuzzy
+msgid "Error loading study."
+msgstr "Hata"
+
+#: ..\../commands/comandocarga.cpp:149
+msgid "Load canceled by user"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:156
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+#: ..\../main/gui/history3/historypanel3.cpp:1063
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#, fuzzy
+msgid "Error loading study"
+msgstr "Hata"
+
+#: ..\../commands/comandoexportacion.cpp:81
+#: ..\../commands/exporttodicomdircommand.cpp:214
+msgid "Exporting files..."
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:105
+#: ..\../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:158
+#, fuzzy, c-format
+msgid "Exporting file %d of %d"
+msgstr "%m/%d/%Y"
+
+#: ..\../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:233
+#, fuzzy
+msgid "image_%m-%d-%Y_"
+msgstr "%m/%d/%Y"
+
+#: ..\../commands/comandoincluirhistorial.cpp:108
+msgid "Exploring directory ..."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:122
+msgid "Reading DICOMDIR ..."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:142
+#: ..\../commands/comandoincluirhistorial.cpp:156
+#: ..\../commands/comandoincluirhistorial.cpp:177
+msgid "Including files in the history .."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:196
+msgid "Exploring directory "
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:256
+#: ..\../commands/linkhistorycommand.cpp:118
+msgid "Image acquisition finished."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:258
+#, c-format
+msgid "There have been included %d images."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:261
+#: ..\../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:273
+#: ..\../commands/linkhistorycommand.cpp:133
+msgid "This files doesn't exist:"
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:284
+#: ..\../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:296
+#: ..\../commands/linkhistorycommand.cpp:156
+msgid "This files are Dicom Dirs:"
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:58 ..\../commands/pacsdownloadcommand.cpp:61
+#: ..\../commands/sendpacscommand.cpp:137
+msgid "There is not any Remote PACS configured"
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:84
+msgid "Querying PACS ..."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:98
+msgid "Starting Search ..."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:108
+#: ..\../commands/pacsdownloadcommand.cpp:101
+msgid "Server ID not found. ID = "
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:110 ..\../commands/comandopacs.cpp:112
+#: ..\../commands/comandopacs.cpp:114 ..\../commands/comandopacs.cpp:116
+msgid "Query error with PACS Id "
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:116
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+#, fuzzy
+msgid "Internal error"
+msgstr "Hata"
+
+#: ..\../commands/comandopacs.cpp:135
+msgid "Failed to perform search: "
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:94
+#: ..\../commands/dbmigrationcommand.cpp:103
+msgid "Migrating old DICOM Dir ..."
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:99
+#: ..\../commands/dbmigrationcommand.cpp:108
+msgid "Including files ..."
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+#: ..\../commands/dicomizecommand.cpp:181
+#: ..\../commands/openremovableunit.cpp:74
+#: ..\../commands/openremovableunit.cpp:110
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../commands/pdfextractercommand.cpp:130
+#: ..\../main/controllers/historycontroller.cpp:447
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+#: ..\../main/controllers/historycontroller.cpp:1976
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ..\../main/gui/login/dialogologin.cpp:50
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ..\../main/gui/open/opendialogs.cpp:58
+#: ..\../main/gui/open/opendialogs.cpp:62
+#: ..\../main/gui/open/opendialogs.cpp:134
+#: ..\../main/gui/progress/statusbarprogreso.cpp:284
+#: ..\../main/gui/progress/statusbarprogreso.cpp:287
+#: ..\../main/gui/progress/statusbarprogreso.cpp:292
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#: ..\../main/gui/history3/openwithdialog.h:72
+#, fuzzy
+msgid "Info"
+msgstr "Bilgi"
+
+#: ..\../commands/dbmigrationcommand.cpp:123
+msgid "Migration finisthed successfully"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:27
+#: ..\../commands/dialogopathssobreescribirbase.cpp:62
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid "Overwrite"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:65
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ..\../main/gui/history3/historypanel3base.cpp:339
+#: ..\../main/gui/history3/historypanel3base.cpp:415
+#: ..\../main/gui/history3/historypanel3base.cpp:486
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ..\../main/gui/open/opendialogsbase.cpp:53
+#: ..\../main/gui/open/opendialogsbase.cpp:131
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ..\../widgets/gui/calibracionbase.cpp:86
+#: ..\../widgets/gui/selecciontextobase.cpp:60
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr "İptal"
+
+#: ..\../commands/dicomizationcompletebase.cpp:24
+#: ..\../commands/dicomizationcompletebase.cpp:33
+#: ..\../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:56
+msgid "Don't show this message again"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:62
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ..\../main/gui/history3/historypanel3base.cpp:411
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ..\../widgets/gui/calibracionbase.cpp:82
+#: ..\../widgets/gui/selecciontextobase.cpp:56
+#, fuzzy
+msgid "Accept"
+msgstr "Kabul et"
+
+#: ..\../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid "Import process failed:"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:370
+msgid "Unknown error in dicomization process"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:431
+#: ..\../commands/dicomizecommand.cpp:442
+#: ..\../commands/sendpacscommand.cpp:185
+#, fuzzy
+msgid "Error sending evidences:"
+msgstr "Hata"
+
+#: ..\../commands/dicomizecommand.cpp:437
+#: ..\../commands/dicomizecommand.cpp:448
+msgid "Can not upload to the PACS:\n"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:261
+#: ..\../commands/exporttodicomdircommand.cpp:338
+#, fuzzy, c-format
+msgid "Exporting series %d of %d"
+msgstr "%m/%d/%Y"
+
+#: ..\../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:279
+#: ..\../commands/exporttodicomdircommand.cpp:385
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#, fuzzy
+msgid "There was an error creating directory"
+msgstr "Hata"
+
+#: ..\../commands/exporttodicomdircommand.cpp:303
+#: ..\../commands/exporttodicomdircommand.cpp:408
+#, fuzzy
+msgid "There was an error writing file"
+msgstr "Hata"
+
+#: ..\../commands/exporttodicomdircommand.cpp:358
+#, fuzzy
+msgid "There was an error anonymizing files"
+msgstr "Hata"
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Ignoring incoming operation "
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:298
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:473
+#: ..\../commands/pacsdownloadcommand.cpp:170
+#: ..\../commands/pacsdownloadcommand.cpp:179
+msgid "Including files..."
+msgstr ""
+
+#: ..\../commands/linkhistorycommand.cpp:68
+msgid "Linking study..."
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:42
+#: ..\../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:130
+msgid "Select drive you want to open"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+
+#: ..\../commands/pacsdownloadcommand.cpp:134
+#, fuzzy
+msgid "Error downloading study: "
+msgstr "Hata"
+
+#: ..\../commands/pdfextractercommand.cpp:103
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ..\../main/gui/progress/statusbarprogreso.cpp:278
+#: ..\../widgets/gui/calibracion.cpp:205 ..\../widgets/gui/calibracion.cpp:209
+#: ..\../widgets/gui/calibracion.cpp:219 ..\../widgets/gui/calibracion.cpp:225
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "Error"
+msgstr "Hata"
+
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:130
+msgid "PDF files extracted successfully..."
+msgstr ""
+
+#: ..\../commands/secondarycapturedicomizecommand.cpp:73
+msgid "Ginkgo CADx Secondary Capture"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:73
+#, fuzzy
+msgid "Message successfully sent"
+msgstr "Hata mesajı"
+
+#: ..\../commands/sendhl7command.cpp:77
+msgid "Unknown protocol"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:80 ..\../commands/sendhl7command.cpp:93
+#: ..\../commands/sendhl7command.cpp:145
+#, fuzzy
+msgid "Error sending message:"
+msgstr "Hata mesajı"
+
+#: ..\../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:93 ..\../commands/sendhl7command.cpp:94
+#, fuzzy
+msgid "Unknown error"
+msgstr "Hata"
+
+#: ..\../commands/sendhl7command.cpp:134
+msgid "Failed to start connection"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:148
+#, fuzzy
+msgid "Error sending message. It was sent "
+msgstr "Hata mesajı"
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:258
+msgid "Failed delivery confirmation:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:51
+msgid "Send files to PACS"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:155
+msgid "Uploading files ..."
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:181
+#, fuzzy
+msgid "Error:"
+msgstr "Hata"
+
+#: ..\../commands/sendpacscommand.cpp:189
+msgid "Error sending evidences: Internal error."
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:203
+msgid "Error uploading the study to PACS: "
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:206
+msgid "Retry send to PACS"
+msgstr ""
+
+#: ..\../commands/synchronizationcommand.cpp:104
+#, fuzzy
+msgid "Error downloading file"
+msgstr "Hata"
+
+#: ..\../commands/synchronizationcommand.cpp:141
+#, fuzzy
+msgid "Error synchronizing study: "
+msgstr "Hata"
+
+#: ..\../commands/thumbnailscommand.cpp:107
+#: ..\../commands/thumbnailscommand.cpp:133
+#: ..\../commands/thumbnailscommand.cpp:247
+#: ..\../commands/thumbnailscommand.cpp:376
+#: ..\../commands/thumbnailscommand.cpp:382
+#: ..\../main/gui/import/selectimagesimportation.cpp:504
+msgid "Creating Thumbnail..."
+msgstr ""
+
+#: ..\../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr ""
+
+#: ..\../export/tools/iaddfiletohistorytool.cpp:19
+#: ..\../main/gui/history3/historypanel3.cpp:632
+msgid "Open study"
+msgstr ""
+
+#: ..\../export/tools/iangletool.cpp:19
+msgid "Angle \tCtrl+A"
+msgstr ""
+
+#: ..\../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr ""
+
+#: ..\../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr ""
+
+#: ..\../export/tools/icolormaptool.cpp:20
+#, fuzzy
+msgid "Color Map"
+msgstr "Renk"
+
+#: ..\../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ..\../main/gui/open/opendialogsbase.cpp:46
+#: ..\../main/gui/open/opendialogsbase.cpp:198
+msgid "Copy"
+msgstr ""
+
+#: ..\../export/tools/icornerannotationstool.cpp:20
+msgid "Window annotations"
+msgstr ""
+
+#: ..\../export/tools/idetachwindowtool.cpp:19
+msgid "Detach window"
+msgstr ""
+
+#: ..\../export/tools/iimageexporttool.cpp:19
+msgid "Export image..."
+msgstr ""
+
+#: ..\../export/tools/imarkertool.cpp:20
+msgid "Marking Tools \tCtrl+M"
+msgstr ""
+
+#: ..\../export/tools/imetricgridtool.cpp:20
+msgid "Metric grid"
+msgstr ""
+
+#: ..\../export/tools/inotetool.cpp:19
+msgid "Text Note \tCtrl+N"
+msgstr ""
+
+#: ..\../export/tools/ipacsuploadtool.cpp:19
+msgid "Upload study..."
+msgstr ""
+
+#: ..\../export/tools/ipixelsbluringtool.cpp:20
+msgid "Pixels blurring"
+msgstr ""
+
+#: ..\../export/tools/ipointertool.cpp:19
+msgid "Pointer \tEsc"
+msgstr ""
+
+#: ..\../export/tools/iqueryretrievetool.cpp:19
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#: ..\../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr ""
+
+#: ..\../export/tools/iresettool.cpp:19
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+msgid "Reset"
+msgstr ""
+
+#: ..\../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr ""
+
+#: ..\../export/tools/iruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: ..\../export/tools/isecondarycapturetool.cpp:19
+msgid "Save snapshot as new series..."
+msgstr ""
+
+#: ..\../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr ""
+
+#: ..\../export/tools/ishowtagstool.cpp:19
+#: ..\../main/tools/showtagshistorytool.cpp:27
+msgid "DICOM inspector"
+msgstr ""
+
+#: ..\../export/tools/isimpleprinttool.cpp:19
+#: ..\../main/tools/simpleprinttool.cpp:226
+msgid "Print"
+msgstr ""
+
+#: ..\../export/tools/istartdicomizationtool.cpp:19
+msgid "Dicomize..."
+msgstr ""
+
+#: ..\../export/tools/itoolpan.cpp:19
+msgid "Pan \tCtrl+P"
+msgstr ""
+
+#: ..\../export/tools/itoolslider.cpp:19
+msgid "Slider \tCtrl+S"
+msgstr ""
+
+#: ..\../export/tools/itoolwindowlevel.cpp:19
+msgid "Window/Level \tCtrl+W"
+msgstr ""
+
+#: ..\../export/tools/itoolzoom.cpp:19
+msgid "Zoom \tCtrl+O"
+msgstr ""
+
+#: ..\../export/tools/itrackballtool.cpp:19
+msgid "Trackball \tCtrl+T"
+msgstr ""
+
+#: ..\../export/tools/iundotool.cpp:20 ..\../main/tools/undotool.cpp:109
+msgid "Undo"
+msgstr ""
+
+#: ..\../export/tools/ivideotool.cpp:19
+msgid "Video \tCtrl+Space"
+msgstr ""
+
+#: ..\../export/tools/iwindowlayouttool.cpp:20
+msgid "Window layout"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid "Studies with"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:210
+msgid "Reading properties"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:219
+#: ..\../main/controllers/controladorcarga.cpp:642
+#: ..\../main/controllers/controladorcarga.cpp:888
+#: ..\../main/controllers/streaming/streamingloader.cpp:600
+#, fuzzy
+msgid "Error reading the study: "
+msgstr "Hata"
+
+#: ..\../main/controllers/controladorcarga.cpp:224
+#: ..\../main/controllers/controladorcarga.cpp:229
+#: ..\../main/controllers/controladorcarga.cpp:647
+#: ..\../main/controllers/controladorcarga.cpp:893
+msgid "Internal error reading the study: "
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:269
+#: ..\../main/controllers/controladorcarga.cpp:281
+#: ..\../main/controllers/controladorcarga.cpp:905
+msgid "Spacing is not valid: ("
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:305
+#: ..\../main/controllers/controladorcarga.cpp:338
+#: ..\../main/controllers/controladorcarga.cpp:372
+#: ..\../main/controllers/controladorcarga.cpp:408
+#: ..\../main/controllers/controladorcarga.cpp:441
+#: ..\../main/controllers/controladorcarga.cpp:474
+#: ..\../main/controllers/controladorcarga.cpp:507
+#: ..\../main/controllers/controladorcarga.cpp:540
+#: ..\../main/controllers/controladorcarga.cpp:573
+#: ..\../main/controllers/controladorcarga.cpp:606
+#: ..\../main/controllers/controladorcarga.cpp:935
+msgid "Error loading the study: Out of memory"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:375
+msgid "Error loading the study: Internal Error"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:630
+#: ..\../main/controllers/streaming/streamingloader.cpp:1023
+#: ..\../main/controllers/streaming/streamingloader.cpp:1223
+#: ..\../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:651
+#: ..\../main/controllers/controladorcarga.cpp:960
+msgid "Process canceled by user."
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:878
+msgid "Interpreting properties"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:917
+msgid "Spacing of the image is invalid: ("
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:942
+msgid "Reading dataset"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:951
+#, fuzzy
+msgid "Error reading the study:"
+msgstr "Hata"
+
+#: ..\../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:972
+msgid "load"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:40
+msgid "Stopping HL7 sender"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:63
+#: ..\../main/controllers/controladorenviohl7.cpp:76
+msgid "Error starting HL7 sender"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:65
+#: ..\../main/controllers/controladorenviohl7.cpp:78
+msgid "HL7 sender started"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:108
+msgid "HL7 controller destroyed"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:150
+#, fuzzy
+msgid "Error processing message"
+msgstr "Hata mesajı"
+
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/controllers/pacscontroller.cpp:1549
+#: ..\../main/controllers/pacscontroller.cpp:1553
+#: ..\../main/controllers/pacscontroller.cpp:1557
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:184
+msgid "Unknown"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:110
+msgid "Loading"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:153
+msgid "Could not find entry point"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:74
+msgid "Integration engine hostname not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:77
+msgid "Integration engine port not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:91
+msgid "Unsupported protocol"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, fuzzy, c-format
+msgid "Downloading file %d/%d"
+msgstr "%m/%d/%Y"
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+msgid "Image format not supported"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:200
+msgid "Receiving Association failed: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:209
+msgid "Association received"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:210
+msgid "Parameters:"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:274
+msgid "No valid presentation contexts"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "Association(dicom://"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, fuzzy, c-format
+msgid "Uploading file %d of %d"
+msgstr "%m/%d/%Y"
+
+#: ..\../main/controllers/dicommanager.cpp:504
+#: ..\../main/controllers/dicommanager.cpp:531
+msgid "Extracting file..."
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid "Error creating history database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:343
+msgid "Error creating dicomDir database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:425
+#: ..\../main/controllers/historycontroller.cpp:441
+msgid "Error creating thumbnails database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:560
+msgid "Including image "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid "Linking image "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr ""
+
+#: ..\../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+msgid "Malformed template Id ("
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid "Template Id unsupported ("
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:566
+msgid "Unknown module Id ("
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:592
+msgid "Empty configuration"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:631
+msgid "XML Parser Not Found. Key="
+msgstr ""
+
+#: ..\../main/controllers/log4cplus/guiappender.cpp:75
+#, fuzzy
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr "%m/%d/%Y %H:%M:%S"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ..\../main/gui/history3/historypanel3base.cpp:48
+#: ..\../main/gui/import/pasosimportacionbase.cpp:227
+msgid "Patient"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+msgid "Patient ID"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:86
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ..\../main/gui/history3/historypanel3.cpp:227
+#: ..\../main/gui/open/opendialogs.cpp:50
+msgid "Modality"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:98
+msgid "Dimensions"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:109
+#, c-format
+msgid "Made with %s"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:167
+#: ..\../main/controllers/modalitysettingscontroller.cpp:338
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr "Varsayılan"
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1212
+msgid "Downloading file"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Error downloading WADO file"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+#, fuzzy
+msgid "Check PACS configuration"
+msgstr "Güncellemeleri kontrol et"
+
+#: ..\../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1428
+msgid "Invalid HTTP response"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1433
+msgid "Invalid HTTP code"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1472
+msgid "PACS-Service"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:97
+#: ..\../main/controllers/parserxmlspanish.cpp:94
+msgid "Omitted Identificator"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:105
+#: ..\../main/controllers/parserxmlspanish.cpp:102
+msgid "Omitted AET"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:113
+#: ..\../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:121
+#: ..\../main/controllers/parserxmlspanish.cpp:118
+msgid "Omitted port"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:206
+#: ..\../main/controllers/parserxmlenglish.cpp:237
+#: ..\../main/controllers/parserxmlspanish.cpp:188
+#: ..\../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:212
+#: ..\../main/controllers/parserxmlspanish.cpp:194
+msgid "Port is not a valid number"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:248
+#: ..\../main/controllers/parserxmlspanish.cpp:228
+msgid "The port is not a valid number"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:265
+#: ..\../main/controllers/parserxmlspanish.cpp:246
+msgid "Setting not found"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:391
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:427
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:434
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:445
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:483
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:548
+#: ..\../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:552
+#: ..\../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:570
+#: ..\../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:340
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:402
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:438
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:445
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:486
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:524
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:559
+msgid "id_application expected"
+msgstr ""
+
+#: ..\../main/controllers/smartretrievecontroller.cpp:124
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:920
+msgid "Downloading from PACS..."
+msgstr ""
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:303
+#: ..\../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ..\../main/gui/history3/historytablemodel.cpp:403
+#: ..\../main/gui/history3/historytablemodel.cpp:415
+#: ..\../main/gui/history3/historytablemodel.cpp:470
+#: ..\../main/gui/history3/historytablemodel.cpp:482
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:102
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr "%m/%d/%Y %H:%M:%S"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr "%m/%d/%Y 00:00:00"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+msgid "Exploring PACS..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ..\../main/gui/history3/historypanel3.cpp:225
+#: ..\../main/gui/open/opendialogs.cpp:49
+msgid "Patient id"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ..\../main/gui/history3/historypanel3.cpp:224
+#: ..\../main/gui/open/opendialogs.cpp:48
+msgid "Patient name"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:479
+msgid "Study Instance UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ..\../main/gui/history3/historypanel3.cpp:231
+#: ..\../main/gui/open/opendialogs.cpp:53
+msgid "Accession number"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:481
+#, fuzzy
+msgid "Study date"
+msgstr "Tarih"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:482
+#, fuzzy
+msgid "Study time"
+msgstr "Tarih Saat"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:490
+msgid "Series Instance UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:492
+#, fuzzy
+msgid "Series date"
+msgstr "Tarih"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:493
+#, fuzzy
+msgid "Series time"
+msgstr "Tarih Saat"
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:519
+msgid "No results found"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+msgid "Write query name"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+msgid "Id"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+msgid "Date Time"
+msgstr "Tarih Saat"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ..\../main/gui/history3/historypanel3.cpp:229
+#: ..\../main/gui/import/pasosimportacionbase.cpp:298
+#: ..\../main/gui/import/pasosimportacionbase.cpp:340
+#: ..\../main/gui/open/opendialogs.cpp:52
+msgid "Description"
+msgstr "Açıklama"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ..\../main/gui/import/pasosimportacionbase.cpp:276
+msgid "Accession Number"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:210
+msgid "Store query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:211
+msgid "Remove query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:278
+msgid "There is no any PACS configured"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+msgid "Study UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid "Search"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:519
+msgid "Download series"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+msgid "Download study"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:535
+msgid "Link series"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:537
+msgid "Link study"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:551
+msgid "Properties..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+msgid "You must specify at least a modality or a period of time"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+msgid "Select a valid query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+msgid "Select a valid PACS Server"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid "Download of modality "
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+#, fuzzy
+msgid "Modality download error"
+msgstr "Hata"
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:786
+msgid "search results"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:913
+msgid "Downloading serie..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:916
+msgid "Downloading study..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+msgid "PACS acquisition is restricted"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+msgid "Server"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ..\../main/gui/import/pasosimportacionbase.cpp:284
+#: ..\../main/gui/import/pasosimportacionbase.cpp:326
+#: ..\../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr "Tarih"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ..\../main/gui/history3/historypanel3base.cpp:81
+#, fuzzy
+msgid "Any date"
+msgstr "Tarih"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ..\../main/gui/history3/historypanel3base.cpp:85
+msgid "Today AM"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ..\../main/gui/history3/historypanel3base.cpp:88
+msgid "Today PM"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ..\../main/gui/history3/historypanel3base.cpp:91
+msgid "Today"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ..\../main/gui/history3/historypanel3base.cpp:100
+msgid "Yesterday"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ..\../main/gui/history3/historypanel3base.cpp:103
+msgid "Last 7 days"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ..\../main/gui/history3/historypanel3base.cpp:106
+msgid "Last 30 days"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ..\../main/gui/history3/historypanel3base.cpp:109
+msgid "Last 3 months"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ..\../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ..\../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+msgid "Stored queries"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+msgid "Select stored queries..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ..\../main/gui/open/opendialogsbase.cpp:50
+#: ..\../main/gui/open/opendialogsbase.cpp:202
+msgid "Link"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+msgid "Download"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ..\../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr "Kapat"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+msgid "Series does not exist"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr "Devam"
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ..\../main/gui/open/opendialogsbase.cpp:127
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ..\../main/tools/metricgridtool.cpp:101
+msgid "Ok"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:151
+msgid "Download again"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+msgid "Open"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:179
+msgid "Set query name"
+msgstr ""
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:32
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:34
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizedialog.cpp:64
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ..\../main/gui/export/parametrosprincipales.cpp:194
+msgid "Exporting images ..."
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:21
+msgid "Common tags"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+msgid "Patient's name and surname"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+msgid "Patient Id"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:44
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:71
+#, fuzzy
+msgid "Add new..."
+msgstr "Ekle"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ..\../main/tools/anonymizetool.cpp:26
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:136
+msgid "Create new"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:136
+#, fuzzy
+msgid "Add DICOM tag"
+msgstr "Ekle"
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:199
+msgid "Group"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:203
+msgid "Element"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ..\../widgets/wangulo.cpp:1114
+#, fuzzy
+msgid "Value"
+msgstr "Varsayılan değer"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+msgid "Top right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+msgid "Top left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+msgid "Bottom left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+msgid "Bottom right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+msgid "You must fill in all fields"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+msgid "Window/level label in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+msgid "Window"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+msgid "Level"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+msgid "Do you confirm the removal of the preset?"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Data modified"
+msgstr "Veri düzenlendi"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+msgid "Modality settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+#, fuzzy
+msgid "Default modality settings"
+msgstr "Varsayılan"
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, c-format
+msgid "%s settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:60
+msgid "settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Export Configuration"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Ini Files(*.ini)|*.ini"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+msgid "Existing file"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+msgid "Export successfully completed"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#, fuzzy
+msgid "There was an error during exportation"
+msgstr "Hata"
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Import Configuration"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Ini files(*.ini)|*.ini"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+msgid "There was an error during importation, check permissions"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+msgid "Dicom tag"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+msgid "Split horizontally..."
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+msgid "Split vertically..."
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ..\../main/tools/windowlayouttool.cpp:273
+msgid "Split active horizontally"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ..\../main/tools/windowlayouttool.cpp:274
+msgid "Split active vertically"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+msgid "New hanging protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, fuzzy, c-format
+msgid "Window %d"
+msgstr "%m/%d/%Y"
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "Yes"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+msgid "Hanging protocols"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+msgid "One day"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+msgid "Two days"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+msgid "Three days"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+msgid "Two weeks"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+msgid "One month"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+msgid "Three months"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+msgid "Local database"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+msgid "Local DICOM Dir setup"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+msgid "Select DICOMDIR"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+msgid "Extensions settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+msgid "Port has to be a valid number"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+msgid "General configuration parameters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:134
+msgid "Testing conectivity with the server..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:144
+#, fuzzy
+msgid "Error connecting to url"
+msgstr "Hata"
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+msgid "hostname/port not set"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+#, fuzzy
+msgid "Select certificate"
+msgstr "Sertifika"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:255
+#, fuzzy
+msgid "Change ..."
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+msgid "Import ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:279
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:472
+msgid "There are this errors: "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:525
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:558
+msgid "Testing the connection to the node ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:561
+#, fuzzy
+msgid "DICOM Error"
+msgstr "Hata"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:607
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:616
+msgid "Invalid port number"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:622
+#, fuzzy
+msgid "WADO Error"
+msgstr "Hata"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:703
+#, fuzzy
+msgid "Use by default"
+msgstr "Varsayılan"
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:795
+msgid "DICOM nodes"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:800
+msgid "DICOM nodes settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ..\../main/gui/export/pasosexportacionbase.cpp:20
+msgid "Profile"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr "Varsayılan değer"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+msgid "Set property active"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Set property inactive"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#, fuzzy
+msgid "Set default value"
+msgstr "Varsayılan değer"
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+msgid "Set by user"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+msgid "Profile name can't be repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+msgid "Profiles Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+msgid "Confirm the removal of the profile "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+msgid "New User"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+msgid "User name repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+msgid "Password has to contain at least 6 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+msgid "No login"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+#, fuzzy
+msgid "User/Password"
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+#, fuzzy
+msgid "Password"
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+#, fuzzy
+msgid "Password is setted"
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+#, fuzzy
+msgid "Password is not setted"
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+#, fuzzy
+msgid "Set password"
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+msgid "Security Setting"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+msgid "User inserted successfully"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#, fuzzy
+msgid "Password changed successfully"
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+msgid "User deleted successfully"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ..\../main/gui/login/dialogologin.cpp:27
+msgid "User"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ..\../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+msgid "Maximum length of title is 8 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+msgid "Title"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+msgid "Path"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+msgid "Clean before"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+msgid "Clean after"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+msgid "Location Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:96
+msgid "Anonymization settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1370
+msgid "Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+msgid "Export config..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+msgid "Import config..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr "Uygula"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+msgid "Physician's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+msgid "Physician's Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+msgid "Service"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+msgid "Service's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+msgid "Service's Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+msgid "Local institution"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+msgid "Institution's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+msgid "Institution's Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+msgid "Dicomized files"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+msgid "Charset"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+msgid "ISO_IR 148"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+#, fuzzy
+msgid "Automatically check for updates"
+msgstr "Güncellemeleri kontrol et"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+msgid "Proxy settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+msgid "Enable http proxy"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+msgid "Proxy Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+msgid "Server settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+msgid "Host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+msgid "Port"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+msgid "Username"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+msgid "No proxy for addresses containing"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+msgid "DICOM Dir"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr "..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+msgid "Auto-cleaning"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+msgid "MB"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ..\../main/tools/toolwindowlevel.cpp:201
+#, fuzzy
+msgid "Reset to default"
+msgstr "Varsayılan"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+msgid "Local AET"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+msgid "DICOM Nodes"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+msgid "New ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+msgid "Edit ..."
+msgstr "Düzenle ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete"
+msgstr "Sil"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+#, fuzzy
+msgid "Set Default"
+msgstr "Varsayılan"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+msgid "DICOM Node"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+msgid "PDU (KB)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+msgid "Retrieve method"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Move"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Get"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+msgid "WADO URL"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+msgid "Retrieve mode"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ..\../main/gui/import/pasosimportacionbase.cpp:319
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1395
+msgid "Series"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+msgid "Studies"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+msgid "Worklists"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+msgid "Select how do you want to handle MPPS items"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+msgid "DICOM MPPS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+msgid "HL7 messages"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+msgid "HL7"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+#, fuzzy
+msgid "Abort message"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+#, fuzzy
+msgid "Completed message"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+#, fuzzy
+msgid "In progress message"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+#, fuzzy
+msgid "Default values"
+msgstr "Varsayılan"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+msgid "Worklist"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+msgid "SSL/TLS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+msgid "Verify server credentials"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+msgid "Use SSL/TLS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr "Sertifika"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+#, fuzzy
+msgid "Certificate to use in this connection"
+msgstr "Sertifika"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+#, fuzzy
+msgid "Default charset"
+msgstr "Varsayılan"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+msgid "Advanced"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+#, fuzzy
+msgid "Local AET certificate"
+msgstr "Sertifika"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+msgid "Certificate used by Ginkgo CADx"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+msgid "Receiver organization Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+msgid "Petitioner System Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+msgid "Filler Application Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+msgid "Ginkgo CADx Application Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+msgid "Integration engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+msgid "Hostname / Port"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr "/"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+msgid "Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ..\../main/gui/export/pasosexportacionbase.cpp:28
+msgid "Format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+#, fuzzy
+msgid "Message's format"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr "ER7"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+msgid "Test engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+msgid "Test Integration Engine connectivity"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+msgid "Ginkgo Extension Title"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+#, fuzzy
+msgid "Edit public key"
+msgstr "Düzenle ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+msgid "Public key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+msgid "Public key in PEM format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+msgid "Load ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+msgid "Private key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+msgid "Private key in PEM format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+msgid "Profile name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+msgid "Set active"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+msgid "Configure location"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+msgid "Location"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+msgid "Security type"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+#, fuzzy
+msgid "Change Password ..."
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+#, fuzzy
+msgid "Set main password"
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+#, fuzzy
+msgid "Set Password"
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+#, fuzzy
+msgid "Edit User"
+msgstr "Düzenle ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+msgid "User Name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+#, fuzzy
+msgid "Confirm Password"
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+msgid "Properties"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+#, fuzzy
+msgid "Edit corner annotations"
+msgstr "Düzenle ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue}  where GGGG is the tag's group in hexadecimal and EEEE is the "
+"tag's element."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+msgid "Window/level"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr "Ekle"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ..\../main/gui/history3/historytoolmenu.cpp:149
+#: ..\../widgets/gui/selecciontextobase.h:58
+#, fuzzy
+msgid "Edit"
+msgstr "Düzenle ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+#, fuzzy
+msgid "Default Window/Level"
+msgstr "Varsayılan"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+msgid "Corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+msgid "Setup corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+msgid "Setup..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+msgid "Other settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+#, fuzzy
+msgid "Interpolate pixel data"
+msgstr "Veri"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+msgid "Hanging protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+msgid "Opening mode"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+msgid "Study opening criteria"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+msgid "Workspace"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+msgid "Enable/Disable"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+msgid "Top left corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+msgid "Setup window"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+#, fuzzy
+msgid "Set default"
+msgstr "Varsayılan"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+msgid "Open in main window"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+msgid "Setup position..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+msgid "Setup undocked window position"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+msgid "Layout"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+#, fuzzy
+msgid "Current layout"
+msgstr "Mevcut"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+msgid "Columns"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+msgid "Series criteria"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+msgid "Select opening mode"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+msgid "Tag"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+msgid "Save"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+msgid "Enable background queries"
+msgstr ""
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+msgid "Smart retrieve"
+msgstr ""
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+msgid "Smart retrieve settings"
+msgstr ""
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.h:64
+msgid "Export DICOM"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+msgid "Ginkgo CADx private tags"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ..\../main/gui/history3/historypanel3.cpp:340
+#: ..\../main/gui/history3/historytoolmenu.cpp:158
+msgid "Export"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ..\../main/gui/export/parametrosprincipales.cpp:157
+msgid "Select the directory where the files will be stored"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+msgid "Select the DICOM Dir folder"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+msgid "DICOM Dir migration"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+msgid "Migrate existing (recommended)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+#, fuzzy
+msgid "Continue..."
+msgstr "Devam"
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+msgid "Select other"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+msgid "Browse..."
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:106
+msgid "DICOM Export"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:110
+msgid "Select the format and the images you want to export"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:143
+#, fuzzy
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr "Tüm dosyalar (*.*)|*.*"
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:150
+#, fuzzy
+msgid "Select file"
+msgstr "Tümü"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "DICOM (native format)"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "Image (jpg, bmp, png)"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:38
+#, fuzzy
+msgid "Export all files of opened tab"
+msgstr "%m/%d/%Y"
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:55
+msgid "JPEG"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr ""
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:40
+msgid "Image Export Wizard"
+msgstr ""
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ..\../main/gui/license/aboutdialogbase.cpp:67
+#: ..\../main/gui/license/aboutdialogbase.cpp:151
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:54
+#, fuzzy
+msgid "&Accept"
+msgstr "Kabul et"
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+msgid "Open link"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+msgid "File link:"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ..\../main/gui/import/pasosimportacionbase.cpp:270
+msgid "Study"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+msgid "User name"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+msgid "Ginkgo Cloud link"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+msgid "Copy to clipboard"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "New Ginkgo Cloud study"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "To download the study, paste this url "
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+msgid "Creator"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+msgid "Last Modificator"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+msgid "Show link..."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+msgid "Invalid link"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:117
+#: ..\../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:119
+#: ..\../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:226
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr "Yaş"
+
+#: ..\../main/gui/history3/historypanel3.cpp:228
+#, fuzzy
+msgid "Date acquired"
+msgstr "Tarih"
+
+#: ..\../main/gui/history3/historypanel3.cpp:230
+#, fuzzy
+msgid "Date added"
+msgstr "Tarih"
+
+#: ..\../main/gui/history3/historypanel3.cpp:308
+#: ..\../main/gui/history3/historytoolmenu.cpp:82
+#: ..\../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:316
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:363
+#, fuzzy
+msgid "All patients"
+msgstr "Tümü"
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+msgid "Results"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, fuzzy, c-format
+msgid " (%d images)"
+msgstr "%m/%d/%Y"
+
+#: ..\../main/gui/history3/historypanel3.cpp:634
+msgid "Open study with .."
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:663
+#: ..\../main/gui/history3/historypanel3base.cpp:482
+msgid "Synchronize"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#, fuzzy
+msgid "&Delete from history"
+msgstr "Sil"
+
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#, fuzzy
+msgid "&Clear history"
+msgstr "Temizle"
+
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid "Unable to open modality "
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1086
+#, fuzzy
+msgid "all files"
+msgstr "Tümü"
+
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+msgid "Select at least one series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "those series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "this series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:57
+msgid "Advanced search"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:73
+#, fuzzy
+msgid "Acquisition date"
+msgstr "Tarih"
+
+#: ..\../main/gui/history3/historypanel3base.cpp:302
+#: ..\../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr "Silmek istediğinize emin misiniz? "
+
+#: ..\../main/gui/history3/historypanel3base.cpp:336
+#: ..\../main/gui/history3/historytoolmenu.cpp:102
+#: ..\../main/gui/history3/historytoolmenu.cpp:200
+#: ..\../main/gui/history3/historytoolmenu.cpp:229
+msgid "Remove"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:454
+#: ..\../main/gui/history3/historypanel3base.h:187
+msgid "Synchronize files"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+
+#: ..\../main/gui/history3/historytablemodel.cpp:406
+#: ..\../main/gui/history3/historytablemodel.cpp:418
+#: ..\../main/gui/history3/historytablemodel.cpp:473
+#: ..\../main/gui/history3/historytablemodel.cpp:485
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:105
+#, fuzzy
+msgid "00/00/0000 00:00:00"
+msgstr "%m/%d/%Y 00:00:00"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:138
+#, fuzzy
+msgid "Close history"
+msgstr "Kapat"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:139
+#: ..\../main/gui/startup/startupform.cpp:53
+msgid "History"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:201
+#: ..\../main/gui/history3/historytoolmenu.cpp:230
+#, fuzzy
+msgid "Clear history"
+msgstr "Temizle"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:232
+#, fuzzy
+msgid "Select all"
+msgstr "Tümü"
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:233
+#, fuzzy
+msgid "Deselect all"
+msgstr "Tümü"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+msgid "Destination"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+msgid "Status"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+msgid "Error message"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+#, fuzzy
+msgid "Show Message"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+#, fuzzy
+msgid "Edit Message"
+msgstr "Düzenle ..."
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+msgid "Delete message"
+msgstr "Mesajı sil"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+#, fuzzy
+msgid "Error editing message"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+#, fuzzy
+msgid "Error purguing messages"
+msgstr "Hata"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Stop"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Sent"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/progress/statusbarprogreso.cpp:281
+msgid "Warning"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+#, fuzzy
+msgid "Error getting message"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+msgid "Running"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+msgid "Usually due to an error in sending a message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Start"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+#, fuzzy
+msgid "Error deleting messages"
+msgstr "Hata"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+msgid "Remove sent messages"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+#, fuzzy
+msgid "Exit"
+msgstr "&Çıkış"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+msgid "Messages"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+msgid "Refresh"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1394
+msgid "View"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+msgid "Send task status:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+#, fuzzy
+msgid "Message"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr "Tarih:"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+msgid "Destination:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+msgid "Status:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+#, fuzzy
+msgid "Message content:"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:142
+msgid "OK"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:210
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:231
+#, fuzzy
+msgid "Error validating fields"
+msgstr "Hata"
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:148
+msgid "Selecting Import Profile"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:152
+msgid "You must select the profile you want to use import"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+msgid "You must select the import profile"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:21
+msgid "Selected images"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:56
+msgid "Preview"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:62
+#, fuzzy
+msgid "Remove all"
+msgstr "Tümü"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:113
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:65
+#, fuzzy
+msgid "Demographic data"
+msgstr "Veri"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:159
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+#, fuzzy
+msgid "Birth date"
+msgstr "Tarih"
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:217
+msgid "Study Details"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:234
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:122
+msgid "Weight"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:245
+msgid "Kg"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:252
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:119
+msgid "Height"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:291
+#: ..\../main/gui/import/pasosimportacionbase.cpp:333
+#, fuzzy
+msgid "Time"
+msgstr "Tarih Saat"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files..."
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste from clipboard"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:330
+#, fuzzy
+msgid "Delete selected items"
+msgstr "Sil"
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+msgid "You must select an image"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:346
+msgid "Generating preview..."
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:500
+msgid "Select images"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:715
+msgid "Image selection"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:760
+msgid "The file"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:52
+msgid "Image Import Wizard"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:167
+msgid "free of"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:181
+msgid "in dicomization dir."
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, fuzzy, c-format
+msgid "Step %d of %d: "
+msgstr "%m/%d/%Y"
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialog.cpp:25
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:22
+msgid "Ginkgo CADx"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr "Hazırlayanlar"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:55
+msgid "Licenses"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:58
+#, fuzzy
+msgid "UPDATE_INFO"
+msgstr "Bilgi"
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:108
+#: ..\../main/gui/license/aboutdialogbase.h:88
+msgid "Open Source Licenses"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:119
+msgid "FamFamFam Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:120
+msgid "Fugue Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:126
+msgid "WxWidgets"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:127
+msgid "Zlib"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:130
+msgid "Dark Glass Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ..\../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:53
+#, fuzzy
+msgid "Check for updates automatically"
+msgstr "Güncellemeleri kontrol et"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:66
+#, fuzzy
+msgid "I Accept the license"
+msgstr "Kabul et"
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Save logs"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+msgid "File couldn't be stored "
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+msgid "Could not write to file"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+#, fuzzy
+msgid "Save log..."
+msgstr "Kayıt Dosyasını Temizle"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+msgid "Clear log"
+msgstr "Kayıt Dosyasını Temizle"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+#, fuzzy
+msgid "Log"
+msgstr "Kayıt Dosyasını Temizle"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr "Temizle"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr ""
+
+#: ..\../main/gui/login/dialogologin.cpp:50
+#, fuzzy
+msgid "The username or password is incorrect"
+msgstr "Parolayı değiştir"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:250
+msgid "Tasks"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1139
+msgid "Included in the history ..."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+#, fuzzy
+msgid "Check update error"
+msgstr "Güncellemeleri kontrol et"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+msgid "Malformed XML"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1192
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+msgid "Error parsing integration XML:\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#, fuzzy
+msgid "PACS error:\n"
+msgstr "Hata"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+msgid "Error executing WorkFlow\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#, fuzzy
+msgid "Close current view"
+msgstr "Mevcut"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+#, fuzzy
+msgid "Close all"
+msgstr "Tümü"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+#, fuzzy
+msgid "Close all views"
+msgstr "Tümü"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr "&Çıkış"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+#, fuzzy
+msgid "Exit application"
+msgstr "&Çıkış"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Show full screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1302
+msgid "Tab grouping"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1329
+msgid "Ginkgo CADx manual ..."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1330
+msgid "Open test card"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr "Güncellemeleri kontrol et"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+#, fuzzy
+msgid "Check for newest versions"
+msgstr "Güncellemeleri kontrol et"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1332
+msgid "Need support ..."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About "
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+msgid "HL7 monitor"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#, fuzzy
+msgid "HL7 message control"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+#, fuzzy
+msgid "Log monitor"
+msgstr "Kayıt Dosyasını Temizle"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#, fuzzy
+msgid "Log monitored"
+msgstr "Kayıt Dosyasını Temizle"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1390
+msgid "&File"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr "&Düzenle"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr "&Yardım"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1664
+#, fuzzy
+msgid "Unsaved data"
+msgstr "Veri"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+#, fuzzy
+msgid "Error saving"
+msgstr "Hata"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "Full Screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "View Full Screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1708
+msgid "Tab Regroup"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr "&Kapat"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+#, fuzzy
+msgid "&Close all"
+msgstr "Tümü"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+#, fuzzy
+msgid "Close all windows"
+msgstr "Tümü"
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1728
+msgid "Tabbed organization"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "Ginkgo CADx updated"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1782
+msgid "New version available ("
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+msgid "New Update"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+msgid "New version available"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+msgid "X"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+#, fuzzy
+msgid "Close this notification"
+msgstr "Kapat"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+msgid "The following commands will be aborted if you close the application"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+#, fuzzy
+msgid "Close Ginkgo CADx"
+msgstr "Kapat"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:138
+msgid "User login"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+msgid "System authentication"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+msgid "Login"
+msgstr ""
+
+#: ..\../main/gui/open/abrir.cpp:80 ..\../main/gui/open/abrir.cpp:82
+msgid "Open..."
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:58
+msgid "There was an error reading DICOMDIR file"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:62
+msgid "Select a valid DICOMDIR file"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:180
+#: ..\../main/gui/open/opendialogsbase.cpp:170
+#: ..\../main/gui/open/opendialogsbase.h:112
+msgid "Copy or link"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:22
+#: ..\../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:94
+#: ..\../main/gui/open/opendialogsbase.h:85
+msgid "Select drive"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:175
+msgid "Do you want to copy or link files?"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ..\../main/gui/selectpacsserver/selectpacsserver.cpp:30
+msgid "There aren't any PACS configured"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:69
+#, fuzzy
+msgid "0000/00/00 00:00:00"
+msgstr "%m/%d/%Y 00:00:00"
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.h:57
+msgid "Upload study"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+msgid "Select PACS server"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:119
+msgid "Metadata"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:120
+msgid "Identification information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:121
+msgid "Patient information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:122
+msgid "Acquisition information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:123
+msgid "Relationship information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:124
+msgid "Image presentation information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:125 ..\../widgets/wtextbox.cpp:525
+msgid "Text"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:126
+msgid "Other"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:137
+#: ..\../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr "Veri"
+
+#: ..\../main/gui/previewpanel/previewpanel.cpp:47
+msgid "Hide"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:207
+msgid "Previews"
+msgstr ""
+
+#: ..\../main/gui/progress/progresobase.cpp:23
+msgid "There is no running tasks"
+msgstr ""
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:165
+#, fuzzy
+msgid "0 running tasks."
+msgstr "0"
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:192
+#, fuzzy, c-format
+msgid "There are %d pending tasks"
+msgstr "%m/%d/%Y"
+
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.h:55
+msgid "Select PACS"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:29
+msgid "http://ginkgo-cadx.com"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:47
+msgid "Ginkgo CADx Pro"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr ""
+
+#: ..\../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr ""
+
+#: ..\../main/managers/widgetsmanager.cpp:1079
+#, fuzzy
+msgid "Delete Widget"
+msgstr "Sil"
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Properties ..."
+msgstr ""
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Widget Properties"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:114
+msgid "Open file"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:115
+#: ..\../main/tools/openfoldertool.cpp:27
+msgid "Open folder"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:116
+#: ..\../main/tools/openremovabletool.cpp:28
+msgid "Open removable unit"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:117
+#: ..\../main/tools/openginkgocloudlinktool.cpp:27
+msgid "Open Ginkgo Cloud link"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr ""
+
+#: ..\../main/tools/colormaptool.cpp:110
+#, fuzzy
+msgid "Invert color map"
+msgstr "Renk"
+
+#: ..\../main/tools/cornerannotationstool.cpp:44
+msgid "Hide corner annotations"
+msgstr ""
+
+#: ..\../main/tools/cornerannotationstool.cpp:46
+msgid "Show corner annotations"
+msgstr ""
+
+#: ..\../main/tools/detachwindowtool.cpp:42
+msgid "Attach View"
+msgstr ""
+
+#: ..\../main/tools/detachwindowtool.cpp:44
+msgid "Detach view"
+msgstr ""
+
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize files"
+msgstr ""
+
+#: ..\../main/tools/exportdicomdirtool.cpp:32
+msgid "Export to DICOM Dir"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:171
+msgid "Point"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:176
+msgid "Free form"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:57
+msgid "Grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:67
+msgid "Grid Scale"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:74
+msgid "Scale X"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:78
+msgid "X axis scale"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:87
+#, fuzzy
+msgid "Scale Y"
+msgstr "%m/%d/%Y"
+
+#: ..\../main/tools/metricgridtool.cpp:91
+#, fuzzy
+msgid "Y axis scale"
+msgstr "%m/%d/%Y"
+
+#: ..\../main/tools/metricgridtool.cpp:206
+msgid "Show grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:250
+msgid "Hide Grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:252
+msgid "Show Grid"
+msgstr ""
+
+#: ..\../main/tools/openfiletool.cpp:28
+msgid "Open File"
+msgstr ""
+
+#: ..\../main/tools/pacsuploadtool.cpp:54
+msgid "Send to PACS..."
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:59
+msgid "Unset pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:61
+msgid "Set pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+msgid "PACS Q/R"
+msgstr ""
+
+#: ..\../main/tools/queryretrievetool.cpp:94
+#: ..\../main/tools/searchginkgocloudhistorytool.cpp:28
+msgid "Search Ginkgo Cloud"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:151
+msgid "Undo rotate and flip"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:156
+msgid "Flip horizontal"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:157
+msgid "Flip vertical"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:34
+msgid "Send to PACS"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:70
+msgid "Sending to PACS..."
+msgstr ""
+
+#: ..\../main/tools/showtagstool.cpp:42
+msgid "Hide DICOM inspector"
+msgstr ""
+
+#: ..\../main/tools/showtagstool.cpp:44
+msgid "Show DICOM inspector"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:119
+msgid "Image printing"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:224
+msgid "Page setup"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:225
+msgid "Print preview"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:272
+msgid "Print image"
+msgstr ""
+
+#: ..\../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr ""
+
+#: ..\../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr ""
+
+#: ..\../main/tools/undotool.cpp:110
+msgid "Redo"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:153
+msgid "Enable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:267
+#, fuzzy
+msgid "Add column"
+msgstr "Ekle"
+
+#: ..\../main/tools/windowlayouttool.cpp:268
+#, fuzzy
+msgid "Add row"
+msgstr "Ekle"
+
+#: ..\../main/tools/windowlayouttool.cpp:270
+msgid "Remove column"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:271
+msgid "Remove row"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:82
+msgid "The tool is already registered"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:187
+msgid "The module "
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:49
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:56
+msgid "Unable to load PNG image resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:63
+msgid "Unable to load GIF animation resource"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:219
+#, fuzzy
+msgid "Enter the calibration value"
+msgstr "Varsayılan değer"
+
+#: ..\../widgets/gui/calibracion.cpp:225
+msgid "The calibration value is too low"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "The calibration value is too high"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr "Santimetre"
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr ""
+
+#: ..\../widgets/gui/selecciontextobase.cpp:26
+msgid "Note"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1101 ..\../widgets/wangulo.cpp:1103
+msgid "Type"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1101
+msgid "Normal"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1103
+msgid "Cobb"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:721 ..\../widgets/wfreeform.cpp:470
+#: ..\../widgets/wpolygon.cpp:574
+#, fuzzy
+msgid "Center (I)"
+msgstr "Merkez"
+
+#: ..\../widgets/welipse.cpp:727 ..\../widgets/wfreeform.cpp:476
+#: ..\../widgets/wpolygon.cpp:580
+#, fuzzy
+msgid "Center (M)"
+msgstr "Merkez"
+
+#: ..\../widgets/welipse.cpp:762 ..\../widgets/welipse.cpp:766
+msgid "Greater Radius"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:763 ..\../widgets/welipse.cpp:767
+msgid "Lower Radius"
+msgstr ""
+
+#: ..\../widgets/wfreeform.cpp:482 ..\../widgets/wpolygon.cpp:586
+msgid "Number of Vertex"
+msgstr ""
+
+#: ..\../widgets/wpunto.cpp:353
+msgid "Position (I)"
+msgstr ""
+
+#: ..\../widgets/wpunto.cpp:358
+msgid "Position (M)"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:558
+msgid "Image Calibration"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:663
+msgid "Length"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:668
+msgid "Points (I)"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:675
+msgid "Points (M)"
+msgstr ""
+
+#: ..\../widgets/wtextbox.cpp:445
+#, fuzzy
+msgid "Default text"
+msgstr "Varsayılan"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:41
+#, fuzzy
+msgid "Commit date"
+msgstr "Tarih"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr "%m/%d/%Y"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:214
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:219
+#, fuzzy
+msgid "Modified"
+msgstr "Veri düzenlendi"
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr "644654645"
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:130
+msgid "Commit inform"
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedades.cpp:30
+msgid "Properties of "
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:31
+msgid "Widget's Name"
+msgstr ""
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr ""
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr "&İptal"
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3701
+msgid "Regular expression invalid: '"
+msgstr ""
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.h:56
+msgid "Overwrite Paths"
+msgstr ""
+
+#: ..\../ginkgopro/ginkgo_pro_defines.h:21
+msgid "Professional DICOM CADx environment"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservers.h:39
+msgid "Server not found"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:99
+msgid "DICOM Query/Retrieve"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:123
+msgid "Not found"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+msgid "Advanced Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+#, fuzzy
+msgid "Edit profile"
+msgstr "Düzenle ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+#, fuzzy
+msgid "Add/Edit Location"
+msgstr "Düzenle ..."
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+#, fuzzy
+msgid "Add window/level"
+msgstr "Ekle"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+#, fuzzy
+msgid "Add tag"
+msgstr "Ekle"
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+msgid "Setup window position"
+msgstr ""
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.h:61
+msgid "Closing"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+msgid "DICOM Dir configuration"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:70
+msgid "Open Ginkgo Cloud"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:123
+msgid "Ginkgo Cloud search"
+msgstr ""
+
+#: ..\../main/gui/history3/confirmdeletedialog.h:24
+msgid " from History?"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.h:100
+msgid "Medical history"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.h:161
+msgid "Open With ..."
+msgstr ""
+
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Select a View"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+#, fuzzy
+msgid "Message detail"
+msgstr "Hata mesajı"
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+#, fuzzy
+msgid "Log node"
+msgstr "Kayıt Dosyasını Temizle"
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:87
+msgid "Closing Ginkgo CADx"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltagsbase.h:57
+msgid "DICOM Inspector"
+msgstr ""
+
+#: ..\../main/license.h:31
+msgid "Open Source DICOM CADx environment"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.h:65
+msgid "Calibration"
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedadesbase.h:62
+msgid "Properties of ..."
+msgstr ""
+
+#: ..\../wx/thumbnailctrl/thumbnailwidget.h:44
+msgid "Image Browser Dialog"
+msgstr ""
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+msgid "Test title"
+msgstr ""
+
+#~ msgid "Current"
+#~ msgstr "Mevcut"
+
+#~ msgid "All"
+#~ msgstr "Tümü"
+
+#~ msgid "BMP"
+#~ msgstr "BMP"
+
+#~ msgid "Color"
+#~ msgstr "Renk"
+
+#~ msgid "Center"
+#~ msgstr "Merkez"
+
+#~ msgid "0"
+#~ msgstr "0"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">"
+#~ msgstr ">"
+
+#~ msgid "<"
+#~ msgstr "<"
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid "Choose a directory:"
+#~ msgstr "Bir dizin seç:"
+
+#~ msgid "Choose a file"
+#~ msgstr "Bir dosya seçin"
+
+#~ msgid "Study description"
+#~ msgstr "Açıklama"
+
+#~ msgid "Clean"
+#~ msgstr "Temizle"
+
+#~ msgid "Display Options"
+#~ msgstr "Görünüm Seçenekleri"
+
+#~ msgid "Close All"
+#~ msgstr "Tümünü Kapat"
+
+#~ msgid "&Open File"
+#~ msgstr "&Dosya Aç"
+
+#~ msgid "12412012 Q"
+#~ msgstr "12412012 Q"
+
+#~ msgid "31/08/1983"
+#~ msgstr "31/08/1983"
+
+#~ msgid "10:20"
+#~ msgstr "10:20"
+
+#~ msgid "31/02/2010"
+#~ msgstr "31/02/2010"
+
+#~ msgid "Date: "
+#~ msgstr "Tarih: "
+
+#~ msgid "About &Ginkgo CADx ..."
+#~ msgstr "&Ginkgo CADx Hakkında ..."
+
+#~ msgid "About Ginkgo CADx ..."
+#~ msgstr "Ginkgo CADx Hakkında ..."
+
+#~ msgid "Ginkgo CADx settings"
+#~ msgstr "Ginkgo CADx Hakkında ..."
+
+#~ msgid "1x1"
+#~ msgstr "1x1"
+
+#~ msgid "1x2"
+#~ msgstr "1x2"
+
+#~ msgid "2x1"
+#~ msgstr "2x1"
+
+#~ msgid "2X2"
+#~ msgstr "2X2"
+
+#~ msgid "3x3"
+#~ msgstr "3x3"
+
+#~ msgid "4x4"
+#~ msgstr "4x4"
+
+#~ msgid "About Ginkgo CADx..."
+#~ msgstr "Ginkgo CADx Hakkında ..."
+
+#~ msgid "Default Value"
+#~ msgstr "Varsayılan Değer"
+
+#~ msgid "Save Certificate"
+#~ msgstr "Sertifika"
+
+#~ msgid "Address"
+#~ msgstr "Adres"
+
+#~ msgid "Downloads"
+#~ msgstr "İndirilenler"
diff --git a/cadxcore/lang/tr/wxstd.mo b/cadxcore/lang/tr/wxstd.mo
new file mode 100644
index 0000000..c989b40
Binary files /dev/null and b/cadxcore/lang/tr/wxstd.mo differ
diff --git a/cadxcore/lang/tr/wxstd.po b/cadxcore/lang/tr/wxstd.po
new file mode 100644
index 0000000..3b07d4e
--- /dev/null
+++ b/cadxcore/lang/tr/wxstd.po
@@ -0,0 +1,8413 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the PACKAGE package.
+#
+# Translators:
+# Kaya Zeren <translator at zeron.net>, 2013
+msgid ""
+msgstr ""
+"Project-Id-Version: wxWidgets 3.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-01 19:04+0200\n"
+"PO-Revision-Date: 2013-10-04 19:58+0200\n"
+"Last-Translator: Kaya Zeren <kayazeren at gmail.com>\n"
+"Language-Team: Turkish (Turkey) (http://www.transifex.com/projects/p/"
+"wxwidgets_unofficial/language/tr_TR/)\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Language: tr_TR\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.5.7\n"
+
+#: ../src/common/debugrpt.cpp:591
+msgid ""
+"\n"
+"Please send this report to the program maintainer, thank you!\n"
+msgstr ""
+"\n"
+"Lütfen bu raporu program geliştiricisine gönderin, teşekkürler!\n"
+
+#: ../src/richtext/richtextstyledlg.cpp:210
+#: ../src/richtext/richtextstyledlg.cpp:222
+msgid " "
+msgstr " "
+
+#: ../src/generic/dbgrptg.cpp:326
+msgid "              Thank you and we're sorry for the inconvenience!\n"
+msgstr "              Teşekkürler, yaşadığınız sorundan dolayı özür dileriz!\n"
+
+#: ../src/common/prntbase.cpp:546
+#, c-format
+msgid " (copy %d of %d)"
+msgstr "(kopya %d / %d)"
+
+#: ../src/common/log.cpp:425
+#, c-format
+msgid " (error %ld: %s)"
+msgstr " (hata %ld: %s)"
+
+#: ../src/common/imagtiff.cpp:75
+#, c-format
+msgid " (in module \"%s\")"
+msgstr " (\"%s\" modülünde)"
+
+#: ../src/common/docview.cpp:1624
+msgid " - "
+msgstr " - "
+
+#: ../src/richtext/richtextprint.cpp:588 ../src/html/htmprint.cpp:704
+msgid " Preview"
+msgstr "Önizleme"
+
+#: ../src/common/fontcmn.cpp:811
+msgid " bold"
+msgstr " koyu"
+
+#: ../src/common/fontcmn.cpp:827
+msgid " italic"
+msgstr " yatık"
+
+#: ../src/common/fontcmn.cpp:807
+msgid " light"
+msgstr " açık"
+
+#: ../src/common/paper.cpp:118
+msgid "#10 Envelope, 4 1/8 x 9 1/2 in"
+msgstr "#10 Zarf, 4 1/8 x 9 1/2 inç"
+
+#: ../src/common/paper.cpp:119
+msgid "#11 Envelope, 4 1/2 x 10 3/8 in"
+msgstr "#11 Zarf, 4 1/2 x 10 3/8 inç"
+
+#: ../src/common/paper.cpp:120
+msgid "#12 Envelope, 4 3/4 x 11 in"
+msgstr "#12 Zarf, 4 3/4 x 11 inç"
+
+#: ../src/common/paper.cpp:121
+msgid "#14 Envelope, 5 x 11 1/2 in"
+msgstr "#14 Zarf, 5 x 11 1/2 inç"
+
+#: ../src/common/paper.cpp:117
+msgid "#9 Envelope, 3 7/8 x 8 7/8 in"
+msgstr "#9 Zarf, 3 7/8 x 8 7/8 inç"
+
+#: ../src/html/helpwnd.cpp:1044
+#, c-format
+msgid "%d of %lu"
+msgstr "%d / %lu"
+
+#: ../src/html/helpwnd.cpp:1681 ../src/html/helpwnd.cpp:1719
+#, c-format
+msgid "%i of %i"
+msgstr "%i / %i"
+
+#: ../src/generic/filectrlg.cpp:315
+#, c-format
+msgid "%ld byte"
+msgid_plural "%ld bytes"
+msgstr[0] "%ld bayt"
+
+#: ../src/html/helpwnd.cpp:1046
+#, c-format
+msgid "%lu of %lu"
+msgstr "%lu / %lu"
+
+#: ../src/common/cmdline.cpp:1050
+#, c-format
+msgid "%s (or %s)"
+msgstr "%s (ya da %s)"
+
+#: ../src/generic/logg.cpp:230
+#, c-format
+msgid "%s Error"
+msgstr "%s Hata"
+
+#: ../src/generic/logg.cpp:242
+#, c-format
+msgid "%s Information"
+msgstr "%s Bilgileri"
+
+#: ../src/generic/preferencesg.cpp:110
+#, c-format
+msgid "%s Preferences"
+msgstr "%s Ayarları"
+
+#: ../src/generic/logg.cpp:234
+#, c-format
+msgid "%s Warning"
+msgstr "%s Uyarı"
+
+#: ../src/common/tarstrm.cpp:1319
+#, c-format
+msgid "%s did not fit the tar header for entry '%s'"
+msgstr "%s '%s' kaydının tar başlığına sığmadı"
+
+#: ../src/common/fldlgcmn.cpp:106
+#, c-format
+msgid "%s files (%s)|%s"
+msgstr "%s dosya (%s)|%s"
+
+#: ../src/common/stockitem.cpp:139 ../src/html/helpfrm.cpp:142
+#: ../src/html/helpfrm.cpp:144
+msgid "&About"
+msgstr "H&akkında"
+
+#: ../src/common/stockitem.cpp:207
+msgid "&Actual Size"
+msgstr "&Geçerli Boyut"
+
+#: ../src/richtext/richtextindentspage.cpp:262
+msgid "&After a paragraph:"
+msgstr "P&aragraftan sonra:"
+
+#: ../src/richtext/richtextindentspage.cpp:128
+#: ../src/richtext/richtextliststylepage.cpp:319
+msgid "&Alignment"
+msgstr "Hiz&alama"
+
+#: ../src/common/stockitem.cpp:141
+msgid "&Apply"
+msgstr "Uygul&ayın"
+
+#: ../src/richtext/richtextstyledlg.cpp:251
+msgid "&Apply Style"
+msgstr "Stili Uygul&ayın"
+
+#: ../src/msw/mdi.cpp:175
+msgid "&Arrange Icons"
+msgstr "Si&mgeleri Düzenleyin"
+
+#: ../src/common/stockitem.cpp:195
+msgid "&Ascending"
+msgstr "&Artan"
+
+#: ../src/common/stockitem.cpp:142
+msgid "&Back"
+msgstr "&Geri"
+
+#: ../src/richtext/richtextstylepage.cpp:113
+msgid "&Based on:"
+msgstr "&Kaynak:"
+
+#: ../src/richtext/richtextindentspage.cpp:253
+msgid "&Before a paragraph:"
+msgstr "&Paragraftan önce:"
+
+#: ../src/richtext/richtextfontpage.cpp:271
+msgid "&Bg colour:"
+msgstr "&Artalan rengi:"
+
+#: ../src/common/stockitem.cpp:143
+msgid "&Bold"
+msgstr "&Koyu"
+
+#: ../src/common/stockitem.cpp:144
+msgid "&Bottom"
+msgstr "Al&t"
+
+#: ../src/richtext/richtextborderspage.cpp:359
+#: ../src/richtext/richtextborderspage.cpp:503
+#: ../src/richtext/richtextmarginspage.cpp:260
+#: ../src/richtext/richtextmarginspage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:637
+#: ../src/richtext/richtextsizepage.cpp:644
+msgid "&Bottom:"
+msgstr "Al&t:"
+
+#: ../include/wx/richtext/richtextbuffer.h:3530
+msgid "&Box"
+msgstr "&Kutu"
+
+#: ../src/richtext/richtextliststylepage.cpp:210
+#: ../src/richtext/richtextbulletspage.cpp:159
+msgid "&Bullet style:"
+msgstr "&Madde imi stili:"
+
+#: ../src/common/stockitem.cpp:146
+msgid "&CD-Rom"
+msgstr "&CD-Rom"
+
+#: ../src/generic/wizard.cpp:432 ../src/generic/fontdlgg.cpp:470
+#: ../src/generic/fontdlgg.cpp:489 ../src/osx/carbon/fontdlg.cpp:588
+#: ../src/common/stockitem.cpp:145
+msgid "&Cancel"
+msgstr "İ&ptal"
+
+#: ../src/msw/mdi.cpp:171
+msgid "&Cascade"
+msgstr "Ardarda &dizin"
+
+#: ../include/wx/richtext/richtextbuffer.h:5587
+msgid "&Cell"
+msgstr "&Hücre"
+
+#: ../src/richtext/richtextsymboldlg.cpp:439
+msgid "&Character code:"
+msgstr "&Karakter kodu:"
+
+#: ../src/common/stockitem.cpp:147
+msgid "&Clear"
+msgstr "T&emizleyin"
+
+#: ../src/generic/logg.cpp:522 ../src/common/stockitem.cpp:148
+#: ../src/common/prntbase.cpp:1570 ../src/univ/themes/win32.cpp:3756
+#: ../src/html/helpfrm.cpp:139
+msgid "&Close"
+msgstr "&Kapatın"
+
+#: ../src/common/stockitem.cpp:193
+msgid "&Color"
+msgstr "&Renk"
+
+#: ../src/richtext/richtextfontpage.cpp:258
+msgid "&Colour:"
+msgstr "&Renk:"
+
+#: ../src/common/stockitem.cpp:149
+msgid "&Convert"
+msgstr "&Dönüştürün"
+
+#: ../src/richtext/richtextctrl.cpp:326 ../src/osx/textctrl_osx.cpp:583
+#: ../src/common/stockitem.cpp:150 ../src/msw/textctrl.cpp:2284
+msgid "&Copy"
+msgstr "K&opyalayın"
+
+#: ../src/generic/hyperlinkg.cpp:156
+msgid "&Copy URL"
+msgstr "İnternet Adresini K&opyalayın"
+
+#: ../src/common/headerctrlcmn.cpp:328
+msgid "&Customize..."
+msgstr "Ö&zelleştirin..."
+
+#: ../src/generic/dbgrptg.cpp:334
+msgid "&Debug report preview:"
+msgstr "&Hata ayıklama raporu ön izlemesi:"
+
+#: ../src/richtext/richtexttabspage.cpp:142
+#: ../src/richtext/richtextctrl.cpp:328 ../src/osx/textctrl_osx.cpp:585
+#: ../src/common/stockitem.cpp:152 ../src/msw/textctrl.cpp:2286
+msgid "&Delete"
+msgstr "&Silin"
+
+#: ../src/richtext/richtextstyledlg.cpp:269
+msgid "&Delete Style..."
+msgstr "&Stili silin..."
+
+#: ../src/common/stockitem.cpp:196
+msgid "&Descending"
+msgstr "A&zalan"
+
+#: ../src/generic/logg.cpp:688
+msgid "&Details"
+msgstr "&Ayrıntılar"
+
+#: ../src/common/stockitem.cpp:153
+msgid "&Down"
+msgstr "&Aşağı"
+
+#: ../src/common/stockitem.cpp:154
+msgid "&Edit"
+msgstr "Dü&zenleyin"
+
+#: ../src/richtext/richtextstyledlg.cpp:263
+msgid "&Edit Style..."
+msgstr "Stili Düz&enleyin..."
+
+#: ../src/common/stockitem.cpp:155
+msgid "&Execute"
+msgstr "&Yürütün"
+
+#: ../src/common/stockitem.cpp:157 ../src/html/helpfrm.cpp:146
+msgid "&File"
+msgstr "&Dosya"
+
+#: ../src/common/stockitem.cpp:158
+msgid "&Find"
+msgstr "B&ulun"
+
+#: ../src/generic/wizard.cpp:626
+msgid "&Finish"
+msgstr "&Bitti"
+
+#: ../src/common/stockitem.cpp:159
+msgid "&First"
+msgstr "İ&lk"
+
+#: ../src/richtext/richtextsizepage.cpp:244
+msgid "&Floating mode:"
+msgstr "&Yüzer kip:"
+
+#: ../src/common/stockitem.cpp:160
+msgid "&Floppy"
+msgstr "&Esnek"
+
+#: ../src/common/stockitem.cpp:194
+msgid "&Font"
+msgstr "&Yazı tipi"
+
+#: ../src/generic/fontdlgg.cpp:371
+msgid "&Font family:"
+msgstr "&Yazı tipi ailesi:"
+
+#: ../src/richtext/richtextliststylepage.cpp:194
+msgid "&Font for Level..."
+msgstr "&Düzeyin yazıtipi..."
+
+#: ../src/richtext/richtextfontpage.cpp:156
+#: ../src/richtext/richtextsymboldlg.cpp:400
+msgid "&Font:"
+msgstr "&Yazı tipi:"
+
+#: ../src/common/stockitem.cpp:161
+msgid "&Forward"
+msgstr "İ&leri"
+
+#: ../src/richtext/richtextsymboldlg.cpp:451
+msgid "&From:"
+msgstr "&Kaynak:"
+
+#: ../src/common/stockitem.cpp:162
+msgid "&Harddisk"
+msgstr "&Sabit disk"
+
+#: ../src/richtext/richtextsizepage.cpp:351
+#: ../src/richtext/richtextsizepage.cpp:358
+msgid "&Height:"
+msgstr "&Yükseklik:"
+
+#: ../src/generic/wizard.cpp:435 ../src/richtext/richtextstyledlg.cpp:303
+#: ../src/richtext/richtextsymboldlg.cpp:479 ../src/osx/menu_osx.cpp:785
+#: ../src/common/stockitem.cpp:163 ../src/html/helpfrm.cpp:147
+msgid "&Help"
+msgstr "&Yardım"
+
+#: ../include/wx/richmsgdlg.h:30
+msgid "&Hide details"
+msgstr "Ayrıntıları &gizleyin"
+
+#: ../src/common/stockitem.cpp:164
+msgid "&Home"
+msgstr "&Açılış"
+
+#: ../src/richtext/richtextindentspage.cpp:184
+#: ../src/richtext/richtextliststylepage.cpp:372
+msgid "&Indentation (tenths of a mm)"
+msgstr "İçe&rlek (1/10mm ölçeğinde)"
+
+#: ../src/richtext/richtextindentspage.cpp:167
+#: ../src/richtext/richtextliststylepage.cpp:356
+msgid "&Indeterminate"
+msgstr "&Belirsiz"
+
+#: ../src/common/stockitem.cpp:166
+msgid "&Index"
+msgstr "D&izin"
+
+#: ../src/common/stockitem.cpp:167
+msgid "&Info"
+msgstr "&Bilgiler"
+
+#: ../src/common/stockitem.cpp:168
+msgid "&Italic"
+msgstr "&Yatık"
+
+#: ../src/common/stockitem.cpp:169
+msgid "&Jump to"
+msgstr "A&tlayın"
+
+#: ../src/richtext/richtextindentspage.cpp:153
+#: ../src/richtext/richtextliststylepage.cpp:342
+msgid "&Justified"
+msgstr "&Hizalanmış"
+
+#: ../src/common/stockitem.cpp:174
+msgid "&Last"
+msgstr "&Son"
+
+#: ../src/richtext/richtextindentspage.cpp:139
+#: ../src/richtext/richtextliststylepage.cpp:328
+msgid "&Left"
+msgstr "So&l"
+
+#: ../src/richtext/richtextindentspage.cpp:195
+#: ../src/richtext/richtextborderspage.cpp:269
+#: ../src/richtext/richtextborderspage.cpp:413
+#: ../src/richtext/richtextliststylepage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:187
+#: ../src/richtext/richtextmarginspage.cpp:301
+#: ../src/richtext/richtextsizepage.cpp:532
+#: ../src/richtext/richtextsizepage.cpp:539
+msgid "&Left:"
+msgstr "So&l:"
+
+#: ../src/richtext/richtextliststylepage.cpp:183
+msgid "&List level:"
+msgstr "&Liste düzeyi:"
+
+#: ../src/generic/logg.cpp:523
+msgid "&Log"
+msgstr "Gün&lük"
+
+#: ../src/univ/themes/win32.cpp:3748
+msgid "&Move"
+msgstr "&Taşıyın"
+
+#: ../src/richtext/richtextsizepage.cpp:672
+msgid "&Move the object to:"
+msgstr "&Nesneyi şuraya taşıyın:"
+
+#: ../src/common/stockitem.cpp:175
+msgid "&Network"
+msgstr "&Ağ"
+
+#: ../src/richtext/richtexttabspage.cpp:136 ../src/common/stockitem.cpp:176
+msgid "&New"
+msgstr "Ye&ni"
+
+#: ../src/aui/tabmdi.cpp:111 ../src/generic/mdig.cpp:100
+#: ../src/msw/mdi.cpp:176
+msgid "&Next"
+msgstr "So&nraki"
+
+#: ../src/generic/wizard.cpp:431 ../src/generic/wizard.cpp:626
+msgid "&Next >"
+msgstr "So&nraki >"
+
+#: ../src/richtext/richtextsizepage.cpp:681
+msgid "&Next Paragraph"
+msgstr "So&nraki Paragraf"
+
+#: ../src/generic/tipdlg.cpp:276
+msgid "&Next Tip"
+msgstr "So&nraki İpucu"
+
+#: ../src/richtext/richtextstylepage.cpp:123
+msgid "&Next style:"
+msgstr "So&nraki stil:"
+
+#: ../src/common/stockitem.cpp:177 ../src/msw/msgdlg.cpp:476
+msgid "&No"
+msgstr "&Hayır"
+
+#: ../src/generic/dbgrptg.cpp:356
+msgid "&Notes:"
+msgstr "&Notlar:"
+
+#: ../src/richtext/richtextbulletspage.cpp:264
+msgid "&Number:"
+msgstr "&Sayı:"
+
+#: ../src/generic/fontdlgg.cpp:475 ../src/generic/fontdlgg.cpp:482
+#: ../src/osx/carbon/fontdlg.cpp:594 ../src/common/stockitem.cpp:178
+msgid "&OK"
+msgstr "&Tamam"
+
+#: ../src/generic/dbgrptg.cpp:342 ../src/common/stockitem.cpp:179
+#: ../src/html/helpfrm.cpp:137
+msgid "&Open..."
+msgstr "&Açın..."
+
+#: ../src/richtext/richtextindentspage.cpp:222
+msgid "&Outline level:"
+msgstr "Başlık &düzeyi:"
+
+#: ../src/richtext/richtextindentspage.cpp:293
+msgid "&Page Break"
+msgstr "&Sayfa Sonu"
+
+#: ../src/richtext/richtextctrl.cpp:327 ../src/osx/textctrl_osx.cpp:584
+#: ../src/common/stockitem.cpp:180 ../src/msw/textctrl.cpp:2285
+msgid "&Paste"
+msgstr "Ya&pıştırın"
+
+#: ../include/wx/richtext/richtextbuffer.h:4655
+msgid "&Picture"
+msgstr "&Resim"
+
+#: ../src/generic/fontdlgg.cpp:422
+msgid "&Point size:"
+msgstr "Yazı &boyutu:"
+
+#: ../src/richtext/richtexttabspage.cpp:114
+msgid "&Position (tenths of a mm):"
+msgstr "&Konum (1/10mm):"
+
+#: ../src/richtext/richtextsizepage.cpp:514
+msgid "&Position mode:"
+msgstr "&Konum kipi:"
+
+#: ../src/common/stockitem.cpp:181
+msgid "&Preferences"
+msgstr "&Ayarlar"
+
+#: ../src/aui/tabmdi.cpp:112 ../src/generic/mdig.cpp:101
+#: ../src/msw/mdi.cpp:177
+msgid "&Previous"
+msgstr "Ö&nceki"
+
+#: ../src/richtext/richtextsizepage.cpp:675
+msgid "&Previous Paragraph"
+msgstr "Önceki &Paragraf"
+
+#: ../src/common/stockitem.cpp:183
+msgid "&Print..."
+msgstr "&Yazdırın..."
+
+#: ../src/richtext/richtextctrl.cpp:332 ../src/richtext/richtextctrl.cpp:4945
+#: ../src/common/stockitem.cpp:184
+msgid "&Properties"
+msgstr "Ö&zellikler"
+
+#: ../src/common/stockitem.cpp:156
+msgid "&Quit"
+msgstr "Çı&kış"
+
+#: ../src/richtext/richtextctrl.cpp:323 ../src/osx/textctrl_osx.cpp:580
+#: ../src/common/stockitem.cpp:185 ../src/common/cmdproc.cpp:293
+#: ../src/common/cmdproc.cpp:300 ../src/msw/textctrl.cpp:2281
+msgid "&Redo"
+msgstr "&Yineleyin"
+
+#: ../src/common/cmdproc.cpp:289 ../src/common/cmdproc.cpp:309
+msgid "&Redo "
+msgstr "&Yineleyin"
+
+#: ../src/richtext/richtextstyledlg.cpp:257
+msgid "&Rename Style..."
+msgstr "Stili &yeniden adlandırın..."
+
+#: ../src/generic/fdrepdlg.cpp:179
+msgid "&Replace"
+msgstr "&Değiştirin"
+
+#: ../src/richtext/richtextstyledlg.cpp:287
+msgid "&Restart numbering"
+msgstr "Numa&ralandırmayı yeniden başlatın"
+
+#: ../src/univ/themes/win32.cpp:3747
+msgid "&Restore"
+msgstr "Ge&ri yükleyin"
+
+#: ../src/richtext/richtextindentspage.cpp:146
+#: ../src/richtext/richtextliststylepage.cpp:335
+msgid "&Right"
+msgstr "&Sağ"
+
+#: ../src/richtext/richtextindentspage.cpp:213
+#: ../src/richtext/richtextborderspage.cpp:299
+#: ../src/richtext/richtextborderspage.cpp:443
+#: ../src/richtext/richtextliststylepage.cpp:399
+#: ../src/richtext/richtextmarginspage.cpp:212
+#: ../src/richtext/richtextmarginspage.cpp:326
+#: ../src/richtext/richtextsizepage.cpp:602
+#: ../src/richtext/richtextsizepage.cpp:609
+msgid "&Right:"
+msgstr "&Sağ:"
+
+#: ../src/common/stockitem.cpp:190
+msgid "&Save"
+msgstr "Kay&dedin"
+
+#: ../src/common/stockitem.cpp:191
+msgid "&Save as"
+msgstr "&Farklı kaydedin"
+
+#: ../include/wx/richmsgdlg.h:29
+msgid "&See details"
+msgstr "&Ayrıntılar"
+
+#: ../src/generic/tipdlg.cpp:270
+msgid "&Show tips at startup"
+msgstr "İpuçları &başlangıçta görüntülensin"
+
+#: ../src/univ/themes/win32.cpp:3750
+msgid "&Size"
+msgstr "&Boyut"
+
+#: ../src/richtext/richtextfontpage.cpp:168
+msgid "&Size:"
+msgstr "&Boyut:"
+
+#: ../src/generic/progdlgg.cpp:282
+msgid "&Skip"
+msgstr "A&tlayın"
+
+#: ../src/richtext/richtextindentspage.cpp:242
+#: ../src/richtext/richtextliststylepage.cpp:417
+msgid "&Spacing (tenths of a mm)"
+msgstr "&Boşluk (1/10mm)"
+
+#: ../src/common/stockitem.cpp:197
+msgid "&Spell Check"
+msgstr "&Yazım Denetimi"
+
+#: ../src/common/stockitem.cpp:198
+msgid "&Stop"
+msgstr "&Durdurun"
+
+#: ../src/richtext/richtextfontpage.cpp:284 ../src/common/stockitem.cpp:199
+msgid "&Strikethrough"
+msgstr "Ü&stü çizili"
+
+#: ../src/generic/fontdlgg.cpp:382 ../src/richtext/richtextstylepage.cpp:104
+msgid "&Style:"
+msgstr "&Stil:"
+
+#: ../src/richtext/richtextstyledlg.cpp:198
+msgid "&Styles:"
+msgstr "&Stiller:"
+
+#: ../src/richtext/richtextsymboldlg.cpp:413
+msgid "&Subset:"
+msgstr "A&lt küme:"
+
+#: ../src/richtext/richtextliststylepage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:222
+msgid "&Symbol:"
+msgstr "&Simge:"
+
+#: ../include/wx/richtext/richtextbuffer.h:5679
+msgid "&Table"
+msgstr "&Tablo"
+
+#: ../src/common/stockitem.cpp:200
+msgid "&Top"
+msgstr "Üs&t"
+
+#: ../src/richtext/richtextborderspage.cpp:329
+#: ../src/richtext/richtextborderspage.cpp:473
+#: ../src/richtext/richtextmarginspage.cpp:235
+#: ../src/richtext/richtextmarginspage.cpp:349
+#: ../src/richtext/richtextsizepage.cpp:567
+#: ../src/richtext/richtextsizepage.cpp:574
+msgid "&Top:"
+msgstr "Üs&t:"
+
+#: ../src/generic/fontdlgg.cpp:444 ../src/common/stockitem.cpp:202
+msgid "&Underline"
+msgstr "&Altı çizili"
+
+#: ../src/richtext/richtextfontpage.cpp:243
+msgid "&Underlining:"
+msgstr "&Altını çizme:"
+
+#: ../src/richtext/richtextctrl.cpp:322 ../src/osx/textctrl_osx.cpp:579
+#: ../src/common/stockitem.cpp:203 ../src/common/cmdproc.cpp:271
+#: ../src/msw/textctrl.cpp:2280
+msgid "&Undo"
+msgstr "&Geri Alın"
+
+#: ../src/common/cmdproc.cpp:265
+msgid "&Undo "
+msgstr "&Geri Alın"
+
+#: ../src/common/stockitem.cpp:204
+msgid "&Unindent"
+msgstr "İçerleği &geri alın"
+
+#: ../src/common/stockitem.cpp:205
+msgid "&Up"
+msgstr "Y&ukarı"
+
+#: ../src/richtext/richtextsizepage.cpp:278
+msgid "&Vertical alignment:"
+msgstr "&Dikey hizalama:"
+
+#: ../src/generic/dbgrptg.cpp:340
+msgid "&View..."
+msgstr "&Görünüm..."
+
+#: ../src/generic/fontdlgg.cpp:393
+msgid "&Weight:"
+msgstr "&Yoğunluk:"
+
+#: ../src/richtext/richtextsizepage.cpp:317
+#: ../src/richtext/richtextsizepage.cpp:324
+msgid "&Width:"
+msgstr "&Genişlik:"
+
+#: ../src/aui/tabmdi.cpp:311 ../src/aui/tabmdi.cpp:327
+#: ../src/aui/tabmdi.cpp:329 ../src/generic/mdig.cpp:294
+#: ../src/generic/mdig.cpp:310 ../src/generic/mdig.cpp:314
+#: ../src/msw/mdi.cpp:77
+msgid "&Window"
+msgstr "&Pencere"
+
+#: ../src/common/stockitem.cpp:206 ../src/msw/msgdlg.cpp:476
+msgid "&Yes"
+msgstr "&Evet"
+
+#: ../src/common/config.cpp:523 ../src/msw/regconf.cpp:258
+#, c-format
+msgid "'%s' has extra '..', ignored."
+msgstr "'%s' içindeki fazladan '..' yoksayıldı."
+
+#: ../src/common/valtext.cpp:249 ../src/common/valtext.cpp:251
+#: ../src/common/valtext.cpp:253 ../src/common/valtext.cpp:255
+#, c-format
+msgid "'%s' is invalid"
+msgstr "'%s' geçersiz"
+
+#: ../src/common/cmdline.cpp:948 ../src/common/cmdline.cpp:966
+#, c-format
+msgid "'%s' is not a correct numeric value for option '%s'."
+msgstr "'%s' '%s' seçeneği için doğru bir sayısal değer değil."
+
+#: ../src/common/translation.cpp:1086
+#, c-format
+msgid "'%s' is not a valid message catalog."
+msgstr "'%s' geçerli bir ileti kataloğu değil."
+
+#: ../src/common/textbuf.cpp:239
+#, c-format
+msgid "'%s' is probably a binary buffer."
+msgstr "'%s' muhtemelen ikili ara bellek."
+
+#: ../src/common/valtext.cpp:247
+#, c-format
+msgid "'%s' should be numeric."
+msgstr "'%s' sayısal olmalı."
+
+#: ../src/common/valtext.cpp:239
+#, c-format
+msgid "'%s' should only contain ASCII characters."
+msgstr "'%s' yalnız ASCII karakterler içermeli."
+
+#: ../src/common/valtext.cpp:241
+#, c-format
+msgid "'%s' should only contain alphabetic characters."
+msgstr "'%s' yalnız alfabetik karakterler içermeli."
+
+#: ../src/common/valtext.cpp:243
+#, c-format
+msgid "'%s' should only contain alphabetic or numeric characters."
+msgstr "'%s' yalnız alfabetik ya da sayısal karakterler içermeli."
+
+#: ../src/common/valtext.cpp:245
+#, c-format
+msgid "'%s' should only contain digits."
+msgstr "'%s' yalnız rakamlar içermeli."
+
+#: ../src/richtext/richtextliststylepage.cpp:229
+#: ../src/richtext/richtextbulletspage.cpp:179
+msgid "(*)"
+msgstr "(*)"
+
+#: ../src/html/helpwnd.cpp:976
+msgid "(Help)"
+msgstr "(Yardım)"
+
+#: ../src/richtext/richtextliststylepage.cpp:481
+#: ../src/richtext/richtextbulletspage.cpp:286
+msgid "(None)"
+msgstr "(Hiçbiri)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:504
+msgid "(Normal text)"
+msgstr "(Normal metin)"
+
+#: ../src/html/helpwnd.cpp:426 ../src/html/helpwnd.cpp:1119
+#: ../src/html/helpwnd.cpp:1745
+msgid "(bookmarks)"
+msgstr "(yer imleri)"
+
+#: ../src/richtext/richtextindentspage.cpp:274
+#: ../src/richtext/richtextindentspage.cpp:286
+#: ../src/richtext/richtextindentspage.cpp:287
+#: ../src/richtext/richtextindentspage.cpp:311
+#: ../src/richtext/richtextindentspage.cpp:326
+#: ../src/richtext/richtextformatdlg.cpp:831
+#: ../src/richtext/richtextfontpage.cpp:331
+#: ../src/richtext/richtextfontpage.cpp:335
+#: ../src/richtext/richtextfontpage.cpp:339
+#: ../src/richtext/richtextliststylepage.cpp:448
+#: ../src/richtext/richtextliststylepage.cpp:460
+#: ../src/richtext/richtextliststylepage.cpp:461
+msgid "(none)"
+msgstr "(hiçbiri)"
+
+#: ../src/richtext/richtextliststylepage.cpp:492
+#: ../src/richtext/richtextbulletspage.cpp:297
+msgid "*"
+msgstr "*"
+
+#: ../src/richtext/richtextliststylepage.cpp:236
+#: ../src/richtext/richtextbulletspage.cpp:186
+msgid "*)"
+msgstr "*)"
+
+#: ../src/richtext/richtextliststylepage.cpp:495
+#: ../src/richtext/richtextbulletspage.cpp:300
+msgid "+"
+msgstr "+"
+
+#: ../src/msw/utils.cpp:1324
+msgid ", 64-bit edition"
+msgstr ", 64-bit sürümü"
+
+#: ../src/richtext/richtextliststylepage.cpp:493
+#: ../src/richtext/richtextbulletspage.cpp:298
+msgid "-"
+msgstr "-"
+
+#: ../src/generic/filepickerg.cpp:66
+msgid "..."
+msgstr "..."
+
+#: ../src/richtext/richtextindentspage.cpp:276
+#: ../src/richtext/richtextliststylepage.cpp:450
+msgid "1.1"
+msgstr "1.1"
+
+#: ../src/richtext/richtextindentspage.cpp:277
+#: ../src/richtext/richtextliststylepage.cpp:451
+msgid "1.2"
+msgstr "1.2"
+
+#: ../src/richtext/richtextindentspage.cpp:278
+#: ../src/richtext/richtextliststylepage.cpp:452
+msgid "1.3"
+msgstr "1.3"
+
+#: ../src/richtext/richtextindentspage.cpp:279
+#: ../src/richtext/richtextliststylepage.cpp:453
+msgid "1.4"
+msgstr "1.4"
+
+#: ../src/richtext/richtextindentspage.cpp:280
+#: ../src/richtext/richtextliststylepage.cpp:454
+msgid "1.5"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:455
+msgid "1.6"
+msgstr "1.6"
+
+#: ../src/richtext/richtextindentspage.cpp:282
+#: ../src/richtext/richtextliststylepage.cpp:456
+msgid "1.7"
+msgstr "1.7"
+
+#: ../src/richtext/richtextindentspage.cpp:283
+#: ../src/richtext/richtextliststylepage.cpp:457
+msgid "1.8"
+msgstr "1.8"
+
+#: ../src/richtext/richtextindentspage.cpp:284
+#: ../src/richtext/richtextliststylepage.cpp:458
+msgid "1.9"
+msgstr "1.9"
+
+#: ../src/common/paper.cpp:141
+msgid "10 x 11 in"
+msgstr "10 x 11 inç"
+
+#: ../src/common/paper.cpp:114
+msgid "10 x 14 in"
+msgstr "10 x 14 inç"
+
+#: ../src/common/paper.cpp:115
+msgid "11 x 17 in"
+msgstr "11 x 17 inç"
+
+#: ../src/common/paper.cpp:185
+msgid "12 x 11 in"
+msgstr "12 x 11 inç"
+
+#: ../src/common/paper.cpp:142
+msgid "15 x 11 in"
+msgstr "15 x 11 inç"
+
+#: ../src/richtext/richtextindentspage.cpp:285
+#: ../src/richtext/richtextliststylepage.cpp:459
+msgid "2"
+msgstr "2"
+
+#: ../src/common/paper.cpp:133
+msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in"
+msgstr "6 3/4 Zarf, 3 5/8 x 6 1/2 inç"
+
+#: ../src/common/paper.cpp:140
+msgid "9 x 11 in"
+msgstr "9 x 11 inç"
+
+#: ../src/html/htmprint.cpp:431
+msgid ": file does not exist!"
+msgstr ": dosya bulunamadı!"
+
+#: ../src/common/fontmap.cpp:199
+msgid ": unknown charset"
+msgstr ": bilinmeyen karakter kümesi"
+
+#: ../src/common/fontmap.cpp:413
+msgid ": unknown encoding"
+msgstr ": bilinmeyen kodlama"
+
+#: ../src/generic/wizard.cpp:437
+msgid "< &Back"
+msgstr "< &Geri"
+
+#: ../src/osx/carbon/fontdlg.cpp:608 ../src/osx/carbon/fontdlg.cpp:815
+#: ../src/osx/carbon/fontdlg.cpp:835
+msgid "<Any Decorative>"
+msgstr "<Süslü>"
+
+#: ../src/osx/carbon/fontdlg.cpp:609 ../src/osx/carbon/fontdlg.cpp:817
+#: ../src/osx/carbon/fontdlg.cpp:837
+msgid "<Any Modern>"
+msgstr "<Modern>"
+
+#: ../src/osx/carbon/fontdlg.cpp:607 ../src/osx/carbon/fontdlg.cpp:813
+#: ../src/osx/carbon/fontdlg.cpp:833
+msgid "<Any Roman>"
+msgstr "<Roman>"
+
+#: ../src/osx/carbon/fontdlg.cpp:610 ../src/osx/carbon/fontdlg.cpp:819
+#: ../src/osx/carbon/fontdlg.cpp:839
+msgid "<Any Script>"
+msgstr "<Betik>"
+
+#: ../src/osx/carbon/fontdlg.cpp:611 ../src/osx/carbon/fontdlg.cpp:824
+#: ../src/osx/carbon/fontdlg.cpp:843
+msgid "<Any Swiss>"
+msgstr "<İsveç>"
+
+#: ../src/osx/carbon/fontdlg.cpp:612 ../src/osx/carbon/fontdlg.cpp:821
+#: ../src/osx/carbon/fontdlg.cpp:841
+msgid "<Any Teletype>"
+msgstr "<Teletype>"
+
+#: ../src/osx/carbon/fontdlg.cpp:606
+msgid "<Any>"
+msgstr "<Herhangi>"
+
+#: ../src/generic/filectrlg.cpp:286 ../src/generic/filectrlg.cpp:309
+msgid "<DIR>"
+msgstr "<DIR>"
+
+#: ../src/generic/filectrlg.cpp:290 ../src/generic/filectrlg.cpp:313
+msgid "<DRIVE>"
+msgstr "<DRIVE>"
+
+#: ../src/generic/filectrlg.cpp:288 ../src/generic/filectrlg.cpp:311
+msgid "<LINK>"
+msgstr "<LINK>"
+
+#: ../src/html/helpwnd.cpp:1279
+msgid "<b><i>Bold italic face.</i></b><br>"
+msgstr "<b><i>Koyu yatık şekil.</i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1283
+msgid "<b><i>bold italic <u>underlined</u></i></b><br>"
+msgstr "<b><i>koyu yatık <u>altçizgili</u></i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1278
+msgid "<b>Bold face.</b> "
+msgstr "<b>Koyu şekil.</b> "
+
+#: ../src/html/helpwnd.cpp:1277
+msgid "<i>Italic face.</i> "
+msgstr "<i>Yatık şekil.</i> "
+
+#: ../src/richtext/richtextliststylepage.cpp:494
+#: ../src/richtext/richtextbulletspage.cpp:299
+msgid ">"
+msgstr ">"
+
+#: ../src/generic/dbgrptg.cpp:318
+msgid "A debug report has been generated in the directory\n"
+msgstr "Klasörde bir hata ayıklama raporu oluşturuldu\n"
+
+#: ../src/common/debugrpt.cpp:578
+msgid "A debug report has been generated. It can be found in"
+msgstr "Hata ayıklama raporu oluşturuldu. Şurada bulabilirsiniz:"
+
+#: ../src/common/xtixml.cpp:418
+msgid "A non empty collection must consist of 'element' nodes"
+msgstr "Boş olmayan bir yığın 'element' düğümlerinden oluşmalıdır"
+
+#: ../src/richtext/richtextliststylepage.cpp:304
+#: ../src/richtext/richtextliststylepage.cpp:306
+#: ../src/richtext/richtextbulletspage.cpp:257
+#: ../src/richtext/richtextbulletspage.cpp:259
+msgid "A standard bullet name."
+msgstr "Standart bir madde imi adı."
+
+#: ../src/common/paper.cpp:218
+msgid "A0 sheet, 841 x 1189 mm"
+msgstr "A0 sayfa, 841 x 1189 mm"
+
+#: ../src/common/paper.cpp:219
+msgid "A1 sheet, 594 x 841 mm"
+msgstr "A1 sayfa, 594 x 841 mm"
+
+#: ../src/common/paper.cpp:160
+msgid "A2 420 x 594 mm"
+msgstr "A2 420 x 594 mm"
+
+#: ../src/common/paper.cpp:157
+msgid "A3 Extra 322 x 445 mm"
+msgstr "A3 Ekstra 322 x 445 mm"
+
+#: ../src/common/paper.cpp:162
+msgid "A3 Extra Transverse 322 x 445 mm"
+msgstr "A3 Ekstra Enine 322 x 445 mm"
+
+#: ../src/common/paper.cpp:171
+msgid "A3 Rotated 420 x 297 mm"
+msgstr "A3 Çevrilmiş 420 x 297 mm"
+
+#: ../src/common/paper.cpp:161
+msgid "A3 Transverse 297 x 420 mm"
+msgstr "A3 Enine 297 x 420 mm"
+
+#: ../src/common/paper.cpp:107
+msgid "A3 sheet, 297 x 420 mm"
+msgstr "A3 sayfa, 297 x 420 mm"
+
+#: ../src/common/paper.cpp:147
+msgid "A4 Extra 9.27 x 12.69 in"
+msgstr "A4 Ekstra 9.27 x 12.69 inç"
+
+#: ../src/common/paper.cpp:154
+msgid "A4 Plus 210 x 330 mm"
+msgstr "A4 Artı 210 x 330 mm"
+
+#: ../src/common/paper.cpp:172
+msgid "A4 Rotated 297 x 210 mm"
+msgstr "A4 Çevrilmiş 297 x 210 mm"
+
+#: ../src/common/paper.cpp:149
+msgid "A4 Transverse 210 x 297 mm"
+msgstr "A4 Enine 210 x 297 mm"
+
+#: ../src/common/paper.cpp:98
+msgid "A4 sheet, 210 x 297 mm"
+msgstr "A4 sayfa, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:108
+msgid "A4 small sheet, 210 x 297 mm"
+msgstr "A4 küçük sayfa, 210 x 297 mm"
+
+#: ../src/common/paper.cpp:158
+msgid "A5 Extra 174 x 235 mm"
+msgstr "A5 Ekstra 174 x 235 mm"
+
+#: ../src/common/paper.cpp:173
+msgid "A5 Rotated 210 x 148 mm"
+msgstr "A5 Çevrilmiş 210 x 148 mm"
+
+#: ../src/common/paper.cpp:155
+msgid "A5 Transverse 148 x 210 mm"
+msgstr "A5 Enine 148 x 210 mm"
+
+#: ../src/common/paper.cpp:109
+msgid "A5 sheet, 148 x 210 mm"
+msgstr "A5 sayfa, 148 x 210 mm"
+
+#: ../src/common/paper.cpp:165
+msgid "A6 105 x 148 mm"
+msgstr "A6 105 x 148 mm"
+
+#: ../src/common/paper.cpp:178
+msgid "A6 Rotated 148 x 105 mm"
+msgstr "A6 Çevrilmiş 148 x 105 mm"
+
+#: ../src/generic/fontdlgg.cpp:83 ../src/richtext/richtextformatdlg.cpp:526
+#: ../src/osx/carbon/fontdlg.cpp:339
+msgid "ABCDEFGabcdefg12345"
+msgstr "ABCDEFGabcdefg12345"
+
+#: ../src/common/accelcmn.cpp:76
+msgid "ADD"
+msgstr "ADD"
+
+#: ../src/richtext/richtextsymboldlg.cpp:458 ../src/common/ftp.cpp:405
+msgid "ASCII"
+msgstr "ASCII"
+
+#: ../src/osx/menu_osx.cpp:630 ../src/common/stockitem.cpp:139
+msgid "About"
+msgstr "Hakkında"
+
+#: ../src/generic/aboutdlgg.cpp:140 ../src/msw/aboutdlg.cpp:64
+#, c-format
+msgid "About %s"
+msgstr "%s Hakkında "
+
+#: ../src/richtext/richtextsizepage.cpp:520
+msgid "Absolute"
+msgstr "Mutlak"
+
+#: ../src/common/stockitem.cpp:207
+msgid "Actual Size"
+msgstr "Geçerli Boyut"
+
+#: ../src/common/stockitem.cpp:140
+msgid "Add"
+msgstr "Ekleyin"
+
+#: ../src/richtext/richtextbuffer.cpp:10751
+msgid "Add Column"
+msgstr "Sütun Ekleyin"
+
+#: ../src/richtext/richtextbuffer.cpp:10688
+msgid "Add Row"
+msgstr "Satır Ekleyin"
+
+#: ../src/html/helpwnd.cpp:439
+msgid "Add current page to bookmarks"
+msgstr "Geçerli sayfayı yer imlerine ekleyin"
+
+#: ../src/generic/colrdlgg.cpp:283
+msgid "Add to custom colours"
+msgstr "Özel renklere ekleyin"
+
+#: ../include/wx/xtiprop.h:259
+msgid "AddToPropertyCollection called on a generic accessor"
+msgstr "AddToPropertyCollection işlevi, genel bir erişici üzerinden çağrıldı"
+
+#: ../include/wx/xtiprop.h:197
+msgid "AddToPropertyCollection called w/o valid adder"
+msgstr "AddToPropertyCollection işlevi, geçerli bir ekleyici olmadançağrıldı"
+
+#: ../src/html/helpctrl.cpp:159
+#, c-format
+msgid "Adding book %s"
+msgstr "%s kitabı ekleniyor"
+
+#: ../src/osx/carbon/dataview.cpp:1933
+msgid "Adding flavor TEXT failed"
+msgstr "TEXT niteliği eklenemedi"
+
+#: ../src/osx/carbon/dataview.cpp:1954
+msgid "Adding flavor utxt failed"
+msgstr "utxt niteliği eklenemedi"
+
+#: ../src/common/preferencescmn.cpp:41
+msgid "Advanced"
+msgstr "Gelişmiş"
+
+#: ../src/richtext/richtextliststylepage.cpp:435
+msgid "After a paragraph:"
+msgstr "Paragraftan sonra:"
+
+#: ../src/common/stockitem.cpp:172
+msgid "Align Left"
+msgstr "Sola Yaslansın"
+
+#: ../src/common/stockitem.cpp:173
+msgid "Align Right"
+msgstr "Sağa Yaslansın"
+
+#: ../src/richtext/richtextsizepage.cpp:266
+msgid "Alignment"
+msgstr "Hizalama"
+
+#: ../src/generic/prntdlgg.cpp:215
+msgid "All"
+msgstr "Tümü"
+
+#: ../src/generic/filectrlg.cpp:1205 ../src/common/fldlgcmn.cpp:89
+#, c-format
+msgid "All files (%s)|%s"
+msgstr "Tüm dosyalar (%s)|%s"
+
+#: ../include/wx/defs.h:2922
+msgid "All files (*)|*"
+msgstr "Tüm dosyalar (*)|*"
+
+#: ../include/wx/defs.h:2919
+msgid "All files (*.*)|*.*"
+msgstr "Tüm dosyalar (*.*)|*.*"
+
+#: ../src/richtext/richtextstyles.cpp:1057
+msgid "All styles"
+msgstr "Tüm stiller"
+
+#: ../src/propgrid/manager.cpp:1496
+msgid "Alphabetic Mode"
+msgstr "Alfabetik Kip"
+
+#: ../src/common/xtistrm.cpp:429
+msgid "Already Registered Object passed to SetObjectClassInfo"
+msgstr "SetObjectClassInfo işlevi zaten kaydedilmiş bir nesne ile çağrıldı"
+
+#: ../src/unix/dialup.cpp:353
+msgid "Already dialling ISP."
+msgstr "ISP zaten aranıyor."
+
+#: ../src/common/accelcmn.cpp:320 ../src/univ/themes/win32.cpp:3756
+msgid "Alt+"
+msgstr "Alt+"
+
+#: ../src/common/debugrpt.cpp:581
+msgid "And includes the following files:\n"
+msgstr "Ve aşağıdaki dosyaları içeriyor:\n"
+
+#: ../src/generic/animateg.cpp:162
+#, c-format
+msgid "Animation file is not of type %ld."
+msgstr "Canlandırma dosyası %ld tipinde değil."
+
+#: ../src/generic/logg.cpp:1034
+#, c-format
+msgid "Append log to file '%s' (choosing [No] will overwrite it)?"
+msgstr "'%s' günlük dosyasına eklensin ([Hayır] seçilirse üstüne yazılacak)."
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:610
+#: ../src/osx/menu_osx.cpp:649 ../src/osx/menu_osx.cpp:657
+msgid "Application"
+msgstr "Uygulama"
+
+#: ../src/common/stockitem.cpp:141
+msgid "Apply"
+msgstr "Uygulayın"
+
+#: ../src/richtext/richtextliststylepage.cpp:482
+#: ../src/richtext/richtextbulletspage.cpp:287
+msgid "Arabic"
+msgstr "Arapça"
+
+#: ../src/common/fmapbase.cpp:153
+msgid "Arabic (ISO-8859-6)"
+msgstr "Arapça (ISO-8859-6)"
+
+#: ../src/msw/ole/automtn.cpp:661
+#, c-format
+msgid "Argument %u not found."
+msgstr "%u argümanı bulunamadı."
+
+#: ../src/generic/aboutdlgg.cpp:184
+msgid "Artists"
+msgstr "Sanatçılar"
+
+#: ../src/common/stockitem.cpp:195
+msgid "Ascending"
+msgstr "Artan"
+
+#: ../src/generic/filectrlg.cpp:468
+msgid "Attributes"
+msgstr "Öznitelikler"
+
+#: ../src/richtext/richtextliststylepage.cpp:294
+#: ../src/richtext/richtextbulletspage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:247
+msgid "Available fonts."
+msgstr "Kullanılabilecek yazı tipleri."
+
+#: ../src/common/paper.cpp:138
+msgid "B4 (ISO) 250 x 353 mm"
+msgstr "B4 (ISO) 250 x 353 mm"
+
+#: ../src/common/paper.cpp:174
+msgid "B4 (JIS) Rotated 364 x 257 mm"
+msgstr "B4 (JIS) Çevrilmiş 364 x 257 mm"
+
+#: ../src/common/paper.cpp:128
+msgid "B4 Envelope, 250 x 353 mm"
+msgstr "B4 Zarf, 250 x 353 mm"
+
+#: ../src/common/paper.cpp:110
+msgid "B4 sheet, 250 x 354 mm"
+msgstr "B4 sayfa, 250 x 354 mm"
+
+#: ../src/common/paper.cpp:159
+msgid "B5 (ISO) Extra 201 x 276 mm"
+msgstr "B5 (ISO) Ekstra 201 x 276 mm"
+
+#: ../src/common/paper.cpp:175
+msgid "B5 (JIS) Rotated 257 x 182 mm"
+msgstr "B5 (JIS) Çevrilmiş 257 x 182 mm"
+
+#: ../src/common/paper.cpp:156
+msgid "B5 (JIS) Transverse 182 x 257 mm"
+msgstr "B5 (JIS) Enine 182 x 257 mm"
+
+#: ../src/common/paper.cpp:129
+msgid "B5 Envelope, 176 x 250 mm"
+msgstr "B5 Zarf, 176 x 250 mm"
+
+#: ../src/common/paper.cpp:111
+msgid "B5 sheet, 182 x 257 millimeter"
+msgstr "B5 sayfa, 182 x 257 mm"
+
+#: ../src/common/paper.cpp:183
+msgid "B6 (JIS) 128 x 182 mm"
+msgstr "B6 (JIS) 128 x 182 mm"
+
+#: ../src/common/paper.cpp:184
+msgid "B6 (JIS) Rotated 182 x 128 mm"
+msgstr "B6 (JIS) Çevrilmiş 182 x 128 mm"
+
+#: ../src/common/paper.cpp:130
+msgid "B6 Envelope, 176 x 125 mm"
+msgstr "B6 Zarf, 176 x 125 mm"
+
+#: ../src/common/accelcmn.cpp:49
+msgid "BACK"
+msgstr "BACK"
+
+#: ../src/common/imagbmp.cpp:523 ../src/common/imagbmp.cpp:553
+#: ../src/common/imagbmp.cpp:568
+msgid "BMP: Couldn't allocate memory."
+msgstr "BMP: bellek ayrılamadı."
+
+#: ../src/common/imagbmp.cpp:97
+msgid "BMP: Couldn't save invalid image."
+msgstr "BMP: Geçersiz görüntü kaydedilemedi."
+
+#: ../src/common/imagbmp.cpp:338
+msgid "BMP: Couldn't write RGB color map."
+msgstr "BMP: RGB renk haritası yazılamadı."
+
+#: ../src/common/imagbmp.cpp:473
+msgid "BMP: Couldn't write data."
+msgstr "BMP: Veri yazılamadı."
+
+#: ../src/common/imagbmp.cpp:239
+msgid "BMP: Couldn't write the file (Bitmap) header."
+msgstr "BMP: Dosya (Bitmap) başlık bilgisi yazılamadı."
+
+#: ../src/common/imagbmp.cpp:262
+msgid "BMP: Couldn't write the file (BitmapInfo) header."
+msgstr "BMP: Dosya (BitmapInfo) başlık bilgisi yazılamadı."
+
+#: ../src/common/imagbmp.cpp:133
+msgid "BMP: wxImage doesn't have own wxPalette."
+msgstr "BMP: wxImage için wxPalette yok."
+
+#: ../src/common/stockitem.cpp:142
+msgid "Back"
+msgstr "Geri"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:119
+#: ../src/richtext/richtextformatdlg.cpp:374
+msgid "Background"
+msgstr "Artalan"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:131
+msgid "Background &colour:"
+msgstr "Artalan &rengi:"
+
+#: ../src/osx/carbon/fontdlg.cpp:406
+msgid "Background colour"
+msgstr "Artalan rengi"
+
+#: ../src/common/fmapbase.cpp:160
+msgid "Baltic (ISO-8859-13)"
+msgstr "Baltık (ISO-8859-13)"
+
+#: ../src/common/fmapbase.cpp:151
+msgid "Baltic (old) (ISO-8859-4)"
+msgstr "Baltık (eski) (ISO-8859-4)"
+
+#: ../src/richtext/richtextliststylepage.cpp:426
+msgid "Before a paragraph:"
+msgstr "Paragraftan önce:"
+
+#: ../src/richtext/richtextliststylepage.cpp:489
+#: ../src/richtext/richtextbulletspage.cpp:294
+msgid "Bitmap"
+msgstr "Bitmap"
+
+#: ../src/osx/carbon/dataview.cpp:2396
+msgid "Bitmap renderer cannot render value; value type: "
+msgstr "Bitmap görüntüleyici değeri işleyemiyor; değer tipi:"
+
+#: ../src/generic/fontdlgg.cpp:333 ../src/richtext/richtextfontpage.cpp:337
+#: ../src/osx/carbon/fontdlg.cpp:540 ../src/common/stockitem.cpp:143
+msgid "Bold"
+msgstr "Kalın"
+
+#: ../src/richtext/richtextborderspage.cpp:256
+#: ../src/richtext/richtextborderspage.cpp:389
+msgid "Border"
+msgstr "Kenarlık"
+
+#: ../src/richtext/richtextformatdlg.cpp:368
+msgid "Borders"
+msgstr "Kenarlıklar"
+
+#: ../src/richtext/richtextsizepage.cpp:288 ../src/common/stockitem.cpp:144
+msgid "Bottom"
+msgstr "Alt"
+
+#: ../src/generic/prntdlgg.cpp:893
+msgid "Bottom margin (mm):"
+msgstr "Alt kenar boşluğu (mm):"
+
+#: ../src/richtext/richtextbuffer.cpp:8919
+msgid "Box Properties"
+msgstr "Kutu Özellikleri"
+
+#: ../src/richtext/richtextstyles.cpp:1061
+msgid "Box styles"
+msgstr "Kutu stilleri"
+
+#: ../src/common/filepickercmn.cpp:43 ../src/common/filepickercmn.cpp:44
+msgid "Browse"
+msgstr "Gözatın"
+
+#: ../src/richtext/richtextliststylepage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:195
+msgid "Bullet &Alignment:"
+msgstr "Madde İmi &Hizalaması:"
+
+#: ../src/richtext/richtextliststylepage.cpp:309
+msgid "Bullet style"
+msgstr "Madde imi stili"
+
+#: ../src/richtext/richtextformatdlg.cpp:342
+msgid "Bullets"
+msgstr "Madde imleri"
+
+#: ../src/common/paper.cpp:99
+msgid "C sheet, 17 x 22 in"
+msgstr "C sayfa, 17 x 22 inç"
+
+#: ../src/generic/logg.cpp:520
+msgid "C&lear"
+msgstr "T&emizleyin"
+
+#: ../src/generic/fontdlgg.cpp:406
+msgid "C&olour:"
+msgstr "&Renk:"
+
+#: ../src/common/paper.cpp:124
+msgid "C3 Envelope, 324 x 458 mm"
+msgstr "C3 Zarf, 324 x 458 mm"
+
+#: ../src/common/paper.cpp:125
+msgid "C4 Envelope, 229 x 324 mm"
+msgstr "C4 Zarf, 229 x 324 mm"
+
+#: ../src/common/paper.cpp:123
+msgid "C5 Envelope, 162 x 229 mm"
+msgstr "C5 Zarf, 162 x 229 mm"
+
+#: ../src/common/paper.cpp:126
+msgid "C6 Envelope, 114 x 162 mm"
+msgstr "C6 Zarf, 114 x 162 mm"
+
+#: ../src/common/paper.cpp:127
+msgid "C65 Envelope, 114 x 229 mm"
+msgstr "C65 Zarf, 114 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:66
+msgid "CANCEL"
+msgstr "CANCEL"
+
+#: ../src/common/accelcmn.cpp:70
+msgid "CAPITAL"
+msgstr "CAPITAL"
+
+#: ../src/common/stockitem.cpp:146
+msgid "CD-Rom"
+msgstr "CD-Rom"
+
+#: ../src/html/chm.cpp:815 ../src/html/chm.cpp:874
+msgid "CHM handler currently supports only local files!"
+msgstr "CHM işleyici şimdilik yalnız yerel dosyaları destekliyor!"
+
+#: ../src/common/accelcmn.cpp:67
+msgid "CLEAR"
+msgstr "CLEAR"
+
+#: ../src/common/accelcmn.cpp:111
+msgid "COMMAND"
+msgstr "COMMAND"
+
+#: ../src/richtext/richtextfontpage.cpp:291
+msgid "Ca&pitals"
+msgstr "&Büyük harfler"
+
+#: ../src/common/cmdproc.cpp:267
+msgid "Can't &Undo "
+msgstr "&Geri Alınamıyor"
+
+#: ../src/common/image.cpp:2686
+msgid "Can't automatically determine the image format for non-seekable input."
+msgstr "Aranamayan giriş için görsel biçimi kendiliğinden belirlenemiyor."
+
+#: ../src/msw/registry.cpp:505
+#, c-format
+msgid "Can't close registry key '%s'"
+msgstr "'%s' kayıt anahtarı kapatılamadı"
+
+#: ../src/msw/registry.cpp:583
+#, c-format
+msgid "Can't copy values of unsupported type %d."
+msgstr "Desteklenmeyen %d tipinin değerleri kopyalanamadı."
+
+#: ../src/msw/registry.cpp:486
+#, c-format
+msgid "Can't create registry key '%s'"
+msgstr "'%s' kayıt anahtarı oluşturulamadı"
+
+#: ../src/msw/thread.cpp:696 ../src/os2/thread.cpp:494
+msgid "Can't create thread"
+msgstr "İş parçacığı oluşturulamadı"
+
+#: ../src/msw/window.cpp:3793
+#, c-format
+msgid "Can't create window of class %s"
+msgstr "%s sınıfının penceresi oluşturulamadı"
+
+#: ../src/msw/registry.cpp:776
+#, c-format
+msgid "Can't delete key '%s'"
+msgstr "'%s' anahtarı silinemedi"
+
+#: ../src/msw/iniconf.cpp:458 ../src/os2/iniconf.cpp:471
+#, c-format
+msgid "Can't delete the INI file '%s'"
+msgstr "'%s' INI dosyası silinemedi"
+
+#: ../src/msw/registry.cpp:804
+#, c-format
+msgid "Can't delete value '%s' from key '%s'"
+msgstr "'%s' değeri '%s' anahtarından silinemiyor"
+
+#: ../src/msw/registry.cpp:1161
+#, c-format
+msgid "Can't enumerate subkeys of key '%s'"
+msgstr "'%s' anahtarının altanahtarları sayılamadı"
+
+#: ../src/msw/registry.cpp:1116
+#, c-format
+msgid "Can't enumerate values of key '%s'"
+msgstr "'%s' anahtarının değerleri sayılamadı"
+
+#: ../src/msw/registry.cpp:1379
+#, c-format
+msgid "Can't export value of unsupported type %d."
+msgstr "Desteklenmeyen %d tipinin değeri verilemedi."
+
+#: ../src/common/ffile.cpp:236
+#, c-format
+msgid "Can't find current position in file '%s'"
+msgstr "'%s' dosyasındaki geçerli konum bulunamadı"
+
+#: ../src/msw/registry.cpp:416
+#, c-format
+msgid "Can't get info about registry key '%s'"
+msgstr "'%s' kayıt anahtarı hakkında bilgi alınamadı"
+
+#: ../src/common/zstream.cpp:346
+msgid "Can't initialize zlib deflate stream."
+msgstr "Zlib sıkıştırma akışı başlatılamadı."
+
+#: ../src/common/zstream.cpp:185
+msgid "Can't initialize zlib inflate stream."
+msgstr "Zlib ayıklama akışı başlatılamadı."
+
+#: ../src/msw/fswatcher.cpp:432
+#, c-format
+msgid "Can't monitor non-existent directory \"%s\" for changes."
+msgstr "\"%s\" klasörü bulunamadığından değişiklikleri izlenemiyor."
+
+#: ../src/msw/registry.cpp:452
+#, c-format
+msgid "Can't open registry key '%s'"
+msgstr "'%s' kayıt anahtarı açılamadı"
+
+#: ../src/common/zstream.cpp:252
+#, c-format
+msgid "Can't read from inflate stream: %s"
+msgstr "Ayıklama akışı okunamadı: %s"
+
+#: ../src/common/zstream.cpp:244
+msgid "Can't read inflate stream: unexpected EOF in underlying stream."
+msgstr "Ayıklama akışı okunamadı: alt akışıta beklenmeyen dosya sonu."
+
+#: ../src/msw/registry.cpp:1048
+#, c-format
+msgid "Can't read value of '%s'"
+msgstr "'%s'' değeri okunamadı"
+
+#: ../src/msw/registry.cpp:877 ../src/msw/registry.cpp:909
+#: ../src/msw/registry.cpp:971
+#, c-format
+msgid "Can't read value of key '%s'"
+msgstr "'%s' anahtarının değeri okunamadı"
+
+#: ../src/common/image.cpp:2483
+#, c-format
+msgid "Can't save image to file '%s': unknown extension."
+msgstr "Görüntü '%s' dosyasına kaydedilemedi: bilinmeyen uzantı."
+
+#: ../src/generic/logg.cpp:579 ../src/generic/logg.cpp:996
+msgid "Can't save log contents to file."
+msgstr "Günlük içeriği dosyaya kaydedilemedi."
+
+#: ../src/msw/thread.cpp:652 ../src/os2/thread.cpp:477
+msgid "Can't set thread priority"
+msgstr "İş parçacığının önceliği ayarlanamadı"
+
+#: ../src/msw/registry.cpp:895 ../src/msw/registry.cpp:939
+#: ../src/msw/registry.cpp:1065
+#, c-format
+msgid "Can't set value of '%s'"
+msgstr "'%s' değeri değiştirilemedi"
+
+#: ../src/unix/utilsunx.cpp:357
+msgid "Can't write to child process's stdin"
+msgstr "Alt işlem stdin yazılamadı"
+
+#: ../src/common/zstream.cpp:427
+#, c-format
+msgid "Can't write to deflate stream: %s"
+msgstr "Sıkıştırma akışına yazılamadı: %s"
+
+#: ../include/wx/msgdlg.h:274 ../src/generic/dirdlgg.cpp:107
+#: ../src/richtext/richtextstyledlg.cpp:300 ../src/common/stockitem.cpp:145
+#: ../src/msw/msgdlg.cpp:489 ../src/msw/progdlg.cpp:673
+#: ../src/gtk1/fontdlg.cpp:144 ../src/motif/msgdlg.cpp:196
+msgid "Cancel"
+msgstr "İptal"
+
+#: ../src/os2/thread.cpp:116
+msgid "Cannot create mutex."
+msgstr "Muteks oluşturulamadı."
+
+#: ../src/osx/carbon/dataview.cpp:895
+msgid "Cannot create new column's ID. Probably max. number of columns reached."
+msgstr ""
+"Yeni sütunun kodu oluşturulamadı. En fazla sütun sayısına ulaşılmış olabilir."
+
+#: ../src/common/filefn.cpp:1336
+#, c-format
+msgid "Cannot enumerate files '%s'"
+msgstr "'%s' dosyaları sayılamadı"
+
+#: ../src/msw/dir.cpp:264
+#, c-format
+msgid "Cannot enumerate files in directory '%s'"
+msgstr "'%s' klasöründeki dosyalar sayılamadı"
+
+#: ../src/msw/dialup.cpp:542
+#, c-format
+msgid "Cannot find active dialup connection: %s"
+msgstr "Etkin çevirmeli bağlantı bulunamadı: %s"
+
+#: ../src/msw/dialup.cpp:848
+msgid "Cannot find the location of address book file"
+msgstr "Adres defteri dosyasının yeri bulunamadı"
+
+#: ../src/msw/ole/automtn.cpp:562
+#, c-format
+msgid "Cannot get an active instance of \"%s\""
+msgstr "Çalışan bir \"%s\" kopyası bulunamadı"
+
+#: ../src/unix/threadpsx.cpp:1030
+#, c-format
+msgid "Cannot get priority range for scheduling policy %d."
+msgstr "Zamanlama ilkesi %d için öncelik aralığı alınamadı."
+
+#: ../src/unix/utilsunx.cpp:988
+msgid "Cannot get the hostname"
+msgstr "Sunucu adı alınamadı"
+
+#: ../src/unix/utilsunx.cpp:1024
+msgid "Cannot get the official hostname"
+msgstr "Resmi sunucu adı alınamadı"
+
+#: ../src/msw/dialup.cpp:949
+msgid "Cannot hang up - no active dialup connection."
+msgstr "Kapatılamadı - etkin çevirmeli bağlantı yok."
+
+#: ../include/wx/msw/ole/oleutils.h:52
+msgid "Cannot initialize OLE"
+msgstr "OLE başlatılamadı"
+
+#: ../src/common/socket.cpp:847
+msgid "Cannot initialize sockets"
+msgstr "Soketler başlatılamadı"
+
+#: ../src/msw/volume.cpp:620
+#, c-format
+msgid "Cannot load icon from '%s'."
+msgstr "'%s' içinden simge yüklenemedi."
+
+#: ../src/xrc/xmlres.cpp:361
+#, c-format
+msgid "Cannot load resources from '%s'."
+msgstr "Kaynaklar '%s' dosyasından yüklenemedi."
+
+#: ../src/xrc/xmlres.cpp:746
+#, c-format
+msgid "Cannot load resources from file '%s'."
+msgstr "Kaynaklar '%s' dosyasından yüklenemedi."
+
+#: ../src/html/htmlfilt.cpp:137
+#, c-format
+msgid "Cannot open HTML document: %s"
+msgstr "%s HTML belgesi açılamadı"
+
+#: ../src/html/helpdata.cpp:665
+#, c-format
+msgid "Cannot open HTML help book: %s"
+msgstr "%s HTML yardım kitabı açılamadı"
+
+#: ../src/html/helpdata.cpp:297
+#, c-format
+msgid "Cannot open contents file: %s"
+msgstr "%s içerik dosyası açılamadı"
+
+#: ../src/generic/dcpsg.cpp:1751
+msgid "Cannot open file for PostScript printing!"
+msgstr "Dosya PostScript yazdırma için açılamadı!"
+
+#: ../src/html/helpdata.cpp:311
+#, c-format
+msgid "Cannot open index file: %s"
+msgstr "%s dizin dosyası açılamadı."
+
+#: ../src/xrc/xmlres.cpp:728
+#, c-format
+msgid "Cannot open resources file '%s'."
+msgstr "'%s' kaynak dosyası açılamadı."
+
+#: ../src/html/helpwnd.cpp:1537
+msgid "Cannot print empty page."
+msgstr "Boş sayfa basılamaz."
+
+#: ../src/msw/volume.cpp:507
+#, c-format
+msgid "Cannot read typename from '%s'!"
+msgstr "'%s' içinden tip adı okunamadı."
+
+#: ../src/os2/thread.cpp:527
+#, c-format
+msgid "Cannot resume thread %lu"
+msgstr "%lu iş parçacığı sürdürülemiyor"
+
+#: ../src/msw/thread.cpp:923
+#, c-format
+msgid "Cannot resume thread %lx"
+msgstr "%lx iş parçacığı sürdürülemiyor"
+
+#: ../src/unix/threadpsx.cpp:1011
+msgid "Cannot retrieve thread scheduling policy."
+msgstr "İş parçacığı zamanlama ilkesi alınamadı."
+
+#: ../src/common/intl.cpp:542
+#, c-format
+msgid "Cannot set locale to language \"%s\"."
+msgstr "Yerel ayarlar \"%s\" diline çevrilemedi."
+
+#: ../src/unix/threadpsx.cpp:831 ../src/msw/thread.cpp:569
+msgid "Cannot start thread: error writing TLS."
+msgstr "İş parçacığı başlatılamadı: TLS yazma hatası."
+
+#: ../src/os2/thread.cpp:513
+#, c-format
+msgid "Cannot suspend thread %lu"
+msgstr "%lu iş parçacığı beklemeye alınamadı"
+
+#: ../src/msw/thread.cpp:907
+#, c-format
+msgid "Cannot suspend thread %lx"
+msgstr "%lx iş parçacığı beklemeye alınamadı"
+
+#: ../src/msw/thread.cpp:830
+msgid "Cannot wait for thread termination"
+msgstr "İş parçacığının sonlanması beklenemiyor"
+
+#: ../src/html/helpwnd.cpp:546
+msgid "Case sensitive"
+msgstr "Büyük küçük harfe duyarlı"
+
+#: ../src/propgrid/manager.cpp:1495
+msgid "Categorized Mode"
+msgstr "Kategorize Kip"
+
+#: ../src/richtext/richtextbuffer.cpp:9347
+msgid "Cell Properties"
+msgstr "Hücre Özellikleri"
+
+#: ../src/common/fmapbase.cpp:161
+msgid "Celtic (ISO-8859-14)"
+msgstr "Keltçe (ISO-8859-14)"
+
+#: ../src/richtext/richtextindentspage.cpp:160
+#: ../src/richtext/richtextliststylepage.cpp:349
+msgid "Cen&tred"
+msgstr "Or&talanmış"
+
+#: ../src/common/stockitem.cpp:170
+msgid "Centered"
+msgstr "Ortalanmış"
+
+#: ../src/common/fmapbase.cpp:149
+msgid "Central European (ISO-8859-2)"
+msgstr "Orta Avrupa (ISO-8859-2)"
+
+#: ../src/richtext/richtextliststylepage.cpp:250
+#: ../src/richtext/richtextbulletspage.cpp:200
+msgid "Centre"
+msgstr "Orta"
+
+#: ../src/richtext/richtextindentspage.cpp:162
+#: ../src/richtext/richtextindentspage.cpp:164
+#: ../src/richtext/richtextliststylepage.cpp:351
+#: ../src/richtext/richtextliststylepage.cpp:353
+msgid "Centre text."
+msgstr "Metni ortalayın."
+
+#: ../src/richtext/richtextsizepage.cpp:287
+msgid "Centred"
+msgstr "Ortalanmış"
+
+#: ../src/richtext/richtextliststylepage.cpp:280
+#: ../src/richtext/richtextbulletspage.cpp:232
+msgid "Ch&oose..."
+msgstr "S&eçin..."
+
+#: ../src/richtext/richtextbuffer.cpp:4041
+msgid "Change List Style"
+msgstr "Liste Stilini Değiştirin"
+
+#: ../src/richtext/richtextbuffer.cpp:3392
+msgid "Change Object Style"
+msgstr "Nesne Stilini Değiştirin"
+
+#: ../src/richtext/richtextbuffer.cpp:3658
+#: ../src/richtext/richtextbuffer.cpp:7749
+msgid "Change Properties"
+msgstr "Özellikleri Değiştirin"
+
+#: ../src/richtext/richtextbuffer.cpp:3209
+msgid "Change Style"
+msgstr "Stili Değiştirin"
+
+#: ../src/common/fileconf.cpp:372
+#, c-format
+msgid "Changes won't be saved to avoid overwriting the existing file \"%s\""
+msgstr ""
+"Varolan \"%s\" dosyasının üstüne yazılmasını önlemek için değişiklikler "
+"kaydedilmeyecek."
+
+#: ../src/richtext/richtextstyles.cpp:1059
+msgid "Character styles"
+msgstr "Karakter stilleri"
+
+#: ../src/richtext/richtextliststylepage.cpp:224
+#: ../src/richtext/richtextliststylepage.cpp:226
+#: ../src/richtext/richtextbulletspage.cpp:174
+#: ../src/richtext/richtextbulletspage.cpp:176
+msgid "Check to add a period after the bullet."
+msgstr "Madde iminin ardına nokta eklenmesi için işaretleyin."
+
+#: ../src/richtext/richtextliststylepage.cpp:238
+#: ../src/richtext/richtextliststylepage.cpp:240
+#: ../src/richtext/richtextbulletspage.cpp:188
+#: ../src/richtext/richtextbulletspage.cpp:190
+msgid "Check to add a right parenthesis."
+msgstr "Sağa bir parantez eklemek için işaretleyin."
+
+#: ../src/richtext/richtextliststylepage.cpp:231
+#: ../src/richtext/richtextliststylepage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:181
+#: ../src/richtext/richtextbulletspage.cpp:183
+msgid "Check to enclose the bullet in parentheses."
+msgstr "Madde imini parantez içine almak için işaretleyin."
+
+#: ../src/osx/carbon/fontdlg.cpp:542 ../src/osx/carbon/fontdlg.cpp:544
+msgid "Check to make the font bold."
+msgstr "Koyu yazı tipi için işaretleyin."
+
+#: ../src/osx/carbon/fontdlg.cpp:549 ../src/osx/carbon/fontdlg.cpp:551
+msgid "Check to make the font italic."
+msgstr "Yatık yazı tipi için işaretleyin."
+
+#: ../src/osx/carbon/fontdlg.cpp:558 ../src/osx/carbon/fontdlg.cpp:560
+msgid "Check to make the font underlined."
+msgstr "Altı çizili yazı tipi için işaretleyin."
+
+#: ../src/richtext/richtextstyledlg.cpp:289
+#: ../src/richtext/richtextstyledlg.cpp:291
+msgid "Check to restart numbering."
+msgstr "Yeniden numaralandırmak için işaretleyin."
+
+#: ../src/richtext/richtextfontpage.cpp:286
+#: ../src/richtext/richtextfontpage.cpp:288
+msgid "Check to show a line through the text."
+msgstr "Metnin üzerini çizmek için işaretleyin."
+
+#: ../src/richtext/richtextfontpage.cpp:293
+#: ../src/richtext/richtextfontpage.cpp:295
+msgid "Check to show the text in capitals."
+msgstr "Metni büyük harfe dönüştürmek için işaretleyin."
+
+#: ../src/richtext/richtextfontpage.cpp:300
+#: ../src/richtext/richtextfontpage.cpp:302
+msgid "Check to show the text in small capitals."
+msgstr "Metni küçük harfe dönüştürmek için işaretleyin."
+
+#: ../src/richtext/richtextfontpage.cpp:314
+#: ../src/richtext/richtextfontpage.cpp:316
+msgid "Check to show the text in subscript."
+msgstr "Metni altyazıya dönüştürmek için işaretleyin."
+
+#: ../src/richtext/richtextfontpage.cpp:307
+#: ../src/richtext/richtextfontpage.cpp:309
+msgid "Check to show the text in superscript."
+msgstr "Metni üst yazıya dönüştürmek için işaretleyin."
+
+#: ../src/msw/dialup.cpp:784
+msgid "Choose ISP to dial"
+msgstr "Aranacak servis sağlayıcıyı seçin"
+
+#: ../src/propgrid/props.cpp:1643
+msgid "Choose a directory:"
+msgstr "Bir klasör seçin:"
+
+#: ../src/propgrid/props.cpp:1702
+msgid "Choose a file"
+msgstr "Bir dosya seçin"
+
+#: ../src/generic/colrdlgg.cpp:144 ../src/gtk/colordlg.cpp:63
+msgid "Choose colour"
+msgstr "Renk seçin"
+
+#: ../src/generic/fontpickerg.cpp:50 ../src/gtk/fontdlg.cpp:75
+#: ../src/gtk1/fontdlg.cpp:125
+msgid "Choose font"
+msgstr "Yazı tipi seçin"
+
+#: ../src/common/module.cpp:74
+#, c-format
+msgid "Circular dependency involving module \"%s\" detected."
+msgstr "\"%s\" modülü ile döngüsel bağlılık algılandı."
+
+#: ../src/aui/tabmdi.cpp:108 ../src/generic/mdig.cpp:97
+msgid "Cl&ose"
+msgstr "Kapa&tın"
+
+#: ../src/msw/ole/automtn.cpp:673
+msgid "Class not registered."
+msgstr "Sınıf kaydedilmemiş."
+
+#: ../src/common/stockitem.cpp:147
+msgid "Clear"
+msgstr "Temizleyin"
+
+#: ../src/generic/logg.cpp:520
+msgid "Clear the log contents"
+msgstr "Günlük içeriğini temizleyin"
+
+#: ../src/richtext/richtextstyledlg.cpp:252
+#: ../src/richtext/richtextstyledlg.cpp:254
+msgid "Click to apply the selected style."
+msgstr "Seçili stili uygulamak için tıklayın."
+
+#: ../src/richtext/richtextliststylepage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:283
+#: ../src/richtext/richtextbulletspage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:235
+msgid "Click to browse for a symbol."
+msgstr "Bir simge seçmek için tıklayın."
+
+#: ../src/osx/carbon/fontdlg.cpp:589 ../src/osx/carbon/fontdlg.cpp:591
+msgid "Click to cancel changes to the font."
+msgstr "Yazı tipi değişikliklerinden vazgeçmek için tıklayın."
+
+#: ../src/generic/fontdlgg.cpp:472 ../src/generic/fontdlgg.cpp:491
+msgid "Click to cancel the font selection."
+msgstr "Yazı tipi seçiminden vazgeçmek için tıklayın."
+
+#: ../src/osx/carbon/fontdlg.cpp:570 ../src/osx/carbon/fontdlg.cpp:572
+msgid "Click to change the font colour."
+msgstr "Metin rengini değiştirmek için tıklayın."
+
+#: ../src/richtext/richtextfontpage.cpp:276
+#: ../src/richtext/richtextfontpage.cpp:278
+msgid "Click to change the text background colour."
+msgstr "Metin artalan rengini değiştirmek için tıklayın."
+
+#: ../src/richtext/richtextfontpage.cpp:263
+#: ../src/richtext/richtextfontpage.cpp:265
+msgid "Click to change the text colour."
+msgstr "Metin rengini değiştirmek için tıklayın."
+
+#: ../src/richtext/richtextliststylepage.cpp:195
+#: ../src/richtext/richtextliststylepage.cpp:197
+msgid "Click to choose the font for this level."
+msgstr "Bu düzeyin yazı tipini seçmek için tıklayın."
+
+#: ../src/richtext/richtextstyledlg.cpp:279
+#: ../src/richtext/richtextstyledlg.cpp:281
+msgid "Click to close this window."
+msgstr "Pencereyi kapatmak için tıklayın."
+
+#: ../src/osx/carbon/fontdlg.cpp:596 ../src/osx/carbon/fontdlg.cpp:598
+msgid "Click to confirm changes to the font."
+msgstr "Yazı tipindeki değişiklikleri onaylamak için tıklayın."
+
+#: ../src/generic/fontdlgg.cpp:477 ../src/generic/fontdlgg.cpp:479
+#: ../src/generic/fontdlgg.cpp:484 ../src/generic/fontdlgg.cpp:486
+msgid "Click to confirm the font selection."
+msgstr "Yazı tipi seçimini onaylamak için tıklayın."
+
+#: ../src/richtext/richtextstyledlg.cpp:244
+#: ../src/richtext/richtextstyledlg.cpp:246
+msgid "Click to create a new box style."
+msgstr "Yeni bir kutu stili oluşturmak için tıklayın."
+
+#: ../src/richtext/richtextstyledlg.cpp:226
+#: ../src/richtext/richtextstyledlg.cpp:228
+msgid "Click to create a new character style."
+msgstr "Yeni bir karakter stili oluşturmak için tıklayın."
+
+#: ../src/richtext/richtextstyledlg.cpp:238
+#: ../src/richtext/richtextstyledlg.cpp:240
+msgid "Click to create a new list style."
+msgstr "Yeni bir liste stili oluşturmak için tıklayın."
+
+#: ../src/richtext/richtextstyledlg.cpp:232
+#: ../src/richtext/richtextstyledlg.cpp:234
+msgid "Click to create a new paragraph style."
+msgstr "Yeni bir paragraf stili oluşturmak için tıklayın."
+
+#: ../src/richtext/richtexttabspage.cpp:137
+#: ../src/richtext/richtexttabspage.cpp:139
+msgid "Click to create a new tab position."
+msgstr "Yeni bir sekme konumu oluşturmak için tıklayın."
+
+#: ../src/richtext/richtexttabspage.cpp:149
+#: ../src/richtext/richtexttabspage.cpp:151
+msgid "Click to delete all tab positions."
+msgstr "Tüm sekme konumlarını silmek için tıklayın."
+
+#: ../src/richtext/richtextstyledlg.cpp:270
+#: ../src/richtext/richtextstyledlg.cpp:272
+msgid "Click to delete the selected style."
+msgstr "Seçili stili silmek için tıklayın."
+
+#: ../src/richtext/richtexttabspage.cpp:143
+#: ../src/richtext/richtexttabspage.cpp:145
+msgid "Click to delete the selected tab position."
+msgstr "Seçili sekme konumunu silmek için tıklayın."
+
+#: ../src/richtext/richtextstyledlg.cpp:264
+#: ../src/richtext/richtextstyledlg.cpp:266
+msgid "Click to edit the selected style."
+msgstr "Seçili stili düzenlemek için tıklayın."
+
+#: ../src/richtext/richtextstyledlg.cpp:258
+#: ../src/richtext/richtextstyledlg.cpp:260
+msgid "Click to rename the selected style."
+msgstr "Seçili stili yeniden adlandırmak için tıklayın."
+
+#: ../src/generic/dbgrptg.cpp:97 ../src/generic/progdlgg.cpp:804
+#: ../src/generic/progdlgg.cpp:809 ../src/richtext/richtextstyledlg.cpp:277
+#: ../src/richtext/richtextsymboldlg.cpp:476 ../src/common/stockitem.cpp:148
+#: ../src/msw/progdlg.cpp:170 ../src/msw/progdlg.cpp:679
+#: ../src/html/helpdlg.cpp:90
+msgid "Close"
+msgstr "Kapatın"
+
+#: ../src/aui/tabmdi.cpp:109 ../src/generic/mdig.cpp:98
+msgid "Close All"
+msgstr "Tümünü Kapatın"
+
+#: ../src/common/stockitem.cpp:266
+msgid "Close current document"
+msgstr "Geçerli belgeyi kapatın"
+
+#: ../src/generic/logg.cpp:522
+msgid "Close this window"
+msgstr "Bu pencereyi kapatın"
+
+#: ../src/common/stockitem.cpp:193
+msgid "Color"
+msgstr "Renk"
+
+#: ../src/richtext/richtextformatdlg.cpp:725
+msgid "Colour"
+msgstr "Renk"
+
+#: ../src/msw/colordlg.cpp:156
+#, c-format
+msgid "Colour selection dialog failed with error %0lx."
+msgstr "Renk seçimi diyaloğu %0lx hatasıyla sonlandı."
+
+#: ../src/osx/carbon/fontdlg.cpp:566
+msgid "Colour:"
+msgstr "Renk:"
+
+#: ../src/osx/carbon/dataview.cpp:900
+msgid "Column could not be added."
+msgstr "Sütun eklenemedi."
+
+#: ../src/osx/carbon/dataview.cpp:899
+msgid "Column description could not be initialized."
+msgstr "Sütun tanımı yüklenemedi."
+
+#: ../src/osx/carbon/dataview.cpp:1538 ../src/osx/carbon/dataview.cpp:1559
+msgid "Column index not found."
+msgstr "Sütun dizini bulunamadı."
+
+#: ../src/osx/carbon/dataview.cpp:1614
+msgid "Column width could not be determined"
+msgstr "Sütun genişliği belirlenemedi."
+
+#: ../src/osx/carbon/dataview.cpp:901
+msgid "Column width could not be set."
+msgstr "Sütun genişliği ayarlanamadı."
+
+#: ../src/common/init.cpp:188
+#, c-format
+msgid ""
+"Command line argument %d couldn't be converted to Unicode and will be "
+"ignored."
+msgstr "%d komut satırı değişkeni Unikoda çevrilemediğinden yoksayılacak."
+
+#: ../src/msw/fontdlg.cpp:119
+#, c-format
+msgid "Common dialog failed with error code %0lx."
+msgstr "Ortak diyalog %0lx hata koduyla sonlandı."
+
+#: ../src/gtk/window.cpp:4306
+msgid ""
+"Compositing not supported by this system, please enable it in your Window "
+"Manager."
+msgstr ""
+"Sistmein birleştirme (compositing) desteği etkin değil. Lütfen Pencere "
+"Yöneticinizden etkinleştirin."
+
+#: ../src/html/helpwnd.cpp:1554
+msgid "Compressed HTML Help file (*.chm)|*.chm|"
+msgstr "Sıkıştırılmış HTML Yardım dosyası (*.chm)|*.chm|"
+
+#: ../src/generic/dirctrlg.cpp:544
+msgid "Computer"
+msgstr "Bilgisayarım"
+
+#: ../src/common/fileconf.cpp:965
+#, c-format
+msgid "Config entry name cannot start with '%c'."
+msgstr "Ayar kaydının adı '%c' ile başlayamaz."
+
+#: ../src/gtk/filedlg.cpp:59
+msgid "Confirm"
+msgstr "Onaylayın"
+
+#: ../src/msw/mimetype.cpp:739
+msgid "Confirm registry update"
+msgstr "Kayıt değişikligini onaylayın"
+
+#: ../src/html/htmlwin.cpp:544
+msgid "Connecting..."
+msgstr "Bağlanılıyor..."
+
+#: ../src/html/helpwnd.cpp:482
+msgid "Contents"
+msgstr "İçerik"
+
+#: ../src/common/strconv.cpp:2261
+#, c-format
+msgid "Conversion to charset '%s' doesn't work."
+msgstr "'%s' karakter kümesine dönüşüm çalışmıyor."
+
+#: ../src/common/stockitem.cpp:149
+msgid "Convert"
+msgstr "Dönüştürün"
+
+#: ../src/html/htmlwin.cpp:1057
+#, c-format
+msgid "Copied to clipboard:\"%s\""
+msgstr "\"%s\" panoya kopyalandı."
+
+#: ../src/generic/prntdlgg.cpp:247
+msgid "Copies:"
+msgstr "Kopya sayısı:"
+
+#: ../src/common/stockitem.cpp:150 ../src/stc/stc_i18n.cpp:18
+msgid "Copy"
+msgstr "Kopyalayın"
+
+#: ../src/common/stockitem.cpp:258
+msgid "Copy selection"
+msgstr "Seçimi kopyalayın"
+
+#: ../src/html/chm.cpp:718
+#, c-format
+msgid "Could not create temporary file '%s'"
+msgstr "'%s' geçici dosyası oluşturulamadı."
+
+#: ../src/osx/carbon/dataview.cpp:1285 ../src/osx/carbon/dataview.cpp:1672
+msgid "Could not determine column index."
+msgstr "Sütun dizini belirlenemedi."
+
+#: ../src/osx/carbon/dataview.cpp:876
+msgid "Could not determine column's position"
+msgstr "Sütunun konumu belirlenemedi."
+
+#: ../src/osx/carbon/dataview.cpp:843
+msgid "Could not determine number of columns."
+msgstr "Sütun sayısı belirlenemedi."
+
+#: ../src/osx/carbon/dataview.cpp:975
+msgid "Could not determine number of items"
+msgstr "Öge sayısı belirlenemedi."
+
+#: ../src/html/chm.cpp:273
+#, c-format
+msgid "Could not extract %s into %s: %s"
+msgstr "%s %s içine ayıklanamadı: %s"
+
+#: ../src/generic/tabg.cpp:1048
+msgid "Could not find tab for id"
+msgstr "Kodun sekmesi bulunamadı."
+
+#: ../src/osx/carbon/dataview.cpp:2556 ../src/osx/carbon/dataview.cpp:2591
+#: ../src/osx/carbon/dataview.cpp:2615 ../src/osx/carbon/dataview.cpp:2636
+#: ../src/osx/carbon/dataview.cpp:2773
+msgid "Could not get header description."
+msgstr "Başlık bilgisi tanımı alınamadı."
+
+#: ../src/osx/carbon/dataview.cpp:1169 ../src/osx/carbon/dataview.cpp:1195
+msgid "Could not get items."
+msgstr "Ögeler alınamadı."
+
+#: ../src/osx/carbon/dataview.cpp:2659 ../src/osx/carbon/dataview.cpp:2724
+msgid "Could not get property flags."
+msgstr "Özellik işaretleri alınamadı."
+
+#: ../src/osx/carbon/dataview.cpp:726
+msgid "Could not get selected items."
+msgstr "Seçili ögeler alınamadı."
+
+#: ../src/html/chm.cpp:444
+#, c-format
+msgid "Could not locate file '%s'."
+msgstr "'%s' dosyası bulunamadı."
+
+#: ../src/osx/carbon/dataview.cpp:845
+msgid "Could not remove column."
+msgstr "Sütun kaldırılamadı."
+
+#: ../src/osx/carbon/dataview.cpp:642
+msgid "Could not retrieve number of items"
+msgstr "Öge sayısı alınamadı."
+
+#: ../src/osx/carbon/dataview.cpp:2572
+msgid "Could not set alignment."
+msgstr "Hizalama ayarlanamadı."
+
+#: ../src/osx/carbon/dataview.cpp:2803
+msgid "Could not set column width."
+msgstr "Sütun genişliği ayarlanamadı."
+
+#: ../src/common/filefn.cpp:1569
+msgid "Could not set current working directory"
+msgstr "Geçerli çalışma klasörü ayarlanamadı."
+
+#: ../src/osx/carbon/dataview.cpp:2775
+msgid "Could not set header description."
+msgstr "Başlık bilgisi açıklaması ayarlanamadı."
+
+#: ../src/osx/carbon/dataview.cpp:2596
+msgid "Could not set icon."
+msgstr "Simge ayarlanamadı."
+
+#: ../src/osx/carbon/dataview.cpp:2617
+msgid "Could not set maximum width."
+msgstr "En fazla genişlik ayarlanamadı."
+
+#: ../src/osx/carbon/dataview.cpp:2638
+msgid "Could not set minimum width."
+msgstr "En az genişlik ayarlanamadı."
+
+#: ../src/osx/carbon/dataview.cpp:2664 ../src/osx/carbon/dataview.cpp:2729
+msgid "Could not set property flags."
+msgstr "Özellik işaretleri ayarlanamadı."
+
+#: ../src/common/prntbase.cpp:1985
+msgid "Could not start document preview."
+msgstr "Belge önizlemesi başlatılamadı."
+
+#: ../src/generic/printps.cpp:178 ../src/msw/printwin.cpp:210
+#: ../src/gtk/print.cpp:1077
+msgid "Could not start printing."
+msgstr "Yazdırma başlatılamadı."
+
+#: ../src/common/wincmn.cpp:2131
+msgid "Could not transfer data to window"
+msgstr "Veri pencereye aktarılamadı."
+
+#: ../src/os2/thread.cpp:160
+msgid "Couldn't acquire a mutex lock"
+msgstr "Mutex kilidi alınamadı."
+
+#: ../src/msw/imaglist.cpp:166 ../src/msw/imaglist.cpp:197
+#: ../src/msw/imaglist.cpp:209 ../src/msw/dragimag.cpp:193
+#: ../src/msw/dragimag.cpp:232
+msgid "Couldn't add an image to the image list."
+msgstr "Görsel listesine bir görsel eklenemedi."
+
+#: ../src/msw/timer.cpp:134 ../src/os2/timer.cpp:113
+msgid "Couldn't create a timer"
+msgstr "Bir zamanlayıcı oluşturulamadı."
+
+#: ../src/osx/carbon/overlay.cpp:122
+msgid "Couldn't create the overlay window"
+msgstr "Örtüşme penceresi oluşturulamadı."
+
+#: ../src/common/translation.cpp:2015
+msgid "Couldn't enumerate translations"
+msgstr "Çeviriler sayılamadı."
+
+#: ../src/common/dynlib.cpp:152
+#, c-format
+msgid "Couldn't find symbol '%s' in a dynamic library"
+msgstr "'%s' simgesi devingen kitaplıkta bulunamadı."
+
+#: ../src/gtk/print.cpp:2014
+msgid "Couldn't get hatch style from wxBrush."
+msgstr "wxBrush tarama stili alınamadı."
+
+#: ../src/msw/thread.cpp:950
+msgid "Couldn't get the current thread pointer"
+msgstr "Geçerli iş parçacığı imleci alınamadı."
+
+#: ../src/osx/carbon/overlay.cpp:129
+msgid "Couldn't init the context on the overlay window"
+msgstr "Örtüşme penceresinde bağlam başlatılamadı."
+
+#: ../src/common/imaggif.cpp:263
+msgid "Couldn't initialize GIF hash table."
+msgstr "GIF hash tablosu başlatılamadı."
+
+#: ../src/common/imagpng.cpp:657
+msgid "Couldn't load a PNG image - file is corrupted or not enough memory."
+msgstr "PNG görseli yüklenemedi - dosya bozuk ya da bellek yetersiz."
+
+#: ../src/unix/sound.cpp:470
+#, c-format
+msgid "Couldn't load sound data from '%s'."
+msgstr "'%s' içinden ses verisi yüklenemedi."
+
+#: ../src/msw/dirdlg.cpp:441
+msgid "Couldn't obtain folder name"
+msgstr "Klasör adı alınamadı."
+
+#: ../src/unix/sound_sdl.cpp:229
+#, c-format
+msgid "Couldn't open audio: %s"
+msgstr "Ses açılamadı: %s"
+
+#: ../src/msw/ole/dataobj.cpp:350
+#, c-format
+msgid "Couldn't register clipboard format '%s'."
+msgstr "'%s' pano biçimi kaydedilemedi."
+
+#: ../src/os2/thread.cpp:177
+msgid "Couldn't release a mutex"
+msgstr "Muteks bırakılamadı."
+
+#: ../src/msw/listctrl.cpp:756
+#, c-format
+msgid "Couldn't retrieve information about list control item %d."
+msgstr "%d liste denetimi ögesi hakkında bilgi alınamadı."
+
+#: ../src/common/imagpng.cpp:746 ../src/common/imagpng.cpp:757
+#: ../src/common/imagpng.cpp:767
+msgid "Couldn't save PNG image."
+msgstr "PNG görseli kaydedilemedi."
+
+#: ../src/msw/thread.cpp:715
+msgid "Couldn't terminate thread"
+msgstr "İş parçacığı sonlandırılamadı."
+
+#: ../src/common/xtistrm.cpp:170
+#, c-format
+msgid "Create Parameter %s not found in declared RTTI Parameters"
+msgstr "'Create Parameter' %s bildirilen RTTI parametreleri içinde bulunamadı."
+
+#: ../src/generic/dirdlgg.cpp:317
+msgid "Create directory"
+msgstr "Klasör oluşturun"
+
+#: ../src/generic/filedlgg.cpp:228 ../src/generic/dirdlgg.cpp:131
+msgid "Create new directory"
+msgstr "Yeni klasör oluşturun"
+
+#: ../src/common/accelcmn.cpp:322
+msgid "Ctrl+"
+msgstr "Ctrl+"
+
+#: ../src/richtext/richtextctrl.cpp:325 ../src/osx/textctrl_osx.cpp:582
+#: ../src/common/stockitem.cpp:151 ../src/msw/textctrl.cpp:2283
+msgid "Cu&t"
+msgstr "&Kesin"
+
+#: ../src/generic/filectrlg.cpp:956
+msgid "Current directory:"
+msgstr "Geçerli klasör:"
+
+#: ../src/gtk/print.cpp:759
+msgid "Custom size"
+msgstr "Özel boyut"
+
+#: ../src/common/headerctrlcmn.cpp:60
+msgid "Customize Columns"
+msgstr "Sütunları Özelleştirin"
+
+#: ../src/common/stockitem.cpp:151 ../src/stc/stc_i18n.cpp:17
+msgid "Cut"
+msgstr "Kesin"
+
+#: ../src/common/stockitem.cpp:259
+msgid "Cut selection"
+msgstr "Seçimi kesin"
+
+#: ../src/common/fmapbase.cpp:152
+msgid "Cyrillic (ISO-8859-5)"
+msgstr "Kril (ISO-8859-5)"
+
+#: ../src/common/paper.cpp:100
+msgid "D sheet, 22 x 34 in"
+msgstr "D sayfa, 22 x 34 inç"
+
+#: ../src/msw/dde.cpp:708
+msgid "DDE poke request failed"
+msgstr "DDE itme isteği yapılamadı."
+
+#: ../src/common/accelcmn.cpp:79
+msgid "DECIMAL"
+msgstr "DECIMAL"
+
+#: ../src/common/accelcmn.cpp:47
+msgid "DEL"
+msgstr "DEL"
+
+#: ../src/common/accelcmn.cpp:48
+msgid "DELETE"
+msgstr "DELETE"
+
+#: ../src/common/imagbmp.cpp:1092
+msgid "DIB Header: Encoding doesn't match bitdepth."
+msgstr "DIB Başlık Bilgisi: Kodlama, bit derinliğine uymuyor."
+
+#: ../src/common/imagbmp.cpp:1040
+msgid "DIB Header: Image height > 32767 pixels for file."
+msgstr "DIB Başlık Bilgisi: Dosya için görsel yüksekliği > 32767 piksel."
+
+#: ../src/common/imagbmp.cpp:1032
+msgid "DIB Header: Image width > 32767 pixels for file."
+msgstr "DIB Başlık Bilgisi: Dosya için görsel genişliği > 32767 piksel."
+
+#: ../src/common/imagbmp.cpp:1060
+msgid "DIB Header: Unknown bitdepth in file."
+msgstr "DIB Başlık Bilgisi: Dosyada bilinmeyen bit derinliği."
+
+#: ../src/common/imagbmp.cpp:1074
+msgid "DIB Header: Unknown encoding in file."
+msgstr "DIB Başlık Bilgisi: Dosyada bilinmeyen kodlama."
+
+#: ../src/common/accelcmn.cpp:80
+msgid "DIVIDE"
+msgstr "DIVIDE"
+
+#: ../src/common/paper.cpp:122
+msgid "DL Envelope, 110 x 220 mm"
+msgstr "DL Zarf, 110 x 220 mm"
+
+#: ../src/common/accelcmn.cpp:59
+msgid "DOWN"
+msgstr "DOWN"
+
+#: ../src/richtext/richtextborderspage.cpp:545
+msgid "Dashed"
+msgstr "Çizgili"
+
+#: ../src/osx/carbon/dataview.cpp:1921
+msgid "Data object has invalid data format"
+msgstr "Veri nesnesinin veri biçimi geçersiz."
+
+#: ../src/osx/carbon/dataview.cpp:2491
+msgid "Date renderer cannot render value; value type: "
+msgstr "Tarih görüntüleyici değeri işleyemiyor; değer tipi:"
+
+#: ../src/generic/dbgrptg.cpp:300
+#, c-format
+msgid "Debug report \"%s\""
+msgstr "Hata ayıklama raporu \"%s\""
+
+#: ../src/common/debugrpt.cpp:210
+msgid "Debug report couldn't be created."
+msgstr "Hata ayıklama raporu oluşturulamadı."
+
+#: ../src/common/debugrpt.cpp:558
+msgid "Debug report generation has failed."
+msgstr "Hata ayıklama raporu oluşturulamadı."
+
+#: ../src/generic/fontdlgg.cpp:323
+msgid "Decorative"
+msgstr "Süslü"
+
+#: ../src/common/fmapbase.cpp:796
+msgid "Default encoding"
+msgstr "Varsayılan kodlama"
+
+#: ../src/dfb/fontmgr.cpp:180
+msgid "Default font"
+msgstr "Varsayılan yazı tipi"
+
+#: ../src/generic/prntdlgg.cpp:510
+msgid "Default printer"
+msgstr "Varsayılan yazıcı"
+
+#: ../src/richtext/richtextbuffer.cpp:7841 ../src/common/stockitem.cpp:152
+#: ../src/stc/stc_i18n.cpp:20
+msgid "Delete"
+msgstr "Silin"
+
+#: ../src/richtext/richtexttabspage.cpp:148
+msgid "Delete A&ll"
+msgstr "Tümünü Si&lin"
+
+#: ../src/richtext/richtextbuffer.cpp:10637
+msgid "Delete Column"
+msgstr "Sütunu Silin"
+
+#: ../src/richtext/richtextbuffer.cpp:10587
+msgid "Delete Row"
+msgstr "Satırı Silin"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+msgid "Delete Style"
+msgstr "Stili Silin"
+
+#: ../src/richtext/richtextctrl.cpp:1231 ../src/richtext/richtextctrl.cpp:1452
+msgid "Delete Text"
+msgstr "Metni Silin"
+
+#: ../src/generic/editlbox.cpp:274
+msgid "Delete item"
+msgstr "Ögeyi Silin"
+
+#: ../src/common/stockitem.cpp:260
+msgid "Delete selection"
+msgstr "Seçimi silin"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+#, c-format
+msgid "Delete style %s?"
+msgstr "%s stili silinsin mi?"
+
+#: ../src/unix/snglinst.cpp:295
+#, c-format
+msgid "Deleted stale lock file '%s'."
+msgstr "Eski kilit dosyası '%s' silindi."
+
+#: ../src/common/module.cpp:124
+#, c-format
+msgid "Dependency \"%s\" of module \"%s\" doesn't exist."
+msgstr "\"%s\" bağlılığı \"%s\" modülü için bulunamadı."
+
+#: ../src/common/stockitem.cpp:196
+msgid "Descending"
+msgstr "Azalan"
+
+#: ../src/generic/dirctrlg.cpp:626
+msgid "Desktop"
+msgstr "Masaüstü"
+
+#: ../src/generic/aboutdlgg.cpp:70
+msgid "Developed by "
+msgstr "Geliştirici"
+
+#: ../src/generic/aboutdlgg.cpp:176
+msgid "Developers"
+msgstr "Geliştiriciler"
+
+#: ../src/msw/dialup.cpp:393
+msgid ""
+"Dial up functions are unavailable because the remote access service (RAS) is "
+"not installed on this machine. Please install it."
+msgstr ""
+"Uzaktan erişim hizmeti (RAS) kurulu olmadığı için arama işlevleri "
+"kullanılamıyor. Lütfen kurun."
+
+#: ../src/generic/tipdlg.cpp:230
+msgid "Did you know..."
+msgstr "Biliyor musunuz..."
+
+#: ../src/dfb/wrapdfb.cpp:63
+#, c-format
+msgid "DirectFB error %d occurred."
+msgstr "%d DirectFB hatası oluştu."
+
+#: ../src/motif/filedlg.cpp:219
+msgid "Directories"
+msgstr "Klasörler"
+
+#: ../src/common/filefn.cpp:1251
+#, c-format
+msgid "Directory '%s' couldn't be created"
+msgstr "'%s' klasörü oluşturulamadı"
+
+#: ../src/common/filefn.cpp:1271
+#, c-format
+msgid "Directory '%s' couldn't be deleted"
+msgstr "'%s' klasörü silinemedi"
+
+#: ../src/generic/dirdlgg.cpp:233
+msgid "Directory does not exist"
+msgstr "Klasör bulunamadı"
+
+#: ../src/generic/filectrlg.cpp:1412
+msgid "Directory doesn't exist."
+msgstr "Klasör bulunamadı."
+
+#: ../src/common/docview.cpp:455
+msgid "Discard changes and reload the last saved version?"
+msgstr "Değişiklikler iptal edilip son kaydedilmiş sürüme dönülsün mü?"
+
+#: ../src/html/helpwnd.cpp:512
+msgid ""
+"Display all index items that contain given substring. Search is case "
+"insensitive."
+msgstr ""
+"Verilen altdizgeyi içeren tüm dizin elemanları görüntülensin. Arama küçük-"
+"büyük harfe duyarlıdır."
+
+#: ../src/html/helpwnd.cpp:692
+msgid "Display options dialog"
+msgstr "Ayarlar penceresi görüntülensin"
+
+#: ../src/html/helpwnd.cpp:326
+msgid "Displays help as you browse the books on the left."
+msgstr "Soldaki kitapları gezilirken yardım görüntülenir."
+
+#: ../src/msw/mimetype.cpp:732
+msgid ""
+"Do you want to overwrite the command used to %s files with extension \"%s"
+"\" ?\n"
+"Current value is \n"
+"%s, \n"
+"New value is \n"
+"%s %1"
+msgstr ""
+"%s dosyaları için kullanılan komutu değiştirmek istiyor musunuz (\"%s\" "
+"uzantılı dosyalar) ?\n"
+"Geçerli değer \n"
+"%s, \n"
+"Yeni değer \n"
+"%s %1"
+
+#: ../src/common/docview.cpp:531
+#, c-format
+msgid "Do you want to save changes to %s?"
+msgstr "%s üzerinde yapılan değişiklikleri kaydetmek istiyor musunuz?"
+
+#: ../src/common/prntbase.cpp:525
+msgid "Document:"
+msgstr "Belge:"
+
+#: ../src/generic/aboutdlgg.cpp:73
+msgid "Documentation by "
+msgstr "Belgeleyen"
+
+#: ../src/generic/aboutdlgg.cpp:180
+msgid "Documentation writers"
+msgstr "Belge yazarları "
+
+#: ../src/common/sizer.cpp:2680
+msgid "Don't Save"
+msgstr "Kaydedilmesin"
+
+#: ../src/msw/frame.cpp:122 ../src/html/htmlwin.cpp:611
+msgid "Done"
+msgstr "Tamamlandı"
+
+#: ../src/generic/progdlgg.cpp:481 ../src/msw/progdlg.cpp:407
+msgid "Done."
+msgstr "Tamamlandı."
+
+#: ../src/richtext/richtextborderspage.cpp:544
+msgid "Dotted"
+msgstr "Noktalı"
+
+#: ../src/richtext/richtextborderspage.cpp:546
+msgid "Double"
+msgstr "Çift"
+
+#: ../src/common/paper.cpp:177
+msgid "Double Japanese Postcard Rotated 148 x 200 mm"
+msgstr "Japon Çift Postakartı Çevrilmiş 148 x 200 mm"
+
+#: ../src/common/xtixml.cpp:273
+#, c-format
+msgid "Doubly used id : %d"
+msgstr "Kod iki kez kullanılmış: %d"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:153
+msgid "Down"
+msgstr "Aşağı"
+
+#: ../src/richtext/richtextctrl.cpp:814
+msgid "Drag"
+msgstr "Sürükleyin"
+
+#: ../src/common/paper.cpp:101
+msgid "E sheet, 34 x 44 in"
+msgstr "E sayfa, 34 x 44 inç"
+
+#: ../src/common/accelcmn.cpp:61
+msgid "END"
+msgstr "SON"
+
+#: ../src/common/accelcmn.cpp:52
+msgid "ENTER"
+msgstr "ENTER"
+
+#: ../src/unix/fswatcher_inotify.cpp:535
+msgid "EOF while reading from inotify descriptor"
+msgstr "inotify belirteci okunurken dosya sonuna ulaşıldı "
+
+#: ../src/common/accelcmn.cpp:64
+msgid "ESC"
+msgstr "ESC"
+
+#: ../src/common/accelcmn.cpp:65
+msgid "ESCAPE"
+msgstr "ESCAPE"
+
+#: ../src/common/accelcmn.cpp:73
+msgid "EXECUTE"
+msgstr "EXECUTE"
+
+#: ../src/common/stockitem.cpp:154
+msgid "Edit"
+msgstr "Düzenleyin"
+
+#: ../src/generic/editlbox.cpp:272
+msgid "Edit item"
+msgstr "Ögeyi düzenleyin"
+
+#: ../include/wx/generic/progdlgg.h:84
+msgid "Elapsed time:"
+msgstr "Geçen süre:"
+
+#: ../src/richtext/richtextsizepage.cpp:353
+#: ../src/richtext/richtextsizepage.cpp:355
+#: ../src/richtext/richtextsizepage.cpp:465
+#: ../src/richtext/richtextsizepage.cpp:467
+msgid "Enable the height value."
+msgstr "Yükseklik değeri kullanılsın."
+
+#: ../src/richtext/richtextsizepage.cpp:438
+#: ../src/richtext/richtextsizepage.cpp:440
+msgid "Enable the maximum width value."
+msgstr "En büyük genişlik değeri kullanılsın."
+
+#: ../src/richtext/richtextsizepage.cpp:411
+#: ../src/richtext/richtextsizepage.cpp:413
+msgid "Enable the minimum height value."
+msgstr "En büyük yükseklik değeri kullanılsın."
+
+#: ../src/richtext/richtextsizepage.cpp:384
+#: ../src/richtext/richtextsizepage.cpp:386
+msgid "Enable the minimum width value."
+msgstr "En küçük genişlik değeri kullanılsın."
+
+#: ../src/richtext/richtextsizepage.cpp:319
+#: ../src/richtext/richtextsizepage.cpp:321
+msgid "Enable the width value."
+msgstr "Genişlik değeri kullanılsın."
+
+#: ../src/richtext/richtextsizepage.cpp:280
+#: ../src/richtext/richtextsizepage.cpp:282
+msgid "Enable vertical alignment."
+msgstr "Dikey hizalama kullanılsın."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:133
+#: ../src/richtext/richtextbackgroundpage.cpp:135
+msgid "Enables a background colour."
+msgstr "Bir artalan rengini etkinleştirir."
+
+#: ../src/richtext/richtextstyledlg.cpp:931
+msgid "Enter a box style name"
+msgstr "Bir kutu stili adı yazın"
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+msgid "Enter a character style name"
+msgstr "Bir karakter stili adı yazın"
+
+#: ../src/richtext/richtextstyledlg.cpp:817
+msgid "Enter a list style name"
+msgstr "Bir liste stili adı yazın"
+
+#: ../src/richtext/richtextstyledlg.cpp:890
+msgid "Enter a new style name"
+msgstr "Yeni bir stil adı yazın"
+
+#: ../src/richtext/richtextstyledlg.cpp:651
+msgid "Enter a paragraph style name"
+msgstr "Bir paragraf stili adı yazın"
+
+#: ../src/generic/dbgrptg.cpp:174
+#, c-format
+msgid "Enter command to open file \"%s\":"
+msgstr "\"%s\" dosyasını açacak komutu yazın:"
+
+#: ../src/generic/helpext.cpp:463
+msgid "Entries found"
+msgstr "Bulunan kayıt"
+
+#: ../src/common/paper.cpp:143
+msgid "Envelope Invite 220 x 220 mm"
+msgstr "Davetiye Zarf 220 x 220 mm"
+
+#: ../src/common/config.cpp:473
+#, c-format
+msgid ""
+"Environment variables expansion failed: missing '%c' at position %u in '%s'."
+msgstr "Ortam değişkenleri açılamadı: eksik '%c', konum %u, '%s' içinde."
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/dirctrlg.cpp:688
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:791
+#: ../src/generic/filectrlg.cpp:805 ../src/generic/filectrlg.cpp:821
+#: ../src/generic/filectrlg.cpp:1381 ../src/generic/filectrlg.cpp:1412
+#: ../src/gtk/filedlg.cpp:73 ../src/gtk1/fontdlg.cpp:74
+msgid "Error"
+msgstr "Hata"
+
+#: ../src/unix/epolldispatcher.cpp:103
+msgid "Error closing epoll descriptor"
+msgstr "epoll tanımlayıcı kapatma hatası"
+
+#: ../src/unix/fswatcher_kqueue.cpp:114
+msgid "Error closing kqueue instance"
+msgstr "kqueue kopyası kapatılırken hata"
+
+#: ../src/generic/dirdlgg.cpp:251
+msgid "Error creating directory"
+msgstr "Klasör oluşturma hatası"
+
+#: ../src/common/imagbmp.cpp:1103
+msgid "Error in reading image DIB."
+msgstr "DIB görüntüsü okuma hatası"
+
+#: ../src/propgrid/propgrid.cpp:6563
+#, c-format
+msgid "Error in resource: %s"
+msgstr "%s kaynağında hata"
+
+#: ../src/common/fileconf.cpp:453
+msgid "Error reading config options."
+msgstr "Ayarları okuma hatası."
+
+#: ../src/common/fileconf.cpp:1064
+msgid "Error saving user configuration data."
+msgstr "Kullanıcı ayarları kaydedilirken hata oluştu."
+
+#: ../src/gtk/print.cpp:671
+msgid "Error while printing: "
+msgstr "Yazdırma hatası:"
+
+#: ../src/common/log.cpp:223
+msgid "Error: "
+msgstr "Hata:"
+
+#: ../src/common/fmapbase.cpp:150
+msgid "Esperanto (ISO-8859-3)"
+msgstr "Esperanto (ISO-8859-3)"
+
+#: ../include/wx/generic/progdlgg.h:85
+msgid "Estimated time:"
+msgstr "Öngörülen süre:"
+
+#: ../src/unix/fswatcher_inotify.cpp:639
+msgid "Event queue overflowed"
+msgstr "Olay kuyruğu taştı"
+
+#: ../src/generic/dbgrptg.cpp:234
+msgid "Executable files (*.exe)|*.exe|"
+msgstr "Yürütülebilir dosyalar (*.exe)|*.exe|"
+
+#: ../src/common/stockitem.cpp:155
+msgid "Execute"
+msgstr "Yürütün"
+
+#: ../src/msw/utilsexc.cpp:888
+#, c-format
+msgid "Execution of command '%s' failed"
+msgstr "'%s' komutu yürütülemedi"
+
+#: ../src/os2/utilsexc.cpp:163
+#, c-format
+msgid "Execution of command '%s' failed with error: %ul"
+msgstr "'%s' komutu yürütülemedi; hata: %ul"
+
+#: ../src/common/paper.cpp:106
+msgid "Executive, 7 1/4 x 10 1/2 in"
+msgstr "Executive, 7 1/4 x 10 1/2 inç"
+
+#: ../src/msw/registry.cpp:1230
+#, c-format
+msgid ""
+"Exporting registry key: file \"%s\" already exists and won't be overwritten."
+msgstr "Kayıt anahtarı verme: \"%s\" dosyası zaten var, üstüne yazılmayacak."
+
+#: ../src/common/fmapbase.cpp:195
+msgid "Extended Unix Codepage for Japanese (EUC-JP)"
+msgstr "Japonca için genişletilmiş Unix Codepage (EUC-JP)"
+
+#: ../src/html/chm.cpp:725
+#, c-format
+msgid "Extraction of '%s' into '%s' failed."
+msgstr "'%s'', '%s' içine açılamadı."
+
+#: ../src/common/accelcmn.cpp:238 ../src/common/accelcmn.cpp:333
+msgid "F"
+msgstr "F"
+
+#: ../src/propgrid/advprops.cpp:640
+msgid "Face Name"
+msgstr "Yazı Tipi Adı"
+
+#: ../src/unix/snglinst.cpp:269
+msgid "Failed to access lock file."
+msgstr "Kilit dosyasına erişilemedi."
+
+#: ../src/unix/epolldispatcher.cpp:116
+#, c-format
+msgid "Failed to add descriptor %d to epoll descriptor %d"
+msgstr "%d tanımlayıcısı %d epoll tanımlayısıcına eklenemedi"
+
+#: ../src/msw/dib.cpp:548
+#, c-format
+msgid "Failed to allocate %luKb of memory for bitmap data."
+msgstr "Bit eşlem verisi için %luKb bellek ayrılamadı."
+
+#: ../src/common/glcmn.cpp:87
+msgid "Failed to allocate colour for OpenGL"
+msgstr "OpenGL için renk ayarlanamadı"
+
+#: ../src/unix/displayx11.cpp:288
+msgid "Failed to change video mode"
+msgstr "Görüntü kipi değiştirilemedi"
+
+#: ../src/common/image.cpp:3139
+#, c-format
+msgid "Failed to check format of image file \"%s\"."
+msgstr "\"%s\" görsel dosyasının biçimi denetlenemedi."
+
+#: ../src/common/debugrpt.cpp:244
+#, c-format
+msgid "Failed to clean up debug report directory \"%s\""
+msgstr "\"%s\" hata ayıklama rapor klasörü temizlenemedi"
+
+#: ../src/common/filename.cpp:211
+msgid "Failed to close file handle"
+msgstr "Dosya işleyici kapatılamadı"
+
+#: ../src/unix/snglinst.cpp:334
+#, c-format
+msgid "Failed to close lock file '%s'"
+msgstr "'%s' kilit dosyası kapatılamadı"
+
+#: ../src/msw/clipbrd.cpp:115
+msgid "Failed to close the clipboard."
+msgstr "Pano kapatılamadı."
+
+#: ../src/x11/utils.cpp:204
+#, c-format
+msgid "Failed to close the display \"%s\""
+msgstr "\"%s\" görüntüsü kapatılamadı"
+
+#: ../src/msw/dialup.cpp:818
+msgid "Failed to connect: missing username/password."
+msgstr "Bağlanılamadı: kullanıcı adı/parola eksik."
+
+#: ../src/msw/dialup.cpp:764
+msgid "Failed to connect: no ISP to dial."
+msgstr "Bağlanılamadı: aranacak ISS yok."
+
+#: ../src/common/textfile.cpp:200
+#, c-format
+msgid "Failed to convert file \"%s\" to Unicode."
+msgstr "\"%s\" dosyası Unikoda çevrilemedi."
+
+#: ../src/generic/logg.cpp:976
+msgid "Failed to copy dialog contents to the clipboard."
+msgstr "Pencere içeriği panoya kopyalanamadı."
+
+#: ../src/msw/registry.cpp:691
+#, c-format
+msgid "Failed to copy registry value '%s'"
+msgstr "'%s' kayıt değeri kopyalanamadı"
+
+#: ../src/msw/registry.cpp:700
+#, c-format
+msgid "Failed to copy the contents of registry key '%s' to '%s'."
+msgstr "'%s' kayıt anahtarının içeriği '%s' içine kopyalanamadı."
+
+#: ../src/common/filefn.cpp:1058
+#, c-format
+msgid "Failed to copy the file '%s' to '%s'"
+msgstr "'%s' dosyası '%s' içine kopyalanamadı"
+
+#: ../src/msw/registry.cpp:678
+#, c-format
+msgid "Failed to copy the registry subkey '%s' to '%s'."
+msgstr "'%s' kayıt alt anahtarı '%s' içine kopyalanamadı."
+
+#: ../src/msw/dde.cpp:1073
+msgid "Failed to create DDE string"
+msgstr "DDE dizgesi oluşturulamadı"
+
+#: ../src/msw/mdi.cpp:590
+msgid "Failed to create MDI parent frame."
+msgstr "MDI üst çerçevesi oluşturulamadı."
+
+#: ../src/common/filename.cpp:1080
+msgid "Failed to create a temporary file name"
+msgstr "Geçici dosya adı oluşturulamadı"
+
+#: ../src/msw/utilsexc.cpp:235
+msgid "Failed to create an anonymous pipe"
+msgstr "Anonim bir boru oluşturulamadı"
+
+#: ../src/msw/ole/automtn.cpp:522
+#, c-format
+msgid "Failed to create an instance of \"%s\""
+msgstr "\"%s\" kopyası oluşturulamadı"
+
+#: ../src/msw/dde.cpp:442
+#, c-format
+msgid "Failed to create connection to server '%s' on topic '%s'"
+msgstr "'%s' sunucusuna '%s' konusundan bağlantı kurulamadı"
+
+#: ../src/msw/cursor.cpp:212
+msgid "Failed to create cursor."
+msgstr "İmleç oluşturulamadı."
+
+#: ../src/common/debugrpt.cpp:209
+#, c-format
+msgid "Failed to create directory \"%s\""
+msgstr "\"%s\" klasörü oluşturulamadı"
+
+#: ../src/generic/dirdlgg.cpp:249
+#, c-format
+msgid ""
+"Failed to create directory '%s'\n"
+"(Do you have the required permissions?)"
+msgstr ""
+"'%s' klasörü oluşturulamadı\n"
+"(Yeterli izniniz var mı?)"
+
+#: ../src/unix/epolldispatcher.cpp:84
+msgid "Failed to create epoll descriptor"
+msgstr "epoll tanımlayıcısı oluşturulamadı"
+
+#: ../src/msw/mimetype.cpp:198
+#, c-format
+msgid "Failed to create registry entry for '%s' files."
+msgstr "'%s' dosyaları için kayıt anahtarı oluşturulamadı."
+
+#: ../src/msw/fdrepdlg.cpp:442
+#, c-format
+msgid "Failed to create the standard find/replace dialog (error code %d)"
+msgstr "Standart bul/değiştir penceresi oluşturulamadı (hata kodu %d)"
+
+#: ../src/unix/wakeuppipe.cpp:52
+msgid "Failed to create wake up pipe used by event loop."
+msgstr "Olay döngüsünde kullanılan uyandırma borusu oluşturulamadı."
+
+#: ../src/html/winpars.cpp:739
+#, c-format
+msgid "Failed to display HTML document in %s encoding"
+msgstr "HTML belgesi %s kodlamasıyla görüntülenemedi"
+
+#: ../src/msw/clipbrd.cpp:127
+msgid "Failed to empty the clipboard."
+msgstr "Pano temizlenemedi."
+
+#: ../src/unix/displayx11.cpp:265
+msgid "Failed to enumerate video modes"
+msgstr "Görüntü kipleri sıralanamadı"
+
+#: ../src/msw/dde.cpp:727
+msgid "Failed to establish an advise loop with DDE server"
+msgstr "DDE sunucusuyla danışma döngüsü sağlanamadı"
+
+#: ../src/msw/dialup.cpp:650 ../src/msw/dialup.cpp:884
+#, c-format
+msgid "Failed to establish dialup connection: %s"
+msgstr "Çevirmeli bağlantı gerçekleştirilemedi: %s"
+
+#: ../src/unix/utilsunx.cpp:617
+#, c-format
+msgid "Failed to execute '%s'\n"
+msgstr "'%s' çalıştırılamadı\n"
+
+#: ../src/common/debugrpt.cpp:725
+msgid "Failed to execute curl, please install it in PATH."
+msgstr "curl çalıştırılamadı, lütfen YOL içine yükleyin."
+
+#: ../src/msw/ole/automtn.cpp:505
+#, c-format
+msgid "Failed to find CLSID of \"%s\""
+msgstr "\"%s\" için CLSID bulunamadı"
+
+#: ../src/common/regex.cpp:434 ../src/common/regex.cpp:482
+#, c-format
+msgid "Failed to find match for regular expression: %s"
+msgstr "Kurallı ifadeye uygun veri bulunamadı: %s"
+
+#: ../src/msw/dialup.cpp:716
+#, c-format
+msgid "Failed to get ISP names: %s"
+msgstr "ISS adları alınamadı: %s"
+
+#: ../src/msw/ole/automtn.cpp:574
+#, c-format
+msgid "Failed to get OLE automation interface for \"%s\""
+msgstr "\"%s\" için OLE otomasyonu arayüzü getirilemedi"
+
+#: ../src/msw/clipbrd.cpp:747
+msgid "Failed to get data from the clipboard"
+msgstr "Panodan veri alınamadı"
+
+#: ../src/common/time.cpp:249
+msgid "Failed to get the local system time"
+msgstr "Yerel sistem zamanı alınamadı"
+
+#: ../src/common/filefn.cpp:1453
+msgid "Failed to get the working directory"
+msgstr "Çalışma klasörü alınamadı"
+
+#: ../src/univ/theme.cpp:113
+msgid "Failed to initialize GUI: no built-in themes found."
+msgstr "GUI başlatılamadı: içsel bir tema bulunamadı."
+
+#: ../src/msw/helpchm.cpp:63
+msgid "Failed to initialize MS HTML Help."
+msgstr "MS HTML Yardım başlatılamadı."
+
+#: ../src/msw/glcanvas.cpp:892
+msgid "Failed to initialize OpenGL"
+msgstr "OpenGL başlatılamadı"
+
+#: ../src/msw/dialup.cpp:879
+#, c-format
+msgid "Failed to initiate dialup connection: %s"
+msgstr "Çevirmeli bağlantı başlatılamadı: %s"
+
+#: ../src/gtk/textctrl.cpp:1117
+msgid "Failed to insert text in the control."
+msgstr "Metin denetime eklenemedi."
+
+#: ../src/unix/snglinst.cpp:241
+#, c-format
+msgid "Failed to inspect the lock file '%s'"
+msgstr "'%s' kilit dosyası incelenemedi"
+
+#: ../src/unix/appunix.cpp:182
+msgid "Failed to install signal handler"
+msgstr "İşaret işleyici kurulamadı"
+
+#: ../src/unix/threadpsx.cpp:1162
+msgid ""
+"Failed to join a thread, potential memory leak detected - please restart the "
+"program"
+msgstr ""
+"İş parçacığına bağlanılamadı, olası bellek taşması bulundu - lütfen programı "
+"yeniden başlatın"
+
+#: ../src/msw/utils.cpp:745
+#, c-format
+msgid "Failed to kill process %d"
+msgstr "%d işlemi sonlandırılamadı"
+
+#: ../src/common/image.cpp:2365
+#, c-format
+msgid "Failed to load bitmap \"%s\" from resources."
+msgstr "Kaynaklardan \"%s\" bit eşlemi yüklenemedi."
+
+#: ../src/common/image.cpp:2374
+#, c-format
+msgid "Failed to load icon \"%s\" from resources."
+msgstr "Kaynaklardan \"%s\" simgesi yüklenemedi."
+
+#: ../src/common/iconbndl.cpp:182
+#, c-format
+msgid "Failed to load image %%d from file '%s'."
+msgstr "%%d görseli '%s' dosyasından yüklenemedi."
+
+#: ../src/common/iconbndl.cpp:190
+#, c-format
+msgid "Failed to load image %d from stream."
+msgstr "%d görseli akıştan yüklenemedi."
+
+#: ../src/common/image.cpp:2450 ../src/common/image.cpp:2469
+#, c-format
+msgid "Failed to load image from file \"%s\"."
+msgstr "\"%s\" dosyasından görsel yüklenemedi."
+
+#: ../src/msw/enhmeta.cpp:97
+#, c-format
+msgid "Failed to load metafile from file \"%s\"."
+msgstr "\"%s\" dosyasından metafile yüklenemedi."
+
+#: ../src/msw/volume.cpp:327
+msgid "Failed to load mpr.dll."
+msgstr "mpr.dll yüklenemedi."
+
+#: ../src/msw/utils.cpp:1120
+#, c-format
+msgid "Failed to load resource \"%s\"."
+msgstr "\"%s\" kaynağı yüklenemedi."
+
+#: ../src/common/dynlib.cpp:100
+#, c-format
+msgid "Failed to load shared library '%s'"
+msgstr "'%s' paylaşılmış kitaplığı yüklenemedi"
+
+#: ../src/msw/utils.cpp:1127
+#, c-format
+msgid "Failed to lock resource \"%s\"."
+msgstr "\"%s\" kaynağı kilitlenemedi."
+
+#: ../src/unix/snglinst.cpp:198
+#, c-format
+msgid "Failed to lock the lock file '%s'"
+msgstr "'%s' kilit dosyası kilitlenemedi"
+
+#: ../src/unix/epolldispatcher.cpp:136
+#, c-format
+msgid "Failed to modify descriptor %d in epoll descriptor %d"
+msgstr "%d tanımlayıcısı değiştirilemedi (epoll %d tanımlayıcısındaki)"
+
+#: ../src/common/filename.cpp:2681
+#, c-format
+msgid "Failed to modify file times for '%s'"
+msgstr "'%s' için dosya zamanları değiştirilemedi"
+
+#: ../src/common/selectdispatcher.cpp:252
+msgid "Failed to monitor I/O channels"
+msgstr "G/Ç kanalları izlenemedi"
+
+#: ../src/common/filename.cpp:194
+#, c-format
+msgid "Failed to open '%s' for reading"
+msgstr "'%s' okunmak üzere açılamadı"
+
+#: ../src/common/filename.cpp:199
+#, c-format
+msgid "Failed to open '%s' for writing"
+msgstr "'%s' yazılmak üzere açılamadı"
+
+#: ../src/html/chm.cpp:141
+#, c-format
+msgid "Failed to open CHM archive '%s'."
+msgstr "'%s' CHM arşivi açılamadı."
+
+#: ../src/common/utilscmn.cpp:1135
+#, c-format
+msgid "Failed to open URL \"%s\" in default browser."
+msgstr "'%s' İnternet adresi varsayılan tarayıcıyla açılamadı."
+
+#: ../include/wx/msw/private/fswatcher.h:92
+#, c-format
+msgid "Failed to open directory \"%s\" for monitoring."
+msgstr "\"%s\"klasörü izlenmek üzere açılamadı."
+
+#: ../src/x11/utils.cpp:223
+#, c-format
+msgid "Failed to open display \"%s\"."
+msgstr "\"%s\" görüntüsü açılamadı."
+
+#: ../src/common/filename.cpp:1115
+msgid "Failed to open temporary file."
+msgstr "Geçici dosya açılamadı."
+
+#: ../src/msw/clipbrd.cpp:94
+msgid "Failed to open the clipboard."
+msgstr "Pano açılamadı."
+
+#: ../src/common/translation.cpp:1170
+#, c-format
+msgid "Failed to parse Plural-Forms: '%s'"
+msgstr "Çoğul-formlar ayrıştırılamadı: '%s'"
+
+#: ../src/unix/mediactrl.cpp:1268
+#, c-format
+msgid "Failed to prepare playing \"%s\"."
+msgstr "\"%s\" oynatmaya hazırlanamadı."
+
+#: ../src/msw/clipbrd.cpp:647
+msgid "Failed to put data on the clipboard"
+msgstr "Veri panoya konulamadı"
+
+#: ../src/unix/snglinst.cpp:278
+msgid "Failed to read PID from lock file."
+msgstr "Kilit dosyasından PID okunamadı."
+
+#: ../src/common/fileconf.cpp:464
+msgid "Failed to read config options."
+msgstr "Ayarlar okunamadı."
+
+#: ../src/common/docview.cpp:678
+#, c-format
+msgid "Failed to read document from the file \"%s\"."
+msgstr "\"%s\" dosyasından belge okunamadı."
+
+#: ../src/dfb/evtloop.cpp:98
+msgid "Failed to read event from DirectFB pipe"
+msgstr "DirectFB borusundan olay okunamadı"
+
+#: ../src/unix/wakeuppipe.cpp:120
+msgid "Failed to read from wake-up pipe"
+msgstr "Uyandırma borusu okunamadı"
+
+#: ../src/unix/utilsunx.cpp:685
+msgid "Failed to redirect child process input/output"
+msgstr "Alt iş giriş/çıkışı yönlendirilemedi"
+
+#: ../src/msw/utilsexc.cpp:697
+msgid "Failed to redirect the child process IO"
+msgstr "Alt iş giriş/çıkışı yönlendirilemedi"
+
+#: ../src/msw/dde.cpp:293
+#, c-format
+msgid "Failed to register DDE server '%s'"
+msgstr "'%s' DDE sunucusuna kayıt olunamadı"
+
+#: ../src/common/fontmap.cpp:245
+#, c-format
+msgid "Failed to remember the encoding for the charset '%s'."
+msgstr "'%s' karakter kümesi için kodlama anımsanamadı."
+
+#: ../src/common/debugrpt.cpp:227
+#, c-format
+msgid "Failed to remove debug report file \"%s\""
+msgstr "\"%s\" hata ayıklama rapor dosyası silinemedi"
+
+#: ../src/unix/snglinst.cpp:322
+#, c-format
+msgid "Failed to remove lock file '%s'"
+msgstr "'%s' kilit dosyası silinemedi"
+
+#: ../src/unix/snglinst.cpp:288
+#, c-format
+msgid "Failed to remove stale lock file '%s'."
+msgstr "'%s' eski kilit dosyası silinemedi."
+
+#: ../src/msw/registry.cpp:528
+#, c-format
+msgid "Failed to rename registry value '%s' to '%s'."
+msgstr "'%s' kayıt değeri '%s' olarak yeniden adlandırılamadı."
+
+#: ../src/common/filefn.cpp:1168
+#, c-format
+msgid ""
+"Failed to rename the file '%s' to '%s' because the destination file already "
+"exists."
+msgstr ""
+"'%s' dosyası aynı adlı bir dosya olduğundan '%s' olarak yeniden "
+"adlandırılamadı."
+
+#: ../src/msw/registry.cpp:633
+#, c-format
+msgid "Failed to rename the registry key '%s' to '%s'."
+msgstr "'%s' kayıt anahtarı '%s' olarak yeniden adlandırılamadı."
+
+#: ../src/msw/clipbrd.cpp:497
+msgid "Failed to retrieve data from the clipboard."
+msgstr "Panodan veri alınamadı."
+
+#: ../src/common/filename.cpp:2777
+#, c-format
+msgid "Failed to retrieve file times for '%s'"
+msgstr "'%s' için dosya zamanları alınamadı"
+
+#: ../src/msw/dialup.cpp:487
+msgid "Failed to retrieve text of RAS error message"
+msgstr "RAS hata iletisi metni alınamadı"
+
+#: ../src/msw/clipbrd.cpp:784
+msgid "Failed to retrieve the supported clipboard formats"
+msgstr "Desteklenen pano biçimleri alınamadı"
+
+#: ../src/common/docview.cpp:649
+#, c-format
+msgid "Failed to save document to the file \"%s\"."
+msgstr "Belge \"%s\" dosyasına kaydedilemedi."
+
+#: ../src/msw/dib.cpp:326
+#, c-format
+msgid "Failed to save the bitmap image to file \"%s\"."
+msgstr "Bit eşlemi görüntüsü \"%s\" dosyasına kaydedilemedi."
+
+#: ../src/msw/dde.cpp:768
+msgid "Failed to send DDE advise notification"
+msgstr "DDE danışma uyarısı gönderilemedi"
+
+#: ../src/common/ftp.cpp:404
+#, c-format
+msgid "Failed to set FTP transfer mode to %s."
+msgstr "FTP aktarım kipi %s olarak ayarlanamadı."
+
+#: ../src/msw/clipbrd.cpp:373
+msgid "Failed to set clipboard data."
+msgstr "Pano verisi ayarlanamadı."
+
+#: ../src/unix/snglinst.cpp:181
+#, c-format
+msgid "Failed to set permissions on lock file '%s'"
+msgstr "'%s' kilit dosyasının izinleri ayarlanamadı"
+
+#: ../src/unix/utilsunx.cpp:674
+msgid "Failed to set process priority"
+msgstr "İşlem önceliği ayarlanamadı"
+
+#: ../src/common/file.cpp:576
+msgid "Failed to set temporary file permissions"
+msgstr "Geçici dosya izinleri ayarlanamadı"
+
+#: ../src/gtk/textctrl.cpp:1058
+msgid "Failed to set text in the text control."
+msgstr "Metin denetime yerleştirilemedi."
+
+#: ../src/unix/threadpsx.cpp:1293
+#, c-format
+msgid "Failed to set thread concurrency level to %lu"
+msgstr "%lu iş parçacığı öncelik düzeyi ayarlanamadı."
+
+#: ../src/unix/threadpsx.cpp:1377 ../src/unix/threadpsx.cpp:1387
+#, c-format
+msgid "Failed to set thread priority %d."
+msgstr "%d iş parçacığı önceliği ayarlanamadı."
+
+#: ../src/unix/utilsunx.cpp:791
+msgid "Failed to set up non-blocking pipe, the program might hang."
+msgstr "Engellemesiz boru kurulamadı, program takılabilir."
+
+#: ../src/common/fs_mem.cpp:261
+#, c-format
+msgid "Failed to store image '%s' to memory VFS!"
+msgstr "'%s' görüntüsü VFS belleğine yerleştirilemedi!"
+
+#: ../src/dfb/evtloop.cpp:170
+msgid "Failed to switch DirectFB pipe to non-blocking mode"
+msgstr "DirectFB borusu engellemesiz kipe döndürülemedi"
+
+#: ../src/unix/wakeuppipe.cpp:59
+msgid "Failed to switch wake up pipe to non-blocking mode"
+msgstr "Uyandırma borusu engellemesiz kipe döndürülemedi"
+
+#: ../src/unix/threadpsx.cpp:1569
+msgid "Failed to terminate a thread."
+msgstr "Bir iş parçacığı sonlandırılamadı."
+
+#: ../src/msw/dde.cpp:746
+msgid "Failed to terminate the advise loop with DDE server"
+msgstr "DDE sunucusuyla danışma döngüsü sonlandırılamadı"
+
+#: ../src/msw/dialup.cpp:959
+#, c-format
+msgid "Failed to terminate the dialup connection: %s"
+msgstr "Çevirmeli bağlantı sonlandırılamadı: %s"
+
+#: ../src/common/filename.cpp:2696
+#, c-format
+msgid "Failed to touch the file '%s'"
+msgstr "'%s' dosyasına dokunulamadı"
+
+#: ../src/unix/snglinst.cpp:328
+#, c-format
+msgid "Failed to unlock lock file '%s'"
+msgstr "'%s' kilit dosyasının kilidi kaldırılamadı"
+
+#: ../src/msw/dde.cpp:314
+#, c-format
+msgid "Failed to unregister DDE server '%s'"
+msgstr "'%s' DDE sunucusundan kayıt iptali yapılamadı"
+
+#: ../src/unix/epolldispatcher.cpp:155
+#, c-format
+msgid "Failed to unregister descriptor %d from epoll descriptor %d"
+msgstr "%d tanımlayıcısı kaldırılamadı (%d epoll tanımlayıcısından)"
+
+#: ../src/common/fileconf.cpp:1037
+msgid "Failed to update user configuration file."
+msgstr "Kullanıcı ayarları dosyası kaydedilemedi."
+
+#: ../src/common/debugrpt.cpp:738
+#, c-format
+msgid "Failed to upload the debug report (error code %d)."
+msgstr "Hata ayıklama raporu yüklenemedi (hata kodu %d)."
+
+#: ../src/unix/snglinst.cpp:168
+#, c-format
+msgid "Failed to write to lock file '%s'"
+msgstr "'%s' kilit dosyasına yazılamadı"
+
+#: ../src/propgrid/propgrid.cpp:172
+msgid "False"
+msgstr "Yanlış"
+
+#: ../src/propgrid/advprops.cpp:658
+msgid "Family"
+msgstr "Aile"
+
+#: ../src/common/stockitem.cpp:157 ../src/msw/wince/filedlgwce.cpp:121
+msgid "File"
+msgstr "Dosya"
+
+#: ../src/common/docview.cpp:666
+#, c-format
+msgid "File \"%s\" could not be opened for reading."
+msgstr "\"%s\" dosyası okunmak üzere açılamadı."
+
+#: ../src/common/docview.cpp:643
+#, c-format
+msgid "File \"%s\" could not be opened for writing."
+msgstr "\"%s\" dosyası yazılmak üzere açılamadı."
+
+#: ../src/gtk/filedlg.cpp:56
+#, c-format
+msgid "File '%s' already exists, do you really want to overwrite it?"
+msgstr "'%s' dosyası zaten var, üstüne yazılsın mı?"
+
+#: ../src/os2/filedlg.cpp:310
+#, c-format
+msgid ""
+"File '%s' already exists.\n"
+"Do you want to replace it?"
+msgstr ""
+"'%s' dosyası zaten var.\n"
+"Üstüne yazılsın mı?"
+
+#: ../src/common/filefn.cpp:1207
+#, c-format
+msgid "File '%s' couldn't be removed"
+msgstr "'%s' dosyası silinemedi"
+
+#: ../src/common/filefn.cpp:1187
+#, c-format
+msgid "File '%s' couldn't be renamed '%s'"
+msgstr "'%s' dosyası '%s' olarak yeniden adlandırılamadı"
+
+#: ../src/richtext/richtextctrl.cpp:2688 ../src/common/textcmn.cpp:921
+msgid "File couldn't be loaded."
+msgstr "Dosya yüklenemedi."
+
+#: ../src/msw/filedlg.cpp:458
+#, c-format
+msgid "File dialog failed with error code %0lx."
+msgstr "Dosya diyaloğu %0lx hata koduyla sonlandı."
+
+#: ../src/common/docview.cpp:1771
+msgid "File error"
+msgstr "Dosya hatası"
+
+#: ../src/generic/dirctrlg.cpp:688 ../src/generic/filectrlg.cpp:805
+msgid "File name exists already."
+msgstr "Aynı adlı bir dosya zaten var."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Files"
+msgstr "Dosyalar"
+
+#: ../src/common/filefn.cpp:1761
+#, c-format
+msgid "Files (%s)"
+msgstr "Dosyalar (%s)"
+
+#: ../src/motif/filedlg.cpp:218
+msgid "Filter"
+msgstr "Süzgeç"
+
+#: ../src/common/stockitem.cpp:158 ../src/html/helpwnd.cpp:500
+msgid "Find"
+msgstr "Bulun"
+
+#: ../src/common/stockitem.cpp:159
+msgid "First"
+msgstr "İlk"
+
+#: ../src/common/prntbase.cpp:1518
+msgid "First page"
+msgstr "İlk sayfa"
+
+#: ../src/richtext/richtextsizepage.cpp:521
+msgid "Fixed"
+msgstr "Sabit"
+
+#: ../src/html/helpwnd.cpp:1219
+msgid "Fixed font:"
+msgstr "Sabit yazı tipi:"
+
+#: ../src/html/helpwnd.cpp:1282
+msgid "Fixed size face.<br> <b>bold</b> <i>italic</i> "
+msgstr "Sabit boyutlu tip.<br> <b>koyu</b> <i>eğik</i> "
+
+#: ../src/richtext/richtextsizepage.cpp:229
+msgid "Floating"
+msgstr "Yüzen"
+
+#: ../src/common/stockitem.cpp:160
+msgid "Floppy"
+msgstr "Esnek"
+
+#: ../src/common/paper.cpp:112
+msgid "Folio, 8 1/2 x 13 in"
+msgstr "Kitap yaprağı, 8 1/2 x 13 inç"
+
+#: ../src/richtext/richtextformatdlg.cpp:324 ../src/osx/carbon/fontdlg.cpp:473
+#: ../src/common/stockitem.cpp:194
+msgid "Font"
+msgstr "Yazı tipi"
+
+#: ../src/richtext/richtextfontpage.cpp:230
+msgid "Font &weight:"
+msgstr "Yazı &koyuluğu:"
+
+#: ../src/html/helpwnd.cpp:1220
+msgid "Font size:"
+msgstr "Yazı boyutu"
+
+#: ../src/richtext/richtextfontpage.cpp:217
+msgid "Font st&yle:"
+msgstr "Yazı &stili:"
+
+#: ../src/osx/carbon/fontdlg.cpp:515
+msgid "Font:"
+msgstr "Yazı tipi:"
+
+#: ../src/dfb/fontmgr.cpp:198
+#, c-format
+msgid "Fonts index file %s disappeared while loading fonts."
+msgstr "Yazı tipleri yüklenirken %s yazı tipi dizin dosyası kayboldu."
+
+#: ../src/unix/utilsunx.cpp:651
+msgid "Fork failed"
+msgstr "Ayrılma başarısız"
+
+#: ../src/common/stockitem.cpp:161
+msgid "Forward"
+msgstr "İleri"
+
+#: ../src/common/xtixml.cpp:235
+msgid "Forward hrefs are not supported"
+msgstr "Yönlendirme href biçimi desteklenmiyor"
+
+#: ../src/html/helpwnd.cpp:888
+#, c-format
+msgid "Found %i matches"
+msgstr "%i sonuç bulundu"
+
+#: ../src/generic/prntdlgg.cpp:238
+msgid "From:"
+msgstr "Kaynak:"
+
+#: ../src/common/imaggif.cpp:160
+msgid "GIF: Invalid gif index."
+msgstr "GIF: Geçersiz gif dizini."
+
+#: ../src/common/imaggif.cpp:150
+msgid "GIF: data stream seems to be truncated."
+msgstr "GIF: veri akışı budanmış görünüyor."
+
+#: ../src/common/imaggif.cpp:134
+msgid "GIF: error in GIF image format."
+msgstr "GIF: GIF görsel biçimi hatası."
+
+#: ../src/common/imaggif.cpp:137
+msgid "GIF: not enough memory."
+msgstr "GIF: yetersiz bellek."
+
+#: ../src/common/imaggif.cpp:140
+msgid "GIF: unknown error!!!"
+msgstr "GIF: bilinmeyen hata!!!"
+
+#: ../src/gtk/window.cpp:4288
+msgid ""
+"GTK+ installed on this machine is too old to support screen compositing, "
+"please install GTK+ 2.12 or later."
+msgstr ""
+"Yüklü GTK+ çok eski ve ekran karmayı desteklemiyor. Lütfen GTK+ 2.12 ya da "
+"üzeri bir sürüm yükleyin."
+
+#: ../src/univ/themes/gtk.cpp:525
+msgid "GTK+ theme"
+msgstr "GTK+ teması"
+
+#: ../src/common/preferencescmn.cpp:39
+msgid "General"
+msgstr "Genel"
+
+#: ../src/common/prntbase.cpp:243
+msgid "Generic PostScript"
+msgstr "Genel PostScript"
+
+#: ../src/common/paper.cpp:136
+msgid "German Legal Fanfold, 8 1/2 x 13 in"
+msgstr "Alman Legal Fanfold, 8 1/2 x 13 inç"
+
+#: ../src/common/paper.cpp:135
+msgid "German Std Fanfold, 8 1/2 x 12 in"
+msgstr "Alman Standart Fanfold, 8 1/2 x 12 inç"
+
+#: ../include/wx/xtiprop.h:188
+msgid "GetProperty called w/o valid getter"
+msgstr "'GetProperty' işlevi geçerli bir alıcı olmaksızın çağrıldı"
+
+#: ../include/wx/xtiprop.h:266
+msgid "GetPropertyCollection called on a generic accessor"
+msgstr "'GetPropertyCollection' işlevi genel bir erişici üzerinden çağrıldı"
+
+#: ../include/wx/xtiprop.h:206
+msgid "GetPropertyCollection called w/o valid collection getter"
+msgstr ""
+"'GetPropertyCollection' işlevi geçerli bir koleksiyon alıcısı olmaksızın "
+"çağrıldı"
+
+#: ../src/html/helpwnd.cpp:673
+msgid "Go back"
+msgstr "Geri gidin"
+
+#: ../src/html/helpwnd.cpp:674
+msgid "Go forward"
+msgstr "İleri gidin"
+
+#: ../src/html/helpwnd.cpp:676
+msgid "Go one level up in document hierarchy"
+msgstr "Belge hiyerarşisinde bir düzey yukarı gidin"
+
+#: ../src/generic/filedlgg.cpp:223 ../src/generic/dirdlgg.cpp:136
+msgid "Go to home directory"
+msgstr "Açılış klasörüne gidin"
+
+#: ../src/generic/filedlgg.cpp:219
+msgid "Go to parent directory"
+msgstr "Üst klasöre gidin"
+
+#: ../src/generic/aboutdlgg.cpp:76
+msgid "Graphics art by "
+msgstr "Grafikleri hazırlayan"
+
+#: ../src/common/fmapbase.cpp:154
+msgid "Greek (ISO-8859-7)"
+msgstr "Yunanca (ISO-8859-7)"
+
+#: ../src/richtext/richtextborderspage.cpp:547
+msgid "Groove"
+msgstr "Groove"
+
+#: ../src/common/zstream.cpp:158 ../src/common/zstream.cpp:318
+msgid "Gzip not supported by this version of zlib"
+msgstr "Bu Zlib sürümü Gzip desteklemiyor"
+
+#: ../src/common/accelcmn.cpp:75
+msgid "HELP"
+msgstr "HELP"
+
+#: ../src/common/accelcmn.cpp:60
+msgid "HOME"
+msgstr "HOME"
+
+#: ../src/html/helpwnd.cpp:1552
+msgid "HTML Help Project (*.hhp)|*.hhp|"
+msgstr "HTML Yardım Projesi (*.hhp)|*.hhp|"
+
+#: ../src/html/htmlwin.cpp:659
+#, c-format
+msgid "HTML anchor %s does not exist."
+msgstr "%s HTML çapası bulunamadı."
+
+#: ../src/html/helpwnd.cpp:1550
+msgid "HTML files (*.html;*.htm)|*.html;*.htm|"
+msgstr "HTML dosyaları (*.html;*.htm)|*.html;*.htm|"
+
+#: ../src/common/stockitem.cpp:162
+msgid "Harddisk"
+msgstr "Sabit disk"
+
+#: ../src/common/fmapbase.cpp:155
+msgid "Hebrew (ISO-8859-8)"
+msgstr "İbranice (ISO-8859-8)"
+
+#: ../include/wx/msgdlg.h:275 ../src/osx/button_osx.cpp:39
+#: ../src/common/stockitem.cpp:163 ../src/html/helpdlg.cpp:66
+#: ../src/html/helpfrm.cpp:116
+msgid "Help"
+msgstr "Yardım"
+
+#: ../src/html/helpwnd.cpp:1213
+msgid "Help Browser Options"
+msgstr "Yardım Tarayıcısı Ayarları"
+
+#: ../src/generic/helpext.cpp:458 ../src/generic/helpext.cpp:459
+msgid "Help Index"
+msgstr "Yardım Dizini"
+
+#: ../src/html/helpwnd.cpp:1534
+msgid "Help Printing"
+msgstr "Yardım Yazdırma"
+
+#: ../src/html/helpwnd.cpp:814
+msgid "Help Topics"
+msgstr "Yardım Konuları"
+
+#: ../src/html/helpwnd.cpp:1551
+msgid "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+msgstr "Yardım kitapları (*.htb)|*.htb|Yardım kitapları (*.zip)|*.zip|"
+
+#: ../src/generic/helpext.cpp:271
+#, c-format
+msgid "Help directory \"%s\" not found."
+msgstr "\"%s\" yardım klasörü bulunamadı."
+
+#: ../src/generic/helpext.cpp:279
+#, c-format
+msgid "Help file \"%s\" not found."
+msgstr "\"%s\" yardım dosyası bulunamadı."
+
+#: ../src/html/helpctrl.cpp:63
+#, c-format
+msgid "Help: %s"
+msgstr "Yardım: %s"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:649
+#, c-format
+msgid "Hide %s"
+msgstr "%s gizleyin"
+
+#: ../src/osx/menu_osx.cpp:604 ../src/osx/menu_osx.cpp:651
+msgid "Hide Others"
+msgstr "Diğerlerini Gizleyin"
+
+#: ../src/generic/infobar.cpp:85
+msgid "Hide this notification message."
+msgstr "Bu uyarı iletisini gizleyin."
+
+#: ../src/generic/dirdlgg.cpp:98 ../src/common/stockitem.cpp:164
+msgid "Home"
+msgstr "Açılış"
+
+#: ../src/generic/dirctrlg.cpp:624
+msgid "Home directory"
+msgstr "Açılış klasörü"
+
+#: ../src/richtext/richtextsizepage.cpp:253
+#: ../src/richtext/richtextsizepage.cpp:255
+msgid "How the object will float relative to the text."
+msgstr "Nesnenin metne göre nasıl yüzeceği."
+
+#: ../src/common/imagbmp.cpp:1118
+msgid "ICO: Error in reading mask DIB."
+msgstr "ICO: DIB maskesi okuma hatası."
+
+#: ../src/common/imagbmp.cpp:1233 ../src/common/imagbmp.cpp:1294
+#: ../src/common/imagbmp.cpp:1305 ../src/common/imagbmp.cpp:1318
+#: ../src/common/imagbmp.cpp:1363 ../src/common/imagbmp.cpp:1375
+#: ../src/common/imagbmp.cpp:1386
+msgid "ICO: Error writing the image file!"
+msgstr "ICO: Görsel dosyası yazma hatası!"
+
+#: ../src/common/imagbmp.cpp:1198
+msgid "ICO: Image too tall for an icon."
+msgstr "ICO: Görsel simge için çok uzun."
+
+#: ../src/common/imagbmp.cpp:1206
+msgid "ICO: Image too wide for an icon."
+msgstr "ICO: Görsel simge için çok geniş."
+
+#: ../src/common/imagbmp.cpp:1466
+msgid "ICO: Invalid icon index."
+msgstr "ICO: Geçersiz simge dizini."
+
+#: ../src/common/imagiff.cpp:759
+msgid "IFF: data stream seems to be truncated."
+msgstr "IIF: veri akışı budanmış görünüyor."
+
+#: ../src/common/imagiff.cpp:743
+msgid "IFF: error in IFF image format."
+msgstr "IIF: IFF görsel biçimi hatası."
+
+#: ../src/common/imagiff.cpp:746
+msgid "IFF: not enough memory."
+msgstr "IIF: yetersiz bellek."
+
+#: ../src/common/imagiff.cpp:749
+msgid "IFF: unknown error!!!"
+msgstr "IIF: bilinmeyen hata!!!"
+
+#: ../src/common/accelcmn.cpp:50
+msgid "INS"
+msgstr "INS"
+
+#: ../src/common/accelcmn.cpp:51
+msgid "INSERT"
+msgstr "INSERT"
+
+#: ../src/common/fmapbase.cpp:197
+msgid "ISO-2022-JP"
+msgstr "ISO-2022-JP"
+
+#: ../src/osx/carbon/dataview.cpp:2420
+msgid "Icon & text renderer cannot render value; value type: "
+msgstr "Simge ve metin görüntüleyici değeri işleyemiyor; değer tipi:"
+
+#: ../src/html/htmprint.cpp:282
+msgid ""
+"If possible, try changing the layout parameters to make the printout more "
+"narrow."
+msgstr ""
+"Olabiliyorsa, çıktıyı daraltmak için sayfa ayarlarını değiştirmeyi deneyin."
+
+#: ../src/generic/dbgrptg.cpp:358
+msgid ""
+"If you have any additional information pertaining to this bug\n"
+"report, please enter it here and it will be joined to it:"
+msgstr ""
+"Bu hata raporuna ekleyeceğiniz bir bilgi varsa,\n"
+"lütfen buraya yazın:"
+
+#: ../src/generic/dbgrptg.cpp:324
+msgid ""
+"If you wish to suppress this debug report completely, please choose the "
+"\"Cancel\" button,\n"
+"but be warned that it may hinder improving the program, so if\n"
+"at all possible please do continue with the report generation.\n"
+msgstr ""
+"Bu hata raporunu göndermek istemiyorsanız, \"İptal\" düğmesine tıklayın,\n"
+"ancak bu rapor, yazılımın geliştirilmesine yardımcı olabilir, \n"
+"bu nedenle olanağınız varsa raporu gönderin.\n"
+
+#: ../src/msw/registry.cpp:1395
+#, c-format
+msgid "Ignoring value \"%s\" of the key \"%s\"."
+msgstr "\"%s\" değeri \"%s\" anahtarı için yok sayılıyor."
+
+#: ../src/common/xtistrm.cpp:299
+msgid "Illegal Object Class (Non-wxEvtHandler) as Event Source"
+msgstr "Olay kaynağı nesne sınıfı geçersiz (Non-wxEvtHandler)"
+
+#: ../src/common/xti.cpp:513
+msgid "Illegal Parameter Count for ConstructObject Method"
+msgstr "ConstructObject yordamı için parametre sayısı geçersiz"
+
+#: ../src/common/xti.cpp:501
+msgid "Illegal Parameter Count for Create Method"
+msgstr "Create yordamı için parametre sayısı geçersiz"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/filectrlg.cpp:791
+msgid "Illegal directory name."
+msgstr "Klasör adı geçersiz."
+
+#: ../src/generic/filectrlg.cpp:1380
+msgid "Illegal file specification."
+msgstr "Dosya tanımı geçersiz."
+
+#: ../src/common/image.cpp:2158
+msgid "Image and mask have different sizes."
+msgstr "Görsel ve maske farklı boyutlarda."
+
+#: ../src/common/image.cpp:2609
+#, c-format
+msgid "Image file is not of type %d."
+msgstr "Görsel dosyası %d tipinde değil."
+
+#: ../src/common/image.cpp:2739
+#, c-format
+msgid "Image is not of type %s."
+msgstr "Görsel dosyası %s tipinde değil."
+
+#: ../src/msw/textctrl.cpp:399
+msgid ""
+"Impossible to create a rich edit control, using simple text control instead. "
+"Please reinstall riched32.dll"
+msgstr ""
+"Zengin metin denetimi oluşturulamıyor. Onun yerine basit metin denetimi "
+"kullanılacak. Lütfen riched32.dll kitaplığını yeniden yükleyin."
+
+#: ../src/unix/utilsunx.cpp:307
+msgid "Impossible to get child process input"
+msgstr "Alt iş girdisi alınamıyor"
+
+#: ../src/common/filefn.cpp:1074
+#, c-format
+msgid "Impossible to get permissions for file '%s'"
+msgstr "'%s' dosyasının izinleri okunamıyor"
+
+#: ../src/common/filefn.cpp:1088
+#, c-format
+msgid "Impossible to overwrite the file '%s'"
+msgstr "'%s' dosyasının üzerine yazılamıyor"
+
+#: ../src/common/filefn.cpp:1142
+#, c-format
+msgid "Impossible to set permissions for the file '%s'"
+msgstr "'%s' dosyasının izinleri değiştirilemiyor"
+
+#: ../src/common/gifdecod.cpp:818
+#, c-format
+msgid "Incorrect GIF frame size (%u, %d) for the frame #%u"
+msgstr "GIF kare sayısı yanlış (%u, %d) #%u karesi"
+
+#: ../src/msw/ole/automtn.cpp:624
+msgid "Incorrect number of arguments."
+msgstr "Argüman sayısı hatalı."
+
+#: ../src/common/stockitem.cpp:165
+msgid "Indent"
+msgstr "Girinti"
+
+#: ../src/richtext/richtextformatdlg.cpp:330
+msgid "Indents && Spacing"
+msgstr "Girinti ve Boşluklar"
+
+#: ../src/common/stockitem.cpp:166 ../src/html/helpwnd.cpp:525
+msgid "Index"
+msgstr "Dizin"
+
+#: ../src/common/fmapbase.cpp:159
+msgid "Indian (ISO-8859-12)"
+msgstr "Hintçe (ISO-8859-12)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "Info"
+msgstr "Bilgiler"
+
+#: ../src/common/init.cpp:276
+msgid "Initialization failed in post init, aborting."
+msgstr "Hazırlığın ardından başlatılamadı, vazgeçiliyor."
+
+#: ../src/richtext/richtextsymboldlg.cpp:472
+msgid "Insert"
+msgstr "Ekleyin"
+
+#: ../src/richtext/richtextbuffer.cpp:7687
+msgid "Insert Field"
+msgstr "Alan Ekleyin"
+
+#: ../src/richtext/richtextbuffer.cpp:7598
+#: ../src/richtext/richtextbuffer.cpp:8551
+msgid "Insert Image"
+msgstr "Görsel Ekleyin"
+
+#: ../src/richtext/richtextbuffer.cpp:7645
+msgid "Insert Object"
+msgstr "Nesne Ekleyin"
+
+#: ../src/richtext/richtextctrl.cpp:1172 ../src/richtext/richtextctrl.cpp:1362
+#: ../src/richtext/richtextbuffer.cpp:7440
+#: ../src/richtext/richtextbuffer.cpp:7470
+#: ../src/richtext/richtextbuffer.cpp:7514
+msgid "Insert Text"
+msgstr "Metin Ekleyin"
+
+#: ../src/richtext/richtextindentspage.cpp:295
+#: ../src/richtext/richtextindentspage.cpp:297
+msgid "Inserts a page break before the paragraph."
+msgstr "Paragraftan önce bir sayfa sonu ekler."
+
+#: ../src/richtext/richtextborderspage.cpp:549
+msgid "Inset"
+msgstr "Gömme"
+
+#: ../src/gtk/app.cpp:429
+#, c-format
+msgid "Invalid GTK+ command line option, use \"%s --help\""
+msgstr "Geçersiz GTK+ komut satırı seçeneği, \"%s --help\" yazarak yardım alın"
+
+#: ../src/common/imagtiff.cpp:314
+msgid "Invalid TIFF image index."
+msgstr "TIFF görsel dizini geçersiz."
+
+#: ../src/osx/carbon/dataview.cpp:1782 ../src/osx/carbon/dataview.cpp:1877
+msgid "Invalid data view item"
+msgstr "Veri görünümü ögesi geçersiz"
+
+#: ../src/common/appcmn.cpp:266
+#, c-format
+msgid "Invalid display mode specification '%s'."
+msgstr "'%s' görünüm kipi özelliği geçersiz."
+
+#: ../src/x11/app.cpp:121
+#, c-format
+msgid "Invalid geometry specification '%s'"
+msgstr "'%s' geometri özelliği geçersiz."
+
+#: ../src/unix/fswatcher_inotify.cpp:298
+#, c-format
+msgid "Invalid inotify event for \"%s\""
+msgstr "\"%s\" için inotify etkinliği geçersiz"
+
+#: ../src/unix/snglinst.cpp:306
+#, c-format
+msgid "Invalid lock file '%s'."
+msgstr "'%s' kilit dosyası geçersiz."
+
+#: ../src/common/translation.cpp:1111
+msgid "Invalid message catalog."
+msgstr "İleti kataloğu geçersiz."
+
+#: ../src/common/xtistrm.cpp:409 ../src/common/xtistrm.cpp:424
+msgid "Invalid or Null Object ID passed to GetObjectClassInfo"
+msgstr "GetObjectClassInfo işlevine geçersiz ya da boş nesne kodu gönderildi"
+
+#: ../src/common/xtistrm.cpp:439
+msgid "Invalid or Null Object ID passed to HasObjectClassInfo"
+msgstr "HasObjectClassInfo işlevine geçersiz ya da boş nesne kodu gönderildi"
+
+#: ../src/common/regex.cpp:313
+#, c-format
+msgid "Invalid regular expression '%s': %s"
+msgstr "Kurallı ifade geçersiz '%s': %s"
+
+#: ../src/common/config.cpp:226
+#, c-format
+msgid "Invalid value %ld for a boolean key \"%s\" in config file."
+msgstr "Ayar dosyasındaki %ld değeri \"%s\" ikili anahtarı için geçersiz."
+
+#: ../src/generic/fontdlgg.cpp:329 ../src/richtext/richtextfontpage.cpp:333
+#: ../src/osx/carbon/fontdlg.cpp:547 ../src/common/stockitem.cpp:168
+msgid "Italic"
+msgstr "Yatık"
+
+#: ../src/common/paper.cpp:131
+msgid "Italy Envelope, 110 x 230 mm"
+msgstr "İtalyan Zarf, 110 x 230 mm"
+
+#: ../src/common/imagjpeg.cpp:255
+msgid "JPEG: Couldn't load - file is probably corrupted."
+msgstr "JPEG: Yüklenemedi - dosya bozuk olabilir."
+
+#: ../src/common/imagjpeg.cpp:434
+msgid "JPEG: Couldn't save image."
+msgstr "JPEG: Görsel kaydedilemedi."
+
+#: ../src/common/paper.cpp:164
+msgid "Japanese Double Postcard 200 x 148 mm"
+msgstr "Japon Çift Postakartı 200 x 148 mm"
+
+#: ../src/common/paper.cpp:168
+msgid "Japanese Envelope Chou #3"
+msgstr "Japon Zarf Chou #3"
+
+#: ../src/common/paper.cpp:181
+msgid "Japanese Envelope Chou #3 Rotated"
+msgstr "Japon Zarf Chou #3 Çevrilmiş"
+
+#: ../src/common/paper.cpp:169
+msgid "Japanese Envelope Chou #4"
+msgstr "Japon Zarf Chou #4"
+
+#: ../src/common/paper.cpp:182
+msgid "Japanese Envelope Chou #4 Rotated"
+msgstr "Japon Zarf Chou #4 Çevrilmiş"
+
+#: ../src/common/paper.cpp:166
+msgid "Japanese Envelope Kaku #2"
+msgstr "Japon Zarf Kaku #2"
+
+#: ../src/common/paper.cpp:179
+msgid "Japanese Envelope Kaku #2 Rotated"
+msgstr "Japon Zarf Kaku #2 Çevrilmiş"
+
+#: ../src/common/paper.cpp:167
+msgid "Japanese Envelope Kaku #3"
+msgstr "Japon Zarf Kaku #3"
+
+#: ../src/common/paper.cpp:180
+msgid "Japanese Envelope Kaku #3 Rotated"
+msgstr "Japon Zarf Kaku #3 Çevrilmiş"
+
+#: ../src/common/paper.cpp:186
+msgid "Japanese Envelope You #4"
+msgstr "Japon Zarf You #4"
+
+#: ../src/common/paper.cpp:187
+msgid "Japanese Envelope You #4 Rotated"
+msgstr "Japon Zarf You #4 Çevrilmiş"
+
+#: ../src/common/paper.cpp:139
+msgid "Japanese Postcard 100 x 148 mm"
+msgstr "Japon Postakartı 100 x 148 mm"
+
+#: ../src/common/paper.cpp:176
+msgid "Japanese Postcard Rotated 148 x 100 mm"
+msgstr "Japon Postakartı Çevrilmiş 148 x 100 mm"
+
+#: ../src/common/stockitem.cpp:169
+msgid "Jump to"
+msgstr "Atlayın"
+
+#: ../src/common/stockitem.cpp:171
+msgid "Justified"
+msgstr "Hizalanmış"
+
+#: ../src/richtext/richtextindentspage.cpp:155
+#: ../src/richtext/richtextindentspage.cpp:157
+#: ../src/richtext/richtextliststylepage.cpp:344
+#: ../src/richtext/richtextliststylepage.cpp:346
+msgid "Justify text left and right."
+msgstr "Metin sola ve sağa hizalanır."
+
+#: ../src/common/fmapbase.cpp:163
+msgid "KOI8-R"
+msgstr "KOI8-R"
+
+#: ../src/common/fmapbase.cpp:164
+msgid "KOI8-U"
+msgstr "KOI8-U"
+
+#: ../src/common/accelcmn.cpp:254 ../src/common/accelcmn.cpp:336
+msgid "KP_"
+msgstr "KP_"
+
+#: ../src/common/accelcmn.cpp:103
+msgid "KP_ADD"
+msgstr "KP_ADD"
+
+#: ../src/common/accelcmn.cpp:98
+msgid "KP_BEGIN"
+msgstr "KP_BEGIN"
+
+#: ../src/common/accelcmn.cpp:106
+msgid "KP_DECIMAL"
+msgstr "KP_DECIMAL"
+
+#: ../src/common/accelcmn.cpp:100
+msgid "KP_DELETE"
+msgstr "KP_DELETE"
+
+#: ../src/common/accelcmn.cpp:107
+msgid "KP_DIVIDE"
+msgstr "KP_DIVIDE"
+
+#: ../src/common/accelcmn.cpp:92
+msgid "KP_DOWN"
+msgstr "KP_DOWN"
+
+#: ../src/common/accelcmn.cpp:97
+msgid "KP_END"
+msgstr "KP_END"
+
+#: ../src/common/accelcmn.cpp:87
+msgid "KP_ENTER"
+msgstr "KP_ENTER"
+
+#: ../src/common/accelcmn.cpp:101
+msgid "KP_EQUAL"
+msgstr "KP_EQUAL"
+
+#: ../src/common/accelcmn.cpp:88
+msgid "KP_HOME"
+msgstr "KP_HOME"
+
+#: ../src/common/accelcmn.cpp:99
+msgid "KP_INSERT"
+msgstr "KP_INSERT"
+
+#: ../src/common/accelcmn.cpp:89
+msgid "KP_LEFT"
+msgstr "KP_LEFT"
+
+#: ../src/common/accelcmn.cpp:102
+msgid "KP_MULTIPLY"
+msgstr "KP_MULTIPLY"
+
+#: ../src/common/accelcmn.cpp:95
+msgid "KP_NEXT"
+msgstr "KP_NEXT"
+
+#: ../src/common/accelcmn.cpp:96
+msgid "KP_PAGEDOWN"
+msgstr "KP_PAGEDOWN"
+
+#: ../src/common/accelcmn.cpp:94
+msgid "KP_PAGEUP"
+msgstr "KP_PAGEUP"
+
+#: ../src/common/accelcmn.cpp:93
+msgid "KP_PRIOR"
+msgstr "KP_PRIOR"
+
+#: ../src/common/accelcmn.cpp:91
+msgid "KP_RIGHT"
+msgstr "KP_RIGHT"
+
+#: ../src/common/accelcmn.cpp:104
+msgid "KP_SEPARATOR"
+msgstr "KP_SEPARATOR"
+
+#: ../src/common/accelcmn.cpp:85
+msgid "KP_SPACE"
+msgstr "KP_SPACE"
+
+#: ../src/common/accelcmn.cpp:105
+msgid "KP_SUBTRACT"
+msgstr "KP_SUBTRACT"
+
+#: ../src/common/accelcmn.cpp:86
+msgid "KP_TAB"
+msgstr "KP_TAB"
+
+#: ../src/common/accelcmn.cpp:90
+msgid "KP_UP"
+msgstr "KP_UP"
+
+#: ../src/richtext/richtextindentspage.cpp:270
+msgid "L&ine spacing:"
+msgstr "&Satır aralığı:"
+
+#: ../src/common/accelcmn.cpp:56
+msgid "LEFT"
+msgstr "LEFT"
+
+#: ../src/generic/prntdlgg.cpp:613 ../src/generic/prntdlgg.cpp:868
+msgid "Landscape"
+msgstr "Yatay"
+
+#: ../src/common/stockitem.cpp:174
+msgid "Last"
+msgstr "Son"
+
+#: ../src/common/prntbase.cpp:1542
+msgid "Last page"
+msgstr "Son sayfa"
+
+#: ../src/common/log.cpp:309
+#, c-format
+msgid "Last repeated message (\"%s\", %lu time) wasn't output"
+msgid_plural "Last repeated message (\"%s\", %lu times) wasn't output"
+msgstr[0] "Son yinelenen ileti (\"%s\", %lu kez) çıkış değildi"
+
+#: ../src/common/paper.cpp:104
+msgid "Ledger, 17 x 11 in"
+msgstr "Ledger, 17 x 11 inç"
+
+#: ../src/richtext/richtextliststylepage.cpp:249
+#: ../src/richtext/richtextliststylepage.cpp:252
+#: ../src/richtext/richtextliststylepage.cpp:253
+#: ../src/richtext/richtextbulletspage.cpp:199
+#: ../src/richtext/richtextbulletspage.cpp:202
+#: ../src/richtext/richtextbulletspage.cpp:203
+#: ../src/richtext/richtextsizepage.cpp:249
+msgid "Left"
+msgstr "Sol"
+
+#: ../src/richtext/richtextindentspage.cpp:204
+#: ../src/richtext/richtextliststylepage.cpp:390
+msgid "Left (&first line):"
+msgstr "Sol (i&lk satır):"
+
+#: ../src/generic/prntdlgg.cpp:880
+msgid "Left margin (mm):"
+msgstr "Sol kenar boşluğu (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:141
+#: ../src/richtext/richtextindentspage.cpp:143
+#: ../src/richtext/richtextliststylepage.cpp:330
+#: ../src/richtext/richtextliststylepage.cpp:332
+msgid "Left-align text."
+msgstr "Metin sola yaslanır."
+
+#: ../src/common/paper.cpp:145
+msgid "Legal Extra 9 1/2 x 15 in"
+msgstr "Legal Ek 9 1/2 x 15 inç"
+
+#: ../src/common/paper.cpp:97
+msgid "Legal, 8 1/2 x 14 in"
+msgstr "Legal, 8 1/2 x 14 inç"
+
+#: ../src/common/paper.cpp:144
+msgid "Letter Extra 9 1/2 x 12 in"
+msgstr "Letter Ek 9 1/2 x 12 inç"
+
+#: ../src/common/paper.cpp:150
+msgid "Letter Extra Transverse 9.275 x 12 in"
+msgstr "Letter Ek Enine 9.275 x 12 inç"
+
+#: ../src/common/paper.cpp:153
+msgid "Letter Plus 8 1/2 x 12.69 in"
+msgstr "Letter Artı 8 1/2 x 12.69 inç"
+
+#: ../src/common/paper.cpp:170
+msgid "Letter Rotated 11 x 8 1/2 in"
+msgstr "Letter Çevrilmiş 11 x 8 1/2 inç"
+
+#: ../src/common/paper.cpp:102
+msgid "Letter Small, 8 1/2 x 11 in"
+msgstr "Letter Küçük, 8 1/2 x 11 inç"
+
+#: ../src/common/paper.cpp:148
+msgid "Letter Transverse 8 1/2 x 11 in"
+msgstr "Letter Enine 8 1/2 x 11 inç"
+
+#: ../src/common/paper.cpp:96
+msgid "Letter, 8 1/2 x 11 in"
+msgstr "Letter, 8 1/2 x 11 inç"
+
+#: ../src/generic/aboutdlgg.cpp:173
+msgid "License"
+msgstr "Lisans"
+
+#: ../src/generic/fontdlgg.cpp:332
+msgid "Light"
+msgstr "Açık"
+
+#: ../src/generic/helpext.cpp:298
+#, c-format
+msgid "Line %lu of map file \"%s\" has invalid syntax, skipped."
+msgstr "%lu. satır \"%s\" eşleştirme dosyasında sözdizimi hatası var, atlandı."
+
+#: ../src/richtext/richtextliststylepage.cpp:444
+msgid "Line spacing:"
+msgstr "Satır aralığı:"
+
+#: ../src/html/chm.cpp:838
+msgid "Link contained '//', converted to absolute link."
+msgstr "Bağlantı '//' içeriyor, mutlak bağlantıya dönüştürüldü."
+
+#: ../src/richtext/richtextformatdlg.cpp:349
+msgid "List Style"
+msgstr "Liste Stili"
+
+#: ../src/richtext/richtextstyles.cpp:1060
+msgid "List styles"
+msgstr "Liste stilleri"
+
+#: ../src/richtext/richtextfontpage.cpp:206
+#: ../src/richtext/richtextfontpage.cpp:208
+msgid "Lists font sizes in points."
+msgstr "Yazı tipi boyutları punto olarak listelenir."
+
+#: ../src/richtext/richtextfontpage.cpp:199
+#: ../src/richtext/richtextfontpage.cpp:201
+msgid "Lists the available fonts."
+msgstr "Kullanılabilir yazı tipleri listelenir."
+
+#: ../src/common/fldlgcmn.cpp:325
+#, c-format
+msgid "Load %s file"
+msgstr "%s dosyasını yükleyin"
+
+#: ../src/html/htmlwin.cpp:575
+msgid "Loading : "
+msgstr "Yükleniyor :"
+
+#: ../src/unix/snglinst.cpp:246
+#, c-format
+msgid "Lock file '%s' has incorrect owner."
+msgstr "'%s' kilit dosyasının sahibi hatalı."
+
+#: ../src/unix/snglinst.cpp:251
+#, c-format
+msgid "Lock file '%s' has incorrect permissions."
+msgstr "'%s' kilit dosyasının izinleri doğru değil."
+
+#: ../src/generic/logg.cpp:582
+#, c-format
+msgid "Log saved to the file '%s'."
+msgstr "Günlük '%s' dosyasına kaydedildi."
+
+#: ../src/richtext/richtextliststylepage.cpp:484
+#: ../src/richtext/richtextbulletspage.cpp:289
+msgid "Lower case letters"
+msgstr "Küçük harfler"
+
+#: ../src/richtext/richtextliststylepage.cpp:486
+#: ../src/richtext/richtextbulletspage.cpp:291
+msgid "Lower case roman numerals"
+msgstr "Küçük harf Romen rakamları"
+
+#: ../src/gtk/mdi.cpp:422 ../src/gtk1/mdi.cpp:431
+msgid "MDI child"
+msgstr "MDI alt"
+
+#: ../src/common/accelcmn.cpp:68
+msgid "MENU"
+msgstr "MENU"
+
+#: ../src/msw/helpchm.cpp:56
+msgid ""
+"MS HTML Help functions are unavailable because the MS HTML Help library is "
+"not installed on this machine. Please install it."
+msgstr ""
+"MS HTML Yardım kitaplığı yüklü olmadığından yardım işlevleri kullanılamıyor. "
+"Lütfen yükleyin."
+
+#: ../src/univ/themes/win32.cpp:3754
+msgid "Ma&ximize"
+msgstr "Ekranı &kaplatın"
+
+#: ../src/common/fmapbase.cpp:203
+msgid "MacArabic"
+msgstr "MacArapça"
+
+#: ../src/common/fmapbase.cpp:222
+msgid "MacArmenian"
+msgstr "MacErmenice"
+
+#: ../src/common/fmapbase.cpp:211
+msgid "MacBengali"
+msgstr "MacBengalce"
+
+#: ../src/common/fmapbase.cpp:217
+msgid "MacBurmese"
+msgstr "MacBurmese"
+
+#: ../src/common/fmapbase.cpp:236
+msgid "MacCeltic"
+msgstr "MacKeltçe"
+
+#: ../src/common/fmapbase.cpp:227
+msgid "MacCentralEurRoman"
+msgstr "MacOrtaAvrupaRoman"
+
+#: ../src/common/fmapbase.cpp:223
+msgid "MacChineseSimp"
+msgstr "MacÇinceBasit"
+
+#: ../src/common/fmapbase.cpp:201
+msgid "MacChineseTrad"
+msgstr "MacÇinceGeleneksel"
+
+#: ../src/common/fmapbase.cpp:233
+msgid "MacCroatian"
+msgstr "MacHırvatça"
+
+#: ../src/common/fmapbase.cpp:206
+msgid "MacCyrillic"
+msgstr "MacKiril"
+
+#: ../src/common/fmapbase.cpp:207
+msgid "MacDevanagari"
+msgstr "MacDevanagari"
+
+#: ../src/common/fmapbase.cpp:231
+msgid "MacDingbats"
+msgstr "MacDingbats"
+
+#: ../src/common/fmapbase.cpp:226
+msgid "MacEthiopic"
+msgstr "MacEtyopça"
+
+#: ../src/common/fmapbase.cpp:229
+msgid "MacExtArabic"
+msgstr "MacExtArapça"
+
+#: ../src/common/fmapbase.cpp:237
+msgid "MacGaelic"
+msgstr "MacGaliçce"
+
+#: ../src/common/fmapbase.cpp:221
+msgid "MacGeorgian"
+msgstr "MacAzerice"
+
+#: ../src/common/fmapbase.cpp:205
+msgid "MacGreek"
+msgstr "MacYunanca"
+
+#: ../src/common/fmapbase.cpp:209
+msgid "MacGujarati"
+msgstr "MacGujarati"
+
+#: ../src/common/fmapbase.cpp:208
+msgid "MacGurmukhi"
+msgstr "MacGurmukhi"
+
+#: ../src/common/fmapbase.cpp:204
+msgid "MacHebrew"
+msgstr "Macİbranice"
+
+#: ../src/common/fmapbase.cpp:234
+msgid "MacIcelandic"
+msgstr "MacIzlandaca"
+
+#: ../src/common/fmapbase.cpp:200
+msgid "MacJapanese"
+msgstr "MacJaponca"
+
+#: ../src/common/fmapbase.cpp:214
+msgid "MacKannada"
+msgstr "MacKanada"
+
+#: ../src/common/fmapbase.cpp:238
+msgid "MacKeyboardGlyphs"
+msgstr "MacKeyboardGlyphs"
+
+#: ../src/common/fmapbase.cpp:218
+msgid "MacKhmer"
+msgstr "MacKmerce"
+
+#: ../src/common/fmapbase.cpp:202
+msgid "MacKorean"
+msgstr "MacKorece"
+
+#: ../src/common/fmapbase.cpp:220
+msgid "MacLaotian"
+msgstr "MacLaotian"
+
+#: ../src/common/fmapbase.cpp:215
+msgid "MacMalayalam"
+msgstr "MacMalayca"
+
+#: ../src/common/fmapbase.cpp:225
+msgid "MacMongolian"
+msgstr "MacMongolca"
+
+#: ../src/common/fmapbase.cpp:210
+msgid "MacOriya"
+msgstr "MacOriya"
+
+#: ../src/common/fmapbase.cpp:199
+msgid "MacRoman"
+msgstr "MacRoman"
+
+#: ../src/common/fmapbase.cpp:235
+msgid "MacRomanian"
+msgstr "MacRomence"
+
+#: ../src/common/fmapbase.cpp:216
+msgid "MacSinhalese"
+msgstr "MacSinhalese"
+
+#: ../src/common/fmapbase.cpp:230
+msgid "MacSymbol"
+msgstr "MacSimge"
+
+#: ../src/common/fmapbase.cpp:212
+msgid "MacTamil"
+msgstr "MacTamil"
+
+#: ../src/common/fmapbase.cpp:213
+msgid "MacTelugu"
+msgstr "MacTelugu"
+
+#: ../src/common/fmapbase.cpp:219
+msgid "MacThai"
+msgstr "MacTay"
+
+#: ../src/common/fmapbase.cpp:224
+msgid "MacTibetan"
+msgstr "MacTibetçe"
+
+#: ../src/common/fmapbase.cpp:232
+msgid "MacTurkish"
+msgstr "MacTürkçe"
+
+#: ../src/common/fmapbase.cpp:228
+msgid "MacVietnamese"
+msgstr "MacVietnamca"
+
+#: ../src/propgrid/advprops.cpp:2031
+msgid "Make a selection:"
+msgstr "Bir seçim yapın:"
+
+#: ../src/richtext/richtextformatdlg.cpp:362
+#: ../src/richtext/richtextmarginspage.cpp:172
+msgid "Margins"
+msgstr "Kenar Boşlukları"
+
+#: ../src/generic/fdrepdlg.cpp:147
+msgid "Match case"
+msgstr "Küçük büyük harf eşleştirilsin"
+
+#: ../src/richtext/richtextsizepage.cpp:463
+msgid "Max height:"
+msgstr "En fazla yükseklik:"
+
+#: ../src/richtext/richtextsizepage.cpp:436
+msgid "Max width:"
+msgstr "En fazla genişlik:"
+
+#: ../src/unix/mediactrl.cpp:1006
+#, c-format
+msgid "Media playback error: %s"
+msgstr "Ortam oynatma hatası: %s"
+
+#: ../src/common/fs_mem.cpp:175
+#, c-format
+msgid "Memory VFS already contains file '%s'!"
+msgstr "'%s' dosyası zaten VFS belleğinde yer alıyor!"
+
+#: ../src/msw/frame.cpp:347
+msgid "Menu"
+msgstr "Menü"
+
+#: ../src/common/msgout.cpp:124
+msgid "Message"
+msgstr "İleti"
+
+#: ../src/univ/themes/metal.cpp:168
+msgid "Metal theme"
+msgstr "Metal tema"
+
+#: ../src/msw/ole/automtn.cpp:641
+msgid "Method or property not found."
+msgstr "Yordam ya da özellik bulunamadı"
+
+#: ../src/univ/themes/win32.cpp:3752
+msgid "Mi&nimize"
+msgstr "Simge &durumuna küçültün"
+
+#: ../src/richtext/richtextsizepage.cpp:409
+msgid "Min height:"
+msgstr "En az yükseklik:"
+
+#: ../src/richtext/richtextsizepage.cpp:382
+msgid "Min width:"
+msgstr "En az genişlik:"
+
+#: ../src/msw/ole/automtn.cpp:657
+msgid "Missing a required parameter."
+msgstr "Gereken bir parametre eksik."
+
+#: ../src/generic/fontdlgg.cpp:324
+msgid "Modern"
+msgstr "Modern"
+
+#: ../src/generic/filectrlg.cpp:462
+msgid "Modified"
+msgstr "Değişiklik"
+
+#: ../src/common/module.cpp:133
+#, c-format
+msgid "Module \"%s\" initialization failed"
+msgstr "\"%s\" modülü başlatılamadı"
+
+#: ../src/common/paper.cpp:132
+msgid "Monarch Envelope, 3 7/8 x 7 1/2 in"
+msgstr "Monarşi Zarf, 3 7/8 x 7 1/2 inç"
+
+#: ../src/msw/fswatcher.cpp:143
+msgid "Monitoring individual files for changes is not supported currently."
+msgstr "Tek tek dosyaların değişiminin izlenmesi şu anda desteklenmiyor."
+
+#: ../src/generic/editlbox.cpp:276
+msgid "Move down"
+msgstr "Aşağı taşıyın"
+
+#: ../src/generic/editlbox.cpp:275
+msgid "Move up"
+msgstr "Yukarı taşıyın"
+
+#: ../src/richtext/richtextsizepage.cpp:682
+#: ../src/richtext/richtextsizepage.cpp:684
+msgid "Moves the object to the next paragraph."
+msgstr "Nesne sonraki paragrafa taşınır."
+
+#: ../src/richtext/richtextsizepage.cpp:676
+#: ../src/richtext/richtextsizepage.cpp:678
+msgid "Moves the object to the previous paragraph."
+msgstr "Nesne önceki paragrafa taşınır."
+
+#: ../src/richtext/richtextbuffer.cpp:9345
+msgid "Multiple Cell Properties"
+msgstr "Çoklu Hücre Özellikleri"
+
+#: ../src/common/accelcmn.cpp:81
+msgid "NUM_LOCK"
+msgstr "NUM_LOCK"
+
+#: ../src/generic/filectrlg.cpp:459
+msgid "Name"
+msgstr "Ad"
+
+#: ../src/common/stockitem.cpp:175
+msgid "Network"
+msgstr "Ağ"
+
+#: ../src/common/stockitem.cpp:176
+msgid "New"
+msgstr "Yeni"
+
+#: ../src/richtext/richtextstyledlg.cpp:243
+msgid "New &Box Style..."
+msgstr "Yeni &Kutu Stili..."
+
+#: ../src/richtext/richtextstyledlg.cpp:225
+msgid "New &Character Style..."
+msgstr "Yeni &Karakter Stili..."
+
+#: ../src/richtext/richtextstyledlg.cpp:237
+msgid "New &List Style..."
+msgstr "Yeni &Liste Stili..."
+
+#: ../src/richtext/richtextstyledlg.cpp:231
+msgid "New &Paragraph Style..."
+msgstr "Yeni &Paragraf Stili..."
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:651
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:817
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:890
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:931
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "New Style"
+msgstr "Yeni Stil"
+
+#: ../src/generic/dirdlgg.cpp:102
+msgid "New directory"
+msgstr "Yeni klasör"
+
+#: ../src/generic/editlbox.cpp:273
+msgid "New item"
+msgstr "Yeni öge"
+
+#: ../src/generic/dirdlgg.cpp:326 ../src/generic/dirdlgg.cpp:336
+#: ../src/generic/filectrlg.cpp:653 ../src/generic/filectrlg.cpp:662
+msgid "NewName"
+msgstr "YeniAd"
+
+#: ../src/generic/tipdlg.cpp:305
+msgid "Next"
+msgstr "Sonraki"
+
+#: ../src/common/prntbase.cpp:1537 ../src/html/helpwnd.cpp:678
+msgid "Next page"
+msgstr "Sonraki sayfa"
+
+#: ../include/wx/msgdlg.h:272 ../src/common/stockitem.cpp:177
+#: ../src/motif/msgdlg.cpp:196
+msgid "No"
+msgstr "Hayır"
+
+#: ../src/generic/animateg.cpp:150
+#, c-format
+msgid "No animation handler for type %ld defined."
+msgstr "%ld tipi için canlandırma işleyicisi tanımlanmamış."
+
+#: ../src/dfb/bitmap.cpp:642 ../src/dfb/bitmap.cpp:676
+#, c-format
+msgid "No bitmap handler for type %d defined."
+msgstr "%d tipi için bit eşlemi işleyicisi tanımlanmamış."
+
+#: ../src/osx/carbon/dataview.cpp:1784
+msgid "No column existing."
+msgstr "Hiç bir sütun bulunamadı."
+
+#: ../src/osx/carbon/dataview.cpp:1674
+msgid "No column for the specified column existing."
+msgstr "Belirtilen sütun için varolan bir sütun yok."
+
+#: ../src/osx/carbon/dataview.cpp:1423
+msgid "No column for the specified column position existing."
+msgstr "Belirtilen konumda sütun bulunamadı."
+
+#: ../src/common/utilscmn.cpp:1049
+msgid "No default application configured for HTML files."
+msgstr "HTML dosyaları için varsayılan uygulama ayarlanmamış."
+
+#: ../src/generic/helpext.cpp:449
+msgid "No entries found."
+msgstr "Hiç bir kayıt bulunamadı."
+
+#: ../src/common/fontmap.cpp:421
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found,\n"
+"but an alternative encoding '%s' is available.\n"
+"Do you want to use this encoding (otherwise you will have to choose another "
+"one)?"
+msgstr ""
+"Metni '%s' kodlamasıyla görüntüleyecek bir yazı tipi yok,\n"
+"ancak onun yerine '%s' kodlama seçeneği kullanılabilir.\n"
+"Bu kodlamayı kullanmak istiyor musunuz (aksi halde başka bir tane "
+"seçmelisiniz) ?"
+
+#: ../src/common/fontmap.cpp:426
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found.\n"
+"Would you like to select a font to be used for this encoding\n"
+"(otherwise the text in this encoding will not be shown correctly)?"
+msgstr ""
+"Metni '%s' kodlamasıyla görüntüleyecek bir yazı tipi yok.\n"
+"Bu kodlamayı kullanabileceğiniz bir yazı tipi seçmek istiyor musunuz\n"
+"(aksi halde bu kodlamadaki metin doğru olarak görüntülenmez) ?"
+
+#: ../src/generic/animateg.cpp:142
+msgid "No handler found for animation type."
+msgstr "Canlandırma tipinin işleyicisi bulunamadı."
+
+#: ../src/common/image.cpp:2591
+msgid "No handler found for image type."
+msgstr "Görüntü tipinin işleyicisi bulunamadı."
+
+#: ../src/common/image.cpp:2599 ../src/common/image.cpp:2710
+#: ../src/common/image.cpp:2763
+#, c-format
+msgid "No image handler for type %d defined."
+msgstr "%d tipinin görüntü işleyicisi tanımlanmamış."
+
+#: ../src/common/image.cpp:2733 ../src/common/image.cpp:2777
+#, c-format
+msgid "No image handler for type %s defined."
+msgstr "%s tipinin görüntü işleyicisi tanımlanmamış."
+
+#: ../src/html/helpwnd.cpp:871
+msgid "No matching page found yet"
+msgstr "Henüz uyan bir sayfa bulunamadı"
+
+#: ../src/osx/carbon/dataview.cpp:1676 ../src/osx/carbon/dataview.cpp:1786
+msgid "No renderer or invalid renderer type specified for custom data column."
+msgstr "Özel veri sütunu için görüntüleyici belirtilmemiş ya da geçersiz."
+
+#: ../src/osx/carbon/dataview.cpp:1424
+msgid "No renderer specified for column."
+msgstr "Sütun görüntüleyici belirtilmemiş."
+
+#: ../src/unix/sound.cpp:81
+msgid "No sound"
+msgstr "Ses yok"
+
+#: ../src/common/image.cpp:2166 ../src/common/image.cpp:2207
+msgid "No unused colour in image being masked."
+msgstr "Maskelenen görselde kullanılmamış renk yok."
+
+#: ../src/common/image.cpp:3236
+msgid "No unused colour in image."
+msgstr "Görselde kullanılmamış renk yok"
+
+#: ../src/generic/helpext.cpp:306
+#, c-format
+msgid "No valid mappings found in the file \"%s\"."
+msgstr "\"%s\" dosyasında geçerli eşleme bulunamadı."
+
+#: ../src/richtext/richtextborderspage.cpp:542
+#: ../src/richtext/richtextsizepage.cpp:248
+#: ../src/richtext/richtextsizepage.cpp:252
+msgid "None"
+msgstr "Hiçbiri"
+
+#: ../src/common/fmapbase.cpp:157
+msgid "Nordic (ISO-8859-10)"
+msgstr "Norveçce (ISO-8859-10)"
+
+#: ../src/generic/fontdlgg.cpp:328 ../src/generic/fontdlgg.cpp:331
+msgid "Normal"
+msgstr "Normal"
+
+#: ../src/html/helpwnd.cpp:1276
+msgid "Normal face<br>and <u>underlined</u>. "
+msgstr "Normal yazı tipi <br>ve <u>altı çizili</u>. "
+
+#: ../src/html/helpwnd.cpp:1218
+msgid "Normal font:"
+msgstr "Normal yazı tipi:"
+
+#: ../src/propgrid/props.cpp:887
+#, c-format
+msgid "Not %s"
+msgstr "%s değil"
+
+#: ../include/wx/filename.h:586 ../include/wx/filename.h:591
+msgid "Not available"
+msgstr "Kullanılamıyor"
+
+#: ../src/richtext/richtextfontpage.cpp:340
+msgid "Not underlined"
+msgstr "Altı çizili değil"
+
+#: ../src/common/paper.cpp:116
+msgid "Note, 8 1/2 x 11 in"
+msgstr "Not, 8 1/2 x 11 inç"
+
+#: ../src/generic/notifmsgg.cpp:104
+msgid "Notice"
+msgstr "Bildirim"
+
+#: ../src/osx/carbon/dataview.cpp:902
+msgid "Number of columns could not be determined."
+msgstr "Sütun sayısı belirlenemedi."
+
+#: ../src/richtext/richtextliststylepage.cpp:487
+#: ../src/richtext/richtextbulletspage.cpp:292
+msgid "Numbered outline"
+msgstr "Numaralı taslak"
+
+#: ../include/wx/msgdlg.h:273 ../src/richtext/richtextstyledlg.cpp:297
+#: ../src/common/stockitem.cpp:178 ../src/msw/msgdlg.cpp:489
+#: ../src/msw/msgdlg.cpp:799 ../src/msw/dialog.cpp:120
+#: ../src/gtk1/fontdlg.cpp:138
+msgid "OK"
+msgstr "Tamam"
+
+#: ../src/msw/ole/automtn.cpp:681
+#, c-format
+msgid "OLE Automation error in %s: %s"
+msgstr "%s içinde OLE otomasyon hatası: %s"
+
+#: ../include/wx/richtext/richtextimagedlg.h:39
+msgid "Object Properties"
+msgstr "Nesne Özellikleri"
+
+#: ../src/msw/ole/automtn.cpp:649
+msgid "Object implementation does not support named arguments."
+msgstr "Nesne uygulaması adlandırılmış argümanları desteklemiyor."
+
+#: ../src/common/xtixml.cpp:264
+msgid "Objects must have an id attribute"
+msgstr "Nesnelerin bir kod özniteliği olmalıdır"
+
+#: ../src/common/docview.cpp:1755 ../src/common/docview.cpp:1797
+msgid "Open File"
+msgstr "Dosya Açın"
+
+#: ../src/html/helpwnd.cpp:684 ../src/html/helpwnd.cpp:1557
+msgid "Open HTML document"
+msgstr "HTML belgesi açın"
+
+#: ../src/generic/dbgrptg.cpp:163
+#, c-format
+msgid "Open file \"%s\""
+msgstr "Dosya açın \"%s\""
+
+#: ../src/common/stockitem.cpp:179
+msgid "Open..."
+msgstr "Açın..."
+
+#: ../src/osx/carbon/glcanvas.cpp:48
+#, c-format
+msgid "OpenGL function \"%s\" failed: %s (error %d)"
+msgstr "\"%s\" OpenGL işlevi çalıştırılamadı: %s (hata %d)"
+
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:821
+msgid "Operation not permitted."
+msgstr "İşleme izin verilmiyor."
+
+#: ../src/common/cmdline.cpp:735
+#, c-format
+msgid "Option '%s' can't be negated"
+msgstr "'%s' seçeneği yok sayılamaz"
+
+#: ../src/common/cmdline.cpp:899
+#, c-format
+msgid "Option '%s' requires a value."
+msgstr "'%s' seçeneğinin bir değeri olması gerekiyor."
+
+#: ../src/common/cmdline.cpp:982
+#, c-format
+msgid "Option '%s': '%s' cannot be converted to a date."
+msgstr "'%s' seçeneği: '%s' tarihe dönüştürülemiyor."
+
+#: ../src/generic/dirdlgg.cpp:187 ../src/generic/prntdlgg.cpp:618
+msgid "Options"
+msgstr "Ayarlar"
+
+#: ../src/generic/prntdlgg.cpp:615 ../src/generic/prntdlgg.cpp:869
+msgid "Orientation"
+msgstr "Yön"
+
+#: ../src/common/windowid.cpp:259
+msgid "Out of window IDs.  Recommend shutting down application."
+msgstr "Pencere kodları tükendi. Uygulamayı kapatmanız önerilir."
+
+#: ../src/richtext/richtextborderspage.cpp:400
+#: ../src/richtext/richtextborderspage.cpp:533
+msgid "Outline"
+msgstr "Taslak"
+
+#: ../src/richtext/richtextborderspage.cpp:550
+msgid "Outset"
+msgstr "Kabartma"
+
+#: ../src/msw/ole/automtn.cpp:645
+msgid "Overflow while coercing argument values."
+msgstr "Arguman değerleri zorlanırken taşma."
+
+#: ../src/common/accelcmn.cpp:84
+msgid "PAGEDOWN"
+msgstr "PAGEDOWN"
+
+#: ../src/common/accelcmn.cpp:83
+msgid "PAGEUP"
+msgstr "PAGEUP"
+
+#: ../src/common/accelcmn.cpp:69
+msgid "PAUSE"
+msgstr "PAUSE"
+
+#: ../src/common/imagpcx.cpp:457 ../src/common/imagpcx.cpp:480
+msgid "PCX: couldn't allocate memory"
+msgstr "PCX: bellek ayrılamadı."
+
+#: ../src/common/imagpcx.cpp:456
+msgid "PCX: image format unsupported"
+msgstr "PCX: görsel biçimi desteklenmiyor"
+
+#: ../src/common/imagpcx.cpp:479
+msgid "PCX: invalid image"
+msgstr "PCX: görsel geçersiz"
+
+#: ../src/common/imagpcx.cpp:442
+msgid "PCX: this is not a PCX file."
+msgstr "PCX: bu bir PCX dosyası değil."
+
+#: ../src/common/imagpcx.cpp:459 ../src/common/imagpcx.cpp:481
+msgid "PCX: unknown error !!!"
+msgstr "PCX: bilinmeyen hata !!!"
+
+#: ../src/common/imagpcx.cpp:458
+msgid "PCX: version number too low"
+msgstr "PCX: sürüm numarası çok küçük"
+
+#: ../src/common/accelcmn.cpp:55
+msgid "PGDN"
+msgstr "PGDN"
+
+#: ../src/common/accelcmn.cpp:54
+msgid "PGUP"
+msgstr "PGUP"
+
+#: ../src/common/imagpnm.cpp:91
+msgid "PNM: Couldn't allocate memory."
+msgstr "PNM: Bellek ayrılamadı."
+
+#: ../src/common/imagpnm.cpp:73
+msgid "PNM: File format is not recognized."
+msgstr "PNM: Dosya biçimi tanınamadı."
+
+#: ../src/common/imagpnm.cpp:112 ../src/common/imagpnm.cpp:134
+#: ../src/common/imagpnm.cpp:156
+msgid "PNM: File seems truncated."
+msgstr "PNM: Dosya budanmış görünüyor."
+
+#: ../src/common/paper.cpp:188
+msgid "PRC 16K 146 x 215 mm"
+msgstr "PRC 16K 146 x 215 mm"
+
+#: ../src/common/paper.cpp:201
+msgid "PRC 16K Rotated"
+msgstr "PRC 16K Çevrilmiş"
+
+#: ../src/common/paper.cpp:189
+msgid "PRC 32K 97 x 151 mm"
+msgstr "PRC 32K 97 x 151 mm"
+
+#: ../src/common/paper.cpp:202
+msgid "PRC 32K Rotated"
+msgstr "PRC 32K Çevrilmiş"
+
+#: ../src/common/paper.cpp:190
+msgid "PRC 32K(Big) 97 x 151 mm"
+msgstr "PRC 32K(Büyük) 97 x 151 mm"
+
+#: ../src/common/paper.cpp:203
+msgid "PRC 32K(Big) Rotated"
+msgstr "PRC 32K(Büyük) Çevrilmiş"
+
+#: ../src/common/paper.cpp:191
+msgid "PRC Envelope #1 102 x 165 mm"
+msgstr "PRC Zarf #1 102 x 165 mm"
+
+#: ../src/common/paper.cpp:204
+msgid "PRC Envelope #1 Rotated 165 x 102 mm"
+msgstr "PRC Zarf #1 Çevrilmiş 165 x 102 mm"
+
+#: ../src/common/paper.cpp:200
+msgid "PRC Envelope #10 324 x 458 mm"
+msgstr "PRC Zarf #10 324 x 458 mm"
+
+#: ../src/common/paper.cpp:213
+msgid "PRC Envelope #10 Rotated 458 x 324 mm"
+msgstr "PRC Zarf #10 Çevrilmiş 458 x 324 mm"
+
+#: ../src/common/paper.cpp:192
+msgid "PRC Envelope #2 102 x 176 mm"
+msgstr "PRC Zarf #2 102 x 176 mm"
+
+#: ../src/common/paper.cpp:205
+msgid "PRC Envelope #2 Rotated 176 x 102 mm"
+msgstr "PRC Zarf #2 Çevrilmiş 176 x 102 mm"
+
+#: ../src/common/paper.cpp:193
+msgid "PRC Envelope #3 125 x 176 mm"
+msgstr "PRC Zarf #3 125 x 176 mm"
+
+#: ../src/common/paper.cpp:206
+msgid "PRC Envelope #3 Rotated 176 x 125 mm"
+msgstr "PRC Zarf #3 Çevrilmiş 176 x 125 mm"
+
+#: ../src/common/paper.cpp:194
+msgid "PRC Envelope #4 110 x 208 mm"
+msgstr "PRC Zarf #4 110 x 208 mm"
+
+#: ../src/common/paper.cpp:207
+msgid "PRC Envelope #4 Rotated 208 x 110 mm"
+msgstr "PRC Zarf #4 Çevrilmiş 208 x 110 mm"
+
+#: ../src/common/paper.cpp:195
+msgid "PRC Envelope #5 110 x 220 mm"
+msgstr "PRC Zarf #5 110 x 220 mm"
+
+#: ../src/common/paper.cpp:208
+msgid "PRC Envelope #5 Rotated 220 x 110 mm"
+msgstr "PRC Zarf #5 Çevrilmiş 220 x 110 mm"
+
+#: ../src/common/paper.cpp:196
+msgid "PRC Envelope #6 120 x 230 mm"
+msgstr "PRC Zarf #6 120 x 230 mm"
+
+#: ../src/common/paper.cpp:209
+msgid "PRC Envelope #6 Rotated 230 x 120 mm"
+msgstr "PRC Zarf #6 Çevrilmiş 230 x 120 mm"
+
+#: ../src/common/paper.cpp:197
+msgid "PRC Envelope #7 160 x 230 mm"
+msgstr "PRC Zarf #7 160 x 230 mm"
+
+#: ../src/common/paper.cpp:210
+msgid "PRC Envelope #7 Rotated 230 x 160 mm"
+msgstr "PRC Zarf #7 Çevrilmiş 230 x 160 mm"
+
+#: ../src/common/paper.cpp:198
+msgid "PRC Envelope #8 120 x 309 mm"
+msgstr "PRC Zarf #8 120 x 309 mm"
+
+#: ../src/common/paper.cpp:211
+msgid "PRC Envelope #8 Rotated 309 x 120 mm"
+msgstr "PRC Zarf #8 Çevrilmiş 309 x 120 mm"
+
+#: ../src/common/paper.cpp:199
+msgid "PRC Envelope #9 229 x 324 mm"
+msgstr "PRC Zarf #9 229 x 324 mm"
+
+#: ../src/common/paper.cpp:212
+msgid "PRC Envelope #9 Rotated 324 x 229 mm"
+msgstr "PRC Zarf #9 Çevrilmiş 324 x 229 mm"
+
+#: ../src/common/accelcmn.cpp:72
+msgid "PRINT"
+msgstr "PRINT"
+
+#: ../src/richtext/richtextmarginspage.cpp:286
+msgid "Padding"
+msgstr "Yastıklama"
+
+#: ../src/common/prntbase.cpp:2044
+#, c-format
+msgid "Page %d"
+msgstr "Sayfa %d"
+
+#: ../src/common/prntbase.cpp:2042
+#, c-format
+msgid "Page %d of %d"
+msgstr "Sayfa %d / %d"
+
+#: ../src/gtk/print.cpp:774
+msgid "Page Setup"
+msgstr "Sayfa Düzeni"
+
+#: ../src/generic/prntdlgg.cpp:828 ../src/common/prntbase.cpp:467
+msgid "Page setup"
+msgstr "Sayfa düzeni"
+
+#: ../src/generic/prntdlgg.cpp:216
+msgid "Pages"
+msgstr "Sayfalar"
+
+#: ../src/generic/prntdlgg.cpp:602 ../src/generic/prntdlgg.cpp:801
+#: ../src/generic/prntdlgg.cpp:842 ../src/generic/prntdlgg.cpp:855
+#: ../src/generic/prntdlgg.cpp:1052 ../src/generic/prntdlgg.cpp:1057
+msgid "Paper size"
+msgstr "Kağıt boyutu"
+
+#: ../src/richtext/richtextstyles.cpp:1058
+msgid "Paragraph styles"
+msgstr "Paragraf stilleri"
+
+#: ../src/common/xtistrm.cpp:469
+msgid "Passing a already registered object to SetObject"
+msgstr "SetObject işlevine zaten kayıtlı olan bir nesne gönderildi"
+
+#: ../src/common/xtistrm.cpp:480
+msgid "Passing an unknown object to GetObject"
+msgstr "GetObject işlevine bilinmeyen bir nesne gönderildi"
+
+#: ../src/richtext/richtextctrl.cpp:3117 ../src/common/stockitem.cpp:180
+#: ../src/stc/stc_i18n.cpp:19
+msgid "Paste"
+msgstr "Yapıştırın"
+
+#: ../src/common/stockitem.cpp:262
+msgid "Paste selection"
+msgstr "Seçimi yapıştırın"
+
+#: ../src/richtext/richtextliststylepage.cpp:222
+#: ../src/richtext/richtextbulletspage.cpp:172
+msgid "Peri&od"
+msgstr "N&okta"
+
+#: ../src/generic/filectrlg.cpp:465
+msgid "Permissions"
+msgstr "İzinler"
+
+#: ../src/richtext/richtextbuffer.cpp:11942
+msgid "Picture Properties"
+msgstr "Görsel Özellikleri"
+
+#: ../include/wx/unix/pipe.h:47
+msgid "Pipe creation failed"
+msgstr "Boru oluşturulamadı"
+
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Please choose a valid font."
+msgstr "Lütfen geçerli bir yazı tipi seçin."
+
+#: ../src/gtk/filedlg.cpp:72
+msgid "Please choose an existing file."
+msgstr "Lütfen varolan bir dosya seçin."
+
+#: ../src/html/helpwnd.cpp:813
+msgid "Please choose the page to display:"
+msgstr "Lütfen görüntülenecek sayfayı seçin:"
+
+#: ../src/msw/dialup.cpp:785
+msgid "Please choose which ISP do you want to connect to"
+msgstr "Lütfen bağlanmak istediğiniz servis sağlayıcıyı seçin"
+
+#: ../src/msw/listctrl.cpp:372
+#, c-format
+msgid ""
+"Please install a newer version of comctl32.dll\n"
+"(at least version 4.70 is required but you have %d.%02d)\n"
+"or this program won't operate correctly."
+msgstr ""
+"Lütfen daha yeni bir comctl32.dll sürümü yükleyin\n"
+"(en az 4.70 sürümü kullanılabilir, %d.%02d sürümü yüklü)\n"
+"yoksa bu program düzgün şekilde çalışamaz."
+
+#: ../src/common/headerctrlcmn.cpp:59
+msgid "Please select the columns to show and define their order:"
+msgstr "Lütfen görüntülenecek sütunları seçin ve sıralarını belirleyin:"
+
+#: ../src/common/prntbase.cpp:521
+msgid "Please wait while printing..."
+msgstr "Yazdırılıyor, lütfen bekleyin..."
+
+#: ../src/propgrid/advprops.cpp:631
+msgid "Point Size"
+msgstr "Punto Boyutu"
+
+#: ../src/osx/carbon/dataview.cpp:1278 ../src/osx/carbon/dataview.cpp:1329
+#: ../src/osx/carbon/dataview.cpp:1420 ../src/osx/carbon/dataview.cpp:1443
+#: ../src/osx/carbon/dataview.cpp:1460 ../src/osx/carbon/dataview.cpp:1477
+#: ../src/osx/carbon/dataview.cpp:1670 ../src/osx/carbon/dataview.cpp:1779
+#: ../src/osx/carbon/dataview.cpp:1821 ../src/osx/carbon/dataview.cpp:1874
+#: ../src/osx/carbon/dataview.cpp:1997
+msgid "Pointer to data view control not set correctly."
+msgstr "Veri görünümü denetimi imleci doğru olarak ayarlanmamış."
+
+#: ../src/osx/carbon/dataview.cpp:1279 ../src/osx/carbon/dataview.cpp:1338
+#: ../src/osx/carbon/dataview.cpp:1421 ../src/osx/carbon/dataview.cpp:1478
+#: ../src/osx/carbon/dataview.cpp:1671 ../src/osx/carbon/dataview.cpp:1780
+#: ../src/osx/carbon/dataview.cpp:1822 ../src/osx/carbon/dataview.cpp:1875
+#: ../src/osx/carbon/dataview.cpp:1998
+msgid "Pointer to model not set correctly."
+msgstr "Model imleci doğru olarak ayarlanmamış."
+
+#: ../src/generic/prntdlgg.cpp:612 ../src/generic/prntdlgg.cpp:867
+msgid "Portrait"
+msgstr "Dikey"
+
+#: ../src/richtext/richtextsizepage.cpp:496
+msgid "Position"
+msgstr "Konum"
+
+#: ../src/generic/prntdlgg.cpp:298
+msgid "PostScript file"
+msgstr "PostScript dosyası"
+
+#: ../src/common/stockitem.cpp:181
+msgid "Preferences"
+msgstr "Ayarlar"
+
+#: ../src/osx/menu_osx.cpp:643
+msgid "Preferences..."
+msgstr "Ayarlar..."
+
+#: ../src/common/prntbase.cpp:529
+msgid "Preparing"
+msgstr "Hazırlanıyor"
+
+#: ../src/generic/fontdlgg.cpp:455 ../src/osx/carbon/fontdlg.cpp:576
+#: ../src/html/helpwnd.cpp:1235
+msgid "Preview:"
+msgstr "Önizleme:"
+
+#: ../src/common/prntbase.cpp:1523 ../src/html/helpwnd.cpp:677
+msgid "Previous page"
+msgstr "Önceki sayfa"
+
+#: ../src/generic/prntdlgg.cpp:143 ../src/generic/prntdlgg.cpp:157
+#: ../src/common/prntbase.cpp:409 ../src/common/prntbase.cpp:1511
+#: ../src/gtk/print.cpp:584 ../src/gtk/print.cpp:597
+msgid "Print"
+msgstr "Yazdırın"
+
+#: ../include/wx/prntbase.h:395 ../src/common/docview.cpp:1250
+msgid "Print Preview"
+msgstr "Baskı Önizlemesi"
+
+#: ../src/common/prntbase.cpp:1985 ../src/common/prntbase.cpp:2027
+#: ../src/common/prntbase.cpp:2035
+msgid "Print Preview Failure"
+msgstr "Baskı Önizleme Hatası"
+
+#: ../src/generic/prntdlgg.cpp:224
+msgid "Print Range"
+msgstr "Yazdırma Aralığı"
+
+#: ../src/generic/prntdlgg.cpp:449
+msgid "Print Setup"
+msgstr "Yazdırma Ayarları"
+
+#: ../src/generic/prntdlgg.cpp:621
+msgid "Print in colour"
+msgstr "Renkli yazdırın"
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print previe&w..."
+msgstr "Baskı ö&nizleme..."
+
+#: ../src/common/docview.cpp:1244
+msgid "Print preview creation failed."
+msgstr "Baskı önizleme oluşturulamadı."
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print preview..."
+msgstr "Baskı önizleme..."
+
+#: ../src/generic/prntdlgg.cpp:630
+msgid "Print spooling"
+msgstr "Yazdırma kuyruğu"
+
+#: ../src/html/helpwnd.cpp:688
+msgid "Print this page"
+msgstr "Bu sayfayı yazdırın"
+
+#: ../src/generic/prntdlgg.cpp:185
+msgid "Print to File"
+msgstr "Dosyaya Yazdırın"
+
+#: ../src/common/stockitem.cpp:183
+msgid "Print..."
+msgstr "Yazdırın..."
+
+#: ../src/generic/prntdlgg.cpp:493
+msgid "Printer"
+msgstr "Yazıcı"
+
+#: ../src/generic/prntdlgg.cpp:633
+msgid "Printer command:"
+msgstr "Yazıcı komutu:"
+
+#: ../src/generic/prntdlgg.cpp:180
+msgid "Printer options"
+msgstr "Yazıcı ayarları"
+
+#: ../src/generic/prntdlgg.cpp:645
+msgid "Printer options:"
+msgstr "Yazıcı ayarları:"
+
+#: ../src/generic/prntdlgg.cpp:916
+msgid "Printer..."
+msgstr "Yazıcı..."
+
+#: ../src/generic/prntdlgg.cpp:196
+msgid "Printer:"
+msgstr "Yazıcı:"
+
+#: ../include/wx/richtext/richtextprint.h:163 ../src/common/prntbase.cpp:518
+#: ../src/html/htmprint.cpp:277
+msgid "Printing"
+msgstr "Yazdırılıyor"
+
+#: ../src/common/prntbase.cpp:586
+msgid "Printing "
+msgstr "Yazdırılıyor"
+
+#: ../src/common/prntbase.cpp:330
+msgid "Printing Error"
+msgstr "Yazdırma Hatası"
+
+#: ../src/common/prntbase.cpp:544
+#, c-format
+msgid "Printing page %d of %d"
+msgstr "Yazdırılan sayfa %d / %d..."
+
+#: ../src/generic/printps.cpp:201
+#, c-format
+msgid "Printing page %d..."
+msgstr "Yazdırılan sayfa %d..."
+
+#: ../src/generic/printps.cpp:161
+msgid "Printing..."
+msgstr "Yazdırılıyor..."
+
+#: ../include/wx/richtext/richtextprint.h:109 ../include/wx/prntbase.h:263
+#: ../src/common/docview.cpp:2124
+msgid "Printout"
+msgstr "Çıktı"
+
+#: ../src/common/debugrpt.cpp:565
+#, c-format
+msgid ""
+"Processing debug report has failed, leaving the files in \"%s\" directory."
+msgstr ""
+"Hata ayıklama raporu oluşturulamadı, dosyalar \"%s\" klasöründe bırakıldı."
+
+#: ../src/osx/carbon/dataview.cpp:2472
+msgid "Progress renderer cannot render value type; value type: "
+msgstr "İşlem görüntüleyici değeri işleyemiyor; değer tipi:"
+
+#: ../src/common/prntbase.cpp:528
+msgid "Progress:"
+msgstr "İşlem:"
+
+#: ../src/common/stockitem.cpp:184
+msgid "Properties"
+msgstr "Özellikler"
+
+#: ../src/propgrid/manager.cpp:237
+msgid "Property"
+msgstr "Özellik"
+
+#: ../src/propgrid/propgrid.cpp:3144 ../src/propgrid/propgrid.cpp:3276
+msgid "Property Error"
+msgstr "Özellik Hatası"
+
+#: ../src/common/paper.cpp:113
+msgid "Quarto, 215 x 275 mm"
+msgstr "Quarto, 215 x 275 mm"
+
+#: ../src/generic/logg.cpp:1036
+msgid "Question"
+msgstr "Soru"
+
+#: ../src/common/stockitem.cpp:156
+msgid "Quit"
+msgstr "Çıkış"
+
+#: ../src/osx/menu_osx.cpp:610 ../src/osx/menu_osx.cpp:657
+#, c-format
+msgid "Quit %s"
+msgstr "%s uygulamasından çıkın"
+
+#: ../src/common/stockitem.cpp:263
+msgid "Quit this program"
+msgstr "Bu programdan çıkın"
+
+#: ../src/common/accelcmn.cpp:53
+msgid "RETURN"
+msgstr "RETURN"
+
+#: ../src/common/accelcmn.cpp:57
+msgid "RIGHT"
+msgstr "RIGHT"
+
+#: ../src/common/accelcmn.cpp:327
+msgid "RawCtrl+"
+msgstr "HamCtrl+"
+
+#: ../src/common/ffile.cpp:113 ../src/common/ffile.cpp:134
+#, c-format
+msgid "Read error on file '%s'"
+msgstr "'%s' dosyasında okuma hatası"
+
+#: ../src/common/prntbase.cpp:257
+msgid "Ready"
+msgstr "Hazır"
+
+#: ../src/common/stockitem.cpp:185 ../src/stc/stc_i18n.cpp:16
+msgid "Redo"
+msgstr "Yineleyin"
+
+#: ../src/common/stockitem.cpp:264
+msgid "Redo last action"
+msgstr "Son eylemi yeniden yapın"
+
+#: ../src/common/stockitem.cpp:186
+msgid "Refresh"
+msgstr "Yenileyin"
+
+#: ../src/msw/registry.cpp:625
+#, c-format
+msgid "Registry key '%s' already exists."
+msgstr "'%s' kayıt anahtarı zaten var."
+
+#: ../src/msw/registry.cpp:594
+#, c-format
+msgid "Registry key '%s' does not exist, cannot rename it."
+msgstr "'%s' kayıt anahtarı bulunamadığından yeniden adlandırılamıyor."
+
+#: ../src/msw/registry.cpp:726
+#, c-format
+msgid ""
+"Registry key '%s' is needed for normal system operation,\n"
+"deleting it will leave your system in unusable state:\n"
+"operation aborted."
+msgstr ""
+"'%s' kayıt anahtarı normal sistem işlemleri için gerekiyor,\n"
+"silinmesi sistemi kararsız bir hale getirir:\n"
+"işlem iptal edildi."
+
+#: ../src/msw/registry.cpp:520
+#, c-format
+msgid "Registry value '%s' already exists."
+msgstr "'%s' kayıt değeri zaten var."
+
+#: ../src/richtext/richtextfontpage.cpp:332
+#: ../src/richtext/richtextfontpage.cpp:336
+msgid "Regular"
+msgstr "Normal"
+
+#: ../src/richtext/richtextsizepage.cpp:519
+msgid "Relative"
+msgstr "Bağıl"
+
+#: ../src/generic/helpext.cpp:462
+msgid "Relevant entries:"
+msgstr "İlgili kayıtlar:"
+
+#: ../include/wx/generic/progdlgg.h:86
+msgid "Remaining time:"
+msgstr "Kalan süre:"
+
+#: ../src/common/stockitem.cpp:187
+msgid "Remove"
+msgstr "Silin"
+
+#: ../src/richtext/richtextctrl.cpp:1430
+msgid "Remove Bullet"
+msgstr "Madde İmini Kaldırın"
+
+#: ../src/html/helpwnd.cpp:440
+msgid "Remove current page from bookmarks"
+msgstr "Geçerli sayfayı yer imlerinden silin"
+
+#: ../src/common/rendcmn.cpp:194
+#, c-format
+msgid "Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."
+msgstr "\"%s\" görüntüleyicisinin %d.%d sürümü uyumsuz olduğundan yüklenemedi."
+
+#: ../src/osx/carbon/dataview.cpp:1430
+msgid "Rendering failed."
+msgstr "Görüntülenemiyor."
+
+#: ../src/richtext/richtextbuffer.cpp:4214
+msgid "Renumber List"
+msgstr "Listeyi Yeniden Numaralayın"
+
+#: ../src/common/stockitem.cpp:188
+msgid "Rep&lace"
+msgstr "&Değiştirin"
+
+#: ../src/richtext/richtextctrl.cpp:3277 ../src/common/stockitem.cpp:188
+msgid "Replace"
+msgstr "Değiştirin"
+
+#: ../src/generic/fdrepdlg.cpp:182
+msgid "Replace &all"
+msgstr "&Tümünü değiştirin"
+
+#: ../src/common/stockitem.cpp:261
+msgid "Replace selection"
+msgstr "Seçimi değiştirin"
+
+#: ../src/generic/fdrepdlg.cpp:124
+msgid "Replace with:"
+msgstr "Şununla değiştirin:"
+
+#: ../src/common/valtext.cpp:161
+msgid "Required information entry is empty."
+msgstr "Gereken bilgi kayıdı boş."
+
+#: ../src/common/translation.cpp:1966
+#, c-format
+msgid "Resource '%s' is not a valid message catalog."
+msgstr "'%s' kaynağı geçerli bir ileti kataloğu değil."
+
+#: ../src/common/stockitem.cpp:189
+msgid "Revert to Saved"
+msgstr "Kaydedilmiş Olana Geri Dönün"
+
+#: ../src/richtext/richtextborderspage.cpp:548
+msgid "Ridge"
+msgstr "Sırt"
+
+#: ../src/richtext/richtextliststylepage.cpp:251
+#: ../src/richtext/richtextbulletspage.cpp:201
+#: ../src/richtext/richtextsizepage.cpp:250
+msgid "Right"
+msgstr "Sağ"
+
+#: ../src/generic/prntdlgg.cpp:892
+msgid "Right margin (mm):"
+msgstr "Sağ kenar boşluğu (mm):"
+
+#: ../src/richtext/richtextindentspage.cpp:148
+#: ../src/richtext/richtextindentspage.cpp:150
+#: ../src/richtext/richtextliststylepage.cpp:337
+#: ../src/richtext/richtextliststylepage.cpp:339
+msgid "Right-align text."
+msgstr "Metin sağa yaslanır."
+
+#: ../src/generic/fontdlgg.cpp:322
+msgid "Roman"
+msgstr "Roman"
+
+#: ../src/richtext/richtextliststylepage.cpp:299
+#: ../src/richtext/richtextbulletspage.cpp:252
+msgid "S&tandard bullet name:"
+msgstr "S&tandart madde imi adı:"
+
+#: ../src/common/accelcmn.cpp:82
+msgid "SCROLL_LOCK"
+msgstr "SCROLL_LOCK"
+
+#: ../src/common/accelcmn.cpp:71
+msgid "SELECT"
+msgstr "SELECT"
+
+#: ../src/common/accelcmn.cpp:77
+msgid "SEPARATOR"
+msgstr "SEPARATOR"
+
+#: ../src/common/accelcmn.cpp:74
+msgid "SNAPSHOT"
+msgstr "SNAPSHOT"
+
+#: ../src/common/accelcmn.cpp:62
+msgid "SPACE"
+msgstr "SPACE"
+
+#: ../src/common/accelcmn.cpp:257 ../src/common/accelcmn.cpp:339
+msgid "SPECIAL"
+msgstr "SPECIAL"
+
+#: ../src/common/accelcmn.cpp:78
+msgid "SUBTRACT"
+msgstr "SUBTRACT"
+
+#: ../src/common/stockitem.cpp:190 ../src/common/sizer.cpp:2678
+msgid "Save"
+msgstr "Kaydedin"
+
+#: ../src/common/fldlgcmn.cpp:327
+#, c-format
+msgid "Save %s file"
+msgstr "%s dosyasını kaydedin"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save &As..."
+msgstr "&Farklı Kaydedin"
+
+#: ../src/common/docview.cpp:360
+msgid "Save As"
+msgstr "Farklı Kaydedin"
+
+#: ../src/common/stockitem.cpp:191
+msgid "Save as"
+msgstr "Farklı kaydedin"
+
+#: ../src/common/stockitem.cpp:267
+msgid "Save current document"
+msgstr "Geçerli belgeyi kaydedin"
+
+#: ../src/common/stockitem.cpp:268
+msgid "Save current document with a different filename"
+msgstr "Geçerli belgeyi farklı bir adla kaydedin"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save log contents to file"
+msgstr "Günlük içeriğini dosyaya kaydedin"
+
+#: ../src/generic/fontdlgg.cpp:325
+msgid "Script"
+msgstr "Betik"
+
+#: ../src/generic/srchctlg.cpp:67 ../src/html/helpwnd.cpp:548
+#: ../src/html/helpwnd.cpp:563
+msgid "Search"
+msgstr "Arayın"
+
+#: ../src/html/helpwnd.cpp:550
+msgid ""
+"Search contents of help book(s) for all occurrences of the text you typed "
+"above"
+msgstr "Yukarıya yazılan metin yardım kitapları içinde her türlü aranır"
+
+#: ../src/generic/fdrepdlg.cpp:160
+msgid "Search direction"
+msgstr "Arama yönü"
+
+#: ../src/generic/fdrepdlg.cpp:112
+msgid "Search for:"
+msgstr "Aranan:"
+
+#: ../src/html/helpwnd.cpp:1065
+msgid "Search in all books"
+msgstr "Tüm kitaplarda arayın"
+
+#: ../src/html/helpwnd.cpp:870
+msgid "Searching..."
+msgstr "Aranıyor..."
+
+#: ../src/generic/dirctrlg.cpp:546
+msgid "Sections"
+msgstr "Bölümler"
+
+#: ../src/common/ffile.cpp:220
+#, c-format
+msgid "Seek error on file '%s'"
+msgstr "'%s' dosyasında arama hatası"
+
+#: ../src/common/ffile.cpp:210
+#, c-format
+msgid "Seek error on file '%s' (large files not supported by stdio)"
+msgstr ""
+"'%s' dosyasında arama hatası (büyük dosyalar 'stdio' tarafından "
+"desteklenmiyor)"
+
+#: ../src/richtext/richtextctrl.cpp:330 ../src/osx/textctrl_osx.cpp:587
+#: ../src/common/stockitem.cpp:192 ../src/msw/textctrl.cpp:2288
+msgid "Select &All"
+msgstr "&Tümünü Seçin"
+
+#: ../src/common/stockitem.cpp:192 ../src/stc/stc_i18n.cpp:21
+msgid "Select All"
+msgstr "Tümünü Seçin"
+
+#: ../src/common/docview.cpp:1877
+msgid "Select a document template"
+msgstr "Bir belge şablonu seçin"
+
+#: ../src/common/docview.cpp:1951
+msgid "Select a document view"
+msgstr "Bir belge görünümü seçin"
+
+#: ../src/richtext/richtextfontpage.cpp:235
+#: ../src/richtext/richtextfontpage.cpp:237
+msgid "Select regular or bold."
+msgstr "Normal ya da koyu seçin."
+
+#: ../src/richtext/richtextfontpage.cpp:222
+#: ../src/richtext/richtextfontpage.cpp:224
+msgid "Select regular or italic style."
+msgstr "Normal ya da yatık stil seçin."
+
+#: ../src/richtext/richtextfontpage.cpp:248
+#: ../src/richtext/richtextfontpage.cpp:250
+msgid "Select underlining or no underlining."
+msgstr "Altıçizili ya da normal  seçin."
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Selection"
+msgstr "Seçim"
+
+#: ../src/richtext/richtextliststylepage.cpp:187
+#: ../src/richtext/richtextliststylepage.cpp:189
+msgid "Selects the list level to edit."
+msgstr "Düzenlenecek liste düzeyini seçer."
+
+#: ../src/common/cmdline.cpp:918
+#, c-format
+msgid "Separator expected after the option '%s'."
+msgstr "'%s' seçeneğinden sonra ayraç bekleniyor."
+
+#: ../src/richtext/richtextbuffer.cpp:10513
+msgid "Set Cell Style"
+msgstr "Hücre Stilini Ayarlayın"
+
+#: ../include/wx/xtiprop.h:179
+msgid "SetProperty called w/o valid setter"
+msgstr "'SetProperty' işlevi geçerli bir yerleştirici olmaksızın çağrıldı"
+
+#: ../src/common/filename.cpp:2632
+msgid "Setting directory access times is not supported under this OS version"
+msgstr ""
+"Klasör erişim zamanları ayarı bu işletim sistemi sürümünde desteklenmiyor"
+
+#: ../src/generic/prntdlgg.cpp:188
+msgid "Setup..."
+msgstr "Kurulum..."
+
+#: ../src/msw/dialup.cpp:563
+msgid "Several active dialup connections found, choosing one randomly."
+msgstr "Birkaç etkin çevirmeli bağlantı bulundu, rastgele biri seçiliyor."
+
+#: ../src/common/accelcmn.cpp:324
+msgid "Shift+"
+msgstr "Shift+"
+
+#: ../src/generic/dirdlgg.cpp:170
+msgid "Show &hidden directories"
+msgstr "Gizli &klasörler görüntülensin"
+
+#: ../src/generic/filectrlg.cpp:1003
+msgid "Show &hidden files"
+msgstr "Gizli &dosyalar görüntülensin"
+
+#: ../src/osx/menu_osx.cpp:605 ../src/osx/menu_osx.cpp:652
+msgid "Show All"
+msgstr "Tümü Görüntülensin"
+
+#: ../src/common/stockitem.cpp:257
+msgid "Show about dialog"
+msgstr "Hakkında penceresi görüntülensin"
+
+#: ../src/html/helpwnd.cpp:502
+msgid "Show all"
+msgstr "Tümü görüntülensin"
+
+#: ../src/html/helpwnd.cpp:513
+msgid "Show all items in index"
+msgstr "Dizindeki tüm ögeler görüntülensin"
+
+#: ../src/generic/dirdlgg.cpp:105
+msgid "Show hidden directories"
+msgstr "Gizli klasörler görüntülensin"
+
+#: ../src/html/helpwnd.cpp:671
+msgid "Show/hide navigation panel"
+msgstr "Gezinti panelini görüntüleyin/gizleyin"
+
+#: ../src/richtext/richtextsymboldlg.cpp:421
+#: ../src/richtext/richtextsymboldlg.cpp:423
+msgid "Shows a Unicode subset."
+msgstr "Bir Unikod alt kümesi görüntülenir."
+
+#: ../src/richtext/richtextliststylepage.cpp:472
+#: ../src/richtext/richtextliststylepage.cpp:474
+#: ../src/richtext/richtextbulletspage.cpp:276
+#: ../src/richtext/richtextbulletspage.cpp:278
+msgid "Shows a preview of the bullet settings."
+msgstr "Madde imi ayarlarının önizlemesi görüntülenir."
+
+#: ../src/richtext/richtextfontpage.cpp:322
+#: ../src/richtext/richtextfontpage.cpp:324
+msgid "Shows a preview of the font settings."
+msgstr "Yazı tipi ayarlarının bir önizlemesi görüntülenir."
+
+#: ../src/osx/carbon/fontdlg.cpp:580 ../src/osx/carbon/fontdlg.cpp:582
+msgid "Shows a preview of the font."
+msgstr "Yazı tipinin önizlemesi görüntülenir."
+
+#: ../src/richtext/richtextindentspage.cpp:303
+#: ../src/richtext/richtextindentspage.cpp:305
+msgid "Shows a preview of the paragraph settings."
+msgstr "Paragraf ayarlarının önizlemesi görüntülenir."
+
+#: ../src/generic/fontdlgg.cpp:460 ../src/generic/fontdlgg.cpp:462
+msgid "Shows the font preview."
+msgstr "Yazı tipinin önizlemesi görüntülenir."
+
+#: ../src/univ/themes/mono.cpp:516
+msgid "Simple monochrome theme"
+msgstr "Basit tek renkli tema"
+
+#: ../src/richtext/richtextindentspage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:449
+msgid "Single"
+msgstr "Tek"
+
+#: ../src/generic/filectrlg.cpp:460 ../src/richtext/richtextformatdlg.cpp:356
+#: ../src/richtext/richtextsizepage.cpp:299
+msgid "Size"
+msgstr "Boyut"
+
+#: ../src/osx/carbon/fontdlg.cpp:525
+msgid "Size:"
+msgstr "Boyut:"
+
+#: ../src/generic/progdlgg.cpp:262 ../src/generic/progdlgg.cpp:773
+#: ../src/msw/progdlg.cpp:801
+msgid "Skip"
+msgstr "Atlayın"
+
+#: ../src/generic/fontdlgg.cpp:330
+msgid "Slant"
+msgstr "Eğik"
+
+#: ../src/richtext/richtextfontpage.cpp:298
+msgid "Small C&apitals"
+msgstr "Küçük H&arfler"
+
+#: ../src/richtext/richtextborderspage.cpp:543
+msgid "Solid"
+msgstr "Katı"
+
+#: ../src/common/docview.cpp:1773
+msgid "Sorry, could not open this file."
+msgstr "Malesef bu dosya açılamıyor."
+
+#: ../src/common/prntbase.cpp:2027 ../src/common/prntbase.cpp:2035
+msgid "Sorry, not enough memory to create a preview."
+msgstr "Malesef önizleme oluşturmak için yeterli bellek yok."
+
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "Sorry, that name is taken. Please choose another."
+msgstr "Malesef bu ad kullanılmış. Lütfen başka bir ad seçin."
+
+#: ../src/common/docview.cpp:1796
+msgid "Sorry, the format for this file is unknown."
+msgstr "Malesef bu dosyanın biçimi bilinmiyor."
+
+#: ../src/unix/sound.cpp:492
+msgid "Sound data are in unsupported format."
+msgstr "Ses verisi desteklenmeyen bir biçimde."
+
+#: ../src/unix/sound.cpp:477
+#, c-format
+msgid "Sound file '%s' is in unsupported format."
+msgstr "'%s' ses dosyası desteklenmeyen bir biçimde."
+
+#: ../src/richtext/richtextliststylepage.cpp:467
+msgid "Spacing"
+msgstr "Aralık"
+
+#: ../src/common/stockitem.cpp:197
+msgid "Spell Check"
+msgstr "Yazım Denetimi"
+
+#: ../src/richtext/richtextliststylepage.cpp:490
+#: ../src/richtext/richtextbulletspage.cpp:295
+msgid "Standard"
+msgstr "Standart"
+
+#: ../src/common/paper.cpp:105
+msgid "Statement, 5 1/2 x 8 1/2 in"
+msgstr "Statement, 5 1/2 x 8 1/2 inç"
+
+#: ../src/richtext/richtextsizepage.cpp:518
+#: ../src/richtext/richtextsizepage.cpp:523
+msgid "Static"
+msgstr "Durağan"
+
+#: ../src/generic/prntdlgg.cpp:204
+msgid "Status:"
+msgstr "Durum:"
+
+#: ../src/common/stockitem.cpp:198
+msgid "Stop"
+msgstr "Durdurun"
+
+#: ../src/common/stockitem.cpp:199
+msgid "Strikethrough"
+msgstr "Üstü çizili"
+
+#: ../src/common/colourcmn.cpp:45
+#, c-format
+msgid "String To Colour : Incorrect colour specification : %s"
+msgstr "Dizgeden Renge: Hatalı renk tanımı: %s"
+
+#: ../src/richtext/richtextformatdlg.cpp:318 ../src/propgrid/advprops.cpp:647
+msgid "Style"
+msgstr "Stil"
+
+#: ../include/wx/richtext/richtextstyledlg.h:47
+msgid "Style Organiser"
+msgstr "Stil Düzenleyici"
+
+#: ../src/osx/carbon/fontdlg.cpp:534
+msgid "Style:"
+msgstr "Stil:"
+
+#: ../src/richtext/richtextfontpage.cpp:312
+msgid "Subscrip&t"
+msgstr "Al&tyazı"
+
+#: ../src/richtext/richtextfontpage.cpp:305
+msgid "Supe&rscript"
+msgstr "Ü&styazı"
+
+#: ../src/common/paper.cpp:151
+msgid "SuperA/SuperA/A4 227 x 356 mm"
+msgstr "SuperA/SuperA/A4 227 x 356 mm"
+
+#: ../src/common/paper.cpp:152
+msgid "SuperB/SuperB/A3 305 x 487 mm"
+msgstr "SuperB/SuperB/A3 305 x 487 mm"
+
+#: ../src/generic/fontdlgg.cpp:326
+msgid "Swiss"
+msgstr "İsveç"
+
+#: ../src/richtext/richtextliststylepage.cpp:488
+#: ../src/richtext/richtextbulletspage.cpp:293
+msgid "Symbol"
+msgstr "Sembol"
+
+#: ../src/richtext/richtextliststylepage.cpp:288
+#: ../src/richtext/richtextbulletspage.cpp:240
+msgid "Symbol &font:"
+msgstr "Sembol &yazı tipi:"
+
+#: ../include/wx/richtext/richtextsymboldlg.h:47
+msgid "Symbols"
+msgstr "Simgeler"
+
+#: ../src/common/accelcmn.cpp:63
+msgid "TAB"
+msgstr "TAB"
+
+#: ../src/common/imagtiff.cpp:372 ../src/common/imagtiff.cpp:385
+#: ../src/common/imagtiff.cpp:744
+msgid "TIFF: Couldn't allocate memory."
+msgstr "TIFF: Bellek ayrılamadı."
+
+#: ../src/common/imagtiff.cpp:304
+msgid "TIFF: Error loading image."
+msgstr "TIFF: Görsel yükleme hatası."
+
+#: ../src/common/imagtiff.cpp:471
+msgid "TIFF: Error reading image."
+msgstr "TIFF: Görsel okuma hatası."
+
+#: ../src/common/imagtiff.cpp:611
+msgid "TIFF: Error saving image."
+msgstr "TIFF: Görsel kaydetme hatası."
+
+#: ../src/common/imagtiff.cpp:849
+msgid "TIFF: Error writing image."
+msgstr "TIFF: Görsel yazma hatası."
+
+#: ../src/common/imagtiff.cpp:358
+msgid "TIFF: Image size is abnormally big."
+msgstr "TIFF: Görsel boyutu anormal büyük."
+
+#: ../src/richtext/richtextbuffer.cpp:10794
+msgid "Table Properties"
+msgstr "Tablo Özellikleri"
+
+#: ../src/common/paper.cpp:146
+msgid "Tabloid Extra 11.69 x 18 in"
+msgstr "Tabloid Ek 11.69 x 18 inç"
+
+#: ../src/common/paper.cpp:103
+msgid "Tabloid, 11 x 17 in"
+msgstr "Tabloid, 11 x 17 inç"
+
+#: ../src/richtext/richtextformatdlg.cpp:336
+msgid "Tabs"
+msgstr "Sekmeler"
+
+#: ../src/generic/fontdlgg.cpp:327
+msgid "Teletype"
+msgstr "Teletype"
+
+#: ../src/common/docview.cpp:1878
+msgid "Templates"
+msgstr "Şablonlar"
+
+#: ../src/osx/carbon/dataview.cpp:2373
+msgid "Text renderer cannot render value; value type: "
+msgstr "Metin görüntüleyici değeri işleyemiyor; değer tipi:"
+
+#: ../src/common/fmapbase.cpp:158
+msgid "Thai (ISO-8859-11)"
+msgstr "Thai (ISO-8859-11)"
+
+#: ../src/common/ftp.cpp:620
+msgid "The FTP server doesn't support passive mode."
+msgstr "FTP sunucusu pasif kipi desteklemiyor."
+
+#: ../src/common/ftp.cpp:606
+msgid "The FTP server doesn't support the PORT command."
+msgstr "FTP sunucusu PORT komutunu desteklemiyor."
+
+#: ../src/richtext/richtextliststylepage.cpp:215
+#: ../src/richtext/richtextliststylepage.cpp:217
+#: ../src/richtext/richtextbulletspage.cpp:164
+#: ../src/richtext/richtextbulletspage.cpp:166
+msgid "The available bullet styles."
+msgstr "Kullanılabilecek madde imi stilleri."
+
+#: ../src/richtext/richtextstyledlg.cpp:202
+#: ../src/richtext/richtextstyledlg.cpp:204
+msgid "The available styles."
+msgstr "Kullanılabilecek stiller."
+
+#: ../src/richtext/richtextbackgroundpage.cpp:139
+#: ../src/richtext/richtextbackgroundpage.cpp:141
+msgid "The background colour."
+msgstr "Artalan rengi."
+
+#: ../src/richtext/richtextmarginspage.cpp:268
+#: ../src/richtext/richtextmarginspage.cpp:270
+msgid "The bottom margin size."
+msgstr "Alt kenar boşluğunun boyutu."
+
+#: ../src/richtext/richtextmarginspage.cpp:382
+#: ../src/richtext/richtextmarginspage.cpp:384
+msgid "The bottom padding size."
+msgstr "Alt yastıklama boyutu."
+
+#: ../src/richtext/richtextsizepage.cpp:639
+#: ../src/richtext/richtextsizepage.cpp:641
+#: ../src/richtext/richtextsizepage.cpp:653
+#: ../src/richtext/richtextsizepage.cpp:655
+msgid "The bottom position."
+msgstr "Alt konum."
+
+#: ../src/richtext/richtextliststylepage.cpp:254
+#: ../src/richtext/richtextliststylepage.cpp:256
+#: ../src/richtext/richtextliststylepage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:277
+#: ../src/richtext/richtextbulletspage.cpp:204
+#: ../src/richtext/richtextbulletspage.cpp:206
+#: ../src/richtext/richtextbulletspage.cpp:227
+#: ../src/richtext/richtextbulletspage.cpp:229
+msgid "The bullet character."
+msgstr "Madde imi karakteri."
+
+#: ../src/richtext/richtextsymboldlg.cpp:443
+#: ../src/richtext/richtextsymboldlg.cpp:445
+msgid "The character code."
+msgstr "Karakter kodu."
+
+#: ../src/common/fontmap.cpp:203
+#, c-format
+msgid ""
+"The charset '%s' is unknown. You may select\n"
+"another charset to replace it with or choose\n"
+"[Cancel] if it cannot be replaced"
+msgstr ""
+"'%s' karakter kümesi bilinmiyor. Yerine\n"
+"başka bir tane seçebilir ya da \n"
+"seçemiyorsanız [İptal] düğmesine tıklayabilirsiniz"
+
+#: ../src/msw/ole/dataobj.cpp:367
+#, c-format
+msgid "The clipboard format '%d' doesn't exist."
+msgstr "'%d' pano biçimi bulunamıyor."
+
+#: ../src/richtext/richtextstylepage.cpp:128
+#: ../src/richtext/richtextstylepage.cpp:130
+msgid "The default style for the next paragraph."
+msgstr "Sonraki paragraf için varsayılan stil."
+
+#: ../src/generic/dirdlgg.cpp:231
+#, c-format
+msgid ""
+"The directory '%s' does not exist\n"
+"Create it now?"
+msgstr ""
+"'%s' klasörü bulunamadı\n"
+"Şimdi oluşturulsun mu?"
+
+#: ../src/html/htmprint.cpp:271
+#, c-format
+msgid ""
+"The document \"%s\" doesn't fit on the page horizontally and will be "
+"truncated if printed.\n"
+"\n"
+"Would you like to proceed with printing it nevertheless?"
+msgstr ""
+"\"%s\" belgesi sayfaya yatay olarak sığmıyor ve yazdırılırsa budanacak.\n"
+"\n"
+"Buna rağmen yazdırmak istiyor musunuz?"
+
+#: ../src/common/docview.cpp:1184
+#, c-format
+msgid ""
+"The file '%s' doesn't exist and couldn't be opened.\n"
+"It has been removed from the most recently used files list."
+msgstr ""
+"'%s' dosyası yok ve açılamadı.\n"
+"Son kullanılan dosyalar listesinden kaldırıldı."
+
+#: ../src/richtext/richtextindentspage.cpp:208
+#: ../src/richtext/richtextindentspage.cpp:210
+#: ../src/richtext/richtextliststylepage.cpp:394
+#: ../src/richtext/richtextliststylepage.cpp:396
+msgid "The first line indent."
+msgstr "İlk satır girintisi."
+
+#: ../src/gtk/utilsgtk.cpp:427
+msgid "The following standard GTK+ options are also supported:\n"
+msgstr "Aşağıdaki standart GTK+ seçenekleri de desteklenmektedir:\n"
+
+#: ../src/generic/fontdlgg.cpp:414 ../src/generic/fontdlgg.cpp:416
+msgid "The font colour."
+msgstr "Yazı tipi rengi."
+
+#: ../src/generic/fontdlgg.cpp:375 ../src/generic/fontdlgg.cpp:377
+msgid "The font family."
+msgstr "Yazı tipi ailesi."
+
+#: ../src/richtext/richtextsymboldlg.cpp:405
+#: ../src/richtext/richtextsymboldlg.cpp:407
+msgid "The font from which to take the symbol."
+msgstr "Simgenin alınacağı yazı tipi."
+
+#: ../src/generic/fontdlgg.cpp:427 ../src/generic/fontdlgg.cpp:429
+#: ../src/generic/fontdlgg.cpp:434 ../src/generic/fontdlgg.cpp:436
+msgid "The font point size."
+msgstr "Yazı tipi punto boyutu."
+
+#: ../src/osx/carbon/fontdlg.cpp:529 ../src/osx/carbon/fontdlg.cpp:531
+msgid "The font size in points."
+msgstr "Punto olarak yazı tipi boyutu."
+
+#: ../src/richtext/richtextfontpage.cpp:190
+#: ../src/richtext/richtextfontpage.cpp:192
+msgid "The font size units, points or pixels."
+msgstr "Yazı tipi boyutu birimi, punto ya da piksel."
+
+#: ../src/generic/fontdlgg.cpp:386 ../src/generic/fontdlgg.cpp:388
+msgid "The font style."
+msgstr "Yazı tipi stili."
+
+#: ../src/generic/fontdlgg.cpp:397 ../src/generic/fontdlgg.cpp:399
+msgid "The font weight."
+msgstr "Yazı tipi yoğunluğu."
+
+#: ../src/common/docview.cpp:1465
+#, c-format
+msgid "The format of file '%s' couldn't be determined."
+msgstr "'%s' dosyasının biçimi belirlenemedi."
+
+#: ../src/richtext/richtextindentspage.cpp:199
+#: ../src/richtext/richtextindentspage.cpp:201
+#: ../src/richtext/richtextliststylepage.cpp:385
+#: ../src/richtext/richtextliststylepage.cpp:387
+msgid "The left indent."
+msgstr "Sol girinti."
+
+#: ../src/richtext/richtextmarginspage.cpp:195
+#: ../src/richtext/richtextmarginspage.cpp:197
+msgid "The left margin size."
+msgstr "Sol kenar boşluğu boyutu."
+
+#: ../src/richtext/richtextmarginspage.cpp:309
+#: ../src/richtext/richtextmarginspage.cpp:311
+msgid "The left padding size."
+msgstr "Sol yastıklama boyutu."
+
+#: ../src/richtext/richtextsizepage.cpp:534
+#: ../src/richtext/richtextsizepage.cpp:536
+#: ../src/richtext/richtextsizepage.cpp:548
+#: ../src/richtext/richtextsizepage.cpp:550
+msgid "The left position."
+msgstr "Sol konum."
+
+#: ../src/richtext/richtextindentspage.cpp:288
+#: ../src/richtext/richtextindentspage.cpp:290
+#: ../src/richtext/richtextliststylepage.cpp:462
+#: ../src/richtext/richtextliststylepage.cpp:464
+msgid "The line spacing."
+msgstr "Satır aralığı."
+
+#: ../src/richtext/richtextbulletspage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:270
+msgid "The list item number."
+msgstr "Liste ögesi numarası."
+
+#: ../src/msw/ole/automtn.cpp:653
+msgid "The locale ID is unknown."
+msgstr "Yerel kodu bilinmiyor."
+
+#: ../src/richtext/richtextsizepage.cpp:366
+#: ../src/richtext/richtextsizepage.cpp:368
+msgid "The object height."
+msgstr "Nesne yüksekliği."
+
+#: ../src/richtext/richtextsizepage.cpp:474
+#: ../src/richtext/richtextsizepage.cpp:476
+msgid "The object maximum height."
+msgstr "En fazla nesne yüksekliği."
+
+#: ../src/richtext/richtextsizepage.cpp:447
+#: ../src/richtext/richtextsizepage.cpp:449
+msgid "The object maximum width."
+msgstr "En fazla nesne genişliği."
+
+#: ../src/richtext/richtextsizepage.cpp:420
+#: ../src/richtext/richtextsizepage.cpp:422
+msgid "The object minimum height."
+msgstr "En az nesne yüksekliği."
+
+#: ../src/richtext/richtextsizepage.cpp:393
+#: ../src/richtext/richtextsizepage.cpp:395
+msgid "The object minimum width."
+msgstr "En az nesne genişliği."
+
+#: ../src/richtext/richtextsizepage.cpp:332
+#: ../src/richtext/richtextsizepage.cpp:334
+msgid "The object width."
+msgstr "Nesne genişliği."
+
+#: ../src/richtext/richtextindentspage.cpp:227
+#: ../src/richtext/richtextindentspage.cpp:229
+msgid "The outline level."
+msgstr "Taslak düzeyi."
+
+#: ../src/common/log.cpp:281
+#, c-format
+msgid "The previous message repeated %lu time."
+msgid_plural "The previous message repeated %lu times."
+msgstr[0] "Önceki ileti %lu kez yinelendi."
+
+#: ../src/common/log.cpp:274
+msgid "The previous message repeated once."
+msgstr "Önceki ileti bir kez yinelendi."
+
+#: ../src/gtk/print.cpp:931 ../src/gtk/print.cpp:1114
+msgid "The print dialog returned an error."
+msgstr "Yazdırma penceresi bir hata verdi."
+
+#: ../src/richtext/richtextsymboldlg.cpp:462
+#: ../src/richtext/richtextsymboldlg.cpp:464
+msgid "The range to show."
+msgstr "Görüntülenecek aralık."
+
+#: ../src/generic/dbgrptg.cpp:322
+msgid ""
+"The report contains the files listed below. If any of these files contain "
+"private information,\n"
+"please uncheck them and they will be removed from the report.\n"
+msgstr ""
+"Bu rapor aşağıdaki dosyaları içermektedir. Eğer bu dosyalarda özel "
+"bilgileriniz varsa,\n"
+"rapordan çıkarmak istediğiniz dosyaların işaretini kaldırın.\n"
+
+#: ../src/common/cmdline.cpp:1083
+#, c-format
+msgid "The required parameter '%s' was not specified."
+msgstr "Gerekli '%s' parametresi belirtilmemiş."
+
+#: ../src/richtext/richtextindentspage.cpp:217
+#: ../src/richtext/richtextindentspage.cpp:219
+#: ../src/richtext/richtextliststylepage.cpp:403
+#: ../src/richtext/richtextliststylepage.cpp:405
+msgid "The right indent."
+msgstr "Sağ girinti."
+
+#: ../src/richtext/richtextmarginspage.cpp:220
+#: ../src/richtext/richtextmarginspage.cpp:222
+msgid "The right margin size."
+msgstr "Sağ kenar boşluğu boyutu."
+
+#: ../src/richtext/richtextmarginspage.cpp:334
+#: ../src/richtext/richtextmarginspage.cpp:336
+msgid "The right padding size."
+msgstr "Sağ yastıklama boyutu."
+
+#: ../src/richtext/richtextsizepage.cpp:604
+#: ../src/richtext/richtextsizepage.cpp:606
+#: ../src/richtext/richtextsizepage.cpp:618
+#: ../src/richtext/richtextsizepage.cpp:620
+msgid "The right position."
+msgstr "Sağ konum."
+
+#: ../src/richtext/richtextindentspage.cpp:267
+#: ../src/richtext/richtextliststylepage.cpp:439
+#: ../src/richtext/richtextliststylepage.cpp:441
+msgid "The spacing after the paragraph."
+msgstr "Paragraftan sonraki boşluk."
+
+#: ../src/richtext/richtextindentspage.cpp:257
+#: ../src/richtext/richtextindentspage.cpp:259
+#: ../src/richtext/richtextliststylepage.cpp:430
+#: ../src/richtext/richtextliststylepage.cpp:432
+msgid "The spacing before the paragraph."
+msgstr "Paragraftan önceki boşluk."
+
+#: ../src/richtext/richtextstylepage.cpp:108
+#: ../src/richtext/richtextstylepage.cpp:110
+msgid "The style name."
+msgstr "Stil adı."
+
+#: ../src/richtext/richtextstylepage.cpp:118
+#: ../src/richtext/richtextstylepage.cpp:120
+msgid "The style on which this style is based."
+msgstr "Bu stilin temel alındığı stil."
+
+#: ../src/richtext/richtextstyledlg.cpp:214
+#: ../src/richtext/richtextstyledlg.cpp:216
+msgid "The style preview."
+msgstr "Stil önizlemesi."
+
+#: ../src/msw/ole/automtn.cpp:669
+msgid "The system cannot find the file specified."
+msgstr "Sistem belirtilen dosyayı bulamadı."
+
+#: ../src/richtext/richtexttabspage.cpp:118
+#: ../src/richtext/richtexttabspage.cpp:120
+msgid "The tab position."
+msgstr "Sekme konumu."
+
+#: ../src/richtext/richtexttabspage.cpp:124
+msgid "The tab positions."
+msgstr "Sekme konumları."
+
+#: ../src/richtext/richtextctrl.cpp:2705
+msgid "The text couldn't be saved."
+msgstr "Metin kaydedilemedi."
+
+#: ../src/richtext/richtextmarginspage.cpp:243
+#: ../src/richtext/richtextmarginspage.cpp:245
+msgid "The top margin size."
+msgstr "Üst kenar boşluğu boyutu."
+
+#: ../src/richtext/richtextmarginspage.cpp:357
+#: ../src/richtext/richtextmarginspage.cpp:359
+msgid "The top padding size."
+msgstr "Üst yastıklama boyutu."
+
+#: ../src/richtext/richtextsizepage.cpp:569
+#: ../src/richtext/richtextsizepage.cpp:571
+#: ../src/richtext/richtextsizepage.cpp:583
+#: ../src/richtext/richtextsizepage.cpp:585
+msgid "The top position."
+msgstr "Üst konum."
+
+#: ../src/common/cmdline.cpp:1061
+#, c-format
+msgid "The value for the option '%s' must be specified."
+msgstr "'%s' seçeneği için değer belirtilmelidir."
+
+#: ../src/msw/dialup.cpp:452
+#, c-format
+msgid ""
+"The version of remote access service (RAS) installed on this machine is too "
+"old, please upgrade (the following required function is missing: %s)."
+msgstr ""
+"Bu bilgisayarda kurulu uzak erişim hizmetinin (RAS) sürümü çok eski, lütfen "
+"yükseltin (gereken şu işlev eksik: %s)."
+
+#: ../src/gtk/print.cpp:959
+msgid "The wxGtkPrinterDC cannot be used."
+msgstr "wxGtkPrinterDC kullanılamıyor."
+
+#: ../src/osx/carbon/dataview.cpp:1340
+msgid "There is no column or renderer for the specified column index."
+msgstr "Belirtilen sütun dizin için sütun ya da görüntüleyici bulunamadı."
+
+#: ../src/richtext/richtextprint.cpp:614 ../src/html/htmprint.cpp:735
+msgid ""
+"There was a problem during page setup: you may need to set a default printer."
+msgstr ""
+"Sayfa ayarlanırken bir hata oluştu: varsayılan bir yazıcı belirlemeniz "
+"gerekebilir."
+
+#: ../src/html/htmprint.cpp:255
+msgid ""
+"This document doesn't fit on the page horizontally and will be truncated "
+"when it is printed."
+msgstr "Bu belge sayfaya yatay olarak sığmıyor ve yazdırılırsa budanacak."
+
+#: ../src/common/image.cpp:2716
+#, c-format
+msgid "This is not a %s."
+msgstr "Bu bir %s değil."
+
+#: ../src/common/wincmn.cpp:1653
+msgid "This platform does not support background transparency."
+msgstr "Bu platformda artalan saydamlığı desteklenmiyor."
+
+#: ../src/gtk/window.cpp:4317
+msgid ""
+"This program was compiled with a too old version of GTK+, please rebuild "
+"with GTK+ 2.12 or newer."
+msgstr ""
+"Bu program çok eski bir GTK+ sürümüyle derlenmiş. Lütfen GTK+ 2.12 ya da "
+"üzeri bir sürümle yeniden derleyin."
+
+#: ../src/msw/datecontrols.cpp:59
+msgid ""
+"This system doesn't support date controls, please upgrade your version of "
+"comctl32.dll"
+msgstr ""
+"Bu sistem tarih ögelerini desteklemiyor, lütfen comctl32.dll sürümünü "
+"yükseltin"
+
+#: ../src/msw/thread.cpp:1300
+msgid ""
+"Thread module initialization failed: cannot store value in thread local "
+"storage"
+msgstr "İş parçacığı modülü başlatılamadı: yerel depoya değer koyulamıyor"
+
+#: ../src/unix/threadpsx.cpp:1758
+msgid "Thread module initialization failed: failed to create thread key"
+msgstr ""
+"İş parçacığı modülü başlatılamadı: iş parçacığı anahtarı oluşturulamadı"
+
+#: ../src/msw/thread.cpp:1288
+msgid ""
+"Thread module initialization failed: impossible to allocate index in thread "
+"local storage"
+msgstr "İş parçacığı modülü başlatılamadı: yerel depoda dizin oluşturulamıyor"
+
+#: ../src/unix/threadpsx.cpp:1038
+msgid "Thread priority setting is ignored."
+msgstr "İş parçacığı öncelik ayarları yok sayıldı."
+
+#: ../src/msw/mdi.cpp:172
+msgid "Tile &Horizontally"
+msgstr "&Yatay Döşeyin"
+
+#: ../src/msw/mdi.cpp:173
+msgid "Tile &Vertically"
+msgstr "&Dikey Döşeyin"
+
+#: ../src/common/ftp.cpp:202
+msgid "Timeout while waiting for FTP server to connect, try passive mode."
+msgstr "FTP sunucusuna bağlanırken zamanaşımı oldu, pasif kipi deneyin."
+
+#: ../src/os2/timer.cpp:99
+msgid "Timer creation failed."
+msgstr "Zamanlayıcı oluşturulamadı"
+
+#: ../src/generic/tipdlg.cpp:220
+msgid "Tip of the Day"
+msgstr "Günün İpucu"
+
+#: ../src/generic/tipdlg.cpp:154
+msgid "Tips not available, sorry!"
+msgstr "Malesef ipucu yok!"
+
+#: ../src/generic/prntdlgg.cpp:242
+msgid "To:"
+msgstr "Kime:"
+
+#: ../src/osx/carbon/dataview.cpp:2451
+msgid "Toggle renderer cannot render value; value type: "
+msgstr "İki durumlu düğme görüntüleyici değeri işleyemiyor; değer tipi:"
+
+#: ../src/richtext/richtextbuffer.cpp:7983
+msgid "Too many EndStyle calls!"
+msgstr "Çok fazla EndStyle çağrısı!"
+
+#: ../src/common/imagpng.cpp:286
+msgid "Too many colours in PNG, the image may be slightly blurred."
+msgstr "PNG içinde çok fazla renk var, görüntü biraz bulanıklaşabilir."
+
+#: ../src/richtext/richtextsizepage.cpp:286
+#: ../src/richtext/richtextsizepage.cpp:290 ../src/common/stockitem.cpp:200
+msgid "Top"
+msgstr "Üst"
+
+#: ../src/generic/prntdlgg.cpp:881
+msgid "Top margin (mm):"
+msgstr "Üst kenar boşluğu (mm):"
+
+#: ../src/generic/aboutdlgg.cpp:79
+msgid "Translations by "
+msgstr "Çeviren"
+
+#: ../src/generic/aboutdlgg.cpp:188
+msgid "Translators"
+msgstr "Çevirmenler"
+
+#: ../src/propgrid/propgrid.cpp:173
+msgid "True"
+msgstr "Doğru"
+
+#: ../src/common/fs_mem.cpp:227
+#, c-format
+msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!"
+msgstr ""
+"'%s' dosyası yüklü olmadığı halde VFS belleğinden silinmeye çalışılıyor!"
+
+#: ../src/common/fmapbase.cpp:156
+msgid "Turkish (ISO-8859-9)"
+msgstr "Türkçe (ISO-8859-9)"
+
+#: ../src/generic/filectrlg.cpp:461
+msgid "Type"
+msgstr "Tip"
+
+#: ../src/richtext/richtextfontpage.cpp:160
+#: ../src/richtext/richtextfontpage.cpp:162
+msgid "Type a font name."
+msgstr "Bir yazı tipi adı yazın."
+
+#: ../src/richtext/richtextfontpage.cpp:175
+#: ../src/richtext/richtextfontpage.cpp:177
+msgid "Type a size in points."
+msgstr "Punto olarak bir boyut yazın."
+
+#: ../src/msw/ole/automtn.cpp:665
+#, c-format
+msgid "Type mismatch in argument %u."
+msgstr "%u argümanında tip uyuşmazlığı."
+
+#: ../src/common/xtixml.cpp:356 ../src/common/xtixml.cpp:509
+#: ../src/common/xtistrm.cpp:322
+msgid "Type must have enum - long conversion"
+msgstr "Tip enum - long çevrimini desteklemelidir"
+
+#: ../src/propgrid/propgridiface.cpp:382
+#, c-format
+msgid ""
+"Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT "
+"\"%s\"."
+msgstr ""
+"\"%s\" tip işlemi yapılamadı: Etiketlenen özellik \"%s\" \"%s\" tipinde, \"%s"
+"\" tipinde DEĞİL."
+
+#: ../src/common/accelcmn.cpp:58
+msgid "UP"
+msgstr "UP"
+
+#: ../src/common/paper.cpp:134
+msgid "US Std Fanfold, 14 7/8 x 11 in"
+msgstr "US Std Fanfold, 14 7/8 x 11 inç"
+
+#: ../src/common/fmapbase.cpp:196
+msgid "US-ASCII"
+msgstr "US-ASCII"
+
+#: ../src/unix/fswatcher_inotify.cpp:109
+msgid "Unable to add inotify watch"
+msgstr "inotify izlemesi eklenemedi"
+
+#: ../src/unix/fswatcher_kqueue.cpp:136
+msgid "Unable to add kqueue watch"
+msgstr "kqueue izlemesi eklenemedi"
+
+#: ../include/wx/msw/private/fswatcher.h:142
+msgid "Unable to associate handle with I/O completion port"
+msgstr "G/Ç tamamlanma kapısı işleyici ile ilişkilendirilemedi"
+
+#: ../include/wx/msw/private/fswatcher.h:125
+msgid "Unable to close I/O completion port handle"
+msgstr "G/Ç tamamlanma kapısı işleyicisi kapatılamadı"
+
+#: ../src/unix/fswatcher_inotify.cpp:97
+msgid "Unable to close inotify instance"
+msgstr "inotify kopyası kapatılamadı"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:74
+#, c-format
+msgid "Unable to close path '%s'"
+msgstr "'%s' yolu kapatılamadı"
+
+#: ../include/wx/msw/private/fswatcher.h:48
+#, c-format
+msgid "Unable to close the handle for '%s'"
+msgstr "'%s' işleyicisi kapatılamadı"
+
+#: ../include/wx/msw/private/fswatcher.h:240
+msgid "Unable to create I/O completion port"
+msgstr "G/Ç tamamlanma kapısı oluşturulamadı"
+
+#: ../src/msw/fswatcher.cpp:84
+msgid "Unable to create IOCP worker thread"
+msgstr "IOCP iş parçacığı oluşturulamadı"
+
+#: ../src/unix/fswatcher_inotify.cpp:74
+msgid "Unable to create inotify instance"
+msgstr "inotify kopyası oluşturulamadı"
+
+#: ../src/unix/fswatcher_kqueue.cpp:97
+msgid "Unable to create kqueue instance"
+msgstr "kqueue kopyası oluşturulamadı"
+
+#: ../include/wx/msw/private/fswatcher.h:229
+msgid "Unable to dequeue completion packet"
+msgstr "Tamamlanma paketi kuyruktan çıkarılamadı"
+
+#: ../src/unix/fswatcher_kqueue.cpp:185
+msgid "Unable to get events from kqueue"
+msgstr "Olaylar kqueue üzerinden alınamadı"
+
+#: ../src/osx/carbon/dataview.cpp:1903
+msgid "Unable to handle native drag&drop data"
+msgstr "Doğal sürükle bırak verisi işlenemedi"
+
+#: ../src/gtk/app.cpp:439
+msgid "Unable to initialize GTK+, is DISPLAY set properly?"
+msgstr "GTK+ başlatılamadı, DISPLAY düzgün ayarlanmış mı?"
+
+#: ../src/gtk/app.cpp:276
+msgid "Unable to initialize Hildon program"
+msgstr "Hildon programı başlatılamadı"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:57
+#, c-format
+msgid "Unable to open path '%s'"
+msgstr "'%s' yolu açılamadı"
+
+#: ../src/html/htmlwin.cpp:561
+#, c-format
+msgid "Unable to open requested HTML document: %s"
+msgstr "İstenen HTML belgesi açılamıyor: %s"
+
+#: ../src/unix/sound.cpp:368
+msgid "Unable to play sound asynchronously."
+msgstr "Ses zaman eşlemesiz olarak çalınamıyor."
+
+#: ../include/wx/msw/private/fswatcher.h:207
+msgid "Unable to post completion status"
+msgstr "Tamamlanma durumu gönderilemedi"
+
+#: ../src/unix/fswatcher_inotify.cpp:530
+msgid "Unable to read from inotify descriptor"
+msgstr "inotify tanımlayıcısı okunamadı"
+
+#: ../src/unix/fswatcher_inotify.cpp:132
+msgid "Unable to remove inotify watch"
+msgstr "inotify izlemesi kaldırılamadı"
+
+#: ../src/unix/fswatcher_kqueue.cpp:153
+msgid "Unable to remove kqueue watch"
+msgstr "kqueue izlemesi kaldırılamadı"
+
+#: ../src/msw/fswatcher.cpp:168
+#, c-format
+msgid "Unable to set up watch for '%s'"
+msgstr "'%s' izlemesi kurulamadı"
+
+#: ../src/msw/fswatcher.cpp:91
+msgid "Unable to start IOCP worker thread"
+msgstr "IOCP iş parçacığı başlatılamadı"
+
+#: ../src/common/stockitem.cpp:201
+msgid "Undelete"
+msgstr "Silmeyi geri alın"
+
+#: ../src/common/stockitem.cpp:202
+msgid "Underline"
+msgstr "Altıçizili"
+
+#: ../src/richtext/richtextfontpage.cpp:341 ../src/osx/carbon/fontdlg.cpp:556
+#: ../src/propgrid/advprops.cpp:655
+msgid "Underlined"
+msgstr "Altıçizili"
+
+#: ../src/common/stockitem.cpp:203 ../src/stc/stc_i18n.cpp:15
+msgid "Undo"
+msgstr "Geri Alın"
+
+#: ../src/common/stockitem.cpp:265
+msgid "Undo last action"
+msgstr "Son eylemi geri alın"
+
+#: ../src/common/cmdline.cpp:864
+#, c-format
+msgid "Unexpected characters following option '%s'."
+msgstr "'%s' seçeneğinden sonra beklenmeyen karakterler."
+
+#: ../src/unix/fswatcher_inotify.cpp:261
+#, c-format
+msgid "Unexpected event for \"%s\": no matching watch descriptor."
+msgstr "\"%s\" için beklenmeyen etkinlik: uyan izleme belirteci yok."
+
+#: ../src/common/cmdline.cpp:1024
+#, c-format
+msgid "Unexpected parameter '%s'"
+msgstr "Beklenmeyen parametre '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:148
+msgid "Unexpectedly new I/O completion port was created"
+msgstr "Beklenmedik şekilde yeni G/Ç tamamlanma kapısı oluşturuldu"
+
+#: ../src/msw/fswatcher.cpp:70
+msgid "Ungraceful worker thread termination"
+msgstr "Uygunsuz iş parçacığı sonlandırması"
+
+#: ../src/richtext/richtextsymboldlg.cpp:459
+#: ../src/richtext/richtextsymboldlg.cpp:460
+#: ../src/richtext/richtextsymboldlg.cpp:461
+msgid "Unicode"
+msgstr "Unikod"
+
+#: ../src/common/fmapbase.cpp:185 ../src/common/fmapbase.cpp:191
+msgid "Unicode 16 bit (UTF-16)"
+msgstr "Unikod 16 bit (UTF-16)"
+
+#: ../src/common/fmapbase.cpp:190
+msgid "Unicode 16 bit Big Endian (UTF-16BE)"
+msgstr "Unikod 16 bit Big Endian (UTF-16BE)"
+
+#: ../src/common/fmapbase.cpp:186
+msgid "Unicode 16 bit Little Endian (UTF-16LE)"
+msgstr "Unikod 16 bit Little Endian (UTF-16LE)"
+
+#: ../src/common/fmapbase.cpp:187 ../src/common/fmapbase.cpp:193
+msgid "Unicode 32 bit (UTF-32)"
+msgstr "Unikod 32 bit (UTF-32)"
+
+#: ../src/common/fmapbase.cpp:192
+msgid "Unicode 32 bit Big Endian (UTF-32BE)"
+msgstr "Unikod 32 bit Big Endian (UTF-32BE)"
+
+#: ../src/common/fmapbase.cpp:188
+msgid "Unicode 32 bit Little Endian (UTF-32LE)"
+msgstr "Unikod 32 bit Little Endian (UTF-32LE)"
+
+#: ../src/common/fmapbase.cpp:182
+msgid "Unicode 7 bit (UTF-7)"
+msgstr "7 bit Unikod (UTF-7)"
+
+#: ../src/common/fmapbase.cpp:183
+msgid "Unicode 8 bit (UTF-8)"
+msgstr "8 bit Unikod (UTF-8)"
+
+#: ../src/common/stockitem.cpp:204
+msgid "Unindent"
+msgstr "Girintiyi geri alın"
+
+#: ../src/richtext/richtextborderspage.cpp:373
+#: ../src/richtext/richtextborderspage.cpp:375
+msgid "Units for the bottom border width."
+msgstr "Alt kenarlık genişliğinin birimleri."
+
+#: ../src/richtext/richtextmarginspage.cpp:278
+#: ../src/richtext/richtextmarginspage.cpp:280
+msgid "Units for the bottom margin."
+msgstr "Alt kenar boşluğunun birimleri."
+
+#: ../src/richtext/richtextborderspage.cpp:517
+#: ../src/richtext/richtextborderspage.cpp:519
+msgid "Units for the bottom outline width."
+msgstr "Alt taslak genişliğinin birimleri."
+
+#: ../src/richtext/richtextmarginspage.cpp:392
+#: ../src/richtext/richtextmarginspage.cpp:394
+msgid "Units for the bottom padding."
+msgstr "Alt yastıklamanın birimleri."
+
+#: ../src/richtext/richtextsizepage.cpp:664
+#: ../src/richtext/richtextsizepage.cpp:666
+msgid "Units for the bottom position."
+msgstr "Alt konumun birimleri."
+
+#: ../src/richtext/richtextborderspage.cpp:283
+#: ../src/richtext/richtextborderspage.cpp:285
+msgid "Units for the left border width."
+msgstr "Sol sınır genişliğinin birimleri."
+
+#: ../src/richtext/richtextmarginspage.cpp:205
+#: ../src/richtext/richtextmarginspage.cpp:207
+msgid "Units for the left margin."
+msgstr "Sol kenar boşluğunun birimleri."
+
+#: ../src/richtext/richtextborderspage.cpp:427
+#: ../src/richtext/richtextborderspage.cpp:429
+msgid "Units for the left outline width."
+msgstr "Sol taslak genişliğinin birimleri."
+
+#: ../src/richtext/richtextmarginspage.cpp:319
+#: ../src/richtext/richtextmarginspage.cpp:321
+msgid "Units for the left padding."
+msgstr "Sol yastıklamanın birimleri."
+
+#: ../src/richtext/richtextsizepage.cpp:559
+#: ../src/richtext/richtextsizepage.cpp:561
+msgid "Units for the left position."
+msgstr "Sol konumun birimleri."
+
+#: ../src/richtext/richtextsizepage.cpp:485
+#: ../src/richtext/richtextsizepage.cpp:487
+msgid "Units for the maximum object height."
+msgstr "En fazla nesne yüksekliğinin birimleri."
+
+#: ../src/richtext/richtextsizepage.cpp:458
+#: ../src/richtext/richtextsizepage.cpp:460
+msgid "Units for the maximum object width."
+msgstr "En fazla nesne genişliğinin birimleri."
+
+#: ../src/richtext/richtextsizepage.cpp:431
+#: ../src/richtext/richtextsizepage.cpp:433
+msgid "Units for the minimum object height."
+msgstr "En az nesne yüksekliğinin birimleri."
+
+#: ../src/richtext/richtextsizepage.cpp:404
+#: ../src/richtext/richtextsizepage.cpp:406
+msgid "Units for the minimum object width."
+msgstr "En az nesne genişliğinin birimleri."
+
+#: ../src/richtext/richtextsizepage.cpp:377
+#: ../src/richtext/richtextsizepage.cpp:379
+msgid "Units for the object height."
+msgstr "Nesne yüksekliğinin birimleri."
+
+#: ../src/richtext/richtextsizepage.cpp:343
+#: ../src/richtext/richtextsizepage.cpp:345
+msgid "Units for the object width."
+msgstr "Nesne genişliğinin birimleri."
+
+#: ../src/richtext/richtextborderspage.cpp:313
+#: ../src/richtext/richtextborderspage.cpp:315
+msgid "Units for the right border width."
+msgstr "Sağ sınır genişliğinin birimleri."
+
+#: ../src/richtext/richtextmarginspage.cpp:230
+#: ../src/richtext/richtextmarginspage.cpp:232
+msgid "Units for the right margin."
+msgstr "Sağ kenar boşluğunun birimleri."
+
+#: ../src/richtext/richtextborderspage.cpp:457
+#: ../src/richtext/richtextborderspage.cpp:459
+msgid "Units for the right outline width."
+msgstr "Sağ taslak genişliğinin birimleri."
+
+#: ../src/richtext/richtextmarginspage.cpp:344
+#: ../src/richtext/richtextmarginspage.cpp:346
+msgid "Units for the right padding."
+msgstr "Sağ yastıklamanın birimleri."
+
+#: ../src/richtext/richtextsizepage.cpp:629
+#: ../src/richtext/richtextsizepage.cpp:631
+msgid "Units for the right position."
+msgstr "Sağ konumun birimleri."
+
+#: ../src/richtext/richtextborderspage.cpp:343
+#: ../src/richtext/richtextborderspage.cpp:345
+msgid "Units for the top border width."
+msgstr "Üst kenarlık genişliğinin birimleri."
+
+#: ../src/richtext/richtextmarginspage.cpp:253
+#: ../src/richtext/richtextmarginspage.cpp:255
+msgid "Units for the top margin."
+msgstr "Üst kenar boşluğunun birimleri."
+
+#: ../src/richtext/richtextborderspage.cpp:487
+#: ../src/richtext/richtextborderspage.cpp:489
+msgid "Units for the top outline width."
+msgstr "Üst taslak genişliğinin birimleri."
+
+#: ../src/richtext/richtextmarginspage.cpp:367
+#: ../src/richtext/richtextmarginspage.cpp:369
+msgid "Units for the top padding."
+msgstr "Üst yastıklamanın birimleri."
+
+#: ../src/richtext/richtextsizepage.cpp:594
+#: ../src/richtext/richtextsizepage.cpp:596
+msgid "Units for the top position."
+msgstr "Üst konumun birimleri."
+
+#: ../src/generic/progdlgg.cpp:382 ../src/generic/progdlgg.cpp:655
+msgid "Unknown"
+msgstr "Bilinmeyen"
+
+#: ../src/msw/dde.cpp:1177
+#, c-format
+msgid "Unknown DDE error %08x"
+msgstr "Bilinmeyen DDE hatası %08x"
+
+#: ../src/common/xtistrm.cpp:414
+msgid "Unknown Object passed to GetObjectClassInfo"
+msgstr "GetObjectClassInfo işlevi bilinmeyen nesne ile çağrıldı"
+
+#: ../src/common/imagpng.cpp:614
+#, c-format
+msgid "Unknown PNG resolution unit %d"
+msgstr "Bilinmeyen PNG çözünürlük birimi %d "
+
+#: ../src/common/xtixml.cpp:327
+#, c-format
+msgid "Unknown Property %s"
+msgstr "Bilinmeyen Özellik %s"
+
+#: ../src/common/imagtiff.cpp:532
+#, c-format
+msgid "Unknown TIFF resolution unit %d ignored"
+msgstr "Bilinmeyen TIFF %d çözünürlük birimi yok sayıldı"
+
+#: ../src/osx/carbon/dataview.cpp:1978
+msgid "Unknown data format"
+msgstr "Bilinmeyen veri biçimi"
+
+#: ../src/unix/dlunix.cpp:325
+msgid "Unknown dynamic library error"
+msgstr "Blinmeyen devingen kitaplık hatası"
+
+#: ../src/common/fmapbase.cpp:810
+#, c-format
+msgid "Unknown encoding (%d)"
+msgstr "Bilinmeyen kodlama (%d)"
+
+#: ../src/msw/ole/automtn.cpp:677
+#, c-format
+msgid "Unknown error %08x"
+msgstr "Bilinmeyen hata %08x"
+
+#: ../src/msw/ole/automtn.cpp:636
+msgid "Unknown exception"
+msgstr "Bilinmeyen istisna"
+
+#: ../src/common/image.cpp:2701
+msgid "Unknown image data format."
+msgstr "Bilinmeyen görsel veri biçimi."
+
+#: ../src/common/cmdline.cpp:749
+#, c-format
+msgid "Unknown long option '%s'"
+msgstr "Blinmeyen long seçeneği '%s'"
+
+#: ../src/msw/ole/automtn.cpp:620
+msgid "Unknown name or named argument."
+msgstr "Bilinmeyen ad ya da adlandırılmış argüman."
+
+#: ../src/common/cmdline.cpp:764 ../src/common/cmdline.cpp:786
+#, c-format
+msgid "Unknown option '%s'"
+msgstr "Bilinmeyen seçenek '%s'"
+
+#: ../src/common/mimecmn.cpp:230
+#, c-format
+msgid "Unmatched '{' in an entry for mime type %s."
+msgstr "%s MIME tipi kaydına uymayan '{'."
+
+#: ../src/common/cmdproc.cpp:262 ../src/common/cmdproc.cpp:288
+#: ../src/common/cmdproc.cpp:308
+msgid "Unnamed command"
+msgstr "Adsız komut"
+
+#: ../src/propgrid/propgrid.cpp:398
+msgid "Unspecified"
+msgstr "Belirtilmemiş"
+
+#: ../src/msw/clipbrd.cpp:271 ../src/msw/clipbrd.cpp:439
+msgid "Unsupported clipboard format."
+msgstr "Desteklenmeyen pano biçimi."
+
+#: ../src/common/appcmn.cpp:249
+#, c-format
+msgid "Unsupported theme '%s'."
+msgstr "Desteklenmeyen tema '%s'."
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:205
+msgid "Up"
+msgstr "Yukarı"
+
+#: ../src/richtext/richtextliststylepage.cpp:483
+#: ../src/richtext/richtextbulletspage.cpp:288
+msgid "Upper case letters"
+msgstr "Büyük harfler"
+
+#: ../src/richtext/richtextliststylepage.cpp:485
+#: ../src/richtext/richtextbulletspage.cpp:290
+msgid "Upper case roman numerals"
+msgstr "Büyük harf romen rakamları"
+
+#: ../src/common/cmdline.cpp:1155
+#, c-format
+msgid "Usage: %s"
+msgstr "Kullanım: %s"
+
+#: ../src/richtext/richtextindentspage.cpp:169
+#: ../src/richtext/richtextindentspage.cpp:171
+#: ../src/richtext/richtextliststylepage.cpp:358
+#: ../src/richtext/richtextliststylepage.cpp:360
+msgid "Use the current alignment setting."
+msgstr "Geçerli hizalama ayarları kullanılsın."
+
+#: ../src/osx/carbon/dataview.cpp:2658 ../src/osx/carbon/dataview.cpp:2723
+msgid "Valid pointer to native data view control does not exist"
+msgstr "Doğal veri görünüm denetimine ait bir imleç yok"
+
+#: ../src/common/valtext.cpp:174
+msgid "Validation conflict"
+msgstr "Doğrulama çelişkisi"
+
+#: ../src/propgrid/manager.cpp:238
+msgid "Value"
+msgstr "Değer"
+
+#: ../src/propgrid/props.cpp:384
+#, c-format
+msgid "Value must be %s or higher."
+msgstr "Değer %s ya da daha büyük olmalı."
+
+#: ../src/propgrid/props.cpp:411
+#, c-format
+msgid "Value must be %s or less."
+msgstr "Değer %s ya da daha küçük olmalı."
+
+#: ../src/propgrid/props.cpp:388 ../src/propgrid/props.cpp:415
+#, c-format
+msgid "Value must be between %s and %s."
+msgstr "Değer %s ile %s arasında olmalı."
+
+#: ../src/generic/aboutdlgg.cpp:128
+msgid "Version "
+msgstr "Sürüm"
+
+#: ../src/richtext/richtextsizepage.cpp:291
+#: ../src/richtext/richtextsizepage.cpp:293
+msgid "Vertical alignment."
+msgstr "Dikey hizalama."
+
+#: ../src/generic/filedlgg.cpp:216
+msgid "View files as a detailed view"
+msgstr "Dosyalar ayrıntılı görünümde görüntülensin"
+
+#: ../src/generic/filedlgg.cpp:214
+msgid "View files as a list view"
+msgstr "Dosyalar liste görünümünde görüntülensin"
+
+#: ../src/common/docview.cpp:1952
+msgid "Views"
+msgstr "Görünümler"
+
+#: ../src/common/accelcmn.cpp:108
+msgid "WINDOWS_LEFT"
+msgstr "WINDOWS_LEFT"
+
+#: ../src/common/accelcmn.cpp:110
+msgid "WINDOWS_MENU"
+msgstr "WINDOWS_MENU"
+
+#: ../src/common/accelcmn.cpp:109
+msgid "WINDOWS_RIGHT"
+msgstr "WINDOWS_RIGHT"
+
+#: ../src/unix/epolldispatcher.cpp:213
+#, c-format
+msgid "Waiting for IO on epoll descriptor %d failed"
+msgstr "%d epoll tanımlayıcısı üstündeki GÇ beklemesi başarısız"
+
+#: ../src/common/log.cpp:227
+msgid "Warning: "
+msgstr "Uyarı:"
+
+#: ../src/propgrid/advprops.cpp:651
+msgid "Weight"
+msgstr "Yoğunluk"
+
+#: ../src/common/fmapbase.cpp:148
+msgid "Western European (ISO-8859-1)"
+msgstr "Batı Avrupa (ISO-8859-1)"
+
+#: ../src/common/fmapbase.cpp:162
+msgid "Western European with Euro (ISO-8859-15)"
+msgstr "Batı Avrupa (Euro) (ISO-8859-15)"
+
+#: ../src/generic/fontdlgg.cpp:446 ../src/generic/fontdlgg.cpp:448
+msgid "Whether the font is underlined."
+msgstr "Yazı tipinin altıçizili olup olmadığı."
+
+#: ../src/generic/fdrepdlg.cpp:144
+msgid "Whole word"
+msgstr "Tam kelime"
+
+#: ../src/html/helpwnd.cpp:547
+msgid "Whole words only"
+msgstr "Yalnız tam kelimeler"
+
+#: ../src/univ/themes/win32.cpp:1102
+msgid "Win32 theme"
+msgstr "Win32 teması"
+
+#: ../src/msw/utils.cpp:1220
+msgid "Win32s on Windows 3.1"
+msgstr "Windows 3.1 üstünde Win32s"
+
+#: ../src/msw/utils.cpp:1270
+msgid "Windows 2000"
+msgstr "Windows 2000"
+
+#: ../src/msw/utils.cpp:1302
+msgid "Windows 7"
+msgstr "Windows 7"
+
+#: ../src/msw/utils.cpp:1234
+msgid "Windows 95"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1230
+msgid "Windows 95 OSR2"
+msgstr "Windows 95 OSR2"
+
+#: ../src/msw/utils.cpp:1245
+msgid "Windows 98"
+msgstr "Windows 98"
+
+#: ../src/msw/utils.cpp:1241
+msgid "Windows 98 SE"
+msgstr "Windows 98 SE"
+
+#: ../src/msw/utils.cpp:1252
+#, c-format
+msgid "Windows 9x (%d.%d)"
+msgstr "Windows 9x (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:177
+msgid "Windows Arabic (CP 1256)"
+msgstr "Windows Arapça (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:178
+msgid "Windows Baltic (CP 1257)"
+msgstr "Windows Baltık (CP 1257)"
+
+#: ../src/msw/utils.cpp:1214
+#, c-format
+msgid "Windows CE (%d.%d)"
+msgstr "Windows CE (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:171
+msgid "Windows Central European (CP 1250)"
+msgstr "Windows Orta Avrupa (CP 1250)"
+
+#: ../src/common/fmapbase.cpp:168
+msgid "Windows Chinese Simplified (CP 936) or GB-2312"
+msgstr "Windows Basitleştirilmiş Çince (CP 936) ya da GB-2312"
+
+#: ../src/common/fmapbase.cpp:170
+msgid "Windows Chinese Traditional (CP 950) or Big-5"
+msgstr "Windows Geleneksel Çince (CP 950) ya da Big-5"
+
+#: ../src/common/fmapbase.cpp:172
+msgid "Windows Cyrillic (CP 1251)"
+msgstr "Windows Kiril (CP 1251)"
+
+#: ../src/common/fmapbase.cpp:174
+msgid "Windows Greek (CP 1253)"
+msgstr "Windows Yunanca (CP 1253)"
+
+#: ../src/common/fmapbase.cpp:176
+msgid "Windows Hebrew (CP 1255)"
+msgstr "Windows İbranice (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:167
+msgid "Windows Japanese (CP 932) or Shift-JIS"
+msgstr "Windows Japonca (CP 932) ya da Shift-JIS"
+
+#: ../src/common/fmapbase.cpp:180
+msgid "Windows Johab (CP 1361)"
+msgstr "Windows Johab (CP 1361)"
+
+#: ../src/common/fmapbase.cpp:169
+msgid "Windows Korean (CP 949)"
+msgstr "Windows Korece (CP 949)"
+
+#: ../src/msw/utils.cpp:1249
+msgid "Windows ME"
+msgstr "Windows ME"
+
+#: ../src/msw/utils.cpp:1310
+#, c-format
+msgid "Windows NT %lu.%lu"
+msgstr "Windows NT %lu.%lu"
+
+#: ../src/msw/utils.cpp:1279
+msgid "Windows Server 2003"
+msgstr "Windows Server 2003"
+
+#: ../src/msw/utils.cpp:1295
+msgid "Windows Server 2008"
+msgstr "Windows Server 2008"
+
+#: ../src/msw/utils.cpp:1301
+msgid "Windows Server 2008 R2"
+msgstr "Windows Server 2008 R2"
+
+#: ../src/common/fmapbase.cpp:166
+msgid "Windows Thai (CP 874)"
+msgstr "Windows Tai (CP 874)"
+
+#: ../src/common/fmapbase.cpp:175
+msgid "Windows Turkish (CP 1254)"
+msgstr "Windows Türkçe (CP 1254)"
+
+#: ../src/common/fmapbase.cpp:179
+msgid "Windows Vietnamese (CP 1258)"
+msgstr "Windows Vietnamca (CP 1258)"
+
+#: ../src/msw/utils.cpp:1296
+msgid "Windows Vista"
+msgstr "Windows Vista"
+
+#: ../src/common/fmapbase.cpp:173
+msgid "Windows Western European (CP 1252)"
+msgstr "Windows Batı Avrupa (CP 1252)"
+
+#: ../src/msw/utils.cpp:1285
+msgid "Windows XP"
+msgstr "Windows XP"
+
+#: ../src/common/fmapbase.cpp:181
+msgid "Windows/DOS OEM (CP 437)"
+msgstr "Windows/DOS OEM (CP 437)"
+
+#: ../src/common/fmapbase.cpp:165
+msgid "Windows/DOS OEM Cyrillic (CP 866)"
+msgstr "Windows/DOS OEM Kiril (CP 866)"
+
+#: ../src/common/ffile.cpp:148
+#, c-format
+msgid "Write error on file '%s'"
+msgstr "'%s' dosyasına yazma hatası"
+
+#: ../src/xml/xml.cpp:844
+#, c-format
+msgid "XML parsing error: '%s' at line %d"
+msgstr "'%s' XML işleme hatası: Satır %d"
+
+#: ../src/common/xpmdecod.cpp:796
+msgid "XPM: Malformed pixel data!"
+msgstr "XPM: Bozuk piksel verisi!"
+
+#: ../src/common/xpmdecod.cpp:705
+#, c-format
+msgid "XPM: incorrect colour description in line %d"
+msgstr "XPM: %d satırında hatalı renk açıklaması"
+
+#: ../src/common/xpmdecod.cpp:680
+msgid "XPM: incorrect header format!"
+msgstr "XPM: hatalı üstbilgi biçimi!"
+
+#: ../src/common/xpmdecod.cpp:716 ../src/common/xpmdecod.cpp:725
+#, c-format
+msgid "XPM: malformed colour definition '%s' at line %d!"
+msgstr "XPM: '%s' bozuk renk tanımı, satır %d!"
+
+#: ../src/common/xpmdecod.cpp:755
+msgid "XPM: no colors left to use for mask!"
+msgstr "XPM: maske için kullanılacak renk kalmadı!"
+
+#: ../src/common/xpmdecod.cpp:782
+#, c-format
+msgid "XPM: truncated image data at line %d!"
+msgstr "XPM: %d satırında budanmış görüntü verisi!"
+
+#: ../include/wx/msgdlg.h:271 ../src/common/stockitem.cpp:206
+#: ../src/motif/msgdlg.cpp:196
+msgid "Yes"
+msgstr "Evet"
+
+#: ../src/osx/carbon/overlay.cpp:155
+msgid "You cannot Clear an overlay that is not inited"
+msgstr "Hazırlanmamış bir örtüşmeyi temizleyemezsiniz"
+
+#: ../src/osx/carbon/overlay.cpp:107 ../src/dfb/overlay.cpp:61
+msgid "You cannot Init an overlay twice"
+msgstr "Bir örtüşmeyi iki kez hazırlayamazsınız"
+
+#: ../src/generic/dirdlgg.cpp:316
+msgid "You cannot add a new directory to this section."
+msgstr "Bu bölüme yeni bir klasör ekleyemezsiniz."
+
+#: ../src/propgrid/propgrid.cpp:3258
+msgid "You have entered invalid value. Press ESC to cancel editing."
+msgstr ""
+"Geçersiz bir değer yazdınız, düzenlemeyi iptal etmek için ESC tuşuna basın."
+
+#: ../src/common/stockitem.cpp:209
+msgid "Zoom &In"
+msgstr "&Yaklaştırın"
+
+#: ../src/common/stockitem.cpp:210
+msgid "Zoom &Out"
+msgstr "&Uzaklaştırın"
+
+#: ../src/common/stockitem.cpp:209 ../src/common/prntbase.cpp:1564
+msgid "Zoom In"
+msgstr "Yaklaştırın"
+
+#: ../src/common/stockitem.cpp:210 ../src/common/prntbase.cpp:1550
+msgid "Zoom Out"
+msgstr "Uzaklaştırın"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to &Fit"
+msgstr "&Sığdırın"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to Fit"
+msgstr "Sığdırın"
+
+#: ../src/msw/dde.cpp:1144
+msgid "a DDEML application has created a prolonged race condition."
+msgstr "bir DDEML uygulaması uzun koşu durumu oluşturdu."
+
+#: ../src/msw/dde.cpp:1132
+msgid ""
+"a DDEML function was called without first calling the DdeInitialize "
+"function,\n"
+"or an invalid instance identifier\n"
+"was passed to a DDEML function."
+msgstr ""
+"DDEML işlevi önceden DdeInitialize işlevi çağrılmadan çağrıldı,\n"
+"ya da DDEML işlevine geçersiz bir \n"
+"örnek tanımlayıcısı gönderildi."
+
+#: ../src/msw/dde.cpp:1150
+msgid "a client's attempt to establish a conversation has failed."
+msgstr "bir istemcinin konuşma başlatma denemesi başarısız oldu."
+
+#: ../src/msw/dde.cpp:1147
+msgid "a memory allocation failed."
+msgstr "bellek ayrılamadı."
+
+#: ../src/msw/dde.cpp:1141
+msgid "a parameter failed to be validated by the DDEML."
+msgstr "parametre DDEML tarafından doğrulanamadı."
+
+#: ../src/msw/dde.cpp:1123
+msgid "a request for a synchronous advise transaction has timed out."
+msgstr "eşzamanlı danışma hareketi isteği zaman aşımına uğradı."
+
+#: ../src/msw/dde.cpp:1129
+msgid "a request for a synchronous data transaction has timed out."
+msgstr "eşzamanlı veri hareketi isteği zaman aşımına uğradı."
+
+#: ../src/msw/dde.cpp:1138
+msgid "a request for a synchronous execute transaction has timed out."
+msgstr "eşzamanlı çalıştırma hareketi isteği zaman aşımına uğradı."
+
+#: ../src/msw/dde.cpp:1156
+msgid "a request for a synchronous poke transaction has timed out."
+msgstr "eşzamanlı itme hareketi isteği zaman aşımına uğradı."
+
+#: ../src/msw/dde.cpp:1171
+msgid "a request to end an advise transaction has timed out."
+msgstr "danışma hareketi bitirme isteği zaman aşımına uğradı."
+
+#: ../src/msw/dde.cpp:1165
+msgid ""
+"a server-side transaction was attempted on a conversation\n"
+"that was terminated by the client, or the server\n"
+"terminated before completing a transaction."
+msgstr ""
+"istemci tarafından sonlandırılmış bir görüşme üstünde\n"
+"sunucu tarafında bir hareket denendi, ya da sunucu\n"
+"hareket tamamlanmadan sonlandırıldı."
+
+#: ../src/msw/dde.cpp:1153
+msgid "a transaction failed."
+msgstr "hareket başarısız oldu."
+
+#: ../src/common/accelcmn.cpp:184
+msgid "alt"
+msgstr "alt"
+
+#: ../src/msw/dde.cpp:1135
+msgid ""
+"an application initialized as APPCLASS_MONITOR has\n"
+"attempted to perform a DDE transaction,\n"
+"or an application initialized as APPCMD_CLIENTONLY has \n"
+"attempted to perform server transactions."
+msgstr ""
+"APPCLASS_MONITOR olarak başlatılmış bir uygulama\n"
+"DDE hareketi gerçekleştirmeyi denedi,\n"
+"ya da APPCMD_CLIENTONLY olarak başlatılmış bir uygulama\n"
+"sunucu hareketi gerçekleştirmeyi denedi."
+
+#: ../src/msw/dde.cpp:1159
+msgid "an internal call to the PostMessage function has failed. "
+msgstr "PostMessage işlevine içsel çağrı yapılamadı."
+
+#: ../src/msw/dde.cpp:1168
+msgid "an internal error has occurred in the DDEML."
+msgstr "DDEML içsel hatası."
+
+#: ../src/msw/dde.cpp:1174
+msgid ""
+"an invalid transaction identifier was passed to a DDEML function.\n"
+"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n"
+"the transaction identifier for that callback is no longer valid."
+msgstr ""
+"DDEML işlevine geçersiz hareket kimliği gönderilmiş.\n"
+"Uygulama XTYP_XACT_COMPLETE çağrısından döndüğünde\n"
+"bu çağrının hareket kimliği geçersiz olacak."
+
+#: ../src/common/zipstrm.cpp:1272
+msgid "assuming this is a multi-part zip concatenated"
+msgstr "bunun çok parçalı birleştirilmiş bir zip olduğu varsayılıyor"
+
+#: ../src/common/fileconf.cpp:1882
+#, c-format
+msgid "attempt to change immutable key '%s' ignored."
+msgstr "'%s' değişmez anahtarını değiştirme denemesi yok sayıldı."
+
+#: ../src/html/chm.cpp:329
+msgid "bad arguments to library function"
+msgstr "kitaplık işlevi için hatalı değişkenler"
+
+#: ../src/html/chm.cpp:341
+msgid "bad signature"
+msgstr "kötü imza"
+
+#: ../src/common/zipstrm.cpp:1715
+msgid "bad zipfile offset to entry"
+msgstr "kayıt için hatalı zip dosyası konumu"
+
+#: ../src/common/ftp.cpp:405
+msgid "binary"
+msgstr "ikili"
+
+#: ../src/common/fontcmn.cpp:978
+msgid "bold"
+msgstr "koyu"
+
+#: ../src/os2/iniconf.cpp:463
+msgid "buffer is too small for Windows directory."
+msgstr "arabellek Windows klasörü için çok küçük."
+
+#: ../src/msw/utils.cpp:1316
+#, c-format
+msgid "build %lu"
+msgstr "yapım %lu"
+
+#: ../src/common/ffile.cpp:79
+#, c-format
+msgid "can't close file '%s'"
+msgstr "'%s' dosyası kapatılamıyor"
+
+#: ../src/common/file.cpp:278
+#, c-format
+msgid "can't close file descriptor %d"
+msgstr "%d dosya tanımlayıcısı kapatılamıyor"
+
+#: ../src/common/file.cpp:604
+#, c-format
+msgid "can't commit changes to file '%s'"
+msgstr "'%s' dosyasındaki değişiklikler işlenemiyor"
+
+#: ../src/common/file.cpp:212
+#, c-format
+msgid "can't create file '%s'"
+msgstr "'%s' dosyası oluşturulamıyor"
+
+#: ../src/common/fileconf.cpp:1176
+#, c-format
+msgid "can't delete user configuration file '%s'"
+msgstr "kullanıcı yapılandırma dosyası '%s' silinemiyor"
+
+#: ../src/common/file.cpp:511
+#, c-format
+msgid "can't determine if the end of file is reached on descriptor %d"
+msgstr ""
+"%d tanımlayıcısı üstündeki dosyanın sonuna ulaşılıp ulaşılamadığı "
+"belirlenemiyor"
+
+#: ../src/msdos/utilsdos.cpp:310 ../src/msdos/utilsdos.cpp:475
+#, c-format
+msgid "can't execute '%s'"
+msgstr "'%s' çalıştırılamadı"
+
+#: ../src/common/zipstrm.cpp:1490
+msgid "can't find central directory in zip"
+msgstr "zip içinde merkez klasör bulunamıyor"
+
+#: ../src/common/file.cpp:481
+#, c-format
+msgid "can't find length of file on file descriptor %d"
+msgstr "%d tanımlayıcısı üstündeki dosyanın uzunluğu bulunamıyor"
+
+#: ../src/msw/utils.cpp:373
+msgid "can't find user's HOME, using current directory."
+msgstr "kullanıcının klasörü bulunamadığından geçerli klasör kullanılıyor."
+
+#: ../src/common/file.cpp:382
+#, c-format
+msgid "can't flush file descriptor %d"
+msgstr "%d dosya tanımlayıcısı temizlenemiyor"
+
+#: ../src/common/file.cpp:438 ../src/msw/wince/filefnwce.cpp:204
+#, c-format
+msgid "can't get seek position on file descriptor %d"
+msgstr "%d dosya tanımlayıcısı üstündeki arama konumu alınamıyor"
+
+#: ../src/common/fontmap.cpp:325
+msgid "can't load any font, aborting"
+msgstr "hiç bir yazı tipi yüklenemedi, vazgeçiliyor"
+
+#: ../src/common/file.cpp:264 ../src/common/ffile.cpp:63
+#, c-format
+msgid "can't open file '%s'"
+msgstr "'%s' dosyası açılamıyor"
+
+#: ../src/common/fileconf.cpp:351
+#, c-format
+msgid "can't open global configuration file '%s'."
+msgstr "'%s' genel ayar dosyası açılamıyor"
+
+#: ../src/common/fileconf.cpp:367
+#, c-format
+msgid "can't open user configuration file '%s'."
+msgstr "'%s' kullanıcı ayar dosyası açılamıyor"
+
+#: ../src/common/fileconf.cpp:1017
+msgid "can't open user configuration file."
+msgstr "kullanıcı ayar dosyası açılamıyor."
+
+#: ../src/common/zipstrm.cpp:527
+msgid "can't re-initialize zlib deflate stream"
+msgstr "zlib ayıklama akışı yeniden başlatılamadı"
+
+#: ../src/common/zipstrm.cpp:552
+msgid "can't re-initialize zlib inflate stream"
+msgstr "zlib sıkıştırma akışı yeniden başlatılamadı"
+
+#: ../src/common/file.cpp:334
+#, c-format
+msgid "can't read from file descriptor %d"
+msgstr "%d dosya tanımlayıcısından okunamıyor"
+
+#: ../src/common/file.cpp:599
+#, c-format
+msgid "can't remove file '%s'"
+msgstr "'%s' dosyası silinemedi"
+
+#: ../src/common/file.cpp:616
+#, c-format
+msgid "can't remove temporary file '%s'"
+msgstr "'%s' geçici dosyası silinemedi"
+
+#: ../src/common/file.cpp:424 ../src/msw/wince/filefnwce.cpp:190
+#, c-format
+msgid "can't seek on file descriptor %d"
+msgstr "%d dosya tanımlayıcısı üzerinde arama yapılamıyor"
+
+#: ../src/common/textfile.cpp:299
+#, c-format
+msgid "can't write buffer '%s' to disk."
+msgstr "'%s' arabelleği diske yazılamadı."
+
+#: ../src/common/file.cpp:350
+#, c-format
+msgid "can't write to file descriptor %d"
+msgstr "%d dosya tanımlayıcısına yazılamıyor"
+
+#: ../src/common/fileconf.cpp:1031
+msgid "can't write user configuration file."
+msgstr "kullanıcı ayar dosyası yazılamadı."
+
+#: ../src/html/chm.cpp:345
+msgid "checksum error"
+msgstr "sağlama toplamı hatası"
+
+#: ../src/common/tarstrm.cpp:820
+msgid "checksum failure reading tar header block"
+msgstr "tar başlık bloğu okunurken sağlama toplamı hatası"
+
+#: ../src/richtext/richtextborderspage.cpp:280
+#: ../src/richtext/richtextborderspage.cpp:310
+#: ../src/richtext/richtextborderspage.cpp:340
+#: ../src/richtext/richtextborderspage.cpp:370
+#: ../src/richtext/richtextborderspage.cpp:424
+#: ../src/richtext/richtextborderspage.cpp:454
+#: ../src/richtext/richtextborderspage.cpp:484
+#: ../src/richtext/richtextborderspage.cpp:514
+#: ../src/richtext/richtextmarginspage.cpp:202
+#: ../src/richtext/richtextmarginspage.cpp:227
+#: ../src/richtext/richtextmarginspage.cpp:250
+#: ../src/richtext/richtextmarginspage.cpp:275
+#: ../src/richtext/richtextmarginspage.cpp:316
+#: ../src/richtext/richtextmarginspage.cpp:341
+#: ../src/richtext/richtextmarginspage.cpp:364
+#: ../src/richtext/richtextmarginspage.cpp:389
+#: ../src/richtext/richtextsizepage.cpp:339
+#: ../src/richtext/richtextsizepage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:400
+#: ../src/richtext/richtextsizepage.cpp:427
+#: ../src/richtext/richtextsizepage.cpp:454
+#: ../src/richtext/richtextsizepage.cpp:481
+#: ../src/richtext/richtextsizepage.cpp:555
+#: ../src/richtext/richtextsizepage.cpp:590
+#: ../src/richtext/richtextsizepage.cpp:625
+#: ../src/richtext/richtextsizepage.cpp:660
+msgid "cm"
+msgstr "cm"
+
+#: ../src/html/chm.cpp:347
+msgid "compression error"
+msgstr "sıkıştırma hatası"
+
+#: ../src/common/regex.cpp:239
+msgid "conversion to 8-bit encoding failed"
+msgstr "8-bit kodlama dönüşümü yapılamadı"
+
+#: ../src/common/accelcmn.cpp:182
+msgid "ctrl"
+msgstr "ctrl"
+
+#: ../src/common/cmdline.cpp:1323
+msgid "date"
+msgstr "tarih"
+
+#: ../src/html/chm.cpp:349
+msgid "decompression error"
+msgstr "ayıklama hatası"
+
+#: ../src/richtext/richtextstyles.cpp:780 ../src/common/fmapbase.cpp:820
+msgid "default"
+msgstr "varsayılan"
+
+#: ../src/common/cmdline.cpp:1319
+msgid "double"
+msgstr "çift"
+
+#: ../src/common/debugrpt.cpp:543
+msgid "dump of the process state (binary)"
+msgstr "işlem durum dökümü (ikili)"
+
+#: ../src/common/datetimefmt.cpp:1936
+msgid "eighteenth"
+msgstr "onsekizinci"
+
+#: ../src/common/datetimefmt.cpp:1926
+msgid "eighth"
+msgstr "sekizinci"
+
+#: ../src/common/datetimefmt.cpp:1929
+msgid "eleventh"
+msgstr "onbirinci"
+
+#: ../src/common/fileconf.cpp:1868
+#, c-format
+msgid "entry '%s' appears more than once in group '%s'"
+msgstr "'%s' kaydı '%s' grubunda birden çok kez var"
+
+#: ../src/html/chm.cpp:343
+msgid "error in data format"
+msgstr "veri biçimi hatası"
+
+#: ../src/msdos/utilsdos.cpp:413
+#, c-format
+msgid "error opening '%s'"
+msgstr "'%s' açma hatası"
+
+#: ../src/html/chm.cpp:331
+msgid "error opening file"
+msgstr "dosya açma hatası"
+
+#: ../src/common/zipstrm.cpp:1576
+msgid "error reading zip central directory"
+msgstr "zip merkez klasörünü okuma hatası"
+
+#: ../src/common/zipstrm.cpp:1667
+msgid "error reading zip local header"
+msgstr "zip yerel başlığını okuma hatası"
+
+#: ../src/common/zipstrm.cpp:2396
+#, c-format
+msgid "error writing zip entry '%s': bad crc or length"
+msgstr "'%s' zip kaydı yazma hatası: hatalı CRC ya da uzunluk"
+
+#: ../src/common/ffile.cpp:170
+#, c-format
+msgid "failed to flush the file '%s'"
+msgstr "'%s' dosyası temizlenemedi"
+
+#: ../src/common/datetimefmt.cpp:1933
+msgid "fifteenth"
+msgstr "onbeşinci"
+
+#: ../src/common/datetimefmt.cpp:1923
+msgid "fifth"
+msgstr "beşinci"
+
+#: ../src/common/fileconf.cpp:610
+#, c-format
+msgid "file '%s', line %d: '%s' ignored after group header."
+msgstr "dosya '%s', satır %d: '%s' grup başlığından sonra yok sayıldı."
+
+#: ../src/common/fileconf.cpp:639
+#, c-format
+msgid "file '%s', line %d: '=' expected."
+msgstr "dosya '%s', satır %d: '=' bekleniyor."
+
+#: ../src/common/fileconf.cpp:662
+#, c-format
+msgid "file '%s', line %d: key '%s' was first found at line %d."
+msgstr "dosya '%s', satır %d: anahtar '%s' ilk olarak %d satırında bulundu."
+
+#: ../src/common/fileconf.cpp:652
+#, c-format
+msgid "file '%s', line %d: value for immutable key '%s' ignored."
+msgstr "dosya '%s', satır %d: '%s' değişmez anahtarı için değer yok sayıldı."
+
+#: ../src/common/fileconf.cpp:574
+#, c-format
+msgid "file '%s': unexpected character %c at line %d."
+msgstr "dosya '%s': beklenmedik karakter %c,  satır: %d."
+
+#: ../src/richtext/richtextbuffer.cpp:8358
+msgid "files"
+msgstr "dosyalar"
+
+#: ../src/common/datetimefmt.cpp:1919
+msgid "first"
+msgstr "birinci"
+
+#: ../src/html/helpwnd.cpp:1265
+msgid "font size"
+msgstr "yazı tipi boyutu"
+
+#: ../src/common/datetimefmt.cpp:1932
+msgid "fourteenth"
+msgstr "ondördüncü"
+
+#: ../src/common/datetimefmt.cpp:1922
+msgid "fourth"
+msgstr "dördüncü"
+
+#: ../src/common/appbase.cpp:695
+msgid "generate verbose log messages"
+msgstr "ayrıntılı günlük iletileri oluşturulsun"
+
+#: ../src/richtext/richtextbuffer.cpp:12212
+#: ../src/richtext/richtextbuffer.cpp:12322
+msgid "image"
+msgstr "görsel"
+
+#: ../src/common/tarstrm.cpp:796
+msgid "incomplete header block in tar"
+msgstr "tar başlık bloğu eksik"
+
+#: ../src/common/xtixml.cpp:489
+msgid "incorrect event handler string, missing dot"
+msgstr "hatalı olay işleyici dizgesi, nokta eksik"
+
+#: ../src/common/tarstrm.cpp:1381
+msgid "incorrect size given for tar entry"
+msgstr "tar kaydının boyutu hatalı verilmiş"
+
+#: ../src/common/tarstrm.cpp:993
+msgid "invalid data in extended tar header"
+msgstr "ek tar başlığında hatalı veri"
+
+#: ../src/generic/logg.cpp:1050
+msgid "invalid message box return value"
+msgstr "geçersiz ileti penceresi sonuç değeri"
+
+#: ../src/common/zipstrm.cpp:1445
+msgid "invalid zip file"
+msgstr "geçersiz zip dosyası"
+
+#: ../src/common/fontcmn.cpp:983
+msgid "italic"
+msgstr "yatık"
+
+#: ../src/common/fontcmn.cpp:973
+msgid "light"
+msgstr "açık"
+
+#: ../src/common/intl.cpp:293
+#, c-format
+msgid "locale '%s' cannot be set."
+msgstr "'%s' yerel ayarları seçilemiyor."
+
+#: ../src/common/datetimefmt.cpp:2092
+msgid "midnight"
+msgstr "gece yarısı"
+
+#: ../src/common/datetimefmt.cpp:1937
+msgid "nineteenth"
+msgstr "ondokuzuncu"
+
+#: ../src/common/datetimefmt.cpp:1927
+msgid "ninth"
+msgstr "dokuzuncu"
+
+#: ../src/msw/dde.cpp:1119
+msgid "no DDE error."
+msgstr "DDE bulunamadı hatası."
+
+#: ../src/html/chm.cpp:327
+msgid "no error"
+msgstr "hata yok"
+
+#: ../src/dfb/fontmgr.cpp:174
+#, c-format
+msgid "no fonts found in %s, using builtin font"
+msgstr "%s içinde yazı tipi yok, içsel yazı tipi kullanılıyor"
+
+#: ../src/html/helpdata.cpp:655
+msgid "noname"
+msgstr "adsız"
+
+#: ../src/common/datetimefmt.cpp:2091
+msgid "noon"
+msgstr "öğlen"
+
+#: ../src/richtext/richtextstyles.cpp:779
+msgid "normal"
+msgstr "normal"
+
+#: ../src/gtk/print.cpp:1218 ../src/gtk/print.cpp:1323
+msgid "not implemented"
+msgstr "eklenmedi"
+
+#: ../src/common/cmdline.cpp:1315
+msgid "num"
+msgstr "tamsayı"
+
+#: ../src/common/xtixml.cpp:259
+msgid "objects cannot have XML Text Nodes"
+msgstr "nesnelerin XML Metin Düğümleri olamaz"
+
+#: ../src/html/chm.cpp:339
+msgid "out of memory"
+msgstr "bellek yetersiz"
+
+#: ../src/richtext/richtextsizepage.cpp:340
+#: ../src/richtext/richtextsizepage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:401
+#: ../src/richtext/richtextsizepage.cpp:428
+#: ../src/richtext/richtextsizepage.cpp:455
+#: ../src/richtext/richtextsizepage.cpp:482
+#: ../src/richtext/richtextsizepage.cpp:556
+#: ../src/richtext/richtextsizepage.cpp:591
+#: ../src/richtext/richtextsizepage.cpp:626
+#: ../src/richtext/richtextsizepage.cpp:661
+msgid "percent"
+msgstr "yüzde"
+
+#: ../src/common/debugrpt.cpp:519
+msgid "process context description"
+msgstr "işlem bağlamı tanımı"
+
+#: ../src/richtext/richtextfontpage.cpp:186
+#: ../src/richtext/richtextfontpage.cpp:189
+msgid "pt"
+msgstr "punto"
+
+#: ../src/richtext/richtextfontpage.cpp:187
+#: ../src/richtext/richtextborderspage.cpp:279
+#: ../src/richtext/richtextborderspage.cpp:281
+#: ../src/richtext/richtextborderspage.cpp:282
+#: ../src/richtext/richtextborderspage.cpp:309
+#: ../src/richtext/richtextborderspage.cpp:311
+#: ../src/richtext/richtextborderspage.cpp:312
+#: ../src/richtext/richtextborderspage.cpp:339
+#: ../src/richtext/richtextborderspage.cpp:341
+#: ../src/richtext/richtextborderspage.cpp:342
+#: ../src/richtext/richtextborderspage.cpp:369
+#: ../src/richtext/richtextborderspage.cpp:371
+#: ../src/richtext/richtextborderspage.cpp:372
+#: ../src/richtext/richtextborderspage.cpp:423
+#: ../src/richtext/richtextborderspage.cpp:425
+#: ../src/richtext/richtextborderspage.cpp:426
+#: ../src/richtext/richtextborderspage.cpp:453
+#: ../src/richtext/richtextborderspage.cpp:455
+#: ../src/richtext/richtextborderspage.cpp:456
+#: ../src/richtext/richtextborderspage.cpp:483
+#: ../src/richtext/richtextborderspage.cpp:485
+#: ../src/richtext/richtextborderspage.cpp:486
+#: ../src/richtext/richtextborderspage.cpp:513
+#: ../src/richtext/richtextborderspage.cpp:515
+#: ../src/richtext/richtextborderspage.cpp:516
+#: ../src/richtext/richtextmarginspage.cpp:201
+#: ../src/richtext/richtextmarginspage.cpp:203
+#: ../src/richtext/richtextmarginspage.cpp:204
+#: ../src/richtext/richtextmarginspage.cpp:226
+#: ../src/richtext/richtextmarginspage.cpp:228
+#: ../src/richtext/richtextmarginspage.cpp:229
+#: ../src/richtext/richtextmarginspage.cpp:249
+#: ../src/richtext/richtextmarginspage.cpp:251
+#: ../src/richtext/richtextmarginspage.cpp:252
+#: ../src/richtext/richtextmarginspage.cpp:274
+#: ../src/richtext/richtextmarginspage.cpp:276
+#: ../src/richtext/richtextmarginspage.cpp:277
+#: ../src/richtext/richtextmarginspage.cpp:315
+#: ../src/richtext/richtextmarginspage.cpp:317
+#: ../src/richtext/richtextmarginspage.cpp:318
+#: ../src/richtext/richtextmarginspage.cpp:340
+#: ../src/richtext/richtextmarginspage.cpp:342
+#: ../src/richtext/richtextmarginspage.cpp:343
+#: ../src/richtext/richtextmarginspage.cpp:363
+#: ../src/richtext/richtextmarginspage.cpp:365
+#: ../src/richtext/richtextmarginspage.cpp:366
+#: ../src/richtext/richtextmarginspage.cpp:388
+#: ../src/richtext/richtextmarginspage.cpp:390
+#: ../src/richtext/richtextmarginspage.cpp:391
+#: ../src/richtext/richtextsizepage.cpp:338
+#: ../src/richtext/richtextsizepage.cpp:341
+#: ../src/richtext/richtextsizepage.cpp:342
+#: ../src/richtext/richtextsizepage.cpp:372
+#: ../src/richtext/richtextsizepage.cpp:375
+#: ../src/richtext/richtextsizepage.cpp:376
+#: ../src/richtext/richtextsizepage.cpp:399
+#: ../src/richtext/richtextsizepage.cpp:402
+#: ../src/richtext/richtextsizepage.cpp:403
+#: ../src/richtext/richtextsizepage.cpp:426
+#: ../src/richtext/richtextsizepage.cpp:429
+#: ../src/richtext/richtextsizepage.cpp:430
+#: ../src/richtext/richtextsizepage.cpp:453
+#: ../src/richtext/richtextsizepage.cpp:456
+#: ../src/richtext/richtextsizepage.cpp:457
+#: ../src/richtext/richtextsizepage.cpp:480
+#: ../src/richtext/richtextsizepage.cpp:483
+#: ../src/richtext/richtextsizepage.cpp:484
+#: ../src/richtext/richtextsizepage.cpp:554
+#: ../src/richtext/richtextsizepage.cpp:557
+#: ../src/richtext/richtextsizepage.cpp:558
+#: ../src/richtext/richtextsizepage.cpp:589
+#: ../src/richtext/richtextsizepage.cpp:592
+#: ../src/richtext/richtextsizepage.cpp:593
+#: ../src/richtext/richtextsizepage.cpp:624
+#: ../src/richtext/richtextsizepage.cpp:627
+#: ../src/richtext/richtextsizepage.cpp:628
+#: ../src/richtext/richtextsizepage.cpp:659
+#: ../src/richtext/richtextsizepage.cpp:662
+#: ../src/richtext/richtextsizepage.cpp:663
+msgid "px"
+msgstr "piksel"
+
+#: ../src/common/accelcmn.cpp:188
+msgid "rawctrl"
+msgstr "hamctrl"
+
+#: ../src/html/chm.cpp:333
+msgid "read error"
+msgstr "okuma hatası"
+
+#: ../src/common/zipstrm.cpp:1882
+#, c-format
+msgid "reading zip stream (entry %s): bad crc"
+msgstr "zip akışı okuma (kayıt %s): CRC hatalı"
+
+#: ../src/common/zipstrm.cpp:1877
+#, c-format
+msgid "reading zip stream (entry %s): bad length"
+msgstr "zip akışı okuma (kayıt %s): uzunluk hatalı"
+
+#: ../src/msw/dde.cpp:1162
+msgid "reentrancy problem."
+msgstr "yeniden giriş sorunu."
+
+#: ../src/common/datetimefmt.cpp:1920
+msgid "second"
+msgstr "ikinci"
+
+#: ../src/html/chm.cpp:337
+msgid "seek error"
+msgstr "arama hatası"
+
+#: ../src/common/datetimefmt.cpp:1935
+msgid "seventeenth"
+msgstr "onyedinci"
+
+#: ../src/common/datetimefmt.cpp:1925
+msgid "seventh"
+msgstr "yedinci"
+
+#: ../src/common/accelcmn.cpp:186
+msgid "shift"
+msgstr "shift"
+
+#: ../src/common/appbase.cpp:685
+msgid "show this help message"
+msgstr "bu yardım iletisi görüntülensin"
+
+#: ../src/common/datetimefmt.cpp:1934
+msgid "sixteenth"
+msgstr "onaltıncı"
+
+#: ../src/common/datetimefmt.cpp:1924
+msgid "sixth"
+msgstr "altıncı"
+
+#: ../src/common/appcmn.cpp:227
+msgid "specify display mode to use (e.g. 640x480-16)"
+msgstr "kullanılacak görüntü kipini belirleyin (ör. 640x480-16)"
+
+#: ../src/common/appcmn.cpp:213
+msgid "specify the theme to use"
+msgstr "kullanılacak temayı belirleyin"
+
+#: ../src/richtext/richtextbuffer.cpp:8876
+msgid "standard/circle"
+msgstr "standart/daire"
+
+#: ../src/richtext/richtextbuffer.cpp:8877
+msgid "standard/circle-outline"
+msgstr "standart/daire-çerçeve"
+
+#: ../src/richtext/richtextbuffer.cpp:8879
+msgid "standard/diamond"
+msgstr "standart/elmas"
+
+#: ../src/richtext/richtextbuffer.cpp:8878
+msgid "standard/square"
+msgstr "standart/kare"
+
+#: ../src/richtext/richtextbuffer.cpp:8880
+msgid "standard/triangle"
+msgstr "standart/üçgen"
+
+#: ../src/common/zipstrm.cpp:1782
+msgid "stored file length not in Zip header"
+msgstr "kayıtlı dosya uzunluğu Zip başlığında yok"
+
+#: ../src/common/cmdline.cpp:1311
+msgid "str"
+msgstr "str"
+
+#: ../src/common/fontcmn.cpp:794 ../src/common/fontcmn.cpp:969
+msgid "strikethrough"
+msgstr "üstüçizili"
+
+#: ../src/common/tarstrm.cpp:1003 ../src/common/tarstrm.cpp:1025
+#: ../src/common/tarstrm.cpp:1507 ../src/common/tarstrm.cpp:1529
+msgid "tar entry not open"
+msgstr "tar kaydı açık değil"
+
+#: ../src/common/datetimefmt.cpp:1928
+msgid "tenth"
+msgstr "onuncu"
+
+#: ../src/msw/dde.cpp:1126
+msgid "the response to the transaction caused the DDE_FBUSY bit to be set."
+msgstr "harekete yanıt DDE_FBUSY bayrak bitinin kaldırılmasına yol açtı."
+
+#: ../src/common/datetimefmt.cpp:1921
+msgid "third"
+msgstr "üçüncü"
+
+#: ../src/common/datetimefmt.cpp:1931
+msgid "thirteenth"
+msgstr "onüçüncü"
+
+#: ../src/common/datetimefmt.cpp:1725
+msgid "today"
+msgstr "bugün"
+
+#: ../src/common/datetimefmt.cpp:1727
+msgid "tomorrow"
+msgstr "yarın"
+
+#: ../src/common/fileconf.cpp:1979
+#, c-format
+msgid "trailing backslash ignored in '%s'"
+msgstr "'%s' sonundaki ters eğik çizgi yok sayıldı"
+
+#: ../src/gtk/aboutdlg.cpp:218
+msgid "translator-credits"
+msgstr "çevirmenler"
+
+#: ../src/common/datetimefmt.cpp:1930
+msgid "twelfth"
+msgstr "yirminci"
+
+#: ../src/common/datetimefmt.cpp:1938
+msgid "twentieth"
+msgstr "onikinci"
+
+#: ../src/common/fontcmn.cpp:789 ../src/common/fontcmn.cpp:965
+msgid "underlined"
+msgstr "altıçizili"
+
+#: ../src/common/fileconf.cpp:2014
+#, c-format
+msgid "unexpected \" at position %d in '%s'."
+msgstr "%d konumunda, '%s' içinde beklenmeyen \" "
+
+#: ../src/common/tarstrm.cpp:1045
+msgid "unexpected end of file"
+msgstr "beklenmeyen dosya sonu"
+
+#: ../src/generic/progdlgg.cpp:399 ../src/common/tarstrm.cpp:371
+#: ../src/common/tarstrm.cpp:394 ../src/common/tarstrm.cpp:425
+msgid "unknown"
+msgstr "bilinmeyen"
+
+#: ../src/common/xtixml.cpp:253
+#, c-format
+msgid "unknown class %s"
+msgstr "bilinmeyen sınıf %s"
+
+#: ../src/common/regex.cpp:261 ../src/html/chm.cpp:351
+msgid "unknown error"
+msgstr "bilinmeyen hata"
+
+#: ../src/msw/dialup.cpp:490
+#, c-format
+msgid "unknown error (error code %08x)."
+msgstr "bilinmeyen hata (hata kodu %08x)."
+
+#: ../src/msw/wince/filefnwce.cpp:172
+msgid "unknown seek origin"
+msgstr "bilinmeyen arama başlangıcı"
+
+#: ../src/common/fmapbase.cpp:834
+#, c-format
+msgid "unknown-%d"
+msgstr "bilinmeyen-%d"
+
+#: ../src/common/docview.cpp:507
+msgid "unnamed"
+msgstr "adsız"
+
+#: ../src/common/docview.cpp:1606
+#, c-format
+msgid "unnamed%d"
+msgstr "adsız%d"
+
+#: ../src/common/zipstrm.cpp:1796 ../src/common/zipstrm.cpp:2184
+msgid "unsupported Zip compression method"
+msgstr "desteklemeyen Zip sıkıştırma yöntemi"
+
+#: ../src/common/translation.cpp:1883
+#, c-format
+msgid "using catalog '%s' from '%s'."
+msgstr "'%s' kataloğu '%s' üzerinden kullanılıyor"
+
+#: ../src/html/chm.cpp:335
+msgid "write error"
+msgstr "yazma hatası"
+
+#: ../src/common/time.cpp:318
+msgid "wxGetTimeOfDay failed."
+msgstr "wxGetTimeOfDay başarısız."
+
+#: ../src/gtk/print.cpp:987
+msgid "wxPrintout::GetPageInfo gives a null maxPage."
+msgstr "wxPrintout::GetPageInfo boş bir maxPage değeri veriyor."
+
+#: ../src/osx/carbon/dataview.cpp:1303
+msgid "wxWidget control pointer is not a data view pointer"
+msgstr "wxWidget denetim imleci bir veri görünüm imleci değil"
+
+#: ../src/osx/carbon/dataview.cpp:907
+msgid "wxWidget's control not initialized."
+msgstr "wxWidget denetimi başlatılamadı."
+
+#: ../src/motif/app.cpp:245
+#, c-format
+msgid "wxWidgets could not open display for '%s': exiting."
+msgstr "wxWidgets '%s' için görünümü açamadı: çıkılıyor."
+
+#: ../src/x11/app.cpp:164
+msgid "wxWidgets could not open display. Exiting."
+msgstr "wxWidgets görünümü açamadı. Çıkılıyor."
+
+#: ../src/richtext/richtextsymboldlg.cpp:434
+msgid "xxxx"
+msgstr "xxxx"
+
+#: ../src/common/datetimefmt.cpp:1726
+msgid "yesterday"
+msgstr "dün"
+
+#: ../src/common/zstream.cpp:251 ../src/common/zstream.cpp:426
+#, c-format
+msgid "zlib error %d"
+msgstr "zlib hatası %d"
+
+#: ../src/richtext/richtextliststylepage.cpp:496
+#: ../src/richtext/richtextbulletspage.cpp:301
+msgid "~"
+msgstr "~"
diff --git a/cadxcore/lang/zh_CN/cadxcore.mo b/cadxcore/lang/zh_CN/cadxcore.mo
new file mode 100644
index 0000000..3b9f963
Binary files /dev/null and b/cadxcore/lang/zh_CN/cadxcore.mo differ
diff --git a/cadxcore/lang/zh_CN/cadxcore.po b/cadxcore/lang/zh_CN/cadxcore.po
new file mode 100644
index 0000000..64ef6b1
--- /dev/null
+++ b/cadxcore/lang/zh_CN/cadxcore.po
@@ -0,0 +1,6296 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-06-11 15:52+0100\n"
+"PO-Revision-Date: 2014-06-11 15:53+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Chinese <cn at li.org>\n"
+"Language: zh\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2011-09-02 12:40+0000\n"
+"X-Poedit-Basepath: .\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SearchPath-0: ..\\..\n"
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "B/W Inverse"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Barten"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Black Body"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Cardiac"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Muscles & Bones"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "VR Red Vessels"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Gray Rainbow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Stern"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Spectrum"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Metal"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Iron"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Hot Green"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "GE Color"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PERFusion"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "PET"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Flow"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "LONI2"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "Asymmetry"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "P-Value"
+msgstr ""
+
+#: ..\../VTKInria3D/vtkVISUManagement/vtkLookupTableManager.cpp:54
+msgid "ROI"
+msgstr ""
+
+#: ..\../api/autoptr.cpp:6
+msgid "Attempted to dereference null pointer"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+#: ..\../api/dicom/idicomconformance.cpp:214
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "GIL/DICOM/Conformance"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid "Unable to add supported transfer syntax "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+#: ..\../api/dicom/idicomconformance.cpp:84
+msgid " to SOP Class "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:80
+msgid " . Transfer Syntax does not exists in model: Add it first."
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:84
+#: ..\../api/dicom/idicomconformance.cpp:143
+msgid " . SOP Class does not exists in model: Add it first."
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid "Unable to add supported SOP Class "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:143
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " to Modality "
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:152
+msgid " . Modality does not exists in model: Add it first."
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:214
+msgid "Error loading DICOM Conformance file"
+msgstr ""
+
+#: ..\../api/dicom/idicomconformance.cpp:220
+msgid "Invalid DICOM Conformance file"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "Slice"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "of"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:97
+msgid "Volume"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:107
+msgid "Voxel:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:110
+msgid "Image without metric information"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:119
+msgid "Slice thickness"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:127
+msgid "Slice location"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:139
+msgid "Scale"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:147
+msgid "Right"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:149
+msgid "Left"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:219
+msgid "Position:"
+msgstr ""
+
+#: ..\../api/iannotator.cpp:272
+msgid "Value:"
+msgstr ""
+
+#: ..\../api/iexception.cpp:52
+msgid "Exception in component"
+msgstr ""
+
+#: ..\../api/initwx.cpp:439
+msgid "Initializing environment ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:446 ..\../api/initwx.cpp:447 ..\../api/initwx.cpp:448
+#: ..\../api/initwx.cpp:449 ..\../api/initwx.cpp:450 ..\../api/initwx.cpp:451
+#: ..\../api/initwx.cpp:452 ..\../api/initwx.cpp:453
+msgid "Ginkgo CADx restrictions"
+msgstr ""
+
+#: ..\../api/initwx.cpp:446
+msgid "Open only one tab for each study"
+msgstr ""
+
+#: ..\../api/initwx.cpp:447
+msgid "Anonymous mode (history is cleaned)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:448
+msgid "Max number of tabs opened"
+msgstr ""
+
+#: ..\../api/initwx.cpp:449
+msgid "Max seconds of Ginkgo CADx application inactivity"
+msgstr ""
+
+#: ..\../api/initwx.cpp:450
+msgid "Close automatically Ginkgo CADx after dicomize"
+msgstr ""
+
+#: ..\../api/initwx.cpp:451
+msgid "Export images"
+msgstr ""
+
+#: ..\../api/initwx.cpp:452
+msgid "Acquire DICOM files"
+msgstr ""
+
+#: ..\../api/initwx.cpp:453
+msgid "Import files to DICOM format"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "Online manual"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455 ..\../api/initwx.cpp:457
+msgid "URL of manual"
+msgstr ""
+
+#: ..\../api/initwx.cpp:455
+msgid "doc\\manual_ginkgo_cadx_pro_en.pdf"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "Online support"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "URL of online support"
+msgstr ""
+
+#: ..\../api/initwx.cpp:459
+msgid "http://ginkgo-cadx.com/"
+msgstr ""
+
+#: ..\../api/initwx.cpp:460 ..\../api/initwx.cpp:461
+msgid "Program Updates"
+msgstr ""
+
+#: ..\../api/initwx.cpp:460
+msgid "Warn about newest Ginkgo CADx updates"
+msgstr ""
+
+#: ..\../api/initwx.cpp:461
+msgid "Update period (days)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:462
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:219
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1253
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2119
+msgid "Security"
+msgstr ""
+
+#: ..\../api/initwx.cpp:462
+msgid "Setup Security"
+msgstr ""
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup"
+msgstr ""
+
+#: ..\../api/initwx.cpp:463
+msgid "Show on startup default value"
+msgstr ""
+
+#: ..\../api/initwx.cpp:465 ..\../api/initwx.cpp:466
+#: ..\../main/gui/history3/historypanel3.cpp:328
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1396
+msgid "Tools"
+msgstr ""
+
+#: ..\../api/initwx.cpp:465
+msgid "Settings menu"
+msgstr ""
+
+#: ..\../api/initwx.cpp:466
+msgid "License menu"
+msgstr ""
+
+#: ..\../api/initwx.cpp:467 ..\../api/initwx.cpp:468 ..\../api/initwx.cpp:469
+#: ..\../api/initwx.cpp:470 ..\../api/initwx.cpp:471 ..\../api/initwx.cpp:472
+#: ..\../api/initwx.cpp:473 ..\../api/initwx.cpp:474
+msgid "PACS Limits"
+msgstr ""
+
+#: ..\../api/initwx.cpp:467
+msgid "Maximum number of C-Find responses allowed"
+msgstr ""
+
+#: ..\../api/initwx.cpp:468
+msgid "Upload images to a PACS server"
+msgstr ""
+
+#: ..\../api/initwx.cpp:469
+msgid "Acquire images from PACS"
+msgstr ""
+
+#: ..\../api/initwx.cpp:470
+msgid "Enable remote PACS configuration"
+msgstr ""
+
+#: ..\../api/initwx.cpp:471
+msgid "Enable TLS configuration"
+msgstr ""
+
+#: ..\../api/initwx.cpp:472
+msgid "Restrict search over selected patient"
+msgstr ""
+
+#: ..\../api/initwx.cpp:473
+msgid "Restrict study retrieval by maximum size (KB)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:474
+msgid "Force lossless when upload"
+msgstr ""
+
+#: ..\../api/initwx.cpp:475 ..\../api/initwx.cpp:476 ..\../api/initwx.cpp:477
+#: ..\../api/initwx.cpp:478 ..\../api/initwx.cpp:479 ..\../api/initwx.cpp:480
+msgid "Import"
+msgstr ""
+
+#: ..\../api/initwx.cpp:475
+msgid "Specify this Storage SOP Class in dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:476
+msgid "Show accession number input"
+msgstr ""
+
+#: ..\../api/initwx.cpp:477
+msgid "Set compression, 0 implies no compression (0..14)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:478
+msgid ""
+"Recompression codec (0=JPEG Baseline(default), 1=JPEG Progressive, 2=JPEG "
+"Lossless)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:479
+msgid "Don't change image codec (if possible)"
+msgstr ""
+
+#: ..\../api/initwx.cpp:480
+msgid "Skip demographic step if it's possible"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "HL7 Service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:482
+msgid "Automatically start HL7 Sender service"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483 ..\../api/initwx.cpp:484 ..\../api/initwx.cpp:485
+msgid "XML dicomization"
+msgstr ""
+
+#: ..\../api/initwx.cpp:483
+msgid "Send Hl7 message when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:484
+msgid "Send study to PACS when importing"
+msgstr ""
+
+#: ..\../api/initwx.cpp:485
+msgid "Default ORU template"
+msgstr ""
+
+#: ..\../api/initwx.cpp:488 ..\../api/initwx.cpp:489 ..\../api/initwx.cpp:491
+#: ..\../api/initwx.cpp:493 ..\../api/initwx.cpp:494 ..\../api/initwx.cpp:495
+#: ..\../api/initwx.cpp:496 ..\../api/initwx.cpp:498
+msgid "Style"
+msgstr ""
+
+#: ..\../api/initwx.cpp:503
+#, c-format
+msgid "Download %s images"
+msgstr ""
+
+#: ..\../api/initwx.cpp:504 ..\../api/initwx.cpp:508
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:21
+msgid "PACS"
+msgstr ""
+
+#: ..\../api/initwx.cpp:507
+msgid "Download all modalities"
+msgstr ""
+
+#: ..\../api/initwx.cpp:510
+msgid "OpenGL"
+msgstr ""
+
+#: ..\../api/initwx.cpp:510
+msgid "Enable shaders"
+msgstr ""
+
+#: ..\../api/initwx.cpp:513
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:23
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:120
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:388
+msgid "Ginkgo Cloud"
+msgstr ""
+
+#: ..\../api/initwx.cpp:513
+msgid "Download from Ginkgo Cloud"
+msgstr ""
+
+#: ..\../api/initwx.cpp:560
+msgid "Tools loading base ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:562
+msgid "Starting tools..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:566
+msgid "Loading plugins ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:580
+msgid "Unable to start GinkgoCADx:\n"
+msgstr ""
+
+#: ..\../api/initwx.cpp:580 ..\../api/initwx.cpp:621
+msgid "error"
+msgstr ""
+
+#: ..\../api/initwx.cpp:584
+msgid "Loading resources ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:587
+msgid "Starting services..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:601
+msgid "Configuring environment ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:621
+msgid "Failed to set permissions:\n"
+msgstr ""
+
+#: ..\../api/initwx.cpp:634
+msgid "Updating ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:638
+msgid "Interpreting parameters ..."
+msgstr ""
+
+#: ..\../api/initwx.cpp:689
+msgid "Error unregistering tools: "
+msgstr ""
+
+#: ..\../api/initwx.cpp:769
+msgid "Starting"
+msgstr ""
+
+#: ..\../api/ivista.cpp:36 ..\../commands/comandocarga.cpp:73
+msgid "Loading..."
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:268
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:148
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:164
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:166
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:412
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:52
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:763
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:702
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:425
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2729
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:59
+#: ..\../main/gui/import/pasosimportacionbase.cpp:151
+msgid "Name"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:285
+msgid "Area"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:302
+msgid "Perimeter"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:316
+msgid "Travel (I)"
+msgstr ""
+
+#: ..\../api/iwidgets.cpp:326
+msgid "Travel (M)"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+#: ..\../api/threads/thread.cpp:120
+msgid "Threading"
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid "Error while running thread: "
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:114 ..\../api/threads/thread.cpp:117
+msgid " : "
+msgstr ""
+
+#: ..\../api/threads/thread.cpp:120
+msgid "Internal error while running thread: "
+msgstr ""
+
+#: ..\../api/widgetserializable.cpp:60
+msgid "Creation Date"
+msgstr ""
+
+#: ..\../api/widgetserializable.cpp:65
+msgid "Modification Date"
+msgstr ""
+
+#: ..\../api/widgetserializable.cpp:68
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:155
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:40
+msgid "Physician"
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:55
+#: ..\../commands/pacsdownloadcommand.cpp:88
+#: ..\../commands/synchronizationcommand.cpp:70
+msgid "Downloading files ..."
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:69
+#: ..\../commands/synchronizationcommand.cpp:91
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:447
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:580
+#, c-format
+msgid "Downloading file %d"
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:81
+msgid "Error downloading file: "
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:95
+#: ..\../commands/pacsdownloadcommand.cpp:114
+#: ..\../commands/synchronizationcommand.cpp:121
+msgid "Internal Error"
+msgstr ""
+
+#: ..\../commands/acquirefromurlcommand.cpp:115
+msgid "Error downloading files: "
+msgstr ""
+
+#: ..\../commands/autocleaningcommand.cpp:62
+msgid "Cleaning dicomdir..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:67
+msgid "Downloading files..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:167
+msgid "CloudCommand"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:183
+msgid "Unknown operation"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:188
+msgid "Error in cloud operation. See log to get more details..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:249
+msgid "Could to retrieve study."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:260 ..\../commands/cloudcommand.cpp:394
+msgid ""
+"This version of Ginkgo CADx is not compatible with current version of Ginkgo "
+"Cloud."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:262
+msgid "Error retrieving study."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271
+msgid "Study successfully retrieved."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "Speed"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "bytes/sec during"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:271 ..\../commands/cloudcommand.cpp:405
+msgid "seconds"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:275
+msgid "Empty Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:289
+msgid "Extracting files..."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:313 ..\../commands/cloudcommand.cpp:316
+msgid "Invalid file has been downloaded"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:383
+msgid "Could to perform query."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:396
+msgid "Error perfoming the query."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:405
+msgid "Query successfully performed."
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:415
+msgid "JSon Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:472
+msgid "Unknown JSon attribute:"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:482
+msgid "Error parsing JSon: "
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:491
+msgid "Null Response"
+msgstr ""
+
+#: ..\../commands/cloudcommand.cpp:515
+#: ..\../commands/openremovableunit.cpp:148 ..\../main/gui/open/abrir.cpp:119
+#: ..\../main/gui/open/abrir.cpp:159 ..\../main/gui/open/opendialogs.cpp:146
+msgid "Storing in the history..."
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:46
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:369
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:375
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:536
+msgid "Check Updates"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:136
+msgid "Not enough parameters found on XML"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:145
+msgid "XML parsing internal error"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Error checking application updates"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:156
+msgid "Ginkgo CADx updates"
+msgstr ""
+
+#: ..\../commands/comandoactualizaciones.cpp:170
+msgid "Internal error checking updates"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:86
+msgid "Series path couldn't be found"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:92 ..\../commands/comandocarga.cpp:96
+msgid "Exception loading:"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:100
+msgid "Study malformed or unsupported"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:129 ..\../commands/comandocarga.cpp:139
+msgid "Error loading study: "
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:134
+msgid "Error loading study insufficient memory"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:144
+msgid "Error loading study."
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:149
+msgid "Load canceled by user"
+msgstr ""
+
+#: ..\../commands/comandocarga.cpp:156
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+#: ..\../main/gui/history3/historypanel3.cpp:1063
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+msgid "Error loading study"
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:81
+#: ..\../commands/exporttodicomdircommand.cpp:214
+msgid "Exporting files..."
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:105
+#: ..\../commands/exporttodicomdircommand.cpp:450
+msgid "Export has been finished successfully"
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:158
+#, c-format
+msgid "Exporting file %d of %d"
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:213
+msgid "Error storing file, check the permissions over the directory."
+msgstr ""
+
+#: ..\../commands/comandoexportacion.cpp:233
+msgid "image_%m-%d-%Y_"
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:108
+msgid "Exploring directory ..."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:122
+msgid "Reading DICOMDIR ..."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:142
+#: ..\../commands/comandoincluirhistorial.cpp:156
+#: ..\../commands/comandoincluirhistorial.cpp:177
+msgid "Including files in the history .."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:196
+msgid "Exploring directory "
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:256
+#: ..\../commands/linkhistorycommand.cpp:118
+msgid "Image acquisition finished."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:258
+#, c-format
+msgid "There have been included %d images."
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:261
+#: ..\../commands/linkhistorycommand.cpp:121
+#, c-format
+msgid ""
+"\n"
+"There are %d errors (see log for more detailed description)"
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:273
+#: ..\../commands/linkhistorycommand.cpp:133
+msgid "This files doesn't exist:"
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:284
+#: ..\../commands/linkhistorycommand.cpp:144
+msgid "This files doesn't have DICOM format:"
+msgstr ""
+
+#: ..\../commands/comandoincluirhistorial.cpp:296
+#: ..\../commands/linkhistorycommand.cpp:156
+msgid "This files are Dicom Dirs:"
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:58 ..\../commands/pacsdownloadcommand.cpp:61
+#: ..\../commands/sendpacscommand.cpp:137
+msgid "There is not any Remote PACS configured"
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:84
+msgid "Querying PACS ..."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:93
+msgid "Error accessing the controller subsystem integration: (GIL:: DICOM)."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:98
+msgid "Starting Search ..."
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:108
+#: ..\../commands/pacsdownloadcommand.cpp:101
+msgid "Server ID not found. ID = "
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:110 ..\../commands/comandopacs.cpp:112
+#: ..\../commands/comandopacs.cpp:114 ..\../commands/comandopacs.cpp:116
+msgid "Query error with PACS Id "
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:116
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/gui/history3/historypanel3.cpp:1068
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error"
+msgstr ""
+
+#: ..\../commands/comandopacs.cpp:135
+msgid "Failed to perform search: "
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:94
+#: ..\../commands/dbmigrationcommand.cpp:103
+msgid "Migrating old DICOM Dir ..."
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:99
+#: ..\../commands/dbmigrationcommand.cpp:108
+msgid "Including files ..."
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid "Migration finished successfully, now Ginkgo CADx will delete folder:\n"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+msgid ""
+"and all it's sub folders\n"
+"Do you confirm deletion?"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:116
+#: ..\../commands/dicomizecommand.cpp:181
+#: ..\../commands/openremovableunit.cpp:74
+#: ..\../commands/openremovableunit.cpp:110
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../commands/pdfextractercommand.cpp:130
+#: ..\../main/controllers/historycontroller.cpp:447
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+#: ..\../main/controllers/historycontroller.cpp:1976
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:88
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:196
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:282
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:539
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:637
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:826
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:103
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+#: ..\../main/gui/login/dialogologin.cpp:50
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+#: ..\../main/gui/open/opendialogs.cpp:58
+#: ..\../main/gui/open/opendialogs.cpp:62
+#: ..\../main/gui/open/opendialogs.cpp:134
+#: ..\../main/gui/progress/statusbarprogreso.cpp:284
+#: ..\../main/gui/progress/statusbarprogreso.cpp:287
+#: ..\../main/gui/progress/statusbarprogreso.cpp:292
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Info"
+msgstr ""
+
+#: ..\../commands/dbmigrationcommand.cpp:123
+msgid "Migration finisthed successfully"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:27
+#: ..\../commands/dialogopathssobreescribirbase.cpp:62
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:133
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid "Overwrite"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:36
+msgid "Would you like to overwrite them?"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.cpp:65
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:358
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:448
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:527
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:139
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:248
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:103
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:548
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1197
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1308
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1816
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2087
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2321
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2458
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2558
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2789
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3319
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:63
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:144
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:85
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:67
+#: ..\../main/gui/history3/historypanel3base.cpp:339
+#: ..\../main/gui/history3/historypanel3base.cpp:415
+#: ..\../main/gui/history3/historypanel3base.cpp:486
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:189
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:136
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:254
+#: ..\../main/gui/open/opendialogsbase.cpp:53
+#: ..\../main/gui/open/opendialogsbase.cpp:131
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:76
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:66
+#: ..\../widgets/gui/calibracionbase.cpp:86
+#: ..\../widgets/gui/selecciontextobase.cpp:60
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:145
+msgid "Cancel"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:24
+#: ..\../commands/dicomizationcompletebase.cpp:33
+#: ..\../commands/dicomizationcompletebase.h:60
+msgid "Dicomization complete"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:38
+msgid "Dicomization finished successfully"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:56
+msgid "Don't show this message again"
+msgstr ""
+
+#: ..\../commands/dicomizationcompletebase.cpp:62
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:99
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:544
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1305
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1711
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1812
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2083
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2317
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2786
+#: ..\../main/gui/history3/historypanel3base.cpp:411
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:141
+#: ..\../widgets/gui/calibracionbase.cpp:82
+#: ..\../widgets/gui/selecciontextobase.cpp:56
+msgid "Accept"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:148
+msgid "Step 1 of 3: Importing images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:157
+msgid "Step 2 of 3: Copying images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:168
+msgid "Step 3 of 3: Uploading images"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid "Import process failed:"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:179
+msgid ""
+"\n"
+"Would you like to retry?"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:186
+msgid "Importing..."
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:370
+msgid "Unknown error in dicomization process"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:431
+#: ..\../commands/dicomizecommand.cpp:442
+#: ..\../commands/sendpacscommand.cpp:185
+msgid "Error sending evidences:"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:437
+#: ..\../commands/dicomizecommand.cpp:448
+msgid "Can not upload to the PACS:\n"
+msgstr ""
+
+#: ..\../commands/dicomizecommand.cpp:454
+msgid ""
+"Can not upload to the PACS:\n"
+"Internal Error"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:261
+#: ..\../commands/exporttodicomdircommand.cpp:338
+#, c-format
+msgid "Exporting series %d of %d"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:271
+msgid "Some of selected series has been deleted"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:279
+#: ..\../commands/exporttodicomdircommand.cpp:385
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:61
+#: ..\../main/gui/export/parametrosprincipales.cpp:167
+msgid "There was an error creating directory"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:303
+#: ..\../commands/exporttodicomdircommand.cpp:408
+msgid "There was an error writing file"
+msgstr ""
+
+#: ..\../commands/exporttodicomdircommand.cpp:358
+msgid "There was an error anonymizing files"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:113
+msgid "element patient id absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:120
+msgid "element study instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:127
+msgid "element series instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:135
+msgid "element sop instance uid absent in dataset"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Ignoring incoming operation "
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:274
+#: ..\../commands/incomingdicomassociationcommand.cpp:298
+#: ..\../commands/incomingdicomassociationcommand.cpp:355
+msgid "Not implemented"
+msgstr ""
+
+#: ..\../commands/incomingdicomassociationcommand.cpp:473
+#: ..\../commands/pacsdownloadcommand.cpp:170
+#: ..\../commands/pacsdownloadcommand.cpp:179
+msgid "Including files..."
+msgstr ""
+
+#: ..\../commands/linkhistorycommand.cpp:68
+msgid "Linking study..."
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:42
+#: ..\../commands/openremovableunit.cpp:44
+msgid "Exploring drives..."
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:74
+msgid ""
+"No DICOMDIR found in removable units.\n"
+"Would you like to scan other path recursively?"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:109
+#, c-format
+msgid ""
+"No DICOMDIR found in removable units, would you like to scan recursively %s "
+"drive"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:130
+msgid "Select drive you want to open"
+msgstr ""
+
+#: ..\../commands/openremovableunit.cpp:132
+msgid ""
+"Ginkgo CADx has detected more than one removable units,\n"
+"but none of them includes a DICOMDIR at root.\n"
+"Select drive where you want to acquire recursively"
+msgstr ""
+
+#: ..\../commands/pacsdownloadcommand.cpp:134
+msgid "Error downloading study: "
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:103
+msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:103
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:376
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:184
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:191
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:201
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:211
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1196
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+#: ..\../main/gui/progress/statusbarprogreso.cpp:278
+#: ..\../widgets/gui/calibracion.cpp:205 ..\../widgets/gui/calibracion.cpp:209
+#: ..\../widgets/gui/calibracion.cpp:219 ..\../widgets/gui/calibracion.cpp:225
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "Error"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:113
+#: ..\../commands/pdfextractercommand.cpp:122
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:492
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:500
+msgid "There isn't any pdf reader registered in the system"
+msgstr ""
+
+#: ..\../commands/pdfextractercommand.cpp:130
+msgid "PDF files extracted successfully..."
+msgstr ""
+
+#: ..\../commands/secondarycapturedicomizecommand.cpp:73
+msgid "Ginkgo CADx Secondary Capture"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:63
+#, c-format
+msgid "Sending HL7 message %d of %d"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:73
+msgid "Message successfully sent"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:77
+msgid "Unknown protocol"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:80 ..\../commands/sendhl7command.cpp:93
+#: ..\../commands/sendhl7command.cpp:145
+msgid "Error sending message:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:90
+msgid "Error sending HL7 message see log for more details"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:93 ..\../commands/sendhl7command.cpp:94
+msgid "Unknown error"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:134
+msgid "Failed to start connection"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid "Error sending message. It was sent "
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:148
+msgid " bytes from a total of "
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:247
+msgid ""
+"Error in the logic of confirmation. The control of the message ID does not "
+"match recognized"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:251
+msgid "NACK received:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:258
+msgid "Failed delivery confirmation:"
+msgstr ""
+
+#: ..\../commands/sendhl7command.cpp:264
+msgid ""
+"Error in the confirmation of delivery: Delivery is not recognized by the "
+"remote end"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:51
+msgid "Send files to PACS"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:155
+msgid "Uploading files ..."
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:178
+msgid "Error: PACS entry configuration not found: "
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:181
+msgid "Error:"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:189
+msgid "Error sending evidences: Internal error."
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:203
+msgid "Error uploading the study to PACS: "
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:205
+#, c-format
+msgid ""
+"\n"
+"Would you like to retry(automatically retried in %d seconds)?"
+msgstr ""
+
+#: ..\../commands/sendpacscommand.cpp:206
+msgid "Retry send to PACS"
+msgstr ""
+
+#: ..\../commands/synchronizationcommand.cpp:104
+msgid "Error downloading file"
+msgstr ""
+
+#: ..\../commands/synchronizationcommand.cpp:141
+msgid "Error synchronizing study: "
+msgstr ""
+
+#: ..\../commands/thumbnailscommand.cpp:107
+#: ..\../commands/thumbnailscommand.cpp:133
+#: ..\../commands/thumbnailscommand.cpp:247
+#: ..\../commands/thumbnailscommand.cpp:376
+#: ..\../commands/thumbnailscommand.cpp:382
+#: ..\../main/gui/import/selectimagesimportation.cpp:504
+msgid "Creating Thumbnail..."
+msgstr ""
+
+#: ..\../commands/thumbnailscommand.cpp:399
+msgid "Generating thumbnail ..."
+msgstr ""
+
+#: ..\../export/tools/iaddfiletohistorytool.cpp:19
+#: ..\../main/gui/history3/historypanel3.cpp:632
+msgid "Open study"
+msgstr ""
+
+#: ..\../export/tools/iangletool.cpp:19
+msgid "Angle \tCtrl+A"
+msgstr ""
+
+#: ..\../export/tools/ibrightnesscontrasttool.cpp:20
+msgid "Brightness/Contrast \tCtrl+B"
+msgstr ""
+
+#: ..\../export/tools/icamerarotationtool.cpp:19
+msgid "Rotate camera"
+msgstr ""
+
+#: ..\../export/tools/icolormaptool.cpp:20
+msgid "Color Map"
+msgstr ""
+
+#: ..\../export/tools/icopyimagetoclipboardtool.cpp:19
+#: ..\../main/gui/open/opendialogsbase.cpp:46
+#: ..\../main/gui/open/opendialogsbase.cpp:198
+msgid "Copy"
+msgstr ""
+
+#: ..\../export/tools/icornerannotationstool.cpp:20
+msgid "Window annotations"
+msgstr ""
+
+#: ..\../export/tools/idetachwindowtool.cpp:19
+msgid "Detach window"
+msgstr ""
+
+#: ..\../export/tools/iimageexporttool.cpp:19
+msgid "Export image..."
+msgstr ""
+
+#: ..\../export/tools/imarkertool.cpp:20
+msgid "Marking Tools \tCtrl+M"
+msgstr ""
+
+#: ..\../export/tools/imetricgridtool.cpp:20
+msgid "Metric grid"
+msgstr ""
+
+#: ..\../export/tools/inotetool.cpp:19
+msgid "Text Note \tCtrl+N"
+msgstr ""
+
+#: ..\../export/tools/ipacsuploadtool.cpp:19
+msgid "Upload study..."
+msgstr ""
+
+#: ..\../export/tools/ipixelsbluringtool.cpp:20
+msgid "Pixels blurring"
+msgstr ""
+
+#: ..\../export/tools/ipointertool.cpp:19
+msgid "Pointer \tEsc"
+msgstr ""
+
+#: ..\../export/tools/iqueryretrievetool.cpp:19
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+#: ..\../main/tools/queryretrievetool.cpp:93
+msgid "Acquire a DICOM study from PACS"
+msgstr ""
+
+#: ..\../export/tools/iresettool.cpp:19
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:346
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:440
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2548
+msgid "Reset"
+msgstr ""
+
+#: ..\../export/tools/irotateandfliptool.cpp:19
+msgid "Rotate and flip"
+msgstr ""
+
+#: ..\../export/tools/iruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: ..\../export/tools/isecondarycapturetool.cpp:19
+msgid "Save snapshot as new series..."
+msgstr ""
+
+#: ..\../export/tools/ishowhistorytool.cpp:19
+msgid "Show history \tAlt+h"
+msgstr ""
+
+#: ..\../export/tools/ishowtagstool.cpp:19
+#: ..\../main/tools/showtagshistorytool.cpp:27
+msgid "DICOM inspector"
+msgstr ""
+
+#: ..\../export/tools/isimpleprinttool.cpp:19
+#: ..\../main/tools/simpleprinttool.cpp:226
+msgid "Print"
+msgstr ""
+
+#: ..\../export/tools/istartdicomizationtool.cpp:19
+msgid "Dicomize..."
+msgstr ""
+
+#: ..\../export/tools/itoolpan.cpp:19
+msgid "Pan \tCtrl+P"
+msgstr ""
+
+#: ..\../export/tools/itoolslider.cpp:19
+msgid "Slider \tCtrl+S"
+msgstr ""
+
+#: ..\../export/tools/itoolwindowlevel.cpp:19
+msgid "Window/Level \tCtrl+W"
+msgstr ""
+
+#: ..\../export/tools/itoolzoom.cpp:19
+msgid "Zoom \tCtrl+O"
+msgstr ""
+
+#: ..\../export/tools/itrackballtool.cpp:19
+msgid "Trackball \tCtrl+T"
+msgstr ""
+
+#: ..\../export/tools/iundotool.cpp:20 ..\../main/tools/undotool.cpp:109
+msgid "Undo"
+msgstr ""
+
+#: ..\../export/tools/ivideotool.cpp:19
+msgid "Video \tCtrl+Space"
+msgstr ""
+
+#: ..\../export/tools/iwindowlayouttool.cpp:20
+msgid "Window layout"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid "Studies with"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:161
+msgid " unsupported components"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:210
+msgid "Reading properties"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:219
+#: ..\../main/controllers/controladorcarga.cpp:642
+#: ..\../main/controllers/controladorcarga.cpp:888
+#: ..\../main/controllers/streaming/streamingloader.cpp:600
+msgid "Error reading the study: "
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:224
+#: ..\../main/controllers/controladorcarga.cpp:229
+#: ..\../main/controllers/controladorcarga.cpp:647
+#: ..\../main/controllers/controladorcarga.cpp:893
+msgid "Internal error reading the study: "
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:269
+#: ..\../main/controllers/controladorcarga.cpp:281
+#: ..\../main/controllers/controladorcarga.cpp:905
+msgid "Spacing is not valid: ("
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:305
+#: ..\../main/controllers/controladorcarga.cpp:338
+#: ..\../main/controllers/controladorcarga.cpp:372
+#: ..\../main/controllers/controladorcarga.cpp:408
+#: ..\../main/controllers/controladorcarga.cpp:441
+#: ..\../main/controllers/controladorcarga.cpp:474
+#: ..\../main/controllers/controladorcarga.cpp:507
+#: ..\../main/controllers/controladorcarga.cpp:540
+#: ..\../main/controllers/controladorcarga.cpp:573
+#: ..\../main/controllers/controladorcarga.cpp:606
+#: ..\../main/controllers/controladorcarga.cpp:935
+msgid "Error loading the study: Out of memory"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:375
+msgid "Error loading the study: Internal Error"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:630
+#: ..\../main/controllers/streaming/streamingloader.cpp:1023
+#: ..\../main/controllers/streaming/streamingloader.cpp:1223
+#: ..\../main/controllers/streaming/streamingloader.cpp:1230
+msgid "Error reading the study: unsupported pixel format"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:651
+#: ..\../main/controllers/controladorcarga.cpp:960
+msgid "Process canceled by user."
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:878
+msgid "Interpreting properties"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:917
+msgid "Spacing of the image is invalid: ("
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:942
+msgid "Reading dataset"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:951
+msgid "Error reading the study:"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:956
+msgid "Internal error while reading the study:"
+msgstr ""
+
+#: ..\../main/controllers/controladorcarga.cpp:972
+msgid "load"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:40
+msgid "Stopping HL7 sender"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:63
+#: ..\../main/controllers/controladorenviohl7.cpp:76
+msgid "Error starting HL7 sender"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:65
+#: ..\../main/controllers/controladorenviohl7.cpp:78
+msgid "HL7 sender started"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:108
+msgid "HL7 controller destroyed"
+msgstr ""
+
+#: ..\../main/controllers/controladorenviohl7.cpp:150
+msgid "Error processing message"
+msgstr ""
+
+#: ..\../main/controllers/controladoreventos.cpp:284
+#: ..\../main/controllers/pacscontroller.cpp:1549
+#: ..\../main/controllers/pacscontroller.cpp:1553
+#: ..\../main/controllers/pacscontroller.cpp:1557
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:75
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:78
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:81
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:84
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:87
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:88
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:89
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:184
+msgid "Unknown"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:110
+msgid "Loading"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:113
+msgid "Could not load extension library file"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:114
+msgid "Could not load library file. Check log"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:149
+msgid "Extension descriptor does not match"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:153
+msgid "Could not find entry point"
+msgstr ""
+
+#: ..\../main/controllers/controladorextensiones.cpp:548
+msgid "Skipping extension with duplicated SID:"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:74
+msgid "Integration engine hostname not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:77
+msgid "Integration engine port not set"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:91
+msgid "Unsupported protocol"
+msgstr ""
+
+#: ..\../main/controllers/controladorhl7.cpp:106
+msgid "Error queueing message. Check your supplier"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomfindassociation.cpp:132
+#, c-format
+msgid "%d results has been found"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:577
+#, c-format
+msgid "Downloading file %d/%d"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomgetassociation.cpp:597
+msgid "Study download size limit exceeded"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:221
+msgid "Unable to reserve memory for PDF dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:240
+msgid "Unable to reserve memory for image Dicomization"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:254
+#: ..\../main/controllers/dcmtk/dicomimg2dcm.cpp:359
+msgid "Image format not supported"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:114
+msgid "Unable to create TLS transport layer"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:123
+msgid "Private key and Certificate do not match"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:145
+msgid "Error setting TLS layer: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:200
+msgid "Receiving Association failed: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:209
+msgid "Association received"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:210
+msgid "Parameters:"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:240
+msgid "Association Rejected: Bad Application Context Name: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:258
+msgid "Association Rejected: No Implementation Class UID provided"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+msgid "Association Acknowledged (Max Send PDV: "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:272
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid ")"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:274
+msgid "No valid presentation contexts"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "Association(dicom://"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservice.cpp:282
+msgid "@"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid "Ginkgo CADx is unable to compress from "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:712
+msgid " to "
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomstoreassociation.cpp:1285
+#, c-format
+msgid "Uploading file %d of %d"
+msgstr ""
+
+#: ..\../main/controllers/dicommanager.cpp:504
+#: ..\../main/controllers/dicommanager.cpp:531
+msgid "Extracting file..."
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid "Error creating history database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:323
+msgid " trying temp"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:327
+msgid ""
+"You do not have permissions to write to the dicom Dir, preferences will be "
+"stored in the temporary directory"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:343
+msgid "Error creating dicomDir database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:425
+#: ..\../main/controllers/historycontroller.cpp:441
+msgid "Error creating thumbnails database "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:447
+msgid "Error creating database:\n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:560
+msgid "Including image "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:560
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid " of "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:707
+msgid "Linking image "
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1680
+#: ..\../main/controllers/historycontroller.cpp:1725
+#: ..\../main/controllers/historycontroller.cpp:1779
+#: ..\../main/controllers/historycontroller.cpp:1801
+#: ..\../main/controllers/historycontroller.cpp:1825
+msgid "Error reading history: \n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1882
+#: ..\../main/controllers/historycontroller.cpp:1939
+msgid "Failed to delete the number of database:\n"
+msgstr ""
+
+#: ..\../main/controllers/historycontroller.cpp:1976
+msgid "Failed to empty the history:\n"
+msgstr ""
+
+#: ..\../main/controllers/inactivitycontroller.cpp:43
+#, c-format
+msgid ""
+"Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\n"
+"Do you want to continue?"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:98
+msgid "Fatal error! you can't register two parsers with same  key"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+msgid "Malformed template Id ("
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:493
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid ""
+"):\n"
+"Is not a valid HL7 identifier (ie: code^description^namespaceId)"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:523
+msgid "Id malformed template in the module configuration"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid "Template Id unsupported ("
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:540
+msgid ""
+"):\n"
+"Check the configuration and attach it if necessary"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:566
+msgid "Unknown module Id ("
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:592
+msgid "Empty configuration"
+msgstr ""
+
+#: ..\../main/controllers/integrationcontroller.cpp:631
+msgid "XML Parser Not Found. Key="
+msgstr ""
+
+#: ..\../main/controllers/log4cplus/guiappender.cpp:75
+msgid "%Y/%m/%d %H:%M:%S.%q"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:41
+#: ..\../main/gui/history3/historypanel3base.cpp:48
+#: ..\../main/gui/import/pasosimportacionbase.cpp:227
+msgid "Patient"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:73
+msgid "Patient ID"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:86
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:491
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:198
+#: ..\../main/gui/history3/historypanel3.cpp:227
+#: ..\../main/gui/open/opendialogs.cpp:50
+msgid "Modality"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:98
+msgid "Dimensions"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:109
+#, c-format
+msgid "Made with %s"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:167
+#: ..\../main/controllers/modalitysettingscontroller.cpp:338
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:136
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:158
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:207
+msgid "Default"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:343
+msgid "Autocalculate"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:446
+msgid "SPINAL"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:450
+msgid "CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:454
+msgid "BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:458
+msgid "CRANIUM BONE"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:462
+msgid "MEDIASTINUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:466
+msgid "LUNG"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:470
+msgid "BREAST"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:474
+msgid "VERTEBRA"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:484
+msgid "ANGIO"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:488
+msgid "CT CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:492
+msgid "T1 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:496
+msgid "T2 CRANIUM"
+msgstr ""
+
+#: ..\../main/controllers/modalitysettingscontroller.cpp:500
+msgid "KNEE"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1212
+msgid "Downloading file"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Error downloading WADO file"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1318
+msgid "Check PACS configuration"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1387
+msgid "Unknown query/retrieve level"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1390
+msgid "Query retrieve level not specified"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1424
+msgid "Unable to perform HTTP request"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1428
+msgid "Invalid HTTP response"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1433
+msgid "Invalid HTTP code"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1440
+msgid "Unable to init HTTP subsystem"
+msgstr ""
+
+#: ..\../main/controllers/pacscontroller.cpp:1472
+msgid "PACS-Service"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:97
+#: ..\../main/controllers/parserxmlspanish.cpp:94
+msgid "Omitted Identificator"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:105
+#: ..\../main/controllers/parserxmlspanish.cpp:102
+msgid "Omitted AET"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:113
+#: ..\../main/controllers/parserxmlspanish.cpp:110
+msgid "Hostname missing"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:121
+#: ..\../main/controllers/parserxmlspanish.cpp:118
+msgid "Omitted port"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:206
+#: ..\../main/controllers/parserxmlenglish.cpp:237
+#: ..\../main/controllers/parserxmlspanish.cpp:188
+#: ..\../main/controllers/parserxmlspanish.cpp:219
+msgid "The pdu size is not a valid number"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:212
+#: ..\../main/controllers/parserxmlspanish.cpp:194
+msgid "Port is not a valid number"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:248
+#: ..\../main/controllers/parserxmlspanish.cpp:228
+msgid "The port is not a valid number"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:265
+#: ..\../main/controllers/parserxmlspanish.cpp:246
+msgid "Setting not found"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:308
+msgid "\"action\" attribute invalid at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:312
+msgid "\"action\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:331
+msgid "\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:341
+msgid "\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:360
+msgid "\"value\" attribute expected at \"query-retrieve-level\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:391
+msgid "\"code\" attribute expected at \"patient\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:427
+msgid "\"code\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:434
+msgid "\"value\" attribute expected at \"physician\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:445
+msgid "\"iid\" atribute expected at \"institution\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:476
+msgid "\"code\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:483
+msgid "\"key\" attribute expected at \"metadata\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:548
+#: ..\../main/controllers/parserxmlspanish.cpp:555
+msgid "You must specify attributes you want to use in the query"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:552
+#: ..\../main/controllers/parserxmlspanish.cpp:562
+msgid "It has been read a \"patient\" tag without identifiers"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlenglish.cpp:570
+#: ..\../main/controllers/parserxmlspanish.cpp:578
+msgid ""
+"You must define a default PACS in the integration XML or in the settings menu"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:290
+msgid "\"accion\" attribute invalid at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:294
+msgid "\"accion\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:313
+msgid "\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:323
+msgid "\"pacs_store_sid\" attribute empty at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:340
+msgid "\"uid\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:363
+msgid "\"ambito\" attribute invalid at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:369
+msgid "\"ambito\" attribute expected at \"dimse\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:402
+msgid "\"codigo\" attribute expected at \"paciente\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:438
+msgid "\"codigo\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:445
+msgid "\"valor\" attribute expected at \"medico\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:456
+msgid "\"cid\" atribute expected at \"centro\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:472
+msgid "\"aid\" attribute expected at \"hce\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:486
+msgid "\"codigo\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:493
+msgid "\"clave\" attribute expected at \"metadato\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:524
+msgid "\"id_peticion\" attribute expected at \"gnkworkflow\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:527
+msgid "\"ambito\" attribute expected at \"plantilla\" scope"
+msgstr ""
+
+#: ..\../main/controllers/parserxmlspanish.cpp:559
+msgid "id_application expected"
+msgstr ""
+
+#: ..\../main/controllers/smartretrievecontroller.cpp:124
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:920
+msgid "Downloading from PACS..."
+msgstr ""
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:303
+#: ..\../main/controllers/streaming/streamingloader.cpp:311
+msgid ""
+"Error reading the study: Largest image pixel value data is not coherent with "
+"combination of Pixel Representation and High bit"
+msgstr ""
+
+#: ..\../main/controllers/streaming/streamingloader.cpp:608
+msgid "Internal error reading the study, unknown format "
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:118
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:332
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:333
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:460
+#: ..\../main/gui/history3/historytablemodel.cpp:403
+#: ..\../main/gui/history3/historytablemodel.cpp:415
+#: ..\../main/gui/history3/historytablemodel.cpp:470
+#: ..\../main/gui/history3/historytablemodel.cpp:482
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:102
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:66
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:80
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:81
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:109
+#: ..\../main/gui/ginkgocloud/wxtreelistctrlcloud.h:110
+msgid "%m/%d/%Y %H:%M:%S"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:121
+msgid "%m/%d/%Y 00:00:00"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:418
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:444
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:262
+msgid "Exploring PACS..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:472
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:197
+#: ..\../main/gui/history3/historypanel3.cpp:225
+#: ..\../main/gui/open/opendialogs.cpp:49
+msgid "Patient id"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:473
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:196
+#: ..\../main/gui/history3/historypanel3.cpp:224
+#: ..\../main/gui/open/opendialogs.cpp:48
+msgid "Patient name"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:479
+msgid "Study Instance UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:480
+#: ..\../main/gui/history3/historypanel3.cpp:231
+#: ..\../main/gui/open/opendialogs.cpp:53
+msgid "Accession number"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:481
+msgid "Study date"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:482
+msgid "Study time"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:490
+msgid "Series Instance UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:492
+msgid "Series date"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:493
+msgid "Series time"
+msgstr ""
+
+#: ..\../main/gui/acquisition/acquisitiontablemodel.cpp:519
+msgid "No results found"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:96
+msgid "Write query name"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:101
+msgid "This query name is in use, do you want to overwrite it?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:144
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:168
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:170
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:410
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:51
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:905
+msgid "Id"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:199
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:116
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:158
+msgid "Date Time"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:200
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:178
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2044
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:150
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:112
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:248
+#: ..\../main/gui/history3/historypanel3.cpp:229
+#: ..\../main/gui/import/pasosimportacionbase.cpp:298
+#: ..\../main/gui/import/pasosimportacionbase.cpp:340
+#: ..\../main/gui/open/opendialogs.cpp:52
+msgid "Description"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:201
+#: ..\../main/gui/import/pasosimportacionbase.cpp:276
+msgid "Accession Number"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:210
+msgid "Store query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:211
+msgid "Remove query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:278
+msgid "There is no any PACS configured"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:414
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:53
+msgid "Acc#"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:416
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:54
+msgid "Study UID"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid ""
+"Search without parameters could take al long time\n"
+"Would you like to continue?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:437
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:30
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:129
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:232
+msgid "Search"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:519
+msgid "Download series"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:521
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:325
+msgid "Download study"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:535
+msgid "Link series"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:537
+msgid "Link study"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:551
+msgid "Properties..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:686
+msgid "You must specify at least a modality or a period of time"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:704
+msgid "This query will be removed permanently, do you confirm removal?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:709
+msgid "Select a valid query"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:721
+msgid "Select a valid PACS Server"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid "Download of modality "
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:754
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:762
+msgid " not allowed"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "You are not allowed to download this kind of modalities."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:755
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:763
+msgid "Modality download error"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:786
+msgid "search results"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:913
+msgid "Downloading serie..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicion.cpp:916
+msgid "Downloading study..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:70
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:165
+msgid "PACS acquisition is restricted"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:96
+msgid "Server"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:115
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:195
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:154
+#: ..\../main/gui/import/pasosimportacionbase.cpp:284
+#: ..\../main/gui/import/pasosimportacionbase.cpp:326
+#: ..\../main/gui/open/opendialogs.cpp:51
+msgid "Date"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:123
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:203
+#: ..\../main/gui/history3/historypanel3base.cpp:81
+msgid "Any date"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:127
+#: ..\../main/gui/history3/historypanel3base.cpp:85
+msgid "Today AM"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:130
+#: ..\../main/gui/history3/historypanel3base.cpp:88
+msgid "Today PM"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:133
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:207
+#: ..\../main/gui/history3/historypanel3base.cpp:91
+msgid "Today"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:142
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:210
+#: ..\../main/gui/history3/historypanel3base.cpp:100
+msgid "Yesterday"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:145
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:219
+#: ..\../main/gui/history3/historypanel3base.cpp:103
+msgid "Last 7 days"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:148
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:222
+#: ..\../main/gui/history3/historypanel3base.cpp:106
+msgid "Last 30 days"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:151
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:225
+#: ..\../main/gui/history3/historypanel3base.cpp:109
+msgid "Last 3 months"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:160
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:234
+#: ..\../main/gui/history3/historypanel3base.cpp:118
+msgid "Between:"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:191
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:265
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:113
+#: ..\../main/gui/history3/historypanel3base.cpp:149
+msgid "Modalities"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:212
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3351
+msgid "Stored queries"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:216
+msgid "Select stored queries..."
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:227
+#: ..\../main/gui/open/opendialogsbase.cpp:50
+#: ..\../main/gui/open/opendialogsbase.cpp:202
+msgid "Link"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:229
+msgid "Available only in WADO servers"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:233
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:445
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:289
+msgid "Download"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:238
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:60
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:318
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+#: ..\../main/gui/paneltags/paneltagsbase.cpp:28
+msgid "Close"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:329
+msgid "Series does not exist"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:334
+msgid "These series have been deleted from the local history"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:354
+msgid "Continue"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:374
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:523
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2454
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2554
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3190
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3270
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:140
+#: ..\../main/gui/open/opendialogsbase.cpp:127
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:72
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:62
+#: ..\../main/tools/metricgridtool.cpp:101
+msgid "Ok"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:404
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:413
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:151
+msgid "Download again"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:441
+msgid "Open"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:483
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:492
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.cpp:497
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:179
+msgid "Set query name"
+msgstr ""
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:32
+msgid ""
+"This series has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/acquisition/downloadagaindialog.cpp:34
+msgid ""
+"This study has been already downloaded in the local history, Do you want to "
+"download it again?"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizedialog.cpp:64
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:95
+#: ..\../main/gui/export/parametrosprincipales.cpp:194
+msgid "Exporting images ..."
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanel.cpp:95
+msgid "Element field or group field have invalid values"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:21
+msgid "Common tags"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:29
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:54
+msgid "Patient's name and surname"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:32
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:40
+msgid "Patient Id"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:35
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:46
+msgid "Institutions"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:38
+msgid "Referring physician"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:41
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:57
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:90
+msgid "Comments"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:44
+msgid "Ginkgo CADx tags  (Evaluation Maps...)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:63
+msgid "Tags (double click to change value)"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:71
+msgid "Add new..."
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:113
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:32
+#: ..\../main/tools/anonymizetool.cpp:26
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:103
+msgid "Anonymize"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:136
+msgid "Create new"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:181
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2399
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3227
+#: ..\../main/gui/anonymize/anonymizepanelbase.h:136
+msgid "Add DICOM tag"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:199
+msgid "Group"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:203
+msgid "Element"
+msgstr ""
+
+#: ..\../main/gui/anonymize/anonymizepanelbase.cpp:207
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:180
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3238
+#: ..\../widgets/wangulo.cpp:1114
+msgid "Value"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:91
+msgid "Top right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:94
+msgid "Top left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:97
+msgid "Bottom left corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:100
+msgid "Bottom right corner annotation"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:198
+msgid "You must fill in all fields"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:204
+msgid "Window/level label in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:209
+msgid "Fill in valid numbers in window and level fields."
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:225
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2407
+msgid "Label"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:226
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2415
+msgid "Window"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:227
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2425
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:58
+msgid "Level"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:250
+msgid "Nearest neighbour"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:251
+msgid "Linear"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:252
+msgid "Cubic"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+msgid "Do you confirm the removal of the preset?"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:347
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Data modified"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:473
+msgid "Modality settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:478
+msgid "Default modality settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp:519
+#, c-format
+msgid "%s settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:60
+msgid "settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Export Configuration"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:262
+msgid "Ini Files(*.ini)|*.ini"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:170
+msgid ""
+"File exists\n"
+"Would you like to overwrite it?"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:266
+msgid "Existing file"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:273
+msgid "Export successfully completed"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:275
+msgid "There was an error during exportation"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Import Configuration"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:282
+msgid "Ini files(*.ini)|*.ini"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:298
+msgid "Import successfully completed, restart Ginkgo CADx to apply changes"
+msgstr ""
+
+#: ..\../main/gui/configuration/dialogoconfiguracion.cpp:300
+msgid "There was an error during importation, check permissions"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:179
+msgid "Dicom tag"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:332
+msgid "Split horizontally..."
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:339
+msgid "Split vertically..."
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:434
+#: ..\../main/tools/windowlayouttool.cpp:273
+msgid "Split active horizontally"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:437
+#: ..\../main/tools/windowlayouttool.cpp:274
+msgid "Split active vertically"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:627
+msgid "New hanging protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:668
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:715
+#, c-format
+msgid "Window %d"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:719
+msgid "This view doesn't support multiple windows"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:764
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:426
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:60
+msgid "Active"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:797
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:880
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:896
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:922
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:765
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:940
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1076
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:461
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:524
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:565
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:601
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:227
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:233
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:239
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:333
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:339
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:345
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "Yes"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:799
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:882
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:898
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:924
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:767
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:942
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1078
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:463
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:562
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:603
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:236
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:242
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:336
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:342
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:348
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:381
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:382
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:383
+msgid "No"
+msgstr ""
+
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:822
+#: ..\../main/gui/configuration/hangingprotocolconfigurationpanel.cpp:827
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2827
+msgid "Hanging protocols"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:59
+msgid "One day"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:60
+msgid "Two days"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:61
+msgid "Three days"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:62
+msgid "One week"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:63
+msgid "Two weeks"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:64
+msgid "One month"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:65
+msgid "Three months"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:66
+msgid "One year"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:140
+msgid "Local database"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:145
+msgid "Local DICOM Dir setup"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:160
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:122
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create it?"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:171
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:133
+msgid ""
+"Failed to create directory, make sure the path is correct and you have "
+"permissions on parent directory"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:185
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:147
+msgid ""
+"There was an error reading the directory, make sure you have write "
+"permissions on it"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:258
+msgid "Select DICOMDIR"
+msgstr ""
+
+#: ..\../main/gui/configuration/localdatabaseconfigurationpanel.cpp:270
+msgid "Warning, to update the directory, you must close current opened series."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:87
+msgid "Workstation"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionestacion.cpp:92
+msgid "Configuration parameters of the local station"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:121
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1538
+msgid "Extensions"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:126
+msgid "Extensions settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionextensiones.cpp:132
+msgid "Ginkgo CADx must restart for the extensions changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:94
+msgid "Port has to be a valid number"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:185
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2760
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:40
+msgid "General"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:190
+msgid "General configuration parameters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguraciongeneral.cpp:196
+msgid "Ginkgo CADx must restart for the changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:74
+msgid "Electronic health record"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:79
+msgid "Setting the electronic health record system"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:134
+msgid "Testing conectivity with the server..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:144
+msgid "Error connecting to url"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:141
+msgid "hostname/port not set"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:146
+msgid "Connection test fail"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionhce.cpp:148
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:635
+msgid "Connection test successful"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "Select certificate"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:96
+msgid "PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:193
+msgid "You have to set private and public key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:230
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:255
+msgid "Change ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:232
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:257
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1277
+msgid "Import ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:279
+msgid ""
+"If you want to use SSL/TLS you have to set a valid certificate and a valid "
+"private key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:472
+msgid "There are this errors: "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:477
+msgid ""
+"\n"
+"- This PACS id is in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:486
+msgid ""
+"\n"
+"- The port must be a positive short integer (16 bits)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:490
+msgid ""
+"\n"
+"- The port is too large"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:496
+msgid ""
+"\n"
+"- The maximum length of the AET is 16 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:503
+msgid ""
+"\n"
+"- The PDU size should be greater than or equal to zero (default = 16384)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:507
+msgid ""
+"\n"
+"- The maximum value of the PDU is "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:511
+msgid ""
+"\n"
+"- The minimum value of the PDU is "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:519
+msgid ""
+"\n"
+"- If you want to use SSL/TLS you have to set a valid certificate and private "
+"key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:525
+msgid ""
+"\n"
+"- If you want to use WADO you have to fill in wado url"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:529
+msgid ""
+"\n"
+"- WADO URL doesn't contains scheme (i.e. http://)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:532
+msgid ""
+"\n"
+"- WADO URL doesn't contains host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:542
+msgid "You must fill in all fields to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:558
+msgid "Testing the connection to the node ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:561
+msgid "DICOM Error"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:591
+msgid "Unable to connect: Could not start network support."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:602
+msgid "The service did not respond correctly to the C-ECHO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:607
+msgid "The service did not respond correctly to the DICOM standard"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:616
+msgid "Invalid port number"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:622
+msgid "WADO Error"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:703
+msgid "Use by default"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:795
+msgid "DICOM nodes"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:800
+msgid "DICOM nodes settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:807
+msgid "They have produced the following errors:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:812
+msgid ""
+"\n"
+"- The local port must be a positive short integer (16 bits)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:816
+msgid ""
+"\n"
+"- The local port is too large"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:822
+msgid ""
+"\n"
+"- Maximum length of local AET is 16 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1022
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:404
+msgid "Confirm the removal of the node"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpacs.cpp:1101
+msgid ""
+"You must configure the local AET, which is used to communicate with the "
+"DICOM nodes. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:97
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1760
+#: ..\../main/gui/export/pasosexportacionbase.cpp:20
+msgid "Profile"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:140
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:324
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:349
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2361
+msgid "Default value"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:263
+msgid "Set property active"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Inactive"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:264
+msgid "Set property inactive"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:265
+msgid "Set default value"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:352
+msgid "Set by user"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:400
+msgid "Profile name can't be repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:407
+msgid "You must fill in name field to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:493
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1852
+msgid "Profiles"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:498
+msgid "Profiles Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:507
+msgid "Ginkgo CADx must restart for the permission changes to take effect"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionpermisos.cpp:671
+msgid "Confirm the removal of the profile "
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:51
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:52
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:53
+msgid "New User"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:92
+msgid "User name has to contain at least 4 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:100
+msgid "User name repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:108
+msgid "Password and confirm password can't be different."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:117
+msgid "Password has to contain at least 6 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:141
+msgid "No login"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:142
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1110
+msgid "User/Password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:143
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:486
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1126
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2276
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:224
+msgid "Password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:191
+msgid "Password is setted"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:192
+msgid "Change password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:194
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2191
+msgid "Password is not setted"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:195
+msgid "Set password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:224
+msgid "Security Setting"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:240
+msgid "You must create at least one user"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:250
+msgid "You must set the main password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:302
+msgid "User inserted successfully"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:305
+msgid "There was an error inserting user. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:332
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:374
+msgid "Password changed successfully"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:334
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:377
+msgid ""
+"There was an error changing the password. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:352
+msgid "User deleted successfully"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:355
+msgid "There was an error deleting user. To get more info open the LOG."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:359
+msgid "Ginkgo CADx must have at least one user."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionseguridad.cpp:366
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1118
+#: ..\../main/gui/login/dialogologin.cpp:27
+msgid "User"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:90
+#: ..\../main/gui/open/abrir.cpp:145
+msgid "Choose a directory"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:117
+msgid "Location titles can't be repeated"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:124
+msgid "Maximum length of title is 8 characters"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:130
+msgid "The selected directory can't be opened"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:156
+msgid "You must fill both title and location fields to continue"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:176
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2019
+msgid "Title"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:177
+msgid "Path"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:179
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2055
+msgid "Monitorize"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:180
+msgid "Clean before"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:181
+msgid "Clean after"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:256
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1922
+msgid "Locations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfiguracionubicaciones.cpp:261
+msgid "Location Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:91
+msgid "Anonymization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelconfigurationanonymization.cpp:96
+msgid "Anonymization settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:22
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:27
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:897
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3012
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3083
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1370
+msgid "Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:84
+msgid "Export config..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:87
+msgid "Import config..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:106
+msgid "Apply"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:163
+msgid "Physician's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:171
+msgid "Physician's Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:189
+msgid "Service"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:197
+msgid "Service's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:205
+msgid "Service's Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:223
+msgid "Local institution"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:231
+msgid "Institution's name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:239
+msgid "Institution's Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:257
+msgid "Dicomized files"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:265
+msgid "Charset"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:270
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1157
+msgid "ISO_IR 192"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:271
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1158
+msgid "ISO_IR 6"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:272
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1156
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1159
+msgid "ISO_IR 100"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:273
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1160
+msgid "ISO_IR 101"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:274
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1161
+msgid "ISO_IR 109"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:275
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1162
+msgid "ISO_IR 110"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:276
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1163
+msgid "ISO_IR 126"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:277
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1164
+msgid "ISO_IR 127"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:278
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1165
+msgid "ISO_IR 138"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:279
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1166
+msgid "ISO_IR 144"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:280
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1167
+msgid "ISO_IR 148"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:323
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:328
+msgid "Language"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:345
+msgid "Misc"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:350
+msgid "Automatically check for updates"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:354
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:57
+msgid "Help us sending anonymous usage data (no patient data will be sent)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:368
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:376
+msgid "Proxy settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:373
+msgid "Enable http proxy"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:419
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:218
+msgid "Proxy Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:428
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:459
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:504
+msgid "Server settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:436
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:921
+msgid "Host"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:444
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:779
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:929
+msgid "Port"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:464
+msgid "Authentication"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:469
+msgid "Proxy server requires authentication"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:478
+msgid "Username"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:509
+msgid "Exceptions"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:514
+msgid "No proxy for addresses containing"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:521
+msgid "Separate addresses with commas."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:584
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:599
+msgid "DICOM Dir"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:589
+msgid "DICOM Dir is the local directory where history is stored"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:607
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2038
+msgid "..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:613
+msgid "Warning, to update the directory, you have to close every opened series"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:621
+msgid "Auto-cleaning"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:629
+msgid "Delete studies with acquisition date older than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:639
+msgid "Delete older studies when hd free space is less than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:650
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:668
+msgid "MB"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:657
+msgid "Delete studies when DICOM Dir size bigger than:"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:678
+msgid "This feature only affects to studies COPIED to DICOM Dir and not in use"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:687
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1705
+#: ..\../main/tools/toolwindowlevel.cpp:201
+msgid "Reset to default"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:739
+msgid "Local PACS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:744
+msgid ""
+"You must configure the local AET, which is used to communicate with the PACS "
+"server. The specified port must be opened in the firewall, as it is "
+"essential for transfers."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:756
+msgid "Local AET"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:772
+msgid ""
+"For large-scale implementation in a homogenous environment, you can specify "
+"the following wildcards in the local AET:\n"
+"\t%IP IP Address\n"
+"\t%IP<n> n-th Octet (1~4)\n"
+"\t%HOSTNAME Host Name\""
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:790
+msgid "Advanced settings..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:806
+msgid "DICOM Nodes"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:817
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1863
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1946
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2160
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2838
+msgid "New ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:820
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1866
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1949
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2841
+msgid "Edit ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:825
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1871
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1954
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2168
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2612
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2846
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3120
+#: ..\../main/gui/history3/historypanel3.cpp:677
+#: ..\../main/gui/history3/historypanel3.cpp:686
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:833
+msgid "Set Default"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:887
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:993
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:388
+msgid "DICOM Node"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:913
+msgid "AET"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:937
+msgid "PDU (KB)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:944
+msgid "Retrieve method"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Move"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "Get"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:948
+msgid "WADO"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:954
+msgid "WADO URL"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:964
+msgid "Retrieve mode"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+#: ..\../main/gui/import/pasosimportacionbase.cpp:319
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1395
+msgid "Series"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:968
+msgid "Studies"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:974
+msgid "Reuse connection"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:979
+msgid "Reuse connections when is needed to make more than one queries"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:999
+msgid "Worklists"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1004
+msgid "Select how do you want to handle MPPS items"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1008
+msgid "DICOM MPPS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1012
+msgid "HL7 messages"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1016
+msgid "HL7"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1024
+msgid "Abort message"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1031
+msgid "Completed message"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1038
+msgid "In progress message"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1048
+msgid "Default values"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1070
+msgid "Worklist"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1076
+msgid "SSL/TLS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1081
+msgid "Verify server credentials"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1084
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1261
+msgid "Use SSL/TLS"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1088
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:541
+msgid "Certificate"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1090
+msgid "Certificate to use in this connection"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1094
+msgid "Advanced Configuration ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1144
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1152
+msgid "Default charset"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1180
+msgid "Advanced"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1188
+msgid "Test connection"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1258
+msgid "Verify client credentials"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1265
+msgid "Local AET certificate"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1273
+msgid "Certificate used by Ginkgo CADx"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1344
+msgid "Gingo CADx Application ID used to fill MSH.3 field"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1355
+msgid "Receiver organization Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1357
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1363
+msgid "Unique identifier of the organization receiving the message."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1367
+msgid "Petitioner System Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1369
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1375
+msgid "Unique identifier of the requesting system."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1379
+msgid "Filler Application Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1381
+msgid "Unique identifier of the filler application (SIID/Ginkgo CADx)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1387
+msgid "Unique identifier of the filler application (SIID/Ginkgo)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1391
+msgid "Ginkgo CADx Application Id"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1393
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1399
+msgid ""
+"Unique identifier of the Picture Archiving and Communication System "
+"Application (SIID/PACS)."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1416
+msgid "Integration engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1427
+msgid "Hostname / Port"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1429
+msgid "Hostname (IP or DNS) integration engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1440
+msgid "/"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1451
+msgid "Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1453
+msgid "Integration Engine's Transport Layer Protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1460
+msgid "MLLP"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1469
+#: ..\../main/gui/export/pasosexportacionbase.cpp:28
+msgid "Format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1471
+msgid "Message's format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1475
+msgid "ER7"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1484
+msgid "Test engine"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1485
+msgid "Test Integration Engine connectivity"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1597
+msgid "Ginkgo Extension Title"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1629
+msgid "Edit public key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1634
+msgid "Use default certificate (certificate configured in local AET settings)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1647
+msgid "Public key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1652
+msgid "Public key in PEM format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1660
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1686
+msgid "Load ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1673
+msgid "Private key"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1678
+msgid "Private key in PEM format"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1771
+msgid "Profile name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1879
+msgid "Set active"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:1930
+msgid ""
+"Locations are predefined paths to set locations from well known paths (ex: "
+"remote shared disk)"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2008
+msgid "Configure location"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2027
+msgid "Location"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2058
+msgid "Clean directory after dicomization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2061
+msgid "Clean directory before dicomization"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2127
+msgid "Security type"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2149
+msgid "Users"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2163
+msgid "Change Password ..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2186
+msgid "Set main password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2195
+msgid "Set Password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2245
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2254
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:736
+msgid "Edit User"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2268
+msgid "User Name"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2284
+msgid "Confirm Password"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2353
+msgid "Properties"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2491
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:814
+msgid "Edit corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2502
+msgid ""
+"To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:"
+"DefaultValue}  where GGGG is the tag's group in hexadecimal and EEEE is the "
+"tag's element."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2506
+msgid ""
+"You can also use special tags listed in the tooltip over the question button."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2514
+msgid ""
+"${NEWLINE}\n"
+"${GINKGO.VERSION.FULLTEXT}\n"
+"${GINKGO.ARCH}             \n"
+"\n"
+"${VOLUME.IDX}\n"
+"${SLICE.WIDTH}\n"
+"${SLICE.HEIGHT}\n"
+"${SLICE.WL.FULLTEXT}\n"
+"${SLICE.IDX}\n"
+"${SLICE.COUNT}\n"
+"${SLICE.IDX.FULLTEXT}\n"
+"${SLICE.LATERALITY}\n"
+"${SLICE.VOXEL.SIZE}\n"
+"${SLICE.THICKNESS}\n"
+"${SLICE.THICKNESS.FULLTEXT}\n"
+"${SLICE.LOCATION}\n"
+"${SLICE.LOCATION.FULLTEXT}\n"
+"${VIEW.SCALE}"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2590
+msgid "Window/level"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2606
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3117
+msgid "Add"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2609
+#: ..\../main/gui/history3/historytoolmenu.cpp:149
+#: ..\../widgets/gui/selecciontextobase.h:58
+msgid "Edit"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2629
+msgid "Default Window/Level"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2645
+msgid "Corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2647
+msgid "Setup corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2651
+msgid "Setup..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2658
+msgid "Other settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2665
+msgid "Interpolate pixel data"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2714
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:885
+msgid "Hanging protocol"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2737
+msgid "Opening mode"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2750
+msgid "Study opening criteria"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2767
+msgid "+"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2775
+msgid "Workspace"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2854
+msgid "Enable/Disable"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2947
+msgid "Top left corner annotations"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2983
+msgid "Setup window"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2988
+msgid "Push configuration button and place window where you want"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2995
+msgid "Set default"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:2996
+msgid "Open in main window"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3000
+msgid "Setup position..."
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3001
+msgid "Setup undocked window position"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3017
+msgid "Layout"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3024
+msgid "Current layout"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3037
+msgid "Rows"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3044
+msgid "Columns"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3067
+msgid "Series criteria"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3157
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3162
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1054
+msgid "Select opening mode"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3234
+msgid "Tag"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3308
+msgid "Setup position and size of the window where you want to open the study"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3315
+msgid "Save"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.cpp:3347
+msgid "Enable background queries"
+msgstr ""
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:98
+msgid "Smart retrieve"
+msgstr ""
+
+#: ..\../main/gui/configuration/smartretrieveconfigurationpanel.cpp:103
+msgid "Smart retrieve settings"
+msgstr ""
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:23
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:32
+#: ..\../main/gui/countdownmessage/countdownmessagebase.cpp:112
+msgid "Inactivity detected"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:23
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.h:64
+msgid "Export DICOM"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:43
+msgid "Refering physician"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:60
+msgid "Ginkgo CADx private tags"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/dicomdirexportbase.cpp:82
+#: ..\../main/gui/history3/historypanel3.cpp:340
+#: ..\../main/gui/history3/historytoolmenu.cpp:158
+msgid "Export"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:48
+#: ..\../main/gui/export/parametrosprincipales.cpp:157
+msgid "Select the directory where the files will be stored"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:55
+#: ..\../main/gui/export/parametrosprincipales.cpp:161
+msgid ""
+"The selected directory does not exist\n"
+"Would you like to create?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirexport/exportdicomdir.cpp:67
+msgid "There are other DICOM directory in selected path"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:36
+#, c-format
+msgid ""
+"Ginkgo CADx has detected a default DICOM Dir created with an old version of\n"
+"Ginkgo CADx (BBDD v.%d). What do you want to do?"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:39
+#, c-format
+msgid ""
+"DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\n"
+"This version is unabled to open it."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:95
+msgid ""
+"Error renaming old dicomdir to <name>_old, ensure you have permissions to do "
+"it"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigration.cpp:108
+msgid "Select the DICOM Dir folder"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:27
+msgid "DICOM Dir migration"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:44
+msgid "Migrate existing (recommended)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:55
+msgid ""
+"Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. "
+"Do not close Ginkgo CADx until migration is finished."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:59
+msgid "Remove old DICOM Dir after migration (will be renamed as *_old)"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:65
+msgid "Continue..."
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:77
+msgid "Select other"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:85
+msgid ""
+"Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new "
+"one will be created, else existing DICOM Dir will be used"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.cpp:89
+msgid "Browse..."
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:106
+msgid "DICOM Export"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:110
+msgid "Select the format and the images you want to export"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:143
+msgid "DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:147
+msgid ""
+"JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/export/parametrosprincipales.cpp:150
+msgid "Select file"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "DICOM (native format)"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:32
+msgid "Image (jpg, bmp, png)"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:38
+msgid "Export all files of opened tab"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:55
+msgid "JPEG"
+msgstr ""
+
+#: ..\../main/gui/export/pasosexportacionbase.cpp:60
+msgid "Quality"
+msgstr ""
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:40
+msgid "Image Export Wizard"
+msgstr ""
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:139
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:63
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:440
+#: ..\../main/gui/license/aboutdialogbase.cpp:67
+#: ..\../main/gui/license/aboutdialogbase.cpp:151
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:54
+msgid "&Accept"
+msgstr ""
+
+#: ..\../main/gui/export/wxwizardexportacionginkgo.cpp:141
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:378
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:57
+msgid "&Next >"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:32
+msgid "Open link"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:37
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:402
+msgid "File link:"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:140
+#: ..\../main/gui/import/pasosimportacionbase.cpp:270
+msgid "Study"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:151
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:250
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:216
+msgid "User name"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:397
+msgid "Ginkgo Cloud link"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:409
+msgid ""
+"You can copy and paste link to use it in e-mails and web pages, you have to "
+"install Ginkgo CADx to download and visualize it."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:431
+msgid "Send link by e-mail"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.cpp:437
+msgid "Copy to clipboard"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "New Ginkgo Cloud study"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:59
+msgid "To download the study, paste this url "
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/filelinkdialog.cpp:61
+msgid ""
+"into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it "
+"into the address bar of your browser."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:114
+msgid "Creator"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:115
+msgid "Last Modificator"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:335
+msgid "Show link..."
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:436
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:441
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:446
+#: ..\../main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp:451
+msgid "?"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/openginkgoclouddialog.cpp:39
+msgid "Invalid link"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:117
+#: ..\../main/gui/history3/historypanel3.cpp:637
+msgid "Open Series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:119
+#: ..\../main/gui/history3/historypanel3.cpp:639
+msgid "Open Series with .."
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:226
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:108
+msgid "Age"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:228
+msgid "Date acquired"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:230
+msgid "Date added"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:308
+#: ..\../main/gui/history3/historytoolmenu.cpp:82
+#: ..\../main/gui/startup/startupform.cpp:56
+msgid "Acquire"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:316
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:363
+msgid "All patients"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+msgid "Results"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:481
+#, c-format
+msgid " (%d images)"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:634
+msgid "Open study with .."
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:663
+#: ..\../main/gui/history3/historypanel3base.cpp:482
+msgid "Synchronize"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:677
+msgid "&Delete from history"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:686
+msgid "&Clear history"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:904
+#: ..\../main/gui/history3/historypanel3.cpp:975
+msgid ""
+"You have reached maximum number of opened tabs, close some tabs and try it "
+"again"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid "Unable to open modality "
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1045
+msgid " with transfer syntax "
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1056
+msgid "Error loading study, check hanging protocol settings"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1078
+msgid "Failed to empty the history, you have to close opened studies"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1086
+msgid "all files"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1106
+#: ..\../main/gui/history3/historypanel3.cpp:1171
+#: ..\../main/tools/anonymizetool.cpp:46
+#: ..\../main/tools/exportdicomdirtool.cpp:57
+#: ..\../main/tools/sendpacstool.cpp:59
+#: ..\../main/tools/showtagshistorytool.cpp:42
+msgid "Select at least one series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1119
+msgid "You can't remove opened series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "those series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3.cpp:1128
+msgid "this series"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:57
+msgid "Advanced search"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:73
+msgid "Acquisition date"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:302
+#: ..\../main/gui/history3/historypanel3base.h:134
+msgid "Confirm removal"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:310
+msgid "Are you sure you want to delete "
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:336
+#: ..\../main/gui/history3/historytoolmenu.cpp:102
+#: ..\../main/gui/history3/historytoolmenu.cpp:200
+#: ..\../main/gui/history3/historytoolmenu.cpp:229
+msgid "Remove"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:381
+msgid "Choose the view you want to use to open file/s"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:389
+msgid "Always use this view to open these files"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:454
+#: ..\../main/gui/history3/historypanel3base.h:187
+msgid "Synchronize files"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.cpp:459
+msgid ""
+"There are files that has to be downloaded to local database before executing "
+"this action, \n"
+"do you want to synchornize files now?"
+msgstr ""
+
+#: ..\../main/gui/history3/historytablemodel.cpp:406
+#: ..\../main/gui/history3/historytablemodel.cpp:418
+#: ..\../main/gui/history3/historytablemodel.cpp:473
+#: ..\../main/gui/history3/historytablemodel.cpp:485
+#: ..\../main/gui/open/dicomdirtablemodel.cpp:105
+msgid "00/00/0000 00:00:00"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:138
+msgid "Close history"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:139
+#: ..\../main/gui/startup/startupform.cpp:53
+msgid "History"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:201
+#: ..\../main/gui/history3/historytoolmenu.cpp:230
+msgid "Clear history"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:232
+msgid "Select all"
+msgstr ""
+
+#: ..\../main/gui/history3/historytoolmenu.cpp:233
+msgid "Deselect all"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:155
+msgid "Destination"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:156
+msgid "Status"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:157
+msgid "Error message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:207
+msgid "Show Message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:208
+msgid "Edit Message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:209
+msgid "Delete message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:262
+msgid "Error editing message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:308
+msgid "Error purguing messages"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:322
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:402
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Stop"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:364
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Sent"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:368
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+msgid "Pending"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:372
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:151
+#: ..\../main/gui/progress/statusbarprogreso.cpp:281
+msgid "Warning"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:390
+msgid "Error getting message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:399
+msgid "Running"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:400
+msgid "The submission process is started and ready to send"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:404
+msgid "Stopped"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:405
+msgid "Usually due to an error in sending a message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:407
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:64
+#: ..\../main/gui/progress/paneltarea.cpp:31
+msgid "Start"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:448
+msgid "Would you like to remove these messages?"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7.cpp:454
+msgid "Error deleting messages"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:19
+msgid "Remove sent messages"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:24
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:31
+msgid "Exit"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:27
+msgid "Messages"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:30
+msgid "Refresh"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:33
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1394
+msgid "View"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:53
+msgid "Send task status:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:57
+msgid "Enabled"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:116
+msgid "Message"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:124
+msgid "Date:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:132
+msgid "Destination:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:140
+msgid "Status:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:165
+msgid "Message content:"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.cpp:185
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:142
+msgid "OK"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:182
+msgid "Overview data of DICOM files"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:186
+msgid "DICOM data from the files to be generated can be populated"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:210
+msgid ""
+"\n"
+"* The patient ID is required."
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:214
+msgid ""
+"\n"
+"* Concatenation of patient name and surnames can't be higher than 61."
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:218
+msgid ""
+"\n"
+"* The format of the height in centimeters is not correct. "
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:222
+msgid ""
+"\n"
+"* The patient's birth date is after the date of study"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:226
+msgid ""
+"\n"
+"* The format of the weight is not correct. Valid range is between 0 and 400 "
+"Kg."
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "The following errors have occurred when validating fields"
+msgstr ""
+
+#: ..\../main/gui/import/generaldata.cpp:231
+msgid "Error validating fields"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:148
+msgid "Selecting Import Profile"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:152
+msgid "You must select the profile you want to use import"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:170
+msgid "You must select the import profile"
+msgstr ""
+
+#: ..\../main/gui/import/pasoperfilimportacion.cpp:188
+msgid "Unexpected error, select the module again"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:21
+msgid "Selected images"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:56
+msgid "Preview"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:62
+msgid "Remove all"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:113
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:65
+msgid "Demographic data"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:133
+msgid "Identificator *"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:144
+msgid "(ID or medical history number)"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:159
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "Birth date"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:183
+msgid "Surname"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:191
+msgid "Sex"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Male"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Female"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:195
+msgid "Others"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:217
+msgid "Study Details"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:234
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:122
+msgid "Weight"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:245
+msgid "Kg"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:252
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:119
+msgid "Height"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:263
+msgid "cm"
+msgstr ""
+
+#: ..\../main/gui/import/pasosimportacionbase.cpp:291
+#: ..\../main/gui/import/pasosimportacionbase.cpp:333
+msgid "Time"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:141
+msgid "Path of the location doesn't exists"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:167
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*."
+"bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|"
+"PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:169
+msgid ""
+"Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*."
+"png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG "
+"Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;"
+"*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;"
+"*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files..."
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:191
+msgid "Select files from filesystem"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:203
+msgid "Paste from clipboard"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:210
+msgid "Back"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:291
+msgid "Are you sure to delete this file from disk?"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:330
+msgid "Delete selected items"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:342
+msgid "You must select an image"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:346
+msgid "Generating preview..."
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:500
+msgid "Select images"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:534
+msgid "Creating Thumbnails..."
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:715
+msgid "Image selection"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:719
+msgid "You must select the images you want to import"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:743
+msgid "You must select at least one image"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:760
+msgid "The file"
+msgstr ""
+
+#: ..\../main/gui/import/selectimagesimportation.cpp:761
+msgid " doesn't exist"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:52
+msgid "Image Import Wizard"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:73
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:75
+msgid "Requested module does not support importation"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:88
+msgid "There is not registered any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:90
+msgid "There aren't any module with importation support"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:93
+msgid "Requested module is not registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:95
+msgid "The requested module isn't registered"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:167
+msgid "free of"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:181
+msgid "in dicomization dir."
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:335
+msgid "Are you sure you want to cancel the import process?"
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:369
+#, c-format
+msgid "Step %d of %d: "
+msgstr ""
+
+#: ..\../main/gui/import/wxwizardimportacionginkgo.cpp:376
+msgid "&End"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialog.cpp:25
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:22
+msgid "Ginkgo CADx"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:31
+msgid "Credits"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:55
+msgid "Licenses"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:58
+msgid "UPDATE_INFO"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:108
+#: ..\../main/gui/license/aboutdialogbase.h:88
+msgid "Open Source Licenses"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:117
+msgid "Cairo"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:118
+msgid "DCMTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:119
+msgid "FamFamFam Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:120
+msgid "Fugue Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:121
+msgid "ITK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:122
+msgid "LibJpeg"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:123
+msgid "LibPng"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:124
+msgid "OpenSSL"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:125
+msgid "VTK"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:126
+msgid "WxWidgets"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:127
+msgid "Zlib"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:128
+msgid "SQL Lite"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:129
+msgid "CharLS"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:130
+msgid "Dark Glass Icons"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:131
+msgid "Libcurl"
+msgstr ""
+
+#: ..\../main/gui/license/aboutdialogbase.cpp:132
+msgid "JsonCpp"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:23
+#: ..\../main/gui/license/acceptlicensedialogbase.h:64
+msgid "License agreement"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:43
+msgid ""
+"If you accept the terms of the agreement, click \"I Accept the license\" to "
+"continue. You must accept the license to start using Ginkgo CADx."
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:53
+msgid "Check for updates automatically"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:66
+msgid "I Accept the license"
+msgstr ""
+
+#: ..\../main/gui/license/acceptlicensedialogbase.cpp:70
+msgid "I do NOT accept the license"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Save logs"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:166
+msgid "Log file (*.log) | *.log | Text file (*.txt) | *.txt"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:183
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:190
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:200
+msgid "File couldn't be stored "
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogs.cpp:210
+msgid "Could not write to file"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:21
+msgid "Save log..."
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:26
+msgid "Clear log"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:34
+msgid "Log"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:72
+msgid "Clear"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.cpp:126
+msgid "LogText"
+msgstr ""
+
+#: ..\../main/gui/login/dialogologin.cpp:50
+msgid "The username or password is incorrect"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:250
+msgid "Tasks"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:524
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1107
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1139
+msgid "Included in the history ..."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "There is no URL to check updates on the current configuration."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:533
+msgid "Check update error"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1072
+msgid ""
+"Semantic/Sintactic error parsing integration URL (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1174
+msgid "Malformed XML"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1192
+msgid "Error in interpreting the parameters of the command line. ("
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1212
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1216
+msgid ""
+"Semantic/Sintactic error parsing integration XML (see log for details):\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1220
+msgid "Error parsing integration XML:\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1224
+msgid "PACS error:\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1228
+msgid "Error executing WorkFlow\n"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1232
+msgid ""
+"Error executing WorkFlow\n"
+"Internal Error"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1270
+msgid "Close current view"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1271
+msgid "Close all views"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "&Exit"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1272
+msgid "Exit application"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Full screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1301
+msgid "Show full screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1302
+msgid "Tab grouping"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1329
+msgid "Ginkgo CADx manual ..."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1330
+msgid "Open test card"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for updates"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1331
+msgid "Check for newest versions"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1332
+msgid "Need support ..."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1333
+msgid "About "
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:71
+msgid "HL7 monitor"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1371
+msgid "HL7 message control"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:73
+msgid "Log monitor"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1372
+msgid "Log monitored"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1390
+msgid "&File"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1393
+msgid "&Edit"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1397
+#: ..\../wx/thumbnailctrl/thumbnailwidget.cpp:148
+msgid "&Help"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1444
+msgid "Error loading history, Ginkgo CADx will be closed"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1458
+msgid "Mosaic"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1662
+msgid "Would you like to save the changes in the study:"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1664
+msgid "Unsaved data"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid ""
+"Errors have occurred when saving the series.\n"
+"Would you like to continue closing? "
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1672
+msgid "Error saving"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "Full Screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1705
+msgid "View Full Screen"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1708
+msgid "Tab Regroup"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1709
+msgid "&Close"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "&Close all"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1710
+msgid "Close all windows"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1728
+msgid "Tabbed organization"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "There is not newest Ginkgo CADx versions at this moment."
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1768
+msgid "Ginkgo CADx updated"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1782
+msgid "New version available ("
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipal.cpp:1945
+msgid "Internal error during auth process"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:29
+msgid "New Update"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:34
+msgid "New version available"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:40
+msgid "Do not warn me again about this update"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:43
+msgid "X"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:45
+msgid "Close this notification"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:104
+msgid "The following commands will be aborted if you close the application"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:131
+msgid "Close Ginkgo CADx"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:132
+msgid "Closes the application and aborts pending commands"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:138
+msgid "Do not close the application and keep commands running"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:193
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:138
+msgid "User login"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:202
+msgid "System authentication"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.cpp:260
+msgid "Login"
+msgstr ""
+
+#: ..\../main/gui/open/abrir.cpp:80 ..\../main/gui/open/abrir.cpp:82
+msgid "Open..."
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:58
+msgid "There was an error reading DICOMDIR file"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:62
+msgid "Select a valid DICOMDIR file"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:134
+msgid "Select dicom dir files you want to acquire"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogs.cpp:180
+#: ..\../main/gui/open/opendialogsbase.cpp:170
+#: ..\../main/gui/open/opendialogsbase.h:112
+msgid "Copy or link"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:22
+#: ..\../main/gui/open/opendialogsbase.h:58
+msgid "Acquire from DICOM Dir"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:94
+#: ..\../main/gui/open/opendialogsbase.h:85
+msgid "Select drive"
+msgstr ""
+
+#: ..\../main/gui/open/opendialogsbase.cpp:175
+msgid "Do you want to copy or link files?"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:45
+#: ..\../main/gui/selectpacsserver/selectpacsserver.cpp:30
+msgid "There aren't any PACS configured"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialog.cpp:69
+msgid "0000/00/00 00:00:00"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:27
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.h:57
+msgid "Upload study"
+msgstr ""
+
+#: ..\../main/gui/pacsupload/pacsuploaddialogbase.cpp:35
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:32
+msgid "Select PACS server"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:119
+msgid "Metadata"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:120
+msgid "Identification information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:121
+msgid "Patient information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:122
+msgid "Acquisition information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:123
+msgid "Relationship information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:124
+msgid "Image presentation information"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:125 ..\../widgets/wtextbox.cpp:525
+msgid "Text"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:126
+msgid "Other"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltags.cpp:137
+#: ..\../main/gui/paneltags/paneltags.cpp:173
+msgid "Data"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanel.cpp:47
+msgid "Hide"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:26
+msgid "javi"
+msgstr ""
+
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:187
+#: ..\../main/gui/previewpanel/previewpanelbase.cpp:207
+msgid "Previews"
+msgstr ""
+
+#: ..\../main/gui/progress/progresobase.cpp:23
+msgid "There is no running tasks"
+msgstr ""
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:165
+msgid "0 running tasks."
+msgstr ""
+
+#: ..\../main/gui/progress/statusbarprogreso.cpp:192
+#, c-format
+msgid "There are %d pending tasks"
+msgstr ""
+
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.cpp:27
+#: ..\../main/gui/selectpacsserver/selectpacsserverbase.h:55
+msgid "Select PACS"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:29
+msgid "http://ginkgo-cadx.com"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:40
+msgid "No suitable for diagnostic usage. Please consider upgrade to"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:47
+msgid "Ginkgo CADx Pro"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:55
+msgid ""
+"Remember that when you buy Ginkgo CADx Pro, you are contributing to "
+"development efforts"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:67
+msgid "Powered by"
+msgstr ""
+
+#: ..\../main/gui/startup/startupformbase.cpp:71
+msgid "MetaEmotion Healthcare"
+msgstr ""
+
+#: ..\../main/gui/startup/startupview.cpp:144
+msgid "Start page"
+msgstr ""
+
+#: ..\../main/managers/widgetsmanager.cpp:1079
+msgid "Delete Widget"
+msgstr ""
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Properties ..."
+msgstr ""
+
+#: ..\../main/managers/widgetsmanager.cpp:1090
+msgid "Widget Properties"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:114
+msgid "Open file"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:115
+#: ..\../main/tools/openfoldertool.cpp:27
+msgid "Open folder"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:116
+#: ..\../main/tools/openremovabletool.cpp:28
+msgid "Open removable unit"
+msgstr ""
+
+#: ..\../main/tools/addfiletohistorytool.cpp:117
+#: ..\../main/tools/openginkgocloudlinktool.cpp:27
+msgid "Open Ginkgo Cloud link"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:133
+msgid "Normal Angle (3 points)"
+msgstr ""
+
+#: ..\../main/tools/angletool.cpp:134
+msgid "Cobb Angle (2 straight lines)"
+msgstr ""
+
+#: ..\../main/tools/colormaptool.cpp:110
+msgid "Invert color map"
+msgstr ""
+
+#: ..\../main/tools/cornerannotationstool.cpp:44
+msgid "Hide corner annotations"
+msgstr ""
+
+#: ..\../main/tools/cornerannotationstool.cpp:46
+msgid "Show corner annotations"
+msgstr ""
+
+#: ..\../main/tools/detachwindowtool.cpp:42
+msgid "Attach View"
+msgstr ""
+
+#: ..\../main/tools/detachwindowtool.cpp:44
+msgid "Detach view"
+msgstr ""
+
+#: ..\../main/tools/dicomizetool.cpp:28
+msgid "Dicomize files"
+msgstr ""
+
+#: ..\../main/tools/exportdicomdirtool.cpp:32
+msgid "Export to DICOM Dir"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:171
+msgid "Point"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:172
+msgid "Arrow"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:173
+msgid "Ellipse"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:174
+msgid "Trapezoid"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:175
+msgid "Polygon"
+msgstr ""
+
+#: ..\../main/tools/markertool.cpp:176
+msgid "Free form"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:57
+msgid "Grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:67
+msgid "Grid Scale"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:74
+msgid "Scale X"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:78
+msgid "X axis scale"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:87
+msgid "Scale Y"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:91
+msgid "Y axis scale"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:206
+msgid "Show grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid ..."
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:207
+msgid "Configure Grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:250
+msgid "Hide Grid"
+msgstr ""
+
+#: ..\../main/tools/metricgridtool.cpp:252
+msgid "Show Grid"
+msgstr ""
+
+#: ..\../main/tools/openfiletool.cpp:28
+msgid "Open File"
+msgstr ""
+
+#: ..\../main/tools/pacsuploadtool.cpp:54
+msgid "Send to PACS..."
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:59
+msgid "Unset pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/pixelsbluringtool.cpp:61
+msgid "Set pixels blurring"
+msgstr ""
+
+#: ..\../main/tools/queryretrievehistorytool.cpp:25
+msgid "PACS Q/R"
+msgstr ""
+
+#: ..\../main/tools/queryretrievetool.cpp:94
+#: ..\../main/tools/searchginkgocloudhistorytool.cpp:28
+msgid "Search Ginkgo Cloud"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:151
+msgid "Undo rotate and flip"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "Rotate 90"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:153
+msgid "counter-clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:154
+msgid "clockwise"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:156
+msgid "Flip horizontal"
+msgstr ""
+
+#: ..\../main/tools/rotateandfliptool.cpp:157
+msgid "Flip vertical"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:34
+msgid "Send to PACS"
+msgstr ""
+
+#: ..\../main/tools/sendpacstool.cpp:70
+msgid "Sending to PACS..."
+msgstr ""
+
+#: ..\../main/tools/showtagstool.cpp:42
+msgid "Hide DICOM inspector"
+msgstr ""
+
+#: ..\../main/tools/showtagstool.cpp:44
+msgid "Show DICOM inspector"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:119
+msgid "Image printing"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:224
+msgid "Page setup"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:225
+msgid "Print preview"
+msgstr ""
+
+#: ..\../main/tools/simpleprinttool.cpp:272
+msgid "Print image"
+msgstr ""
+
+#: ..\../main/tools/toolwindowlevel.cpp:202
+msgid "Auto calculate"
+msgstr ""
+
+#: ..\../main/tools/toolzoom.cpp:182
+msgid "Reset size to display resolution"
+msgstr ""
+
+#: ..\../main/tools/undotool.cpp:110
+msgid "Redo"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:150
+msgid "Disable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:153
+msgid "Enable loop"
+msgstr ""
+
+#: ..\../main/tools/videotool.cpp:162
+#, c-format
+msgid "%.1f fps"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:267
+msgid "Add column"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:268
+msgid "Add row"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:270
+msgid "Remove column"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:271
+msgid "Remove row"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:276
+msgid "1x1 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:277
+msgid "1x2 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:278
+msgid "2x1 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:279
+msgid "2x2 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:280
+msgid "3x3 Layout"
+msgstr ""
+
+#: ..\../main/tools/windowlayouttool.cpp:281
+msgid "4x4 Layout"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:63
+msgid "Module tool still registered when disposing ToolsRegistry"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:82
+msgid "The tool is already registered"
+msgstr ""
+
+#: ..\../main/toolsystem/toolsregistry.cpp:187
+msgid "The module "
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:49
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:56
+msgid "Unable to load PNG image resource"
+msgstr ""
+
+#: ..\../resources/ginkgoresourcesmanager.cpp:63
+msgid "Unable to load GIF animation resource"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:205
+msgid "The calibration value must be a decimal number"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:209
+msgid "Calibration value is too low"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:219
+msgid "Enter the calibration value"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:225
+msgid "The calibration value is too low"
+msgstr ""
+
+#: ..\../widgets/gui/calibracion.cpp:229
+msgid "The calibration value is too high"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:34
+msgid "Calibrating..."
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:47
+msgid "Real Measure"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:52
+msgid "Distance"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Microns"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Milimeters"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Centimeters"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.cpp:59
+msgid "Meters"
+msgstr ""
+
+#: ..\../widgets/gui/selecciontextobase.cpp:26
+msgid "Note"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1101 ..\../widgets/wangulo.cpp:1103
+msgid "Type"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1101
+msgid "Normal"
+msgstr ""
+
+#: ..\../widgets/wangulo.cpp:1103
+msgid "Cobb"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:721 ..\../widgets/wfreeform.cpp:470
+#: ..\../widgets/wpolygon.cpp:574
+msgid "Center (I)"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:727 ..\../widgets/wfreeform.cpp:476
+#: ..\../widgets/wpolygon.cpp:580
+msgid "Center (M)"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:762 ..\../widgets/welipse.cpp:766
+msgid "Greater Radius"
+msgstr ""
+
+#: ..\../widgets/welipse.cpp:763 ..\../widgets/welipse.cpp:767
+msgid "Lower Radius"
+msgstr ""
+
+#: ..\../widgets/wfreeform.cpp:482 ..\../widgets/wpolygon.cpp:586
+msgid "Number of Vertex"
+msgstr ""
+
+#: ..\../widgets/wpunto.cpp:353
+msgid "Position (I)"
+msgstr ""
+
+#: ..\../widgets/wpunto.cpp:358
+msgid "Position (M)"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:558
+msgid "Image Calibration"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:663
+msgid "Length"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:668
+msgid "Points (I)"
+msgstr ""
+
+#: ..\../widgets/wrule.cpp:675
+msgid "Points (M)"
+msgstr ""
+
+#: ..\../widgets/wtextbox.cpp:445
+msgid "Default text"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:41
+msgid "Commit date"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:80
+msgid "UNKNOW"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:86
+msgid "<unknown ID>"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:115
+msgid "%m/%d/%Y"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:214
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:124
+msgid "Commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:219
+msgid "Modified"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebase.cpp:225
+msgid "Not commited"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:42
+msgid "NAME SURNAME SECOND_SURNAME"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:52
+msgid "644654645"
+msgstr ""
+
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:109
+#: ..\../wx/gnkinforme/gnkinformebasewx.cpp:130
+msgid "Commit inform"
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedades.cpp:30
+msgid "Properties of "
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedadesbase.cpp:31
+msgid "Widget's Name"
+msgstr ""
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:54
+msgid "< &Previous"
+msgstr ""
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.cpp:64
+msgid "&Cancel"
+msgstr ""
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3701
+msgid "Regular expression invalid: '"
+msgstr ""
+
+#: ..\../wx/wxsqlite3/wxsqlite3.cpp:3706
+#, c-format
+msgid "REGEXP called with wrong number of arguments: %d instead of 2."
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:700
+msgid "Logical error: Study not associated with existent patient in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:728
+msgid "Logical error: Serie not associated with existent study in model"
+msgstr ""
+
+#: ..\../api/dicom/imodelodicom.h:757
+msgid "Logical error: Image not associated with existent serie in model"
+msgstr ""
+
+#: ..\../commands/dialogopathssobreescribirbase.h:56
+msgid "Overwrite Paths"
+msgstr ""
+
+#: ..\../ginkgopro/ginkgo_pro_defines.h:21
+msgid "Professional DICOM CADx environment"
+msgstr ""
+
+#: ..\../main/controllers/dcmtk/dicomservers.h:39
+msgid "Server not found"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:99
+msgid "DICOM Query/Retrieve"
+msgstr ""
+
+#: ..\../main/gui/acquisition/dialogoadquisicionbase.h:123
+msgid "Not found"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:418
+msgid "Advanced Settings"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:570
+msgid "Edit profile"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:665
+msgid "Add/Edit Location"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:784
+msgid "Add window/level"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1079
+msgid "Add tag"
+msgstr ""
+
+#: ..\../main/gui/configuration/panelesconfiguracionginkgobase.h:1099
+msgid "Setup window position"
+msgstr ""
+
+#: ..\../main/gui/countdownmessage/countdownmessagebase.h:61
+msgid "Closing"
+msgstr ""
+
+#: ..\../main/gui/dicomdirmigration/dicomdirmigrationbase.h:66
+msgid "DICOM Dir configuration"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:70
+msgid "Open Ginkgo Cloud"
+msgstr ""
+
+#: ..\../main/gui/ginkgocloud/downloadcloudbase.h:123
+msgid "Ginkgo Cloud search"
+msgstr ""
+
+#: ..\../main/gui/history3/confirmdeletedialog.h:24
+msgid " from History?"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.h:100
+msgid "Medical history"
+msgstr ""
+
+#: ..\../main/gui/history3/historypanel3base.h:161
+msgid "Open With ..."
+msgstr ""
+
+#: ..\../main/gui/history3/openwithdialog.h:72
+msgid "Select a View"
+msgstr ""
+
+#: ..\../main/gui/hl7controlwindow/ventanacontrolhl7base.h:100
+msgid "Message detail"
+msgstr ""
+
+#: ..\../main/gui/logcontrolwindow/ventanacontrollogsbase.h:93
+msgid "Log node"
+msgstr ""
+
+#: ..\../main/gui/mainwindow/ventanaprincipalbase.h:87
+msgid "Closing Ginkgo CADx"
+msgstr ""
+
+#: ..\../main/gui/paneltags/paneltagsbase.h:57
+msgid "DICOM Inspector"
+msgstr ""
+
+#: ..\../main/license.h:31
+msgid "Open Source DICOM CADx environment"
+msgstr ""
+
+#: ..\../widgets/gui/calibracionbase.h:65
+msgid "Calibration"
+msgstr ""
+
+#: ..\../wx/propiedades/wxpropiedadesbase.h:62
+msgid "Properties of ..."
+msgstr ""
+
+#: ..\../wx/thumbnailctrl/thumbnailwidget.h:44
+msgid "Image Browser Dialog"
+msgstr ""
+
+#: ..\../wx/wizardginkgo/wxwizardginkgobasewx.h:60
+msgid "Test title"
+msgstr ""
diff --git a/cadxcore/lang/zh_CN/wxstd.mo b/cadxcore/lang/zh_CN/wxstd.mo
new file mode 100644
index 0000000..bb501de
Binary files /dev/null and b/cadxcore/lang/zh_CN/wxstd.mo differ
diff --git a/cadxcore/lang/zh_CN/wxstd.po b/cadxcore/lang/zh_CN/wxstd.po
new file mode 100644
index 0000000..417f4e9
--- /dev/null
+++ b/cadxcore/lang/zh_CN/wxstd.po
@@ -0,0 +1,8912 @@
+# Simplified Chinese Messages for wxWidgets
+# Copyright (C) 2005 Free Software Foundation, Inc.
+# This file is distributed under the same license as the wxWidgets package.
+# mrfx <mrfx at fm365.com>
+# Liu Xiao Xi <liouxiao at hotmail.com>, 2005
+# Jiawei Huang <hjiawei at gmail.com>, 2011
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: wxWidgets 3.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2013-10-01 19:04+0200\n"
+"PO-Revision-Date: 2013-09-27 10:30-0800\n"
+"Last-Translator: Jiawei Huang <hjiawei at gmail.com>\n"
+"Language-Team: wxWidgets tranlators <wx-translators at wxwidgets.org>\n"
+"Language: zh_CN\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=1; plural=0;\n"
+"X-Generator: Poedit 1.5.7\n"
+
+#: ../src/common/debugrpt.cpp:591
+msgid ""
+"\n"
+"Please send this report to the program maintainer, thank you!\n"
+msgstr ""
+"\n"
+"请将报告发送给程序维护人员,谢谢!\n"
+
+#: ../src/richtext/richtextstyledlg.cpp:210
+#: ../src/richtext/richtextstyledlg.cpp:222
+msgid " "
+msgstr " "
+
+#: ../src/generic/dbgrptg.cpp:326
+msgid "              Thank you and we're sorry for the inconvenience!\n"
+msgstr "              谢谢,我们对您遇到的不便表示抱歉!\n"
+
+#: ../src/common/prntbase.cpp:546
+#, c-format
+msgid " (copy %d of %d)"
+msgstr "(复制 %d / %d)"
+
+#: ../src/common/log.cpp:425
+#, c-format
+msgid " (error %ld: %s)"
+msgstr " (错误 %ld: %s)"
+
+#: ../src/common/imagtiff.cpp:75
+#, c-format
+msgid " (in module \"%s\")"
+msgstr " (于模块: \"%s\")"
+
+#: ../src/common/docview.cpp:1624
+msgid " - "
+msgstr " - "
+
+#: ../src/richtext/richtextprint.cpp:588 ../src/html/htmprint.cpp:704
+msgid " Preview"
+msgstr " 预览"
+
+#: ../src/common/fontcmn.cpp:811
+msgid " bold"
+msgstr " 粗体"
+
+#: ../src/common/fontcmn.cpp:827
+msgid " italic"
+msgstr " 斜体"
+
+#: ../src/common/fontcmn.cpp:807
+msgid " light"
+msgstr " 细体"
+
+#: ../src/common/paper.cpp:118
+msgid "#10 Envelope, 4 1/8 x 9 1/2 in"
+msgstr "#10 信封,4 1/8 x 9 1/2 英寸"
+
+#: ../src/common/paper.cpp:119
+msgid "#11 Envelope, 4 1/2 x 10 3/8 in"
+msgstr "#11 信封,4 1/2 x 10 3/8 英寸"
+
+#: ../src/common/paper.cpp:120
+msgid "#12 Envelope, 4 3/4 x 11 in"
+msgstr "#12 信封,4 3/4 x 11 英寸"
+
+#: ../src/common/paper.cpp:121
+msgid "#14 Envelope, 5 x 11 1/2 in"
+msgstr "#14 信封,5 x 11 1/2 英寸"
+
+#: ../src/common/paper.cpp:117
+msgid "#9 Envelope, 3 7/8 x 8 7/8 in"
+msgstr "#9 信封,3 7/8 x 8 7/8 英寸"
+
+#: ../src/html/helpwnd.cpp:1044
+#, c-format
+msgid "%d of %lu"
+msgstr "%d / %lu"
+
+#: ../src/html/helpwnd.cpp:1681 ../src/html/helpwnd.cpp:1719
+#, c-format
+msgid "%i of %i"
+msgstr "%i / %i"
+
+#: ../src/generic/filectrlg.cpp:315
+#, c-format
+msgid "%ld byte"
+msgid_plural "%ld bytes"
+msgstr[0] "%ld 字节"
+
+#: ../src/html/helpwnd.cpp:1046
+#, c-format
+msgid "%lu of %lu"
+msgstr "%lu / %lu"
+
+#: ../src/common/cmdline.cpp:1050
+#, c-format
+msgid "%s (or %s)"
+msgstr "%s (或 %s)"
+
+#: ../src/generic/logg.cpp:230
+#, c-format
+msgid "%s Error"
+msgstr "%s 错误"
+
+#: ../src/generic/logg.cpp:242
+#, c-format
+msgid "%s Information"
+msgstr "%s 信息"
+
+#: ../src/generic/preferencesg.cpp:110
+#, c-format
+msgid "%s Preferences"
+msgstr "%s 偏好设置"
+
+#: ../src/generic/logg.cpp:234
+#, c-format
+msgid "%s Warning"
+msgstr "%s 警告"
+
+#: ../src/common/tarstrm.cpp:1319
+#, c-format
+msgid "%s did not fit the tar header for entry '%s'"
+msgstr "%s 不符合tar项目 '%s' 的标头"
+
+#: ../src/common/fldlgcmn.cpp:106
+#, c-format
+msgid "%s files (%s)|%s"
+msgstr "%s 文件 (%s)|%s"
+
+#: ../src/common/stockitem.cpp:139 ../src/html/helpfrm.cpp:142
+#: ../src/html/helpfrm.cpp:144
+msgid "&About"
+msgstr "关于(&A)"
+
+#: ../src/common/stockitem.cpp:207
+msgid "&Actual Size"
+msgstr "实际大小(&A)"
+
+#: ../src/richtext/richtextindentspage.cpp:262
+msgid "&After a paragraph:"
+msgstr "段落之后(&A):"
+
+#: ../src/richtext/richtextindentspage.cpp:128
+#: ../src/richtext/richtextliststylepage.cpp:319
+msgid "&Alignment"
+msgstr "对齐(&A)"
+
+#: ../src/common/stockitem.cpp:141
+msgid "&Apply"
+msgstr "应用(&A)"
+
+#: ../src/richtext/richtextstyledlg.cpp:251
+msgid "&Apply Style"
+msgstr "应用样式(&A)"
+
+#: ../src/msw/mdi.cpp:175
+msgid "&Arrange Icons"
+msgstr "重排图标(&A)"
+
+#: ../src/common/stockitem.cpp:195
+msgid "&Ascending"
+msgstr "递增(&A)"
+
+#: ../src/common/stockitem.cpp:142
+msgid "&Back"
+msgstr "返回(&B)"
+
+#: ../src/richtext/richtextstylepage.cpp:113
+msgid "&Based on:"
+msgstr "基于(&B):"
+
+#: ../src/richtext/richtextindentspage.cpp:253
+msgid "&Before a paragraph:"
+msgstr "段落之前(&B):"
+
+#: ../src/richtext/richtextfontpage.cpp:271
+msgid "&Bg colour:"
+msgstr "背景颜色(&B):"
+
+#: ../src/common/stockitem.cpp:143
+msgid "&Bold"
+msgstr "粗体(&B)"
+
+#: ../src/common/stockitem.cpp:144
+msgid "&Bottom"
+msgstr "底端(&B)"
+
+#: ../src/richtext/richtextborderspage.cpp:359
+#: ../src/richtext/richtextborderspage.cpp:503
+#: ../src/richtext/richtextmarginspage.cpp:260
+#: ../src/richtext/richtextmarginspage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:637
+#: ../src/richtext/richtextsizepage.cpp:644
+msgid "&Bottom:"
+msgstr "底端(&B):"
+
+#: ../include/wx/richtext/richtextbuffer.h:3530
+#, fuzzy
+msgid "&Box"
+msgstr "粗体(&B)"
+
+#: ../src/richtext/richtextliststylepage.cpp:210
+#: ../src/richtext/richtextbulletspage.cpp:159
+msgid "&Bullet style:"
+msgstr "项目符号样式(&B):"
+
+#: ../src/common/stockitem.cpp:146
+msgid "&CD-Rom"
+msgstr "CD 光驱(&C)"
+
+#: ../src/generic/wizard.cpp:432 ../src/generic/fontdlgg.cpp:470
+#: ../src/generic/fontdlgg.cpp:489 ../src/osx/carbon/fontdlg.cpp:588
+#: ../src/common/stockitem.cpp:145
+msgid "&Cancel"
+msgstr "取消(&C)"
+
+#: ../src/msw/mdi.cpp:171
+msgid "&Cascade"
+msgstr "层叠(&C)"
+
+#: ../include/wx/richtext/richtextbuffer.h:5587
+#, fuzzy
+msgid "&Cell"
+msgstr "取消(&C)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:439
+msgid "&Character code:"
+msgstr "字符编码(&C):"
+
+#: ../src/common/stockitem.cpp:147
+msgid "&Clear"
+msgstr "清除(&C)"
+
+#: ../src/generic/logg.cpp:522 ../src/common/stockitem.cpp:148
+#: ../src/common/prntbase.cpp:1570 ../src/univ/themes/win32.cpp:3756
+#: ../src/html/helpfrm.cpp:139
+msgid "&Close"
+msgstr "关闭(&C)"
+
+#: ../src/common/stockitem.cpp:193
+msgid "&Color"
+msgstr "颜色(&C)"
+
+#: ../src/richtext/richtextfontpage.cpp:258
+msgid "&Colour:"
+msgstr "颜色(&C):"
+
+#: ../src/common/stockitem.cpp:149
+msgid "&Convert"
+msgstr "转换(&C)"
+
+#: ../src/richtext/richtextctrl.cpp:326 ../src/osx/textctrl_osx.cpp:583
+#: ../src/common/stockitem.cpp:150 ../src/msw/textctrl.cpp:2284
+msgid "&Copy"
+msgstr "复制(&C)"
+
+#: ../src/generic/hyperlinkg.cpp:156
+msgid "&Copy URL"
+msgstr "复制 URL(&C)"
+
+#: ../src/common/headerctrlcmn.cpp:328
+msgid "&Customize..."
+msgstr "自定义(&C)..."
+
+#: ../src/generic/dbgrptg.cpp:334
+msgid "&Debug report preview:"
+msgstr "调试报告预览(&D): "
+
+#: ../src/richtext/richtexttabspage.cpp:142
+#: ../src/richtext/richtextctrl.cpp:328 ../src/osx/textctrl_osx.cpp:585
+#: ../src/common/stockitem.cpp:152 ../src/msw/textctrl.cpp:2286
+msgid "&Delete"
+msgstr "删除(&D)"
+
+#: ../src/richtext/richtextstyledlg.cpp:269
+msgid "&Delete Style..."
+msgstr "删除样式(&D)..."
+
+#: ../src/common/stockitem.cpp:196
+msgid "&Descending"
+msgstr "递减(&D)"
+
+#: ../src/generic/logg.cpp:688
+msgid "&Details"
+msgstr "细节(&D)"
+
+#: ../src/common/stockitem.cpp:153
+msgid "&Down"
+msgstr "向下(&D)"
+
+#: ../src/common/stockitem.cpp:154
+msgid "&Edit"
+msgstr "编辑(&E)"
+
+#: ../src/richtext/richtextstyledlg.cpp:263
+msgid "&Edit Style..."
+msgstr "编辑样式(&E)..."
+
+#: ../src/common/stockitem.cpp:155
+msgid "&Execute"
+msgstr "执行(&E)"
+
+#: ../src/common/stockitem.cpp:157 ../src/html/helpfrm.cpp:146
+msgid "&File"
+msgstr "文件(&F)"
+
+#: ../src/common/stockitem.cpp:158
+msgid "&Find"
+msgstr "查找(&F)"
+
+#: ../src/generic/wizard.cpp:626
+msgid "&Finish"
+msgstr "完成(&F)"
+
+#: ../src/common/stockitem.cpp:159
+msgid "&First"
+msgstr "最前(&F)"
+
+#: ../src/richtext/richtextsizepage.cpp:244
+msgid "&Floating mode:"
+msgstr "浮动模式(&F):"
+
+#: ../src/common/stockitem.cpp:160
+msgid "&Floppy"
+msgstr "软盘(&F)"
+
+#: ../src/common/stockitem.cpp:194
+msgid "&Font"
+msgstr "字体(&F)"
+
+#: ../src/generic/fontdlgg.cpp:371
+msgid "&Font family:"
+msgstr "字体(&F):"
+
+#: ../src/richtext/richtextliststylepage.cpp:194
+msgid "&Font for Level..."
+msgstr "层级字体(&F)..."
+
+#: ../src/richtext/richtextfontpage.cpp:156
+#: ../src/richtext/richtextsymboldlg.cpp:400
+msgid "&Font:"
+msgstr "字体(&F):"
+
+#: ../src/common/stockitem.cpp:161
+msgid "&Forward"
+msgstr "前进(&F)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:451
+msgid "&From:"
+msgstr "从(&F):"
+
+#: ../src/common/stockitem.cpp:162
+msgid "&Harddisk"
+msgstr "硬盘(&H)"
+
+#: ../src/richtext/richtextsizepage.cpp:351
+#: ../src/richtext/richtextsizepage.cpp:358
+msgid "&Height:"
+msgstr "高度(&H):"
+
+#: ../src/generic/wizard.cpp:435 ../src/richtext/richtextstyledlg.cpp:303
+#: ../src/richtext/richtextsymboldlg.cpp:479 ../src/osx/menu_osx.cpp:785
+#: ../src/common/stockitem.cpp:163 ../src/html/helpfrm.cpp:147
+msgid "&Help"
+msgstr "帮助(&H)"
+
+#: ../include/wx/richmsgdlg.h:30
+msgid "&Hide details"
+msgstr "隐藏细节(&H)"
+
+#: ../src/common/stockitem.cpp:164
+msgid "&Home"
+msgstr "Home(&H)"
+
+#: ../src/richtext/richtextindentspage.cpp:184
+#: ../src/richtext/richtextliststylepage.cpp:372
+msgid "&Indentation (tenths of a mm)"
+msgstr "缩进(&I) (十分之一毫米)"
+
+#: ../src/richtext/richtextindentspage.cpp:167
+#: ../src/richtext/richtextliststylepage.cpp:356
+#, fuzzy
+msgid "&Indeterminate"
+msgstr "下划线(&U)"
+
+#: ../src/common/stockitem.cpp:166
+msgid "&Index"
+msgstr "索引(&I)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "&Info"
+msgstr "信息(&I)"
+
+#: ../src/common/stockitem.cpp:168
+msgid "&Italic"
+msgstr "斜体(&I)"
+
+#: ../src/common/stockitem.cpp:169
+msgid "&Jump to"
+msgstr "跳转到(&J)"
+
+#: ../src/richtext/richtextindentspage.cpp:153
+#: ../src/richtext/richtextliststylepage.cpp:342
+msgid "&Justified"
+msgstr "分散对齐(&J)"
+
+#: ../src/common/stockitem.cpp:174
+msgid "&Last"
+msgstr "最后(&L)"
+
+#: ../src/richtext/richtextindentspage.cpp:139
+#: ../src/richtext/richtextliststylepage.cpp:328
+msgid "&Left"
+msgstr "左(&L)"
+
+#: ../src/richtext/richtextindentspage.cpp:195
+#: ../src/richtext/richtextborderspage.cpp:269
+#: ../src/richtext/richtextborderspage.cpp:413
+#: ../src/richtext/richtextliststylepage.cpp:381
+#: ../src/richtext/richtextmarginspage.cpp:187
+#: ../src/richtext/richtextmarginspage.cpp:301
+#: ../src/richtext/richtextsizepage.cpp:532
+#: ../src/richtext/richtextsizepage.cpp:539
+msgid "&Left:"
+msgstr "左(&L):"
+
+#: ../src/richtext/richtextliststylepage.cpp:183
+msgid "&List level:"
+msgstr "列表层级(&L):"
+
+#: ../src/generic/logg.cpp:523
+msgid "&Log"
+msgstr "日志(&L)"
+
+#: ../src/univ/themes/win32.cpp:3748
+msgid "&Move"
+msgstr "移动(&M)"
+
+#: ../src/richtext/richtextsizepage.cpp:672
+msgid "&Move the object to:"
+msgstr "移动对象至(&M):"
+
+#: ../src/common/stockitem.cpp:175
+msgid "&Network"
+msgstr "网络(&N)"
+
+#: ../src/richtext/richtexttabspage.cpp:136 ../src/common/stockitem.cpp:176
+msgid "&New"
+msgstr "新建(&N)"
+
+#: ../src/aui/tabmdi.cpp:111 ../src/generic/mdig.cpp:100
+#: ../src/msw/mdi.cpp:176
+msgid "&Next"
+msgstr "下一个(&N)"
+
+#: ../src/generic/wizard.cpp:431 ../src/generic/wizard.cpp:626
+msgid "&Next >"
+msgstr "下一个(&N) >"
+
+#: ../src/richtext/richtextsizepage.cpp:681
+msgid "&Next Paragraph"
+msgstr "下一段落(&N)"
+
+#: ../src/generic/tipdlg.cpp:276
+msgid "&Next Tip"
+msgstr "下一技巧(&N)"
+
+#: ../src/richtext/richtextstylepage.cpp:123
+msgid "&Next style:"
+msgstr "下一个样式(&N):"
+
+#: ../src/common/stockitem.cpp:177 ../src/msw/msgdlg.cpp:476
+msgid "&No"
+msgstr "否(&N)"
+
+#: ../src/generic/dbgrptg.cpp:356
+msgid "&Notes:"
+msgstr "注意(&N):"
+
+#: ../src/richtext/richtextbulletspage.cpp:264
+msgid "&Number:"
+msgstr "编号(&N):"
+
+#: ../src/generic/fontdlgg.cpp:475 ../src/generic/fontdlgg.cpp:482
+#: ../src/osx/carbon/fontdlg.cpp:594 ../src/common/stockitem.cpp:178
+msgid "&OK"
+msgstr "确认(&O)"
+
+#: ../src/generic/dbgrptg.cpp:342 ../src/common/stockitem.cpp:179
+#: ../src/html/helpfrm.cpp:137
+msgid "&Open..."
+msgstr "打开(&O)..."
+
+#: ../src/richtext/richtextindentspage.cpp:222
+msgid "&Outline level:"
+msgstr "大纲层级(&O):"
+
+#: ../src/richtext/richtextindentspage.cpp:293
+msgid "&Page Break"
+msgstr "断页符号(&P)"
+
+#: ../src/richtext/richtextctrl.cpp:327 ../src/osx/textctrl_osx.cpp:584
+#: ../src/common/stockitem.cpp:180 ../src/msw/textctrl.cpp:2285
+msgid "&Paste"
+msgstr "粘贴(&P)"
+
+#: ../include/wx/richtext/richtextbuffer.h:4655
+msgid "&Picture"
+msgstr "图片(&P)"
+
+#: ../src/generic/fontdlgg.cpp:422
+msgid "&Point size:"
+msgstr "字体大小(&P):"
+
+#: ../src/richtext/richtexttabspage.cpp:114
+msgid "&Position (tenths of a mm):"
+msgstr "位置(&P) (十分之一毫米)"
+
+#: ../src/richtext/richtextsizepage.cpp:514
+msgid "&Position mode:"
+msgstr "位置(&P)"
+
+#: ../src/common/stockitem.cpp:181
+msgid "&Preferences"
+msgstr "偏好设置(&P)"
+
+#: ../src/aui/tabmdi.cpp:112 ../src/generic/mdig.cpp:101
+#: ../src/msw/mdi.cpp:177
+msgid "&Previous"
+msgstr "前页(&P)"
+
+#: ../src/richtext/richtextsizepage.cpp:675
+msgid "&Previous Paragraph"
+msgstr "前一段落(&P)"
+
+#: ../src/common/stockitem.cpp:183
+msgid "&Print..."
+msgstr "打印(&P)..."
+
+#: ../src/richtext/richtextctrl.cpp:332 ../src/richtext/richtextctrl.cpp:4945
+#: ../src/common/stockitem.cpp:184
+msgid "&Properties"
+msgstr "属性(&P)"
+
+#: ../src/common/stockitem.cpp:156
+msgid "&Quit"
+msgstr "退出(&Q)"
+
+#: ../src/richtext/richtextctrl.cpp:323 ../src/osx/textctrl_osx.cpp:580
+#: ../src/common/stockitem.cpp:185 ../src/common/cmdproc.cpp:293
+#: ../src/common/cmdproc.cpp:300 ../src/msw/textctrl.cpp:2281
+msgid "&Redo"
+msgstr "恢复(&R)"
+
+#: ../src/common/cmdproc.cpp:289 ../src/common/cmdproc.cpp:309
+msgid "&Redo "
+msgstr "恢复(&R) "
+
+#: ../src/richtext/richtextstyledlg.cpp:257
+msgid "&Rename Style..."
+msgstr "重命名样式(&R)..."
+
+#: ../src/generic/fdrepdlg.cpp:179
+msgid "&Replace"
+msgstr "替换(&R)"
+
+#: ../src/richtext/richtextstyledlg.cpp:287
+msgid "&Restart numbering"
+msgstr "重新编号(&R)"
+
+#: ../src/univ/themes/win32.cpp:3747
+msgid "&Restore"
+msgstr "复原(&R)"
+
+#: ../src/richtext/richtextindentspage.cpp:146
+#: ../src/richtext/richtextliststylepage.cpp:335
+msgid "&Right"
+msgstr "右(&R)"
+
+#: ../src/richtext/richtextindentspage.cpp:213
+#: ../src/richtext/richtextborderspage.cpp:299
+#: ../src/richtext/richtextborderspage.cpp:443
+#: ../src/richtext/richtextliststylepage.cpp:399
+#: ../src/richtext/richtextmarginspage.cpp:212
+#: ../src/richtext/richtextmarginspage.cpp:326
+#: ../src/richtext/richtextsizepage.cpp:602
+#: ../src/richtext/richtextsizepage.cpp:609
+msgid "&Right:"
+msgstr "右(&R):"
+
+#: ../src/common/stockitem.cpp:190
+msgid "&Save"
+msgstr "保存(&S)"
+
+#: ../src/common/stockitem.cpp:191
+msgid "&Save as"
+msgstr "另存为(&S)"
+
+#: ../include/wx/richmsgdlg.h:29
+msgid "&See details"
+msgstr "查看细节(&S)"
+
+#: ../src/generic/tipdlg.cpp:270
+msgid "&Show tips at startup"
+msgstr "启动时显示技巧(&S)"
+
+#: ../src/univ/themes/win32.cpp:3750
+msgid "&Size"
+msgstr "大小(&S)"
+
+#: ../src/richtext/richtextfontpage.cpp:168
+msgid "&Size:"
+msgstr "大小(&S):"
+
+#: ../src/generic/progdlgg.cpp:282
+msgid "&Skip"
+msgstr "跳过(&S)"
+
+#: ../src/richtext/richtextindentspage.cpp:242
+#: ../src/richtext/richtextliststylepage.cpp:417
+msgid "&Spacing (tenths of a mm)"
+msgstr "间距(&S) (十分之一毫米)"
+
+#: ../src/common/stockitem.cpp:197
+msgid "&Spell Check"
+msgstr "拼写检查(&S)"
+
+#: ../src/common/stockitem.cpp:198
+msgid "&Stop"
+msgstr "停止(&S)"
+
+#: ../src/richtext/richtextfontpage.cpp:284 ../src/common/stockitem.cpp:199
+msgid "&Strikethrough"
+msgstr "删除线(&S)"
+
+#: ../src/generic/fontdlgg.cpp:382 ../src/richtext/richtextstylepage.cpp:104
+msgid "&Style:"
+msgstr "字体(&S):"
+
+#: ../src/richtext/richtextstyledlg.cpp:198
+msgid "&Styles:"
+msgstr "样式(&S):"
+
+#: ../src/richtext/richtextsymboldlg.cpp:413
+msgid "&Subset:"
+msgstr "子集(&S):"
+
+#: ../src/richtext/richtextliststylepage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:222
+msgid "&Symbol:"
+msgstr "符号(&S):"
+
+#: ../include/wx/richtext/richtextbuffer.h:5679
+msgid "&Table"
+msgstr "表格(&T)"
+
+#: ../src/common/stockitem.cpp:200
+msgid "&Top"
+msgstr "顶端(&T)"
+
+#: ../src/richtext/richtextborderspage.cpp:329
+#: ../src/richtext/richtextborderspage.cpp:473
+#: ../src/richtext/richtextmarginspage.cpp:235
+#: ../src/richtext/richtextmarginspage.cpp:349
+#: ../src/richtext/richtextsizepage.cpp:567
+#: ../src/richtext/richtextsizepage.cpp:574
+msgid "&Top:"
+msgstr "顶端(&T):"
+
+#: ../src/generic/fontdlgg.cpp:444 ../src/common/stockitem.cpp:202
+msgid "&Underline"
+msgstr "下划线(&U)"
+
+#: ../src/richtext/richtextfontpage.cpp:243
+msgid "&Underlining:"
+msgstr "下划线(&U)"
+
+#: ../src/richtext/richtextctrl.cpp:322 ../src/osx/textctrl_osx.cpp:579
+#: ../src/common/stockitem.cpp:203 ../src/common/cmdproc.cpp:271
+#: ../src/msw/textctrl.cpp:2280
+msgid "&Undo"
+msgstr "撤销(&U)"
+
+#: ../src/common/cmdproc.cpp:265
+msgid "&Undo "
+msgstr "撤销(&U) "
+
+#: ../src/common/stockitem.cpp:204
+msgid "&Unindent"
+msgstr "取消缩进(&U)"
+
+#: ../src/common/stockitem.cpp:205
+msgid "&Up"
+msgstr "向上(&U)"
+
+#: ../src/richtext/richtextsizepage.cpp:278
+msgid "&Vertical alignment:"
+msgstr "垂直对齐(&V)"
+
+#: ../src/generic/dbgrptg.cpp:340
+msgid "&View..."
+msgstr "查看(&V)..."
+
+#: ../src/generic/fontdlgg.cpp:393
+msgid "&Weight:"
+msgstr "字体粗细(&W):"
+
+#: ../src/richtext/richtextsizepage.cpp:317
+#: ../src/richtext/richtextsizepage.cpp:324
+msgid "&Width:"
+msgstr "宽度(&W):"
+
+#: ../src/aui/tabmdi.cpp:311 ../src/aui/tabmdi.cpp:327
+#: ../src/aui/tabmdi.cpp:329 ../src/generic/mdig.cpp:294
+#: ../src/generic/mdig.cpp:310 ../src/generic/mdig.cpp:314
+#: ../src/msw/mdi.cpp:77
+msgid "&Window"
+msgstr "窗口(&W)"
+
+#: ../src/common/stockitem.cpp:206 ../src/msw/msgdlg.cpp:476
+msgid "&Yes"
+msgstr "是(&Y)"
+
+#: ../src/common/config.cpp:523 ../src/msw/regconf.cpp:258
+#, c-format
+msgid "'%s' has extra '..', ignored."
+msgstr "'%s' 有额外的 '..',忽略之。"
+
+#: ../src/common/valtext.cpp:249 ../src/common/valtext.cpp:251
+#: ../src/common/valtext.cpp:253 ../src/common/valtext.cpp:255
+#, c-format
+msgid "'%s' is invalid"
+msgstr "'%s' 是无效的"
+
+#: ../src/common/cmdline.cpp:948 ../src/common/cmdline.cpp:966
+#, c-format
+msgid "'%s' is not a correct numeric value for option '%s'."
+msgstr "'%s' 不是匹配选项 '%s'的正确数字值。"
+
+#: ../src/common/translation.cpp:1086
+#, c-format
+msgid "'%s' is not a valid message catalog."
+msgstr "'%s' 不是有效的消息目录。"
+
+#: ../src/common/textbuf.cpp:239
+#, c-format
+msgid "'%s' is probably a binary buffer."
+msgstr "'%s' 或许是一个二进制文件。"
+
+#: ../src/common/valtext.cpp:247
+#, c-format
+msgid "'%s' should be numeric."
+msgstr "'%s' 应该是一个数值。"
+
+#: ../src/common/valtext.cpp:239
+#, c-format
+msgid "'%s' should only contain ASCII characters."
+msgstr "'%s' 应该仅包含ASCII字符。"
+
+#: ../src/common/valtext.cpp:241
+#, c-format
+msgid "'%s' should only contain alphabetic characters."
+msgstr "'%s' 应仅包含字母字符。"
+
+#: ../src/common/valtext.cpp:243
+#, c-format
+msgid "'%s' should only contain alphabetic or numeric characters."
+msgstr "'%s' 应仅包含字母或数字字符。"
+
+#: ../src/common/valtext.cpp:245
+#, c-format
+msgid "'%s' should only contain digits."
+msgstr "'%s' 应该仅包含数字。"
+
+#: ../src/richtext/richtextliststylepage.cpp:229
+#: ../src/richtext/richtextbulletspage.cpp:179
+msgid "(*)"
+msgstr "(*)"
+
+#: ../src/html/helpwnd.cpp:976
+msgid "(Help)"
+msgstr "(帮助)"
+
+#: ../src/richtext/richtextliststylepage.cpp:481
+#: ../src/richtext/richtextbulletspage.cpp:286
+msgid "(None)"
+msgstr "(无)"
+
+#: ../src/richtext/richtextsymboldlg.cpp:504
+msgid "(Normal text)"
+msgstr "(正常字体)"
+
+#: ../src/html/helpwnd.cpp:426 ../src/html/helpwnd.cpp:1119
+#: ../src/html/helpwnd.cpp:1745
+msgid "(bookmarks)"
+msgstr "(书签)"
+
+#: ../src/richtext/richtextindentspage.cpp:274
+#: ../src/richtext/richtextindentspage.cpp:286
+#: ../src/richtext/richtextindentspage.cpp:287
+#: ../src/richtext/richtextindentspage.cpp:311
+#: ../src/richtext/richtextindentspage.cpp:326
+#: ../src/richtext/richtextformatdlg.cpp:831
+#: ../src/richtext/richtextfontpage.cpp:331
+#: ../src/richtext/richtextfontpage.cpp:335
+#: ../src/richtext/richtextfontpage.cpp:339
+#: ../src/richtext/richtextliststylepage.cpp:448
+#: ../src/richtext/richtextliststylepage.cpp:460
+#: ../src/richtext/richtextliststylepage.cpp:461
+msgid "(none)"
+msgstr "(无)"
+
+#: ../src/richtext/richtextliststylepage.cpp:492
+#: ../src/richtext/richtextbulletspage.cpp:297
+msgid "*"
+msgstr "*"
+
+#: ../src/richtext/richtextliststylepage.cpp:236
+#: ../src/richtext/richtextbulletspage.cpp:186
+msgid "*)"
+msgstr "*)"
+
+#: ../src/richtext/richtextliststylepage.cpp:495
+#: ../src/richtext/richtextbulletspage.cpp:300
+msgid "+"
+msgstr "+"
+
+#: ../src/msw/utils.cpp:1324
+msgid ", 64-bit edition"
+msgstr ",64位版"
+
+#: ../src/richtext/richtextliststylepage.cpp:493
+#: ../src/richtext/richtextbulletspage.cpp:298
+msgid "-"
+msgstr "-"
+
+#: ../src/generic/filepickerg.cpp:66
+msgid "..."
+msgstr "..."
+
+#: ../src/richtext/richtextindentspage.cpp:276
+#: ../src/richtext/richtextliststylepage.cpp:450
+msgid "1.1"
+msgstr "1.1"
+
+#: ../src/richtext/richtextindentspage.cpp:277
+#: ../src/richtext/richtextliststylepage.cpp:451
+msgid "1.2"
+msgstr "1.2"
+
+#: ../src/richtext/richtextindentspage.cpp:278
+#: ../src/richtext/richtextliststylepage.cpp:452
+msgid "1.3"
+msgstr "1.3"
+
+#: ../src/richtext/richtextindentspage.cpp:279
+#: ../src/richtext/richtextliststylepage.cpp:453
+msgid "1.4"
+msgstr "1.4"
+
+#: ../src/richtext/richtextindentspage.cpp:280
+#: ../src/richtext/richtextliststylepage.cpp:454
+msgid "1.5"
+msgstr "1.5"
+
+#: ../src/richtext/richtextindentspage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:455
+msgid "1.6"
+msgstr "1.6"
+
+#: ../src/richtext/richtextindentspage.cpp:282
+#: ../src/richtext/richtextliststylepage.cpp:456
+msgid "1.7"
+msgstr "1.7"
+
+#: ../src/richtext/richtextindentspage.cpp:283
+#: ../src/richtext/richtextliststylepage.cpp:457
+msgid "1.8"
+msgstr "1.8"
+
+#: ../src/richtext/richtextindentspage.cpp:284
+#: ../src/richtext/richtextliststylepage.cpp:458
+msgid "1.9"
+msgstr "1.9"
+
+#: ../src/common/paper.cpp:141
+msgid "10 x 11 in"
+msgstr "10 x 11 英寸"
+
+#: ../src/common/paper.cpp:114
+msgid "10 x 14 in"
+msgstr "10 x 14 英寸"
+
+#: ../src/common/paper.cpp:115
+msgid "11 x 17 in"
+msgstr "11 x 17 英寸"
+
+#: ../src/common/paper.cpp:185
+msgid "12 x 11 in"
+msgstr "12 x 11 英寸"
+
+#: ../src/common/paper.cpp:142
+msgid "15 x 11 in"
+msgstr "15 x 11 英寸"
+
+#: ../src/richtext/richtextindentspage.cpp:285
+#: ../src/richtext/richtextliststylepage.cpp:459
+msgid "2"
+msgstr "2"
+
+#: ../src/common/paper.cpp:133
+msgid "6 3/4 Envelope, 3 5/8 x 6 1/2 in"
+msgstr "6 3/4 信封, 3 5/8 x 6 1/2 英寸"
+
+#: ../src/common/paper.cpp:140
+msgid "9 x 11 in"
+msgstr "9 x 11 英寸"
+
+#: ../src/html/htmprint.cpp:431
+msgid ": file does not exist!"
+msgstr ": 文件不存在!"
+
+#: ../src/common/fontmap.cpp:199
+msgid ": unknown charset"
+msgstr ": 未知字符集"
+
+#: ../src/common/fontmap.cpp:413
+msgid ": unknown encoding"
+msgstr ": 未知编码"
+
+#: ../src/generic/wizard.cpp:437
+msgid "< &Back"
+msgstr "< 返回(&B)"
+
+#: ../src/osx/carbon/fontdlg.cpp:608 ../src/osx/carbon/fontdlg.cpp:815
+#: ../src/osx/carbon/fontdlg.cpp:835
+msgid "<Any Decorative>"
+msgstr "<任意 Decorative>"
+
+#: ../src/osx/carbon/fontdlg.cpp:609 ../src/osx/carbon/fontdlg.cpp:817
+#: ../src/osx/carbon/fontdlg.cpp:837
+msgid "<Any Modern>"
+msgstr "<任意 Modern>"
+
+#: ../src/osx/carbon/fontdlg.cpp:607 ../src/osx/carbon/fontdlg.cpp:813
+#: ../src/osx/carbon/fontdlg.cpp:833
+msgid "<Any Roman>"
+msgstr "<任意 Roman>"
+
+#: ../src/osx/carbon/fontdlg.cpp:610 ../src/osx/carbon/fontdlg.cpp:819
+#: ../src/osx/carbon/fontdlg.cpp:839
+msgid "<Any Script>"
+msgstr "<任意 Script>"
+
+#: ../src/osx/carbon/fontdlg.cpp:611 ../src/osx/carbon/fontdlg.cpp:824
+#: ../src/osx/carbon/fontdlg.cpp:843
+msgid "<Any Swiss>"
+msgstr "<任意 Swiss>"
+
+#: ../src/osx/carbon/fontdlg.cpp:612 ../src/osx/carbon/fontdlg.cpp:821
+#: ../src/osx/carbon/fontdlg.cpp:841
+msgid "<Any Teletype>"
+msgstr "<任意 Teletype>"
+
+#: ../src/osx/carbon/fontdlg.cpp:606
+msgid "<Any>"
+msgstr "<任意>"
+
+#: ../src/generic/filectrlg.cpp:286 ../src/generic/filectrlg.cpp:309
+msgid "<DIR>"
+msgstr "<目录>"
+
+#: ../src/generic/filectrlg.cpp:290 ../src/generic/filectrlg.cpp:313
+msgid "<DRIVE>"
+msgstr "<盘符>"
+
+#: ../src/generic/filectrlg.cpp:288 ../src/generic/filectrlg.cpp:311
+msgid "<LINK>"
+msgstr "<连接>"
+
+#: ../src/html/helpwnd.cpp:1279
+msgid "<b><i>Bold italic face.</i></b><br>"
+msgstr "<b><i>粗斜体.</i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1283
+msgid "<b><i>bold italic <u>underlined</u></i></b><br>"
+msgstr "<b><i>粗斜体 <u>加下划线</u></i></b><br>"
+
+#: ../src/html/helpwnd.cpp:1278
+msgid "<b>Bold face.</b> "
+msgstr "<b>粗体.</b> "
+
+#: ../src/html/helpwnd.cpp:1277
+msgid "<i>Italic face.</i> "
+msgstr "<i>斜体.</i> "
+
+#: ../src/richtext/richtextliststylepage.cpp:494
+#: ../src/richtext/richtextbulletspage.cpp:299
+msgid ">"
+msgstr ">"
+
+#: ../src/generic/dbgrptg.cpp:318
+msgid "A debug report has been generated in the directory\n"
+msgstr "产生了一份调试报告, 位于目录\n"
+
+#: ../src/common/debugrpt.cpp:578
+msgid "A debug report has been generated. It can be found in"
+msgstr "产生了一份调试报告, 位于"
+
+#: ../src/common/xtixml.cpp:418
+msgid "A non empty collection must consist of 'element' nodes"
+msgstr "非空集合必须包含 'element' 节点"
+
+#: ../src/richtext/richtextliststylepage.cpp:304
+#: ../src/richtext/richtextliststylepage.cpp:306
+#: ../src/richtext/richtextbulletspage.cpp:257
+#: ../src/richtext/richtextbulletspage.cpp:259
+msgid "A standard bullet name."
+msgstr "标准项目符号名称。"
+
+#: ../src/common/paper.cpp:218
+msgid "A0 sheet, 841 x 1189 mm"
+msgstr "A0 纸张, 841 x 1189 毫米"
+
+#: ../src/common/paper.cpp:219
+msgid "A1 sheet, 594 x 841 mm"
+msgstr "A1 纸张, 594 x 841 毫米"
+
+#: ../src/common/paper.cpp:160
+msgid "A2 420 x 594 mm"
+msgstr "A2 纸张, 420 x 594 毫米"
+
+#: ../src/common/paper.cpp:157
+msgid "A3 Extra 322 x 445 mm"
+msgstr "特大 A3 纸张, 322 x 445 毫米"
+
+#: ../src/common/paper.cpp:162
+msgid "A3 Extra Transverse 322 x 445 mm"
+msgstr "特大 A3 纸张(横排), 322 x 445 毫米"
+
+#: ../src/common/paper.cpp:171
+msgid "A3 Rotated 420 x 297 mm"
+msgstr "横向 A3 纸张, 420 x 297 毫米"
+
+#: ../src/common/paper.cpp:161
+msgid "A3 Transverse 297 x 420 mm"
+msgstr "A3 纸张(横排), 297 x 420 毫米"
+
+#: ../src/common/paper.cpp:107
+msgid "A3 sheet, 297 x 420 mm"
+msgstr "A3 纸张, 297 x 420 毫米"
+
+#: ../src/common/paper.cpp:147
+msgid "A4 Extra 9.27 x 12.69 in"
+msgstr "特大 A4 纸张, 9.27 x 12.69 英寸"
+
+#: ../src/common/paper.cpp:154
+msgid "A4 Plus 210 x 330 mm"
+msgstr "加大 A4 纸张, 210 x 330 毫米"
+
+#: ../src/common/paper.cpp:172
+msgid "A4 Rotated 297 x 210 mm"
+msgstr "横向 A4 纸张, 297 x 210 毫米"
+
+#: ../src/common/paper.cpp:149
+msgid "A4 Transverse 210 x 297 mm"
+msgstr "A4 纸张(横排), 210 x 297 毫米"
+
+#: ../src/common/paper.cpp:98
+msgid "A4 sheet, 210 x 297 mm"
+msgstr "A4 纸张, 210 x 297 毫米"
+
+#: ../src/common/paper.cpp:108
+msgid "A4 small sheet, 210 x 297 mm"
+msgstr "小 A4 纸张, 210 x 297 毫米"
+
+#: ../src/common/paper.cpp:158
+msgid "A5 Extra 174 x 235 mm"
+msgstr "特大 A5 纸张, 174 x 235 毫米"
+
+#: ../src/common/paper.cpp:173
+msgid "A5 Rotated 210 x 148 mm"
+msgstr "横向 A5 纸张, 210 x 148 毫米"
+
+#: ../src/common/paper.cpp:155
+msgid "A5 Transverse 148 x 210 mm"
+msgstr "A5 纸张(横排), 148 x 210 毫米"
+
+#: ../src/common/paper.cpp:109
+msgid "A5 sheet, 148 x 210 mm"
+msgstr "A5 纸张, 148 x 210 毫米"
+
+#: ../src/common/paper.cpp:165
+msgid "A6 105 x 148 mm"
+msgstr "A6 纸张, 105 x 148 毫米"
+
+#: ../src/common/paper.cpp:178
+msgid "A6 Rotated 148 x 105 mm"
+msgstr "横向 A5 纸张, 148 x 105 毫米"
+
+#: ../src/generic/fontdlgg.cpp:83 ../src/richtext/richtextformatdlg.cpp:526
+#: ../src/osx/carbon/fontdlg.cpp:339
+msgid "ABCDEFGabcdefg12345"
+msgstr "ABCDEFGabcdefg12345"
+
+#: ../src/common/accelcmn.cpp:76
+msgid "ADD"
+msgstr "ADD"
+
+#: ../src/richtext/richtextsymboldlg.cpp:458 ../src/common/ftp.cpp:405
+msgid "ASCII"
+msgstr "ASCII"
+
+#: ../src/osx/menu_osx.cpp:630 ../src/common/stockitem.cpp:139
+msgid "About"
+msgstr "关于"
+
+#: ../src/generic/aboutdlgg.cpp:140 ../src/msw/aboutdlg.cpp:64
+#, c-format
+msgid "About %s"
+msgstr "关于 %s"
+
+#: ../src/richtext/richtextsizepage.cpp:520
+msgid "Absolute"
+msgstr ""
+
+#: ../src/common/stockitem.cpp:207
+msgid "Actual Size"
+msgstr "实际大小"
+
+#: ../src/common/stockitem.cpp:140
+msgid "Add"
+msgstr "加入"
+
+#: ../src/richtext/richtextbuffer.cpp:10751
+#, fuzzy
+msgid "Add Column"
+msgstr "添加列"
+
+#: ../src/richtext/richtextbuffer.cpp:10688
+#, fuzzy
+msgid "Add Row"
+msgstr "添加行"
+
+#: ../src/html/helpwnd.cpp:439
+msgid "Add current page to bookmarks"
+msgstr "把当前页加到书签中"
+
+#: ../src/generic/colrdlgg.cpp:283
+msgid "Add to custom colours"
+msgstr "加到自定义颜色中"
+
+#: ../include/wx/xtiprop.h:259
+msgid "AddToPropertyCollection called on a generic accessor"
+msgstr "在一个通用处理器上调用AddToPropertyCollection"
+
+#: ../include/wx/xtiprop.h:197
+msgid "AddToPropertyCollection called w/o valid adder"
+msgstr "调用AddToPropertyCollection时未带有效的adder"
+
+#: ../src/html/helpctrl.cpp:159
+#, c-format
+msgid "Adding book %s"
+msgstr "正在添加卷 %s"
+
+#: ../src/osx/carbon/dataview.cpp:1933
+msgid "Adding flavor TEXT failed"
+msgstr "添加风格 TEXT 失败"
+
+#: ../src/osx/carbon/dataview.cpp:1954
+msgid "Adding flavor utxt failed"
+msgstr "添加风格 utxt 失败"
+
+#: ../src/common/preferencescmn.cpp:41
+msgid "Advanced"
+msgstr "高级"
+
+#: ../src/richtext/richtextliststylepage.cpp:435
+msgid "After a paragraph:"
+msgstr "段落之后:"
+
+#: ../src/common/stockitem.cpp:172
+msgid "Align Left"
+msgstr "左对齐"
+
+#: ../src/common/stockitem.cpp:173
+msgid "Align Right"
+msgstr "右对齐"
+
+#: ../src/richtext/richtextsizepage.cpp:266
+msgid "Alignment"
+msgstr "对齐"
+
+#: ../src/generic/prntdlgg.cpp:215
+msgid "All"
+msgstr "所有"
+
+#: ../src/generic/filectrlg.cpp:1205 ../src/common/fldlgcmn.cpp:89
+#, c-format
+msgid "All files (%s)|%s"
+msgstr "所有文件 (%s)|%s"
+
+#: ../include/wx/defs.h:2922
+msgid "All files (*)|*"
+msgstr "所有文件 (*)|*"
+
+#: ../include/wx/defs.h:2919
+msgid "All files (*.*)|*.*"
+msgstr "所有文件 (*.*)|*.*"
+
+#: ../src/richtext/richtextstyles.cpp:1057
+msgid "All styles"
+msgstr "所有样式"
+
+#: ../src/propgrid/manager.cpp:1496
+msgid "Alphabetic Mode"
+msgstr "字母顺序模式"
+
+#: ../src/common/xtistrm.cpp:429
+msgid "Already Registered Object passed to SetObjectClassInfo"
+msgstr "传递已注册对象给 SetObjectClassInfo"
+
+#: ../src/unix/dialup.cpp:353
+msgid "Already dialling ISP."
+msgstr "已经拨接 ISP 。"
+
+#: ../src/common/accelcmn.cpp:320 ../src/univ/themes/win32.cpp:3756
+msgid "Alt+"
+msgstr "Alt+"
+
+#: ../src/common/debugrpt.cpp:581
+msgid "And includes the following files:\n"
+msgstr "并且包含以下文件:\n"
+
+#: ../src/generic/animateg.cpp:162
+#, c-format
+msgid "Animation file is not of type %ld."
+msgstr "动画文件的类型不是 %ld。"
+
+#: ../src/generic/logg.cpp:1034
+#, c-format
+msgid "Append log to file '%s' (choosing [No] will overwrite it)?"
+msgstr "把日志添加到文件 '%s' (选择 [否] 将覆盖该文件)?"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:610
+#: ../src/osx/menu_osx.cpp:649 ../src/osx/menu_osx.cpp:657
+#, fuzzy
+msgid "Application"
+msgstr "选区"
+
+#: ../src/common/stockitem.cpp:141
+msgid "Apply"
+msgstr "应用"
+
+#: ../src/richtext/richtextliststylepage.cpp:482
+#: ../src/richtext/richtextbulletspage.cpp:287
+msgid "Arabic"
+msgstr "阿拉伯数字"
+
+#: ../src/common/fmapbase.cpp:153
+msgid "Arabic (ISO-8859-6)"
+msgstr "阿拉伯语 (ISO-8859-6)"
+
+#: ../src/msw/ole/automtn.cpp:661
+#, c-format
+msgid "Argument %u not found."
+msgstr "找不到参数 %u。"
+
+#: ../src/generic/aboutdlgg.cpp:184
+msgid "Artists"
+msgstr "美术设计者"
+
+#: ../src/common/stockitem.cpp:195
+msgid "Ascending"
+msgstr "升序"
+
+#: ../src/generic/filectrlg.cpp:468
+msgid "Attributes"
+msgstr "属性(Attributes)"
+
+#: ../src/richtext/richtextliststylepage.cpp:294
+#: ../src/richtext/richtextbulletspage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:247
+msgid "Available fonts."
+msgstr "可用字体。"
+
+#: ../src/common/paper.cpp:138
+msgid "B4 (ISO) 250 x 353 mm"
+msgstr "B4 纸张(ISO), 250 x 353 毫米"
+
+#: ../src/common/paper.cpp:174
+msgid "B4 (JIS) Rotated 364 x 257 mm"
+msgstr "横向 B4 纸张(JIS), 364 x 257 毫米"
+
+#: ../src/common/paper.cpp:128
+msgid "B4 Envelope, 250 x 353 mm"
+msgstr "B4 信封, 250 x 353 毫米"
+
+#: ../src/common/paper.cpp:110
+msgid "B4 sheet, 250 x 354 mm"
+msgstr "B4 纸张, 250 x 354 毫米"
+
+#: ../src/common/paper.cpp:159
+msgid "B5 (ISO) Extra 201 x 276 mm"
+msgstr "特大 B4 纸张(JIS), 201 x 276 毫米"
+
+#: ../src/common/paper.cpp:175
+msgid "B5 (JIS) Rotated 257 x 182 mm"
+msgstr "横向 B5 纸张(JIS), 257 x 182 毫米"
+
+#: ../src/common/paper.cpp:156
+msgid "B5 (JIS) Transverse 182 x 257 mm"
+msgstr "B5 纸张 (JIS, 横排), 182 x 257 毫米"
+
+#: ../src/common/paper.cpp:129
+msgid "B5 Envelope, 176 x 250 mm"
+msgstr "B5 信封, 176 x 250 毫米"
+
+#: ../src/common/paper.cpp:111
+msgid "B5 sheet, 182 x 257 millimeter"
+msgstr "B5 纸张, 182 x 257 毫米"
+
+#: ../src/common/paper.cpp:183
+msgid "B6 (JIS) 128 x 182 mm"
+msgstr "B6 纸张(JIS), 128 x 182 毫米"
+
+#: ../src/common/paper.cpp:184
+msgid "B6 (JIS) Rotated 182 x 128 mm"
+msgstr "横向 B6 纸张(JIS), 182 x 128 毫米"
+
+#: ../src/common/paper.cpp:130
+msgid "B6 Envelope, 176 x 125 mm"
+msgstr "B6 信封, 176 x 125 毫米"
+
+#: ../src/common/accelcmn.cpp:49
+msgid "BACK"
+msgstr "BACK"
+
+#: ../src/common/imagbmp.cpp:523 ../src/common/imagbmp.cpp:553
+#: ../src/common/imagbmp.cpp:568
+msgid "BMP: Couldn't allocate memory."
+msgstr "BMP: 无法分配内存。"
+
+#: ../src/common/imagbmp.cpp:97
+msgid "BMP: Couldn't save invalid image."
+msgstr "BMP: 无法保存无效图像。"
+
+#: ../src/common/imagbmp.cpp:338
+msgid "BMP: Couldn't write RGB color map."
+msgstr "BMP: 无法写 RGB 色彩表。"
+
+#: ../src/common/imagbmp.cpp:473
+msgid "BMP: Couldn't write data."
+msgstr "BMP: 无法写数据。"
+
+#: ../src/common/imagbmp.cpp:239
+msgid "BMP: Couldn't write the file (Bitmap) header."
+msgstr "BMP: 无法写文件头 (Bitmap)。"
+
+#: ../src/common/imagbmp.cpp:262
+msgid "BMP: Couldn't write the file (BitmapInfo) header."
+msgstr "BMP: 无法写文件头 (BitmapInfo)。"
+
+#: ../src/common/imagbmp.cpp:133
+msgid "BMP: wxImage doesn't have own wxPalette."
+msgstr "BMP: wxImage 没有自己的 wxPalette。"
+
+#: ../src/common/stockitem.cpp:142
+msgid "Back"
+msgstr "返回"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:119
+#: ../src/richtext/richtextformatdlg.cpp:374
+msgid "Background"
+msgstr "背景"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:131
+msgid "Background &colour:"
+msgstr "背景颜色(&c):"
+
+#: ../src/osx/carbon/fontdlg.cpp:406
+msgid "Background colour"
+msgstr "背景颜色"
+
+#: ../src/common/fmapbase.cpp:160
+msgid "Baltic (ISO-8859-13)"
+msgstr "波罗的海语 (ISO-8859-13)"
+
+#: ../src/common/fmapbase.cpp:151
+msgid "Baltic (old) (ISO-8859-4)"
+msgstr "波罗的海语 (旧式) (ISO-8859-4)"
+
+#: ../src/richtext/richtextliststylepage.cpp:426
+msgid "Before a paragraph:"
+msgstr "段落之前:"
+
+#: ../src/richtext/richtextliststylepage.cpp:489
+#: ../src/richtext/richtextbulletspage.cpp:294
+msgid "Bitmap"
+msgstr "位图"
+
+#: ../src/osx/carbon/dataview.cpp:2396
+msgid "Bitmap renderer cannot render value; value type: "
+msgstr "位图渲染器无法渲染该值; 类型为:"
+
+#: ../src/generic/fontdlgg.cpp:333 ../src/richtext/richtextfontpage.cpp:337
+#: ../src/osx/carbon/fontdlg.cpp:540 ../src/common/stockitem.cpp:143
+msgid "Bold"
+msgstr "粗体"
+
+#: ../src/richtext/richtextborderspage.cpp:256
+#: ../src/richtext/richtextborderspage.cpp:389
+msgid "Border"
+msgstr "边框"
+
+#: ../src/richtext/richtextformatdlg.cpp:368
+msgid "Borders"
+msgstr "边框"
+
+#: ../src/richtext/richtextsizepage.cpp:288 ../src/common/stockitem.cpp:144
+msgid "Bottom"
+msgstr "底端"
+
+#: ../src/generic/prntdlgg.cpp:893
+msgid "Bottom margin (mm):"
+msgstr "底边距 (毫米):"
+
+#: ../src/richtext/richtextbuffer.cpp:8919
+msgid "Box Properties"
+msgstr "方块属性"
+
+#: ../src/richtext/richtextstyles.cpp:1061
+msgid "Box styles"
+msgstr "方块样式"
+
+#: ../src/common/filepickercmn.cpp:43 ../src/common/filepickercmn.cpp:44
+msgid "Browse"
+msgstr "浏览"
+
+#: ../src/richtext/richtextliststylepage.cpp:245
+#: ../src/richtext/richtextbulletspage.cpp:195
+msgid "Bullet &Alignment:"
+msgstr "项目符号对齐(&A):"
+
+#: ../src/richtext/richtextliststylepage.cpp:309
+msgid "Bullet style"
+msgstr "项目符号样式"
+
+#: ../src/richtext/richtextformatdlg.cpp:342
+msgid "Bullets"
+msgstr "项目符号"
+
+#: ../src/common/paper.cpp:99
+msgid "C sheet, 17 x 22 in"
+msgstr "C 纸张, 17 x 22 英寸"
+
+#: ../src/generic/logg.cpp:520
+msgid "C&lear"
+msgstr "清除(&L)"
+
+#: ../src/generic/fontdlgg.cpp:406
+msgid "C&olour:"
+msgstr "颜色(&o):"
+
+#: ../src/common/paper.cpp:124
+msgid "C3 Envelope, 324 x 458 mm"
+msgstr "C3 信封, 324 x 458 毫米"
+
+#: ../src/common/paper.cpp:125
+msgid "C4 Envelope, 229 x 324 mm"
+msgstr "C4 信封, 229 x 324 毫米"
+
+#: ../src/common/paper.cpp:123
+msgid "C5 Envelope, 162 x 229 mm"
+msgstr "C5 信封, 162 x 229 毫米"
+
+#: ../src/common/paper.cpp:126
+msgid "C6 Envelope, 114 x 162 mm"
+msgstr "C6 信封, 114 x 162 毫米"
+
+#: ../src/common/paper.cpp:127
+msgid "C65 Envelope, 114 x 229 mm"
+msgstr "C65 信封, 114 x 229 毫米"
+
+#: ../src/common/accelcmn.cpp:66
+msgid "CANCEL"
+msgstr "CANCEL"
+
+#: ../src/common/accelcmn.cpp:70
+msgid "CAPITAL"
+msgstr "CAPITAL"
+
+#: ../src/common/stockitem.cpp:146
+msgid "CD-Rom"
+msgstr "CD 光驱"
+
+#: ../src/html/chm.cpp:815 ../src/html/chm.cpp:874
+msgid "CHM handler currently supports only local files!"
+msgstr "CHM处理程序目前只支持本地文件!"
+
+#: ../src/common/accelcmn.cpp:67
+msgid "CLEAR"
+msgstr "CLEAR"
+
+#: ../src/common/accelcmn.cpp:111
+msgid "COMMAND"
+msgstr "COMMAND"
+
+#: ../src/richtext/richtextfontpage.cpp:291
+msgid "Ca&pitals"
+msgstr "大写(&P)"
+
+#: ../src/common/cmdproc.cpp:267
+msgid "Can't &Undo "
+msgstr "无法撤销(&U)"
+
+#: ../src/common/image.cpp:2686
+msgid "Can't automatically determine the image format for non-seekable input."
+msgstr "不能自动确定不可定位输入的图像格式。"
+
+#: ../src/msw/registry.cpp:505
+#, c-format
+msgid "Can't close registry key '%s'"
+msgstr "无法关闭注册键 '%s'"
+
+#: ../src/msw/registry.cpp:583
+#, c-format
+msgid "Can't copy values of unsupported type %d."
+msgstr "无法复制不支持的类型 %d 的值."
+
+#: ../src/msw/registry.cpp:486
+#, c-format
+msgid "Can't create registry key '%s'"
+msgstr "无法创建注册键 '%s'"
+
+#: ../src/msw/thread.cpp:696 ../src/os2/thread.cpp:494
+msgid "Can't create thread"
+msgstr "无法创建线程"
+
+#: ../src/msw/window.cpp:3793
+#, c-format
+msgid "Can't create window of class %s"
+msgstr "无法创建窗口类 %s"
+
+#: ../src/msw/registry.cpp:776
+#, c-format
+msgid "Can't delete key '%s'"
+msgstr "无法删除键 '%s'"
+
+#: ../src/msw/iniconf.cpp:458 ../src/os2/iniconf.cpp:471
+#, c-format
+msgid "Can't delete the INI file '%s'"
+msgstr "无法删除 INI 文件 '%s'"
+
+#: ../src/msw/registry.cpp:804
+#, c-format
+msgid "Can't delete value '%s' from key '%s'"
+msgstr "无法删除值 '%s' 位于键 '%s'"
+
+#: ../src/msw/registry.cpp:1161
+#, c-format
+msgid "Can't enumerate subkeys of key '%s'"
+msgstr "无法枚举键 '%s' 的子键"
+
+#: ../src/msw/registry.cpp:1116
+#, c-format
+msgid "Can't enumerate values of key '%s'"
+msgstr "无法枚举键 '%s' 的值"
+
+#: ../src/msw/registry.cpp:1379
+#, c-format
+msgid "Can't export value of unsupported type %d."
+msgstr "无法导出不支持的类型 %d 的值."
+
+#: ../src/common/ffile.cpp:236
+#, c-format
+msgid "Can't find current position in file '%s'"
+msgstr "无法在文件 '%s' 中找到当前位置"
+
+#: ../src/msw/registry.cpp:416
+#, c-format
+msgid "Can't get info about registry key '%s'"
+msgstr "无法获得注册键 '%s' 的信息"
+
+#: ../src/common/zstream.cpp:346
+msgid "Can't initialize zlib deflate stream."
+msgstr "无法初始化 zlib 压缩流。"
+
+#: ../src/common/zstream.cpp:185
+msgid "Can't initialize zlib inflate stream."
+msgstr "无法初始化 zlib 解压流。"
+
+#: ../src/msw/fswatcher.cpp:432
+#, c-format
+msgid "Can't monitor non-existent directory \"%s\" for changes."
+msgstr "无法监视不存在目录 \"%s\" 的更新。"
+
+#: ../src/msw/registry.cpp:452
+#, c-format
+msgid "Can't open registry key '%s'"
+msgstr "无法打开注册键 '%s'"
+
+#: ../src/common/zstream.cpp:252
+#, c-format
+msgid "Can't read from inflate stream: %s"
+msgstr "无法从解压流 %s 中读取"
+
+#: ../src/common/zstream.cpp:244
+msgid "Can't read inflate stream: unexpected EOF in underlying stream."
+msgstr "无法读解压流: 流内有异常的 EOF。"
+
+#: ../src/msw/registry.cpp:1048
+#, c-format
+msgid "Can't read value of '%s'"
+msgstr "无法读 '%s' 的值"
+
+#: ../src/msw/registry.cpp:877 ../src/msw/registry.cpp:909
+#: ../src/msw/registry.cpp:971
+#, c-format
+msgid "Can't read value of key '%s'"
+msgstr "无法读键 '%s' 的值"
+
+#: ../src/common/image.cpp:2483
+#, c-format
+msgid "Can't save image to file '%s': unknown extension."
+msgstr "无法从将图像保存至文件 '%s' 中: 无法识别的扩展名。"
+
+#: ../src/generic/logg.cpp:579 ../src/generic/logg.cpp:996
+msgid "Can't save log contents to file."
+msgstr "无法把日志内容保存到文件。"
+
+#: ../src/msw/thread.cpp:652 ../src/os2/thread.cpp:477
+msgid "Can't set thread priority"
+msgstr "无法设置线程优先级"
+
+#: ../src/msw/registry.cpp:895 ../src/msw/registry.cpp:939
+#: ../src/msw/registry.cpp:1065
+#, c-format
+msgid "Can't set value of '%s'"
+msgstr "无法设置 '%s' 的值"
+
+#: ../src/unix/utilsunx.cpp:357
+msgid "Can't write to child process's stdin"
+msgstr "无法写入子进程的标准输入"
+
+#: ../src/common/zstream.cpp:427
+#, c-format
+msgid "Can't write to deflate stream: %s"
+msgstr "无法写到压缩流: %s"
+
+#: ../include/wx/msgdlg.h:274 ../src/generic/dirdlgg.cpp:107
+#: ../src/richtext/richtextstyledlg.cpp:300 ../src/common/stockitem.cpp:145
+#: ../src/msw/msgdlg.cpp:489 ../src/msw/progdlg.cpp:673
+#: ../src/gtk1/fontdlg.cpp:144 ../src/motif/msgdlg.cpp:196
+msgid "Cancel"
+msgstr "取消"
+
+#: ../src/os2/thread.cpp:116
+msgid "Cannot create mutex."
+msgstr "无法创建互斥子。"
+
+#: ../src/osx/carbon/dataview.cpp:895
+msgid "Cannot create new column's ID. Probably max. number of columns reached."
+msgstr "无法建立新的列 ID。可能已达到列数量的上限。"
+
+#: ../src/common/filefn.cpp:1336
+#, c-format
+msgid "Cannot enumerate files '%s'"
+msgstr "无法枚举文件 '%s'"
+
+#: ../src/msw/dir.cpp:264
+#, c-format
+msgid "Cannot enumerate files in directory '%s'"
+msgstr "无法枚举目录 '%s' 中的文件"
+
+#: ../src/msw/dialup.cpp:542
+#, c-format
+msgid "Cannot find active dialup connection: %s"
+msgstr "无法找到活动的拨号连接: %s"
+
+#: ../src/msw/dialup.cpp:848
+msgid "Cannot find the location of address book file"
+msgstr "无法找到地址簿文件的位置"
+
+#: ../src/msw/ole/automtn.cpp:562
+#, c-format
+msgid "Cannot get an active instance of \"%s\""
+msgstr "无法获得 \"%s\" 的活动实体"
+
+#: ../src/unix/threadpsx.cpp:1030
+#, c-format
+msgid "Cannot get priority range for scheduling policy %d."
+msgstr "无法获得调度策略 %d 的优先级范围。"
+
+#: ../src/unix/utilsunx.cpp:988
+msgid "Cannot get the hostname"
+msgstr "无法获得主机名"
+
+#: ../src/unix/utilsunx.cpp:1024
+msgid "Cannot get the official hostname"
+msgstr "无法获得正式的主机名"
+
+#: ../src/msw/dialup.cpp:949
+msgid "Cannot hang up - no active dialup connection."
+msgstr "无法挂断 - 没有活动的拨号连接。"
+
+#: ../include/wx/msw/ole/oleutils.h:52
+msgid "Cannot initialize OLE"
+msgstr "无法初始化 OLE"
+
+#: ../src/common/socket.cpp:847
+msgid "Cannot initialize sockets"
+msgstr "无法初始化 sockets"
+
+#: ../src/msw/volume.cpp:620
+#, c-format
+msgid "Cannot load icon from '%s'."
+msgstr "无法从 '%s' 中读取图标。"
+
+#: ../src/xrc/xmlres.cpp:361
+#, c-format
+msgid "Cannot load resources from '%s'."
+msgstr "无法从文件 '%s' 中载入资源。"
+
+#: ../src/xrc/xmlres.cpp:746
+#, c-format
+msgid "Cannot load resources from file '%s'."
+msgstr "无法从文件 '%s' 中载入资源。"
+
+#: ../src/html/htmlfilt.cpp:137
+#, c-format
+msgid "Cannot open HTML document: %s"
+msgstr "无法打开 HTML 文档: %s"
+
+#: ../src/html/helpdata.cpp:665
+#, c-format
+msgid "Cannot open HTML help book: %s"
+msgstr "无法打开 HTML 帮助: %s"
+
+#: ../src/html/helpdata.cpp:297
+#, c-format
+msgid "Cannot open contents file: %s"
+msgstr "无法打开目录文件: %s"
+
+#: ../src/generic/dcpsg.cpp:1751
+msgid "Cannot open file for PostScript printing!"
+msgstr "无法打开文件进行 PostScript 打印!"
+
+#: ../src/html/helpdata.cpp:311
+#, c-format
+msgid "Cannot open index file: %s"
+msgstr "无法打开索引文件: %s"
+
+#: ../src/xrc/xmlres.cpp:728
+#, c-format
+msgid "Cannot open resources file '%s'."
+msgstr "无法打开资源文件 '%s'。"
+
+#: ../src/html/helpwnd.cpp:1537
+msgid "Cannot print empty page."
+msgstr "无法打印空白页面。"
+
+#: ../src/msw/volume.cpp:507
+#, c-format
+msgid "Cannot read typename from '%s'!"
+msgstr "无法从 '%s' 中读取类型名称!"
+
+#: ../src/os2/thread.cpp:527
+#, c-format
+msgid "Cannot resume thread %lu"
+msgstr "无法恢复线程 %lu"
+
+#: ../src/msw/thread.cpp:923
+#, c-format
+msgid "Cannot resume thread %lx"
+msgstr "无法恢复线程 %lx"
+
+#: ../src/unix/threadpsx.cpp:1011
+msgid "Cannot retrieve thread scheduling policy."
+msgstr "无法找回线程调度策略。"
+
+#: ../src/common/intl.cpp:542
+#, c-format
+msgid "Cannot set locale to language \"%s\"."
+msgstr "无法设定为语言 \"%s\"。"
+
+#: ../src/unix/threadpsx.cpp:831 ../src/msw/thread.cpp:569
+msgid "Cannot start thread: error writing TLS."
+msgstr "无法启动线程: 写 TLS 出错。"
+
+#: ../src/os2/thread.cpp:513
+#, c-format
+msgid "Cannot suspend thread %lu"
+msgstr "无法挂起线程 %lu"
+
+#: ../src/msw/thread.cpp:907
+#, c-format
+msgid "Cannot suspend thread %lx"
+msgstr "无法挂起线程 %lx"
+
+#: ../src/msw/thread.cpp:830
+msgid "Cannot wait for thread termination"
+msgstr "无法等候线程终止"
+
+#: ../src/html/helpwnd.cpp:546
+msgid "Case sensitive"
+msgstr "大小写敏感"
+
+#: ../src/propgrid/manager.cpp:1495
+msgid "Categorized Mode"
+msgstr "分类模式"
+
+#: ../src/richtext/richtextbuffer.cpp:9347
+msgid "Cell Properties"
+msgstr "单元格属性"
+
+#: ../src/common/fmapbase.cpp:161
+msgid "Celtic (ISO-8859-14)"
+msgstr "凯尔特语 (ISO-8859-14)"
+
+#: ../src/richtext/richtextindentspage.cpp:160
+#: ../src/richtext/richtextliststylepage.cpp:349
+msgid "Cen&tred"
+msgstr "居中(&t)"
+
+#: ../src/common/stockitem.cpp:170
+msgid "Centered"
+msgstr "居中"
+
+#: ../src/common/fmapbase.cpp:149
+msgid "Central European (ISO-8859-2)"
+msgstr "中欧语系 (ISO-8859-2)"
+
+#: ../src/richtext/richtextliststylepage.cpp:250
+#: ../src/richtext/richtextbulletspage.cpp:200
+msgid "Centre"
+msgstr "居中"
+
+#: ../src/richtext/richtextindentspage.cpp:162
+#: ../src/richtext/richtextindentspage.cpp:164
+#: ../src/richtext/richtextliststylepage.cpp:351
+#: ../src/richtext/richtextliststylepage.cpp:353
+msgid "Centre text."
+msgstr "文字居中。"
+
+#: ../src/richtext/richtextsizepage.cpp:287
+msgid "Centred"
+msgstr "居中"
+
+#: ../src/richtext/richtextliststylepage.cpp:280
+#: ../src/richtext/richtextbulletspage.cpp:232
+msgid "Ch&oose..."
+msgstr "选择(&o)..."
+
+#: ../src/richtext/richtextbuffer.cpp:4041
+msgid "Change List Style"
+msgstr "更改列表样式"
+
+#: ../src/richtext/richtextbuffer.cpp:3392
+msgid "Change Object Style"
+msgstr "更改对象样式"
+
+#: ../src/richtext/richtextbuffer.cpp:3658
+#: ../src/richtext/richtextbuffer.cpp:7749
+msgid "Change Properties"
+msgstr "修改属性"
+
+#: ../src/richtext/richtextbuffer.cpp:3209
+msgid "Change Style"
+msgstr "更改样式"
+
+#: ../src/common/fileconf.cpp:372
+#, c-format
+msgid "Changes won't be saved to avoid overwriting the existing file \"%s\""
+msgstr "为了防止重写已有文件 \"%s\" 更改不会被保存"
+
+#: ../src/richtext/richtextstyles.cpp:1059
+msgid "Character styles"
+msgstr "文字样式"
+
+#: ../src/richtext/richtextliststylepage.cpp:224
+#: ../src/richtext/richtextliststylepage.cpp:226
+#: ../src/richtext/richtextbulletspage.cpp:174
+#: ../src/richtext/richtextbulletspage.cpp:176
+msgid "Check to add a period after the bullet."
+msgstr "勾选以在项目符号后加上句号"
+
+#: ../src/richtext/richtextliststylepage.cpp:238
+#: ../src/richtext/richtextliststylepage.cpp:240
+#: ../src/richtext/richtextbulletspage.cpp:188
+#: ../src/richtext/richtextbulletspage.cpp:190
+msgid "Check to add a right parenthesis."
+msgstr "勾选以加上右括号"
+
+#: ../src/richtext/richtextliststylepage.cpp:231
+#: ../src/richtext/richtextliststylepage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:181
+#: ../src/richtext/richtextbulletspage.cpp:183
+msgid "Check to enclose the bullet in parentheses."
+msgstr "勾选以将项目符号加上一对括号"
+
+#: ../src/osx/carbon/fontdlg.cpp:542 ../src/osx/carbon/fontdlg.cpp:544
+msgid "Check to make the font bold."
+msgstr "勾选设定为粗体。"
+
+#: ../src/osx/carbon/fontdlg.cpp:549 ../src/osx/carbon/fontdlg.cpp:551
+msgid "Check to make the font italic."
+msgstr "勾选设定为斜体。"
+
+#: ../src/osx/carbon/fontdlg.cpp:558 ../src/osx/carbon/fontdlg.cpp:560
+msgid "Check to make the font underlined."
+msgstr "勾选加下划线。"
+
+#: ../src/richtext/richtextstyledlg.cpp:289
+#: ../src/richtext/richtextstyledlg.cpp:291
+msgid "Check to restart numbering."
+msgstr "勾选以重新编号"
+
+#: ../src/richtext/richtextfontpage.cpp:286
+#: ../src/richtext/richtextfontpage.cpp:288
+msgid "Check to show a line through the text."
+msgstr "勾选加删除线。"
+
+#: ../src/richtext/richtextfontpage.cpp:293
+#: ../src/richtext/richtextfontpage.cpp:295
+msgid "Check to show the text in capitals."
+msgstr "勾选显示为大写。"
+
+#: ../src/richtext/richtextfontpage.cpp:300
+#: ../src/richtext/richtextfontpage.cpp:302
+#, fuzzy
+msgid "Check to show the text in small capitals."
+msgstr "勾选显示为大写。"
+
+#: ../src/richtext/richtextfontpage.cpp:314
+#: ../src/richtext/richtextfontpage.cpp:316
+msgid "Check to show the text in subscript."
+msgstr "勾选显示为下标。"
+
+#: ../src/richtext/richtextfontpage.cpp:307
+#: ../src/richtext/richtextfontpage.cpp:309
+msgid "Check to show the text in superscript."
+msgstr "勾选显示为上标。"
+
+#: ../src/msw/dialup.cpp:784
+msgid "Choose ISP to dial"
+msgstr "选择ISP进行拨号"
+
+#: ../src/propgrid/props.cpp:1643
+msgid "Choose a directory:"
+msgstr "选择目录:"
+
+#: ../src/propgrid/props.cpp:1702
+msgid "Choose a file"
+msgstr "选择文件"
+
+#: ../src/generic/colrdlgg.cpp:144 ../src/gtk/colordlg.cpp:63
+msgid "Choose colour"
+msgstr "选择颜色"
+
+#: ../src/generic/fontpickerg.cpp:50 ../src/gtk/fontdlg.cpp:75
+#: ../src/gtk1/fontdlg.cpp:125
+msgid "Choose font"
+msgstr "选择字体"
+
+#: ../src/common/module.cpp:74
+#, c-format
+msgid "Circular dependency involving module \"%s\" detected."
+msgstr "检测到导致循环依赖模块 \"%s\" 。"
+
+#: ../src/aui/tabmdi.cpp:108 ../src/generic/mdig.cpp:97
+msgid "Cl&ose"
+msgstr "关闭(&o)"
+
+#: ../src/msw/ole/automtn.cpp:673
+msgid "Class not registered."
+msgstr "类未注册。"
+
+#: ../src/common/stockitem.cpp:147
+msgid "Clear"
+msgstr "清除"
+
+#: ../src/generic/logg.cpp:520
+msgid "Clear the log contents"
+msgstr "清除日志内容"
+
+#: ../src/richtext/richtextstyledlg.cpp:252
+#: ../src/richtext/richtextstyledlg.cpp:254
+msgid "Click to apply the selected style."
+msgstr "点击应用所选样式。"
+
+#: ../src/richtext/richtextliststylepage.cpp:281
+#: ../src/richtext/richtextliststylepage.cpp:283
+#: ../src/richtext/richtextbulletspage.cpp:233
+#: ../src/richtext/richtextbulletspage.cpp:235
+msgid "Click to browse for a symbol."
+msgstr "点击浏览该符号。"
+
+#: ../src/osx/carbon/fontdlg.cpp:589 ../src/osx/carbon/fontdlg.cpp:591
+msgid "Click to cancel changes to the font."
+msgstr "点击取消字体变更。"
+
+#: ../src/generic/fontdlgg.cpp:472 ../src/generic/fontdlgg.cpp:491
+msgid "Click to cancel the font selection."
+msgstr "点击取消字体选择。"
+
+#: ../src/osx/carbon/fontdlg.cpp:570 ../src/osx/carbon/fontdlg.cpp:572
+msgid "Click to change the font colour."
+msgstr "点击更改字体颜色。"
+
+#: ../src/richtext/richtextfontpage.cpp:276
+#: ../src/richtext/richtextfontpage.cpp:278
+msgid "Click to change the text background colour."
+msgstr "点击修改字体背景颜色。"
+
+#: ../src/richtext/richtextfontpage.cpp:263
+#: ../src/richtext/richtextfontpage.cpp:265
+msgid "Click to change the text colour."
+msgstr "点击修改字体颜色。"
+
+#: ../src/richtext/richtextliststylepage.cpp:195
+#: ../src/richtext/richtextliststylepage.cpp:197
+msgid "Click to choose the font for this level."
+msgstr "点击选择此层级字体。"
+
+#: ../src/richtext/richtextstyledlg.cpp:279
+#: ../src/richtext/richtextstyledlg.cpp:281
+msgid "Click to close this window."
+msgstr "点击关闭此窗口。"
+
+#: ../src/osx/carbon/fontdlg.cpp:596 ../src/osx/carbon/fontdlg.cpp:598
+msgid "Click to confirm changes to the font."
+msgstr "点击确认字体更改。"
+
+#: ../src/generic/fontdlgg.cpp:477 ../src/generic/fontdlgg.cpp:479
+#: ../src/generic/fontdlgg.cpp:484 ../src/generic/fontdlgg.cpp:486
+msgid "Click to confirm the font selection."
+msgstr "点击确认字体选择。"
+
+#: ../src/richtext/richtextstyledlg.cpp:244
+#: ../src/richtext/richtextstyledlg.cpp:246
+msgid "Click to create a new box style."
+msgstr "点击新增方块样式。"
+
+#: ../src/richtext/richtextstyledlg.cpp:226
+#: ../src/richtext/richtextstyledlg.cpp:228
+msgid "Click to create a new character style."
+msgstr "点击新建文字样式。"
+
+#: ../src/richtext/richtextstyledlg.cpp:238
+#: ../src/richtext/richtextstyledlg.cpp:240
+msgid "Click to create a new list style."
+msgstr "点击新增列表样式。"
+
+#: ../src/richtext/richtextstyledlg.cpp:232
+#: ../src/richtext/richtextstyledlg.cpp:234
+msgid "Click to create a new paragraph style."
+msgstr "点击新建段落样式。"
+
+#: ../src/richtext/richtexttabspage.cpp:137
+#: ../src/richtext/richtexttabspage.cpp:139
+msgid "Click to create a new tab position."
+msgstr "点击建立新的标签位置。"
+
+#: ../src/richtext/richtexttabspage.cpp:149
+#: ../src/richtext/richtexttabspage.cpp:151
+msgid "Click to delete all tab positions."
+msgstr "点击删除所有标签位置。"
+
+#: ../src/richtext/richtextstyledlg.cpp:270
+#: ../src/richtext/richtextstyledlg.cpp:272
+msgid "Click to delete the selected style."
+msgstr "点击删除所选样式。"
+
+#: ../src/richtext/richtexttabspage.cpp:143
+#: ../src/richtext/richtexttabspage.cpp:145
+msgid "Click to delete the selected tab position."
+msgstr "点击删除所选标签位置。"
+
+#: ../src/richtext/richtextstyledlg.cpp:264
+#: ../src/richtext/richtextstyledlg.cpp:266
+msgid "Click to edit the selected style."
+msgstr "点击编辑所选样式。"
+
+#: ../src/richtext/richtextstyledlg.cpp:258
+#: ../src/richtext/richtextstyledlg.cpp:260
+msgid "Click to rename the selected style."
+msgstr "点击重命名所选样式。"
+
+#: ../src/generic/dbgrptg.cpp:97 ../src/generic/progdlgg.cpp:804
+#: ../src/generic/progdlgg.cpp:809 ../src/richtext/richtextstyledlg.cpp:277
+#: ../src/richtext/richtextsymboldlg.cpp:476 ../src/common/stockitem.cpp:148
+#: ../src/msw/progdlg.cpp:170 ../src/msw/progdlg.cpp:679
+#: ../src/html/helpdlg.cpp:90
+msgid "Close"
+msgstr "关闭"
+
+#: ../src/aui/tabmdi.cpp:109 ../src/generic/mdig.cpp:98
+msgid "Close All"
+msgstr "全部关闭"
+
+#: ../src/common/stockitem.cpp:266
+msgid "Close current document"
+msgstr "关闭当前文档"
+
+#: ../src/generic/logg.cpp:522
+msgid "Close this window"
+msgstr "关闭此窗口"
+
+#: ../src/common/stockitem.cpp:193
+msgid "Color"
+msgstr "颜色"
+
+#: ../src/richtext/richtextformatdlg.cpp:725
+msgid "Colour"
+msgstr "颜色"
+
+#: ../src/msw/colordlg.cpp:156
+#, c-format
+msgid "Colour selection dialog failed with error %0lx."
+msgstr "颜色选择对话框错误,错误码 %0lx。"
+
+#: ../src/osx/carbon/fontdlg.cpp:566
+msgid "Colour:"
+msgstr "颜色:"
+
+#: ../src/osx/carbon/dataview.cpp:900
+msgid "Column could not be added."
+msgstr "无法增加列。"
+
+#: ../src/osx/carbon/dataview.cpp:899
+msgid "Column description could not be initialized."
+msgstr "列描述无法初始化。"
+
+#: ../src/osx/carbon/dataview.cpp:1538 ../src/osx/carbon/dataview.cpp:1559
+msgid "Column index not found."
+msgstr "找不到列索引。"
+
+#: ../src/osx/carbon/dataview.cpp:1614
+msgid "Column width could not be determined"
+msgstr "无法确定列宽"
+
+#: ../src/osx/carbon/dataview.cpp:901
+msgid "Column width could not be set."
+msgstr "无法设定列宽。"
+
+#: ../src/common/init.cpp:188
+#, c-format
+msgid ""
+"Command line argument %d couldn't be converted to Unicode and will be "
+"ignored."
+msgstr "命令行参数 %d 无法被转化成Unicode编码,其将被忽略。"
+
+#: ../src/msw/fontdlg.cpp:119
+#, c-format
+msgid "Common dialog failed with error code %0lx."
+msgstr "公共对话框错误,错误码 %0lx。"
+
+#: ../src/gtk/window.cpp:4306
+msgid ""
+"Compositing not supported by this system, please enable it in your Window "
+"Manager."
+msgstr "当前系统不支持组合模式,请在窗口管理器中启用。"
+
+#: ../src/html/helpwnd.cpp:1554
+msgid "Compressed HTML Help file (*.chm)|*.chm|"
+msgstr "压缩的HTML帮助文件 (*.chm)|*.chm|"
+
+#: ../src/generic/dirctrlg.cpp:544
+msgid "Computer"
+msgstr "计算机"
+
+#: ../src/common/fileconf.cpp:965
+#, c-format
+msgid "Config entry name cannot start with '%c'."
+msgstr "配置条目名不能以 '%c' 开头。"
+
+#: ../src/gtk/filedlg.cpp:59
+msgid "Confirm"
+msgstr "确认"
+
+#: ../src/msw/mimetype.cpp:739
+msgid "Confirm registry update"
+msgstr "确认更新注册表"
+
+#: ../src/html/htmlwin.cpp:544
+msgid "Connecting..."
+msgstr "正在连接..."
+
+#: ../src/html/helpwnd.cpp:482
+msgid "Contents"
+msgstr "目录"
+
+#: ../src/common/strconv.cpp:2261
+#, c-format
+msgid "Conversion to charset '%s' doesn't work."
+msgstr "无法进行到字符集 '%s' 的转换。"
+
+#: ../src/common/stockitem.cpp:149
+msgid "Convert"
+msgstr "转换"
+
+#: ../src/html/htmlwin.cpp:1057
+#, c-format
+msgid "Copied to clipboard:\"%s\""
+msgstr "已复制到剪贴板:\"%s\""
+
+#: ../src/generic/prntdlgg.cpp:247
+msgid "Copies:"
+msgstr "份数:"
+
+#: ../src/common/stockitem.cpp:150 ../src/stc/stc_i18n.cpp:18
+msgid "Copy"
+msgstr "复制"
+
+#: ../src/common/stockitem.cpp:258
+msgid "Copy selection"
+msgstr "复制选区"
+
+#: ../src/html/chm.cpp:718
+#, c-format
+msgid "Could not create temporary file '%s'"
+msgstr "无法创建临时文件 '%s'"
+
+#: ../src/osx/carbon/dataview.cpp:1285 ../src/osx/carbon/dataview.cpp:1672
+msgid "Could not determine column index."
+msgstr "无法确定列索引。"
+
+#: ../src/osx/carbon/dataview.cpp:876
+msgid "Could not determine column's position"
+msgstr "无法确定列位置"
+
+#: ../src/osx/carbon/dataview.cpp:843
+msgid "Could not determine number of columns."
+msgstr "无法确定列数量。"
+
+#: ../src/osx/carbon/dataview.cpp:975
+msgid "Could not determine number of items"
+msgstr "无法确定项目数量"
+
+#: ../src/html/chm.cpp:273
+#, c-format
+msgid "Could not extract %s into %s: %s"
+msgstr "无法将 %s 解开至 %s: %s"
+
+#: ../src/generic/tabg.cpp:1048
+msgid "Could not find tab for id"
+msgstr "找不到 id 的标签"
+
+#: ../src/osx/carbon/dataview.cpp:2556 ../src/osx/carbon/dataview.cpp:2591
+#: ../src/osx/carbon/dataview.cpp:2615 ../src/osx/carbon/dataview.cpp:2636
+#: ../src/osx/carbon/dataview.cpp:2773
+msgid "Could not get header description."
+msgstr "无法获取表头描述。"
+
+#: ../src/osx/carbon/dataview.cpp:1169 ../src/osx/carbon/dataview.cpp:1195
+msgid "Could not get items."
+msgstr "无法获取项目。"
+
+#: ../src/osx/carbon/dataview.cpp:2659 ../src/osx/carbon/dataview.cpp:2724
+msgid "Could not get property flags."
+msgstr "无法获取属性标志。"
+
+#: ../src/osx/carbon/dataview.cpp:726
+msgid "Could not get selected items."
+msgstr "无法获取所选项目。"
+
+#: ../src/html/chm.cpp:444
+#, c-format
+msgid "Could not locate file '%s'."
+msgstr "找不到文件 '%s'。"
+
+#: ../src/osx/carbon/dataview.cpp:845
+msgid "Could not remove column."
+msgstr "无法删除列。"
+
+#: ../src/osx/carbon/dataview.cpp:642
+msgid "Could not retrieve number of items"
+msgstr "无法获取项目数量"
+
+#: ../src/osx/carbon/dataview.cpp:2572
+msgid "Could not set alignment."
+msgstr "无法设定对齐。"
+
+#: ../src/osx/carbon/dataview.cpp:2803
+msgid "Could not set column width."
+msgstr "无法启动文档预览。"
+
+#: ../src/common/filefn.cpp:1569
+msgid "Could not set current working directory"
+msgstr "无法设置当前工作目录"
+
+#: ../src/osx/carbon/dataview.cpp:2775
+msgid "Could not set header description."
+msgstr "无法启动打印。"
+
+#: ../src/osx/carbon/dataview.cpp:2596
+msgid "Could not set icon."
+msgstr "无法启动打印。"
+
+#: ../src/osx/carbon/dataview.cpp:2617
+msgid "Could not set maximum width."
+msgstr "无法设定最大宽度。"
+
+#: ../src/osx/carbon/dataview.cpp:2638
+msgid "Could not set minimum width."
+msgstr "无法设定最小宽度。"
+
+#: ../src/osx/carbon/dataview.cpp:2664 ../src/osx/carbon/dataview.cpp:2729
+msgid "Could not set property flags."
+msgstr "无法设定属性标志。"
+
+#: ../src/common/prntbase.cpp:1985
+msgid "Could not start document preview."
+msgstr "无法启动文档预览。"
+
+#: ../src/generic/printps.cpp:178 ../src/msw/printwin.cpp:210
+#: ../src/gtk/print.cpp:1077
+msgid "Could not start printing."
+msgstr "无法启动打印。"
+
+#: ../src/common/wincmn.cpp:2131
+msgid "Could not transfer data to window"
+msgstr "无法把数据转到窗口"
+
+#: ../src/os2/thread.cpp:160
+msgid "Couldn't acquire a mutex lock"
+msgstr "无法得到互斥锁"
+
+#: ../src/msw/imaglist.cpp:166 ../src/msw/imaglist.cpp:197
+#: ../src/msw/imaglist.cpp:209 ../src/msw/dragimag.cpp:193
+#: ../src/msw/dragimag.cpp:232
+msgid "Couldn't add an image to the image list."
+msgstr "无法把图像加到图象列表。"
+
+#: ../src/msw/timer.cpp:134 ../src/os2/timer.cpp:113
+msgid "Couldn't create a timer"
+msgstr "无法创建计时器"
+
+#: ../src/osx/carbon/overlay.cpp:122
+msgid "Couldn't create the overlay window"
+msgstr "无法创建 overlay 窗口"
+
+#: ../src/common/translation.cpp:2015
+#, fuzzy
+msgid "Couldn't enumerate translations"
+msgstr "无法终止线程"
+
+#: ../src/common/dynlib.cpp:152
+#, c-format
+msgid "Couldn't find symbol '%s' in a dynamic library"
+msgstr "在动态连接库中找不到符号 '%s'"
+
+#: ../src/gtk/print.cpp:2014
+msgid "Couldn't get hatch style from wxBrush."
+msgstr "无法从 wxBrush 获取阴影样式。"
+
+#: ../src/msw/thread.cpp:950
+msgid "Couldn't get the current thread pointer"
+msgstr "无法获得当前线程指针"
+
+#: ../src/osx/carbon/overlay.cpp:129
+#, fuzzy
+msgid "Couldn't init the context on the overlay window"
+msgstr "无法获得当前线程指针"
+
+#: ../src/common/imaggif.cpp:263
+#, fuzzy
+msgid "Couldn't initialize GIF hash table."
+msgstr "无法初始化 zlib 压缩流."
+
+#: ../src/common/imagpng.cpp:657
+msgid "Couldn't load a PNG image - file is corrupted or not enough memory."
+msgstr "无法装入 PNG 图像 - 文件被破坏 或者 没有足够内存。"
+
+#: ../src/unix/sound.cpp:470
+#, c-format
+msgid "Couldn't load sound data from '%s'."
+msgstr "无法从 '%s' 中的读取声音数据。"
+
+#: ../src/msw/dirdlg.cpp:441
+msgid "Couldn't obtain folder name"
+msgstr "无法获取文件夹名称"
+
+#: ../src/unix/sound_sdl.cpp:229
+#, c-format
+msgid "Couldn't open audio: %s"
+msgstr "无法打开音频: %s"
+
+#: ../src/msw/ole/dataobj.cpp:350
+#, c-format
+msgid "Couldn't register clipboard format '%s'."
+msgstr "无法注册剪贴板格式 '%s'。"
+
+#: ../src/os2/thread.cpp:177
+msgid "Couldn't release a mutex"
+msgstr "无法释放互斥子"
+
+#: ../src/msw/listctrl.cpp:756
+#, c-format
+msgid "Couldn't retrieve information about list control item %d."
+msgstr "无法获得列表控件的项 %d 信息。"
+
+#: ../src/common/imagpng.cpp:746 ../src/common/imagpng.cpp:757
+#: ../src/common/imagpng.cpp:767
+msgid "Couldn't save PNG image."
+msgstr "无法保存 PNG 图像。"
+
+#: ../src/msw/thread.cpp:715
+msgid "Couldn't terminate thread"
+msgstr "无法终止线程"
+
+#: ../src/common/xtistrm.cpp:170
+#, c-format
+msgid "Create Parameter %s not found in declared RTTI Parameters"
+msgstr "在声明的 RTTI 参数里找不到创建参数 %s"
+
+#: ../src/generic/dirdlgg.cpp:317
+msgid "Create directory"
+msgstr "创建目录"
+
+#: ../src/generic/filedlgg.cpp:228 ../src/generic/dirdlgg.cpp:131
+msgid "Create new directory"
+msgstr "创建新目录"
+
+#: ../src/common/accelcmn.cpp:322
+msgid "Ctrl+"
+msgstr "Ctrl+"
+
+#: ../src/richtext/richtextctrl.cpp:325 ../src/osx/textctrl_osx.cpp:582
+#: ../src/common/stockitem.cpp:151 ../src/msw/textctrl.cpp:2283
+msgid "Cu&t"
+msgstr "剪切(&t)"
+
+#: ../src/generic/filectrlg.cpp:956
+msgid "Current directory:"
+msgstr "当前目录:"
+
+#: ../src/gtk/print.cpp:759
+msgid "Custom size"
+msgstr "自定义大小"
+
+#: ../src/common/headerctrlcmn.cpp:60
+msgid "Customize Columns"
+msgstr "自定义列"
+
+#: ../src/common/stockitem.cpp:151 ../src/stc/stc_i18n.cpp:17
+msgid "Cut"
+msgstr "剪切"
+
+#: ../src/common/stockitem.cpp:259
+msgid "Cut selection"
+msgstr "剪切选区"
+
+#: ../src/common/fmapbase.cpp:152
+msgid "Cyrillic (ISO-8859-5)"
+msgstr "西里尔语 (ISO-8859-5)"
+
+#: ../src/common/paper.cpp:100
+msgid "D sheet, 22 x 34 in"
+msgstr "D 纸张, 22 x 34 英寸"
+
+#: ../src/msw/dde.cpp:708
+msgid "DDE poke request failed"
+msgstr "DDE poke 请求失败"
+
+#: ../src/common/accelcmn.cpp:79
+msgid "DECIMAL"
+msgstr "DECIMAL"
+
+#: ../src/common/accelcmn.cpp:47
+msgid "DEL"
+msgstr "DEL"
+
+#: ../src/common/accelcmn.cpp:48
+msgid "DELETE"
+msgstr "DELETE"
+
+#: ../src/common/imagbmp.cpp:1092
+msgid "DIB Header: Encoding doesn't match bitdepth."
+msgstr "DIB头: 编码不匹配颜色位数。"
+
+#: ../src/common/imagbmp.cpp:1040
+msgid "DIB Header: Image height > 32767 pixels for file."
+msgstr "DIB头: 对于文件, 图像高度 > 32767 象素。"
+
+#: ../src/common/imagbmp.cpp:1032
+msgid "DIB Header: Image width > 32767 pixels for file."
+msgstr "DIB头: 对于文件, 图像宽度 > 32767 象素。"
+
+#: ../src/common/imagbmp.cpp:1060
+msgid "DIB Header: Unknown bitdepth in file."
+msgstr "DIB头: 文件中颜色位数未知。"
+
+#: ../src/common/imagbmp.cpp:1074
+msgid "DIB Header: Unknown encoding in file."
+msgstr "DIB头: 文件编码未知。"
+
+#: ../src/common/accelcmn.cpp:80
+msgid "DIVIDE"
+msgstr "DIVIDE"
+
+#: ../src/common/paper.cpp:122
+msgid "DL Envelope, 110 x 220 mm"
+msgstr "DL 信封, 110 x 220 毫米"
+
+#: ../src/common/accelcmn.cpp:59
+msgid "DOWN"
+msgstr "DOWN"
+
+#: ../src/richtext/richtextborderspage.cpp:545
+msgid "Dashed"
+msgstr ""
+
+#: ../src/osx/carbon/dataview.cpp:1921
+msgid "Data object has invalid data format"
+msgstr "数据对象有无效数据格式"
+
+#: ../src/osx/carbon/dataview.cpp:2491
+msgid "Date renderer cannot render value; value type: "
+msgstr "数据渲染器无法渲染该值; 类型为:"
+
+#: ../src/generic/dbgrptg.cpp:300
+#, c-format
+msgid "Debug report \"%s\""
+msgstr "调试报告 \"%s\""
+
+#: ../src/common/debugrpt.cpp:210
+msgid "Debug report couldn't be created."
+msgstr "无法创建调试报告。"
+
+#: ../src/common/debugrpt.cpp:558
+msgid "Debug report generation has failed."
+msgstr "无法生成调试报告。"
+
+#: ../src/generic/fontdlgg.cpp:323
+msgid "Decorative"
+msgstr "修饰"
+
+#: ../src/common/fmapbase.cpp:796
+msgid "Default encoding"
+msgstr "缺省编码"
+
+#: ../src/dfb/fontmgr.cpp:180
+msgid "Default font"
+msgstr "缺省字体"
+
+#: ../src/generic/prntdlgg.cpp:510
+msgid "Default printer"
+msgstr "缺省的打印机"
+
+#: ../src/richtext/richtextbuffer.cpp:7841 ../src/common/stockitem.cpp:152
+#: ../src/stc/stc_i18n.cpp:20
+msgid "Delete"
+msgstr "删除"
+
+#: ../src/richtext/richtexttabspage.cpp:148
+msgid "Delete A&ll"
+msgstr "删除全部(&l)"
+
+#: ../src/richtext/richtextbuffer.cpp:10637
+#, fuzzy
+msgid "Delete Column"
+msgstr "删除列"
+
+#: ../src/richtext/richtextbuffer.cpp:10587
+#, fuzzy
+msgid "Delete Row"
+msgstr "删除行"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+msgid "Delete Style"
+msgstr "删除样式"
+
+#: ../src/richtext/richtextctrl.cpp:1231 ../src/richtext/richtextctrl.cpp:1452
+msgid "Delete Text"
+msgstr "删除文字"
+
+#: ../src/generic/editlbox.cpp:274
+msgid "Delete item"
+msgstr "删除项"
+
+#: ../src/common/stockitem.cpp:260
+msgid "Delete selection"
+msgstr "删除选区"
+
+#: ../src/richtext/richtextstyledlg.cpp:779
+#, c-format
+msgid "Delete style %s?"
+msgstr "删除样式 %s?"
+
+#: ../src/unix/snglinst.cpp:295
+#, c-format
+msgid "Deleted stale lock file '%s'."
+msgstr "已删除过期的锁文件 '%s'。"
+
+#: ../src/common/module.cpp:124
+#, c-format
+msgid "Dependency \"%s\" of module \"%s\" doesn't exist."
+msgstr "依赖 \"%s\" 对模块 \"%s\" 不存在。"
+
+#: ../src/common/stockitem.cpp:196
+msgid "Descending"
+msgstr "降序"
+
+#: ../src/generic/dirctrlg.cpp:626
+msgid "Desktop"
+msgstr "桌面"
+
+#: ../src/generic/aboutdlgg.cpp:70
+msgid "Developed by "
+msgstr "开发由"
+
+#: ../src/generic/aboutdlgg.cpp:176
+msgid "Developers"
+msgstr "开发者"
+
+#: ../src/msw/dialup.cpp:393
+msgid ""
+"Dial up functions are unavailable because the remote access service (RAS) is "
+"not installed on this machine. Please install it."
+msgstr "由于远程访问服务(RAS)没有安装在本机,拨号功能无法使用。请安装它。"
+
+#: ../src/generic/tipdlg.cpp:230
+msgid "Did you know..."
+msgstr "你知道吗..."
+
+#: ../src/dfb/wrapdfb.cpp:63
+#, c-format
+msgid "DirectFB error %d occurred."
+msgstr "DirectFB错误 %d 发生。"
+
+#: ../src/motif/filedlg.cpp:219
+msgid "Directories"
+msgstr "目录"
+
+#: ../src/common/filefn.cpp:1251
+#, c-format
+msgid "Directory '%s' couldn't be created"
+msgstr "无法创建目录 '%s'"
+
+#: ../src/common/filefn.cpp:1271
+#, c-format
+msgid "Directory '%s' couldn't be deleted"
+msgstr "目录'%s'无法被删除"
+
+#: ../src/generic/dirdlgg.cpp:233
+msgid "Directory does not exist"
+msgstr "目录不存在"
+
+#: ../src/generic/filectrlg.cpp:1412
+msgid "Directory doesn't exist."
+msgstr "目录不存在。"
+
+#: ../src/common/docview.cpp:455
+msgid "Discard changes and reload the last saved version?"
+msgstr "放弃更改并重新载入最近保存的版本?"
+
+#: ../src/html/helpwnd.cpp:512
+msgid ""
+"Display all index items that contain given substring. Search is case "
+"insensitive."
+msgstr "显示包含给定子串的所有索引项. 搜索是大小写无关的."
+
+#: ../src/html/helpwnd.cpp:692
+msgid "Display options dialog"
+msgstr "显示选项对话框"
+
+#: ../src/html/helpwnd.cpp:326
+msgid "Displays help as you browse the books on the left."
+msgstr ""
+
+#: ../src/msw/mimetype.cpp:732
+msgid ""
+"Do you want to overwrite the command used to %s files with extension \"%s"
+"\" ?\n"
+"Current value is \n"
+"%s, \n"
+"New value is \n"
+"%s %1"
+msgstr ""
+"是否要覆盖用于%s文件(扩展名为\"%s\")的命令?\n"
+"当前值为 \n"
+"%s, \n"
+"新的值为 \n"
+"%s %1"
+
+#: ../src/common/docview.cpp:531
+#, c-format
+msgid "Do you want to save changes to %s?"
+msgstr "你想保存对文档 %s 的修改吗?"
+
+#: ../src/common/prntbase.cpp:525
+msgid "Document:"
+msgstr "文档:"
+
+#: ../src/generic/aboutdlgg.cpp:73
+msgid "Documentation by "
+msgstr "文档撰写由"
+
+#: ../src/generic/aboutdlgg.cpp:180
+msgid "Documentation writers"
+msgstr "文档作者"
+
+#: ../src/common/sizer.cpp:2680
+msgid "Don't Save"
+msgstr "不保存"
+
+#: ../src/msw/frame.cpp:122 ../src/html/htmlwin.cpp:611
+msgid "Done"
+msgstr "完成"
+
+#: ../src/generic/progdlgg.cpp:481 ../src/msw/progdlg.cpp:407
+msgid "Done."
+msgstr "完成."
+
+#: ../src/richtext/richtextborderspage.cpp:544
+#, fuzzy
+msgid "Dotted"
+msgstr "完成"
+
+#: ../src/richtext/richtextborderspage.cpp:546
+#, fuzzy
+msgid "Double"
+msgstr "完成"
+
+#: ../src/common/paper.cpp:177
+msgid "Double Japanese Postcard Rotated 148 x 200 mm"
+msgstr "横向日本双明信片, 148 x 200 毫米"
+
+#: ../src/common/xtixml.cpp:273
+#, c-format
+msgid "Doubly used id : %d"
+msgstr "重复使用的id : %d"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:153
+msgid "Down"
+msgstr "向下"
+
+#: ../src/richtext/richtextctrl.cpp:814
+msgid "Drag"
+msgstr "移动"
+
+#: ../src/common/paper.cpp:101
+msgid "E sheet, 34 x 44 in"
+msgstr "E 纸张,34 x 44 英寸"
+
+#: ../src/common/accelcmn.cpp:61
+msgid "END"
+msgstr "END"
+
+#: ../src/common/accelcmn.cpp:52
+msgid "ENTER"
+msgstr "ENTER"
+
+#: ../src/unix/fswatcher_inotify.cpp:535
+msgid "EOF while reading from inotify descriptor"
+msgstr "读取 inotify 描述符时遇到 EOF"
+
+#: ../src/common/accelcmn.cpp:64
+msgid "ESC"
+msgstr "ESC"
+
+#: ../src/common/accelcmn.cpp:65
+msgid "ESCAPE"
+msgstr "ESCAPE"
+
+#: ../src/common/accelcmn.cpp:73
+msgid "EXECUTE"
+msgstr "EXECUTE"
+
+#: ../src/common/stockitem.cpp:154
+msgid "Edit"
+msgstr "编辑"
+
+#: ../src/generic/editlbox.cpp:272
+msgid "Edit item"
+msgstr "编辑项"
+
+#: ../include/wx/generic/progdlgg.h:84
+msgid "Elapsed time:"
+msgstr "用时: "
+
+#: ../src/richtext/richtextsizepage.cpp:353
+#: ../src/richtext/richtextsizepage.cpp:355
+#: ../src/richtext/richtextsizepage.cpp:465
+#: ../src/richtext/richtextsizepage.cpp:467
+msgid "Enable the height value."
+msgstr "启用高度值。"
+
+#: ../src/richtext/richtextsizepage.cpp:438
+#: ../src/richtext/richtextsizepage.cpp:440
+msgid "Enable the maximum width value."
+msgstr "启用最大宽度值。"
+
+#: ../src/richtext/richtextsizepage.cpp:411
+#: ../src/richtext/richtextsizepage.cpp:413
+msgid "Enable the minimum height value."
+msgstr "启用最小高度值。"
+
+#: ../src/richtext/richtextsizepage.cpp:384
+#: ../src/richtext/richtextsizepage.cpp:386
+msgid "Enable the minimum width value."
+msgstr "启用最小宽度值。"
+
+#: ../src/richtext/richtextsizepage.cpp:319
+#: ../src/richtext/richtextsizepage.cpp:321
+msgid "Enable the width value."
+msgstr "启用宽度值。"
+
+#: ../src/richtext/richtextsizepage.cpp:280
+#: ../src/richtext/richtextsizepage.cpp:282
+msgid "Enable vertical alignment."
+msgstr "启用垂直对齐。"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:133
+#: ../src/richtext/richtextbackgroundpage.cpp:135
+msgid "Enables a background colour."
+msgstr "启用背景颜色。"
+
+#: ../src/richtext/richtextstyledlg.cpp:931
+msgid "Enter a box style name"
+msgstr "输入文字方块样式名称"
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+msgid "Enter a character style name"
+msgstr "输入文字样式名"
+
+#: ../src/richtext/richtextstyledlg.cpp:817
+msgid "Enter a list style name"
+msgstr "输入列表样式名"
+
+#: ../src/richtext/richtextstyledlg.cpp:890
+msgid "Enter a new style name"
+msgstr "输入新样式名"
+
+#: ../src/richtext/richtextstyledlg.cpp:651
+msgid "Enter a paragraph style name"
+msgstr "输入段落样式名"
+
+#: ../src/generic/dbgrptg.cpp:174
+#, c-format
+msgid "Enter command to open file \"%s\":"
+msgstr "输入命令以打开文件 \"%s\":"
+
+#: ../src/generic/helpext.cpp:463
+msgid "Entries found"
+msgstr "找到的条目"
+
+#: ../src/common/paper.cpp:143
+msgid "Envelope Invite 220 x 220 mm"
+msgstr "邀请信, 220 x 220 毫米"
+
+#: ../src/common/config.cpp:473
+#, c-format
+msgid ""
+"Environment variables expansion failed: missing '%c' at position %u in '%s'."
+msgstr "环境变量扩展失败:  '%c' 没有出现在位置 %u / '%s'。"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/dirctrlg.cpp:688
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:791
+#: ../src/generic/filectrlg.cpp:805 ../src/generic/filectrlg.cpp:821
+#: ../src/generic/filectrlg.cpp:1381 ../src/generic/filectrlg.cpp:1412
+#: ../src/gtk/filedlg.cpp:73 ../src/gtk1/fontdlg.cpp:74
+msgid "Error"
+msgstr "错误"
+
+#: ../src/unix/epolldispatcher.cpp:103
+msgid "Error closing epoll descriptor"
+msgstr "关闭 epoll 描述符时发生错误"
+
+#: ../src/unix/fswatcher_kqueue.cpp:114
+msgid "Error closing kqueue instance"
+msgstr "关闭 kqueue 实例时发生错误"
+
+#: ../src/generic/dirdlgg.cpp:251
+msgid "Error creating directory"
+msgstr "创建目录错误"
+
+#: ../src/common/imagbmp.cpp:1103
+msgid "Error in reading image DIB."
+msgstr "读取图像 DIB 错误。"
+
+#: ../src/propgrid/propgrid.cpp:6563
+#, c-format
+msgid "Error in resource: %s"
+msgstr "资源错误: %s"
+
+#: ../src/common/fileconf.cpp:453
+msgid "Error reading config options."
+msgstr "读配置选项错误。"
+
+#: ../src/common/fileconf.cpp:1064
+msgid "Error saving user configuration data."
+msgstr "保存用户配置数据错误."
+
+#: ../src/gtk/print.cpp:671
+msgid "Error while printing: "
+msgstr "打印时出错: "
+
+#: ../src/common/log.cpp:223
+msgid "Error: "
+msgstr "错误: "
+
+#: ../src/common/fmapbase.cpp:150
+msgid "Esperanto (ISO-8859-3)"
+msgstr "世界语 (ISO-8859-3)"
+
+#: ../include/wx/generic/progdlgg.h:85
+msgid "Estimated time:"
+msgstr "预期时间:"
+
+#: ../src/unix/fswatcher_inotify.cpp:639
+msgid "Event queue overflowed"
+msgstr "消息队列溢出"
+
+#: ../src/generic/dbgrptg.cpp:234
+msgid "Executable files (*.exe)|*.exe|"
+msgstr "可执行文件 (*.exe)|*.exe|"
+
+#: ../src/common/stockitem.cpp:155
+msgid "Execute"
+msgstr "执行"
+
+#: ../src/msw/utilsexc.cpp:888
+#, c-format
+msgid "Execution of command '%s' failed"
+msgstr "命令 '%s' 执行失败"
+
+#: ../src/os2/utilsexc.cpp:163
+#, c-format
+msgid "Execution of command '%s' failed with error: %ul"
+msgstr "命令 '%s' 执行失败, 错误信息: %ul"
+
+#: ../src/common/paper.cpp:106
+msgid "Executive, 7 1/4 x 10 1/2 in"
+msgstr "实用纸张(Executive), 7 1/4 x 10 1/2 英寸"
+
+#: ../src/msw/registry.cpp:1230
+#, c-format
+msgid ""
+"Exporting registry key: file \"%s\" already exists and won't be overwritten."
+msgstr "导出注册键: 文件 \"%s\"已经存在, 无法覆盖."
+
+#: ../src/common/fmapbase.cpp:195
+msgid "Extended Unix Codepage for Japanese (EUC-JP)"
+msgstr "扩展的日本语Unix代码页 (EUC-JP)"
+
+#: ../src/html/chm.cpp:725
+#, c-format
+msgid "Extraction of '%s' into '%s' failed."
+msgstr "将 '%s' 解压至 '%s' 失败。"
+
+#: ../src/common/accelcmn.cpp:238 ../src/common/accelcmn.cpp:333
+msgid "F"
+msgstr "F"
+
+#: ../src/propgrid/advprops.cpp:640
+msgid "Face Name"
+msgstr "字体名称"
+
+#: ../src/unix/snglinst.cpp:269
+msgid "Failed to access lock file."
+msgstr "无法访问锁文件。"
+
+#: ../src/unix/epolldispatcher.cpp:116
+#, c-format
+msgid "Failed to add descriptor %d to epoll descriptor %d"
+msgstr "无法将描述符 %d 加到 epoll 描述符 %d"
+
+#: ../src/msw/dib.cpp:548
+#, c-format
+msgid "Failed to allocate %luKb of memory for bitmap data."
+msgstr "无法为位图数据分配 %luKb 内存。"
+
+#: ../src/common/glcmn.cpp:87
+msgid "Failed to allocate colour for OpenGL"
+msgstr "无法为 OpenGL 分配颜色"
+
+#: ../src/unix/displayx11.cpp:288
+msgid "Failed to change video mode"
+msgstr "无法改变视频模式。"
+
+#: ../src/common/image.cpp:3139
+#, c-format
+msgid "Failed to check format of image file \"%s\"."
+msgstr "无法确认图像文件 \"%s\" 的格式。"
+
+#: ../src/common/debugrpt.cpp:244
+#, c-format
+msgid "Failed to clean up debug report directory \"%s\""
+msgstr "无法清除调试报告目录 \"%s\""
+
+#: ../src/common/filename.cpp:211
+msgid "Failed to close file handle"
+msgstr "无法关闭文件句柄"
+
+#: ../src/unix/snglinst.cpp:334
+#, c-format
+msgid "Failed to close lock file '%s'"
+msgstr "无法关闭锁文件 '%s'"
+
+#: ../src/msw/clipbrd.cpp:115
+msgid "Failed to close the clipboard."
+msgstr "无法关闭剪贴板。"
+
+#: ../src/x11/utils.cpp:204
+#, c-format
+msgid "Failed to close the display \"%s\""
+msgstr "无法关闭显示 \"%s\""
+
+#: ../src/msw/dialup.cpp:818
+msgid "Failed to connect: missing username/password."
+msgstr "连接失败: 缺少用户名/口令。"
+
+#: ../src/msw/dialup.cpp:764
+msgid "Failed to connect: no ISP to dial."
+msgstr "连接失败: 没有要拨号的 ISP。"
+
+#: ../src/common/textfile.cpp:200
+#, c-format
+msgid "Failed to convert file \"%s\" to Unicode."
+msgstr "无法转换文件 \"%s\" 为 Unicode。"
+
+#: ../src/generic/logg.cpp:976
+msgid "Failed to copy dialog contents to the clipboard."
+msgstr "无法将对话框内容复制到剪贴板。"
+
+#: ../src/msw/registry.cpp:691
+#, c-format
+msgid "Failed to copy registry value '%s'"
+msgstr "无法复制注册键值 '%s'"
+
+#: ../src/msw/registry.cpp:700
+#, c-format
+msgid "Failed to copy the contents of registry key '%s' to '%s'."
+msgstr "无法把注册键内容从 '%s' 复制到 '%s'。"
+
+#: ../src/common/filefn.cpp:1058
+#, c-format
+msgid "Failed to copy the file '%s' to '%s'"
+msgstr "无法复制文件 '%s' 至 '%s'"
+
+#: ../src/msw/registry.cpp:678
+#, c-format
+msgid "Failed to copy the registry subkey '%s' to '%s'."
+msgstr "无法复制注册表子键 '%s' 至 '%s'。"
+
+#: ../src/msw/dde.cpp:1073
+msgid "Failed to create DDE string"
+msgstr "无法创建 DDE 字符串"
+
+#: ../src/msw/mdi.cpp:590
+msgid "Failed to create MDI parent frame."
+msgstr "无法创建 MDI 父框架。"
+
+#: ../src/common/filename.cpp:1080
+msgid "Failed to create a temporary file name"
+msgstr "无法创建临时文件名"
+
+#: ../src/msw/utilsexc.cpp:235
+msgid "Failed to create an anonymous pipe"
+msgstr "无法创建匿名管道"
+
+#: ../src/msw/ole/automtn.cpp:522
+#, c-format
+msgid "Failed to create an instance of \"%s\""
+msgstr "无法创建实例 \"%s\""
+
+#: ../src/msw/dde.cpp:442
+#, c-format
+msgid "Failed to create connection to server '%s' on topic '%s'"
+msgstr "无法创建到服务器 '%s' 关于主题 '%s' 的连接"
+
+#: ../src/msw/cursor.cpp:212
+msgid "Failed to create cursor."
+msgstr "无法创建游标。"
+
+#: ../src/common/debugrpt.cpp:209
+#, c-format
+msgid "Failed to create directory \"%s\""
+msgstr "无法创建目录 \"%s\""
+
+#: ../src/generic/dirdlgg.cpp:249
+#, c-format
+msgid ""
+"Failed to create directory '%s'\n"
+"(Do you have the required permissions?)"
+msgstr ""
+"无法创建目录 '%s'\n"
+"(您是否有所需的权限?)"
+
+#: ../src/unix/epolldispatcher.cpp:84
+msgid "Failed to create epoll descriptor"
+msgstr "无法创建 epoll 描述符"
+
+#: ../src/msw/mimetype.cpp:198
+#, c-format
+msgid "Failed to create registry entry for '%s' files."
+msgstr "无法为 '%s' 文件创建注册条目。"
+
+#: ../src/msw/fdrepdlg.cpp:442
+#, c-format
+msgid "Failed to create the standard find/replace dialog (error code %d)"
+msgstr "无法创建标准\"查找/替换\"对话框 (错误号 %d)"
+
+#: ../src/unix/wakeuppipe.cpp:52
+#, fuzzy
+msgid "Failed to create wake up pipe used by event loop."
+msgstr "创建状态条失败."
+
+#: ../src/html/winpars.cpp:739
+#, c-format
+msgid "Failed to display HTML document in %s encoding"
+msgstr "无法按编码 %s 显示 HTML 文档"
+
+#: ../src/msw/clipbrd.cpp:127
+msgid "Failed to empty the clipboard."
+msgstr "无法清空剪贴板"
+
+#: ../src/unix/displayx11.cpp:265
+msgid "Failed to enumerate video modes"
+msgstr "无法枚举视频模式"
+
+#: ../src/msw/dde.cpp:727
+msgid "Failed to establish an advise loop with DDE server"
+msgstr "无法在 DDE 服务器建立 advise 循环"
+
+#: ../src/msw/dialup.cpp:650 ../src/msw/dialup.cpp:884
+#, c-format
+msgid "Failed to establish dialup connection: %s"
+msgstr "无法建立拨号连接: %s"
+
+#: ../src/unix/utilsunx.cpp:617
+#, c-format
+msgid "Failed to execute '%s'\n"
+msgstr "无法执行 '%s'\n"
+
+#: ../src/common/debugrpt.cpp:725
+msgid "Failed to execute curl, please install it in PATH."
+msgstr "无法执行curl,请在PATH变量所指的目录中安装curl。"
+
+#: ../src/msw/ole/automtn.cpp:505
+#, c-format
+msgid "Failed to find CLSID of \"%s\""
+msgstr "无法找到 \"%s\" 的 CLSID"
+
+#: ../src/common/regex.cpp:434 ../src/common/regex.cpp:482
+#, c-format
+msgid "Failed to find match for regular expression: %s"
+msgstr "无法找到匹配的正则表达式: %s"
+
+#: ../src/msw/dialup.cpp:716
+#, c-format
+msgid "Failed to get ISP names: %s"
+msgstr "无法获取 ISP 名称: %s"
+
+#: ../src/msw/ole/automtn.cpp:574
+#, fuzzy, c-format
+msgid "Failed to get OLE automation interface for \"%s\""
+msgstr "无法创建目录 \"%s\""
+
+#: ../src/msw/clipbrd.cpp:747
+msgid "Failed to get data from the clipboard"
+msgstr "无法从剪贴板获取数据"
+
+#: ../src/common/time.cpp:249
+msgid "Failed to get the local system time"
+msgstr "无法获取本地系统时间"
+
+#: ../src/common/filefn.cpp:1453
+msgid "Failed to get the working directory"
+msgstr "无法获取工作目录"
+
+#: ../src/univ/theme.cpp:113
+msgid "Failed to initialize GUI: no built-in themes found."
+msgstr "无法初始化 GUI: 找不到内嵌的主题。"
+
+#: ../src/msw/helpchm.cpp:63
+msgid "Failed to initialize MS HTML Help."
+msgstr "无法初始化 MS HTML 帮助。"
+
+#: ../src/msw/glcanvas.cpp:892
+msgid "Failed to initialize OpenGL"
+msgstr "无法初始化 OpenGL"
+
+#: ../src/msw/dialup.cpp:879
+#, c-format
+msgid "Failed to initiate dialup connection: %s"
+msgstr "无法初始化拨号连接: %s"
+
+#: ../src/gtk/textctrl.cpp:1117
+msgid "Failed to insert text in the control."
+msgstr "无法在控件中插入文字。"
+
+#: ../src/unix/snglinst.cpp:241
+#, c-format
+msgid "Failed to inspect the lock file '%s'"
+msgstr "无法检查锁文件 '%s'"
+
+#: ../src/unix/appunix.cpp:182
+msgid "Failed to install signal handler"
+msgstr "无法安装信号句柄"
+
+#: ../src/unix/threadpsx.cpp:1162
+msgid ""
+"Failed to join a thread, potential memory leak detected - please restart the "
+"program"
+msgstr "无法合并线程,检测到潜在地内存丢失 - 请重新启动系统"
+
+#: ../src/msw/utils.cpp:745
+#, c-format
+msgid "Failed to kill process %d"
+msgstr "无法终止进程 %d"
+
+#: ../src/common/image.cpp:2365
+#, c-format
+msgid "Failed to load bitmap \"%s\" from resources."
+msgstr "无法从资源中载入图像 \"%s\"。"
+
+#: ../src/common/image.cpp:2374
+#, c-format
+msgid "Failed to load icon \"%s\" from resources."
+msgstr "无法从资源中载入图标 \"%s\"。"
+
+#: ../src/common/iconbndl.cpp:182
+#, c-format
+msgid "Failed to load image %%d from file '%s'."
+msgstr "无法从文件 '%s' 中读取图像 %%d。"
+
+#: ../src/common/iconbndl.cpp:190
+#, c-format
+msgid "Failed to load image %d from stream."
+msgstr "无法从数据流中载入图像 %d。"
+
+#: ../src/common/image.cpp:2450 ../src/common/image.cpp:2469
+#, c-format
+msgid "Failed to load image from file \"%s\"."
+msgstr "无法从文件 \"%s\" 中读取图像。"
+
+#: ../src/msw/enhmeta.cpp:97
+#, c-format
+msgid "Failed to load metafile from file \"%s\"."
+msgstr "无法从文件 \"%s\" 读取元文件。"
+
+#: ../src/msw/volume.cpp:327
+msgid "Failed to load mpr.dll."
+msgstr "无法装载 mpr.dll。"
+
+#: ../src/msw/utils.cpp:1120
+#, c-format
+msgid "Failed to load resource \"%s\"."
+msgstr "无法载入资源 \"%s\"。"
+
+#: ../src/common/dynlib.cpp:100
+#, c-format
+msgid "Failed to load shared library '%s'"
+msgstr "无法装载共享库 '%s'"
+
+#: ../src/msw/utils.cpp:1127
+#, c-format
+msgid "Failed to lock resource \"%s\"."
+msgstr "无法锁定资源 \"%s\"。"
+
+#: ../src/unix/snglinst.cpp:198
+#, c-format
+msgid "Failed to lock the lock file '%s'"
+msgstr "无法锁定锁文件 '%s'"
+
+#: ../src/unix/epolldispatcher.cpp:136
+#, c-format
+msgid "Failed to modify descriptor %d in epoll descriptor %d"
+msgstr "无法修改描述符 %d (于epoll描述符 %d)"
+
+#: ../src/common/filename.cpp:2681
+#, c-format
+msgid "Failed to modify file times for '%s'"
+msgstr "无法为 '%s' 修改文件时间"
+
+#: ../src/common/selectdispatcher.cpp:252
+msgid "Failed to monitor I/O channels"
+msgstr "无法检测I/O通道"
+
+#: ../src/common/filename.cpp:194
+#, c-format
+msgid "Failed to open '%s' for reading"
+msgstr "无法读取文件 '%s'"
+
+#: ../src/common/filename.cpp:199
+#, c-format
+msgid "Failed to open '%s' for writing"
+msgstr "无法写入文件 '%s'"
+
+#: ../src/html/chm.cpp:141
+#, c-format
+msgid "Failed to open CHM archive '%s'."
+msgstr "无法打开 CHM 存档 '%s'。"
+
+#: ../src/common/utilscmn.cpp:1135
+#, c-format
+msgid "Failed to open URL \"%s\" in default browser."
+msgstr "无法在默认浏览器中打开 URL \"%s\"。"
+
+#: ../include/wx/msw/private/fswatcher.h:92
+#, fuzzy, c-format
+msgid "Failed to open directory \"%s\" for monitoring."
+msgstr "打开 '%s'(为 %s) 失败"
+
+#: ../src/x11/utils.cpp:223
+#, fuzzy, c-format
+msgid "Failed to open display \"%s\"."
+msgstr "打开 '%s'(为 %s) 失败"
+
+#: ../src/common/filename.cpp:1115
+msgid "Failed to open temporary file."
+msgstr "无法打开临时文件。"
+
+#: ../src/msw/clipbrd.cpp:94
+msgid "Failed to open the clipboard."
+msgstr "无法打开剪贴板。"
+
+#: ../src/common/translation.cpp:1170
+#, c-format
+msgid "Failed to parse Plural-Forms: '%s'"
+msgstr "无法解析复数形式: '%s'"
+
+#: ../src/unix/mediactrl.cpp:1268
+#, fuzzy, c-format
+msgid "Failed to prepare playing \"%s\"."
+msgstr "打开 '%s'(为 %s) 失败"
+
+#: ../src/msw/clipbrd.cpp:647
+msgid "Failed to put data on the clipboard"
+msgstr "无法把数据放到剪贴板"
+
+#: ../src/unix/snglinst.cpp:278
+msgid "Failed to read PID from lock file."
+msgstr "无法从锁文件读取 PID。"
+
+#: ../src/common/fileconf.cpp:464
+msgid "Failed to read config options."
+msgstr "无法读配置选项。"
+
+#: ../src/common/docview.cpp:678
+#, c-format
+msgid "Failed to read document from the file \"%s\"."
+msgstr "无法从文件 \"%s\" 中读取文档。"
+
+#: ../src/dfb/evtloop.cpp:98
+msgid "Failed to read event from DirectFB pipe"
+msgstr "无法从 DirectFB 管道中读取事件"
+
+#: ../src/unix/wakeuppipe.cpp:120
+#, fuzzy
+msgid "Failed to read from wake-up pipe"
+msgstr "从锁文件读取PID失败."
+
+#: ../src/unix/utilsunx.cpp:685
+msgid "Failed to redirect child process input/output"
+msgstr "无法重定向子过程输入/输出"
+
+#: ../src/msw/utilsexc.cpp:697
+msgid "Failed to redirect the child process IO"
+msgstr "无法重定向子过程 IO"
+
+#: ../src/msw/dde.cpp:293
+#, c-format
+msgid "Failed to register DDE server '%s'"
+msgstr "无法注册 DDE 服务器 '%s'"
+
+#: ../src/common/fontmap.cpp:245
+#, c-format
+msgid "Failed to remember the encoding for the charset '%s'."
+msgstr "无法记忆字符集 '%s' 的编码。"
+
+#: ../src/common/debugrpt.cpp:227
+#, c-format
+msgid "Failed to remove debug report file \"%s\""
+msgstr "无法删除调试报告文件 \"%s\""
+
+#: ../src/unix/snglinst.cpp:322
+#, c-format
+msgid "Failed to remove lock file '%s'"
+msgstr "无法删除锁文件 '%s'"
+
+#: ../src/unix/snglinst.cpp:288
+#, c-format
+msgid "Failed to remove stale lock file '%s'."
+msgstr "无法删除过期的锁文件 '%s'。"
+
+#: ../src/msw/registry.cpp:528
+#, c-format
+msgid "Failed to rename registry value '%s' to '%s'."
+msgstr "无法将注册值 '%s' 重命名为 '%s'。"
+
+#: ../src/common/filefn.cpp:1168
+#, c-format
+msgid ""
+"Failed to rename the file '%s' to '%s' because the destination file already "
+"exists."
+msgstr "无法将文件'%s' 重命名为 '%s',因为目标文件已存在。"
+
+#: ../src/msw/registry.cpp:633
+#, c-format
+msgid "Failed to rename the registry key '%s' to '%s'."
+msgstr "无法将注册键 '%s' 重命名为 '%s'。"
+
+#: ../src/msw/clipbrd.cpp:497
+msgid "Failed to retrieve data from the clipboard."
+msgstr "无法从剪贴板检取数据。"
+
+#: ../src/common/filename.cpp:2777
+#, c-format
+msgid "Failed to retrieve file times for '%s'"
+msgstr "无法提取 '%s' 文件时间"
+
+#: ../src/msw/dialup.cpp:487
+msgid "Failed to retrieve text of RAS error message"
+msgstr "无法提取 RAS 错误消息正文"
+
+#: ../src/msw/clipbrd.cpp:784
+msgid "Failed to retrieve the supported clipboard formats"
+msgstr "无法提取支持的剪贴板格式"
+
+#: ../src/common/docview.cpp:649
+#, fuzzy, c-format
+msgid "Failed to save document to the file \"%s\"."
+msgstr "将位图图像保存至文件 \"%s\"失败."
+
+#: ../src/msw/dib.cpp:326
+#, c-format
+msgid "Failed to save the bitmap image to file \"%s\"."
+msgstr "无法将位图图像保存至文件 \"%s\"。"
+
+#: ../src/msw/dde.cpp:768
+msgid "Failed to send DDE advise notification"
+msgstr "无法发送 DDE advise 通知"
+
+#: ../src/common/ftp.cpp:404
+#, c-format
+msgid "Failed to set FTP transfer mode to %s."
+msgstr "无法设置 FTP 传输模式为 %s。"
+
+#: ../src/msw/clipbrd.cpp:373
+msgid "Failed to set clipboard data."
+msgstr "无法设置剪贴板数据。"
+
+#: ../src/unix/snglinst.cpp:181
+#, c-format
+msgid "Failed to set permissions on lock file '%s'"
+msgstr "无法在锁文件 '%s' 上设置许可权限"
+
+#: ../src/unix/utilsunx.cpp:674
+msgid "Failed to set process priority"
+msgstr "无法设置线程优先级"
+
+#: ../src/common/file.cpp:576
+msgid "Failed to set temporary file permissions"
+msgstr "无法设置临时文件的许可权限"
+
+#: ../src/gtk/textctrl.cpp:1058
+#, fuzzy
+msgid "Failed to set text in the text control."
+msgstr "获取工作目录失败"
+
+#: ../src/unix/threadpsx.cpp:1293
+#, fuzzy, c-format
+msgid "Failed to set thread concurrency level to %lu"
+msgstr "设置线程优先级 %d 失败。"
+
+#: ../src/unix/threadpsx.cpp:1377 ../src/unix/threadpsx.cpp:1387
+#, c-format
+msgid "Failed to set thread priority %d."
+msgstr "无法设置线程优先级 %d。"
+
+#: ../src/unix/utilsunx.cpp:791
+msgid "Failed to set up non-blocking pipe, the program might hang."
+msgstr "无法设置非闭塞通道,程序可能挂起。"
+
+#: ../src/common/fs_mem.cpp:261
+#, c-format
+msgid "Failed to store image '%s' to memory VFS!"
+msgstr "无法将图像 '%s' 存到内存 VFS!"
+
+#: ../src/dfb/evtloop.cpp:170
+msgid "Failed to switch DirectFB pipe to non-blocking mode"
+msgstr "无法将DirectFB通道切换至非闭塞模式"
+
+#: ../src/unix/wakeuppipe.cpp:59
+msgid "Failed to switch wake up pipe to non-blocking mode"
+msgstr "无法将唤醒管道切换至非闭塞模式"
+
+#: ../src/unix/threadpsx.cpp:1569
+msgid "Failed to terminate a thread."
+msgstr "无法终止线程。"
+
+#: ../src/msw/dde.cpp:746
+msgid "Failed to terminate the advise loop with DDE server"
+msgstr "无法终止与 DDE 服务器的 advise 循环"
+
+#: ../src/msw/dialup.cpp:959
+#, c-format
+msgid "Failed to terminate the dialup connection: %s"
+msgstr "无法终止拨号连接: %s"
+
+#: ../src/common/filename.cpp:2696
+#, c-format
+msgid "Failed to touch the file '%s'"
+msgstr "对文件 '%s' 进行 touch 操作时失败"
+
+#: ../src/unix/snglinst.cpp:328
+#, c-format
+msgid "Failed to unlock lock file '%s'"
+msgstr "无法对已锁文件 '%s' 解锁"
+
+#: ../src/msw/dde.cpp:314
+#, c-format
+msgid "Failed to unregister DDE server '%s'"
+msgstr "无法撤消 DDE 服务器 '%s' 的注册"
+
+#: ../src/unix/epolldispatcher.cpp:155
+#, fuzzy, c-format
+msgid "Failed to unregister descriptor %d from epoll descriptor %d"
+msgstr "从剪贴板检取数据失败."
+
+#: ../src/common/fileconf.cpp:1037
+msgid "Failed to update user configuration file."
+msgstr "无法更新用户配置文件。"
+
+#: ../src/common/debugrpt.cpp:738
+#, c-format
+msgid "Failed to upload the debug report (error code %d)."
+msgstr "无法上传调试报告 (错误号 %d)。"
+
+#: ../src/unix/snglinst.cpp:168
+#, c-format
+msgid "Failed to write to lock file '%s'"
+msgstr "无法写入锁文件 '%s'"
+
+#: ../src/propgrid/propgrid.cpp:172
+msgid "False"
+msgstr "False"
+
+#: ../src/propgrid/advprops.cpp:658
+#, fuzzy
+msgid "Family"
+msgstr "字体(&F):"
+
+#: ../src/common/stockitem.cpp:157 ../src/msw/wince/filedlgwce.cpp:121
+msgid "File"
+msgstr "文件"
+
+#: ../src/common/docview.cpp:666
+#, c-format
+msgid "File \"%s\" could not be opened for reading."
+msgstr "文件 \"%s\" 无法开启为读取模式。"
+
+#: ../src/common/docview.cpp:643
+#, c-format
+msgid "File \"%s\" could not be opened for writing."
+msgstr "文件 \"%s\" 无法开启为写入模式。"
+
+#: ../src/gtk/filedlg.cpp:56
+#, c-format
+msgid "File '%s' already exists, do you really want to overwrite it?"
+msgstr "文件 '%s' 已存在,确实需要复写它?"
+
+#: ../src/os2/filedlg.cpp:310
+#, c-format
+msgid ""
+"File '%s' already exists.\n"
+"Do you want to replace it?"
+msgstr ""
+"文件 '%s' 已存在。\n"
+"真的需要替换它?"
+
+#: ../src/common/filefn.cpp:1207
+#, c-format
+msgid "File '%s' couldn't be removed"
+msgstr "文件 '%s' 无法被移除"
+
+#: ../src/common/filefn.cpp:1187
+#, c-format
+msgid "File '%s' couldn't be renamed '%s'"
+msgstr "文件 '%s' 无法重命名为 '%s'"
+
+#: ../src/richtext/richtextctrl.cpp:2688 ../src/common/textcmn.cpp:921
+msgid "File couldn't be loaded."
+msgstr "文件无法装载。"
+
+#: ../src/msw/filedlg.cpp:458
+#, fuzzy, c-format
+msgid "File dialog failed with error code %0lx."
+msgstr "命令 '%s'执行失败, 错误信息: %ul"
+
+#: ../src/common/docview.cpp:1771
+msgid "File error"
+msgstr "文件错误"
+
+#: ../src/generic/dirctrlg.cpp:688 ../src/generic/filectrlg.cpp:805
+msgid "File name exists already."
+msgstr "文件名已存在。"
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Files"
+msgstr "文件"
+
+#: ../src/common/filefn.cpp:1761
+#, c-format
+msgid "Files (%s)"
+msgstr "文件 (%s)"
+
+#: ../src/motif/filedlg.cpp:218
+msgid "Filter"
+msgstr "过滤器"
+
+#: ../src/common/stockitem.cpp:158 ../src/html/helpwnd.cpp:500
+msgid "Find"
+msgstr "查找"
+
+#: ../src/common/stockitem.cpp:159
+msgid "First"
+msgstr "最前"
+
+#: ../src/common/prntbase.cpp:1518
+msgid "First page"
+msgstr "第一页"
+
+#: ../src/richtext/richtextsizepage.cpp:521
+msgid "Fixed"
+msgstr "固定"
+
+#: ../src/html/helpwnd.cpp:1219
+msgid "Fixed font:"
+msgstr "固定字体:"
+
+#: ../src/html/helpwnd.cpp:1282
+msgid "Fixed size face.<br> <b>bold</b> <i>italic</i> "
+msgstr "固定字体. <br> <b>粗体</b> <i>斜体</i> "
+
+#: ../src/richtext/richtextsizepage.cpp:229
+msgid "Floating"
+msgstr "浮动"
+
+#: ../src/common/stockitem.cpp:160
+msgid "Floppy"
+msgstr "软盘"
+
+#: ../src/common/paper.cpp:112
+msgid "Folio, 8 1/2 x 13 in"
+msgstr "对开纸, 8 1/2 x 13 英寸"
+
+#: ../src/richtext/richtextformatdlg.cpp:324 ../src/osx/carbon/fontdlg.cpp:473
+#: ../src/common/stockitem.cpp:194
+msgid "Font"
+msgstr "字体"
+
+#: ../src/richtext/richtextfontpage.cpp:230
+msgid "Font &weight:"
+msgstr "字体粗细(&w):"
+
+#: ../src/html/helpwnd.cpp:1220
+msgid "Font size:"
+msgstr "字体大小:"
+
+#: ../src/richtext/richtextfontpage.cpp:217
+msgid "Font st&yle:"
+msgstr "字体样式(&y):"
+
+#: ../src/osx/carbon/fontdlg.cpp:515
+msgid "Font:"
+msgstr "字体:"
+
+#: ../src/dfb/fontmgr.cpp:198
+#, c-format
+msgid "Fonts index file %s disappeared while loading fonts."
+msgstr "字体索引文件 %s 载入字体时丢失。"
+
+#: ../src/unix/utilsunx.cpp:651
+msgid "Fork failed"
+msgstr "Fork 失败"
+
+#: ../src/common/stockitem.cpp:161
+msgid "Forward"
+msgstr "前进"
+
+#: ../src/common/xtixml.cpp:235
+msgid "Forward hrefs are not supported"
+msgstr "不支持传递hrefs"
+
+#: ../src/html/helpwnd.cpp:888
+#, c-format
+msgid "Found %i matches"
+msgstr "找到 %i 个匹配项"
+
+#: ../src/generic/prntdlgg.cpp:238
+msgid "From:"
+msgstr "从:"
+
+#: ../src/common/imaggif.cpp:160
+msgid "GIF: Invalid gif index."
+msgstr "GIF: 无效的 gif 图像索引。"
+
+#: ../src/common/imaggif.cpp:150
+msgid "GIF: data stream seems to be truncated."
+msgstr "GIF: 数据流似乎已被截断。"
+
+#: ../src/common/imaggif.cpp:134
+msgid "GIF: error in GIF image format."
+msgstr "GIF: GIF文件格式错误。"
+
+#: ../src/common/imaggif.cpp:137
+msgid "GIF: not enough memory."
+msgstr "GIF: 没有足够内存。"
+
+#: ../src/common/imaggif.cpp:140
+msgid "GIF: unknown error!!!"
+msgstr "GIF: 位置错误!!!"
+
+#: ../src/gtk/window.cpp:4288
+msgid ""
+"GTK+ installed on this machine is too old to support screen compositing, "
+"please install GTK+ 2.12 or later."
+msgstr "本机安装的GTK+版本过低,不支持屏幕组合,请安装GTK+2.12或者更新版本。"
+
+#: ../src/univ/themes/gtk.cpp:525
+msgid "GTK+ theme"
+msgstr "GTK+ 主题"
+
+#: ../src/common/preferencescmn.cpp:39
+msgid "General"
+msgstr "通用"
+
+#: ../src/common/prntbase.cpp:243
+msgid "Generic PostScript"
+msgstr "普通PostScript"
+
+#: ../src/common/paper.cpp:136
+msgid "German Legal Fanfold, 8 1/2 x 13 in"
+msgstr "德国法定复写簿, 8 1/2 x 13 英寸"
+
+#: ../src/common/paper.cpp:135
+msgid "German Std Fanfold, 8 1/2 x 12 in"
+msgstr "德国标准复写簿, 8 1/2 x 12 英寸"
+
+#: ../include/wx/xtiprop.h:188
+msgid "GetProperty called w/o valid getter"
+msgstr "调用GetProperty时未带有效的getter"
+
+#: ../include/wx/xtiprop.h:266
+msgid "GetPropertyCollection called on a generic accessor"
+msgstr "在一个通用处理器上调用GetPropertyCollection"
+
+#: ../include/wx/xtiprop.h:206
+msgid "GetPropertyCollection called w/o valid collection getter"
+msgstr "调用GetPropertyCollection时未带有效的collection getter"
+
+#: ../src/html/helpwnd.cpp:673
+msgid "Go back"
+msgstr "返回"
+
+#: ../src/html/helpwnd.cpp:674
+msgid "Go forward"
+msgstr "前进"
+
+#: ../src/html/helpwnd.cpp:676
+msgid "Go one level up in document hierarchy"
+msgstr "到上一级文档目录"
+
+#: ../src/generic/filedlgg.cpp:223 ../src/generic/dirdlgg.cpp:136
+msgid "Go to home directory"
+msgstr "进入 home 目录"
+
+#: ../src/generic/filedlgg.cpp:219
+msgid "Go to parent directory"
+msgstr "进入父目录"
+
+#: ../src/generic/aboutdlgg.cpp:76
+msgid "Graphics art by "
+msgstr "图形艺术设计由 "
+
+#: ../src/common/fmapbase.cpp:154
+msgid "Greek (ISO-8859-7)"
+msgstr "希腊语 (ISO-8859-7)"
+
+#: ../src/richtext/richtextborderspage.cpp:547
+msgid "Groove"
+msgstr ""
+
+#: ../src/common/zstream.cpp:158 ../src/common/zstream.cpp:318
+msgid "Gzip not supported by this version of zlib"
+msgstr "此版本的 zlib 不支持 Gzip"
+
+#: ../src/common/accelcmn.cpp:75
+msgid "HELP"
+msgstr "HELP"
+
+#: ../src/common/accelcmn.cpp:60
+msgid "HOME"
+msgstr "HOME"
+
+#: ../src/html/helpwnd.cpp:1552
+msgid "HTML Help Project (*.hhp)|*.hhp|"
+msgstr "HTML 帮助的工程文件 (*.hhp)|*.hhp|"
+
+#: ../src/html/htmlwin.cpp:659
+#, c-format
+msgid "HTML anchor %s does not exist."
+msgstr "HTML 锚 %s 不存在。"
+
+#: ../src/html/helpwnd.cpp:1550
+msgid "HTML files (*.html;*.htm)|*.html;*.htm|"
+msgstr "HTML文件 (*.html;*.htm)|*.html;*.htm|"
+
+#: ../src/common/stockitem.cpp:162
+msgid "Harddisk"
+msgstr "磁盘"
+
+#: ../src/common/fmapbase.cpp:155
+msgid "Hebrew (ISO-8859-8)"
+msgstr "希伯来语 (ISO-8859-8)"
+
+#: ../include/wx/msgdlg.h:275 ../src/osx/button_osx.cpp:39
+#: ../src/common/stockitem.cpp:163 ../src/html/helpdlg.cpp:66
+#: ../src/html/helpfrm.cpp:116
+msgid "Help"
+msgstr "帮助"
+
+#: ../src/html/helpwnd.cpp:1213
+msgid "Help Browser Options"
+msgstr "帮助浏览器选项"
+
+#: ../src/generic/helpext.cpp:458 ../src/generic/helpext.cpp:459
+msgid "Help Index"
+msgstr "帮助索引"
+
+#: ../src/html/helpwnd.cpp:1534
+msgid "Help Printing"
+msgstr "帮助打印"
+
+#: ../src/html/helpwnd.cpp:814
+msgid "Help Topics"
+msgstr "帮助主题"
+
+#: ../src/html/helpwnd.cpp:1551
+msgid "Help books (*.htb)|*.htb|Help books (*.zip)|*.zip|"
+msgstr "帮助书 (*.htb)|*.htb|帮助书 (*.zip)|*.zip|"
+
+#: ../src/generic/helpext.cpp:271
+#, c-format
+msgid "Help directory \"%s\" not found."
+msgstr "找不到帮助目录 \"%s\"。"
+
+#: ../src/generic/helpext.cpp:279
+#, c-format
+msgid "Help file \"%s\" not found."
+msgstr "找不到帮助文件 \"%s\"。"
+
+#: ../src/html/helpctrl.cpp:63
+#, c-format
+msgid "Help: %s"
+msgstr "帮助: %s"
+
+#: ../src/osx/menu_osx.cpp:602 ../src/osx/menu_osx.cpp:649
+#, c-format
+msgid "Hide %s"
+msgstr "隐藏 %s"
+
+#: ../src/osx/menu_osx.cpp:604 ../src/osx/menu_osx.cpp:651
+msgid "Hide Others"
+msgstr "隐藏其他"
+
+#: ../src/generic/infobar.cpp:85
+msgid "Hide this notification message."
+msgstr "隐藏此通知消息。"
+
+#: ../src/generic/dirdlgg.cpp:98 ../src/common/stockitem.cpp:164
+msgid "Home"
+msgstr "Home"
+
+#: ../src/generic/dirctrlg.cpp:624
+msgid "Home directory"
+msgstr "Home 目录"
+
+#: ../src/richtext/richtextsizepage.cpp:253
+#: ../src/richtext/richtextsizepage.cpp:255
+msgid "How the object will float relative to the text."
+msgstr "对象怎样浮动与文本有关。"
+
+#: ../src/common/imagbmp.cpp:1118
+msgid "ICO: Error in reading mask DIB."
+msgstr "ICO: 读掩码DIB错误。"
+
+#: ../src/common/imagbmp.cpp:1233 ../src/common/imagbmp.cpp:1294
+#: ../src/common/imagbmp.cpp:1305 ../src/common/imagbmp.cpp:1318
+#: ../src/common/imagbmp.cpp:1363 ../src/common/imagbmp.cpp:1375
+#: ../src/common/imagbmp.cpp:1386
+msgid "ICO: Error writing the image file!"
+msgstr "ICO: 写图像文件错误!"
+
+#: ../src/common/imagbmp.cpp:1198
+msgid "ICO: Image too tall for an icon."
+msgstr "ICO: 图像高度超出范围,不适合做图标。"
+
+#: ../src/common/imagbmp.cpp:1206
+msgid "ICO: Image too wide for an icon."
+msgstr "ICO: 图像宽度超出范围,不适合做图标。"
+
+#: ../src/common/imagbmp.cpp:1466
+msgid "ICO: Invalid icon index."
+msgstr "ICO: 无效的图标索引。"
+
+#: ../src/common/imagiff.cpp:759
+msgid "IFF: data stream seems to be truncated."
+msgstr "IFF: 数据流似乎已被截断。"
+
+#: ../src/common/imagiff.cpp:743
+msgid "IFF: error in IFF image format."
+msgstr "IFF: IFF文件格式错误。"
+
+#: ../src/common/imagiff.cpp:746
+msgid "IFF: not enough memory."
+msgstr "IFF: 没有足够内存。"
+
+#: ../src/common/imagiff.cpp:749
+msgid "IFF: unknown error!!!"
+msgstr "IFF: 位置错误!!!"
+
+#: ../src/common/accelcmn.cpp:50
+msgid "INS"
+msgstr "INS"
+
+#: ../src/common/accelcmn.cpp:51
+msgid "INSERT"
+msgstr "INSERT"
+
+#: ../src/common/fmapbase.cpp:197
+msgid "ISO-2022-JP"
+msgstr "ISO-2022-JP"
+
+#: ../src/osx/carbon/dataview.cpp:2420
+msgid "Icon & text renderer cannot render value; value type: "
+msgstr "图标和文本渲染器无法渲染该值; 类型为:"
+
+#: ../src/html/htmprint.cpp:282
+msgid ""
+"If possible, try changing the layout parameters to make the printout more "
+"narrow."
+msgstr "如有可能,请尝试更改布局参数以使输出结果更紧凑。"
+
+#: ../src/generic/dbgrptg.cpp:358
+msgid ""
+"If you have any additional information pertaining to this bug\n"
+"report, please enter it here and it will be joined to it:"
+msgstr ""
+"如果您有任何与此错误报告有关的信息, \n"
+"请在此输入,它将会被加到错误报告中:"
+
+#: ../src/generic/dbgrptg.cpp:324
+msgid ""
+"If you wish to suppress this debug report completely, please choose the "
+"\"Cancel\" button,\n"
+"but be warned that it may hinder improving the program, so if\n"
+"at all possible please do continue with the report generation.\n"
+msgstr ""
+"如果您想完全禁用调试报告,请按\"取消\"按钮,\n"
+"但我们不建议这样做,因为调试报告有助于改进本程序。\n"
+"在可能的情况下,请尽量选择让程序生成调试报告。\n"
+
+#: ../src/msw/registry.cpp:1395
+#, c-format
+msgid "Ignoring value \"%s\" of the key \"%s\"."
+msgstr "忽略值 \"%s\" (键 \"%s\")。"
+
+#: ../src/common/xtistrm.cpp:299
+msgid "Illegal Object Class (Non-wxEvtHandler) as Event Source"
+msgstr "非法的对象类 (非-wxEvtHandler) 作为事件源"
+
+#: ../src/common/xti.cpp:513
+msgid "Illegal Parameter Count for ConstructObject Method"
+msgstr "非法的针对 ConstructObject 方法的参数计数"
+
+#: ../src/common/xti.cpp:501
+msgid "Illegal Parameter Count for Create Method"
+msgstr "非法的针对 Create 方法的参数计数"
+
+#: ../src/generic/dirctrlg.cpp:670 ../src/generic/filectrlg.cpp:791
+msgid "Illegal directory name."
+msgstr "不合法的目录名。"
+
+#: ../src/generic/filectrlg.cpp:1380
+msgid "Illegal file specification."
+msgstr "不合规范的文件描述。"
+
+#: ../src/common/image.cpp:2158
+msgid "Image and mask have different sizes."
+msgstr "图像和掩码的大小不一致。"
+
+#: ../src/common/image.cpp:2609
+#, c-format
+msgid "Image file is not of type %d."
+msgstr "图像文件的类型不是 %d。"
+
+#: ../src/common/image.cpp:2739
+#, c-format
+msgid "Image is not of type %s."
+msgstr "图像的类型不是 %s。"
+
+#: ../src/msw/textctrl.cpp:399
+msgid ""
+"Impossible to create a rich edit control, using simple text control instead. "
+"Please reinstall riched32.dll"
+msgstr ""
+"无法创建富文本编辑器控件,使用简单文本编辑器控件代替。请重新安装 riched32.dll"
+
+#: ../src/unix/utilsunx.cpp:307
+msgid "Impossible to get child process input"
+msgstr "不可能获得子过程的输入"
+
+#: ../src/common/filefn.cpp:1074
+#, c-format
+msgid "Impossible to get permissions for file '%s'"
+msgstr "不可能获得文件 '%s' 的许可权限"
+
+#: ../src/common/filefn.cpp:1088
+#, c-format
+msgid "Impossible to overwrite the file '%s'"
+msgstr "不可能复写文件 '%s'"
+
+#: ../src/common/filefn.cpp:1142
+#, c-format
+msgid "Impossible to set permissions for the file '%s'"
+msgstr "不可能设置文件 '%s' 的许可权限"
+
+#: ../src/common/gifdecod.cpp:818
+#, c-format
+msgid "Incorrect GIF frame size (%u, %d) for the frame #%u"
+msgstr "错误的GIF帧尺寸(%u, %d)对于第#%u帧"
+
+#: ../src/msw/ole/automtn.cpp:624
+msgid "Incorrect number of arguments."
+msgstr "错误的变量数目。"
+
+#: ../src/common/stockitem.cpp:165
+msgid "Indent"
+msgstr "缩进"
+
+#: ../src/richtext/richtextformatdlg.cpp:330
+msgid "Indents && Spacing"
+msgstr "锁紧和空格"
+
+#: ../src/common/stockitem.cpp:166 ../src/html/helpwnd.cpp:525
+msgid "Index"
+msgstr "索引"
+
+#: ../src/common/fmapbase.cpp:159
+msgid "Indian (ISO-8859-12)"
+msgstr "印地安语 (ISO-8859-12)"
+
+#: ../src/common/stockitem.cpp:167
+msgid "Info"
+msgstr "信息"
+
+#: ../src/common/init.cpp:276
+msgid "Initialization failed in post init, aborting."
+msgstr "在后初始化阶段出错,退出..."
+
+#: ../src/richtext/richtextsymboldlg.cpp:472
+msgid "Insert"
+msgstr "插入"
+
+#: ../src/richtext/richtextbuffer.cpp:7687
+#, fuzzy
+msgid "Insert Field"
+msgstr "插入"
+
+#: ../src/richtext/richtextbuffer.cpp:7598
+#: ../src/richtext/richtextbuffer.cpp:8551
+msgid "Insert Image"
+msgstr "插入图片"
+
+#: ../src/richtext/richtextbuffer.cpp:7645
+msgid "Insert Object"
+msgstr "插入对象"
+
+#: ../src/richtext/richtextctrl.cpp:1172 ../src/richtext/richtextctrl.cpp:1362
+#: ../src/richtext/richtextbuffer.cpp:7440
+#: ../src/richtext/richtextbuffer.cpp:7470
+#: ../src/richtext/richtextbuffer.cpp:7514
+msgid "Insert Text"
+msgstr "插入文本"
+
+#: ../src/richtext/richtextindentspage.cpp:295
+#: ../src/richtext/richtextindentspage.cpp:297
+msgid "Inserts a page break before the paragraph."
+msgstr "在段落前插入断页符。"
+
+#: ../src/richtext/richtextborderspage.cpp:549
+#, fuzzy
+msgid "Inset"
+msgstr "缩进"
+
+#: ../src/gtk/app.cpp:429
+#, c-format
+msgid "Invalid GTK+ command line option, use \"%s --help\""
+msgstr "无效的GTK+命令行选项,使用 \"%s --help\""
+
+#: ../src/common/imagtiff.cpp:314
+msgid "Invalid TIFF image index."
+msgstr "无效TIFF图像索引。"
+
+#: ../src/osx/carbon/dataview.cpp:1782 ../src/osx/carbon/dataview.cpp:1877
+msgid "Invalid data view item"
+msgstr "无效的数据视图项"
+
+#: ../src/common/appcmn.cpp:266
+#, c-format
+msgid "Invalid display mode specification '%s'."
+msgstr "无效的显示模式 '%s'。"
+
+#: ../src/x11/app.cpp:121
+#, c-format
+msgid "Invalid geometry specification '%s'"
+msgstr "无效的几何规格 '%s'"
+
+#: ../src/unix/fswatcher_inotify.cpp:298
+#, c-format
+msgid "Invalid inotify event for \"%s\""
+msgstr "无效的 \"%s\" inotify 事件"
+
+#: ../src/unix/snglinst.cpp:306
+#, c-format
+msgid "Invalid lock file '%s'."
+msgstr "无效的锁文件 '%s'。"
+
+#: ../src/common/translation.cpp:1111
+msgid "Invalid message catalog."
+msgstr "无效的消息目录。"
+
+#: ../src/common/xtistrm.cpp:409 ../src/common/xtistrm.cpp:424
+msgid "Invalid or Null Object ID passed to GetObjectClassInfo"
+msgstr "无效的或空的对象 ID 传给 GetObjectClassInfo"
+
+#: ../src/common/xtistrm.cpp:439
+msgid "Invalid or Null Object ID passed to HasObjectClassInfo"
+msgstr "无效的或空的对象 ID 传给 HasObjectClassInfo"
+
+#: ../src/common/regex.cpp:313
+#, c-format
+msgid "Invalid regular expression '%s': %s"
+msgstr "无效的正则表达式 '%s': %s"
+
+#: ../src/common/config.cpp:226
+#, c-format
+msgid "Invalid value %ld for a boolean key \"%s\" in config file."
+msgstr "配置文件中无效的值 %ld 于布尔键 \"%s\"。"
+
+#: ../src/generic/fontdlgg.cpp:329 ../src/richtext/richtextfontpage.cpp:333
+#: ../src/osx/carbon/fontdlg.cpp:547 ../src/common/stockitem.cpp:168
+msgid "Italic"
+msgstr "斜体"
+
+#: ../src/common/paper.cpp:131
+msgid "Italy Envelope, 110 x 230 mm"
+msgstr "意大利信封, 110 x 230 毫米"
+
+#: ../src/common/imagjpeg.cpp:255
+msgid "JPEG: Couldn't load - file is probably corrupted."
+msgstr "JPEG: 无法装入 - 文件也许已被破坏。"
+
+#: ../src/common/imagjpeg.cpp:434
+msgid "JPEG: Couldn't save image."
+msgstr "JPEG: 无法保存图像。"
+
+#: ../src/common/paper.cpp:164
+msgid "Japanese Double Postcard 200 x 148 mm"
+msgstr "日本双明信片, 200 x 148 毫米"
+
+#: ../src/common/paper.cpp:168
+msgid "Japanese Envelope Chou #3"
+msgstr "日本 Chou 3 信封"
+
+#: ../src/common/paper.cpp:181
+msgid "Japanese Envelope Chou #3 Rotated"
+msgstr "日本 Chou 3 信封(横向)"
+
+#: ../src/common/paper.cpp:169
+msgid "Japanese Envelope Chou #4"
+msgstr "日本 Chou 4 信封"
+
+#: ../src/common/paper.cpp:182
+msgid "Japanese Envelope Chou #4 Rotated"
+msgstr "日本 Chou 4 信封(横向)"
+
+#: ../src/common/paper.cpp:166
+msgid "Japanese Envelope Kaku #2"
+msgstr "日本 Kaku 2 信封"
+
+#: ../src/common/paper.cpp:179
+msgid "Japanese Envelope Kaku #2 Rotated"
+msgstr "日本 Kaku 2 信封(横向)"
+
+#: ../src/common/paper.cpp:167
+msgid "Japanese Envelope Kaku #3"
+msgstr "日本 Kaku 3 信封"
+
+#: ../src/common/paper.cpp:180
+msgid "Japanese Envelope Kaku #3 Rotated"
+msgstr "日本 Kaku 3 信封(横向)"
+
+#: ../src/common/paper.cpp:186
+msgid "Japanese Envelope You #4"
+msgstr "日本 You 4 信封"
+
+#: ../src/common/paper.cpp:187
+msgid "Japanese Envelope You #4 Rotated"
+msgstr "日本 You 4 信封(横向)"
+
+#: ../src/common/paper.cpp:139
+msgid "Japanese Postcard 100 x 148 mm"
+msgstr "日本明信片, 100 x 148 毫米"
+
+#: ../src/common/paper.cpp:176
+msgid "Japanese Postcard Rotated 148 x 100 mm"
+msgstr "横向日本明信片, 148 x 100 毫米"
+
+#: ../src/common/stockitem.cpp:169
+msgid "Jump to"
+msgstr "跳转至"
+
+#: ../src/common/stockitem.cpp:171
+msgid "Justified"
+msgstr "分散对齐"
+
+#: ../src/richtext/richtextindentspage.cpp:155
+#: ../src/richtext/richtextindentspage.cpp:157
+#: ../src/richtext/richtextliststylepage.cpp:344
+#: ../src/richtext/richtextliststylepage.cpp:346
+msgid "Justify text left and right."
+msgstr "文本左右对齐。"
+
+#: ../src/common/fmapbase.cpp:163
+msgid "KOI8-R"
+msgstr "KOI8-R"
+
+#: ../src/common/fmapbase.cpp:164
+msgid "KOI8-U"
+msgstr "KOI8-U"
+
+#: ../src/common/accelcmn.cpp:254 ../src/common/accelcmn.cpp:336
+msgid "KP_"
+msgstr "KP_"
+
+#: ../src/common/accelcmn.cpp:103
+msgid "KP_ADD"
+msgstr "KP_ADD"
+
+#: ../src/common/accelcmn.cpp:98
+msgid "KP_BEGIN"
+msgstr "KP_BEGIN"
+
+#: ../src/common/accelcmn.cpp:106
+msgid "KP_DECIMAL"
+msgstr "KP_DECIMAL"
+
+#: ../src/common/accelcmn.cpp:100
+msgid "KP_DELETE"
+msgstr "KP_DELETE"
+
+#: ../src/common/accelcmn.cpp:107
+msgid "KP_DIVIDE"
+msgstr "KP_DIVIDE"
+
+#: ../src/common/accelcmn.cpp:92
+msgid "KP_DOWN"
+msgstr "KP_DOWN"
+
+#: ../src/common/accelcmn.cpp:97
+msgid "KP_END"
+msgstr "KP_END"
+
+#: ../src/common/accelcmn.cpp:87
+msgid "KP_ENTER"
+msgstr "KP_ENTER"
+
+#: ../src/common/accelcmn.cpp:101
+msgid "KP_EQUAL"
+msgstr "KP_EQUAL"
+
+#: ../src/common/accelcmn.cpp:88
+msgid "KP_HOME"
+msgstr "KP_HOME"
+
+#: ../src/common/accelcmn.cpp:99
+msgid "KP_INSERT"
+msgstr "KP_INSERT"
+
+#: ../src/common/accelcmn.cpp:89
+msgid "KP_LEFT"
+msgstr "KP_LEFT"
+
+#: ../src/common/accelcmn.cpp:102
+msgid "KP_MULTIPLY"
+msgstr "KP_MULTIPLY"
+
+#: ../src/common/accelcmn.cpp:95
+msgid "KP_NEXT"
+msgstr "KP_NEXT"
+
+#: ../src/common/accelcmn.cpp:96
+msgid "KP_PAGEDOWN"
+msgstr "KP_PAGEDOWN"
+
+#: ../src/common/accelcmn.cpp:94
+msgid "KP_PAGEUP"
+msgstr "KP_PAGEUP"
+
+#: ../src/common/accelcmn.cpp:93
+msgid "KP_PRIOR"
+msgstr "KP_PRIOR"
+
+#: ../src/common/accelcmn.cpp:91
+msgid "KP_RIGHT"
+msgstr "KP_RIGHT"
+
+#: ../src/common/accelcmn.cpp:104
+msgid "KP_SEPARATOR"
+msgstr "KP_SEPARATOR"
+
+#: ../src/common/accelcmn.cpp:85
+msgid "KP_SPACE"
+msgstr "KP_SPACE"
+
+#: ../src/common/accelcmn.cpp:105
+msgid "KP_SUBTRACT"
+msgstr "KP_SUBTRACT"
+
+#: ../src/common/accelcmn.cpp:86
+msgid "KP_TAB"
+msgstr "KP_TAB"
+
+#: ../src/common/accelcmn.cpp:90
+msgid "KP_UP"
+msgstr "KP_UP"
+
+#: ../src/richtext/richtextindentspage.cpp:270
+msgid "L&ine spacing:"
+msgstr "行距(&I):"
+
+#: ../src/common/accelcmn.cpp:56
+msgid "LEFT"
+msgstr "LEFT"
+
+#: ../src/generic/prntdlgg.cpp:613 ../src/generic/prntdlgg.cpp:868
+msgid "Landscape"
+msgstr "横向"
+
+#: ../src/common/stockitem.cpp:174
+msgid "Last"
+msgstr "最后"
+
+#: ../src/common/prntbase.cpp:1542
+msgid "Last page"
+msgstr "最后一页"
+
+#: ../src/common/log.cpp:309
+#, c-format
+msgid "Last repeated message (\"%s\", %lu time) wasn't output"
+msgid_plural "Last repeated message (\"%s\", %lu times) wasn't output"
+msgstr[0] "最后重复消息(\"%s\", %lu time)未输出"
+
+#: ../src/common/paper.cpp:104
+msgid "Ledger, 17 x 11 in"
+msgstr "帐簿, 17 x 11 英寸"
+
+#: ../src/richtext/richtextliststylepage.cpp:249
+#: ../src/richtext/richtextliststylepage.cpp:252
+#: ../src/richtext/richtextliststylepage.cpp:253
+#: ../src/richtext/richtextbulletspage.cpp:199
+#: ../src/richtext/richtextbulletspage.cpp:202
+#: ../src/richtext/richtextbulletspage.cpp:203
+#: ../src/richtext/richtextsizepage.cpp:249
+msgid "Left"
+msgstr "左"
+
+#: ../src/richtext/richtextindentspage.cpp:204
+#: ../src/richtext/richtextliststylepage.cpp:390
+msgid "Left (&first line):"
+msgstr "左(第一行)(&F):"
+
+#: ../src/generic/prntdlgg.cpp:880
+msgid "Left margin (mm):"
+msgstr "左边距 (毫米):"
+
+#: ../src/richtext/richtextindentspage.cpp:141
+#: ../src/richtext/richtextindentspage.cpp:143
+#: ../src/richtext/richtextliststylepage.cpp:330
+#: ../src/richtext/richtextliststylepage.cpp:332
+msgid "Left-align text."
+msgstr "文字左对齐。"
+
+#: ../src/common/paper.cpp:145
+msgid "Legal Extra 9 1/2 x 15 in"
+msgstr "特大法律纸张, 9 1/2 x 15 英寸"
+
+#: ../src/common/paper.cpp:97
+msgid "Legal, 8 1/2 x 14 in"
+msgstr "标准法律纸张, 8 1/2 x 14 英寸"
+
+#: ../src/common/paper.cpp:144
+msgid "Letter Extra 9 1/2 x 12 in"
+msgstr "特大信纸, 9 1/2 x 12 英寸"
+
+#: ../src/common/paper.cpp:150
+msgid "Letter Extra Transverse 9.275 x 12 in"
+msgstr "特大信纸(横排), 9.275 x 12 英寸"
+
+#: ../src/common/paper.cpp:153
+msgid "Letter Plus 8 1/2 x 12.69 in"
+msgstr "加大信纸, 8 1/2 x 12.69 英寸"
+
+#: ../src/common/paper.cpp:170
+msgid "Letter Rotated 11 x 8 1/2 in"
+msgstr "横向信纸, 11 x 8 1/2 英寸"
+
+#: ../src/common/paper.cpp:102
+msgid "Letter Small, 8 1/2 x 11 in"
+msgstr "信纸(小), 8 1/2 x 11 英寸"
+
+#: ../src/common/paper.cpp:148
+msgid "Letter Transverse 8 1/2 x 11 in"
+msgstr "信纸(横排), 8 1/2 x 11 英寸"
+
+#: ../src/common/paper.cpp:96
+msgid "Letter, 8 1/2 x 11 in"
+msgstr "信纸, 8 1/2 x 11 英寸"
+
+#: ../src/generic/aboutdlgg.cpp:173
+msgid "License"
+msgstr "授权"
+
+#: ../src/generic/fontdlgg.cpp:332
+msgid "Light"
+msgstr "细"
+
+#: ../src/generic/helpext.cpp:298
+#, c-format
+msgid "Line %lu of map file \"%s\" has invalid syntax, skipped."
+msgstr "行 %lu 的map文件 \"%s\" 有无效语法,跳过。"
+
+#: ../src/richtext/richtextliststylepage.cpp:444
+msgid "Line spacing:"
+msgstr "行距:"
+
+#: ../src/html/chm.cpp:838
+msgid "Link contained '//', converted to absolute link."
+msgstr "链接包含 '//',转换为绝对链接."
+
+#: ../src/richtext/richtextformatdlg.cpp:349
+msgid "List Style"
+msgstr "列表样式"
+
+#: ../src/richtext/richtextstyles.cpp:1060
+msgid "List styles"
+msgstr "列表样式"
+
+#: ../src/richtext/richtextfontpage.cpp:206
+#: ../src/richtext/richtextfontpage.cpp:208
+msgid "Lists font sizes in points."
+msgstr "列表字体大小"
+
+#: ../src/richtext/richtextfontpage.cpp:199
+#: ../src/richtext/richtextfontpage.cpp:201
+msgid "Lists the available fonts."
+msgstr "列出可用字体。"
+
+#: ../src/common/fldlgcmn.cpp:325
+#, c-format
+msgid "Load %s file"
+msgstr "装入文件 %s "
+
+#: ../src/html/htmlwin.cpp:575
+msgid "Loading : "
+msgstr "装载: "
+
+#: ../src/unix/snglinst.cpp:246
+#, c-format
+msgid "Lock file '%s' has incorrect owner."
+msgstr "锁文件 '%s' 没有正确的所有者。"
+
+#: ../src/unix/snglinst.cpp:251
+#, c-format
+msgid "Lock file '%s' has incorrect permissions."
+msgstr "锁文件 '%s' 没有正确的权限。"
+
+#: ../src/generic/logg.cpp:582
+#, c-format
+msgid "Log saved to the file '%s'."
+msgstr "日志保存到文件 '%s'。"
+
+#: ../src/richtext/richtextliststylepage.cpp:484
+#: ../src/richtext/richtextbulletspage.cpp:289
+msgid "Lower case letters"
+msgstr "小写字母"
+
+#: ../src/richtext/richtextliststylepage.cpp:486
+#: ../src/richtext/richtextbulletspage.cpp:291
+msgid "Lower case roman numerals"
+msgstr "小写罗马数字"
+
+#: ../src/gtk/mdi.cpp:422 ../src/gtk1/mdi.cpp:431
+msgid "MDI child"
+msgstr "MDI 子窗口"
+
+#: ../src/common/accelcmn.cpp:68
+msgid "MENU"
+msgstr "MENU"
+
+#: ../src/msw/helpchm.cpp:56
+msgid ""
+"MS HTML Help functions are unavailable because the MS HTML Help library is "
+"not installed on this machine. Please install it."
+msgstr "MS HTML帮助功能不存在,因为此机器上没有安装 MS HTML 帮助库。请安装它。"
+
+#: ../src/univ/themes/win32.cpp:3754
+msgid "Ma&ximize"
+msgstr "最大化(&x)"
+
+#: ../src/common/fmapbase.cpp:203
+msgid "MacArabic"
+msgstr "MacArabic"
+
+#: ../src/common/fmapbase.cpp:222
+msgid "MacArmenian"
+msgstr "MacArmenian"
+
+#: ../src/common/fmapbase.cpp:211
+msgid "MacBengali"
+msgstr "MacBengali"
+
+#: ../src/common/fmapbase.cpp:217
+msgid "MacBurmese"
+msgstr "MacBurmese"
+
+#: ../src/common/fmapbase.cpp:236
+msgid "MacCeltic"
+msgstr "MacCeltic"
+
+#: ../src/common/fmapbase.cpp:227
+msgid "MacCentralEurRoman"
+msgstr "MacCentralEurRoman"
+
+#: ../src/common/fmapbase.cpp:223
+msgid "MacChineseSimp"
+msgstr "MacChineseSimp"
+
+#: ../src/common/fmapbase.cpp:201
+msgid "MacChineseTrad"
+msgstr "MacChineseTrad"
+
+#: ../src/common/fmapbase.cpp:233
+msgid "MacCroatian"
+msgstr "MacCroatian"
+
+#: ../src/common/fmapbase.cpp:206
+msgid "MacCyrillic"
+msgstr "MacCyrillic"
+
+#: ../src/common/fmapbase.cpp:207
+msgid "MacDevanagari"
+msgstr "MacDevanagari"
+
+#: ../src/common/fmapbase.cpp:231
+msgid "MacDingbats"
+msgstr "MacDingbats"
+
+#: ../src/common/fmapbase.cpp:226
+msgid "MacEthiopic"
+msgstr "MacEthiopic"
+
+#: ../src/common/fmapbase.cpp:229
+msgid "MacExtArabic"
+msgstr "MacExtArabic"
+
+#: ../src/common/fmapbase.cpp:237
+msgid "MacGaelic"
+msgstr "MacGaelic"
+
+#: ../src/common/fmapbase.cpp:221
+msgid "MacGeorgian"
+msgstr "MacGeorgian"
+
+#: ../src/common/fmapbase.cpp:205
+msgid "MacGreek"
+msgstr "MacGreek"
+
+#: ../src/common/fmapbase.cpp:209
+msgid "MacGujarati"
+msgstr "MacGujarati"
+
+#: ../src/common/fmapbase.cpp:208
+msgid "MacGurmukhi"
+msgstr "MacGurmukhi"
+
+#: ../src/common/fmapbase.cpp:204
+msgid "MacHebrew"
+msgstr "MacHebrew"
+
+#: ../src/common/fmapbase.cpp:234
+msgid "MacIcelandic"
+msgstr "MacIcelandic"
+
+#: ../src/common/fmapbase.cpp:200
+msgid "MacJapanese"
+msgstr "MacJapanese"
+
+#: ../src/common/fmapbase.cpp:214
+msgid "MacKannada"
+msgstr "MacKannada"
+
+#: ../src/common/fmapbase.cpp:238
+msgid "MacKeyboardGlyphs"
+msgstr "MacKeyboardGlyphs"
+
+#: ../src/common/fmapbase.cpp:218
+msgid "MacKhmer"
+msgstr "MacKhmer"
+
+#: ../src/common/fmapbase.cpp:202
+msgid "MacKorean"
+msgstr "MacKorean"
+
+#: ../src/common/fmapbase.cpp:220
+msgid "MacLaotian"
+msgstr "MacLaotian"
+
+#: ../src/common/fmapbase.cpp:215
+msgid "MacMalayalam"
+msgstr "MacMalayalam"
+
+#: ../src/common/fmapbase.cpp:225
+msgid "MacMongolian"
+msgstr "MacMongolian"
+
+#: ../src/common/fmapbase.cpp:210
+msgid "MacOriya"
+msgstr "MacOriya"
+
+#: ../src/common/fmapbase.cpp:199
+msgid "MacRoman"
+msgstr "MacRoman"
+
+#: ../src/common/fmapbase.cpp:235
+msgid "MacRomanian"
+msgstr "MacRomanian"
+
+#: ../src/common/fmapbase.cpp:216
+msgid "MacSinhalese"
+msgstr "MacSinhalese"
+
+#: ../src/common/fmapbase.cpp:230
+msgid "MacSymbol"
+msgstr "MacSymbol"
+
+#: ../src/common/fmapbase.cpp:212
+msgid "MacTamil"
+msgstr "MacTamil"
+
+#: ../src/common/fmapbase.cpp:213
+msgid "MacTelugu"
+msgstr "MacTelugu"
+
+#: ../src/common/fmapbase.cpp:219
+msgid "MacThai"
+msgstr "MacThai"
+
+#: ../src/common/fmapbase.cpp:224
+msgid "MacTibetan"
+msgstr "MacTibetan"
+
+#: ../src/common/fmapbase.cpp:232
+msgid "MacTurkish"
+msgstr "MacTurkish"
+
+#: ../src/common/fmapbase.cpp:228
+msgid "MacVietnamese"
+msgstr "MacVietnamese"
+
+#: ../src/propgrid/advprops.cpp:2031
+msgid "Make a selection:"
+msgstr "请选择:"
+
+#: ../src/richtext/richtextformatdlg.cpp:362
+#: ../src/richtext/richtextmarginspage.cpp:172
+msgid "Margins"
+msgstr "边距"
+
+#: ../src/generic/fdrepdlg.cpp:147
+msgid "Match case"
+msgstr "区分大小写"
+
+#: ../src/richtext/richtextsizepage.cpp:463
+msgid "Max height:"
+msgstr "最达高度:"
+
+#: ../src/richtext/richtextsizepage.cpp:436
+msgid "Max width:"
+msgstr "最大宽度:"
+
+#: ../src/unix/mediactrl.cpp:1006
+#, c-format
+msgid "Media playback error: %s"
+msgstr "媒体回放错误:%s"
+
+#: ../src/common/fs_mem.cpp:175
+#, c-format
+msgid "Memory VFS already contains file '%s'!"
+msgstr "内存 VFS 已包含文件 '%s'!"
+
+#: ../src/msw/frame.cpp:347
+msgid "Menu"
+msgstr "菜单"
+
+#: ../src/common/msgout.cpp:124
+msgid "Message"
+msgstr "消息"
+
+#: ../src/univ/themes/metal.cpp:168
+msgid "Metal theme"
+msgstr "金属主题"
+
+#: ../src/msw/ole/automtn.cpp:641
+msgid "Method or property not found."
+msgstr "找不到方法或属性。"
+
+#: ../src/univ/themes/win32.cpp:3752
+msgid "Mi&nimize"
+msgstr "最小化(&n)"
+
+#: ../src/richtext/richtextsizepage.cpp:409
+msgid "Min height:"
+msgstr "最小高度:"
+
+#: ../src/richtext/richtextsizepage.cpp:382
+msgid "Min width:"
+msgstr "最小宽度: "
+
+#: ../src/msw/ole/automtn.cpp:657
+msgid "Missing a required parameter."
+msgstr "缺少必要参数。"
+
+#: ../src/generic/fontdlgg.cpp:324
+msgid "Modern"
+msgstr "现代"
+
+#: ../src/generic/filectrlg.cpp:462
+msgid "Modified"
+msgstr "修改日期"
+
+#: ../src/common/module.cpp:133
+#, c-format
+msgid "Module \"%s\" initialization failed"
+msgstr "模块 \"%s\" 初始化失败"
+
+#: ../src/common/paper.cpp:132
+msgid "Monarch Envelope, 3 7/8 x 7 1/2 in"
+msgstr "7.75信封,3 7/8 x 7 1/2 英寸"
+
+#: ../src/msw/fswatcher.cpp:143
+msgid "Monitoring individual files for changes is not supported currently."
+msgstr "当前不支持监视单独文件的更改。"
+
+#: ../src/generic/editlbox.cpp:276
+msgid "Move down"
+msgstr "下移"
+
+#: ../src/generic/editlbox.cpp:275
+msgid "Move up"
+msgstr "上移"
+
+#: ../src/richtext/richtextsizepage.cpp:682
+#: ../src/richtext/richtextsizepage.cpp:684
+msgid "Moves the object to the next paragraph."
+msgstr "将对象移至下一段落"
+
+#: ../src/richtext/richtextsizepage.cpp:676
+#: ../src/richtext/richtextsizepage.cpp:678
+msgid "Moves the object to the previous paragraph."
+msgstr "将对象移至前一段落"
+
+#: ../src/richtext/richtextbuffer.cpp:9345
+msgid "Multiple Cell Properties"
+msgstr "多重单元属性"
+
+#: ../src/common/accelcmn.cpp:81
+msgid "NUM_LOCK"
+msgstr "NUM_LOCK"
+
+#: ../src/generic/filectrlg.cpp:459
+msgid "Name"
+msgstr "名称"
+
+#: ../src/common/stockitem.cpp:175
+msgid "Network"
+msgstr "网络"
+
+#: ../src/common/stockitem.cpp:176
+msgid "New"
+msgstr "新建"
+
+#: ../src/richtext/richtextstyledlg.cpp:243
+msgid "New &Box Style..."
+msgstr "新方块样式(&B)"
+
+#: ../src/richtext/richtextstyledlg.cpp:225
+msgid "New &Character Style..."
+msgstr "新增字体样式(&C)..."
+
+#: ../src/richtext/richtextstyledlg.cpp:237
+msgid "New &List Style..."
+msgstr "新增列表样式(&L)..."
+
+#: ../src/richtext/richtextstyledlg.cpp:231
+msgid "New &Paragraph Style..."
+msgstr "新增段落样式(&P)..."
+
+#: ../src/richtext/richtextstyledlg.cpp:603
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:651
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:817
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:890
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:931
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "New Style"
+msgstr "新增样式"
+
+#: ../src/generic/dirdlgg.cpp:102
+msgid "New directory"
+msgstr "新目录"
+
+#: ../src/generic/editlbox.cpp:273
+msgid "New item"
+msgstr "新项目"
+
+#: ../src/generic/dirdlgg.cpp:326 ../src/generic/dirdlgg.cpp:336
+#: ../src/generic/filectrlg.cpp:653 ../src/generic/filectrlg.cpp:662
+msgid "NewName"
+msgstr "新名称"
+
+#: ../src/generic/tipdlg.cpp:305
+msgid "Next"
+msgstr "下一个"
+
+#: ../src/common/prntbase.cpp:1537 ../src/html/helpwnd.cpp:678
+msgid "Next page"
+msgstr "下一页"
+
+#: ../include/wx/msgdlg.h:272 ../src/common/stockitem.cpp:177
+#: ../src/motif/msgdlg.cpp:196
+msgid "No"
+msgstr "否"
+
+#: ../src/generic/animateg.cpp:150
+#, fuzzy, c-format
+msgid "No animation handler for type %ld defined."
+msgstr "没有类型 %d 的图像处理器."
+
+#: ../src/dfb/bitmap.cpp:642 ../src/dfb/bitmap.cpp:676
+#, fuzzy, c-format
+msgid "No bitmap handler for type %d defined."
+msgstr "没有类型 %d 的图像处理器."
+
+#: ../src/osx/carbon/dataview.cpp:1784
+msgid "No column existing."
+msgstr "没有任何列存在。"
+
+#: ../src/osx/carbon/dataview.cpp:1674
+msgid "No column for the specified column existing."
+msgstr "没有指定的列存在。"
+
+#: ../src/osx/carbon/dataview.cpp:1423
+msgid "No column for the specified column position existing."
+msgstr "没有指定的列位置存在。"
+
+#: ../src/common/utilscmn.cpp:1049
+msgid "No default application configured for HTML files."
+msgstr "没有设定HTML文件的默认应用。"
+
+#: ../src/generic/helpext.cpp:449
+msgid "No entries found."
+msgstr "没找到条目。"
+
+#: ../src/common/fontmap.cpp:421
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found,\n"
+"but an alternative encoding '%s' is available.\n"
+"Do you want to use this encoding (otherwise you will have to choose another "
+"one)?"
+msgstr ""
+"编码 '%s' 的字体未找到,无法显示文本。\n"
+"但发现另一替代编码 '%s'。\n"
+"是否使用该编码 (否则您必须选择另外的编码)?"
+
+#: ../src/common/fontmap.cpp:426
+#, c-format
+msgid ""
+"No font for displaying text in encoding '%s' found.\n"
+"Would you like to select a font to be used for this encoding\n"
+"(otherwise the text in this encoding will not be shown correctly)?"
+msgstr ""
+"编码 '%s' 的字体未找到,无法显示文本。\n"
+"请选择用于该编码的字体\n"
+"(否则该编码的文本将无法正确显示)?"
+
+#: ../src/generic/animateg.cpp:142
+msgid "No handler found for animation type."
+msgstr "没有找到动画类型处理器。"
+
+#: ../src/common/image.cpp:2591
+msgid "No handler found for image type."
+msgstr "没有找到图像类型处理器。"
+
+#: ../src/common/image.cpp:2599 ../src/common/image.cpp:2710
+#: ../src/common/image.cpp:2763
+#, c-format
+msgid "No image handler for type %d defined."
+msgstr "没有类型 %d 的图像处理器。"
+
+#: ../src/common/image.cpp:2733 ../src/common/image.cpp:2777
+#, c-format
+msgid "No image handler for type %s defined."
+msgstr "没有类型 %s的图像处理器。"
+
+#: ../src/html/helpwnd.cpp:871
+msgid "No matching page found yet"
+msgstr "还没有找到匹配页"
+
+#: ../src/osx/carbon/dataview.cpp:1676 ../src/osx/carbon/dataview.cpp:1786
+msgid "No renderer or invalid renderer type specified for custom data column."
+msgstr "无渲染器或为该数据列指定了无效的渲染器"
+
+#: ../src/osx/carbon/dataview.cpp:1424
+msgid "No renderer specified for column."
+msgstr "该列未指定渲染器"
+
+#: ../src/unix/sound.cpp:81
+msgid "No sound"
+msgstr "没有声音"
+
+#: ../src/common/image.cpp:2166 ../src/common/image.cpp:2207
+msgid "No unused colour in image being masked."
+msgstr "图像中没有被掩码的未用颜色。"
+
+#: ../src/common/image.cpp:3236
+msgid "No unused colour in image."
+msgstr "图像中没有未用的颜色。"
+
+#: ../src/generic/helpext.cpp:306
+#, c-format
+msgid "No valid mappings found in the file \"%s\"."
+msgstr "文件 \"%s\" 中无效映射"
+
+#: ../src/richtext/richtextborderspage.cpp:542
+#: ../src/richtext/richtextsizepage.cpp:248
+#: ../src/richtext/richtextsizepage.cpp:252
+msgid "None"
+msgstr "无"
+
+#: ../src/common/fmapbase.cpp:157
+msgid "Nordic (ISO-8859-10)"
+msgstr "日尔曼语 (ISO-8859-10)"
+
+#: ../src/generic/fontdlgg.cpp:328 ../src/generic/fontdlgg.cpp:331
+msgid "Normal"
+msgstr "正常"
+
+#: ../src/html/helpwnd.cpp:1276
+msgid "Normal face<br>and <u>underlined</u>. "
+msgstr "正常字体<br> 且 <u>带下划线</u>。"
+
+#: ../src/html/helpwnd.cpp:1218
+msgid "Normal font:"
+msgstr "正常字体:"
+
+#: ../src/propgrid/props.cpp:887
+#, c-format
+msgid "Not %s"
+msgstr "非 %s"
+
+#: ../include/wx/filename.h:586 ../include/wx/filename.h:591
+msgid "Not available"
+msgstr "不可用"
+
+#: ../src/richtext/richtextfontpage.cpp:340
+#, fuzzy
+msgid "Not underlined"
+msgstr "下划线"
+
+#: ../src/common/paper.cpp:116
+msgid "Note, 8 1/2 x 11 in"
+msgstr "笔记簿, 8 1/2 x 11 英寸"
+
+#: ../src/generic/notifmsgg.cpp:104
+msgid "Notice"
+msgstr "注意"
+
+#: ../src/osx/carbon/dataview.cpp:902
+msgid "Number of columns could not be determined."
+msgstr "无法确定列数量。"
+
+#: ../src/richtext/richtextliststylepage.cpp:487
+#: ../src/richtext/richtextbulletspage.cpp:292
+msgid "Numbered outline"
+msgstr "大纲标号"
+
+#: ../include/wx/msgdlg.h:273 ../src/richtext/richtextstyledlg.cpp:297
+#: ../src/common/stockitem.cpp:178 ../src/msw/msgdlg.cpp:489
+#: ../src/msw/msgdlg.cpp:799 ../src/msw/dialog.cpp:120
+#: ../src/gtk1/fontdlg.cpp:138
+msgid "OK"
+msgstr "确认"
+
+#: ../src/msw/ole/automtn.cpp:681
+#, c-format
+msgid "OLE Automation error in %s: %s"
+msgstr "OLE自动化错误%s: %s"
+
+#: ../include/wx/richtext/richtextimagedlg.h:39
+msgid "Object Properties"
+msgstr "对象属性"
+
+#: ../src/msw/ole/automtn.cpp:649
+msgid "Object implementation does not support named arguments."
+msgstr "对象实现不支持命名参数"
+
+#: ../src/common/xtixml.cpp:264
+msgid "Objects must have an id attribute"
+msgstr "对象必须有一个id属性"
+
+#: ../src/common/docview.cpp:1755 ../src/common/docview.cpp:1797
+msgid "Open File"
+msgstr "打开文件"
+
+#: ../src/html/helpwnd.cpp:684 ../src/html/helpwnd.cpp:1557
+msgid "Open HTML document"
+msgstr "打开HTML文档"
+
+#: ../src/generic/dbgrptg.cpp:163
+#, c-format
+msgid "Open file \"%s\""
+msgstr "打开文件 \"%s\""
+
+#: ../src/common/stockitem.cpp:179
+msgid "Open..."
+msgstr "打开..."
+
+#: ../src/osx/carbon/glcanvas.cpp:48
+#, c-format
+msgid "OpenGL function \"%s\" failed: %s (error %d)"
+msgstr "OpenGL函数 \"%s\"失败: %s (error %d)"
+
+#: ../src/generic/dirctrlg.cpp:699 ../src/generic/dirdlgg.cpp:352
+#: ../src/generic/filectrlg.cpp:677 ../src/generic/filectrlg.cpp:821
+msgid "Operation not permitted."
+msgstr "不允许的操作。"
+
+#: ../src/common/cmdline.cpp:735
+#, fuzzy, c-format
+msgid "Option '%s' can't be negated"
+msgstr "目录'%s'不能被创建"
+
+#: ../src/common/cmdline.cpp:899
+#, c-format
+msgid "Option '%s' requires a value."
+msgstr "选项 '%s' 需要值。"
+
+#: ../src/common/cmdline.cpp:982
+#, c-format
+msgid "Option '%s': '%s' cannot be converted to a date."
+msgstr "选项 '%s': '%s' 无法转成日期。"
+
+#: ../src/generic/dirdlgg.cpp:187 ../src/generic/prntdlgg.cpp:618
+msgid "Options"
+msgstr "选项"
+
+#: ../src/generic/prntdlgg.cpp:615 ../src/generic/prntdlgg.cpp:869
+msgid "Orientation"
+msgstr "方向"
+
+#: ../src/common/windowid.cpp:259
+msgid "Out of window IDs.  Recommend shutting down application."
+msgstr "window ID已用完。建议关闭应用。"
+
+#: ../src/richtext/richtextborderspage.cpp:400
+#: ../src/richtext/richtextborderspage.cpp:533
+msgid "Outline"
+msgstr ""
+
+#: ../src/richtext/richtextborderspage.cpp:550
+msgid "Outset"
+msgstr ""
+
+#: ../src/msw/ole/automtn.cpp:645
+msgid "Overflow while coercing argument values."
+msgstr "强制修改参数值溢出"
+
+#: ../src/common/accelcmn.cpp:84
+msgid "PAGEDOWN"
+msgstr "PAGEDOWN"
+
+#: ../src/common/accelcmn.cpp:83
+msgid "PAGEUP"
+msgstr "PAGEUP"
+
+#: ../src/common/accelcmn.cpp:69
+msgid "PAUSE"
+msgstr "PAUSE"
+
+#: ../src/common/imagpcx.cpp:457 ../src/common/imagpcx.cpp:480
+msgid "PCX: couldn't allocate memory"
+msgstr "PCX: 无法分配内存"
+
+#: ../src/common/imagpcx.cpp:456
+msgid "PCX: image format unsupported"
+msgstr "PCX: 图像格式不支持"
+
+#: ../src/common/imagpcx.cpp:479
+msgid "PCX: invalid image"
+msgstr "PCX: 无效图像"
+
+#: ../src/common/imagpcx.cpp:442
+msgid "PCX: this is not a PCX file."
+msgstr "PCX: 不是PCX文件。"
+
+#: ../src/common/imagpcx.cpp:459 ../src/common/imagpcx.cpp:481
+msgid "PCX: unknown error !!!"
+msgstr "PCX: 未知错误!!!"
+
+#: ../src/common/imagpcx.cpp:458
+msgid "PCX: version number too low"
+msgstr "PCX: 版本号太小"
+
+#: ../src/common/accelcmn.cpp:55
+msgid "PGDN"
+msgstr "PGDN"
+
+#: ../src/common/accelcmn.cpp:54
+msgid "PGUP"
+msgstr "PGUP"
+
+#: ../src/common/imagpnm.cpp:91
+msgid "PNM: Couldn't allocate memory."
+msgstr "PNM: 无法分配内存。"
+
+#: ../src/common/imagpnm.cpp:73
+msgid "PNM: File format is not recognized."
+msgstr "PNM: 无法识别的文件格式。"
+
+#: ../src/common/imagpnm.cpp:112 ../src/common/imagpnm.cpp:134
+#: ../src/common/imagpnm.cpp:156
+msgid "PNM: File seems truncated."
+msgstr "PNM: 文件似乎已被截断。"
+
+#: ../src/common/paper.cpp:188
+msgid "PRC 16K 146 x 215 mm"
+msgstr "中国 16开 纸, 146 x 215 毫米"
+
+#: ../src/common/paper.cpp:201
+msgid "PRC 16K Rotated"
+msgstr "中国 16开 纸张(横向)"
+
+#: ../src/common/paper.cpp:189
+msgid "PRC 32K 97 x 151 mm"
+msgstr "中国 32开 纸, 97 x 151 毫米"
+
+#: ../src/common/paper.cpp:202
+msgid "PRC 32K Rotated"
+msgstr "中国 32开 纸张(横向)"
+
+#: ../src/common/paper.cpp:190
+msgid "PRC 32K(Big) 97 x 151 mm"
+msgstr "中国 32开(大) 纸, 97 x 151 毫米"
+
+#: ../src/common/paper.cpp:203
+msgid "PRC 32K(Big) Rotated"
+msgstr "中国 32开(大) 纸张(横向)"
+
+#: ../src/common/paper.cpp:191
+msgid "PRC Envelope #1 102 x 165 mm"
+msgstr "中国标准信封1#, 102 x 165 毫米"
+
+#: ../src/common/paper.cpp:204
+msgid "PRC Envelope #1 Rotated 165 x 102 mm"
+msgstr "中国标准信封1#(横向), 165 x 102 毫米"
+
+#: ../src/common/paper.cpp:200
+msgid "PRC Envelope #10 324 x 458 mm"
+msgstr "中国标准信封10#, 324 x 458 毫米"
+
+#: ../src/common/paper.cpp:213
+msgid "PRC Envelope #10 Rotated 458 x 324 mm"
+msgstr "中国标准信封10#(横向), 458 x 324 毫米"
+
+#: ../src/common/paper.cpp:192
+msgid "PRC Envelope #2 102 x 176 mm"
+msgstr "中国标准信封2#, 102 x 176 毫米"
+
+#: ../src/common/paper.cpp:205
+msgid "PRC Envelope #2 Rotated 176 x 102 mm"
+msgstr "中国标准信封2#(横向), 176 x 102 毫米"
+
+#: ../src/common/paper.cpp:193
+msgid "PRC Envelope #3 125 x 176 mm"
+msgstr "中国标准信封3#, 125 x 176 毫米"
+
+#: ../src/common/paper.cpp:206
+msgid "PRC Envelope #3 Rotated 176 x 125 mm"
+msgstr "中国标准信封3#(横向), 176 x 125 毫米"
+
+#: ../src/common/paper.cpp:194
+msgid "PRC Envelope #4 110 x 208 mm"
+msgstr "中国标准信封4#, 110 x 208 毫米"
+
+#: ../src/common/paper.cpp:207
+msgid "PRC Envelope #4 Rotated 208 x 110 mm"
+msgstr "中国标准信封4#(横向), 208 x 110 毫米"
+
+#: ../src/common/paper.cpp:195
+msgid "PRC Envelope #5 110 x 220 mm"
+msgstr "中国标准信封5#, 110 x 220 毫米"
+
+#: ../src/common/paper.cpp:208
+msgid "PRC Envelope #5 Rotated 220 x 110 mm"
+msgstr "中国标准信封5#(横向), 220 x 110 毫米"
+
+#: ../src/common/paper.cpp:196
+msgid "PRC Envelope #6 120 x 230 mm"
+msgstr "中国标准信封6#, 120 x 230 毫米"
+
+#: ../src/common/paper.cpp:209
+msgid "PRC Envelope #6 Rotated 230 x 120 mm"
+msgstr "中国标准信封6#(横向), 230 x 120 毫米"
+
+#: ../src/common/paper.cpp:197
+msgid "PRC Envelope #7 160 x 230 mm"
+msgstr "中国标准信封7#, 160 x 230 毫米"
+
+#: ../src/common/paper.cpp:210
+msgid "PRC Envelope #7 Rotated 230 x 160 mm"
+msgstr "中国标准信封7#(横向), 230 x 160 毫米"
+
+#: ../src/common/paper.cpp:198
+msgid "PRC Envelope #8 120 x 309 mm"
+msgstr "中国标准信封8#, 120 x 309 毫米"
+
+#: ../src/common/paper.cpp:211
+msgid "PRC Envelope #8 Rotated 309 x 120 mm"
+msgstr "中国标准信封8#(横向), 309 x 120 毫米"
+
+#: ../src/common/paper.cpp:199
+msgid "PRC Envelope #9 229 x 324 mm"
+msgstr "中国标准信封9#, 229 x 324 毫米"
+
+#: ../src/common/paper.cpp:212
+msgid "PRC Envelope #9 Rotated 324 x 229 mm"
+msgstr "中国标准信封9#(横向), 324 x 229 毫米"
+
+#: ../src/common/accelcmn.cpp:72
+msgid "PRINT"
+msgstr "PRINT"
+
+#: ../src/richtext/richtextmarginspage.cpp:286
+#, fuzzy
+msgid "Padding"
+msgstr "正在读入"
+
+#: ../src/common/prntbase.cpp:2044
+#, c-format
+msgid "Page %d"
+msgstr "页 %d"
+
+#: ../src/common/prntbase.cpp:2042
+#, c-format
+msgid "Page %d of %d"
+msgstr "页 %d / %d"
+
+#: ../src/gtk/print.cpp:774
+msgid "Page Setup"
+msgstr "页面设置"
+
+#: ../src/generic/prntdlgg.cpp:828 ../src/common/prntbase.cpp:467
+msgid "Page setup"
+msgstr "页面设置"
+
+#: ../src/generic/prntdlgg.cpp:216
+msgid "Pages"
+msgstr "页"
+
+#: ../src/generic/prntdlgg.cpp:602 ../src/generic/prntdlgg.cpp:801
+#: ../src/generic/prntdlgg.cpp:842 ../src/generic/prntdlgg.cpp:855
+#: ../src/generic/prntdlgg.cpp:1052 ../src/generic/prntdlgg.cpp:1057
+msgid "Paper size"
+msgstr "纸张大小"
+
+#: ../src/richtext/richtextstyles.cpp:1058
+msgid "Paragraph styles"
+msgstr "段落样式"
+
+#: ../src/common/xtistrm.cpp:469
+msgid "Passing a already registered object to SetObject"
+msgstr "传递一个已注册的对象给SetObject"
+
+#: ../src/common/xtistrm.cpp:480
+#, fuzzy
+msgid "Passing an unknown object to GetObject"
+msgstr "传递一个未知对象给GetObject"
+
+#: ../src/richtext/richtextctrl.cpp:3117 ../src/common/stockitem.cpp:180
+#: ../src/stc/stc_i18n.cpp:19
+msgid "Paste"
+msgstr "粘贴"
+
+#: ../src/common/stockitem.cpp:262
+msgid "Paste selection"
+msgstr "粘贴选区"
+
+#: ../src/richtext/richtextliststylepage.cpp:222
+#: ../src/richtext/richtextbulletspage.cpp:172
+msgid "Peri&od"
+msgstr ""
+
+#: ../src/generic/filectrlg.cpp:465
+msgid "Permissions"
+msgstr "允许"
+
+#: ../src/richtext/richtextbuffer.cpp:11942
+msgid "Picture Properties"
+msgstr "图片属性"
+
+#: ../include/wx/unix/pipe.h:47
+msgid "Pipe creation failed"
+msgstr "管道创建失败"
+
+#: ../src/gtk1/fontdlg.cpp:74
+msgid "Please choose a valid font."
+msgstr "请选择一个有效的字体."
+
+#: ../src/gtk/filedlg.cpp:72
+msgid "Please choose an existing file."
+msgstr "请选择一个已存在的文件."
+
+#: ../src/html/helpwnd.cpp:813
+msgid "Please choose the page to display:"
+msgstr "请选择欲显示的页面:"
+
+#: ../src/msw/dialup.cpp:785
+msgid "Please choose which ISP do you want to connect to"
+msgstr "请选择你想连接的ISP"
+
+#: ../src/msw/listctrl.cpp:372
+#, c-format
+msgid ""
+"Please install a newer version of comctl32.dll\n"
+"(at least version 4.70 is required but you have %d.%02d)\n"
+"or this program won't operate correctly."
+msgstr ""
+"请安装较新版本的 comctl32.dll\n"
+"(至少需要4.70版,您现有的版本是 %d.%02d),\n"
+"否则此程序无法正确运行。"
+
+#: ../src/common/headerctrlcmn.cpp:59
+msgid "Please select the columns to show and define their order:"
+msgstr "请选择列并显示和定义它们的顺序"
+
+#: ../src/common/prntbase.cpp:521
+msgid "Please wait while printing..."
+msgstr "打印,请等待..."
+
+#: ../src/propgrid/advprops.cpp:631
+msgid "Point Size"
+msgstr "字体大小(磅值)"
+
+#: ../src/osx/carbon/dataview.cpp:1278 ../src/osx/carbon/dataview.cpp:1329
+#: ../src/osx/carbon/dataview.cpp:1420 ../src/osx/carbon/dataview.cpp:1443
+#: ../src/osx/carbon/dataview.cpp:1460 ../src/osx/carbon/dataview.cpp:1477
+#: ../src/osx/carbon/dataview.cpp:1670 ../src/osx/carbon/dataview.cpp:1779
+#: ../src/osx/carbon/dataview.cpp:1821 ../src/osx/carbon/dataview.cpp:1874
+#: ../src/osx/carbon/dataview.cpp:1997
+msgid "Pointer to data view control not set correctly."
+msgstr "数据视图控制指针设定错误"
+
+#: ../src/osx/carbon/dataview.cpp:1279 ../src/osx/carbon/dataview.cpp:1338
+#: ../src/osx/carbon/dataview.cpp:1421 ../src/osx/carbon/dataview.cpp:1478
+#: ../src/osx/carbon/dataview.cpp:1671 ../src/osx/carbon/dataview.cpp:1780
+#: ../src/osx/carbon/dataview.cpp:1822 ../src/osx/carbon/dataview.cpp:1875
+#: ../src/osx/carbon/dataview.cpp:1998
+msgid "Pointer to model not set correctly."
+msgstr "模型指针设定错误"
+
+#: ../src/generic/prntdlgg.cpp:612 ../src/generic/prntdlgg.cpp:867
+msgid "Portrait"
+msgstr "纵向"
+
+#: ../src/richtext/richtextsizepage.cpp:496
+msgid "Position"
+msgstr "位置"
+
+#: ../src/generic/prntdlgg.cpp:298
+msgid "PostScript file"
+msgstr "PostScript文件"
+
+#: ../src/common/stockitem.cpp:181
+msgid "Preferences"
+msgstr "偏好设置"
+
+#: ../src/osx/menu_osx.cpp:643
+msgid "Preferences..."
+msgstr "偏好设置..."
+
+#: ../src/common/prntbase.cpp:529
+msgid "Preparing"
+msgstr "准备中"
+
+#: ../src/generic/fontdlgg.cpp:455 ../src/osx/carbon/fontdlg.cpp:576
+#: ../src/html/helpwnd.cpp:1235
+msgid "Preview:"
+msgstr "预览:"
+
+#: ../src/common/prntbase.cpp:1523 ../src/html/helpwnd.cpp:677
+msgid "Previous page"
+msgstr "前页"
+
+#: ../src/generic/prntdlgg.cpp:143 ../src/generic/prntdlgg.cpp:157
+#: ../src/common/prntbase.cpp:409 ../src/common/prntbase.cpp:1511
+#: ../src/gtk/print.cpp:584 ../src/gtk/print.cpp:597
+msgid "Print"
+msgstr "打印"
+
+#: ../include/wx/prntbase.h:395 ../src/common/docview.cpp:1250
+msgid "Print Preview"
+msgstr "打印预览"
+
+#: ../src/common/prntbase.cpp:1985 ../src/common/prntbase.cpp:2027
+#: ../src/common/prntbase.cpp:2035
+msgid "Print Preview Failure"
+msgstr "打印预览失败"
+
+#: ../src/generic/prntdlgg.cpp:224
+msgid "Print Range"
+msgstr "打印范围"
+
+#: ../src/generic/prntdlgg.cpp:449
+msgid "Print Setup"
+msgstr "打印设置"
+
+#: ../src/generic/prntdlgg.cpp:621
+msgid "Print in colour"
+msgstr "彩色打印"
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print previe&w..."
+msgstr "打印预览(&W)..."
+
+#: ../src/common/docview.cpp:1244
+msgid "Print preview creation failed."
+msgstr "打印预览创建失败"
+
+#: ../src/common/stockitem.cpp:182
+msgid "Print preview..."
+msgstr "打印预览..."
+
+#: ../src/generic/prntdlgg.cpp:630
+msgid "Print spooling"
+msgstr "打印假脱机"
+
+#: ../src/html/helpwnd.cpp:688
+msgid "Print this page"
+msgstr "打印本页"
+
+#: ../src/generic/prntdlgg.cpp:185
+msgid "Print to File"
+msgstr "打印到文件"
+
+#: ../src/common/stockitem.cpp:183
+msgid "Print..."
+msgstr "打印..."
+
+#: ../src/generic/prntdlgg.cpp:493
+msgid "Printer"
+msgstr "打印机"
+
+#: ../src/generic/prntdlgg.cpp:633
+msgid "Printer command:"
+msgstr "打印机命令:"
+
+#: ../src/generic/prntdlgg.cpp:180
+msgid "Printer options"
+msgstr "打印机选项"
+
+#: ../src/generic/prntdlgg.cpp:645
+msgid "Printer options:"
+msgstr "打印机选项:"
+
+#: ../src/generic/prntdlgg.cpp:916
+msgid "Printer..."
+msgstr "打印机..."
+
+#: ../src/generic/prntdlgg.cpp:196
+msgid "Printer:"
+msgstr "打印机:"
+
+#: ../include/wx/richtext/richtextprint.h:163 ../src/common/prntbase.cpp:518
+#: ../src/html/htmprint.cpp:277
+msgid "Printing"
+msgstr "正在打印 "
+
+#: ../src/common/prntbase.cpp:586
+msgid "Printing "
+msgstr "正在打印 "
+
+#: ../src/common/prntbase.cpp:330
+msgid "Printing Error"
+msgstr "打印出错"
+
+#: ../src/common/prntbase.cpp:544
+#, c-format
+msgid "Printing page %d of %d"
+msgstr "正在打印页 %d 共 %d..."
+
+#: ../src/generic/printps.cpp:201
+#, c-format
+msgid "Printing page %d..."
+msgstr "正在打印页 %d..."
+
+#: ../src/generic/printps.cpp:161
+msgid "Printing..."
+msgstr "打印..."
+
+#: ../include/wx/richtext/richtextprint.h:109 ../include/wx/prntbase.h:263
+#: ../src/common/docview.cpp:2124
+msgid "Printout"
+msgstr "打印"
+
+#: ../src/common/debugrpt.cpp:565
+#, c-format
+msgid ""
+"Processing debug report has failed, leaving the files in \"%s\" directory."
+msgstr "处理调试报告失败, 文件被保存在目录 \"%s\" 中."
+
+#: ../src/osx/carbon/dataview.cpp:2472
+msgid "Progress renderer cannot render value type; value type: "
+msgstr "程序渲染器无法渲染该值;类型为:"
+
+#: ../src/common/prntbase.cpp:528
+msgid "Progress:"
+msgstr "进度:"
+
+#: ../src/common/stockitem.cpp:184
+msgid "Properties"
+msgstr "属性"
+
+#: ../src/propgrid/manager.cpp:237
+msgid "Property"
+msgstr "属性"
+
+#: ../src/propgrid/propgrid.cpp:3144 ../src/propgrid/propgrid.cpp:3276
+msgid "Property Error"
+msgstr "属性错误"
+
+#: ../src/common/paper.cpp:113
+msgid "Quarto, 215 x 275 mm"
+msgstr "四开, 215 x 275 毫米"
+
+#: ../src/generic/logg.cpp:1036
+msgid "Question"
+msgstr "问题"
+
+#: ../src/common/stockitem.cpp:156
+msgid "Quit"
+msgstr "退出"
+
+#: ../src/osx/menu_osx.cpp:610 ../src/osx/menu_osx.cpp:657
+#, c-format
+msgid "Quit %s"
+msgstr "退出 %s"
+
+#: ../src/common/stockitem.cpp:263
+msgid "Quit this program"
+msgstr "推出此程序"
+
+#: ../src/common/accelcmn.cpp:53
+msgid "RETURN"
+msgstr "RETURN"
+
+#: ../src/common/accelcmn.cpp:57
+msgid "RIGHT"
+msgstr "RIGHT"
+
+#: ../src/common/accelcmn.cpp:327
+msgid "RawCtrl+"
+msgstr "RawCtrl+"
+
+#: ../src/common/ffile.cpp:113 ../src/common/ffile.cpp:134
+#, c-format
+msgid "Read error on file '%s'"
+msgstr "读文件 '%s'出错"
+
+#: ../src/common/prntbase.cpp:257
+msgid "Ready"
+msgstr "就绪"
+
+#: ../src/common/stockitem.cpp:185 ../src/stc/stc_i18n.cpp:16
+msgid "Redo"
+msgstr "恢复"
+
+#: ../src/common/stockitem.cpp:264
+msgid "Redo last action"
+msgstr "恢复上一次操作"
+
+#: ../src/common/stockitem.cpp:186
+msgid "Refresh"
+msgstr "刷新"
+
+#: ../src/msw/registry.cpp:625
+#, c-format
+msgid "Registry key '%s' already exists."
+msgstr "注册键 '%s' 已存在."
+
+#: ../src/msw/registry.cpp:594
+#, c-format
+msgid "Registry key '%s' does not exist, cannot rename it."
+msgstr "注册键 '%s' 不存在,无法改名。"
+
+#: ../src/msw/registry.cpp:726
+#, c-format
+msgid ""
+"Registry key '%s' is needed for normal system operation,\n"
+"deleting it will leave your system in unusable state:\n"
+"operation aborted."
+msgstr ""
+"正常的系统操作需要注册键 '%s',\n"
+"删除它将使系统进入不可用状态:\n"
+"操作终止."
+
+#: ../src/msw/registry.cpp:520
+#, c-format
+msgid "Registry value '%s' already exists."
+msgstr "注册值 '%s' 已存在."
+
+#: ../src/richtext/richtextfontpage.cpp:332
+#: ../src/richtext/richtextfontpage.cpp:336
+msgid "Regular"
+msgstr "一般"
+
+#: ../src/richtext/richtextsizepage.cpp:519
+#, fuzzy
+msgid "Relative"
+msgstr "修饰"
+
+#: ../src/generic/helpext.cpp:462
+msgid "Relevant entries:"
+msgstr "相关条目:"
+
+#: ../include/wx/generic/progdlgg.h:86
+msgid "Remaining time:"
+msgstr "剩余时间:"
+
+#: ../src/common/stockitem.cpp:187
+msgid "Remove"
+msgstr "移除"
+
+#: ../src/richtext/richtextctrl.cpp:1430
+#, fuzzy
+msgid "Remove Bullet"
+msgstr "移除"
+
+#: ../src/html/helpwnd.cpp:440
+msgid "Remove current page from bookmarks"
+msgstr "从书签中移去当前页"
+
+#: ../src/common/rendcmn.cpp:194
+#, c-format
+msgid "Renderer \"%s\" has incompatible version %d.%d and couldn't be loaded."
+msgstr "渲染器(renderer) \"%s\"的版本 %d.%d不兼容, 无法加载."
+
+#: ../src/osx/carbon/dataview.cpp:1430
+#, fuzzy
+msgid "Rendering failed."
+msgstr "计时器创建失败"
+
+#: ../src/richtext/richtextbuffer.cpp:4214
+msgid "Renumber List"
+msgstr "重编号列表"
+
+#: ../src/common/stockitem.cpp:188
+msgid "Rep&lace"
+msgstr "替换(&l)"
+
+#: ../src/richtext/richtextctrl.cpp:3277 ../src/common/stockitem.cpp:188
+msgid "Replace"
+msgstr "替换"
+
+#: ../src/generic/fdrepdlg.cpp:182
+msgid "Replace &all"
+msgstr "全部替换(&a)"
+
+#: ../src/common/stockitem.cpp:261
+#, fuzzy
+msgid "Replace selection"
+msgstr "全部替换(&a)"
+
+#: ../src/generic/fdrepdlg.cpp:124
+msgid "Replace with:"
+msgstr "替换为:"
+
+#: ../src/common/valtext.cpp:161
+msgid "Required information entry is empty."
+msgstr "所需的项目信息为空"
+
+#: ../src/common/translation.cpp:1966
+#, fuzzy, c-format
+msgid "Resource '%s' is not a valid message catalog."
+msgstr "'%s' 不是有效的消息目录."
+
+#: ../src/common/stockitem.cpp:189
+msgid "Revert to Saved"
+msgstr "还原为上次保存的文件"
+
+#: ../src/richtext/richtextborderspage.cpp:548
+#, fuzzy
+msgid "Ridge"
+msgstr "细"
+
+#: ../src/richtext/richtextliststylepage.cpp:251
+#: ../src/richtext/richtextbulletspage.cpp:201
+#: ../src/richtext/richtextsizepage.cpp:250
+msgid "Right"
+msgstr "右"
+
+#: ../src/generic/prntdlgg.cpp:892
+msgid "Right margin (mm):"
+msgstr "右边距 (毫米):"
+
+#: ../src/richtext/richtextindentspage.cpp:148
+#: ../src/richtext/richtextindentspage.cpp:150
+#: ../src/richtext/richtextliststylepage.cpp:337
+#: ../src/richtext/richtextliststylepage.cpp:339
+msgid "Right-align text."
+msgstr "文本右对齐"
+
+#: ../src/generic/fontdlgg.cpp:322
+msgid "Roman"
+msgstr "罗马"
+
+#: ../src/richtext/richtextliststylepage.cpp:299
+#: ../src/richtext/richtextbulletspage.cpp:252
+msgid "S&tandard bullet name:"
+msgstr "标准项目符号名称(&T)"
+
+#: ../src/common/accelcmn.cpp:82
+msgid "SCROLL_LOCK"
+msgstr "SCROLL_LOCK"
+
+#: ../src/common/accelcmn.cpp:71
+msgid "SELECT"
+msgstr "SELECT"
+
+#: ../src/common/accelcmn.cpp:77
+msgid "SEPARATOR"
+msgstr "SEPARATOR"
+
+#: ../src/common/accelcmn.cpp:74
+msgid "SNAPSHOT"
+msgstr "SNAPSHOT"
+
+#: ../src/common/accelcmn.cpp:62
+msgid "SPACE"
+msgstr "SPACE"
+
+#: ../src/common/accelcmn.cpp:257 ../src/common/accelcmn.cpp:339
+msgid "SPECIAL"
+msgstr "SPECIAL"
+
+#: ../src/common/accelcmn.cpp:78
+msgid "SUBTRACT"
+msgstr "SUBTRACT"
+
+#: ../src/common/stockitem.cpp:190 ../src/common/sizer.cpp:2678
+msgid "Save"
+msgstr "保存"
+
+#: ../src/common/fldlgcmn.cpp:327
+#, c-format
+msgid "Save %s file"
+msgstr "保存文件 %s "
+
+#: ../src/generic/logg.cpp:518
+msgid "Save &As..."
+msgstr "另存为(&A)..."
+
+#: ../src/common/docview.cpp:360
+msgid "Save As"
+msgstr "另存为"
+
+#: ../src/common/stockitem.cpp:191
+msgid "Save as"
+msgstr "另存为"
+
+#: ../src/common/stockitem.cpp:267
+msgid "Save current document"
+msgstr "保存当前文档"
+
+#: ../src/common/stockitem.cpp:268
+msgid "Save current document with a different filename"
+msgstr "保存当前文档至重命名"
+
+#: ../src/generic/logg.cpp:518
+msgid "Save log contents to file"
+msgstr "把日志内容保存到文件"
+
+#: ../src/generic/fontdlgg.cpp:325
+msgid "Script"
+msgstr "Script"
+
+#: ../src/generic/srchctlg.cpp:67 ../src/html/helpwnd.cpp:548
+#: ../src/html/helpwnd.cpp:563
+msgid "Search"
+msgstr "搜索"
+
+#: ../src/html/helpwnd.cpp:550
+msgid ""
+"Search contents of help book(s) for all occurrences of the text you typed "
+"above"
+msgstr "从帮助内容中搜索符合你在上面输入的正文的所有条目"
+
+#: ../src/generic/fdrepdlg.cpp:160
+msgid "Search direction"
+msgstr "搜索方向"
+
+#: ../src/generic/fdrepdlg.cpp:112
+msgid "Search for:"
+msgstr "搜索:"
+
+#: ../src/html/helpwnd.cpp:1065
+msgid "Search in all books"
+msgstr "搜索所有的书籍"
+
+#: ../src/html/helpwnd.cpp:870
+msgid "Searching..."
+msgstr "搜索中..."
+
+#: ../src/generic/dirctrlg.cpp:546
+msgid "Sections"
+msgstr "段"
+
+#: ../src/common/ffile.cpp:220
+#, c-format
+msgid "Seek error on file '%s'"
+msgstr "文件 '%s' 定位错误"
+
+#: ../src/common/ffile.cpp:210
+#, c-format
+msgid "Seek error on file '%s' (large files not supported by stdio)"
+msgstr "文件 '%s' 定位错误 (stdio 不支持大文件)"
+
+#: ../src/richtext/richtextctrl.cpp:330 ../src/osx/textctrl_osx.cpp:587
+#: ../src/common/stockitem.cpp:192 ../src/msw/textctrl.cpp:2288
+msgid "Select &All"
+msgstr "全部选择(&A)"
+
+#: ../src/common/stockitem.cpp:192 ../src/stc/stc_i18n.cpp:21
+msgid "Select All"
+msgstr "全部选择"
+
+#: ../src/common/docview.cpp:1877
+msgid "Select a document template"
+msgstr "选择文档模板"
+
+#: ../src/common/docview.cpp:1951
+msgid "Select a document view"
+msgstr "选择文档视图"
+
+#: ../src/richtext/richtextfontpage.cpp:235
+#: ../src/richtext/richtextfontpage.cpp:237
+msgid "Select regular or bold."
+msgstr "选择是否粗体"
+
+#: ../src/richtext/richtextfontpage.cpp:222
+#: ../src/richtext/richtextfontpage.cpp:224
+msgid "Select regular or italic style."
+msgstr "选择是否斜体"
+
+#: ../src/richtext/richtextfontpage.cpp:248
+#: ../src/richtext/richtextfontpage.cpp:250
+msgid "Select underlining or no underlining."
+msgstr "选择是否下划线"
+
+#: ../src/motif/filedlg.cpp:220
+msgid "Selection"
+msgstr "选区"
+
+#: ../src/richtext/richtextliststylepage.cpp:187
+#: ../src/richtext/richtextliststylepage.cpp:189
+msgid "Selects the list level to edit."
+msgstr "选择并辨析列表层级"
+
+#: ../src/common/cmdline.cpp:918
+#, c-format
+msgid "Separator expected after the option '%s'."
+msgstr "期望在选项 '%s' 后存在分隔符。"
+
+#: ../src/richtext/richtextbuffer.cpp:10513
+msgid "Set Cell Style"
+msgstr "设置单元格样式"
+
+#: ../include/wx/xtiprop.h:179
+msgid "SetProperty called w/o valid setter"
+msgstr "调用 SetProperty 时未带有效的 setter"
+
+#: ../src/common/filename.cpp:2632
+msgid "Setting directory access times is not supported under this OS version"
+msgstr "当前操作系统不支持目录访问次数设定"
+
+#: ../src/generic/prntdlgg.cpp:188
+msgid "Setup..."
+msgstr "设置..."
+
+#: ../src/msw/dialup.cpp:563
+msgid "Several active dialup connections found, choosing one randomly."
+msgstr "找到多个活动拨号连接, 随机选择一个."
+
+#: ../src/common/accelcmn.cpp:324
+msgid "Shift+"
+msgstr "Shift+"
+
+#: ../src/generic/dirdlgg.cpp:170
+msgid "Show &hidden directories"
+msgstr "显示隐藏目录(&H)"
+
+#: ../src/generic/filectrlg.cpp:1003
+msgid "Show &hidden files"
+msgstr "显示隐藏文件(&H)"
+
+#: ../src/osx/menu_osx.cpp:605 ../src/osx/menu_osx.cpp:652
+msgid "Show All"
+msgstr "显示全部"
+
+#: ../src/common/stockitem.cpp:257
+msgid "Show about dialog"
+msgstr "显示关于对话框"
+
+#: ../src/html/helpwnd.cpp:502
+msgid "Show all"
+msgstr "显示全部"
+
+#: ../src/html/helpwnd.cpp:513
+msgid "Show all items in index"
+msgstr "以索引方式显示所有项目"
+
+#: ../src/generic/dirdlgg.cpp:105
+msgid "Show hidden directories"
+msgstr "显示隐藏目录"
+
+#: ../src/html/helpwnd.cpp:671
+msgid "Show/hide navigation panel"
+msgstr "显示/隐藏 导航面板"
+
+#: ../src/richtext/richtextsymboldlg.cpp:421
+#: ../src/richtext/richtextsymboldlg.cpp:423
+msgid "Shows a Unicode subset."
+msgstr "显示Unicode子集"
+
+#: ../src/richtext/richtextliststylepage.cpp:472
+#: ../src/richtext/richtextliststylepage.cpp:474
+#: ../src/richtext/richtextbulletspage.cpp:276
+#: ../src/richtext/richtextbulletspage.cpp:278
+msgid "Shows a preview of the bullet settings."
+msgstr "预览项目符号设定"
+
+#: ../src/richtext/richtextfontpage.cpp:322
+#: ../src/richtext/richtextfontpage.cpp:324
+msgid "Shows a preview of the font settings."
+msgstr "预览字体设定"
+
+#: ../src/osx/carbon/fontdlg.cpp:580 ../src/osx/carbon/fontdlg.cpp:582
+msgid "Shows a preview of the font."
+msgstr "预览字体"
+
+#: ../src/richtext/richtextindentspage.cpp:303
+#: ../src/richtext/richtextindentspage.cpp:305
+msgid "Shows a preview of the paragraph settings."
+msgstr "预览段落设定"
+
+#: ../src/generic/fontdlgg.cpp:460 ../src/generic/fontdlgg.cpp:462
+msgid "Shows the font preview."
+msgstr "显示字体预览。"
+
+#: ../src/univ/themes/mono.cpp:516
+msgid "Simple monochrome theme"
+msgstr "简单黑白主题"
+
+#: ../src/richtext/richtextindentspage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:449
+msgid "Single"
+msgstr ""
+
+#: ../src/generic/filectrlg.cpp:460 ../src/richtext/richtextformatdlg.cpp:356
+#: ../src/richtext/richtextsizepage.cpp:299
+msgid "Size"
+msgstr "大小"
+
+#: ../src/osx/carbon/fontdlg.cpp:525
+msgid "Size:"
+msgstr "大小:"
+
+#: ../src/generic/progdlgg.cpp:262 ../src/generic/progdlgg.cpp:773
+#: ../src/msw/progdlg.cpp:801
+msgid "Skip"
+msgstr "跳过"
+
+#: ../src/generic/fontdlgg.cpp:330
+msgid "Slant"
+msgstr "倾斜"
+
+#: ../src/richtext/richtextfontpage.cpp:298
+#, fuzzy
+msgid "Small C&apitals"
+msgstr "大写(&P)"
+
+#: ../src/richtext/richtextborderspage.cpp:543
+msgid "Solid"
+msgstr "实线"
+
+#: ../src/common/docview.cpp:1773
+msgid "Sorry, could not open this file."
+msgstr "对不起,无法打开文件。"
+
+#: ../src/common/prntbase.cpp:2027 ../src/common/prntbase.cpp:2035
+msgid "Sorry, not enough memory to create a preview."
+msgstr "对不起,没有足够内存创建预览。"
+
+#: ../src/richtext/richtextstyledlg.cpp:608
+#: ../src/richtext/richtextstyledlg.cpp:656
+#: ../src/richtext/richtextstyledlg.cpp:822
+#: ../src/richtext/richtextstyledlg.cpp:898
+#: ../src/richtext/richtextstyledlg.cpp:936
+msgid "Sorry, that name is taken. Please choose another."
+msgstr "抱歉,名字已被使用。请选择其他名字。"
+
+#: ../src/common/docview.cpp:1796
+msgid "Sorry, the format for this file is unknown."
+msgstr "对不起,此文件的格式未知。"
+
+#: ../src/unix/sound.cpp:492
+msgid "Sound data are in unsupported format."
+msgstr "声音数据为不支持的格式。"
+
+#: ../src/unix/sound.cpp:477
+#, c-format
+msgid "Sound file '%s' is in unsupported format."
+msgstr "声音文件 '%s' 为不支持的格式。"
+
+#: ../src/richtext/richtextliststylepage.cpp:467
+msgid "Spacing"
+msgstr "空格"
+
+#: ../src/common/stockitem.cpp:197
+msgid "Spell Check"
+msgstr "拼写检查"
+
+#: ../src/richtext/richtextliststylepage.cpp:490
+#: ../src/richtext/richtextbulletspage.cpp:295
+msgid "Standard"
+msgstr "标准"
+
+#: ../src/common/paper.cpp:105
+msgid "Statement, 5 1/2 x 8 1/2 in"
+msgstr "报表用纸,5 1/2 x 8 1/2 英寸"
+
+#: ../src/richtext/richtextsizepage.cpp:518
+#: ../src/richtext/richtextsizepage.cpp:523
+msgid "Static"
+msgstr "状态:"
+
+#: ../src/generic/prntdlgg.cpp:204
+msgid "Status:"
+msgstr "状态:"
+
+#: ../src/common/stockitem.cpp:198
+msgid "Stop"
+msgstr "停止"
+
+#: ../src/common/stockitem.cpp:199
+msgid "Strikethrough"
+msgstr "删除线"
+
+#: ../src/common/colourcmn.cpp:45
+#, c-format
+msgid "String To Colour : Incorrect colour specification : %s"
+msgstr "字符串 - 颜色: 错误的颜色: %s"
+
+#: ../src/richtext/richtextformatdlg.cpp:318 ../src/propgrid/advprops.cpp:647
+msgid "Style"
+msgstr "样式"
+
+#: ../include/wx/richtext/richtextstyledlg.h:47
+msgid "Style Organiser"
+msgstr "样式组织器"
+
+#: ../src/osx/carbon/fontdlg.cpp:534
+msgid "Style:"
+msgstr "样式:"
+
+#: ../src/richtext/richtextfontpage.cpp:312
+msgid "Subscrip&t"
+msgstr "下标(&T)"
+
+#: ../src/richtext/richtextfontpage.cpp:305
+msgid "Supe&rscript"
+msgstr "上标(&R)"
+
+#: ../src/common/paper.cpp:151
+msgid "SuperA/SuperA/A4 227 x 356 mm"
+msgstr "SuperA/SuperA/A4 纸张,227 x 356 毫米"
+
+#: ../src/common/paper.cpp:152
+msgid "SuperB/SuperB/A3 305 x 487 mm"
+msgstr "SuperB/SuperB/A3 纸张,305 x 487 毫米"
+
+#: ../src/generic/fontdlgg.cpp:326
+msgid "Swiss"
+msgstr "瑞士"
+
+#: ../src/richtext/richtextliststylepage.cpp:488
+#: ../src/richtext/richtextbulletspage.cpp:293
+msgid "Symbol"
+msgstr "符号"
+
+#: ../src/richtext/richtextliststylepage.cpp:288
+#: ../src/richtext/richtextbulletspage.cpp:240
+msgid "Symbol &font:"
+msgstr "符号样式(&F)"
+
+#: ../include/wx/richtext/richtextsymboldlg.h:47
+msgid "Symbols"
+msgstr "符号"
+
+#: ../src/common/accelcmn.cpp:63
+msgid "TAB"
+msgstr "TAB"
+
+#: ../src/common/imagtiff.cpp:372 ../src/common/imagtiff.cpp:385
+#: ../src/common/imagtiff.cpp:744
+msgid "TIFF: Couldn't allocate memory."
+msgstr "TIFF: 无法分配内存。"
+
+#: ../src/common/imagtiff.cpp:304
+msgid "TIFF: Error loading image."
+msgstr "TIFF: 装载图像错误。"
+
+#: ../src/common/imagtiff.cpp:471
+msgid "TIFF: Error reading image."
+msgstr "TIFF: 读图像错误。"
+
+#: ../src/common/imagtiff.cpp:611
+msgid "TIFF: Error saving image."
+msgstr "TIFF: 保存图像错误。"
+
+#: ../src/common/imagtiff.cpp:849
+msgid "TIFF: Error writing image."
+msgstr "TIFF: 写图像错误。"
+
+#: ../src/common/imagtiff.cpp:358
+msgid "TIFF: Image size is abnormally big."
+msgstr "TIFF: 图像大小过大。"
+
+#: ../src/richtext/richtextbuffer.cpp:10794
+msgid "Table Properties"
+msgstr "表格属性"
+
+#: ../src/common/paper.cpp:146
+msgid "Tabloid Extra 11.69 x 18 in"
+msgstr "小报(特大),11.69 x 18 英寸"
+
+#: ../src/common/paper.cpp:103
+msgid "Tabloid, 11 x 17 in"
+msgstr "小报,11 x 17 英寸"
+
+#: ../src/richtext/richtextformatdlg.cpp:336
+msgid "Tabs"
+msgstr "标签"
+
+#: ../src/generic/fontdlgg.cpp:327
+msgid "Teletype"
+msgstr "电传打字机"
+
+#: ../src/common/docview.cpp:1878
+msgid "Templates"
+msgstr "模板"
+
+#: ../src/osx/carbon/dataview.cpp:2373
+msgid "Text renderer cannot render value; value type: "
+msgstr "文本渲染器无法渲染该值;类型为:"
+
+#: ../src/common/fmapbase.cpp:158
+msgid "Thai (ISO-8859-11)"
+msgstr "泰语 (ISO-8859-11)"
+
+#: ../src/common/ftp.cpp:620
+msgid "The FTP server doesn't support passive mode."
+msgstr "FTP服务器不支持 passive 模式。"
+
+#: ../src/common/ftp.cpp:606
+msgid "The FTP server doesn't support the PORT command."
+msgstr "FTP服务器不支持 PORT 命令。"
+
+#: ../src/richtext/richtextliststylepage.cpp:215
+#: ../src/richtext/richtextliststylepage.cpp:217
+#: ../src/richtext/richtextbulletspage.cpp:164
+#: ../src/richtext/richtextbulletspage.cpp:166
+msgid "The available bullet styles."
+msgstr "可用的项目符号样式"
+
+#: ../src/richtext/richtextstyledlg.cpp:202
+#: ../src/richtext/richtextstyledlg.cpp:204
+msgid "The available styles."
+msgstr "可用样式"
+
+#: ../src/richtext/richtextbackgroundpage.cpp:139
+#: ../src/richtext/richtextbackgroundpage.cpp:141
+msgid "The background colour."
+msgstr "背景色"
+
+#: ../src/richtext/richtextmarginspage.cpp:268
+#: ../src/richtext/richtextmarginspage.cpp:270
+msgid "The bottom margin size."
+msgstr "底边距"
+
+#: ../src/richtext/richtextmarginspage.cpp:382
+#: ../src/richtext/richtextmarginspage.cpp:384
+msgid "The bottom padding size."
+msgstr "底内衬大小"
+
+#: ../src/richtext/richtextsizepage.cpp:639
+#: ../src/richtext/richtextsizepage.cpp:641
+#: ../src/richtext/richtextsizepage.cpp:653
+#: ../src/richtext/richtextsizepage.cpp:655
+msgid "The bottom position."
+msgstr "底部位置"
+
+#: ../src/richtext/richtextliststylepage.cpp:254
+#: ../src/richtext/richtextliststylepage.cpp:256
+#: ../src/richtext/richtextliststylepage.cpp:275
+#: ../src/richtext/richtextliststylepage.cpp:277
+#: ../src/richtext/richtextbulletspage.cpp:204
+#: ../src/richtext/richtextbulletspage.cpp:206
+#: ../src/richtext/richtextbulletspage.cpp:227
+#: ../src/richtext/richtextbulletspage.cpp:229
+msgid "The bullet character."
+msgstr "项目符号字符"
+
+#: ../src/richtext/richtextsymboldlg.cpp:443
+#: ../src/richtext/richtextsymboldlg.cpp:445
+msgid "The character code."
+msgstr "字符编码"
+
+#: ../src/common/fontmap.cpp:203
+#, c-format
+msgid ""
+"The charset '%s' is unknown. You may select\n"
+"another charset to replace it with or choose\n"
+"[Cancel] if it cannot be replaced"
+msgstr ""
+"未知字符集 '%s'。选择其它字符集\n"
+"代替它,如果无法替代请选择 [取消] "
+
+#: ../src/msw/ole/dataobj.cpp:367
+#, c-format
+msgid "The clipboard format '%d' doesn't exist."
+msgstr "剪贴板格式 '%d' 不存在。"
+
+#: ../src/richtext/richtextstylepage.cpp:128
+#: ../src/richtext/richtextstylepage.cpp:130
+msgid "The default style for the next paragraph."
+msgstr "下一段落默认样式"
+
+#: ../src/generic/dirdlgg.cpp:231
+#, c-format
+msgid ""
+"The directory '%s' does not exist\n"
+"Create it now?"
+msgstr ""
+"目录 '%s' 不存在\n"
+"是否现在创建?"
+
+#: ../src/html/htmprint.cpp:271
+#, c-format
+msgid ""
+"The document \"%s\" doesn't fit on the page horizontally and will be "
+"truncated if printed.\n"
+"\n"
+"Would you like to proceed with printing it nevertheless?"
+msgstr ""
+"文件 \"%s\" 的水平尺寸不符合页面,若打印将会被截断。\n"
+"\n"
+"强制打印该文档?"
+
+#: ../src/common/docview.cpp:1184
+#, c-format
+msgid ""
+"The file '%s' doesn't exist and couldn't be opened.\n"
+"It has been removed from the most recently used files list."
+msgstr ""
+"文件 '%s' 不存在所以无法打开。\n"
+"已从最近使用的文件列表中移去。"
+
+#: ../src/richtext/richtextindentspage.cpp:208
+#: ../src/richtext/richtextindentspage.cpp:210
+#: ../src/richtext/richtextliststylepage.cpp:394
+#: ../src/richtext/richtextliststylepage.cpp:396
+msgid "The first line indent."
+msgstr "首行缩进"
+
+#: ../src/gtk/utilsgtk.cpp:427
+msgid "The following standard GTK+ options are also supported:\n"
+msgstr "以下标准GTK+选项也被支持:\n"
+
+#: ../src/generic/fontdlgg.cpp:414 ../src/generic/fontdlgg.cpp:416
+msgid "The font colour."
+msgstr "字体颜色。"
+
+#: ../src/generic/fontdlgg.cpp:375 ../src/generic/fontdlgg.cpp:377
+msgid "The font family."
+msgstr "字体。"
+
+#: ../src/richtext/richtextsymboldlg.cpp:405
+#: ../src/richtext/richtextsymboldlg.cpp:407
+msgid "The font from which to take the symbol."
+msgstr "符号使用该字体"
+
+#: ../src/generic/fontdlgg.cpp:427 ../src/generic/fontdlgg.cpp:429
+#: ../src/generic/fontdlgg.cpp:434 ../src/generic/fontdlgg.cpp:436
+msgid "The font point size."
+msgstr "字体大小 (磅值)。"
+
+#: ../src/osx/carbon/fontdlg.cpp:529 ../src/osx/carbon/fontdlg.cpp:531
+msgid "The font size in points."
+msgstr "字体大小(磅值)"
+
+#: ../src/richtext/richtextfontpage.cpp:190
+#: ../src/richtext/richtextfontpage.cpp:192
+msgid "The font size units, points or pixels."
+msgstr "字体大小单位,磅值或像素值"
+
+#: ../src/generic/fontdlgg.cpp:386 ../src/generic/fontdlgg.cpp:388
+msgid "The font style."
+msgstr "字体风格。"
+
+#: ../src/generic/fontdlgg.cpp:397 ../src/generic/fontdlgg.cpp:399
+msgid "The font weight."
+msgstr "字体粗细。"
+
+#: ../src/common/docview.cpp:1465
+#, c-format
+msgid "The format of file '%s' couldn't be determined."
+msgstr "无法确定文件 '%s' 格式。"
+
+#: ../src/richtext/richtextindentspage.cpp:199
+#: ../src/richtext/richtextindentspage.cpp:201
+#: ../src/richtext/richtextliststylepage.cpp:385
+#: ../src/richtext/richtextliststylepage.cpp:387
+msgid "The left indent."
+msgstr "左缩进"
+
+#: ../src/richtext/richtextmarginspage.cpp:195
+#: ../src/richtext/richtextmarginspage.cpp:197
+msgid "The left margin size."
+msgstr "左边距大小"
+
+#: ../src/richtext/richtextmarginspage.cpp:309
+#: ../src/richtext/richtextmarginspage.cpp:311
+msgid "The left padding size."
+msgstr "左内衬大小"
+
+#: ../src/richtext/richtextsizepage.cpp:534
+#: ../src/richtext/richtextsizepage.cpp:536
+#: ../src/richtext/richtextsizepage.cpp:548
+#: ../src/richtext/richtextsizepage.cpp:550
+msgid "The left position."
+msgstr "左位置"
+
+#: ../src/richtext/richtextindentspage.cpp:288
+#: ../src/richtext/richtextindentspage.cpp:290
+#: ../src/richtext/richtextliststylepage.cpp:462
+#: ../src/richtext/richtextliststylepage.cpp:464
+msgid "The line spacing."
+msgstr "行距。"
+
+#: ../src/richtext/richtextbulletspage.cpp:268
+#: ../src/richtext/richtextbulletspage.cpp:270
+msgid "The list item number."
+msgstr "列表编号"
+
+#: ../src/msw/ole/automtn.cpp:653
+msgid "The locale ID is unknown."
+msgstr "区域ID未知"
+
+#: ../src/richtext/richtextsizepage.cpp:366
+#: ../src/richtext/richtextsizepage.cpp:368
+msgid "The object height."
+msgstr "对象高度。"
+
+#: ../src/richtext/richtextsizepage.cpp:474
+#: ../src/richtext/richtextsizepage.cpp:476
+msgid "The object maximum height."
+msgstr "对象最大高度。"
+
+#: ../src/richtext/richtextsizepage.cpp:447
+#: ../src/richtext/richtextsizepage.cpp:449
+msgid "The object maximum width."
+msgstr "对象最大宽度。"
+
+#: ../src/richtext/richtextsizepage.cpp:420
+#: ../src/richtext/richtextsizepage.cpp:422
+msgid "The object minimum height."
+msgstr "对象最小高度"
+
+#: ../src/richtext/richtextsizepage.cpp:393
+#: ../src/richtext/richtextsizepage.cpp:395
+msgid "The object minimum width."
+msgstr "对象最小宽度。"
+
+#: ../src/richtext/richtextsizepage.cpp:332
+#: ../src/richtext/richtextsizepage.cpp:334
+msgid "The object width."
+msgstr "对象宽度。"
+
+#: ../src/richtext/richtextindentspage.cpp:227
+#: ../src/richtext/richtextindentspage.cpp:229
+msgid "The outline level."
+msgstr "大纲层级"
+
+#: ../src/common/log.cpp:281
+#, c-format
+msgid "The previous message repeated %lu time."
+msgid_plural "The previous message repeated %lu times."
+msgstr[0] "前一消息重复 %lu 次"
+
+#: ../src/common/log.cpp:274
+msgid "The previous message repeated once."
+msgstr "前一消息重复一次"
+
+#: ../src/gtk/print.cpp:931 ../src/gtk/print.cpp:1114
+msgid "The print dialog returned an error."
+msgstr "打印对话返回错误"
+
+#: ../src/richtext/richtextsymboldlg.cpp:462
+#: ../src/richtext/richtextsymboldlg.cpp:464
+msgid "The range to show."
+msgstr "显示的范围。"
+
+#: ../src/generic/dbgrptg.cpp:322
+msgid ""
+"The report contains the files listed below. If any of these files contain "
+"private information,\n"
+"please uncheck them and they will be removed from the report.\n"
+msgstr ""
+"报告包含了以下文件。如果这些文件含有私人信息,\n"
+"请去掉选中相应的文件,未选中的文件就会从报告中删除。\n"
+
+#: ../src/common/cmdline.cpp:1083
+#, c-format
+msgid "The required parameter '%s' was not specified."
+msgstr "必须的参数 '%s' 没有指定。"
+
+#: ../src/richtext/richtextindentspage.cpp:217
+#: ../src/richtext/richtextindentspage.cpp:219
+#: ../src/richtext/richtextliststylepage.cpp:403
+#: ../src/richtext/richtextliststylepage.cpp:405
+msgid "The right indent."
+msgstr "右侧缩进。"
+
+#: ../src/richtext/richtextmarginspage.cpp:220
+#: ../src/richtext/richtextmarginspage.cpp:222
+msgid "The right margin size."
+msgstr "右边距大小。"
+
+#: ../src/richtext/richtextmarginspage.cpp:334
+#: ../src/richtext/richtextmarginspage.cpp:336
+msgid "The right padding size."
+msgstr "右内衬"
+
+#: ../src/richtext/richtextsizepage.cpp:604
+#: ../src/richtext/richtextsizepage.cpp:606
+#: ../src/richtext/richtextsizepage.cpp:618
+#: ../src/richtext/richtextsizepage.cpp:620
+msgid "The right position."
+msgstr "又位置"
+
+#: ../src/richtext/richtextindentspage.cpp:267
+#: ../src/richtext/richtextliststylepage.cpp:439
+#: ../src/richtext/richtextliststylepage.cpp:441
+msgid "The spacing after the paragraph."
+msgstr "段落之后的间距。"
+
+#: ../src/richtext/richtextindentspage.cpp:257
+#: ../src/richtext/richtextindentspage.cpp:259
+#: ../src/richtext/richtextliststylepage.cpp:430
+#: ../src/richtext/richtextliststylepage.cpp:432
+msgid "The spacing before the paragraph."
+msgstr "段落之前的间距。"
+
+#: ../src/richtext/richtextstylepage.cpp:108
+#: ../src/richtext/richtextstylepage.cpp:110
+msgid "The style name."
+msgstr "样式名称"
+
+#: ../src/richtext/richtextstylepage.cpp:118
+#: ../src/richtext/richtextstylepage.cpp:120
+msgid "The style on which this style is based."
+msgstr "此样式的基础样式"
+
+#: ../src/richtext/richtextstyledlg.cpp:214
+#: ../src/richtext/richtextstyledlg.cpp:216
+msgid "The style preview."
+msgstr "样式预览。"
+
+#: ../src/msw/ole/automtn.cpp:669
+msgid "The system cannot find the file specified."
+msgstr "系统无法找到指定的文件。"
+
+#: ../src/richtext/richtexttabspage.cpp:118
+#: ../src/richtext/richtexttabspage.cpp:120
+msgid "The tab position."
+msgstr "标签位置"
+
+#: ../src/richtext/richtexttabspage.cpp:124
+msgid "The tab positions."
+msgstr "标签位置"
+
+#: ../src/richtext/richtextctrl.cpp:2705
+msgid "The text couldn't be saved."
+msgstr "文本无法保存。"
+
+#: ../src/richtext/richtextmarginspage.cpp:243
+#: ../src/richtext/richtextmarginspage.cpp:245
+msgid "The top margin size."
+msgstr "上边距大小。"
+
+#: ../src/richtext/richtextmarginspage.cpp:357
+#: ../src/richtext/richtextmarginspage.cpp:359
+msgid "The top padding size."
+msgstr "上内衬大小"
+
+#: ../src/richtext/richtextsizepage.cpp:569
+#: ../src/richtext/richtextsizepage.cpp:571
+#: ../src/richtext/richtextsizepage.cpp:583
+#: ../src/richtext/richtextsizepage.cpp:585
+msgid "The top position."
+msgstr "顶部位置。"
+
+#: ../src/common/cmdline.cpp:1061
+#, c-format
+msgid "The value for the option '%s' must be specified."
+msgstr "选项 '%s' 的值必须被指定。"
+
+#: ../src/msw/dialup.cpp:452
+#, c-format
+msgid ""
+"The version of remote access service (RAS) installed on this machine is too "
+"old, please upgrade (the following required function is missing: %s)."
+msgstr "安装在本机的远程访问服务(RAS)太旧, 请更新它 (缺少下列必要的函数: %s)."
+
+#: ../src/gtk/print.cpp:959
+msgid "The wxGtkPrinterDC cannot be used."
+msgstr "wxGtkPrinterDC无法使用"
+
+#: ../src/osx/carbon/dataview.cpp:1340
+msgid "There is no column or renderer for the specified column index."
+msgstr "所指定的列索引或渲染器不存在"
+
+#: ../src/richtext/richtextprint.cpp:614 ../src/html/htmprint.cpp:735
+msgid ""
+"There was a problem during page setup: you may need to set a default printer."
+msgstr "在页面建立时发生问题: 您可能需要设置一台默认的打印机。"
+
+#: ../src/html/htmprint.cpp:255
+msgid ""
+"This document doesn't fit on the page horizontally and will be truncated "
+"when it is printed."
+msgstr "该文档的水平尺寸不符合页面,若打印将会被截断。"
+
+#: ../src/common/image.cpp:2716
+#, c-format
+msgid "This is not a %s."
+msgstr "这不是 %s。"
+
+#: ../src/common/wincmn.cpp:1653
+msgid "This platform does not support background transparency."
+msgstr "该平台不支持背景透明度"
+
+#: ../src/gtk/window.cpp:4317
+msgid ""
+"This program was compiled with a too old version of GTK+, please rebuild "
+"with GTK+ 2.12 or newer."
+msgstr "该应用由过早版本的GTK+编译,请用GTK+ 2.12或以上版本重新构建。"
+
+#: ../src/msw/datecontrols.cpp:59
+msgid ""
+"This system doesn't support date controls, please upgrade your version of "
+"comctl32.dll"
+msgstr "本系统不支持日期控制, 请升级您的comctl32.dll"
+
+#: ../src/msw/thread.cpp:1300
+msgid ""
+"Thread module initialization failed: cannot store value in thread local "
+"storage"
+msgstr "线程模块初始化失败: 无法在线程本地存储区中存放值"
+
+#: ../src/unix/threadpsx.cpp:1758
+msgid "Thread module initialization failed: failed to create thread key"
+msgstr "线程模块初始化失败: 创建线程键失败"
+
+#: ../src/msw/thread.cpp:1288
+msgid ""
+"Thread module initialization failed: impossible to allocate index in thread "
+"local storage"
+msgstr "线程模块初始化失败: 无法在线程本地存储区中分配索引"
+
+#: ../src/unix/threadpsx.cpp:1038
+msgid "Thread priority setting is ignored."
+msgstr "线程优先级设置被忽略。"
+
+#: ../src/msw/mdi.cpp:172
+msgid "Tile &Horizontally"
+msgstr "水平排布(&H)"
+
+#: ../src/msw/mdi.cpp:173
+msgid "Tile &Vertically"
+msgstr "垂直排布(&V)"
+
+#: ../src/common/ftp.cpp:202
+msgid "Timeout while waiting for FTP server to connect, try passive mode."
+msgstr "等待FTP服务器连接时超时,请尝试用 passive 模式。"
+
+#: ../src/os2/timer.cpp:99
+msgid "Timer creation failed."
+msgstr "计时器创建失败"
+
+#: ../src/generic/tipdlg.cpp:220
+msgid "Tip of the Day"
+msgstr "每日技巧"
+
+#: ../src/generic/tipdlg.cpp:154
+msgid "Tips not available, sorry!"
+msgstr "对不起,没有所需的提示!"
+
+#: ../src/generic/prntdlgg.cpp:242
+msgid "To:"
+msgstr "到:"
+
+#: ../src/osx/carbon/dataview.cpp:2451
+msgid "Toggle renderer cannot render value; value type: "
+msgstr "切换渲染器无法渲染该;类型为:"
+
+#: ../src/richtext/richtextbuffer.cpp:7983
+msgid "Too many EndStyle calls!"
+msgstr "呼叫EndStyle太多次!"
+
+#: ../src/common/imagpng.cpp:286
+msgid "Too many colours in PNG, the image may be slightly blurred."
+msgstr "PNG中的颜色数过多,图像可能会有点模糊。"
+
+#: ../src/richtext/richtextsizepage.cpp:286
+#: ../src/richtext/richtextsizepage.cpp:290 ../src/common/stockitem.cpp:200
+msgid "Top"
+msgstr "顶端"
+
+#: ../src/generic/prntdlgg.cpp:881
+msgid "Top margin (mm):"
+msgstr "上页边距 (毫米):"
+
+#: ../src/generic/aboutdlgg.cpp:79
+msgid "Translations by "
+msgstr "翻译由"
+
+#: ../src/generic/aboutdlgg.cpp:188
+msgid "Translators"
+msgstr "翻译者"
+
+#: ../src/propgrid/propgrid.cpp:173
+msgid "True"
+msgstr "True"
+
+#: ../src/common/fs_mem.cpp:227
+#, c-format
+msgid "Trying to remove file '%s' from memory VFS, but it is not loaded!"
+msgstr "试图从内存 VFS 中移去文件 '%s',但它并没有被装入内存!"
+
+#: ../src/common/fmapbase.cpp:156
+msgid "Turkish (ISO-8859-9)"
+msgstr "土耳其语 (ISO-8859-9)"
+
+#: ../src/generic/filectrlg.cpp:461
+msgid "Type"
+msgstr "类型"
+
+#: ../src/richtext/richtextfontpage.cpp:160
+#: ../src/richtext/richtextfontpage.cpp:162
+msgid "Type a font name."
+msgstr "输入字体名称。"
+
+#: ../src/richtext/richtextfontpage.cpp:175
+#: ../src/richtext/richtextfontpage.cpp:177
+msgid "Type a size in points."
+msgstr "输入大小,以磅为单位"
+
+#: ../src/msw/ole/automtn.cpp:665
+#, c-format
+msgid "Type mismatch in argument %u."
+msgstr "参数 %u 的类型不匹配。"
+
+#: ../src/common/xtixml.cpp:356 ../src/common/xtixml.cpp:509
+#: ../src/common/xtistrm.cpp:322
+msgid "Type must have enum - long conversion"
+msgstr "必须进行 enum - long 的类型转换"
+
+#: ../src/propgrid/propgridiface.cpp:382
+#, c-format
+msgid ""
+"Type operation \"%s\" failed: Property labeled \"%s\" is of type \"%s\", NOT "
+"\"%s\"."
+msgstr ""
+
+#: ../src/common/accelcmn.cpp:58
+msgid "UP"
+msgstr "UP"
+
+#: ../src/common/paper.cpp:134
+msgid "US Std Fanfold, 14 7/8 x 11 in"
+msgstr "美国标准复写簿,14 7/8 x 11 英寸"
+
+#: ../src/common/fmapbase.cpp:196
+msgid "US-ASCII"
+msgstr "US-ASCII"
+
+#: ../src/unix/fswatcher_inotify.cpp:109
+msgid "Unable to add inotify watch"
+msgstr "无法添加 inotify watch"
+
+#: ../src/unix/fswatcher_kqueue.cpp:136
+msgid "Unable to add kqueue watch"
+msgstr "无法添加 kqueue watch"
+
+#: ../include/wx/msw/private/fswatcher.h:142
+msgid "Unable to associate handle with I/O completion port"
+msgstr "无法将句柄与 I/O 完成端口相关联"
+
+#: ../include/wx/msw/private/fswatcher.h:125
+msgid "Unable to close I/O completion port handle"
+msgstr "无法关闭 I/O 完成口的句柄"
+
+#: ../src/unix/fswatcher_inotify.cpp:97
+msgid "Unable to close inotify instance"
+msgstr "无法关闭 inotify 实例"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:74
+#, c-format
+msgid "Unable to close path '%s'"
+msgstr "无法关闭路径 '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:48
+#, c-format
+msgid "Unable to close the handle for '%s'"
+msgstr "无法关闭 '%s' 的句柄。"
+
+#: ../include/wx/msw/private/fswatcher.h:240
+msgid "Unable to create I/O completion port"
+msgstr "无法创建 I/O 完成口"
+
+#: ../src/msw/fswatcher.cpp:84
+msgid "Unable to create IOCP worker thread"
+msgstr "无法创建 IOCP 工作线程"
+
+#: ../src/unix/fswatcher_inotify.cpp:74
+msgid "Unable to create inotify instance"
+msgstr "无法创建 inotify 实例"
+
+#: ../src/unix/fswatcher_kqueue.cpp:97
+msgid "Unable to create kqueue instance"
+msgstr "无法创建 kqueue 实例"
+
+#: ../include/wx/msw/private/fswatcher.h:229
+msgid "Unable to dequeue completion packet"
+msgstr "无法移出完成封包"
+
+#: ../src/unix/fswatcher_kqueue.cpp:185
+msgid "Unable to get events from kqueue"
+msgstr "无法从 kqueue 中获取事件"
+
+#: ../src/osx/carbon/dataview.cpp:1903
+msgid "Unable to handle native drag&drop data"
+msgstr "无法处理原生的拖放数据"
+
+#: ../src/gtk/app.cpp:439
+msgid "Unable to initialize GTK+, is DISPLAY set properly?"
+msgstr "无法初始化 GTK+,DISPLAY 是否已正确设置?"
+
+#: ../src/gtk/app.cpp:276
+msgid "Unable to initialize Hildon program"
+msgstr "无法初始化 Hildon 程序"
+
+#: ../include/wx/unix/private/fswatcher_kqueue.h:57
+#, c-format
+msgid "Unable to open path '%s'"
+msgstr "无法打开路径 '%s'"
+
+#: ../src/html/htmlwin.cpp:561
+#, c-format
+msgid "Unable to open requested HTML document: %s"
+msgstr "无法打开 HTML 文档: %s"
+
+#: ../src/unix/sound.cpp:368
+msgid "Unable to play sound asynchronously."
+msgstr "无法异步地播放声音。"
+
+#: ../include/wx/msw/private/fswatcher.h:207
+msgid "Unable to post completion status"
+msgstr "无法贴上完成状态"
+
+#: ../src/unix/fswatcher_inotify.cpp:530
+msgid "Unable to read from inotify descriptor"
+msgstr "无法读取 inotify 描述符"
+
+#: ../src/unix/fswatcher_inotify.cpp:132
+msgid "Unable to remove inotify watch"
+msgstr "无法删除 inotify watch"
+
+#: ../src/unix/fswatcher_kqueue.cpp:153
+msgid "Unable to remove kqueue watch"
+msgstr "无法删除 kqueue watch"
+
+#: ../src/msw/fswatcher.cpp:168
+#, c-format
+msgid "Unable to set up watch for '%s'"
+msgstr "无法为 '%s' 设定 watch"
+
+#: ../src/msw/fswatcher.cpp:91
+msgid "Unable to start IOCP worker thread"
+msgstr "无法开始 IOCP 工作线程"
+
+#: ../src/common/stockitem.cpp:201
+msgid "Undelete"
+msgstr "取消删除"
+
+#: ../src/common/stockitem.cpp:202
+msgid "Underline"
+msgstr "下划线"
+
+#: ../src/richtext/richtextfontpage.cpp:341 ../src/osx/carbon/fontdlg.cpp:556
+#: ../src/propgrid/advprops.cpp:655
+msgid "Underlined"
+msgstr "下划线"
+
+#: ../src/common/stockitem.cpp:203 ../src/stc/stc_i18n.cpp:15
+msgid "Undo"
+msgstr "撤销"
+
+#: ../src/common/stockitem.cpp:265
+msgid "Undo last action"
+msgstr "撤销上一次操作"
+
+#: ../src/common/cmdline.cpp:864
+#, c-format
+msgid "Unexpected characters following option '%s'."
+msgstr "选项 '%s' 后有意外字符。"
+
+#: ../src/unix/fswatcher_inotify.cpp:261
+#, c-format
+msgid "Unexpected event for \"%s\": no matching watch descriptor."
+msgstr ""
+
+#: ../src/common/cmdline.cpp:1024
+#, c-format
+msgid "Unexpected parameter '%s'"
+msgstr "意外参数 '%s'"
+
+#: ../include/wx/msw/private/fswatcher.h:148
+msgid "Unexpectedly new I/O completion port was created"
+msgstr ""
+
+#: ../src/msw/fswatcher.cpp:70
+msgid "Ungraceful worker thread termination"
+msgstr "工作线程非正常终止"
+
+#: ../src/richtext/richtextsymboldlg.cpp:459
+#: ../src/richtext/richtextsymboldlg.cpp:460
+#: ../src/richtext/richtextsymboldlg.cpp:461
+msgid "Unicode"
+msgstr "Unicode 编码"
+
+#: ../src/common/fmapbase.cpp:185 ../src/common/fmapbase.cpp:191
+msgid "Unicode 16 bit (UTF-16)"
+msgstr "16位的 Unicode 编码 (UTF-16)"
+
+#: ../src/common/fmapbase.cpp:190
+msgid "Unicode 16 bit Big Endian (UTF-16BE)"
+msgstr "16位大字节序 Unicode 编码 (UTF-16BE)"
+
+#: ../src/common/fmapbase.cpp:186
+msgid "Unicode 16 bit Little Endian (UTF-16LE)"
+msgstr "16位小字节序 Unicode 编码 (UTF-16LE)"
+
+#: ../src/common/fmapbase.cpp:187 ../src/common/fmapbase.cpp:193
+msgid "Unicode 32 bit (UTF-32)"
+msgstr "32位的 Unicode 编码 (UTF-32)"
+
+#: ../src/common/fmapbase.cpp:192
+msgid "Unicode 32 bit Big Endian (UTF-32BE)"
+msgstr "32位大字节序 Unicode 编码 (UTF-32BE)"
+
+#: ../src/common/fmapbase.cpp:188
+msgid "Unicode 32 bit Little Endian (UTF-32LE)"
+msgstr "32位小字节序 Unicode 编码 (UTF-32LE)"
+
+#: ../src/common/fmapbase.cpp:182
+msgid "Unicode 7 bit (UTF-7)"
+msgstr "7位的 Unicode 编码 (UTF-7)"
+
+#: ../src/common/fmapbase.cpp:183
+msgid "Unicode 8 bit (UTF-8)"
+msgstr "8位的 Unicode 编码 (UTF-8)"
+
+#: ../src/common/stockitem.cpp:204
+msgid "Unindent"
+msgstr "取消缩进"
+
+#: ../src/richtext/richtextborderspage.cpp:373
+#: ../src/richtext/richtextborderspage.cpp:375
+msgid "Units for the bottom border width."
+msgstr "下边框单位"
+
+#: ../src/richtext/richtextmarginspage.cpp:278
+#: ../src/richtext/richtextmarginspage.cpp:280
+msgid "Units for the bottom margin."
+msgstr "下边距单位"
+
+#: ../src/richtext/richtextborderspage.cpp:517
+#: ../src/richtext/richtextborderspage.cpp:519
+msgid "Units for the bottom outline width."
+msgstr "下轮廓单位"
+
+#: ../src/richtext/richtextmarginspage.cpp:392
+#: ../src/richtext/richtextmarginspage.cpp:394
+msgid "Units for the bottom padding."
+msgstr "下内衬单位"
+
+#: ../src/richtext/richtextsizepage.cpp:664
+#: ../src/richtext/richtextsizepage.cpp:666
+msgid "Units for the bottom position."
+msgstr "下位置单位"
+
+#: ../src/richtext/richtextborderspage.cpp:283
+#: ../src/richtext/richtextborderspage.cpp:285
+msgid "Units for the left border width."
+msgstr "左边框单位"
+
+#: ../src/richtext/richtextmarginspage.cpp:205
+#: ../src/richtext/richtextmarginspage.cpp:207
+msgid "Units for the left margin."
+msgstr "左边距单位"
+
+#: ../src/richtext/richtextborderspage.cpp:427
+#: ../src/richtext/richtextborderspage.cpp:429
+msgid "Units for the left outline width."
+msgstr "左轮廓单位"
+
+#: ../src/richtext/richtextmarginspage.cpp:319
+#: ../src/richtext/richtextmarginspage.cpp:321
+msgid "Units for the left padding."
+msgstr "左内衬单位"
+
+#: ../src/richtext/richtextsizepage.cpp:559
+#: ../src/richtext/richtextsizepage.cpp:561
+msgid "Units for the left position."
+msgstr "左位置单位"
+
+#: ../src/richtext/richtextsizepage.cpp:485
+#: ../src/richtext/richtextsizepage.cpp:487
+msgid "Units for the maximum object height."
+msgstr "最大对象高度单位。"
+
+#: ../src/richtext/richtextsizepage.cpp:458
+#: ../src/richtext/richtextsizepage.cpp:460
+msgid "Units for the maximum object width."
+msgstr "最大对象宽度单位。"
+
+#: ../src/richtext/richtextsizepage.cpp:431
+#: ../src/richtext/richtextsizepage.cpp:433
+msgid "Units for the minimum object height."
+msgstr "最小对象高度单位。"
+
+#: ../src/richtext/richtextsizepage.cpp:404
+#: ../src/richtext/richtextsizepage.cpp:406
+msgid "Units for the minimum object width."
+msgstr "最小对象宽度单位。"
+
+#: ../src/richtext/richtextsizepage.cpp:377
+#: ../src/richtext/richtextsizepage.cpp:379
+msgid "Units for the object height."
+msgstr "对象高度单位"
+
+#: ../src/richtext/richtextsizepage.cpp:343
+#: ../src/richtext/richtextsizepage.cpp:345
+msgid "Units for the object width."
+msgstr "对象宽度单位"
+
+#: ../src/richtext/richtextborderspage.cpp:313
+#: ../src/richtext/richtextborderspage.cpp:315
+msgid "Units for the right border width."
+msgstr "右边框单位"
+
+#: ../src/richtext/richtextmarginspage.cpp:230
+#: ../src/richtext/richtextmarginspage.cpp:232
+msgid "Units for the right margin."
+msgstr "右边距单位"
+
+#: ../src/richtext/richtextborderspage.cpp:457
+#: ../src/richtext/richtextborderspage.cpp:459
+msgid "Units for the right outline width."
+msgstr "右轮廓单位"
+
+#: ../src/richtext/richtextmarginspage.cpp:344
+#: ../src/richtext/richtextmarginspage.cpp:346
+msgid "Units for the right padding."
+msgstr "右内衬单位"
+
+#: ../src/richtext/richtextsizepage.cpp:629
+#: ../src/richtext/richtextsizepage.cpp:631
+msgid "Units for the right position."
+msgstr "右位置单位"
+
+#: ../src/richtext/richtextborderspage.cpp:343
+#: ../src/richtext/richtextborderspage.cpp:345
+msgid "Units for the top border width."
+msgstr "上边框单位"
+
+#: ../src/richtext/richtextmarginspage.cpp:253
+#: ../src/richtext/richtextmarginspage.cpp:255
+msgid "Units for the top margin."
+msgstr "上边距单位"
+
+#: ../src/richtext/richtextborderspage.cpp:487
+#: ../src/richtext/richtextborderspage.cpp:489
+msgid "Units for the top outline width."
+msgstr "上轮廓单位"
+
+#: ../src/richtext/richtextmarginspage.cpp:367
+#: ../src/richtext/richtextmarginspage.cpp:369
+msgid "Units for the top padding."
+msgstr "上内衬单位"
+
+#: ../src/richtext/richtextsizepage.cpp:594
+#: ../src/richtext/richtextsizepage.cpp:596
+msgid "Units for the top position."
+msgstr "上位置单位"
+
+#: ../src/generic/progdlgg.cpp:382 ../src/generic/progdlgg.cpp:655
+msgid "Unknown"
+msgstr "未知"
+
+#: ../src/msw/dde.cpp:1177
+#, c-format
+msgid "Unknown DDE error %08x"
+msgstr "未知 DDE 错误 %08x"
+
+#: ../src/common/xtistrm.cpp:414
+msgid "Unknown Object passed to GetObjectClassInfo"
+msgstr "未知的对象传递给 GetObjectClassInfo"
+
+#: ../src/common/imagpng.cpp:614
+#, c-format
+msgid "Unknown PNG resolution unit %d"
+msgstr "未知 PNG 解析度单位 %d"
+
+#: ../src/common/xtixml.cpp:327
+#, c-format
+msgid "Unknown Property %s"
+msgstr "未知属性 %s"
+
+#: ../src/common/imagtiff.cpp:532
+#, c-format
+msgid "Unknown TIFF resolution unit %d ignored"
+msgstr "未知 TIFF 解析度单位 %d,忽略之"
+
+#: ../src/osx/carbon/dataview.cpp:1978
+msgid "Unknown data format"
+msgstr "未知数据格式"
+
+#: ../src/unix/dlunix.cpp:325
+msgid "Unknown dynamic library error"
+msgstr "未知的动态库错误"
+
+#: ../src/common/fmapbase.cpp:810
+#, c-format
+msgid "Unknown encoding (%d)"
+msgstr "未知编码 (%d)"
+
+#: ../src/msw/ole/automtn.cpp:677
+#, c-format
+msgid "Unknown error %08x"
+msgstr "未知错误 %08x"
+
+#: ../src/msw/ole/automtn.cpp:636
+msgid "Unknown exception"
+msgstr "未知异常"
+
+#: ../src/common/image.cpp:2701
+msgid "Unknown image data format."
+msgstr "未知图像数据格式"
+
+#: ../src/common/cmdline.cpp:749
+#, c-format
+msgid "Unknown long option '%s'"
+msgstr "未知的长选项 '%s'"
+
+#: ../src/msw/ole/automtn.cpp:620
+msgid "Unknown name or named argument."
+msgstr "未知名称或者命名参数"
+
+#: ../src/common/cmdline.cpp:764 ../src/common/cmdline.cpp:786
+#, c-format
+msgid "Unknown option '%s'"
+msgstr "未知选项 '%s'"
+
+#: ../src/common/mimecmn.cpp:230
+#, c-format
+msgid "Unmatched '{' in an entry for mime type %s."
+msgstr "类型 %s 中有不配套的 '{'。"
+
+#: ../src/common/cmdproc.cpp:262 ../src/common/cmdproc.cpp:288
+#: ../src/common/cmdproc.cpp:308
+msgid "Unnamed command"
+msgstr "未命名的命令"
+
+#: ../src/propgrid/propgrid.cpp:398
+msgid "Unspecified"
+msgstr "未指定"
+
+#: ../src/msw/clipbrd.cpp:271 ../src/msw/clipbrd.cpp:439
+msgid "Unsupported clipboard format."
+msgstr "不支持的剪贴板格式。"
+
+#: ../src/common/appcmn.cpp:249
+#, c-format
+msgid "Unsupported theme '%s'."
+msgstr "不支持的主题 '%s'。"
+
+#: ../src/generic/fdrepdlg.cpp:152 ../src/common/stockitem.cpp:205
+msgid "Up"
+msgstr "向上"
+
+#: ../src/richtext/richtextliststylepage.cpp:483
+#: ../src/richtext/richtextbulletspage.cpp:288
+msgid "Upper case letters"
+msgstr "大写字母"
+
+#: ../src/richtext/richtextliststylepage.cpp:485
+#: ../src/richtext/richtextbulletspage.cpp:290
+msgid "Upper case roman numerals"
+msgstr "大写罗马数字"
+
+#: ../src/common/cmdline.cpp:1155
+#, c-format
+msgid "Usage: %s"
+msgstr "用法: %s"
+
+#: ../src/richtext/richtextindentspage.cpp:169
+#: ../src/richtext/richtextindentspage.cpp:171
+#: ../src/richtext/richtextliststylepage.cpp:358
+#: ../src/richtext/richtextliststylepage.cpp:360
+msgid "Use the current alignment setting."
+msgstr "使用当前的对齐设置。"
+
+#: ../src/osx/carbon/dataview.cpp:2658 ../src/osx/carbon/dataview.cpp:2723
+msgid "Valid pointer to native data view control does not exist"
+msgstr ""
+
+#: ../src/common/valtext.cpp:174
+msgid "Validation conflict"
+msgstr "验证冲突"
+
+#: ../src/propgrid/manager.cpp:238
+msgid "Value"
+msgstr "值"
+
+#: ../src/propgrid/props.cpp:384
+#, c-format
+msgid "Value must be %s or higher."
+msgstr "数值必须大于或等于 %s。"
+
+#: ../src/propgrid/props.cpp:411
+#, c-format
+msgid "Value must be %s or less."
+msgstr "数值必须小于或等于 %s。"
+
+#: ../src/propgrid/props.cpp:388 ../src/propgrid/props.cpp:415
+#, c-format
+msgid "Value must be between %s and %s."
+msgstr "数值必须在 %s 和 %s 之间。"
+
+#: ../src/generic/aboutdlgg.cpp:128
+msgid "Version "
+msgstr "版本"
+
+#: ../src/richtext/richtextsizepage.cpp:291
+#: ../src/richtext/richtextsizepage.cpp:293
+msgid "Vertical alignment."
+msgstr "垂直对齐。"
+
+#: ../src/generic/filedlgg.cpp:216
+msgid "View files as a detailed view"
+msgstr "按详细视图观看文件"
+
+#: ../src/generic/filedlgg.cpp:214
+msgid "View files as a list view"
+msgstr "按列表视图观看文件"
+
+#: ../src/common/docview.cpp:1952
+msgid "Views"
+msgstr "视图"
+
+#: ../src/common/accelcmn.cpp:108
+msgid "WINDOWS_LEFT"
+msgstr "WINDOWS_LEFT"
+
+#: ../src/common/accelcmn.cpp:110
+msgid "WINDOWS_MENU"
+msgstr "WINDOWS_MENU"
+
+#: ../src/common/accelcmn.cpp:109
+msgid "WINDOWS_RIGHT"
+msgstr "WINDOWS_RIGHT"
+
+#: ../src/unix/epolldispatcher.cpp:213
+#, c-format
+msgid "Waiting for IO on epoll descriptor %d failed"
+msgstr "等待 epoll 描述符 %d 的 IO 时失败"
+
+#: ../src/common/log.cpp:227
+msgid "Warning: "
+msgstr "警告: "
+
+#: ../src/propgrid/advprops.cpp:651
+msgid "Weight"
+msgstr "字体粗细"
+
+#: ../src/common/fmapbase.cpp:148
+msgid "Western European (ISO-8859-1)"
+msgstr "西欧 (ISO-8859-1)"
+
+#: ../src/common/fmapbase.cpp:162
+msgid "Western European with Euro (ISO-8859-15)"
+msgstr "西欧带欧元符号 (ISO-8859-15)"
+
+#: ../src/generic/fontdlgg.cpp:446 ../src/generic/fontdlgg.cpp:448
+msgid "Whether the font is underlined."
+msgstr "字体是否为下划线。"
+
+#: ../src/generic/fdrepdlg.cpp:144
+msgid "Whole word"
+msgstr "整字"
+
+#: ../src/html/helpwnd.cpp:547
+msgid "Whole words only"
+msgstr "仅为整字"
+
+#: ../src/univ/themes/win32.cpp:1102
+msgid "Win32 theme"
+msgstr "Win32 主题"
+
+#: ../src/msw/utils.cpp:1220
+msgid "Win32s on Windows 3.1"
+msgstr "Windows 3.1 上的 Win32s"
+
+#: ../src/msw/utils.cpp:1270
+msgid "Windows 2000"
+msgstr "Windows 2000"
+
+#: ../src/msw/utils.cpp:1302
+msgid "Windows 7"
+msgstr "Windows 7"
+
+#: ../src/msw/utils.cpp:1234
+msgid "Windows 95"
+msgstr "Windows 95"
+
+#: ../src/msw/utils.cpp:1230
+msgid "Windows 95 OSR2"
+msgstr "Windows 95 OSR2"
+
+#: ../src/msw/utils.cpp:1245
+msgid "Windows 98"
+msgstr "Windows 98"
+
+#: ../src/msw/utils.cpp:1241
+msgid "Windows 98 SE"
+msgstr "Windows 98 SE"
+
+#: ../src/msw/utils.cpp:1252
+#, c-format
+msgid "Windows 9x (%d.%d)"
+msgstr "Windows 9x (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:177
+msgid "Windows Arabic (CP 1256)"
+msgstr "Windows 阿拉伯语 (CP 1256)"
+
+#: ../src/common/fmapbase.cpp:178
+msgid "Windows Baltic (CP 1257)"
+msgstr "Windows 波罗的海语 (CP 1257)"
+
+#: ../src/msw/utils.cpp:1214
+#, c-format
+msgid "Windows CE (%d.%d)"
+msgstr "Windows CE (%d.%d)"
+
+#: ../src/common/fmapbase.cpp:171
+msgid "Windows Central European (CP 1250)"
+msgstr "Windows 中欧 (CP 1250)"
+
+#: ../src/common/fmapbase.cpp:168
+msgid "Windows Chinese Simplified (CP 936) or GB-2312"
+msgstr "Windows 简体中文 (CP 936) 或 GB-2312"
+
+#: ../src/common/fmapbase.cpp:170
+msgid "Windows Chinese Traditional (CP 950) or Big-5"
+msgstr "Windows 繁体中文 (CP 950) 或 Big-5"
+
+#: ../src/common/fmapbase.cpp:172
+msgid "Windows Cyrillic (CP 1251)"
+msgstr "Windows 西里尔语 (CP 1251)"
+
+#: ../src/common/fmapbase.cpp:174
+msgid "Windows Greek (CP 1253)"
+msgstr "Windows 希腊语 (CP 1253)"
+
+#: ../src/common/fmapbase.cpp:176
+msgid "Windows Hebrew (CP 1255)"
+msgstr "Windows 希伯来语 (CP 1255)"
+
+#: ../src/common/fmapbase.cpp:167
+msgid "Windows Japanese (CP 932) or Shift-JIS"
+msgstr "Windows 日语 (CP 932) 或 Shift-JIS"
+
+#: ../src/common/fmapbase.cpp:180
+msgid "Windows Johab (CP 1361)"
+msgstr "Windows 朝鲜语 (CP 1361)"
+
+#: ../src/common/fmapbase.cpp:169
+msgid "Windows Korean (CP 949)"
+msgstr "Windows 韩语 (CP 949)"
+
+#: ../src/msw/utils.cpp:1249
+msgid "Windows ME"
+msgstr "Windows ME"
+
+#: ../src/msw/utils.cpp:1310
+#, c-format
+msgid "Windows NT %lu.%lu"
+msgstr "Windows NT %lu.%lu"
+
+#: ../src/msw/utils.cpp:1279
+msgid "Windows Server 2003"
+msgstr "Windows Server 2003"
+
+#: ../src/msw/utils.cpp:1295
+msgid "Windows Server 2008"
+msgstr "Windows Server 2008"
+
+#: ../src/msw/utils.cpp:1301
+msgid "Windows Server 2008 R2"
+msgstr "Windows Server 2008 R2"
+
+#: ../src/common/fmapbase.cpp:166
+msgid "Windows Thai (CP 874)"
+msgstr "Windows 泰国语 (CP 874)"
+
+#: ../src/common/fmapbase.cpp:175
+msgid "Windows Turkish (CP 1254)"
+msgstr "Windows 土耳其语 (CP 1254)"
+
+#: ../src/common/fmapbase.cpp:179
+msgid "Windows Vietnamese (CP 1258)"
+msgstr "Windows 越南语 (CP 1258)"
+
+#: ../src/msw/utils.cpp:1296
+msgid "Windows Vista"
+msgstr "Windows Vista"
+
+#: ../src/common/fmapbase.cpp:173
+msgid "Windows Western European (CP 1252)"
+msgstr "Windows 西欧 (CP 1252)"
+
+#: ../src/msw/utils.cpp:1285
+msgid "Windows XP"
+msgstr "Windows XP"
+
+#: ../src/common/fmapbase.cpp:181
+msgid "Windows/DOS OEM (CP 437)"
+msgstr "Windows/DOS OEM (CP 437)"
+
+#: ../src/common/fmapbase.cpp:165
+msgid "Windows/DOS OEM Cyrillic (CP 866)"
+msgstr "Windows/DOS OEM 西里尔语 (CP 866)"
+
+#: ../src/common/ffile.cpp:148
+#, c-format
+msgid "Write error on file '%s'"
+msgstr "写文件 '%s' 错误"
+
+#: ../src/xml/xml.cpp:844
+#, c-format
+msgid "XML parsing error: '%s' at line %d"
+msgstr "XML 解析错误: '%s',位于行 %d"
+
+#: ../src/common/xpmdecod.cpp:796
+msgid "XPM: Malformed pixel data!"
+msgstr "XPM: 错误的象素数据!"
+
+#: ../src/common/xpmdecod.cpp:705
+#, c-format
+msgid "XPM: incorrect colour description in line %d"
+msgstr "XPM: 在第 %d 行有错误的颜色描述"
+
+#: ../src/common/xpmdecod.cpp:680
+msgid "XPM: incorrect header format!"
+msgstr "XPM: 不正确的头格式!"
+
+#: ../src/common/xpmdecod.cpp:716 ../src/common/xpmdecod.cpp:725
+#, c-format
+msgid "XPM: malformed colour definition '%s' at line %d!"
+msgstr "XPM: 错误的颜色定义 '%s',位于行 %d!"
+
+#: ../src/common/xpmdecod.cpp:755
+msgid "XPM: no colors left to use for mask!"
+msgstr "XPM: 没有剩下可供选择的掩码颜色!"
+
+#: ../src/common/xpmdecod.cpp:782
+#, c-format
+msgid "XPM: truncated image data at line %d!"
+msgstr "XPM: 图像数据被截断,位于行 %d!"
+
+#: ../include/wx/msgdlg.h:271 ../src/common/stockitem.cpp:206
+#: ../src/motif/msgdlg.cpp:196
+msgid "Yes"
+msgstr "是"
+
+#: ../src/osx/carbon/overlay.cpp:155
+msgid "You cannot Clear an overlay that is not inited"
+msgstr "你无法清除未初始化的 overlay。"
+
+#: ../src/osx/carbon/overlay.cpp:107 ../src/dfb/overlay.cpp:61
+msgid "You cannot Init an overlay twice"
+msgstr "你不能初始化 overlay 两次"
+
+#: ../src/generic/dirdlgg.cpp:316
+msgid "You cannot add a new directory to this section."
+msgstr "你无法向该项中加入新的目录。"
+
+#: ../src/propgrid/propgrid.cpp:3258
+msgid "You have entered invalid value. Press ESC to cancel editing."
+msgstr "你输入了无效值。按 ESC 取消编辑。"
+
+#: ../src/common/stockitem.cpp:209
+msgid "Zoom &In"
+msgstr "放大(&I)"
+
+#: ../src/common/stockitem.cpp:210
+msgid "Zoom &Out"
+msgstr "缩小(&O)"
+
+#: ../src/common/stockitem.cpp:209 ../src/common/prntbase.cpp:1564
+msgid "Zoom In"
+msgstr "放大"
+
+#: ../src/common/stockitem.cpp:210 ../src/common/prntbase.cpp:1550
+msgid "Zoom Out"
+msgstr "缩小"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to &Fit"
+msgstr "缩放以适应窗口(&F)"
+
+#: ../src/common/stockitem.cpp:208
+msgid "Zoom to Fit"
+msgstr "缩放以适应窗口"
+
+#: ../src/msw/dde.cpp:1144
+msgid "a DDEML application has created a prolonged race condition."
+msgstr "DDEML 应用程序已创建延时 race 条件."
+
+#: ../src/msw/dde.cpp:1132
+msgid ""
+"a DDEML function was called without first calling the DdeInitialize "
+"function,\n"
+"or an invalid instance identifier\n"
+"was passed to a DDEML function."
+msgstr ""
+"没有调用 DdeInitialize 初始化函数就调用DDEML其它函数,\n"
+"或传给DDEML函数的是\n"
+"无效的实例标识。"
+
+#: ../src/msw/dde.cpp:1150
+msgid "a client's attempt to establish a conversation has failed."
+msgstr "客户试图建立的会话已失败。"
+
+#: ../src/msw/dde.cpp:1147
+msgid "a memory allocation failed."
+msgstr "内存分配失败。"
+
+#: ../src/msw/dde.cpp:1141
+msgid "a parameter failed to be validated by the DDEML."
+msgstr "DDEML 参数验证失败。"
+
+#: ../src/msw/dde.cpp:1123
+msgid "a request for a synchronous advise transaction has timed out."
+msgstr "同步 advise 事务请求超时。"
+
+#: ../src/msw/dde.cpp:1129
+msgid "a request for a synchronous data transaction has timed out."
+msgstr "同步 data 事务请求超时。"
+
+#: ../src/msw/dde.cpp:1138
+msgid "a request for a synchronous execute transaction has timed out."
+msgstr "同步 execute 事务请求超时。"
+
+#: ../src/msw/dde.cpp:1156
+msgid "a request for a synchronous poke transaction has timed out."
+msgstr "同步 poke 事务请求超时。"
+
+#: ../src/msw/dde.cpp:1171
+msgid "a request to end an advise transaction has timed out."
+msgstr "终止 advise 事务的请求超时。"
+
+#: ../src/msw/dde.cpp:1165
+msgid ""
+"a server-side transaction was attempted on a conversation\n"
+"that was terminated by the client, or the server\n"
+"terminated before completing a transaction."
+msgstr ""
+"服务器端事务试图处理\n"
+"已被客户端终止的会话,或服务器\n"
+"在完成事务前终止。"
+
+#: ../src/msw/dde.cpp:1153
+msgid "a transaction failed."
+msgstr "事务失败。"
+
+#: ../src/common/accelcmn.cpp:184
+msgid "alt"
+msgstr "alt"
+
+#: ../src/msw/dde.cpp:1135
+msgid ""
+"an application initialized as APPCLASS_MONITOR has\n"
+"attempted to perform a DDE transaction,\n"
+"or an application initialized as APPCMD_CLIENTONLY has \n"
+"attempted to perform server transactions."
+msgstr ""
+"初始化为 APPCLASS_MONITOR 的应用程序\n"
+"试图执行 DDE 事务,\n"
+"或初始化为 APPCMD_CLIENTONLY 的应用程序\n"
+"视图执行服务器事务。"
+
+#: ../src/msw/dde.cpp:1159
+msgid "an internal call to the PostMessage function has failed. "
+msgstr "内部调用 PostMessage 失败。"
+
+#: ../src/msw/dde.cpp:1168
+msgid "an internal error has occurred in the DDEML."
+msgstr "在 DDEML 中发生内部错误。"
+
+#: ../src/msw/dde.cpp:1174
+msgid ""
+"an invalid transaction identifier was passed to a DDEML function.\n"
+"Once the application has returned from an XTYP_XACT_COMPLETE callback,\n"
+"the transaction identifier for that callback is no longer valid."
+msgstr ""
+"传给 DDEML 函数的是无效的事务标识符。\n"
+"一旦应用程序从 XTYP_XACT_COMPLETE 回调函数返回,\n"
+"回调函数事务标识符就不再有效。"
+
+#: ../src/common/zipstrm.cpp:1272
+msgid "assuming this is a multi-part zip concatenated"
+msgstr "假定这是一个分段 zip 文件的合并"
+
+#: ../src/common/fileconf.cpp:1882
+#, c-format
+msgid "attempt to change immutable key '%s' ignored."
+msgstr "忽略对只读键 '%s' 的修改。"
+
+#: ../src/html/chm.cpp:329
+msgid "bad arguments to library function"
+msgstr "库函数参数错误"
+
+#: ../src/html/chm.cpp:341
+msgid "bad signature"
+msgstr "错误的签名"
+
+#: ../src/common/zipstrm.cpp:1715
+msgid "bad zipfile offset to entry"
+msgstr "zip 文件中到条目的偏移值错误"
+
+#: ../src/common/ftp.cpp:405
+msgid "binary"
+msgstr "二进制"
+
+#: ../src/common/fontcmn.cpp:978
+msgid "bold"
+msgstr "粗体"
+
+#: ../src/os2/iniconf.cpp:463
+msgid "buffer is too small for Windows directory."
+msgstr "Windows 目录的缓存太小。"
+
+#: ../src/msw/utils.cpp:1316
+#, c-format
+msgid "build %lu"
+msgstr "build %lu"
+
+#: ../src/common/ffile.cpp:79
+#, c-format
+msgid "can't close file '%s'"
+msgstr "无法关闭文件 '%s'"
+
+#: ../src/common/file.cpp:278
+#, c-format
+msgid "can't close file descriptor %d"
+msgstr "无法关闭文件描述符 %d"
+
+#: ../src/common/file.cpp:604
+#, c-format
+msgid "can't commit changes to file '%s'"
+msgstr "无法把修改提交给文件 '%s'"
+
+#: ../src/common/file.cpp:212
+#, c-format
+msgid "can't create file '%s'"
+msgstr "无法创建文件 '%s'"
+
+#: ../src/common/fileconf.cpp:1176
+#, c-format
+msgid "can't delete user configuration file '%s'"
+msgstr "无法删除用户配置文件 '%s'"
+
+#: ../src/common/file.cpp:511
+#, c-format
+msgid "can't determine if the end of file is reached on descriptor %d"
+msgstr "无法确定是否已达描述符 %d 的尾部"
+
+#: ../src/msdos/utilsdos.cpp:310 ../src/msdos/utilsdos.cpp:475
+#, c-format
+msgid "can't execute '%s'"
+msgstr "执行 '%s'失败"
+
+#: ../src/common/zipstrm.cpp:1490
+msgid "can't find central directory in zip"
+msgstr "无法在 zip 文件中找到中央目录"
+
+#: ../src/common/file.cpp:481
+#, c-format
+msgid "can't find length of file on file descriptor %d"
+msgstr "无法获得文件描述符 %d 的文件长度"
+
+#: ../src/msw/utils.cpp:373
+msgid "can't find user's HOME, using current directory."
+msgstr "找不到用户的 HOME 目录,使用当前目录。"
+
+#: ../src/common/file.cpp:382
+#, c-format
+msgid "can't flush file descriptor %d"
+msgstr "无法刷新文件描述符 %d"
+
+#: ../src/common/file.cpp:438 ../src/msw/wince/filefnwce.cpp:204
+#, c-format
+msgid "can't get seek position on file descriptor %d"
+msgstr "无法获得文件描述符 %d 的指针位置"
+
+#: ../src/common/fontmap.cpp:325
+msgid "can't load any font, aborting"
+msgstr "无法装载任何字体,正在中止"
+
+#: ../src/common/file.cpp:264 ../src/common/ffile.cpp:63
+#, c-format
+msgid "can't open file '%s'"
+msgstr "无法打开文件 '%s'"
+
+#: ../src/common/fileconf.cpp:351
+#, c-format
+msgid "can't open global configuration file '%s'."
+msgstr "无法打开全局配置文件 '%s'。"
+
+#: ../src/common/fileconf.cpp:367
+#, c-format
+msgid "can't open user configuration file '%s'."
+msgstr "无法打开用户配置文件 '%s'。"
+
+#: ../src/common/fileconf.cpp:1017
+msgid "can't open user configuration file."
+msgstr "无法打开用户配置文件。"
+
+#: ../src/common/zipstrm.cpp:527
+msgid "can't re-initialize zlib deflate stream"
+msgstr "无法重新初始化 zlib 压缩流。"
+
+#: ../src/common/zipstrm.cpp:552
+msgid "can't re-initialize zlib inflate stream"
+msgstr "无法重新初始化 zlib 解压流。"
+
+#: ../src/common/file.cpp:334
+#, c-format
+msgid "can't read from file descriptor %d"
+msgstr "无法读取文件描述符 %d"
+
+#: ../src/common/file.cpp:599
+#, c-format
+msgid "can't remove file '%s'"
+msgstr "无法删除文件 '%s'"
+
+#: ../src/common/file.cpp:616
+#, c-format
+msgid "can't remove temporary file '%s'"
+msgstr "无法删除临时文件 '%s'"
+
+#: ../src/common/file.cpp:424 ../src/msw/wince/filefnwce.cpp:190
+#, c-format
+msgid "can't seek on file descriptor %d"
+msgstr "无法定位文件描述符 %d"
+
+#: ../src/common/textfile.cpp:299
+#, c-format
+msgid "can't write buffer '%s' to disk."
+msgstr "无法把缓存区 '%s' 写到磁盘。"
+
+#: ../src/common/file.cpp:350
+#, c-format
+msgid "can't write to file descriptor %d"
+msgstr "无法写文件描述符 %d"
+
+#: ../src/common/fileconf.cpp:1031
+msgid "can't write user configuration file."
+msgstr "无法写用户配置文件。"
+
+#: ../src/html/chm.cpp:345
+msgid "checksum error"
+msgstr "校验和错误"
+
+#: ../src/common/tarstrm.cpp:820
+msgid "checksum failure reading tar header block"
+msgstr "读取tar头部块发生校验和错误"
+
+#: ../src/richtext/richtextborderspage.cpp:280
+#: ../src/richtext/richtextborderspage.cpp:310
+#: ../src/richtext/richtextborderspage.cpp:340
+#: ../src/richtext/richtextborderspage.cpp:370
+#: ../src/richtext/richtextborderspage.cpp:424
+#: ../src/richtext/richtextborderspage.cpp:454
+#: ../src/richtext/richtextborderspage.cpp:484
+#: ../src/richtext/richtextborderspage.cpp:514
+#: ../src/richtext/richtextmarginspage.cpp:202
+#: ../src/richtext/richtextmarginspage.cpp:227
+#: ../src/richtext/richtextmarginspage.cpp:250
+#: ../src/richtext/richtextmarginspage.cpp:275
+#: ../src/richtext/richtextmarginspage.cpp:316
+#: ../src/richtext/richtextmarginspage.cpp:341
+#: ../src/richtext/richtextmarginspage.cpp:364
+#: ../src/richtext/richtextmarginspage.cpp:389
+#: ../src/richtext/richtextsizepage.cpp:339
+#: ../src/richtext/richtextsizepage.cpp:373
+#: ../src/richtext/richtextsizepage.cpp:400
+#: ../src/richtext/richtextsizepage.cpp:427
+#: ../src/richtext/richtextsizepage.cpp:454
+#: ../src/richtext/richtextsizepage.cpp:481
+#: ../src/richtext/richtextsizepage.cpp:555
+#: ../src/richtext/richtextsizepage.cpp:590
+#: ../src/richtext/richtextsizepage.cpp:625
+#: ../src/richtext/richtextsizepage.cpp:660
+msgid "cm"
+msgstr "厘米"
+
+#: ../src/html/chm.cpp:347
+msgid "compression error"
+msgstr "压缩错误"
+
+#: ../src/common/regex.cpp:239
+msgid "conversion to 8-bit encoding failed"
+msgstr "无法转换为 8 位编码"
+
+#: ../src/common/accelcmn.cpp:182
+msgid "ctrl"
+msgstr "ctrl"
+
+#: ../src/common/cmdline.cpp:1323
+msgid "date"
+msgstr "日期"
+
+#: ../src/html/chm.cpp:349
+msgid "decompression error"
+msgstr "解压缩错误"
+
+#: ../src/richtext/richtextstyles.cpp:780 ../src/common/fmapbase.cpp:820
+msgid "default"
+msgstr "缺省值"
+
+#: ../src/common/cmdline.cpp:1319
+msgid "double"
+msgstr ""
+
+#: ../src/common/debugrpt.cpp:543
+msgid "dump of the process state (binary)"
+msgstr "转储进程状态(二进制码)"
+
+#: ../src/common/datetimefmt.cpp:1936
+msgid "eighteenth"
+msgstr "第十八"
+
+#: ../src/common/datetimefmt.cpp:1926
+msgid "eighth"
+msgstr "第八"
+
+#: ../src/common/datetimefmt.cpp:1929
+msgid "eleventh"
+msgstr "第十一"
+
+#: ../src/common/fileconf.cpp:1868
+#, c-format
+msgid "entry '%s' appears more than once in group '%s'"
+msgstr "条目 '%s' 在组 '%s' 中已出现一次以上"
+
+#: ../src/html/chm.cpp:343
+msgid "error in data format"
+msgstr "文件格式错误"
+
+#: ../src/msdos/utilsdos.cpp:413
+#, c-format
+msgid "error opening '%s'"
+msgstr "打开 '%s' 出错"
+
+#: ../src/html/chm.cpp:331
+msgid "error opening file"
+msgstr "打开文件出错"
+
+#: ../src/common/zipstrm.cpp:1576
+msgid "error reading zip central directory"
+msgstr "读 zip 中央目录时出错"
+
+#: ../src/common/zipstrm.cpp:1667
+msgid "error reading zip local header"
+msgstr "读 zip 本地头时出错"
+
+#: ../src/common/zipstrm.cpp:2396
+#, c-format
+msgid "error writing zip entry '%s': bad crc or length"
+msgstr "写zip条目 '%s' 时出错: crc 校验或长度错误"
+
+#: ../src/common/ffile.cpp:170
+#, c-format
+msgid "failed to flush the file '%s'"
+msgstr "刷新文件 '%s' 失败"
+
+#: ../src/common/datetimefmt.cpp:1933
+msgid "fifteenth"
+msgstr "第十五"
+
+#: ../src/common/datetimefmt.cpp:1923
+msgid "fifth"
+msgstr "第五"
+
+#: ../src/common/fileconf.cpp:610
+#, c-format
+msgid "file '%s', line %d: '%s' ignored after group header."
+msgstr "文件 '%s',行 %d: 组头之后的 '%s' 被忽略。"
+
+#: ../src/common/fileconf.cpp:639
+#, c-format
+msgid "file '%s', line %d: '=' expected."
+msgstr "文件 '%s',行 %d: 期待出现 '='。"
+
+#: ../src/common/fileconf.cpp:662
+#, c-format
+msgid "file '%s', line %d: key '%s' was first found at line %d."
+msgstr "文件 '%s',行 %d: 键 '%s' 第一次出现在行 %d。"
+
+#: ../src/common/fileconf.cpp:652
+#, c-format
+msgid "file '%s', line %d: value for immutable key '%s' ignored."
+msgstr "文件 '%s',行 %d: 忽略不可变键 '%s' 的值。"
+
+#: ../src/common/fileconf.cpp:574
+#, c-format
+msgid "file '%s': unexpected character %c at line %d."
+msgstr "文件 '%s': 非预期的字符 %c 存在于行 %d。"
+
+#: ../src/richtext/richtextbuffer.cpp:8358
+msgid "files"
+msgstr "文件"
+
+#: ../src/common/datetimefmt.cpp:1919
+msgid "first"
+msgstr "第一"
+
+#: ../src/html/helpwnd.cpp:1265
+msgid "font size"
+msgstr "字体大小"
+
+#: ../src/common/datetimefmt.cpp:1932
+msgid "fourteenth"
+msgstr "第十四"
+
+#: ../src/common/datetimefmt.cpp:1922
+msgid "fourth"
+msgstr "第四"
+
+#: ../src/common/appbase.cpp:695
+msgid "generate verbose log messages"
+msgstr "生成详细的日志信息"
+
+#: ../src/richtext/richtextbuffer.cpp:12212
+#: ../src/richtext/richtextbuffer.cpp:12322
+msgid "image"
+msgstr "图片"
+
+#: ../src/common/tarstrm.cpp:796
+msgid "incomplete header block in tar"
+msgstr "tar头部块不完整"
+
+#: ../src/common/xtixml.cpp:489
+msgid "incorrect event handler string, missing dot"
+msgstr "错误的时间句柄字符串,缺少点号('.')"
+
+#: ../src/common/tarstrm.cpp:1381
+msgid "incorrect size given for tar entry"
+msgstr "tar项目不正确的大小"
+
+#: ../src/common/tarstrm.cpp:993
+msgid "invalid data in extended tar header"
+msgstr "tar扩展头部中有图小数据"
+
+#: ../src/generic/logg.cpp:1050
+msgid "invalid message box return value"
+msgstr "消息框返回无效的值"
+
+#: ../src/common/zipstrm.cpp:1445
+msgid "invalid zip file"
+msgstr "无效的 zip 文件"
+
+#: ../src/common/fontcmn.cpp:983
+msgid "italic"
+msgstr "斜体"
+
+#: ../src/common/fontcmn.cpp:973
+msgid "light"
+msgstr "细体"
+
+#: ../src/common/intl.cpp:293
+#, c-format
+msgid "locale '%s' cannot be set."
+msgstr "无法设置地区为 '%s'。"
+
+#: ../src/common/datetimefmt.cpp:2092
+msgid "midnight"
+msgstr "午夜"
+
+#: ../src/common/datetimefmt.cpp:1937
+msgid "nineteenth"
+msgstr "第十九"
+
+#: ../src/common/datetimefmt.cpp:1927
+msgid "ninth"
+msgstr "第九"
+
+#: ../src/msw/dde.cpp:1119
+msgid "no DDE error."
+msgstr "没有 DDE 错误。"
+
+#: ../src/html/chm.cpp:327
+msgid "no error"
+msgstr "没有错误"
+
+#: ../src/dfb/fontmgr.cpp:174
+#, c-format
+msgid "no fonts found in %s, using builtin font"
+msgstr "%s中字体为找到,将使用内置字体"
+
+#: ../src/html/helpdata.cpp:655
+msgid "noname"
+msgstr "未名"
+
+#: ../src/common/datetimefmt.cpp:2091
+msgid "noon"
+msgstr "中午"
+
+#: ../src/richtext/richtextstyles.cpp:779
+msgid "normal"
+msgstr "正常"
+
+#: ../src/gtk/print.cpp:1218 ../src/gtk/print.cpp:1323
+msgid "not implemented"
+msgstr "为实现"
+
+#: ../src/common/cmdline.cpp:1315
+msgid "num"
+msgstr "num"
+
+#: ../src/common/xtixml.cpp:259
+msgid "objects cannot have XML Text Nodes"
+msgstr "对象不能有 XML 文本节点"
+
+#: ../src/html/chm.cpp:339
+msgid "out of memory"
+msgstr "内存耗尽"
+
+#: ../src/richtext/richtextsizepage.cpp:340
+#: ../src/richtext/richtextsizepage.cpp:374
+#: ../src/richtext/richtextsizepage.cpp:401
+#: ../src/richtext/richtextsizepage.cpp:428
+#: ../src/richtext/richtextsizepage.cpp:455
+#: ../src/richtext/richtextsizepage.cpp:482
+#: ../src/richtext/richtextsizepage.cpp:556
+#: ../src/richtext/richtextsizepage.cpp:591
+#: ../src/richtext/richtextsizepage.cpp:626
+#: ../src/richtext/richtextsizepage.cpp:661
+msgid "percent"
+msgstr "百分比"
+
+#: ../src/common/debugrpt.cpp:519
+msgid "process context description"
+msgstr "进程上下文描述"
+
+#: ../src/richtext/richtextfontpage.cpp:186
+#: ../src/richtext/richtextfontpage.cpp:189
+msgid "pt"
+msgstr "点"
+
+#: ../src/richtext/richtextfontpage.cpp:187
+#: ../src/richtext/richtextborderspage.cpp:279
+#: ../src/richtext/richtextborderspage.cpp:281
+#: ../src/richtext/richtextborderspage.cpp:282
+#: ../src/richtext/richtextborderspage.cpp:309
+#: ../src/richtext/richtextborderspage.cpp:311
+#: ../src/richtext/richtextborderspage.cpp:312
+#: ../src/richtext/richtextborderspage.cpp:339
+#: ../src/richtext/richtextborderspage.cpp:341
+#: ../src/richtext/richtextborderspage.cpp:342
+#: ../src/richtext/richtextborderspage.cpp:369
+#: ../src/richtext/richtextborderspage.cpp:371
+#: ../src/richtext/richtextborderspage.cpp:372
+#: ../src/richtext/richtextborderspage.cpp:423
+#: ../src/richtext/richtextborderspage.cpp:425
+#: ../src/richtext/richtextborderspage.cpp:426
+#: ../src/richtext/richtextborderspage.cpp:453
+#: ../src/richtext/richtextborderspage.cpp:455
+#: ../src/richtext/richtextborderspage.cpp:456
+#: ../src/richtext/richtextborderspage.cpp:483
+#: ../src/richtext/richtextborderspage.cpp:485
+#: ../src/richtext/richtextborderspage.cpp:486
+#: ../src/richtext/richtextborderspage.cpp:513
+#: ../src/richtext/richtextborderspage.cpp:515
+#: ../src/richtext/richtextborderspage.cpp:516
+#: ../src/richtext/richtextmarginspage.cpp:201
+#: ../src/richtext/richtextmarginspage.cpp:203
+#: ../src/richtext/richtextmarginspage.cpp:204
+#: ../src/richtext/richtextmarginspage.cpp:226
+#: ../src/richtext/richtextmarginspage.cpp:228
+#: ../src/richtext/richtextmarginspage.cpp:229
+#: ../src/richtext/richtextmarginspage.cpp:249
+#: ../src/richtext/richtextmarginspage.cpp:251
+#: ../src/richtext/richtextmarginspage.cpp:252
+#: ../src/richtext/richtextmarginspage.cpp:274
+#: ../src/richtext/richtextmarginspage.cpp:276
+#: ../src/richtext/richtextmarginspage.cpp:277
+#: ../src/richtext/richtextmarginspage.cpp:315
+#: ../src/richtext/richtextmarginspage.cpp:317
+#: ../src/richtext/richtextmarginspage.cpp:318
+#: ../src/richtext/richtextmarginspage.cpp:340
+#: ../src/richtext/richtextmarginspage.cpp:342
+#: ../src/richtext/richtextmarginspage.cpp:343
+#: ../src/richtext/richtextmarginspage.cpp:363
+#: ../src/richtext/richtextmarginspage.cpp:365
+#: ../src/richtext/richtextmarginspage.cpp:366
+#: ../src/richtext/richtextmarginspage.cpp:388
+#: ../src/richtext/richtextmarginspage.cpp:390
+#: ../src/richtext/richtextmarginspage.cpp:391
+#: ../src/richtext/richtextsizepage.cpp:338
+#: ../src/richtext/richtextsizepage.cpp:341
+#: ../src/richtext/richtextsizepage.cpp:342
+#: ../src/richtext/richtextsizepage.cpp:372
+#: ../src/richtext/richtextsizepage.cpp:375
+#: ../src/richtext/richtextsizepage.cpp:376
+#: ../src/richtext/richtextsizepage.cpp:399
+#: ../src/richtext/richtextsizepage.cpp:402
+#: ../src/richtext/richtextsizepage.cpp:403
+#: ../src/richtext/richtextsizepage.cpp:426
+#: ../src/richtext/richtextsizepage.cpp:429
+#: ../src/richtext/richtextsizepage.cpp:430
+#: ../src/richtext/richtextsizepage.cpp:453
+#: ../src/richtext/richtextsizepage.cpp:456
+#: ../src/richtext/richtextsizepage.cpp:457
+#: ../src/richtext/richtextsizepage.cpp:480
+#: ../src/richtext/richtextsizepage.cpp:483
+#: ../src/richtext/richtextsizepage.cpp:484
+#: ../src/richtext/richtextsizepage.cpp:554
+#: ../src/richtext/richtextsizepage.cpp:557
+#: ../src/richtext/richtextsizepage.cpp:558
+#: ../src/richtext/richtextsizepage.cpp:589
+#: ../src/richtext/richtextsizepage.cpp:592
+#: ../src/richtext/richtextsizepage.cpp:593
+#: ../src/richtext/richtextsizepage.cpp:624
+#: ../src/richtext/richtextsizepage.cpp:627
+#: ../src/richtext/richtextsizepage.cpp:628
+#: ../src/richtext/richtextsizepage.cpp:659
+#: ../src/richtext/richtextsizepage.cpp:662
+#: ../src/richtext/richtextsizepage.cpp:663
+msgid "px"
+msgstr "像素"
+
+#: ../src/common/accelcmn.cpp:188
+msgid "rawctrl"
+msgstr "rawctrl"
+
+#: ../src/html/chm.cpp:333
+msgid "read error"
+msgstr "读取错误"
+
+#: ../src/common/zipstrm.cpp:1882
+#, c-format
+msgid "reading zip stream (entry %s): bad crc"
+msgstr "读入 zip 流 (条目 %s): crc校验错误"
+
+#: ../src/common/zipstrm.cpp:1877
+#, c-format
+msgid "reading zip stream (entry %s): bad length"
+msgstr "读入 zip 流 (条目 %s): 长度错误"
+
+#: ../src/msw/dde.cpp:1162
+msgid "reentrancy problem."
+msgstr "重入问题。"
+
+#: ../src/common/datetimefmt.cpp:1920
+msgid "second"
+msgstr "第二"
+
+#: ../src/html/chm.cpp:337
+msgid "seek error"
+msgstr "搜索错误"
+
+#: ../src/common/datetimefmt.cpp:1935
+msgid "seventeenth"
+msgstr "第十七"
+
+#: ../src/common/datetimefmt.cpp:1925
+msgid "seventh"
+msgstr "第七"
+
+#: ../src/common/accelcmn.cpp:186
+msgid "shift"
+msgstr "shift"
+
+#: ../src/common/appbase.cpp:685
+msgid "show this help message"
+msgstr "显示帮助信息"
+
+#: ../src/common/datetimefmt.cpp:1934
+msgid "sixteenth"
+msgstr "第十六"
+
+#: ../src/common/datetimefmt.cpp:1924
+msgid "sixth"
+msgstr "第六"
+
+#: ../src/common/appcmn.cpp:227
+msgid "specify display mode to use (e.g. 640x480-16)"
+msgstr "指定使用的显示模式 (例如: 640x480-16位色)"
+
+#: ../src/common/appcmn.cpp:213
+msgid "specify the theme to use"
+msgstr "指定使用的主题"
+
+#: ../src/richtext/richtextbuffer.cpp:8876
+msgid "standard/circle"
+msgstr "标准/圆形"
+
+#: ../src/richtext/richtextbuffer.cpp:8877
+msgid "standard/circle-outline"
+msgstr "标准/圆框"
+
+#: ../src/richtext/richtextbuffer.cpp:8879
+msgid "standard/diamond"
+msgstr "标准/菱形"
+
+#: ../src/richtext/richtextbuffer.cpp:8878
+msgid "standard/square"
+msgstr "标准/方形"
+
+#: ../src/richtext/richtextbuffer.cpp:8880
+msgid "standard/triangle"
+msgstr "标准/三角形"
+
+#: ../src/common/zipstrm.cpp:1782
+msgid "stored file length not in Zip header"
+msgstr "Zip 头没有已存文件的长度信息"
+
+#: ../src/common/cmdline.cpp:1311
+msgid "str"
+msgstr "str"
+
+#: ../src/common/fontcmn.cpp:794 ../src/common/fontcmn.cpp:969
+msgid "strikethrough"
+msgstr "删除线"
+
+#: ../src/common/tarstrm.cpp:1003 ../src/common/tarstrm.cpp:1025
+#: ../src/common/tarstrm.cpp:1507 ../src/common/tarstrm.cpp:1529
+msgid "tar entry not open"
+msgstr "tar标头未打开"
+
+#: ../src/common/datetimefmt.cpp:1928
+msgid "tenth"
+msgstr "第十"
+
+#: ../src/msw/dde.cpp:1126
+msgid "the response to the transaction caused the DDE_FBUSY bit to be set."
+msgstr "对事件的响应导致 DDE_FBUSY 位被设置。"
+
+#: ../src/common/datetimefmt.cpp:1921
+msgid "third"
+msgstr "第三"
+
+#: ../src/common/datetimefmt.cpp:1931
+msgid "thirteenth"
+msgstr "第十三"
+
+#: ../src/common/datetimefmt.cpp:1725
+msgid "today"
+msgstr "今天"
+
+#: ../src/common/datetimefmt.cpp:1727
+msgid "tomorrow"
+msgstr "明天"
+
+#: ../src/common/fileconf.cpp:1979
+#, c-format
+msgid "trailing backslash ignored in '%s'"
+msgstr "'%s'尾部的斜线将被忽略"
+
+#: ../src/gtk/aboutdlg.cpp:218
+msgid "translator-credits"
+msgstr "翻译人员"
+
+#: ../src/common/datetimefmt.cpp:1930
+msgid "twelfth"
+msgstr "第十二"
+
+#: ../src/common/datetimefmt.cpp:1938
+msgid "twentieth"
+msgstr "第二十"
+
+#: ../src/common/fontcmn.cpp:789 ../src/common/fontcmn.cpp:965
+msgid "underlined"
+msgstr "下划线"
+
+#: ../src/common/fileconf.cpp:2014
+#, c-format
+msgid "unexpected \" at position %d in '%s'."
+msgstr "例外的 \" 在位置 %d (位于 '%s')."
+
+#: ../src/common/tarstrm.cpp:1045
+msgid "unexpected end of file"
+msgstr "意外到达文件结尾"
+
+#: ../src/generic/progdlgg.cpp:399 ../src/common/tarstrm.cpp:371
+#: ../src/common/tarstrm.cpp:394 ../src/common/tarstrm.cpp:425
+msgid "unknown"
+msgstr "未知"
+
+#: ../src/common/xtixml.cpp:253
+#, c-format
+msgid "unknown class %s"
+msgstr "未知类 %s"
+
+#: ../src/common/regex.cpp:261 ../src/html/chm.cpp:351
+msgid "unknown error"
+msgstr "未知错误"
+
+#: ../src/msw/dialup.cpp:490
+#, c-format
+msgid "unknown error (error code %08x)."
+msgstr "未知错误 (错误号 %08x)。"
+
+#: ../src/msw/wince/filefnwce.cpp:172
+msgid "unknown seek origin"
+msgstr "未知搜索原点"
+
+#: ../src/common/fmapbase.cpp:834
+#, c-format
+msgid "unknown-%d"
+msgstr "未知-%d"
+
+#: ../src/common/docview.cpp:507
+msgid "unnamed"
+msgstr "未命名"
+
+#: ../src/common/docview.cpp:1606
+#, c-format
+msgid "unnamed%d"
+msgstr "未命名 %d"
+
+#: ../src/common/zipstrm.cpp:1796 ../src/common/zipstrm.cpp:2184
+msgid "unsupported Zip compression method"
+msgstr "不支持的 Zip 压缩方法"
+
+#: ../src/common/translation.cpp:1883
+#, c-format
+msgid "using catalog '%s' from '%s'."
+msgstr "使用目录 '%s' 从 '%s'。"
+
+#: ../src/html/chm.cpp:335
+msgid "write error"
+msgstr "写错误"
+
+#: ../src/common/time.cpp:318
+msgid "wxGetTimeOfDay failed."
+msgstr "wxGetTimeOfDay 失败。"
+
+#: ../src/gtk/print.cpp:987
+msgid "wxPrintout::GetPageInfo gives a null maxPage."
+msgstr "wxPrintout::GetPageInfo给出无效maxPage"
+
+#: ../src/osx/carbon/dataview.cpp:1303
+msgid "wxWidget control pointer is not a data view pointer"
+msgstr "wxWidget控制指针不是一个数据视图指针"
+
+#: ../src/osx/carbon/dataview.cpp:907
+msgid "wxWidget's control not initialized."
+msgstr "wxWidgets 的控件未初始化。"
+
+#: ../src/motif/app.cpp:245
+#, c-format
+msgid "wxWidgets could not open display for '%s': exiting."
+msgstr "wxWidgets 无法为 '%s' 打开显示设备: 退出。"
+
+#: ../src/x11/app.cpp:164
+msgid "wxWidgets could not open display. Exiting."
+msgstr "wxWidgets 无法打开显示设备。退出。"
+
+#: ../src/richtext/richtextsymboldlg.cpp:434
+msgid "xxxx"
+msgstr "xxxx"
+
+#: ../src/common/datetimefmt.cpp:1726
+msgid "yesterday"
+msgstr "昨天"
+
+#: ../src/common/zstream.cpp:251 ../src/common/zstream.cpp:426
+#, c-format
+msgid "zlib error %d"
+msgstr "zlib 错误 %d"
+
+#: ../src/richtext/richtextliststylepage.cpp:496
+#: ../src/richtext/richtextbulletspage.cpp:301
+msgid "~"
+msgstr "~"
+
+#~ msgid "Print preview"
+#~ msgstr "打印预览"
+
+#~ msgid "'"
+#~ msgstr "'"
+
+#~ msgid "1"
+#~ msgstr "1"
+
+#~ msgid "10"
+#~ msgstr "10"
+
+#~ msgid "3"
+#~ msgstr "3"
+
+#~ msgid "4"
+#~ msgstr "4"
+
+#~ msgid "5"
+#~ msgstr "5"
+
+#~ msgid "6"
+#~ msgstr "6"
+
+#~ msgid "7"
+#~ msgstr "7"
+
+#~ msgid "8"
+#~ msgstr "8"
+
+#~ msgid "9"
+#~ msgstr "9"
+
+#~ msgid "Can't monitor non-existent path \"%s\" for changes."
+#~ msgstr "无法监视不存在路径 \"%s\" 的更新。"
+
+#~ msgid "File system containing watched object was unmounted"
+#~ msgstr "包含监控对象的文件系统已被卸载"
+
+#~ msgid "&Preview..."
+#~ msgstr "预览(&P)..."
+
+#~ msgid "Passing an unkown object to GetObject"
+#~ msgstr "传递一个未知对象给GetObject"
+
+#~ msgid "Preview..."
+#~ msgstr "预览..."
+
+#~ msgid "&Save..."
+#~ msgstr "保存(&S)..."
+
+#~ msgid "About "
+#~ msgstr "关于"
+
+#~ msgid "All files (*.*)|*"
+#~ msgstr "所有文件 (*.*)|*"
+
+#~ msgid "Cannot initialize SciTech MGL!"
+#~ msgstr "无法初始化 SciTech MGL!"
+
+#~ msgid "Cannot initialize display."
+#~ msgstr "无法初始化显示。"
+
+#~ msgid "Cannot start thread: error writing TLS"
+#~ msgstr "无法启动线程: 写 TLS 错误"
+
+#~ msgid "Close\tAlt-F4"
+#~ msgstr "关闭\tAlt-F4"
+
+#~ msgid "Couldn't create cursor."
+#~ msgstr "无法创建光标。"
+
+#~ msgid "Directory '%s' doesn't exist!"
+#~ msgstr "目录 '%s'不存在!"
+
+#~ msgid "File %s does not exist."
+#~ msgstr "文件 %s 不存在。"
+
+#~ msgid "Mode %ix%i-%i not available."
+#~ msgstr "显示模式 %ix%i-%i位色 不支持。"
+
+#~ msgid "Paper Size"
+#~ msgstr "纸张大小"
+
+#~ msgid "%s"
+#~ msgstr "%s"
+
+#~ msgid "&Goto..."
+#~ msgstr "跳转(&G)..."
+
+#~ msgid "<<"
+#~ msgstr "<<"
+
+#~ msgid ">>"
+#~ msgstr ">>"
+
+#~ msgid ">>|"
+#~ msgstr ">>|"
+
+#~ msgid "Can't check image format of file '%s': file does not exist."
+#~ msgstr "不能检查文件格式 '%s': 文件不存在."
+
+#~ msgid "Can't load image from file '%s': file does not exist."
+#~ msgstr "不能从文件 '%s'中装入图像: 文件不存在."
+
+#~ msgid "Cannot open file '%s'."
+#~ msgstr "不能打开文件 '%s'."
+
+#, fuzzy
+#~ msgid "Click to cancel this window."
+#~ msgstr "关闭此窗口"
+
+#, fuzzy
+#~ msgid "Click to confirm your selection."
+#~ msgstr "点击确认字体选择."
+
+#, fuzzy
+#~ msgid "Column could not be added to native control."
+#~ msgstr "文件不能被装载."
+
+#~ msgid "Failed to create a status bar."
+#~ msgstr "创建状态条失败."
+
+#~ msgid "Goto Page"
+#~ msgstr "跳转页面"
+
+#~ msgid "I64"
+#~ msgstr "I64"
+
+#~ msgid "Internal error, illegal wxCustomTypeInfo"
+#~ msgstr "整数错误, 非法的wxCustomTypeInfo"
+
+#, fuzzy
+#~ msgid "Model pointer not initialized."
+#~ msgstr "不能初始化显示."
+
+#, fuzzy
+#~ msgid "No image handler for type %ld defined."
+#~ msgstr "没有类型 %d 的图像处理器."
+
+#, fuzzy
+#~ msgid "Owner not initialized."
+#~ msgstr "不能初始化显示."
+
+#, fuzzy
+#~ msgid "Passed item is invalid."
+#~ msgstr "'%s' 是无效的"
+
+#~ msgid "Passing a already registered object to SetObjectName"
+#~ msgstr "传递一个已注册的对象给SetObjectName"
+
+#~ msgid ""
+#~ "Streaming delegates for not already streamed objects not yet supported"
+#~ msgstr "不支持针对尚未形成流的对象的流委派"
+
+#, fuzzy
+#~ msgid "The file '%s' doesn't exist and couldn't be opened."
+#~ msgstr ""
+#~ "文件 '%s' 不存在,不能被打开.\n"
+#~ "已从最近使用的文件列表(MRU)中移去."
+
+#~ msgid "The path '%s' contains too many \"..\"!"
+#~ msgstr "路径 '%s' 包含了过多的\"..\"!"
+
+#, fuzzy
+#~ msgid "To be deleted item is invalid."
+#~ msgstr "'%s' 是无效的"
+
+#~ msgid "Update"
+#~ msgstr "更新"
+
+#~ msgid "Warning"
+#~ msgstr "警告"
+
+#~ msgid "Windows 2000 (build %lu"
+#~ msgstr "Windows 2000 (build %lu"
+
+#~ msgid "delegate has no type info"
+#~ msgstr "委派没有类型信息"
+
+#~ msgid "|<<"
+#~ msgstr "|<<"
+
+#~ msgid "Archive doesnt contain #SYSTEM file"
+#~ msgstr "存档里没有包含 #SYSTEM 文件"
+
+#~ msgid "Cannot convert dialog units: dialog unknown."
+#~ msgstr "不能转换对话框单元: 未知的对话框."
+
+#~ msgid "Cannot convert from the charset '%s'!"
+#~ msgstr "不能从字符集 '%s' 转换!"
+
+#~ msgid "Cannot find container for unknown control '%s'."
+#~ msgstr "找不到可以对应于未知控件 '%s' 的容器."
+
+#~ msgid "Cannot find font node '%s'."
+#~ msgstr "找不到字体节点 '%s'."
+
+#~ msgid "Cannot parse coordinates from '%s'."
+#~ msgstr "不能从 '%s'中粘贴坐标."
+
+#~ msgid "Cannot parse dimension from '%s'."
+#~ msgstr "不能从 '%s'中解析尺寸."
+
+#~ msgid "Cant create the thread event queue"
+#~ msgstr "不能创建线程事件队列"
+
+#~ msgid "Could not unlock mutex"
+#~ msgstr "不能释放互斥体"
+
+#~ msgid "Error while waiting on semaphore"
+#~ msgstr "等待信号量时出错"
+
+#, fuzzy
+#~ msgid "Failed to connect to session manager: %s"
+#~ msgstr "到 %s 的拨号连接失败: %s"
+
+#~ msgid "Failed to register OpenGL window class."
+#~ msgstr "不能注册 OpenGL窗口类."
+
+#~ msgid "Fatal error"
+#~ msgstr "致命错误"
+
+#~ msgid "Fatal error: "
+#~ msgstr "致命错误: "
+
+#, fuzzy
+#~ msgid "Help : %s"
+#~ msgstr "帮助: %s"
+
+#~ msgid "Invalid XRC resource '%s': doesn't have root node 'resource'."
+#~ msgstr "无效的XRC资源 '%s': 根节点'resource'不存在."
+
+#~ msgid "No handler found for XML node '%s', class '%s'!"
+#~ msgstr "没有找到XML节点 '%s', 类 '%s' 的处理器!"
+
+#~ msgid "Program aborted."
+#~ msgstr "程序终止."
+
+#~ msgid "Referenced object node with ref=\"%s\" not found!"
+#~ msgstr "ref=\"%s\"的引用对象节点不存在!"
+
+#~ msgid "Resource files must have same version number!"
+#~ msgstr "资源文件必须有相同的版本号!"
+
+#, fuzzy
+#~ msgid "Search!"
+#~ msgstr "搜索"
+
+#~ msgid "Sorry, could not open this file for saving."
+#~ msgstr "对不起, 不能打开文件供保存."
+
+#~ msgid "Sorry, could not save this file."
+#~ msgstr "对不起, 不能保存文件."
+
+#~ msgid "Sorry, print preview needs a printer to be installed."
+#~ msgstr "对不起, 需要先安装打印机才能创建打印预览."
+
+#~ msgid "Status: "
+#~ msgstr "状态: "
+
+#~ msgid "Subclass '%s' not found for resource '%s', not subclassing!"
+#~ msgstr "子类 '%s' 在资源 '%s'中不存在, 无法子类化!"
+
+#~ msgid "TIFF library error."
+#~ msgstr "TIFF库错误."
+
+#~ msgid "TIFF library warning."
+#~ msgstr "TIFF库警告."
+
+#~ msgid "Trying to solve a NULL hostname: giving up"
+#~ msgstr "试图解析 NULL 主机名: 放弃"
+
+#~ msgid "Unknown style flag "
+#~ msgstr "未知的风格标志 "
+
+#~ msgid "XRC resource '%s' (class '%s') not found!"
+#~ msgstr "没有找到XRC资源 '%s' (类 '%s')!"
+
+#, fuzzy
+#~ msgid "XRC resource: Cannot create animation from '%s'."
+#~ msgstr "XRC资源: 不能从 '%s'创建位图."
+
+#~ msgid "XRC resource: Cannot create bitmap from '%s'."
+#~ msgstr "XRC资源: 不能从 '%s'创建位图."
+
+#, fuzzy
+#~ msgid ""
+#~ "XRC resource: Incorrect colour specification '%s' for attribute '%s'."
+#~ msgstr "XRC资源: 错误的颜色 '%s' 对于 属性 '%s'."
+
+#~ msgid "[EMPTY]"
+#~ msgstr "[空]"
+
+#~ msgid "catalog file for domain '%s' not found."
+#~ msgstr "找不到域 '%s'的目录文件."
+
+#, fuzzy
+#~ msgid "encoding %i"
+#~ msgstr "编码 %s"
+
+#~ msgid "looking for catalog '%s' in path '%s'."
+#~ msgstr "查找目录 '%s' 在路径 '%s'下."
+
+#~ msgid "wxSocket: invalid signature in ReadMsg."
+#~ msgstr "wxSocket: ReadMsg中无效的签名."
+
+#~ msgid "wxSocket: unknown event!."
+#~ msgstr "wxSocket: 未知事件!."
+
+#~ msgid "\t%s: %s\n"
+#~ msgstr "\t%s: %s\n"
+
+#, fuzzy
+#~ msgid " Couldn't create the UnicodeConverter"
+#~ msgstr "不能创建计时器"
+
+#~ msgid "#define %s must be an integer."
+#~ msgstr "#所定义的 %s 必须是整数."
+
+#~ msgid "%s not a bitmap resource specification."
+#~ msgstr "%s 不是位图资源."
+
+#~ msgid "%s not an icon resource specification."
+#~ msgstr "%s 不是图标资源."
+
+#~ msgid "%s: ill-formed resource file syntax."
+#~ msgstr "%s: 不良资源文件语法."
+
+#~ msgid "&Open"
+#~ msgstr "打开(&O)"
+
+#~ msgid "&Print"
+#~ msgstr "打印(&P)"
+
+#~ msgid "*** A debug report has been generated\n"
+#~ msgstr "*** 生成了一份调试报告\n"
+
+#~ msgid "*** It can be found in \"%s\"\n"
+#~ msgstr "*** 可在此找到: \"%s\"\n"
+
+#~ msgid ""
+#~ ", expected static, #include or #define\n"
+#~ "while parsing resource."
+#~ msgstr ""
+#~ ", 在对资源进行语法分析时\n"
+#~ ", 期望如下关键字 static, #include 或 #define ."
+
+#~ msgid "Bitmap resource specification %s not found."
+#~ msgstr "找不到位图规格 %s."
+
+#~ msgid ""
+#~ "Could not resolve control class or id '%s'. Use (non-zero) integer "
+#~ "instead\n"
+#~ " or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "不能解析控件类或者id '%s'. 用(非零)整数代替\n"
+#~ "或 提供 #define (详细信息见手册)"
+
+#~ msgid ""
+#~ "Could not resolve menu id '%s'. Use (non-zero) integer instead\n"
+#~ "or provide #define (see manual for caveats)"
+#~ msgstr ""
+#~ "不能解析菜单id '%s'. 用(非零)整数代替\n"
+#~ "或 提供 #define (详细信息见手册)"
+
+#, fuzzy
+#~ msgid "Couldn't end the context on the overlay window"
+#~ msgstr "不能获得当前线程指针"
+
+#~ msgid "Expected '*' while parsing resource."
+#~ msgstr "解析资源时期待出现 '*' ."
+
+#~ msgid "Expected '=' while parsing resource."
+#~ msgstr "解析资源时期待出现 '='."
+
+#~ msgid "Expected 'char' while parsing resource."
+#~ msgstr "解析资源时期待遇到 'char' ."
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "查找XBM资源 %s失败.\n"
+#~ "没有使用wxResourceLoadBitmapData?"
+
+#~ msgid ""
+#~ "Failed to find XBM resource %s.\n"
+#~ "Forgot to use wxResourceLoadIconData?"
+#~ msgstr ""
+#~ "查找XBM资源%s失败.\n"
+#~ "没有使用wxResourceLoadIconData?"
+
+#~ msgid ""
+#~ "Failed to find XPM resource %s.\n"
+#~ "Forgot to use wxResourceLoadBitmapData?"
+#~ msgstr ""
+#~ "查找XPM资源 %s失败.\n"
+#~ "没有使用wxResourceLoadBitmapData?"
+
+#~ msgid "Failed to get clipboard data."
+#~ msgstr "获取剪贴板数据失败."
+
+#~ msgid "Failed to load shared library '%s' Error '%s'"
+#~ msgstr "不能装载共享库 '%s'. 错误信息: '%s'"
+
+#~ msgid "Found "
+#~ msgstr "找到 "
+
+#~ msgid "Icon resource specification %s not found."
+#~ msgstr "没有找到图标资源规范 %s ."
+
+#~ msgid "Ill-formed resource file syntax."
+#~ msgstr "不良的资源文件语法."
+
+#~ msgid "Long Conversions not supported"
+#~ msgstr "不支持长转换"
+
+#~ msgid "No XPM icon facility available!"
+#~ msgstr "没有可用的XPM图标设备!"
+
+#~ msgid "Option '%s' requires a value, '=' expected."
+#~ msgstr "选项 '%s' 要求一个值, 期望 '='."
+
+#, fuzzy
+#~ msgid "Select all"
+#~ msgstr "全部选择(&A)"
+
+#~ msgid "String conversions not supported"
+#~ msgstr "不支持字符串装换"
+
+#~ msgid "Unexpected end of file while parsing resource."
+#~ msgstr "在解析资源时意外到达文件结尾."
+
+#~ msgid "Unrecognized style %s while parsing resource."
+#~ msgstr "解析资源时遇到无法识别的风格 %s."
+
+#~ msgid "Video Output"
+#~ msgstr "视频输出"
+
+#~ msgid "Warning: attempt to remove HTML tag handler from empty stack."
+#~ msgstr "警告: 试图从空栈中移去HTML标签处理器."
+
+#~ msgid "establish"
+#~ msgstr "建立"
+
+#~ msgid "initiate"
+#~ msgstr "初始化"
+
+#~ msgid "invalid eof() return value."
+#~ msgstr "无效的eof()返回值."
+
+#~ msgid "unknown line terminator"
+#~ msgstr "未知行终止符"
+
+#~ msgid "writing"
+#~ msgstr "正在写入"
+
+#~ msgid "."
+#~ msgstr "."
+
+#~ msgid "Cannot open URL '%s'"
+#~ msgstr "不能打开 URL '%s'"
+
+#~ msgid "Error "
+#~ msgstr "错误 "
+
+#~ msgid "Failed to create directory %s/.gnome."
+#~ msgstr "创建目录 %s/.gnome 失败."
+
+#~ msgid "Failed to create directory %s/mime-info."
+#~ msgstr "创建目录 %s/.mime-info 失败."
+
+#~ msgid "MP Thread Support is not available on this System"
+#~ msgstr "此系统不提供MP线程支持."
+
+#~ msgid "Mailcap file %s, line %d: incomplete entry ignored."
+#~ msgstr "Mailcap 文件 %s, 行 %d: 不完整条目被忽略."
+
+#~ msgid "Mime.types file %s, line %d: unterminated quoted string."
+#~ msgstr "Mime.类型文件 %s, 行 %d: 没有结束符号的引用字符串."
+
+#~ msgid "Unknown field in file %s, line %d: '%s'."
+#~ msgstr "在文件 %s, 行 %d是未知字段: '%s'."
+
+#~ msgid "bold "
+#~ msgstr "粗体 "
+
+#~ msgid "can't query for GUI plugins name in console applications"
+#~ msgstr "无法在控制台程序里查询GUI插件"
+
+#, fuzzy
+#~ msgid "light "
+#~ msgstr "细 "
+
+#~ msgid "underlined "
+#~ msgstr "下划线 "
+
+#~ msgid "unsupported zip archive"
+#~ msgstr "不支持的zip存档"
+
+#~ msgid ""
+#~ "Failed to get stack backtrace:\n"
+#~ "%s"
+#~ msgstr ""
+#~ "不能获取堆栈的回溯路径:\n"
+#~ " %s"
+
+#~ msgid "Loading Grey Ascii PNM image is not yet implemented."
+#~ msgstr "装入灰度 Ascii PNM图像功能还没有实现."
+
+#~ msgid "Loading Grey Raw PNM image is not yet implemented."
+#~ msgstr "装入灰度 Raw PNM图像功能还没有实现."
diff --git a/cadxcore/main/controllers/anonusagestats.cpp b/cadxcore/main/controllers/anonusagestats.cpp
new file mode 100644
index 0000000..0886c0f
--- /dev/null
+++ b/cadxcore/main/controllers/anonusagestats.cpp
@@ -0,0 +1,76 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "anonusagestats.h"
+
+//singleton
+GNC::GCS::AnonUsageStats* GNC::GCS::AnonUsageStats::m_pInstance = NULL;
+
+GNC::GCS::AnonUsageStats * GNC::GCS::AnonUsageStats::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new AnonUsageStats();
+        }
+        return m_pInstance;
+}
+void GNC::GCS::AnonUsageStats::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+//
+
+GNC::GCS::IAnonUsageStatsDelegate::~IAnonUsageStatsDelegate()
+{
+}
+
+GNC::GCS::AnonUsageStats::AnonUsageStats()
+{
+}
+
+GNC::GCS::AnonUsageStats::~AnonUsageStats()
+{
+}
+
+void GNC::GCS::AnonUsageStats::log(const std::string& operation, const std::string& description)
+{
+        try {
+                if (Delegate.IsValid()) {
+                        Delegate->log(operation, description);
+                }
+        } catch(...) {
+        }
+}
+
+void GNC::GCS::AnonUsageStats::setDelegate(const GNC::GCS::Ptr<IAnonUsageStatsDelegate>& delegate)
+{
+        Delegate = delegate;
+}
+
+void GNC::GCS::AnonUsageStats::resetSettings()
+{
+        if (Delegate.IsValid()) {
+                Delegate->resetSettings();
+        }
+}
+
diff --git a/cadxcore/main/controllers/anonusagestats.h b/cadxcore/main/controllers/anonusagestats.h
new file mode 100644
index 0000000..cdbbe3f
--- /dev/null
+++ b/cadxcore/main/controllers/anonusagestats.h
@@ -0,0 +1,76 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <api/autoptr.h>
+#include <api/controllers/anonusagestatsids.h>
+
+//macro definition
+#define LOG_STAT(action) \
+{ \
+	GNC::GCS::AnonUsageStats* cA = GNC::GCS::AnonUsageStats::Instance(); \
+	if (cA != NULL) { \
+		cA->log(action);\
+	} \
+}
+
+#define LOG_STAT_WITH_DESCRIPTION(action, description) \
+{ \
+	GNC::GCS::AnonUsageStats* cA = GNC::GCS::AnonUsageStats::Instance(); \
+	if (cA != NULL) { \
+		cA->log(action, description);\
+	} \
+}
+
+namespace GNC
+{
+namespace GCS
+{
+
+class IAnonUsageStatsDelegate
+{
+public:
+        virtual ~IAnonUsageStatsDelegate();
+        virtual void log(const std::string& operation, const std::string& description) = 0;
+        virtual void resetSettings() = 0;
+};
+
+class AnonUsageStats
+{
+public:
+        static AnonUsageStats *Instance();
+        static void FreeInstance();
+
+        void log(const std::string& operation, const std::string& description = "");
+        void setDelegate(const GNC::GCS::Ptr<IAnonUsageStatsDelegate>& deleg);
+        void resetSettings();
+protected:
+        AnonUsageStats();
+        ~AnonUsageStats();
+
+        GNC::GCS::Ptr<IAnonUsageStatsDelegate> Delegate;
+        //singleton
+        static AnonUsageStats* m_pInstance;
+};
+}
+}
+
+
diff --git a/cadxcore/main/controllers/anonymizationcontroller.cpp b/cadxcore/main/controllers/anonymizationcontroller.cpp
new file mode 100644
index 0000000..a4a73d1
--- /dev/null
+++ b/cadxcore/main/controllers/anonymizationcontroller.cpp
@@ -0,0 +1,99 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/string.h>
+#include "anonymizationcontroller.h"
+#include "controladorlog.h"
+#include "configurationcontroller.h"
+#include <wx/xml/xml.h>
+#include <wx/sstream.h>
+
+namespace GNC
+{
+namespace GCS
+{
+AnonymizationController::TAnonymizationMap AnonymizationController::GetAnonymizationMap()
+{
+        AnonymizationController::TAnonymizationMap map;
+        std::string propertie;
+        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Anonymization", "ConfidentialityProfile", propertie);
+        if (propertie.empty()) {
+                map["0008|0014"] = TA_REPLACE_DEFAULT;
+                map["0008|0018"] = TA_CREATE_NEW;
+                map["0008|0050"] = TA_CREATE_NEW;
+                map["0008|0080"] = TA_REPLACE_DEFAULT;
+                map["0008|0081"] = TA_REPLACE_DEFAULT;
+                map["0008|0090"] = TA_REPLACE_DEFAULT;
+                map["0008|0092"] = TA_REPLACE_DEFAULT;
+                map["0008|0094"] = TA_REPLACE_DEFAULT;
+                map["0008|1010"] = TA_REPLACE_DEFAULT;
+                map["0008|1030"] = TA_REPLACE_DEFAULT;
+                map["0008|103e"] = TA_REPLACE_DEFAULT;
+                map["0008|1040"] = TA_REPLACE_DEFAULT;
+                map["0008|1048"] = TA_REPLACE_DEFAULT;
+                map["0008|1060"] = TA_REPLACE_DEFAULT;
+                map["0008|1070"] = TA_REPLACE_DEFAULT;
+                map["0008|1080"] = TA_REPLACE_DEFAULT;
+                map["0008|1155"] = TA_REPLACE_DEFAULT;
+                map["0008|2111"] = TA_REPLACE_DEFAULT;
+                map["0010|0010"] = TA_REPLACE_DEFAULT;
+                map["0010|0020"] = TA_CREATE_NEW;
+                map["0010|0030"] = TA_DELETE;
+                map["0010|0032"] = TA_DELETE;
+                map["0010|0040"] = TA_DELETE;
+                map["0010|1000"] = TA_DELETE;
+                map["0010|1001"] = TA_DELETE;
+                map["0010|1010"] = TA_DELETE;
+                map["0010|1020"] = TA_DELETE;
+                map["0010|1030"] = TA_DELETE;
+                map["0010|1090"] = TA_DELETE;
+                map["0010|2160"] = TA_DELETE;
+                map["0010|2180"] = TA_DELETE;
+                map["0010|21b0"] = TA_DELETE;
+                map["0010|4000"] = TA_DELETE;
+                map["0018|1000"] = TA_DELETE;
+                map["0018|1030"] = TA_DELETE;
+                map["0020|000d"] = TA_CREATE_NEW;
+                map["0020|000e"] = TA_CREATE_NEW;
+                map["0020|0010"] = TA_REPLACE_DEFAULT;
+                map["0020|0052"] = TA_CREATE_NEW;
+                map["0020|0200"] = TA_CREATE_NEW;
+                map["0020|4000"] = TA_REPLACE_DEFAULT;
+                map["0040|0275"] = TA_DELETE;
+                map["0040|a124"] = TA_CREATE_NEW;
+                map["0040|a730"] = TA_DELETE;
+                map["0088|0140"] = TA_CREATE_NEW;
+                map["3006|0024"] = TA_CREATE_NEW;
+                map["3006|00c2"] = TA_CREATE_NEW;
+        }
+        return map;
+}
+
+void AnonymizationController::ResetDefaultValues()
+{
+        GNC::GCS::ConfigurationController::Instance()->deleteEntryUser("/GinkgoCore/Anonymization", "ConfidentialityProfile");
+}
+
+void AnonymizationController::SaveAnonymizationMap(const AnonymizationController::TAnonymizationMap& /*map*/)
+{
+}
+}
+}
+
diff --git a/cadxcore/main/controllers/anonymizationcontroller.h b/cadxcore/main/controllers/anonymizationcontroller.h
new file mode 100644
index 0000000..ef7b0c7
--- /dev/null
+++ b/cadxcore/main/controllers/anonymizationcontroller.h
@@ -0,0 +1,46 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <map>
+#include <string>
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI AnonymizationController
+{
+public:
+        typedef enum TAction {
+                TA_DELETE,
+                TA_REPLACE_DEFAULT,
+                TA_CREATE_NEW
+        } TAction;
+        typedef std::map<std::string, TAction> TAnonymizationMap;
+
+        static TAnonymizationMap GetAnonymizationMap();
+        static void ResetDefaultValues();
+        static void SaveAnonymizationMap(const TAnonymizationMap& map);
+};
+}
+}
diff --git a/cadxcore/main/controllers/autocleaningcontroller.cpp b/cadxcore/main/controllers/autocleaningcontroller.cpp
new file mode 100644
index 0000000..a369da8
--- /dev/null
+++ b/cadxcore/main/controllers/autocleaningcontroller.cpp
@@ -0,0 +1,126 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <wx/statbmp.h>
+#include <wx/bmpbuttn.h>
+#include <wx/thread.h>
+#include <wx/timer.h>
+
+#include "autocleaningcontroller.h"
+#include <commands/autocleaningcommand.h>
+
+#include <main/controllers/commandcontroller.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/configurationcontroller.h>
+
+//this timer is to controlate user inactivity
+namespace GNC
+{
+namespace GCS
+{
+class TimerAutocleaning: public wxTimer
+{
+public:
+        //first shot 30s
+        TimerAutocleaning():wxTimer()
+        {
+                //Start(30000, true);
+                Start(1000, true);
+        }
+        ~TimerAutocleaning()
+        {
+                GNC::CommandController::Instance()->AbortarComandosDeOwner(this);
+        }
+
+        virtual void Notify()
+        {
+                //next shot one each 10 minutes...
+                Start(10*60*1000, true);
+                int acquisitionOlder,hdSpace,dicomDirSize;
+                GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/Station/CleanDicomDir", "AcquisitionOlderThan", acquisitionOlder, -1);
+                GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/Station/CleanDicomDir", "HDFreeSpace", hdSpace, -1);
+                GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/Station/CleanDicomDir", "DicomDirSize", dicomDirSize, -1);
+                if (acquisitionOlder != -1 || hdSpace != -1 || dicomDirSize != -1) {
+                        //launch autocleaning command...
+                        GADAPI::AutoCleaningCommandParameters* pParams = new GADAPI::AutoCleaningCommandParameters(acquisitionOlder, hdSpace, dicomDirSize);
+                        GADAPI::AutoCleaningCommand* pCmd = new GADAPI::AutoCleaningCommand(pParams);
+                        GNC::CommandController::Instance()->ProcessAsync("Autocleaning", pCmd, this);
+                }
+        }
+
+        virtual void Reset()
+        {
+                if (IsRunning()) {
+                        Stop();
+                }
+                Start(1000, true);
+        }
+};
+}
+}
+//
+
+
+//region "Patron singleton"
+
+GNC::GCS::AutoCleaningController* GNC::GCS::AutoCleaningController::m_pInstance = 0;
+
+GNC::GCS::AutoCleaningController::AutoCleaningController()
+{
+        m_pTimerAutocleaning = new TimerAutocleaning;
+}
+
+GNC::GCS::AutoCleaningController::~AutoCleaningController()
+{
+        if (m_pTimerAutocleaning != NULL) {
+                if (m_pTimerAutocleaning->IsRunning()) {
+                        m_pTimerAutocleaning->Stop();
+                }
+                delete m_pTimerAutocleaning;
+                m_pTimerAutocleaning = NULL;
+        }
+}
+
+GNC::GCS::AutoCleaningController* GNC::GCS::AutoCleaningController::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new GNC::GCS::AutoCleaningController();
+        }
+        return m_pInstance;
+}
+
+void GNC::GCS::AutoCleaningController::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+void GNC::GCS::AutoCleaningController::Reset()
+{
+        if (m_pTimerAutocleaning != NULL) {
+                m_pTimerAutocleaning->Reset();
+        }
+}
+
+//endregion
+
diff --git a/cadxcore/main/controllers/autocleaningcontroller.h b/cadxcore/main/controllers/autocleaningcontroller.h
new file mode 100644
index 0000000..f1b7010
--- /dev/null
+++ b/cadxcore/main/controllers/autocleaningcontroller.h
@@ -0,0 +1,55 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/api.h>
+#include <api/globals.h>
+
+#include <string>
+#include <map>
+
+
+namespace GNC
+{
+
+namespace GCS
+{
+class TimerAutocleaning;
+class EXTAPI AutoCleaningController
+{
+
+//region "Patron singleton"
+public:
+        static AutoCleaningController* Instance();
+        static void FreeInstance();
+
+        virtual void Reset();
+//endregion
+
+//region "Interfaz de controlador de vistas"
+protected:
+        TimerAutocleaning*		  m_pTimerAutocleaning;
+        static AutoCleaningController* m_pInstance;
+        AutoCleaningController();
+        virtual ~AutoCleaningController();
+};
+}
+}
diff --git a/cadxcore/main/controllers/commandcontroller.cpp b/cadxcore/main/controllers/commandcontroller.cpp
new file mode 100644
index 0000000..4939388
--- /dev/null
+++ b/cadxcore/main/controllers/commandcontroller.cpp
@@ -0,0 +1,888 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <deque>
+#include <set>
+#include <complex>
+
+#include <api/globals.h>
+#include <api/threads/thread.h>
+#include <api/icommand.h>
+#include <api/ientorno.h>
+
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/ieventscontroller.h>
+#include <eventos/progresocomando.h>
+#include <main/controllers/historycontroller.h>
+
+#include <wx/wx.h>
+#include <wx/thread.h>
+
+#include "commandcontroller.h"
+#include <main/gui/mainwindow/ventanaprincipal.h>
+
+//#undef GTRACE
+//#define GTRACE(expr) std::cout << expr << std::endl
+
+/** POLL Period in ms **/
+#define POLL_PERIOD 100
+/** Thread pool size **/
+#define THREAD_POOL_SIZE 1
+
+namespace GNC
+{
+class ThreadPool : public GNC::GCS::ILockable
+{
+
+public:
+        ThreadPool() : m_Shutdown(false)
+        {
+
+                for (size_t i = 0; i < THREAD_POOL_SIZE; ++i) {
+                        new GNC::CommandLauncher(this);
+                }
+        }
+
+        /**
+        * Borrows a launcher from the pool
+        **/
+        GNC::CommandLauncher* Borrow()
+        {
+                while (true) {
+                        {
+                                GNC::GCS::ILocker lock(this);
+                                if (!m_Shutdown) {
+                                        if (!available.empty()) {
+                                                GNC::CommandLauncher* pCmd = available.front();
+                                                available.pop_front();
+                                                working.insert(pCmd);
+                                                return pCmd;
+                                        } else {
+                                                new GNC::CommandLauncher(this);
+                                        }
+                                } else {
+                                        return NULL;
+                                }
+
+                        }
+                        wxThread::Sleep(POLL_PERIOD); // Wait for completion
+
+                }
+                return NULL;
+
+        }
+
+        /**
+        * Returns a launcher to the pool
+        **/
+        void Return(GNC::CommandLauncher* pCmd)
+        {
+                pCmd->SetCommand(NULL);
+                GNC::GCS::ILocker lock(this);
+                working.erase(pCmd);
+                available.push_back(pCmd);
+        }
+
+
+        void Shutdown()
+        {
+                GNC::GCS::ILocker lock(this);
+                m_Shutdown = true;
+                for (std::set<GNC::CommandLauncher*>::iterator it = working.begin(); it != working.end(); ++it) {
+                        (*it)->m_Shutdown = true;
+                }
+                working.clear();
+                for (std::deque<GNC::CommandLauncher*>::iterator it = available.begin(); it != available.end(); ++it) {
+                        (*it)->m_Shutdown = true;
+                        (*it)->m_pParker->Post();
+                }
+                available.clear();
+        }
+
+
+
+        friend class CommandLauncher;
+
+        GNC::GCS::ILockable poolLock;
+        bool                m_Shutdown;
+
+        std::deque<GNC::CommandLauncher*> available;
+        std::set<GNC::CommandLauncher*> working;
+
+};
+}
+
+
+static GNC::ThreadPool* threadPool = NULL;
+
+
+GNC::CommandLauncher::CommandLauncher(GNC::ThreadPool* pool)
+{
+        //std::cout << "CommandLauncher::CommandLauncher()" << this << std::endl;
+        m_idThreadGinkgo = 0;
+        m_pComando = NULL;
+        m_Abortar = false;
+        m_Shutdown = false;
+        m_pPool = pool;
+        m_pParker = new wxSemaphore(0);
+        Create();
+        Run();
+        GNC::GCS::Threading::SetThreadName( GetId(), "Ginkgo Thread");
+}
+
+GNC::CommandLauncher::~CommandLauncher()
+{
+
+}
+
+
+GNC::GCS::IComando* GNC::CommandLauncher::GetCommand()
+{
+        return m_pComando;
+}
+
+void GNC::CommandLauncher::SetCommand(GNC::GCS::IComando* pCmd)
+{
+        if (m_pComando != NULL) {
+                //std::cout << "Error: Already has a command" << std::endl;
+        }
+        if (pCmd != NULL) {
+                pCmd->SetNotificadorProgreso(this);
+        }
+        m_pComando = pCmd;
+        m_Abortar = false;
+}
+
+void GNC::CommandLauncher::Park()
+{
+
+        wxSemaError ret = wxSEMA_TIMEOUT;
+        m_pPool->Return(this);
+
+        while (!m_Shutdown && !m_Abortar && ret == wxSEMA_TIMEOUT) {
+                ret = m_pParker->WaitTimeout(POLL_PERIOD);
+        }
+}
+
+void GNC::CommandLauncher::UnPark()
+{
+        m_pParker->Post();
+}
+
+void* GNC::CommandLauncher::Entry()
+{
+
+        while (!m_Shutdown) {
+
+                Park();
+                if (m_Shutdown) {
+                        return NULL;
+                }
+
+                this->IniciarUnlocker();
+
+                //GNC::GCS::Threading::SetThreadName( GetId(), m_pComando->GetName());
+
+                if (m_pComando != NULL && !m_pComando->EstaAbortado() && m_Dependencias.Size() > 0) {
+                        while (m_Dependencias.NotEmpty()&& !m_pComando->EstaAbortado()) {
+                                if (!m_Dependencias.Wait(POLL_PERIOD)) {
+                                        //std::cout << "Timeout de espera para " << m_pComando->GetName() << "(" << m_idThreadGinkgo << ") " << m_Dependencias.Size() << " pendientes" << std::endl;
+                                        m_Dependencias.TerminarPendientes();
+                                }
+                        }
+                }
+
+                wxWindow* w = GNC::GCS::IEntorno::Instance()->GetVentanaPrincipal();
+
+                if (m_pComando != NULL && !m_pComando->EstaAbortado()) {
+
+                        if (w != NULL) {
+                                EventoProgreso ce(EventoProgreso::ComandoIniciado, m_idThreadGinkgo);
+                                w->GetEventHandler()->AddPendingEvent(ce);
+                        }
+
+                        try {
+                                // don't add the lock for GNC::CommandController::Instance() here,
+                                // even though running tread sanitizer might suggest that this is a
+                                //  good idea
+                                m_pComando->Execute();
+                        } catch (GNC::GCS::CommandControllerException& ) {
+                                //comando abortado
+                        } catch (const std::bad_alloc& ) {
+                                //comando ha cascado por un bad alloc
+                        } catch (const std::exception& ) {
+                                //comando abortado
+                        } catch (...) {
+                                LOG_ERROR("CommandLauncher", "Error interno ejecutando el comando con id = " << m_pComando->GetId());
+                        }
+
+                        OnExit();
+                } else if (m_pComando != NULL && m_pComando->EstaAbortado()) {
+                        //aborted commands have to signal to free their dependencies
+                        OnExit();
+                }
+
+        }
+        return NULL;
+}
+
+bool GNC::CommandLauncher::RecalcularDependencias()
+{
+        //revisamos la lista de "aborta si" ya que en ese caso no arrancamos
+
+        if(m_Abortar) {
+                return false;
+        }
+
+        GNC::GCS::IPersistentCommand* pPersistent = dynamic_cast<GNC::GCS::IPersistentCommand*>(m_pComando);
+
+        //GTRACE(">> comprobando el ''AbortaSi'' y el ''CancelaA'' : " << m_idThreadGinkgo);
+        GNC::CommandController::MapaComandos* mapaComandosLanzados = &(GNC::CommandController::Instance()->m_ComandosLanzados);
+        for(GNC::CommandController::MapaComandos::iterator it = mapaComandosLanzados->begin(); it!= mapaComandosLanzados->end(); ++it) {
+                CommandLauncher* pLauncher = (*it).second;
+                if (pLauncher == this) {
+                        continue;
+                }
+
+                for(GNC::GCS::IComando::TipoListaIdComandos::iterator it1 = m_pComando->m_Conflictos.begin(); it1 != m_pComando->m_Conflictos.end(); ++it1) {
+                        if(pLauncher->GetCommand() != NULL && pLauncher->GetCommand()->GetId() == (*it1) && pLauncher->m_idThreadGinkgo != m_idThreadGinkgo) {
+                                return false;
+                        }
+                }
+                //cancel persistent commands with same idBBDD
+                if (pPersistent != NULL) {
+                        GNC::GCS::IPersistentCommand* pPersistent2 = dynamic_cast<GNC::GCS::IPersistentCommand*>(pLauncher->GetCommand());
+                        if (pPersistent2 != NULL && pPersistent2->getIdBBDD() == pPersistent->getIdBBDD()) {
+                                return false;
+                        }
+                }
+        }
+
+        for(GNC::CommandController::MapaComandos::iterator it = mapaComandosLanzados->begin(); it!= mapaComandosLanzados->end(); ++it) {
+                CommandLauncher* pLauncher = (*it).second;
+                if (pLauncher == this) {
+                        continue;
+                }
+
+                for(GNC::GCS::IComando::TipoListaIdComandos::iterator it1 = m_pComando->m_Reemplazos.begin(); it1 != m_pComando->m_Reemplazos.end(); ++it1) {
+                        if(pLauncher != NULL && pLauncher->GetCommand()!=NULL && pLauncher->GetCommand()->GetId() == (*it1) && pLauncher->m_idThreadGinkgo != m_idThreadGinkgo) {
+                                m_Dependencias.RegistrarEspera(pLauncher);
+                                pLauncher->Terminar();
+                        } else if (pLauncher == NULL) {
+                                LOG_ERROR("CommandsController","Inconsistency detected: Launched command was dereferenced");
+                        }
+                }
+
+                for(GNC::GCS::IComando::TipoListaIdComandos::iterator it1 = m_pComando->m_Dependencias.begin(); it1 != m_pComando->m_Dependencias.end(); ++it1) {
+                        if(pLauncher != NULL && pLauncher->GetCommand()!=NULL && pLauncher->GetCommand()->GetId() == (*it1) && pLauncher->m_idThreadGinkgo != m_idThreadGinkgo) {
+                                //GTRACE(">> encontrado un comando de ''Espera a'' => El hilo " << m_idThreadGinkgo<< " esprerara a "<<pLauncher->m_idThreadGinkgo);
+                                //nos aseguramos de que el no esta esperando por nosostros... en tal caso habría un bloqueo mutuo!!!
+                                //solo se permite en caso de que los dos comandos tengan el mismo id por ejemplo comandos que se tienen que ejecutar en serie,
+                                //en tal caso solo le esperamos si su id es menor que el nuestro
+                                if(pLauncher->GetCommand()->GetId() != this->GetCommand()->GetId() ||
+                                    (pLauncher->GetCommand()->GetId() == this->GetCommand()->GetId() && m_idThreadGinkgo > pLauncher->m_idThreadGinkgo)) {
+                                        m_Dependencias.RegistrarEspera(pLauncher);
+                                }
+                        }
+                }
+        }
+        return true;
+}
+
+void GNC::CommandLauncher::OnExit()
+{
+        {
+                GNC::GCS::ILocker pLocker(GNC::CommandController::Instance());
+
+                //region "Region sincrona con CommandController"
+                if (m_pComando != NULL) {
+                        m_pComando->SetNotificadorProgreso(NULL);
+                }
+
+                GNC::CommandController::MapaComandos::iterator it = GNC::CommandController::Instance()->m_ComandosLanzados.find(m_idThreadGinkgo);
+                if (it != GNC::CommandController::Instance()->m_ComandosLanzados.end()) {
+                        GNC::CommandController::Instance()->m_ComandosLanzados.erase(it);
+                }
+
+                //avisa a los que estan esperando
+
+                wxWindow* w = GNC::GCS::IEntorno::Instance()->GetVentanaPrincipal();
+
+                if (w != NULL) {
+                        GNC::CommandController::Instance()->m_ComandosTerminados[m_idThreadGinkgo] = m_pComando;
+                        EventoProgreso ce(EventoProgreso::ComandoFinalizado, m_idThreadGinkgo);
+                        w->GetEventHandler()->AddPendingEvent(ce);
+                } else {
+                        LOG_WARN("CommandLauncher::OnExit()", "Error: No se invocara el evento de finalizacion del comando. El sistema puede quedar bloqueado o inestable");
+                        if (m_pComando != NULL) {
+                                m_pComando->Abort(); // Notificamos al comando de que va a abortar.
+                                delete m_pComando;
+                                m_pComando = NULL;
+                        }
+                }
+        }
+
+        Signal();
+
+        //LOG_TRACE("CommandLauncher", "<< Comando Terminado");
+
+        //endregion
+}
+
+void GNC::CommandLauncher::IniciarUnlocker()
+{
+#if defined(_WINDOWS)
+
+#else
+        /*
+        struct sigaction action;
+        memset(&action, 0, sizeof(action));
+        sigemptyset(&action.sa_mask);
+        action.sa_flags = 0;
+        action.sa_handler = FooSignalHandler;
+        sigaction(SIGUSR2, &action, NULL);
+        */
+#endif
+}
+
+void GNC::CommandLauncher::DoTerminar()
+{
+        this->m_Abortar = true;
+        if (m_pComando != NULL) {
+                //std::cout << "CommandLauncher::DoTerminar(): Abortando comando:" << std::endl;
+                m_pComando->Abort();
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoProgresoComando(GetCommand(), GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado, 0.0f, GetCommand()->GetName()));
+        }
+#if defined(_WINDOWS)
+
+#else
+        //pthread_kill((pthread_t)this->GetId(), SIGUSR2);
+
+#endif
+}
+
+bool GNC::CommandLauncher::NotificarProgreso(float progresoNormalizado, const std::string& texto)
+{
+        if(m_Abortar) {
+                return false;
+        }
+        //this protect system to overflow event message queue
+        bool sendEvent = false;
+        const float newProgress = std::max<float>(0, std::min<float>(progresoNormalizado,1.0f));
+        LockProgreso();
+        sendEvent = (std::abs<float>(m_ProgresoNormalizado - newProgress) > 0.01);
+        SetProgresoNormalizado(newProgress);
+        sendEvent = sendEvent || (texto != m_Texto);
+        SetTextoProgreso(texto);
+        UnLockProgreso();
+
+        wxWindow* w = GNC::GCS::IEntorno::Instance()->GetVentanaPrincipal();
+        if(sendEvent && w!=NULL) {
+                EventoProgreso* ce = new EventoProgreso(EventoProgreso::ComandoEjecutando, m_idThreadGinkgo);
+                wxQueueEvent(w->GetEventHandler(), ce);
+        }
+        return true;
+
+}
+
+
+//----------------------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------
+
+//region Controlador de comandos
+
+GNC::CommandController* GNC::CommandController::m_psInstancia = NULL;
+
+GNC::CommandController::CommandController():
+        m_Destroying(false),
+        m_EsperarComandos(false),
+        m_pProgreso(nullptr),
+        m_idThreads(1)
+{
+        threadPool = new GNC::ThreadPool();
+}
+
+GNC::CommandController::~CommandController()
+{
+        GTRACE(">> CommandController::~CommandController() ");
+        AbortarComandosDeOwner(NULL);
+        GTRACE("<< CommandController::~CommandController() ");
+}
+
+GNC::CommandController* GNC::CommandController::Instance()
+{
+        if (m_psInstancia == NULL) {
+                m_psInstancia = new CommandController();
+        }
+        return m_psInstancia;
+}
+
+void GNC::CommandController::FreeInstance()
+{
+        if (m_psInstancia != NULL) {
+                delete m_psInstancia;
+                m_psInstancia = NULL;
+        }
+
+}
+
+void GNC::CommandController::ProcessSync(GNC::GCS::IComando* cmd, bool autodelete, bool update, GNC::INotificadorProgreso* pNotifier)
+{
+        if (cmd == NULL) {
+                return;
+        }
+        if (pNotifier != NULL) {
+                cmd->SetNotificadorProgreso(pNotifier);
+        }
+        cmd->Execute();
+        if (wxThread::IsMain() && update) {
+                cmd->Update();
+        }
+        if (autodelete) {
+                cmd->Free();
+                delete cmd;
+        }
+}
+
+void GNC::CommandController::ProcessAsync(const std::string& /*str*/, GNC::GCS::IComando* cmd, void * owner)
+{
+        // in the release build we don't want to crash the program here
+        if (!cmd) {
+                LOG_ERROR("CommandController", "Initiate command with an empty command structure");
+                return;
+        }
+
+        cmd->SetOwner(owner);
+        cmd->SetNotificadorProgreso(NULL);
+        CommandLauncher* thread = threadPool->Borrow();
+        if (thread) {
+                thread->SetCommand(cmd);
+
+                //thread->SetPriority(WXTHREAD_MAX_PRIORITY);
+
+                GNC::GCS::ILocker pLocker(GNC::CommandController::Instance());
+
+                long threadId = m_idThreads++;
+                thread->m_idThreadGinkgo = threadId;
+
+                try {
+                        if (thread->RecalcularDependencias()) {
+                                //if command is persistent... save it
+                                GNC::GCS::IPersistentCommand* pPersistent = dynamic_cast<GNC::GCS::IPersistentCommand*>(cmd);
+                                if (pPersistent != NULL) {
+                                        GNC::GCS::HistoryController::Instance()->SaveTask(pPersistent);
+                                }
+                        } else {
+                                thread->SetCommand(NULL);
+                                cmd->Free();
+                                delete cmd;
+
+                                thread = NULL;
+                        }
+                } catch (...) {
+                        LOG_ERROR("CommandController", "Error interno al lanzar el comando");
+                        if (cmd != NULL) {
+                                thread->SetCommand(NULL);
+                                cmd->Free();
+                                delete cmd;
+                        }
+                        thread = NULL;
+                }
+        } else {
+                if (cmd != NULL) {
+                        thread->SetCommand(NULL);
+                        cmd->Free();
+                        delete cmd;
+                }
+        }
+
+        if (thread != NULL) {
+                m_ComandosLanzados[thread->m_idThreadGinkgo] = thread;
+                MapaOwners::iterator it = m_MapaOwners.find(owner);
+                if (it != m_MapaOwners.end()) {
+                        (*it).second.push_back(thread->m_idThreadGinkgo);
+                } else {
+                        ListaHilos l;
+                        l.push_back(thread->m_idThreadGinkgo);
+                        m_MapaOwners[owner] = l;
+                }
+                thread->UnPark();
+        }
+}
+
+//este metodo es un poco malo porque la busqueda iterada...
+void GNC::CommandController::AbortarComando(GNC::GCS::IComando* pComando, bool sincrono)
+{
+        GNC::GCS::WaitQueue wqueue;
+        GNC::GCS::ILocker pLocker(GNC::CommandController::Instance());
+        // Recorremos la lista de threads_ids de la vista
+        for(MapaComandos::iterator it = m_ComandosLanzados.begin(); it!= m_ComandosLanzados.end(); ++it) {
+                CommandLauncher* pLauncher = (*it).second;
+                if(pLauncher == NULL || (*it).second->GetCommand() != pComando) {
+                        continue;
+                }
+                if (sincrono ) {
+                        wqueue.RegistrarEspera(pLauncher);
+                        std::cerr << "Registrando espera para tarea: ptr = " << pLauncher << std::endl;
+                }
+                pLauncher->Terminar();
+        }
+}
+
+void GNC::CommandController::AbortarComando(long threadId, bool sincrono)
+{
+        GNC::GCS::WaitQueue wqueue;
+
+        //---------------------------------------------------------------------
+        // REGION CRITICA
+        //---------------------------------------------------------------------
+        {
+                // BEGIN Modificación del estado interno del controlador de comandos.
+                GNC::GCS::ILocker pLocker(GNC::CommandController::Instance());
+                // Recorremos la lista de threads_ids de la vista
+                MapaComandos::iterator it = m_ComandosLanzados.find(threadId);
+                if (it != m_ComandosLanzados.end()) {
+                        CommandLauncher* pLauncher = (*it).second;
+                        if (pLauncher != NULL) { //
+                                if (sincrono ) {
+                                        wqueue.RegistrarEspera(pLauncher);
+                                        std::cerr << "Registrando espera para tarea: threadId = " << (unsigned long) threadId << " ptr = " << pLauncher << std::endl;
+                                }
+                                pLauncher->Terminar();
+                                pLauncher->SetCommand(NULL);
+                        } else {
+                                std::cerr << "Detectada inconsistencia en el controlador de comandos: Comando lanzado desreferenciado. Flujo de comando perdido." << std::endl;
+                        }
+                } else { // Buscamos el id en la lista de comandos terminados
+                        MapaComandosTerminados::iterator it3 = m_ComandosTerminados.find(threadId);
+                        if (it3 != m_ComandosTerminados.end()) {
+                                GNC::GCS::IComando* pComando = (*it3).second;
+                                if (pComando != NULL) {
+                                        std::cerr << "Anulando comando terminado: threadId = " << (unsigned long) threadId << std::endl;
+
+                                        pComando->Abort();
+                                        pComando->Free();
+                                        if (pComando != NULL) {
+                                                pComando->Free();
+                                                delete pComando;
+                                                pComando = NULL;
+                                        }
+
+                                } else {
+                                        std::cerr << "Detectada inconsistencia en el controlador de comandos: Comando terminado nulo." << std::endl;
+                                }
+                                m_ComandosTerminados.erase(it3);
+                        } else {
+                                std::cerr << "Detectada inconsistencia en el controlador de comandos: Comando desreferenciado. Flujo de comando perdido." << std::endl;
+                        }
+                }
+        }
+        // END Modificación del estado interno del controlador de comandos.
+        //---------------------------------------------------------------------
+        //---------------------------------------------------------------------
+        while (wqueue.NotEmpty()) {
+                if (!wqueue.Wait(POLL_PERIOD)) {
+                        wqueue.TerminarPendientes( );
+                }
+        }
+}
+
+void GNC::CommandController::AbortarComandosDeOwner(void * owner)
+{
+
+        GNC::GCS::WaitQueue wqueue;
+
+        {
+                GNC::GCS::ILocker pLocker(GNC::CommandController::Instance());
+                // Recorremos la lista de threads_ids de la vista
+                MapaOwners::iterator it1 = m_MapaOwners.find(owner);
+                MapaComandos::iterator itcl;
+                if (it1 != m_MapaOwners.end()) {
+                        for (ListaHilos::iterator it2 = (*it1).second.begin(); it2 != (*it1).second.end(); ++it2) {
+                                long threadId = (*it2);
+                                // Buscamos el id en la lista de comandos lanzados
+                                itcl = m_ComandosLanzados.find(threadId);
+                                if (itcl != m_ComandosLanzados.end()) { // El comando esta lanzado
+                                        CommandLauncher* pLauncher = (*itcl).second;
+                                        if (pLauncher != NULL) { //
+
+                                                wqueue.RegistrarEspera(pLauncher);
+                                                pLauncher->Terminar();
+
+                                                std::cerr << "Registrando espera para tarea: threadId = " << (unsigned long) threadId << " ptr = " << pLauncher << std::endl;
+                                        } else {
+                                                std::cerr << "Detectada inconsistencia en el controlador de comandos: Comando lanzado desreferenciado. Flujo de comando perdido." << std::endl;
+                                        }
+                                } else { // Buscamos el id en la lista de comandos terminados
+                                        MapaComandosTerminados::iterator it3 = m_ComandosTerminados.find(threadId);
+                                        if (it3 != m_ComandosTerminados.end()) {
+                                                GNC::GCS::IComando* pComando = (*it3).second;
+                                                if (pComando != NULL) {
+                                                        std::cerr << "Anulando comando terminado: threadId = " << (unsigned long) threadId << std::endl;
+                                                        pComando->Abort();
+                                                        pComando->Free();
+                                                        delete pComando;
+                                                        pComando = NULL;
+                                                } else {
+                                                        std::cerr << "Detectada inconsistencia en el controlador de comandos: Comando terminado nulo." << std::endl;
+                                                }
+                                                m_ComandosTerminados.erase(it3);
+                                        } else {
+                                                std::cerr << "Detectada inconsistencia en el controlador de comandos: Comando desreferenciado. Flujo de comando perdido." << std::endl;
+                                        }
+                                }
+                        }
+                        m_MapaOwners.erase(it1);
+                }
+        }
+
+        while (wqueue.NotEmpty()) {
+                if (!wqueue.Wait(POLL_PERIOD)) {
+                        wqueue.TerminarPendientes();
+                }
+        }
+}
+
+void GNC::CommandController::AbortarComandosDeOwnerAsincrono(void * owner)
+{
+        GNC::GCS::ILocker pLocker(GNC::CommandController::Instance());
+        // Recorremos la lista de threads_ids de la vista
+        MapaOwners::iterator it1 = m_MapaOwners.find(owner);
+        if (it1 != m_MapaOwners.end()) {
+                for (ListaHilos::iterator it2 = (*it1).second.begin(); it2 != (*it1).second.end(); ++it2) {
+                        long threadId = (*it2);
+                        // Buscamos el id en la lista de comandos lanzados
+                        MapaComandos::iterator it = m_ComandosLanzados.find(threadId);
+                        if (it != m_ComandosLanzados.end()) { // El comando esta lanzado
+                                CommandLauncher* pLauncher = (*it).second;
+                                if (pLauncher != NULL) { //
+                                        pLauncher->Terminar();
+                                } else {
+                                        std::cerr << "Detectada inconsistencia en el controlador de comandos: Comando lanzado desreferenciado. Flujo de comando perdido." << std::endl;
+                                }
+                        } else { // Buscamos el id en la lista de comandos terminados
+                                MapaComandosTerminados::iterator it3 = m_ComandosTerminados.find(threadId);
+                                if (it3 != m_ComandosTerminados.end()) {
+                                        GNC::GCS::IComando* pComando = (*it3).second;
+                                        if (pComando != NULL) {
+                                                std::cerr << "Anulando comando terminado: threadId = " << (unsigned long) threadId << std::endl;
+                                                pComando->Abort();
+                                                pComando->Free();
+                                                delete pComando;
+                                                pComando = NULL;
+                                        } else {
+                                                std::cerr << "Detectada inconsistencia en el controlador de comandos: Comando terminado nulo." << std::endl;
+                                        }
+                                        m_ComandosTerminados.erase(it3);
+                                } else {
+                                        std::cerr << "Detectada inconsistencia en el controlador de comandos: Comando desreferenciado. Flujo de comando perdido." << std::endl;
+                                }
+                        }
+                }
+                m_MapaOwners.erase(it1);
+        }
+}
+
+void GNC::CommandController::WaitToOwnerCommands(void* owner)
+{
+        GNC::GCS::WaitQueue wqueue;
+
+        {
+                GNC::GCS::ILocker pLocker(GNC::CommandController::Instance());
+                // Recorremos la lista de threads_ids de la vista
+                MapaOwners::iterator it1 = m_MapaOwners.find(owner);
+                MapaComandos::iterator itcl;
+                if (it1 != m_MapaOwners.end()) {
+                        for (ListaHilos::iterator it2 = (*it1).second.begin(); it2 != (*it1).second.end(); ++it2) {
+                                long threadId = (*it2);
+                                // Buscamos el id en la lista de comandos lanzados
+                                itcl = m_ComandosLanzados.find(threadId);
+                                if (itcl != m_ComandosLanzados.end()) { // El comando esta lanzado
+                                        CommandLauncher* pLauncher = (*itcl).second;
+                                        if (pLauncher != NULL) { //
+
+                                                wqueue.RegistrarEspera(pLauncher);
+                                                pLauncher->Terminar();
+
+                                                std::cerr << "Registrando espera para tarea: threadId = " << (unsigned long) threadId << " ptr = " << pLauncher << std::endl;
+                                        } else {
+                                                std::cerr << "Detectada inconsistencia en el controlador de comandos: Comando lanzado desreferenciado. Flujo de comando perdido." << std::endl;
+                                        }
+                                }
+                        }
+                }
+        }
+
+        while (wqueue.NotEmpty()) {
+                if (!wqueue.Wait(POLL_PERIOD)) {
+                }
+        }
+}
+
+unsigned int GNC::CommandController::GetNumActiveCommands()
+{
+        GNC::GCS::ILocker pLocker(GNC::CommandController::Instance());
+        return m_ComandosLanzados.size();
+}
+
+void GNC::CommandController::OnComandoLanzado(long threadId)
+{
+
+        GNC::GCS::ILocker pLocker(GNC::CommandController::Instance());
+
+        MapaComandos::iterator it = m_ComandosLanzados.find(threadId);
+        if (it != m_ComandosLanzados.end()) {
+                CommandLauncher* pLauncher = (*it).second;
+                pLauncher->GetCommand()->SetNotificadorProgreso(pLauncher);
+                if (m_pProgreso) {
+                        m_pProgreso->InsertarTarea(threadId, pLauncher->GetCommand()->GetName());
+                }
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoProgresoComando(pLauncher->GetCommand(), GNC::GCS::Events::EventoProgresoComando::TEP_Iniciado, 0.0f, pLauncher->GetCommand()->GetName()));
+        } else {
+                MapaComandosTerminados::iterator it = m_ComandosTerminados.find(threadId);
+                if (it != m_ComandosTerminados.end()) {
+                        GNC::GCS::IComando* pComando = (*it).second;
+                        if (m_pProgreso) {
+                                m_pProgreso->InsertarTarea(threadId, pComando->GetName());
+                        }
+                        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoProgresoComando(pComando, GNC::GCS::Events::EventoProgresoComando::TEP_Iniciado, 1.0f, pComando->GetName()));
+                } else {
+                        LOG_WARN("CommandController", "Error al iniciar comunicacion de progreso del comando. Thread Id no encontrado.");
+                        //std::cout << "OnComandoLanzado: Thread Id not found: " << threadId << std::endl;
+                }
+        }
+}
+
+void GNC::CommandController::OnComandoProgreso(long threadId)
+{
+        GNC::GCS::ILocker pLocker(GNC::CommandController::Instance());
+
+        MapaComandos::iterator it = m_ComandosLanzados.find(threadId);
+        if (it != m_ComandosLanzados.end()) {
+                CommandLauncher* pLauncher = (*it).second;
+                pLauncher->LockProgreso();
+                float progreso = pLauncher->GetProgresoNormalizado();
+                std::string texto = pLauncher->GetTextoProgreso();
+                pLauncher->UnLockProgreso();
+                m_pProgreso->SetProgresoTarea(threadId, progreso, texto);
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoProgresoComando(pLauncher->GetCommand(), GNC::GCS::Events::EventoProgresoComando::TEP_Progreso, progreso, texto));
+        } else {
+                //std::cout << "OnComandoProgreso: Thread Id not found: " << threadId << std::endl;
+        }
+
+}
+
+void GNC::CommandController::OnComandoFinalizado(long threadId, bool lock)
+{
+        GNC::GCS::IComando* pComando = NULL;
+
+        bool actualizar=false;
+
+        GNC::GCS::ILocker* pLocker = NULL;
+
+        //LOG_TRACE("CommandController", "OnComandoFinalizado(" << threadId << ")");
+
+        {
+                if (lock) {
+                        pLocker = new GNC::GCS::ILocker(GNC::CommandController::Instance());
+                }
+                try {
+                        if(m_pProgreso != NULL) {
+                                m_pProgreso->EliminarTarea(threadId);
+                        }
+
+                        MapaComandosTerminados::iterator it1 = m_ComandosTerminados.find(threadId);
+                        if (it1 != m_ComandosTerminados.end()) {
+                                actualizar = true;
+                                pComando = (*it1).second;
+                                m_ComandosTerminados.erase(it1);
+                        } else {
+                                //LOG_TRACE("CommandController", "Id thread no encontrado en finalizados");
+                        }
+
+
+                        // TODO: Añadir un diccionario inverso o usar un set
+                        for (MapaOwners::iterator it2 = m_MapaOwners.begin(); it2 != m_MapaOwners.end(); ++it2) {
+                                ListaHilos::iterator it3 = (*it2).second.begin();
+                                bool found = false;
+                                while (!found && it3 != (*it2).second.end()) {
+                                        if ((*it3) == threadId) {
+                                                found = true;
+                                        } else {
+                                                ++it3;
+                                        }
+                                }
+                                if (found) {
+                                        (*it2).second.erase(it3);
+                                }
+                        }
+                } catch (std::exception&) {
+                        throw;
+                }
+
+                if (pLocker != NULL) {
+                        delete pLocker;
+                        pLocker = NULL;
+                }
+        }
+
+        if (pComando != NULL) {
+                if (actualizar && !pComando->EstaAbortado()) {
+                        pComando->Update();
+                        //if command is persistent... drop from bbdd
+                        GNC::GCS::IPersistentCommand* pPersistent = dynamic_cast<GNC::GCS::IPersistentCommand*>(pComando);
+                        if (pPersistent != NULL) {
+                                GNC::GCS::HistoryController::Instance()->SaveTask(pPersistent);
+                        }
+                } else {
+                        LOG_DEBUG("CommandController" , "IComando::Update no invocado");
+                }
+                //LOG_TRACE("CommandController", "Procesando evento de comando finalizado");
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoProgresoComando(pComando, GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado));
+                pComando->Free();
+                delete pComando;
+                pComando = NULL;
+        } else {
+                LOG_WARN("CommandController", "Comando nulo. no se propagara el evento de fin de comando ni se actualizara");
+                //std::cout << "CommandController>> pComando = NULL!!!!" << std::endl;
+        }
+
+}
+
+GNC::CommandController::ListaNombreComandos GNC::CommandController::GetComandosActivos()
+{
+        ListaNombreComandos lista;
+        GNC::GCS::ILocker pLocker(GNC::CommandController::Instance());
+        for(MapaComandos::iterator it = m_ComandosLanzados.begin(); it!=m_ComandosLanzados.end(); ++it) {
+                std::stringstream strstream;
+                const GNC::GCS::IComando* pCmd =  (*it).second->GetCommand();
+                if (pCmd != NULL) {
+                        strstream << pCmd->GetName();
+                } else {
+                        strstream << "<NULL>";
+                }
+                strstream << ": " << (*it).second->GetTextoProgreso();
+                lista.push_back( strstream.str());
+        }
+        return lista;
+}
+
+//endregion
diff --git a/cadxcore/main/controllers/commandcontroller.h b/cadxcore/main/controllers/commandcontroller.h
new file mode 100644
index 0000000..d3838af
--- /dev/null
+++ b/cadxcore/main/controllers/commandcontroller.h
@@ -0,0 +1,177 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <list>
+#include <map>
+
+#include <api/internal.h>
+#include <api/controllers/icommandcontroller.h>
+#include <api/icommand.h>
+#include <api/controllers/iprogresscontroller.h>
+#include <api/ilock.h>
+#include <api/iwaitqueue.h>
+
+// TODO: Refactor this
+#include <wx/thread.h>
+
+#include <atomic>
+
+//----------------------------------------------------------------------------------------------------
+//region forward declarations
+namespace GNC
+{
+class CommandController;
+class ThreadPool;
+}
+
+class wxWindow;
+//endregion
+
+namespace GNC
+{
+
+//----------------------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------
+class EXTAPI CommandLauncher : public wxThread, public GNC::GCS::WaitQueueTask, public GNC::INotificadorProgreso
+{
+public:
+        //id Ginkgo
+        unsigned long m_idThreadGinkgo;
+
+        GNC::GCS::IComando* GetCommand();
+
+        void SetCommand(GNC::GCS::IComando* pCmd);
+
+        virtual void* Entry();
+
+        virtual void OnExit();
+
+        bool RecalcularDependencias();
+
+        void IniciarUnlocker();
+
+        void Park();
+
+private:
+        void UnPark();
+
+protected:
+
+        virtual void DoTerminar();
+
+private:
+
+        CommandLauncher(GNC::ThreadPool* pool);
+
+        ~CommandLauncher();
+
+        virtual bool NotificarProgreso(float progresoNormalizado, const std::string& texto);
+
+private:
+
+        GNC::GCS::IComando*    m_pComando;
+
+        GNC::GCS::WaitQueue    m_Dependencias;
+
+        // this varable should be an atomic or guarded by a mutex
+        std::atomic<bool>      m_Abortar;
+
+        bool                   m_Shutdown;
+
+        wxSemaphore*           m_pParker;
+
+        GNC::ThreadPool*       m_pPool;
+
+#if defined(_WINDOWS)
+        //HANDLE              m_hEventoCancelacion;
+#else
+
+#endif
+
+        friend class GNC::ThreadPool;
+        friend class GNC::CommandController;
+};
+
+
+
+//----------------------------------------------------------------------------------------------------
+//----------------------------------------------------------------------------------------------------
+class EXTAPI CommandController : public GNC::GCS::ICommandController, public GNC::GCS::ILockable
+{
+public:
+
+        typedef std::map<long, CommandLauncher*> MapaComandos;
+        typedef std::map<long, GNC::GCS::IComando*> MapaComandosTerminados;
+        typedef std::list<long> ListaHilos;
+        typedef std::map<void*, ListaHilos > MapaOwners;
+        typedef std::list<std::string> ListaNombreComandos;
+
+        static CommandController *Instance();
+        static void FreeInstance();
+
+        virtual ~CommandController();
+        virtual void ProcessSync(GNC::GCS::IComando* cmd, bool autodelete, bool update = true, GNC::INotificadorProgreso* pNotifier = NULL);
+        virtual void ProcessAsync(const std::string& str, GNC::GCS::IComando* cmd, void* owner);
+        virtual void AbortarComando(GNC::GCS::IComando* pComando, bool sincrono = true);
+        virtual void AbortarComando(long threadId, bool sincrono = true);
+        virtual void AbortarComandosDeOwner(void* owner);
+        virtual void AbortarComandosDeOwnerAsincrono(void* owner);
+        virtual void WaitToOwnerCommands(void* owner);
+
+        virtual unsigned int GetNumActiveCommands();
+
+        void RegistrarProgreso(GNC::IControladorProgreso* pProgreso)
+        {
+                m_pProgreso = pProgreso;
+        }
+
+        GNC::IControladorProgreso* GetProgresoRegistrado()
+        {
+                return m_pProgreso;
+        }
+
+        void OnComandoLanzado(long threadId);
+        void OnComandoProgreso(long threadId);
+        void OnComandoFinalizado(long threadId, bool lock=true);
+
+        ListaNombreComandos GetComandosActivos();
+
+protected:
+
+        CommandController();
+
+        static CommandController* m_psInstancia;
+        bool m_Destroying;
+
+        MapaComandos m_ComandosLanzados;
+        MapaComandosTerminados m_ComandosTerminados;
+        MapaOwners m_MapaOwners;
+        bool m_EsperarComandos;
+
+        GNC::IControladorProgreso* m_pProgreso;
+
+        unsigned long m_idThreads;
+
+        friend class GNC::CommandLauncher;
+};
+
+}
diff --git a/cadxcore/main/controllers/configurationcontroller.cpp b/cadxcore/main/controllers/configurationcontroller.cpp
new file mode 100644
index 0000000..1eaf664
--- /dev/null
+++ b/cadxcore/main/controllers/configurationcontroller.cpp
@@ -0,0 +1,861 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/string.h>
+#include <api/globals.h>
+#include "controladorlog.h"
+#include "configurationcontroller.h"
+#include <main/controllers/configurationcontroller.h>
+#include <wx/filename.h>
+#include <wx/dir.h>
+#include <wx/wfstream.h>
+#include <wx/fileconf.h>
+#include <wx/stdpaths.h>
+#include <wx/file.h>
+#include <wx/log.h>
+#ifdef __WINDOWS__
+#include <wx/msw/private.h>     // includes <windows.h>
+#endif
+
+namespace GNC
+{
+namespace GCS
+{
+ProxySettings::ProxySettings():
+        port(0),
+        useProxy(false),
+        requiresAuth(false)
+{
+}
+ProxySettings::~ProxySettings()
+{
+}
+
+
+ConfigurationController* ConfigurationController::m_pInstance = NULL;
+wxCriticalSection ConfigurationController::m_criticalSection;
+
+wxString ConfigurationController::m_PreferredGeneralConfigPath;
+
+ConfigurationController* ConfigurationController::Instance()
+{
+        if (m_pInstance == NULL) {
+                wxCriticalSectionLocker locker(m_criticalSection);
+                m_pInstance = new ConfigurationController();
+        }
+        return m_pInstance;
+}
+
+void ConfigurationController::FreeInstance()
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+void ConfigurationController::SetPreferredConfigFile(const std::string& path)
+{
+        m_PreferredGeneralConfigPath = wxString(FROMPATH(path));
+}
+
+void ConfigurationController::Flush()
+{
+        wxFileName user(m_pathUserConfig);
+        if (user.IsFileWritable()) {
+                m_pUserConfig->Flush();
+        }
+        wxFileName global(m_pathGlobalConfig);
+        if (global.IsFileWritable()) {
+                m_pGeneralConfig->Flush();
+        }
+}
+
+bool ConfigurationController::deleteEntryGeneral(const std::string& scope, const std::string&key)
+{
+        return deleteEntry(TC_General, scope, key);
+}
+
+bool ConfigurationController::writeStringGeneral(const std::string& scope, const std::string& key, const std::string& value)
+{
+        return writeString(TC_General, scope, key, value);
+}
+
+bool ConfigurationController::readStringGeneral(const std::string& scope, const std::string& key, std::string& value, const std::string& defaultValue)
+{
+        return readString(TC_General, scope, key, value, defaultValue);
+}
+
+bool ConfigurationController::readBoolGeneral(const std::string& scope, const std::string& key, bool& value, bool defaultValue)
+{
+        return readBool(TC_General, scope, key, value, defaultValue);
+}
+
+bool ConfigurationController::writeBoolGeneral(const std::string& scope, const std::string& key, bool value)
+{
+        return writeBool(TC_General, scope, key, value);
+}
+
+bool ConfigurationController::readIntGeneral(const std::string& scope, const std::string& key, int& value, int defaultValue)
+{
+        return readInt(TC_General, scope, key, value, defaultValue);
+}
+
+bool ConfigurationController::writeIntGeneral(const std::string& scope, const std::string& key, int value)
+{
+        return writeInt(TC_General, scope, key, value);
+}
+
+bool ConfigurationController::readDoubleGeneral(const std::string& scope, const std::string& key, double& value, double defaultValue)
+{
+        return readDouble(TC_General, scope, key, value, defaultValue);
+}
+
+bool ConfigurationController::writeDoubleGeneral(const std::string& scope, const std::string& key, double value)
+{
+        return writeDouble(TC_General, scope, key, value);
+}
+
+bool ConfigurationController::writeGroupGeneral(const std::string& scope, const TListGroups& listOfGroups, const std::string& prefix)
+{
+        return writeGroup(TC_General, scope, listOfGroups, prefix);
+}
+
+bool ConfigurationController::readGroupGeneral(const std::string& scope, TListGroups& listOfGroups)
+{
+        return readGroup(TC_General, scope, listOfGroups);
+}
+
+bool ConfigurationController::deleteEntryUser(const std::string& scope, const std::string&key)
+{
+        return deleteEntry(TC_User, scope, key);
+}
+
+bool ConfigurationController::writeStringUser(const std::string& scope, const std::string& key, const std::string& value)
+{
+        return writeString(TC_User, scope, key, value);
+}
+
+bool ConfigurationController::readStringUser(const std::string& scope, const std::string& key, std::string& value, const std::string& defaultValue)
+{
+        if (!readString(TC_General, scope, key, value, defaultValue)) {
+                if (!readString(TC_Machine, scope, key, value, defaultValue)) {
+                        return readString(TC_User, scope, key, value, defaultValue);
+                }
+        }
+        return true;
+}
+
+bool ConfigurationController::readBoolUser(const std::string& scope, const std::string& key, bool& value, bool defaultValue)
+{
+        if (!readBool(TC_General, scope, key, value, defaultValue)) {
+                if (!readBool(TC_Machine, scope, key, value, defaultValue)) {
+                        return readBool(TC_User, scope, key, value, defaultValue);
+                }
+        }
+        return true;
+}
+
+bool ConfigurationController::writeBoolUser(const std::string& scope, const std::string& key, bool value)
+{
+        return writeBool(TC_User, scope, key, value);
+}
+
+bool ConfigurationController::readIntUser(const std::string& scope, const std::string& key, int& value, int defaultValue)
+{
+        if (!readInt(TC_General, scope, key, value, defaultValue)) {
+                if (!readInt(TC_Machine, scope, key, value, defaultValue)) {
+                        return readInt(TC_User, scope, key, value, defaultValue);
+                }
+        }
+        return true;
+}
+
+bool ConfigurationController::writeIntUser(const std::string& scope, const std::string& key, int value)
+{
+        return writeInt(TC_User, scope, key, value);
+}
+
+bool ConfigurationController::readDoubleUser(const std::string& scope, const std::string& key, double& value, double defaultValue)
+{
+        if (!readDouble(TC_General, scope, key, value, defaultValue)) {
+                if (!readDouble(TC_Machine, scope, key, value, defaultValue)) {
+                        return readDouble(TC_User, scope, key, value, defaultValue);
+                }
+        }
+        return true;
+}
+
+bool ConfigurationController::writeDoubleUser(const std::string& scope, const std::string& key, double value)
+{
+        return writeDouble(TC_User, scope, key, value);
+}
+
+bool ConfigurationController::writeGroupUser(const std::string& scope, const TListGroups& listOfGroups, const std::string& prefix)
+{
+        return writeGroup(TC_User, scope, listOfGroups, prefix);
+}
+
+bool ConfigurationController::readGroupUser(const std::string& scope, TListGroups& listOfGroups)
+{
+        if (!readGroup(TC_General, scope, listOfGroups)) {
+                if (!readGroup(TC_Machine, scope, listOfGroups)) {
+                        return readGroup(TC_User, scope, listOfGroups);
+                }
+        }
+        return true;
+}
+
+//proxy settings..
+ProxySettings ConfigurationController::GetProxySettings()
+{
+        ProxySettings settings;
+        readStringUser("/GinkgoCore/Station/Proxy", "Hostname", settings.hostName);
+        readStringUser("/GinkgoCore/Station/Proxy", "Username", settings.userName);
+        readStringUser("/GinkgoCore/Station/Proxy", "Password", settings.password);
+        readStringUser("/GinkgoCore/Station/Proxy", "Exceptions", settings.exceptions);
+        readIntUser("/GinkgoCore/Station/Proxy", "Port", settings.port);
+        readBoolUser("/GinkgoCore/Station/Proxy", "UseProxy", settings.useProxy, false);
+        readBoolUser("/GinkgoCore/Station/Proxy", "RequiresAuth", settings.requiresAuth, false);
+
+        return settings;
+}
+
+void ConfigurationController::SetProxySettings(const ProxySettings& settings)
+{
+        writeStringUser("/GinkgoCore/Station/Proxy", "Hostname", settings.hostName);
+        writeStringUser("/GinkgoCore/Station/Proxy", "Username", settings.userName);
+        writeStringUser("/GinkgoCore/Station/Proxy", "Password", settings.password);
+        writeStringUser("/GinkgoCore/Station/Proxy", "Exceptions", settings.exceptions);
+        writeIntUser("/GinkgoCore/Station/Proxy", "Port", settings.port);
+        writeBoolUser("/GinkgoCore/Station/Proxy", "UseProxy", settings.useProxy);
+        writeBoolUser("/GinkgoCore/Station/Proxy", "RequiresAuth", settings.requiresAuth);
+}
+//
+
+bool ConfigurationController::saveGlobalConfigurationFile(const std::string& path)
+{
+        wxString pathWx = FROMPATH(path);
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxFileOutputStream ostream(pathWx);
+
+        if (m_pPreferredGeneralConfig != NULL) {
+                return false;
+        }
+
+        return m_pGeneralConfig->Save(ostream);
+}
+
+bool ConfigurationController::loadGlobalConfigurationFile(const std::string& path)
+{
+
+        if (m_pPreferredGeneralConfig != NULL) {
+                return false;
+        }
+
+        wxString pathWx = FROMPATH(path);
+        wxCriticalSectionLocker locker(m_criticalSection);
+        delete m_pGeneralConfig;
+        bool res = wxCopyFile(pathWx, m_pathGlobalConfig, true);
+        if (!res) {
+                LOG_WARN("ConfigurationController", "Error Loading configuration file " << path);
+        }
+        m_pGeneralConfig = new wxFileConfig(wxEmptyString,wxEmptyString,m_pathGlobalConfig,wxEmptyString,wxCONFIG_USE_LOCAL_FILE);
+        return res;
+}
+
+bool ConfigurationController::deleteEntry(TConfig type, const std::string& scope, const std::string&key)
+{
+
+        if (m_pPreferredGeneralConfig != NULL) {
+                return false;
+        }
+
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxConfigBase * config;
+        if (type==TC_General) {
+                config = m_pGeneralConfig;
+        } else {
+                config = m_pUserConfig;
+        }
+
+        if (key == "") {
+                return config->DeleteGroup(wxString::FromUTF8(scope.c_str()));
+        } else {
+                config->SetPath(wxString::FromUTF8(scope.c_str()));
+                return config->DeleteEntry(wxString::FromUTF8(key.c_str()));
+        }
+}
+
+bool ConfigurationController::writeString(TConfig type, const std::string& scope, const std::string& key, const std::string& value)
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxConfigBase * config;
+        switch (type) {
+        case TC_User:
+                config = m_pUserConfig;
+                break;
+        case TC_Machine:
+                config = m_pMachineConfig;
+                break;
+        case TC_General:
+        default:
+                if (m_pPreferredGeneralConfig != NULL) {
+                        config = NULL;
+                } else {
+                        config = m_pGeneralConfig;
+                }
+        }
+        if (config == NULL) {
+                return false;
+        }
+        config->SetPath(wxString::FromUTF8(scope.c_str()));
+
+        bool result = config->Write(wxString::FromUTF8(key.c_str()),wxString::FromUTF8(value.c_str()));
+        Flush();
+        return result;
+}
+
+bool ConfigurationController::readString(TConfig type, const std::string& scope, const std::string& key, std::string& value, const std::string& defaultValue)
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxConfigBase * config;
+        switch (type) {
+        case TC_User:
+                config = m_pUserConfig;
+                break;
+        case TC_Machine:
+                config = m_pMachineConfig;
+                break;
+        case TC_General:
+        default:
+                if (m_pPreferredGeneralConfig != NULL) {
+                        config = m_pPreferredGeneralConfig;
+                } else {
+                        config = m_pGeneralConfig;
+                }
+        }
+        if (config == NULL) {
+                return false;
+        }
+        config->SetPath(wxString::FromUTF8(scope.c_str()));
+        wxString wxTmp;
+        bool result = config->Read(wxString::FromUTF8(key.c_str()),&wxTmp,wxString::FromUTF8(defaultValue.c_str()));
+        value = wxTmp.ToUTF8();
+        return result;
+}
+
+bool ConfigurationController::writeBool(TConfig type, const std::string& scope, const std::string& key, bool value)
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxConfigBase * config;
+        switch (type) {
+        case TC_User:
+                config = m_pUserConfig;
+                break;
+        case TC_Machine:
+                config = m_pMachineConfig;
+                break;
+        case TC_General:
+        default:
+                if (m_pPreferredGeneralConfig != NULL) {
+                        config = NULL;
+                } else {
+                        config = m_pGeneralConfig;
+                }
+        }
+        if (config == NULL) {
+                return false;
+        }
+        config->SetPath(wxString::FromUTF8(scope.c_str()));
+
+        bool result = config->Write(wxString::FromUTF8(key.c_str()),value);
+        Flush();
+        return result;
+}
+
+bool ConfigurationController::readBool(TConfig type, const std::string& scope, const std::string& key, bool& value, bool defaultValue)
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxConfigBase * config;
+        switch (type) {
+        case TC_User:
+                config = m_pUserConfig;
+                break;
+        case TC_Machine:
+                config = m_pMachineConfig;
+                break;
+        case TC_General:
+        default:
+                if (m_pPreferredGeneralConfig != NULL) {
+                        config = m_pPreferredGeneralConfig;
+                } else {
+                        config = m_pGeneralConfig;
+                }
+        }
+        if (config == NULL) {
+                return false;
+        }
+        config->SetPath(wxString::FromUTF8(scope.c_str()));
+
+        bool result = config->Read(wxString::FromUTF8(key.c_str()),&value,defaultValue);
+
+        return result;
+}
+
+bool ConfigurationController::readInt(TConfig type, const std::string& scope, const std::string& key, int& value, int defaultValue)
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxConfigBase * config;
+        switch (type) {
+        case TC_User:
+                config = m_pUserConfig;
+                break;
+        case TC_Machine:
+                config = m_pMachineConfig;
+                break;
+        case TC_General:
+        default:
+                if (m_pPreferredGeneralConfig != NULL) {
+                        config = m_pPreferredGeneralConfig;
+                } else {
+                        config = m_pGeneralConfig;
+                }
+        }
+        if (config == NULL) {
+                return false;
+        }
+        config->SetPath(wxString::FromUTF8(scope.c_str()));
+
+        bool result = config->Read(wxString::FromUTF8(key.c_str()),&value,defaultValue);
+
+        return result;
+}
+
+bool ConfigurationController::writeInt(TConfig type, const std::string& scope, const std::string& key, int value)
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxConfigBase * config;
+        switch (type) {
+        case TC_User:
+                config = m_pUserConfig;
+                break;
+        case TC_Machine:
+                config = m_pMachineConfig;
+                break;
+        case TC_General:
+        default:
+                if (m_pPreferredGeneralConfig != NULL) {
+                        config = NULL;
+                } else {
+                        config = m_pGeneralConfig;
+                }
+        }
+        if (config == NULL) {
+                return false;
+        }
+        config->SetPath(wxString::FromUTF8(scope.c_str()));
+
+        bool result = config->Write(wxString::FromUTF8(key.c_str()),value);
+        Flush();
+        return result;
+}
+
+bool ConfigurationController::readDouble(TConfig type, const std::string& scope, const std::string& key, double& value, double defaultValue)
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxConfigBase * config;
+        switch (type) {
+        case TC_User:
+                config = m_pUserConfig;
+                break;
+        case TC_Machine:
+                config = m_pMachineConfig;
+                break;
+        case TC_General:
+        default:
+                if (m_pPreferredGeneralConfig != NULL) {
+                        config = m_pPreferredGeneralConfig;
+                } else {
+                        config = m_pGeneralConfig;
+                }
+        }
+        if (config == NULL) {
+                return false;
+        }
+        config->SetPath(wxString::FromUTF8(scope.c_str()));
+
+        bool result = config->Read(wxString::FromUTF8(key.c_str()),&value,defaultValue);
+
+        return result;
+}
+
+bool ConfigurationController::writeDouble(TConfig type, const std::string& scope, const std::string& key, double value)
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxConfigBase * config;
+        switch (type) {
+        case TC_User:
+                config = m_pUserConfig;
+                break;
+        case TC_Machine:
+                config = m_pMachineConfig;
+                break;
+        case TC_General:
+        default:
+                if (m_pPreferredGeneralConfig != NULL) {
+                        config = NULL;
+                } else {
+                        config = m_pGeneralConfig;
+                }
+        }
+        if (config == NULL) {
+                return false;
+        }
+        config->SetPath(wxString::FromUTF8(scope.c_str()));
+
+        bool result = config->Write(wxString::FromUTF8(key.c_str()),value);
+        Flush();
+        return result;
+}
+
+bool ConfigurationController::writeGroup(TConfig type, const std::string& scope, const TListGroups& listOfGroups, const std::string& prefix)
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxConfigBase * config;
+        switch (type) {
+        case TC_User:
+                config = m_pUserConfig;
+                break;
+        case TC_Machine:
+                config = m_pMachineConfig;
+                break;
+        case TC_General:
+        default:
+                if (m_pPreferredGeneralConfig != NULL) {
+                        config = NULL;
+                } else {
+                        config = m_pGeneralConfig;
+                }
+        }
+        if (config == NULL) {
+                return false;
+        }
+        config->DeleteGroup(wxString::FromUTF8(scope.c_str()));
+        config->SetPath(wxString::FromUTF8(scope.c_str()));
+
+        int i=0;
+        bool ok = true;
+        for (TListGroups::const_iterator itGroups = listOfGroups.begin(); itGroups != listOfGroups.end(); ++itGroups, ++i) {
+                for (TMapValues::const_iterator itValues = (*itGroups).begin(); itValues != (*itGroups).end(); ++itValues) {
+                        std::ostringstream ostrKey;
+                        ostrKey << prefix << i << "/" << (*itValues).first;
+                        ok &= config->Write(wxString::FromUTF8(ostrKey.str().c_str()), wxString::FromUTF8((*itValues).second.c_str()));
+                }
+        }
+        return ok;
+}
+
+bool ConfigurationController::readGroup(TConfig type, const std::string& scope, TListGroups& listOfGroups)
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        wxConfigBase * config;
+        switch (type) {
+        case TC_User:
+                config = m_pUserConfig;
+                break;
+        case TC_Machine:
+                config = m_pMachineConfig;
+                break;
+        case TC_General:
+        default:
+                if (m_pPreferredGeneralConfig != NULL) {
+                        config = m_pPreferredGeneralConfig;
+                } else {
+                        config = m_pGeneralConfig;
+                }
+        }
+        if (config == NULL) {
+                return false;
+        }
+        config->SetPath(wxString::FromUTF8(scope.c_str()));
+
+        long dummy;
+        wxString str;
+        bool bCont = config->GetFirstGroup(str, dummy);
+        while ( bCont ) {
+                config->SetPath(str);
+                TMapValues mapTmp;
+                long dummy2;
+                wxString str2;
+                bool bCont2 = config->GetFirstEntry(str, dummy2);
+                while (bCont2) {
+                        config->Read(str, &str2);
+                        mapTmp[std::string(str.ToUTF8())] = std::string(str2.ToUTF8());
+                        bCont2 = config->GetNextEntry(str, dummy2);
+                }
+                listOfGroups.push_back(mapTmp);
+                config->SetPath(wxT(".."));
+                bCont = config->GetNextGroup(str, dummy);
+        }
+        return !listOfGroups.empty();
+}
+
+
+/**Overwrite wxWidgets home user searching*/
+wxString GetOverwrittedHomeDir(wxString *pstr)
+{
+        wxString& strDir = *pstr;
+
+        // first branch is for Cygwin
+#if defined(__UNIX__) && !defined(__WINE__)
+        const wxChar *szHome = wxGetenv(wxT("HOME"));
+        if ( szHome == NULL ) {
+                // we're homeless...
+                //wxLogWarning(_("can't find user's HOME, using current directory."));
+                strDir = wxT(".");
+        } else
+                strDir = szHome;
+
+        // add a trailing slash if needed
+        if ( strDir.Last() != wxT('/') )
+                strDir << wxT('/');
+
+#ifdef __CYGWIN__
+        // Cygwin returns unix type path but that does not work well
+        static wxChar windowsPath[MAX_PATH];
+        cygwin_conv_to_full_win32_path(strDir, windowsPath);
+        strDir = windowsPath;
+#endif
+#elif defined(__WXWINCE__)
+        strDir = wxT("\\");
+#elif defined(__WXWINDOWS__)
+        strDir.clear();
+
+        const wxChar *szHome = wxGetenv(wxT("HOMEDRIVE"));
+        if ( szHome != NULL )
+                strDir << szHome;
+        szHome = wxGetenv(wxT("HOMEPATH"));
+
+        if ( szHome != NULL ) {
+                strDir << szHome;
+
+                // the idea is that under NT these variables have default values
+                // of "%systemdrive%:" and "\\". As we don't want to create our
+                // config files in the root directory of the system drive, we will
+                // create it in our program's dir. However, if the user took care
+                // to set HOMEPATH to something other than "\\", we suppose that he
+                // knows what he is doing and use the supplied value.
+                if ( wxStrcmp(szHome, wxT("\\")) == 0 )
+                        strDir.clear();
+        } else {
+                if ( strDir.empty() ) {
+                        // If we have a valid USERPROFILE directory, as is the case in
+                        // Windows NT, 2000 and XP, we should use that as our home directory.
+                        szHome = wxGetenv(wxT("USERPROFILE"));
+
+                        if ( szHome != NULL ) {
+                                strDir = szHome;
+                        } else {
+                                // If we have a valid HOME directory, as is used on many machines that
+                                // have unix utilities on them, we should use that.
+                                szHome = wxGetenv(wxT("HOME"));
+                                if ( szHome != NULL ) {
+
+                                        strDir = szHome;
+                                }
+                        }
+                }
+        }
+
+        if ( !strDir.empty() ) {
+                // sometimes the value of HOME may be "%USERPROFILE%", so reexpand the
+                // value once again, it shouldn't hurt anyhow
+                strDir = wxExpandEnvVars(strDir);
+        } else { // fall back to the program directory
+                // extract the directory component of the program file name
+                wxFileName::SplitPath(wxGetFullModuleName(), &strDir, NULL, NULL);
+        }
+#else
+        strDir.clear();
+
+        // If we have a valid HOME directory, as is used on many machines that
+        // have unix utilities on them, we should use that.
+        const wxChar *szHome = wxGetenv(wxT("HOME"));
+
+        if ( szHome != NULL ) {
+                strDir = szHome;
+        } else { // no HOME, try HOMEDRIVE/PATH
+                szHome = wxGetenv(wxT("HOMEDRIVE"));
+                if ( szHome != NULL )
+                        strDir << szHome;
+                szHome = wxGetenv(wxT("HOMEPATH"));
+
+                if ( szHome != NULL ) {
+                        strDir << szHome;
+
+                        // the idea is that under NT these variables have default values
+                        // of "%systemdrive%:" and "\\". As we don't want to create our
+                        // config files in the root directory of the system drive, we will
+                        // create it in our program's dir. However, if the user took care
+                        // to set HOMEPATH to something other than "\\", we suppose that he
+                        // knows what he is doing and use the supplied value.
+                        if ( wxStrcmp(szHome, wxT("\\")) == 0 )
+                                strDir.clear();
+                }
+        }
+
+        if ( strDir.empty() ) {
+                // If we have a valid USERPROFILE directory, as is the case in
+                // Windows NT, 2000 and XP, we should use that as our home directory.
+                szHome = wxGetenv(wxT("USERPROFILE"));
+
+                if ( szHome != NULL )
+                        strDir = szHome;
+        }
+
+        if ( !strDir.empty() ) {
+                // sometimes the value of HOME may be "%USERPROFILE%", so reexpand the
+                // value once again, it shouldn't hurt anyhow
+                strDir = wxExpandEnvVars(strDir);
+        } else { // fall back to the program directory
+                // extract the directory component of the program file name
+                wxSplitPath(wxGetFullModuleName(), &strDir, NULL, NULL);
+        }
+#endif  // UNIX
+
+        return strDir.c_str();
+}
+
+wxString GetOverwrittedLocalDir()
+{
+        wxString strDir;
+
+#if defined(__WXMAC__) || defined(__DOS__)
+        // no local dir concept on Mac OS 9 or MS-DOS
+        strDir << GetGlobalDir() ;
+#else
+        GetOverwrittedHomeDir(&strDir);
+
+#ifdef  __UNIX__
+        if (
+                (strDir.Last() != wxT('/'))
+#ifdef __VMS
+                && (strDir.Last() != wxT(']'))
+#endif
+        )
+                strDir << wxT('/');
+#else
+        if (strDir.Last() != wxT('\\'))
+                strDir << wxT('\\');
+#endif
+#endif
+
+        return strDir;
+}
+wxString GetLocalFileName(const wxString& appName)
+{
+#ifdef __VMS__
+        // On VMS I saw the problem that the home directory was appended
+        // twice for the configuration file. Does that also happen for
+        // other platforms?
+        wxString str = wxT( '.' );
+#else
+        wxString str = GetOverwrittedLocalDir();
+#endif
+
+#if defined( __UNIX__ ) && !defined( __VMS ) && !defined( __WXMAC__ )
+        str << wxT('.');
+#endif
+
+        str << appName;
+
+#if defined(__WINDOWS__) || defined(__DOS__)
+        if ( wxStrchr(appName, wxT('.')) == NULL )
+                str << wxT(".ini");
+#endif
+
+#ifdef __WXMAC__
+        str << wxT(" Preferences") ;
+#endif
+
+        return str;
+}
+
+ConfigurationController::ConfigurationController()
+{
+
+        if (!m_PreferredGeneralConfigPath.IsEmpty()) {
+                m_pPreferredGeneralConfig = new wxFileConfig(wxEmptyString, wxEmptyString, m_PreferredGeneralConfigPath, wxEmptyString, wxCONFIG_USE_LOCAL_FILE);
+        } else {
+                m_pPreferredGeneralConfig = NULL;
+        }
+        wxString localFileconfig = GetLocalFileName(wxT("GinkgoUser"));
+        m_pUserConfig = new wxFileConfig(wxT("GinkgoUser"), wxT("Metaemotion"), localFileconfig, wxEmptyString, wxCONFIG_USE_LOCAL_FILE );
+        wxLogDebug("User config file: %s", localFileconfig);
+
+        wxString pathEjecutable = wxStandardPaths::Get().GetExecutablePath();
+        wxFileName fileName(pathEjecutable);
+        //= than execute
+        fileName.SetExt(wxT("ini"));
+        m_pathGlobalConfig = fileName.GetLongPath();
+        wxLogDebug("Global config file: %s", m_pathGlobalConfig);
+        if(wxFileExists(m_pathGlobalConfig)) {
+                m_pGeneralConfig = new wxFileConfig(wxEmptyString,wxEmptyString,m_pathGlobalConfig,wxEmptyString,wxCONFIG_USE_LOCAL_FILE);
+        } else {
+                //Ginkgo.ini
+                m_pathGlobalConfig = wxPathOnly(m_pathGlobalConfig) +  wxFileName::GetPathSeparator() + wxT("GinkgoGeneral.ini");
+                if(wxFileExists(m_pathGlobalConfig)) {
+                        m_pGeneralConfig = new wxFileConfig(wxEmptyString,wxEmptyString,m_pathGlobalConfig,wxEmptyString,wxCONFIG_USE_LOCAL_FILE);
+                } else {
+                        m_pathGlobalConfig = wxPathOnly(m_pathGlobalConfig) +  wxFileName::GetPathSeparator() + wxT("Ginkgo.ini");
+                        if(wxFileExists(m_pathGlobalConfig)) {
+                                m_pGeneralConfig = new wxFileConfig(wxEmptyString,wxEmptyString,m_pathGlobalConfig,wxEmptyString,wxCONFIG_USE_LOCAL_FILE);
+                        } else {
+                                //se inicializa el fichero de propiedades
+                                m_pathGlobalConfig = GetLocalFileName(wxT("Ginkgo"));
+                                m_pGeneralConfig = new wxFileConfig(wxT("Ginkgo"), wxT("Metaemotion"),m_pathGlobalConfig,wxEmptyString,wxCONFIG_USE_LOCAL_FILE );
+                        }
+                }
+        }
+        m_pathUserConfig = m_pGeneralConfig->GetLocalFileName(wxT("GinkgoUser"));
+
+        wxString pathMachineConfig = fileName.GetPath(true) +  wxT("GinkgoMachine.ini");
+        wxLogDebug("Machine config file: %s", pathMachineConfig);
+        if(wxFileExists(pathMachineConfig)) {
+                m_pMachineConfig = new wxFileConfig(wxEmptyString,wxEmptyString,pathMachineConfig,wxEmptyString,wxCONFIG_USE_LOCAL_FILE);
+        } else {
+                m_pMachineConfig = NULL;
+        }
+}
+
+ConfigurationController::~ConfigurationController()
+{
+        Flush();
+        delete m_pUserConfig;
+        delete m_pGeneralConfig;
+        if (m_pMachineConfig != NULL) {
+                delete m_pMachineConfig;
+        }
+}
+
+}
+}
diff --git a/cadxcore/main/controllers/configurationcontroller.h b/cadxcore/main/controllers/configurationcontroller.h
new file mode 100644
index 0000000..26ff1ed
--- /dev/null
+++ b/cadxcore/main/controllers/configurationcontroller.h
@@ -0,0 +1,125 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/controllers/iconfigurationcontroller.h>
+#include <api/api.h>
+#include <wx/string.h>
+
+#include <string>
+#include <map>
+#include <list>
+#include <wx/thread.h>
+
+class wxFileConfig;
+
+namespace GNC
+{
+namespace GCS
+{
+class ProxySettings
+{
+public:
+        std::string hostName;
+        std::string userName;
+        std::string password;
+        std::string exceptions;
+        int port;
+        bool useProxy;
+        bool requiresAuth;
+
+        ProxySettings();
+        ~ProxySettings();
+};
+
+class EXTAPI ConfigurationController: public GNC::GCS::IConfigurationController
+{
+public:
+
+        static ConfigurationController* Instance();
+        static void FreeInstance();
+        static void SetPreferredConfigFile(const std::string& path);
+
+        virtual void Flush();
+
+        virtual bool deleteEntryGeneral(const std::string& scope, const std::string&key = "");
+        virtual bool writeStringGeneral(const std::string& scope, const std::string& key, const std::string& value);
+        virtual bool readStringGeneral(const std::string& scope, const std::string& key, std::string& value, const std::string& defaultValue = "");
+        virtual bool writeBoolGeneral(const std::string& scope, const std::string& key, bool value);
+        virtual bool readBoolGeneral(const std::string& scope, const std::string& key, bool& value, bool defaultValue = true);
+        virtual bool readIntGeneral(const std::string& scope, const std::string& key, int& value, int defaultValue = 0);
+        virtual bool writeIntGeneral(const std::string& scope, const std::string& key, int value);
+        virtual bool readDoubleGeneral(const std::string& scope, const std::string& key, double& value, double defaultValue = 0.0);
+        virtual bool writeDoubleGeneral(const std::string& scope, const std::string& key, double value);
+        virtual bool writeGroupGeneral(const std::string& scope, const TListGroups& listOfGroups, const std::string& prefix = "");
+        virtual bool readGroupGeneral(const std::string& scope, TListGroups& listOfGroups);
+
+        virtual bool deleteEntryUser(const std::string& scope, const std::string&key = "");
+        virtual bool writeStringUser(const std::string& scope, const std::string& key, const std::string& value);
+        virtual bool readStringUser(const std::string& scope, const std::string& key, std::string& value, const std::string& defaultValue = "");
+        virtual bool readBoolUser(const std::string& scope, const std::string& key, bool& value, bool defaultValue = true);
+        virtual bool writeBoolUser(const std::string& scope, const std::string& key, bool value);
+        virtual bool readIntUser(const std::string& scope, const std::string& key, int& value, int defaultValue = 0);
+        virtual bool writeIntUser(const std::string& scope, const std::string& key, int value);
+        virtual bool readDoubleUser(const std::string& scope, const std::string& key, double& value, double defaultValue = 0.0);
+        virtual bool writeDoubleUser(const std::string& scope, const std::string& key, double value);
+        virtual bool writeGroupUser(const std::string& scope, const TListGroups& listOfGroups, const std::string& prefix = "");
+        virtual bool readGroupUser(const std::string& scope, TListGroups& listOfGroups);
+
+        //proxy settings..
+        virtual ProxySettings GetProxySettings();
+        virtual void SetProxySettings(const ProxySettings& settings);
+        //
+
+        virtual bool saveGlobalConfigurationFile(const std::string& path);
+        virtual bool loadGlobalConfigurationFile(const std::string& path);
+protected:
+        typedef enum TConfig {
+                TC_General,
+                TC_Machine,
+                TC_User
+        } TConfig;
+        bool deleteEntry(TConfig type, const std::string& scope, const std::string&key = "");
+        bool writeString(TConfig type, const std::string& scope, const std::string& key, const std::string& value);
+        bool readString(TConfig type, const std::string& scope, const std::string& key, std::string& value, const std::string& defaultValue = "");
+        bool readBool(TConfig type, const std::string& scope, const std::string& key, bool& value, bool defaultValue = true);
+        bool writeBool(TConfig type, const std::string& scope, const std::string& key, bool value);
+        bool writeInt(TConfig type, const std::string& scope, const std::string& key, int value);
+        bool readInt(TConfig type, const std::string& scope, const std::string& key, int& value, int defaultValue = 0);
+        bool writeDouble(TConfig type, const std::string& scope, const std::string& key, double value);
+        bool readDouble(TConfig type, const std::string& scope, const std::string& key, double& value, double defaultValue = 0.0);
+        bool writeGroup(TConfig type, const std::string& scope, const TListGroups& listOfGroups, const std::string& prefix = "");
+        bool readGroup(TConfig type, const std::string& scope, TListGroups& listOfGroups);
+
+        ConfigurationController();
+        ~ConfigurationController();
+        static ConfigurationController* m_pInstance;
+        static wxCriticalSection m_criticalSection;
+        static wxString m_PreferredGeneralConfigPath;
+
+        wxFileConfig * m_pPreferredGeneralConfig;
+        wxFileConfig * m_pGeneralConfig;
+        wxFileConfig * m_pUserConfig;
+        wxFileConfig * m_pMachineConfig;
+        wxString m_pathGlobalConfig;
+        wxString m_pathUserConfig;
+};
+}
+}
diff --git a/cadxcore/main/controllers/controladoracciones.cpp b/cadxcore/main/controllers/controladoracciones.cpp
new file mode 100644
index 0000000..c045339
--- /dev/null
+++ b/cadxcore/main/controllers/controladoracciones.cpp
@@ -0,0 +1,163 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "controladoracciones.h"
+#include "../entorno.h"
+#include <wx/thread.h>
+
+#define TAMANIO_MAX_PILA 10
+namespace GNC
+{
+namespace GCS
+{
+ControladorAcciones* ControladorAcciones::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new ControladorAcciones();
+        }
+        return m_pInstance;
+}
+
+void ControladorAcciones::FreeInstance()
+{
+        if(m_pInstance!=NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+ControladorAcciones* ControladorAcciones::m_pInstance = NULL;
+
+ControladorAcciones::ControladorAcciones()
+{
+        m_pCriticalSection = new wxCriticalSection();
+        GNC::Entorno::Instance()->ViewsObservers.push_back(this);
+}
+ControladorAcciones::~ControladorAcciones()
+{
+        GNC::Entorno::Instance()->ViewsObservers.remove(this);
+        if(m_pCriticalSection != NULL) {
+                delete m_pCriticalSection;
+                m_pCriticalSection = NULL;
+        }
+        m_mapaAcciones.clear();
+}
+
+void ControladorAcciones::PushAccion(GNC::GCS::IVista* pVista, GNC::GCS::Ptr<Accion> pAccion)
+{
+        wxCriticalSectionLocker lock((*m_pCriticalSection));
+        if(m_mapaAcciones.find(pVista) == m_mapaAcciones.end()) {
+                m_mapaAcciones[pVista] = new TPilaDeshacer();
+        }
+
+        TListaAcciones& listaAcciones = m_mapaAcciones[pVista]->m_listaAcciones;
+        TListaAcciones::iterator& accionActual = m_mapaAcciones[pVista]->m_iteradorAcciones;
+        if(accionActual != listaAcciones.begin()) {
+                //este estado es cuando hemos deshecho algun paso, tendremos que vaciar desde el principio hasta el puntero
+                while(accionActual != listaAcciones.begin()) {
+                        listaAcciones.pop_front();
+                }
+        }
+
+        listaAcciones.push_front(pAccion);
+        if(listaAcciones.size() > TAMANIO_MAX_PILA) {
+                listaAcciones.pop_back();
+        }
+        accionActual = listaAcciones.begin();
+}
+
+void ControladorAcciones::Deshacer(GNC::GCS::IVista* pVista)
+{
+        wxCriticalSectionLocker lock((*m_pCriticalSection));
+        if(m_mapaAcciones.find(pVista) != m_mapaAcciones.end()) { //si hay una pila de deshacer
+                TListaAcciones& listaAcciones = m_mapaAcciones[pVista]->m_listaAcciones;
+                TListaAcciones::iterator& accionActual = m_mapaAcciones[pVista]->m_iteradorAcciones;
+                if(accionActual != listaAcciones.end()) { //la accion actual no apunta al final
+                        (*accionActual)->Deshacer();
+                        ++accionActual;
+                }
+        }
+}
+
+void ControladorAcciones::Hacer(GNC::GCS::IVista* pVista)
+{
+        wxCriticalSectionLocker lock((*m_pCriticalSection));
+        if(m_mapaAcciones.find(pVista) != m_mapaAcciones.end()) { //si hay una pila de deshacer
+                TListaAcciones& listaAcciones = m_mapaAcciones[pVista]->m_listaAcciones;
+                TListaAcciones::iterator accionActual = m_mapaAcciones[pVista]->m_iteradorAcciones;
+                if(accionActual != listaAcciones.begin()) { //y el puntero no esta al principio
+                        --accionActual;
+                        if((*accionActual)->PuedeRehacer()) { // y la accion se puede rehacer...
+                                (*accionActual)->Hacer();
+                                m_mapaAcciones[pVista]->m_iteradorAcciones = accionActual;
+                        }
+                }
+
+        }
+}
+
+bool ControladorAcciones::PuedeHacer(GNC::GCS::IVista* pVista, std::string& nombreAccion)
+{
+        nombreAccion = "";
+        wxCriticalSectionLocker lock((*m_pCriticalSection));
+        if(m_mapaAcciones.find(pVista) == m_mapaAcciones.end()) {
+                return false;
+        } else {
+                TListaAcciones& listaAcciones = m_mapaAcciones[pVista]->m_listaAcciones;
+                TListaAcciones::iterator accionActual = m_mapaAcciones[pVista]->m_iteradorAcciones;
+                if(accionActual == listaAcciones.begin()) {
+                        return false;
+                } else {
+                        --accionActual;
+                        nombreAccion = (*accionActual)->GetNombre();
+                        return (*accionActual)->PuedeRehacer();
+                }
+        }
+}
+
+bool ControladorAcciones::PuedeDeshacer(GNC::GCS::IVista* pVista, std::string& nombreAccion)
+{
+        wxCriticalSectionLocker lock((*m_pCriticalSection));
+        if(m_mapaAcciones.find(pVista) == m_mapaAcciones.end()) {
+                return false;
+        } else {
+                TListaAcciones& listaAcciones = m_mapaAcciones[pVista]->m_listaAcciones;
+                TListaAcciones::iterator& accionActual = m_mapaAcciones[pVista]->m_iteradorAcciones;
+                if(accionActual == listaAcciones.end()) {
+                        return false;
+                } else {
+                        nombreAccion = (*accionActual)->GetNombre();
+                        return true;
+                }
+        }
+}
+
+void ControladorAcciones::OnVistaDestruida(GNC::GCS::IVista* pVista)
+{
+        //cuando se destruye una vista se vacia su pila de hacer/deshacer
+        wxCriticalSectionLocker lock((*m_pCriticalSection));
+        TMapaVista::iterator it = m_mapaAcciones.find(pVista);
+        if(it != m_mapaAcciones.end()) {
+                delete (*it).second;
+                m_mapaAcciones.erase(it);
+        }
+}
+}
+}
diff --git a/cadxcore/main/controllers/controladoracciones.h b/cadxcore/main/controllers/controladoracciones.h
new file mode 100644
index 0000000..43f23f6
--- /dev/null
+++ b/cadxcore/main/controllers/controladoracciones.h
@@ -0,0 +1,73 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/controllers/icontroladoracciones.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <list>
+#include <map>
+
+class wxCriticalSection;
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI ControladorAcciones: public IControladorAcciones, public IObservadorVistas
+{
+public:
+        static ControladorAcciones* Instance();
+        static void FreeInstance();
+
+        virtual void PushAccion(GNC::GCS::IVista* pVista, GNC::GCS::Ptr<Accion> pAccion);
+        virtual void Deshacer(GNC::GCS::IVista* pVista);
+        virtual void Hacer(GNC::GCS::IVista* pVista);
+        virtual bool PuedeHacer(GNC::GCS::IVista* pVista, std::string& nombreAccion);
+        virtual bool PuedeDeshacer(GNC::GCS::IVista* pVista, std::string& nombreAccion);
+
+protected:
+        static ControladorAcciones* m_pInstance;
+        ControladorAcciones();
+        ~ControladorAcciones();
+
+        void OnVistaDestruida(GNC::GCS::IVista* pVista);
+
+        typedef std::list<GNC::GCS::Ptr<Accion> > TListaAcciones;
+        typedef struct TPilaDeshacer {
+                TListaAcciones m_listaAcciones;
+                TListaAcciones::iterator m_iteradorAcciones;
+                TPilaDeshacer()
+                {
+                        m_iteradorAcciones = m_listaAcciones.end();
+                }
+                ~TPilaDeshacer()
+                {
+                        m_listaAcciones.clear();
+                }
+        } TPilaDeshacer;
+        typedef std::map<IVista*, TPilaDeshacer*> TMapaVista;
+        TMapaVista m_mapaAcciones;
+
+        wxCriticalSection* m_pCriticalSection;
+
+
+};
+}
+}
diff --git a/cadxcore/main/controllers/controladorautenticacion.cpp b/cadxcore/main/controllers/controladorautenticacion.cpp
new file mode 100644
index 0000000..c344342
--- /dev/null
+++ b/cadxcore/main/controllers/controladorautenticacion.cpp
@@ -0,0 +1,458 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+#include <openssl/sha.h>
+#include <sstream>
+
+#include "controladorautenticacion.h"
+#include "controladorpermisos.h"
+#include "controladorlog.h"
+#include <sqlite/seguridad.h>
+#include <main/entorno.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/filename.h>
+
+
+#define SALT "654w34qt5sdf/*-/435609'zvasd?asf"
+#define USUARIO_MODO_PASSWORD ""
+ 
+GSEC::Auth::ControladorAutenticacion* GSEC::Auth::ControladorAutenticacion::m_pInstance = NULL;
+ 
+GSEC::Auth::ControladorAutenticacion::ControladorAutenticacion()
+{
+}
+ 
+GSEC::Auth::ControladorAutenticacion::~ControladorAutenticacion()
+{
+}
+ 
+GSEC::Auth::ControladorAutenticacion* GSEC::Auth::ControladorAutenticacion::Instance()
+{
+if (m_pInstance == NULL) {
+m_pInstance = new ControladorAutenticacion();
+}
+return m_pInstance;
+}
+ 
+void GSEC::Auth::ControladorAutenticacion::FreeInstance()
+{
+if (m_pInstance != NULL) {
+delete m_pInstance;
+m_pInstance = NULL;
+}
+}
+ 
+GNC::GCS::Ptr<wxSQLite3Database> GSEC::Auth::ControladorAutenticacion::IniciarSesionModificacionBBDDSeguridad()
+{
+GNC::GCS::Ptr<wxSQLite3Database> pConexion = GetNewConexionSeguridad();
+pConexion->Begin();
+return pConexion;
+}
+ 
+void GSEC::Auth::ControladorAutenticacion::GuardarCambiosBBDDSeguridad(GNC::GCS::Ptr<wxSQLite3Database> sesion)
+{
+sesion->Commit();
+sesion->Begin();
+}
+ 
+void GSEC::Auth::ControladorAutenticacion::CancelarCambiosYCerrarBBDDSeguridad(GNC::GCS::Ptr<wxSQLite3Database> sesion)
+{
+sesion->Rollback();
+sesion->Close();
+}
+ 
+ 
+GSEC::Auth::TipoAutenticacion GSEC::Auth::ControladorAutenticacion::GetTipoAutenticacion()
+{
+//se busca en la configuracion...
+int secMode;
+GNC::GCS::ConfigurationController::Instance()->readIntGeneral("/GinkgoCore/Security", "SecMode", secMode, (int) TA_NO_LOGIN);
+ 
+switch (secMode) {
+case TA_NO_LOGIN:
+return TA_NO_LOGIN;
+case TA_USER_PASSWORD:
+return TA_USER_PASSWORD;
+case TA_PASSWORD:
+return TA_PASSWORD;
+default:
+return TA_NO_LOGIN;
+}
+}
+ 
+void GSEC::Auth::ControladorAutenticacion::SetTipoAutenticacion(GSEC::Auth::TipoAutenticacion tipo)
+{
+GNC::GCS::ConfigurationController::Instance()->writeIntGeneral("/GinkgoCore/Security", "SecMode", (int) tipo);
+}
+ 
+bool GSEC::Auth::ControladorAutenticacion::Auth(const std::string& usuario, const std::string& password)
+{
+TipoAutenticacion ta = GetTipoAutenticacion();
+if (ta == TA_PASSWORD) {
+return AutenticacionPassword(password);
+} else if(ta == TA_USER_PASSWORD) {
+return AutenticacionUsuarioPassword(usuario, password);
+} else {
+return true;
+}
+}
+ 
+bool GSEC::Auth::ControladorAutenticacion::InsertarUsuario(const std::string& user, const std::string& password, GNC::GCS::Ptr<wxSQLite3Database> sesion)
+{
+GNC::GCS::Ptr<wxSQLite3Database> pConexion;
+	
+if(sesion.IsValid()) {
+pConexion = sesion;
+} else {
+pConexion = GetNewConexionSeguridad();
+}
+ 
+if(!pConexion.IsValid()) {
+//ha habido error porque no se ha podido abrir la bbdd de seguridad, asumimos que no hay ni users ni passwords ni na
+return false;
+}
+ 
+bool resultado = false;
+try {
+wxSQLite3StatementBuffer bufSQL;
+std::string passwordHash = GetHashPassword(password);
+bufSQL.Format("INSERT INTO UserPass (User,Password) VALUES ('%q','%q')",user.c_str(),passwordHash.c_str());
+	
+if(pConexion->ExecuteUpdate(bufSQL)>0) {
+resultado = true;
+}
+} catch (wxSQLite3Exception& ex) {
+LOG_WARN("Core/BBDD", "Error al insertar el usuario " << ex.GetMessage().ToUTF8());
+}
+ 
+if(!sesion.IsValid()) {
+pConexion->Close();
+}
+return resultado;
+}
+ 
+ 
+bool GSEC::Auth::ControladorAutenticacion::CambiarPassword(const std::string& user, const std::string& password, GNC::GCS::Ptr<wxSQLite3Database> sesion)
+{
+GNC::GCS::Ptr<wxSQLite3Database> pConexion;
+	
+if(sesion.IsValid()) {
+pConexion = sesion;
+} else {
+pConexion = GetNewConexionSeguridad();
+}
+ 
+if(!pConexion.IsValid()) {
+//ha habido error porque no se ha podido abrir la bbdd de seguridad, asumimos que no hay ni users ni passwords ni na
+return false;
+}
+ 
+bool resultado = false;
+try {
+wxSQLite3StatementBuffer bufSQL;
+std::string passwordHash = GetHashPassword(password);
+bufSQL.Format("UPDATE UserPass SET Password='%q' WHERE user='%q'",passwordHash.c_str(), user.c_str());
+	
+if(pConexion->ExecuteUpdate(bufSQL)>0) {
+resultado = true;
+}
+} catch (wxSQLite3Exception& ex) {
+LOG_WARN("Core/BBDD", "Error al insertar el usuario " << ex.GetMessage().ToUTF8());
+}
+ 
+if(!sesion.IsValid()) {
+pConexion->Close();
+}
+return resultado;
+}
+ 
+bool GSEC::Auth::ControladorAutenticacion::SetPasswordGeneral(const std::string& password, GNC::GCS::Ptr<wxSQLite3Database> sesion)
+{
+GNC::GCS::Ptr<wxSQLite3Database> pConexion;
+	
+if(sesion.IsValid()) {
+pConexion = sesion;
+} else {
+pConexion = GetNewConexionSeguridad();
+}
+ 
+if(!pConexion.IsValid()) {
+//ha habido error porque no se ha podido abrir la bbdd de seguridad, asumimos que no hay ni users ni passwords ni na
+return false;
+}
+ 
+bool resultado = false;
+try {
+wxSQLite3StatementBuffer bufSQL;
+std::string passwordHash = GetHashPassword(password);
+bufSQL.Format("INSERT OR REPLACE INTO UserPass (User,Password) VALUES ('%q','%q')",USUARIO_MODO_PASSWORD,passwordHash.c_str());
+	
+if(pConexion->ExecuteUpdate(bufSQL)>0) {
+resultado = true;
+}
+} catch (wxSQLite3Exception& ex) {
+LOG_WARN("Core/BBDD", "Error al establecer password general " << ex.GetMessage().ToUTF8());
+}
+ 
+if(!sesion.IsValid()) {
+pConexion->Close();
+}
+return resultado;
+}
+ 
+bool GSEC::Auth::ControladorAutenticacion::EliminarUsuario(const std::string& user, GNC::GCS::Ptr<wxSQLite3Database> sesion)
+{
+GNC::GCS::Ptr<wxSQLite3Database> pConexion;
+	
+if(sesion.IsValid()) {
+pConexion = sesion;
+} else {
+pConexion = GetNewConexionSeguridad();
+}
+ 
+if(!pConexion.IsValid()) {
+//ha habido error porque no se ha podido abrir la bbdd de seguridad, asumimos que no hay ni users ni passwords ni na
+return false;
+}
+ 
+bool resultado = false;
+try {
+wxSQLite3StatementBuffer bufSQL;
+bufSQL.Format("DELETE FROM UserPass WHERE User = '%q'",user.c_str());
+	
+if(pConexion->ExecuteUpdate(bufSQL)>0) {
+resultado = true;
+}
+} catch (wxSQLite3Exception& ex) {
+LOG_WARN("Core/BBDD", "Error al eliminar el usuario de la base de datos " << ex.GetMessage().ToUTF8());
+}
+ 
+if(!sesion.IsValid()) {
+pConexion->Close();
+}
+return resultado;
+}
+ 
+void GSEC::Auth::ControladorAutenticacion::GetAllUsers(std::list<std::string>& listaUsuarios, GNC::GCS::Ptr<wxSQLite3Database> sesion)
+{
+GNC::GCS::Ptr<wxSQLite3Database> pConexion;
+	
+if(sesion.IsValid()) {
+pConexion = sesion;
+} else {
+pConexion = GetNewConexionSeguridad();
+}
+ 
+if(!pConexion.IsValid()) {
+//ha habido error porque no se ha podido abrir la bbdd de seguridad, asumimos que no hay ni users ni passwords ni na
+return;
+}
+ 
+try {
+wxSQLite3StatementBuffer bufSQL;
+bufSQL.Format("SELECT User "
+"FROM UserPass WHERE User <> '%q'", USUARIO_MODO_PASSWORD);
+wxSQLite3ResultSet resultados = pConexion->ExecuteQuery(bufSQL);
+while (resultados.NextRow()) {
+const std::string user(resultados.GetAsString(0).ToUTF8());
+listaUsuarios.push_back(user);
+}
+} catch (wxSQLite3Exception& ex) {
+LOG_WARN("Core/BBDD", "Error al realizar la consulta de usuarios " << ex.GetMessage().ToUTF8());
+}
+if(!sesion.IsValid()) {
+pConexion->Close();
+}
+}
+ 
+bool GSEC::Auth::ControladorAutenticacion::ExisteUsuario(const std::string& user, GNC::GCS::Ptr<wxSQLite3Database> sesion)
+{
+GNC::GCS::Ptr<wxSQLite3Database> pConexion;
+	
+if(sesion.IsValid()) {
+pConexion = sesion;
+} else {
+pConexion = GetNewConexionSeguridad();
+}
+ 
+if(!pConexion.IsValid()) {
+//ha habido error porque no se ha podido abrir la bbdd de seguridad, asumimos que no hay ni users ni passwords ni na
+return false;
+}
+ 
+bool resultado = false;
+try {
+wxSQLite3StatementBuffer bufSQL;
+bufSQL.Format("SELECT count(*) FROM UserPass WHERE User='%q'", user.c_str());
+resultado = pConexion->ExecuteScalar(bufSQL) > 0;
+} catch (wxSQLite3Exception& ex) {
+LOG_WARN("Core/BBDD", "Error al realizar la consulta IsPasswordGeneralSetted " << ex.GetMessage().ToUTF8());
+}
+if(!sesion.IsValid()) {
+pConexion->Close();
+}
+return resultado;
+}
+ 
+bool GSEC::Auth::ControladorAutenticacion::IsPasswordGeneralSetted(GNC::GCS::Ptr<wxSQLite3Database> sesion)
+{
+GNC::GCS::Ptr<wxSQLite3Database> pConexion;
+	
+if(sesion.IsValid()) {
+pConexion = sesion;
+} else {
+pConexion = GetNewConexionSeguridad();
+}
+ 
+if(!pConexion.IsValid()) {
+//ha habido error porque no se ha podido abrir la bbdd de seguridad, asumimos que no hay ni users ni passwords ni na
+return false;
+}
+ 
+bool resultado = false;
+try {
+wxSQLite3StatementBuffer bufSQL;
+bufSQL.Format("SELECT count(*) FROM UserPass WHERE User='%q'", USUARIO_MODO_PASSWORD);
+resultado = pConexion->ExecuteScalar(bufSQL) > 0;
+} catch (wxSQLite3Exception& ex) {
+LOG_WARN("Core/BBDD", "Error al realizar la consulta IsPasswordGeneralSetted " << ex.GetMessage().ToUTF8());
+}
+if(!sesion.IsValid()) {
+pConexion->Close();
+}
+return resultado;
+}
+ 
+int GSEC::Auth::ControladorAutenticacion::GetMaxLongitudUsuario()
+{
+return 20;
+}
+ 
+bool GSEC::Auth::ControladorAutenticacion::AutenticacionUsuarioPassword(const std::string& usuario, const std::string& password)
+{
+GNC::GCS::Ptr<wxSQLite3Database> pConexion = GetNewConexionSeguridad();
+ 
+if(!pConexion.IsValid()) {
+//ha habido error porque no se ha podido abrir la bbdd de seguridad, asumimos que no hay ni users ni passwords ni na
+return true;
+}
+ 
+bool resultado = false;
+ 
+try {
+wxSQLite3StatementBuffer bufSQL;
+bufSQL.Format("SELECT Password "
+"FROM UserPass WHERE "
+"User = '%q'",usuario.c_str());
+wxSQLite3ResultSet resultados = pConexion->ExecuteQuery(bufSQL);
+if (resultados.NextRow()) {
+const std::string passWordBBDD(resultados.GetAsString(0).ToUTF8());
+resultado = passWordBBDD == GetHashPassword(password);
+}
+} catch (wxSQLite3Exception& ex) {
+LOG_WARN("Core/BBDD", "Error al realizar la consulta de password " << ex.GetMessage().ToUTF8());
+}
+//si ha habido errores... devolvemos true para que siga
+pConexion->Close();
+if (resultado) {
+LOG_INFO("Core/Autenticacion", "El usuario " << usuario << " se ha autenticado correctamente");
+} else {
+LOG_INFO("Core/Autenticacion", "El usuario " << usuario << " ha introducido un password inv�lido");
+}
+ 
+return resultado;
+}
+ 
+bool GSEC::Auth::ControladorAutenticacion::AutenticacionPassword(const std::string& password)
+{
+return AutenticacionUsuarioPassword(USUARIO_MODO_PASSWORD, password);
+}
+ 
+ 
+std::string GSEC::Auth::ControladorAutenticacion::GetHashPassword(const std::string& password)
+{
+std::ostringstream ostr;
+ostr << password;
+//salt 
+ostr << SALT;
+std::string cadenaEntrada = ostr.str();
+ 
+unsigned char salida[SHA512_DIGEST_LENGTH];
+SHA512((const unsigned char*)cadenaEntrada.c_str(), cadenaEntrada.size(), salida);
+ 
+std::ostringstream cadenaSHA;
+cadenaSHA.setf ( std::ios::hex, std::ios::basefield );
+for(int i = 0; i<SHA512_DIGEST_LENGTH; i++) {
+cadenaSHA << (int)salida[i];
+}
+return cadenaSHA.str();
+}
+ 
+GNC::GCS::Ptr<wxSQLite3Database> GSEC::Auth::ControladorAutenticacion::GetNewConexionSeguridad()
+{
+GNC::GCS::Ptr<wxSQLite3Database> pConexion(new wxSQLite3Database());
+try {
+//pillamos la bbdd
+std::string pathFicheroDB;
+std::ostringstream ostr;
+ostr << GNC::Entorno::Instance()->GetGinkgoUserDir() << (char)wxFileName::GetPathSeparator(wxPATH_NATIVE) << "ginkgosec.db";
+pathFicheroDB = ostr.str();
+wxString wxDirectorio = FROMPATH(GNC::Entorno::Instance()->GetGinkgoUserDir());
+	
+if(!wxDirExists(wxDirectorio)) {
+#ifdef _WIN32
+bool correcto = wxMkdir(wxDirectorio,511);
+#else
+bool correcto = wxMkDir(wxDirectorio.ToUTF8(), 0770) == -1? false : true;
+#endif
+if(!correcto) {
+//std::cout << "Error al crear el directorio " << wxDirectorio.ToUTF8() << std::endl;
+//se escribe en tmp...
+LOG_WARN("Core/BBDD", "No tiene permisos para escribir en el directorio del usuario, esto hace que la seguridad deje de funcionar dado que no puede crearse la base de datos")
+std::ostringstream ostr2;
+ostr2 << GNC::Entorno::Instance()->GetGinkgoTempDir() << (char)wxFileName::GetPathSeparator(wxPATH_NATIVE) << "ginkgosec.db"<<std::ends;
+pathFicheroDB = ostr2.str();
+return NULL;
+}
+}
+ 
+//existe??
+if(!wxFileExists(FROMPATH(pathFicheroDB))) {
+//se crea el fichero de base de datos
+CreateSeguridadDB(*pConexion,pathFicheroDB.c_str());
+}
+ 
+if(!pConexion->IsOpen()) {
+if( !AbrirConexionBBDDSeguridad(*pConexion,pathFicheroDB) ) {
+////////////////////////////////////////////error fatal no se puede abrir la bbdd
+LOG_ERROR("Core/BBDD", "Error fatal, no se puede escribir la base de datos de seguridad")
+return NULL;
+}
+}
+} catch (wxSQLite3Exception& ex) {
+LOG_WARN("Core/BBDD", "Error al crear la base de datos de mensajer�a: "<<ex.GetMessage())
+return NULL;
+}
+ 
+return GNC::GCS::Ptr<wxSQLite3Database>(pConexion);
+}
+ 
+ 
\ No newline at end of file
diff --git a/cadxcore/main/controllers/controladorautenticacion.h b/cadxcore/main/controllers/controladorautenticacion.h
new file mode 100644
index 0000000..d6d956e
--- /dev/null
+++ b/cadxcore/main/controllers/controladorautenticacion.h
@@ -0,0 +1,88 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+
+#include <api/api.h>
+#include <api/controllers/icontroladorautenticacion.h>
+#include <api/autoptr.h>
+
+
+class wxSQLite3Database;
+namespace GSEC
+{
+namespace Auth
+{
+typedef enum {
+        TA_NO_LOGIN = 0,
+        TA_USER_PASSWORD,
+        TA_PASSWORD
+} TipoAutenticacion;
+
+class EXTAPI ControladorAutenticacion : public IControladorAutenticacion
+{
+public:
+
+        static ControladorAutenticacion* Instance();
+        static void FreeInstance();
+
+        GNC::GCS::Ptr<wxSQLite3Database> IniciarSesionModificacionBBDDSeguridad();
+        void GuardarCambiosBBDDSeguridad(GNC::GCS::Ptr<wxSQLite3Database> sesion);
+        void CancelarCambiosYCerrarBBDDSeguridad(GNC::GCS::Ptr<wxSQLite3Database> sesion);
+
+
+        TipoAutenticacion GetTipoAutenticacion();
+        void SetTipoAutenticacion(TipoAutenticacion tipo);
+
+        virtual bool Auth(const std::string& user, const std::string& password);
+
+        bool InsertarUsuario(const std::string& user, const std::string& password, GNC::GCS::Ptr<wxSQLite3Database> sesion=NULL);
+
+        bool CambiarPassword(const std::string& user, const std::string& password, GNC::GCS::Ptr<wxSQLite3Database> sesion=NULL);
+
+        bool SetPasswordGeneral(const std::string& password, GNC::GCS::Ptr<wxSQLite3Database> sesion = NULL);
+
+        bool EliminarUsuario(const std::string& user, GNC::GCS::Ptr<wxSQLite3Database> sesion=NULL);
+
+        void GetAllUsers(std::list<std::string>& listaUsuarios, GNC::GCS::Ptr<wxSQLite3Database> sesion =NULL);
+
+        bool ExisteUsuario(const std::string& user, GNC::GCS::Ptr<wxSQLite3Database> sesion=NULL);
+
+        bool IsPasswordGeneralSetted(GNC::GCS::Ptr<wxSQLite3Database> sesion=NULL);
+
+        int GetMaxLongitudUsuario();
+
+protected:
+        ControladorAutenticacion();
+        ~ControladorAutenticacion();
+
+        static ControladorAutenticacion* m_pInstance;
+
+        bool AutenticacionUsuarioPassword(const std::string& usuario, const std::string& password);
+        bool AutenticacionPassword(const std::string& password);
+
+        std::string GetHashPassword(const std::string& password);
+        GNC::GCS::Ptr<wxSQLite3Database> GetNewConexionSeguridad();
+
+};
+}
+}
diff --git a/cadxcore/main/controllers/controladorbbddhl7.cpp b/cadxcore/main/controllers/controladorbbddhl7.cpp
new file mode 100644
index 0000000..70a313f
--- /dev/null
+++ b/cadxcore/main/controllers/controladorbbddhl7.cpp
@@ -0,0 +1,345 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sqlite/hl7sqlite.h>
+
+#include "controladorbbddhl7.h"
+#include "controladorextensiones.h"
+#include <api/globals.h>
+#include <api/imodelohl7.h>
+#define LOGGER "ControladorBBDDHl7"
+#include "controladorlog.h"
+#include "dcmtk/dicomservers.h"
+#include "../entorno.h"
+
+#include <map>
+
+#include <ctime>
+
+#include <wx/xml/xml.h>
+#include <wx/file.h>
+#include <wx/sstream.h>
+#ifndef _WIN32
+#include <signal.h>
+#endif
+#include <wx/tokenzr.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/filename.h>
+#include <wx/thread.h>
+
+GIL::HL7::ControladorBBDDHl7* GIL::HL7::ControladorBBDDHl7::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new GIL::HL7::ControladorBBDDHl7();
+        }
+        return m_pInstance;
+}
+
+void GIL::HL7::ControladorBBDDHl7::FreeInstance()
+{
+        LOG_DEBUG("Core/BBDD", "Liberando instancia de ControladorBBDDHl7")
+        if(m_pInstance!=NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+GIL::HL7::ControladorBBDDHl7* GIL::HL7::ControladorBBDDHl7::m_pInstance = NULL;
+
+
+GIL::HL7::ControladorBBDDHl7::ControladorBBDDHl7()
+{
+        m_pConexion = new wxSQLite3Database();
+        try {
+                //pillamos la bbdd
+                std::string pathFicheroDB;
+                std::ostringstream ostr;
+                ostr << GNC::Entorno::Instance()->GetGinkgoUserDir() << (char)wxFileName::GetPathSeparator(wxPATH_NATIVE) << "ginkgodatabasehl7.db";
+                pathFicheroDB = ostr.str();
+                wxString wxDirectorio = FROMPATH(GNC::Entorno::Instance()->GetGinkgoUserDir());
+
+                if(!wxDirExists(wxDirectorio)) {
+                        bool correcto = true;
+
+#ifdef _WIN32
+                        wxMkdir(wxDirectorio,511);
+#else
+                        correcto = wxMkDir(wxDirectorio.ToUTF8(), 0770) == -1? false : true;
+#endif
+                        if(!correcto) {
+                                //std::cout << "Error al crear el directorio " << wxDirectorio.ToUTF8() << std::endl;
+                                //se escribe en tmp...
+                                LOG_WARN("Core/BBDD", "No tiene permisos para escribir en el directorio del usuario, se corre el riesgo de no enviar todos los mensajes Hl7")
+                                std::ostringstream ostr2;
+                                ostr2 << GNC::Entorno::Instance()->GetGinkgoTempDir() << (char)wxFileName::GetPathSeparator(wxPATH_NATIVE) << "ginkgodatabasehl7.db";
+                                pathFicheroDB = ostr2.str();
+                        }
+                }
+
+                //existe??
+                if(!wxFileExists(FROMPATH(pathFicheroDB))) {
+                        //se crea el fichero de base de datos
+                        CreateMensajesHl7DB(*m_pConexion,pathFicheroDB.c_str());
+                }
+
+                if(!m_pConexion->IsOpen()) {
+                        if( !AbrirConexionBBDDMensajes(*m_pConexion,pathFicheroDB) ) {
+                                ////////////////////////////////////////////error fatal no se puede abrir la bbdd
+                                LOG_ERROR("Core/BBDD", "Error fatal, no se puede escribir la base de datos de envío de mensajes")
+                        }
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_WARN("Core/BBDD", "Error al crear la base de datos de mensajería: "<<ex.GetMessage())
+        }
+}
+
+GIL::HL7::ControladorBBDDHl7::~ControladorBBDDHl7()
+{
+        if(m_pConexion != NULL) {
+                m_pConexion->Close();
+                delete m_pConexion;
+                m_pConexion =NULL;
+        }
+        LOG_DEBUG("Core/BBDD", "ControladorBBDDHl7 destruído")
+}
+
+bool GIL::HL7::ControladorBBDDHl7::AbrirConexionBBDD()
+{
+        //lo dejamos en seccion critica para que no se inicialice mas de una vez
+        wxCriticalSectionLocker locker(m_criticalSection);
+        if(m_pConexion != NULL && m_pConexion->IsOpen()) {
+                return true;
+        }
+
+        try {
+                //pillamos la bbdd
+                //existe??
+                std::string pathFicheroDB = m_pathBBDD;
+                if(!wxFileExists(FROMPATH(pathFicheroDB))) {
+                        pathFicheroDB = m_pathBBDDTemporal;
+                        if(!wxFileExists(FROMPATH(pathFicheroDB))) {
+                                return false;
+                        } else {
+                                LOG_WARN("Core/BBDD", "Buscando en la BBDD temporal " << pathFicheroDB)
+                        }
+                }
+
+                m_pConexion = new wxSQLite3Database();
+                if(!m_pConexion->IsOpen()) {
+                        if( !AbrirConexionBBDDMensajes(*m_pConexion,pathFicheroDB) ) {
+                                LOG_ERROR("Core/BBDD", "Error al abrir la BBDD de mensajes HL7 "<<pathFicheroDB)
+                                delete m_pConexion;
+                                m_pConexion = NULL;
+                                return false;
+                        } else {
+                                return true;
+                        }
+                } else {
+                        return true;
+                }
+        } catch (wxSQLite3Exception& ex) {
+                if(m_pConexion != NULL) {
+                        delete m_pConexion;
+                        m_pConexion = NULL;
+                }
+                LOG_ERROR("Core/BBDD", "Error al abrir la BBDD de mensajes HL7 " << ex.GetMessage().ToUTF8())
+                throw GIL::HL7::HL7Exception(std::string(ex.GetMessage().ToUTF8()),"BBDD HL7");
+        }
+}
+
+
+
+void GIL::HL7::ControladorBBDDHl7::GetMensajesHL7(std::list<MensajeHL7>& listaMensajes, bool soloNoEnviados)
+{
+        if(m_pConexion == NULL) {
+                if(!AbrirConexionBBDD()) {
+                        return;
+                }
+        }
+
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                if(soloNoEnviados) {
+                        bufSQL.Format("SELECT IDMensaje, Mensaje, URLEnvio, FechaEnvio,Enviado, MensajeError, Protocolo, ProcesarACK, MsgControlId "
+                                      "FROM MensajesHL7 WHERE "
+                                      "Enviado <> 'S' order by FechaEnvio DESC");
+                } else {
+                        bufSQL.Format("SELECT IDMensaje, Mensaje, URLEnvio, FechaEnvio,Enviado, MensajeError, Protocolo, ProcesarACK, MsgControlId "
+                                      "FROM MensajesHL7 order by FechaEnvio DESC");
+                }
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                while (resultados.NextRow()) {
+                        const int idMensaje = resultados.GetInt(0);
+                        const std::string mensaje(resultados.GetAsString(1).ToUTF8());
+                        const std::string urlEnvio(resultados.GetAsString(2).ToUTF8());
+                        const wxDateTime fechaEnvio = resultados.GetDateTime(3);
+                        std::string strFechaEnvio;
+                        if(fechaEnvio.IsValid()) {
+                                strFechaEnvio = fechaEnvio.Format(wxT("%d/%m/%Y %H:%M:%S")).ToUTF8();
+                        }
+                        std::string strEstado(resultados.GetAsString(4).ToUTF8());
+                        char estado = 'E';
+                        if(strEstado.size() == 1)
+                                estado = strEstado.c_str()[0];
+                        const std::string mensajeError(resultados.GetAsString(5).ToUTF8());
+                        int protocolo = resultados.GetInt(6);
+                        char charProcesarACK = (char)resultados.GetAsString(7)[0];
+                        bool procesarACK = charProcesarACK=='S';
+                        const std::string msgControlID(resultados.GetAsString(8).ToUTF8());
+
+                        MensajeHL7 mensajeHl7(idMensaje,mensaje,strFechaEnvio,urlEnvio,estado,mensajeError,protocolo,procesarACK,msgControlID);
+                        listaMensajes.push_back(mensajeHl7);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("Core/BBDD", "Error al consultar la BBDD:" << ex.GetMessage().ToUTF8())
+                throw GIL::HL7::HL7Exception(std::string(ex.GetMessage().ToUTF8()),"BBDD HL7");
+        }
+}
+
+void GIL::HL7::ControladorBBDDHl7::PurgarMensajesEnviados()
+{
+        if(m_pConexion == NULL) {
+                if(!AbrirConexionBBDD()) {
+                        return;
+                }
+        }
+
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("Delete FROM MensajesHL7 WHERE Enviado = 'S'");
+                m_pConexion->ExecuteUpdate(bufSQL);
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("Core/BBDD", "Error al consultar la BBDD:" << ex.GetMessage().ToUTF8())
+                throw GIL::HL7::HL7Exception(std::string(ex.GetMessage().ToUTF8()),"BBDD HL7");
+        }
+}
+
+void GIL::HL7::ControladorBBDDHl7::ActualizarEstadoMensaje(const int idMensaje, const GIL::HL7::MensajeHL7::TEstado estado, const std::string& mensajeError)
+{
+        if(m_pConexion == NULL) {
+                if(!AbrirConexionBBDD()) {
+                        return;
+                }
+        }
+
+        try {
+                char enviado;
+                switch(estado) {
+                case GIL::HL7::MensajeHL7::TE_Enviado:
+                        enviado = 'S';
+                        break;
+                case GIL::HL7::MensajeHL7::TE_Error:
+                        enviado = 'E';
+                        break;
+                case GIL::HL7::MensajeHL7::TE_Warning:
+                        enviado = 'W';
+                        break;
+                case GIL::HL7::MensajeHL7::TE_Pendiente:
+                        enviado = 'P';
+                        break;
+                default:
+                        enviado = 'P';
+                        break;
+                }
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("UPDATE MensajesHL7 set MensajeError='%q',Enviado = '%c'  "
+                              "WHERE IDMensaje = '%d'",mensajeError.c_str(),enviado, idMensaje);
+                m_pConexion->ExecuteUpdate(bufSQL);
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("Core/BBDD", "Error al consultar la BBDD:" << ex.GetMessage().ToUTF8())
+                throw GIL::HL7::HL7Exception(std::string(ex.GetMessage().ToUTF8()),"BBDD HL7");
+        }
+}
+
+void GIL::HL7::ControladorBBDDHl7::InsertarMensaje(MensajeHL7 mensaje)
+{
+        try {
+                char charProcesar = 'S';
+                if(!mensaje.m_procesarACK) {
+                        charProcesar = 'N';
+                }
+
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("INSERT INTO MensajesHL7 (IDMensaje,FechaEnvio,Mensaje,URLEnvio,Protocolo,ProcesarACK,MsgControlId) VALUES (NULL,datetime('now','localtime'),'%q','%q','%d','%c','%q')"
+                              ,mensaje.m_mensaje.c_str(), mensaje.m_destino.c_str(), mensaje.m_protocolo, charProcesar, mensaje.m_msgControlId.c_str());
+                if(m_pConexion->ExecuteUpdate(bufSQL)>0) {
+
+                } else {
+                        throw HL7Exception("Error al insertar el mensaje en la cola, consulte a su proveedor", "NET");
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("Core/BBDD", "Error al insertar en  la BBDD:" << ex.GetMessage().ToUTF8())
+                throw GIL::HL7::HL7Exception(std::string(ex.GetMessage().ToUTF8()),"BBDD HL7");
+        }
+}
+
+void GIL::HL7::ControladorBBDDHl7::ActualizarMensaje(const int idMensaje, const std::string& destino, const std::string& mensaje, const MensajeHL7::TEstado estado)
+{
+        try {
+                char enviado;
+                switch(estado) {
+                case GIL::HL7::MensajeHL7::TE_Enviado:
+                        enviado = 'S';
+                        break;
+                case GIL::HL7::MensajeHL7::TE_Error:
+                        enviado = 'E';
+                        break;
+                case GIL::HL7::MensajeHL7::TE_Warning:
+                        enviado = 'W';
+                        break;
+                case GIL::HL7::MensajeHL7::TE_Pendiente:
+                        enviado = 'P';
+                        break;
+                default:
+                        enviado = 'P';
+                        break;
+                }
+
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("UPDATE MensajesHL7 SET URLEnvio='%q', Mensaje ='%q', Enviado = '%c' where IDMensaje='%d'",destino.c_str(), mensaje.c_str(), enviado, idMensaje);
+                if(m_pConexion->ExecuteUpdate(bufSQL)>0) {
+
+                } else {
+                        throw HL7Exception("Error al insertar el mensaje en la cola, consulte a su proveedor", "NET");
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("Core/BBDD", "Error al insertar en  la BBDD:" << ex.GetMessage().ToUTF8())
+                throw GIL::HL7::HL7Exception(std::string(ex.GetMessage().ToUTF8()),"BBDD HL7");
+        }
+}
+
+void GIL::HL7::ControladorBBDDHl7::EliminarMensaje(const int idMensaje)
+{
+        if(m_pConexion == NULL) {
+                if(!AbrirConexionBBDD()) {
+                        return;
+                }
+        }
+
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("Delete FROM MensajesHL7 WHERE IDMensaje = '%d'", idMensaje);
+                m_pConexion->ExecuteUpdate(bufSQL);
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("Core/BBDD", "Error al Eliminar en la BBDD:" << ex.GetMessage().ToUTF8())
+                throw GIL::HL7::HL7Exception(std::string(ex.GetMessage().ToUTF8()),"BBDD HL7");
+        }
+}
+
diff --git a/cadxcore/main/controllers/controladorbbddhl7.h b/cadxcore/main/controllers/controladorbbddhl7.h
new file mode 100644
index 0000000..6c66f6d
--- /dev/null
+++ b/cadxcore/main/controllers/controladorbbddhl7.h
@@ -0,0 +1,104 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <wx/thread.h>
+#include <list>
+
+class wxSQLite3Database;
+class wxCriticalSection;
+
+namespace GIL
+{
+namespace HL7
+{
+struct MensajeHL7 {
+        typedef enum {
+                TE_Error,
+                TE_Warning,
+                TE_Enviado,
+                TE_Pendiente,
+                TE_Unknown
+        } TEstado;
+        int m_id;
+        std::string m_mensaje;
+        std::string m_fecha;
+        std::string m_mensajeError;
+        std::string m_destino;
+        std::string m_msgControlId;
+        int m_protocolo;
+        bool m_procesarACK;
+        TEstado m_estado;
+        MensajeHL7(int id, const std::string& mensaje, const std::string& fecha, const std::string& destino,const char estado, const std::string& mensajeError, int protocolo, bool procesarACK, const std::string& msgControlId )
+                : m_id(id), m_mensaje(mensaje), m_fecha(fecha), m_mensajeError(mensajeError), m_destino(destino), m_msgControlId(msgControlId), m_protocolo(protocolo), m_procesarACK(procesarACK)
+        {
+                switch(estado) {
+                case 'S':
+                        m_estado = TE_Enviado;
+                        break;
+                case 'N':
+                        m_estado = TE_Pendiente;
+                        break;
+                case 'W':
+                        m_estado = TE_Warning;
+                        break;
+                case 'E':
+                        m_estado = TE_Error;
+                        break;
+                default:
+                        m_estado = TE_Unknown;
+                }
+        }
+
+        ~MensajeHL7()
+        {
+        }
+};
+typedef std::list<MensajeHL7> TListaMensajes;
+
+class EXTAPI ControladorBBDDHl7
+{
+public:
+        static ControladorBBDDHl7* Instance();
+        static void FreeInstance();
+
+        void GetMensajesHL7(std::list<MensajeHL7>& listaMensajes, bool soloNoEnviados = false);
+        void PurgarMensajesEnviados();
+        void ActualizarEstadoMensaje(const int idMensaje, const MensajeHL7::TEstado estado, const std::string& mensajeError);
+        void InsertarMensaje(MensajeHL7 mensaje);
+        void ActualizarMensaje(const int idMensaje, const std::string& destino, const std::string& mensaje, const MensajeHL7::TEstado estado);
+        void EliminarMensaje(const int idMensaje);
+
+
+protected:
+        static ControladorBBDDHl7* m_pInstance;
+        ControladorBBDDHl7();
+        ~ControladorBBDDHl7();
+
+        bool AbrirConexionBBDD();
+
+        wxSQLite3Database* m_pConexion;
+        std::string        m_pathBBDD;
+        std::string        m_pathBBDDTemporal;
+        wxCriticalSection m_criticalSection;
+};
+}
+}
diff --git a/cadxcore/main/controllers/controladorcarga.cpp b/cadxcore/main/controllers/controladorcarga.cpp
new file mode 100644
index 0000000..1871787
--- /dev/null
+++ b/cadxcore/main/controllers/controladorcarga.cpp
@@ -0,0 +1,981 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include <api/icommand.h>
+#include <api/dicom/idicommanager.h>
+#include <main/controllers/commandcontroller.h>
+#include <api/internationalization/internationalization.h>
+#include <api/imodelointegracion.h>
+#include <main/entorno.h>
+#include <commands/comandocarga.h>
+#include <eventos/mensajes.h>
+#include "controladorcarga.h"
+#include "controladoreventos.h"
+#include "controladorvistas.h"
+#include "pacscontroller.h"
+
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/thread.h>
+
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtkImageData.h>
+#include <vtkStringArray.h>
+#include <vtkPointData.h>
+
+#include <itkImage.h>
+#include <itkCommand.h>
+#include <itkMetaDataObject.h>
+
+#include <itkImageSeriesReader.h>
+#include <itkGDCMSeriesFileNames.h>
+#include <itkGDCMImageIO.h>
+#include <itkImageSeriesReader.h>
+#include <itkVectorResampleImageFilter.h>
+#include <itkImageDuplicator.h>
+#include "streaming/streamingloader.h"
+
+class CargaItkProgressCallback : public itk::Command
+{
+public:
+        typedef CargaItkProgressCallback         Self;
+        typedef itk::Command                     Superclass;
+
+        typedef itk::SmartPointer<Self>          Pointer;
+        typedef itk::SmartPointer<const Self>    ConstPointer;
+
+        itkTypeMacro (CargaItkProgressCallback, itk::Command);
+        itkNewMacro (Self);
+
+        /** Standard Command virtual methods */
+        void Execute(itk::Object *caller, const itk::EventObject &event)
+        {
+                itk::ProcessObject* po = dynamic_cast<itk::ProcessObject*>(caller);
+                if( !po )
+                        return;
+
+                if( typeid(event) == typeid ( itk::ProgressEvent)  ) {
+                        try {
+                                if(!m_stop) {
+                                        if (m_pComando) {
+                                                if (!m_pComando->NotificarProgreso(po->GetProgress(),m_texto)) {
+                                                        po->SetAbortGenerateData(true);
+                                                }
+                                        }
+                                }
+                        } catch(std::exception& /*ex*/) {
+                                po->SetAbortGenerateData(true);
+                                return;
+                        }
+                }
+        }
+
+        void Execute(const itk::Object *caller, const itk::EventObject &event)
+        {
+                itk::ProcessObject* po = dynamic_cast<itk::ProcessObject*>( const_cast<itk::Object*>(caller));
+
+                if( !po ) return;
+
+                if( typeid(event) == typeid ( itk::ProgressEvent)  ) {
+                        try {
+                                if(!m_stop) {
+                                        if (m_pComando) {
+                                                if (!m_pComando->NotificarProgreso(po->GetProgress(),m_texto)) {
+                                                        po->SetAbortGenerateData(true);
+                                                }
+                                        }
+                                }
+                        } catch(std::exception& /*ex*/) {
+                                po->SetAbortGenerateData(true);
+                                return;
+                        }
+                }
+        }
+
+        void SetCommand (GNC::GCS::IComando* cmd)
+        {
+                m_pComando = cmd;
+        }
+
+        void SetTexto  (std::string str)
+        {
+                m_texto = str;
+        }
+
+protected:
+        CargaItkProgressCallback()
+        {
+                m_pComando=NULL;
+                m_stop=false;
+        }
+
+        ~CargaItkProgressCallback()
+        {
+                m_pComando=NULL;
+        }
+
+private:
+        GNC::GCS::IComando* m_pComando;
+        std::string m_texto;
+        bool m_stop;
+};
+
+GNC::GCS::ControladorCarga * GNC::GCS::ControladorCarga::m_psInstancia = NULL;
+wxCriticalSection* GNC::GCS::ControladorCarga::m_pCriticalSection = NULL;
+
+
+vtkSmartPointer<vtkImageData> GNC::GCS::ControladorCarga::CargarITKMultidimensional(IComando* cmd, ListaRutas& listaFicheros, int* posicion, double* spacing)
+{
+        //primero leemos el pixeltype...
+        GIL::DICOM::DicomDataset base;
+        GIL::DICOM::IDICOMManager* pDicomManager = GIL::DICOM::PACSController::Instance()->CrearInstanciaDeDICOMManager();
+        pDicomManager->CargarFichero(listaFicheros.front(),base);
+        GIL::DICOM::PACSController::Instance()->LiberarInstanciaDeDICOMManager(pDicomManager);
+        std::string tag;
+
+        if(base.getTag(std::string("0028|0002"),tag)) {
+                if(tag == "3") {
+                        return CargarITKMultidimensionalRGB(cmd, listaFicheros,spacing);
+                } else if (tag == "1") {
+                        //return CargarVTK(listaFicheros);
+                        return CargarITKMultidimensionalUnsignedShort(cmd, listaFicheros, posicion,spacing);
+                } else {
+                        std::ostringstream os;
+                        os << _Std("Studies with") << tag << _Std(" unsupported components");
+                        throw GNC::GCS::ControladorCargaException( os.str(), "ControladorCarga/CargarITKMultidimensional");
+                }
+        } else {
+                return CargarITKMultidimensionalUnsignedShort(cmd, listaFicheros, posicion,spacing);
+                //return CargarVTK(listaFicheros);
+        }
+}
+
+vtkSmartPointer<vtkImageData> GNC::GCS::ControladorCarga::CargarITK(IComando* cmd, std::string& path, int* orientacion, double* spacing)
+{
+        ListaRutas lista;
+        lista.push_back(path);
+        return CargarITKMultidimensional(cmd, lista, orientacion,spacing);
+}
+
+vtkSmartPointer<vtkImageData> GNC::GCS::ControladorCarga::CargarITKMultidimensionalUnsignedShort(IComando* cmd, ListaRutas& listaFicheros, int* orientacion, double* spacing)
+{
+        vtkSmartPointer<vtkImageData> img = vtkSmartPointer<vtkImageData>::New();
+        //int bitsStored, highBit, bitsAllocated,pixelRepresentation = 0;
+
+        wxCriticalSectionLocker locker(*m_pCriticalSection);
+
+        typedef double PixelType;
+        typedef itk::Image<PixelType, 3 > ImageType;
+        typedef itk::GDCMImageIO ImageIOType;
+        typedef itk::ImageSeriesReader<ImageType> GenericReaderType;
+
+        ImageIOType::Pointer              dicomIO    = ImageIOType::New();
+        GenericReaderType::Pointer        reader     = GenericReaderType::New();
+        CargaItkProgressCallback::Pointer cbProgreso = CargaItkProgressCallback::New();
+
+
+        try {
+                reader->SetImageIO(dicomIO);
+
+                if (listaFicheros.size() > 0) {
+                        std::vector<std::string> filesCopy(listaFicheros.size());
+                        GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                        std::vector<std::string>::size_type off = 0;
+                        while (it != listaFicheros.end()) {
+                                filesCopy[off++] = *(it++);
+                        }
+                        reader->SetFileNames(filesCopy);
+                } else {
+                        throw GNC::GCS::ControladorCargaException( "No input files", "ControladorCarga/CargarITKMultidimensionalUnsignedShort");
+                }
+                //reader->GetOutput()->ReleaseDataFlagOn();
+
+                cbProgreso->SetCommand(cmd);
+                cbProgreso->SetTexto(_Std("Reading properties"));
+
+                reader->AddObserver (itk::ProgressEvent(), cbProgreso);
+
+                reader->UpdateOutputInformation();
+        } catch (itk::ExceptionObject& ex) {
+                reader->ResetPipeline();
+                throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: ") + ex.GetDescription(), "ControladorCarga/CargaMultidimensional");
+        } catch (std::exception& ex) {
+                reader->ResetPipeline();
+                throw GNC::GCS::ControladorCargaException( _Std("Internal error reading the study: "), std::string("ControladorCarga/CargaMultidimensional") + ex.what());
+        } catch (...) {
+                reader->ResetPipeline();
+                throw GNC::GCS::ControladorCargaException( _Std("Internal error reading the study: "), "ControladorCarga/CargaMultidimensional");
+        }
+
+        if (orientacion != NULL) {
+
+                ImageType::Pointer im = reader->GetOutput();
+                ImageType::DirectionType dir = im->GetDirection();
+
+                /*
+                std::cout << dir[0][0] << ", " << dir[0][1] << ", " << dir[0][2] << std::endl;
+                std::cout << dir[1][0] << ", " << dir[1][1] << ", " << dir[1][2] << std::endl;
+                std::cout << dir[2][0] << ", " << dir[2][1] << ", " << dir[2][2] << std::endl;
+                */
+
+                if( std::abs( dir[0][2] ) > std::abs(dir[1][2]) && std::abs( dir[0][2]) > std::abs(dir[2][2])) {
+                        //std::cout << "SAGITAL" << std::endl;
+                        *orientacion = 0;
+                } else if( std::abs( dir[1][2] ) > std::abs(dir[0][2]) && std::abs( dir[1][2]) > std::abs(dir[2][2])) {
+                        //std::cout << "CORONAL" << std::endl;
+                        *orientacion = 1;
+                } else if( std::abs( dir[2][2] ) > std::abs(dir[0][2]) && std::abs( dir[2][2]) > std::abs(dir[1][2])) {
+                        //std::cout << "AXIAL" << std::endl;
+                        *orientacion = 2;
+                }
+        }
+
+        GenericReaderType::OutputImageType::SizeType dims = reader->GetOutput()->GetLargestPossibleRegion().GetSize();
+
+        img->SetDimensions(dims[0], dims[1], dims[2]);
+        img->SetOrigin(dicomIO->GetOrigin(0), dicomIO->GetOrigin(1), dicomIO->GetOrigin(2));
+
+        if(spacing == NULL) {
+                double chk_spacing[3] = {dicomIO->GetSpacing(0), dicomIO->GetSpacing(1), dicomIO->GetSpacing(2)};
+                if (chk_spacing[0] < std::numeric_limits<double>::epsilon() || chk_spacing[1] < std::numeric_limits<double>::epsilon()) {
+                        std::stringstream ss;
+                        ss << _Std("Spacing is not valid: (") << chk_spacing[0] << ", " << chk_spacing[1] << ", " << chk_spacing[2] << ")";
+                        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,ss.str(),GNC::GCS::Events::EventoMensajes::PopUpMessage,GNC::GCS::Events::EventoMensajes::Aviso));
+                        chk_spacing[0] = 1.0f;
+                        chk_spacing[1] = 1.0f;
+                        chk_spacing[2] = 1.0f;
+                }
+                img->SetSpacing(chk_spacing);
+        } else {
+                double chk_spacing[3] = {spacing[0], spacing[1], spacing[2]};
+                if (chk_spacing[0] < std::numeric_limits<double>::epsilon() || chk_spacing[1] < std::numeric_limits<double>::epsilon()) {
+                        std::stringstream ss;
+                        ss << _Std("Spacing is not valid: (") << chk_spacing[0] << ", " << chk_spacing[1] << ", " << chk_spacing[2] << ")";
+                        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,ss.str(),GNC::GCS::Events::EventoMensajes::PopUpMessage,GNC::GCS::Events::EventoMensajes::Aviso));
+                        chk_spacing[0] = 1.0f;
+                        chk_spacing[1] = 1.0f;
+                        chk_spacing[2] = 1.0f;
+                }
+                img->SetSpacing(chk_spacing);
+        }
+
+        itk::ProcessObject::Pointer processObject;
+        switch(dicomIO->GetComponentType()) {
+        case ImageIOType::UCHAR: {
+                typedef unsigned char TypedPixelType;
+                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+
+                try {
+                        img->AllocateScalars(VTK_UNSIGNED_CHAR, dicomIO->GetNumberOfComponents());
+                } catch (...) {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of memory"), "ControladorCarga/CargaMultidimensional");
+                }
+
+                TypedReaderType::Pointer treader = TypedReaderType::New();
+                ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+                treader->SetImageIO(tdicomIO);
+                if (listaFicheros.size() > 0) {
+                        std::vector<std::string> filesCopy(listaFicheros.size());
+                        GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                        std::vector<std::string>::size_type off = 0;
+
+                        while (it != listaFicheros.end()) {
+                                filesCopy[off++] = *(it++);
+                        }
+                        treader->SetFileNames(filesCopy);
+                }
+                treader->SetUseStreaming(true);
+                //treader->GetOutput()->ReleaseDataFlagOn();
+                treader->GetOutput()->GetPixelContainer()->SetImportPointer((TypedReaderType::OutputImageType::PixelType*)(img->GetScalarPointer()), dims[0] * dims[1] * dims[2], false );
+                processObject = treader;
+        }
+        break;
+        case ImageIOType::CHAR: {
+                typedef char TypedPixelType;
+                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+
+                try {
+                        img->AllocateScalars(VTK_CHAR, dicomIO->GetNumberOfComponents());
+                } catch (...) {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of memory"), "ControladorCarga/CargaMultidimensional");
+                }
+
+                TypedReaderType::Pointer treader = TypedReaderType::New();
+                ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+                treader->SetImageIO(tdicomIO);
+                if (listaFicheros.size() > 0) {
+                        std::vector<std::string> filesCopy(listaFicheros.size());
+                        GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                        std::vector<std::string>::size_type off = 0;
+
+                        while (it != listaFicheros.end()) {
+                                filesCopy[off++] = *(it++);
+                        }
+                        treader->SetFileNames(filesCopy);
+                }
+                treader->SetUseStreaming(true);
+                //treader->GetOutput()->ReleaseDataFlagOn();
+                treader->GetOutput()->GetPixelContainer()->SetImportPointer((TypedReaderType::OutputImageType::PixelType*)(img->GetScalarPointer()), dims[0] * dims[1] * dims[2], false );
+                processObject = treader;
+        }
+        break;
+        case ImageIOType::USHORT: {
+                typedef unsigned short TypedPixelType;
+                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+
+                try {
+                        img->AllocateScalars(VTK_UNSIGNED_SHORT, dicomIO->GetNumberOfComponents());
+                } catch(const std::bad_alloc&) {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of memory"), "ControladorCarga/CargaMultidimensional");
+                } catch (...) {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Internal Error"), "ControladorCarga/CargaMultidimensional");
+                }
+
+                TypedReaderType::Pointer treader = TypedReaderType::New();
+                ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+                treader->SetImageIO(tdicomIO);
+                if (listaFicheros.size() > 0) {
+                        std::vector<std::string> filesCopy(listaFicheros.size());
+                        GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                        std::vector<std::string>::size_type off = 0;
+
+                        while (it != listaFicheros.end()) {
+                                filesCopy[off++] = *(it++);
+                        }
+                        treader->SetFileNames(filesCopy);
+                }
+                treader->SetUseStreaming(true);
+                //treader->GetOutput()->ReleaseDataFlagOn();
+                treader->GetOutput()->GetPixelContainer()->SetImportPointer((TypedReaderType::OutputImageType::PixelType*)(img->GetScalarPointer()), dims[0] * dims[1] * dims[2], false );
+                processObject = treader;
+        }
+        break;
+        case ImageIOType::SHORT: {
+                typedef short TypedPixelType;
+                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+
+                try {
+                        img->AllocateScalars(VTK_SHORT, dicomIO->GetNumberOfComponents());
+                } catch (...) {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of memory"), "ControladorCarga/CargaMultidimensional");
+                }
+
+                TypedReaderType::Pointer treader = TypedReaderType::New();
+                ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+                treader->SetImageIO(tdicomIO);
+                if (listaFicheros.size() > 0) {
+                        std::vector<std::string> filesCopy(listaFicheros.size());
+                        GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                        std::vector<std::string>::size_type off = 0;
+
+                        while (it != listaFicheros.end()) {
+                                filesCopy[off++] = *(it++);
+                        }
+                        treader->SetFileNames(filesCopy);
+                }
+                treader->SetUseStreaming(true);
+                //treader->GetOutput()->ReleaseDataFlagOn();
+                treader->GetOutput()->GetPixelContainer()->SetImportPointer((TypedReaderType::OutputImageType::PixelType*)(img->GetScalarPointer()), dims[0] * dims[1] * dims[2], false );
+                processObject = treader;
+        }
+        break;
+        case ImageIOType::UINT: {
+                typedef unsigned int TypedPixelType;
+                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+
+
+                try {
+                        img->AllocateScalars(VTK_UNSIGNED_INT, dicomIO->GetNumberOfComponents());
+                } catch (...) {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of memory"), "ControladorCarga/CargaMultidimensional");
+                }
+
+                TypedReaderType::Pointer treader = TypedReaderType::New();
+                ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+                treader->SetImageIO(tdicomIO);
+                if (listaFicheros.size() > 0) {
+                        std::vector<std::string> filesCopy(listaFicheros.size());
+                        GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                        std::vector<std::string>::size_type off = 0;
+
+                        while (it != listaFicheros.end()) {
+                                filesCopy[off++] = *(it++);
+                        }
+                        treader->SetFileNames(filesCopy);
+                }
+                treader->SetUseStreaming(true);
+                //treader->GetOutput()->ReleaseDataFlagOn();
+                treader->GetOutput()->GetPixelContainer()->SetImportPointer((TypedReaderType::OutputImageType::PixelType*)(img->GetScalarPointer()), dims[0] * dims[1] * dims[2], false );
+                processObject = treader;
+        }
+        break;
+        case ImageIOType::INT: {
+                typedef int TypedPixelType;
+                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+
+
+                try {
+                        img->AllocateScalars(VTK_INT, dicomIO->GetNumberOfComponents());
+                } catch (...) {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of memory"), "ControladorCarga/CargaMultidimensional");
+                }
+
+                TypedReaderType::Pointer treader = TypedReaderType::New();
+                ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+                treader->SetImageIO(tdicomIO);
+                if (listaFicheros.size() > 0) {
+                        std::vector<std::string> filesCopy(listaFicheros.size());
+                        GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                        std::vector<std::string>::size_type off = 0;
+
+                        while (it != listaFicheros.end()) {
+                                filesCopy[off++] = *(it++);
+                        }
+                        treader->SetFileNames(filesCopy);
+                }
+                treader->SetUseStreaming(true);
+                //treader->GetOutput()->ReleaseDataFlagOn();
+                treader->GetOutput()->GetPixelContainer()->SetImportPointer((TypedReaderType::OutputImageType::PixelType*)(img->GetScalarPointer()), dims[0] * dims[1] * dims[2], false );
+                processObject = treader;
+        }
+        break;
+        case ImageIOType::ULONG: {
+                typedef unsigned long TypedPixelType;
+                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+
+
+                try {
+                        img->AllocateScalars(VTK_UNSIGNED_LONG, dicomIO->GetNumberOfComponents());
+                } catch (...) {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of memory"), "ControladorCarga/CargaMultidimensional");
+                }
+
+                TypedReaderType::Pointer treader = TypedReaderType::New();
+                ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+                treader->SetImageIO(tdicomIO);
+                if (listaFicheros.size() > 0) {
+                        std::vector<std::string> filesCopy(listaFicheros.size());
+                        GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                        std::vector<std::string>::size_type off = 0;
+
+                        while (it != listaFicheros.end()) {
+                                filesCopy[off++] = *(it++);
+                        }
+                        treader->SetFileNames(filesCopy);
+                }
+                treader->SetUseStreaming(true);
+                //treader->GetOutput()->ReleaseDataFlagOn();
+                treader->GetOutput()->GetPixelContainer()->SetImportPointer((TypedReaderType::OutputImageType::PixelType*)(img->GetScalarPointer()), dims[0] * dims[1] * dims[2], false );
+                processObject = treader;
+        }
+        break;
+        case ImageIOType::LONG: {
+                typedef long TypedPixelType;
+                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+
+                try {
+                        img->AllocateScalars(VTK_LONG, dicomIO->GetNumberOfComponents());
+                } catch (...) {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of memory"), "ControladorCarga/CargaMultidimensional");
+                }
+
+                TypedReaderType::Pointer treader = TypedReaderType::New();
+                ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+                treader->SetImageIO(tdicomIO);
+                if (listaFicheros.size() > 0) {
+                        std::vector<std::string> filesCopy(listaFicheros.size());
+                        GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                        std::vector<std::string>::size_type off = 0;
+
+                        while (it != listaFicheros.end()) {
+                                filesCopy[off++] = *(it++);
+                        }
+                        treader->SetFileNames(filesCopy);
+                }
+                treader->SetUseStreaming(true);
+                //treader->GetOutput()->ReleaseDataFlagOn();
+                treader->GetOutput()->GetPixelContainer()->SetImportPointer((TypedReaderType::OutputImageType::PixelType*)(img->GetScalarPointer()), dims[0] * dims[1] * dims[2], false );
+                processObject = treader;
+        }
+        break;
+        case ImageIOType::FLOAT: {
+                typedef float TypedPixelType;
+                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+
+                try {
+                        img->AllocateScalars(VTK_FLOAT, dicomIO->GetNumberOfComponents());
+                } catch (...) {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of memory"), "ControladorCarga/CargaMultidimensional");
+                }
+
+                TypedReaderType::Pointer treader = TypedReaderType::New();
+                ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+                treader->SetImageIO(tdicomIO);
+                if (listaFicheros.size() > 0) {
+                        std::vector<std::string> filesCopy(listaFicheros.size());
+                        GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                        std::vector<std::string>::size_type off = 0;
+
+                        while (it != listaFicheros.end()) {
+                                filesCopy[off++] = *(it++);
+                        }
+                        treader->SetFileNames(filesCopy);
+                }
+                treader->SetUseStreaming(true);
+                //treader->GetOutput()->ReleaseDataFlagOn();
+                treader->GetOutput()->GetPixelContainer()->SetImportPointer((TypedReaderType::OutputImageType::PixelType*)(img->GetScalarPointer()), dims[0] * dims[1] * dims[2], false );
+                processObject = treader;
+        }
+        break;
+        case ImageIOType::DOUBLE: {
+                typedef double TypedPixelType;
+                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+
+                try {
+                        img->AllocateScalars(VTK_DOUBLE, dicomIO->GetNumberOfComponents());
+                } catch (...) {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of memory"), "ControladorCarga/CargaMultidimensional");
+                }
+
+                TypedReaderType::Pointer treader = TypedReaderType::New();
+                ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+                treader->SetImageIO(tdicomIO);
+                if (listaFicheros.size() > 0) {
+                        std::vector<std::string> filesCopy(listaFicheros.size());
+                        GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                        std::vector<std::string>::size_type off = 0;
+
+                        while (it != listaFicheros.end()) {
+                                filesCopy[off++] = *(it++);
+                        }
+                        treader->SetFileNames(filesCopy);
+                }
+                treader->SetUseStreaming(true);
+                //treader->GetOutput()->ReleaseDataFlagOn();
+                treader->GetOutput()->GetPixelContainer()->SetImportPointer((TypedReaderType::OutputImageType::PixelType*)(img->GetScalarPointer()), dims[0] * dims[1] * dims[2], false );
+                processObject = treader;
+        }
+        break;
+        case ImageIOType::UNKNOWNCOMPONENTTYPE:
+        default:
+                throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: unsupported pixel format"), "ControladorCarga/CargaMultidimensional");
+        }
+
+        cbProgreso->SetTexto("Leyendo dataset");
+        processObject->AddObserver (itk::ProgressEvent(), cbProgreso);
+
+        try {
+                processObject->UpdateLargestPossibleRegion();
+        } catch (itk::ExceptionObject& ex) {
+                reader->ResetPipeline();
+                throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: ") + ex.GetDescription(), "ControladorCarga/CargaMultidimensional");
+        } catch (...) {
+                reader->ResetPipeline();
+                throw GNC::GCS::ControladorCargaException( _Std("Internal error reading the study: "), "ControladorCarga/CargaMultidimensional");
+        }
+        if (processObject->GetAbortGenerateData()) {
+                reader->ResetPipeline();
+                throw GNC::GCS::ControladorCargaException( _Std("Process canceled by user."), "ControladorCarga/CargaMultidimensional");
+        }
+
+
+        //se modifica si es necesario
+        /*
+        {
+        	typedef itk::MetaDataObject< std::string > MetaDataStringType;
+        	for (itk::MetaDataDictionary::ConstIterator it = dicomIO->GetMetaDataDictionary().Begin(); it != dicomIO->GetMetaDataDictionary().End(); ++it) {
+        		itk::MetaDataObjectBase::Pointer entry = it->second;
+        		MetaDataStringType::Pointer entryvalue = dynamic_cast<MetaDataStringType *> (entry.GetPointer());
+        		if(it->first == "0028|0100") { //bits allocated
+        			std::istringstream is(entryvalue->GetMetaDataObjectValue());
+        			is >>bitsAllocated;
+        		} else if(it->first == "0028|0101") { //bits stored
+        			std::istringstream is(entryvalue->GetMetaDataObjectValue());
+        			is >>bitsStored;
+        		} else if(it->first == "0028|0102") {//high bit
+        			std::istringstream is(entryvalue->GetMetaDataObjectValue());
+        			is >>highBit;
+        		}	else if(it->first == "0028|0103") {//pixel representation=> 0 es unsigned 1 es signed
+        			std::istringstream is(entryvalue->GetMetaDataObjectValue());
+        			is >>pixelRepresentation;
+        		}
+        	}
+        	if(bitsAllocated != bitsStored)
+        	{
+        		switch(dicomIO->GetComponentType()) {
+        			case ImageIOType::UCHAR:
+        				pixelRepresentation = 0;
+        				//a partir de aqui se trata el pixelrepresentation
+        			case ImageIOType::CHAR:
+        				{
+        					unsigned char* data = (unsigned char*) img->GetScalarPointer();
+        					unsigned char desplazamientoSigno;
+        					desplazamientoSigno = highBit;
+        					unsigned char maskComprobarSigno = 1;
+        					maskComprobarSigno <<= desplazamientoSigno;
+
+        					unsigned char maskClearParteAltaPositivo = 0;
+        					//se meten unos en la parte baja
+        					if(pixelRepresentation == 0) {
+        						for(int i = 0; i<= desplazamientoSigno; ++i)
+        						{
+        							maskClearParteAltaPositivo <<=1;
+        							maskClearParteAltaPositivo |=1;
+        						}
+        					} else {
+        						for(int i = 0; i< desplazamientoSigno; ++i)
+        						{
+        							maskClearParteAltaPositivo <<=1;
+        							maskClearParteAltaPositivo |=1;
+        						}
+        					}
+        					//se meten unos en la parte alta
+        					unsigned char maskSetParteAltaNegativo = 0x80;
+        					if(pixelRepresentation != 0) {
+        						for(int i=0; i< 8-desplazamientoSigno; ++i)
+        						{
+        							maskSetParteAltaNegativo >>=1;
+        							maskSetParteAltaNegativo |=0x80;
+        						}
+        					}
+
+        					int size = dims[0] * dims[1] * dims[2];
+        					if(pixelRepresentation == 0) {
+        						if(maskClearParteAltaPositivo != 0xFF) { // si es ff no tiene sentido hacer nada
+        							int size = dims[0] * dims[1] * dims[2] * 2;
+        							for(int i= 0; i< size; i+=2)
+        							{
+        								//es positivo
+        								data[i] &= maskClearParteAltaPositivo;
+        							}
+        						}
+        					} else {
+        						for(int i= 0; i< size; ++i)
+        						{
+        							if((data[i] & maskComprobarSigno) == 0)
+        							{
+        								//es positivo
+        								data[i] &= maskClearParteAltaPositivo;
+        							} else {
+        								//es negativo => aplicar el complemento a dos...
+        								data[i] |= maskSetParteAltaNegativo;
+        							}
+        						}
+        					}
+        				}
+        				break;
+        			case ImageIOType::USHORT:
+        				pixelRepresentation = 0;
+        				//a partir de aqui se trata el pixelrepresentation
+        			case ImageIOType::SHORT:
+        				{
+        					unsigned char* data = (unsigned char*) img->GetScalarPointer();
+        					unsigned char posicionInicial;
+        					unsigned char desplazamientoSigno;
+        					if(highBit>=8) { //little endian
+        						desplazamientoSigno = highBit - 8 ;
+        						posicionInicial = 1;
+        					} else { //bigEndian
+        						desplazamientoSigno = highBit;
+        						posicionInicial = 0;
+        					}
+        					unsigned char maskComprobarSigno = 1;
+        					maskComprobarSigno <<= desplazamientoSigno;
+
+        					unsigned char maskClearParteAltaPositivo = 0;
+        					//se meten unos en la parte baja
+        					if(pixelRepresentation == 0) {
+        						for(int i = 0; i<= desplazamientoSigno; ++i)
+        						{
+        							maskClearParteAltaPositivo <<=1;
+        							maskClearParteAltaPositivo |=1;
+        						}
+        					} else {
+        						for(int i = 0; i< desplazamientoSigno; ++i)
+        						{
+        							maskClearParteAltaPositivo <<=1;
+        							maskClearParteAltaPositivo |=1;
+        						}
+        					}
+        					//se meten unos en la parte alta
+        					unsigned char maskSetParteAltaNegativo = 0x80;
+        					if(pixelRepresentation != 0) {
+        						for(int i=0; i< 8-desplazamientoSigno; ++i)
+        						{
+        							maskSetParteAltaNegativo >>=1;
+        							maskSetParteAltaNegativo |=0x80;
+        						}
+        					}
+
+        					int size = dims[0] * dims[1] * dims[2] * 2;
+
+        					if(pixelRepresentation == 0) {
+        						if(maskClearParteAltaPositivo != 0xFF) { // si es ff no tiene sentido hacer nada
+        							int size = dims[0] * dims[1] * dims[2] * 2;
+        							for(int i= posicionInicial; i< size; i+=2)
+        							{
+        								//es positivo
+        								data[i] &= maskClearParteAltaPositivo;
+        							}
+        						}
+        					} else {
+        						for(int i= posicionInicial; i< size; i+=2)
+        						{
+        							if((data[i] & maskComprobarSigno) == 0)
+        							{
+        								//es positivo
+        								data[i] &= maskClearParteAltaPositivo;
+        							} else {
+        								//es negativo => aplicar el complemento a dos...
+        								data[i] |= maskSetParteAltaNegativo;
+        							}
+        						}
+        					}
+        				}
+        				break;
+        			case ImageIOType::UINT:
+        				{
+        					//d momento no hago na
+        				}
+        				break;
+        			case ImageIOType::INT:
+        				{
+        					//d momento no hago na
+        				}
+        				break;
+        			case ImageIOType::ULONG:
+        				{
+        					//d momento no hago na
+        				}
+        				break;
+        			case ImageIOType::LONG:
+        				{
+        					//d momento no hago na
+        				}
+        				break;
+        			case ImageIOType::FLOAT:
+        			case ImageIOType::DOUBLE:
+        				break;
+        			case ImageIOType::UNKNOWNCOMPONENTTYPE:
+        			default:
+        				throw GNC::GCS::ControladorCargaException( std::string("Error reading the study: Formato de pixel no soportado"), "ControladorCarga/CargaMultidimensional");
+        		}
+        	}
+        }*/
+
+
+
+        return img;
+}
+
+vtkSmartPointer<vtkImageData> GNC::GCS::ControladorCarga::CargarITKMultidimensionalRGB(IComando* cmd, ListaRutas& listaFicheros, double* spacing)
+{
+
+        vtkSmartPointer<vtkImageData> img = vtkSmartPointer<vtkImageData>::New();
+
+        wxCriticalSectionLocker locker(*m_pCriticalSection);
+
+        typedef itk::RGBPixel<unsigned char> PixelType;
+        typedef itk::Image<PixelType, 3 > ImageType;
+        typedef itk::GDCMImageIO ImageIOType;
+        typedef itk::ImageSeriesReader<ImageType> GenericReaderType;
+
+        ImageIOType::Pointer              dicomIO    = ImageIOType::New();
+        GenericReaderType::Pointer        reader     = GenericReaderType::New();
+        CargaItkProgressCallback::Pointer cbProgreso = CargaItkProgressCallback::New();
+
+        reader->SetImageIO(dicomIO);
+
+        if (listaFicheros.size() > 0) {
+                std::vector<std::string> filesCopy(listaFicheros.size());
+                GNC::GCS::IControladorCarga::ListaRutas::iterator it = listaFicheros.begin();
+                std::vector<std::string>::size_type off = 0;
+
+                while (it != listaFicheros.end()) {
+                        filesCopy[off++] = *(it++);
+                }
+                reader->SetFileNames(filesCopy);
+        } else {
+                throw GNC::GCS::ControladorCargaException( "No input files", "ControladorCarga/CargaMultidimensionalRGB");
+        }
+        reader->SetUseStreaming(true);
+        //reader->GetOutput()->ReleaseDataFlagOn();
+
+        cbProgreso->SetCommand(cmd);
+        cbProgreso->SetTexto(_Std("Interpreting properties"));
+
+        reader->AddObserver (itk::ProgressEvent(), cbProgreso);
+
+        try {
+                reader->UpdateOutputInformation();
+        } catch (itk::ExceptionObject& ex) {
+                reader->ResetPipeline();
+                throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: ") + ex.GetDescription(), "ControladorCarga/CargaMultidimensionalRGB");
+        } catch (...) {
+                reader->ResetPipeline();
+                throw GNC::GCS::ControladorCargaException( _Std("Internal error reading the study: "), "ControladorCarga/CargaMultidimensionalRGB");
+        }
+
+        GenericReaderType::OutputImageType::SizeType dims = reader->GetOutput()->GetLargestPossibleRegion().GetSize();
+
+        img->SetDimensions(dims[0], dims[1], dims[2]);
+        img->SetOrigin(dicomIO->GetOrigin(0), dicomIO->GetOrigin(1), dicomIO->GetOrigin(2));
+
+        if(spacing == NULL) {
+                double chk_spacing[3] = {dicomIO->GetSpacing(0), dicomIO->GetSpacing(1), dicomIO->GetSpacing(2)};
+                if (chk_spacing[0] < std::numeric_limits<double>::epsilon() || chk_spacing[1] < std::numeric_limits<double>::epsilon()) {
+                        std::stringstream ss;
+                        ss << _Std("Spacing is not valid: (") << chk_spacing[0] << ", " << chk_spacing[1] << ", " << chk_spacing[2] << ")";
+                        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,ss.str(),GNC::GCS::Events::EventoMensajes::PopUpMessage,GNC::GCS::Events::EventoMensajes::Aviso));
+                        chk_spacing[0] = 1.0f;
+                        chk_spacing[1] = 1.0f;
+                        chk_spacing[2] = 1.0f;
+                }
+                img->SetSpacing(chk_spacing);
+        } else {
+                double chk_spacing[3] = {spacing[0], spacing[1], spacing[2]};
+                if (chk_spacing[0] < std::numeric_limits<double>::epsilon() || chk_spacing[1] < std::numeric_limits<double>::epsilon()) {
+                        std::stringstream ss;
+                        ss << _Std("Spacing of the image is invalid: (") << chk_spacing[0] << ", " << chk_spacing[1] << ", " << chk_spacing[2] << ")";
+                        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,ss.str(),GNC::GCS::Events::EventoMensajes::PopUpMessage,GNC::GCS::Events::EventoMensajes::Aviso));
+                        chk_spacing[0] = 1.0f;
+                        chk_spacing[1] = 1.0f;
+                        chk_spacing[2] = 1.0f;
+                }
+                img->SetSpacing(chk_spacing);
+        }
+
+        //std::cout << "number of scalar components" << dicomIO->GetNumberOfComponents();
+
+        try {
+                img->AllocateScalars(VTK_UNSIGNED_CHAR, dicomIO->GetNumberOfComponents());
+        } catch (...) {
+                throw GNC::GCS::ControladorCargaException( _Std("Error loading the study: Out of memory"), "ControladorCarga/CargaMultidimensionalRGB");
+        }
+
+        reader->SetUseStreaming(true);
+        //reader->GetOutput()->ReleaseDataFlagOn();
+        reader->GetOutput()->GetPixelContainer()->SetImportPointer((GenericReaderType::OutputImageType::PixelType*)(img->GetScalarPointer()), dims[0] * dims[1] * dims[2], false );
+
+        cbProgreso->SetTexto(_Std("Reading dataset"));
+        reader->AddObserver (itk::ProgressEvent(), cbProgreso);
+
+        try {
+                reader->UpdateLargestPossibleRegion();
+        } catch (itk::ExceptionObject& ex) {
+                reader->ResetPipeline();
+                throw GNC::GCS::ControladorCargaException( _Std("Error reading the study:") + ex.GetDescription(), "ControladorCarga/CargaMultidimensionalRGB");
+        } catch (...) {
+                reader->ResetPipeline();
+                throw GNC::GCS::ControladorCargaException( _Std("Internal error while reading the study:"), "ControladorCarga/CargaMultidimensionalRGB");
+        }
+        if (reader->GetAbortGenerateData()) {
+                reader->ResetPipeline();
+                throw GNC::GCS::ControladorCargaException( _Std("Process canceled by user."), "ControladorCarga/CargaMultidimensional");
+        }
+
+        return img;
+
+}
+
+void GNC::GCS::ControladorCarga::CargaAsincrona(GNC::GCS::IVista* pVista, bool loadFirst)
+{
+        wxCriticalSectionLocker locker(*m_pCriticalSection);
+        GNC::GCS::ControladorVistas::Instance()->SolicitarActivarVista(pVista);
+        GADAPI::ComandoCarga* pCmd = new GADAPI::ComandoCarga(new GADAPI::ComandoCargaParams(pVista, loadFirst));
+        GNC::Entorno::Instance()->GetCommandController()->ProcessAsync(_Std("load"), pCmd, pVista);
+}
+
+GNC::GCS::ControladorCarga * GNC::GCS::ControladorCarga::Instance()
+{
+        if (m_pCriticalSection == NULL) {
+                m_pCriticalSection = new wxCriticalSection();
+        }
+
+        wxCriticalSectionLocker locker(*m_pCriticalSection);
+
+        if (m_psInstancia == NULL) {
+                m_psInstancia = new ControladorCarga();
+        }
+        return m_psInstancia;
+}
+
+void GNC::GCS::ControladorCarga::FreeInstance()
+{
+        wxCriticalSectionLocker* pLocker = NULL;
+        if (m_pCriticalSection != NULL) {
+                pLocker = new wxCriticalSectionLocker(*m_pCriticalSection);
+        }
+        if (m_psInstancia != NULL) {
+                delete m_psInstancia;
+                m_psInstancia = NULL;
+        }
+        if (m_pCriticalSection != NULL) {
+                if (pLocker != NULL) {
+                        delete pLocker;
+                        pLocker = NULL;
+                }
+                delete m_pCriticalSection;
+                m_pCriticalSection = NULL;
+        }
+        if (pLocker != NULL) {
+                delete pLocker;
+        }
+}
+
+GNC::GCS::ControladorCarga::ControladorCarga()
+{
+}
+
+GNC::GCS::ControladorCarga::~ControladorCarga()
+{
+}
+
+//region Creacion y destruccion de componente de carga en streaming
+GNC::GCS::IStreamingLoader* GNC::GCS::ControladorCarga::NewLoader()
+{
+        return new GNC::StreamingLoader();
+}
+
+void GNC::GCS::ControladorCarga::FreeLoader(GNC::GCS::IStreamingLoader** loader)
+{
+        if (loader != NULL && *loader != NULL) {
+                delete *loader;
+                *loader = NULL;
+        }
+
+}
+//endregion
+
diff --git a/cadxcore/main/controllers/controladorcarga.h b/cadxcore/main/controllers/controladorcarga.h
new file mode 100644
index 0000000..4882327
--- /dev/null
+++ b/cadxcore/main/controllers/controladorcarga.h
@@ -0,0 +1,57 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/controllers/icontroladorcarga.h>
+
+class wxCriticalSection;
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI ControladorCarga : public IControladorCarga
+{
+public:
+        virtual vtkSmartPointer<vtkImageData> CargarITKMultidimensional(IComando* cmd, ListaRutas& listaFicheros, int* orientacion, double* spacing = NULL);
+        virtual vtkSmartPointer<vtkImageData> CargarITK(IComando* cmd, std::string& path, int* orientacion, double* spacing = NULL);
+
+        virtual void CargaAsincrona(GNC::GCS::IVista* pVista, const bool loadFirst = true);
+
+        static ControladorCarga *Instance();
+        static void FreeInstance();
+
+        //region Creacion y destruccion de componente de carga en streaming
+        virtual GNC::GCS::IStreamingLoader* NewLoader();
+        virtual void FreeLoader(GNC::GCS::IStreamingLoader** loader);
+        //endregion
+
+protected:
+        vtkSmartPointer<vtkImageData> CargarITKMultidimensionalRGB(IComando* cmd, ListaRutas& listaFicheros, double* spacing = NULL);
+        vtkSmartPointer<vtkImageData> CargarITKMultidimensionalUnsignedShort(IComando* cmd, ListaRutas& listaFicheros, int* orientacion,double* spacing = NULL);
+
+        ControladorCarga();
+        virtual ~ControladorCarga();
+        static ControladorCarga* m_psInstancia;
+        static wxCriticalSection* m_pCriticalSection;
+};
+}
+}
diff --git a/cadxcore/main/controllers/controladorenviohl7.cpp b/cadxcore/main/controllers/controladorenviohl7.cpp
new file mode 100644
index 0000000..6486344
--- /dev/null
+++ b/cadxcore/main/controllers/controladorenviohl7.cpp
@@ -0,0 +1,176 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#define LOGGER "ControladorEnvioHl7"
+#include <api/internationalization/internationalization.h>
+#include <endpoint/endpoint.h>
+#include "controladorenviohl7.h"
+#include "controladorbbddhl7.h"
+#include <main/controllers/commandcontroller.h>
+#include <api/controllers/icontroladorlog.h>
+#include "controladoreventos.h"
+#include "configurationcontroller.h"
+#include <api/globals.h>
+#include <api/threads/thread.h>
+#include <api/icommand.h>
+#include <api/imodelohl7.h>
+#include <eventos/progresocomando.h>
+
+#include "../entorno.h"
+#include <commands/sendhl7command.h>
+
+
+
+void GIL::HL7::ControladorEnvioHl7::FreeInstance()
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        if(m_pInstance != NULL) {
+                LOG_DEBUG("Core/HL7", _Std("Stopping HL7 sender"))
+                //if(!m_pInstance->EstaAbortado()) {
+                m_pInstance->Abortar();
+                m_pInstance->Wait();
+                delete m_pInstance;
+                m_pInstance = NULL;
+                //}
+        }
+}
+
+void GIL::HL7::ControladorEnvioHl7::Arrancar()
+{
+        bool boolValue;
+        GNC::GCS::ConfigurationController::Instance()->readBoolGeneral("/GinkgoCore/HCE", "HL7MonitorEnabled", boolValue, true);
+
+        if (boolValue) {
+                wxCriticalSectionLocker locker(m_criticalSection);
+                if (m_pInstance == NULL) {
+                        m_pInstance = new GIL::HL7::ControladorEnvioHl7();
+                        m_pInstance->Create();
+                        GNC::GCS::Threading::SetThreadName( m_pInstance->GetId(), "EnvioHL7");
+                        wxThreadError error = m_pInstance->Run();
+                        if(error != wxTHREAD_NO_ERROR) {
+                                LOG_ERROR("Core/HL7", _Std("Error starting HL7 sender") << ": " << error )
+                        } else {
+                                LOG_INFO("Core/HL7", _Std("HL7 sender started"))
+                        }
+                } else {
+                        if(!m_pInstance->IsRunning()) {
+                                m_pInstance->Abortar();
+                                m_pInstance->Wait();
+                                delete m_pInstance;
+                                m_pInstance = new GIL::HL7::ControladorEnvioHl7();
+                                m_pInstance->Create();
+                                wxThreadError error = m_pInstance->Run();
+                                if(error != wxTHREAD_NO_ERROR) {
+                                        LOG_ERROR("Core/HL7", _Std("Error starting HL7 sender") << ": " << error )
+                                } else {
+                                        LOG_INFO("Core/HL7", _Std("HL7 sender started"))
+                                }
+                        }
+                }
+        }
+}
+
+bool GIL::HL7::ControladorEnvioHl7::EstaArrancado()
+{
+        wxCriticalSectionLocker locker(m_criticalSection);
+        if(m_pInstance == NULL) {
+                return false;
+        } else {
+                return m_pInstance->IsRunning();
+        }
+}
+
+GIL::HL7::ControladorEnvioHl7* GIL::HL7::ControladorEnvioHl7::m_pInstance = NULL;
+wxCriticalSection GIL::HL7::ControladorEnvioHl7::m_criticalSection;
+
+//proceso que envia mensajes
+GIL::HL7::ControladorEnvioHl7::ControladorEnvioHl7() : wxThread(wxTHREAD_JOINABLE)
+{
+        GNC::GCS::Events::EventoProgresoComando evt;
+        GNC::GCS::ControladorEventos::Instance()->Registrar(this,evt);
+        m_Abortado = false;
+}
+
+GIL::HL7::ControladorEnvioHl7::~ControladorEnvioHl7()
+{
+        LOG_DEBUG("Core/HL7", _Std("HL7 controller destroyed"))
+}
+
+void GIL::HL7::ControladorEnvioHl7::Abortar()
+{
+        m_Abortado = true;
+        GNC::GCS::ICommandController::Instance()->AbortarComandosDeOwner(this);
+        m_semaphore.Post();
+        m_semaphore.Post();
+}
+
+bool GIL::HL7::ControladorEnvioHl7::EstaAbortado()
+{
+        return m_Abortado;
+}
+
+void* GIL::HL7::ControladorEnvioHl7::Entry()
+{
+        m_Abortado = false;
+
+        GNC::GCS::Threading::SetThreadName( GetId(), "HL7 Sender");
+
+        while(!TestDestroy() && !m_Abortado) {
+                if(TestDestroy() || m_Abortado) {
+                        break;
+                }
+                try {
+                        //esperamos a que arranque todo correctamente
+                        m_semaphore.WaitTimeout(5000);
+                        TListaMensajes listaMensajes;
+
+                        GIL::HL7::ControladorBBDDHl7::Instance()->GetMensajesHL7(listaMensajes,true);
+
+                        if (!TestDestroy() && !m_Abortado && listaMensajes.size() > 0) {
+                                //launch command...
+                                GADAPI::SendHL7CommandParams* pParams = new GADAPI::SendHL7CommandParams(listaMensajes);
+                                GADAPI::SendHL7Command* pCmd = new GADAPI::SendHL7Command(pParams);
+                                GNC::GCS::ICommandController::Instance()->ProcessAsync("Send HL7", pCmd, this);
+                                m_semaphore.Wait();
+                        }
+                } catch (HL7Exception& ex) {
+                        LOG_ERROR("Core/HL7", _Std("Error processing message") << ": " << ex.str())
+                }
+        }
+        return NULL;
+}
+
+void GIL::HL7::ControladorEnvioHl7::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        GNC::GCS::Events::EventoProgresoComando* pEvt = dynamic_cast<GNC::GCS::Events::EventoProgresoComando*> (evt);
+
+        if (pEvt == NULL  || pEvt->GetComando() == NULL) {
+                return;
+        }
+
+        if (pEvt->GetTipo() == GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado) {
+                GADAPI::SendHL7Command* pCmdSend = dynamic_cast< GADAPI::SendHL7Command * > (pEvt->GetComando());
+                if (pCmdSend != NULL) {
+                        m_semaphore.Post();
+                }
+        }
+}
+
diff --git a/cadxcore/main/controllers/controladorenviohl7.h b/cadxcore/main/controllers/controladorenviohl7.h
new file mode 100644
index 0000000..e95fcf7
--- /dev/null
+++ b/cadxcore/main/controllers/controladorenviohl7.h
@@ -0,0 +1,57 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/observers/ieventsobserver.h>
+#include <wx/thread.h>
+#include <atomic>
+
+class wxSQLite3Database;
+class wxCriticalSection;
+
+namespace GIL
+{
+namespace HL7
+{
+class EXTAPI ControladorEnvioHl7:  protected wxThread, public GNC::GCS::IEventsObserver
+{
+public:
+        static void FreeInstance();
+        static void Arrancar();
+        static bool EstaArrancado();
+        void Abortar();
+        bool EstaAbortado();
+
+protected:
+        static ControladorEnvioHl7* m_pInstance;
+        static wxCriticalSection m_criticalSection;
+
+        ControladorEnvioHl7();
+        ~ControladorEnvioHl7();
+
+        virtual void* Entry();
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt) ;
+        wxSemaphore		m_semaphore;
+        std::atomic<bool> m_Abortado;
+};
+}
+}
diff --git a/cadxcore/main/controllers/controladoreventos.cpp b/cadxcore/main/controllers/controladoreventos.cpp
new file mode 100644
index 0000000..96e7da1
--- /dev/null
+++ b/cadxcore/main/controllers/controladoreventos.cpp
@@ -0,0 +1,315 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "controladoreventos.h"
+#include <api/ientorno.h>
+#include <api/ievento.h>
+#include <api/iexception.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/observers/ieventsobserver.h>
+#include <api/internationalization/internationalization.h>
+#include "inactivitycontroller.h"
+
+namespace GNC
+{
+namespace GCS
+{
+
+ControladorEventos * ControladorEventos::m_psInstancia = NULL;
+
+ControladorEventos::ControladorEventos()
+{
+        GTRACE("ControladorEventos::ControladorEventos()");
+}
+
+ControladorEventos::~ControladorEventos()
+{
+        //se vacia el mapa de vistas
+        for(TipoMapaVistas::iterator itVistas = m_mapaVistas.begin(); itVistas != m_mapaVistas.end(); ++itVistas) {
+                for(TipoMapaAmbito::iterator itAmbito =  (*itVistas).second.begin(); itAmbito != (*itVistas).second.end(); ++ itAmbito) {
+                        for(TipoMapaCodigos::iterator itCodigos = (*itAmbito).second.begin(); itCodigos != (*itAmbito).second.end(); ++itCodigos) {
+                                for(TipoListaObservadores::iterator itObservadores = (*itCodigos).second.begin(); itObservadores != (*itCodigos).second.end(); ++itObservadores) {
+                                        (*itObservadores) = NULL;
+                                }
+                                (*itCodigos).second.clear();
+                        }
+                        (*itAmbito).second.clear();
+                }
+                (*itVistas).second.clear();
+        }
+        m_mapaVistas.clear();
+
+        //se vacia el mapa de eventos
+        for(TipoMapaEventos::iterator it = m_mapaEventos.begin(); it!= m_mapaEventos.end(); ++it) {
+                (*it).second.clear();
+        }
+        m_mapaEventos.clear();
+}
+
+
+//se apunta a escuchar un evento
+void ControladorEventos::Registrar ( GNC::GCS::IEventsObserver* pObservador, const GNC::GCS::Events::IEvent& evento)
+{
+        wxCriticalSectionLocker pLocker(m_eventosCriticalSection);
+
+        //se mete en el mapa observadores->eventos
+        {
+                TipoMapaEventos::iterator itEventos = m_mapaEventos.find(pObservador);
+                if(itEventos == m_mapaEventos.end()) {
+                        TipoListaEventos lista;
+                        m_mapaEventos[pObservador] = lista;
+                        itEventos = m_mapaEventos.find(pObservador);
+                }
+                //se busca si ya esta el evento
+                for (TipoListaEventos::iterator it = (*itEventos).second.begin(); it != (*itEventos).second.end(); ++it) {
+                        if((*it).IsEqual(evento)) {
+                                LOG_WARN("ControladorEventos", "Se está intentando registrar dos veces al mismo evento");
+                                return;
+                        }
+                }
+                (*itEventos).second.push_back(evento);
+        }
+
+        //se mete en el mapa vistas->eventos
+        {
+                TipoMapaVistas::iterator itVistas;
+                TipoMapaAmbito::iterator itAmbito;
+                TipoMapaCodigos::iterator itCodigos;
+
+                //se busca la entrada en el mapa de vistas
+                itVistas= m_mapaVistas.find(evento.GetVista());
+                if(itVistas == m_mapaVistas.end()) {
+                        TipoMapaAmbito mapa;
+                        m_mapaVistas[evento.GetVista()] = mapa;
+                        itVistas = m_mapaVistas.find(evento.GetVista());
+                }
+                //se busca la entrada en el mapa de ambitos
+                itAmbito = (*itVistas).second.find(evento.GetCodigoAmbito());
+                if(itAmbito == (*itVistas).second.end()) {
+                        TipoMapaCodigos mapa;
+                        (*itVistas).second[evento.GetCodigoAmbito()] = mapa;
+                        itAmbito = (*itVistas).second.find(evento.GetCodigoAmbito());
+                }
+
+                itCodigos = (*itAmbito).second.find(evento.GetCodigoEvento());
+                if(itCodigos == (*itAmbito).second.end()) {
+                        TipoListaObservadores lista;
+                        (*itAmbito).second[evento.GetCodigoEvento()] = lista;
+                        itCodigos = (*itAmbito).second.find(evento.GetCodigoEvento());
+                }
+
+                (*itCodigos).second.push_back(pObservador);
+        }
+
+        //pObservador->OnRegistrar(this);
+}
+
+//se desapunta de escuchar un evento
+void ControladorEventos::DesRegistrar (GNC::GCS::IEventsObserver* pObservador, const GNC::GCS::Events::IEvent& evento)
+{
+        wxCriticalSectionLocker* pLocker = new wxCriticalSectionLocker(m_eventosCriticalSection);
+
+        TipoMapaVistas::iterator itVistas;
+        TipoMapaAmbito::iterator itAmbito;
+        TipoMapaCodigos::iterator itCodigos;
+
+        //se busca la entrada en el mapa de vistas
+        itVistas= m_mapaVistas.find(evento.GetVista());
+        if(itVistas != m_mapaVistas.end()) {
+                //se busca la entrada en el mapa de ambitos
+                itAmbito = (*itVistas).second.find(evento.GetCodigoAmbito());
+                if(itAmbito != (*itVistas).second.end()) {
+                        //se busca en el mapa de codigos
+                        itCodigos = (*itAmbito).second.find(evento.GetCodigoEvento());
+                        if(itCodigos != (*itAmbito).second.end()) {
+                                (*itCodigos).second.remove(pObservador);
+                                //se purgan los mapas
+                                if((*itCodigos).second.size() == 0) {
+                                        // FIXME: Race condition
+                                        (*itAmbito).second.erase(itCodigos);
+                                        if((*itAmbito).second.size() == 0) {
+                                                (*itVistas).second.erase(itAmbito);
+                                                if((*itVistas).second.size() == 0) {
+                                                        m_mapaVistas.erase(itVistas);
+                                                }
+                                        }
+                                }
+                        }
+
+                }
+        }
+
+        //se elimina del mapa de eventos
+        TipoMapaEventos::iterator itEventos = m_mapaEventos.find(pObservador);
+        if(itEventos != m_mapaEventos.end()) {
+                for(TipoListaEventos::iterator it = (*itEventos).second.begin(); it!= (*itEventos).second.end(); ++it) {
+                        if((*it).IsEqual(evento)) {
+                                (*itEventos).second.erase(it);
+                                break;
+                        }
+                }
+                itEventos = m_mapaEventos.find(pObservador);
+                if((*itEventos).second.size() == 0) {
+                        m_mapaEventos.erase(itEventos);
+                }
+        }
+
+        delete pLocker;
+}
+
+//se desapunta de todos los eventos a los que escucha
+void ControladorEventos::DesRegistrar (GNC::GCS::IEventsObserver* pObservador)
+{
+        for(TipoMapaEventos::iterator itEventos = m_mapaEventos.find(pObservador); itEventos != m_mapaEventos.end(); itEventos = m_mapaEventos.find(pObservador)) {
+                //desregistramos el primer evento de la lista
+                if((*itEventos).second.size() > 0) {
+                        DesRegistrar(pObservador,(*itEventos).second.front());
+                } else {
+                        m_mapaEventos.erase(itEventos);
+                        break;
+                }
+        }
+}
+
+//procesado sincrono con la interfaz
+void ControladorEventos::ProcesarEvento(GNC::GCS::Events::IEvent *pEvt)
+{
+        GNC::GCS::InactivityController::Instance()->ResetsInactivity();
+
+        wxCriticalSectionLocker* pLocker = new wxCriticalSectionLocker(m_eventosCriticalSection);
+        //Se buscan los notificadores
+        TipoListaObservadores listaObservadores;
+        TipoMapaVistas::iterator itVistas;
+        TipoMapaAmbito::iterator itAmbito;
+        TipoMapaCodigos::iterator itCodigos;
+
+        itVistas= m_mapaVistas.find(pEvt->GetVista());
+        if(itVistas != m_mapaVistas.end()) {
+                //se busca la entrada en el mapa de ambitos
+                itAmbito = (*itVistas).second.find(pEvt->GetCodigoAmbito());
+                if(itAmbito != (*itVistas).second.end()) {
+                        //se busca en el mapa de codigos
+                        itCodigos = (*itAmbito).second.find(pEvt->GetCodigoEvento());
+                        if(itCodigos != (*itAmbito).second.end()) {
+                                listaObservadores = (*itCodigos).second;
+                        }
+                }
+        }
+        delete pLocker;
+
+        NotificarEvento(pEvt,listaObservadores);
+}
+
+void FreeEvents(const std::list<GNC::GCS::Events::IEvent*>& lista)
+{
+        for(std::list<GNC::GCS::Events::IEvent*>::const_iterator itEventos = lista.begin(); itEventos != lista.end(); ++itEventos) {
+                delete *itEventos;
+        }
+}
+
+//inyecta en la cola correspondiente el evento en cuestion
+void ControladorEventos::NotificarEvento(GNC::GCS::Events::IEvent *pEvt, TipoListaObservadores & listaObservadores)
+{
+#ifdef _GINKGO_TRACE
+        std::cout << "<< Evento: " << pEvt << std::endl;
+#endif
+
+        std::list<GNC::GCS::Events::IEvent*> lista;
+
+        try {
+                lista.push_back(pEvt);
+                for(TipoListaObservadores::iterator it = listaObservadores.begin(); it != listaObservadores.end(); ++it) {
+                        if((*it) != NULL) {
+                                if(!(*it)->FiltrarEvento(pEvt)) {
+                                        (*it)->PreProcesarEvento(pEvt,lista);
+                                }
+                        }
+                }
+#ifdef _GINKGO_TRACE
+                int i1 = 0;
+                for (TipoListaPunterosEventos::iterator it = lista.begin(); it != lista.end(); ++it) {
+                        std::cout << "Lista de eventos generada:" << std::endl;
+                        std::cout << " " << i1++ << " Evento: " << *it << std::endl;
+                }
+#endif
+
+                // Etapa de compactacion de eventos repetidos
+
+                unsigned int i = lista.size();
+
+                for(std::list<GNC::GCS::Events::IEvent*>::reverse_iterator itCur = lista.rbegin(); itCur != lista.rend(); ++itCur, --i) {
+                        GNC::GCS::Events::IEvent *pCur = *itCur;
+                        unsigned int j = 1;
+                        for (TipoListaPunterosEventos::iterator itPrev = lista.begin(); i != j; ++itPrev, ++j) {
+                                GNC::GCS::Events::IEvent *pPrev = *itPrev;
+                                if (pPrev->IsEqual(*pCur)) {
+                                        pPrev->Skip(true);
+                                }
+                        }
+                }
+
+                for(std::list<GNC::GCS::Events::IEvent*>::iterator itEventos = lista.begin(); itEventos!= lista.end(); ++itEventos) {
+                        GNC::GCS::Events::IEvent* pE = (*itEventos);
+                        for(TipoListaObservadores::iterator itObservadores = listaObservadores.begin(); pE->IsSkipped() && itObservadores != listaObservadores.end(); ++itObservadores) {
+                                GNC::GCS::IEventsObserver* pO = (*itObservadores);
+                                if( pO != NULL) {
+                                        if(!pO->FiltrarEvento(pE)) {
+                                                pO->ProcesarEvento(pE);
+                                        }
+                                }
+
+                        }
+                }
+        } catch (GNC::GCS::IException& ex) {
+                LOG_ERROR("ControladorEventos", "Exception while processing event " << ex.str());
+                FreeEvents(lista);
+                throw;
+        } catch (std::exception&) {
+                FreeEvents(lista);
+                throw;
+        } catch (...) {
+                FreeEvents(lista);
+                throw GNC::GCS::IException(_Std("Internal error"), _Std("Unknown"), false);
+        }
+
+        FreeEvents(lista);
+
+#ifdef _GINKGO_TRACE
+        std::cout << " --- " << std::endl;
+#endif
+}
+
+ControladorEventos * ControladorEventos::Instance()
+{
+        if (m_psInstancia == NULL) {
+                m_psInstancia = new ControladorEventos();
+        }
+        return m_psInstancia;
+}
+
+void ControladorEventos::FreeInstance()
+{
+        if (m_psInstancia != NULL) {
+                delete m_psInstancia;
+                m_psInstancia = NULL;
+        }
+}
+}
+}
diff --git a/cadxcore/main/controllers/controladoreventos.h b/cadxcore/main/controllers/controladoreventos.h
new file mode 100644
index 0000000..97fd0a1
--- /dev/null
+++ b/cadxcore/main/controllers/controladoreventos.h
@@ -0,0 +1,101 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/internal.h>
+#include <api/controllers/ieventscontroller.h>
+#include <wx/thread.h>
+#include <map>
+#include <list>
+
+//----------------------------------------------------------------------------------------------------
+//region Forward Declarations
+
+//endregion
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+
+namespace GNC
+{
+
+namespace GCS
+{
+
+//====================================================================================================
+//= Controlador de eventos
+//====================================================================================================
+class ControladorEventos: public IEventsController
+{
+
+public:
+        //lista de punteros a eventos
+        typedef std::list<GNC::GCS::Events::IEvent*> TipoListaPunterosEventos;
+
+protected:
+        typedef std::list<IEventsObserver* > TipoListaObservadores;
+        //codigo de evento,observador
+        typedef std::map<long , TipoListaObservadores > TipoMapaCodigos;
+        //codigo de ambito, lista de observadores
+        typedef std::map<long , TipoMapaCodigos> TipoMapaAmbito;
+        //vista, ambitos
+        typedef std::map<GNC::GCS::IVista* , TipoMapaAmbito > TipoMapaVistas;
+        //lista de eventos
+        typedef std::list<GNC::GCS::Events::IEvent> TipoListaEventos;
+        //observadores,Evtentos para desregistrarse
+        typedef std::map<IEventsObserver*, TipoListaEventos> TipoMapaEventos;
+
+public:
+
+        //se apunta a escuchar un evento
+        void Registrar ( IEventsObserver* pObservador, const GNC::GCS::Events::IEvent& evento);
+        //se desapunta de escuchar un evento
+        void DesRegistrar (IEventsObserver* pObservador, const GNC::GCS::Events::IEvent& evento);
+        //se desapunta de todos los eventos a los que escucha
+        void DesRegistrar (IEventsObserver* pObservador);
+        //avisa a los observadores registrados a este evento
+        void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+        static ControladorEventos *Instance();
+        static void FreeInstance();
+
+        static ControladorEventos* m_psInstancia;
+
+protected:
+
+        ControladorEventos();
+        ~ControladorEventos();
+
+        void NotificarEvento(GNC::GCS::Events::IEvent *evt, TipoListaObservadores & listaObservadores);
+
+        //semaforo para controlar las secciones criticas
+        wxCriticalSection m_eventosCriticalSection;
+
+        //atributos donde se lleva la cuenta de observadores/eventos
+        TipoMapaVistas m_mapaVistas;
+        TipoMapaEventos m_mapaEventos;
+};
+}
+}
diff --git a/cadxcore/main/controllers/controladorextensiones.cpp b/cadxcore/main/controllers/controladorextensiones.cpp
new file mode 100644
index 0000000..a5926c1
--- /dev/null
+++ b/cadxcore/main/controllers/controladorextensiones.cpp
@@ -0,0 +1,598 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <string>
+#include <map>
+#include <cctype>
+#include <algorithm>
+#include <exception>
+#include <set>
+
+#include <wx/dir.h>
+#include <wx/file.h>
+#include <wx/filename.h>
+#include <wx/dynlib.h>
+
+#include <api/globals.h>
+#include <prvext/prvext.h>
+#include <api/internationalization/internationalization.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/configurationcontroller.h>
+
+#include <main/entorno.h>
+
+#if defined(__WXOSX__)
+#include <dlfcn.h>
+#elif defined(__WXGTK__)
+#include <dlfcn.h>
+#elif defined(_WINDOWS)
+#else
+#error Plataforma no soportada
+#endif
+
+#define EXT wxT("*.inf")
+
+#if defined(MONOLITIC)
+PrivateExtension* init_GNKProExtension();
+PrivateExtension* init_VisualizatorExtension();
+
+PrivateExtension* init_OfthalmologicExtension();
+PrivateExtension* init_RadiologicalExtension();
+PrivateExtension* init_DermatologyExtension();
+#endif
+
+
+namespace GADVAPI
+{
+class PrivateExtensionWrapper : public IPrivateExtensionWrapper
+{
+
+public:
+
+        PrivateExtensionWrapper()
+        {
+                this->privateExtension = NULL;
+
+                this->loaded = false;
+                this->dll = NULL;
+        }
+
+        virtual ~PrivateExtensionWrapper()
+        {
+                UnLoad();
+        }
+
+        bool operator==(const PrivateExtension* other) const
+        {
+                return other != NULL && (*this) == (*other);
+        }
+
+        bool operator==(const PrivateExtension& other) const
+        {
+                return
+                        this->sid == other.GetSID();
+        }
+
+#if defined(MONOLITIC)
+
+        virtual bool Load(PrivateExtension* pExt)
+        {
+                if (pExt != NULL) {
+                        this->privateExtension = pExt;
+                        this->sid = pExt->GetSID();
+                        this->provider = pExt->GetProvider();
+                        this->description = pExt->GetDescription();
+                        this->updateurl = pExt->GetUpdateURL();
+                        this->loaded = true;
+                }
+                return this->loaded;
+        }
+
+#else
+
+        virtual bool Load()
+        {
+
+                if (this->loaded || this->dll != NULL) {
+                        return this->loaded;
+                }
+
+                this->loaded = false;
+
+                // Load library file
+                this->dll = new wxDynamicLibrary();
+                LOG_DEBUG("Extensions", _Std("Loading").c_str() << " " << this->sid << " [" << filePath << "]")
+                if(!dll->Load(FROMPATH(filePath))) {
+                        LOG_ERROR("Extensions", _Std("Could not load extension library file") << "[" << filePath << "]");
+                        this->error = _Std("Could not load library file. Check log");
+                        //std::cout << "Lib not loaded!" << std::endl;
+                        delete this->dll;
+                        this->dll = NULL;
+                } else {
+#if defined(_DEBUG)
+                        //Create a valid function pointer using the function pointer type in plugin.h
+                        wxDYNLIB_FUNCTION(CreatePrivateExtension_function,CreatePrivateExtensionDebug,*dll);
+                        //check if the function is found
+                        if(pfnCreatePrivateExtensionDebug) {
+                                privateExtension = pfnCreatePrivateExtensionDebug();
+#else
+                        //Create a valid function pointer using the function pointer type in header
+                        wxDYNLIB_FUNCTION(CreatePrivateExtension_function,CreatePrivateExtension,*dll);
+                        //check if the function is found
+                        if(pfnCreatePrivateExtension) {
+                                privateExtension = pfnCreatePrivateExtension();
+#endif
+
+                                // We calls
+                                if (*this == privateExtension) {
+                                        this->loaded = true;
+                                } else {
+                                        if (this->privateExtension != NULL) {
+                                                delete this->privateExtension;
+                                                this->privateExtension = NULL;
+                                        }
+                                        if (this->dll != NULL) {
+                                                delete this->dll;
+                                                this->dll = NULL;
+                                        }
+                                        this->error = _Std("Extension descriptor does not match");
+                                }
+                        } else {
+                                this->error = _Std("Could not find entry point");
+                                delete this->dll;
+                                this->dll = NULL;
+                        }
+                }
+
+                return this->loaded;
+        }
+
+#endif
+
+
+
+        virtual bool UnLoad()
+        {
+
+                if (this->loaded) {
+                        this->loaded = false;
+                        if (this->privateExtension != NULL) {
+                                delete this->privateExtension;
+                        }
+                        if (this->dll != NULL) {
+                                delete this->dll;
+                                this->dll = NULL;
+                        }
+                }
+                return !this->loaded;
+        }
+
+        virtual bool IsLoaded() const
+        {
+                return this->loaded;
+        }
+
+        void setSid(const std::string& sidStr)
+        {
+                this->sid = sidStr;
+        }
+
+        const std::string& getSid() const
+        {
+                return this->sid;
+        }
+
+        void setFilePath(const std::string& path)
+        {
+                this->filePath = path;
+        }
+
+        virtual const std::string& GetProvider() const
+        {
+                return this->provider;
+        }
+
+        void setProvider(const std::string& providerStr)
+        {
+                this->provider = providerStr;
+        }
+
+        virtual const std::string& GetDescription() const
+        {
+                return this->description;
+        }
+
+        void setDescription(const std::string& descriptionStr)
+        {
+                this->description = descriptionStr;
+        }
+
+        virtual const std::string& GetUpdateURL() const
+        {
+                return this->updateurl;
+        }
+
+        void setUpdateURL(const std::string& updateURLStr)
+        {
+                this->updateurl = updateURLStr;
+        }
+
+        virtual const std::string& GetError() const
+        {
+                return this->error;
+        }
+
+        virtual PrivateExtension* GetExtension()
+        {
+                return this->privateExtension;
+        }
+
+        int parseInt(const std::string& str)
+        {
+                int val = -1;
+                std::istringstream is(str);
+                is >> val;
+                return val;
+        }
+
+private:
+        bool loaded;
+
+        std::string sid;
+
+        std::string filePath;
+        std::string provider;
+        std::string description;
+
+        std::string updateurl;
+        std::string error;
+        PrivateExtension* privateExtension;
+        wxDynamicLibrary* dll;
+};
+}
+
+
+
+GNC::GCS::IExtensionException::IExtensionException(const std::string& msg, const std::string& component, bool fatal) throw() : GNC::GCS::IException(msg, component, fatal) {}
+GNC::GCS::IExtensionException::~IExtensionException() throw() {}
+
+
+GNC::GCS::IControladorExtensiones::IControladorExtensiones() {}
+GNC::GCS::IControladorExtensiones::~IControladorExtensiones() {}
+
+
+GNC::ControladorExtensiones* GNC::ControladorExtensiones::m_pInstance = 0;
+
+GNC::ControladorExtensiones::ControladorExtensiones()
+{
+        m_Manager.Scan();
+        for (GADVAPI::PrivateExtensionManager::iterator it= m_Manager.begin(); it != m_Manager.end(); ++it) {
+                GADVAPI::IPrivateExtensionWrapper* iew = (*it).second;
+                if (iew->IsLoaded()) {
+                        PrivateExtension::TListControllers list = iew->GetExtension()->InitializeLibrary(GNC::GCS::IEntorno::Instance());
+                        for (PrivateExtension::TListControllers::iterator it = list.begin(); it != list.end(); ++it) {
+                                if ((*it) != NULL) {
+                                        RegistrarModulo((*it));
+                                }
+                        }
+                }
+        }
+}
+
+GNC::ControladorExtensiones::~ControladorExtensiones()
+{
+        DesRegistrarModulos();
+        m_Manager.UnLoadAll();
+}
+
+GNC::ControladorExtensiones* GNC::ControladorExtensiones::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new GNC::ControladorExtensiones();
+        }
+        return m_pInstance;
+}
+
+void GNC::ControladorExtensiones::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = 0;
+        }
+
+}
+
+void GNC::ControladorExtensiones::RegistrarModulo(GNC::GCS::IModuleController* pCtrlModulo)
+{
+
+        if (pCtrlModulo == NULL) {
+                return;
+        }
+
+        pCtrlModulo->RegistrarConfiguracion();
+
+        const std::string uid = pCtrlModulo->GetUID();
+        m_Modulos[uid] = pCtrlModulo;
+        NotificarRegistro(pCtrlModulo);
+}
+
+void GNC::ControladorExtensiones::DesRegistrarModulo(GNC::GCS::IModuleController* pCtrlModulo)
+{
+        if (pCtrlModulo == NULL) {
+                return;
+        }
+
+        NotificarDesRegistro(pCtrlModulo);
+
+        m_Modulos.erase(pCtrlModulo->GetUID());
+        delete pCtrlModulo;
+}
+
+void GNC::ControladorExtensiones::DesRegistrarModulos()
+{
+        GNC::ControladorExtensiones::IteradorListaModulos it;
+
+        for (it = m_Modulos.begin(); it != m_Modulos.end(); ++it) {
+                GNC::GCS::IModuleController* item = (*it).second;
+                NotificarDesRegistro(item);
+                delete item;
+        }
+        m_Modulos.clear();
+}
+
+GNC::GCS::IModuleController* GNC::ControladorExtensiones::ObtenerModulo(const std::string& idModulo)
+{
+        GNC::GCS::IModuleController* cm = NULL;
+        IteradorListaModulos it = m_Modulos.find(idModulo);
+        if (it != m_Modulos.end()) {
+                cm = (*it).second;
+        }
+        return cm;
+}
+
+
+
+bool compareListaModulos(GNC::GCS::IModuleController* s1, GNC::GCS::IModuleController* s2)
+{
+        return s1->GetPriority()< s2->GetPriority();
+}
+
+std::list<GNC::GCS::IModuleController*> GNC::ControladorExtensiones::ModulosOrdenados()
+{
+        std::list<GNC::GCS::IModuleController*> listaModulosPriorizados;
+        for(ListaModulos::iterator it = m_Modulos.begin(); it!= m_Modulos.end(); ++it) {
+                listaModulosPriorizados.push_back((*it).second);
+        }
+
+        listaModulosPriorizados.sort(compareListaModulos);
+
+        return listaModulosPriorizados;
+}
+
+const GNC::ControladorExtensiones::ListaModulos& GNC::ControladorExtensiones::Modulos() const
+{
+        return m_Modulos;
+}
+
+// Realización de la interfaz IControladorExtensiones
+GADVAPI::PrivateExtensionManager& GNC::ControladorExtensiones::GetPrivateExtensionsManager()
+{
+        return m_Manager;
+}
+
+void GNC::ControladorExtensiones::NotificarRegistro(GNC::GCS::IModuleController* /*pModulo*/)
+{
+        /*
+        GNC::Entorno* pEntorno = GNC::Entorno::Instance();
+        GNC::Entorno::ListaObservadoresExtensiones::const_iterator it;
+        for (it = pEntorno->ObservadoresExtensiones.begin(); it != pEntorno->ObservadoresExtensiones.end(); ++it) {
+        	GNC::GCS::IObservadorExtensiones* ne = *it;
+        	ne->OnModuloCargado(pModulo);
+        }
+        */
+}
+
+void GNC::ControladorExtensiones::NotificarDesRegistro(GNC::GCS::IModuleController* /*pModulo*/)
+{
+        /*
+        GNC::GCS::IEntorno* pEntorno = GNC::GCS::IEntorno::Instance();
+        Entorno::ListaObservadoresExtensiones::const_iterator it;
+        for (it = pEntorno->ObservadoresExtensiones.begin(); it != pEntorno->ObservadoresExtensiones.end(); ++it) {
+        	GNC::GCS::IObservadorExtensiones* ne = *it;
+        	ne->OnModuloDescargado(pModulo);
+        }
+        */
+}
+
+//-------------------------------------------------------------------------------------------
+// Helpers
+
+inline std::wstring StringToWString(const std::string& str)
+{
+        std::wstring temp(str.length(),L' ');
+        std::copy(str.begin(), str.end(), temp.begin());
+        return temp;
+}
+
+
+//-------------------------------------------------------------------------------------------
+// PrivateExtensionManager
+
+GADVAPI::PrivateExtensionManager::PrivateExtensionManager() : GADVAPI::PrivateExtensionManager::Base()
+{
+
+}
+
+GADVAPI::PrivateExtensionManager::~PrivateExtensionManager()
+{
+        UnLoadAll();
+}
+
+GADVAPI::IPrivateExtensionWrapper* GADVAPI::PrivateExtensionManager::GetExtension(const std::string& nombre)
+{
+        Base& base = *this;
+        if (base.find(nombre) != base.end()) {
+                return base[nombre];
+        } else {
+                return NULL;
+        }
+}
+
+void GADVAPI::PrivateExtensionManager::Scan()
+{
+
+#if defined (MONOLITIC)
+
+        if(empty()) {
+
+                Base& base = *this;
+                PrivateExtensionWrapper* pExt = NULL;
+
+                pExt = new PrivateExtensionWrapper();
+                pExt->Load(init_VisualizatorExtension());
+
+                base[pExt->getSid()] = pExt;
+
+#if defined(GINKGO_PRO)
+
+                pExt = new PrivateExtensionWrapper();
+                pExt->Load(init_OfthalmologicExtension());
+                base[pExt->getSid()] = pExt;
+
+                pExt = new PrivateExtensionWrapper();
+                pExt->Load(init_GNKProExtension());
+                base[pExt->getSid()] = pExt;
+
+                pExt = new PrivateExtensionWrapper();
+                pExt->Load(init_RadiologicalExtension());
+                base[pExt->getSid()] = pExt;
+
+                pExt = new PrivateExtensionWrapper();
+                pExt->Load(init_DermatologyExtension());
+                base[pExt->getSid()] = pExt;
+#endif
+
+        }
+
+#else
+
+        UnLoadAll();
+
+        wxDir dir;
+        wxString rutas[1] = {
+                FROMPATH(GNC::GCS::IEntorno::Instance()->GetPluginsPath())
+        };
+
+        wxString descFileName;
+        wxString descFilePath;
+        std::string stdExtensionDir;
+
+        for (int i = 0; i < 1; i++) {
+                if (dir.Exists(rutas[i]) && dir.Open(rutas[i])) {
+                        bool cont = dir.GetFirst(&descFileName, EXT, wxDIR_FILES);
+                        while (cont) {
+                                stdExtensionDir = std::string( (rutas[i] + wxFileName::GetPathSeparator()).ToUTF8() );
+                                descFilePath = rutas[i] + wxFileName::GetPathSeparator() + descFileName;
+
+                                std::string descStdFilePath(descFilePath.ToUTF8());
+
+                                std::ifstream file (descStdFilePath.c_str());
+                                std::string line;
+                                std::vector<std::string> tokens(2);
+
+                                /*
+                                DLL=file.dll
+                                SID=TheSid
+                                PROVIDER=TheProvider
+                                DESCRIPTION=TheDescription
+                                COMPILATION=TheBuildDate
+                                VERSION=TheVersion
+                                SUBVERSION=TheSubVersion
+                                RELEASE=TheRelease
+                                BUILD=TheBuild
+                                CODENAME=TheCodeNameString
+                                UPDATEURL=TheUpdateURL
+                                CORE_VERSION=TheCoreExactCompatibleVersion
+                                CORE_SUBVERSION=TheCoreExactCompatibleSubVersion
+                                */
+
+                                if (file.is_open()) {
+
+                                        PrivateExtensionWrapper* pExt = new PrivateExtensionWrapper();
+
+                                        while(std::getline(file, line)) {
+
+                                                std::string::size_type sepPos = line.find("=");
+                                                if (sepPos != std::string::npos) {
+                                                        std::string key = line.substr(0, sepPos);
+                                                        std::string value = line.substr(sepPos+1);
+
+                                                        if (key == "DLL") {
+                                                                pExt->setFilePath(stdExtensionDir + value);
+                                                        } else if (key == "SID") {
+                                                                pExt->setSid(value);
+                                                        } else if (key == "PROVIDER") {
+                                                                pExt->setProvider(value);
+                                                        } else if (key == "DESCRIPTION") {
+                                                                pExt->setDescription(value);
+                                                        } else if (key == "UPDATEURL") {
+                                                                pExt->setUpdateURL(value);
+                                                        }
+                                                }
+                                        }
+
+                                        if (this->find(pExt->getSid()) != end()) {
+                                                LOG_ERROR("Extensions", _Std("Skipping extension with duplicated SID:") << " " << pExt->getSid());
+                                                delete pExt;
+                                        } else {
+                                                Base& base = *this;
+                                                base[pExt->getSid()] = pExt;
+                                                pExt->Load();
+                                        }
+
+                                }
+                                cont = dir.GetNext(&descFileName);
+                        }
+                }
+        }
+#endif
+}
+
+void GADVAPI::PrivateExtensionManager::UnLoadAll()
+{
+        for(iterator it = begin(); it != end(); ++it) {
+                (*it).second->UnLoad();
+                delete (*it).second;
+        }
+        clear();
+}
+
+GADVAPI::PrivateExtensionManager::iterator GADVAPI::PrivateExtensionManager::begin()
+{
+        return Base::begin();
+}
+
+GADVAPI::PrivateExtensionManager::iterator GADVAPI::PrivateExtensionManager::end()
+{
+        return Base::end();
+}
diff --git a/cadxcore/main/controllers/controladorextensiones.h b/cadxcore/main/controllers/controladorextensiones.h
new file mode 100644
index 0000000..0238b74
--- /dev/null
+++ b/cadxcore/main/controllers/controladorextensiones.h
@@ -0,0 +1,68 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/controllers/icontroladorextensiones.h>
+#include <api/controllers/imodulecontroller.h>
+#include <map>
+#include <string>
+
+namespace GNC
+{
+
+class EXTAPI ControladorExtensiones : public GNC::GCS::IControladorExtensiones
+{
+public:
+
+        static ControladorExtensiones* Instance();
+        static void FreeInstance();
+
+        void RegistrarModulo(GNC::GCS::IModuleController* pCtrlModulo);
+        void DesRegistrarModulo(GNC::GCS::IModuleController* pCtrlModulo);
+        void DesRegistrarModulos();
+
+        GNC::GCS::IModuleController* ObtenerModulo(const std::string& idModulo);
+
+        typedef std::map<std::string, GNC::GCS::IModuleController*> ListaModulos;
+        typedef ListaModulos::iterator IteradorListaModulos;
+        typedef ListaModulos::const_iterator IteradorConstanteListaModulos;
+
+        std::list<GNC::GCS::IModuleController*> ModulosOrdenados();
+        const ControladorExtensiones::ListaModulos& Modulos() const;
+
+        // Realizaci�n de la interfaz IControladorExtensiones
+        virtual GADVAPI::PrivateExtensionManager& GetPrivateExtensionsManager();
+
+protected:
+        ControladorExtensiones();
+        ~ControladorExtensiones();
+
+        void NotificarRegistro(GNC::GCS::IModuleController* pModulo);
+        void NotificarDesRegistro(GNC::GCS::IModuleController* pModulo);
+
+protected:
+        static ControladorExtensiones* m_pInstance;
+        ListaModulos m_Modulos;
+
+        GADVAPI::PrivateExtensionManager m_Manager;
+
+};
+}
diff --git a/cadxcore/main/controllers/controladorhl7.cpp b/cadxcore/main/controllers/controladorhl7.cpp
new file mode 100644
index 0000000..c98f44a
--- /dev/null
+++ b/cadxcore/main/controllers/controladorhl7.cpp
@@ -0,0 +1,114 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <string>
+#include <map>
+#include <ctime>
+#include <sstream>
+
+#include <wx/xml/xml.h>
+#include <wx/file.h>
+#include <wx/sstream.h>
+#include <wx/msgdlg.h>
+#ifndef _WIN32
+#include <signal.h>
+#endif
+#include <wx/tokenzr.h>
+#include <wx/filename.h>
+
+#include "integrationcontroller.h"
+#include "controladorhl7.h"
+#include "parserxmlspanish.h"
+#include "parserxmlenglish.h"
+
+#include "controladorbbddhl7.h"
+#include <api/globals.h>
+#include <api/imodelohl7.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/helpers/aetwildcards.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/entorno.h>
+#include "dcmtk/dicomservers.h"
+
+//creacion de la base de datos de mensajes
+
+GIL::HL7::ControladorHL7::ControladorHL7(TipoProtocolo protocolo)
+{
+
+        m_Protocolo = protocolo;
+}
+
+GIL::HL7::ControladorHL7::~ControladorHL7()
+{
+
+}
+
+
+//region "Interfaz generica"
+/* Envia el mensaje por MLLP */
+void GIL::HL7::ControladorHL7::EnviarMensaje(const GIL::HL7::Message& msg, bool procesarACK) const
+{
+        std::string hostname, port;
+
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","HostnameMI",hostname);
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","PuertoMI",port);
+        std::ostringstream ostr;
+        ostr << hostname << ":" << port;
+        std::string url = ostr.str();
+
+        if (hostname.size() == 0) {
+                throw HL7Exception(_Std("Integration engine hostname not set"), "NET");
+        }
+        if (port.size() == 0) {
+                throw HL7Exception(_Std("Integration engine port not set"), "NET");
+        }
+
+        std::string msgControlId("");
+        switch(m_Protocolo) {
+        case GIL::HL7::ControladorHL7::TP_MLLP:
+                //se inserta en la BBDD de mensajes
+                if(procesarACK) {
+                        msgControlId = msg.GetSegment("MSH").GetField(10).GetComponent(1);
+                }
+                InsertarMensajeBBDD(msg,url,procesarACK,(int)TP_MLLP,msgControlId);
+                //EnviarMensajeMLLP(msg, url, procesarACK);
+                break;
+        default:
+                throw HL7Exception(_Std("Unsupported protocol"), "NET");
+        }
+}
+
+//endregion
+void GIL::HL7::ControladorHL7::InsertarMensajeBBDD(const GIL::HL7::Message& msg, const std::string& url,const bool procesarACK,const int protocolo,const std::string& msgControlId) const
+{
+        std::stringstream outputStream;
+        outputStream << msg;
+        std::string str = outputStream.str();
+
+        try {
+                GIL::HL7::MensajeHL7 mensaje(0,str,"",url,GIL::HL7::MensajeHL7::TE_Pendiente,"",protocolo,procesarACK,msgControlId);
+                GIL::HL7::ControladorBBDDHl7::Instance()->InsertarMensaje(mensaje);
+        } catch (GIL::HL7::HL7Exception& ) {
+                throw HL7Exception(_Std("Error queueing message. Check your supplier"), "NET");
+        }
+}
diff --git a/cadxcore/main/controllers/controladorhl7.h b/cadxcore/main/controllers/controladorhl7.h
new file mode 100644
index 0000000..e538ea2
--- /dev/null
+++ b/cadxcore/main/controllers/controladorhl7.h
@@ -0,0 +1,61 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/ientorno.h>
+#include <api/imodelohl7.h>
+
+namespace GIL
+{
+namespace HL7
+{
+class HiloEnviaMensajesHl7;
+
+class ControladorHL7
+{
+public:
+public:
+
+        typedef enum TipoProtocolo {
+                TP_MLLP
+        } TipoProtocolo;
+
+
+        ControladorHL7(TipoProtocolo protocolo = TP_MLLP);
+        virtual ~ControladorHL7();
+
+        //region "Interfaz generica"
+
+        /* Envia el mensaje por el protocolo especificado */
+        virtual void EnviarMensaje(const GIL::HL7::Message& msg, bool procesarACK=true) const;
+
+        //endregion
+
+        //region "Helpers"
+
+        //endregion
+
+        void InsertarMensajeBBDD(const GIL::HL7::Message& msg, const std::string& url,const bool procesarACK,const int protocolo,const std::string& msgControlId) const;
+
+protected:
+        TipoProtocolo      m_Protocolo;
+};
+}
+}
diff --git a/cadxcore/main/controllers/controladorinternacionalizacion.cpp b/cadxcore/main/controllers/controladorinternacionalizacion.cpp
new file mode 100644
index 0000000..acc661d
--- /dev/null
+++ b/cadxcore/main/controllers/controladorinternacionalizacion.cpp
@@ -0,0 +1,92 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "controladorinternacionalizacion.h"
+#include <wx/intl.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/entorno.h>
+
+
+namespace GNC
+{
+namespace GCS
+{
+ControladorInternacionalizacion* ControladorInternacionalizacion::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new ControladorInternacionalizacion();
+        }
+        return m_pInstance;
+}
+
+void ControladorInternacionalizacion::FreeInstance()
+{
+        if(m_pInstance!=NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+ControladorInternacionalizacion* ControladorInternacionalizacion::m_pInstance = NULL;
+
+ControladorInternacionalizacion::ControladorInternacionalizacion()
+{
+        m_idiomaInterfazSesion = GetIdiomaInterfaz();
+        //se inicializa el soporte de idioma, leyendolo de la configuracion...
+        wxLocale *pLoc = wxGetLocale();
+        wxString pathLang = FROMPATH(GNC::Entorno::Instance()->GetGinkgoLanguageDir());
+        if (pLoc == NULL) {
+                pLoc = new wxLocale();
+        }
+        pLoc->AddCatalogLookupPathPrefix(pathLang);
+        pLoc->Init(m_idiomaInterfazSesion);
+        setlocale(LC_NUMERIC, "C");
+}
+ControladorInternacionalizacion::~ControladorInternacionalizacion()
+{
+        wxLocale *pLoc = wxGetLocale();
+        if(pLoc != NULL) {
+                pLoc->DestroyLanguagesDB();
+                delete pLoc;
+        }
+}
+
+void ControladorInternacionalizacion::AddCatalog(const std::string& catalogName)
+{
+        wxString strTmp = FROMPATH(catalogName);
+        wxLocale *pLoc = wxGetLocale();
+        if (pLoc != NULL) {
+                pLoc->AddCatalog(strTmp);
+        }
+}
+
+//se lee de la configuracion
+int ControladorInternacionalizacion::GetIdiomaInterfaz()
+{
+        int language;
+        GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/Station", "Language", language,-1);
+        if (language == -1) {
+                //se pilla el de la maquina
+                language = wxLocale::GetSystemLanguage();
+        }
+        return language;
+}
+}
+}
diff --git a/cadxcore/main/controllers/controladorinternacionalizacion.h b/cadxcore/main/controllers/controladorinternacionalizacion.h
new file mode 100644
index 0000000..75d4b9f
--- /dev/null
+++ b/cadxcore/main/controllers/controladorinternacionalizacion.h
@@ -0,0 +1,46 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/controllers/icontroladorinternacionalizacion.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI ControladorInternacionalizacion: public IControladorInternacionalizacion
+{
+public:
+        static ControladorInternacionalizacion* Instance();
+        static void FreeInstance();
+
+        //interfaz del icontrolador (la que ven los modulos)
+        virtual void AddCatalog(const std::string& catalogName);
+        int GetIdiomaInterfaz();
+
+protected:
+        static ControladorInternacionalizacion* m_pInstance;
+        ControladorInternacionalizacion();
+        ~ControladorInternacionalizacion();
+        int m_idiomaInterfazSesion;
+};
+}
+}
diff --git a/cadxcore/main/controllers/controladorlog.cpp b/cadxcore/main/controllers/controladorlog.cpp
new file mode 100644
index 0000000..9ec197a
--- /dev/null
+++ b/cadxcore/main/controllers/controladorlog.cpp
@@ -0,0 +1,251 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/ientorno.h>
+#include <api/internationalization/internationalization.h>
+#include <dcmtk/oflog/oflog.h>
+#include <dcmtk/oflog/ndc.h>
+#include <dcmtk/oflog/fileap.h>
+#include <dcmtk/oflog/helpers/loglog.h>
+#include <dcmtk/oflog/configrt.h>
+#include "log4cplus/guiappender.h"
+#include "configurationcontroller.h"
+#include "controladorlog.h"
+
+
+#define L4C_LITERAL(lit) (lit)
+
+
+#define LOGGER_DEFECTO "default"
+
+#if PACKAGE_VERSION_NUMBER >= 362
+#define OFauto_ptr OFunique_ptr
+#ifndef HAVE_CXX11
+#error DCMTK must be compiled with CXX11 support
+#endif
+
+#endif
+
+namespace GNC
+{
+using namespace dcmtk;
+//region "Patron singleton"
+GNC::ControladorLog* GNC::ControladorLog::m_pInstance = 0;
+
+GNC::ControladorLog::ControladorLog()
+{
+        //en debug siempre se usa el appender fichero + el consola, ignoramos los properties
+        //esto es porque si no esta el flush immediatly en windows cuando se cierra inesperadamente queda colgada
+        //una consola
+#ifndef _GINKGO_DEBUG
+        bool existeProperties=false;
+        std::fstream fin;
+        fin.open("ginkgo.properties",std::ios::in);
+        if( fin.is_open() ) {
+                existeProperties = true;
+        }
+        fin.close();
+
+        if(existeProperties) {
+                log4cplus::PropertyConfigurator::doConfigure(L4C_LITERAL("ginkgo.properties"));
+                log4cplus::SharedAppenderPtr append_0(gnkLog4cplus::GUIAppender::Instance());
+                append_0->setName(L4C_LITERAL("AppenderGUI"));
+                append_0->setLayout( OFauto_ptr<log4cplus::Layout>(new log4cplus::TTCCLayout()) );
+                log4cplus::Logger::getRoot().addAppender(append_0);
+
+        } else {
+#endif
+                //instanciamos el log
+                std::ostringstream ostr;
+                ostr << GNC::GCS::IEntorno::Instance()->GetGinkgoUserDir().c_str();
+#ifdef _WIN32
+                ostr << "\\";
+#else
+                ostr << "/";
+#endif
+                ostr << "GinkgoLog.log";
+                log4cplus::SharedAppenderPtr append_0(gnkLog4cplus::GUIAppender::Instance());
+                append_0->setName(DCMTK_LOG4CPLUS_TEXT("AppenderGUI"));
+                append_0->setLayout( OFauto_ptr<log4cplus::Layout>(new log4cplus::PatternLayout("%D{%Y/%m/%d %H:%M:%S.%q} [%t] %-5p %c %x - %m%n")) );
+                log4cplus::Logger::getRoot().addAppender(append_0);
+
+                OFString tmpStr(ostr.str().c_str());
+                log4cplus::SharedAppenderPtr append_1(new log4cplus::RollingFileAppender(tmpStr, 5*1024*1024, 5,true));
+                append_1->setName(DCMTK_LOG4CPLUS_TEXT("AppenderFichero"));
+                append_1->setLayout( OFauto_ptr<log4cplus::Layout>(new log4cplus::PatternLayout("%D{%Y/%m/%d %H:%M:%S.%q} [%t] %-5p %c %x - %m%n")) );
+                log4cplus::Logger::getRoot().addAppender(append_1);
+
+                int logLevel;
+#ifdef _GINKGO_DEBUG
+                log4cplus::Logger::getRoot().setLogLevel(log4cplus::DEBUG_LOG_LEVEL);
+                //to avoid verbosivity of dcmdata
+                log4cplus::Logger::getInstance(L4C_LITERAL("dcmtk.dcmdata")).setLogLevel(log4cplus::INFO_LOG_LEVEL);
+
+                GNC::GCS::ConfigurationController::Instance()->readIntGeneral("/GinkgoCore/Log", "LogLevel", logLevel, log4cplus::DEBUG_LOG_LEVEL);
+#else
+                log4cplus::Logger::getRoot().setLogLevel(log4cplus::INFO_LOG_LEVEL);
+                GNC::GCS::ConfigurationController::Instance()->readIntGeneral("/GinkgoCore/Log", "LogLevel", logLevel, log4cplus::INFO_LOG_LEVEL);
+#endif
+                log4cplus::Logger::getRoot().setLogLevel(logLevel);
+
+#ifndef _GINKGO_DEBUG
+        }
+#endif
+}
+
+GNC::ControladorLog::~ControladorLog()
+{
+        log4cplus::Logger::getRoot().closeNestedAppenders();
+        log4cplus::Logger::getRoot().removeAllAppenders();
+        log4cplus::Logger::getRoot().shutdown();
+        gnkLog4cplus::GUIAppender::FreeInstance();
+
+}
+
+void GNC::ControladorLog::GetLogLevelsMap(GNC::GCS::IControladorLog::MapaLogLevels& levels)
+{
+        levels[log4cplus::FATAL_LOG_LEVEL] = "FATAL";
+        levels[log4cplus::ERROR_LOG_LEVEL] = "ERROR";
+        levels[log4cplus::WARN_LOG_LEVEL] = "WARN";
+        levels[log4cplus::INFO_LOG_LEVEL] = "INFO";
+        levels[log4cplus::DEBUG_LOG_LEVEL] = "DEBUG";
+        levels[log4cplus::TRACE_LOG_LEVEL] = "TRACE";
+}
+
+int GNC::ControladorLog::GetLogLevelCode(const std::string& level)
+{
+        if (level == "FATAL") {
+                return log4cplus::FATAL_LOG_LEVEL;
+        } else if (level == "ERROR") {
+                return log4cplus::ERROR_LOG_LEVEL;
+        } else if (level == "WARN") {
+                return log4cplus::WARN_LOG_LEVEL;
+        } else if (level == "INFO") {
+                return log4cplus::INFO_LOG_LEVEL;
+        } else if (level == "DEBUG") {
+                return log4cplus::DEBUG_LOG_LEVEL;
+        } else {
+                return log4cplus::TRACE_LOG_LEVEL;
+        }
+}
+
+int GNC::ControladorLog::GetActiveLogLevel()
+{
+        return log4cplus::Logger::getRoot().getLogLevel();
+}
+
+void GNC::ControladorLog::SetActiveLogLevel(int ll)
+{
+
+        log4cplus::Logger::getRoot().setLogLevel(ll);
+}
+
+
+GNC::ControladorLog* GNC::ControladorLog::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new GNC::ControladorLog();
+        }
+        return m_pInstance;
+}
+
+void GNC::ControladorLog::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+inline void LogearInline(log4cplus::Logger& log,const std::string& mensaje, GNC::ControladorLog::LogLevel logLevel)
+{
+        switch(logLevel) {
+        case GNC::ControladorLog::FatalLog:
+                DCMTK_LOG4CPLUS_FATAL(log, mensaje.c_str());
+                break;
+        case GNC::ControladorLog::ErrorLog:
+                DCMTK_LOG4CPLUS_ERROR(log, mensaje.c_str());
+                break;
+        case GNC::ControladorLog::WarnLog:
+                DCMTK_LOG4CPLUS_WARN(log, mensaje.c_str());
+                break;
+        case GNC::ControladorLog::InfoLog:
+                DCMTK_LOG4CPLUS_INFO(log, mensaje.c_str());
+                break;
+        case GNC::ControladorLog::DebugLog:
+                DCMTK_LOG4CPLUS_DEBUG(log, mensaje.c_str());
+                break;
+        case GNC::ControladorLog::TraceLog:
+                DCMTK_LOG4CPLUS_TRACE(log, mensaje.c_str());
+                break;
+        case GNC::ControladorLog::NoLog:
+                break;
+        }
+}
+
+void GNC::ControladorLog::Log(const std::string& mensaje, GNC::ControladorLog::LogLevel logLevel)
+{
+        log4cplus::Logger log = log4cplus::Logger::getInstance(L4C_LITERAL(LOGGER_DEFECTO));
+        LogearInline(log,mensaje,logLevel);
+}
+
+void GNC::ControladorLog::Log(const std::string& logger, const std::string& mensaje, GNC::ControladorLog::LogLevel logLevel)
+{
+        log4cplus::Logger log = log4cplus::Logger::getInstance(logger.c_str());
+        LogearInline(log, mensaje, logLevel);
+}
+
+void GNC::ControladorLog::LogConContexto(const std::string& contexto, const std::string& mensaje, GNC::ControladorLog::LogLevel logLevel)
+{
+        log4cplus::Logger log = log4cplus::Logger::getInstance(L4C_LITERAL(LOGGER_DEFECTO));
+        log4cplus::NDCContextCreator _context(contexto.c_str());
+        LogearInline(log, mensaje, logLevel);
+}
+
+void GNC::ControladorLog::LogConContexto(const std::string& logger, const std::string& contexto, const std::string& mensaje, GNC::ControladorLog::LogLevel logLevel)
+{
+        log4cplus::Logger log = log4cplus::Logger::getInstance(logger.c_str());
+        log4cplus::NDCContextCreator _context(contexto.c_str());
+        LogearInline(log,mensaje,logLevel);
+}
+
+bool GNC::ControladorLog::IsEnabledFor(GNC::GCS::IControladorLog::LogLevel logLevel)
+{
+        switch(logLevel) {
+        case GNC::ControladorLog::FatalLog:
+                return log4cplus::Logger::getRoot().isEnabledFor(log4cplus::FATAL_LOG_LEVEL);
+        case GNC::ControladorLog::ErrorLog:
+                return log4cplus::Logger::getRoot().isEnabledFor(log4cplus::ERROR_LOG_LEVEL);
+        case GNC::ControladorLog::WarnLog:
+                return log4cplus::Logger::getRoot().isEnabledFor(log4cplus::WARN_LOG_LEVEL);
+        case GNC::ControladorLog::InfoLog:
+                return log4cplus::Logger::getRoot().isEnabledFor(log4cplus::INFO_LOG_LEVEL);
+        case GNC::ControladorLog::DebugLog:
+                return log4cplus::Logger::getRoot().isEnabledFor(log4cplus::DEBUG_LOG_LEVEL);
+        case GNC::ControladorLog::TraceLog:
+                return log4cplus::Logger::getRoot().isEnabledFor(log4cplus::TRACE_LOG_LEVEL);
+        case GNC::ControladorLog::NoLog:
+                return false;
+        }
+        return false;
+}
+}
+//-------------------------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------------------------
diff --git a/cadxcore/main/controllers/controladorlog.h b/cadxcore/main/controllers/controladorlog.h
new file mode 100644
index 0000000..7c35230
--- /dev/null
+++ b/cadxcore/main/controllers/controladorlog.h
@@ -0,0 +1,74 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef LOGCONTROLLER_H
+#define LOGCONTROLLER_H
+
+#include <string>
+#include <map>
+
+#include <api/api.h>
+#include <api/controllers/icontroladorlog.h>
+
+//-------------------------------------------------------------------------------------------------
+namespace GNC
+{
+class ControladorLog : public GNC::GCS::IControladorLog
+{
+        //region "Patron singleton"
+public:
+
+        static ControladorLog* Instance();
+        static void FreeInstance();
+
+        static ControladorLog* m_pInstance;
+        //endregion
+
+protected:
+        //--- Constructores
+        ControladorLog();
+        ~ControladorLog();
+public:
+        //log en el logger por defecto
+        virtual void Log(const std::string& mensaje,LogLevel logLevel = DebugLog);
+        //log en otro logger
+        virtual void Log(const std::string& logger, const std::string& mensaje,LogLevel logLevel = DebugLog);
+        //logs con contexto
+        virtual void LogConContexto(const std::string& contexto, const std::string& mensaje,LogLevel logLevel = DebugLog);
+        //logs en logger especifico con contexto
+        virtual void LogConContexto(const std::string& logger, const std::string& contexto, const std::string& mensaje,LogLevel logLevel = DebugLog);
+
+        virtual bool IsEnabledFor(GNC::GCS::IControladorLog::LogLevel logLevel);
+
+        void GetLogLevelsMap(GNC::GCS::IControladorLog::MapaLogLevels& levels);
+        virtual int GetLogLevelCode(const std::string& level);
+
+        virtual int GetActiveLogLevel();
+
+        void SetActiveLogLevel(int ll);
+
+};
+
+}
+
+//-------------------------------------------------------------------------------------------------
+//-------------------------------------------------------------------------------------------------
+#endif
diff --git a/cadxcore/main/controllers/controladorpermisos.cpp b/cadxcore/main/controllers/controladorpermisos.cpp
new file mode 100644
index 0000000..1fe1b00
--- /dev/null
+++ b/cadxcore/main/controllers/controladorpermisos.cpp
@@ -0,0 +1,312 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "controladorpermisos.h"
+#include "controladorlog.h"
+#include <wx/xml/xml.h>
+#include <wx/sstream.h>
+
+namespace GNC
+{
+
+ControladorPermisos* ControladorPermisos::m_pInstance = 0;
+
+ControladorPermisos::ControladorPermisos()
+{
+
+}
+
+ControladorPermisos::~ControladorPermisos()
+{
+        LimpiarPermisos();
+}
+
+ControladorPermisos* ControladorPermisos::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new ControladorPermisos();
+        }
+        return m_pInstance;
+}
+
+void ControladorPermisos::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = 0;
+        }
+}
+
+void ControladorPermisos::LimpiarPermisos()
+{
+        for(TipoIteradorMapaPermisosNamespace it = m_mapaPermisos.begin(); it!= m_mapaPermisos.end(); ++it) {
+                (*it).second->clear();
+                delete (*it).second;
+        }
+        m_mapaPermisos.clear();
+}
+
+//region "Realizacion de la interfaz IControladorPermisos
+
+/** Carga el fichero XML de permisos **/
+void ControladorPermisos::CargarXMLPermisos(const std::string& xmlPermisos, bool privados)
+{
+        wxStringInputStream input(wxString::FromUTF8(xmlPermisos.c_str()));
+        wxXmlDocument doc(input);
+        if(!doc.IsOk() || doc.GetRoot()->GetName() != wxT("permisos")) {
+                throw GNC::GCS::ControladorPermisosException("xml mal formado");
+        }
+
+        wxString wxNamespace;
+        wxString wxId;
+        wxString wxAccion;
+        wxString wxActivoPorDefecto;
+        wxString wxValorPorDefecto;
+        wxString wxValor;
+
+        std::string stdNamespace;
+        std::string stdId;
+        std::string stdAccion;
+        std::string stdValorPorDefecto;
+        std::string stdValor;
+
+        bool activoPorDefecto;
+        bool activo;
+
+        for(wxXmlNode* permiso = doc.GetRoot()->GetChildren(); permiso != NULL; permiso = permiso->GetNext()) {
+                if(permiso->GetName() == wxT("permiso")) {
+                        if(
+                                permiso->GetAttribute(wxT("namespace"), &wxNamespace) &&
+                                permiso->GetAttribute(wxT("id"), &wxId) &&
+                                permiso->GetAttribute(wxT("accion"), &wxAccion) &&
+                                permiso->GetAttribute(wxT("activopordefecto"), &wxActivoPorDefecto) ) {
+                                if (!permiso->GetAttribute(wxT("valorpordefecto"), &wxValorPorDefecto) || !permiso->GetAttribute(wxT("valor"), &wxValor) ) {
+                                        for (wxXmlNode* child = permiso->GetChildren(); child != NULL; child = child->GetNext()) {
+                                                if (child->GetChildren() == NULL) {
+                                                        continue;
+                                                }
+                                                if (child->GetName() == wxT("default_value")) {
+                                                        wxValorPorDefecto = child->GetChildren()->GetContent();
+                                                        wxValorPorDefecto.Trim();
+                                                } else if (child->GetName() == wxT("value")) {
+                                                        wxValor = child->GetChildren()->GetContent();
+                                                        wxValor.Trim();
+                                                }
+                                        }
+                                }
+
+                                stdNamespace = wxNamespace.ToUTF8();
+                                stdId = wxId.ToUTF8();
+                                stdAccion = wxAccion.ToUTF8();
+                                stdValorPorDefecto = wxValorPorDefecto.ToUTF8();
+                                stdValor = wxValor.ToUTF8();
+
+                                if (wxActivoPorDefecto == wxT("true")) {
+                                        activoPorDefecto = true;
+                                } else {
+                                        activoPorDefecto = false;
+                                }
+
+                                //se busca la definicion del permiso
+                                TipoMapaDefiniciones::iterator itDefinicion = m_mapaDefiniciones.find(stdNamespace + "." + stdId);
+                                //Si el permiso no esta definido asumimos que es privado
+
+                                bool esPrivado = true;
+                                if (itDefinicion != m_mapaDefiniciones.end()) {
+                                        esPrivado = itDefinicion->second.privado;
+                                }
+
+                                if((esPrivado && privados) || !esPrivado) {
+                                        //se establece si es privado y la carga incluye privados, o no es privado
+                                        TipoMapaPermisos* pMapaPermisos = GetMapaPermisos(stdNamespace);
+                                        if(pMapaPermisos == NULL) {
+                                                pMapaPermisos = new TipoMapaPermisos();
+                                                m_mapaPermisos[stdNamespace] = pMapaPermisos;
+                                        }
+
+                                        if(stdAccion == "activar") {
+                                                activo = true;
+                                        } else {
+                                                activo = false;
+                                        }
+
+                                        (*pMapaPermisos)[stdId] = GNC::GCS::Permisos::EstadoPermiso(stdValorPorDefecto, stdValor, activoPorDefecto, activo);
+                                }
+                        }
+                }
+        }
+}
+
+/** Resetea el estado y valor de todos los permisos a sus valores por defecto **/
+void ControladorPermisos::ResetearValoresPorDefecto()
+{
+        for (TipoMapaPermisosNamespace::iterator it = m_mapaPermisos.begin(); it != m_mapaPermisos.end(); ++it) {
+                TipoMapaPermisos* pNamespace = (*it).second;
+                for (TipoMapaPermisos::iterator it2 = pNamespace->begin(); it2 != pNamespace->end(); ++it2) {
+                        GNC::GCS::Permisos::EstadoPermiso& perm = (*it2).second;
+                        perm.Reset();
+                }
+        }
+}
+
+/** Metodo recomendado para obtener permisos **/
+GNC::GCS::Permisos::EstadoPermiso* ControladorPermisos::ObtenerPermiso(const std::string& stdNamespace, const std::string& idSujeto)
+{
+        TipoMapaPermisos* pNamespace = GetMapaPermisos(stdNamespace);
+        if(pNamespace != NULL) {
+                TipoMapaPermisos::iterator it = pNamespace->find(idSujeto);
+                if (it == pNamespace->end()) {
+                        return NULL;
+                } else {
+                        return &( (*it).second );
+                }
+        } else {
+                return NULL;
+        }
+}
+
+/** Metodo recomendado para comprobar permisos **/
+GNC::GCS::Permisos::EstadoPermiso ControladorPermisos::Get(const std::string& stdNamespace, const std::string& idSujeto)
+{
+        std::string clave = stdNamespace + "." + idSujeto;
+        TipoMapaPermisos* pNamespace = GetMapaPermisos(stdNamespace);
+        if(pNamespace != NULL) {
+                TipoMapaPermisos::iterator it = pNamespace->find(idSujeto);
+                if (it != pNamespace->end()) {
+                        return (*it).second;
+                }
+        }
+        // Si no esta establecido el permiso, devolvemos un permiso por defecto.
+        TipoMapaDefiniciones::iterator itd = m_mapaDefiniciones.find(clave);
+        if ( itd != m_mapaDefiniciones.end() ) { // Devolvemos un permiso por defecto
+                return (*itd).second.GenerarPermisoPorDefecto();
+        } else {
+                return GNC::GCS::Permisos::EstadoPermiso();
+        }
+
+}
+
+/** Anyade una nueva definicion de permiso al conjunto **/
+void ControladorPermisos::AddDefinicionPermiso(const std::string& espacioNombres, const std::string& descripcionNamespace, const std::string& id, const std::string& descripcion, bool privado, const std::string& valorPorDefecto, bool activoPorDefecto)
+{
+        std::string clave = espacioNombres + "." + id;
+        m_mapaDefiniciones[clave] =	TipoDefinicionPermiso(espacioNombres, descripcionNamespace, id, descripcion, privado, valorPorDefecto, activoPorDefecto);
+}
+// endregion
+
+GNC::ControladorPermisos::TipoMapaPermisos* ControladorPermisos::GetMapaPermisos(const std::string& stdNamespace)
+{
+        TipoIteradorMapaPermisosNamespace it = m_mapaPermisos.find(stdNamespace);
+        if(it != m_mapaPermisos.end()) {
+                return (*it).second;
+        }
+        return NULL;
+}
+
+const ControladorPermisos::TipoMapaDefiniciones& ControladorPermisos::GetMapaDefiniciones()
+{
+        return m_mapaDefiniciones;
+}
+
+ControladorPermisos::TipoMapaPermisosNamespace ControladorPermisos::GetPermisosFromXML(const std::string& xmlPermisos)
+{
+        TipoMapaPermisosNamespace mapaPermisos;
+        wxStringInputStream input(wxString::FromUTF8(xmlPermisos.c_str()));
+        wxXmlDocument doc(input);
+        if(!doc.IsOk() || doc.GetRoot()->GetName() != wxT("permisos")) {
+                throw GNC::GCS::ControladorPermisosException("xml mal formado");
+        }
+
+        wxString wxNamespace;
+        wxString wxId;
+        wxString wxAccion;
+        wxString wxActivoPorDefecto;
+        wxString wxValorPorDefecto;
+        wxString wxValor;
+
+        std::string stdNamespace;
+        std::string stdId;
+        std::string stdAccion;
+        std::string stdValorPorDefecto;
+        std::string stdValor;
+
+        bool activoPorDefecto;
+        bool activo;
+
+        for(wxXmlNode* permiso = doc.GetRoot()->GetChildren(); permiso != NULL; permiso = permiso->GetNext()) {
+                if(permiso->GetName() == wxT("permiso")) {
+                        if(
+                                permiso->GetAttribute(wxT("namespace"), &wxNamespace) &&
+                                permiso->GetAttribute(wxT("id"), &wxId) &&
+                                permiso->GetAttribute(wxT("accion"), &wxAccion) &&
+                                permiso->GetAttribute(wxT("activopordefecto"), &wxActivoPorDefecto) ) {
+                                if (!permiso->GetAttribute(wxT("valorpordefecto"), &wxValorPorDefecto) || !permiso->GetAttribute(wxT("valor"), &wxValor) ) {
+                                        for (wxXmlNode* child = permiso->GetChildren(); child != NULL; child = child->GetNext()) {
+                                                if (child->GetChildren() == NULL) {
+                                                        continue;
+                                                }
+                                                if (child->GetName() == wxT("default_value")) {
+                                                        wxValorPorDefecto = child->GetChildren()->GetContent();
+                                                        wxValorPorDefecto.Trim();
+                                                } else if (child->GetName() == wxT("value")) {
+                                                        wxValor = child->GetChildren()->GetContent();
+                                                        wxValor.Trim();
+                                                }
+                                        }
+                                }
+
+                                stdNamespace = wxNamespace.ToUTF8();
+                                stdId = wxId.ToUTF8();
+                                stdAccion = wxAccion.ToUTF8();
+                                stdValorPorDefecto = wxValorPorDefecto.ToUTF8();
+                                stdValor = wxValor.ToUTF8();
+
+                                if (wxActivoPorDefecto == wxT("true")) {
+                                        activoPorDefecto = true;
+                                } else {
+                                        activoPorDefecto = false;
+                                }
+
+                                //se busca la definicion del permiso
+                                TipoMapaPermisos* pMapaPermisos = NULL;
+                                TipoIteradorMapaPermisosNamespace itBuscar = mapaPermisos.find(stdNamespace);
+                                if(itBuscar != mapaPermisos.end()) {
+                                        pMapaPermisos = (*itBuscar).second;
+                                }
+                                if(pMapaPermisos == NULL) {
+                                        pMapaPermisos = new TipoMapaPermisos();
+                                        mapaPermisos[stdNamespace] = pMapaPermisos;
+                                }
+                                if(stdAccion == "activar") {
+                                        activo = true;
+                                } else {
+                                        activo = false;
+                                }
+
+                                (*pMapaPermisos)[stdId] = GNC::GCS::Permisos::EstadoPermiso(stdValorPorDefecto, stdValor, activoPorDefecto, activo);
+                        }
+                }
+        }
+        return mapaPermisos;
+}
+
+
+}
+
diff --git a/cadxcore/main/controllers/controladorpermisos.h b/cadxcore/main/controllers/controladorpermisos.h
new file mode 100644
index 0000000..078db92
--- /dev/null
+++ b/cadxcore/main/controllers/controladorpermisos.h
@@ -0,0 +1,114 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include <map>
+#include <string>
+
+namespace GNC
+{
+class ControladorPermisos: public GNC::GCS::IControladorPermisos
+{
+public:
+
+        typedef std::map<std::string, GNC::GCS::Permisos::EstadoPermiso> TipoMapaPermisos; //se indexan por id
+        typedef TipoMapaPermisos::iterator TipoIteradorMapaPermisos;
+        typedef std::map<std::string, TipoMapaPermisos*> TipoMapaPermisosNamespace; //se indexan por namespace
+        typedef TipoMapaPermisosNamespace::iterator TipoIteradorMapaPermisosNamespace;
+
+        typedef struct TipoDefinicionPermiso {
+                std::string espacioNombres;
+                std::string id;
+                std::string descripcion;
+                std::string descripcionNamespace;
+
+                bool        activoPorDefecto;
+                std::string valorPorDefecto;
+
+                bool privado;
+
+                TipoDefinicionPermiso ()
+                {
+                        this->activoPorDefecto = true;
+                        this->privado = false;
+                }
+
+                TipoDefinicionPermiso (const std::string& espacioNombres, const std::string& descripcionNamespace, const std::string& id, const std::string& descripcion, bool privado, const std::string& valorPorDefecto, bool activoPorDefecto)
+                {
+                        this->espacioNombres = espacioNombres;
+                        this->id = id;
+                        this->descripcion = descripcion;
+                        this->descripcionNamespace = descripcionNamespace;
+                        this->privado = privado;
+                        this->activoPorDefecto = activoPorDefecto;
+                        this->valorPorDefecto = valorPorDefecto;
+                }
+
+                GNC::GCS::Permisos::EstadoPermiso GenerarPermisoPorDefecto()
+                {
+                        return GNC::GCS::Permisos::EstadoPermiso(valorPorDefecto, activoPorDefecto);
+                }
+
+        } TipoDefinicionPermiso;
+
+        typedef std::map<std::string, TipoDefinicionPermiso> TipoMapaDefiniciones;
+
+        static ControladorPermisos* Instance();
+        static void FreeInstance();
+
+        const TipoMapaDefiniciones& GetMapaDefiniciones();
+        TipoMapaPermisosNamespace GetPermisosFromXML(const std::string& xmlPermisos);
+
+        //region "Realizacion de la interfaz IControladorPermisos
+
+        /** Carga el fichero XML de permisos **/
+        virtual void CargarXMLPermisos(const std::string& xmlPermisos, bool privados = false);
+
+        /** Resetea el estado y valor de todos los permisos a sus valores por defecto **/
+        virtual void ResetearValoresPorDefecto();
+
+        /** Metodo recomendado para obtener permisos **/
+        virtual GNC::GCS::Permisos::EstadoPermiso* ObtenerPermiso(const std::string& stdNamespace, const std::string& idSujeto);
+
+        /** Metodo recomendado para comprobar permisos **/
+        virtual GNC::GCS::Permisos::EstadoPermiso Get(const std::string& stdNamespace, const std::string& idSujeto);
+
+        /** Anyade una nueva definicion de permiso al conjunto **/
+        virtual void AddDefinicionPermiso(const std::string& espacioNombres, const std::string& descripcionNamespace, const std::string& id, const std::string& descripcion, bool privado, const std::string& valorPorDefecto, bool activoPorDefecto);
+        // endregion
+
+
+protected:
+        ControladorPermisos();
+        ~ControladorPermisos();
+        void LimpiarPermisos();
+        TipoMapaPermisos* GetMapaPermisos(const std::string& stdNamespace);
+        //bool GetPermitido(TipoMapaPermisos* pMapaPermisos, const std::string& idSujeto);
+
+protected:
+        static ControladorPermisos* m_pInstance;
+
+        TipoMapaPermisosNamespace   m_mapaPermisos;
+        TipoMapaDefiniciones		m_mapaDefiniciones;
+
+};
+}
diff --git a/cadxcore/main/controllers/controladorvistas.cpp b/cadxcore/main/controllers/controladorvistas.cpp
new file mode 100644
index 0000000..0e8d41d
--- /dev/null
+++ b/cadxcore/main/controllers/controladorvistas.cpp
@@ -0,0 +1,541 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <cmath>
+#include <algorithm>
+
+#include <wx/wx.h>
+#include <wx/arrstr.h>
+#include <wx/image.h>
+
+#include "controladorvistas.h"
+
+
+#include <api/ivista.h>
+#include <eventos/modificacionfichero.h>
+
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/entorno.h>
+
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/inactivitycontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/controladorpermisos.h>
+
+
+#include <iostream>
+#include <sstream>
+#include <string>
+
+#include <main/gui/mainwindow/detacheddialog.h>
+
+//region "Patron singleton"
+
+GNC::GCS::ControladorVistas* GNC::GCS::ControladorVistas::m_pInstance = 0;
+
+GNC::GCS::ControladorVistas::ControladorVistas()
+{
+        m_pVistaActiva   = NULL;
+
+        //se conecta el evento Ginkgo
+        GNC::GCS::Events::EventoModificacionFichero evtModificado;
+        GNC::Entorno::Instance()->GetControladorEventos()->Registrar(this, evtModificado);
+}
+
+GNC::GCS::ControladorVistas::~ControladorVistas()
+{
+}
+
+GNC::GCS::ControladorVistas* GNC::GCS::ControladorVistas::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new GNC::GCS::ControladorVistas();
+        }
+        return m_pInstance;
+}
+
+void GNC::GCS::ControladorVistas::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+//endregion
+
+
+wxWindow* GNC::GCS::ControladorVistas::GetRootWindow()
+{
+        return GNC::Entorno::Instance()->GetVentanaPrincipal()->GetRootWindow();
+}
+
+GNC::GCS::IVista* GNC::GCS::ControladorVistas::ObtenerVistaRegistrada(wxWindow* pVentana)
+{
+        GNC::GCS::IVista* pVista = NULL;
+
+        MapaVentanas::iterator it = m_MapaVentanas.find(pVentana);
+        if (it != m_MapaVentanas.end()) {
+                pVista = (*it).second;
+        }
+
+        return pVista;
+}
+
+void GNC::GCS::ControladorVistas::Freeze()
+{
+        VentanaPrincipal* v = GNC::Entorno::Instance()->GetVentanaPrincipal();
+        v->SuperFreeze();
+}
+
+void GNC::GCS::ControladorVistas::Thaw()
+{
+        VentanaPrincipal* v = GNC::Entorno::Instance()->GetVentanaPrincipal();
+        v->SuperThaw();
+}
+
+void GNC::GCS::ControladorVistas::SetTitulo(GNC::GCS::IVista* pVista, const std::string& tituloNuevo)
+{
+        //resets inactivity
+        GNC::GCS::InactivityController::Instance()->ResetsInactivity();
+        //
+        wxWindow* pVentana = NULL;
+        int numConteo = 0;
+        bool cambia = true;
+
+        pVentana = pVista->GetWindow();
+        if (pVentana == NULL) {
+                LOG_WARN("Core/ControladorVistas", "No se pudo obtener la ventana asociada a la vista. Inconsistencia interna");
+                return;
+        } else {
+                // Buscamos el titulo actual que tiene asociado la vista compuesta, de haberlo.
+                MapaTitulosRegistrados::iterator it = m_MapaTitulosRegistrados.find(pVista);
+                if (it != m_MapaTitulosRegistrados.end()) { // Ya esta registrado.
+                        const std::string& tituloActual = (*it).second;
+                        if (tituloNuevo != tituloActual) { // El titulo ha cambiado
+
+                                // Buscamos el titulo antiguo del registro y lo borramos.
+
+                                MapaConteoTitulos::iterator it2 = m_MapaConteoTitulos.find(tituloActual);
+                                if (it2 != m_MapaConteoTitulos.end()) {
+                                        MapaConteoRegistros& registrosConteo = (*it2).second;
+                                        MapaConteoRegistros::iterator it3 = registrosConteo.find(pVista);
+                                        if (it3 != registrosConteo.end()) {
+                                                registrosConteo.erase(it3); // Eliminamos la entrada de la vista para ese titulo
+                                                if (registrosConteo.empty()) { // Si no hay mas entradas de vista para ese titulo, eliminamos el registro de vistas asociadas a los titulos.
+                                                        m_MapaConteoTitulos.erase(it2);
+                                                }
+                                        } else {
+                                                LOG_WARN("Core/ControladorVistas", "Se ha detectado una inconsistencia interna en el registro de conteos de titulos.");
+                                        }
+                                } else {
+                                        LOG_WARN("Core/ControladorVistas", "Se ha detectado una inconsistencia interna en el registro de titulos de ventanas.");
+                                }
+
+                                m_MapaTitulosRegistrados.erase(it); // Borramos el registro de titulo de la vista
+                        } else { // El titulo no cambia
+                                cambia = false;
+                        }
+                }
+        }
+
+        if (cambia) {
+
+                // Buscamos el titulo nuevo que tiene asociado la vista compuesta, de haberlo.
+                MapaTitulosRegistrados::iterator it = m_MapaTitulosRegistrados.find(pVista);
+                if (it == m_MapaTitulosRegistrados.end()) { // No esta registrado.
+                        m_MapaTitulosRegistrados[pVista] = tituloNuevo;
+                }
+
+                MapaConteoTitulos::iterator it2 = m_MapaConteoTitulos.find(tituloNuevo);
+                if (it2 != m_MapaConteoTitulos.end()) { // Ya hay ventanas registradas con este titulo
+                        MapaConteoRegistros& registrosConteo = (*it2).second;
+                        MapaConteoRegistros::iterator it3 = registrosConteo.find(pVista);
+                        if (it3 != registrosConteo.end()) {
+                                LOG_WARN("Core/ControladorVistas", "Entrada duplicada en el registro de conteos de titulos. Inconsistencia interna");
+                                registrosConteo.erase(it3);
+                        }
+                        for (MapaConteoRegistros::iterator it3 = registrosConteo.begin(); it3 != registrosConteo.end(); ++it3) {
+                                const int num = (*it3).second + 1;
+                                numConteo = numConteo > num ? numConteo : num;
+                        }
+                        registrosConteo[pVista] = numConteo;
+                } else {
+                        MapaConteoRegistros registroConteo;
+                        registroConteo[pVista] = 0;
+                        m_MapaConteoTitulos[tituloNuevo] = registroConteo;
+                }
+        }
+
+        std::ostringstream os;
+        if (pVista->SoportaGuardar() && pVista->EstaModificada()) {
+                os << "* ";
+        }
+        os << tituloNuevo;
+        if (numConteo > 0) {
+                os << " (" << numConteo + 1 << ")";
+        }
+
+        wxAuiNotebook* nb = dynamic_cast<wxAuiNotebook*> (pVentana->GetParent());
+        if (nb != NULL) {
+                int idx = nb->GetPageIndex(pVentana);
+                if (idx != wxNOT_FOUND) {
+                        nb->SetPageText(idx, wxString::FromUTF8(os.str().c_str()));
+                } else {
+                        LOG_WARN("Core/ControladorVistas", "No se encontro el tab asociado. Inconsistencia interna");
+                }
+        } else {
+
+                GNC::GUI::DetachedDialog* dd = dynamic_cast<GNC::GUI::DetachedDialog*> (pVentana->GetParent());
+                if(dd != NULL) {
+                        dd->SetTitulo(wxString::FromUTF8(os.str().c_str()));
+                } else {
+                        //it's startup view
+                        //LOG_WARN("Core/ControladorVistas", "No se encontro el panel o dialogo desencajado asociado a la vista. Inconsistencia interna");
+                }
+        }
+
+}
+
+std::string GNC::GCS::ControladorVistas::GetTitulo(GNC::GCS::IVista* pVista)
+{
+        //resets inactivity
+        GNC::GCS::InactivityController::Instance()->ResetsInactivity();
+        //
+
+        wxWindow* pVentana = NULL;
+
+        pVentana = pVista->GetWindow();
+        if (pVentana == NULL) {
+                LOG_WARN("Core/ControladorVistas", "No se pudo obtener la ventana asociada a la vista. Inconsistencia interna");
+                return std::string("");
+        }
+
+        wxAuiNotebook* nb = dynamic_cast<wxAuiNotebook*> (pVentana->GetParent());
+        if (nb != NULL) {
+                int idx = nb->GetPageIndex(pVentana);
+                if (idx != wxNOT_FOUND) {
+                        return std::string(nb->GetPageText(idx).ToUTF8());
+                } else {
+                        LOG_WARN("Core/ControladorVistas", "No se pudo obtener el tab asociado a la vista. Inconsistencia interna");
+                        return std::string("");
+                }
+        } else {
+                GNC::GUI::DetachedDialog* dd = dynamic_cast<GNC::GUI::DetachedDialog*> (pVentana->GetParent());
+                if(dd!=NULL) {
+                        return std::string(dd->GetTitulo().ToUTF8());
+                } else {
+                        LOG_WARN("Core/ControladorVistas", "No se encontro el panel o dialogo desencajado asociado a la vista. Inconsistencia interna");
+                        return std::string("");
+                }
+        }
+}
+
+void GNC::GCS::ControladorVistas::PropagarConfiguracionCambiada()
+{
+        GNC::GCS::ILocker lock(this);
+        for (MapaVentanas::iterator it = m_MapaVentanas.begin(); it != m_MapaVentanas.end(); ++it) {
+                GNC::GCS::IVista* pVista = (*it).second;
+                pVista->OnConfiguracionCambiada();
+        }
+}
+
+void GNC::GCS::ControladorVistas::Registrar(GNC::GCS::IVista* pVista)
+{
+        //resets inactivity
+        GNC::GCS::InactivityController::Instance()->ResetsInactivity();
+        //
+
+        GNC::GCS::ILocker lock(this);
+        if (pVista == NULL) {
+                LOG_WARN("Core/ControladorVistas", "No se puede registrar una vista nula");
+                return;
+        }
+        wxWindow* pVentana = pVista->GetWindow();
+        if (pVentana == NULL) {
+                LOG_WARN("Core/ControladorVistas", "No se puede registrar una vista con ventana nula");
+                return;
+        }
+
+        MapaVentanas::iterator it = m_MapaVentanas.find(pVentana);
+        if (it != m_MapaVentanas.end()) {
+                LOG_WARN("Core/ControladorVistas", "La vista ya estaba registrada. Posible inconsistencia interna");
+        } else {
+                m_MapaVentanas[pVentana] = pVista;
+        }
+        GNC::Entorno::Instance()->GetVentanaPrincipal()->InsertarVentana(pVentana);
+}
+
+void GNC::GCS::ControladorVistas::Destruir(GNC::GCS::IVista* pVista)
+{
+        //resets inactivity
+        GNC::GCS::InactivityController::Instance()->ResetsInactivity();
+        //
+
+        Lock();
+        GTRACE("ControladorVistas::DestruirVista(GNC::GCS::IVista* pVista = " << pVista << ")");
+
+        if (pVista != NULL) {
+                wxWindow* pVentana = pVista->GetWindow();
+                MapaVentanas::iterator it = m_MapaVentanas.find(pVentana);
+                if (it != m_MapaVentanas.end()) {
+                        m_MapaVentanas.erase(it);
+                        PropagarVistaDestruida(pVista);
+                } else {
+                        LOG_WARN("Core/ControladorVistas", "Error al destruir vista: La ventana asociada a la vista no estaba registrada. Posible inconsistencia interna");
+                }
+        }
+        UnLock();
+}
+
+
+void GNC::GCS::ControladorVistas::Destruir(wxWindow* pVentana)
+{
+
+        if (pVentana)
+                pVentana->Hide();
+
+        //resets inactivity
+        GNC::GCS::InactivityController::Instance()->ResetsInactivity();
+        //
+
+        Lock();
+        GTRACE("ControladorVistas::DestruirVista(wxWindow* pVentana = " << pVentana << ")");
+
+        if (pVentana != NULL) {
+
+                MapaVentanas::iterator it = m_MapaVentanas.find(pVentana);
+                if (it != m_MapaVentanas.end()) {
+                        GNC::GCS::IVista* pVista = (*it).second;
+                        m_MapaVentanas.erase(it);
+                        PropagarVistaDestruida(pVista);
+                } else {
+                        //LOG_WARN("Core/ControladorVistas", "Error al destruir ventana: La ventana no estaba registrada. Posible inconsistencia interna");
+                }
+        }
+        UnLock();
+}
+
+
+//region "Gestion de carga y descarga de vistas"
+
+void GNC::GCS::ControladorVistas::SolicitarActivarVista(GNC::GCS::IVista* pVista)
+{
+        //resets inactivity
+        GNC::GCS::InactivityController::Instance()->ResetsInactivity();
+        //
+
+        if (pVista == m_pVistaActiva) {
+                return;
+        }
+
+        Freeze();
+
+        if (m_pVistaActiva != NULL) {
+                m_pVistaActiva->Desactivar();
+                m_pVistaActiva->GetWindow()->Refresh();
+        }
+
+        m_pVistaActiva = pVista;
+
+        GTRACE("GNC::GCS::ControladorVistas::SolicitarActivarVista(" << pVista << ")");
+
+
+        if (pVista != NULL) {
+                pVista->Activar();
+                m_pVistaActiva->GetWindow()->Refresh();
+        }
+
+        GNC::Entorno* pEntorno = GNC::Entorno::Instance();
+        Entorno::ViewsObserversList::const_iterator it;
+        for (it = pEntorno->ViewsObservers.begin(); it != pEntorno->ViewsObservers.end(); ++it) {
+                IObservadorVistas* oe = *it;
+                oe->OnVistaActivada(pVista);
+        }
+
+        Thaw();
+}
+
+
+//endregion
+
+//region "Propagación de eventos"
+
+void GNC::GCS::ControladorVistas::PropagarVistaCreada(GNC::GCS::IVista* pVista)
+{
+        //resets inactivity
+        GNC::GCS::InactivityController::Instance()->ResetsInactivity();
+        //
+
+        GNC::Entorno* pEntorno = GNC::Entorno::Instance();
+        Entorno::ViewsObserversList::const_iterator it;
+        for (it = pEntorno->ViewsObservers.begin(); it != pEntorno->ViewsObservers.end(); ++it) {
+                IObservadorVistas* ov = *it;
+                ov->OnVistaCreada(pVista);
+        }
+}
+
+inline bool my_isnan(double x)
+{
+        return x != x;
+}
+
+void GNC::GCS::ControladorVistas::PropagarVistaDestruida(GNC::GCS::IVista* pVista)
+{
+        //resets inactivity
+        GNC::GCS::InactivityController::Instance()->ResetsInactivity();
+        //
+
+        if (pVista == NULL) {
+                LOG_WARN("Core/ControladorVistas", "Error al propagar destruccion de vista. Vista nula. Inconsistencia interna");
+                return;
+        }
+
+        GNC::Entorno* pEntorno = GNC::Entorno::Instance();
+
+        MapaTitulosRegistrados::iterator it = m_MapaTitulosRegistrados.find(pVista);
+        if (it != m_MapaTitulosRegistrados.end()) { // Esta registrado.
+                const std::string& titulo = (*it).second;
+                MapaConteoTitulos::iterator it2 = m_MapaConteoTitulos.find(titulo);
+                if (it2 != m_MapaConteoTitulos.end()) {
+                        MapaConteoRegistros& registrosConteo = (*it2).second;
+                        MapaConteoRegistros::iterator it3 = registrosConteo.find(pVista);
+                        if (it3 != registrosConteo.end()) {
+                                registrosConteo.erase(it3); // Eliminamos la entrada de la vista para ese titulo
+                                if (registrosConteo.empty()) { // Si no hay mas entradas de vista para ese titulo, eliminamos el registro de vistas asociadas a los titulos.
+                                        m_MapaConteoTitulos.erase(it2);
+                                }
+                        } else {
+                                LOG_WARN("Core/ControladorVistas", "Se ha detectado una inconsistencia interna en el registro de conteos de titulos.");
+                        }
+                } else {
+                        LOG_WARN("Core/ControladorVistas", "Se ha detectado una inconsistencia interna en el registro de titulos de ventanas.");
+                }
+                m_MapaTitulosRegistrados.erase(it); // Borramos el registro de titulo de la vista
+        } else {
+                LOG_WARN("Core/ControladorVistas", "Destruccion de vista sin titulo registrado.");
+        }
+
+        Entorno::ViewsObserversList::const_iterator ito;
+        for (ito = pEntorno->ViewsObservers.begin(); ito != pEntorno->ViewsObservers.end(); ++ito) {
+                IObservadorVistas* ov = *ito;
+                ov->OnVistaDestruida(pVista);
+        }
+
+        //se desactiva la vista y se desreferencia si es la activa
+        pVista->Desactivar();
+        if (pVista == m_pVistaActiva) {
+                SolicitarActivarVista(NULL);
+        }
+}
+
+//endregion
+
+//region "Getters de vistas activas"
+GNC::GCS::IVista* GNC::GCS::ControladorVistas::GetVistaActiva()
+{
+        return m_pVistaActiva;
+}
+//endregion
+
+//region "Gestión de paneles extra"
+
+void GNC::GCS::ControladorVistas::MostrarPanelFlotante(wxWindow* win, int x, int y)
+{
+        GTRACE("ControladorVistas::MostrarPanel(" << win << ")")
+        VentanaPrincipal* vp = GNC::Entorno::Instance()->GetVentanaPrincipal();
+        if (vp == NULL) {
+                throw std::exception();
+        }
+        vp->Freeze();
+        //std::cout << "Mostrando panel " << win << std::endl;
+        vp->m_mgr.GetPane(win).Show(true);
+        //se muestra abajo
+        wxAuiPaneInfo& pi = vp->m_mgr.GetPane(win);
+        if (!pi.IsFloating()) {
+                pi.Float();
+        }
+        pi.FloatingSize(pi.best_size);
+        pi.FloatingPosition(x,y);
+        vp->m_mgr.Update();
+        vp->Layout();
+        vp->Thaw();
+}
+
+bool GNC::GCS::ControladorVistas::EsVisible(wxWindow* win)
+{
+        VentanaPrincipal* vp = GNC::Entorno::Instance()->GetVentanaPrincipal();
+        if (vp == NULL) {
+                throw std::exception();
+        }
+        wxAuiPaneInfo pi = vp->m_mgr.GetPane(win);
+        return pi.IsShown();
+}
+
+void GNC::GCS::ControladorVistas::OcultarPanel(wxWindow* win)
+{
+        GTRACE("ControladorVistas::OcultarPanel(" << win << ")")
+        VentanaPrincipal* vp = GNC::Entorno::Instance()->GetVentanaPrincipal();
+        if (vp == NULL) {
+                throw std::exception();
+        }
+        vp->SuperFreeze();
+        //std::cout << "Ocultando panel " << win << std::endl;
+        vp->m_mgr.GetPane(win).Hide();
+        vp->m_mgr.Update();
+        vp->Layout();
+        vp->SuperThaw();
+}
+
+GNC::GCS::ControladorVistas::TipoListaVistas GNC::GCS::ControladorVistas::GetVistas()
+{
+        //resets inactivity
+        GNC::GCS::InactivityController::Instance()->ResetsInactivity();
+        //
+
+        GNC::GCS::ControladorVistas::TipoListaVistas result;
+
+        for(MapaVentanas::iterator it = m_MapaVentanas.begin(); it!= m_MapaVentanas.end(); ++it) {
+                result.push_back((*it).second);
+        }
+
+        return result;
+}
+
+
+void GNC::GCS::ControladorVistas::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        GNC::GCS::Events::EventoModificacionFichero* pEvt = dynamic_cast<GNC::GCS::Events::EventoModificacionFichero*>(evt);
+
+        GNC::GCS::IVista* pVista = NULL;
+
+        if(pEvt != NULL && pEvt->GetVistaModificada()!=NULL) {
+                if(pEvt->GetTipoEvento() == GNC::GCS::Events::EventoModificacionFichero::FicheroGuardado) {
+                        pVista = pEvt->GetVistaModificada();
+                } else if(pEvt->GetTipoEvento() == GNC::GCS::Events::EventoModificacionFichero::FicheroModificado) {
+                        pVista = pEvt->GetVistaModificada();
+                }
+        }
+
+        if (pVista != NULL) {
+                SetTitulo(pVista, pVista->GetTitulo());
+        }
+
+}
diff --git a/cadxcore/main/controllers/controladorvistas.h b/cadxcore/main/controllers/controladorvistas.h
new file mode 100644
index 0000000..8b7e7fa
--- /dev/null
+++ b/cadxcore/main/controllers/controladorvistas.h
@@ -0,0 +1,123 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <map>
+
+#include <api/globals.h>
+#include <api/ilock.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/observers/ieventsobserver.h>
+
+class wxAuiNotebook;
+
+namespace GNC
+{
+
+namespace GCS
+{
+class ControladorVistas : public IControladorVistas, public GNC::GCS::IEventsObserver, public GNC::GCS::ILockable
+{
+
+//region "Patron singleton"
+public:
+        static ControladorVistas* Instance();
+        static void FreeInstance();
+
+        static ControladorVistas* m_pInstance;
+//endregion
+
+//region "Interfaz de controlador de vistas"
+public:
+
+        virtual void Freeze();
+        virtual void Thaw();
+
+        /* Obtiene la ventana raiz (NoteBook) que es padre de las ventanas al inicio. */
+        virtual wxWindow* GetRootWindow();
+
+        /* Obtiene la vista registrada asociada a una ventana */
+        GNC::GCS::IVista* ObtenerVistaRegistrada(wxWindow* pVentana);
+
+        virtual void SetTitulo(GNC::GCS::IVista* pVista, const std::string& titulo);
+        virtual std::string GetTitulo(GNC::GCS::IVista* pVista);
+
+        virtual void Registrar(GNC::GCS::IVista*  pVista);
+        virtual void Destruir(GNC::GCS::IVista*   pVista);
+        virtual void Destruir(wxWindow* pVentana);
+
+        virtual void PropagarConfiguracionCambiada();
+//endregion
+
+//region "Getters de vistas activas"
+
+        virtual GNC::GCS::IVista* GetVistaActiva();
+
+//endregion
+
+
+//region "Gestion de carga y descarga de vistas"
+
+        virtual void SolicitarActivarVista(GNC::GCS::IVista* pVista);
+
+//endregion
+
+//region "Propagación de eventos"
+        virtual void PropagarVistaCreada(GNC::GCS::IVista* pVista);
+        virtual void PropagarVistaDestruida(GNC::GCS::IVista* pVista);
+//endregion
+
+//region "Gestión de paneles extra"
+
+        virtual void MostrarPanelFlotante(wxWindow* win, int x = -1, int y = -1);
+
+        virtual bool EsVisible(wxWindow* win);
+
+        virtual void OcultarPanel(wxWindow* win);
+
+//endregion
+
+        //region "interfaz de eventos"
+        void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+        //endregion
+
+        virtual TipoListaVistas GetVistas();
+
+        typedef std::map<wxWindow*, GNC::GCS::IVista*> MapaVentanas;
+        typedef std::map<GNC::GCS::IVista*, int> MapaConteoRegistros; // Tupla de registro de repeticion por vista
+        typedef std::map<std::string, MapaConteoRegistros > MapaConteoTitulos;
+        typedef std::map<GNC::GCS::IVista*, std::string> MapaTitulosRegistrados;
+
+        MapaVentanas           m_MapaVentanas;
+        MapaConteoTitulos      m_MapaConteoTitulos;
+        MapaTitulosRegistrados m_MapaTitulosRegistrados;
+
+protected:
+        /* Constructor. Se mantiene una referencia a la ventana principal por ser ella la responsable de crear "tabs" */
+        ControladorVistas();
+        ~ControladorVistas();
+
+protected:
+        GNC::GCS::IVista*                   m_pVistaActiva;
+};
+}
+}
diff --git a/cadxcore/main/controllers/dcmtk/dicomassociation.cpp b/cadxcore/main/controllers/dcmtk/dicomassociation.cpp
new file mode 100644
index 0000000..eb4a750
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomassociation.cpp
@@ -0,0 +1,466 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/controladorlog.h>
+#include "dicomassociation.h"
+#include "dicomnetwork.h"
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+#include <dcmtk/dcmdata/dcdeftag.h>
+#include <dcmtk/dcmdata/dcuid.h>     /* for dcmtk version name */
+#include <dcmtk/dcmjpeg/djdecode.h>  /* for dcmjpeg decoders */
+#include <dcmtk/dcmjpeg/djencode.h>  /* for dcmjpeg encoders */
+#include <dcmtk/dcmjpeg/djrplol.h>   /* for DJ_RPLossless */
+#include <dcmtk/dcmjpeg/djrploss.h>  /* for DJ_RPLossy */
+#include <dcmtk/dcmjpeg/dipijpeg.h>  /* for dcmimage JPEG plugin */
+#include <dcmtk/dcmimage/diregist.h>  /* include to support color images */
+#include <dcmtk/ofstd/ofcmdln.h>
+#include <dcmtk/dcmnet/diutil.h>
+
+#include <dcmtk/dcmjpeg/djencode.h>
+#include <dcmtk/dcmjpeg/djdecode.h>
+#include <dcmtk/dcmjpeg/djrplol.h>
+#include <dcmtk/dcmjpeg/djrploss.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+
+const char* Association::AllTransferSyntaxes[] = {
+        UID_LittleEndianImplicitTransferSyntax,	          /// Implicit VR Little Endian: Default Transfer Syntax for DICOM
+        UID_LittleEndianExplicitTransferSyntax,           /// Explicit VR Little Endian
+        UID_BigEndianExplicitTransferSyntax,              /// Explicit VR Big Endian
+        UID_DeflatedExplicitVRLittleEndianTransferSyntax, /// Deflated Explicit VR Little Endian
+        UID_JPEGProcess1TransferSyntax,                   /// JPEG Baseline (Process 1): Default Transfer Syntax for Lossy JPEG 8 Bit Image Compression
+        UID_JPEGProcess2_4TransferSyntax,                 /// JPEG Extended (Process 2 & 4): Default Transfer Syntax for Lossy JPEG 12 Bit Image Compression (Process 4 only)
+//	UID_JPEGProcess3_5TransferSyntax,                 /// JPEG Extended (Process 3 & 5) - RETIRED
+//	UID_JPEGProcess6_8TransferSyntax,                 /// JPEG Spectral Selection, Non-Hierarchical (Process 6 & 8) - RETIRED
+//	UID_JPEGProcess7_9TransferSyntax,                 /// JPEG Spectral Selection, Non-Hierarchical (Process 7 & 9) - RETIRED
+//	UID_JPEGProcess10_12TransferSyntax,               /// JPEG Full Progression, Non-Hierarchical (Process 10 & 12) - RETIRED
+//	UID_JPEGProcess11_13TransferSyntax,               /// JPEG Full Progression, Non-Hierarchical (Process 11 & 13) - RETIRED
+        UID_JPEGProcess14TransferSyntax,                  /// JPEG Lossless, Non-Hierarchical (Process 14)
+//	UID_JPEGProcess15TransferSyntax,                  /// JPEG Lossless, Non-Hierarchical (Process 15) - RETIRED
+//	UID_JPEGProcess16_18TransferSyntax,               /// JPEG Extended, Hierarchical (Process 16 & 18) - RETIRED
+//	UID_JPEGProcess17_19TransferSyntax,               /// JPEG Extended, Hierarchical (Process 17 & 19) - RETIRED
+//	UID_JPEGProcess20_22TransferSyntax,               /// JPEG Spectral Selection, Hierarchical (Process 20 & 22) - RETIRED
+//	UID_JPEGProcess21_23TransferSyntax,               /// JPEG Spectral Selection, Hierarchical (Process 21 & 23) - RETIRED
+//	UID_JPEGProcess24_26TransferSyntax,               /// JPEG Full Progression, Hierarchical (Process 24 & 26) - RETIRED
+//	UID_JPEGProcess25_27TransferSyntax,               /// JPEG Full Progression, Hierarchical (Process 25 & 27) - RETIRED
+//	UID_JPEGProcess28TransferSyntax,                  /// JPEG Lossless, Hierarchical (Process 28) - RETIRED
+//	UID_JPEGProcess29TransferSyntax,                  /// JPEG Lossless, Hierarchical (Process 29) - RETIRED
+        UID_JPEGProcess14SV1TransferSyntax,               /// JPEG Lossless, Non-Hierarchical, First-Order Prediction (Process 14 [Selection Value 1]): Default Transfer Syntax for Lossless JPEG Image Compression
+        UID_JPEGLSLosslessTransferSyntax,                 /// JPEG-LS Lossless Image Compression
+        UID_JPEGLSLossyTransferSyntax,                    /// JPEG-LS Lossy (Near-Lossless) Image Compression
+        UID_JPEG2000LosslessOnlyTransferSyntax,           /// JPEG 2000 Image Compression (Lossless Only)
+        UID_JPEG2000TransferSyntax,                       /// JPEG 2000 Image Compression (Lossless or Lossy)
+        UID_JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax, /// JPEG 2000 Part 2 Multi-component Image Compression (Lossless Only)
+        UID_JPEG2000Part2MulticomponentImageCompressionTransferSyntax,             /// JPEG 2000 Part 2 Multi-component Image Compression (Lossless or Lossy)
+        UID_RLELosslessTransferSyntax,                  /// RLE Lossless
+        UID_MPEG2MainProfileAtMainLevelTransferSyntax, /// MPEG2 Main Profile @ Main Level
+        UID_MPEG2MainProfileAtHighLevelTransferSyntax, /// MPEG2 Main Profile @ High Level
+        "1.2.840.10008.1.2.4.102",                     /// MPEG-4 AVC/H.264 High Profile / Level 4.1
+        "1.2.840.10008.1.2.4.103"                      /// MPEG-4 AVC/H.264 BD-compatible High Profile / Level 4.1
+
+};
+
+const unsigned int Association::AllTransferSyntaxesCount = 19;
+
+Association::Association(const std::string& _ambitolog) :
+        ambitolog(_ambitolog),
+        m_pNotificadorProgreso(NULL),
+        m_Stop(false),
+        m_calledPort(0),
+        m_timeout(120),
+        assoc(NULL),
+        presId(0),
+        msgId(0),
+        Net(NULL),
+        Role(RT_Requestor),
+        AcceptorPort(0),
+        m_TLS(false),
+        m_UseUserPass(false),
+        m_Validate(false)
+{
+        sopClass[0] = 0;
+        sopInstance[0] = 0;
+}
+
+Association::~Association()
+{
+        // drop an existing association on shutdown
+        if (assoc != NULL)
+                Drop();
+        assoc = NULL;
+        m_pNotificadorProgreso = NULL;
+}
+
+OFCondition Association::Drop(OFCondition cond)
+{
+        // tear down association
+        if (cond == EC_Normal) {
+                /* release association */
+                cond = ASC_releaseAssociation(assoc);
+        } else if (cond == DUL_PEERREQUESTEDRELEASE) {
+                cond = ASC_acknowledgeRelease(assoc);
+                if (cond.good()) {
+                        cond = ASC_abortAssociation(assoc);
+                        if (cond.good()) {
+                                return cond;
+                        }
+                }
+        } else if (cond == DUL_PEERABORTEDASSOCIATION) {
+                return cond;
+        } else {
+                cond = ASC_abortAssociation(assoc);
+                if (cond.good()) {
+                        return cond;
+                }
+        }
+
+        Destroy();
+        return cond;
+}
+
+void Association::Destroy()
+{
+        OFCondition cond = ASC_destroyAssociation(&assoc);
+
+        Net = NULL;
+        assoc = NULL;
+        msgId = 0;
+        presId = 0;
+        sopClass[0] = 0;
+        sopInstance[0] = 0;
+
+}
+
+OFCondition Association::SendObject(DcmDataset *dataset)
+{
+        OFCondition cond = EC_Normal;
+        DcmDataset *statusDetail = NULL;
+
+        if (Stopped()) {
+                return DUL_NETWORKCLOSED;
+        }
+
+        T_DIMSE_C_StoreRQ req;
+        T_DIMSE_C_StoreRSP rsp;
+
+        // check if we SOPClass and SOPInstance in dataset
+        if (!DU_findSOPClassAndInstanceInDataSet(dataset, sopClass, sopInstance)) {
+                return makeOFCondition(OFM_dcmnet, DIMSEC_BADDATA, OF_error, "No SOPClass or SOPInstanceUID found on dataset");
+        }
+
+        /* which presentation context should be used */
+        presId = ASC_findAcceptedPresentationContextID(assoc, sopClass);
+        if (presId == 0) {
+                const char *modalityName = dcmSOPClassUIDToModality(sopClass);
+                if (!modalityName) modalityName = dcmFindNameOfUID(sopClass);
+                if (!modalityName) modalityName = "unknown SOP class";
+                std::ostringstream os;
+                os << "No valid presentation context found. SOPClass = " << sopClass << " Modality = " << modalityName;
+                return makeOFCondition(OFM_dcmnet, DIMSEC_BADDATA, OF_error, os.str().c_str());
+        }
+
+        bzero((char*) & req, sizeof (req));
+        req.MessageID = msgId;
+        strncpy(req.AffectedSOPClassUID, sopClass, sizeof (req.AffectedSOPClassUID)-1);
+        req.AffectedSOPClassUID[sizeof (req.AffectedSOPClassUID)-1] = 0;
+        strncpy(req.AffectedSOPInstanceUID, sopInstance, sizeof (req.AffectedSOPInstanceUID)-1);
+        req.AffectedSOPInstanceUID[sizeof(req.AffectedSOPInstanceUID)-1] = 0;
+
+        req.DataSetType = DIMSE_DATASET_PRESENT;
+        req.Priority = DIMSE_PRIORITY_LOW;
+
+        // convert to accepted transfer syntax
+        T_ASC_PresentationContext pc;
+        cond = ASC_findAcceptedPresentationContext(assoc->params, presId, &pc);
+        ASC_dumpPresentationContext(&pc, COUT);
+
+        DcmXfer opt_oxferSyn(pc.acceptedTransferSyntax);
+        E_TransferSyntax ori_oxferSyn = dataset->getOriginalXfer();
+
+        DcmXfer original_xfer(dataset->getOriginalXfer());
+
+        if (opt_oxferSyn.getXfer() != ori_oxferSyn) {
+                LOG_DEBUG(ambitolog, "Converting object into accepted Transfer-Syntax: " << opt_oxferSyn.getXferName());
+
+                OFCondition cond;
+                // create RepresentationParameter
+                DJ_RPLossless rp_lossless(6, 0);
+                DJ_RPLossy rp_lossy(70);
+
+                // NEW
+
+                const DcmRepresentationParameter *rp = NULL;
+
+                if (opt_oxferSyn.getXfer() == EXS_JPEGProcess14SV1 || opt_oxferSyn.getXfer() == EXS_JPEGProcess14) {
+                        rp = &rp_lossless;
+                } else if (opt_oxferSyn.getXfer() == EXS_JPEGProcess1 || opt_oxferSyn.getXfer() == EXS_JPEGProcess2_4) {
+                        rp = &rp_lossy;
+                }
+
+                // recompress ?
+                if (rp != NULL) {
+                        if (original_xfer.isEncapsulated()) {
+                                LOG_DEBUG(ambitolog, "The DICOM file is already compressed. It will previously converted to uncompressed Transfer Syntax");
+                                if (EC_Normal != dataset->chooseRepresentation(EXS_LittleEndianExplicit, NULL)) {
+                                        return makeOFCondition(OFM_dcmnet, DIMSEC_BADDATA, OF_error, "Unable to convert the original format to uncompressed Transfer Syntax");
+                                }
+                        }
+                }
+
+                cond = dataset->chooseRepresentation(opt_oxferSyn.getXfer(), rp);
+                if (cond.bad()) {
+                        LOG_ERROR(ambitolog, "Error choosing representation: " << cond.text());
+                }
+
+                if (dataset->canWriteXfer(opt_oxferSyn.getXfer())) {
+                        LOG_DEBUG(ambitolog, "The output transfer syntax (" <<  opt_oxferSyn.getXferName() << " can be writen");
+                } else {
+                        std::ostringstream os;
+                        os << "Unable to find any possible converson to output Transfer Syntax " <<  opt_oxferSyn.getXferName();
+                        return makeOFCondition(OFM_dcmnet, DIMSEC_BADDATA, OF_error, os.str().c_str());
+                }
+        }
+
+        // store it
+
+        cond = DIMSE_storeUser(
+                       assoc,
+                       presId,
+                       &req,
+                       NULL,
+                       dataset,
+                       NULL,
+                       NULL,
+                       (m_timeout == 0) ? DIMSE_BLOCKING : DIMSE_NONBLOCKING,
+                       m_timeout,
+                       &rsp,
+                       &statusDetail);
+
+        // increase message id
+        msgId++;
+
+        // what happened
+
+        if (rsp.DataSetType == DIMSE_DATASET_PRESENT) {
+                LOG_DEBUG(ambitolog, "Response with dataset");
+        }
+
+        if (statusDetail != NULL) {
+                LOG_TRACE(ambitolog, "Status: " << DumpDataset(statusDetail));
+                delete statusDetail;
+        }
+
+        if (cond != EC_Normal) {
+                return cond;
+        }
+
+        if (rsp.DimseStatus == STATUS_Success) {
+                return EC_Normal;
+        } else {
+                LOG_ERROR(ambitolog, "DIMSE Status failed: " << rsp.DimseStatus);
+                return DIMSE_BADDATA;
+        }
+}
+
+OFCondition Association::SendObject(DcmFileFormat *dcmff)
+{
+        if (Stopped()) {
+                return DUL_NETWORKCLOSED;
+        }
+        DcmDataset* dataset = dcmff->getDataset();
+        return SendObject(dataset);
+}
+
+void Association::Create(const std::string& title, const std::string& peer, int port, const std::string& ouraet, const char *abstractSyntax)
+{
+        // no connected association till now
+        assoc = NULL;
+
+        // fill in parameters
+        if (abstractSyntax != NULL) {
+                m_abstractSyntax = (char*) abstractSyntax;
+        }
+
+        m_calledAET = title;
+        m_calledPeer = peer;
+        m_calledPort = port;
+
+        m_ourAET = ouraet;
+
+        msgId = 0;
+        presId = 0;
+}
+
+OFCondition Association::SendEchoRequest()
+{
+        DIC_US status;
+        DcmDataset *statusDetail = NULL;
+
+        if (Stopped()) {
+                return DUL_NETWORKCLOSED;
+        }
+
+        OFCondition cond = DIMSE_echoUser(assoc, ++msgId, DIMSE_BLOCKING, 0, &status, &statusDetail);
+        if (cond.good()) {
+                LOG_DEBUG(ambitolog, "DIMSE ECHO completed. Status: " << DU_cstoreStatusString(status));
+        } else {
+                LOG_DEBUG(ambitolog, "DIMSE ECHO Failed: " << cond.text());
+        }
+
+        if (statusDetail != NULL) {
+                delete statusDetail;
+        }
+
+        return cond;
+}
+
+bool Association::AddKey(DcmDataset *query, const DcmTagKey& tag, int value)
+{
+        static char temp[16];
+#if defined(_WINDOWS)
+        sprintf_s(temp, 16, "%i", value);
+#else
+        snprintf(temp, 16, "%i", value);
+#endif
+        return AddKey(query, tag, temp);
+}
+
+bool Association::AddKey(DcmDataset *query, const DcmTagKey& tag, double value, const char* format)
+{
+        static char temp[16];
+#if defined(_WINDOWS)
+        sprintf_s(temp, 16, format, value);
+#else
+        snprintf(temp, 16, format, value);
+#endif
+        return AddKey(query, tag, temp);
+}
+
+bool Association::AddKey(DcmItem *query, const DcmTagKey& tag, int value)
+{
+        static char temp[16];
+#if defined(_WINDOWS)
+        sprintf_s(temp, 16, "%i", value);
+#else
+        snprintf(temp, 16, "%i", value);
+#endif
+        return AddKey(query, tag, temp);
+}
+
+bool Association::AddKey(DcmItem *query, const DcmTagKey& tag, double value, const char* format)
+{
+        static char temp[16];
+#if defined(_WINDOWS)
+        sprintf_s(temp, 16, format, value);
+#else
+        snprintf(temp, 16, format, value);
+#endif
+        return AddKey(query, tag, temp);
+}
+
+bool Association::AddKey(DcmDataset *query, const DcmTagKey& t, const char* value)
+{
+        return AddCustomKey/*< DcmDataset >*/(query, t, value);
+}
+
+bool Association::AddKey(DcmItem *query, const DcmTagKey& t, const char* value)
+{
+        return AddCustomKey/*< DcmItem >*/(query, t, value);
+}
+
+bool Association::AddQueryLevel(DcmDataset *query, const std::string& level)
+{
+        return AddKey(query, DCM_QueryRetrieveLevel, level.c_str());
+}
+
+GIL::DICOM::DCMTK::Network* Association::GetNetwork()
+{
+        return Net;
+}
+
+OFCondition Association::Connect(GIL::DICOM::DCMTK::Network *network, int pdu)
+{
+        Net = network;
+        return network->ConnectAssociation(this, pdu);
+}
+
+const std::string& Association::GetOurAET()
+{
+        return m_ourAET;
+}
+
+#warning This code returns a pointer to a static variable, that is not thread save
+// This function should be deprecates and replaced by a version that returns
+// the OFString.
+
+const char* Association::GetKey(DcmDataset* query, const DcmTagKey& tag)
+{
+        OFString val;
+        static char buffer[129];
+        query->findAndGetOFString(tag, val, 0, OFTrue);
+#if defined(_WINDOWS)
+        strncpy_s(buffer, val.c_str(), sizeof (buffer) - 1);
+#else
+        strncpy(buffer, val.c_str(), sizeof (buffer) - 1);
+
+#endif
+        buffer[sizeof (buffer) - 1] = 0;
+        return buffer;
+}
+
+void Association::SetTimeout(int t)
+{
+        m_timeout = t;
+}
+
+int Association::GetTimeout()
+{
+        return m_timeout;
+}
+
+OFCondition Association::addAllStoragePresentationContexts(T_ASC_Parameters *params, bool /*bProposeCompression*/, int /*lossy*/)
+{
+        unsigned int pid = 1;
+
+        OFCondition cond = ASC_addPresentationContext(params, pid, m_abstractSyntax.c_str(), AllTransferSyntaxes, 3);
+        if (cond.bad()) {
+                LOG_ERROR(ambitolog, "Unable to add presentation context for " << m_abstractSyntax);
+                return cond;
+        }
+
+        pid += 2;
+
+        if (pid >= 255) {
+                LOG_WARN(ambitolog, "Too many PresentationContexts setted");
+        }
+
+        return cond;
+}
diff --git a/cadxcore/main/controllers/dcmtk/dicomassociation.h b/cadxcore/main/controllers/dcmtk/dicomassociation.h
new file mode 100644
index 0000000..f179f5a
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomassociation.h
@@ -0,0 +1,315 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/dcmnet/assoc.h>
+#include <dcmtk/dcmnet/cond.h>
+#include <dcmtk/dcmnet/dimse.h>
+#include <dcmtk/dcmdata/dcfilefo.h>
+#include <api/iproxynotificadorprogreso.h>
+#include "helpers.h"
+
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+#ifdef DCMTK_POST_20170228
+#include <api/dicom/dicom_legacy.h>
+#endif 
+
+
+
+#include <api/dicom/idicomconformance.h>
+
+
+namespace GIL
+{
+namespace DICOM
+{
+namespace DCMTK
+{
+class Network;
+}
+}
+}
+
+class Association
+{
+public:
+
+        typedef enum RoleType {
+                RT_Acceptor,
+                RT_Requestor,
+                RT_AcceptorRequestor
+        } RoleType;
+
+        std::string ambitolog;
+
+        GNC::IProxyNotificadorProgreso* m_pNotificadorProgreso;
+        /**
+        Constructors
+        */
+
+        Association(const std::string& ambitolog);
+        virtual ~Association();
+
+        /**
+        Create the association object (connect through DicomNetwork::Connect(..) )
+        */
+        void Create(const std::string& title, const std::string& peer, int port, const std::string& ouraet, const char *abstractSyntax = NULL);
+
+        /*Set notificador de progreso*/
+        void SetNotificadorProgreso(GNC::IProxyNotificadorProgreso* pNotificadorProgreso)
+        {
+
+                m_pNotificadorProgreso = pNotificadorProgreso;
+        }
+
+        bool NotificarProgreso(float progresoNormalizado, std::string& texto)
+        {
+                if(m_pNotificadorProgreso!=NULL) {
+                        return m_pNotificadorProgreso->NotificarProgreso(progresoNormalizado,texto);
+                }
+                return true;
+        }
+
+        /**
+        Connect the association to a dicom network
+        */
+        OFCondition Connect(GIL::DICOM::DCMTK::Network* network, int pdu = ASC_DEFAULTMAXPDU);
+
+        void Destroy();
+
+        /**
+        Drop the association
+        */
+        OFCondition Drop(OFCondition cond = EC_Normal);
+
+        /**
+        Send a dataset through the association (C-Store)
+        */
+        virtual OFCondition SendObject(DcmDataset* dataset);
+
+        /**
+        Send a fileformat object through the association (C-Store)
+        */
+        virtual OFCondition SendObject(DcmFileFormat* dcmff);
+
+        /**
+        Send a C-Echo request through the association
+        */
+        OFCondition SendEchoRequest();
+
+        /**
+        Return the DicomNetwork this association is connected to
+        */
+        GIL::DICOM::DCMTK::Network* GetNetwork();
+
+        RoleType GetRole()
+        {
+                return Role;
+        }
+
+        void SetRole(RoleType role)
+        {
+                Role = role;
+        }
+
+        unsigned short GetAcceptorPort()
+        {
+                return AcceptorPort;
+        }
+
+        void SetAcceptorPort(unsigned short port)
+        {
+                AcceptorPort = port;
+        }
+
+        /**
+        add a query key to a dataset
+        */
+
+        static bool AddKey(DcmItem *query, const DcmTagKey& tag, const char* value = NULL);
+
+        static bool AddKey(DcmItem *query, const DcmTagKey& tag, int value);
+        static bool AddKey(DcmItem *query, const DcmTagKey& tag, double value, const char* format = "%lf");
+
+        static bool AddKey(DcmDataset *query, const DcmTagKey& tag, const char* value = NULL);
+
+        //template< class T >
+
+        static bool AddCustomKey(DcmItem* query, const DcmTagKey& t, const char* value)
+        {
+                DcmTag tag(t);
+                Uint16 g = tag.getGTag();
+                Uint16 e = tag.getETag();
+
+                if (tag.error() != EC_Normal) {
+                        printf("unknown tag: (%04x,%04x)", g, e);
+                        return false;
+                }
+
+                DcmElement *elem = newDicomElement(tag);
+                if (elem == NULL) {
+                        printf("cannot create element for tag: (%04x,%04x)", g, e);
+                        return false;
+                }
+
+                if (value != NULL) {
+                        if (strlen(value) > 0) {
+                                OFCondition cond = elem->putString(value);
+
+                                if (!cond.good()) {
+                                        printf("cannot put tag value: (%04x,%04x)=\"%s\"", g, e, value);
+                                        return false;
+                                }
+                        }
+                }
+
+                delete query->remove(t);
+                query->insert(elem, OFTrue);
+
+                return true;
+        }
+
+        static bool AddKey(DcmDataset *query, const DcmTagKey& tag, int value);
+        static bool AddKey(DcmDataset *query, const DcmTagKey& tag, double value, const char* format = "%lf");
+
+        /**
+        get a key from the dataset
+        */
+        static const char* GetKey(DcmDataset* query, const DcmTagKey& tag);
+
+        /**
+        add a query level to a dataset
+        */
+        static bool AddQueryLevel(DcmDataset* query, const std::string& level);
+
+        const std::string& GetOurAET();
+
+        void SetTimeout(int t);
+
+        int GetTimeout();
+
+        void SetTLS(const std::string& CliCert, const std::string& CliKey, bool validate)
+        {
+                m_TLS = true;
+                m_CliCert = CliCert;
+                m_CliKey = CliKey;
+                m_Validate = validate;
+        }
+        bool IsSecure() const
+        {
+                return m_TLS;
+        }
+
+        //http://support.dcmtk.org/wiki/dcmtk/howto/useridentitynegotiation
+        void SetUserPass(const std::string& PacsUser, const std::string& PacsPass)
+        {
+                m_UseUserPass = true;
+                m_pacsUser = PacsUser, m_pacsPass = PacsPass;
+        }
+        bool UseUserPass()
+        {
+                return m_UseUserPass;
+        }
+        const std::string& GetUser()
+        {
+                return m_pacsUser;
+        }
+        const std::string& GetPass()
+        {
+                return m_pacsPass;
+        }
+
+        const std::string& GetCliCert() const
+        {
+                return m_CliCert;
+        }
+        const std::string& GetCliKey() const
+        {
+                return m_CliKey;
+        }
+        bool GetValidate() const
+        {
+                return m_Validate;
+        }
+
+        static const char* AllTransferSyntaxes[];
+        static const unsigned int AllTransferSyntaxesCount;
+
+        void Stop()
+        {
+                m_Stop = true;
+        }
+        bool Stopped()
+        {
+                return m_Stop;
+        }
+
+protected:
+
+        /**
+        Callback function to add user defined presentation context to association parameters
+        */
+        virtual void OnAddPresentationContext(T_ASC_Parameters *params) = 0;
+        OFCondition addAllStoragePresentationContexts(T_ASC_Parameters *params, bool bProposeCompression, int lossy);
+
+        /**
+        Protected data
+        */
+
+        std::string m_abstractSyntax;
+        std::string m_calledAET;
+        std::string m_calledPeer;
+        std::string m_ourAET;
+
+        bool m_Stop;
+        int  m_calledPort;
+        int  m_timeout;
+
+        T_ASC_Association* assoc;
+        T_ASC_PresentationContextID presId;
+        DIC_UI sopClass;
+        DIC_UI sopInstance;
+        DIC_US msgId;
+
+        GIL::DICOM::DCMTK::Network*          Net;
+        RoleType                             Role;
+        unsigned short                       AcceptorPort;
+
+        bool m_TLS;
+        bool m_UseUserPass;
+        std::string m_pacsUser;
+        std::string m_pacsPass;
+        std::string m_CliCert;
+        std::string m_CliKey;
+        bool m_Validate;
+
+        friend class GIL::DICOM::DCMTK::Network;
+};
diff --git a/cadxcore/main/controllers/dcmtk/dicomcustomassociation.cpp b/cadxcore/main/controllers/dcmtk/dicomcustomassociation.cpp
new file mode 100644
index 0000000..dd09792
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomcustomassociation.cpp
@@ -0,0 +1,737 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "dicomcustomassociation.h"
+#include "helpercompresion.h"
+#include <main/controllers/pacscontroller.h>
+
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/ipacscontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/entorno.h>
+
+#include <main/controllers/dcmtk/ginkgouid.h>
+#include <api/internationalization/internationalization.h>
+
+
+#include <api/dicom/dcmdictionary.h>
+//#include <main/controllers/dicommanager.h>
+#include <api/dicom/dcmdictionary.h>
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+#include <dcmtk/dcmdata/dctk.h>
+#include <dcmtk/dcmimgle/dcmimage.h>
+#include <dcmtk/dcmdata/dcfilefo.h>
+#include <dcmtk/dcmdata/dcdatset.h>
+#include <dcmtk/dcmdata/dcdeftag.h>
+#include <dcmtk/dcmdata/dcdict.h>
+#include <dcmtk/dcmdata/dcdicent.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+#include <wx/string.h>
+#include <wx/intl.h>
+#include <wx/filename.h>
+
+
+void DIMSE_printNStatusString(std::ostream& dumpStream, int status)
+{
+        switch(status) {
+        case STATUS_Success:
+                dumpStream << "0x0000: Success";
+                break;
+        case STATUS_N_Cancel:
+                dumpStream << "0xFE00: Cancel";
+                break;
+        case STATUS_N_AttributeListError:
+                dumpStream << "0x0107: Attribute list error";
+                break;
+        case STATUS_N_SOPClassNotSupported:
+                dumpStream << "0x0122: SOP class not supported";
+                break;
+        case STATUS_N_ClassInstanceConflict:
+                dumpStream << "0x0119: Class/instance conflict";
+                break;
+        case STATUS_N_DuplicateSOPInstance:
+                dumpStream << "0x0111: Duplicate SOP instance";
+                break;
+        case STATUS_N_DuplicateInvocation:
+                dumpStream << "0x0210: Duplicate invocation";
+                break;
+        case STATUS_N_InvalidArgumentValue:
+                dumpStream << "0x0115: Invalid argument value";
+                break;
+        case STATUS_N_InvalidAttributeValue:
+                dumpStream << "0x0106: Invalid attribute value";
+                break;
+        case STATUS_N_InvalidObjectInstance:
+                dumpStream << "0x0117: Invalid object instance";
+                break;
+        case STATUS_N_MissingAttribute:
+                dumpStream << "0x0120: Missing attribute";
+                break;
+        case STATUS_N_MissingAttributeValue:
+                dumpStream << "0x0121: Missing attribute value";
+                break;
+        case STATUS_N_MistypedArgument:
+                dumpStream << "0x0212: Mistyped argument";
+                break;
+        case STATUS_N_NoSuchArgument:
+                dumpStream << "0x0114: No such argument";
+                break;
+        case STATUS_N_NoSuchAttribute:
+                dumpStream << "0x0105: No such attribute";
+                break;
+        case STATUS_N_NoSuchEventType:
+                dumpStream << "0x0113: No such event type";
+                break;
+        case STATUS_N_NoSuchObjectInstance:
+                dumpStream << "0x0112: No such object instance";
+                break;
+        case STATUS_N_NoSuchSOPClass:
+                dumpStream << "0x0118: No such SOP class";
+                break;
+        case STATUS_N_ProcessingFailure:
+                dumpStream << "0x0110: Processing failure";
+                break;
+        case STATUS_N_ResourceLimitation:
+                dumpStream << "0x0213: Resource limitation";
+                break;
+        case STATUS_N_UnrecognizedOperation:
+                dumpStream << "0x0211: Unrecognized operation";
+                break;
+        default: {
+                char prev = dumpStream.fill('0');
+                auto flags = dumpStream.flags();
+                dumpStream << "0x" << std::hex << std::setw(4) << status
+                           << ": Unknown Status Code";
+                dumpStream.flags(flags);
+                dumpStream.fill(prev);
+                break;
+        }
+        }
+}
+
+CustomAssociation::CustomAssociation(void* connectionKey, const std::string& ambitolog, GNC::IProxyNotificadorProgreso* pNotificadorProgreso) :
+        Association(ambitolog), GIL::DICOM::ICustomAssociation()
+{
+        if (connectionKey == NULL) {
+                LOG_ERROR(ambitolog, "NULL Connection key");
+        }
+        this->Net = GIL::DICOM::DCMTK::Network::Instance(connectionKey);
+        this->m_pNotificadorProgreso = pNotificadorProgreso;
+        this->ambitolog = ambitolog;
+        this->blockMode = DIMSE_BLOCKING;
+        this->eventHandler = NULL;
+        this->presId = 0;
+}
+
+CustomAssociation::~CustomAssociation()
+{
+
+}
+bool CustomAssociation::Connect(const std::string& serverId, const std::string& local_aet)
+{
+        DicomServerList* listaServidores = DicomServerList::Instance();
+        m_server = listaServidores->GetServer(serverId);
+        if (!m_server.IsValid()) {
+                LOG_ERROR("C-MOVE/C-GET", "Invalid server");
+                return false;
+        }
+
+        if (!Net->Initiallized()) {
+                Net->InitializeNetwork(GetTimeout(), GetRole(), GetAcceptorPort());
+        }
+
+        Create(
+                m_server->AET,
+                m_server->HostName,
+                m_server->Port,
+                local_aet
+        );
+
+        OFCondition r = Association::Connect(Net, m_server->PDU);
+
+        if (r.bad()) {
+                LOG_ERROR(ambitolog, "Error al conectar:" << r.text());
+                Drop();
+                Destroy();
+                throw GIL::DICOM::PACSException(r.text());
+        }
+        return r.good();
+}
+
+void CustomAssociation::OnAddPresentationContext(T_ASC_Parameters* params)
+{
+
+        OFCondition cond;
+        if (SOPClasses.size() > 0) {
+                GIL::DICOM::TransferSyntaxList tsList;
+                tsList.push_back(UID_LittleEndianImplicitTransferSyntax);
+                unsigned int pid = 1;
+                for (GIL::DICOM::SOPClassList::const_iterator itSopClass = SOPClasses.begin(); pid <= 255 && itSopClass != SOPClasses.end() && cond.good(); ++itSopClass) {
+                        for (GIL::DICOM::TransferSyntaxList::const_iterator itTS = tsList.begin(); pid <= 255 && itTS != tsList.end() && cond.good(); ++itTS) {
+                                const char* ts[] = {(*itTS).c_str()};
+                                cond = ASC_addPresentationContext(params, pid, (*itSopClass).c_str(), ts, 1);
+                                pid += 2;
+                        }
+
+                }
+
+                if (pid >= 255) {
+                        LOG_WARN("C-GET", "Too many PresentationContexts setted");
+                }
+        } else {
+                LOG_WARN("C-GET", "NO PresentationContexts setted");
+        }
+}
+
+void CustomAssociation::dumpNMessage(T_DIMSE_Message &msg, DcmItem *dataset, OFBool outgoing)
+{
+        OFString str;
+        if (outgoing) {
+                DIMSE_dumpMessage(str, msg, DIMSE_OUTGOING, dataset);
+        } else {
+                DIMSE_dumpMessage(str, msg, DIMSE_INCOMING, dataset);
+        }
+        LOG_DEBUG(ambitolog, str);
+}
+
+OFCondition CustomAssociation::sendNRequest(
+        T_ASC_PresentationContextID presId,
+        T_DIMSE_Message &request,
+        DcmDataset *rqDataSet,
+        T_DIMSE_Message &response,
+        DcmDataset* &statusDetail,
+        DcmDataset* &rspDataset)
+{
+        OFCondition cond = EC_Normal;
+        T_DIMSE_Command expectedResponse;
+        DIC_US expectedMessageID=0;
+        if (assoc == NULL) {
+                return DIMSE_ILLEGALASSOCIATION;
+        }
+
+        T_DIMSE_DataSetType datasetType = DIMSE_DATASET_NULL;
+        if (rqDataSet && (rqDataSet->card() > 0)) datasetType = DIMSE_DATASET_PRESENT;
+
+        switch(request.CommandField) {
+        case DIMSE_N_GET_RQ:
+                request.msg.NGetRQ.DataSetType = datasetType;
+                expectedResponse = DIMSE_N_GET_RSP;
+                expectedMessageID = request.msg.NGetRQ.MessageID;
+                break;
+        case DIMSE_N_SET_RQ:
+                request.msg.NSetRQ.DataSetType = datasetType;
+                expectedResponse = DIMSE_N_SET_RSP;
+                expectedMessageID = request.msg.NSetRQ.MessageID;
+                break;
+        case DIMSE_N_ACTION_RQ:
+                request.msg.NActionRQ.DataSetType = datasetType;
+                expectedResponse = DIMSE_N_ACTION_RSP;
+                expectedMessageID = request.msg.NActionRQ.MessageID;
+                break;
+        case DIMSE_N_CREATE_RQ:
+                request.msg.NCreateRQ.DataSetType = datasetType;
+                expectedResponse = DIMSE_N_CREATE_RSP;
+                expectedMessageID = request.msg.NCreateRQ.MessageID;
+                break;
+        case DIMSE_N_DELETE_RQ:
+                request.msg.NDeleteRQ.DataSetType = datasetType;
+                expectedResponse = DIMSE_N_DELETE_RSP;
+                expectedMessageID = request.msg.NDeleteRQ.MessageID;
+                break;
+        default:
+                return DIMSE_BADCOMMANDTYPE;
+                /* break; */
+        }
+
+        dumpNMessage(request, rqDataSet, OFTrue);
+        cond = DIMSE_sendMessageUsingMemoryData(assoc, presId, &request, NULL, rqDataSet, NULL, NULL);
+        if (cond.bad()) return cond;
+
+        T_ASC_PresentationContextID thisPresId;
+        T_DIMSE_Message eventReportRsp;
+        DIC_US eventReportStatus;
+        do {
+                thisPresId = presId;
+                statusDetail = NULL;
+                cond = DIMSE_receiveCommand(assoc, blockMode, this->m_timeout, &thisPresId, &response, &statusDetail);
+                if (cond.bad()) return cond;
+
+                if (response.CommandField == DIMSE_N_EVENT_REPORT_RQ) {
+                        /* handle N-EVENT-REPORT-RQ */
+                        rspDataset = NULL;
+                        if (response.msg.NEventReportRQ.DataSetType == DIMSE_DATASET_PRESENT) {
+                                cond = DIMSE_receiveDataSetInMemory(assoc, blockMode, m_timeout, &thisPresId, &rspDataset, NULL, NULL);
+                                if (cond.bad()) return cond;
+                        }
+                        dumpNMessage(response, rspDataset, OFFalse);
+                        // call event handler if registered
+                        eventReportStatus = STATUS_Success;
+                        if (eventHandler) eventReportStatus = eventHandler->handleEvent(response.msg.NEventReportRQ, rspDataset, statusDetail);
+                        if (rspDataset) delete rspDataset;
+                        rspDataset = NULL;
+                        if (statusDetail) delete statusDetail;
+                        statusDetail = NULL;
+
+                        // send back N-EVENT-REPORT-RSP */
+                        eventReportRsp.CommandField = DIMSE_N_EVENT_REPORT_RSP;
+                        eventReportRsp.msg.NEventReportRSP.MessageIDBeingRespondedTo = response.msg.NEventReportRQ.MessageID;
+                        eventReportRsp.msg.NEventReportRSP.EventTypeID = response.msg.NEventReportRQ.EventTypeID;
+                        eventReportRsp.msg.NEventReportRSP.DimseStatus = eventReportStatus;
+                        eventReportRsp.msg.NEventReportRSP.DataSetType = DIMSE_DATASET_NULL;
+                        eventReportRsp.msg.NEventReportRSP.opts = O_NEVENTREPORT_EVENTTYPEID;
+                        eventReportRsp.msg.NEventReportRSP.AffectedSOPClassUID[0] = 0;
+                        eventReportRsp.msg.NEventReportRSP.AffectedSOPInstanceUID[0] = 0;
+                        dumpNMessage(eventReportRsp, NULL, OFTrue);
+                        cond = DIMSE_sendMessageUsingMemoryData(assoc, thisPresId, &eventReportRsp, NULL, NULL, NULL, NULL);
+                        if (cond.bad()) return cond;
+                } else {
+                        /* No N-EVENT-REPORT-RQ. Check if this message is what we expected */
+                        if (response.CommandField != expectedResponse) {
+                                char buf1[256];
+                                sprintf(buf1, "DIMSE: Unexpected Response Command Field: 0x%x", (unsigned)response.CommandField);
+                                return makeDcmnetCondition(DIMSEC_UNEXPECTEDRESPONSE, OF_error, buf1);
+                        }
+                        T_DIMSE_DataSetType responseDataset = DIMSE_DATASET_NULL;
+                        DIC_US responseMessageID = 0;
+                        /** change request to response */
+                        switch(expectedResponse) {
+                        case DIMSE_N_GET_RSP:
+                                responseDataset = response.msg.NGetRSP.DataSetType;
+                                responseMessageID = response.msg.NGetRSP.MessageIDBeingRespondedTo;
+                                break;
+                        case DIMSE_N_SET_RSP:
+                                responseDataset = response.msg.NSetRSP.DataSetType;
+                                responseMessageID = response.msg.NSetRSP.MessageIDBeingRespondedTo;
+                                break;
+                        case DIMSE_N_ACTION_RSP:
+                                responseDataset = response.msg.NActionRSP.DataSetType;
+                                responseMessageID = response.msg.NActionRSP.MessageIDBeingRespondedTo;
+                                break;
+                        case DIMSE_N_CREATE_RSP:
+                                responseDataset = response.msg.NCreateRSP.DataSetType;
+                                responseMessageID = response.msg.NCreateRSP.MessageIDBeingRespondedTo;
+                                break;
+                        case DIMSE_N_DELETE_RSP:
+                                responseDataset = response.msg.NDeleteRSP.DataSetType;
+                                responseMessageID = response.msg.NDeleteRSP.MessageIDBeingRespondedTo;
+                                break;
+                        default: {
+                                char buf1[256];
+                                sprintf(buf1, "DIMSE: Unexpected Response Command Field: 0x%x", (unsigned)response.CommandField);
+                                return makeDcmnetCondition(DIMSEC_UNEXPECTEDRESPONSE, OF_error, buf1);
+                        }
+                                /* break; */
+                        }
+                        if (responseMessageID != expectedMessageID) {
+                                char buf1[256];
+                                sprintf(buf1, "DIMSE: Unexpected Response Command Field: 0x%x", (unsigned)response.CommandField);
+                                return makeDcmnetCondition(DIMSEC_UNEXPECTEDRESPONSE, OF_error, buf1);
+                        }
+                        rspDataset = NULL;
+                        if (responseDataset == DIMSE_DATASET_PRESENT) {
+                                cond = DIMSE_receiveDataSetInMemory(assoc, blockMode, m_timeout, &thisPresId, &rspDataset, NULL, NULL);
+                                if (cond.bad()) return cond;
+                        }
+                        dumpNMessage(response, rspDataset, OFFalse);
+                }
+        } while (response.CommandField == DIMSE_N_EVENT_REPORT_RQ);
+        return EC_Normal;
+}
+
+bool CustomAssociation::createRQ( const std::string& sopclassUID, const GIL::DICOM::DicomDataset& attributeListIn,  int& status, std::string& affectedSopinstanceUID)
+{
+        if (assoc == NULL) {
+                LOG_ERROR(ambitolog, DIMSE_ILLEGALASSOCIATION.theText);
+                return false;
+        }
+
+
+        T_ASC_PresentationContextID presCtx = findAcceptedPC(sopclassUID.c_str());
+        if (presCtx == 0) {
+                LOG_ERROR(ambitolog, DIMSE_NOVALIDPRESENTATIONCONTEXTID.theText);
+                return false;
+        }
+
+        T_DIMSE_Message request;
+        T_DIMSE_Message response;
+        DcmDataset *statusDetail = NULL;
+
+        // construct N-CREATE-RQ
+        request.CommandField = DIMSE_N_CREATE_RQ;
+        request.msg.NCreateRQ.MessageID = assoc->nextMsgID++;
+
+        strncpy(request.msg.NCreateRQ.AffectedSOPClassUID, sopclassUID.c_str(), DIC_UI_LEN);
+        request.msg.NCreateRQ.AffectedSOPClassUID[DIC_UI_LEN] = 0;
+        request.msg.NCreateRQ.AffectedSOPInstanceUID[0] = 0;
+        request.msg.NCreateRQ.opts = 0;
+
+        DcmDataset inAttr;
+        DcmDataset* outAttr;
+        GIL::DICOM::PACSController::Instance()->FillInQuery(attributeListIn, &inAttr, m_server);
+
+        OFCondition cond = sendNRequest(presCtx, request, &inAttr, response, statusDetail, outAttr);
+        if (statusDetail) {
+                delete statusDetail;
+                statusDetail = NULL;
+        }
+        if (cond.good()) {
+                status = response.msg.NCreateRSP.DimseStatus;
+                if (status != 0) {
+                        LOG_ERROR(ambitolog, "Error sending create rq status: "<< status);
+                        std::ostringstream ostr;
+                        ostr << "Error sending create rq status: "<< status << " details: ";
+                        DIMSE_printNStatusString(ostr, status);
+                        throw GIL::DICOM::PACSException(ostr.str(), "GIL::DICOMAssociation");
+                }
+                // if response contains SOP Instance UID, copy it.
+                if (response.msg.NCreateRSP.opts & O_NCREATE_AFFECTEDSOPINSTANCEUID) {
+                        affectedSopinstanceUID = response.msg.NCreateRSP.AffectedSOPInstanceUID;
+                }
+        }
+        return cond.good();
+}
+
+
+
+
+bool CustomAssociation::setRQ( const std::string& sopclassUID, const std::string& sopinstanceUID, const GIL::DICOM::DicomDataset& modificationList, int& status)
+{
+        if (assoc == NULL) {
+                LOG_ERROR(ambitolog, DIMSE_ILLEGALASSOCIATION.theText);
+                return false;
+        }
+
+
+        T_ASC_PresentationContextID presCtx = findAcceptedPC(sopclassUID.c_str());
+        if (presCtx == 0) {
+                LOG_ERROR(ambitolog, DIMSE_NOVALIDPRESENTATIONCONTEXTID.theText);
+                return false;
+        }
+
+        T_DIMSE_Message request;
+        T_DIMSE_Message response;
+        DcmDataset *statusDetail = NULL;
+
+        // construct N-CREATE-RQ
+        request.CommandField = DIMSE_N_SET_RQ;
+        request.msg.NSetRQ.MessageID = assoc->nextMsgID++;
+        strncpy(request.msg.NSetRQ.RequestedSOPClassUID, sopclassUID.c_str(), DIC_UI_LEN);
+        request.msg.NSetRQ.RequestedSOPClassUID[DIC_UI_LEN] = 0;
+
+        strncpy(request.msg.NSetRQ.RequestedSOPInstanceUID, sopinstanceUID.c_str(), DIC_UI_LEN);
+        request.msg.NSetRQ.RequestedSOPInstanceUID[DIC_UI_LEN] = 0;
+
+        DcmDataset inAttr;
+        DcmDataset* outAttr;
+        GIL::DICOM::PACSController::Instance()->FillInQuery(modificationList, &inAttr, m_server);
+
+        OFCondition cond = sendNRequest(presCtx, request, &inAttr, response, statusDetail, outAttr);
+        if (cond.good()) status = response.msg.NSetRSP.DimseStatus;
+        if (status != 0) {
+                LOG_ERROR(ambitolog, "Error sending nset rq status: "<< status);
+                std::ostringstream ostr;
+                ostr << "Error sending nset rq status: "<< status << " details: ";
+                DIMSE_printNStatusString(ostr, status);
+                throw GIL::DICOM::PACSException(ostr.str(), "GIL::CustomAssociation");
+        }
+        if (statusDetail) delete statusDetail;
+        return cond.good();
+}
+
+bool CustomAssociation::getRQ( const std::string& /*sopclassUID*/, const std::string& /*sopinstanceUID*/, const int* /*attributeIdentifierList*/, unsigned long /*numShorts*/, int& /*status*/,  GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& /*attributeListOut*/)
+/*
+OFCondition CustomAssociation::getRQ(
+const char *sopclassUID,
+const char *sopinstanceUID,
+const Uint16 *attributeIdentifierList,
+ssize_t numShorts,
+Uint16& status,
+DcmDataset* &attributeListOut)
+*/
+{
+        /*
+        if (assoc == NULL)
+        {
+        return DIMSE_ILLEGALASSOCIATION;
+        }
+        if ((sopclassUID==NULL)||(sopinstanceUID==NULL))
+        {
+        return DIMSE_NULLKEY;
+        }
+
+        T_ASC_PresentationContextID presCtx = findAcceptedPC(sopclassUID);
+        if (presCtx == 0)
+        {
+        return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        T_DIMSE_Message request;
+        T_DIMSE_Message response;
+        DcmDataset *statusDetail = NULL;
+
+        // construct N-GET-RQ
+        request.CommandField = DIMSE_N_GET_RQ;
+        request.msg.NGetRQ.MessageID = assoc->nextMsgID++;
+        strcpy(request.msg.NGetRQ.RequestedSOPClassUID, sopclassUID);
+        strcpy(request.msg.NGetRQ.RequestedSOPInstanceUID, sopinstanceUID);
+        request.msg.NGetRQ.ListCount = 0;
+        if (attributeIdentifierList) request.msg.NGetRQ.ListCount = (int)numShorts;
+        request.msg.NGetRQ.AttributeIdentifierList = (DIC_US *)attributeIdentifierList;
+
+        OFCondition cond = sendNRequest(presCtx, request, NULL, response, statusDetail, attributeListOut);
+        if (cond.good()) status = response.msg.NGetRSP.DimseStatus;
+        if (status != 0) {
+        LOG_ERROR(ambitolog, "Error sending create rq status: "<< status);
+        std::ostringstream ostr;
+        ostr << "Error sending create rq status: "<< status << " details: ";
+        DIMSE_printNStatusString(ostr, status);
+        throw GIL::DICOM::PACSException(ostr.str(), "GIL::CustomAssociation");
+        }
+        if (statusDetail) delete statusDetail;
+        return cond;
+        */
+        return false;
+}
+
+bool CustomAssociation::actionRQ( const std::string& /*sopclassUID*/, const std::string& /*sopinstanceUID*/, int /*actionTypeID*/, const GIL::DICOM::DicomDataset& /*actionInformation*/, int& /*status*/,  GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& /*attributeListOut*/)
+/*
+OFCondition CustomAssociation::actionRQ(
+const char *sopclassUID,
+const char *sopinstanceUID,
+Uint16 actionTypeID,
+DcmDataset *actionInformation,
+Uint16& status,
+DcmDataset* &actionReply)
+*/
+{
+        /*
+        if (assoc == NULL)
+        {
+        return DIMSE_ILLEGALASSOCIATION;
+        }
+        if ((sopclassUID==NULL)||(sopinstanceUID==NULL))
+        {
+        return DIMSE_NULLKEY;
+        }
+
+        T_ASC_PresentationContextID presCtx = findAcceptedPC(sopclassUID);
+        if (presCtx == 0)
+        {
+        return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        T_DIMSE_Message request;
+        T_DIMSE_Message response;
+        DcmDataset *statusDetail = NULL;
+
+        // construct N-ACTION-RQ
+        request.CommandField = DIMSE_N_ACTION_RQ;
+        request.msg.NActionRQ.MessageID = assoc->nextMsgID++;
+        strcpy(request.msg.NActionRQ.RequestedSOPClassUID, sopclassUID);
+        strcpy(request.msg.NActionRQ.RequestedSOPInstanceUID, sopinstanceUID);
+        request.msg.NActionRQ.ActionTypeID = (DIC_US)actionTypeID;
+        ////////TODO: EST� FALLANDO
+        OFCondition cond = sendNRequest(presCtx, request, actionInformation, response, statusDetail, actionReply);
+        if (cond.good()) status = response.msg.NActionRSP.DimseStatus;
+        if (status != 0) {
+        LOG_ERROR(ambitolog, "Error sending create rq status: "<< status);
+        std::ostringstream ostr;
+        ostr << "Error sending create rq status: "<< status << " details: ";
+        DIMSE_printNStatusString(ostr, status);
+        throw GIL::DICOM::PACSException(ostr.str(), "GIL::CustomAssociation");
+        }
+        if (statusDetail) delete statusDetail;
+        return cond;
+        */
+        return false;
+}
+
+bool CustomAssociation::deleteRQ( const std::string& /*sopclassUID*/, const std::string& /*sopinstanceUID*/, int& /*status*/)
+/*
+OFCondition CustomAssociation::deleteRQ(
+const char *sopclassUID,
+const char *sopinstanceUID,
+Uint16& status)
+*/
+{
+        /*
+        if (assoc == NULL)
+        {
+        return DIMSE_ILLEGALASSOCIATION;
+        }
+        if ((sopclassUID==NULL)||(sopinstanceUID==NULL))
+        {
+        return DIMSE_NULLKEY;
+        }
+
+        T_ASC_PresentationContextID presCtx = findAcceptedPC(sopclassUID);
+        if (presCtx == 0)
+        {
+        return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        T_DIMSE_Message request;
+        T_DIMSE_Message response;
+        DcmDataset *statusDetail = NULL;
+        DcmDataset *attributeListOut = NULL;
+
+        // construct N-DELETE-RQ
+        request.CommandField = DIMSE_N_DELETE_RQ;
+        request.msg.NDeleteRQ.MessageID = assoc->nextMsgID++;
+        strcpy(request.msg.NDeleteRQ.RequestedSOPClassUID, sopclassUID);
+        strcpy(request.msg.NDeleteRQ.RequestedSOPInstanceUID, sopinstanceUID);
+
+        OFCondition cond = sendNRequest(presCtx, request, NULL, response, statusDetail, attributeListOut);
+        if (cond.good()) status = response.msg.NDeleteRSP.DimseStatus;
+        if (status != 0) {
+        LOG_ERROR(ambitolog, "Error sending create rq status: "<< status);
+        std::ostringstream ostr;
+        ostr << "Error sending create rq status: "<< status << " details: ";
+        DIMSE_printNStatusString(ostr, status);
+        throw GIL::DICOM::PACSException(ostr.str(), "GIL::CustomAssociation");
+        }
+        if (statusDetail) delete statusDetail;
+        if (attributeListOut) delete attributeListOut;  // should never happen
+        return cond;
+        */
+        return false;
+}
+
+bool CustomAssociation::releaseAssociation()
+/*
+OFCondition CustomAssociation::releaseAssociation()
+*/
+{
+        /*
+        OFCondition result = EC_Normal;
+        if (assoc)
+        {
+        result = ASC_releaseAssociation(assoc);
+        Drop();
+        Destroy();
+        assoc = NULL;
+        }
+        return result;
+        */
+        return false;
+}
+
+bool CustomAssociation::abortAssociation()
+/*
+OFCondition CustomAssociation::abortAssociation()
+*/
+{
+        /*
+        OFCondition result = EC_Normal;
+        if (assoc)
+        {
+        result = ASC_abortAssociation(assoc);
+        Drop();
+        Destroy();
+        assoc =  NULL;
+        }
+        return result;
+        */
+        return false;
+}
+
+T_ASC_PresentationContextID CustomAssociation::findAcceptedPC(const char *sopclassuid)
+{
+        /*
+        if ((assoc==NULL)||(sopclassuid==NULL)) return 0;
+
+        // if the SOP class is one of the Basic Grayscale Print Management Meta SOP Classes,
+        // look for a presentation context for Basic Grayscale Print.
+        OFString sopclass(sopclassuid);
+        if ((sopclass == UID_BasicFilmSessionSOPClass) ||
+        (sopclass == UID_BasicFilmBoxSOPClass) ||
+        (sopclass == UID_BasicGrayscaleImageBoxSOPClass) ||
+        (sopclass == UID_PrinterSOPClass)) sopclassuid = UID_BasicGrayscalePrintManagementMetaSOPClass;
+        */
+        OFString sopclass(sopclassuid);
+        return ASC_findAcceptedPresentationContextID(assoc, sopclassuid);
+}
+
+
+void CustomAssociation::Gnk2Dcmtk(const GIL::DICOM::DicomDataset& /*base*/, DcmDataset* /*query*/)
+{
+        /*
+        OFCondition cond;
+        typedef GIL::DICOM::DicomDataset TJerarquia;
+        typedef GIL::DICOM::ListaTags TListaTags;
+
+        for (TListaTags::const_iterator it = base.tags.begin(); it != base.tags.end(); ++it) {
+        //DcmElement* e = GIL::DICOM::DICOMManager::CrearElementoConValor((*it).first.c_str());
+
+        if (e != NULL) {
+        const std::string& val = (*it).second;
+        if (val.size() > 0) {
+        e->putString( (*it).second.c_str() );
+        }
+
+        cond = query->insert(e, true, false);
+
+        if (cond.bad()) {
+        LOG_ERROR("PACSCONTROLLER", "No se pudo insertar el elemento: (" << e->getTag().toString().c_str() << "): " << cond.text());
+        }
+        }
+
+        for (TJerarquia::DatasetList::const_iterator it2 = base.secuencias.begin(); it2 != base.secuencias.end(); it2++) {
+        const TJerarquia& seq = (*it2);
+        //DcmElement* es = GIL::DICOM::DICOMManager::CrearElementoConValor(seq.tagName.c_str());
+
+        for (TJerarquia::DatasetList::const_iterator it3 = seq.items.begin(); it3 != seq.items.end(); it3++) {
+        const TJerarquia& item = (*it3);
+        DcmItem* di = new DcmItem();
+
+        for (TListaTags::const_iterator it4 = item.tags.begin(); it4 != item.tags.end(); it4++) {
+        //DcmElement* ei = GIL::DICOM::DICOMManager::CrearElementoConValor((*it4).first.c_str());
+        if (ei != NULL) {
+        const std::string& val = (*it4).second;
+        if (val.size() > 0) {
+        ei->putString( (*it4).second.c_str() );
+        }
+        cond = di->insert(ei, true, false);
+
+        if (cond.bad()) {
+        LOG_ERROR("PACSCONTROLLER", "No se pudo insertar el elemento: (" << ei->getTag().toString().c_str() << "): " << cond.text());
+        }
+        }
+
+        }
+
+        query->insertSequenceItem(es->getTag(), di);
+        }
+        }
+        }
+        */
+}
+
+
+
+
diff --git a/cadxcore/main/controllers/dcmtk/dicomcustomassociation.h b/cadxcore/main/controllers/dcmtk/dicomcustomassociation.h
new file mode 100644
index 0000000..d25f930
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomcustomassociation.h
@@ -0,0 +1,111 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <vector>
+#include <list>
+#include "dicomassociation.h"
+#include <api/dicom/icustomassociation.h>
+
+#include <api/dicom/imodelodicom.h>
+#include <main/controllers/dcmtk/dicomservers.h>
+#include <main/controllers/dcmtk/dicomnetwork.h>
+#include <api/controllers/ipacscontroller.h>
+
+#include <dcmtk/ofstd/ofstream.h>
+#include <dcmtk/ofstd/ofstring.h>      /* for class OFString */
+
+class DicomImage;
+
+
+class CustomEventHandler
+{
+public:
+
+        /// destructor
+        virtual ~CustomEventHandler() {}
+
+        /** handles an N-EVENT-REPORT-RQ message. This method is called
+         *  from CustomAssociation whenever an event report is received.
+         *  The event message, information and status detail elements must be copied
+         *  if they should remain valid after the end of this method call.
+         *  The event handler can react on the event message in any implementation
+         *  dependent way, e.g. display the event on-screen.
+         *  @param eventMessage the N-EVENT-REPORT-RQ message
+         *  @param eventInformation event information dataset. May be NULL if no event information available.
+         *  @param statusDetail status detail dataset. ay be NULL if no status detail available.
+         *  @return the status code to be sent back as part of the N-EVENT-REPORT-RSP message, usually STATUS_Success.
+         */
+        virtual DIC_US handleEvent(
+                T_DIMSE_N_EventReportRQ& eventMessage,
+                DcmDataset *eventInformation,
+                DcmDataset *statusDetail)=0;
+};
+
+class CustomAssociation : public Association, public GIL::DICOM::ICustomAssociation
+{
+public:
+
+        /**
+         Constructors
+         */
+        CustomAssociation(void* connectionKey, const std::string& ambitolog, GNC::IProxyNotificadorProgreso* pNotificadorProgreso = NULL);
+
+        virtual ~CustomAssociation();
+
+        virtual bool Connect(const std::string& serverId, const std::string& local_aet);
+
+        virtual bool createRQ( const std::string& sopclassUID, const GIL::DICOM::DicomDataset& attributeListIn,  int& status, std::string& affectedSopinstanceUID);
+        virtual bool setRQ(    const std::string& sopclassUID, const std::string& sopinstanceUID, const GIL::DICOM::DicomDataset& modificationList, int& status);
+        virtual bool getRQ(    const std::string& sopclassUID, const std::string& sopinstanceUID, const int *attributeIdentifierList, unsigned long numShorts, int& status,  GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& attributeListOut);
+        virtual bool actionRQ( const std::string& sopclassUID, const std::string& sopinstanceUID, int actionTypeID, const GIL::DICOM::DicomDataset& actionInformation, int& status,  GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& attributeListOut);
+        virtual bool deleteRQ( const std::string& sopclassUID, const std::string& sopinstanceUID, int& status);
+
+        virtual bool releaseAssociation();
+        virtual bool abortAssociation();
+
+
+        void dumpNMessage(T_DIMSE_Message &msg, DcmItem *dataset, OFBool outgoing);
+        OFCondition sendNRequest( T_ASC_PresentationContextID presId, T_DIMSE_Message &request, DcmDataset *rqDataSet, T_DIMSE_Message &response, DcmDataset* &statusDetail, DcmDataset* &rspDataset);
+        T_ASC_PresentationContextID findAcceptedPC(const char *sopclassuid);
+
+private:
+
+        void Gnk2Dcmtk(const GIL::DICOM::DicomDataset& base, DcmDataset* query);
+
+private:
+        GIL::DICOM::DCMTK::Network* Net;
+        std::string                 ambitolog;
+
+protected:
+        GNC::IProxyNotificadorProgreso* m_pNotificadorProgreso;
+
+        virtual void OnAddPresentationContext(T_ASC_Parameters* params);
+
+        T_ASC_PresentationContextID presId;
+
+private:
+
+        T_DIMSE_BlockingMode blockMode;
+        /// the current event handler. Can be NULL.
+        CustomEventHandler *eventHandler;
+        GNC::GCS::Ptr<DicomServer> m_server;
+};
diff --git a/cadxcore/main/controllers/dcmtk/dicomechoassociation.cpp b/cadxcore/main/controllers/dcmtk/dicomechoassociation.cpp
new file mode 100644
index 0000000..bbd3655
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomechoassociation.cpp
@@ -0,0 +1,56 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/controllers/icontroladorlog.h>
+#include <api/dicom/idicomconformance.h>
+#include <main/controllers/controladorlog.h>
+#include "dicomechoassociation.h"
+
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+EchoAssociation::EchoAssociation(const std::string& ambitolog) : Association(ambitolog)
+{
+        m_abstractSyntax = GIL::DICOM::Conformance::GetScpSOPClasses().GetSOPClassUID("VerificationSOPClass");
+}
+
+EchoAssociation::~EchoAssociation()
+{
+}
+
+void EchoAssociation::OnAddPresentationContext(T_ASC_Parameters* params)
+{
+        GIL::DICOM::ArrayHelper transfersyntaxes;
+        transfersyntaxes.copyFrom(GIL::DICOM::Conformance::GetScuSOPClasses().GetSupportedTransferSyntaxUIDs("VerificationSOPClass"));
+
+
+        OFCondition cond = ASC_addPresentationContext(params, 1, m_abstractSyntax.c_str(), transfersyntaxes.array, transfersyntaxes.size);
+        if (cond.bad()) {
+                LOG_ERROR(ambitolog, "Unable to add default presentation context");
+        }
+}
diff --git a/cadxcore/main/controllers/dcmtk/dicomechoassociation.h b/cadxcore/main/controllers/dcmtk/dicomechoassociation.h
new file mode 100644
index 0000000..190d45f
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomechoassociation.h
@@ -0,0 +1,39 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include "dicomassociation.h"
+#include <api/dicom/imodelodicom.h>
+
+class EchoAssociation : public Association
+{
+public:
+
+        /**
+         Constructors
+         */
+        EchoAssociation(const std::string& ambitolog);
+
+        virtual ~EchoAssociation();
+
+        virtual void OnAddPresentationContext(T_ASC_Parameters* params);
+
+};
diff --git a/cadxcore/main/controllers/dcmtk/dicomfindassociation.cpp b/cadxcore/main/controllers/dcmtk/dicomfindassociation.cpp
new file mode 100644
index 0000000..6cd6e08
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomfindassociation.cpp
@@ -0,0 +1,233 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include "dicomfindassociation.h"
+#include <wx/string.h>
+#include <wx/intl.h>
+#include <api/internationalization/internationalization.h>
+#include <main/controllers/dicommanager.h>
+#include <main/controllers/dcmtk/dicomservers.h>
+#include <api/dicom/dicomdataset.h>
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/dcmnet/diutil.h>
+#include <dcmtk/dcmdata/dcuid.h>
+#include <dcmtk/dcmdata/dcdatset.h>
+#include <dcmtk/dcmdata/dcdeftag.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+FindAssociation::FindAssociation(const std::string& ambitolog) : Association(ambitolog), pResultsWrapper(NULL)
+{
+        SetFindRootQueryRetrieveInformationModel(FRQRIM_Study);
+        GNC::GCS::Permisos::EstadoPermiso estado = GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits", "find_rsp_max_results");
+        if (estado) {
+                maxResults = estado.ObtenerValor<int>();
+        } else {
+                maxResults = -1;
+        }
+        bPushResults = true;
+}
+
+FindAssociation::~FindAssociation()
+{
+        DeleteResultStack();
+}
+
+OFCondition FindAssociation::findSCU(T_ASC_Association *assoc, DcmDataset *query)
+{
+        OFCondition cond;
+        DIC_US msgId = assoc->nextMsgID++;
+        T_ASC_PresentationContextID presId;
+        T_DIMSE_C_FindRQ req;
+        T_DIMSE_C_FindRSP rsp;
+        DcmDataset *statusDetail = NULL;
+        std::string errorMessage;
+
+        if (query == NULL) {
+                return makeOFCondition(OFM_dcmnet, DIMSEC_BADDATA, OF_error, "NULL DIMSE Query");
+        }
+
+        DeleteResultStack();
+
+        /* which presentation context should be used */
+        presId = ASC_findAcceptedPresentationContextID(assoc, m_abstractSyntax.c_str());
+        if (presId == 0) {
+                LOG_ERROR(ambitolog, "Invalid PresentationContextId");
+                return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        req.MessageID = msgId;
+        req.DataSetType = DIMSE_DATASET_PRESENT;
+        req.Priority = DIMSE_PRIORITY_LOW;
+        strncpy(req.AffectedSOPClassUID, m_abstractSyntax.c_str(), DIC_UI_LEN);
+        req.AffectedSOPClassUID[DIC_UI_LEN] = 0;
+
+        FindCallbackInfo callbackData;
+        callbackData.pCaller = this;
+        callbackData.assoc = assoc;
+
+        cond = DIMSE_findUser(assoc, presId, &req, query,
+                              findCallback, (void*) &callbackData,
+                              (m_timeout == 0) ? DIMSE_BLOCKING : DIMSE_NONBLOCKING,
+                              m_timeout,
+                              &rsp, &statusDetail);
+
+        if(rsp.DimseStatus != STATUS_Success && rsp.DimseStatus != STATUS_Pending) {
+                std::ostringstream os;
+                os << DU_cfindStatusString(rsp.DimseStatus);
+                if (statusDetail != NULL) {
+                        OFString errorComment;
+                        if (statusDetail->findAndGetOFString(DCM_ErrorComment, errorComment).good()) {
+                                os << ". " << errorComment.c_str();
+                        }
+                }
+                errorMessage = os.str();
+        }
+
+        if (cond == EC_Normal) {
+                if (rsp.DimseStatus == STATUS_Success) {
+                }
+        }
+
+        if (statusDetail != NULL) {
+                LOG_DEBUG(ambitolog, "DIMSE_findUser(): Status: " << std::endl << DumpDataset(statusDetail));
+                delete statusDetail;
+        }
+
+        if (rsp.DimseStatus != STATUS_Success && rsp.DimseStatus != STATUS_Pending) {
+                return makeOFCondition(OFM_dcmnet, 18, OF_error, errorMessage.c_str());
+        }
+
+        return cond;
+}
+
+void FindAssociation::findCallback(void* callbackData, T_DIMSE_C_FindRQ* /*rq*/, int responseCount, T_DIMSE_C_FindRSP* rsp, DcmDataset *responseIdentifiers)
+{
+        FindCallbackInfo* pCallback = (FindCallbackInfo*) callbackData;
+
+        if (pCallback->pCaller->GetMaxResults() > 0 && responseCount > pCallback->pCaller->GetMaxResults()) {
+                LOG_DEBUG(pCallback->pCaller->ambitolog, "findCallback(): Ignoring response num " << responseCount << ". The maximum number of responses was " << pCallback->pCaller->GetMaxResults());
+                rsp->DimseStatus = STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest;
+                pCallback->pCaller->Stop();
+                ASC_releaseAssociation(pCallback->assoc);
+                return;
+        }
+
+        wxString mess = wxString::Format(_("%d results has been found"), (int)(responseCount) );
+        std::string mensaje(mess.ToUTF8());
+
+        LOG_DEBUG(pCallback->pCaller->ambitolog, "Processing response num " << responseCount);
+        if(!pCallback->pCaller->NotificarProgreso(0.0f, mensaje)) {
+                rsp->DimseStatus = STATUS_FIND_Cancel_MatchingTerminatedDueToCancelRequest;
+                pCallback->pCaller->Stop();
+                ASC_releaseAssociation(pCallback->assoc);
+                LOG_INFO(pCallback->pCaller->ambitolog, "Operation canceled by user");
+                return;
+        } else {
+                DcmDataset* response = new DcmDataset(*responseIdentifiers);
+
+                if (pCallback->pCaller->bPushResults) {
+                        pCallback->pCaller->result.push(response);
+                        //push into Ginkgo data...
+                        if (pCallback->pCaller->pResultsWrapper != NULL && pCallback->pCaller->pDicomServer.IsValid()) {
+                                GIL::DICOM::DICOMManager mgr( response, pCallback->pCaller->pDicomServer->GetDefaultCharset() );
+                                GNC::GCS::Ptr<GIL::DICOM::DicomDataset> base = new GIL::DICOM::DicomDataset();
+                                mgr.CargarJerarquia((*base), DCM_MaxReadLength);
+                                pCallback->pCaller->pResultsWrapper->push_back(base);
+                        }
+                } else {
+                        LOG_DEBUG("C-FIND", "No results found");
+                }
+                pCallback->pCaller->OnResponseReceived(response);
+        }
+}
+
+OFCondition FindAssociation::SendObject(DcmDataset *dataset)
+{
+        return findSCU(assoc, dataset);
+}
+
+void FindAssociation::OnResponseReceived(DcmDataset* response)
+{
+        LOG_DEBUG(ambitolog, "Response received: " << std::endl << DumpDataset(response));
+}
+
+DcmStack* FindAssociation::GetResultStack()
+{
+        return &result;
+}
+
+DcmStack FindAssociation::CopyResultStack()
+{
+        DcmStack copy;
+
+        for (unsigned int i = 0; i < result.card(); i++) {
+                DcmDataset* dset = new DcmDataset( *(static_cast<DcmDataset*>(result.elem(i))) );
+                copy.push(dset);
+        }
+
+        return copy;
+}
+
+void FindAssociation::DeleteResultStack()
+{
+        DcmDataset* obj = NULL;
+        unsigned int size = result.card();
+
+        for (Uint32 i = 0; i < size; i++) {
+                obj = static_cast<DcmDataset*>(result.elem(i));
+                delete obj;
+        }
+
+        result.clear();
+}
+
+void FindAssociation::SetMaxResults(int max)
+{
+        maxResults = max;
+}
+
+void FindAssociation::SetCallbackInfo(std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >* pRwrapper, const GNC::GCS::Ptr<DicomServer>& dicomServer)
+{
+        pResultsWrapper = pRwrapper;
+        pDicomServer = dicomServer;
+}
+
+int FindAssociation::GetMaxResults()
+{
+        return maxResults;
+}
+
+void FindAssociation::OnAddPresentationContext(T_ASC_Parameters* params)
+{
+        OFCondition cond = ASC_addPresentationContext(params, 1, m_abstractSyntax.c_str(), AllTransferSyntaxes, 3);
+        if (cond.bad()) {
+                LOG_ERROR(ambitolog, "Unable to add default presentation context");
+        }
+}
diff --git a/cadxcore/main/controllers/dcmtk/dicomfindassociation.h b/cadxcore/main/controllers/dcmtk/dicomfindassociation.h
new file mode 100644
index 0000000..cc5d1fe
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomfindassociation.h
@@ -0,0 +1,164 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include "dicomassociation.h"
+#include <api/dicom/imodelodicom.h>
+#include <list>
+#include <api/autoptr.h>
+
+// This was defined in dcmtk3.5.4 but has been removed since
+// Redefing it here may blow right in your face
+//
+#define UID_FINDGeneralPurposeWorklistInformationModel   "1.2.840.10008.5.1.4.32.1"
+
+class DicomServer;
+namespace GIL
+{
+namespace DICOM
+{
+class DicomDataset;
+}
+}
+
+class FindAssociation : public Association
+{
+public:
+
+        typedef enum FindRootQueryRetrieveInformationModel {
+                FRQRIM_Patient = 0,
+                FRQRIM_Study,
+                FRQRIM_PatientStudyOnly,
+                FRQRIM_WorkListInformation,
+                FRQRIM_GeneralPurposeWorklist,
+                FRQRIM_ProtocolInformation,
+                FRQRIM_ModalityWorklist
+        } FindRootQueryRetrieveInformationModel;
+
+        /**
+         Constructors
+         */
+        FindAssociation(const std::string& ambitolog);
+
+        virtual ~FindAssociation();
+
+        /* Find Root Query Retrieve InformationModel */
+        void SetFindRootQueryRetrieveInformationModel(FindRootQueryRetrieveInformationModel frqi)
+        {
+                switch (frqi) {
+                case FRQRIM_Patient:
+                        Association::m_abstractSyntax = (char *) UID_FINDStudyRootQueryRetrieveInformationModel;
+                        break;
+                case FRQRIM_Study:
+                        Association::m_abstractSyntax = (char *) UID_FINDStudyRootQueryRetrieveInformationModel;
+                        break;
+                case FRQRIM_WorkListInformation:
+                        Association::m_abstractSyntax = (char *) UID_FINDModalityWorklistInformationModel;
+                        break;
+                case FRQRIM_GeneralPurposeWorklist:
+                        Association::m_abstractSyntax = (char *) UID_FINDGeneralPurposeWorklistInformationModel;
+                        break;
+                case FRQRIM_ProtocolInformation:
+                        Association::m_abstractSyntax = (char *) UID_FINDHangingProtocolInformationModel;
+                        break;
+                case FRQRIM_ModalityWorklist:
+                        Association::m_abstractSyntax = (char *) UID_FINDModalityWorklistInformationModel;
+                        break;
+                default:
+                        throw std::exception();
+                }
+        }
+
+        void SetAbstractSyntax(const std::string& abstractSyntax)
+        {
+                Association::m_abstractSyntax = abstractSyntax.c_str();
+        }
+
+
+        /**
+         Send a query object (C-Find) through association
+         */
+        OFCondition SendObject(DcmDataset *dataset);
+
+        /**
+         Get the result stack of the last query
+         */
+        virtual DcmStack* GetResultStack();
+
+        DcmStack CopyResultStack();
+
+        /**
+         Delete all objects from the result stack
+         */
+        virtual void DeleteResultStack();
+
+        /**
+         Set the maximum number of results
+         */
+        void SetMaxResults(int max);
+
+        /**
+        Set results wrapper to do incremental finds
+        */
+        void SetCallbackInfo(std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >* pRwrapper, const GNC::GCS::Ptr<DicomServer>& dicomServer);
+
+        /**
+         Get the maximum number of results
+         */
+        int GetMaxResults();
+
+protected:
+
+        /**
+         Response handler
+         */
+        virtual void OnResponseReceived(DcmDataset* response);
+
+        /**
+         Protected data
+         */
+        DcmStack result;
+
+        bool bPushResults;
+
+private:
+
+        typedef struct _FindCallbackInfo {
+                FindAssociation* pCaller;
+                T_ASC_Association* assoc;
+        } FindCallbackInfo;
+
+        /**
+         C-Find service class user
+         */
+        OFCondition findSCU(T_ASC_Association * assoc, DcmDataset * query);
+
+        /**
+         Callback function for C-Find service class user
+         */
+        static void findCallback(void*, T_DIMSE_C_FindRQ*, int responseCount, T_DIMSE_C_FindRSP*, DcmDataset *responseIdentifiers);
+        int maxResults;
+        std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >* pResultsWrapper;
+        GNC::GCS::Ptr<DicomServer> pDicomServer;
+
+        virtual void OnAddPresentationContext(T_ASC_Parameters* params);
+
+};
diff --git a/cadxcore/main/controllers/dcmtk/dicomgetassociation.cpp b/cadxcore/main/controllers/dcmtk/dicomgetassociation.cpp
new file mode 100644
index 0000000..0e32b0c
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomgetassociation.cpp
@@ -0,0 +1,832 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#define LOGGER "C-GET"
+#include "dicomnetwork.h"
+#include "dicomgetassociation.h"
+
+#include <dcmtk/dcmnet/diutil.h>
+#include <dcmtk/dcmjpeg/djencode.h>
+#include <dcmtk/dcmjpeg/djrplol.h>
+#include <dcmtk/dcmdata/dcuid.h>
+#include <dcmtk/dcmdata/dcdatset.h>
+#include <dcmtk/dcmdata/dcdeftag.h>
+
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/controladorlog.h>
+#include <api/dicom/imodelodicom.h>
+#include <main/controllers/controladorpermisos.h>
+#include <api/controllers/ipacscontroller.h>
+#include <main/entorno.h>
+
+#include "istorecallback.h"
+#include <wx/intl.h>
+
+
+
+GetAssociation::GetAssociation(const std::string& _ambitolog, IModeloDicom* pModelo) :
+        FindAssociation(_ambitolog),
+        m_maxReceivePDULength(ASC_DEFAULTMAXPDU),
+        m_wellKnownNumResults(0),
+        m_pModelo(pModelo),
+
+        m_numeroImagenes(0),
+        m_mensaje(""),
+        m_errorMessage(""),
+        m_bytesDescargados(0)
+{
+        m_abstractSyntax.assign(UID_GETStudyRootQueryRetrieveInformationModel);
+}
+
+GetAssociation::~GetAssociation() { }
+
+void GetAssociation::Create(const std::string& title, const std::string& peer, int port, const std::string& ouraet, /*int ourPort,*/ const char *abstractSyntax)
+{
+        Association::Create(title, peer, port, ouraet, abstractSyntax);
+}
+
+void GetAssociation::SetWellKnownNumResults(unsigned int numResults)
+{
+        m_wellKnownNumResults = numResults;
+}
+
+void GetAssociation::SetModelo(IModeloDicom* pModelo)
+{
+        m_pModelo = pModelo;
+}
+
+OFCondition GetAssociation::SendObject(DcmDataset *dataset)
+{
+        return getSCU(dataset);
+}
+
+void GetAssociation::SetStorageSOPClasses(const GIL::DICOM::SOPClassList& SOPClasses)
+{
+        this->SOPClasses = SOPClasses;
+}
+
+void GetAssociation::OnAddPresentationContext(T_ASC_Parameters * params)
+{
+
+        unsigned int pid = 1;
+
+        OFCondition cond = ASC_addPresentationContext(params, pid, m_abstractSyntax.c_str(), AllTransferSyntaxes, 3);
+        if (cond.bad()) {
+                LOG_ERROR(ambitolog, "Unable to add GETStudyRootQueryRetrieveInformationModel presentation context");
+                return;
+        }
+
+        pid += 2;
+
+        if (SOPClasses.size() > 0) {
+                /*for (unsigned int i = 0; pid <= 255 && i < (unsigned int) numberOfDcmLongSCUStorageSOPClassUIDs && cond.good(); ++i) {
+                	if ( SOPClasses.find(dcmLongSCUStorageSOPClassUIDs[i]) != SOPClasses.end() ) {
+
+                		for (unsigned int j = 0; pid <= 255 && j < AllTransferSyntaxesCount && cond.good(); j++) {
+                			cond = ASC_addPresentationContext(params, pid, dcmLongSCUStorageSOPClassUIDs[i], &AllTransferSyntaxes[j], 1);
+                			pid += 2;
+                		}
+                	}
+                }*/
+                const GIL::DICOM::TransferSyntaxMap& tsMap = GIL::DICOM::Conformance::GetTransferSyntaxes();
+
+                for (GIL::DICOM::SOPClassList::const_iterator itSopClass = SOPClasses.begin(); pid <= 255 && itSopClass != SOPClasses.end() && cond.good(); ++itSopClass) {
+                        for (GIL::DICOM::TransferSyntaxMap::const_iterator itTS = tsMap.begin(); pid <= 255 && itTS != tsMap.end() && cond.good(); ++itTS) {
+                                const char* ts[] = {(*itTS).second.c_str()};
+                                cond = ASC_addPresentationContext(params, pid, (*itSopClass).c_str(), ts, 1);
+                                pid += 2;
+                        }
+
+                }
+
+                if (pid >= 255) {
+                        LOG_WARN("C-GET", "Too many PresentationContexts setted");
+                }
+        } else {
+                for (unsigned int i = 0; pid <= 255 && i < (unsigned int) numberOfDcmShortSCUStorageSOPClassUIDs && cond.good(); ++i) {
+                        cond = ASC_addPresentationContext(params, pid, dcmShortSCUStorageSOPClassUIDs[i], AllTransferSyntaxes, AllTransferSyntaxesCount);
+                        pid += 2;
+                }
+                if (pid >= 255) {
+                        LOG_WARN("C-GET", "Too many PresentationContexts setted");
+                }
+        }
+}
+
+static int
+selectReadable(T_ASC_Association *assoc,
+               T_ASC_Network *net, T_ASC_Association *subAssoc,
+               T_DIMSE_BlockingMode blockMode, int timeout)
+{
+        T_ASC_Association *assocList[2];
+        int assocCount = 0;
+
+        if (net != NULL && subAssoc == NULL) {
+                if (ASC_associationWaiting(net, 0)) {
+                        /* association request waiting on network */
+                        return 2;
+                }
+        }
+        assocList[0] = assoc;
+        assocCount = 1;
+        assocList[1] = subAssoc;
+        if (subAssoc != NULL) assocCount++;
+        if (subAssoc == NULL) {
+                timeout = 1;    /* poll wait until an assoc req or move rsp */
+        } else {
+                if (blockMode == DIMSE_BLOCKING) {
+                        timeout = 10000;    /* a long time */
+                }
+        }
+        if (!ASC_selectReadableAssociation(assocList, assocCount, timeout)) {
+                /* none readable */
+                return 0;
+        }
+        if (assocList[0] != NULL) {
+                /* main association readable */
+                return 1;
+        }
+        if (assocList[1] != NULL) {
+                /* sub association readable */
+                return 2;
+        }
+        /* should not be reached */
+        return 0;
+}
+
+
+OFCondition MDIMSE_getUser(
+        T_ASC_Association* assoc,
+        GetAssociation* getassoc,
+        T_ASC_PresentationContextID presID,
+        T_DIMSE_C_GetRQ *request,
+        DcmDataset *requestIdentifiers,
+        T_DIMSE_BlockingMode blockMode, int timeout,
+        /* out */
+        T_DIMSE_C_GetRSP * /*response*/, DcmDataset **statusDetail,
+        DcmDataset **rspIds)
+{
+        T_DIMSE_Message req, rsp;
+        DIC_US msgId;
+        int responseCount = 0;
+        T_ASC_Association *subAssoc = NULL;
+        DIC_US status = STATUS_Pending;
+
+        if (requestIdentifiers == NULL) return DIMSE_NULLKEY;
+
+        bzero((char*)&req, sizeof(req));
+        bzero((char*)&rsp, sizeof(rsp));
+
+        req.CommandField = DIMSE_C_GET_RQ;
+        request->DataSetType = DIMSE_DATASET_PRESENT;
+        req.msg.CGetRQ = *request;
+
+        msgId = request->MessageID;
+
+        LOG_DEBUG("C-GET", "Accepted presID " << (int)presID);
+
+        OFCondition cond = DIMSE_sendMessageUsingMemoryData(assoc, presID, &req,
+                           NULL, requestIdentifiers,
+                           NULL, NULL);
+        if (cond != EC_Normal) {
+                return cond;
+        }
+
+        /* receive responses */
+
+        while (cond == EC_Normal && status == STATUS_Pending) {
+
+                /* if user wants, multiplex between net/subAssoc
+                * and responses over main assoc.
+                */
+                switch (selectReadable(assoc, getassoc->GetNetwork()->GetDcmtkNet(), subAssoc, blockMode, timeout)) {
+                case 0:
+                        /* none are readble, timeout */
+                        if (blockMode == DIMSE_BLOCKING) {
+                                continue;       /* continue with while loop */
+                        } else {
+                                return DIMSE_NODATAAVAILABLE;
+                        }
+        /* break; */ // never reached after continue or return.
+                case 1:
+                        /* main association readable */
+                        break;
+                case 2:
+                        /* net/subAssoc readable */
+                        getassoc->subOpCallback(NULL, getassoc->GetNetwork()->GetDcmtkNet(), &subAssoc);
+                        continue;   /* continue with main loop */
+                        /* break; */ // never reached after continue statement
+                }
+
+                bzero((char*)&rsp, sizeof(rsp));
+
+                cond = DIMSE_receiveCommand(assoc, blockMode, timeout, &presID,
+                                            &rsp, statusDetail);
+                if (cond != EC_Normal) {
+                        return cond;
+                }
+
+                {
+                        OFString str;
+                        DIMSE_dumpMessage(str, rsp, DIMSE_INCOMING);
+                        LOG_DEBUG("C-GET", "Command received" << std::endl << str.c_str());
+                }
+
+                switch (rsp.CommandField) {
+                case DIMSE_C_STORE_RQ: {
+                        if (rsp.msg.CStoreRQ.DataSetType != DIMSE_DATASET_NULL) {
+                                cond = getassoc->storeSCP(assoc, &rsp, presID);
+                                if (cond != EC_Normal) {
+                                        return cond;
+                                } else {
+                                        ;
+                                }
+                        }
+                }
+                break;
+                case DIMSE_C_GET_RSP: {
+                        if (rsp.msg.CGetRSP.MessageIDBeingRespondedTo != msgId) {
+                                std::stringstream ss;
+                                ss << "DIMSE: Unexpected Response MsgId: " << rsp.msg.CGetRSP.MessageIDBeingRespondedTo << " (expected: " << msgId << ")";
+                                return makeDcmnetCondition(DIMSEC_UNEXPECTEDRESPONSE, OF_error, ss.str().c_str());
+                        }
+
+                        status = rsp.msg.CGetRSP.DimseStatus;
+                        responseCount++;
+
+                        switch (status) {
+                        case STATUS_Pending:
+                                if (*statusDetail != NULL) {
+                                        DCMNET_WARN(DIMSE_warn_str(assoc) << "getUser: Pending with statusDetail, ignoring detail");
+                                        delete *statusDetail;
+                                        *statusDetail = NULL;
+                                }
+                                if (rsp.msg.CGetRSP.DataSetType != DIMSE_DATASET_NULL) {
+                                        DCMNET_WARN(DIMSE_warn_str(assoc) << "getUser: Status Pending, but DataSetType!=NULL");
+                                        DCMNET_WARN(DIMSE_warn_str(assoc) << "Assuming NO response identifiers are present");
+                                }
+
+                                break;
+
+                        default:
+
+                                if (rsp.msg.CGetRSP.DataSetType != DIMSE_DATASET_NULL) {
+                                        cond = DIMSE_receiveDataSetInMemory(assoc, blockMode, timeout,
+                                                                            &presID, rspIds, NULL, NULL);
+                                        if (cond != EC_Normal) {
+                                                return cond;
+                                        }
+                                }
+                                break;
+                        }
+                }
+                break;
+                default: {
+                        std::stringstream ss;
+                        ss << "DIMSE: Unexpected Response Command Field: " << (unsigned)rsp.CommandField;
+                        return makeDcmnetCondition(DIMSEC_UNEXPECTEDRESPONSE, OF_error, ss.str().c_str());
+                }
+                break;
+                }
+        }
+
+
+        /* do remaining sub-association work, we may receive a non-pending
+        * status before the sub-association has cleaned up.
+        */
+        while (subAssoc != NULL) {
+                getassoc->subOpCallback(getassoc, getassoc->GetNetwork()->GetDcmtkNet(), &subAssoc);
+        }
+
+
+        return cond;
+}
+
+
+OFCondition GetAssociation::getSCU(DcmDataset *pdset)
+{
+        OFCondition cond;
+        T_ASC_PresentationContextID presId;
+        T_DIMSE_C_GetRQ req;
+        T_DIMSE_C_GetRSP rsp;
+        DIC_US msgId = assoc->nextMsgID++;
+        DcmDataset* rspIds = NULL;
+        const char* sopClass;
+        DcmDataset* statusDetail = NULL;
+
+        if (pdset == NULL) {
+                LOG_ERROR(ambitolog, "Dataset nulo en getSCU");
+                return DIMSE_NULLKEY;
+        }
+
+        {
+                OFString str;
+                ASC_dumpParameters(str, assoc->params, ASC_ASSOC_AC);
+                LOG_DEBUG("C-GET", str.c_str());
+
+        }
+
+        //sopClass = m_abstractSyntaxMove;
+        sopClass = m_abstractSyntax.c_str();
+
+        // which presentation context should be used
+        presId = ASC_findAcceptedPresentationContextID(assoc, sopClass);
+
+        if (presId == 0) {
+                return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        req.MessageID = msgId;
+        strncpy(req.AffectedSOPClassUID, sopClass, DIC_UI_LEN);
+        req.AffectedSOPClassUID[DIC_UI_LEN] = 0;
+        req.Priority = DIMSE_PRIORITY_HIGH;
+        req.DataSetType = DIMSE_DATASET_PRESENT;
+
+        ResetearMedida(true);
+        m_numeroImagenes=0;
+
+        {
+                OFString str;
+                DIMSE_dumpMessage(str, req, DIMSE_OUTGOING, pdset, presId);
+                LOG_DEBUG("C-GET", str.c_str());
+        }
+
+        cond = MDIMSE_getUser(
+                       assoc,
+                       this,
+                       presId,
+                       &req,
+                       pdset,
+                       DIMSE_BLOCKING,
+                       0,
+                       &rsp, &statusDetail, &rspIds);
+
+        if (cond.bad()) {
+                std::ostringstream os;
+                os << DU_cgetStatusString(cond.status());
+                if (statusDetail != NULL) {
+                        OFString errorComment;
+                        if (statusDetail->findAndGetOFString(DCM_ErrorComment, errorComment).good()) {
+                                os << ". " << errorComment.c_str();
+                        }
+                }
+                m_errorMessage = os.str();
+        }
+
+        if (statusDetail != NULL) {
+                LOG_DEBUG(ambitolog, "DIMSE_getUser(): Estado: " << std::endl << DumpDataset(statusDetail));
+                delete statusDetail;
+        }
+
+        if (rspIds != NULL) {
+
+                delete rspIds;
+        }
+
+        return cond;
+
+        /*if( rsp.DimseStatus != STATUS_Success && rsp.DimseStatus != STATUS_Pending) {
+        	std::ostringstream os;
+        	os << DU_cgetStatusString(rsp.DimseStatus);
+        	if (statusDetail != NULL) {
+        		OFString errorComment;
+        		if (statusDetail->findAndGetOFString(DCM_ErrorComment, errorComment).good()) {
+        			os << ". " << errorComment.c_str();
+        		}
+        	}
+        	m_errorMessage = os.str();
+        }
+
+        if (statusDetail != NULL) {
+        	LOG_DEBUG(ambitolog, "DIMSE_getUser(): Estado: " << std::endl << DumpDataset(statusDetail));
+        	delete statusDetail;
+        }
+
+        if (rspIds != NULL) {
+
+        	delete rspIds;
+        }
+
+        if(m_errorMessage != "" || rsp.NumberOfFailedSubOperations > 0 ) {
+        	if (m_errorMessage.size() == 0) {
+        		m_errorMessage = "Some operations failed";
+        	}
+        	return makeOFCondition(OFM_dcmnet, 18, OF_error, m_errorMessage.c_str());
+        }
+
+        return cond;*/
+}
+
+void GetAssociation::getCallback(void * /*callbackData*/, T_DIMSE_C_GetRQ * /*request*/, int /*responseCount*/, T_DIMSE_C_GetRSP * /*response*/)
+{
+
+}
+
+void GetAssociation::subOpCallback(void *pCaller, T_ASC_Network *aNet, T_ASC_Association **subAssoc)
+{
+        GetAssociation* caller = static_cast<GetAssociation*>(pCaller);
+
+        if (caller->GetNetwork() == NULL) {
+                return;
+        }
+
+        wxString msg = wxString::Format(_("Downloading file %d"), (int)(++caller->m_numeroImagenes));
+        caller->m_mensaje = std::string(msg.ToUTF8());
+        LOG_DEBUG(caller->ambitolog, caller->m_mensaje);
+        caller->NotificarProgreso((float)caller->m_numeroImagenes/100,caller->m_mensaje);
+
+        if (*subAssoc == NULL) {
+                // negotiate association
+                LOG_DEBUG(caller->ambitolog, "Aceptando subasociacion");
+                caller->acceptSubAssoc(aNet, subAssoc);
+        } else {
+                // be a service class provider
+                LOG_DEBUG(caller->ambitolog, "Invocando subOp SCP");
+                caller->subOpSCP(subAssoc);
+        }
+}
+
+OFCondition GetAssociation::acceptSubAssoc(T_ASC_Network* /*aNet*/, T_ASC_Association** /*assoc*/)
+{
+        OFCondition cond = EC_Normal;
+
+        return cond;
+
+}
+
+OFCondition GetAssociation::subOpSCP(T_ASC_Association **subAssoc)
+{
+        T_DIMSE_Message msg;
+        T_ASC_PresentationContextID presID;
+
+        /* just in case */
+        if (!ASC_dataWaiting(*subAssoc, 0)) {
+                LOG_TRACE(ambitolog, "No hay datos pendientes");
+                return DIMSE_NODATAAVAILABLE;
+        }
+
+        OFCondition cond = DIMSE_receiveCommand(*subAssoc, DIMSE_BLOCKING, 0, &presID, &msg, NULL);
+
+        if (cond == EC_Normal) {
+                switch (msg.CommandField) {
+                case DIMSE_C_STORE_RQ:
+                        LOG_TRACE(ambitolog, "Invocando C-STORE_RQ");
+                        cond = storeSCP(*subAssoc, &msg, presID);
+                        break;
+                case DIMSE_C_ECHO_RQ:
+                        LOG_TRACE(ambitolog, "Invocando C-ECHO_RQ");
+                        cond = echoSCP(*subAssoc, &msg, presID);
+                        break;
+                default:
+                        LOG_ERROR(ambitolog, "Tipo de comando incorrecto. Sólo se aceptan C-STORE_RQ o C-ECHO_RQ en esta etapa" << cond.text());
+                        cond = DIMSE_BADCOMMANDTYPE;
+                        break;
+                }
+        }
+
+        // clean up on association termination
+        if (cond == DUL_PEERREQUESTEDRELEASE) {
+                cond = ASC_acknowledgeRelease(*subAssoc);
+                ASC_dropSCPAssociation(*subAssoc);
+                ASC_destroyAssociation(subAssoc);
+                return cond;
+        } else if (cond == DUL_PEERABORTEDASSOCIATION) {
+                LOG_ERROR(ambitolog, "El PACS remoto aborto la asociacion"  << cond.text());
+        } else if (cond != EC_Normal) {
+                LOG_ERROR(ambitolog, "Ha ocurrido un error y se abortara la asociacion"  << cond.text());
+                // some kind of error so abort the association
+                cond = ASC_abortAssociation(*subAssoc);
+        }
+
+        if (cond != EC_Normal) {
+                ASC_dropAssociation(*subAssoc);
+                ASC_destroyAssociation(subAssoc);
+        }
+        return cond;
+}
+
+OFCondition GetAssociation::storeSCP(T_ASC_Association *assoc, T_DIMSE_Message *msg, T_ASC_PresentationContextID presID)
+{
+        OFCondition cond;
+        T_DIMSE_C_StoreRQ* req;
+
+        req = &msg->msg.CStoreRQ;
+
+        StoreCallbackInfo callbackData;
+        callbackData.pCaller = this;
+        callbackData.assoc = assoc;
+        callbackData.lastTick = std::clock();
+
+        std::string fileName = GNC::Entorno::Instance()->CreateGinkgoTempFile();
+
+        cond = DIMSE_storeProvider(assoc, presID, req, fileName.c_str(), 1,
+                                   NULL, storeSCPCallback, (void*) & callbackData,
+                                   DIMSE_BLOCKING, 0);
+
+        if (cond.good()) {
+                //we are going to read received file dataset
+                DcmFileFormat ff;
+                ff.loadFile(fileName.c_str(), EXS_Unknown, EGL_noChange, DCM_TagInfoLength);
+                DcmDataset* imageDataSet = ff.getDataset();
+
+                if ((imageDataSet)) {
+                        // do not duplicate the dataset, let the user do this
+                        // if he wants to
+                        OnFileReceived(fileName, imageDataSet);
+                }
+        }
+
+        return cond;
+}
+
+void GetAssociation::storeSCPCallback(void *callbackData, T_DIMSE_StoreProgress *progress, T_DIMSE_C_StoreRQ *req, char* imageFileName, DcmDataset ** /*imageDataSet*/, T_DIMSE_C_StoreRSP *rsp, DcmDataset **statusDetail)
+{
+        DIC_UI sopClass;
+        DIC_UI sopInstance;
+
+        StoreCallbackInfo *cbdata = (StoreCallbackInfo*) callbackData;
+        GetAssociation* caller = cbdata->pCaller;
+
+        float partial = 0.0f;
+        float step = 0.0f;
+
+        if (caller->m_wellKnownNumResults > 0 ) {
+                step = 1.0f / (float) caller->m_wellKnownNumResults;
+                partial = (float)caller->m_numeroImagenes * step;
+        } else {
+                ;
+        }
+
+        if (progress->state == DIMSE_StoreBegin) {
+                wxString msg;
+                if (caller->m_wellKnownNumResults > 0) {
+                        msg = wxString::Format(_("Downloading file %d/%d"), (int)(caller->m_numeroImagenes + 1), (int)(caller->m_wellKnownNumResults) );
+                } else {
+                        msg = wxString::Format(_("Downloading file %d"), (int)(caller->m_numeroImagenes + 1) );
+                }
+                caller->m_mensaje = std::string(msg.ToUTF8());
+                LOG_DEBUG(caller->ambitolog, caller->m_mensaje);
+
+                if (!caller->NotificarProgreso((float) partial, caller->m_mensaje) ) {
+                        rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
+                        caller->Stop();
+                        ASC_releaseAssociation(caller->assoc);
+                        LOG_INFO(caller->ambitolog, "Operation canceled by user");
+                        return;
+                }
+
+                caller->m_bytesDescargados += progress->totalBytes;
+                GNC::GCS::Permisos::EstadoPermiso estado = GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits", "study_size");
+                if (estado) {
+                        if (estado.ObtenerValor<long>() < (caller->m_bytesDescargados / 1024) ) {
+                                caller->m_errorMessage = _Std("Study download size limit exceeded");
+                                rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
+                                caller->Stop();
+                                ASC_releaseAssociation(caller->assoc);
+                                return;
+                        }
+                }
+                cbdata->lastTick = std::clock();
+        } else if (progress->state == DIMSE_StoreProgressing) {
+                std::clock_t curTick = std::clock();
+                if ( (curTick - cbdata->lastTick) > (CLOCKS_PER_SEC >> 1) ) {
+                        cbdata->lastTick = curTick;
+                        std::stringstream ostr;
+                        ostr << caller->m_mensaje;
+                        ostr.setf(std::ios::floatfield, std::ios::fixed );
+                        ostr.precision(2);
+                        ostr <<  " (" << caller->TasaTransferencia(progress->progressBytes) << " kb/s)";
+                        std::string msg(ostr.str());
+                        if(!caller->NotificarProgreso( partial + step * ((float)progress->progressBytes/(float)progress->totalBytes), msg) ) {
+                                rsp->DimseStatus = STATUS_STORE_Refused_OutOfResources;
+                                OFCondition cond = ASC_releaseAssociation(cbdata->assoc);
+                                return;
+                        }
+                }
+        } else if (progress->state == DIMSE_StoreEnd) {
+                LOG_TRACE(caller->ambitolog, "storeSCPCallback(). DIMSE_StoreEnd");
+                caller->m_numeroImagenes++;
+                *statusDetail = NULL; /* no status detail */
+                caller->ResetearMedida();
+
+                /* could save the image somewhere else, put it in database, etc */
+                rsp->DimseStatus = STATUS_Success;
+
+                //we are going to read received file dataset
+                DcmFileFormat ff;
+                ff.loadFile(imageFileName, EXS_Unknown, EGL_noChange, DCM_TagInfoLength);
+                DcmDataset* imageDataSet = ff.getDataset();
+                /* should really check the image to make sure it is consistent,
+                * that its sopClass and sopInstance correspond with those in
+                * the request.
+                */
+                if (rsp->DimseStatus == STATUS_Success) {
+                        /* which SOP class and SOP instance ? */
+                        if (!DU_findSOPClassAndInstanceInDataSet(imageDataSet, sopClass, sopInstance)) {
+                                rsp->DimseStatus = STATUS_STORE_Error_DataSetDoesNotMatchSOPClass;
+                                LOG_ERROR(caller->ambitolog, "No se pudo encontrar SOPClass o SOPInstanceUID en el dataset");
+                        } else if (strcmp(sopClass, req->AffectedSOPClassUID) != 0) {
+                                rsp->DimseStatus = STATUS_STORE_Error_DataSetDoesNotMatchSOPClass;
+                                LOG_ERROR(caller->ambitolog, "El SOPClass del dataset(" << sopClass << ") no coincide con el SOPClass requerido (" << req->AffectedSOPClassUID << ")");
+                        } else if (strcmp(sopInstance, req->AffectedSOPInstanceUID) != 0) {
+                                rsp->DimseStatus = STATUS_STORE_Error_DataSetDoesNotMatchSOPClass;
+                                LOG_ERROR(caller->ambitolog, "El SOPInstance del dataset(" << sopInstance << ") no coincide con el SOPInstanceUID requerido (" << req->AffectedSOPInstanceUID << ")");
+                        }
+                }
+        }
+}
+
+OFCondition GetAssociation::echoSCP(T_ASC_Association *assoc, T_DIMSE_Message *msg, T_ASC_PresentationContextID presID)
+{
+        OFCondition cond;
+
+        // the echo succeeded !!
+        cond = DIMSE_sendEchoResponse(assoc, presID, &msg->msg.CEchoRQ, STATUS_Success, NULL);
+
+        return cond;
+}
+
+void GetAssociation::OnFileReceived(const std::string& fileName, DcmDataset* dset)
+{
+        if (m_pModelo != NULL) {
+                OFString OFEstudioUId;
+                if (dset->findAndGetOFString(DCM_StudyInstanceUID, OFEstudioUId).good()) {
+                        OFString OFPacienteUID;
+                        std::string PacienteUID;
+                        if (dset->findAndGetOFString(DCM_PatientID, OFPacienteUID).good()) {
+                                PacienteUID.assign(OFPacienteUID.c_str());
+                        }
+
+                        OFString OFPacienteNombre;
+                        std::string PacienteNombre;
+                        if (dset->findAndGetOFString(DCM_PatientName, OFPacienteNombre).good()) {
+                                PacienteNombre.assign(OFPacienteNombre.c_str());
+                        }
+
+                        OFString OFPacienteFechaNacimiento;
+                        std::string PacienteFechaNacimiento;
+
+                        if (dset->findAndGetOFString(DCM_PatientBirthDate, OFPacienteFechaNacimiento).good()) {
+                                PacienteFechaNacimiento.assign(OFPacienteFechaNacimiento.c_str());
+                        }
+
+
+                        OFString OFPacienteSexo;
+                        std::string PacienteSexo;
+                        if (dset->findAndGetOFString(DCM_PatientSex, OFPacienteSexo).good()) {
+                                PacienteSexo.assign(OFPacienteSexo.c_str());
+                        }
+
+                        const IModeloPaciente& paciente = m_pModelo->InsertarPaciente(PacienteUID, PacienteNombre, PacienteFechaNacimiento, PacienteSexo);
+
+                        OFString OFEstudioUID;
+                        std::string EstudioUID;
+                        if (dset->findAndGetOFString(DCM_StudyInstanceUID, OFEstudioUID).good()) {
+                                EstudioUID.assign(OFEstudioUID.c_str());
+                        }
+
+                        OFString OFEAccNumber;
+                        std::string AccNumber;
+                        if (dset->findAndGetOFString(DCM_AccessionNumber, OFEAccNumber).good()) {
+                                AccNumber.assign(OFEAccNumber.c_str());
+                        }
+
+                        OFString OFEstudioDescripcion;
+                        std::string EstudioDescripcion;
+                        if (dset->findAndGetOFString(DCM_StudyDescription, OFEstudioDescripcion).good()) {
+                                EstudioDescripcion.assign(OFEstudioDescripcion.c_str());
+                        }
+
+                        OFString OFEstudioModalidad;
+                        std::string EstudioModalidad;
+                        if (dset->findAndGetOFString(DCM_ModalitiesInStudy, OFEstudioModalidad).good()) {
+                                EstudioModalidad.assign(OFEstudioModalidad.c_str());
+                        }
+
+                        OFString OFEstudioFecha;
+                        std::string EstudioFecha;
+                        if (dset->findAndGetOFString(DCM_StudyDate, OFEstudioFecha).good()) {
+                                EstudioFecha.assign(OFEstudioFecha.c_str());
+                        }
+
+                        OFString OFEstudioHora;
+                        std::string EstudioHora;
+                        if (dset->findAndGetOFString(DCM_StudyTime, OFEstudioHora).good()) {
+                                EstudioHora.assign(OFEstudioHora.c_str());
+                        }
+
+
+                        OFString OFEstudioDoctor;
+                        std::string EstudioDoctor;
+                        if (dset->findAndGetOFString(DCM_ReferringPhysicianName, OFEstudioDoctor).good()) {
+                                EstudioDoctor.assign(OFEstudioDoctor.c_str());
+                        }
+
+                        m_pModelo->InsertarEstudio(paciente.GetUID(), EstudioUID, AccNumber, EstudioDescripcion, EstudioModalidad, EstudioFecha, EstudioHora, EstudioDoctor);
+
+                        OFString OFSerieUID;
+                        std::string SerieUID;
+                        if (dset->findAndGetOFString(DCM_SeriesInstanceUID, OFSerieUID).good()) {
+                                SerieUID.assign(OFSerieUID.c_str());
+                        }
+
+                        OFString OFSerieTipo;
+                        std::string SerieTipo;
+                        if (dset->findAndGetOFString(DCM_SeriesType, OFSerieTipo).good()) {
+                                SerieTipo.assign(OFSerieTipo.c_str());
+                        }
+
+                        OFString OFSerieFecha;
+                        std::string SerieFecha;
+                        if (dset->findAndGetOFString(DCM_SeriesDate, OFSerieFecha).good()) {
+                                SerieFecha.assign(OFSerieFecha.c_str());
+                        }
+
+                        OFString OFSerieHora;
+                        std::string SerieHora;
+                        if (dset->findAndGetOFString(DCM_SeriesTime, OFSerieHora).good()) {
+                                SerieHora.assign(OFSerieHora.c_str());
+                        }
+
+                        OFString OFSerieDescripcion;
+                        std::string SerieDescripcion;
+                        if (dset->findAndGetOFString(DCM_SeriesDescription, OFSerieDescripcion).good()) {
+                                SerieDescripcion.assign(OFSerieDescripcion.c_str());
+                        }
+
+                        OFString OFSerieNumero;
+                        std::string SerieNumero;
+                        if (dset->findAndGetOFString(DCM_NumberOfSeriesRelatedInstances, OFSerieNumero).good()) {
+                                SerieNumero.assign(OFSerieNumero.c_str());
+                        }
+
+                        OFString OFSerieDoctor;
+                        std::string SerieDoctor;
+                        if (dset->findAndGetOFString(DCM_ReferringPhysicianName, OFSerieDoctor).good()) {
+                                SerieDoctor.assign(OFSerieDoctor.c_str());
+                        }
+
+                        m_pModelo->InsertarSerie(EstudioUID, SerieUID, SerieTipo, SerieFecha, SerieHora, SerieDescripcion,SerieNumero,SerieDoctor);
+
+                        OFString OFUIDImagen;
+                        std::string UIDImagen;
+                        OFString OFInstanceNumber;
+                        std::string InstanceNumber;
+                        if (dset->findAndGetOFString(DCM_SOPInstanceUID, OFUIDImagen).good()) {
+                                UIDImagen.assign(OFUIDImagen.c_str());
+                                if (dset->findAndGetOFString(DCM_InstanceNumber, OFInstanceNumber).good()) {
+                                        InstanceNumber.assign(OFInstanceNumber.c_str());
+                                } else {
+                                        LOG_WARN(ambitolog, "InstanceNumber not found. Setting to default");
+                                        InstanceNumber.assign("1");
+                                }
+                                m_pModelo->InsertarImagen(SerieUID,UIDImagen, InstanceNumber, fileName);
+                        } else {
+                                LOG_ERROR("DCMGET", "InstanceUID not found");
+                        }
+                }
+        }
+}
+
+
+float GetAssociation::TasaTransferencia(int bytesDescargados)
+{
+        time_t nuevoInstante = time(NULL);
+        const double tiempo = difftime(nuevoInstante,m_medida.m_instante);
+        if(tiempo>0.5) {
+                if(bytesDescargados > m_medida.bytesDescargados) {
+                        const double bytesRecibidosPeriodo = bytesDescargados - m_medida.bytesDescargados;
+                        m_medida.oldTasa = ( ((float)bytesRecibidosPeriodo/1024.0f)/tiempo );
+                        m_medida.bytesDescargados = bytesDescargados;
+                        m_medida.m_instante = nuevoInstante;
+                }
+        }
+        return m_medida.oldTasa;
+}
+
+void GetAssociation::ResetearMedida(bool clearTasa)
+{
+        m_medida.bytesDescargados = 0;
+        m_medida.m_instante = time(NULL);
+        if(clearTasa) {
+                m_medida.oldTasa=0.0f;
+        }
+}
+
diff --git a/cadxcore/main/controllers/dcmtk/dicomgetassociation.h b/cadxcore/main/controllers/dcmtk/dicomgetassociation.h
new file mode 100644
index 0000000..d8a85a5
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomgetassociation.h
@@ -0,0 +1,110 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#include <set>
+#include <ctime>
+#include "dicomfindassociation.h"
+#include "istorecallback.h"
+
+
+class GetAssociation : public FindAssociation
+{
+public:
+
+
+        GetAssociation(const std::string& ambitolog, IModeloDicom* pModelo=NULL);
+        virtual ~GetAssociation();
+
+        void SetWellKnownNumResults(unsigned int numResults);
+
+        void SetModelo(IModeloDicom* pModelo);
+
+        void SetStorageSOPClasses(const GIL::DICOM::SOPClassList& SOPClasses);
+
+        void Create(const std::string& title, const std::string& peer, int port, const std::string& ouraet, /*int ourPort,*/ const char *abstractSyntax = UID_GETStudyRootQueryRetrieveInformationModel);
+
+        OFCondition SendObject(DcmDataset *dataset);
+
+//protected:
+
+        virtual void OnAddPresentationContext(T_ASC_Parameters *params);
+
+        virtual void OnFileReceived(const std::string& fileName, DcmDataset* dataSet);
+
+        int m_maxReceivePDULength;
+
+        unsigned int m_wellKnownNumResults;
+
+//private:
+
+        typedef struct _GetCallbackInfo {
+                T_ASC_Association *assoc;
+                T_ASC_PresentationContextID presId;
+                GetAssociation* pCaller;
+        } GetCallbackInfo;
+
+        typedef struct _StoreCallbackInfo {
+                GetAssociation* pCaller;
+                T_ASC_Association* assoc;
+                std::clock_t lastTick;
+        } StoreCallbackInfo;
+
+        OFCondition getSCU(DcmDataset *pdset);
+
+        static void getCallback(void *callbackData, T_DIMSE_C_GetRQ *request, int responseCount, T_DIMSE_C_GetRSP *response);
+
+        OFCondition acceptSubAssoc(T_ASC_Network *aNet, T_ASC_Association **assoc);
+        OFCondition subOpSCP(T_ASC_Association **subAssoc);
+        static void subOpCallback(void * pCaller, T_ASC_Network *aNet, T_ASC_Association **subAssoc);
+
+        OFCondition storeSCP(T_ASC_Association *assoc, T_DIMSE_Message *msg, T_ASC_PresentationContextID presID);
+        static void storeSCPCallback(void *callbackData, T_DIMSE_StoreProgress *progress, T_DIMSE_C_StoreRQ *req, char *imageFileName, DcmDataset **imageDataSet, T_DIMSE_C_StoreRSP *rsp, DcmDataset **statusDetail);
+
+        OFCondition echoSCP(T_ASC_Association *assoc, T_DIMSE_Message *msg, T_ASC_PresentationContextID presID);
+
+
+        IModeloDicom* m_pModelo;
+public:
+        int m_numeroImagenes;
+        std::string m_mensaje;
+        std::string m_errorMessage;
+        long m_bytesDescargados;
+protected:
+        typedef struct TMedida {
+                time_t m_instante;
+                int bytesDescargados;
+                float oldTasa;
+                TMedida()
+                {
+                        m_instante = time(NULL);
+                        bytesDescargados = 0;
+                        oldTasa = 0.0f;
+                }
+        } TMedida;
+        TMedida m_medida;
+
+        GIL::DICOM::SOPClassList SOPClasses;
+public:
+        float TasaTransferencia(int bytesRestantes);
+        void ResetearMedida(bool clearTasa = false);
+};
diff --git a/cadxcore/main/controllers/dcmtk/dicomimg2dcm.cpp b/cadxcore/main/controllers/dcmtk/dicomimg2dcm.cpp
new file mode 100644
index 0000000..7ac652b
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomimg2dcm.cpp
@@ -0,0 +1,836 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <cstdio>
+
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/controllers/pacscontroller.h>
+#include <main/controllers/dicommanager.h>
+
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+// For sime reason dcmtk-3.6.1-20150924 has an hiccup in
+// dcmth/oflog/  logger.h and logmacro.h
+// since they are not used we define the include guards here
+#define DCMTK_LOG4CPLUS_TRACELOGGER_H
+#define DCMTK_LOG4CPLUS_LOGGING_MACROS_HEADER_
+
+#include "libi2d/document2dcm.h"
+#include "libi2d/i2djpgs.h"
+#include "libi2d/pdf2dsource.h"
+#include "libi2d/i2dles.h"
+#include "libi2d/i2dplsc.h"
+#include "libi2d/i2dplvlp.h"
+#include "libi2d/foooutpl.h"
+#include "libi2d/i2dplnsc.h"
+#include "dicomimg2dcm.h"
+#include "dcmtk/dcmdata/dcdict.h"
+#include "dcmtk/dcmdata/dchashdi.h"
+
+#include <dcmtk/dcmsr/dsrdoc.h>
+#include <dcmtk/dcmdata/dcfilefo.h>
+
+
+#include <wx/image.h>
+//en este grupo se almacenaran los atributos privados de ginkgo
+
+#ifdef DCMTK_POST_20170228
+#include <api/dicom/dicom_legacy.h>
+#endif 
+
+#define GINKGO_GROUP 0x0011
+
+class DcmElement;
+
+namespace GIL
+{
+namespace DICOM
+{
+
+//region "Helpers"
+
+DcmElement* DICOMImg2DCM::CrearElementoConValor(const char* s)
+{
+        unsigned int g = 0xffff;
+        unsigned int e = 0xffff;
+
+        OFString dicName, valStr;
+        OFString msg;
+
+        OFString str = s;
+        size_t pos = str.find('=');
+        if (pos != OFString_npos) {
+                valStr = str.substr(pos + 1, str.length());
+                dicName = str.substr(0, pos);
+        } else {
+                dicName = str;
+        }
+        pos = dicName.find("|");
+        if (pos != OFString_npos) {
+#if defined(_WIN32)
+                if (2 != _snscanf(dicName.c_str(), 11, "%x|%x", &g, &e))
+#else
+                if (2 != std::sscanf(dicName.c_str(), "%x|%x", &g, &e))
+#endif
+                {
+                        LOG_ERROR("Dicomizador", "Error al interpretar el tag " << s);
+                        return NULL;
+                }
+        } else {
+                DcmTagKey key(0xffff, 0xffff);
+                const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock();
+                const DcmDictEntry *dicent = globalDataDict.findEntry(dicName.c_str());
+                dcmDataDict.unlock();
+                if (dicent != NULL) {
+                        // found dictionary name, copy group and element number
+                        key = dicent->getKey();
+                        g = key.getGroup();
+                        e = key.getElement();
+                } else {
+                        // not found in dictionary
+                        std::cerr <<  "bad key format or dictionary name not found in dictionary: " << dicName << std::endl;
+                        LOG_ERROR("Dicomizador", "Error al obtener la entrada del diccionario para el tag " << dicName.c_str() << ". Cadena: " << s);
+                        return NULL;
+                }
+
+        }
+        DcmTag tag(g, e);
+        if (tag.error() != EC_Normal) {
+                std::cerr << "Tag desconocido: (" <<
+                          std::hex << std::setw(4) << std::setfill('0') << g << "|" <<
+                          std::hex << std::setw(4) << std::setfill('0') << e << ")" << std::endl;
+                return NULL;
+        }
+        DcmElement *elem = newDicomElement(tag);
+        if (elem == NULL) {
+                std::cerr << "No se pudo crear el elemento para el tag: (" <<
+                          std::hex << std::setw(4) << std::setfill('0') << g << "|" <<
+                          std::hex << std::setw(4) << std::setfill('0') << e << ")" << std::endl;
+                return NULL;
+        }
+        if (valStr.length() > 0) {
+                if (elem->putString( wxString( valStr.c_str(), wxConvUTF8).mb_str(*m_pConv) ).bad()) {
+                        std::cerr << "No se pudo asignar el valor al elemento: (" <<
+                                  std::hex << std::setw(4) << std::setfill('0') << g << "|" <<
+                                  std::hex << std::setw(4) << std::setfill('0') << e << ")=" << valStr.c_str() << std::endl;
+                        delete elem;
+                        return NULL;
+                }
+        }
+        return elem;
+
+}
+
+DICOMImg2DCM::DICOMImg2DCM()
+{
+        i2d = NULL;
+        outputPlug = NULL;
+        inputPlug = NULL;
+        resultObject = NULL;
+        writeXfer = EXS_Unknown;
+
+        std::string Charset;
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/Estacion","DefaultCharset",Charset,"ISO_IR 100");
+        if (Charset == "ISO_IR 192" || Charset == "ISO_IR 6") {
+                m_pConv = new wxCSConv(wxFONTENCODING_UTF8);
+        } else if (Charset == "ISO_IR 100") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_1);
+        } else if (Charset == "ISO_IR 101") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_2);
+        } else if (Charset == "ISO_IR 109") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_3);
+        } else if (Charset == "ISO_IR 110") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_4);
+        } else if (Charset == "ISO_IR 148") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_9);
+        } else if (Charset == "ISO_IR 144") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_5);
+        } else if (Charset == "ISO_IR 127") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_6);
+        } else if (Charset == "ISO_IR 126") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_7);
+        } else if (Charset == "ISO_IR 138") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_8);
+        } else {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_1);
+        }
+};
+DICOMImg2DCM::~DICOMImg2DCM()
+{
+        LiberarMemoria();
+        delete m_pConv;
+}
+
+void DICOMImg2DCM::LiberarMemoria()
+{
+        if (resultObject != NULL) {
+                delete resultObject;
+                resultObject = NULL;
+        }
+        if (inputPlug != NULL) {
+                delete inputPlug;
+                inputPlug = NULL;
+        }
+        if (outputPlug != NULL) {
+                delete outputPlug;
+                outputPlug = NULL;
+        }
+        if (i2d != NULL) {
+                delete i2d;
+                i2d = NULL;
+        }
+};
+
+
+//endregion
+
+
+void DICOMImg2DCM::Inicializar(std::string& inputFile, IInspectCallBack* pICallback, bool debug, TDICOMOutputFormat outputFormat)
+{
+        LiberarMemoria();
+
+        if (inputFile.length() == 0) {
+                throw I2DException("No se ha especificado el fichero de entrada");
+        }
+
+        if (GIL::DICOM::PACSController::Instance()->EsPDF(inputFile)) { // Special PDF Dicomization
+                //pdf => foo not need output plug
+                if (outputFormat == TDOF_AUTO) {
+                        outputFormat = TDOF_FOO;
+                }
+
+                PDF2DSource* pdfSource = new PDF2DSource();
+                if (pdfSource == NULL) {
+                        throw I2DException(_Std("Unable to reserve memory for PDF dicomization"));
+                }
+                pdfSource->setPDFFile(inputFile.c_str());
+                Inicializar(pdfSource, pICallback, debug, outputFormat);
+        } else {
+                // Traditional Image dicomization
+
+                //image => vlp
+                if (outputFormat == TDOF_AUTO) {
+                        outputFormat = TDOF_VLP;
+                }
+
+                GNC::GCS::Permisos::EstadoPermiso mantenerCodificacion = GNC::GCS::IControladorPermisos::Instance()->Get("core.importacion", "mantener");
+
+                if (mantenerCodificacion.Activo()) {
+                        //probamos a ver si nos vale cn un JPEG source
+                        I2DJpegSource *jpgSource = new I2DJpegSource();
+                        if (jpgSource == NULL) {
+                                throw I2DException(_Std("Unable to reserve memory for image Dicomization"));
+                        }
+                        // Set JPEG Options
+                        // Enable/Disable support for progressive JPEG
+                        jpgSource->setProgrSupport(OFTrue);
+                        // Enable/Disable support for extended sequential JPEG
+                        jpgSource->setExtSeqSupport(OFTrue);
+                        jpgSource->setImageFile(inputFile.c_str());
+                        Inicializar(jpgSource, pICallback, debug, outputFormat);
+                } else {
+                        wxString nombreImagen = FROMPATH(inputFile);
+                        wxImage img(nombreImagen);
+                        if(!img.Ok()) {
+                                throw I2DException(_Std("Image format not supported"));
+                        }
+
+                        unsigned char* imgData = img.GetData();
+                        TImageFile rgbLittleEndian(imgData, img.GetWidth(), img.GetHeight());
+                        Inicializar(rgbLittleEndian, pICallback, debug, outputFormat);
+                }
+        }
+}
+
+void DICOMImg2DCM::Inicializar(TImageFile& fileDefinition, IInspectCallBack* pICallback, bool debug, TDICOMOutputFormat outputFormat)
+{
+        I2DLittleEndianSource* littleEndianSource = new I2DLittleEndianSource(fileDefinition);
+        Inicializar(littleEndianSource, pICallback, debug, outputFormat);
+}
+
+void DICOMImg2DCM::Inicializar(D2DSource* plugEntrada, IInspectCallBack* pICallback, bool debug, TDICOMOutputFormat outputFormat)
+{
+        LiberarMemoria();
+
+        inputPlug = plugEntrada;
+
+        i2d = new Document2Dcm();
+        if (i2d == NULL) {
+                throw I2DException("No se pudo reservar memoria para realizar la conversion");
+        }
+
+        OFBool dMode = OFFalse;
+        OFBool vMode = OFFalse;
+
+        if (debug) {
+                dMode = OFTrue;
+                vMode = OFTrue;
+                i2d->setDebugMode(OFTrue);
+                i2d->setLogStream(&ofConsole);
+        }
+
+        if (vMode)
+                std::cout << inputPlug->inputFormat() << std::endl;
+
+        if (outputFormat == TDOF_VLP || outputFormat == TDOF_AUTO) {
+                outputPlug = new I2DOutputPlugVLP();
+        } else if (outputFormat == TDOF_SC) {
+                outputPlug = new I2DOutputPlugSC();
+        } else if (outputFormat == TDOF_NSC) {
+                outputPlug = new I2DOutputPlugNewSC();
+        } else if (outputFormat == TDOF_FOO) {
+                outputPlug = new FooOutputPlug();
+        } else {
+                throw I2DException("No existe ningun plugin para el formato de salida especificado");
+        }
+
+
+        if (vMode)
+                std::cout << outputPlug->ident() << std::endl;
+
+        outputPlug->setDebugMode(dMode);
+        outputPlug->setLogStream(&ofConsole);
+
+        ActualizarCampos(pICallback);
+
+        // ISO Latin 1 option
+        //  setISOLatin1(OFTrue)  => set latin-1 as standard character set
+        //  setISOLatin1(OFFalse) => keep 7-bit ASCII as standard character set
+        //  i2d->setISOLatin1(OFTrue);
+        i2d->setUTF8(OFTrue);
+
+        // attribute validity checking
+        //   enabled/disabled
+        OFBool doChecks = OFTrue;
+
+        // insert missing type 2 attributes (Sólo si doChecks es True)
+        //   enabled/disabled
+        OFBool insertType2 = OFTrue;
+
+        // invent missing type 1 attributes (Sólo si doChecks es True)
+        //   enabled/disabled
+        OFBool inventType1 = OFTrue;
+
+        i2d->setValidityChecking(doChecks, insertType2, inventType1);
+        outputPlug->setValidityChecking(doChecks, insertType2, inventType1);
+
+        inputPlug->setDebugMode(dMode);
+        inputPlug->setLogStream(&ofConsole);
+
+        // make sure data dictionary is loaded
+        if (!dcmDataDict.isDictionaryLoaded()) {
+                LiberarMemoria();
+                throw I2DException("No se ha cargado el diccionario de datos");
+        }
+
+        OFCondition cond;
+
+        cond = i2d->convert(inputPlug, outputPlug, resultObject, writeXfer);
+
+        if (cond.bad()) {
+                //si es un jpegsource se trata de leer la imagen y convertirla desde little endian... (por aqui pasan los png, bmp,... cuando esta activo el mantener)
+                I2DJpegSource* pJPeg = dynamic_cast<I2DJpegSource*>(inputPlug);
+                if (pJPeg != NULL) {
+                        OFString path = pJPeg->getImageFile();
+                        LiberarMemoria();
+                        wxString nombreImagen = FROMPATH(path);
+                        wxImage img(nombreImagen);
+                        if(!img.Ok()) {
+                                throw I2DException(_Std("Image format not supported"));
+                        }
+
+                        unsigned char* imgData = img.GetData();
+                        TImageFile rgbLittleEndian(imgData, img.GetWidth(), img.GetHeight());
+                        Inicializar(rgbLittleEndian, pICallback, debug, outputFormat);
+                } else {
+                        LiberarMemoria();
+                        throw I2DException(cond.text());
+                }
+        }
+
+        if (pICallback != NULL) {
+
+                // Dumping DICOM Tags...
+                DcmDataDictionary& globalDataDict = dcmDataDict.wrlock();
+                DcmHashDictIterator iter(globalDataDict.normalBegin());
+                DcmHashDictIterator end(globalDataDict.normalEnd());
+
+                std::string keyStr;
+                std::string descStr;
+                std::string valStr;
+
+                char keyFormat[12];
+
+                for (; iter != end; ++iter) {
+
+                        DcmTagKey tagkey = (*iter)->getKey();
+                        //std::cout << "Checking " << keyStr << std::endl;
+                        if (sprintf(keyFormat, "%04X|%04X", tagkey.getGroup(), tagkey.getElement()) > 8) {
+                                //std::cout << "Asigning " << keyFormat << std::endl;
+                                keyStr.assign(keyFormat);
+                                descStr = (*iter)->getTagName();
+                                OFString val;
+                                OFCondition c = resultObject->findAndGetOFStringArray(tagkey, val);
+                                if (c.good()) {
+                                        valStr = val.c_str();
+                                        pICallback->Inspect(keyStr, descStr, valStr);
+                                }
+                        }
+                }
+                dcmDataDict.unlock();
+        }
+
+
+
+        if (pICallback != NULL) {
+                pICallback->Done();
+        }
+}
+
+int DICOMImg2DCM::InsertarTagsPrivados(TipoPrivateTags& tags)
+{
+        return InsertarTagsPrivados(tags,i2d->getOverrideKeys());
+}
+
+int DICOMImg2DCM::InsertarTagsPrivados(TipoPrivateTags& tags, DcmDataset* dcmDataSet)
+{
+        //se busca el uid en el rango (GINKGO_GROUP,0010-00FF)
+        unsigned int g=GINKGO_GROUP;
+        unsigned int e=0;
+        OFCondition cond;
+        DcmElement* element;
+
+        e=GetElementIdentifier(tags,dcmDataSet);
+
+        if(e>0x00FF || e==0) {
+                //no deberia llegar aqui
+                std::cerr<<"error al almacenar los tags privados, todos los slots ocupados" <<std::endl;
+                return 0;
+        }
+
+        //ya tenemos el e del modulo hay que hacer un desplazamiento de 8 bits a la izquierda para obtener el rango
+        //si el elemento es 00xx el rango sera xx00-xxFF
+        e = e << 8;
+
+        unsigned int eTemp;
+        TipoPrivateTags::ListaTags& ListaTags = tags.GetListaTags();
+        for (TipoPrivateTags::ListaTags::iterator it = ListaTags.begin(); it != ListaTags.end(); ++it) {
+                eTemp = e | (*it).first;
+                element = (*it).second->ToElement(g,eTemp);
+                if (element != NULL) {
+                        cond = dcmDataSet->insert(element, true, false);
+                        if (cond.bad()) {
+                                std::cerr << "error al almacenar los tags privados, error al escribir en el dataset: (" << g << ","<<eTemp<<")" <<std::endl;
+                                return 0;
+                        }
+                } else {
+                        std::cerr << "error al almacenar los tags privados, error al crear el elemento: (" << g << ","<<eTemp<<")" <<std::endl;
+                        return 0;
+                }
+        }
+
+        return 1;
+}
+
+int DICOMImg2DCM::InsertarJerarquia(DicomDataset& base)
+{
+        if (i2d == NULL) {
+                throw I2DException("El conversor no se ha inicializado previamente");
+        }
+
+        int val = InsertarJerarquia(base,i2d->getOverrideKeys(), NULL, NULL);
+        return val;
+};
+
+int DICOMImg2DCM::InsertarJerarquia(DicomDataset& base,DcmDataset* dcmDataSet, DcmItem* itemPadre, DcmSequenceOfItems* seqPadre)
+{
+
+        int numTotalInsertados = 0;
+        int numTagsInsertados  = 0;
+        int numItemsInsertados = 0;
+        int numSeqsInsertadas  = 0;
+
+        // Insertamos todos los tags correspondientes a este nivel en la raiz (de haberla, si no: en el dataset).
+        for (ListaTags::iterator it = base.tags.begin(); it != base.tags.end(); ++it) {
+                DcmElement* e = this->CrearElementoConValor((*it).first.c_str());
+                if (e != NULL) {
+                        e->putString( wxString( (*it).second.c_str(), wxConvUTF8).mb_str(*m_pConv) );
+
+                        OFCondition cond;
+                        if (itemPadre == NULL) {
+                                cond = dcmDataSet->insert(e, OFTrue);
+                                char* str = NULL;
+                                e->getString(str);
+                                /*if(str!=NULL){
+                                	std::cout << "raiz << " << e->getTag().toString() <<  "=" << str << std::endl;
+                                }
+                                else{
+                                	std::cout << "raiz << " << e->getTag().toString() <<  "="  << std::endl;
+                                }*/
+                        } else {
+                                cond = itemPadre->insert(e, OFTrue);
+                                char* str = NULL;
+                                e->getString(str);
+                                /*if(str!=NULL){
+                                	std::cout << itemPadre->getTag().toString().c_str() << " << " << e->getTag().toString() << " = " << str << std::endl;
+                                }
+                                else{
+                                	std::cout << itemPadre->getTag().toString().c_str() << " << " << e->getTag().toString() << " = " << std::endl;
+                                }*/
+
+
+                        }
+                        if (cond.bad()) {
+                                std::cerr << "No se pudo insertar el elemento: (" << e->getTag().toString().c_str() << "): " << cond.text() << std::endl;
+                        } else {
+                                numTotalInsertados++;
+                                numTagsInsertados++;
+                        }
+                }
+        }
+
+        // Insertamos todos los items correspondientes a este nivel en la raiz (de haberla, si no: en el dataset).
+
+        for (auto it = base.items.begin(); it != base.items.end(); ++it) {
+
+                DcmItem *item = new DcmItem();
+
+                int nItems = InsertarJerarquia((*it),dcmDataSet, item, NULL);
+
+                if (nItems > 0) {
+
+                        if (seqPadre == NULL) {
+                                //cond = dcmDataSet->insert(item, OFTrue);
+                                std::cerr << "No se pudo insertar el item directamente a la raiz. "
+                                          << "Deben insertarse en secuencias o en otros items.  "
+                                          << nItems << " elementos perdidos: " << std::endl;
+                                delete item;
+                        } else {
+                                OFCondition cond = seqPadre->insert(item, OFTrue);
+
+                                if (cond.bad()) {
+                                        std::cerr << "No se pudo insertar el item a la raiz.  "
+                                                  << nItems << " elementos perdidos: " << cond.text() << std::endl;
+                                        delete item;
+                                } else {
+                                        numTotalInsertados += nItems + 1;
+                                        numItemsInsertados++;
+                                }
+                        }
+                } else {
+                        delete item;
+                }
+        }
+
+        // Insertamos todas las secuencias correspondientes a este nivel en la raiz (de haberla, si no: en el dataset).
+        for (DicomDataset::DatasetList::iterator it = base.secuencias.begin(); it != base.secuencias.end(); ++it) {
+
+                std::string claveSecuencia = (*it).tagName;
+                DicomDataset& nbase = (*it);
+
+                unsigned int sg = 0xffff;
+                unsigned int se = 0xffff;
+                int sn = 0;
+
+                sn = sscanf(claveSecuencia.c_str(), "%x|%x", &sg, &se);
+                if (sn < 2) {
+                        std::cerr << "Formato invalido (" << claveSecuencia.c_str() << "). Solo se soporta (FFFF|FFFF) como formato de tag para secuencias" << std::endl;
+                        continue;
+                }
+                DcmTag stag(sg, se);
+                if (stag.error() != EC_Normal) {
+                        std::cerr << "Tag desconocido: " << claveSecuencia << std::endl;
+                        continue;
+                }
+                DcmSequenceOfItems* seq = new DcmSequenceOfItems(stag);
+                if (seq == NULL) {
+                        std::cerr << "No se pudo crear la secuencia para el tag: " << claveSecuencia << std::endl;
+                        continue;
+                }
+
+                int nItems = InsertarJerarquia(nbase,dcmDataSet, NULL, seq);
+
+                if (nItems > 0) {
+
+                        OFCondition cond;
+
+                        if (seqPadre != NULL) {
+                                DcmItem* item = new DcmItem();
+                                cond = item->insert(seq);
+                                seqPadre->insert(item);
+                                //		std::cout << seqPadre->getTag().toString().c_str() << " << " << seq->getTag().toString() << std::endl;
+                        } else if (itemPadre != NULL) {
+                                cond = itemPadre->insert(seq, OFTrue);
+                                //		std::cout << itemPadre->getTag().toString().c_str() << " << " << seq->getTag().toString() << std::endl;
+
+                        } else {
+                                cond = dcmDataSet->insert(seq, OFTrue);
+                                //		std::cout << "raiz << " << seq->getTag().toString() << std::endl;
+                        }
+
+                        if (cond.bad()) {
+                                std::cerr << "No se pudo insertar el item a la raiz.  " << nItems << " elementos perdidos: " << cond.text() << std::endl;
+                                delete seq;
+                        } else {
+                                numTotalInsertados += nItems + 1;
+                                numSeqsInsertadas++;
+                        }
+                } else {
+                        delete seq;
+                }
+        }
+        return numTotalInsertados;
+}
+
+void DICOMImg2DCM::ActualizarCampos(IInspectCallBack* pICallback)
+{
+        if (i2d == NULL) {
+                throw I2DException("El conversor no se ha inicializado previamente");
+        }
+        if (pICallback != NULL) {
+                //DcmDataset *overrideKeys = i2d->getOverrideKeys();
+
+                DicomDataset jerarquiaAInsertar;
+                pICallback->ObtenerJerarquiaInserccion(jerarquiaAInsertar);
+                InsertarJerarquia(jerarquiaAInsertar,i2d->getOverrideKeys(), NULL, NULL);
+        }
+}
+
+bool DICOMImg2DCM::Convertir(std::string& outputFile)
+{
+
+        if (i2d == NULL || inputPlug == NULL || outputPlug == NULL || resultObject == NULL) {
+                throw I2DException("El conversor no se ha inicializado previamente");
+        }
+        if (outputFile.length() == 0) {
+                throw I2DException("No se ha especificado el fichero de salida");
+        }
+
+        // Group length encoding mode for output DICOM file
+        E_GrpLenEncoding grpLengthEnc = EGL_recalcGL;
+        // Item and Sequence encoding mode for output DICOM file
+        E_EncodingType lengthEnc = EET_ExplicitLength;
+        // Padding mode for output DICOM file
+        E_PaddingEncoding padEnc = EPD_noChange;
+        // File pad length for output DICOM file
+        unsigned int filepad = 0;
+        // Item pad length for output DICOM file
+        unsigned int itempad = 0;
+
+        // Group Length Encoding:
+        //   EGL_recalcGL  => recalculate group lengths if present
+        //   EGL_withGL    => always write with group length elements
+        //   EGL_withoutGL => always write without group length elements
+
+        grpLengthEnc = EGL_recalcGL;
+
+        // Length Encoding in Sequences and Items:
+        //   EET_ExplicitLength  => write with explicit lengths
+        //   EET_UndefinedLength => write with undefined lengths
+        lengthEnc = EET_ExplicitLength;
+
+        filepad = 0;
+        itempad = 0;
+
+        OFCondition cond;
+
+        i2d->updateOverrideKeys(resultObject);
+        //overrride charset
+        {
+                std::string strTmp;
+                GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/Estacion","DefaultCharset",strTmp,"ISO_IR 100");
+                cond = resultObject->putAndInsertString(DCM_SpecificCharacterSet, strTmp.c_str());
+                if (cond.bad()) {
+                        throw I2DException(cond.text());
+                }
+        }
+
+        DcmFileFormat dcmff(resultObject);
+        cond = dcmff.saveFile(outputFile.c_str(), writeXfer, lengthEnc, grpLengthEnc, padEnc, filepad, itempad);
+        if (cond.bad()) {
+                throw I2DException(cond.text());
+        }
+
+#ifdef _GINKGO_TRACE
+        {
+                std::cout << "----DUMPING DCM----------------------------------------" << std::endl;
+                // Dumping DICOM Tags...
+                const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock();
+                DcmHashDictIterator iter(globalDataDict.normalBegin());
+                DcmHashDictIterator end(globalDataDict.normalEnd());
+
+                std::string keyStr;
+                std::string descStr;
+                std::string valStr;
+
+                char keyFormat[12];
+
+                for (; iter != end; ++iter) {
+
+                        DcmTagKey tagkey = (*iter)->getKey();
+                        //std::cout << "Checking " << keyStr << std::endl;
+                        if (sprintf(keyFormat, "%04X|%04X", tagkey.getGroup(), tagkey.getElement()) > 8) {
+                                //std::cout << "Asigning " << keyFormat << std::endl;
+                                keyStr.assign(keyFormat);
+                                descStr = (*iter)->getTagName();
+                                OFString val;
+                                OFCondition c = resultObject->findAndGetOFStringArray(tagkey, val);
+                                if (c.good()) {
+                                        valStr = val.c_str();
+                                        std::cout << "[" << keyStr.c_str() << "] " << valStr.c_str() << " // " << descStr.c_str() << std::endl;
+                                }
+                        }
+                }
+                dcmDataDict.unlock();
+                std::cout << "-------------------------------------------------------" << std::endl;
+        }
+#endif
+        return true;
+}
+
+//devuelve el element identifier donde el modulo puede escribir sus tags privados
+unsigned int DICOMImg2DCM::GetElementIdentifier(GIL::DICOM::TipoPrivateTags& tags, DcmDataset* dataset)
+{
+        OFCondition cond;
+        DcmElement* element;
+        unsigned int g=GINKGO_GROUP;
+        unsigned int e=0x0010;
+
+        for(; e<=0x00FF; e++) {
+                DcmTagKey key(g,e);
+                cond = dataset->findAndGetElement(key,element,false);
+                if(element==NULL) {
+                        //esta libre el slot
+                        //se introduce el uid
+                        DcmTagKey key(g,e);
+                        DcmTag tag(key);
+                        //tipo short string!!!!
+                        DcmVR vr(EVR_SH);
+                        tag.setVR(vr);
+                        if (tag.error() != EC_Normal) {
+                                std::cerr << "error al almacenar los tags privados, tag desconocido: (" << g << ","<<e<<")" <<std::endl;
+                                return 0;
+                        }
+
+                        element = newDicomElement(tag);
+
+                        if(element==NULL) {
+                                std::cerr << "error al almacenar los tags privados, error al crear el elemento uid: (" << g << ","<<e<<")" <<std::endl;
+                                return 0;
+                        }
+
+                        cond=element->putString(tags.UIDModulo.c_str());
+
+                        if (cond.bad()) {
+                                std::cerr << "error al almacenar los tags privados, error al escribir el uid: (" << g << ","<<e<<")" <<std::endl;
+                                return 0;
+                        }
+
+                        cond = dataset->insert(element, true, false);
+                        break;
+                }
+
+                if(element!=NULL) {
+                        char* cadena;
+                        std::string ov;
+
+                        cond = element->getString(cadena);
+                        if (cond.good()) {
+                                ov = std::string(cadena);
+                        } else {
+                                continue;
+                        }
+
+                        if(ov==tags.UIDModulo) {
+                                //estamos en el g y e del modulo deseado
+                                break;
+                        }
+                }
+        }
+
+        return e;
+}
+
+bool DICOMImg2DCM::CrearSRDoc(std::string& outputFile, DicomDataset& base, std::list<GNC::GCS::Ptr<TipoPrivateTags> >& tagsPrivados)
+{
+        DSRDocument *doc = new DSRDocument();
+        if (doc != NULL) {
+                {
+                        std::string strTmp;
+                        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/Estacion","DefaultCharset",strTmp,"ISO_IR 100");
+                        doc->setSpecificCharacterSet(strTmp.c_str());
+                }
+                doc->createNewDocument(DSRTypes::DT_BasicTextSR);
+                doc->setSpecificCharacterSetType(DSRTypes::CS_UTF8);
+
+                doc->setManufacturer("Ginkgo");
+                doc->setPatientName("Last Name^First Name");
+                doc->setPatientSex("O");
+                doc->setReferringPhysicianName("Last Name^First Name");
+
+                doc->getTree().addContentItem(DSRTypes::RT_isRoot, DSRTypes::VT_Container);
+
+                DcmFileFormat *fileformat = new DcmFileFormat();
+
+                DcmDataset *dataset = NULL;
+
+                OFCondition cond;
+
+                if (fileformat != NULL)
+                        dataset = fileformat->getDataset();
+                if (dataset != NULL) {
+                        cond = doc->write(*dataset);
+                        if (cond.good()) {
+                                //utf-8
+                                /*if( dataset->putAndInsertOFStringArray(DCM_SpecificCharacterSet, "ISO_IR 100").bad()) {
+                                	LOG_ERROR("Dicomizacion", "Error al establecer la codificacion en el fichero DICOM");
+                                }*/
+                                InsertarJerarquia(base,dataset,NULL,NULL);
+                                for(std::list<GNC::GCS::Ptr<TipoPrivateTags> >::iterator it = tagsPrivados.begin(); it!= tagsPrivados.end(); ++it) {
+                                        InsertarTagsPrivados(*(*it),dataset);
+                                }
+                                //SE ESCRIBE LOS TAGS DEL SR...
+
+                                cond = fileformat->saveFile(outputFile.c_str(), EXS_LittleEndianExplicit);
+                        }
+                }
+                delete fileformat;
+
+                delete doc;
+
+                if (cond.good()) {
+                        return true;
+                } else {
+                        return false;
+                }
+        }
+        return false;
+}
+}
+}
diff --git a/cadxcore/main/controllers/dcmtk/dicomimg2dcm.h b/cadxcore/main/controllers/dcmtk/dicomimg2dcm.h
new file mode 100644
index 0000000..ea52a27
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomimg2dcm.h
@@ -0,0 +1,118 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/config/osconfig.h>
+#include "libi2d/document2dcm.h"
+#include "libi2d/d2dsource.h"
+#include "libi2d/i2doutpl.h"
+#include "dcmtk/dcmdata/dcdict.h"
+#include "dcmtk/dcmdata/dchashdi.h"
+
+#include <api/globals.h>
+#include <api/dicom/idicomizador.h>
+
+class DcmElement;
+class wxCSConv;
+
+namespace GIL
+{
+namespace DICOM
+{
+
+class DICOMImg2DCM : public IDICOMImg2DCM
+{
+public:
+        /* Constructor */
+        DICOMImg2DCM();
+
+        /* Destructor */
+        ~DICOMImg2DCM();
+
+        void LiberarMemoria();
+
+        /* Inicializa una conversión. IInspectCallback sirve para especificar un callback mediante el cual se pueden inspeccionar los atributos buscados.
+         *
+         * Formatos de entrada soportados:
+         *	  JPEG
+         * Formatos de salida soportados (DICOM SOP a generar):
+         *   VLP (Visible Light Photography)
+         *   SC (Secondary Capture)
+         *   NSC (New Secondary Capture)
+         */
+        virtual void Inicializar(std::string& inputFile, IInspectCallBack* pICallback = NULL, bool debug = false, TDICOMOutputFormat outputFormat = TDOF_AUTO);
+
+        virtual void Inicializar(TImageFile& fileDefinition, IInspectCallBack* pICallback = NULL, bool debug = false, TDICOMOutputFormat outputFormat = TDOF_VLP);
+
+        void Inicializar(D2DSource* plugEntrada, IInspectCallBack* pICallback, bool debug, TDICOMOutputFormat outputFormat);
+
+        virtual int InsertarJerarquia(DicomDataset& base);
+
+        virtual int InsertarTagsPrivados(TipoPrivateTags& base);
+
+        virtual int InsertarTagsPrivados(TipoPrivateTags& base, DcmDataset* dcmDataSet);
+
+        int InsertarJerarquia(DicomDataset& base,DcmDataset* dcmDataSet, DcmItem* itemPadre, DcmSequenceOfItems* seqPadre);
+
+        /* Actualiza los campos DICOM a sobreescribir */
+        virtual void ActualizarCampos(IInspectCallBack* pICallback);
+
+        /* Realiza una conversión ya inicializada */
+        virtual bool Convertir(std::string& outputFile);
+
+        unsigned int GetElementIdentifier(GIL::DICOM::TipoPrivateTags& tags, DcmDataset* dataset);
+
+        bool CrearSRDoc(std::string& outputFile, DicomDataset& base, std::list<GNC::GCS::Ptr<TipoPrivateTags> >& tagsPrivados);
+
+        virtual void Reset()
+        {
+                LiberarMemoria();
+        }
+
+protected:
+
+        /* Crea un elemento de DCMTK parseando la cadena pasada como parámetro que debe tener el formato:
+         <hex_2_bytes>|<hex_2_bytes>
+         o bien:
+         <hex_2_bytes>|<hex_2_bytes>=<cadena>
+         Nota: <cadena> puede ser vacía
+         */
+        DcmElement* CrearElementoConValor(const char* s);
+
+        // Main class for controlling conversion
+        Document2Dcm*       i2d;
+        // Output plugin to use (ie. SOP class to write)
+        I2DOutputPlug*   outputPlug;
+        // Input plugin to use (ie. file format to read)
+        D2DSource*    inputPlug;
+        // Result object
+        DcmDataset*      resultObject;
+        // The transfersytanx proposed to be written by output plugin
+        E_TransferSyntax writeXfer;
+        wxCSConv*			  m_pConv;
+};
+};
+};
diff --git a/cadxcore/main/controllers/dcmtk/dicommoveassociation.cpp b/cadxcore/main/controllers/dcmtk/dicommoveassociation.cpp
new file mode 100644
index 0000000..d6f5297
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicommoveassociation.cpp
@@ -0,0 +1,162 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#define LOGGER "C-MOVE"
+
+#include "dicomnetwork.h"
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/controladorlog.h>
+#include <api/dicom/imodelodicom.h>
+#include <main/controllers/controladorpermisos.h>
+#include <api/controllers/ipacscontroller.h>
+#include <main/entorno.h>
+
+#include <api/internationalization/internationalization.h>
+
+#include "istorecallback.h"
+
+
+#include "dicommoveassociation.h"
+
+#include <dcmtk/dcmnet/diutil.h>
+#include <dcmtk/dcmnet/assoc.h>
+#include <dcmtk/dcmjpeg/djencode.h>
+#include <dcmtk/dcmjpeg/djrplol.h>
+#include <dcmtk/dcmdata/dcuid.h>
+#include <dcmtk/dcmdata/dcdatset.h>
+#include <dcmtk/dcmdata/dcdeftag.h>
+
+#include <wx/string.h>
+#include <wx/intl.h>
+
+#include "tls/tls.h"
+#include "tls/gtlslayer.h"
+#include <dcmtk/dcmtls/tlstrans.h>
+
+MoveAssociation::MoveAssociation(const std::string& _ambitolog, IModeloDicom* pModelo) : FindAssociation(_ambitolog),
+        m_maxReceivePDULength(ASC_DEFAULTMAXPDU),
+        m_pModelo(pModelo),
+        m_errorMessage("")
+{
+        m_abstractSyntax = UID_MOVEStudyRootQueryRetrieveInformationModel;
+
+}
+
+MoveAssociation::~MoveAssociation() { }
+
+void MoveAssociation::Create(const std::string& title, const std::string& peer, int port, const std::string& ouraet, /*int ourPort,*/ const char *abstractSyntax)
+{
+        Association::Create(title, peer, port, ouraet, abstractSyntax);
+}
+
+void MoveAssociation::SetModelo(IModeloDicom* pModelo)
+{
+        m_pModelo = pModelo;
+}
+
+OFCondition MoveAssociation::SendObject(DcmDataset *dataset)
+{
+        return moveSCU(dataset);
+}
+
+void MoveAssociation::OnAddPresentationContext(T_ASC_Parameters *params)
+{
+        addAllStoragePresentationContexts(params, true, true);
+}
+
+OFCondition MoveAssociation::moveSCU(DcmDataset *pdset)
+{
+        OFCondition cond;
+        T_ASC_PresentationContextID presId;
+        T_DIMSE_C_MoveRQ req;
+        T_DIMSE_C_MoveRSP rsp;
+        DIC_US msgId = assoc->nextMsgID++;
+        DcmDataset* rspIds = NULL;
+        const char* sopClass;
+        DcmDataset* statusDetail = NULL;
+
+        if (pdset == NULL) {
+                return makeOFCondition(OFM_dcmnet, DIMSEC_BADDATA, OF_error, "NULL DIMSE Query");
+        }
+
+        //sopClass = m_abstractSyntaxMove;
+        sopClass = m_abstractSyntax.c_str();
+
+        // which presentation context should be used
+        presId = ASC_findAcceptedPresentationContextID(assoc, sopClass);
+
+        if (presId == 0) {
+                return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        req.MessageID = msgId;
+        strncpy(req.AffectedSOPClassUID, sopClass, DIC_UI_LEN);
+        req.AffectedSOPClassUID[DIC_UI_LEN] = 0;
+        req.Priority = DIMSE_PRIORITY_HIGH;
+        req.DataSetType = DIMSE_DATASET_PRESENT;
+
+        strncpy(req.MoveDestination, m_ourAET.c_str(), DIC_AE_LEN);
+        req.MoveDestination[DIC_AE_LEN] = 0;
+
+        cond = DIMSE_moveUser(
+                       assoc,
+                       presId,
+                       &req,
+                       pdset,
+                       NULL,
+                       NULL,
+                       DIMSE_BLOCKING,
+                       0,
+                       GetNetwork()->GetDcmtkNet(),
+                       NULL,
+                       this,
+                       &rsp, &statusDetail, &rspIds);
+
+        if( rsp.DimseStatus != STATUS_Success && rsp.DimseStatus != STATUS_Pending) {
+                std::ostringstream os;
+                os << DU_cmoveStatusString(rsp.DimseStatus);
+                if (statusDetail != NULL) {
+                        OFString errorComment;
+                        if (statusDetail->findAndGetOFString(DCM_ErrorComment, errorComment).good()) {
+                                os << ". " << errorComment.c_str();
+                        }
+                }
+                m_errorMessage = os.str();
+        }
+
+        if (statusDetail != NULL) {
+                LOG_DEBUG(ambitolog, "DIMSE_moveUser(): Estado: " << std::endl << DumpDataset(statusDetail));
+                delete statusDetail;
+        }
+
+        if (rspIds != NULL) {
+                delete rspIds;
+        }
+
+        if(m_errorMessage != "" || rsp.NumberOfFailedSubOperations > 0 ) {
+                if (m_errorMessage.size() == 0) {
+                        m_errorMessage = "Some operations failed";
+                }
+                return makeOFCondition(OFM_dcmnet, 18, OF_error, m_errorMessage.c_str());
+        }
+
+        return cond;
+}
+
diff --git a/cadxcore/main/controllers/dcmtk/dicommoveassociation.h b/cadxcore/main/controllers/dcmtk/dicommoveassociation.h
new file mode 100644
index 0000000..f0f1f72
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicommoveassociation.h
@@ -0,0 +1,52 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <ctime>
+
+#include "dicomfindassociation.h"
+#include "istorecallback.h"
+
+class MoveAssociation : public FindAssociation
+{
+public:
+
+        MoveAssociation(const std::string& ambitolog, IModeloDicom* pModelo=NULL);
+        virtual ~MoveAssociation();
+
+        void SetModelo(IModeloDicom* pModelo);
+
+        void Create(const std::string& title, const std::string& peer, int port, const std::string& ouraet, /*int ourPort,*/ const char *abstractSyntax = UID_MOVEStudyRootQueryRetrieveInformationModel);
+
+        OFCondition SendObject(DcmDataset *dataset);
+
+
+protected:
+
+        void OnAddPresentationContext(T_ASC_Parameters *params);
+
+private:
+
+        OFCondition moveSCU(DcmDataset *pdset);
+
+        int m_maxReceivePDULength;
+        IModeloDicom* m_pModelo;
+        std::string m_errorMessage;
+};
diff --git a/cadxcore/main/controllers/dcmtk/dicomnetclient.h b/cadxcore/main/controllers/dcmtk/dicomnetclient.h
new file mode 100644
index 0000000..92c55cd
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomnetclient.h
@@ -0,0 +1,599 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/controllers/icontroladorlog.h>
+#include <api/iproxynotificadorprogreso.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/dcmtk/dicomservers.h>
+#include "dicomnetwork.h"
+#include "helpers.h"
+
+#include <iostream>
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+#include <dcmtk/dcmdata/dcdatset.h>
+#include <dcmtk/dcmdata/dcdeftag.h>
+#include <api/dicom/imodelodicom.h>
+#include <wx/strconv.h>
+#include <wx/string.h>
+
+namespace GNC
+{
+class IProxyNotificadorProgreso;
+}
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+typedef enum CallbackType {
+        CT_MoveEstudio,
+        CT_MoveSerie,
+        CT_MoveImagen,
+        CT_None
+} CallbackType;
+
+#ifndef WXUNUSED
+#define WXUNUSED(name)
+#endif
+
+template<class T>
+class NetClient : public T
+{
+private:
+        GIL::DICOM::DCMTK::Network* Net;
+        std::string                 ambitolog;
+
+protected:
+        GNC::IProxyNotificadorProgreso* m_pNotificadorProgreso;
+public:
+        NetClient(void* connectionKey, const std::string& ambitolog, GNC::IProxyNotificadorProgreso* pNotificadorProgreso = NULL) : T(ambitolog)
+        {
+
+                if (connectionKey == NULL) {
+                        LOG_ERROR(ambitolog, "NULL Connection key");
+                }
+                this->Net = GIL::DICOM::DCMTK::Network::Instance(connectionKey);
+                this->m_pNotificadorProgreso = pNotificadorProgreso;
+                this->ambitolog = ambitolog;
+        };
+
+        bool QueryServer(const GNC::GCS::Ptr<DicomServer>& server, const std::string& local_aet)
+        {
+                if (server == NULL) {
+                        return false;
+                }
+                if (!Net->Initiallized()) {
+
+                        Net->InitializeNetwork(T::GetTimeout(), T::GetRole(), T::GetAcceptorPort());
+                }
+
+                T::Create(
+                        server->AET,
+                        server->HostName,
+                        server->Port,
+                        local_aet
+                );
+
+                T::SetNotificadorProgreso(m_pNotificadorProgreso);
+
+                LOG_DEBUG(ambitolog, "Connected: AET = " << server->AET << ", Host = " << server->HostName << ", Port = " << server->Port << ", Local AET = " << local_aet << ", PDU = " << server->PDU);
+                OFCondition r = T::Connect(Net, server->PDU);
+
+                OFCondition c = EC_Normal;
+
+                if (r.good() == true) {
+                        c = T::SendObject();
+                } else {
+                        LOG_ERROR(ambitolog, "Error connecting:" << r.text());
+                        T::Drop();
+                        T::Destroy();
+                        throw GIL::DICOM::PACSException(r.text());
+                }
+
+                if (!c.good()) {
+                        LOG_ERROR(ambitolog, "Error sending object: " << c.text());
+                        T::Drop();
+                        T::Destroy();
+                        throw GIL::DICOM::PACSException(c.text());
+                }
+
+                LOG_DEBUG(ambitolog, "Closing association");
+                T::Drop();
+                return true;
+        }
+
+        bool QueryServer(DcmDataset* query, const GNC::GCS::Ptr<DicomServer>& server, std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >& resultsWrapper, const std::string& local_aet)
+        {
+                if (!server.IsValid()) {
+                        return false;
+                }
+
+                if (!Net->Initiallized()) {
+
+                        Net->InitializeNetwork(T::GetTimeout(), T::GetRole(), T::GetAcceptorPort());
+                }
+
+                T::Create(
+                        server->AET,
+                        server->HostName,
+                        server->Port,
+                        local_aet
+                );
+
+                T::SetNotificadorProgreso(m_pNotificadorProgreso);
+
+                T::SetCallbackInfo(&resultsWrapper, server);
+
+                LOG_INFO(ambitolog, "Connecting: AET = " << server->AET << ", Host = " << server->HostName << ", Puerto = " << server->Port << ", Local AET = " << local_aet << ", PDU = " << server->PDU);
+                OFCondition r = T::Connect(Net, server->PDU);
+
+                OFCondition c = EC_Normal;
+
+                if (r.good() == true) {
+                        LOG_DEBUG(ambitolog, "Requesting object:" << std::endl << DumpDataset(query));
+                        c = T::SendObject(query);
+                } else {
+                        LOG_DEBUG(ambitolog, "Error connecting:" << r.text());
+                        T::Drop();
+                        T::Destroy();
+                        LOG_INFO(ambitolog, "Disconnected");
+                        throw GIL::DICOM::PACSException(r.text());
+                }
+
+                if (!c.good()) {
+                        LOG_DEBUG(ambitolog, "Error requesting object: " << c.text());
+                        T::Drop();
+                        T::Destroy();
+                        LOG_INFO(ambitolog, "Disconnected");
+                        throw GIL::DICOM::PACSException(c.text());
+                }
+
+                LOG_INFO(ambitolog, "Disconnected");
+                T::Drop();
+
+                return r.good();
+        }
+
+        ///DEPRECATED! IModeloDICOM has to be replaced by results wrapper
+        bool QueryServer(DcmDataset* query, const GNC::GCS::Ptr<DicomServer>& server, IModeloDicom* pModelo, const std::string& local_aet, CallbackType callbackType)
+        {
+                if (pModelo == NULL && callbackType != CT_None)  {
+                        return false;
+                }
+                if (!server.IsValid()) {
+                        return false;
+                }
+
+                if (!Net->Initiallized()) {
+
+                        Net->InitializeNetwork(T::GetTimeout(), T::GetRole(), T::GetAcceptorPort());
+                }
+
+                T::Create(
+                        server->AET,
+                        server->HostName,
+                        server->Port,
+                        local_aet
+                );
+
+                T::SetNotificadorProgreso(m_pNotificadorProgreso);
+
+                LOG_INFO(ambitolog, "Connecting: AET = " << server->AET << ", Host = " << server->HostName << ", Puerto = " << server->Port << ", Local AET = " << local_aet << ", PDU = " << server->PDU);
+                OFCondition r = T::Connect(Net, server->PDU);
+
+                OFCondition c = EC_Normal;
+
+                if (r.good() == true) {
+                        LOG_DEBUG(ambitolog, "Requesting object:" << std::endl << DumpDataset(query));
+                        c = T::SendObject(query);
+                } else {
+                        LOG_DEBUG(ambitolog, "Error connecting:" << r.text());
+                        T::Drop();
+                        T::Destroy();
+                        LOG_INFO(ambitolog, "Disconnected");
+                        throw GIL::DICOM::PACSException(r.text());
+                }
+
+                if (!c.good()) {
+                        LOG_DEBUG(ambitolog, "Error requesting object: " << c.text());
+                        T::Drop();
+                        T::Destroy();
+                        LOG_INFO(ambitolog, "Disconnected");
+                        throw GIL::DICOM::PACSException(c.text());
+                }
+
+                DcmStack* result = T::GetResultStack();
+                if (r.good() && c.good() && result != NULL && result->card() > 0) {
+                        LOG_DEBUG(ambitolog, "Num results: " << result->card());
+
+                        for (unsigned long i = 0; i < result->card(); ++i) {
+                                DcmDataset* dset = new DcmDataset( *(static_cast<DcmDataset*>(result->elem(i))) );
+                                switch (callbackType) {
+                                case CT_MoveEstudio:
+                                        OnMoverEstudio(dset, pModelo);
+                                        break;
+                                case CT_MoveSerie:
+                                        OnMoverSerie(dset, pModelo);
+                                        break;
+                                case CT_MoveImagen:
+                                        OnMoverImagen(dset, pModelo);
+                                        break;
+                                case CT_None:
+                                        break;
+                                }
+                                delete dset;
+                        }
+                } else {
+                        if (r.bad()) {
+                                LOG_ERROR(ambitolog, "Connection error: " << r.text());
+                        }
+                        if (c.bad()) {
+                                LOG_ERROR(ambitolog, "Error requesting object: " << c.text());
+                        }
+                }
+
+                LOG_INFO(ambitolog, "Disconnected");
+                T::Drop();
+
+                return r.good();
+        }
+
+        wxCSConv GetConv(DcmDataset* dset, const std::string& defaultCharset)
+        {
+                OFString Charset;
+                wxCSConv wxConv(wxFONTENCODING_ISO8859_1);
+                if (dset->findAndGetOFString(DCM_SpecificCharacterSet, Charset).bad()) {
+                        Charset = defaultCharset.c_str();
+                }
+                if (Charset == "ISO_IR 192" || Charset == "ISO_IR 6" || Charset == "ISO_IR 138") {
+                        wxConv = wxCSConv(wxFONTENCODING_UTF8);
+                } else if (Charset == "ISO_IR 100") {
+                        wxConv = wxCSConv(wxFONTENCODING_ISO8859_1);
+                } else if (Charset == "ISO_IR 101") {
+                        wxConv = wxCSConv(wxFONTENCODING_ISO8859_2);
+                } else if (Charset == "ISO_IR 109") {
+                        wxConv = wxCSConv(wxFONTENCODING_ISO8859_3);
+                } else if (Charset == "ISO_IR 110") {
+                        wxConv = wxCSConv(wxFONTENCODING_ISO8859_4);
+                } else if (Charset == "ISO_IR 148") {
+                        wxConv = wxCSConv(wxFONTENCODING_ISO8859_9);
+                } else if (Charset == "ISO_IR 144") {
+                        wxConv = wxCSConv(wxFONTENCODING_ISO8859_5);
+                } else if (Charset == "ISO_IR 127") {
+                        wxConv = wxCSConv(wxFONTENCODING_ISO8859_6);
+                } else if (Charset == "ISO_IR 126") {
+                        wxConv = wxCSConv(wxFONTENCODING_ISO8859_7);
+                } else if (Charset == "ISO_IR 138") {
+                        wxConv = wxCSConv(wxFONTENCODING_ISO8859_8);
+                }
+                return wxConv;
+        }
+
+        void OnBuscarPacientes(DcmDataset* query, DcmDataset* dset, const GNC::GCS::Ptr<DicomServer>& server, IModeloDicom* pModelo)
+        {
+                wxCSConv wxConv = GetConv(dset, server->GetDefaultCharset());
+
+                OFString OFPacienteUID;
+                if (dset->findAndGetOFString(DCM_PatientID, OFPacienteUID).bad()) {
+                        if (!dset->isEmpty()) {
+                                LOG_ERROR(ambitolog, "El PACS no devolvió el PatientID del paciente. Entrada ignorada.");
+                        }
+                        return;
+                }
+
+                std::string PacienteUID;
+                if (dset->findAndGetOFString(DCM_PatientID, OFPacienteUID).good()) {
+                        PacienteUID = wxString(OFPacienteUID.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFPacienteNombre;
+                std::string PacienteNombre;
+                if (dset->findAndGetOFString(DCM_PatientName, OFPacienteNombre).good()) {
+                        PacienteNombre = wxString(OFPacienteNombre.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFPacienteFechaNacimiento;
+                std::string PacienteFechaNacimiento;
+                if (dset->findAndGetOFString(DCM_PatientBirthDate, OFPacienteFechaNacimiento).good()) {
+                        PacienteFechaNacimiento = wxString(OFPacienteFechaNacimiento.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFPacienteSexo;
+                std::string PacienteSexo;
+                if (dset->findAndGetOFString(DCM_PatientSex, OFPacienteSexo).good()) {
+                        PacienteSexo = wxString(OFPacienteSexo.c_str(), wxConv).ToUTF8();
+                }
+
+                if (PacienteUID.empty()) {
+                        OFString OFStr;
+                        if (query->findAndGetOFString(DCM_PatientID, OFStr).good()) {
+                                PacienteUID = wxString(OFStr.c_str(), wxConv).ToUTF8();
+                        }
+                }
+
+                pModelo->InsertarPaciente(PacienteUID, PacienteNombre, PacienteFechaNacimiento, PacienteSexo);
+        }
+
+        void OnBuscarSeries(DcmDataset* query, DcmDataset* dset, const GNC::GCS::Ptr<DicomServer>& server, IModeloDicom *pModelo)
+        {
+                wxCSConv wxConv = GetConv(dset, server->GetDefaultCharset());
+
+                OFString OFEstudioUID;
+                OFString OFSerieUID;
+                if (dset->findAndGetOFString(DCM_StudyInstanceUID, OFEstudioUID).bad() || dset->findAndGetOFString(DCM_SeriesInstanceUID, OFSerieUID).bad()) {
+                        if (!dset->isEmpty()) {
+                                LOG_ERROR(ambitolog, "El PACS no devolvió el StudyInstanceUID o el SeriesInstanceUID de la serie. Entrada ignorada.");
+                        }
+                        return;
+                }
+
+                std::string EstudioUID;
+                EstudioUID = wxString(OFEstudioUID.c_str(), wxConv).ToUTF8();
+
+                std::string SerieUID;
+                SerieUID = wxString(OFSerieUID.c_str(), wxConv).ToUTF8();
+
+                OFString OFSerieTipo;
+                std::string SerieTipo;
+                if (dset->findAndGetOFString(DCM_Modality, OFSerieTipo).good()) {
+                        SerieTipo = wxString(OFSerieTipo.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFSerieFecha;
+                std::string SerieFecha;
+                if (dset->findAndGetOFString(DCM_SeriesDate, OFSerieFecha).good()) {
+                        SerieFecha = wxString(OFSerieFecha.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFSerieHora;
+                std::string SerieHora;
+                if (dset->findAndGetOFString(DCM_SeriesTime, OFSerieHora).good()) {
+                        SerieHora = wxString(OFSerieHora.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFSerieDescripcion;
+                std::string SerieDescripcion;
+                if (dset->findAndGetOFString(DCM_SeriesDescription, OFSerieDescripcion).good()) {
+                        SerieDescripcion = wxString(OFSerieDescripcion.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFDoctor;
+                std::string SerieDoctor;
+                if (dset->findAndGetOFString(DCM_ReferringPhysicianName, OFDoctor).good()) {
+                        SerieDoctor = wxString(OFDoctor.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFNumber;
+                std::string SerieNumero;
+                if (dset->findAndGetOFString(DCM_NumberOfSeriesRelatedInstances, OFNumber).good()) {
+                        SerieNumero = wxString(OFNumber.c_str(), wxConv).ToUTF8();
+                }
+
+                if (EstudioUID.empty()) {
+                        OFString OFStr;
+                        if (query->findAndGetOFString(DCM_StudyInstanceUID, OFStr).good()) {
+                                EstudioUID = wxString(OFStr.c_str(), wxConv).ToUTF8();
+                        }
+                }
+                if (SerieUID.empty()) {
+                        OFString OFStr;
+                        if (query->findAndGetOFString(DCM_SeriesInstanceUID, OFStr).good()) {
+                                SerieUID = wxString(OFStr.c_str(), wxConv).ToUTF8();
+                        }
+                }
+
+                pModelo->InsertarSerie(EstudioUID, SerieUID, SerieTipo, SerieFecha, SerieHora, SerieDescripcion, SerieNumero,SerieDoctor);
+        }
+
+        void OnBuscarImagenes(DcmDataset* query, DcmDataset *dset, const GNC::GCS::Ptr<DicomServer>& server, IModeloDicom* pModelo)
+        {
+                wxCSConv wxConv = GetConv(dset, server->GetDefaultCharset());
+
+                OFString OFSerieUID;
+                OFString OFImagenUID;
+                OFString OFInstanceNumber;
+                if (dset->findAndGetOFString(DCM_SeriesInstanceUID, OFSerieUID).bad() || dset->findAndGetOFString(DCM_SOPInstanceUID, OFImagenUID).bad()) {
+                        if (!dset->isEmpty()) {
+                                LOG_ERROR(ambitolog, "El PACS no devolvió el SeriesInstanceUID o el SOPInstanceUID de la imagen. Entrada ignorada.");
+                        }
+                        return;
+                }
+                if (OFInstanceNumber.empty()) {
+                        LOG_WARN(ambitolog, "InstanceNumber not found. Setting to default");
+                        OFInstanceNumber = "1";
+                }
+
+                std::string SerieUID;
+                std::string ImagenUID;
+                std::string InstanceNumber;
+
+                SerieUID.assign(OFSerieUID.c_str());
+                ImagenUID.assign(OFImagenUID.c_str());
+                InstanceNumber.assign(OFInstanceNumber.c_str());
+
+                if (SerieUID.empty()) {
+                        OFString OFStr;
+                        if (query->findAndGetOFString(DCM_SeriesInstanceUID, OFStr).good()) {
+                                SerieUID = wxString(OFStr.c_str(), wxConv).ToUTF8();
+                        }
+                }
+                if (ImagenUID.empty()) {
+                        OFString OFStr;
+                        if (query->findAndGetOFString(DCM_SOPInstanceUID, OFStr).good()) {
+                                ImagenUID = wxString(OFStr.c_str(), wxConv).ToUTF8();
+                        }
+                }
+                if (InstanceNumber.empty()) {
+                        OFString OFStr;
+                        if (query->findAndGetOFString(DCM_InstanceNumber, OFStr).good()) {
+                                InstanceNumber = wxString(OFStr.c_str(), wxConv).ToUTF8();
+                        }
+                }
+
+                pModelo->InsertarImagen(SerieUID, ImagenUID, InstanceNumber);
+
+        }
+
+        void OnBuscarEstudios(DcmDataset* query, DcmDataset *dset, const GNC::GCS::Ptr<DicomServer>& server, IModeloDicom *pModelo)
+        {
+                OFString OFEstudioUID;
+                if (dset->findAndGetOFString(DCM_StudyInstanceUID, OFEstudioUID).bad()) {
+                        if (!dset->isEmpty()) {
+                                LOG_ERROR(ambitolog, "El PACS no devolvió el StudyInstanceUID del estudio. Entrada ignorada.");
+                        }
+                        return;
+                }
+
+                wxCSConv wxConv = GetConv(dset, server->GetDefaultCharset());
+
+                OFString OFPacienteUID;
+                std::string PacienteUID;
+                if (dset->findAndGetOFString(DCM_PatientID, OFPacienteUID).good()) {
+                        PacienteUID = wxString(OFPacienteUID.c_str(), wxConv).ToUTF8();
+                } else {
+                        if (query->findAndGetOFString(DCM_PatientID, OFPacienteUID).good()) {
+                                PacienteUID = wxString(OFPacienteUID.c_str(), wxConv).ToUTF8();
+                        }
+                }
+
+                OFString OFPacienteNombre;
+                std::string PacienteNombre;
+                if (dset->findAndGetOFString(DCM_PatientName, OFPacienteNombre).good()) {
+                        PacienteNombre = wxString(OFPacienteNombre.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFPacienteFechaNacimiento;
+                std::string PacienteFechaNacimiento;
+
+                if (dset->findAndGetOFString(DCM_PatientBirthDate, OFPacienteFechaNacimiento).good()) {
+                        PacienteFechaNacimiento = wxString(OFPacienteFechaNacimiento.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFPacienteSexo;
+                std::string PacienteSexo;
+                if (dset->findAndGetOFString(DCM_PatientSex, OFPacienteSexo).good()) {
+                        PacienteSexo = wxString(OFPacienteSexo.c_str(), wxConv).ToUTF8();
+                }
+
+                pModelo->InsertarPaciente(PacienteUID, PacienteNombre, PacienteFechaNacimiento, PacienteSexo);
+
+                std::string EstudioUID;
+                if (dset->findAndGetOFString(DCM_StudyInstanceUID, OFEstudioUID).good()) {
+                        EstudioUID = wxString(OFEstudioUID.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFEAccNumber;
+                std::string AccNumber;
+                if (dset->findAndGetOFString(DCM_AccessionNumber, OFEAccNumber).good()) {
+                        AccNumber = wxString(OFEAccNumber.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFEstudioDescripcion;
+                std::string EstudioDescripcion;
+                if (dset->findAndGetOFString(DCM_StudyDescription, OFEstudioDescripcion).good()) {
+                        EstudioDescripcion = wxString(OFEstudioDescripcion.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFEstudioModalidad;
+                std::string EstudioModalidad;
+                if (dset->findAndGetOFStringArray(DCM_ModalitiesInStudy, OFEstudioModalidad).good()) {
+                        EstudioModalidad = wxString(OFEstudioModalidad.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFEstudioFecha;
+                std::string EstudioFecha;
+                if (dset->findAndGetOFString(DCM_StudyDate, OFEstudioFecha).good()) {
+                        EstudioFecha = wxString(OFEstudioFecha.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFEstudioHora;
+                std::string EstudioHora;
+                if (dset->findAndGetOFString(DCM_StudyTime, OFEstudioHora).good()) {
+                        EstudioHora = wxString(OFEstudioHora.c_str(), wxConv).ToUTF8();
+                }
+
+                OFString OFDoctor;
+                std::string EstudioDoctor;
+                if (dset->findAndGetOFString(DCM_ReferringPhysicianName, OFDoctor).good()) {
+                        EstudioDoctor = wxString(OFDoctor.c_str(), wxConv).ToUTF8();
+                }
+
+                if (EstudioUID.empty()) {
+                        OFString OFStr;
+                        if (query->findAndGetOFString(DCM_StudyInstanceUID, OFStr).good()) {
+                                EstudioUID = wxString(OFStr.c_str(), wxConv).ToUTF8();
+                        }
+                }
+                if (AccNumber.empty()) {
+                        OFString OFStr;
+                        if (query->findAndGetOFString(DCM_AccessionNumber, OFStr).good()) {
+                                AccNumber = wxString(OFStr.c_str(), wxConv).ToUTF8();
+                        }
+                }
+
+                pModelo->InsertarEstudio(PacienteUID, EstudioUID, AccNumber, EstudioDescripcion, EstudioModalidad, EstudioFecha, EstudioHora, EstudioDoctor);
+
+        }
+
+        void OnMoverEstudio(DcmDataset *WXUNUSED(dset), IModeloDicom *WXUNUSED(pModelo))
+        {
+#ifdef _GINKGO_DEBUG
+                std::cout << "move study" << std::endl;
+#endif
+        }
+
+        void OnMoverSerie(DcmDataset *WXUNUSED(dset), IModeloDicom *WXUNUSED(pModelo))
+        {
+#ifdef _GINKGO_DEBUG
+                std::cout << "move serie" << std::endl;
+#endif
+        }
+
+        void OnMoverImagen(DcmDataset *WXUNUSED(dset), IModeloDicom *WXUNUSED(pModelo))
+        {
+#ifdef _GINKGO_DEBUG
+                std::cout << "move image" << std::endl;
+#endif
+        }
+
+        OFBool writeToFile(const char* ofname, DcmDataset *dataset)
+        {
+                /* write out as a file format */
+
+                DcmFileFormat fileformat(dataset); // copies dataset
+                OFCondition ec = fileformat.error();
+                if (ec.bad()) {
+                        LOG_ERROR(T::ambitolog, "Unable to read DICOM dataset: " << ec.text());
+                        return OFFalse;
+                }
+
+                ec = fileformat.saveFile(ofname, dataset->getOriginalXfer());
+                if (ec.bad()) {
+                        LOG_ERROR(T::ambitolog, "Unable to write file (" << ofname << ": " << ec.text());
+                        return OFFalse;
+                }
+                return OFTrue;
+        }
+};
diff --git a/cadxcore/main/controllers/dcmtk/dicomnetwork.cpp b/cadxcore/main/controllers/dcmtk/dicomnetwork.cpp
new file mode 100644
index 0000000..3407018
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomnetwork.cpp
@@ -0,0 +1,303 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <sstream>
+#include "dicomnetwork.h"
+#include "dicomechoassociation.h"
+#include <api/controllers/ipacscontroller.h>
+#include <api/controllers/icontroladorlog.h>
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/dcmnet/assoc.h>
+#include <dcmtk/dcmnet/diutil.h>
+#include <dcmtk/dcmdata/dcuid.h>
+#include <dcmtk/dcmimage/diregist.h>
+#include <dcmtk/dcmdata/dcdeftag.h>
+
+#include <dcmtk/dcmjpeg/djdecode.h>
+#include <dcmtk/dcmjpeg/djencode.h>
+#include <dcmtk/dcmdata/dcrledrg.h>
+#include <dcmtk/dcmdata/dcrleerg.h>
+
+#include "tls/tls.h"
+#include "tls/gtlslayer.h"
+#include <dcmtk/dcmtls/tlstrans.h>
+
+
+#include <main/controllers/configurationcontroller.h>
+#include <wx/thread.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+#include <wx/string.h>
+
+GIL::DICOM::DCMTK::Network::IntanceMapType GIL::DICOM::DCMTK::Network::m_pInstancesMap;
+
+GNC::GCS::ILockable GIL::DICOM::DCMTK::Network::m_sLock;
+
+GIL::DICOM::DCMTK::Network* GIL::DICOM::DCMTK::Network::Instance(void* key)
+{
+        GNC::GCS::ILocker lock(m_sLock);
+
+        GIL::DICOM::DCMTK::Network* pInstance;
+
+        GIL::DICOM::DCMTK::Network::IntanceMapType::iterator it = m_pInstancesMap.find(key);
+
+        if (it == m_pInstancesMap.end()) {
+                pInstance = new GIL::DICOM::DCMTK::Network();
+                m_pInstancesMap[key] = pInstance;
+                LOG_TRACE("DICOMNetwork", "Network instance created. key = " << key);
+        } else {
+                LOG_TRACE("DICOMNetwork", "Network instance reused. key = " << key);
+                pInstance = (*it).second;
+        }
+
+        return pInstance;
+}
+
+void GIL::DICOM::DCMTK::Network::FreeInstance(void* key)
+{
+        GNC::GCS::ILocker lock(m_sLock);
+
+        GIL::DICOM::DCMTK::Network::IntanceMapType::iterator it = m_pInstancesMap.find(key);
+
+        if (it == m_pInstancesMap.end()) {
+                LOG_WARN("DICOMNetwork", "Unable to free Network instance. Instance was not registered.");
+        } else {
+                GIL::DICOM::DCMTK::Network* pInstance = (*it).second;
+                delete pInstance;
+                m_pInstancesMap.erase(it);
+                LOG_TRACE("DICOMNetwork", "Network instance released. key = " << key);
+        }
+
+}
+
+GIL::DICOM::DCMTK::Network::Network()
+{
+        m_pDCMTKNetwork = NULL;
+        m_Initiallized = false;
+}
+
+GIL::DICOM::DCMTK::Network::~Network()
+{
+        DropNetwork();
+}
+
+OFCondition GIL::DICOM::DCMTK::Network::ConnectAssociation(Association* assoc, int pdu)
+{
+        GNC::GCS::ILocker lock(m_sLock);
+        OFCondition cond;
+
+        cond = ASC_ConnectAssociation(
+                       assoc,
+                       assoc->m_calledAET,
+                       assoc->m_calledPeer,
+                       assoc->m_calledPort,
+                       assoc->m_ourAET,
+                       pdu);
+        if (!cond.good()) {
+                assoc->Drop(cond);
+                return cond;
+        }
+
+        assoc->Net = this;
+        assoc->msgId = assoc->assoc->nextMsgID;
+
+        return cond;
+}
+
+bool GIL::DICOM::DCMTK::Network::Initiallized()
+{
+        return m_Initiallized;
+}
+
+OFCondition GIL::DICOM::DCMTK::Network::InitializeNetwork(int timeout, Association::RoleType role, int port)
+{
+
+        if (m_pDCMTKNetwork != NULL) {
+                LOG_WARN("DICOMNetwork", "Shutting down previous initiallized network");
+                DropNetwork();
+        }
+
+        OFCondition cond;
+
+        switch (role) {
+        case Association::RT_Acceptor:
+                cond = ASC_initializeNetwork(NET_ACCEPTOR, 0, timeout, &m_pDCMTKNetwork);
+                break;
+        case Association::RT_Requestor:
+                cond = ASC_initializeNetwork(NET_REQUESTOR, port, timeout, &m_pDCMTKNetwork);
+                break;
+        case Association::RT_AcceptorRequestor:
+                cond = ASC_initializeNetwork(NET_ACCEPTORREQUESTOR, port, timeout, &m_pDCMTKNetwork);
+                break;
+        default:
+                cond = EC_IllegalParameter;
+                break;
+        }
+        m_Initiallized = cond.good();
+        return cond;
+}
+
+OFCondition GIL::DICOM::DCMTK::Network::DropNetwork()
+{
+
+        OFCondition cond = ASC_dropNetwork(&m_pDCMTKNetwork);
+        m_pDCMTKNetwork = NULL;
+
+        return cond;
+}
+
+OFCondition GIL::DICOM::DCMTK::Network::ASC_ConnectAssociation(Association* assoc, const std::string& peerTitle, const std::string& peer, int port, const std::string& ouraet, int pdu)
+{
+        OFCondition cond;
+
+        GTLSTransportLayer *tLayer = NULL;
+
+        if (assoc->IsSecure()) {
+                tLayer = new GTLSTransportLayer(DICOM_APPLICATION_REQUESTOR, NULL);
+                if (tLayer == NULL) {
+                        return makeOFCondition(OFM_dcmtls, DULC_TLSERROR, OF_error, "TLS Error: Unable to create TLS transport layer");
+                }
+                tLayer->setCertificateFromString(assoc->GetCliCert());
+                tLayer->setPrivateKeyFromString(assoc->GetCliKey());
+
+                if (! tLayer->checkPrivateKeyMatchesCertificate()) {
+                        delete tLayer;
+                        return makeOFCondition(OFM_dcmtls, DULC_TLSERROR, OF_error, "TLS Error: Private key and certificate do not match");
+                }
+
+                tLayer->addSystemTrustedCertificates();
+
+                if (assoc->GetValidate()) {
+                        tLayer->setCertificateVerification(DCV_requireCertificate);
+                } else {
+                        tLayer->setCertificateVerification(DCV_ignoreCertificate);
+                }
+                /*
+                 if (opt_dhparam && ! (tLayer->setTempDHParameters(opt_dhparam)))
+                 {
+                 LOG_WARN(assoc->ambitolog, "unable to load temporary DH parameters. Ignoring");
+                 }
+                 */
+
+                cond = ASC_setTransportLayer(m_pDCMTKNetwork, tLayer, 0);
+                if (cond.bad()) {
+                        return cond;
+                }
+        }
+
+        T_ASC_Parameters *params;
+
+        std::string peerHost;
+        char localHost[129];
+
+        cond = ASC_createAssociationParameters(&params, pdu);
+        if (!cond.good()) {
+                return cond;
+        }
+
+        //user identity
+        if (assoc->UseUserPass()) {
+                cond = ASC_setIdentRQUserPassword(params, assoc->GetUser().c_str(), assoc->GetPass().c_str());
+                if (!cond.good()) {
+                        return cond;
+                }
+        }
+
+        ASC_setAPTitles(params, ouraet.c_str(), peerTitle.c_str(), NULL);
+
+        cond = ASC_setTransportLayerType(params, assoc->IsSecure());
+        if (cond.bad()) {
+                return cond;
+        }
+
+        gethostname(localHost, sizeof (localHost) - 1);
+        {
+                std::ostringstream os;
+                os << peer.c_str() << ":" << port;
+                peerHost = os.str();
+        }
+        ASC_setPresentationAddresses(params, localHost, peerHost.c_str());
+
+        assoc->OnAddPresentationContext(params);
+
+        {
+                OFString str;
+                ASC_dumpParameters(str, params, ASC_ASSOC_RQ);
+                LOG_DEBUG(assoc->ambitolog, "Requesting association" << std::endl << str.c_str());
+
+        }
+
+        /* create association */
+        cond = ASC_requestAssociation(m_pDCMTKNetwork, params, &(assoc->assoc));
+        if (cond != EC_Normal) {
+                if (cond == DUL_ASSOCIATIONREJECTED) {
+                        T_ASC_RejectParameters rej;
+
+                        ASC_getRejectParameters(params, &rej);
+                        OFString str;
+                        ASC_printRejectParameters(str, &rej);
+                        return makeOFCondition(OFM_dcmnet, DULC_ASSOCIATIONREJECTED, OF_error, str.c_str());
+                } else {
+                        return cond;
+                }
+        }
+
+        {
+                OFString str;
+                ASC_dumpParameters(str, params, ASC_ASSOC_AC);
+                LOG_DEBUG(assoc->ambitolog, "Association accepted" << std::endl << str.c_str());
+        }
+
+        /* what has been accepted/refused ? */
+
+        if (ASC_countAcceptedPresentationContexts(params) == 0) {
+                return cond;
+        }
+
+        return EC_Normal;
+}
+
+OFCondition GIL::DICOM::DCMTK::Network::SendEchoRequest(const std::string& title, const std::string& peer, int port, const std::string& ouraet, int pdu)
+{
+        EchoAssociation dcmEcho("C-ECHO");
+        dcmEcho.Create(title, peer, port, ouraet, UID_VerificationSOPClass);
+
+        ConnectAssociation(&dcmEcho, pdu);
+
+        return dcmEcho.SendEchoRequest();
+}
+
+T_ASC_Network* GIL::DICOM::DCMTK::Network::GetDcmtkNet()
+{
+        return m_pDCMTKNetwork;
+}
+
+void GIL::DICOM::DCMTK::Network::SetDcmtkNet(T_ASC_Network* n)
+{
+        m_pDCMTKNetwork = n;
+}
diff --git a/cadxcore/main/controllers/dcmtk/dicomnetwork.h b/cadxcore/main/controllers/dcmtk/dicomnetwork.h
new file mode 100644
index 0000000..9d738ad
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomnetwork.h
@@ -0,0 +1,106 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/* this code was inspired by aeskulap */
+
+#pragma once
+#include <map>
+#include <api/ilock.h>
+#include "dicomassociation.h"
+
+namespace GIL
+{
+namespace DICOM
+{
+
+namespace DCMTK
+{
+
+class Network
+{
+
+protected:
+        typedef std::map<void*, Network*> IntanceMapType;
+
+public:
+        /** Keyed Singleton **/
+        static Network* Instance(void* key);
+        static void FreeInstance(void* key);
+
+        bool Initiallized();
+
+        /**
+        Initialize the dicom network
+        */
+
+        OFCondition InitializeNetwork(int timeout,  Association::RoleType role = Association::RT_Requestor, int port = 0);
+
+        /**
+        Drop the dicom network
+        */
+        OFCondition DropNetwork();
+
+        /**
+        Connect an association to the specified host
+        */
+        OFCondition ConnectAssociation(Association* assoc, int pdu = ASC_DEFAULTMAXPDU);
+
+        /**
+        Send C-Echo request to dicom node
+        */
+        OFCondition SendEchoRequest(const std::string& title, const std::string& peer, int port, const std::string& ouraet, int pdu);
+
+        /**
+        Get the pointer to the internal dcmtk network variable (sorry)
+        */
+        T_ASC_Network* GetDcmtkNet();
+
+        void SetDcmtkNet(T_ASC_Network* n);
+
+protected:
+
+        /**
+        Connect to a host and try to establish an association
+        */
+        OFCondition ASC_ConnectAssociation(Association* assoc, const std::string& peerTitle, const std::string& peer, int port, const std::string& ouraet, int pdu = ASC_DEFAULTMAXPDU);
+
+        /**
+        THE dicom network
+        */
+        T_ASC_Network* m_pDCMTKNetwork;
+
+        /**
+        constructor
+        */
+        Network();
+
+        virtual ~Network();
+
+protected:
+        bool m_Initiallized;
+        /** Attributes **/
+        static IntanceMapType m_pInstancesMap;
+        static GNC::GCS::ILockable m_sLock;
+
+        friend class Association;
+};
+}
+}
+}
diff --git a/cadxcore/main/controllers/dcmtk/dicomprintassociation.cpp b/cadxcore/main/controllers/dcmtk/dicomprintassociation.cpp
new file mode 100644
index 0000000..081ccc5
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomprintassociation.cpp
@@ -0,0 +1,1211 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "dicomprintassociation.h"
+#include <wx/string.h>
+#include <wx/intl.h>
+#include <wx/filename.h>
+
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/ipacscontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/entorno.h>
+
+#include <main/controllers/dcmtk/ginkgouid.h>
+#include <api/internationalization/internationalization.h>
+#include <api/dicom/dcmdictionary.h>
+
+
+#include "helpercompresion.h"
+
+
+//Server: dcmprscp -c /usr/local/etc/dcmtk/dcmpstat.cfg -p KODAK -ll debug >log.txt 2>&1
+//Client:
+//	Step 1: dcmpsprt -c /usr/local/etc/dcmtk/dcmpstat.cfg -p KODAK /home/carlos/DICOM/INCISIX/INCISIX/IM-0001-0100.dcm
+//	Step 2: dcmprscu -c /usr/local/etc/dcmtk/dcmpstat.cfg -p KODAK database/SP_4f7959ef7ffdbf85.dcm
+
+/*
+FILM SESSION SOP CLASS N-CREATE REQUEST ATTRIBUTES
+Number of Copies (2000|0010) IS [1 .. 10]
+Medium type (2000|0030) CS [BLUE FILM, CLEAR FILM or PAPER]
+Film Destination (2000|0040) CS [MAGAZINE or PROCESSOR]
+
+FILM BOX SOP CLASS N-CREATE REQUEST ATTRIBUTES
+Image Display Format (2010|0010) CS [STANDARD\1,1]
+Film Orientation (2010|0040) CS [PORTRAIT OR LANDSCAPE]
+Film Size ID (2010|0050) CS [14INX17IN, 14INX14IN, 11INX14IN, 11INX11IN, 85INX11IN, 8INX10IN]
+Maginfication Type (2010|0060) CS [REPLICATE, BILINEAR, CUBIC or NONE]
+Border Density (2010,0100) CS [BLACK or WHITE]
+*/
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+#include <dcmtk/dcmdata/dctk.h>
+#include <dcmtk/dcmimgle/dcmimage.h>
+#include <dcmtk/dcmdata/dcfilefo.h>
+#include <dcmtk/dcmdata/dcdatset.h>
+#include <dcmtk/dcmdata/dcdeftag.h>
+#include <dcmtk/dcmdata/dcdict.h>
+#include <dcmtk/dcmdata/dcdicent.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+
+static void DIMSE_printNStatusString(std::ostream& dumpStream, int status)
+{
+        switch(status) {
+        case STATUS_Success:
+                dumpStream << "0x0000: Success";
+                break;
+        case STATUS_N_Cancel:
+                dumpStream << "0xFE00: Cancel";
+                break;
+        case STATUS_N_AttributeListError:
+                dumpStream << "0x0107: Attribute list error";
+                break;
+        case STATUS_N_SOPClassNotSupported:
+                dumpStream << "0x0122: SOP class not supported";
+                break;
+        case STATUS_N_ClassInstanceConflict:
+                dumpStream << "0x0119: Class/instance conflict";
+                break;
+        case STATUS_N_DuplicateSOPInstance:
+                dumpStream << "0x0111: Duplicate SOP instance";
+                break;
+        case STATUS_N_DuplicateInvocation:
+                dumpStream << "0x0210: Duplicate invocation";
+                break;
+        case STATUS_N_InvalidArgumentValue:
+                dumpStream << "0x0115: Invalid argument value";
+                break;
+        case STATUS_N_InvalidAttributeValue:
+                dumpStream << "0x0106: Invalid attribute value";
+                break;
+        case STATUS_N_InvalidObjectInstance:
+                dumpStream << "0x0117: Invalid object instance";
+                break;
+        case STATUS_N_MissingAttribute:
+                dumpStream << "0x0120: Missing attribute";
+                break;
+        case STATUS_N_MissingAttributeValue:
+                dumpStream << "0x0121: Missing attribute value";
+                break;
+        case STATUS_N_MistypedArgument:
+                dumpStream << "0x0212: Mistyped argument";
+                break;
+        case STATUS_N_NoSuchArgument:
+                dumpStream << "0x0114: No such argument";
+                break;
+        case STATUS_N_NoSuchAttribute:
+                dumpStream << "0x0105: No such attribute";
+                break;
+        case STATUS_N_NoSuchEventType:
+                dumpStream << "0x0113: No such event type";
+                break;
+        case STATUS_N_NoSuchObjectInstance:
+                dumpStream << "0x0112: No such object instance";
+                break;
+        case STATUS_N_NoSuchSOPClass:
+                dumpStream << "0x0118: No such SOP class";
+                break;
+        case STATUS_N_ProcessingFailure:
+                dumpStream << "0x0110: Processing failure";
+                break;
+        case STATUS_N_ResourceLimitation:
+                dumpStream << "0x0213: Resource limitation";
+                break;
+        case STATUS_N_UnrecognizedOperation:
+                dumpStream << "0x0211: Unrecognized operation";
+                break;
+        case STATUS_N_PRINT_BFS_Warn_MemoryAllocation:
+                dumpStream << "0xB600: Basic film session warning - Memory allocation";
+                break;
+        case STATUS_N_PRINT_BFS_Warn_NoSessionPrinting:
+                dumpStream << "0xB601: Basic film session warning - No session printing";
+                break;
+        case STATUS_N_PRINT_BFS_Warn_EmptyPage:
+                dumpStream << "0xB602: Basic film session warning - Empty page";
+                break;
+        case STATUS_N_PRINT_BFB_Warn_EmptyPage:
+                dumpStream << "0xB603: Basic film box warning - Empty page";
+                break;
+        case STATUS_N_PRINT_BFS_Fail_NoFilmBox:
+                dumpStream << "0xC600: Basic film session failure - No film box";
+                break;
+        case STATUS_N_PRINT_BFS_Fail_PrintQueueFull:
+                dumpStream << "0xC601: Basic film session failure - Print queue full";
+                break;
+        case STATUS_N_PRINT_BSB_Fail_PrintQueueFull:
+                dumpStream << "0xC602: Basic film box failure - Print queue full";
+                break;
+        case STATUS_N_PRINT_BFS_BFB_Fail_ImageSize:
+                dumpStream << "0xC603: Basic film session/box failure - Image size";
+                break;
+        case STATUS_N_PRINT_BFS_BFB_Fail_PositionCollision:
+                dumpStream << "0xC604: Basic film session/box failure - Position collision";
+                break;
+        case STATUS_N_PRINT_IB_Fail_InsufficientMemory:
+                dumpStream << "0xC605: Image box failure - Insufficient memory";
+                break;
+        case STATUS_N_PRINT_IB_Fail_MoreThanOneVOILUT:
+                dumpStream << "0xC606: Image box failure - More than one VOI LUT";
+                break;
+        default: {
+                char prev = dumpStream.fill('0');
+                auto flags = dumpStream.flags();
+                dumpStream << "0x" << std::hex << std::setw(4) << status
+                           << ": Unknown Status Code";
+                dumpStream.flags(flags);
+                dumpStream.fill(prev);
+                break;
+        }
+        }
+}
+
+PrintAssociation::PrintAssociation(void* connectionKey, const std::string& ambitolog, GNC::IProxyNotificadorProgreso* pNotificadorProgreso) : Association(ambitolog)
+{
+
+        if (connectionKey == NULL) {
+                LOG_ERROR(ambitolog, "NULL Connection key");
+        }
+        this->Net = GIL::DICOM::DCMTK::Network::Instance(connectionKey);
+        this->m_pNotificadorProgreso = pNotificadorProgreso;
+        this->ambitolog = ambitolog;
+        this->blockMode = DIMSE_BLOCKING;
+        this->eventHandler = NULL;
+        this->presId = 0;
+}
+
+PrintAssociation::~PrintAssociation()
+{
+
+}
+
+OFCondition PrintAssociation::Print(const GNC::GCS::Ptr<DicomServer>& server, const std::string& local_aet, const GIL::DICOM::DicomDataset& film, const GIL::DICOM::DicomDataset& layout, const GIL::DICOM::DicomDataset& job, const std::list<std::string>& images)
+{
+        OFCondition status = EC_Normal;
+
+        //1. Open Association
+
+        if (!Net->Initiallized()) {
+                Net->InitializeNetwork(GetTimeout(), GetRole(), GetAcceptorPort());
+        }
+
+        Create(
+                server->AET,
+                server->HostName,
+                server->Port,
+                local_aet
+        );
+
+        SetNotificadorProgreso(m_pNotificadorProgreso);
+
+        LOG_DEBUG(ambitolog, "Conectando: AET = " << server->AET << ", Host = " << server->HostName << ", Puerto = " << server->Port << ", Local AET = " << local_aet << ", PDU = " << server->PDU);
+        OFCondition r = Connect(Net, server->PDU);
+
+        OFCondition c = EC_Normal;
+
+        Uint16 rstatus;
+
+        if (r.good() == true) {
+
+                // 2. N-GET (Printer)
+
+                DcmDataset* response;
+                DcmDataset attrs;
+                DcmElement* e = NULL;
+                DcmSequenceOfItems* seq = NULL;
+                DcmItem* item = NULL;
+
+                Uint16 *infoAttrList = NULL;
+
+                c = getRQ( UID_PrinterSOPClass, UID_PrinterSOPInstance, infoAttrList, 0, rstatus, response);
+
+                if (c.good()) {
+
+                        // 3. N-CREATE (Film Session)
+
+                        delete response;
+                        response = NULL;
+                        attrs.clear();
+
+                        std::string tmpStd;
+
+
+                        e = newDicomElement(DCM_NumberOfCopies);
+                        if (job.getTag(GKDCM_NumberOfCopies, tmpStd)) {
+                                e->putString(tmpStd.c_str());
+                        } else {
+                                e->putString("1");
+                        }
+                        attrs.insert(e);
+
+                        if (job.getTag(GKDCM_PrintPriority, tmpStd)) {
+                                e = newDicomElement(DCM_PrintPriority);
+                                if (!tmpStd.empty()) {
+                                        e->putString(tmpStd.c_str());
+                                }
+                                attrs.insert(e);
+                        }
+
+                        if (job.getTag(GKDCM_MediumType, tmpStd)) {
+                                e = newDicomElement(DCM_MediumType);
+                                if (!tmpStd.empty()) {
+                                        e->putString(tmpStd.c_str());
+                                }
+                        }
+                        attrs.insert(e);
+
+
+                        if (film.getTag(GKDCM_FilmDestination, tmpStd)) {
+                                e = newDicomElement(DCM_FilmDestination);
+                                if (!tmpStd.empty()) {
+                                        e->putString(tmpStd.c_str());
+                                }
+                                attrs.insert(e);
+                        }
+
+
+                        e = newDicomElement(DCM_FilmSessionLabel);
+                        e->putString("GNK Print Session");
+                        attrs.insert(e);
+
+                        /*
+                        e = newDicomElement(DCM_MemoryAllocation);
+                        attrs.insert(e);
+                        */
+
+                        e = newDicomElement(DCM_OwnerID);
+                        attrs.insert(e);
+
+                        //T_ASC_PresentationContextID pcidColorPrint = findAcceptedPC(UID_BasicColorPrintManagementMetaSOPClass);
+                        //T_ASC_PresentationContextID pcidGrayscalePrint = findAcceptedPC(UID_BasicGrayscalePrintManagementMetaSOPClass);
+                        //T_ASC_PresentationContextID pcidPrint = color ? pcidColorPrint : pcidGrayscalePrint;
+
+                        std::string filmSessionInstanceUID = GIL::DICOM::MakeUID(GIL::DICOM::GUID_InstanceRoot);
+
+                        OFString ofFilmSessionInstanceUID(filmSessionInstanceUID.c_str());
+
+                        c = createRQ(UID_BasicFilmSessionSOPClass, ofFilmSessionInstanceUID, &attrs, rstatus, response);
+
+                        if (c.good()) {
+
+                                // 4. N-CREATE (Presentation LUT)
+                                // 5. N-CREATE (Film Box)
+
+                                delete response;
+                                response = NULL;
+                                attrs.clear();
+
+                                if (layout.getTag(GKDCM_ImageDisplayFormat, tmpStd)) {
+                                        e = newDicomElement(DCM_ImageDisplayFormat);
+                                        e->putString(tmpStd.c_str());
+                                        if (!tmpStd.empty()) {
+                                                e->putString(tmpStd.c_str());
+                                        }
+                                        attrs.insert(e);
+                                }
+
+                                {
+                                        seq = new DcmSequenceOfItems(DCM_ReferencedFilmSessionSequence);
+
+                                        item = new DcmItem();
+
+                                        e = newDicomElement(DCM_ReferencedSOPClassUID);
+                                        e->putString(UID_BasicFilmSessionSOPClass);
+                                        item->insert(e);
+
+                                        e = newDicomElement(DCM_ReferencedSOPInstanceUID);
+                                        e->putString(filmSessionInstanceUID.c_str());
+
+                                        item->insert(e);
+                                        seq->insert(item);
+
+                                        attrs.insert(seq);
+                                }
+
+                                if (film.getTag(GKDCM_FilmOrientation, tmpStd)) {
+                                        e = newDicomElement(DCM_FilmOrientation);
+                                        e->putString(tmpStd.c_str());
+                                        if (!tmpStd.empty()) {
+                                                e->putString(tmpStd.c_str());
+                                        }
+                                        attrs.insert(e);
+                                }
+
+
+                                if (film.getTag(GKDCM_FilmSizeID, tmpStd)) {
+                                        e = newDicomElement(DCM_FilmSizeID);
+                                        e->putString(tmpStd.c_str());
+                                        if (!tmpStd.empty()) {
+                                                e->putString(tmpStd.c_str());
+                                        }
+                                        attrs.insert(e);
+                                }
+
+                                if (film.getTag(GKDCM_MagnificationType, tmpStd)) {
+                                        e = newDicomElement(DCM_MagnificationType);
+                                        e->putString(tmpStd.c_str());
+                                        if (!tmpStd.empty()) {
+                                                e->putString(tmpStd.c_str());
+                                        }
+                                        attrs.insert(e);
+                                }
+
+                                if (film.getTag(GKDCM_Trim, tmpStd)) {
+                                        e = newDicomElement(DCM_Trim);
+                                        e->putString(tmpStd.c_str());
+                                        if (!tmpStd.empty()) {
+                                                e->putString(tmpStd.c_str());
+                                        }
+                                        attrs.insert(e);
+                                }
+
+                                if (layout.getTag(GKDCM_BorderDensity, tmpStd)) {
+                                        e = newDicomElement(DCM_BorderDensity);
+                                        e->putString(tmpStd.c_str());
+                                        if (!tmpStd.empty()) {
+                                                e->putString(tmpStd.c_str());
+                                        }
+                                        attrs.insert(e);
+                                }
+
+                                if (layout.getTag(GKDCM_EmptyImageDensity, tmpStd)) {
+                                        e = newDicomElement(DCM_EmptyImageDensity);
+                                        e->putString(tmpStd.c_str());
+                                        if (!tmpStd.empty()) {
+                                                e->putString(tmpStd.c_str());
+                                        }
+                                        attrs.insert(e);
+                                }
+
+                                OFString filmBoxSOPInstanceUID;
+                                c = createRQ(UID_BasicFilmBoxSOPClass, filmBoxSOPInstanceUID, &attrs, rstatus, response);
+
+                                if (c.good()) {
+
+
+                                        DcmSequenceOfItems* referencedImageBoxSequence = NULL;
+                                        if (response == NULL || response->findAndGetSequence(DCM_ReferencedImageBoxSequence, referencedImageBoxSequence, false, false).bad()) {
+                                                return makeOFCondition(OFM_dcmnet, 16, OF_error, "Unable to read referenced image box");
+                                        }
+
+                                        if (referencedImageBoxSequence == NULL || referencedImageBoxSequence->getItem(0)->findAndGetElement(DCM_ReferencedSOPClassUID, e, false, false).bad()) {
+                                                return makeOFCondition(OFM_dcmnet, 16, OF_error, "No Image Box SOP Class received");
+                                        }
+                                        std::string referencedImageBoxSOPClass;
+                                        {
+                                                char* sopClassUID = NULL;
+                                                if (e->getString(sopClassUID).bad()) {
+                                                        return makeOFCondition(OFM_dcmnet, 16, OF_error, "No Image Box SOP Class received");
+                                                }
+                                                referencedImageBoxSOPClass = sopClassUID;
+                                        }
+
+#if 0 // TODO Color
+                                        if (referencedImageBoxSOPClass != UID_BasicColorImageBoxSOPClass) {
+                                                return makeOFCondition(OFM_dcmnet, 16, OF_error, "Invalid Image Box SOP Class for color print");
+                                        }
+#else
+                                        if (referencedImageBoxSOPClass != UID_BasicGrayscaleImageBoxSOPClass) {
+                                                return makeOFCondition(OFM_dcmnet, 16, OF_error, "Invalid Image Box SOP Class for grayscale print");
+                                        }
+#endif
+
+                                        if (referencedImageBoxSequence->getItem(0)->findAndGetElement(DCM_ReferencedSOPInstanceUID, e, false, false).bad()) {
+                                                return makeOFCondition(OFM_dcmnet, 16, OF_error, "No Image Box SOP Instance UID received");
+                                        }
+                                        std::string referencedImageBoxSOPInstanceUID;
+                                        {
+                                                char * sopInstanceUID = NULL;
+                                                if (e->getString(sopInstanceUID).bad()) {
+                                                        return makeOFCondition(OFM_dcmnet, 16, OF_error, "Invalid Image Box SOP Instance UID received");
+                                                }
+                                                referencedImageBoxSOPInstanceUID = sopInstanceUID;
+                                                //const char* test1 = referencedImageBoxSOPInstanceUID.c_str();
+                                                //const char* test2 = sopInstanceUID;
+                                        }
+                                        std::cout << "Ref SOP = " << referencedImageBoxSOPInstanceUID << std::endl;
+
+
+                                        // 6. N-SET (Image Box)
+
+                                        unsigned int pos = 1;
+                                        for (std::list<std::string>::const_iterator it = images.begin(); it != images.end(); ++it, pos++) {
+
+                                                delete response;
+                                                response = NULL;
+                                                attrs.clear();
+
+                                                const std::string& filePath = (*it);
+
+                                                DcmFileFormat ff;
+                                                DcmDataset* ds = NULL;
+
+                                                LOG_DEBUG(ambitolog, "loading slice: [" << filePath.c_str() << "]" );
+
+                                                c = ff.loadFile(filePath.c_str(), EXS_Unknown, EGL_noChange, DCM_MaxReadLength, ERM_autoDetect);
+
+                                                std::string outfname;
+                                                {
+                                                        std::ostringstream os;
+                                                        os << GNC::Entorno::Instance()->GetGinkgoTempDir().c_str() << (char) wxFileName::GetPathSeparator(wxPATH_NATIVE) << "print_slice_" << pos << ".dcm";
+                                                        outfname = os.str();
+                                                }
+
+                                                LOG_DEBUG(ambitolog, "tempfile: [" << outfname.c_str() << "]" );
+
+                                                DcmXfer filexfer(ff.getDataset()->getOriginalXfer());
+
+                                                if (filexfer.getXfer() == EXS_JPEG2000LosslessOnly || filexfer.getXfer() == EXS_JPEG2000) {
+                                                        if (!DecompressJPEG2000(filePath, outfname)) {
+
+                                                                return makeOFCondition(OFM_dcmdata, 16, OF_error, "Unable to decompress JPEG2000");
+                                                        }
+                                                        //LOG_WARN(ambitolog, "The file is being uncompressed from JPG2000. Some tags could be lost");
+                                                        ff.loadFile(outfname.c_str(), EXS_Unknown, EGL_noChange, DCM_MaxReadLength, ERM_autoDetect);
+                                                }
+
+                                                ff.getDataset()->chooseRepresentation(EXS_LittleEndianExplicit, NULL);
+
+                                                // check if everything went well
+                                                if (ff.getDataset()->canWriteXfer(EXS_LittleEndianExplicit)) {
+                                                        ff.loadAllDataIntoMemory();
+                                                        unlink(outfname.c_str());
+                                                        c = ff.saveFile( outfname.c_str(), EXS_LittleEndianExplicit);
+                                                } else {
+                                                        return makeOFCondition(OFM_dcmdata, 16, OF_error, "Unable to convert to LittleEndianExplicit");
+                                                }
+
+                                                if (c.good()) {
+                                                        ds = ff.getDataset();
+
+                                                        c = attrs.chooseRepresentation(ff.getDataset()->getOriginalXfer(), NULL);
+                                                        if (c.bad()) {
+                                                                return makeOFCondition(OFM_dcmdata, 16, OF_error, "Unable to choose LittleEndianExplicit representation");
+                                                        }
+
+
+                                                        e = newDicomElement(DCM_ImageBoxPosition);
+                                                        e->putUint16(pos);
+                                                        attrs.insert(e);
+
+#if 0 // TODO 
+                                                        seq = new DcmSequenceOfItems(DCM_BasicColorImageSequence);
+#else
+                                                        seq = new DcmSequenceOfItems(DCM_BasicGrayscaleImageSequence);
+#endif
+
+                                                        item = new DcmItem();
+
+                                                        if (ds->findAndGetElement(DCM_SamplesPerPixel, e, false, true).good()) {
+                                                                item->insert(e);
+                                                        }
+
+                                                        if (ds->findAndGetElement(DCM_PhotometricInterpretation, e, false, true).good()) {
+                                                                item->insert(e);
+                                                        }
+
+                                                        if (ds->findAndGetElement(DCM_Rows, e, false, true).good()) {
+                                                                item->insert(e);
+                                                        }
+
+                                                        if (ds->findAndGetElement(DCM_Columns, e, false, true).good()) {
+                                                                item->insert(e);
+                                                        }
+
+                                                        if (ds->findAndGetElement(DCM_PixelAspectRatio, e, false, true).good()) {
+                                                                item->insert(e);
+                                                        }
+
+                                                        if (ds->findAndGetElement(DCM_BitsAllocated, e, false, true).good()) {
+                                                                item->insert(e);
+                                                        }
+
+                                                        if (ds->findAndGetElement(DCM_BitsStored, e, false, true).good()) {
+                                                                item->insert(e);
+                                                        }
+
+                                                        if (ds->findAndGetElement(DCM_HighBit, e, false, true).good()) {
+                                                                item->insert(e);
+                                                        }
+
+                                                        if (ds->findAndGetElement(DCM_PixelRepresentation, e, false, true).good()) {
+                                                                item->insert(e);
+                                                        }
+
+                                                        if (ds->findAndGetElement(DCM_PixelData, e, false, true).good()) {
+                                                                item->insert(e);
+                                                        }
+
+                                                        seq->insert(item);
+
+                                                        attrs.insert(seq);
+                                                        //c = attrs.chooseRepresentation(EXS_LittleEndianExplicit, NULL);
+                                                        //attrs.insertEmptyElement(DCM_TransferSyntaxUID, EXS_LittleEndianExplicit);
+
+                                                        c = setRQ(referencedImageBoxSOPClass.c_str(), referencedImageBoxSOPInstanceUID.c_str(), &attrs, rstatus, response);
+
+                                                        if (c.bad()) {
+                                                                return c;
+                                                        }
+                                                } else {
+                                                        return c;
+                                                }
+
+                                        }
+                                        // 7. N-ACTION (Film Box)
+                                        delete response;
+                                        response = NULL;
+                                        attrs.clear();
+
+                                        OFCondition resultStatus = actionRQ(UID_BasicFilmBoxSOPClass, filmBoxSOPInstanceUID.c_str(), 1, NULL, rstatus, response);
+
+                                        if (resultStatus.good()) {
+                                                // 8. N-DELETE (Film Box)
+                                                c = deleteRQ(UID_BasicFilmBoxSOPClass, filmBoxSOPInstanceUID.c_str(), rstatus);
+                                        } else {
+                                                c = EC_Normal;
+                                        }
+
+                                        if (c.good()) {
+
+                                                // 9. N-DELETE (Film Session)
+                                                c = deleteRQ(UID_BasicFilmSessionSOPClass, filmSessionInstanceUID.c_str(), rstatus);
+                                        }
+
+                                        return resultStatus;
+                                } else {
+                                        return c;
+                                }
+
+                        } else {
+                                return c;
+                        }
+                }
+        } else {
+                LOG_ERROR(ambitolog, "Error al conectar:" << r.text());
+                Drop();
+                Destroy();
+                throw GIL::DICOM::PACSException(r.text());
+        }
+
+        if (!c.good()) {
+                LOG_ERROR(ambitolog, "Error al enviar objeto: " << c.text());
+                Drop();
+                Destroy();
+                throw GIL::DICOM::PACSException(c.text());
+        }
+
+        return c;
+}
+
+void PrintAssociation::OnAddPresentationContext(T_ASC_Parameters* params)
+{
+        OFCondition cond = EC_Normal;
+
+        const char* transferSyntaxes[3];
+        int transferSyntaxCount = 0;
+
+        bool implicitOnly = false;
+        bool negotiatePresentationLUT = false;
+        bool negotiateAnnotationBox = false;
+
+        if (implicitOnly) {
+                // coverity[DEADCODE] GW: don't know why this code is here, maybe future possibilities?
+                transferSyntaxes[0] = UID_LittleEndianImplicitTransferSyntax;
+                transferSyntaxCount = 1;
+        } else {
+                /* gLocalByteOrder is defined in dcxfer.h */
+                if (gLocalByteOrder == EBO_LittleEndian) {
+                        /* we are on a little endian machine */
+                        transferSyntaxes[0] = UID_LittleEndianExplicitTransferSyntax;
+                        transferSyntaxes[1] = UID_BigEndianExplicitTransferSyntax;
+                } else {
+                        /* we are on a big endian machine */
+                        transferSyntaxes[0] = UID_BigEndianExplicitTransferSyntax;
+                        transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax;
+                }
+                transferSyntaxes[2] = UID_LittleEndianImplicitTransferSyntax;
+                transferSyntaxCount = 3;
+        }
+
+        /* we always propose basic grayscale, presentation LUT and annotation box*/
+        if (cond.good())
+                cond = ASC_addPresentationContext(params, 1, UID_BasicGrayscalePrintManagementMetaSOPClass, transferSyntaxes, transferSyntaxCount);
+
+        if (negotiatePresentationLUT) {
+                // coverity[DEADCODE] GW: don't know why this code is here, maybe future possibilities?
+                if (cond.good())
+                        cond = ASC_addPresentationContext(params, 3, UID_PresentationLUTSOPClass, transferSyntaxes, transferSyntaxCount);
+        }
+
+        if (negotiateAnnotationBox) {
+                // coverity[DEADCODE] GW: don't know why this code is here, maybe future possibilities?
+                if (cond.good())
+                        cond = ASC_addPresentationContext(params, 5, UID_BasicAnnotationBoxSOPClass, transferSyntaxes, transferSyntaxCount);
+        }
+}
+
+void PrintAssociation::dumpNMessage(T_DIMSE_Message &msg, DcmItem *dataset, OFBool outgoing)
+{
+        OFString str;
+        if (outgoing) {
+                DIMSE_dumpMessage(str, msg, DIMSE_OUTGOING, dataset);
+        } else {
+                DIMSE_dumpMessage(str, msg, DIMSE_INCOMING, dataset);
+        }
+        LOG_DEBUG(ambitolog, str);
+}
+
+OFCondition PrintAssociation::sendNRequest(
+        T_ASC_PresentationContextID presId,
+        T_DIMSE_Message &request,
+        DcmDataset *rqDataSet,
+        T_DIMSE_Message &response,
+        DcmDataset* &statusDetail,
+        DcmDataset* &rspDataset)
+{
+        OFCondition cond = EC_Normal;
+        T_DIMSE_Command expectedResponse;
+        DIC_US expectedMessageID=0;
+        if (assoc == NULL) {
+                return DIMSE_ILLEGALASSOCIATION;
+        }
+
+        T_DIMSE_DataSetType datasetType = DIMSE_DATASET_NULL;
+        if (rqDataSet && (rqDataSet->card() > 0)) datasetType = DIMSE_DATASET_PRESENT;
+
+        switch(request.CommandField) {
+        case DIMSE_N_GET_RQ:
+                request.msg.NGetRQ.DataSetType = datasetType;
+                expectedResponse = DIMSE_N_GET_RSP;
+                expectedMessageID = request.msg.NGetRQ.MessageID;
+                break;
+        case DIMSE_N_SET_RQ:
+                request.msg.NSetRQ.DataSetType = datasetType;
+                expectedResponse = DIMSE_N_SET_RSP;
+                expectedMessageID = request.msg.NSetRQ.MessageID;
+                break;
+        case DIMSE_N_ACTION_RQ:
+                request.msg.NActionRQ.DataSetType = datasetType;
+                expectedResponse = DIMSE_N_ACTION_RSP;
+                expectedMessageID = request.msg.NActionRQ.MessageID;
+                break;
+        case DIMSE_N_CREATE_RQ:
+                request.msg.NCreateRQ.DataSetType = datasetType;
+                expectedResponse = DIMSE_N_CREATE_RSP;
+                expectedMessageID = request.msg.NCreateRQ.MessageID;
+                break;
+        case DIMSE_N_DELETE_RQ:
+                request.msg.NDeleteRQ.DataSetType = datasetType;
+                expectedResponse = DIMSE_N_DELETE_RSP;
+                expectedMessageID = request.msg.NDeleteRQ.MessageID;
+                break;
+        default:
+                return DIMSE_BADCOMMANDTYPE;
+                /* break; */
+        }
+
+        dumpNMessage(request, rqDataSet, OFTrue);
+        cond = DIMSE_sendMessageUsingMemoryData(assoc, presId, &request, NULL, rqDataSet, NULL, NULL);
+        if (cond.bad()) return cond;
+
+        T_ASC_PresentationContextID thisPresId;
+        T_DIMSE_Message eventReportRsp;
+        DIC_US eventReportStatus;
+        do {
+                thisPresId = presId;
+                statusDetail = NULL;
+                cond = DIMSE_receiveCommand(assoc, blockMode, this->m_timeout, &thisPresId, &response, &statusDetail);
+                if (cond.bad()) return cond;
+
+                if (response.CommandField == DIMSE_N_EVENT_REPORT_RQ) {
+                        /* handle N-EVENT-REPORT-RQ */
+                        rspDataset = NULL;
+                        if (response.msg.NEventReportRQ.DataSetType == DIMSE_DATASET_PRESENT) {
+                                cond = DIMSE_receiveDataSetInMemory(assoc, blockMode, m_timeout, &thisPresId, &rspDataset, NULL, NULL);
+                                if (cond.bad()) return cond;
+                        }
+                        dumpNMessage(response, rspDataset, OFFalse);
+                        // call event handler if registered
+                        eventReportStatus = STATUS_Success;
+                        if (eventHandler) eventReportStatus = eventHandler->handleEvent(response.msg.NEventReportRQ, rspDataset, statusDetail);
+                        if (rspDataset) delete rspDataset;
+                        rspDataset = NULL;
+                        if (statusDetail) delete statusDetail;
+                        statusDetail = NULL;
+
+                        // send back N-EVENT-REPORT-RSP */
+                        eventReportRsp.CommandField = DIMSE_N_EVENT_REPORT_RSP;
+                        eventReportRsp.msg.NEventReportRSP.MessageIDBeingRespondedTo = response.msg.NEventReportRQ.MessageID;
+                        eventReportRsp.msg.NEventReportRSP.EventTypeID = response.msg.NEventReportRQ.EventTypeID;
+                        eventReportRsp.msg.NEventReportRSP.DimseStatus = eventReportStatus;
+                        eventReportRsp.msg.NEventReportRSP.DataSetType = DIMSE_DATASET_NULL;
+                        eventReportRsp.msg.NEventReportRSP.opts = O_NEVENTREPORT_EVENTTYPEID;
+                        eventReportRsp.msg.NEventReportRSP.AffectedSOPClassUID[0] = 0;
+                        eventReportRsp.msg.NEventReportRSP.AffectedSOPInstanceUID[0] = 0;
+                        dumpNMessage(eventReportRsp, NULL, OFTrue);
+                        cond = DIMSE_sendMessageUsingMemoryData(assoc, thisPresId, &eventReportRsp, NULL, NULL, NULL, NULL);
+                        if (cond.bad()) return cond;
+                } else {
+                        /* No N-EVENT-REPORT-RQ. Check if this message is what we expected */
+                        if (response.CommandField != expectedResponse) {
+                                char buf1[256];
+                                sprintf(buf1, "DIMSE: Unexpected Response Command Field: 0x%x", (unsigned)response.CommandField);
+                                return makeDcmnetCondition(DIMSEC_UNEXPECTEDRESPONSE, OF_error, buf1);
+                        }
+                        T_DIMSE_DataSetType responseDataset = DIMSE_DATASET_NULL;
+                        DIC_US responseMessageID = 0;
+                        /** change request to response */
+                        switch(expectedResponse) {
+                        case DIMSE_N_GET_RSP:
+                                responseDataset = response.msg.NGetRSP.DataSetType;
+                                responseMessageID = response.msg.NGetRSP.MessageIDBeingRespondedTo;
+                                break;
+                        case DIMSE_N_SET_RSP:
+                                responseDataset = response.msg.NSetRSP.DataSetType;
+                                responseMessageID = response.msg.NSetRSP.MessageIDBeingRespondedTo;
+                                break;
+                        case DIMSE_N_ACTION_RSP:
+                                responseDataset = response.msg.NActionRSP.DataSetType;
+                                responseMessageID = response.msg.NActionRSP.MessageIDBeingRespondedTo;
+                                break;
+                        case DIMSE_N_CREATE_RSP:
+                                responseDataset = response.msg.NCreateRSP.DataSetType;
+                                responseMessageID = response.msg.NCreateRSP.MessageIDBeingRespondedTo;
+                                break;
+                        case DIMSE_N_DELETE_RSP:
+                                responseDataset = response.msg.NDeleteRSP.DataSetType;
+                                responseMessageID = response.msg.NDeleteRSP.MessageIDBeingRespondedTo;
+                                break;
+                        default: {
+                                char buf1[256];
+                                sprintf(buf1, "DIMSE: Unexpected Response Command Field: 0x%x", (unsigned)response.CommandField);
+                                return makeDcmnetCondition(DIMSEC_UNEXPECTEDRESPONSE, OF_error, buf1);
+                        }
+                                /* break; */
+                        }
+                        if (responseMessageID != expectedMessageID) {
+                                char buf1[256];
+                                sprintf(buf1, "DIMSE: Unexpected Response Command Field: 0x%x", (unsigned)response.CommandField);
+                                return makeDcmnetCondition(DIMSEC_UNEXPECTEDRESPONSE, OF_error, buf1);
+                        }
+                        rspDataset = NULL;
+                        if (responseDataset == DIMSE_DATASET_PRESENT) {
+                                cond = DIMSE_receiveDataSetInMemory(assoc, blockMode, m_timeout, &thisPresId, &rspDataset, NULL, NULL);
+                                if (cond.bad()) return cond;
+                        }
+                        dumpNMessage(response, rspDataset, OFFalse);
+                }
+        } while (response.CommandField == DIMSE_N_EVENT_REPORT_RQ);
+        return EC_Normal;
+}
+
+OFCondition PrintAssociation::createRQ(
+        const char *sopclassUID,
+        OFString& sopinstanceUID,
+        DcmDataset *attributeListIn,
+        Uint16& status,
+        DcmDataset* &attributeListOut)
+{
+        if (assoc == NULL) {
+                return DIMSE_ILLEGALASSOCIATION;
+        }
+        if (sopclassUID==NULL) {
+                return DIMSE_NULLKEY;
+        }
+
+        T_ASC_PresentationContextID presCtx = findAcceptedPC(sopclassUID);
+        if (presCtx == 0) {
+                return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        T_DIMSE_Message request;
+        T_DIMSE_Message response;
+        DcmDataset *statusDetail = NULL;
+
+        // construct N-CREATE-RQ
+        request.CommandField = DIMSE_N_CREATE_RQ;
+        request.msg.NCreateRQ.MessageID = assoc->nextMsgID++;
+        strncpy(request.msg.NCreateRQ.AffectedSOPClassUID, sopclassUID, DIC_UI_LEN);
+        request.msg.NCreateRQ.AffectedSOPClassUID[DIC_UI_LEN] = 0;
+
+        if (sopinstanceUID.size() > 0) {
+                strncpy(request.msg.NCreateRQ.AffectedSOPInstanceUID, sopinstanceUID.c_str(), DIC_UI_LEN);
+                request.msg.NCreateRQ.AffectedSOPInstanceUID[DIC_UI_LEN] = 0;
+                request.msg.NCreateRQ.opts = O_NCREATE_AFFECTEDSOPINSTANCEUID;
+        } else {
+                request.msg.NCreateRQ.AffectedSOPInstanceUID[0] = 0;
+                request.msg.NCreateRQ.opts = 0;
+        }
+
+        OFCondition cond = sendNRequest(presCtx, request, attributeListIn, response, statusDetail, attributeListOut);
+        if (statusDetail) delete statusDetail;
+        if (cond.good()) {
+                status = response.msg.NCreateRSP.DimseStatus;
+                if (status != 0) {
+                        LOG_ERROR(ambitolog, "Error sending create rq status: "<< status);
+                        std::ostringstream ostr;
+                        ostr << "Error sending create rq status: "<< status << " details: ";
+                        DIMSE_printNStatusString(ostr, status);
+                        throw GIL::DICOM::PACSException(ostr.str(), "GIL::PrintAssociation");
+                }
+                // if response contains SOP Instance UID, copy it.
+                if (response.msg.NCreateRSP.opts & O_NCREATE_AFFECTEDSOPINSTANCEUID) {
+                        sopinstanceUID = response.msg.NCreateRSP.AffectedSOPInstanceUID;
+                }
+        }
+        return cond;
+}
+
+OFCondition PrintAssociation::setRQ(
+        const char *sopclassUID,
+        const char *sopinstanceUID,
+        DcmDataset *modificationList,
+        Uint16& status,
+        DcmDataset* &attributeListOut)
+{
+        if (assoc == NULL) {
+                return DIMSE_ILLEGALASSOCIATION;
+        }
+        if ((sopclassUID==NULL)||(sopinstanceUID==NULL)||(modificationList==NULL)) {
+                return DIMSE_NULLKEY;
+        }
+
+        T_ASC_PresentationContextID presCtx = findAcceptedPC(sopclassUID);
+        if (presCtx == 0) {
+                return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        T_DIMSE_Message request;
+        T_DIMSE_Message response;
+        DcmDataset *statusDetail = NULL;
+
+        // construct N-SET-RQ
+        request.CommandField = DIMSE_N_SET_RQ;
+        request.msg.NSetRQ.MessageID = assoc->nextMsgID++;
+        strncpy(request.msg.NSetRQ.RequestedSOPClassUID, sopclassUID, DIC_UI_LEN);
+        request.msg.NSetRQ.RequestedSOPClassUID[DIC_UI_LEN] = 0;
+        strncpy(request.msg.NSetRQ.RequestedSOPInstanceUID, sopinstanceUID, DIC_UI_LEN);
+        request.msg.NSetRQ.RequestedSOPInstanceUID[DIC_UI_LEN] = 0;
+
+        OFCondition cond = sendNRequest(presCtx, request, modificationList, response, statusDetail, attributeListOut);
+        if (cond.good()) status = response.msg.NSetRSP.DimseStatus;
+        if (status != 0) {
+                LOG_ERROR(ambitolog, "Error sending create rq status: "<< status);
+                std::ostringstream ostr;
+                ostr << "Error sending create rq status: "<< status << " details: ";
+                DIMSE_printNStatusString(ostr, status);
+                throw GIL::DICOM::PACSException(ostr.str(), "GIL::PrintAssociation");
+        }
+        if (statusDetail) delete statusDetail;
+        return cond;
+}
+
+OFCondition PrintAssociation::getRQ(
+        const char *sopclassUID,
+        const char *sopinstanceUID,
+        const Uint16 *attributeIdentifierList,
+        ssize_t numShorts,
+        Uint16& status,
+        DcmDataset* &attributeListOut)
+{
+        if (assoc == NULL) {
+                return DIMSE_ILLEGALASSOCIATION;
+        }
+        if ((sopclassUID==NULL)||(sopinstanceUID==NULL)) {
+                return DIMSE_NULLKEY;
+        }
+
+        T_ASC_PresentationContextID presCtx = findAcceptedPC(sopclassUID);
+        if (presCtx == 0) {
+                return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        T_DIMSE_Message request;
+        T_DIMSE_Message response;
+        DcmDataset *statusDetail = NULL;
+
+        // construct N-GET-RQ
+        request.CommandField = DIMSE_N_GET_RQ;
+        request.msg.NGetRQ.MessageID = assoc->nextMsgID++;
+        strncpy(request.msg.NGetRQ.RequestedSOPClassUID, sopclassUID, DIC_UI_LEN);
+        request.msg.NGetRQ.RequestedSOPClassUID[DIC_UI_LEN] = 0;
+        strncpy(request.msg.NGetRQ.RequestedSOPInstanceUID, sopinstanceUID, DIC_UI_LEN);
+        request.msg.NGetRQ.RequestedSOPInstanceUID[DIC_UI_LEN] = 0;
+
+        request.msg.NGetRQ.ListCount = 0;
+        if (attributeIdentifierList) request.msg.NGetRQ.ListCount = (int)numShorts;
+        request.msg.NGetRQ.AttributeIdentifierList = (DIC_US *)attributeIdentifierList;
+
+        OFCondition cond = sendNRequest(presCtx, request, NULL, response, statusDetail, attributeListOut);
+        if (cond.good()) status = response.msg.NGetRSP.DimseStatus;
+        if (status != 0) {
+                LOG_ERROR(ambitolog, "Error sending create rq status: "<< status);
+                std::ostringstream ostr;
+                ostr << "Error sending create rq status: "<< status << " details: ";
+                DIMSE_printNStatusString(ostr, status);
+                throw GIL::DICOM::PACSException(ostr.str(), "GIL::PrintAssociation");
+        }
+        if (statusDetail) delete statusDetail;
+        return cond;
+}
+
+
+OFCondition PrintAssociation::actionRQ(
+        const char *sopclassUID,
+        const char *sopinstanceUID,
+        Uint16 actionTypeID,
+        DcmDataset *actionInformation,
+        Uint16& status,
+        DcmDataset* &actionReply)
+{
+        if (assoc == NULL) {
+                return DIMSE_ILLEGALASSOCIATION;
+        }
+        if ((sopclassUID==NULL)||(sopinstanceUID==NULL)) {
+                return DIMSE_NULLKEY;
+        }
+
+        T_ASC_PresentationContextID presCtx = findAcceptedPC(sopclassUID);
+        if (presCtx == 0) {
+                return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        T_DIMSE_Message request;
+        T_DIMSE_Message response;
+        DcmDataset *statusDetail = NULL;
+
+        // construct N-ACTION-RQ
+        request.CommandField = DIMSE_N_ACTION_RQ;
+        request.msg.NActionRQ.MessageID = assoc->nextMsgID++;
+        strncpy(request.msg.NActionRQ.RequestedSOPClassUID, sopclassUID, DIC_UI_LEN);
+        request.msg.NActionRQ.RequestedSOPClassUID[DIC_UI_LEN] = 0;
+        strncpy(request.msg.NActionRQ.RequestedSOPInstanceUID, sopinstanceUID, DIC_UI_LEN);
+        request.msg.NActionRQ.RequestedSOPInstanceUID[DIC_UI_LEN] = 0;
+        request.msg.NActionRQ.ActionTypeID = (DIC_US)actionTypeID;
+
+        OFCondition cond = sendNRequest(presCtx, request, actionInformation, response, statusDetail, actionReply);
+        if (cond.good()) status = response.msg.NActionRSP.DimseStatus;
+        if (status != 0) {
+                LOG_ERROR(ambitolog, "Error sending create rq status: "<< status);
+                std::ostringstream ostr;
+                ostr << "Error sending create rq status: "<< status << " details: ";
+                DIMSE_printNStatusString(ostr, status);
+                throw GIL::DICOM::PACSException(ostr.str(), "GIL::PrintAssociation");
+        }
+        if (statusDetail) delete statusDetail;
+        return cond;
+}
+
+OFCondition PrintAssociation::deleteRQ(
+        const char *sopclassUID,
+        const char *sopinstanceUID,
+        Uint16& status)
+{
+        if (assoc == NULL) {
+                return DIMSE_ILLEGALASSOCIATION;
+        }
+        if ((sopclassUID==NULL)||(sopinstanceUID==NULL)) {
+                return DIMSE_NULLKEY;
+        }
+
+        T_ASC_PresentationContextID presCtx = findAcceptedPC(sopclassUID);
+        if (presCtx == 0) {
+                return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        T_DIMSE_Message request;
+        T_DIMSE_Message response;
+        DcmDataset *statusDetail = NULL;
+        DcmDataset *attributeListOut = NULL;
+
+        // construct N-DELETE-RQ
+        request.CommandField = DIMSE_N_DELETE_RQ;
+        request.msg.NDeleteRQ.MessageID = assoc->nextMsgID++;
+        strncpy(request.msg.NDeleteRQ.RequestedSOPClassUID, sopclassUID, DIC_UI_LEN);
+        request.msg.NDeleteRQ.RequestedSOPClassUID[DIC_UI_LEN] = 0;
+        strncpy(request.msg.NDeleteRQ.RequestedSOPInstanceUID, sopinstanceUID, DIC_UI_LEN);
+        request.msg.NDeleteRQ.RequestedSOPInstanceUID[DIC_UI_LEN] = 0;
+
+        OFCondition cond = sendNRequest(presCtx, request, NULL, response, statusDetail, attributeListOut);
+        if (cond.good()) status = response.msg.NDeleteRSP.DimseStatus;
+        if (status != 0) {
+                LOG_ERROR(ambitolog, "Error sending create rq status: "<< status);
+                std::ostringstream ostr;
+                ostr << "Error sending create rq status: "<< status << " details: ";
+                DIMSE_printNStatusString(ostr, status);
+                throw GIL::DICOM::PACSException(ostr.str(), "GIL::PrintAssociation");
+        }
+        if (statusDetail) delete statusDetail;
+        if (attributeListOut) delete attributeListOut;  // should never happen
+        return cond;
+}
+
+OFCondition PrintAssociation::releaseAssociation()
+{
+        OFCondition result = EC_Normal;
+        if (assoc) {
+                result = ASC_releaseAssociation(assoc);
+                Drop();
+                Destroy();
+                assoc = NULL;
+        }
+        return result;
+}
+
+OFCondition PrintAssociation::abortAssociation()
+{
+
+        OFCondition result = EC_Normal;
+        if (assoc) {
+                result = ASC_abortAssociation(assoc);
+                Drop();
+                Destroy();
+                assoc =  NULL;
+        }
+        return result;
+}
+
+T_ASC_PresentationContextID PrintAssociation::findAcceptedPC(const char *sopclassuid)
+{
+        if ((assoc==NULL)||(sopclassuid==NULL)) return 0;
+
+        // if the SOP class is one of the Basic Grayscale Print Management Meta SOP Classes,
+        // look for a presentation context for Basic Grayscale Print.
+        OFString sopclass(sopclassuid);
+        if ((sopclass == UID_BasicFilmSessionSOPClass) ||
+            (sopclass == UID_BasicFilmBoxSOPClass) ||
+            (sopclass == UID_BasicGrayscaleImageBoxSOPClass) ||
+            (sopclass == UID_PrinterSOPClass)) sopclassuid = UID_BasicGrayscalePrintManagementMetaSOPClass;
+        return ASC_findAcceptedPresentationContextID(assoc, sopclassuid);
+}
+
+
+OFCondition PrintAssociation::negotiateAssociation(
+        OFBool,
+        OFBool,
+        OFBool)
+{
+        OFCondition cond = EC_Normal;
+        /*
+        if (assoc)
+        {
+        return makeDcmnetCondition(DIMSEC_ILLEGALASSOCIATION, OF_error, "association already in place");
+        }
+
+
+        const char* transferSyntaxes[3];
+        int transferSyntaxCount = 0;
+
+        if (implicitOnly)
+        {
+        transferSyntaxes[0] = UID_LittleEndianImplicitTransferSyntax;
+        transferSyntaxCount = 1;
+        } else {
+        // gLocalByteOrder is defined in dcxfer.h
+        if (gLocalByteOrder == EBO_LittleEndian) {
+          // we are on a little endian machine
+          transferSyntaxes[0] = UID_LittleEndianExplicitTransferSyntax;
+          transferSyntaxes[1] = UID_BigEndianExplicitTransferSyntax;
+        } else {
+          // we are on a big endian machine
+          transferSyntaxes[0] = UID_BigEndianExplicitTransferSyntax;
+          transferSyntaxes[1] = UID_LittleEndianExplicitTransferSyntax;
+        }
+        transferSyntaxes[2] = UID_LittleEndianImplicitTransferSyntax;
+        transferSyntaxCount = 3;
+        }
+
+
+
+
+
+        // create association
+        LOG_INFO( ambitolog, "Requesting Association");
+
+        if (cond.good())
+        {
+        cond = ASC_requestAssociation(Net->GetDcmtkNet(), NULL, &assoc);
+
+        if (cond == DUL_ASSOCIATIONREJECTED)
+        {
+        OFString temp_str;
+        T_ASC_RejectParameters rej;
+        ASC_getRejectParameters(params, &rej);
+        LOG_INFO( ambitolog, "Association Rejected" << OFendl << ASC_printRejectParameters(temp_str, &rej));
+        } else {
+        if (cond.bad())
+        {
+        // if assoc is non-NULL, then params has already been moved into the
+        // assoc structure. Make sure we only delete once!
+        if (assoc) ASC_destroyAssociation(&assoc);
+        else if (params) ASC_destroyAssociationParameters(&params);
+
+        if (net) ASC_dropNetwork(&net);
+        assoc = NULL;
+        net = NULL;
+        return cond;
+        }
+        }
+        }
+
+        if ((cond.good()) && (0 == ASC_findAcceptedPresentationContextID(assoc, UID_BasicGrayscalePrintManagementMetaSOPClass)))
+        {
+        LOG_INFO( ambitolog, "Peer does not support Basic Grayscale Print Management, aborting association.");
+        abortAssociation();
+        cond = DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        if (cond.good())
+        {
+        LOG_INFO( ambitolog, "Association accepted (Max Send PDV: " << assoc->sendPDVLength << ")");
+        } else {
+        // params is now an alias to assoc->params. Don't call ASC_destroyAssociationParameters.
+        if (assoc) ASC_destroyAssociation(&assoc);
+        if (net) ASC_dropNetwork(&net);
+        assoc = NULL;
+        net = NULL;
+        }
+        */
+
+        return cond;
+}
+
+OFBool PrintAssociation::printerSupportsPresentationLUT()
+{
+        if ((assoc)&&(0 != ASC_findAcceptedPresentationContextID(assoc, UID_PresentationLUTSOPClass))) return OFTrue;
+        return OFFalse;
+}
+
+OFBool PrintAssociation::printerSupportsAnnotationBox()
+{
+        if ((assoc)&&(0 != ASC_findAcceptedPresentationContextID(assoc, UID_BasicAnnotationBoxSOPClass))) return OFTrue;
+        return OFFalse;
+}
+
+
+
diff --git a/cadxcore/main/controllers/dcmtk/dicomprintassociation.h b/cadxcore/main/controllers/dcmtk/dicomprintassociation.h
new file mode 100644
index 0000000..60d8eb7
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomprintassociation.h
@@ -0,0 +1,116 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <vector>
+#include <api/autoptr.h>
+#include "dicomassociation.h"
+#include <api/dicom/imodelodicom.h>
+#include <main/controllers/dcmtk/dicomservers.h>
+#include <main/controllers/dcmtk/dicomnetwork.h>
+
+#include <dcmtk/ofstd/ofstream.h>
+#include <dcmtk/ofstd/ofstring.h>      /* for class OFString */
+
+namespace GIL
+{
+namespace DICOM
+{
+class DicomDataset;
+}
+}
+
+class DicomImage;
+
+
+class PrintEventHandler
+{
+public:
+
+        /// destructor
+        virtual ~PrintEventHandler() {}
+
+        /** handles an N-EVENT-REPORT-RQ message. This method is called
+         *  from PrintAssociation whenever an event report is received.
+         *  The event message, information and status detail elements must be copied
+         *  if they should remain valid after the end of this method call.
+         *  The event handler can react on the event message in any implementation
+         *  dependent way, e.g. display the event on-screen.
+         *  @param eventMessage the N-EVENT-REPORT-RQ message
+         *  @param eventInformation event information dataset. May be NULL if no event information available.
+         *  @param statusDetail status detail dataset. ay be NULL if no status detail available.
+         *  @return the status code to be sent back as part of the N-EVENT-REPORT-RSP message, usually STATUS_Success.
+         */
+        virtual DIC_US handleEvent(
+                T_DIMSE_N_EventReportRQ& eventMessage,
+                DcmDataset *eventInformation,
+                DcmDataset *statusDetail)=0;
+};
+
+class PrintAssociation : public Association
+{
+public:
+
+        /**
+         Constructors
+         */
+        PrintAssociation(void* connectionKey, const std::string& ambitolog, GNC::IProxyNotificadorProgreso* pNotificadorProgreso = NULL);
+
+        virtual ~PrintAssociation();
+
+        /**
+         Send a query object (C-Find) through association
+         */
+        OFCondition Print(const GNC::GCS::Ptr<DicomServer>& server, const std::string& local_aet, const GIL::DICOM::DicomDataset& film, const GIL::DICOM::DicomDataset& layout, const GIL::DICOM::DicomDataset& job, const std::list<std::string>& files);
+
+private:
+
+private:
+        GIL::DICOM::DCMTK::Network* Net;
+        std::string                 ambitolog;
+
+protected:
+        GNC::IProxyNotificadorProgreso* m_pNotificadorProgreso;
+
+        virtual void OnAddPresentationContext(T_ASC_Parameters* params);
+
+        T_ASC_PresentationContextID presId;
+private:
+
+        void dumpNMessage(T_DIMSE_Message &msg, DcmItem *dataset, OFBool outgoing);
+        OFCondition sendNRequest( T_ASC_PresentationContextID presId, T_DIMSE_Message &request, DcmDataset *rqDataSet, T_DIMSE_Message &response, DcmDataset* &statusDetail, DcmDataset* &rspDataset);
+        OFCondition createRQ(const char *sopclassUID, OFString& sopinstanceUID, DcmDataset *attributeListIn, Uint16& status, DcmDataset* &attributeListOut);
+        OFCondition setRQ( const char *sopclassUID, const char *sopinstanceUID, DcmDataset *modificationList, Uint16& status, DcmDataset* &attributeListOut);
+        OFCondition getRQ( const char *sopclassUID,  const char *sopinstanceUID,  const Uint16 *attributeIdentifierList, ssize_t numShorts, Uint16& status,  DcmDataset* &attributeListOut);
+        OFCondition actionRQ( const char *sopclassUID,  const char *sopinstanceUID,  Uint16 actionTypeID,  DcmDataset *actionInformation, Uint16& status,  DcmDataset* &actionReply);
+        OFCondition deleteRQ( const char *sopclassUID,  const char *sopinstanceUID,  Uint16& status);
+        OFCondition releaseAssociation();
+        OFCondition abortAssociation();
+        T_ASC_PresentationContextID findAcceptedPC(const char *sopclassuid);
+        OFCondition negotiateAssociation(OFBool negotiatePresentationLUT, OFBool negotiateAnnotationBox, OFBool implicitOnly);
+        OFBool printerSupportsPresentationLUT();
+        OFBool printerSupportsAnnotationBox();
+
+        T_DIMSE_BlockingMode blockMode;
+
+        /// the current event handler. Can be NULL.
+        PrintEventHandler *eventHandler;
+};
diff --git a/cadxcore/main/controllers/dcmtk/dicomservers.cpp b/cadxcore/main/controllers/dcmtk/dicomservers.cpp
new file mode 100644
index 0000000..e0c7423
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomservers.cpp
@@ -0,0 +1,471 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "dicomservers.h"
+#include <iostream>
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/textfile.h>
+#include <wx/dir.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/entorno.h>
+#include <api/globals.h>
+
+WLConfig::WLConfig()
+{
+        this->useAbortMessage = this->useCompletedMessage = this->useInProgressMessage = false;
+        this->useDICOMMPPS = true;
+
+        GNC::GCS::Permisos::EstadoPermiso perm = GNC::GCS::IControladorPermisos::Instance()->Get("gnkwl.messages", "inprogress");
+        if (perm) {
+                this->inProgressTemplate = perm.GetRawValue();
+        }
+        perm = GNC::GCS::IControladorPermisos::Instance()->Get("gnkwl.messages", "completed");
+        if (perm) {
+                this->completedTemplate = perm.GetRawValue();
+        }
+        perm = GNC::GCS::IControladorPermisos::Instance()->Get("gnkwl.messages", "abort");
+        if (perm) {
+                this->abortTemplate = perm.GetRawValue();
+        }
+}
+
+WLConfig::WLConfig( const WLConfig& o)
+{
+        *this = o;
+}
+
+WLConfig& WLConfig::operator=(const WLConfig& o)
+{
+        this->abortTemplate = o.abortTemplate;
+        this->completedTemplate = o.completedTemplate;
+        this->inProgressTemplate = o.inProgressTemplate;
+        this->useAbortMessage = o.useAbortMessage;
+        this->useCompletedMessage = o.useCompletedMessage;
+        this->useInProgressMessage = o.useInProgressMessage;
+        this->useDICOMMPPS = o.useDICOMMPPS;
+        return *this;
+}
+
+WLConfig::~WLConfig()
+{
+}
+
+DicomServer::DicomServer(const std::string& pID, const std::string& pAET, const std::string& pHostName, int pPort, int pLossy, bool pIsDefault, int pPDU, bool pUseTLS,
+                         const std::string& pPacsUser, const std::string& pPacsPass, TRetrieveMethod pRetrieveMethod, const std::string& pWadoURI, bool pRetrSeries,
+                         bool pReuseConnection, bool pVerify, const std::string& pCert, const std::string& pKey, const std::string& pDefaultCharset) :
+        ID(pID),
+        AET(pAET),
+        HostName(pHostName),
+        Port(pPort),
+        PDU(pPDU),
+        Lossy(pLossy),
+        isDefault(pIsDefault),
+        retrieveMethod(pRetrieveMethod),
+        wadoURI(pWadoURI),
+        reuseConnection(pReuseConnection),
+        retrieveSeries(pRetrSeries),
+        useTLS(pUseTLS),
+        pacsUser(pPacsUser),
+        pacsPass(pPacsPass),
+        verifyCredentials(pVerify),
+        certificate(pCert),
+        privateKey(pKey),
+        defaultCharset(pDefaultCharset)
+{
+}
+
+/**local server constructor*/
+DicomServer::DicomServer(const std::string& pID, const std::string& pAET, const std::string& pHostName, int pPort, int pPDU) :
+        ID(pID),
+        AET(pAET),
+        HostName(pHostName),
+        Port(pPort),
+        PDU(pPDU),
+        Lossy(0),
+        isDefault(false),
+        retrieveMethod(DicomServer::GET),
+        wadoURI("/wado"),
+        reuseConnection(true),
+        retrieveSeries(true),
+        useTLS(false),
+        pacsUser(""),
+        pacsPass(""),
+        verifyCredentials(false),
+        certificate(""),
+        privateKey(""),
+        defaultCharset("ISO_IR 100")
+{
+}
+
+/**
+default constructor
+*/
+DicomServer::DicomServer() :
+        ID(""),
+        AET(""),
+        HostName(""),
+        Port(11112),
+        PDU(16384),
+        Lossy(0),
+        isDefault(false),
+        retrieveMethod(DicomServer::GET),
+        wadoURI("/wado"),
+        reuseConnection(true),
+        retrieveSeries(true),
+        useTLS(false),
+        pacsUser(""),
+        pacsPass(""),
+        verifyCredentials(false),
+        certificate(""),
+        privateKey(""),
+        defaultCharset("ISO_IR 100")
+{
+}
+
+DicomServer::DicomServer( const DicomServer& o)
+{
+        *this = o;
+}
+
+DicomServer::~DicomServer()
+{ }
+
+DicomServer& DicomServer::operator=(const DicomServer& o)
+{
+        this->ID = o.ID;
+        this->AET = o.AET;
+        this->HostName = o.HostName;
+        this->Port = o.Port;
+        this->Lossy = o.Lossy;
+        this->isDefault = o.isDefault;
+        this->PDU = o.PDU;
+        this->useTLS = o.useTLS;
+        this->pacsUser = o.pacsUser;
+        this->pacsPass = o.pacsPass;
+        this->retrieveMethod = o.retrieveMethod;
+        this->wadoURI = o.wadoURI;
+        this->reuseConnection = o.reuseConnection;
+        this->retrieveSeries = o.retrieveSeries;
+        this->verifyCredentials = o.verifyCredentials;
+        this->certificate = o.certificate;
+        this->privateKey = o.privateKey;
+        this->defaultCharset = o.defaultCharset;
+        this->wlConfig = o.wlConfig;
+        return *this;
+}
+
+const std::string& DicomServer::GetID()
+{
+        return ID;
+}
+
+const std::string& DicomServer::GetAET()
+{
+        return AET;
+}
+
+const std::string& DicomServer::GetHostName()
+{
+        return HostName;
+}
+
+int DicomServer::GetPort()
+{
+        return Port;
+}
+
+int DicomServer::GetLossy()
+{
+        return Lossy;
+}
+
+bool DicomServer::GetIsDefault()
+{
+        return isDefault;
+}
+
+int DicomServer::GetPDU()
+{
+        return PDU;
+}
+
+bool DicomServer::GetUseTLS()
+{
+        return useTLS;
+}
+
+const std::string& DicomServer::GetPACSUser()
+{
+        return pacsUser;
+}
+
+const std::string& DicomServer::GetPACSPass()
+{
+        return pacsPass;
+}
+
+DicomServer::TRetrieveMethod DicomServer::GetRetrieveMethod()
+{
+        return retrieveMethod;
+}
+
+bool DicomServer::GetRetrieveSeries()
+{
+        return retrieveSeries;
+}
+
+bool DicomServer::GetReuseConnection()
+{
+        return reuseConnection;
+}
+
+bool DicomServer::GetverifyCredentials()
+{
+        return verifyCredentials;
+}
+
+const std::string& DicomServer::GetCertificate()
+{
+        return certificate;
+}
+
+const std::string& DicomServer::GetPrivateKey()
+{
+        return privateKey;
+}
+
+const std::string& DicomServer::GetDefaultCharset()
+{
+        return defaultCharset;
+}
+
+const std::string& DicomServer::GetWADOURI()
+{
+        return wadoURI;
+}
+
+WLConfig& DicomServer::GetWlConfig()
+{
+        return wlConfig;
+}
+
+/////////////////////////////////////////////////////////////////////
+
+DicomServerList* DicomServerList::m_pInstance = 0;
+
+DicomServerList::DicomServerList()
+{
+        Reload();
+}
+
+DicomServerList::~DicomServerList()
+{
+        GNC::GCS::ILocker lock(this);
+        ServerMap.clear();
+}
+
+DicomServerList* DicomServerList::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new DicomServerList();
+        }
+        return m_pInstance;
+}
+
+void DicomServerList::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = 0;
+        }
+
+}
+
+void DicomServerList::AddServer(const DicomServer& newServer, bool isDefault)
+{
+        GNC::GCS::ILocker lock(this);
+        if (isDefault) {
+                for (TServerMap::iterator it = ServerMap.begin(); it != ServerMap.end(); ++it) {
+                        (*it).second->isDefault = false;
+                }
+        }
+        if (ServerMap.find(newServer.ID) != ServerMap.end()) {
+                *ServerMap[newServer.ID] = newServer;
+                ServerMap[newServer.ID]->isDefault = isDefault;
+        } else {
+                GNC::GCS::Ptr<DicomServer> pNewServer(new DicomServer(newServer));
+                pNewServer->isDefault = isDefault;
+                ServerMap[newServer.ID] = pNewServer;
+        }
+}
+
+bool DicomServerList::TieneServer(const std::string& ID)
+{
+        GNC::GCS::Ptr<DicomServer> server = GetServer(ID);
+        return server.IsValid();
+}
+
+const GNC::GCS::Ptr<DicomServer>& DicomServerList::GetServer(const std::string& ID)
+{
+        GNC::GCS::ILocker lock(this);
+        if (ServerMap.find(ID) != ServerMap.end()) {
+                return ServerMap[ID];
+        } else {
+                GNC::GCS::Ptr<DicomServer> server;
+                throw GinkgoNoServerFoundException();
+        }
+}
+
+const GNC::GCS::Ptr<DicomServer>& DicomServerList::GetLocalServer()
+{
+        if (!LocalServer.IsValid()) {
+                throw GinkgoNoServerFoundException();
+        }
+        return LocalServer;
+}
+
+bool DicomServerList::Empty()
+{
+        return ServerMap.empty();
+}
+
+DicomServerList::TServerList DicomServerList::GetServerList()
+{
+        GNC::GCS::ILocker lock(this);
+        TServerList listOfServers;
+        for (TServerMap::iterator it = ServerMap.begin(); it != ServerMap.end(); ++it) {
+                listOfServers.push_back((*it).second);
+        }
+        return listOfServers;
+}
+
+const GNC::GCS::Ptr<DicomServer>& DicomServerList::GetDefaultServer()
+{
+        GNC::GCS::ILocker lock(this);
+        for (TServerMap::iterator it = ServerMap.begin(); it != ServerMap.end(); ++it) {
+                if ((*it).second->isDefault) {
+                        return (*it).second;
+                }
+        }
+        if (!ServerMap.empty()) {
+                return (*ServerMap.begin()).second;
+        } else {
+                throw GinkgoNoServerFoundException();
+        }
+}
+
+void DicomServerList::SetDefaultServer(const std::string& ID)
+{
+        GNC::GCS::ILocker lock(this);
+        for (TServerMap::iterator it = ServerMap.begin(); it != ServerMap.end(); ++it) {
+                if ((*it).second->ID != ID) {
+                        (*it).second->isDefault = false;
+                } else {
+                        (*it).second->isDefault = true;
+                }
+        }
+}
+
+void DicomServerList::Reload()
+{
+        GNC::GCS::ILocker lock(this);
+        ServerMap.clear();
+
+        GNC::GCS::ConfigurationController::TListGroups servers;
+        GNC::GCS::ConfigurationController::Instance()->readGroupGeneral("/GinkgoCore/PACS/Servidores", servers);
+
+        bool existDefault = false;
+        for (GNC::GCS::ConfigurationController::TListGroups::iterator it = servers.begin(); it != servers.end(); ++it) {
+                GNC::GCS::ConfigurationController::TMapValues& values = (*it);
+                std::string id, aet, host;
+                int port, pdu;
+                values.readStringValue("Identificador", id);
+                values.readStringValue("AET", aet);
+                values.readStringValue("Host", host);
+                values.readIntValue("Puerto", port);
+                values.readIntValue("PDU", pdu, DEFAULT_PDU_LENGTH);
+
+                GNC::GCS::Ptr<DicomServer> server(new DicomServer(id, aet, host, port, pdu));
+                values.readBoolValue("isDefault",server->isDefault,false);
+                values.readBoolValue("useTLS",server->useTLS,false);
+                values.readStringValue("pacsUser", server->pacsUser);
+                values.readStringValue("pacsPass", server->pacsPass);
+                values.readBoolValue("verifyCredentials",server->verifyCredentials,false);
+                values.readStringValue("certificate", server->certificate);
+                values.readStringValue("privateKey", server->privateKey);
+                int tmpInt;
+                if (values.readIntValue("retrieveMethod", tmpInt)) {
+                        server->retrieveMethod = (DicomServer::TRetrieveMethod)tmpInt;
+                } else {
+                        //retro compatibility
+                        bool tmpBool;
+                        values.readBoolValue("retrieveWithMove",tmpBool,true);
+                        if (tmpBool) {
+                                server->retrieveMethod = DicomServer::MOVE;
+                        } else {
+                                server->retrieveMethod = DicomServer::GET;
+                        }
+                }
+                //
+                values.readStringValue("wadoURI", server->wadoURI, "");
+                values.readBoolValue("reuseConnection", server->reuseConnection, false);
+                values.readBoolValue("retrieveSeries",server->retrieveSeries,true);
+                values.readStringValue("defaultCharset", server->defaultCharset, "ISO_IR 100");
+
+                //wl...
+                values.readBoolValue("useDICOMMPPS",server->GetWlConfig().useDICOMMPPS, server->GetWlConfig().useDICOMMPPS);
+                values.readBoolValue("useAbortMessage",server->GetWlConfig().useAbortMessage, server->GetWlConfig().useAbortMessage);
+                values.readBoolValue("useCompletedMessage",server->GetWlConfig().useCompletedMessage, server->GetWlConfig().useCompletedMessage);
+                values.readBoolValue("useInProgressMessage",server->GetWlConfig().useInProgressMessage, server->GetWlConfig().useInProgressMessage);
+                values.readStringValue("abortTemplate",server->GetWlConfig().abortTemplate, server->GetWlConfig().abortTemplate);
+                values.readStringValue("completedTemplate",server->GetWlConfig().completedTemplate, server->GetWlConfig().completedTemplate);
+                values.readStringValue("inProgressTemplate",server->GetWlConfig().inProgressTemplate, server->GetWlConfig().inProgressTemplate);
+                //
+
+                ServerMap[server->ID] = server;
+                existDefault = existDefault || server->isDefault;
+        }
+
+        if (!existDefault && !ServerMap.empty()) {
+                ServerMap.begin()->second->isDefault = true;
+        }
+
+        //local server
+        //se actualiza el fichero de configuracion
+        int port;
+        GNC::GCS::ConfigurationController::Instance()->readIntGeneral("/GinkgoCore/PACS/Local", "Puerto", port, 11112);
+        std::string localAet = GNC::Entorno::Instance()->GetDicomLocalAET();
+
+        LocalServer = new DicomServer("ginkgo",localAet, "localhost", port, 16384);
+        GNC::GCS::ConfigurationController::Instance()->readBoolGeneral("/GinkgoCore/PACS/Local", "useTLS", LocalServer->useTLS, false);
+        GNC::GCS::ConfigurationController::Instance()->readBoolGeneral("/GinkgoCore/PACS/Local", "verifyCredentials", LocalServer->verifyCredentials, false);
+#ifdef GINKGO_PRIVATE_KEY
+        LocalServer->privateKey = GINKGO_PRIVATE_KEY;
+#endif
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/PACS/Local", "privateKey", LocalServer->privateKey);
+
+#ifdef GINKGO_PUBLIC_KEY
+        LocalServer->certificate = GINKGO_PUBLIC_KEY;
+#endif
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/PACS/Local", "certificate", LocalServer->certificate);
+}
+
diff --git a/cadxcore/main/controllers/dcmtk/dicomservers.h b/cadxcore/main/controllers/dcmtk/dicomservers.h
new file mode 100644
index 0000000..ffac1e3
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomservers.h
@@ -0,0 +1,183 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <string>
+#include <vector>
+#include <map>
+
+#include <api/api.h>
+#include <api/autoptr.h>
+#include <api/ilock.h>
+#include <api/internationalization/internationalization.h>
+#include <api/iexception.h>
+
+
+//estas constantes vienen dadas por dcmtk
+#define DEFAULT_PDU_LENGTH 16384
+#define MAX_PDU_LENGTH 131072
+#define MIN_PDU_LENGTH 4096
+
+namespace GNC
+{
+namespace GCS
+{
+class IEntorno;
+}
+}
+
+class GinkgoNoServerFoundException : public GNC::GCS::IException
+{
+public:
+        GinkgoNoServerFoundException() throw() : GNC::GCS::IException(_Std("Server not found"), "DICOM", false) {}
+};
+
+class WLConfig
+{
+public:
+        WLConfig();
+        WLConfig( const WLConfig& o);
+        WLConfig& operator=(const WLConfig& o);
+        ~WLConfig();
+
+
+        bool useDICOMMPPS;
+        bool useAbortMessage;
+        std::string abortTemplate;
+        bool useCompletedMessage;
+        std::string completedTemplate;
+        bool useInProgressMessage;
+        std::string inProgressTemplate;
+};
+
+class DicomServer
+{
+public:
+        typedef enum TRetrieveMethod {
+                MOVE = 0,
+                GET,
+                WADO
+        } TRetrieveMethod;
+        /* Constructor with all parameters*/
+        DicomServer(const std::string& ID, const std::string& AET, const std::string& HostName, int port, int Lossy, bool isDefault, int PDU, bool useTLS, const std::string& pacsUser, const std::string& pacsPass, TRetrieveMethod retrieveMethod, const std::string& wadoURI, bool retrSeries, bool reuseConnection, bool verify, const std::string& cert, const std::string& key, const std::string& defaultCharset) ;
+
+        /**local server constructor*/
+        DicomServer(const std::string& ID, const std::string& AET, const std::string& HostName, int port, int PDU) ;
+        /**
+        default constructor
+        */
+        DicomServer();
+
+        DicomServer( const DicomServer& o);
+
+        ~DicomServer();
+
+        DicomServer& operator=(const DicomServer& o);
+
+        const std::string& GetID();
+
+        const std::string& GetAET();
+
+        const std::string& GetHostName();
+
+        int GetPort();
+
+        int GetLossy();
+
+        bool GetIsDefault() ;
+
+        int GetPDU();
+
+        bool GetUseTLS();
+
+        const std::string& GetPACSUser();
+
+        const std::string& GetPACSPass();
+
+        TRetrieveMethod GetRetrieveMethod();
+
+        bool GetRetrieveSeries();
+
+        bool GetReuseConnection();
+
+        bool GetverifyCredentials();
+
+        const std::string& GetCertificate();
+
+        const std::string& GetPrivateKey();
+
+        const std::string& GetDefaultCharset();
+
+        const std::string& GetWADOURI() ;
+
+        WLConfig& GetWlConfig() ;
+
+        std::string ID;
+        std::string AET;
+        std::string HostName;
+        int  Port;
+        int  PDU;
+        int  Lossy;
+        bool isDefault;
+
+        WLConfig wlConfig;
+
+        TRetrieveMethod retrieveMethod;
+        std::string wadoURI;
+        bool reuseConnection;
+        bool retrieveSeries;
+        bool useTLS;
+        std::string pacsUser;
+        std::string pacsPass;
+        bool verifyCredentials;
+        std::string certificate;
+        std::string privateKey;
+        std::string defaultCharset;
+};
+
+class EXTAPI DicomServerList: public GNC::GCS::ILockable
+{
+public:
+        typedef std::list<GNC::GCS::Ptr<DicomServer> > TServerList;
+        typedef std::map<std::string, GNC::GCS::Ptr<DicomServer> > TServerMap;
+
+        static DicomServerList* Instance();
+        static void FreeInstance();
+
+        void AddServer(const DicomServer& server, bool isDefault);
+        bool TieneServer(const std::string& ID);
+        const GNC::GCS::Ptr<DicomServer>& GetLocalServer();
+        const GNC::GCS::Ptr<DicomServer>& GetServer(const std::string& ID);
+        const GNC::GCS::Ptr<DicomServer>& GetDefaultServer();
+        void SetDefaultServer(const std::string& ID);
+        bool Empty();
+        TServerList GetServerList();
+        void Reload();
+
+protected:
+        DicomServerList();
+        ~DicomServerList();
+        TServerMap ServerMap;
+        GNC::GCS::Ptr<DicomServer> LocalServer;
+
+protected:
+        static DicomServerList *m_pInstance;
+};
diff --git a/cadxcore/main/controllers/dcmtk/dicomservice.cpp b/cadxcore/main/controllers/dcmtk/dicomservice.cpp
new file mode 100644
index 0000000..45122eb
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomservice.cpp
@@ -0,0 +1,330 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "dicomservice.h"
+#include "dicomnetwork.h"
+#include <api/controllers/icontroladorlog.h>
+#include <api/internationalization/internationalization.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/configurationcontroller.h>
+#include <commands/incomingdicomassociationcommand.h>
+
+
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+#include <dcmtk/dcmdata/dcdeftag.h>
+#include <dcmtk/dcmdata/dcuid.h>     /* for dcmtk version name */
+#include <dcmtk/dcmjpeg/djdecode.h>  /* for dcmjpeg decoders */
+#include <dcmtk/dcmjpeg/djencode.h>  /* for dcmjpeg encoders */
+#include <dcmtk/dcmjpeg/djrplol.h>   /* for DJ_RPLossless */
+#include <dcmtk/dcmjpeg/djrploss.h>  /* for DJ_RPLossy */
+#include <dcmtk/dcmjpeg/dipijpeg.h>  /* for dcmimage JPEG plugin */
+#include <dcmtk/dcmimage/diregist.h>  /* include to support color images */
+#include <dcmtk/ofstd/ofcmdln.h>
+#include <dcmtk/dcmnet/diutil.h>
+
+#include <dcmtk/dcmjpeg/djencode.h>
+#include <dcmtk/dcmjpeg/djdecode.h>
+#include <dcmtk/dcmjpeg/djrplol.h>
+#include <dcmtk/dcmjpeg/djrploss.h>
+
+#include "tls/tls.h"
+#include "tls/gtlslayer.h"
+#include <dcmtk/dcmtls/tlstrans.h>
+
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+GIL::DICOM::Service::Service(const std::string& _ambitolog) :
+        GNC::GCS::Thread(_ambitolog),
+        ambitolog(_ambitolog),
+        m_pNotificadorProgreso(NULL),
+        m_acceptorPort(11111),
+        m_timeout(15),
+        m_Role(RT_Acceptor),
+        m_TLS(false),
+        m_UseUserPass(false),
+        m_Validate(false),
+        m_WantToStop(false)
+{
+        GNC::GCS::ConfigurationController::Instance()->readIntGeneral("/GinkgoCore/PACS/Local", "Puerto", m_acceptorPort, 11112);
+        this->m_pNet = NULL;
+        this->m_pTLSLayer = NULL;
+
+        this->m_rcvPDUSize = 16384;
+        this->m_sendPDUSize = 16384;
+
+        this->m_rcvTimeout = 60;
+        this->m_pollTimeout = 100;
+        this->m_ServiceThreadId = 0;
+
+}
+
+GIL::DICOM::Service::~Service()
+{
+        // drop an existing association on shutdown
+        GNC::GCS::ILocker lock(lockerRunning);
+        m_pNotificadorProgreso = NULL;
+}
+
+OFCondition GIL::DICOM::Service::Start()
+{
+        m_WantToStop = false;
+
+        OFCondition cond;
+
+        switch (m_Role) {
+        case RT_Acceptor:
+                cond = ASC_initializeNetwork(NET_ACCEPTOR, m_acceptorPort, m_timeout, &m_pNet);
+                break;
+        case RT_Requestor:
+                cond = ASC_initializeNetwork(NET_REQUESTOR, 0, m_timeout, &m_pNet);
+                break;
+        case RT_AcceptorRequestor:
+                cond = ASC_initializeNetwork(NET_ACCEPTORREQUESTOR, m_acceptorPort, m_timeout, &m_pNet);
+                break;
+        default:
+                return EC_IllegalParameter;
+        }
+
+        if (cond.bad()) {
+                LOG_ERROR(ambitolog, "Unable to initialize network, check port " << m_acceptorPort << " is not in use" );
+                return cond;
+        }
+
+        if (m_pTLSLayer != NULL) {
+                delete m_pTLSLayer;
+        }
+
+        if (m_TLS) {
+                m_pTLSLayer = new GTLSTransportLayer(DICOM_APPLICATION_REQUESTOR, NULL);
+                if (m_pTLSLayer == NULL) {
+                        LOG_ERROR(ambitolog, _Std("Unable to create TLS transport layer"));
+                        //return 1;
+                        return EC_IllegalParameter;
+                }
+                m_pTLSLayer->setCertificateFromString(GetCliCert());
+                m_pTLSLayer->setPrivateKeyFromString(GetCliKey());
+
+                if (! m_pTLSLayer->checkPrivateKeyMatchesCertificate()) {
+                        LOG_ERROR(ambitolog, _Std("Private key and Certificate do not match"));
+                        return EC_IllegalParameter;
+                }
+
+                m_pTLSLayer->addSystemTrustedCertificates();
+
+                if (GetValidate()) {
+                        m_pTLSLayer->setCertificateVerification(DCV_requireCertificate);
+                } else {
+                        m_pTLSLayer->setCertificateVerification(DCV_ignoreCertificate);
+                }
+                /*
+                if (opt_dhparam && ! (tLayer->setTempDHParameters(opt_dhparam)))
+                {
+                LOG_WARN(assoc->ambitolog, "unable to load temporary DH parameters. Ignoring");
+                }
+                */
+
+                cond = ASC_setTransportLayer(m_pNet, m_pTLSLayer, 0);
+                if (cond.bad()) {
+                        LOG_ERROR(ambitolog, _Std("Error setting TLS layer: ") << cond.text());
+                        return EC_IllegalParameter;
+                }
+        }
+
+        //TODO LEAK DICOM SERVICE
+        m_ServiceThreadId = GNC::GCS::ThreadController::Launch(this, false);
+
+        return EC_Normal;
+}
+
+void* GIL::DICOM::Service::Task()
+{
+        OFCondition cond = EC_Normal;
+        OFString temp_str;
+
+
+        GNC::GCS::ILocker lock(lockerRunning);
+        try {
+                while (!m_WantToStop && cond.good()) {
+                        cond = acceptAssociation();
+                }
+
+                cond = ASC_dropNetwork(&m_pNet);
+
+                if (cond.bad()) {
+                        LOG_ERROR(ambitolog, DimseCondition::dump(temp_str, cond));
+                        return NULL;
+                }
+        } catch (...) {
+                LOG_ERROR("DicomService", "Dicom service terminated with exceptions");
+        }
+
+        return 0;
+
+}
+
+OFCondition GIL::DICOM::Service::acceptAssociation()
+{
+
+
+        T_ASC_Association *assoc = NULL;
+        OFCondition cond;
+        OFString sprofile;
+        OFString temp_str;
+
+        {
+                GNC::GCS::ILocker lock(lockerRunning);
+                cond = ASC_receiveAssociation(m_pNet, &assoc, m_rcvPDUSize, NULL, NULL, m_TLS, DUL_NOBLOCK, 1);
+        }
+
+        // if some kind of error occured, take care of it
+        if (cond.bad()) {
+                // If something distinct noassociationrequest was wrong we might have to dump an error message.
+                if( cond != DUL_NOASSOCIATIONREQUEST ) {
+                        LOG_ERROR(ambitolog, _Std("Receiving Association failed: ") << DimseCondition::dump(temp_str, cond).c_str());
+                }
+
+                // no matter what kind of error occurred, we need to do a cleanup
+                goto cleanup;
+        }
+        {
+                char buf[BUFSIZ];
+
+                LOG_INFO(ambitolog, _Std("Association received"));
+                LOG_DEBUG(ambitolog, _Std("Parameters:") << std::endl << ASC_dumpParameters(temp_str, assoc->params, ASC_ASSOC_RQ).c_str());
+
+                const GIL::DICOM::SOPClassMap& scps = GIL::DICOM::Conformance::GetScpSOPClasses();
+
+                for (GIL::DICOM::SOPClassMap::const_iterator it = scps.begin(); cond.good() && it != scps.end(); ++it) {
+                        GIL::DICOM::ArrayHelper transfersyntaxes(scps.GetSupportedTransferSyntaxUIDs((*it).first));
+                        const char* scuid = (*it).second.scUID.c_str();
+                        cond = ASC_acceptContextsWithPreferredTransferSyntaxes(assoc->params, &scuid, 1, transfersyntaxes.array, transfersyntaxes.size);
+                        transfersyntaxes.free();
+                }
+
+                if (cond.bad()) {
+                        LOG_ERROR(ambitolog, DimseCondition::dump(temp_str, cond).c_str());
+                        goto cleanup;
+                }
+
+                // set our app title
+                ASC_setAPTitles(assoc->params, NULL, NULL, m_localAET.c_str());
+
+                // acknowledge or reject this association
+                cond = ASC_getApplicationContextName(assoc->params, buf);
+                if ((cond.bad()) || strcmp(buf, UID_StandardApplicationContext) != 0) {
+                        // reject: the application context name is not supported
+                        T_ASC_RejectParameters rej = {
+                                ASC_RESULT_REJECTEDPERMANENT,
+                                ASC_SOURCE_SERVICEUSER,
+                                ASC_REASON_SU_APPCONTEXTNAMENOTSUPPORTED
+                        };
+
+                        LOG_ERROR(ambitolog, _Std("Association Rejected: Bad Application Context Name: ") << buf);
+                        cond = ASC_rejectAssociation(assoc, &rej);
+                        if (cond.bad()) {
+                                LOG_DEBUG(ambitolog, DimseCondition::dump(temp_str, cond).c_str());
+                        }
+                        goto cleanup;
+
+                } else if (strlen(assoc->params->theirImplementationClassUID) == 0) {
+                        // reject: the no implementation Class UID provided
+                        T_ASC_RejectParameters rej = {
+                                ASC_RESULT_REJECTEDPERMANENT,
+                                ASC_SOURCE_SERVICEUSER,
+                                ASC_REASON_SU_NOREASON
+                        };
+
+                        LOG_ERROR(ambitolog, _Std("Association Rejected: No Implementation Class UID provided") );
+                        cond = ASC_rejectAssociation(assoc, &rej);
+                        if (cond.bad()) {
+                                LOG_DEBUG(ambitolog, DimseCondition::dump(temp_str, cond).c_str());
+                        }
+                        goto cleanup;
+                } else {
+                        cond = ASC_acknowledgeAssociation(assoc);
+                        if (cond.bad()) {
+                                LOG_ERROR(ambitolog, DimseCondition::dump(temp_str, cond).c_str());
+                                goto cleanup;
+                        }
+                        LOG_DEBUG(ambitolog, _Std("Association Acknowledged (Max Send PDV: ") << assoc->sendPDVLength << _Std(")"));
+                        if (ASC_countAcceptedPresentationContexts(assoc->params) == 0) {
+                                LOG_WARN(ambitolog, _Std("No valid presentation contexts"));
+                        }
+                        // dump the presentation contexts which have been accepted/refused
+                        LOG_DEBUG(ambitolog, ASC_dumpParameters(temp_str, assoc->params, ASC_ASSOC_AC).c_str());
+
+                        std::string cmdName;
+                        {
+                                std::ostringstream os;
+                                os << _Std("Association(dicom://") << assoc->params->DULparams.callingPresentationAddress << _Std("@") << assoc->params->DULparams.callingAPTitle << _Std(")");
+                                cmdName = os.str();
+                        }
+
+                        GADAPI::PACS::IncomingDicomAssociationCommandParams* pCmdParams = new GADAPI::PACS::IncomingDicomAssociationCommandParams(assoc);
+                        GNC::GCS::ICommandController::Instance()->ProcessAsync( cmdName, new GADAPI::PACS::IncomingDicomAssociationCommand(pCmdParams, cmdName), this);
+
+                        return cond;
+                }
+        }
+
+
+cleanup:
+
+        cond = ASC_dropSCPAssociation(assoc);
+        if (cond.bad()) {
+                LOG_FATAL(ambitolog, DimseCondition::dump(temp_str, cond).c_str());
+        }
+
+        cond = ASC_destroyAssociation(&assoc);
+        if (cond.bad()) {
+                LOG_FATAL(ambitolog, DimseCondition::dump(temp_str, cond).c_str());
+        }
+
+        return cond;
+}
+
+
+void GIL::DICOM::Service::Stop()
+{
+
+        GNC::GCS::ICommandController::Instance()->AbortarComandosDeOwner(this);
+        m_WantToStop = true;
+
+        GNC::GCS::ILocker lock(lockerRunning);
+
+        if (m_pNet != NULL && m_pNet->network != NULL) {
+                int sock = DUL_networkSocket(m_pNet->network);
+                if (sock != -1) {
+#if defined(_WINDOWS)
+                        shutdown(sock, SD_BOTH);
+#else
+                        shutdown(sock, 2);
+#endif
+                }
+        }
+}
diff --git a/cadxcore/main/controllers/dcmtk/dicomservice.h b/cadxcore/main/controllers/dcmtk/dicomservice.h
new file mode 100644
index 0000000..0073b4e
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomservice.h
@@ -0,0 +1,230 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/threads/thread.h>
+#include <api/dicom/idicomconformance.h>
+#include <api/iproxynotificadorprogreso.h>
+
+#include "helpers.h"
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/dcmnet/cond.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+#include <atomic>
+
+struct T_ASC_Network;
+
+class GTLSTransportLayer;
+class wxSemaphore;
+
+namespace GIL
+{
+namespace DICOM
+{
+
+class Service : public GNC::GCS::Thread
+{
+public:
+
+        typedef enum RoleType {
+                RT_Acceptor,
+                RT_Requestor,
+                RT_AcceptorRequestor
+        } RoleType;
+
+        std::string ambitolog;
+
+        GNC::IProxyNotificadorProgreso* m_pNotificadorProgreso;
+        /**
+        Constructors
+        */
+
+        Service(const std::string& ambitolog);
+        virtual ~Service();
+
+        void Destroy();
+
+        OFCondition Start();
+
+        void Stop();
+
+        virtual void* Task();
+
+        OFCondition acceptAssociation();
+
+        /*Set notificador de progreso*/
+        void SetNotificadorProgreso(GNC::IProxyNotificadorProgreso* pNotificadorProgreso)
+        {
+
+                m_pNotificadorProgreso = pNotificadorProgreso;
+        }
+
+
+        bool NotificarProgreso(float progresoNormalizado, std::string& texto)
+        {
+                if(m_pNotificadorProgreso!=NULL) {
+                        return m_pNotificadorProgreso->NotificarProgreso(progresoNormalizado,texto);
+                }
+                return true;
+        }
+
+
+        /**
+        Drop the association
+        */
+        OFCondition Drop(OFCondition cond = EC_Normal);
+
+        RoleType GetRole() const
+        {
+                return m_Role;
+        }
+
+        void SetRole(RoleType role)
+        {
+                m_Role = role;
+        }
+
+        void SetLocalAET(const std::string& localAET)
+        {
+                this->m_localAET = localAET;
+        }
+
+        const std::string& GetLocalAET() const
+        {
+                return m_localAET;
+        }
+
+        void SetAcceptorPort(unsigned short port)
+        {
+                m_acceptorPort = port;
+        }
+
+        unsigned short GetAcceptorPort() const
+        {
+                return m_acceptorPort;
+        }
+
+        void SetTimeout(int timeout)
+        {
+                m_timeout = timeout;
+        }
+
+        int GetTimeout() const
+        {
+                return m_timeout;
+        }
+
+        unsigned long GetTid() const
+        {
+                return m_ServiceThreadId;
+        }
+
+        void SetTLS(const std::string& CliCert, const std::string& CliKey, bool validate)
+        {
+                m_TLS = true;
+                m_CliCert = CliCert;
+                m_CliKey = CliKey;
+                m_Validate = validate;
+        }
+
+        bool IsSecure() const
+        {
+                return m_TLS;
+        }
+
+        //http://support.dcmtk.org/wiki/dcmtk/howto/useridentitynegotiation
+        void SetUserPass(const std::string& PacsUser, const std::string& PacsPass)
+        {
+                m_UseUserPass = true;
+                m_pacsUser = PacsUser, m_pacsPass = PacsPass;
+        }
+        bool UseUserPass()
+        {
+                return m_UseUserPass;
+        }
+        const std::string& GetUser()
+        {
+                return m_pacsUser;
+        }
+        const std::string& GetPass()
+        {
+                return m_pacsPass;
+        }
+
+        const std::string& GetCliCert() const
+        {
+                return m_CliCert;
+        }
+        const std::string& GetCliKey() const
+        {
+                return m_CliKey;
+        }
+        bool GetValidate() const
+        {
+                return m_Validate;
+        }
+
+protected:
+
+        /**
+        Protected data
+        */
+
+        std::string m_localAET;
+
+        int  m_acceptorPort;
+        int  m_timeout;
+
+        T_ASC_Network*      m_pNet;
+        GTLSTransportLayer* m_pTLSLayer;
+
+        RoleType        m_Role;
+        GNC::GCS::ILockable lockerRunning;
+
+
+        int m_rcvTimeout;
+        int m_pollTimeout;
+        int m_rcvPDUSize;
+        int m_sendPDUSize;
+
+        bool m_TLS;
+        bool m_UseUserPass;
+        std::string m_pacsUser;
+        std::string m_pacsPass;
+        std::string m_CliCert;
+        std::string m_CliKey;
+        bool m_Validate;
+
+        unsigned long m_ServiceThreadId;
+
+        std::atomic<bool> m_WantToStop;
+};
+}
+}
diff --git a/cadxcore/main/controllers/dcmtk/dicomstoreassociation.cpp b/cadxcore/main/controllers/dcmtk/dicomstoreassociation.cpp
new file mode 100644
index 0000000..4c89fea
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomstoreassociation.cpp
@@ -0,0 +1,1390 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#define LOGGER "C-STORE"
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+// For sime reason dcmtk-3.6.1-20150924 has an hiccup in
+// dcmth/oflog/  logger.h and logmacro.h
+// since they are not used we define the include guards here
+#define DCMTK_LOG4CPLUS_TRACELOGGER_H
+#define DCMTK_LOG4CPLUS_LOGGING_MACROS_HEADER_
+
+
+#include "dicomstoreassociation.h"
+#include <api/dicom/imodelodicom.h>
+
+#include <api/iproxynotificadorprogreso.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/entorno.h>
+#include <iostream>
+
+#include <main/controllers/dcmtk/dicomservers.h>
+
+#include <dcmtk/ofstd/ofstring.h>
+#include <dcmtk/dcmnet/dimse.h>
+#include <dcmtk/dcmnet/diutil.h>
+#include <dcmtk/dcmdata/dcdatset.h>
+#include <dcmtk/dcmdata/dcmetinf.h>
+#include <dcmtk/dcmdata/dcfilefo.h>
+//#include <dcmtk/dcmdata/dcdebug.h>
+#include <dcmtk/dcmdata/dcuid.h>
+#include <dcmtk/dcmdata/dcdict.h>
+#include <dcmtk/dcmdata/dcdeftag.h>
+//#include "cmdlnarg.h"
+#include <dcmtk/ofstd/ofconapp.h>
+#include <dcmtk/dcmdata/dcuid.h>     /* for dcmtk version name */
+#include <dcmtk/dcmnet/dicom.h>     /* for DICOM_APPLICATION_REQUESTOR */
+#include <dcmtk/dcmdata/dcostrmz.h>  /* for dcmZlibCompressionLevel */
+#include <dcmtk/dcmnet/dcasccfg.h>  /* for class DcmAssociationConfiguration */
+#include <dcmtk/dcmnet/dcasccff.h>  /* for class DcmAssociationConfigurationFile */
+
+#include <dcmtk/dcmjpeg/djencode.h>  /* for dcmjpeg encoders */
+#include <dcmtk/dcmjpeg/djdecode.h>  /* for dcmjpeg encoders */
+#include <dcmtk/dcmdata/dcrledrg.h>  /* for DcmRLEDecoderRegistration */
+#include <dcmtk/dcmdata/dcrleerg.h>  /* for DcmRLEEncoderRegistration */
+#include <dcmtk/dcmjpeg/djrploss.h>
+#include <dcmtk/dcmjpeg/djrplol.h>
+#include <dcmtk/dcmdata/dcpixel.h>
+#include <dcmtk/dcmdata/dcrlerp.h>
+
+#include "tls/tls.h"
+#include "tls/gtlslayer.h"
+#include <dcmtk/dcmtls/tlstrans.h>
+
+#include "helpercompresion.h"
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/dcmtk/ginkgouid.h>
+#include "helpers.h"
+
+#include <wx/filename.h>
+#include <sstream>
+
+/////////////////////-------------------------DEFINES--------------------/////////////////
+
+namespace GIL
+{
+namespace DICOM
+{
+
+/* default application titles */
+#define APPLICATIONTITLE        "GINKGO"
+#define PEERAPPLICATIONTITLE    "DCM4CHEE"
+
+static OFBool opt_verbose = OFTrue;
+static OFBool opt_showPresentationContexts = OFTrue;
+static OFBool opt_debug = OFTrue;
+static OFBool opt_abortAssociation = OFFalse;
+static OFCmdUnsignedInt opt_maxReceivePDULength = ASC_DEFAULTMAXPDU;
+//static OFCmdUnsignedInt opt_maxSendPDULength = 0;
+static E_TransferSyntax opt_networkTransferSyntax = EXS_LittleEndianExplicit;
+
+//static OFBool opt_haltOnUnsuccessfulStore = OFTrue;
+static OFBool opt_haltOnUnsuccessfulStore = OFFalse;
+static OFBool unsuccessfulStoreEncountered = OFFalse;
+static std::string errorEncontrado;
+int lastStatusCode = STATUS_Success;
+
+static OFBool opt_proposeOnlyRequiredPresentationContexts = OFFalse;
+static OFBool opt_combineProposedTransferSyntaxes = OFFalse;
+
+static OFCmdUnsignedInt opt_repeatCount = 1;
+static OFCmdUnsignedInt opt_inventPatientCount = 25;
+static OFCmdUnsignedInt opt_inventStudyCount = 50;
+static OFCmdUnsignedInt opt_inventSeriesCount = 100;
+static OFBool opt_inventSOPInstanceInformation = OFFalse;
+static OFBool opt_correctUIDPadding = OFFalse;
+static OFString patientNamePrefix("OFFIS^TEST_PN_");   // PatientName is PN (maximum 16 chars)
+static OFString patientIDPrefix("PID_"); // PatientID is LO (maximum 64 chars)
+static OFString studyIDPrefix("SID_");   // StudyID is SH (maximum 16 chars)
+static OFString accessionNumberPrefix;  // AccessionNumber is SH (maximum 16 chars)
+//static OFBool opt_secureConnection = OFFalse; /* default: no secure connection */
+//static const char *opt_configFile = NULL;
+//static const char *opt_profileName = NULL;
+T_DIMSE_BlockingMode opt_blockMode = DIMSE_NONBLOCKING;
+int opt_dimse_timeout = 0;
+int opt_acse_timeout = 30;
+int opt_Quality = 100;
+
+//cancelacion
+
+typedef struct _StoreCallbackInfo {
+        T_ASC_Association* assoc;
+} GetCallbackInfo;
+
+//progreso
+static GNC::IProxyNotificadorProgreso* m_pNotificadorProgreso = NULL;
+static std::string m_mensaje("");
+typedef struct TMedida {
+        time_t m_instante;
+        int bytesDescargados;
+        float oldTasa;
+        TMedida()
+        {
+                m_instante = time(NULL);
+                bytesDescargados = 0;
+                oldTasa = 0.0f;
+        }
+} TMedida;
+static TMedida m_medida;
+
+float TasaTransferencia(int bytesDescargados)
+{
+        time_t nuevoInstante = time(NULL);
+        const double tiempo = difftime(nuevoInstante,m_medida.m_instante);
+        if(tiempo>0.15f) {
+                if(bytesDescargados > m_medida.bytesDescargados) {
+                        const double bytesRecibidosPeriodo = bytesDescargados - m_medida.bytesDescargados;
+                        m_medida.oldTasa = ( ((float)bytesRecibidosPeriodo/1024.0f)/tiempo );
+                        m_medida.bytesDescargados = bytesDescargados;
+                        m_medida.m_instante = nuevoInstante;
+                }
+        }
+        return m_medida.oldTasa;
+}
+
+void ResetearMedida(bool clearTasa = false)
+{
+        m_medida.bytesDescargados =-1;
+        m_medida.m_instante = time(NULL);
+        if(clearTasa) {
+                m_medida.oldTasa=0.0f;
+        }
+}
+
+static void errmsg(const std::string& mensaje, bool parar)
+{
+        LOG_ERROR(LOGGER,mensaje);
+        if(parar) {
+                throw GIL::DICOM::PACSException(mensaje);
+        }
+}
+
+/*
+ static void
+ errmsg(const OFString& message, bool parar)
+ {
+ std::string mensaje(message.c_str());
+ errmsg(mensaje,parar);
+ }
+ */
+
+static OFBool isaListMember(OFList<OFString>& lst, OFString& s)
+{
+        OFListIterator(OFString) cur = lst.begin();
+        OFListIterator(OFString) end = lst.end();
+
+        OFBool found = OFFalse;
+
+        while (cur != end && !found) {
+
+                found = (s == *cur);
+
+                ++cur;
+        }
+
+        return found;
+}
+
+static OFCondition addPresentationContext(T_ASC_Parameters *params,
+                int presentationContextId, const OFString& abstractSyntax,
+                const OFString& transferSyntax,
+                T_ASC_SC_ROLE proposedRole = ASC_SC_ROLE_DEFAULT)
+{
+        const char* c_p = transferSyntax.c_str();
+        OFCondition cond = ASC_addPresentationContext(params, presentationContextId,
+                           abstractSyntax.c_str(), &c_p, 1, proposedRole);
+        return cond;
+}
+
+static OFCondition addPresentationContext(T_ASC_Parameters *params,
+                int presentationContextId, const OFString& abstractSyntax,
+                const OFList<OFString>& transferSyntaxList,
+                T_ASC_SC_ROLE proposedRole = ASC_SC_ROLE_DEFAULT)
+{
+        // create an array of supported/possible transfer syntaxes
+        const char** transferSyntaxes = new const char*[transferSyntaxList.size()];
+        int transferSyntaxCount = 0;
+        OFListConstIterator(OFString) s_cur = transferSyntaxList.begin();
+        OFListConstIterator(OFString) s_end = transferSyntaxList.end();
+        while (s_cur != s_end) {
+                transferSyntaxes[transferSyntaxCount++] = (*s_cur).c_str();
+                ++s_cur;
+        }
+
+        OFCondition cond = ASC_addPresentationContext(params, presentationContextId,
+                           abstractSyntax.c_str(), transferSyntaxes, transferSyntaxCount, proposedRole);
+
+        delete[] transferSyntaxes;
+        return cond;
+}
+
+static OFCondition addStoragePresentationContexts(T_ASC_Parameters *params, OFList<OFString>& sopClasses)
+{
+        /*
+         * Each SOP Class will be proposed in two presentation contexts (unless
+         * the opt_combineProposedTransferSyntaxes global variable is true).
+         * The command line specified a preferred transfer syntax to use.
+         * This prefered transfer syntax will be proposed in one
+         * presentation context and a set of alternative (fallback) transfer
+         * syntaxes will be proposed in a different presentation context.
+         *
+         * Generally, we prefer to use Explicitly encoded transfer syntaxes
+         * and if running on a Little Endian machine we prefer
+         * LittleEndianExplicitTransferSyntax to BigEndianTransferSyntax.
+         * Some SCP implementations will just select the first transfer
+         * syntax they support (this is not part of the standard) so
+         * organise the proposed transfer syntaxes to take advantage
+         * of such behaviour.
+         */
+
+        // Which transfer syntax was preferred on the command line
+        OFString preferredTransferSyntax;
+        if (opt_networkTransferSyntax == EXS_Unknown) {
+                /* gLocalByteOrder is defined in dcxfer.h */
+                if (gLocalByteOrder == EBO_LittleEndian) {
+                        /* we are on a little endian machine */
+                        preferredTransferSyntax = UID_LittleEndianExplicitTransferSyntax;
+                } else {
+                        /* we are on a big endian machine */
+                        preferredTransferSyntax = UID_BigEndianExplicitTransferSyntax;
+                }
+        } else {
+                DcmXfer xfer(opt_networkTransferSyntax);
+                preferredTransferSyntax = xfer.getXferID();
+        }
+
+        OFListIterator(OFString) s_cur;
+        OFListIterator(OFString) s_end;
+
+
+        OFList<OFString> fallbackSyntaxes;
+        fallbackSyntaxes.push_back(UID_LittleEndianExplicitTransferSyntax);
+        fallbackSyntaxes.push_back(UID_BigEndianExplicitTransferSyntax);
+        fallbackSyntaxes.push_back(UID_LittleEndianImplicitTransferSyntax);
+        // Remove the preferred syntax from the fallback list
+        fallbackSyntaxes.remove(preferredTransferSyntax);
+        // If little endian implicit is preferred then we don't need any fallback syntaxes
+        // because it is the default transfer syntax and all applications must support it.
+        if (opt_networkTransferSyntax == EXS_LittleEndianImplicit) {
+                fallbackSyntaxes.clear();
+        }
+
+        // created a list of transfer syntaxes combined from the preferred and fallback syntaxes
+        OFList<OFString> combinedSyntaxes;
+        s_cur = fallbackSyntaxes.begin();
+        s_end = fallbackSyntaxes.end();
+        combinedSyntaxes.push_back(preferredTransferSyntax);
+        while (s_cur != s_end) {
+                if (!isaListMember(combinedSyntaxes, *s_cur)) combinedSyntaxes.push_back(*s_cur);
+                ++s_cur;
+        }
+
+        if (!opt_proposeOnlyRequiredPresentationContexts) {
+                // add the (short list of) known storage sop classes to the list
+                // the array of Storage SOP Class UIDs comes from dcuid.h
+
+                //FIXME: ÑAPA HECHA PARA QUE PUEDA SUBIR VIDEOS(EL -1 Y EL PUSH DE DESPUES)
+                for (int i=0; i<numberOfDcmShortSCUStorageSOPClassUIDs-1; i++) {
+                        sopClasses.push_back(dcmShortSCUStorageSOPClassUIDs[i]);
+                }
+                //	UID_VideoPhotographicImageStorage
+                sopClasses.push_back("1.2.840.10008.5.1.4.1.1.77.1.4.1");
+        }
+
+        // thin out the sop classes to remove any duplicates.
+        OFList<OFString> sops;
+        s_cur = sopClasses.begin();
+        s_end = sopClasses.end();
+        while (s_cur != s_end) {
+                if (!isaListMember(sops, *s_cur)) {
+                        sops.push_back(*s_cur);
+                }
+                ++s_cur;
+        }
+
+        // add a presentations context for each sop class / transfer syntax pair
+        OFCondition cond = EC_Normal;
+        int pid = 1; // presentation context id
+        s_cur = sops.begin();
+        s_end = sops.end();
+        while (s_cur != s_end && cond.good()) {
+
+                if (pid > 255) {
+                        LOG_WARN("C-GET", "Too many PresentationContexts setted");
+                        return cond;
+                }
+
+                if (opt_combineProposedTransferSyntaxes) {
+                        cond = addPresentationContext(params, pid, *s_cur, combinedSyntaxes);
+                        pid += 2;   /* only odd presentation context id's */
+                } else {
+
+                        // sop class with preferred transfer syntax
+                        cond = addPresentationContext(params, pid, *s_cur, preferredTransferSyntax);
+                        pid += 2;   /* only odd presentation context id's */
+
+                        if (fallbackSyntaxes.size() > 0) {
+                                if (pid > 255) {
+                                        //errmsg("Demasiados contextos de presentacion");
+                                        return ASC_BADPRESENTATIONCONTEXTID;
+                                }
+
+                                // sop class with fallback transfer syntax
+                                cond = addPresentationContext(params, pid, *s_cur, fallbackSyntaxes);
+                                pid += 2;       /* only odd presentation context id's */
+                        }
+                }
+                ++s_cur;
+        }
+
+        return cond;
+}
+
+static OFString intToString(int i)
+{
+        char numbuf[32];
+        sprintf(numbuf, "%d", i);
+        return numbuf;
+}
+
+static int secondsSince1970()
+{
+        time_t t = time(NULL);
+        return (int)t;
+}
+
+static OFBool updateStringAttributeValue(DcmItem* dataset, const DcmTagKey& key, OFString& value)
+{
+        DcmStack stack;
+        DcmTag tag(key);
+
+        OFCondition cond = EC_Normal;
+        cond = dataset->search(key, stack, ESM_fromHere, OFFalse);
+        if (cond != EC_Normal) {
+                LOG_DEBUG(LOGGER,"error: updateStringAttributeValue: cannot find: " << tag.getTagName() << " " << key << ": "<< cond.text());
+                return OFFalse;
+        }
+
+        DcmElement* elem = (DcmElement*) stack.top();
+
+        DcmVR vr(elem->ident());
+        if (elem->getLength() > vr.getMaxValueLength()) {
+                LOG_DEBUG(LOGGER,"error: updateStringAttributeValue: INTERNAL ERROR: " << tag.getTagName()<< " " << key << ": value too large (max "<< vr.getMaxValueLength() << ") for " << vr.getVRName() << " value: " << value );
+                return OFFalse;
+        }
+
+        cond = elem->putOFStringArray(value);
+        if (cond != EC_Normal) {
+                LOG_DEBUG(LOGGER, "error: updateStringAttributeValue: cannot put string in attribute: " << tag.getTagName()<< " " << key << ": "<< cond.text());
+                return OFFalse;
+        }
+
+        return OFTrue;
+}
+
+static void replaceSOPInstanceInformation(DcmDataset* dataset)
+{
+        static OFCmdUnsignedInt patientCounter = 0;
+        static OFCmdUnsignedInt studyCounter = 0;
+        static OFCmdUnsignedInt seriesCounter = 0;
+        static OFCmdUnsignedInt imageCounter = 0;
+        static OFString seriesInstanceUID;
+        static OFString seriesNumber;
+        static OFString studyInstanceUID;
+        static OFString studyID;
+        static OFString accessionNumber;
+        static OFString patientID;
+        static OFString patientName;
+
+        if (seriesInstanceUID.length() == 0) seriesInstanceUID = GIL::DICOM::MakeUID(GIL::DICOM::GUID_SeriesRoot, (int)seriesCounter).c_str();
+        if (seriesNumber.length() == 0) seriesNumber = intToString((int)seriesCounter);
+        if (studyInstanceUID.length() == 0) studyInstanceUID = GIL::DICOM::MakeUID(GIL::DICOM::GUID_StudyRoot, (int)studyCounter).c_str();
+        if (studyID.length() == 0) studyID = studyIDPrefix + intToString((int)secondsSince1970()) + intToString((int)studyCounter);
+        if (accessionNumber.length() == 0) accessionNumber = accessionNumberPrefix + intToString(secondsSince1970()) + intToString((int)studyCounter);
+        if (patientID.length() == 0) patientID = patientIDPrefix + intToString(secondsSince1970()) + intToString((int)patientCounter);
+        if (patientName.length() == 0) patientName = patientNamePrefix + intToString(secondsSince1970()) + intToString((int)patientCounter);
+
+        if (imageCounter >= opt_inventSeriesCount) {
+                imageCounter = 0;
+                seriesCounter++;
+                seriesInstanceUID = GIL::DICOM::MakeUID(GIL::DICOM::GUID_SeriesRoot, (int)seriesCounter).c_str();
+                seriesNumber = intToString((int)seriesCounter);
+        }
+        if (seriesCounter >= opt_inventStudyCount) {
+                seriesCounter = 0;
+                studyCounter++;
+                studyInstanceUID = GIL::DICOM::MakeUID(GIL::DICOM::GUID_StudyRoot, (int)studyCounter).c_str();
+                studyID = studyIDPrefix + intToString(secondsSince1970()) + intToString((int)studyCounter);
+                accessionNumber = accessionNumberPrefix + intToString(secondsSince1970()) + intToString((int)studyCounter);
+        }
+        if (studyCounter >= opt_inventPatientCount) {
+                // we create as many patients as necessary */
+                studyCounter = 0;
+                patientCounter++;
+                patientID = patientIDPrefix + intToString(secondsSince1970()) + intToString((int)patientCounter);
+                patientName = patientNamePrefix + intToString(secondsSince1970()) + intToString((int)patientCounter);
+        }
+
+        OFString sopInstanceUID = GIL::DICOM::MakeUID(GIL::DICOM::GUID_InstanceRoot, (int)imageCounter).c_str();
+        OFString imageNumber = intToString((int)imageCounter);
+
+        if (opt_debug) {
+                LOG_DEBUG(LOGGER, "Inventing Identifying Information (" <<
+                          "pa" << patientCounter << ", st" << studyCounter <<
+                          ", se" << seriesCounter << ", im" << imageCounter << "): " << std::endl
+                          << "  PatientName=" << patientName << std::endl
+                          << "  PatientID=" << patientID << std::endl
+                          << "  StudyInstanceUID=" << studyInstanceUID << std::endl
+                          << "  StudyID=" << studyID << std::endl
+                          << "  SeriesInstanceUID=" << seriesInstanceUID << std::endl
+                          << "  SeriesNumber=" << seriesNumber << std::endl
+                          << "  SOPInstanceUID=" << sopInstanceUID << std::endl
+                          << "  ImageNumber=" << imageNumber << std::endl);
+        }
+
+        updateStringAttributeValue(dataset, DCM_PatientName, patientName);
+        updateStringAttributeValue(dataset, DCM_PatientID, patientID);
+        updateStringAttributeValue(dataset, DCM_StudyInstanceUID, studyInstanceUID);
+        updateStringAttributeValue(dataset, DCM_StudyID, studyID);
+        updateStringAttributeValue(dataset, DCM_SeriesInstanceUID, seriesInstanceUID);
+        updateStringAttributeValue(dataset, DCM_SeriesNumber, seriesNumber);
+        updateStringAttributeValue(dataset, DCM_SOPInstanceUID, sopInstanceUID);
+        updateStringAttributeValue(dataset, DCM_InstanceNumber, imageNumber);
+
+        imageCounter++;
+}
+
+// Conversión de transferencias
+// coverity[PASS_BY_VALUE] (GW: assuming this was done intentional)
+static OFBool decompressFile(DcmFileFormat fileformat, const char * fname, const char *outfname)
+{
+        OFBool status = true;
+        OFCondition cond;
+        DcmXfer filexfer(fileformat.getDataset()->getOriginalXfer());
+
+        if (filexfer.getXfer() == EXS_JPEG2000LosslessOnly || filexfer.getXfer() == EXS_JPEG2000) {
+                status = DecompressJPEG2000(fname, outfname);
+                LOG_WARN(LOGGER,"The file is being uncompressed from JPG2000. Some tags could be lost");
+        } else {
+
+                DcmDataset *dataset = fileformat.getDataset();
+
+                // decompress data set if compressed
+                dataset->chooseRepresentation(EXS_LittleEndianExplicit, NULL);
+
+                // check if everything went well
+                if (dataset->canWriteXfer(EXS_LittleEndianExplicit)) {
+                        fileformat.loadAllDataIntoMemory();
+                        unlink( outfname);
+                        cond = fileformat.saveFile( outfname, EXS_LittleEndianExplicit);
+                        status =  (cond.good()) ? true : false;
+                } else
+                        status = false;
+        }
+
+
+        return status;
+}
+
+// coverity[PASS_BY_VALUE] (GW: assuming this was done intentional)
+static OFBool compressFile(DcmFileFormat fileformat, const char * fname, const char *outfname)
+{
+        OFCondition cond;
+        OFBool status = true;
+        DcmXfer filexfer(fileformat.getDataset()->getOriginalXfer());
+
+
+        if (opt_networkTransferSyntax == EXS_JPEG2000) {
+                status = CompressJPEG2000(fname, outfname);
+                LOG_WARN(LOGGER,"Se ha comprimido a JPEG2000, podrían perderse algunos tags");
+        } else if  (opt_networkTransferSyntax == EXS_JPEG2000LosslessOnly) {
+                status = CompressJPEG2000(fname, outfname);
+                LOG_WARN(LOGGER,"Se ha comprimido a JPEG2000, podrían perderse algunos tags");
+        } else {
+                DcmDataset *dataset = fileformat.getDataset();
+                DcmItem *metaInfo = fileformat.getMetaInfo();
+                DcmRepresentationParameter *params;
+                DJ_RPLossy lossyParams(opt_Quality);
+                DcmRLERepresentationParameter rleParams;
+                DJ_RPLossless losslessParams; // codec parameters, we use the defaults
+                if (opt_networkTransferSyntax == EXS_JPEGProcess14SV1)
+                        params = &losslessParams;
+                else if (opt_networkTransferSyntax == EXS_JPEGProcess2_4)
+                        params = &lossyParams;
+                else if (opt_networkTransferSyntax == EXS_RLELossless)
+                        params = &rleParams;
+                else
+                        params = &losslessParams;
+
+
+                // this causes the lossless JPEG version of the dataset to be created
+                dataset->chooseRepresentation(opt_networkTransferSyntax, params);
+
+                // check if everything went well
+                if (dataset->canWriteXfer(opt_networkTransferSyntax)) {
+                        // force the meta-header UIDs to be re-generated when storing the file
+                        // since the UIDs in the data set may have changed
+                        delete metaInfo->remove(DCM_MediaStorageSOPClassUID);
+                        delete metaInfo->remove(DCM_MediaStorageSOPInstanceUID);
+
+                        // store in lossless JPEG format
+
+                        fileformat.loadAllDataIntoMemory();
+
+                        unlink( outfname);
+
+                        cond = fileformat.saveFile( outfname, opt_networkTransferSyntax);
+                        status =  (cond.good()) ? true : false;
+                } else {
+                        status = false;
+                }
+        }
+
+        return status;
+}
+
+
+static long seed = 0;
+
+
+static OFCondition storeSCU(T_ASC_Association * assoc, const char *fname)
+/*
+ * This function will read all the information from the given file,
+ * figure out a corresponding presentation context which will be used
+ * to transmit the information over the network to the SCP, and it
+ * will finally initiate the transmission of all data to the SCP.
+ *
+ * Parameters:
+ *   assoc - [in] The association (network connection to another DICOM application).
+ *   fname - [in] Name of the file which shall be processed.
+ */
+{
+        DIC_US msgId = assoc->nextMsgID++;
+        T_ASC_PresentationContextID presId;
+        T_DIMSE_C_StoreRQ req;
+        T_DIMSE_C_StoreRSP rsp;
+        DIC_UI sopClass;
+        DIC_UI sopInstance;
+        std::ostringstream outfnameStringStream;
+        _StoreCallbackInfo storeCallbackData;
+
+        outfnameStringStream << GNC::Entorno::Instance()->GetGinkgoTempDir().c_str() << (char) wxFileName::GetPathSeparator(wxPATH_NATIVE) << seed++ << ".dcm";
+
+        std::string outfname = outfnameStringStream.str();
+
+        LOG_DEBUG(LOGGER, "tempfile: [" << outfname.c_str() << "]" );
+
+        //sprintf( outfname, "%s%ld.dcm",  "D:\\temp\\", seed++);
+
+        unsuccessfulStoreEncountered = OFTrue; // assumption
+
+        if (opt_debug) {
+                LOG_DEBUG(LOGGER, "--------------------------\nSending file: "<< fname);
+        }
+
+        /* read information from file. After the call to DcmFileFormat::loadFile(...) the information */
+        /* which is encapsulated in the file will be available through the DcmFileFormat object. */
+        /* In detail, it will be available through calls to DcmFileFormat::getMetaInfo() (for */
+        /* meta header information) and DcmFileFormat::getDataset() (for data set information). */
+        DcmFileFormat dcmff;
+        OFCondition cond = dcmff.loadFile(fname);
+
+        /* NO LO PONEMOS A FUEGO COMPRIMIMOS Y DESCOMPRIMIMOS
+         opt_networkTransferSyntax = dcmff.getDataset()->getOriginalXfer();
+         */
+
+        /* figure out if an error occured while the file was read*/
+        if (cond.bad()) {
+                LOG_DEBUG(LOGGER, "Bad DICOM file " << fname);
+                return cond;
+        }
+
+        /* if required, invent new SOP instance information for the current data set (user option) */
+        if (opt_inventSOPInstanceInformation) {
+                replaceSOPInstanceInformation(dcmff.getDataset());
+        }
+
+        /* figure out which SOP class and SOP instance is encapsulated in the file */
+        if (!DU_findSOPClassAndInstanceInDataSet(dcmff.getDataset(),
+                        sopClass, sopInstance, opt_correctUIDPadding)) {
+                LOG_DEBUG(LOGGER, "No SOP Class & Instance UIDs in file " << fname);
+                return DIMSE_BADDATA;
+        }
+
+        /* figure out which of the accepted presentation contexts should be used */
+        DcmXfer filexfer(dcmff.getDataset()->getOriginalXfer());
+
+        /* special case: if the file uses an unencapsulated transfer syntax (uncompressed
+         * or deflated explicit VR) and we prefer deflated explicit VR, then try
+         * to find a presentation context for deflated explicit VR first.
+         */
+        if (filexfer.isNotEncapsulated() &&
+            opt_networkTransferSyntax == EXS_DeflatedLittleEndianExplicit) {
+                filexfer = EXS_DeflatedLittleEndianExplicit;
+        }
+
+
+        /************* do on the fly conversion here*********************/
+
+        //printf("on the fly conversion\n");
+        //we have a valid presentation ID,.Chaeck and see if file is consistent with it
+        DcmXfer preferredXfer(opt_networkTransferSyntax);
+
+        OFBool status = false;
+        presId = ASC_findAcceptedPresentationContextID(assoc, sopClass, preferredXfer.getXferID());
+        T_ASC_PresentationContext pc;
+        ASC_findAcceptedPresentationContext(assoc->params, presId, &pc);
+        DcmXfer proposedTransfer(pc.acceptedTransferSyntax);
+
+        status = true;
+
+        if (presId != 0) {
+                if (filexfer.isNotEncapsulated() && proposedTransfer.isNotEncapsulated()) {
+                        // do nothing
+                        status = true;
+                } else if (filexfer.isEncapsulated() && proposedTransfer.isNotEncapsulated()) {
+                        status = decompressFile(dcmff, fname, outfname.c_str());
+                } else if (filexfer.isNotEncapsulated() && proposedTransfer.isEncapsulated()) {
+                        status = compressFile(dcmff, fname, outfname.c_str());
+                } else if (filexfer.getXfer() != opt_networkTransferSyntax) {
+                        // The file is already compressed, we will re-compress the file.....
+                        //E_TransferSyntax fileTS = filexfer.getXfer();
+
+                        if( (filexfer.getXfer() == EXS_JPEG2000LosslessOnly && preferredXfer.getXfer() == EXS_JPEG2000) ||
+                            (filexfer.getXfer() == EXS_JPEG2000 && preferredXfer.getXfer() == EXS_JPEG2000LosslessOnly)) {
+                        } else {
+                                LOG_WARN(LOGGER,"Recompressing files that are already compressed, you should optimize your ts parameters to avoid this: presentation for syntax:" << dcmFindNameOfUID(filexfer.getXferID()) << " -> " << dcmFindNameOfUID(preferredXfer.getXferID()));
+                        }
+                        status = compressFile(dcmff, fname, outfname.c_str());
+                }
+        } else
+                status = false;
+
+
+        if (status) {
+                cond = 	dcmff.loadFile( outfname.c_str());
+                filexfer = dcmff.getDataset()->getOriginalXfer();
+
+                /* figure out which SOP class and SOP instance is encapsulated in the file */
+                if (!DU_findSOPClassAndInstanceInDataSet(dcmff.getDataset(),
+                                sopClass, sopInstance, opt_correctUIDPadding)) {
+                        LOG_DEBUG(LOGGER, "No SOP Class & Instance UIDs in file " << outfname);
+                        return DIMSE_BADDATA;
+                }
+
+                fname = outfname.c_str();
+        } else {
+                const char *modalityName = dcmSOPClassUIDToModality(sopClass);
+                if (!modalityName) modalityName = dcmFindNameOfUID(sopClass);
+                if (!modalityName) modalityName = "unknown SOP class";
+                LOG_DEBUG(LOGGER, "No presentation context for:  " << modalityName << "  "<< sopClass);
+                std::ostringstream ostr;
+                ostr << _Std("Ginkgo CADx is unable to compress from ") << filexfer.getXferName() << _Std(" to ") << proposedTransfer.getXferName();
+                errmsg(ostr.str(),true);
+                return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        if (filexfer.getXfer() != EXS_Unknown)
+                presId = ASC_findAcceptedPresentationContextID(assoc, sopClass, filexfer.getXferID());
+        else
+                presId = ASC_findAcceptedPresentationContextID(assoc, sopClass);
+
+        if (presId == 0) {
+                const char *modalityName = dcmSOPClassUIDToModality(sopClass);
+                if (!modalityName) modalityName = dcmFindNameOfUID(sopClass);
+                if (!modalityName) modalityName = "unknown SOP class";
+                LOG_DEBUG(LOGGER, "No presentation context for:  " << modalityName << "  "<< sopClass);
+                return DIMSE_NOVALIDPRESENTATIONCONTEXTID;
+        }
+
+        /* if required, dump general information concerning transfer syntaxes */
+        if (opt_verbose) {
+                DcmXfer fileTransfer(dcmff.getDataset()->getOriginalXfer());
+                T_ASC_PresentationContext pc;
+                ASC_findAcceptedPresentationContext(assoc->params, presId, &pc);
+                DcmXfer netTransfer(pc.acceptedTransferSyntax);
+                LOG_DEBUG(LOGGER,"Transfer " << dcmFindNameOfUID(fileTransfer.getXferID()) << " -> " << dcmFindNameOfUID(netTransfer.getXferID()));
+        }
+
+        /* prepare the transmission of data */
+        bzero((char*)&req, sizeof(req));
+        req.MessageID = msgId;
+        strcpy(req.AffectedSOPClassUID, sopClass);
+        strcpy(req.AffectedSOPInstanceUID, sopInstance);
+        req.DataSetType = DIMSE_DATASET_PRESENT;
+        req.Priority = DIMSE_PRIORITY_LOW;
+
+        /* if required, dump some more general information */
+        if (opt_debug) {
+                LOG_DEBUG(LOGGER,"Store SCU RQ: MsgID (" <<msgId <<") "<< dcmSOPClassUIDToModality(sopClass));
+        }
+
+        /* finally conduct transmission of data */
+        {
+                storeCallbackData.assoc = assoc;
+                DcmDataset *statusDetail = NULL;
+                cond = DIMSE_storeUser(assoc, presId, &req,
+                                       NULL, dcmff.getDataset(), GIL::DICOM::DicomStoreAssociation::progressCallback, &storeCallbackData,
+                                       opt_blockMode, opt_dimse_timeout,
+                                       &rsp, &statusDetail, NULL, OFStandard::getFileSize(fname));
+
+                /*
+                 * If store command completed normally, with a status
+                 * of success or some warning then the image was accepted.
+                 */
+                if (cond == EC_Normal && (rsp.DimseStatus == STATUS_Success || DICOM_WARNING_STATUS(rsp.DimseStatus))) {
+                        unsuccessfulStoreEncountered = OFFalse;
+                        /* dump status detail information if there is some */
+                        if (statusDetail != NULL) {
+                                LOG_DEBUG(LOGGER, "DIMSE_storeUser(): Estado: " << std::endl << DumpDataset(statusDetail));
+                        }
+                } else {
+                        //error!!!
+                        std::stringstream os;
+                        os<< "Error al enviar el archivo";
+                        if(statusDetail!=NULL)
+                                statusDetail->print(os);
+                        os << ": " << cond.text();
+                        errorEncontrado = os.str();
+                        LOG_ERROR(LOGGER, errorEncontrado);
+                }
+                delete statusDetail;
+                statusDetail = NULL;
+        }
+
+        /* remember the response's status for later transmissions of data */
+        lastStatusCode = rsp.DimseStatus;
+
+        /* dump some more general information */
+        if (cond == EC_Normal) {
+                if (opt_debug) {
+                        LOG_DEBUG(LOGGER,"Fichero Subido Correctamente " << fname);
+                }
+        } else {
+                LOG_DEBUG(LOGGER,"Store failed: " << fname);
+                DimseCondition::dump(cond);
+        }
+
+        if( status) {
+                // We created a temporary file. Delete it now.
+
+                unlink( outfname.c_str());
+        }
+
+        /* return */
+        return cond;
+}
+
+
+static OFCondition cstore(T_ASC_Association * assoc, const OFString& fname)
+/*
+ * This function will process the given file as often as is specified by opt_repeatCount.
+ * "Process" in this case means "read file, send C-STORE-RQ, receive C-STORE-RSP".
+ *
+ * Parameters:
+ *   assoc - [in] The association (network connection to another DICOM application).
+ *   fname - [in] Name of the file which shall be processed.
+ */
+{
+        OFCondition cond = EC_Normal;
+
+        /* opt_repeatCount specifies how many times a certain file shall be processed */
+        int n = (int)opt_repeatCount;
+
+        /* as long as no error occured and the counter does not equal 0 */
+        while ((cond.good()) && n-- && !(opt_haltOnUnsuccessfulStore && unsuccessfulStoreEncountered)) {
+                /* process file (read file, send C-STORE-RQ, receive C-STORE-RSP) */
+                cond = storeSCU(assoc, fname.c_str());
+        }
+
+        // we don't want to return an error code if --no-halt was specified.
+        if (! opt_haltOnUnsuccessfulStore) {
+                cond = EC_Normal;
+        }
+
+        /* return result value */
+        return cond;
+}
+
+DicomStoreAssociation::DicomStoreAssociation() :
+        m_TLS(false),
+        m_UseUserPass(false),
+        m_Validate(false),
+        assoc(NULL),
+        net(NULL)
+{
+
+}
+
+DicomStoreAssociation::~DicomStoreAssociation()
+{
+        //no limpiamos no sea que los haya registrado otro que no seamos nosotros!!!
+        FreeMemory();
+}
+
+void DicomStoreAssociation::Store(ListaRutas listaFicheros, const GNC::GCS::Ptr<DicomServer>& server, std::string nombreAETLocal,GNC::IProxyNotificadorProgreso* pNotificador, GIL::DICOM::TipoTransferSyntaxEnvio transferSyntax)
+{
+        if (listaFicheros.size() == 0)
+                return;
+
+        m_pNotificadorProgreso = pNotificador;
+
+
+        std::string nombreAETPar = server->AET;
+        opt_maxReceivePDULength = server->PDU;
+        std::string host = server->HostName;
+        unsigned int puerto = server->Port;
+        //TIMEOUT 60 SEGUNDOS
+        unsigned int dicomtimeout = 60;
+        bool _shouldAbort=false;
+        DcmFileFormat fileformat;
+        errorEncontrado ="";
+
+        E_TransferSyntax transferSyntaxFichero;
+
+        {
+                DcmFileFormat dcmff;
+                OFCondition cond;
+                cond = dcmff.loadFile(listaFicheros.front().c_str(),EXS_Unknown,EGL_noChange,DCM_TagInfoLength);
+                //dcmff.loadAllDataIntoMemory();
+                if (cond.bad()) {
+                        errmsg(std::string("no se ha podido leer el dicom"),true);
+                } else {
+                        DcmElement* elemento;
+                        cond = dcmff.getDataset()->findAndGetElement(DcmTagKey(0x0010,0x0020),elemento);
+                        if(cond.bad()) {
+                                std::stringstream strStream;
+                                strStream << "Es necesario que este establecido el nombre y el ID del paciente";
+                                errmsg(strStream.str(),true);
+                                LOG_ERROR("C-STORE", strStream.str().c_str());
+                        }
+                        cond = dcmff.getDataset()->findAndGetElement(DcmTagKey(0x0010,0x0010),elemento);
+                        if(cond.bad()) {
+                                std::stringstream strStream;
+                                strStream << "Es necesario que este establecido el nombre y el ID del paciente";
+                                errmsg(strStream.str(),true);
+                                LOG_ERROR("C-STORE", strStream.str().c_str());
+                        }
+                }
+                transferSyntaxFichero = dcmff.getDataset()->getOriginalXfer();
+        }
+
+
+        //se pilla el nombre del estudio y dlpaciente... ahora se comienza
+        OFCondition cond;
+        const char *opt_peer = NULL;
+        OFCmdUnsignedInt opt_port = 104;
+        const char *opt_peerTitle = PEERAPPLICATIONTITLE;
+        const char *opt_ourTitle = APPLICATIONTITLE;
+
+        if(nombreAETPar.size()>0) {
+                opt_peerTitle = nombreAETPar.c_str();
+        }
+
+        if(nombreAETLocal.size()>0) {
+                opt_ourTitle = nombreAETLocal.c_str();
+        }
+
+        OFList<OFString> fileNameList;       // list of files to transfer to SCP
+        OFList<OFString> sopClassUIDList;    // the list of sop classes
+
+        T_ASC_Parameters *params;
+        DIC_NODENAME localHost;
+        DIC_NODENAME peerHost;
+        DcmAssociationConfiguration asccfg; // handler for association configuration profiles
+
+        opt_peer = host.c_str();
+        opt_port = puerto;
+
+        //verbose option set to true for now
+        opt_showPresentationContexts = OFFalse;
+
+        //debug code off for now
+        opt_debug = GNC::GCS::IControladorLog::Instance()->GetActiveLogLevel() == GNC::GCS::IControladorLog::DebugLog;
+
+        switch (transferSyntax) {
+        case SendExplicitLittleEndian:
+                opt_networkTransferSyntax = EXS_LittleEndianExplicit;
+                break;
+        case SendJPEG2000Lossless:
+                opt_networkTransferSyntax = EXS_JPEG2000LosslessOnly;
+                opt_Quality = 0;
+                break;
+        case SendJPEG2000Lossy10:
+                opt_networkTransferSyntax = EXS_JPEG2000;
+                opt_Quality = 1;
+                break;
+        case SendJPEG2000Lossy20:
+                opt_networkTransferSyntax = EXS_JPEG2000;
+                opt_Quality = 2;
+                break;
+        case SendJPEG2000Lossy50:
+                opt_networkTransferSyntax = EXS_JPEG2000;
+                opt_Quality = 3;
+                break;
+        case SendJPEGLossless:
+                opt_networkTransferSyntax = EXS_JPEGProcess14SV1;
+                break;
+        case SendJPEGLossy9:
+                opt_networkTransferSyntax = EXS_JPEGProcess2_4;
+                opt_Quality = 90;
+                break;
+        case SendJPEGLossy8:
+                opt_networkTransferSyntax = EXS_JPEGProcess2_4;
+                opt_Quality = 80;
+                break;
+        case SendJPEGLossy7:
+                opt_networkTransferSyntax = EXS_JPEGProcess2_4;
+                opt_Quality = 70;
+                break;
+        case SendImplicitLittleEndian:
+                opt_networkTransferSyntax = EXS_LittleEndianImplicit;
+                break;
+        /*	case SendRLE:
+         opt_networkTransferSyntax = EXS_RLELossless;
+         break;
+         case SendExplicitBigEndian:
+         opt_networkTransferSyntax = EXS_BigEndianExplicit;
+         break;
+         case SendBZip:
+         opt_networkTransferSyntax = EXS_DeflatedLittleEndianExplicit;
+         break;*/
+        case SendDefault:
+                opt_networkTransferSyntax = transferSyntaxFichero;
+                //FIXME esta ñapa es necesaria porque el pacs de IRE no acepta baseline
+                if (GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","force_lossless")) {
+                        if (opt_networkTransferSyntax == EXS_JPEGProcess1) {
+                                opt_networkTransferSyntax = EXS_JPEGProcess14SV1;
+                        }
+                }
+                //
+                break;
+        }
+
+        opt_proposeOnlyRequiredPresentationContexts = OFFalse;
+
+        dcmEnableUnknownVRGeneration.set(OFTrue);
+        dcmEnableUnlimitedTextVRGeneration.set(OFTrue);
+
+        //	enable-new-vr
+        dcmEnableUnknownVRGeneration.set(OFTrue);
+        dcmEnableUnlimitedTextVRGeneration.set(OFTrue);
+
+        //Timeout
+        OFCmdSignedInt opt_timeout = dicomtimeout;
+        dcmConnectionTimeout.set((Sint32) opt_timeout);
+
+        //acse-timeout
+        opt_acse_timeout = OFstatic_cast(int, opt_timeout);
+
+        //dimse-timeout
+        opt_dimse_timeout = OFstatic_cast(int, opt_timeout);
+        opt_blockMode = DIMSE_NONBLOCKING;
+
+
+        int paramCount = listaFicheros.size();
+        const char *currentFilename = NULL;
+        char sopClassUID[128];
+        char sopInstanceUID[128];
+        OFBool ignoreName;
+
+        ListaRutas::iterator it = listaFicheros.begin();
+
+        for (int i=0; i < paramCount; i++, ++it) {
+                ignoreName = OFFalse;
+                currentFilename = (*it).c_str();
+
+                if (access(currentFilename, R_OK) < 0) {
+                        std::stringstream strStream;
+                        strStream << "No se puede acceder al fichero: " << currentFilename;
+                        errmsg(strStream.str(), opt_haltOnUnsuccessfulStore);
+                        LOG_ERROR("C-STORE", strStream.str().c_str());
+                } else {
+                        if (!DU_findSOPClassAndInstanceInFile(currentFilename, sopClassUID, sopInstanceUID)) {
+                                ignoreName = OFTrue;
+                                std::stringstream strStream;
+                                strStream << "SOP class (o instance) no establecido en fichero: " << currentFilename;
+                                errmsg(strStream.str(), opt_haltOnUnsuccessfulStore);
+                                LOG_ERROR("C-STORE", strStream.str().c_str());
+                        } else if (!dcmIsaStorageSOPClassUID(sopClassUID)) {
+                                ignoreName = OFTrue;
+                                std::stringstream strStream;
+                                strStream << "Storage sop class desconocido en fichero: " << currentFilename << ": " << sopClassUID;
+                                errmsg(strStream.str(), opt_haltOnUnsuccessfulStore);
+                                LOG_ERROR("C-STORE", strStream.str().c_str());
+                        } else {
+                                bool found = false;
+                                for (OFIterator<OFString> itsc =sopClassUIDList.begin(); itsc != sopClassUIDList.end(); ++itsc) {
+                                        if ((*itsc).compare(sopClassUID) == 0) {
+                                                found = true;
+                                                break;
+                                        }
+                                }
+                                if (!found) {
+                                        sopClassUIDList.push_back(sopClassUID);
+                                }
+                        }
+                        if (!ignoreName) fileNameList.push_back(currentFilename);
+                }
+        }
+
+        /* make sure data dictionary is loaded */
+        if (!dcmDataDict.isDictionaryLoaded()) {
+                LOG_WARN(LOGGER, "Warning: no data dictionary loaded, check environment variable");
+        }
+
+        /* initialize network, i.e. create an instance of T_ASC_Network*. */
+
+        cond = ASC_initializeNetwork(NET_REQUESTOR, puerto, opt_acse_timeout, &net);
+        if (cond.bad()) {
+                DimseCondition::dump(cond);
+                std::stringstream strStream;
+                strStream << "DICOM Network Failure (storescu) ASC_initializeNetwork; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                LOG_ERROR("C-STORE", strStream.str().c_str());
+                errmsg(strStream.str(),true);
+        }
+
+        GTLSTransportLayer *tLayer = NULL;
+
+
+        if (IsSecure()) {
+                tLayer = new GTLSTransportLayer(DICOM_APPLICATION_REQUESTOR, NULL);
+                if (tLayer == NULL) {
+                        DimseCondition::dump(cond);
+                        std::stringstream strStream;
+                        strStream << "Unable to create TLS transport layer";
+                        errmsg(strStream.str(),true);
+                        LOG_ERROR("C-STORE", strStream.str().c_str());
+                }
+                tLayer->setCertificateFromString(GetCliCert());
+                tLayer->setPrivateKeyFromString(GetCliKey());
+
+                if (! tLayer->checkPrivateKeyMatchesCertificate()) {
+                        std::stringstream strStream;
+                        strStream << "private key and certificate do not match";
+                        errmsg(strStream.str(),true);
+                        LOG_ERROR("C-STORE", strStream.str().c_str());
+                }
+
+                tLayer->addSystemTrustedCertificates();
+
+                if (GetValidate()) {
+                        tLayer->setCertificateVerification(DCV_requireCertificate);
+                } else {
+                        tLayer->setCertificateVerification(DCV_ignoreCertificate);
+                }
+                /*
+                 if (opt_dhparam && ! (tLayer->setTempDHParameters(opt_dhparam)))
+                 {
+                 LOG_WARN(assoc->ambitolog, "unable to load temporary DH parameters. Ignoring");
+                 }
+                 */
+
+                cond = ASC_setTransportLayer(net, tLayer, 0);
+                if (cond.bad()) {
+                        LOG_ERROR("C-STORE", "Error al insertar capa de transporte segura: " << cond.text());
+                }
+        }
+
+        /* initialize asscociation parameters, i.e. create an instance of T_ASC_Parameters*. */
+        cond = ASC_createAssociationParameters(&params, opt_maxReceivePDULength);
+        DimseCondition::dump(cond);
+        if (cond.bad()) {
+                DimseCondition::dump(cond);
+                std::stringstream strStream;
+                strStream << "DICOM Network Failure (storescu) ASC_createAssociationParameters; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                errmsg(strStream.str(),true);
+                LOG_ERROR("C-STORE", strStream.str().c_str());
+        }
+
+        if (UseUserPass()) {
+                cond = ASC_setIdentRQUserPassword(params, GetUser().c_str(), GetPass().c_str());
+                DimseCondition::dump(cond);
+        }
+
+        if (cond.bad()) {
+                std::stringstream strStream;
+                strStream << "DICOM Network Failure (storescu) ASC_createAssociationParameters; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                errmsg(strStream.str(),true);
+                LOG_ERROR("C-STORE", strStream.str().c_str());
+        }
+
+        /* sets this application's title and the called application's title in the params */
+        /* structure. The default values to be set here are "STORESCU" and "ANY-SCP". */
+        ASC_setAPTitles(params, opt_ourTitle, opt_peerTitle, NULL);
+
+        /* Set the transport layer type (type of network connection) in the params */
+        /* strucutre. The default is an insecure connection; where OpenSSL is  */
+        /* available the user is able to request an encrypted,secure connection. */
+        cond = ASC_setTransportLayerType(params, IsSecure());
+        if (cond.bad()) {
+                DimseCondition::dump(cond);
+                std::stringstream strStream;
+                strStream << "DICOM Network Failure (storescu) ASC_setTransportLayerType; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                errmsg(strStream.str(),true);
+                LOG_ERROR("C-STORE", strStream.str().c_str());
+        }
+
+        /* Figure out the presentation addresses and copy the */
+        /* corresponding values into the association parameters.*/
+        gethostname(localHost, sizeof(localHost) - 1);
+        sprintf(peerHost, "%s:%d", opt_peer, (int)opt_port);
+        //NSLog(@"peer host: %s", peerHost);
+        cond = ASC_setPresentationAddresses(params, localHost, peerHost);
+        if (cond.bad()) {
+                DimseCondition::dump(cond);
+                std::stringstream strStream;
+                strStream << "DICOM Network Failure (storescu) ASC_setPresentationAddresses; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                errmsg(strStream.str(),true);
+                LOG_ERROR("C-STORE", strStream.str().c_str());
+        }
+
+        /* Set the presentation contexts which will be negotiated */
+        /* when the network connection will be established */
+        cond = addStoragePresentationContexts(params, sopClassUIDList);
+        if (cond.bad()) {
+                DimseCondition::dump(cond);
+                std::stringstream strStream;
+                strStream << "DICOM Network Failure (storescu) addStoragePresentationContexts; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                errmsg(strStream.str(),true);
+                LOG_ERROR("C-STORE", strStream.str().c_str());
+        }
+
+
+        /* dump presentation contexts if required */
+        if(opt_debug) {
+                std::stringstream strStream;
+                strStream << "Request Parameters:\n";
+                ASC_dumpParameters(params, strStream);
+                LOG_DEBUG(LOGGER,strStream.str());
+        }
+
+        /* create association, i.e. try to establish a network connection to another */
+        /* DICOM application. This call creates an instance of T_ASC_Association*. */
+        LOG_DEBUG(LOGGER,"Requesting Association");
+        cond = ASC_requestAssociation(net, params, &assoc);
+        if (cond.bad()) {
+                if (cond == DUL_ASSOCIATIONREJECTED) {
+                        T_ASC_RejectParameters rej;
+                        ASC_getRejectParameters(params, &rej);
+                        ASC_printRejectParameters(stderr, &rej);
+                        DimseCondition::dump(cond);
+                        std::stringstream strStream;
+                        strStream << "DICOM Network Failure (storescu) ASC_requestAssociation[DUL_ASSOCIATIONREJECTED]; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                        errmsg(strStream.str(),true);
+                        LOG_ERROR("C-STORE", strStream.str().c_str());
+                } else {
+                        DimseCondition::dump(cond);
+                        std::stringstream strStream;
+                        strStream << "DICOM Network Failure (storescu) ASC_requestAssociation[Unknown]; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                        errmsg(strStream.str(),true);
+                        LOG_ERROR("C-STORE", strStream.str().c_str());
+                }
+        }
+
+        /* dump the connection parameters if in debug mode*/
+        if(opt_debug) {
+                std::stringstream strStream;
+                strStream << "Connection Parameters:\n";
+                ASC_dumpConnectionParameters(assoc, strStream);
+                LOG_DEBUG(LOGGER,strStream.str());
+        }
+
+        /* dump the presentation contexts which have been accepted/refused */
+        if(opt_debug) {
+                std::stringstream strStream;
+                strStream << "Association Parameters Negotiated:\n";
+                ASC_dumpParameters(params, strStream);
+                LOG_DEBUG(LOGGER,strStream.str());
+        }
+
+        /* count the presentation contexts which have been accepted by the SCP */
+        /* If there are none, finish the execution */
+        if (ASC_countAcceptedPresentationContexts(params) == 0) {
+                std::stringstream strStream;
+                strStream << "DICOM Network Failure (storescu) Contextos de presentacion no aceptados";
+                errmsg(strStream.str(),true);
+                LOG_WARN("C-STORE", strStream.str().c_str());
+        }
+
+        /* dump general information concerning the establishment of the network connection if required */
+        if (opt_debug) {
+                std::stringstream strStream;
+                strStream << "Association Accepted (Max Send PDV: "<< assoc->sendPDVLength;
+                LOG_DEBUG(LOGGER,strStream.str());
+        }
+
+        /* do the real work, i.e. for all files which were specified in the */
+        /* command line, transmit the encapsulated DICOM objects to the SCP. */
+        cond = EC_Normal;
+        OFListIterator(OFString) iter = fileNameList.begin();
+        OFListIterator(OFString) enditer = fileNameList.end();
+
+        int _numberSent=0;
+        //int _numberOfFiles =0;
+        //int _numberErrors =0;
+        OFString mensaje;
+
+        ResetearMedida(true);
+        while ((iter != enditer) && (cond == EC_Normal) && !_shouldAbort) { // compare with EC_Normal since DUL_PEERREQUESTEDRELEASE is also good()
+                wxString msg = wxString::Format(_("Uploading file %d of %d"), (int)(_numberSent+1), (int)(listaFicheros.size()) );
+                m_mensaje = std::string(msg.ToUTF8());
+
+                // coverity[CHECKED_RETURN] GW: assume that test for abort not of interest.
+                pNotificador->NotificarProgreso(0.0f, m_mensaje);
+
+                cond = cstore(assoc, *iter);
+                ++iter;
+                if (!unsuccessfulStoreEncountered)
+                        _numberSent++;
+                else {
+                        //error cerramos las conexiones...
+                        break;
+                }
+
+                //TODO CONFIGURACION MAXIMO NUMERO DFICHEROS Q SEPUEDE SUBIR, MAXIMO NUMERO DE ERRORES...
+        }
+
+
+        /* tear down association, i.e. terminate network connection to SCP */
+        if (cond == EC_Normal) {
+                if (opt_abortAssociation) {
+                        cond = ASC_abortAssociation(assoc);
+                        if (cond.bad()) {
+                                LOG_DEBUG(LOGGER,"Abortando Asociacion: \n");
+                                DimseCondition::dump(cond);
+                                std::stringstream strStream;
+                                strStream << "DICOM Network Failure (storescu) Association Abort Failed; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                                errmsg(strStream.str(),true);
+                                LOG_ERROR("C-STORE", strStream.str().c_str());
+                        }
+                } else {
+                        /* release association */
+                        LOG_DEBUG(LOGGER,"Abortando Asociacion: \n");
+                        cond = ASC_releaseAssociation(assoc);
+                        if (cond.bad()) {
+                                ASC_dropAssociation(assoc);
+                                DimseCondition::dump(cond);
+                                std::stringstream strStream;
+                                strStream << "DICOM Network Failure (storescu) Association Abort Failed; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                                errmsg(strStream.str(),true);
+                                LOG_ERROR("C-STORE", strStream.str().c_str());
+                        }
+                }
+        } else if (cond == DUL_PEERREQUESTEDRELEASE) {
+                LOG_DEBUG(LOGGER,"Abortando Asociacion [PEERREQUESTEDRELEASE]");
+
+                cond = ASC_abortAssociation(assoc);
+                if (cond.bad()) {
+                        std::stringstream strStream;
+                        strStream << "DICOM Network Failure (storescu) Association Abort Failed; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                        errmsg(strStream.str(),true);
+                        LOG_ERROR("C-STORE", strStream.str().c_str());
+                }
+        } else if (cond == DUL_PEERABORTEDASSOCIATION) {
+                std::stringstream strStream;
+                strStream << "Fallo en la red DICOM (storescu) El servidor ha cerrado la conexion ";
+                errmsg(strStream.str(),true);
+                LOG_ERROR("C-STORE", strStream.str().c_str());
+        } else {
+                DimseCondition::dump(cond);
+                LOG_DEBUG(LOGGER,"Abortando Asociacion");
+
+                cond = ASC_abortAssociation(assoc);
+                if (cond.bad()) {
+                        DimseCondition::dump(cond);
+                        std::stringstream strStream;
+                        strStream << "DICOM Network Failure (storescu) Protocol Error: SCU Failed; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                        errmsg(strStream.str(),true);
+                        LOG_ERROR("C-STORE", strStream.str().c_str());
+                }
+        }
+
+        if ( unsuccessfulStoreEncountered) {
+                throw GIL::DICOM::PACSException(errorEncontrado);
+        }
+}
+
+void DicomStoreAssociation::FreeMemory()
+{
+        /* destroy the association, i.e. free memory of T_ASC_Association* structure. This */
+        /* call is the counterpart of ASC_requestAssociation(...) which was called above. */
+        if (assoc != NULL) {
+                OFCondition cond = ASC_destroyAssociation(&assoc);
+                if (cond.bad()) {
+                        DimseCondition::dump(cond);
+                        std::stringstream strStream;
+                        strStream << "DICOM Network Failure (storescu) Protocol Error: ASC_destroyAssociation; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                        errmsg(strStream.str(),true);
+                        LOG_ERROR("C-STORE", strStream.str().c_str());
+                }
+        }
+        /* drop the network, i.e. free memory of T_ASC_Network* structure. This call */
+        /* is the counterpart of ASC_initializeNetwork(...) which was called above. */
+
+        if (net!= NULL) {
+                OFCondition cond = ASC_dropNetwork(&net);
+                if (cond.bad()) {
+                        DimseCondition::dump(cond);
+                        std::stringstream strStream;
+                        strStream << "DICOM Network Failure (storescu) Protocol Error: ASC_dropNetwork; Modulo: "<< cond.module() << "; Code:"<< cond.code() << "; " << cond.text();
+                        errmsg(strStream.str(),true);
+                        LOG_ERROR("C-STORE", strStream.str().c_str());
+                }
+        }
+}
+}
+}
+
+void GIL::DICOM::DicomStoreAssociation::progressCallback(void * callbackData,
+                T_DIMSE_StoreProgress *progress,
+                T_DIMSE_C_StoreRQ * /*req*/)
+{
+        _StoreCallbackInfo *cbdata = static_cast<_StoreCallbackInfo*>(callbackData);
+
+        if (progress->state == DIMSE_StoreProgressing) {
+                //si ha pasado medio segundo...
+                std::stringstream ostr;
+                ostr << m_mensaje;
+                ostr.setf(std::ios::floatfield, std::ios::fixed );
+                ostr.precision(2);
+                ostr << " a " << TasaTransferencia(progress->progressBytes) << " kb/s";
+                std::string msg(ostr.str());
+
+                if(!m_pNotificadorProgreso->NotificarProgreso((float)progress->progressBytes/progress->totalBytes,msg)) {
+                        ASC_abortAssociation(cbdata->assoc);
+                }
+        }
+        if (progress->state == DIMSE_StoreEnd) {
+                ResetearMedida();
+        }
+}
+
diff --git a/cadxcore/main/controllers/dcmtk/dicomstoreassociation.h b/cadxcore/main/controllers/dcmtk/dicomstoreassociation.h
new file mode 100644
index 0000000..b106fea
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/dicomstoreassociation.h
@@ -0,0 +1,108 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <string>
+#include <vector>
+#include <api/controllers/ipacscontroller.h>
+#include <dcmtk/dcmnet/dimse.h>
+class DicomServer;
+
+namespace GNC
+{
+class IProxyNotificadorProgreso;
+}
+
+namespace GIL
+{
+namespace DICOM
+{
+
+
+class DicomStoreAssociation
+{
+public:
+
+        DicomStoreAssociation();
+        ~DicomStoreAssociation();
+        typedef std::list<std::string> ListaRutas;
+        void Store(ListaRutas listaFicheros, const GNC::GCS::Ptr<DicomServer>& server, std::string nombreAETLocal,GNC::IProxyNotificadorProgreso* pNotificador, GIL::DICOM::TipoTransferSyntaxEnvio transferSyntax);
+        void FreeMemory();
+        static void progressCallback(void * /*callbackData*/,T_DIMSE_StoreProgress *progress,T_DIMSE_C_StoreRQ * /*req*/);
+
+        void SetTLS(const std::string& CliCert, const std::string& CliKey, bool validate)
+        {
+                m_TLS = true;
+                m_CliCert = CliCert;
+                m_CliKey = CliKey;
+                m_Validate = validate;
+        }
+
+        void SetUserPass(const std::string& PacsUser, const std::string& PacsPass)
+        {
+                m_UseUserPass = true;
+                m_pacsUser = PacsUser, m_pacsPass = PacsPass;
+        }
+        bool UseUserPass()
+        {
+                return m_UseUserPass;
+        }
+        const std::string& GetUser()
+        {
+                return m_pacsUser;
+        }
+        const std::string& GetPass()
+        {
+                return m_pacsPass;
+        }
+
+        bool IsSecure() const
+        {
+                return m_TLS;
+        }
+
+        const std::string& GetCliCert() const
+        {
+                return m_CliCert;
+        }
+        const std::string& GetCliKey() const
+        {
+                return m_CliKey;
+        }
+        bool GetValidate() const
+        {
+                return m_Validate;
+        }
+
+protected:
+        bool m_TLS;
+        std::string m_CliCert;
+        std::string m_CliKey;
+        bool m_UseUserPass;
+        std::string m_pacsUser;
+        std::string m_pacsPass;
+        bool m_Validate;
+        T_ASC_Association *assoc;
+        T_ASC_Network *net;
+
+};
+}
+}
diff --git a/cadxcore/main/controllers/dcmtk/ginkgouid.cpp b/cadxcore/main/controllers/dcmtk/ginkgouid.cpp
new file mode 100644
index 0000000..a6bae32
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/ginkgouid.cpp
@@ -0,0 +1,65 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ginkgouid.h"
+#include <sstream>
+#include <api/ientorno.h>
+#include <dcmtk/dcmdata/dcuid.h>
+
+// MetaEmotion.Healthcate.GinkgoCADx.MayorVersion.MinorVersion
+
+#define GINKGO_UID_ROOT                           "1.3.6.1.4.1.39470.1.1"
+
+#define GINKGO_STUDY_UID_ROOT                     ".1.2"
+#define GINKGO_SERIES_UID_ROOT                    ".1.3"
+#define GINKGO_INSTANCE_UID_ROOT                  ".1.4"
+#define GINKGO_UID_PRIVATE_GENERIC_FILE_SOP_CLASS ".1.0.1"
+
+
+std::string GIL::DICOM::MakeUID(GinkgoUIDType uidType, int counter)
+{
+        char newUID[128];
+        std::ostringstream  buf;
+        buf << GINKGO_UID_ROOT << "." << GNC::GCS::IEntorno::Instance()->GetGinkgoMayorVersionNumber() << "." << GNC::GCS::IEntorno::Instance()->GetGinkgoMinorVersionNumber();
+
+        switch(uidType) {
+        case GUID_StudyRoot:
+                buf << GINKGO_STUDY_UID_ROOT;
+                break;
+        case GUID_SeriesRoot:
+                buf << GINKGO_SERIES_UID_ROOT;
+                break;
+        case GUID_InstanceRoot:
+                buf << GINKGO_INSTANCE_UID_ROOT;
+                break;
+        case GUID_PrivateGenericFileSOPClass:
+                buf << GINKGO_UID_PRIVATE_GENERIC_FILE_SOP_CLASS;
+                break;
+        default:
+                break;
+        }
+
+        if (counter >= 0 ) {
+                buf << counter;
+        }
+
+        dcmGenerateUniqueIdentifier(newUID, buf.str().c_str());
+        return std::string(newUID);
+}
diff --git a/cadxcore/main/controllers/dcmtk/ginkgouid.h b/cadxcore/main/controllers/dcmtk/ginkgouid.h
new file mode 100644
index 0000000..3ebc5a0
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/ginkgouid.h
@@ -0,0 +1,43 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <string>
+#include <api/api.h>
+
+namespace GIL
+{
+namespace DICOM
+{
+
+typedef enum GinkgoUIDType {
+        GUID_StudyRoot,
+        GUID_SeriesRoot,
+        GUID_InstanceRoot,
+        GUID_PrivateGenericFileSOPClass
+} GinkgoUIDType;
+
+/***
+* Generates a unique UID on given root. If counter != -1 adds a level with those counter value
+**/
+std::string EXTAPI MakeUID(GinkgoUIDType uidType, int counter = -1);
+}
+}
diff --git a/cadxcore/main/controllers/dcmtk/helpercompresion.cpp b/cadxcore/main/controllers/dcmtk/helpercompresion.cpp
new file mode 100644
index 0000000..925319f
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/helpercompresion.cpp
@@ -0,0 +1,658 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#ifndef _CRT_SECURE_NO_DEPRECATE
+#define _CRT_SECURE_NO_DEPRECATE
+#endif
+
+#include "helpercompresion.h"
+
+#include <cstddef>
+#include <itkImage.h>
+#include <itkGDCMImageIO.h>
+#include <itkCommand.h>
+#include <itkMetaDataObject.h>
+#include <itkMetaDataDictionary.h>
+#include <itkImageSeriesReader.h>
+#include <itkImageSeriesWriter.h>
+#include <itkImageFileWriter.h>
+
+//descomprime una imagen utilizando itk...
+bool DecompressJPEG2000(const std::string& fileIn, const std::string& fOut)
+{
+        typedef double PixelType;
+        typedef itk::Image<PixelType, 3 > ImageType;
+        typedef itk::GDCMImageIO ImageIOType;
+        typedef itk::ImageSeriesReader<ImageType> GenericReaderType;
+
+        ImageIOType::Pointer              dicomIO    = ImageIOType::New();
+        GenericReaderType::Pointer        reader     = GenericReaderType::New();
+
+        try {
+                reader->SetImageIO(dicomIO);
+
+                //reader->ReleaseDataFlagOn();
+                reader->SetFileName(fileIn);
+
+                reader->UpdateOutputInformation();
+        } catch (itk::ExceptionObject& /*ex*/) {
+                reader->ResetPipeline();
+                return false;
+        }
+
+
+
+        itk::ProcessObject::Pointer processObjectReader;
+        itk::ProcessObject::Pointer processObjectWriter;
+        ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+        tdicomIO->SetLoadPrivateTags(true);
+        tdicomIO->SetLoadSequences(true);
+
+        if (dicomIO->GetNumberOfComponents() == 1) {
+
+                switch(dicomIO->GetComponentType()) {
+                case ImageIOType::UCHAR: {
+                        typedef unsigned char TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::CHAR: {
+                        typedef char TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::USHORT: {
+                        typedef unsigned short TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::SHORT: {
+                        typedef short TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::UINT: {
+                        typedef unsigned int TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::INT: {
+                        typedef int TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::ULONG: {
+                        typedef unsigned long TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::LONG: {
+                        typedef long TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::FLOAT: {
+                        typedef float TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::DOUBLE: {
+                        typedef double TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::UNKNOWNCOMPONENTTYPE:
+                default:
+                        //throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: unsupported pixel format"), "ControladorCarga/CargaMultidimensional");
+                        return false;
+                }
+        } else if (dicomIO->GetNumberOfComponents() == 3) {
+                switch(dicomIO->GetComponentType()) {
+                case ImageIOType::UCHAR: {
+                        typedef itk::RGBPixel<unsigned char> TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                default:
+                        return false;
+                }
+
+        } else {
+                return false;
+        }
+
+        try {
+                processObjectReader->Update();
+                //descomprimir
+                tdicomIO->SetUseCompression(false);
+                tdicomIO->SetByteOrder(itk::ImageIOBase::LittleEndian);
+                //
+                processObjectWriter->Update();
+        } catch (itk::ExceptionObject& /*ex*/) {
+                processObjectReader->ResetPipeline();
+                return false;
+        } catch (...) {
+                processObjectReader->ResetPipeline();
+                return false;
+        }
+        /*if (processObjectReader->GetAbortGenerateData()) {
+        processObject->ResetPipeline();
+        return false;
+        }*/
+        return true;
+}
+
+
+
+//descomprime una imagen utilizando itk...
+bool CompressJPEG2000(const std::string& fileIn, const std::string& fOut)
+{
+        typedef double PixelType;
+        typedef itk::Image<PixelType, 3 > ImageType;
+        typedef itk::GDCMImageIO ImageIOType;
+        typedef itk::ImageSeriesReader<ImageType> GenericReaderType;
+
+        ImageIOType::Pointer              dicomIO    = ImageIOType::New();
+        GenericReaderType::Pointer        reader     = GenericReaderType::New();
+
+        try {
+                reader->SetImageIO(dicomIO);
+
+                reader->SetUseStreaming(true);
+                //reader->ReleaseDataFlagOn();
+                reader->SetFileName(fileIn);
+
+                reader->UpdateOutputInformation();
+        } catch (itk::ExceptionObject& /*ex*/) {
+                reader->ResetPipeline();
+                return false;
+        }
+
+
+
+        itk::ProcessObject::Pointer processObjectReader;
+        itk::ProcessObject::Pointer processObjectWriter;
+        ImageIOType::Pointer     tdicomIO = ImageIOType::New();
+        tdicomIO->SetLoadPrivateTags(true);
+        tdicomIO->SetLoadSequences(true);
+        if (dicomIO->GetNumberOfComponents() == 1) {
+
+                switch(dicomIO->GetComponentType()) {
+                case ImageIOType::UCHAR: {
+                        typedef unsigned char TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+                        twriter->UseCompressionOn();
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::CHAR: {
+                        typedef char TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+                        twriter->UseCompressionOn();
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::USHORT: {
+                        typedef unsigned short TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+                        twriter->UseCompressionOn();
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::SHORT: {
+                        typedef short TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+                        twriter->UseCompressionOn();
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::UINT: {
+                        typedef unsigned int TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+                        twriter->UseCompressionOn();
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::INT: {
+                        typedef int TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+                        twriter->UseCompressionOn();
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::ULONG: {
+                        typedef unsigned long TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+                        twriter->UseCompressionOn();
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::LONG: {
+                        typedef long TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+                        twriter->UseCompressionOn();
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::FLOAT: {
+                        typedef float TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+                        twriter->UseCompressionOn();
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::DOUBLE: {
+                        typedef double TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+                        twriter->UseCompressionOn();
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                case ImageIOType::UNKNOWNCOMPONENTTYPE:
+                default:
+                        //throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: unsupported pixel format"), "ControladorCarga/CargaMultidimensional");
+                        return false;
+                }
+        } else if (dicomIO->GetNumberOfComponents() == 3) {
+                switch(dicomIO->GetComponentType()) {
+                case ImageIOType::UCHAR: {
+                        typedef itk::RGBPixel<unsigned char> TypedPixelType;
+                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                        typedef itk::ImageSeriesReader<TypedImageType> TypedReaderType;
+                        typedef itk::ImageSeriesWriter<TypedImageType,TypedImageType> TypedWriterType;
+
+                        TypedReaderType::Pointer treader = TypedReaderType::New();
+                        TypedWriterType::Pointer twriter = TypedWriterType::New();
+                        treader->SetImageIO(tdicomIO);
+                        treader->SetFileName(fileIn);
+                        treader->SetUseStreaming(true);
+                        //treader->GetOutput()->ReleaseDataFlagOn();
+
+                        twriter->SetInput(treader->GetOutput());
+                        twriter->SetImageIO(tdicomIO);
+                        twriter->SetFileName(fOut);
+                        twriter->UseCompressionOn();
+
+                        processObjectReader = treader;
+                        processObjectWriter = twriter;
+                }
+                break;
+                default:
+                        return false;
+                }
+        } else {
+                return false;
+        }
+
+        try {
+                processObjectReader->Update();
+                //comprimir
+                tdicomIO->SetByteOrderToLittleEndian();
+                tdicomIO->SetUseCompression(true);
+                tdicomIO->SetLoadPrivateTags(true);
+                tdicomIO->SetLoadSequences(true);
+
+                tdicomIO->SetCompressionType(itk::GDCMImageIO::JPEG2000);
+                //
+                processObjectWriter->Update();
+        } catch (itk::ExceptionObject& /*ex*/) {
+                processObjectReader->ResetPipeline();
+                return false;
+        } catch (...) {
+                processObjectReader->ResetPipeline();
+                return false;
+        }
+        /*if (processObjectReader->GetAbortGenerateData()) {
+        processObject->ResetPipeline();
+        return false;
+        }*/
+        return true;
+}
diff --git a/cadxcore/main/controllers/dcmtk/helpercompresion.h b/cadxcore/main/controllers/dcmtk/helpercompresion.h
new file mode 100644
index 0000000..0b10acb
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/helpercompresion.h
@@ -0,0 +1,26 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+#pragma once
+#include <string>
+
+bool DecompressJPEG2000(const std::string& fileIn, const std::string& fOut);
+
+bool CompressJPEG2000(const std::string& fileIn, const std::string& fOut);
+
diff --git a/cadxcore/main/controllers/dcmtk/helpers.cpp b/cadxcore/main/controllers/dcmtk/helpers.cpp
new file mode 100644
index 0000000..b767de5
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/helpers.cpp
@@ -0,0 +1,40 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "helpers.h"
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/config/osconfig.h>
+#include <dcmtk/dcmdata/dcdatset.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+const std::string DumpDataset(DcmDataset* dataset)
+{
+        std::ostringstream ds;
+        dataset->print(ds);
+        return ds.str();
+}
diff --git a/cadxcore/main/controllers/dcmtk/helpers.h b/cadxcore/main/controllers/dcmtk/helpers.h
new file mode 100644
index 0000000..2a441da
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/helpers.h
@@ -0,0 +1,26 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <string>
+
+class DcmDataset;
+
+const std::string DumpDataset(DcmDataset* dataset);
diff --git a/cadxcore/main/controllers/dcmtk/istorecallback.h b/cadxcore/main/controllers/dcmtk/istorecallback.h
new file mode 100644
index 0000000..1fc5f6f
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/istorecallback.h
@@ -0,0 +1,36 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#include <string>
+
+class DcmDataset;
+
+class IStoreCallBack
+{
+public:
+        IStoreCallBack() {}
+        virtual ~IStoreCallBack() {}
+
+        virtual void Store(const std::string& fileName, DcmDataset* dset) = 0;
+};
+
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/d2dcommon.cpp b/cadxcore/main/controllers/dcmtk/libi2d/d2dcommon.cpp
new file mode 100644
index 0000000..17f69b1
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/d2dcommon.cpp
@@ -0,0 +1,114 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "d2dcommon.h"
+
+#ifdef DCMTK_POST_20170228
+#include <api/dicom/dicom_legacy.h>
+#endif 
+
+/** Check whether given type 1 attribute is present and has a length > 0.
+*  @param  key - [in] The attribute tag check
+*  @param  targetDset - [out] targetDset
+*  @param  defaultValue - [in] value to be inserted if attribute is missing
+*                         (needs invent option for type 1 attributes enabled)
+*  @return A string with an error message if attribute is not present
+*          or has length of 0
+*/
+OFString D2DCommon::checkAndInventType1Attrib(const DcmTagKey& key,
+                DcmDataset* targetDset,
+                const OFString& defaultValue) const
+{
+        OFString err;
+        OFBool exists = targetDset->tagExists(key);
+        if (!exists) {
+                OFString err = "Document2Dcm: Missing type 1 attribute: ";
+                err += DcmTag(key).getTagName();
+                err += "\n";
+                return err;
+        }
+        DcmElement *elem;
+        OFCondition cond = targetDset->findAndGetElement(key, elem);
+        if (cond.bad() || !elem || (elem->getLength() == 0)) {
+                if (!m_inventMissingType1Attribs) {
+                        err += "Document2Dcm: Empty value for type 1 attribute: ";
+                        err += DcmTag(key).getTagName();
+                        err += "\n";
+                        return err;
+                }
+                //holds element to insert in item
+                DcmElement *elem = NULL;
+                DcmTag tag(key);
+                OFBool wasError = OFFalse;
+                //if dicom element could be created, insert in to item and modify to value
+                if (newDicomElement(elem, tag).good()) {
+                        if (targetDset->insert(elem, OFTrue).good()) {
+                                if (elem->putString(defaultValue.c_str()).good()) {
+                                        if (m_debug) {
+                                                OFString msg = "Document2Dcm: Inserting missing type 1 attribute ";
+                                                msg += tag.getTagName();
+                                                msg += " with value ";
+                                                msg += defaultValue;
+                                                printMessage(m_logStream, msg);
+                                                return err;
+                                        }
+                                } else wasError = OFTrue;
+                        } else wasError = OFTrue;
+                } else wasError = OFTrue;
+                if (wasError) {
+                        err += "Unable to insert type 1 attribute ";
+                        err += tag.getTagName();
+                        err += " with value ";
+                        err += defaultValue;
+                        err += "\n";
+                }
+        }
+        return err;
+}
+
+
+/** Inserts an empty element with the given tag into a dataset
+*  @param  key - [in] The attribute tag to check
+*  @param  targetDset - [out] targetDset
+*  @return A string with an error message if attribute is not present
+*          nor gets inserted automatically (see m_inventMissingType2Attribs)
+*/
+OFString D2DCommon::checkAndInventType2Attrib(const DcmTagKey& key,
+                DcmDataset* targetDset) const
+{
+        OFString err;
+        OFBool exists = targetDset->tagExists(key);
+        if (!exists) {
+                if (m_inventMissingType2Attribs) {
+                        DcmTag tag(key);
+                        if (m_debug)
+                                printMessage(m_logStream, "Document2Dcm: Inserting missing type 2 attribute: ", tag.getTagName());
+                        targetDset->insertEmptyElement(tag);
+                } else {
+                        err = "Document2Dcm: Missing type 2 attribute: ";
+                        err += DcmTag(key).getTagName();
+                        err += "\n";
+                        return err;
+                }
+        }
+        return err;
+}
+
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/d2dcommon.h b/cadxcore/main/controllers/dcmtk/libi2d/d2dcommon.h
new file mode 100644
index 0000000..1a52609
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/d2dcommon.h
@@ -0,0 +1,110 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+
+#include <dcmtk/dcmdata/dctk.h>
+class D2DCommon
+{
+public:
+
+        D2DCommon() : m_logStream(NULL), m_debug(OFFalse), m_inventMissingType2Attribs(OFTrue),
+                m_inventMissingType1Attribs(OFFalse)
+        {
+        }
+        /** Prints a message to the given stream.
+         ** @param  stream - [out] output stream to which the message is printed
+         *  @param  message1 - [in] first part of message to be printed
+         *  @param  message2 - [in] second part of message to be printed
+         *  @return none
+         */
+        void printMessage(OFConsole *stream,
+                          const OFString& message1,
+                          const OFString& message2 = "") const
+        {
+                if (stream != NULL) {
+                        stream->lockCerr() << message1 << message2 << std::endl;
+                        stream->unlockCerr();
+                }
+        }
+
+        /** Sets the log stream
+         *  The log stream is used to report any warnings and error messages.
+         *  @param stream - [out] pointer to the log stream (might be NULL = no messages)
+         *  @return none
+         */
+        void setLogStream(OFConsole *stream)
+        {
+                m_logStream= stream;
+        }
+
+        /** Sets the debug mode
+         *  @param debugMode - [in] New status for debug mode
+         *  @return none
+         */
+        void setDebugMode(const OFBool& debugMode)
+        {
+                m_debug = debugMode;
+        };
+
+        /** Check whether given type 1 attribute is present and has a length > 0.
+        	 *  @param  key - [in] The attribute tag check
+        	 *  @param  targetDset - [out] targetDset
+        	 *  @param  defaultValue - [in] value to be inserted if attribute is missing
+        	 *                         (needs invent option for type 1 attributes enabled)
+        	 *  @return A string with an error message if attribute is not present
+        	 *          or has length of 0
+        	 */
+        OFString checkAndInventType1Attrib(const DcmTagKey& key,
+                                           DcmDataset* targetDset,
+                                           const OFString& defaultValue = "") const;
+
+
+        /** Inserts an empty element with the given tag into a dataset
+         *  @param  key - [in] The attribute tag to check
+         *  @param  targetDset - [out] targetDset
+         *  @return A string with an error message if attribute is not present
+         *          nor gets inserted automatically (see m_inventMissingType2Attribs)
+         */
+        OFString checkAndInventType2Attrib(const DcmTagKey& key,
+                                           DcmDataset* targetDset) const;
+
+protected:
+
+
+        /// stream where warning/error message are sent to.
+        /// can be NULL (default, no output).
+        OFConsole *m_logStream;
+
+        /// debug mode status
+        OFBool m_debug;
+
+        /// If true, missing type 2 elements are inserted automatically (empty value).
+        /// Enabled per default.
+        OFBool m_inventMissingType2Attribs;
+
+        /// If true, missing type 1 elements are inserted automatically with a
+        /// predefined value, if possible. Disabled per default.
+        OFBool m_inventMissingType1Attribs;
+
+};
+
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/d2dsource.h b/cadxcore/main/controllers/dcmtk/libi2d/d2dsource.h
new file mode 100644
index 0000000..cb8ea95
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/d2dsource.h
@@ -0,0 +1,82 @@
+/*
+ *
+ *  $Id: d2dsource.h $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Base Class for plugins extracting pixel data from standard
+ *           image files
+ *
+ *  Last Update:      $Author: onken $
+ *  Update Date:      $Date: 2009-01-16 09:51:55 $
+ *  CVS/RCS Revision: $Revision: 1.2 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+#pragma once
+#include "d2dcommon.h"
+
+class D2DSource: public D2DCommon
+{
+
+public:
+
+        /** Constructor
+         */
+        D2DSource() {}
+
+
+        /** Returns identifier for the image input format the plugin imports.
+         *  @return A short identifier (e. g. "JPEG")
+         */
+        virtual OFString inputFormat() const = 0;
+
+        /** Reads pixel data and corresponding attributes like rows etc. from image
+         *  file and inserts them into dataset.
+         *  @param imageSource - [in] The input plugin that actually reads the pixel data
+         *  @param dset - [out] The dataset to export the pixel data attributes to
+         *  @param outputTS - [out] The proposed transfex syntax of the dataset
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        virtual OFCondition readAndInsertSpecificTags( DcmDataset* dset,
+                        E_TransferSyntax& outputTS) = 0;
+
+
+        /** Do some completeness / validity checks. Should be called when
+         *  dataset is completed and is about to be saved.
+         *  @param dataset - [in] The dataset to check
+         *  @return Error string if error occurs, empty string otherwise
+         */
+        virtual OFString isValid(DcmDataset& dset) const = 0;
+
+        /** Virtual Destructor
+         */
+        virtual ~D2DSource() {}
+
+protected:
+};
+
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/document2dcm.cpp b/cadxcore/main/controllers/dcmtk/libi2d/document2dcm.cpp
new file mode 100644
index 0000000..f2bb87d
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/document2dcm.cpp
@@ -0,0 +1,635 @@
+/*
+*
+*  $Id: document2dcm.cpp $
+*  Ginkgo CADx Project
+*
+*  Code addapted from DCMTK
+*
+*
+*  Copyright (C) 2001-2007, OFFIS
+*
+*  This software and supporting documentation were developed by
+*
+*    Kuratorium OFFIS e.V.
+*    Healthcare Information and Communication Systems
+*    Escherweg 2
+*    D-26121 Oldenburg, Germany
+*
+*  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+*  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+*  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+*  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+*  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+*
+*  Module:  dcmdata
+*
+*  Author:  Michael Onken
+*
+*  Purpose: Implements utility for converting standard image formats to DICOM
+*
+*  Last Update:      $Author: onken $
+*  Update Date:      $Date: 2008-01-16 16:32:31 $
+*  CVS/RCS Revision: $Revision: 1.2 $
+*  Status:           $State: Exp $
+*
+*  CVS/RCS Log at end of file
+*
+*/
+
+#include <sstream>
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <main/controllers/dcmtk/ginkgouid.h>
+#include <dcmtk/config/osconfig.h>
+#include "document2dcm.h"
+#include <dcmtk/dcmdata/dcpxitem.h>
+
+#include "dcmtk/dcmdata/dctk.h"
+//#include "dcmtk/dcmdata/dcdebug.h"
+#include "dcmtk/dcmdata/cmdlnarg.h"
+#include "dcmtk/ofstd/ofconapp.h"
+#include "dcmtk/dcmdata/dcuid.h"     /* for dcmtk version name */
+#include "dcmtk/dcmjpeg/djencode.h"  /* for dcmjpeg encoders */
+#include "dcmtk/dcmjpeg/djrplol.h"   /* for DJ_RPLossless */
+#include "dcmtk/dcmjpeg/djrploss.h"   /* for DJ_RPLossy */
+#include "dcmtk/dcmjpeg/dipijpeg.h"  /* for dcmimage JPEG plugin */
+#include "dcmtk/dcmimage/diregist.h"  /* include to support color images */
+
+#include <main/controllers/controladorlog.h>
+
+#include <ctime>
+#include <cstdlib>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+Document2Dcm::Document2Dcm() : D2DCommon(), m_overrideKeys(NULL), m_templateFile(""),
+        m_readStudyLevel(OFFalse), m_readSeriesLevel(OFFalse), m_studySeriesFile(),
+        m_incInstNoFromFile(OFFalse), m_disableAttribChecks(OFFalse),
+        m_insertLatin1(OFFalse), m_insertUTF8(OFTrue)
+{
+        ;
+}
+
+OFCondition Document2Dcm::convert(D2DSource *inputPlug,
+                                  I2DOutputPlug *outPlug,
+                                  DcmDataset*& resultDset,
+                                  E_TransferSyntax& proposedTS)
+
+{
+        if (!inputPlug || !outPlug)
+                return EC_IllegalParameter;
+
+        OFCondition cond;
+        if (m_debug)
+                printMessage(m_logStream, "Document2Dcm: Starting conversion");
+
+        // If specified, copy DICOM template file to export file
+        if (m_templateFile.length() != 0) {
+                DcmFileFormat dcmff;
+                cond = dcmff.loadFile(m_templateFile.c_str());
+                if (cond.bad())
+                        return cond;
+                // remove problematic attributes from dataset
+                cleanupTemplate(dcmff.getDataset());
+                // copy from input file
+                resultDset = new DcmDataset(*(dcmff.getDataset()));
+        } else // otherwise, start with an empty DICOM file
+                resultDset = new DcmDataset();
+        if (!resultDset)
+                return EC_MemoryExhausted;
+
+        // Read patient and study or series information if desired and write to export file
+        if (m_readStudyLevel || m_readSeriesLevel) {
+                cond = applyStudyOrSeriesFromFile(resultDset);
+                if (cond.bad()) {
+                        delete resultDset;
+                        resultDset = NULL;
+                        return cond;
+                }
+        }
+
+        OFString value;
+
+        // Increment instance number
+        if (m_incInstNoFromFile) {
+                cond = incrementInstanceNumber(resultDset);
+                if (cond.bad()) {
+                        delete resultDset;
+                        resultDset = NULL;
+                        return cond;
+                }
+                OFString s;
+                if (cond.good()) {
+                        cond = DcmDate::getCurrentDate(value);
+                }
+                if (cond.good()) {
+                        cond = resultDset->putAndInsertOFStringArray(DCM_InstanceCreationDate, value);
+                }
+                if (cond.good()) {
+                        cond = DcmTime::getCurrentTime(value);
+                }
+                if (cond.good()) {
+                        cond = resultDset->putAndInsertOFStringArray(DCM_InstanceCreationTime, value);
+                }
+                if (cond.bad()) {
+                        delete resultDset;
+                        resultDset = NULL;
+                        return cond;
+                }
+        } else {
+                cond = resultDset->findAndGetOFString(DCM_InstanceCreationDate, value);
+                if (cond.bad()) {
+                        cond = DcmDate::getCurrentDate(value);
+                        if (cond.good()) {
+                                cond = resultDset->putAndInsertOFStringArray(DCM_InstanceCreationDate, value);
+                        }
+                }
+                if (cond.bad()) {
+                        delete resultDset;
+                        resultDset = NULL;
+                        return cond;
+                }
+
+                cond = resultDset->findAndGetOFString(DCM_InstanceCreationTime, value);
+
+                if (cond.bad()) {
+                        cond = DcmTime::getCurrentTime(value);
+                        if (cond.good()) {
+                                cond = resultDset->putAndInsertOFStringArray(DCM_InstanceCreationTime, value);
+                        }
+                }
+                if (cond.bad()) {
+                        delete resultDset;
+                        resultDset = NULL;
+                        return cond;
+                }
+        }
+
+        // Insert Latin 1 as standard character set if desired
+        if (m_insertLatin1)
+                cond = insertLatin1(resultDset);
+        if (cond.bad())
+                return cond;
+
+        if (m_insertUTF8)
+                cond = insertUTF8(resultDset);
+        if (cond.bad())
+                return cond;
+
+        // Generate and insert UIDs as necessary
+        generateUIDs(resultDset);
+
+        // Read and insert pixel data
+
+        cond = inputPlug->readAndInsertSpecificTags(resultDset, proposedTS);
+        if (cond.bad()) {
+                delete resultDset;
+                resultDset = NULL;
+                return cond;
+        }
+
+        // Insert SOP Class specific attributes (and values)
+        cond = outPlug->convert(*resultDset);
+        if (cond.bad()) {
+                delete resultDset;
+                resultDset = NULL;
+                return cond;
+        }
+
+        // At last, apply override keys on dataset
+        applyOverrideKeys(resultDset);
+
+        // Do some very basic attribute checking (e. g. existence (type 2) and values (type 1))
+        if (!m_disableAttribChecks) {
+                OFString err;
+                err = isValid(*resultDset);
+                err += inputPlug->isValid(*resultDset);
+                err += outPlug->isValid(*resultDset);
+                if (!err.empty()) {
+                        delete resultDset;
+                        resultDset = NULL;
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, err.c_str());
+                }
+        }
+
+        return EC_Normal;
+}
+
+OFCondition Document2Dcm::updateOverrideKeys(DcmDataset* dset)
+{
+        if (dset == NULL) {
+                return EC_IllegalParameter;
+        }
+
+        applyOverrideKeys(dset);
+
+        return EC_Normal;
+}
+
+OFCondition Document2Dcm::insertLatin1(DcmDataset *outputDset)
+{
+        if (outputDset == NULL)
+                return EC_IllegalParameter;
+        return outputDset->putAndInsertOFStringArray(DCM_SpecificCharacterSet, "ISO_IR 100");
+}
+
+OFCondition Document2Dcm::insertUTF8(DcmDataset *outputDset)
+{
+        if (outputDset == NULL)
+                return EC_IllegalParameter;
+        return outputDset->putAndInsertOFStringArray(DCM_SpecificCharacterSet, "ISO_IR 192");
+}
+
+void Document2Dcm::cleanupTemplate(DcmDataset *targetDset)
+{
+        if (!targetDset)
+                return;
+        // Remove any existing image pixel module attribute
+        targetDset->findAndDeleteElement(DcmTagKey(0x0028, 0x7FE0)); // Pixel Data Provider URL (JPIP)
+        targetDset->findAndDeleteElement(DCM_PhotometricInterpretation);
+        targetDset->findAndDeleteElement(DCM_SamplesPerPixel);
+        targetDset->findAndDeleteElement(DCM_Rows);
+        targetDset->findAndDeleteElement(DCM_Columns);
+        targetDset->findAndDeleteElement(DCM_BitsAllocated);
+        targetDset->findAndDeleteElement(DCM_BitsStored);
+        targetDset->findAndDeleteElement(DCM_HighBit);
+        targetDset->findAndDeleteElement(DCM_PixelRepresentation);
+        targetDset->findAndDeleteElement(DCM_PixelData);
+        targetDset->findAndDeleteElement(DCM_PlanarConfiguration);
+        targetDset->findAndDeleteElement(DCM_PixelAspectRatio);
+        targetDset->findAndDeleteElement(DCM_SmallestImagePixelValue);
+        targetDset->findAndDeleteElement(DCM_LargestImagePixelValue);
+        targetDset->findAndDeleteElement(DCM_RedPaletteColorLookupTableDescriptor);
+        targetDset->findAndDeleteElement(DCM_GreenPaletteColorLookupTableDescriptor);
+        targetDset->findAndDeleteElement(DCM_BluePaletteColorLookupTableDescriptor);
+        targetDset->findAndDeleteElement(DCM_RedPaletteColorLookupTableData);
+        targetDset->findAndDeleteElement(DCM_GreenPaletteColorLookupTableData);
+        targetDset->findAndDeleteElement(DCM_BluePaletteColorLookupTableData);
+        targetDset->findAndDeleteElement(DCM_ICCProfile);
+        // Remove SOP Class / Instance information
+        targetDset->findAndDeleteElement(DCM_SOPClassUID);
+        targetDset->findAndDeleteElement(DCM_SOPInstanceUID);
+
+}
+
+OFCondition Document2Dcm::applyStudyOrSeriesFromFile(DcmDataset *targetDset)
+{
+        if (m_debug)
+                printMessage(m_logStream, "Document2Dcm: Applying study and/or series information from file");
+        if ((!m_readSeriesLevel && !m_readStudyLevel) || (m_studySeriesFile.length() == 0))
+                return EC_IllegalCall;
+        DcmFileFormat dcmff;
+        OFString errMsg;
+        OFCondition cond;
+
+        // Open DICOM file to read patient/study/series information from
+        cond = dcmff.loadFile(m_studySeriesFile.c_str());
+        if (cond.bad()) {
+                errMsg = "Error: Unable to open study / series file ";
+                errMsg += m_studySeriesFile;
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, errMsg.c_str());
+        }
+
+        DcmDataset *srcDset = NULL;
+        srcDset = dcmff.getDataset();
+        if (srcDset == NULL)
+                return EC_IllegalCall;
+
+        // Patient level attributes (type 2 - if value cannot be read, insert empty value
+        OFString value;
+        srcDset->findAndGetOFString(DCM_PatientName, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_PatientName, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Patients Name to file");
+        value.clear();
+
+        srcDset->findAndGetOFString(DCM_PatientID, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_PatientID, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Patient ID to file");
+        value.clear();
+
+        srcDset->findAndGetOFString(DCM_PatientSex, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_PatientSex, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Patient's Sex to file");
+        value.clear();
+
+        srcDset->findAndGetOFString(DCM_PatientBirthDate, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_PatientBirthDate, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Patient's Birth Date to file");
+        value.clear();
+
+        srcDset->findAndGetOFString(DCM_SpecificCharacterSet, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_SpecificCharacterSet, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Specific Character Set to file");
+        value.clear();
+
+        srcDset->findAndGetOFString(DCM_InstanceCreationDate, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_InstanceCreationDate, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Instance Creation Date to file");
+        value.clear();
+
+        srcDset->findAndGetOFString(DCM_InstanceCreationTime, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_InstanceCreationTime, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Instance Creation Time to file");
+        value.clear();
+
+        // Study level attributes (type 2 except Study Instance UID)
+
+        cond = srcDset->findAndGetOFString(DCM_StudyInstanceUID, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to read Study Instance UID (type 1) from file");
+        cond = targetDset->putAndInsertOFStringArray(DCM_StudyInstanceUID, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Study Instance UID to file");
+        value.clear();
+
+        srcDset->findAndGetOFString(DCM_StudyDate, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_StudyDate, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Study Date to file");
+        value.clear();
+
+        srcDset->findAndGetOFString(DCM_StudyTime, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_StudyTime, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Study Time to file");
+        value.clear();
+
+        srcDset->findAndGetOFString(DCM_ReferringPhysicianName, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_ReferringPhysicianName, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Referring Physician's Name to file");
+        value.clear();
+
+        srcDset->findAndGetOFString(DCM_StudyID, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_StudyID, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Study ID to file");
+        value.clear();
+
+        srcDset->findAndGetOFString(DCM_AccessionNumber, value);
+        cond = targetDset->putAndInsertOFStringArray(DCM_AccessionNumber, value);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Accession Number to file");
+        value.clear();
+
+        // Series Level attributes (type 2 except Series Instance UID which is type 1)
+        if (m_readSeriesLevel) {
+                // General Series Module attributes
+                cond = srcDset->findAndGetOFString(DCM_SeriesInstanceUID, value);
+                if (cond.bad())
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to read Series Instance UID (type 1) from file");
+                cond = targetDset->putAndInsertOFStringArray(DCM_SeriesInstanceUID, value);
+                if (cond.bad())
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Series Instance UID to file");
+                value.clear();
+
+                srcDset->findAndGetOFString(DCM_SeriesNumber, value);
+                cond = targetDset->putAndInsertOFStringArray(DCM_SeriesNumber, value);
+                if (cond.bad())
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Series Number to file");
+                value.clear();
+
+                // General Equipment Module attributes
+                srcDset->findAndGetOFString(DCM_Manufacturer, value);
+                cond = targetDset->putAndInsertOFStringArray(DCM_Manufacturer, value);
+                if (cond.bad())
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Manufacturer to file");
+                value.clear();
+        }
+
+        return EC_Normal;
+}
+
+OFCondition Document2Dcm::incrementInstanceNumber(DcmDataset *targetDset)
+{
+        // Read and increment Instance Number if desired
+        if (m_incInstNoFromFile) {
+                if (m_debug)
+                        printMessage(m_logStream, "Document2Dcm: Trying to read and increment instance number");
+                Sint32 instanceNumber;
+                if (targetDset->findAndGetSint32(DCM_InstanceNumber, instanceNumber).good()) {
+                        instanceNumber++;
+                        std::ostringstream os;
+                        os << OFstatic_cast(long, instanceNumber);
+                        OFCondition cond = targetDset->putAndInsertOFStringArray(DCM_InstanceNumber, os.str().c_str());
+                        if (cond.bad()) {
+                                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Instance Number to dataset");
+                        }
+                } else {
+                        OFCondition cond = targetDset->putAndInsertOFStringArray(DCM_InstanceNumber, "1");
+                        if (cond.bad()) {
+                                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Instance Number to dataset");
+                        }
+                }
+        }
+        return EC_Normal;
+}
+
+OFCondition Document2Dcm::generateUIDs(DcmDataset *dset)
+{
+        OFString value;
+        OFCondition cond;
+
+        if (m_debug)
+                printMessage(m_logStream, "Document2Dcm: Generate and insert new UIDs if necessary");
+        // Generate and write Series Instance UID if not already present
+        if (!m_readSeriesLevel) {
+                cond = dset->findAndGetOFString(DCM_SeriesInstanceUID, value);
+                if (cond.bad() || (value.length() == 0)) {
+                        cond = dset->putAndInsertOFStringArray(DCM_SeriesInstanceUID, GIL::DICOM::MakeUID(GIL::DICOM::GUID_SeriesRoot).c_str());
+                        if (cond.bad())
+                                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Series Instance UID to file");
+                }
+                value.clear();
+        }
+
+        // Generate and write Study Instance UID if not already present
+        if (!m_readStudyLevel) {
+                cond = dset->findAndGetOFString(DCM_StudyInstanceUID, value);
+                if (cond.bad() || (value.length() == 0)) {
+                        cond = dset->putAndInsertOFStringArray(DCM_StudyInstanceUID, GIL::DICOM::MakeUID(GIL::DICOM::GUID_StudyRoot).c_str());
+                        if (cond.bad())
+                                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Study Instance UID to file");
+                }
+                value.clear();
+
+                cond = dset->findAndGetOFString(DCM_AccessionNumber, value);
+                if (cond.bad() || (value.length() == 0)) {
+                        std::stringstream is;
+
+                        int random_integer;
+                        const int lowest  = 0;
+                        const int highest = 9999;
+                        const int range   = (highest-lowest)+1;
+
+                        const time_t timestamp = std::time(NULL);
+                        std::srand((unsigned int)timestamp);
+
+                        random_integer = lowest + int(range * rand()/(RAND_MAX + 1.0));
+
+                        is << (unsigned long) timestamp;
+                        is.width(4);
+                        is.fill('0');
+                        is << (unsigned int) random_integer;
+                        cond = dset->putAndInsertString(DCM_AccessionNumber, is.str().c_str());
+                        if (cond.bad()) {
+                                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write Accession Number");
+                        }
+                }
+                value.clear();
+        }
+
+        // Generate SOP Instance UID if not already present
+        cond = dset->findAndGetOFString(DCM_SOPInstanceUID, value);
+        if (cond.bad() || (value.length() == 0)) {
+                cond = dset->putAndInsertOFStringArray(DCM_SOPInstanceUID, GIL::DICOM::MakeUID(GIL::DICOM::GUID_InstanceRoot).c_str());
+                if (cond.bad())
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable write SOP Instance UID to file");
+        }
+
+        return EC_Normal;
+}
+
+void Document2Dcm::setISOLatin1(OFBool insertLatin1)
+{
+        m_insertLatin1 = insertLatin1;
+}
+
+void Document2Dcm::setUTF8(OFBool insertUTF8)
+{
+        m_insertUTF8 = insertUTF8;
+}
+
+
+OFString Document2Dcm::isValid(DcmDataset& dset) const
+{
+        if (m_debug)
+                printMessage(m_logStream, "Document2Dcm: Checking validity of DICOM output dataset");
+        OFString dummy, err;
+        OFCondition cond;
+        // General Patient module attributes
+        err += checkAndInventType2Attrib(DCM_PatientName, &dset);
+        err += checkAndInventType2Attrib(DCM_PatientSex, &dset);
+        err += checkAndInventType2Attrib(DCM_PatientBirthDate, &dset);
+        err += checkAndInventType2Attrib(DCM_PatientID, &dset);
+
+        // General Study module attributes
+        err += checkAndInventType1Attrib(DCM_StudyInstanceUID, &dset);
+        err += checkAndInventType2Attrib(DCM_StudyDate, &dset);
+        err += checkAndInventType2Attrib(DCM_StudyTime, &dset);
+        err += checkAndInventType2Attrib(DCM_ReferringPhysicianName, &dset);
+        err += checkAndInventType2Attrib(DCM_StudyID, &dset);
+        err += checkAndInventType2Attrib(DCM_AccessionNumber, &dset);
+
+        // General Series module attributes
+        err += checkAndInventType1Attrib(DCM_SeriesInstanceUID, &dset);
+        err += checkAndInventType2Attrib(DCM_SeriesNumber, &dset);
+        err += checkAndInventType2Attrib(DCM_InstanceNumber, &dset);
+
+        return err;
+}
+
+void Document2Dcm::setSeriesFrom(const OFString& file)
+{
+        m_readSeriesLevel = OFTrue;
+        m_studySeriesFile = file;
+}
+
+void Document2Dcm::setStudyFrom(const OFString& file)
+{
+        m_readStudyLevel = OFTrue;
+        m_studySeriesFile = file;
+}
+
+void Document2Dcm::setValidityChecking(OFBool doChecks,
+                                       OFBool insertMissingType2,
+                                       OFBool inventMissingType1)
+{
+        m_disableAttribChecks = !doChecks;
+        m_inventMissingType2Attribs = insertMissingType2;
+        m_inventMissingType1Attribs = inventMissingType1;
+}
+
+void Document2Dcm::setTemplateFile(const OFString& file)
+{
+        m_templateFile = file;
+}
+
+void Document2Dcm::setIncrementInstanceNumber(OFBool incInstNo)
+{
+        m_incInstNoFromFile = incInstNo;
+}
+
+void Document2Dcm::setOverrideKeys(DcmDataset* dset)
+{
+        if (m_overrideKeys != NULL) {
+                delete m_overrideKeys;
+        }
+        m_overrideKeys = dset;
+}
+
+void Document2Dcm::applyOverrideKeys(DcmDataset *outputDset)
+
+{
+        if ((m_overrideKeys == NULL) || (outputDset == NULL)) {
+                return; /* nothing to do */
+        }
+        if (m_debug)
+                printMessage(m_logStream, "Document2Dcm: Applying override keys");
+        /* copy the override keys */
+        DcmDataset keys(*m_overrideKeys);
+
+        /* put the override keys into dset replacing existing tags */
+        unsigned long elemCount = keys.card();
+        OFCondition cond;
+        for (unsigned long i = 0; i < elemCount; i++) {
+                DcmElement *elem = keys.remove((unsigned long) 0);
+                const DcmTag& tag = elem->getTag();
+                cond = outputDset->insert(elem, true, false);
+                if (cond.bad()) {
+                        std::ostringstream os;
+                        os << "Error al insertar Tag: " << tag.toString().c_str() << " : " << cond.text();
+                        LOG_ERROR("Dicomizacion", os.str());
+                } else {
+                        //std::cout << "Insertado  " << tag.toString().c_str() << std::endl;
+                }
+        }
+}
+
+Document2Dcm::~Document2Dcm()
+{
+        if (m_debug)
+                printMessage(m_logStream, "Document2Dcm: Freeing memory");
+        if (m_overrideKeys != NULL) {
+                delete m_overrideKeys;
+        }
+        m_overrideKeys = NULL;
+}
+
+
+/*
+* CVS/RCS Log:
+* $Log: i2d.cc,v $
+* Revision 1.2  2008-01-16 16:32:31  onken
+* Fixed some empty or doubled log messages in libi2d files.
+*
+* Revision 1.1  2008-01-16 14:36:02  onken
+* Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+*
+* Revision 1.1  2007/11/08 15:55:17  onken
+* Initial checkin of img2dcm application and corresponding library i2dlib.
+*
+*
+*/
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/document2dcm.h b/cadxcore/main/controllers/dcmtk/libi2d/document2dcm.h
new file mode 100644
index 0000000..7ac2cf7
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/document2dcm.h
@@ -0,0 +1,224 @@
+/*
+*
+*  $Id: document2dcm.h $
+*  Ginkgo CADx Project
+*
+*  Code addapted from DCMTK
+*
+*
+*  Copyright (C) 2001-2007, OFFIS
+*
+*  This software and supporting documentation were developed by
+*
+*    Kuratorium OFFIS e.V.
+*    Healthcare Information and Communication Systems
+*    Escherweg 2
+*    D-26121 Oldenburg, Germany
+*
+*  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+*  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+*  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+*  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+*  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+*
+*
+*/
+#pragma once
+
+#include "d2dcommon.h"
+#include "d2dsource.h"
+#include "i2doutpl.h"
+
+class Document2Dcm: public D2DCommon
+{
+
+public:
+
+        /** Constructor, initializes command line options
+        *  @return none
+        */
+        Document2Dcm();
+
+        /** Start the conversion. Needs a fully configured input plugin
+        *  and a fully configured output plugin to operate. Returns
+        *  a dataset with the resulting DICOM object.
+        *  @param inputPlug - [in] The input plugin to read pixel data
+        *  @param outPlug - [in] The output plugin for specific SOP class output
+        *  @param resultDset - [out] The DICOM object resulting from the conversion
+        *  @param proposedTS - [out] The proposed transfer syntax (needed e. g.
+        *                            by JPEG input plugin)
+        *  @return EC_Normal, if successfull, error otherwise
+        */
+        OFCondition convert(D2DSource *inputPlug,
+                            I2DOutputPlug *outPlug,
+                            DcmDataset*& resultDset,
+                            E_TransferSyntax& proposedTS);
+
+        OFCondition updateOverrideKeys(DcmDataset* dset);
+
+        /** Sets a DICOM file that should serve as a template for the resulting
+        * DICOM object. Only the dataset of the given file is imported.
+        * @param file - [in] The filename of the template DICOM file
+        * @return none
+        */
+        void setTemplateFile(const OFString& file);
+
+        /** Set file from which patient/study/series data should be imported from.
+        *  @param file - [in] The DICOM file to read from
+        *  @return none
+        */
+        void setSeriesFrom(const OFString& file);
+
+        /** Set file from which patient/study/series data should be imported from.
+        *  @param file - [in] The DICOM file to read from
+        *  @return none
+        */
+        void setStudyFrom(const OFString& file);
+
+        /** Enables/Disables incrementing instance number taken over from DICOM file.
+        *  This can either be a the study/series file or the template file
+        *  provided.
+        *  @param incInstNo - [in] If true, the instance number will be incremented
+        *  @return none
+        */
+        void setIncrementInstanceNumber(OFBool incInstNo);
+
+        /** Enables/disables autotmatic insertion of the value "ISO_IR100" as
+        * a value for the Specific Character Set attribute. If disabled,
+        * no value is inserted for Specifific Character Set but instead
+        * must be provided by other means (see setTemplateFile(), setSeriesFrom(),
+        * setStudyFrom(), setOverrideKeys()). The insertion is applied after
+        * loading the (optional) template file; the value might be overwritten
+        * by the value copied by setStudy/Series/OverrideKeys.
+        * @param insertLatin1 - [in] Enable/disable insertion of Iso Latin 1
+        * @return none;
+        */
+        void setISOLatin1(OFBool insertLatin1);
+
+        void setUTF8(OFBool insertUTF8);
+
+        /** Specifies some attributes that should be inserted after conversion.
+        *  They will override any identical attributes already existing in the
+        *  converted result DICOM object. The override keys are applied at the very
+        *  end of the conversion and do not undergoe any validity checking.
+        *  @param dset - [in] The dataset with override attributes
+        *  @return none
+        */
+        void setOverrideKeys(DcmDataset* dset);
+
+        DcmDataset* getOverrideKeys()
+        {
+                if (m_overrideKeys == NULL) {
+                        m_overrideKeys = new DcmDataset();
+                }
+                return m_overrideKeys;
+        };
+
+        /** Enable/Disable basic validity checks for output dataset
+        *  @param doChecks - [in] OFTrue enables checking, OFFalse turns it off.
+        *  @param insertMissingType2 - [in] If true (default), missing type 2
+        *         attributes are inserted automatically
+        *  @param inventMissingType1 - [in] If true , missing type 1
+        *         attributes are inserted automatically with a predefined
+        *         value (if possible). An existing empty type 1 attribute is
+        *         assigned a value, too.
+        *  @return none
+        */
+        void setValidityChecking(OFBool doChecks,
+                                 OFBool insertMissingType2 = OFTrue,
+                                 OFBool inventMissingType1 = OFTrue);
+
+
+
+        /** Destructor, frees plugin memory
+        *  @return none
+        */
+        ~Document2Dcm();
+
+protected:
+
+        /** Cleans up template for future insertion of pixel data information, ie
+        * generally removes attributes from image pixel module
+        * @param targetDset - [out] The dataset that should be cleand up
+        * @return none
+        */
+        void cleanupTemplate(DcmDataset *targetDset);
+
+        /** Parses patient/study/series level attributes from file as defined
+        *  on command line and fills internal attributes accordingly.
+        *  @param targetDset - [out] The dataset to write the attributes to
+        *  @return EC_Normal, if successful, error otherwise
+        */
+        OFCondition applyStudyOrSeriesFromFile(DcmDataset *targetDset);
+
+        /** Increments instance number in given dataset
+        *  @param targetDset - [in/out] Dataset to increment instance number in
+        *  @return EC_Normal, if successful, error otherwise
+        */
+        OFCondition incrementInstanceNumber(DcmDataset *targetDset);
+
+        /** Generates and inserts missing UIDs, ie UIDs not taken over
+        *  from --dataset-from --study from and --series-from options
+        *  @param dset - [in] The dataset to write the UIDs to
+        *  @return EC_Normal, if successful, error otherwise
+        */
+        OFCondition generateUIDs(DcmDataset *dset);
+
+        /** Do some completeness / validity checks. Should be called when
+        *  dataset is completed and is about to be saved.
+        *  @param dataset - [in] The dataset to check
+        *  @return Error string if error occurs, empty string otherwise
+        */
+        OFString isValid(DcmDataset& dataset) const;
+
+        /** Copy override keys over existing keys in given dataset.
+        *  @param outputDset - [out] dataset to which the override keys are copied
+        */
+        void applyOverrideKeys(DcmDataset *outputDset);
+
+        /** Inserts "ISO_IR100" in the attribute "Specific Character Set".
+        *  Overwrites any existing value.
+        *  @param outputDset - [out] The dataset to write to
+        *  @return EC_Normal if insertion is successfull, error code otherwise
+        */
+        OFCondition insertLatin1(DcmDataset *outputDset);
+
+        OFCondition insertUTF8(DcmDataset *outputDset);
+
+private:
+
+        /* Attributes for writing DICOM dataset */
+
+        /// These attributes are applied to the dataset after conversion
+        /// (and are not checked by the isValid() function)
+        DcmDataset *m_overrideKeys;
+
+        /// If not empty, the DICOM file specified in this variable is used
+        /// as a base for the DICOM image file to be created, ie. all attributes
+        /// are taken over from this template file
+        OFString m_templateFile;
+
+        /// If true, patient and study data is read from file
+        OFBool m_readStudyLevel;
+
+        /// If true, patient, study and series data is read from file
+        OFBool m_readSeriesLevel;
+
+        /// File to read study and series from
+        OFString m_studySeriesFile;
+
+        /// If true, Instance Number ist read from file and incremented by 1
+        OFBool m_incInstNoFromFile;
+
+        ///  If true, some simple attribute checks (missing type 2 attributes or
+        ///  missing type 1 values) are omitted
+        OFBool m_disableAttribChecks;
+
+        /// If enabled, ISO_IR100 (ISO Latin 1) is inserted as a standard value
+        /// for attribute "Specific Character Set". Insertion takes place after
+        /// loading (optional) template file.
+        OFBool m_insertLatin1;
+
+        OFBool m_insertUTF8;
+
+};
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/foooutpl.h b/cadxcore/main/controllers/dcmtk/libi2d/foooutpl.h
new file mode 100644
index 0000000..841ca29
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/foooutpl.h
@@ -0,0 +1,94 @@
+/*
+*
+*  $Id: foooutpl.h $
+*  Ginkgo CADx Project
+*
+*  Code addapted from DCMTK
+*
+*
+*  Copyright (C) 2001-2007, OFFIS
+*
+*  This software and supporting documentation were developed by
+*
+*    Kuratorium OFFIS e.V.
+*    Healthcare Information and Communication Systems
+*    Escherweg 2
+*    D-26121 Oldenburg, Germany
+*
+*  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+*  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+*  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+*  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+*  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+*
+*  Module:  dcmdata
+*
+*  Author:  Michael Onken
+*
+*  Purpose: Base class for converter from image file to DICOM
+*
+*  Last Update:      $Author: onken $
+*  Update Date:      $Date: 2009-01-16 09:51:55 $
+*  CVS/RCS Revision: $Revision: 1.4 $
+*  Status:           $State: Exp $
+*
+*  CVS/RCS Log at end of file
+*
+*/
+
+#pragma once
+
+#include "i2doutpl.h"
+
+class FooOutputPlug: public I2DOutputPlug
+{
+
+public:
+
+        /** Constructor, initializes member variables
+        *  @return none
+        */
+        FooOutputPlug() : I2DOutputPlug() {};
+
+        /** Virtual function that returns a short name of the plugin.
+        *  @return The name of the plugin
+        */
+        virtual OFString ident()
+        {
+                return "Foo";
+        }
+
+        /** Virtual function that returns the Storage SOP class UID, the plugin writes.
+        *  @param suppSOPs - [out] List containing supported output SOP classes
+        *  @return String containing the Storage SOP class UID
+        */
+        virtual void supportedSOPClassUIDs(OFList<OFString> /*suppSOPs*/)
+        {
+        }
+
+        /** Outputs SOP class specific information into dataset
+        * @param dataset - [in/out] Dataset to write to
+        * @return EC_Normal if successful, error otherwise
+        */
+        virtual OFCondition convert(DcmDataset &/*dataset*/) const
+        {
+                OFCondition cond;
+                return cond;
+        }
+
+        /** Do some completeness / validity checks. Should be called when
+        *  dataset is completed and is about to be saved.
+        *  @param dataset - [in] The dataset to check
+        *  @return Error string if error occurs, empty string otherwise
+        */
+        virtual OFString isValid(DcmDataset& /*dataset*/) const
+        {
+                return "";
+        }
+
+        /** Destructor
+        *  @return none
+        */
+        virtual ~FooOutputPlug() {};
+protected:
+};
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.cpp b/cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.cpp
new file mode 100644
index 0000000..2ca2d51
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.cpp
@@ -0,0 +1,305 @@
+/*
+*
+*  $Id: i2dimgs.cpp $
+*  Ginkgo CADx Project
+*
+*  Code addapted from DCMTK
+*
+*
+*  Copyright (C) 2001-2007, OFFIS
+*
+*  This software and supporting documentation were developed by
+*
+*    Kuratorium OFFIS e.V.
+*    Healthcare Information and Communication Systems
+*    Escherweg 2
+*    D-26121 Oldenburg, Germany
+*
+*  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+*  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+*  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+*  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+*  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+*
+*  Module:  dcmdata
+*
+*  Author:  Michael Onken
+*
+*  Purpose: Base Class for plugins extracting pixel data from standard
+*           image files
+*
+*  Last Update:      $Author: onken $
+*  Update Date:      $Date: 2009-01-16 09:51:55 $
+*  CVS/RCS Revision: $Revision: 1.2 $
+*  Status:           $State: Exp $
+*
+*  CVS/RCS Log at end of file
+*
+*/
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/config/osconfig.h>
+#include "document2dcm.h"
+#include <dcmtk/dcmdata/dcpxitem.h>
+
+#include "dcmtk/dcmdata/dctk.h"
+//#include "dcmtk/dcmdata/dcdebug.h"
+#include "dcmtk/dcmdata/cmdlnarg.h"
+#include "dcmtk/ofstd/ofconapp.h"
+#include "dcmtk/dcmdata/dcuid.h"     /* for dcmtk version name */
+#include "dcmtk/dcmjpeg/djencode.h"  /* for dcmjpeg encoders */
+#include "dcmtk/dcmjpeg/djrplol.h"   /* for DJ_RPLossless */
+#include "dcmtk/dcmjpeg/djrploss.h"   /* for DJ_RPLossy */
+#include "dcmtk/dcmjpeg/dipijpeg.h"  /* for dcmimage JPEG plugin */
+#include "dcmtk/dcmimage/diregist.h"  /* include to support color images */
+
+#include "i2dimgs.h"
+#include <main/controllers/controladorpermisos.h>
+
+#ifdef DCMTK_POST_20170228
+#include <api/dicom/dicom_legacy.h>
+#endif 
+
+
+/** Reads pixel data and corresponding attributes like rows etc. from image
+*  file and inserts them into dataset.
+*  @param dset - [out] The dataset to export the pixel data attributes to
+*  @param outputTS - [out] The proposed transfex syntax of the dataset
+*  @return EC_Normal, if successful, error otherwise
+*/
+OFCondition I2DImgSource::readAndInsertSpecificTags( DcmDataset* dset, E_TransferSyntax& outputTS)
+{
+        Uint16 samplesPerPixel, rows, cols, bitsAlloc, bitsStored, highBit, pixelRepr, planConf;
+        Uint16 pixAspectH = 1;
+        Uint16 pixAspectV = 1;
+        OFString photoMetrInt;
+        outputTS = EXS_Unknown;
+        char* pixData = NULL;
+        Uint32 length;
+
+        OFCondition cond = readPixelData(rows, cols,
+                                         samplesPerPixel, photoMetrInt, bitsAlloc, bitsStored, highBit, pixelRepr,
+                                         planConf, pixAspectH, pixAspectV, pixData, length, outputTS);
+        if (cond.bad())
+                return cond;
+
+        if (m_debug)
+                printMessage(m_logStream, "Document2Dcm: Store imported pixel data to DICOM file");
+
+        cond = dset->putAndInsertUint16(DCM_SamplesPerPixel, samplesPerPixel);
+        if (cond.bad())
+                return cond;
+
+        cond = dset->putAndInsertOFStringArray(DCM_PhotometricInterpretation, photoMetrInt);
+        if (cond.bad())
+                return cond;
+
+        cond = dset->putAndInsertOFStringArray(DCM_ConversionType, "WSD");
+        if (cond.bad())
+                return cond;
+        /*
+        cond = dset->putAndInsertOFStringArray(DCM_ImagerPixelSpacing, "1.000000\\1.000000");
+        if (cond.bad())
+        return cond;
+
+        cond = dset->putAndInsertOFStringArray(DCM_PixelSpacing, "1.000000\\1.000000");
+        if (cond.bad())
+        return cond;
+        */
+        cond = dset->putAndInsertOFStringArray(DCM_ImagePositionPatient, "0.000000\\0.000000\\0.000000");
+        if (cond.bad())
+                return cond;
+
+        cond = dset->putAndInsertOFStringArray(DCM_ImageOrientationPatient, "1.000000\\0.000000\\0.000000\\0.000000\\1.000000\\0.000000");
+        if (cond.bad())
+                return cond;
+
+
+        // Should only be written if Samples per Pixel > 1
+        if (samplesPerPixel > 1) {
+                cond = dset->putAndInsertUint16(DCM_PlanarConfiguration, planConf);
+                if (cond.bad())
+                        return cond;
+        }
+
+        cond = dset->putAndInsertUint16(DCM_Rows, rows);
+        if (cond.bad())
+                return cond;
+
+        cond = dset->putAndInsertUint16(DCM_Columns, cols);
+        if (cond.bad())
+                return cond;
+
+        cond = dset->putAndInsertUint16(DCM_BitsAllocated, bitsAlloc);
+        if (cond.bad())
+                return cond;
+
+        cond = dset->putAndInsertUint16(DCM_BitsStored, bitsStored);
+        if (cond.bad())
+                return cond;
+
+        cond = dset->putAndInsertUint16(DCM_HighBit, highBit);
+        if (cond.bad())
+                return cond;
+
+        cond = dset->putAndInsertUint16(DCM_PixelRepresentation, pixelRepr);
+        if (cond.bad())
+                return cond;
+
+
+        if (Recompress()) {
+                // create initial pixel sequence
+                DcmElement* element = newDicomElement(DcmTag(DCM_PixelData, EVR_OW));
+                element->putUint8Array((const Uint8*)pixData, length);
+                cond = dset->insert(element);
+                if (cond.bad()) {
+                        delete element;
+                        return cond;
+                }
+
+                //lo pasamos a jpeg lossless
+                // create representation parameters for lossy and lossless
+                OFCmdUnsignedInt opt_selection_value = 6;
+                //este numero implica cierta perdida... si fuera 0 seria lossless real
+                OFCmdUnsignedInt opt_point_transform = 3;
+
+                E_TransferSyntax opt_oxfer;
+                GNC::GCS::Permisos::EstadoPermiso codificacion = GNC::GCS::IControladorPermisos::Instance()->Get("core.importacion", "codec");
+                switch (codificacion.ObtenerValor<int>()) {
+                case 0: {
+                        //baseline
+                        opt_oxfer = EXS_JPEGProcess1;
+                        DJ_RPLossy rp_lossy((int)90);
+                        const DcmRepresentationParameter *rp = &rp_lossy;
+                        dset->chooseRepresentation(opt_oxfer, rp);
+                }
+                break;
+                case 1: {
+                        //progresivo
+                        opt_oxfer = EXS_JPEGProcess10_12;
+                        DJ_RPLossy rp_lossy((int)90);
+                        const DcmRepresentationParameter *rp = &rp_lossy;
+                        dset->chooseRepresentation(opt_oxfer, rp);
+                }
+                break;
+                case 2:
+                default: {
+                        //lossless
+                        GNC::GCS::Permisos::EstadoPermiso estado = GNC::GCS::IControladorPermisos::Instance()->Get("core.importacion", "quality");
+                        if (estado) {
+                                opt_point_transform = std::min<int>(estado.ObtenerValor<int>(), 14);
+                                opt_point_transform = std::max<int>(estado.ObtenerValor<int>(), 0);
+                        }
+                        opt_oxfer = EXS_JPEGProcess14SV1;
+                        DJ_RPLossless rp_lossless((int)opt_selection_value, (int)opt_point_transform);
+                        const DcmRepresentationParameter *rp = &rp_lossless;
+                        dset->chooseRepresentation(opt_oxfer, rp);
+                }
+                break;
+                }
+
+                if(!dset->canWriteXfer(opt_oxfer))
+                        return OFCondition(EC_UnsupportedEncoding);
+
+                // force meta-header to refresh SOP Class/Instance UIDs.
+                delete dset->remove(DCM_MediaStorageSOPClassUID);
+                delete dset->remove(DCM_MediaStorageSOPInstanceUID);
+                outputTS = opt_oxfer;
+
+                return cond;
+        } else {
+                if (IsCompressed()) {
+                        DcmPixelSequence *pixelSequence = NULL;
+
+                        if (m_debug)
+                                printMessage(m_logStream, "Document2Dcm: Store imported pixel data to DICOM file");
+                        // create initial pixel sequence
+                        pixelSequence = new DcmPixelSequence(DcmTag(DCM_PixelData, EVR_OB));
+                        if (pixelSequence == NULL)
+                                return EC_MemoryExhausted;
+                        // insert empty offset table into sequence
+                        DcmPixelItem *offsetTable = new DcmPixelItem(DcmTag(DCM_Item, EVR_OB));
+                        if (offsetTable == NULL) {
+                                delete pixelSequence;
+                                pixelSequence = NULL;
+                                return EC_MemoryExhausted;
+                        }
+                        cond = pixelSequence->insert(offsetTable);
+                        if (cond.bad()) {
+                                delete offsetTable;
+                                offsetTable = NULL;
+                                delete pixelSequence;
+                                pixelSequence = NULL;
+                                return cond;
+                        }
+
+                        // insert frame into pixel sequence
+                        DcmOffsetList dummyList;
+                        cond = pixelSequence->storeCompressedFrame(dummyList, (Uint8*) pixData, length, 0);
+                        // storeCompressedFrame(..) does a deep copy, so the pixdata memory can be freed now
+                        delete[] pixData;
+                        if (cond.bad()) {
+                                delete pixelSequence;
+                                return cond;
+                        }
+                        cond = dset->insert(pixelSequence);
+                        if (cond.bad())
+                                delete pixelSequence;
+
+                        if (m_debug)
+                                printMessage(m_logStream, "Document2Dcm: Inserting Image Pixel module information");
+                        return dset->putAndInsertUint16(DCM_PixelRepresentation, pixelRepr);
+                } else {
+                        //little endian to little endian...
+                        // create initial pixel sequence
+                        DcmElement* element = newDicomElement(DcmTag(DCM_PixelData, EVR_OW));
+                        element->putUint8Array((const Uint8*)pixData, length);
+                        cond = dset->insert(element);
+                        if (cond.bad()) {
+                                delete element;
+                                return cond;
+                        }
+                        outputTS = EXS_LittleEndianExplicit;
+
+                        return cond;
+                }
+        }
+}
+
+/** Do some completeness / validity checks. Should be called when
+*  dataset is completed and is about to be saved.
+*  @param dataset - [in] The dataset to check
+*  @return Error string if error occurs, empty string otherwise
+*/
+OFString I2DImgSource::isValid(DcmDataset& dset) const
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DImgSource: Checking validity of DICOM output dataset");
+        OFString dummy, err;
+        OFCondition cond;
+        // General Image module attributes
+        /* Patient Orientation is of type 2C and must be written if not
+        Image Orientation (Patient) (0020,0037) and Image Position (Patient)
+        are required for the IOD. The current output IODs (SC, new SC, VLP)
+        therefore need Patient Orientation. Make sure any new output plugin
+        takes care about this attribute
+        */
+        err += checkAndInventType2Attrib(DCM_PatientOrientation, &dset);
+
+
+        // Image Pixel Module
+        err += checkAndInventType1Attrib(DCM_Rows, &dset);
+        err += checkAndInventType1Attrib(DCM_Columns, &dset);
+        err += checkAndInventType1Attrib(DCM_SamplesPerPixel, &dset);
+        err += checkAndInventType1Attrib(DCM_PhotometricInterpretation, &dset);
+        err += checkAndInventType1Attrib(DCM_BitsAllocated, &dset);
+        err += checkAndInventType1Attrib(DCM_BitsStored, &dset);
+        err += checkAndInventType1Attrib(DCM_HighBit, &dset);
+        err += checkAndInventType1Attrib(DCM_PixelRepresentation, &dset);
+        err += checkAndInventType1Attrib(DCM_SOPInstanceUID, &dset);
+
+        return err;
+}
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.h b/cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.h
new file mode 100644
index 0000000..2403837
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.h
@@ -0,0 +1,152 @@
+/*
+*
+*  $Id: i2dimgs.h $
+*  Ginkgo CADx Project
+*
+*  Code addapted from DCMTK
+*
+*
+*  Copyright (C) 2001-2007, OFFIS
+*
+*  This software and supporting documentation were developed by
+*
+*    Kuratorium OFFIS e.V.
+*    Healthcare Information and Communication Systems
+*    Escherweg 2
+*    D-26121 Oldenburg, Germany
+*
+*  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+*  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+*  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+*  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+*  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+*
+*  Module:  dcmdata
+*
+*  Author:  Michael Onken
+*
+*  Purpose: Base Class for plugins extracting pixel data from standard
+*           image files
+*
+*  Last Update:      $Author: onken $
+*  Update Date:      $Date: 2009-01-16 09:51:55 $
+*  CVS/RCS Revision: $Revision: 1.2 $
+*  Status:           $State: Exp $
+*
+*  CVS/RCS Log at end of file
+*
+*/
+
+#pragma once
+
+#include "d2dsource.h"
+
+class I2DImgSource: public D2DSource
+{
+
+public:
+
+        /** Constructor
+        */
+        I2DImgSource() : D2DSource() {}
+
+        /** Returns identifier for the image input format the plugin imports.
+        *  @return A short identifier (e. g. "JPEG")
+        */
+        virtual OFString inputFormat() const =0;
+
+        /** true if pixeldata is compressed
+        */
+        virtual bool IsCompressed() const = 0;
+
+        /*true if pixeldata has to be compressed*/
+        virtual bool Recompress() const = 0;
+
+        /** Reads pixel data and corresponding attributes like rows etc. from image
+        *  file and inserts them into dataset.
+        *  @param dset - [out] The dataset to export the pixel data attributes to
+        *  @param outputTS - [out] The proposed transfex syntax of the dataset
+        *  @return EC_Normal, if successful, error otherwise
+        */
+        virtual OFCondition readAndInsertSpecificTags( DcmDataset* dset,
+                        E_TransferSyntax& outputTS);
+
+        /** Do some completeness / validity checks. Should be called when
+        *  dataset is completed and is about to be saved.
+        *  @param dataset - [in] The dataset to check
+        *  @return Error string if error occurs, empty string otherwise
+        */
+        OFString isValid(DcmDataset& dset) const;
+
+        /** Extracts the raw JPEG pixel data stream from a JPEG file and returns some
+        *  image information about this pixel data.
+        *  Raw means here that all APP markers (e.g. JFIF information) are removed from the JPEG stream.
+        *  The pixel data returned is a JPEG stream in JPEG interchange format.
+        *  This function allocates memory for the pixel data returned to the user. The caller of this
+        *  function is responsible for deleting the memory buffer
+        *  @param rows - [out] Rows of image
+        *  @param cols - [out] Columns of image
+        *  @param samplesPerPixel - [out] Number of components per pixel
+        *  @param photoMetrInt - [out] The DICOM color model used for the compressed data
+        *  @param bitsAlloc - [out] Bits Allocated for one sample
+        *  @param bitsStored - [out] Bits Stored, number of bits stored within Bits Allocated
+        *  @param highBit - [out] High Bit, hightest bit position set within Bits Allocated
+        *  @param pixelRepr - [out] Pixel Representation (0=unsigned, 1=signed)
+        *  @param planConf - [out] Planar Configuration
+        *  @param pixAspectH - [out] Horizontal value of pixel aspect ratio
+        *  @param pixAspectV - [out] Vertical value of pixel aspect ratio
+        *  @param pixData - [out] Pointer to the pixel data in JPEG Interchange Format (but without APPx markers).
+        *  @param length - [out] Length of pixel data
+        *  @param ts - [out] The transfer syntax imposed by the imported pixel pixel data.
+        This is necessary for the JPEG importer that needs to report
+        which TS must be used for the imported JPEG data (ie. baseline, progressive, ...).
+        If pixel data is uncompressed, EXS_Unknown is returned
+        *  @return EC_Normal, if successful, error otherwise
+        */
+        virtual OFCondition readPixelData( Uint16& rows,
+                                           Uint16& cols,
+                                           Uint16& samplesPerPixel,
+                                           OFString& photoMetrInt,
+                                           Uint16& bitsAlloc,
+                                           Uint16& bitsStored,
+                                           Uint16& highBit,
+                                           Uint16& pixelRepr,
+                                           Uint16& planConf,
+                                           Uint16& pixAspectH,
+                                           Uint16& pixAspectV,
+                                           char*&  pixData,
+                                           Uint32& length,
+                                           E_TransferSyntax& ts) =0;
+
+
+        /** Virtual Destructor
+        */
+        virtual ~I2DImgSource() {}
+
+protected:
+
+
+};
+
+/*
+* CVS/RCS Log:
+* $Log: i2dimgs.h,v $
+* Revision 1.2  2009-01-16 09:51:55  onken
+* Completed doxygen documentation for libi2d.
+*
+* Revision 1.1  2008-01-16 15:08:38  onken
+* Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+*
+* Revision 1.2  2008-01-11 14:17:53  onken
+* Added various options to i2dlib. Changed logging to use a configurable
+* logstream. Added output plugin for the new Multiframe Secondary Capture SOP
+* Classes. Added mode for JPEG plugin to copy exsiting APPn markers (except
+* JFIF). Changed img2dcm default behaviour to invent type1/type2 attributes (no
+* need for templates any more). Added some bug fixes.
+*
+* Revision 1.1  2007/11/08 15:58:55  onken
+* Initial checkin of img2dcm application and corresponding library i2dlib.
+*
+*
+*/
+
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.cpp b/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.cpp
new file mode 100644
index 0000000..a94f87e
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.cpp
@@ -0,0 +1,940 @@
+/*
+ *
+ *  $Id: i2djpgs.cpp $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Class to extract pixel data and meta information from JPEG file
+ *
+ *  Last Update:      $Author: meichel $
+ *  Update Date:      $Date: 2009-02-18 12:22:11 $
+ *  CVS/RCS Revision: $Revision: 1.4 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include "i2djpgs.h"
+
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+I2DJpegSource::I2DJpegSource() : m_jpegFileMap(), jpegFile(),
+        m_disableProgrTs(OFFalse), m_disableExtSeqTs(OFFalse), m_insistOnJFIF(OFFalse),
+        m_keepAPPn(OFFalse)
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DJpegSource: Plugin instantiated");
+}
+
+
+OFString I2DJpegSource::inputFormat() const
+{
+        return "JPEG";
+}
+
+OFCondition I2DJpegSource::openFile(const OFString &filename)
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DJpegSource: Opening JPEG file: ", filename);
+        OFCondition cond;
+        if (filename.length() == 0)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "No JPEG filename specified");
+
+        // Try to open JPEG file
+        if ((jpegFile.of_fopen(filename.c_str(), "rb")) == OFFalse)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to open JPEG file");
+
+        return cond;
+}
+
+
+void I2DJpegSource::setExtSeqSupport(const OFBool enabled)
+{
+        m_disableExtSeqTs = !enabled;
+}
+
+
+void I2DJpegSource::setProgrSupport(const OFBool enabled)
+{
+        m_disableProgrTs = !enabled;
+}
+
+
+void I2DJpegSource::setInsistOnJFIF(const OFBool enabled)
+{
+        m_insistOnJFIF = enabled;
+}
+
+
+void I2DJpegSource::setKeepAPPn(const OFBool enabled)
+{
+        m_keepAPPn = enabled;
+}
+
+
+OFCondition I2DJpegSource::readPixelData(Uint16& rows,
+                Uint16& cols,
+                Uint16& samplesPerPixel,
+                OFString& photoMetrInt,
+                Uint16& bitsAlloc,
+                Uint16& bitsStored,
+                Uint16& highBit,
+                Uint16& pixelRepr,
+                Uint16& planConf,
+                Uint16& pixAspectH,
+                Uint16& pixAspectV,
+                char*&  pixData,
+                Uint32& length,
+                E_TransferSyntax &ts)
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DJpegSource: Importing JPEG pixel data");
+        OFCondition cond = openFile(m_imageFile);
+        // return error if file is not open
+        if (cond.bad()) {
+                closeFile();
+                return cond;
+        }
+        // Create "map" with byte positions of all JPEG markers in JPEG file
+        cond = createJPEGFileMap();
+        if (cond.bad()) {
+                clearMap();
+                closeFile();
+                return cond;
+        }
+
+        // Check for image data in file (look for SOF marker)
+        E_JPGMARKER jpegEncoding = E_JPGMARKER_UNKNOWN;
+        OFIterator<JPEGFileMapEntry*> entry = m_jpegFileMap.begin();
+        while (entry != m_jpegFileMap.end()) {
+                if ( isSOFMarker((*entry)->marker) ) {
+                        jpegEncoding = (E_JPGMARKER) ((*entry)->marker);
+                        break;
+                }
+                entry++;
+        }
+        if (entry == m_jpegFileMap.end()) {
+                closeFile();
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "No image data found in JPEG file");
+        }
+
+        // Reject arithmetic and hierarchical (differential) encodings (not supported)
+        cond =  isJPEGEncodingSupported(jpegEncoding);
+        if (cond.bad()) {
+                closeFile();
+                return cond;
+        }
+
+        // Get transfer syntax associated with the given JPEG encoding
+        ts = associatedTS(jpegEncoding);
+
+        // Extract width, height, samples per pixel, bits per sample
+        Uint16 width, height, spp, bps;
+        cond = getSOFImageParameters(**entry, width, height, spp, bps);
+        if (cond.bad()) {
+                closeFile();
+                return cond;
+        }
+
+        // Return error if invalid image attributes were found
+        if (height == 0 || width == 0) {
+                closeFile();
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid image size (width or height = 0)");
+        }
+
+        // Examine JFIF information (version, horizontal and vertical aspect ratio, aspect ratio units.
+        Uint16 jfifVersion, unit;
+        Uint16 aspectH = 1;
+        Uint16 aspectV = 1;
+        entry = m_jpegFileMap.begin();
+        while (entry != m_jpegFileMap.end()) {
+                if ( (*entry)->marker == E_JPGMARKER_APP0 )
+                        break;
+                entry++;
+        }
+        if ( entry == m_jpegFileMap.end()) {
+                if (!m_insistOnJFIF) {
+                        if (m_debug)
+                                printMessage(m_logStream, "I2DJpegSource: Ignoring missing JFIF header");
+                } else {
+                        closeFile();
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "No JFIF information found in JPEG file");
+                }
+        } else
+                cond = getJFIFImageParameters(**entry, jfifVersion, aspectH, aspectV, unit);
+        if (cond.bad()) {
+                if (!m_insistOnJFIF) {
+                        if (m_debug)
+                                printMessage(m_logStream, "I2DJpegSource: Ignoring errors while evaluating JFIF data");
+                } else {
+                        closeFile();
+                        return cond;
+                }
+        }
+        pixAspectH = aspectH;
+        pixAspectV = aspectV;
+
+        // Collect information needed for image pixel module
+        rows = height;
+        cols = width;
+        samplesPerPixel = spp;
+        bitsAlloc = bps;
+        bitsStored = bitsAlloc;
+        highBit = bitsStored - 1;
+        if (samplesPerPixel == 1)
+                photoMetrInt = "MONOCHROME2";
+        else if (samplesPerPixel == 3)
+                photoMetrInt = "YBR_FULL_422";
+        else
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "For JPEG data, Samples per Pixel must be 1 or 3");
+        // Planar Configuration and Pixel Representation is always 0 for JPEG data
+        planConf = 0;
+        pixelRepr = 0;
+
+        Uint32 tLength = 0;
+        char* tPixelData = NULL;
+        // Keep all APPx info (however, JFIF is always removed)
+        if (m_keepAPPn)
+                cond = copyJPEGStream(tPixelData, tLength);
+        // Cut off all APPx information from JPEG and get raw JPEG bit stream into memory
+        else
+                cond = extractRawJPEGStream(tPixelData, tLength);
+        if (cond.bad()) {
+                closeFile();
+                return cond;
+        }
+        length = tLength;
+        pixData = tPixelData;
+        return cond;
+}
+
+/*
+ * Process a SOFn marker.
+ */
+OFCondition I2DJpegSource::getSOFImageParameters( const JPEGFileMapEntry& entry,
+                Uint16& imageWidth,
+                Uint16& imageHeight,
+                Uint16& samplesPerPixel,
+                Uint16& bitsPerSample)
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DJpegSource: Checking for JPEG SOF image parameters");
+        if ( (entry.marker < E_JPGMARKER_SOF0) || (entry.marker > E_JPGMARKER_SOF15) )
+                return EC_IllegalCall;
+        Uint16 length;
+        Uint16 image_height, image_width;
+        Uint8 data_precision, num_components;
+        int result;
+
+        // seek to the given SOFn marker
+
+        jpegFile.of_fseek(entry.bytePos, SEEK_SET);
+        result = read2Bytes(length);  /* usual parameter length count */
+        if (result == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+        // read values
+
+        result = read1Byte(data_precision);
+        if (result == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+        result = read2Bytes(image_height);
+        if (result == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+        result = read2Bytes(image_width);
+        if (result == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+        result = read1Byte(num_components);
+        if (result == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+        imageWidth = image_width;
+        imageHeight = image_height;
+        samplesPerPixel = num_components;
+        bitsPerSample = data_precision;
+
+        if (m_debug) {
+                char buf[100];
+                printMessage(m_logStream, "I2DJpegSource: JPEG SOF image parameters:");
+                sprintf(buf, "%u", image_width);
+                printMessage(m_logStream, "I2DJpegSource:   Image Width: ", buf);
+                sprintf(buf, "%u", image_height);
+                printMessage(m_logStream, "I2DJpegSource:   Image Height: ", buf);
+                sprintf(buf, "%u", num_components);
+                printMessage(m_logStream, "I2DJpegSource:   Number of Components: ", buf);
+                sprintf(buf, "%u", data_precision);
+                printMessage(m_logStream, "I2DJpegSource:   Data Precision: ", buf);
+        }
+
+        if (length != (unsigned int) (8 + num_components * 3))
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Bogus SOF marker length");
+
+        return EC_Normal;
+}
+
+
+// ignores thumbnail data
+OFCondition I2DJpegSource::getJFIFImageParameters( const JPEGFileMapEntry& entry,
+                Uint16& jfifVersion,
+                Uint16& pixelAspectH,
+                Uint16& pixelAspectV,
+                Uint16& unit)
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DJpegSource: Examing JFIF information");
+        if (entry.marker != E_JPGMARKER_APP0)
+                return EC_IllegalCall;
+        Uint16 jv, pah, pav, unt;
+
+        // go to specified byte position and read on to value field
+        Uint16 length;
+        jpegFile.of_fseek(entry.bytePos, SEEK_SET);
+        int result = read2Bytes(length);  /* usual parameter length count */
+        if (result == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+        // read and check the 5 byte "JFIF" marker value (X'4A', X'46', X'49', X'46', X'00')
+        Uint16 twoBytes;
+        result = read2Bytes(twoBytes);
+        if ( (result == EOF) || (twoBytes != 0x4a46) )
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found");
+        result = read2Bytes(twoBytes);
+        if ( (result == EOF) || (twoBytes != 0x4946) )
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found");
+        Uint8 oneByte;
+        result = read1Byte(oneByte);
+        if ( (result == EOF)|| (oneByte != 0x00) )
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Invalid JFIF marker or JFIF marker not found");
+
+        // read JFIF version
+        result = read2Bytes(twoBytes);
+        if (result == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+        jv = twoBytes;
+
+        // read pixel aspect ratio unit
+        result = read1Byte(oneByte);
+        if ( (result == EOF) || (oneByte > 2) )
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+        unt = oneByte;
+
+        // read horizontal aspect ratio (XDensity)
+        result = read2Bytes(twoBytes);
+        if (result == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+        pah = twoBytes;
+
+        // read vertical aspect ratio (YDensity)
+        result = read2Bytes(twoBytes);
+        if (result == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+        pav = twoBytes;
+
+        // prepare return values and return
+        jfifVersion = jv;
+        pixelAspectH = pah;
+        pixelAspectV = pav;
+        unit = unt;
+
+        if (m_debug) {
+                char buf[100];
+                printMessage(m_logStream, "I2DJpegSource: JPEG JFIF image parameters:", buf);
+                sprintf(buf, "%u", jfifVersion);
+                printMessage(m_logStream, "I2DJpegSource:   JFIF version: ", buf);
+                sprintf(buf, "%u", pixelAspectH);
+                printMessage(m_logStream, "I2DJpegSource:   Horizontal Pixel Aspect Ratio ", buf);
+                sprintf(buf, "%u", pixelAspectV);
+                printMessage(m_logStream, "I2DJpegSource:   Vertical Pixel Aspect Ratio: ", buf);
+                sprintf(buf, "%u", unit);
+                printMessage(m_logStream, "I2DJpegSource:   Units: ", buf);
+        }
+
+        return EC_Normal;
+}
+
+
+OFCondition I2DJpegSource::copyJPEGStream(char*& pixelData,
+                Uint32& pixLength)
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DJpegSource: Copying JPEG data from JPEG file");
+        /* Calculate length of total stream as found in the file
+         * Therefore, look at byte positions from SOI and EOI marker */
+
+        offile_off_t bytePosJFIF = 0;
+        offile_off_t bytePosAfterJFIF = 0;
+        int marker = 0;
+
+        // determine file size
+        offile_off_t result = jpegFile.of_fseek(0, SEEK_END);
+        if (result != 0)
+                return EC_IllegalParameter;
+        offile_off_t filesize = jpegFile.of_ftell();
+
+        // Only pixel data up to 2^32 bytes is supported (DICOM) and maximum size for "new" operator = size_t
+
+        if (  (unsigned long long)filesize > 0xffffffff ) {
+                printMessage(m_logStream, "I2DJpegSource: JPEG file length longer than 2^32 bytes (or larger than size_t capacity), aborting");
+                return EC_MemoryExhausted;
+        }
+
+        // get position of JFIF section and SOI marker
+        OFIterator<JPEGFileMapEntry*> entry = m_jpegFileMap.begin();
+        while (entry != m_jpegFileMap.end()) {
+                marker = (*entry)->marker;
+                if ( marker == E_JPGMARKER_APP0 ) {
+                        bytePosJFIF = (*entry)->bytePos - 1; // include first byte of marker (FF)
+                        entry++;
+                        bytePosAfterJFIF = (*entry)->bytePos - 1; // include first byte (FF) of marker after APPn
+                        break;
+                }
+                entry++;
+        }
+
+        // Go to starting position (SOI marker) of JPEG stream data
+        jpegFile.of_fseek(0, SEEK_SET);
+
+        // Allocate buffer for raw JPEG data
+        pixLength = OFstatic_cast(Uint32, filesize - (bytePosAfterJFIF - bytePosJFIF));
+        pixelData = new char[pixLength];
+        char *currBufferPos = pixelData;
+
+        // exclude JFIF if present
+        if (bytePosJFIF != 0) {
+                // read from SOI to JFIF
+                result = jpegFile.of_fread (currBufferPos, 1, 2);
+                if (result != 2)
+                        return EC_IllegalCall;
+                currBufferPos += 2;
+                // read from end of JFIF to end of file
+                jpegFile.of_fseek(bytePosAfterJFIF - 1, SEEK_SET); // -1 because offsets start with 0
+                result = jpegFile.of_fread (currBufferPos, 1, OFstatic_cast(size_t, (filesize - bytePosAfterJFIF + 1)));
+                if (result != filesize - bytePosAfterJFIF + 1)
+                        return EC_IllegalCall;
+        } else { // otherwise copy everything starting with SOI marker
+                result = jpegFile.of_fread (currBufferPos, 1, OFstatic_cast(size_t, filesize));
+                if (result != filesize)
+                        return EC_IllegalCall;
+        }
+        return EC_Normal;
+}
+
+
+// expects valid JPEG stream (especially exactly one SOI and one EOI marker)
+OFCondition I2DJpegSource::extractRawJPEGStream(char*& pixelData,
+                Uint32& pixLength)
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DJpegSource: Extracting JPEG data from JPEG file");
+        OFCondition cond;
+        int marker = 0;
+        Uint16 length;
+
+        /* Calculate length of total stream as found in the file
+         * Therefore, look at byte positions from SOI and EOI marker and
+         * and exclude all APPn markers in calculation
+         */
+
+        offile_off_t bytePosSOI = 0;
+        offile_off_t bytePosEOI = 0;
+        offile_off_t totalAPPSize = 0;
+        OFList<offile_off_t> appPosAndLengths;
+
+        OFIterator<JPEGFileMapEntry*> entry = m_jpegFileMap.begin();
+        while (entry != m_jpegFileMap.end()) {
+                marker = (*entry)->marker;
+
+                if (marker == E_JPGMARKER_SOI) {
+                        bytePosSOI = (*entry)->bytePos;
+                        // Subtract one byte for the preceding 0xFF of the SOI-Marker
+                        bytePosSOI -= 1;
+                } else if (marker == E_JPGMARKER_EOI) {
+                        bytePosEOI = (*entry)->bytePos;
+                        // No need to subtract / add bytes
+                        break;
+                } else if (marker >= E_JPGMARKER_APP0 && marker <= E_JPGMARKER_APP15) {
+                        jpegFile.of_fseek((*entry)->bytePos - jpegFile.of_ftell(), SEEK_CUR);
+                        int result = read2Bytes( length);
+                        if (result == EOF) {
+                                jpegFile.of_fclose();
+                                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+                        }
+                        // remember pos and length of APP data so we don't need a second "scan" for that
+                        appPosAndLengths.push_back( (*entry)->bytePos - 1 ); // -1 for FF of marker
+                        appPosAndLengths.push_back( length );
+                        // add length of marker value to total APP size
+                        totalAPPSize += length;
+                        // add the marker length itself to total APP size
+                        totalAPPSize += 2;
+                }
+                // Advance to next segment
+                entry++;
+        }
+
+        if ( (entry == m_jpegFileMap.end()) || (bytePosSOI == 0) || (bytePosEOI == 0)) // at least endmarker was not found
+                return EC_IllegalCall;
+
+        offile_off_t rawStreamSize = bytePosEOI - bytePosSOI - totalAPPSize;
+        // Start position n and endpos. m results in a total amount of m-n+1 bytes
+        rawStreamSize++;
+
+        // Allocate buffer for raw JPEG data
+        // Only pixel data up to 2^32 bytes is supported (DICOM)
+        if (  (unsigned long long)rawStreamSize > 0xffffffff ) {
+                printMessage(m_logStream, "I2DJpegSource: Raw JPEG stream length (%lu) longer than 2^32 bytes (or larger than size_t capacity), aborting");
+                std::cerr << "size: " << rawStreamSize << std::endl;
+                return EC_MemoryExhausted;
+        }
+        pixelData = new char[OFstatic_cast(size_t, rawStreamSize)];
+        // keep track of current write position in memory buffer
+        char *currBufferPos = pixelData;
+
+        // Go to starting position (SOI marker) of JPEG stream data
+        jpegFile.of_fseek(bytePosSOI-1, SEEK_SET);
+
+        /* Copy everything but leave out APP segments
+         */
+        OFBool finished = OFFalse;
+        offile_off_t endOfBlock = 0;
+        offile_off_t startOfNextBlock = 0;
+        while (!finished) {
+                // determine position of the next block to be read
+                if ( appPosAndLengths.size() != 0) {
+                        // we have some APP blocks left
+                        endOfBlock = appPosAndLengths.front() - 1;
+                        appPosAndLengths.pop_front();
+                        startOfNextBlock = endOfBlock + appPosAndLengths.front() + 2; // +2 for marker
+                        appPosAndLengths.pop_front();
+                } else { // we can read to the end
+                        endOfBlock = bytePosEOI;
+                        finished = OFTrue;
+                }
+                // read block
+                offile_off_t blockSize = endOfBlock - jpegFile.of_ftell();
+                int result = jpegFile.of_fread (currBufferPos, 1, OFstatic_cast(size_t, blockSize));
+                if (result != blockSize)
+                        return EC_IllegalCall;
+                // prepare for reading next block
+                if (!finished) {
+                        jpegFile.of_fseek(startOfNextBlock, SEEK_SET);
+                        currBufferPos += blockSize;
+                }
+        }
+        // update result variable
+        pixLength = OFstatic_cast(size_t, rawStreamSize);
+
+        return cond;
+}
+
+
+OFCondition I2DJpegSource::createJPEGFileMap()
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DJpegSource: Examing JPEG file and creating map of JPEG markers");
+        E_JPGMARKER marker;
+        JPEGFileMapEntry *entry = NULL;
+        OFBool lastWasSOSMarker = OFFalse;
+        OFCondition cond;
+
+        /* Expect SOI at start of file */
+        E_JPGMARKER first;
+        cond = firstMarker(first);
+        if (cond.bad())
+                return cond;
+        entry = new JPEGFileMapEntry();
+        entry->bytePos = jpegFile.of_ftell();
+        entry->marker = first;
+        m_jpegFileMap.push_back(entry);
+
+        if (first != E_JPGMARKER_SOI)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DJpegSource: SOI marker not found at beginning of JPEG stream");
+
+        /* Scan miscellaneous markers until we reach EOI */
+        while (cond.good()) {
+                cond = nextMarker(lastWasSOSMarker, marker);
+                if (cond.good()) {
+                        entry = new JPEGFileMapEntry();
+                        entry->bytePos = jpegFile.of_ftell();
+                        entry->marker = marker;
+                        m_jpegFileMap.push_back(entry);
+                        if (marker == E_JPGMARKER_SOS) {
+                                lastWasSOSMarker = OFTrue;
+                        } else if (marker == E_JPGMARKER_EOI) {
+                                // End of file reached
+                                cond = EC_Normal;
+                                break;
+                        } else if ( isSOFMarker(marker) && m_keepAPPn ) {
+                                cond = EC_Normal;
+                                break;
+                        }
+                        if ( !isRSTMarker(marker) ) // RST marker does not have a length that could be used for skipping
+                                skipVariable();
+                }
+        } /* end loop */
+        if (m_debug)
+                debugDumpJPEGFileMap();
+        return cond;
+}
+
+
+OFBool I2DJpegSource::isRSTMarker(const E_JPGMARKER& marker) const
+{
+        return ((marker >= E_JPGMARKER_RST0) && (marker <= E_JPGMARKER_RST7));
+}
+
+
+OFBool I2DJpegSource::isSOFMarker(const E_JPGMARKER& marker) const
+{
+        return ( (marker >= E_JPGMARKER_SOF0) && (marker <= E_JPGMARKER_SOF15)
+                 && (marker != E_JPGMARKER_DHT) &&  (marker != E_JPGMARKER_DAC));
+}
+
+
+OFString I2DJpegSource::jpegMarkerToString(const E_JPGMARKER& marker)
+{
+        switch (marker) {
+        case(E_JPGMARKER_SOF0)  :
+                return "SOF0: Baseline DCT";
+        case(E_JPGMARKER_SOF1)  :
+                return "SOF1: Extended sequential DCT";
+        case(E_JPGMARKER_SOF2)  :
+                return "SOF2: Progressive DCT";
+        case(E_JPGMARKER_SOF3)  :
+                return "SOF3: Lossless (sequential)";
+        case(E_JPGMARKER_SOF5)  :
+                return "SOF5: Differential sequential DCT";
+        case(E_JPGMARKER_SOF6)  :
+                return "SOF6: Differential progressive DCT";
+        case(E_JPGMARKER_SOF7)  :
+                return "SOF7: Differential lossless (sequential)";
+        case(E_JPGMARKER_JPG)   :
+                return "JPG: JPEG extension";
+        case(E_JPGMARKER_SOF9)  :
+                return "SOF9: Extended sequential DCT";
+        case(E_JPGMARKER_SOF10) :
+                return "SOF10: Progressive DCT";
+        case(E_JPGMARKER_SOF11) :
+                return "SOF11: Lossless (sequential)";
+        case(E_JPGMARKER_SOF13) :
+                return "SOF13: Differential sequential DCT";
+        case(E_JPGMARKER_SOF14) :
+                return "SOF14: Differential progressive DCT";
+        case(E_JPGMARKER_SOF15) :
+                return "SOF15: Differential lossless (sequential)";
+        case(E_JPGMARKER_DHT)   :
+                return "DHT: Huffman table(s)";
+        case(E_JPGMARKER_DAC)   :
+                return "DAC: Arithmetic coding conditioning(s)";
+        case(E_JPGMARKER_SOI)   :
+                return "SOI: Start of image";
+        case(E_JPGMARKER_EOI)   :
+                return "EOI: End of image";
+        case(E_JPGMARKER_SOS)   :
+                return "SOS: Start of scan";
+        case(E_JPGMARKER_DQT)   :
+                return "DQT: Quantization table(s)";
+        case(E_JPGMARKER_DNL)   :
+                return "DNL: Number of lines";
+        case(E_JPGMARKER_DRI)   :
+                return "DRI: Define restart interval";
+        case(E_JPGMARKER_DHP)   :
+                return "DHP: Hierarchical progression";
+        case(E_JPGMARKER_EXP)   :
+                return "EXP: Expand reference component(s)";
+        case(E_JPGMARKER_COM)   :
+                return "COM: Comment";
+        case(E_JPGMARKER_TEM)   :
+                return "TEM: For temporary private use in arithmetic coding";
+
+        default:
+                if ((marker >= E_JPGMARKER_RST0) && (marker <= E_JPGMARKER_RST7))    {
+                        return "RSTn: Restart interval termination";
+                }
+                if ((marker >= E_JPGMARKER_APP0) && (marker <= E_JPGMARKER_APP15))   {
+                        return "APPn: Application segment";
+                }
+                if ((marker >= E_JPGMARKER_JPGN0) && (marker <= E_JPGMARKER_JPGN13)) {
+                        return "JPGn: JPEG extension";
+                }
+                if ((marker >= E_JPGMARKER_RES0) && (marker <= E_JPGMARKER_RESN))    {
+                        return "RESn";
+                }
+        }
+        OFString msg = "UNKNOWN MARKER :";
+        char hexNo[10];
+        sprintf(hexNo,"%x2", marker);
+        msg += hexNo;
+        return msg;
+}
+
+
+/* Read one byte, testing for EOF */
+int I2DJpegSource::read1Byte(Uint8& result)
+{
+        register int c;
+        c = jpegFile.of_fgetc();
+        if (c == EOF)
+                return EOF;
+        result = (Uint8) c;
+        return 0;
+}
+
+
+/* Read 2 bytes, convert to unsigned int */
+/* All 2-byte quantities in JPEG markers are MSB first */
+int I2DJpegSource::read2Bytes(Uint16& result)
+{
+        int c1, c2;
+        c1 = jpegFile.of_fgetc();
+        if (c1 == EOF)
+                return EOF;
+        c2 = jpegFile.of_fgetc();
+        if (c2 == EOF)
+                return EOF;
+        result = (((Uint16) c1) << 8) + ((Uint16) c2);
+        return 0;
+}
+
+
+
+/*
+ * Find the next JPEG marker and return its marker code.
+ * We expect at least one FF byte, possibly more if the compressor used FFs
+ * to pad the file.
+ * There could also be non-FF garbage between markers.  The treatment of such
+ * garbage is unspecified; we choose to skip over it but emit a warning msg.
+ */
+
+OFCondition I2DJpegSource::nextMarker(const OFBool& lastWasSOSMarker,
+                                      E_JPGMARKER& result)
+{
+        Uint8 c;
+        int discarded_bytes = 0;
+        int oneByte;
+
+        do {
+                /* Find 0xFF byte; count and skip any non-FFs. */
+                oneByte = read1Byte(c);
+                if (oneByte == EOF)
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+
+                while (c != 0xFF) {
+                        if (!lastWasSOSMarker)
+                                discarded_bytes++;
+                        oneByte = read1Byte(c);
+                        if (oneByte == EOF)
+                                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+                }
+                /* Get marker code byte, swallowing any duplicate FF bytes.  Extra FFs
+                 * are legal as pad bytes, so don't count them in discarded_bytes.
+                 */
+                do {
+                        oneByte = read1Byte(c);
+                        if (oneByte == EOF)
+                                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+                } while (c == 0xFF);
+
+        } while (lastWasSOSMarker && c == 0x00);
+
+
+        if (discarded_bytes != 0) {
+
+                printMessage(m_logStream, "Warning: garbage data found in JPEG file");
+        }
+        result = (E_JPGMARKER)c;
+        return EC_Normal;
+}
+
+
+/*
+ * Read the initial marker, which should be SOI.
+ * For a JFIF file, the first two bytes of the file should be literally
+ * 0xFF M_SOI.
+ */
+
+OFCondition I2DJpegSource::firstMarker(E_JPGMARKER& result)
+{
+        Uint8 c1, c2;
+
+        c1 = (Uint8)jpegFile.of_fgetc();
+        c2 = (Uint8)jpegFile.of_fgetc();
+        if (c1 != 0xFF || c2 != E_JPGMARKER_SOI) {
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Not a JPEG file");
+        }
+        result = (E_JPGMARKER)c2;
+        return EC_Normal;
+}
+
+/*
+ * Most types of marker are followed by a variable-length parameter segment.
+ * This routine skips over the parameters for any marker we don't otherwise
+ * want to process.
+ * Note that we MUST skip the parameter segment explicitly in order not to
+ * be fooled by 0xFF bytes that might appear within the parameter segment;
+ * such bytes do NOT introduce new markers.
+ */
+
+OFCondition I2DJpegSource::skipVariable()
+/* Skip over an unknown or uninteresting variable-length marker */
+{
+        Uint16 length;
+
+        /* Get the marker parameter length count */
+        int result = read2Bytes(length);
+        if (result == EOF)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Premature EOF in JPEG file");
+        /* Length includes itself, so must be at least 2 */
+        if (length < 2)
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Erroneous JPEG marker length");
+        length -= 2;
+        /* Skip over the remaining bytes */
+        jpegFile.of_fseek(length, SEEK_CUR);
+        return EC_Normal;
+}
+
+
+OFCondition I2DJpegSource::isJPEGEncodingSupported(const E_JPGMARKER& jpegEncoding) const
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DJpegSource: Checking whether JPEG encoding is supported: ", jpegMarkerToString(jpegEncoding));
+        switch (jpegEncoding) {
+        case E_JPGMARKER_SOF0:
+                return EC_Normal;
+        case E_JPGMARKER_SOF1:
+                if (!m_disableExtSeqTs)
+                        return EC_Normal;
+                else
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to convert: Extended sequential JPEG coding found but support disabled");
+        case E_JPGMARKER_SOF2: // Progressive
+                if (!m_disableProgrTs)
+                        return EC_Normal;
+                else
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to convert: Progressive JPEG coding found but disabled");
+        // SOF3: Lossless, SOF5-7: Hierarchical (differential), SOF9-15: Arithmetic coding, all other
+        default:
+                OFString errMsg("JPEG data with encoding: '");
+                errMsg += I2DJpegSource::jpegMarkerToString(jpegEncoding);
+                errMsg += "' not supported";
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, errMsg.c_str());
+        }
+}
+
+
+E_TransferSyntax I2DJpegSource::associatedTS(const E_JPGMARKER& jpegEncoding) const
+{
+        switch (jpegEncoding) {
+        case E_JPGMARKER_SOF0: // Baseline
+                return EXS_JPEGProcess1;
+        case E_JPGMARKER_SOF1: // Extended Sequential
+                return EXS_JPEGProcess2_4;
+        case E_JPGMARKER_SOF2: // Progressive
+                return EXS_JPEGProcess10_12;
+        default:
+                return EXS_Unknown;
+        }
+}
+
+
+void I2DJpegSource::debugDumpJPEGFileMap() const
+{
+        printMessage(m_logStream,"I2DJpegSource: Dumping JPEG marker file map: ");
+        if (m_keepAPPn)
+                printMessage(m_logStream, "I2DJpegSource: Keep APPn option enabled, any markers after SOFn marker will not be dumped");
+        OFIterator<JPEGFileMapEntry*> it= m_jpegFileMap.begin();
+        while (it != m_jpegFileMap.end()) {
+                if (m_logStream) {
+                        m_logStream->lockCerr()
+                                        <<  "I2DJpegSource:   Byte Position: 0x" << std::hex << std::setw(8)
+                                        << std::setfill('0')
+                                        /* need to cast bytePos to unsigned long to keep VC6 happy */
+                                        << OFstatic_cast(unsigned long, (*it)->bytePos)
+                                        <<" | Marker: " << jpegMarkerToString( (*it)->marker) << std::endl << std::dec;
+                        m_logStream->unlockCerr();
+                }
+                ++it;
+        }
+}
+
+void I2DJpegSource::clearMap()
+{
+        // free memory of each map entry and remove them all from list
+        JPEGFileMapEntry *entry = NULL;
+        while (m_jpegFileMap.size() != 0) {
+                entry = m_jpegFileMap.front();
+                m_jpegFileMap.pop_front();
+                delete entry;
+                entry = NULL;
+        }
+}
+
+// closes underlying JPEG file
+void I2DJpegSource::closeFile()
+{
+        jpegFile.of_fclose();
+}
+
+// close file and free dynamically allocated memory
+I2DJpegSource::~I2DJpegSource()
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DJpegSource: Closing JPEG file and cleaning up memory");
+        closeFile();
+        clearMap();
+}
+
+
+/*
+ * CVS/RCS Log:
+ * $Log: i2djpgs.cc,v $
+ * Revision 1.4  2009-02-18 12:22:11  meichel
+ * Minor changes needed for VC6
+ *
+ * Revision 1.3  2008-03-10 13:10:01  onken
+ * Changed OFListIterator to OFListConstIterator in order to complile when
+ * HAVE_STL is defined.
+ *
+ * Revision 1.2  2008-01-16 16:32:31  onken
+ * Fixed some empty or doubled log messages in libi2d files.
+ *
+ * Revision 1.1  2008-01-16 14:38:17  onken
+ * Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+ *
+ * Revision 1.1  2007/11/08 15:55:17  onken
+ * Initial checkin of img2dcm application and corresponding library i2dlib.
+ *
+ *
+ */
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.h b/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.h
new file mode 100644
index 0000000..0710d93
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.h
@@ -0,0 +1,402 @@
+/*
+ *
+ *  $Id: i2djpgs.h $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Class to extract pixel data and meta information from JPEG file
+ *
+ *  Last Update:      $Author: onken $
+ *  Update Date:      $Date: 2009-01-16 09:51:55 $
+ *  CVS/RCS Revision: $Revision: 1.2 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+#ifndef I2DJPGS_H
+#define I2DJPGS_H
+
+#include <dcmtk/dcmdata/dctk.h>
+#include "../ofstd/offile.h"
+#include "i2dimgs.h"
+
+/**
+ * JPEG markers consist of one or more 0xFF bytes, followed by a marker
+ * code byte (which is not an FF). This enum lists the second byte
+ * of all these markers. Note: RESn markers are not fully listed, but only
+ * the first (RES0) and the last (RESN)
+ */
+
+enum E_JPGMARKER { E_JPGMARKER_SOF0 = 0xC0, E_JPGMARKER_SOF1 = 0xC1, E_JPGMARKER_SOF2 = 0xC2,
+                   E_JPGMARKER_SOF3 = 0xC3, /*C4 and CC are not SOF markers,*/ E_JPGMARKER_SOF5 = 0xC5,
+                   E_JPGMARKER_SOF6 = 0xC6, E_JPGMARKER_SOF7 = 0xC7, E_JPGMARKER_JPG = 0xC8,
+                   E_JPGMARKER_SOF9 = 0xC9, E_JPGMARKER_SOF10 = 0xCA, E_JPGMARKER_SOF11 = 0xCB,
+                   E_JPGMARKER_SOF13 = 0xCD, E_JPGMARKER_SOF14 = 0xCE, E_JPGMARKER_SOF15 = 0xCF,
+                   E_JPGMARKER_DHT = 0xC4, E_JPGMARKER_DAC = 0xCC, E_JPGMARKER_RST0 = 0xD0,
+                   E_JPGMARKER_RST1 = 0xD1, E_JPGMARKER_RST2 = 0xD2, E_JPGMARKER_RST3 = 0xD3,
+                   E_JPGMARKER_RST4 = 0xD4, E_JPGMARKER_RST5 = 0xD5, E_JPGMARKER_RST6 = 0xD6,
+                   E_JPGMARKER_RST7 = 0xD7, E_JPGMARKER_SOI = 0xD8, E_JPGMARKER_EOI = 0xD9,
+                   E_JPGMARKER_SOS = 0xDA, E_JPGMARKER_DQT = 0xDB, E_JPGMARKER_DNL = 0xDC,
+                   E_JPGMARKER_DRI = 0xDD, E_JPGMARKER_DHP = 0xDE, E_JPGMARKER_EXP = 0xDF,
+                   E_JPGMARKER_APP0 = 0xE0, E_JPGMARKER_APP1 = 0xE1, E_JPGMARKER_APP2 = 0xE2,
+                   E_JPGMARKER_APP3 = 0xE3, E_JPGMARKER_APP4 = 0xE4, E_JPGMARKER_APP5 = 0xE5,
+                   E_JPGMARKER_APP6 = 0xE6, E_JPGMARKER_APP7 = 0xE7, E_JPGMARKER_APP8 = 0xE8,
+                   E_JPGMARKER_APP9 = 0xE9, E_JPGMARKER_APP10 = 0xEA, E_JPGMARKER_APP11 = 0xEB,
+                   E_JPGMARKER_APP12 = 0xEC, E_JPGMARKER_APP13 = 0xED, E_JPGMARKER_APP14 = 0xEE,
+                   E_JPGMARKER_APP15 = 0xEF, E_JPGMARKER_JPGN0 = 0xF0, E_JPGMARKER_JPGN1 = 0xF1,
+                   E_JPGMARKER_JPGN2 = 0xF2, E_JPGMARKER_JPGN3 = 0xF3, E_JPGMARKER_JPGN4 = 0xF4,
+                   E_JPGMARKER_JPGN5 = 0xF5, E_JPGMARKER_JPGN6 = 0xF6, E_JPGMARKER_JPGN7 = 0xF7,
+                   E_JPGMARKER_JPGN8 = 0xF8, E_JPGMARKER_JPGN9 = 0xF9, E_JPGMARKER_JPGN10 = 0xFA,
+                   E_JPGMARKER_JPGN11 = 0xFB, E_JPGMARKER_JPGN12 = 0xFC, E_JPGMARKER_JPGN13 = 0xFD,
+                   E_JPGMARKER_COM = 0xFE, E_JPGMARKER_TEM = 0x01, E_JPGMARKER_RES0 = 0x02,
+                   E_JPGMARKER_RESN = 0xBF, E_JPGMARKER_UNKNOWN = 0x00
+                 };
+
+/**
+ * Struct that represents a marker in a JPEG file, i.e. it consists
+ * of the byte position of the marker and the marker code itself
+ */
+struct JPEGFileMapEntry {
+        /// The byte position of the marker
+        offile_off_t bytePos;
+        /// The marker byte itself
+        E_JPGMARKER marker;
+};
+
+
+class I2DJpegSource : public I2DImgSource
+{
+
+public:
+
+        /** Constructor, initializes member variables
+         *  @return none
+         */
+        I2DJpegSource();
+
+        /** Returns format of input image. For this class "JPEG" is returned.
+         *  @return Returns format of input image, i. e. "JPEG".
+         */
+        OFString inputFormat() const;
+
+        /** true if pixeldata is compressed
+        */
+        virtual bool IsCompressed() const
+        {
+                return true;
+        }
+
+        /*true if pixeldata has to be compressed*/
+        virtual bool Recompress() const
+        {
+                return false;
+        }
+
+        /** Sets the input image file to read.
+        *  @param filename - [in] The filename of the image input file
+        *  @return none
+        */
+        void setImageFile(const OFString& filename)
+        {
+                m_imageFile = filename;
+        };
+
+        /** Returns the input image file that is going to be read
+        *  @return The filename of the image input file
+        */
+        OFString getImageFile()
+        {
+                return m_imageFile;
+        };
+
+        /** Extracts the raw JPEG pixel data stream from a JPEG file and returns some
+         *  image information about this pixel data.
+         *  Raw means here that all APP markers (e.g. JFIF information) are removed from the JPEG stream.
+         *  The pixel data returned is a JPEG stream in JPEG interchange format.
+         *  This function allocates memory for the pixel data returned to the user. The caller of this
+         *  function is responsible for deleting the memory buffer
+         *  @param rows - [out] Rows of image
+         *  @param cols - [out] Columns of image
+         *  @param samplesPerPixel - [out] Number of components per pixel
+         *  @param photoMetrInt - [out] The DICOM color model used for the compressed data
+         *  @param bitsAlloc - [out] Bits Allocated for one sample
+         *  @param bitsStored - [out] Bits Stored, Number of bits actually stored within Bits Allocated
+         *  @param highBit - [out] High Bit, Highest stored in bit within Bits Allocated
+         *  @param pixelRepr - [out] Pixel Representation (0=unsigned, 1=signed)
+         *  @param planConf - [out] Planar Configuration
+         *  @param pixAspectH - [out] Horizontal value of pixel aspect ratio
+         *  @param pixAspectV - [out] Vertical value of pixel aspect ratio
+         *  @param pixData - [out] Pointer to the pixel data in JPEG Interchange Format (but without APPx markers).
+         *  @param length - [out] Length of pixel data
+         *  @param ts - [out] The transfer syntax imposed by the imported pixel pixel data.
+                              This is necessary for the JPEG importer that needs to report
+                              which TS must be used for the imported JPEG data (ie. baseline, progressive, ...).
+                              If pixel data is uncompressed, EXS_Unknown is returned
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        OFCondition readPixelData( Uint16& rows,
+                                   Uint16& cols,
+                                   Uint16& samplesPerPixel,
+                                   OFString& photoMetrInt,
+                                   Uint16& bitsAlloc,
+                                   Uint16& bitsStored,
+                                   Uint16& highBit,
+                                   Uint16& pixelRepr,
+                                   Uint16& planConf,
+                                   Uint16& pixAspectH,
+                                   Uint16& pixAspectV,
+                                   char*&  pixData,
+                                   Uint32& length,
+                                   E_TransferSyntax& ts);
+
+        /** Enable/Disable support for Extended Sequential JPEG Coding
+         *  @param enabled - [in] OFTrue: support Extended Sequential, OFTrue: Do not support
+         *  @return none
+         */
+        void setExtSeqSupport(const OFBool enabled);
+
+        /** Enable/Disable support for Progressive JPEG Coding
+         *  @param enabled - [in] OFTrue: support Extended Sequential, OFTrue: Do not support
+         *  @return none
+         */
+        void setProgrSupport(const OFBool enabled);
+
+        /** If enabled, conversion will only take place if JFIF data could be found
+         *  and evaluated. Many digital cameras do not provide a JFIF header, so this
+         *  is disabled by default.
+         */
+        void setInsistOnJFIF(const OFBool enabled);
+
+        /**  If enabled, APPn markers (except JFIF!) are also copied to the output file.
+         *   This can cause a huge speedup because instead of parsing the whole
+         *   JPEG file (for finding any APPn markers) the parsing stops after finding
+         *   the SOFn marker (which is relevant for extracting width/height and so on.
+         *   Default: false
+         *   @param enabled - [in] OFtrue: copy APPn, OFFalse: cut off APPn info
+         *   @return none
+         */
+        void setKeepAPPn(const OFBool enabled);
+
+        /** Returns a string representation of a JPEG marker code.
+         *  @param marker - [in] The marker to be converted
+         *  @return A string representation of the marker
+         */
+        static OFString jpegMarkerToString(const E_JPGMARKER& marker);
+
+        /** Destructor, frees some memory.
+         *  @return none
+         */
+        ~I2DJpegSource();
+
+protected:
+
+        /** Opens the JPEG file specified by the given filename.
+         *  @param filename - [in] The file to be opened
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        OFCondition openFile(const OFString& filename);
+
+        /** Closes JPEG file.
+         *  @return A string representation of the marker
+         */
+        void closeFile();
+
+        /** Function that scans a JPEG file and creates a "file map" which
+         *  includes all JPEG markes and their byte positions in the file.
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        OFCondition createJPEGFileMap();
+
+        /** Dump the internal JPEG file map to a given stream. The file map
+         *  lists JPEG markers and their position in the bitstream found in the JPEG
+         *  file
+         *  @return none
+         */
+        void debugDumpJPEGFileMap() const;
+
+        /** Get image parameters as found at given SOF marker of the JPEG image.
+         *  @param entry - [in] This specifies the marker and the byte position of the SOF marker
+         *  @param imageWidth - [out] The width of the image
+         *  @param imageHeight - [out] The height of the image
+         *  @param samplesPerPixel - [out] Number of components per pixel
+         *  @param bitsPerSample - [out] Nunber of bits per pixel component
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        OFCondition getSOFImageParameters( const JPEGFileMapEntry& entry,
+                                           Uint16& imageWidth,
+                                           Uint16& imageHeight,
+                                           Uint16& samplesPerPixel,
+                                           Uint16& bitsPerSample);
+
+        /** Get JPEG parameters as found at given JFIF marker of the JPEG image.
+         *  @param entry - [in] This specifies the marker and the byte position of the JFIF marker
+         *  @param jfifVersion - [out] The JFIF version of the JFIF data
+         *  @param pixelAspectH - [out] The horizontal pixel aspect ratio
+         *  @param pixelAspectV - [out] The vertical pixel aspect ratio
+         *  @param unit - [out] The contents of the pixel aspect ratio unit field
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        OFCondition getJFIFImageParameters( const JPEGFileMapEntry& entry,
+                                            Uint16& jfifVersion,
+                                            Uint16& pixelAspectH,
+                                            Uint16& pixelAspectV,
+                                            Uint16& unit);
+
+        /** Check, whether a given JPEG image marker (SOFn) is supported by
+         *  this plugin
+         *  @param jpegEncoding - [in] Image marker that should be tested
+         *  @return EC_Normal, marker is supported, error otherwise
+         */
+        OFCondition isJPEGEncodingSupported(const E_JPGMARKER& jpegEncoding) const;
+
+
+        /** Returns if possible the DICOM transfer syntax matching the coding of the
+         *  JPEG data.
+         *  @param jpegEncoding - [in] Image marker that should be tested
+         *  @return EC_Normal, marker is supported, error otherwise
+         */
+        E_TransferSyntax associatedTS(const E_JPGMARKER& jpegEncoding) const;
+
+        /** Returns true if marker is one of the RST0 to RST7 markers
+         *  @param jpegEncoding - [in] Image marker that should be tested
+         *  @return OFTrue, if marker is RST0 to RST7, OFFalse otherwise
+         */
+        OFBool isRSTMarker(const E_JPGMARKER& jpegEncoding) const;
+
+        /** Returns true if marker is one of the SOF0 to SOF15 markers
+         *  @param jpegEncoding - [in] Image marker that should be tested
+         *  @return OFTrue, if marker is SOF0 to SOF15, OFFalse otherwise
+         */
+        OFBool isSOFMarker(const E_JPGMARKER& jpegEncoding) const;
+
+
+        /** Extract raw JPEG stream (i.e. without APPn markers) from JPEG file.
+         *  @param pixelData - [out] The resulting JPEG stream
+         *  @param pixLength - [out] The length of the resulting stream
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        OFCondition extractRawJPEGStream(char*& pixelData,
+                                         Uint32& pixLength);
+
+        /** Copies JPEG stream (with APPn markers, excluding JFIF) from JPEG file.
+         *  @param pixelData - [out] The resulting JPEG stream
+         *  @param pixLength - [out] The length of the resulting stream
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        OFCondition copyJPEGStream(char*& pixelData,
+                                   Uint32& pixLength);
+
+        /** Skips one marker while scanning through the JPEG file stream.
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        OFCondition skipVariable();
+
+        /** Tries to read the SOI marker.
+         *  @param result - [out] The code of the SOI marker if successful (0xD8)
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        OFCondition firstMarker(E_JPGMARKER& result);
+
+        /** Tries to find the next JPEG marker in underlying file stream.
+         *  @param lastWasSOSMarker - [in] Denotes, whether the last marker read
+         *         before was the SOS (start of scan) marker. This is needed to
+         *         ignore non-marker 0xFF ocurrences in the compressed data.
+         *  @param result - [out] The result marker
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        OFCondition nextMarker(const OFBool& lastWasSOSMarker,
+                               E_JPGMARKER& result);
+
+        /** Read 2 bytes from the byte stream.
+         *  @param result - [out] The result
+         *  @return 0, if successful, EOF if rest of stream does not contain enough bytes
+         */
+        inline int read2Bytes(Uint16& result);
+
+        /** Read 1 byte from the byte stream.
+         *  @param result - [out] The result
+         *  @return 0, if successful, EOF if rest of stream does not contain enough bytes
+         */
+        inline int read1Byte(Uint8& result);
+
+        /** Deletes internal JPEG file map and frees memory.
+         *  @return none
+         */
+        void clearMap();
+
+        /// JPEG file map. This map includes all JPEG markers and their byte positions in the JPEG file.
+        OFList<JPEGFileMapEntry*> m_jpegFileMap;
+
+        /// The JPEG file, if opened
+        GinkgoOFFile jpegFile;
+
+        /// If true, JPEGs with progressive coding are not supported
+        OFBool m_disableProgrTs;
+
+        /// If true, JPEGs with extended sequential coding are not supported
+        OFBool m_disableExtSeqTs;
+
+        /// If true, conversion will only work if JFIF header can be found.
+        /// Default: false
+        OFBool m_insistOnJFIF;
+
+        /// If true, APPn markers (except JFIF!) are also copied to the output file.
+        /// This can cause a huge speedup because instead of parsing the whole
+        /// JPEG file (for finding any APPn markers) the parsing stops after finding
+        /// the SOFn marker (which is relevant for extracting width/height and so on.
+        /// Default: false
+        OFBool m_keepAPPn;
+
+
+        /// The input file
+        OFString m_imageFile;
+
+};
+
+#endif // #ifndef I2DJPGS_H
+
+/*
+ * CVS/RCS Log:
+ * $Log: i2djpgs.h,v $
+ * Revision 1.2  2009-01-16 09:51:55  onken
+ * Completed doxygen documentation for libi2d.
+ *
+ * Revision 1.1  2008-01-16 15:09:17  onken
+ * Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+ *
+ * Revision 1.2  2008-01-11 14:17:53  onken
+ * Added various options to i2dlib. Changed logging to use a configurable
+ * logstream. Added output plugin for the new Multiframe Secondary Capture SOP
+ * Classes. Added mode for JPEG plugin to copy exsiting APPn markers (except
+ * JFIF). Changed img2dcm default behaviour to invent type1/type2 attributes (no
+ * need for templates any more). Added some bug fixes.
+ *
+ * Revision 1.1  2007/11/08 15:58:55  onken
+ * Initial checkin of img2dcm application and corresponding library i2dlib.
+ *
+ *
+ */
+
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2dles.cpp b/cadxcore/main/controllers/dcmtk/libi2d/i2dles.cpp
new file mode 100644
index 0000000..a2eaab8
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2dles.cpp
@@ -0,0 +1,88 @@
+/*
+ *
+ *  $Id$
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ */
+#include "i2dles.h"
+
+
+OFString I2DLittleEndianSource::inputFormat() const
+{
+        return "LittleEndian";
+}
+
+/** Extracts the raw JPEG pixel data stream from a JPEG file and returns some
+ *  image information about this pixel data.
+ *  Raw means here that all APP markers (e.g. JFIF information) are removed from the JPEG stream.
+ *  The pixel data returned is a JPEG stream in JPEG interchange format.
+ *  This function allocates memory for the pixel data returned to the user. The caller of this
+ *  function is responsible for deleting the memory buffer
+ *  @param rows - [out] Rows of image
+ *  @param cols - [out] Columns of image
+ *  @param samplesPerPixel - [out] Number of components per pixel
+ *  @param photoMetrInt - [out] The DICOM color model used for the compressed data
+ *  @param bitsAlloc - [out] Bits Allocated for one sample
+ *  @param bitsStored - [out] Bits Stored, number of bits stored within Bits Allocated
+ *  @param highBit - [out] High Bit, hightest bit position set within Bits Allocated
+ *  @param pixelRepr - [out] Pixel Representation (0=unsigned, 1=signed)
+ *  @param planConf - [out] Planar Configuration
+ *  @param pixAspectH - [out] Horizontal value of pixel aspect ratio
+ *  @param pixAspectV - [out] Vertical value of pixel aspect ratio
+ *  @param pixData - [out] Pointer to the pixel data in JPEG Interchange Format (but without APPx markers).
+ *  @param length - [out] Length of pixel data
+ *  @param ts - [out] The transfer syntax imposed by the imported pixel pixel data.
+                      This is necessary for the JPEG importer that needs to report
+                      which TS must be used for the imported JPEG data (ie. baseline, progressive, ...).
+                      If pixel data is uncompressed, EXS_Unknown is returned
+ *  @return EC_Normal, if successful, error otherwise
+ */
+OFCondition I2DLittleEndianSource::readPixelData( Uint16& rows,
+                Uint16& cols,
+                Uint16& samplesPerPixel,
+                OFString& photoMetrInt,
+                Uint16& bitsAlloc,
+                Uint16& bitsStored,
+                Uint16& highBit,
+                Uint16& pixelRepr,
+                Uint16& planConf,
+                Uint16& pixAspectH,
+                Uint16& pixAspectV,
+                char*&  pixData,
+                Uint32& length,
+                E_TransferSyntax& ts)
+{
+        photoMetrInt = m_ImgFile.photometricInterpretation.c_str();
+
+        cols = m_ImgFile.width;
+        rows = m_ImgFile.heigth;
+
+        samplesPerPixel = m_ImgFile.samplesPerPixel;
+        bitsAlloc = m_ImgFile.bitsAllocated;
+        bitsStored = m_ImgFile.bitsStored;
+        highBit = m_ImgFile.highBit;
+        pixelRepr = m_ImgFile.pixelRepr;
+        planConf = m_ImgFile.planarConf;
+        pixAspectH = m_ImgFile.pixAspectH;
+        pixAspectV = m_ImgFile.pixAspectV;
+        pixData = (char*)m_ImgFile.pixelData;
+        if (bitsAlloc <= 8) {
+                length = cols * rows * samplesPerPixel;
+        } else if (bitsAlloc <= 16) {
+                length = cols * rows * samplesPerPixel * 2;
+        } else if (bitsAlloc <= 24) {
+                length = cols * rows * samplesPerPixel * 3;
+        } else if (bitsAlloc <= 32) {
+                length = cols * rows * samplesPerPixel * 4;
+        } else if (bitsAlloc <= 48) {
+                length = cols * rows * samplesPerPixel * 6;
+        } else if (bitsAlloc <= 64) {
+                length = cols * rows * samplesPerPixel * 8;
+        }
+
+        ts = EXS_LittleEndianExplicit;
+
+        return EC_Normal;
+}
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2dles.h b/cadxcore/main/controllers/dcmtk/libi2d/i2dles.h
new file mode 100644
index 0000000..aa1e56d
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2dles.h
@@ -0,0 +1,125 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ *
+ *
+ *  Code addapted from DCMTK
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Class for conversion of image file into new DICOM SC Image IODs
+ *
+ *  Last Update:      $Author: onken $
+ *  Update Date:      $Date: 2009-01-16 09:51:55 $
+ *  CVS/RCS Revision: $Revision: 1.2 $
+ *  Status:           $State: Exp $
+
+ *
+ */
+#pragma once
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/dcmdata/dctk.h>
+#include <api/dicom/idicomizador.h>
+#include "i2dimgs.h"
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+class I2DLittleEndianSource : public I2DImgSource
+{
+
+public:
+
+        /** Constructor
+         */
+        I2DLittleEndianSource(GIL::DICOM::IDICOMImg2DCM::TImageFile& imgFile): m_ImgFile(imgFile) {}
+
+        /** Virtual Destructor
+        */
+        virtual ~I2DLittleEndianSource() {}
+
+
+        /** true if pixeldata is compressed
+        */
+        virtual bool IsCompressed() const
+        {
+                return false;
+        }
+
+        /*true if pixeldata has to be compressed*/
+        virtual bool Recompress() const
+        {
+                return m_ImgFile.recompress;
+        }
+
+        /** Returns identifier for the image input format the plugin imports.
+         *  @return A short identifier (e. g. "JPEG")
+         */
+        virtual OFString inputFormat() const;
+
+        /** Extracts the raw JPEG pixel data stream from a JPEG file and returns some
+         *  image information about this pixel data.
+         *  Raw means here that all APP markers (e.g. JFIF information) are removed from the JPEG stream.
+         *  The pixel data returned is a JPEG stream in JPEG interchange format.
+         *  This function allocates memory for the pixel data returned to the user. The caller of this
+         *  function is responsible for deleting the memory buffer
+         *  @param rows - [out] Rows of image
+         *  @param cols - [out] Columns of image
+         *  @param samplesPerPixel - [out] Number of components per pixel
+         *  @param photoMetrInt - [out] The DICOM color model used for the compressed data
+         *  @param bitsAlloc - [out] Bits Allocated for one sample
+         *  @param bitsStored - [out] Bits Stored, number of bits stored within Bits Allocated
+         *  @param highBit - [out] High Bit, hightest bit position set within Bits Allocated
+         *  @param pixelRepr - [out] Pixel Representation (0=unsigned, 1=signed)
+         *  @param planConf - [out] Planar Configuration
+         *  @param pixAspectH - [out] Horizontal value of pixel aspect ratio
+         *  @param pixAspectV - [out] Vertical value of pixel aspect ratio
+         *  @param pixData - [out] Pointer to the pixel data in JPEG Interchange Format (but without APPx markers).
+         *  @param length - [out] Length of pixel data
+         *  @param ts - [out] The transfer syntax imposed by the imported pixel pixel data.
+                              This is necessary for the JPEG importer that needs to report
+                              which TS must be used for the imported JPEG data (ie. baseline, progressive, ...).
+                              If pixel data is uncompressed, EXS_Unknown is returned
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        virtual OFCondition readPixelData( Uint16& rows,
+                                           Uint16& cols,
+                                           Uint16& samplesPerPixel,
+                                           OFString& photoMetrInt,
+                                           Uint16& bitsAlloc,
+                                           Uint16& bitsStored,
+                                           Uint16& highBit,
+                                           Uint16& pixelRepr,
+                                           Uint16& planConf,
+                                           Uint16& pixAspectH,
+                                           Uint16& pixAspectV,
+                                           char*&  pixData,
+                                           Uint32& length,
+                                           E_TransferSyntax& ts);
+
+
+
+        GIL::DICOM::IDICOMImg2DCM::TImageFile m_ImgFile;
+};
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2doutpl.h b/cadxcore/main/controllers/dcmtk/libi2d/i2doutpl.h
new file mode 100644
index 0000000..ca5ee1f
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2doutpl.h
@@ -0,0 +1,137 @@
+/*
+*
+*  $Id: i2doutpl.h $
+*  Ginkgo CADx Project
+*
+*  Code addapted from DCMTK
+*
+*
+*  Copyright (C) 2001-2007, OFFIS
+*
+*  This software and supporting documentation were developed by
+*
+*    Kuratorium OFFIS e.V.
+*    Healthcare Information and Communication Systems
+*    Escherweg 2
+*    D-26121 Oldenburg, Germany
+*
+*  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+*  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+*  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+*  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+*  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+*
+*  Module:  dcmdata
+*
+*  Author:  Michael Onken
+*
+*  Purpose: Base class for converter from image file to DICOM
+*
+*  Last Update:      $Author: onken $
+*  Update Date:      $Date: 2009-01-16 09:51:55 $
+*  CVS/RCS Revision: $Revision: 1.4 $
+*  Status:           $State: Exp $
+*
+*  CVS/RCS Log at end of file
+*
+*/
+
+#ifndef I2DOUTPL_H
+#define I2DOUTPL_H
+
+#include "d2dcommon.h"
+
+class I2DOutputPlug: public D2DCommon
+{
+
+public:
+
+        /** Constructor, initializes member variables
+        *  @return none
+        */
+        I2DOutputPlug() : D2DCommon(), m_doAttribChecking(OFTrue)
+        {};
+
+        /** Virtual function that returns a short name of the plugin.
+        *  @return The name of the plugin
+        */
+        virtual OFString ident() =0;
+
+        /** Virtual function that returns the Storage SOP class UID, the plugin writes.
+        *  @param suppSOPs - [out] List containing supported output SOP classes
+        *  @return String containing the Storage SOP class UID
+        */
+        virtual void supportedSOPClassUIDs(OFList<OFString> suppSOPs) =0;
+
+        /** Outputs SOP class specific information into dataset
+        * @param dataset - [in/out] Dataset to write to
+        * @return EC_Normal if successful, error otherwise
+        */
+        virtual OFCondition convert(DcmDataset &dataset) const = 0;
+
+        /** Do some completeness / validity checks. Should be called when
+        *  dataset is completed and is about to be saved.
+        *  @param dataset - [in] The dataset to check
+        *  @return Error string if error occurs, empty string otherwise
+        */
+        virtual OFString isValid(DcmDataset& dataset) const = 0;
+
+        /** Destructor
+        *  @return none
+        */
+        virtual ~I2DOutputPlug() {};
+
+
+        /** Enable/Disable basic validity checks for output dataset
+        *  @param doChecks - [in] OFTrue enables checking, OFFalse turns it off.
+        *  @param insertMissingType2 - [in] If true (default), missing type 2
+        *         attributes are inserted automatically
+        *  @param inventMissingType1 - [in] If true (default), missing type 1
+        *         attributes are inserted automatically with a predefined
+        *         value (if possible). An existing empty type 1 attribute is
+        *         assigned a value, too.
+        *  @return none
+        */
+        virtual void setValidityChecking(OFBool doChecks,
+                                         OFBool insertMissingType2 = OFTrue,
+                                         OFBool inventMissingType1 = OFTrue)
+        {
+                m_doAttribChecking = doChecks;
+                m_inventMissingType2Attribs = insertMissingType2;
+                m_inventMissingType1Attribs = inventMissingType1;
+        };
+
+protected:
+
+        /// if enabled, some simple attribute checking is performed
+        /// default: enabled (OFTrue)
+        OFBool m_doAttribChecking;
+};
+
+#endif // #ifndef I2DOUTPL_H
+
+/*
+* CVS/RCS Log:
+* $Log: i2doutpl.h,v $
+* Revision 1.4  2009-01-16 09:51:55  onken
+* Completed doxygen documentation for libi2d.
+*
+* Revision 1.3  2008-01-16 16:32:23  onken
+* Fixed some empty or doubled log messages in libi2d files.
+*
+* Revision 1.2  2008-01-16 15:10:20  onken
+* Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+*
+* Revision 1.2  2008-01-11 14:17:53  onken
+* Added various options to i2dlib. Changed logging to use a configurable
+* logstream. Added output plugin for the new Multiframe Secondary Capture SOP
+* Classes. Added mode for JPEG plugin to copy exsiting APPn markers (except
+* JFIF). Changed img2dcm default behaviour to invent type1/type2 attributes (no
+* need for templates any more). Added some bug fixes.
+*
+* Revision 1.1  2007/11/08 15:58:55  onken
+* Initial checkin of img2dcm application and corresponding library i2dlib.
+*
+*
+*/
+
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2dplnsc.cpp b/cadxcore/main/controllers/dcmtk/libi2d/i2dplnsc.cpp
new file mode 100644
index 0000000..d0281ab
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2dplnsc.cpp
@@ -0,0 +1,298 @@
+/*
+ *
+ *  $Id: i2dplnsc.cpp $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Implements conversion from image into new DICOM SC IODs
+ *
+ *  Last Update:      $Author: onken $
+ *  Update Date:      $Date: 2008-01-16 16:32:31 $
+ *  CVS/RCS Revision: $Revision: 1.2 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/config/osconfig.h>
+#include "i2dplnsc.h"
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+I2DOutputPlugNewSC::I2DOutputPlugNewSC()
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DOutputPlugNewSC: Output plugin for new Multiframe Secondary Capture SOPs initialized");
+}
+
+
+OFString I2DOutputPlugNewSC::ident()
+{
+        return "New Secondary Capture Image SOP Classes";
+}
+
+
+void I2DOutputPlugNewSC::supportedSOPClassUIDs(OFList<OFString> suppSOPs)
+{
+        suppSOPs.push_back(UID_MultiframeSingleBitSecondaryCaptureImageStorage);
+        suppSOPs.push_back(UID_MultiframeGrayscaleByteSecondaryCaptureImageStorage);
+        suppSOPs.push_back(UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage);
+        suppSOPs.push_back(UID_MultiframeTrueColorSecondaryCaptureImageStorage);
+}
+
+
+
+OFCondition I2DOutputPlugNewSC::convert(DcmDataset &dataset) const
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DOutputPlugNewSC: Inserting new Multiframe SC specific attributes");
+
+        // Find out which of the new SC SOP Class UIDs to use
+        OFString sopUID, photInt;
+        Uint16 bitsAllocated;
+        OFCondition cond = dataset.findAndGetUint16(DCM_BitsAllocated, bitsAllocated);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Unable to determine correct SOP class due to missing Image Pixel module information");
+        cond = dataset.findAndGetOFStringArray(DCM_PhotometricInterpretation, photInt);
+
+        if (bitsAllocated == 1)
+                cond = handle1BitSC(&dataset);
+        else if (bitsAllocated == 8)
+                cond = handle8BitSC(&dataset);
+        else if (bitsAllocated == 16)
+                cond = handle16BitSC(&dataset);
+        else
+                cond = makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Bits Allocated needs a value of 1, 8 or 16 for conversion");
+
+        cond = insertMultiFrameAttribs(&dataset);
+        return cond;
+}
+
+OFString I2DOutputPlugNewSC::isValid(DcmDataset& dataset) const
+{
+        OFString err;
+        // Just return if checking was disabled
+        if (!m_doAttribChecking)
+                return err;
+
+        if (m_debug)
+                printMessage(m_logStream, "I2DOutputPlugNewSC: Checking new Multiframe SC specific attributes");
+        // WSD="Workstation", found in most Secondary Capture files
+        err += checkAndInventType1Attrib(DCM_ConversionType, &dataset, "WSD");
+        // As a default we do not expect the image to have burnt in annotations
+        err += checkAndInventType1Attrib(DCM_BurnedInAnnotation, &dataset, "NO");
+
+        return err;
+}
+
+
+OFCondition I2DOutputPlugNewSC::insertMultiFrameAttribs(DcmDataset* targetDataset) const
+{
+        if (!targetDataset)
+                return EC_IllegalParameter;
+
+        // We only support 1 image Multi-frames so far
+        return targetDataset->putAndInsertOFStringArray(DCM_NumberOfFrames, "1");
+        // Frame Increment pointer is set later in the more specific SC Multi-frame Image context
+}
+
+
+OFCondition I2DOutputPlugNewSC::handle1BitSC(DcmDataset *dataset) const
+{
+        if (!dataset)
+                return EC_IllegalParameter;
+
+        OFCondition cond;
+        Uint16 u16 = 0;
+        OFString str;
+        cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str);
+        if (cond.bad() || (str != "MONOCHROME2"))
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation does not fit SOP class");
+
+        cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16);
+        if (cond.bad() || (u16 != 1))
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Samples Per Pixel does not fit SOP class");
+
+        cond = dataset->findAndGetUint16(DCM_BitsStored, u16);
+        if (cond.bad() || (u16 != 1))
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Bits Stored does not fit SOP class");
+
+        cond = dataset->findAndGetUint16(DCM_HighBit, u16);
+        if (cond.bad() || (u16 != 0))
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: High Bit does not fit SOP class");
+
+        cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16);
+        if (cond.bad() || (u16 != 0))
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Pixel Representation does not fit SOP class");
+
+        cond = dataset->putAndInsertOFStringArray(DCM_SOPClassUID, UID_MultiframeSingleBitSecondaryCaptureImageStorage);
+        return cond;
+}
+
+
+OFCondition I2DOutputPlugNewSC::handle8BitSC(DcmDataset *dataset) const
+{
+        if (!dataset)
+                return EC_IllegalParameter;
+
+        OFCondition cond;
+        Uint16 u16 = 0;
+        OFString str;
+        cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation not set for Pixel Data");
+        if (str == "MONOCHROME2") { // Mult-Frame Grayscale Byte SC Image
+                cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16);
+                if (cond.bad() || (u16 != 1))
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Samples Per Pixel does not fit SOP class");
+
+                cond = dataset->findAndGetUint16(DCM_BitsStored, u16);
+                if (cond.bad() || (u16 != 8))
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Bits Stored does not fit SOP class");
+
+                cond = dataset->findAndGetUint16(DCM_HighBit, u16);
+                if (cond.bad() || (u16 != 7))
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: High Bit does not fit SOP class");
+
+                cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16);
+                if (cond.bad() || (u16 != 0))
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Pixel Representation does not fit SOP class");
+                // For MONOCHROME2 and Bits Stored > 1, rescale slope/intercept/type have to be inserted
+                cond = insertSCMultiFrameAttribs(dataset);
+                // Insert SOP Class UID
+                if (cond.good())
+                        cond = dataset->putAndInsertOFStringArray(DCM_SOPClassUID, UID_MultiframeGrayscaleByteSecondaryCaptureImageStorage);
+        } else if ((str == "YBR_FULL_422") || (str == "RGB")) { // Mult-Frame True Color Byte SC Image
+                cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16);
+                if (cond.bad() || (u16 != 3))
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Samples Per Pixel does not fit SOP class");
+
+                cond = dataset->findAndGetUint16(DCM_BitsStored, u16);
+                if (cond.bad() || (u16 != 8))
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Bits Stored does not fit SOP class");
+
+                cond = dataset->findAndGetUint16(DCM_HighBit, u16);
+                if (cond.bad() || (u16 != 7))
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: High Bit does not fit SOP class");
+
+                cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16);
+                if (cond.bad() || (u16 != 0))
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Pixel Representation does not fit SOP class");
+
+                if (str == "RGB") { // For RGB, Planar Configuration must be present and set to 0
+                        cond = dataset->findAndGetUint16(DCM_PlanarConfiguration, u16);
+                        if (cond.bad() || (u16 != 0))
+                                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Planar Configuration does not fit SOP class");
+                }
+                // Insert SOP Class UID
+                if (cond.good())
+                        cond = dataset->putAndInsertOFStringArray(DCM_SOPClassUID, UID_MultiframeTrueColorSecondaryCaptureImageStorage);
+        } else
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation does not fit SOP class");
+
+        return cond;
+}
+
+
+OFCondition I2DOutputPlugNewSC::handle16BitSC(DcmDataset *dataset) const
+{
+        if (!dataset)
+                return EC_IllegalParameter;
+
+        OFCondition cond;
+        Uint16 u16 = 0;
+        OFString str;
+        cond = dataset->findAndGetOFStringArray(DCM_PhotometricInterpretation, str);
+        if (cond.bad() || (str != "MONOCHROME2"))
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Photometric interpretation does not fit SOP class");
+
+        cond = dataset->findAndGetUint16(DCM_SamplesPerPixel, u16);
+        if (cond.bad() || (u16 != 1))
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Samples Per Pixel does not fit SOP class");
+
+        Uint16 bitsStored;
+        cond = dataset->findAndGetUint16(DCM_BitsStored, bitsStored);
+        if (cond.bad() || (bitsStored >= 16) || (bitsStored <9) )
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Bits Stored does not fit SOP class");
+
+        cond = dataset->findAndGetUint16(DCM_HighBit, u16);
+        if (cond.bad() || (u16 != bitsStored -1))
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: High Bit does not fit SOP class");
+
+        cond = dataset->findAndGetUint16(DCM_PixelRepresentation, u16);
+        if (cond.bad() || (u16 != 0))
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Pixel Representation does not fit SOP class");
+
+        // Insert SOP Class UID
+        cond = dataset->putAndInsertOFStringArray(DCM_SOPClassUID, UID_MultiframeGrayscaleWordSecondaryCaptureImageStorage);
+        // For MONOCHROME2 and Bits Stored > 1, rescale slope/intercept/type have to be inserted
+        if (cond.good())
+                cond = insertSCMultiFrameAttribs(dataset);
+        return cond;
+}
+
+
+OFCondition I2DOutputPlugNewSC::insertSCMultiFrameAttribs(DcmDataset *targetDataset) const
+{
+        OFCondition cond;
+        // Rescale Intercept, set to 0 (constant enumerated value)
+        cond = targetDataset->putAndInsertOFStringArray(DCM_RescaleIntercept, "0");
+        // Rescale Slope, set to 1 (constant enumerated value)
+        if (cond.good())
+                cond = targetDataset->putAndInsertOFStringArray(DCM_RescaleSlope, "1");
+        // Rescale type, set to unspecified "US" (constant enumerated value)
+        if (cond.good())
+                cond = targetDataset->putAndInsertOFStringArray(DCM_RescaleType, "US");
+        // Rescale type, set to unspecified "IDENTITY" (constant enumerated value)
+        if (cond.good())
+                cond = targetDataset->putAndInsertOFStringArray(DCM_PresentationLUTShape, "IDENTITY");
+        else
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "I2DOutputPlugNewSC: Unable to insert attributes for Rescale Slope/Intercept/Type");
+        return EC_Normal;
+}
+
+
+I2DOutputPlugNewSC::~I2DOutputPlugNewSC()
+{
+}
+
+
+/*
+ * CVS/RCS Log:
+ * $Log: i2dplnsc.cc,v $
+ * Revision 1.2  2008-01-16 16:32:31  onken
+ * Fixed some empty or doubled log messages in libi2d files.
+ *
+ * Revision 1.1  2008-01-16 14:40:02  onken
+ * Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+ *
+ */
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2dplnsc.h b/cadxcore/main/controllers/dcmtk/libi2d/i2dplnsc.h
new file mode 100644
index 0000000..632228e
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2dplnsc.h
@@ -0,0 +1,144 @@
+/*
+ *
+ *  $Id: i2dplnsc.h $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Class for conversion of image file into new DICOM SC Image IODs
+ *
+ *  Last Update:      $Author: onken $
+ *  Update Date:      $Date: 2009-01-16 09:51:55 $
+ *  CVS/RCS Revision: $Revision: 1.2 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+#ifndef I2DPLNSC_H
+#define I2DPLNSC_H
+
+#include <dcmtk/config/osconfig.h>
+#include <dcmtk/dcmdata/dctk.h>
+#include "i2doutpl.h"
+
+class I2DOutputPlugNewSC : public I2DOutputPlug
+{
+
+public:
+
+        /** Constructor, initializes member variables with standard values
+         *  @return none
+         */
+        I2DOutputPlugNewSC();
+
+        /** Virtual function that returns a short name of the plugin.
+         *  @return The name of the plugin
+         */
+        virtual OFString ident();
+
+        /** Overwrites function from base class. Returns the Storage SOP class
+         *  written by this plugin
+         *  @param suppSOPs - [out] List of UIDs representing the supported SOP
+         *                    classes supported by this plugin.
+         *  @return none
+         */
+        virtual void supportedSOPClassUIDs(OFList<OFString> suppSOPs);
+
+        /** Outputs SOP class specific information into dataset
+         * @param dataset - [in/out] Dataset to write to
+         * @return EC_Normal if successful, error otherwise
+         */
+        virtual OFCondition convert(DcmDataset &dataset) const;
+
+        /** Do some completeness / validity checks. Should be called when
+         *  dataset is completed and is about to be saved.
+         *  @param dataset - [in] The dataset to check
+         *  @return Error string if error occurs, empty string otherwise
+         */
+        virtual OFString isValid(DcmDataset& dataset) const;
+
+        /** Virtual Destructor, clean up memory
+         *  @return none
+         */
+        virtual ~I2DOutputPlugNewSC();
+
+protected:
+
+        /** Inserts attributes for Multi-frame Module
+         *  @param targetDataset - [in/out] The dataset to write to
+         *  @return EC_Normal if insertion was successfull, error code otherwise
+         */
+        virtual OFCondition insertMultiFrameAttribs(DcmDataset* targetDataset) const;
+
+        /** Inserts attributes Rescale Slope/Intercept/Type, which have to be
+         *  written (1C) if color model is MONOCHROME2 and BitsStored > 1.
+         *  @param targetDataset - [out] The dataset to write to
+         *  @return EC_Normal if insertion was successfull, error code otherwise
+         */
+        virtual OFCondition insertSCMultiFrameAttribs(DcmDataset *targetDataset) const;
+
+        /** Checks whether Image Pixel module attributes conform to the
+         *  specification of a a 1 bit Secondary Capture object.
+         *  @param dataset - [in] The dataset to check
+         *  @return EC_Normal, if everything is fine, error code otherwise
+         */
+        virtual OFCondition handle1BitSC(DcmDataset *dataset) const;
+
+        /** Checks whether Image Pixel module attributes conform to the
+         *  specification of a a 8 bit Secondary Capture object.
+         *  @param dataset - [in] The dataset to check
+         *  @return EC_Normal, if everything is fine, error code otherwise
+         */
+        virtual OFCondition handle8BitSC(DcmDataset *dataset) const;
+
+        /** Checks whether Image Pixel module attributes conform to the
+         *  specification of a a 16 bit Secondary Capture object.
+         *  @param dataset - [in] The dataset to check
+         *  @return EC_Normal, if everything is fine, error code otherwise
+         */
+        virtual OFCondition handle16BitSC(DcmDataset *dataset) const;
+
+
+};
+
+#endif // I2DPLNSC_H
+
+/*
+ * CVS/RCS Log:
+ * $Log: i2dplnsc.h,v $
+ * Revision 1.2  2009-01-16 09:51:55  onken
+ * Completed doxygen documentation for libi2d.
+ *
+ * Revision 1.1  2008-01-16 15:11:44  onken
+ * Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+ *
+ * Revision 1.1  2008-01-11 14:17:53  onken
+ * Added various options to i2dlib. Changed logging to use a configurable
+ * logstream. Added output plugin for the new Multiframe Secondary Capture SOP
+ * Classes. Added mode for JPEG plugin to copy exsiting APPn markers (except
+ * JFIF). Changed img2dcm default behaviour to invent type1/type2 attributes (no
+ * need for templates any more). Added some bug fixes.
+ *
+ */
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2dplsc.cpp b/cadxcore/main/controllers/dcmtk/libi2d/i2dplsc.cpp
new file mode 100644
index 0000000..c9c057e
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2dplsc.cpp
@@ -0,0 +1,112 @@
+/*
+ *
+ *  $Id: i2dplsc.cpp $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Implements conversion from image into DICOM SC IOD
+ *
+ *  Last Update:      $Author: onken $
+ *  Update Date:      $Date: 2008-01-16 16:32:31 $
+ *  CVS/RCS Revision: $Revision: 1.2 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/config/osconfig.h>
+#include "i2dplsc.h"
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+I2DOutputPlugSC::I2DOutputPlugSC()
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DOutputPlugSC: Output plugin for Secondary Capture initialized");
+}
+
+OFString I2DOutputPlugSC::ident()
+{
+        return "Secondary Capture Image SOP Class";
+}
+
+void I2DOutputPlugSC::supportedSOPClassUIDs(OFList<OFString> suppSOPs)
+{
+        suppSOPs.push_back(UID_SecondaryCaptureImageStorage);
+}
+
+
+OFCondition I2DOutputPlugSC::convert(DcmDataset &dataset) const
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DOutputPlugSC: Inserting SC specific attributes");
+        OFCondition cond;
+        cond = dataset.putAndInsertOFStringArray(DCM_SOPClassUID, UID_SecondaryCaptureImageStorage);
+
+        return EC_Normal;
+}
+
+
+OFString I2DOutputPlugSC::isValid(DcmDataset& dataset) const
+{
+        OFString err;
+        // Just return if checking was disabled
+        if (!m_doAttribChecking)
+                return err;
+
+        if (m_debug)
+                printMessage(m_logStream, "I2DOutputPlugSC: Checking SC specific attributes");
+        err += checkAndInventType1Attrib(DCM_ConversionType, &dataset, "WSD"); // WSD="Workstation"
+
+        return err;
+}
+
+
+I2DOutputPlugSC::~I2DOutputPlugSC()
+{
+}
+
+
+/*
+ * CVS/RCS Log:
+ * $Log: i2dplsc.cc,v $
+ * Revision 1.2  2008-01-16 16:32:31  onken
+ * Fixed some empty or doubled log messages in libi2d files.
+ *
+ * Revision 1.1  2008-01-16 14:40:43  onken
+ * Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+ *
+ * Revision 1.1  2007/11/08 15:55:17  onken
+ * Initial checkin of img2dcm application and corresponding library i2dlib.
+ *
+ *
+ */
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2dplsc.h b/cadxcore/main/controllers/dcmtk/libi2d/i2dplsc.h
new file mode 100644
index 0000000..71eb8d5
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2dplsc.h
@@ -0,0 +1,111 @@
+/*
+ *
+ *  $Id: i2dplsc.h $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Class for conversion of image file into DICOM SC Image Storage
+ *
+ *  Last Update:      $Author: onken $
+ *  Update Date:      $Date: 2009-01-16 09:51:55 $
+ *  CVS/RCS Revision: $Revision: 1.2 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+#ifndef I2DPLSC_H
+#define I2DPLSC_H
+
+#include <dcmtk/config/osconfig.h>
+#include <dcmtk/dcmdata/dctk.h>
+#include "i2doutpl.h"
+
+class I2DOutputPlugSC : public I2DOutputPlug
+{
+
+public:
+
+        /** Constructor, initializes member variables with standard values
+         *  @return none
+         */
+        I2DOutputPlugSC();
+
+        /** Virtual function that returns a short name of the plugin.
+         *  @return The name of the plugin
+         */
+        virtual OFString ident();
+
+        /** Overwrites function from base class. Returns the Storage SOP class
+         *  written by this plugin
+         *  @param suppSOPs - [out] List of UIDS representing SOP classes supported
+         *                    by this plugin
+         *  @return none
+         */
+        virtual void supportedSOPClassUIDs(OFList<OFString> suppSOPs);
+
+        /** Outputs SOP class specific information into dataset
+         * @param dataset - [in/out] Dataset to write to
+         * @return EC_Normal if successful, error otherwise
+         */
+        virtual OFCondition convert(DcmDataset &dataset) const;
+
+        /** Do some completeness / validity checks. Should be called when
+         *  dataset is completed and is about to be saved.
+         *  @param dataset - [in] The dataset to check
+         *  @return Error string if error occurs, empty string otherwise
+         */
+        virtual OFString isValid(DcmDataset& dataset) const;
+
+        /** Virtual Destructor, clean up memory
+         *  @return none
+         */
+        virtual ~I2DOutputPlugSC();
+
+};
+
+#endif // I2DPLSC_H
+
+/*
+ * CVS/RCS Log:
+ * $Log: i2dplsc.h,v $
+ * Revision 1.2  2009-01-16 09:51:55  onken
+ * Completed doxygen documentation for libi2d.
+ *
+ * Revision 1.1  2008-01-16 15:12:20  onken
+ * Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+ *
+ * Revision 1.2  2008-01-11 14:17:53  onken
+ * Added various options to i2dlib. Changed logging to use a configurable
+ * logstream. Added output plugin for the new Multiframe Secondary Capture SOP
+ * Classes. Added mode for JPEG plugin to copy exsiting APPn markers (except
+ * JFIF). Changed img2dcm default behaviour to invent type1/type2 attributes (no
+ * need for templates any more). Added some bug fixes.
+ *
+ * Revision 1.1  2007/11/08 15:58:56  onken
+ * Initial checkin of img2dcm application and corresponding library i2dlib.
+ *
+ *
+ */
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2dplvlp.cpp b/cadxcore/main/controllers/dcmtk/libi2d/i2dplvlp.cpp
new file mode 100644
index 0000000..69a2e0d
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2dplvlp.cpp
@@ -0,0 +1,132 @@
+/*
+ *
+ *  $Id: i2dplvlp.cpp $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Implements conversion from image into DICOM Visible Light Photography IOD
+ *
+ *  Last Update:      $Author: onken $
+ *  Update Date:      $Date: 2008-01-16 16:32:31 $
+ *  CVS/RCS Revision: $Revision: 1.2 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/config/osconfig.h>
+#include "i2dplvlp.h"
+#include <api/controllers/icontroladorpermisos.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+I2DOutputPlugVLP::I2DOutputPlugVLP()
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DOutputPlugVLP: Output plugin for VLP initialized");
+}
+
+OFString I2DOutputPlugVLP::ident()
+{
+        return "Visible Light Photographic Image SOP Class";
+}
+
+void I2DOutputPlugVLP::supportedSOPClassUIDs(OFList<OFString> suppSOPs)
+{
+        OFString str = GNC::GCS::IControladorPermisos::Instance()->Get("core.importacion", "storage_sop_class").ObtenerValor<std::string>().c_str();
+        suppSOPs.push_back(str);
+}
+
+
+OFCondition I2DOutputPlugVLP::convert(DcmDataset &dataset) const
+{
+        if (m_debug) {
+                printMessage(m_logStream, "I2DOutputPlugVLP: Inserting VLP specific attributes");
+        }
+        OFCondition cond;
+        OFString str = GNC::GCS::IControladorPermisos::Instance()->Get("core.importacion", "storage_sop_class").ObtenerValor<std::string>().c_str();
+        cond = dataset.putAndInsertOFStringArray(DCM_SOPClassUID, str);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to insert SOP class into dataset");
+
+        if (!dataset.tagExists(DCM_Modality)) {
+                cond = dataset.putAndInsertOFStringArray(DCM_Modality, "XC");
+                if (cond.bad())
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to insert Modality (XC) into dataset");
+        }
+
+        return EC_Normal;
+}
+
+
+OFString I2DOutputPlugVLP::isValid(DcmDataset& dataset) const
+{
+        OFString err;
+        // Just return if checking was disabled
+        if (!m_doAttribChecking)
+                return err;
+
+        if (m_debug)
+                printMessage(m_logStream, "I2DOutputPlugVLP: Checking VLP specific attributes for validity");
+        // Acquisition Context Module
+        checkAndInventType2Attrib(DCM_AcquisitionContextSequence, &dataset);
+
+        // General Equipment Module
+        checkAndInventType2Attrib(DCM_Manufacturer, &dataset);
+
+        // VL Image Module
+        checkAndInventType1Attrib(DCM_ImageType, &dataset, "DERIVED\\SECONDARY");
+        checkAndInventType2Attrib(DCM_LossyImageCompression, &dataset);
+
+        return err;
+}
+
+
+I2DOutputPlugVLP::~I2DOutputPlugVLP()
+{
+}
+
+
+/*
+ * CVS/RCS Log:
+ * $Log: i2dplvlp.cc,v $
+ * Revision 1.2  2008-01-16 16:32:31  onken
+ * Fixed some empty or doubled log messages in libi2d files.
+ *
+ * Revision 1.1  2008-01-16 14:42:00  onken
+ * Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+ *
+ * Revision 1.1  2007/11/08 15:55:17  onken
+ * Initial checkin of img2dcm application and corresponding library i2dlib.
+ *
+ *
+ */
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/i2dplvlp.h b/cadxcore/main/controllers/dcmtk/libi2d/i2dplvlp.h
new file mode 100644
index 0000000..080b003
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/i2dplvlp.h
@@ -0,0 +1,111 @@
+/*
+ *
+ *  $Id: i2dplvlp.h $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Class for conversion of image file into DICOM SC Image Storage
+ *
+ *  Last Update:      $Author: onken $
+ *  Update Date:      $Date: 2009-01-16 09:51:55 $
+ *  CVS/RCS Revision: $Revision: 1.2 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+#ifndef I2DPLVLP_H
+#define I2DPLVLP_H
+
+#include <dcmtk/config/osconfig.h>
+#include <dcmtk/dcmdata/dctk.h>
+#include "i2doutpl.h"
+
+class I2DOutputPlugVLP : public I2DOutputPlug
+{
+
+public:
+
+        /** Constructor, initializes member variables with standard values
+         *  @return none
+         */
+        I2DOutputPlugVLP();
+
+        /** Virtual function that returns a short name of the plugin.
+         *  @return The name of the plugin
+         */
+        virtual OFString ident();
+
+        /** Overwrites function from base class. Returns the Storage SOP class
+         *  written by this plugin
+         *  @param suppSOPs - [out] List of UIDs representing SOP classes supported by
+         *                    this plugin
+         *  @return A string holding the Storage SOP class written by this plugin
+         */
+        virtual void supportedSOPClassUIDs(OFList<OFString> suppSOPs);
+
+        /** Outputs SOP class specific information into dataset
+         * @param dataset - [in/out] Dataset to write to
+         * @return EC_Normal if successful, error otherwise
+         */
+        virtual OFCondition convert(DcmDataset &dataset) const;
+
+        /** Do some completeness / validity checks. Should be called when
+         *  dataset is completed and is about to be saved.
+         *  @param dataset - [in] The dataset to check
+         *  @return Error string if error occurs, empty string else
+         */
+        virtual OFString isValid(DcmDataset& dataset) const;
+
+        /** Virtual Destructor, clean up memory
+         *  @return none
+         */
+        virtual ~I2DOutputPlugVLP();
+
+};
+
+#endif // I2DPLVLP_H
+
+/*
+ * CVS/RCS Log:
+ * $Log: i2dplvlp.h,v $
+ * Revision 1.2  2009-01-16 09:51:55  onken
+ * Completed doxygen documentation for libi2d.
+ *
+ * Revision 1.1  2008-01-16 15:13:17  onken
+ * Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+ *
+ * Revision 1.2  2008-01-11 14:17:53  onken
+ * Added various options to i2dlib. Changed logging to use a configurable
+ * logstream. Added output plugin for the new Multiframe Secondary Capture SOP
+ * Classes. Added mode for JPEG plugin to copy exsiting APPn markers (except
+ * JFIF). Changed img2dcm default behaviour to invent type1/type2 attributes (no
+ * need for templates any more). Added some bug fixes.
+ *
+ * Revision 1.1  2007/11/08 15:58:56  onken
+ * Initial checkin of img2dcm application and corresponding library i2dlib.
+ *
+ *
+ */
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/pdf2dsource.cpp b/cadxcore/main/controllers/dcmtk/libi2d/pdf2dsource.cpp
new file mode 100644
index 0000000..06dc3bf
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/pdf2dsource.cpp
@@ -0,0 +1,173 @@
+/*
+ *
+ *  $Id: pdf2dsource.cpp $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Base Class for plugins extracting pixel data from standard
+ *           image files
+ *
+ *  Last Update:      $Author: onken $
+ *  Update Date:      $Date: 2009-01-16 09:51:55 $
+ *  CVS/RCS Revision: $Revision: 1.2 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include "document2dcm.h"
+#include <dcmtk/dcmdata/dcpxitem.h>
+
+#include "dcmtk/dcmdata/dctk.h"
+//#include "dcmtk/dcmdata/dcdebug.h"
+#include "dcmtk/dcmdata/cmdlnarg.h"
+#include "dcmtk/ofstd/ofconapp.h"
+#include "dcmtk/dcmdata/dcuid.h"     /* for dcmtk version name */
+#include "dcmtk/dcmdata/dcistrmf.h"
+
+#include "pdf2dsource.h"
+#include <main/controllers/controladorlog.h>
+#include <main/entorno.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#undef MACRO_QUE_ESTORBA
+#endif
+
+
+#include <wx/string.h>
+#include <wx/filefn.h>
+
+
+OFString PDF2DSource::inputFormat() const
+{
+        return "PDF";
+}
+/** Reads pixel data and corresponding attributes like rows etc. from image
+	 *  file and inserts them into dataset.
+	 *  @param dset - [out] The dataset to export the pixel data attributes to
+	 *  @param outputTS - [out] The proposed transfex syntax of the dataset
+	 *  @return EC_Normal, if successful, error otherwise
+	 */
+OFCondition PDF2DSource::readAndInsertSpecificTags( DcmDataset* dset,
+                E_TransferSyntax& outputTS)
+{
+        OFCondition cond;
+
+        //it's a secondary capture.. if conversion type is not set put  SD -> scanned document
+        dset->putAndInsertString(DCM_ConversionType, "SD", false);
+        dset->putAndInsertString(DCM_MIMETypeOfEncapsulatedDocument, "application/pdf", true);
+
+        cond = dset->putAndInsertOFStringArray(DCM_SOPClassUID, UID_EncapsulatedPDFStorage);
+        if (cond.bad())
+                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to insert SOP class into dataset");
+
+        if (!dset->tagExists(DCM_Modality)) {
+                cond = dset->putAndInsertOFStringArray(DCM_Modality, "DOC");
+                if (cond.bad())
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to insert Modality (DOC) into dataset");
+        }
+
+        if (!dset->tagExists(DCM_BurnedInAnnotation)) {
+                cond = dset->putAndInsertOFStringArray(DCM_BurnedInAnnotation, "YES");
+                if (cond.bad())
+                        return makeOFCondition(OFM_dcmdata, 18, OF_error, "Unable to insert DCM_BurnedInAnnotation into dataset");
+        }
+
+
+        //document
+        //read file into unsigned char
+        {
+                size_t fileSize = 0;
+                {
+                        std::ifstream file;
+                        file.open(m_file.c_str(),std::ios_base::binary);
+                        if(!file.is_open()) {
+                                LOG_ERROR("PDF2DSource","Error opening file");
+                                return makeOFCondition(OFM_dcmdata, 18, OF_error, "Error opening file");
+                        }
+                        //get the length of the file
+                        file.seekg(0,std::ios::end);
+                        fileSize = file.tellg();
+                        if (fileSize %2 != 0) {
+                                LOG_INFO("VideoDicomizer", "Video size is odd, padding with 0");
+                                //file is odd
+                                m_isTemp = true;
+                                std::string m_TempFile = GNC::Entorno::Instance()->CreateGinkgoTempFile();
+                                if (!wxCopyFile(FROMPATH(m_file), FROMPATH(m_TempFile))) {
+                                        LOG_ERROR("PDF2DSource", "Error creating temp file");
+                                }
+                                std::ofstream ofile;
+                                ofile.open(m_TempFile.c_str(), std::ios_base::app);
+                                ofile << '\0';
+                                ofile.close();
+                                m_file = m_TempFile.c_str();
+                                fileSize++;
+                        }
+                }
+                DcmInputFileStreamFactory* pFactory = new DcmInputFileStreamFactory(m_file.c_str(), 0);
+                DcmOtherByteOtherWord* fileTag = new DcmOtherByteOtherWord(DCM_EncapsulatedDocument);
+                fileTag->setVR(EVR_OB);
+                fileTag->createValueFromTempFile(pFactory, fileSize, EBO_unknown);
+
+                dset->insert(fileTag, true);
+        }
+
+
+        outputTS = EXS_LittleEndianExplicit;
+        return cond;
+}
+
+/** Do some completeness / validity checks. Should be called when
+ *  dataset is completed and is about to be saved.
+ *  @param dataset - [in] The dataset to check
+ *  @return Error string if error occurs, empty string otherwise
+ */
+OFString PDF2DSource::isValid(DcmDataset& dset) const
+{
+        if (m_debug)
+                printMessage(m_logStream, "I2DImgSource: Checking validity of DICOM output dataset");
+        OFString dummy, err;
+        OFCondition cond;
+        err += checkAndInventType2Attrib(DCM_MIMETypeOfEncapsulatedDocument, &dset);
+
+        err += checkAndInventType2Attrib(DCM_SOPInstanceUID, &dset);
+        err += checkAndInventType2Attrib(DCM_ConversionType, &dset);
+
+        return err;
+}
+
+PDF2DSource::~PDF2DSource()
+{
+        if (m_isTemp) {
+                wxRemoveFile(FROMPATH(m_file));
+        }
+}
diff --git a/cadxcore/main/controllers/dcmtk/libi2d/pdf2dsource.h b/cadxcore/main/controllers/dcmtk/libi2d/pdf2dsource.h
new file mode 100644
index 0000000..7ceb414
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/libi2d/pdf2dsource.h
@@ -0,0 +1,115 @@
+/*
+ *
+ *  $Id: pdf2dsource.h $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *  Copyright (C) 2001-2007, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  dcmdata
+ *
+ *  Author:  Michael Onken
+ *
+ *  Purpose: Base Class for plugins extracting pixel data from standard
+ *           image files
+ *
+ *  Last Update:      $Author: onken $
+ *  Update Date:      $Date: 2009-01-16 09:51:55 $
+ *  CVS/RCS Revision: $Revision: 1.2 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+#pragma once
+
+#include <dcmtk/config/osconfig.h>
+#include <dcmtk/dcmdata/dctk.h>
+#include "d2dsource.h"
+
+class PDF2DSource: public D2DSource
+{
+
+public:
+
+        /** Constructor
+         */
+        PDF2DSource() : D2DSource()
+        {
+                m_isTemp=false;
+        }
+
+        virtual void setPDFFile(const OFString& file)
+        {
+                m_file = file;
+        }
+
+        /** Returns identifier for the image input format the plugin imports.
+         *  @return A short identifier (e. g. "JPEG")
+         */
+        virtual OFString inputFormat() const;
+
+        /** Reads pixel data and corresponding attributes like rows etc. from image
+         *  file and inserts them into dataset.
+         *  @param dset - [out] The dataset to export the pixel data attributes to
+         *  @param outputTS - [out] The proposed transfex syntax of the dataset
+         *  @return EC_Normal, if successful, error otherwise
+         */
+        virtual OFCondition readAndInsertSpecificTags( DcmDataset* dset,
+                        E_TransferSyntax& outputTS);
+
+        /** Do some completeness / validity checks. Should be called when
+         *  dataset is completed and is about to be saved.
+         *  @param dataset - [in] The dataset to check
+         *  @return Error string if error occurs, empty string otherwise
+         */
+        OFString isValid(DcmDataset& dset) const;
+
+
+        /** Virtual Destructor
+         */
+        virtual ~PDF2DSource();
+
+protected:
+        OFString m_file;
+        bool m_isTemp;
+};
+
+/*
+ * CVS/RCS Log:
+ * $Log: i2dimgs.h,v $
+ * Revision 1.2  2009-01-16 09:51:55  onken
+ * Completed doxygen documentation for libi2d.
+ *
+ * Revision 1.1  2008-01-16 15:08:38  onken
+ * Moved library "i2dlib" from /dcmdata/libsrc/i2dlib to /dcmdata/libi2d
+ *
+ * Revision 1.2  2008-01-11 14:17:53  onken
+ * Added various options to i2dlib. Changed logging to use a configurable
+ * logstream. Added output plugin for the new Multiframe Secondary Capture SOP
+ * Classes. Added mode for JPEG plugin to copy exsiting APPn markers (except
+ * JFIF). Changed img2dcm default behaviour to invent type1/type2 attributes (no
+ * need for templates any more). Added some bug fixes.
+ *
+ * Revision 1.1  2007/11/08 15:58:55  onken
+ * Initial checkin of img2dcm application and corresponding library i2dlib.
+ *
+ *
+ */
+
diff --git a/cadxcore/main/controllers/dcmtk/ofstd/offile.h b/cadxcore/main/controllers/dcmtk/ofstd/offile.h
new file mode 100644
index 0000000..a8c3af0
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/ofstd/offile.h
@@ -0,0 +1,909 @@
+/*
+ *
+ *  $Id: offile.h $
+ *  Ginkgo CADx Project
+ *
+ *  Code addapted from DCMTK
+ *
+ *
+ *  Copyright (C) 2006-2009, OFFIS
+ *
+ *  This software and supporting documentation were developed by
+ *
+ *    Kuratorium OFFIS e.V.
+ *    Healthcare Information and Communication Systems
+ *    Escherweg 2
+ *    D-26121 Oldenburg, Germany
+ *
+ *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
+ *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
+ *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
+ *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
+ *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
+ *
+ *  Module:  ofstd
+ *
+ *  Author:  Marco Eichelberg
+ *
+ *  Purpose: C++ wrapper class for stdio FILE functions
+ *
+ *  Last Update:      $Author: joergr $
+ *  Update Date:      $Date: 2009-03-12 11:37:54 $
+ *  CVS/RCS Revision: $Revision: 1.8 $
+ *  Status:           $State: Exp $
+ *
+ *  CVS/RCS Log at end of file
+ *
+ */
+
+#ifndef GINKGOCADX_OFFILE_H
+#define GINKGOCADX_OFFILE_H
+
+#include <dcmtk/config/osconfig.h>
+#include <dcmtk/ofstd/oftypes.h>    /* for class OFBool */
+#include <dcmtk/ofstd/ofstring.h>   /* for class OFString */
+
+#define INCLUDE_UNISTD
+#define INCLUDE_CSTDIO
+#define INCLUDE_CSTRING
+#define INCLUDE_CSTDARG
+#define INCLUDE_CERRNO
+#define INCLUDE_CWCHAR
+#include <dcmtk/ofstd/ofstdinc.h>
+
+BEGIN_EXTERN_C
+#ifdef HAVE_SYS_STAT_H
+#include <sys/stat.h>   /* needed for struct _stati64 on Win32 */
+#endif
+END_EXTERN_C
+
+/* When using the ISO C++ include files such as <cstdio>, <cstdarg> etc.,
+* all ANSI C functions like fopen() are declared in namespace std,
+* (e.g. we have to use std::fopen()), but non-ANSI Posix functions remain
+* in global namespace, e.g. we have to use ::fopen64().
+* To make things even more difficult, not all compilers really declare
+* ANSI C functions in namespace std in accordance with the C++ standard.
+* Yes, this is ugly.
+*/
+
+/* Find out whether current operating system needs explicit function calls
+* to handle large file support
+*/
+#ifdef _LARGEFILE64_SOURCE
+// Mac OSX defines _LARGEFILE64_SOURCE but anyhow expects implicit 64 bit calls
+#if !(defined(__MACH__) && defined(__APPLE__))
+#define EXPLICIT_LFS_64
+#endif
+#endif
+
+#ifdef _WIN32
+// On Win32 systems, we use Win32 specific definitions
+typedef __int64 offile_off_t;
+typedef fpos_t offile_fpos_t;
+#else
+#ifdef EXPLICIT_LFS_64
+// Explicit LFS (LFS64)
+typedef fpos64_t offile_fpos_t;
+typedef off64_t offile_off_t;
+#else
+// Implicit LFS or no LFS
+#ifdef HAVE_FSEEKO
+typedef off_t offile_off_t;
+#else
+typedef long offile_off_t;
+#endif
+typedef fpos_t offile_fpos_t;
+#endif
+#endif
+
+// the type we use to store the last error.
+typedef int offile_errno_t;
+
+/** this class provides a simple C++ encapsulation layer for stdio FILE pointers.
+*  All stdio functions on files are directly mapped into member functions.
+*  The handling of large files (64 bit file systems) is transparent. Instead
+*  of type off_t, fseek() and ftell() use offile_off_t which is a 64 bit type
+*  if available on the underlying platform. Similarly, getpos() and setpos() use
+*  type offile_fpos_t, which is defined appropriately.
+*  This class provides both of_fclose() and of_pclose(), but these are equivalent -
+*  the code always closes pipes with pclose() and files with of_fclose().
+*  Finally, an abstraction for errno is provided. Error codes should always
+*  be retrieves using methods getLastError() and getLastErrorString() which
+*  on Unix platforms are based on errno and strerror/strerror_r, but may be based
+*  on other mechanisms on platforms where errno does not exist.
+*/
+class GinkgoOFFile
+{
+public:
+        /// default constructor, creates an object that is not associated with any file.
+        GinkgoOFFile(): file_(NULL), popened_(OFFalse), lasterror_(0) {}
+
+        /** create object for given stdio FILE
+        *  @param f stdio FILE
+        */
+        GinkgoOFFile(FILE *f): file_(f), popened_(OFFalse), lasterror_(0) {}
+
+        /// destructor. Closes file if still open.
+        ~GinkgoOFFile()
+        {
+                if (file_) of_fclose();
+        }
+
+        /** opens the file whose name is the string pointed to by path and associates
+        *  a stream with it.
+        *  @param filename path to file
+        *  @param modes "r", "w" or "a" with possible modifiers "+", "b"
+        *  @return true if stream was successfully created, false otherwise, in which case
+        *   the error code is set.
+        */
+        OFBool of_fopen(const char *filename, const char *modes)
+        {
+                if (file_) of_fclose();
+#ifdef EXPLICIT_LFS_64
+                file_ = ::fopen64(filename, modes);
+#else
+                file_ = ::fopen(filename, modes);
+#endif
+                if (file_) popened_ = OFFalse;
+                else of_storeLastError();
+                return (file_ != NULL);
+        }
+
+#ifdef _WIN32
+        /** opens the file whose name is the wide character string pointed to by path and associates
+        *  a stream with it. This function is Win32 specific and only exists on WinNT and newer.
+        *  @param filename Unicode filename path to file
+        *  @param modes "r", "w" or "a" with possible modifiers "+", "b", as a wide character string
+        *  @return true if stream was successfully created, false otherwise, in which case the error code is set.
+        */
+        OFBool of_wfopen(const wchar_t *filename, const wchar_t *modes)
+        {
+                if (file_) of_fclose();
+                file_ = _wfopen(filename, modes);
+                if (file_) popened_ = OFFalse;
+                else of_storeLastError();
+                return (file_ != NULL);
+        }
+#endif
+
+        /** associates a stream with the existing file descriptor, fildes. The mode
+        *  of the stream (one of the values "r", "r+", "w", "w+", "a", "a+") must be
+        *  compatible with the mode of the file descriptor. The file position
+        *  indicator of the new stream is set to that belong� ing to fildes, and the
+        *  error and end-of-file indicators are cleared. Modes "w" or "w+" do not
+        *  cause truncation of the file. The file descriptor is not dup'ed, and
+        *  will be closed when the stream created by fdopen is closed. The result of
+        *  applying fdopen to a shared memory object is undefined.
+        *  @param fd file descriptor
+        *  @param modes "r", "w" or "a" with possible modifiers "+", "b"
+        *  @return true if stream was successfully created, false otherwise, in which case the error code is set.
+        */
+        OFBool of_fdopen(int fd, const char *modes)
+        {
+                if (file_) of_fclose();
+                file_ = ::fdopen(fd, modes);
+                if (file_) popened_ = OFFalse;
+                else of_storeLastError();
+                return (file_ != NULL);
+        }
+
+        /** opens a process by creating a pipe, forking, and invoking the shell.
+        *  Since a pipe is by definition unidirectional, the type argument may
+        *  specify only reading or writing, not both; the resulting stream is
+        *  correspondingly read-only or write-only. If the object was already
+        *  associated with another file or pipe, that one is closed.
+        *  @param command shell command line
+        *  @param modes "r" or "w"
+        *  @return true if pipe was successfully created, false otherwise
+        */
+        OFBool of_popen(const char *command, const char *modes)
+        {
+                if (file_) of_fclose();
+#ifdef _WIN32
+                file_ = _popen(command, modes);
+#else
+                file_ = ::popen(command, modes);
+#endif
+                if (file_) popened_ = OFTrue;
+                else of_storeLastError();
+                return (file_ != NULL);
+        }
+
+        /** opens the file whose name is the string pointed to by path and associates
+        *  the stream pointed maintained by this object with it. The original stream
+        *  (if it exists) is closed. The mode argument is used just as in the fopen
+        *  function. The primary use of the freopen function is to change the file
+        *  associated with a standard text stream (stderr, stdin, or stdout).
+        *  @param filename path to file
+        *  @param modes "r", "w" or "a" with possible modifiers "+", "b"
+        *  @return true if stream was successfully created, false otherwise, in which case the error code is set.
+        */
+        OFBool of_freopen(const char *filename, const char *modes)
+        {
+#ifdef EXPLICIT_LFS_64
+                file_ = ::freopen64(filename, modes, file_);
+#else
+                file_ = ::freopen(filename, modes, file_);
+#endif
+                if (file_) popened_ = OFFalse;
+                else of_storeLastError();
+                return (file_ != NULL);
+        }
+
+        /** generates a unique temporary filename. The temporary file is then opened
+        *  in binary read/write (w+b) mode. The file will be automatically deleted
+        *  when it is closed or the program terminates normally.
+        *  @return true if stream was successfully created, false otherwise, in which case the error code is set.
+        */
+        OFBool of_tmpfile()
+        {
+                if (file_) of_fclose();
+#ifdef EXPLICIT_LFS_64
+                file_ = ::tmpfile64();
+#else
+                file_ = ::tmpfile();
+#endif
+                if (file_) popened_ = OFFalse;
+                else of_storeLastError();
+                return (file_ != NULL);
+        }
+
+        /** dissociates the named stream from its underlying file or set of functions.
+        *  If the stream was being used for output, any buffered data is written
+        *  first, using fflush. Independent of the return value of this method,
+        *  any further access (including another call to of_fclose()) to the stream
+        *  maintained by this object results in undefined behaviour.
+        *  @return 0 upon success, EOF otherwise, in which case the error code is set.
+        */
+        int of_fclose()
+        {
+                int result = 0;
+                if (file_) {
+                        if (popened_) {
+#ifdef _WIN32
+                                result = _pclose(file_);
+#else
+                                result = ::pclose(file_);
+#endif
+                        } else {
+                                result = ::fclose(file_);
+                        }
+                        if (result == 0) file_ = NULL;
+                }
+                if (result) of_storeLastError();
+                return result;
+        }
+
+        /** waits for the associated process (created with popen) to terminate and
+        *  returns the exit status of the command as returned by wait4.
+        *  In this implementation, fclose and pclose can be used synonymously.
+        *  @return process ID of the child which exited, or -1 on error, in which case the error code is set
+        */
+        int of_pclose()
+        {
+                return of_fclose();
+        }
+
+        /** writes n elements of data, each size bytes long, to the stream, obtaining
+        *  them from the location given by ptr. Returns the number of items successfully written
+        *  (i.e., not the number of characters).  If an error occurs the return value is a short
+        *  item count (or zero).
+        *  @param ptr pointer to buffer
+        *  @param size size of item
+        *  @param n number of items
+        *  @return number of items written
+        */
+        size_t of_fwrite(const void *ptr, size_t size, size_t n)
+        {
+                return ::fwrite(ptr, size, n, file_);
+        }
+
+        /** reads n elements of data, each size bytes long, from the stream, storing
+        *  them at the location given by ptr. Returns the number of items successfully
+        *  read (i.e., not the number of characters).  If an error occurs, or the
+        *  end-of-file is reached, the return value is a short item count (or zero).
+        *  fread does not distinguish between end-of-file and error, and callers must
+        *  use feof and ferror to determine which occurred.
+        *  @param ptr pointer to buffer
+        *  @param size size of item
+        *  @param n number of items
+        *  @return number of items read
+        */
+        size_t of_fread(void *ptr, size_t size, size_t n)
+        {
+                return ::fread(ptr, size, n, file_);
+        }
+
+        /** forces a write of all user-space buffered data for the given output or
+        *  update stream via the stream's underlying write function. The open status
+        *  of the stream is unaffected.
+        *  @return 0 upon success, EOF otherwise, in which case the error code is set.
+        */
+        int of_fflush()
+        {
+                int result = ::fflush(file_);
+                if (result) of_storeLastError();
+                return result;
+        }
+
+        /** reads the next character from stream and returns it as an unsigned char
+        *  cast to an int, or EOF on end of file or error.
+        *  @return next character from stream or EOF
+        */
+        int of_fgetc()
+        {
+                return ::fgetc(file_);
+        }
+
+        /** The three types of buffering available are unbuffered, block buffered, and
+        *  line buffered. When an output stream is unbuffered, information appears on
+        *  the destination file or terminal as soon as written; when it is block
+        *  buffered many characters are saved up and written as a block; when it is
+        *  line buffered characters are saved up until a newline is output or input
+        *  is read from any stream attached to a terminal device (typically stdin).
+        *  Normally all files are block buffered. if a stream refers to a  terminal
+        *  (as stdout normally does) it is line buffered. The standard error  stream
+        *  stderr is always unbuffered by default. this function allows to set the
+        *  mode of the stream to line buffered.
+        *  @return 0 upon success, nonzero otherwise, in which case the error code may be set
+        *
+        */
+        void of_setlinebuf()
+        {
+#ifdef _WIN32
+                of_setvbuf(NULL, _IOLBF, 0);
+#else
+                ::setlinebuf(file_);
+#endif
+        }
+
+        /** sets the file position indicator for the stream pointed to by stream to
+        *  the beginning of the file. This is equivalent to fseek(0, SEEK_SET)
+        *  except that the error indicator for the stream is also cleared.
+        */
+        void of_rewind()
+        {
+                ::rewind(file_);
+        }
+
+        /** clears the end-of-file and error indicators for the stream
+        */
+        void of_clearerr()
+        {
+                ::clearerr(file_);
+        }
+
+        /** tests the end-of-file indicator for the stream, returning non-zero if it
+        *  is set. The end-of-file indicator can only be cleared by the function
+        *  clearerr. This method is called eof, not feof, because feof() is a macro
+        *  on Win32 and, therefore, cannot be used as a method name.
+        *  @return non-zero if EOF, zero otherwise
+        */
+        int of_eof() const
+        {
+#ifdef _WIN32
+                // feof is a macro on Win32. Macros never have namespaces.
+                return feof(file_);
+#else
+                return ::feof(file_);
+#endif
+        }
+
+        /** tests the error indicator for the stream, returning non-zero if it is set.
+        *  This method is named error, not ferror, because ferror() is a macro
+        *  on Win32 and, therefore, cannot be used as a method name.
+        *  The error indicator can only be reset by the clearerr function.
+        *  @return non-zero if error flag is set, zero otherwise
+        */
+        int of_error()
+        {
+#ifdef _WIN32
+                // ferror is a macro on Win32. Macros never have namespaces.
+                return ferror(file_);
+#else
+                return ::ferror(file_);
+#endif
+        }
+
+        /** returns the low-level file descriptor associated with the stream
+        *  @return low-level file descriptor associated with stream
+        */
+        int of_fileno()
+        {
+                return ::fileno(file_);
+        }
+
+        /** The three types of buffering available are unbuffered, block buffered, and
+        *  line buffered. When an output stream is unbuffered, information appears on
+        *  the destination file or terminal as soon as written; when it is block
+        *  buffered many characters are saved up and written as a block; when it is
+        *  line buffered characters are saved up until a newline is output or input
+        *  is read from any stream attached to a terminal device (typically stdin).
+        *  Normally all files are block buffered. if a stream refers to a  terminal
+        *  (as stdout normally does) it is line buffered. The standard error  stream
+        *  stderr is always unbuffered by default. This function allows to set the
+        *  mode of the stream to unbuffered (if buf is NULL) or block buffered.
+        *  @param buf pointer to buffer of size BUFSIZ as declared in cstdio, or NULL
+        *  @return 0 upon success, nonzero otherwise, in which case the error code may be set
+        */
+        void of_setbuf(char *buf)
+        {
+                ::setbuf(file_, buf);
+        }
+
+        /** The three types of buffering available are unbuffered, block buffered, and
+        *  line buffered. When an output stream is unbuffered, information appears on
+        *  the destination file or terminal as soon as written; when it is block
+        *  buffered many characters are saved up and written as a block; when it is
+        *  line buffered characters are saved up until a newline is output or input
+        *  is read from any stream attached to a terminal device (typically stdin).
+        *  Normally all files are block buffered. if a stream refers to a  terminal
+        *  (as stdout normally does) it is line buffered. The standard error  stream
+        *  stderr is always unbuffered by default. This function allows to set the
+        *  stream mode.
+        *  @param buf pointer to buffer, may be NULL
+        *  @param modes _IONBF (unbuffered) _IOLBF (line buffered) or _IOFBF (fully buffered)
+        *  @param n size of buffer, in bytes
+        *  @return 0 upon success, nonzero otherwise, in which case the error code may be set
+        */
+        int of_setvbuf(char * buf, int modes, size_t n)
+        {
+                int result = ::setvbuf(file_, buf, modes, n);
+                if (result) of_storeLastError();
+                return result;
+        }
+
+        /** The three types of buffering available are unbuffered, block buffered, and
+        *  line buffered. When an output stream is unbuffered, information appears on
+        *  the destination file or terminal as soon as written; when it is block
+        *  buffered many characters are saved up and written as a block; when it is
+        *  line buffered characters are saved up until a newline is output or input
+        *  is read from any stream attached to a terminal device (typically stdin).
+        *  Normally all files are block buffered. if a stream refers to a  terminal
+        *  (as stdout normally does) it is line buffered. The standard error  stream
+        *  stderr is always unbuffered by default. This function allows to set the
+        *  mode of the stream to unbuffered (if buf is NULL) or block buffered.
+        *  @param buf pointer to buffer
+        *  @param size size of buffer, in bytes
+        *  @return 0 upon success, nonzero otherwise, in which case the error code may be set
+        */
+        void of_setbuffer(char *buf, size_t size)
+        {
+#ifdef _WIN32
+                of_setvbuf(NULL, buf ? _IOFBF : _IONBF, size);
+#else
+                :: setbuffer(file_, buf, size);
+#endif
+        }
+
+        /** writes the character c, cast to an unsigned char, to stream.
+        *  @param c character
+        *  @return the character written as an unsigned char cast to an int or EOF on error
+        */
+        int of_fputc(int c)
+        {
+                return ::fputc(c, file_);
+        }
+
+        /** reads in at most one less than n characters from stream and stores them
+        *  into the buffer pointed to by s. Reading stops after an EOF or a newline.
+        *  If a newline is read, it is stored into the buffer. A '\0' is stored after
+        *  the last character in the buffer.
+        *  @param s pointer to buffer of size n
+        *  @param n buffer size
+        *  @return pointer to string
+        */
+        char* of_fgets(char *s, int n)
+        {
+                return ::fgets(s, n, file_);
+        }
+
+        /** writes the string s to stream, without its trailing '\0'.
+        *  @param s string to be written
+        *  @return a non-negative number on success, or EOF on error.
+        */
+        int of_fputs(const char *s)
+        {
+                return ::fputs(s, file_);
+        }
+
+        /** pushes c back to stream, cast to unsigned char, where it is available for
+        *  subsequent read operations. Pushed - back characters will be returned in
+        *  reverse order; only one pushback is guaranteed.
+        *  @param c character to push back
+        *  @return c on success, or EOF on error.
+        */
+        int of_ungetc(int c)
+        {
+                return ::ungetc(c, file_);
+        }
+
+        /** sets the file position indicator for the stream pointed to by stream. The
+        *  new position, measured in bytes, is obtained by adding offset bytes to the
+        *  position specified by whence. If whence is set to SEEK_SET, SEEK_CUR, or
+        *  SEEK_END, the offset is relative to the start of the file, the current
+        *  position indicator, or end-of-file, respectively. A successful call to the
+        *  fseek function clears the end-of- file indicator for the stream and undoes
+        *  any effects of the ungetc function on the same stream.
+        *  @param off offset to seek to
+        *  @param whence SEEK_SET, SEEK_CUR, or SEEK_END
+        *  @return 0 upon success, -1 otherwise in which case the error code is set.
+        */
+        int of_fseek(offile_off_t off, int whence)
+        {
+                int result;
+#ifdef _WIN32
+                // Windows does not have a 64-bit fseek.
+                // We emulate fseek through fsetpos, which does exist on Windows.
+                // fpos_t is (hopefully always) defined as __int64 on this platform
+                offile_fpos_t off2 = off;
+                fpos_t pos;
+                struct _stati64 buf;
+                switch (whence) {
+                case SEEK_END:
+                        // flush write buffer, if any, so that the file size is correct
+                        ::fflush(file_);
+#if 0
+                        // Python implementation based on _lseeki64(). May be unsafe because
+                        // there is no guarantee that fflush also empties read buffers.
+                        ::fflush(file_);
+                        if (_lseeki64(:: fileno(file_), 0, 2) == -1) {
+                                of_storeLastError();
+                                return -1;
+                        }
+                        // fall through
+#else
+                        // determine file size (using underlying file descriptor). This should be safe.
+                        if (_fstati64(:: fileno(file_), &buf) == -1) {
+                                of_storeLastError();
+                                return -1;
+                        }
+
+                        // fsetpos position is offset + file size.
+                        off2 += buf.st_size;
+                        break;
+#endif
+                case SEEK_CUR:
+                        if (::fgetpos(file_, &pos) != 0) {
+                                of_storeLastError();
+                                return -1;
+                        }
+
+                        off2 += pos;
+                        break;
+                case SEEK_SET:
+                        /* do nothing */
+                        break;
+                }
+                result = of_fsetpos(&off2);
+#elif defined(__BEOS__)
+                result = :: _fseek(fp, offset, whence);
+#else
+#ifdef HAVE_FSEEKO
+#ifdef EXPLICIT_LFS_64
+                result = ::fseeko64(file_, off, whence);
+#else
+                result = ::fseeko(file_, off, whence);
+#endif
+#else
+                result = ::fseek(file_, off, whence);
+#endif
+#endif
+                if (result) of_storeLastError();
+                return result;
+        }
+
+        /** obtains the current value of the file position indicator for the stream pointed to by the stream.
+        *  @return current file position
+        */
+        offile_off_t of_ftell()
+        {
+#ifdef _WIN32
+                // Windows does not have a 64-bit ftell, and _telli64 cannot be used
+                // because it operates on file descriptors and ignores FILE buffers.
+                // We emulate ftell through fgetpos, which does exist on Windows.
+                // fpos_t is (hopefully always) defined as __int64 on this platform.
+                offile_fpos_t pos;
+                if (of_fgetpos(&pos) != 0) {
+                        of_storeLastError();
+                        return -1;
+                }
+                return pos;
+#else
+                offile_off_t result;
+#ifdef HAVE_FSEEKO
+#ifdef EXPLICIT_LFS_64
+                result = ::ftello64(file_);
+#else
+                result = ::ftello(file_);
+#endif
+#else
+                result = ::ftell(file_);
+#endif
+                if (result < 0) of_storeLastError();
+                return result;
+#endif
+        }
+
+        /** alternate interface equivalent to ftell, storing the current value of the
+        *  file offset into the object referenced by pos. On some non-UNIX systems an
+        *  fpos_t object may be a complex object and these routines may be the only
+        *  way to portably reposition a text stream.
+        *  @param pos pointer to offile_fpos_t structure
+        *  @return 0 upon success, -1 otherwise in which case the error code is set.
+        */
+        int of_fgetpos(offile_fpos_t *pos)
+        {
+                int result;
+#ifdef EXPLICIT_LFS_64
+                result = ::fgetpos64(file_, pos);
+#else
+                result = ::fgetpos(file_, pos);
+#endif
+                if (result) of_storeLastError();
+                return result;
+        }
+
+        /** alternate interface equivalent to fseek (with whence set to SEEK_SET),
+        *  setting the current value of the file offset from the object referenced by
+        *  pos. On some non-UNIX systems an fpos_t object may be a complex object and
+        *  these routines may be the only way to portably reposition a text stream.
+        *  @param pos pointer to offile_fpos_t structure
+        *  @return 0 upon success, -1 otherwise in which case the error code is set.
+        */
+        int of_fsetpos(offile_fpos_t *pos)
+        {
+                int result;
+#ifdef EXPLICIT_LFS_64
+                result = ::fsetpos64(file_, pos);
+#else
+                result = ::fsetpos(file_, pos);
+#endif
+                if (result) of_storeLastError();
+                return result;
+        }
+
+        /** print formatted string into stream, see printf(3)
+        *  @param format format string
+        *  @param ... further parameters according to format string
+        *  @return number of characters printed
+        */
+        int of_fprintf(const char *format, ...)
+        {
+                int result = 0;
+                va_list ap;
+                va_start(ap, format);
+                result = ::vfprintf(file_, format, ap);
+                va_end(ap);
+                return result;
+        }
+
+        /** print formatted string into stream, see printf(3)
+        *  @param format format string
+        *  @param arg list of further parameters according to format string
+        *  @return number of characters printed
+        */
+        int of_vfprintf(const char *format, va_list arg)
+        {
+                return ::vfprintf(file_, format, arg);
+        }
+
+        // we cannot emulate fscanf because we would need vfscanf for this
+        // purpose, which does not exist, e.g. on Win32.
+
+        /** return FILE pointer managed by this object. This allows the user
+        *  to call some stdio functions that are not encapsulated in this class
+        *  (but possibly should be).
+        *  @return pointer to FILE structure managed by this object
+        */
+        FILE *of_file()
+        {
+                return file_;
+        }
+
+        /** return true if this object is currently associated with a stream, false otherwise
+        *  @return true if this object is currently associated with a stream, false otherwise
+        */
+        OFBool of_open() const
+        {
+                return file_ != NULL;
+        }
+
+        /** return last error code for this stream
+        *  @return last error code for this stream
+        */
+        offile_errno_t of_getLastError() const
+        {
+                return lasterror_;
+        }
+
+        /** return string describing last error code for this stream
+        *  @param s string describing last error code for this stream returned in this parameter
+        */
+        void of_getLastErrorString(OFString& s) const
+        {
+#ifdef HAVE_PROTOTYPE_STRERROR_R
+                char buf[1000];
+                buf[0] = 0; // be paranoid and initialize the buffer to empty string.
+
+                // two incompatible interfaces for strerror_r with different return types exist.
+#ifdef HAVE_CHARP_STRERROR_R
+                // we're using the GNU specific version that returns the result, which may
+                // or may not be a pointer to buf
+                s = strerror_r(lasterror_, buf, 1000);
+#else
+                // we're using the X/OPEN version that always stores the result in buf.
+                (void) strerror_r(lasterror_, buf, 1000);
+                s = buf;
+#endif
+#else
+                // we only have strerror() which is thread unsafe on Posix platforms, but thread safe on Windows.
+                s = ::strerror(lasterror_);
+#endif
+        }
+
+        // Cygwin does not support the wide character functions
+#ifndef __CYGWIN__
+
+        /** When mode is zero, the fwide function determines the current orientation
+        *  of stream. It returns a value > 0 if stream is wide-character oriented,
+        *  i.e.  if wide character I/O is permitted but char I/O is disallowed. It
+        *  returns a  value < 0 if stream is byte oriented, i.e. if char I/O is
+        *  permitted but wide  character I/O is disallowed. It returns zero if stream
+        *  has no orientation yet;  in this case the next I/O operation might change
+        *  the orientation (to byte  oriented if it is a char I/O operation, or to
+        *  wide-character oriented if it  is a wide character I/O operation).
+        *  Once a stream has an orientation, it cannot be changed and persists until
+        *  the stream is closed.
+        *  When mode is non-zero, the fwide function first attempts to set stream's
+        *  orientation (to wide-character oriented if mode > 0, or to byte oriented
+        *  if mode < 0). It then returns a value denoting the current orientation, as
+        *  above.
+        *  @param mode mode of operation for fwide
+        *  @return orientation of stream
+        */
+        int of_fwide(int mode)
+        {
+                return ::fwide(file_, mode);
+        }
+
+        /** reads a wide character from stream and returns it. If the end of stream is
+        *  reached, or if ferror(stream) becomes true, it returns WEOF. If a wide
+        *  character conversion error occurs, it sets the error code to EILSEQ and returns
+        *  WEOF.
+        *  @return next character from stream or WEOF
+        */
+        wint_t of_fgetwc()
+        {
+                wint_t result = ::fgetwc(file_);
+                if (result == WEOF) of_storeLastError();
+                return result;
+        }
+
+        /** writes the wide character wc to stream. If ferror(stream) becomes true, it returns WEOF.
+        *  If a wide character conversion error occurs, it sets the error code to EILSEQ and returns WEOF.
+        *  Otherwise it returns wc.
+        *  @param wc wide character to write to stream
+        *  @return character written or WEOF
+        */
+        wint_t of_fputwc(wchar_t wc)
+        {
+                wint_t result = ::fputwc(wc, file_);
+                if (result == WEOF) of_storeLastError();
+                return result;
+        }
+
+        /** pushes back a wide character onto stream and returns it. If wc is WEOF, it
+        *  returns WEOF. If wc is an invalid wide character, it sets errno to EILSEQ
+        *  and returns WEOF. If wc is a valid wide character, it is pushed back  onto
+        *  the stream and thus becomes available for future wide character read
+        *  operations. The file-position indicator is decremented by one or more.
+        *  The end-of-file indicator is cleared. The backing storage of the file is
+        *  not affected. Note: wc need not be the last wide character read from the
+        *  stream; it can be any other valid wide character. If the implementation
+        *  supports multiple push-back operations in a row, the pushed-back wide
+        *  characters will be read in reverse order; however, only one level of
+        *  push-back is guaranteed.
+        *  @param wc wide character to put back to stream
+        *  @return character put back or WEOF
+        */
+        wint_t of_ungetwc(wint_t wc)
+        {
+                wint_t result = ::ungetwc(wc, file_);
+                if (result == WEOF) of_storeLastError();
+                return result;
+        }
+
+        /** print formatted wide string into stream, see wprintf(3)
+        *  @param format format string
+        *  @param ... further parameters according to format string
+        *  @return number of characters printed
+        */
+        int of_fwprintf(const wchar_t *format, ...)
+        {
+                int result = 0;
+                va_list ap;
+                va_start(ap, format);
+                result = ::vfwprintf(file_, format, ap);
+                va_end(ap);
+                return result;
+        }
+
+        /** print formatted wide string into stream, see printf(3)
+        *  @param format format string
+        *  @param arg list of further parameters according to format string
+        *  @return number of characters printed
+        */
+        int of_vfwprintf(const wchar_t *format, va_list arg)
+        {
+                return ::vfwprintf(file_, format, arg);
+        }
+
+        // we cannot emulate fwscanf because we would need vfwscanf for this
+        // purpose, which does not exist, e.g. on Win32.
+
+#endif /* __CYGWIN__ */
+
+private:
+
+        // private undefined copy constructor
+        GinkgoOFFile(const GinkgoOFFile &arg);
+
+        // private undefined assignment operator
+        GinkgoOFFile &operator=(const GinkgoOFFile &arg);
+
+        /// the file maintained by this object
+        FILE *file_;
+
+        /// a flag indicating whether or not this object was created with popen().
+        OFBool popened_;
+
+        /// the last error code for operations of this stream
+        offile_errno_t lasterror_;
+
+        /// store last error code. For now we simply store the content of errno.
+        inline void of_storeLastError()
+        {
+                lasterror_ = errno;
+        }
+
+};
+
+
+#endif
+
+/*
+* CVS/RCS Log:
+* $Log: offile.h,v $
+* Revision 1.8  2009-03-12 11:37:54  joergr
+* Fixed various Doxygen API documentation issues.
+*
+* Revision 1.7  2009-02-13 12:56:18  joergr
+* Added private undefined copy constructor and assignment operator in order to
+* avoid compiler warnings (reported by gcc with additional flags).
+*
+* Revision 1.6  2009-01-30 13:49:01  joergr
+* Replaced checking of macro WIN32 by _WIN32.
+*
+* Revision 1.5  2008-05-29 10:37:11  meichel
+*  Fixed compile error on Cygwin where no wide-char FILE functions are available
+*
+* Revision 1.4  2008-02-07 16:57:46  meichel
+* Class OFFile now makes use of HAVE_CHARP_STRERROR_R to use the
+*   correct version of strerror_r.
+*
+* Revision 1.3  2007/06/06 13:55:58  onken
+* Fixed compilation for Mac OS X with making large file support function calls
+* implicit for this OS (Mac OS X misleadingly defines _LARGEFILE64_SOURCE).
+*
+* Revision 1.2  2007/02/19 16:03:47  meichel
+* Added constructor to class OFFile that takes FILE * as argument.
+*
+* Revision 1.1  2006/08/21 12:40:44  meichel
+* Added new class OFFile that provides a simple encapsulation layer for
+*   FILE based stream I/O and, in particular, provides long file support
+*   (LFS) if available on the underlying operating system platform through
+*   a single API.
+*
+*
+*/
diff --git a/cadxcore/main/controllers/dcmtk/tls/gtlslayer.cc b/cadxcore/main/controllers/dcmtk/tls/gtlslayer.cc
new file mode 100644
index 0000000..b6357ce
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/tls/gtlslayer.cc
@@ -0,0 +1,164 @@
+/*
+ *
+ *  $Id$
+ *  Ginkgo CADx Project
+ *
+ *  Copyright 2008-14 MetaEmotion S.L. All rights reserved.
+ *  http://ginkgo-cadx.com
+ *
+ *  This file is licensed under LGPL v3 license.
+ *  See License.txt for details
+ *
+ */
+#include "tls.h"
+#include "gtlslayer.h"
+#include "dcmtk/config/osconfig.h"    /* make sure OS specific configuration is included first */
+
+BEGIN_EXTERN_C
+#ifdef HAVE_WINDOWS_H
+#define _WINSOCKAPI_    // stops windows.h including winsock.h
+#include <windows.h>
+#include <winbase.h>
+#endif
+#include <openssl/rand.h>
+#include <openssl/err.h>
+END_EXTERN_C
+
+#include "dcmtk/dcmtls/tlstrans.h"
+#include "dcmtk/dcmnet/dicom.h"
+
+OFBool GTLSTransportLayer::setTempDHParametersFromString(const std::string& /*params*/)
+{
+#if defined(USE_PATCHED_LIBS)
+        if (!transportLayerContext) {
+                return OFFalse; //TCS_illegalCall;
+        }
+        if (params.size()) {
+                std::cerr << "No implementado" << std::endl;
+        }
+#endif
+        return OFFalse;
+}
+
+
+GTLSTransportLayer::~GTLSTransportLayer()
+{
+
+}
+
+DcmTransportLayerStatus GTLSTransportLayer::setPrivateKeyFromString(const std::string& /*keyStr*/)
+{
+#if defined(USE_PATCHED_LIBS)
+        if (!transportLayerContext) {
+                return TCS_illegalCall;
+        }
+
+        int ret = 0;
+
+        EVP_PKEY* pkey = NULL;
+
+        BIO* bio = BIO_new_mem_buf((void*)keyStr.c_str(), -1);
+        PEM_read_bio_PrivateKey(bio, &pkey, NULL, NULL);
+        BIO_set_close(bio, BIO_NOCLOSE);
+        BIO_free(bio);
+
+        if (pkey == NULL) {
+                std::cerr << "Error al leer el clave privada" << std::endl;
+                return TCS_tlsError;
+        }
+
+        ret = SSL_CTX_use_PrivateKey(transportLayerContext, pkey);
+        EVP_PKEY_free(pkey);
+
+        if (ret <= 0) {
+                return TCS_tlsError;
+        }
+#endif
+        return TCS_ok;
+}
+
+DcmTransportLayerStatus GTLSTransportLayer::setCertificateFromString(const std::string& /*certStr*/)
+{
+#if defined(USE_PATCHED_LIBS)
+        if (!transportLayerContext) {
+                return TCS_illegalCall;
+        }
+
+        int ret = 0;
+
+        X509* cert = NULL;
+
+        BIO* bio = BIO_new_mem_buf((void*)certStr.c_str(), -1);
+        PEM_read_bio_X509(bio, &cert, 0, NULL);
+
+        BIO_set_close(bio, BIO_NOCLOSE);
+        BIO_free(bio);
+
+        if (cert == NULL) {
+                std::cerr << "Error al leer el certificado" << std::endl;
+                return TCS_tlsError;
+        }
+
+        ret = SSL_CTX_use_certificate(transportLayerContext, cert);
+        if (ret <= 0 ) {
+                return TCS_tlsError;
+        }
+#endif
+        return TCS_ok;
+}
+
+#ifdef _WIN32
+//agrega los certificados de windows
+void X509_STORE_load_windows_systemstore(X509_STORE *store)
+{
+        HCERTSTORE hStore;
+        PCCERT_CONTEXT pContext = NULL;
+        X509 *x509;
+
+        hStore = CertOpenSystemStoreA(0, "ROOT");
+        if(!hStore)
+                return;
+
+        while ( (pContext = CertEnumCertificatesInStore(hStore, pContext)) != NULL ) {
+                x509 = NULL;
+                x509 = d2i_X509(NULL, (const unsigned char**)(&pContext->pbCertEncoded), pContext->cbCertEncoded);
+                if (x509) {
+                        X509_STORE_add_cert(store, x509);
+                        X509_free(x509);
+                }
+        }
+
+        CertFreeCertificateContext(pContext);
+        CertCloseStore(hStore, 0);
+}
+#endif
+
+void LoadSystemTrustedCertificates(X509_STORE *store)
+{
+        X509_STORE_set_default_paths(store);
+#ifdef _WIN32
+        X509_STORE_load_windows_systemstore(store);
+#endif
+}
+
+DcmTransportLayerStatus GTLSTransportLayer::addSystemTrustedCertificates()
+{
+#if defined(USE_PATCHED_LIBS)
+        if (!transportLayerContext) {
+                return TCS_illegalCall;
+        }
+
+        //int ret = 0;
+
+        X509_STORE* almacen = transportLayerContext->cert_store;
+        if(almacen != NULL) {
+                LoadSystemTrustedCertificates(almacen);
+        } else {
+                return TCS_tlsError;
+        }
+#endif
+
+        return TCS_ok;
+}
+
+
diff --git a/cadxcore/main/controllers/dcmtk/tls/gtlslayer.h b/cadxcore/main/controllers/dcmtk/tls/gtlslayer.h
new file mode 100644
index 0000000..a5249a4
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/tls/gtlslayer.h
@@ -0,0 +1,73 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#include "tls.h"
+
+#include <dcmtk/dcmtls/tlslayer.h>
+
+/**
+* Class derived from DcmTLSTransportLayer to accept inline certs/keys
+**/
+class GTLSTransportLayer : public DcmTLSTransportLayer
+{
+public:
+
+        /** constructor.
+        *  @param networkRole network role to be used by the application, influences
+        *    the choice of the secure transport layer code.
+        *  @param randFile path to file used to feed the random generator
+        */
+        GTLSTransportLayer(int networkRole, const char *randFile) : DcmTLSTransportLayer(networkRole, randFile) {}
+
+        /// destructor
+        virtual ~GTLSTransportLayer();
+
+        /** loads the private key used for authentication of this application from a string.
+        *  @param key The private key
+        *  @return TCS_ok if successful, an error code otherwise
+        */
+        DcmTransportLayerStatus setPrivateKeyFromString(const std::string& key);
+
+        /** loads the certificate (public key) used for authentication of this application from a string.
+        *  @param cert The certificate
+        *  @return TCS_ok if successful, an error code otherwise
+        */
+        DcmTransportLayerStatus setCertificateFromString(const std::string& cert);
+
+        /** loads a certificate from a string and adds it to the pool of trusted certificates.
+        *  @param cert The certificate
+        *  @return TCS_ok if successful, an error code otherwise
+        */
+        DcmTransportLayerStatus addSystemTrustedCertificates();
+
+
+        /** loads a set of Diffie-Hellman parameters from a string.
+        *  These parameters are required for DH, DHE or DSS ciphersuites.
+        *  @param params DH parameter
+        *  @return OFTrue if successful, OFFalse otherwise.
+        */
+        OFBool setTempDHParametersFromString(const std::string& params);
+
+private:
+
+};
diff --git a/cadxcore/main/controllers/dcmtk/tls/tls.h b/cadxcore/main/controllers/dcmtk/tls/tls.h
new file mode 100644
index 0000000..0ba4f12
--- /dev/null
+++ b/cadxcore/main/controllers/dcmtk/tls/tls.h
@@ -0,0 +1,26 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#if !defined(WITH_OPENSSL)
+#define WITH_OPENSSL
+#endif
diff --git a/cadxcore/main/controllers/dicommanager.cpp b/cadxcore/main/controllers/dicommanager.cpp
new file mode 100644
index 0000000..21fe493
--- /dev/null
+++ b/cadxcore/main/controllers/dicommanager.cpp
@@ -0,0 +1,1299 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+#include <dcmtk/config/osconfig.h>
+#include <dcmtk/dcmdata/dctk.h>
+#include "dcmtk/dcmimgle/dcmimage.h"
+#include <dcmtk/dcmdata/dcrledrg.h>
+#include <dcmtk/dcmjpeg/djdecode.h>  /* for dcmjpeg decoders */
+#include <dcmtk/dcmdata/dcpxitem.h>
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+
+#include <sstream>
+#include <queue>
+#include <stack>
+#include <cstdio>
+#include <fstream>
+
+#include <wx/file.h>
+#include <wx/strconv.h>
+#include <wx/filename.h>
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include "dicommanager.h"
+#include <api/ientorno.h>
+#include <api/dicom/idicom.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/dcmtk/ginkgouid.h>
+
+#ifdef DCMTK_POST_20170228
+#include <api/dicom/dicom_legacy.h>
+#endif 
+
+
+
+//en este grupo se almacenaran los atributos privados de ginkgo
+#define GINKGO_GROUP 0x0011
+
+namespace GIL
+{
+namespace DICOM
+{
+
+// Constructor
+DICOMManager::DICOMManager()
+{
+        m_pDCMSourceFile = NULL;
+        m_pDCMSourceDataset = NULL;
+        m_pConv = NULL;
+}
+
+DICOMManager::DICOMManager(DcmDataset* dataset, const std::string& defaultCharset)
+{
+        m_pDCMSourceFile = NULL;
+        m_pDCMSourceDataset = dataset;
+        m_pConv = NULL;
+        FindCharset(defaultCharset);
+}
+
+// Destructor
+DICOMManager::~DICOMManager()
+{
+        if (m_pDCMSourceFile != NULL) {
+                delete m_pDCMSourceFile;
+                m_pDCMSourceFile = NULL;
+        }
+        if (m_pConv != NULL) {
+                delete m_pConv;
+                m_pConv = NULL;
+        }
+}
+
+DcmDataset* DICOMManager::getSourceDataSet()
+{
+        if (m_pDCMSourceFile != NULL) {
+                return m_pDCMSourceFile->getDataset();
+        } else {
+                return m_pDCMSourceDataset;
+        }
+}
+
+//region "Interfaz"
+
+/*Almacena la jerarquia cargada en un fichero*/
+bool DICOMManager::AlmacenarFichero(const std::string& inputFile, IInspectCallBack* , bool )
+{
+        if (m_pDCMSourceFile == NULL) {
+                return false;
+        }
+        FindCharset();
+        OFCondition cond;
+
+        std::string tempDir = GNC::GCS::IEntorno::Instance()->CreateGinkgoTempDir();
+        std::string tempFile;
+        {
+                std::ostringstream ostr;
+                ostr << tempDir;
+                char c;
+                if (wxFileName::GetPathSeparator().GetAsChar(&c)) {
+                        ostr << c;
+                }
+                ostr << "1.dcm";
+                tempFile = ostr.str();
+        }
+
+        cond = m_pDCMSourceFile->saveFile(tempFile.c_str());
+        if (cond.bad()) {
+                std::cerr << "Error: " << cond.text() << std::endl;
+                wxRemoveFile(FROMPATH(tempFile));
+                return false;
+        } else {
+                wxRenameFile(FROMPATH(tempFile), FROMPATH(inputFile), true);
+                m_pDCMSourceFile->loadFile(inputFile.c_str(), EXS_Unknown, EGL_noChange, DCM_TagInfoLength);
+        }
+        return true;
+}
+
+/*Actualiza la jerarquia cargada*/
+int DICOMManager::ActualizarJerarquia(DicomDataset& base)
+{
+        if (getSourceDataSet() == NULL) {
+                return 0;
+        }
+
+        return InsertarJerarquia(base, NULL, NULL);
+}
+
+/*anonimiza los tags privados*/
+void DICOMManager::AnonimizarTagsPrivados()
+{
+        OFCondition cond;
+        DcmElement* element;
+        unsigned int g=GINKGO_GROUP;
+        unsigned int e=0x0010;
+
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return;
+        }
+
+        for(; e<=0xFFFF; e++) {
+                DcmTagKey key(g,e);
+                cond = ds->findAndGetElement(key,element,false);
+                if(element!=NULL) {
+                        ds->remove(key);
+                }
+        }
+}
+
+/*actualiza los tags privados*/
+int DICOMManager::ActualizarTagsPrivados(TipoPrivateTags& tags)
+{
+        if (getSourceDataSet() == NULL) {
+                return 0;
+        }
+
+        return InsertarTagsPrivados(tags);
+}
+
+int DICOMManager::CargarTagsPrivados(GIL::DICOM::TipoPrivateTags& tags)
+{
+        if (getSourceDataSet() == NULL) {
+                return 0;
+        }
+
+        return PrivateCargarTagsPrivados(tags);
+}
+
+/*carga la MetaInfo*/
+int DICOMManager::CargarMetaInfo(const std::string& inputFile, GIL::DICOM::TipoMetaInfo& tags)
+{
+
+        //comprobamos que es dicom(numero magico, si no el load file a veces casca estrepitosamente)
+        if(!EsDicom(inputFile)) {
+                return 0;
+        }
+
+        OFCondition cond;
+        DcmMetaInfo metaInfo;
+
+        cond = metaInfo.loadFile(inputFile.c_str(), EXS_Unknown, EGL_noChange);
+        //metaInfo.loadAllDataIntoMemory();
+        //metaInfo.print(std::cout);
+
+        int numInsertados = 0;
+
+        unsigned long elemCount = metaInfo.card();
+
+        for (unsigned long i = 0; i < elemCount; i++) {
+                DcmElement *e = metaInfo.getElement(i);
+                GTRACE("Procesando objeto MetaInfo: " << e->getTag().toString())
+                std::ostringstream os;
+                os << std::hex << std::setw(4) << std::setfill('0') << e->getGTag() << "|" << std::hex << std::setw(4) << std::setfill('0') << e->getETag();
+                std::string tag = os.str();
+
+                OFString v;
+                std::string ov;
+
+                cond = e->getOFStringArray(v, OFTrue);
+                if (cond.good()) {
+                        ov = v.c_str();
+                }
+
+                tags.tags[tag] = ov;
+
+                numInsertados++;
+        }
+
+
+        if (cond.bad()) {
+                // TODO: Lanzar excepción
+                return 0;
+        }
+
+        return numInsertados;
+}
+
+/* Obtiene la jerarquia de campos DICOM del fichero */
+bool DICOMManager::CargarFichero(const std::string& inputFile, GIL::DICOM::DicomDataset& jerarquia, bool cargarSoloTagsInfo, IInspectCallBack* /*pICallback*/)
+{
+        //comprobamos que es dicom(numero magico, si no el load file a veces casca estrepitosamente)
+        if(!EsDicom(inputFile)) {
+                return false;
+        }
+        //
+
+        if (m_pDCMSourceFile != NULL) {
+                delete m_pDCMSourceFile;
+                m_pDCMSourceFile = NULL;
+        }
+        if (m_pConv != NULL) {
+                delete m_pConv;
+                m_pConv = NULL;
+        }
+
+        m_pDCMSourceFile = new DcmFileFormat();
+        OFCondition cond;
+
+        if (true ||cargarSoloTagsInfo) { // FIXME Review
+                cond = m_pDCMSourceFile->loadFile(inputFile.c_str(), EXS_Unknown, EGL_noChange, DCM_TagInfoLength);
+        } else {
+                //cond = dcmff.loadFile(inputFile.c_str(), EXS_Unknown, EGL_noChange, DCM_MaxReadLength);
+        }
+        //dcmff.loadAllDataIntoMemory();
+
+        if (cond.bad()) {
+                // TODO: Lanzar excepción
+                return false;
+        }
+
+        FindCharset();
+
+        if(cargarSoloTagsInfo) {
+                CargarJerarquia(jerarquia, DCM_OptPrintLineLength);
+        } else {
+                CargarJerarquia(jerarquia, 0);
+        }
+        return true;
+}
+
+
+/******************/
+//esto es para cargar el fichero sin llevar todo a memoria, solo lo que nos interese con el gettag
+bool DICOMManager::CargarFichero(const std::string& inputFile, bool /*cargarSoloTagsInfo*/)
+{
+        //comprobamos que es dicom(numero magico, si no el load file a veces casca estrepitosamente)
+        if(!EsDicom(inputFile)) {
+                return false;
+        }
+        //
+
+        if (m_pDCMSourceFile != NULL) {
+                delete m_pDCMSourceFile;
+                m_pDCMSourceFile = NULL;
+        }
+        if (m_pConv != NULL) {
+                delete m_pConv;
+                m_pConv = NULL;
+        }
+
+        m_pDCMSourceFile = new DcmFileFormat();
+        OFCondition cond;
+
+        //if (true || cargarSoloTagsInfo) {
+        cond = m_pDCMSourceFile->loadFile(inputFile.c_str(), EXS_Unknown, EGL_noChange, DCM_TagInfoLength);
+        //}
+        //else {
+        //	cond = dcmff.loadFile(inputFile.c_str());
+
+        //}
+
+        if (cond.bad()) {
+                // TODO: Lanzar excepción
+                return false;
+        }
+
+        //cond = dcmff.loadAllDataIntoMemory();
+
+        if (cond.bad()) {
+                // TODO: Lanzar excepción
+                return false;
+        }
+
+        FindCharset();
+
+        return true;
+}
+
+bool DICOMManager::GetTag(unsigned int grupo,unsigned int elemento, std::string & valor)
+{
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return false;
+        }
+
+        FindCharset();
+
+        DcmTagKey key(grupo,elemento);
+        DcmElement* pElement;
+        ds->findAndGetElement(key,pElement);
+        if(pElement != NULL) {
+                if(pElement->containsUnknownVR()) {
+                        return false;
+                } else {
+                        OFString v;
+                        OFCondition cond = pElement->getOFStringArray(v, OFTrue);
+                        if (cond.good()) {
+                                valor = wxString(v.c_str(), *m_pConv).ToUTF8();
+                                return true;
+                        } else {
+                                return false;
+                        }
+                }
+        } else {
+                return false;
+        }
+}
+
+bool DICOMManager::GetTag(unsigned int grupo,unsigned int elemento, TagPrivadoUndefined& tagBinario)
+{
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return false;
+        }
+
+        if(grupo == 0x7fe0 && elemento == 0x0010) {
+                //es necesario para pillar el pixeldata en explicit little endian
+                OFCondition cond = ds->chooseRepresentation(EXS_DeflatedLittleEndianExplicit,NULL);
+                if(cond.bad()) {
+                        return false;
+                }
+        }
+
+        FindCharset();
+
+        DcmTagKey key(grupo,elemento);
+        DcmElement* pElement;
+        ds->findAndGetElement(key,pElement);
+        if(pElement != NULL) {
+                OFCondition cond = pElement->loadAllDataIntoMemory();
+                if(cond.good()) {
+                        Uint8 * ptr;
+                        cond = pElement->getUint8Array(ptr);
+                        if(cond.good()) {
+                                tagBinario.Copiar(ptr,pElement->getLength());
+                                return true;
+                        } else {
+                                return false;
+                        }
+                } else {
+                        return false;
+                }
+        } else {
+                return false;
+        }
+}
+
+bool DICOMManager::GetTag(unsigned int grupo,unsigned int elemento, float& valor)
+{
+        std::string valorstr;
+        if(GetTag(grupo,elemento,valorstr)) {
+                valor = 0.0f;
+                std::sscanf(valorstr.c_str(),"%f",&valor);
+                return true;
+        } else {
+                //se intenta interpretar como US
+                DcmDataset* ds = getSourceDataSet();
+                if (ds == NULL) {
+                        return false;
+                }
+                DcmTagKey key(grupo,elemento);
+                DcmElement* pElement;
+                ds->findAndGetElement(key,pElement);
+                if(pElement != NULL) {
+                        Uint8 * ptr;
+                        OFCondition cond = pElement->getUint8Array(ptr);
+                        if(cond.good()) {
+                                switch (pElement->getLength()) {
+                                case 4:
+                                        valor = *((Float32*)ptr);
+                                        return true;
+                                        break;
+                                case 8:
+                                        valor = *((Float64*)ptr);
+                                        return true;
+                                        break;
+                                default:
+                                        return false;
+                                }
+                        } else {
+                                return false;
+                        }
+                }
+                return false;
+        }
+}
+
+bool DICOMManager::GetTag(unsigned int grupo,unsigned int elemento, int& valor)
+{
+        std::string valorstr;
+        if(GetTag(grupo,elemento,valorstr)) {
+                valor = atoi(valorstr.c_str());
+                return true;
+        } else {
+                //se intenta interpretar como US
+                DcmDataset* ds = getSourceDataSet();
+                if (ds == NULL) {
+                        return false;
+                }
+                DcmTagKey key(grupo,elemento);
+                DcmElement* pElement;
+                ds->findAndGetElement(key,pElement);
+                if(pElement != NULL) {
+                        Uint8 * ptr;
+                        OFCondition cond = pElement->getUint8Array(ptr);
+                        if(cond.good()) {
+                                switch (pElement->getLength()) {
+                                case 2:
+                                        valor = *((Uint16*)ptr);
+                                        return true;
+                                        break;
+                                case 4:
+                                        valor = *((Uint32*)ptr);
+                                        return true;
+                                        break;
+                                default:
+                                        return false;
+                                }
+                        } else {
+                                return false;
+                        }
+                }
+                return false;
+        }
+}
+
+bool DICOMManager::ExtractTagToFile(unsigned int grupo, unsigned int element, const std::string& outputFile, GNC::IProxyNotificadorProgreso* pNotificador)
+{
+        DcmTagKey key(grupo,element);
+        DcmElement* pElement;
+        DcmDataset* pDset = getSourceDataSet();
+        if (pDset == NULL) {
+                return false;
+        }
+        pDset->findAndGetElement(key,pElement);
+        if(pElement != NULL) {
+                DcmPixelData* pPixelData = dynamic_cast<DcmPixelData*>(pElement);
+                if (pPixelData != NULL) {
+                        //	OFCondition cond = pElement->loadAllDataIntoMemory();
+                        DcmPixelSequence* pPixelSeq = NULL;
+                        OFCondition cond = pPixelData->getEncapsulatedRepresentation(pDset->getOriginalXfer(), NULL, pPixelSeq);
+                        if(cond.good()) {
+                                for (unsigned long i = 0; i < pPixelSeq->card(); ++i) {
+                                        DcmPixelItem *pixelItem  = NULL;;
+                                        cond  = pPixelSeq->getItem(pixelItem, i);
+                                        if (cond.good()) {
+                                                if (pixelItem->getLength(pDset->getOriginalXfer())> 0) {
+                                                        char readingBuffer[8*1024];
+                                                        int length = pixelItem->getLengthField();
+                                                        int numBytes, offset = 0;
+                                                        DcmFileCache cache;
+                                                        std::ofstream outfile (outputFile.c_str(), std::ofstream::binary);
+                                                        int numIterations = 0;
+                                                        do {
+                                                                if (pNotificador != NULL && numIterations%100 == 0) {
+                                                                        if (!pNotificador->NotificarProgreso((float)offset/length, _Std("Extracting file..."))) {
+                                                                                outfile.close();
+                                                                                wxRemoveFile(FROMPATH(outputFile));
+                                                                                return false;
+                                                                        }
+                                                                }
+                                                                numBytes = ((offset + (int)sizeof(readingBuffer)) > length)? length - offset: (int)sizeof(readingBuffer);
+                                                                pixelItem->getPartialValue(readingBuffer, offset, numBytes, &cache);
+                                                                outfile.write(readingBuffer, numBytes);
+                                                                offset += numBytes;
+                                                                numIterations ++;
+                                                        } while (offset < length);
+                                                        outfile.close();
+                                                        return true;
+                                                }
+                                        }
+                                }
+                        }
+                } else {
+                        char readingBuffer[8*1024];
+                        int length = pElement->getLengthField();
+                        int numBytes, offset = 0;
+                        DcmFileCache cache;
+                        std::ofstream outfile (outputFile.c_str(), std::ios_base::binary);
+                        int numIterations = 0;
+                        do {
+                                if (pNotificador != NULL && numIterations%100 == 0) {
+                                        if (!pNotificador->NotificarProgreso((float)offset/length, _Std("Extracting file..."))) {
+                                                outfile.close();
+                                                wxRemoveFile(FROMPATH(outputFile));
+                                                return false;
+                                        }
+                                }
+                                numBytes = ((offset + (int)sizeof(readingBuffer)) > length)? length - offset: (int)sizeof(readingBuffer);
+                                pElement->getPartialValue(readingBuffer, offset, numBytes, &cache);
+                                outfile.write(readingBuffer, numBytes);
+                                offset += numBytes;
+                                numIterations ++;
+                        } while (offset < length);
+                        outfile.close();
+                        return true;
+                }
+        }
+        LOG_ERROR("Dicommanager", "error extracting tag");
+        return false;
+}
+
+bool DICOMManager::GetTag(unsigned int grupo,unsigned int elemento, GIL::DICOM::DicomDataset& secuencia)
+{
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return false;
+        }
+
+        DcmTagKey key(grupo,elemento);
+        DcmElement* pSequence;
+        ds->findAndGetElement(key,pSequence);
+        if(pSequence != NULL) {
+                CargarJerarquia(secuencia,DCM_OptPrintLineLength,pSequence);
+                return true;
+        } else {
+                return false;
+        }
+}
+
+bool DICOMManager::FindTag(unsigned int grupo,unsigned int elemento, TagPrivadoUndefined& tagBinario)
+{
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return false;
+        }
+
+        if( (grupo == 0x7fe0 && elemento == 0x0010) || (grupo == 0x5400 && elemento == 0x1010) ) {
+                //es necesario para pillar el pixeldata en explicit little endian
+                OFCondition cond = ds->chooseRepresentation(EXS_DeflatedLittleEndianExplicit,NULL);
+                if(cond.bad()) {
+                        return false;
+                }
+        }
+
+        DcmTagKey key(grupo,elemento);
+        DcmElement* pElement;
+        ds->findAndGetElement(key, pElement, OFTrue);
+        if(pElement != NULL) {
+                OFCondition cond = pElement->loadAllDataIntoMemory();
+                if(cond.good()) {
+                        Uint8 * ptr;
+                        cond = pElement->getUint8Array(ptr);
+                        if(cond.good()) {
+                                tagBinario.Copiar(ptr,pElement->getLength());
+                                return true;
+                        } else {
+                                Uint16 * ptr2;
+                                cond = pElement->getUint16Array(ptr2);
+                                if(cond.good()) {
+                                        tagBinario.Copiar(ptr2, pElement->getLength());
+                                        return true;
+                                } else {
+                                        return false;
+                                }
+                        }
+                } else {
+                        return false;
+                }
+        } else {
+                return false;
+        }
+}
+
+bool DICOMManager::FindTag(unsigned int grupo, unsigned int elemento, std::vector<TagPrivadoUndefined>& binaryTags)
+{
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return false;
+        }
+
+        if( (grupo == 0x7fe0 && elemento == 0x0010) || (grupo == 0x5400 && elemento == 0x1010) ) {
+                //es necesario para pillar el pixeldata en explicit little endian
+                OFCondition cond = ds->chooseRepresentation(EXS_DeflatedLittleEndianExplicit,NULL);
+                if(cond.bad()) {
+                        return false;
+                }
+        }
+
+        DcmTagKey key(grupo,elemento);
+        DcmStack elementStack;
+        ds->findAndGetElements(key, elementStack);
+        while (!elementStack.empty()) {
+                DcmElement *pElement  = dynamic_cast<DcmElement *>(elementStack.top());
+                if (!pElement)
+                        return false;
+
+                elementStack.pop();
+                auto cond = pElement->loadAllDataIntoMemory();
+
+                if(cond.good()) {
+                        Uint8 * ptr;
+                        cond = pElement->getUint8Array(ptr);
+                        TagPrivadoUndefined  tagBinario;
+                        if(cond.good()) {
+                                tagBinario.Copiar(ptr,pElement->getLength());
+                                LOG_INFO("Dicommanager", "Read " << pElement->getLength() << " waveform sample bytes");
+                        } else {
+                                Uint16 * ptr2;
+                                cond = pElement->getUint16Array(ptr2);
+                                if(cond.good()) {
+                                        tagBinario.Copiar(ptr2, pElement->getLength());
+                                        LOG_INFO("Dicommanager", "Read " << pElement->getLength() << " waveform sample bytes");
+                                } else {
+                                        return false;
+                                }
+                        }
+                        binaryTags.insert(binaryTags.begin(), tagBinario);
+                } else {
+                        return false;
+                }
+        }
+        return !binaryTags.empty();
+}
+
+/* returns the oid name or empty string if not found */
+std::string DICOMManager::GetOIDName(const std::string &oid)
+{
+        const char* name = dcmFindNameOfUID(oid.c_str());
+        if (name != NULL) {
+                return std::string(name);
+        } else {
+                return std::string("");
+        }
+
+
+}
+
+/* devuelve la descripcion de este tag*/
+std::string DICOMManager::GetDescription(const std::string &clave) const
+{
+        unsigned int g = 0xffff;
+        unsigned int e = 0xffff;
+        int n;
+
+        n = sscanf(clave.c_str(), "%x|%x", &g, &e);
+        if (n  == 2) { // if at least no tag could be parsed
+                DcmTagKey key(g,e);
+                const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock();
+                const DcmDictEntry *dicent = globalDataDict.findEntry(key,NULL);
+                dcmDataDict.unlock();
+                if (dicent != NULL) {
+                        return std::string(dicent->getTagName());
+                }
+        }
+        return std::string("");
+
+};
+
+std::string DICOMManager::GetNewUID()
+{
+        return GIL::DICOM::MakeUID(GIL::DICOM::GUID_StudyRoot);
+}
+
+bool DICOMManager::EsDicom(const std::string& inputFile)
+{
+        //comprobamos que es dicom(numero magico, si no el load file a veces casca estrepitosamente)
+        wxFile fichero(FROMPATH(inputFile),wxFile::read);
+        bool esDicom = false;
+        if(fichero.IsOpened()) {
+                char buffer[128];
+                if(fichero.Read(buffer,128) == 128) {
+                        char numeroMagico[4];
+                        if(fichero.Read(numeroMagico,4) == 4) {
+                                std::string str(numeroMagico,4);
+                                if(str == "DICM") {
+                                        esDicom = true;
+                                }
+                        }
+                }
+        }
+        return esDicom;
+}
+
+//endregion
+
+DcmElement* DICOMManager::CrearElementoConValor(const char* s)
+{
+        unsigned int g = 0xffff;
+        unsigned int e = 0xffff;
+        int n = 0;
+        char* val = new char[strlen(s)+1];
+        OFString dicName, valStr;
+        OFString msg;
+
+        val[0] = '\0';
+
+        // try to parse group and element number
+        n = sscanf(s, "%x|%x=%s", &g, &e, val);
+        OFString toParse = s;
+        size_t eqPos = toParse.find('=');
+        if (n < 2) { // if at least no tag could be parsed
+                // if value is given, extract it (and extrect dictname)
+                if (eqPos != OFString_npos) {
+                        dicName = toParse.substr(0, eqPos).c_str();
+                        valStr = toParse.substr(eqPos + 1, toParse.length());
+                } else // no value given, just dictionary name
+                        dicName = s; // only dictionary name given (without value)
+                // try to lookup in dictionary
+                DcmTagKey key(0xffff, 0xffff);
+                const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock();
+                const DcmDictEntry *dicent = globalDataDict.findEntry(dicName.c_str());
+                dcmDataDict.unlock();
+                if (dicent != NULL) {
+                        // found dictionary name, copy group and element number
+                        key = dicent->getKey();
+                        g = key.getGroup();
+                        e = key.getElement();
+                } else {
+                        // not found in dictionary
+                        std::cerr <<  "bad key format or dictionary name not found in dictionary: " << dicName << std::endl;
+                        delete[] val;
+                        return NULL;
+                }
+        }// tag could be parsed, copy value if it exists
+        else {
+                if (eqPos != OFString_npos) {
+                        valStr = toParse.substr(eqPos + 1, toParse.length());
+                }
+        }
+        DcmTag tag(g, e);
+        if (tag.error() != EC_Normal) {
+                std::cerr << "Tag desconocido: (" <<
+                          std::hex << std::setw(4) << std::setfill('0') << g << "|" <<
+                          std::hex << std::setw(4) << std::setfill('0') << e << ")" << std::endl;
+                delete[] val;
+                return NULL;
+        }
+        DcmElement *elem = newDicomElement(tag);
+        if (elem == NULL) {
+                std::cerr << "No se pudo crear el elemento para el tag: (" <<
+                          std::hex << std::setw(4) << std::setfill('0') << g << "|" <<
+                          std::hex << std::setw(4) << std::setfill('0') << e << ")" << std::endl;
+                delete[] val;
+                return NULL;
+        }
+        if (valStr.length() > 0) {
+                if (elem->putString(valStr.c_str()).bad()) {
+                        std::cerr << "No se pudo asignar el valor al elemento: (" <<
+                                  std::hex << std::setw(4) << std::setfill('0') << g << "|" <<
+                                  std::hex << std::setw(4) << std::setfill('0') << e << ")=" << valStr.c_str() << std::endl;
+                        delete elem;
+                        delete[] val;
+                        return NULL;
+                }
+        }
+        delete[] val;
+        return elem;
+
+}
+
+int DICOMManager::InsertarJerarquia(const DicomDataset& base, DcmItem* itemPadre, DcmSequenceOfItems* seqPadre)
+{
+
+        int numTotalInsertados = 0;
+        int numTagsInsertados  = 0;
+        int numItemsInsertados = 0;
+        int numSeqsInsertadas  = 0;
+
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return 0;
+        }
+
+        // Insertamos todos los tags correspondientes a este nivel en la raiz (de haberla, si no: en el dataset).
+        for (ListaTags::const_iterator it = base.tags.begin(); it != base.tags.end(); ++it) {
+                DcmElement* e = this->CrearElementoConValor((*it).first.c_str());
+
+                if (e != NULL) {
+                        e->putString( wxString( (*it).second.c_str(), wxConvUTF8).mb_str(*m_pConv) );
+                        OFCondition cond;
+                        if (itemPadre == NULL) {
+                                cond = ds->insert(e, true, false);
+                        } else {
+                                cond = itemPadre->insert(e, true, false);
+                        }
+                        if (cond.bad()) {
+                                LOG_ERROR("DICOMMANAGER", "No se pudo insertar el elemento: (" << e->getTag().toString().c_str() << "): " << cond.text());
+                        } else {
+                                numTotalInsertados++;
+                                numTagsInsertados++;
+                        }
+                }
+        }
+
+        // Insertamos todos los items correspondientes a este nivel en la raiz (de haberla, si no: en el dataset).
+
+        for (DicomDataset::DatasetList::const_iterator it = base.items.begin(); it != base.items.end(); ++it) {
+                DcmItem *item = new DcmItem();
+
+                int nItems = InsertarJerarquia((*it), item, NULL);
+
+                if (nItems > 0) {
+
+                        OFCondition cond;
+
+                        if (seqPadre == NULL) {
+                                std::cerr << "No se pudo insertar el item directamente a la raiz. "
+                                          << "Deben insertarse en secuencias o en otros items.  "
+                                          << nItems << " elementos perdidos: " << cond.text() << std::endl;
+                                std::cerr << "tag << " << (*it) <<std::endl;
+                                delete item;
+                        } else {
+                                cond = seqPadre->insert(item, true, false);
+                                GTRACE(seqPadre->getTag().toString().c_str() << " << " << item->getTag().toString());
+
+                                if (cond.bad()) {
+                                        std::cerr << "No se pudo insertar el item a la raiz.  "
+                                                  << nItems << " elementos perdidos: " << cond.text() << std::endl;
+                                        delete item;
+                                } else {
+                                        numTotalInsertados += nItems + 1;
+                                        numItemsInsertados++;
+                                }
+                        }
+                } else {
+                        delete item;
+                }
+        }
+
+        // Insertamos todas las secuencias correspondientes a este nivel en la raiz (de haberla, si no: en el dataset).
+        for (DicomDataset::DatasetList::const_iterator it = base.secuencias.begin(); it != base.secuencias.end(); ++it) {
+
+                std::string claveSecuencia = (*it).tagName;
+                const DicomDataset& nbase = (*it);
+
+                unsigned int sg = 0xffff;
+                unsigned int se = 0xffff;
+                int sn = 0;
+
+                sn = sscanf(claveSecuencia.c_str(), "%x|%x", &sg, &se);
+                if (sn < 2) {
+                        std::cerr << "Formato invalido (" << claveSecuencia.c_str() << "). Solo se soporta (FFFF|FFFF) como formato de tag para secuencias" << std::endl;
+                        continue;
+                }
+                DcmTag stag(sg, se);
+                if (stag.error() != EC_Normal) {
+                        std::cerr << "Tag desconocido: " << claveSecuencia << std::endl;
+                        continue;
+                }
+                DcmSequenceOfItems* seq = new DcmSequenceOfItems(stag);
+                if (seq == NULL) {
+                        std::cerr << "No se pudo crear la secuencia para el tag: " << claveSecuencia << std::endl;
+                        continue;
+                }
+
+                int nItems = InsertarJerarquia(nbase, NULL, seq);
+
+                if (nItems > 0) {
+
+                        OFCondition cond;
+
+                        if (seqPadre != NULL) {
+                                DcmItem* item = new DcmItem();
+                                cond = item->insert(seq);
+                                seqPadre->insert(item);
+                                GTRACE(seqPadre->getTag().toString().c_str() << " << " << seq->getTag().toString());
+                        } else if (itemPadre != NULL) {
+                                cond = itemPadre->insert(seq, OFTrue);
+                                GTRACE(itemPadre->getTag().toString().c_str() << " << " << seq->getTag().toString());
+
+                        } else {
+                                cond = ds->insert(seq, OFTrue);
+                                GTRACE("raiz << " << seq->getTag().toString());
+                        }
+
+                        if (cond.bad()) {
+                                std::cerr << "No se pudo insertar el item a la raiz.  " << nItems << " elementos perdidos: " << cond.text() << std::endl;
+                                delete seq;
+                        } else {
+                                numTotalInsertados += nItems + 1;
+                                numSeqsInsertadas++;
+                        }
+                } else {
+                        delete seq;
+                }
+        }
+        return numTotalInsertados;
+}
+
+//----------------------CARGAR JERARQUIA-------------------------------------------------------
+int DICOMManager::CargarJerarquia(DicomDataset& base, unsigned int maximaLongitud, DcmElement * pElementoInicial)
+{
+        int numInsertados = 0;
+
+        std::queue<DcmElement*>                pilaElementos;
+        std::queue<GIL::DICOM::DicomDataset*> pilaPadres;
+
+        OFCondition cond;
+
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return 0;
+        }
+
+        FindCharset();
+
+        unsigned long elemCount = ds->card();
+
+        //si es nulo, queremos cargar toda la jerarquia
+        if(pElementoInicial == NULL) {
+                for (unsigned long i = 0; i < elemCount; i++) {
+                        DcmElement *e = ds->getElement(i);
+                        if (e->getGTag() == 0x7fe0 && e->getETag() == 0x0010) {
+                                // Excluir pixel data
+                        } else {
+                                pilaElementos.push(e);
+                                pilaPadres.push(&base);
+                        }
+                }
+        } else {
+                pilaElementos.push(pElementoInicial);
+                pilaPadres.push(&base);
+        }
+
+        while(!pilaElementos.empty()) {
+                DcmElement* e = pilaElementos.front();
+                pilaElementos.pop();
+                GIL::DICOM::DicomDataset* cbase = pilaPadres.front();
+                pilaPadres.pop();
+
+                if (e->ident() == EVR_item) {
+                        LOG_TRACE("DICOMManager::CargarJerarquia", "Processing item: " << e->getTag().toString());
+                        GIL::DICOM::DicomDataset newbase;
+
+                        cbase->items.push_front(newbase);
+
+                        numInsertados++;
+
+                        DcmObject* e2 = NULL;
+                        while ( (e2 = e->nextInContainer(e2)) != NULL) {
+                                pilaElementos.push( static_cast<DcmElement*>(e2) );
+                                pilaPadres.push( &(cbase->items.front()) );
+                        }
+
+                } else if (e->ident() == EVR_SQ) {
+                        LOG_TRACE("DICOMManager::CargarJerarquia", "Processing sequence: " << e->getTag().toString());
+
+                        std::ostringstream os;
+                        os << std::hex << std::setw(4) << std::setfill('0') << e->getGTag() << "|" << std::hex << std::setw(4) << std::setfill('0') << e->getETag();
+                        std::string tag = os.str();
+
+                        GIL::DICOM::DicomDataset newbase;
+                        newbase.tagName = tag;
+
+                        cbase->secuencias.push_front(newbase);
+
+                        numInsertados++;
+
+                        DcmObject* e2 = NULL;
+                        while ( (e2 = e->nextInContainer(e2)) != NULL) {
+                                pilaElementos.push( static_cast<DcmElement*>(e2) );
+                                pilaPadres.push( &(cbase->secuencias.front()) );
+                        }
+                } else {
+                        LOG_TRACE("DICOMManager::CargarJerarquia","Procesando objeto: " << e->getTag().toString());
+                        std::ostringstream os;
+                        os << std::hex << std::setw(4) << std::setfill('0') << e->getGTag() << "|" << std::hex << std::setw(4) << std::setfill('0') << e->getETag();
+                        std::string tag = os.str();
+
+                        //solo carga los tags no privados
+                        if(e->getGTag() != GINKGO_GROUP && ( maximaLongitud == 0 || e->getLength() < maximaLongitud ) ) {
+                                if (e->getGTag() == GINKGO_GROUP) {
+                                        std::cout << "long=" << e->getLength() << std::endl;
+                                }
+                                OFString v;
+                                std::string ov;
+
+                                cond = e->getOFStringArray(v, OFTrue);
+                                if (cond.good()) {
+                                        ov = wxString(v.c_str(), *m_pConv).ToUTF8();
+                                }
+                                if (ov.size() == 0 && v.size() != ov.size()) {
+                                        //workarround try iso...
+                                        wxCSConv tryIso(wxFONTENCODING_ISO8859_1);
+                                        ov = wxString(v.c_str(), tryIso).ToUTF8();
+                                        //last chance... try ascii
+                                        if (ov.size() == 0 && v.size() != ov.size()) {
+                                                ov = wxString::FromAscii(v.c_str()).ToUTF8();
+                                        }
+                                }
+
+                                cbase->tags[tag] = ov;
+
+                                numInsertados++;
+                        } else {
+
+                        }
+                }
+        }
+        return numInsertados;
+}
+
+//----------------------INSERTAR TAGS PRIVADOS-------------------------------------------------------
+int DICOMManager::InsertarTagsPrivados(TipoPrivateTags& tags)
+{
+        //se busca el uid en el rango (GINKGO_GROUP,0010-00FF)
+        unsigned int g=GINKGO_GROUP;
+        unsigned int e=0;
+        OFCondition cond;
+        DcmElement* element;
+
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return 0;
+        }
+
+        e=GetElementIdentifier(tags);
+
+        if(e>0x00FF || e==0) {
+                //no deberia llegar aqui
+                std::cerr<<"error al almacenar los tags privados, todos los slots ocupados" <<std::endl;
+                return 0;
+        }
+
+        //ya tenemos el e del modulo hay que hacer un desplazamiento de 8 bits a la izquierda para obtener el rango
+        //si el elemento es 00xx el rango sera xx00-xxFF
+        e = e << 8;
+
+        unsigned int eTemp;
+        TipoPrivateTags::ListaTags& ListaTags = tags.GetListaTags();
+        for (TipoPrivateTags::ListaTags::iterator it = ListaTags.begin(); it != ListaTags.end(); ++it) {
+                eTemp = e | (*it).first;
+                element = (*it).second->ToElement(g,eTemp);
+                if (element != NULL) {
+                        cond = ds->insert(element, true, false);
+                        if (cond.bad()) {
+                                std::cerr << "error al almacenar los tags privados, error al escribir en el dataset: (" << g << ","<<eTemp<<")" <<std::endl;
+                                return 0;
+                        }
+                } else {
+                        std::cerr << "error al almacenar los tags privados, error al crear el elemento: (" << g << ","<<eTemp<<")" <<std::endl;
+                        return 0;
+                }
+        }
+
+        return 1;
+}
+
+//----------------------CARGAR TAGS PRIVADOS-------------------------------------------------------
+int DICOMManager::PrivateCargarTagsPrivados(GIL::DICOM::TipoPrivateTags& tags)
+{
+        //se busca el uid en el rango (GINKGO_GROUP,0010-00FF)
+        unsigned int g=GINKGO_GROUP;
+        unsigned int e=0;
+        OFCondition cond;
+        DcmElement* element;
+
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return 0;
+        }
+
+        e=GetElementIdentifier(tags);
+
+        if(e>0x00FF || e==0) {
+                //no deberia llegar aqui
+                std::cerr<<"error al almacenar los tags privados, todos los slots ocupados" <<std::endl;
+                return 0;
+        }
+
+        //ya tenemos el e del modulo hay que hacer un desplazamiento de 8 bits a la izquierda para obtener el rango
+        //si el elemento es 00xx el rango sera xx00-xxFF
+        e = e << 8;
+
+        unsigned int numElementos=0;
+        DcmVR vr(EVR_UN);
+        DcmTagKey key(g,e);
+        unsigned int eTemp;
+
+        //se pillan todos los atributos del slot
+        for(unsigned char eTag=0x0; eTag<0xFF; ++eTag) {
+                eTemp = e | eTag;
+
+                key.setElement(eTemp);
+                DcmTag tag(key,vr);
+
+                if (tag.error() != EC_Normal) {
+                        std::cerr << "error al almacenar los tags privados, tag desconocido: (" << g << ","<<eTemp<<")" <<std::endl;
+                        return 0;
+                }
+
+                cond = ds->findAndGetElement(key,element,false);
+
+                if (element!=NULL && cond.good()) {
+                        if (element->getVR() == EVR_LT) {
+                                char* copiaString = NULL;
+                                if (!element->isEmpty() && element->getString(copiaString).good()) {
+                                        tags.SetTag(eTag, copiaString);
+                                }
+                                numElementos++;
+                        } else if (element->getVR() == EVR_UN) {
+                                //se lee el elemento
+                                int size = element->getLength();
+                                if (size>0) {
+                                        TagPrivadoUndefined* pTag = tags.NewTagUndefined(eTag, size);
+
+                                        Uint8 * ptr;
+                                        cond = element->getUint8Array(ptr);
+
+                                        memcpy(pTag->GetValor(),ptr,size*sizeof(Uint8));
+
+                                        if (cond.bad()) {
+                                                std::cerr << "error al cargar los tags privados, error al cargar el tag: (" << g << ","<<eTemp<<")" <<std::endl;
+                                                return 0;
+                                        }
+                                        numElementos++;
+                                }
+                        }
+                }
+        }
+
+        return numElementos;
+}
+
+//devuelve el element identifier donde el modulo puede escribir sus tags privados
+unsigned int DICOMManager::GetElementIdentifier(GIL::DICOM::TipoPrivateTags& tags)
+{
+        OFCondition cond;
+        DcmElement* element;
+        unsigned int g=GINKGO_GROUP;
+        unsigned int e=0x0010;
+
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return 0;
+        }
+
+        for(; e<=0x00FF; e++) {
+                DcmTagKey key(g,e);
+                cond = ds->findAndGetElement(key,element,false);
+                if(element==NULL) {
+                        //esta libre el slot
+                        //se introduce el uid
+                        DcmTagKey key(g,e);
+                        DcmTag tag(key);
+                        //tipo short string!!!!
+                        DcmVR vr(EVR_SH);
+                        tag.setVR(vr);
+                        if (tag.error() != EC_Normal) {
+                                std::cerr << "error al almacenar los tags privados, tag desconocido: (" << g << ","<<e<<")" <<std::endl;
+                                return 0;
+                        }
+
+                        element = newDicomElement(tag);
+
+                        if(element==NULL) {
+                                std::cerr << "error al almacenar los tags privados, error al crear el elemento uid: (" << g << ","<<e<<")" <<std::endl;
+                                return 0;
+                        }
+
+                        cond=element->putString(tags.UIDModulo.c_str());
+
+                        if (cond.bad()) {
+                                std::cerr << "error al almacenar los tags privados, error al escribir el uid: (" << g << ","<<e<<")" <<std::endl;
+                                return 0;
+                        }
+
+                        cond = ds->insert(element, true, false);
+                        break;
+                }
+
+                if(element!=NULL) {
+                        char* cadena;
+                        std::string ov;
+
+                        cond = element->getString(cadena);
+                        if (cond.good() && cadena!=NULL) {
+                                ov = std::string(cadena);
+                        } else {
+                                continue;
+                        }
+
+                        if(ov==tags.UIDModulo) {
+                                //estamos en el g y e del modulo deseado
+                                break;
+                        }
+                }
+        }
+
+        return e;
+}
+
+//endregion
+
+void DICOMManager::FindCharset(const std::string& defaultCharset)
+{
+        DcmDataset* ds = getSourceDataSet();
+        if (ds == NULL) {
+                return;
+        }
+
+        if (m_pConv != NULL) {
+                delete m_pConv;
+                m_pConv = NULL;
+        }
+
+        OFString OFCharSet;
+
+        std::string Charset;
+
+        if (ds->findAndGetOFString(DCM_SpecificCharacterSet, OFCharSet).good()) {
+                Charset.assign(OFCharSet.c_str());
+        } else {
+                Charset = defaultCharset.c_str();
+                ds->putAndInsertOFStringArray(DCM_SpecificCharacterSet, Charset.c_str());
+        }
+
+        if (Charset == "ISO_IR 192" || Charset == "ISO_IR 6") {
+                m_pConv = new wxCSConv(wxFONTENCODING_UTF8);
+        } else if (Charset == "ISO 2022 IR 6") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_1);
+        } else if (Charset == "ISO_IR 100") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_1);
+        } else if (Charset == "ISO_IR 101") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_2);
+        } else if (Charset == "ISO_IR 109") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_3);
+        } else if (Charset == "ISO_IR 110") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_4);
+        } else if (Charset == "ISO_IR 148") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_9);
+        } else if (Charset == "ISO_IR 144") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_5);
+        } else if (Charset == "ISO_IR 127") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_6);
+        } else if (Charset == "ISO_IR 126") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_7);
+        } else if (Charset == "ISO_IR 138") {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_8);
+        } else {
+                m_pConv = new wxCSConv(wxFONTENCODING_ISO8859_1);
+        }
+
+}
+
+
+void DICOMManager::CreateTempFile()
+{
+}
+
+void DICOMManager::CleanupTempFile()
+{
+}
+}
+}
diff --git a/cadxcore/main/controllers/dicommanager.h b/cadxcore/main/controllers/dicommanager.h
new file mode 100644
index 0000000..444944e
--- /dev/null
+++ b/cadxcore/main/controllers/dicommanager.h
@@ -0,0 +1,138 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <vector>
+#include <api/globals.h>
+#include <api/api.h>
+#include <api/dicom/idicommanager.h>
+#include <api/iproxynotificadorprogreso.h>
+
+class DcmMetaInfo;
+class DcmDataset;
+class DcmFileFormat;
+class DcmElement;
+class OFCondition;
+class DcmItem;
+class DcmSequenceOfItems;
+
+class wxCSConv;
+
+namespace GIL
+{
+namespace DICOM
+{
+
+class EXTAPI DICOMManager : public IDICOMManager
+{
+public:
+
+        DICOMManager();
+        DICOMManager(DcmDataset* dataset, const std::string& defaultCharset);
+
+        ~DICOMManager();
+
+//region "Interfaz"
+        /*Almacena la jerarquia cargada en un fichero*/
+        virtual bool AlmacenarFichero(const std::string& inputFile, IInspectCallBack* pICallback = NULL, bool debug = false);
+
+        /*Actualiza la jerarquia cargada*/
+        virtual int ActualizarJerarquia(DicomDataset& base);
+
+        /*actualiza los tags privados*/
+        virtual int ActualizarTagsPrivados(TipoPrivateTags& tags);
+
+        /*anonimiza los tags privados*/
+        virtual void AnonimizarTagsPrivados();
+
+        /*carga la MetaInfo*/
+        virtual int CargarMetaInfo(const std::string& inputFile, GIL::DICOM::TipoMetaInfo& tags);
+
+        /*carga los tags privados*/
+        virtual int CargarTagsPrivados(GIL::DICOM::TipoPrivateTags& tags);
+
+        /* Obtiene la jerarquia de campos DICOM del fichero */
+        virtual bool CargarFichero(const std::string& inputFile, GIL::DICOM::DicomDataset& jerarquia, bool cargarSoloTagsInfo = true, IInspectCallBack* pICallback = NULL);
+
+        /*Carga el fichero y responde a primitivas get tag, util para pillar tags especificos sin cargar toda la jerarquia*/
+        virtual bool CargarFichero(const std::string&  inputFile, bool cargarSoloTagsInfo = true);
+        virtual bool GetTag(unsigned int grupo,unsigned int elemento, std::string & valor);
+        virtual bool GetTag(unsigned int grupo,unsigned int elemento, TagPrivadoUndefined& tagBinario);
+        virtual bool GetTag(unsigned int grupo,unsigned int elemento, float& valor);
+        virtual bool GetTag(unsigned int grupo,unsigned int elemento, int& valor);
+        virtual bool GetTag(unsigned int grupo,unsigned int elemento, GIL::DICOM::DicomDataset& secuencia);
+        virtual bool ExtractTagToFile(unsigned int group, unsigned int element, const std::string& outputFile, GNC::IProxyNotificadorProgreso* pNotificador = NULL);
+
+        virtual bool FindTag(unsigned int group,unsigned int element, TagPrivadoUndefined& tagBinario);
+
+        virtual bool FindTag(unsigned int group, unsigned int element, std::vector<TagPrivadoUndefined>& binaryTags);
+
+        /* returns the oid name or empty string if not found */
+        virtual std::string GetOIDName(const std::string &oid);
+
+        /* devuelve la descripcion de este tag*/
+        virtual std::string GetDescription(const std::string &clave) const;
+
+
+        virtual std::string GetNewUID();
+//endregion
+
+//region "External helpers"
+        /*Comprueba el numero magico si es dicom*/
+        static bool EsDicom(const std::string& inputFile);
+
+        /* Crea un DCMElement parseando la cadena (g,e)=valor */
+        static DcmElement* CrearElementoConValor(const char* s);
+
+        /* Inserta la jerarquia en el dataset */
+        int InsertarJerarquia(const DicomDataset& base, DcmItem* itemPadre, DcmSequenceOfItems* seqPadre);
+
+        /* Carga la jerarquia desde el dataset */
+        int CargarJerarquia(DicomDataset& base, unsigned int maximaLongitud, DcmElement * pElementoInicial = NULL);
+
+        /*inserta los tags privados en el dataset*/
+        int InsertarTagsPrivados(TipoPrivateTags& tags);
+
+        /*carga los tags privados*/
+        int PrivateCargarTagsPrivados(GIL::DICOM::TipoPrivateTags& tags);
+
+        /*devuelve el identificador de elemento donde se deben almacenar los tags privados*/
+        unsigned int GetElementIdentifier(GIL::DICOM::TipoPrivateTags& tags);
+
+//endregion
+
+//region "Internal helpers"
+
+private:
+        void FindCharset(const std::string& defaultCharset = "ISO_IR 100");
+        void CreateTempFile();
+        void CleanupTempFile();
+        DcmDataset* getSourceDataSet();
+//endregion
+
+private:
+
+        DcmFileFormat*  m_pDCMSourceFile;
+        DcmDataset*     m_pDCMSourceDataset;
+        wxCSConv* m_pConv;
+};
+
+}
+}
diff --git a/cadxcore/main/controllers/hangingprotocolcontroller.cpp b/cadxcore/main/controllers/hangingprotocolcontroller.cpp
new file mode 100644
index 0000000..4ea88af
--- /dev/null
+++ b/cadxcore/main/controllers/hangingprotocolcontroller.cpp
@@ -0,0 +1,891 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "hangingprotocolcontroller.h"
+#include <limits>
+#include <iomanip>
+#include <iostream>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/dicommanager.h>
+#include <api/dicom/dicomdataset.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/ivista.h>
+#include <api/internationalization/internationalization.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/entorno.h>
+
+#include <wx/xml/xml.h>
+#include <wx/mstream.h>
+#include <wx/sstream.h>
+#include <wx/regex.h>
+#include <wx/sizer.h>
+#include <wx/display.h>
+
+#define HP_DOCUMENT_ROOT wxT("hanging-protocols")
+
+#define PROPERTY_NODE wxT("property")
+#define PROPERTY_KEY wxT("key")
+#define PROPERTY_VALUE wxT("value")
+
+#define HP_ROOT wxT("hanging-protocol")
+#define HP_ATT_NAME wxT("name")
+#define HP_ATT_DESCRIPTION wxT("description")
+#define HP_ATT_MODULE_SID wxT("module-sid")
+#define HP_ATT_MODE_ID wxT("mode")
+#define HP_ATT_ACTIVE wxT("active")
+
+#define LOS_ROOT wxT("layouts")
+#define LO_ROOT wxT("layout")
+#define LO_ATT_ROWS wxT("rows")
+#define LO_ATT_COLUMNS wxT("columns")
+#define LO_ATT_DETACHED wxT("detached")
+#define LO_ATT_MAXIMIZED wxT("maximized")
+#define LO_ATT_X_POS wxT("x-pos")
+#define LO_ATT_Y_POS wxT("y-pos")
+#define LO_ATT_WIDTH wxT("width")
+#define LO_ATT_HEIGHT wxT("height")
+
+#define MC_ROOT wxT("matcher")
+#define MC_ATT_CRITERIA wxT("criteria")
+
+/**
+Class that evaluates study and series matching, depending on matching criteria over tags
+*/
+GNC::GCS::Matcher::Matcher()
+{
+}
+
+GNC::GCS::Matcher::Matcher(wxXmlNode* matcherNode)
+{
+        for (wxXmlNode* child = matcherNode->GetChildren(); child != NULL; child = child->GetNext()) {
+                if (child->GetName().CmpNoCase(MC_ATT_CRITERIA) == 0) {
+                        for (wxXmlNode* prop = child->GetChildren(); prop != NULL; prop = prop->GetNext()) {
+                                if (prop->GetName().CmpNoCase(PROPERTY_NODE) == 0) {
+                                        const wxString key = prop->GetAttribute(PROPERTY_KEY, wxEmptyString);
+                                        const wxString value = prop->GetAttribute(PROPERTY_VALUE, wxEmptyString);
+                                        if (!key.IsEmpty()) {
+                                                this->matchingCriteria[std::string(key.ToUTF8())] = value.ToUTF8();
+                                        }
+                                } else {
+                                        LOG_ERROR("Matcher", "error deserializing matching criteria of Matcher");
+                                }
+                        }
+                } else {
+                        LOG_ERROR("Matcher", "error deserializing Matcher, unknown node " << child->GetName().ToUTF8());
+                }
+        }
+}
+
+GNC::GCS::Matcher::Matcher(const GNC::GCS::Matcher& other)
+{
+        this->matchingCriteria = other.matchingCriteria;
+}
+
+GNC::GCS::Matcher::~Matcher()
+{
+}
+
+bool GNC::GCS::Matcher::MatchesStudy(long idStudy)
+{
+        //tries with study tags from database...
+        GIL::DICOM::DicomDataset databaseDataset;
+        GNC::GCS::HistoryController::Instance()->GetDatabaseDatasetFromStudy(idStudy, databaseDataset);
+
+        std::string tmpValue;
+        for (std::map<std::string, std::string>::const_iterator it = this->matchingCriteria.begin(); it != this->matchingCriteria.end(); ++it) {
+                if (databaseDataset.getTag((*it).first, tmpValue)) {
+                        wxRegEx regularExpresion(wxString::FromUTF8((*it).second.c_str()), wxRE_ICASE);
+                        if (!regularExpresion.Matches(wxString::FromUTF8(tmpValue.c_str()))) {
+                                return false;
+                        }
+                } else {
+                        //this attribute isn't in database, so we have to parse a file from the study....
+                        GNC::GCS::IHistoryController::SeriesModelList seriesList;
+                        GNC::GCS::HistoryController::Instance()->GetSeriesFromStudy(idStudy, seriesList);
+                        if (!seriesList.empty()) {
+                                GNC::GCS::IHistoryController::FileModel file = GNC::GCS::HistoryController::Instance()->GetFrameOfReference(seriesList.front().pk);
+                                return matches(file.real_path);
+                        }
+                }
+        }
+        return true;
+}
+bool GNC::GCS::Matcher::MatchesSeries(long idSeries)
+{
+        //tries with study tags from database...
+        GIL::DICOM::DicomDataset databaseDataset;
+        GNC::GCS::HistoryController::Instance()->GetDatabaseDatasetFromSeries(idSeries, databaseDataset);
+
+        std::string tmpValue;
+        for (std::map<std::string, std::string>::const_iterator it = this->matchingCriteria.begin(); it != this->matchingCriteria.end(); ++it) {
+                if (databaseDataset.getTag((*it).first, tmpValue)) {
+                        wxRegEx regularExpresion(wxString::FromUTF8((*it).second.c_str()), wxRE_ICASE);
+                        if (!regularExpresion.Matches(wxString::FromUTF8(tmpValue.c_str()))) {
+                                return false;
+                        }
+                } else {
+                        //this attribute isn't in database, so we have to parse a file from the study....
+                        GNC::GCS::IHistoryController::FileModel file = GNC::GCS::HistoryController::Instance()->GetFrameOfReference(idSeries);
+                        return matches(file.real_path);
+                }
+        }
+        return true;
+}
+
+bool GNC::GCS::Matcher::matches(const std::string& pathOfFile)
+{
+        GIL::DICOM::DICOMManager manager;
+        GIL::DICOM::DicomDataset base;
+        manager.CargarFichero(pathOfFile, base);
+        std::string tmpValue;
+        for (std::map<std::string, std::string>::const_iterator it = this->matchingCriteria.begin(); it != this->matchingCriteria.end(); ++it) {
+                if (base.getTag((*it).first, tmpValue)) {
+                        wxRegEx regularExpresion(wxString::FromUTF8((*it).second.c_str()));
+                        if (!regularExpresion.Matches(wxString::FromUTF8(tmpValue.c_str()))) {
+                                return false;
+                        }
+                } else {
+                        LOG_DEBUG("Matcher", "study doesn't contains " << (*it).first << " attribute");
+                        return false;
+                }
+        }
+        return true;
+}
+
+wxXmlNode* GNC::GCS::Matcher::serialize()
+{
+        wxXmlNode* matcherNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, MC_ROOT);
+
+        wxXmlNode* matchingCriteria = new wxXmlNode(matcherNode, wxXML_ELEMENT_NODE, MC_ATT_CRITERIA);
+        for (std::map<std::string, std::string>::const_iterator it = this->matchingCriteria.begin(); it != this->matchingCriteria.end(); ++it) {
+                wxXmlNode* propertyNode = new wxXmlNode(matchingCriteria, wxXML_ELEMENT_NODE, PROPERTY_NODE);
+                propertyNode->AddAttribute(PROPERTY_KEY, wxString::FromUTF8((*it).first.c_str()));
+                propertyNode->AddAttribute(PROPERTY_VALUE, wxString::FromUTF8((*it).second.c_str()));
+        }
+
+        return matcherNode;
+}
+
+std::map<std::string, std::string>& GNC::GCS::Matcher::getMatchingCriteria()
+{
+        return this->matchingCriteria;
+}
+
+void GNC::GCS::Matcher::setMatchingCriteria(const std::map<std::string, std::string>& criteria)
+{
+        this->matchingCriteria = criteria;
+}
+
+
+/**
+Defines a specific layout, is recursive to allow splitted cells
+*/
+GNC::GCS::Layout::Layout():rows(1),
+        columns(1),
+        pParent(nullptr),
+        isDetached(false),
+        isMaximized(false),
+        xPos(0), yPos(0),
+        width(1), height(1)
+{
+}
+
+GNC::GCS::Layout::Layout(wxXmlNode* layoutRoot):Layout()
+{
+        long tmp;
+        if (layoutRoot->GetAttribute(LO_ATT_ROWS, wxT("1")).ToLong(&tmp)) {
+                rows = tmp;
+        }
+        if (layoutRoot->GetAttribute(LO_ATT_COLUMNS, wxT("1")).ToLong(&tmp)) {
+                columns = tmp;
+        }
+        wxString foo;
+        if (layoutRoot->GetAttribute(LO_ATT_DETACHED, &foo)) {
+                this->isDetached = true;
+                isMaximized = layoutRoot->GetAttribute(LO_ATT_MAXIMIZED, &foo);
+                if (layoutRoot->GetAttribute(LO_ATT_X_POS, wxT("-1")).ToLong(&tmp)) {
+                        xPos = tmp;
+                }
+                if (layoutRoot->GetAttribute(LO_ATT_Y_POS, wxT("-1")).ToLong(&tmp)) {
+                        yPos = tmp;
+                }
+                if (layoutRoot->GetAttribute(LO_ATT_WIDTH, wxT("-1")).ToLong(&tmp)) {
+                        width = tmp;
+                }
+                if (layoutRoot->GetAttribute(LO_ATT_HEIGHT, wxT("-1")).ToLong(&tmp)) {
+                        height = tmp;
+                }
+        } else {
+                this->isDetached = false;
+        }
+
+        for (wxXmlNode* child = layoutRoot->GetChildren(); child != NULL; child = child->GetNext()) {
+                if (child->GetName().CmpNoCase(LO_ROOT) == 0) {
+                        GNC::GCS::Ptr<Layout> childrenLayout(new Layout(child));
+                        cellList.push_back(childrenLayout);
+                } else if (child->GetName().CmpNoCase(MC_ROOT) == 0) {
+                        seriesMatcher = new Matcher(child);
+                } else if (child->GetName().CmpNoCase(PROPERTY_NODE) == 0) {
+                        const wxString key = child->GetAttribute(PROPERTY_KEY, wxEmptyString);
+                        const wxString value = child->GetAttribute(PROPERTY_VALUE, wxEmptyString);
+                        if (!key.IsEmpty()) {
+                                this->properties[std::string(key.ToUTF8())] = value.ToUTF8();
+                        }
+                } else {
+                        LOG_ERROR("Layout", "error deserializing layout, unknown node " << child->GetName().ToUTF8());
+                }
+        }
+}
+
+GNC::GCS::Layout::Layout(const Layout& other)
+{
+        for (std::list<GNC::GCS::Ptr<GNC::GCS::Layout> >::const_iterator it = other.cellList.begin(); it != other.cellList.end(); it++) {
+                GNC::GCS::Ptr<GNC::GCS::Layout> layout(new Layout(*(*it)));
+                this->cellList.push_back(layout);
+        }
+        if (other.seriesMatcher.IsValid()) {
+                GNC::GCS::Ptr<GNC::GCS::Matcher> matcher(new Matcher(*other.seriesMatcher));
+                this->seriesMatcher = matcher;
+        }
+        this->properties = other.properties;
+        this->columns = other.columns;
+        this->rows = other.rows;
+        this->isDetached = other.isDetached;
+        this->isMaximized = other.isMaximized;
+        this->xPos = other.xPos;
+        this->yPos = other.yPos;
+        this->width = other.width;
+        this->height = other.height;
+        pParent = other.pParent;
+}
+
+GNC::GCS::Layout::~Layout()
+{
+}
+/**
+Layout with a row and a column is a cell and cellList is empty
+*/
+bool GNC::GCS::Layout::isACell()
+{
+        return rows == 1 && columns == 1;
+}
+
+wxXmlNode* GNC::GCS::Layout::serialize()
+{
+        wxXmlNode* layoutNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, LO_ROOT);
+        layoutNode->AddAttribute(LO_ATT_ROWS, wxString::Format(wxT("%d"), (int)(this->rows)));
+        layoutNode->AddAttribute(LO_ATT_COLUMNS, wxString::Format(wxT("%d"), (int)(this->columns)));
+        for (std::list<GNC::GCS::Ptr<Layout> >::const_iterator it = this->cellList.begin(); it != this->cellList.end(); ++it) {
+                if ((*it).IsValid()) {
+                        layoutNode->AddChild((*it)->serialize());
+                }
+        }
+
+        if (seriesMatcher.IsValid()) {
+                layoutNode->AddChild(seriesMatcher->serialize());
+        }
+
+        for (std::map<std::string, std::string>::const_iterator it = this->properties.begin(); it != this->properties.end(); ++it) {
+                wxXmlNode* propertyNode = new wxXmlNode(layoutNode, wxXML_ELEMENT_NODE, PROPERTY_NODE);
+                propertyNode->AddAttribute(PROPERTY_KEY, wxString::FromUTF8((*it).first.c_str()));
+                propertyNode->AddAttribute(PROPERTY_VALUE, wxString::FromUTF8((*it).second.c_str()));
+        }
+
+        if (isDetached) {
+                layoutNode->AddAttribute(LO_ATT_DETACHED, wxEmptyString);
+                if (isMaximized) {
+                        layoutNode->AddAttribute(LO_ATT_MAXIMIZED, wxEmptyString);
+                }
+                layoutNode->AddAttribute(LO_ATT_X_POS, wxString::Format(wxT("%d"), (int)(this->xPos)));
+                layoutNode->AddAttribute(LO_ATT_Y_POS, wxString::Format(wxT("%d"), (int)(this->yPos)));
+                layoutNode->AddAttribute(LO_ATT_WIDTH, wxString::Format(wxT("%d"), (int)(this->width)));
+                layoutNode->AddAttribute(LO_ATT_HEIGHT, wxString::Format(wxT("%d"), (int)(this->height)));
+        }
+
+        return layoutNode;
+}
+
+void GNC::GCS::Layout::doLayout(IHangingProtocolContract* pContract, wxSizer* parentSizer)
+{
+        if (isACell()) {
+                //create cell...
+                long pk = -1;
+                if (seriesMatcher.IsValid()) {
+                        const std::list<long>& seriesId = pContract->getOpeningSeries();
+                        for (std::list<long>::const_iterator it = seriesId.begin(); it != seriesId.end(); ++it) {
+                                if (seriesMatcher->MatchesSeries((*it))) {
+                                        pk = (*it);
+                                        break;
+                                }
+                        }
+                }
+                //
+                parentSizer->Add(pContract->createSeriesSlot(this->properties, pk, seriesMatcher), 1, wxEXPAND|wxALL);
+        } else {
+                //parent sizer has to have vertical layout...
+                wxBoxSizer* pParentBox = dynamic_cast<wxBoxSizer*>(parentSizer);
+                if (pParentBox == NULL || pParentBox->GetOrientation() != wxVERTICAL) {
+                        wxBoxSizer* verticalSizer = new wxBoxSizer(wxVERTICAL);
+                        parentSizer->Add(verticalSizer, 1, wxEXPAND|wxALL);
+                        parentSizer = verticalSizer;
+                }
+                //
+                std::list<GNC::GCS::Ptr<Layout> >::const_iterator itLayouts = this->cellList.begin();
+                for (int i = 0; i < this->rows; i++) {
+                        wxBoxSizer* pRow = new wxBoxSizer(wxHORIZONTAL);
+                        for (int j = 0; j < this->columns; j++) {
+                                if (itLayouts != this->cellList.end()) {
+                                        (*itLayouts)->doLayout(pContract, pRow);
+                                        ++itLayouts;
+                                } else {
+                                        pRow->Add(pContract->createSeriesSlot(this->properties, -1, seriesMatcher), 1, wxEXPAND|wxALL);
+                                }
+                        }
+                        parentSizer->Add(pRow, 1, wxEXPAND);
+                }
+        }
+}
+
+GNC::GCS::Ptr<GNC::GCS::Layout> GNC::GCS::Layout::getLayoutFromSizerItem(wxSizerItem* pSizerItem)
+{
+        GNC::GCS::Ptr<GNC::GCS::Layout> pLayout(new GNC::GCS::Layout());
+        //it's a cell
+        if (pSizerItem->GetWindow() != NULL) {
+                GNC::GCS::IHangingSeriesViewer* seriesViewerMatcher = dynamic_cast<GNC::GCS::IHangingSeriesViewer*>(pSizerItem->GetWindow());
+                if (seriesViewerMatcher != NULL) {
+                        //build series matcher...
+                        GIL::DICOM::DicomDataset base;
+                        seriesViewerMatcher->getSeriesBase(base);
+                        GNC::GCS::Ptr<GNC::GCS::Matcher> pMatcher(new GNC::GCS::Matcher);
+                        for (GIL::DICOM::ListaTags::iterator it = base.tags.begin(); it != base.tags.end(); it++) {
+                                pMatcher->getMatchingCriteria()[(*it).first] = (*it).second;
+                        }
+                        pLayout->setMatcher(pMatcher);
+                }
+        } else if (pSizerItem->GetSizer() != NULL) {
+                //count rows and columns...
+                wxBoxSizer* pBoxPpal = dynamic_cast<wxBoxSizer*>(pSizerItem->GetSizer());
+                if (pBoxPpal != NULL) {
+                        int elements = 0;
+                        for (wxSizerItemList::const_iterator itItems = pBoxPpal->GetChildren().begin(); itItems != pBoxPpal->GetChildren().end(); itItems++, elements++) {
+                                pLayout->cellList.push_back(getLayoutFromSizerItem((*itItems)));
+                        }
+                        if (pBoxPpal->GetOrientation() == wxVERTICAL) {
+                                pLayout->setRows(elements);
+                        } else {
+                                pLayout->setColumns(elements);
+                        }
+                        //if layout is 1x1 with one child point to this child
+                        if (pLayout->isACell() && pLayout->cellList.size() == 1) {
+                                GNC::GCS::Ptr<GNC::GCS::Layout> tmp = pLayout->cellList.front();
+                                pLayout = tmp;
+                        }
+                } else {
+                        LOG_ERROR("Layout::getLayoutFromSizer", "there is a sizer that isn't a box sizer");
+                }
+        } else {
+                LOG_ERROR("Layout::getLayoutFromSizer", "there is a item that isn't a winwow or a sizer");
+        }
+        return pLayout;
+}
+
+GNC::GCS::Ptr<GNC::GCS::Layout> GNC::GCS::Layout::getLayoutFromSizer(wxSizer* pSizer)
+{
+        GNC::GCS::Ptr<GNC::GCS::Layout> pLayout(new GNC::GCS::Layout());
+        wxBoxSizer* pBoxPpal = dynamic_cast<wxBoxSizer*>(pSizer);
+        if (pBoxPpal != NULL) {
+                //count rows and columns...
+                wxBoxSizer* pBoxPpal = dynamic_cast<wxBoxSizer*>(pSizer);
+                if (pBoxPpal != NULL) {
+                        int elements = 0;
+                        for (wxSizerItemList::const_iterator itItems = pBoxPpal->GetChildren().begin(); itItems != pBoxPpal->GetChildren().end(); itItems++, elements++) {
+                                pLayout->cellList.push_back(getLayoutFromSizerItem((*itItems)));
+                        }
+                        if (pBoxPpal->GetOrientation() == wxVERTICAL) {
+                                pLayout->setRows(elements);
+                        } else {
+                                pLayout->setColumns(elements);
+                        }
+                        //if layout is 1x1 with one child point to this child
+                        if (pLayout->isACell() && pLayout->cellList.size() == 1) {
+                                GNC::GCS::Ptr<GNC::GCS::Layout> tmp = pLayout->cellList.front();
+                                pLayout = tmp;
+                        }
+                } else {
+                        LOG_ERROR("Layout::getLayoutFromSizer", "there is a sizer that isn't a box sizer");
+                }
+        } else {
+                LOG_ERROR("Layout::getLayoutFromSizer", "there is a sizer that isn't a box sizer");
+        }
+        return pLayout;
+}
+
+int GNC::GCS::Layout::getRows()
+{
+        return this->rows;
+}
+
+void GNC::GCS::Layout::setRows(int rows)
+{
+        this->rows = rows;
+}
+
+int GNC::GCS::Layout::getColumns()
+{
+        return this->columns;
+}
+
+void GNC::GCS::Layout::setColumns(int columns)
+{
+        this->columns = columns;
+}
+
+std::list<GNC::GCS::Ptr<GNC::GCS::Layout> >& GNC::GCS::Layout::getCellList()
+{
+        return cellList;
+}
+
+void GNC::GCS::Layout::setCellList(const std::list<GNC::GCS::Ptr<GNC::GCS::Layout> >& cellList)
+{
+        this->cellList = cellList;
+}
+
+const GNC::GCS::Ptr<GNC::GCS::Matcher>& GNC::GCS::Layout::getMatcher()
+{
+        return seriesMatcher;
+}
+
+void GNC::GCS::Layout::setMatcher(const GNC::GCS::Ptr<GNC::GCS::Matcher>& matcher)
+{
+        this->seriesMatcher = matcher;
+}
+
+
+std::map<std::string, std::string>& GNC::GCS::Layout::getProperties()
+{
+        return this->properties;
+}
+
+void GNC::GCS::Layout::setProperties(const std::map<std::string, std::string>& properties)
+{
+        this->properties = properties;
+}
+
+GNC::GCS::HangingProtocol* GNC::GCS::Layout::getParent()
+{
+        return pParent;
+}
+
+void GNC::GCS::Layout::setParent(GNC::GCS::HangingProtocol* pH)
+{
+        pParent = pH;
+}
+
+void GNC::GCS::Layout::setDefaultPosition()
+{
+        isDetached = false;
+}
+
+void GNC::GCS::Layout::setWindowProperties(bool isMaximized, int xPos, int yPos, int width, int height)
+{
+        this->isDetached = true;
+        this->isMaximized = isMaximized;
+        this->xPos = xPos;
+        this->yPos = yPos;
+        this->width = width;
+        this->height = height;
+}
+
+void GNC::GCS::Layout::copyWindowProperties(const GNC::GCS::Layout& other)
+{
+        this->isDetached = other.isDetached;
+        this->isMaximized = other.isMaximized;
+        this->xPos = other.xPos;
+        this->yPos = other.yPos;
+        this->width = other.width;
+        this->height = other.height;
+}
+
+void GNC::GCS::Layout::applyWindowProperties(wxWindow* pWindow)
+{
+        if (isDetached) {
+                int maxX = 0, maxY = 0, minX=std::numeric_limits<int>::max(), minY=std::numeric_limits<int>::max();
+                int deviceCount = wxDisplay::GetCount();
+                for (int i = 0; i < deviceCount; ++i) {
+                        wxDisplay dsply(i);
+                        maxX = std::max<int>(maxX, dsply.GetClientArea().x + dsply.GetCurrentMode().GetWidth());
+                        maxY = std::max<int>(maxY, dsply.GetClientArea().y + dsply.GetCurrentMode().GetHeight());
+                        minX = std::min<int>(minX, dsply.GetClientArea().x);
+                        minY = std::min<int>(minY, dsply.GetClientArea().y);
+                }
+                wxPoint position(xPos, yPos);
+                if (position.x >= (minX - pWindow->GetMinSize().x) && position.x  < maxX
+                    && position.y >= (minY  - pWindow->GetMinSize().y) && position.y < maxY) {
+                        pWindow->SetPosition(position);
+                }
+                wxSize size(width, height);
+                wxTopLevelWindow* pTopLevel = dynamic_cast<wxTopLevelWindow*>(pWindow);
+                if (pTopLevel != NULL) {
+                        pTopLevel->Maximize(isMaximized);
+                        if (!isMaximized) {
+                                pWindow->SetSize(size);
+                        }
+                } else {
+                        pWindow->SetSize(size);
+                }
+
+        }
+}
+
+void GNC::GCS::Layout::applyWindowProperties(GNC::GCS::IVista* pView)
+{
+        //detach view...
+        wxWindow* pWindow = pView->GetWindow();
+        if(pWindow != NULL) {
+                wxWindow* pParentWindow = pWindow->GetParent();
+                if(pParentWindow != NULL) {
+                        wxFrame* pdlg = dynamic_cast<wxFrame*>(pParentWindow);
+                        if(pdlg != NULL) {
+                                //it is detached
+                                if (!isDetached) {
+                                        //undetach
+                                        GNC::Entorno::Instance()->GetVentanaPrincipal()->EncajarDesencajar(pView);
+                                }
+                        } else {
+                                //it isn't detached
+                                if (isDetached) {
+                                        //detach
+                                        GNC::Entorno::Instance()->GetVentanaPrincipal()->EncajarDesencajar(pView);
+                                        //apply properties
+                                        applyWindowProperties(pWindow->GetParent());
+                                }
+                        }
+                }
+        }
+}
+
+
+/////////////////////////////////////////////////////
+GNC::GCS::HangingProtocol::HangingProtocol():
+        openingMode(0),
+        active(true)
+{
+}
+
+GNC::GCS::HangingProtocol::HangingProtocol(wxXmlNode* hangingNode)
+{
+        this->name = hangingNode->GetAttribute(HP_ATT_NAME, wxEmptyString).ToUTF8();
+        this->description = hangingNode->GetAttribute(HP_ATT_DESCRIPTION, wxEmptyString).ToUTF8();
+        this->moduleSid = hangingNode->GetAttribute(HP_ATT_MODULE_SID, wxEmptyString).ToUTF8();
+        this->active = hangingNode->GetAttribute(HP_ATT_ACTIVE, wxT("true")).CmpNoCase(wxT("true")) == 0;
+        long tmpLong;
+        if(hangingNode->GetAttribute(HP_ATT_MODE_ID, wxEmptyString).ToLong(&tmpLong)) {
+                this->openingMode = tmpLong;
+        } else {
+                this->openingMode = 0;
+        }
+        for (wxXmlNode* child = hangingNode->GetChildren(); child != NULL; child = child->GetNext()) {
+                if (child->GetName().CmpNoCase(LOS_ROOT) == 0) {
+                        //layouts...
+                        for (wxXmlNode* layoutChild = child->GetChildren(); layoutChild != NULL; layoutChild = layoutChild->GetNext()) {
+                                if (layoutChild->GetName().CmpNoCase(LO_ROOT) == 0) {
+                                        GNC::GCS::Ptr<Layout> pLayout(new Layout(layoutChild));
+                                        this->addLayout(pLayout);
+                                }
+                        }
+                } else if (child->GetName().CmpNoCase(LO_ROOT) == 0)  {
+                        //retrocompatib...
+                        GNC::GCS::Ptr<Layout> pLayout(new Layout(child));
+                        this->addLayout(pLayout);
+                }  else if (child->GetName().CmpNoCase(MC_ROOT) == 0) {
+                        this->studyMatcher = new Matcher(child);
+                } else if (child->GetName().CmpNoCase(PROPERTY_NODE) == 0) {
+                        const wxString key = child->GetAttribute(PROPERTY_KEY, wxEmptyString);
+                        const wxString value = child->GetAttribute(PROPERTY_VALUE, wxEmptyString);
+                        if (!key.IsEmpty()) {
+                                this->properties[std::string(key.ToUTF8())] = value.ToUTF8();
+                        }
+                } else {
+                        LOG_ERROR("HangingProtocol", "error deserializing hanging protocol, unknown node " << child->GetName().ToUTF8());
+                }
+        }
+}
+
+GNC::GCS::HangingProtocol::HangingProtocol(const GNC::GCS::HangingProtocol& other)
+{
+        this->name = other.name;
+        this->description = other.description;
+        this->moduleSid = other.moduleSid;
+        this->openingMode = other.openingMode;
+        if (other.studyMatcher.IsValid()) {
+                this->studyMatcher = new Matcher(*other.studyMatcher);
+        }
+        for (GNC::GCS::HangingProtocol::TListOfLayouts::const_iterator it = other.layouts.begin(); it != other.layouts.end(); ++it) {
+                if ((*it).IsValid()) {
+                        GNC::GCS::Ptr<GNC::GCS::Layout> layout(new Layout(*(*it)));
+                        this->layouts.push_back(layout);
+                }
+        }
+        this->properties = other.properties;
+        this->active = other.active;
+}
+
+GNC::GCS::HangingProtocol::~HangingProtocol()
+{
+        active = true;
+}
+
+
+wxXmlNode* GNC::GCS::HangingProtocol::serialize()
+{
+        wxXmlNode* hangingNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, HP_ROOT);
+        hangingNode->AddAttribute(HP_ATT_NAME, wxString::FromUTF8(this->name.c_str()));
+        hangingNode->AddAttribute(HP_ATT_DESCRIPTION, wxString::FromUTF8(this->description.c_str()));
+        hangingNode->AddAttribute(HP_ATT_MODULE_SID, wxString::FromUTF8(this->moduleSid.c_str()));
+        hangingNode->AddAttribute(HP_ATT_MODE_ID, wxString::Format(wxT("%d"), (int) this->openingMode));
+        hangingNode->AddAttribute(HP_ATT_ACTIVE, active?wxT("true"):wxT("false"));
+
+        wxXmlNode* layoutsNode = new wxXmlNode(hangingNode, wxXML_ELEMENT_NODE, LOS_ROOT);
+        for (GNC::GCS::HangingProtocol::TListOfLayouts::const_iterator it = layouts.begin(); it != layouts.end(); ++it) {
+                if ((*it).IsValid()) {
+                        layoutsNode->AddChild((*it)->serialize());
+                }
+        }
+        if (this->studyMatcher.IsValid()) {
+                hangingNode->AddChild(this->studyMatcher->serialize());
+        }
+
+        for (std::map<std::string, std::string>::const_iterator it = this->properties.begin(); it != this->properties.end(); ++it) {
+                wxXmlNode* propertyNode = new wxXmlNode(hangingNode, wxXML_ELEMENT_NODE, PROPERTY_NODE);
+                propertyNode->AddAttribute(PROPERTY_KEY, wxString::FromUTF8((*it).first.c_str()));
+                propertyNode->AddAttribute(PROPERTY_VALUE, wxString::FromUTF8((*it).second.c_str()));
+        }
+
+        return hangingNode;
+}
+
+bool GNC::GCS::HangingProtocol::matches(long idStudy)
+{
+        if (this->studyMatcher.IsValid()) {
+                return this->studyMatcher->MatchesStudy(idStudy);
+        }
+        LOG_WARN("HangingProtocol", "there is a hanging protocol without matcher specified");
+        return false;
+}
+
+
+const std::string& GNC::GCS::HangingProtocol::getName()
+{
+        return this->name;
+}
+
+void GNC::GCS::HangingProtocol::setName(const std::string& name)
+{
+        this->name = name;
+}
+
+const std::string& GNC::GCS::HangingProtocol::getDescription()
+{
+        return this->description;
+}
+
+void GNC::GCS::HangingProtocol::setDescription(const std::string& description)
+{
+        this->description = description;
+}
+
+const std::string& GNC::GCS::HangingProtocol::getModuleSid()
+{
+        return this->moduleSid;
+}
+
+void GNC::GCS::HangingProtocol::setModuleSid(const std::string& sid)
+{
+        this->moduleSid = sid;
+}
+
+int GNC::GCS::HangingProtocol::getOpeningMode()
+{
+        return this->openingMode;
+}
+
+void GNC::GCS::HangingProtocol::setOpeningMode(int mode)
+{
+        this->openingMode = mode;
+}
+
+const GNC::GCS::Ptr<GNC::GCS::Matcher>& GNC::GCS::HangingProtocol::getStudyMatcher()
+{
+        return this->studyMatcher;
+}
+
+void GNC::GCS::HangingProtocol::setStudyMatcher(const GNC::GCS::Ptr<GNC::GCS::Matcher>& matcher)
+{
+        this->studyMatcher = matcher;
+}
+
+const GNC::GCS::HangingProtocol::TListOfLayouts& GNC::GCS::HangingProtocol::getLayouts()
+{
+        return this->layouts;
+}
+
+void GNC::GCS::HangingProtocol::addLayout(const GNC::GCS::Ptr<GNC::GCS::Layout>& layout)
+{
+        if (layout.IsValid()) {
+                layout->setParent(this);
+                this->layouts.push_back(layout);
+        }
+}
+
+void GNC::GCS::HangingProtocol::clearLayouts()
+{
+        this->layouts.clear();
+}
+
+std::map<std::string, std::string>& GNC::GCS::HangingProtocol::getProperties()
+{
+        return this->properties;
+}
+
+void GNC::GCS::HangingProtocol::setProperties(const std::map<std::string, std::string>& properties)
+{
+        this->properties = properties;
+}
+
+bool GNC::GCS::HangingProtocol::isActive()
+{
+        return this->active;
+}
+
+void GNC::GCS::HangingProtocol::setActive(bool active)
+{
+        this->active = active;
+}
+
+/**
+Controller for hanging protocols
+*/
+GNC::GCS::HangingProtocolController* GNC::GCS::HangingProtocolController::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new HangingProtocolController();
+        }
+        return m_pInstance;
+}
+
+void GNC::GCS::HangingProtocolController::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+GNC::GCS::HangingProtocolController::HangingProtocolController()
+{
+        LoadFromConfiguration();
+}
+
+GNC::GCS::HangingProtocolController::~HangingProtocolController()
+{
+}
+GNC::GCS::HangingProtocolController* GNC::GCS::HangingProtocolController::m_pInstance = NULL;
+
+GNC::GCS::Ptr<GNC::GCS::HangingProtocol> GNC::GCS::HangingProtocolController::GetProtocolForStudy(long idStudy)
+{
+        for (std::list<GNC::GCS::Ptr<HangingProtocol> >::const_iterator it = this->listOfProtocols.begin(); it != this->listOfProtocols.end(); ++it) {
+                if ((*it)->isActive() && (*it)->matches(idStudy)) {
+                        return (*it);
+                }
+        }
+        //study doesn't match we create a hanging protocol as traditional ginkgo opening mode...
+
+        return NULL;
+}
+
+void GNC::GCS::HangingProtocolController::StoreHangingProtocolConfiguration()
+{
+        //serialization...
+        wxXmlDocument doc;
+        wxXmlNode* root = new wxXmlNode(NULL, wxXML_ELEMENT_NODE,HP_DOCUMENT_ROOT);
+        doc.SetRoot(root);
+        for (std::list<GNC::GCS::Ptr<HangingProtocol> >::const_iterator it = this->listOfProtocols.begin(); it != this->listOfProtocols.end(); ++it) {
+                root->AddChild((*it)->serialize());
+        }
+        wxMemoryOutputStream out;
+        doc.SetFileEncoding(wxT("UTF-8"));
+        doc.Save(out,0);
+        char* vectorWidgets = new char[out.GetLength()];
+        out.CopyTo(vectorWidgets,out.GetLength());
+        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/HangingProtocols","HangingList", std::string(vectorWidgets, out.GetLength()));
+        delete[] vectorWidgets;
+}
+
+std::list<GNC::GCS::Ptr<GNC::GCS::HangingProtocol> > GNC::GCS::HangingProtocolController::getHangingProtocols()
+{
+        LoadFromConfiguration();
+        std::list<GNC::GCS::Ptr<GNC::GCS::HangingProtocol> >  returningList;
+
+        for (std::list<GNC::GCS::Ptr<HangingProtocol> >::const_iterator it = this->listOfProtocols.begin(); it != this->listOfProtocols.end(); ++it) {
+                GNC::GCS::Ptr<HangingProtocol> pProtocol(new HangingProtocol(*(*it)));
+                returningList.push_back(pProtocol);
+        }
+
+        return returningList;
+}
+
+void GNC::GCS::HangingProtocolController::setHangingProtocols(std::list<GNC::GCS::Ptr<GNC::GCS::HangingProtocol> > listOfProtocols)
+{
+        this->listOfProtocols = listOfProtocols;
+        StoreHangingProtocolConfiguration();
+}
+
+void GNC::GCS::HangingProtocolController::LoadFromConfiguration()
+{
+        //Deserialize...
+        this->listOfProtocols.clear();
+        std::string serializedValue;
+        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/HangingProtocols","HangingList", serializedValue);
+        if (!serializedValue.empty()) {
+                wxString wxSerializedValue = wxString::FromUTF8(serializedValue.c_str());
+                wxStringInputStream istream(wxSerializedValue);
+                wxXmlDocument doc;
+                if (doc.Load(istream)) {
+                        wxXmlNode* root = doc.GetRoot();
+                        if (root != NULL && root->GetName().CmpNoCase(HP_DOCUMENT_ROOT) == 0) {
+                                for (wxXmlNode* hangingProtocolNode = root->GetChildren(); hangingProtocolNode != NULL; hangingProtocolNode = hangingProtocolNode->GetNext()) {
+                                        if (hangingProtocolNode->GetName().CmpNoCase(HP_ROOT) == 0) {
+                                                GNC::GCS::Ptr<HangingProtocol> hangingProtocol(new HangingProtocol(hangingProtocolNode));
+                                                this->listOfProtocols.push_back(hangingProtocol);
+                                        }
+                                }
+                        }
+                } else {
+                        LOG_ERROR("HangingProtocolController", "Error deserializing hanging protocol");
+                }
+        }
+}
+
+
+
+
diff --git a/cadxcore/main/controllers/hangingprotocolcontroller.h b/cadxcore/main/controllers/hangingprotocolcontroller.h
new file mode 100644
index 0000000..784d07a
--- /dev/null
+++ b/cadxcore/main/controllers/hangingprotocolcontroller.h
@@ -0,0 +1,299 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+#include <map>
+#include <list>
+#include <api/autoptr.h>
+#include <api/dicom/idicom.h>
+class wxXmlNode;
+class wxSizer;
+class wxWindow;
+class wxSizerItem;
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+class Matcher;
+/**
+if series viewers implements this interface, getLayoutForSizer
+*/
+class IHangingSeriesViewer
+{
+public:
+        virtual void getSeriesBase(GIL::DICOM::DicomDataset& seriesBase) = 0;
+};
+/**
+contract to realize layout...
+*/
+class IHangingProtocolContract
+{
+public:
+        virtual wxWindow* createSeriesSlot(const std::map<std::string, std::string>& properties, long pk = -1, const GNC::GCS::Ptr<GNC::GCS::Matcher>& pMatcher = NULL) = 0;
+        virtual const std::list<long>& getOpeningSeries() = 0;
+};
+/**
+Class that evaluates study and series matching, depending on matching criteria over tags
+*/
+class Matcher
+{
+public:
+        Matcher();
+        /**
+        Deserialize from xml
+        */
+        Matcher(wxXmlNode* node);
+        Matcher(const Matcher& other);
+        ~Matcher();
+        bool MatchesStudy(long idStudy);
+        bool MatchesSeries(long idSeries);
+        /**
+        serialize to XML
+        */
+        wxXmlNode* serialize();
+        /**
+        getter and setter
+        */
+        std::map<std::string, std::string>& getMatchingCriteria();
+        void setMatchingCriteria(const std::map<std::string, std::string>& properties);
+protected:
+        bool matches(const std::string& pathOfFile);
+        std::map<std::string, std::string> matchingCriteria;
+};
+
+class HangingProtocol;
+/**
+Defines a specific layout, is recursive to allow splitted cells
+*/
+class Layout
+{
+public:
+        Layout();
+        /**
+        deserialize from xml
+        */
+        Layout(wxXmlNode* layoutRoot);
+        Layout(const Layout& other);
+        ~Layout();
+        /**
+        Layout with a row and a column is a cell and cellList is empty
+        */
+        bool isACell();
+        /**
+        serialize to XML
+        */
+        wxXmlNode* serialize();
+
+        void doLayout(IHangingProtocolContract* pContract, wxSizer* parentSizer);
+        static GNC::GCS::Ptr<GNC::GCS::Layout> getLayoutFromSizer(wxSizer* pSizer);
+protected:
+        static GNC::GCS::Ptr<GNC::GCS::Layout> getLayoutFromSizerItem(wxSizerItem* pSizerItem);
+public:
+
+        /**
+        getters and setters
+        */
+        int getRows();
+        void setRows(int rows);
+        int getColumns();
+        void setColumns(int columns);
+        std::list<GNC::GCS::Ptr<Layout> >& getCellList();
+        void setCellList(const std::list<GNC::GCS::Ptr<Layout> >& cellList);
+        const GNC::GCS::Ptr<Matcher>& getMatcher();
+        void setMatcher(const GNC::GCS::Ptr<Matcher>& matcher);
+        std::map<std::string, std::string>& getProperties();
+        void setProperties(const std::map<std::string, std::string>& properties);
+        GNC::GCS::HangingProtocol* getParent();
+        void setParent(GNC::GCS::HangingProtocol* pH);
+        void setDefaultPosition();
+        void setWindowProperties(bool isMaximized, int xPos, int yPos, int width, int height);
+        void copyWindowProperties(const GNC::GCS::Layout& other);
+        void applyWindowProperties(wxWindow* pWindow);
+        void applyWindowProperties(GNC::GCS::IVista* pView);
+protected:
+        int rows;
+        int columns;
+        /**
+        pointer to parent
+        */
+        GNC::GCS::HangingProtocol* pParent;
+        /**
+        left to right and top down list of cells
+        */
+        std::list<GNC::GCS::Ptr<Layout> > cellList;
+        /**
+        if it's a cell series matching criteria
+        */
+        GNC::GCS::Ptr<Matcher> seriesMatcher;
+        /*
+        here modules can insert key/value properies as zoom level, window/level...
+        */
+        std::map<std::string, std::string> properties;
+        /**
+        if it's detached or not
+        */
+        bool isDetached;
+        /**
+        Window details
+        */
+        bool isMaximized;
+        int xPos, yPos, width, height;
+};
+
+/**
+HangingProtocol class, defines a hanging protocol
+*/
+class HangingProtocol
+{
+public:
+        typedef std::list<GNC::GCS::Ptr<Layout> > TListOfLayouts;
+        HangingProtocol();
+        /**
+        deserialize from xml
+        */
+        HangingProtocol(wxXmlNode* node);
+        HangingProtocol(const HangingProtocol& other);
+        ~HangingProtocol();
+        /**
+        serialize to XML
+        */
+        wxXmlNode* serialize();
+        /**
+        true if study matches with this hanging protocol
+        */
+        bool matches(long idStudy);
+
+        /**
+        Getters and setters
+        */
+        const std::string& getName();
+        void setName(const std::string& name);
+        const std::string& getDescription();
+        void setDescription(const std::string& description);
+        const std::string& getModuleSid();
+        void setModuleSid(const std::string& name);
+        int getOpeningMode();
+        void setOpeningMode(int mode);
+        const GNC::GCS::Ptr<Matcher>& getStudyMatcher();
+        void setStudyMatcher(const GNC::GCS::Ptr<Matcher>& matcher);
+        const TListOfLayouts& getLayouts();
+        void addLayout(const GNC::GCS::Ptr<Layout>& layout);
+        void clearLayouts();
+        std::map<std::string, std::string>& getProperties();
+        void setProperties(const std::map<std::string, std::string>& properties);
+        bool isActive();
+        void setActive(bool active);
+protected:
+        /**
+        Unique name
+        */
+        std::string name;
+        /**
+        description
+        */
+        std::string description;
+        /**
+        Module that opens this hanging protocol
+        */
+        std::string moduleSid;
+        /**opening mode
+        */
+        int openingMode;
+        /**
+        study matching
+        */
+        GNC::GCS::Ptr<Matcher> studyMatcher;
+        /**
+        layout of the protocol
+        */
+        TListOfLayouts layouts;
+        /*
+        here modules can insert key/value properies
+        */
+        std::map<std::string, std::string> properties;
+        /*
+        if it's active
+        */
+        bool active;
+};
+
+/**
+Hanging protocol controller class
+*/
+class HangingProtocolController
+{
+public:
+        /**
+        Singleton method
+        */
+        static HangingProtocolController* Instance();
+
+        /**
+        Free singleton
+        */
+        static void FreeInstance();
+
+        /**
+        Get hanging protocol for specified study
+        */
+        GNC::GCS::Ptr<HangingProtocol> GetProtocolForStudy(long idStudy);
+
+        /**
+        stores hanging protocol list
+        */
+        void StoreHangingProtocolConfiguration();
+        /**
+        gets a copy of hanging protocols
+        */
+        std::list<GNC::GCS::Ptr<HangingProtocol> > getHangingProtocols();
+        /**
+        sets hanging protocol list...
+        */
+        void setHangingProtocols(std::list<GNC::GCS::Ptr<HangingProtocol> > listOfProtocols);
+protected:
+        /**
+        Creation method
+        */
+        HangingProtocolController();
+
+        /**
+        Destruction method
+        */
+        ~HangingProtocolController();
+
+        /**
+        Load from configuration
+        */
+        void LoadFromConfiguration();
+
+        /**
+        singleton attribute
+        */
+        static HangingProtocolController* m_pInstance;
+
+        /**
+        protocol list
+        */
+        std::list<GNC::GCS::Ptr<HangingProtocol> > listOfProtocols;
+};
+}
+}
diff --git a/cadxcore/main/controllers/historycontroller.cpp b/cadxcore/main/controllers/historycontroller.cpp
new file mode 100644
index 0000000..38293d1
--- /dev/null
+++ b/cadxcore/main/controllers/historycontroller.cpp
@@ -0,0 +1,2552 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/msgdlg.h>
+#include <wx/stdpaths.h>
+#include <wx/tokenzr.h>
+#include <wx/statbmp.h>
+#include <wx/bmpbuttn.h>
+
+#include "historycontroller.h"
+#include <api/iproxynotificadorprogreso.h>
+#include <api/dicom/idicommanager.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/internationalization/internationalization.h>
+
+#include "pacscontroller.h"
+#include "controladoreventos.h"
+#include "controladorpermisos.h"
+#include <main/controllers/configurationcontroller.h>
+#include <main/gui/dicomdirmigration/dicomdirmigration.h>
+#include <eventos/hidesplashwindow.h>
+#define LOGGER "HistoryController"
+#include "controladorlog.h"
+#include <sqlite/ginkgosqlite.h>
+#include <sqlite/sqlite3.h>
+#include <commands/comandoincluirhistorial.h>
+
+#include <main/controllers/commandcontroller.h>
+#include <commands/dbmigrationcommand.h>
+
+#include <main/entorno.h>
+#include <sstream>
+#include <cmath>
+//helpers//////////////////////////////////////////////////////////////////////////////
+////helpers orientacion
+char getMajorAxisFromPatientRelativeDirectionCosine(double x, double y, double z)
+{
+        // 0.5477 would be the square root of 1 (unit vector sum of squares) divided by 3 (oblique axes - a "double" oblique)
+        // 0.7071 would be the square root of 1 (unit vector sum of squares) divided by 2 (oblique axes)
+        /***/
+        const double obliquityThresholdCosineValue = 0.8;
+
+
+        char axis = '?';
+
+        char orientationX = x < 0 ? 'R' : 'L';
+        char orientationY = y < 0 ? 'A' : 'P';
+        char orientationZ = z < 0 ? 'F' : 'H';
+
+        double absX = std::abs(x);
+        double absY = std::abs(y);
+        double absZ = std::abs(z);
+
+        // The tests here really don't need to check the other dimensions,
+        // just the threshold, since the sum of the squares should be == 1.0
+        // but just in case ...
+
+        if (absX>obliquityThresholdCosineValue && absX>absY && absX>absZ) {
+                axis=orientationX;
+        } else if (absY>obliquityThresholdCosineValue && absY>absX && absY>absZ) {
+                axis=orientationY;
+        } else if (absZ>obliquityThresholdCosineValue && absZ>absX && absZ>absY) {
+                axis=orientationZ;
+        }
+        return axis;
+}
+
+char makeImageOrientationLabelFromImageOrientationPatient(
+        const double rowX,const double rowY,const double rowZ,
+        const double colX,const double colY,const double colZ)
+{
+        char label = 'O';
+        char rowAxis = getMajorAxisFromPatientRelativeDirectionCosine(rowX,rowY,rowZ);
+        char colAxis = getMajorAxisFromPatientRelativeDirectionCosine(colX,colY,colZ);
+        if (rowAxis != '?' && colAxis != '?') {
+                if      ((rowAxis == 'R' || rowAxis == 'L') && (colAxis == 'A' || colAxis == 'P')) label='A';
+                else if ((colAxis == 'R' || colAxis == 'L') && (rowAxis == 'A' || rowAxis == 'P')) label='A';
+
+                else if ((rowAxis == 'R' || rowAxis == 'L') && (colAxis == 'H' || colAxis == 'F')) label='C';
+                else if ((colAxis == 'R' || colAxis == 'L') && (rowAxis == 'H' || rowAxis == 'F')) label='C';
+
+                else if ((rowAxis == 'A' || rowAxis == 'P') && (colAxis == 'H' || colAxis == 'F')) label='S';
+                else if ((colAxis == 'A' || colAxis == 'P') && (rowAxis == 'H' || rowAxis == 'F')) label='S';
+        }
+        return label;
+}
+
+std::string parseDateTime(const std::string& tagDate, const std::string& tagTime)
+{
+        std::ostringstream ostr;
+
+        wxDateTime fecha;
+        fecha.ParseFormat(wxString::FromUTF8(tagDate.c_str()),wxT("%Y%m%d"));
+        if (fecha.IsValid()) {
+                ostr << fecha.Format(wxT("%Y-%m-%d")).ToUTF8();
+        } else {
+                return "";
+        }
+        wxDateTime hora;
+        hora.ParseFormat(wxString::FromUTF8(tagTime.c_str()),wxT("%H%M%S"));
+        if(hora.IsValid()) {
+                ostr << "T";
+                ostr << hora.Format(wxT("%H:%M:%S")).ToUTF8();
+                const int posPunto = tagTime.find(".");
+                if (posPunto >= 0) {
+                        ostr << tagTime.substr(posPunto, tagTime.size()-1);
+                }
+        }
+        return ostr.str();
+}
+
+inline std::string GetDateTimeFromWx(const wxString& dateStr)
+{
+        std::string result;
+        wxDateTime date,time;
+
+        const wxChar* pchDate = date.ParseFormat(dateStr, wxT("%Y-%m-%d"));
+
+        if ( pchDate ) {
+                // Skip spaces, as the ParseTime() function fails on spaces
+                while ( wxIsspace(*pchDate) || (*pchDate)=='T' )
+                        pchDate++;
+
+                time.ParseFormat(pchDate, wxT("%H:%M:%S"));
+                if (time.IsValid()) {
+                        size_t posPoint = dateStr.Find('.', true);
+                        if (posPoint != wxString::npos) {
+                                long milli=0;
+                                wxString tmp = dateStr.substr(posPoint+1);
+                                if (tmp.ToLong(&milli)) {
+                                        time.SetMillisecond(milli);
+                                }
+                        }
+                        date.Set(date.GetDay(), date.GetMonth(), date.GetYear(), time.GetHour(), time.GetMinute(), time.GetSecond(), time.GetMillisecond());
+                }
+        }
+        if (date.IsValid()) {
+                result = date.Format(wxT("%Y-%m-%dT%H:%M:%S.%l")).ToUTF8();
+        }
+        return result;
+}
+
+inline std::list<std::string> StringToList(const wxString& field)
+{
+        wxStringTokenizer tknz(field, wxT("/"));
+        std::list<std::string> result;
+        while(tknz.HasMoreTokens()) {
+                std::string element(tknz.GetNextToken().ToUTF8());
+                result.push_back(element);
+        }
+        return result;
+}
+
+inline std::string ListToString(const std::list<std::string>& listOfString)
+{
+        std::ostringstream ostr;
+        bool primero = true;
+        for (std::list<std::string>::const_iterator it = listOfString.begin(); it != listOfString.end(); ++it) {
+                if (!primero) {
+                        ostr << "/";
+                }
+                ostr << (*it);
+                primero = false;
+        }
+        return ostr.str();
+}
+////region "helpers"
+/////////////////////////////////////////////////////////
+//region "filters"
+
+//region "filters"
+/////////////////////////////////////////////////////////
+std::string GNC::GCS::History::StudyModalityFilter::GetSQLFilter()
+{
+        if (listOfModalities.empty()) {
+                return "";
+        }
+        std::ostringstream ostr;
+        ostr <<"(";
+        for (std::list<std::string>::iterator it = listOfModalities.begin(); it != listOfModalities.end(); ++it) {
+                if (it != listOfModalities.begin()) {
+                        ostr << " OR ";
+                }
+                ostr << "mods_in_study LIKE '%" << (*it) << "%'";
+        }
+        ostr <<")";
+        return ostr.str();
+}
+
+std::string GNC::GCS::History::AcquisitionDateFilter::GetSQLFilter()
+{
+        wxSQLite3StatementBuffer bufSQL;
+        std::ostringstream ostr;
+        if (from.IsValid() && to.IsValid()) {
+                std::string tmpFrom(from.Format(wxT("%Y-%m-%d %H:%M:%S")).ToUTF8());
+                std::string tmpTo(to.Format(wxT("%Y-%m-%dT%H:%M:%S")).ToUTF8());
+                ostr << bufSQL.Format(" Study.study_datetime BETWEEN '%q' AND '%q'", tmpFrom.c_str(), tmpTo.c_str());
+        } else if (from.IsValid()) {
+                std::string tmpStr(from.Format(wxT("%Y-%m-%d %H:%M:%S")).ToUTF8());
+                ostr << bufSQL.Format(" Study.study_datetime >= '%q'",  tmpStr.c_str());
+        } else	if (to.IsValid()) {
+                std::string tmpStr(to.Format(wxT("%Y-%m-%d %H:%M:%S")).ToUTF8());
+                ostr << bufSQL.Format(" Study.study_datetime <= '%q'", tmpStr.c_str());
+        }
+        return ostr.str();
+}
+
+std::string GNC::GCS::History::StudyPatientFilter::GetSQLFilter()
+{
+        wxSQLite3StatementBuffer bufSQL;
+        std::ostringstream ostr;
+        ostr << bufSQL.Format("Study.pat_id = '%q'", pat_id.c_str());
+        return ostr.str();
+}
+
+
+std::string GNC::GCS::History::StudyLocationFilter::GetSQLFilter()
+{
+        wxSQLite3StatementBuffer bufSQL;
+        std::ostringstream ostr;
+        ostr << bufSQL.Format("Study.location = '%c'", GNC::GCS::HistoryController::LocationToChar(Location));
+        return ostr.str();
+}
+
+
+
+//region "Patron singleton"
+GNC::GCS::HistoryController* GNC::GCS::HistoryController::m_pInstance = 0;
+
+GNC::GCS::HistoryController::HistoryController()
+{
+        m_readOnly = false;
+        m_pConexion = NULL;
+        m_pConexionThumbnails = NULL;
+        m_pCriticalSection = new wxCriticalSection();
+        m_pCriticalSectionThumbnails = new wxCriticalSection();
+        ReloadHistory();
+}
+
+GNC::GCS::HistoryController::HistoryController(const std::string& pathOfDataBase)
+{
+        m_readOnly = false;
+        m_GinkgoDicomDir = pathOfDataBase;
+        m_pConexion = NULL;
+        m_pConexionThumbnails = NULL;
+        m_pCriticalSection = new wxCriticalSection();
+        m_pCriticalSectionThumbnails = new wxCriticalSection();
+        ReloadHistory(pathOfDataBase, false);
+}
+
+void GNC::GCS::HistoryController::ReloadHistory(const std::string& pathDicomDir, bool tryTemp)
+{
+        if (pathDicomDir.empty()) {
+                m_GinkgoDicomDir = GetDefaultDicomDirPath();
+        } else {
+                m_GinkgoDicomDir = pathDicomDir;
+        }
+
+        {
+                wxFileName pathOfDir(FROMPATH(m_GinkgoDicomDir));
+                if (pathOfDir.IsRelative()) {
+                        wxFileName pathOfExec(wxStandardPaths::Get().GetExecutablePath());
+                        pathOfDir.MakeAbsolute(pathOfExec.GetPath());
+                        m_GinkgoDicomDir = TOPATH(pathOfDir.GetFullPath());
+                }
+        }
+
+        bool error = false;
+        if(m_pConexion!=NULL) {
+                m_pConexion->Close();
+                delete m_pConexion;
+                m_pConexion = NULL;
+        }
+        if(m_pConexionThumbnails!=NULL) {
+                m_pConexionThumbnails->Close();
+                delete m_pConexionThumbnails;
+                m_pConexionThumbnails = NULL;
+        }
+
+        try {
+                m_pConexion = new wxSQLite3Database();
+                m_pConexionThumbnails = new wxSQLite3Database();
+                //pillamos la bbdd
+                std::string pathFicheroDB;
+                std::string pathFicheroDBThumbnails;
+                {
+                        std::ostringstream ostr;
+                        ostr << GetGinkgoDicomDir()  << (char)wxFileName::GetPathSeparator(wxPATH_NATIVE) << "ginkgodatabase_2.1.db";
+                        pathFicheroDB = ostr.str();
+                }
+                {
+                        std::ostringstream ostr;
+                        ostr << GetGinkgoDicomDir() << (char)wxFileName::GetPathSeparator(wxPATH_NATIVE) << "ginkgothumbnails.db";
+                        pathFicheroDBThumbnails = ostr.str();
+                }
+
+                wxString wxDirectorio = FROMPATH(GetGinkgoDicomDir());
+                if(!wxDirExists(wxDirectorio)) {
+                        bool success;
+#ifdef _WIN32
+                        success = wxMkdir(wxDirectorio,511);
+#else
+                        success = (wxMkDir(wxDirectorio.ToUTF8(), 0770) == 0);
+#endif
+                        if (!success) {
+                                LOG_ERROR(LOGGER, "unable to create directory '" << wxDirectorio.c_str() << "'");
+                        }
+                }
+
+                //existe el historial??
+                if(!wxFileExists(FROMPATH(pathFicheroDB))) {
+                        //se crea el fichero de base de datos
+                        if(CreateGinkgoDB(*m_pConexion,pathFicheroDB.c_str()) == 0) {
+                                LOG_ERROR(LOGGER,_Std("Error creating history database ") << pathFicheroDB << _Std(" trying temp"));
+                                error = true;
+                                if (tryTemp) {
+                                        error = false;
+                                        LOG_ERROR(LOGGER, _Std("You do not have permissions to write to the dicom Dir, preferences will be stored in the temporary directory"));
+                                        {
+                                                std::ostringstream ostr2;
+                                                ostr2 << GNC::Entorno::Instance()->GetGinkgoTempDir() << (char)wxFileName::GetPathSeparator(wxPATH_NATIVE) << "ginkgodatabase_2.1.db"<<std::ends;
+                                                pathFicheroDB = ostr2.str();
+                                        }
+                                        if (CreateGinkgoDB(*m_pConexion, pathFicheroDB.c_str()) == 0) {
+                                                LOG_FATAL(LOGGER, "Fatal error creating history in temp dir " << pathFicheroDB);
+                                                error = true;
+                                        }
+                                }
+                        }
+                }
+
+                if(!m_pConexion->IsOpen()) {
+                        if( !AbrirConexion(*m_pConexion,pathFicheroDB.c_str()) ) {
+                                LOG_ERROR(LOGGER, _Std("Error creating dicomDir database ") << pathFicheroDB);
+                                error = true;
+                        } else {
+                                wxFileName fileName(FROMPATH(pathFicheroDB));
+                                m_readOnly = !fileName.IsFileWritable();
+
+                                //check version
+                                int version = 0;
+                                try {
+                                        wxSQLite3StatementBuffer bufSQL;
+                                        bufSQL.Format("SELECT Value FROM MetadataBBDD WHERE Property ='Version'");
+                                        wxSQLite3ResultSet result = m_pConexion->ExecuteQuery(bufSQL);
+                                        if (result.NextRow()) {
+                                                version = result.GetInt(0, -1);
+                                        }
+                                } catch (wxSQLite3Exception& ) {
+                                }
+                                if (version != GINKGO_BBDD_VERSION) {
+                                        if (!wxThread::IsMain()) {
+                                                error = true;
+                                                LOG_ERROR("HistoryController", "Ginkgo BBDD version isn't valid and isn't GUI thread");
+                                        } else {
+                                                //close connection...
+                                                if(m_pConexion!=NULL) {
+                                                        m_pConexion->Close();
+                                                        delete m_pConexion;
+                                                        m_pConexion = NULL;
+                                                }
+                                                GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventHideSplashWindow());
+                                                std::string oldDicomDirPath = GetGinkgoDicomDir();
+                                                GNC::GUI::DicomDirMigrationDialog dlg(GNC::Entorno::Instance()->GetVentanaRaiz(), oldDicomDirPath, version, version < GINKGO_BBDD_VERSION);
+                                                dlg.ShowModal();
+                                                if (dlg.GetStatus() == GNC::GUI::DicomDirMigrationDialog::TS_CloseAll) {
+                                                        error = true;
+                                                } else {
+                                                        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Estacion", "DicomDir",dlg.GetDicomDirPath());
+                                                        ReloadHistory(dlg.GetDicomDirPath(), tryTemp);
+                                                        if (dlg.GetStatus() == GNC::GUI::DicomDirMigrationDialog::TS_Migrate) {
+                                                                ::GADAPI::DBMigrationCommandParams* pParams = new ::GADAPI::DBMigrationCommandParams(dlg.GetOriginalDicomDirPath(), dlg.GetDicomDirPath(), dlg.GetRemoveAfterMigration());
+                                                                ::GADAPI::DBMigrationCommand* pCmd = new ::GADAPI::DBMigrationCommand(pParams);
+                                                                GNC::GCS::ICommandController::Instance()->ProcessAsync("Migrating...", pCmd, NULL);
+                                                        }
+                                                        return;
+                                                }
+                                        }
+                                }
+                        }
+                }
+
+                /*		if (reloadHistory)
+                		{
+
+                			wxMessageBox(_("Version of Ginkgo CADx dicom dir is old, database will be migrated to new version, do not close Ginkgo CADx until migration is finished"), _("Warning"), wxOK|wxICON_WARNING);
+                			m_pConexion->Close();
+                			if (wxCopyFile(FROMPATH(pathFicheroDB), FROMPATH(pathFicheroDB)+wxT(".bkp"),true)) {
+                				if (!wxRemoveFile(FROMPATH(pathFicheroDBThumbnails))) {
+                					LOG_ERROR("BBDD", "Error deleting thumbnails")
+                				}
+                				if (wxRemoveFile(FROMPATH(pathFicheroDB))) {
+                					if(CreateGinkgoDB(*m_pConexion,pathFicheroDB.c_str()) != 0) {
+                						std::string historyPath = GetGinkgoDicomDir();
+                						GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(historyPath, true);
+                						GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+                						GNC::GCS::ICommandController::Instance()->ProcessAsync("Migrating History", pCmd, NULL);
+                					} else {
+                						LOG_ERROR("BBDD", "Error creating ginkgo BBDD")
+                					}
+                				} else {
+                					LOG_FATAL("BBDD", "Error copying database file "<<pathFicheroDB)
+                				}
+                			} else {
+                				LOG_FATAL("BBDD", "Error copying database file "<<pathFicheroDB)
+                			}
+                		}*/
+
+                //existe el d los thumbnails??
+                if(!wxFileExists(FROMPATH(pathFicheroDBThumbnails))) {
+                        //se crea el fichero de base de datos
+                        if(CreateGinkgoDBThumbnails(*m_pConexionThumbnails,pathFicheroDBThumbnails.c_str()) == 0) {
+                                LOG_ERROR(LOGGER, _Std("Error creating thumbnails database ") << pathFicheroDBThumbnails);
+                                {
+                                        std::ostringstream ostr2;
+                                        ostr2 << GNC::Entorno::Instance()->GetGinkgoTempDir() << (char)wxFileName::GetPathSeparator(wxPATH_NATIVE) << "ginkgothumbnails.db"<<std::ends;
+                                        pathFicheroDBThumbnails = ostr2.str();
+                                }
+                                if(CreateGinkgoDBThumbnails(*m_pConexionThumbnails,pathFicheroDBThumbnails.c_str()) == 0) {
+                                        LOG_FATAL(LOGGER, "Fatal error creating thumbnails in temp dir " << pathFicheroDB);
+                                        error = true;
+                                }
+                        }
+                }
+
+                if(!m_pConexionThumbnails->IsOpen()) {
+                        if( !AbrirConexion(*m_pConexionThumbnails,pathFicheroDBThumbnails.c_str()) ) {
+                                LOG_ERROR(LOGGER, _Std("Error creating thumbnails database ") << pathFicheroDB);
+                                error = true;
+                        }
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "Error al crear el la bbdd " << ex.GetMessage().ToUTF8())
+                wxMessageBox(_("Error creating database:\n")+ex.GetMessage(), _("Info"),
+                             wxOK | wxICON_WARNING);
+        }
+        if (error) {
+                if(m_pConexion!=NULL) {
+                        m_pConexion->Close();
+                        delete m_pConexion;
+                        m_pConexion = NULL;
+                }
+                if(m_pConexionThumbnails!=NULL) {
+                        m_pConexionThumbnails->Close();
+                        delete m_pConexionThumbnails;
+                        m_pConexionThumbnails = NULL;
+                }
+        }
+}
+
+GNC::GCS::HistoryController::~HistoryController()
+{
+        if(m_pConexion!=NULL) {
+                m_pConexion->Close();
+                delete m_pConexion;
+                m_pConexion = NULL;
+        }
+        if(m_pConexionThumbnails!=NULL) {
+                m_pConexionThumbnails->Close();
+                delete m_pConexionThumbnails;
+                m_pConexionThumbnails = NULL;
+        }
+        if(m_pCriticalSection != NULL) {
+                delete m_pCriticalSection;
+                m_pCriticalSection = NULL;
+        }
+        if (m_pCriticalSectionThumbnails != NULL) {
+                delete m_pCriticalSectionThumbnails;
+                m_pCriticalSectionThumbnails = NULL;
+        }
+}
+
+bool GNC::GCS::HistoryController::IsOk()
+{
+        return m_pConexionThumbnails != NULL && m_pConexion != NULL;
+}
+
+bool GNC::GCS::HistoryController::IsReadOnly()
+{
+        return m_readOnly;
+}
+
+std::string GNC::GCS::HistoryController::GetGinkgoDicomDir(bool barraAlFinal)
+{
+        if(barraAlFinal) {
+                std::ostringstream out;
+                out << m_GinkgoDicomDir << (char) wxFileName::GetPathSeparator(wxPATH_NATIVE);
+                return out.str();
+        } else {
+                return m_GinkgoDicomDir;
+        }
+}
+
+std::string GNC::GCS::HistoryController::GetDefaultDicomDirPath(bool ignoreConfig)
+{
+        std::string value;
+        std::string path;
+        if(ignoreConfig || !GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Estacion", "DicomDir", value)) {
+                std::ostringstream out;
+                if (GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "anonymous_history")) {
+                        out << GNC::Entorno::Instance()->CreateGinkgoTempDir() << (char) wxFileName::GetPathSeparator(wxPATH_NATIVE) << "DICOMDIR";
+                } else {
+                        out << GNC::Entorno::Instance()->GetGinkgoUserDir() << (char) wxFileName::GetPathSeparator(wxPATH_NATIVE) << "DICOMDIR";
+                }
+                path = out.str();
+        } else {
+                path = value;
+        }
+        return path;
+}
+
+GNC::GCS::HistoryController* GNC::GCS::HistoryController::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new GNC::GCS::HistoryController();
+        }
+        return m_pInstance;
+}
+
+void GNC::GCS::HistoryController::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+//region "metodos propios del historial"
+bool GNC::GCS::HistoryController::AddFiles(const StringList& listaPaths, TAddErrorList& errorList, std::list<long>* insertedSeries, GNC::IProxyNotificadorProgreso* pNotificador, TAddAction action)
+{
+        if (m_readOnly) {
+                return false;
+        }
+        wxCriticalSectionLocker locker(*m_pCriticalSection);
+        DICOMFileModelList listOfInsertedFiles;
+        try {
+                m_pConexion->Begin();
+
+                std::set<long> seriesPks;
+                std::set<long> studiesPks;
+                int i = 0;
+                for(StringList::const_iterator it=listaPaths.begin(); it!= listaPaths.end(); ++it,++i) {
+                        if(pNotificador != NULL) {
+                                std::ostringstream ostr;
+                                ostr << _Std("Including image ") << (i+1) << _Std(" of ") << listaPaths.size();
+                                if(!pNotificador->NotificarProgreso((float)i/listaPaths.size(),ostr.str())) {
+                                        m_pConexion->Commit();
+                                        return false;
+                                }
+                        }
+
+                        if(!wxFileExists((FROMPATH((*it))))) {
+                                errorList.push_back(TAddError(TAddError::TE_FileNotExist, (*it)));
+                        } else {
+                                try {
+                                        DICOMFileModel fileModel;
+                                        if (!ReadFile(fileModel,(*it), errorList, action)) {
+                                                continue;
+                                        }
+
+                                        FindOrInsertStudy(fileModel);
+                                        studiesPks.insert(fileModel.study.pk);
+                                        FindOrInsertSeries(fileModel);
+                                        seriesPks.insert(fileModel.series.pk);
+
+                                        if (insertedSeries != NULL) {
+                                                insertedSeries->push_back(fileModel.series.pk);
+                                        }
+
+                                        if (action == TAA_LINK) {
+                                                fileModel.file.file_path = GetRelativePath((*it));
+                                        }
+                                        if (!FindOrInsertFile(fileModel)) {
+                                                if (action == TAA_COPY || action == TAA_MOVE) {
+                                                        fileModel.file.real_path = GetPathOfFile(fileModel.file.location, fileModel.file.pk, fileModel.file.file_path);
+                                                        wxString pathDicom = FROMPATH(fileModel.file.real_path);
+
+                                                        if(wxCopyFile(FROMPATH((*it)),pathDicom)) {
+                                                                int success;
+#ifdef _WIN32
+                                                                success = _chmod(TOPATH(pathDicom).c_str(), _S_IWRITE);
+#else
+                                                                success = chmod(TOPATH(pathDicom).c_str(), 0644);
+#endif
+                                                                if (success < 0) {
+                                                                        LOG_ERROR("Historial", "Error changing permissions on :"
+                                                                                  << TOPATH(pathDicom).c_str() << "':" << strerror(errno));
+                                                                }
+
+                                                                if(action == TAA_MOVE) {
+                                                                        wxRemoveFile(FROMPATH((*it)));
+                                                                }
+                                                        } else {
+                                                                //no se ha podido copiar
+                                                                LOG_ERROR("Historial", "Error copying file: " << (*it) << " TO "  << pathDicom.ToUTF8());
+                                                                return false;
+                                                        }
+                                                }
+                                        }
+                                        listOfInsertedFiles.push_back(fileModel);
+
+                                } catch (wxSQLite3Exception& ex) {
+                                        LOG_ERROR("BBDD", "Exception adding file "<<ex.GetMessage().ToUTF8())
+                                        m_pConexion->Rollback();
+                                        errorList.push_back(TAddError(TAddError::TE_WrongFormat, std::string(ex.GetMessage().ToUTF8())));
+                                        return false;
+                                }
+                        }
+                }//for paths...
+
+                //update series and study summary info (modalities in study, number of instances...)
+                for (std::set<long>::iterator it = seriesPks.begin(); it != seriesPks.end(); ++it) {
+                        UpdateSeriesSummaryInfo((*it));
+                }
+                for (std::set<long>::iterator it = studiesPks.begin(); it != studiesPks.end(); ++it) {
+                        UpdateStudySummaryInfo((*it));
+                }
+
+                m_pConexion->Commit();
+                return true;
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "Error al anadir el fichero a la base de datos "<<ex.GetMessage().ToUTF8())
+                errorList.push_back(TAddError(TAddError::TE_WrongFormat, std::string(ex.GetMessage().ToUTF8())));
+                m_pConexion->Rollback();
+                return false;
+        }
+}
+
+bool GNC::GCS::HistoryController::UpdateFiles(const GNC::GCS::HistoryController::FileModelList& files)
+{
+        if (m_readOnly) {
+                return false;
+        }
+        wxCriticalSectionLocker locker(*m_pCriticalSection);
+
+        try {
+                m_pConexion->Begin();
+                std::set<long> seriesPks;
+                std::set<long> studiesPks;
+                for (GNC::GCS::HistoryController::FileModelList::const_iterator itFile = files.begin(); itFile != files.end(); ++itFile) {
+                        TAddErrorList errorList;
+                        DICOMFileModel fileModel;
+                        if (!ReadFile(fileModel,(*itFile).real_path,errorList)) {
+                                continue;
+                        }
+                        fileModel.file.pk = (*itFile).pk;
+                        fileModel.series.pk = fileModel.file.series_fk = (*itFile).series_fk;
+                        SeriesModel s = GetSeriesModel((*itFile).series_fk);
+                        fileModel.study.pk = fileModel.series.study_fk = s.study_fk;
+
+                        UpdateStudy(fileModel);
+                        UpdateSeries(fileModel);
+                        UpdateFile(fileModel);
+
+                        seriesPks.insert(fileModel.series.pk);
+                        studiesPks.insert(fileModel.study.pk);
+                }
+                //update series and study summary info (modalities in study, number of instances...)
+                for (std::set<long>::iterator it = seriesPks.begin(); it != seriesPks.end(); ++it) {
+                        UpdateSeriesSummaryInfo((*it));
+                }
+                for (std::set<long>::iterator it = studiesPks.begin(); it != studiesPks.end(); ++it) {
+                        UpdateStudySummaryInfo((*it));
+                }
+
+                m_pConexion->Commit();
+                return true;
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "Error al actualizar el fichero de la base de datos "<<ex.GetMessage().ToUTF8())
+                m_pConexion->Rollback();
+                return false;
+        }
+}
+
+bool GNC::GCS::HistoryController::LinkFilesToSeries(long seriesPk, GNC::GCS::HistoryController::DICOMFileModelList& files, GNC::IProxyNotificadorProgreso* pNotificador )
+{
+        if (m_readOnly) {
+                return false;
+        }
+        wxCriticalSectionLocker locker(*m_pCriticalSection);
+        DICOMFileModelList listOfInsertedFiles;
+        try {
+                m_pConexion->Begin();
+
+                SeriesModel sm = GetSeriesModel(seriesPk);
+
+                int i = 0;
+                for(GNC::GCS::HistoryController::DICOMFileModelList::iterator it=files.begin(); it!= files.end(); ++it, ++i) {
+                        if(pNotificador != NULL) {
+                                std::ostringstream ostr;
+                                ostr << _Std("Linking image ") << (i+1) << _Std(" of ") << files.size();
+                                if(!pNotificador->NotificarProgreso((float)i/files.size(),ostr.str())) {
+                                        m_pConexion->Commit();
+                                        return false;
+                                }
+                        }
+
+                        DICOMFileModel& fileModel = (*it);
+                        fileModel.file.series_fk = seriesPk;
+                        FindOrLink(fileModel);
+                }//for paths...
+
+                //update series and study summary info (modalities in study, number of instances...)
+                UpdateSeriesSummaryInfo(sm.pk);
+
+                UpdateStudySummaryInfo(sm.study_fk);
+
+                m_pConexion->Commit();
+                return true;
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "Error linking file in database controller "<<ex.GetMessage().ToUTF8())
+                m_pConexion->Rollback();
+                return false;
+        }
+}
+
+void GNC::GCS::HistoryController::FindOrInsertStudy(DICOMFileModel& model)
+{
+        std::ostringstream ostrSelect;
+        wxSQLite3StatementBuffer bufSQL;
+        ostrSelect << bufSQL.Format("SELECT pk from Study where pat_id='%q'",model.study.pat_id.c_str());
+        ostrSelect <<  bufSQL.Format(" AND pat_id_issuer='%q'",model.study.pat_id_issuer.c_str());
+        ostrSelect <<  bufSQL.Format(" AND pat_name='%q'",model.study.pat_name.c_str());
+        ostrSelect <<  bufSQL.Format(" AND study_iuid='%q'",model.study.study_iuid.c_str());
+        ostrSelect <<  bufSQL.Format(" AND study_id='%q'",model.study.study_id.c_str());
+        ostrSelect <<  bufSQL.Format(" AND accession_no='%q'",model.study.study_acc_no.c_str());
+        if (model.study.pat_sex == '?') {
+                ostrSelect << bufSQL.Format(" AND ( pat_sex = '?' OR pat_sex IS NULL )", model.study.pat_sex);
+        } else {
+                ostrSelect << bufSQL.Format(" AND pat_sex = '%c'", model.study.pat_sex);
+        }
+        if (model.study.pat_bithdate.empty()) {
+                ostrSelect << " AND pat_birthdate IS NULL";
+        } else {
+                ostrSelect << bufSQL.Format(" AND pat_birthdate = '%q'",model.study.pat_bithdate.c_str());
+        }
+
+        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostrSelect.str().c_str());
+        if (resultados.NextRow()) {
+                model.study.pk = resultados.GetInt(wxT("pk"));
+                model.series.study_fk = model.study.pk;
+        } else {
+                std::ostringstream ostrInsert;
+                ostrInsert << bufSQL.Format("INSERT INTO Study "
+                                            "(pat_id,pat_id_issuer,pat_name,mods_in_study,"
+                                            "study_iuid, study_id, accession_no, ref_physician, study_desc,"
+                                            "cuids_in_study,pat_sex,num_series,"
+                                            "num_instances, created_time, updated_time,pat_birthdate,study_datetime) VALUES ("
+                                            "'%q','%q','%q','%q',"
+                                            "'%q','%q','%q','%q','%q',"
+                                            "'%q','%c',1,1,datetime(),datetime(),",
+                                            model.study.pat_id.c_str(), model.study.pat_id_issuer.c_str(), model.study.pat_name.c_str(),model.series.series_modality.c_str(),
+                                            model.study.study_iuid.c_str(), model.study.study_id.c_str(),model.study.study_acc_no.c_str(), model.study.ref_physician.c_str(), model.study.study_desc.c_str(),
+                                            model.file.sopcuid.c_str(),model.study.pat_sex);
+                if (model.study.pat_bithdate.empty()) {
+                        ostrInsert << "NULL,";
+                } else {
+                        ostrInsert << "'" << model.study.pat_bithdate << "' ,";
+                }
+                if (model.study.study_datetime.empty()) {
+                        ostrInsert << "NULL)";
+                } else {
+                        ostrInsert << "'" << model.study.study_datetime << "' )";
+                }
+                if(m_pConexion->ExecuteUpdate(ostrInsert.str().c_str())>0) {
+                        model.study.pk = (long)m_pConexion->GetLastRowId().GetValue();
+                        model.series.study_fk = model.study.pk;
+                }
+        }
+}
+
+void GNC::GCS::HistoryController::FindOrInsertSeries(DICOMFileModel& model)
+{
+        wxSQLite3StatementBuffer bufSQL;
+        std::stringstream ostrSelect;
+        ostrSelect << bufSQL.Format("Select pk from Series where study_fk='%ld' AND series_iuid='%q' "
+                                    "AND series_no='%q' AND modality='%q' ",
+                                    model.series.study_fk, model.series.series_iuid.c_str(), model.series.series_no.c_str(), model.series.series_modality.c_str(),
+                                    model.series.uid_importer.c_str(), model.series.body_part.c_str(), model.series.laterality.c_str());
+        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostrSelect.str().c_str());
+        if (resultados.NextRow()) {
+                model.series.pk = resultados.GetInt(wxT("pk"));
+                model.file.series_fk = model.series.pk;
+        } else {
+                std::stringstream ostrInsert;
+                ostrInsert << bufSQL.Format("INSERT INTO Series ("
+                                            "study_fk,series_iuid,series_no,modality,"
+                                            "uid_importer, body_part, laterality, series_desc,"
+                                            "institution,station_name,department,perf_physician,"
+                                            "frame_of_reference_uid, tuids_in_series, num_instances, created_time, updated_time,series_datetime) VALUES ("
+                                            "'%ld','%q','%q','%q',"
+                                            "'%q','%q','%q','%q',"
+                                            "'%q','%q','%q','%q',"
+                                            "'%q','%q',1,datetime(),datetime(),",
+                                            model.series.study_fk, model.series.series_iuid.c_str(), model.series.series_no.c_str(), model.series.series_modality.c_str(),
+                                            model.series.uid_importer.c_str(), model.series.body_part.c_str(), model.series.laterality.c_str(), model.series.series_desc.c_str(),
+                                            model.series.institution.c_str(), model.series.station_name.c_str(), model.series.department.c_str(), model.series.perf_physician.c_str(),
+                                            model.series.frame_of_reference.c_str(), model.file.tsuid.c_str());
+                if (model.series.series_datetime.empty()) {
+                        ostrInsert << "NULL)";
+                } else {
+                        ostrInsert << "'" << model.series.series_datetime << "')";
+                }
+                if(m_pConexion->ExecuteUpdate(ostrInsert.str().c_str())>0) {
+                        model.series.pk = (long)m_pConexion->GetLastRowId().GetValue();
+                        model.file.series_fk = model.series.pk;
+                }
+        }
+}
+
+//true if file exists, false if it has been overwritten or if it's new
+bool GNC::GCS::HistoryController::FindOrInsertFile(DICOMFileModel& model)
+{
+        wxSQLite3StatementBuffer bufSQL;
+        std::stringstream ostr;
+        ostr << bufSQL.Format("Select pk, location from File where series_fk='%ld' "
+                              "AND file_sopiuid='%q'",
+                              model.file.series_fk,
+                              model.file.sopiuid.c_str());
+        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostr.str().c_str());
+        TLocation location;
+        long pk = -1;
+        if (resultados.NextRow()) {
+                //file exists...
+                pk = resultados.GetInt(wxT("pk"));
+                location = CharToLocation(*resultados.GetAsString(wxT("location")).ToUTF8());
+        }
+
+        if (pk == -1) {
+                //file doesn't exists so insert it
+                std::stringstream ostrInsert;
+                ostrInsert << bufSQL.Format("INSERT INTO File ("
+                                            "series_fk, file_path, file_sopiuid, file_tsuid,"
+                                            "sopcuid, orientation, image_positionx, image_positiony,"
+                                            "image_positionz, slice_location, slice_thickness, height, width, number_of_frames,"
+                                            "instance_number, file_desc, direction_cosines, spacing, location, created_time, updated_time, content_datetime) VALUES ("
+                                            "'%ld','%q','%q','%q',"
+                                            "'%q','%c','%f','%f',"
+                                            "'%f','%f', '%f', '%d','%d','%d',"
+                                            "'%d', '%q', '%q', '%q', '%c',datetime(),datetime(),",
+                                            model.file.series_fk, model.file.file_path.c_str(), model.file.sopiuid.c_str(), model.file.tsuid.c_str(),
+                                            model.file.sopcuid.c_str(), model.file.orientation, model.file.image_position[0], model.file.image_position[1],
+                                            model.file.image_position[2], model.file.slice_location, model.file.slice_thickness, model.file.height, model.file.width, model.file.number_of_frames,
+                                            model.file.instance_number, model.file.file_desc.c_str(), model.file.direction_cosines.c_str(), model.file.spacing.c_str(), LocationToChar(model.file.location));
+                if (model.file.content_datetime.empty()) {
+                        ostrInsert << "NULL)";
+                } else {
+                        ostrInsert << "'" << model.file.content_datetime << "')";
+                }
+                if(m_pConexion->ExecuteUpdate(ostrInsert.str().c_str())>0) {
+                        model.file.pk = (long)m_pConexion->GetLastRowId().GetValue();
+                }
+                return false;
+        } else if (location != TL_LocalDatabase) {
+                //update file...
+                model.file.pk = pk;
+                UpdateFile(model);
+                return false;
+        } else {
+                //nothing to do file is in local database
+                model.file.pk = pk;
+                return true;
+        }
+}
+
+bool GNC::GCS::HistoryController::FindOrLink(DICOMFileModel& model)
+{
+        wxSQLite3StatementBuffer bufSQL;
+        model.file.location = TL_WadoLinked;
+        std::stringstream ostr;
+        ostr << bufSQL.Format("Select pk, location from File where series_fk='%ld' "
+                              "AND file_sopiuid='%q'",
+                              model.file.series_fk,
+                              model.file.sopiuid.c_str());
+        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostr.str().c_str());
+        if (resultados.NextRow()) {
+                //file exists and is fully local then return true...
+                TLocation location = CharToLocation(*resultados.GetAsString(wxT("location")).ToUTF8());
+                if (location != TL_WadoLinked) {
+                        return true;
+                } else {
+                        model.file.pk = resultados.GetInt(wxT("pk"));
+                        //file is now linked so overwrite it!
+                        std::stringstream ostrUpdate;
+                        wxSQLite3StatementBuffer bufSQL;
+                        ostrUpdate << bufSQL.Format("Update File SET "
+                                                    "series_fk = '%ld',file_sopiuid='%q',file_tsuid = '%q',"
+                                                    "sopcuid = '%q', orientation = '%c', image_positionx = '%f', image_positiony = '%f',"
+                                                    "image_positionz = '%f',slice_location = '%f',height = '%d',width = '%d',number_of_frames='%d',"
+                                                    "instance_number = '%d', file_desc='%q', direction_cosines = '%q', spacing='%q', location='%c', updated_time = datetime(), content_datetime = ",
+                                                    model.file.series_fk, model.file.sopiuid.c_str(), model.file.tsuid.c_str(),
+                                                    model.file.sopcuid.c_str(), model.file.orientation, model.file.image_position[0], model.file.image_position[1],
+                                                    model.file.image_position[2], model.file.slice_location, model.file.height, model.file.width,model.file.number_of_frames,
+                                                    model.file.instance_number, model.file.file_desc.c_str(), model.file.direction_cosines.c_str(), model.file.spacing.c_str(),
+                                                    LocationToChar(model.file.location));
+                        if (model.file.content_datetime.empty()) {
+                                ostrUpdate << "NULL";
+                        } else {
+                                ostrUpdate << "'" << model.file.content_datetime << "'";
+                        }
+                        ostrUpdate << bufSQL.Format(" WHERE File.pk = '%ld'", model.file.pk);
+                        m_pConexion->ExecuteUpdate(ostrUpdate.str().c_str());
+                        return true;
+                }
+        }
+        std::stringstream ostrInsert;
+        ostrInsert << bufSQL.Format("INSERT INTO File ("
+                                    "series_fk, file_path, file_sopiuid, file_tsuid,"
+                                    "sopcuid, orientation, image_positionx, image_positiony,"
+                                    "image_positionz, slice_location, slice_thickness, height, width, number_of_frames,"
+                                    "instance_number, file_desc, direction_cosines, spacing, location, created_time, updated_time, content_datetime) VALUES ("
+                                    "'%ld','%q','%q','%q',"
+                                    "'%q','%c','%f','%f',"
+                                    "'%f','%f', '%f', '%d','%d','%d',"
+                                    "'%d', '%q', '%q', '%q', '%c', datetime(),datetime(),",
+                                    model.file.series_fk, model.file.file_path.c_str(), model.file.sopiuid.c_str(), model.file.tsuid.c_str(),
+                                    model.file.sopcuid.c_str(), model.file.orientation, model.file.image_position[0], model.file.image_position[1],
+                                    model.file.image_position[2], model.file.slice_location, model.file.slice_thickness, model.file.height, model.file.width, model.file.number_of_frames,
+                                    model.file.instance_number, model.file.file_desc.c_str(), model.file.direction_cosines.c_str(), model.file.spacing.c_str(), LocationToChar(model.file.location));
+        if (model.file.content_datetime.empty()) {
+                ostrInsert << "NULL)";
+        } else {
+                ostrInsert << "'" << model.file.content_datetime << "')";
+        }
+        if(m_pConexion->ExecuteUpdate(ostrInsert.str().c_str())>0) {
+                model.file.pk = (long)m_pConexion->GetLastRowId().GetValue();
+        }
+        return false;
+}
+
+void GNC::GCS::HistoryController::UpdateStudy(DICOMFileModel& model)
+{
+        std::stringstream ostrUpdate;
+        wxSQLite3StatementBuffer bufSQL;
+        ostrUpdate << bufSQL.Format("Update Study  SET "
+                                    "pat_id='%q',pat_id_issuer='%q',pat_name='%q',"
+                                    "study_iuid='%q', study_id='%q', accession_no='%q', ref_physician='%q', study_desc='%q',"
+                                    "pat_sex='%c', location='%c', updated_time=datetime(),pat_birthdate=",
+                                    model.study.pat_id.c_str(), model.study.pat_id_issuer.c_str(), model.study.pat_name.c_str(),
+                                    model.study.study_iuid.c_str(), model.study.study_id.c_str(),model.study.study_acc_no.c_str(), model.study.ref_physician.c_str(), model.study.study_desc.c_str(),
+                                    model.study.pat_sex, LocationToChar(model.study.location));
+
+        if (model.study.pat_bithdate.empty()) {
+                ostrUpdate << "NULL";
+        } else {
+                ostrUpdate << "'" << model.study.pat_bithdate << "'";
+        }
+        if (model.study.study_datetime.empty()) {
+                ostrUpdate << ",study_datetime=NULL";
+        } else {
+                ostrUpdate << ",study_datetime= '" << model.study.study_datetime << "'";
+        }
+        ostrUpdate << bufSQL.Format(" WHERE Study.pk = '%ld'", model.study.pk);
+        m_pConexion->ExecuteUpdate(ostrUpdate.str().c_str());
+}
+
+void GNC::GCS::HistoryController::UpdateSeries(GNC::GCS::HistoryController::DICOMFileModel& model)
+{
+        std::stringstream ostrUpdate;
+        wxSQLite3StatementBuffer bufSQL;
+        ostrUpdate << bufSQL.Format("Update Series SET "
+                                    "study_fk = '%ld', series_iuid='%q',series_no='%q',modality='%q',"
+                                    "uid_importer='%q', body_part='%q', laterality='%q', series_desc='%q',"
+                                    "institution='%q',station_name='%q',department='%q',perf_physician='%q',"
+                                    "frame_of_reference_uid='%q', location='%c', updated_time = datetime(),series_datetime=",
+                                    model.series.study_fk, model.series.series_iuid.c_str(), model.series.series_no.c_str(), model.series.series_modality.c_str(),
+                                    model.series.uid_importer.c_str(), model.series.body_part.c_str(), model.series.laterality.c_str(), model.series.series_desc.c_str(),
+                                    model.series.institution.c_str(), model.series.station_name.c_str(), model.series.department.c_str(), model.series.perf_physician.c_str(),
+                                    model.series.frame_of_reference.c_str(), LocationToChar(model.series.location));
+        if (model.series.series_datetime.empty()) {
+                ostrUpdate << "NULL";
+        } else {
+                ostrUpdate << "'" << model.series.series_datetime << "'";
+        }
+        ostrUpdate << bufSQL.Format(" WHERE Series.pk = '%ld'", model.series.pk);
+        m_pConexion->ExecuteUpdate(ostrUpdate.str().c_str());
+}
+
+void GNC::GCS::HistoryController::UpdateFile(GNC::GCS::HistoryController::DICOMFileModel& model)
+{
+        std::stringstream ostrUpdate;
+        wxSQLite3StatementBuffer bufSQL;
+        ostrUpdate << bufSQL.Format("Update File SET "
+                                    "series_fk = '%ld', file_path = '%q',file_sopiuid='%q',file_tsuid = '%q',"
+                                    "sopcuid = '%q', orientation = '%c', image_positionx = '%f', image_positiony = '%f',"
+                                    "image_positionz = '%f',slice_location = '%f',height = '%d',width = '%d',number_of_frames='%d',"
+                                    "instance_number = '%d', file_desc='%q', direction_cosines = '%q', spacing='%q', slice_thickness='%f', location='%c', updated_time = datetime(), content_datetime = ",
+                                    model.file.series_fk, model.file.file_path.c_str(), model.file.sopiuid.c_str(), model.file.tsuid.c_str(),
+                                    model.file.sopcuid.c_str(), model.file.orientation, model.file.image_position[0], model.file.image_position[1],
+                                    model.file.image_position[2], model.file.slice_location, model.file.height, model.file.width,model.file.number_of_frames,
+                                    model.file.instance_number, model.file.file_desc.c_str(), model.file.direction_cosines.c_str(), model.file.spacing.c_str(),
+                                    model.file.slice_thickness, LocationToChar(model.file.location));
+        if (model.file.content_datetime.empty()) {
+                ostrUpdate << "NULL";
+        } else {
+                ostrUpdate << "'" << model.file.content_datetime << "'";
+        }
+        ostrUpdate << bufSQL.Format(" WHERE File.pk = '%ld'", model.file.pk);
+        m_pConexion->ExecuteUpdate(ostrUpdate.str().c_str());
+}
+
+std::string GNC::GCS::HistoryController::GetPathOfFile(GNC::GCS::IHistoryController::TLocation location, long pk, const std::string& file_path)
+{
+        switch (location) {
+        case TL_LocalDatabase: {
+                wxString pathDicom = FROMPATH(m_GinkgoDicomDir);
+                pathDicom += wxFileName::GetPathSeparator();
+                pathDicom += wxT("DicomDir");
+                wxString rootDir(pathDicom);
+                if (!wxDir::Exists(rootDir)) {
+                        wxFileName::Mkdir(rootDir, 0700);
+                }
+                pathDicom += wxFileName::GetPathSeparator();
+                pathDicom += wxString::Format(wxT("%d"), (int) pk);
+                return std::string(TOPATH(pathDicom));
+        }
+        break;
+        case TL_LocalLinked:
+                return GetAbsolutePath(file_path);
+        case TL_WadoLinked:
+        default:
+                return file_path;
+        }
+}
+
+
+std::string GNC::GCS::HistoryController::GetPathOfFile(long file_pk)
+{
+        wxString pathDicom = FROMPATH(m_GinkgoDicomDir);
+        pathDicom += wxFileName::GetPathSeparator();
+        pathDicom += wxT("DicomDir");
+        wxString rootDir(pathDicom);
+        if (!wxDir::Exists(rootDir)) {
+                wxFileName::Mkdir(rootDir, 0700);
+        }
+        pathDicom += wxFileName::GetPathSeparator();
+        pathDicom += wxString::Format(wxT("%d"), (int) file_pk);
+        return std::string(TOPATH(pathDicom));
+}
+
+std::string GNC::GCS::HistoryController::GetRelativePath(const std::string& absolutePath)
+{
+        wxFileName fileName(FROMPATH(absolutePath));
+        if (fileName.MakeRelativeTo(FROMPATH(GetGinkgoDicomDir()))) {
+                return std::string(TOPATH(fileName.GetFullPath()));
+        } else {
+                return absolutePath;
+        }
+}
+
+std::string GNC::GCS::HistoryController::GetAbsolutePath(const std::string& relativePath)
+{
+        wxFileName fileName(FROMPATH(relativePath));
+        if (fileName.IsRelative() && fileName.MakeAbsolute(FROMPATH(GetGinkgoDicomDir(true)))) {
+                return std::string(TOPATH(fileName.GetFullPath()));
+        } else {
+                return relativePath;
+        }
+}
+
+void GNC::GCS::HistoryController::UpdateSeriesSummaryInfo(long series_pk)
+{
+        wxSQLite3StatementBuffer bufSQL;
+        bufSQL.Format("SELECT File.file_tsuid, count(*) as numberOfFiles "
+                      "FROM File "
+                      "WHERE series_fk = '%d' "
+                      "GROUP BY FILE.file_tsuid", series_pk);
+        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+        std::list<std::string> tSyntaxUIDs;
+        long number_instances = 0;
+        while (resultados.NextRow()) {
+                std::string path(resultados.GetAsString(wxT("file_tsuid")).ToUTF8());
+                if (!path.empty()) {
+                        tSyntaxUIDs.push_back(path);
+                }
+                number_instances += resultados.GetInt64(wxT("numberOfFiles")).GetValue();
+        }
+        //order is W,L,B => if there is a wado is wado and if there is a linked is linked
+        bufSQL.Format("SELECT distinct(location) "
+                      "FROM File "
+                      "WHERE series_fk = '%d' "
+                      "Order by location DESC", series_pk);
+        resultados = m_pConexion->ExecuteQuery(bufSQL);
+        TLocation seriesLocation = TL_LocalDatabase;
+        if (resultados.NextRow()) {
+                seriesLocation = CharToLocation(*resultados.GetAsString(0).ToUTF8());
+        }
+        //
+        bufSQL.Format("Update Series SET num_instances = '%d', tuids_in_series='%q', location='%c' WHERE pk = '%d'",
+                      number_instances, ListToString(tSyntaxUIDs).c_str(), LocationToChar(seriesLocation), series_pk);
+        m_pConexion->ExecuteUpdate(bufSQL);
+}
+
+void GNC::GCS::HistoryController::UpdateStudySummaryInfo(long study_pk)
+{
+        wxSQLite3StatementBuffer bufSQL;
+        bufSQL.Format("SELECT sopcuid, count(*) as numberOfFiles "
+                      "FROM File, Series "
+                      "WHERE File.series_fk = Series.pk AND Series.study_fk = '%d'"
+                      "GROUP BY FILE.sopcuid", study_pk);
+        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+        std::list<std::string> sopclasses;
+        long number_instances = 0;
+        while (resultados.NextRow()) {
+                std::string sop(resultados.GetAsString(wxT("sopcuid")).ToUTF8());
+                if (!sop.empty()) {
+                        sopclasses.push_back(sop);
+                }
+                number_instances += resultados.GetInt64(wxT("numberOfFiles")).GetValue();
+        }
+        bufSQL.Format("SELECT Series.modality, count(*) as numberOfSeries "
+                      "FROM Series "
+                      "WHERE Series.study_fk = '%d' "
+                      "GROUP BY Series.modality", study_pk);
+        resultados = m_pConexion->ExecuteQuery(bufSQL);
+        std::list<std::string> modalities;
+        long number_series = 0;
+        while (resultados.NextRow()) {
+                std::string mod(resultados.GetAsString(wxT("modality")).ToUTF8());
+                modalities.push_back(mod);
+                number_series += resultados.GetInt64(wxT("numberOfSeries")).GetValue();
+        }
+        //order is W,L,B => if there is a wado is wado and if there is a linked is linked
+        bufSQL.Format("SELECT distinct(location) "
+                      "FROM Series "
+                      "WHERE study_fk = '%d' "
+                      "Order by location DESC", study_pk);
+        resultados = m_pConexion->ExecuteQuery(bufSQL);
+        TLocation studyLocation = TL_LocalDatabase;
+        if (resultados.NextRow()) {
+                studyLocation = CharToLocation(*resultados.GetAsString(0).ToUTF8());
+        }
+        //
+        bufSQL.Format("Update Study SET num_instances = '%d', num_series='%d', cuids_in_study='%q', mods_in_study = '%q', location='%c' WHERE pk = '%d'",
+                      number_instances, number_series, ListToString(sopclasses).c_str(), ListToString(modalities).c_str(), LocationToChar(studyLocation), study_pk);
+        m_pConexion->ExecuteUpdate(bufSQL);
+}
+
+inline void FillInSeriesModel(wxSQLite3ResultSet& resultados, GNC::GCS::HistoryController::SeriesModel& seriesModel)
+{
+        if (seriesModel.pk <= 0) {
+                seriesModel.pk = resultados.GetInt64(wxT("pk")).GetValue();
+                seriesModel.study_fk = resultados.GetInt64(wxT("study_fk")).GetValue();
+                seriesModel.series_iuid = resultados.GetAsString(wxT("series_iuid")).ToUTF8();
+                seriesModel.series_datetime = GetDateTimeFromWx(resultados.GetAsString(wxT("series_datetime")));
+                seriesModel.series_no = resultados.GetAsString(wxT("series_no")).ToUTF8();
+                seriesModel.series_modality = resultados.GetAsString(wxT("modality")).ToUTF8();
+                seriesModel.uid_importer = resultados.GetAsString(wxT("uid_importer")).ToUTF8();
+                seriesModel.body_part = resultados.GetAsString(wxT("body_part")).ToUTF8();
+                seriesModel.laterality = resultados.GetAsString(wxT("laterality")).ToUTF8();
+                seriesModel.series_desc = resultados.GetAsString(wxT("series_desc")).ToUTF8();
+                seriesModel.institution = resultados.GetAsString(wxT("institution")).ToUTF8();
+                seriesModel.station_name = resultados.GetAsString(wxT("station_name")).ToUTF8();
+                seriesModel.department = resultados.GetAsString(wxT("department")).ToUTF8();
+                seriesModel.perf_physician = resultados.GetAsString(wxT("perf_physician")).ToUTF8();
+                seriesModel.num_instances = resultados.GetInt(wxT("num_instances"));
+                seriesModel.frame_of_reference = resultados.GetAsString(wxT("frame_of_reference_uid")).ToUTF8();
+                seriesModel.tsuids = StringToList(resultados.GetAsString(wxT("tuids_in_series")));
+                seriesModel.created_time = GetDateTimeFromWx(resultados.GetAsString(wxT("created_time")));
+                seriesModel.updated_time = GetDateTimeFromWx(resultados.GetAsString(wxT("updated_time")));
+                seriesModel.location = GNC::GCS::IHistoryController::CharToLocation(*resultados.GetString(wxT("location")).ToUTF8());
+        }
+}
+
+GNC::GCS::HistoryController::SeriesModel GNC::GCS::HistoryController::GetSeriesModel(long series_pk)
+{
+        SeriesModel seriesModel;
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("SELECT Series.pk, Series.study_fk, Series.series_iuid, Series.series_datetime, Series.series_no,Series.modality,"
+                              "Series.uid_importer, Series.body_part, Series.laterality, Series.series_desc,"
+                              "Series.institution,Series.station_name,Series.department,Series.perf_physician,"
+                              "Series.num_instances, Series.frame_of_reference_uid, Series.tuids_in_series, Series.created_time, Series.updated_time, Series.location "
+                              "FROM Series "
+                              "WHERE pk = '%ld'", series_pk);
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                while (resultados.NextRow()) {
+                        FillInSeriesModel(resultados, seriesModel);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "SeriesModel "<<ex.GetMessage().ToUTF8());
+                seriesModel.pk = series_pk;
+        }
+        return seriesModel;
+}
+
+void GNC::GCS::HistoryController::GetDatabaseDatasetFromSeries(long series_pk, GIL::DICOM::DicomDataset& dataset)
+{
+        GNC::GCS::HistoryController::SeriesModel seriesModel = GetSeriesModel(series_pk);
+        dataset.tags[GKDCM_SeriesInstanceUID] = seriesModel.series_iuid;
+        dataset.tags[GKDCM_SeriesNumber] = seriesModel.series_no;
+        dataset.tags[GKDCM_Modality] = seriesModel.series_modality;
+        dataset.tags[GKDCM_BodyPartExamined] = seriesModel.body_part;
+        dataset.tags[GKDCM_Laterality] = seriesModel.laterality;
+        dataset.tags[GKDCM_InstitutionName] = seriesModel.institution;
+        dataset.tags[GKDCM_StationName] = seriesModel.station_name;
+        dataset.tags[GKDCM_InstitutionalDepartmentName] = seriesModel.department;
+        dataset.tags[GKDCM_PerformingPhysicianName] = seriesModel.perf_physician;
+        dataset.tags[GKDCM_ProtocolName] = seriesModel.uid_importer;
+        dataset.tags[GKDCM_FrameOfReferenceUID] = seriesModel.frame_of_reference;
+        dataset.tags[GKDCM_SeriesDescription] = seriesModel.series_desc;
+}
+
+
+void GNC::GCS::HistoryController::GetSeriesModelFromUIDs(const GNC::GCS::HistoryController::StringList& uids, GNC::GCS::HistoryController::SeriesModelList& series)
+{
+        if (uids.empty()) {
+                return;
+        }
+
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                std::ostringstream ostr;
+                ostr << bufSQL.Format("SELECT Series.pk, Series.study_fk, Series.series_iuid, Series.series_datetime, Series.series_no,Series.modality,"
+                                      "Series.uid_importer, Series.body_part, Series.laterality, Series.series_desc,"
+                                      "Series.institution,Series.station_name,Series.department,Series.perf_physician,"
+                                      "Series.num_instances, Series.frame_of_reference_uid, Series.tuids_in_series, Series.location, Series.created_time, Series.updated_time "
+                                      "FROM Series "
+                                      "WHERE series_iuid IN (");
+                for (GNC::GCS::HistoryController::StringList::const_iterator itUid = uids.begin(); itUid != uids.end(); ++itUid) {
+                        if (itUid != uids.begin()) {
+                                ostr << ",";
+                        }
+                        ostr << bufSQL.Format("'%q'",(*itUid).c_str());
+                }
+                ostr << ")";
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostr.str().c_str());
+                std::map<long, SeriesModel> mapOfSeries;
+                while (resultados.NextRow()) {
+                        long pk = resultados.GetInt64(wxT("pk")).GetValue();
+                        FillInSeriesModel(resultados, mapOfSeries[pk]);
+                }
+                for (std::map<long, SeriesModel>::const_iterator it = mapOfSeries.begin(); it != mapOfSeries.end(); ++it) {
+                        series.push_back((*it).second);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "SeriesModel "<<ex.GetMessage().ToUTF8());
+        }
+}
+
+void GNC::GCS::HistoryController::GetSeriesModelFromUID(const std::string& uids, GNC::GCS::HistoryController::SeriesModelList& series)
+{
+        StringList list;
+        list.push_back(uids);
+        GetSeriesModelFromUIDs(list, series);
+        return;
+}
+
+void GNC::GCS::HistoryController::GetSeriesFromStudy(long study_pk, GNC::GCS::HistoryController::SeriesModelList& listOfSeries)
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("SELECT Series.pk, Series.study_fk, Series.series_iuid, Series.series_datetime, Series.series_no,Series.modality,"
+                              "Series.uid_importer, Series.body_part, Series.laterality, Series.series_desc,"
+                              "Series.institution,Series.station_name,Series.department,Series.perf_physician,"
+                              "Series.num_instances, Series.frame_of_reference_uid, Series.location, Series.tuids_in_series, Series.created_time, Series.updated_time "
+                              "FROM Series "
+                              "WHERE study_fk = '%d'",study_pk);
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                std::map<long, SeriesModel> mapOfSeries;
+                while (resultados.NextRow()) {
+                        long pk = resultados.GetInt64(wxT("pk")).GetValue();
+                        FillInSeriesModel(resultados, mapOfSeries[pk]);
+                }
+                for (std::map<long, SeriesModel>::const_iterator it = mapOfSeries.begin(); it != mapOfSeries.end(); ++it) {
+                        listOfSeries.push_back((*it).second);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "SeriesModel "<<ex.GetMessage().ToUTF8());
+        }
+}
+
+inline void FillInStudyModel(wxSQLite3ResultSet& resultados, GNC::GCS::HistoryController::StudyModel& studyModel)
+{
+        studyModel.pk = resultados.GetInt64(wxT("pk")).GetValue();
+        studyModel.pat_id = resultados.GetAsString(wxT("pat_id")).ToUTF8();
+        studyModel.pat_id_issuer = resultados.GetAsString(wxT("pat_id_issuer")).ToUTF8();
+        studyModel.pat_name = resultados.GetAsString(wxT("pat_name")).ToUTF8();
+        studyModel.pat_bithdate = GetDateTimeFromWx(resultados.GetAsString(wxT("pat_birthdate")));
+        studyModel.pat_sex = resultados.GetAsString(wxT("pat_sex")).GetChar(0);
+        studyModel.study_iuid = resultados.GetAsString(wxT("study_iuid")).ToUTF8();
+        studyModel.study_id = resultados.GetAsString(wxT("study_id")).ToUTF8();
+        studyModel.study_datetime = GetDateTimeFromWx(resultados.GetAsString(wxT("study_datetime")));
+        wxString tmp = resultados.GetAsString(wxT("study_datetime"));
+        studyModel.study_acc_no = resultados.GetAsString(wxT("accession_no")).ToUTF8();
+        studyModel.ref_physician = resultados.GetAsString(wxT("ref_physician")).ToUTF8();
+        studyModel.study_desc = resultados.GetAsString(wxT("study_desc")).ToUTF8();
+        studyModel.mods_in_study = StringToList(resultados.GetAsString(wxT("mods_in_study")));
+        studyModel.cuids_in_study = StringToList(resultados.GetAsString(wxT("cuids_in_study")));
+        studyModel.num_series = resultados.GetInt64(wxT("num_series")).GetValue();
+        studyModel.num_instances = resultados.GetInt64(wxT("num_instances")).GetValue();
+        studyModel.created_time = GetDateTimeFromWx(resultados.GetAsString(wxT("created_time")));
+        studyModel.updated_time = GetDateTimeFromWx(resultados.GetAsString(wxT("updated_time")));
+        studyModel.location = GNC::GCS::IHistoryController::CharToLocation(*resultados.GetString(wxT("location")).ToUTF8());
+}
+
+GNC::GCS::HistoryController::StudyModel GNC::GCS::HistoryController::GetStudyModel(long study_pk)
+{
+        StudyModel studyModel;
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("SELECT Study.pk, Study.pat_id, Study.pat_id_issuer, Study.pat_name, Study.pat_birthdate,Study.pat_sex,"
+                              "Study.study_iuid, Study.study_id, Study.study_datetime, Study.accession_no,"
+                              "Study.ref_physician,Study.study_desc,Study.mods_in_study,Study.cuids_in_study,"
+                              "Study.num_series, Study.num_instances, Study.location, Study.created_time, Study.updated_time "
+                              "FROM Study "
+                              "WHERE pk = '%ld'",study_pk);
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                if (resultados.NextRow()) {
+                        FillInStudyModel(resultados, studyModel);
+                }
+                studyModel.pk = study_pk;
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "StudyModel "<<ex.GetMessage().ToUTF8());
+        }
+        return studyModel;
+}
+
+
+void GNC::GCS::HistoryController::GetStudyModelFromUID(const std::string& uid, GNC::GCS::HistoryController::StudyModelList& studies)
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("SELECT Study.pk, Study.pat_id, Study.pat_id_issuer, Study.pat_name, Study.pat_birthdate,Study.pat_sex,"
+                              "Study.study_iuid, Study.study_id, Study.study_datetime, Study.accession_no,"
+                              "Study.ref_physician,Study.study_desc,Study.mods_in_study,Study.cuids_in_study,"
+                              "Study.num_series, Study.num_instances, Study.location, Study.created_time, Study.updated_time "
+                              "FROM Study "
+                              "WHERE study_iuid = '%q'", uid.c_str());
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                std::map<long, StudyModel> mapOfStudies;
+                while (resultados.NextRow()) {
+                        long pk = resultados.GetInt64(wxT("pk")).GetValue();
+                        FillInStudyModel(resultados, mapOfStudies[pk]);
+                }
+                for (std::map<long, StudyModel>::const_iterator it = mapOfStudies.begin(); it != mapOfStudies.end(); ++it) {
+                        studies.push_back((*it).second);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "SeriesModel "<<ex.GetMessage().ToUTF8());
+        }
+}
+
+void GNC::GCS::HistoryController::GetDatabaseDatasetFromStudy(long study_pk, GIL::DICOM::DicomDataset& dataset)
+{
+        GNC::GCS::HistoryController::StudyModel studyModel = GetStudyModel(study_pk);
+        dataset.tags[GKDCM_PatientID] = studyModel.pat_id;
+        dataset.tags[GKDCM_IssuerOfPatientID] = studyModel.pat_id_issuer;
+        dataset.tags[GKDCM_PatientBirthDate] = studyModel.pat_bithdate;
+        dataset.tags[GKDCM_PatientSex] = studyModel.pat_sex;
+        dataset.tags[GKDCM_PatientName] = studyModel.pat_name;
+        dataset.tags[GKDCM_StudyInstanceUID] = studyModel.study_iuid;
+        dataset.tags[GKDCM_StudyID] = studyModel.study_id;
+        dataset.tags[GKDCM_AccessionNumber] = studyModel.study_acc_no;
+        dataset.tags[GKDCM_ReferringPhysicianName] = studyModel.ref_physician;
+        dataset.tags[GKDCM_StudyDescription] = studyModel.study_desc;
+        std::ostringstream ostr;
+        for (std::list<std::string>::const_iterator it = studyModel.mods_in_study.begin(); it != studyModel.mods_in_study.end(); ++it) {
+                if (it != studyModel.mods_in_study.begin()) {
+                        ostr << "/";
+                }
+                ostr << (*it);
+        }
+        dataset.tags[GKDCM_ModalitiesInStudy] = ostr.str();
+}
+
+void GNC::GCS::HistoryController::GetStudies(GNC::GCS::History::IHistoryFilter* historyFilter, StudyModelList& listOfStudies)
+{
+        std::list<GNC::GCS::History::IHistoryFilter*> filterList;
+        if (historyFilter != NULL) {
+                filterList.push_back(historyFilter);
+        }
+        GetStudies(filterList,listOfStudies);
+}
+
+void GNC::GCS::HistoryController::GetStudies(std::list<GNC::GCS::History::IHistoryFilter*>& historyFilter, StudyModelList& listOfStudies)
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                std::ostringstream ostr;
+                ostr << bufSQL.Format("SELECT Study.pk, Study.pat_id, Study.pat_id_issuer, Study.pat_name, Study.pat_birthdate,Study.pat_sex,"
+                                      "Study.study_iuid, Study.study_id, Study.study_datetime, Study.accession_no,"
+                                      "Study.ref_physician,Study.study_desc,Study.mods_in_study,Study.cuids_in_study,"
+                                      "Study.num_series, Study.num_instances, Study.location, Study.created_time, Study.updated_time "
+                                      "FROM Study ");
+                bool first = true;
+                for (std::list<GNC::GCS::History::IHistoryFilter*>::iterator it = historyFilter.begin(); it != historyFilter.end(); ++it) {
+                        if ((*it)->IsEnabled()) {
+                                std::string str = (*it)->GetSQLFilter();
+                                if (!str.empty()) {
+                                        if (!first) {
+                                                ostr << " AND ";
+                                        } else {
+                                                ostr << "WHERE ";
+                                                first = false;
+                                        }
+                                        ostr << str;
+                                }
+                        }
+                }
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostr.str().c_str());
+                while (resultados.NextRow()) {
+                        StudyModel studyModel;
+                        FillInStudyModel(resultados, studyModel);
+                        listOfStudies.push_back(studyModel);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "StudyModel "<<ex.GetMessage().ToUTF8());
+        }
+}
+
+
+inline void FillInFileModel(wxSQLite3ResultSet& resultados, GNC::GCS::HistoryController::FileModel& fileModel)
+{
+        fileModel.pk = resultados.GetInt64(wxT("pk")).GetValue();
+        fileModel.series_fk = resultados.GetInt64(wxT("series_fk")).GetValue();
+        {
+                int columnIndex = resultados.FindColumnIndex(wxT("file_path"));
+                const char* filePath = (const char*) sqlite3_column_text((sqlite3_stmt*) resultados.GetStmt(), columnIndex);
+                fileModel.file_path = std::string(filePath);
+        }
+        fileModel.sopiuid = resultados.GetAsString(wxT("file_sopiuid")).ToUTF8();
+        fileModel.tsuid = resultados.GetAsString(wxT("file_tsuid")).ToUTF8();
+        fileModel.content_datetime = GetDateTimeFromWx(resultados.GetAsString(wxT("content_datetime")));
+        fileModel.sopcuid = resultados.GetAsString(wxT("sopcuid")).ToUTF8();
+        fileModel.orientation = resultados.GetAsString(wxT("orientation")).GetChar(0);
+        fileModel.image_position[0] = resultados.GetDouble(wxT("image_positionx"));
+        fileModel.image_position[1] = resultados.GetDouble(wxT("image_positiony"));
+        fileModel.image_position[2] = resultados.GetDouble(wxT("image_positionz"));
+        fileModel.slice_location = resultados.GetDouble(wxT("slice_location"));
+        fileModel.slice_thickness = resultados.GetDouble(wxT("slice_thickness"));
+        fileModel.height = resultados.GetInt(wxT("height"));
+        fileModel.width = resultados.GetInt(wxT("width"));
+        fileModel.number_of_frames = resultados.GetInt(wxT("number_of_frames"));
+        fileModel.instance_number = resultados.GetInt(wxT("instance_number"));
+        fileModel.file_desc = resultados.GetAsString(wxT("file_desc")).ToUTF8();
+        fileModel.direction_cosines = resultados.GetAsString(wxT("direction_cosines")).ToUTF8();
+        fileModel.spacing = resultados.GetAsString(wxT("spacing")).ToUTF8();
+        fileModel.created_time = GetDateTimeFromWx(resultados.GetAsString(wxT("created_time")));
+        fileModel.updated_time = GetDateTimeFromWx(resultados.GetAsString(wxT("updated_time")));
+        fileModel.location = GNC::GCS::IHistoryController::CharToLocation(*resultados.GetString(wxT("location")).ToUTF8());
+}
+
+GNC::GCS::HistoryController::FileModel GNC::GCS::HistoryController::GetFrameOfReference(const std::string& series_pk)
+{
+        std::istringstream istr(series_pk);
+        long pk;
+        istr >> pk;
+        return GetFrameOfReference(pk);
+}
+
+GNC::GCS::HistoryController::FileModel GNC::GCS::HistoryController::GetFrameOfReference(long series_pk)
+{
+        FileModel fileModel;
+        wxSQLite3StatementBuffer bufSQL;
+        bufSQL.Format("SELECT File.pk, File.series_fk, File.file_path, File.file_sopiuid, File.file_tsuid, File.content_datetime,"
+                      "File.sopcuid, File.orientation, File.image_positionx, File.image_positiony,"
+                      "File.image_positionz,File.slice_location, File.slice_thickness, File.height,File.width, File.number_of_frames,"
+                      "File.instance_number, File.file_desc, File.direction_cosines, File.spacing, File.location, File.created_time, File.updated_time "
+                      "FROM File, Series "
+                      "WHERE File.series_fk = Series.pk AND File.file_sopiuid=Series.frame_of_reference_uid AND Series.pk='%ld'", series_pk);
+
+        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+        if (resultados.NextRow()) {
+                FillInFileModel(resultados, fileModel);
+                fileModel.real_path = GetPathOfFile(fileModel.location, fileModel.pk, fileModel.file_path);
+        } else {
+                FileModelList listOfFiles;
+                GetSeriesSortedFileModels(series_pk, listOfFiles, true);
+                if (!listOfFiles.empty()) {
+                        return listOfFiles.front();
+                }
+        }
+
+        return fileModel;
+}
+
+GNC::GCS::HistoryController::FileModel GNC::GCS::HistoryController::GetFileModel(long file_pk)
+{
+        FileModel fileModel;
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("SELECT File.pk, File.series_fk, File.file_path, File.file_sopiuid, File.file_tsuid, File.content_datetime,"
+                              "File.sopcuid, File.orientation, File.image_positionx, File.image_positiony,"
+                              "File.image_positionz,File.slice_location, File.slice_thickness, File.height,File.width, File.number_of_frames,"
+                              "File.instance_number, File.file_desc, File.direction_cosines, File.spacing, File.location, File.created_time, File.updated_time "
+                              "FROM File "
+                              "WHERE pk = '%ld'", file_pk);
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                if (resultados.NextRow()) {
+                        FillInFileModel(resultados, fileModel);
+                        fileModel.real_path = GetPathOfFile(fileModel.location, fileModel.pk, fileModel.file_path);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "FileModel "<<ex.GetMessage().ToUTF8());
+        }
+        return fileModel;
+}
+
+GNC::GCS::HistoryController::FileModel GNC::GCS::HistoryController::GetFileModelFromSopInstance(const std::string& sopInstanceUID, long study_pk)
+{
+        FileModel fileModel;
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                if (study_pk == -1) {
+                        bufSQL.Format("SELECT File.pk, File.series_fk, File.file_path, File.file_sopiuid, File.file_tsuid, File.content_datetime,"
+                                      "File.sopcuid, File.orientation, File.image_positionx, File.image_positiony,"
+                                      "File.image_positionz,File.slice_location, File.slice_thickness, File.height,File.width, File.number_of_frames,"
+                                      "File.instance_number, File.file_desc, File.direction_cosines, File.spacing, File.location, File.created_time, File.updated_time "
+                                      "FROM File "
+                                      "WHERE File.file_sopiuid = '%q'", sopInstanceUID.c_str());
+                } else {
+                        bufSQL.Format("SELECT File.pk, File.series_fk, File.file_path, File.file_sopiuid, File.file_tsuid, File.content_datetime,"
+                                      "File.sopcuid, File.orientation, File.image_positionx, File.image_positiony,"
+                                      "File.image_positionz,File.slice_location, File.slice_thickness, File.height,File.width, File.number_of_frames,"
+                                      "File.instance_number, File.file_desc, File.direction_cosines, File.spacing, File.location, File.created_time, File.updated_time "
+                                      "FROM File, Series "
+                                      "WHERE File.file_sopiuid = '%q' AND File.series_fk= Series.pk AND series.study_fk='%ld'", sopInstanceUID.c_str(), study_pk);
+                }
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                if (resultados.NextRow()) {
+                        FillInFileModel(resultados, fileModel);
+                        fileModel.real_path = GetPathOfFile(fileModel.location, fileModel.pk, fileModel.file_path);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "FileModel "<<ex.GetMessage().ToUTF8());
+        }
+        return fileModel;
+}
+
+void GNC::GCS::HistoryController::GetAllPatients(GNC::GCS::HistoryController::PatientModelList& patientList)
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("SELECT DISTINCT pat_id, pat_id_issuer, pat_name, pat_birthdate,pat_sex "
+                              "FROM Study");
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                while (resultados.NextRow()) {
+                        PatientModel patient;
+                        patient.id = resultados.GetAsString(wxT("pat_id")).ToUTF8();
+                        patient.id_issuer = resultados.GetAsString(wxT("pat_id_issuer")).ToUTF8();
+                        patient.name = resultados.GetAsString(wxT("pat_name")).ToUTF8();
+                        patient.bithdate = GetDateTimeFromWx(resultados.GetAsString(wxT("pat_birthdate")));
+                        patient.sex = resultados.GetAsString(wxT("pat_sex")).GetChar(0);
+                        patientList.push_back(patient);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "StudyModel "<<ex.GetMessage().ToUTF8());
+        }
+}
+
+bool GNC::GCS::HistoryController::ExistsSeriesWithUID(const std::string& seriesUID)
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("Select count(*) from Series where series_iuid = '%q'",seriesUID.c_str());
+                if(m_pConexion->ExecuteScalar(bufSQL)>0) {
+                        return true;
+                } else {
+                        return false;
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "ExistsSeriesByUID "<<ex.GetMessage().ToUTF8())
+                return false;
+        }
+}
+
+bool GNC::GCS::HistoryController::ExistsStudyWithUID(const std::string& studyUID)
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("Select count(*) from Study where study_iuid = '%q'",studyUID.c_str());
+                if(m_pConexion->ExecuteScalar(bufSQL)>0) {
+                        return true;
+                } else {
+                        return false;
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "ExistsStudyWithUID "<<ex.GetMessage().ToUTF8())
+                return false;
+        }
+}
+
+inline std::string GetFileOrderBySentence(char orientacion)
+{
+        std::ostringstream ostr;
+        ostr << "ORDER BY ";
+        ostr << "File.instance_number ASC, File.content_datetime ASC";
+        switch (orientacion) {
+        case 'A': {
+                ostr << ", File.image_positionz ASC";
+        }
+        break;
+        case 'C': {
+                ostr << ", File.image_positiony ASC";
+        }
+        break;
+        case 'S': {
+                ostr << ", File.image_positionx ASC";
+        }
+        break;
+        case 'O': {
+                ostr << ", File.slice_location ASC";
+        }
+        break;
+        default:
+                ostr << ", File.slice_location ASC";
+                break;
+        }
+        return ostr.str();
+}
+
+int GNC::GCS::HistoryController::GetNumberOfFiles()
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("SELECT count(*)"
+                              "FROM File");
+                return m_pConexion->ExecuteScalar(bufSQL);
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "GetNumberOfFiles "<<ex.GetMessage().ToUTF8())
+        }
+        return 0;
+}
+
+void GNC::GCS::HistoryController::GetSeriesSortedFileModels(long series_pk, GNC::GCS::HistoryController::FileModelList& fileList, bool onlyFirst)
+{
+        try {
+                std::ostringstream sentencia;
+                wxSQLite3StatementBuffer bufSQL;
+                sentencia << bufSQL.Format("SELECT File.pk, File.series_fk, File.file_path, File.file_sopiuid, File.file_tsuid, File.content_datetime,"
+                                           "File.sopcuid, File.orientation, File.image_positionx, File.image_positiony,"
+                                           "File.image_positionz,File.slice_location, File.slice_thickness, File.height,File.width, File.number_of_frames,"
+                                           "File.instance_number, File.file_desc, File.direction_cosines, File.spacing, File.location, File.created_time, File.updated_time "
+                                           "FROM File WHERE "
+                                           "File.series_fk='%ld' "
+                                           ,series_pk);
+                sentencia << GetFileOrderBySentence(GetSeriesOrientation(series_pk));
+
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(sentencia.str().c_str());
+                while (resultados.NextRow()) {
+                        FileModel fileModel;
+                        FillInFileModel(resultados, fileModel);
+                        fileModel.real_path = GetPathOfFile(fileModel.location, fileModel.pk, fileModel.file_path);
+                        fileList.push_back(fileModel);
+                        if (onlyFirst) {
+                                return;
+                        }
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "GetPathsSerieOrdenados "<<ex.GetMessage().ToUTF8())
+                wxMessageBox(_("Error reading history: \n")+ex.GetMessage(), _("Info"),
+                             wxOK | wxICON_WARNING);
+        }
+}
+
+
+inline void FillInLightFileModel(wxSQLite3ResultSet& resultados, GNC::GCS::HistoryController::LightFileModel& fileModel)
+{
+        fileModel.pk = resultados.GetInt64(wxT("pk")).GetValue();
+        fileModel.series_fk = resultados.GetInt64(wxT("series_fk")).GetValue();
+        {
+                int columnIndex = resultados.FindColumnIndex(wxT("file_path"));
+                const char* filePath = (const char*) sqlite3_column_text((sqlite3_stmt*) resultados.GetStmt(), columnIndex);
+                fileModel.file_path = std::string(filePath);
+        }
+        fileModel.sopiuid = resultados.GetAsString(wxT("file_sopiuid")).ToUTF8();
+        fileModel.tsuid = resultados.GetAsString(wxT("file_tsuid")).ToUTF8();
+        fileModel.sopcuid = resultados.GetAsString(wxT("sopcuid")).ToUTF8();
+        fileModel.location = GNC::GCS::IHistoryController::CharToLocation(*resultados.GetString(wxT("location")).ToUTF8());
+}
+
+
+void GNC::GCS::HistoryController::GetSeriesSortedFileModels(long series_pk, GNC::GCS::HistoryController::LightFileModelList& fileList, bool onlyFirst)
+{
+        try {
+                std::ostringstream sentencia;
+                wxSQLite3StatementBuffer bufSQL;
+                sentencia << bufSQL.Format("SELECT File.pk, File.series_fk, File.file_path, File.file_sopiuid, File.file_tsuid, File.sopcuid, File.location "
+                                           "FROM File WHERE "
+                                           "File.series_fk='%ld' "
+                                           ,series_pk);
+                sentencia << GetFileOrderBySentence(GetSeriesOrientation(series_pk));
+
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(sentencia.str().c_str());
+                while (resultados.NextRow()) {
+                        LightFileModel fileModel;
+                        FillInLightFileModel(resultados, fileModel);
+                        fileModel.real_path = GetPathOfFile(fileModel.location, fileModel.pk, fileModel.file_path);
+                        fileList.push_back(fileModel);
+                        if (onlyFirst) {
+                                return;
+                        }
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "GetPathsSerieOrdenados "<<ex.GetMessage().ToUTF8())
+                wxMessageBox(_("Error reading history: \n")+ex.GetMessage(), _("Info"),
+                             wxOK | wxICON_WARNING);
+        }
+}
+
+GNC::GCS::HistoryController::StringList GNC::GCS::HistoryController::GetSeriesSortedPathsByUID(const std::string& seriesUID)
+{
+        StringList list;
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("Select series_iuid from Series where series_iuid = '%q'",seriesUID.c_str());
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                if (resultados.NextRow()) {
+                        std::string pk(resultados.GetAsString(wxT("series_iuid")).ToUTF8());
+                        list = GetSeriesSortedPaths(pk);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "ExistsSeriesByUID "<<ex.GetMessage().ToUTF8())
+        }
+        return list;
+}
+
+GNC::GCS::HistoryController::StringList GNC::GCS::HistoryController::GetSeriesSortedPaths(const std::string& series_pk)
+{
+        std::istringstream istr(series_pk);
+        long id;
+        istr >> id;
+        return GetSeriesSortedPaths(id);
+}
+
+GNC::GCS::HistoryController::StringList GNC::GCS::HistoryController::GetSeriesSortedPaths(long series_pk)
+{
+        GNC::GCS::HistoryController::StringList result;
+        try {
+                std::ostringstream sentencia;
+                wxSQLite3StatementBuffer bufSQL;
+                sentencia << bufSQL.Format("SELECT pk, file_path  "
+                                           "FROM File WHERE "
+                                           "File.series_fk='%ld' "
+                                           ,series_pk);
+                sentencia << GetFileOrderBySentence(GetSeriesOrientation(series_pk));
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(sentencia.str().c_str());
+                while (resultados.NextRow()) {
+                        std::string filePath(resultados.GetAsString(wxT("file_path")).ToUTF8());
+                        if (filePath.empty()) {
+                                filePath = GetPathOfFile(resultados.GetInt64(wxT("pk")).GetValue());
+                        } else {
+                                filePath = GetAbsolutePath(filePath);
+                        }
+
+                        result.push_back( filePath );
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "GetPathsSerieOrdenados "<<ex.GetMessage().ToUTF8())
+                wxMessageBox(_("Error reading history: \n")+ex.GetMessage(), _("Info"),
+                             wxOK | wxICON_WARNING);
+        }
+        return result;
+}
+
+GNC::GCS::HistoryController::StringList GNC::GCS::HistoryController::GetSeriesSopClasses(long series_pk)
+{
+        GNC::GCS::HistoryController::StringList result;
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("SELECT distinct sopcuid  "
+                              "FROM File WHERE "
+                              "File.series_fk='%ld' "
+                              ,series_pk);
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                while (resultados.NextRow()) {
+                        std::string sopCuid(resultados.GetAsString(wxT("sopcuid")).ToUTF8());
+                        result.push_back( sopCuid );
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "GetSeriesSopClasses "<<ex.GetMessage().ToUTF8())
+                wxMessageBox(_("Error reading history: \n")+ex.GetMessage(), _("Info"),
+                             wxOK | wxICON_WARNING);
+        }
+        return result;
+}
+
+char GNC::GCS::HistoryController::GetSeriesOrientation(long series_pk)
+{
+        char orientacion = '?';
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("SELECT DISTINCT File.orientation "
+                              "FROM File WHERE "
+                              "File.series_fk='%ld'"
+                              ,series_pk);
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                if (resultados.NextRow()) {
+                        std::string tmp (resultados.GetAsString(wxT("orientation")).ToUTF8());
+                        if(tmp.size() == 1) {
+                                orientacion = tmp[0];
+                        }
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "GetPathsSerieOrdenados "<<ex.GetMessage().ToUTF8())
+                wxMessageBox(_("Error reading history: \n")+ex.GetMessage(), _("Info"),
+                             wxOK | wxICON_WARNING);
+        }
+        return orientacion;
+}
+
+
+bool GNC::GCS::HistoryController::DeleteSeriesList(const IdList& pks)
+{
+        bool result = true;
+        if (pks.size() == 0) {
+                return true;
+        }
+        try {
+                std::list<std::string> listOfPaths;
+                std::list<long> listOfThumbnails;
+                wxSQLite3StatementBuffer bufSQL;
+                {
+                        std::ostringstream ostrSelect;
+                        ostrSelect << "SELECT DISTINCT File.pk, File.file_path FROM File "
+                                   "WHERE ";
+
+                        for (IdList::const_iterator it = pks.begin(); it != pks.end(); ++it) {
+                                if (it != pks.begin()) {
+                                        ostrSelect << " OR";
+                                }
+                                ostrSelect << bufSQL.Format(" File.series_fk = '%ld'", (*it));
+                        }
+
+                        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostrSelect.str().c_str());
+                        while (resultados.NextRow()) {
+                                wxString filePath = resultados.GetAsString(wxT("file_path"));
+                                long pk = resultados.GetInt64(wxT("pk")).GetValue();
+                                listOfThumbnails.push_back(pk);
+                                if (filePath.empty()) {
+                                        std::string filePath = GetPathOfFile(pk);
+                                        listOfPaths.push_back(filePath);
+                                }
+                        }
+                }
+                RemoveFilesFromDisk(listOfPaths);
+                DeleteThumbnails(	listOfThumbnails );
+
+                {
+                        std::ostringstream ostrDelete;
+                        ostrDelete << "Delete from Series where ";
+                        for (IdList::const_iterator it = pks.begin(); it != pks.end(); ++it) {
+                                if (it != pks.begin()) {
+                                        ostrDelete << " OR";
+                                }
+                                ostrDelete << bufSQL.Format(" Series.pk = '%ld'", (*it));
+                        }
+                        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostrDelete.str().c_str());
+                }
+
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "EliminarSerie "<<ex.GetMessage().ToUTF8())
+                wxMessageBox(_("Failed to delete the number of database:\n")+ex.GetMessage(), _("Info"),
+                             wxOK | wxICON_WARNING);
+                result = false;
+        }
+        return result;
+}
+
+bool GNC::GCS::HistoryController::DeleteSopInstanceUIDs(const StringList& sopInstanceUIds)
+{
+        bool result = true;
+        if (sopInstanceUIds.size() == 0) {
+                return true;
+        }
+        try {
+                std::list<std::string> listOfPaths;
+                std::list<long> listOfThumbnails;
+                wxSQLite3StatementBuffer bufSQL;
+                {
+                        std::ostringstream ostrSelect;
+                        ostrSelect << "SELECT DISTINCT File.pk, File.file_path FROM File "
+                                   "WHERE ";
+
+                        for (StringList::const_iterator it = sopInstanceUIds.begin(); it != sopInstanceUIds.end(); ++it) {
+                                if (it != sopInstanceUIds.begin()) {
+                                        ostrSelect << " OR";
+                                }
+                                ostrSelect << bufSQL.Format(" File.file_sopiuid = '%q'", (*it).c_str());
+                        }
+
+                        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostrSelect.str().c_str());
+                        while (resultados.NextRow()) {
+                                wxString filePath = resultados.GetAsString(wxT("file_path"));
+                                long pk = resultados.GetInt64(wxT("pk")).GetValue();
+                                listOfThumbnails.push_back(pk);
+                                if (filePath.empty()) {
+                                        std::string filePath = GetPathOfFile(pk);
+                                        listOfPaths.push_back(filePath);
+                                }
+                        }
+                }
+                RemoveFilesFromDisk(listOfPaths);
+                DeleteThumbnails(listOfThumbnails);
+
+                {
+                        std::ostringstream ostrDelete;
+                        ostrDelete << "Delete from File where ";
+                        for (StringList::const_iterator it = sopInstanceUIds.begin(); it != sopInstanceUIds.end(); ++it) {
+                                if (it != sopInstanceUIds.begin()) {
+                                        ostrDelete << " OR";
+                                }
+                                ostrDelete << bufSQL.Format(" File.file_sopiuid = '%q'", (*it).c_str());
+                        }
+                        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostrDelete.str().c_str());
+                }
+
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "DeleteSopInstanceUIDs "<<ex.GetMessage().ToUTF8())
+                wxMessageBox(_("Failed to delete the number of database:\n")+ex.GetMessage(), _("Info"),
+                             wxOK | wxICON_WARNING);
+                result = false;
+        }
+        return result;
+}
+
+bool GNC::GCS::HistoryController::EmptyHistory(bool eliminarDelDisco)
+{
+        wxCriticalSectionLocker locker(*m_pCriticalSection);
+        wxCriticalSectionLocker locker1(*m_pCriticalSectionThumbnails);
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                if(eliminarDelDisco) {
+                        bufSQL.Format("SELECT DISTINCT file_path, pk FROM File");
+                        wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                        std::list<std::string> listaPaths;
+                        while (resultados.NextRow()) {
+                                std::string file_path(TOPATH(resultados.GetAsString(0)));
+                                if (file_path.empty()) {
+                                        long pk = resultados.GetInt64(1).GetValue();
+                                        listaPaths.push_back(GetPathOfFile(pk));
+                                }
+                        }
+                        RemoveFilesFromDisk(listaPaths);
+                }
+                bufSQL.Format("DELETE FROM File");
+                m_pConexion->ExecuteUpdate(bufSQL);
+                bufSQL.Format("DELETE FROM Series");
+                m_pConexion->ExecuteUpdate(bufSQL);
+                bufSQL.Format("DELETE FROM Study");
+                m_pConexion->ExecuteUpdate(bufSQL);
+                bufSQL.Format("DELETE FROM Thumbnails");
+                m_pConexionThumbnails->ExecuteUpdate(bufSQL);
+                return true;
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "VaciarHistorial "<<ex.GetMessage().ToUTF8())
+                wxMessageBox(_("Failed to empty the history:\n")+ex.GetMessage(), _("Info"),
+                             wxOK | wxICON_WARNING);
+                return false;
+        }
+}
+//
+bool GNC::GCS::HistoryController::ReadFile(DICOMFileModel& modelo,const std::string& pathAbsoluto, TAddErrorList& errorList, TAddAction action)
+{
+        switch (action) {
+        case TAA_MOVE:
+        case TAA_COPY:
+                modelo.study.location = modelo.series.location = modelo.file.location = TL_LocalDatabase;
+                break;
+        case TAA_LINK:
+                modelo.study.location = modelo.series.location = modelo.file.location = TL_LocalLinked;
+                break;
+        }
+        return ReadFile(modelo, pathAbsoluto, errorList);
+}
+
+bool GNC::GCS::HistoryController::ReadFile(DICOMFileModel& modeloDCM, const std::string& pathAbsoluto, TAddErrorList& errorList)
+{
+        GIL::DICOM::IDICOMManager*	pDICOMManager= GNC::Entorno::Instance()->GetPACSController()->CrearInstanciaDeDICOMManager();
+        GIL::DICOM::DicomDataset base;
+        if(!pDICOMManager->CargarFichero(pathAbsoluto, base)) {
+                //error en la carga dcmtk no es un dicom
+                GNC::Entorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+                errorList.push_back(TAddError(TAddError::TE_WrongFormat, pathAbsoluto));
+                return false;
+        }
+
+        std::string tag, tag1;
+        //si es dicomdir => return false
+        // Leemos el tag 0004 0x1130 => Si existe es DICOMDIR
+        if (base.getTag(GKDCM_FileSetID, tag)) {
+                errorList.push_back(TAddError(TAddError::TE_DICOMDir, pathAbsoluto));
+                return false;
+        }
+
+        //study
+        if (base.getTag(GKDCM_PatientName, tag)) {
+                modeloDCM.study.pat_name = tag;
+        }
+
+        if (base.getTag(GKDCM_PatientID, tag)) {
+                modeloDCM.study.pat_id = tag;
+        }
+
+        if (base.getTag(GKDCM_IssuerOfPatientID, tag)) {
+                modeloDCM.study.pat_id_issuer = tag;
+        }
+
+        if (base.getTag(GKDCM_PatientBirthDate, tag)) {
+                modeloDCM.study.pat_bithdate = parseDateTime(tag, "");
+        }
+
+        if(base.getTag(GKDCM_PatientSex, tag)) {
+                if(tag.compare("M")==0) {
+                        modeloDCM.study.pat_sex ='M';
+                } else if(tag.compare("F")==0) {
+                        modeloDCM.study.pat_sex ='F';
+                } else if (!tag.empty()) {
+                        modeloDCM.study.pat_sex='O';
+                } else {
+                        modeloDCM.study.pat_sex = '?';
+                }
+        }
+
+        if (base.getTag(GKDCM_StudyInstanceUID, tag)) {
+                modeloDCM.study.study_iuid = tag;
+        }
+
+        if (base.getTag(GKDCM_StudyID, tag)) {
+                modeloDCM.study.study_id = tag;
+        }
+
+        if (base.getTag(GKDCM_StudyDate, tag) && base.getTag(GKDCM_StudyTime, tag1)) {
+                modeloDCM.study.study_datetime = parseDateTime(tag, tag1);
+        }
+
+        if (base.getTag(GKDCM_AccessionNumber, tag)) {
+                modeloDCM.study.study_acc_no = tag;
+        }
+
+        if (base.getTag(GKDCM_ReferringPhysicianName, tag)) {
+                modeloDCM.study.ref_physician = tag;
+        }
+
+        if (base.getTag(GKDCM_StudyDescription, tag)) {
+                modeloDCM.study.study_desc = tag;
+        }
+
+        if (base.getTag(GKDCM_StudyDescription, tag)) {
+                modeloDCM.study.study_desc = tag;
+        }
+
+        //series
+        if (base.getTag(GKDCM_SeriesInstanceUID, tag)) {
+                modeloDCM.series.series_iuid = tag;
+        }
+
+        tag1 = "";
+        tag = "";
+        if (base.getTag(GKDCM_SeriesDate, tag) && base.getTag(GKDCM_SeriesTime, tag1)) {
+                modeloDCM.series.series_datetime = parseDateTime(tag, tag1);
+        }
+
+        if (base.getTag(GKDCM_SeriesNumber, tag)) {
+                modeloDCM.series.series_no = tag;
+        }
+
+        if (base.getTag(GKDCM_Modality, tag)) {
+                modeloDCM.series.series_modality = tag;
+        }
+
+        if (base.getTag(GKDCM_ProtocolName, tag)) {
+                modeloDCM.series.uid_importer = tag;
+        }
+
+        if (base.getTag(GKDCM_BodyPartExamined, tag)) {
+                modeloDCM.series.body_part = tag;
+        }
+
+        if (base.getTag(GKDCM_Laterality, tag)) {
+                modeloDCM.series.laterality = tag;
+        }
+
+        if (base.getTag(GKDCM_SeriesDescription, tag)) {
+                modeloDCM.series.series_desc = tag;
+        }
+
+        if (base.getTag(GKDCM_InstitutionName, tag)) {
+                modeloDCM.series.institution = tag;
+        }
+
+        if (base.getTag(GKDCM_StationName, tag)) {
+                modeloDCM.series.station_name = tag;
+        }
+
+        if (base.getTag(GKDCM_InstitutionalDepartmentName, tag)) {
+                modeloDCM.series.department = tag;
+        }
+
+        if (base.getTag(GKDCM_PerformingPhysicianName, tag)) {
+                modeloDCM.series.perf_physician = tag;
+        }
+
+        if (base.getTag(GKDCM_FrameOfReferenceUID, tag)) {
+                modeloDCM.series.frame_of_reference = tag;
+        }
+
+        //file
+        if (base.getTag(GKDCM_SOPInstanceUID, tag)) {
+                modeloDCM.file.sopiuid = tag;
+        }
+
+        //transfer syntax
+        {
+                GIL::DICOM::TipoMetaInfo metaTags;
+                pDICOMManager->CargarMetaInfo(pathAbsoluto, metaTags);
+
+                if(metaTags.getTag(GKDCM_TransferSyntaxUID,tag)) {
+                        modeloDCM.file.tsuid = tag;
+                }
+        }
+        if(base.getTag(GKDCM_SOPClassUID,tag)) {
+                modeloDCM.file.sopcuid = tag;
+        }
+
+        tag1 = "";
+        tag = "";
+        if (base.getTag(GKDCM_AcquisitionDate, tag) && base.getTag(GKDCM_AcquisitionTime, tag1)) {
+                modeloDCM.file.content_datetime = parseDateTime(tag, tag1);
+        }
+
+        if (base.getTag(GKDCM_PixelSpacing, tag)) {
+                modeloDCM.file.spacing = tag;
+        } else if (base.getTag(GKDCM_ImagerPixelSpacing, tag)) {
+                modeloDCM.file.spacing = tag;
+        }
+
+        std::string tagOrientation;
+        //GKDCM_ImageOrientationPatient its longer than info tags...
+        if (!pDICOMManager->GetTag(0x0020,0x0037, tagOrientation)) {
+                //For ACR-NEMA GKDCM_ACR_NEMA_ImageOrientation
+                pDICOMManager->GetTag(0x0020,0x0037, tagOrientation);
+        }
+        if (!tagOrientation.empty()) {
+                modeloDCM.file.direction_cosines = tagOrientation;
+                double row[3] = {0.0,0.0,0.0};
+                double col[3] = {0.0,0.0,0.0};
+                char c;
+                bool ok = true;
+                std::istringstream istr(tagOrientation);
+                for (int i = 0; i < 3; ++i) {
+                        if (ok && !istr.eof()) {
+                                istr >> row[i];
+                                if (!istr.eof()) {
+                                        istr >> c; //la barra
+                                }
+                        } else {
+                                ok = false;
+                        }
+                }
+                for (int i = 0; i < 3; ++i) {
+                        if (ok && !istr.eof()) {
+                                istr >> col[i];
+                                if (!istr.eof()) {
+                                        istr >> c; //la barra
+                                }
+                        } else {
+                                ok = false;
+                        }
+                }
+                if (ok) {
+                        modeloDCM.file.orientation = makeImageOrientationLabelFromImageOrientationPatient(row[0], row[1], row[2], col[0], col[1], col[2]);
+                } else {
+                        modeloDCM.file.orientation = 'A';
+                }
+        } else {
+                modeloDCM.file.orientation = 'A';
+        }
+
+        //patient position
+        modeloDCM.file.image_position[0] = 0.0;
+        modeloDCM.file.image_position[1] = 0.0;
+        modeloDCM.file.image_position[2] = 0.0;
+        if (base.getTag(GKDCM_ImagePositionPatient, tag) ) {
+                std::istringstream iiPos(tag);
+
+                char c;
+                bool ok = true;
+                std::istringstream istr(tag);
+                for (int i = 0; i < 3; ++i) {
+                        if (ok && !istr.eof()) {
+                                istr >> modeloDCM.file.image_position[i];
+                                if (!istr.eof()) {
+                                        istr >> c; //la barra
+                                }
+                        } else {
+                                ok = false;
+                        }
+                }
+                if(!ok) {
+                        modeloDCM.file.image_position[0] = 0.0;
+                        modeloDCM.file.image_position[1] = 0.0;
+                        modeloDCM.file.image_position[2] = 0.0;
+                }
+        }
+
+        if (base.getTag(GKDCM_SliceLocation, tag)) { //slice location
+                std::istringstream istr(tag);
+                istr >>	modeloDCM.file.slice_location;
+        }
+
+        if (base.getTag(GKDCM_SliceThickness, tag)) { //slice thickness
+                std::istringstream istr(tag);
+                istr >>	modeloDCM.file.slice_thickness;
+        }
+
+        if (base.getTag(GKDCM_Rows, tag) ) {
+                std::istringstream istr(tag);
+                istr >>	modeloDCM.file.height;
+        }
+
+        if (base.getTag(GKDCM_Columns, tag) ) {
+                std::istringstream istr(tag);
+                istr >>	modeloDCM.file.width;
+        }
+
+        if (base.getTag(GKDCM_NumberOfFrames, tag)) {
+                std::istringstream istr(tag);
+                istr >> modeloDCM.file.number_of_frames;
+        } else {
+                modeloDCM.file.number_of_frames = 1;
+        }
+
+        if (base.getTag(GKDCM_InstanceNumber, tag) ) {
+                std::istringstream istr(tag);
+                istr >>	modeloDCM.file.instance_number;
+        }
+
+        if (base.getTag(GKDCM_ImageComments, tag)) {
+                modeloDCM.file.file_desc = tag;
+        }
+
+        GNC::Entorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+
+
+        return true;
+}
+
+
+
+void GNC::GCS::HistoryController::RemoveFilesFromDisk(GNC::GCS::HistoryController::StringList& listOfFiles)
+{
+        for (std::list<std::string>::iterator it = listOfFiles.begin(); it!= listOfFiles.end(); ++it) {
+                wxString wxPath = FROMPATH((*it));
+                if(wxFileExists(wxPath)) {
+                        wxRemoveFile(wxPath);
+                }
+        }
+}
+
+void GNC::GCS::HistoryController::SetThumbnail(long file_pk, int ancho, int alto, const unsigned char* imagen)
+{
+        wxCriticalSectionLocker locker(*m_pCriticalSectionThumbnails);
+        int size = ancho * alto * 3;
+        if(size > 0) {
+                wxSQLite3StatementBuffer bufSQL;
+                try {
+                        bufSQL.Format("INSERT OR REPLACE INTO Thumbnails (file_pk,width,height,thumb) VALUES ('%ld','%d','%d',?);",file_pk,ancho,alto);
+                        wxSQLite3Statement stmt = m_pConexionThumbnails->PrepareStatement(bufSQL);
+                        if(stmt.IsOk()) {
+                                stmt.Bind(1, imagen, size);
+                                stmt.ExecuteUpdate();
+                        } else {
+                                LOG_WARN("Historial", "Error al insertar en la base de datos");
+                        }
+                } catch (wxSQLite3Exception& ex) {
+                        LOG_ERROR("Historial", "SetThumbnail " << ex.GetMessage().ToUTF8() << " file_pk = "<< file_pk);
+                }
+        }
+}
+
+void GNC::GCS::HistoryController::GetThumbnail(long file_pk, int& ancho, int& alto, unsigned char*& imagen)
+{
+        wxSQLite3StatementBuffer bufSQL;
+        try {
+                bufSQL.Format("Select width, height, thumb FROM Thumbnails WHERE file_pk = '%ld';",file_pk);
+                wxSQLite3ResultSet resultados = m_pConexionThumbnails->ExecuteQuery(bufSQL);
+
+                if (resultados.NextRow()) {
+                        ancho = resultados.GetInt(wxT("width"));
+                        alto = resultados.GetInt(wxT("height"));
+                        int size = ancho*alto*3;
+                        int blobLen;
+                        const unsigned char* pbin = resultados.GetBlob(wxT("thumb"), blobLen);
+                        if(blobLen != size) {
+                                ancho = alto = 0;
+                                imagen = NULL;
+                        } else {
+                                imagen = (unsigned char*)malloc(size*sizeof(unsigned char));
+                                memcpy(imagen, pbin, size);
+                        }
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("Historial", "GetThumbnail "<<ex.GetMessage().ToUTF8());
+        }
+}
+
+void GNC::GCS::HistoryController::DeleteThumbnails(GNC::GCS::HistoryController::IdList& listPks)
+{
+        std::ostringstream ostrDelete;
+        wxSQLite3StatementBuffer bufSQL;
+        ostrDelete << "Delete from Thumbnails where file_pk in (";
+        for (IdList::const_iterator it = listPks.begin(); it != listPks.end(); ++it) {
+                if (it != listPks.begin()) {
+                        ostrDelete << ",";
+                }
+                ostrDelete << bufSQL.Format(" '%ld'", (*it));
+        }
+        ostrDelete << ")";
+        wxSQLite3ResultSet resultados = m_pConexionThumbnails->ExecuteQuery(ostrDelete.str().c_str());
+}
+//
+////endergion
+
+
+void GNC::GCS::HistoryController::SaveTask(GNC::GCS::IPersistentCommand* pTask)
+{
+        if (pTask->getIdBBDD() > 0) {
+                //update
+                try {
+                        wxSQLite3StatementBuffer bufSQL;
+                        bufSQL.Format("UPDATE Tasks SET status='%d', error_description='%q' "
+                                      "WHERE pk='%d';", (int)pTask->getStatus(), pTask->getErrorDescription().c_str(), pTask->getIdBBDD());
+                        m_pConexion->ExecuteUpdate(bufSQL);
+                } catch (wxSQLite3Exception& ex) {
+                        LOG_ERROR("BBDD", "Exception updating task "<<ex.GetMessage().ToUTF8())
+                }
+        } else {
+                //insert
+                try {
+                        wxSQLite3StatementBuffer bufSQL;
+                        bufSQL.Format("INSERT INTO Tasks (uid,data,description) VALUES ('%q','%q','%q');",
+                                      pTask->getClassUID().c_str(), pTask->serialize().c_str(), pTask->getDescription().c_str());
+                        //begin transaction
+                        m_pConexion->Begin();
+                        if (m_pConexion->ExecuteUpdate(bufSQL) > 0) {
+                                long idTask = (long)m_pConexion->GetLastRowId().GetValue();
+                                pTask->setIdBBDD(idTask);
+                                const std::list<long>& seriesId = pTask->getSeriesId();
+                                for (std::list<long>::const_iterator it = seriesId.begin(); it != seriesId.end(); ++it) {
+                                        bufSQL.Format("Insert INTO TasksSeries(task_fk, series_fk) VALUES ('%d','%d');",
+                                                      idTask, (*it));
+                                        m_pConexion->ExecuteUpdate(bufSQL);
+                                }
+                        }
+                        m_pConexion->Commit();
+                } catch (wxSQLite3Exception& ex) {
+                        LOG_ERROR("BBDD", "Exception adding task "<<ex.GetMessage().ToUTF8())
+                        m_pConexion->Rollback();
+                }
+        }
+}
+
+void GNC::GCS::HistoryController::DeleteTasks(const std::list<TaskModel>& tasks)
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                std::ostringstream ostr;
+                ostr << "DELETE FROM Tasks WHERE pk IN (";
+                for (std::list<TaskModel>::const_iterator it = tasks.begin(); it != tasks.end(); ++it) {
+                        if (it != tasks.begin()) {
+                                ostr << ",";
+                        }
+                        ostr << bufSQL.Format(" '%ld'", (*it).pk);
+                }
+                ostr << ");";
+                m_pConexion->ExecuteUpdate(ostr.str().c_str());
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "Exception deleting task "<<ex.GetMessage().ToUTF8())
+        }
+}
+
+bool GNC::GCS::HistoryController::IsPendingTasks()
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("Select count(*) from Tasks where status = '%d' OR status = '%d'",GNC::GCS::IPersistentCommand::Pending,GNC::GCS::IPersistentCommand::Error);
+                if(m_pConexion->ExecuteScalar(bufSQL)>0) {
+                        return true;
+                } else {
+                        return false;
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "ExistsSeriesByUID "<<ex.GetMessage().ToUTF8())
+                return false;
+        }
+}
+
+inline void FillInTaskModel(wxSQLite3ResultSet& resultados, GNC::GCS::HistoryController::TaskModel& taskModel)
+{
+        if (taskModel.pk <= 0) {
+                taskModel.pk = resultados.GetInt64(wxT("pk")).GetValue();
+                taskModel.uid = resultados.GetAsString(wxT("uid")).ToUTF8();
+                taskModel.status = resultados.GetInt64(wxT("status")).GetValue();
+                taskModel.statusDescription = resultados.GetAsString(wxT("error_description")).ToUTF8();
+                taskModel.data = resultados.GetAsString(wxT("data")).ToUTF8();
+                taskModel.description = resultados.GetAsString(wxT("description")).ToUTF8();
+                taskModel.created_time = GetDateTimeFromWx(resultados.GetAsString(wxT("created_time")));
+        }
+        taskModel.seriesId.push_back(resultados.GetInt(wxT("series_fk")));
+}
+
+
+void GNC::GCS::HistoryController::GetPendingTasks(std::list<GNC::GCS::HistoryController::TaskModel>& tasks)
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("SELECT Tasks.pk, Tasks.uid, Tasks.status, Tasks.error_description, Tasks.data, TasksSeries.series_fk, "
+                              "Tasks.created_time, Tasks.description "
+                              "FROM Tasks LEFT OUTER JOIN TasksSeries ON  pk=task_fk "
+                              "where status in ('%d', '%d')",GNC::GCS::IPersistentCommand::Pending,GNC::GCS::IPersistentCommand::Error);
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                std::map<long, TaskModel> mapOfTasks;
+                while (resultados.NextRow()) {
+                        long pk = resultados.GetInt64(wxT("pk")).GetValue();
+                        FillInTaskModel(resultados, mapOfTasks[pk]);
+                }
+                for (std::map<long, TaskModel>::const_iterator it = mapOfTasks.begin(); it != mapOfTasks.end(); ++it) {
+                        tasks.push_back((*it).second);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "TaskModel "<<ex.GetMessage().ToUTF8());
+        }
+}
+
+void GNC::GCS::HistoryController::GetSeriesPendingTasks(const std::list<long>& seriesPk, std::list<TaskModel>& tasks)
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                std::ostringstream ostr;
+                ostr << bufSQL.Format("SELECT distinct Tasks.pk, Tasks.uid, Tasks.status, Tasks.error_description, Tasks.data, TasksSeries.series_fk, "
+                                      "Tasks.created_time, Tasks.description "
+                                      "FROM Tasks LEFT OUTER JOIN TasksSeries ON  pk=task_fk "
+                                      "where  status in ('%d', '%d') AND series_fk IN (", GNC::GCS::IPersistentCommand::Pending,GNC::GCS::IPersistentCommand::Error);
+                for (std::list<long>::const_iterator it = seriesPk.begin(); it != seriesPk.end(); ++it) {
+                        if (it != seriesPk.begin()) {
+                                ostr << ",";
+                        }
+                        ostr << bufSQL.Format(" '%ld'", (*it));
+                }
+                ostr << ");";
+
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostr.str().c_str());
+                std::map<long, TaskModel> mapOfTasks;
+                while (resultados.NextRow()) {
+                        long pk = resultados.GetInt64(wxT("pk")).GetValue();
+                        FillInTaskModel(resultados, mapOfTasks[pk]);
+                }
+                for (std::map<long, TaskModel>::const_iterator it = mapOfTasks.begin(); it != mapOfTasks.end(); ++it) {
+                        tasks.push_back((*it).second);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "TaskModel "<<ex.GetMessage().ToUTF8());
+        }
+}
+
+void GNC::GCS::HistoryController::GetSeriesTasks(const std::list<long>& seriesPk, std::list<TaskModel>& tasks)
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                std::ostringstream ostr;
+                ostr << "SELECT distinct Tasks.pk, Tasks.uid, Tasks.status, Tasks.error_description, Tasks.data, TasksSeries.series_fk, "
+                     "Tasks.created_time, Tasks.description "
+                     "FROM Tasks LEFT OUTER JOIN TasksSeries ON  pk=task_fk "
+                     "where series_fk IN (";
+                for (std::list<long>::const_iterator it = seriesPk.begin(); it != seriesPk.end(); ++it) {
+                        if (it != seriesPk.begin()) {
+                                ostr << ",";
+                        }
+                        ostr << bufSQL.Format(" '%ld'", (*it));
+                }
+                ostr << ")";
+                ostr << " ORDER BY created_time ASC";
+
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostr.str().c_str());
+                std::map<long, TaskModel> mapOfTasks;
+                while (resultados.NextRow()) {
+                        long pk = resultados.GetInt64(wxT("pk")).GetValue();
+                        FillInTaskModel(resultados, mapOfTasks[pk]);
+                }
+                for (std::map<long, TaskModel>::const_iterator it = mapOfTasks.begin(); it != mapOfTasks.end(); ++it) {
+                        tasks.push_back((*it).second);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "TaskModel "<<ex.GetMessage().ToUTF8());
+        }
+}
+
+void GNC::GCS::HistoryController::GetAllTasks(std::list<TaskModel>& tasks)
+{
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                std::ostringstream ostr;
+                ostr << "SELECT distinct Tasks.pk, Tasks.uid, Tasks.status, Tasks.error_description, Tasks.data, TasksSeries.series_fk, "
+                     "Tasks.created_time, Tasks.description "
+                     "FROM Tasks LEFT OUTER JOIN TasksSeries ON  pk=task_fk "
+                     "ORDER BY created_time ASC";
+
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(ostr.str().c_str());
+                std::map<long, TaskModel> mapOfTasks;
+                while (resultados.NextRow()) {
+                        long pk = resultados.GetInt64(wxT("pk")).GetValue();
+                        FillInTaskModel(resultados, mapOfTasks[pk]);
+                }
+                for (std::map<long, TaskModel>::const_iterator it = mapOfTasks.begin(); it != mapOfTasks.end(); ++it) {
+                        tasks.push_back((*it).second);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "TaskModel "<<ex.GetMessage().ToUTF8());
+        }
+}
+
+GNC::GCS::HistoryController::TaskModel GNC::GCS::HistoryController::GetTask(long idTask)
+{
+        GNC::GCS::HistoryController::TaskModel taskModel;
+        try {
+                wxSQLite3StatementBuffer bufSQL;
+                bufSQL.Format("SELECT distinct Tasks.pk, Tasks.uid, Tasks.status, Tasks.error_description, Tasks.data, TasksSeries.series_fk, "
+                              "Tasks.created_time, Tasks.description "
+                              "FROM Tasks LEFT OUTER JOIN TasksSeries ON  pk=task_fk "
+                              "where pk ='%d'", idTask);
+
+                wxSQLite3ResultSet resultados = m_pConexion->ExecuteQuery(bufSQL);
+                while (resultados.NextRow()) {
+                        FillInTaskModel(resultados, taskModel);
+                }
+        } catch (wxSQLite3Exception& ex) {
+                LOG_ERROR("BBDD", "TaskModel "<<ex.GetMessage().ToUTF8());
+        }
+        return taskModel;
+}
diff --git a/cadxcore/main/controllers/historycontroller.h b/cadxcore/main/controllers/historycontroller.h
new file mode 100644
index 0000000..5fc3481
--- /dev/null
+++ b/cadxcore/main/controllers/historycontroller.h
@@ -0,0 +1,313 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+
+#include <api/dicom/dicomdataset.h>
+#include <api/api.h>
+#include <api/controllers/ihistorycontroller.h>
+#include <api/globals.h>
+#include <wx/datetime.h>
+
+class wxSQLite3Database;
+class wxCriticalSection;
+
+namespace GNC
+{
+class IProxyNotificadorProgreso;
+namespace GCS
+{
+
+namespace History
+{
+class EXTAPI IHistoryFilter
+{
+public:
+        IHistoryFilter()
+        {
+                Enabled = false;
+        }
+        virtual ~IHistoryFilter() {}
+
+        virtual std::string GetSQLFilter() = 0;
+        void Enable(bool enabled)
+        {
+                this->Enabled = enabled;
+        }
+        bool IsEnabled()
+        {
+                return this->Enabled;
+        }
+protected:
+        bool Enabled;
+};
+
+class EXTAPI StudyModalityFilter: public IHistoryFilter
+{
+public:
+        StudyModalityFilter() {}
+
+        StudyModalityFilter(const std::list<std::string>& listOfModalities)
+        {
+                this->listOfModalities = listOfModalities;
+        }
+        StudyModalityFilter(const std::string& modality)
+        {
+                this->listOfModalities.push_back(modality);
+        }
+
+        void SetModalities(const std::list<std::string>& listOfModalities)
+        {
+                this->listOfModalities = listOfModalities;
+        }
+
+        const std::list<std::string>& GetModalities()
+        {
+                return listOfModalities;
+        }
+
+        virtual std::string GetSQLFilter();
+protected:
+
+        std::list<std::string> listOfModalities;
+};
+
+class EXTAPI IHistoryDateFilter: public IHistoryFilter
+{
+public:
+        IHistoryDateFilter() {}
+
+        IHistoryDateFilter(const wxDateTime& from, const wxDateTime& to)
+        {
+                this->from = from;
+                this->to = to;
+        }
+
+        virtual void SetDates(const wxDateTime& from, const wxDateTime& to)
+        {
+                this->from = from;
+                this->to = to;
+        }
+
+        const wxDateTime& GetFromDate()
+        {
+                return from;
+        }
+
+        const wxDateTime& GetToDate()
+        {
+                return to;
+        }
+protected:
+        wxDateTime from;
+        wxDateTime to;
+};
+
+class EXTAPI AcquisitionDateFilter: public IHistoryDateFilter
+{
+public:
+        AcquisitionDateFilter() {}
+        AcquisitionDateFilter(const wxDateTime& from, const wxDateTime& to): IHistoryDateFilter(from,to)
+        {}
+
+        virtual std::string GetSQLFilter();
+};
+
+class EXTAPI StudyPatientFilter: public IHistoryFilter
+{
+public:
+        StudyPatientFilter() {}
+
+        StudyPatientFilter(const std::string& pat_id)
+        {
+                this->pat_id = pat_id;
+        }
+
+        void SetPatientId(const std::string& pat_id)
+        {
+                this->pat_id = pat_id;
+        }
+
+        const std::string& GetPatientId()
+        {
+                return pat_id;
+        }
+
+        virtual std::string GetSQLFilter();
+protected:
+        std::string pat_id;
+};
+
+class EXTAPI StudyLocationFilter: public IHistoryFilter
+{
+public:
+        StudyLocationFilter(GNC::GCS::IHistoryController::TLocation location): Location(location) {}
+
+        StudyLocationFilter()
+        {
+                ;
+        }
+
+        virtual std::string GetSQLFilter();
+protected:
+        GNC::GCS::IHistoryController::TLocation Location;
+};
+
+}
+class EXTAPI HistoryController: public IHistoryController
+{
+public:
+        typedef std::list<long> IdList;
+        typedef struct TaskModel {
+                long pk;
+                std::string uid;
+                int status;
+                std::string statusDescription;
+                std::string data;
+                std::string description;
+                std::string	created_time;
+                IdList seriesId;
+                TaskModel()
+                {
+                        pk = 0;
+                        status = 0;
+                }
+        } TaskModel;
+
+        //region "Patron singleton"
+public:
+        static HistoryController* Instance();
+        static void FreeInstance();
+
+        /* Constructor*/
+        HistoryController();
+        HistoryController(const std::string& pathOfDataBase);
+protected:
+        void InitController(const std::string& pathOfDataBase);
+public:
+        virtual ~HistoryController();
+
+        bool IsOk();
+        bool IsReadOnly();
+        virtual std::string GetGinkgoDicomDir(bool barraAlFinal = false);
+        void ReloadHistory(const std::string& pathDicomDir = "", bool tryTemp = true);
+        static std::string GetDefaultDicomDirPath(bool ignoreConfig = false);
+protected:
+        //	//sincrono con la interfaz
+        static HistoryController* m_pInstance;
+        //endregion
+public:
+
+        //region "metodos propios del historial"
+        bool AddFiles(const StringList& listaPaths, TAddErrorList& errorList, std::list<long>* insertedSeries, GNC::IProxyNotificadorProgreso* pNotificador = NULL, TAddAction action = TAA_COPY);
+        bool UpdateFiles(const GNC::GCS::HistoryController::FileModelList& files);
+        bool LinkFilesToSeries(long seriesPk, GNC::GCS::HistoryController::DICOMFileModelList& files, GNC::IProxyNotificadorProgreso* pNotificador = NULL);
+protected:
+        bool UpdateFileModel(FileModel& fileModel);
+        void FindOrInsertStudy(DICOMFileModel& model);
+        void FindOrInsertSeries(DICOMFileModel& model);
+        bool FindOrInsertFile(DICOMFileModel& model);
+        bool FindOrLink(DICOMFileModel& model);
+
+        void UpdateStudy(DICOMFileModel& model);
+        void UpdateSeries(DICOMFileModel& model);
+        void UpdateFile(DICOMFileModel& model);
+
+        std::string GetPathOfFile(GNC::GCS::IHistoryController::TLocation location, long pk, const std::string& file_path);
+        std::string GetPathOfFile(long file_pk);
+        std::string GetRelativePath(const std::string& absolutePath);
+        std::string GetAbsolutePath(const std::string& relativePath);
+        void UpdateSeriesSummaryInfo(long series_pk);
+        void UpdateStudySummaryInfo(long study_pk);
+public:
+        SeriesModel GetSeriesModel(long series_pk);
+        void GetDatabaseDatasetFromSeries(long series_pk, GIL::DICOM::DicomDataset& dataset);
+        void GetSeriesModelFromUIDs(const StringList& uids, SeriesModelList& series);
+        void GetSeriesModelFromUID(const std::string& uids, SeriesModelList& series);
+        void GetSeriesFromStudy(long study_pk, SeriesModelList& listOfSeries);
+        StudyModel GetStudyModel(long study_pk);
+        void GetStudyModelFromUID(const std::string& uids, StudyModelList& studies);
+        /**
+        gets dicom tags from study stored in database
+        */
+        void GetDatabaseDatasetFromStudy(long study_pk, GIL::DICOM::DicomDataset& dataset);
+        void GetStudies(GNC::GCS::History::IHistoryFilter* historyFilter, StudyModelList& listOfStudies);
+        void GetStudies(std::list<GNC::GCS::History::IHistoryFilter*>& historyFilter, StudyModelList& listOfStudies);
+        FileModel GetFrameOfReference(long series_pk);
+        FileModel GetFrameOfReference(const std::string& series_pk);
+        FileModel GetFileModel(long file_pk);
+        FileModel GetFileModelFromSopInstance(const std::string& sopInstanceUID, long study_pk = -1);
+
+        void GetAllPatients(GNC::GCS::HistoryController::PatientModelList& patientList);
+
+        bool ExistsSeriesWithUID(const std::string& seriesUID);
+        bool ExistsStudyWithUID(const std::string& studyUID);
+        int GetNumberOfFiles();
+        /**this method take a lot of time, if you don't need verbose information, use LightFileModelList...**/
+        virtual void GetSeriesSortedFileModels(long series_pk, FileModelList& fileList, bool onlyFirst = false);
+        virtual void GetSeriesSortedFileModels(long series_pk, LightFileModelList& fileList, bool onlyFirst = false);
+        StringList GetSeriesSortedPathsByUID(const std::string& seriesUID);
+        StringList GetSeriesSortedPaths(const std::string& series_pk);
+        StringList GetSeriesSortedPaths(long series_pk);
+        virtual StringList GetSeriesSopClasses(long series_pk);
+        char GetSeriesOrientation(long series_pk);
+
+        bool DeleteSeriesList(const IdList& pks);
+        bool DeleteSopInstanceUIDs(const StringList& sopInstanceUIds);
+
+        bool EmptyHistory(bool eliminarDelDisco);
+        //	//thumbnails...
+        void SetThumbnail(long file_pk, int ancho, int alto, const unsigned char* imagen);
+        void GetThumbnail(long file_pk, int& ancho, int& alto, unsigned char*& imagen);
+        void DeleteThumbnails(IdList& listPks);
+
+        //deprecated persistent commands are deprecated
+        virtual void SaveTask(GNC::GCS::IPersistentCommand* pTask);
+        virtual void DeleteTasks(const std::list<TaskModel>& tasks);
+        virtual bool IsPendingTasks();
+        virtual void GetPendingTasks(std::list<TaskModel>& tasks);
+        virtual void GetSeriesPendingTasks(const std::list<long>& seriesPk, std::list<TaskModel>& tasks);
+        virtual void GetSeriesTasks(const std::list<long>& seriesPk, std::list<TaskModel>& tasks);
+        virtual TaskModel GetTask(long idTask);
+        virtual void GetAllTasks(std::list<TaskModel>& tasks);
+        //	//
+        //protected:
+        //	//region "helpers"
+        //	//devuelve false si !copia y no esta donde deberia
+public:
+        bool ReadFile(DICOMFileModel& modelo,const std::string& pathAbsoluto, TAddErrorList& errorList, TAddAction action);
+        bool ReadFile(DICOMFileModel& modelo,const std::string& pathAbsoluto, TAddErrorList& errorList);
+
+protected:
+        void RemoveFilesFromDisk(StringList&listOfFiles);
+
+        //endergion
+
+        wxSQLite3Database* m_pConexion;
+        wxSQLite3Database* m_pConexionThumbnails;
+        wxCriticalSection* m_pCriticalSection;
+        wxCriticalSection* m_pCriticalSectionThumbnails;
+        bool m_readOnly;
+        std::string m_GinkgoDicomDir;
+};
+}
+}
diff --git a/cadxcore/main/controllers/historytoolscontroller.cpp b/cadxcore/main/controllers/historytoolscontroller.cpp
new file mode 100644
index 0000000..5cddc38
--- /dev/null
+++ b/cadxcore/main/controllers/historytoolscontroller.cpp
@@ -0,0 +1,183 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "historytoolscontroller.h"
+#include <main/controllers/controladorlog.h>
+#include <main/gui/history3/historypanel3.h>
+
+#include <wx/event.h>
+#include <wx/menu.h>
+#include <wx/sizer.h>
+#include <wx/dc.h>
+#include <wx/wxginkgotoolbar.h>
+
+#include <iostream>
+
+GNC::HistoryToolsController::HistoryToolsController()
+{
+}
+
+GNC::HistoryToolsController::~HistoryToolsController()
+{
+}
+
+GNC::HistoryToolsController* GNC::HistoryToolsController::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new GNC::HistoryToolsController();
+        }
+        return m_pInstance;
+}
+
+void GNC::HistoryToolsController::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+GNC::HistoryToolsController* GNC::HistoryToolsController::m_pInstance = 0;
+
+void GNC::HistoryToolsController::RegisterAll()
+{
+        for (ToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                ;
+        }
+}
+
+void GNC::HistoryToolsController::UnRegisterAll()
+{
+        std::cout << "GNC::HistoryToolsController::UnRegisterAll()\n";
+        for (ToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                //delete (*it).second;
+        }
+        m_tools.clear();
+}
+
+/* Registra una herramienta */
+void GNC::HistoryToolsController::RegisterTool(GNC::GCS::IHistoryTool* pTool)
+{
+        if (pTool == NULL) {
+                LOG_ERROR("HistoryToolController", "null toool");
+                return;
+        }
+
+        ToolMap::const_iterator it = m_tools.find(pTool->ID);
+
+        if (it != m_tools.end()) {
+                LOG_ERROR("HistoryToolController", "Duplicate tool " << pTool->ID);
+                return;
+        }
+        m_tools[pTool->ID] = pTool;
+}
+
+/* Des-Registra una herramienta */
+void GNC::HistoryToolsController::UnRegisterTool(GNC::GCS::IHistoryTool* pTool)
+{
+        //GTRACE("GNC::ControladorHerramientas::DesRegistrarHerramienta( Herramienta = " << pHerramienta << ")");
+        for (ToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                if ((*it).second == pTool) {
+                        delete (*it).second;
+                        m_tools.erase(it);
+                        break;
+                }
+        }
+}
+
+void GNC::HistoryToolsController::UnRegisterTool(GNC::GCS::IHistoryTool::UID id)
+{
+        //GTRACE("GNC::ControladorHerramientas::DesRegistrarHerramienta( Herramienta = " << pHerramienta << ")");
+        for (ToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                if ((*it).second->ID == id) {
+                        delete (*it).second;
+                        m_tools.erase(it);
+                        break;
+                }
+        }
+}
+
+GNC::GCS::IHistoryTool* GNC::HistoryToolsController::GetTool(GNC::GCS::IHistoryTool::UID id)
+{
+        GNC::GCS::IHistoryTool* pTool = NULL;
+        ToolMap::iterator it = m_tools.find(id);
+        if (it != m_tools.end()) {
+                pTool = (*it).second;
+        }
+        return pTool;
+}
+
+GNC::GCS::IHistoryPanel* GNC::HistoryToolsController::GetHistoryPanel()
+{
+        return GNC::GUI::HistoryPanel3::Instance();
+}
+
+GNC::HistoryToolsController::ToolList GNC::HistoryToolsController::GetTools()
+{
+        ToolList lista;
+        for(ToolMap::iterator it = m_tools.begin(); it!= m_tools.end(); ++it) {
+                lista.push_back((*it).second);
+        }
+        return lista;
+}
+
+GNC::HistoryToolsController::ToolList GNC::HistoryToolsController::GetTools(GNC::GCS::IHistoryTool::TToolFamily family)
+{
+        ToolList lista;
+        for(ToolMap::iterator it = m_tools.begin(); it!= m_tools.end(); ++it) {
+                if ((*it).second->Family == family) {
+                        lista.push_back((*it).second);
+                }
+        }
+        return lista;
+}
+
+void GNC::HistoryToolsController::AppendsToolInMenu(wxEvtHandler* pParent, wxMenu* pMenu, GNC::GCS::IHistoryTool::TToolFamily family)
+{
+        GNC::HistoryToolsController::ToolList list = GetTools(family);
+        for (GNC::HistoryToolsController::ToolList::const_iterator it = list.begin(); it != list.end(); ++it) {
+                if ((*it)->Enabled()) {
+                        (*it)->AppendToolIn(pParent, pMenu);
+                }
+        }
+
+}
+
+void GNC::HistoryToolsController::AppendsToolInToolBar(wxGinkgoToolBar* pParent, GNC::GCS::IHistoryTool::TToolFamily family)
+{
+        GNC::HistoryToolsController::ToolList list = GetTools(family);
+        for (GNC::HistoryToolsController::ToolList::const_iterator it = list.begin(); it != list.end(); ++it) {
+                if ((*it)->Enabled()) {
+                        (*it)->AppendToolIn(pParent);
+                }
+        }
+}
+
+void GNC::HistoryToolsController::AppendsBigToolsInToolBar(wxGinkgoToolBar* pParent)
+{
+        for(ToolMap::iterator it = m_tools.begin(); it!= m_tools.end(); ++it) {
+                if ((*it).second->Enabled()) {
+                        (*it).second->AppendToolIn(pParent, true);
+                }
+        }
+}
+
+
diff --git a/cadxcore/main/controllers/historytoolscontroller.h b/cadxcore/main/controllers/historytoolscontroller.h
new file mode 100644
index 0000000..f400460
--- /dev/null
+++ b/cadxcore/main/controllers/historytoolscontroller.h
@@ -0,0 +1,97 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <list>
+#include <map>
+
+#include <api/api.h>
+#include <api/ihistorytool.h>
+
+class wxGinkgoToolBar;
+class wxWindow;
+class wxBitmap;
+class wxEvtHandler;
+class wxMenu;
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI IHistoryPanel
+{
+public:
+        virtual ~IHistoryPanel() {}
+
+        virtual void ReloadToolBar() = 0;
+        virtual void ReloadCombos(bool checkPurgue) = 0;
+        virtual void RefreshSearch(bool force = false) = 0;
+        virtual void GetSelectedSeriesPk(std::list<long>& listOfPks) = 0;
+        virtual wxWindow* GetWxWindow() = 0;
+};
+}
+
+class EXTAPI HistoryToolsController
+{
+
+        //------------------------------------------------------------------------------
+        //region "Patron singleton"
+public:
+        static HistoryToolsController* Instance();
+        static void FreeInstance();
+
+protected:
+        HistoryToolsController();
+        virtual ~HistoryToolsController();
+
+        static HistoryToolsController* m_pInstance;
+
+public:
+        typedef std::list<GNC::GCS::IHistoryTool*> ToolList;
+        typedef std::map<GNC::GCS::IHistoryTool::UID, GNC::GCS::IHistoryTool*> ToolMap;
+
+        virtual void RegisterAll();
+        virtual void UnRegisterAll();
+
+        /* Registra una herramienta */
+        virtual void RegisterTool(GNC::GCS::IHistoryTool* tool);
+
+        /* Des-Registra una herramienta */
+        virtual void UnRegisterTool(GNC::GCS::IHistoryTool* tool);
+        virtual void UnRegisterTool(GNC::GCS::IHistoryTool::UID id);
+
+        /*FIXME: Devuelve una copia de las herramientas registradas*/
+        ToolList GetTools();
+
+        ToolList GetTools(GNC::GCS::IHistoryTool::TToolFamily family);
+
+        void AppendsToolInMenu(wxEvtHandler* pParent, wxMenu* pMenu, GNC::GCS::IHistoryTool::TToolFamily family);
+        void AppendsToolInToolBar(wxGinkgoToolBar* pParent, GNC::GCS::IHistoryTool::TToolFamily family);
+        void AppendsBigToolsInToolBar(wxGinkgoToolBar* pParent);
+
+        GNC::GCS::IHistoryTool* GetTool(GNC::GCS::IHistoryTool::UID id);
+
+        GNC::GCS::IHistoryPanel* GetHistoryPanel();
+
+        ToolMap m_tools;
+};
+}
+
diff --git a/cadxcore/main/controllers/inactivitycontroller.cpp b/cadxcore/main/controllers/inactivitycontroller.cpp
new file mode 100644
index 0000000..134292a
--- /dev/null
+++ b/cadxcore/main/controllers/inactivitycontroller.cpp
@@ -0,0 +1,217 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <wx/statbmp.h>
+#include <wx/bmpbuttn.h>
+
+#include "inactivitycontroller.h"
+#include <api/ientorno.h>
+#include <api/controllers/icontroladorpermisos.h>
+
+#include <main/controllers/commandcontroller.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/gui/countdownmessage/inactivitycountdownmessage.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+
+#include <main/gui/mainwindow/detacheddialog.h>
+
+//this timer is to controlate user inactivity
+namespace GNC
+{
+namespace GCS
+{
+class TimerInactivity: public wxTimer
+{
+public:
+        TimerInactivity()
+        {
+                m_active = false;
+                m_frozen = false;
+                GNC::GCS::Permisos::EstadoPermiso estado = GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "inactivity_time");
+                if (estado) {
+                        m_maxInactivity = estado.ObtenerValor<long>() * 1000;
+                        this->Start(m_maxInactivity, true);
+                        pCountDown = new GNC::GUI::InactivityCountdownMessage(GNC::GCS::IEntorno::Instance()->GetVentanaRaiz(), _("Ginkgo CADx has detected inactivity and it will be closed in %d seconds.\nDo you want to continue?"));
+                        m_active = true;
+                } else {
+                        pCountDown = NULL;
+                        m_maxInactivity = -1;
+                }
+
+                estado = GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "auto_close");
+                if (estado) {
+                        m_active = true;
+                }
+        }
+
+        ~TimerInactivity()
+        {
+        }
+
+        virtual void Notify()
+        {
+                if (GNC::GCS::ICommandController::Instance()->GetNumActiveCommands() == 0) {
+                        if (m_maxInactivity > 0) {
+                                if (!pCountDown->IsShown()) {
+                                        pCountDown->Show();
+                                }
+                        }
+                } else {
+                        Reset();
+                }
+        }
+
+        virtual void Reset()
+        {
+                if (!m_active || !wxThread::IsMain()) {
+                        return;
+                }
+                if (pCountDown != NULL && pCountDown->IsShown()) {
+                        pCountDown->Show(false);
+                }
+                if (IsRunning()) {
+                        Stop();
+                        if (m_maxInactivity > 0) {
+                                this->Start(m_maxInactivity, true);
+                        }
+                }
+        }
+
+        virtual void KillNow()
+        {
+                if (!m_active || !wxThread::IsMain()) {
+                        return;
+                }
+                if (!m_frozen && GNC::GCS::ICommandController::Instance()->GetNumActiveCommands() == 0) {
+                        //kills now
+                        GNC::GCS::IEntorno::Instance()->GetVentanaPrincipal()->Close();
+                        //
+                }
+        }
+
+        virtual void StopMonitoring()
+        {
+                if (!m_active || !wxThread::IsMain()) {
+                        return;
+                }
+                m_frozen = true;
+                if (pCountDown != NULL && pCountDown->IsShown()) {
+                        pCountDown->Show(false);
+                }
+                if (IsRunning()) {
+                        Stop();
+                }
+        }
+
+        virtual void StartMonitoring()
+        {
+                if (!m_active || !wxThread::IsMain()) {
+                        return;
+                }
+                m_frozen = false;
+                if (m_maxInactivity > 0) {
+                        this->Start(m_maxInactivity, true);
+                }
+        }
+
+        virtual void DetachForm()
+        {
+                pCountDown = NULL;
+        }
+
+protected:
+        long m_maxInactivity;
+        bool m_active;
+        bool m_frozen;
+        GNC::GUI::InactivityCountdownMessage* pCountDown;
+};
+}
+}
+//
+
+
+//region "Patron singleton"
+
+GNC::GCS::InactivityController* GNC::GCS::InactivityController::m_pInstance = 0;
+
+GNC::GCS::InactivityController::InactivityController()
+{
+        m_pTimerInactivity = new TimerInactivity;
+}
+
+GNC::GCS::InactivityController::~InactivityController()
+{
+        if (m_pTimerInactivity != NULL) {
+                delete m_pTimerInactivity;
+                m_pTimerInactivity = NULL;
+        }
+}
+
+GNC::GCS::InactivityController* GNC::GCS::InactivityController::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new GNC::GCS::InactivityController();
+        }
+        return m_pInstance;
+}
+
+void GNC::GCS::InactivityController::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+//endregion
+
+void GNC::GCS::InactivityController::ResetsInactivity()
+{
+        //resets inactivity
+        m_pTimerInactivity->Reset();
+        //
+}
+
+void GNC::GCS::InactivityController::RestartMonitoring()
+{
+        //resets inactivity
+        m_pTimerInactivity->StartMonitoring();
+        //
+}
+
+void GNC::GCS::InactivityController::StopsMonitoring()
+{
+        //resets inactivity
+        m_pTimerInactivity->StopMonitoring();
+        //
+}
+void GNC::GCS::InactivityController::DetachForm()
+{
+        m_pTimerInactivity->DetachForm();
+}
+
+void GNC::GCS::InactivityController::KillNow()
+{
+        //kills inmediatly
+        m_pTimerInactivity->KillNow();
+        //
+}
diff --git a/cadxcore/main/controllers/inactivitycontroller.h b/cadxcore/main/controllers/inactivitycontroller.h
new file mode 100644
index 0000000..71e1f8d
--- /dev/null
+++ b/cadxcore/main/controllers/inactivitycontroller.h
@@ -0,0 +1,62 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/api.h>
+#include <api/globals.h>
+#include <api/controllers/ieventscontroller.h>
+
+#include <string>
+#include <map>
+
+class wxAuiNotebook;
+
+namespace GNC
+{
+
+namespace GCS
+{
+class TimerInactivity;
+class EXTAPI InactivityController
+{
+
+//region "Patron singleton"
+public:
+        static InactivityController* Instance();
+        static void FreeInstance();
+
+        static InactivityController* m_pInstance;
+//endregion
+
+//region "Interfaz de controlador de vistas"
+public:
+        virtual void StopsMonitoring();
+        virtual void RestartMonitoring();
+        virtual void ResetsInactivity();
+        virtual void DetachForm();
+        virtual void KillNow();
+protected:
+        TimerInactivity*		  m_pTimerInactivity;
+        InactivityController();
+        virtual ~InactivityController();
+};
+}
+}
diff --git a/cadxcore/main/controllers/integrationcontroller.cpp b/cadxcore/main/controllers/integrationcontroller.cpp
new file mode 100644
index 0000000..67818e0
--- /dev/null
+++ b/cadxcore/main/controllers/integrationcontroller.cpp
@@ -0,0 +1,852 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <set>
+#include <ctime>
+
+#include <wx/checkbox.h>
+#include <wx/statbmp.h>
+#include <wx/bmpbuttn.h>
+#include <wx/msgdlg.h>
+#include <wx/uri.h>
+
+#include "integrationcontroller.h"
+#include "controladorlog.h"
+#include "controladorextensiones.h"
+#include "controladoreventos.h"
+#include "commandcontroller.h"
+#include "controladorhl7.h"
+#include "configurationcontroller.h"
+#include <commands/cloudcommand.h>
+#include <commands/pacsdownloadcommand.h>
+#include <commands/acquirefromurlcommand.h>
+#include <api/integration/dict.h>
+#include <api/dicom/dcmdictionary.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/gui/import/wxwizardimportacionginkgo.h>
+#include <main/gui/acquisition/dialogoadquisicion.h>
+#include <main/gui/acquisition/downloadagaindialog.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/entorno.h>
+#include <eventos/integration.h>
+#include <main/controllers/parserxmlenglish.h>
+#include <main/controllers/parserxmlspanish.h>
+#include <main/controllers/historycontroller.h>
+#include <wx/filename.h>
+#include <wx/sstream.h>
+#include <wx/tokenzr.h>
+
+#include <main/controllers/anonusagestats.h>
+
+GIL::IntegrationController* GIL::IntegrationController::m_pInstance = 0;
+
+GIL::IXMLIntegrationParser::~IXMLIntegrationParser()
+{
+}
+
+GIL::IntegrationController::IntegrationController()
+{
+        GNC::GCS::ControladorEventos::Instance()->Registrar(this, GNC::GCS::Events::HL7SendRequestEvent());
+
+        GNC::GCS::Ptr<GIL::IXMLIntegrationParser> spanish(new GIL::ParserXMLSpanish());
+        std::list<std::string> keys = spanish->GetKeys();
+        for (std::list<std::string>::iterator it = keys.begin(); it != keys.end(); ++it) {
+                RegisterParser((*it), spanish);
+        }
+        GNC::GCS::Ptr<GIL::IXMLIntegrationParser> english(new GIL::ParserXMLEnglish());
+        keys = english->GetKeys();
+        for (std::list<std::string>::iterator it = keys.begin(); it != keys.end(); ++it) {
+                RegisterParser((*it), english);
+        }
+}
+
+GIL::IntegrationController::~IntegrationController()
+{
+        GNC::GCS::ControladorEventos::Instance()->DesRegistrar(this);
+        m_mapParsers.clear();
+}
+
+GIL::IntegrationController* GIL::IntegrationController::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new IntegrationController();
+        }
+        return m_pInstance;
+}
+
+void GIL::IntegrationController::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+
+void GIL::IntegrationController::RegisterParser(const std::string& xmlKey, const GNC::GCS::Ptr<IXMLIntegrationParser>& pParser)
+{
+#ifndef NDEBUG
+        // we only allow one controller per key, everything else is a bug in the code
+        assert(m_mapParsers.find(xmlKey) == m_mapParsers.end());
+#else
+        if (m_mapParsers.find(xmlKey) != m_mapParsers.end()) {
+                wxString msg = wxT("Ignoring duplicate parser key: ") + xmlKey;
+                wxMessageBox(msg, "Error");
+                return;
+        }
+#endif
+        m_mapParsers[xmlKey] = pParser;
+}
+
+void GIL::IntegrationController::UnRegisterParser(const std::string& xmlKey)
+{
+        if (m_mapParsers.find(xmlKey) != m_mapParsers.end()) {
+                m_mapParsers.erase(m_mapParsers.find(xmlKey));
+        }
+}
+
+
+
+bool GIL::IntegrationController::Process(GIL::IntegrationModelList& models)
+{
+
+        unsigned int numProcessed = 0;
+
+        typedef GIL::IntegrationModelList::iterator TIteradorModelos;
+        for (TIteradorModelos itModelo = models.begin(); itModelo != models.end(); ++itModelo) {
+                GNC::GCS::Ptr<GIL::IModeloIntegracion> modelo = (*itModelo);
+                if (modelo->atendido) {
+                        numProcessed++;
+                        continue;
+                } else {
+                        modelo->atendido = true;
+                }
+                if(modelo->accion == GIL::IModeloIntegracion::TA_Dicomizar) {
+                        LOG_STAT(ANON_STAT_INT_DICOMIZE)
+                        //se busca el dicomizador del modulo indicado, habra un mapa que transformara sid en uids de modulo
+                        std::string uidModulo("");
+                        if (modelo->idPlantilla != "") {
+                                uidModulo = GetUID(modelo->idPlantilla);
+                                if (GNC::ControladorExtensiones::Instance()->ObtenerModulo(uidModulo) == NULL) {
+                                        throw GIL::IntegrationException("No existe el modulo asociado", "Modelo", true);
+                                }
+                        }
+
+                        try {
+                                GNC::GUI::wxWizardImportacionGinkgo ib(NULL, modelo, uidModulo);
+                                ib.ShowModal();
+                        } catch(GIL::DICOM::I2DException& i) {
+                                LOG_ERROR("GIL/WF/Importar", (const std::string)i);
+                        } catch(std::exception& ex1) {
+                                LOG_ERROR("GIL/WF/Importar", std::string("Error al importar: ") + ex1.what());
+                        } catch (...) {
+                                LOG_ERROR("GIL/WF/Importar", std::string("Error al importar: Error interno"));
+                        }
+                        GNC::Entorno::Instance()->GetVentanaPrincipal()->MostrarVentana();
+                        numProcessed++;
+                } else if(modelo->accion == GIL::IModeloIntegracion::TA_Obtener) {
+                        LOG_STAT(ANON_STAT_INT_RETRIEVE)
+                        //if wado retrieve...
+                        if (!modelo->Files.empty()) {
+                                //retrieve files downloading as wado files using acquirefromurl command
+                                GADAPI::AcquireFromURLCommandParameters* pCmdParams = new GADAPI::AcquireFromURLCommandParameters(modelo->Files);
+                                GADAPI::AcquireFromURLCommand* pCmd = new GADAPI::AcquireFromURLCommand(pCmdParams);
+                                GNC::Entorno::Instance()->GetCommandController()->ProcessAsync("Downloading files...",pCmd, NULL);
+                                GNC::Entorno::Instance()->GetVentanaPrincipal()->MostrarVentana();
+                                numProcessed++;
+                        } else {
+                                GADAPI::PACSDownloadCommandParams * pParams = NULL;
+                                std::string tag;
+                                if (!modelo->TagsDICOMOverwrite.getTag("0008|0052", tag)) {
+                                        //show only acquisition form
+                                        GNC::Entorno::Instance()->GetVentanaPrincipal()->MostrarVentana();
+                                        GNC::GUI::DialogoAdquisicion::Instance()->Show(modelo->GlobalVariables.GetValue(GKDI_PATIENT_ID), modelo->GlobalVariables.GetValue(GKDI_GLOBAL_PACS_RETRIEVE_SID));
+                                        numProcessed++;
+                                } else {
+                                        GIL::DICOM::DicomDataset base = modelo->TagsDICOMOverwrite;
+                                        std::string qrlevel, uid;
+                                        if (base.getTag(GKDCM_QueryRetrieveLevel,qrlevel)) {
+                                                if (qrlevel == "STUDY" && base.getTag(GKDCM_StudyInstanceUID, uid) && GNC::GCS::HistoryController::Instance()->ExistsStudyWithUID(uid)) {
+                                                        GNC::GUI::DownloadAgainDialog dlg(GNC::Entorno::Instance()->GetVentanaRaiz(), uid, false);
+                                                        int answer = dlg.ShowModal();
+                                                        if (answer != wxID_OK) {
+                                                                continue;
+                                                        }
+                                                } else if (qrlevel == "SERIES" && base.getTag(GKDCM_SeriesInstanceUID, uid) && GNC::GCS::HistoryController::Instance()->ExistsSeriesWithUID(uid)) {
+                                                        GNC::GUI::DownloadAgainDialog dlg(GNC::Entorno::Instance()->GetVentanaRaiz(), uid, false);
+                                                        int answer = dlg.ShowModal();
+                                                        if (answer != wxID_OK) {
+                                                                continue;
+                                                        }
+                                                } else {
+                                                        LOG_INFO("GIL/WF/Importar", "Unknown GKDCM_QueryRetrieveLevel '"<< qrlevel << "'");
+                                                }
+                                        } else {
+                                                LOG_INFO("GIL/WF/Importar", "unable to aquire GKDCM_QueryRetrieveLevel");
+                                        }
+                                        pParams = new GADAPI::PACSDownloadCommandParams(modelo->GlobalVariables.GetValue(GKDI_GLOBAL_PACS_RETRIEVE_SID), base);
+
+                                        GADAPI::PACSDownloadCommand* pComandoPACS = new GADAPI::PACSDownloadCommand(pParams);
+                                        GNC::Entorno::Instance()->GetCommandController()->ProcessAsync("Descargando PACS...",pComandoPACS, NULL);
+                                        GNC::Entorno::Instance()->GetVentanaPrincipal()->MostrarVentana();
+                                        numProcessed++;
+                                }
+                        }
+                } else if(modelo->accion == GIL::IModeloIntegracion::TA_Open)  {
+                        LOG_STAT(ANON_STAT_INT_OPEN)
+                        for (GIL::IModeloIntegracion::ListOfPaths::iterator itFile = modelo->Files.begin(); itFile != modelo->Files.end(); ++itFile) {
+                                wxFileName fileName(wxString::FromUTF8((*itFile).c_str()));
+                                if (fileName.IsRelative()) {
+                                        fileName.MakeAbsolute();
+                                }
+                                GNC::Entorno::Instance()->GetVentanaPrincipal()->MostrarVentana();
+                                GNC::Entorno::Instance()->GetVentanaPrincipal()->EjecutarParametro(fileName.GetFullPath());
+                        }
+                        numProcessed++;
+                }
+        }
+        return numProcessed == models.size();
+}
+
+
+typedef std::list<const GIL::IMapOfVarsModel*> TMapStack;
+typedef std::map<std::string, long> TSeqMap;
+
+void Parse(std::ostringstream& os, GIL::IModeloIntegracion* integrationModel, wxXmlNode* root, GIL::IStudyModel* study, int studyIdx, GIL::ISeriesModel* serie, int serieIdx, int imageIdx, TMapStack& mapStack, TSeqMap& seqMap)
+{
+        if (integrationModel == NULL || root == NULL) {
+                return;
+        }
+        for (wxXmlNode* child = root->GetChildren(); child != NULL; child = child->GetNext()) {
+                if (child->GetName() == wxT("seg")) {
+                        for (wxXmlNode* subChild = child->GetChildren(); subChild != NULL; subChild = subChild->GetNext()) {
+                                if ( (subChild->GetType() == wxXML_CDATA_SECTION_NODE) || (subChild->GetType() == wxXML_TEXT_NODE) ) {
+                                        os << std::string(subChild->GetContent().ToUTF8());
+                                } else {
+                                        if (subChild->GetName() == wxT("idx")) {
+                                                std::string content(subChild->GetAttribute(wxT("expr"), wxEmptyString).ToUTF8());
+
+                                                long acc = 0;
+
+                                                std::string::size_type lastOpIdx = 0;
+                                                std::string::size_type currOpIdx;
+                                                int currOp = ' ';
+
+                                                std::string term;
+                                                bool pending = true;
+                                                do {
+                                                        std::string::size_type currOpIdx1 = content.find('+', lastOpIdx);
+                                                        std::string::size_type currOpIdx2 = content.find('*', lastOpIdx);
+                                                        if (currOpIdx1 < currOpIdx2) {
+                                                                currOp = '+';
+                                                                currOpIdx = currOpIdx1;
+                                                        } else {
+                                                                currOpIdx = currOpIdx2;
+                                                                if (currOpIdx2 == std::string::npos) {
+                                                                        currOp = ' ';
+                                                                        pending = false;
+                                                                } else {
+                                                                        currOp = '*';
+                                                                }
+                                                        }
+
+                                                        term = content.substr(lastOpIdx, currOpIdx);
+                                                        long termVal = 0;
+
+                                                        if (term == "study:idx") {
+                                                                termVal = studyIdx;
+                                                        } else if (term == "serie:idx") {
+                                                                termVal = serieIdx;
+                                                        } else if (term == "image:idx") {
+                                                                termVal = imageIdx;
+                                                        } else {
+                                                                std::string::size_type dotPos = term.find('.');
+                                                                if (dotPos != std::string::npos) {
+                                                                        std::string seqName = term.substr(0, dotPos);
+                                                                        std::string seqMethod = term.substr(dotPos + 1);
+                                                                        for (TSeqMap::iterator it = seqMap.begin(); it != seqMap.end(); ++it) {
+                                                                                const std::string& siName = (*it).first;
+                                                                                if (seqName == siName) {
+
+                                                                                        long& val = (*it).second;
+
+                                                                                        if (seqMethod == "curval") {
+                                                                                                termVal = val;
+                                                                                                break;
+                                                                                        } else if (seqMethod == "nextval") {
+                                                                                                termVal = ++val;
+                                                                                                break;
+                                                                                        } else {
+                                                                                                break;
+                                                                                        }
+                                                                                }
+
+                                                                        }
+                                                                } else {	// Should be a integer
+                                                                        std::istringstream is (term);
+                                                                        is >> termVal;
+                                                                }
+                                                        }
+
+                                                        switch (currOp) {
+                                                        case '*':
+                                                                acc *= termVal;
+                                                                break;
+                                                        default:
+                                                                acc += termVal;
+                                                                break;
+                                                        }
+
+                                                        lastOpIdx = currOpIdx + 1;
+
+                                                } while (pending);
+
+                                                os << acc;
+                                        } else if (subChild->GetName() == wxT("repl")) {
+                                                std::string key = std::string(subChild->GetAttribute(wxT("key"), wxEmptyString).ToUTF8());
+                                                bool notFound = true;
+                                                TMapStack::iterator it = mapStack.begin();
+                                                while (it != mapStack.end() && notFound) {
+                                                        if ( (*it)->Contains(key) ) {
+                                                                os << (*it)->GetValue(key);
+                                                                notFound = false;
+                                                        }
+                                                        ++it;
+                                                }
+                                        }
+                                }
+                        }
+                        os << "\x0D";
+                } else if (child->GetName() == wxT("for.study")) {
+                        int idx = 0;
+                        for (GIL::IModeloIntegracion::TListOfStudies::iterator it = integrationModel->Studies.begin(); it != integrationModel->Studies.end(); ++it) {
+                                const GIL::IMapOfVarsModel& vars = (*it).MapOfVars;
+                                mapStack.push_back(&vars);
+                                Parse(os, integrationModel, child, &(*it), idx++, NULL, 0, 0, mapStack, seqMap);
+                                mapStack.pop_back();
+                        }
+                } else if (child->GetName() == wxT("for.serie")) {
+                        if (study != NULL) {
+                                int idx = 0;
+                                for (GIL::IStudyModel::TListOfSeries::iterator it = study->Series.begin(); it != study->Series.end(); ++it) {
+                                        const GIL::IMapOfVarsModel& vars = (*it).MapOfVars;
+                                        mapStack.push_back(&vars);
+                                        Parse(os, integrationModel, child, study, studyIdx, &(*it), idx++, 0, mapStack, seqMap);
+                                        mapStack.pop_back();
+                                }
+                        }
+                } else if (child->GetName() == wxT("for.image")) {
+                        if (serie != NULL) {
+                                int idx = 0;
+                                for (GIL::ISeriesModel::TListOfImages::iterator it = serie->Images.begin(); it != serie->Images.end(); ++it) {
+                                        const GIL::IMapOfVarsModel& vars = (*it).MapOfVars;
+                                        mapStack.push_back(&vars);
+                                        Parse(os, integrationModel, child, study, studyIdx, serie, serieIdx, idx++, mapStack, seqMap);
+                                        mapStack.pop_back();
+                                }
+                        }
+                } else if (child->GetName() == wxT("sequence")) {
+                        std::string key(child->GetAttribute(wxT("key"), wxT("")).ToUTF8());
+                        if (key.size() > 0) {
+                                std::string val(child->GetAttribute(wxT("val"), wxT("0")).ToUTF8());
+                                long keyVal = 0;
+                                std::istringstream is (val);
+                                is >> keyVal;
+
+                                seqMap[key] = keyVal;
+                        }
+                }
+
+        }
+
+}
+
+std::string GIL::IntegrationController::GetMessageFromIntegrationModel(GNC::GCS::Ptr<GIL::IModeloIntegracion>& integrationModel)
+{
+        if (integrationModel) {
+                if ( integrationModel->messageTemplate.size() == 0) {
+                        //
+                        GNC::GCS::Permisos::EstadoPermiso perm = GNC::GCS::IControladorPermisos::Instance()->Get("core.integracion", "integration_template");
+                        integrationModel->messageTemplate = perm.GetRawValue();
+                        if (integrationModel->messageTemplate.empty()) {
+                                LOG_ERROR("IntegrationController", "core.integracion.integration_template permission is not active");
+                        }
+                }
+
+                wxStringInputStream is(wxString::FromUTF8(integrationModel->messageTemplate.c_str()));
+                wxXmlDocument doc;
+                if (doc.Load(is, wxT("UTF-8"))) {
+                        wxXmlNode* root = doc.GetRoot();
+                        if (root != NULL && root->GetName() == wxT("msg")) {
+                                std::ostringstream os;
+                                std::string val;
+
+                                // Add variables
+                                const GNC::ControladorExtensiones::ListaModulos& listaModulos = GNC::ControladorExtensiones::Instance()->Modulos();
+                                std::string hl7_timestamp(wxDateTime::Now().Format(wxT("%Y%m%d%H%M%S")).ToUTF8());
+                                std::string epoch_timestamp;
+
+                                {
+                                        time_t tstamp = std::time(NULL);
+                                        std::ostringstream os;
+                                        os << tstamp;
+                                        epoch_timestamp = os.str();
+                                }
+
+                                integrationModel->GlobalVariables.InsertVariable(GKDI_MESSAGE_EPOCH_TIMESTAMP, epoch_timestamp, "Message Epoch Timestamp");
+                                integrationModel->GlobalVariables.InsertVariable(GKDI_MESSAGE_HL7_TIMESTAMP, hl7_timestamp, "Message HL7 Timestamp");
+
+                                integrationModel->GlobalVariables.InsertVariable(GKDI_GINKGOCADX_MODULE_TID, integrationModel->idPlantilla, "Ginkgo CADx module TID");
+
+
+                                GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE", "IDOrganizacionReceptora", val);
+                                integrationModel->GlobalVariables.InsertVariable(GKDI_GINKGOCADX_CONF_RECEIVING_ORG_ID, val);
+
+                                GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","IDSistemaPeticionario", val);
+                                integrationModel->GlobalVariables.InsertVariable(GKDI_GINKGOCADX_CONF_PETITIONER_SYS_ID, val);
+
+                                GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","IDAplicacionRellenadora", val);
+                                integrationModel->GlobalVariables.InsertVariable(GKDI_GINKGOCADX_CONF_FILLER_APP_ID, val);
+
+                                GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/Estacion","CentroNombre", val);
+                                integrationModel->GlobalVariables.InsertVariable(GKDI_GINKGOCADX_CONF_ORGANIZATION_NAME, val);
+
+                                GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/Estacion","CentroId", val);
+                                integrationModel->GlobalVariables.InsertVariable(GKDI_GINKGOCADX_CONF_ORGANIZATION_ID, val);
+
+                                GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","IDGinkgoApplication", val);
+                                integrationModel->GlobalVariables.InsertVariable(GKDI_GINKGOCADX_CONF_GINKGO_APP_ID, val);
+
+                                integrationModel->GlobalVariables.InsertVariable(GKDI_GLOBAL_PACS_LOCAL_AET, GNC::Entorno::Instance()->GetDicomLocalAET());
+
+                                try {
+                                        std::string uidModulo = GetUID(integrationModel->idPlantilla);
+                                        integrationModel->GlobalVariables.InsertVariable(GKDI_GINKGOCADX_MODULE_UID, uidModulo, "Ginkgo CADx module UID");
+
+                                        GNC::ControladorExtensiones::IteradorConstanteListaModulos it = listaModulos.find(uidModulo);
+                                        if (it != listaModulos.end()) {
+                                                integrationModel->GlobalVariables.InsertVariable(GKDI_GINKGOCADX_MODULE_NAME, (*it).second->GetImporterDescription(), "Ginkgo CADx module name");
+                                        }
+                                } catch(...) {}
+
+                                TSeqMap seqMap;
+                                TMapStack mapStack;
+                                mapStack.push_back(& (integrationModel->GlobalVariables) );
+                                Parse(os, integrationModel.GetRawPointer(), root, NULL, 0, NULL, 0, 0, mapStack, seqMap);
+                                mapStack.clear();
+                                seqMap.clear();
+
+                                return os.str();
+                        }
+                }
+        }
+        return "";
+}
+
+// Event listener realization
+void GIL::IntegrationController::ProcesarEvento(GNC::GCS::Events::IEvent *rawEvent)
+{
+
+        if (rawEvent->GetCodigoEvento() == ginkgoEVT_Core_HL7SendRequest) {
+                GNC::GCS::Events::HL7SendRequestEvent* pEvt = dynamic_cast<GNC::GCS::Events::HL7SendRequestEvent*>(rawEvent);
+                if (pEvt != NULL) {
+                        GIL::HL7::ControladorHL7 ch(GIL::HL7::ControladorHL7::TP_MLLP);
+                        ch.EnviarMensaje(GIL::HL7::Message::FromER7(pEvt->GetMessage()), true);
+                }
+        }
+}
+
+
+std::string GIL::IntegrationController::GetUID(const std::string& idPlantilla) const
+{
+        std::string uid;
+        wxString plantillawx(idPlantilla.c_str(), wxConvUTF8);
+
+        wxStringTokenizer tkid(plantillawx,wxString::FromUTF8("^"));
+
+        size_t numTokens = tkid.CountTokens();
+
+        if (numTokens != 3) {
+                std::ostringstream os;
+                os << _Std("Malformed template Id (") << idPlantilla.c_str() << _Std("):\nIs not a valid HL7 identifier (ie: code^description^namespaceId)");
+                throw IntegrationException(os.str(),"PID");
+        }
+        std::string codigo(tkid.GetNextToken().ToUTF8());
+        std::string descripcion(tkid.GetNextToken().ToUTF8());
+        std::string namespaceid(tkid.GetNextToken().ToUTF8());
+
+        GNC::ControladorExtensiones* pCE = GNC::ControladorExtensiones::Instance();
+
+        for (GNC::ControladorExtensiones::IteradorConstanteListaModulos it = pCE->Modulos().begin(); it != pCE->Modulos().end(); ++it) {
+                const GNC::GCS::IModuleController* m = (*it).second;
+
+                LOG_TRACE("HL7", "Parsing module: " << ", " << m->GetUID().c_str() );
+
+                std::string entradaConf = "TUID" + m->GetUID();
+
+                LOG_TRACE("HL7", "EntradaConf = TUID" << m->GetUID().c_str() );
+
+                GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE/Plantillas", entradaConf, uid);
+
+                LOG_TRACE("HL7", "tuid = " << uid);
+
+                wxStringTokenizer tkz(wxString::FromUTF8(uid.c_str()), wxT(";"));
+
+                while (tkz.HasMoreTokens()) {
+                        wxString token = tkz.GetNextToken();
+                        wxStringTokenizer tkidmodulo(token,wxString::FromUTF8("^"));
+                        numTokens = tkidmodulo.CountTokens();
+                        if (numTokens != 3) {
+                                std::ostringstream os;
+                                os << _Std("Id malformed template in the module configuration") << "(" << uid.c_str() << _Std("):\nIs not a valid HL7 identifier (ie: code^description^namespaceId)");
+                                throw IntegrationException(os.str(),"PID");
+                        }
+
+                        std::string codigo_m(tkidmodulo.GetNextToken().ToUTF8());
+                        std::string descripcion_m(tkidmodulo.GetNextToken().ToUTF8());
+                        std::string namespaceid_m(tkidmodulo.GetNextToken().ToUTF8());
+                        if ( (codigo_m == codigo) && (namespaceid_m == namespaceid) ) {
+                                std::ostringstream os;
+                                LOG_TRACE("HL7", "Found entry:" << m->GetUID().c_str());
+                                os << m->GetUID();
+                                return os.str();
+                        }
+                }
+        }
+
+        throw IntegrationException(_Std("Template Id unsupported (") + (idPlantilla) + _Std("):\nCheck the configuration and attach it if necessary"),"PID");
+
+}
+
+
+std::string GIL::IntegrationController::GetUIDModulo(const std::string& idPlantilla) const
+{
+        std::string uidModulo = GetUID(idPlantilla);
+        std::string sidModulo("");
+
+        const GNC::ControladorExtensiones::ListaModulos& listaModulos = GNC::ControladorExtensiones::Instance()->Modulos();
+        for(GNC::ControladorExtensiones::IteradorConstanteListaModulos itModulos = listaModulos.begin(); itModulos != listaModulos.end(); ++itModulos) {
+                std::ostringstream os;
+                os << itModulos->first;
+                if(os.str() == uidModulo) {
+                        return itModulos->second->GetUID();
+                }
+        }
+        return sidModulo;
+}
+
+std::string GIL::IntegrationController::GetIdPlantilla(const std::string& uidModulo) const
+{
+        GNC::GCS::IModuleController* pModuleController = GNC::ControladorExtensiones::Instance()->ObtenerModulo(uidModulo);
+        if (pModuleController == NULL) {
+                std::ostringstream os;
+                os << _Std("Unknown module Id (") << uidModulo.c_str();
+                throw IntegrationException(os.str(),"PID");
+        }
+
+        std::string entradaConf = "TUID" + pModuleController->GetUID();
+        std::string templateId;
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE/Plantillas", entradaConf, templateId);
+        return templateId;
+}
+
+
+
+/* Parsea la cadena XML y construye el modelo de integracion. Los parametros no encontrados se asignan por defecto segun lo especificado en la configuracion global */
+void GIL::IntegrationController::ParsearModeloIntegracion(GIL::IntegrationModelList& modelos, const std::string& xmlString, const wxString& configurationFilePath) const
+{
+        GTRACE("GIL::HL7::ControladorHL7::ParsearModeloIntegracion( modelo, [\n" << xmlString.c_str() << "\n] )");
+        wxXmlDocument xml;
+        std::string xpp; // XML Pretty Printed for extended information info.
+
+        wxStringInputStream flujoEntrada(wxString::FromUTF8(xmlString.c_str()));
+
+        if (!xml.Load(flujoEntrada,wxT("UTF 8"))) {
+                throw IntegrationException(_Std("Empty configuration"), "CONF");
+        }
+
+        wxXmlNode* raiz = xml.GetRoot();
+
+        if (raiz == NULL) {
+                throw IntegrationException(_Std("Empty configuration"), "CONF");
+        } else {
+                wxString xmlPrettyPrint;
+                wxStringOutputStream wsos;
+                if (xml.Save(wsos, 1)) {
+                        xpp = wsos.GetString().ToUTF8();
+                        LOG_TRACE("Integration", "Parsing XML Integration: " << std::endl << xpp.c_str());
+                }
+        }
+
+        std::string parserKey (raiz->GetName().ToUTF8());
+
+        if (m_mapParsers.find(parserKey) != m_mapParsers.end()) {
+                m_mapParsers.find(parserKey)->second->ParseIntegrationXML(modelos, raiz);
+                wxFileName absoluteFile(configurationFilePath.c_str());
+                if (absoluteFile.FileExists()) {
+                        absoluteFile = absoluteFile.GetPath();
+                }
+                for (GIL::IntegrationModelList::iterator it = modelos.begin(); it != modelos.end(); ++it) {
+                        GNC::GCS::Ptr<GIL::IModeloIntegracion>& modelo = (*it);
+                        //if action is open... absolutize files
+                        if (modelo->accion == GIL::IModeloIntegracion::TA_Open) {
+                                GIL::IModeloIntegracion::ListOfPaths absoluteFiles;
+                                for (GIL::IModeloIntegracion::ListOfPaths::iterator itFile = modelo->Files.begin(); itFile != modelo->Files.end(); ++itFile) {
+                                        wxFileName fileName(wxString::FromUTF8((*itFile).c_str()));
+                                        if (fileName.IsRelative() && absoluteFile.IsOk()) {
+                                                fileName.MakeAbsolute(absoluteFile.GetFullPath());
+                                        }
+                                        std::string pathStd(fileName.GetFullPath().ToUTF8());
+                                        absoluteFiles.push_back(pathStd);
+                                }
+                                modelo->Files = absoluteFiles;
+                        }
+                }
+
+        } else {
+                std::ostringstream ostr;
+                ostr << _Std("XML Parser Not Found. Key=") << parserKey << " " << xpp;
+                throw IntegrationException(ostr.str(), "CONF");
+        }
+}
+
+std::string GIL::IntegrationController::ParsesModelFromURL(const wxString& url) const
+{
+        LOG_STAT(ANON_STAT_INT_URL)
+        //parse ginkgo cloud uris
+        if (url.StartsWith(wxT("ginkgocadx://cloud:"))) {
+                GNC::GCS::CloudGetCommandParams* pParams = new GNC::GCS::CloudGetCommandParams(std::string(url.SubString(19, url.size() - 1).ToUTF8()), true);
+                GNC::GCS::CloudCommand* pCmd = new GNC::GCS::CloudCommand(pParams);
+                GNC::CommandController::Instance()->ProcessAsync("Downloading",pCmd, NULL);
+
+                return "";
+        }
+
+        //  ginkgocadx://?pacs=dicom%3A%2F%2FDCM4CHEE%40ironman%3A11112%3Fmethod%3Dget%26mode%3Dseries&action=retrieve&level=STUDY&query=0020%7C000D%3A1.3.6.1.4.1.39470.1.1.3.0.1.2.2259150805.5724.1353416100.533&aid=JIMENA
+        // ginkgocadx://?pacs=dicom%3A%2F%2FDCM4CHEE%40ironman%3A11112%3Fmethod%3Dget%26mode%3Dseries&action=dicomize&petition-id=asdf&scope=AA&patient-id=234234&episode-number=asewr&query
+        // ginkgocadx://?pacs=dicom%3A%2F%2FDCM4CHEE%40ironman%3A11112%3Fmethod%3Dget%26mode%3Dseries&action=dicomize&patient-id=234234&query=0010%7C0040%3AM&query=0010%7C0010%3ADoe%5Ejoe%20Charl
+
+
+        // ginkgocadx://?action=retrieve&pacs=test&level=STUDY&query=0020|000D:1.2.3.4.5.6 de un pacs id
+        // ginkgocadx://?action=retrieve&level=STUDY&query=0020|000D:1.2.3.4.5.6  | del pacs por defecto
+        /*
+        <?xml version="1.0" encoding="UTF-8"?>
+        <gnkworkflows>
+        <!-- Configuracion de PACS, estos son opcionales y se pueden declarar tantos como uno quiera. -->
+        <pacs sid="test" aet="DCM4CHEE" hostname="172.26.0.3" port="11112" tls="no" verify-credentials="no" retrieve-method="get" pdu="16384" retrieve-mode="series">
+        <!--sid: Identificador del pacs(obligatorio) -->
+        <!--aet: Application entity title (obligatorio) -->
+        <!--hostname: hostname o ip (obligatorio) -->
+        <!--port: puerto del PACS (obligatorio) -->
+        <!--tls (yes/no): usar tls. (por defecto no) -->
+        <!--verify-credentials (yes/no): Verificar credenciales del servidor PACS. (por defecto no) -->
+        <!--retrieve-method (get/move): Metodo de descargar del pacs (por defecto get) -->
+
+        <!--retrieve-mode (series/studies): Modo de obtencion (por defecto series) -->
+        	<!--pdu: Tamanio de la PDU. (por defecto=16384) -->
+        <!--pacs-user: Usuario de acceso al pacs. -->
+        <!--pacs-password: Password de acceso al PACS  -->
+        	<gnkworkflow action="retrieve" pacs-retrieve-sid="test">
+        <!-- action: flujo de trabajo a ejecutar {dicomize, retrieve} -->
+        <!-- pacs-retrieve-sid: Identificador del PACS del que se va a descargar la prueba. Puede ser uno almacenado en ginkgo cadx o alguno declarado anteriormente. Si no se especifica ninguno se utiliza el PACS por defecto. -->
+
+        			<!-- Nivel de consulta en el PACS (obligatorio) -->
+                <query-retrieve-level value="STUDY"/>
+        			<!-- query-retrieve-level modos: {PATIENT, STUDY, SERIES, IMAGE} -->
+
+                <!-- Metadatos para realizar la consulta en el PACS (obligatorio) -->
+                <metadata code="DICOM" key="0020|000D" value="1.2.3.4.5.6" />   <!-- StudyInstanceUID -->
+        			<!--code: tipo de codigo, solo esta soportado DICOM (obligatorio) -->
+        			<!--key: clave a buscar (obligatorio) -->
+        			<!--value: valor (obligatorio) -->
+        			<!-- Ejemplo SeriesInstanceUID: <metadata code="DICOM" key="0020|000E" value="2.18.840.1.113883.5.242.33.14.3.10110519171259.709.76244" /> -->
+        			<!-- Ejemplo AccessionNumber: <metadata code="DICOM" key="0008|0050" value="2011-27843782" /> -->
+
+        			<!-- Aplicacion que genera la llamada. Se usa para mensajeria y LOG (en este caso no hay mensajeria con esta operacion) (obligatorio) -->
+                <hce aid="JIMENA" />
+        </gnkworkflow>
+        	*/
+        // ginkgocadx://?action=retrieve&level=STUDY&query=0020|000D:1.2.3.4.5.6&aid=JIMENA
+
+        wxURI uri(url);
+        wxString query = uri.GetQuery();
+        std::string xmlIntegration;
+        if (!query.IsEmpty()) {
+                std::map<std::string, std::string> parameters;
+                std::list<std::string> listOfQueries; //query is an special multivalued parameter...
+                wxStringTokenizer tknzr(query, wxT("&"));
+                while (tknzr.HasMoreTokens()) {
+                        wxString token = tknzr.GetNextToken();
+                        if (token.StartsWith(wxT("query="))) {
+                                //special multivalued parameter...
+                                int pos = token.Find(wxT("="));
+                                listOfQueries.push_back(std::string(wxURI::Unescape(token.SubString(pos+1, token.size() - 1)).ToUTF8()));
+                        } else {
+                                if (token.Contains(wxT("="))) {
+                                        int pos = token.Find(wxT("="));
+                                        parameters[std::string(token.SubString(0, pos-1).Lower().ToUTF8())] = std::string(wxURI::Unescape(token.SubString(pos+1, token.size() - 1)).ToUTF8());
+                                } else {
+                                        parameters[std::string(token.Lower().ToUTF8())] = "";
+                                }
+                        }
+                }
+                wxXmlDocument doc;
+                doc.SetFileEncoding(wxT("UTF-8"));
+                doc.SetRoot(new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxT("gnkworkflows")));
+                //pacs parsing...
+                //pacs configuration from url is simple, you can configure:
+                //pacs=pacsid
+                //pacs=dicom://AET@host:port&method=<get/move>&mode=<STUDY/SERIES>
+                //pacs=dicom://DCM4CHEE@172.26.0.33:11112?method=WADO&wadourl=http://172.26.0.33:18080/wado => pacs=dicom://DCM4CHEE@172.26.0.33:11112?method=WADO&urlWado=http%3A%2F%2F172.26.0.33%3A18080%2Fwado
+                wxString pacsSid;
+                if (parameters.find("pacs") != parameters.end()) {
+                        wxString pacsParameter = wxString::FromUTF8(parameters["pacs"].c_str());
+                        if (pacsParameter.StartsWith(wxT("dicom://"))) {
+                                wxXmlNode* pacsNode = new wxXmlNode(doc.GetRoot(), wxXML_ELEMENT_NODE, wxT("pacs"));
+                                //randomSid
+                                pacsSid =  wxString::Format(wxT("temppacs%d"), (int) rand());
+                                pacsNode->AddAttribute(wxT("sid"),pacsSid);
+                                //parse url...
+                                wxURI pacsUri(pacsParameter);
+
+                                if (pacsUri.GetUserInfo().IsEmpty() || pacsUri.GetServer().IsEmpty()) {
+                                        throw IntegrationException("Error in pacs url format: dicom://AET@host:port", "URLPARSER");
+                                }
+                                pacsNode->AddAttribute(wxT("aet"), pacsUri.GetUserInfo());
+                                pacsNode->AddAttribute(wxT("hostname"), pacsUri.GetServer());
+                                if (!pacsUri.GetPort().IsEmpty()) {
+                                        pacsNode->AddAttribute(wxT("port"), pacsUri.GetPort());
+                                }
+
+                                //tokenize query &
+                                wxStringTokenizer dicomTknzr(pacsUri.GetQuery(), wxT("&"));
+                                while (dicomTknzr.HasMoreTokens()) {
+                                        wxString token = dicomTknzr.GetNextToken();
+                                        if (token.StartsWith(wxT("method="))) {
+                                                int pos = token.Find(wxT("="));
+                                                pacsNode->AddAttribute(wxT("retrieve-method"),wxURI::Unescape(token.SubString(pos+1, token.size() - 1)));
+                                        }
+                                        if (token.StartsWith(wxT("mode="))) {
+                                                int pos = token.Find(wxT("="));
+                                                pacsNode->AddAttribute(wxT("retrieve-mode"),wxURI::Unescape(token.SubString(pos+1, token.size() - 1)));
+                                        }
+                                        if (token.StartsWith(wxT("wadourl="))) {
+                                                int pos = token.Find(wxT("="));
+                                                pacsNode->AddAttribute(wxT("wado-url"),wxURI::Unescape(token.SubString(pos+1, token.size() - 1)));
+                                        }
+                                }
+                        } else {
+                                pacsSid = pacsParameter;
+                        }
+                }
+                //action parsing...
+                if (parameters.find("action") != parameters.end()) {
+                        wxXmlNode* workFlowNode = new wxXmlNode(doc.GetRoot(), wxXML_ELEMENT_NODE, wxT("gnkworkflow"));
+                        if (parameters["action"]=="retrieve") {
+                                //retrieve
+                                //action=retrieve&aid=JIMENA&query=group|element:value
+                                workFlowNode->AddAttribute(wxT("action"), wxT("retrieve"));
+                                if (!pacsSid.IsEmpty()) {
+                                        workFlowNode->AddAttribute(wxT("pacs-retrieve-sid"), pacsSid);
+                                }
+                                //retrieve..
+                                //parse level and query...
+                                if (parameters.find("level") != parameters.end()) {
+                                        wxXmlNode* qrLevel = new wxXmlNode(workFlowNode, wxXML_ELEMENT_NODE, wxT("query-retrieve-level"));
+                                        qrLevel->AddAttribute(wxT("value"), wxString::FromUTF8(parameters["level"].c_str()));
+                                }
+                                //aid
+                                if (parameters.find("aid") != parameters.end()) {
+                                        wxXmlNode* qrLevel = new wxXmlNode(workFlowNode, wxXML_ELEMENT_NODE, wxT("hce"));
+                                        qrLevel->AddAttribute(wxT("aid"), wxString::FromUTF8(parameters["aid"].c_str()));
+                                }
+                                //parse query...
+                                //query=0020|000D:1.2.3.4.5.6
+                                //<metadata code="DICOM" key="0020|000D" value="1.2.3.4.5.6" />
+                                for (std::list<std::string>::iterator it = listOfQueries.begin(); it != listOfQueries.end(); ++it) {
+                                        wxString queryString = wxString::FromUTF8((*it).c_str());
+                                        int colonPosition = queryString.Find(wxT(":"));
+                                        if (colonPosition == -1) {
+                                                throw IntegrationException("Malformated query string: group|element:value", "URLPARSER");
+                                        }
+                                        wxXmlNode* queryNode = new wxXmlNode(workFlowNode, wxXML_ELEMENT_NODE, wxT("metadata"));
+                                        queryNode->AddAttribute(wxT("code"), wxT("DICOM"));
+                                        queryNode->AddAttribute(wxT("key"), queryString.SubString(0, colonPosition-1));
+                                        queryNode->AddAttribute(wxT("value"), queryString.SubString(colonPosition+1, queryString.size() - 1));
+                                }
+                        } else if(parameters["action"] == "dicomize") {
+                                //dicomize...
+                                //action=dicomize&petition-id=asdf&scope=AA&patient-id=234234&episode-number=asewr&query...
+                                //action
+                                workFlowNode->AddAttribute(wxT("action"), wxT("dicomize"));
+                                //pacs
+                                if (!pacsSid.IsEmpty()) {
+                                        workFlowNode->AddAttribute(wxT("pacs-store-sid"), pacsSid);
+                                }
+                                //petition-id
+                                if (parameters.find("petition-id") != parameters.end()) {
+                                        workFlowNode->AddAttribute(wxT("petition-id"), wxString::FromUTF8(parameters["petition-id"].c_str()));
+                                }
+                                //scope
+                                if (parameters.find("scope") != parameters.end()) {
+                                        workFlowNode->AddAttribute(wxT("scope"), wxString::FromUTF8(parameters["scope"].c_str()));
+                                }
+                                //patient...
+                                if (parameters.find("patient-id") != parameters.end()) {
+                                        wxXmlNode* patientNode = new wxXmlNode(workFlowNode, wxXML_ELEMENT_NODE, wxT("patient"));
+                                        wxXmlNode* idNode = new wxXmlNode(patientNode, wxXML_ELEMENT_NODE, wxT("id"));
+                                        idNode->AddAttribute(wxT("code"),wxT("PI"));
+                                        idNode->AddAttribute(wxT("value"), wxString::FromUTF8(parameters["patient-id"].c_str()));
+                                        //episode-number
+                                        if (parameters.find("episode-number") != parameters.end()) {
+                                                wxXmlNode* episodeNumberNode = new wxXmlNode(patientNode, wxXML_ELEMENT_NODE, wxT("episode-number"));
+                                                new wxXmlNode(episodeNumberNode, wxXML_TEXT_NODE,wxT("content"),wxString::FromUTF8(parameters["episode-number"].c_str()));
+                                        }
+                                } else {
+                                        throw IntegrationException("patient-id parameter is required in dicomization process", "URLPARSER");
+                                }
+                                //parse query...
+                                //query=0020|000D:1.2.3.4.5.6
+                                //<metadata code="DICOM" key="0020|000D" value="1.2.3.4.5.6" />
+                                for (std::list<std::string>::iterator it = listOfQueries.begin(); it != listOfQueries.end(); ++it) {
+                                        wxString queryString = wxString::FromUTF8((*it).c_str());
+                                        int colonPosition = queryString.Find(wxT(":"));
+                                        if (colonPosition == -1) {
+                                                throw IntegrationException("Malformated query string: group|element:value", "URLPARSER");
+                                        }
+                                        wxXmlNode* queryNode = new wxXmlNode(workFlowNode, wxXML_ELEMENT_NODE, wxT("metadata"));
+                                        queryNode->AddAttribute(wxT("code"), wxT("DICOM"));
+                                        queryNode->AddAttribute(wxT("key"), queryString.SubString(0, colonPosition-1));
+                                        queryNode->AddAttribute(wxT("value"), queryString.SubString(colonPosition+1, queryString.size() - 1));
+                                }
+                        } else {
+                                throw IntegrationException("Unsupported action parameter", "URLPARSER");
+                        }
+                }
+
+                wxStringOutputStream out;
+                doc.Save(out);
+                xmlIntegration = std::string(out.GetString().ToUTF8());
+                LOG_DEBUG("ItegrationController", "Generated XML\n"<<xmlIntegration);
+        }
+
+        return xmlIntegration;
+}
+
diff --git a/cadxcore/main/controllers/integrationcontroller.h b/cadxcore/main/controllers/integrationcontroller.h
new file mode 100644
index 0000000..d99296a
--- /dev/null
+++ b/cadxcore/main/controllers/integrationcontroller.h
@@ -0,0 +1,93 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <map>
+#include <string>
+#include <api/imodelointegracion.h>
+#include <api/observers/ieventsobserver.h>
+#include <wx/string.h>
+#include <wx/xml/xml.h>
+namespace GNC
+{
+namespace GCS
+{
+class IModuleController;
+}
+}
+
+namespace GIL
+{
+class EXTAPI IntegrationException : public GNC::GCS::IException
+{
+public:
+        IntegrationException(const std::string& msg, const std::string& component="Modelo", bool fatal = true) throw() : GNC::GCS::IException(msg, component, fatal) {}
+};
+
+class EXTAPI IXMLIntegrationParser
+{
+public:
+        virtual ~IXMLIntegrationParser();
+        virtual std::list<std::string> GetKeys() = 0;
+        virtual void ParseIntegrationXML(GIL::IntegrationModelList& modelos, wxXmlNode* pRoot) = 0;
+};
+
+class EXTAPI IntegrationController : public GNC::GCS::IEventsObserver
+{
+public:
+        static IntegrationController* Instance();
+        static void FreeInstance();
+
+        bool Process(GIL::IntegrationModelList& models);
+
+        // Event listener realization
+        virtual std::string GetMessageFromIntegrationModel(GNC::GCS::Ptr<GIL::IModeloIntegracion>& integrationModel);
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+        /* devuelve el uid de modulo a partir del pid indicado*/
+        virtual std::string GetUID(const std::string& idPlantilla) const;
+        virtual std::string GetUIDModulo(const std::string& idPlantilla) const;
+        virtual std::string GetIdPlantilla(const std::string& uidModulo) const;
+
+        //parsers...
+        void RegisterParser(const std::string& xmlKey, const GNC::GCS::Ptr<IXMLIntegrationParser>& pParser);
+
+        void UnRegisterParser(const std::string& xmlKey);
+
+        /* Parsea la cadena XML y construye el modelo de integracion. Los parametros no encontrados se asignan por defecto segun lo especificado en la configuracion global */
+        virtual void ParsearModeloIntegracion(GIL::IntegrationModelList& modelos, const std::string& xmlString, const wxString& relativePath = wxEmptyString) const;
+
+        /* Parses ginkgocadx:// url */
+        virtual std::string ParsesModelFromURL(const wxString& url) const;
+
+protected:
+        IntegrationController();
+        ~IntegrationController();
+
+
+protected:
+        static IntegrationController* m_pInstance;
+        typedef std::map<std::string, GNC::GCS::Ptr<IXMLIntegrationParser> > TMapIntegrationXMLParsers;
+        TMapIntegrationXMLParsers m_mapParsers;
+
+
+};
+}
diff --git a/cadxcore/main/controllers/log4cplus/guiappender.cpp b/cadxcore/main/controllers/log4cplus/guiappender.cpp
new file mode 100644
index 0000000..a3762c5
--- /dev/null
+++ b/cadxcore/main/controllers/log4cplus/guiappender.cpp
@@ -0,0 +1,185 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <dcmtk/oflog/oflog.h>
+#include <dcmtk/oflog/helpers/loglog.h>
+#include <dcmtk/oflog/helpers/property.h>
+#include <dcmtk/oflog/helpers/timehelp.h>
+//#include <dcmtk/oflog/stringhelper.h>
+#include <dcmtk/oflog/spi/logevent.h>
+
+
+
+
+
+#include "guiappender.h"
+#include <api/internationalization/internationalization.h>
+
+#define MAX_LOG_BUFFER_SIZE 30
+
+using namespace dcmtk::log4cplus::helpers;
+using namespace dcmtk;
+
+class MutexScopedLock
+{
+public:
+        MutexScopedLock(dcmtk::log4cplus::thread::Mutex& mutex):
+                m_mutex(mutex)
+        {
+                m_mutex.lock();
+        }
+
+        ~MutexScopedLock()
+        {
+                m_mutex.unlock();
+        }
+private:
+        dcmtk::log4cplus::thread::Mutex& m_mutex;
+};
+
+gnkLog4cplus::GUIAppender* gnkLog4cplus::GUIAppender::m_pInstancia = NULL;
+
+
+
+gnkLog4cplus::GUIAppender* gnkLog4cplus::GUIAppender::Instance()
+{
+        if (m_pInstancia == NULL) {
+                m_pInstancia = new GUIAppender();
+        }
+        return m_pInstancia;
+}
+
+void gnkLog4cplus::GUIAppender::FreeInstance()
+{
+        if (m_pInstancia != NULL) {
+                delete m_pInstancia;
+                m_pInstancia = NULL;
+        }
+}
+
+gnkLog4cplus::GUIAppender::GUIAppender(bool logToStdErr_, bool immediateFlush_) :
+        logToStdErr(logToStdErr_),
+        immediateFlush(immediateFlush_),
+        m_pLogger(NULL),
+        llmCache(log4cplus::getLogLevelManager())
+{
+        Init();
+
+}
+
+gnkLog4cplus::GUIAppender::GUIAppender(const log4cplus::helpers::Properties properties) :
+        Appender(properties),
+        logToStdErr(false),
+        immediateFlush(false),
+        m_pLogger(NULL),
+        m_Logs(),
+        llmCache(log4cplus::getLogLevelManager())
+
+
+{
+        Init();
+}
+
+gnkLog4cplus::GUIAppender::GUIAppender(const GUIAppender& o) :
+        dcmtk::log4cplus::helpers::SharedObject(o),
+        dcmtk::log4cplus::Appender(),
+        logToStdErr(o.logToStdErr),
+        immediateFlush(o.immediateFlush),
+        m_pLogger(o.m_pLogger),
+        m_Logs(o.m_Logs),
+        llmCache(o.llmCache)
+{
+        Init();
+}
+
+void gnkLog4cplus::GUIAppender::Init()
+{
+        log4cplus::tostringstream dateTimeFormatStream;
+        dateTimeFormatStream << _Std("%Y/%m/%d %H:%M:%S.%q").c_str();
+        datetimeFormat = dateTimeFormatStream.str().c_str();
+}
+
+gnkLog4cplus::GUIAppender::~GUIAppender()
+{
+        destructorImpl();
+        m_pInstancia = NULL;
+}
+
+
+void gnkLog4cplus::GUIAppender::close()
+{
+        MutexScopedLock lock( m_mutex );
+        closed = true;
+        m_pLogger = NULL;
+        m_Logs.clear();
+}
+
+void gnkLog4cplus::GUIAppender::clear()
+{
+        MutexScopedLock lock( m_mutex );
+        m_Logs.clear();
+}
+
+void gnkLog4cplus::GUIAppender::Attach(GNC::GCS::Logging::ILogger* pLogger)
+{
+        if (this->closed) {
+                return;
+        }
+        MutexScopedLock lock( m_mutex );
+        m_pLogger = pLogger;
+        if (pLogger != NULL) {
+                for (ListaLogs::const_iterator it = m_Logs.begin(); it != m_Logs.end(); ++it) {
+                        pLogger->Append(*it);
+                }
+        }
+}
+
+void gnkLog4cplus::GUIAppender::append(const log4cplus::spi::InternalLoggingEvent& e)
+{
+        if (this->closed) {
+                return;
+        }
+
+        MutexScopedLock lock( m_mutex );
+        log4cplus::tostringstream formattedLog;
+        layout->formatAndAppend(formattedLog, e);
+
+
+
+        m_Logs.push_back(
+                GNC::GCS::Logging::LogEvent(
+                        e.getLoggerName().c_str(),
+                        llmCache.toString(e.getLogLevel()).c_str(),
+                        e.getTimestamp().getFormattedTime(datetimeFormat.c_str(), false).c_str(),
+                        e.getMessage().c_str(),
+                        formattedLog.str().c_str(),
+                        e.getThread().c_str()
+                )
+        );
+
+        if (m_pLogger != NULL) {
+                m_pLogger->Append(m_Logs.back());
+        }
+
+        if (m_Logs.size() > MAX_LOG_BUFFER_SIZE) {
+                m_Logs.pop_front();
+        }
+
+}
diff --git a/cadxcore/main/controllers/log4cplus/guiappender.h b/cadxcore/main/controllers/log4cplus/guiappender.h
new file mode 100644
index 0000000..dae9054
--- /dev/null
+++ b/cadxcore/main/controllers/log4cplus/guiappender.h
@@ -0,0 +1,84 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <dcmtk/oflog/appender.h>
+#include <sstream>
+#include <list>
+#include <api/ilock.h>
+#include "logdefines.h"
+
+
+namespace gnkLog4cplus
+{
+
+class  GUIAppender : public dcmtk::log4cplus::Appender
+{
+
+public:
+
+        static GUIAppender* Instance();
+
+        static void FreeInstance();
+
+        // Methods
+        virtual void close();
+
+        virtual void clear();
+
+        void Attach(GNC::GCS::Logging::ILogger* pLogger);
+
+private:
+        void Init();
+
+protected:
+
+        typedef std::list<GNC::GCS::Logging::LogEvent> ListaLogs;
+
+        // Ctors
+        GUIAppender(bool logToStdErr = false, bool immediateFlush = false);
+        GUIAppender(const dcmtk::log4cplus::helpers::Properties properties);
+        GUIAppender(const GUIAppender& o);
+
+        // Dtor
+        ~GUIAppender();
+        virtual void append(const dcmtk::log4cplus::spi::InternalLoggingEvent& event);
+
+        // Data
+        bool logToStdErr;
+        /**
+         * Immediate flush means that the underlying output stream
+         * will be flushed at the end of each append operation.
+         */
+        bool immediateFlush;
+
+        GNC::GCS::Logging::ILogger* m_pLogger;
+        ListaLogs                   m_Logs;
+
+        dcmtk::log4cplus::LogLevelManager& llmCache;
+        dcmtk::log4cplus::tstring         datetimeFormat;
+
+
+        static GUIAppender* m_pInstancia;
+
+        dcmtk::log4cplus::thread::Mutex m_mutex;
+};
+}
diff --git a/cadxcore/main/controllers/log4cplus/logdefines.h b/cadxcore/main/controllers/log4cplus/logdefines.h
new file mode 100644
index 0000000..8e48e73
--- /dev/null
+++ b/cadxcore/main/controllers/log4cplus/logdefines.h
@@ -0,0 +1,91 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/ilock.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Logging
+{
+
+class LogEvent
+{
+
+public:
+
+        LogEvent() {}
+
+        LogEvent(const std::string& lg, const std::string& ll,
+                 const std::string& ts, const std::string& m, const std::string& fm, const std::string& th)
+                : logger(lg),
+                  level(ll),
+                  timestamp(ts),
+                  msg(m),
+                  thread(th),
+                  formattedmsg(fm)
+        {
+        }
+
+        LogEvent(const LogEvent& o)
+        {
+                (*this) = o;
+        }
+
+        LogEvent& operator = (const LogEvent& o)
+        {
+                logger = o.logger;
+                level = o.level;
+                timestamp = o.timestamp;
+                msg = o.msg;
+                formattedmsg = o.formattedmsg;
+                thread = o.thread;
+                return *this;
+        }
+
+        ~LogEvent() {}
+
+        std::string logger;
+        std::string level;
+        std::string timestamp;
+        std::string msg;
+        std::string thread;
+        std::string formattedmsg;
+
+
+
+
+};
+
+
+class ILogger : public GNC::GCS::ILockable
+{
+public:
+        ILogger() {}
+        virtual ~ILogger() {}
+
+        virtual void Append(const LogEvent& le) = 0;
+
+};
+}
+}
+}
diff --git a/cadxcore/main/controllers/modalitysettingscontroller.cpp b/cadxcore/main/controllers/modalitysettingscontroller.cpp
new file mode 100644
index 0000000..502025a
--- /dev/null
+++ b/cadxcore/main/controllers/modalitysettingscontroller.cpp
@@ -0,0 +1,644 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/log.h>
+#include <wx/xml/xml.h>
+#include <wx/mstream.h>
+#include <wx/sstream.h>
+#include <wx/regex.h>
+#include <wx/sizer.h>
+#include <wx/display.h>
+
+#include "modalitysettingscontroller.h"
+#include <limits>
+#include <iomanip>
+#include <iostream>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/dicommanager.h>
+#include <api/dicom/dicomdataset.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/ivista.h>
+#include <api/internationalization/internationalization.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/entorno.h>
+
+
+
+#define MS_DOCUMENT_ROOT wxT("modality-settings")
+
+#define PROPERTY_NODE wxT("property")
+#define PROPERTY_KEY wxT("key")
+#define PROPERTY_VALUE wxT("value")
+
+#define DMS_ROOT wxT("def-mod-settings")
+#define DMS_ATT_MODALITY wxT("modality")
+#define DMS_ATT_INITIAL_WL wxT("initial-wl")
+#define DMS_ATT_INTERPOLATION wxT("interpolation-mode")
+#define DMS_ATT_INT_NEAREST wxT("nearest-neighbour")
+#define DMS_ATT_LINEAR wxT("linear")
+#define DMS_ATT_CUBIC wxT("cubic")
+
+#define WLS_ROOT wxT("window-levels")
+#define WL_ROOT wxT("window-level")
+#define WL_ATT_WINDOW wxT("window")
+#define WL_ATT_LEVEL wxT("level")
+#define WL_ATT_LABEL wxT("label")
+
+#define AS_ROOT wxT("annotation-settings")
+#define AN_NODE wxT("annotation")
+#define AN_ATT_POS wxT("position")
+#define AN_ATT_VALUE wxT("value")
+
+/////////////////////////////////////////////////////////////
+GNC::GCS::AnnotationSettings::AnnotationSettings()
+{
+        //default annotation settings...
+        {
+                /*
+                Paciente: ${0010|0020:?}                   // {PatientId}
+                Id Paciente: ${0010|0010:?}                // {PatientName}
+                */
+                std::ostringstream ostr;
+                ostr << _Std("Patient") << ": ${0010|0010:?}${NEWLINE}" << _Std("Patient ID") << ": ${0010|0020:?}";
+                annotation[TP_TopLeft] = ostr.str();
+        }
+        {
+                /*
+                ${0010|0040:?} ${0010|0030} ${0010,1010} // {Sex} {BirthDate} {PatientAge}
+                ${0010|1030:?} Kg ${0010|1020:?} m.      // {PatientWeight} {PatientSize}
+                ${0008|1030}                             // {Study Description}
+                ${0008|0020} ${0008|0030}                 // {StudyDate} {StudyTime}
+                ${0008|103E}                             // {SeriesDescription}
+                Modalidad: ${0008|0060}                  // {Modality}
+                */
+                std::ostringstream ostr;
+                ostr << "${0010|0040:?} ${0010|0030::date} ${0010,1010}${NEWLINE}${0010|1030:?} Kg ${0010|1020:?} m.${NEWLINE}${0008|1030}${NEWLINE}${0008|0020::date} ${0008|0030::time}${NEWLINE}${0008|103e}${NEWLINE}" << _Std("Modality") << ": ${0008|0060}";
+                annotation[TP_TopRight] = ostr.str();
+        }
+        {
+                /*
+                Imagen: ${SLICE.HEIGHT} x ${SLICE.WIDTH}
+                ${SLICE.WL.FULLTEXT}
+                Corte: ${SLICE.IDX} de ${SLICE.COUNT}
+                Volumen: ${VOLUME.IDX}
+                ${ANATOMICAL.REGION}${SLICE.VOXEL.SIZE}
+                */
+                std::ostringstream ostr;
+                ostr << _Std("Dimensions") << ": ${SLICE.WIDTH} x ${SLICE.HEIGHT}${NEWLINE}${SLICE.WL.FULLTEXT}${NEWLINE}${SLICE.IDX.FULLTEXT}${NEWLINE}${SLICE.THICKNESS.FULLTEXT}${NEWLINE}${SLICE.LOCATION.FULLTEXT}${NEWLINE}${SLICE.LATERALITY}${NEWLINE}${SLICE.VOXEL.SIZE}";
+                annotation[TP_BottomLeft] = ostr.str();
+        }
+        {
+                /*
+                ${0008|0021} {0008|0031} // {SeriesDate} {Seriestime}
+                ${0070|0081}             // {ImageDescription}
+                ${VIEW.COORDLABELS}
+                Hecho con Ginkgo CADx Pro
+                */
+                wxString appName ( wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetApplicationName().c_str()));
+                wxString madewith( wxString::Format(_("Made with %s"), appName.c_str()));
+
+                std::ostringstream ostr;
+                ostr << "${0008|0021::date} ${0008|0031::time}${NEWLINE}${0070|0081}${NEWLINE}${VIEW.COORDLABELS}${NEWLINE}" << madewith.ToUTF8();
+                annotation[TP_BottomRight] = ostr.str();
+        }
+}
+
+GNC::GCS::AnnotationSettings::AnnotationSettings(wxXmlNode* wlNode)
+{
+        for (wxXmlNode* child = wlNode->GetChildren(); child != NULL; child = child->GetNext()) {
+                if (child->GetName().CmpNoCase(AN_NODE) == 0) {
+                        long position = 0;
+                        child->GetAttribute(AN_ATT_POS, wxT("0")).ToLong(&position);
+                        if (position < TP_NumPos) {
+                                annotation[position] = child->GetAttribute(AN_ATT_VALUE, wxEmptyString).ToUTF8();
+                        }
+                } else {
+                        LOG_ERROR("HangingProtocol", "error deserializing WindowLevelSetting, unknown node " << child->GetName().ToUTF8());
+                }
+        }
+}
+
+GNC::GCS::AnnotationSettings::AnnotationSettings(const AnnotationSettings& other)
+{
+        for (int i = 0; i < TP_NumPos; ++i) {
+                annotation[i] = other.annotation[i];
+        }
+}
+
+GNC::GCS::AnnotationSettings::~AnnotationSettings()
+{
+}
+
+wxXmlNode* GNC::GCS::AnnotationSettings::serialize()
+{
+        wxXmlNode* wlNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, AS_ROOT);
+        for (int i = 0; i < TP_NumPos; ++i) {
+                wxXmlNode* annotationNode = new wxXmlNode(wlNode, wxXML_ELEMENT_NODE, AN_NODE);
+                annotationNode->AddAttribute(AN_ATT_POS, wxString::Format(wxT("%d"), (int) i));
+                annotationNode->AddAttribute(AN_ATT_VALUE, wxString::FromUTF8(annotation[i].c_str()));
+        }
+
+        return wlNode;
+}
+
+std::string GNC::GCS::AnnotationSettings::getAnnotation(TAnnotationPosition pos) const
+{
+        return annotation[pos];
+}
+
+void GNC::GCS::AnnotationSettings::setAnnotation(TAnnotationPosition pos, const std::string& annotation)
+{
+        this->annotation[pos] = annotation;
+}
+/////////////////////////////////////////////////////////////
+GNC::GCS::WindowLevelSetting::WindowLevelSetting(): window(0), level(127), label(_Std("Default"))
+{
+}
+
+GNC::GCS::WindowLevelSetting::WindowLevelSetting(double window, double level, const std::string& label)
+{
+        this->window = window;
+        this->level = level;
+        this->label = label;
+}
+
+GNC::GCS::WindowLevelSetting::WindowLevelSetting(wxXmlNode* wlNode)
+{
+        wlNode->GetAttribute(WL_ATT_WINDOW, wxEmptyString).ToDouble(&this->window);
+        wlNode->GetAttribute(WL_ATT_LEVEL, wxEmptyString).ToDouble(&this->level);
+        this->label = wlNode->GetAttribute(WL_ATT_LABEL, wxEmptyString).ToUTF8();
+}
+
+GNC::GCS::WindowLevelSetting::WindowLevelSetting(const WindowLevelSetting& other)
+{
+        window = other.window;
+        level = other.level;
+        label = other.label;
+}
+
+GNC::GCS::WindowLevelSetting::~WindowLevelSetting()
+{
+}
+
+wxXmlNode* GNC::GCS::WindowLevelSetting::serialize()
+{
+        wxXmlNode* wlNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, WL_ROOT);
+        wlNode->AddAttribute(WL_ATT_WINDOW, wxString::Format(wxT("%lf"), this->window));
+        wlNode->AddAttribute(WL_ATT_LEVEL, wxString::Format(wxT("%lf"), this->level));
+        wlNode->AddAttribute(WL_ATT_LABEL, wxString::FromUTF8(this->label.c_str()));
+
+        return wlNode;
+}
+
+double GNC::GCS::WindowLevelSetting::getWindow() const
+{
+        return window;
+}
+
+double GNC::GCS::WindowLevelSetting::getLevel() const
+{
+        return level;
+}
+
+const std::string& GNC::GCS::WindowLevelSetting::getLabel() const
+{
+        return label;
+}
+
+std::string GNC::GCS::WindowLevelSetting::toString() const
+{
+        std::ostringstream ostr;
+        ostr << std::setiosflags(std::ios::fixed) << std::setprecision(2);
+        ostr << "(";
+        ostr << window;
+        ostr << "/";
+        ostr << level;
+        ostr << ")";
+        ostr << label;
+        return ostr.str();
+}
+
+void GNC::GCS::WindowLevelSetting::setWindow(double window)
+{
+        this->window = window;
+}
+
+void GNC::GCS::WindowLevelSetting::setLevel(double level)
+{
+        this->level = level;
+}
+
+void GNC::GCS::WindowLevelSetting::setLabel(const std::string& label)
+{
+        this->label = label;
+}
+/////////////////////////////////////////////////////
+GNC::GCS::DefaultModalitySettings::DefaultModalitySettings(): annotationSettings(new AnnotationSettings())
+{
+        this->interpolationMode = TIM_LINEAR;
+}
+
+GNC::GCS::DefaultModalitySettings::DefaultModalitySettings(wxXmlNode* defaultSettingsNode):
+        interpolationMode(TIM_LINEAR),
+        annotationSettings(new AnnotationSettings())
+{
+        this->modality = defaultSettingsNode->GetAttribute(DMS_ATT_MODALITY, wxEmptyString).ToUTF8();
+        this->initialWindowLevelLabel = defaultSettingsNode->GetAttribute(DMS_ATT_INITIAL_WL, wxEmptyString).ToUTF8();
+        wxString strInterpolation = defaultSettingsNode->GetAttribute(DMS_ATT_INTERPOLATION, wxEmptyString);
+        if (strInterpolation.CompareTo(DMS_ATT_INT_NEAREST) == 0) {
+                interpolationMode = TIM_NEAREST_NEIGHBOUR;
+        } else if (strInterpolation.CompareTo(DMS_ATT_LINEAR) == 0) {
+                interpolationMode = TIM_LINEAR;
+        } else if (strInterpolation.CompareTo(DMS_ATT_CUBIC) == 0) {
+                interpolationMode = TIM_CUBIC;
+        }
+
+        for (wxXmlNode* child = defaultSettingsNode->GetChildren(); child != NULL; child = child->GetNext()) {
+                if (child->GetName().CmpNoCase(WLS_ROOT) == 0) {
+                        //layouts...
+                        for (wxXmlNode* wlChild = child->GetChildren(); wlChild != NULL; wlChild = wlChild->GetNext()) {
+                                if (wlChild->GetName().CmpNoCase(WL_ROOT) == 0) {
+                                        GNC::GCS::Ptr<WindowLevelSetting> pWL(new WindowLevelSetting(wlChild));
+                                        this->addWindowLevel(pWL);
+                                }
+                        }
+                } else if (child->GetName().CmpNoCase(AS_ROOT) == 0) {
+                        //annotation settings
+                        GNC::GCS::Ptr<AnnotationSettings> pAnot(new AnnotationSettings(child));
+                        this->setAnnotationSettings(pAnot);
+                } else {
+                        LOG_ERROR("HangingProtocol", "error deserializing DefaultModalitySettings, unknown node " << child->GetName().ToUTF8());
+                }
+        }
+}
+
+GNC::GCS::DefaultModalitySettings::DefaultModalitySettings(const DefaultModalitySettings& other)
+{
+        this->modality = other.modality;
+        this->initialWindowLevelLabel = other.initialWindowLevelLabel;
+        this->interpolationMode = other.interpolationMode;
+        this->annotationSettings = GNC::GCS::Ptr<GNC::GCS::AnnotationSettings>(new GNC::GCS::AnnotationSettings(*other.annotationSettings));
+        for (GNC::GCS::DefaultModalitySettings::TListOfWLSettings::const_iterator it = other.listOfWLSettings.begin(); it != other.listOfWLSettings.end(); ++it) {
+                if ((*it).IsValid()) {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> settings(new GNC::GCS::WindowLevelSetting(*(*it)));
+                        this->listOfWLSettings.push_back(settings);
+                }
+        }
+}
+
+GNC::GCS::DefaultModalitySettings::~DefaultModalitySettings()
+{
+}
+
+wxXmlNode* GNC::GCS::DefaultModalitySettings::serialize()
+{
+        wxXmlNode* defaultSettingsNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, DMS_ROOT);
+        defaultSettingsNode->AddAttribute(DMS_ATT_MODALITY, wxString::FromUTF8(this->modality.c_str()));
+        defaultSettingsNode->AddAttribute(DMS_ATT_INITIAL_WL, wxString::FromUTF8(this->initialWindowLevelLabel.c_str()));
+        wxString strInterpolation;
+        switch (interpolationMode) {
+        case TIM_NEAREST_NEIGHBOUR:
+                strInterpolation = DMS_ATT_INT_NEAREST;
+                break;
+        case TIM_LINEAR:
+                strInterpolation = DMS_ATT_LINEAR;
+                break;
+        case TIM_CUBIC:
+                strInterpolation = DMS_ATT_CUBIC;
+                break;
+        }
+        defaultSettingsNode->AddAttribute(DMS_ATT_INTERPOLATION, strInterpolation );
+
+        wxXmlNode* wlSettingsNode = new wxXmlNode(defaultSettingsNode, wxXML_ELEMENT_NODE, WLS_ROOT);
+        for (GNC::GCS::DefaultModalitySettings::TListOfWLSettings::const_iterator it = listOfWLSettings.begin(); it != listOfWLSettings.end(); ++it) {
+                if ((*it).IsValid()) {
+                        wlSettingsNode->AddChild((*it)->serialize());
+                }
+        }
+
+        defaultSettingsNode->AddChild(annotationSettings->serialize());
+
+        return defaultSettingsNode;
+}
+
+std::string GNC::GCS::DefaultModalitySettings::getDefaultWindowLevelLabel()
+{
+        return _Std("Default");
+}
+
+std::string GNC::GCS::DefaultModalitySettings::getAutocalculateWindowLevelLabel()
+{
+        return _Std("Autocalculate");
+}
+
+const GNC::GCS::DefaultModalitySettings::TListOfWLSettings& GNC::GCS::DefaultModalitySettings::getWLSettings() const
+{
+        return listOfWLSettings;
+}
+
+const std::string& GNC::GCS::DefaultModalitySettings::getModality() const
+{
+        return modality;
+}
+
+const std::string& GNC::GCS::DefaultModalitySettings::getInitialWindowLevelLabel() const
+{
+        return initialWindowLevelLabel;
+}
+
+GNC::GCS::DefaultModalitySettings::TInterpolationMode GNC::GCS::DefaultModalitySettings::getInterpolationMode() const
+{
+        return interpolationMode;
+}
+
+const GNC::GCS::Ptr<GNC::GCS::AnnotationSettings>& GNC::GCS::DefaultModalitySettings::getAnnotationSettings() const
+{
+        return annotationSettings;
+}
+
+void GNC::GCS::DefaultModalitySettings::setAnnotationSettings(const GNC::GCS::Ptr<GNC::GCS::AnnotationSettings>& pSettings)
+{
+        if (pSettings.IsValid()) {
+                annotationSettings = pSettings;
+        }
+}
+
+void GNC::GCS::DefaultModalitySettings::addWindowLevel(const GNC::GCS::Ptr<WindowLevelSetting>& wlSetting)
+{
+        if (wlSetting.IsValid()) {
+                listOfWLSettings.push_back(wlSetting);
+        }
+}
+
+void GNC::GCS::DefaultModalitySettings::clearWindowLevels()
+{
+        listOfWLSettings.clear();
+}
+
+void GNC::GCS::DefaultModalitySettings::setModality(const std::string& modality)
+{
+        this->modality = modality;
+}
+
+void GNC::GCS::DefaultModalitySettings::setInitialWindowLevelLabel(const std::string& label)
+{
+        this->initialWindowLevelLabel = label;
+}
+
+void GNC::GCS::DefaultModalitySettings::setInterpolationMode(TInterpolationMode mode)
+{
+        this->interpolationMode = mode;
+}
+
+
+/////////////////////////////////////////////////////
+
+
+/**
+Controller for hanging protocols
+*/
+GNC::GCS::ModalitySettingsController* GNC::GCS::ModalitySettingsController::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new ModalitySettingsController();
+        }
+        return m_pInstance;
+}
+
+void GNC::GCS::ModalitySettingsController::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+GNC::GCS::ModalitySettingsController::ModalitySettingsController()
+{
+        LoadFromConfiguration();
+}
+
+GNC::GCS::ModalitySettingsController::~ModalitySettingsController()
+{
+}
+GNC::GCS::ModalitySettingsController* GNC::GCS::ModalitySettingsController::m_pInstance = NULL;
+
+void GNC::GCS::ModalitySettingsController::LoadDefaultModalitySettings()
+{
+        //basic modality settings....
+        if (modalitySettings.find("CT") == modalitySettings.end()) {
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings(new GNC::GCS::DefaultModalitySettings());
+                modSettings->setModality("CT");
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(300,35,_Std("SPINAL")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(100,50,_Std("CRANIUM")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(1800,400,_Std("BONE")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(3600,1000,_Std("CRANIUM BONE")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(400,40,_Std("MEDIASTINUM")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(1500,-500,_Std("LUNG")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(2200,200,_Std("BREAST")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(2000,350,_Std("VERTEBRA")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                addModalitySettings(modSettings);
+        }
+        if (modalitySettings.find("MR") == modalitySettings.end()) {
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings(new GNC::GCS::DefaultModalitySettings());
+                modSettings->setModality("MR");
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(1600,678,_Std("ANGIO")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(150,500,_Std("CT CRANIUM")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(750,400,_Std("T1 CRANIUM")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(563,33,_Std("T2 CRANIUM")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                {
+                        GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(2030,1245,_Std("KNEE")));
+                        modSettings->addWindowLevel(wlSettings);
+                }
+                addModalitySettings(modSettings);
+        }
+
+        if (modalitySettings.find("CR") == modalitySettings.end()) {
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings(new GNC::GCS::DefaultModalitySettings());
+                modSettings->setModality("CR");
+                addModalitySettings(modSettings);
+        }
+
+        if (modalitySettings.find("US") == modalitySettings.end()) {
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings(new GNC::GCS::DefaultModalitySettings());
+                modSettings->setModality("US");
+                addModalitySettings(modSettings);
+        }
+
+        if (modalitySettings.find("MG") == modalitySettings.end()) {
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings(new GNC::GCS::DefaultModalitySettings());
+                modSettings->setModality("MG");
+                addModalitySettings(modSettings);
+        }
+
+        if (modalitySettings.find("NM") == modalitySettings.end()) {
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings(new GNC::GCS::DefaultModalitySettings());
+                modSettings->setModality("NM");
+                addModalitySettings(modSettings);
+        }
+
+        if (modalitySettings.find("RF") == modalitySettings.end()) {
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings(new GNC::GCS::DefaultModalitySettings());
+                modSettings->setModality("RF");
+                addModalitySettings(modSettings);
+        }
+
+        if (modalitySettings.find("SC") == modalitySettings.end()) {
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings(new GNC::GCS::DefaultModalitySettings());
+                modSettings->setModality("SC");
+                addModalitySettings(modSettings);
+        }
+
+        if (modalitySettings.find("XA") == modalitySettings.end()) {
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings(new GNC::GCS::DefaultModalitySettings());
+                modSettings->setModality("XA");
+                addModalitySettings(modSettings);
+        }
+
+        if (modalitySettings.find("OT") == modalitySettings.end()) {
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings(new GNC::GCS::DefaultModalitySettings());
+                modSettings->setModality("OT");
+                addModalitySettings(modSettings);
+        }
+
+        if (modalitySettings.find("PT") == modalitySettings.end()) {
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings(new GNC::GCS::DefaultModalitySettings());
+                modSettings->setModality("PT");
+                addModalitySettings(modSettings);
+        }
+
+}
+
+const GNC::GCS::ModalitySettingsController::TMapOfModalitySettings& GNC::GCS::ModalitySettingsController::getModalitySettingsMap()
+{
+        return this->modalitySettings;
+}
+
+void GNC::GCS::ModalitySettingsController::addModalitySettings(const GNC::GCS::Ptr<DefaultModalitySettings>& settings)
+{
+        if (settings.IsValid()) {
+                this->modalitySettings[settings->getModality()] = settings;
+        }
+}
+
+void GNC::GCS::ModalitySettingsController::clearModalitySettings()
+{
+        this->modalitySettings.clear();
+}
+
+GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> GNC::GCS::ModalitySettingsController::getModalitySettings(const std::string& modality)
+{
+        GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> ptr;
+        if (modalitySettings.find(modality) != modalitySettings.end()) {
+                ptr = modalitySettings[modality];
+        }
+        return ptr;
+}
+
+void GNC::GCS::ModalitySettingsController::StoreModalitySettingsConfiguration()
+{
+        //serialization...
+        wxXmlDocument doc;
+        wxXmlNode* root = new wxXmlNode(NULL, wxXML_ELEMENT_NODE,MS_DOCUMENT_ROOT);
+        doc.SetRoot(root);
+        for (TMapOfModalitySettings::const_iterator it = this->modalitySettings.begin(); it != this->modalitySettings.end(); ++it) {
+                root->AddChild((*it).second->serialize());
+        }
+        wxMemoryOutputStream out;
+        doc.SetFileEncoding(wxT("UTF-8"));
+        doc.Save(out,0);
+        char* vectorWidgets = new char[out.GetLength()];
+        out.CopyTo(vectorWidgets,out.GetLength());
+        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/ModalitySettings","DefaultModalitySettings", std::string(vectorWidgets, out.GetLength()));
+        delete[] vectorWidgets;
+}
+
+
+void GNC::GCS::ModalitySettingsController::LoadFromConfiguration()
+{
+        this->modalitySettings.clear();
+        LoadDefaultModalitySettings();
+        //Deserialize...
+        std::string serializedValue;
+
+        // silence the log about missing environment variables in modality settings
+        auto oldLogLevel = wxLog::GetLogLevel();
+        wxLog::SetLogLevel(wxLOG_Error);
+        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/ModalitySettings","DefaultModalitySettings", serializedValue);
+        wxLog::SetLogLevel(oldLogLevel);
+        if (!serializedValue.empty()) {
+                wxString wxSerializedValue = wxString::FromUTF8(serializedValue.c_str());
+                wxStringInputStream istream(wxSerializedValue);
+                wxXmlDocument doc;
+                if (doc.Load(istream)) {
+                        wxXmlNode* root = doc.GetRoot();
+                        if (root != NULL && root->GetName().CmpNoCase(MS_DOCUMENT_ROOT) == 0) {
+                                for (wxXmlNode* modalitySettingsNode = root->GetChildren(); modalitySettingsNode != NULL; modalitySettingsNode = modalitySettingsNode->GetNext()) {
+                                        if (modalitySettingsNode->GetName().CmpNoCase(DMS_ROOT) == 0) {
+                                                GNC::GCS::Ptr<DefaultModalitySettings> modalitySettings(new DefaultModalitySettings(modalitySettingsNode));
+                                                addModalitySettings(modalitySettings);
+                                        }
+                                }
+                        }
+                } else {
+                        LOG_ERROR("ModalitySettingsController", "Error deserializing modality settings");
+                }
+        }
+}
+
+
diff --git a/cadxcore/main/controllers/modalitysettingscontroller.h b/cadxcore/main/controllers/modalitysettingscontroller.h
new file mode 100644
index 0000000..13a65e6
--- /dev/null
+++ b/cadxcore/main/controllers/modalitysettingscontroller.h
@@ -0,0 +1,208 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+#include <map>
+#include <list>
+#include <api/autoptr.h>
+#include <api/dicom/idicom.h>
+class wxXmlNode;
+class wxSizer;
+class wxWindow;
+class wxSizerItem;
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+class Matcher;
+
+/**
+* Annotations settings
+*/
+class AnnotationSettings
+{
+public:
+        typedef enum TAnnotationPosition {
+                TP_TopLeft = 0,
+                TP_TopRight,
+                TP_BottomLeft,
+                TP_BottomRight,
+                TP_NumPos
+        } TAnnotationPosition;
+
+        AnnotationSettings();
+        AnnotationSettings(wxXmlNode* node);
+        AnnotationSettings(const AnnotationSettings& other);
+        ~AnnotationSettings();
+        /**
+        serialize to XML
+        */
+        wxXmlNode* serialize();
+
+        std::string getAnnotation(TAnnotationPosition pos) const;
+        void setAnnotation(TAnnotationPosition pos, const std::string& annotation);
+
+protected:
+        std::string annotation[TP_NumPos];
+};
+
+/**
+* window level setting
+*/
+class WindowLevelSetting
+{
+public:
+        WindowLevelSetting();
+        WindowLevelSetting(double window, double level, const std::string& label);
+        WindowLevelSetting(wxXmlNode* node);
+        WindowLevelSetting(const WindowLevelSetting& other);
+        ~WindowLevelSetting();
+        /**
+        serialize to XML
+        */
+        wxXmlNode* serialize();
+
+        double getWindow() const;
+        double getLevel() const;
+        const std::string& getLabel() const;
+
+        std::string toString() const;
+
+        void setWindow(double window);
+        void setLevel(double level);
+        void setLabel(const std::string& label);
+
+protected:
+        double window;
+        double level;
+        std::string label;
+};
+
+/**
+* default modality settings
+*/
+class DefaultModalitySettings
+{
+public:
+        typedef enum TInterpolationMode {
+                TIM_NEAREST_NEIGHBOUR,
+                TIM_LINEAR,
+                TIM_CUBIC
+        } TInterpolationMode;
+        typedef std::list<GNC::GCS::Ptr<WindowLevelSetting> > TListOfWLSettings;
+        DefaultModalitySettings();
+        DefaultModalitySettings(wxXmlNode* node);
+        DefaultModalitySettings(const DefaultModalitySettings& other);
+        ~DefaultModalitySettings();
+        /**
+        serialize to XML
+        */
+        wxXmlNode* serialize();
+
+        static std::string getDefaultWindowLevelLabel();
+        static std::string getAutocalculateWindowLevelLabel();
+
+        const TListOfWLSettings& getWLSettings() const;
+        const std::string& getModality() const;
+        const std::string& getInitialWindowLevelLabel() const;
+        TInterpolationMode getInterpolationMode() const;
+
+        const GNC::GCS::Ptr<AnnotationSettings>& getAnnotationSettings() const;
+        void setAnnotationSettings(const GNC::GCS::Ptr<AnnotationSettings>& pSettings);
+
+        void addWindowLevel(const GNC::GCS::Ptr<WindowLevelSetting>& wlSetting);
+        void clearWindowLevels();
+        void setModality(const std::string& modality);
+        void setInitialWindowLevelLabel(const std::string& label);
+        void setInterpolationMode(TInterpolationMode mode);
+protected:
+        std::string modality;
+        std::string initialWindowLevelLabel;
+        TInterpolationMode interpolationMode;
+        TListOfWLSettings listOfWLSettings;
+        GNC::GCS::Ptr<AnnotationSettings> annotationSettings;
+};
+
+
+/**
+modality settings controller class
+*/
+class ModalitySettingsController
+{
+public:
+        /**
+        modality settings map
+        */
+        typedef std::map<std::string, GNC::GCS::Ptr<DefaultModalitySettings> > TMapOfModalitySettings;
+
+        /**
+        Singleton method
+        */
+        static ModalitySettingsController* Instance();
+
+        /**
+        Free singleton
+        */
+        static void FreeInstance();
+
+        const TMapOfModalitySettings& getModalitySettingsMap();
+
+        void addModalitySettings(const GNC::GCS::Ptr<DefaultModalitySettings>& settings);
+
+        void clearModalitySettings();
+
+        GNC::GCS::Ptr<DefaultModalitySettings> getModalitySettings(const std::string& modality);
+
+        /**
+        stores modalitySettings list
+        */
+        void StoreModalitySettingsConfiguration();
+protected:
+        /**
+        Creation method
+        */
+        ModalitySettingsController();
+
+        void LoadDefaultModalitySettings();
+
+        /**
+        Destruction method
+        */
+        ~ModalitySettingsController();
+
+        /**
+        Load from configuration
+        */
+        void LoadFromConfiguration();
+
+        /**
+        singleton attribute
+        */
+        static ModalitySettingsController* m_pInstance;
+
+        /**
+        visualization modality settings
+        */
+        TMapOfModalitySettings modalitySettings;
+};
+}
+}
diff --git a/cadxcore/main/controllers/pacscontroller.cpp b/cadxcore/main/controllers/pacscontroller.cpp
new file mode 100644
index 0000000..446c236
--- /dev/null
+++ b/cadxcore/main/controllers/pacscontroller.cpp
@@ -0,0 +1,1684 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "dcmtk/dicomimg2dcm.h"
+#include "dcmtk/dicomservers.h"
+#include "dcmtk/dicomservice.h"
+#include "dcmtk/dicomnetclient.h"
+#include "dcmtk/dicomfindassociation.h"
+#include "dcmtk/dicommoveassociation.h"
+#include "dcmtk/dicomgetassociation.h"
+#include "dcmtk/dicomstoreassociation.h"
+#include "dcmtk/dicomprintassociation.h"
+#include "dcmtk/dicomcustomassociation.h"
+#include <dcmtk/dcmdata/dcrledrg.h>
+#include <dcmtk/dcmjpeg/djdecode.h>
+#include <dcmtk/dcmdata/dcdicdir.h>
+
+#include <string>
+#include <limits>
+#include <openssl/md5.h>
+
+#include "pacscontroller.h"
+#include <api/ientorno.h>
+#include <api/dicom/imodelodicom.h>
+#include <api/dicom/dcmdictionary.h>
+#include <main/entorno.h>
+#include <wx/filename.h>
+#include <wx/dir.h>
+#include <wx/file.h>
+#include <wx/tokenzr.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/dicommanager.h>
+/* curl stuff */
+#include <curl/curl.h>
+
+#ifdef verify
+#define MACRO_QUE_ESTORBA verify
+#undef verify
+#endif
+
+#include <dcmtk/dcmdata/dcdeftag.h>
+#include <dcmtk/dcmdata/dcdict.h>
+#include <dcmtk/dcmdata/dcdicent.h>
+
+#ifdef MACRO_QUE_ESTORBA
+#define verify MACRO_QUE_ESTORBA
+#endif
+
+
+namespace GIL
+{
+namespace DICOM
+{
+wxCSConv GetConv(const std::string& Charset)
+{
+        wxCSConv wxConv(wxFONTENCODING_ISO8859_1);
+        if (Charset == "ISO_IR 192" || Charset == "ISO_IR 6" || Charset == "ISO_IR 138") {
+                wxConv = wxCSConv(wxFONTENCODING_UTF8);
+        } else if (Charset == "ISO_IR 100") {
+                wxConv = wxCSConv(wxFONTENCODING_ISO8859_1);
+        } else if (Charset == "ISO_IR 101") {
+                wxConv = wxCSConv(wxFONTENCODING_ISO8859_2);
+        } else if (Charset == "ISO_IR 109") {
+                wxConv = wxCSConv(wxFONTENCODING_ISO8859_3);
+        } else if (Charset == "ISO_IR 110") {
+                wxConv = wxCSConv(wxFONTENCODING_ISO8859_4);
+        } else if (Charset == "ISO_IR 148") {
+                wxConv = wxCSConv(wxFONTENCODING_ISO8859_9);
+        } else if (Charset == "ISO_IR 144") {
+                wxConv = wxCSConv(wxFONTENCODING_ISO8859_5);
+        } else if (Charset == "ISO_IR 127") {
+                wxConv = wxCSConv(wxFONTENCODING_ISO8859_6);
+        } else if (Charset == "ISO_IR 126") {
+                wxConv = wxCSConv(wxFONTENCODING_ISO8859_7);
+        } else if (Charset == "ISO_IR 138") {
+                wxConv = wxCSConv(wxFONTENCODING_ISO8859_8);
+        }
+        return wxConv;
+}
+
+//helper compare instances
+bool compare_instances (std::pair<long, std::string> first, std::pair<long, std::string> second)
+{
+        return first.first < second.first;
+}
+
+PACSController* PACSController::m_pInstance = NULL;
+
+PACSController::PACSController()
+{
+        m_pServiceInstance = NULL;
+}
+
+PACSController::~PACSController()
+{
+        //std::cout << "PACSController destruyendose" << std::endl;
+        //std::cout << "PACSController destruido" << std::endl;
+}
+
+
+PACSController* PACSController::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new PACSController();
+        }
+        return m_pInstance;
+}
+
+void PACSController::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                m_pInstance->StopServer();
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+        //se desregistran los codecs dcmtk!
+        DJDecoderRegistration::cleanup();
+        DcmRLEDecoderRegistration::cleanup();
+        //purgar temp
+        PurgarDirectorioTemporal();
+}
+
+void PACSController::buildDicomDir()
+{
+
+}
+
+bool PACSController::LeerDicomDir(const std::string& pathDicomDir, IModeloDicom* pModelo)
+{
+        if(pModelo == NULL || !DICOMManager::EsDicom(pathDicomDir)) {
+                return false;
+        }
+
+        DcmDicomDir            dicomdir(pathDicomDir.c_str());
+        DcmDirectoryRecord *   root = &(dicomdir.getRootRecord());
+        DcmDirectoryRecord *   PatientRecord = NULL;
+        DcmDirectoryRecord *   StudyRecord = NULL;
+        DcmDirectoryRecord *   SeriesRecord = NULL;
+        DcmDirectoryRecord *   FileRecord = NULL;
+        OFString            tmpString;
+
+        wxFileName fileNameDicomDir(FROMPATH(pathDicomDir));
+        std::string basePath;
+        basePath = TOPATH(fileNameDicomDir.GetPath());
+
+        if(root != NULL) {
+                while (((PatientRecord = root->nextSub(PatientRecord)) != NULL)) {
+                        OFString uidPaciente, nombrePaciente, fechaNacimiento, sexo;
+                        PatientRecord->findAndGetOFString(DCM_PatientID,uidPaciente);
+                        PatientRecord->findAndGetOFString(DCM_PatientName,nombrePaciente);
+                        PatientRecord->findAndGetOFString(DCM_PatientBirthDate, fechaNacimiento);
+                        PatientRecord->findAndGetOFString(DCM_PatientSex, sexo);
+
+                        pModelo->InsertarPaciente(uidPaciente.c_str(),nombrePaciente.c_str(),fechaNacimiento.c_str(),sexo.c_str());
+                        while (((StudyRecord = PatientRecord->nextSub(StudyRecord)) != NULL)) {
+                                OFString uidEstudio, descripcionEstudio, fechaEstudio, horaEstudio, doctor, accesionNumber;
+                                StudyRecord->findAndGetOFString(DCM_StudyInstanceUID, uidEstudio);
+                                StudyRecord->findAndGetOFString(DCM_StudyDescription, descripcionEstudio);
+                                StudyRecord->findAndGetOFString(DCM_StudyDate, fechaEstudio);
+                                StudyRecord->findAndGetOFString(DCM_StudyTime, horaEstudio);
+                                StudyRecord->findAndGetOFString(DCM_ReferringPhysicianName, doctor);
+                                StudyRecord->findAndGetOFString(DCM_AccessionNumber, accesionNumber);
+
+                                pModelo->InsertarEstudio(uidPaciente.c_str(),uidEstudio.c_str(),accesionNumber.c_str(), descripcionEstudio.c_str(),"",fechaEstudio.c_str(),horaEstudio.c_str(),doctor.c_str());
+                                while (((SeriesRecord = StudyRecord->nextSub(SeriesRecord)) != NULL)) {
+                                        OFString uidSerie,modalidadSerie,fechaSerie,horaSerie,descripcionSerie,numeroSerie,doctorSerie;
+                                        SeriesRecord->findAndGetOFString(DCM_SeriesInstanceUID, uidSerie);
+                                        SeriesRecord->findAndGetOFString(DCM_Modality, modalidadSerie);
+                                        SeriesRecord->findAndGetOFString(DCM_SeriesDate, fechaSerie);
+                                        SeriesRecord->findAndGetOFString(DCM_SeriesTime, horaSerie);
+                                        SeriesRecord->findAndGetOFString(DCM_SeriesDescription, descripcionSerie);
+                                        SeriesRecord->findAndGetOFString(DCM_SeriesNumber, numeroSerie);
+                                        SeriesRecord->findAndGetOFString(DCM_ReferringPhysicianName, doctorSerie);
+
+                                        pModelo->InsertarSerie(uidEstudio.c_str(),uidSerie.c_str(),modalidadSerie.c_str(),fechaSerie.c_str(),horaSerie.c_str(),descripcionSerie.c_str(),numeroSerie.c_str(),doctorSerie.c_str());
+                                        while(((FileRecord = SeriesRecord->nextSub(FileRecord)) != NULL)) {
+                                                if(FileRecord->findAndGetOFStringArray(DCM_DirectoryRecordType,tmpString).good() && (tmpString == "IMAGE" || tmpString == "ENCAP DOC")) {
+                                                        if(FileRecord->findAndGetOFStringArray(DCM_ReferencedFileID,tmpString).good()) {
+                                                                OFString uidImagen,instanceNumber;
+                                                                FileRecord->findAndGetOFString(DCM_ReferencedSOPInstanceUIDInFile, uidImagen);
+                                                                FileRecord->findAndGetOFString(DCM_InstanceNumber, instanceNumber);
+
+                                                                wxString currentPath = FROMPATH(basePath);
+
+                                                                wxString wxStr = FROMPATH(tmpString);
+                                                                wxString separador = wxFileName::GetPathSeparator();
+                                                                wxString barra = wxT('\\');
+                                                                wxStr.Replace(barra,separador);
+
+                                                                if (wxFileExists(currentPath + separador + wxStr)) {
+                                                                        currentPath+= separador + wxStr;
+                                                                } else {
+                                                                        // recase: Get case insensitive path (if needed)
+                                                                        wxStringTokenizer tokenizer(wxStr, separador);
+                                                                        bool validPath = true; // When false, "recase" will do nothing more
+
+                                                                        while (validPath && tokenizer.HasMoreTokens() ) {
+                                                                                wxString relPathPart = tokenizer.GetNextToken();
+
+                                                                                if (tokenizer.HasMoreTokens()) { // Scanning subdirectories
+                                                                                        wxString entry;
+                                                                                        if (validPath && !wxDir::Exists(currentPath + separador + relPathPart)) {
+                                                                                                wxDir dir;
+                                                                                                bool cont = dir.Open(currentPath) && dir.GetFirst(&entry, wxEmptyString, wxDIR_DIRS | wxDIR_HIDDEN );
+                                                                                                bool found = false;
+                                                                                                while ( cont ) {
+                                                                                                        if (entry.CmpNoCase(relPathPart) == 0) {
+                                                                                                                found = true;
+                                                                                                                cont = false;
+                                                                                                        }
+                                                                                                        if (cont) {
+                                                                                                                cont = dir.GetNext(&entry);
+                                                                                                        }
+                                                                                                }
+                                                                                                if (!found) {
+                                                                                                        currentPath += separador + relPathPart; // Assign case sentitive subdir to current path. (Will be non-existing)
+                                                                                                        validPath = false;
+                                                                                                } else {
+                                                                                                        currentPath += separador + entry; // Assign case sentitive subdir to current path
+                                                                                                }
+                                                                                        } else {
+                                                                                                currentPath += separador + relPathPart; // Assign case sentitive subdir to current path (Could be non-existing if validPath == false)
+                                                                                        }
+
+                                                                                } else { // Scanning end file
+
+                                                                                        wxString entry;
+
+                                                                                        if (validPath && !wxFile::Access(currentPath + separador + relPathPart, wxFile::read)) {
+                                                                                                wxDir dir;
+                                                                                                bool cont = dir.Open(currentPath) && dir.GetFirst(&entry, wxEmptyString, wxDIR_FILES | wxDIR_HIDDEN );
+                                                                                                bool found = false;
+                                                                                                while ( cont ) {
+                                                                                                        if (entry.CmpNoCase(relPathPart) == 0) {
+                                                                                                                cont = false;
+                                                                                                                found = true;
+                                                                                                        }
+                                                                                                        if (cont) {
+                                                                                                                cont = dir.GetNext(&entry);
+                                                                                                        }
+                                                                                                }
+                                                                                                if (!found) {
+                                                                                                        currentPath += separador + relPathPart; // Assign case sentitive filename to current path. (Will be non-existing)
+                                                                                                        validPath = false;
+                                                                                                } else {
+                                                                                                        currentPath += separador + entry; // Assign case sentitive filename to current path
+                                                                                                }
+                                                                                        } else {
+                                                                                                currentPath += separador + relPathPart; // Assign case sentitive filename to current path (Could be non-existing if validPath == false)
+                                                                                        }
+                                                                                }
+
+                                                                        }
+                                                                }//end recase
+
+                                                                pModelo->InsertarImagen(uidSerie.c_str(), uidImagen.c_str(), instanceNumber.c_str(), std::string(TOPATH(currentPath)));
+                                                        }
+                                                }
+                                        }
+                                }
+                        }
+                }
+                return true;
+        } else {
+                return false;
+        }
+}
+
+bool PACSController::findAndGetTagFromFile(const std::string& ruta, unsigned short group, unsigned short element, std::string& value)
+{
+
+        DcmFileFormat dcm;
+        OFCondition   cond;
+        OFString      ofval;
+        bool          found = false;
+        cond = dcm.loadFile(ruta.c_str());
+        if (cond.good()) {
+                cond = dcm.getDataset()->findAndGetOFString(DcmTagKey(group, element), ofval);
+        }
+        if (cond.good()) {
+                value = ofval.c_str();
+                found = true;
+        }
+        return found;
+}
+
+bool PACSController::EsDICOM(const std::string& path, bool accept_dicomdir, bool accept_dicomfile) const
+{
+        bool valido = false;
+        char magic[5] = { 'X', 'X', 'X', 'X', 0 };
+        std::string emptystr;
+        std::fstream dcmfile;
+
+        dcmfile.open (path.c_str(), std::ios::in | std::ios::binary);
+
+        if (!dcmfile.eof() && dcmfile.good()) {
+                dcmfile.seekp (128, std::ios::beg);
+        }
+        if (!dcmfile.eof() && dcmfile.good() ) {
+                dcmfile.read (magic, 4);
+        }
+        if (!dcmfile.eof() && dcmfile.good()) {
+                if ( magic[0] == 'D' && magic[1] == 'I' && magic[2] == 'C' && magic[3] == 'M' ) {
+                        if (!accept_dicomdir || !accept_dicomfile) {
+                                // Leemos el tag 0004 0x1130 => Si existe es DICOMDIR
+                                bool has_dcmdirtag = false;
+                                GIL::DICOM::DicomDataset base;
+
+                                if (GIL::DICOM::PACSController::Instance()->findAndGetTagFromFile(path, 0x0004, 0x1200, emptystr)) {
+                                        has_dcmdirtag = true;
+                                }
+
+                                if (has_dcmdirtag) {
+                                        if (accept_dicomdir) {
+                                                valido = true;
+                                        }
+                                } else {
+                                        if (accept_dicomfile) {
+                                                valido = true;
+                                        }
+                                }
+                        } else {
+                                valido = true;
+                        }
+                }
+        }
+
+        dcmfile.close();
+        return valido;
+}
+
+bool PACSController::EsPDF(const std::string& path) const
+{
+        bool valido = false;
+        char magic[4] = { 'X', 'X', 'X', 'X' }; // %PDF
+        std::fstream pdffile;
+
+        pdffile.open (path.c_str(), std::ios::in | std::ios::binary);
+
+        if (!pdffile.eof() && pdffile.good() ) {
+                pdffile.read (magic, 4);
+        }
+        if (!pdffile.eof() && pdffile.good()) {
+                if ( magic[0] == '%' && magic[1] == 'P' && magic[2] == 'D' && magic[3] == 'F' ) {
+                        valido = true;
+                }
+        }
+        pdffile.close();
+
+        return valido;
+}
+
+void PACSController::FillInQuery(const GIL::DICOM::DicomDataset& base, DcmDataset* query, const GNC::GCS::Ptr<DicomServer>& server)
+{
+        wxCSConv conv = GetConv(server->GetDefaultCharset());
+        OFCondition cond;
+
+        typedef GIL::DICOM::DicomDataset TJerarquia;
+        //tags
+        for (ListaTags::const_iterator it = base.tags.begin(); it != base.tags.end(); ++it) {
+                DcmElement* e = GIL::DICOM::DICOMManager::CrearElementoConValor((*it).first.c_str());
+
+                if (e != NULL) {
+                        const std::string& val = (*it).second;
+                        if (val.size() > 0) {
+                                e->putString( wxString( (*it).second.c_str(), wxConvUTF8).mb_str(conv) );
+                        }
+                        cond = query->insert(e, true, false);
+
+                        if (cond.bad()) {
+                                LOG_ERROR("PACSCONTROLLER", "No se pudo insertar el elemento: (" << e->getTag().toString().c_str() << "): " << cond.text());
+                        }
+                }
+        }
+        //sequences
+        for (TJerarquia::DatasetList::const_iterator it2 = base.secuencias.begin(); it2 != base.secuencias.end(); ++it2) {
+                const TJerarquia& seq = (*it2);
+                DcmElement* es = GIL::DICOM::DICOMManager::CrearElementoConValor(seq.tagName.c_str());
+                if (es != NULL) {
+
+                        for (TJerarquia::DatasetList::const_iterator it3 = seq.items.begin(); it3 != seq.items.end(); ++it3) {
+                                const TJerarquia& item = (*it3);
+                                DcmItem* di = new DcmItem();
+
+                                for (ListaTags::const_iterator it4 = item.tags.begin(); it4 != item.tags.end(); ++it4) {
+                                        DcmElement* ei = GIL::DICOM::DICOMManager::CrearElementoConValor((*it4).first.c_str());
+                                        if (ei != NULL) {
+                                                const std::string& val = (*it4).second;
+                                                if (val.size() > 0) {
+                                                        ei->putString( wxString( (*it4).second.c_str(), wxConvUTF8).mb_str(conv) );
+                                                }
+                                                cond = di->insert(ei, true, false);
+
+                                                if (cond.bad()) {
+                                                        LOG_ERROR("PACSCONTROLLER", "No se pudo insertar el elemento: (" << ei->getTag().toString().c_str() << "): " << cond.text());
+                                                }
+                                        }
+
+                                }
+
+                                query->insertSequenceItem(es->getTag(), di);
+                        }
+                }
+        }
+}
+
+bool PACSController::Print(void* connectionKey, const std::string& serverId, const GIL::DICOM::DicomDataset& film, const GIL::DICOM::DicomDataset& layout, const GIL::DICOM::DicomDataset& job, const std::list<std::string> files, GNC::IProxyNotificadorProgreso* pNotificador)
+{
+        DicomServerList* listaServidores = DicomServerList::Instance();
+        GNC::GCS::Ptr<DicomServer> server = listaServidores->GetServer(serverId);
+        if (!server.IsValid()) {
+                LOG_ERROR("C-MOVE/C-GET", "Invalid server");
+                return false;
+        }
+        if (!server->GetReuseConnection()) {
+                ReleaseConnection(connectionKey);
+                GetConnection(connectionKey);
+        }
+        try {
+                PrintAssociation f(connectionKey, "C-PRINT", pNotificador);
+                OFCondition cond = f.Print(server, GNC::Entorno::Instance()->GetDicomLocalAET(), film, layout, job, files);
+                if (cond.bad()) {
+                        throw GIL::DICOM::PACSException(cond.text(), "GIL/DICOM/Print");
+                }
+        } catch(std::exception& ex) {
+                std::ostringstream os;
+                os << "Internal error: " << ex.what();
+                throw GIL::DICOM::PACSException(os.str(), "GIL/DICOM/Print");
+        }
+
+        return true;
+}
+
+
+bool PACSController::ObtenerEstudio(void* connectionKey, const std::string& serverId, const GIL::DICOM::DicomDataset& base, IModeloDicom* pModelo, GNC::IProxyNotificadorProgreso* pNotificador, bool link)
+{
+        DicomServerList* listaServidores = DicomServerList::Instance();
+        GNC::GCS::Ptr<DicomServer> server = listaServidores->GetServer(serverId);
+        if (!server.IsValid()) {
+                LOG_ERROR("C-MOVE/C-GET", "Invalid server");
+                return false;
+        }
+
+        wxCSConv conv = GetConv(server->GetDefaultCharset());
+
+        if (!server->GetReuseConnection()) {
+                ReleaseConnection(connectionKey);
+                GetConnection(connectionKey);
+        }
+
+        if (pModelo == NULL) {
+                return false;
+        }
+
+        DcmDataset query;
+        DcmElement* e = NULL;
+
+        e = newDicomElement(DCM_SpecificCharacterSet);
+        e->putString(server->GetDefaultCharset().c_str());
+        query.insert(e);
+
+        e = newDicomElement(DCM_PatientID);
+        if (query.insert(e).bad()) {
+                delete e;
+        }
+
+        e = newDicomElement(DCM_PatientName);
+        if (query.insert(e).bad()) {
+                delete e;
+        }
+
+        e = newDicomElement(DCM_StudyDate);
+        if (query.insert(e).bad()) {
+                delete e;
+        }
+
+        e = newDicomElement(DCM_StudyTime);
+        if (query.insert(e).bad()) {
+                delete e;
+        }
+
+        e = newDicomElement(DCM_StudyID);
+        if (query.insert(e).bad()) {
+                delete e;
+        }
+
+        FillInQuery(base, &query, server);
+
+        std::string localAET = GNC::Entorno::Instance()->GetDicomLocalAET();
+
+        if (server->GetRetrieveSeries() || server->GetRetrieveMethod() == DicomServer::WADO) {
+                //buscar + descargar series...
+                //we have to know the series uids and obtain series by series
+                e = newDicomElement(DCM_QueryRetrieveLevel);
+                e->putString(wxString( "SERIES", wxConvUTF8).mb_str(conv));
+                query.insert(e, true);
+
+                e = newDicomElement(DCM_SeriesInstanceUID);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                e = newDicomElement(DCM_Modality);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                std::list<std::string> listOfUIDS;
+                std::list<std::string> listOfModalities;
+                {
+                        NetClient<FindAssociation> f(connectionKey, "C-GET/FIND", pNotificador);
+
+                        std::string localAET = GNC::Entorno::Instance()->GetDicomLocalAET();
+
+                        if (server->useTLS) {
+                                f.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+                        }
+                        if (server->GetPACSUser() != "") {
+                                f.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+                        }
+
+                        f.QueryServer(&query, server, pModelo, localAET, CT_None);
+
+                        if (f.Stopped()) {
+                                return false;
+                        }
+                        DcmStack* stack = f.GetResultStack();
+
+                        unsigned int numResults = 0;
+
+                        numResults = stack->card();
+
+
+                        for (unsigned int i = 0; i < numResults; i++) {
+
+                                if (stack->elem(i)->ident() == EVR_dataset) {
+                                        DcmDataset* dset = dynamic_cast<DcmDataset*>(stack->elem(i));
+                                        if (dset) {
+                                                OFString OFSSeriesInstanceUID;
+                                                OFString OFSeriesModality;
+                                                if ( dset->findAndGetOFString(DCM_SeriesInstanceUID, OFSSeriesInstanceUID).good() && dset->findAndGetOFString(DCM_Modality, OFSeriesModality).good() ) {
+                                                        std::string seriesInstanceUID(OFSSeriesInstanceUID.c_str());
+                                                        std::string seriesModality(OFSeriesModality.c_str());
+
+                                                        listOfUIDS.push_back(seriesInstanceUID);
+                                                        listOfModalities.push_back(seriesModality);
+                                                }
+                                        }
+
+                                }
+                        }
+                }
+
+                for (std::list<std::string>::iterator itUIDS = listOfUIDS.begin(), itModalities = listOfModalities.begin();
+                     itUIDS != listOfUIDS.end(); ++itUIDS, ++itModalities) {
+                        //it's mandatory to release connection here to start one connection for each series
+                        ReleaseConnection(connectionKey);
+                        GetConnection(connectionKey);
+
+                        GIL::DICOM::DicomDataset baseAux = base;
+                        baseAux.tags["0020|000e"] = (*itUIDS);
+                        baseAux.tags["0008|0060"] = (*itModalities);
+                        ObtenerSerie(connectionKey, serverId, baseAux, pModelo, pNotificador, link);
+                }
+
+                query.clear();
+        } else if (server->GetRetrieveMethod() == DicomServer::MOVE) {
+                e = newDicomElement(DCM_QueryRetrieveLevel);
+                e->putString(wxString( "STUDY", wxConvUTF8).mb_str(conv));
+                query.insert(e, true);
+
+                if (server) {
+                        LOG_INFO("C-MOVE", "Obteniendo estudio del PACS " << serverId << ": " << server->AET << "@" << server->HostName << ":" << server->Port << " PDU=" << server->PDU << ", TLS=" << server->useTLS << ",  User = " << server->pacsUser << "Method=C-MOVE");
+                }
+
+                NetClient<MoveAssociation> a(connectionKey, "C-MOVE", pNotificador);
+
+                a.SetRole(Association::RT_Requestor);
+                a.SetModelo(pModelo);
+
+                if (server->useTLS) {
+                        a.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+                }
+                if (server->GetPACSUser() != "") {
+                        a.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+                }
+                a.QueryServer(&query, server, pModelo, localAET, CT_MoveSerie);
+
+        } else {
+
+                if (server) {
+                        LOG_INFO("C-GET", "Obteniendo estudio del PACS " << serverId << ": " << server->AET << "@" << server->HostName << ":" << server->Port << " PDU=" << server->PDU << ", TLS=" << server->useTLS << ",  User = " << server->pacsUser << ", Method=C-GET");
+                }
+
+                //we have to know the series uids and obtain series by series
+                e = newDicomElement(DCM_QueryRetrieveLevel);
+                e->putString(wxString( "SERIES", wxConvUTF8).mb_str(conv));
+                query.insert(e, true);
+
+                e = newDicomElement(DCM_SeriesInstanceUID);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                e = newDicomElement(DCM_Modality);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                NetClient<FindAssociation> f(connectionKey, "C-GET/FIND", pNotificador);
+
+                std::string localAET = GNC::Entorno::Instance()->GetDicomLocalAET();
+
+                if (server->useTLS) {
+                        f.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+                }
+                if (!server->GetPACSUser().empty()) {
+                        f.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+                }
+
+                f.QueryServer(&query, server, pModelo, localAET, CT_None);
+
+                if (f.Stopped()) {
+                        return false;
+                }
+                DcmStack* stack = f.GetResultStack();
+
+                unsigned int numResults = 0;
+
+                numResults = stack->card();
+
+                for (unsigned int i = 0; i < numResults; i++) {
+
+                        if (stack->elem(i)->ident() == EVR_dataset) {
+                                DcmDataset* dset = dynamic_cast<DcmDataset*>(stack->elem(i));
+                                if (dset) {
+                                        OFString OFSStudyInstanceUID;
+                                        OFString OFSSeriesInstanceUID;
+                                        OFString OFSeriesModality;
+                                        if ( dset->findAndGetOFString(DCM_SeriesInstanceUID, OFSSeriesInstanceUID).good() && dset->findAndGetOFString(DCM_Modality, OFSeriesModality).good() ) {
+                                                GIL::DICOM::DicomDataset baseAux = base;
+
+                                                if (dset->findAndGetOFString(DCM_StudyInstanceUID, OFSStudyInstanceUID).good()) {
+                                                        baseAux.tags["0020|000d"] = OFSStudyInstanceUID.c_str();
+                                                }
+
+                                                baseAux.tags["0020|000e"] = OFSSeriesInstanceUID.c_str();
+                                                baseAux.tags["0008|0060"] = OFSeriesModality.c_str();
+
+                                                ObtenerSerie(connectionKey, serverId, baseAux, pModelo, pNotificador, link);
+                                        }
+                                }
+
+                        }
+                }
+
+                query.clear();
+
+        }
+
+        return true;
+
+}
+
+bool PACSController::ObtenerSerie(void* connectionKey, const std::string& serverId, const GIL::DICOM::DicomDataset& base, IModeloDicom* pModelo, GNC::IProxyNotificadorProgreso* pNotificador, bool link)
+{
+        if (pModelo == NULL) {
+                return false;
+        }
+        DicomServerList* listaServidores = DicomServerList::Instance();
+        GNC::GCS::Ptr<DicomServer> server = listaServidores->GetServer(serverId);
+
+        if (!server.IsValid()) {
+                LOG_ERROR("C-MOVE/C-GET", "Invalid server");
+                return false;
+        }
+
+        wxCSConv conv = GetConv(server->GetDefaultCharset());
+
+        std::string modality;
+        if (base.tags.find("0008|0060") != base.tags.end()) {
+                modality = base.tags.find("0008|0060")->second;
+        }
+
+        DcmElement* e = NULL;
+        DcmDataset query;
+
+        unsigned int numResults = 0;
+
+        if (server->GetRetrieveMethod() == DicomServer::GET && modality.empty()) { // We have to find series modality
+                FillInQuery(base, &query, server);
+
+                e = newDicomElement(DCM_SpecificCharacterSet);
+                e->putString(server->GetDefaultCharset().c_str());
+                query.insert(e);
+
+                e = newDicomElement(DCM_QueryRetrieveLevel);
+                e->putString(wxString( "SERIES", wxConvUTF8).mb_str(conv));
+                query.insert(e, true);
+
+                e = newDicomElement(DCM_StudyInstanceUID);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                e = newDicomElement(DCM_SeriesInstanceUID);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                e = newDicomElement(DCM_Modality);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                NetClient<FindAssociation> f(connectionKey, "C-GET/FIND", pNotificador);
+
+                std::string localAET = GNC::Entorno::Instance()->GetDicomLocalAET();
+
+                if (server->useTLS) {
+                        f.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+                }
+                if (server->GetPACSUser() != "") {
+                        f.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+                }
+
+                if (!f.QueryServer(&query, server, pModelo, localAET, CT_None)) {
+                        return false;
+                }
+
+                if (f.Stopped()) {
+                        return false;
+                }
+                DcmStack* stack = f.GetResultStack();
+
+                OFString OFSeriesModality;
+
+                numResults = stack->card();
+                if (numResults >1) {
+                        LOG_WARN("C-GET", "Obteniendo serie del PACS " << serverId << ": " << server->AET << "@" << server->HostName << ":" << server->Port << " PDU=" << server->PDU << ", TLS=" << server->useTLS << ",  User = " << server->pacsUser << ", there have a Series with more than one modality, we are going to process only first modality");
+                }
+
+                for (unsigned int i = 0; i < numResults; i++) {
+
+                        if (stack->elem(i)->ident() == EVR_dataset) {
+                                DcmDataset* dset = dynamic_cast<DcmDataset*>(stack->elem(i));
+                                if (dset) {
+
+                                        if ( dset->findAndGetOFString(DCM_Modality, OFSeriesModality).good() && OFSeriesModality.size() > 0 ) {
+                                                modality = OFSeriesModality.c_str();
+                                                break;
+                                        }
+                                }
+
+                        }
+                }
+                query.clear();
+        }// end query modality
+
+        //association to make finds...
+        NetClient<FindAssociation> f(connectionKey, "C-GET/FIND", pNotificador);
+
+        std::string localAET = GNC::Entorno::Instance()->GetDicomLocalAET();
+
+        if (server->useTLS) {
+                f.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+        }
+        if (server->GetPACSUser() != "") {
+                f.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+        }
+
+        if (server->GetRetrieveMethod() == DicomServer::WADO) {
+                //we need to know StudyInstanceUID, SeriesInstanceUID and SopInstanceUID of all elements
+                std::string seriesInstanceUID, studyInstanceUID;
+                if (!base.getTag(GKDCM_SeriesInstanceUID, seriesInstanceUID)) {
+                        LOG_ERROR("PACSController", "to obtain a series you must specify seriesInstanceUID");
+                        return false;
+                }
+                if (!base.getTag(GKDCM_StudyInstanceUID, studyInstanceUID)) {
+                        FillInQuery(base, &query, server);
+
+                        e = newDicomElement(DCM_SpecificCharacterSet);
+                        e->putString(server->GetDefaultCharset().c_str());
+                        query.insert(e);
+
+                        e = newDicomElement(DCM_QueryRetrieveLevel);
+                        e->putString(wxString( "SERIES", wxConvUTF8).mb_str(conv));
+                        query.insert(e, true);
+
+                        e = newDicomElement(DCM_StudyInstanceUID);
+                        if (query.insert(e).bad()) {
+                                delete e;
+                        }
+
+                        e = newDicomElement(DCM_SeriesInstanceUID);
+                        if (query.insert(e).bad()) {
+                                delete e;
+                        }
+
+                        if (!f.QueryServer(&query, server, pModelo, localAET, CT_None)) {
+                                return false;
+                        }
+
+                        if (f.Stopped()) {
+                                return false;
+                        }
+                        DcmStack* stack = f.GetResultStack();
+
+                        OFString tempOf;
+
+                        for (unsigned int i = 0; i < stack->card(); i++) {
+
+                                if (stack->elem(i)->ident() == EVR_dataset) {
+                                        DcmDataset* dset = dynamic_cast<DcmDataset*>(stack->elem(i));
+                                        if (dset) {
+
+                                                if ( dset->findAndGetOFString(DCM_StudyInstanceUID, tempOf).good() && tempOf.size() > 0 ) {
+                                                        studyInstanceUID = tempOf.c_str();
+                                                        break;
+                                                }
+                                        }
+
+                                }
+                        }
+                        query.clear();
+                }
+                if (studyInstanceUID.empty()) {
+                        LOG_ERROR("PACSController", "StudyInstanceUID not found");
+                        return false;
+                }
+
+                //now we have to get all sop instance uids...
+                f.DeleteResultStack();
+                e = newDicomElement(DCM_SpecificCharacterSet);
+                e->putString(server->GetDefaultCharset().c_str());
+                query.insert(e);
+
+                e = newDicomElement(DCM_QueryRetrieveLevel);
+                e->putString(wxString( "IMAGE", wxConvUTF8).mb_str(conv));
+                query.insert(e, true);
+
+                e = newDicomElement(DCM_SeriesInstanceUID);
+                e->putString(wxString( seriesInstanceUID.c_str(), wxConvUTF8).mb_str(conv));
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                e = newDicomElement(DCM_SOPInstanceUID);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                e = newDicomElement(DCM_InstanceNumber);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                if (!f.QueryServer(&query, server, pModelo, localAET, CT_None)) {
+                        return false;
+                }
+
+                if (f.Stopped()) {
+                        return false;
+                }
+                DcmStack* stack = f.GetResultStack();
+
+                OFString tempOf;
+                std::list<std::pair<long, std::string> > instances;
+
+                for (unsigned int i = 0; i < stack->card(); i++) {
+                        if (stack->elem(i)->ident() == EVR_dataset) {
+                                DcmDataset* dset = dynamic_cast<DcmDataset*>(stack->elem(i));
+                                if (dset) {
+                                        if ( dset->findAndGetOFString(DCM_SOPInstanceUID, tempOf).good() && tempOf.size() > 0 ) {
+                                                const std::string sopInstanceUID = tempOf.c_str();
+                                                long instanceNumber;
+                                                std::pair<long, std::string> item;
+                                                item.second = sopInstanceUID;
+                                                if ( dset->findAndGetLongInt(DCM_InstanceNumber, instanceNumber).good() ) {
+                                                        item.first = instanceNumber;
+                                                } else {
+                                                        item.first = LONG_MAX;
+                                                }
+                                                instances.push_back(item);
+                                        }
+                                }
+                        }
+                }
+                query.clear();
+
+                //sort by instance number...
+                instances.sort(compare_instances);
+                std::list<std::string> sopInstanceUIDs;
+                std::list<long> instanceNumbers;
+                for (std::list<std::pair<long, std::string> >::const_iterator it = instances.begin(); it != instances.end(); ++it) {
+                        sopInstanceUIDs.push_back((*it).second);
+                        instanceNumbers.push_back((*it).first);
+                }
+
+                //now we have studyInstanceUID, seriesInstanceUID and sopInstancesUIDS.... download it!
+                return DownloadWADOImages(serverId, studyInstanceUID, seriesInstanceUID, sopInstanceUIDs, instanceNumbers, pModelo, pNotificador, link);
+        }//end wado
+        else {
+                //get and move
+                FillInQuery(base, &query, server);
+
+                e = newDicomElement(DCM_SpecificCharacterSet);
+                e->putString(server->GetDefaultCharset().c_str());
+                query.insert(e);
+
+                e = newDicomElement(DCM_QueryRetrieveLevel);
+                e->putString(wxString( "SERIES", wxConvUTF8).mb_str(conv));
+                query.insert(e, true);
+
+                e = newDicomElement(DCM_SeriesInstanceUID);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                e = newDicomElement(DCM_Modality);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                e = newDicomElement(DCM_SeriesNumber);
+                if (query.insert(e).bad()) {
+                        delete e;
+                }
+
+                std::string localAET = GNC::Entorno::Instance()->GetDicomLocalAET();
+
+                if (server->GetRetrieveMethod() == DicomServer::MOVE) {
+
+                        if (server) {
+                                LOG_INFO("C-MOVE", "Downloading series from PACS " << serverId << ": " << server->AET << "@" << server->HostName << ":" << server->Port << " PDU=" << server->PDU << ", TLS=" << server->useTLS << ",  User = " << server->pacsUser << ", Method=C-MOVE");
+                        }
+
+                        if (server) {
+                                LOG_INFO("C-MOVE", "Downloading study from PACS " << serverId << ": " << server->AET << "@" << server->HostName << ":" << server->Port << " PDU=" << server->PDU << ", TLS=" << server->useTLS << ",  User = " << server->pacsUser << ", Method=C-MOVE");
+                        }
+
+                        NetClient<MoveAssociation> a(connectionKey, "C-MOVE", pNotificador);
+                        a.SetRole(Association::RT_Requestor);
+                        a.SetModelo(pModelo);
+
+
+                        if (server->useTLS) {
+                                a.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+                        }
+                        if (server->GetPACSUser() != "") {
+                                a.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+                        }
+                        if (!a.QueryServer(&query, server, pModelo, localAET, CT_MoveSerie)) {
+                                return false;
+                        }
+                } else {
+                        if (server) {
+                                LOG_INFO("C-GET", "Downloading series from PACS " << serverId << ": " << server->AET << "@" << server->HostName << ":" << server->Port << " PDU=" << server->PDU << ", TLS=" << server->useTLS << ",  User = " << server->pacsUser << ", Method=C-GET");
+                        }
+
+                        NetClient<GetAssociation> a(connectionKey, "C-GET", pNotificador);
+                        a.SetWellKnownNumResults(numResults);
+                        a.SetStorageSOPClasses(GIL::DICOM::Conformance::GetModalities().GetSupportedSOPClassUIDs(modality));
+                        a.SetModelo(pModelo);
+
+                        if (server->useTLS) {
+                                a.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+                        }
+                        if (server->GetPACSUser() != "") {
+                                a.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+                        }
+                        if (!a.QueryServer(&query, server, pModelo, localAET, CT_MoveSerie)) {
+                                return false;
+                        }
+                }
+                query.clear();
+        }
+        return true;
+
+}
+
+bool PACSController::ObtenerImagen(void* connectionKey, const std::string& serverId, const GIL::DICOM::DicomDataset& base, IModeloDicom* pModelo,GNC::IProxyNotificadorProgreso* pNotificador)
+{
+        if (pModelo == NULL) {
+                return false;
+        }
+        DicomServerList* listaServidores = DicomServerList::Instance();
+        GNC::GCS::Ptr<DicomServer> server = listaServidores->GetServer(serverId);
+
+        if (!server.IsValid()) {
+                LOG_ERROR("C-MOVE/C-GET", "Invalid server");
+                return false;
+        }
+
+        wxCSConv conv = GetConv(server->GetDefaultCharset());
+
+        DcmDataset query;
+        DcmElement* e = NULL;
+
+        FillInQuery(base, &query, server);
+
+        e = newDicomElement(DCM_SpecificCharacterSet);
+        e->putString(server->GetDefaultCharset().c_str());
+        query.insert(e);
+
+        e = newDicomElement(DCM_QueryRetrieveLevel);
+        e->putString(wxString( "IMAGE", wxConvUTF8).mb_str(conv));
+        query.insert(e, true);
+
+        e = newDicomElement(DCM_InstanceNumber);
+        if (query.insert(e).bad()) {
+                delete e;
+        }
+
+        std::string localAET = GNC::Entorno::Instance()->GetDicomLocalAET();
+
+        if (server->GetRetrieveMethod() == DicomServer::MOVE) {
+
+                if (server) {
+                        LOG_INFO("C-MOVE", "Downloading imagen from PACS " << serverId << ": " << server->AET << "@" << server->HostName << ":" << server->Port << " PDU=" << server->PDU << ", TLS=" << server->useTLS << ",  User = " << server->pacsUser << ", Method=C-MOVE");
+                }
+
+                NetClient<MoveAssociation> a(connectionKey, "C-MOVE", pNotificador);
+                a.SetModelo(pModelo);
+
+                if (server->useTLS) {
+                        a.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+                }
+                if (server->GetPACSUser() != "") {
+                        a.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+                }
+                if (!a.QueryServer(&query, server, pModelo, localAET, CT_MoveImagen)) {
+                        return false;
+                }
+
+        } else if (server->GetRetrieveMethod() == DicomServer::GET) {
+
+                if (server) {
+                        LOG_INFO("C-GET", "Downloading image from PACS " << serverId << ": " << server->AET << "@" << server->HostName << ":" << server->Port << " PDU=" << server->PDU << ", TLS=" << server->useTLS << ",  User = " << server->pacsUser << ", Method=C-GET");
+                }
+
+                NetClient<GetAssociation> a(connectionKey, "C-GET", pNotificador);
+                a.SetModelo(pModelo);
+
+                if (server->useTLS) {
+                        a.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+                }
+                if (server->GetPACSUser() != "") {
+                        a.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+                }
+                if (!a.QueryServer(&query, server, pModelo, localAET, CT_MoveImagen))  {
+                        return false;
+                }
+        } else if (server->GetRetrieveMethod() == DicomServer::WADO) {
+                //we have to get seriesInstance and studyInstanceUID...
+                std::string seriesInstanceUID, studyInstanceUID;
+                if (!base.getTag(GKDCM_SeriesInstanceUID, seriesInstanceUID) || !base.getTag(GKDCM_StudyInstanceUID, studyInstanceUID)) {
+                        FillInQuery(base, &query, server);
+
+                        e = newDicomElement(DCM_SpecificCharacterSet);
+                        e->putString(server->GetDefaultCharset().c_str());
+                        query.insert(e);
+
+                        e = newDicomElement(DCM_QueryRetrieveLevel);
+                        e->putString(wxString( "IMAGE", wxConvUTF8).mb_str(conv));
+                        query.insert(e, true);
+
+                        e = newDicomElement(DCM_StudyInstanceUID);
+                        if (query.insert(e).bad()) {
+                                delete e;
+                        }
+                        e = newDicomElement(DCM_SeriesInstanceUID);
+                        if (query.insert(e).bad()) {
+                                delete e;
+                        }
+
+                        //association to make finds...
+                        NetClient<FindAssociation> f(connectionKey, "WADO/FIND", pNotificador);
+
+                        std::string localAET = GNC::Entorno::Instance()->GetDicomLocalAET();
+
+                        if (server->useTLS) {
+                                f.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+                        }
+                        if (server->GetPACSUser() != "") {
+                                f.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+                        }
+
+
+                        if (!f.QueryServer(&query, server, pModelo, localAET, CT_None)) {
+                                return false;
+                        }
+
+                        if (f.Stopped()) {
+                                return false;
+                        }
+                        DcmStack* stack = f.GetResultStack();
+
+                        OFString tempOf;
+
+                        for (unsigned int i = 0; i < stack->card(); i++) {
+
+                                if (stack->elem(i)->ident() == EVR_dataset) {
+                                        DcmDataset* dset = dynamic_cast<DcmDataset*>(stack->elem(i));
+                                        if (dset) {
+
+                                                if ( dset->findAndGetOFString(DCM_StudyInstanceUID, tempOf).good() && tempOf.size() > 0 ) {
+                                                        studyInstanceUID = tempOf.c_str();
+                                                }
+                                                if ( dset->findAndGetOFString(DCM_SeriesInstanceUID, tempOf).good() && tempOf.size() > 0 ) {
+                                                        seriesInstanceUID = tempOf.c_str();
+                                                }
+                                        }
+                                }
+                        }
+                        query.clear();
+                }
+                if (studyInstanceUID.empty() || seriesInstanceUID.empty()) {
+                        LOG_ERROR("PACSController", "StudyInstanceUID or SeriesInstanceUID not found");
+                        return false;
+                }
+                std::list<std::string> sopInstanceUIDs;
+                sopInstanceUIDs.push_back(base.getTag(GKDCM_SOPInstanceUID));
+                std::list<long> instanceNumbers;
+                instanceNumbers.push_back(0);
+                //now we have studyInstanceUID, seriesInstanceUID and sopInstancesUIDS.... download it!
+                return DownloadWADOImages(serverId, studyInstanceUID, seriesInstanceUID, sopInstanceUIDs, instanceNumbers, pModelo, pNotificador, false);
+        }
+        return true;
+}
+
+size_t write_data(void *ptr, size_t size, size_t nmemb, FILE *stream)
+{
+        size_t written = fwrite(ptr, size, nmemb, stream);
+        return written;
+}
+
+//sopinstanceuids are sorted by instance number!
+bool PACSController::DownloadWADOImages(const std::string& serverId,
+                                        const std::string& studyInstanceUID,
+                                        const std::string& seriesInstanceUID,
+                                        const std::list<std::string>& sopInstanceUID,
+                                        const std::list<long>& instanceNumbers,
+                                        IModeloDicom* pModelo,
+                                        GNC::IProxyNotificadorProgreso* pNotificador,
+                                        bool link)
+{
+        DicomServerList* listaServidores = DicomServerList::Instance();
+        GNC::GCS::Ptr<DicomServer> server = listaServidores->GetServer(serverId);
+
+        std::string pathOfSeries = GNC::Entorno::Instance()->CrearDirectorioTemporal();
+
+        int curr = 1;
+        std::list<long>::const_iterator itInstanceNumber = instanceNumbers.begin();
+        for (std::list<std::string>::const_iterator itSopInstances = sopInstanceUID.begin(); itSopInstances != sopInstanceUID.end(); ++itSopInstances, curr++, itInstanceNumber++) {
+                std::ostringstream progress;
+                progress << _Std("Downloading file") << " " << curr << "/" << sopInstanceUID.size();
+                if (!pNotificador->NotificarProgreso((float)(curr)/sopInstanceUID.size(), progress.str())) {
+                        return false;
+                }
+                std::ostringstream ostr;
+                ostr << server->GetWADOURI();
+                if (server->GetWADOURI().find("?") == std::string::npos) {
+                        ostr << "?";
+                } else {
+                        ostr << "&";
+                }
+                ostr << "requestType=WADO&contentType=application/dicom&studyUID=" << studyInstanceUID;
+                ostr << "&seriesUID=" << seriesInstanceUID;
+                ostr << "&objectUID=" << (*itSopInstances);
+                std::string url = ostr.str();
+
+                LOG_DEBUG("DownloadWADOImages", "Downloading url: " << url)
+                if (link && curr > 1) {
+                        //link it
+                        const IModeloSerie* pSeries;
+                        pModelo->BuscarSerie(seriesInstanceUID, &pSeries);
+                        std::ostringstream ostr;
+                        ostr << (*itInstanceNumber);
+                        pModelo->InsertarImagen(seriesInstanceUID,(*itSopInstances), ostr.str(),url);
+                } else {
+                        //download first file of the series...
+                        std::ostringstream ofilePath;
+                        ofilePath << pathOfSeries << (char)wxFileName::GetPathSeparator();
+                        ofilePath << (*itSopInstances);
+                        std::string filePath = ofilePath.str();
+                        if (DownloadFileFromURL(url, filePath, pNotificador)) {
+                                DICOMManager dm;
+                                GIL::DICOM::DicomDataset base;
+                                dm.CargarFichero(filePath, base);
+                                const IModeloPaciente& paciente = pModelo->InsertarPaciente(base.getTag(GKDCM_PatientID), base.getTag(GKDCM_PatientName), base.getTag(GKDCM_PatientBirthDate), base.getTag(GKDCM_PatientSex));
+                                pModelo->InsertarEstudio(paciente.GetUID(), base.getTag(GKDCM_StudyInstanceUID), base.getTag(GKDCM_AccessionNumber), base.getTag(GKDCM_StudyDescription), base.getTag(GKDCM_ModalitiesInStudy), base.getTag(GKDCM_StudyDate), base.getTag(GKDCM_StudyTime), base.getTag(GKDCM_ReferringPhysicianName));
+                                pModelo->InsertarSerie(base.getTag(GKDCM_StudyInstanceUID), base.getTag(GKDCM_SeriesInstanceUID), base.getTag(GKDCM_SeriesType), base.getTag(GKDCM_SeriesDate), base.getTag(GKDCM_SeriesTime), base.getTag(GKDCM_SeriesDescription), base.getTag(GKDCM_SeriesNumber),base.getTag(GKDCM_ReferringPhysicianName));
+                                pModelo->InsertarImagen(base.getTag(GKDCM_SeriesInstanceUID),base.getTag(GKDCM_SOPInstanceUID), base.getTag(GKDCM_InstanceNumber), filePath);
+                        }
+                }//end download first file of the series
+        }
+        return true;
+}
+
+int progress_func_download_wado(void* ptr, double TotalToDownload, double NowDownloaded, double , double )
+{
+        GNC::IProxyNotificadorProgreso* pCmd = (GNC::IProxyNotificadorProgreso*)(ptr);
+        if (pCmd != NULL && TotalToDownload != 0) {
+                if (pCmd->NotificarProgreso((float)NowDownloaded/TotalToDownload, "")) {
+                        return 0;
+                } else {
+                        return -1;
+                }
+        } else if (pCmd != NULL && NowDownloaded != 0) {
+                wxString message = wxString::Format(wxT("Unknow file size downloaded %.2f Mb"), (float)NowDownloaded/(1024*1024));
+                if (pCmd->NotificarProgreso((float)NowDownloaded/(10*1024*1024), std::string(message.ToUTF8()))) {
+                        return 0;
+                } else {
+                        return -1;
+                }
+        } else {
+                return 0;
+        }
+}
+
+bool PACSController::DownloadFileFromURL(const std::string& url, const std::string& filePath, GNC::IProxyNotificadorProgreso* pNotifier)
+{
+        LOG_DEBUG("PACSController", "Trying to download: " << url);
+        CURL *http_handle;
+        FILE *fp;
+
+        http_handle = curl_easy_init();
+        if (http_handle) {
+                fp = fopen(filePath.c_str(), "wb");
+                curl_easy_setopt(http_handle, CURLOPT_URL, url.c_str());
+                //proxy settings
+                GNC::GCS::ProxySettings settings = GNC::GCS::ConfigurationController::Instance()->GetProxySettings();
+                if (settings.useProxy) {
+                        curl_easy_setopt(http_handle, CURLOPT_PROXY, settings.hostName.c_str());
+                        curl_easy_setopt(http_handle, CURLOPT_PROXYPORT, settings.port);
+                        if (settings.requiresAuth) {
+                                curl_easy_setopt(http_handle, CURLOPT_PROXYUSERNAME, settings.userName.c_str());
+                                curl_easy_setopt(http_handle, CURLOPT_PROXYPASSWORD, settings.password.c_str());
+                        }
+                        curl_easy_setopt(http_handle, CURLOPT_NOPROXY, settings.exceptions.c_str());
+                }
+                //progress
+                curl_easy_setopt(http_handle, CURLOPT_PROGRESSDATA , pNotifier);
+                curl_easy_setopt(http_handle, CURLOPT_PROGRESSFUNCTION, progress_func_download_wado);
+                curl_easy_setopt(http_handle, CURLOPT_NOPROGRESS, 0);
+                //
+                curl_easy_setopt(http_handle, CURLOPT_WRITEFUNCTION, write_data);
+                curl_easy_setopt(http_handle, CURLOPT_WRITEDATA, fp);
+                CURLcode res = curl_easy_perform(http_handle);
+                fclose(fp);
+                long http_code = 0;
+                curl_easy_getinfo (http_handle, CURLINFO_RESPONSE_CODE, &http_code);
+                if (http_code == 200 && res != CURLE_ABORTED_BY_CALLBACK) {
+                        //succeeed
+                        curl_easy_cleanup(http_handle);
+                        return true;
+                } else {
+                        curl_easy_cleanup(http_handle);
+                        LOG_ERROR("PACSController", "Error downloading file " << url << " Curl code (" << res << ") " << curl_easy_strerror(res) << " http status: " << http_code );
+                        std::ostringstream ostrMsg;
+                        ostrMsg << _Std("Error downloading WADO file")  << " (HTTP Status: " << http_code << ") " << "URL :" << std::endl << url << std::endl << _Std("Check PACS configuration");
+                        throw GIL::DICOM::PACSException( ostrMsg.str());
+                }
+        } else {
+                LOG_ERROR("PACSController", "Error initializing curl");
+                throw GIL::DICOM::PACSException( "Error initialiting curl" );
+        }
+}
+
+/** Perform query */
+bool PACSController::Query(
+        void* connectionKey,
+        const std::string& abstractSyntax,
+        const GIL::DICOM::DicomDataset& queryWrapper,
+        std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >& resultsWrapper,
+        const std::string& serverId,
+        GNC::IProxyNotificadorProgreso* pNotificador
+)
+{
+
+        resultsWrapper.clear();
+
+        DicomServerList* listaServidores = DicomServerList::Instance();
+        GNC::GCS::Ptr<DicomServer> server = listaServidores->GetServer(serverId);
+
+        DcmDataset query;
+        DcmElement* e = NULL;
+
+        e = newDicomElement(DCM_SpecificCharacterSet);
+        e->putString(server->GetDefaultCharset().c_str());
+        query.insert(e);
+
+        FillInQuery(queryWrapper, &query, server);
+
+        std::string localAET = GNC::Entorno::Instance()->GetDicomLocalAET();
+
+        NetClient<FindAssociation> a(connectionKey, "C-FIND", pNotificador);
+
+        a.SetAbstractSyntax(abstractSyntax);
+
+        if (server->useTLS) {
+                a.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+        }
+        if (server->GetPACSUser() != "") {
+                a.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+        }
+
+        return a.QueryServer(&query, server, resultsWrapper, localAET);
+}
+
+
+bool PACSController::QueryRetrieve(
+        void* connectionKey,
+        const std::string& serverId,
+        IModeloDicom* pModelo,
+        const GIL::DICOM::DicomDataset& base,
+        GNC::IProxyNotificadorProgreso* pNotificador,
+        bool link)
+{
+        std::string strTmp;
+        if(base.getTag("0008|0052", strTmp)) {
+                if (strTmp == "STUDY") {
+                        ObtenerEstudio(connectionKey, serverId, base, pModelo, pNotificador, link);
+                } else if (strTmp == "SERIES") {
+                        std::string uidSeries;
+                        ObtenerSerie(connectionKey, serverId, base, pModelo, pNotificador, link);
+                } else if (strTmp == "IMAGE")  {
+                        ObtenerImagen(connectionKey, serverId, base, pModelo, pNotificador);
+                } else  {
+                        throw GIL::DICOM::PACSException(_Std("Unknown query/retrieve level"));
+                }
+        } else {
+                throw GIL::DICOM::PACSException(_Std("Query retrieve level not specified"));
+        }
+
+        return true;
+}
+
+void PACSController::TestWADOURL(const std::string& url)
+{
+        CURL *http_handle = NULL;
+        std::ostringstream errorMsg;
+        bool success = true;
+
+        char curl_err[CURL_ERROR_SIZE];
+
+        http_handle = curl_easy_init();
+        if (http_handle) {
+                curl_easy_setopt(http_handle, CURLOPT_URL, url.c_str());
+                //proxy settings
+                GNC::GCS::ProxySettings settings = GNC::GCS::ConfigurationController::Instance()->GetProxySettings();
+                if (settings.useProxy) {
+                        curl_easy_setopt(http_handle, CURLOPT_PROXY, settings.hostName.c_str());
+                        curl_easy_setopt(http_handle, CURLOPT_PROXYPORT, settings.port);
+                        if (settings.requiresAuth) {
+                                curl_easy_setopt(http_handle, CURLOPT_PROXYUSERNAME, settings.userName.c_str());
+                                curl_easy_setopt(http_handle, CURLOPT_PROXYPASSWORD, settings.password.c_str());
+                        }
+                        curl_easy_setopt(http_handle, CURLOPT_NOPROXY, settings.exceptions.c_str());
+                }
+
+                curl_easy_setopt(http_handle, CURLOPT_ERRORBUFFER, curl_err);
+                long http_code = -1;
+
+                CURLcode res = curl_easy_perform(http_handle);
+
+                if (res != CURLE_OK) {
+                        errorMsg << _Std("Unable to perform HTTP request") << ": " << curl_err;
+                        success = false;
+                }
+                if (success && (CURLE_OK != curl_easy_getinfo (http_handle, CURLINFO_RESPONSE_CODE, &http_code)) ) {
+                        errorMsg << _Std("Invalid HTTP response")  << ": " << curl_err;
+                        success = false;
+                }
+                if (success) {
+                        if ( (http_code < 200 || http_code > 500) ) {
+                                errorMsg << _Std("Invalid HTTP code") << ":" << http_code;
+                                success = false;
+                        }
+                }
+                curl_easy_cleanup(http_handle);
+
+        } else {
+                errorMsg << _Std("Unable to init HTTP subsystem");
+                success = false;
+        }
+
+        if (!success) {
+                throw GIL::DICOM::PACSException(errorMsg.str());
+        }
+}
+
+GIL::DICOM::ICustomAssociation* PACSController::CreateCustomAssociation(void* connectionKey, const std::string& ambitolog, GNC::IProxyNotificadorProgreso* pNotificador)
+{
+        return new CustomAssociation(connectionKey, ambitolog, pNotificador);
+}
+
+void PACSController::DestroyCustomAssociation(GIL::DICOM::ICustomAssociation* assoc)
+{
+        if (assoc != NULL) {
+                delete assoc;
+        }
+}
+
+void PACSController::StartServer()
+{
+        StopServer();
+
+        int localPort = 0;
+        std::string localAET;
+        {
+                GNC::GCS::ConfigurationController::Instance()->readIntGeneral("/GinkgoCore/PACS/Local", "Puerto", localPort, 11112);
+                GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/PACS/Local", "AET", localAET, "GINKGO_%IP4");
+        }
+
+        this->m_pServiceInstance = new GIL::DICOM::Service(_Std("PACS-Service"));
+        this->m_pServiceInstance->SetRole(GIL::DICOM::Service::RT_Acceptor);
+        this->m_pServiceInstance->SetAcceptorPort(localPort);
+
+        this->m_pServiceInstance->SetLocalAET(localAET);
+        this->m_pServiceInstance->Start();
+
+}
+
+void PACSController::StopServer()
+{
+        if (this->m_pServiceInstance != NULL) {
+                unsigned long tid;
+                do {
+                        tid = this->m_pServiceInstance->GetTid();
+                        GNC::GCS::ThreadController::Stop(tid);
+                } while (this->m_pServiceInstance->GetTid() != tid);
+                delete this->m_pServiceInstance;
+                this->m_pServiceInstance = NULL;
+        }
+}
+
+
+void PACSController::GetConnection(void* connectionKey)
+{
+        GIL::DICOM::DCMTK::Network::Instance(connectionKey);
+}
+
+void PACSController::ReleaseConnection(void* connectionKey)
+{
+        GIL::DICOM::DCMTK::Network::FreeInstance(connectionKey);
+}
+
+void PACSController::SubirArchivos(void* /*connectionKey*/, const std::string& serverId, const std::list<std::string> &pathsSubida, GNC::IProxyNotificadorProgreso* pNotificador, TipoTransferSyntaxEnvio transferSyntax)
+{
+
+        GTRACE("PACSController::SubirArchivos( " << serverId.c_str() << ", [...]");
+        DicomServerList* listaServidores = DicomServerList::Instance();
+        std::string localAET = GNC::Entorno::Instance()->GetDicomLocalAET();
+        GIL::DICOM::DicomStoreAssociation asociacion;
+        GNC::GCS::Ptr<DicomServer> server = listaServidores->GetServer(serverId);
+        if (server) {
+                LOG_INFO("PACS-STORE", "Enviando al PACS " << serverId << ": " << server->AET << "@" << server->HostName << ":" << server->Port << " PDU=" << server->PDU << ", TLS=" << server->useTLS << ",  User = " << server->pacsUser);
+        }
+        if (server->useTLS) {
+                asociacion.SetTLS(server->GetCertificate(), server->GetPrivateKey(), server->GetverifyCredentials());
+        }
+        if (server->GetPACSUser() != "") {
+                asociacion.SetUserPass(server->GetPACSUser(), server->GetPACSPass());
+        }
+        asociacion.Store(pathsSubida,server, localAET, pNotificador, transferSyntax);
+
+}
+
+std::string GetMD5(const std::string& cadena)
+{
+        unsigned char salida[MD5_DIGEST_LENGTH];
+        MD5((const unsigned char*)cadena.c_str(), cadena.size(),salida);
+
+        std::ostringstream cadenaMD5;
+        cadenaMD5.setf ( std::ios::hex, std::ios::basefield );
+        for(int i = 0; i<MD5_DIGEST_LENGTH; i++) {
+                cadenaMD5 << (int)salida[i];
+        }
+        return cadenaMD5.str();
+}
+
+bool PACSController::GetRutaSerie(const std::string& uidPaciente, const std::string& uidEstudio, const std::string& uidSerie, std::string& ruta, bool crearDirectorios,bool temporal)
+{
+        bool correcto = true;
+        std::string dicomDirPath = GNC::GCS::HistoryController::Instance()->GetGinkgoDicomDir();
+        //md5 de uidpaciente, estudio y serie
+        std::stringstream concat;
+        if(uidPaciente != "")
+                concat << uidPaciente;
+        else
+                concat << _("Unknown");
+        if(uidEstudio != "")
+                concat << uidEstudio;
+        else
+                concat << _("Unknown");
+        if(uidSerie != "")
+                concat << uidSerie;
+        else
+                concat << _("Unknown");
+        std::string cadena = concat.str();
+        std::string resumen = GetMD5(cadena);
+
+        wxString dirRaiz, dirSerie;
+        dirRaiz = FROMPATH(dicomDirPath);
+        if (!wxDir::Exists(dirRaiz) && crearDirectorios) {
+                correcto = correcto && wxFileName::Mkdir(dirRaiz, 0700);
+        }
+
+        if(temporal) {
+                dirRaiz = dirRaiz + wxFileName::GetPathSeparator(wxPATH_NATIVE) + wxT("TEMP");
+                if (!wxDir::Exists(dirRaiz)) {
+                        correcto = correcto && wxFileName::Mkdir(dirRaiz, 0700);
+                }
+        }
+
+        dirSerie= dirRaiz + wxFileName::GetPathSeparator(wxPATH_NATIVE) + FROMPATH(resumen);
+        if (!wxDir::Exists(dirSerie) && crearDirectorios) {
+                correcto = correcto && wxFileName::Mkdir(dirSerie, 0700);
+        }
+
+        ruta = TOPATH(dirSerie);
+        return correcto;
+}
+
+bool PACSController::GetRutaImagen(const std::string& uidPaciente, const std::string& uidEstudio, const std::string& uidSerie, const std::string& uidImagen, std::string& ruta, bool crearDirectorios)
+{
+        bool correcto = GetRutaSerie(uidPaciente,uidEstudio,uidSerie, ruta, crearDirectorios, false);
+        std::ostringstream ostr;
+        ostr << ruta << (char)wxFileName::GetPathSeparator(wxPATH_NATIVE)<<GetMD5(uidImagen)<<".dcm";
+        ruta = ostr.str();
+        return correcto;
+}
+
+bool PACSController::GetRutaImagenTemp(const std::string& uidPaciente, const std::string& uidEstudio, const std::string& uidSerie, const std::string& uidImagen, std::string& ruta, bool crearDirectorios)
+{
+        bool correcto = GetRutaSerie(uidPaciente,uidEstudio,uidSerie, ruta, crearDirectorios, true);
+        std::ostringstream ostr;
+        ostr << ruta << (char)wxFileName::GetPathSeparator(wxPATH_NATIVE)<<GetMD5(uidImagen)<<".dcm";
+        ruta = ostr.str();
+        return correcto;
+}
+
+void PACSController::DumpFileElements(const std::string& rutaFichero, IInspectCallBack* callback)
+{
+        DcmFileFormat fileformat;
+        if (rutaFichero.empty() || callback == NULL) {
+                return;
+        }
+        OFCondition status = fileformat.loadFile(rutaFichero.c_str());
+        if (status.good()) {
+
+                DcmDataset* ds = fileformat.getDataset();
+
+                DcmDataDictionary& globalDataDict = dcmDataDict.wrlock();
+                DcmHashDictIterator iter(globalDataDict.normalBegin());
+                DcmHashDictIterator end(globalDataDict.normalEnd());
+
+                std::string keyStr;
+                std::string descStr;
+                std::string valStr;
+                for (; iter != end; ++iter) {
+                        DcmTagKey tagkey = (*iter)->getKey();
+                        keyStr = tagkey.toString().c_str();
+                        descStr = (*iter)->getTagName();
+                        OFString val;
+                        OFCondition c = ds->findAndGetOFString(tagkey, val);
+                        if (c.good()) {
+                                valStr = val.c_str();
+                                callback->Inspect(keyStr, descStr, valStr);
+                        }
+                }
+                dcmDataDict.unlock();
+        }
+}
+
+
+//region "Métodos de Dicomización"
+/*
+void PACSController::CrearInstanciaDeImportacion(void* ref) {
+m_ListaInstanciasDicomImg2DCM[ref] = new IDICOMImg2DCM();
+}
+
+void PACSController::LiberarInstanciaDeImportacion(void* ref) {
+ListaInstanciasImg2DCMType::iterator it = m_ListaInstanciasDicomImg2DCM.find(ref);
+if (it != m_ListaInstanciasDicomImg2DCM.end()) {
+delete (*it).second;
+m_ListaInstanciasDicomImg2DCM.erase(it);
+}
+}
+*/
+
+IDICOMImg2DCM* PACSController::CrearInstanciaDeImportacion()
+{
+        return new DICOMImg2DCM();
+}
+
+void PACSController::LiberarInstanciaDeImportacion(IDICOMImg2DCM* instancia)
+{
+        DICOMImg2DCM* i = dynamic_cast<DICOMImg2DCM*>(instancia);
+        if (i != NULL) {
+                delete i;
+        }
+}
+//endregion
+
+//region "Métodos de carga/almacenamiento de DICOMS"
+IDICOMManager* PACSController::CrearInstanciaDeDICOMManager()
+{
+        return new DICOMManager();
+}
+
+void PACSController::LiberarInstanciaDeDICOMManager(IDICOMManager* instancia)
+{
+        DICOMManager* i = dynamic_cast<DICOMManager*>(instancia);
+        if (i != NULL) {
+                delete i;
+        }
+}
+
+void  BorrarDirTemp(wxString dirPath)
+{
+        //borra en cascada
+        if(!wxRmdir(dirPath)) {
+                //vaciar
+                wxDir dir;
+                if (dir.Open(dirPath)) {
+                        wxString fileName;
+                        bool cont = dir.GetFirst(&fileName);
+                        while (cont) {
+                                fileName=dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) +fileName;
+                                if(wxDir::Exists(fileName)) {
+                                        BorrarDirTemp(fileName);
+                                } else {
+                                        wxRemoveFile(fileName);
+                                }
+                                cont = dir.GetNext(&fileName);
+                        }
+                }
+        }
+        if(wxDir::Exists(dirPath)) {
+                wxRmdir(dirPath);
+        }
+}
+
+void PACSController::PurgarDirectorioTemporal()
+{
+        wxString dirTemp;
+        dirTemp = FROMPATH(GNC::GCS::HistoryController::Instance()->GetGinkgoDicomDir());
+        if (!wxDir::Exists(dirTemp)) {
+                return;
+        }
+
+        dirTemp = dirTemp + wxFileName::GetPathSeparator(wxPATH_NATIVE) + wxT("TEMP");
+        if (!wxDir::Exists(dirTemp)) {
+                return;
+        }
+
+        //borrar en profundidad
+        BorrarDirTemp(dirTemp);
+}
+//endregion
+};
+};
diff --git a/cadxcore/main/controllers/pacscontroller.h b/cadxcore/main/controllers/pacscontroller.h
new file mode 100644
index 0000000..3b84a8c
--- /dev/null
+++ b/cadxcore/main/controllers/pacscontroller.h
@@ -0,0 +1,195 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/api.h>
+#include <api/controllers/ipacscontroller.h>
+
+class DcmDataset;
+class Network;
+class DicomServer;
+namespace GNC
+{
+class IProxyNotificadorProgreso;
+}
+
+namespace GIL
+{
+namespace DICOM
+{
+class Service;
+}
+}
+
+namespace GIL
+{
+namespace DICOM
+{
+class EXTAPI PACSController : public IPACSController
+{
+public:
+
+        // TODO: corregir
+        typedef std::map<void*, IDICOMImg2DCM*> ListaInstanciasImg2DCMType;
+
+        typedef std::map<void*, Network> NetworkConnectionList;
+
+        static PACSController* Instance();
+        static void FreeInstance();
+
+        virtual void SubirArchivos(void* connectionKey, const std::string& serverId, const std::list<std::string>& pathsSubida, GNC::IProxyNotificadorProgreso* pNotificador, TipoTransferSyntaxEnvio transferSyntax);
+
+        virtual void FillInQuery(const GIL::DICOM::DicomDataset& base, DcmDataset* query, const GNC::GCS::Ptr<DicomServer>& server);
+
+        virtual bool Print(
+                void* connectionKey,
+                const std::string& serverId,
+                const GIL::DICOM::DicomDataset& film,
+                const GIL::DICOM::DicomDataset& layout,
+                const GIL::DICOM::DicomDataset& job,
+                const std::list<std::string> files,
+                GNC::IProxyNotificadorProgreso* pNotificador
+        );
+
+protected:
+        virtual bool ObtenerEstudio(
+                void* connectionKey,
+                const std::string& serverId,
+                const GIL::DICOM::DicomDataset& base,
+                IModeloDicom* pModelo,
+                GNC::IProxyNotificadorProgreso* pNotificador,
+                bool link
+        );
+
+        virtual bool ObtenerSerie(
+                void* connectionKey,
+                const std::string& serverId,
+                const GIL::DICOM::DicomDataset& base,
+                IModeloDicom* pModelo,
+                GNC::IProxyNotificadorProgreso* pNotificador,
+                bool link
+        );
+
+        virtual bool ObtenerImagen(
+                void* connectionKey,
+                const std::string& serverId,
+                const GIL::DICOM::DicomDataset& base,
+                IModeloDicom* pModelo,
+                GNC::IProxyNotificadorProgreso* pNotificador
+        );
+
+        virtual bool DownloadWADOImages(const std::string& serverId,
+                                        const std::string& studyInstanceUID,
+                                        const std::string& seriesInstanceUID,
+                                        const std::list<std::string>& sopInstanceUID,
+                                        const std::list<long>& instanceNumbers,
+                                        IModeloDicom* pModelo,
+                                        GNC::IProxyNotificadorProgreso* pNotificador,
+                                        bool link);
+
+public:
+
+        /**If there is an error throws exception GIL::DICOM::PACSException*/
+        virtual bool DownloadFileFromURL(const std::string& url,
+                                         const std::string& filePath,
+                                         GNC::IProxyNotificadorProgreso* pNotifier);
+
+        /** Perform query */
+        virtual bool Query(
+                void* connectionKey,
+                const std::string& abstractSyntax,
+                const GIL::DICOM::DicomDataset& query,
+                std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >& resultsWraper,
+                const std::string& serverId,
+                GNC::IProxyNotificadorProgreso* pNotificador
+        );
+
+        virtual bool QueryRetrieve(
+                void* connectionKey,
+                const std::string& serverId,
+                IModeloDicom* pModelo,
+                const GIL::DICOM::DicomDataset& base,
+                GNC::IProxyNotificadorProgreso* pNotificador,
+                bool link
+        );
+
+        virtual void TestWADOURL(const std::string& url);
+
+        virtual GIL::DICOM::ICustomAssociation* CreateCustomAssociation(void* connectionKey, const std::string& ambitolog, GNC::IProxyNotificadorProgreso* pNotificador = NULL);
+        virtual void DestroyCustomAssociation(GIL::DICOM::ICustomAssociation* assoc);
+
+        virtual void StartServer();
+
+        virtual void StopServer();
+
+        virtual void  GetConnection(void* connectionKey);
+
+        virtual void  ReleaseConnection(void* connectionKey);
+
+        bool LeerDicomDir(const std::string& pathDicomDir, IModeloDicom* pModelo);
+
+        virtual bool findAndGetTagFromFile(const std::string& ruta, unsigned short group, unsigned short element, std::string& value);
+
+        virtual bool EsDICOM(const std::string& path, bool accept_dicomdir, bool accept_dicomfile) const;
+
+        virtual bool EsPDF(const std::string& path) const;
+
+private:
+        virtual bool GetRutaSerie(const std::string& uidPaciente, const std::string& uidEstudio, const std::string& uidSerie, std::string& ruta, bool crearDirectorios = true, bool temporal = false);
+        virtual bool GetRutaImagen(const std::string& uidPaciente, const std::string& uidEstudio, const std::string& uidSerie, const std::string& uidImagen, std::string& ruta, bool crearDirectorios = true);
+public:
+        virtual bool GetRutaImagenTemp(const std::string& uidPaciente, const std::string& uidEstudio, const std::string& uidSerie, const std::string& uidImagen, std::string& ruta, bool crearDirectorios = true);
+
+        void DumpFileElements(const std::string& rutaFichero, IInspectCallBack* callback);
+
+
+//region "Métodos de Dicomización"
+
+        IDICOMImg2DCM* CrearInstanciaDeImportacion();
+        void LiberarInstanciaDeImportacion(IDICOMImg2DCM* instancia);
+
+//endregion
+
+//region "Métodos de carga/almacenamiento de DICOMS"
+
+        IDICOMManager* CrearInstanciaDeDICOMManager();
+
+        void LiberarInstanciaDeDICOMManager(IDICOMManager* instancia);
+
+//endregion
+
+protected:
+        PACSController();
+        ~PACSController();
+
+        static void PurgarDirectorioTemporal();
+
+protected:
+
+        static PACSController*     m_pInstance;
+        ListaInstanciasImg2DCMType m_ListaInstanciasDicomImg2DCM;
+        GIL::DICOM::Service*       m_pServiceInstance;
+
+private:
+        void buildDicomDir();
+};
+};
+};
diff --git a/cadxcore/main/controllers/parserxmlenglish.cpp b/cadxcore/main/controllers/parserxmlenglish.cpp
new file mode 100644
index 0000000..bb31ed9
--- /dev/null
+++ b/cadxcore/main/controllers/parserxmlenglish.cpp
@@ -0,0 +1,551 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <string>
+#include <map>
+#include <ctime>
+#include <sstream>
+
+#include <wx/xml/xml.h>
+#include <wx/file.h>
+#include <wx/filename.h>
+#include <wx/sstream.h>
+#include <wx/msgdlg.h>
+#ifndef _WIN32
+#include <signal.h>
+#endif
+#include <wx/tokenzr.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/filename.h>
+
+
+#include "parserxmlenglish.h"
+#include <api/globals.h>
+#include <api/imodelohl7.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/integration/dict.h>
+#include <api/helpers/aetwildcards.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladorlog.h>
+#include <main/entorno.h>
+#include "dcmtk/dicomservers.h"
+
+//creacion de la base de datos de mensajes
+GIL::ParserXMLEnglish::ParserXMLEnglish()
+{
+}
+
+GIL::ParserXMLEnglish::~ParserXMLEnglish()
+{
+}
+
+//region "Interfaz generica"
+
+std::list<std::string> GIL::ParserXMLEnglish::GetKeys()
+{
+        std::list<std::string> list;
+        list.push_back("gnkworkflows");
+        list.push_back("gnkworkflow");
+        return list;
+}
+
+/* Parsea la cadena XML y construye el modelo de integracion. Los parametros no encontrados se asignan por defecto segun lo especificado en la configuracion global */
+void GIL::ParserXMLEnglish::ParseIntegrationXML(GIL::IntegrationModelList& models, wxXmlNode* pRoot)
+{
+        MapaServers servers;
+        // PreCargamos la lista de PACS de la configuracion
+        DicomServerList::TServerList ListOfServers = DicomServerList::Instance()->GetServerList();
+        for (DicomServerList::TServerList::iterator it = ListOfServers.begin(); it != ListOfServers.end(); ++it) {
+                IModeloPACSServer pacs;
+                pacs.sid = (*it)->ID;
+                pacs.AET = (*it)->AET;
+                pacs.hostname = (*it)->HostName;
+                pacs.puerto = (*it)->Port;
+
+                servers[pacs.sid] = pacs;
+        }
+        //
+
+        if (pRoot->GetName().CmpNoCase(wxT("gnkworkflows")) == 0) {
+
+                wxString propVal;
+
+                // Parseamos los PACS especificados por fichero
+                for (wxXmlNode* nodo = pRoot->GetChildren(); nodo != NULL; nodo = nodo->GetNext()) {
+                        if (nodo->GetName().CmpNoCase(wxT("pacs")) == 0) { // Configuracion de PACS
+                                GIL::IModeloPACSServer pacsServer;
+
+                                propVal = nodo->GetAttribute(wxT("sid"), wxEmptyString);
+                                if( !propVal.empty() ) {
+                                        pacsServer.sid = propVal.ToUTF8();
+                                } else {
+                                        throw IntegrationException(_Std("Omitted Identificator"),    "CONF/pacs");
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("aet"), wxEmptyString);
+                                if( !propVal.empty() ) {
+                                        pacsServer.AET = propVal.ToUTF8();
+                                } else {
+                                        throw IntegrationException(_Std("Omitted AET"),    "CONF/pacs");
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("hostname"), wxEmptyString);
+                                if( !propVal.empty() ) {
+                                        pacsServer.hostname = propVal.ToUTF8();
+                                } else {
+                                        throw IntegrationException(_Std("Hostname missing"),    "CONF/pacs");
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("port"), wxEmptyString);
+                                if( !propVal.empty() ) {
+                                        pacsServer.puerto = propVal.ToUTF8();
+                                } else {
+                                        throw IntegrationException(_Std("Omitted port"),    "CONF/pacs");
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("tls"), wxEmptyString);
+                                if( propVal.CmpNoCase(wxT("yes")) == 0 || propVal.CmpNoCase(wxT("true")) == 0 || propVal.CmpNoCase(wxT("si")) == 0 || propVal.CmpNoCase(wxT("1")) == 0 ) {
+                                        pacsServer.tls = true;
+                                } else {
+                                        pacsServer.tls = false;
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("pacs-user"), wxEmptyString);
+                                if( !propVal.empty()) {
+                                        pacsServer.user = propVal.ToUTF8();
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("pacs-password"), wxEmptyString);
+                                if( !propVal.empty()) {
+                                        pacsServer.password = propVal.ToUTF8();
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("wado-url"), wxEmptyString);
+                                if( !propVal.empty()) {
+                                        pacsServer.wadoURI = propVal.ToUTF8();
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("verify-credentials"), wxEmptyString);
+                                if( propVal.CmpNoCase(wxT("yes")) == 0 || propVal.CmpNoCase(wxT("true")) == 0 || propVal.CmpNoCase(wxT("si")) == 0 || propVal.CmpNoCase(wxT("1")) == 0 ) {
+                                        pacsServer.verify = true;
+                                } else {
+                                        pacsServer.verify = false;
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("retrieve-method"), wxEmptyString);
+                                if( propVal.CmpNoCase(wxT("get")) == 0 ) {
+                                        pacsServer.metodo = GIL::IModeloPACSServer::IMPS_GET;
+                                } else if (propVal.CmpNoCase(wxT("wado")) == 0) {
+                                        pacsServer.metodo = GIL::IModeloPACSServer::IMPS_WADO;
+                                } else {
+                                        pacsServer.metodo = GIL::IModeloPACSServer::IMPS_MOVE;
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("pdu"), wxEmptyString);
+                                if( propVal.empty()) {
+                                        pacsServer.pdu = "16384";
+                                } else {
+                                        pacsServer.pdu = propVal.ToUTF8();
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("retrieve-level"), wxEmptyString);
+                                if( propVal.empty()) {
+                                        pacsServer.retrieveLevel = "SERIES";
+                                } else {
+                                        pacsServer.retrieveLevel = propVal.ToUTF8();
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("charset"), wxEmptyString);
+                                if( !propVal.empty() ) {
+                                        pacsServer.defaultCharset = propVal.ToUTF8();
+                                } else {
+                                        pacsServer.defaultCharset = "ISO_IR 100";
+                                }
+
+                                for (wxXmlNode* subnodo = nodo->GetChildren(); subnodo != NULL; subnodo = subnodo->GetNext()) {
+                                        if (subnodo->GetName().CmpNoCase(wxT("client-cert")) == 0) {
+                                                pacsServer.cert = subnodo->GetNodeContent().ToUTF8();
+                                        } else if (subnodo->GetName().CmpNoCase(wxT("client-key")) == 0) {
+                                                pacsServer.key = subnodo->GetNodeContent().ToUTF8();
+                                        }
+                                }
+
+                                servers[pacsServer.sid] = pacsServer;
+                                try {
+                                        GNC::GCS::Ptr<DicomServer> server = DicomServerList::Instance()->GetServer(pacsServer.sid);
+                                        server->AET = pacsServer.AET;
+                                        server->HostName = pacsServer.hostname;
+                                        long puerto;
+                                        long pdu;
+                                        if(!wxString::FromUTF8(pacsServer.pdu.c_str()).ToLong(&pdu)) {
+                                                throw IntegrationException(_Std("The pdu size is not a valid number"),    "CONF/pacs");
+                                        }
+                                        server->PDU = pdu;
+                                        if(wxString::FromUTF8(pacsServer.puerto.c_str()).ToLong(&puerto)) {
+                                                server->Port = puerto;
+                                        } else {
+                                                throw IntegrationException(_Std("Port is not a valid number"),    "CONF/pacs");
+                                        }
+                                        if (pacsServer.metodo == GIL::IModeloPACSServer::IMPS_GET) {
+                                                server->retrieveMethod = DicomServer::GET;
+                                        } else if (pacsServer.metodo == GIL::IModeloPACSServer::IMPS_WADO) {
+                                                server->retrieveMethod = DicomServer::WADO;
+                                        } else {
+                                                server->retrieveMethod = DicomServer::MOVE;
+                                        }
+                                        server->retrieveSeries = wxString::FromUTF8(pacsServer.retrieveLevel.c_str()).CmpNoCase(wxT("SERIES")) == 0;
+                                        server->useTLS = pacsServer.tls;
+                                        server->verifyCredentials = pacsServer.verify;
+                                        server->certificate = pacsServer.cert;
+                                        server->privateKey  = pacsServer.key;
+                                        server->pacsUser = pacsServer.user;
+                                        server->pacsPass = pacsServer.password;
+                                        server->wadoURI = pacsServer.wadoURI;
+
+                                        DicomServerList::Instance()->SetDefaultServer(server->ID);
+
+                                } catch (GinkgoNoServerFoundException& ) {
+                                        long puerto;
+                                        long pdu;
+                                        if(!wxString::FromUTF8(pacsServer.pdu.c_str()).ToLong(&pdu)) {
+                                                throw IntegrationException(_Std("The pdu size is not a valid number"),    "CONF/pacs");
+                                        }
+                                        if(wxString::FromUTF8(pacsServer.puerto.c_str()).ToLong(&puerto)) {
+                                                DicomServer::TRetrieveMethod retrieveMethod = DicomServer::MOVE;
+                                                if ( pacsServer.metodo == GIL::IModeloPACSServer::IMPS_GET) {
+                                                        retrieveMethod = DicomServer::GET;
+                                                } else if (pacsServer.metodo == GIL::IModeloPACSServer::IMPS_WADO) {
+                                                        retrieveMethod = DicomServer::WADO;
+                                                }
+                                                DicomServerList::Instance()->AddServer( DicomServer(pacsServer.sid, pacsServer.AET, pacsServer.hostname, (int)puerto, 0, true, pdu, pacsServer.tls, pacsServer.user, pacsServer.password, retrieveMethod, pacsServer.wadoURI, wxString::FromUTF8(pacsServer.retrieveLevel.c_str()).Upper() == wxT("SERIES"), false, pacsServer.verify, pacsServer.cert, pacsServer.key, pacsServer.defaultCharset), true );
+                                        } else {
+                                                throw IntegrationException(_Std("The port is not a valid number"),    "CONF/pacs");
+                                        }
+                                }
+                        }
+                }
+
+                // Parseamos las gnkworkflows
+                for (wxXmlNode* nodo = pRoot->GetChildren(); nodo != NULL; nodo = nodo->GetNext()) {
+                        if (nodo->GetName().CmpNoCase(wxT("gnkworkflow") ) == 0)  { // gnkworkflow
+                                GIL::IModeloIntegracion* modelo = ParseGnkWorkflow(nodo, servers);
+                                models.push_back(modelo);
+                        } //fin gnkworkflow
+                } //fin de parseo de gnkworkflows
+        } else if (pRoot->GetName().CmpNoCase(wxT("gnkworkflow")) == 0) {
+                GIL::IModeloIntegracion* modelo = ParseGnkWorkflow(pRoot, servers);
+                models.push_back(modelo);
+        } else {
+                throw IntegrationException(_Std("Setting not found"),    "CONF");
+        }
+}
+
+GIL::IModeloIntegracion* GIL::ParserXMLEnglish::ParseGnkWorkflow(wxXmlNode* nodo, GIL::ParserXMLEnglish::MapaServers& servers)
+{
+        std::string xpp; // XML Pretty Printed for extended information info.
+        wxString propVal;
+        GIL::IModeloIntegracion* modelo = new IModeloIntegracion();
+        //se copia el raw data
+        {
+                wxXmlNode* pNodo = new wxXmlNode(*nodo);
+                wxXmlDocument docTmp;
+                docTmp.SetRoot(pNodo);
+                wxStringOutputStream out;
+                docTmp.Save(out,wxXML_NO_INDENTATION);
+                modelo->rawXmlData = out.GetString().ToUTF8();
+        }
+        //
+
+        propVal = nodo->GetAttribute(wxT("tid"), wxEmptyString);
+        if( !propVal.empty() ) {
+                modelo->idPlantilla = propVal.ToUTF8();
+        } else {
+                modelo->idPlantilla = "";
+        }
+
+        propVal = nodo->GetAttribute(wxT("action"), wxEmptyString).Lower();
+        if ( !propVal.empty() ) {
+
+                if (propVal.CmpNoCase(wxT("retrieve")) == 0) {
+                        modelo->accion = GIL::IModeloIntegracion::TA_Obtener;
+                } else if (propVal.CmpNoCase(wxT("dicomize")) == 0 ) {
+                        modelo->accion = GIL::IModeloIntegracion::TA_Dicomizar;
+                } else if (propVal.CmpNoCase(wxT("print")) == 0) {
+                        modelo->accion = GIL::IModeloIntegracion::TA_Imprimir;
+                } else if (propVal.CmpNoCase(wxT("open")) == 0) {
+                        modelo->accion = GIL::IModeloIntegracion::TA_Open;
+                } else {
+                        throw IntegrationException(_Std("\"action\" attribute invalid at \"gnkworkflow\" scope" ),    "CONF/template");
+                }
+        } else {
+                throw IntegrationException(_Std("\"action\" attribute expected at \"gnkworkflow\" scope"),    "CONF/template");
+        }
+
+        propVal = nodo->GetAttribute(wxT("petition-id"), wxEmptyString);
+        if( !propVal.empty() ) {
+                modelo->GlobalVariables.InsertVariable(GKDI_HCE_PETITION_ID, std::string(propVal.ToUTF8()));
+        }
+
+        propVal = nodo->GetAttribute(wxT("scope"), wxEmptyString);
+        if( !propVal.empty() ) {
+                modelo->GlobalVariables.InsertVariable(GKDI_JIMENA_AMBITO_PETICION,std::string(propVal.ToUTF8()));
+        }
+
+        if( nodo->HasAttribute(wxT("pacs-retrieve-sid")) ) {
+                propVal = nodo->GetAttribute(wxT("pacs-retrieve-sid"), wxEmptyString);
+                if (!propVal.IsEmpty()) {
+                        modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_PACS_RETRIEVE_SID, std::string(propVal.ToUTF8()));
+                } else {
+                        throw IntegrationException(_Std("\"pacs-retrieve-sid\" attribute empty at \"gnkworkflow\" scope"),    "CONF/template");
+                }
+        }
+
+        if( nodo->HasAttribute(wxT("pacs-store-sid")) ) {
+                propVal = nodo->GetAttribute(wxT("pacs-store-sid"), wxEmptyString);
+                if (!propVal.IsEmpty()) {
+                        modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_PACS_STORE_SID, std::string(propVal.ToUTF8()));
+                } else {
+                        throw IntegrationException(_Std("\"pacs-store-sid\" attribute empty at \"gnkworkflow\" scope"),    "CONF/template");
+                }
+        }
+
+        modelo->GlobalVariables.InsertVariable(GKDI_HCE_ID, "defaultHCE");
+
+        //recorremos los hijos de las gnkworkflows
+        for (wxXmlNode* hijo = nodo->GetChildren(); hijo != NULL; hijo = hijo->GetNext()) {
+                //files...
+                if (hijo->GetName().CmpNoCase(wxT("file")) == 0 && hijo->GetChildren() != NULL) {
+                        modelo->Files.push_back(std::string(hijo->GetChildren()->GetContent().ToUTF8()));
+                }
+                //parseamos los campos dimse
+                if(hijo->GetName().CmpNoCase(wxT("query-retrieve-level")) == 0) {
+                        propVal = hijo->GetAttribute(wxT("value"), wxEmptyString);
+                        if ( !propVal.empty() ) {
+                                modelo->TagsDICOMOverwrite.tags["0008|0052"] = std::string(propVal.Upper().ToUTF8());
+                        } else {
+                                throw IntegrationException(_Std("\"value\" attribute expected at \"query-retrieve-level\" scope"),    "CONF/template");
+                        }
+                }
+
+                //parseamos los campos d paciente
+                if(hijo->GetName().CmpNoCase(wxT("patient")) == 0) {
+                        for (wxXmlNode* hijosPaciente = hijo->GetChildren(); hijosPaciente != NULL; hijosPaciente = hijosPaciente->GetNext()) {
+                                if(hijosPaciente->GetName().CmpNoCase(wxT("name")) == 0) {
+                                        if(hijosPaciente->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_PATIENT_NAME, std::string(hijosPaciente->GetChildren()->GetContent().ToUTF8()));
+                                        }
+                                } else if(hijosPaciente->GetName().CmpNoCase(wxT("first-surname")) == 0) {
+                                        if(hijosPaciente->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_PATIENT_FAMILY_NAME, std::string(hijosPaciente->GetChildren()->GetContent().ToUTF8()));
+                                        }
+                                } else if(hijosPaciente->GetName().CmpNoCase(wxT("second-surname")) == 0) {
+                                        if(hijosPaciente->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_PATIENT_SECOND_FAMILY_NAME, std::string(hijosPaciente->GetChildren()->GetContent().ToUTF8()));
+                                        }
+                                } else if(hijosPaciente->GetName().CmpNoCase(wxT("episode-number")) == 0) {
+                                        if(hijosPaciente->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_HCE_EPISODE_NUMBER, std::string(hijosPaciente->GetChildren()->GetContent().ToUTF8()));
+                                        }
+                                } else if(hijosPaciente->GetName().CmpNoCase(wxT("id")) == 0) {
+                                        std::string codigo(propVal.ToUTF8());
+                                        std::string valor(propVal.ToUTF8());
+                                        propVal = hijosPaciente->GetAttribute(wxT("code"), wxEmptyString);
+                                        if ( !propVal.empty() ) {
+                                                codigo =  propVal.ToUTF8();
+                                        } else {
+                                                throw IntegrationException(_Std("\"code\" attribute expected at \"patient\" scope"),    "CONF/template");
+                                        }
+                                        propVal = hijosPaciente->GetAttribute(wxT("value"), wxEmptyString);
+                                        if ( !propVal.empty() ) {
+                                                valor =  propVal.ToUTF8();
+                                                if (!modelo->GlobalVariables.Contains(GKDI_PATIENT_ID)) {
+                                                        modelo->GlobalVariables.InsertVariable(GKDI_PATIENT_ID, valor);
+                                                }
+                                        }
+                                }
+                        }
+                }//fin paciente
+
+                //parseamos los campos d medico
+                if(hijo->GetName().CmpNoCase(wxT("physician")) == 0) {
+                        for (wxXmlNode* hijosMedico = hijo->GetChildren(); hijosMedico != NULL; hijosMedico = hijosMedico->GetNext()) {
+                                if(hijosMedico->GetName().CmpNoCase(wxT("name")) == 0) {
+                                        if(hijosMedico->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_NAME, std::string(hijosMedico->GetChildren()->GetContent().ToUTF8()));
+                                        }
+                                } else if(hijosMedico->GetName().CmpNoCase(wxT("first-surname")) == 0) {
+                                        if(hijosMedico->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_FAMILY_NAME, std::string(hijosMedico->GetChildren()->GetContent().ToUTF8()));
+                                        }
+                                } else if(hijosMedico->GetName().CmpNoCase(wxT("second-surname")) == 0) {
+                                        if(hijosMedico->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_SECOND_FAMILY_NAME, std::string(hijosMedico->GetChildren()->GetContent().ToUTF8()));
+                                        }
+                                } else if(hijosMedico->GetName().CmpNoCase(wxT("id")) == 0) {
+                                        std::string codigo(propVal.ToUTF8());
+                                        std::string valor(propVal.ToUTF8());
+                                        propVal = hijosMedico->GetAttribute(wxT("code"), wxEmptyString);
+                                        if ( !propVal.empty() ) {
+                                                codigo =  propVal.ToUTF8();
+                                        } else {
+                                                throw IntegrationException(_Std("\"code\" attribute expected at \"physician\" scope"),    "CONF/template");
+                                        }
+                                        propVal = hijosMedico->GetAttribute(wxT("value"), wxEmptyString);
+                                        if ( !propVal.empty() ) {
+                                                valor =  propVal.ToUTF8();
+                                        } else {
+                                                throw IntegrationException(_Std("\"value\" attribute expected at \"physician\" scope"),    "CONF/template");
+                                        }
+                                        if (!modelo->GlobalVariables.Contains(GKDI_REFERRING_PHISICIAN_ID)) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_ID, valor);
+                                        }
+                                } else if(hijosMedico->GetName() == wxT("institution")) {
+                                        propVal = hijosMedico->GetAttribute(wxT("iid"), wxEmptyString);
+                                        if ( !propVal.empty() ) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_INSTITUTION_ID, std::string(propVal.ToUTF8()));
+                                        } else {
+                                                throw IntegrationException(_Std("\"iid\" atribute expected at \"institution\" scope"),    "CONF/template");
+                                        }
+
+                                        if(hijosMedico->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_INSTITUTION_NAME, std::string(hijosMedico->GetChildren()->GetContent().ToUTF8()));
+                                        }
+                                }
+                        }
+                }//fin medico
+
+                if(hijo->GetName().CmpNoCase(wxT("hce")) == 0) {
+                        propVal = hijo->GetAttribute(wxT("aid"), wxEmptyString);
+                        if ( !propVal.empty() ) {
+                                modelo->GlobalVariables.InsertVariable(GKDI_HCE_ID, std::string(propVal.ToUTF8()));
+                        } else {
+                                LOG_DEBUG("ParserXMLEnglish","application id unespecified, using \"defaultHCE\"");
+                                modelo->GlobalVariables.InsertVariable(GKDI_HCE_ID, "defaultHCE");
+                        }
+                }
+
+                if (hijo->GetName().CmpNoCase(wxT("metadata")) == 0) {
+                        std::string codigo;
+                        std::string clave;
+                        std::string valor;
+                        std::string descripcion;
+
+                        propVal = hijo->GetAttribute(wxT("code"), wxEmptyString);
+                        if ( !propVal.empty() ) {
+                                codigo = propVal.Upper().ToUTF8();
+                        } else {
+                                throw IntegrationException(_Std("\"code\" attribute expected at \"metadata\" scope"),    "CONF/template");
+                        }
+
+                        propVal = hijo->GetAttribute(wxT("key"), wxEmptyString);
+                        if ( !propVal.empty() ) {
+                                clave = propVal.Lower().ToUTF8();
+                        } else {
+                                throw IntegrationException(_Std("\"key\" attribute expected at \"metadata\" scope"),    "CONF/template");
+                        }
+
+                        propVal = hijo->GetAttribute(wxT("value"), wxEmptyString);
+                        if ( !propVal.empty() ) {
+                                valor = propVal.ToUTF8();
+                        }
+
+                        propVal = hijo->GetAttribute(wxT("description"), wxEmptyString);
+                        if ( !propVal.empty() ) {
+                                descripcion = propVal.ToUTF8();
+                        }
+
+                        if (codigo == "DICOM") {
+                                modelo->TagsDICOMOverwrite.tags[clave] = valor;
+                        } else {
+                                modelo->GlobalVariables.InsertVariable(clave, valor, descripcion);
+                        }
+                }
+
+                if (hijo->GetName().CmpNoCase(wxT("observations")) == 0) {
+                        if(hijo->GetChildren() != NULL) {
+                                modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_OBSERVATIONS, std::string(hijo->GetChildren()->GetContent().ToUTF8()));
+                        }
+                }
+
+                if (hijo->GetName().CmpNoCase(wxT("message_template")) == 0) {
+                        if(hijo->GetChildren() != NULL) {
+                                modelo->messageTemplate = std::string(hijo->GetChildren()->GetContent().ToUTF8());
+                        }
+                }
+        }//fin hijos gnkworkflow
+
+        //insert tags dicom...
+        if (modelo->accion == GIL::IModeloIntegracion::TA_Dicomizar) {
+                //only overwrite en dicomize no en obtain....
+                if (modelo->GlobalVariables.Contains(GKDI_PATIENT_ID)) {
+                        modelo->TagsDICOMOverwrite.tags["0010|0020"] = modelo->GlobalVariables.GetValue(GKDI_PATIENT_ID);
+                }
+                if (modelo->GlobalVariables.Contains(GKDI_PATIENT_NAME)) {
+                        std::ostringstream ostr;
+                        ostr << modelo->GlobalVariables.GetValue(GKDI_PATIENT_FAMILY_NAME);
+                        if (modelo->GlobalVariables.Contains(GKDI_PATIENT_SECOND_FAMILY_NAME)) {
+                                ostr << " " << modelo->GlobalVariables.GetValue(GKDI_PATIENT_SECOND_FAMILY_NAME);
+                        }
+                        ostr << "^" << modelo->GlobalVariables.GetValue(GKDI_PATIENT_NAME);
+                        modelo->TagsDICOMOverwrite.tags["0010|0010"] = ostr.str();
+                }
+                if (modelo->GlobalVariables.Contains(GKDI_REFERRING_PHISICIAN_NAME)) {
+                        std::ostringstream ostr;
+                        ostr << modelo->GlobalVariables.GetValue(GKDI_REFERRING_PHISICIAN_FAMILY_NAME);
+                        if (modelo->GlobalVariables.Contains(GKDI_REFERRING_PHISICIAN_SECOND_FAMILY_NAME)) {
+                                ostr << " " << modelo->GlobalVariables.GetValue(GKDI_REFERRING_PHISICIAN_SECOND_FAMILY_NAME);
+                        }
+                        ostr << "^" << modelo->GlobalVariables.GetValue(GKDI_REFERRING_PHISICIAN_NAME);
+                        modelo->TagsDICOMOverwrite.tags["0008|0090"] = ostr.str();
+                }
+                if (modelo->GlobalVariables.Contains(GKDI_REFERRING_PHISICIAN_INSTITUTION_NAME)) {
+                        modelo->TagsDICOMOverwrite.tags["0008|0080"] = modelo->GlobalVariables.GetValue(GKDI_REFERRING_PHISICIAN_INSTITUTION_NAME);
+                }
+                if (!modelo->GlobalVariables.Contains(GKDI_HCE_PETITION_ID)) {
+                        LOG_DEBUG("ParserXMLEnglish", "\"petition-id\" attribute not specified");
+                }
+        } else if (modelo->accion == GIL::IModeloIntegracion::TA_Obtener) {
+                if (modelo->TagsDICOMOverwrite.tags.empty() && modelo->Files.empty()) {
+                        throw IntegrationException(_Std("You must specify attributes you want to use in the query"), "CONF/template");
+                }
+        }
+        if (!modelo->GlobalVariables.Contains(GKDI_PATIENT_ID) && modelo->accion == GIL::IModeloIntegracion::TA_Dicomizar) {
+                throw IntegrationException(_Std("It has been read a \"patient\" tag without identifiers"),    "CONF/template");
+        }
+        //se pone el codigo de aplicacion y el primer PACS de la configuracion si no nos ha venido  ninguno
+        std::string codigoAplicacion;
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","CodigoAplicacion", codigoAplicacion);
+        modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_APPLICATION_CODE, codigoAplicacion);
+        if(!servers.empty()) {
+                GNC::GCS::Ptr<DicomServer> pServer = DicomServerList::Instance()->GetDefaultServer();
+                if (!modelo->GlobalVariables.Contains(GKDI_GLOBAL_PACS_STORE_SID) && pServer.IsValid()) {
+                        modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_PACS_STORE_SID, pServer->ID);
+                }
+                if (!modelo->GlobalVariables.Contains(GKDI_GLOBAL_PACS_RETRIEVE_SID) && pServer.IsValid()) {
+                        modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_PACS_RETRIEVE_SID, pServer->ID);
+                }
+        }
+        if ( (modelo->accion == GIL::IModeloIntegracion::TA_Dicomizar && !modelo->GlobalVariables.Contains(GKDI_GLOBAL_PACS_STORE_SID)) ||
+             (modelo->accion == GIL::IModeloIntegracion::TA_Obtener && !modelo->GlobalVariables.Contains(GKDI_GLOBAL_PACS_RETRIEVE_SID)) ) {
+                throw IntegrationException(_Std("You must define a default PACS in the integration XML or in the settings menu"),    "CONF/template");
+        }
+        return modelo;
+}
diff --git a/cadxcore/main/controllers/parserxmlenglish.h b/cadxcore/main/controllers/parserxmlenglish.h
new file mode 100644
index 0000000..9ede369
--- /dev/null
+++ b/cadxcore/main/controllers/parserxmlenglish.h
@@ -0,0 +1,39 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+#pragma once
+#include <api/ientorno.h>
+#include <main/controllers/integrationcontroller.h>
+#include <api/imodelohl7.h>
+
+namespace GIL
+{
+class ParserXMLEnglish : public GIL::IXMLIntegrationParser
+{
+public:
+        typedef std::map<std::string, GIL::IModeloPACSServer> MapaServers;
+
+        ParserXMLEnglish();
+        ~ParserXMLEnglish();
+        virtual std::list<std::string> GetKeys();
+        virtual void ParseIntegrationXML(GIL::IntegrationModelList& models, wxXmlNode* pRoot);
+        virtual GIL::IModeloIntegracion* ParseGnkWorkflow(wxXmlNode* pNode, MapaServers& servers);
+protected:
+};
+}
diff --git a/cadxcore/main/controllers/parserxmlspanish.cpp b/cadxcore/main/controllers/parserxmlspanish.cpp
new file mode 100644
index 0000000..c8b1ec8
--- /dev/null
+++ b/cadxcore/main/controllers/parserxmlspanish.cpp
@@ -0,0 +1,557 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <string>
+#include <map>
+#include <ctime>
+#include <sstream>
+
+#include <wx/xml/xml.h>
+#include <wx/file.h>
+#include <wx/sstream.h>
+#include <wx/msgdlg.h>
+#ifndef _WIN32
+#include <signal.h>
+#endif
+#include <wx/tokenzr.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/filename.h>
+
+
+#include "parserxmlspanish.h"
+#include <api/globals.h>
+#include <api/imodelohl7.h>
+#include <api/integration/dict.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/helpers/aetwildcards.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladorlog.h>
+#include <main/entorno.h>
+#include "dcmtk/dicomservers.h"
+
+//creacion de la base de datos de mensajes
+GIL::ParserXMLSpanish::ParserXMLSpanish()
+{
+}
+
+GIL::ParserXMLSpanish::~ParserXMLSpanish()
+{
+}
+
+//region "Interfaz generica"
+
+std::list<std::string> GIL::ParserXMLSpanish::GetKeys()
+{
+        std::list<std::string> list;
+        list.push_back("getcontextresult");
+        list.push_back("plantilla");
+        return list;
+}
+
+/* Parsea la cadena XML y construye el modelo de integracion. Los parametros no encontrados se asignan por defecto segun lo especificado en la configuracion global */
+void GIL::ParserXMLSpanish::ParseIntegrationXML(GIL::IntegrationModelList& models, wxXmlNode* pRoot)
+{
+        MapaServers servers;
+        // PreCargamos la lista de PACS de la configuracion
+        DicomServerList::TServerList ListOfServers = DicomServerList::Instance()->GetServerList();
+        for (DicomServerList::TServerList::iterator it = ListOfServers.begin(); it != ListOfServers.end(); ++it) {
+                IModeloPACSServer pacs;
+                pacs.sid = (*it)->ID;
+                pacs.AET = (*it)->AET;
+                pacs.hostname = (*it)->HostName;
+                pacs.puerto = (*it)->Port;
+
+                servers[pacs.sid] = pacs;
+        }
+        //
+        if (pRoot->GetName().CmpNoCase(wxT("getcontextresult")) == 0) {
+                wxString propVal;
+
+                // Parseamos los PACS especificados por fichero
+                for (wxXmlNode* nodo = pRoot->GetChildren(); nodo != NULL; nodo = nodo->GetNext()) {
+                        if (nodo->GetName().CmpNoCase(wxT("pacs")) == 0) { // Configuracion de PACS
+                                GIL::IModeloPACSServer pacsServer;
+
+                                propVal = nodo->GetAttribute(wxT("sid"), wxEmptyString);
+                                if( !propVal.empty() ) {
+                                        pacsServer.sid = propVal.ToUTF8();
+                                } else {
+                                        throw IntegrationException(_Std("Omitted Identificator"), "CONF/pacs");
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("aet"), wxEmptyString);
+                                if( !propVal.empty() ) {
+                                        pacsServer.AET = propVal.ToUTF8();
+                                } else {
+                                        throw IntegrationException(_Std("Omitted AET"), "CONF/pacs");
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("hostname"), wxEmptyString);
+                                if( !propVal.empty() ) {
+                                        pacsServer.hostname = propVal.ToUTF8();
+                                } else {
+                                        throw IntegrationException(_Std("Hostname missing"), "CONF/pacs");
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("puerto"), wxEmptyString);
+                                if( !propVal.empty() ) {
+                                        pacsServer.puerto = propVal.ToUTF8();
+                                } else {
+                                        throw IntegrationException(_Std("Omitted port"), "CONF/pacs");
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("tls"), wxEmptyString);
+                                if( propVal.CmpNoCase(wxT("yes")) == 0 || propVal.CmpNoCase(wxT("true")) == 0 || propVal.CmpNoCase(wxT("si")) == 0 || propVal.CmpNoCase(wxT("1")) == 0 ) {
+                                        pacsServer.tls = true;
+                                } else {
+                                        pacsServer.tls = false;
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("usuario-pacs"), wxEmptyString);
+                                if( !propVal.empty()) {
+                                        pacsServer.user = propVal.ToUTF8();
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("password-pacs"), wxEmptyString);
+                                if( !propVal.empty()) {
+                                        pacsServer.password = propVal.ToUTF8();
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("verify-credentials"), wxEmptyString);
+                                if( propVal.CmpNoCase(wxT("yes")) == 0 || propVal.CmpNoCase(wxT("true")) == 0 || propVal.CmpNoCase(wxT("si")) == 0 || propVal.CmpNoCase(wxT("1")) == 0 ) {
+                                        pacsServer.verify = true;
+                                } else {
+                                        pacsServer.verify = false;
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("metodo"), wxEmptyString);
+                                if( propVal.CmpNoCase(wxT("get")) == 0 ) {
+                                        pacsServer.metodo = GIL::IModeloPACSServer::IMPS_GET;
+                                } else {
+                                        pacsServer.metodo = GIL::IModeloPACSServer::IMPS_MOVE;
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("pdu"), wxEmptyString);
+                                if( propVal.empty()) {
+                                        pacsServer.pdu = "16384";
+                                } else {
+                                        pacsServer.pdu = propVal.ToUTF8();
+                                }
+
+                                propVal = nodo->GetAttribute(wxT("nivel-recuperacion"), wxEmptyString);
+                                if( propVal.empty()) {
+                                        pacsServer.retrieveLevel = "SERIES";
+                                } else {
+                                        pacsServer.retrieveLevel = propVal.ToUTF8();
+                                }
+
+                                for (wxXmlNode* subnodo = nodo->GetChildren(); subnodo != NULL; subnodo = subnodo->GetNext()) {
+                                        if (subnodo->GetName().CmpNoCase(wxT("client-cert")) == 0) {
+                                                pacsServer.cert = subnodo->GetNodeContent().ToUTF8();
+                                        } else if (subnodo->GetName().CmpNoCase(wxT("client-key")) == 0) {
+                                                pacsServer.key = subnodo->GetNodeContent().ToUTF8();
+                                        }
+                                }
+
+                                servers[pacsServer.sid] = pacsServer;
+                                try {
+                                        GNC::GCS::Ptr<DicomServer> server = DicomServerList::Instance()->GetServer(pacsServer.sid);
+                                        server->AET = pacsServer.AET;
+                                        server->HostName = pacsServer.hostname;
+                                        long puerto;
+                                        long pdu;
+                                        if(!wxString::FromUTF8(pacsServer.pdu.c_str()).ToLong(&pdu)) {
+                                                throw IntegrationException(_Std("The pdu size is not a valid number"), "CONF/pacs");
+                                        }
+                                        server->PDU = pdu;
+                                        if(wxString::FromUTF8(pacsServer.puerto.c_str()).ToLong(&puerto)) {
+                                                server->Port = puerto;
+                                        } else {
+                                                throw IntegrationException(_Std("Port is not a valid number"), "CONF/pacs");
+                                        }
+                                        if (pacsServer.metodo == GIL::IModeloPACSServer::IMPS_GET) {
+                                                server->retrieveMethod = DicomServer::GET;
+                                        } else {
+                                                server->retrieveMethod = DicomServer::MOVE;
+                                        }
+                                        {
+                                                wxString strTmp = wxString::FromUTF8(pacsServer.retrieveLevel.c_str());
+                                                server->retrieveSeries = strTmp.CmpNoCase(wxT("SERIES")) == 0;
+                                        }
+                                        server->useTLS = pacsServer.tls;
+                                        server->verifyCredentials = pacsServer.verify;
+                                        server->certificate = pacsServer.cert;
+                                        server->privateKey  = pacsServer.key;
+                                        server->pacsUser = pacsServer.user;
+                                        server->pacsPass = pacsServer.password;
+
+                                        DicomServerList::Instance()->SetDefaultServer(server->ID);
+
+                                } catch (GinkgoNoServerFoundException& ) {
+                                        long puerto;
+                                        long pdu;
+                                        if(!wxString::FromUTF8(pacsServer.pdu.c_str()).ToLong(&pdu)) {
+                                                throw IntegrationException(_Std("The pdu size is not a valid number"), "CONF/pacs");
+                                        }
+                                        if(wxString::FromUTF8(pacsServer.puerto.c_str()).ToLong(&puerto)) {
+                                                DicomServer::TRetrieveMethod retrieveMethod = DicomServer::MOVE;
+                                                if ( pacsServer.metodo == GIL::IModeloPACSServer::IMPS_GET) {
+                                                        retrieveMethod = DicomServer::GET;
+                                                }
+                                                DicomServerList::Instance()->AddServer( DicomServer(pacsServer.sid, pacsServer.AET, pacsServer.hostname, (int)puerto, 0, true, pdu, pacsServer.tls, pacsServer.user, pacsServer.password, retrieveMethod, "", wxString::FromUTF8(pacsServer.retrieveLevel.c_str()).Upper() == wxT("SERIES"), false, pacsServer.verify, pacsServer.cert, pacsServer.key, pacsServer.defaultCharset), true );
+                                        } else {
+                                                throw IntegrationException(_Std("The port is not a valid number"), "CONF/pacs");
+                                        }
+                                }
+                        }
+                }
+
+                // Parseamos las plantillas
+                for (wxXmlNode* nodo = pRoot->GetChildren(); nodo != NULL; nodo = nodo->GetNext()) {
+                        if (nodo->GetName().CmpNoCase(wxT("plantilla")) == 0)  { // Plantilla
+                                GIL::IModeloIntegracion* modelo = ParsePlantilla(nodo, servers);
+
+                                models.push_back(modelo);
+                        } //fin plantilla
+                } //fin de parseo de plantillas
+        } else if (pRoot->GetName().CmpNoCase(wxT("plantilla")) == 0) {
+                GIL::IModeloIntegracion* modelo = ParsePlantilla(pRoot, servers);
+                models.push_back(modelo);
+        } else {
+                throw IntegrationException(_Std("Setting not found"), "CONF");
+        }
+}
+
+GIL::IModeloIntegracion* GIL::ParserXMLSpanish::ParsePlantilla(wxXmlNode* nodo, MapaServers& servers)
+{
+        std::string codigoAplicacion;
+        //se extrae de la configuracion el codigo de aplicacion
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","CodigoAplicacion", codigoAplicacion);
+
+        wxString propVal;
+        GIL::IModeloIntegracion* modelo = new IModeloIntegracion();
+        //se copia el raw data
+        {
+                wxXmlNode* pNodo = new wxXmlNode(*nodo);
+                wxXmlDocument docTmp;
+                docTmp.SetRoot(pNodo);
+                wxStringOutputStream out;
+                docTmp.Save(out,wxXML_NO_INDENTATION);
+                modelo->rawXmlData = out.GetString().ToUTF8();
+        }
+        //
+
+        propVal = nodo->GetAttribute(wxT("pid"), wxEmptyString);
+        if( !propVal.empty() ) {
+                modelo->idPlantilla = propVal.ToUTF8();
+        } else {
+                modelo->idPlantilla = "";
+        }
+
+        propVal = nodo->GetAttribute(wxT("accion"), wxEmptyString).Lower();
+        if ( !propVal.empty() ) {
+
+                if (propVal.CmpNoCase(wxT("obtener")) == 0) {
+                        modelo->accion = GIL::IModeloIntegracion::TA_Obtener;
+                } else if (propVal.CmpNoCase(wxT("dicomizar")) == 0 ) {
+                        modelo->accion = GIL::IModeloIntegracion::TA_Dicomizar;
+                } else if (propVal.CmpNoCase(wxT("imprimir")) == 0) {
+                        modelo->accion = GIL::IModeloIntegracion::TA_Imprimir;
+                } else {
+                        throw IntegrationException(_Std("\"accion\" attribute invalid at \"plantilla\" scope" ), "CONF/template");
+                }
+        } else {
+                throw IntegrationException(_Std("\"accion\" attribute expected at \"plantilla\" scope"), "CONF/template");
+        }
+
+        propVal = nodo->GetAttribute(wxT("id_peticion"), wxEmptyString);
+        if( !propVal.empty() ) {
+                modelo->GlobalVariables.InsertVariable(GKDI_HCE_PETITION_ID, std::string(propVal.ToUTF8()), "Id de peticion");
+        }
+
+        propVal = nodo->GetAttribute(wxT("ambito"), wxEmptyString);
+        if( !propVal.empty() ) {
+                modelo->GlobalVariables.InsertVariable(GKDI_JIMENA_AMBITO_PETICION, std::string(propVal.ToUTF8()), "Ambito de la peticion");
+        }
+
+        if( nodo->HasAttribute(wxT("pacs_retrieve_sid")) ) {
+                propVal = nodo->GetAttribute(wxT("pacs_retrieve_sid"), wxEmptyString);
+                if (!propVal.IsEmpty()) {
+                        modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_PACS_RETRIEVE_SID, std::string(propVal.ToUTF8()), "String Id del pacs de obtencion");
+                } else {
+                        throw IntegrationException(_Std("\"pacs_retrieve_sid\" attribute empty at \"plantilla\" scope"), "CONF/template");
+                }
+        }
+
+        if( nodo->HasAttribute(wxT("pacs_store_sid")) ) {
+                propVal = nodo->GetAttribute(wxT("pacs_store_sid"), wxEmptyString);
+                if (!propVal.IsEmpty()) {
+                        modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_PACS_STORE_SID, std::string(propVal.ToUTF8()), "String Id del pacs de almacenamiento");
+                } else {
+                        throw IntegrationException(_Std("\"pacs_store_sid\" attribute empty at \"plantilla\" scope"),  "CONF/template");
+                }
+        }
+
+        //recorremos los hijos de las plantillas
+        for (wxXmlNode* hijo = nodo->GetChildren(); hijo != NULL; hijo = hijo->GetNext()) {
+
+                if(hijo->GetName().CmpNoCase(wxT("dimse")) == 0) {
+                        //parseamos los campos dimse
+                        std::string uid;
+                        propVal = hijo->GetAttribute(wxT("uid"), wxEmptyString);
+                        if ( !propVal.empty() ) {
+                                uid =  propVal.ToUTF8();
+                        } else {
+                                uid = "";
+                                if(modelo->accion != GIL::IModeloIntegracion::TA_Dicomizar) {
+                                        throw IntegrationException(_Std("\"uid\" attribute expected at \"dimse\" scope"),  "CONF/template");
+                                }
+                        }
+
+                        propVal = hijo->GetAttribute(wxT("ambito"), wxEmptyString).Lower();
+                        if ( !propVal.empty() ) {
+                                if (propVal.CmpNoCase(wxT("study")) == 0) {
+                                        modelo->TagsDICOMOverwrite.tags["0008|0052"] = "STUDY";
+                                        //study instance uid
+                                        modelo->TagsDICOMOverwrite.tags["0020|000d"] = uid;
+                                } else if (propVal.CmpNoCase(wxT("series")) == 0) {
+                                        modelo->TagsDICOMOverwrite.tags["0008|0052"] = "SERIES";
+                                        //series instance uid
+                                        modelo->TagsDICOMOverwrite.tags["0020|000e"] = uid;
+                                } else if (propVal.CmpNoCase(wxT("image")) == 0) {
+                                        modelo->TagsDICOMOverwrite.tags["0008|0052"] = "IMAGE";
+                                        //sop instance
+                                        modelo->TagsDICOMOverwrite.tags["0008|0018"] = uid;
+                                        //sop instance uid
+                                } else {
+                                        throw IntegrationException(_Std("\"ambito\" attribute invalid at \"dimse\" scope"), "CONF/template");
+                                }
+                        } else {
+                                modelo->TagsDICOMOverwrite.tags["0020|000d"] = "STUDY";
+                                if(modelo->accion != GIL::IModeloIntegracion::TA_Dicomizar) {
+                                        throw IntegrationException(_Std("\"ambito\" attribute expected at \"dimse\" scope"), "CONF/template");
+                                }
+                        }
+
+                }
+
+                //parseamos los campos d paciente
+                if(hijo->GetName().CmpNoCase(wxT("paciente")) == 0) {
+                        for (wxXmlNode* hijosPaciente = hijo->GetChildren(); hijosPaciente != NULL; hijosPaciente = hijosPaciente->GetNext()) {
+                                if(hijosPaciente->GetName().CmpNoCase(wxT("nombre")) == 0) {
+                                        if(hijosPaciente->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_PATIENT_NAME,  std::string(hijosPaciente->GetChildren()->GetContent().ToUTF8()), "Patient Name");
+                                        }
+                                } else if(hijosPaciente->GetName().CmpNoCase(wxT("apellido1")) == 0) {
+                                        if(hijosPaciente->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_PATIENT_FAMILY_NAME,  std::string(hijosPaciente->GetChildren()->GetContent().ToUTF8()), "Patient Surname");
+                                        }
+                                } else if(hijosPaciente->GetName().CmpNoCase(wxT("apellido2")) == 0) {
+                                        if(hijosPaciente->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_PATIENT_SECOND_FAMILY_NAME,  std::string(hijosPaciente->GetChildren()->GetContent().ToUTF8()), "Patient Second Surname");
+                                        }
+                                } else if(hijosPaciente->GetName().CmpNoCase(wxT("numero_episodio")) == 0) {
+                                        if(hijosPaciente->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_HCE_EPISODE_NUMBER,  std::string(hijosPaciente->GetChildren()->GetContent().ToUTF8()), "Episode Number");
+                                        }
+                                } else if(hijosPaciente->GetName().CmpNoCase(wxT("id")) == 0) {
+                                        std::string codigo(propVal.ToUTF8());
+                                        std::string valor(propVal.ToUTF8());
+                                        propVal = hijosPaciente->GetAttribute(wxT("codigo"), wxEmptyString);
+                                        if ( !propVal.empty() ) {
+                                                codigo =  propVal.ToUTF8();
+                                        } else {
+                                                throw IntegrationException(_Std("\"codigo\" attribute expected at \"paciente\" scope"), "CONF/template");
+                                        }
+                                        propVal = hijosPaciente->GetAttribute(wxT("valor"), wxEmptyString);
+                                        if ( !propVal.empty() ) {
+                                                valor =  propVal.ToUTF8();
+                                                if (!modelo->GlobalVariables.Contains(GKDI_PATIENT_ID) || codigo=="PI") {
+                                                        modelo->GlobalVariables.InsertVariable(GKDI_PATIENT_ID,  valor, "Patient Id");
+                                                }
+                                        }
+                                }
+                        }
+                }//fin paciente
+
+                //parseamos los campos d medico
+                if(hijo->GetName().CmpNoCase(wxT("medico")) == 0) {
+                        for (wxXmlNode* hijosMedico = hijo->GetChildren(); hijosMedico != NULL; hijosMedico = hijosMedico->GetNext()) {
+                                if(hijosMedico->GetName().CmpNoCase(wxT("nombre")) == 0) {
+                                        if(hijosMedico->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_NAME,  std::string(hijosMedico->GetChildren()->GetContent().ToUTF8()), "Referring Physician Name");
+                                        }
+                                } else if(hijosMedico->GetName().CmpNoCase(wxT("apellido1")) == 0) {
+                                        if(hijosMedico->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_FAMILY_NAME,  std::string(hijosMedico->GetChildren()->GetContent().ToUTF8()), "Referring Physician Family Name");
+                                        }
+                                } else if(hijosMedico->GetName().CmpNoCase(wxT("apellido2")) == 0) {
+                                        if(hijosMedico->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_SECOND_FAMILY_NAME,  std::string(hijosMedico->GetChildren()->GetContent().ToUTF8()), "Referring Physician Second Family Name");
+                                        }
+                                } else if(hijosMedico->GetName().CmpNoCase(wxT("id")) == 0) {
+                                        std::string codigo(propVal.ToUTF8());
+                                        std::string valor(propVal.ToUTF8());
+                                        propVal = hijosMedico->GetAttribute(wxT("codigo"), wxEmptyString);
+                                        if ( !propVal.empty() ) {
+                                                codigo =  propVal.ToUTF8();
+                                        } else {
+                                                throw IntegrationException(_Std("\"codigo\" attribute expected at \"medico\" scope"), "CONF/template");
+                                        }
+                                        propVal = hijosMedico->GetAttribute(wxT("valor"), wxEmptyString);
+                                        if ( !propVal.empty() ) {
+                                                valor =  propVal.ToUTF8();
+                                        } else {
+                                                throw IntegrationException(_Std("\"valor\" attribute expected at \"medico\" scope"), "CONF/template");
+                                        }
+                                        if (!modelo->GlobalVariables.Contains(GKDI_REFERRING_PHISICIAN_ID) || codigo=="NNESP") {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_ID,  valor, "Referring Physician Id");
+                                        }
+                                } else if(hijosMedico->GetName().CmpNoCase(wxT("centro")) == 0) {
+                                        propVal = hijosMedico->GetAttribute(wxT("cid"), wxEmptyString);
+                                        if ( !propVal.empty() ) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_INSTITUTION_ID, std::string(propVal.ToUTF8()));
+                                        } else {
+                                                throw IntegrationException(_Std("\"cid\" atribute expected at \"centro\" scope"), "CONF/template");
+                                        }
+
+                                        if(hijosMedico->GetChildren() != NULL) {
+                                                modelo->GlobalVariables.InsertVariable(GKDI_REFERRING_PHISICIAN_INSTITUTION_NAME, std::string(hijosMedico->GetChildren()->GetContent().ToUTF8()));
+                                        }
+                                }
+                        }
+                }//fin medico
+
+                if(hijo->GetName().CmpNoCase(wxT("hce")) == 0) {
+                        propVal = hijo->GetAttribute(wxT("aid"), wxEmptyString);
+                        if ( !propVal.empty() ) {
+                                modelo->GlobalVariables.InsertVariable(GKDI_HCE_ID, std::string(propVal.ToUTF8()));
+                        } else {
+                                throw IntegrationException(_Std("\"aid\" attribute expected at \"hce\" scope"), "CONF/template");
+                        }
+                }
+
+                if (hijo->GetName().CmpNoCase(wxT("metadato")) == 0) {
+                        std::string codigo;
+                        std::string clave;
+                        std::string valor;
+                        std::string descripcion;
+
+                        propVal = hijo->GetAttribute(wxT("codigo"), wxEmptyString);
+                        if ( !propVal.empty() ) {
+                                codigo = propVal.Upper().ToUTF8();
+                        } else {
+                                throw IntegrationException(_Std("\"codigo\" attribute expected at \"metadato\" scope"), "CONF/template");
+                        }
+
+                        propVal = hijo->GetAttribute(wxT("clave"), wxEmptyString);
+                        if ( !propVal.empty() ) {
+                                clave = propVal.Lower().ToUTF8();
+                        } else {
+                                throw IntegrationException(_Std("\"clave\" attribute expected at \"metadato\" scope"), "CONF/template");
+                        }
+
+                        propVal = hijo->GetAttribute(wxT("valor"), wxEmptyString);
+
+                        if ( !propVal.empty() ) {
+                                valor = propVal.ToUTF8();
+                        }
+
+                        propVal = hijo->GetAttribute(wxT("descripcion"), wxEmptyString);
+                        if ( !propVal.empty() ) {
+                                descripcion = propVal.ToUTF8();
+                        }
+
+                        if (codigo == "DICOM") {
+                                modelo->TagsDICOMOverwrite.tags[clave] = valor;
+                        } else {
+                                modelo->GlobalVariables.InsertVariable(clave, valor, descripcion);
+                        }
+                }
+
+                if (hijo->GetName().CmpNoCase(wxT("observaciones")) == 0) {
+                        if(hijo->GetChildren() != NULL) {
+                                modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_OBSERVATIONS, std::string(hijo->GetChildren()->GetContent().ToUTF8()));
+                        }
+                }
+        }//fin hijos plantilla
+//insert tags dicom...
+        if (modelo->accion == GIL::IModeloIntegracion::TA_Dicomizar) {
+                //solo se sobreescribe en dicomizacion
+                if (!modelo->GlobalVariables.Contains(GKDI_HCE_PETITION_ID)) {
+                        throw IntegrationException(_Std("\"id_peticion\" attribute expected at \"gnkworkflow\" scope"), "CONF/template");
+                }
+                if (!modelo->GlobalVariables.Contains(GKDI_JIMENA_AMBITO_PETICION)) {
+                        throw IntegrationException(_Std("\"ambito\" attribute expected at \"plantilla\" scope"), "CONF/template");
+                }
+                if (modelo->GlobalVariables.Contains(GKDI_PATIENT_ID)) {
+                        modelo->TagsDICOMOverwrite.tags["0010|0020"] = modelo->GlobalVariables.GetValue(GKDI_PATIENT_ID);
+                }
+                if (modelo->GlobalVariables.Contains(GKDI_PATIENT_NAME)) {
+                        std::ostringstream ostr;
+                        ostr << modelo->GlobalVariables.GetValue(GKDI_PATIENT_FAMILY_NAME);
+                        if (modelo->GlobalVariables.Contains(GKDI_PATIENT_SECOND_FAMILY_NAME)) {
+                                ostr << " " << modelo->GlobalVariables.GetValue(GKDI_PATIENT_SECOND_FAMILY_NAME);
+                        }
+                        ostr << "^" << modelo->GlobalVariables.GetValue(GKDI_PATIENT_NAME);
+                        modelo->TagsDICOMOverwrite.tags["0010|0010"] = ostr.str();
+                }
+                if (modelo->GlobalVariables.Contains(GKDI_REFERRING_PHISICIAN_NAME)) {
+                        std::ostringstream ostr;
+                        ostr << modelo->GlobalVariables.GetValue(GKDI_REFERRING_PHISICIAN_FAMILY_NAME);
+                        if (modelo->GlobalVariables.Contains(GKDI_REFERRING_PHISICIAN_SECOND_FAMILY_NAME)) {
+                                ostr << " " << modelo->GlobalVariables.GetValue(GKDI_REFERRING_PHISICIAN_SECOND_FAMILY_NAME);
+                        }
+                        ostr << "^" << modelo->GlobalVariables.GetValue(GKDI_REFERRING_PHISICIAN_NAME);
+                        modelo->TagsDICOMOverwrite.tags["0008|0090"] = ostr.str();
+                }
+                if (modelo->GlobalVariables.Contains(GKDI_REFERRING_PHISICIAN_INSTITUTION_NAME)) {
+                        modelo->TagsDICOMOverwrite.tags["0008|0080"] = modelo->GlobalVariables.GetValue(GKDI_REFERRING_PHISICIAN_INSTITUTION_NAME);
+                }
+        } else if (modelo->accion == GIL::IModeloIntegracion::TA_Obtener) {
+                if (modelo->TagsDICOMOverwrite.tags.empty()) {
+                        throw IntegrationException(_Std("You must specify attributes you want to use in the query"), "CONF/template");
+                }
+        }
+        if(!modelo->GlobalVariables.Contains(GKDI_HCE_ID)) {
+                throw IntegrationException(_Std("id_application expected"), "CONF/template");
+        }
+        if (!modelo->GlobalVariables.Contains(GKDI_PATIENT_ID) && modelo->accion == GIL::IModeloIntegracion::TA_Dicomizar) {
+                throw IntegrationException(_Std("It has been read a \"patient\" tag without identifiers"), "CONF/template");
+        }
+        //se pone el codigo de aplicacion y el primer PACS de la configuracion si no nos ha venido  ninguno
+        modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_APPLICATION_CODE, codigoAplicacion);
+        if(servers.size() > 0) {
+                GNC::GCS::Ptr<DicomServer> pServer = DicomServerList::Instance()->GetDefaultServer();
+                if (!modelo->GlobalVariables.Contains(GKDI_GLOBAL_PACS_STORE_SID) && pServer.IsValid()) {
+                        modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_PACS_STORE_SID, pServer->ID);
+                }
+                if (!modelo->GlobalVariables.Contains(GKDI_GLOBAL_PACS_RETRIEVE_SID) && pServer.IsValid()) {
+                        modelo->GlobalVariables.InsertVariable(GKDI_GLOBAL_PACS_RETRIEVE_SID, pServer->ID);
+                }
+        }
+        if ( (modelo->accion == GIL::IModeloIntegracion::TA_Dicomizar && !modelo->GlobalVariables.Contains(GKDI_GLOBAL_PACS_STORE_SID)) ||
+             (modelo->accion == GIL::IModeloIntegracion::TA_Obtener && !modelo->GlobalVariables.Contains(GKDI_GLOBAL_PACS_RETRIEVE_SID)) ) {
+                throw IntegrationException(_Std("You must define a default PACS in the integration XML or in the settings menu"), "CONF/template");
+        }
+        return modelo;
+}
+
diff --git a/cadxcore/main/controllers/parserxmlspanish.h b/cadxcore/main/controllers/parserxmlspanish.h
new file mode 100644
index 0000000..c9a0d4e
--- /dev/null
+++ b/cadxcore/main/controllers/parserxmlspanish.h
@@ -0,0 +1,42 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/ientorno.h>
+#include <api/imodelohl7.h>
+#include <main/controllers/integrationcontroller.h>
+
+class wxXmlNode;
+
+namespace GIL
+{
+class ParserXMLSpanish : public GIL::IXMLIntegrationParser
+{
+public:
+        typedef std::map<std::string, GIL::IModeloPACSServer> MapaServers;
+
+        ParserXMLSpanish();
+        ~ParserXMLSpanish();
+        virtual std::list<std::string> GetKeys();
+        virtual void ParseIntegrationXML(GIL::IntegrationModelList& models, wxXmlNode* pRoot);
+        virtual GIL::IModeloIntegracion* ParsePlantilla(wxXmlNode* pNode, MapaServers& servers);
+protected:
+};
+}
diff --git a/cadxcore/main/controllers/permisoscore.h b/cadxcore/main/controllers/permisoscore.h
new file mode 100644
index 0000000..c2e2a4f
--- /dev/null
+++ b/cadxcore/main/controllers/permisoscore.h
@@ -0,0 +1,16 @@
+#error delete file
+/*
+ *
+ *  $Id: permisoscore.h $
+ *  Ginkgo CADx Project
+ *
+ *  Copyright 2008-14 MetaEmotion S.L. All rights reserved.
+ *  http://ginkgo-cadx.com
+ *
+ *  This file is licensed under LGPL v3 license.
+ *  See License.txt for details
+ *
+ *
+ */
+#pragma once
+
diff --git a/cadxcore/main/controllers/smartretrievecontroller.cpp b/cadxcore/main/controllers/smartretrievecontroller.cpp
new file mode 100644
index 0000000..f35e061
--- /dev/null
+++ b/cadxcore/main/controllers/smartretrievecontroller.cpp
@@ -0,0 +1,285 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "smartretrievecontroller.h"
+
+#include <api/dicom/dcmuiddictionary.h>
+#include <api/dicom/dcmdictionary.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/storedqueriescontroller.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/pacscontroller.h>
+#include <commands/pacsdownloadcommand.h>
+#include <main/entorno.h>
+#include <api/ilock.h>
+#include <api/threads/thread.h>
+#include <api/observers/ieventsobserver.h>
+#include <main/controllers/controladoreventos.h>
+#include <eventos/progresocomando.h>
+#include <wx/thread.h>
+#include <set>
+
+#define LOGGER "SmartRetrieve"
+
+namespace GNC
+{
+namespace GCS
+{
+////Anon usage thread to upload messages... Read anon usage database and send messages to the web service
+class SmartRetrieveService: public GNC::GCS::Thread, GNC::GCS::IEventsObserver, GNC::GCS::ILockable
+{
+public:
+        SmartRetrieveService(int sPeriod, int maxDownloads): GNC::GCS::Thread(LOGGER),
+                hasToStop(false),
+                condition(sleepLocker),
+                sleepingPeriod(sPeriod),
+                maxDownloadsPerIteration(maxDownloads)
+        {
+                GNC::GCS::ControladorEventos::Instance()->Registrar(this, GNC::GCS::Events::EventoProgresoComando());
+        }
+
+        virtual ~SmartRetrieveService()
+        {
+                //can't be synchronous => deathlock
+                GNC::GCS::ControladorEventos::Instance()->DesRegistrar(this);
+                GNC::Entorno::Instance()->GetCommandController()->AbortarComandosDeOwnerAsincrono(this);
+        }
+
+        void Destroy()
+        {
+        }
+
+        void Stop()
+        {
+                hasToStop = true;
+                condition.Broadcast();
+        }
+
+        virtual void* Task()
+        {
+                try {
+                        LOG_DEBUG(LOGGER, "Waiting to to start SmartRetrieveService Task...");
+                        //we have to lock the mutex before wait, else it will fail
+                        //sleepLocker.TryLock();
+                        //condition.WaitTimeout(ANON_USAGE_THREAD_START_TO);
+                        while (!hasToStop) {
+                                LOG_DEBUG(LOGGER, "Starting SmartRetrieveService Task...");
+                                //first of all get active queries...
+                                GNC::GCS::StoredQueryController::TStoredQueriesList listOfQueries = GNC::GCS::StoredQueryController::Instance()->getActiveQueries();
+                                int numberOfDownloads = 0;
+                                for (GNC::GCS::StoredQueryController::TStoredQueriesList::iterator it = listOfQueries.begin(); it != listOfQueries.end() && numberOfDownloads < maxDownloadsPerIteration; ++it) {
+                                        GNC::GCS::Ptr<GNC::GCS::StoredQuery>& pStoredQuery = (*it);
+                                        //perform query...
+                                        GIL::DICOM::IPACSController* pCI = NULL;
+                                        typedef std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> > TSearchResultList;
+                                        TSearchResultList results;
+                                        try {
+
+                                                pCI = GNC::GCS::IEntorno::Instance()->GetPACSController();
+                                                if (pCI == NULL) {
+                                                        LOG_ERROR(LOGGER, "pCI is null");
+                                                        continue;
+                                                }
+                                                pCI->GetConnection(this);
+                                                GIL::DICOM::DicomDataset query;
+                                                pStoredQuery->addCondition(GKDCM_QueryRetrieveLevel,"STUDY");
+                                                pStoredQuery->addConditionIfNotExists(GKDCM_StudyInstanceUID);
+                                                pStoredQuery->buildQuery(query);
+                                                pCI->Query(this, GKUID_FINDStudyRootQueryRetrieveInformationModel, query, results, pStoredQuery->getPacsId(), NULL);
+                                        } catch (GNC::GCS::IException& ex) {
+                                                LOG_WARN(LOGGER, "There has been an exception searching in PACS " << ex.GetFullCause());
+                                        } catch (...) {
+                                                LOG_WARN(LOGGER, "There has been an exception searching in PACS");
+                                        }
+                                        if (pCI) {
+                                                pCI->ReleaseConnection(this);
+                                        }
+                                        //we have results stored in "results" iterate throught studyInstanceUIDs to check if we have to download them...
+                                        for (TSearchResultList::iterator it  = results.begin(); it != results.end(); ++it) {
+                                                std::string studyInstanceUID = (*it)->getTag(GKDCM_StudyInstanceUID);
+                                                if (!studyInstanceUID.empty() && !GNC::GCS::HistoryController::Instance()->ExistsStudyWithUID(studyInstanceUID)) {
+                                                        LOG_DEBUG(LOGGER, "Trying to download " << studyInstanceUID);
+                                                        //download study!!
+                                                        GIL::DICOM::DicomDataset base;
+                                                        base.tags[GKDCM_QueryRetrieveLevel] = "STUDY";
+                                                        base.tags[GKDCM_StudyInstanceUID] = studyInstanceUID;
+                                                        {
+                                                                GNC::GCS::ILocker(this);
+                                                                inProgressStudies.insert(studyInstanceUID);
+                                                        }
+                                                        GADAPI::PACSDownloadCommandParams* pParams = new GADAPI::PACSDownloadCommandParams(pStoredQuery->getPacsId(), base, false, true);
+                                                        GNC::GCS::IComando* pCommand = new GADAPI::PACSDownloadCommand(pParams);
+                                                        GNC::Entorno::Instance()->GetCommandController()->ProcessAsync(_Std("Downloading from PACS..."), pCommand, this);
+                                                        numberOfDownloads ++;
+                                                        if (numberOfDownloads > maxDownloadsPerIteration) {
+                                                                LOG_DEBUG(LOGGER, "max downloads per iteration limit raised " << numberOfDownloads);
+                                                                break;
+                                                        }
+                                                }
+                                        }
+                                }
+                                condition.WaitTimeout(sleepingPeriod * 1000);
+                        }
+                } catch (...) {
+                        LOG_WARN(LOGGER, "Error in AnonUsageTask")
+                }
+                LOG_DEBUG(LOGGER, "Task finished...");
+                sleepLocker.Unlock();
+                return 0;
+        }
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent* evt)
+        {
+                //delete studies from inProgres...
+                if (evt != NULL && evt->GetCodigoEvento() == ginkgoEVT_Core_ProgresoComando) {
+                        GNC::GCS::Events::EventoProgresoComando* pEvt = dynamic_cast<GNC::GCS::Events::EventoProgresoComando*>(evt);
+                        if (pEvt != NULL && pEvt->GetTipo() == GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado
+                            && pEvt->GetComando() != NULL && pEvt->GetComando()->GetOwner() == this) {
+                                GADAPI::PACSDownloadCommandParams* pParams = dynamic_cast<GADAPI::PACSDownloadCommandParams*>(pEvt->GetComando()->GetParams());
+                                if (pParams != NULL) {
+                                        GNC::GCS::ILocker locker(this);
+                                        std::string studyUID = pParams->m_base.getTag(GKDCM_StudyInstanceUID);
+                                        if (inProgressStudies.find(studyUID) != inProgressStudies.end()) {
+                                                inProgressStudies.erase(inProgressStudies.find(studyUID));
+                                                LOG_TRACE(LOGGER, "Study downloaded " << studyUID);
+                                                if (inProgressStudies.empty() && pParams->m_error.empty()) {
+                                                        LOG_TRACE(LOGGER, "waking up thread...");
+                                                        condition.Broadcast();
+                                                }
+                                        }
+                                }
+                        }
+                }
+        }
+
+        bool hasToStop;
+        wxMutex sleepLocker;
+        wxCondition condition;
+        int sleepingPeriod;
+        int maxDownloadsPerIteration;
+        std::set<std::string> inProgressStudies;
+};
+}
+}
+
+
+//singleton
+GNC::GCS::SmartRetrieveController* GNC::GCS::SmartRetrieveController::m_pInstance = NULL;
+
+GNC::GCS::SmartRetrieveController * GNC::GCS::SmartRetrieveController::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new SmartRetrieveController();
+        }
+        return m_pInstance;
+}
+void GNC::GCS::SmartRetrieveController::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+
+GNC::GCS::SmartRetrieveController::SmartRetrieveController():
+        tidService(-1),
+        pThread(NULL)
+
+{
+}
+
+GNC::GCS::SmartRetrieveController::~SmartRetrieveController()
+{
+        stopThread();
+}
+
+void GNC::GCS::SmartRetrieveController::resetStatus()
+{
+        //read settings...
+        if (isEnabled()) {
+                stopThread();
+                startThread();
+                LOG_TRACE(LOGGER, "SmartRetrieveController is enabled");
+        } else {
+                //stop thread
+                stopThread();
+                //delete all messages...
+                LOG_TRACE(LOGGER, "SmartRetrieveController has been disabled");
+        }
+}
+
+
+bool GNC::GCS::SmartRetrieveController::isEnabled()
+{
+        bool isEnabled;
+        GNC::GCS::ConfigurationController::Instance()->readBoolUser("/GinkgoCore/SmartRetrieve", "Enabled", isEnabled, false);
+        return isEnabled;
+}
+
+void GNC::GCS::SmartRetrieveController::enable(bool enable)
+{
+        GNC::GCS::ConfigurationController::Instance()->writeBoolUser("/GinkgoCore/SmartRetrieve", "Enabled", enable);
+}
+
+int GNC::GCS::SmartRetrieveController::getPeriod()
+{
+        int period;
+        GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/SmartRetrieve", "Period", period, 120);
+        return period;
+}
+
+void GNC::GCS::SmartRetrieveController::setPeriod(int period)
+{
+        GNC::GCS::ConfigurationController::Instance()->writeIntUser("/GinkgoCore/SmartRetrieve", "Period", period);
+}
+
+int GNC::GCS::SmartRetrieveController::getMaxDownloadPerIteration()
+{
+        int maxDownloads;
+        GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/SmartRetrieve", "MaxDownloadsPerIteration", maxDownloads, 7);
+        return maxDownloads;
+}
+
+void GNC::GCS::SmartRetrieveController::setMaxDownloadPerIteration(int maxDownloads)
+{
+        GNC::GCS::ConfigurationController::Instance()->writeIntUser("/GinkgoCore/MaxDownloadsPerIteration", "Period", maxDownloads);
+}
+
+void GNC::GCS::SmartRetrieveController::stopThread()
+{
+        GNC::GCS::ThreadController::Stop(tidService);
+        if (pThread != NULL) {
+                delete pThread;
+                pThread = NULL;
+        }
+}
+
+void GNC::GCS::SmartRetrieveController::startThread()
+{
+        if (pThread != NULL)  {
+                stopThread();
+        }
+        pThread = new SmartRetrieveService(getPeriod(), getMaxDownloadPerIteration());
+        tidService = GNC::GCS::ThreadController::Launch(pThread, false);
+}
diff --git a/cadxcore/main/controllers/smartretrievecontroller.h b/cadxcore/main/controllers/smartretrievecontroller.h
new file mode 100644
index 0000000..9083e3b
--- /dev/null
+++ b/cadxcore/main/controllers/smartretrievecontroller.h
@@ -0,0 +1,62 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <api/autoptr.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class SmartRetrieveService;
+
+class SmartRetrieveController
+{
+public:
+        static SmartRetrieveController *Instance();
+        static void FreeInstance();
+
+        //stop and reload settings...
+        void resetStatus();
+
+        bool isEnabled();
+        void enable(bool enable);
+        int getPeriod();
+        void setPeriod(int period);
+        int getMaxDownloadPerIteration();
+        void setMaxDownloadPerIteration(int maxDownloads);
+
+protected:
+        SmartRetrieveController();
+        ~SmartRetrieveController();
+
+        void stopThread();
+        void startThread();
+
+        int tidService;
+        SmartRetrieveService* pThread;
+        //singleton
+        static SmartRetrieveController* m_pInstance;
+};
+}
+}
+
+
diff --git a/cadxcore/main/controllers/storedqueriescontroller.cpp b/cadxcore/main/controllers/storedqueriescontroller.cpp
new file mode 100644
index 0000000..d4750a0
--- /dev/null
+++ b/cadxcore/main/controllers/storedqueriescontroller.cpp
@@ -0,0 +1,576 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "storedqueriescontroller.h"
+#include <limits>
+#include <iomanip>
+#include <iostream>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/dicommanager.h>
+#include <api/dicom/dicomdataset.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/internationalization/internationalization.h>
+#include <main/entorno.h>
+
+#include <wx/xml/xml.h>
+#include <wx/mstream.h>
+#include <wx/sstream.h>
+#include <wx/regex.h>
+#include <wx/sizer.h>
+#include <wx/display.h>
+
+#define SQ_DOCUMENT_ROOT wxT("stored-queries")
+
+#define SQ_ROOT wxT("stored-query")
+#define SQ_ATT_NAME wxT("name")
+#define SQ_ATT_PACSID wxT("pacs-id")
+#define SQ_ATT_ACTIVE wxT("active")
+
+#define COS_ROOT wxT("conditions")
+#define CO_ROOT wxT("condition")
+#define CO_ATT_TAG wxT("tag")
+#define CO_ATT_VALUE wxT("value")
+#define CO_ATT_EVAL wxT("eval")
+
+#define LOGGER "StoredQueriesController"
+/**
+Defines a specific layout, is recursive to allow splitted cells
+*/
+GNC::GCS::Condition::Condition(const std::string& tag, const std::string& value, bool eval)
+{
+        this->tag = tag;
+        this->value = value;
+        this->eval = eval;
+}
+
+
+GNC::GCS::Condition::Condition():eval(false)
+{
+}
+
+GNC::GCS::Condition::Condition(wxXmlNode* conditionRoot)
+{
+        wxString tmp;
+        if (conditionRoot->GetAttribute(CO_ATT_TAG, &tmp)) {
+                tag = tmp.ToUTF8();
+        }
+        if (conditionRoot->GetAttribute(CO_ATT_VALUE, &tmp)) {
+                value = tmp.ToUTF8();
+        }
+        eval = conditionRoot->GetAttribute(CO_ATT_EVAL, wxT("true")).CmpNoCase(wxT("true")) == 0;
+}
+
+GNC::GCS::Condition::Condition(const Condition& other)
+{
+        this->tag = other.tag;
+        this->value = other.value;
+        this->eval = other.eval;
+}
+
+GNC::GCS::Condition::~Condition()
+{
+}
+
+wxXmlNode* GNC::GCS::Condition::serialize()
+{
+        wxXmlNode* conditionNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, CO_ROOT);
+        conditionNode->AddAttribute(CO_ATT_TAG, wxString::FromUTF8(tag.c_str()));
+        conditionNode->AddAttribute(CO_ATT_VALUE, wxString::FromUTF8(value.c_str()));
+        conditionNode->AddAttribute(CO_ATT_EVAL, eval?wxT("true"):wxT("false"));
+        return conditionNode;
+}
+
+/**
+getters and setters
+*/
+std::string GNC::GCS::Condition::getTag()
+{
+        return tag;
+}
+
+void GNC::GCS::Condition::setTag(std::string tag)
+{
+        this->tag = tag;
+}
+
+std::string GNC::GCS::Condition::getValue()
+{
+        return value;
+}
+
+void GNC::GCS::Condition::setValue(std::string value)
+{
+        this->value = value;
+}
+
+bool GNC::GCS::Condition::hasToEval()
+{
+        return eval;
+}
+
+void GNC::GCS::Condition::setEval(bool eval)
+{
+        this->eval = eval;
+}
+
+//evaluate condition and insert in query
+void GNC::GCS::Condition::addConditionToQuery(GIL::DICOM::DicomDataset& query)
+{
+        if (eval) {
+                //we are going to process syntax relDate{y,m,w,d} --> y = years, m = months, w = weeks, d = days => integer (could be positive or negative)
+                wxString wxValue = wxString::FromUTF8(value.c_str());
+                wxRegEx regExDate(wxT("relDate\\{([-]?[0123456789]+),([-]?[0123456789]+),([-]?[0123456789]+),([-]?[0123456789]+)\\}"));
+                if (regExDate.Matches(wxValue)) {
+                        bool isOk = true;
+                        long y,m,w,d;
+                        isOk &= regExDate.GetMatch(wxValue, 1).ToLong(&y);
+                        isOk &= regExDate.GetMatch(wxValue, 2).ToLong(&m);
+                        isOk &= regExDate.GetMatch(wxValue, 3).ToLong(&w);
+                        isOk &= regExDate.GetMatch(wxValue, 4).ToLong(&d);
+                        if (isOk) {
+                                query.tags[tag] = wxDateTime::Now().Add(wxDateSpan(y, m, w, d)).Format(wxT("%Y%m%d-")).ToUTF8();
+                        } else {
+                                LOG_ERROR(LOGGER, "Unknown syntax to eval condition " << value);
+                        }
+                } else {
+                        LOG_ERROR(LOGGER, "Unknown syntax to eval condition " << value);
+                }
+        } else {
+                query.tags[tag] = value;
+        }
+}
+
+/////////////////////////////////////////////////////
+GNC::GCS::StoredQuery::StoredQuery():active(false)
+{
+}
+
+GNC::GCS::StoredQuery::StoredQuery(wxXmlNode* queryNode)
+{
+        this->name = queryNode->GetAttribute(SQ_ATT_NAME, wxEmptyString).ToUTF8();
+        this->pacsId = queryNode->GetAttribute(SQ_ATT_PACSID, wxEmptyString).ToUTF8();
+        this->active = queryNode->GetAttribute(SQ_ATT_ACTIVE, wxT("true")).CmpNoCase(wxT("true")) == 0;
+
+        for (wxXmlNode* child = queryNode->GetChildren(); child != NULL; child = child->GetNext()) {
+                if (child->GetName().CmpNoCase(COS_ROOT) == 0) {
+                        //storedConditions...
+                        for (wxXmlNode* conditionChild = child->GetChildren(); conditionChild != NULL; conditionChild = conditionChild->GetNext()) {
+                                if (conditionChild->GetName().CmpNoCase(CO_ROOT) == 0) {
+                                        GNC::GCS::Ptr<Condition> pCondition(new Condition(conditionChild));
+                                        this->addCondition(pCondition);
+                                }
+                        }
+                } else {
+                        LOG_ERROR(LOGGER, "error deserializing stored condition, unknown node " << child->GetName().ToUTF8());
+                }
+        }
+}
+
+GNC::GCS::StoredQuery::StoredQuery(const GNC::GCS::StoredQuery& other)
+{
+        this->name = other.name;
+        this->pacsId = other.pacsId;
+        this->active = other.active;
+
+        for (GNC::GCS::StoredQuery::TMapOfConditions::const_iterator it = other.conditions.begin(); it != other.conditions.end(); ++it) {
+                if ((*it).second.IsValid()) {
+                        GNC::GCS::Ptr<GNC::GCS::Condition> condition(new Condition(*(*it).second));
+                        this->conditions[(*it).first] = condition;
+                }
+        }
+}
+
+GNC::GCS::StoredQuery::~StoredQuery()
+{
+}
+
+wxXmlNode* GNC::GCS::StoredQuery::serialize()
+{
+        wxXmlNode* storedQueryNode = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, SQ_ROOT);
+        storedQueryNode->AddAttribute(SQ_ATT_NAME, wxString::FromUTF8(this->name.c_str()));
+        storedQueryNode->AddAttribute(SQ_ATT_PACSID, wxString::FromUTF8(this->pacsId.c_str()));
+        storedQueryNode->AddAttribute(SQ_ATT_ACTIVE, active?wxT("true"):wxT("false"));
+
+        wxXmlNode* conditionsNode = new wxXmlNode(storedQueryNode, wxXML_ELEMENT_NODE, COS_ROOT);
+        for (GNC::GCS::StoredQuery::TMapOfConditions::const_iterator it = conditions.begin(); it != conditions.end(); ++it) {
+                if ((*it).second.IsValid()) {
+                        conditionsNode->AddChild((*it).second->serialize());
+                }
+        }
+
+        return storedQueryNode;
+}
+
+/**
+inserts conditions into query
+*/
+void GNC::GCS::StoredQuery::buildQuery(GIL::DICOM::DicomDataset& query)
+{
+        for (GNC::GCS::StoredQuery::TMapOfConditions::const_iterator it = conditions.begin(); it != conditions.end(); ++it) {
+                (*it).second->addConditionToQuery(query);
+        }
+}
+
+/**
+Getters and setters
+*/
+const std::string& GNC::GCS::StoredQuery::getName()
+{
+        return this->name;
+}
+
+void GNC::GCS::StoredQuery::setName(const std::string& name)
+{
+        this->name = name;
+}
+
+const std::string& GNC::GCS::StoredQuery::getPacsId()
+{
+        return this->pacsId;
+}
+
+void GNC::GCS::StoredQuery::setPacsId(const std::string& pacsId)
+{
+        this->pacsId = pacsId;
+}
+
+bool GNC::GCS::StoredQuery::isActive()
+{
+        return this->active;
+}
+
+void GNC::GCS::StoredQuery::setActive(bool active)
+{
+        this->active = active;
+}
+
+void GNC::GCS::StoredQuery::addCondition(const GNC::GCS::Ptr<Condition>& condition)
+{
+        if (condition.IsValid()) {
+                this->conditions[condition->getTag()] = condition;
+        }
+}
+
+GNC::GCS::Ptr<GNC::GCS::Condition>  GNC::GCS::StoredQuery::getCondition(const std::string& tagValue)
+{
+        GNC::GCS::Ptr<GNC::GCS::Condition> condition;
+        if (conditions.find(tagValue) != conditions.end()) {
+                condition = conditions[tagValue];
+        }
+        return condition;
+}
+
+bool GNC::GCS::StoredQuery::hasCondition(const std::string& tagValue)
+{
+        if (conditions.find(tagValue) != conditions.end()) {
+                return true;
+        } else {
+                return false;
+        }
+}
+
+void GNC::GCS::StoredQuery::clearConditions()
+{
+        conditions.clear();
+}
+
+void GNC::GCS::StoredQuery::addCondition(const std::string& tag, const std::string& value)
+{
+        GNC::GCS::Ptr<GNC::GCS::Condition> condition(new Condition(tag, value, false));
+        this->conditions[tag] = condition;
+}
+
+void GNC::GCS::StoredQuery::addConditionIfNotExists(const std::string& tag, const std::string& value)
+{
+        if (conditions.find(tag) == conditions.end()) {
+                GNC::GCS::Ptr<GNC::GCS::Condition> condition(new Condition(tag, value, false));
+                this->conditions[tag] = condition;
+        }
+}
+
+void GNC::GCS::StoredQuery::addSpecialCondition(TSpecialConditions condition)
+{
+        //delete study date and time...
+        if (conditions.find(GKDCM_StudyDate) != conditions.end()) {
+                conditions.erase(conditions.find(GKDCM_StudyDate));
+        }
+        if (conditions.find(GKDCM_StudyTime) != conditions.end()) {
+                conditions.erase(conditions.find(GKDCM_StudyTime));
+        }
+
+        GNC::GCS::Ptr<GNC::GCS::Condition> dateCondition(new Condition(GKDCM_StudyDate, "", true));
+        GNC::GCS::Ptr<GNC::GCS::Condition> timeCondition(new Condition(GKDCM_StudyTime, "", false));
+        switch (condition) {
+        case TSC_TODAY_MORNING: {
+                dateCondition->setValue("relDate{0,0,0,0}");
+                timeCondition->setValue("000000-115959");
+        }
+        break;
+        case TSC_TODAY_AFTERNOON: {
+                dateCondition->setValue("relDate{0,0,0,0}");
+                timeCondition->setValue("120000-235959");
+        }
+        break;
+        case TSC_TODAY: {
+                dateCondition->setValue("relDate{0,0,0,0}");
+        }
+        break;
+        case TSC_YESTERDAY: {
+                dateCondition->setValue("relDate{0,0,0,-1}");
+        }
+        break;
+        case TSC_LAST_7_DAYS: {
+                dateCondition->setValue("relDate{0,0,0,-7}");
+        }
+        break;
+        case TSC_LAST_30_DAYS: {
+                dateCondition->setValue("relDate{0,0,0,-30}");
+        }
+        break;
+        case TSC_LAST_3_MONTHS: {
+                dateCondition->setValue("relDate{0,-3,0,0}");
+        }
+        break;
+        }
+        conditions[GKDCM_StudyDate] = dateCondition;
+        if (!timeCondition->getValue().empty()) {
+                conditions[GKDCM_StudyTime] = timeCondition;
+        }
+}
+
+bool GNC::GCS::StoredQuery::containsSpecialCondition(TSpecialConditions condition)
+{
+        GNC::GCS::Ptr<GNC::GCS::Condition> dateCondition;
+        GNC::GCS::Ptr<GNC::GCS::Condition> timeCondition;
+        if (conditions.find(GKDCM_StudyDate) != conditions.end()) {
+                dateCondition = conditions[GKDCM_StudyDate];
+        }
+        if (conditions.find(GKDCM_StudyTime) != conditions.end()) {
+                timeCondition = conditions[GKDCM_StudyTime];
+        }
+
+        bool contains = false;
+        switch (condition) {
+        case TSC_TODAY_MORNING: {
+                contains = dateCondition.IsValid() && timeCondition.IsValid() &&
+                           dateCondition->getValue() == "relDate{0,0,0,0}" &&
+                           timeCondition->getValue() == "000000-115959";
+        }
+        break;
+        case TSC_TODAY_AFTERNOON: {
+                contains = dateCondition.IsValid() && timeCondition.IsValid() &&
+                           dateCondition->getValue() == "relDate{0,0,0,0}" &&
+                           timeCondition->getValue() == "120000-235959";
+        }
+        break;
+        case TSC_TODAY: {
+                contains = dateCondition.IsValid() && !timeCondition.IsValid() &&
+                           dateCondition->getValue() == "relDate{0,0,0,0}";
+        }
+        break;
+        case TSC_YESTERDAY: {
+                contains = dateCondition.IsValid() && !timeCondition.IsValid() &&
+                           dateCondition->getValue() == "relDate{0,0,0,-1}";
+        }
+        break;
+        case TSC_LAST_7_DAYS: {
+                contains = dateCondition.IsValid() && !timeCondition.IsValid() &&
+                           dateCondition->getValue() == "relDate{0,0,0,-7}";
+        }
+        break;
+        case TSC_LAST_30_DAYS: {
+                contains = dateCondition.IsValid() && !timeCondition.IsValid() &&
+                           dateCondition->getValue() == "relDate{0,0,0,-30}";
+        }
+        break;
+        case TSC_LAST_3_MONTHS: {
+                contains = dateCondition.IsValid() && !timeCondition.IsValid() &&
+                           dateCondition->getValue() == "relDate{0,-3,0,0}";
+        }
+        break;
+        }
+        return contains;
+}
+
+bool GNC::GCS::StoredQuery::isEmpty()
+{
+        return conditions.empty();
+}
+
+/**
+Controller for hanging protocols
+*/
+GNC::GCS::StoredQueryController* GNC::GCS::StoredQueryController::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new StoredQueryController();
+        }
+        return m_pInstance;
+}
+
+void GNC::GCS::StoredQueryController::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+GNC::GCS::StoredQueryController::StoredQueryController()
+{
+        LoadFromConfiguration();
+}
+
+GNC::GCS::StoredQueryController::~StoredQueryController()
+{
+}
+
+GNC::GCS::StoredQueryController* GNC::GCS::StoredQueryController::m_pInstance = NULL;
+
+
+void GNC::GCS::StoredQueryController::StoreStoredQueriesConfiguration()
+{
+        //serialization...
+        wxXmlDocument doc;
+        wxXmlNode* root = new wxXmlNode(NULL, wxXML_ELEMENT_NODE,SQ_DOCUMENT_ROOT);
+        doc.SetRoot(root);
+        {
+                GNC::GCS::ILocker lockQueries(this);
+                for (TStoredQueriesMap::const_iterator it = this->mapOfQueries.begin(); it != this->mapOfQueries.end(); ++it) {
+                        root->AddChild((*it).second->serialize());
+                }
+        }
+        wxMemoryOutputStream out;
+        doc.SetFileEncoding(wxT("UTF-8"));
+        doc.Save(out,0);
+        char* vectorWidgets = new char[out.GetLength()];
+        out.CopyTo(vectorWidgets,out.GetLength());
+        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/StoredQueries","QueriesList", std::string(vectorWidgets, out.GetLength()));
+        delete[] vectorWidgets;
+}
+
+GNC::GCS::StoredQueryController::TStoredQueriesList GNC::GCS::StoredQueryController::getStoredQueries()
+{
+        TStoredQueriesList  returningList;
+        getActiveQueries(returningList, false);
+        return returningList;
+}
+
+GNC::GCS::StoredQueryController::TStoredQueriesList GNC::GCS::StoredQueryController::getActiveQueries()
+{
+        TStoredQueriesList  returningList;
+        getActiveQueries(returningList, true);
+        return returningList;
+}
+
+GNC::GCS::Ptr<GNC::GCS::StoredQuery> GNC::GCS::StoredQueryController::getQuery(const std::string& queryId)
+{
+        GNC::GCS::Ptr<GNC::GCS::StoredQuery>pReturn;
+        {
+                GNC::GCS::ILocker lockQueries(this);
+                if (mapOfQueries.find(queryId) != mapOfQueries.end()) {
+                        pReturn = new StoredQuery(*mapOfQueries[queryId]);
+                }
+        }
+        return pReturn;
+}
+
+void GNC::GCS::StoredQueryController::removeQuery(const std::string& queryId)
+{
+        {
+                GNC::GCS::ILocker lockQueries(this);
+                if (mapOfQueries.find(queryId) != mapOfQueries.end()) {
+                        mapOfQueries.erase(mapOfQueries.find(queryId));
+                }
+        }
+        StoreStoredQueriesConfiguration();
+}
+
+void GNC::GCS::StoredQueryController::storeQuery(const GNC::GCS::Ptr<StoredQuery>& pQuery)
+{
+        {
+                GNC::GCS::ILocker lockQueries(this);
+                if (pQuery.IsValid()) {
+                        mapOfQueries[pQuery->getName()] = pQuery;
+                }
+        }
+        StoreStoredQueriesConfiguration();
+}
+
+void GNC::GCS::StoredQueryController::storeQueries(const TStoredQueriesList& queries)
+{
+        {
+                GNC::GCS::ILocker lockQueries(this);
+                for (TStoredQueriesList::const_iterator it = queries.begin(); it != queries.end(); ++it) {
+                        mapOfQueries[(*it)->getName()] = (*it);
+                }
+        }
+        StoreStoredQueriesConfiguration();
+}
+
+void GNC::GCS::StoredQueryController::clearQueries()
+{
+        GNC::GCS::ILocker lockQueries(this);
+        mapOfQueries.clear();
+}
+
+void GNC::GCS::StoredQueryController::getActiveQueries(TStoredQueriesList& list, bool onlyActive)
+{
+        GNC::GCS::ILocker lockQueries(this);
+        for (TStoredQueriesMap::const_iterator it = this->mapOfQueries.begin(); it != this->mapOfQueries.end(); ++it) {
+                if (!onlyActive || (*it).second->isActive()) {
+                        GNC::GCS::Ptr<StoredQuery> pProtocol(new StoredQuery(*(*it).second));
+                        list.push_back(pProtocol);
+                }
+        }
+}
+
+void GNC::GCS::StoredQueryController::LoadFromConfiguration()
+{
+        GNC::GCS::ILocker lockQueries(this);
+        //Deserialize...
+        this->mapOfQueries.clear();
+        std::string serializedValue;
+        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/StoredQueries","QueriesList", serializedValue);
+        if (!serializedValue.empty()) {
+                wxString wxSerializedValue = wxString::FromUTF8(serializedValue.c_str());
+                wxStringInputStream istream(wxSerializedValue);
+                wxXmlDocument doc;
+                if (doc.Load(istream)) {
+                        wxXmlNode* root = doc.GetRoot();
+                        if (root != NULL && root->GetName().CmpNoCase(SQ_DOCUMENT_ROOT) == 0) {
+                                for (wxXmlNode* sqNode = root->GetChildren(); sqNode != NULL; sqNode = sqNode->GetNext()) {
+                                        if (sqNode->GetName().CmpNoCase(SQ_ROOT) == 0) {
+                                                GNC::GCS::Ptr<StoredQuery> storedQuery(new StoredQuery(sqNode));
+                                                this->mapOfQueries[storedQuery->getName()] = storedQuery;
+                                        }
+                                }
+                        }
+                } else {
+                        LOG_ERROR(LOGGER, "Error deserializing storedQuery");
+                }
+        }
+}
+
+
+
+
diff --git a/cadxcore/main/controllers/storedqueriescontroller.h b/cadxcore/main/controllers/storedqueriescontroller.h
new file mode 100644
index 0000000..9ab10c2
--- /dev/null
+++ b/cadxcore/main/controllers/storedqueriescontroller.h
@@ -0,0 +1,233 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+#include <map>
+#include <list>
+#include <api/autoptr.h>
+#include <api/dicom/idicom.h>
+
+class wxXmlNode;
+namespace GNC
+{
+namespace GCS
+{
+class StoredQuery;
+/**
+Defines a specific layout, is recursive to allow splitted cells
+*/
+class Condition
+{
+public:
+        Condition();
+        Condition(const std::string& tag, const std::string& value, bool eval);
+        /**
+        deserialize from xml
+        */
+        Condition(wxXmlNode* layoutRoot);
+        Condition(const Condition& other);
+        ~Condition();
+
+        wxXmlNode* serialize();
+
+public:
+        /**
+        getters and setters
+        */
+        std::string getTag();
+        void setTag(std::string tag);
+        std::string getValue();
+        void setValue(std::string value);
+        bool hasToEval();
+        void setEval(bool eval);
+
+        //evaluate condition and insert in query
+        void addConditionToQuery(GIL::DICOM::DicomDataset& query);
+
+protected:
+        //tag of condition
+        std::string tag;
+        //value of condition
+        std::string value;
+        //has to eval condition, i.e. "TODAY"
+        bool eval;
+};
+
+/**
+HangingProtocol class, defines a hanging protocol
+*/
+class StoredQuery
+{
+public:
+        typedef enum {
+                TSC_TODAY_MORNING,
+                TSC_TODAY_AFTERNOON,
+                TSC_TODAY,
+                TSC_YESTERDAY,
+                TSC_LAST_7_DAYS,
+                TSC_LAST_30_DAYS,
+                TSC_LAST_3_MONTHS
+        } TSpecialConditions;
+
+        typedef std::map<std::string, GNC::GCS::Ptr<Condition> > TMapOfConditions;
+        StoredQuery();
+        /**
+        deserialize from xml
+        */
+        StoredQuery(wxXmlNode* node);
+        StoredQuery(const StoredQuery& other);
+        ~StoredQuery();
+        /**
+        serialize to XML
+        */
+        wxXmlNode* serialize();
+        /**
+        inserts conditions into query
+        */
+        void buildQuery(GIL::DICOM::DicomDataset& query);
+
+        /**
+        Getters and setters
+        */
+        const std::string& getName();
+        void setName(const std::string& name);
+        const std::string& getPacsId();
+        void setPacsId(const std::string& pacsId);
+        bool isActive();
+        void setActive(bool active);
+
+        void addCondition(const GNC::GCS::Ptr<Condition>& condition);
+        GNC::GCS::Ptr<Condition> getCondition(const std::string& tagValue);
+        bool hasCondition(const std::string& tagValue);
+        void clearConditions();
+
+        void addCondition(const std::string& tag, const std::string& value = "");
+        void addConditionIfNotExists(const std::string& tag, const std::string& value = "");
+        void addSpecialCondition(TSpecialConditions condition);
+        bool containsSpecialCondition(TSpecialConditions condition);
+
+        //if there isn't any condition
+        bool isEmpty();
+
+protected:
+
+        /**
+        Query name
+        */
+        std::string name;
+        /**
+        PACS id
+        */
+        std::string pacsId;
+        /**
+        conditions of the stored query
+        */
+        TMapOfConditions conditions;
+        /*
+        if it's active
+        */
+        bool active;
+};
+
+/**
+Hanging protocol controller class
+*/
+class StoredQueryController: GNC::GCS::ILockable
+{
+public:
+        typedef std::list<GNC::GCS::Ptr<StoredQuery> > TStoredQueriesList;
+        /**
+        Singleton method
+        */
+        static StoredQueryController* Instance();
+
+        /**
+        Free singleton
+        */
+        static void FreeInstance();
+
+        /**
+        stores hanging protocol list
+        */
+        void StoreStoredQueriesConfiguration();
+        /**
+        gets a copy of storedQueries
+        */
+        TStoredQueriesList getStoredQueries();
+
+        /**
+        get a copy of active queries
+        */
+        TStoredQueriesList getActiveQueries();
+
+        /**
+        get a copy of the query by id
+        */
+        GNC::GCS::Ptr<StoredQuery> getQuery(const std::string& queryId);
+
+        /**
+        removes a query from configuration
+        */
+        void removeQuery(const std::string& queryId);
+
+        /**
+        store query (overwrite existing)..
+        */
+        void storeQuery(const GNC::GCS::Ptr<StoredQuery>& pQuery);
+
+        /**
+        store query (overwrite existing)..
+        */
+        void storeQueries(const TStoredQueriesList& queries);
+        /**
+        clear stored queries
+        */
+        void clearQueries();
+protected:
+        void getActiveQueries(TStoredQueriesList& list, bool onlyActive);
+
+        /**
+        Creation method
+        */
+        StoredQueryController();
+
+        /**
+        Destruction method
+        */
+        ~StoredQueryController();
+
+        /**
+        Load from configuration
+        */
+        void LoadFromConfiguration();
+
+        /**
+        singleton attribute
+        */
+        static StoredQueryController* m_pInstance;
+
+        /**
+        protocol list
+        */
+        typedef std::map<std::string, GNC::GCS::Ptr<StoredQuery> > TStoredQueriesMap;
+        TStoredQueriesMap mapOfQueries;
+};
+}
+}
diff --git a/cadxcore/main/controllers/streaming/streamingloader.cpp b/cadxcore/main/controllers/streaming/streamingloader.cpp
new file mode 100644
index 0000000..523d78c
--- /dev/null
+++ b/cadxcore/main/controllers/streaming/streamingloader.cpp
@@ -0,0 +1,1109 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/thread.h>
+
+#include <api/globals.h>
+
+#include <api/icommand.h>
+#include <api/dicom/idicommanager.h>
+#include <main/controllers/commandcontroller.h>
+#include <api/imodelointegracion.h>
+#include <api/internationalization/internationalization.h>
+#include <api/utils/iginkgomatrix4x4.h>
+
+#include <commands/comandocarga.h>
+
+#include <main/entorno.h>
+
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/pacscontroller.h>
+
+#include "streamingloader.h"
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtkImageData.h>
+
+#include <itkImage.h>
+
+#include <itkCommand.h>
+#include <itkMetaDataObject.h>
+
+#include <itkImageFileReader.h>
+#include <itkGDCMSeriesFileNames.h>
+#include <itk/itkImageToVTKImageFilter.h>
+#include <itkMetaDataDictionary.h>
+#include <itkMetaDataObject.h>
+#include <vtkAlgorithmOutput.h>
+#include <vtkImageChangeInformation.h>
+
+//#define DEBUG_PRINT_DIR_COSINES
+#define USE_STREAMING true
+
+
+GNC::StreamingLoader::StreamingLoader(): DirectionCosines(GNC::GCS::IGinkgoMatrix4x4::New())
+{
+
+        //gdcm::ImageHelper::SetForceRescaleInterceptSlope(true);
+        //gdcm::ImageHelper::SetForcePixelSpacing(true);
+
+        m_SignalFile = false;
+        m_IO = ImageIO::New();
+        m_IO->SetLoadPrivateTags(false);
+        //Esto da leaks no activar
+        //m_IO->SetLoadSequences(false);
+        //
+        m_IO->SetUseStreamedReading(USE_STREAMING);
+        m_IO->SetMaxSizeLoadEntry(1024); // No permitir cargar campos de mas de 1K
+        m_pOutput = vtkSmartPointer<vtkImageChangeInformation>::New();
+
+        m_CurrentNumberOfComponents = 0;
+        m_CurrentComponentType      = ImageIO::UNKNOWNCOMPONENTTYPE;
+        m_CurrentPixelType          = ImageIO::UNKNOWNPIXELTYPE;
+        m_CurrentDimensions[0] = 0;
+        m_CurrentDimensions[1] = 0;
+        m_CurrentDimensions[2] = 0;
+        DirectionCosines->Identity();
+        for (int i = 0; i < 3; i++) {
+                m_Spacing[i] = 0.0;
+                m_Origin[i] = 0.0;
+        }
+
+}
+
+GNC::StreamingLoader::~StreamingLoader()
+{
+}
+
+void GNC::StreamingLoader::SetInput(const std::string& fichero)
+{
+
+        GNC::GCS::ILocker(this);
+
+        m_SignalFile = false;
+
+        if (m_CurrentFile == fichero) {
+                return;
+        }
+
+        try {
+                m_CurrentFile = fichero;
+                m_IO->SetFileName(fichero);
+                m_IO->SetUseStreamedReading(true);
+
+
+                //correct a bug because this dictionary doesn't clear between consecutive loads
+                itk::MetaDataDictionary newDict;
+                m_IO->SetMetaDataDictionary(newDict);
+                //
+                m_IO->ReadImageInformation();
+
+
+                //std::string tagkey;
+                //std::string GantryTilt;
+
+                //itk::MetaDataDictionary & dict = m_IO->GetMetaDataDictionary();
+                //tagkey = "0018|1120";
+                //if( itk::ExposeMetaData<std::string>(dict, tagkey, GantryTilt ) )
+                //{
+                //	//std::cout << "Gantry Tilt = " << m_GantryTilt << std::endl;
+                //}
+                //// Check if the gantry tilt is within an acceptable range
+                //double gantryTiltThreshold = 0.01;
+
+                //std::stringstream sstr;
+                //sstr.str( GantryTilt );
+                //sstr >> m_GantryTilt;
+
+                //if( fabs(m_GantryTilt) > gantryTiltThreshold )
+                //{
+                //	//std::cout << "Unacceptable gantry tilt" << std::endl;
+                //}
+
+                {
+#if defined(DEBUG_PRINT_DIR_COSINES)
+                        std::cout << "Dir. Cosines: " << std::endl;
+#endif
+                        for (int di = 0; di < 3; di++) {
+
+                                const std::vector<double> dir = m_IO->GetDirection(di);
+                                int l = 0;
+                                for (std::vector<double>::const_iterator it = dir.begin(); it != dir.end() && l < 3; ++it, l++) {
+#if defined(DEBUG_PRINT_DIR_COSINES)
+                                        if (!l == 0) {
+                                                std::cout << "," << *it;
+                                        } else {
+                                                std::cout << *it;
+                                        }
+#endif
+                                        DirectionCosines->SetElement(l, di, (*it));
+                                }
+#if defined(DEBUG_PRINT_DIR_COSINES)
+                                std::cout << std::endl;
+#endif
+
+                        }
+//			char age[20];
+                        for (int i=0; i < 3; i++) {
+                                m_Spacing[i] = m_IO->GetSpacing(i);
+                                m_Origin[i]  = m_IO->GetOrigin(i);
+                        }
+                        //check if image data is coherent...
+                        itk::MetaDataDictionary& dict = m_IO->GetMetaDataDictionary();
+                        if (dict.HasKey("0028|0107") && dict.HasKey( "0028|0103") && dict.HasKey("0028|0102")) {
+                                //get highBit
+#ifdef __GNUC__
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wunused-but-set-variable"
+#pragma GCC diagnostic ignored "-Wunused-variable"
+#endif
+                                // GW: not clear what this is supposed to check
+                                if(itk::MetaDataObject<std::string>* highBit = dynamic_cast<itk::MetaDataObject <std::string> *>(dict["0028|0102"].GetPointer())) {
+                                        if(itk::MetaDataObject<std::string>* bitsStored = dynamic_cast<itk::MetaDataObject <std::string> *>(dict["0028|0101"].GetPointer())) {
+                                                //get largest value
+                                                if(itk::MetaDataObject<std::string>* largestValue = dynamic_cast<itk::MetaDataObject <std::string> *>(dict["0028|0107"].GetPointer())) {
+                                                        //get pixel representation
+                                                        if(itk::MetaDataObject<std::string>* pixelRepresentation = dynamic_cast<itk::MetaDataObject <std::string> *>(dict["0028|0103"].GetPointer())) {
+                                                                // GW: not clear what this is supposed to check
+                                                                long long minimum = 0;
+                                                                double rescaleIntercept = 0.0;
+                                                                double rescaleSlope = 1.0;
+                                                                long long paddingValue = 0;
+
+                                                                if(itk::MetaDataObject<std::string>* minimiumValue = dynamic_cast<itk::MetaDataObject<std::string>*>(dict["0028|0106"].GetPointer()))  {
+                                                                        minimum = (long long) atol(minimiumValue->GetMetaDataObjectValue().c_str());
+                                                                }
+                                                                if(itk::MetaDataObject<std::string>* rescaleInterceptValue = dynamic_cast<itk::MetaDataObject <std::string>*>(dict["0028|1052"].GetPointer()))  {
+                                                                        rescaleIntercept = (double) atof( rescaleInterceptValue->GetMetaDataObjectValue().c_str() );
+                                                                }
+                                                                if(itk::MetaDataObject <std::string> * rescaleSlopeValue = dynamic_cast<itk::MetaDataObject <std::string>*>(dict["0028|1053"].GetPointer()))  {
+                                                                        rescaleSlope = (double) atof(rescaleSlopeValue->GetMetaDataObjectValue().c_str());
+                                                                }
+                                                                if(itk::MetaDataObject <std::string> * pixelPaddingValue = dynamic_cast<itk::MetaDataObject <std::string>*>(dict["0028|0120"].GetPointer()))  {
+                                                                        paddingValue = (double) atol(pixelPaddingValue->GetMetaDataObjectValue().c_str());
+                                                                }
+                                                                if(itk::MetaDataObject <std::string> * pixelPaddingRangeLimitValue = dynamic_cast<itk::MetaDataObject <std::string>*>(dict["0028|0121"].GetPointer()))  {
+                                                                        std::string val = pixelPaddingRangeLimitValue->GetMetaDataObjectValue();
+                                                                        LOG_TRACE("ControladorCarga/CargaMultidimensional", "Pixel Padding Range Limit: " << val);
+                                                                }
+
+                                                                if (pixelRepresentation->GetMetaDataObjectValue() == "1") {//if its signed and largest value > (2^highbit)-1
+                                                                        long long exp = (long long) atol(bitsStored->GetMetaDataObjectValue().c_str());
+                                                                        if (exp < 1) {
+                                                                                throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: Number of stored bits not positive") , "ControladorCarga/CargaMultidimensional");
+                                                                        }
+                                                                        long long limit = (1L << (exp-1));
+                                                                        long long val = (long long) atol(largestValue->GetMetaDataObjectValue().c_str());
+                                                                        long long maxVal = val;//(long long) (  (val * rescaleSlope) + rescaleIntercept );
+                                                                        if (maxVal > limit ) {
+                                                                                throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: Largest image pixel value data is not coherent with combination of Pixel Representation and High bit") , "ControladorCarga/CargaMultidimensional");
+                                                                        }
+                                                                } else {
+                                                                        long long exp = (long long) atol(bitsStored->GetMetaDataObjectValue().c_str());
+                                                                        long long limit = (1L << (exp));
+                                                                        long long val = (long long) atol(largestValue->GetMetaDataObjectValue().c_str());
+                                                                        long long maxVal = val; //(long long) (  (val * rescaleSlope) + rescaleIntercept );
+                                                                        if (maxVal > limit  ) {
+                                                                                throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: Largest image pixel value data is not coherent with combination of Pixel Representation and High bit") , "ControladorCarga/CargaMultidimensional");
+                                                                        }
+                                                                }
+                                                        }
+                                                }
+                                        }
+                                }
+#ifdef __GNUC__
+#pragma GCC diagnostic pop
+#endif
+                        }//check if image data is coherent
+                }
+
+                if (m_CurrentNumberOfComponents != m_IO->GetNumberOfComponents() || m_CurrentComponentType != m_IO->GetComponentType() || m_CurrentPixelType != m_IO->GetPixelType() || m_CurrentDimensions[0] != m_IO->GetDimensions(0) || m_CurrentDimensions[1] != m_IO->GetDimensions(1) || m_CurrentDimensions[2] != m_IO->GetDimensions(2) ) {
+                        RecomponerPipeline();
+                } else {
+                        switch(m_IO->GetNumberOfComponents()) {
+                        case 1: {
+                                switch(m_IO->GetComponentType()) {
+                                case ImageIO::UCHAR: {
+                                        typedef unsigned char TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::CHAR: {
+                                        typedef char TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::USHORT: {
+                                        typedef unsigned short TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::SHORT: {
+                                        typedef unsigned short TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::UINT: {
+                                        typedef unsigned int TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::INT: {
+                                        typedef int TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::ULONG: {
+                                        typedef unsigned long TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::LONG: {
+                                        typedef long TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::FLOAT: {
+                                        typedef float TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+                                }
+                                break;
+                                case ImageIO::DOUBLE: {
+                                        typedef double TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::UNKNOWNCOMPONENTTYPE:
+                                default:
+                                        m_SignalFile = true;
+                                        LOG_ERROR("StreamingLoader", "Tipo de componente (pixeltype) no soportado en imagenes de 1 componente")
+                                        break;
+                                }
+                        }
+                        break;
+                        case 3: {
+                                switch(m_IO->GetComponentType()) {
+                                case ImageIO::UCHAR: {
+                                        typedef unsigned char TypedComponentType;
+                                        typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::CHAR: {
+                                        typedef char TypedComponentType;
+                                        typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::USHORT: {
+                                        typedef unsigned short TypedComponentType;
+                                        typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::SHORT: {
+                                        typedef short TypedComponentType;
+                                        typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::UINT: {
+                                        typedef unsigned int TypedComponentType;
+                                        typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::INT: {
+                                        typedef int TypedComponentType;
+                                        typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::LONG: {
+                                        typedef long TypedComponentType;
+                                        typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::ULONG: {
+                                        typedef unsigned long TypedComponentType;
+                                        typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::FLOAT: {
+                                        typedef float TypedComponentType;
+                                        typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::DOUBLE: {
+                                        typedef double TypedComponentType;
+                                        typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                        typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                        typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                        TypedReaderType* pTypedReader = static_cast<TypedReaderType*>(m_pReader.GetPointer());
+                                        pTypedReader->SetFileName(fichero);
+
+                                }
+                                break;
+                                case ImageIO::UNKNOWNCOMPONENTTYPE:
+                                default:
+                                        m_SignalFile = true;
+                                        LOG_ERROR("StreamingLoader", "Tipo de componente (pixeltype) no soportado en imagenes de 3 componentes")
+                                        break;
+                                }
+                        }
+                        break;
+                        default:
+                                m_SignalFile = true;
+                                LOG_ERROR("StreamingLoader", "Numero de componentes no soportado")
+                                break;
+                        }
+
+                        m_pReader->Modified();
+                        m_pPipelineJoiner->Modified();
+                        m_pOutput->Modified();
+                }
+        } catch (GNC::GCS::ControladorCargaException&) {
+                m_SignalFile = true;
+                if (m_pReader) {
+                        m_pReader->ResetPipeline();
+                }
+                throw;
+        } catch (itk::ExceptionObject& ex) {
+                if (m_pReader) {
+                        m_pReader->ResetPipeline();
+                }
+
+                m_SignalFile = true;
+
+                // Try to read as signal
+                GIL::DICOM::IDICOMManager* m = GIL::DICOM::PACSController::Instance()->CrearInstanciaDeDICOMManager();
+                m->CargarFichero(m_CurrentFile);
+                std::string modality;
+                m->GetTag(0x0008, 0x0060, modality);
+                //TODO: Mantener esta lectura del dataset.
+                GIL::DICOM::PACSController::Instance()->LiberarInstanciaDeDICOMManager(m);
+
+                if (modality == "ECG" || modality == "EC" || modality == "HD") {
+                        DirectionCosines->Identity();
+                        RecomponerPipeline();
+                        return;
+                } else {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: ") + ex.GetDescription(), "ControladorCarga/CargaMultidimensional");
+                }
+        } catch (...) {
+                if (m_pReader) {
+                        m_pReader->ResetPipeline();
+                }
+                throw GNC::GCS::ControladorCargaException( _Std("Internal error reading the study, unknown format "), "ControladorCarga/CargaMultidimensional");
+        }
+}
+
+
+
+vtkSmartPointer<vtkAlgorithmOutput> GNC::StreamingLoader::GetOutputPort()
+{
+        vtkSmartPointer<vtkAlgorithmOutput> out (m_pOutput->GetOutputPort());
+        return out;
+}
+
+void GNC::StreamingLoader::GetOutputCopy(vtkSmartPointer<vtkImageData>& output)
+{
+        GNC::GCS::ILocker((GNC::GCS::IStreamingLoader*)this);
+        output = vtkSmartPointer<vtkImageData>::New();
+        m_pOutput->Update();
+        output->DeepCopy(m_pOutput->GetOutput());
+
+}
+
+//------------------------------------------------------------------------------------------------
+//region IPipelineProperties realization
+
+void GNC::StreamingLoader::Update()
+{
+        m_pOutput->Update();
+}
+
+void GNC::StreamingLoader::UpdateInformation()
+{
+        m_pOutput->UpdateInformation();
+}
+
+const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GNC::StreamingLoader::GetDirection()
+{
+        return DirectionCosines;
+}
+
+void GNC::StreamingLoader::GetOrigin(double origin[3])
+{
+        for (int i = 0; i < 3; i++) {
+                origin[i] = m_Origin[i];
+        }
+}
+
+void GNC::StreamingLoader::GetSpacing(double spacing[3])
+{
+        for (int i = 0; i < 3; i++) {
+                spacing[i] = m_Spacing[i];
+        }
+}
+
+void GNC::StreamingLoader::GetDimensions(int dimensions[3])
+{
+        for (int i = 0; i < 3; i++) {
+                dimensions[i] = m_CurrentDimensions[i];
+        }
+}
+
+const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GNC::StreamingLoader::GetOutputDirection()
+{
+        return GetDirection();
+}
+
+void GNC::StreamingLoader::GetOutputOrigin(double origin[3])
+{
+        m_pOutput->GetOutputOrigin(origin);
+}
+
+void GNC::StreamingLoader::GetOutputSpacing(double spacing[3])
+{
+        m_pOutput->GetOutputSpacing(spacing);
+}
+
+void GNC::StreamingLoader::GetOutputDimensions(int dims[3])
+{
+        for (int i = 0; i<3; ++i) {
+                dims[i] = m_CurrentDimensions[i];
+        }
+}
+
+//endregion
+
+void GNC::StreamingLoader::SetOutputSpacing(double spacing[3])
+{
+        if (spacing[0] <= 0 || spacing[1] <= 0) {
+                spacing[0] = spacing[1] = 1.0;
+        }
+        m_pOutput->SetOutputSpacing(spacing);
+}
+
+void GNC::StreamingLoader::SetOutputOrigin(double origin[3])
+{
+        m_pOutput->SetOutputOrigin(origin);
+}
+
+bool GNC::StreamingLoader::GetDefaultWindowLevel(double &window, double &level)
+{
+        std::string windowTag, levelTag;
+        bool ok = m_IO->GetValueFromTag("0028|1050", levelTag) && m_IO->GetValueFromTag("0028|1051", windowTag);
+        if (ok) {
+                {
+                        std::istringstream istr(levelTag);
+                        istr >> level;
+                }
+                {
+                        std::istringstream istr(windowTag);
+                        istr >> window;
+                }
+        }
+        return ok;
+}
+
+std::string GNC::StreamingLoader::GetPatientPosition()
+{
+        std::string patientPositionTag;
+        bool ok = m_IO->GetValueFromTag("0018|5100", patientPositionTag);
+        if (ok) {
+                return patientPositionTag;
+        }
+        return "";
+}
+
+void GNC::StreamingLoader::RecomponerPipeline()
+{
+        if (m_SignalFile) {
+                m_CurrentNumberOfComponents = 0;
+                m_CurrentComponentType      = ImageIO::UNKNOWNCOMPONENTTYPE;
+                m_CurrentPixelType          = ImageIO::SCALAR;
+                m_CurrentDimensions[0]      = 800;
+                m_CurrentDimensions[1]      = 800;
+                m_CurrentDimensions[2]      = 1;
+                m_pReader = NULL;
+                m_pPipelineJoiner = NULL;
+                m_pOutput->RemoveAllInputs();
+
+                typedef unsigned short TypedPixelType;
+                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                TypedImageType::Pointer img = TypedImageType::New();
+                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                m_pPipelineJoiner = joiner;
+                joiner->SetInput(img);
+
+                TypedImageType::SizeType size;
+                TypedImageType::IndexType index;
+                size[0] = 800;
+                size[1] = 800;
+                size[2] = 1;
+                index[0] = index[1] = index[2] = 0;
+                TypedImageType::RegionType region;
+                region.SetSize(size);
+                region.SetIndex(index);
+                img->SetRegions(region);
+                img->Allocate();
+                img->FillBuffer(0);
+
+                m_Origin[0] = m_Origin[1] = m_Origin[2] = 0.0;
+                m_Spacing[0] = m_Spacing[1] = m_Spacing[2] = 1.0;
+
+                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                m_pOutput->SetOutputOrigin(m_Origin);
+                m_pOutput->SetOutputSpacing(m_Spacing);
+        } else {
+                m_CurrentNumberOfComponents = m_IO->GetNumberOfComponents();
+                m_CurrentComponentType      = m_IO->GetComponentType();
+                m_CurrentPixelType          = m_IO->GetPixelType();
+                m_CurrentDimensions[0]      = m_IO->GetDimensions(0);
+                m_CurrentDimensions[1]      = m_IO->GetDimensions(1);
+                m_CurrentDimensions[2]      = m_IO->GetDimensions(2);
+                m_pReader         = NULL;
+                m_pPipelineJoiner = NULL;
+
+                //m_pOutput->AbortExecuteOn();
+                m_pOutput->RemoveAllInputs();
+
+                ImageIO::Pointer pIO = ImageIO::New();
+                pIO->SetLoadPrivateTags(false);
+                //Esto da leaks no activar
+                //pIO->SetLoadSequences(false);
+                pIO->SetUseStreamedReading(USE_STREAMING);
+                pIO->SetMaxSizeLoadEntry(1024); // No permitir cargar campos de mas de 1K
+                switch(m_IO->GetNumberOfComponents()) {
+                case 1: {
+                        switch(m_IO->GetComponentType()) {
+                        case ImageIO::UCHAR: {
+                                typedef unsigned char TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::CHAR: {
+                                typedef char TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::USHORT: {
+                                typedef unsigned short TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::SHORT: {
+                                typedef short TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+
+                        }
+                        break;
+                        case ImageIO::UINT: {
+                                typedef unsigned int TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::INT: {
+                                typedef int TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::ULONG: {
+                                typedef unsigned long TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::LONG: {
+                                typedef long TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::FLOAT: {
+                                typedef float TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::DOUBLE: {
+                                typedef double TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::UNKNOWNCOMPONENTTYPE:
+                        default:
+                                throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: unsupported pixel format"), "ControladorCarga/CargaMultidimensiona(1 componente)");
+                        }
+                }
+                break;
+                case 3: {
+                        switch(m_IO->GetComponentType()) {
+                        case ImageIO::UCHAR: {
+                                typedef unsigned char TypedComponentType;
+                                typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::CHAR: {
+                                //std::cout << "RGB c" << std::endl;
+                                typedef unsigned char TypedComponentType;
+                                typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::USHORT: {
+                                //std::cout << "RGB c" << std::endl;
+                                typedef unsigned short TypedComponentType;
+                                typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::SHORT: {
+                                //std::cout << "RGB c" << std::endl;
+                                typedef short TypedComponentType;
+                                typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::UINT: {
+                                //std::cout << "RGB c" << std::endl;
+                                typedef unsigned int TypedComponentType;
+                                typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::INT: {
+                                //std::cout << "RGB c" << std::endl;
+                                typedef int TypedComponentType;
+                                typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::FLOAT: {
+                                //std::cout << "RGB c" << std::endl;
+                                typedef float TypedComponentType;
+                                typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::DOUBLE: {
+                                //std::cout << "RGB c" << std::endl;
+                                typedef double TypedComponentType;
+                                typedef itk::RGBPixel<TypedComponentType> TypedPixelType;
+                                typedef itk::Image<TypedPixelType, 3 > TypedImageType;
+                                typedef itk::ImageFileReader<TypedImageType> TypedReaderType;
+                                typedef itk::ImageToVTKImageFilter<TypedImageType> TypedJoinerType;
+
+                                TypedReaderType::Pointer reader = TypedReaderType::New();
+                                TypedJoinerType::Pointer joiner = TypedJoinerType::New();
+
+                                m_pReader = reader;
+                                m_pPipelineJoiner = joiner;
+
+                                joiner->SetInput(reader->GetOutput());
+
+                                reader->SetImageIO(pIO);
+                                reader->SetFileName(m_CurrentFile);
+                                reader->SetUseStreaming(USE_STREAMING);
+                                m_pOutput->SetInputConnection(joiner->GetImporter()->GetOutputPort());
+                                //reader->GetOutput()->ReleaseDataFlagOn();
+                        }
+                        break;
+                        case ImageIO::UNKNOWNCOMPONENTTYPE:
+                        default:
+                                throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: unsupported pixel format"), "ControladorCarga/CargaMultidimensional(3 componentes)");
+
+                        }
+                }
+                break;
+                default: {
+                        throw GNC::GCS::ControladorCargaException( _Std("Error reading the study: unsupported pixel format"), "ControladorCarga/CargaMultidimensional");
+                }
+                }
+        }
+        if (m_pReader.IsNotNull() && m_pPipelineJoiner.IsNotNull()) {
+                m_pReader->Modified();
+
+                m_pPipelineJoiner->Modified();
+        }
+        m_pOutput->Modified();
+}
diff --git a/cadxcore/main/controllers/streaming/streamingloader.h b/cadxcore/main/controllers/streaming/streamingloader.h
new file mode 100644
index 0000000..cf18bf2
--- /dev/null
+++ b/cadxcore/main/controllers/streaming/streamingloader.h
@@ -0,0 +1,136 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#if defined _WINDOWS
+#pragma warning(disable : 4702)
+#endif
+
+#include <api/api.h>
+#include <api/controllers/icontroladorcarga.h>
+#include <api/ilock.h>
+#include <itkProcessObject.h>
+#include <itkGDCMImageIO.h>
+#include <vtkSmartPointer.h>
+
+//region "Forward Declarations"
+
+class vtkImageData;
+class vtkImageChangeInformation;
+
+namespace GNC
+{
+namespace GCS
+{
+class IComando;
+}
+}
+//endregion
+
+namespace GNC
+{
+
+class EXTAPI StreamingLoader : public GNC::GCS::IStreamingLoader
+{
+public:
+        typedef itk::GDCMImageIO         ImageIO;
+        typedef ImageIO::IOComponentType ImageComponentType;
+        typedef ImageIO::IOPixelType     ImagePixelType;
+
+        //region Constructor
+        StreamingLoader();
+        virtual ~StreamingLoader();
+
+        virtual bool IsSignalFile()
+        {
+                return m_SignalFile;
+        }
+        virtual void SetInput(const std::string& fichero);
+
+        //------------------------------------------------------------------------------------------------
+        //region IPipelineProperties realization
+
+        /** Updates **/
+        virtual void Update();
+
+        /** Updates output information **/
+        virtual void UpdateInformation();
+
+        /* Gets original (3D Volume) direction cosines */
+        virtual const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GetDirection();
+
+        /** Gets the original (3D Volume) origin **/
+        virtual void GetOrigin(double origin[3]);
+
+        /** Gets the original (3D Volume) spacing **/
+        virtual void GetSpacing(double spacing[3]);
+
+        /** Gets the original (3D Volume) dimensions **/
+        virtual void GetDimensions(int dims[3]);
+
+        /** Gets the slice direction cosines **/
+        virtual const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GetOutputDirection();
+
+        /** Gets the slice output origin **/
+        virtual void GetOutputOrigin(double origin[3]);
+
+        /** Gets the slice output spacing **/
+        virtual void GetOutputSpacing(double spacing[3]);
+
+        /** Gets the slice output dimensions **/
+        virtual void GetOutputDimensions(int currentDimensions[3]);
+
+        //endregion
+
+        /** Sets the output spacing **/
+        virtual void SetOutputSpacing(double spacing[3]);
+
+        /** Sets the output origin **/
+        virtual void SetOutputOrigin(double origin[3]);
+
+        virtual std::string GetPatientPosition();
+
+        virtual vtkSmartPointer<vtkAlgorithmOutput> GetOutputPort(); // Devuelve el puerto de salida
+        virtual void GetOutputCopy(vtkSmartPointer<vtkImageData>& output);    // Devuelve por parametro una copia de la imagen
+        virtual bool GetDefaultWindowLevel(double &window, double &level);
+
+protected:
+        void CargarITK(GNC::GCS::IComando* cmd, int* orientacion, double* spacing = NULL);
+
+        itk::ProcessObject::Pointer                m_pReader;
+        itk::ProcessObject::Pointer                m_pPipelineJoiner;
+        vtkSmartPointer<vtkImageChangeInformation> m_pOutput;
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4>  DirectionCosines;
+        double                                     m_Origin[3];
+        double                                     m_Spacing[3];
+
+
+private:
+        ImageIO::Pointer    m_IO;
+        unsigned int        m_CurrentNumberOfComponents;
+        ImageComponentType  m_CurrentComponentType;
+        ImagePixelType      m_CurrentPixelType;
+        unsigned int        m_CurrentDimensions[3];
+        std::string         m_CurrentFile;
+        bool                m_SignalFile;
+
+        void RecomponerPipeline();
+};
+}
diff --git a/cadxcore/main/controllers/thumbnailcontroller.cpp b/cadxcore/main/controllers/thumbnailcontroller.cpp
new file mode 100644
index 0000000..46f82a7
--- /dev/null
+++ b/cadxcore/main/controllers/thumbnailcontroller.cpp
@@ -0,0 +1,147 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "thumbnailcontroller.h"
+#include <main/entorno.h>
+#include <wx/thread.h>
+#include <eventos/progresocomando.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/controladoreventos.h>
+
+#define TAMANIO_MAX_PILA 10
+namespace GNC
+{
+namespace GCS
+{
+
+ThumbnailController* ThumbnailController::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new ThumbnailController();
+        }
+        return m_pInstance;
+}
+
+void ThumbnailController::FreeInstance()
+{
+        if(m_pInstance!=NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+ThumbnailController* ThumbnailController::m_pInstance = NULL;
+
+ThumbnailController::ThumbnailController()
+{
+        GNC::GCS::ControladorEventos::Instance()->Registrar(this, GNC::GCS::Events::EventoProgresoComando());
+        m_pCriticalSection = new wxCriticalSection();
+        //m_pContinueTimer =
+        m_pCmd = NULL;
+}
+ThumbnailController::~ThumbnailController()
+{
+        if(m_pCriticalSection != NULL) {
+                delete m_pCriticalSection;
+                m_pCriticalSection = NULL;
+        }
+        if (m_pCmd != NULL) {
+                GNC::GCS::ICommandController::Instance()->AbortarComando(m_pCmd);
+        }
+}
+
+void ThumbnailController::requestThumbnail(long file_pk, GADAPI::ThumbnailsNotifier* pNotifier)
+{
+        m_pCriticalSection->Enter();
+        m_petitions.push_back(TPetition(pNotifier, file_pk));
+        if (m_pCmd == NULL) {
+                m_pCmd = new GADAPI::ThumbnailsCommand(file_pk, pNotifier);
+                GNC::GCS::ICommandController::Instance()->ProcessAsync("Generating thumbnails...", m_pCmd, this);
+        }
+        m_pCriticalSection->Leave();
+}
+
+void ThumbnailController::removeRequest(GADAPI::ThumbnailsNotifier* pNotifier)
+{
+        m_pCriticalSection->Enter();
+        if (!m_petitions.empty()) {
+                if (m_petitions.front().m_pNotifier == pNotifier && m_pCmd != NULL) {
+                        GNC::GCS::ICommandController::Instance()->AbortarComandosDeOwner(this);
+                        m_pCmd = NULL;
+                        //to start with next it has to be synchronized with gui so call timer...
+                        if(IsRunning()) {
+                                Stop();
+                                Start(300, true);
+                        }
+                }
+        }
+        for (TListPetitions::iterator it = m_petitions.begin(); it != m_petitions.end(); ++it) {
+                if ((*it).m_pNotifier == pNotifier) {
+                        m_petitions.erase(it);
+                        break;
+                }
+        }
+        m_pCriticalSection->Leave();
+}
+
+void ThumbnailController::Notify()
+{
+        m_pCriticalSection->Enter();
+        if (m_pCmd == NULL) {
+                //run front if exists...
+                TListPetitions::iterator it = m_petitions.begin();
+                if (it != m_petitions.end()) {
+                        m_pCmd = new GADAPI::ThumbnailsCommand((*it).m_file_pk, (*it).m_pNotifier);
+                        GNC::GCS::ICommandController::Instance()->ProcessAsync("Generating thumbnails...", m_pCmd, this);
+                }
+        }
+        m_pCriticalSection->Leave();
+}
+
+void ThumbnailController::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        GNC::GCS::Events::EventoProgresoComando* pEvt = dynamic_cast<GNC::GCS::Events::EventoProgresoComando*> (evt);
+        if (pEvt == NULL  || pEvt->GetComando() == NULL || pEvt->GetComando() != m_pCmd) {
+                return;
+        }
+        switch (pEvt->GetTipo()) {
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Iniciado:
+                break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Progreso:
+                break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado: {
+                m_pCriticalSection->Enter();
+                m_petitions.pop_front();
+                TListPetitions::iterator it = m_petitions.begin();
+                if (it != m_petitions.end() && !m_pCmd->EstaAbortado()) {
+                        m_pCmd = new GADAPI::ThumbnailsCommand((*it).m_file_pk, (*it).m_pNotifier);
+                        GNC::GCS::ICommandController::Instance()->ProcessAsync("Generating thumbnails...", m_pCmd, this);
+                } else {
+                        m_pCmd = NULL;
+                }
+                m_pCriticalSection->Leave();
+        }
+        break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Unknown:
+                break;
+        }
+}
+}
+}
diff --git a/cadxcore/main/controllers/thumbnailcontroller.h b/cadxcore/main/controllers/thumbnailcontroller.h
new file mode 100644
index 0000000..908e518
--- /dev/null
+++ b/cadxcore/main/controllers/thumbnailcontroller.h
@@ -0,0 +1,72 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <wx/timer.h>
+
+#include <api/api.h>
+#include <api/observers/ieventsobserver.h>
+#include <map>
+#include <commands/thumbnailscommand.h>
+
+class wxCriticalSection;
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI ThumbnailController: public GNC::GCS::IEventsObserver, public wxTimer
+{
+public:
+        static ThumbnailController* Instance();
+        static void FreeInstance();
+
+
+protected:
+        static ThumbnailController* m_pInstance;
+        ThumbnailController();
+        ~ThumbnailController();
+
+public:
+        void requestThumbnail(long file_pk, ::GADAPI::ThumbnailsNotifier* pNotifier);
+        void removeRequest(::GADAPI::ThumbnailsNotifier* pNotifier);
+protected:
+        virtual void Notify();
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+        typedef struct TPetition {
+                GADAPI::ThumbnailsNotifier* m_pNotifier;
+                long m_file_pk;
+                TPetition(::GADAPI::ThumbnailsNotifier* pNotifier, long file_pk)
+                {
+                        m_pNotifier = pNotifier;
+                        m_file_pk = file_pk;
+                }
+        } TPetition;
+
+        typedef std::list<TPetition> TListPetitions;
+
+
+        ::GADAPI::ThumbnailsCommand* m_pCmd;
+        TListPetitions m_petitions;
+        wxCriticalSection* m_pCriticalSection;
+};
+}
+}
diff --git a/cadxcore/main/controllers/windowattributescontroller.cpp b/cadxcore/main/controllers/windowattributescontroller.cpp
new file mode 100644
index 0000000..485abd9
--- /dev/null
+++ b/cadxcore/main/controllers/windowattributescontroller.cpp
@@ -0,0 +1,125 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <limits>
+#include <wx/toplevel.h>
+#include <wx/display.h>
+#include <wx/log.h>
+#include "configurationcontroller.h"
+#include "windowattributescontroller.h"
+#include "controladorlog.h"
+
+#define ATTRIBUTES_SCOPE "/GinkgoCore/WindowAttributes"
+#define WINDOW_ID_KEY "windowId"
+#define X_KEY_POSITION "xPos"
+#define Y_KEY_POSITION "yPos"
+#define WIDTH_KEY_POSITION "width"
+#define HEIGH_KEY_POSITION "heigh"
+#define IS_MAXIMIZED_KEY "isMaximized"
+
+namespace GNC
+{
+namespace GCS
+{
+WindowAttributesController::WindowAttributesController()
+{
+}
+WindowAttributesController::~WindowAttributesController()
+{
+}
+
+void WindowAttributesController::LoadWindowAttributes(const std::string& windowId, wxWindow* pWindow, bool defaultMaximized)
+{
+        GNC::GCS::IConfigurationController::TListGroups groups;
+        GNC::GCS::ConfigurationController::Instance()->readGroupUser(ATTRIBUTES_SCOPE, groups);
+
+        int maxX = 0, maxY = 0, minX=std::numeric_limits<int>::max(), minY=std::numeric_limits<int>::max();
+        int deviceCount = wxDisplay::GetCount();
+        for (int i = 0; i < deviceCount; ++i) {
+                wxDisplay dsply(i);
+                maxX = std::max<int>(maxX, dsply.GetClientArea().x + dsply.GetCurrentMode().GetWidth());
+                maxY = std::max<int>(maxY, dsply.GetClientArea().y + dsply.GetCurrentMode().GetHeight());
+                minX = std::min<int>(minX, dsply.GetClientArea().x);
+                minY = std::min<int>(minY, dsply.GetClientArea().y);
+        }
+        LOG_DEBUG ("WindowAttributes",  "Client area X: " << minX << ", " << maxX << "  Y: " << minY << ", " << maxY << std::endl);
+        std::string windowIdTmp;
+        for (GNC::GCS::IConfigurationController::TListGroups::iterator it = groups.begin(); it != groups.end(); ++it) {
+                (*it).readStringValue(WINDOW_ID_KEY, windowIdTmp);
+                if (windowId.compare(windowIdTmp) == 0) {
+                        wxPoint position;
+                        wxSize size;
+                        (*it).readIntValue(X_KEY_POSITION, position.x, -1);
+                        (*it).readIntValue(Y_KEY_POSITION, position.y, -1);
+                        if (position.x >= (minX - pWindow->GetMinSize().x) && position.x  < maxX
+                            && position.y >= (minY  - pWindow->GetMinSize().y) && position.y < maxY) {
+                                pWindow->SetPosition(position);
+                        }
+                        wxTopLevelWindow* pTopLevel = dynamic_cast<wxTopLevelWindow*>(pWindow);
+                        if (pTopLevel != NULL) {
+                                bool isMaximized = defaultMaximized;
+                                (*it).readBoolValue(IS_MAXIMIZED_KEY, isMaximized);
+                                wxLogDebug("pTopLevel:isMaximized=%d", isMaximized);
+                                pTopLevel->Maximize(isMaximized);
+                                if (!isMaximized) {
+                                        (*it).readIntValue(WIDTH_KEY_POSITION, size.x, 0);
+                                        (*it).readIntValue(HEIGH_KEY_POSITION, size.y, 0);
+
+                                }
+                        } else {
+                                (*it).readIntValue(WIDTH_KEY_POSITION, size.x, 0);
+                                (*it).readIntValue(HEIGH_KEY_POSITION, size.y, 0);
+                        }
+                        pWindow->SetSize(size);
+                        wxLogDebug("Set windows size:(%d, %d)", size.x, size.y);
+                }
+        }
+}
+
+void WindowAttributesController::SaveWindowAttributes(const std::string& windowId, wxWindow* pWindow)
+{
+        GNC::GCS::IConfigurationController::TListGroups groups;
+        GNC::GCS::ConfigurationController::Instance()->readGroupUser(ATTRIBUTES_SCOPE, groups);
+        std::string windowIdTmp;
+        for (GNC::GCS::IConfigurationController::TListGroups::iterator it = groups.begin(); it != groups.end(); ++it) {
+                (*it).readStringValue(WINDOW_ID_KEY, windowIdTmp);
+                if (windowId.compare(windowIdTmp) == 0) {
+                        groups.erase(it);
+                        break;
+                }
+        }
+        GNC::GCS::ConfigurationController::TMapValues newGroup;
+        newGroup[WINDOW_ID_KEY] = windowId;
+        wxPoint position = pWindow->GetPosition();
+        newGroup.insertInt(X_KEY_POSITION,position.x);
+        newGroup.insertInt(Y_KEY_POSITION,position.y);
+        wxSize size = pWindow->GetSize();
+        newGroup.insertInt(WIDTH_KEY_POSITION,size.x);
+        newGroup.insertInt(HEIGH_KEY_POSITION,size.y);
+        wxTopLevelWindow* pTopLevel = dynamic_cast<wxTopLevelWindow*>(pWindow);
+        if (pTopLevel != NULL) {
+                newGroup.insertBool(IS_MAXIMIZED_KEY, pTopLevel->IsMaximized());
+        }
+        groups.push_back(newGroup);
+        GNC::GCS::ConfigurationController::Instance()->writeGroupUser(ATTRIBUTES_SCOPE, groups);
+}
+
+}
+}
diff --git a/cadxcore/main/controllers/windowattributescontroller.h b/cadxcore/main/controllers/windowattributescontroller.h
new file mode 100644
index 0000000..48df647
--- /dev/null
+++ b/cadxcore/main/controllers/windowattributescontroller.h
@@ -0,0 +1,39 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+namespace GNC
+{
+namespace GCS
+{
+class EXTAPI WindowAttributesController
+{
+protected:
+        WindowAttributesController();
+        ~WindowAttributesController();
+
+public:
+        static void LoadWindowAttributes(const std::string& windowId, wxWindow* pWindow, bool defaultMaximized = true);
+        static void SaveWindowAttributes(const std::string& windowId, wxWindow* pWindow);
+protected:
+
+};
+}
+}
diff --git a/cadxcore/main/entorno.cpp b/cadxcore/main/entorno.cpp
new file mode 100644
index 0000000..96fe74d
--- /dev/null
+++ b/cadxcore/main/entorno.cpp
@@ -0,0 +1,594 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+#include <sstream>
+#include <cstdio>
+#include <wx/filename.h>
+#include <wx/dir.h>
+#include <wx/stdpaths.h>
+#include <wx/event.h>
+
+#include <api/globals.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include <api/observers/iextensionsobserver.h>
+#include <api/observers/iviewsobserver.h>
+#include <api/internationalization/internationalization.h>
+
+#include <main/license.h>
+
+#include <api/helpers/aetwildcards.h>
+#include <api/ubication.h>
+
+#include <main/controllers/pacscontroller.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladorcarga.h>
+#include <main/controllers/controladoracciones.h>
+#include <main/controllers/controladorinternacionalizacion.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/integrationcontroller.h>
+#include <main/managers/widgetsmanager.h>
+
+#ifdef UNICODE
+#define UNICODE_WAS_SET
+#undef UNICODE
+#endif
+#include <dcmtk/dcmjpeg/djdecode.h>
+#include <dcmtk/dcmjpeg/djencode.h>
+#include <dcmtk/dcmdata/dcrledrg.h>
+#include <dcmtk/dcmdata/dcrleerg.h>
+#ifdef UNICODE_WAS_SET
+#define UNICODE
+#endif
+
+
+#include "entorno.h"
+
+// Definicion de variables static
+#define GINKGO_LOCALAET    "GINKGO_%IP4"
+#if defined GINKGO_PRO
+#include <ginkgopro/ginkgo_pro_defines.h>
+#else
+#define EULA "Ginkgo CADx is licensed under the LGPL v3 license. You can find the legal terms of the license at http://www.gnu.org/copyleft/lgpl.html"
+#endif
+
+//helper
+bool RemoveTempDir(const wxString& dirPath)
+{
+        //borra en cascada
+        if(!wxRmdir(dirPath)) {
+                //vaciar
+                wxDir dir;
+                if (dir.Open(dirPath)) {
+                        wxString fileName;
+                        bool cont = dir.GetFirst(&fileName);
+                        while (cont) {
+                                fileName=dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) +fileName;
+                                if(wxDir::Exists(fileName)) {
+                                        if (RemoveTempDir(fileName)) {
+                                                cont = dir.GetFirst(&fileName);
+                                        } else {
+                                                cont = dir.GetNext(&fileName);
+                                        }
+                                } else {
+                                        int result;
+#ifdef _WIN32
+                                        result = _chmod(TOPATH(fileName).c_str(), _S_IWRITE);
+#else
+                                        result = chmod(TOPATH(fileName).c_str(), 0644);
+#endif
+                                        if (result != 0) {
+                                                LOG_ERROR("Core", "Unable to change permission of '" << TOPATH(fileName) << "':" << strerror(errno));
+                                        }
+
+                                        if (wxRemoveFile(fileName)) {
+                                                cont = dir.GetFirst(&fileName);
+                                        } else {
+                                                cont = dir.GetNext(&fileName);
+                                        }
+                                }
+                        }
+                }
+        }
+        if(wxDir::Exists(dirPath)) {
+                return wxRmdir(dirPath);
+        }
+        return true;
+}
+
+GNC::Entorno* GNC::Entorno::m_pInstancia = NULL;
+
+GNC::Entorno::Entorno()
+{
+        DJEncoderRegistration::registerCodecs(
+                ECC_lossyYCbCr,
+                EUC_default, // UID generation (never create new UID's)
+                OFFalse, // verbose
+                0, 0, 0, true, ESS_444, true); // optimize huffman table
+        DJDecoderRegistration::registerCodecs();
+
+        DcmRLEEncoderRegistration::registerCodecs();
+        DcmRLEDecoderRegistration::registerCodecs();
+
+        m_pApp = NULL;
+        m_pVentanaPrincipal = NULL;
+        m_pVentanaRaiz = NULL;
+        m_GinkgoLicenseMessage = "";
+
+        m_isChildInstance = false;
+
+        std::ostringstream os;
+        os << GINKGO_VERSION;
+        if (sizeof(void*) == 4) {
+                os << " 32 bits";
+        } else if (sizeof(void*) == 8) {
+                os << " 64 bits";
+        }
+        std::sscanf(GINKGO_VERSION, "%u.%u.%*c", &m_mayorVersionNumber, &m_minorVersionNumber);
+
+        m_GinkgoVersion = os.str();
+
+        m_GinkgoCopyRight = GINKGO_COPYRIGHT;
+
+        wxFileName executable_path = wxStandardPaths::Get().GetExecutablePath();
+        //executable_path.SetFullName(wxEmptyString);
+
+        wxString pluginsDir;
+        wxString resourcesDir;
+        wxString langDir;
+
+
+#if defined(_WINDOWS)
+        pluginsDir = executable_path.GetPath() + wxFileName::GetPathSeparator() + wxT("Plugins");
+        langDir = executable_path.GetPath() + wxFileName::GetPathSeparator() + wxT("lang");
+        resourcesDir = executable_path.GetPath();
+#elif defined(LINUX)
+#if defined(CUSTOM_PACKAGE)
+        pluginsDir = executable_path.GetPath() + wxFileName::GetPathSeparator() + wxT("Plugins");
+        resourcesDir = executable_path.GetPath();
+        langDir = executable_path.GetPath() + wxFileName::GetPathSeparator() + wxT("lang");
+#else
+        pluginsDir = wxStandardPaths::Get().GetPluginsDir() + wxFileName::GetPathSeparator() + wxT("Plugins");
+        resourcesDir = wxStandardPaths::Get().GetResourcesDir();
+        langDir = wxStandardPaths::Get().GetResourcesDir() + wxFileName::GetPathSeparator() + wxT("lang");
+#endif
+
+#else
+        pluginsDir = wxStandardPaths::Get().GetPluginsDir();
+        langDir = wxStandardPaths::Get().GetResourcesDir() + wxFileName::GetPathSeparator() + wxT("lang");
+        resourcesDir = wxStandardPaths::Get().GetResourcesDir();
+#endif
+
+        m_GinkgoPluginsDir = TOPATH(pluginsDir);
+        m_GinkgoLanguageDir = TOPATH(langDir);
+        m_GinkgoResourcesDir = TOPATH(resourcesDir);
+
+        //std::cout << "PLUGINS_DIR = " << m_GinkgoPluginsDir.c_str() << std::endl;
+        //std::cout << "LANGUAGE_DIR = " << m_GinkgoLanguageDir.c_str() << std::endl;
+
+        wxString wxTempDir = wxStandardPaths::Get().GetTempDir() + wxFileName::GetPathSeparator() + wxT("GinkgoCADx");
+        m_GinkgoTempDir = TOPATH(wxTempDir);
+        if (!wxDirExists(wxTempDir)) {
+                bool success;
+#ifdef _WIN32
+                success = wxMkdir(wxTempDir,511);
+#else
+                success = (wxMkDir(wxTempDir.ToUTF8(), 0770) == 0);
+#endif
+                if (!success) {
+                        LOG_ERROR("Core", "Unable to create temporary directory '" << m_GinkgoTempDir << "'");
+                }
+        }
+
+        m_GinkgoUserDir = TOPATH(wxStandardPaths::Get().GetUserDataDir());
+
+        {
+                wxString directorioUser = FROMPATH(m_GinkgoUserDir);
+                //se crea el user dir
+                if(!wxDirExists(directorioUser)) {
+                        bool success;
+#ifdef _WIN32
+                        success = wxMkdir(directorioUser,511);
+#else
+                        success = (wxMkDir(directorioUser.ToUTF8(), 0770) == 0);
+#endif
+                        if (!success) {
+                                LOG_ERROR("Core", "Unable to create user directory '" << m_GinkgoUserDir << "'");
+                        }
+                }
+        }
+
+        // Carga de ubicaciones
+        GNC::GCS::ConfigurationController::TListGroups locations;
+        GNC::GCS::ConfigurationController::Instance()->readGroupGeneral("/GinkgoCore/Locations", locations);
+        for (GNC::GCS::ConfigurationController::TListGroups::iterator it = locations.begin(); it != locations.end(); ++it) {
+                std::string title, path, descr;
+                bool monitorize, cleanbefore, cleanafter;
+                (*it).readStringValue("Title", title);
+                (*it).readStringValue("Path", path);
+                (*it).readStringValue("Description", descr);
+                (*it).readBoolValue("Monitorize", monitorize, false);
+                (*it).readBoolValue("CleanBefore", cleanbefore, false);
+                (*it).readBoolValue("CleanAfter", cleanafter, false);
+
+                m_Ubicaciones[title] = new GIL::Ubicacion(title, path, descr, monitorize, cleanbefore, cleanafter);
+        }
+
+        GIL::IntegrationController::Instance();
+}
+
+GNC::Entorno::~Entorno()
+{
+        GIL::IntegrationController::FreeInstance();
+        DJEncoderRegistration::cleanup();
+        DJDecoderRegistration::cleanup();
+
+        DcmRLEEncoderRegistration::cleanup();
+        DcmRLEDecoderRegistration::cleanup();
+
+        if (!ExtensionsObservers.empty()) {
+                LOG_WARN("Core", "Extensions observers list not empty");
+        }
+
+        if (!ViewsObservers.empty()) {
+                LOG_WARN("Core", "Views observers list not empty");
+        }
+
+        //remove temp dir
+        if (!m_isChildInstance) {
+                RemoveTempDir(FROMPATH(m_GinkgoTempDir));
+        }
+
+        m_pApp = NULL;
+        m_pVentanaPrincipal = NULL;
+        m_pVentanaRaiz = NULL;
+
+        for (MapaUbicaciones::iterator it = m_Ubicaciones.begin(); it != m_Ubicaciones.end(); ++it) {
+                delete (*it).second;
+        }
+        m_Ubicaciones.clear();
+}
+
+GNC::Entorno* GNC::Entorno::Instance()
+{
+        if (m_pInstancia == NULL) {
+                m_pInstancia = new GNC::Entorno();
+        }
+        return m_pInstancia;
+}
+
+void GNC::Entorno::FreeInstance()
+{
+        if (m_pInstancia != NULL) {
+                delete m_pInstancia;
+        }
+        m_pInstancia = NULL;
+}
+
+/** Gets the GinkgoCADx version full string **/
+const std::string& GNC::Entorno::GetGinkgoVersionString()
+{
+        return m_GinkgoVersion;
+}
+
+/** Gets the GinkgoCADx version string **/
+std::string GNC::Entorno::GetGinkgoVersion()
+{
+        return std::string(GINKGO_VERSION);
+}
+
+/** Gets the mayor version number **/
+int GNC::Entorno::GetGinkgoMayorVersionNumber()
+{
+        return m_mayorVersionNumber;
+}
+
+/** Gets the mayor version minor **/
+int GNC::Entorno::GetGinkgoMinorVersionNumber()
+{
+        return m_minorVersionNumber;
+}
+
+
+/** Gets the application name */
+std::string GNC::Entorno::GetApplicationName()
+{
+        return std::string(PRODUCT_NAME);
+}
+
+/** Gets the application subtitle */
+std::string GNC::Entorno::GetApplicationSubTitle()
+{
+        return PRODUCT_SUBTITLE;
+}
+
+/** Gets the application credits */
+std::string GNC::Entorno::GetApplicationCredits()
+{
+        return std::string(CREDITS);
+}
+
+/** Gets the application eula */
+std::string GNC::Entorno::GetApplicationEula()
+{
+        return std::string(EULA);
+}
+
+const std::string& GNC::Entorno::GetGinkgoCopyRight()
+{
+        return m_GinkgoCopyRight;
+}
+
+const std::string& GNC::Entorno::GetLicenseMessage()
+{
+        return m_GinkgoLicenseMessage;
+}
+
+void GNC::Entorno::SetLicenseMessage(const std::string& license)
+{
+        m_GinkgoLicenseMessage = license;
+}
+
+int GNC::Entorno::ParseSVNBuild(const char* str)
+{
+        int num = -1;
+        std::string beg;
+        std::string end;
+        std::stringstream ss(str);
+        ss >> beg >> num >> end;
+        return num;
+}
+
+
+
+const std::string& GNC::Entorno::GetGinkgoTempDir()
+{
+        return m_GinkgoTempDir;
+}
+
+std::string GNC::Entorno::CreateGinkgoTempDir()
+{
+        wxString wxNuevoDirTemp;
+        do {
+                wxNuevoDirTemp = FROMPATH(GetGinkgoTempDir()) + wxFileName::GetPathSeparator(wxPATH_NATIVE) + wxT("_gnktmp_") + wxString::Format(wxT("%d"), (int) rand());
+        } while(wxDir::Exists(wxNuevoDirTemp));
+
+#ifdef _WIN32
+        wxFileName::Mkdir(wxNuevoDirTemp);
+#else
+        wxFileName::Mkdir(wxNuevoDirTemp.c_str(), 0777);
+#endif
+
+        return std::string(TOPATH(wxNuevoDirTemp));
+}
+
+void GNC::Entorno::RemoveDirRecursive(const std::string& path)
+{
+        wxString pathWx = FROMPATH(path);
+        if (wxDirExists(pathWx)) {
+                RemoveTempDir(pathWx);
+        }
+}
+
+std::string GNC::Entorno::CreateGinkgoTempFile()
+{
+        std::string directory = CreateGinkgoTempDir();
+        std::ostringstream ostr;
+        ostr << directory << (char)wxFileName::GetPathSeparator() << "tmp";
+        return ostr.str();
+}
+
+const std::string& GNC::Entorno::GetGinkgoLanguageDir()
+{
+        return m_GinkgoLanguageDir;
+}
+
+const std::string& GNC::Entorno::GetGinkgoResourcesDir()
+{
+        return m_GinkgoResourcesDir;
+}
+
+std::string GNC::Entorno::CrearDirectorioTemporal()
+{
+        wxString dirTmp;
+        do {
+                std::ostringstream ostr;
+                ostr << GetGinkgoTempDir().c_str() << (char)wxFileName::GetPathSeparator() << "_gnktmp_" << rand();
+                dirTmp = FROMPATH(ostr.str());
+        } while (wxDirExists(dirTmp));
+
+#if defined(_WINDOWS)
+        bool success = wxMkDir(dirTmp);
+#else
+        bool success = wxMkDir(dirTmp.ToUTF8(), 0770);
+#endif
+
+        std::string resultado(TOPATH(dirTmp));
+        if (!success) {
+                LOG_ERROR("Core", "Error creating temporary directory '"<<resultado << "'");
+        }
+        return resultado;
+}
+
+const std::string& GNC::Entorno::GetPluginsPath()
+{
+        return m_GinkgoPluginsDir;
+}
+
+const std::string& GNC::Entorno::GetGinkgoUserDir()
+{
+        return m_GinkgoUserDir;
+}
+
+std::string GNC::Entorno::GetDicomLocalAET()
+{
+        std::string value;
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/PACS/Local", "AET", value, GINKGO_LOCALAET);
+
+        return ParseAET(value);
+}
+
+std::string GNC::Entorno::ParseAET(const std::string& AET)
+{
+        return GNC::GCS::AETWildcards::Parse(AET);
+}
+
+wxApp* GNC::Entorno::GetApp()
+{
+        return m_pApp;
+}
+
+void GNC::Entorno::YieldApp()
+{
+        //DEPRECATED
+        //m_pApp->Yield();
+}
+
+
+void GNC::Entorno::SetApp(wxApp* app)
+{
+        m_pApp = app;
+}
+
+VentanaPrincipal* GNC::Entorno::GetVentanaPrincipal()
+{
+        return m_pVentanaPrincipal;
+}
+
+void GNC::Entorno::SetVentanaPrincipal(VentanaPrincipal* ventana)
+{
+        m_pVentanaPrincipal = ventana;
+}
+
+wxWindow* GNC::Entorno::GetVentanaRaiz()
+{
+        return m_pVentanaRaiz;
+}
+
+void GNC::Entorno::SetVentanaRaiz(wxWindow* ventana)
+{
+        m_pVentanaRaiz = ventana;
+}
+
+GNC::GCS::ICommandController* GNC::Entorno::GetCommandController()
+{
+        return GNC::GCS::ICommandController::Instance();
+}
+
+GIL::DICOM::IPACSController* GNC::Entorno::GetPACSController()
+{
+        return GIL::DICOM::PACSController::Instance();
+}
+
+GNC::GCS::IControladorVistas* GNC::Entorno::GetControladorVistas()
+{
+        return GNC::GCS::ControladorVistas::Instance();
+}
+
+GNC::GCS::IEventsController* GNC::Entorno::GetControladorEventos()
+{
+        return GNC::GCS::ControladorEventos::Instance();
+}
+
+GNC::GCS::IControladorCarga* GNC::Entorno::GetControladorCarga()
+{
+        return GNC::GCS::ControladorCarga::Instance();
+}
+
+GNC::GCS::IControladorPermisos* GNC::Entorno::GetControladorPermisos()
+{
+        return GNC::GCS::IControladorPermisos::Instance();
+}
+
+GNC::GCS::IControladorExtensiones* GNC::Entorno::GetControladorExtensiones()
+{
+        return GNC::ControladorExtensiones::Instance();
+}
+
+GNC::GCS::IControladorAcciones* GNC::Entorno::GetControladorAcciones()
+{
+        return GNC::GCS::ControladorAcciones::Instance();
+}
+
+GNC::GCS::IControladorInternacionalizacion* GNC::Entorno::GetControladorInternacionalizacion()
+{
+        return GNC::GCS::ControladorInternacionalizacion::Instance();
+}
+
+GNC::GCS::IConfigurationController* GNC::Entorno::GetConfigurationController()
+{
+        return GNC::GCS::ConfigurationController::Instance();
+}
+
+GNC::GCS::IWidgetsManager* GNC::Entorno::NewWidgetsManager(GNC::GCS::IVista* pVista)
+{
+        return new GNC::WidgetsManager(pVista);
+}
+
+void GNC::Entorno::FreeWidgetsManager(GNC::GCS::IWidgetsManager* pManager)
+{
+        if (pManager != NULL) {
+                delete pManager;
+        }
+}
+
+
+//------------------------------------------------------------------------------
+//region "Extensions observers registry interface"
+
+void GNC::Entorno::RegisterExtensionsObserver(GNC::GCS::IExtensionsObserver* observer)
+{
+        GNC::GCS::ILocker lock(ExtensionsObserversLock);
+
+        for (ExtensionsObserversList::const_iterator it = ExtensionsObservers.begin(); it != ExtensionsObservers.end(); ++it) {
+                if (*it == observer) {
+                        LOG_WARN("Core", "Extensions observer already registered");
+                        return;
+                }
+        }
+        ExtensionsObservers.push_back(observer);
+}
+
+void GNC::Entorno::UnRegisterExtensionsObserver(GNC::GCS::IExtensionsObserver* observer)
+{
+        GNC::GCS::ILocker lock(ExtensionsObserversLock);
+        ExtensionsObservers.remove(observer);
+}
+
+//endregion
+
+//------------------------------------------------------------------------------
+//region "Views observers registry interface"
+void GNC::Entorno::RegisterViewsObserver(GNC::GCS::IObservadorVistas* /*observer*/)
+{
+        GNC::GCS::ILocker lock(ViewsObserversLock);
+        //TODO
+}
+
+void GNC::Entorno::UnRegisterViewsObserver(GNC::GCS::IObservadorVistas* /*observer*/)
+{
+        GNC::GCS::ILocker lock(ViewsObserversLock);
+        //TODO
+}
+//endregion
diff --git a/cadxcore/main/entorno.h b/cadxcore/main/entorno.h
new file mode 100644
index 0000000..08487c8
--- /dev/null
+++ b/cadxcore/main/entorno.h
@@ -0,0 +1,216 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <list>
+#include <string>
+
+#include <api/internal.h>
+#include <api/globals.h>
+#include <api/ientorno.h>
+#include <api/ilock.h>
+
+class VentanaPrincipal;
+class wxWindow;
+class wxApp;
+class wxSizer;
+
+namespace GNC
+{
+namespace GCS
+{
+class IExtensionsObserver;
+class IObservadorVistas;
+class IEventsController;
+}
+}
+
+namespace GNC
+{
+class Entorno : public GNC::GCS::IEntorno
+{
+public:
+
+        typedef std::list<GNC::GCS::IExtensionsObserver*> ExtensionsObserversList;
+        typedef std::list<GNC::GCS::IObservadorVistas*>   ViewsObserversList;
+
+        bool m_isChildInstance;
+
+protected:
+
+        /* Constructor */
+        Entorno();
+        /* Destructor */
+        ~Entorno();
+
+        static Entorno* m_pInstancia;
+
+public:
+        static Entorno* Instance();
+        static void FreeInstance();
+
+
+        bool IsChildInstance()
+        {
+                return m_isChildInstance;
+        }
+
+        void SetChildInstance(bool child)
+        {
+                m_isChildInstance = child;
+        }
+
+        // Miembros estaticos
+
+        //region version
+
+        /** Gets the GinkgoCADx version full string **/
+        virtual const std::string& GetGinkgoVersionString();
+
+        /** Gets the GinkgoCADx version string **/
+        virtual std::string GetGinkgoVersion();
+
+        /** Gets the mayor version number **/
+        virtual int GetGinkgoMayorVersionNumber();
+
+        /** Gets the mayor version minor **/
+        virtual int GetGinkgoMinorVersionNumber();
+
+        /** Gets the application name */
+        virtual std::string GetApplicationName();
+
+        /** Gets the application subtitle */
+        virtual std::string GetApplicationSubTitle();
+
+        /** Gets the application credits */
+        virtual std::string GetApplicationCredits();
+
+        /** Gets the application eula */
+        virtual std::string GetApplicationEula();
+        //endregion
+
+        //region license
+        virtual const std::string& GetLicenseMessage();
+        virtual void SetLicenseMessage(const std::string& license);
+
+        virtual const std::string& GetGinkgoCopyRight();
+        //enregion
+
+        //region helpers
+        virtual int ParseSVNBuild(const char* str);
+        //endregion
+
+        virtual const std::string& GetPluginsPath();
+        virtual const std::string& GetGinkgoUserDir();
+        virtual const std::string& GetGinkgoTempDir();
+        virtual std::string CreateGinkgoTempDir();
+        virtual void RemoveDirRecursive(const std::string& path);
+        virtual std::string CreateGinkgoTempFile();
+        virtual const std::string& GetGinkgoLanguageDir();
+        virtual const std::string& GetGinkgoResourcesDir();
+        virtual std::string CrearDirectorioTemporal();
+        virtual std::string  GetDicomLocalAET();
+
+        std::string ParseAET(const std::string& AET);
+
+        virtual wxApp* GetApp();
+        virtual void SetApp(wxApp* app);
+
+        virtual void YieldApp();
+
+        virtual VentanaPrincipal* GetVentanaPrincipal();
+        virtual void SetVentanaPrincipal(VentanaPrincipal* ventana);
+
+        virtual wxWindow* GetVentanaRaiz();
+        virtual void SetVentanaRaiz(wxWindow* window);
+
+        virtual GNC::GCS::ICommandController* GetCommandController();
+
+        virtual GIL::DICOM::IPACSController* GetPACSController();
+
+        virtual GNC::GCS::IControladorVistas* GetControladorVistas();
+
+        virtual GNC::GCS::IEventsController* GetControladorEventos();
+
+        virtual GNC::GCS::IControladorCarga* GetControladorCarga();
+
+        virtual GNC::GCS::IControladorPermisos* GetControladorPermisos();
+
+        virtual GNC::GCS::IControladorExtensiones* GetControladorExtensiones();
+
+        virtual GNC::GCS::IControladorAcciones*  GetControladorAcciones();
+
+        virtual GNC::GCS::IControladorInternacionalizacion*  GetControladorInternacionalizacion();
+
+        virtual GNC::GCS::IConfigurationController* GetConfigurationController();
+
+        virtual GNC::GCS::IWidgetsManager* NewWidgetsManager(GNC::GCS::IVista* pVista);
+        virtual void FreeWidgetsManager(GNC::GCS::IWidgetsManager* pManager);
+
+        virtual GNC::GCS::IEntorno::MapaUbicaciones& GetUbicaciones()
+        {
+                return m_Ubicaciones;
+        }
+
+
+//------------------------------------------------------------------------------
+//region "Extensions observers registry interface"
+
+public:
+        virtual void RegisterExtensionsObserver(GNC::GCS::IExtensionsObserver* observer);
+        virtual void UnRegisterExtensionsObserver(GNC::GCS::IExtensionsObserver* observer);
+
+public: // TODO
+        ExtensionsObserversList ExtensionsObservers;
+        GNC::GCS::ILockable ExtensionsObserversLock;
+//endregion
+
+//------------------------------------------------------------------------------
+//region "Views observers registry interface"
+
+public:
+        virtual void RegisterViewsObserver(GNC::GCS::IObservadorVistas* observer);
+        virtual void UnRegisterViewsObserver(GNC::GCS::IObservadorVistas* observer);
+
+public: // TODO
+        ViewsObserversList ViewsObservers;
+        GNC::GCS::ILockable ViewsObserversLock;
+//endregion
+
+private:
+        std::string m_GinkgoVersion;
+        std::string m_GinkgoCopyRight;
+        std::string m_GinkgoPluginsDir;
+        std::string m_GinkgoUserDir;
+        std::string m_GinkgoTempDir;
+        std::string m_GinkgoLanguageDir;
+        std::string m_GinkgoResourcesDir;
+        std::string m_GinkgoLicenseMessage;
+
+        int m_mayorVersionNumber;
+        int m_minorVersionNumber;
+
+        wxApp* m_pApp;
+        VentanaPrincipal* m_pVentanaPrincipal;
+        wxWindow* m_pVentanaRaiz;
+
+        friend class ::VentanaPrincipal;
+};
+}
diff --git a/cadxcore/main/gui/acquisition/DialogoAdquisicion.fbp b/cadxcore/main/gui/acquisition/DialogoAdquisicion.fbp
new file mode 100644
index 0000000..404ce46
--- /dev/null
+++ b/cadxcore/main/gui/acquisition/DialogoAdquisicion.fbp
@@ -0,0 +1,4966 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">dialogoadquisicionbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">DialogoAdquisicion</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">520,300</property>
+            <property name="name">DialogoAdquisicionBase</property>
+            <property name="pos"></property>
+            <property name="size">950,575</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">DICOM Query/Retrieve</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose">OnClose</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown">OnKeyDownFormulario</event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">protected</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size">-1,-1</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size">-1,-1</property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">PACS</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBodyPanel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer18</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size">-1,-1</property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelPACS</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Search</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">m_pSizerCamposBusqueda</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxBoxSizer" expanded="1">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer32</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxBoxSizer" expanded="1">
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">bSizer33</property>
+                                                        <property name="orient">wxHORIZONTAL</property>
+                                                        <property name="permission">none</property>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                            <property name="proportion">0</property>
+                                                            <object class="wxStaticText" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font">,90,92,-1,70,0</property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="label">Patient</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_pPatientLabelStr</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style"></property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <property name="wrap">-1</property>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                        <object class="sizeritem" expanded="1">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxEXPAND</property>
+                                                            <property name="proportion">1</property>
+                                                            <object class="wxBoxSizer" expanded="1">
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">bSizer23</property>
+                                                                <property name="orient">wxHORIZONTAL</property>
+                                                                <property name="permission">none</property>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                                    <property name="proportion">0</property>
+                                                                    <object class="wxComboBox" expanded="0">
+                                                                        <property name="BottomDockable">1</property>
+                                                                        <property name="LeftDockable">1</property>
+                                                                        <property name="RightDockable">1</property>
+                                                                        <property name="TopDockable">1</property>
+                                                                        <property name="aui_layer"></property>
+                                                                        <property name="aui_name"></property>
+                                                                        <property name="aui_position"></property>
+                                                                        <property name="aui_row"></property>
+                                                                        <property name="best_size"></property>
+                                                                        <property name="bg"></property>
+                                                                        <property name="caption"></property>
+                                                                        <property name="caption_visible">1</property>
+                                                                        <property name="center_pane">0</property>
+                                                                        <property name="choices">"Id" "Name" "Acc#" "Study UID"</property>
+                                                                        <property name="close_button">1</property>
+                                                                        <property name="context_help"></property>
+                                                                        <property name="context_menu">1</property>
+                                                                        <property name="default_pane">0</property>
+                                                                        <property name="dock">Dock</property>
+                                                                        <property name="dock_fixed">0</property>
+                                                                        <property name="docking">Left</property>
+                                                                        <property name="enabled">1</property>
+                                                                        <property name="fg"></property>
+                                                                        <property name="floatable">1</property>
+                                                                        <property name="font"></property>
+                                                                        <property name="gripper">0</property>
+                                                                        <property name="hidden">0</property>
+                                                                        <property name="id">wxID_ANY</property>
+                                                                        <property name="max_size"></property>
+                                                                        <property name="maximize_button">0</property>
+                                                                        <property name="maximum_size"></property>
+                                                                        <property name="min_size"></property>
+                                                                        <property name="minimize_button">0</property>
+                                                                        <property name="minimum_size">80,-1</property>
+                                                                        <property name="moveable">1</property>
+                                                                        <property name="name">m_pFieldCombo</property>
+                                                                        <property name="pane_border">1</property>
+                                                                        <property name="pane_position"></property>
+                                                                        <property name="pane_size"></property>
+                                                                        <property name="permission">protected</property>
+                                                                        <property name="pin_button">1</property>
+                                                                        <property name="pos"></property>
+                                                                        <property name="resize">Resizable</property>
+                                                                        <property name="selection">-1</property>
+                                                                        <property name="show">1</property>
+                                                                        <property name="size">80,-1</property>
+                                                                        <property name="style">wxCB_DROPDOWN|wxCB_READONLY</property>
+                                                                        <property name="subclass"></property>
+                                                                        <property name="toolbar_pane">0</property>
+                                                                        <property name="tooltip"></property>
+                                                                        <property name="validator_data_type"></property>
+                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                        <property name="validator_variable"></property>
+                                                                        <property name="value"></property>
+                                                                        <property name="window_extra_style"></property>
+                                                                        <property name="window_name"></property>
+                                                                        <property name="window_style"></property>
+                                                                        <event name="OnChar"></event>
+                                                                        <event name="OnCombobox">OnComboField</event>
+                                                                        <event name="OnEnterWindow"></event>
+                                                                        <event name="OnEraseBackground"></event>
+                                                                        <event name="OnKeyDown"></event>
+                                                                        <event name="OnKeyUp"></event>
+                                                                        <event name="OnKillFocus"></event>
+                                                                        <event name="OnLeaveWindow"></event>
+                                                                        <event name="OnLeftDClick"></event>
+                                                                        <event name="OnLeftDown"></event>
+                                                                        <event name="OnLeftUp"></event>
+                                                                        <event name="OnMiddleDClick"></event>
+                                                                        <event name="OnMiddleDown"></event>
+                                                                        <event name="OnMiddleUp"></event>
+                                                                        <event name="OnMotion"></event>
+                                                                        <event name="OnMouseEvents"></event>
+                                                                        <event name="OnMouseWheel"></event>
+                                                                        <event name="OnPaint"></event>
+                                                                        <event name="OnRightDClick"></event>
+                                                                        <event name="OnRightDown"></event>
+                                                                        <event name="OnRightUp"></event>
+                                                                        <event name="OnSetFocus"></event>
+                                                                        <event name="OnSize"></event>
+                                                                        <event name="OnText"></event>
+                                                                        <event name="OnTextEnter"></event>
+                                                                        <event name="OnUpdateUI"></event>
+                                                                    </object>
+                                                                </object>
+                                                                <object class="sizeritem" expanded="1">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+                                                                    <property name="proportion">1</property>
+                                                                    <object class="wxPanel" expanded="1">
+                                                                        <property name="BottomDockable">1</property>
+                                                                        <property name="LeftDockable">1</property>
+                                                                        <property name="RightDockable">1</property>
+                                                                        <property name="TopDockable">1</property>
+                                                                        <property name="aui_layer"></property>
+                                                                        <property name="aui_name"></property>
+                                                                        <property name="aui_position"></property>
+                                                                        <property name="aui_row"></property>
+                                                                        <property name="best_size"></property>
+                                                                        <property name="bg"></property>
+                                                                        <property name="caption"></property>
+                                                                        <property name="caption_visible">1</property>
+                                                                        <property name="center_pane">0</property>
+                                                                        <property name="close_button">1</property>
+                                                                        <property name="context_help"></property>
+                                                                        <property name="context_menu">1</property>
+                                                                        <property name="default_pane">0</property>
+                                                                        <property name="dock">Dock</property>
+                                                                        <property name="dock_fixed">0</property>
+                                                                        <property name="docking">Left</property>
+                                                                        <property name="enabled">1</property>
+                                                                        <property name="fg"></property>
+                                                                        <property name="floatable">1</property>
+                                                                        <property name="font"></property>
+                                                                        <property name="gripper">0</property>
+                                                                        <property name="hidden">0</property>
+                                                                        <property name="id">wxID_ANY</property>
+                                                                        <property name="max_size"></property>
+                                                                        <property name="maximize_button">0</property>
+                                                                        <property name="maximum_size"></property>
+                                                                        <property name="min_size"></property>
+                                                                        <property name="minimize_button">0</property>
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="moveable">1</property>
+                                                                        <property name="name">m_pSearchPanel</property>
+                                                                        <property name="pane_border">1</property>
+                                                                        <property name="pane_position"></property>
+                                                                        <property name="pane_size"></property>
+                                                                        <property name="permission">protected</property>
+                                                                        <property name="pin_button">1</property>
+                                                                        <property name="pos"></property>
+                                                                        <property name="resize">Resizable</property>
+                                                                        <property name="show">1</property>
+                                                                        <property name="size"></property>
+                                                                        <property name="subclass"></property>
+                                                                        <property name="toolbar_pane">0</property>
+                                                                        <property name="tooltip"></property>
+                                                                        <property name="window_extra_style"></property>
+                                                                        <property name="window_name"></property>
+                                                                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                                        <event name="OnChar"></event>
+                                                                        <event name="OnEnterWindow"></event>
+                                                                        <event name="OnEraseBackground"></event>
+                                                                        <event name="OnKeyDown"></event>
+                                                                        <event name="OnKeyUp"></event>
+                                                                        <event name="OnKillFocus"></event>
+                                                                        <event name="OnLeaveWindow"></event>
+                                                                        <event name="OnLeftDClick"></event>
+                                                                        <event name="OnLeftDown"></event>
+                                                                        <event name="OnLeftUp"></event>
+                                                                        <event name="OnMiddleDClick"></event>
+                                                                        <event name="OnMiddleDown"></event>
+                                                                        <event name="OnMiddleUp"></event>
+                                                                        <event name="OnMotion"></event>
+                                                                        <event name="OnMouseEvents"></event>
+                                                                        <event name="OnMouseWheel"></event>
+                                                                        <event name="OnPaint"></event>
+                                                                        <event name="OnRightDClick"></event>
+                                                                        <event name="OnRightDown"></event>
+                                                                        <event name="OnRightUp"></event>
+                                                                        <event name="OnSetFocus"></event>
+                                                                        <event name="OnSize"></event>
+                                                                        <event name="OnUpdateUI"></event>
+                                                                        <object class="wxBoxSizer" expanded="1">
+                                                                            <property name="minimum_size"></property>
+                                                                            <property name="name">bSizer28</property>
+                                                                            <property name="orient">wxHORIZONTAL</property>
+                                                                            <property name="permission">none</property>
+                                                                            <object class="sizeritem" expanded="0">
+                                                                                <property name="border">5</property>
+                                                                                <property name="flag">wxALL|wxEXPAND</property>
+                                                                                <property name="proportion">1</property>
+                                                                                <object class="wxSearchCtrl" expanded="0">
+                                                                                    <property name="BottomDockable">1</property>
+                                                                                    <property name="LeftDockable">1</property>
+                                                                                    <property name="RightDockable">1</property>
+                                                                                    <property name="TopDockable">1</property>
+                                                                                    <property name="aui_layer"></property>
+                                                                                    <property name="aui_name"></property>
+                                                                                    <property name="aui_position"></property>
+                                                                                    <property name="aui_row"></property>
+                                                                                    <property name="best_size"></property>
+                                                                                    <property name="bg"></property>
+                                                                                    <property name="cancel_button">0</property>
+                                                                                    <property name="caption"></property>
+                                                                                    <property name="caption_visible">1</property>
+                                                                                    <property name="center_pane">0</property>
+                                                                                    <property name="close_button">1</property>
+                                                                                    <property name="context_help"></property>
+                                                                                    <property name="context_menu">1</property>
+                                                                                    <property name="default_pane">0</property>
+                                                                                    <property name="dock">Dock</property>
+                                                                                    <property name="dock_fixed">0</property>
+                                                                                    <property name="docking">Left</property>
+                                                                                    <property name="enabled">1</property>
+                                                                                    <property name="fg"></property>
+                                                                                    <property name="floatable">1</property>
+                                                                                    <property name="font"></property>
+                                                                                    <property name="gripper">0</property>
+                                                                                    <property name="hidden">0</property>
+                                                                                    <property name="id">wxID_ANY</property>
+                                                                                    <property name="max_size"></property>
+                                                                                    <property name="maximize_button">0</property>
+                                                                                    <property name="maximum_size"></property>
+                                                                                    <property name="min_size"></property>
+                                                                                    <property name="minimize_button">0</property>
+                                                                                    <property name="minimum_size"></property>
+                                                                                    <property name="moveable">1</property>
+                                                                                    <property name="name">m_pTextControlField</property>
+                                                                                    <property name="pane_border">1</property>
+                                                                                    <property name="pane_position"></property>
+                                                                                    <property name="pane_size"></property>
+                                                                                    <property name="permission">protected</property>
+                                                                                    <property name="pin_button">1</property>
+                                                                                    <property name="pos"></property>
+                                                                                    <property name="resize">Resizable</property>
+                                                                                    <property name="search_button">1</property>
+                                                                                    <property name="show">1</property>
+                                                                                    <property name="size"></property>
+                                                                                    <property name="style">wxTE_PROCESS_ENTER</property>
+                                                                                    <property name="subclass"></property>
+                                                                                    <property name="toolbar_pane">0</property>
+                                                                                    <property name="tooltip"></property>
+                                                                                    <property name="validator_data_type"></property>
+                                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                                    <property name="validator_variable"></property>
+                                                                                    <property name="value"></property>
+                                                                                    <property name="window_extra_style"></property>
+                                                                                    <property name="window_name"></property>
+                                                                                    <property name="window_style"></property>
+                                                                                    <event name="OnCancelButton">OnCancelClick</event>
+                                                                                    <event name="OnChar"></event>
+                                                                                    <event name="OnEnterWindow"></event>
+                                                                                    <event name="OnEraseBackground"></event>
+                                                                                    <event name="OnKeyDown"></event>
+                                                                                    <event name="OnKeyUp"></event>
+                                                                                    <event name="OnKillFocus"></event>
+                                                                                    <event name="OnLeaveWindow"></event>
+                                                                                    <event name="OnLeftDClick"></event>
+                                                                                    <event name="OnLeftDown"></event>
+                                                                                    <event name="OnLeftUp"></event>
+                                                                                    <event name="OnMiddleDClick"></event>
+                                                                                    <event name="OnMiddleDown"></event>
+                                                                                    <event name="OnMiddleUp"></event>
+                                                                                    <event name="OnMotion"></event>
+                                                                                    <event name="OnMouseEvents"></event>
+                                                                                    <event name="OnMouseWheel"></event>
+                                                                                    <event name="OnPaint"></event>
+                                                                                    <event name="OnRightDClick"></event>
+                                                                                    <event name="OnRightDown"></event>
+                                                                                    <event name="OnRightUp"></event>
+                                                                                    <event name="OnSearchButton">OnBusquedaClick</event>
+                                                                                    <event name="OnSetFocus"></event>
+                                                                                    <event name="OnSize"></event>
+                                                                                    <event name="OnText"></event>
+                                                                                    <event name="OnTextEnter">OnBusquedaClick</event>
+                                                                                    <event name="OnUpdateUI"></event>
+                                                                                </object>
+                                                                            </object>
+                                                                            <object class="sizeritem" expanded="0">
+                                                                                <property name="border">5</property>
+                                                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                                                <property name="proportion">1</property>
+                                                                                <object class="wxStaticText" expanded="0">
+                                                                                    <property name="BottomDockable">1</property>
+                                                                                    <property name="LeftDockable">1</property>
+                                                                                    <property name="RightDockable">1</property>
+                                                                                    <property name="TopDockable">1</property>
+                                                                                    <property name="aui_layer"></property>
+                                                                                    <property name="aui_name"></property>
+                                                                                    <property name="aui_position"></property>
+                                                                                    <property name="aui_row"></property>
+                                                                                    <property name="best_size"></property>
+                                                                                    <property name="bg"></property>
+                                                                                    <property name="caption"></property>
+                                                                                    <property name="caption_visible">1</property>
+                                                                                    <property name="center_pane">0</property>
+                                                                                    <property name="close_button">1</property>
+                                                                                    <property name="context_help"></property>
+                                                                                    <property name="context_menu">1</property>
+                                                                                    <property name="default_pane">0</property>
+                                                                                    <property name="dock">Dock</property>
+                                                                                    <property name="dock_fixed">0</property>
+                                                                                    <property name="docking">Left</property>
+                                                                                    <property name="enabled">1</property>
+                                                                                    <property name="fg"></property>
+                                                                                    <property name="floatable">1</property>
+                                                                                    <property name="font"></property>
+                                                                                    <property name="gripper">0</property>
+                                                                                    <property name="hidden">1</property>
+                                                                                    <property name="id">wxID_ANY</property>
+                                                                                    <property name="label">PACS acquisition is restricted</property>
+                                                                                    <property name="max_size"></property>
+                                                                                    <property name="maximize_button">0</property>
+                                                                                    <property name="maximum_size"></property>
+                                                                                    <property name="min_size"></property>
+                                                                                    <property name="minimize_button">0</property>
+                                                                                    <property name="minimum_size"></property>
+                                                                                    <property name="moveable">1</property>
+                                                                                    <property name="name">m_pLabelRestricted</property>
+                                                                                    <property name="pane_border">1</property>
+                                                                                    <property name="pane_position"></property>
+                                                                                    <property name="pane_size"></property>
+                                                                                    <property name="permission">protected</property>
+                                                                                    <property name="pin_button">1</property>
+                                                                                    <property name="pos"></property>
+                                                                                    <property name="resize">Resizable</property>
+                                                                                    <property name="show">1</property>
+                                                                                    <property name="size"></property>
+                                                                                    <property name="style"></property>
+                                                                                    <property name="subclass"></property>
+                                                                                    <property name="toolbar_pane">0</property>
+                                                                                    <property name="tooltip"></property>
+                                                                                    <property name="window_extra_style"></property>
+                                                                                    <property name="window_name"></property>
+                                                                                    <property name="window_style"></property>
+                                                                                    <property name="wrap">-1</property>
+                                                                                    <event name="OnChar"></event>
+                                                                                    <event name="OnEnterWindow"></event>
+                                                                                    <event name="OnEraseBackground"></event>
+                                                                                    <event name="OnKeyDown"></event>
+                                                                                    <event name="OnKeyUp"></event>
+                                                                                    <event name="OnKillFocus"></event>
+                                                                                    <event name="OnLeaveWindow"></event>
+                                                                                    <event name="OnLeftDClick"></event>
+                                                                                    <event name="OnLeftDown"></event>
+                                                                                    <event name="OnLeftUp"></event>
+                                                                                    <event name="OnMiddleDClick"></event>
+                                                                                    <event name="OnMiddleDown"></event>
+                                                                                    <event name="OnMiddleUp"></event>
+                                                                                    <event name="OnMotion"></event>
+                                                                                    <event name="OnMouseEvents"></event>
+                                                                                    <event name="OnMouseWheel"></event>
+                                                                                    <event name="OnPaint"></event>
+                                                                                    <event name="OnRightDClick"></event>
+                                                                                    <event name="OnRightDown"></event>
+                                                                                    <event name="OnRightUp"></event>
+                                                                                    <event name="OnSetFocus"></event>
+                                                                                    <event name="OnSize"></event>
+                                                                                    <event name="OnUpdateUI"></event>
+                                                                                </object>
+                                                                            </object>
+                                                                            <object class="sizeritem" expanded="0">
+                                                                                <property name="border">5</property>
+                                                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                                                                                <property name="proportion">0</property>
+                                                                                <object class="wxBoxSizer" expanded="0">
+                                                                                    <property name="minimum_size"></property>
+                                                                                    <property name="name">m_pSizerAnimation</property>
+                                                                                    <property name="orient">wxHORIZONTAL</property>
+                                                                                    <property name="permission">protected</property>
+                                                                                </object>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxBoxSizer" expanded="0">
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">bSizer31</property>
+                                                        <property name="orient">wxHORIZONTAL</property>
+                                                        <property name="permission">none</property>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                            <property name="proportion">0</property>
+                                                            <object class="wxStaticText" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font">,90,92,-1,70,0</property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="label">Server</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_pServerLabel</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style"></property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <property name="wrap">-1</property>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                            <property name="proportion">1</property>
+                                                            <object class="wxComboBox" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="choices"></property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font"></property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size">-1,-1</property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_pPACSListaServidores</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="selection">-1</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style">wxCB_READONLY</property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="validator_data_type"></property>
+                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                <property name="validator_variable"></property>
+                                                                <property name="value"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnCombobox">OnPACSChanged</event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnText"></event>
+                                                                <event name="OnTextEnter"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxBOTTOM</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer27</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND|wxRIGHT</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxStaticBoxSizer" expanded="0">
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Date</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">sbSizer2</property>
+                                                        <property name="orient">wxVERTICAL</property>
+                                                        <property name="permission">none</property>
+                                                        <event name="OnUpdateUI"></event>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxEXPAND|wxALL</property>
+                                                            <property name="proportion">1</property>
+                                                            <object class="wxBoxSizer" expanded="0">
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">bSizer17</property>
+                                                                <property name="orient">wxHORIZONTAL</property>
+                                                                <property name="permission">none</property>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND</property>
+                                                                    <property name="proportion">1</property>
+                                                                    <object class="wxBoxSizer" expanded="0">
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">bSizer181</property>
+                                                                        <property name="orient">wxVERTICAL</property>
+                                                                        <property name="permission">none</property>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Any date</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pAnyDate</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style">wxRB_GROUP</property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">1</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Today AM</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pTodayAM</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown">OnKeyDownFormulario</event>
+                                                                                <event name="OnKeyUp"></event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Today PM</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pTodayPM</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Today</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pToday</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND</property>
+                                                                    <property name="proportion">1</property>
+                                                                    <object class="wxBoxSizer" expanded="0">
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">bSizer29</property>
+                                                                        <property name="orient">wxVERTICAL</property>
+                                                                        <property name="permission">none</property>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Yesterday</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pYesterday</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Last 7 days</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pLastWeek</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Last 30 days</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pLastMonth</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Last 3 months</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pLastThreeMonths</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND</property>
+                                                                    <property name="proportion">0</property>
+                                                                    <object class="wxBoxSizer" expanded="0">
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">bSizer201</property>
+                                                                        <property name="orient">wxVERTICAL</property>
+                                                                        <property name="permission">none</property>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Between:</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pBetween</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">5</property>
+                                                                            <property name="flag">wxEXPAND|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxBoxSizer" expanded="0">
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="name">bSizer21</property>
+                                                                                <property name="orient">wxVERTICAL</property>
+                                                                                <property name="permission">none</property>
+                                                                                <object class="sizeritem" expanded="0">
+                                                                                    <property name="border">2</property>
+                                                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                                                    <property name="proportion">0</property>
+                                                                                    <object class="wxDatePickerCtrl" expanded="0">
+                                                                                        <property name="BottomDockable">1</property>
+                                                                                        <property name="LeftDockable">1</property>
+                                                                                        <property name="RightDockable">1</property>
+                                                                                        <property name="TopDockable">1</property>
+                                                                                        <property name="aui_layer"></property>
+                                                                                        <property name="aui_name"></property>
+                                                                                        <property name="aui_position"></property>
+                                                                                        <property name="aui_row"></property>
+                                                                                        <property name="best_size"></property>
+                                                                                        <property name="bg"></property>
+                                                                                        <property name="caption"></property>
+                                                                                        <property name="caption_visible">1</property>
+                                                                                        <property name="center_pane">0</property>
+                                                                                        <property name="close_button">1</property>
+                                                                                        <property name="context_help"></property>
+                                                                                        <property name="context_menu">1</property>
+                                                                                        <property name="default_pane">0</property>
+                                                                                        <property name="dock">Dock</property>
+                                                                                        <property name="dock_fixed">0</property>
+                                                                                        <property name="docking">Left</property>
+                                                                                        <property name="enabled">1</property>
+                                                                                        <property name="fg"></property>
+                                                                                        <property name="floatable">1</property>
+                                                                                        <property name="font"></property>
+                                                                                        <property name="gripper">0</property>
+                                                                                        <property name="hidden">0</property>
+                                                                                        <property name="id">wxID_ANY</property>
+                                                                                        <property name="max_size"></property>
+                                                                                        <property name="maximize_button">0</property>
+                                                                                        <property name="maximum_size"></property>
+                                                                                        <property name="min_size"></property>
+                                                                                        <property name="minimize_button">0</property>
+                                                                                        <property name="minimum_size"></property>
+                                                                                        <property name="moveable">1</property>
+                                                                                        <property name="name">m_pTextControlFechaDesde</property>
+                                                                                        <property name="pane_border">1</property>
+                                                                                        <property name="pane_position"></property>
+                                                                                        <property name="pane_size"></property>
+                                                                                        <property name="permission">protected</property>
+                                                                                        <property name="pin_button">1</property>
+                                                                                        <property name="pos"></property>
+                                                                                        <property name="resize">Resizable</property>
+                                                                                        <property name="show">1</property>
+                                                                                        <property name="size"></property>
+                                                                                        <property name="style">wxDP_DEFAULT|wxDP_DROPDOWN</property>
+                                                                                        <property name="subclass"></property>
+                                                                                        <property name="toolbar_pane">0</property>
+                                                                                        <property name="tooltip"></property>
+                                                                                        <property name="validator_data_type"></property>
+                                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                                        <property name="validator_variable"></property>
+                                                                                        <property name="window_extra_style"></property>
+                                                                                        <property name="window_name"></property>
+                                                                                        <property name="window_style"></property>
+                                                                                        <event name="OnChar"></event>
+                                                                                        <event name="OnDateChanged">OnFechaDesdeDateChanged</event>
+                                                                                        <event name="OnEnterWindow"></event>
+                                                                                        <event name="OnEraseBackground"></event>
+                                                                                        <event name="OnKeyDown">OnKeyDownFormulario</event>
+                                                                                        <event name="OnKeyUp"></event>
+                                                                                        <event name="OnKillFocus"></event>
+                                                                                        <event name="OnLeaveWindow"></event>
+                                                                                        <event name="OnLeftDClick"></event>
+                                                                                        <event name="OnLeftDown"></event>
+                                                                                        <event name="OnLeftUp"></event>
+                                                                                        <event name="OnMiddleDClick"></event>
+                                                                                        <event name="OnMiddleDown"></event>
+                                                                                        <event name="OnMiddleUp"></event>
+                                                                                        <event name="OnMotion"></event>
+                                                                                        <event name="OnMouseEvents"></event>
+                                                                                        <event name="OnMouseWheel"></event>
+                                                                                        <event name="OnPaint"></event>
+                                                                                        <event name="OnRightDClick"></event>
+                                                                                        <event name="OnRightDown"></event>
+                                                                                        <event name="OnRightUp"></event>
+                                                                                        <event name="OnSetFocus"></event>
+                                                                                        <event name="OnSize"></event>
+                                                                                        <event name="OnUpdateUI"></event>
+                                                                                    </object>
+                                                                                </object>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">5</property>
+                                                                            <property name="flag">wxEXPAND|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxBoxSizer" expanded="0">
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="name">bSizer22</property>
+                                                                                <property name="orient">wxVERTICAL</property>
+                                                                                <property name="permission">none</property>
+                                                                                <object class="sizeritem" expanded="0">
+                                                                                    <property name="border">2</property>
+                                                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                                                    <property name="proportion">0</property>
+                                                                                    <object class="wxDatePickerCtrl" expanded="0">
+                                                                                        <property name="BottomDockable">1</property>
+                                                                                        <property name="LeftDockable">1</property>
+                                                                                        <property name="RightDockable">1</property>
+                                                                                        <property name="TopDockable">1</property>
+                                                                                        <property name="aui_layer"></property>
+                                                                                        <property name="aui_name"></property>
+                                                                                        <property name="aui_position"></property>
+                                                                                        <property name="aui_row"></property>
+                                                                                        <property name="best_size"></property>
+                                                                                        <property name="bg"></property>
+                                                                                        <property name="caption"></property>
+                                                                                        <property name="caption_visible">1</property>
+                                                                                        <property name="center_pane">0</property>
+                                                                                        <property name="close_button">1</property>
+                                                                                        <property name="context_help"></property>
+                                                                                        <property name="context_menu">1</property>
+                                                                                        <property name="default_pane">0</property>
+                                                                                        <property name="dock">Dock</property>
+                                                                                        <property name="dock_fixed">0</property>
+                                                                                        <property name="docking">Left</property>
+                                                                                        <property name="enabled">1</property>
+                                                                                        <property name="fg"></property>
+                                                                                        <property name="floatable">1</property>
+                                                                                        <property name="font"></property>
+                                                                                        <property name="gripper">0</property>
+                                                                                        <property name="hidden">0</property>
+                                                                                        <property name="id">wxID_ANY</property>
+                                                                                        <property name="max_size"></property>
+                                                                                        <property name="maximize_button">0</property>
+                                                                                        <property name="maximum_size"></property>
+                                                                                        <property name="min_size"></property>
+                                                                                        <property name="minimize_button">0</property>
+                                                                                        <property name="minimum_size"></property>
+                                                                                        <property name="moveable">1</property>
+                                                                                        <property name="name">m_pTextControlFechaHasta</property>
+                                                                                        <property name="pane_border">1</property>
+                                                                                        <property name="pane_position"></property>
+                                                                                        <property name="pane_size"></property>
+                                                                                        <property name="permission">protected</property>
+                                                                                        <property name="pin_button">1</property>
+                                                                                        <property name="pos"></property>
+                                                                                        <property name="resize">Resizable</property>
+                                                                                        <property name="show">1</property>
+                                                                                        <property name="size"></property>
+                                                                                        <property name="style">wxDP_DEFAULT|wxDP_DROPDOWN</property>
+                                                                                        <property name="subclass"></property>
+                                                                                        <property name="toolbar_pane">0</property>
+                                                                                        <property name="tooltip"></property>
+                                                                                        <property name="validator_data_type"></property>
+                                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                                        <property name="validator_variable"></property>
+                                                                                        <property name="window_extra_style"></property>
+                                                                                        <property name="window_name"></property>
+                                                                                        <property name="window_style"></property>
+                                                                                        <event name="OnChar"></event>
+                                                                                        <event name="OnDateChanged">OnFechaHastaDateChanged</event>
+                                                                                        <event name="OnEnterWindow"></event>
+                                                                                        <event name="OnEraseBackground"></event>
+                                                                                        <event name="OnKeyDown">OnKeyDownFormulario</event>
+                                                                                        <event name="OnKeyUp"></event>
+                                                                                        <event name="OnKillFocus"></event>
+                                                                                        <event name="OnLeaveWindow"></event>
+                                                                                        <event name="OnLeftDClick"></event>
+                                                                                        <event name="OnLeftDown"></event>
+                                                                                        <event name="OnLeftUp"></event>
+                                                                                        <event name="OnMiddleDClick"></event>
+                                                                                        <event name="OnMiddleDown"></event>
+                                                                                        <event name="OnMiddleUp"></event>
+                                                                                        <event name="OnMotion"></event>
+                                                                                        <event name="OnMouseEvents"></event>
+                                                                                        <event name="OnMouseWheel"></event>
+                                                                                        <event name="OnPaint"></event>
+                                                                                        <event name="OnRightDClick"></event>
+                                                                                        <event name="OnRightDown"></event>
+                                                                                        <event name="OnRightUp"></event>
+                                                                                        <event name="OnSetFocus"></event>
+                                                                                        <event name="OnSize"></event>
+                                                                                        <event name="OnUpdateUI"></event>
+                                                                                    </object>
+                                                                                </object>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND|wxLEFT</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxStaticBoxSizer" expanded="0">
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Modalities</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">sbSizer3</property>
+                                                        <property name="orient">wxVERTICAL</property>
+                                                        <property name="permission">none</property>
+                                                        <event name="OnUpdateUI"></event>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxEXPAND|wxALL</property>
+                                                            <property name="proportion">1</property>
+                                                            <object class="wxGridSizer" expanded="0">
+                                                                <property name="cols">5</property>
+                                                                <property name="hgap">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">m_pModalitySizer</property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="rows">0</property>
+                                                                <property name="vgap">0</property>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxBoxSizer" expanded="1">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pDataViewSizer</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">protected</property>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxBoxSizer" expanded="1">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer20</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="1">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Stored queries</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText6</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxComboBox" expanded="1">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="choices"></property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size">200,-1</property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pComboQueries</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="selection">-1</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxCB_DROPDOWN|wxCB_READONLY</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value">Select stored queries...</property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCombobox">OnComboStoredQueriesClick</event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="CustomControl" expanded="1">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="class">wxGinkgoToolBar</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="construction">m_pStoredQueriesButtonBar = new wxGinkgoToolBar(m_pPanelPACS, wxID_ANY);</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="declaration">wxGinkgoToolBar* m_pStoredQueriesButtonBar;</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="include">#include<wx/wxginkgotoolbar.h></property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pStoredQueriesButtonBar</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="settings"></property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="spacer" expanded="0">
+                                                        <property name="height">0</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="width">0</property>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxButton" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default">0</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">0</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Link</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pBLink</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip">Available only in WADO servers</property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnButtonClick">OnLinkClick</event>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_BOTTOM|wxALIGN_RIGHT|wxTOP|wxLEFT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxButton" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default">0</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">0</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Download</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pBDescargar</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnButtonClick">OnDescargarClick</event>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxButton" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default">0</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">1</property>
+                                                        <property name="id">wxID_CANCEL</property>
+                                                        <property name="label">Close</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pBotonClose</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnButtonClick">OnCloseClick</event>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">285,164</property>
+            <property name="name">DialogoNotFoundBase</property>
+            <property name="pos"></property>
+            <property name="size"></property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass"></property>
+            <property name="title">Not found</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer12</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel5</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Series does not exist</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer13</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">These series have been deleted from the local history</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticText10</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">440</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">0</property>
+                                <property name="flag">wxEXPAND|wxTOP</property>
+                                <property name="proportion">1</property>
+                                <object class="wxListBox" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="choices"></property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pListaSeries</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">public</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnListBox"></event>
+                                    <event name="OnListBoxDClick"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelOkCancel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">public</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer14</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Continue</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pButtonOk</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">public</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pButtonCancel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">public</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelOk</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">public</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer16</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Ok</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button10</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">415,300</property>
+            <property name="name">DownloadAgainDialogBase</property>
+            <property name="pos"></property>
+            <property name="size"></property>
+            <property name="style">wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">Download again</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Download again</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer141</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pFormPanel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Download again</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer19</property>
+                                        <property name="orient">wxHORIZONTAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label"></property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabelMessage</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">350</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel6</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer14</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">0</property>
+                                <property name="flag"></property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Open</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button9</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnOpenClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Download</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pButtonOk</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBotonCancelar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">415,250</property>
+            <property name="name">QueryNameDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">415,250</property>
+            <property name="style">wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">Set query name</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Set query name</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer141</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pFormPanel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Set query name</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer19</property>
+                                        <property name="orient">wxHORIZONTAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Set query name</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabelMessage</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">350</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pQueryName</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel6</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer14</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">0</property>
+                                <property name="flag"></property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="1">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Ok</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pButtonOk</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnOkClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBotonCancelar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/acquisition/acquisitiontablemodel.cpp b/cadxcore/main/gui/acquisition/acquisitiontablemodel.cpp
new file mode 100644
index 0000000..d1474f0
--- /dev/null
+++ b/cadxcore/main/gui/acquisition/acquisitiontablemodel.cpp
@@ -0,0 +1,607 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "acquisitiontablemodel.h"
+#include <main/controllers/controladorlog.h>
+#include <api/dicom/dcmdictionary.h>
+#include <set>
+#include <wx/imaglist.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/dicom/imodelodicom.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/storedqueriescontroller.h>
+#include <main/controllers/controladoreventos.h>
+#include <commands/pacsdownloadcommand.h>
+#include <commands/comandopacs.h>
+#include <eventos/progresocomando.h>
+
+#define ICONO_ESTUDIO 0
+#define ICONO_SERIE 1
+#define ICONO_HOMBRE 2
+#define ICONO_MUJER 3
+#define ICONO_OTRO 4
+
+#define SIZE_ICONOS 16
+
+#define LOGGER "ACQUISITIONTABLEMODEL"
+
+GNC::GUI::AcquisitionNode::AcquisitionNode(AcquisitionNode* parent, const GNC::GCS::Ptr<GIL::DICOM::DicomDataset> info):
+        pData(info),
+        pParent(parent)
+
+{
+        if (IsSeriesNode()) {
+                uid = pData->getTag(GKDCM_SeriesInstanceUID);
+                SetDateTime(pData->getTag(GKDCM_SeriesDate),pData->getTag(GKDCM_SeriesTime));
+        } else {
+                uid = pData->getTag(GKDCM_StudyInstanceUID);
+                SetDateTime(pData->getTag(GKDCM_StudyDate),pData->getTag(GKDCM_StudyTime));
+        }
+        if (uid.empty()) {
+                LOG_ERROR(LOGGER, "trying to insert a node without uid");
+        }
+}
+
+GNC::GUI::AcquisitionNode::~AcquisitionNode()
+{
+        DestroyChildren();
+}
+
+bool GNC::GUI::AcquisitionNode::IsSeriesNode()
+{
+        return pParent != NULL;
+}
+
+bool GNC::GUI::AcquisitionNode::IsStudyNode()
+{
+        return pParent == NULL;
+}
+
+void GNC::GUI::AcquisitionNode::AddChild(AcquisitionNode* pChild)
+{
+        seriesMap[pChild->uid] = pChild;
+}
+
+const GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& GNC::GUI::AcquisitionNode::GetData()
+{
+        return pData;
+}
+
+void GNC::GUI::AcquisitionNode::DestroyChildren()
+{
+        for (TMapIndex::iterator it = seriesMap.begin(); it !=  seriesMap.end(); ++it) {
+                delete (*it).second;
+        }
+        seriesMap.clear();
+}
+
+
+GNC::GUI::AcquisitionNode* GNC::GUI::AcquisitionNode::GetParent()
+{
+        return pParent;
+}
+
+
+unsigned int GNC::GUI::AcquisitionNode::GetChildren(wxDataViewItemArray &array )
+{
+        if (IsSeriesNode()) {
+                return 0;
+        } else {
+                for (TMapIndex::const_iterator it = seriesMap.begin(); it != seriesMap.end(); ++it) {
+                        array.Add( wxDataViewItem( (void*) (*it).second) );
+                }
+                return seriesMap.size();
+        }
+}
+
+void GNC::GUI::AcquisitionNode::SetDateTime(const std::string& strDate, const std::string& strTime)
+{
+        wxDateTime fecha;
+        wxDateTime hora;
+        hora.ParseFormat( wxString::FromUTF8( strTime.c_str() ).GetData(), wxT("%H%M%S"), wxDefaultDateTime);
+        fecha.ParseFormat( wxString::FromUTF8( strDate.c_str() ).GetData(), wxT("%Y%m%d"), wxDefaultDateTime);
+        if(fecha.IsValid()) {
+                if (hora.IsValid()) {
+
+                        fecha.SetHour(hora.GetHour());
+                        fecha.SetMinute(hora.GetMinute());
+                        fecha.SetSecond(hora.GetSecond());
+
+                        datetime = fecha.Format(_("%m/%d/%Y %H:%M:%S"), wxDateTime::TimeZone(wxDateTime::GMT1)).ToUTF8();
+                } else {
+                        datetime = fecha.Format(_("%m/%d/%Y 00:00:00"), wxDateTime::TimeZone(wxDateTime::GMT1)).ToUTF8();
+                }
+        } else {
+                datetime = wxString(wxT("00/00/0000 00:00:00")).ToUTF8();;
+        }
+}
+
+
+/////////////////////////////
+GNC::GUI::AcquisitionTableModel::AcquisitionTableModel():
+        m_pComandoPACS(NULL),
+        m_Mode(MM_SERIES)
+{
+        m_pImageList = new wxImageList(SIZE_ICONOS,SIZE_ICONOS,true);
+        m_pImageList->Add(GinkgoResourcesManager::History::GetIcoEstudio());
+        m_pImageList->Add(GinkgoResourcesManager::History::GetIcoSerie());
+        m_pImageList->Add(GinkgoResourcesManager::History::GetIcoHombre());
+        m_pImageList->Add(GinkgoResourcesManager::History::GetIcoMujer());
+        m_pImageList->Add(GinkgoResourcesManager::History::GetIcoOtro());
+        GNC::GCS::ControladorEventos::Instance()->Registrar(this, GNC::GCS::Events::EventoProgresoComando());
+}
+
+
+GNC::GUI::AcquisitionTableModel::~AcquisitionTableModel()
+{
+        ClearStudyMap();
+        delete m_pImageList;
+}
+
+unsigned int GNC::GUI::AcquisitionTableModel::GetColumnCount() const
+{
+        return COL_ACQUISITION_MAX;
+}
+
+
+wxString GNC::GUI::AcquisitionTableModel::GetColumnType( unsigned int col ) const
+{
+        switch (col) {
+        case COL_ICON:
+                return wxT("wxIcon");
+        default:
+                return wxT("string");
+        }
+}
+
+void GNC::GUI::AcquisitionTableModel::GetValue( wxVariant &variant, const wxDataViewItem &item, unsigned int col ) const
+{
+        if (!item.IsOk()) {
+                return;
+        }
+
+        AcquisitionNode* pNode = (AcquisitionNode*)(item.GetID());
+        if (pNode->IsSeriesNode()) {
+                switch (col) {
+                case COL_ICON: {
+                        variant << m_pImageList->GetIcon(ICONO_SERIE);
+                }
+                break;
+                case COL_PATIENT_NAME: {
+                        //nothing to do
+                }
+                break;
+                case COL_PATIENT_ID: {
+                        //nothing to do
+                }
+                break;
+                case COL_DESCRIPTION:
+                        variant = wxString::FromUTF8(pNode->GetData()->getTag(GKDCM_SeriesDescription).c_str());
+                        break;
+                case COL_MODALITY:
+                        variant = wxString::FromUTF8(pNode->GetData()->getTag(GKDCM_Modality).c_str());
+                        break;
+                case COL_DATETIME: {
+                        variant = wxString::FromUTF8(pNode->datetime.c_str());
+                }
+                break;
+                case COL_ACCNUMBER:
+                        //nothing to do
+                        break;
+                default:
+                        LOG_ERROR("AcquisitionTableModel", "wrong column id " << col);
+                        break;
+                }
+        } else {
+                switch (col) {
+                case COL_ICON: {
+                        int icono = 0;
+                        if(pNode->GetData()->getTag(GKDCM_PatientSex) == "M") {
+                                icono = ICONO_HOMBRE;
+                        } else if(pNode->GetData()->getTag(GKDCM_PatientSex) == "F") {
+                                icono = ICONO_MUJER;
+                        } else {
+                                icono = ICONO_OTRO;
+                        }
+                        variant << m_pImageList->GetIcon(icono);
+                }
+                break;
+                case COL_PATIENT_NAME:
+                        variant = wxString::FromUTF8(pNode->GetData()->getTag(GKDCM_PatientName).c_str());
+                        break;
+                case COL_PATIENT_ID:
+                        variant = wxString::FromUTF8(pNode->GetData()->getTag(GKDCM_PatientID).c_str());
+                        break;
+                case COL_DESCRIPTION:
+                        variant = wxString::FromUTF8(pNode->GetData()->getTag(GKDCM_StudyDescription).c_str());
+                        break;
+                case COL_MODALITY:
+                        variant = wxString::FromUTF8(pNode->GetData()->getTag(GKDCM_ModalitiesInStudy).c_str());
+                        break;
+                case COL_DATETIME: {
+                        variant = wxString::FromUTF8(pNode->datetime.c_str());
+                }
+                break;
+                case COL_ACCNUMBER:
+                        variant = wxString::FromUTF8(pNode->GetData()->getTag(GKDCM_AccessionNumber).c_str());
+                        break;
+                default:
+                        LOG_ERROR("AcquisitionTableModel", "wrong column id " << col);
+                        break;
+                }
+        }
+
+}
+
+
+
+bool GNC::GUI::AcquisitionTableModel::SetValue( const wxVariant &/*variant*/,const wxDataViewItem &/*item*/, unsigned int /*col*/ )
+{
+        //model cant be modified...
+        return false;
+}
+
+bool GNC::GUI::AcquisitionTableModel::IsEnabled( const wxDataViewItem &/*item*/, unsigned int/* col*/ ) const
+{
+        return true;
+}
+
+wxDataViewItem GNC::GUI::AcquisitionTableModel::GetParent( const wxDataViewItem &item ) const
+{
+        if (!item.IsOk()) {
+                return wxDataViewItem(0);
+        }
+        //if it's a study...
+        AcquisitionNode* pNode = (AcquisitionNode*)(item.GetID());
+        return wxDataViewItem( (void*) pNode->GetParent() );
+}
+
+bool GNC::GUI::AcquisitionTableModel::IsContainer( const wxDataViewItem &item ) const
+{
+        if (!item.IsOk()) {
+                return true;
+        }
+        AcquisitionNode* pNode = (AcquisitionNode*)(item.GetID());
+        return m_Mode == MM_SERIES && pNode->IsStudyNode();
+}
+
+bool GNC::GUI::AcquisitionTableModel::HasContainerColumns (const wxDataViewItem &/*item*/) const
+{
+        return true;
+}
+
+bool GNC::GUI::AcquisitionTableModel::HasValue (const wxDataViewItem &item, unsigned col) const
+{
+        if (!item.IsOk()) {
+                return false;
+        }
+        AcquisitionNode* pNode = (AcquisitionNode*)(item.GetID());
+        if (pNode->IsStudyNode()) {
+                return true;
+        } else {
+                return col != COL_PATIENT_NAME && col != COL_PATIENT_ID && col != COL_ACCNUMBER;
+        }
+}
+
+
+unsigned int GNC::GUI::AcquisitionTableModel::GetChildren( const wxDataViewItem &parent, wxDataViewItemArray &array ) const
+{
+        AcquisitionNode *node = (AcquisitionNode*) parent.GetID();
+        if (!node) {
+                unsigned int count = studyMap.size();
+                for (TMapIndex::const_iterator it = studyMap.begin(); it !=  studyMap.end(); ++it) {
+                        array.Add( wxDataViewItem( (void*) (*it).second) );
+                }
+                return count;
+        } else if (node->IsStudyNode()) {
+                //return series from study...
+                node->GetChildren(array);
+                return array.Count();
+        }
+        return 0;
+}
+
+int GNC::GUI::AcquisitionTableModel::Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
+                unsigned int column, bool ascending ) const
+{
+        if (column == COL_DATETIME) {
+                wxVariant value1, value2;
+                GetValue( value1, item1, column );
+                GetValue( value2, item2, column );
+
+                wxString str1 = value1.GetString();
+                wxString str2 = value2.GetString();
+
+                wxDateTime date1,date2;
+                date1.ParseFormat(str1, _("%m/%d/%Y %H:%M:%S"));
+                date2.ParseFormat(str2, _("%m/%d/%Y %H:%M:%S"));
+                int res = 0;
+                if (date1.IsValid() && date2.IsValid()) {
+                        wxTimeSpan diff = date1.Subtract(date2);
+                        if (diff.IsPositive()) {
+                                res = 1;
+                        } else {
+                                res = -1;
+                        }
+                } else if (date1.IsValid()) {
+                        res = 1;
+                } else if (date2.IsValid()) {
+                        res =-1;
+                } else {
+                        res = 0;
+                }
+                if (!ascending) {
+                        if (res == 1) {
+                                res = -1;
+                        } else if (res == -1) {
+                                res = 1;
+                        }
+                }
+                return res;
+        }
+
+        return wxDataViewModel::Compare( item1, item2, column, ascending );
+}
+
+void GNC::GUI::AcquisitionTableModel::CancelCommand()
+{
+        if(m_pComandoPACS != NULL) {
+                GNC::CommandController::Instance()->AbortarComando(m_pComandoPACS, false);
+        }
+}
+
+void GNC::GUI::AcquisitionTableModel::ClearResults()
+{
+        CancelCommand();
+
+        wxDataViewItemArray toDeleteList;
+        for (TMapIndex::iterator it = studyMap.begin(); it !=  studyMap.end(); ++it) {
+                toDeleteList.push_back(wxDataViewItem((*it).second));
+        }
+        //then delete studies Nodes...
+        ItemsDeleted(wxDataViewItem(0), toDeleteList);
+
+        //delete all and reload again...
+        ClearStudyMap();
+}
+
+GNC::GUI::AcquisitionTableModel::T_ModelMode GNC::GUI::AcquisitionTableModel::GetModelMode()
+{
+        return m_Mode;
+}
+
+void GNC::GUI::AcquisitionTableModel::SetModelMode(T_ModelMode mode)
+{
+        m_Mode = mode;
+}
+
+void GNC::GUI::AcquisitionTableModel::DoSearch(const GNC::GCS::Ptr<GNC::GCS::StoredQuery>& pQuery)
+{
+        ClearResults();
+        //insert fields that has to be returned...
+        pQuery->addCondition(GKDCM_QueryRetrieveLevel,"STUDY");
+        pQuery->addConditionIfNotExists(GKDCM_PatientName);
+        pQuery->addConditionIfNotExists(GKDCM_PatientID);
+        pQuery->addConditionIfNotExists(GKDCM_ModalitiesInStudy);
+        pQuery->addConditionIfNotExists(GKDCM_PatientBirthDate);
+        pQuery->addConditionIfNotExists(GKDCM_PatientSex);
+        pQuery->addConditionIfNotExists(GKDCM_StudyDate);
+        pQuery->addConditionIfNotExists(GKDCM_StudyTime);
+        pQuery->addConditionIfNotExists(GKDCM_StudyID);
+        pQuery->addConditionIfNotExists(GKDCM_StudyInstanceUID);
+        pQuery->addConditionIfNotExists(GKDCM_StudyDescription);
+        pQuery->addConditionIfNotExists(GKDCM_AccessionNumber);
+        pQuery->addConditionIfNotExists(GKDCM_StationName);
+        pQuery->addConditionIfNotExists(GKDCM_ReferringPhysicianName);
+
+        GADAPI::ComandoPACSParams * pParams = new GADAPI::ComandoPACSParams(pQuery);
+
+
+        m_pComandoPACS = new GADAPI::ComandoPACS(pParams);
+        GNC::CommandController::Instance()->ProcessAsync(_Std("Exploring PACS..."),m_pComandoPACS, this);
+}
+
+void GNC::GUI::AcquisitionTableModel::DoExpand(AcquisitionNode* pNode, const std::string& modalities, const std::string& server)
+{
+        if (pNode->IsSeriesNode()) {
+                return;
+        }
+        wxDataViewItemArray arr;
+        pNode->GetChildren(arr);
+        if (arr.empty() && !pNode->uid.empty()) {
+                GNC::GCS::Ptr<GNC::GCS::StoredQuery> pQuery(new GNC::GCS::StoredQuery());
+                pQuery->setPacsId(server);
+                //insert fields that has to be returned...
+                pQuery->addCondition(GKDCM_QueryRetrieveLevel,"SERIES");
+                pQuery->addConditionIfNotExists(GKDCM_StudyInstanceUID, pNode->uid);
+                pQuery->addCondition(GKDCM_Modality, modalities);
+                pQuery->addConditionIfNotExists(GKDCM_SeriesInstanceUID);
+                pQuery->addConditionIfNotExists(GKDCM_SeriesDescription);
+                pQuery->addConditionIfNotExists(GKDCM_SeriesDate);
+                pQuery->addConditionIfNotExists(GKDCM_SeriesTime);
+                pQuery->addConditionIfNotExists(GKDCM_NumberOfSeriesRelatedInstances);
+                pQuery->addConditionIfNotExists(GKDCM_ReferringPhysicianName);
+
+                GADAPI::ComandoPACSParams * pParams = new GADAPI::ComandoPACSParams(pQuery);
+                m_pComandoPACS = new GADAPI::ComandoPACS(pParams);
+                GNC::CommandController::Instance()->ProcessAsync(_Std("Exploring PACS..."),m_pComandoPACS, this);
+        }
+}
+
+std::string GNC::GUI::AcquisitionTableModel::GetModality(AcquisitionNode* pNode)
+{
+        std::string mod;
+        if (pNode->IsSeriesNode()) {
+                mod =pNode->GetData()->getTag(GKDCM_Modality);
+        } else {
+                mod =pNode->GetData()->getTag(GKDCM_ModalitiesInStudy);
+        }
+        return mod;
+}
+
+void GNC::GUI::AcquisitionTableModel::GetProperties(AcquisitionNode* pNode, GNC::GUI::wxPropiedades::TListaMapasPropiedades& properties)
+{
+        AcquisitionNode* pStudyNode;
+        if (pNode->IsSeriesNode()) {
+                pStudyNode = pNode->GetParent();
+        } else {
+                pStudyNode = pNode;
+        }
+
+        const GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& dataSet = pStudyNode->GetData();
+        {
+                //patient
+                GNC::GUI::wxPropiedades::TMapaPropiedades mapaPropiedades;
+                mapaPropiedades[_Std("Patient id")] = dataSet->getTag(GKDCM_PatientID);
+                mapaPropiedades[_Std("Patient name")] = dataSet->getTag(GKDCM_PatientName);
+                properties.push_back(mapaPropiedades);
+        }
+        {
+                //study
+                GNC::GUI::wxPropiedades::TMapaPropiedades mapaPropiedades;
+                mapaPropiedades[_Std("Study Instance UID")] = dataSet->getTag(GKDCM_StudyInstanceUID);
+                mapaPropiedades[_Std("Accession number")] = dataSet->getTag(GKDCM_AccessionNumber);
+                mapaPropiedades[_Std("Study date")] = dataSet->getTag(GKDCM_StudyDate);
+                mapaPropiedades[_Std("Study time")] = dataSet->getTag(GKDCM_StudyTime);
+                properties.push_back(mapaPropiedades);
+        }
+        if (pNode->IsSeriesNode()) {
+                //series
+                const GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& seriesDs = pNode->GetData();
+
+                GNC::GUI::wxPropiedades::TMapaPropiedades mapaPropiedades;
+                mapaPropiedades[_Std("Series Instance UID")] = seriesDs->getTag(GKDCM_SeriesInstanceUID);
+                mapaPropiedades[_Std("Modality")] = seriesDs->getTag(GKDCM_Modality);
+                mapaPropiedades[_Std("Series date")] = seriesDs->getTag(GKDCM_SeriesDate);
+                mapaPropiedades[_Std("Series time")] = seriesDs->getTag(GKDCM_SeriesTime);
+                properties.push_back(mapaPropiedades);
+        }
+}
+
+//region realizacion de la interfaz IComandoPACSNotificador
+void GNC::GUI::AcquisitionTableModel::ReloadModel(std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >& results)
+{
+        //RELOAD MODEL FROM IMODELODICOM...
+        if (!studyMap.empty()) {
+                wxDataViewItemArray toDeleteList;
+                for (TMapIndex::iterator it = studyMap.begin(); it !=  studyMap.end(); ++it) {
+                        toDeleteList.push_back(wxDataViewItem((*it).second));
+                }
+                //then delete studies Nodes...
+                ItemsDeleted(wxDataViewItem(0), toDeleteList);
+
+                //delete all and reload again...
+                ClearStudyMap();
+        }
+        Cleared();
+
+        wxDataViewItemArray addList;
+        if(results.size() == 0) {
+                //add a virtual item...
+                GNC::GCS::Ptr<GIL::DICOM::DicomDataset> pDataset(new GIL::DICOM::DicomDataset());
+                pDataset->tags[GKDCM_PatientName] = _Std("No results found");
+                pDataset->tags[GKDCM_StudyInstanceUID] = "";
+                pDataset->secuencias.push_back(GIL::DICOM::DicomDataset());//dummy
+                AcquisitionNode* pNode = new AcquisitionNode(NULL, pDataset);
+                studyMap[pNode->uid] = pNode;
+                addList.push_back(wxDataViewItem((void*)pNode));
+        } else {
+                for (std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >::iterator it = results.begin(); it != results.end(); ++it) {
+                        std::string studyUID = (*it)->getTag(GKDCM_StudyInstanceUID);
+                        if (studyMap.find(studyUID) == studyMap.end()) {
+                                AcquisitionNode* pNode = new AcquisitionNode(NULL, (*it));
+                                studyMap[pNode->uid] = pNode;
+                                addList.push_back(wxDataViewItem((void*)pNode));
+                        }
+                }
+        }
+
+        ItemsAdded(wxDataViewItem(0), addList);
+}
+
+void GNC::GUI::AcquisitionTableModel::ReloadModel(const std::string& studyUID, std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >& results)
+{
+        if (studyMap.find(studyUID) != studyMap.end()) {
+                AcquisitionNode* pStudyNode = studyMap[studyUID];
+                wxDataViewItemArray arr;
+                pStudyNode->GetChildren(arr);
+                if (!arr.empty()) {
+                        ItemsDeleted(wxDataViewItem(pStudyNode), arr);
+                        pStudyNode->DestroyChildren();
+                }
+
+                if(!results.empty()) {
+                        for (std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >::iterator it = results.begin(); it != results.end(); ++it) {
+                                AcquisitionNode* pSeriesNode = new AcquisitionNode(pStudyNode, (*it));
+                                pStudyNode->AddChild(pSeriesNode);
+                        }
+                        arr.clear();
+                        pStudyNode->GetChildren(arr);
+                        if (!arr.empty()) {
+                                ItemsAdded(wxDataViewItem(pStudyNode), arr);
+                        }
+                }
+        }
+}
+
+//endregion
+
+void GNC::GUI::AcquisitionTableModel::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        GNC::GCS::Events::EventoProgresoComando* pEvt = dynamic_cast<GNC::GCS::Events::EventoProgresoComando*> (evt);
+        if (pEvt == NULL  || pEvt->GetComando() == NULL) {
+                return;
+        }
+
+        switch (pEvt->GetTipo()) {
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Iniciado:
+                break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Progreso:
+                break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Unknown:
+                break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado:
+                GNC::GCS::IComando* pCmd = pEvt->GetComando();
+                if (pCmd->GetOwner() == this) {
+                        if ( pCmd == m_pComandoPACS ) {
+                                m_pComandoPACS = NULL;
+                                GADAPI::ComandoPACSParams* pParams = dynamic_cast<GADAPI::ComandoPACSParams*>(pCmd->GetParams());
+                                if (pParams != NULL) {
+                                        GNC::GCS::Ptr<GNC::GCS::Condition> cond = pParams->pQuery->getCondition(GKDCM_StudyInstanceUID);
+                                        if (studyMap.empty() || !cond.IsValid() || cond->getValue().empty()) {
+                                                ReloadModel(*pParams->m_apResults);
+                                        } else {
+                                                ReloadModel(cond->getValue(), *pParams->m_apResults);
+                                        }
+                                }
+                        }
+                }
+                break;
+
+        }
+}
+
+void GNC::GUI::AcquisitionTableModel::ClearStudyMap()
+{
+        for (TMapIndex::iterator it = studyMap.begin(); it !=  studyMap.end(); ++it) {
+                delete (*it).second;
+        }
+        studyMap.clear();
+}
diff --git a/cadxcore/main/gui/acquisition/acquisitiontablemodel.h b/cadxcore/main/gui/acquisition/acquisitiontablemodel.h
new file mode 100644
index 0000000..110a53f
--- /dev/null
+++ b/cadxcore/main/gui/acquisition/acquisitiontablemodel.h
@@ -0,0 +1,142 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <main/controllers/historycontroller.h>
+#include <api/dicom/imodelodicom.h>
+#include <api/observers/ieventsobserver.h>
+#include <wx/dynarray.h>
+#include <wx/dataview.h>
+#include <prvext/prvext.h>
+#include <wx/propiedades/wxpropiedades.h>
+#include <api/ilock.h>
+#include <api/autoptr.h>
+
+#define COL_ICON			0
+#define COL_PATIENT_NAME	1
+#define COL_PATIENT_ID		2
+#define COL_DESCRIPTION		3
+#define COL_MODALITY		4
+#define COL_DATETIME		5
+#define COL_ACCNUMBER	6
+#define COL_ACQUISITION_MAX	7
+
+namespace GADAPI
+{
+class ComandoPACS;
+}
+
+class wxImageList;
+namespace GNC
+{
+namespace GCS
+{
+class StoredQuery;
+}
+namespace GUI
+{
+class AcquisitionNode: GNC::GCS::ILockable
+{
+public:
+        AcquisitionNode(AcquisitionNode* parent, const GNC::GCS::Ptr<GIL::DICOM::DicomDataset> pInfo);
+        virtual ~AcquisitionNode();
+
+        bool IsSeriesNode();
+        bool IsStudyNode();
+
+        void AddChild(AcquisitionNode* pChild);
+        void DestroyChildren();
+
+        const GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& GetData();
+
+        AcquisitionNode* GetParent();
+
+        virtual unsigned int GetChildren(wxDataViewItemArray &array) ;
+
+        void SetDateTime(const std::string& strDate, const std::string& strTime);
+
+        typedef std::map<std::string, AcquisitionNode*> TMapIndex;
+        TMapIndex seriesMap;
+        std::string datetime;
+        std::string uid;
+
+        GNC::GCS::Ptr<GIL::DICOM::DicomDataset> pData;
+
+        AcquisitionNode* pParent;
+};
+
+
+class AcquisitionTableModel: public wxDataViewModel, public GNC::GCS::IEventsObserver
+{
+public:
+        typedef enum T_ModelMode {
+                MM_SERIES,
+                MM_STUDIES
+        } T_ModelMode;
+
+        AcquisitionTableModel();
+        ~AcquisitionTableModel();
+
+        //wxDataViewModel methods
+        virtual unsigned int GetColumnCount() const;
+        virtual wxString GetColumnType( unsigned int col ) const;
+        virtual void GetValue( wxVariant &variant,
+                               const wxDataViewItem &item, unsigned int col ) const;
+        virtual bool SetValue( const wxVariant &variant,
+                               const wxDataViewItem &item, unsigned int col );
+        virtual bool IsEnabled( const wxDataViewItem &item, unsigned int col ) const;
+        virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const;
+        virtual bool IsContainer( const wxDataViewItem &item ) const;
+        bool 	HasValue (const wxDataViewItem &item, unsigned col) const;
+        virtual bool HasContainerColumns (const wxDataViewItem &item) const ;
+        virtual unsigned int GetChildren( const wxDataViewItem &parent,
+                                          wxDataViewItemArray &array ) const;
+        int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
+                     unsigned int column, bool ascending ) const;
+        //
+        void CancelCommand();
+        void ClearResults();
+        T_ModelMode GetModelMode();
+        void SetModelMode(T_ModelMode mode);
+        void DoSearch(const GNC::GCS::Ptr<GNC::GCS::StoredQuery>& pQuery);
+        void DoExpand(AcquisitionNode* pNode, const std::string& modalities, const std::string& server);
+
+        std::string GetModality(AcquisitionNode* pNode);
+        void GetProperties(AcquisitionNode* pNode, GNC::GUI::wxPropiedades::TListaMapasPropiedades& properties);
+
+        //region realizacion de la interfaz IComandoPACSNotificador
+        virtual void ReloadModel(std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >& results);
+        virtual void ReloadModel(const std::string& studyUID, std::list< GNC::GCS::Ptr<GIL::DICOM::DicomDataset> >& results);
+        //endregion
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+protected:
+        void ClearStudyMap();
+
+
+        GADAPI::ComandoPACS*           m_pComandoPACS;
+
+        T_ModelMode m_Mode;
+        typedef std::map<std::string, AcquisitionNode*> TMapIndex;
+        TMapIndex studyMap;
+        wxImageList* m_pImageList;
+};
+}
+}
diff --git a/cadxcore/main/gui/acquisition/dialogoadquisicion.cpp b/cadxcore/main/gui/acquisition/dialogoadquisicion.cpp
new file mode 100644
index 0000000..1279598
--- /dev/null
+++ b/cadxcore/main/gui/acquisition/dialogoadquisicion.cpp
@@ -0,0 +1,917 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+#if defined(_WINDOWS)
+#if !defined (_SCL_SECURE_NO_WARNINGS)
+#define _SCL_SECURE_NO_WARNINGS
+#endif
+#if !defined (_CRT_SECURE_NO_WARNINGS)
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#else
+#if defined(__DEPRECATED)
+#undef __DEPRECATED
+#endif
+#endif
+
+#include <api/globals.h>
+#include <api/ilock.h>
+#include <set>
+
+#include <wx/wx.h>
+#include <wx/animate.h>
+#include <wx/odcombo.h>
+#include <wx/imaglist.h>
+#include <wx/dnd.h>
+#include <wx/tokenzr.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <wx/propiedades/wxpropiedades.h>
+#include <api/dicom/dcmdictionary.h>
+
+#include "downloadagaindialog.h"
+#include "dialogoadquisicion.h"
+#include "acquisitiontablemodel.h"
+
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/entorno.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/historytoolscontroller.h>
+#include <main/controllers/storedqueriescontroller.h>
+#include <eventos/progresocomando.h>
+#include <commands/pacsdownloadcommand.h>
+
+#include <main/controllers/anonusagestats.h>
+
+#define SIZE_ICONOS 16
+
+#define STORE_QUERY_TOOL_ID 0
+#define DELETE_QUERY_TOOL_ID 1
+
+#define ICONO_ESTUDIO 0
+#define ICONO_SERIE 1
+#define ICONO_HOMBRE 2
+#define ICONO_MUJER 3
+#define ICONO_OTRO 4
+#define SIZE_ICONOS 16
+/////////////////////////////////////////////////////////////////
+namespace GNC
+{
+namespace GUI
+{
+class QueryNameDialog: public QueryNameDialogBase
+{
+public:
+        QueryNameDialog(wxWindow* pWindow, const wxString& queryName): QueryNameDialogBase(pWindow)
+        {
+                m_pQueryName->SetFocus();
+                m_pQueryName->SetValue(queryName);
+        }
+        ~QueryNameDialog()
+        {
+        }
+
+        std::string getQueryName()
+        {
+                return std::string(m_pQueryName->GetValue().ToUTF8());
+        }
+
+        virtual void OnOkClick(wxCommandEvent& /*evt*/)
+        {
+                std::string queryName = getQueryName();
+                if (queryName.empty()) {
+                        wxMessageBox(_("Write query name"), _("Info"),
+                                     wxOK | wxICON_INFORMATION, this);
+                } else {
+                        GNC::GCS::Ptr<GNC::GCS::StoredQuery> pStoredQuery = GNC::GCS::StoredQueryController::Instance()->getQuery(queryName);
+                        if (pStoredQuery.IsValid()) {
+                                if (wxMessageBox(_("This query name is in use, do you want to overwrite it?"), _("Info"), wxYES_NO, this) == wxYES) {
+                                        EndModal(wxID_OK);
+                                }
+                        } else {
+                                EndModal(wxID_OK);
+                        }
+                }
+        }
+};
+}
+}
+//---------------------------------------------------------------------------
+
+GNC::GUI::DialogoAdquisicion* GNC::GUI::DialogoAdquisicion::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new DialogoAdquisicion(GNC::HistoryToolsController::Instance()->GetHistoryPanel()->GetWxWindow());
+        }
+        return m_pInstance;
+}
+
+void GNC::GUI::DialogoAdquisicion::FreeInstance()
+{
+        if(m_pInstance!=NULL) {
+                m_pInstance->Close();
+                m_pInstance = NULL;
+        }
+}
+
+GNC::GUI::DialogoAdquisicion* GNC::GUI::DialogoAdquisicion::m_pInstance = NULL;
+
+
+GNC::GUI::DialogoAdquisicion::DialogoAdquisicion(wxWindow* pParent) : DialogoAdquisicionBase(pParent)
+{
+        m_SizeRestriction = false;
+        m_SizeOK = false;
+
+        //animation
+        m_pAnimation = new wxAnimationCtrl(m_pSearchPanel,wxID_ANY,GinkgoResourcesManager::ProgressBar::GetAniLoading());
+        m_pAnimation->Hide();
+        m_pSizerAnimation->Add(m_pAnimation, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+        if(GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits", "patient_scope")) {
+                int tmpIndex = m_pFieldCombo->FindString(_("Id"));
+                if (tmpIndex > 0) {
+                        m_pFieldCombo->Remove(tmpIndex,tmpIndex);
+                }
+                tmpIndex = m_pFieldCombo->FindString(_("Name"));
+                if (tmpIndex > 0) {
+                        m_pFieldCombo->Remove(tmpIndex,tmpIndex);
+                }
+                m_pTextControlField->SetEditable(false);
+                m_pTextControlField->Enable(false);
+                m_pFieldCombo->Enable(false);
+                m_pPACSListaServidores->Enable(false);
+
+                m_pTextControlField->Show(false);
+                m_pFieldCombo->Show(false);
+                m_pPatientLabelStr->Show(false);
+                m_pLabelRestricted->Show(true);
+                m_pPanelPACS->Layout();
+        } else {
+                int tmpIndex = m_pFieldCombo->FindString(_("Name"));
+                if (tmpIndex < 0) {
+                        m_pFieldCombo->Insert(_("Name"),0);
+                }
+                tmpIndex = m_pFieldCombo->FindString(_("Id"));
+                if (tmpIndex < 0) {
+                        m_pFieldCombo->Insert(_("Id"),0);
+                }
+        }
+        m_pFieldCombo->Select(0);
+
+        //modalities
+        {
+                const int MaxModalityNumber=20; // Modificar la constante si se añaden o quitan códigos de modalidad
+                std::string modalidades[MaxModalityNumber] = {"CR","CT","DR","DX","IO","MG","MR","NM","OT","PT","RF","RG","SC","OCT","US","XA","XC","ES","ECG","HD"};
+                for(int i = 0; i<MaxModalityNumber; i++) {
+                        wxCheckBox* pCheckBox = new wxCheckBox( m_pPanelPACS, wxID_ANY, wxString::FromUTF8(modalidades[i].c_str()), wxDefaultPosition, wxDefaultSize, 0 );
+                        m_pModalitySizer->Add( pCheckBox, 0, wxALL, 2 );
+                        m_modalitiesList.push_back(pCheckBox);
+                        pCheckBox->Connect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicion::OnKeyDownFormulario ), NULL, this );
+                }
+                m_pPanelPACS->Layout();
+        }
+
+        m_pAcquisitionTableView = new wxDataViewCtrl( m_pPanelPACS, wxID_ANY, wxDefaultPosition, wxDefaultSize,  wxDV_SINGLE|wxDV_ROW_LINES);
+        m_pDataViewSizer->Add(m_pAcquisitionTableView, 1, wxEXPAND);
+
+        m_pAcquisitionTableModel = new AcquisitionTableModel();
+        m_pAcquisitionTableView->AssociateModel(m_pAcquisitionTableModel.get());
+
+        //columns...
+        m_pAcquisitionTableView->AppendColumn(new wxDataViewColumn(wxEmptyString, new wxDataViewBitmapRenderer( "wxIcon", wxDATAVIEW_CELL_INERT ),COL_ICON, 50, wxALIGN_CENTER));
+        m_pAcquisitionTableView->AppendColumn(new wxDataViewColumn(_("Patient name"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ),COL_PATIENT_NAME, 200, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pAcquisitionTableView->AppendColumn(new wxDataViewColumn(_("Patient id"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ),COL_PATIENT_ID, 100, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pAcquisitionTableView->AppendColumn(new wxDataViewColumn(_("Modality"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ),COL_MODALITY, 70, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pAcquisitionTableView->AppendColumn(new wxDataViewColumn(_("Date Time"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ),COL_DATETIME, 120, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pAcquisitionTableView->AppendColumn(new wxDataViewColumn(_("Description"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ),COL_DESCRIPTION, 200, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pAcquisitionTableView->AppendColumn(new wxDataViewColumn(_("Accession Number"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ),COL_ACCNUMBER, 128, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        //
+
+        m_pAcquisitionTableView->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DialogoAdquisicion::OnTreeSelChanged ), NULL, this);
+        m_pAcquisitionTableView->Connect(wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DialogoAdquisicion::OnTreeItemActivated ), NULL, this);
+        m_pAcquisitionTableView->Connect(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( DialogoAdquisicion::OnTreeItemMenu ), NULL, this);
+        m_pAcquisitionTableView->Connect(wxEVT_DATAVIEW_ITEM_EXPANDED, wxDataViewEventHandler( DialogoAdquisicion::OnTreeItemExpanded ), NULL, this);
+
+        //stored queries
+        m_pStoredQueriesButtonBar->AddTool(STORE_QUERY_TOOL_ID, _("Store query"), GinkgoResourcesManager::MenuIcons::GetIcoGuardar());
+        m_pStoredQueriesButtonBar->AddTool(DELETE_QUERY_TOOL_ID, _("Remove query"), GinkgoResourcesManager::MenuIcons::GetIcoCross());
+        m_pStoredQueriesButtonBar->Realize();
+        m_pPanelPACS->Layout();
+
+
+        m_pStoredQueriesButtonBar->Connect(STORE_QUERY_TOOL_ID,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( DialogoAdquisicion::OnStoreQuery),NULL,this);
+        m_pStoredQueriesButtonBar->Connect(DELETE_QUERY_TOOL_ID,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( DialogoAdquisicion::OnDeleteQuery),NULL,this);
+        Layout();
+        GNC::GCS::ControladorEventos::Instance()->Registrar(this, GNC::GCS::Events::EventoProgresoComando());
+}
+
+GNC::GUI::DialogoAdquisicion::~DialogoAdquisicion()
+{
+        GNC::Entorno::Instance()->GetCommandController()->AbortarComandosDeOwner(this);
+        m_pAnimation->Destroy();
+}
+
+bool GNC::GUI::DialogoAdquisicion::Show(const std::string& idPatient, const std::string& idPACS)
+{
+        LOG_STAT(ANON_STAT_DLG_PACS_SEARCH)
+        CenterOnParent();
+        m_pTextControlField->Show(true);
+        m_pFieldCombo->Show(true);
+        m_pPatientLabelStr->Show(true);
+        m_pLabelRestricted->Show(false);
+
+        m_pTextControlField->Enable(true);
+        m_pTextControlField->SetValue(wxString::FromUTF8(idPatient.c_str()));
+
+        m_pPanelPACS->Layout();
+
+        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Adquisicion", "PACSDefecto", idPACS);
+
+        //load pacs list and select pacs..
+        bool retVal = Show(true);
+
+        Search();
+
+        return retVal;
+}
+
+bool GNC::GUI::DialogoAdquisicion::Show(bool show)
+{
+        //se recarga la lista de servidores pacs
+        wxArrayString serverListString;
+        std::string pacsDef;
+        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Adquisicion", "PACSDefecto", pacsDef);
+        int defaultIndex = 0;
+        int ind = 0;
+        ListOfServers = DicomServerList::Instance()->GetServerList();
+        for (DicomServerList::TServerList::iterator it = ListOfServers.begin(); it != ListOfServers.end(); ++it, ++ind) {
+                std::ostringstream ostr;
+                ostr << (*it)->ID << " (" << (*it)->AET << "@" << (*it)->HostName << ":" << (*it)->Port << ")";
+                serverListString.push_back(wxString::FromUTF8(ostr.str().c_str()));
+                if ((*it)->ID == pacsDef) {
+                        defaultIndex = ind;
+                }
+        }
+        m_pPACSListaServidores->Clear();
+        m_pPACSListaServidores->Append(serverListString);
+
+
+        if(m_pPACSListaServidores->GetCount()>0) {
+                //se selecciona el pacs por defecto
+                m_pPACSListaServidores->SetSelection(defaultIndex);
+        } else {
+                m_pPACSListaServidores->AppendString(_("There is no any PACS configured"));
+                m_pPACSListaServidores->SetSelection(0);
+                m_pPACSListaServidores->Disable();
+        }
+
+        if (IsIconized()) {
+                Iconize(false);
+        }
+
+        RefreshComboQueries();
+
+        if (IsShown()) {
+                Raise();
+        }
+        return DialogoAdquisicionBase::Show(show);
+}
+
+
+void GNC::GUI::DialogoAdquisicion::RefreshComboQueries()
+{
+        m_pComboQueries->Clear();
+        GNC::GCS::StoredQueryController::TStoredQueriesList listOfQueries = GNC::GCS::StoredQueryController::Instance()->getStoredQueries();
+        for (GNC::GCS::StoredQueryController::TStoredQueriesList::iterator it = listOfQueries.begin(); it != listOfQueries.end(); ++it) {
+                m_pComboQueries->AppendString(wxString::FromUTF8((*it)->getName().c_str()));
+        }
+        m_pComboQueries->Enable(!m_pComboQueries->IsListEmpty());
+        //m_pStoredQueriesButtonBar->Enable(!m_pComboQueries->IsListEmpty());
+        Refresh();
+}
+
+
+//---------------------------------------------------------------------------
+//region Eventos de interfaz
+void GNC::GUI::DialogoAdquisicion::OnPACSChanged(wxCommandEvent & )
+{
+        int selected = m_pPACSListaServidores->GetCurrentSelection();
+        DicomServerList::TServerList::iterator pServer = ListOfServers.begin();
+        for (int ind = 0; pServer != ListOfServers.end() && ind < selected; ++pServer,++ind);
+
+        if (pServer == ListOfServers.end()) {
+                return;
+        }
+        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Adquisicion","PACSDefecto", (*pServer)->ID);
+        {
+                m_pAcquisitionTableModel->ClearResults();
+                GNC::GUI::AcquisitionTableModel::T_ModelMode mode = (*pServer)->retrieveSeries?GNC::GUI::AcquisitionTableModel::MM_SERIES:GNC::GUI::AcquisitionTableModel::MM_STUDIES;
+                m_pAcquisitionTableModel->SetModelMode(mode);
+        }
+}
+
+void GNC::GUI::DialogoAdquisicion::OnKeyDownFormulario( wxKeyEvent& event )
+{
+        if(event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER) {
+                wxCommandEvent evt;
+                if (m_pTextControlField->IsEnabled()) {
+                        OnBusquedaClick(evt);
+                }
+                event.Skip(false);
+        } else {
+                if(event.GetKeyCode() == WXK_ESCAPE) {
+                        this->Hide();
+                        event.Skip(false);
+                }
+        }
+        event.Skip(true);
+}
+
+
+void GNC::GUI::DialogoAdquisicion::OnFechaDesdeDateChanged( wxDateEvent& /*event*/ )
+{
+        m_pBetween->SetValue(true);
+}
+
+
+
+void GNC::GUI::DialogoAdquisicion::OnFechaHastaDateChanged( wxDateEvent& /*event*/ )
+{
+        m_pBetween->SetValue(true);
+}
+
+void GNC::GUI::DialogoAdquisicion::OnCancelClick( wxCommandEvent&  )
+{
+        m_pAcquisitionTableModel->CancelCommand();
+        ShowAnimation(false);
+}
+
+void GNC::GUI::DialogoAdquisicion::OnBusquedaClick( wxCommandEvent&  )
+{
+        Search();
+}
+
+GNC::GCS::Ptr<GNC::GCS::StoredQuery> GNC::GUI::DialogoAdquisicion::buildQuery()
+{
+        GNC::GCS::Ptr<GNC::GCS::StoredQuery> pStoredQuery(new GNC::GCS::StoredQuery());
+        std::string pacsId = GetServerSeleccionado();
+        if(pacsId=="")
+                return pStoredQuery;
+
+
+        pStoredQuery->setName("AcquisitionFormQuery");
+        pStoredQuery->setPacsId(pacsId);
+
+        //conditions...
+        if (m_pBetween->GetValue()) {
+                std::ostringstream ostr;
+                if(m_pTextControlFechaDesde->GetValue().IsValid()) {
+                        ostr << std::string(m_pTextControlFechaDesde->GetValue().Format(wxT("%Y%m%d")).ToUTF8());
+                }
+                ostr << "-";
+                if(m_pTextControlFechaHasta->GetValue().IsValid()) {
+                        ostr << std::string(m_pTextControlFechaHasta->GetValue().Format(wxT("%Y%m%d")).ToUTF8());
+                }
+                pStoredQuery->addCondition(GKDCM_StudyDate, ostr.str());
+        } else if (m_pToday->GetValue()) {
+                pStoredQuery->addSpecialCondition(GNC::GCS::StoredQuery::TSC_TODAY);
+        } else if(m_pTodayAM->GetValue()) {
+                pStoredQuery->addSpecialCondition(GNC::GCS::StoredQuery::TSC_TODAY_MORNING);
+        } else if(m_pTodayPM->GetValue()) {
+                pStoredQuery->addSpecialCondition(GNC::GCS::StoredQuery::TSC_TODAY_AFTERNOON);
+        } else if (m_pYesterday->GetValue()) {
+                pStoredQuery->addSpecialCondition(GNC::GCS::StoredQuery::TSC_YESTERDAY);
+        } else if (m_pLastWeek->GetValue()) {
+                pStoredQuery->addSpecialCondition(GNC::GCS::StoredQuery::TSC_LAST_7_DAYS);
+        } else if (m_pLastMonth->GetValue()) {
+                pStoredQuery->addSpecialCondition(GNC::GCS::StoredQuery::TSC_LAST_30_DAYS);
+        } else if (m_pLastThreeMonths->GetValue()) {
+                pStoredQuery->addSpecialCondition(GNC::GCS::StoredQuery::TSC_LAST_3_MONTHS);
+        }
+
+        if (!m_pTextControlField->GetValue().empty()) {
+                if (m_pFieldCombo->GetValue() == _("Id")) {
+                        pStoredQuery->addCondition(GKDCM_PatientID, std::string(m_pTextControlField->GetValue().ToUTF8()));
+                } else if (m_pFieldCombo->GetValue() == _("Name")) {
+                        pStoredQuery->addCondition(GKDCM_PatientName, std::string(m_pTextControlField->GetValue().ToUTF8()));
+                } else if (m_pFieldCombo->GetValue() == _("Acc#")) {
+                        pStoredQuery->addCondition(GKDCM_AccessionNumber, std::string(m_pTextControlField->GetValue().ToUTF8()));
+                } else if (m_pFieldCombo->GetValue() == _("Study UID")) {
+                        pStoredQuery->addCondition(GKDCM_StudyInstanceUID, std::string(m_pTextControlField->GetValue().ToUTF8()));
+                }
+        }
+
+        std::string modalitiesFilter = GetModalities();
+        if (!modalitiesFilter.empty()) {
+                pStoredQuery->addCondition(GKDCM_ModalitiesInStudy, modalitiesFilter);
+        }
+        return pStoredQuery;
+}
+
+void GNC::GUI::DialogoAdquisicion::Search()
+{
+        GNC::GCS::Ptr<GNC::GCS::StoredQuery> pStoredQuery = buildQuery();
+        if (pStoredQuery->getPacsId().empty()) {
+                return;
+        }
+
+        if(pStoredQuery->isEmpty()) {
+                int answer = wxMessageBox(_("Search without parameters could take al long time\nWould you like to continue?"),_("Search"), wxYES_NO , this);
+                if (answer == wxNO) {
+                        return;
+                }
+                m_pTextControlField->SetFocus();
+        }
+
+
+        m_pAcquisitionTableModel->DoSearch(pStoredQuery);
+}
+
+std::string GNC::GUI::DialogoAdquisicion::GetModalities()
+{
+        std::string modalities;
+
+        for (TModalitiesVector::iterator it =m_modalitiesList.begin(); it !=m_modalitiesList.end(); ++it) {
+                wxCheckBox* pCheck = dynamic_cast<wxCheckBox*>(*it);
+                if(pCheck != NULL)
+                        if(pCheck->IsChecked()) {
+                                if (modalities == "") {
+                                        modalities = pCheck->GetLabel().ToUTF8();
+                                } else {
+                                        modalities.append("\\");
+                                        modalities.append(pCheck->GetLabel().ToUTF8());
+                                }
+                        }
+        }
+        return modalities;
+}
+
+void GNC::GUI::DialogoAdquisicion::OnLimpiarClick( wxCommandEvent& /*event*/ )
+{
+        m_pAcquisitionTableModel->ClearResults();
+}
+
+void GNC::GUI::DialogoAdquisicion::OnCloseClick( wxCommandEvent& /*event*/ )
+{
+        Hide();
+}
+
+void GNC::GUI::DialogoAdquisicion::OnDescargarClick( wxCommandEvent& /*event*/ )
+{
+        AddDescarga();
+}
+
+void GNC::GUI::DialogoAdquisicion::OnLinkClick( wxCommandEvent& /*event*/)
+{
+        AddDescarga(true);
+}
+
+// Eventos del Treelist
+void GNC::GUI::DialogoAdquisicion::OnTreeSelChanged(wxDataViewEvent& event)
+{
+        wxDataViewItem item = event.GetItem();
+        m_pBDescargar->Enable(item.IsOk()); // El item es un estudio o una serie
+        m_pBLink->Enable(item.IsOk() && IsLinkSupported());
+
+        event.Skip(true);
+}
+
+void GNC::GUI::DialogoAdquisicion::OnTreeItemActivated(wxDataViewEvent& event)
+{
+        AddDescarga();
+        event.Skip(true);
+}
+
+void GNC::GUI::DialogoAdquisicion::OnTreeItemMenu(wxDataViewEvent& event)
+{
+        //clase menu contextual
+        class PopUpMenuDescargar: public wxMenu
+        {
+        public:
+                PopUpMenuDescargar(DialogoAdquisicion* pDlg, bool allowDownload, bool series = false) : wxMenu()
+                {
+                        m_pDlg = pDlg;
+                        if (allowDownload) {
+                                {
+                                        wxString label;
+                                        if(series) {
+                                                label = _("Download series");
+                                        } else {
+                                                label = _("Download study");
+                                        }
+                                        wxMenuItem* descargar = new wxMenuItem( this,wxID_ANY,label);
+#ifdef __WXMSW__
+                                        descargar->SetBitmaps(GinkgoResourcesManager::Acquisition::GetIcoDownload());
+#else
+                                        descargar->SetBitmap(GinkgoResourcesManager::Acquisition::GetIcoDownload());
+#endif
+                                        Append(descargar);
+                                        Connect(descargar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PopUpMenuDescargar::OnDescargar ), NULL, this);
+                                }
+                                if (m_pDlg->IsLinkSupported()) {
+                                        wxString label;
+                                        if(series) {
+                                                label = _("Link series");
+                                        } else {
+                                                label = _("Link study");
+                                        }
+                                        wxMenuItem* link = new wxMenuItem( this,wxID_ANY,label);
+#ifdef __WXMSW__
+                                        link->SetBitmaps(GinkgoResourcesManager::History::GetIcoLocalLinked());
+#else
+                                        link->SetBitmap(GinkgoResourcesManager::History::GetIcoLocalLinked());
+#endif
+                                        Append(link);
+                                        Connect(link->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PopUpMenuDescargar::OnLink ), NULL, this);
+                                }
+
+                                this->AppendSeparator();
+                        }
+                        wxMenuItem* props = new wxMenuItem( this, wxID_ANY, _("Properties..."));
+                        Append(props);
+                        Connect(props->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PopUpMenuDescargar::OnProperties ),NULL, this);
+
+                }
+                ~PopUpMenuDescargar()
+                {
+                        m_pDlg = NULL;
+                        Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PopUpMenuDescargar::OnDescargar ), NULL, this);
+                        Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PopUpMenuDescargar::OnProperties ), NULL, this);
+                }
+
+                void OnDescargar(wxCommandEvent& )
+                {
+                        if (m_pDlg) {
+                                m_pDlg->AddDescarga();
+                        }
+                }
+
+                void OnLink(wxCommandEvent& )
+                {
+                        if (m_pDlg) {
+                                m_pDlg->AddDescarga(true);
+                        }
+                }
+
+                void OnProperties(wxCommandEvent& )
+                {
+                        if (m_pDlg) {
+                                m_pDlg->ShowProperties();
+                        }
+                }
+
+                DialogoAdquisicion* m_pDlg;
+
+        };
+        //
+        wxDataViewItem item = event.GetItem();
+        if(item.IsOk()) {
+                AcquisitionNode* pNode = (AcquisitionNode*) item.GetID();
+                PopUpMenuDescargar* pMenu = new PopUpMenuDescargar(this, true, pNode->IsSeriesNode());
+                m_pAcquisitionTableView->PopupMenu(pMenu);
+                delete pMenu;
+        }
+}
+
+void GNC::GUI::DialogoAdquisicion::OnTreeItemExpanded(wxDataViewEvent& event)
+{
+        wxDataViewItem item = event.GetItem();
+        if (item.IsOk()) {
+                std::string server=GetServerSeleccionado();
+                if(server=="")
+                        return;
+
+                AcquisitionNode* pNode = (AcquisitionNode*) item.GetID();
+
+                m_pAcquisitionTableModel->DoExpand(pNode, GetModalities(), server);
+        }
+        event.Skip(true);
+}
+
+
+void GNC::GUI::DialogoAdquisicion::OnComboStoredQueriesClick(wxCommandEvent& /*evt*/)
+{
+        //
+        std::string queryName(m_pComboQueries->GetValue().ToUTF8());
+        GNC::GCS::Ptr<GNC::GCS::StoredQuery> pStoredQuery = GNC::GCS::StoredQueryController::Instance()->getQuery(queryName);
+        if (pStoredQuery.IsValid()) {
+                //setup server
+                {
+                        int pacsSelection = 0;
+                        for (DicomServerList::TServerList::iterator it = ListOfServers.begin(); it != ListOfServers.end(); ++it,++pacsSelection) {
+                                if (pStoredQuery->getPacsId() == (*it)->ID) {
+                                        m_pPACSListaServidores->SetSelection(pacsSelection);
+                                        break;
+                                }
+                        }
+                }
+                //setup combo and search value...
+                if (pStoredQuery->hasCondition(GKDCM_PatientID)) {
+                        m_pFieldCombo->SetSelection(0);
+                        m_pTextControlField->SetValue(wxString::FromUTF8(pStoredQuery->getCondition(GKDCM_PatientID)->getValue().c_str()));
+                } else if (pStoredQuery->hasCondition(GKDCM_PatientName)) {
+                        m_pFieldCombo->SetSelection(1);
+                        m_pTextControlField->SetValue(wxString::FromUTF8(pStoredQuery->getCondition(GKDCM_PatientName)->getValue().c_str()));
+                } else if (pStoredQuery->hasCondition(GKDCM_AccessionNumber)) {
+                        m_pFieldCombo->SetSelection(2);
+                        m_pTextControlField->SetValue(wxString::FromUTF8(pStoredQuery->getCondition(GKDCM_AccessionNumber)->getValue().c_str()));
+                } else if (pStoredQuery->hasCondition(GKDCM_StudyInstanceUID)) {
+                        m_pFieldCombo->SetSelection(3);
+                        m_pTextControlField->SetValue(wxString::FromUTF8(pStoredQuery->getCondition(GKDCM_StudyInstanceUID)->getValue().c_str()));
+                } else {
+                        m_pTextControlField->SetValue(wxEmptyString);
+                }
+                //setup date radio buttons...
+                m_pTodayAM->SetValue(pStoredQuery->containsSpecialCondition(GNC::GCS::StoredQuery::TSC_TODAY_MORNING));
+                m_pTodayPM->SetValue(pStoredQuery->containsSpecialCondition(GNC::GCS::StoredQuery::TSC_TODAY_AFTERNOON));
+                m_pToday->SetValue(pStoredQuery->containsSpecialCondition(GNC::GCS::StoredQuery::TSC_TODAY));
+                m_pYesterday->SetValue(pStoredQuery->containsSpecialCondition(GNC::GCS::StoredQuery::TSC_YESTERDAY));
+                m_pLastWeek->SetValue(pStoredQuery->containsSpecialCondition(GNC::GCS::StoredQuery::TSC_LAST_7_DAYS));
+                m_pLastMonth->SetValue(pStoredQuery->containsSpecialCondition(GNC::GCS::StoredQuery::TSC_LAST_30_DAYS));
+                m_pLastThreeMonths->SetValue(pStoredQuery->containsSpecialCondition(GNC::GCS::StoredQuery::TSC_LAST_3_MONTHS));
+                //setup modalities check...
+                std::set<std::string> modalitiesChecked;
+                if (pStoredQuery->hasCondition(GKDCM_ModalitiesInStudy)) {
+                        std::string modalitiesInStudy = pStoredQuery->getCondition(GKDCM_ModalitiesInStudy)->getValue().c_str();
+                        //split field through \ (what?)
+                        //split with \ bar
+                        wxStringTokenizer tknz(wxString::FromUTF8(modalitiesInStudy.c_str()), wxT("\\"));
+                        //insert in the set the values
+                        while (tknz.HasMoreTokens()) {
+                                wxString modality = tknz.GetNextToken();
+                                modalitiesChecked.insert(std::string(modality.ToUTF8()));
+                        }
+                }
+                //check fields contained in the check and uncheck other
+                for (TModalitiesVector::iterator it =m_modalitiesList.begin(); it !=m_modalitiesList.end(); ++it) {
+                        wxCheckBox* pCheck = dynamic_cast<wxCheckBox*>(*it);
+                        if(pCheck != NULL) {
+                                pCheck->SetValue(modalitiesChecked.find(std::string(pCheck->GetLabel().ToUTF8())) != modalitiesChecked.end());
+                        }
+                }
+
+                //do search...
+                m_pAcquisitionTableModel->DoSearch(pStoredQuery);
+        }
+}
+
+void GNC::GUI::DialogoAdquisicion::OnStoreQuery(wxCommandEvent& /*evt*/)
+{
+        GNC::GCS::Ptr<GNC::GCS::StoredQuery> pStoredQuery = buildQuery();
+        if (pStoredQuery->getPacsId().empty()) {
+                return;
+        } else if (!pStoredQuery->getCondition(GKDCM_ModalitiesInStudy).IsValid() && !pStoredQuery->getCondition(GKDCM_StudyDate).IsValid()) {
+                wxMessageBox(_("You must specify at least a modality or a period of time"), _("Info"),
+                             wxOK | wxICON_INFORMATION, this);
+                return;
+        } else {
+                QueryNameDialog qDlg(this, m_pComboQueries->GetValue());
+                if (qDlg.ShowModal() == wxID_OK) {
+                        pStoredQuery->setName(qDlg.getQueryName());
+                        GNC::GCS::StoredQueryController::Instance()->storeQuery(pStoredQuery);
+                        RefreshComboQueries();
+                }
+        }
+}
+
+void GNC::GUI::DialogoAdquisicion::OnDeleteQuery(wxCommandEvent& /*evt*/)
+{
+        std::string queryName(m_pComboQueries->GetValue().ToUTF8());
+        GNC::GCS::Ptr<GNC::GCS::StoredQuery> pStoredQuery = GNC::GCS::StoredQueryController::Instance()->getQuery(queryName);
+        if (pStoredQuery.IsValid()) {
+                if (wxMessageBox(_("This query will be removed permanently, do you confirm removal?"), _("Info"), wxYES_NO, this) == wxYES) {
+                        GNC::GCS::StoredQueryController::Instance()->removeQuery(queryName);
+                        RefreshComboQueries();
+                }
+        } else {
+                wxMessageBox(_("Select a valid query"), _("Info"),
+                             wxOK | wxICON_INFORMATION, this);
+        }
+}
+
+std::string GNC::GUI::DialogoAdquisicion::GetServerSeleccionado()
+{
+        int selected = m_pPACSListaServidores->GetCurrentSelection();
+        DicomServerList::TServerList::iterator pServer = ListOfServers.begin();
+        for (int ind = 0; pServer != ListOfServers.end() && ind < selected; ++pServer,++ind);
+
+        if (pServer == ListOfServers.end()) {
+                wxMessageBox(_("Select a valid PACS Server"), _("Info"),
+                             wxOK | wxICON_INFORMATION, this);
+                return "";
+        } else {
+                return (*pServer)->ID;
+        }
+}
+
+bool GNC::GUI::DialogoAdquisicion::IsLinkSupported()
+{
+        int selected = m_pPACSListaServidores->GetCurrentSelection();
+        DicomServerList::TServerList::iterator pServer = ListOfServers.begin();
+        for (int ind = 0; pServer != ListOfServers.end() && ind < selected; ++pServer,++ind);
+
+        if (pServer == ListOfServers.end()) {
+                return false;
+        } else {
+                return (*pServer)->retrieveMethod == DicomServer::WADO;
+        }
+}
+
+
+// Obtiene el item seleccionado del TreeList de resultados, genera una descarga, la apila y la inicia.
+void GNC::GUI::DialogoAdquisicion::AddDescarga(bool link)
+{
+        wxDataViewItem selection = m_pAcquisitionTableView->GetSelection();
+
+        if(selection.IsOk()) {
+                AcquisitionNode* pNode = (AcquisitionNode*) selection.GetID();
+                std::string modality = m_pAcquisitionTableModel->GetModality(pNode);
+                if (pNode->IsStudyNode()) {
+
+                        if (!IsAllowedToDownload(modality)) {
+                                LOG_ERROR("GUI/Adquisition", _Std("Download of modality ") << modality << _Std(" not allowed"));
+                                wxMessageBox(_("You are not allowed to download this kind of modalities."),_("Modality download error"),wxICON_ERROR);
+                        } else {
+                                AddDownload(GetServerSeleccionado(), modality, false, pNode->uid, "", link);
+                        }
+                } else {
+                        if (!modality.empty()) {
+                                if(! IsAllowedToDownload(modality)) {
+                                        LOG_ERROR("GUI/Adquisition", _Std("Download of modality ") << modality << _Std(" not allowed"));
+                                        wxMessageBox(_("You are not allowed to download this kind of modalities."),_("Modality download error"),wxICON_ERROR);
+                                } else {
+                                        AddDownload(GetServerSeleccionado(), modality, true, pNode->GetParent()->uid, pNode->uid, link);
+                                }
+                        }
+                }
+        } else {
+                return;
+        }
+}
+
+// Shows a dialog with the properties of selected treelist item
+void GNC::GUI::DialogoAdquisicion::ShowProperties()
+{
+        wxDataViewItem selection = m_pAcquisitionTableView->GetSelection();
+
+        if(selection.IsOk()) {
+                AcquisitionNode* pNode = (AcquisitionNode*) selection.GetID();
+                GNC::GUI::wxPropiedades::TListaMapasPropiedades listaMapas;
+                m_pAcquisitionTableModel->GetProperties(pNode, listaMapas);
+
+                GNC::GUI::wxPropiedades* pProp = new GNC::GUI::wxPropiedades(this, _Std("search results"), listaMapas);
+                //increments width
+                wxSize size = pProp->GetSize();
+                size.x = 500;
+                pProp->SetSize(size);
+                pProp->Show();
+        }
+
+}
+
+bool GNC::GUI::DialogoAdquisicion::IsAllowedToDownload(const std::string& modality)
+{
+        if ((GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.download", "all"))) {
+                return true;
+        } else {
+                //split with \ bar
+                wxStringTokenizer tknz(wxString::FromUTF8(modality.c_str()), wxT("\\"));
+                std::list<std::string> modalities;
+                while (tknz.HasMoreTokens()) {
+                        modalities.push_back(std::string(tknz.GetNextToken().ToUTF8()));
+                }
+                bool value = true;
+                for (std::list<std::string>::iterator it =modalities.begin(); it != modalities.end(); ++it) {
+                        value = value && GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.download", (*it));
+                }
+                return value;
+        }
+}
+
+
+void GNC::GUI::DialogoAdquisicion::ShowAnimation(bool show)
+{
+        if (show != m_pAnimation->IsShown()) {
+                m_pAnimation->Show(show);
+                if (show) {
+                        m_pAnimation->Play();
+                } else {
+                        m_pAnimation->Stop();
+                }
+                m_pTextControlField->ShowCancelButton(show);
+                m_pSearchPanel->Layout();
+        }
+}
+
+
+
+void GNC::GUI::DialogoAdquisicion::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        GNC::GCS::Events::EventoProgresoComando* pEvt = dynamic_cast<GNC::GCS::Events::EventoProgresoComando*> (evt);
+        if (pEvt == NULL  || pEvt->GetComando() == NULL) {
+                return;
+        }
+
+        switch (pEvt->GetTipo()) {
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Iniciado: {
+                GNC::GCS::IComando* pCmd = pEvt->GetComando();
+                if (pCmd->GetOwner() == m_pAcquisitionTableModel.get()) {
+                        ShowAnimation(true);
+                }
+        }
+        break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Progreso: {
+                GNC::GCS::IComando* pCmd = pEvt->GetComando();
+                if (pCmd->GetOwner() == m_pAcquisitionTableModel.get()) {
+                        ShowAnimation(true);
+                }
+        }
+        break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Unknown:
+                break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado: {
+                GNC::GCS::IComando* pCmd = pEvt->GetComando();
+                if (pCmd->GetOwner() == m_pAcquisitionTableModel.get()) {
+                        ShowAnimation(false);
+                }
+        }
+        break;
+
+        }
+}
+
+bool GNC::GUI::DialogoAdquisicion::AddDownload(const std::string& server, const std::string& modality, bool seriesMode, const std::string& studyUID, const std::string& seriesUID, bool link)
+{
+        if (server.empty() || (studyUID.empty() && seriesUID.empty())) {
+                LOG_ERROR("GUI/Adquisition", "Empty mandatory values <serverId>, <studyInstanceUID | serieInstanceUID> while adding serie to download queue");
+                return false;
+        }
+
+        GADAPI::PACSDownloadCommandParams * pParams;
+        {
+                GIL::DICOM::DicomDataset base;
+                if (seriesMode) {
+                        if (!seriesUID.empty() && GNC::GCS::HistoryController::Instance()->ExistsSeriesWithUID(seriesUID)) {
+                                DownloadAgainDialog dlg(this, seriesUID, true);
+                                int answer = dlg.ShowModal();
+                                if (answer != wxID_OK) {
+                                        return false;
+                                }
+                        }
+                        base.tags["0008|0052"] = "SERIES";
+                        base.tags["0020|000e"] = seriesUID; //series instance uid
+                        if (!modality.empty()) {
+                                base.tags["0008|0060"] = modality; //modalitiy
+                        }
+                } else {
+                        if (!studyUID.empty()) {
+                                if (GNC::GCS::HistoryController::Instance()->ExistsStudyWithUID(studyUID)) {
+                                        DownloadAgainDialog dlg(this, studyUID, false);
+                                        int answer = dlg.ShowModal();
+                                        if (answer != wxID_OK) {
+                                                return false;
+                                        }
+                                }
+                                base.tags["0020|000d"] = studyUID; //study instance uid
+
+                        }
+                        base.tags["0008|0052"] = "STUDY";
+                }
+                pParams = new GADAPI::PACSDownloadCommandParams(server, base, link);
+        }
+
+        if (seriesMode) {
+                LOG_INFO("GUI/Adquisition", _Std("Downloading serie..."));
+        } else {
+                LOG_INFO("GUI/Adquisition", _Std("Downloading study..."));
+        }
+        GNC::GCS::IComando* pCommand = new GADAPI::PACSDownloadCommand(pParams);
+
+        GNC::Entorno::Instance()->GetCommandController()->ProcessAsync(_Std("Downloading from PACS..."), pCommand, this);
+
+        return true;
+
+        //endregion
+}
diff --git a/cadxcore/main/gui/acquisition/dialogoadquisicion.h b/cadxcore/main/gui/acquisition/dialogoadquisicion.h
new file mode 100644
index 0000000..470917a
--- /dev/null
+++ b/cadxcore/main/gui/acquisition/dialogoadquisicion.h
@@ -0,0 +1,124 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+#include <wx/dataview.h>
+#include <wx/checkbox.h>
+
+#include <api/autoptr.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/imodelointegracion.h>
+#include <api/observers/ieventsobserver.h>
+
+#include <main/controllers/pacscontroller.h>
+#include <commands/comandopacs.h>
+
+#include "dialogoadquisicionbase.h"
+
+class IModeloDicom;
+class wxAnimationCtrl;
+
+namespace GNC
+{
+
+namespace GUI
+{
+class AcquisitionTableModel;
+
+class DialogoAdquisicion: public DialogoAdquisicionBase, public GNC::GCS::IEventsObserver
+{
+public:
+        static DialogoAdquisicion* Instance();
+        static void FreeInstance();
+
+        DialogoAdquisicion(wxWindow* pParent);
+        ~DialogoAdquisicion();
+
+        virtual bool Show(bool show = true);
+        virtual bool Show(const std::string& idPatient, const std::string& idPACS);
+        virtual void RefreshComboQueries();
+
+        //---------------------------------------------------------------------------
+        //region Eventos de interfaz
+        virtual void OnPACSChanged(wxCommandEvent & event);
+        virtual void OnKeyDownFormulario( wxKeyEvent& event );
+        virtual void OnFechaDesdeDateChanged( wxDateEvent& event );
+        virtual void OnFechaHastaDateChanged( wxDateEvent& event );
+        virtual void OnBusquedaClick( wxCommandEvent& event );
+        GNC::GCS::Ptr<GNC::GCS::StoredQuery> buildQuery();
+        virtual void Search();
+        virtual void OnCancelClick( wxCommandEvent& event);
+        std::string GetModalities();
+        virtual void OnLimpiarClick( wxCommandEvent& event );
+        virtual void OnCloseClick( wxCommandEvent& event );
+        virtual void OnDescargarClick( wxCommandEvent& event);
+        virtual void OnLinkClick( wxCommandEvent& event);
+
+        virtual void OnTreeSelChanged(wxDataViewEvent& event);
+        virtual void OnTreeItemActivated(wxDataViewEvent& event);
+        virtual void OnTreeItemMenu(wxDataViewEvent& event);
+        virtual void OnTreeItemExpanded(wxDataViewEvent& event);
+
+        //stored queries
+        virtual void OnComboStoredQueriesClick(wxCommandEvent& evt);
+        virtual void OnStoreQuery(wxCommandEvent& evt);
+        virtual void OnDeleteQuery(wxCommandEvent& evt);
+
+        //---------------------------------------------------------------------------
+        //region Helpers
+        std::string GetServerSeleccionado();
+        bool IsLinkSupported();
+        void AddDescarga(bool link = false);
+        void ShowProperties();
+        bool IsAllowedToDownload(const std::string& modality);
+        void ShowAnimation(bool show);
+
+        //endregion
+
+        //---------------------------------------------------------------------------
+
+        //para enterarse si ha parado un comando...
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+        //
+
+        /** Init download **/
+        bool AddDownload(const std::string& server, const std::string& modality, bool seriesMode, const std::string& studyUID, const std::string& seriesUID, bool link);
+
+private:
+        static DialogoAdquisicion* m_pInstance;
+
+        wxString m_SelectedPACS;
+
+        wxAnimationCtrl* m_pAnimation;
+
+        wxObjectDataPtr<AcquisitionTableModel> m_pAcquisitionTableModel;
+        wxDataViewCtrl*							m_pAcquisitionTableView;
+
+        bool        m_SizeRestriction;
+        bool        m_SizeOK;
+
+        typedef std::list<wxCheckBox*>  TModalitiesVector;
+        TModalitiesVector m_modalitiesList;
+        DicomServerList::TServerList ListOfServers;
+};
+}
+}
diff --git a/cadxcore/main/gui/acquisition/dialogoadquisicionbase.cpp b/cadxcore/main/gui/acquisition/dialogoadquisicionbase.cpp
new file mode 100644
index 0000000..782f1b8
--- /dev/null
+++ b/cadxcore/main/gui/acquisition/dialogoadquisicionbase.cpp
@@ -0,0 +1,551 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "dialogoadquisicionbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+DialogoAdquisicionBase::DialogoAdquisicionBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 520,300 ), wxDefaultSize );
+
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("PACS") );
+
+        m_pMainSizer->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBodyPanel = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer18;
+        bSizer18 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelPACS = new TitledPanel( m_pBodyPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelPACS->SetToolTip( _("Search") );
+
+        wxBoxSizer* m_pSizerCamposBusqueda;
+        m_pSizerCamposBusqueda = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer32;
+        bSizer32 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer33;
+        bSizer33 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pPatientLabelStr = new wxStaticText( m_pPanelPACS, wxID_ANY, _("Patient"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pPatientLabelStr->Wrap( -1 );
+        m_pPatientLabelStr->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+        bSizer33->Add( m_pPatientLabelStr, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxBoxSizer* bSizer23;
+        bSizer23 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pFieldCombo = new wxComboBox( m_pPanelPACS, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), 0, NULL, wxCB_DROPDOWN|wxCB_READONLY );
+        m_pFieldCombo->Append( _("Id") );
+        m_pFieldCombo->Append( _("Name") );
+        m_pFieldCombo->Append( _("Acc#") );
+        m_pFieldCombo->Append( _("Study UID") );
+        m_pFieldCombo->SetMinSize( wxSize( 80,-1 ) );
+
+        bSizer23->Add( m_pFieldCombo, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pSearchPanel = new wxPanel( m_pPanelPACS, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer28;
+        bSizer28 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pTextControlField = new wxSearchCtrl( m_pSearchPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
+#ifndef __WXMAC__
+        m_pTextControlField->ShowSearchButton( true );
+#endif
+        m_pTextControlField->ShowCancelButton( false );
+        bSizer28->Add( m_pTextControlField, 1, wxALL|wxEXPAND, 5 );
+
+        m_pLabelRestricted = new wxStaticText( m_pSearchPanel, wxID_ANY, _("PACS acquisition is restricted"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelRestricted->Wrap( -1 );
+        m_pLabelRestricted->Hide();
+
+        bSizer28->Add( m_pLabelRestricted, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pSizerAnimation = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer28->Add( m_pSizerAnimation, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+        m_pSearchPanel->SetSizer( bSizer28 );
+        m_pSearchPanel->Layout();
+        bSizer28->Fit( m_pSearchPanel );
+        bSizer23->Add( m_pSearchPanel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer33->Add( bSizer23, 1, wxEXPAND, 5 );
+
+
+        bSizer32->Add( bSizer33, 1, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer31;
+        bSizer31 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pServerLabel = new wxStaticText( m_pPanelPACS, wxID_ANY, _("Server"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pServerLabel->Wrap( -1 );
+        m_pServerLabel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+        bSizer31->Add( m_pServerLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pPACSListaServidores = new wxComboBox( m_pPanelPACS, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY );
+        bSizer31->Add( m_pPACSListaServidores, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        bSizer32->Add( bSizer31, 1, wxEXPAND, 5 );
+
+
+        m_pSizerCamposBusqueda->Add( bSizer32, 0, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer27;
+        bSizer27 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxStaticBoxSizer* sbSizer2;
+        sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_pPanelPACS, wxID_ANY, _("Date") ), wxVERTICAL );
+
+        wxBoxSizer* bSizer17;
+        bSizer17 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer181;
+        bSizer181 = new wxBoxSizer( wxVERTICAL );
+
+        m_pAnyDate = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Any date"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+        m_pAnyDate->SetValue( true );
+        bSizer181->Add( m_pAnyDate, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 2 );
+
+        m_pTodayAM = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Today AM"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer181->Add( m_pTodayAM, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        m_pTodayPM = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Today PM"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer181->Add( m_pTodayPM, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        m_pToday = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Today"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer181->Add( m_pToday, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+
+        bSizer17->Add( bSizer181, 1, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer29;
+        bSizer29 = new wxBoxSizer( wxVERTICAL );
+
+        m_pYesterday = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Yesterday"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer29->Add( m_pYesterday, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 2 );
+
+        m_pLastWeek = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Last 7 days"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer29->Add( m_pLastWeek, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        m_pLastMonth = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Last 30 days"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer29->Add( m_pLastMonth, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        m_pLastThreeMonths = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Last 3 months"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer29->Add( m_pLastThreeMonths, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+
+        bSizer17->Add( bSizer29, 1, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer201;
+        bSizer201 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBetween = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Between:"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer201->Add( m_pBetween, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        wxBoxSizer* bSizer21;
+        bSizer21 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTextControlFechaDesde = new wxDatePickerCtrl( m_pPanelPACS, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_DROPDOWN );
+        bSizer21->Add( m_pTextControlFechaDesde, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 2 );
+
+
+        bSizer201->Add( bSizer21, 0, wxEXPAND|wxLEFT, 5 );
+
+        wxBoxSizer* bSizer22;
+        bSizer22 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTextControlFechaHasta = new wxDatePickerCtrl( m_pPanelPACS, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_DROPDOWN );
+        bSizer22->Add( m_pTextControlFechaHasta, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 2 );
+
+
+        bSizer201->Add( bSizer22, 0, wxEXPAND|wxLEFT, 5 );
+
+
+        bSizer17->Add( bSizer201, 0, wxEXPAND, 5 );
+
+
+        sbSizer2->Add( bSizer17, 1, wxEXPAND|wxALL, 5 );
+
+
+        bSizer27->Add( sbSizer2, 1, wxEXPAND|wxRIGHT, 5 );
+
+        wxStaticBoxSizer* sbSizer3;
+        sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_pPanelPACS, wxID_ANY, _("Modalities") ), wxVERTICAL );
+
+        m_pModalitySizer = new wxGridSizer( 0, 5, 0, 0 );
+
+
+        sbSizer3->Add( m_pModalitySizer, 1, wxEXPAND|wxALL, 5 );
+
+
+        bSizer27->Add( sbSizer3, 1, wxEXPAND|wxLEFT, 5 );
+
+
+        m_pSizerCamposBusqueda->Add( bSizer27, 0, wxEXPAND|wxBOTTOM, 5 );
+
+        m_pDataViewSizer = new wxBoxSizer( wxVERTICAL );
+
+
+        m_pSizerCamposBusqueda->Add( m_pDataViewSizer, 1, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer20;
+        bSizer20 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_staticText6 = new wxStaticText( m_pPanelPACS, wxID_ANY, _("Stored queries"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText6->Wrap( -1 );
+        bSizer20->Add( m_staticText6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pComboQueries = new wxComboBox( m_pPanelPACS, wxID_ANY, _("Select stored queries..."), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxCB_READONLY );
+        m_pComboQueries->SetMinSize( wxSize( 200,-1 ) );
+
+        bSizer20->Add( m_pComboQueries, 0, wxTOP|wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pStoredQueriesButtonBar = new wxGinkgoToolBar(m_pPanelPACS, wxID_ANY);
+        bSizer20->Add( m_pStoredQueriesButtonBar, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer20->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pBLink = new wxButton( m_pPanelPACS, wxID_ANY, _("Link"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBLink->Enable( false );
+        m_pBLink->SetToolTip( _("Available only in WADO servers") );
+
+        bSizer20->Add( m_pBLink, 0, wxALIGN_CENTER_VERTICAL|wxTOP, 5 );
+
+        m_pBDescargar = new wxButton( m_pPanelPACS, wxID_ANY, _("Download"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBDescargar->Enable( false );
+
+        bSizer20->Add( m_pBDescargar, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT|wxTOP|wxLEFT, 5 );
+
+        m_pBotonClose = new wxButton( m_pPanelPACS, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBotonClose->Hide();
+
+        bSizer20->Add( m_pBotonClose, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pSizerCamposBusqueda->Add( bSizer20, 0, wxEXPAND, 5 );
+
+
+        m_pPanelPACS->SetSizer( m_pSizerCamposBusqueda );
+        m_pPanelPACS->Layout();
+        m_pSizerCamposBusqueda->Fit( m_pPanelPACS );
+        bSizer18->Add( m_pPanelPACS, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+
+        m_pBodyPanel->SetSizer( bSizer18 );
+        m_pBodyPanel->Layout();
+        bSizer18->Fit( m_pBodyPanel );
+        m_pMainSizer->Add( m_pBodyPanel, 1, wxEXPAND, 5 );
+
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DialogoAdquisicionBase::OnClose ) );
+        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ) );
+        m_pFieldCombo->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DialogoAdquisicionBase::OnComboField ), NULL, this );
+        m_pTextControlField->Connect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( DialogoAdquisicionBase::OnCancelClick ), NULL, this );
+        m_pTextControlField->Connect( wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler( DialogoAdquisicionBase::OnBusquedaClick ), NULL, this );
+        m_pTextControlField->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DialogoAdquisicionBase::OnBusquedaClick ), NULL, this );
+        m_pPACSListaServidores->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DialogoAdquisicionBase::OnPACSChanged ), NULL, this );
+        m_pAnyDate->Connect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pTodayAM->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pTodayPM->Connect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pToday->Connect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pYesterday->Connect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastWeek->Connect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastMonth->Connect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastThreeMonths->Connect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pBetween->Connect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pTextControlFechaDesde->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( DialogoAdquisicionBase::OnFechaDesdeDateChanged ), NULL, this );
+        m_pTextControlFechaDesde->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pTextControlFechaHasta->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( DialogoAdquisicionBase::OnFechaHastaDateChanged ), NULL, this );
+        m_pTextControlFechaHasta->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pComboQueries->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DialogoAdquisicionBase::OnComboStoredQueriesClick ), NULL, this );
+        m_pBLink->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoAdquisicionBase::OnLinkClick ), NULL, this );
+        m_pBDescargar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoAdquisicionBase::OnDescargarClick ), NULL, this );
+        m_pBotonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoAdquisicionBase::OnCloseClick ), NULL, this );
+}
+
+DialogoAdquisicionBase::~DialogoAdquisicionBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DialogoAdquisicionBase::OnClose ) );
+        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ) );
+        m_pFieldCombo->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DialogoAdquisicionBase::OnComboField ), NULL, this );
+        m_pTextControlField->Disconnect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( DialogoAdquisicionBase::OnCancelClick ), NULL, this );
+        m_pTextControlField->Disconnect( wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler( DialogoAdquisicionBase::OnBusquedaClick ), NULL, this );
+        m_pTextControlField->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( DialogoAdquisicionBase::OnBusquedaClick ), NULL, this );
+        m_pPACSListaServidores->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DialogoAdquisicionBase::OnPACSChanged ), NULL, this );
+        m_pAnyDate->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pTodayAM->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pTodayPM->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pToday->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pYesterday->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastWeek->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastMonth->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastThreeMonths->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pBetween->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pTextControlFechaDesde->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( DialogoAdquisicionBase::OnFechaDesdeDateChanged ), NULL, this );
+        m_pTextControlFechaDesde->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pTextControlFechaHasta->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( DialogoAdquisicionBase::OnFechaHastaDateChanged ), NULL, this );
+        m_pTextControlFechaHasta->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DialogoAdquisicionBase::OnKeyDownFormulario ), NULL, this );
+        m_pComboQueries->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DialogoAdquisicionBase::OnComboStoredQueriesClick ), NULL, this );
+        m_pBLink->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoAdquisicionBase::OnLinkClick ), NULL, this );
+        m_pBDescargar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoAdquisicionBase::OnDescargarClick ), NULL, this );
+        m_pBotonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoAdquisicionBase::OnCloseClick ), NULL, this );
+
+}
+
+DialogoNotFoundBase::DialogoNotFoundBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 285,164 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer12;
+        bSizer12 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel5 = new TitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel5->SetToolTip( _("Series does not exist") );
+
+        wxBoxSizer* bSizer13;
+        bSizer13 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticText10 = new wxStaticText( m_panel5, wxID_ANY, _("These series have been deleted from the local history"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText10->Wrap( 440 );
+        bSizer13->Add( m_staticText10, 0, wxALL, 5 );
+
+        m_pListaSeries = new wxListBox( m_panel5, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+        bSizer13->Add( m_pListaSeries, 1, wxEXPAND|wxTOP, 0 );
+
+
+        m_panel5->SetSizer( bSizer13 );
+        m_panel5->Layout();
+        bSizer13->Fit( m_panel5 );
+        bSizer12->Add( m_panel5, 1, wxEXPAND | wxALL, 5 );
+
+        m_pPanelOkCancel = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer14;
+        bSizer14 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer14->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pButtonOk = new wxButton( m_pPanelOkCancel, wxID_OK, _("Continue"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pButtonOk->SetDefault();
+        bSizer14->Add( m_pButtonOk, 0, wxRIGHT, 5 );
+
+        m_pButtonCancel = new wxButton( m_pPanelOkCancel, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer14->Add( m_pButtonCancel, 0, wxLEFT, 5 );
+
+
+        m_pPanelOkCancel->SetSizer( bSizer14 );
+        m_pPanelOkCancel->Layout();
+        bSizer14->Fit( m_pPanelOkCancel );
+        bSizer12->Add( m_pPanelOkCancel, 0, wxEXPAND, 5 );
+
+        m_pPanelOk = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button10 = new wxButton( m_pPanelOk, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button10->SetDefault();
+        bSizer16->Add( m_button10, 0, 0, 5 );
+
+
+        m_pPanelOk->SetSizer( bSizer16 );
+        m_pPanelOk->Layout();
+        bSizer16->Fit( m_pPanelOk );
+        bSizer12->Add( m_pPanelOk, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer12 );
+        this->Layout();
+        bSizer12->Fit( this );
+
+        this->Centre( wxBOTH );
+}
+
+DialogoNotFoundBase::~DialogoNotFoundBase()
+{
+}
+
+DownloadAgainDialogBase::DownloadAgainDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 415,300 ), wxDefaultSize );
+
+        wxBoxSizer* m_pMainSizer;
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Download again") );
+
+        m_pMainSizer->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer141;
+        bSizer141 = new wxBoxSizer( wxVERTICAL );
+
+        m_pFormPanel = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pFormPanel->SetToolTip( _("Download again") );
+
+        wxBoxSizer* bSizer19;
+        bSizer19 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pLabelMessage = new wxStaticText( m_pFormPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelMessage->Wrap( 350 );
+        bSizer19->Add( m_pLabelMessage, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pFormPanel->SetSizer( bSizer19 );
+        m_pFormPanel->Layout();
+        bSizer19->Fit( m_pFormPanel );
+        bSizer141->Add( m_pFormPanel, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer141 );
+        m_pBody->Layout();
+        bSizer141->Fit( m_pBody );
+        m_pMainSizer->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_panel6 = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer14;
+        bSizer14 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer14->Add( 0, 0, 1, 0, 0 );
+
+        m_button9 = new wxButton( m_panel6, wxID_ANY, _("Open"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button9->SetDefault();
+        bSizer14->Add( m_button9, 0, wxALL, 5 );
+
+        m_pButtonOk = new wxButton( m_panel6, wxID_OK, _("Download"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer14->Add( m_pButtonOk, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pBotonCancelar = new wxButton( m_panel6, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer14->Add( m_pBotonCancelar, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_panel6->SetSizer( bSizer14 );
+        m_panel6->Layout();
+        bSizer14->Fit( m_panel6 );
+        m_pMainSizer->Add( m_panel6, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+        m_pMainSizer->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DownloadAgainDialogBase::OnOpenClick ), NULL, this );
+}
+
+DownloadAgainDialogBase::~DownloadAgainDialogBase()
+{
+        // Disconnect Events
+        m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DownloadAgainDialogBase::OnOpenClick ), NULL, this );
+
+}
+
+QueryNameDialogBase::QueryNameDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 415,250 ), wxDefaultSize );
+
+        wxBoxSizer* m_pMainSizer;
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Set query name") );
+
+        m_pMainSizer->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer141;
+        bSizer141 = new wxBoxSizer( wxVERTICAL );
+
+        m_pFormPanel = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pFormPanel->SetToolTip( _("Set query name") );
+
+        wxBoxSizer* bSizer19;
+        bSizer19 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pLabelMessage = new wxStaticText( m_pFormPanel, wxID_ANY, _("Set query name"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelMessage->Wrap( 350 );
+        bSizer19->Add( m_pLabelMessage, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pQueryName = new wxTextCtrl( m_pFormPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer19->Add( m_pQueryName, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pFormPanel->SetSizer( bSizer19 );
+        m_pFormPanel->Layout();
+        bSizer19->Fit( m_pFormPanel );
+        bSizer141->Add( m_pFormPanel, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer141 );
+        m_pBody->Layout();
+        bSizer141->Fit( m_pBody );
+        m_pMainSizer->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_panel6 = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer14;
+        bSizer14 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer14->Add( 0, 0, 1, 0, 0 );
+
+        m_pButtonOk = new wxButton( m_panel6, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pButtonOk->SetDefault();
+        bSizer14->Add( m_pButtonOk, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pBotonCancelar = new wxButton( m_panel6, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer14->Add( m_pBotonCancelar, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_panel6->SetSizer( bSizer14 );
+        m_panel6->Layout();
+        bSizer14->Fit( m_panel6 );
+        m_pMainSizer->Add( m_panel6, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pButtonOk->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QueryNameDialogBase::OnOkClick ), NULL, this );
+}
+
+QueryNameDialogBase::~QueryNameDialogBase()
+{
+        // Disconnect Events
+        m_pButtonOk->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( QueryNameDialogBase::OnOkClick ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/acquisition/dialogoadquisicionbase.h b/cadxcore/main/gui/acquisition/dialogoadquisicionbase.h
new file mode 100644
index 0000000..99d3699
--- /dev/null
+++ b/cadxcore/main/gui/acquisition/dialogoadquisicionbase.h
@@ -0,0 +1,226 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __DIALOGOADQUISICIONBASE_H__
+#define __DIALOGOADQUISICIONBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class HeaderPanel;
+class TitledPanel;
+
+#include <wx/panel.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/combobox.h>
+#include <wx/srchctrl.h>
+#include <wx/sizer.h>
+#include <wx/radiobut.h>
+#include <wx/datectrl.h>
+#include <wx/dateevt.h>
+#include <wx/statbox.h>
+#include<wx/wxginkgotoolbar.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+#include <wx/listbox.h>
+#include <wx/textctrl.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoAdquisicionBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoAdquisicionBase : public wxDialog
+{
+private:
+
+protected:
+        wxBoxSizer* m_pMainSizer;
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBodyPanel;
+        TitledPanel* m_pPanelPACS;
+        wxStaticText* m_pPatientLabelStr;
+        wxComboBox* m_pFieldCombo;
+        wxPanel* m_pSearchPanel;
+        wxSearchCtrl* m_pTextControlField;
+        wxStaticText* m_pLabelRestricted;
+        wxBoxSizer* m_pSizerAnimation;
+        wxStaticText* m_pServerLabel;
+        wxComboBox* m_pPACSListaServidores;
+        wxRadioButton* m_pAnyDate;
+        wxRadioButton* m_pTodayAM;
+        wxRadioButton* m_pTodayPM;
+        wxRadioButton* m_pToday;
+        wxRadioButton* m_pYesterday;
+        wxRadioButton* m_pLastWeek;
+        wxRadioButton* m_pLastMonth;
+        wxRadioButton* m_pLastThreeMonths;
+        wxRadioButton* m_pBetween;
+        wxDatePickerCtrl* m_pTextControlFechaDesde;
+        wxDatePickerCtrl* m_pTextControlFechaHasta;
+        wxGridSizer* m_pModalitySizer;
+        wxBoxSizer* m_pDataViewSizer;
+        wxStaticText* m_staticText6;
+        wxComboBox* m_pComboQueries;
+        wxGinkgoToolBar* m_pStoredQueriesButtonBar;
+        wxButton* m_pBLink;
+        wxButton* m_pBDescargar;
+        wxButton* m_pBotonClose;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnClose( wxCloseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnKeyDownFormulario( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnComboField( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancelClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnBusquedaClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnPACSChanged( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnFechaDesdeDateChanged( wxDateEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnFechaHastaDateChanged( wxDateEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnComboStoredQueriesClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnLinkClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnDescargarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCloseClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DialogoAdquisicionBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("DICOM Query/Retrieve"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 950,575 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~DialogoAdquisicionBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoNotFoundBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoNotFoundBase : public wxDialog
+{
+private:
+
+protected:
+        TitledPanel* m_panel5;
+        wxStaticText* m_staticText10;
+        wxButton* m_button10;
+
+public:
+        wxListBox* m_pListaSeries;
+        FooterPanel* m_pPanelOkCancel;
+        wxButton* m_pButtonOk;
+        wxButton* m_pButtonCancel;
+        FooterPanel* m_pPanelOk;
+
+        DialogoNotFoundBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Not found"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxDEFAULT_DIALOG_STYLE );
+        ~DialogoNotFoundBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DownloadAgainDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class DownloadAgainDialogBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        TitledPanel* m_pFormPanel;
+        wxStaticText* m_pLabelMessage;
+        FooterPanel* m_panel6;
+        wxButton* m_button9;
+        wxButton* m_pButtonOk;
+        wxButton* m_pBotonCancelar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnOpenClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DownloadAgainDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Download again"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~DownloadAgainDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class QueryNameDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class QueryNameDialogBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        TitledPanel* m_pFormPanel;
+        wxStaticText* m_pLabelMessage;
+        wxTextCtrl* m_pQueryName;
+        FooterPanel* m_panel6;
+        wxButton* m_pButtonOk;
+        wxButton* m_pBotonCancelar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnOkClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        QueryNameDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Set query name"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 415,250 ), long style = wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~QueryNameDialogBase();
+
+};
+
+#endif //__DIALOGOADQUISICIONBASE_H__
diff --git a/cadxcore/main/gui/acquisition/downloadagaindialog.cpp b/cadxcore/main/gui/acquisition/downloadagaindialog.cpp
new file mode 100644
index 0000000..e76d848
--- /dev/null
+++ b/cadxcore/main/gui/acquisition/downloadagaindialog.cpp
@@ -0,0 +1,73 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/statbmp.h>
+#include <wx/bmpbuttn.h>
+
+#include "downloadagaindialog.h"
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <main/controllers/historycontroller.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/gui/history3/historypanel3.h>
+#include <main/controllers/inactivitycontroller.h>
+#include <main/entorno.h>
+
+namespace GNC
+{
+namespace GUI
+{
+DownloadAgainDialog::DownloadAgainDialog(wxWindow* pParent, std::string uid, bool isSeries): DownloadAgainDialogBase(pParent),
+        UID(uid),
+        IsSeries(isSeries)
+{
+        if (IsSeries) {
+                m_pLabelMessage->SetLabel(_("This series has been already downloaded in the local history, Do you want to download it again?"));
+        } else {
+                m_pLabelMessage->SetLabel(_("This study has been already downloaded in the local history, Do you want to download it again?"));
+        }
+        m_pLabelMessage->Wrap(350);
+        m_pFormPanel->Layout();
+        m_pBody->Layout();
+        Layout();
+}
+
+DownloadAgainDialog::~DownloadAgainDialog()
+{
+}
+
+void DownloadAgainDialog::OnOpenClick(wxCommandEvent &)
+{
+        if (IsSeries) {
+                GNC::GCS::HistoryController::SeriesModelList sml;
+                GNC::GCS::HistoryController::Instance()->GetSeriesModelFromUID(UID, sml);
+                if (!sml.empty()) {
+                        GNC::GUI::HistoryPanel3::Instance()->OpenSeriesOrStudy(sml.front().pk, true);
+                }
+        } else {
+                GNC::GCS::HistoryController::StudyModelList sml;
+                GNC::GCS::HistoryController::Instance()->GetStudyModelFromUID(UID, sml);
+                if (!sml.empty()) {
+                        GNC::GUI::HistoryPanel3::Instance()->OpenSeriesOrStudy(sml.front().pk, false);
+                }
+        }
+        EndModal(wxID_CANCEL);
+}
+}
+}
diff --git a/cadxcore/main/gui/acquisition/downloadagaindialog.h b/cadxcore/main/gui/acquisition/downloadagaindialog.h
new file mode 100644
index 0000000..2f43c25
--- /dev/null
+++ b/cadxcore/main/gui/acquisition/downloadagaindialog.h
@@ -0,0 +1,41 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <wx/timer.h>
+#include "dialogoadquisicionbase.h"
+
+namespace GNC
+{
+namespace GUI
+{
+class DownloadAgainDialog: public DownloadAgainDialogBase
+{
+public:
+        DownloadAgainDialog(wxWindow* pParent, std::string uid, bool isSeries);
+        ~DownloadAgainDialog();
+        virtual void OnOpenClick(wxCommandEvent &evt);
+protected:
+        std::string UID;
+        bool IsSeries;
+};
+}
+}
diff --git a/cadxcore/main/gui/anonymize/AnonymizePanels.fbp b/cadxcore/main/gui/anonymize/AnonymizePanels.fbp
new file mode 100644
index 0000000..f63bbd4
--- /dev/null
+++ b/cadxcore/main/gui/anonymize/AnonymizePanels.fbp
@@ -0,0 +1,2802 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">anonymizepanelbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">AnonymizePanels</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Panel" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">AnonymizePanelBase</property>
+            <property name="pos"></property>
+            <property name="size">500,300</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer61</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelCampos</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Common tags</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer10</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxGridSizer" expanded="1">
+                                    <property name="cols">2</property>
+                                    <property name="hgap">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">gSizer1</property>
+                                    <property name="permission">none</property>
+                                    <property name="rows">0</property>
+                                    <property name="vgap">0</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxCheckBox" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="checked">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Patient's name and surname</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pCheckNombrePaciente</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnCheckBox">OnCheckNombreApellidos</event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxCheckBox" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="checked">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Patient Id</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pCheckIdPaciente</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnCheckBox">OnCheckIdPaciente</event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxCheckBox" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="checked">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Institutions</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pCheckInstituciones</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnCheckBox">OnCheckInstituciones</event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxCheckBox" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="checked">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Referring physician</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pReferringPhysician</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnCheckBox">OnCheckPhysician</event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxCheckBox" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="checked">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Comments</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pCheckComentarios</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnCheckBox">OnCheckComentarios</event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxCheckBox" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="checked">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Ginkgo CADx tags  (Evaluation Maps...)</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pCheckAtributosPrivadosGinkgo</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnCheckBox"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="spacer" expanded="0">
+                                            <property name="height">0</property>
+                                            <property name="permission">protected</property>
+                                            <property name="width">0</property>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel5</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pTagsPanel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Tags (double click to change value)</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer4</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="CustomControl" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="class">wxPropertyGrid</property>
+                                    <property name="close_button">1</property>
+                                    <property name="construction">m_pTagsList = new wxPropertyGrid(m_pTagsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_DEFAULT_STYLE|wxPG_HIDE_CATEGORIES|wxPG_HIDE_MARGIN|wxTAB_TRAVERSAL);</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="declaration">wxPropertyGrid* m_pTagsList;</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="include">#include <wx/propgrid/propgrid.h></property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pTagsList</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="settings"></property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_RIGHT|wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Add new...</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button4</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnAddNewTag</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">800,600</property>
+            <property name="name">AnonymizeDialogBase</property>
+            <property name="pos"></property>
+            <property name="size"></property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Anonymize</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer8</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Anonymize</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">m_pBodySizer</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">public</property>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer10</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="1">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Overwrite</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pOverwrite</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnOverwriteClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Create new</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pCreateNew</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCreateNewClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pCancel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">550,280</property>
+            <property name="name">AnonymizeAddTagDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">550,280</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">Add DICOM tag</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer6</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND | wxALL</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pTitled</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Add DICOM tag</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer8</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxChoice" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="choices"></property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size">470,-1</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pTag</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="selection">0</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnChoice">OnTagSelection</event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxFlexGridSizer" expanded="1">
+                                                <property name="cols">3</property>
+                                                <property name="flexible_direction">wxBOTH</property>
+                                                <property name="growablecols">2</property>
+                                                <property name="growablerows"></property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">fgSizer1</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="rows">0</property>
+                                                <property name="vgap">0</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Group</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText1</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Element</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText2</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Value</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText3</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">4</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pTextGroup</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type">int</property>
+                                                        <property name="validator_style">wxFILTER_ALPHANUMERIC|wxFILTER_INCLUDE_CHAR_LIST</property>
+                                                        <property name="validator_type">wxGenericValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">4</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pTextElement</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pTextValue</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer10</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="1">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Ok</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button5</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnOkClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button6</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/anonymize/anonymizedialog.cpp b/cadxcore/main/gui/anonymize/anonymizedialog.cpp
new file mode 100644
index 0000000..9ef7f0d
--- /dev/null
+++ b/cadxcore/main/gui/anonymize/anonymizedialog.cpp
@@ -0,0 +1,74 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "anonymizedialog.h"
+#include "anonymizepanel.h"
+#include <api/dicom/idicommanager.h>
+#include <main/entorno.h>
+#include <api/ientorno.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/ipacscontroller.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <commands/comandoexportacion.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+GNC::GUI::AnonymizeDialog::AnonymizeDialog(wxWindow* pParent, const std::list<long>& seriesPk): GNC::GUI::AnonymizeDialogBase(pParent)
+{
+        m_pDatosPersistentes = new TipoWizardExportacion();
+        m_pDatosPersistentes->ListOfSeriesPks = seriesPk;
+
+        m_pAnonymizePanel = new AnonymizePanel(m_pBody, seriesPk);
+        m_pBodySizer->Add(m_pAnonymizePanel, 1, wxEXPAND);
+        m_pBody->Layout();
+        Layout();
+}
+
+GNC::GUI::AnonymizeDialog::~AnonymizeDialog()
+{
+
+}
+
+void GNC::GUI::AnonymizeDialog::OnOverwriteClick(wxCommandEvent &)
+{
+        LaunchCommand(true);
+}
+
+void GNC::GUI::AnonymizeDialog::OnCreateNewClick(wxCommandEvent &)
+{
+        LaunchCommand(false);
+}
+
+void GNC::GUI::AnonymizeDialog::LaunchCommand(bool overwrite)
+{
+        if (overwrite) {
+                m_pDatosPersistentes->m_target = GNC::GUI::TipoWizardExportacion::OVERWRITE;
+        } else {
+                m_pDatosPersistentes->m_target = GNC::GUI::TipoWizardExportacion::NEW_STUDY;
+        }
+        m_pAnonymizePanel->GetTagsAnonymized(m_pDatosPersistentes->m_base);
+        m_pDatosPersistentes->m_incluirTagsGinkgo = !m_pAnonymizePanel->AnonymizePrivateTags();
+
+        GADAPI::ComandoExportacionParams* pParams = new GADAPI::ComandoExportacionParams(m_pDatosPersistentes);
+        GADAPI::ComandoExportacion* pCmd = new GADAPI::ComandoExportacion(pParams);
+        GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Exporting images ..."), pCmd, NULL);
+        this->Close();
+}
+
diff --git a/cadxcore/main/gui/anonymize/anonymizedialog.h b/cadxcore/main/gui/anonymize/anonymizedialog.h
new file mode 100644
index 0000000..54cc42f
--- /dev/null
+++ b/cadxcore/main/gui/anonymize/anonymizedialog.h
@@ -0,0 +1,53 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "anonymizepanelbase.h"
+
+#include <api/autoptr.h>
+#include <api/dicom/idicom.h>
+#include <api/internationalization/internationalization.h>
+
+#include <main/gui/export/datospersistentesexportacion.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class AnonymizePanel;
+class AnonymizeDialog: public AnonymizeDialogBase
+{
+public:
+        AnonymizeDialog(wxWindow* pParent, const std::list<long>& seriesPk);
+        ~AnonymizeDialog();
+
+
+protected:
+
+        virtual void OnOverwriteClick( wxCommandEvent& event );
+        virtual void OnCreateNewClick( wxCommandEvent& event );
+
+        void LaunchCommand(bool overwrite);
+
+        GNC::GCS::Ptr<TipoWizardExportacion> m_pDatosPersistentes;
+        GNC::GUI::AnonymizePanel* m_pAnonymizePanel;
+};
+}
+}
diff --git a/cadxcore/main/gui/anonymize/anonymizepanel.cpp b/cadxcore/main/gui/anonymize/anonymizepanel.cpp
new file mode 100644
index 0000000..bbb163f
--- /dev/null
+++ b/cadxcore/main/gui/anonymize/anonymizepanel.cpp
@@ -0,0 +1,381 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "anonymizepanel.h"
+#include <api/dicom/idicommanager.h>
+#include <api/dicom/dcmdictionary.h>
+#include <main/entorno.h>
+#include <api/ientorno.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/iconfigurationcontroller.h>
+#include <api/controllers/ipacscontroller.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <commands/comandoexportacion.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+/**dcmtk dictionary...*/
+#include <dcmtk/config/osconfig.h>
+#include <dcmtk/dcmdata/dcdict.h>
+#include <dcmtk/dcmdata/dcdicent.h>
+
+#include <wx/msgdlg.h>
+
+/**/
+namespace GNC
+{
+namespace GUI
+{
+class AnonymizeAddTagDialog: public AnonymizeAddTagDialogBase
+{
+public:
+        AnonymizeAddTagDialog(wxWindow* pParent): AnonymizeAddTagDialogBase(pParent)
+        {
+                DcmDataDictionary& globalDataDict = dcmDataDict.wrlock();
+
+                wxArrayString listOfStrings;
+                for (DcmHashDictIterator it = globalDataDict.normalBegin(); it != globalDataDict.normalEnd(); ++it) {
+                        DcmDictEntry entry(*(*it));
+                        listOfStrings.push_back(wxString::FromUTF8(entry.getTagName()));
+                }
+                dcmDataDict.unlock();
+
+                listOfStrings.Sort();
+                m_pTag->Append(listOfStrings);
+
+                m_pBody->Layout();
+                Layout();
+        }
+
+        virtual void OnTagSelection(wxCommandEvent& /*evt*/)
+        {
+                if (m_pTag->GetSelection() != 0) {
+                        wxString tagName = m_pTag->GetStringSelection();
+                        const DcmDataDictionary& globalDataDict = dcmDataDict.rdlock();
+                        const DcmDictEntry* entry = globalDataDict.findEntry(tagName.ToUTF8());
+                        dcmDataDict.unlock();
+                        if (entry != NULL) {
+                                m_pTextGroup->SetValue(wxString::Format(wxT("%04x"),entry->getGroup()));
+                                m_pTextElement->SetValue(wxString::Format(wxT("%04x"),entry->getElement()));
+                        }
+                }
+        }
+
+        std::string getKey()
+        {
+                wxString key;
+                long group,element;
+                if (m_pTextGroup->GetValue().ToLong(&group, 16) && m_pTextElement->GetValue().ToLong(&element, 16) && group >= 0 && group < 0xffff && element >= 0 && element < 0xffff) {
+                        key = wxString::Format(wxT("%04x|%04x"), group, element);
+                }
+                return std::string(key.ToUTF8());
+        }
+
+        std::string getValue()
+        {
+                return std::string(m_pTextValue->GetValue().ToUTF8());
+        }
+
+        virtual void OnOkClick(wxCommandEvent &evt)
+        {
+                long group,element;
+                if (m_pTextGroup->GetValue().ToLong(&group, 16) && m_pTextElement->GetValue().ToLong(&element, 16) && group >= 0 && group < 0xffff && element >= 0 && element < 0xffff) {
+                        evt.Skip(true);
+                } else {
+                        wxMessageBox(_("Element field or group field have invalid values"),_("Info"),wxOK | wxICON_INFORMATION, this);
+                        evt.Skip(false);
+                }
+        }
+};
+}
+}
+
+/**********************************************************/
+
+GNC::GUI::AnonymizePanel::AnonymizePanel(wxWindow* pParent): GNC::GUI::AnonymizePanelBase(pParent)
+{
+}
+
+GNC::GUI::AnonymizePanel::AnonymizePanel(wxWindow* pParent, const std::list<long>& seriesPk): GNC::GUI::AnonymizePanelBase(pParent)
+{
+        if (seriesPk.empty()) {
+                LOG_ERROR("AnonymizePanel", "you have to select at least one series to anonymize");
+        } else {
+                InitSeries(seriesPk.front());
+        }
+}
+
+GNC::GUI::AnonymizePanel::~AnonymizePanel()
+{
+        m_pTagsList->Disconnect(wxEVT_PG_CHANGED,wxPropertyGridEventHandler(AnonymizePanel::OnPropertyChanged),NULL,this);
+        m_pTagsList->Disconnect(wxEVT_PG_DOUBLE_CLICK,wxPropertyGridEventHandler(AnonymizePanel::OnPropertyDobleClick),NULL,this);
+}
+
+void GNC::GUI::AnonymizePanel::InitSeries(long pkSeries)
+{
+        GNC::GCS::HistoryController::LightFileModelList fileModels;
+        GNC::GCS::HistoryController::Instance()->GetSeriesSortedFileModels(pkSeries, fileModels);
+
+        GIL::DICOM::IDICOMManager*	pDICOMManager = GNC::GCS::IEntorno::Instance()->GetPACSController()->CrearInstanciaDeDICOMManager();
+        pDICOMManager->CargarFichero(fileModels.front().real_path, m_base);
+        SetTags(m_base, m_pTagsList->GetRoot(), pDICOMManager);
+        GNC::Entorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+
+        MapOfCheck[GKDCM_PatientName] = m_pCheckNombrePaciente;
+        MapOfCheck[GKDCM_PatientID] = m_pCheckIdPaciente;
+        MapOfCheck[GKDCM_InstitutionName] = m_pCheckInstituciones;
+        MapOfCheck[GKDCM_ReferringPhysicianName] = m_pReferringPhysician;
+        MapOfCheck[GKDCM_StudyDescription] = m_pCheckComentarios;
+        MapOfCheck[GKDCM_SeriesDescription] = m_pCheckComentarios;
+        MapOfCheck[GKDCM_ImageComments] = m_pCheckComentarios;
+
+        GNC::GCS::IConfigurationController::TListGroups groups;
+        GNC::GCS::IConfigurationController::Instance()->readGroupUser("/Core/AnonymizationSelection", groups);
+        for (GNC::GCS::IConfigurationController::TListGroups::iterator it = groups.begin(); it != groups.end(); ++it) {
+                if ((*it).find("tag") != (*it).end() && (*it).find("value") != (*it).end()) {
+                        Anonymize((*it)["tag"], true, (*it)["value"], false);
+                }
+        }
+
+        m_pTagsList->Connect(wxEVT_PG_CHANGED,wxPropertyGridEventHandler(AnonymizePanel::OnPropertyChanged),NULL,this);
+        m_pTagsList->Connect(wxEVT_PG_DOUBLE_CLICK,wxPropertyGridEventHandler(AnonymizePanel::OnPropertyDobleClick),NULL,this);
+}
+
+void GNC::GUI::AnonymizePanel::SetTags(GIL::DICOM::DicomDataset & base,wxPGProperty* idPadre,GIL::DICOM::IDICOMManager*	pDICOMManager)
+{
+        for(GIL::DICOM::ListaTags::iterator it = base.tags.begin(); it!= base.tags.end(); ++it) {
+                wxString helpString = wxString::FromUTF8(pDICOMManager->GetDescription((*it).first).c_str());
+                wxStringProperty* prop = NULL;
+                wxString valor;
+                if((*it).second.size()>100) {
+                        valor=wxT("Datos");
+                } else {
+                        valor = wxString::FromUTF8((*it).second.c_str());
+                }
+
+                if(helpString.size()>0) {
+                        helpString = wxT("(") + wxString::FromUTF8((*it).first.c_str()) + wxT(") ") + helpString;
+                        prop = new wxStringProperty(helpString,
+                                                    wxPG_LABEL,valor);
+                } else {
+                        prop = new wxStringProperty(wxString::FromUTF8((*it).first.c_str()),
+                                                    wxPG_LABEL,valor);
+                }
+                prop->SetHelpString(wxString::FromUTF8((*it).first.c_str()));
+                m_pTagsList->AppendIn(idPadre, prop);
+        }
+
+        for(GIL::DICOM::DicomDataset::DatasetList::iterator it = base.secuencias.begin(); it!=base.secuencias.end(); ++it) {
+                wxStringProperty* prop = NULL;
+                wxString helpString = wxString::FromUTF8(pDICOMManager->GetDescription((*it).tagName).c_str());
+                if(helpString.size()>0) {
+                        helpString = wxT("(") + wxString::FromUTF8((*it).tagName.c_str()) + wxT(") ") + helpString;
+                        prop = new wxStringProperty(helpString,
+                                                    wxPG_LABEL,wxEmptyString);
+                } else {
+                        prop = new wxStringProperty(wxString::FromUTF8((*it).tagName.c_str()),
+                                                    wxPG_LABEL,wxEmptyString);
+                }
+                prop->SetHelpString(wxString::FromUTF8((*it).tagName.c_str()));
+                if(m_pTagsList->GetProperty(prop->GetName()) != NULL) {
+                        ////////////////////////////////////std::cout<<"hasdfasdf";
+                }
+                wxPGProperty* pIdSequencia = m_pTagsList->AppendIn(idPadre,prop);
+
+                //recursion
+                int i=0;
+                for(GIL::DICOM::DicomDataset::DatasetList::iterator it2 = (*it).items.begin(); it2!= (*it).items.end(); ++it2, ++i) {
+                        wxPGProperty* pIdItem = m_pTagsList->AppendIn(pIdSequencia,new wxStringProperty(wxString::Format(wxT("Item %d"),i),wxPG_LABEL,wxEmptyString));
+                        SetTags((*it2),pIdItem,pDICOMManager);
+                }
+        }
+}
+
+void GNC::GUI::AnonymizePanel::OnCheckNombreApellidos( wxCommandEvent& /*event*/ )
+{
+        //se anonimiza 0010|0010 (nombre del paciente)
+        std::string clave("0010|0010");
+        Anonymize(clave,m_pCheckNombrePaciente->IsChecked());
+}
+
+void GNC::GUI::AnonymizePanel::OnCheckIdPaciente( wxCommandEvent& /*event*/ )
+{
+        //se anonimiza 0010|0020" (id del paciente)
+        std::string clave("0010|0020");
+        Anonymize(clave,m_pCheckIdPaciente->IsChecked());
+}
+
+void GNC::GUI::AnonymizePanel::OnCheckInstituciones( wxCommandEvent& /*event*/ )
+{
+        //se anonimiza (0008,0080) Institution Name
+        std::string clave("0008|0080");
+        Anonymize(clave,m_pCheckInstituciones->IsChecked());
+}
+
+void GNC::GUI::AnonymizePanel::OnCheckPhysician( wxCommandEvent& /*event*/ )
+{
+        //referring physician name
+        std::string clave("0008|0090");
+        Anonymize(clave,m_pReferringPhysician->IsChecked());
+}
+
+void GNC::GUI::AnonymizePanel::OnCheckComentarios( wxCommandEvent& /*event*/ )
+{
+        //descripcion del estudio, serie e imagenes
+        //estudio
+        {
+                std::string clave("0008|1030");
+                Anonymize(clave,m_pCheckComentarios->IsChecked());
+        }
+        //serie
+        {
+                std::string clave("0008|103e");
+                Anonymize(clave,m_pCheckComentarios->IsChecked());
+        }
+        //imagen
+        {
+                std::string clave("0020|4000");
+                Anonymize(clave,m_pCheckComentarios->IsChecked());
+        }
+}
+
+void GNC::GUI::AnonymizePanel::OnAddNewTag( wxCommandEvent &)
+{
+        AnonymizeAddTagDialog dlg(this);
+        if (dlg.ShowModal() == wxID_OK) {
+                Anonymize(dlg.getKey(), true, dlg.getValue());
+        }
+}
+
+void GNC::GUI::AnonymizePanel::Anonymize(const std::string& clave, bool anonimizar)
+{
+        wxString value = wxEmptyString;
+
+        if(!anonimizar) {
+                std::string tmp;
+                if(m_base.getTag(clave,tmp)) {
+                        value = wxString::FromUTF8(tmp.c_str());
+                }
+        }
+
+        Anonymize(clave, anonimizar, std::string(value.ToUTF8()));
+}
+
+void GNC::GUI::AnonymizePanel::Anonymize(const std::string& clave, bool anonimizar, const std::string& value, bool anonymizeIfNotExists )
+{
+        if (MapOfCheck.find(clave) != MapOfCheck.end()) {
+                MapOfCheck[clave]->SetValue(anonimizar);
+        }
+        wxString valueWx = wxString::FromUTF8(value.c_str());
+        for (wxPropertyGridIterator it = m_pTagsList->GetIterator(); ! it.AtEnd(); ++it) {
+                wxPGProperty* prop = it.GetProperty();
+                if(prop->GetHelpString() == wxString::FromUTF8(clave.c_str())) {
+                        prop->SetValueFromString(valueWx);
+                        if(anonimizar) {
+                                m_pTagsList->SetPropertyCell(prop,0,prop->GetLabel(),wxNullBitmap,*wxWHITE,*wxRED);
+                                m_pTagsList->SetPropertyCell(prop,1,prop->GetValue(),wxNullBitmap,*wxWHITE,*wxRED);
+                        } else {
+                                m_pTagsList->SetPropertyCell(prop,0,prop->GetLabel(), wxNullBitmap, *wxBLACK, *wxWHITE);
+                                m_pTagsList->SetPropertyCell(prop,1,prop->GetValue(), wxNullBitmap, *wxBLACK, *wxWHITE);
+                        }
+                        prop->ChangeFlag(wxPG_PROP_MODIFIED,anonimizar);
+                        m_pTagsList->RefreshProperty(prop);
+                        m_pTagsList->SelectProperty(prop, true);
+                        return;
+                }
+        }
+        if (anonymizeIfNotExists) {
+                //key not found... add it to property grid
+                wxStringProperty* prop = NULL;
+                GIL::DICOM::IDICOMManager*	pDICOMManager = GNC::GCS::IEntorno::Instance()->GetPACSController()->CrearInstanciaDeDICOMManager();
+                wxString helpString = wxString::FromUTF8(pDICOMManager->GetDescription(clave).c_str());
+                if(helpString.size()>0) {
+                        helpString = wxT("(") + wxString::FromUTF8(clave.c_str()) + wxT(") ") + helpString;
+                        prop = new wxStringProperty(helpString,
+                                                    wxPG_LABEL,wxEmptyString);
+                } else {
+                        prop = new wxStringProperty(wxString::FromUTF8(clave.c_str()),
+                                                    wxPG_LABEL,wxEmptyString);
+                }
+                prop->SetHelpString(wxString::FromUTF8(clave.c_str()));
+                GNC::Entorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+
+                prop->SetValue(wxString::FromUTF8(value.c_str()));
+                prop->ChangeFlag(wxPG_PROP_MODIFIED,anonimizar);
+                if(anonimizar) {
+                        m_pTagsList->SetPropertyCell(prop,0,prop->GetLabel(),wxNullBitmap,*wxWHITE,*wxRED);
+                        m_pTagsList->SetPropertyCell(prop,1,prop->GetValue(),wxNullBitmap,*wxWHITE,*wxRED);
+                }
+                m_pTagsList->AppendIn(m_pTagsList->GetRoot(), prop);
+                m_pTagsList->SelectProperty(prop, true);
+        }
+}
+
+
+void GNC::GUI::AnonymizePanel::RemoveFromTable(const std::string& clave)
+{
+        for (wxPropertyGridIterator it = m_pTagsList->GetIterator(); ! it.AtEnd(); ++it) {
+                wxPGProperty* prop = it.GetProperty();
+                if(prop->GetHelpString() == wxString::FromUTF8(clave.c_str())) {
+                        m_pTagsList->DeleteProperty(prop);
+                        break;
+                }
+        }
+}
+
+void GNC::GUI::AnonymizePanel::GetTagsAnonymized(GIL::DICOM::DicomDataset & base)
+{
+        base.tags.clear();
+        GNC::GCS::IConfigurationController::TListGroups configGroups;
+        for (wxPropertyGridIterator it = m_pTagsList->GetIterator(); ! it.AtEnd(); ++it) {
+                wxPGProperty* prop = it.GetProperty();
+                if(prop->GetFlags() & wxPG_PROP_MODIFIED) {
+                        std::string clave(prop->GetHelpString().ToUTF8());
+                        std::string valor(prop->GetValueAsString().ToUTF8());
+                        base.tags[clave] = valor;
+
+                        GNC::GCS::IConfigurationController::TMapValues group;
+                        group["tag"] = clave;
+                        group["value"] = valor;
+                        configGroups.push_back(group);
+                }
+        }
+        GNC::GCS::IConfigurationController::Instance()->writeGroupUser("/Core/AnonymizationSelection", configGroups);
+}
+
+bool GNC::GUI::AnonymizePanel::AnonymizePrivateTags()
+{
+        return m_pCheckAtributosPrivadosGinkgo->IsChecked();
+}
+
+void GNC::GUI::AnonymizePanel::OnPropertyChanged(wxPropertyGridEvent& event)
+{
+        wxPGProperty* selected= event.GetProperty();
+        m_pTagsList->SetPropertyCell(selected,0,selected->GetLabel(),wxNullBitmap,*wxWHITE,*wxRED);
+        m_pTagsList->SetPropertyCell(selected,1,selected->GetValue(),wxNullBitmap,*wxWHITE,*wxRED);
+}
+
+void GNC::GUI::AnonymizePanel::OnPropertyDobleClick(wxPropertyGridEvent& event)
+{
+        std::string clave(event.GetProperty()->GetHelpString().ToUTF8());
+        bool isModified = (event.GetProperty()->GetFlags() & wxPG_PROP_MODIFIED);
+        Anonymize(clave,!isModified);
+}
+
+
diff --git a/cadxcore/main/gui/anonymize/anonymizepanel.h b/cadxcore/main/gui/anonymize/anonymizepanel.h
new file mode 100644
index 0000000..015bc9c
--- /dev/null
+++ b/cadxcore/main/gui/anonymize/anonymizepanel.h
@@ -0,0 +1,63 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "anonymizepanelbase.h"
+
+#include <api/autoptr.h>
+#include <api/dicom/idicom.h>
+#include <api/internationalization/internationalization.h>
+
+
+namespace GNC
+{
+namespace GUI
+{
+class AnonymizePanel: public AnonymizePanelBase
+{
+public:
+        AnonymizePanel(wxWindow* pParent);
+        AnonymizePanel(wxWindow* pParent, const std::list<long>& seriesPk);
+        ~AnonymizePanel();
+
+        void GetTagsAnonymized(GIL::DICOM::DicomDataset & base);
+        bool AnonymizePrivateTags();
+protected:
+        void InitSeries(long pkSeries);
+        void SetTags(GIL::DICOM::DicomDataset & base,wxPGProperty* idPadre,GIL::DICOM::IDICOMManager*	pDICOMManager);
+        virtual void OnCheckNombreApellidos( wxCommandEvent& event );
+        virtual void OnCheckIdPaciente( wxCommandEvent& event );
+        virtual void OnCheckInstituciones( wxCommandEvent& event );
+        virtual void OnCheckPhysician( wxCommandEvent& event );
+        virtual void OnCheckComentarios( wxCommandEvent& event );
+        virtual void OnAddNewTag( wxCommandEvent &evt);
+
+        void Anonymize(const std::string& clave, bool anonimizar);
+        void Anonymize(const std::string& clave, bool anonimizar, const std::string& value, bool anonymizeIfNotExists = true);
+        void RemoveFromTable(const std::string& clave);
+
+        void OnPropertyChanged(wxPropertyGridEvent& event);
+        void OnPropertyDobleClick(wxPropertyGridEvent& event);
+
+        GIL::DICOM::DicomDataset m_base;
+        std::map <std::string, wxCheckBox*> MapOfCheck;
+};
+}
+}
diff --git a/cadxcore/main/gui/anonymize/anonymizepanelbase.cpp b/cadxcore/main/gui/anonymize/anonymizepanelbase.cpp
new file mode 100644
index 0000000..1c12c22
--- /dev/null
+++ b/cadxcore/main/gui/anonymize/anonymizepanelbase.cpp
@@ -0,0 +1,274 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "anonymizepanelbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+AnonymizePanelBase::AnonymizePanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer61;
+        bSizer61 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelCampos = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelCampos->SetToolTip( _("Common tags") );
+
+        wxBoxSizer* bSizer10;
+        bSizer10 = new wxBoxSizer( wxVERTICAL );
+
+        wxGridSizer* gSizer1;
+        gSizer1 = new wxGridSizer( 0, 2, 0, 0 );
+
+        m_pCheckNombrePaciente = new wxCheckBox( m_pPanelCampos, wxID_ANY, _("Patient's name and surname"), wxDefaultPosition, wxDefaultSize, 0 );
+        gSizer1->Add( m_pCheckNombrePaciente, 0, wxALL, 5 );
+
+        m_pCheckIdPaciente = new wxCheckBox( m_pPanelCampos, wxID_ANY, _("Patient Id"), wxDefaultPosition, wxDefaultSize, 0 );
+        gSizer1->Add( m_pCheckIdPaciente, 0, wxALL, 5 );
+
+        m_pCheckInstituciones = new wxCheckBox( m_pPanelCampos, wxID_ANY, _("Institutions"), wxDefaultPosition, wxDefaultSize, 0 );
+        gSizer1->Add( m_pCheckInstituciones, 0, wxALL, 5 );
+
+        m_pReferringPhysician = new wxCheckBox( m_pPanelCampos, wxID_ANY, _("Referring physician"), wxDefaultPosition, wxDefaultSize, 0 );
+        gSizer1->Add( m_pReferringPhysician, 0, wxALL, 5 );
+
+        m_pCheckComentarios = new wxCheckBox( m_pPanelCampos, wxID_ANY, _("Comments"), wxDefaultPosition, wxDefaultSize, 0 );
+        gSizer1->Add( m_pCheckComentarios, 0, wxALL, 5 );
+
+        m_pCheckAtributosPrivadosGinkgo = new wxCheckBox( m_pPanelCampos, wxID_ANY, _("Ginkgo CADx tags  (Evaluation Maps...)"), wxDefaultPosition, wxDefaultSize, 0 );
+        gSizer1->Add( m_pCheckAtributosPrivadosGinkgo, 0, wxALL, 5 );
+
+
+        gSizer1->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+        bSizer10->Add( gSizer1, 1, wxEXPAND, 5 );
+
+
+        m_pPanelCampos->SetSizer( bSizer10 );
+        m_pPanelCampos->Layout();
+        bSizer10->Fit( m_pPanelCampos );
+        bSizer61->Add( m_pPanelCampos, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
+
+        m_panel5 = new SubTitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer61->Add( m_panel5, 0, wxEXPAND, 5 );
+
+        m_pTagsPanel = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pTagsPanel->SetToolTip( _("Tags (double click to change value)") );
+
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pTagsList = new wxPropertyGrid(m_pTagsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_DEFAULT_STYLE|wxPG_HIDE_CATEGORIES|wxPG_HIDE_MARGIN|wxTAB_TRAVERSAL);
+        bSizer4->Add( m_pTagsList, 1, wxEXPAND, 5 );
+
+        m_button4 = new wxButton( m_pTagsPanel, wxID_ANY, _("Add new..."), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer4->Add( m_button4, 0, wxALIGN_RIGHT|wxLEFT, 5 );
+
+
+        m_pTagsPanel->SetSizer( bSizer4 );
+        m_pTagsPanel->Layout();
+        bSizer4->Fit( m_pTagsPanel );
+        bSizer61->Add( m_pTagsPanel, 1, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer61 );
+        this->Layout();
+
+        // Connect Events
+        m_pCheckNombrePaciente->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnCheckNombreApellidos ), NULL, this );
+        m_pCheckIdPaciente->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnCheckIdPaciente ), NULL, this );
+        m_pCheckInstituciones->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnCheckInstituciones ), NULL, this );
+        m_pReferringPhysician->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnCheckPhysician ), NULL, this );
+        m_pCheckComentarios->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnCheckComentarios ), NULL, this );
+        m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnAddNewTag ), NULL, this );
+}
+
+AnonymizePanelBase::~AnonymizePanelBase()
+{
+        // Disconnect Events
+        m_pCheckNombrePaciente->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnCheckNombreApellidos ), NULL, this );
+        m_pCheckIdPaciente->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnCheckIdPaciente ), NULL, this );
+        m_pCheckInstituciones->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnCheckInstituciones ), NULL, this );
+        m_pReferringPhysician->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnCheckPhysician ), NULL, this );
+        m_pCheckComentarios->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnCheckComentarios ), NULL, this );
+        m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AnonymizePanelBase::OnAddNewTag ), NULL, this );
+
+}
+
+AnonymizeDialogBase::AnonymizeDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 800,600 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Anonymize") );
+
+        bSizer8->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pBodySizer = new wxBoxSizer( wxVERTICAL );
+
+
+        m_pBody->SetSizer( m_pBodySizer );
+        m_pBody->Layout();
+        m_pBodySizer->Fit( m_pBody );
+        bSizer8->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer10;
+        bSizer10 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer10->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pOverwrite = new wxButton( m_pFooter, wxID_ANY, _("Overwrite"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer10->Add( m_pOverwrite, 0, wxRIGHT, 5 );
+
+        m_pCreateNew = new wxButton( m_pFooter, wxID_OK, _("Create new"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer10->Add( m_pCreateNew, 0, wxRIGHT, 5 );
+
+        m_pCancel = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pCancel->SetDefault();
+        bSizer10->Add( m_pCancel, 0, 0, 5 );
+
+
+        m_pFooter->SetSizer( bSizer10 );
+        m_pFooter->Layout();
+        bSizer10->Fit( m_pFooter );
+        bSizer8->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer8 );
+        this->Layout();
+        bSizer8->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pOverwrite->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AnonymizeDialogBase::OnOverwriteClick ), NULL, this );
+        m_pCreateNew->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AnonymizeDialogBase::OnCreateNewClick ), NULL, this );
+}
+
+AnonymizeDialogBase::~AnonymizeDialogBase()
+{
+        // Disconnect Events
+        m_pOverwrite->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AnonymizeDialogBase::OnOverwriteClick ), NULL, this );
+        m_pCreateNew->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AnonymizeDialogBase::OnCreateNewClick ), NULL, this );
+
+}
+
+AnonymizeAddTagDialogBase::AnonymizeAddTagDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 550,280 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTitled = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pTitled->SetToolTip( _("Add DICOM tag") );
+
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxVERTICAL );
+
+        wxArrayString m_pTagChoices;
+        m_pTag = new wxChoice( m_pTitled, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pTagChoices, 0 );
+        m_pTag->SetSelection( 0 );
+        m_pTag->SetMaxSize( wxSize( 470,-1 ) );
+
+        bSizer8->Add( m_pTag, 0, wxALL|wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+        wxFlexGridSizer* fgSizer1;
+        fgSizer1 = new wxFlexGridSizer( 0, 3, 0, 0 );
+        fgSizer1->AddGrowableCol( 2 );
+        fgSizer1->SetFlexibleDirection( wxBOTH );
+        fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText1 = new wxStaticText( m_pTitled, wxID_ANY, _("Group"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText1->Wrap( -1 );
+        fgSizer1->Add( m_staticText1, 0, wxALL, 5 );
+
+        m_staticText2 = new wxStaticText( m_pTitled, wxID_ANY, _("Element"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText2->Wrap( -1 );
+        fgSizer1->Add( m_staticText2, 0, wxALL, 5 );
+
+        m_staticText3 = new wxStaticText( m_pTitled, wxID_ANY, _("Value"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText3->Wrap( -1 );
+        fgSizer1->Add( m_staticText3, 0, wxALL, 5 );
+
+        m_pTextGroup = new wxTextCtrl( m_pTitled, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pTextGroup->SetMaxLength( 4 );
+        fgSizer1->Add( m_pTextGroup, 0, wxALL, 5 );
+
+        m_pTextElement = new wxTextCtrl( m_pTitled, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pTextElement->SetMaxLength( 4 );
+        fgSizer1->Add( m_pTextElement, 0, wxALL, 5 );
+
+        m_pTextValue = new wxTextCtrl( m_pTitled, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pTextValue->SetMaxLength( 0 );
+        fgSizer1->Add( m_pTextValue, 0, wxALL|wxEXPAND, 5 );
+
+
+        bSizer8->Add( fgSizer1, 1, wxEXPAND, 5 );
+
+
+        m_pTitled->SetSizer( bSizer8 );
+        m_pTitled->Layout();
+        bSizer8->Fit( m_pTitled );
+        bSizer7->Add( m_pTitled, 1, wxEXPAND | wxALL, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer6->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer10;
+        bSizer10 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer10->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button5 = new wxButton( m_pFooter, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer10->Add( m_button5, 0, wxRIGHT, 5 );
+
+        m_button6 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer10->Add( m_button6, 0, 0, 5 );
+
+
+        m_pFooter->SetSizer( bSizer10 );
+        m_pFooter->Layout();
+        bSizer10->Fit( m_pFooter );
+        bSizer6->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer6 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pTag->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( AnonymizeAddTagDialogBase::OnTagSelection ), NULL, this );
+        m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AnonymizeAddTagDialogBase::OnOkClick ), NULL, this );
+}
+
+AnonymizeAddTagDialogBase::~AnonymizeAddTagDialogBase()
+{
+        // Disconnect Events
+        m_pTag->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( AnonymizeAddTagDialogBase::OnTagSelection ), NULL, this );
+        m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AnonymizeAddTagDialogBase::OnOkClick ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/anonymize/anonymizepanelbase.h b/cadxcore/main/gui/anonymize/anonymizepanelbase.h
new file mode 100644
index 0000000..1be53c6
--- /dev/null
+++ b/cadxcore/main/gui/anonymize/anonymizepanelbase.h
@@ -0,0 +1,174 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __ANONYMIZEPANELBASE_H__
+#define __ANONYMIZEPANELBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class HeaderPanel;
+class SubTitledPanel;
+class SubTitledPanelSeparatorV;
+class TitledPanel;
+
+#include <wx/string.h>
+#include <wx/checkbox.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/propgrid/propgrid.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+#include <wx/choice.h>
+#include <wx/stattext.h>
+#include <wx/textctrl.h>
+#include <wx/valgen.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class AnonymizePanelBase
+///////////////////////////////////////////////////////////////////////////////
+class AnonymizePanelBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pPanelCampos;
+        wxCheckBox* m_pCheckNombrePaciente;
+        wxCheckBox* m_pCheckIdPaciente;
+        wxCheckBox* m_pCheckInstituciones;
+        wxCheckBox* m_pReferringPhysician;
+        wxCheckBox* m_pCheckComentarios;
+        wxCheckBox* m_pCheckAtributosPrivadosGinkgo;
+        SubTitledPanelSeparatorV* m_panel5;
+        SubTitledPanel* m_pTagsPanel;
+        wxPropertyGrid* m_pTagsList;
+        wxButton* m_button4;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnCheckNombreApellidos( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCheckIdPaciente( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCheckInstituciones( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCheckPhysician( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCheckComentarios( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAddNewTag( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        AnonymizePanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL );
+        ~AnonymizePanelBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class AnonymizeDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class AnonymizeDialogBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        FooterPanel* m_pFooter;
+        wxButton* m_pOverwrite;
+        wxButton* m_pCreateNew;
+        wxButton* m_pCancel;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnOverwriteClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCreateNewClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+        wxBoxSizer* m_pBodySizer;
+
+        AnonymizeDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Anonymize"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~AnonymizeDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class AnonymizeAddTagDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class AnonymizeAddTagDialogBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pTitled;
+        wxChoice* m_pTag;
+        wxStaticText* m_staticText1;
+        wxStaticText* m_staticText2;
+        wxStaticText* m_staticText3;
+        wxTextCtrl* m_pTextGroup;
+        wxTextCtrl* m_pTextElement;
+        wxTextCtrl* m_pTextValue;
+        FooterPanel* m_pFooter;
+        wxButton* m_button5;
+        wxButton* m_button6;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnTagSelection( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnOkClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        AnonymizeAddTagDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Add DICOM tag"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 550,280 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~AnonymizeAddTagDialogBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__ANONYMIZEPANELBASE_H__
diff --git a/cadxcore/main/gui/configuration/PanelesConfiguracion.fbp b/cadxcore/main/gui/configuration/PanelesConfiguracion.fbp
new file mode 100644
index 0000000..72e2f91
--- /dev/null
+++ b/cadxcore/main/gui/configuration/PanelesConfiguracion.fbp
@@ -0,0 +1,34475 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">panelesconfiguracionginkgobase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">PanelesConfiguracion</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">860,300</property>
+            <property name="name">DialogoConfiguracionBase</property>
+            <property name="pos"></property>
+            <property name="size">860,565</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass"></property>
+            <property name="title"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer3</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Settings</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pImagePanel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Settings</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer43</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxSplitterWindow" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg">243,243,243</property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_pane_size">100</property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_splitter2</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="sashgravity">0.0</property>
+                                    <property name="sashpos">245</property>
+                                    <property name="sashsize">-1</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="splitmode">wxSPLIT_VERTICAL</property>
+                                    <property name="style">wxSP_3D</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnSplitterDClick"></event>
+                                    <event name="OnSplitterSashPosChanged"></event>
+                                    <event name="OnSplitterSashPosChanging"></event>
+                                    <event name="OnSplitterUnsplit"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="splitteritem" expanded="0">
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size">180,-1</property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_panel1</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer5</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxTreeCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pTreeNavegacion</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnTreeBeginDrag"></event>
+                                                        <event name="OnTreeBeginLabelEdit"></event>
+                                                        <event name="OnTreeBeginRDrag"></event>
+                                                        <event name="OnTreeDeleteItem"></event>
+                                                        <event name="OnTreeEndDrag"></event>
+                                                        <event name="OnTreeEndLabelEdit"></event>
+                                                        <event name="OnTreeGetInfo"></event>
+                                                        <event name="OnTreeItemActivated"></event>
+                                                        <event name="OnTreeItemCollapsed"></event>
+                                                        <event name="OnTreeItemCollapsing"></event>
+                                                        <event name="OnTreeItemExpanded"></event>
+                                                        <event name="OnTreeItemExpanding"></event>
+                                                        <event name="OnTreeItemGetTooltip"></event>
+                                                        <event name="OnTreeItemMenu"></event>
+                                                        <event name="OnTreeItemMiddleClick"></event>
+                                                        <event name="OnTreeItemRightClick"></event>
+                                                        <event name="OnTreeKeyDown"></event>
+                                                        <event name="OnTreeSelChanged">OnCambioNodoNavegacion</event>
+                                                        <event name="OnTreeSelChanging"></event>
+                                                        <event name="OnTreeSetInfo"></event>
+                                                        <event name="OnTreeStateImageClick"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="splitteritem" expanded="0">
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size">-1,-1</property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pTitledPanelConfig</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass">TitledPanelSinBorder; wx/ginkgostyle/ginkgostyle.h</property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer44</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxPanel" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pPanelConfig</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="subclass">PanelScrollable; wx/ginkgostyle/ginkgostyle.h</property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                        <object class="wxBoxSizer" expanded="0">
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_pSizerPaneles</property>
+                                                            <property name="orient">wxVERTICAL</property>
+                                                            <property name="permission">protected</property>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel3</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer22</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Export config...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_button12</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnExportarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxRIGHT|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Import config...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_button13</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnImportarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer21</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxRIGHT|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_OK</property>
+                                            <property name="label">Accept</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_button8</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnAceptarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxRIGHT|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_CANCEL</property>
+                                            <property name="label">Cancel</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_button9</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnCancelarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">0</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Apply</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pBAplicar</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnAplicarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">450,-1</property>
+            <property name="name">PanelConfiguracionEstacionBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass">; </property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer4</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panelPhysician</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Physician</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxFlexGridSizer" expanded="0">
+                            <property name="cols">2</property>
+                            <property name="flexible_direction">wxBOTH</property>
+                            <property name="growablecols">1</property>
+                            <property name="growablerows"></property>
+                            <property name="hgap">0</property>
+                            <property name="minimum_size"></property>
+                            <property name="name">fgSizer2</property>
+                            <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                            <property name="permission">none</property>
+                            <property name="rows">0</property>
+                            <property name="vgap">0</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Physician's name</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticText1</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT</property>
+                                <property name="proportion">1</property>
+                                <object class="wxTextCtrl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="maxlength">0</property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pMedicoNombre</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size">-1,-1</property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="value"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText">OnTextoCambiado</event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnTextMaxLen"></event>
+                                    <event name="OnTextURL"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Physician's Id</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticText11</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxLEFT</property>
+                                <property name="proportion">1</property>
+                                <object class="wxTextCtrl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="maxlength">0</property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pMedicoId</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="value"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText">OnTextoCambiado</event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnTextMaxLen"></event>
+                                    <event name="OnTextURL"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSep11</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panelServicio</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Service</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxFlexGridSizer" expanded="0">
+                            <property name="cols">2</property>
+                            <property name="flexible_direction">wxBOTH</property>
+                            <property name="growablecols">1</property>
+                            <property name="growablerows"></property>
+                            <property name="hgap">0</property>
+                            <property name="minimum_size"></property>
+                            <property name="name">fgSizer22</property>
+                            <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                            <property name="permission">none</property>
+                            <property name="rows">0</property>
+                            <property name="vgap">0</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxTOP|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Service's name</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticText39</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxTOP|wxLEFT|wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxTextCtrl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="maxlength">0</property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pServicioNombre</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="value"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText"></event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnTextMaxLen"></event>
+                                    <event name="OnTextURL"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Service's Id</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticText12</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+                                <property name="proportion">1</property>
+                                <object class="wxTextCtrl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="maxlength">0</property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pServicioId</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size">-1,-1</property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="value"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText">OnTextoCambiado</event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnTextMaxLen"></event>
+                                    <event name="OnTextURL"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSep1</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelInstitucion</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Local institution</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxFlexGridSizer" expanded="0">
+                            <property name="cols">2</property>
+                            <property name="flexible_direction">wxBOTH</property>
+                            <property name="growablecols">1</property>
+                            <property name="growablerows"></property>
+                            <property name="hgap">0</property>
+                            <property name="minimum_size"></property>
+                            <property name="name">fgSizer21</property>
+                            <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                            <property name="permission">none</property>
+                            <property name="rows">0</property>
+                            <property name="vgap">0</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Institution's name</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticText13</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT</property>
+                                <property name="proportion">1</property>
+                                <object class="wxTextCtrl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="maxlength">0</property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pCentroNombre</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size">-1,-1</property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="value"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText">OnTextoCambiado</event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnTextMaxLen"></event>
+                                    <event name="OnTextURL"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Institution's Id</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticText111</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxLEFT</property>
+                                <property name="proportion">1</property>
+                                <object class="wxTextCtrl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="maxlength">0</property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pCentroId</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="value"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText">OnTextoCambiado</event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnTextMaxLen"></event>
+                                    <event name="OnTextURL"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSep12</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelInstitucion1</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Dicomized files</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxFlexGridSizer" expanded="0">
+                            <property name="cols">2</property>
+                            <property name="flexible_direction">wxBOTH</property>
+                            <property name="growablecols">1</property>
+                            <property name="growablerows"></property>
+                            <property name="hgap">0</property>
+                            <property name="minimum_size"></property>
+                            <property name="name">fgSizer211</property>
+                            <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                            <property name="permission">none</property>
+                            <property name="rows">0</property>
+                            <property name="vgap">0</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Charset</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticText131</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxComboBox" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="choices">"ISO_IR 192" "ISO_IR 6" "ISO_IR 100" "ISO_IR 101" "ISO_IR 109" "ISO_IR 110" "ISO_IR 126" "ISO_IR 127" "ISO_IR 138" "ISO_IR 144" "ISO_IR 148"</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pComboCharset</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="selection">-1</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxCB_READONLY|wxCB_SORT</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="value"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnCombobox">OnTextoCambiado</event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText"></event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">450,-1</property>
+            <property name="name">PanelConfiguracionGeneralBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass">; </property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer4</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pLanguage</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Language</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer32</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Language</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticText34</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxComboBox" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="choices"></property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pComboLanguage</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="selection">-1</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxCB_DROPDOWN|wxCB_READONLY</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="value"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnCombobox">OnIdiomaCambiado</event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText"></event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSep3</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pUpdate</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Misc</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer321</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxCheckBox" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="checked">1</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Automatically check for updates</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pCheckForUpdates</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnCheckBox">OnCheckForUpdates</event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxCheckBox" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="checked">1</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Help us sending anonymous usage data (no patient data will be sent)</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pCheckAnonUsageStats</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnCheckBox">OnCheckForUpdates</event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSep31</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pProxy</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Proxy settings</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer3211</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxCheckBox" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="checked">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Enable http proxy</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pEnableProxy</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnCheckBox">OnCheckEnableProxySettings</event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">0</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Proxy settings</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pProxySettingsButton</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnProxySettings</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">400,500</property>
+            <property name="name">ProxySettingsDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">400,570</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">Proxy Settings</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer11</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Proxy Settings</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer85</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_panel64</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Server settings</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxFlexGridSizer" expanded="0">
+                                        <property name="cols">2</property>
+                                        <property name="flexible_direction">wxBOTH</property>
+                                        <property name="growablecols">1</property>
+                                        <property name="growablerows"></property>
+                                        <property name="hgap">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="name">fgSizer4</property>
+                                        <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                        <property name="permission">none</property>
+                                        <property name="rows">0</property>
+                                        <property name="vgap">0</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Host</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pstaticText1</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxTextCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">0</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pHost</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size">150,-1</property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Port</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pStaticText22</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxTextCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">0</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pPort</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size">150,-1</property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_panel641</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Server settings</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_panel642</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Authentication</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer141</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="checked">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Proxy server requires authentication</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pCheckAuthentication</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCheckBox">OnCheckAuthentication</event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxFlexGridSizer" expanded="0">
+                                                <property name="cols">2</property>
+                                                <property name="flexible_direction">wxBOTH</property>
+                                                <property name="growablecols">1</property>
+                                                <property name="growablerows"></property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">fgSizer42</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="rows">0</property>
+                                                <property name="vgap">0</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Username</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pstaticText12</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pUsername</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size">150,-1</property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Password</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">Port2</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pPassword</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size">150,-1</property>
+                                                        <property name="style">wxTE_PASSWORD</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_panel6411</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Server settings</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_panel6421</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Exceptions</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer1411</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxTOP|wxBOTTOM</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">No proxy for addresses containing</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText115</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxTextCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pExceptions</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxTOP|wxBOTTOM</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Separate addresses with commas.</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText116</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer31</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button37</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnOkClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button38</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCancelClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">LocalDatabaseConfigurationPanelBase</property>
+            <property name="pos"></property>
+            <property name="size">500,300</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize">OnSize</event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer4</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size">-1,-1</property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelDicomDir</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">DICOM Dir</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer30</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">DICOM Dir is the local directory where history is stored</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticTextExplicacion</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">440</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxFlexGridSizer" expanded="0">
+                                    <property name="cols">3</property>
+                                    <property name="flexible_direction">wxBOTH</property>
+                                    <property name="growablecols">1</property>
+                                    <property name="growablerows"></property>
+                                    <property name="hgap">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">fgSizer9</property>
+                                    <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                    <property name="permission">none</property>
+                                    <property name="rows">0</property>
+                                    <property name="vgap">0</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">DICOM Dir</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText32</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxTextCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="maxlength">0</property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pDICOMDir</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnText">OnTextoCambiado</event>
+                                            <event name="OnTextEnter"></event>
+                                            <event name="OnTextMaxLen"></event>
+                                            <event name="OnTextURL"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_buttonSeleccionarDICOMDir</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style">wxBU_EXACTFIT</property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnSeleccionarDirectorio</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND|wxTOP</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg">210,0,0</property>
+                                    <property name="floatable">1</property>
+                                    <property name="font">,90,92,-1,70,0</property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Warning, to update the directory, you have to close every opened series</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pstaticTextAdvertencia</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">440</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND|wxTOP</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticBoxSizer" expanded="0">
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Auto-cleaning</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">sbSizer7</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxFlexGridSizer" expanded="0">
+                                            <property name="cols">2</property>
+                                            <property name="flexible_direction">wxBOTH</property>
+                                            <property name="growablecols">0</property>
+                                            <property name="growablerows"></property>
+                                            <property name="hgap">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="name">fgSizer20</property>
+                                            <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                            <property name="permission">none</property>
+                                            <property name="rows">0</property>
+                                            <property name="vgap">0</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxCheckBox" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="checked">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Delete studies with acquisition date older than:</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pCheckDeleteOlder</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnCheckBox">OnCheckOlderStudies</event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxEXPAND</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxChoice" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="choices"></property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">0</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pChoiceDeleteOlder</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="selection">0</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnChoice">OnOptionModified</event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxCheckBox" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="checked">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Delete older studies when hd free space is less than:</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pCheckHDFreeSpace</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnCheckBox">OnCheckHDSpace</event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxEXPAND</property>
+                                                <property name="proportion">1</property>
+                                                <object class="wxBoxSizer" expanded="0">
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">bSizer106</property>
+                                                    <property name="orient">wxHORIZONTAL</property>
+                                                    <property name="permission">none</property>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALL</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxSpinCtrl" expanded="0">
+                                                            <property name="BottomDockable">1</property>
+                                                            <property name="LeftDockable">1</property>
+                                                            <property name="RightDockable">1</property>
+                                                            <property name="TopDockable">1</property>
+                                                            <property name="aui_layer"></property>
+                                                            <property name="aui_name"></property>
+                                                            <property name="aui_position"></property>
+                                                            <property name="aui_row"></property>
+                                                            <property name="best_size"></property>
+                                                            <property name="bg"></property>
+                                                            <property name="caption"></property>
+                                                            <property name="caption_visible">1</property>
+                                                            <property name="center_pane">0</property>
+                                                            <property name="close_button">1</property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default_pane">0</property>
+                                                            <property name="dock">Dock</property>
+                                                            <property name="dock_fixed">0</property>
+                                                            <property name="docking">Left</property>
+                                                            <property name="enabled">0</property>
+                                                            <property name="fg"></property>
+                                                            <property name="floatable">1</property>
+                                                            <property name="font"></property>
+                                                            <property name="gripper">0</property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="initial">10240</property>
+                                                            <property name="max">2147483647</property>
+                                                            <property name="max_size"></property>
+                                                            <property name="maximize_button">0</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="min">10</property>
+                                                            <property name="min_size"></property>
+                                                            <property name="minimize_button">0</property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="moveable">1</property>
+                                                            <property name="name">m_pSpinHDSpace</property>
+                                                            <property name="pane_border">1</property>
+                                                            <property name="pane_position"></property>
+                                                            <property name="pane_size"></property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pin_button">1</property>
+                                                            <property name="pos"></property>
+                                                            <property name="resize">Resizable</property>
+                                                            <property name="show">1</property>
+                                                            <property name="size"></property>
+                                                            <property name="style">wxSP_ARROW_KEYS</property>
+                                                            <property name="subclass"></property>
+                                                            <property name="toolbar_pane">0</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="value"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnSpinCtrl">OnSpinCtrl</event>
+                                                            <event name="OnSpinCtrlText">OnOptionModified</event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxStaticText" expanded="0">
+                                                            <property name="BottomDockable">1</property>
+                                                            <property name="LeftDockable">1</property>
+                                                            <property name="RightDockable">1</property>
+                                                            <property name="TopDockable">1</property>
+                                                            <property name="aui_layer"></property>
+                                                            <property name="aui_name"></property>
+                                                            <property name="aui_position"></property>
+                                                            <property name="aui_row"></property>
+                                                            <property name="best_size"></property>
+                                                            <property name="bg"></property>
+                                                            <property name="caption"></property>
+                                                            <property name="caption_visible">1</property>
+                                                            <property name="center_pane">0</property>
+                                                            <property name="close_button">1</property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default_pane">0</property>
+                                                            <property name="dock">Dock</property>
+                                                            <property name="dock_fixed">0</property>
+                                                            <property name="docking">Left</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="floatable">1</property>
+                                                            <property name="font"></property>
+                                                            <property name="gripper">0</property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="label">MB</property>
+                                                            <property name="max_size"></property>
+                                                            <property name="maximize_button">0</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="min_size"></property>
+                                                            <property name="minimize_button">0</property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="moveable">1</property>
+                                                            <property name="name">m_staticText65</property>
+                                                            <property name="pane_border">1</property>
+                                                            <property name="pane_position"></property>
+                                                            <property name="pane_size"></property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pin_button">1</property>
+                                                            <property name="pos"></property>
+                                                            <property name="resize">Resizable</property>
+                                                            <property name="show">1</property>
+                                                            <property name="size"></property>
+                                                            <property name="style"></property>
+                                                            <property name="subclass"></property>
+                                                            <property name="toolbar_pane">0</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <property name="wrap">-1</property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxCheckBox" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="checked">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Delete studies when DICOM Dir size bigger than:</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pCheckDicomDirSize</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnCheckBox">OnCheckDicomDirSize</event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxEXPAND</property>
+                                                <property name="proportion">1</property>
+                                                <object class="wxBoxSizer" expanded="0">
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">bSizer1061</property>
+                                                    <property name="orient">wxHORIZONTAL</property>
+                                                    <property name="permission">none</property>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALL</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxSpinCtrl" expanded="0">
+                                                            <property name="BottomDockable">1</property>
+                                                            <property name="LeftDockable">1</property>
+                                                            <property name="RightDockable">1</property>
+                                                            <property name="TopDockable">1</property>
+                                                            <property name="aui_layer"></property>
+                                                            <property name="aui_name"></property>
+                                                            <property name="aui_position"></property>
+                                                            <property name="aui_row"></property>
+                                                            <property name="best_size"></property>
+                                                            <property name="bg"></property>
+                                                            <property name="caption"></property>
+                                                            <property name="caption_visible">1</property>
+                                                            <property name="center_pane">0</property>
+                                                            <property name="close_button">1</property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default_pane">0</property>
+                                                            <property name="dock">Dock</property>
+                                                            <property name="dock_fixed">0</property>
+                                                            <property name="docking">Left</property>
+                                                            <property name="enabled">0</property>
+                                                            <property name="fg"></property>
+                                                            <property name="floatable">1</property>
+                                                            <property name="font"></property>
+                                                            <property name="gripper">0</property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="initial">10240</property>
+                                                            <property name="max">2147483647</property>
+                                                            <property name="max_size"></property>
+                                                            <property name="maximize_button">0</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="min">10</property>
+                                                            <property name="min_size"></property>
+                                                            <property name="minimize_button">0</property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="moveable">1</property>
+                                                            <property name="name">m_pSpinDicomDirSize</property>
+                                                            <property name="pane_border">1</property>
+                                                            <property name="pane_position"></property>
+                                                            <property name="pane_size"></property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pin_button">1</property>
+                                                            <property name="pos"></property>
+                                                            <property name="resize">Resizable</property>
+                                                            <property name="show">1</property>
+                                                            <property name="size"></property>
+                                                            <property name="style">wxSP_ARROW_KEYS</property>
+                                                            <property name="subclass"></property>
+                                                            <property name="toolbar_pane">0</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="value"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnSpinCtrl">OnSpinCtrl</event>
+                                                            <event name="OnSpinCtrlText">OnOptionModified</event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxStaticText" expanded="0">
+                                                            <property name="BottomDockable">1</property>
+                                                            <property name="LeftDockable">1</property>
+                                                            <property name="RightDockable">1</property>
+                                                            <property name="TopDockable">1</property>
+                                                            <property name="aui_layer"></property>
+                                                            <property name="aui_name"></property>
+                                                            <property name="aui_position"></property>
+                                                            <property name="aui_row"></property>
+                                                            <property name="best_size"></property>
+                                                            <property name="bg"></property>
+                                                            <property name="caption"></property>
+                                                            <property name="caption_visible">1</property>
+                                                            <property name="center_pane">0</property>
+                                                            <property name="close_button">1</property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default_pane">0</property>
+                                                            <property name="dock">Dock</property>
+                                                            <property name="dock_fixed">0</property>
+                                                            <property name="docking">Left</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="floatable">1</property>
+                                                            <property name="font"></property>
+                                                            <property name="gripper">0</property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="label">MB</property>
+                                                            <property name="max_size"></property>
+                                                            <property name="maximize_button">0</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="min_size"></property>
+                                                            <property name="minimize_button">0</property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="moveable">1</property>
+                                                            <property name="name">m_staticText651</property>
+                                                            <property name="pane_border">1</property>
+                                                            <property name="pane_position"></property>
+                                                            <property name="pane_size"></property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pin_button">1</property>
+                                                            <property name="pos"></property>
+                                                            <property name="resize">Resizable</property>
+                                                            <property name="show">1</property>
+                                                            <property name="size"></property>
+                                                            <property name="style"></property>
+                                                            <property name="subclass"></property>
+                                                            <property name="toolbar_pane">0</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <property name="wrap">-1</property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font">,90,90,7,70,0</property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">This feature only affects to studies COPIED to DICOM Dir and not in use</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText68</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Reset to default</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button66</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnResetToDefault</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">PanelConfiguracionPACSBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass">; </property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize">OnSize</event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer6</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPACSLocal</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Local PACS</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer36</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">8</property>
+                                <property name="flag">wxEXPAND|wxBOTTOM</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">You must configure the local AET, which is used to communicate with the PACS server. The specified port must be opened in the firewall, as it is essential for transfers.</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size">450,-1</property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticTextExplicacion</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">440</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxFlexGridSizer" expanded="0">
+                                    <property name="cols">2</property>
+                                    <property name="flexible_direction">wxBOTH</property>
+                                    <property name="growablecols">1</property>
+                                    <property name="growablerows"></property>
+                                    <property name="hgap">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">fgSizer2</property>
+                                    <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                    <property name="permission">none</property>
+                                    <property name="rows">0</property>
+                                    <property name="vgap">0</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Local AET</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText1</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxBoxSizer" expanded="0">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">bSizer31</property>
+                                            <property name="orient">wxHORIZONTAL</property>
+                                            <property name="permission">none</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxTextCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="maxlength">0</property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pAETLocal</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size">300,-1</property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnText">OnTextoCambiado</event>
+                                                    <event name="OnTextEnter"></event>
+                                                    <event name="OnTextMaxLen"></event>
+                                                    <event name="OnTextURL"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">1</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label"></property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pAETReal</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticBitmap" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="bitmap"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pHelpBitmap</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip">For large-scale implementation in a homogenous environment, you can specify the following wildcards in the local AET:&#x0A;&#x09;%IP IP Address&#x0A;&#x09;%IP<n> n-th Octet (1~4)&#x0A;&#x09;%HOSTNAME Host Name"</property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp">OnHelpClick</event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Port</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText11</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxTextCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="maxlength">0</property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pPuertoLocal</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnText">OnTextoCambiado</event>
+                                            <event name="OnTextEnter"></event>
+                                            <event name="OnTextMaxLen"></event>
+                                            <event name="OnTextURL"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="spacer" expanded="0">
+                                            <property name="height">0</property>
+                                            <property name="permission">protected</property>
+                                            <property name="width">0</property>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_RIGHT|wxTOP</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Advanced settings...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pBAdvanced</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnAdvancedLocal</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSep</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPACSServers</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">DICOM Nodes</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer25</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="CustomControl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="class">wxDataViewListCtrl</property>
+                                    <property name="close_button">1</property>
+                                    <property name="construction">m_pListPacs = new wxDataViewListCtrl(m_pPACSServers, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="declaration">wxDataViewListCtrl* m_pListPacs;</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="include">#include <wx/dataview.h></property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pListPacs</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="settings"></property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer26</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">New ...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_button3</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnNuevoClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">0</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Edit ...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pEditButton</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnEditarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">0</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Delete</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pDelButton</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnEliminarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="spacer" expanded="0">
+                                            <property name="height">0</property>
+                                            <property name="permission">protected</property>
+                                            <property name="width">0</property>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">0</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Set Default</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pDefaultButton</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnSetDefaultClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">450,550</property>
+            <property name="name">DialogoServidorPACSBase</property>
+            <property name="pos"></property>
+            <property name="size">450,550</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass"></property>
+            <property name="title">DICOM Node</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer11</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">DICOM Node</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxTOP</property>
+                    <property name="proportion">1</property>
+                    <object class="wxNotebook" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="bitmapsize"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_notebook1</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnNotebookPageChanged"></event>
+                        <event name="OnNotebookPageChanging"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="notebookpage" expanded="0">
+                            <property name="bitmap"></property>
+                            <property name="label">DICOM Node</property>
+                            <property name="select">1</property>
+                            <object class="wxPanel" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_panel6</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer85</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_panel64</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Settings</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                            <object class="wxFlexGridSizer" expanded="0">
+                                                <property name="cols">2</property>
+                                                <property name="flexible_direction">wxBOTH</property>
+                                                <property name="growablecols">1</property>
+                                                <property name="growablerows"></property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">fgSizer4</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="rows">0</property>
+                                                <property name="vgap">0</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Id</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pstaticText1</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pId</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size">150,-1</property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">AET</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pstaticText2</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pAET</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size">150,-1</property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Host</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pstaticText3</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pHost</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size">150,-1</property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Port</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pstaticText4</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pPuerto</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">PDU (KB)</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText33</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxSpinCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="initial">16384</property>
+                                                        <property name="max">16384</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min">4096</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pPDU</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxSP_ARROW_KEYS</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnSpinCtrl"></event>
+                                                        <event name="OnSpinCtrlText"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Retrieve method</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText48</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxChoice" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="choices">"Move" "Get" "WADO"</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pRetrieveMethod</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="selection">0</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnChoice">OnRetrieveMethodChoice</event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">WADO URL</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText59</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">0</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pWadoURL</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Retrieve mode</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText60</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxChoice" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="choices">"Series" "Studies"</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pRetrieveMode</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="selection">0</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnChoice"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Reuse connection</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText57</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxCheckBox" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="checked">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label"></property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pReuseConnection</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip">Reuse connections when is needed to make more than one queries</property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCheckBox"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="notebookpage" expanded="0">
+                            <property name="bitmap"></property>
+                            <property name="label">Worklist</property>
+                            <property name="select">0</property>
+                            <object class="wxPanel" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pWorkListPanel</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer104</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_panel83</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Worklists</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer106</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Select how do you want to handle MPPS items</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText611</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxCheckBox" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="checked">1</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">DICOM MPPS</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pCheckDICOMMPPS</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCheckBox"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxCheckBox" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="checked">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">HL7 messages</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pCheckHL7</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCheckBox">OnChecWL</event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND | wxALL</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxPanel" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pPanelHL7</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                        <object class="wxStaticBoxSizer" expanded="0">
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="label">HL7</property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_pSizerHL7</property>
+                                                            <property name="orient">wxVERTICAL</property>
+                                                            <property name="permission">protected</property>
+                                                            <event name="OnUpdateUI"></event>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxEXPAND</property>
+                                                                <property name="proportion">1</property>
+                                                                <object class="wxFlexGridSizer" expanded="0">
+                                                                    <property name="cols">2</property>
+                                                                    <property name="flexible_direction">wxBOTH</property>
+                                                                    <property name="growablecols">1</property>
+                                                                    <property name="growablerows"></property>
+                                                                    <property name="hgap">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="name">fgSizer18</property>
+                                                                    <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                                    <property name="permission">none</property>
+                                                                    <property name="rows">0</property>
+                                                                    <property name="vgap">0</property>
+                                                                    <object class="sizeritem" expanded="0">
+                                                                        <property name="border">5</property>
+                                                                        <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                                        <property name="proportion">0</property>
+                                                                        <object class="wxCheckBox" expanded="0">
+                                                                            <property name="BottomDockable">1</property>
+                                                                            <property name="LeftDockable">1</property>
+                                                                            <property name="RightDockable">1</property>
+                                                                            <property name="TopDockable">1</property>
+                                                                            <property name="aui_layer"></property>
+                                                                            <property name="aui_name"></property>
+                                                                            <property name="aui_position"></property>
+                                                                            <property name="aui_row"></property>
+                                                                            <property name="best_size"></property>
+                                                                            <property name="bg"></property>
+                                                                            <property name="caption"></property>
+                                                                            <property name="caption_visible">1</property>
+                                                                            <property name="center_pane">0</property>
+                                                                            <property name="checked">0</property>
+                                                                            <property name="close_button">1</property>
+                                                                            <property name="context_help"></property>
+                                                                            <property name="context_menu">1</property>
+                                                                            <property name="default_pane">0</property>
+                                                                            <property name="dock">Dock</property>
+                                                                            <property name="dock_fixed">0</property>
+                                                                            <property name="docking">Left</property>
+                                                                            <property name="enabled">1</property>
+                                                                            <property name="fg"></property>
+                                                                            <property name="floatable">1</property>
+                                                                            <property name="font"></property>
+                                                                            <property name="gripper">0</property>
+                                                                            <property name="hidden">0</property>
+                                                                            <property name="id">wxID_ANY</property>
+                                                                            <property name="label">Abort message</property>
+                                                                            <property name="max_size"></property>
+                                                                            <property name="maximize_button">0</property>
+                                                                            <property name="maximum_size"></property>
+                                                                            <property name="min_size"></property>
+                                                                            <property name="minimize_button">0</property>
+                                                                            <property name="minimum_size"></property>
+                                                                            <property name="moveable">1</property>
+                                                                            <property name="name">m_pCheckAbort</property>
+                                                                            <property name="pane_border">1</property>
+                                                                            <property name="pane_position"></property>
+                                                                            <property name="pane_size"></property>
+                                                                            <property name="permission">protected</property>
+                                                                            <property name="pin_button">1</property>
+                                                                            <property name="pos"></property>
+                                                                            <property name="resize">Resizable</property>
+                                                                            <property name="show">1</property>
+                                                                            <property name="size"></property>
+                                                                            <property name="style"></property>
+                                                                            <property name="subclass"></property>
+                                                                            <property name="toolbar_pane">0</property>
+                                                                            <property name="tooltip"></property>
+                                                                            <property name="validator_data_type"></property>
+                                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                                            <property name="validator_variable"></property>
+                                                                            <property name="window_extra_style"></property>
+                                                                            <property name="window_name"></property>
+                                                                            <property name="window_style"></property>
+                                                                            <event name="OnChar"></event>
+                                                                            <event name="OnCheckBox">OnChecWL</event>
+                                                                            <event name="OnEnterWindow"></event>
+                                                                            <event name="OnEraseBackground"></event>
+                                                                            <event name="OnKeyDown"></event>
+                                                                            <event name="OnKeyUp"></event>
+                                                                            <event name="OnKillFocus"></event>
+                                                                            <event name="OnLeaveWindow"></event>
+                                                                            <event name="OnLeftDClick"></event>
+                                                                            <event name="OnLeftDown"></event>
+                                                                            <event name="OnLeftUp"></event>
+                                                                            <event name="OnMiddleDClick"></event>
+                                                                            <event name="OnMiddleDown"></event>
+                                                                            <event name="OnMiddleUp"></event>
+                                                                            <event name="OnMotion"></event>
+                                                                            <event name="OnMouseEvents"></event>
+                                                                            <event name="OnMouseWheel"></event>
+                                                                            <event name="OnPaint"></event>
+                                                                            <event name="OnRightDClick"></event>
+                                                                            <event name="OnRightDown"></event>
+                                                                            <event name="OnRightUp"></event>
+                                                                            <event name="OnSetFocus"></event>
+                                                                            <event name="OnSize"></event>
+                                                                            <event name="OnUpdateUI"></event>
+                                                                        </object>
+                                                                    </object>
+                                                                    <object class="sizeritem" expanded="0">
+                                                                        <property name="border">5</property>
+                                                                        <property name="flag">wxALL|wxEXPAND</property>
+                                                                        <property name="proportion">1</property>
+                                                                        <object class="wxTextCtrl" expanded="0">
+                                                                            <property name="BottomDockable">1</property>
+                                                                            <property name="LeftDockable">1</property>
+                                                                            <property name="RightDockable">1</property>
+                                                                            <property name="TopDockable">1</property>
+                                                                            <property name="aui_layer"></property>
+                                                                            <property name="aui_name"></property>
+                                                                            <property name="aui_position"></property>
+                                                                            <property name="aui_row"></property>
+                                                                            <property name="best_size"></property>
+                                                                            <property name="bg"></property>
+                                                                            <property name="caption"></property>
+                                                                            <property name="caption_visible">1</property>
+                                                                            <property name="center_pane">0</property>
+                                                                            <property name="close_button">1</property>
+                                                                            <property name="context_help"></property>
+                                                                            <property name="context_menu">1</property>
+                                                                            <property name="default_pane">0</property>
+                                                                            <property name="dock">Dock</property>
+                                                                            <property name="dock_fixed">0</property>
+                                                                            <property name="docking">Left</property>
+                                                                            <property name="enabled">1</property>
+                                                                            <property name="fg"></property>
+                                                                            <property name="floatable">1</property>
+                                                                            <property name="font"></property>
+                                                                            <property name="gripper">0</property>
+                                                                            <property name="hidden">0</property>
+                                                                            <property name="id">wxID_ANY</property>
+                                                                            <property name="max_size"></property>
+                                                                            <property name="maximize_button">0</property>
+                                                                            <property name="maximum_size"></property>
+                                                                            <property name="maxlength">0</property>
+                                                                            <property name="min_size"></property>
+                                                                            <property name="minimize_button">0</property>
+                                                                            <property name="minimum_size"></property>
+                                                                            <property name="moveable">1</property>
+                                                                            <property name="name">m_pTextAbort</property>
+                                                                            <property name="pane_border">1</property>
+                                                                            <property name="pane_position"></property>
+                                                                            <property name="pane_size"></property>
+                                                                            <property name="permission">protected</property>
+                                                                            <property name="pin_button">1</property>
+                                                                            <property name="pos"></property>
+                                                                            <property name="resize">Resizable</property>
+                                                                            <property name="show">1</property>
+                                                                            <property name="size"></property>
+                                                                            <property name="style">wxTE_MULTILINE</property>
+                                                                            <property name="subclass"></property>
+                                                                            <property name="toolbar_pane">0</property>
+                                                                            <property name="tooltip"></property>
+                                                                            <property name="validator_data_type"></property>
+                                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                                            <property name="validator_variable"></property>
+                                                                            <property name="value"></property>
+                                                                            <property name="window_extra_style"></property>
+                                                                            <property name="window_name"></property>
+                                                                            <property name="window_style"></property>
+                                                                            <event name="OnChar"></event>
+                                                                            <event name="OnEnterWindow"></event>
+                                                                            <event name="OnEraseBackground"></event>
+                                                                            <event name="OnKeyDown"></event>
+                                                                            <event name="OnKeyUp"></event>
+                                                                            <event name="OnKillFocus"></event>
+                                                                            <event name="OnLeaveWindow"></event>
+                                                                            <event name="OnLeftDClick"></event>
+                                                                            <event name="OnLeftDown"></event>
+                                                                            <event name="OnLeftUp"></event>
+                                                                            <event name="OnMiddleDClick"></event>
+                                                                            <event name="OnMiddleDown"></event>
+                                                                            <event name="OnMiddleUp"></event>
+                                                                            <event name="OnMotion"></event>
+                                                                            <event name="OnMouseEvents"></event>
+                                                                            <event name="OnMouseWheel"></event>
+                                                                            <event name="OnPaint"></event>
+                                                                            <event name="OnRightDClick"></event>
+                                                                            <event name="OnRightDown"></event>
+                                                                            <event name="OnRightUp"></event>
+                                                                            <event name="OnSetFocus"></event>
+                                                                            <event name="OnSize"></event>
+                                                                            <event name="OnText"></event>
+                                                                            <event name="OnTextEnter"></event>
+                                                                            <event name="OnTextMaxLen"></event>
+                                                                            <event name="OnTextURL"></event>
+                                                                            <event name="OnUpdateUI"></event>
+                                                                        </object>
+                                                                    </object>
+                                                                    <object class="sizeritem" expanded="0">
+                                                                        <property name="border">5</property>
+                                                                        <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                                        <property name="proportion">0</property>
+                                                                        <object class="wxCheckBox" expanded="0">
+                                                                            <property name="BottomDockable">1</property>
+                                                                            <property name="LeftDockable">1</property>
+                                                                            <property name="RightDockable">1</property>
+                                                                            <property name="TopDockable">1</property>
+                                                                            <property name="aui_layer"></property>
+                                                                            <property name="aui_name"></property>
+                                                                            <property name="aui_position"></property>
+                                                                            <property name="aui_row"></property>
+                                                                            <property name="best_size"></property>
+                                                                            <property name="bg"></property>
+                                                                            <property name="caption"></property>
+                                                                            <property name="caption_visible">1</property>
+                                                                            <property name="center_pane">0</property>
+                                                                            <property name="checked">0</property>
+                                                                            <property name="close_button">1</property>
+                                                                            <property name="context_help"></property>
+                                                                            <property name="context_menu">1</property>
+                                                                            <property name="default_pane">0</property>
+                                                                            <property name="dock">Dock</property>
+                                                                            <property name="dock_fixed">0</property>
+                                                                            <property name="docking">Left</property>
+                                                                            <property name="enabled">1</property>
+                                                                            <property name="fg"></property>
+                                                                            <property name="floatable">1</property>
+                                                                            <property name="font"></property>
+                                                                            <property name="gripper">0</property>
+                                                                            <property name="hidden">0</property>
+                                                                            <property name="id">wxID_ANY</property>
+                                                                            <property name="label">Completed message</property>
+                                                                            <property name="max_size"></property>
+                                                                            <property name="maximize_button">0</property>
+                                                                            <property name="maximum_size"></property>
+                                                                            <property name="min_size"></property>
+                                                                            <property name="minimize_button">0</property>
+                                                                            <property name="minimum_size"></property>
+                                                                            <property name="moveable">1</property>
+                                                                            <property name="name">m_pCheckCompleted</property>
+                                                                            <property name="pane_border">1</property>
+                                                                            <property name="pane_position"></property>
+                                                                            <property name="pane_size"></property>
+                                                                            <property name="permission">protected</property>
+                                                                            <property name="pin_button">1</property>
+                                                                            <property name="pos"></property>
+                                                                            <property name="resize">Resizable</property>
+                                                                            <property name="show">1</property>
+                                                                            <property name="size"></property>
+                                                                            <property name="style"></property>
+                                                                            <property name="subclass"></property>
+                                                                            <property name="toolbar_pane">0</property>
+                                                                            <property name="tooltip"></property>
+                                                                            <property name="validator_data_type"></property>
+                                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                                            <property name="validator_variable"></property>
+                                                                            <property name="window_extra_style"></property>
+                                                                            <property name="window_name"></property>
+                                                                            <property name="window_style"></property>
+                                                                            <event name="OnChar"></event>
+                                                                            <event name="OnCheckBox">OnChecWL</event>
+                                                                            <event name="OnEnterWindow"></event>
+                                                                            <event name="OnEraseBackground"></event>
+                                                                            <event name="OnKeyDown"></event>
+                                                                            <event name="OnKeyUp"></event>
+                                                                            <event name="OnKillFocus"></event>
+                                                                            <event name="OnLeaveWindow"></event>
+                                                                            <event name="OnLeftDClick"></event>
+                                                                            <event name="OnLeftDown"></event>
+                                                                            <event name="OnLeftUp"></event>
+                                                                            <event name="OnMiddleDClick"></event>
+                                                                            <event name="OnMiddleDown"></event>
+                                                                            <event name="OnMiddleUp"></event>
+                                                                            <event name="OnMotion"></event>
+                                                                            <event name="OnMouseEvents"></event>
+                                                                            <event name="OnMouseWheel"></event>
+                                                                            <event name="OnPaint"></event>
+                                                                            <event name="OnRightDClick"></event>
+                                                                            <event name="OnRightDown"></event>
+                                                                            <event name="OnRightUp"></event>
+                                                                            <event name="OnSetFocus"></event>
+                                                                            <event name="OnSize"></event>
+                                                                            <event name="OnUpdateUI"></event>
+                                                                        </object>
+                                                                    </object>
+                                                                    <object class="sizeritem" expanded="0">
+                                                                        <property name="border">5</property>
+                                                                        <property name="flag">wxALL|wxEXPAND</property>
+                                                                        <property name="proportion">0</property>
+                                                                        <object class="wxTextCtrl" expanded="0">
+                                                                            <property name="BottomDockable">1</property>
+                                                                            <property name="LeftDockable">1</property>
+                                                                            <property name="RightDockable">1</property>
+                                                                            <property name="TopDockable">1</property>
+                                                                            <property name="aui_layer"></property>
+                                                                            <property name="aui_name"></property>
+                                                                            <property name="aui_position"></property>
+                                                                            <property name="aui_row"></property>
+                                                                            <property name="best_size"></property>
+                                                                            <property name="bg"></property>
+                                                                            <property name="caption"></property>
+                                                                            <property name="caption_visible">1</property>
+                                                                            <property name="center_pane">0</property>
+                                                                            <property name="close_button">1</property>
+                                                                            <property name="context_help"></property>
+                                                                            <property name="context_menu">1</property>
+                                                                            <property name="default_pane">0</property>
+                                                                            <property name="dock">Dock</property>
+                                                                            <property name="dock_fixed">0</property>
+                                                                            <property name="docking">Left</property>
+                                                                            <property name="enabled">1</property>
+                                                                            <property name="fg"></property>
+                                                                            <property name="floatable">1</property>
+                                                                            <property name="font"></property>
+                                                                            <property name="gripper">0</property>
+                                                                            <property name="hidden">0</property>
+                                                                            <property name="id">wxID_ANY</property>
+                                                                            <property name="max_size"></property>
+                                                                            <property name="maximize_button">0</property>
+                                                                            <property name="maximum_size"></property>
+                                                                            <property name="maxlength">0</property>
+                                                                            <property name="min_size"></property>
+                                                                            <property name="minimize_button">0</property>
+                                                                            <property name="minimum_size"></property>
+                                                                            <property name="moveable">1</property>
+                                                                            <property name="name">m_pTextCompleted</property>
+                                                                            <property name="pane_border">1</property>
+                                                                            <property name="pane_position"></property>
+                                                                            <property name="pane_size"></property>
+                                                                            <property name="permission">protected</property>
+                                                                            <property name="pin_button">1</property>
+                                                                            <property name="pos"></property>
+                                                                            <property name="resize">Resizable</property>
+                                                                            <property name="show">1</property>
+                                                                            <property name="size"></property>
+                                                                            <property name="style">wxTE_MULTILINE</property>
+                                                                            <property name="subclass"></property>
+                                                                            <property name="toolbar_pane">0</property>
+                                                                            <property name="tooltip"></property>
+                                                                            <property name="validator_data_type"></property>
+                                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                                            <property name="validator_variable"></property>
+                                                                            <property name="value"></property>
+                                                                            <property name="window_extra_style"></property>
+                                                                            <property name="window_name"></property>
+                                                                            <property name="window_style"></property>
+                                                                            <event name="OnChar"></event>
+                                                                            <event name="OnEnterWindow"></event>
+                                                                            <event name="OnEraseBackground"></event>
+                                                                            <event name="OnKeyDown"></event>
+                                                                            <event name="OnKeyUp"></event>
+                                                                            <event name="OnKillFocus"></event>
+                                                                            <event name="OnLeaveWindow"></event>
+                                                                            <event name="OnLeftDClick"></event>
+                                                                            <event name="OnLeftDown"></event>
+                                                                            <event name="OnLeftUp"></event>
+                                                                            <event name="OnMiddleDClick"></event>
+                                                                            <event name="OnMiddleDown"></event>
+                                                                            <event name="OnMiddleUp"></event>
+                                                                            <event name="OnMotion"></event>
+                                                                            <event name="OnMouseEvents"></event>
+                                                                            <event name="OnMouseWheel"></event>
+                                                                            <event name="OnPaint"></event>
+                                                                            <event name="OnRightDClick"></event>
+                                                                            <event name="OnRightDown"></event>
+                                                                            <event name="OnRightUp"></event>
+                                                                            <event name="OnSetFocus"></event>
+                                                                            <event name="OnSize"></event>
+                                                                            <event name="OnText"></event>
+                                                                            <event name="OnTextEnter"></event>
+                                                                            <event name="OnTextMaxLen"></event>
+                                                                            <event name="OnTextURL"></event>
+                                                                            <event name="OnUpdateUI"></event>
+                                                                        </object>
+                                                                    </object>
+                                                                    <object class="sizeritem" expanded="0">
+                                                                        <property name="border">5</property>
+                                                                        <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                                        <property name="proportion">0</property>
+                                                                        <object class="wxCheckBox" expanded="0">
+                                                                            <property name="BottomDockable">1</property>
+                                                                            <property name="LeftDockable">1</property>
+                                                                            <property name="RightDockable">1</property>
+                                                                            <property name="TopDockable">1</property>
+                                                                            <property name="aui_layer"></property>
+                                                                            <property name="aui_name"></property>
+                                                                            <property name="aui_position"></property>
+                                                                            <property name="aui_row"></property>
+                                                                            <property name="best_size"></property>
+                                                                            <property name="bg"></property>
+                                                                            <property name="caption"></property>
+                                                                            <property name="caption_visible">1</property>
+                                                                            <property name="center_pane">0</property>
+                                                                            <property name="checked">0</property>
+                                                                            <property name="close_button">1</property>
+                                                                            <property name="context_help"></property>
+                                                                            <property name="context_menu">1</property>
+                                                                            <property name="default_pane">0</property>
+                                                                            <property name="dock">Dock</property>
+                                                                            <property name="dock_fixed">0</property>
+                                                                            <property name="docking">Left</property>
+                                                                            <property name="enabled">1</property>
+                                                                            <property name="fg"></property>
+                                                                            <property name="floatable">1</property>
+                                                                            <property name="font"></property>
+                                                                            <property name="gripper">0</property>
+                                                                            <property name="hidden">0</property>
+                                                                            <property name="id">wxID_ANY</property>
+                                                                            <property name="label">In progress message</property>
+                                                                            <property name="max_size"></property>
+                                                                            <property name="maximize_button">0</property>
+                                                                            <property name="maximum_size"></property>
+                                                                            <property name="min_size"></property>
+                                                                            <property name="minimize_button">0</property>
+                                                                            <property name="minimum_size"></property>
+                                                                            <property name="moveable">1</property>
+                                                                            <property name="name">m_pCheckInProgress</property>
+                                                                            <property name="pane_border">1</property>
+                                                                            <property name="pane_position"></property>
+                                                                            <property name="pane_size"></property>
+                                                                            <property name="permission">protected</property>
+                                                                            <property name="pin_button">1</property>
+                                                                            <property name="pos"></property>
+                                                                            <property name="resize">Resizable</property>
+                                                                            <property name="show">1</property>
+                                                                            <property name="size"></property>
+                                                                            <property name="style"></property>
+                                                                            <property name="subclass"></property>
+                                                                            <property name="toolbar_pane">0</property>
+                                                                            <property name="tooltip"></property>
+                                                                            <property name="validator_data_type"></property>
+                                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                                            <property name="validator_variable"></property>
+                                                                            <property name="window_extra_style"></property>
+                                                                            <property name="window_name"></property>
+                                                                            <property name="window_style"></property>
+                                                                            <event name="OnChar"></event>
+                                                                            <event name="OnCheckBox">OnChecWL</event>
+                                                                            <event name="OnEnterWindow"></event>
+                                                                            <event name="OnEraseBackground"></event>
+                                                                            <event name="OnKeyDown"></event>
+                                                                            <event name="OnKeyUp"></event>
+                                                                            <event name="OnKillFocus"></event>
+                                                                            <event name="OnLeaveWindow"></event>
+                                                                            <event name="OnLeftDClick"></event>
+                                                                            <event name="OnLeftDown"></event>
+                                                                            <event name="OnLeftUp"></event>
+                                                                            <event name="OnMiddleDClick"></event>
+                                                                            <event name="OnMiddleDown"></event>
+                                                                            <event name="OnMiddleUp"></event>
+                                                                            <event name="OnMotion"></event>
+                                                                            <event name="OnMouseEvents"></event>
+                                                                            <event name="OnMouseWheel"></event>
+                                                                            <event name="OnPaint"></event>
+                                                                            <event name="OnRightDClick"></event>
+                                                                            <event name="OnRightDown"></event>
+                                                                            <event name="OnRightUp"></event>
+                                                                            <event name="OnSetFocus"></event>
+                                                                            <event name="OnSize"></event>
+                                                                            <event name="OnUpdateUI"></event>
+                                                                        </object>
+                                                                    </object>
+                                                                    <object class="sizeritem" expanded="0">
+                                                                        <property name="border">5</property>
+                                                                        <property name="flag">wxALL|wxEXPAND</property>
+                                                                        <property name="proportion">0</property>
+                                                                        <object class="wxTextCtrl" expanded="0">
+                                                                            <property name="BottomDockable">1</property>
+                                                                            <property name="LeftDockable">1</property>
+                                                                            <property name="RightDockable">1</property>
+                                                                            <property name="TopDockable">1</property>
+                                                                            <property name="aui_layer"></property>
+                                                                            <property name="aui_name"></property>
+                                                                            <property name="aui_position"></property>
+                                                                            <property name="aui_row"></property>
+                                                                            <property name="best_size"></property>
+                                                                            <property name="bg"></property>
+                                                                            <property name="caption"></property>
+                                                                            <property name="caption_visible">1</property>
+                                                                            <property name="center_pane">0</property>
+                                                                            <property name="close_button">1</property>
+                                                                            <property name="context_help"></property>
+                                                                            <property name="context_menu">1</property>
+                                                                            <property name="default_pane">0</property>
+                                                                            <property name="dock">Dock</property>
+                                                                            <property name="dock_fixed">0</property>
+                                                                            <property name="docking">Left</property>
+                                                                            <property name="enabled">1</property>
+                                                                            <property name="fg"></property>
+                                                                            <property name="floatable">1</property>
+                                                                            <property name="font"></property>
+                                                                            <property name="gripper">0</property>
+                                                                            <property name="hidden">0</property>
+                                                                            <property name="id">wxID_ANY</property>
+                                                                            <property name="max_size"></property>
+                                                                            <property name="maximize_button">0</property>
+                                                                            <property name="maximum_size"></property>
+                                                                            <property name="maxlength">0</property>
+                                                                            <property name="min_size"></property>
+                                                                            <property name="minimize_button">0</property>
+                                                                            <property name="minimum_size"></property>
+                                                                            <property name="moveable">1</property>
+                                                                            <property name="name">m_pTextProgress</property>
+                                                                            <property name="pane_border">1</property>
+                                                                            <property name="pane_position"></property>
+                                                                            <property name="pane_size"></property>
+                                                                            <property name="permission">protected</property>
+                                                                            <property name="pin_button">1</property>
+                                                                            <property name="pos"></property>
+                                                                            <property name="resize">Resizable</property>
+                                                                            <property name="show">1</property>
+                                                                            <property name="size"></property>
+                                                                            <property name="style">wxTE_MULTILINE</property>
+                                                                            <property name="subclass"></property>
+                                                                            <property name="toolbar_pane">0</property>
+                                                                            <property name="tooltip"></property>
+                                                                            <property name="validator_data_type"></property>
+                                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                                            <property name="validator_variable"></property>
+                                                                            <property name="value"></property>
+                                                                            <property name="window_extra_style"></property>
+                                                                            <property name="window_name"></property>
+                                                                            <property name="window_style"></property>
+                                                                            <event name="OnChar"></event>
+                                                                            <event name="OnEnterWindow"></event>
+                                                                            <event name="OnEraseBackground"></event>
+                                                                            <event name="OnKeyDown"></event>
+                                                                            <event name="OnKeyUp"></event>
+                                                                            <event name="OnKillFocus"></event>
+                                                                            <event name="OnLeaveWindow"></event>
+                                                                            <event name="OnLeftDClick"></event>
+                                                                            <event name="OnLeftDown"></event>
+                                                                            <event name="OnLeftUp"></event>
+                                                                            <event name="OnMiddleDClick"></event>
+                                                                            <event name="OnMiddleDown"></event>
+                                                                            <event name="OnMiddleUp"></event>
+                                                                            <event name="OnMotion"></event>
+                                                                            <event name="OnMouseEvents"></event>
+                                                                            <event name="OnMouseWheel"></event>
+                                                                            <event name="OnPaint"></event>
+                                                                            <event name="OnRightDClick"></event>
+                                                                            <event name="OnRightDown"></event>
+                                                                            <event name="OnRightUp"></event>
+                                                                            <event name="OnSetFocus"></event>
+                                                                            <event name="OnSize"></event>
+                                                                            <event name="OnText"></event>
+                                                                            <event name="OnTextEnter"></event>
+                                                                            <event name="OnTextMaxLen"></event>
+                                                                            <event name="OnTextURL"></event>
+                                                                            <event name="OnUpdateUI"></event>
+                                                                        </object>
+                                                                    </object>
+                                                                    <object class="sizeritem" expanded="0">
+                                                                        <property name="border">5</property>
+                                                                        <property name="flag">wxEXPAND</property>
+                                                                        <property name="proportion">1</property>
+                                                                        <object class="spacer" expanded="0">
+                                                                            <property name="height">0</property>
+                                                                            <property name="permission">protected</property>
+                                                                            <property name="width">0</property>
+                                                                        </object>
+                                                                    </object>
+                                                                    <object class="sizeritem" expanded="0">
+                                                                        <property name="border">5</property>
+                                                                        <property name="flag">wxALL|wxALIGN_RIGHT</property>
+                                                                        <property name="proportion">0</property>
+                                                                        <object class="wxButton" expanded="0">
+                                                                            <property name="BottomDockable">1</property>
+                                                                            <property name="LeftDockable">1</property>
+                                                                            <property name="RightDockable">1</property>
+                                                                            <property name="TopDockable">1</property>
+                                                                            <property name="aui_layer"></property>
+                                                                            <property name="aui_name"></property>
+                                                                            <property name="aui_position"></property>
+                                                                            <property name="aui_row"></property>
+                                                                            <property name="best_size"></property>
+                                                                            <property name="bg"></property>
+                                                                            <property name="caption"></property>
+                                                                            <property name="caption_visible">1</property>
+                                                                            <property name="center_pane">0</property>
+                                                                            <property name="close_button">1</property>
+                                                                            <property name="context_help"></property>
+                                                                            <property name="context_menu">1</property>
+                                                                            <property name="default">0</property>
+                                                                            <property name="default_pane">0</property>
+                                                                            <property name="dock">Dock</property>
+                                                                            <property name="dock_fixed">0</property>
+                                                                            <property name="docking">Left</property>
+                                                                            <property name="enabled">1</property>
+                                                                            <property name="fg"></property>
+                                                                            <property name="floatable">1</property>
+                                                                            <property name="font"></property>
+                                                                            <property name="gripper">0</property>
+                                                                            <property name="hidden">0</property>
+                                                                            <property name="id">wxID_ANY</property>
+                                                                            <property name="label">Default values</property>
+                                                                            <property name="max_size"></property>
+                                                                            <property name="maximize_button">0</property>
+                                                                            <property name="maximum_size"></property>
+                                                                            <property name="min_size"></property>
+                                                                            <property name="minimize_button">0</property>
+                                                                            <property name="minimum_size"></property>
+                                                                            <property name="moveable">1</property>
+                                                                            <property name="name">m_button62</property>
+                                                                            <property name="pane_border">1</property>
+                                                                            <property name="pane_position"></property>
+                                                                            <property name="pane_size"></property>
+                                                                            <property name="permission">protected</property>
+                                                                            <property name="pin_button">1</property>
+                                                                            <property name="pos"></property>
+                                                                            <property name="resize">Resizable</property>
+                                                                            <property name="show">1</property>
+                                                                            <property name="size"></property>
+                                                                            <property name="style"></property>
+                                                                            <property name="subclass"></property>
+                                                                            <property name="toolbar_pane">0</property>
+                                                                            <property name="tooltip"></property>
+                                                                            <property name="validator_data_type"></property>
+                                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                                            <property name="validator_variable"></property>
+                                                                            <property name="window_extra_style"></property>
+                                                                            <property name="window_name"></property>
+                                                                            <property name="window_style"></property>
+                                                                            <event name="OnButtonClick">OnMessageDefaultValues</event>
+                                                                            <event name="OnChar"></event>
+                                                                            <event name="OnEnterWindow"></event>
+                                                                            <event name="OnEraseBackground"></event>
+                                                                            <event name="OnKeyDown"></event>
+                                                                            <event name="OnKeyUp"></event>
+                                                                            <event name="OnKillFocus"></event>
+                                                                            <event name="OnLeaveWindow"></event>
+                                                                            <event name="OnLeftDClick"></event>
+                                                                            <event name="OnLeftDown"></event>
+                                                                            <event name="OnLeftUp"></event>
+                                                                            <event name="OnMiddleDClick"></event>
+                                                                            <event name="OnMiddleDown"></event>
+                                                                            <event name="OnMiddleUp"></event>
+                                                                            <event name="OnMotion"></event>
+                                                                            <event name="OnMouseEvents"></event>
+                                                                            <event name="OnMouseWheel"></event>
+                                                                            <event name="OnPaint"></event>
+                                                                            <event name="OnRightDClick"></event>
+                                                                            <event name="OnRightDown"></event>
+                                                                            <event name="OnRightUp"></event>
+                                                                            <event name="OnSetFocus"></event>
+                                                                            <event name="OnSize"></event>
+                                                                            <event name="OnUpdateUI"></event>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="notebookpage" expanded="0">
+                            <property name="bitmap"></property>
+                            <property name="label">Advanced</property>
+                            <property name="select">0</property>
+                            <object class="wxPanel" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pPanelSeguridad</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer81</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pSSLTLS</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">SSL/TLS</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer87</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxCheckBox" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="checked">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Verify server credentials</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pVerifyServer</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCheckBox"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxCheckBox" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="checked">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Use SSL/TLS</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pUseSSL</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCheckBox"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND|wxTOP</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticBoxSizer" expanded="0">
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Certificate</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">sbSizer6</property>
+                                                        <property name="orient">wxHORIZONTAL</property>
+                                                        <property name="permission">none</property>
+                                                        <event name="OnUpdateUI"></event>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                                            <property name="proportion">0</property>
+                                                            <object class="wxStaticText" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font"></property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="label">Certificate to use in this connection</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_staticText55</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style"></property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <property name="wrap">-1</property>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                            <property name="proportion">0</property>
+                                                            <object class="wxButton" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default">0</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font"></property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="label">Advanced Configuration ...</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_pBCert</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style"></property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="validator_data_type"></property>
+                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                <property name="validator_variable"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <event name="OnButtonClick">OnAdvancedConfiguration</event>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_panelSep</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_panelUserPass</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">User/Password</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                            <object class="wxFlexGridSizer" expanded="0">
+                                                <property name="cols">2</property>
+                                                <property name="flexible_direction">wxBOTH</property>
+                                                <property name="growablecols">1</property>
+                                                <property name="growablerows"></property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">fgSizer21</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="rows">0</property>
+                                                <property name="vgap">0</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">User</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText61</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pUser</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Password</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText62</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pPassword</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxTE_PASSWORD</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_panelSep1</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pPanelDefaultCharset</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Default charset</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                            <object class="wxFlexGridSizer" expanded="0">
+                                                <property name="cols">2</property>
+                                                <property name="flexible_direction">wxBOTH</property>
+                                                <property name="growablecols">1</property>
+                                                <property name="growablerows"></property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">fgSizer211</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="rows">0</property>
+                                                <property name="vgap">0</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Default charset</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText131</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxComboBox" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="choices">"ISO_IR 192" "ISO_IR 6" "ISO_IR 100" "ISO_IR 101" "ISO_IR 109" "ISO_IR 110" "ISO_IR 126" "ISO_IR 127" "ISO_IR 138" "ISO_IR 144" "ISO_IR 148"</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pComboCharset</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="selection">-1</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxCB_READONLY|wxCB_SORT</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value">ISO_IR 100</property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCombobox">OnTextoCambiado</event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer31</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_RIGHT|wxALL|wxBOTTOM|wxLEFT|wxTOP</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Test connection</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button20</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnProbarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button37</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnOkClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button38</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCancelClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">346,300</property>
+            <property name="name">DialogoLocalPACSBase</property>
+            <property name="pos"></property>
+            <property name="size">346,300</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass"></property>
+            <property name="title">Advanced Settings</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer71</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel51</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer80</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_panel67</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Security</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer81</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="checked">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Verify client credentials</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pVerifyServer</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCheckBox"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="checked">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Use SSL/TLS</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pUseTLS</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCheckBox"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxTOP</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticBoxSizer" expanded="0">
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Local AET certificate</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">sbSizer5</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">none</property>
+                                                <event name="OnUpdateUI"></event>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxFlexGridSizer" expanded="0">
+                                                        <property name="cols">2</property>
+                                                        <property name="flexible_direction">wxBOTH</property>
+                                                        <property name="growablecols">0</property>
+                                                        <property name="growablerows"></property>
+                                                        <property name="hgap">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">fgSizer36</property>
+                                                        <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                        <property name="permission">none</property>
+                                                        <property name="rows">0</property>
+                                                        <property name="vgap">0</property>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                            <property name="proportion">0</property>
+                                                            <object class="wxStaticText" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font"></property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="label">Certificate used by Ginkgo CADx</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_staticText55</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style"></property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <property name="wrap">-1</property>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                            <property name="proportion">0</property>
+                                                            <object class="wxButton" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default">0</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font"></property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="label">Import ...</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_pBCert</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style"></property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="validator_data_type"></property>
+                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                <property name="validator_variable"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <event name="OnButtonClick">OnEditCertificate</event>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer19</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button8</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnAceptarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button9</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">450,-1</property>
+            <property name="name">PanelConfiguracionHCEBase</property>
+            <property name="pos"></property>
+            <property name="size">556,438</property>
+            <property name="subclass">; </property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize">OnSize</event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer6</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHCE</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Gingo CADx Application ID used to fill MSH.3 field</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer38</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxFlexGridSizer" expanded="0">
+                                    <property name="cols">2</property>
+                                    <property name="flexible_direction">wxBOTH</property>
+                                    <property name="growablecols">1</property>
+                                    <property name="growablerows"></property>
+                                    <property name="hgap">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">fgSizer21</property>
+                                    <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                    <property name="permission">none</property>
+                                    <property name="rows">0</property>
+                                    <property name="vgap">0</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Receiver organization Id</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pstIdOrganizacionReceptora</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Unique identifier of the organization receiving the message.</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxTextCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="maxlength">0</property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pIdOrganizacionReceptora</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size">-1,-1</property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Unique identifier of the organization receiving the message.</property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnText">OnTextoCambiado</event>
+                                            <event name="OnTextEnter"></event>
+                                            <event name="OnTextMaxLen"></event>
+                                            <event name="OnTextURL"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Petitioner System Id</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pstIdSistemaPeticionario</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Unique identifier of the requesting system.</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxTextCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="maxlength">0</property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pIdSistemaPeticionario</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Unique identifier of the requesting system.</property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnText">OnTextoCambiado</event>
+                                            <event name="OnTextEnter"></event>
+                                            <event name="OnTextMaxLen"></event>
+                                            <event name="OnTextURL"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Filler Application Id</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pstIdAplicacionRellenadora</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Unique identifier of the filler application (SIID/Ginkgo CADx).</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxTextCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="maxlength">0</property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pIdAplicacionRellenadora</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Unique identifier of the filler application (SIID/Ginkgo).</property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnText">OnTextoCambiado</event>
+                                            <event name="OnTextEnter"></event>
+                                            <event name="OnTextMaxLen"></event>
+                                            <event name="OnTextURL"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Ginkgo CADx Application Id</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pstIdAplicacionPACS</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Unique identifier of the Picture Archiving and Communication System Application (SIID/PACS).</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxLEFT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxTextCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="maxlength">0</property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pIdGinkgoAplication</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Unique identifier of the Picture Archiving and Communication System Application (SIID/PACS).</property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnText">OnTextoCambiado</event>
+                                            <event name="OnTextEnter"></event>
+                                            <event name="OnTextMaxLen"></event>
+                                            <event name="OnTextURL"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSep</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pIntegrationEngine</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Integration engine</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer24</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxFlexGridSizer" expanded="0">
+                                    <property name="cols">2</property>
+                                    <property name="flexible_direction">wxBOTH</property>
+                                    <property name="growablecols">1</property>
+                                    <property name="growablerows"></property>
+                                    <property name="hgap">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">fgSizer20</property>
+                                    <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                    <property name="permission">none</property>
+                                    <property name="rows">0</property>
+                                    <property name="vgap">0</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Hostname / Port</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText121</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Hostname (IP or DNS) integration engine</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxBoxSizer" expanded="0">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">bSizer74</property>
+                                            <property name="orient">wxHORIZONTAL</property>
+                                            <property name="permission">none</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL</property>
+                                                <property name="proportion">3</property>
+                                                <object class="wxTextCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="maxlength">0</property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pHostnameMI</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size">-1,-1</property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnText">OnTextoCambiado</event>
+                                                    <event name="OnTextEnter"></event>
+                                                    <event name="OnTextMaxLen"></event>
+                                                    <event name="OnTextURL"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">/</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText60</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                <property name="proportion">1</property>
+                                                <object class="wxTextCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="maxlength">0</property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pPuertoMI</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnText">OnTextoCambiado</event>
+                                                    <event name="OnTextEnter"></event>
+                                                    <event name="OnTextMaxLen"></event>
+                                                    <event name="OnTextURL"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Protocol</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText38</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip">Integration Engine's Transport Layer Protocol</property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxBoxSizer" expanded="0">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">bSizer75</property>
+                                            <property name="orient">wxHORIZONTAL</property>
+                                            <property name="permission">none</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxChoice" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="choices">"MLLP"</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pProtocolo</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="selection">0</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnChoice"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxEXPAND</property>
+                                                <property name="proportion">0</property>
+                                                <object class="spacer" expanded="0">
+                                                    <property name="height">0</property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="width">30</property>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Format</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText39</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip">Message's format</property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxChoice" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="choices">"ER7"</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pFormato</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="selection">0</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnChoice"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">1</property>
+                                                <object class="spacer" expanded="0">
+                                                    <property name="height">0</property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="width">0</property>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxTOP|wxLEFT|wxALIGN_RIGHT</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxButton" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default">0</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Test engine</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_button15</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip">Test Integration Engine connectivity</property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnButtonClick">OnTestClick</event>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">450,-1</property>
+            <property name="name">PanelConfiguracionExtensionesBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass">; </property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground">OnEraseBackground</event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer6</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pExtensions</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Extensions</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground">OnEraseBackground</event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer44</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer85</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxScrolledWindow" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pScrollPanelExtensions</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="scroll_rate_x">5</property>
+                                            <property name="scroll_rate_y">5</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxHSCROLL|wxVSCROLL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer84</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">none</property>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">-1,-1</property>
+            <property name="name">ExtensionPanelBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass">GinkgoBoxPanel; wx/ginkgostyle/ginkgostyle.h</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer80</property>
+                <property name="orient">wxHORIZONTAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticBitmap" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="bitmap"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size">50,50</property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pThumbnail</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">1</property>
+                    <object class="wxBoxSizer" expanded="0">
+                        <property name="minimum_size"></property>
+                        <property name="name">bSizer81</property>
+                        <property name="orient">wxVERTICAL</property>
+                        <property name="permission">none</property>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg">63,63,63</property>
+                                <property name="floatable">1</property>
+                                <property name="font">,90,92,12,70,0</property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Ginkgo Extension Title</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pLabelTitle</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">450,550</property>
+            <property name="name">DialogoEditarCertificadoBase</property>
+            <property name="pos"></property>
+            <property name="size">450,550</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass"></property>
+            <property name="title">Certificate</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer83</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer86</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelDefault</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Edit public key</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer872</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag"></property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="checked">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Use default certificate (certificate configured in local AET settings)</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pCheckDefault</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCheckBox">OnCheckDefault</event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND | wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pSepDefault</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelPublic</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Public key</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer87</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxBOTTOM|wxRIGHT</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Public key in PEM format</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabel</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxTOP|wxBOTTOM</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">0</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pTextoCertificado</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxTE_MULTILINE</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALIGN_RIGHT|wxTOP</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxButton" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default">0</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Load ...</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_button62</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnButtonClick">OnLoadPublicClick</event>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_panel60</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelPrivate</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Private key</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer871</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Private key in PEM format</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabel11</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxTOP</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">0</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pTextoPrivateKey</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxTE_MULTILINE</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALIGN_RIGHT|wxTOP</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxButton" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default">0</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Load ...</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_button621</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnButtonClick">OnLoadPrivateClick</event>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer19</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Reset to default</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button48</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnResetToDefault</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button8</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnAceptarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button9</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">770,540</property>
+            <property name="name">ProfileDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">770,540</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">Edit profile</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer53</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBasePanel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer44</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pTitledPanel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Profile</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer43</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxBOTTOM</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxFlexGridSizer" expanded="0">
+                                                <property name="cols">2</property>
+                                                <property name="flexible_direction">wxBOTH</property>
+                                                <property name="growablecols">1</property>
+                                                <property name="growablerows"></property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">fgSizer14</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="rows">0</property>
+                                                <property name="vgap">0</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Profile name</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText47</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pName</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="CustomControl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="class">wxPropertyGrid</property>
+                                                <property name="close_button">1</property>
+                                                <property name="construction">m_pGridPermisos = new wxPropertyGrid(&#x0A;m_pTitledPanel,&#x0A;wxID_ANY,&#x0A;wxDefaultPosition,&#x0A;wxDefaultSize,&#x0A;wxPG_AUTO_SORT |&#x0A;wxPG_SPLITTER_AUTO_CENTER|&#x0A;wxPG_DEFAULT_STYLE&#x0A;);</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="declaration">wxPropertyGrid* m_pGridPermisos;</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="include">#include <wx/propgrid/propgrid.h></property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pGridPermisos</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="settings"></property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooterPanel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer54</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button28</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnOkClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button29</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCancelClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">450,-1</property>
+            <property name="name">PanelConfiguracionPermisosBase</property>
+            <property name="pos"></property>
+            <property name="size">501,160</property>
+            <property name="subclass">; </property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize">OnSize</event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer6</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBasePanel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Profiles</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer25</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="CustomControl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="class">wxDataViewListCtrl</property>
+                                    <property name="close_button">1</property>
+                                    <property name="construction">m_pListProfiles = new wxDataViewListCtrl(m_pBasePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="declaration">wxDataViewListCtrl* m_pListProfiles;</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="include">#include <wx/dataview.h></property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pListProfiles</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="settings"></property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer26</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">New ...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_button3</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnNuevoClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">0</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Edit ...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pBEdit</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnEditarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">0</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Delete</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pBDelete</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnEliminarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxRIGHT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="spacer" expanded="0">
+                                            <property name="height">0</property>
+                                            <property name="permission">protected</property>
+                                            <property name="width">0</property>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Set active</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pBActive</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnSetActive</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">450,-1</property>
+            <property name="name">PanelConfiguracionUbicacionesBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass">; </property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize">OnSize</event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer6</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pUbicaciones</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Locations</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer63</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer76</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Locations are predefined paths to set locations from well known paths (ex: remote shared disk)</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticTextExplicacion</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style">wxST_NO_AUTORESIZE</property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">430</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pMainSizer</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL|wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="CustomControl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="class">wxDataViewListCtrl</property>
+                                            <property name="close_button">1</property>
+                                            <property name="construction">m_pListUbicaciones = new wxDataViewListCtrl(m_pUbicaciones, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="declaration">wxDataViewListCtrl* m_pListUbicaciones;</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="include">#include <wx/dataview.h></property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pListUbicaciones</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="settings"></property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxBoxSizer" expanded="0">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">m_pSizerBotonera</property>
+                                            <property name="orient">wxVERTICAL</property>
+                                            <property name="permission">none</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxButton" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default">0</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">New ...</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pBotonNuevo</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnButtonClick">OnNuevoClick</event>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxButton" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default">0</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">0</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Edit ...</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pBotonEdit</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnButtonClick">OnEditarClick</event>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxButton" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default">0</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">0</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Delete</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pBotonDelete</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnButtonClick">OnEliminarClick</event>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxEXPAND|wxRIGHT</property>
+                                                <property name="proportion">1</property>
+                                                <object class="spacer" expanded="0">
+                                                    <property name="height">0</property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="width">0</property>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">450,450</property>
+            <property name="name">DialogoAddLocationBase</property>
+            <property name="pos"></property>
+            <property name="size">450,450</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass"></property>
+            <property name="title">Add/Edit Location</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">m_pBodySizer</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Configure location</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">m_pPanelSizer</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxBOTTOM</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxFlexGridSizer" expanded="0">
+                                                <property name="cols">2</property>
+                                                <property name="flexible_direction">wxBOTH</property>
+                                                <property name="growablecols">1</property>
+                                                <property name="growablerows"></property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pTableSizer</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="rows">0</property>
+                                                <property name="vgap">0</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Title</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pSTTitle</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">8</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pTETitle</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Location</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pSTLocation</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxTOP|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxBoxSizer" expanded="0">
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pDirSizer</property>
+                                                        <property name="orient">wxHORIZONTAL</property>
+                                                        <property name="permission">none</property>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
+                                                            <property name="proportion">1</property>
+                                                            <object class="wxTextCtrl" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font"></property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="maxlength">0</property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_pTELocation</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style"></property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="validator_data_type"></property>
+                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                <property name="validator_variable"></property>
+                                                                <property name="value"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnText"></event>
+                                                                <event name="OnTextEnter"></event>
+                                                                <event name="OnTextMaxLen"></event>
+                                                                <event name="OnTextURL"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM</property>
+                                                            <property name="proportion">0</property>
+                                                            <object class="wxButton" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default">0</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font"></property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="label">...</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_pOpenDir</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style">wxBU_EXACTFIT</property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="validator_data_type"></property>
+                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                <property name="validator_variable"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <event name="OnButtonClick">OnOpenDirClick</event>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Description</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pSTDesc</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND|wxTOP|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">100</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pTEDesc</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="checked">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Monitorize</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pMonitorize</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCheckBox"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="checked">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Clean directory after dicomization</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pCleanAfter</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCheckBox"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="checked">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Clean directory before dicomization</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pCleanBefore</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCheckBox"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">m_pFooterSizer</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pAccept</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnAceptarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pCancel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">PanelConfiguracionSeguridadBase</property>
+            <property name="pos"></property>
+            <property name="size">500,300</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer48</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSecurity</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Security</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground">OnEraseBackground</event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer44</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer57</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Security type</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText47</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxChoice" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="choices"></property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pSecType</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="selection">0</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnChoice">OnSecTypeChoice</event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSep</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelUsuarios</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Users</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground">OnEraseBackground</event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer25</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND|wxRIGHT</property>
+                                <property name="proportion">1</property>
+                                <object class="wxListCtrl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pListaUsuarios</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxLC_SINGLE_SEL|wxLC_SMALL_ICON</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnListBeginDrag"></event>
+                                    <event name="OnListBeginLabelEdit"></event>
+                                    <event name="OnListBeginRDrag"></event>
+                                    <event name="OnListCacheHint"></event>
+                                    <event name="OnListColBeginDrag"></event>
+                                    <event name="OnListColClick"></event>
+                                    <event name="OnListColDragging"></event>
+                                    <event name="OnListColEndDrag"></event>
+                                    <event name="OnListColRightClick"></event>
+                                    <event name="OnListDeleteAllItems"></event>
+                                    <event name="OnListDeleteItem"></event>
+                                    <event name="OnListEndLabelEdit"></event>
+                                    <event name="OnListInsertItem"></event>
+                                    <event name="OnListItemActivated"></event>
+                                    <event name="OnListItemDeselected">OnListaUsuariosItemDeSelected</event>
+                                    <event name="OnListItemFocused"></event>
+                                    <event name="OnListItemMiddleClick"></event>
+                                    <event name="OnListItemRightClick"></event>
+                                    <event name="OnListItemSelected">OnListaUsuariosItemSelected</event>
+                                    <event name="OnListKeyDown"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer26</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">New ...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_button3</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnNuevoClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">0</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Change Password ...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pBCambiarPassword</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnCambiarPasswordClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">0</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Delete</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pBDelete</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnEliminarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxRIGHT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="spacer" expanded="0">
+                                            <property name="height">0</property>
+                                            <property name="permission">protected</property>
+                                            <property name="width">0</property>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelPassword</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Set main password</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground">OnEraseBackground</event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer251</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Password is not setted</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pLabelPassword</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Set Password</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pButtonSetPassword</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnSetMainPassword</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">423,292</property>
+            <property name="name">UserDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">423,292</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSTAY_ON_TOP</property>
+            <property name="subclass"></property>
+            <property name="title">Edit User</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer67</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Edit User</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer68</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pFormPanel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Edit User</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer75</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="spacer" expanded="0">
+                                                <property name="height">0</property>
+                                                <property name="permission">protected</property>
+                                                <property name="width">0</property>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxFlexGridSizer" expanded="0">
+                                                <property name="cols">2</property>
+                                                <property name="flexible_direction">wxBOTH</property>
+                                                <property name="growablecols">1</property>
+                                                <property name="growablerows"></property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">fgSizer18</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="rows">0</property>
+                                                <property name="vgap">0</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">User Name</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pLabelUser</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pTCUsuario</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Password</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pstat2</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pTCPassword0</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxTE_PASSWORD</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxTOP|wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Confirm Password</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pstat21</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxTOP|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pTCPassword1</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxTE_PASSWORD</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="spacer" expanded="0">
+                                                <property name="height">0</property>
+                                                <property name="permission">protected</property>
+                                                <property name="width">0</property>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel54</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer69</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button42</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnOkClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button41</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">PanelConfigurationAnonymizationBase</property>
+            <property name="pos"></property>
+            <property name="size">500,300</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer77</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pAnonimization</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Properties</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer78</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer79</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Default value</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText52</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxTextCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="maxlength">0</property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pTextDefaultValue</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size">200,-1</property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnText"></event>
+                                            <event name="OnTextEnter"></event>
+                                            <event name="OnTextMaxLen"></event>
+                                            <event name="OnTextURL"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">350,250</property>
+            <property name="name">AddWLDialogBase</property>
+            <property name="pos"></property>
+            <property name="size"></property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Add window/level</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer15</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelMessage</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Add DICOM tag</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxFlexGridSizer" expanded="1">
+                                        <property name="cols">2</property>
+                                        <property name="flexible_direction">wxBOTH</property>
+                                        <property name="growablecols">1</property>
+                                        <property name="growablerows"></property>
+                                        <property name="hgap">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="name">fgSizer17</property>
+                                        <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                        <property name="permission">none</property>
+                                        <property name="rows">0</property>
+                                        <property name="vgap">0</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Label</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText79</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">0</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabel</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">public</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Window</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText59</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">0</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pWindow</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">public</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type">wxString</property>
+                                                <property name="validator_style">wxFILTER_NUMERIC</property>
+                                                <property name="validator_type">wxTextValidator</property>
+                                                <property name="validator_variable">windowValidator</property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Level</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText60</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">0</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLevel</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">public</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type">wxString</property>
+                                                <property name="validator_style">wxFILTER_NUMERIC</property>
+                                                <property name="validator_type">wxTextValidator</property>
+                                                <property name="validator_variable">levelValidator</property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer16</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="1">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Ok</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pOkButton</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button5</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">800,500</property>
+            <property name="name">EditCornerAnnotationsDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">850,650</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Edit corner annotations</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer15</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pMainPanel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Edit corner annotations</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer130</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer131</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxBoxSizer" expanded="0">
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">bSizer136</property>
+                                                        <property name="orient">wxVERTICAL</property>
+                                                        <property name="permission">none</property>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                                                            <property name="proportion">1</property>
+                                                            <object class="wxStaticText" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font"></property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="label">To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:DefaultValue:Format}  where GGGG is the tag's group in hexadecimal and EEEE is the tag's element. DefaultValue and Format are optional values, Format admit two special formats (date and time).</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_staticText84</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style"></property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <property name="wrap">600</property>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxALL</property>
+                                                            <property name="proportion">0</property>
+                                                            <object class="wxStaticText" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font"></property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="label">You can also use special tags listed in the tooltip over the question button.</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_staticText85</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style"></property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <property name="wrap">600</property>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticBitmap" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="bitmap"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pHelpBitmap</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip">${NEWLINE}&#x0A;${GINKGO.VERSION.FULLTEXT}&#x0A;${GINKGO.ARCH}             &#x0A;&#x0A;${VOLUME.IDX}&#x0A;${SLICE.WIDTH}&#x0A;${SLICE.HEIGHT}&#x0A;${SLICE.WL.FULLTEXT}&#x0A;${SLICE.IDX}&#x0A;${SLICE.COUNT}&#x0A;${SLICE.IDX.FULLTEXT}&#x0A;${SLICE.LATERALITY}&#x0A;${SLICE.VOXEL.SIZE}&#x0A;${SLICE.THICKNESS}&#x0A;${SLICE.THICKNESS.FULLTEXT}&#x0A;${SLICE.LOCATION}&#x0A;${SLICE.LOCATION.FULLTEXT}&#x0A;${VIEW.SCAL [...]
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxStaticBoxSizer" expanded="0">
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">sbSizer10</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">none</property>
+                                                <event name="OnUpdateUI"></event>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxGridSizer" expanded="0">
+                                                        <property name="cols">2</property>
+                                                        <property name="hgap">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pCornerAnnotationsSizer</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="rows">0</property>
+                                                        <property name="vgap">0</property>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer16</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Reset</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button70</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnSetDefaultValues</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Ok</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pOkButton</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button5</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">ModalityPanelBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer125</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxBOTTOM</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticBoxSizer" expanded="0">
+                        <property name="id">wxID_ANY</property>
+                        <property name="label">Window/level</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">sbSizer12</property>
+                        <property name="orient">wxVERTICAL</property>
+                        <property name="permission">none</property>
+                        <event name="OnUpdateUI"></event>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="wxBoxSizer" expanded="0">
+                                <property name="minimum_size"></property>
+                                <property name="name">bSizer129</property>
+                                <property name="orient">wxHORIZONTAL</property>
+                                <property name="permission">none</property>
+                                <object class="sizeritem" expanded="0">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL|wxEXPAND</property>
+                                    <property name="proportion">1</property>
+                                    <object class="CustomControl" expanded="0">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="class">wxDataViewListCtrl</property>
+                                        <property name="close_button">1</property>
+                                        <property name="construction">m_pListWL = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="declaration">wxDataViewListCtrl*  m_pListWL;</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="include">#include <wx/dataview.h></property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size">-1,150</property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_pListWL</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="settings"></property>
+                                        <property name="show">1</property>
+                                        <property name="size">-1,150</property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="0">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxEXPAND</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer126</property>
+                                        <property name="orient">wxHORIZONTAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer127</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxTOP|wxBOTTOM|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxButton" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default">0</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Add</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_button63</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnButtonClick">OnAddWL</event>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxTOP|wxBOTTOM|wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxButton" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default">0</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Edit</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_button64</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnButtonClick">OnEditWL</event>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxButton" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default">0</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Delete</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_button65</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnButtonClick">OnDeleteWL</event>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">0</property>
+                            <object class="wxFlexGridSizer" expanded="0">
+                                <property name="cols">2</property>
+                                <property name="flexible_direction">wxBOTH</property>
+                                <property name="growablecols"></property>
+                                <property name="growablerows"></property>
+                                <property name="hgap">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="name">fgSizer20</property>
+                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                <property name="permission">none</property>
+                                <property name="rows">0</property>
+                                <property name="vgap">0</property>
+                                <object class="sizeritem" expanded="0">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxStaticText" expanded="0">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="label">Default Window/Level</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_staticText68</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <property name="wrap">-1</property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="0">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxTOP|wxBOTTOM|wxRIGHT</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxChoice" expanded="0">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="choices"></property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_pDefaultWindowLevel</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">public</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="selection">0</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="validator_data_type"></property>
+                                        <property name="validator_style">wxFILTER_NONE</property>
+                                        <property name="validator_type">wxDefaultValidator</property>
+                                        <property name="validator_variable"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnChoice">OnChoiceChanged</event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticBoxSizer" expanded="0">
+                        <property name="id">wxID_ANY</property>
+                        <property name="label">Corner annotations</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">sbSizer9</property>
+                        <property name="orient">wxHORIZONTAL</property>
+                        <property name="permission">none</property>
+                        <event name="OnUpdateUI"></event>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Setup corner annotations</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticText71</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxButton" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default">0</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Setup...</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_button67</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnButtonClick">OnSetupCornerAnnotations</event>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticBoxSizer" expanded="0">
+                        <property name="id">wxID_ANY</property>
+                        <property name="label">Other settings</property>
+                        <property name="minimum_size"></property>
+                        <property name="name">sbSizer13</property>
+                        <property name="orient">wxVERTICAL</property>
+                        <property name="permission">none</property>
+                        <event name="OnUpdateUI"></event>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="wxFlexGridSizer" expanded="0">
+                                <property name="cols">2</property>
+                                <property name="flexible_direction">wxBOTH</property>
+                                <property name="growablecols"></property>
+                                <property name="growablerows"></property>
+                                <property name="hgap">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="name">fgSizer21</property>
+                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                <property name="permission">none</property>
+                                <property name="rows">0</property>
+                                <property name="vgap">0</property>
+                                <object class="sizeritem" expanded="0">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxStaticText" expanded="0">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="label">Interpolate pixel data</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_staticText69</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <property name="wrap">-1</property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="0">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxChoice" expanded="0">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="choices"></property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_pChoiceInterpolate</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="selection">0</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="validator_data_type"></property>
+                                        <property name="validator_style">wxFILTER_NONE</property>
+                                        <property name="validator_type">wxDefaultValidator</property>
+                                        <property name="validator_variable"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnChoice">OnChoiceChanged</event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">500,600</property>
+            <property name="name">EditHangingProtocolDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">744,641</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">Hanging protocol</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer11</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Hanging protocol</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxTOP</property>
+                    <property name="proportion">1</property>
+                    <object class="wxNotebook" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="bitmapsize"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pMainNoteBook</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style">wxNB_FLAT</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnNotebookPageChanged"></event>
+                        <event name="OnNotebookPageChanging"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="notebookpage" expanded="0">
+                            <property name="bitmap"></property>
+                            <property name="label">General</property>
+                            <property name="select">0</property>
+                            <object class="wxPanel" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pGeneralPanel</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer109</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxTOP</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxFlexGridSizer" expanded="0">
+                                            <property name="cols">2</property>
+                                            <property name="flexible_direction">wxBOTH</property>
+                                            <property name="growablecols">1</property>
+                                            <property name="growablerows"></property>
+                                            <property name="hgap">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="name">fgSizer25</property>
+                                            <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                            <property name="permission">none</property>
+                                            <property name="rows">0</property>
+                                            <property name="vgap">0</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Name</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText87</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxEXPAND</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxTextCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="maxlength">0</property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_textName</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnText"></event>
+                                                    <event name="OnTextEnter"></event>
+                                                    <event name="OnTextMaxLen"></event>
+                                                    <event name="OnTextURL"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Opening mode</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText91</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxTextCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">0</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="maxlength">0</property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_textOpeningMode</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style">wxTE_READONLY</property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnText"></event>
+                                                    <event name="OnTextEnter"></event>
+                                                    <event name="OnTextMaxLen"></event>
+                                                    <event name="OnTextURL"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticBoxSizer" expanded="0">
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Study opening criteria</property>
+                                            <property name="minimum_size">-1,250</property>
+                                            <property name="name">m_pSizerStudyCriteria</property>
+                                            <property name="orient">wxVERTICAL</property>
+                                            <property name="permission">protected</property>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="notebookpage" expanded="0">
+                            <property name="bitmap"></property>
+                            <property name="label">Workspace</property>
+                            <property name="select">1</property>
+                            <object class="wxPanel" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pWorkspacePanel</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer1102</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxALL</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxAuiNotebook" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pNoteBookWindows</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style">wxAUI_NB_CLOSE_ON_ACTIVE_TAB|wxAUI_NB_DEFAULT_STYLE</property>
+                                            <property name="subclass"></property>
+                                            <property name="tab_ctrl_height">-1</property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="uniform_bitmap_size"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnAuiNotebookAllowDND"></event>
+                                            <event name="OnAuiNotebookBeginDrag"></event>
+                                            <event name="OnAuiNotebookButton"></event>
+                                            <event name="OnAuiNotebookDragMotion"></event>
+                                            <event name="OnAuiNotebookEndDrag"></event>
+                                            <event name="OnAuiNotebookPageChanged"></event>
+                                            <event name="OnAuiNotebookPageChanging">OnPageChanging</event>
+                                            <event name="OnAuiNotebookPageClose">OnPageClose</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                            <object class="auinotebookpage" expanded="0">
+                                                <property name="bitmap"></property>
+                                                <property name="label">+</property>
+                                                <property name="select">0</property>
+                                                <object class="wxPanel" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pAdddPanel</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer31</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button37</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnOkClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button38</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCancelClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">HangingProtocolConfigurationPanelBase</property>
+            <property name="pos"></property>
+            <property name="size">500,300</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer6</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pProtocols</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Hanging protocols</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer25</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="CustomControl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="class">wxDataViewListCtrl</property>
+                                    <property name="close_button">1</property>
+                                    <property name="construction">m_pListHanging = new wxDataViewListCtrl(m_pProtocols, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="declaration">wxDataViewListCtrl* m_pListHanging;</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="include">#include <wx/dataview.h></property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pListHanging</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="settings"></property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer26</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">New ...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_button3</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnNuevoClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">0</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Edit ...</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pBEdit</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnEditarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">0</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Delete</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pBDelete</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnEliminarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxRIGHT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="spacer" expanded="0">
+                                            <property name="height">0</property>
+                                            <property name="permission">protected</property>
+                                            <property name="width">0</property>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Enable/Disable</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pBActive</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnSetActive</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">DefaultModalitySettingsConfigurationPanelBase</property>
+            <property name="pos"></property>
+            <property name="size">500,300</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer120</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxTOP</property>
+                    <property name="proportion">1</property>
+                    <object class="wxSplitterWindow" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_pane_size">100</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_splitter4</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="sashgravity">0.0</property>
+                        <property name="sashpos">150</property>
+                        <property name="sashsize">-1</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="splitmode">wxSPLIT_VERTICAL</property>
+                        <property name="style">wxSP_3D</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnSplitterDClick"></event>
+                        <event name="OnSplitterSashPosChanged"></event>
+                        <event name="OnSplitterSashPosChanging"></event>
+                        <event name="OnSplitterUnsplit"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="splitteritem" expanded="0">
+                            <object class="wxPanel" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_panel90</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer121</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">0</property>
+                                        <property name="flag">wxALL|wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxTreeCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pWLList</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style">wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT</property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnTreeBeginDrag"></event>
+                                            <event name="OnTreeBeginLabelEdit"></event>
+                                            <event name="OnTreeBeginRDrag"></event>
+                                            <event name="OnTreeDeleteItem"></event>
+                                            <event name="OnTreeEndDrag"></event>
+                                            <event name="OnTreeEndLabelEdit"></event>
+                                            <event name="OnTreeGetInfo"></event>
+                                            <event name="OnTreeItemActivated"></event>
+                                            <event name="OnTreeItemCollapsed"></event>
+                                            <event name="OnTreeItemCollapsing"></event>
+                                            <event name="OnTreeItemExpanded"></event>
+                                            <event name="OnTreeItemExpanding"></event>
+                                            <event name="OnTreeItemGetTooltip"></event>
+                                            <event name="OnTreeItemMenu"></event>
+                                            <event name="OnTreeItemMiddleClick"></event>
+                                            <event name="OnTreeItemRightClick"></event>
+                                            <event name="OnTreeKeyDown"></event>
+                                            <event name="OnTreeSelChanged">OnTreeSelChanged</event>
+                                            <event name="OnTreeSelChanging"></event>
+                                            <event name="OnTreeSetInfo"></event>
+                                            <event name="OnTreeStateImageClick"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="splitteritem" expanded="0">
+                            <object class="wxPanel" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pTitledPanelModalities</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass">SubTitledPanelSinBorder; wx/ginkgostyle/ginkgostyle.h</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer122</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pModalityPanel</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass">PanelScrollable; wx/ginkgostyle/ginkgostyle.h</property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pSizerModalities</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">protected</property>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">CornerAnnotationPanel</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer126</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticText" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="label">Top left corner annotations</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pLabel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">public</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <property name="wrap">-1</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL|wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxTextCtrl" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="maxlength">0</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pLine1</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">public</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="value"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnText"></event>
+                        <event name="OnTextEnter"></event>
+                        <event name="OnTextMaxLen"></event>
+                        <event name="OnTextURL"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL|wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxTextCtrl" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="maxlength">0</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pLine2</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">public</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="value"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnText"></event>
+                        <event name="OnTextEnter"></event>
+                        <event name="OnTextMaxLen"></event>
+                        <event name="OnTextURL"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL|wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxTextCtrl" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="maxlength">0</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pLine3</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">public</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="value"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnText"></event>
+                        <event name="OnTextEnter"></event>
+                        <event name="OnTextMaxLen"></event>
+                        <event name="OnTextURL"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL|wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxTextCtrl" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="maxlength">0</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pLine4</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">public</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="value"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnText"></event>
+                        <event name="OnTextEnter"></event>
+                        <event name="OnTextMaxLen"></event>
+                        <event name="OnTextURL"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">StudyWindowBase</property>
+            <property name="pos"></property>
+            <property name="size">500,300</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer81</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pConfigWindow</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Setup window</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer901</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Push configuration button and place window where you want</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticText72</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT|wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Set default</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button62</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Open in main window</property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnSetDefaultWindowPosition</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT|wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Setup position...</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pSetupPositionButton</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Setup undocked window position</property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnSetupWindowPositionClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel64111</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Settings</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size">-1,220</property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pLayoutPreview</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size">-1,220</property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Layout</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer113</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxStaticBoxSizer" expanded="0">
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Current layout</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">sbSizer9</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxBoxSizer" expanded="0">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">bSizer119</property>
+                                            <property name="orient">wxVERTICAL</property>
+                                            <property name="permission">none</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxEXPAND</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxBoxSizer" expanded="0">
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">bsizer91</property>
+                                                    <property name="orient">wxVERTICAL</property>
+                                                    <property name="permission">none</property>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxEXPAND|wxBOTTOM</property>
+                                                        <property name="proportion">1</property>
+                                                        <object class="wxBoxSizer" expanded="0">
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_pSizerLayoutTools</property>
+                                                            <property name="orient">wxHORIZONTAL</property>
+                                                            <property name="permission">protected</property>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxEXPAND</property>
+                                                                <property name="proportion">1</property>
+                                                                <object class="spacer" expanded="0">
+                                                                    <property name="height">0</property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="width">0</property>
+                                                                </object>
+                                                            </object>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxStaticText" expanded="0">
+                                                                    <property name="BottomDockable">1</property>
+                                                                    <property name="LeftDockable">1</property>
+                                                                    <property name="RightDockable">1</property>
+                                                                    <property name="TopDockable">1</property>
+                                                                    <property name="aui_layer"></property>
+                                                                    <property name="aui_name"></property>
+                                                                    <property name="aui_position"></property>
+                                                                    <property name="aui_row"></property>
+                                                                    <property name="best_size"></property>
+                                                                    <property name="bg"></property>
+                                                                    <property name="caption"></property>
+                                                                    <property name="caption_visible">1</property>
+                                                                    <property name="center_pane">0</property>
+                                                                    <property name="close_button">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="default_pane">0</property>
+                                                                    <property name="dock">Dock</property>
+                                                                    <property name="dock_fixed">0</property>
+                                                                    <property name="docking">Left</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="floatable">1</property>
+                                                                    <property name="font"></property>
+                                                                    <property name="gripper">0</property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="label">Rows</property>
+                                                                    <property name="max_size"></property>
+                                                                    <property name="maximize_button">0</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="min_size"></property>
+                                                                    <property name="minimize_button">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="moveable">1</property>
+                                                                    <property name="name">m_staticText56</property>
+                                                                    <property name="pane_border">1</property>
+                                                                    <property name="pane_position"></property>
+                                                                    <property name="pane_size"></property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pin_button">1</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="resize">Resizable</property>
+                                                                    <property name="show">1</property>
+                                                                    <property name="size"></property>
+                                                                    <property name="style"></property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="toolbar_pane">0</property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <property name="wrap">-1</property>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxSpinCtrl" expanded="0">
+                                                                    <property name="BottomDockable">1</property>
+                                                                    <property name="LeftDockable">1</property>
+                                                                    <property name="RightDockable">1</property>
+                                                                    <property name="TopDockable">1</property>
+                                                                    <property name="aui_layer"></property>
+                                                                    <property name="aui_name"></property>
+                                                                    <property name="aui_position"></property>
+                                                                    <property name="aui_row"></property>
+                                                                    <property name="best_size"></property>
+                                                                    <property name="bg"></property>
+                                                                    <property name="caption"></property>
+                                                                    <property name="caption_visible">1</property>
+                                                                    <property name="center_pane">0</property>
+                                                                    <property name="close_button">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="default_pane">0</property>
+                                                                    <property name="dock">Dock</property>
+                                                                    <property name="dock_fixed">0</property>
+                                                                    <property name="docking">Left</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="floatable">1</property>
+                                                                    <property name="font"></property>
+                                                                    <property name="gripper">0</property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="initial">1</property>
+                                                                    <property name="max">4</property>
+                                                                    <property name="max_size"></property>
+                                                                    <property name="maximize_button">0</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="min">1</property>
+                                                                    <property name="min_size"></property>
+                                                                    <property name="minimize_button">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="moveable">1</property>
+                                                                    <property name="name">m_pSpinRows</property>
+                                                                    <property name="pane_border">1</property>
+                                                                    <property name="pane_position"></property>
+                                                                    <property name="pane_size"></property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pin_button">1</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="resize">Resizable</property>
+                                                                    <property name="show">1</property>
+                                                                    <property name="size">50,-1</property>
+                                                                    <property name="style">wxSP_ARROW_KEYS</property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="toolbar_pane">0</property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="value"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnSpinCtrl">OnSpinRows</event>
+                                                                    <event name="OnSpinCtrlText"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxStaticText" expanded="0">
+                                                                    <property name="BottomDockable">1</property>
+                                                                    <property name="LeftDockable">1</property>
+                                                                    <property name="RightDockable">1</property>
+                                                                    <property name="TopDockable">1</property>
+                                                                    <property name="aui_layer"></property>
+                                                                    <property name="aui_name"></property>
+                                                                    <property name="aui_position"></property>
+                                                                    <property name="aui_row"></property>
+                                                                    <property name="best_size"></property>
+                                                                    <property name="bg"></property>
+                                                                    <property name="caption"></property>
+                                                                    <property name="caption_visible">1</property>
+                                                                    <property name="center_pane">0</property>
+                                                                    <property name="close_button">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="default_pane">0</property>
+                                                                    <property name="dock">Dock</property>
+                                                                    <property name="dock_fixed">0</property>
+                                                                    <property name="docking">Left</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="floatable">1</property>
+                                                                    <property name="font"></property>
+                                                                    <property name="gripper">0</property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="label">Columns</property>
+                                                                    <property name="max_size"></property>
+                                                                    <property name="maximize_button">0</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="min_size"></property>
+                                                                    <property name="minimize_button">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="moveable">1</property>
+                                                                    <property name="name">m_staticText57</property>
+                                                                    <property name="pane_border">1</property>
+                                                                    <property name="pane_position"></property>
+                                                                    <property name="pane_size"></property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pin_button">1</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="resize">Resizable</property>
+                                                                    <property name="show">1</property>
+                                                                    <property name="size"></property>
+                                                                    <property name="style"></property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="toolbar_pane">0</property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <property name="wrap">-1</property>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                            <object class="sizeritem" expanded="0">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxSpinCtrl" expanded="0">
+                                                                    <property name="BottomDockable">1</property>
+                                                                    <property name="LeftDockable">1</property>
+                                                                    <property name="RightDockable">1</property>
+                                                                    <property name="TopDockable">1</property>
+                                                                    <property name="aui_layer"></property>
+                                                                    <property name="aui_name"></property>
+                                                                    <property name="aui_position"></property>
+                                                                    <property name="aui_row"></property>
+                                                                    <property name="best_size"></property>
+                                                                    <property name="bg"></property>
+                                                                    <property name="caption"></property>
+                                                                    <property name="caption_visible">1</property>
+                                                                    <property name="center_pane">0</property>
+                                                                    <property name="close_button">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="default_pane">0</property>
+                                                                    <property name="dock">Dock</property>
+                                                                    <property name="dock_fixed">0</property>
+                                                                    <property name="docking">Left</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="floatable">1</property>
+                                                                    <property name="font"></property>
+                                                                    <property name="gripper">0</property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="initial">1</property>
+                                                                    <property name="max">4</property>
+                                                                    <property name="max_size"></property>
+                                                                    <property name="maximize_button">0</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="min">1</property>
+                                                                    <property name="min_size"></property>
+                                                                    <property name="minimize_button">0</property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="moveable">1</property>
+                                                                    <property name="name">m_pSpinCols</property>
+                                                                    <property name="pane_border">1</property>
+                                                                    <property name="pane_position"></property>
+                                                                    <property name="pane_size"></property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pin_button">1</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="resize">Resizable</property>
+                                                                    <property name="show">1</property>
+                                                                    <property name="size">50,-1</property>
+                                                                    <property name="style">wxSP_ARROW_KEYS</property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="toolbar_pane">0</property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="value"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnSpinCtrl">OnSpinCols</event>
+                                                                    <event name="OnSpinCtrlText"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxEXPAND</property>
+                                                <property name="proportion">1</property>
+                                                <object class="wxBoxSizer" expanded="0">
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">m_pPreviewSizer</property>
+                                                    <property name="orient">wxVERTICAL</property>
+                                                    <property name="permission">protected</property>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxLEFT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxBoxSizer" expanded="0">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">m_pSizerSeriesCriteria</property>
+                                            <property name="orient">wxVERTICAL</property>
+                                            <property name="permission">protected</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Series criteria</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText65</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel6411</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Settings</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">EditCriteriaPanelBase</property>
+            <property name="pos"></property>
+            <property name="size">500,200</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">m_pGeneralSizer</property>
+                <property name="orient">wxHORIZONTAL</property>
+                <property name="permission">public</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL|wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="CustomControl" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="class">wxDataViewListCtrl</property>
+                        <property name="close_button">1</property>
+                        <property name="construction">m_pListCriteria= new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="declaration">wxDataViewListCtrl* m_pListCriteria;</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="include">#include <wx/dataview.h></property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pListCriteria</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="settings"></property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxRIGHT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxBoxSizer" expanded="0">
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pButtonSizer</property>
+                        <property name="orient">wxVERTICAL</property>
+                        <property name="permission">public</property>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                            <property name="proportion">0</property>
+                            <object class="wxButton" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default">0</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Add</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_button3</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnButtonClick">OnAddClick</event>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                            <property name="proportion">0</property>
+                            <object class="wxButton" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default">0</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">0</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Delete</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pBDelete</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnButtonClick">OnDeleteClick</event>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">525,180</property>
+            <property name="name">SelectOpeningModeBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Select opening mode</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer15</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelMessage</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Select opening mode</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer4</property>
+                                        <property name="orient">wxHORIZONTAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Select opening mode</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabel</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxChoice" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="choices"></property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pOpeningMode</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="selection">0</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnChoice"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer16</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Ok</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pOkButton</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button5</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">400,220</property>
+            <property name="name">AddTagDialogBase</property>
+            <property name="pos"></property>
+            <property name="size"></property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Add tag</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer15</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelMessage</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Add DICOM tag</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxFlexGridSizer" expanded="0">
+                                        <property name="cols">2</property>
+                                        <property name="flexible_direction">wxBOTH</property>
+                                        <property name="growablecols"></property>
+                                        <property name="growablerows"></property>
+                                        <property name="hgap">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="name">fgSizer17</property>
+                                        <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                        <property name="permission">none</property>
+                                        <property name="rows">0</property>
+                                        <property name="vgap">0</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Tag</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText59</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Value</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText60</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxChoice" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="choices"></property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pChoiceTag</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="selection">0</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnChoice"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxTextCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">0</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pTextValue</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer16</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Ok</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pOkButton</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button5</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">600,400</property>
+            <property name="name">SetupWindowPositionBase</property>
+            <property name="pos"></property>
+            <property name="size">600,400</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">Setup window position</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer113</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg">255,255,255</property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel97</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer114</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Setup position and size of the window where you want to open the study</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_staticText73</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer115</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_OK</property>
+                                            <property name="label">Save</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_button64</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick"></event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_CLOSE</property>
+                                            <property name="label">Cancel</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_button65</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick"></event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">SmartRetrieveConfigurationPanelBase</property>
+            <property name="pos"></property>
+            <property name="size">500,300</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer131</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxCheckBox" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="checked">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="label">Enable background queries</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pCheckEnable</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnCheckBox">OnCheckEnableBackgroundQueries</event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelQueries</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Stored queries</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer134</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="CustomControl" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="class">wxDataViewListCtrl</property>
+                                    <property name="close_button">1</property>
+                                    <property name="construction">m_pListQueries = new wxDataViewListCtrl(m_pPanelQueries, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="declaration">wxDataViewListCtrl* m_pListQueries;</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="include">#include <wx/dataview.h></property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pListQueries</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="settings"></property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp b/cadxcore/main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp
new file mode 100644
index 0000000..425620d
--- /dev/null
+++ b/cadxcore/main/gui/configuration/defaultmodalitysettingsconfigurationpanel.cpp
@@ -0,0 +1,546 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+#include <sstream>
+#include <limits>
+
+#include <main/controllers/modalitysettingscontroller.h>
+#include <main/controllers/controladorextensiones.h>
+#include <api/controllers/ipacscontroller.h>
+#include <main/entorno.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/dicom/idicommanager.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+#include <wx/tooltip.h>
+#include <wx/pen.h>
+#include <wx/pen.h>
+#include <wx/sizer.h>
+#include <wx/tokenzr.h>
+#include <wx/msgdlg.h>
+#include <wx/aui/auibar.h>
+#include <wx/menu.h>
+#include "defaultmodalitysettingsconfigurationpanel.h"
+#include <resources/ginkgoresourcesmanager.h>
+
+#define COL_LABEL_IDX				0
+#define COL_LABEL_WIDTH				100
+#define COL_WINDOW_IDX				1
+#define COL_WINDOW_WIDTH			80
+#define COL_LEVEL_IDX				2
+#define COL_LEVEL_WIDTH				80
+
+namespace GNC
+{
+namespace GUI
+{
+
+class ModalityPanel : public ModalityPanelBase
+{
+
+private:
+
+        wxObjectDataPtr<wxDataViewListStore> m_pModel;
+        typedef std::map<std::string, ModalityPanel*> TModalityMap;
+
+public:
+
+
+
+        class EditCornerAnnotationsDialog: public EditCornerAnnotationsDialogBase
+        {
+        public:
+                EditCornerAnnotationsDialog(ModalityPanel* pParent, const GNC::GCS::Ptr<GNC::GCS::AnnotationSettings>& pAnnotationSettings): EditCornerAnnotationsDialogBase(pParent),
+                        Parent(pParent)
+                {
+                        m_pHelpBitmap->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoHelp());
+                        SetDefaultValue(pAnnotationSettings, true);
+                        m_pMainPanel->Layout();
+                        m_pBody->Layout();
+                        Layout();
+                }
+
+                virtual void OnSetDefaultValues(wxCommandEvent& /*evt*/)
+                {
+                        GNC::GCS::Ptr<GNC::GCS::AnnotationSettings> pAnnotationSettings(new GNC::GCS::AnnotationSettings());
+                        SetDefaultValue(pAnnotationSettings, false);
+                }
+
+                virtual void SetDefaultValue( const GNC::GCS::Ptr<GNC::GCS::AnnotationSettings>& pAnnotationSettings, bool createPanels)
+                {
+                        if (pAnnotationSettings.IsValid()) {
+                                for (int i = 0; i < GNC::GCS::AnnotationSettings::TP_NumPos; ++i) {
+                                        //create panel
+                                        if (createPanels) {
+                                                m_panelVector.push_back(new CornerAnnotationPanel(m_pMainPanel));
+                                                m_pCornerAnnotationsSizer->Add(m_panelVector[i], 1,wxALL|wxEXPAND,5);
+                                        }
+                                        //set label
+                                        switch (i) {
+                                        case GNC::GCS::AnnotationSettings::TP_TopRight:
+                                                m_panelVector[i]->m_pLabel->SetLabel(_("Top right corner annotation"));
+                                                break;
+                                        case GNC::GCS::AnnotationSettings::TP_TopLeft:
+                                                m_panelVector[i]->m_pLabel->SetLabel(_("Top left corner annotation"));
+                                                break;
+                                        case GNC::GCS::AnnotationSettings::TP_BottomLeft:
+                                                m_panelVector[i]->m_pLabel->SetLabel(_("Bottom left corner annotation"));
+                                                break;
+                                        case GNC::GCS::AnnotationSettings::TP_BottomRight:
+                                                m_panelVector[i]->m_pLabel->SetLabel(_("Bottom right corner annotation"));
+                                                break;
+                                        }
+                                        //set line content
+                                        //reset values...
+                                        m_panelVector[i]->m_pLine1->SetValue(wxEmptyString);
+                                        m_panelVector[i]->m_pLine2->SetValue(wxEmptyString);
+                                        m_panelVector[i]->m_pLine3->SetValue(wxEmptyString);
+                                        m_panelVector[i]->m_pLine4->SetValue(wxEmptyString);
+                                        wxString strAnnotations = wxString::FromUTF8(pAnnotationSettings->getAnnotation((GNC::GCS::AnnotationSettings::TAnnotationPosition)i).c_str());
+                                        strAnnotations.Replace(wxT("${NEWLINE}"), wxT("\n"));
+                                        wxStringTokenizer tknz(strAnnotations, wxT("\n"));
+                                        int lineCount = 0;
+                                        std::ostringstream lastLine;
+                                        while(tknz.HasMoreTokens()) {
+                                                switch (lineCount++) {
+                                                case 0:
+                                                        m_panelVector[i]->m_pLine1->SetValue(tknz.GetNextToken());
+                                                        break;
+                                                case 1:
+                                                        m_panelVector[i]->m_pLine2->SetValue(tknz.GetNextToken());
+                                                        break;
+                                                case 2:
+                                                        m_panelVector[i]->m_pLine3->SetValue(tknz.GetNextToken());
+                                                        break;
+                                                default:
+                                                        if (lastLine.tellp() > 0) {
+                                                                lastLine << "${NEWLINE}";
+                                                        }
+                                                        lastLine << std::string(tknz.GetNextToken().ToUTF8());
+                                                }
+                                        }
+                                        m_panelVector[i]->m_pLine4->SetValue(wxString::FromUTF8(lastLine.str().c_str()));
+                                }
+                        }
+                }
+
+                virtual bool Validate()
+                {
+                        return true;
+                }
+
+                virtual void updateAnnotationSettings(const GNC::GCS::Ptr<GNC::GCS::AnnotationSettings>& pAnnotationSettings)
+                {
+                        for (int i = 0; i < GNC::GCS::AnnotationSettings::TP_NumPos; ++i) {
+                                std::ostringstream ostr;
+                                if (!m_panelVector[i]->m_pLine1->GetValue().IsEmpty()) {
+                                        ostr << m_panelVector[i]->m_pLine1->GetValue().ToUTF8();
+                                }
+                                if (!m_panelVector[i]->m_pLine1->GetValue().IsEmpty()) {
+                                        if (ostr.tellp() > 0) {
+                                                ostr << "${NEWLINE}";
+                                        }
+                                        ostr << m_panelVector[i]->m_pLine2->GetValue().ToUTF8();
+                                }
+                                if (!m_panelVector[i]->m_pLine1->GetValue().IsEmpty()) {
+                                        if (ostr.tellp() > 0) {
+                                                ostr << "${NEWLINE}";
+                                        }
+                                        ostr << m_panelVector[i]->m_pLine3->GetValue().ToUTF8();
+                                }
+                                if (!m_panelVector[i]->m_pLine1->GetValue().IsEmpty()) {
+                                        if (ostr.tellp() > 0) {
+                                                ostr << "${NEWLINE}";
+                                        }
+                                        ostr << m_panelVector[i]->m_pLine4->GetValue().ToUTF8();
+                                }
+                                pAnnotationSettings->setAnnotation((GNC::GCS::AnnotationSettings::TAnnotationPosition)i, ostr.str());
+                        }
+
+                }
+
+                ModalityPanel* Parent;
+                std::vector<CornerAnnotationPanel*> m_panelVector;
+        };
+
+        class AddWindowLevelDialog: public AddWLDialogBase
+        {
+        public:
+                AddWindowLevelDialog(ModalityPanel* pParent): AddWLDialogBase(pParent),
+                        Parent(pParent),
+                        EditMode(false)
+                {
+                }
+
+                AddWindowLevelDialog(ModalityPanel* pParent, const wxString& label, const wxString& window, const wxString& level):
+                        AddWLDialogBase(pParent),
+                        Parent(pParent),
+                        EditMode(true)
+                {
+                        m_pLabel->SetValue(label);
+                        m_pWindow->SetValue(window);
+                        m_pLevel->SetValue(level);
+                }
+
+                virtual bool Validate()
+                {
+                        if (m_pLabel->GetValue().empty() || m_pWindow->GetValue().empty() || m_pLevel->GetValue().empty()) {
+                                wxMessageBox(_("You must fill in all fields"),_("Info"),wxOK | wxICON_INFORMATION, this);
+                                return false;
+                        } else {
+                                double window, level;
+                                if (m_pWindow->GetValue().ToDouble(&window) && m_pLevel->GetValue().ToDouble(&level)) {
+                                        if (!EditMode && Parent->m_pDefaultWindowLevel->FindString(m_pLabel->GetValue()) > 0) {
+                                                wxMessageBox(_("Window/level label in use"),_("Info"),wxOK | wxICON_INFORMATION, this);
+                                                return false;
+                                        }
+                                        return true;
+                                } else {
+                                        wxMessageBox(_("Fill in valid numbers in window and level fields."),_("Info"),wxOK | wxICON_INFORMATION, this);
+                                        return false;
+                                }
+                        }
+                }
+
+                ModalityPanel* Parent;
+                bool EditMode;
+        };
+
+        ModalityPanel(wxWindow* pParent, DefaultModalitySettingsConfigurationPanel* pconfiguration, const GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings>& lo): ModalityPanelBase(pParent),
+                modSettings(lo),
+                pConfiguration(pconfiguration)
+        {
+                m_pModel = new wxDataViewListStore();
+                m_pListWL->AssociateModel(m_pModel.get());
+                m_pListWL->AppendColumn( new wxDataViewColumn( _("Label"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), COL_LABEL_IDX, COL_LABEL_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+                m_pListWL->AppendColumn( new wxDataViewColumn( _("Window"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), COL_WINDOW_IDX, COL_WINDOW_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+                m_pListWL->AppendColumn( new wxDataViewColumn( _("Level"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), COL_LEVEL_IDX, COL_LEVEL_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+
+        }
+
+        void InitPanels()
+        {
+
+                wxVector<wxVariant> data;
+
+                for (GNC::GCS::DefaultModalitySettings::TListOfWLSettings::const_iterator it = modSettings->getWLSettings().begin(); it != modSettings->getWLSettings().end(); ++it) {
+                        const GNC::GCS::DefaultModalitySettings::TListOfWLSettings::value_type& tuple = (*it);
+                        data.clear();
+
+                        data.push_back(wxString::FromUTF8(tuple->getLabel().c_str()));
+                        data.push_back(wxString::Format(wxT("%lf"), tuple->getWindow()));
+                        data.push_back(wxString::Format(wxT("%lf"), tuple->getLevel()));
+
+                        m_pListWL->AppendItem(data);
+                }
+
+                RebuildComboWL();
+
+                m_pChoiceInterpolate->Append(_("Nearest neighbour"));
+                m_pChoiceInterpolate->Append(_("Linear"));
+                m_pChoiceInterpolate->Append(_("Cubic"));
+
+                if (modSettings->getInterpolationMode() == GNC::GCS::DefaultModalitySettings::TIM_NEAREST_NEIGHBOUR) {
+                        m_pChoiceInterpolate->Select(0);
+                } else if (modSettings->getInterpolationMode() == GNC::GCS::DefaultModalitySettings::TIM_LINEAR) {
+                        m_pChoiceInterpolate->Select(1);
+                }  else if (modSettings->getInterpolationMode() == GNC::GCS::DefaultModalitySettings::TIM_CUBIC) {
+                        m_pChoiceInterpolate->Select(2);
+                }
+        }
+
+        void RebuildComboWL()
+        {
+                m_pDefaultWindowLevel->Clear();
+                m_pDefaultWindowLevel->Append(wxString::FromUTF8(GNC::GCS::DefaultModalitySettings::getDefaultWindowLevelLabel().c_str()));
+                m_pDefaultWindowLevel->Append(wxString::FromUTF8(GNC::GCS::DefaultModalitySettings::getAutocalculateWindowLevelLabel().c_str()));
+                m_pDefaultWindowLevel->Select(0);
+                if (modSettings->getInitialWindowLevelLabel() == GNC::GCS::DefaultModalitySettings::getAutocalculateWindowLevelLabel()) {
+                        m_pDefaultWindowLevel->Select(1);
+                }
+                for (GNC::GCS::DefaultModalitySettings::TListOfWLSettings::const_iterator it = modSettings->getWLSettings().begin(); it != modSettings->getWLSettings().end(); ++it) {
+                        int item = m_pDefaultWindowLevel->Append(wxString::FromUTF8((*it)->getLabel().c_str()));
+                        if ((*it)->getLabel() == modSettings->getInitialWindowLevelLabel()) {
+                                m_pDefaultWindowLevel->Select (item);
+                        }
+                }
+        }
+
+        const std::string& getModalityName()
+        {
+                return modSettings->getModality();
+        }
+
+        virtual void OnAddWL(wxCommandEvent& /*evt*/)
+        {
+
+                AddWindowLevelDialog dlg(this);
+                if (dlg.ShowModal() == wxID_OK) {
+
+                        m_pDefaultWindowLevel->Append(dlg.m_pLabel->GetValue());
+
+                        wxVector<wxVariant> data;
+
+                        data.push_back(dlg.m_pLabel->GetValue());
+                        data.push_back(dlg.m_pWindow->GetValue());
+                        data.push_back(dlg.m_pLevel->GetValue());
+
+                        m_pModel->AppendItem(data);
+
+                        pConfiguration->OnPropiedadCambiada();
+                }
+
+        }
+
+        virtual void OnChoiceChanged(wxCommandEvent& )
+        {
+                pConfiguration->OnPropiedadCambiada();
+        }
+
+        virtual void OnEditWL(wxCommandEvent& /*evt*/)
+        {
+
+                wxDataViewItem selection = m_pListWL->GetSelection();
+                if(selection.IsOk()) {
+                        wxVariant oldLabel;
+                        wxVariant oldWindow;
+                        wxVariant oldLevel;
+
+                        m_pModel->GetValue(oldLabel, selection, COL_LABEL_IDX);
+                        m_pModel->GetValue(oldWindow, selection, COL_WINDOW_IDX);
+                        m_pModel->GetValue(oldLevel, selection, COL_LEVEL_IDX);
+
+                        AddWindowLevelDialog dlg(this, oldLabel, oldWindow, oldLevel);
+                        if (dlg.ShowModal() == wxID_OK) {
+                                int comboItem = m_pDefaultWindowLevel->FindString(oldLabel);
+                                if (comboItem > 0) {
+                                        m_pDefaultWindowLevel->SetString(comboItem, dlg.m_pLabel->GetValue());
+                                }
+                                m_pModel->SetValue(dlg.m_pLabel->GetValue(), selection, COL_LABEL_IDX);
+                                m_pModel->SetValue(dlg.m_pWindow->GetValue(), selection, COL_WINDOW_IDX);
+                                m_pModel->SetValue(dlg.m_pLevel->GetValue(), selection, COL_LEVEL_IDX);
+
+                                m_pModel->ItemChanged(selection);
+
+                                pConfiguration->OnPropiedadCambiada();
+                        }
+                }
+        }
+
+        virtual void OnDeleteWL(wxCommandEvent& /*evt*/)
+        {
+
+                wxDataViewItem selection = m_pListWL->GetSelection();
+                if(selection.IsOk()) {
+                        int answer = wxMessageBox(_("Do you confirm the removal of the preset?"), _("Data modified"), wxYES_NO | wxCANCEL, this);
+                        if(answer == wxYES) {
+
+                                wxVariant oldLabel;
+                                m_pModel->GetValue(oldLabel, selection, COL_LABEL_IDX);
+
+                                int comboItem = m_pDefaultWindowLevel->FindString(oldLabel.GetString());
+                                if (comboItem > 0) {
+                                        m_pDefaultWindowLevel->Delete(comboItem);
+                                        if (m_pDefaultWindowLevel->GetSelection() < 0) {
+                                                m_pDefaultWindowLevel->Select(0);
+                                        }
+                                }
+                                bool notFound = true;
+                                for (unsigned int i = 0; notFound && i < m_pModel->GetCount(); ++i) {
+                                        wxDataViewItem item = m_pModel->GetItem(i);
+
+                                        wxVariant val2;
+                                        m_pModel->GetValue(val2, item, COL_LABEL_IDX);
+                                        if (oldLabel == val2) {
+                                                notFound = false;
+                                                m_pModel->DeleteItem(i);
+                                        }
+                                }
+
+                                pConfiguration->OnPropiedadCambiada();
+                        }
+                }
+        }
+
+        virtual void OnSetupCornerAnnotations(wxCommandEvent& /*evt*/)
+        {
+                EditCornerAnnotationsDialog dlg(this, modSettings->getAnnotationSettings());
+                if (dlg.ShowModal() == wxID_OK) {
+                        dlg.updateAnnotationSettings(modSettings->getAnnotationSettings());
+                        pConfiguration->OnPropiedadCambiada();
+                }
+        }
+
+        GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> GetSettings()
+        {
+                modSettings->clearWindowLevels();
+                modSettings->setInitialWindowLevelLabel(std::string(m_pDefaultWindowLevel->GetString(m_pDefaultWindowLevel->GetSelection()).ToUTF8()));
+
+                for (unsigned int i = 0; i < m_pModel->GetCount(); ++i) {
+                        wxDataViewItem item = m_pModel->GetItem(i);
+                        double window;
+                        double level;
+                        wxVariant labelVal;
+                        wxVariant windowVal;
+                        wxVariant levelVal;
+
+                        m_pModel->GetValue(labelVal, item, COL_LABEL_IDX);
+                        m_pModel->GetValue(windowVal, item, COL_WINDOW_IDX);
+                        m_pModel->GetValue(levelVal, item, COL_LEVEL_IDX);
+
+                        if (windowVal.GetString().ToDouble(&window) && levelVal.GetString().ToDouble(&level)) {
+                                GNC::GCS::Ptr<GNC::GCS::WindowLevelSetting> wlSettings(new GNC::GCS::WindowLevelSetting(window, level, std::string(labelVal.GetString().ToUTF8())));
+                                modSettings->addWindowLevel(wlSettings);
+                        }
+                }
+
+                modSettings->setInterpolationMode((GNC::GCS::DefaultModalitySettings::TInterpolationMode)m_pChoiceInterpolate->GetSelection());
+                return modSettings;
+        }
+
+        GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> modSettings;
+        DefaultModalitySettingsConfigurationPanel* pConfiguration;
+};
+
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+DefaultModalitySettingsConfigurationPanel::DefaultModalitySettingsConfigurationPanel(wxWindow* pParent,IDialogoConfiguracion* pDialogo): DefaultModalitySettingsConfigurationPanelBase(pParent), IPasoConfiguracion(pDialogo)
+{
+
+        Recargar();
+
+        wxColour barColor = wxColour(200,200,200);
+        wxFont fontBar = wxFont( 10, 70, 90, wxFONTWEIGHT_BOLD, false, wxEmptyString );
+}
+
+DefaultModalitySettingsConfigurationPanel::~DefaultModalitySettingsConfigurationPanel()
+{
+}
+
+void DefaultModalitySettingsConfigurationPanel::Recargar()
+{
+
+        GNC::GCS::ModalitySettingsController::TMapOfModalitySettings modalitySettings = GNC::GCS::ModalitySettingsController::Instance()->getModalitySettingsMap();
+
+        m_pWLList->DeleteAllItems();
+        m_currentModality = NULL;
+        for (TModalityMap::iterator it = modalityBrowser.begin(); it != modalityBrowser.end(); ++it) {
+                (*it).second->Destroy();
+        }
+        modalityBrowser.clear();
+        //default modality settings...
+        wxTreeItemId root = m_pWLList->AddRoot(_("Modalities"));
+        for (GNC::GCS::ModalitySettingsController::TMapOfModalitySettings::const_iterator it = modalitySettings.begin(); it != modalitySettings.end(); ++it) {
+                if ((*it).second.IsValid()) {
+                        ModalityPanel * mp = new ModalityPanel(m_pModalityPanel, this, (*it).second);
+                        wxTreeItemId id = m_pWLList->AppendItem(root, wxString::FromUTF8(mp->getModalityName().c_str()));
+                        modalityBrowser[id.m_pItem] = mp;
+                        mp->InitPanels();
+                        mp->Hide();
+                        m_pSizerModalities->Add(mp, 1, wxEXPAND|wxALL, 5);
+                        m_pModalityPanel->Layout();
+                }
+        }
+        wxTreeItemIdValue cookie;
+        m_pWLList->SelectItem(m_pWLList->GetFirstChild(root, cookie));
+        LoadCurrent();
+        //*/
+        Layout();
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* DefaultModalitySettingsConfigurationPanel::GetPanel()
+{
+        return this;
+}
+
+std::string DefaultModalitySettingsConfigurationPanel::GetTitle()
+{
+        return _Std("Modality settings");
+}
+
+std::string DefaultModalitySettingsConfigurationPanel::GetCabecera()
+{
+        return _Std("Default modality settings");
+}
+
+bool DefaultModalitySettingsConfigurationPanel::Validar()
+{
+        bool ok = true;
+        return ok;
+}
+
+bool DefaultModalitySettingsConfigurationPanel::Guardar()
+{
+        //get hanging protocols...
+
+        GNC::GCS::ModalitySettingsController::Instance()->clearModalitySettings();
+
+        for (TModalityMap::iterator it = modalityBrowser.begin(); it != modalityBrowser.end(); ++it) {
+                GNC::GCS::ModalitySettingsController::Instance()->addModalitySettings((*it).second->GetSettings());
+        }
+        GNC::GCS::ModalitySettingsController::Instance()->StoreModalitySettingsConfiguration();
+        return true;
+}
+//endregion
+
+
+void DefaultModalitySettingsConfigurationPanel::OnTreeSelChanged(wxTreeEvent &)
+{
+        LoadCurrent();
+}
+
+void DefaultModalitySettingsConfigurationPanel::LoadCurrent()
+{
+        wxTreeItemId id = m_pWLList->GetSelection();
+        if (id.IsOk()) {
+                if(modalityBrowser.find(id.m_pItem) != modalityBrowser.end()) {
+                        ModalityPanel* pCurrent = modalityBrowser[id.m_pItem];
+                        if( pCurrent!=NULL && pCurrent!=m_currentModality) {
+                                m_pTitledPanelModalities->Freeze();
+                                if(m_currentModality!=NULL) {
+                                        m_currentModality->Hide();
+                                }
+                                m_currentModality = pCurrent;
+                                wxString modName = wxString::Format(_("%s settings"),wxString::FromUTF8(pCurrent->getModalityName().c_str()).c_str());
+                                m_pTitledPanelModalities->SetToolTip(modName);
+                                m_currentModality->Show();
+                                m_pModalityPanel->SetScrollbars(20, 20, 50, 50, 0, 0, false);
+                                m_pModalityPanel->AdjustScrollbars();
+                                m_pTitledPanelModalities->Layout();
+                                m_pTitledPanelModalities->Thaw();
+                        }
+                }
+        }
+}
+
+void DefaultModalitySettingsConfigurationPanel::OnPropiedadCambiada()
+{
+        IPasoConfiguracion::OnPropiedadCambiada();
+}
+
+void DefaultModalitySettingsConfigurationPanel::OnSize(wxSizeEvent & event)
+{
+        event.Skip(true);
+}
+}
+}
diff --git a/cadxcore/main/gui/configuration/defaultmodalitysettingsconfigurationpanel.h b/cadxcore/main/gui/configuration/defaultmodalitysettingsconfigurationpanel.h
new file mode 100644
index 0000000..80f3cfc
--- /dev/null
+++ b/cadxcore/main/gui/configuration/defaultmodalitysettingsconfigurationpanel.h
@@ -0,0 +1,66 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+#include <string>
+#include <vector>
+
+namespace GNC
+{
+namespace GUI
+{
+class ModalityPanel;
+class DefaultModalitySettingsConfigurationPanel: public DefaultModalitySettingsConfigurationPanelBase, public IPasoConfiguracion
+{
+public:
+        DefaultModalitySettingsConfigurationPanel(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~DefaultModalitySettingsConfigurationPanel();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+        virtual void OnPropiedadCambiada();
+
+protected:
+        virtual void OnTreeSelChanged(wxTreeEvent &);
+        void LoadCurrent();
+
+        void OnSize(wxSizeEvent &);
+
+        typedef std::map<wxTreeItemId, ModalityPanel*> TModalityMap;
+        TModalityMap modalityBrowser;
+        ModalityPanel* m_currentModality;
+
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/dialogoconfiguracion.cpp b/cadxcore/main/gui/configuration/dialogoconfiguracion.cpp
new file mode 100644
index 0000000..a321066
--- /dev/null
+++ b/cadxcore/main/gui/configuration/dialogoconfiguracion.cpp
@@ -0,0 +1,314 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/xml/xml.h>
+#include <wx/sstream.h>
+#include <wx/filedlg.h>
+
+
+#include "dialogoconfiguracion.h"
+#include "panelconfiguracionestacion.h"
+#include "panelconfiguracionhce.h"
+#include "panelconfiguracionpacs.h"
+#include "panelconfiguracionextensiones.h"
+#include "panelconfiguracionpermisos.h"
+#include "panelconfiguracionseguridad.h"
+#include "panelconfiguracionubicaciones.h"
+#include "panelconfiguraciongeneral.h"
+#include "panelconfigurationanonymization.h"
+#include "hangingprotocolconfigurationpanel.h"
+#include "smartretrieveconfigurationpanel.h"
+#include "localdatabaseconfigurationpanel.h"
+#include "defaultmodalitysettingsconfigurationpanel.h"
+
+#include <main/entorno.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladorpermisos.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include <vector>
+#include <sstream>
+
+namespace GNC
+{
+namespace GUI
+{
+
+DialogoConfiguracion::DialogoConfiguracion(wxWindow* pParent):DialogoConfiguracionBase(pParent)
+{
+        wxTreeItemId raiz = m_pTreeNavegacion->AddRoot(wxT("root"));
+        wxTreeItemId ginkgo = m_pTreeNavegacion->AppendItem(raiz,wxString::FromUTF8(GNC::Entorno::Instance()->GetApplicationName().c_str()));
+
+        SetTitle(wxString::FromUTF8(GNC::Entorno::Instance()->GetApplicationName().c_str()) + wxT(" ") + _("settings"));
+
+        //se añade el primer paso de ginkgo
+        wxTreeItemId primerId;
+        IPasoConfiguracion* pPaso = new PanelConfiguracionGeneral(m_pPanelConfig,this);;
+        pPaso->GetPanel()->Hide();
+        wxTreeItemId id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        m_MapaPasos[id.m_pItem] = pPaso;
+
+        primerId = id;
+
+        pPaso = new PanelConfiguracionEstacion(m_pPanelConfig, this);
+        pPaso->GetPanel()->Hide();
+        id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        m_MapaPasos[id.m_pItem] = pPaso;
+
+        pPaso = new LocalDatabaseConfigurationPanel(m_pPanelConfig, this);
+        pPaso->GetPanel()->Hide();
+        id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        m_MapaPasos[id.m_pItem] = pPaso;
+
+        pPaso = new PanelConfiguracionHCE(m_pPanelConfig, this);
+        pPaso->GetPanel()->Hide();
+        id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        m_MapaPasos[id.m_pItem] = pPaso;
+
+        pPaso = new PanelConfiguracionPACS(m_pPanelConfig, this);
+        pPaso->GetPanel()->Hide();
+        id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        m_MapaPasos[id.m_pItem] = pPaso;
+
+        pPaso = new SmartRetrieveConfigurationPanel(m_pPanelConfig, this);
+        pPaso->GetPanel()->Hide();
+        id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        m_MapaPasos[id.m_pItem] = pPaso;
+        /*
+        			pPaso = new PanelConfiguracionExtensiones(m_pPanelConfig, this);
+        			pPaso->GetPanel()->Hide();
+        			id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        			m_MapaPasos[id.m_pItem] = pPaso;
+        */
+        pPaso = new PanelConfiguracionPermisos(m_pPanelConfig, this);
+        pPaso->GetPanel()->Hide();
+        id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        m_MapaPasos[id.m_pItem] = pPaso;
+
+        pPaso = new DefaultModalitySettingsConfigurationPanel(m_pPanelConfig, this);
+        pPaso->GetPanel()->Hide();
+        id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        m_MapaPasos[id.m_pItem] = pPaso;
+
+        pPaso = new HangingProtocolConfigurationPanel(m_pPanelConfig, this);
+        pPaso->GetPanel()->Hide();
+        id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        m_MapaPasos[id.m_pItem] = pPaso;
+
+        if (GNC::GCS::IControladorPermisos::Instance()->Get("core.seguridad","setup_security")) {
+                pPaso = new PanelConfiguracionSeguridad(m_pPanelConfig, this);
+                pPaso->GetPanel()->Hide();
+                id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+                m_MapaPasos[id.m_pItem] = pPaso;
+        }
+
+        pPaso = new PanelConfiguracionUbicaciones(m_pPanelConfig, this);
+        pPaso->GetPanel()->Hide();
+        id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        m_MapaPasos[id.m_pItem] = pPaso;
+
+        /*			pPaso = new PanelConfigurationAnonymization(m_pPanelConfig, this);
+        			pPaso->GetPanel()->Hide();
+        			id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8(pPaso->GetTitle().c_str()));
+        			m_MapaPasos[id.m_pItem] = pPaso;
+        */
+        m_currentPaso = NULL;
+        m_pTreeNavegacion->SelectItem(primerId);
+
+        std::list<IPasoConfiguracion*> extraConfig;
+        for (GNC::ControladorExtensiones::ListaModulos::const_iterator it = GNC::ControladorExtensiones::Instance()->Modulos().begin(); it != GNC::ControladorExtensiones::Instance()->Modulos().end(); ++it) {
+                (*it).second->GetPasosConfiguracion(extraConfig, m_pPanelConfig, this);
+        }
+
+        for (std::list<IPasoConfiguracion*>::iterator it = extraConfig.begin(); it != extraConfig.end(); ++it) {
+                (*it)->GetPanel()->Hide();
+                id = m_pTreeNavegacion->AppendItem(ginkgo,wxString::FromUTF8((*it)->GetTitle().c_str()));
+                m_MapaPasos[id.m_pItem] = (*it);
+        }
+
+        CargarCurrent();
+        m_pBAplicar->Enable(false);
+
+        Layout();
+}
+
+DialogoConfiguracion::~DialogoConfiguracion()
+{
+
+}
+
+void DialogoConfiguracion::CargarCurrent()
+{
+        wxTreeItemId id = m_pTreeNavegacion->GetSelection();
+        if(id.IsOk()) {
+                if(m_MapaPasos.find(id.m_pItem) != m_MapaPasos.end()) {
+                        IPasoConfiguracion* pCurrent = m_MapaPasos[id.m_pItem];
+                        if( pCurrent!=NULL && pCurrent!=m_currentPaso) {
+                                Freeze();
+                                if(m_currentPaso!=NULL) {
+                                        if(!m_currentPaso->Validar()) {
+                                                if(m_pTreeNavegacion->GetSelection() != id) {
+                                                        m_pTreeNavegacion->SelectItem(id);
+                                                }
+                                                Thaw();
+                                                return;
+                                        }
+                                        m_currentPaso->GetPanel()->Hide();
+                                        m_pSizerPaneles->Detach(m_currentPaso->GetPanel());
+                                }
+                                m_currentPaso = pCurrent;
+                                m_currentPaso->GetPanel()->Show();
+                                m_pSizerPaneles->Add(m_currentPaso->GetPanel(),10, wxEXPAND|wxALL, 10);
+                                m_pTitledPanelConfig->SetTitle(wxString::FromUTF8(m_currentPaso->GetCabecera().c_str()));
+
+                                m_pPanelConfig->Layout();
+                                m_pPanelConfig->SetScrollbars(20, 20, 50, 50, 0, 0, false);
+                                m_pPanelConfig->AdjustScrollbars();
+                                m_pTitledPanelConfig->Layout();
+                                Thaw();
+                        }
+                }
+        }
+}
+
+void DialogoConfiguracion::OnPropiedadCambiada()
+{
+        if(!m_pBAplicar->IsEnabled()) {
+                m_pBAplicar->Enable();
+        }
+}
+
+void DialogoConfiguracion::OnCancelarClick(wxCommandEvent &)
+{
+        EndModal(wxID_CANCEL);
+}
+
+void DialogoConfiguracion::OnAceptarClick(wxCommandEvent &)
+{
+        if(m_pBAplicar->IsEnabled()) {
+                bool validar=true;
+                for(MapaPasos::iterator it = m_MapaPasos.begin(); it != m_MapaPasos.end(); ++it) {
+                        validar = validar && (*it).second->Validar();
+                }
+
+                if(validar) {
+                        for(MapaPasos::iterator it = m_MapaPasos.begin(); it != m_MapaPasos.end(); ++it) {
+                                (*it).second->Guardar();
+                        }
+
+                        GNC::GCS::ConfigurationController::Instance()->Flush();
+
+                        GNC::GCS::ControladorVistas* pC = GNC::GCS::ControladorVistas::Instance();
+                        if (pC != NULL) {
+                                pC->PropagarConfiguracionCambiada();
+                        }
+                        m_pBAplicar->Disable();
+                        EndModal(wxID_OK);
+                }
+        } else {
+                EndModal(wxID_OK);
+        }
+}
+
+void DialogoConfiguracion::OnAplicarClick(wxCommandEvent &)
+{
+        bool validar=true;
+        for(MapaPasos::iterator it = m_MapaPasos.begin(); it != m_MapaPasos.end(); ++it) {
+                validar = validar && (*it).second->Validar();
+        }
+
+        if(validar) {
+                for(MapaPasos::iterator it = m_MapaPasos.begin(); it != m_MapaPasos.end(); ++it) {
+                        (*it).second->Guardar();
+                }
+
+                GNC::GCS::ConfigurationController::Instance()->Flush();
+
+                GNC::GCS::ControladorVistas* pC = GNC::GCS::ControladorVistas::Instance();
+                if (pC != NULL) {
+                        pC->PropagarConfiguracionCambiada();
+                }
+                m_pBAplicar->Disable();
+        }
+}
+
+void DialogoConfiguracion::OnCambioNodoNavegacion(wxTreeEvent &)
+{
+        CargarCurrent();
+}
+
+void DialogoConfiguracion::OnExportarClick(wxCommandEvent &)
+{
+        wxFileDialog seleccionarFichero (this, _("Export Configuration"), wxT(""), wxT(""), _("Ini Files(*.ini)|*.ini"),wxFD_SAVE);
+        int response = seleccionarFichero.ShowModal();
+        if (response == wxID_OK) {
+                if(wxFileExists(seleccionarFichero.GetPath())) {
+                        response = wxMessageBox(_("File exists\nWould you like to overwrite it?"), _("Existing file"), wxYES_NO | wxCANCEL,this);
+                        if(response != wxYES) {
+                                return;
+                        }
+                }
+                std::string stdPath(TOPATH(seleccionarFichero.GetPath()));
+                if (GNC::GCS::ConfigurationController::Instance()->saveGlobalConfigurationFile(stdPath)) {
+                        wxMessageBox(_("Export successfully completed"),_("Info"),wxOK,this);
+                } else {
+                        wxMessageBox(_("There was an error during exportation"),_("Info"),wxOK,this);
+                }
+        }
+}
+
+void DialogoConfiguracion::OnImportarClick(wxCommandEvent &)
+{
+        wxFileDialog seleccionarFichero (this, _("Import Configuration"), wxT(""), wxT(""), _("Ini files(*.ini)|*.ini"),wxFD_FILE_MUST_EXIST|wxFD_OPEN);
+        int response = seleccionarFichero.ShowModal();
+        if (response == wxID_OK) {
+                std::string stdPath(TOPATH(seleccionarFichero.GetPath()));
+                if (GNC::GCS::ConfigurationController::Instance()->loadGlobalConfigurationFile(stdPath)) {
+                        GNC::GCS::ConfigurationController::Instance()->Flush();
+
+                        for(MapaPasos::iterator it = m_MapaPasos.begin(); it != m_MapaPasos.end(); ++it) {
+                                (*it).second->Recargar();
+                        }
+
+                        GNC::GCS::ControladorVistas* pC = GNC::GCS::ControladorVistas::Instance();
+                        if (pC != NULL) {
+                                pC->PropagarConfiguracionCambiada();
+                        }
+                        m_pBAplicar->Disable();
+                        wxMessageBox(_("Import successfully completed, restart Ginkgo CADx to apply changes"),_("Info"),wxOK,this);
+                } else {
+                        wxMessageBox(_("There was an error during importation, check permissions"),_("Info"),wxOK,this);
+                }
+        }
+}
+
+}
+
+}
diff --git a/cadxcore/main/gui/configuration/dialogoconfiguracion.h b/cadxcore/main/gui/configuration/dialogoconfiguracion.h
new file mode 100644
index 0000000..449cfaa
--- /dev/null
+++ b/cadxcore/main/gui/configuration/dialogoconfiguracion.h
@@ -0,0 +1,66 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "panelesconfiguracionginkgobase.h"
+
+#include <api/iconfiguracion.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/ientorno.h>
+
+#include <string>
+#include <vector>
+
+namespace GNC
+{
+namespace GUI
+{
+
+class DialogoConfiguracion: public IDialogoConfiguracion, public DialogoConfiguracionBase
+{
+public:
+        DialogoConfiguracion(wxWindow* pParent);
+        ~DialogoConfiguracion();
+
+        virtual void OnCambioNodoNavegacion(wxTreeEvent &event);
+
+        void CargarCurrent();
+
+        void OnPropiedadCambiada();
+
+        void OnCancelarClick(wxCommandEvent &event);
+
+        void OnAceptarClick(wxCommandEvent &event);
+
+        void OnAplicarClick(wxCommandEvent &event);
+
+        void OnExportarClick(wxCommandEvent &event);
+
+        void OnImportarClick(wxCommandEvent &event);
+
+        typedef std::map<wxTreeItemIdValue ,IPasoConfiguracion*> MapaPasos;
+
+        MapaPasos m_MapaPasos;
+
+        IPasoConfiguracion* m_currentPaso;
+
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/hangingprotocolconfigurationpanel.cpp b/cadxcore/main/gui/configuration/hangingprotocolconfigurationpanel.cpp
new file mode 100644
index 0000000..6ff1e53
--- /dev/null
+++ b/cadxcore/main/gui/configuration/hangingprotocolconfigurationpanel.cpp
@@ -0,0 +1,975 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+#include <sstream>
+#include <limits>
+
+#include <main/controllers/hangingprotocolcontroller.h>
+#include <main/controllers/controladorextensiones.h>
+#include <api/controllers/ipacscontroller.h>
+#include <main/entorno.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/dicom/idicommanager.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+#include <wx/tooltip.h>
+#include <wx/pen.h>
+#include <wx/pen.h>
+#include <wx/sizer.h>
+#include <wx/msgdlg.h>
+#include <wx/menu.h>
+#include <wx/wxginkgotoolbar.h>
+#include "hangingprotocolconfigurationpanel.h"
+#include <resources/ginkgoresourcesmanager.h>
+
+#define COL_LABEL_ID				0
+#define COL_WINDOW_ID				1
+#define COL_LEVEL_ID				2
+
+#define COL_HP_NAME					0
+#define COL_HP_ACTIVE				1
+#define COL_HP_CLIENT_DATA			2
+
+namespace GNC
+{
+namespace GUI
+{
+//////////////////////////////////////////
+class HangingButtonsBar : public wxAuiToolBar
+{
+public:
+        HangingButtonsBar(wxWindow* pParent, const wxColour& color, const wxFont& fuente, int style): wxAuiToolBar (pParent,wxID_ANY, wxDefaultPosition, wxDefaultSize, style)
+        {
+                SetToolBitmapSize(wxSize(16,16));
+
+                wxGinkgoToolBarArt* pToolArt= new wxGinkgoToolBarArt();
+                pToolArt->SetCustomBaseColor(color);
+                pToolArt->SetFont(fuente);
+                SetArtProvider(pToolArt);
+
+                Realize();
+        }
+
+        ~HangingButtonsBar()
+        {
+        }
+};
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+class SelectOpeningMode: public SelectOpeningModeBase
+{
+public:
+        SelectOpeningMode(wxWindow* pParent): SelectOpeningModeBase(pParent)
+        {
+                GNC::ControladorExtensiones::ListaModulos listaModulos = ControladorExtensiones::Instance()->Modulos();
+                for(GNC::ControladorExtensiones::IteradorListaModulos itModulos=listaModulos.begin(); itModulos!=listaModulos.end(); ++itModulos) {
+                        for(GNC::GCS::IModuleController::IteradorListaModos itModos=(*itModulos).second->GetListaModos().begin(); itModos!=(*itModulos).second->GetListaModos().end(); ++itModos) {
+                                wxString wxStr = wxString::FromUTF8((*itModos)->GetDescripcion().c_str());
+                                m_pOpeningMode->AppendString(wxStr);
+                                m_modulos.push_back((*itModulos).second);
+                                m_modos.push_back((*itModos));
+                        }
+                }
+                if(m_pOpeningMode->GetCount() > 0) {
+                        m_pOpeningMode->Select(0);
+                }
+                m_pPanelMessage->Layout();
+                m_pBody->Layout();
+        }
+
+        ~SelectOpeningMode()
+        {
+        }
+
+        GNC::GCS::IModuleController* GetModuloSeleccionado()
+        {
+                return m_modulos[m_pOpeningMode->GetSelection()];
+        }
+
+        GNC::GCS::ModoControlador* GetModoSeleccionado()
+        {
+                return m_modos[m_pOpeningMode->GetSelection()];
+        }
+        typedef std::vector<GNC::GCS::IModuleController*> TipoVectorModulos;
+        typedef std::vector<GNC::GCS::ModoControlador*> TipoVectorModos;
+        TipoVectorModulos m_modulos;
+        TipoVectorModos m_modos;
+};
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+class AddTagDialog: public AddTagDialogBase
+{
+public:
+        AddTagDialog(wxWindow* pParent): AddTagDialogBase(pParent)
+        {
+                listId.push_back(GKDCM_PatientID);
+                listId.push_back(GKDCM_IssuerOfPatientID);
+                listId.push_back(GKDCM_PatientBirthDate);
+                listId.push_back(GKDCM_PatientSex);
+                listId.push_back(GKDCM_PatientName);
+                listId.push_back(GKDCM_StudyInstanceUID);
+                listId.push_back(GKDCM_StudyID);
+                listId.push_back(GKDCM_AccessionNumber);
+                listId.push_back(GKDCM_ReferringPhysicianName);
+                listId.push_back(GKDCM_StudyDescription);
+                listId.push_back(GKDCM_ModalitiesInStudy);
+                listId.push_back(GKDCM_SeriesInstanceUID);
+                listId.push_back(GKDCM_SeriesNumber);
+                listId.push_back(GKDCM_Modality);
+                listId.push_back(GKDCM_BodyPartExamined);
+                listId.push_back(GKDCM_Laterality);
+                listId.push_back(GKDCM_ImageLaterality);
+                listId.push_back(GKDCM_PatientOrientation);
+                listId.push_back(GKDCM_InstitutionName);
+                listId.push_back(GKDCM_StationName);
+                listId.push_back(GKDCM_InstitutionalDepartmentName);
+                listId.push_back(GKDCM_PerformingPhysicianName);
+                listId.push_back(GKDCM_ProtocolName);
+                listId.push_back(GKDCM_SeriesDescription);
+
+                GIL::DICOM::IDICOMManager*	pDICOMManager = GNC::GCS::IEntorno::Instance()->GetPACSController()->CrearInstanciaDeDICOMManager();
+                for (std::vector<std::string>::const_iterator it = listId.begin(); it != listId.end(); ++it) {
+                        std::string description = pDICOMManager->GetDescription((*it));
+                        m_pChoiceTag->AppendString(wxString::FromUTF8(description.c_str()));
+                }
+                m_pChoiceTag->Select(0);
+                GNC::Entorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+        }
+        ~AddTagDialog()
+        {
+                listId.clear();
+        }
+
+        std::pair<std::string, std::string> getTag()
+        {
+                std::pair<std::string, std::string> value;
+                value.first = listId[m_pChoiceTag->GetSelection()];
+                value.second = m_pTextValue->GetValue().ToUTF8();
+                return value;
+        }
+protected:
+        std::vector<std::string> listId;
+};
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+class EditCriteriaPanel: public EditCriteriaPanelBase
+{
+        enum {
+                COL_DEESCRIPTION = 0,
+                COL_VALUE,
+                COL_UID
+        };
+public:
+        EditCriteriaPanel(wxWindow* pParent, bool buttonsRight = true): EditCriteriaPanelBase(pParent)
+        {
+                if (!buttonsRight) {
+                        m_pGeneralSizer->SetOrientation(wxVERTICAL);
+                        m_pButtonSizer->SetOrientation(wxHORIZONTAL);
+                        m_pButtonSizer->Insert(0, 0, 0, 1, wxEXPAND, 5 );
+                }
+
+                m_pModel = new wxDataViewListStore();
+                m_pListCriteria->AssociateModel(m_pModel.get());
+
+                m_pListCriteria->AppendColumn( new wxDataViewColumn( _("Dicom tag"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), COL_HP_NAME, 200, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+                m_pListCriteria->AppendColumn( new wxDataViewColumn( _("Value"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_EDITABLE ), COL_HP_ACTIVE, 230, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+
+                m_pListCriteria->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( EditCriteriaPanel::OnCriteriaChangeSelection ), NULL, this );
+                Layout();
+        }
+        ~EditCriteriaPanel()
+        {
+                m_pListCriteria->Disconnect(wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( EditCriteriaPanel::OnCriteriaChangeSelection ), NULL, this );
+        }
+
+        virtual void loadMatcher(const GNC::GCS::Ptr<GNC::GCS::Matcher>& matcher)
+        {
+                m_pListCriteria->DeleteAllItems();
+                if (matcher.IsValid()) {
+                        for (std::map<std::string, std::string>::const_iterator it = matcher->getMatchingCriteria().begin(); it != matcher->getMatchingCriteria().end(); ++it) {
+                                addTag((*it).first, (*it).second);
+                        }
+                }
+        }
+
+        virtual void updateMatcher(GNC::GCS::Ptr<GNC::GCS::Matcher>& matcher)
+        {
+                if (matcher.IsValid()) {
+                        matcher->getMatchingCriteria().clear();
+                        wxVariant tag,value;
+                        for (unsigned i = 0; i < m_pModel->GetCount(); ++i) {
+                                m_pModel->GetValueByRow(tag, i, COL_UID);
+                                m_pModel->GetValueByRow(value, i, COL_VALUE);
+                                matcher->getMatchingCriteria()[std::string(tag.GetString().ToUTF8())] = value.GetString().ToUTF8();
+                        }
+                }
+        }
+
+        virtual void addTag(const std::string& tagKey, const std::string& value)
+        {
+                GIL::DICOM::IDICOMManager*	pDICOMManager = GNC::GCS::IEntorno::Instance()->GetPACSController()->CrearInstanciaDeDICOMManager();
+                std::string description = pDICOMManager->GetDescription(tagKey);
+                wxVector<wxVariant> data;
+                data.push_back(wxString::FromUTF8(description.c_str()));
+                data.push_back(wxString::FromUTF8(value.c_str()));
+                data.push_back(wxString::FromUTF8(tagKey.c_str()));
+                m_pModel->AppendItem(data);
+                GNC::Entorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+        }
+
+protected:
+        virtual void OnAddClick(wxCommandEvent& )
+        {
+                AddTagDialog dlg(this);
+                if (dlg.ShowModal() == wxID_OK) {
+                        std::pair<std::string, std::string> value = dlg.getTag();
+                        wxVariant val;
+                        for (unsigned  i = 0; i < m_pModel->GetItemCount(); ++i) {
+                                m_pModel->GetValueByRow(val, i, COL_UID);
+                                if (val.GetString() == wxString::FromUTF8(value.first.c_str())) {
+                                        m_pModel->SetValueByRow(wxString::FromUTF8(value.second.c_str()), i, COL_VALUE);
+                                        return;
+                                }
+                        }
+
+                        addTag(value.first, value.second);
+                }
+        }
+
+        virtual void OnDeleteClick(wxCommandEvent& )
+        {
+
+                wxDataViewItem item = m_pListCriteria->GetSelection();
+                if(item.IsOk()) {
+                        m_pListCriteria->DeleteItem(m_pListCriteria->GetSelectedRow());
+                }
+
+        }
+
+        virtual void OnCriteriaChangeSelection(wxDataViewEvent& event)
+        {
+                m_pBDelete->Enable(event.GetItem().IsOk());
+        }
+
+
+        wxObjectDataPtr<wxDataViewListStore> m_pModel;
+};
+
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+class EditHangingProtocolDialog: public EditHangingProtocolDialogBase
+{
+        class StudyWindow: public StudyWindowBase, public GNC::GCS::IHangingProtocolContract
+        {
+                class PreviewLayoutPanel: public wxPanel, public GNC::GCS::IHangingSeriesViewer
+                {
+                public:
+                        PreviewLayoutPanel(StudyWindow* pSelectionManager, wxWindow* pParent, const GNC::GCS::Ptr<GNC::GCS::Matcher>& seriesMatcher = NULL): wxPanel(pParent, wxID_ANY, wxDefaultPosition, wxSize(-1,-1)),
+                                isSelected(false),
+                                pStudyWindow(pSelectionManager)
+                        {
+                                wxPanel::SetBackgroundColour(wxBG_STYLE_CUSTOM);
+                                if (seriesMatcher.IsValid()) {
+                                        this->seriesMatcher = seriesMatcher;
+                                } else {
+                                        this->seriesMatcher = GNC::GCS::Ptr<GNC::GCS::Matcher>(new GNC::GCS::Matcher());
+                                        this->seriesMatcher->getMatchingCriteria()[GKDCM_SeriesDescription] =  "";
+                                        this->seriesMatcher->getMatchingCriteria()[GKDCM_Modality] =  "";
+                                }
+
+                                this->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( PreviewLayoutPanel::OnLeftClick ) );
+                                this->Connect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PreviewLayoutPanel::OnRightClick ) );
+                                this->Connect( wxEVT_PAINT, wxPaintEventHandler( PreviewLayoutPanel::OnPaint ) );
+                        }
+
+                        ~PreviewLayoutPanel()
+                        {
+                                this->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( PreviewLayoutPanel::OnLeftClick ) );
+                                this->Disconnect( wxEVT_RIGHT_DOWN, wxMouseEventHandler( PreviewLayoutPanel::OnRightClick ) );
+                                this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( PreviewLayoutPanel::OnPaint ) );
+                        }
+
+                        void select(bool selected)
+                        {
+                                if (selected != isSelected) {
+                                        isSelected = selected;
+                                        Refresh(true);
+                                }
+                        }
+
+                        GNC::GCS::Ptr<GNC::GCS::Matcher>& getMatcher()
+                        {
+                                return this->seriesMatcher;
+                        }
+
+                        void getSeriesBase(GIL::DICOM::DicomDataset& seriesBase)
+                        {
+                                for (std::map<std::string, std::string>::iterator it = seriesMatcher->getMatchingCriteria().begin(); it != seriesMatcher->getMatchingCriteria().end(); ++it) {
+                                        seriesBase.tags[(*it).first] = (*it).second;
+                                }
+                        }
+                protected:
+                        virtual void OnLeftClick(wxMouseEvent &)
+                        {
+                                if (pStudyWindow->hangingSupportLevel == GNC::GCS::ModoControlador::THSL_FULL) {
+                                        pStudyWindow->doSelect(this);
+                                }
+                        }
+
+                        virtual void OnRightClick(wxMouseEvent &)
+                        {
+                                if (pStudyWindow->hangingSupportLevel == GNC::GCS::ModoControlador::THSL_FULL) {
+                                        pStudyWindow->doSelect(this);
+                                        wxMenu popupMenu;
+                                        int id = 0;
+                                        wxMenuItem* pItem = popupMenu.Append(id, _("Split horizontally..."));
+#ifdef __WXMSW__
+                                        pItem->SetBitmaps(GinkgoResourcesManager::LayoutBar::GetIcoLayout2x1Blue());
+#else
+                                        pItem->SetBitmap(GinkgoResourcesManager::LayoutBar::GetIcoLayout2x1Blue());
+#endif
+                                        popupMenu.Connect(id++,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PreviewLayoutPanel::OnSplitH ), NULL, this);
+                                        pItem = popupMenu.Append(id, _("Split vertically..."));
+#ifdef __WXMSW__
+                                        pItem->SetBitmaps(GinkgoResourcesManager::LayoutBar::GetIcoLayout1x2Blue());
+#else
+                                        pItem->SetBitmap(GinkgoResourcesManager::LayoutBar::GetIcoLayout1x2Blue());
+#endif
+                                        popupMenu.Connect(id++,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PreviewLayoutPanel::OnSplitV ), NULL, this);
+                                        pItem = popupMenu.Append(id, _("Reset"));
+#ifdef __WXMSW__
+                                        pItem->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoReset());
+#else
+                                        pItem->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoReset());
+#endif
+                                        popupMenu.Connect(id++,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PreviewLayoutPanel::OnResetLayout ), NULL, this);
+                                        this->PopupMenu(&popupMenu);
+                                }
+                        }
+
+                        virtual void OnSplitH(wxCommandEvent& )
+                        {
+                                pStudyWindow->SplitActive(true);
+                        }
+
+                        virtual void OnSplitV(wxCommandEvent& )
+                        {
+                                pStudyWindow->SplitActive(false);
+                        }
+
+                        virtual void OnResetLayout(wxCommandEvent &)
+                        {
+                                pStudyWindow->RebuildLayout();
+                        }
+
+                        virtual void OnPaint(wxPaintEvent &/*event*/)
+                        {
+                                wxPaintDC dc(this);
+                                //no muestra la rallita de abajo
+                                //wxBufferedPaintDC dc(this);
+
+                                const int width = dc.GetSize().x;
+                                const int height = dc.GetSize().y;
+                                // Title background
+                                wxRect rTitle(0, 0, width, height);
+                                if (this->isSelected) {
+                                        dc.GradientFillLinear(rTitle, wxColour(50, 180, 50), wxColour(100, 230, 100), wxWEST);
+                                } else {
+                                        dc.GradientFillLinear(rTitle, wxColour(180, 180, 180), wxColour(230, 230, 230), wxWEST);
+                                }
+
+                                // Title border
+                                dc.SetBrush(*wxTRANSPARENT_BRUSH);
+                                if (this->isSelected) {
+                                        dc.SetPen(wxPen(wxColour(30, 115, 30), 1, wxSOLID));
+                                } else {
+                                        dc.SetPen(wxPen(wxColour(115, 115, 115), 1, wxSOLID));
+                                }
+                                dc.DrawRectangle(rTitle);
+                        }
+
+                        GNC::GCS::Ptr<GNC::GCS::Matcher> seriesMatcher;
+                        bool isSelected;
+                        StudyWindow* pStudyWindow;
+                };//end PreviewPanel
+        public:
+                StudyWindow(wxWindow* pParent): StudyWindowBase(pParent),
+                        layout(new GNC::GCS::Layout()),
+                        editSeriesCriteriaPanel(nullptr),
+                        selectedPreview(nullptr),
+                        hangingSupportLevel(GNC::GCS::ModoControlador::THSL_FULL)
+                {
+                }
+
+                StudyWindow(wxWindow* pParent, const GNC::GCS::Ptr<GNC::GCS::Layout>& lo): StudyWindowBase(pParent),
+                        layout(lo),
+                        editSeriesCriteriaPanel(nullptr),
+                        selectedPreview(nullptr),
+                        hangingSupportLevel(GNC::GCS::ModoControlador::THSL_FULL)
+                {
+                }
+                ~StudyWindow()
+                {
+                        listPreviewLayouts.clear();
+                }
+
+                void InitPanels(GNC::GCS::ModoControlador::T_HangingProtocolSupportLevel hsl)
+                {
+                        this->hangingSupportLevel = hsl;
+
+                        editSeriesCriteriaPanel = new EditCriteriaPanel(m_pLayoutPreview, false);
+                        m_pSizerSeriesCriteria->Add(editSeriesCriteriaPanel, 1, wxEXPAND|wxALL, 5);
+                        m_pLayoutPreview->Layout();
+
+                        m_pSpinCols->Enable(hangingSupportLevel != GNC::GCS::ModoControlador::THSL_ONLY_1x1);
+                        m_pSpinRows->Enable(hangingSupportLevel != GNC::GCS::ModoControlador::THSL_ONLY_1x1);
+                        m_pSetupPositionButton->Enable(hangingSupportLevel != GNC::GCS::ModoControlador::THSL_ONLY_1x1);
+
+                        //button bar
+                        {
+                                wxColour barColor = wxColour(200,200,200);
+                                wxFont fontBar = wxFont( 10, 70, 90, wxFONTWEIGHT_BOLD, false, wxEmptyString );
+                                HangingButtonsBar* m_pButtonsBar = new HangingButtonsBar(m_pLayoutPreview, barColor, fontBar, wxAUI_TB_DEFAULT_STYLE);
+                                int i = 1;
+                                m_pButtonsBar->AddTool(i, _("Split active horizontally"), GinkgoResourcesManager::LayoutBar::GetIcoLayout2x1Blue(), _("Split active horizontally"));
+                                m_pButtonsBar->EnableTool(i, hangingSupportLevel == GNC::GCS::ModoControlador::THSL_FULL);
+                                m_pButtonsBar->Connect(i++, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(StudyWindow::OnSplitH), NULL, this);
+                                m_pButtonsBar->AddTool(i, _("Split active vertically"), GinkgoResourcesManager::LayoutBar::GetIcoLayout1x2Blue(), _("Split active vertically"));
+                                m_pButtonsBar->EnableTool(i, hangingSupportLevel == GNC::GCS::ModoControlador::THSL_FULL);
+                                m_pButtonsBar->Connect(i++, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(StudyWindow::OnSplitV), NULL, this);
+                                m_pButtonsBar->AddTool(i, _("Reset"), GinkgoResourcesManager::MenuIcons::GetIcoReset(), _("Reset"));
+                                m_pButtonsBar->EnableTool(i, hangingSupportLevel == GNC::GCS::ModoControlador::THSL_FULL);
+                                m_pButtonsBar->Connect(i++, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(StudyWindow::OnResetLayout), NULL, this);
+                                m_pButtonsBar->Realize();
+                                m_pSizerLayoutTools->Insert(0,m_pButtonsBar, 0, wxEXPAND| wxALL, 0);
+                        }
+
+                        if (layout.IsValid()) {
+                                this->m_pSpinRows->SetValue(layout->getRows());
+                                this->m_pSpinCols->SetValue(layout->getColumns());
+                        }
+                        //dolayout...
+                        doLayout();
+                }
+
+                /**
+                IHangingProtocolContract
+                */
+                virtual wxWindow* createSeriesSlot(const std::map<std::string, std::string>& /*properties*/, long /*pk = -1*/, const GNC::GCS::Ptr<GNC::GCS::Matcher>& matcher)
+                {
+                        listPreviewLayouts.push_back(new PreviewLayoutPanel(this, m_pLayoutPreview, matcher));
+                        return listPreviewLayouts.back();
+                }
+
+                virtual const std::list<long>& getOpeningSeries()
+                {
+                        return fooList;
+                }
+                //
+                void doLayout()
+                {
+                        m_pLayoutPreview->Freeze();
+                        selectedPreview = NULL;
+                        m_pPreviewSizer->Clear(true);
+                        listPreviewLayouts.clear();
+
+                        layout->doLayout(this, m_pPreviewSizer);
+
+                        if (!listPreviewLayouts.empty()) {
+                                for (std::list<PreviewLayoutPanel*>::const_iterator it = listPreviewLayouts.begin(); it != listPreviewLayouts.end(); ++it) {
+                                        (*it)->select((*it) == selectedPreview);
+                                }
+                                doSelect(listPreviewLayouts.front());
+                        }
+
+                        m_pLayoutPreview->Layout();
+                        m_pLayoutPreview->Thaw();
+                        Layout();
+                }
+
+                void doSelect(PreviewLayoutPanel* pPanel)
+                {
+                        if (selectedPreview == pPanel)
+                                return;
+                        m_pLayoutPreview->Freeze();
+                        if (selectedPreview != NULL) {
+                                selectedPreview->select(false);
+                                //store matcher...
+                                editSeriesCriteriaPanel->updateMatcher(selectedPreview->getMatcher());
+                        }
+                        selectedPreview = pPanel;
+                        selectedPreview->select(true);
+
+                        editSeriesCriteriaPanel->loadMatcher(selectedPreview->getMatcher());
+                        m_pLayoutPreview->Thaw();
+                }
+
+                void SplitActive(bool horizontally)
+                {
+                        m_pLayoutPreview->Freeze();
+                        wxBoxSizer* pNewSizer;
+                        if (horizontally) {
+                                pNewSizer = new wxBoxSizer(wxVERTICAL);
+                        } else {
+                                pNewSizer = new wxBoxSizer(wxHORIZONTAL);
+                        }
+                        wxSizer* pSizerActive = (wxSizer*)selectedPreview->GetContainingSizer();
+                        wxSizerItem* pItem = pSizerActive->GetItem(selectedPreview);
+
+                        pItem->AssignSizer(pNewSizer);
+                        pNewSizer->Add(selectedPreview, 1, wxEXPAND|wxALL);
+                        std::map<std::string, std::string> prop;
+                        pNewSizer->Add(createSeriesSlot(prop, -1, NULL), 1, wxEXPAND|wxALL);
+                        m_pLayoutPreview->Layout();
+                        m_pLayoutPreview->Thaw();
+                }
+
+                GNC::GCS::Ptr<GNC::GCS::Layout> GetLayout()
+                {
+                        if (selectedPreview != NULL) {
+                                editSeriesCriteriaPanel->updateMatcher(selectedPreview->getMatcher());
+                        }
+
+                        if (hangingSupportLevel == GNC::GCS::ModoControlador::THSL_FULL) {
+                                GNC::GCS::Ptr<GNC::GCS::Layout> pLayout = GNC::GCS::Layout::getLayoutFromSizer(m_pPreviewSizer);
+                                pLayout->copyWindowProperties(*layout);
+                                return pLayout;
+                        } else {
+                                GNC::GCS::Ptr<GNC::GCS::Layout> pLayout(new GNC::GCS::Layout());
+                                pLayout->setRows(m_pSpinRows->GetValue());
+                                pLayout->setColumns(m_pSpinCols->GetValue());
+                                GNC::GCS::Ptr<GNC::GCS::Matcher> pSeriesMatcher(new GNC::GCS::Matcher());
+                                editSeriesCriteriaPanel->updateMatcher(pSeriesMatcher);
+                                pLayout->setMatcher(pSeriesMatcher);
+                                pLayout->copyWindowProperties(*layout);
+                                return pLayout;
+                        }
+                }
+        protected:
+                virtual void OnSpinRows( wxSpinEvent&  )
+                {
+                        RebuildLayout();
+                }
+
+                virtual void OnSpinCols( wxSpinEvent&  )
+                {
+                        RebuildLayout();
+                }
+
+                virtual void OnSplitH(wxCommandEvent &)
+                {
+                        SplitActive(true);
+                }
+
+                virtual void OnSplitV(wxCommandEvent &)
+                {
+                        SplitActive(false);
+                }
+
+                virtual void OnResetLayout(wxCommandEvent &)
+                {
+                        RebuildLayout();
+                }
+
+                virtual void RebuildLayout()
+                {
+                        //rebuild layout...
+                        layout->setColumns(m_pSpinCols->GetValue());
+                        layout->setRows(m_pSpinRows->GetValue());
+                        layout->getCellList().clear();
+                        doLayout();
+                }
+
+
+                //setup window position
+                virtual void OnSetupWindowPositionClick(wxCommandEvent &)
+                {
+                        SetupWindowPositionBase dlg(this);
+                        layout->applyWindowProperties(&dlg);
+                        if (dlg.ShowModal() == wxID_OK) {
+                                layout->setWindowProperties(dlg.IsMaximized(), dlg.GetPosition().x, dlg.GetPosition().y, dlg.GetSize().x, dlg.GetSize().y);
+                        }
+                }
+
+                virtual void OnSetDefaultWindowPosition(wxCommandEvent &)
+                {
+                        layout->setDefaultPosition();
+                }
+
+
+                GNC::GCS::Ptr<GNC::GCS::Layout> layout;
+                EditCriteriaPanel* editSeriesCriteriaPanel;
+                std::list<long> fooList;
+                PreviewLayoutPanel* selectedPreview;
+                std::list<PreviewLayoutPanel*> listPreviewLayouts;
+                GNC::GCS::ModoControlador::T_HangingProtocolSupportLevel hangingSupportLevel;
+        };//end StudyWindow
+
+
+public:
+        EditHangingProtocolDialog(wxWindow* pParent): EditHangingProtocolDialogBase(pParent),
+                hangingSupportLevel(GNC::GCS::ModoControlador::THSL_FULL),
+                editStudyCriteriaPanel(nullptr)
+        {
+        }
+        EditHangingProtocolDialog(wxWindow* pParent, const GNC::GCS::Ptr<GNC::GCS::HangingProtocol>& hP): EditHangingProtocolDialogBase(pParent),
+                hangingSupportLevel(GNC::GCS::ModoControlador::THSL_FULL),
+                editStudyCriteriaPanel(nullptr),
+                hangingProtocol(new GNC::GCS::HangingProtocol(*hP))
+        {
+        }
+
+        ~EditHangingProtocolDialog()
+        {
+        }
+
+        virtual int ShowModal()
+        {
+                if (!hangingProtocol.IsValid()) {
+                        SelectOpeningMode dlg(this->GetParent());
+                        if (dlg.ShowModal() == wxID_OK) {
+                                hangingProtocol = GNC::GCS::Ptr<GNC::GCS::HangingProtocol>(new GNC::GCS::HangingProtocol());
+                                hangingProtocol->setName(_Std("New hanging protocol"));
+                                hangingProtocol->setModuleSid(dlg.GetModuloSeleccionado()->GetUID());
+                                hangingProtocol->setOpeningMode(dlg.GetModoSeleccionado()->GetId());
+                                //basic criteria...
+                                GNC::GCS::Ptr<GNC::GCS::Matcher> studyMatcher(new GNC::GCS::Matcher());
+                                studyMatcher->getMatchingCriteria()[GKDCM_ModalitiesInStudy] =  "";
+                                studyMatcher->getMatchingCriteria()[GKDCM_StudyDescription] =  "";
+                                hangingProtocol->setStudyMatcher(studyMatcher);
+                                //add new layout...
+                                GNC::GCS::Ptr<GNC::GCS::Layout> layout(new GNC::GCS::Layout());
+                                hangingProtocol->addLayout(layout);
+                        } else {
+                                return wxID_CANCEL;
+                        }
+                }
+                InitPanels();
+                return EditHangingProtocolDialogBase::ShowModal();
+        }
+
+
+        void InitPanels()
+        {
+                editStudyCriteriaPanel = new EditCriteriaPanel(m_pGeneralPanel);
+                m_pSizerStudyCriteria->Add(editStudyCriteriaPanel, 1, wxEXPAND|wxALL, 5);
+
+                //fillin hanging...
+                m_textOpeningMode->SetValue(wxT("Unknown"));
+                hangingSupportLevel = GNC::GCS::ModoControlador::THSL_ONLY_1x1;
+                GNC::GCS::IModuleController* pModule = GNC::ControladorExtensiones::Instance()->ObtenerModulo(hangingProtocol->getModuleSid());
+                if (pModule != NULL) {
+                        GNC::GCS::ModoControlador* pController = pModule->GetModo(hangingProtocol->getOpeningMode());
+                        if (pController != NULL) {
+                                m_textOpeningMode->SetValue(wxString::FromUTF8(pController->GetDescripcion().c_str()));
+                                hangingSupportLevel = pController->GetHangingSupportLevel();
+                        }
+                }
+
+                for (GNC::GCS::HangingProtocol::TListOfLayouts::const_iterator it = hangingProtocol->getLayouts().begin(); it != hangingProtocol->getLayouts().end(); ++it) {
+                        if ((*it).IsValid()) {
+                                StudyWindow* sw = new StudyWindow(m_pNoteBookWindows, (*it));
+                                m_pNoteBookWindows->InsertPage(m_pNoteBookWindows->GetPageCount() - 1, sw, wxString::Format(_("Window %d"), (int) m_pNoteBookWindows->GetPageCount()));
+                                sw->InitPanels(hangingSupportLevel);
+                        }
+                }
+                m_pNoteBookWindows->SetSelection(0);
+
+                m_textName->SetValue(wxString::FromUTF8(hangingProtocol->getName().c_str()));
+                this->editStudyCriteriaPanel->loadMatcher(hangingProtocol->getStudyMatcher());
+
+                m_pNoteBookWindows->Layout();
+                m_pGeneralPanel->Layout();
+                m_pMainNoteBook->Layout();
+                Layout();
+        }
+
+        GNC::GCS::Ptr<GNC::GCS::HangingProtocol>& getHangingProtocol()
+        {
+                this->hangingProtocol->clearLayouts();
+                this->hangingProtocol->setName(std::string(m_textName->GetValue().ToUTF8()));
+                GNC::GCS::Ptr<GNC::GCS::Matcher> pStudyMatcher(new GNC::GCS::Matcher());
+                editStudyCriteriaPanel->updateMatcher(pStudyMatcher);
+                this->hangingProtocol->setStudyMatcher(pStudyMatcher);
+                for (unsigned i = 0; i < m_pNoteBookWindows->GetPageCount(); ++i) {
+                        wxWindow* pWin = m_pNoteBookWindows->GetPage(i);
+                        StudyWindow* sw = dynamic_cast<StudyWindow*> (pWin);
+                        if (sw != NULL) {
+                                GNC::GCS::Ptr<GNC::GCS::Layout> pLayout = sw->GetLayout();
+                                if (pLayout.IsValid()) {
+                                        this->hangingProtocol->addLayout(pLayout);
+                                }
+                        }
+                }
+                return this->hangingProtocol;
+        }
+
+
+protected:
+
+        virtual void OnPageChanging( wxAuiNotebookEvent& event )
+        {
+                if (event.GetSelection() == ((int)m_pNoteBookWindows->GetPageCount() -1)) {
+                        if (event.GetOldSelection() < 0) {
+                                //if comes from page closing
+                                m_pNoteBookWindows->SetSelection(m_pNoteBookWindows->GetPageCount() - 2);
+                        } else {
+                                if (hangingSupportLevel == GNC::GCS::ModoControlador::THSL_FULL) {
+                                        StudyWindow* sw = new StudyWindow(m_pNoteBookWindows);
+                                        m_pNoteBookWindows->InsertPage(m_pNoteBookWindows->GetPageCount() - 1,sw, wxString::Format(_("Window %d"), (int) m_pNoteBookWindows->GetPageCount()), true);
+                                        sw->InitPanels(hangingSupportLevel);
+                                        m_pNoteBookWindows->Layout();
+                                } else {
+                                        wxMessageBox(_("This view doesn't support multiple windows"),_("Info"),wxOK | wxICON_INFORMATION, this);
+                                }
+                        }
+                        event.Veto();
+                } else {
+                        event.Skip();
+                }
+        }
+
+        virtual void OnPageClose( wxAuiNotebookEvent& event )
+        {
+                if (m_pNoteBookWindows->GetPageCount() <= 2) {
+                        event.Veto();
+                } else {
+                        event.Skip();
+                }
+        }
+
+
+        GNC::GCS::ModoControlador::T_HangingProtocolSupportLevel hangingSupportLevel;
+        EditCriteriaPanel* editStudyCriteriaPanel;
+        GNC::GCS::Ptr<GNC::GCS::HangingProtocol> hangingProtocol;
+};
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+class wxHangingClientData: public wxClientData
+{
+public:
+        wxHangingClientData(const GNC::GCS::Ptr<GNC::GCS::HangingProtocol>& hp): hangingProtocol(hp)
+        {
+        }
+        virtual ~wxHangingClientData()
+        {
+        }
+        GNC::GCS::Ptr<GNC::GCS::HangingProtocol> hangingProtocol;
+};
+////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+HangingProtocolConfigurationPanel::HangingProtocolConfigurationPanel(wxWindow* pParent,IDialogoConfiguracion* pDialogo): HangingProtocolConfigurationPanelBase(pParent), IPasoConfiguracion(pDialogo)
+{
+        wxColour barColor = wxColour(200,200,200);
+        wxFont fontBar = wxFont( 10, 70, 90, wxFONTWEIGHT_BOLD, false, wxEmptyString );
+
+        m_pModel = new wxDataViewListStore();
+        m_pListHanging->AssociateModel(m_pModel.get());
+
+        m_pListHanging->AppendColumn( new wxDataViewColumn( _("Name"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), COL_HP_NAME, 200, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListHanging->AppendColumn( new wxDataViewColumn( _("Active"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), COL_HP_ACTIVE, 150, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+
+
+        m_pListHanging->Connect(wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( HangingProtocolConfigurationPanel::OnHangingListDClick ), NULL, this );
+        m_pListHanging->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( HangingProtocolConfigurationPanel::OnHangingListChangeSelection ), NULL, this );
+
+        Recargar();
+}
+
+HangingProtocolConfigurationPanel::~HangingProtocolConfigurationPanel()
+{
+        wxDataViewItemArray children;
+        m_pModel->GetChildren(wxDataViewItem(NULL), children);
+        wxVariant val;
+        for (wxDataViewItemArray::iterator it = children.begin(); it != children.end(); ++it) {
+                m_pModel->GetValue(val, (*it), COL_HP_CLIENT_DATA);
+                delete (wxHangingClientData*)(val.GetVoidPtr());
+        }
+}
+
+void HangingProtocolConfigurationPanel::Recargar()
+{
+        std::list<GNC::GCS::Ptr<GNC::GCS::HangingProtocol> > listOfProtocols = GNC::GCS::HangingProtocolController::Instance()->getHangingProtocols();
+
+        bool primero =true;
+
+        wxVector<wxVariant> data;
+        for (std::list<GNC::GCS::Ptr<GNC::GCS::HangingProtocol> >::iterator it = listOfProtocols.begin(); it != listOfProtocols.end(); ++it) {
+                data.clear();
+                data.push_back(wxString::FromUTF8((*it)->getName().c_str()));
+                if ((*it)->isActive()) {
+                        data.push_back(_("Yes"));
+                } else {
+                        data.push_back(_("No"));
+                }
+
+                data.push_back(new wxHangingClientData((*it)));
+                m_pModel->AppendItem(data);
+                if(primero) {
+                        m_pListHanging->SelectRow(0);
+                        m_pBEdit->Enable(true);
+                        m_pBDelete->Enable(true);
+                        m_pBActive->Enable(true);
+                        primero = false;
+                }
+        }
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* HangingProtocolConfigurationPanel::GetPanel()
+{
+        return this;
+}
+
+std::string HangingProtocolConfigurationPanel::GetTitle()
+{
+        return _Std("Hanging protocols");
+}
+
+std::string HangingProtocolConfigurationPanel::GetCabecera()
+{
+        return _Std("Hanging protocols");
+}
+
+bool HangingProtocolConfigurationPanel::Validar()
+{
+        bool ok = true;
+        return ok;
+}
+
+bool HangingProtocolConfigurationPanel::Guardar()
+{
+        //get hanging protocols...
+        std::list<GNC::GCS::Ptr<GNC::GCS::HangingProtocol> > listOfProtocols;
+        wxVariant value;
+        for (unsigned int i = 0; i< m_pModel->GetItemCount(); i++) {
+                m_pModel->GetValueByRow(value, i, COL_HP_CLIENT_DATA);
+                listOfProtocols.push_back(((wxHangingClientData*)value.GetVoidPtr())->hangingProtocol);
+        }
+
+        GNC::GCS::HangingProtocolController::Instance()->setHangingProtocols(listOfProtocols);
+        return true;
+}
+//endregion
+
+
+void HangingProtocolConfigurationPanel::OnHangingListDClick(wxDataViewEvent& )
+{
+        Edit();
+}
+
+void HangingProtocolConfigurationPanel::OnHangingListChangeSelection(wxDataViewEvent& event)
+{
+        if(event.GetItem().IsOk()) {
+                m_pBEdit->Enable(true);
+                m_pBDelete->Enable(true);
+                m_pBActive->Enable(true);
+        } else {
+                m_pBEdit->Enable(false);
+                m_pBDelete->Enable(false);
+                m_pBActive->Enable(false);
+        }
+}
+
+void HangingProtocolConfigurationPanel::OnSetActive(wxCommandEvent &)
+{
+        wxDataViewItem selection = m_pListHanging->GetSelection();
+        if (selection.IsOk()) {
+                wxVariant value;
+                m_pModel->GetValue(value, selection, COL_HP_CLIENT_DATA);
+                GNC::GCS::Ptr<GNC::GCS::HangingProtocol>& hp = ((wxHangingClientData*)value.GetVoidPtr())->hangingProtocol;
+                hp->setActive(!hp->isActive());
+                if (hp->isActive()) {
+                        m_pListHanging->SetValue( _("Yes"), m_pModel->GetRow(selection), COL_HP_ACTIVE);
+                } else {
+                        m_pListHanging->SetValue( _("No"), m_pModel->GetRow(selection), COL_HP_ACTIVE);
+                }
+                OnPropiedadCambiada();
+        }
+}
+
+void HangingProtocolConfigurationPanel::OnNuevoClick(wxCommandEvent &)
+{
+        EditHangingProtocolDialog dlg(this);
+        if (dlg.ShowModal() == wxID_OK) {
+                GNC::GCS::Ptr<GNC::GCS::HangingProtocol> hp = dlg.getHangingProtocol();
+                wxVector<wxVariant> data;
+                data.push_back(wxString::FromUTF8(hp->getName().c_str()));
+                if (hp->isActive()) {
+                        data.push_back(_("Yes"));
+                } else {
+                        data.push_back(_("No"));
+                }
+
+                data.push_back(new wxHangingClientData(hp));
+                m_pModel->AppendItem(data);
+                OnPropiedadCambiada();
+        }
+}
+
+void HangingProtocolConfigurationPanel::OnEditarClick(wxCommandEvent &)
+{
+        Edit();
+}
+
+void HangingProtocolConfigurationPanel::Edit()
+{
+        wxDataViewItem selection = m_pListHanging->GetSelection();
+        if (selection.IsOk()) {
+                wxVariant value;
+                m_pModel->GetValue(value, selection, COL_HP_CLIENT_DATA);
+                EditHangingProtocolDialog dlg(this, ((wxHangingClientData*)value.GetVoidPtr())->hangingProtocol);
+                if (dlg.ShowModal() == wxID_OK) {
+                        GNC::GCS::Ptr<GNC::GCS::HangingProtocol> hp = dlg.getHangingProtocol();
+                        if (hp->isActive()) {
+                                m_pListHanging->SetValue( _("Yes"), m_pModel->GetRow(selection), COL_HP_ACTIVE);
+                        } else {
+                                m_pListHanging->SetValue( _("No"), m_pModel->GetRow(selection), COL_HP_ACTIVE);
+                        }
+                        m_pListHanging->SetValue( wxString::FromUTF8(hp->getName().c_str()), m_pModel->GetRow(selection), COL_HP_NAME);
+                        ((wxHangingClientData*)value.GetVoidPtr())->hangingProtocol = dlg.getHangingProtocol();
+                        OnPropiedadCambiada();
+                }
+        }
+}
+
+void HangingProtocolConfigurationPanel::OnEliminarClick(wxCommandEvent &)
+{
+        wxDataViewItem selection = m_pListHanging->GetSelection();
+        if (selection.IsOk()) {
+                wxVariant value;
+                m_pModel->GetValue(value, selection, COL_HP_CLIENT_DATA);
+                delete (wxHangingClientData*)value.GetVoidPtr();
+                m_pModel->DeleteItem(m_pListHanging->GetSelectedRow());
+                OnPropiedadCambiada();
+        }
+}
+
+void HangingProtocolConfigurationPanel::OnPropiedadCambiada()
+{
+        IPasoConfiguracion::OnPropiedadCambiada();
+}
+
+void HangingProtocolConfigurationPanel::OnTextoCambiado(wxCommandEvent & )
+{
+}
+
+void HangingProtocolConfigurationPanel::OnSize(wxSizeEvent & event)
+{
+        event.Skip(true);
+}
+}
+}
diff --git a/cadxcore/main/gui/configuration/hangingprotocolconfigurationpanel.h b/cadxcore/main/gui/configuration/hangingprotocolconfigurationpanel.h
new file mode 100644
index 0000000..5365130
--- /dev/null
+++ b/cadxcore/main/gui/configuration/hangingprotocolconfigurationpanel.h
@@ -0,0 +1,78 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+#include <string>
+#include <vector>
+
+namespace GNC
+{
+namespace GCS
+{
+class HangingProtocol;
+}
+namespace GUI
+{
+class HangingProtocolConfigurationPanel: public HangingProtocolConfigurationPanelBase, public IPasoConfiguracion
+{
+public:
+        HangingProtocolConfigurationPanel(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~HangingProtocolConfigurationPanel();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+
+protected:
+        virtual void OnHangingListDClick(wxDataViewEvent& event);
+        virtual void OnHangingListChangeSelection(wxDataViewEvent& event);
+
+        virtual void OnSetActive(wxCommandEvent &event);
+
+        virtual void OnNuevoClick(wxCommandEvent &event);
+
+        virtual void OnEditarClick(wxCommandEvent &event);
+        void Edit();
+
+        virtual void OnEliminarClick(wxCommandEvent &event);
+
+        virtual void OnTextoCambiado(wxCommandEvent &event );
+
+        virtual void OnPropiedadCambiada();
+
+        void OnSize(wxSizeEvent &);
+
+        wxObjectDataPtr<wxDataViewListStore> m_pModel;
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/localdatabaseconfigurationpanel.cpp b/cadxcore/main/gui/configuration/localdatabaseconfigurationpanel.cpp
new file mode 100644
index 0000000..8f79ade
--- /dev/null
+++ b/cadxcore/main/gui/configuration/localdatabaseconfigurationpanel.cpp
@@ -0,0 +1,332 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+
+#include <wx/checkbox.h>
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/dirdlg.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <sstream>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/stdpaths.h>
+#include <wx/xml/xml.h>
+
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include "localdatabaseconfigurationpanel.h"
+
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/autocleaningcontroller.h>
+#include <main/gui/history3/historypanel3.h>
+#include <main/entorno.h>
+#include <api/controllers/icontroladorinternacionalizacion.h>
+#include <api/internationalization/internationalization.h>
+
+namespace GNC
+{
+namespace GUI
+{
+
+LocalDatabaseConfigurationPanel::LocalDatabaseConfigurationPanel(wxWindow* pParent,IDialogoConfiguracion* pDialogo): LocalDatabaseConfigurationPanelBase(pParent), IPasoConfiguracion(pDialogo)
+{
+        if (GNC::GCS::ControladorVistas::Instance()->GetVistas().size() > 0) {
+                m_pDICOMDir->Enable(false);
+                m_buttonSeleccionarDICOMDir->Enable(false);
+                m_pstaticTextAdvertencia->Show(true);
+        } else {
+                m_pstaticTextAdvertencia->Show(false);
+        }
+
+        m_mapTimePeriods[1] = _Std("One day");
+        m_mapTimePeriods[2] = _Std("Two days");
+        m_mapTimePeriods[3] = _Std("Three days");
+        m_mapTimePeriods[7] = _Std("One week");
+        m_mapTimePeriods[14] = _Std("Two weeks");
+        m_mapTimePeriods[30] = _Std("One month");
+        m_mapTimePeriods[90] = _Std("Three months");
+        m_mapTimePeriods[365] = _Std("One year");
+
+        for (std::map<int, std::string>::const_iterator it = m_mapTimePeriods.begin(); it != m_mapTimePeriods.end(); ++it) {
+                m_pChoiceDeleteOlder->AppendString(wxString::FromUTF8((*it).second.c_str()));
+        }
+        m_pChoiceDeleteOlder->SetSelection(6);
+
+        Recargar();
+        Layout();
+}
+
+LocalDatabaseConfigurationPanel::~LocalDatabaseConfigurationPanel()
+{
+}
+
+void LocalDatabaseConfigurationPanel::Recargar()
+{
+        std::string dicomDir;
+
+        if(!GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Estacion","DicomDir", dicomDir)) {
+                m_pathDicomDir = FROMPATH(GNC::GCS::HistoryController::Instance()->GetGinkgoDicomDir());
+        } else {
+                m_pathDicomDir = wxString::FromUTF8(dicomDir.c_str());
+        }
+        m_pDICOMDir->SetValue(m_pathDicomDir);
+
+        //autocleaning dicomdir
+        int tmp;
+        //older than...
+        GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/Station/CleanDicomDir", "AcquisitionOlderThan", tmp, -1);
+        if (tmp > 0) {
+                int i = 0;
+                for (std::map<int, std::string>::const_iterator it = m_mapTimePeriods.begin(); it != m_mapTimePeriods.end(); ++it,i++) {
+                        if ((*it).first == tmp) {
+                                m_pChoiceDeleteOlder->SetSelection(i);
+                                break;
+                        }
+                }
+                m_pChoiceDeleteOlder->Enable(true);
+                m_pCheckDeleteOlder->SetValue(true);
+        } else {
+                m_pChoiceDeleteOlder->Enable(false);
+                m_pCheckDeleteOlder->SetValue(false);
+        }
+        //hdFreeSpace...
+        GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/Station/CleanDicomDir", "HDFreeSpace", tmp, -1);
+        if (tmp > 0) {
+                m_pSpinHDSpace->SetValue(tmp);
+                m_pSpinHDSpace->Enable(true);
+                m_pCheckHDFreeSpace->SetValue(true);
+        } else {
+                m_pSpinHDSpace->Enable(false);
+                m_pCheckHDFreeSpace->SetValue(false);
+        }
+        //DicomDirSize...
+        GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/Station/CleanDicomDir", "DicomDirSize", tmp, -1);
+        if (tmp > 0) {
+                m_pSpinDicomDirSize->SetValue(tmp);
+                m_pSpinDicomDirSize->Enable(true);
+                m_pCheckDicomDirSize->SetValue(true);
+        } else {
+                m_pSpinDicomDirSize->Enable(false);
+                m_pCheckDicomDirSize->SetValue(false);
+        }
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* LocalDatabaseConfigurationPanel::GetPanel()
+{
+        return this;
+}
+
+std::string LocalDatabaseConfigurationPanel::GetTitle()
+{
+        return _Std("Local database");
+}
+
+std::string LocalDatabaseConfigurationPanel::GetCabecera()
+{
+        return _Std("Local DICOM Dir setup");
+}
+
+bool LocalDatabaseConfigurationPanel::Validar()
+{
+        wxString path = m_pDICOMDir->GetValue();
+        wxFileName fileName(path);
+        if(!fileName.IsAbsolute()) {
+                wxFileName pathOfExec(wxStandardPaths::Get().GetExecutablePath());
+                fileName.MakeAbsolute(pathOfExec.GetPath());
+                path = fileName.GetFullPath();
+        }
+
+        if(!wxDir::Exists(path)) {
+                //se pregunta si desea crearlo
+                int answer = wxMessageBox(_("The selected directory does not exist\nWould you like to create it?"),_("Info"),wxYES_NO,this);
+                if(answer == wxNO) {
+                        return false;
+                } else {
+                        bool success;
+#ifdef _WIN32
+                        success = wxMkdir(path,511);
+#else
+                        success = (wxMkDir(path.ToUTF8(), 0770) == 0);
+#endif
+                        if(!success || !wxDirExists(path)) {
+                                wxMessageBox(_("Failed to create directory, make sure the path is correct and you have permissions on parent directory"), _("Info"));
+                                return false;
+                        }
+                }
+        } else {
+                //se comprueba que puede escribir(escribimos y borramos un fichero chorra)
+                wxString pathFicheroPrueba = path + wxFileName::GetPathSeparator() + wxString::Format(wxT("%d"), (int) rand());
+                while(wxFileExists(pathFicheroPrueba)) {
+                        pathFicheroPrueba = path + wxFileName::GetPathSeparator() + wxString::Format(wxT("%d"), (int) rand());
+                }
+                {
+                        wxFile ficheroTmp;
+                        if(!ficheroTmp.Create(pathFicheroPrueba,false)) {
+                                if(!wxFileExists(pathFicheroPrueba) ) {
+                                        wxMessageBox(_("There was an error reading the directory, make sure you have write permissions on it"), _("Info"));
+                                        return false;
+                                }
+                        }
+                        ficheroTmp.Write(wxT("prueba"));
+                        ficheroTmp.Close();
+                }
+                wxRemoveFile(pathFicheroPrueba);
+        }
+
+        return true;
+}
+
+bool LocalDatabaseConfigurationPanel::Guardar()
+{
+        //se actualiza el fichero de configuracion
+        wxFileName dirAnterior(m_pathDicomDir);
+        wxFileName dirNuevo(m_pDICOMDir->GetValue());
+        if(dirAnterior != dirNuevo) {
+                GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Estacion", "DicomDir",std::string(m_pDICOMDir->GetValue().ToUTF8()));
+                //se vacia el dicomdir actual y se carga el nuevo...
+                GNC::GCS::HistoryController::FreeInstance();
+                if (!GNC::GCS::HistoryController::Instance()->IsOk()) {
+                        //revert changes....
+                        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Estacion", "DicomDir", std::string(m_pathDicomDir.ToUTF8()));
+                        //se vacia el dicomdir actual y se carga el nuevo...
+                        GNC::GCS::HistoryController::FreeInstance();
+                }
+                GNC::GUI::HistoryPanel3::Instance()->ReloadHistory();
+
+        }
+
+        //dicomdir auto cleaning
+        //older than...
+        int tmp = -1;
+        if (m_pChoiceDeleteOlder->IsEnabled()) {
+                for (std::map<int, std::string>::const_iterator it = m_mapTimePeriods.begin(); it != m_mapTimePeriods.end(); ++it) {
+                        if (wxString::FromUTF8((*it).second.c_str()).CompareTo(m_pChoiceDeleteOlder->GetString(m_pChoiceDeleteOlder->GetSelection())) == 0) {
+                                tmp = (*it).first;
+                                break;
+                        }
+                }
+        }
+        GNC::GCS::ConfigurationController::Instance()->writeIntUser("/GinkgoCore/Station/CleanDicomDir", "AcquisitionOlderThan", tmp);
+        //hdFreeSpace...
+        tmp = -1;
+        if (m_pSpinHDSpace->IsEnabled()) {
+                tmp = m_pSpinHDSpace->GetValue();
+        }
+        GNC::GCS::ConfigurationController::Instance()->writeIntUser("/GinkgoCore/Station/CleanDicomDir", "HDFreeSpace", tmp);
+        //DicomDirSize...
+        tmp = -1;
+        if (m_pSpinDicomDirSize->IsEnabled()) {
+                tmp = m_pSpinDicomDirSize->GetValue();
+        }
+        GNC::GCS::ConfigurationController::Instance()->writeIntUser("/GinkgoCore/Station/CleanDicomDir", "DicomDirSize", tmp);
+
+        GNC::GCS::AutoCleaningController::Instance()->Reset();
+
+        return true;
+}
+//endregion
+
+void LocalDatabaseConfigurationPanel::OnTextoCambiado(wxCommandEvent &)
+{
+        if(IsShown()) {
+                OnPropiedadCambiada();
+        }
+}
+
+void LocalDatabaseConfigurationPanel::OnSeleccionarDirectorio(wxCommandEvent &)
+{
+        wxDirDialog seleccionarDirectorio(this,_("Select DICOMDIR"),m_pDICOMDir->GetValue(),wxDD_DEFAULT_STYLE|wxDD_NEW_DIR_BUTTON);
+        int response = seleccionarDirectorio.ShowModal();
+        if (response == wxID_OK) {
+                m_pDICOMDir->SetValue(seleccionarDirectorio.GetPath());
+        }
+}
+
+void LocalDatabaseConfigurationPanel::OnSize(wxSizeEvent & event)
+{
+        wxSize oldSize = m_pstaticTextAdvertencia->GetSize();
+        Freeze();
+        m_pstaticTextAdvertencia->Freeze();
+        m_pstaticTextAdvertencia->SetLabel(_("Warning, to update the directory, you must close current opened series."));
+        m_pstaticTextAdvertencia->Wrap( event.GetSize().x - 25 );
+        m_pstaticTextAdvertencia->Thaw();
+        Thaw();
+        wxSize newSize = m_pstaticTextAdvertencia->GetSize();
+        if (newSize != oldSize) {
+                Layout();
+                event.Skip(false);
+        } else {
+                event.Skip(true);
+        }
+}
+
+
+void LocalDatabaseConfigurationPanel::OnCheckOlderStudies( wxCommandEvent& event )
+{
+        m_pChoiceDeleteOlder->Enable(m_pCheckDeleteOlder->GetValue());
+        OnPropiedadCambiada();
+        event.Skip(true);
+}
+
+void LocalDatabaseConfigurationPanel::OnCheckDicomDirSize(wxCommandEvent& event)
+{
+        m_pSpinDicomDirSize->Enable(m_pCheckDicomDirSize->GetValue());
+        OnPropiedadCambiada();
+        event.Skip(true);
+}
+
+void LocalDatabaseConfigurationPanel::OnCheckHDSpace(wxCommandEvent& event)
+{
+        m_pSpinHDSpace->Enable(m_pCheckHDFreeSpace->GetValue());
+        OnPropiedadCambiada();
+        event.Skip(true);
+}
+
+void LocalDatabaseConfigurationPanel::OnSpinCtrl(wxSpinEvent& /*evt*/)
+{
+        OnPropiedadCambiada();
+}
+
+void LocalDatabaseConfigurationPanel::OnOptionModified(wxCommandEvent& /*evt*/)
+{
+        OnPropiedadCambiada();
+}
+
+void LocalDatabaseConfigurationPanel::OnResetToDefault(wxCommandEvent& /*evt*/)
+{
+        m_pDICOMDir->SetValue(FROMPATH(GNC::GCS::HistoryController::Instance()->GetDefaultDicomDirPath(true)));
+        m_pCheckDeleteOlder->SetValue(false);
+        m_pCheckHDFreeSpace->SetValue(false);
+        m_pCheckDicomDirSize->SetValue(false);
+        m_pChoiceDeleteOlder->Enable(m_pCheckDeleteOlder->GetValue());
+        m_pSpinDicomDirSize->Enable(m_pCheckDicomDirSize->GetValue());
+        m_pSpinHDSpace->Enable(m_pCheckHDFreeSpace->GetValue());
+        OnPropiedadCambiada();
+}
+}
+}
diff --git a/cadxcore/main/gui/configuration/localdatabaseconfigurationpanel.h b/cadxcore/main/gui/configuration/localdatabaseconfigurationpanel.h
new file mode 100644
index 0000000..da3ffc9
--- /dev/null
+++ b/cadxcore/main/gui/configuration/localdatabaseconfigurationpanel.h
@@ -0,0 +1,69 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <vector>
+#include <map>
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+
+namespace GNC
+{
+namespace GUI
+{
+
+class LocalDatabaseConfigurationPanel : public LocalDatabaseConfigurationPanelBase, public IPasoConfiguracion
+{
+public:
+        LocalDatabaseConfigurationPanel(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~LocalDatabaseConfigurationPanel();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+
+protected:
+        wxString m_pathDicomDir;
+        void OnTextoCambiado(wxCommandEvent &event);
+        void OnSeleccionarDirectorio(wxCommandEvent &event);
+        void OnSize(wxSizeEvent& event);
+        virtual void OnCheckOlderStudies( wxCommandEvent& event );
+        virtual void OnCheckDicomDirSize(wxCommandEvent& event);
+        virtual void OnCheckHDSpace(wxCommandEvent& event);
+        virtual void OnSpinCtrl(wxSpinEvent &evt);
+        virtual void OnOptionModified(wxCommandEvent& evt);
+        virtual void OnResetToDefault(wxCommandEvent& evt);
+
+        std::map<int, std::string> m_mapTimePeriods;
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionestacion.cpp b/cadxcore/main/gui/configuration/panelconfiguracionestacion.cpp
new file mode 100644
index 0000000..f88edcc
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionestacion.cpp
@@ -0,0 +1,132 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+
+#include <wx/checkbox.h>
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/dirdlg.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <sstream>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/xml/xml.h>
+
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include "panelconfiguracionestacion.h"
+
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/entorno.h>
+#include <api/controllers/icontroladorinternacionalizacion.h>
+#include <api/internationalization/internationalization.h>
+
+namespace GNC
+{
+namespace GUI
+{
+
+PanelConfiguracionEstacion::PanelConfiguracionEstacion(wxWindow* pParent,IDialogoConfiguracion* pDialogo): PanelConfiguracionEstacionBase(pParent), IPasoConfiguracion(pDialogo)
+{
+        Recargar();
+        Layout();
+}
+
+PanelConfiguracionEstacion::~PanelConfiguracionEstacion()
+{
+
+}
+
+void PanelConfiguracionEstacion::Recargar()
+{
+        std::string strTmp;
+        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Estacion","NombreMedico",strTmp);
+        m_pMedicoNombre->SetValue(wxString::FromUTF8(strTmp.c_str()));
+
+        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Estacion","IdMedico",strTmp);
+        m_pMedicoId->SetValue(wxString::FromUTF8(strTmp.c_str()));
+
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/Estacion","NombreServicio",strTmp);
+        m_pServicioNombre->SetValue(wxString::FromUTF8(strTmp.c_str()));
+
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/Estacion","IdServicio",strTmp);
+        m_pServicioId->SetValue(wxString::FromUTF8(strTmp.c_str()));
+
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/Estacion","CentroNombre",strTmp);
+        m_pCentroNombre->SetValue(wxString::FromUTF8(strTmp.c_str()));
+
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/Estacion","CentroId",strTmp);
+        m_pCentroId->SetValue(wxString::FromUTF8(strTmp.c_str()));
+
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/Estacion","DefaultCharset",strTmp,"ISO_IR 100");
+        int selection = m_pComboCharset->FindString(wxString::FromUTF8(strTmp.c_str()));
+        m_pComboCharset->SetSelection((selection>0)?selection:0);
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* PanelConfiguracionEstacion::GetPanel()
+{
+        return this;
+}
+
+std::string PanelConfiguracionEstacion::GetTitle()
+{
+        return _Std("Workstation");
+}
+
+std::string PanelConfiguracionEstacion::GetCabecera()
+{
+        return _Std("Configuration parameters of the local station");
+}
+
+bool PanelConfiguracionEstacion::Validar()
+{
+        return true;
+}
+
+bool PanelConfiguracionEstacion::Guardar()
+{
+        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Estacion","NombreMedico",std::string(m_pMedicoNombre->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Estacion","IdMedico",std::string(m_pMedicoId->GetValue().ToUTF8()));
+
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/Estacion","IdServicio",std::string(m_pServicioId->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/Estacion","NombreServicio",std::string(m_pServicioNombre->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/Estacion","CentroNombre",std::string(m_pCentroNombre->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/Estacion","CentroId",std::string(m_pCentroId->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/Estacion","DefaultCharset",std::string(m_pComboCharset->GetValue().ToUTF8()));
+
+        return true;
+}
+//endregion
+
+
+void PanelConfiguracionEstacion::OnTextoCambiado(wxCommandEvent &)
+{
+        if(IsShown()) {
+                OnPropiedadCambiada();
+        }
+}
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionestacion.h b/cadxcore/main/gui/configuration/panelconfiguracionestacion.h
new file mode 100644
index 0000000..af4142d
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionestacion.h
@@ -0,0 +1,59 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <vector>
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+
+namespace GNC
+{
+namespace GUI
+{
+
+class PanelConfiguracionEstacion : public PanelConfiguracionEstacionBase, public IPasoConfiguracion
+{
+public:
+        PanelConfiguracionEstacion(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~PanelConfiguracionEstacion();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+
+        //endregion
+
+
+protected:
+        void OnTextoCambiado(wxCommandEvent &event);
+        void OnSize(wxSizeEvent& event);
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionextensiones.cpp b/cadxcore/main/gui/configuration/panelconfiguracionextensiones.cpp
new file mode 100644
index 0000000..db462bf
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionextensiones.cpp
@@ -0,0 +1,158 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+#include <sstream>
+#include <limits>
+
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <api/internationalization/internationalization.h>
+#include <wx/valtext.h>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/log.h>
+#include <wx/busyinfo.h>
+#include <wx/xml/xml.h>
+#include <wx/mstream.h>
+#include <wx/image.h>
+#include "panelconfiguracionextensiones.h"
+
+#include <prvext/prvext.h>
+
+#include <main/entorno.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladorpermisos.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#define COLUMNA_EXTENSION         0
+#define COLUMNA_ACTIVATED         1
+#define COLUMNA_VERSION           2
+#define COLUMNA_FECHA_COMPILACION 3
+#define COLUMNA_PROVEEDOR         4
+#define COLUMNA_DESCRIPCION       5
+
+
+inline wxBitmap _wxConvertMemoryToBitmap(const unsigned char* data, int length, wxBitmapType type = wxBITMAP_TYPE_ANY )
+{
+        wxMemoryInputStream stream( data, length );
+        return wxBitmap( wxImage( stream, type, -1), -1 );;
+}
+
+
+namespace GNC
+{
+namespace GUI
+{
+class ExtensionPanel: public ExtensionPanelBase
+{
+public:
+        ExtensionPanel(wxWindow* pParent, GADVAPI::IPrivateExtensionWrapper* pExtension, PanelConfiguracionExtensiones* pConfigPanel): ExtensionPanelBase(pParent)
+        {
+                m_pExtension = pExtension;
+                m_pConfigPanel = pConfigPanel;
+                m_pThumbnail->SetBackgroundColour(this->GetBackgroundColour());
+                m_pLabelTitle->SetLabel(wxString::FromUTF8(pExtension->GetDescription().c_str()));
+
+                if (!pExtension->GetExtension()->GetIcon().IsOk()) {
+                        //default icon
+                        m_pThumbnail->SetBitmap(GinkgoResourcesManager::Logos::GetExtensionsLogo());
+                } else {
+                        //load icon
+                        m_pThumbnail->SetBitmap(pExtension->GetExtension()->GetIcon());
+                }
+
+                Layout();
+        }
+
+        ~ExtensionPanel()
+        {
+        }
+
+
+        GADVAPI::IPrivateExtensionWrapper* m_pExtension;
+        PanelConfiguracionExtensiones* m_pConfigPanel;
+};
+
+
+
+PanelConfiguracionExtensiones::PanelConfiguracionExtensiones(wxWindow* pParent,IDialogoConfiguracion* pDialogo): PanelConfiguracionExtensionesBase(pParent), IPasoConfiguracion(pDialogo)
+{
+        m_hasBeenChanged = false;
+        Recargar();
+}
+
+PanelConfiguracionExtensiones::~PanelConfiguracionExtensiones()
+{
+}
+
+void PanelConfiguracionExtensiones::Recargar()
+{
+        GADVAPI::PrivateExtensionManager& mgr = GNC::ControladorExtensiones::Instance()->GetPrivateExtensionsManager();
+        //mgr.Reload();
+
+        m_pScrollPanelExtensions->DestroyChildren();
+        for (GADVAPI::PrivateExtensionManager::iterator it = mgr.begin(); it != mgr.end(); ++it) {
+                ExtensionPanel* pPanel = new ExtensionPanel(m_pScrollPanelExtensions, (*it).second, this);
+                m_pScrollPanelExtensions->GetSizer()->Add(pPanel, 0, wxEXPAND| wxALL, 0);
+        }
+        m_pScrollPanelExtensions->Layout();
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* PanelConfiguracionExtensiones::GetPanel()
+{
+        return this;
+}
+
+std::string PanelConfiguracionExtensiones::GetTitle()
+{
+        return _Std("Extensions");
+}
+
+std::string PanelConfiguracionExtensiones::GetCabecera()
+{
+        return _Std("Extensions settings");
+}
+
+bool PanelConfiguracionExtensiones::Validar()
+{
+        if(m_hasBeenChanged) {
+                wxMessageBox(_("Ginkgo CADx must restart for the extensions changes to take effect"),_("Info"));
+        }
+        return true;
+}
+
+bool PanelConfiguracionExtensiones::Guardar()
+{
+        return true;
+}
+
+//endregion
+
+void PanelConfiguracionExtensiones::OnPropiedadCambiada()
+{
+        m_hasBeenChanged = true;
+        IPasoConfiguracion::OnPropiedadCambiada();
+}
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionextensiones.h b/cadxcore/main/gui/configuration/panelconfiguracionextensiones.h
new file mode 100644
index 0000000..ba657cb
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionextensiones.h
@@ -0,0 +1,61 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+#include <string>
+#include <vector>
+
+namespace GNC
+{
+namespace GUI
+{
+
+class PanelConfiguracionExtensiones: public PanelConfiguracionExtensionesBase, public IPasoConfiguracion
+{
+public:
+        PanelConfiguracionExtensiones(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~PanelConfiguracionExtensiones();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+        virtual void OnPropiedadCambiada();
+
+protected:
+
+        void OnSize(wxSizeEvent &);
+
+        bool m_hasBeenChanged;
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguraciongeneral.cpp b/cadxcore/main/gui/configuration/panelconfiguraciongeneral.cpp
new file mode 100644
index 0000000..9719ae9
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguraciongeneral.cpp
@@ -0,0 +1,282 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+
+#include <wx/checkbox.h>
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/dirdlg.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <sstream>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/stdpaths.h>
+#include <wx/xml/xml.h>
+
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include "panelconfiguraciongeneral.h"
+
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/autocleaningcontroller.h>
+#include <main/gui/history3/historypanel3.h>
+#include <main/entorno.h>
+#include <api/controllers/icontroladorinternacionalizacion.h>
+#include <api/internationalization/internationalization.h>
+
+#include <main/controllers/anonusagestats.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class ProxySettingsDialog: public ProxySettingsDialogBase
+{
+public:
+        ProxySettingsDialog(wxWindow* pParent): ProxySettingsDialogBase(pParent)
+        {
+        }
+        ~ProxySettingsDialog()
+        {
+        }
+        void SetProxySettings(const GNC::GCS::ProxySettings& settings)
+        {
+                m_pHost->SetValue(wxString::FromUTF8(settings.hostName.c_str()));
+                m_pPort->SetValue(wxString::Format(wxT("%d"), settings.port));
+                m_pCheckAuthentication->SetValue(settings.requiresAuth);
+                m_pUsername->SetValue(wxString::FromUTF8(settings.userName.c_str()));
+                m_pPassword->SetValue(wxString::FromUTF8(settings.password.c_str()));
+                m_pUsername->Enable(settings.requiresAuth);
+                m_pPassword->Enable(settings.requiresAuth);
+                m_pExceptions->SetValue(wxString::FromUTF8(settings.exceptions.c_str()));
+        }
+
+        GNC::GCS::ProxySettings GetProxySettings()
+        {
+                GNC::GCS::ProxySettings settings;
+                settings.exceptions = m_pExceptions->GetValue().ToUTF8();
+                settings.hostName = m_pHost->GetValue().ToUTF8();
+                long portTmp;
+                m_pPort->GetValue().ToLong(&portTmp);
+                settings.port = (int)portTmp;
+                settings.requiresAuth = m_pCheckAuthentication->IsChecked();
+                if (settings.requiresAuth) {
+                        settings.password = m_pPassword->GetValue().ToUTF8();
+                        settings.userName = m_pUsername->GetValue().ToUTF8();
+                }
+                settings.useProxy = true;
+                return settings;
+        }
+
+        virtual void OnCheckAuthentication(wxCommandEvent &/*evt*/)
+        {
+                m_pUsername->Enable(m_pCheckAuthentication->IsChecked());
+                m_pPassword->Enable(m_pCheckAuthentication->IsChecked());
+        }
+
+        virtual void OnOkClick(wxCommandEvent& evt)
+        {
+                long port;
+                if (!m_pPort->GetValue().ToLong(&port)) {
+                        wxMessageBox(_("Port has to be a valid number"),_("Info"));
+                        evt.Skip(false);
+                }
+                EndModal(wxID_OK);
+        }
+};
+
+PanelConfiguracionGeneral::PanelConfiguracionGeneral(wxWindow* pParent,IDialogoConfiguracion* pDialogo): PanelConfiguracionGeneralBase(pParent), IPasoConfiguracion(pDialogo)
+{
+        m_idiomaCambiado = false;
+        pProxySettings = new GNC::GCS::ProxySettings();
+        Recargar();
+#ifdef GINKGO_PRO
+        m_pCheckAnonUsageStats->Show();
+#else
+        m_pCheckAnonUsageStats->Show(false);
+#endif
+        m_pUpdate->Layout();
+        Layout();
+}
+
+PanelConfiguracionGeneral::~PanelConfiguracionGeneral()
+{
+        delete pProxySettings;
+}
+
+void PanelConfiguracionGeneral::Recargar()
+{
+        //check for updates
+        bool check;
+        GNC::GCS::ConfigurationController::Instance()->readBoolGeneral("/GinkgoCore/Estacion", "CheckForUpdates", check, true);
+        m_pCheckForUpdates->SetValue(check);
+
+
+        //internacionalizacion
+        int language;
+        GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/Station", "Language", language);
+
+        //explore lang directory to find installed languages
+        {
+                m_pComboLanguage->Clear();
+                m_mapLanguages.clear();
+                m_mapLanguages[_Std("Default")] = -1;
+                m_mapLanguages["English"] = (int)wxLANGUAGE_ENGLISH;
+                wxString wxDirPath = FROMPATH(GNC::Entorno::Instance()->GetGinkgoLanguageDir());
+                wxDir dir;
+                if (dir.Open(wxDirPath)) {
+                        wxString wxPathLang;
+                        bool cont = dir.GetFirst(&wxPathLang,wxEmptyString, wxDIR_DIRS);
+                        while (cont) {
+                                const wxLanguageInfo* pInfo = wxLocale::FindLanguageInfo(wxPathLang);
+                                if (pInfo != NULL) {
+                                        m_mapLanguages[std::string(pInfo->Description.ToUTF8())] = pInfo->Language;
+                                }
+                                cont = dir.GetNext(&wxPathLang);
+                        }
+                }
+                for (TMapLanguages::iterator it  = m_mapLanguages.begin(); it != m_mapLanguages.end(); ++it) {
+                        int position = m_pComboLanguage->Append(wxString::FromUTF8((*it).first.c_str()));
+                        if ((*it).second == language) {
+                                m_pComboLanguage->Select(position);
+                        }
+                }
+                if (m_pComboLanguage->GetSelection() == -1) {
+                        m_pComboLanguage->Select(m_pComboLanguage->FindString(_("Default")));
+                }
+        }
+
+        //anon usage
+#ifdef GINKGO_PRO
+        bool anonUsage;
+        GNC::GCS::ConfigurationController::Instance()->readBoolGeneral("/GinkgoCore/General", "AnonUsageStats", anonUsage, false);
+        m_pCheckAnonUsageStats->SetValue(anonUsage);
+#endif
+
+        //proxy Settings
+        {
+                *pProxySettings = GNC::GCS::ConfigurationController::Instance()->GetProxySettings();
+                m_pEnableProxy->SetValue(pProxySettings->useProxy);
+                m_pProxySettingsButton->Enable(pProxySettings->useProxy);
+        }
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* PanelConfiguracionGeneral::GetPanel()
+{
+        return this;
+}
+
+std::string PanelConfiguracionGeneral::GetTitle()
+{
+        return _Std("General");
+}
+
+std::string PanelConfiguracionGeneral::GetCabecera()
+{
+        return _Std("General configuration parameters");
+}
+
+bool PanelConfiguracionGeneral::Validar()
+{
+        if(m_idiomaCambiado) {
+                wxMessageBox(_("Ginkgo CADx must restart for the changes to take effect"),_("Info"));
+        }
+
+        return true;
+}
+
+bool PanelConfiguracionGeneral::Guardar()
+{
+        GNC::GCS::ConfigurationController::Instance()->writeBoolGeneral("/GinkgoCore/Estacion", "CheckForUpdates", m_pCheckForUpdates->GetValue());
+
+        //internacionalizacion
+        if (m_pComboLanguage->GetStringSelection() != _("Default")) {
+                std::string selectedLanguage(m_pComboLanguage->GetStringSelection().ToUTF8());
+                for (TMapLanguages::iterator it  = m_mapLanguages.begin(); it != m_mapLanguages.end(); ++it) {
+                        if ((*it).first == selectedLanguage) {
+                                GNC::GCS::ConfigurationController::Instance()->writeIntUser("/GinkgoCore/Station", "Language", (*it).second);
+                                break;
+                        }
+                }
+        } else {
+                GNC::GCS::ConfigurationController::Instance()->deleteEntryUser("/GinkgoCore/Station", "Language");
+        }
+        //anon usage
+#ifdef GINKGO_PRO
+        GNC::GCS::ConfigurationController::Instance()->writeBoolGeneral("/GinkgoCore/General", "AnonUsageStats", m_pCheckAnonUsageStats->GetValue());
+        GNC::GCS::ConfigurationController::Instance()->Flush();
+        GNC::GCS::AnonUsageStats::Instance()->resetSettings();
+#endif
+
+        //proxy
+        GNC::GCS::ConfigurationController::Instance()->SetProxySettings(*pProxySettings);
+
+        return true;
+}
+//endregion
+
+void PanelConfiguracionGeneral::OnCheckForUpdates(wxCommandEvent &)
+{
+        if(IsShown()) {
+                OnPropiedadCambiada();
+        }
+}
+
+
+void PanelConfiguracionGeneral::OnTextoCambiado(wxCommandEvent &)
+{
+        if(IsShown()) {
+                OnPropiedadCambiada();
+        }
+}
+
+void PanelConfiguracionGeneral::OnIdiomaCambiado(wxCommandEvent &)
+{
+        if(IsShown()) {
+                OnPropiedadCambiada();
+                m_idiomaCambiado = true;
+        }
+}
+
+void PanelConfiguracionGeneral::OnProxySettings(wxCommandEvent &)
+{
+        ProxySettingsDialog dlg(this);
+        dlg.SetProxySettings(*pProxySettings);
+        if (dlg.ShowModal() == wxID_OK) {
+                *pProxySettings = dlg.GetProxySettings();
+                OnPropiedadCambiada();
+        }
+}
+
+void PanelConfiguracionGeneral::OnCheckEnableProxySettings(wxCommandEvent &)
+{
+        m_pProxySettingsButton->Enable(m_pEnableProxy->IsChecked());
+        pProxySettings->useProxy = m_pEnableProxy->IsChecked();
+        OnPropiedadCambiada();
+}
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguraciongeneral.h b/cadxcore/main/gui/configuration/panelconfiguraciongeneral.h
new file mode 100644
index 0000000..5aff478
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguraciongeneral.h
@@ -0,0 +1,71 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <vector>
+#include <map>
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+
+namespace GNC
+{
+namespace GCS
+{
+class ProxySettings;
+}
+namespace GUI
+{
+
+class PanelConfiguracionGeneral : public PanelConfiguracionGeneralBase, public IPasoConfiguracion
+{
+public:
+        PanelConfiguracionGeneral(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~PanelConfiguracionGeneral();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+protected:
+        wxString m_pathDicomDir;
+        void OnCheckForUpdates(wxCommandEvent &event);
+        void OnTextoCambiado(wxCommandEvent &event);
+        void OnIdiomaCambiado(wxCommandEvent &event);
+        virtual void OnProxySettings(wxCommandEvent &event);
+        virtual void OnCheckEnableProxySettings(wxCommandEvent &event);
+
+        bool m_idiomaCambiado;
+        typedef std::map<std::string, int> TMapLanguages;
+        TMapLanguages m_mapLanguages;
+        GNC::GCS::ProxySettings* pProxySettings;
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionhce.cpp b/cadxcore/main/gui/configuration/panelconfiguracionhce.cpp
new file mode 100644
index 0000000..82f73b3
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionhce.cpp
@@ -0,0 +1,163 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+#include <sstream>
+
+#include <api/internationalization/internationalization.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/configurationcontroller.h>
+
+#include <endpoint/endpoint.h>
+
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/busyinfo.h>
+#include <wx/xml/xml.h>
+
+#ifndef _WIN32
+#include <signal.h>
+#endif
+
+#include "panelconfiguracionhce.h"
+
+
+GNC::GUI::PanelConfiguracionHCE::PanelConfiguracionHCE(wxWindow* pParent,IDialogoConfiguracion* pDialogo): PanelConfiguracionHCEBase(pParent), IPasoConfiguracion(pDialogo)
+{
+        Recargar();
+}
+
+GNC::GUI::PanelConfiguracionHCE::~PanelConfiguracionHCE()
+{
+}
+
+void GNC::GUI::PanelConfiguracionHCE::Recargar()
+{
+        std::string value;
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","IDOrganizacionReceptora", value);
+        m_pIdOrganizacionReceptora->SetValue(wxString::FromUTF8(value.c_str()));
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","IDSistemaPeticionario", value);
+        m_pIdSistemaPeticionario->SetValue(wxString::FromUTF8(value.c_str()));
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","IDAplicacionRellenadora", value);
+        m_pIdAplicacionRellenadora->SetValue(wxString::FromUTF8(value.c_str()));
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","IDGinkgoApplication", value, "GINKGO");
+        m_pIdGinkgoAplication->SetValue(wxString::FromUTF8(value.c_str()));
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","HostnameMI", value);
+        m_pHostnameMI->SetValue(wxString::FromUTF8(value.c_str()));
+        GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/HCE","PuertoMI", value);
+        m_pPuertoMI->SetValue(wxString::FromUTF8(value.c_str()));
+
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* GNC::GUI::PanelConfiguracionHCE::GetPanel()
+{
+        return this;
+}
+
+std::string GNC::GUI::PanelConfiguracionHCE::GetTitle()
+{
+        return _Std("Electronic health record");
+}
+
+std::string GNC::GUI::PanelConfiguracionHCE::GetCabecera()
+{
+        return _Std("Setting the electronic health record system");
+}
+
+bool GNC::GUI::PanelConfiguracionHCE::Validar()
+{
+        bool ok = true;
+        // GW: Whatever this was meant to validate, no idea, eliminating dead code.
+
+        //reset xml-rpc server
+        return ok;
+}
+
+bool GNC::GUI::PanelConfiguracionHCE::Guardar()
+{
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/HCE","IDOrganizacionReceptora", std::string(m_pIdOrganizacionReceptora->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/HCE","IDSistemaPeticionario", std::string(m_pIdSistemaPeticionario->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/HCE","IDAplicacionRellenadora", std::string(m_pIdAplicacionRellenadora->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/HCE","IDGinkgoApplication", std::string(m_pIdGinkgoAplication->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/HCE","IDGinkgoApplication", std::string(m_pIdGinkgoAplication->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/HCE","HostnameMI", std::string(m_pHostnameMI->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/HCE","PuertoMI", std::string(m_pPuertoMI->GetValue().ToUTF8()));
+
+        return true;
+}
+
+void GNC::GUI::PanelConfiguracionHCE::OnTextoCambiado(wxCommandEvent &)
+{
+        OnPropiedadCambiada();
+}
+
+void GNC::GUI::PanelConfiguracionHCE::OnCambioSistema(wxCommandEvent &)
+{
+        OnPropiedadCambiada();
+}
+
+void GNC::GUI::PanelConfiguracionHCE::OnTestClick(wxCommandEvent &)
+{
+
+        try {
+                //se abre una conexión tcp al host(puerto...)
+                std::string url;
+                {
+                        std::ostringstream ostr;
+                        ostr << m_pHostnameMI->GetValue().ToUTF8()<< ":" << m_pPuertoMI->GetValue().ToUTF8();
+                        url = ostr.str();
+                }
+#ifndef _WIN32
+                signal(SIGPIPE, SIG_IGN);
+#endif
+                Endpoint::Initialize();
+
+                wxBusyInfo* info = new wxBusyInfo(_("Testing conectivity with the server..."));
+                Endpoint ep(TCP | CLIENT, url);
+                delete info;
+
+                if (!ep) {
+                        std::stringstream ostr;
+                        if (url.empty() || url.at(url.size() - 1) == ':' ) {
+                                ostr << _Std("Error connecting to url") << std::string(": ") << _Std("hostname/port not set");
+                        } else {
+                                ostr << _Std("Error connecting to url") << std::string(" ") << url;
+                        }
+                        wxMessageBox(wxString::FromUTF8(ostr.str().c_str()), _("Connection test fail"), wxICON_ERROR, this);
+                } else {
+                        wxMessageBox(_("Connection test successful"),_("Info"),wxOK | wxICON_INFORMATION, this);
+                }
+                ep.Close();
+        } catch (std::exception& ex) {
+                LOG_ERROR("HL7Test", "Internal error testing integration server: " << ex.what() );
+        }
+}
+
+void GNC::GUI::PanelConfiguracionHCE::OnCheckXMLRPC(wxCommandEvent&)
+{
+        OnPropiedadCambiada();
+}
+
+//endregion
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionhce.h b/cadxcore/main/gui/configuration/panelconfiguracionhce.h
new file mode 100644
index 0000000..50619a1
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionhce.h
@@ -0,0 +1,67 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+#include <string>
+#include <vector>
+
+namespace GNC
+{
+namespace GUI
+{
+
+class PanelConfiguracionHCE : public PanelConfiguracionHCEBase, public IPasoConfiguracion
+{
+public:
+        PanelConfiguracionHCE(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~PanelConfiguracionHCE();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+
+protected:
+        virtual void OnSize(wxSizeEvent &)
+        {
+                Layout();
+        }
+        virtual void OnTextoCambiado(wxCommandEvent &event);
+
+        virtual void OnCambioSistema(wxCommandEvent &event);
+
+        virtual void OnTestClick(wxCommandEvent &event);
+
+        virtual void OnCheckXMLRPC(wxCommandEvent&event);
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionpacs.cpp b/cadxcore/main/gui/configuration/panelconfiguracionpacs.cpp
new file mode 100644
index 0000000..5f577a9
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionpacs.cpp
@@ -0,0 +1,1119 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <vector>
+#include <sstream>
+#include <limits>
+
+#include <main/controllers/dcmtk/dicomnetwork.h>
+#include <main/controllers/dcmtk/dicomechoassociation.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/controllers/dcmtk/dicomservers.h>
+#include <main/controllers/pacscontroller.h>
+#include <main/controllers/controladorextensiones.h>
+
+
+#include <wx/uri.h>
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/valtext.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include <wx/file.h>
+#include <wx/textfile.h>
+#include <wx/dir.h>
+#include <wx/filedlg.h>
+#include <wx/log.h>
+#include <wx/busyinfo.h>
+#include <wx/xml/xml.h>
+
+#include "panelconfiguracionpacs.h"
+
+#include <sstream>
+
+#include <main/entorno.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#define NAME_COLUMN_IDX             0
+#define NAME_COLUMN_WIDTH           300
+#define USE_BY_DEFAULT_COLUMN_IDX   1
+#define USE_BY_DEFAULT_COLUMN_WIDTH 80
+
+namespace GNC
+{
+namespace GUI
+{
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////DialogoEditarCertificado//////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class DialogoEditarCertificado: public DialogoEditarCertificadoBase
+{
+public:
+        DialogoEditarCertificado(wxWindow* pParent, const std::string& cert, const std::string& privateKey, bool permitirDefecto): DialogoEditarCertificadoBase(pParent)
+        {
+                m_Ok = false;
+                m_pTextoCertificado->SetValue(wxString::FromUTF8(cert.c_str()));
+                m_pTextoPrivateKey->SetValue(wxString::FromUTF8(privateKey.c_str()));
+
+                if (permitirDefecto) {
+                        m_pCheckDefault->SetValue(cert.size() == 0 && privateKey.size() == 0);
+                } else {
+                        m_pCheckDefault->SetValue(false);
+                        m_pPanelDefault->Show(false);
+                        m_pSepDefault->Show(false);
+                        m_pBody->Layout();
+                        Layout();
+                        Refresh(true);
+                }
+
+                RefrescarEstado();
+        }
+        ~DialogoEditarCertificado()
+        {
+        }
+
+        virtual void OnAceptarClick(wxCommandEvent&)
+        {
+                if (Validar()) {
+                        m_Ok = true;
+                        EndModal(wxID_OK);
+                }
+        }
+
+        void CargarFichero(bool publicKey)
+        {
+                wxFileDialog seleccionarFichero (this, _("Select certificate"), wxT(""), wxT(""), _("PEM files(*.pem;*.key)|*.pem;*.key|All files (*.*)|*.*"),wxFD_FILE_MUST_EXIST|wxFD_OPEN);
+                int response = seleccionarFichero.ShowModal();
+                if (response == wxID_OK) {
+                        wxTextFile textFile(seleccionarFichero.GetPath());
+                        if (textFile.Open()) {
+                                wxString cadena;
+                                if (!textFile.Eof()) {
+                                        cadena += textFile.GetNextLine();
+                                        while(!textFile.Eof()) {
+                                                cadena += wxT("\n") + textFile.GetNextLine();
+                                        }
+                                }
+                                if (publicKey) {
+                                        m_pTextoCertificado->SetValue(cadena);
+                                } else {
+                                        m_pTextoPrivateKey->SetValue(cadena);
+                                }
+                                textFile.Close();
+                        }
+                }
+        }
+
+        virtual void OnLoadPrivateClick(wxCommandEvent& )
+        {
+                CargarFichero(false);
+        }
+
+        virtual void OnLoadPublicClick(wxCommandEvent& )
+        {
+                CargarFichero(true);
+        }
+
+        virtual void OnResetToDefault(wxCommandEvent& )
+        {
+                if (m_pPanelDefault->IsShown()) {
+                        m_pCheckDefault->SetValue(true);
+                } else {
+                        //cargamos el certificado por defecto...
+#ifdef GINKGO_PUBLIC_KEY
+                        m_pTextoCertificado->SetValue(wxString::FromUTF8(GINKGO_PUBLIC_KEY));
+#else
+                        m_pTextoCertificado->SetValue(wxT(""));
+#endif
+#ifdef GINKGO_PRIVATE_KEY
+                        m_pTextoPrivateKey->SetValue(wxString::FromUTF8(GINKGO_PRIVATE_KEY));
+#else
+                        m_pTextoPrivateKey->SetValue(wxT(""));
+#endif
+                }
+
+                RefrescarEstado();
+        }
+
+        virtual void OnCheckDefault(wxCommandEvent&)
+        {
+                RefrescarEstado();
+        }
+
+        virtual void RefrescarEstado()
+        {
+                m_pPanelPublic->Enable(!m_pCheckDefault->IsChecked());
+                m_pPanelPublic->Refresh();
+                m_pPanelPrivate->Enable(!m_pCheckDefault->IsChecked());
+                m_pPanelPrivate->Refresh();
+
+                if (m_pCheckDefault->IsChecked()) {
+                        m_pTextoCertificado->SetValue(wxT(""));
+                        m_pTextoPrivateKey->SetValue(wxT(""));
+                }
+        }
+
+        std::string GetPublicValue()
+        {
+                std::string cert(m_pTextoCertificado->GetValue().ToUTF8());
+                return cert;
+        }
+
+        std::string GetPrivateValue()
+        {
+                std::string cert(m_pTextoPrivateKey->GetValue().ToUTF8());
+                return cert;
+        }
+
+        bool GetUseDefaultCert()
+        {
+                return m_pCheckDefault->GetValue();
+        }
+
+        bool Validar()
+        {
+                bool ok = true;
+                std::stringstream sstream;
+
+                if (!m_pCheckDefault->IsChecked() && m_pCheckDefault->IsShown()) {
+                        if (m_pTextoCertificado->GetValue().size() == 0 || m_pTextoPrivateKey->GetValue().size() == 0) {
+                                ok = false;
+                                sstream << _Std("You have to set private and public key") ;
+                        }
+                        if (!ok) {
+                                wxMessageBox(wxString::FromUTF8(sstream.str().c_str()),_("Info"),wxOK | wxICON_INFORMATION, this);
+                        }
+                }
+                return ok;
+        }
+
+        bool m_Ok;
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////DialogoLocalPACS//////////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class DialogoLocalPACS: public DialogoLocalPACSBase
+{
+public:
+
+        DialogoLocalPACS(wxWindow* pParent): DialogoLocalPACSBase(pParent)
+        {
+                m_Ok = false;
+        }
+
+        ~DialogoLocalPACS()
+        {}
+
+        void SetParametros(PanelConfiguracionPACS::TipoConfigLocal& pacsLocal)
+        {
+                m_pUseTLS->SetValue(pacsLocal.useTLS);
+
+                m_pVerifyServer->SetValue(pacsLocal.verifyCredentials);
+
+                m_certificado = pacsLocal.certificate;
+                m_privateKey = pacsLocal.privateKey;
+                if (m_certificado.size()>0 || m_privateKey.size()>0) {
+                        m_pBCert->SetLabel(_("Change ..."));
+                } else {
+                        m_pBCert->SetLabel(_("Import ..."));
+                }
+        }
+
+        void GetParametros(PanelConfiguracionPACS::TipoConfigLocal& pacsLocal)
+        {
+                pacsLocal.useTLS = m_pUseTLS->GetValue();
+
+                pacsLocal.verifyCredentials = m_pVerifyServer->GetValue();
+
+                pacsLocal.certificate = m_certificado;
+                pacsLocal.privateKey = m_privateKey;
+        }
+
+
+        virtual void OnEditCertificate(wxCommandEvent&)
+        {
+                DialogoEditarCertificado dlg(this, m_certificado, m_privateKey, false);
+                dlg.ShowModal();
+                if (dlg.m_Ok) {
+                        m_certificado = dlg.GetPublicValue();
+                        m_privateKey = dlg.GetPrivateValue();
+                        if (m_certificado.size()>0 || m_privateKey.size()>0) {
+                                m_pBCert->SetLabel(_("Change ..."));
+                        } else {
+                                m_pBCert->SetLabel(_("Import ..."));
+                        }
+                }
+        }
+
+        virtual void OnAceptarClick(wxCommandEvent&)
+        {
+                if (Validar()) {
+                        m_Ok = true;
+                        EndModal(wxID_OK);
+                }
+        }
+
+        bool Validar()
+        {
+                bool ok = true;
+                std::stringstream sstream;
+
+                if (m_pUseTLS->GetValue()
+                    && (m_certificado.size() == 0 || m_privateKey.size() == 0)) {
+                        ok = false;
+                        sstream << _Std("If you want to use SSL/TLS you have to set a valid certificate and a valid private key") ;
+                }
+                if (!ok) {
+                        wxMessageBox(wxString::FromUTF8(sstream.str().c_str()),_("Info"),wxOK | wxICON_INFORMATION, this);
+                }
+                return ok;
+        }
+
+        bool m_Ok;
+        std::string m_certificado;
+        std::string m_privateKey;
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////DialogoServidorPACS///////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+class DialogoServidorPACS: public DialogoServidorPACSBase
+{
+public:
+
+        DialogoServidorPACS(wxWindow* pParent, PanelConfiguracionPACS::TipoConfigLocal& configLocal, const wxString& strPuertoLocal, const wxString& aetLocal, std::list<std::string> usedPACSIds) :
+                DialogoServidorPACSBase(pParent),
+                m_configLocal(configLocal),
+                m_Ok(false),
+                m_aetLocal(aetLocal.ToUTF8()),
+                m_puertoLocal(11112),
+                m_idsPacs(usedPACSIds)
+        {
+                wxTextValidator OnlyNum = wxTextValidator(wxFILTER_NUMERIC);
+                m_pPuerto->SetValidator(OnlyNum);
+
+                m_pPDU->SetValue(16384);
+
+                long puertoLocal;
+                if(strPuertoLocal.ToLong(&puertoLocal)) {
+                        m_puertoLocal = puertoLocal;
+                }
+
+                if(!GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","pacs_tls")) {
+                        m_pPanelSeguridad->Show(false);
+                        m_notebook1->RemovePage(1);
+                }
+
+                //worklist settings...
+#ifndef GINKGO_PRO
+                m_pWorkListPanel->Show(false);
+#endif
+                //
+
+                LoadMessageDefaultValues();
+                RefreshHL7Panel();
+        }
+
+        ~DialogoServidorPACS()
+        {
+
+        }
+
+        void GetParametros(DicomServer& tipoPacs)
+        {
+                tipoPacs.ID = std::string(m_pId->GetValue().ToUTF8());
+                tipoPacs.AET= std::string(m_pAET->GetValue().ToUTF8());
+                tipoPacs.HostName = std::string(m_pHost->GetValue().ToUTF8());
+                tipoPacs.Port = atoi(m_pPuerto->GetValue().ToUTF8());
+                tipoPacs.PDU = m_pPDU->GetValue();
+
+                switch (m_pRetrieveMethod->GetSelection()) {
+                case 2:
+                        tipoPacs.retrieveMethod = DicomServer::WADO;
+                        break;
+                case 1:
+                        tipoPacs.retrieveMethod = DicomServer::GET;
+                        break;
+                case 0:
+                default:
+                        tipoPacs.retrieveMethod = DicomServer::MOVE;
+                        break;
+                }
+                tipoPacs.wadoURI = std::string(m_pWadoURL->GetValue().ToUTF8());
+                tipoPacs.retrieveSeries = m_pRetrieveMode->GetSelection() == 0;
+
+                tipoPacs.reuseConnection = m_pReuseConnection->GetValue();
+
+                if(GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","pacs_tls")) {
+                        tipoPacs.useTLS = m_pUseSSL->GetValue();
+
+                        tipoPacs.pacsUser = m_pUser->GetValue().ToUTF8();
+                        tipoPacs.pacsPass = m_pPassword->GetValue().ToUTF8();
+
+                        tipoPacs.verifyCredentials = m_pVerifyServer->GetValue();
+
+                        tipoPacs.certificate = m_certificado;
+                        tipoPacs.privateKey = m_privateKey;
+                }
+                tipoPacs.defaultCharset = m_pComboCharset->GetValue().ToUTF8();
+
+                //wl
+                tipoPacs.GetWlConfig().useDICOMMPPS = m_pCheckDICOMMPPS->IsChecked();
+                if (m_pCheckHL7->IsChecked()) {
+                        tipoPacs.GetWlConfig().useAbortMessage = m_pCheckAbort->IsChecked();
+                        tipoPacs.GetWlConfig().useCompletedMessage = m_pCheckCompleted->IsChecked();
+                        tipoPacs.GetWlConfig().useInProgressMessage = m_pCheckInProgress->IsChecked();
+                } else {
+                        tipoPacs.GetWlConfig().useAbortMessage = tipoPacs.GetWlConfig().useCompletedMessage = tipoPacs.GetWlConfig().useInProgressMessage = false;
+                }
+                tipoPacs.GetWlConfig().abortTemplate = m_pTextAbort->GetValue().ToUTF8();
+                tipoPacs.GetWlConfig().completedTemplate = m_pTextCompleted->GetValue().ToUTF8();
+                tipoPacs.GetWlConfig().inProgressTemplate = m_pTextProgress->GetValue().ToUTF8();
+                //
+        }
+
+        void SetParametros(DicomServer& tipoPacs)
+        {
+                m_pId->SetValue(wxString::FromUTF8(tipoPacs.ID.c_str()));
+                m_pAET->SetValue(wxString::FromUTF8(tipoPacs.AET.c_str()));
+                m_pHost->SetValue(wxString::FromUTF8(tipoPacs.HostName.c_str()));
+                m_pPuerto->SetValue(wxString::Format(wxT("%d"), (int) tipoPacs.Port));
+                m_pPDU->SetValue(wxString::Format(wxT("%d"), (int) tipoPacs.PDU));
+
+                m_pRetrieveMethod->SetSelection((int)tipoPacs.retrieveMethod);
+                m_pRetrieveMode->SetSelection(tipoPacs.retrieveSeries?0:1);
+                m_pWadoURL->SetValue(wxString::FromUTF8(tipoPacs.wadoURI.c_str()));
+
+                m_pReuseConnection->SetValue(tipoPacs.reuseConnection);
+
+                if(GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","pacs_tls")) {
+                        m_pUseSSL->SetValue(tipoPacs.useTLS);
+                        m_pUser->SetValue(wxString::FromUTF8(tipoPacs.pacsUser.c_str()));
+                        m_pPassword->SetValue(wxString::FromUTF8(tipoPacs.pacsPass.c_str()));
+
+                        m_pVerifyServer->SetValue(tipoPacs.verifyCredentials);
+
+                        m_certificado = tipoPacs.certificate;
+                        m_privateKey = tipoPacs.privateKey;
+                }
+
+                m_pComboCharset->SetValue(wxString::FromUTF8(tipoPacs.defaultCharset.c_str()));
+
+                //wl
+                m_pCheckDICOMMPPS->SetValue(tipoPacs.GetWlConfig().useDICOMMPPS);
+                m_pCheckHL7->SetValue(tipoPacs.GetWlConfig().useAbortMessage || tipoPacs.GetWlConfig().useCompletedMessage || tipoPacs.GetWlConfig().useInProgressMessage);
+                m_pCheckAbort->SetValue(tipoPacs.GetWlConfig().useAbortMessage);
+                m_pCheckCompleted->SetValue(tipoPacs.GetWlConfig().useCompletedMessage);
+                m_pCheckInProgress->SetValue(tipoPacs.GetWlConfig().useInProgressMessage);
+                m_pTextAbort->SetValue(wxString::FromUTF8(tipoPacs.GetWlConfig().abortTemplate.c_str()));
+                m_pTextCompleted->SetValue(wxString::FromUTF8(tipoPacs.GetWlConfig().completedTemplate.c_str()));
+                m_pTextProgress->SetValue(wxString::FromUTF8(tipoPacs.GetWlConfig().inProgressTemplate.c_str()));
+                //
+                RefreshHL7Panel();
+                wxCommandEvent evt;
+                OnRetrieveMethodChoice(evt);
+        }
+
+        virtual void OnAdvancedConfiguration(wxCommandEvent&)
+        {
+                DialogoEditarCertificado dlg(this, m_certificado, m_privateKey, true);
+                dlg.ShowModal();
+                if (dlg.m_Ok) {
+                        if (dlg.GetUseDefaultCert()) {
+                                m_certificado = m_configLocal.certificate;
+                                m_privateKey = m_configLocal.privateKey;
+                        } else {
+                                m_certificado = dlg.GetPublicValue();
+                                m_privateKey = dlg.GetPrivateValue();
+                        }
+                }
+        }
+
+        virtual void OnRetrieveMethodChoice(wxCommandEvent&)
+        {
+                bool enableWADO = m_pRetrieveMethod->GetSelection() == DicomServer::WADO;
+                m_pWadoURL->Enable(enableWADO);
+                m_pRetrieveMode->Enable(!enableWADO);
+        }
+
+        virtual void OnCancelClick(wxCommandEvent &)
+        {
+                m_Ok=false;
+                EndModal(wxID_CANCEL);
+        }
+
+        virtual void OnOkClick(wxCommandEvent &)
+        {
+                if(Validar()) {
+                        m_Ok=true;
+                        EndModal(wxID_OK);
+                }
+        }
+
+        bool Validar ()
+        {
+                bool ok = true;
+                if(m_pId->GetValue() != wxEmptyString && m_pAET->GetValue() != wxEmptyString && m_pHost->GetValue() != wxEmptyString && m_pPuerto->GetValue() != wxEmptyString) {
+                        std::stringstream sstream;
+                        sstream << _Std("There are this errors: ");
+
+                        std::string idPACS = std::string(m_pId->GetValue().ToUTF8());
+                        for (std::list<std::string>::iterator it = m_idsPacs.begin(); it != m_idsPacs.end(); ++it) {
+                                if (idPACS == (*it)) {
+                                        sstream << _Std("\n- This PACS id is in use");
+                                        ok = false;
+                                        break;
+                                }
+                        }
+
+                        long numero;
+                        if(!m_pPuerto->GetValue().ToLong(&numero)) {
+                                ok = false;
+                                sstream << _Std("\n- The port must be a positive short integer (16 bits)");
+                        } else {
+                                if(numero > 32767) { //maxshort
+                                        ok = false;
+                                        sstream <<_Std("\n- The port is too large");
+                                }
+                        }
+
+                        if(m_pAET->GetLabel().size() >16) {
+                                ok = false;
+                                sstream <<_Std("\n- The maximum length of the AET is 16 characters");
+                        }
+
+                        if (m_pPDU->GetValue() != 0) {
+
+                                if(!m_pPDU->GetValue()) {
+                                        ok = false;
+                                        sstream << _Std("\n- The PDU size should be greater than or equal to zero (default = 16384)");
+                                } else {
+                                        if(m_pPDU->GetValue() > MAX_PDU_LENGTH) { // max, viene de esta constante ASC_MAXIMUMPDUSIZE de DCMTK
+                                                ok = false;
+                                                sstream << _Std("\n- The maximum value of the PDU is ") <<  MAX_PDU_LENGTH << "(" << MAX_PDU_LENGTH/1024 << "K)";
+                                        }
+                                        if(m_pPDU->GetValue() < MIN_PDU_LENGTH) { // min, viene de esta constante ASC_MINIMUMPDUSIZE de DCMTK
+                                                ok = false;
+                                                sstream << _Std("\n- The minimum value of the PDU is ") <<  MIN_PDU_LENGTH << "(" << MIN_PDU_LENGTH/1024 << "K)" ;
+                                        }
+                                }
+                        }
+
+                        if (m_pUseSSL->GetValue() && ( (m_certificado.size() == 0 || m_privateKey.size() == 0) && (m_configLocal.certificate.size() == 0 || m_configLocal.privateKey.size() == 0 )  ) ) {
+                                ok = false;
+                                sstream << _Std("\n- If you want to use SSL/TLS you have to set a valid certificate and private key") ;
+                        }
+
+                        if (m_pRetrieveMethod->GetSelection() == DicomServer::WADO) {
+                                if (m_pWadoURL->GetValue().IsEmpty()) {
+                                        ok = false;
+                                        sstream << _Std("\n- If you want to use WADO you have to fill in wado url") ;
+                                } else {
+                                        wxURI uri(m_pWadoURL->GetValue());
+                                        if (uri.GetScheme().IsEmpty()) {
+                                                sstream << _Std("\n- WADO URL doesn't contains scheme (i.e. http://)") ;
+                                                ok = false;
+                                        } else if (uri.GetServer().IsEmpty()) {
+                                                sstream << _Std("\n- WADO URL doesn't contains host") ;
+                                                ok = false;
+                                        }
+                                }
+                        }
+
+                        if(!ok)
+                                wxMessageBox(wxString::FromUTF8(sstream.str().c_str()),_("Info"),wxOK | wxICON_INFORMATION, this);
+                } else {
+                        ok = false;
+                        wxMessageBox(_("You must fill in all fields to continue"),_("Info"),wxOK | wxICON_INFORMATION, this);
+                }
+                return ok;
+        }
+
+        virtual void OnProbarClick(wxCommandEvent &)
+        {
+                if(Validar()) {
+                        bool success = true;
+                        std::ostringstream errorMsg;
+                        std::string errorTitle;
+
+                        {
+                                long puerto;
+                                long pdu = m_pPDU->GetValue();
+
+                                wxBusyInfo info( _("Testing the connection to the node ...") );
+
+                                // 1: Check DICOM interface
+                                errorTitle = _Std("DICOM Error");
+
+                                if(m_pPuerto->GetValue().ToLong(&puerto)) {
+
+                                        EchoAssociation as("C-ECHO");
+                                        if (m_pUseSSL->GetValue()) {
+                                                if (m_certificado.empty() || m_privateKey.empty()) {
+                                                        as.SetTLS(m_configLocal.certificate, m_configLocal.privateKey, m_pVerifyServer->GetValue());
+                                                } else {
+                                                        as.SetTLS(m_certificado, m_privateKey, m_pVerifyServer->GetValue());
+                                                }
+                                        }
+                                        if (m_pUser->GetValue() != wxEmptyString) {
+                                                as.SetUserPass(std::string(m_pUser->GetValue().ToUTF8()), std::string(m_pPassword->GetValue().ToUTF8()));
+                                        }
+                                        OFCondition cond;
+
+                                        std::string aet(m_pAET->GetValue().ToUTF8());
+                                        std::string host(m_pHost->GetValue().ToUTF8());
+
+                                        as.Create(aet, host, puerto, m_aetLocal, UID_VerificationSOPClass);
+
+                                        GIL::DICOM::DCMTK::Network* pNetwork = NULL;
+                                        try {
+                                                pNetwork = GIL::DICOM::DCMTK::Network::Instance(this);
+                                        } catch(const std::exception& ex) {
+                                                success = false;
+                                                errorMsg << _Std("Unable to connect: Could not start network support.") << ":\n" << ex.what();
+                                        }
+
+                                        if(success) {
+                                                as.SetTimeout(10);
+                                                pNetwork->InitializeNetwork(as.GetTimeout());
+                                                cond = pNetwork->ConnectAssociation(&as, pdu);
+                                                if (cond.good()) {
+                                                        cond = as.SendEchoRequest();
+                                                        if (cond.bad())	{
+                                                                success = false;
+                                                                errorMsg << _Std("The service did not respond correctly to the C-ECHO") << ":\n" << cond.text();
+                                                        }
+                                                } else {
+                                                        success = false;
+                                                        errorMsg << _Std("The service did not respond correctly to the DICOM standard") << ":\n" << cond.text();
+                                                }
+                                                as.Drop(cond);
+                                                GIL::DICOM::DCMTK::Network::FreeInstance(this);
+                                                pNetwork = NULL;
+                                        }
+                                } else {
+                                        success = false;
+                                        errorMsg << _Std("Invalid port number");
+                                }
+
+                                // 2: check if wado support is enabled.
+
+                                if (success && ( m_pRetrieveMethod->GetSelection() == (int)DicomServer::WADO ) ) {
+                                        errorTitle = _Std("WADO Error");
+                                        std::string url(m_pWadoURL->GetValue().ToUTF8());
+                                        try {
+                                                GNC::GCS::IEntorno::Instance()->GetPACSController()->TestWADOURL(url);
+                                        } catch (const GIL::DICOM::PACSException& ex) {
+                                                success = false;
+                                                errorMsg << ex.GetCause();
+                                        }
+                                }
+                        }
+
+                        if (success) {
+                                std::string resp = _Std("Connection test successful");
+                                LOG_INFO("C-TEST", resp);
+                                wxMessageBox(wxString::FromUTF8(resp.c_str()), _("Info"), wxOK | wxICON_INFORMATION, this);
+
+                        } else {
+                                LOG_ERROR("C-TEST", errorTitle << ":" << errorMsg.str());
+                                wxMessageBox(wxString::FromUTF8(errorMsg.str().c_str()), wxString::FromUTF8(errorTitle.c_str()), wxICON_ERROR, this);
+                        }
+                }
+
+        }
+
+        virtual void OnChecWL(wxCommandEvent &)
+        {
+                RefreshHL7Panel();
+        }
+
+        virtual void RefreshHL7Panel()
+        {
+                m_pPanelHL7->Enable(m_pCheckHL7->GetValue());
+                m_pTextAbort->Enable(m_pCheckAbort->GetValue());
+                m_pTextCompleted->Enable(m_pCheckCompleted->GetValue());
+                m_pTextProgress->Enable(m_pCheckInProgress->GetValue());
+                m_pPanelHL7->Refresh(true);
+        }
+
+        virtual void OnMessageDefaultValues(wxCommandEvent&)
+        {
+                LoadMessageDefaultValues();
+        }
+
+        virtual void LoadMessageDefaultValues()
+        {
+                GNC::GCS::Permisos::EstadoPermiso perm = GNC::GCS::IControladorPermisos::Instance()->Get("gnkwl.messages", "inprogress");
+                if (perm) {
+                        m_pTextProgress->SetValue(wxString::FromUTF8(perm.GetRawValue().c_str()));
+                }
+                perm = GNC::GCS::IControladorPermisos::Instance()->Get("gnkwl.messages", "completed");
+                if (perm) {
+                        m_pTextCompleted->SetValue(wxString::FromUTF8(perm.GetRawValue().c_str()));
+                }
+                perm = GNC::GCS::IControladorPermisos::Instance()->Get("gnkwl.messages", "abort");
+                if (perm) {
+                        m_pTextAbort->SetValue(wxString::FromUTF8(perm.GetRawValue().c_str()));
+                }
+        }
+
+        PanelConfiguracionPACS::TipoConfigLocal& m_configLocal;
+
+        bool m_Ok;
+        std::string m_aetLocal;
+        long m_puertoLocal;
+        std::string m_certificado;
+        std::string m_privateKey;
+        std::list<std::string> m_idsPacs;
+        std::string m_defCharset;
+};
+
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+///////////////////////PanelConfiguracionPACS////////////////////////////////////////////////////////////////////////////////////
+/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+PanelConfiguracionPACS::PanelConfiguracionPACS(wxWindow* pParent,IDialogoConfiguracion* pDialogo): PanelConfiguracionPACSBase(pParent), IPasoConfiguracion(pDialogo)
+{
+        m_pModel = new wxDataViewListStore();
+        m_pListPacs->AssociateModel(m_pModel.get());
+        m_pListPacs->AppendColumn( new wxDataViewColumn( _("Name"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), NAME_COLUMN_IDX, NAME_COLUMN_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListPacs->AppendColumn( new wxDataViewColumn( _("Use by default"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), USE_BY_DEFAULT_COLUMN_IDX, USE_BY_DEFAULT_COLUMN_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        Recargar();
+
+        m_pHelpBitmap->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoHelp());
+
+        if(!GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","pacs_tls")) {
+                m_pBAdvanced->Show(false);
+                m_pPACSLocal->Layout();
+                this->Layout();
+                this->Refresh(true);
+        }
+
+        m_pListPacs->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(PanelConfiguracionPACS::OnListaPACSChoice), NULL, this);
+        m_pListPacs->Connect(wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(PanelConfiguracionPACS::OnListaPACSDClick), NULL, this);
+}
+
+PanelConfiguracionPACS::~PanelConfiguracionPACS()
+{
+        m_servidores.clear();
+}
+
+void PanelConfiguracionPACS::Recargar()
+{
+        std::string strTmp;
+        if (!GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/PACS/Local", "AET", strTmp, "GINKGO_%IP4")) {
+                GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/PACS/Local", "AET", strTmp);
+        }
+        m_pAETLocal->SetValue(wxString::FromUTF8(strTmp.c_str()));
+        m_pAETReal->SetLabel(wxString::FromUTF8( GNC::Entorno::Instance()->ParseAET(strTmp).substr(0, 16).c_str() ));
+
+        GNC::GCS::Ptr<DicomServer> serverLocal = DicomServerList::Instance()->GetLocalServer();
+        m_pPuertoLocal->SetValue(wxString::Format(wxT("%d"),serverLocal->GetPort()));
+
+        wxTextValidator OnlyNum = wxTextValidator(wxFILTER_NUMERIC);
+        m_pPuertoLocal->SetValidator(OnlyNum);
+
+        m_configLocal.useTLS = serverLocal->GetUseTLS();
+
+        m_configLocal.verifyCredentials = serverLocal->GetverifyCredentials();
+        m_configLocal.privateKey = serverLocal->GetPrivateKey();
+        m_configLocal.certificate = serverLocal->GetCertificate();
+
+        wxVector<wxVariant> data;
+
+        if(GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","remote_pacs")) {
+                m_pPACSServers->Enable(true);
+
+                m_pListPacs->DeleteAllItems();
+                m_servidores.clear();
+
+                DicomServerList::Instance()->Reload();
+                DicomServerList::TServerList ListOfServers = DicomServerList::Instance()->GetServerList();
+
+                wxVector<wxVariant> data;
+                for (DicomServerList::TServerList::iterator it = ListOfServers.begin(); it != ListOfServers.end(); ++it) {
+                        DicomServerList::TServerList::value_type& tuple = (*it);
+                        data.clear();
+                        m_servidores.push_back(tuple);
+
+                        data.push_back(wxString::FromUTF8(tuple->ID.c_str()));
+                        if (tuple->isDefault) {
+                                data.push_back(_("Yes"));
+                        } else {
+                                data.push_back(_("No"));
+                        }
+                        m_pModel->AppendItem(data);
+                }
+
+                if(m_pModel->GetCount() > 0) {
+                        wxDataViewItem item = m_pModel->GetItem(0);
+                        if (item.IsOk()) {
+                                m_pListPacs->SelectRow(0);
+                        }
+                }
+                wxDataViewEvent evt;
+                OnListaPACSChoice(evt);
+        } else {
+                m_pPACSServers->Enable(false);
+        }
+
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* PanelConfiguracionPACS::GetPanel()
+{
+        return this;
+}
+
+std::string PanelConfiguracionPACS::GetTitle()
+{
+        return _Std("DICOM nodes");
+}
+
+std::string PanelConfiguracionPACS::GetCabecera()
+{
+        return _Std("DICOM nodes settings");
+}
+
+bool PanelConfiguracionPACS::Validar()
+{
+        bool ok = true;
+        std::stringstream sstream;
+        sstream << _Std("They have produced the following errors:");
+
+        long numero;
+        if(!m_pPuertoLocal->GetValue().ToLong(&numero) && m_pPuertoLocal->GetValue().size() > 0) {
+                ok = false;
+                sstream << _Std("\n- The local port must be a positive short integer (16 bits)");
+        } else {
+                if(numero > 32767) { //maxshort
+                        ok = false;
+                        sstream << _Std("\n- The local port is too large");
+                }
+        }
+
+        if(m_pAETReal->GetLabel().size() >16) {
+                ok = false;
+                sstream << _Std("\n- Maximum length of local AET is 16 characters");
+        }
+
+        if(!ok)
+                wxMessageBox(wxString::FromUTF8(sstream.str().c_str()),_("Info"),wxOK | wxICON_INFORMATION, this);
+        return ok;
+}
+
+bool PanelConfiguracionPACS::Guardar()
+{
+        //se actualiza el fichero de configuracion
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/PACS/Local","AET",std::string(m_pAETLocal->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/PACS/Local","Puerto",std::string(m_pPuertoLocal->GetValue().ToUTF8()));
+        GNC::GCS::ConfigurationController::Instance()->writeBoolGeneral("/GinkgoCore/PACS/Local","useTLS",m_configLocal.useTLS);
+        GNC::GCS::ConfigurationController::Instance()->writeBoolGeneral("/GinkgoCore/PACS/Local","verifyCredentials",m_configLocal.verifyCredentials);
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/PACS/Local","privateKey",m_configLocal.privateKey);
+        GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/PACS/Local","certificate",m_configLocal.certificate);
+
+        GIL::DICOM::PACSController::Instance()->StartServer();
+
+        if(GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","remote_pacs")) {
+                wxString clave;
+                wxString valor;
+                GNC::GCS::ConfigurationController::Instance()->deleteEntryGeneral("/GinkgoCore/PACS/Servidores");
+                GNC::GCS::ConfigurationController::TListGroups pacsList;
+
+                for(TipoListaPACS::iterator it = m_servidores.begin(); it!= m_servidores.end(); ++it) {
+                        GNC::GCS::ConfigurationController::TMapValues pacs;
+                        pacs["Identificador"] = (*it)->ID;
+                        pacs["AET"] = (*it)->AET;
+                        pacs["Host"] = (*it)->HostName;
+                        pacs.insertInt("Puerto",(*it)->Port);
+                        pacs.insertInt("PDU",(*it)->PDU);
+                        pacs.insertBool("useTLS", (*it)->useTLS);
+                        pacs.insertBool("verifyCredentials", (*it)->verifyCredentials);
+                        pacs.insertInt("retrieveMethod", (*it)->retrieveMethod);
+                        pacs["wadoURI"] = (*it)->wadoURI;
+                        pacs.insertBool("reuseConnection", (*it)->reuseConnection);
+                        pacs.insertBool("retrieveSeries", (*it)->retrieveSeries);
+                        pacs["pacsUser"] = (*it)->pacsUser;
+                        pacs["pacsPass"] = (*it)->pacsPass;
+                        pacs["certificate"] = (*it)->certificate;
+                        pacs["privateKey"] = (*it)->privateKey;
+                        pacs.insertBool("isDefault", (*it)->isDefault);
+                        pacs["defaultCharset"] = (*it)->defaultCharset;
+                        //wl
+                        pacs.insertBool("useDICOMMPPS", (*it)->GetWlConfig().useDICOMMPPS);
+                        pacs.insertBool("useAbortMessage", (*it)->GetWlConfig().useAbortMessage);
+                        pacs.insertBool("useCompletedMessage", (*it)->GetWlConfig().useCompletedMessage);
+                        pacs.insertBool("useInProgressMessage", (*it)->GetWlConfig().useInProgressMessage);
+                        pacs["abortTemplate"] = (*it)->GetWlConfig().abortTemplate;
+                        pacs["completedTemplate"] = (*it)->GetWlConfig().completedTemplate;
+                        pacs["inProgressTemplate"] = (*it)->GetWlConfig().inProgressTemplate;
+                        //
+                        pacsList.push_back(pacs);
+                }
+                GNC::GCS::ConfigurationController::Instance()->writeGroupGeneral("/GinkgoCore/PACS/Servidores", pacsList, "Server");
+                DicomServerList::Instance()->Reload();
+        } else {
+                DicomServerList::Instance()->Reload();
+        }
+
+        return true;
+}
+
+//endregion
+
+void PanelConfiguracionPACS::OnAdvancedLocal(wxCommandEvent &)
+{
+        DialogoLocalPACS dlg(this);
+        dlg.SetParametros(m_configLocal);
+        dlg.ShowModal();
+        if(dlg.m_Ok) {
+                dlg.GetParametros(m_configLocal);
+                OnPropiedadCambiada();
+        }
+}
+
+void PanelConfiguracionPACS::OnListaPACSChoice(wxDataViewEvent &)
+{
+        //se carga la descripcion
+
+        bool enable = m_pListPacs->GetSelection().IsOk();
+        m_pEditButton->Enable(enable);
+        m_pDelButton->Enable(enable);
+        m_pDefaultButton->Enable(enable);
+}
+
+void PanelConfiguracionPACS::OnListaPACSDClick(wxDataViewEvent &)
+{
+        wxCommandEvent evt;
+        OnEditarClick(evt);
+}
+
+void PanelConfiguracionPACS::OnNuevoClick(wxCommandEvent &)
+{
+
+        std::list<std::string> listIdsPacs;
+        for (TipoListaPACS::iterator it = m_servidores.begin(); it != m_servidores.end(); ++it) {
+                listIdsPacs.push_back((*it)->ID);
+        }
+        DialogoServidorPACS dialogo(this, m_configLocal, m_pPuertoLocal->GetValue(), wxString::FromUTF8( GNC::Entorno::Instance()->ParseAET( std::string(m_pAETLocal->GetValue().ToUTF8()) ).c_str() ), listIdsPacs );
+        dialogo.ShowModal();
+        if(dialogo.m_Ok) {
+                GNC::GCS::Ptr<DicomServer> tuple(new DicomServer());
+                dialogo.GetParametros(*tuple);
+                tuple->isDefault = true;
+                if(m_pModel->GetCount() > 0) {
+                        wxDataViewItem item = m_pModel->GetItem(0);
+                        if (item.IsOk()) {
+                                tuple->isDefault = false;
+                        }
+                }
+                m_servidores.push_back(tuple);
+
+                wxVector<wxVariant> data;
+
+                data.push_back(wxString::FromUTF8(tuple->ID.c_str()));
+                if (tuple->isDefault) {
+                        data.push_back(_("Yes"));
+                } else {
+                        data.push_back(_("No"));
+                }
+                m_pModel->AppendItem(data);
+
+
+                wxVariant val;
+                bool notFound = true;
+                for (unsigned int i = 0; notFound && i < m_pModel->GetCount(); ++i) {
+                        m_pModel->GetItem(i);
+                        m_pModel->GetValueByRow(val, i, NAME_COLUMN_IDX);
+                        std::string stdVal(val.GetString().ToUTF8());
+                        if (stdVal == tuple->ID) {
+                                notFound = false;
+                                m_pListPacs->SelectRow(i);
+                        }
+                }
+                wxDataViewEvent evt;
+                OnListaPACSChoice(evt);
+                OnPropiedadCambiada();
+        }
+}
+
+void PanelConfiguracionPACS::OnEditarClick(wxCommandEvent &)
+{
+
+        wxDataViewItem selection = m_pListPacs->GetSelection();
+
+        if(selection.IsOk()) {
+                wxVariant val;
+                m_pModel->GetValue(val, selection, NAME_COLUMN_IDX);
+                std::string idSeleccionado(val.GetString().ToUTF8());
+
+                std::list<std::string> listIdsPacs;
+                for (TipoListaPACS::iterator it = m_servidores.begin(); it != m_servidores.end(); ++it) {
+                        if((*it)->ID != idSeleccionado) {
+                                listIdsPacs.push_back((*it)->ID);
+                        }
+                }
+
+                for(TipoListaPACS::iterator it = m_servidores.begin(); it != m_servidores.end(); ++it) {
+                        if((*it)->ID == idSeleccionado) {
+                                DialogoServidorPACS dialogo(this, m_configLocal, m_pPuertoLocal->GetValue(), wxString::FromUTF8( GNC::Entorno::Instance()->ParseAET( std::string( m_pAETLocal->GetValue().ToUTF8() ) ).c_str() ), listIdsPacs);
+                                dialogo.SetParametros(*(*it));
+
+                                dialogo.ShowModal();
+                                if(dialogo.m_Ok) {
+                                        dialogo.GetParametros(*(*it));
+                                        // Se refresca el valor
+                                        val = wxString::FromUTF8((*it)->ID.c_str());
+                                        m_pModel->SetValue(val, selection, NAME_COLUMN_IDX);
+                                        m_pModel->ItemChanged(selection);
+
+                                        wxVariant val2;
+                                        bool notFound = true;
+                                        for (unsigned int i = 0; notFound && i < m_pModel->GetCount(); ++i) {
+                                                m_pModel->GetValueByRow(val2, i, NAME_COLUMN_IDX);
+                                                if (val == val2) {
+                                                        m_pListPacs->SelectRow(i);
+                                                        break;
+                                                }
+                                        }
+
+                                        wxDataViewEvent evt;
+                                        OnListaPACSChoice(evt);
+                                        OnPropiedadCambiada();
+                                }
+                        }
+                }
+        }
+}
+
+void PanelConfiguracionPACS::OnEliminarClick(wxCommandEvent &)
+{
+
+        wxDataViewItem selection =m_pListPacs->GetSelection();
+
+        if(selection.IsOk()) {
+                wxVariant val;
+                m_pModel->GetValue(val, selection, NAME_COLUMN_IDX);
+                std::string idSeleccionado(val.GetString().ToUTF8());
+
+                int answer = wxMessageBox(_("Confirm the removal of the node") + wxT(" ") + wxString::FromUTF8(idSeleccionado.c_str()), _("Data modified"), wxYES_NO | wxCANCEL, this);
+                if(answer == wxYES) {
+                        for(TipoListaPACS::iterator it = m_servidores.begin(); it != m_servidores.end(); ++it) {
+                                if((*it)->ID == idSeleccionado) {
+
+                                        bool notFound = true;
+                                        for (unsigned int i = 0; notFound && i < m_pModel->GetCount(); ++i) {
+                                                wxDataViewItem item = m_pModel->GetItem(i);
+
+                                                wxVariant val2;
+                                                m_pModel->GetValue(val2, item, NAME_COLUMN_IDX);
+                                                if (val == val2) {
+                                                        notFound = false;
+                                                        m_pModel->DeleteItem(i);
+                                                }
+                                        }
+                                        m_servidores.erase(it);
+                                        break;
+                                }
+                        }
+                        m_pListPacs->Refresh();
+                        wxDataViewEvent evt;
+                        OnListaPACSChoice(evt);
+                        OnPropiedadCambiada();
+                }
+        }
+}
+
+void PanelConfiguracionPACS::OnSetDefaultClick(wxCommandEvent &)
+{
+
+        wxDataViewItem selection = m_pListPacs->GetSelection();
+        if(selection.IsOk()) {
+                wxVariant val;
+                m_pModel->GetValue(val, selection, NAME_COLUMN_IDX);
+                std::string idSeleccionado(val.GetString().ToUTF8());
+
+                for(TipoListaPACS::iterator it = m_servidores.begin(); it != m_servidores.end(); ++it) {
+                        TipoListaPACS::value_type& item = (*it);
+                        if(item->ID == idSeleccionado) {
+                                item->isDefault = true;
+                        } else {
+                                item->isDefault = false;
+                        }
+                }
+
+                wxDataViewItemArray items;
+
+                for (unsigned int i = 0; i < m_pModel->GetCount(); ++i) {
+                        wxVariant val2;
+                        wxDataViewItem item = m_pModel->GetItem(i);
+                        m_pModel->GetValue(val2, item, NAME_COLUMN_IDX);
+
+                        if (val == val2) {
+                                m_pModel->SetValue(_("Yes"), item, USE_BY_DEFAULT_COLUMN_IDX);
+                        } else {
+                                m_pModel->SetValue(_("No"), item, USE_BY_DEFAULT_COLUMN_IDX);
+                        }
+                        items.Add(item);
+                }
+                m_pModel->ItemsChanged(items);
+
+                wxDataViewEvent evt;
+                OnListaPACSChoice(evt);
+                OnPropiedadCambiada();
+        }
+
+}
+
+void PanelConfiguracionPACS::OnTextoCambiado(wxCommandEvent & )
+{
+        m_pAETReal->SetLabel(wxString::FromUTF8( GNC::Entorno::Instance()->ParseAET(std::string(m_pAETLocal->GetValue().ToUTF8())).c_str() ));
+        OnPropiedadCambiada();
+}
+
+void PanelConfiguracionPACS::OnSize(wxSizeEvent & event)
+{
+        wxSize oldSize = m_staticTextExplicacion->GetSize();
+        Freeze();
+        m_staticTextExplicacion->Freeze();
+        m_staticTextExplicacion->SetLabel(_("You must configure the local AET, which is used to communicate with the DICOM nodes. The specified port must be opened in the firewall, as it is essential for transfers."));
+        m_staticTextExplicacion->Wrap( event.GetSize().x-25 );
+        m_staticTextExplicacion->Thaw();
+        //Layout();
+        Thaw();
+        wxSize newSize = m_staticTextExplicacion->GetSize();
+        if (newSize != oldSize) {
+                Layout();
+                event.Skip(false);
+        } else {
+                event.Skip(true);
+        }
+}
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionpacs.h b/cadxcore/main/gui/configuration/panelconfiguracionpacs.h
new file mode 100644
index 0000000..39f8ad9
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionpacs.h
@@ -0,0 +1,93 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <vector>
+
+#include <api/autoptr.h>
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+#include <main/controllers/dcmtk/dicomservers.h>
+
+namespace GNC
+{
+namespace GUI
+{
+
+class PanelConfiguracionPACS: public PanelConfiguracionPACSBase, public IPasoConfiguracion
+{
+public:
+        PanelConfiguracionPACS(wxWindow* pParent, IDialogoConfiguracion* pDialogo);
+        ~PanelConfiguracionPACS();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+        typedef struct TipoConfigLocal {
+                bool useTLS;
+                bool verifyCredentials;
+                std::string privateKey;
+                std::string certificate;
+
+                TipoConfigLocal() :
+                        useTLS(false),
+                        verifyCredentials(false)
+                {
+                }
+        } TipoConfigLocal;
+protected:
+        virtual void OnAdvancedLocal(wxCommandEvent &event);
+
+        virtual void OnListaPACSChoice(wxDataViewEvent &event);
+
+        virtual void OnListaPACSDClick(wxDataViewEvent &event);
+
+        virtual void OnNuevoClick(wxCommandEvent &event);
+
+        virtual void OnEditarClick(wxCommandEvent &event);
+
+        virtual void OnEliminarClick(wxCommandEvent &event);
+
+        virtual void OnSetDefaultClick(wxCommandEvent &event);
+
+        virtual void OnTextoCambiado(wxCommandEvent &event );
+
+        void OnSize(wxSizeEvent &);
+
+        wxObjectDataPtr<wxDataViewListStore> m_pModel;
+        typedef std::vector<GNC::GCS::Ptr<DicomServer> > TipoListaPACS;
+        TipoListaPACS m_servidores;
+        TipoConfigLocal m_configLocal;
+
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionpermisos.cpp b/cadxcore/main/gui/configuration/panelconfiguracionpermisos.cpp
new file mode 100644
index 0000000..e4b8ba8
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionpermisos.cpp
@@ -0,0 +1,690 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+#include <sstream>
+#include <limits>
+
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/valtext.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <wx/mstream.h>
+
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/log.h>
+#include <wx/busyinfo.h>
+#include <wx/xml/xml.h>
+#include <wx/sstream.h>
+#include <wx/log.h>
+#include <wx/menu.h>
+
+#include <wx/tokenzr.h>
+
+#include "panelconfiguracionpermisos.h"
+
+#include <sstream>
+
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/entorno.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+#define SEPARADOR "|"
+
+#define COL_NAME			  0
+#define COL_VALUE			  1
+#define COL_DEFAULT_VALUE     2
+
+#define PERM_COL_NAME_IDX     0
+#define PERM_COL_NAME_WIDTH   340
+#define PERM_COL_ACTIVE_IDX   1
+#define PERM_COL_ACTIVE_WIDTH 80
+#define PERM_COL_XML	     2
+
+#define COLOUR_ACTIVE wxColour(10,174,10)
+#define COLOUR_INACTIVE wxColour(174,10,10)
+#define COLOUR_SET_BY_USER wxColour(229,137,39)
+
+namespace GNC
+{
+namespace GUI
+{
+
+class ProfileDialog: public ProfileDialogBase
+{
+        typedef struct TipoPermiso {
+                std::string clave;
+                bool valor;
+
+                TipoPermiso() :
+                        clave(),
+                        valor(false)
+                {
+                }
+
+                TipoPermiso(const std::string& _clave, bool _valor) :
+                        clave(_clave),
+                        valor(_valor)
+                {
+                }
+        } TipoPermiso;
+        typedef std::map <std::string, GNC::GCS::Permisos::EstadoPermiso> TipoMapaPermisos;
+
+public:
+        ProfileDialog(wxWindow* pParent, std::list<std::string>& listaNombres, bool isnew = false) :
+                ProfileDialogBase(pParent),
+                m_Ok(false),
+                m_listaNombres(listaNombres)
+        {
+
+                if (isnew) {
+
+                        long     idNombreAutomatico = 0;
+                        std::string profile_template = _Std("Profile");
+
+                        for (std::list<std::string>::iterator it = listaNombres.begin(); it != listaNombres.end(); ++it) {
+                                std::istringstream is (*it);
+                                std::string t_name;
+                                long id = -1;
+                                is >> t_name >> id;
+
+                                if (!is.fail() && t_name == profile_template && id > 0) {
+                                        idNombreAutomatico = std::max<long>(id, idNombreAutomatico);
+                                }
+
+                        }
+                        {
+                                std::ostringstream os;
+                                os << profile_template << " " << (idNombreAutomatico + 1);
+                                m_pName->SetValue( wxString::FromUTF8( os.str().c_str() ) );
+                        }
+                }
+
+                const GNC::ControladorPermisos::TipoMapaDefiniciones& definiciones = GNC::ControladorPermisos::Instance()->GetMapaDefiniciones();
+
+                //cargamos los permisos "publicos" definidos
+                std::string ultimaCategoria = "";
+                wxPGProperty* cat = NULL;
+                m_pGridPermisos->SetColumnCount(3);
+
+                m_pGridPermisos->SetColumnProportion(COL_NAME, 3);
+                m_pGridPermisos->SetColumnProportion(COL_VALUE, 4);
+                m_pGridPermisos->SetColumnProportion(COL_DEFAULT_VALUE, 2);
+
+
+                for(GNC::ControladorPermisos::TipoMapaDefiniciones::const_iterator it = definiciones.begin(); it != definiciones.end(); ++it) {
+                        if(!(*it).second.privado) {
+                                if ((*it).second.espacioNombres != ultimaCategoria) {
+                                        ultimaCategoria = (*it).second.espacioNombres;
+                                        cat = m_pGridPermisos->Append(new wxPropertyCategory(wxString::FromUTF8((*it).second.descripcionNamespace.c_str()),wxString::FromUTF8(ultimaCategoria.c_str())));
+                                }
+                                std::string clave = (*it).second.espacioNombres + SEPARADOR + (*it).second.id;
+                                wxLongStringProperty* propValue = new wxLongStringProperty(wxString::FromUTF8((*it).second.descripcion.c_str()), wxString::FromUTF8(clave.c_str()), wxString::FromUTF8((*it).second.valorPorDefecto.c_str()));
+                                wxPGProperty* prop = cat->AppendChild(propValue);
+                                m_pGridPermisos->SetPropertyCell(prop, COL_DEFAULT_VALUE, _("Default value"));
+                                SetPropertyActive(prop, (*it).second.activoPorDefecto);
+                        }
+                }
+
+                m_pGridPermisos->GetRoot()->SetFlagRecursively(wxPG_PROP_NO_ESCAPE, true);
+                m_pGridPermisos->Connect(wxEVT_PG_DOUBLE_CLICK, wxPropertyGridEventHandler( ProfileDialog::OnPgDoubleClick ), NULL, this );
+                m_pGridPermisos->Connect(wxEVT_PG_RIGHT_CLICK, wxPropertyGridEventHandler( ProfileDialog::OnPgMenu ), NULL, this );
+        }
+
+        ~ProfileDialog()
+        {
+
+        }
+
+        void GetParametros(std::string &nombre, std::string &xml)
+        {
+                nombre = std::string(m_pName->GetValue().ToUTF8());
+
+                wxXmlDocument doc;
+                wxXmlNode* root = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("permisos"));
+                doc.SetRoot(root);
+
+                //transformamos lo que esta viendo el usuario a un xml...
+                for(wxPropertyGridIterator it = m_pGridPermisos->GetIterator(); !it.AtEnd(); it.Next()) {
+                        wxPGProperty* pProperty = it.GetProperty();
+
+                        wxString clave = pProperty->GetName();
+
+                        wxStringTokenizer tkz(clave, wxString::FromUTF8(SEPARADOR));
+                        std::string espacioNombres ="", id="";
+                        if ( tkz.HasMoreTokens() ) {
+                                espacioNombres = tkz.GetNextToken().ToUTF8();
+                                if (tkz.HasMoreTokens()) {
+                                        id = tkz.GetNextToken().ToUTF8();
+                                }
+                        }
+
+                        if (id != "" && espacioNombres != "") {
+
+                                std::string stdclave( espacioNombres + "." + id );
+
+                                std::string accion;
+
+                                if (IsPropertyActive(pProperty)) {
+                                        accion = "activar";
+                                } else {
+                                        accion = "desactivar";
+                                }
+
+                                std::string val(pProperty->GetValueAsString().ToUTF8());
+
+                                std::string activopordefecto = "true";
+
+                                GNC::ControladorPermisos::TipoMapaDefiniciones mapa = GNC::ControladorPermisos::Instance()->GetMapaDefiniciones();
+                                GNC::ControladorPermisos::TipoMapaDefiniciones::iterator it = mapa.find(stdclave);
+                                GNC::ControladorPermisos::TipoDefinicionPermiso def;
+
+                                if (it != mapa.end()) {
+                                        def = (*it).second;
+                                }
+
+                                if (!def.activoPorDefecto) {
+                                        activopordefecto = "false";
+                                }
+
+                                wxXmlNode* permiso = new wxXmlNode(root, wxXML_ELEMENT_NODE, wxT("permiso"));
+                                permiso->AddAttribute(wxT("id"), wxString::FromUTF8(id.c_str()));
+                                permiso->AddAttribute(wxT("namespace"), wxString::FromUTF8(espacioNombres.c_str()));
+                                permiso->AddAttribute(wxT("accion"), wxString::FromUTF8(accion.c_str()));
+                                permiso->AddAttribute(wxT("activopordefecto"), wxString::FromUTF8(activopordefecto.c_str()));
+
+
+                                wxXmlNode* data = new wxXmlNode(permiso, wxXML_ELEMENT_NODE, wxT("default_value"));
+                                data = new wxXmlNode(data, wxXML_CDATA_SECTION_NODE, wxT("default_value"));
+                                data->SetContent(wxString::FromUTF8(def.valorPorDefecto.c_str()));
+                                data = new wxXmlNode(permiso, wxXML_ELEMENT_NODE, wxT("value"));
+                                data = new wxXmlNode(data, wxXML_CDATA_SECTION_NODE, wxT("value"));
+                                data->SetContent(wxString::FromUTF8(val.c_str()));
+                        }
+                }
+                wxMemoryOutputStream out;
+                doc.SetFileEncoding(wxT("UTF-8"));
+                doc.Save(out,0);
+                char* vectorWidgets = new char[out.GetLength()];
+                out.CopyTo(vectorWidgets,out.GetLength());
+                xml = std::string(vectorWidgets, out.GetLength());
+                delete[] vectorWidgets;
+        }
+
+        virtual void OnPgDoubleClick(wxPropertyGridEvent &event)
+        {
+                if (event.GetProperty() == NULL || event.GetProperty()->IsCategory())
+                        return;
+                wxPGProperty* prop = event.GetProperty();
+                SetPropertyActive(prop, !IsPropertyActive(prop));
+        }
+
+        bool IsPropertyActive(wxPGProperty* pProp)
+        {
+                wxColour col = pProp->GetCell(COL_NAME).GetFgCol();
+                return col == COLOUR_ACTIVE;
+        }
+
+        void SetPropertyActive(wxPGProperty* pProp, bool value)
+        {
+                if (value) {
+                        m_pGridPermisos->SetPropertyCell(pProp, COL_NAME, pProp->GetLabel(), GinkgoResourcesManager::MenuIcons::GetIcoTick(), COLOUR_ACTIVE);
+                } else {
+                        m_pGridPermisos->SetPropertyCell(pProp, COL_NAME, pProp->GetLabel(), GinkgoResourcesManager::MenuIcons::GetIcoCross(), COLOUR_INACTIVE);
+                }
+                m_pGridPermisos->RefreshProperty(pProp);
+        }
+
+        virtual void OnPgMenu(wxPropertyGridEvent &event)
+        {
+                if (event.GetProperty() == NULL || event.GetProperty()->IsCategory())
+                        return;
+                wxPGProperty* prop = event.GetProperty();
+                bool isActive = IsPropertyActive(prop);
+                wxMenu menu;
+                wxMenuItem* pActive = menu.Append(0, _("Active"), _("Set property active"), wxITEM_CHECK);
+                wxMenuItem* pInactive = menu.Append(1, _("Inactive"), _("Set property inactive"), wxITEM_CHECK);
+                wxMenuItem* pDefault = menu.Append(2, _("Default value"), _("Set default value"), wxITEM_NORMAL);
+                if (isActive) {
+                        pActive->Check(true);
+                        pInactive->Check(false);
+                } else {
+                        pActive->Check(false);
+                        pInactive->Check(true);
+                }
+                menu.Connect(pActive->GetId(),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ProfileDialog::OnActiveSelectedProperty ), NULL, this );
+                menu.Connect(pInactive->GetId(),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ProfileDialog::OnDesactiveSelectedProperty ), NULL, this );
+                menu.Connect(pDefault->GetId(),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( ProfileDialog::OnSetDefaultSelected ), NULL, this );
+                m_pGridPermisos->PopupMenu(&menu);
+        }
+
+        void OnActiveSelectedProperty(wxCommandEvent&)
+        {
+                wxPGProperty* prop = m_pGridPermisos->GetSelectedProperty();
+                if (prop != NULL) {
+                        SetPropertyActive(prop, true);
+                }
+        }
+
+        void OnDesactiveSelectedProperty(wxCommandEvent&)
+        {
+                wxPGProperty* prop = m_pGridPermisos->GetSelectedProperty();
+                if (prop != NULL) {
+                        SetPropertyActive(prop, false);
+                }
+        }
+
+        void OnSetDefaultSelected(wxCommandEvent&)
+        {
+                wxPGProperty* prop = m_pGridPermisos->GetSelectedProperty();
+                if (prop != NULL) {
+                        wxString clave = prop->GetName();
+
+                        wxStringTokenizer tkz(clave, wxString::FromUTF8(SEPARADOR));
+                        std::string espacioNombres ="", id="";
+                        if ( tkz.HasMoreTokens() ) {
+                                espacioNombres = tkz.GetNextToken().ToUTF8();
+                                if (tkz.HasMoreTokens()) {
+                                        id = tkz.GetNextToken().ToUTF8();
+                                }
+                        }
+                        if (id != "" && espacioNombres != "") {
+                                std::string stdclave( espacioNombres + "." + id );
+                                std::string val(prop->GetValueAsString().ToUTF8());
+
+                                GNC::ControladorPermisos::TipoMapaDefiniciones mapa = GNC::ControladorPermisos::Instance()->GetMapaDefiniciones();
+                                GNC::ControladorPermisos::TipoMapaDefiniciones::iterator it = mapa.find(stdclave);
+                                GNC::ControladorPermisos::TipoDefinicionPermiso def;
+
+                                if (it != mapa.end()) {
+                                        def = (*it).second;
+                                }
+
+                                prop->SetValue(wxString::FromUTF8(def.valorPorDefecto.c_str()));
+                                m_pGridPermisos->SetPropertyCell(prop, COL_DEFAULT_VALUE, _("Default value"), wxNullBitmap, wxColour(0,0,0));
+                                SetPropertyActive(prop, def.activoPorDefecto);
+                        }
+                }
+        }
+
+        void SetParametros(const std::string &nombre, const std::string &xml)
+        {
+                m_nombreEditar = nombre;
+                m_pName->SetValue(wxString::FromUTF8(nombre.c_str()));
+
+                TipoMapaPermisos mapa = GetPermisosFromXml(xml);
+
+                for(wxPropertyGridIterator it = m_pGridPermisos->GetIterator(); !it.AtEnd(); it.Next()) {
+                        wxPGProperty* pProperty = it.GetProperty();
+                        if(pProperty != NULL) {
+
+                                TipoMapaPermisos::iterator itp = mapa.find(std::string(pProperty->GetName().ToUTF8()));
+                                if (itp != mapa.end()) {
+                                        GNC::GCS::Permisos::EstadoPermiso& perm = (*itp).second;
+                                        SetPropertyActive(pProperty, perm);
+
+                                        pProperty->SetValue( wxString::FromUTF8(perm.GetRawValue().c_str()) );
+                                        if (perm.TieneValorPorDefecto()) {
+                                                m_pGridPermisos->SetPropertyCell(pProperty, COL_DEFAULT_VALUE, _("Default value"), wxNullBitmap, wxColour(0,0,0));
+                                        } else {
+                                                m_pGridPermisos->SetPropertyCell(pProperty, COL_DEFAULT_VALUE, _("Set by user"), wxNullBitmap, COLOUR_SET_BY_USER);
+                                        }
+                                }
+
+                        }
+                }
+                //free memory
+        }
+
+        TipoMapaPermisos GetPermisosFromXml(const std::string& stdCadena)
+        {
+                TipoMapaPermisos permisos;
+                try {
+                        GNC::ControladorPermisos::TipoMapaPermisosNamespace mapaPermisosNamespace = GNC::ControladorPermisos::Instance()->GetPermisosFromXML(stdCadena);
+                        for( GNC::ControladorPermisos::TipoIteradorMapaPermisosNamespace itNames = mapaPermisosNamespace.begin(); itNames != mapaPermisosNamespace.end(); ++itNames ) {
+                                for( GNC::ControladorPermisos::TipoIteradorMapaPermisos itPermisos = (*itNames).second->begin(); itPermisos != (*itNames).second->end(); ++itPermisos) {
+                                        permisos[itNames->first + SEPARADOR + itPermisos->first] = itPermisos->second;
+                                }
+                                delete (*itNames).second;
+                        }
+                } catch (GNC::GCS::ControladorPermisosException& ce) {
+                        LOG_WARN("GestionPermisos", "Existe en la configuración un xml de permisos mal formado " << ce.GetCause());
+                }
+                return permisos;
+        }
+
+        virtual void OnCancelClick(wxCommandEvent &)
+        {
+                EndModal(wxID_CANCEL);
+        }
+
+        virtual void OnOkClick(wxCommandEvent &)
+        {
+                if (Validar()) {
+                        m_Ok=true;
+                        EndModal(wxID_OK);
+                }
+        }
+
+        bool Validar()
+        {
+                if(m_pName->GetValue() != wxEmptyString) {
+                        //no puede duplicar un nombre que esté en la lista y que no sea el mismo
+                        std::string nombre (m_pName->GetValue().ToUTF8());
+                        if (nombre != m_nombreEditar) {
+                                for (std::list<std::string>::iterator it = m_listaNombres.begin(); it != m_listaNombres.end(); ++it) {
+                                        if ((*it) == nombre) {
+                                                wxMessageBox(_("Profile name can't be repeated"),_("Info"),wxOK | wxICON_INFORMATION, this);
+                                                return false;
+                                        }
+                                }
+                        }
+                        return true;
+                } else {
+                        wxMessageBox(_("You must fill in name field to continue"),_("Info"),wxOK | wxICON_INFORMATION, this);
+                }
+                return false;
+        }
+
+        bool m_Ok;
+        std::list<std::string> m_listaNombres;
+        std::string m_nombreEditar;
+};
+
+
+////////////////-------------------------------------------------------------------------------------/////////////////////////////
+
+PanelConfiguracionPermisos::PanelConfiguracionPermisos(wxWindow* pParent,IDialogoConfiguracion* pDialogo): PanelConfiguracionPermisosBase(pParent), IPasoConfiguracion(pDialogo)
+{
+        m_pModel = new wxDataViewListStore();
+        m_pListProfiles->AssociateModel(m_pModel.get());
+
+        m_pListProfiles->AppendColumn( new wxDataViewColumn( _("Name"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), PERM_COL_NAME_IDX, PERM_COL_NAME_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListProfiles->AppendColumn( new wxDataViewColumn( _("Active"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), PERM_COL_ACTIVE_IDX, PERM_COL_ACTIVE_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+
+        Recargar();
+        m_permisosCambiados = false;
+
+        m_pListProfiles->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( PanelConfiguracionPermisos::OnListaPermisosChangeSelection ), NULL, this );
+        m_pListProfiles->Connect(wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( PanelConfiguracionPermisos::OnListaPermisosDClick ), NULL, this );
+
+}
+
+PanelConfiguracionPermisos::~PanelConfiguracionPermisos()
+{
+}
+
+void PanelConfiguracionPermisos::Recargar()
+{
+        GNC::GCS::ConfigurationController::TListGroups profiles;
+        GNC::GCS::ConfigurationController::Instance()->readGroupGeneral("/GinkgoCore/Profiles", profiles);
+
+        std::string strTmp, xml;
+        bool apply;
+        bool primero =true;
+        m_pListProfiles->DeleteAllItems();
+
+        wxVector<wxVariant> data;
+
+        for (GNC::GCS::ConfigurationController::TListGroups::iterator it = profiles.begin(); it != profiles.end(); ++it) {
+                GNC::GCS::ConfigurationController::TListGroups::value_type tuple = (*it);
+                data.clear();
+
+                tuple.readStringValue("Name", strTmp);
+                data.push_back(wxString::FromUTF8(strTmp.c_str()));
+                tuple.readBoolValue("Apply", apply, false);
+                if(apply) {
+                        data.push_back(_("Yes"));
+                } else {
+                        data.push_back(_("No"));
+                }
+                tuple.readStringValue("XML", xml);
+                data.push_back(wxString::FromUTF8(xml.c_str()));
+
+                m_pModel->AppendItem(data);
+
+                if(primero) {
+                        if(m_pModel->GetCount() > 0) {
+                                wxDataViewItem item = m_pModel->GetItem(0);
+                                if (item.IsOk()) {
+                                        m_pListProfiles->SelectRow(0);
+                                }
+                        }
+                        m_pBEdit->Enable(true);
+                        m_pBDelete->Enable(true);
+                        m_pBActive->Enable(true);
+                        primero = false;
+                }
+        }
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* PanelConfiguracionPermisos::GetPanel()
+{
+        return this;
+}
+
+std::string PanelConfiguracionPermisos::GetTitle()
+{
+        return _Std("Profiles");
+}
+
+std::string PanelConfiguracionPermisos::GetCabecera()
+{
+        return _Std("Profiles Settings");
+}
+
+bool PanelConfiguracionPermisos::Validar()
+{
+        bool ok = true;
+        //si modificado... los cambios se recargaran ahora pero puede haber incongruencias
+        if(m_permisosCambiados) {
+                GNC::ControladorPermisos::FreeInstance();
+                wxMessageBox(_("Ginkgo CADx must restart for the permission changes to take effect"),_("Info"));
+        }
+        return ok;
+}
+
+bool PanelConfiguracionPermisos::Guardar()
+{
+        GNC::GCS::ConfigurationController::Instance()->deleteEntryGeneral("/GinkgoCore/Profiles");
+        GNC::GCS::ConfigurationController::TListGroups profiles;
+
+        for (unsigned int i = 0; i< m_pModel->GetItemCount(); i++) {
+                GNC::GCS::ConfigurationController::TMapValues profile;
+                wxVariant value;
+                m_pModel->GetValueByRow(value, i, PERM_COL_NAME_IDX);
+                profile["Name"] = value.GetString().ToUTF8();
+                m_pModel->GetValueByRow(value, i, PERM_COL_ACTIVE_IDX);
+                profile.insertBool("Apply", value.GetString().CompareTo(_("Yes")) == 0);
+                m_pModel->GetValueByRow(value, i, PERM_COL_XML);
+                profile["XML"] = value.GetString().ToUTF8();
+                profiles.push_back(profile);
+        }
+        GNC::GCS::ConfigurationController::Instance()->writeGroupGeneral("/GinkgoCore/Profiles", profiles, "Profile");
+
+        return true;
+}
+//endregion
+
+
+void PanelConfiguracionPermisos::OnListaPermisosDClick(wxDataViewEvent& )
+{
+        wxCommandEvent evt;
+        OnEditarClick(evt);
+}
+
+void PanelConfiguracionPermisos::OnListaPermisosChangeSelection(wxDataViewEvent& event)
+{
+        if(event.GetItem().IsOk()) {
+                m_pBEdit->Enable(true);
+                m_pBDelete->Enable(true);
+                m_pBActive->Enable(true);
+        } else {
+                m_pBEdit->Enable(false);
+                m_pBDelete->Enable(false);
+                m_pBActive->Enable(false);
+        }
+}
+
+void PanelConfiguracionPermisos::OnSetActive(wxCommandEvent &)
+{
+        wxDataViewItem selection = m_pListProfiles->GetSelection();
+        if (selection.IsOk()) {
+                wxDataViewItemArray items;
+                for (unsigned int i = 0; i < m_pModel->GetCount(); ++i) {
+                        wxDataViewItem item = m_pModel->GetItem(i);
+                        m_pModel->SetValue(_("No"), item, PERM_COL_ACTIVE_IDX);
+                        items.Add(item);
+                }
+                m_pModel->SetValue(_("Yes"), selection, PERM_COL_ACTIVE_IDX);
+                m_pModel->ItemsChanged(items);
+
+                OnPropiedadCambiada();
+        }
+}
+
+void PanelConfiguracionPermisos::OnNuevoClick(wxCommandEvent &)
+{
+        //se le pasa la lista de identificadores para que no duplique
+
+        std::list<std::string> listaNombres;
+        wxVariant val;
+        for (unsigned int i = 0; i < m_pModel->GetCount(); ++i) {
+                m_pModel->GetValueByRow(val, i, PERM_COL_NAME_IDX);
+                listaNombres.push_back(std::string(val.GetString().ToUTF8()));
+        }
+
+        ProfileDialog dialogo(this, listaNombres, true);
+        dialogo.ShowModal();
+        if(dialogo.m_Ok) {
+                std::string name, xml;
+                dialogo.GetParametros(name, xml);
+                bool apply = true;
+                if(m_pModel->GetCount() > 0) {
+                        wxDataViewItem item = m_pModel->GetItem(0);
+                        if (item.IsOk()) {
+                                apply = false;
+                        }
+                }
+
+                wxVector<wxVariant> data;
+                data.push_back(wxString::FromUTF8(name.c_str()));
+                if (apply) {
+                        data.push_back(_("Yes"));
+                } else {
+                        data.push_back(_("No"));
+                }
+                data.push_back(wxString::FromUTF8(xml.c_str()));
+                m_pModel->AppendItem(data);
+
+
+                wxVariant val;
+                bool notFound = true;
+                for (unsigned int i = 0; notFound && i < m_pModel->GetCount(); ++i) {
+                        m_pModel->GetItem(i);
+                        m_pModel->GetValueByRow(val, i, PERM_COL_NAME_IDX);
+                        std::string stdVal(val.GetString().ToUTF8());
+                        if (stdVal == name) {
+                                notFound = false;
+                                m_pListProfiles->SelectRow(i);
+                        }
+                }
+
+                OnPropiedadCambiada();
+        }
+}
+
+void PanelConfiguracionPermisos::OnEditarClick(wxCommandEvent &)
+{
+
+        wxDataViewItem selection = m_pListProfiles->GetSelection();
+
+        if (selection.IsOk()) {
+                wxVariant val;
+                //se le pasa la lista de identificadores para que no duplique
+                std::list<std::string> listaNombres;
+                for (unsigned int i = 0; i < m_pModel->GetCount(); ++i) {
+                        m_pModel->GetValueByRow(val, i, PERM_COL_NAME_IDX);
+                        listaNombres.push_back(std::string(val.GetString().ToUTF8()));
+                }
+
+                ProfileDialog dialogo(this, listaNombres);
+
+                m_pModel->GetValue(val, selection, PERM_COL_NAME_IDX);
+                std::string name(val.GetString().ToUTF8());
+                m_pModel->GetValue(val, selection, PERM_COL_XML);
+                std::string xml(val.GetString().ToUTF8());
+
+                dialogo.SetParametros(name, xml);
+
+                dialogo.ShowModal();
+                if(dialogo.m_Ok) {
+                        dialogo.GetParametros( name, xml);
+                        m_pModel->SetValue(wxVariant(wxString::FromUTF8(name.c_str())), selection, PERM_COL_NAME_IDX);
+                        m_pModel->SetValue(wxVariant(wxString::FromUTF8(xml.c_str())), selection, PERM_COL_XML);
+                        m_pModel->ItemChanged(selection);
+                        OnPropiedadCambiada();
+                }
+        }
+}
+
+void PanelConfiguracionPermisos::OnEliminarClick(wxCommandEvent &)
+{
+
+        wxDataViewItem selection = m_pListProfiles->GetSelection();
+
+        if(selection.IsOk()) {
+
+                wxVariant val;
+                m_pModel->GetValue(val, selection, PERM_COL_NAME_IDX);
+                std::string idSeleccionado(val.GetString().ToUTF8());
+
+
+                int answer = wxMessageBox(_("Confirm the removal of the profile ") + wxString::FromUTF8(idSeleccionado.c_str()), _("Data modified"), wxYES_NO | wxCANCEL, this);
+                if(answer == wxYES) {
+                        m_pModel->DeleteItem(m_pListProfiles->GetSelectedRow());
+                        OnPropiedadCambiada();
+                }
+        }
+}
+
+void PanelConfiguracionPermisos::OnPropiedadCambiada()
+{
+        m_permisosCambiados = true;
+        IPasoConfiguracion::OnPropiedadCambiada();
+}
+
+void PanelConfiguracionPermisos::OnTextoCambiado(wxCommandEvent & )
+{
+}
+
+void PanelConfiguracionPermisos::OnSize(wxSizeEvent & event)
+{
+        event.Skip(true);
+}
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionpermisos.h b/cadxcore/main/gui/configuration/panelconfiguracionpermisos.h
new file mode 100644
index 0000000..9838677
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionpermisos.h
@@ -0,0 +1,77 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+#include <string>
+#include <vector>
+
+namespace GNC
+{
+namespace GUI
+{
+
+class PanelConfiguracionPermisos: public PanelConfiguracionPermisosBase, public IPasoConfiguracion
+{
+public:
+        PanelConfiguracionPermisos(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~PanelConfiguracionPermisos();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+
+protected:
+        virtual void OnListaPermisosDClick(wxDataViewEvent& event);
+        virtual void OnListaPermisosChangeSelection(wxDataViewEvent& event);
+
+        virtual void OnSetActive(wxCommandEvent &event);
+
+        virtual void OnNuevoClick(wxCommandEvent &event);
+
+        virtual void OnEditarClick(wxCommandEvent &event);
+
+        virtual void OnEliminarClick(wxCommandEvent &event);
+
+        virtual void OnTextoCambiado(wxCommandEvent &event );
+
+        virtual void OnPropiedadCambiada();
+
+        void OnSize(wxSizeEvent &);
+
+        wxObjectDataPtr<wxDataViewListStore> m_pModel;
+
+        bool m_permisosCambiados;
+
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionseguridad.cpp b/cadxcore/main/gui/configuration/panelconfiguracionseguridad.cpp
new file mode 100644
index 0000000..d9ef511
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionseguridad.cpp
@@ -0,0 +1,369 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+#include <sstream>
+#include <limits>
+
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <wx/mstream.h>
+#include <wx/imaglist.h>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/log.h>
+#include <wx/busyinfo.h>
+#include <wx/log.h>
+
+#include <wx/tokenzr.h>
+
+#include "panelconfiguracionseguridad.h"
+
+#include <sstream>
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/controladorautenticacion.h>
+#include <main/entorno.h>
+#include <api/internationalization/internationalization.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class UserDialog: public UserDialogBase
+{
+public:
+        //nuevo usuario
+        UserDialog(wxWindow* pParent, GNC::GCS::Ptr<wxSQLite3Database> pConexion): UserDialogBase(pParent)
+        {
+                SetTitle(_("New User"));
+                m_pHeader->SetToolTip(_("New User"));
+                m_pFormPanel->SetToolTip(_("New User"));
+                m_pSesionControlador = pConexion;
+                m_pTCUsuario->SetFocus();
+        }
+
+        //cambiar password
+        UserDialog(wxWindow* pParent, const wxString& nombreUsuario, GNC::GCS::Ptr<wxSQLite3Database> pConexion): UserDialogBase(pParent)
+        {
+                m_pTCUsuario->Enable(false);
+                m_pTCUsuario->SetValue(nombreUsuario);
+                m_pSesionControlador = pConexion;
+                m_pTCPassword0->SetFocus();
+        }
+
+        void HideUserName()
+        {
+                m_pTCUsuario->Show(false);
+                m_pLabelUser->Show(false);
+                m_pFormPanel->Layout();
+        }
+
+        std::string GetPassword()
+        {
+                return std::string(m_pTCPassword0->GetValue().ToUTF8());
+        }
+
+        std::string GetUser()
+        {
+                return std::string(m_pTCUsuario->GetValue().ToUTF8());
+        }
+
+        virtual void OnOkClick(wxCommandEvent& )
+        {
+                //TODO hacer comprobaciones mejores sobre el password...
+
+                if (m_pTCUsuario->IsEnabled() && m_pTCUsuario->IsShown()) {
+                        if (m_pTCUsuario->GetValue().size() < 4) {
+                                wxMessageBox(_("User name has to contain at least 4 characters"),_("Info"), wxOK | wxICON_INFORMATION, this);
+                                m_pTCUsuario->SelectAll();
+                                return;
+                        }
+
+                        std::string user(m_pTCUsuario->GetValue().ToUTF8());
+                        if (GSEC::Auth::ControladorAutenticacion::Instance()->ExisteUsuario(user, m_pSesionControlador)) {
+                                wxMessageBox(_("User name repeated"),_("Info"), wxOK | wxICON_INFORMATION, this);
+                                m_pTCUsuario->SelectAll();
+                                return;
+                        }
+                }
+
+                if (m_pTCPassword0->GetValue() != m_pTCPassword1->GetValue()) {
+                        wxMessageBox(_("Password and confirm password can't be different."),_("Info"), wxOK | wxICON_INFORMATION, this);
+                        m_pTCPassword1->SetValue(wxEmptyString);
+                        m_pTCPassword0->SetFocus();
+                        m_pTCPassword0->SelectAll();
+                        return;
+                }
+
+                if (m_pTCPassword0->GetValue().size() < 6) {
+                        wxMessageBox(_("Password has to contain at least 6 characters"),_("Info"), wxOK | wxICON_INFORMATION, this);
+                        m_pTCPassword0->SetFocus();
+                        m_pTCPassword0->SelectAll();
+                        return;
+                }
+
+                EndModal(wxID_OK);
+        }
+
+        GNC::GCS::Ptr<wxSQLite3Database> m_pSesionControlador;
+
+};
+
+
+
+PanelConfiguracionSeguridad::PanelConfiguracionSeguridad(wxWindow* pParent,IDialogoConfiguracion* pDialogo): PanelConfiguracionSeguridadBase(pParent), IPasoConfiguracion(pDialogo)
+{
+        m_pSesionControlador = GSEC::Auth::ControladorAutenticacion::Instance()->IniciarSesionModificacionBBDDSeguridad();
+
+        m_pImageList = new wxImageList(16,16,true);
+        m_pImageList->Add(GinkgoResourcesManager::MenuIcons::GetIcoUser());
+        m_pListaUsuarios->SetImageList(m_pImageList,wxIMAGE_LIST_SMALL);
+
+        //se corresponden con TipoAutenticacion de controlador autenticacion
+        m_pSecType->Append(_("No login"));
+        m_pSecType->Append(_("User/Password"));
+        m_pSecType->Append(_("Password"));
+        m_pSecType->Select(GSEC::Auth::ControladorAutenticacion::Instance()->GetTipoAutenticacion());
+
+        Recargar();
+}
+
+PanelConfiguracionSeguridad::~PanelConfiguracionSeguridad()
+{
+        delete m_pImageList;
+        m_pImageList = NULL;
+        GSEC::Auth::ControladorAutenticacion::Instance()->CancelarCambiosYCerrarBBDDSeguridad(m_pSesionControlador);
+}
+
+void PanelConfiguracionSeguridad::Recargar()
+{
+        wxWindowDisabler dis;
+        Freeze();
+
+        m_pPanelUsuarios->Hide();
+        m_pPanelPassword->Hide();
+
+        int seleccion = m_pSecType->GetSelection();
+        switch(seleccion) {
+        case GSEC::Auth::TA_USER_PASSWORD: {
+                //se muestra el panel user/password
+                m_pPanelUsuarios->Show(true);
+
+                //se rellenan los usuarios
+                m_pListaUsuarios->ClearAll();
+
+                std::list<std::string> listaUsuarios;
+                GSEC::Auth::ControladorAutenticacion::Instance()->GetAllUsers(listaUsuarios,m_pSesionControlador);
+                long index = 0;
+                for (std::list<std::string>::iterator it = listaUsuarios.begin(); it != listaUsuarios.end(); ++it) {
+                        m_pListaUsuarios->InsertItem(index++, wxString::FromUTF8((*it).c_str()),0);
+                }
+        }
+        break;
+        case GSEC::Auth::TA_PASSWORD: {
+                //se muestra el panel
+                m_pPanelPassword->Show(true);
+
+                //se mira a ver si el password esta establecido
+                if(GSEC::Auth::ControladorAutenticacion::Instance()->IsPasswordGeneralSetted(m_pSesionControlador)) {
+                        m_pLabelPassword->SetLabel(_("Password is setted"));
+                        m_pButtonSetPassword->SetLabel(_("Change password"));
+                } else {
+                        m_pLabelPassword->SetLabel(_("Password is not setted"));
+                        m_pButtonSetPassword->SetLabel(_("Set password"));
+                }
+                m_pPanelPassword->Layout();
+        }
+        break;
+        case GSEC::Auth::TA_NO_LOGIN:
+        default: {
+                //no se hace nada
+        }
+        }
+
+        Layout();
+        Thaw();
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* PanelConfiguracionSeguridad::GetPanel()
+{
+        return this;
+}
+
+std::string PanelConfiguracionSeguridad::GetTitle()
+{
+        return _Std("Security");
+}
+
+std::string PanelConfiguracionSeguridad::GetCabecera()
+{
+        return _Std("Security Setting");
+}
+
+bool PanelConfiguracionSeguridad::Validar()
+{
+        bool ok = true;
+
+        int seleccion = m_pSecType->GetSelection();
+        switch(seleccion) {
+        case GSEC::Auth::TA_USER_PASSWORD: {
+                std::list<std::string> listaUsuarios;
+                GSEC::Auth::ControladorAutenticacion::Instance()->GetAllUsers(listaUsuarios,m_pSesionControlador);
+                if(listaUsuarios.empty()) {
+                        wxMessageBox(_("You must create at least one user"), _("Info"));
+                        ok = false;
+                }
+        }
+        break;
+        case GSEC::Auth::TA_PASSWORD: {
+                std::list<std::string> listaUsuarios;
+                if(!GSEC::Auth::ControladorAutenticacion::Instance()->IsPasswordGeneralSetted(m_pSesionControlador)) {
+                        wxMessageBox(_("You must set the main password"), _("Info"));
+                        ok = false;
+                }
+        }
+        break;
+        case GSEC::Auth::TA_NO_LOGIN:
+        default: {
+                //no se hace nada
+        }
+        }
+        return ok;
+}
+
+bool PanelConfiguracionSeguridad::Guardar()
+{
+        //guardar el tipo de seguridad utilizado
+        GSEC::Auth::ControladorAutenticacion::Instance()->SetTipoAutenticacion((GSEC::Auth::TipoAutenticacion) m_pSecType->GetSelection());
+        GSEC::Auth::ControladorAutenticacion::Instance()->GuardarCambiosBBDDSeguridad(m_pSesionControlador);
+        return true;
+}
+
+//endregion
+
+void PanelConfiguracionSeguridad::OnSecTypeChoice(wxCommandEvent &/*event*/)
+{
+        OnPropiedadCambiada();
+        Recargar();
+}
+
+void PanelConfiguracionSeguridad::OnListaUsuariosItemSelected(wxListEvent &)
+{
+        m_pBDelete->Enable(true);
+        m_pBCambiarPassword->Enable(true);
+}
+
+void PanelConfiguracionSeguridad::OnListaUsuariosItemDeSelected(wxListEvent &)
+{
+        m_pBDelete->Enable(false);
+        m_pBCambiarPassword->Enable(false);
+}
+
+void PanelConfiguracionSeguridad::OnNuevoClick(wxCommandEvent &)
+{
+        OnPropiedadCambiada();
+        UserDialog dlg(this,m_pSesionControlador);
+        int returnCode = dlg.ShowModal();
+        if (returnCode == wxID_OK) {
+                //se inserta en la bbdd
+                if (GSEC::Auth::ControladorAutenticacion::Instance()->InsertarUsuario(dlg.GetUser(), dlg.GetPassword(), m_pSesionControlador)) {
+                        //se inserta el la lista
+                        wxMessageBox(_("User inserted successfully"),_("Info"), wxOK | wxICON_INFORMATION, this);
+                        m_pListaUsuarios->InsertItem(m_pListaUsuarios->GetItemCount(), wxString::FromUTF8(dlg.GetUser().c_str()),0);
+                } else {
+                        wxMessageBox(_("There was an error inserting user. To get more info open the LOG."),_("Info"), wxOK | wxICON_INFORMATION, this);
+                }
+        }
+}
+
+void PanelConfiguracionSeguridad::OnCambiarPasswordClick(wxCommandEvent &)
+{
+        OnPropiedadCambiada();
+        if (m_pListaUsuarios->GetSelectedItemCount() == 0)
+                return;
+
+        //se busca el item seleccionado
+
+
+        long item = m_pListaUsuarios->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
+
+        if( item != -1) {
+                wxString nombreUsuario = m_pListaUsuarios->GetItemText(item);
+
+                UserDialog dlg(this, nombreUsuario, m_pSesionControlador);
+                int returnCode = dlg.ShowModal();
+                if (returnCode == wxID_OK) {
+                        //se inserta en la bbdd
+                        if (GSEC::Auth::ControladorAutenticacion::Instance()->CambiarPassword(dlg.GetUser(), dlg.GetPassword(),m_pSesionControlador)) {
+                                //se inserta el la lista
+                                wxMessageBox(_("Password changed successfully"),_("Info"), wxOK | wxICON_INFORMATION, this);
+                        } else {
+                                wxMessageBox(_("There was an error changing the password. To get more info open the LOG."),_("Info"), wxOK | wxICON_INFORMATION, this);
+                        }
+                }
+        }
+}
+
+void PanelConfiguracionSeguridad::OnEliminarClick(wxCommandEvent &)
+{
+        if (m_pListaUsuarios->GetItemCount() > 1 ) {
+                OnPropiedadCambiada();
+                long item = m_pListaUsuarios->GetNextItem(-1, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED);
+
+                if( item != -1) {
+                        std::string nombreUsuario(m_pListaUsuarios->GetItemText(item).ToUTF8());
+                        if (GSEC::Auth::ControladorAutenticacion::Instance()->EliminarUsuario(nombreUsuario, m_pSesionControlador)) {
+                                //se inserta el la lista
+                                wxMessageBox(_("User deleted successfully"),_("Info"), wxOK | wxICON_INFORMATION, this);
+                                m_pListaUsuarios->DeleteItem(item);
+                        } else {
+                                wxMessageBox(_("There was an error deleting user. To get more info open the LOG."),_("Info"), wxOK | wxICON_INFORMATION, this);
+                        }
+                }
+        } else {
+                wxMessageBox(_("Ginkgo CADx must have at least one user."),_("Info"), wxOK | wxICON_INFORMATION, this);
+        }
+}
+
+void PanelConfiguracionSeguridad::OnSetMainPassword(wxCommandEvent &)
+{
+        OnPropiedadCambiada();
+        UserDialog dlg(this, _("User"), m_pSesionControlador);
+        dlg.HideUserName();
+        int returnCode = dlg.ShowModal();
+        if (returnCode == wxID_OK) {
+                //se inserta en la bbdd
+                if (GSEC::Auth::ControladorAutenticacion::Instance()->SetPasswordGeneral(dlg.GetPassword(), m_pSesionControlador)) {
+                        //se inserta el la lista
+                        wxMessageBox(_("Password changed successfully"),_("Info"), wxOK | wxICON_INFORMATION, this);
+                        Recargar();
+                } else {
+                        wxMessageBox(_("There was an error changing the password. To get more info open the LOG."),_("Info"), wxOK | wxICON_INFORMATION, this);
+                }
+        }
+}
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionseguridad.h b/cadxcore/main/gui/configuration/panelconfiguracionseguridad.h
new file mode 100644
index 0000000..147b165
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionseguridad.h
@@ -0,0 +1,75 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+#include <string>
+#include <vector>
+#include <api/autoptr.h>
+#include <wx/wxsqlite3/wxsqlite3.h>
+
+namespace GNC
+{
+namespace GUI
+{
+
+class PanelConfiguracionSeguridad: public PanelConfiguracionSeguridadBase, public IPasoConfiguracion
+{
+public:
+        PanelConfiguracionSeguridad(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~PanelConfiguracionSeguridad();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+
+protected:
+        virtual void OnSecTypeChoice(wxCommandEvent &event);
+
+        virtual void OnListaUsuariosItemSelected(wxListEvent &event);
+
+        virtual void OnListaUsuariosItemDeSelected(wxListEvent &event);
+
+        virtual void OnNuevoClick(wxCommandEvent &event);
+
+        virtual void OnCambiarPasswordClick(wxCommandEvent &event);
+
+        virtual void OnEliminarClick(wxCommandEvent & event);
+
+        virtual void OnSetMainPassword(wxCommandEvent &event);
+
+        wxImageList* m_pImageList;
+        GNC::GCS::Ptr<wxSQLite3Database> m_pSesionControlador;
+
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionubicaciones.cpp b/cadxcore/main/gui/configuration/panelconfiguracionubicaciones.cpp
new file mode 100644
index 0000000..44121b8
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionubicaciones.cpp
@@ -0,0 +1,448 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+#include <sstream>
+#include <limits>
+
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/valtext.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <wx/mstream.h>
+#include <wx/dirdlg.h>
+
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/log.h>
+#include <wx/xml/xml.h>
+#include <wx/log.h>
+
+#include <wx/tokenzr.h>
+
+#include "panelconfiguracionubicaciones.h"
+#include <api/ubication.h>
+
+#include <sstream>
+#include <api/imodelointegracion.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladorlog.h>
+#include <main/entorno.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+#define UB_COL_TITLE_IDX          0
+#define UB_COL_TITLE_WIDTH        100
+#define UB_COL_PATH_IDX           1
+#define UB_COL_PATH_WIDTH         100
+#define UB_COL_DESCRIPTION_IDX    2
+#define UB_COL_DESCRIPTION_WIDTH  100
+#define UB_COL_MONITORIZE_IDX     3
+#define UB_COL_MONITORIZE_WIDTH   100
+#define UB_COL_CLEAN_BEFORE_IDX   4
+#define UB_COL_CLEAN_BEFORE_WIDTH 100
+#define UB_COL_CLEAN_AFTER_IDX    5
+#define UB_COL_CLEAN_AFTER_WIDTH  100
+
+namespace GNC
+{
+namespace GUI
+{
+
+class DialogoAddLocationDialog: public DialogoAddLocationBase
+{
+
+public:
+
+        typedef GNC::GCS::IEntorno::MapaUbicaciones UbicationsMapType;
+
+        DialogoAddLocationDialog(wxWindow* pParent, const UbicationsMapType* const pUbicationsMap, const GIL::Ubicacion& u, bool isnew = false) : DialogoAddLocationBase(pParent), m_pUbicationsMap(pUbicationsMap)
+        {
+                m_Ubicacion = u;
+                m_IsNew = isnew;
+                m_Ok = false;
+
+                m_pTETitle->SetValue( wxString::FromUTF8( m_Ubicacion.Titulo.c_str() ) );
+                m_pTELocation->SetValue( wxString::FromUTF8( m_Ubicacion.Ruta.c_str() ) );
+                m_pTEDesc->SetValue( wxString::FromUTF8( m_Ubicacion.Descripcion.c_str() ) );
+                m_pMonitorize->SetValue(m_Ubicacion.Monitorize);
+                m_pCleanBefore->SetValue(m_Ubicacion.CleanBefore);
+                m_pCleanAfter->SetValue(m_Ubicacion.CleanAfter);
+
+        }
+
+        ~DialogoAddLocationDialog()
+        {
+
+        }
+
+        virtual void OnOpenDirClick( wxCommandEvent& /*event*/ )
+        {
+                wxDirDialog dlg(this, _("Choose a directory"), wxEmptyString, wxDD_DEFAULT_STYLE | wxDD_DIR_MUST_EXIST);
+                if ( dlg.ShowModal() ) {
+                        wxString path = dlg.GetPath();
+                        if (path.size() > 0) {
+                                m_pTELocation->SetValue(path);
+                        }
+                }
+        }
+
+        virtual void OnAceptarClick( wxCommandEvent& /*event*/ )
+        {
+                if (Validar()) {
+                        m_Ok = true;
+                        EndModal(wxID_OK);
+                }
+        }
+
+        bool Validar()
+        {
+
+                if(m_pTETitle->GetValue() != wxEmptyString && m_pTELocation->GetValue() != wxEmptyString) {
+
+                        std::string title (m_pTETitle->GetValue().ToUTF8());
+
+
+                        for (UbicationsMapType::const_iterator it = m_pUbicationsMap->begin(); it != m_pUbicationsMap->end(); ++it) {
+                                const std::string& ti = (*it).first;
+                                if ((ti == title && m_IsNew) || (!m_IsNew && ti == title && title != m_Ubicacion.Titulo) ) {
+                                        wxMessageBox(_("Location titles can't be repeated"),_("Error"),wxOK | wxICON_ERROR, this);
+                                        return false;
+                                }
+                        }
+
+                        if (title.size() > 8) {
+                                wxMessageBox(_("Maximum length of title is 8 characters"),_("Error"),wxOK | wxICON_ERROR, this);
+                                return false;
+                        }
+
+                        if (!wxDir::Exists(m_pTELocation->GetValue())) {
+                                wxMessageBox(_("The selected directory can't be opened"),_("Error"),wxOK | wxICON_ERROR, this);
+                                return false;
+                        }
+
+                        if (m_IsNew) {
+                                m_Ubicacion = GIL::Ubicacion(
+                                                      title,
+                                                      std::string(m_pTELocation->GetValue().ToUTF8()),
+                                                      std::string(m_pTEDesc->GetValue().ToUTF8()),
+                                                      m_pMonitorize->GetValue(),
+                                                      m_pCleanBefore->GetValue(),
+                                                      m_pCleanAfter->GetValue());
+                        } else {
+                                m_Ubicacion.Update(
+                                        std::string(m_pTELocation->GetValue().ToUTF8()),
+                                        std::string(m_pTEDesc->GetValue().ToUTF8()),
+                                        m_pMonitorize->GetValue(),
+                                        m_pCleanBefore->GetValue(),
+                                        m_pCleanAfter->GetValue());
+                                m_Ubicacion.Titulo = title;
+                        }
+
+                        return true;
+                } else {
+                        wxMessageBox(_("You must fill both title and location fields to continue") ,_("Error"),wxOK | wxICON_ERROR, this);
+                        return false;
+                }
+        }
+
+        bool                           m_Ok;
+        bool                           m_IsNew;
+        GIL::Ubicacion                 m_Ubicacion;
+        const UbicationsMapType* const m_pUbicationsMap;
+};
+
+
+////////////////-------------------------------------------------------------------------------------/////////////////////////////
+
+PanelConfiguracionUbicaciones::PanelConfiguracionUbicaciones(wxWindow* pParent, IDialogoConfiguracion* pDialogo): PanelConfiguracionUbicacionesBase(pParent), IPasoConfiguracion(pDialogo)
+{
+
+        m_pModel = new wxDataViewListStore();
+        m_pListUbicaciones->AssociateModel(m_pModel.get());
+
+        m_pListUbicaciones->AppendColumn( new wxDataViewColumn( _("Title"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), UB_COL_TITLE_IDX, UB_COL_TITLE_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListUbicaciones->AppendColumn( new wxDataViewColumn( _("Path"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), UB_COL_PATH_IDX, UB_COL_PATH_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListUbicaciones->AppendColumn( new wxDataViewColumn( _("Description"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), UB_COL_DESCRIPTION_IDX, UB_COL_DESCRIPTION_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListUbicaciones->AppendColumn( new wxDataViewColumn( _("Monitorize"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), UB_COL_MONITORIZE_IDX, UB_COL_MONITORIZE_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListUbicaciones->AppendColumn( new wxDataViewColumn( _("Clean before"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), UB_COL_CLEAN_BEFORE_IDX, UB_COL_CLEAN_BEFORE_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListUbicaciones->AppendColumn( new wxDataViewColumn( _("Clean after"), new wxDataViewTextRenderer( "string", wxDATAVIEW_CELL_INERT ), UB_COL_CLEAN_AFTER_IDX, UB_COL_CLEAN_AFTER_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+
+        m_pListUbicaciones->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(PanelConfiguracionUbicaciones::OnUbicationsSelectionChanged), NULL, this);
+        m_pListUbicaciones->Connect(wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(PanelConfiguracionUbicaciones::OnUbicationsDClick), NULL, this);
+
+        Recargar();
+        m_pUbicaciones->Layout();
+        Layout();
+}
+
+PanelConfiguracionUbicaciones::~PanelConfiguracionUbicaciones()
+{
+
+}
+
+void PanelConfiguracionUbicaciones::Recargar()
+{
+        GNC::GCS::ConfigurationController::TListGroups locations;
+        GNC::GCS::ConfigurationController::Instance()->readGroupGeneral("/GinkgoCore/Locations", locations);
+
+        wxVector<wxVariant> data;
+        m_pListUbicaciones->DeleteAllItems();
+        for (UbicationsMapType::iterator it = m_Ubicaciones.begin(); it != m_Ubicaciones.end(); ++it) {
+                delete (*it).second;
+        }
+        m_Ubicaciones.clear();
+
+        for (GNC::GCS::ConfigurationController::TListGroups::iterator it = locations.begin(); it != locations.end(); ++it) {
+                GNC::GCS::ConfigurationController::TListGroups::value_type& item = (*it);
+                data.clear();
+
+                std::string title, path, descr;
+                bool monitorize, cleanbefore, cleanafter;
+
+                item.readStringValue("Title", title);
+                item.readStringValue("Path", path);
+                item.readStringValue("Description", descr);
+                item.readBoolValue("Monitorize", monitorize, false);
+                item.readBoolValue("CleanBefore", cleanbefore, false);
+                item.readBoolValue("CleanAfter", cleanafter, false);
+
+                m_Ubicaciones[title] = new GIL::Ubicacion(title, path, descr, monitorize, cleanbefore, cleanafter);
+                data.push_back(wxString::FromUTF8(title.c_str()));
+                data.push_back(wxString::FromUTF8(path.c_str()));
+                data.push_back(wxString::FromUTF8(descr.c_str()));
+                if (monitorize) {
+                        data.push_back(_("Yes"));
+                } else {
+                        data.push_back(_("No"));
+                }
+                if (cleanbefore) {
+                        data.push_back(_("Yes"));
+                } else {
+                        data.push_back(_("No"));
+                }
+                if (cleanafter) {
+                        data.push_back(_("Yes"));
+                } else {
+                        data.push_back(_("No"));
+                }
+                m_pModel->AppendItem(data);
+        }
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* PanelConfiguracionUbicaciones::GetPanel()
+{
+        return this;
+}
+
+std::string PanelConfiguracionUbicaciones::GetTitle()
+{
+        return _Std("Locations");
+}
+
+std::string PanelConfiguracionUbicaciones::GetCabecera()
+{
+        return _Std("Location Settings");
+}
+
+bool PanelConfiguracionUbicaciones::Validar()
+{
+        bool ok = true;
+
+        return ok;
+}
+
+bool PanelConfiguracionUbicaciones::Guardar()
+{
+        GNC::GCS::IEntorno::MapaUbicaciones& mapa = GNC::Entorno::Instance()->GetUbicaciones();
+        for (GNC::GCS::IEntorno::MapaUbicaciones::iterator it = mapa.begin(); it != mapa.end(); ++it) {
+                delete (*it).second;
+        }
+        mapa.clear();
+
+        GNC::GCS::ConfigurationController::Instance()->deleteEntryGeneral("/GinkgoCore/Locations");
+        GNC::GCS::ConfigurationController::TListGroups locations;
+
+        for (GNC::GCS::IEntorno::MapaUbicaciones::iterator it = m_Ubicaciones.begin(); it != m_Ubicaciones.end(); ++it) {
+                GIL::Ubicacion* u = (*it).second;
+                mapa[u->Titulo] = u;
+                GNC::GCS::ConfigurationController::TMapValues location;
+                location["Title"] = u->Titulo;
+                location["Path"] = u->Ruta;
+                location["Description"] = u->Descripcion;
+                location.insertBool("Monitorize", u->Monitorize);
+                location.insertBool("CleanBefore", u->CleanBefore);
+                location.insertBool("CleanAfter", u->CleanAfter);
+                locations.push_back(location);
+        }
+
+        GNC::GCS::ConfigurationController::Instance()->writeGroupGeneral("/GinkgoCore/Locations", locations, "Location");
+
+        return true;
+}
+//endregion
+
+void PanelConfiguracionUbicaciones::OnUbicationsDClick( wxDataViewEvent&)
+{
+        wxCommandEvent evt;
+        OnEditarClick(evt);
+}
+
+void PanelConfiguracionUbicaciones::OnUbicationsSelectionChanged( wxDataViewEvent& event)
+{
+        if (event.GetSelection() >= 0) {
+                m_pBotonEdit->Enable(true);
+                m_pBotonDelete->Enable(true);
+        } else {
+                m_pBotonEdit->Enable(false);
+                m_pBotonDelete->Enable(false);
+        }
+
+}
+
+void PanelConfiguracionUbicaciones::OnNuevoClick(wxCommandEvent &)
+{
+
+        DialogoAddLocationDialog dlg(this, &m_Ubicaciones, GIL::Ubicacion(), true);
+        dlg.ShowModal();
+        if (dlg.m_Ok) {
+                GIL::Ubicacion& tuple = dlg.m_Ubicacion;
+                m_Ubicaciones[tuple.Titulo] = new GIL::Ubicacion(tuple);
+
+                wxVector<wxVariant> data;
+                data.push_back(wxString::FromUTF8(tuple.Titulo.c_str()));
+                data.push_back(wxString::FromUTF8(tuple.Ruta.c_str()));
+                data.push_back(wxString::FromUTF8(tuple.Descripcion.c_str()));
+                if (tuple.Monitorize) {
+                        data.push_back(_("Yes"));
+                } else {
+                        data.push_back(_("No"));
+                }
+                if (tuple.CleanBefore) {
+                        data.push_back(_("Yes"));
+                } else {
+                        data.push_back(_("No"));
+                }
+                if (tuple.CleanBefore) {
+                        data.push_back(_("Yes"));
+                } else {
+                        data.push_back(_("No"));
+                }
+                m_pModel->AppendItem(data);
+                OnPropiedadCambiada();
+        }
+}
+
+void PanelConfiguracionUbicaciones::OnEditarClick(wxCommandEvent &)
+{
+
+        wxDataViewItem selection = m_pListUbicaciones->GetSelection();
+        if (selection.IsOk()) {
+                wxVariant val;
+                m_pModel->GetValue(val, selection, UB_COL_TITLE_IDX);
+                std::string idSeleccionado(val.GetString().ToUTF8());
+
+                GNC::GCS::IEntorno::MapaUbicaciones::iterator it = m_Ubicaciones.find(idSeleccionado);
+                if (it != m_Ubicaciones.end()) {
+                        GIL::Ubicacion *pSel = (*it).second;
+                        if (pSel != NULL) {
+                                DialogoAddLocationDialog dlg(this, &m_Ubicaciones, (*pSel), false);
+                                dlg.ShowModal();
+                                if (dlg.m_Ok) {
+                                        GIL::Ubicacion& tuple = dlg.m_Ubicacion;
+
+                                        val = wxString::FromUTF8(tuple.Titulo.c_str());
+                                        m_pModel->SetValue(val, selection, UB_COL_TITLE_IDX);
+
+                                        val = wxString::FromUTF8(tuple.Ruta.c_str());
+                                        m_pModel->SetValue(val, selection, UB_COL_PATH_IDX);
+
+                                        val = wxString::FromUTF8(tuple.Descripcion.c_str());
+                                        m_pModel->SetValue(val, selection, UB_COL_DESCRIPTION_IDX);
+
+                                        m_pModel->SetValue((tuple.Monitorize ? _("Yes") : _("No")), selection, UB_COL_MONITORIZE_IDX);
+                                        m_pModel->SetValue((tuple.CleanBefore ? _("Yes") : _("No")), selection, UB_COL_CLEAN_BEFORE_IDX);
+                                        m_pModel->SetValue((tuple.CleanAfter ? _("Yes") : _("No")), selection, UB_COL_CLEAN_AFTER_IDX);
+
+                                        (*m_Ubicaciones[tuple.Titulo]) = tuple;
+                                        m_pModel->ItemChanged(selection);
+
+                                        OnPropiedadCambiada();
+                                }
+                        }
+                }
+        }
+}
+
+void PanelConfiguracionUbicaciones::OnEliminarClick(wxCommandEvent &)
+{
+
+        wxDataViewItem selection = m_pListUbicaciones->GetSelection();
+
+        if(selection.IsOk()) {
+                wxVariant val;
+                m_pModel->GetValue(val, selection, UB_COL_TITLE_IDX);
+                std::string idSeleccionado(val.GetString().ToUTF8());
+
+                int answer = wxMessageBox(_("Confirm the removal of the node") + wxT(" ") + wxString::FromUTF8(idSeleccionado.c_str()), _("Data modified"), wxYES_NO | wxCANCEL, this);
+                if(answer == wxYES) {
+                        GNC::GCS::IEntorno::MapaUbicaciones::iterator it = m_Ubicaciones.find(idSeleccionado);
+                        if (it != m_Ubicaciones.end()) {
+                                GIL::Ubicacion *pSel = (*it).second;
+                                if (pSel != NULL) {
+
+                                        bool notFound = true;
+                                        for (unsigned int i = 0; notFound && i < m_pModel->GetCount(); ++i) {
+                                                m_pModel->GetItem(i);
+
+                                                wxVariant val2;
+                                                m_pModel->GetValueByRow(val2, i, UB_COL_TITLE_IDX);
+                                                if (val == val2) {
+                                                        notFound = false;
+                                                        m_pModel->DeleteItem(i);
+                                                }
+                                        }
+                                        delete pSel;
+                                        m_Ubicaciones.erase(it);
+                                }
+                                m_pListUbicaciones->Refresh();
+                                wxDataViewEvent evt;
+                                OnUbicationsSelectionChanged(evt);
+                                OnPropiedadCambiada();
+                        }
+                }
+        }
+
+}
+
+
+void PanelConfiguracionUbicaciones::OnHelpClick(wxMouseEvent &)
+{
+}
+
+void PanelConfiguracionUbicaciones::OnSize(wxSizeEvent & event)
+{
+        event.Skip(true);
+}
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfiguracionubicaciones.h b/cadxcore/main/gui/configuration/panelconfiguracionubicaciones.h
new file mode 100644
index 0000000..37a5272
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfiguracionubicaciones.h
@@ -0,0 +1,76 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iconfiguracion.h>
+#include <api/ientorno.h>
+#include "panelesconfiguracionginkgobase.h"
+#include <string>
+#include <vector>
+
+namespace Ubicaciones
+{
+class UbicacionesGridTable;
+}
+
+namespace GNC
+{
+namespace GUI
+{
+
+class PanelConfiguracionUbicaciones: public PanelConfiguracionUbicacionesBase, public IPasoConfiguracion
+{
+public:
+        PanelConfiguracionUbicaciones(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~PanelConfiguracionUbicaciones();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+public:
+        wxObjectDataPtr<wxDataViewListStore> m_pModel;
+        typedef GNC::GCS::IEntorno::MapaUbicaciones UbicationsMapType;
+        UbicationsMapType m_Ubicaciones;
+
+protected:
+
+
+        virtual void OnUbicationsDClick( wxDataViewEvent& event );
+        virtual void OnUbicationsSelectionChanged( wxDataViewEvent& event);
+
+        virtual void OnNuevoClick( wxCommandEvent& event );
+        virtual void OnEditarClick( wxCommandEvent& event );
+        virtual void OnEliminarClick( wxCommandEvent& event );
+        virtual void OnHelpClick(wxMouseEvent &event);
+        virtual void OnSize( wxSizeEvent& event );
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfigurationanonymization.cpp b/cadxcore/main/gui/configuration/panelconfigurationanonymization.cpp
new file mode 100644
index 0000000..1dd77d4
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfigurationanonymization.cpp
@@ -0,0 +1,122 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+#include <sstream>
+#include <limits>
+
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/valtext.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <wx/mstream.h>
+#include <wx/dirdlg.h>
+
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/log.h>
+#include <wx/xml/xml.h>
+#include <wx/log.h>
+
+#include <wx/tokenzr.h>
+
+#include "panelconfigurationanonymization.h"
+
+#include <sstream>
+#include <api/imodelointegracion.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/anonymizationcontroller.h>
+#include <main/entorno.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+namespace GNC
+{
+namespace GUI
+{
+
+PanelConfigurationAnonymization::PanelConfigurationAnonymization(wxWindow* pParent, IDialogoConfiguracion* pDialogo): PanelConfigurationAnonymizationBase(pParent), IPasoConfiguracion(pDialogo)
+{
+        GNC::GCS::AnonymizationController::TAnonymizationMap map = GNC::GCS::AnonymizationController::GetAnonymizationMap();
+        /*
+        m_pTagsDicom->SetColumnCount(2);
+        m_pTagsDicom->MakeColumnEditable(1, true);
+        m_pTagsDicom->SetColumnProportion(0, 3);
+        m_gridPermisos->SetColumnProportion(1, 1);
+        for(GNC::GCS::AnonymizationController::TAnonymizationMap::const_iterator it = map.begin(); it != map.end(); ++it)
+        {
+        	if(!(*it).second.privado) {
+        		if ((*it).second.espacioNombres != ultimaCategoria) {
+        			ultimaCategoria = (*it).second.espacioNombres;
+        			cat = m_gridPermisos->Append(new wxPropertyCategory(wxString::FromUTF8((*it).second.descripcionNamespace.c_str()),wxString::FromUTF8(ultimaCategoria.c_str())));
+        		}
+        		std::string clave = (*it).second.espacioNombres + SEPARADOR + (*it).second.id;
+        		wxPGProperty* prop = cat->AppendChild(new wxBoolProperty(wxString::FromUTF8((*it).second.descripcion.c_str()), wxString::FromUTF8(clave.c_str()), (*it).second.activoPorDefecto ) );
+        		prop->SetCell(2, new wxPGCell( wxString::FromUTF8( ((*it).second.valorPorDefecto).c_str())) );
+        		prop->SetCell(3, new wxPGCell( _("Default value") ));
+        	}
+        }
+        */
+}
+
+PanelConfigurationAnonymization::~PanelConfigurationAnonymization()
+{
+
+}
+
+void PanelConfigurationAnonymization::Recargar()
+{
+
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* PanelConfigurationAnonymization::GetPanel()
+{
+        return this;
+}
+
+std::string PanelConfigurationAnonymization::GetTitle()
+{
+        return _Std("Anonymization");
+}
+
+std::string PanelConfigurationAnonymization::GetCabecera()
+{
+        return _Std("Anonymization settings");
+}
+
+bool PanelConfigurationAnonymization::Validar()
+{
+        bool ok = true;
+
+        return ok;
+}
+
+bool PanelConfigurationAnonymization::Guardar()
+{
+
+        return true;
+}
+//endregion
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelconfigurationanonymization.h b/cadxcore/main/gui/configuration/panelconfigurationanonymization.h
new file mode 100644
index 0000000..a25c0fe
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelconfigurationanonymization.h
@@ -0,0 +1,64 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+#include <string>
+#include <vector>
+
+namespace Ubicaciones
+{
+class UbicacionesGridTable;
+}
+
+namespace GNC
+{
+namespace GUI
+{
+
+class PanelConfigurationAnonymization: public PanelConfigurationAnonymizationBase, public IPasoConfiguracion
+{
+public:
+        PanelConfigurationAnonymization(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~PanelConfigurationAnonymization();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+        //region "Helpers"
+        void AutoSizeGrid();
+        //endregion
+
+public:
+};
+}
+}
diff --git a/cadxcore/main/gui/configuration/panelesconfiguracionginkgobase.cpp b/cadxcore/main/gui/configuration/panelesconfiguracionginkgobase.cpp
new file mode 100644
index 0000000..8cbfb3a
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelesconfiguracionginkgobase.cpp
@@ -0,0 +1,3373 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "panelesconfiguracionginkgobase.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+DialogoConfiguracionBase::DialogoConfiguracionBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 860,300 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer3;
+        bSizer3 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Settings") );
+
+        bSizer3->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pImagePanel = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pImagePanel->SetToolTip( _("Settings") );
+
+        wxBoxSizer* bSizer43;
+        bSizer43 = new wxBoxSizer( wxVERTICAL );
+
+        m_splitter2 = new wxSplitterWindow( m_pImagePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
+        m_splitter2->Connect( wxEVT_IDLE, wxIdleEventHandler( DialogoConfiguracionBase::m_splitter2OnIdle ), NULL, this );
+        m_splitter2->SetMinimumPaneSize( 100 );
+
+        m_splitter2->SetBackgroundColour( wxColour( 243, 243, 243 ) );
+
+        m_panel1 = new wxPanel( m_splitter2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel1->SetMinSize( wxSize( 180,-1 ) );
+
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTreeNavegacion = new wxTreeCtrl( m_panel1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT );
+        bSizer5->Add( m_pTreeNavegacion, 1, wxALL|wxEXPAND, 5 );
+
+
+        m_panel1->SetSizer( bSizer5 );
+        m_panel1->Layout();
+        bSizer5->Fit( m_panel1 );
+        m_pTitledPanelConfig = new TitledPanelSinBorder( m_splitter2, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer44;
+        bSizer44 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelConfig = new PanelScrollable( m_pTitledPanelConfig, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pSizerPaneles = new wxBoxSizer( wxVERTICAL );
+
+
+        m_pPanelConfig->SetSizer( m_pSizerPaneles );
+        m_pPanelConfig->Layout();
+        m_pSizerPaneles->Fit( m_pPanelConfig );
+        bSizer44->Add( m_pPanelConfig, 1, wxEXPAND, 5 );
+
+
+        m_pTitledPanelConfig->SetSizer( bSizer44 );
+        m_pTitledPanelConfig->Layout();
+        bSizer44->Fit( m_pTitledPanelConfig );
+        m_splitter2->SplitVertically( m_panel1, m_pTitledPanelConfig, 245 );
+        bSizer43->Add( m_splitter2, 1, wxEXPAND, 5 );
+
+
+        m_pImagePanel->SetSizer( bSizer43 );
+        m_pImagePanel->Layout();
+        bSizer43->Fit( m_pImagePanel );
+        bSizer3->Add( m_pImagePanel, 1, wxEXPAND, 5 );
+
+        m_panel3 = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer22;
+        bSizer22 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_button12 = new wxButton( m_panel3, wxID_ANY, _("Export config..."), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer22->Add( m_button12, 0, wxRIGHT, 5 );
+
+        m_button13 = new wxButton( m_panel3, wxID_ANY, _("Import config..."), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer22->Add( m_button13, 0, wxRIGHT|wxLEFT, 5 );
+
+
+        bSizer7->Add( bSizer22, 0, 0, 5 );
+
+
+        bSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer21;
+        bSizer21 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_button8 = new wxButton( m_panel3, wxID_OK, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button8->SetDefault();
+        bSizer21->Add( m_button8, 0, wxRIGHT|wxLEFT, 5 );
+
+        m_button9 = new wxButton( m_panel3, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer21->Add( m_button9, 0, wxRIGHT|wxLEFT, 5 );
+
+        m_pBAplicar = new wxButton( m_panel3, wxID_ANY, _("Apply"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBAplicar->Enable( false );
+
+        bSizer21->Add( m_pBAplicar, 0, wxLEFT, 5 );
+
+
+        bSizer7->Add( bSizer21, 0, 0, 5 );
+
+
+        m_panel3->SetSizer( bSizer7 );
+        m_panel3->Layout();
+        bSizer7->Fit( m_panel3 );
+        bSizer3->Add( m_panel3, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer3 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pTreeNavegacion->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DialogoConfiguracionBase::OnCambioNodoNavegacion ), NULL, this );
+        m_button12->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoConfiguracionBase::OnExportarClick ), NULL, this );
+        m_button13->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoConfiguracionBase::OnImportarClick ), NULL, this );
+        m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoConfiguracionBase::OnAceptarClick ), NULL, this );
+        m_button9->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoConfiguracionBase::OnCancelarClick ), NULL, this );
+        m_pBAplicar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoConfiguracionBase::OnAplicarClick ), NULL, this );
+}
+
+DialogoConfiguracionBase::~DialogoConfiguracionBase()
+{
+        // Disconnect Events
+        m_pTreeNavegacion->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DialogoConfiguracionBase::OnCambioNodoNavegacion ), NULL, this );
+        m_button12->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoConfiguracionBase::OnExportarClick ), NULL, this );
+        m_button13->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoConfiguracionBase::OnImportarClick ), NULL, this );
+        m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoConfiguracionBase::OnAceptarClick ), NULL, this );
+        m_button9->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoConfiguracionBase::OnCancelarClick ), NULL, this );
+        m_pBAplicar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoConfiguracionBase::OnAplicarClick ), NULL, this );
+
+}
+
+PanelConfiguracionEstacionBase::PanelConfiguracionEstacionBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetMinSize( wxSize( 450,-1 ) );
+
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxVERTICAL );
+
+        m_panelPhysician = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panelPhysician->SetToolTip( _("Physician") );
+
+        wxFlexGridSizer* fgSizer2;
+        fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer2->AddGrowableCol( 1 );
+        fgSizer2->SetFlexibleDirection( wxBOTH );
+        fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText1 = new wxStaticText( m_panelPhysician, wxID_ANY, _("Physician's name"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText1->Wrap( -1 );
+        fgSizer2->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+        m_pMedicoNombre = new wxTextCtrl( m_panelPhysician, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+        m_pMedicoNombre->SetMaxLength( 0 );
+        fgSizer2->Add( m_pMedicoNombre, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT, 5 );
+
+        m_staticText11 = new wxStaticText( m_panelPhysician, wxID_ANY, _("Physician's Id"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText11->Wrap( -1 );
+        fgSizer2->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+        m_pMedicoId = new wxTextCtrl( m_panelPhysician, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pMedicoId->SetMaxLength( 0 );
+        fgSizer2->Add( m_pMedicoId, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxLEFT, 5 );
+
+
+        m_panelPhysician->SetSizer( fgSizer2 );
+        m_panelPhysician->Layout();
+        fgSizer2->Fit( m_panelPhysician );
+        bSizer4->Add( m_panelPhysician, 0, wxEXPAND, 5 );
+
+        m_pSep11 = new SubTitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer4->Add( m_pSep11, 0, wxEXPAND, 5 );
+
+        m_panelServicio = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panelServicio->SetToolTip( _("Service") );
+
+        wxFlexGridSizer* fgSizer22;
+        fgSizer22 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer22->AddGrowableCol( 1 );
+        fgSizer22->SetFlexibleDirection( wxBOTH );
+        fgSizer22->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText39 = new wxStaticText( m_panelServicio, wxID_ANY, _("Service's name"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText39->Wrap( -1 );
+        fgSizer22->Add( m_staticText39, 0, wxTOP|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pServicioNombre = new wxTextCtrl( m_panelServicio, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pServicioNombre->SetMaxLength( 0 );
+        fgSizer22->Add( m_pServicioNombre, 0, wxTOP|wxLEFT|wxEXPAND, 5 );
+
+        m_staticText12 = new wxStaticText( m_panelServicio, wxID_ANY, _("Service's Id"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText12->Wrap( -1 );
+        fgSizer22->Add( m_staticText12, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+        m_pServicioId = new wxTextCtrl( m_panelServicio, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+        m_pServicioId->SetMaxLength( 0 );
+        fgSizer22->Add( m_pServicioId, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        m_panelServicio->SetSizer( fgSizer22 );
+        m_panelServicio->Layout();
+        fgSizer22->Fit( m_panelServicio );
+        bSizer4->Add( m_panelServicio, 0, wxEXPAND, 5 );
+
+        m_pSep1 = new SubTitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer4->Add( m_pSep1, 0, wxEXPAND, 5 );
+
+        m_pPanelInstitucion = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelInstitucion->SetToolTip( _("Local institution") );
+
+        wxFlexGridSizer* fgSizer21;
+        fgSizer21 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer21->AddGrowableCol( 1 );
+        fgSizer21->SetFlexibleDirection( wxBOTH );
+        fgSizer21->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText13 = new wxStaticText( m_pPanelInstitucion, wxID_ANY, _("Institution's name"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText13->Wrap( -1 );
+        fgSizer21->Add( m_staticText13, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+        m_pCentroNombre = new wxTextCtrl( m_pPanelInstitucion, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+        m_pCentroNombre->SetMaxLength( 0 );
+        fgSizer21->Add( m_pCentroNombre, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT, 5 );
+
+        m_staticText111 = new wxStaticText( m_pPanelInstitucion, wxID_ANY, _("Institution's Id"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText111->Wrap( -1 );
+        fgSizer21->Add( m_staticText111, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
+
+        m_pCentroId = new wxTextCtrl( m_pPanelInstitucion, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pCentroId->SetMaxLength( 0 );
+        fgSizer21->Add( m_pCentroId, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxLEFT, 5 );
+
+
+        m_pPanelInstitucion->SetSizer( fgSizer21 );
+        m_pPanelInstitucion->Layout();
+        fgSizer21->Fit( m_pPanelInstitucion );
+        bSizer4->Add( m_pPanelInstitucion, 0, wxEXPAND, 5 );
+
+        m_pSep12 = new SubTitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer4->Add( m_pSep12, 0, wxEXPAND, 5 );
+
+        m_pPanelInstitucion1 = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelInstitucion1->SetToolTip( _("Dicomized files") );
+
+        wxFlexGridSizer* fgSizer211;
+        fgSizer211 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer211->AddGrowableCol( 1 );
+        fgSizer211->SetFlexibleDirection( wxBOTH );
+        fgSizer211->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText131 = new wxStaticText( m_pPanelInstitucion1, wxID_ANY, _("Charset"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText131->Wrap( -1 );
+        fgSizer211->Add( m_staticText131, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pComboCharset = new wxComboBox( m_pPanelInstitucion1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY|wxCB_SORT );
+        m_pComboCharset->Append( _("ISO_IR 192") );
+        m_pComboCharset->Append( _("ISO_IR 6") );
+        m_pComboCharset->Append( _("ISO_IR 100") );
+        m_pComboCharset->Append( _("ISO_IR 101") );
+        m_pComboCharset->Append( _("ISO_IR 109") );
+        m_pComboCharset->Append( _("ISO_IR 110") );
+        m_pComboCharset->Append( _("ISO_IR 126") );
+        m_pComboCharset->Append( _("ISO_IR 127") );
+        m_pComboCharset->Append( _("ISO_IR 138") );
+        m_pComboCharset->Append( _("ISO_IR 144") );
+        m_pComboCharset->Append( _("ISO_IR 148") );
+        fgSizer211->Add( m_pComboCharset, 1, wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+        m_pPanelInstitucion1->SetSizer( fgSizer211 );
+        m_pPanelInstitucion1->Layout();
+        fgSizer211->Fit( m_pPanelInstitucion1 );
+        bSizer4->Add( m_pPanelInstitucion1, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer4 );
+        this->Layout();
+        bSizer4->Fit( this );
+
+        // Connect Events
+        m_pMedicoNombre->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+        m_pMedicoId->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+        m_pServicioId->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+        m_pCentroNombre->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+        m_pCentroId->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+        m_pComboCharset->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+}
+
+PanelConfiguracionEstacionBase::~PanelConfiguracionEstacionBase()
+{
+        // Disconnect Events
+        m_pMedicoNombre->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+        m_pMedicoId->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+        m_pServicioId->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+        m_pCentroNombre->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+        m_pCentroId->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+        m_pComboCharset->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( PanelConfiguracionEstacionBase::OnTextoCambiado ), NULL, this );
+
+}
+
+PanelConfiguracionGeneralBase::PanelConfiguracionGeneralBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetMinSize( wxSize( 450,-1 ) );
+
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxVERTICAL );
+
+        m_pLanguage = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pLanguage->SetToolTip( _("Language") );
+
+        wxBoxSizer* bSizer32;
+        bSizer32 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_staticText34 = new wxStaticText( m_pLanguage, wxID_ANY, _("Language"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText34->Wrap( -1 );
+        bSizer32->Add( m_staticText34, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+        m_pComboLanguage = new wxComboBox( m_pLanguage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxCB_READONLY );
+        bSizer32->Add( m_pComboLanguage, 0, wxLEFT, 5 );
+
+
+        m_pLanguage->SetSizer( bSizer32 );
+        m_pLanguage->Layout();
+        bSizer32->Fit( m_pLanguage );
+        bSizer4->Add( m_pLanguage, 0, wxEXPAND, 5 );
+
+        m_pSep3 = new SubTitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer4->Add( m_pSep3, 0, wxEXPAND, 5 );
+
+        m_pUpdate = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pUpdate->SetToolTip( _("Misc") );
+
+        wxBoxSizer* bSizer321;
+        bSizer321 = new wxBoxSizer( wxVERTICAL );
+
+        m_pCheckForUpdates = new wxCheckBox( m_pUpdate, wxID_ANY, _("Automatically check for updates"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pCheckForUpdates->SetValue(true);
+        bSizer321->Add( m_pCheckForUpdates, 0, 0, 5 );
+
+        m_pCheckAnonUsageStats = new wxCheckBox( m_pUpdate, wxID_ANY, _("Help us sending anonymous usage data (no patient data will be sent)"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pCheckAnonUsageStats->SetValue(true);
+        bSizer321->Add( m_pCheckAnonUsageStats, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+
+        m_pUpdate->SetSizer( bSizer321 );
+        m_pUpdate->Layout();
+        bSizer321->Fit( m_pUpdate );
+        bSizer4->Add( m_pUpdate, 0, wxEXPAND, 5 );
+
+        m_pSep31 = new SubTitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer4->Add( m_pSep31, 0, wxEXPAND, 5 );
+
+        m_pProxy = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pProxy->SetToolTip( _("Proxy settings") );
+
+        wxBoxSizer* bSizer3211;
+        bSizer3211 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pEnableProxy = new wxCheckBox( m_pProxy, wxID_ANY, _("Enable http proxy"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer3211->Add( m_pEnableProxy, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+        m_pProxySettingsButton = new wxButton( m_pProxy, wxID_ANY, _("Proxy settings"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pProxySettingsButton->Enable( false );
+
+        bSizer3211->Add( m_pProxySettingsButton, 0, wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pProxy->SetSizer( bSizer3211 );
+        m_pProxy->Layout();
+        bSizer3211->Fit( m_pProxy );
+        bSizer4->Add( m_pProxy, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer4 );
+        this->Layout();
+        bSizer4->Fit( this );
+
+        // Connect Events
+        m_pComboLanguage->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( PanelConfiguracionGeneralBase::OnIdiomaCambiado ), NULL, this );
+        m_pCheckForUpdates->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PanelConfiguracionGeneralBase::OnCheckForUpdates ), NULL, this );
+        m_pCheckAnonUsageStats->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PanelConfiguracionGeneralBase::OnCheckForUpdates ), NULL, this );
+        m_pEnableProxy->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PanelConfiguracionGeneralBase::OnCheckEnableProxySettings ), NULL, this );
+        m_pProxySettingsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionGeneralBase::OnProxySettings ), NULL, this );
+}
+
+PanelConfiguracionGeneralBase::~PanelConfiguracionGeneralBase()
+{
+        // Disconnect Events
+        m_pComboLanguage->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( PanelConfiguracionGeneralBase::OnIdiomaCambiado ), NULL, this );
+        m_pCheckForUpdates->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PanelConfiguracionGeneralBase::OnCheckForUpdates ), NULL, this );
+        m_pCheckAnonUsageStats->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PanelConfiguracionGeneralBase::OnCheckForUpdates ), NULL, this );
+        m_pEnableProxy->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( PanelConfiguracionGeneralBase::OnCheckEnableProxySettings ), NULL, this );
+        m_pProxySettingsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionGeneralBase::OnProxySettings ), NULL, this );
+
+}
+
+ProxySettingsDialogBase::ProxySettingsDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 400,500 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer11;
+        bSizer11 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Proxy Settings") );
+
+        bSizer11->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer85;
+        bSizer85 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel64 = new SubTitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel64->SetToolTip( _("Server settings") );
+
+        wxFlexGridSizer* fgSizer4;
+        fgSizer4 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer4->AddGrowableCol( 1 );
+        fgSizer4->SetFlexibleDirection( wxBOTH );
+        fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_pstaticText1 = new wxStaticText( m_panel64, wxID_ANY, _("Host"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstaticText1->Wrap( -1 );
+        fgSizer4->Add( m_pstaticText1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pHost = new wxTextCtrl( m_panel64, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 150,-1 ), 0 );
+        m_pHost->SetMaxLength( 0 );
+        fgSizer4->Add( m_pHost, 0, wxALL|wxEXPAND, 5 );
+
+        m_pStaticText22 = new wxStaticText( m_panel64, wxID_ANY, _("Port"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pStaticText22->Wrap( -1 );
+        fgSizer4->Add( m_pStaticText22, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pPort = new wxTextCtrl( m_panel64, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 150,-1 ), 0 );
+        m_pPort->SetMaxLength( 0 );
+        fgSizer4->Add( m_pPort, 0, wxALL|wxEXPAND, 5 );
+
+
+        m_panel64->SetSizer( fgSizer4 );
+        m_panel64->Layout();
+        fgSizer4->Fit( m_panel64 );
+        bSizer85->Add( m_panel64, 0, wxEXPAND, 5 );
+
+        m_panel641 = new SubTitledPanelSeparatorV( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel641->SetToolTip( _("Server settings") );
+
+        bSizer85->Add( m_panel641, 0, wxEXPAND, 5 );
+
+        m_panel642 = new SubTitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel642->SetToolTip( _("Authentication") );
+
+        wxBoxSizer* bSizer141;
+        bSizer141 = new wxBoxSizer( wxVERTICAL );
+
+        m_pCheckAuthentication = new wxCheckBox( m_panel642, wxID_ANY, _("Proxy server requires authentication"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer141->Add( m_pCheckAuthentication, 0, wxALL, 5 );
+
+        wxFlexGridSizer* fgSizer42;
+        fgSizer42 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer42->AddGrowableCol( 1 );
+        fgSizer42->SetFlexibleDirection( wxBOTH );
+        fgSizer42->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_pstaticText12 = new wxStaticText( m_panel642, wxID_ANY, _("Username"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstaticText12->Wrap( -1 );
+        fgSizer42->Add( m_pstaticText12, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pUsername = new wxTextCtrl( m_panel642, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 150,-1 ), 0 );
+        m_pUsername->SetMaxLength( 0 );
+        fgSizer42->Add( m_pUsername, 0, wxALL|wxEXPAND, 5 );
+
+        Port2 = new wxStaticText( m_panel642, wxID_ANY, _("Password"), wxDefaultPosition, wxDefaultSize, 0 );
+        Port2->Wrap( -1 );
+        fgSizer42->Add( Port2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pPassword = new wxTextCtrl( m_panel642, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 150,-1 ), wxTE_PASSWORD );
+        m_pPassword->SetMaxLength( 0 );
+        fgSizer42->Add( m_pPassword, 0, wxALL|wxEXPAND, 5 );
+
+
+        bSizer141->Add( fgSizer42, 1, wxEXPAND, 5 );
+
+
+        m_panel642->SetSizer( bSizer141 );
+        m_panel642->Layout();
+        bSizer141->Fit( m_panel642 );
+        bSizer85->Add( m_panel642, 0, wxEXPAND, 5 );
+
+        m_panel6411 = new SubTitledPanelSeparatorV( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel6411->SetToolTip( _("Server settings") );
+
+        bSizer85->Add( m_panel6411, 0, wxEXPAND, 5 );
+
+        m_panel6421 = new SubTitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel6421->SetToolTip( _("Exceptions") );
+
+        wxBoxSizer* bSizer1411;
+        bSizer1411 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticText115 = new wxStaticText( m_panel6421, wxID_ANY, _("No proxy for addresses containing"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText115->Wrap( -1 );
+        bSizer1411->Add( m_staticText115, 0, wxTOP|wxBOTTOM, 5 );
+
+        m_pExceptions = new wxTextCtrl( m_panel6421, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer1411->Add( m_pExceptions, 0, wxEXPAND|wxTOP|wxBOTTOM, 5 );
+
+        m_staticText116 = new wxStaticText( m_panel6421, wxID_ANY, _("Separate addresses with commas."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText116->Wrap( -1 );
+        bSizer1411->Add( m_staticText116, 0, wxTOP|wxBOTTOM, 5 );
+
+
+        m_panel6421->SetSizer( bSizer1411 );
+        m_panel6421->Layout();
+        bSizer1411->Fit( m_panel6421 );
+        bSizer85->Add( m_panel6421, 0, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer85 );
+        m_pBody->Layout();
+        bSizer85->Fit( m_pBody );
+        bSizer11->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer31;
+        bSizer31 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button37 = new wxButton( m_pFooter, wxID_OK, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button37->SetDefault();
+        bSizer31->Add( m_button37, 0, wxALL, 5 );
+
+        m_button38 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer31->Add( m_button38, 0, wxALL, 5 );
+
+
+        m_pFooter->SetSizer( bSizer31 );
+        m_pFooter->Layout();
+        bSizer31->Fit( m_pFooter );
+        bSizer11->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer11 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pCheckAuthentication->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ProxySettingsDialogBase::OnCheckAuthentication ), NULL, this );
+        m_button37->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProxySettingsDialogBase::OnOkClick ), NULL, this );
+        m_button38->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProxySettingsDialogBase::OnCancelClick ), NULL, this );
+}
+
+ProxySettingsDialogBase::~ProxySettingsDialogBase()
+{
+        // Disconnect Events
+        m_pCheckAuthentication->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( ProxySettingsDialogBase::OnCheckAuthentication ), NULL, this );
+        m_button37->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProxySettingsDialogBase::OnOkClick ), NULL, this );
+        m_button38->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProxySettingsDialogBase::OnCancelClick ), NULL, this );
+
+}
+
+LocalDatabaseConfigurationPanelBase::LocalDatabaseConfigurationPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelDicomDir = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelDicomDir->SetToolTip( _("DICOM Dir") );
+
+        wxBoxSizer* bSizer30;
+        bSizer30 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticTextExplicacion = new wxStaticText( m_pPanelDicomDir, wxID_ANY, _("DICOM Dir is the local directory where history is stored"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticTextExplicacion->Wrap( 440 );
+        bSizer30->Add( m_staticTextExplicacion, 0, wxEXPAND|wxBOTTOM|wxRIGHT, 5 );
+
+        wxFlexGridSizer* fgSizer9;
+        fgSizer9 = new wxFlexGridSizer( 0, 3, 0, 0 );
+        fgSizer9->AddGrowableCol( 1 );
+        fgSizer9->SetFlexibleDirection( wxBOTH );
+        fgSizer9->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText32 = new wxStaticText( m_pPanelDicomDir, wxID_ANY, _("DICOM Dir"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText32->Wrap( -1 );
+        fgSizer9->Add( m_staticText32, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+        m_pDICOMDir = new wxTextCtrl( m_pPanelDicomDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pDICOMDir->SetMaxLength( 0 );
+        fgSizer9->Add( m_pDICOMDir, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_buttonSeleccionarDICOMDir = new wxButton( m_pPanelDicomDir, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        fgSizer9->Add( m_buttonSeleccionarDICOMDir, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+        bSizer30->Add( fgSizer9, 1, wxEXPAND, 5 );
+
+        m_pstaticTextAdvertencia = new wxStaticText( m_pPanelDicomDir, wxID_ANY, _("Warning, to update the directory, you have to close every opened series"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstaticTextAdvertencia->Wrap( 440 );
+        m_pstaticTextAdvertencia->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+        m_pstaticTextAdvertencia->SetForegroundColour( wxColour( 210, 0, 0 ) );
+
+        bSizer30->Add( m_pstaticTextAdvertencia, 0, wxEXPAND|wxTOP, 5 );
+
+        wxStaticBoxSizer* sbSizer7;
+        sbSizer7 = new wxStaticBoxSizer( new wxStaticBox( m_pPanelDicomDir, wxID_ANY, _("Auto-cleaning") ), wxVERTICAL );
+
+        wxFlexGridSizer* fgSizer20;
+        fgSizer20 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer20->AddGrowableCol( 0 );
+        fgSizer20->SetFlexibleDirection( wxBOTH );
+        fgSizer20->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_pCheckDeleteOlder = new wxCheckBox( m_pPanelDicomDir, wxID_ANY, _("Delete studies with acquisition date older than:"), wxDefaultPosition, wxDefaultSize, 0 );
+        fgSizer20->Add( m_pCheckDeleteOlder, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxArrayString m_pChoiceDeleteOlderChoices;
+        m_pChoiceDeleteOlder = new wxChoice( m_pPanelDicomDir, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pChoiceDeleteOlderChoices, 0 );
+        m_pChoiceDeleteOlder->SetSelection( 0 );
+        m_pChoiceDeleteOlder->Enable( false );
+
+        fgSizer20->Add( m_pChoiceDeleteOlder, 0, wxALL|wxEXPAND, 5 );
+
+        m_pCheckHDFreeSpace = new wxCheckBox( m_pPanelDicomDir, wxID_ANY, _("Delete older studies when hd free space is less than:"), wxDefaultPosition, wxDefaultSize, 0 );
+        fgSizer20->Add( m_pCheckHDFreeSpace, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxBoxSizer* bSizer106;
+        bSizer106 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pSpinHDSpace = new wxSpinCtrl( m_pPanelDicomDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 10, 2147483647, 10240 );
+        m_pSpinHDSpace->Enable( false );
+
+        bSizer106->Add( m_pSpinHDSpace, 0, wxALL, 5 );
+
+        m_staticText65 = new wxStaticText( m_pPanelDicomDir, wxID_ANY, _("MB"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText65->Wrap( -1 );
+        bSizer106->Add( m_staticText65, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+
+        fgSizer20->Add( bSizer106, 1, wxEXPAND, 5 );
+
+        m_pCheckDicomDirSize = new wxCheckBox( m_pPanelDicomDir, wxID_ANY, _("Delete studies when DICOM Dir size bigger than:"), wxDefaultPosition, wxDefaultSize, 0 );
+        fgSizer20->Add( m_pCheckDicomDirSize, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxBoxSizer* bSizer1061;
+        bSizer1061 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pSpinDicomDirSize = new wxSpinCtrl( m_pPanelDicomDir, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 10, 2147483647, 10240 );
+        m_pSpinDicomDirSize->Enable( false );
+
+        bSizer1061->Add( m_pSpinDicomDirSize, 0, wxALL, 5 );
+
+        m_staticText651 = new wxStaticText( m_pPanelDicomDir, wxID_ANY, _("MB"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText651->Wrap( -1 );
+        bSizer1061->Add( m_staticText651, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+
+        fgSizer20->Add( bSizer1061, 1, wxEXPAND, 5 );
+
+
+        sbSizer7->Add( fgSizer20, 1, wxEXPAND, 5 );
+
+        m_staticText68 = new wxStaticText( m_pPanelDicomDir, wxID_ANY, _("This feature only affects to studies COPIED to DICOM Dir and not in use"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText68->Wrap( -1 );
+        m_staticText68->SetFont( wxFont( 7, 70, 90, 90, false, wxEmptyString ) );
+
+        sbSizer7->Add( m_staticText68, 0, wxALL, 5 );
+
+
+        bSizer30->Add( sbSizer7, 0, wxEXPAND|wxTOP, 5 );
+
+        m_button66 = new wxButton( m_pPanelDicomDir, wxID_ANY, _("Reset to default"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer30->Add( m_button66, 0, wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        m_pPanelDicomDir->SetSizer( bSizer30 );
+        m_pPanelDicomDir->Layout();
+        bSizer30->Fit( m_pPanelDicomDir );
+        bSizer4->Add( m_pPanelDicomDir, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer4 );
+        this->Layout();
+
+        // Connect Events
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( LocalDatabaseConfigurationPanelBase::OnSize ) );
+        m_pDICOMDir->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnTextoCambiado ), NULL, this );
+        m_buttonSeleccionarDICOMDir->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnSeleccionarDirectorio ), NULL, this );
+        m_pCheckDeleteOlder->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnCheckOlderStudies ), NULL, this );
+        m_pChoiceDeleteOlder->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnOptionModified ), NULL, this );
+        m_pCheckHDFreeSpace->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnCheckHDSpace ), NULL, this );
+        m_pSpinHDSpace->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( LocalDatabaseConfigurationPanelBase::OnSpinCtrl ), NULL, this );
+        m_pSpinHDSpace->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnOptionModified ), NULL, this );
+        m_pCheckDicomDirSize->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnCheckDicomDirSize ), NULL, this );
+        m_pSpinDicomDirSize->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( LocalDatabaseConfigurationPanelBase::OnSpinCtrl ), NULL, this );
+        m_pSpinDicomDirSize->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnOptionModified ), NULL, this );
+        m_button66->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnResetToDefault ), NULL, this );
+}
+
+LocalDatabaseConfigurationPanelBase::~LocalDatabaseConfigurationPanelBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( LocalDatabaseConfigurationPanelBase::OnSize ) );
+        m_pDICOMDir->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnTextoCambiado ), NULL, this );
+        m_buttonSeleccionarDICOMDir->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnSeleccionarDirectorio ), NULL, this );
+        m_pCheckDeleteOlder->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnCheckOlderStudies ), NULL, this );
+        m_pChoiceDeleteOlder->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnOptionModified ), NULL, this );
+        m_pCheckHDFreeSpace->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnCheckHDSpace ), NULL, this );
+        m_pSpinHDSpace->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( LocalDatabaseConfigurationPanelBase::OnSpinCtrl ), NULL, this );
+        m_pSpinHDSpace->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnOptionModified ), NULL, this );
+        m_pCheckDicomDirSize->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnCheckDicomDirSize ), NULL, this );
+        m_pSpinDicomDirSize->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( LocalDatabaseConfigurationPanelBase::OnSpinCtrl ), NULL, this );
+        m_pSpinDicomDirSize->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnOptionModified ), NULL, this );
+        m_button66->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( LocalDatabaseConfigurationPanelBase::OnResetToDefault ), NULL, this );
+
+}
+
+PanelConfiguracionPACSBase::PanelConfiguracionPACSBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPACSLocal = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPACSLocal->SetToolTip( _("Local PACS") );
+
+        wxBoxSizer* bSizer36;
+        bSizer36 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticTextExplicacion = new wxStaticText( m_pPACSLocal, wxID_ANY, _("You must configure the local AET, which is used to communicate with the PACS server. The specified port must be opened in the firewall, as it is essential for transfers."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticTextExplicacion->Wrap( 440 );
+        m_staticTextExplicacion->SetMinSize( wxSize( 450,-1 ) );
+
+        bSizer36->Add( m_staticTextExplicacion, 0, wxEXPAND|wxBOTTOM, 8 );
+
+        wxFlexGridSizer* fgSizer2;
+        fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer2->AddGrowableCol( 1 );
+        fgSizer2->SetFlexibleDirection( wxBOTH );
+        fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText1 = new wxStaticText( m_pPACSLocal, wxID_ANY, _("Local AET"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText1->Wrap( -1 );
+        fgSizer2->Add( m_staticText1, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        wxBoxSizer* bSizer31;
+        bSizer31 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pAETLocal = new wxTextCtrl( m_pPACSLocal, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 300,-1 ), 0 );
+        m_pAETLocal->SetMaxLength( 0 );
+        bSizer31->Add( m_pAETLocal, 0, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pAETReal = new wxStaticText( m_pPACSLocal, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pAETReal->Wrap( -1 );
+        bSizer31->Add( m_pAETReal, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pHelpBitmap = new wxStaticBitmap( m_pPACSLocal, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pHelpBitmap->SetToolTip( _("For large-scale implementation in a homogenous environment, you can specify the following wildcards in the local AET:\n\t%IP IP Address\n\t%IP<n> n-th Octet (1~4)\n\t%HOSTNAME Host Name\"") );
+
+        bSizer31->Add( m_pHelpBitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        fgSizer2->Add( bSizer31, 1, wxEXPAND, 5 );
+
+        m_staticText11 = new wxStaticText( m_pPACSLocal, wxID_ANY, _("Port"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText11->Wrap( -1 );
+        fgSizer2->Add( m_staticText11, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pPuertoLocal = new wxTextCtrl( m_pPACSLocal, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pPuertoLocal->SetMaxLength( 0 );
+        fgSizer2->Add( m_pPuertoLocal, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        fgSizer2->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pBAdvanced = new wxButton( m_pPACSLocal, wxID_ANY, _("Advanced settings..."), wxDefaultPosition, wxDefaultSize, 0 );
+        fgSizer2->Add( m_pBAdvanced, 0, wxALIGN_RIGHT|wxTOP, 5 );
+
+
+        bSizer36->Add( fgSizer2, 0, wxEXPAND, 5 );
+
+
+        m_pPACSLocal->SetSizer( bSizer36 );
+        m_pPACSLocal->Layout();
+        bSizer36->Fit( m_pPACSLocal );
+        bSizer6->Add( m_pPACSLocal, 0, wxEXPAND, 5 );
+
+        m_pSep = new SubTitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer6->Add( m_pSep, 0, wxEXPAND, 5 );
+
+        m_pPACSServers = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPACSServers->SetToolTip( _("DICOM Nodes") );
+
+        wxBoxSizer* bSizer25;
+        bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pListPacs = new wxDataViewListCtrl(m_pPACSServers, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);
+        bSizer25->Add( m_pListPacs, 1, wxALL|wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer26;
+        bSizer26 = new wxBoxSizer( wxVERTICAL );
+
+        m_button3 = new wxButton( m_pPACSServers, wxID_ANY, _("New ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer26->Add( m_button3, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pEditButton = new wxButton( m_pPACSServers, wxID_ANY, _("Edit ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pEditButton->Enable( false );
+
+        bSizer26->Add( m_pEditButton, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pDelButton = new wxButton( m_pPACSServers, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pDelButton->Enable( false );
+
+        bSizer26->Add( m_pDelButton, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        bSizer26->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pDefaultButton = new wxButton( m_pPACSServers, wxID_ANY, _("Set Default"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pDefaultButton->Enable( false );
+
+        bSizer26->Add( m_pDefaultButton, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        bSizer25->Add( bSizer26, 0, wxEXPAND, 5 );
+
+
+        m_pPACSServers->SetSizer( bSizer25 );
+        m_pPACSServers->Layout();
+        bSizer25->Fit( m_pPACSServers );
+        bSizer6->Add( m_pPACSServers, 1, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer6 );
+        this->Layout();
+        bSizer6->Fit( this );
+
+        // Connect Events
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( PanelConfiguracionPACSBase::OnSize ) );
+        m_pAETLocal->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnTextoCambiado ), NULL, this );
+        m_pHelpBitmap->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( PanelConfiguracionPACSBase::OnHelpClick ), NULL, this );
+        m_pPuertoLocal->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnTextoCambiado ), NULL, this );
+        m_pBAdvanced->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnAdvancedLocal ), NULL, this );
+        m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnNuevoClick ), NULL, this );
+        m_pEditButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnEditarClick ), NULL, this );
+        m_pDelButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnEliminarClick ), NULL, this );
+        m_pDefaultButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnSetDefaultClick ), NULL, this );
+}
+
+PanelConfiguracionPACSBase::~PanelConfiguracionPACSBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PanelConfiguracionPACSBase::OnSize ) );
+        m_pAETLocal->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnTextoCambiado ), NULL, this );
+        m_pHelpBitmap->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( PanelConfiguracionPACSBase::OnHelpClick ), NULL, this );
+        m_pPuertoLocal->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnTextoCambiado ), NULL, this );
+        m_pBAdvanced->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnAdvancedLocal ), NULL, this );
+        m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnNuevoClick ), NULL, this );
+        m_pEditButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnEditarClick ), NULL, this );
+        m_pDelButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnEliminarClick ), NULL, this );
+        m_pDefaultButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPACSBase::OnSetDefaultClick ), NULL, this );
+
+}
+
+DialogoServidorPACSBase::DialogoServidorPACSBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 450,550 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer11;
+        bSizer11 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("DICOM Node") );
+
+        bSizer11->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_notebook1 = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+        m_panel6 = new BodyPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer85;
+        bSizer85 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel64 = new SubTitledPanel( m_panel6, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel64->SetToolTip( _("Settings") );
+
+        wxFlexGridSizer* fgSizer4;
+        fgSizer4 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer4->AddGrowableCol( 1 );
+        fgSizer4->SetFlexibleDirection( wxBOTH );
+        fgSizer4->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_pstaticText1 = new wxStaticText( m_panel64, wxID_ANY, _("Id"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstaticText1->Wrap( -1 );
+        fgSizer4->Add( m_pstaticText1, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pId = new wxTextCtrl( m_panel64, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 150,-1 ), 0 );
+        m_pId->SetMaxLength( 0 );
+        fgSizer4->Add( m_pId, 0, wxALL|wxEXPAND, 5 );
+
+        m_pstaticText2 = new wxStaticText( m_panel64, wxID_ANY, _("AET"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstaticText2->Wrap( -1 );
+        fgSizer4->Add( m_pstaticText2, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pAET = new wxTextCtrl( m_panel64, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 150,-1 ), 0 );
+        m_pAET->SetMaxLength( 0 );
+        fgSizer4->Add( m_pAET, 0, wxALL|wxEXPAND, 5 );
+
+        m_pstaticText3 = new wxStaticText( m_panel64, wxID_ANY, _("Host"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstaticText3->Wrap( -1 );
+        fgSizer4->Add( m_pstaticText3, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pHost = new wxTextCtrl( m_panel64, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 150,-1 ), 0 );
+        m_pHost->SetMaxLength( 0 );
+        fgSizer4->Add( m_pHost, 0, wxALIGN_CENTER_VERTICAL|wxALL|wxEXPAND, 5 );
+
+        m_pstaticText4 = new wxStaticText( m_panel64, wxID_ANY, _("Port"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstaticText4->Wrap( -1 );
+        fgSizer4->Add( m_pstaticText4, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pPuerto = new wxTextCtrl( m_panel64, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pPuerto->SetMaxLength( 0 );
+        fgSizer4->Add( m_pPuerto, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_staticText33 = new wxStaticText( m_panel64, wxID_ANY, _("PDU (KB)"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText33->Wrap( -1 );
+        fgSizer4->Add( m_staticText33, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pPDU = new wxSpinCtrl( m_panel64, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxSP_ARROW_KEYS, 4096, 16384, 16384 );
+        fgSizer4->Add( m_pPDU, 0, wxALL, 5 );
+
+        m_staticText48 = new wxStaticText( m_panel64, wxID_ANY, _("Retrieve method"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText48->Wrap( -1 );
+        fgSizer4->Add( m_staticText48, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxString m_pRetrieveMethodChoices[] = { _("Move"), _("Get"), _("WADO") };
+        int m_pRetrieveMethodNChoices = sizeof( m_pRetrieveMethodChoices ) / sizeof( wxString );
+        m_pRetrieveMethod = new wxChoice( m_panel64, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pRetrieveMethodNChoices, m_pRetrieveMethodChoices, 0 );
+        m_pRetrieveMethod->SetSelection( 0 );
+        fgSizer4->Add( m_pRetrieveMethod, 0, wxALL, 5 );
+
+        m_staticText59 = new wxStaticText( m_panel64, wxID_ANY, _("WADO URL"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText59->Wrap( -1 );
+        fgSizer4->Add( m_staticText59, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pWadoURL = new wxTextCtrl( m_panel64, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pWadoURL->SetMaxLength( 0 );
+        m_pWadoURL->Enable( false );
+
+        fgSizer4->Add( m_pWadoURL, 0, wxALL|wxEXPAND, 5 );
+
+        m_staticText60 = new wxStaticText( m_panel64, wxID_ANY, _("Retrieve mode"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText60->Wrap( -1 );
+        fgSizer4->Add( m_staticText60, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxString m_pRetrieveModeChoices[] = { _("Series"), _("Studies") };
+        int m_pRetrieveModeNChoices = sizeof( m_pRetrieveModeChoices ) / sizeof( wxString );
+        m_pRetrieveMode = new wxChoice( m_panel64, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pRetrieveModeNChoices, m_pRetrieveModeChoices, 0 );
+        m_pRetrieveMode->SetSelection( 0 );
+        fgSizer4->Add( m_pRetrieveMode, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_staticText57 = new wxStaticText( m_panel64, wxID_ANY, _("Reuse connection"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText57->Wrap( -1 );
+        fgSizer4->Add( m_staticText57, 0, wxALL, 5 );
+
+        m_pReuseConnection = new wxCheckBox( m_panel64, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pReuseConnection->SetToolTip( _("Reuse connections when is needed to make more than one queries") );
+
+        fgSizer4->Add( m_pReuseConnection, 0, wxALL, 5 );
+
+
+        m_panel64->SetSizer( fgSizer4 );
+        m_panel64->Layout();
+        fgSizer4->Fit( m_panel64 );
+        bSizer85->Add( m_panel64, 0, wxEXPAND, 5 );
+
+
+        m_panel6->SetSizer( bSizer85 );
+        m_panel6->Layout();
+        bSizer85->Fit( m_panel6 );
+        m_notebook1->AddPage( m_panel6, _("DICOM Node"), true );
+        m_pWorkListPanel = new BodyPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer104;
+        bSizer104 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel83 = new SubTitledPanel( m_pWorkListPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel83->SetToolTip( _("Worklists") );
+
+        wxBoxSizer* bSizer106;
+        bSizer106 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticText611 = new wxStaticText( m_panel83, wxID_ANY, _("Select how do you want to handle MPPS items"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText611->Wrap( -1 );
+        bSizer106->Add( m_staticText611, 0, wxALL, 5 );
+
+        m_pCheckDICOMMPPS = new wxCheckBox( m_panel83, wxID_ANY, _("DICOM MPPS"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pCheckDICOMMPPS->SetValue(true);
+        bSizer106->Add( m_pCheckDICOMMPPS, 0, wxALL, 5 );
+
+        m_pCheckHL7 = new wxCheckBox( m_panel83, wxID_ANY, _("HL7 messages"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer106->Add( m_pCheckHL7, 0, wxALL, 5 );
+
+        m_pPanelHL7 = new wxPanel( m_panel83, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pSizerHL7 = new wxStaticBoxSizer( new wxStaticBox( m_pPanelHL7, wxID_ANY, _("HL7") ), wxVERTICAL );
+
+        wxFlexGridSizer* fgSizer18;
+        fgSizer18 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer18->AddGrowableCol( 1 );
+        fgSizer18->SetFlexibleDirection( wxBOTH );
+        fgSizer18->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_pCheckAbort = new wxCheckBox( m_pPanelHL7, wxID_ANY, _("Abort message"), wxDefaultPosition, wxDefaultSize, 0 );
+        fgSizer18->Add( m_pCheckAbort, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pTextAbort = new wxTextCtrl( m_pPanelHL7, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+        fgSizer18->Add( m_pTextAbort, 1, wxALL|wxEXPAND, 5 );
+
+        m_pCheckCompleted = new wxCheckBox( m_pPanelHL7, wxID_ANY, _("Completed message"), wxDefaultPosition, wxDefaultSize, 0 );
+        fgSizer18->Add( m_pCheckCompleted, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pTextCompleted = new wxTextCtrl( m_pPanelHL7, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+        fgSizer18->Add( m_pTextCompleted, 0, wxALL|wxEXPAND, 5 );
+
+        m_pCheckInProgress = new wxCheckBox( m_pPanelHL7, wxID_ANY, _("In progress message"), wxDefaultPosition, wxDefaultSize, 0 );
+        fgSizer18->Add( m_pCheckInProgress, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pTextProgress = new wxTextCtrl( m_pPanelHL7, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+        fgSizer18->Add( m_pTextProgress, 0, wxALL|wxEXPAND, 5 );
+
+
+        fgSizer18->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button62 = new wxButton( m_pPanelHL7, wxID_ANY, _("Default values"), wxDefaultPosition, wxDefaultSize, 0 );
+        fgSizer18->Add( m_button62, 0, wxALL|wxALIGN_RIGHT, 5 );
+
+
+        m_pSizerHL7->Add( fgSizer18, 1, wxEXPAND, 5 );
+
+
+        m_pPanelHL7->SetSizer( m_pSizerHL7 );
+        m_pPanelHL7->Layout();
+        m_pSizerHL7->Fit( m_pPanelHL7 );
+        bSizer106->Add( m_pPanelHL7, 1, wxEXPAND | wxALL, 5 );
+
+
+        m_panel83->SetSizer( bSizer106 );
+        m_panel83->Layout();
+        bSizer106->Fit( m_panel83 );
+        bSizer104->Add( m_panel83, 0, wxEXPAND, 5 );
+
+
+        m_pWorkListPanel->SetSizer( bSizer104 );
+        m_pWorkListPanel->Layout();
+        bSizer104->Fit( m_pWorkListPanel );
+        m_notebook1->AddPage( m_pWorkListPanel, _("Worklist"), false );
+        m_pPanelSeguridad = new BodyPanel( m_notebook1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer81;
+        bSizer81 = new wxBoxSizer( wxVERTICAL );
+
+        m_pSSLTLS = new SubTitledPanel( m_pPanelSeguridad, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pSSLTLS->SetToolTip( _("SSL/TLS") );
+
+        wxBoxSizer* bSizer87;
+        bSizer87 = new wxBoxSizer( wxVERTICAL );
+
+        m_pVerifyServer = new wxCheckBox( m_pSSLTLS, wxID_ANY, _("Verify server credentials"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer87->Add( m_pVerifyServer, 0, wxALL, 5 );
+
+        m_pUseSSL = new wxCheckBox( m_pSSLTLS, wxID_ANY, _("Use SSL/TLS"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer87->Add( m_pUseSSL, 0, wxALL, 5 );
+
+        wxStaticBoxSizer* sbSizer6;
+        sbSizer6 = new wxStaticBoxSizer( new wxStaticBox( m_pSSLTLS, wxID_ANY, _("Certificate") ), wxHORIZONTAL );
+
+        m_staticText55 = new wxStaticText( m_pSSLTLS, wxID_ANY, _("Certificate to use in this connection"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText55->Wrap( -1 );
+        sbSizer6->Add( m_staticText55, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pBCert = new wxButton( m_pSSLTLS, wxID_ANY, _("Advanced Configuration ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        sbSizer6->Add( m_pBCert, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer87->Add( sbSizer6, 0, wxEXPAND|wxTOP, 5 );
+
+
+        m_pSSLTLS->SetSizer( bSizer87 );
+        m_pSSLTLS->Layout();
+        bSizer87->Fit( m_pSSLTLS );
+        bSizer81->Add( m_pSSLTLS, 0, wxEXPAND, 5 );
+
+        m_panelSep = new SubTitledPanelSeparatorV( m_pPanelSeguridad, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer81->Add( m_panelSep, 0, wxEXPAND, 5 );
+
+        m_panelUserPass = new SubTitledPanel( m_pPanelSeguridad, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panelUserPass->SetToolTip( _("User/Password") );
+
+        wxFlexGridSizer* fgSizer21;
+        fgSizer21 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer21->AddGrowableCol( 1 );
+        fgSizer21->SetFlexibleDirection( wxBOTH );
+        fgSizer21->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText61 = new wxStaticText( m_panelUserPass, wxID_ANY, _("User"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText61->Wrap( -1 );
+        fgSizer21->Add( m_staticText61, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pUser = new wxTextCtrl( m_panelUserPass, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pUser->SetMaxLength( 0 );
+        fgSizer21->Add( m_pUser, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+        m_staticText62 = new wxStaticText( m_panelUserPass, wxID_ANY, _("Password"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText62->Wrap( -1 );
+        fgSizer21->Add( m_staticText62, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pPassword = new wxTextCtrl( m_panelUserPass, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
+        m_pPassword->SetMaxLength( 0 );
+        fgSizer21->Add( m_pPassword, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+        m_panelUserPass->SetSizer( fgSizer21 );
+        m_panelUserPass->Layout();
+        fgSizer21->Fit( m_panelUserPass );
+        bSizer81->Add( m_panelUserPass, 0, wxEXPAND, 5 );
+
+        m_panelSep1 = new SubTitledPanelSeparatorV( m_pPanelSeguridad, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer81->Add( m_panelSep1, 0, wxEXPAND, 5 );
+
+        m_pPanelDefaultCharset = new SubTitledPanel( m_pPanelSeguridad, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelDefaultCharset->SetToolTip( _("Default charset") );
+
+        wxFlexGridSizer* fgSizer211;
+        fgSizer211 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer211->AddGrowableCol( 1 );
+        fgSizer211->SetFlexibleDirection( wxBOTH );
+        fgSizer211->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText131 = new wxStaticText( m_pPanelDefaultCharset, wxID_ANY, _("Default charset"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText131->Wrap( -1 );
+        fgSizer211->Add( m_staticText131, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pComboCharset = new wxComboBox( m_pPanelDefaultCharset, wxID_ANY, _("ISO_IR 100"), wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_READONLY|wxCB_SORT );
+        m_pComboCharset->Append( _("ISO_IR 192") );
+        m_pComboCharset->Append( _("ISO_IR 6") );
+        m_pComboCharset->Append( _("ISO_IR 100") );
+        m_pComboCharset->Append( _("ISO_IR 101") );
+        m_pComboCharset->Append( _("ISO_IR 109") );
+        m_pComboCharset->Append( _("ISO_IR 110") );
+        m_pComboCharset->Append( _("ISO_IR 126") );
+        m_pComboCharset->Append( _("ISO_IR 127") );
+        m_pComboCharset->Append( _("ISO_IR 138") );
+        m_pComboCharset->Append( _("ISO_IR 144") );
+        m_pComboCharset->Append( _("ISO_IR 148") );
+        fgSizer211->Add( m_pComboCharset, 1, wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+        m_pPanelDefaultCharset->SetSizer( fgSizer211 );
+        m_pPanelDefaultCharset->Layout();
+        fgSizer211->Fit( m_pPanelDefaultCharset );
+        bSizer81->Add( m_pPanelDefaultCharset, 0, wxEXPAND, 5 );
+
+
+        m_pPanelSeguridad->SetSizer( bSizer81 );
+        m_pPanelSeguridad->Layout();
+        bSizer81->Fit( m_pPanelSeguridad );
+        m_notebook1->AddPage( m_pPanelSeguridad, _("Advanced"), false );
+
+        bSizer11->Add( m_notebook1, 1, wxEXPAND|wxTOP, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer31;
+        bSizer31 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_button20 = new wxButton( m_pFooter, wxID_ANY, _("Test connection"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer31->Add( m_button20, 0, wxALIGN_RIGHT|wxALL|wxBOTTOM|wxLEFT|wxTOP, 5 );
+
+
+        bSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button37 = new wxButton( m_pFooter, wxID_OK, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer31->Add( m_button37, 0, wxALL, 5 );
+
+        m_button38 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer31->Add( m_button38, 0, wxALL, 5 );
+
+
+        m_pFooter->SetSizer( bSizer31 );
+        m_pFooter->Layout();
+        bSizer31->Fit( m_pFooter );
+        bSizer11->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer11 );
+        this->Layout();
+
+        // Connect Events
+        m_pRetrieveMethod->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DialogoServidorPACSBase::OnRetrieveMethodChoice ), NULL, this );
+        m_pCheckHL7->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnChecWL ), NULL, this );
+        m_pCheckAbort->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnChecWL ), NULL, this );
+        m_pCheckCompleted->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnChecWL ), NULL, this );
+        m_pCheckInProgress->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnChecWL ), NULL, this );
+        m_button62->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnMessageDefaultValues ), NULL, this );
+        m_pBCert->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnAdvancedConfiguration ), NULL, this );
+        m_pComboCharset->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DialogoServidorPACSBase::OnTextoCambiado ), NULL, this );
+        m_button20->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnProbarClick ), NULL, this );
+        m_button37->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnOkClick ), NULL, this );
+        m_button38->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnCancelClick ), NULL, this );
+}
+
+DialogoServidorPACSBase::~DialogoServidorPACSBase()
+{
+        // Disconnect Events
+        m_pRetrieveMethod->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DialogoServidorPACSBase::OnRetrieveMethodChoice ), NULL, this );
+        m_pCheckHL7->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnChecWL ), NULL, this );
+        m_pCheckAbort->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnChecWL ), NULL, this );
+        m_pCheckCompleted->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnChecWL ), NULL, this );
+        m_pCheckInProgress->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnChecWL ), NULL, this );
+        m_button62->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnMessageDefaultValues ), NULL, this );
+        m_pBCert->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnAdvancedConfiguration ), NULL, this );
+        m_pComboCharset->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( DialogoServidorPACSBase::OnTextoCambiado ), NULL, this );
+        m_button20->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnProbarClick ), NULL, this );
+        m_button37->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnOkClick ), NULL, this );
+        m_button38->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoServidorPACSBase::OnCancelClick ), NULL, this );
+
+}
+
+DialogoLocalPACSBase::DialogoLocalPACSBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 346,300 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer71;
+        bSizer71 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel51 = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer80;
+        bSizer80 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel67 = new TitledPanel( m_panel51, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel67->SetToolTip( _("Security") );
+
+        wxBoxSizer* bSizer81;
+        bSizer81 = new wxBoxSizer( wxVERTICAL );
+
+        m_pVerifyServer = new wxCheckBox( m_panel67, wxID_ANY, _("Verify client credentials"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer81->Add( m_pVerifyServer, 0, wxALL, 5 );
+
+        m_pUseTLS = new wxCheckBox( m_panel67, wxID_ANY, _("Use SSL/TLS"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer81->Add( m_pUseTLS, 0, wxALL, 5 );
+
+        wxStaticBoxSizer* sbSizer5;
+        sbSizer5 = new wxStaticBoxSizer( new wxStaticBox( m_panel67, wxID_ANY, _("Local AET certificate") ), wxVERTICAL );
+
+        wxFlexGridSizer* fgSizer36;
+        fgSizer36 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer36->AddGrowableCol( 0 );
+        fgSizer36->SetFlexibleDirection( wxBOTH );
+        fgSizer36->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText55 = new wxStaticText( m_panel67, wxID_ANY, _("Certificate used by Ginkgo CADx"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText55->Wrap( -1 );
+        fgSizer36->Add( m_staticText55, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+        m_pBCert = new wxButton( m_panel67, wxID_ANY, _("Import ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        fgSizer36->Add( m_pBCert, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+        sbSizer5->Add( fgSizer36, 1, wxEXPAND, 5 );
+
+
+        bSizer81->Add( sbSizer5, 0, wxEXPAND|wxTOP, 5 );
+
+
+        m_panel67->SetSizer( bSizer81 );
+        m_panel67->Layout();
+        bSizer81->Fit( m_panel67 );
+        bSizer80->Add( m_panel67, 1, wxEXPAND, 5 );
+
+
+        m_panel51->SetSizer( bSizer80 );
+        m_panel51->Layout();
+        bSizer80->Fit( m_panel51 );
+        bSizer71->Add( m_panel51, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer19;
+        bSizer19 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer19->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button8 = new wxButton( m_pFooter, wxID_OK, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer19->Add( m_button8, 0, wxRIGHT, 5 );
+
+        m_button9 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer19->Add( m_button9, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer19 );
+        m_pFooter->Layout();
+        bSizer19->Fit( m_pFooter );
+        bSizer71->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer71 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pBCert->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoLocalPACSBase::OnEditCertificate ), NULL, this );
+        m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoLocalPACSBase::OnAceptarClick ), NULL, this );
+}
+
+DialogoLocalPACSBase::~DialogoLocalPACSBase()
+{
+        // Disconnect Events
+        m_pBCert->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoLocalPACSBase::OnEditCertificate ), NULL, this );
+        m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoLocalPACSBase::OnAceptarClick ), NULL, this );
+
+}
+
+PanelConfiguracionHCEBase::PanelConfiguracionHCEBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetMinSize( wxSize( 450,-1 ) );
+
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHCE = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHCE->SetToolTip( _("Gingo CADx Application ID used to fill MSH.3 field") );
+
+        wxBoxSizer* bSizer38;
+        bSizer38 = new wxBoxSizer( wxVERTICAL );
+
+        wxFlexGridSizer* fgSizer21;
+        fgSizer21 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer21->AddGrowableCol( 1 );
+        fgSizer21->SetFlexibleDirection( wxBOTH );
+        fgSizer21->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_pstIdOrganizacionReceptora = new wxStaticText( m_pHCE, wxID_ANY, _("Receiver organization Id"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstIdOrganizacionReceptora->Wrap( -1 );
+        m_pstIdOrganizacionReceptora->SetToolTip( _("Unique identifier of the organization receiving the message.") );
+
+        fgSizer21->Add( m_pstIdOrganizacionReceptora, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pIdOrganizacionReceptora = new wxTextCtrl( m_pHCE, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+        m_pIdOrganizacionReceptora->SetMaxLength( 0 );
+        m_pIdOrganizacionReceptora->SetToolTip( _("Unique identifier of the organization receiving the message.") );
+
+        fgSizer21->Add( m_pIdOrganizacionReceptora, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pstIdSistemaPeticionario = new wxStaticText( m_pHCE, wxID_ANY, _("Petitioner System Id"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstIdSistemaPeticionario->Wrap( -1 );
+        m_pstIdSistemaPeticionario->SetToolTip( _("Unique identifier of the requesting system.") );
+
+        fgSizer21->Add( m_pstIdSistemaPeticionario, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pIdSistemaPeticionario = new wxTextCtrl( m_pHCE, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pIdSistemaPeticionario->SetMaxLength( 0 );
+        m_pIdSistemaPeticionario->SetToolTip( _("Unique identifier of the requesting system.") );
+
+        fgSizer21->Add( m_pIdSistemaPeticionario, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pstIdAplicacionRellenadora = new wxStaticText( m_pHCE, wxID_ANY, _("Filler Application Id"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstIdAplicacionRellenadora->Wrap( -1 );
+        m_pstIdAplicacionRellenadora->SetToolTip( _("Unique identifier of the filler application (SIID/Ginkgo CADx).") );
+
+        fgSizer21->Add( m_pstIdAplicacionRellenadora, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pIdAplicacionRellenadora = new wxTextCtrl( m_pHCE, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pIdAplicacionRellenadora->SetMaxLength( 0 );
+        m_pIdAplicacionRellenadora->SetToolTip( _("Unique identifier of the filler application (SIID/Ginkgo).") );
+
+        fgSizer21->Add( m_pIdAplicacionRellenadora, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pstIdAplicacionPACS = new wxStaticText( m_pHCE, wxID_ANY, _("Ginkgo CADx Application Id"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstIdAplicacionPACS->Wrap( -1 );
+        m_pstIdAplicacionPACS->SetToolTip( _("Unique identifier of the Picture Archiving and Communication System Application (SIID/PACS).") );
+
+        fgSizer21->Add( m_pstIdAplicacionPACS, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
+
+        m_pIdGinkgoAplication = new wxTextCtrl( m_pHCE, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pIdGinkgoAplication->SetMaxLength( 0 );
+        m_pIdGinkgoAplication->SetToolTip( _("Unique identifier of the Picture Archiving and Communication System Application (SIID/PACS).") );
+
+        fgSizer21->Add( m_pIdGinkgoAplication, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxLEFT, 5 );
+
+
+        bSizer38->Add( fgSizer21, 1, wxEXPAND, 5 );
+
+
+        m_pHCE->SetSizer( bSizer38 );
+        m_pHCE->Layout();
+        bSizer38->Fit( m_pHCE );
+        bSizer6->Add( m_pHCE, 0, wxEXPAND, 5 );
+
+        m_pSep = new SubTitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer6->Add( m_pSep, 0, wxEXPAND, 5 );
+
+        m_pIntegrationEngine = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pIntegrationEngine->SetToolTip( _("Integration engine") );
+
+        wxBoxSizer* bSizer24;
+        bSizer24 = new wxBoxSizer( wxVERTICAL );
+
+        wxFlexGridSizer* fgSizer20;
+        fgSizer20 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer20->AddGrowableCol( 1 );
+        fgSizer20->SetFlexibleDirection( wxBOTH );
+        fgSizer20->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText121 = new wxStaticText( m_pIntegrationEngine, wxID_ANY, _("Hostname / Port"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText121->Wrap( -1 );
+        m_staticText121->SetToolTip( _("Hostname (IP or DNS) integration engine") );
+
+        fgSizer20->Add( m_staticText121, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        wxBoxSizer* bSizer74;
+        bSizer74 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pHostnameMI = new wxTextCtrl( m_pIntegrationEngine, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0 );
+        m_pHostnameMI->SetMaxLength( 0 );
+        bSizer74->Add( m_pHostnameMI, 3, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxALL, 5 );
+
+        m_staticText60 = new wxStaticText( m_pIntegrationEngine, wxID_ANY, _("/"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText60->Wrap( -1 );
+        bSizer74->Add( m_staticText60, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pPuertoMI = new wxTextCtrl( m_pIntegrationEngine, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pPuertoMI->SetMaxLength( 0 );
+        bSizer74->Add( m_pPuertoMI, 1, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        fgSizer20->Add( bSizer74, 1, wxEXPAND, 5 );
+
+        m_staticText38 = new wxStaticText( m_pIntegrationEngine, wxID_ANY, _("Protocol"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText38->Wrap( -1 );
+        m_staticText38->SetToolTip( _("Integration Engine's Transport Layer Protocol") );
+
+        fgSizer20->Add( m_staticText38, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        wxBoxSizer* bSizer75;
+        bSizer75 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxString m_pProtocoloChoices[] = { _("MLLP") };
+        int m_pProtocoloNChoices = sizeof( m_pProtocoloChoices ) / sizeof( wxString );
+        m_pProtocolo = new wxChoice( m_pIntegrationEngine, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pProtocoloNChoices, m_pProtocoloChoices, 0 );
+        m_pProtocolo->SetSelection( 0 );
+        bSizer75->Add( m_pProtocolo, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+
+
+        bSizer75->Add( 30, 0, 0, wxEXPAND, 5 );
+
+        m_staticText39 = new wxStaticText( m_pIntegrationEngine, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText39->Wrap( -1 );
+        m_staticText39->SetToolTip( _("Message's format") );
+
+        bSizer75->Add( m_staticText39, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        wxString m_pFormatoChoices[] = { _("ER7") };
+        int m_pFormatoNChoices = sizeof( m_pFormatoChoices ) / sizeof( wxString );
+        m_pFormato = new wxChoice( m_pIntegrationEngine, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pFormatoNChoices, m_pFormatoChoices, 0 );
+        m_pFormato->SetSelection( 0 );
+        bSizer75->Add( m_pFormato, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        bSizer75->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_button15 = new wxButton( m_pIntegrationEngine, wxID_ANY, _("Test engine"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button15->SetToolTip( _("Test Integration Engine connectivity") );
+
+        bSizer75->Add( m_button15, 0, wxTOP|wxLEFT|wxALIGN_RIGHT, 5 );
+
+
+        fgSizer20->Add( bSizer75, 1, wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        bSizer24->Add( fgSizer20, 1, wxEXPAND, 5 );
+
+
+        m_pIntegrationEngine->SetSizer( bSizer24 );
+        m_pIntegrationEngine->Layout();
+        bSizer24->Fit( m_pIntegrationEngine );
+        bSizer6->Add( m_pIntegrationEngine, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer6 );
+        this->Layout();
+
+        // Connect Events
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( PanelConfiguracionHCEBase::OnSize ) );
+        m_pIdOrganizacionReceptora->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_pIdSistemaPeticionario->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_pIdAplicacionRellenadora->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_pIdGinkgoAplication->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_pHostnameMI->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_pPuertoMI->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_button15->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTestClick ), NULL, this );
+}
+
+PanelConfiguracionHCEBase::~PanelConfiguracionHCEBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PanelConfiguracionHCEBase::OnSize ) );
+        m_pIdOrganizacionReceptora->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_pIdSistemaPeticionario->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_pIdAplicacionRellenadora->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_pIdGinkgoAplication->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_pHostnameMI->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_pPuertoMI->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTextoCambiado ), NULL, this );
+        m_button15->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionHCEBase::OnTestClick ), NULL, this );
+
+}
+
+PanelConfiguracionExtensionesBase::PanelConfiguracionExtensionesBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetMinSize( wxSize( 450,-1 ) );
+
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_pExtensions = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pExtensions->SetToolTip( _("Extensions") );
+
+        wxBoxSizer* bSizer44;
+        bSizer44 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer85;
+        bSizer85 = new wxBoxSizer( wxVERTICAL );
+
+        m_pScrollPanelExtensions = new wxScrolledWindow( m_pExtensions, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+        m_pScrollPanelExtensions->SetScrollRate( 5, 5 );
+        wxBoxSizer* bSizer84;
+        bSizer84 = new wxBoxSizer( wxVERTICAL );
+
+
+        m_pScrollPanelExtensions->SetSizer( bSizer84 );
+        m_pScrollPanelExtensions->Layout();
+        bSizer84->Fit( m_pScrollPanelExtensions );
+        bSizer85->Add( m_pScrollPanelExtensions, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
+
+
+        bSizer44->Add( bSizer85, 1, wxEXPAND, 5 );
+
+
+        m_pExtensions->SetSizer( bSizer44 );
+        m_pExtensions->Layout();
+        bSizer44->Fit( m_pExtensions );
+        bSizer6->Add( m_pExtensions, 1, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer6 );
+        this->Layout();
+        bSizer6->Fit( this );
+
+        // Connect Events
+        this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PanelConfiguracionExtensionesBase::OnEraseBackground ) );
+        m_pExtensions->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PanelConfiguracionExtensionesBase::OnEraseBackground ), NULL, this );
+}
+
+PanelConfiguracionExtensionesBase::~PanelConfiguracionExtensionesBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PanelConfiguracionExtensionesBase::OnEraseBackground ) );
+        m_pExtensions->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PanelConfiguracionExtensionesBase::OnEraseBackground ), NULL, this );
+
+}
+
+ExtensionPanelBase::ExtensionPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : GinkgoBoxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer80;
+        bSizer80 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pThumbnail = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pThumbnail->SetMinSize( wxSize( 50,50 ) );
+
+        bSizer80->Add( m_pThumbnail, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxBoxSizer* bSizer81;
+        bSizer81 = new wxBoxSizer( wxVERTICAL );
+
+        m_pLabelTitle = new wxStaticText( this, wxID_ANY, _("Ginkgo Extension Title"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelTitle->Wrap( -1 );
+        m_pLabelTitle->SetFont( wxFont( 12, 70, 90, 92, false, wxEmptyString ) );
+        m_pLabelTitle->SetForegroundColour( wxColour( 63, 63, 63 ) );
+
+        bSizer81->Add( m_pLabelTitle, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+
+        bSizer80->Add( bSizer81, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+        this->SetSizer( bSizer80 );
+        this->Layout();
+        bSizer80->Fit( this );
+}
+
+ExtensionPanelBase::~ExtensionPanelBase()
+{
+}
+
+DialogoEditarCertificadoBase::DialogoEditarCertificadoBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 450,550 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer83;
+        bSizer83 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer86;
+        bSizer86 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelDefault = new SubTitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelDefault->SetToolTip( _("Edit public key") );
+
+        wxBoxSizer* bSizer872;
+        bSizer872 = new wxBoxSizer( wxVERTICAL );
+
+        m_pCheckDefault = new wxCheckBox( m_pPanelDefault, wxID_ANY, _("Use default certificate (certificate configured in local AET settings)"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer872->Add( m_pCheckDefault, 0, 0, 5 );
+
+
+        m_pPanelDefault->SetSizer( bSizer872 );
+        m_pPanelDefault->Layout();
+        bSizer872->Fit( m_pPanelDefault );
+        bSizer86->Add( m_pPanelDefault, 0, wxEXPAND, 5 );
+
+        m_pSepDefault = new SubTitledPanelSeparatorV( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer86->Add( m_pSepDefault, 0, wxEXPAND | wxALL, 5 );
+
+        m_pPanelPublic = new SubTitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelPublic->SetToolTip( _("Public key") );
+
+        wxBoxSizer* bSizer87;
+        bSizer87 = new wxBoxSizer( wxVERTICAL );
+
+        m_pLabel = new wxStaticText( m_pPanelPublic, wxID_ANY, _("Public key in PEM format"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->Wrap( -1 );
+        bSizer87->Add( m_pLabel, 0, wxBOTTOM|wxRIGHT, 5 );
+
+        m_pTextoCertificado = new wxTextCtrl( m_pPanelPublic, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+        bSizer87->Add( m_pTextoCertificado, 1, wxEXPAND|wxTOP|wxBOTTOM, 5 );
+
+        m_button62 = new wxButton( m_pPanelPublic, wxID_ANY, _("Load ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer87->Add( m_button62, 0, wxALIGN_RIGHT|wxTOP, 5 );
+
+
+        m_pPanelPublic->SetSizer( bSizer87 );
+        m_pPanelPublic->Layout();
+        bSizer87->Fit( m_pPanelPublic );
+        bSizer86->Add( m_pPanelPublic, 1, wxEXPAND, 5 );
+
+        m_panel60 = new SubTitledPanelSeparatorV( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer86->Add( m_panel60, 0, wxEXPAND, 5 );
+
+        m_pPanelPrivate = new SubTitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelPrivate->SetToolTip( _("Private key") );
+
+        wxBoxSizer* bSizer871;
+        bSizer871 = new wxBoxSizer( wxVERTICAL );
+
+        m_pLabel11 = new wxStaticText( m_pPanelPrivate, wxID_ANY, _("Private key in PEM format"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel11->Wrap( -1 );
+        bSizer871->Add( m_pLabel11, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pTextoPrivateKey = new wxTextCtrl( m_pPanelPrivate, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+        bSizer871->Add( m_pTextoPrivateKey, 1, wxEXPAND|wxTOP, 5 );
+
+        m_button621 = new wxButton( m_pPanelPrivate, wxID_ANY, _("Load ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer871->Add( m_button621, 0, wxALIGN_RIGHT|wxTOP, 5 );
+
+
+        m_pPanelPrivate->SetSizer( bSizer871 );
+        m_pPanelPrivate->Layout();
+        bSizer871->Fit( m_pPanelPrivate );
+        bSizer86->Add( m_pPanelPrivate, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer86 );
+        m_pBody->Layout();
+        bSizer86->Fit( m_pBody );
+        bSizer83->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer19;
+        bSizer19 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_button48 = new wxButton( m_pFooter, wxID_ANY, _("Reset to default"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer19->Add( m_button48, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer19->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button8 = new wxButton( m_pFooter, wxID_OK, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer19->Add( m_button8, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_button9 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer19->Add( m_button9, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pFooter->SetSizer( bSizer19 );
+        m_pFooter->Layout();
+        bSizer19->Fit( m_pFooter );
+        bSizer83->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer83 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pCheckDefault->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DialogoEditarCertificadoBase::OnCheckDefault ), NULL, this );
+        m_button62->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoEditarCertificadoBase::OnLoadPublicClick ), NULL, this );
+        m_button621->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoEditarCertificadoBase::OnLoadPrivateClick ), NULL, this );
+        m_button48->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoEditarCertificadoBase::OnResetToDefault ), NULL, this );
+        m_button8->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoEditarCertificadoBase::OnAceptarClick ), NULL, this );
+}
+
+DialogoEditarCertificadoBase::~DialogoEditarCertificadoBase()
+{
+        // Disconnect Events
+        m_pCheckDefault->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DialogoEditarCertificadoBase::OnCheckDefault ), NULL, this );
+        m_button62->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoEditarCertificadoBase::OnLoadPublicClick ), NULL, this );
+        m_button621->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoEditarCertificadoBase::OnLoadPrivateClick ), NULL, this );
+        m_button48->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoEditarCertificadoBase::OnResetToDefault ), NULL, this );
+        m_button8->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoEditarCertificadoBase::OnAceptarClick ), NULL, this );
+
+}
+
+ProfileDialogBase::ProfileDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 770,540 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer53;
+        bSizer53 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBasePanel = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer44;
+        bSizer44 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTitledPanel = new TitledPanel( m_pBasePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pTitledPanel->SetToolTip( _("Profile") );
+
+        wxBoxSizer* bSizer43;
+        bSizer43 = new wxBoxSizer( wxVERTICAL );
+
+        wxFlexGridSizer* fgSizer14;
+        fgSizer14 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer14->AddGrowableCol( 1 );
+        fgSizer14->SetFlexibleDirection( wxBOTH );
+        fgSizer14->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText47 = new wxStaticText( m_pTitledPanel, wxID_ANY, _("Profile name"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText47->Wrap( -1 );
+        fgSizer14->Add( m_staticText47, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pName = new wxTextCtrl( m_pTitledPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pName->SetMaxLength( 0 );
+        fgSizer14->Add( m_pName, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+        bSizer43->Add( fgSizer14, 0, wxEXPAND|wxBOTTOM, 5 );
+
+        m_pGridPermisos = new wxPropertyGrid(
+                m_pTitledPanel,
+                wxID_ANY,
+                wxDefaultPosition,
+                wxDefaultSize,
+                wxPG_AUTO_SORT |
+                wxPG_SPLITTER_AUTO_CENTER|
+                wxPG_DEFAULT_STYLE
+        );
+        bSizer43->Add( m_pGridPermisos, 1, wxALL|wxEXPAND, 5 );
+
+
+        m_pTitledPanel->SetSizer( bSizer43 );
+        m_pTitledPanel->Layout();
+        bSizer43->Fit( m_pTitledPanel );
+        bSizer44->Add( m_pTitledPanel, 1, wxEXPAND, 5 );
+
+
+        m_pBasePanel->SetSizer( bSizer44 );
+        m_pBasePanel->Layout();
+        bSizer44->Fit( m_pBasePanel );
+        bSizer53->Add( m_pBasePanel, 1, wxEXPAND, 5 );
+
+        m_pFooterPanel = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer54;
+        bSizer54 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer54->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button28 = new wxButton( m_pFooterPanel, wxID_ANY, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button28->SetDefault();
+        bSizer54->Add( m_button28, 0, wxRIGHT, 5 );
+
+        m_button29 = new wxButton( m_pFooterPanel, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer54->Add( m_button29, 0, wxLEFT, 5 );
+
+
+        m_pFooterPanel->SetSizer( bSizer54 );
+        m_pFooterPanel->Layout();
+        bSizer54->Fit( m_pFooterPanel );
+        bSizer53->Add( m_pFooterPanel, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer53 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_button28->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProfileDialogBase::OnOkClick ), NULL, this );
+        m_button29->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProfileDialogBase::OnCancelClick ), NULL, this );
+}
+
+ProfileDialogBase::~ProfileDialogBase()
+{
+        // Disconnect Events
+        m_button28->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProfileDialogBase::OnOkClick ), NULL, this );
+        m_button29->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ProfileDialogBase::OnCancelClick ), NULL, this );
+
+}
+
+PanelConfiguracionPermisosBase::PanelConfiguracionPermisosBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetMinSize( wxSize( 450,-1 ) );
+
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBasePanel = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pBasePanel->SetToolTip( _("Profiles") );
+
+        wxBoxSizer* bSizer25;
+        bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pListProfiles = new wxDataViewListCtrl(m_pBasePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);
+        bSizer25->Add( m_pListProfiles, 1, wxALL|wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer26;
+        bSizer26 = new wxBoxSizer( wxVERTICAL );
+
+        m_button3 = new wxButton( m_pBasePanel, wxID_ANY, _("New ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer26->Add( m_button3, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pBEdit = new wxButton( m_pBasePanel, wxID_ANY, _("Edit ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBEdit->Enable( false );
+
+        bSizer26->Add( m_pBEdit, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pBDelete = new wxButton( m_pBasePanel, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBDelete->Enable( false );
+
+        bSizer26->Add( m_pBDelete, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        bSizer26->Add( 0, 0, 1, wxEXPAND|wxRIGHT, 5 );
+
+        m_pBActive = new wxButton( m_pBasePanel, wxID_ANY, _("Set active"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer26->Add( m_pBActive, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        bSizer25->Add( bSizer26, 0, wxEXPAND, 5 );
+
+
+        m_pBasePanel->SetSizer( bSizer25 );
+        m_pBasePanel->Layout();
+        bSizer25->Fit( m_pBasePanel );
+        bSizer6->Add( m_pBasePanel, 1, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer6 );
+        this->Layout();
+
+        // Connect Events
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( PanelConfiguracionPermisosBase::OnSize ) );
+        m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPermisosBase::OnNuevoClick ), NULL, this );
+        m_pBEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPermisosBase::OnEditarClick ), NULL, this );
+        m_pBDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPermisosBase::OnEliminarClick ), NULL, this );
+        m_pBActive->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPermisosBase::OnSetActive ), NULL, this );
+}
+
+PanelConfiguracionPermisosBase::~PanelConfiguracionPermisosBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PanelConfiguracionPermisosBase::OnSize ) );
+        m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPermisosBase::OnNuevoClick ), NULL, this );
+        m_pBEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPermisosBase::OnEditarClick ), NULL, this );
+        m_pBDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPermisosBase::OnEliminarClick ), NULL, this );
+        m_pBActive->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionPermisosBase::OnSetActive ), NULL, this );
+
+}
+
+PanelConfiguracionUbicacionesBase::PanelConfiguracionUbicacionesBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetMinSize( wxSize( 450,-1 ) );
+
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_pUbicaciones = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pUbicaciones->SetToolTip( _("Locations") );
+
+        wxBoxSizer* bSizer63;
+        bSizer63 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer76;
+        bSizer76 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_staticTextExplicacion = new wxStaticText( m_pUbicaciones, wxID_ANY, _("Locations are predefined paths to set locations from well known paths (ex: remote shared disk)"), wxDefaultPosition, wxDefaultSize, wxST_NO_AUTORESIZE );
+        m_staticTextExplicacion->Wrap( 430 );
+        bSizer76->Add( m_staticTextExplicacion, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer63->Add( bSizer76, 0, wxEXPAND, 5 );
+
+        wxBoxSizer* m_pMainSizer;
+        m_pMainSizer = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pListUbicaciones = new wxDataViewListCtrl(m_pUbicaciones, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);
+        m_pMainSizer->Add( m_pListUbicaciones, 1, wxALL|wxEXPAND, 5 );
+
+        wxBoxSizer* m_pSizerBotonera;
+        m_pSizerBotonera = new wxBoxSizer( wxVERTICAL );
+
+        m_pBotonNuevo = new wxButton( m_pUbicaciones, wxID_ANY, _("New ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pSizerBotonera->Add( m_pBotonNuevo, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pBotonEdit = new wxButton( m_pUbicaciones, wxID_ANY, _("Edit ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBotonEdit->Enable( false );
+
+        m_pSizerBotonera->Add( m_pBotonEdit, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pBotonDelete = new wxButton( m_pUbicaciones, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBotonDelete->Enable( false );
+
+        m_pSizerBotonera->Add( m_pBotonDelete, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        m_pSizerBotonera->Add( 0, 0, 1, wxEXPAND|wxRIGHT, 5 );
+
+
+        m_pMainSizer->Add( m_pSizerBotonera, 0, wxEXPAND, 5 );
+
+
+        bSizer63->Add( m_pMainSizer, 1, wxEXPAND, 5 );
+
+
+        m_pUbicaciones->SetSizer( bSizer63 );
+        m_pUbicaciones->Layout();
+        bSizer63->Fit( m_pUbicaciones );
+        bSizer6->Add( m_pUbicaciones, 1, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer6 );
+        this->Layout();
+        bSizer6->Fit( this );
+
+        // Connect Events
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( PanelConfiguracionUbicacionesBase::OnSize ) );
+        m_pBotonNuevo->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionUbicacionesBase::OnNuevoClick ), NULL, this );
+        m_pBotonEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionUbicacionesBase::OnEditarClick ), NULL, this );
+        m_pBotonDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionUbicacionesBase::OnEliminarClick ), NULL, this );
+}
+
+PanelConfiguracionUbicacionesBase::~PanelConfiguracionUbicacionesBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PanelConfiguracionUbicacionesBase::OnSize ) );
+        m_pBotonNuevo->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionUbicacionesBase::OnNuevoClick ), NULL, this );
+        m_pBotonEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionUbicacionesBase::OnEditarClick ), NULL, this );
+        m_pBotonDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionUbicacionesBase::OnEliminarClick ), NULL, this );
+
+}
+
+DialogoAddLocationBase::DialogoAddLocationBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 450,450 ), wxDefaultSize );
+
+        wxBoxSizer* m_pMainSizer;
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* m_pBodySizer;
+        m_pBodySizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanel = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanel->SetToolTip( _("Configure location") );
+
+        wxBoxSizer* m_pPanelSizer;
+        m_pPanelSizer = new wxBoxSizer( wxVERTICAL );
+
+        wxFlexGridSizer* m_pTableSizer;
+        m_pTableSizer = new wxFlexGridSizer( 0, 2, 0, 0 );
+        m_pTableSizer->AddGrowableCol( 1 );
+        m_pTableSizer->SetFlexibleDirection( wxBOTH );
+        m_pTableSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_pSTTitle = new wxStaticText( m_pPanel, wxID_ANY, _("Title"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pSTTitle->Wrap( -1 );
+        m_pTableSizer->Add( m_pSTTitle, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pTETitle = new wxTextCtrl( m_pPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pTETitle->SetMaxLength( 8 );
+        m_pTableSizer->Add( m_pTETitle, 0, wxEXPAND|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pSTLocation = new wxStaticText( m_pPanel, wxID_ANY, _("Location"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pSTLocation->Wrap( -1 );
+        m_pTableSizer->Add( m_pSTLocation, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        wxBoxSizer* m_pDirSizer;
+        m_pDirSizer = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pTELocation = new wxTextCtrl( m_pPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pTELocation->SetMaxLength( 0 );
+        m_pDirSizer->Add( m_pTELocation, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pOpenDir = new wxButton( m_pPanel, wxID_ANY, _("..."), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        m_pDirSizer->Add( m_pOpenDir, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 );
+
+
+        m_pTableSizer->Add( m_pDirSizer, 0, wxTOP|wxLEFT|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pSTDesc = new wxStaticText( m_pPanel, wxID_ANY, _("Description"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pSTDesc->Wrap( -1 );
+        m_pTableSizer->Add( m_pSTDesc, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
+
+        m_pTEDesc = new wxTextCtrl( m_pPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pTEDesc->SetMaxLength( 100 );
+        m_pTableSizer->Add( m_pTEDesc, 0, wxEXPAND|wxTOP|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pPanelSizer->Add( m_pTableSizer, 0, wxEXPAND|wxBOTTOM, 5 );
+
+        m_pMonitorize = new wxCheckBox( m_pPanel, wxID_ANY, _("Monitorize"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pPanelSizer->Add( m_pMonitorize, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pCleanAfter = new wxCheckBox( m_pPanel, wxID_ANY, _("Clean directory after dicomization"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pPanelSizer->Add( m_pCleanAfter, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pCleanBefore = new wxCheckBox( m_pPanel, wxID_ANY, _("Clean directory before dicomization"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pPanelSizer->Add( m_pCleanBefore, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+
+        m_pPanel->SetSizer( m_pPanelSizer );
+        m_pPanel->Layout();
+        m_pPanelSizer->Fit( m_pPanel );
+        m_pBodySizer->Add( m_pPanel, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( m_pBodySizer );
+        m_pBody->Layout();
+        m_pBodySizer->Fit( m_pBody );
+        m_pMainSizer->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* m_pFooterSizer;
+        m_pFooterSizer = new wxBoxSizer( wxHORIZONTAL );
+
+
+        m_pFooterSizer->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pAccept = new wxButton( m_pFooter, wxID_ANY, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pAccept->SetDefault();
+        m_pFooterSizer->Add( m_pAccept, 0, wxRIGHT, 5 );
+
+        m_pCancel = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pFooterSizer->Add( m_pCancel, 0, wxRIGHT, 5 );
+
+
+        m_pFooter->SetSizer( m_pFooterSizer );
+        m_pFooter->Layout();
+        m_pFooterSizer->Fit( m_pFooter );
+        m_pMainSizer->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+
+        // Connect Events
+        m_pOpenDir->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoAddLocationBase::OnOpenDirClick ), NULL, this );
+        m_pAccept->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoAddLocationBase::OnAceptarClick ), NULL, this );
+}
+
+DialogoAddLocationBase::~DialogoAddLocationBase()
+{
+        // Disconnect Events
+        m_pOpenDir->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoAddLocationBase::OnOpenDirClick ), NULL, this );
+        m_pAccept->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoAddLocationBase::OnAceptarClick ), NULL, this );
+
+}
+
+PanelConfiguracionSeguridadBase::PanelConfiguracionSeguridadBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer48;
+        bSizer48 = new wxBoxSizer( wxVERTICAL );
+
+        m_pSecurity = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pSecurity->SetToolTip( _("Security") );
+
+        wxBoxSizer* bSizer44;
+        bSizer44 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer57;
+        bSizer57 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_staticText47 = new wxStaticText( m_pSecurity, wxID_ANY, _("Security type"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText47->Wrap( -1 );
+        bSizer57->Add( m_staticText47, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxArrayString m_pSecTypeChoices;
+        m_pSecType = new wxChoice( m_pSecurity, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pSecTypeChoices, 0 );
+        m_pSecType->SetSelection( 0 );
+        bSizer57->Add( m_pSecType, 0, wxALL, 5 );
+
+
+        bSizer44->Add( bSizer57, 1, wxEXPAND, 5 );
+
+
+        m_pSecurity->SetSizer( bSizer44 );
+        m_pSecurity->Layout();
+        bSizer44->Fit( m_pSecurity );
+        bSizer48->Add( m_pSecurity, 0, wxEXPAND, 5 );
+
+        m_pSep = new SubTitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer48->Add( m_pSep, 0, wxEXPAND, 5 );
+
+        m_pPanelUsuarios = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelUsuarios->SetToolTip( _("Users") );
+
+        wxBoxSizer* bSizer25;
+        bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pListaUsuarios = new wxListCtrl( m_pPanelUsuarios, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_SINGLE_SEL|wxLC_SMALL_ICON );
+        bSizer25->Add( m_pListaUsuarios, 1, wxEXPAND|wxRIGHT, 5 );
+
+        wxBoxSizer* bSizer26;
+        bSizer26 = new wxBoxSizer( wxVERTICAL );
+
+        m_button3 = new wxButton( m_pPanelUsuarios, wxID_ANY, _("New ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer26->Add( m_button3, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
+
+        m_pBCambiarPassword = new wxButton( m_pPanelUsuarios, wxID_ANY, _("Change Password ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBCambiarPassword->Enable( false );
+
+        bSizer26->Add( m_pBCambiarPassword, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pBDelete = new wxButton( m_pPanelUsuarios, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBDelete->Enable( false );
+
+        bSizer26->Add( m_pBDelete, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
+
+
+        bSizer26->Add( 0, 0, 1, wxEXPAND|wxRIGHT, 5 );
+
+
+        bSizer25->Add( bSizer26, 0, wxEXPAND, 5 );
+
+
+        m_pPanelUsuarios->SetSizer( bSizer25 );
+        m_pPanelUsuarios->Layout();
+        bSizer25->Fit( m_pPanelUsuarios );
+        bSizer48->Add( m_pPanelUsuarios, 1, wxEXPAND, 5 );
+
+        m_pPanelPassword = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelPassword->SetToolTip( _("Set main password") );
+
+        wxBoxSizer* bSizer251;
+        bSizer251 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pLabelPassword = new wxStaticText( m_pPanelPassword, wxID_ANY, _("Password is not setted"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelPassword->Wrap( -1 );
+        bSizer251->Add( m_pLabelPassword, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pButtonSetPassword = new wxButton( m_pPanelPassword, wxID_ANY, _("Set Password"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer251->Add( m_pButtonSetPassword, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pPanelPassword->SetSizer( bSizer251 );
+        m_pPanelPassword->Layout();
+        bSizer251->Fit( m_pPanelPassword );
+        bSizer48->Add( m_pPanelPassword, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer48 );
+        this->Layout();
+
+        // Connect Events
+        m_pSecurity->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PanelConfiguracionSeguridadBase::OnEraseBackground ), NULL, this );
+        m_pSecType->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PanelConfiguracionSeguridadBase::OnSecTypeChoice ), NULL, this );
+        m_pPanelUsuarios->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PanelConfiguracionSeguridadBase::OnEraseBackground ), NULL, this );
+        m_pListaUsuarios->Connect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( PanelConfiguracionSeguridadBase::OnListaUsuariosItemDeSelected ), NULL, this );
+        m_pListaUsuarios->Connect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( PanelConfiguracionSeguridadBase::OnListaUsuariosItemSelected ), NULL, this );
+        m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionSeguridadBase::OnNuevoClick ), NULL, this );
+        m_pBCambiarPassword->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionSeguridadBase::OnCambiarPasswordClick ), NULL, this );
+        m_pBDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionSeguridadBase::OnEliminarClick ), NULL, this );
+        m_pPanelPassword->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PanelConfiguracionSeguridadBase::OnEraseBackground ), NULL, this );
+        m_pButtonSetPassword->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionSeguridadBase::OnSetMainPassword ), NULL, this );
+}
+
+PanelConfiguracionSeguridadBase::~PanelConfiguracionSeguridadBase()
+{
+        // Disconnect Events
+        m_pSecurity->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PanelConfiguracionSeguridadBase::OnEraseBackground ), NULL, this );
+        m_pSecType->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( PanelConfiguracionSeguridadBase::OnSecTypeChoice ), NULL, this );
+        m_pPanelUsuarios->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PanelConfiguracionSeguridadBase::OnEraseBackground ), NULL, this );
+        m_pListaUsuarios->Disconnect( wxEVT_COMMAND_LIST_ITEM_DESELECTED, wxListEventHandler( PanelConfiguracionSeguridadBase::OnListaUsuariosItemDeSelected ), NULL, this );
+        m_pListaUsuarios->Disconnect( wxEVT_COMMAND_LIST_ITEM_SELECTED, wxListEventHandler( PanelConfiguracionSeguridadBase::OnListaUsuariosItemSelected ), NULL, this );
+        m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionSeguridadBase::OnNuevoClick ), NULL, this );
+        m_pBCambiarPassword->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionSeguridadBase::OnCambiarPasswordClick ), NULL, this );
+        m_pBDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionSeguridadBase::OnEliminarClick ), NULL, this );
+        m_pPanelPassword->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PanelConfiguracionSeguridadBase::OnEraseBackground ), NULL, this );
+        m_pButtonSetPassword->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PanelConfiguracionSeguridadBase::OnSetMainPassword ), NULL, this );
+
+}
+
+UserDialogBase::UserDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 423,292 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer67;
+        bSizer67 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Edit User") );
+
+        bSizer67->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer68;
+        bSizer68 = new wxBoxSizer( wxVERTICAL );
+
+        m_pFormPanel = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pFormPanel->SetToolTip( _("Edit User") );
+
+        wxBoxSizer* bSizer75;
+        bSizer75 = new wxBoxSizer( wxVERTICAL );
+
+
+        bSizer75->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        wxFlexGridSizer* fgSizer18;
+        fgSizer18 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer18->AddGrowableCol( 1 );
+        fgSizer18->SetFlexibleDirection( wxBOTH );
+        fgSizer18->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_pLabelUser = new wxStaticText( m_pFormPanel, wxID_ANY, _("User Name"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelUser->Wrap( -1 );
+        fgSizer18->Add( m_pLabelUser, 0, wxBOTTOM|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pTCUsuario = new wxTextCtrl( m_pFormPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pTCUsuario->SetMaxLength( 0 );
+        fgSizer18->Add( m_pTCUsuario, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
+
+        m_pstat2 = new wxStaticText( m_pFormPanel, wxID_ANY, _("Password"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstat2->Wrap( -1 );
+        fgSizer18->Add( m_pstat2, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pTCPassword0 = new wxTextCtrl( m_pFormPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
+        m_pTCPassword0->SetMaxLength( 0 );
+        fgSizer18->Add( m_pTCPassword0, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pstat21 = new wxStaticText( m_pFormPanel, wxID_ANY, _("Confirm Password"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pstat21->Wrap( -1 );
+        fgSizer18->Add( m_pstat21, 0, wxTOP|wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pTCPassword1 = new wxTextCtrl( m_pFormPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
+        m_pTCPassword1->SetMaxLength( 0 );
+        fgSizer18->Add( m_pTCPassword1, 0, wxTOP|wxLEFT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+        bSizer75->Add( fgSizer18, 0, wxEXPAND, 5 );
+
+
+        bSizer75->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+        m_pFormPanel->SetSizer( bSizer75 );
+        m_pFormPanel->Layout();
+        bSizer75->Fit( m_pFormPanel );
+        bSizer68->Add( m_pFormPanel, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer68 );
+        m_pBody->Layout();
+        bSizer68->Fit( m_pBody );
+        bSizer67->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_panel54 = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer69;
+        bSizer69 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer69->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button42 = new wxButton( m_panel54, wxID_ANY, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button42->SetDefault();
+        bSizer69->Add( m_button42, 0, wxRIGHT, 5 );
+
+        m_button41 = new wxButton( m_panel54, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer69->Add( m_button41, 0, wxLEFT, 5 );
+
+
+        m_panel54->SetSizer( bSizer69 );
+        m_panel54->Layout();
+        bSizer69->Fit( m_panel54 );
+        bSizer67->Add( m_panel54, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer67 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_button42->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( UserDialogBase::OnOkClick ), NULL, this );
+}
+
+UserDialogBase::~UserDialogBase()
+{
+        // Disconnect Events
+        m_button42->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( UserDialogBase::OnOkClick ), NULL, this );
+
+}
+
+PanelConfigurationAnonymizationBase::PanelConfigurationAnonymizationBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer77;
+        bSizer77 = new wxBoxSizer( wxVERTICAL );
+
+        m_pAnonimization = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pAnonimization->SetToolTip( _("Properties") );
+
+        wxBoxSizer* bSizer78;
+        bSizer78 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer79;
+        bSizer79 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_staticText52 = new wxStaticText( m_pAnonimization, wxID_ANY, _("Default value"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText52->Wrap( -1 );
+        bSizer79->Add( m_staticText52, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pTextDefaultValue = new wxTextCtrl( m_pAnonimization, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), 0 );
+        m_pTextDefaultValue->SetMaxLength( 0 );
+        bSizer79->Add( m_pTextDefaultValue, 0, wxALL, 5 );
+
+
+        bSizer78->Add( bSizer79, 0, wxEXPAND, 5 );
+
+
+        m_pAnonimization->SetSizer( bSizer78 );
+        m_pAnonimization->Layout();
+        bSizer78->Fit( m_pAnonimization );
+        bSizer77->Add( m_pAnonimization, 1, wxEXPAND | wxALL, 5 );
+
+
+        this->SetSizer( bSizer77 );
+        this->Layout();
+}
+
+PanelConfigurationAnonymizationBase::~PanelConfigurationAnonymizationBase()
+{
+}
+
+AddWLDialogBase::AddWLDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 350,250 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelMessage = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelMessage->SetToolTip( _("Add DICOM tag") );
+
+        wxFlexGridSizer* fgSizer17;
+        fgSizer17 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer17->AddGrowableCol( 1 );
+        fgSizer17->SetFlexibleDirection( wxBOTH );
+        fgSizer17->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText79 = new wxStaticText( m_pPanelMessage, wxID_ANY, _("Label"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText79->Wrap( -1 );
+        fgSizer17->Add( m_staticText79, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pLabel = new wxTextCtrl( m_pPanelMessage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->SetMaxLength( 0 );
+        fgSizer17->Add( m_pLabel, 1, wxALL|wxEXPAND, 5 );
+
+        m_staticText59 = new wxStaticText( m_pPanelMessage, wxID_ANY, _("Window"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText59->Wrap( -1 );
+        fgSizer17->Add( m_staticText59, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pWindow = new wxTextCtrl( m_pPanelMessage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pWindow->SetMaxLength( 0 );
+        m_pWindow->SetValidator( wxTextValidator( wxFILTER_NUMERIC, &windowValidator ) );
+
+        fgSizer17->Add( m_pWindow, 1, wxALL|wxEXPAND, 5 );
+
+        m_staticText60 = new wxStaticText( m_pPanelMessage, wxID_ANY, _("Level"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText60->Wrap( -1 );
+        fgSizer17->Add( m_staticText60, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pLevel = new wxTextCtrl( m_pPanelMessage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLevel->SetMaxLength( 0 );
+        m_pLevel->SetValidator( wxTextValidator( wxFILTER_NUMERIC, &levelValidator ) );
+
+        fgSizer17->Add( m_pLevel, 1, wxALL|wxEXPAND, 5 );
+
+
+        m_pPanelMessage->SetSizer( fgSizer17 );
+        m_pPanelMessage->Layout();
+        fgSizer17->Fit( m_pPanelMessage );
+        bSizer7->Add( m_pPanelMessage, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer15->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pOkButton = new wxButton( m_pFooter, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pOkButton->SetDefault();
+        bSizer16->Add( m_pOkButton, 0, wxRIGHT, 5 );
+
+        m_button5 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button5, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer16 );
+        m_pFooter->Layout();
+        bSizer16->Fit( m_pFooter );
+        bSizer15->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer15 );
+        this->Layout();
+        bSizer15->Fit( this );
+
+        this->Centre( wxBOTH );
+}
+
+AddWLDialogBase::~AddWLDialogBase()
+{
+}
+
+EditCornerAnnotationsDialogBase::EditCornerAnnotationsDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 800,500 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pMainPanel = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pMainPanel->SetToolTip( _("Edit corner annotations") );
+
+        wxBoxSizer* bSizer130;
+        bSizer130 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer131;
+        bSizer131 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer136;
+        bSizer136 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticText84 = new wxStaticText( m_pMainPanel, wxID_ANY, _("To setup corner annotations you can use dicom tags with syntax ${GGGG|EEEE:DefaultValue:Format}  where GGGG is the tag's group in hexadecimal and EEEE is the tag's element. DefaultValue and Format are optional values, Format admit two special formats (date and time)."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText84->Wrap( 600 );
+        bSizer136->Add( m_staticText84, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+        m_staticText85 = new wxStaticText( m_pMainPanel, wxID_ANY, _("You can also use special tags listed in the tooltip over the question button."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText85->Wrap( 600 );
+        bSizer136->Add( m_staticText85, 0, wxALL, 5 );
+
+
+        bSizer131->Add( bSizer136, 1, wxEXPAND, 5 );
+
+        m_pHelpBitmap = new wxStaticBitmap( m_pMainPanel, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pHelpBitmap->SetToolTip( _("${NEWLINE}\n${GINKGO.VERSION.FULLTEXT}\n${GINKGO.ARCH}             \n\n${VOLUME.IDX}\n${SLICE.WIDTH}\n${SLICE.HEIGHT}\n${SLICE.WL.FULLTEXT}\n${SLICE.IDX}\n${SLICE.COUNT}\n${SLICE.IDX.FULLTEXT}\n${SLICE.LATERALITY}\n${SLICE.VOXEL.SIZE}\n${SLICE.THICKNESS}\n${SLICE.THICKNESS.FULLTEXT}\n${SLICE.LOCATION}\n${SLICE.LOCATION.FULLTEXT}\n${VIEW.SCALE}") );
+
+        bSizer131->Add( m_pHelpBitmap, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer130->Add( bSizer131, 0, wxEXPAND, 5 );
+
+        wxStaticBoxSizer* sbSizer10;
+        sbSizer10 = new wxStaticBoxSizer( new wxStaticBox( m_pMainPanel, wxID_ANY, wxEmptyString ), wxVERTICAL );
+
+        m_pCornerAnnotationsSizer = new wxGridSizer( 0, 2, 0, 0 );
+
+
+        sbSizer10->Add( m_pCornerAnnotationsSizer, 1, wxEXPAND, 5 );
+
+
+        bSizer130->Add( sbSizer10, 1, wxEXPAND, 5 );
+
+
+        m_pMainPanel->SetSizer( bSizer130 );
+        m_pMainPanel->Layout();
+        bSizer130->Fit( m_pMainPanel );
+        bSizer7->Add( m_pMainPanel, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer15->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_button70 = new wxButton( m_pFooter, wxID_ANY, _("Reset"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button70, 0, 0, 5 );
+
+
+        bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pOkButton = new wxButton( m_pFooter, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pOkButton->SetDefault();
+        bSizer16->Add( m_pOkButton, 0, wxRIGHT, 5 );
+
+        m_button5 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button5, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer16 );
+        m_pFooter->Layout();
+        bSizer16->Fit( m_pFooter );
+        bSizer15->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer15 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_button70->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EditCornerAnnotationsDialogBase::OnSetDefaultValues ), NULL, this );
+}
+
+EditCornerAnnotationsDialogBase::~EditCornerAnnotationsDialogBase()
+{
+        // Disconnect Events
+        m_button70->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EditCornerAnnotationsDialogBase::OnSetDefaultValues ), NULL, this );
+
+}
+
+ModalityPanelBase::ModalityPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer125;
+        bSizer125 = new wxBoxSizer( wxVERTICAL );
+
+        wxStaticBoxSizer* sbSizer12;
+        sbSizer12 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Window/level") ), wxVERTICAL );
+
+        wxBoxSizer* bSizer129;
+        bSizer129 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pListWL = new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);
+        m_pListWL->SetMinSize( wxSize( -1,150 ) );
+
+        bSizer129->Add( m_pListWL, 1, wxALL|wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer126;
+        bSizer126 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer127;
+        bSizer127 = new wxBoxSizer( wxVERTICAL );
+
+        m_button63 = new wxButton( this, wxID_ANY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer127->Add( m_button63, 0, wxTOP|wxBOTTOM|wxEXPAND, 5 );
+
+        m_button64 = new wxButton( this, wxID_ANY, _("Edit"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer127->Add( m_button64, 0, wxTOP|wxBOTTOM|wxEXPAND, 5 );
+
+        m_button65 = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer127->Add( m_button65, 0, wxEXPAND, 5 );
+
+
+        bSizer126->Add( bSizer127, 1, wxEXPAND, 5 );
+
+
+        bSizer129->Add( bSizer126, 0, wxEXPAND, 5 );
+
+
+        sbSizer12->Add( bSizer129, 1, wxEXPAND, 5 );
+
+        wxFlexGridSizer* fgSizer20;
+        fgSizer20 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer20->SetFlexibleDirection( wxBOTH );
+        fgSizer20->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText68 = new wxStaticText( this, wxID_ANY, _("Default Window/Level"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText68->Wrap( -1 );
+        fgSizer20->Add( m_staticText68, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxArrayString m_pDefaultWindowLevelChoices;
+        m_pDefaultWindowLevel = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pDefaultWindowLevelChoices, 0 );
+        m_pDefaultWindowLevel->SetSelection( 0 );
+        fgSizer20->Add( m_pDefaultWindowLevel, 0, wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+
+        sbSizer12->Add( fgSizer20, 0, wxEXPAND, 5 );
+
+
+        bSizer125->Add( sbSizer12, 0, wxEXPAND|wxBOTTOM, 5 );
+
+        wxStaticBoxSizer* sbSizer9;
+        sbSizer9 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Corner annotations") ), wxHORIZONTAL );
+
+        m_staticText71 = new wxStaticText( this, wxID_ANY, _("Setup corner annotations"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText71->Wrap( -1 );
+        sbSizer9->Add( m_staticText71, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_button67 = new wxButton( this, wxID_ANY, _("Setup..."), wxDefaultPosition, wxDefaultSize, 0 );
+        sbSizer9->Add( m_button67, 0, wxALL, 5 );
+
+
+        bSizer125->Add( sbSizer9, 0, wxEXPAND, 5 );
+
+        wxStaticBoxSizer* sbSizer13;
+        sbSizer13 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Other settings") ), wxVERTICAL );
+
+        wxFlexGridSizer* fgSizer21;
+        fgSizer21 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer21->SetFlexibleDirection( wxBOTH );
+        fgSizer21->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText69 = new wxStaticText( this, wxID_ANY, _("Interpolate pixel data"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText69->Wrap( -1 );
+        fgSizer21->Add( m_staticText69, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxArrayString m_pChoiceInterpolateChoices;
+        m_pChoiceInterpolate = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pChoiceInterpolateChoices, 0 );
+        m_pChoiceInterpolate->SetSelection( 0 );
+        fgSizer21->Add( m_pChoiceInterpolate, 0, wxALL, 5 );
+
+
+        sbSizer13->Add( fgSizer21, 1, wxEXPAND, 5 );
+
+
+        bSizer125->Add( sbSizer13, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer125 );
+        this->Layout();
+        bSizer125->Fit( this );
+
+        // Connect Events
+        m_button63->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModalityPanelBase::OnAddWL ), NULL, this );
+        m_button64->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModalityPanelBase::OnEditWL ), NULL, this );
+        m_button65->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModalityPanelBase::OnDeleteWL ), NULL, this );
+        m_pDefaultWindowLevel->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ModalityPanelBase::OnChoiceChanged ), NULL, this );
+        m_button67->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModalityPanelBase::OnSetupCornerAnnotations ), NULL, this );
+        m_pChoiceInterpolate->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ModalityPanelBase::OnChoiceChanged ), NULL, this );
+}
+
+ModalityPanelBase::~ModalityPanelBase()
+{
+        // Disconnect Events
+        m_button63->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModalityPanelBase::OnAddWL ), NULL, this );
+        m_button64->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModalityPanelBase::OnEditWL ), NULL, this );
+        m_button65->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModalityPanelBase::OnDeleteWL ), NULL, this );
+        m_pDefaultWindowLevel->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ModalityPanelBase::OnChoiceChanged ), NULL, this );
+        m_button67->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ModalityPanelBase::OnSetupCornerAnnotations ), NULL, this );
+        m_pChoiceInterpolate->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ModalityPanelBase::OnChoiceChanged ), NULL, this );
+
+}
+
+EditHangingProtocolDialogBase::EditHangingProtocolDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 500,600 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer11;
+        bSizer11 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Hanging protocol") );
+
+        bSizer11->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pMainNoteBook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxNB_FLAT );
+        m_pGeneralPanel = new wxPanel( m_pMainNoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer109;
+        bSizer109 = new wxBoxSizer( wxVERTICAL );
+
+        wxFlexGridSizer* fgSizer25;
+        fgSizer25 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer25->AddGrowableCol( 1 );
+        fgSizer25->SetFlexibleDirection( wxBOTH );
+        fgSizer25->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText87 = new wxStaticText( m_pGeneralPanel, wxID_ANY, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText87->Wrap( -1 );
+        fgSizer25->Add( m_staticText87, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_textName = new wxTextCtrl( m_pGeneralPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_textName->SetMaxLength( 0 );
+        fgSizer25->Add( m_textName, 0, wxALL|wxEXPAND, 5 );
+
+        m_staticText91 = new wxStaticText( m_pGeneralPanel, wxID_ANY, _("Opening mode"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText91->Wrap( -1 );
+        fgSizer25->Add( m_staticText91, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_textOpeningMode = new wxTextCtrl( m_pGeneralPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
+        m_textOpeningMode->SetMaxLength( 0 );
+        m_textOpeningMode->Enable( false );
+
+        fgSizer25->Add( m_textOpeningMode, 0, wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer109->Add( fgSizer25, 0, wxEXPAND|wxTOP, 5 );
+
+        m_pSizerStudyCriteria = new wxStaticBoxSizer( new wxStaticBox( m_pGeneralPanel, wxID_ANY, _("Study opening criteria") ), wxVERTICAL );
+
+        m_pSizerStudyCriteria->SetMinSize( wxSize( -1,250 ) );
+
+        bSizer109->Add( m_pSizerStudyCriteria, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+
+        m_pGeneralPanel->SetSizer( bSizer109 );
+        m_pGeneralPanel->Layout();
+        bSizer109->Fit( m_pGeneralPanel );
+        m_pMainNoteBook->AddPage( m_pGeneralPanel, _("General"), false );
+        m_pWorkspacePanel = new wxPanel( m_pMainNoteBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer1102;
+        bSizer1102 = new wxBoxSizer( wxVERTICAL );
+
+        m_pNoteBookWindows = new wxAuiNotebook( m_pWorkspacePanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_NB_CLOSE_ON_ACTIVE_TAB|wxAUI_NB_DEFAULT_STYLE );
+        m_pAdddPanel = new wxPanel( m_pNoteBookWindows, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pNoteBookWindows->AddPage( m_pAdddPanel, _("+"), false, wxNullBitmap );
+
+        bSizer1102->Add( m_pNoteBookWindows, 1, wxEXPAND|wxALL, 5 );
+
+
+        m_pWorkspacePanel->SetSizer( bSizer1102 );
+        m_pWorkspacePanel->Layout();
+        bSizer1102->Fit( m_pWorkspacePanel );
+        m_pMainNoteBook->AddPage( m_pWorkspacePanel, _("Workspace"), true );
+
+        bSizer11->Add( m_pMainNoteBook, 1, wxEXPAND|wxTOP, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer31;
+        bSizer31 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer31->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button37 = new wxButton( m_pFooter, wxID_OK, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer31->Add( m_button37, 0, wxALL, 5 );
+
+        m_button38 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer31->Add( m_button38, 0, wxALL, 5 );
+
+
+        m_pFooter->SetSizer( bSizer31 );
+        m_pFooter->Layout();
+        bSizer31->Fit( m_pFooter );
+        bSizer11->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer11 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pNoteBookWindows->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEventHandler( EditHangingProtocolDialogBase::OnPageChanging ), NULL, this );
+        m_pNoteBookWindows->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( EditHangingProtocolDialogBase::OnPageClose ), NULL, this );
+        m_button37->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EditHangingProtocolDialogBase::OnOkClick ), NULL, this );
+        m_button38->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EditHangingProtocolDialogBase::OnCancelClick ), NULL, this );
+}
+
+EditHangingProtocolDialogBase::~EditHangingProtocolDialogBase()
+{
+        // Disconnect Events
+        m_pNoteBookWindows->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEventHandler( EditHangingProtocolDialogBase::OnPageChanging ), NULL, this );
+        m_pNoteBookWindows->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler( EditHangingProtocolDialogBase::OnPageClose ), NULL, this );
+        m_button37->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EditHangingProtocolDialogBase::OnOkClick ), NULL, this );
+        m_button38->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EditHangingProtocolDialogBase::OnCancelClick ), NULL, this );
+
+}
+
+HangingProtocolConfigurationPanelBase::HangingProtocolConfigurationPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_pProtocols = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pProtocols->SetToolTip( _("Hanging protocols") );
+
+        wxBoxSizer* bSizer25;
+        bSizer25 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pListHanging = new wxDataViewListCtrl(m_pProtocols, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);
+        bSizer25->Add( m_pListHanging, 1, wxALL|wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer26;
+        bSizer26 = new wxBoxSizer( wxVERTICAL );
+
+        m_button3 = new wxButton( m_pProtocols, wxID_ANY, _("New ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer26->Add( m_button3, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
+
+        m_pBEdit = new wxButton( m_pProtocols, wxID_ANY, _("Edit ..."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBEdit->Enable( false );
+
+        bSizer26->Add( m_pBEdit, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
+
+        m_pBDelete = new wxButton( m_pProtocols, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBDelete->Enable( false );
+
+        bSizer26->Add( m_pBDelete, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
+
+
+        bSizer26->Add( 0, 0, 1, wxEXPAND|wxRIGHT, 5 );
+
+        m_pBActive = new wxButton( m_pProtocols, wxID_ANY, _("Enable/Disable"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer26->Add( m_pBActive, 0, wxTOP|wxBOTTOM|wxLEFT|wxEXPAND, 5 );
+
+
+        bSizer25->Add( bSizer26, 0, wxEXPAND, 5 );
+
+
+        m_pProtocols->SetSizer( bSizer25 );
+        m_pProtocols->Layout();
+        bSizer25->Fit( m_pProtocols );
+        bSizer6->Add( m_pProtocols, 1, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer6 );
+        this->Layout();
+
+        // Connect Events
+        m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HangingProtocolConfigurationPanelBase::OnNuevoClick ), NULL, this );
+        m_pBEdit->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HangingProtocolConfigurationPanelBase::OnEditarClick ), NULL, this );
+        m_pBDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HangingProtocolConfigurationPanelBase::OnEliminarClick ), NULL, this );
+        m_pBActive->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HangingProtocolConfigurationPanelBase::OnSetActive ), NULL, this );
+}
+
+HangingProtocolConfigurationPanelBase::~HangingProtocolConfigurationPanelBase()
+{
+        // Disconnect Events
+        m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HangingProtocolConfigurationPanelBase::OnNuevoClick ), NULL, this );
+        m_pBEdit->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HangingProtocolConfigurationPanelBase::OnEditarClick ), NULL, this );
+        m_pBDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HangingProtocolConfigurationPanelBase::OnEliminarClick ), NULL, this );
+        m_pBActive->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HangingProtocolConfigurationPanelBase::OnSetActive ), NULL, this );
+
+}
+
+DefaultModalitySettingsConfigurationPanelBase::DefaultModalitySettingsConfigurationPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer120;
+        bSizer120 = new wxBoxSizer( wxVERTICAL );
+
+        m_splitter4 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
+        m_splitter4->Connect( wxEVT_IDLE, wxIdleEventHandler( DefaultModalitySettingsConfigurationPanelBase::m_splitter4OnIdle ), NULL, this );
+        m_splitter4->SetMinimumPaneSize( 100 );
+
+        m_panel90 = new wxPanel( m_splitter4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer121;
+        bSizer121 = new wxBoxSizer( wxVERTICAL );
+
+        m_pWLList = new wxTreeCtrl( m_panel90, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTR_DEFAULT_STYLE|wxTR_HIDE_ROOT );
+        bSizer121->Add( m_pWLList, 1, wxALL|wxEXPAND, 0 );
+
+
+        m_panel90->SetSizer( bSizer121 );
+        m_panel90->Layout();
+        bSizer121->Fit( m_panel90 );
+        m_pTitledPanelModalities = new SubTitledPanelSinBorder( m_splitter4, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer122;
+        bSizer122 = new wxBoxSizer( wxVERTICAL );
+
+        m_pModalityPanel = new PanelScrollable( m_pTitledPanelModalities, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pSizerModalities = new wxBoxSizer( wxVERTICAL );
+
+
+        m_pModalityPanel->SetSizer( m_pSizerModalities );
+        m_pModalityPanel->Layout();
+        m_pSizerModalities->Fit( m_pModalityPanel );
+        bSizer122->Add( m_pModalityPanel, 1, wxEXPAND, 5 );
+
+
+        m_pTitledPanelModalities->SetSizer( bSizer122 );
+        m_pTitledPanelModalities->Layout();
+        bSizer122->Fit( m_pTitledPanelModalities );
+        m_splitter4->SplitVertically( m_panel90, m_pTitledPanelModalities, 150 );
+        bSizer120->Add( m_splitter4, 1, wxEXPAND|wxTOP, 5 );
+
+
+        this->SetSizer( bSizer120 );
+        this->Layout();
+
+        // Connect Events
+        m_pWLList->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DefaultModalitySettingsConfigurationPanelBase::OnTreeSelChanged ), NULL, this );
+}
+
+DefaultModalitySettingsConfigurationPanelBase::~DefaultModalitySettingsConfigurationPanelBase()
+{
+        // Disconnect Events
+        m_pWLList->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DefaultModalitySettingsConfigurationPanelBase::OnTreeSelChanged ), NULL, this );
+
+}
+
+CornerAnnotationPanel::CornerAnnotationPanel( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer126;
+        bSizer126 = new wxBoxSizer( wxVERTICAL );
+
+        m_pLabel = new wxStaticText( this, wxID_ANY, _("Top left corner annotations"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->Wrap( -1 );
+        bSizer126->Add( m_pLabel, 0, wxALL, 5 );
+
+        m_pLine1 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLine1->SetMaxLength( 0 );
+        bSizer126->Add( m_pLine1, 0, wxALL|wxEXPAND, 5 );
+
+        m_pLine2 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLine2->SetMaxLength( 0 );
+        bSizer126->Add( m_pLine2, 0, wxALL|wxEXPAND, 5 );
+
+        m_pLine3 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLine3->SetMaxLength( 0 );
+        bSizer126->Add( m_pLine3, 0, wxALL|wxEXPAND, 5 );
+
+        m_pLine4 = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLine4->SetMaxLength( 0 );
+        bSizer126->Add( m_pLine4, 0, wxALL|wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer126 );
+        this->Layout();
+        bSizer126->Fit( this );
+}
+
+CornerAnnotationPanel::~CornerAnnotationPanel()
+{
+}
+
+StudyWindowBase::StudyWindowBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer81;
+        bSizer81 = new wxBoxSizer( wxVERTICAL );
+
+        m_pConfigWindow = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pConfigWindow->SetToolTip( _("Setup window") );
+
+        wxBoxSizer* bSizer901;
+        bSizer901 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_staticText72 = new wxStaticText( m_pConfigWindow, wxID_ANY, _("Push configuration button and place window where you want"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText72->Wrap( -1 );
+        bSizer901->Add( m_staticText72, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer901->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button62 = new wxButton( m_pConfigWindow, wxID_ANY, _("Set default"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button62->SetToolTip( _("Open in main window") );
+
+        bSizer901->Add( m_button62, 0, wxRIGHT|wxLEFT, 5 );
+
+        m_pSetupPositionButton = new wxButton( m_pConfigWindow, wxID_ANY, _("Setup position..."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pSetupPositionButton->SetToolTip( _("Setup undocked window position") );
+
+        bSizer901->Add( m_pSetupPositionButton, 0, wxRIGHT|wxLEFT, 5 );
+
+
+        m_pConfigWindow->SetSizer( bSizer901 );
+        m_pConfigWindow->Layout();
+        bSizer901->Fit( m_pConfigWindow );
+        bSizer81->Add( m_pConfigWindow, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+        m_panel64111 = new SubTitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel64111->SetToolTip( _("Settings") );
+
+        bSizer81->Add( m_panel64111, 0, wxEXPAND, 5 );
+
+        m_pLayoutPreview = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,220 ), wxTAB_TRAVERSAL );
+        m_pLayoutPreview->SetToolTip( _("Layout") );
+        m_pLayoutPreview->SetMinSize( wxSize( -1,220 ) );
+
+        wxBoxSizer* bSizer113;
+        bSizer113 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxStaticBoxSizer* sbSizer9;
+        sbSizer9 = new wxStaticBoxSizer( new wxStaticBox( m_pLayoutPreview, wxID_ANY, _("Current layout") ), wxHORIZONTAL );
+
+        wxBoxSizer* bSizer119;
+        bSizer119 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bsizer91;
+        bsizer91 = new wxBoxSizer( wxVERTICAL );
+
+        m_pSizerLayoutTools = new wxBoxSizer( wxHORIZONTAL );
+
+
+        m_pSizerLayoutTools->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_staticText56 = new wxStaticText( m_pLayoutPreview, wxID_ANY, _("Rows"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText56->Wrap( -1 );
+        m_pSizerLayoutTools->Add( m_staticText56, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pSpinRows = new wxSpinCtrl( m_pLayoutPreview, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 50,-1 ), wxSP_ARROW_KEYS, 1, 4, 1 );
+        m_pSizerLayoutTools->Add( m_pSpinRows, 0, wxALL, 5 );
+
+        m_staticText57 = new wxStaticText( m_pLayoutPreview, wxID_ANY, _("Columns"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText57->Wrap( -1 );
+        m_pSizerLayoutTools->Add( m_staticText57, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pSpinCols = new wxSpinCtrl( m_pLayoutPreview, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 50,-1 ), wxSP_ARROW_KEYS, 1, 4, 1 );
+        m_pSizerLayoutTools->Add( m_pSpinCols, 0, wxALL, 5 );
+
+
+        bsizer91->Add( m_pSizerLayoutTools, 1, wxEXPAND|wxBOTTOM, 5 );
+
+
+        bSizer119->Add( bsizer91, 0, wxEXPAND, 5 );
+
+        m_pPreviewSizer = new wxBoxSizer( wxVERTICAL );
+
+
+        bSizer119->Add( m_pPreviewSizer, 1, wxEXPAND, 5 );
+
+
+        sbSizer9->Add( bSizer119, 1, wxEXPAND, 5 );
+
+        m_pSizerSeriesCriteria = new wxBoxSizer( wxVERTICAL );
+
+        m_staticText65 = new wxStaticText( m_pLayoutPreview, wxID_ANY, _("Series criteria"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText65->Wrap( -1 );
+        m_pSizerSeriesCriteria->Add( m_staticText65, 0, wxALL, 5 );
+
+
+        sbSizer9->Add( m_pSizerSeriesCriteria, 1, wxEXPAND|wxLEFT, 5 );
+
+
+        bSizer113->Add( sbSizer9, 1, wxEXPAND, 5 );
+
+
+        m_pLayoutPreview->SetSizer( bSizer113 );
+        m_pLayoutPreview->Layout();
+        bSizer81->Add( m_pLayoutPreview, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+        m_panel6411 = new SubTitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel6411->SetToolTip( _("Settings") );
+
+        bSizer81->Add( m_panel6411, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+
+        this->SetSizer( bSizer81 );
+        this->Layout();
+
+        // Connect Events
+        m_button62->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( StudyWindowBase::OnSetDefaultWindowPosition ), NULL, this );
+        m_pSetupPositionButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( StudyWindowBase::OnSetupWindowPositionClick ), NULL, this );
+        m_pSpinRows->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( StudyWindowBase::OnSpinRows ), NULL, this );
+        m_pSpinCols->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( StudyWindowBase::OnSpinCols ), NULL, this );
+}
+
+StudyWindowBase::~StudyWindowBase()
+{
+        // Disconnect Events
+        m_button62->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( StudyWindowBase::OnSetDefaultWindowPosition ), NULL, this );
+        m_pSetupPositionButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( StudyWindowBase::OnSetupWindowPositionClick ), NULL, this );
+        m_pSpinRows->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( StudyWindowBase::OnSpinRows ), NULL, this );
+        m_pSpinCols->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( StudyWindowBase::OnSpinCols ), NULL, this );
+
+}
+
+EditCriteriaPanelBase::EditCriteriaPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        m_pGeneralSizer = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pListCriteria= new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);
+        m_pGeneralSizer->Add( m_pListCriteria, 1, wxALL|wxEXPAND, 5 );
+
+        m_pButtonSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_button3 = new wxButton( this, wxID_ANY, _("Add"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pButtonSizer->Add( m_button3, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        m_pBDelete = new wxButton( this, wxID_ANY, _("Delete"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBDelete->Enable( false );
+
+        m_pButtonSizer->Add( m_pBDelete, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        m_pGeneralSizer->Add( m_pButtonSizer, 0, wxEXPAND|wxRIGHT, 5 );
+
+
+        this->SetSizer( m_pGeneralSizer );
+        this->Layout();
+
+        // Connect Events
+        m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EditCriteriaPanelBase::OnAddClick ), NULL, this );
+        m_pBDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EditCriteriaPanelBase::OnDeleteClick ), NULL, this );
+}
+
+EditCriteriaPanelBase::~EditCriteriaPanelBase()
+{
+        // Disconnect Events
+        m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EditCriteriaPanelBase::OnAddClick ), NULL, this );
+        m_pBDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( EditCriteriaPanelBase::OnDeleteClick ), NULL, this );
+
+}
+
+SelectOpeningModeBase::SelectOpeningModeBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 525,180 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelMessage = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelMessage->SetToolTip( _("Select opening mode") );
+
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pLabel = new wxStaticText( m_pPanelMessage, wxID_ANY, _("Select opening mode"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->Wrap( -1 );
+        bSizer4->Add( m_pLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxArrayString m_pOpeningModeChoices;
+        m_pOpeningMode = new wxChoice( m_pPanelMessage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pOpeningModeChoices, 0 );
+        m_pOpeningMode->SetSelection( 0 );
+        bSizer4->Add( m_pOpeningMode, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pPanelMessage->SetSizer( bSizer4 );
+        m_pPanelMessage->Layout();
+        bSizer4->Fit( m_pPanelMessage );
+        bSizer7->Add( m_pPanelMessage, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer15->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pOkButton = new wxButton( m_pFooter, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pOkButton->SetDefault();
+        bSizer16->Add( m_pOkButton, 0, wxRIGHT, 5 );
+
+        m_button5 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button5, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer16 );
+        m_pFooter->Layout();
+        bSizer16->Fit( m_pFooter );
+        bSizer15->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer15 );
+        this->Layout();
+        bSizer15->Fit( this );
+
+        this->Centre( wxBOTH );
+}
+
+SelectOpeningModeBase::~SelectOpeningModeBase()
+{
+}
+
+AddTagDialogBase::AddTagDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 400,220 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelMessage = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelMessage->SetToolTip( _("Add DICOM tag") );
+
+        wxFlexGridSizer* fgSizer17;
+        fgSizer17 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer17->SetFlexibleDirection( wxBOTH );
+        fgSizer17->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText59 = new wxStaticText( m_pPanelMessage, wxID_ANY, _("Tag"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText59->Wrap( -1 );
+        fgSizer17->Add( m_staticText59, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+        m_staticText60 = new wxStaticText( m_pPanelMessage, wxID_ANY, _("Value"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText60->Wrap( -1 );
+        fgSizer17->Add( m_staticText60, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+
+        wxArrayString m_pChoiceTagChoices;
+        m_pChoiceTag = new wxChoice( m_pPanelMessage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pChoiceTagChoices, 0 );
+        m_pChoiceTag->SetSelection( 0 );
+        fgSizer17->Add( m_pChoiceTag, 0, wxALL, 5 );
+
+        m_pTextValue = new wxTextCtrl( m_pPanelMessage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pTextValue->SetMaxLength( 0 );
+        fgSizer17->Add( m_pTextValue, 0, wxALL, 5 );
+
+
+        m_pPanelMessage->SetSizer( fgSizer17 );
+        m_pPanelMessage->Layout();
+        fgSizer17->Fit( m_pPanelMessage );
+        bSizer7->Add( m_pPanelMessage, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer15->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pOkButton = new wxButton( m_pFooter, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pOkButton->SetDefault();
+        bSizer16->Add( m_pOkButton, 0, wxRIGHT, 5 );
+
+        m_button5 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button5, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer16 );
+        m_pFooter->Layout();
+        bSizer16->Fit( m_pFooter );
+        bSizer15->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer15 );
+        this->Layout();
+        bSizer15->Fit( this );
+
+        this->Centre( wxBOTH );
+}
+
+AddTagDialogBase::~AddTagDialogBase()
+{
+}
+
+SetupWindowPositionBase::SetupWindowPositionBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 600,400 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer113;
+        bSizer113 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel97 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel97->SetBackgroundColour( wxColour( 255, 255, 255 ) );
+
+        wxBoxSizer* bSizer114;
+        bSizer114 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticText73 = new wxStaticText( m_panel97, wxID_ANY, _("Setup position and size of the window where you want to open the study"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText73->Wrap( -1 );
+        bSizer114->Add( m_staticText73, 0, wxALL, 5 );
+
+        wxBoxSizer* bSizer115;
+        bSizer115 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_button64 = new wxButton( m_panel97, wxID_OK, _("Save"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button64->SetDefault();
+        bSizer115->Add( m_button64, 0, wxALL, 5 );
+
+        m_button65 = new wxButton( m_panel97, wxID_CLOSE, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer115->Add( m_button65, 0, wxALL, 5 );
+
+
+        bSizer114->Add( bSizer115, 0, wxEXPAND, 5 );
+
+
+        m_panel97->SetSizer( bSizer114 );
+        m_panel97->Layout();
+        bSizer114->Fit( m_panel97 );
+        bSizer113->Add( m_panel97, 1, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer113 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+}
+
+SetupWindowPositionBase::~SetupWindowPositionBase()
+{
+}
+
+SmartRetrieveConfigurationPanelBase::SmartRetrieveConfigurationPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer131;
+        bSizer131 = new wxBoxSizer( wxVERTICAL );
+
+        m_pCheckEnable = new wxCheckBox( this, wxID_ANY, _("Enable background queries"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer131->Add( m_pCheckEnable, 0, wxALL, 5 );
+
+        m_pPanelQueries = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelQueries->SetToolTip( _("Stored queries") );
+
+        wxBoxSizer* bSizer134;
+        bSizer134 = new wxBoxSizer( wxVERTICAL );
+
+        m_pListQueries = new wxDataViewListCtrl(m_pPanelQueries, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);
+        bSizer134->Add( m_pListQueries, 1, wxALL|wxEXPAND, 5 );
+
+
+        m_pPanelQueries->SetSizer( bSizer134 );
+        m_pPanelQueries->Layout();
+        bSizer134->Fit( m_pPanelQueries );
+        bSizer131->Add( m_pPanelQueries, 1, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer131 );
+        this->Layout();
+
+        // Connect Events
+        m_pCheckEnable->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SmartRetrieveConfigurationPanelBase::OnCheckEnableBackgroundQueries ), NULL, this );
+}
+
+SmartRetrieveConfigurationPanelBase::~SmartRetrieveConfigurationPanelBase()
+{
+        // Disconnect Events
+        m_pCheckEnable->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( SmartRetrieveConfigurationPanelBase::OnCheckEnableBackgroundQueries ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/configuration/panelesconfiguracionginkgobase.h b/cadxcore/main/gui/configuration/panelesconfiguracionginkgobase.h
new file mode 100644
index 0000000..d090664
--- /dev/null
+++ b/cadxcore/main/gui/configuration/panelesconfiguracionginkgobase.h
@@ -0,0 +1,1409 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __PANELESCONFIGURACIONGINKGOBASE_H__
+#define __PANELESCONFIGURACIONGINKGOBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class GinkgoBoxPanel;
+class HeaderPanel;
+class PanelScrollable;
+class SubTitledPanel;
+class SubTitledPanelSeparatorV;
+class SubTitledPanelSinBorder;
+class TitledPanel;
+class TitledPanelSinBorder;
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+#include <wx/panel.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/treectrl.h>
+#include <wx/sizer.h>
+#include <wx/splitter.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+#include <wx/stattext.h>
+#include <wx/textctrl.h>
+#include <wx/combobox.h>
+#include <wx/checkbox.h>
+#include <wx/choice.h>
+#include <wx/spinctrl.h>
+#include <wx/statbox.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/statbmp.h>
+#include <wx/dataview.h>
+#include <wx/notebook.h>
+#include <wx/scrolwin.h>
+#include <wx/propgrid/propgrid.h>
+#include <wx/listctrl.h>
+#include <wx/valtext.h>
+#include <wx/aui/auibook.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoConfiguracionBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoConfiguracionBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pImagePanel;
+        wxSplitterWindow* m_splitter2;
+        wxPanel* m_panel1;
+        wxTreeCtrl* m_pTreeNavegacion;
+        TitledPanelSinBorder* m_pTitledPanelConfig;
+        PanelScrollable* m_pPanelConfig;
+        wxBoxSizer* m_pSizerPaneles;
+        FooterPanel* m_panel3;
+        wxButton* m_button12;
+        wxButton* m_button13;
+        wxButton* m_button8;
+        wxButton* m_button9;
+        wxButton* m_pBAplicar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnCambioNodoNavegacion( wxTreeEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnExportarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnImportarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAceptarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancelarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAplicarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DialogoConfiguracionBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 860,565 ), long style = wxDEFAULT_DIALOG_STYLE );
+        ~DialogoConfiguracionBase();
+
+        void m_splitter2OnIdle( wxIdleEvent& )
+        {
+                m_splitter2->SetSashPosition( 245 );
+                m_splitter2->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DialogoConfiguracionBase::m_splitter2OnIdle ), NULL, this );
+        }
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelConfiguracionEstacionBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelConfiguracionEstacionBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_panelPhysician;
+        wxStaticText* m_staticText1;
+        wxTextCtrl* m_pMedicoNombre;
+        wxStaticText* m_staticText11;
+        wxTextCtrl* m_pMedicoId;
+        SubTitledPanelSeparatorV* m_pSep11;
+        SubTitledPanel* m_panelServicio;
+        wxStaticText* m_staticText39;
+        wxTextCtrl* m_pServicioNombre;
+        wxStaticText* m_staticText12;
+        wxTextCtrl* m_pServicioId;
+        SubTitledPanelSeparatorV* m_pSep1;
+        SubTitledPanel* m_pPanelInstitucion;
+        wxStaticText* m_staticText13;
+        wxTextCtrl* m_pCentroNombre;
+        wxStaticText* m_staticText111;
+        wxTextCtrl* m_pCentroId;
+        SubTitledPanelSeparatorV* m_pSep12;
+        SubTitledPanel* m_pPanelInstitucion1;
+        wxStaticText* m_staticText131;
+        wxComboBox* m_pComboCharset;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnTextoCambiado( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelConfiguracionEstacionBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~PanelConfiguracionEstacionBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelConfiguracionGeneralBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelConfiguracionGeneralBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pLanguage;
+        wxStaticText* m_staticText34;
+        wxComboBox* m_pComboLanguage;
+        SubTitledPanelSeparatorV* m_pSep3;
+        SubTitledPanel* m_pUpdate;
+        wxCheckBox* m_pCheckForUpdates;
+        wxCheckBox* m_pCheckAnonUsageStats;
+        SubTitledPanelSeparatorV* m_pSep31;
+        SubTitledPanel* m_pProxy;
+        wxCheckBox* m_pEnableProxy;
+        wxButton* m_pProxySettingsButton;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnIdiomaCambiado( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCheckForUpdates( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCheckEnableProxySettings( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnProxySettings( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelConfiguracionGeneralBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~PanelConfiguracionGeneralBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class ProxySettingsDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class ProxySettingsDialogBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        SubTitledPanel* m_panel64;
+        wxStaticText* m_pstaticText1;
+        wxTextCtrl* m_pHost;
+        wxStaticText* m_pStaticText22;
+        wxTextCtrl* m_pPort;
+        SubTitledPanelSeparatorV* m_panel641;
+        SubTitledPanel* m_panel642;
+        wxCheckBox* m_pCheckAuthentication;
+        wxStaticText* m_pstaticText12;
+        wxTextCtrl* m_pUsername;
+        wxStaticText* Port2;
+        wxTextCtrl* m_pPassword;
+        SubTitledPanelSeparatorV* m_panel6411;
+        SubTitledPanel* m_panel6421;
+        wxStaticText* m_staticText115;
+        wxTextCtrl* m_pExceptions;
+        wxStaticText* m_staticText116;
+        FooterPanel* m_pFooter;
+        wxButton* m_button37;
+        wxButton* m_button38;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnCheckAuthentication( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnOkClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancelClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        ProxySettingsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Proxy Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 400,570 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~ProxySettingsDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class LocalDatabaseConfigurationPanelBase
+///////////////////////////////////////////////////////////////////////////////
+class LocalDatabaseConfigurationPanelBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pPanelDicomDir;
+        wxStaticText* m_staticTextExplicacion;
+        wxStaticText* m_staticText32;
+        wxTextCtrl* m_pDICOMDir;
+        wxButton* m_buttonSeleccionarDICOMDir;
+        wxStaticText* m_pstaticTextAdvertencia;
+        wxCheckBox* m_pCheckDeleteOlder;
+        wxChoice* m_pChoiceDeleteOlder;
+        wxCheckBox* m_pCheckHDFreeSpace;
+        wxSpinCtrl* m_pSpinHDSpace;
+        wxStaticText* m_staticText65;
+        wxCheckBox* m_pCheckDicomDirSize;
+        wxSpinCtrl* m_pSpinDicomDirSize;
+        wxStaticText* m_staticText651;
+        wxStaticText* m_staticText68;
+        wxButton* m_button66;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnSize( wxSizeEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnTextoCambiado( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSeleccionarDirectorio( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCheckOlderStudies( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnOptionModified( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCheckHDSpace( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSpinCtrl( wxSpinEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCheckDicomDirSize( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnResetToDefault( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        LocalDatabaseConfigurationPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL );
+        ~LocalDatabaseConfigurationPanelBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelConfiguracionPACSBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelConfiguracionPACSBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pPACSLocal;
+        wxStaticText* m_staticTextExplicacion;
+        wxStaticText* m_staticText1;
+        wxTextCtrl* m_pAETLocal;
+        wxStaticText* m_pAETReal;
+        wxStaticBitmap* m_pHelpBitmap;
+        wxStaticText* m_staticText11;
+        wxTextCtrl* m_pPuertoLocal;
+        wxButton* m_pBAdvanced;
+        SubTitledPanelSeparatorV* m_pSep;
+        SubTitledPanel* m_pPACSServers;
+        wxDataViewListCtrl* m_pListPacs;
+        wxButton* m_button3;
+        wxButton* m_pEditButton;
+        wxButton* m_pDelButton;
+        wxButton* m_pDefaultButton;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnSize( wxSizeEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnTextoCambiado( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnHelpClick( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAdvancedLocal( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnNuevoClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEditarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEliminarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSetDefaultClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelConfiguracionPACSBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~PanelConfiguracionPACSBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoServidorPACSBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoServidorPACSBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        wxNotebook* m_notebook1;
+        BodyPanel* m_panel6;
+        SubTitledPanel* m_panel64;
+        wxStaticText* m_pstaticText1;
+        wxTextCtrl* m_pId;
+        wxStaticText* m_pstaticText2;
+        wxTextCtrl* m_pAET;
+        wxStaticText* m_pstaticText3;
+        wxTextCtrl* m_pHost;
+        wxStaticText* m_pstaticText4;
+        wxTextCtrl* m_pPuerto;
+        wxStaticText* m_staticText33;
+        wxSpinCtrl* m_pPDU;
+        wxStaticText* m_staticText48;
+        wxChoice* m_pRetrieveMethod;
+        wxStaticText* m_staticText59;
+        wxTextCtrl* m_pWadoURL;
+        wxStaticText* m_staticText60;
+        wxChoice* m_pRetrieveMode;
+        wxStaticText* m_staticText57;
+        wxCheckBox* m_pReuseConnection;
+        BodyPanel* m_pWorkListPanel;
+        SubTitledPanel* m_panel83;
+        wxStaticText* m_staticText611;
+        wxCheckBox* m_pCheckDICOMMPPS;
+        wxCheckBox* m_pCheckHL7;
+        wxPanel* m_pPanelHL7;
+        wxStaticBoxSizer* m_pSizerHL7;
+        wxCheckBox* m_pCheckAbort;
+        wxTextCtrl* m_pTextAbort;
+        wxCheckBox* m_pCheckCompleted;
+        wxTextCtrl* m_pTextCompleted;
+        wxCheckBox* m_pCheckInProgress;
+        wxTextCtrl* m_pTextProgress;
+        wxButton* m_button62;
+        BodyPanel* m_pPanelSeguridad;
+        SubTitledPanel* m_pSSLTLS;
+        wxCheckBox* m_pVerifyServer;
+        wxCheckBox* m_pUseSSL;
+        wxStaticText* m_staticText55;
+        wxButton* m_pBCert;
+        SubTitledPanelSeparatorV* m_panelSep;
+        SubTitledPanel* m_panelUserPass;
+        wxStaticText* m_staticText61;
+        wxTextCtrl* m_pUser;
+        wxStaticText* m_staticText62;
+        wxTextCtrl* m_pPassword;
+        SubTitledPanelSeparatorV* m_panelSep1;
+        SubTitledPanel* m_pPanelDefaultCharset;
+        wxStaticText* m_staticText131;
+        wxComboBox* m_pComboCharset;
+        FooterPanel* m_pFooter;
+        wxButton* m_button20;
+        wxButton* m_button37;
+        wxButton* m_button38;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnRetrieveMethodChoice( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnChecWL( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnMessageDefaultValues( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAdvancedConfiguration( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnTextoCambiado( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnProbarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnOkClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancelClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DialogoServidorPACSBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("DICOM Node"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 450,550 ), long style = wxDEFAULT_DIALOG_STYLE );
+        ~DialogoServidorPACSBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoLocalPACSBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoLocalPACSBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_panel51;
+        TitledPanel* m_panel67;
+        wxCheckBox* m_pVerifyServer;
+        wxCheckBox* m_pUseTLS;
+        wxStaticText* m_staticText55;
+        wxButton* m_pBCert;
+        FooterPanel* m_pFooter;
+        wxButton* m_button8;
+        wxButton* m_button9;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnEditCertificate( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAceptarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DialogoLocalPACSBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Advanced Settings"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 346,300 ), long style = wxDEFAULT_DIALOG_STYLE );
+        ~DialogoLocalPACSBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelConfiguracionHCEBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelConfiguracionHCEBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pHCE;
+        wxStaticText* m_pstIdOrganizacionReceptora;
+        wxTextCtrl* m_pIdOrganizacionReceptora;
+        wxStaticText* m_pstIdSistemaPeticionario;
+        wxTextCtrl* m_pIdSistemaPeticionario;
+        wxStaticText* m_pstIdAplicacionRellenadora;
+        wxTextCtrl* m_pIdAplicacionRellenadora;
+        wxStaticText* m_pstIdAplicacionPACS;
+        wxTextCtrl* m_pIdGinkgoAplication;
+        SubTitledPanelSeparatorV* m_pSep;
+        SubTitledPanel* m_pIntegrationEngine;
+        wxStaticText* m_staticText121;
+        wxTextCtrl* m_pHostnameMI;
+        wxStaticText* m_staticText60;
+        wxTextCtrl* m_pPuertoMI;
+        wxStaticText* m_staticText38;
+        wxChoice* m_pProtocolo;
+        wxStaticText* m_staticText39;
+        wxChoice* m_pFormato;
+        wxButton* m_button15;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnSize( wxSizeEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnTextoCambiado( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnTestClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelConfiguracionHCEBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 556,438 ), long style = wxTAB_TRAVERSAL );
+        ~PanelConfiguracionHCEBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelConfiguracionExtensionesBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelConfiguracionExtensionesBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pExtensions;
+        wxScrolledWindow* m_pScrollPanelExtensions;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnEraseBackground( wxEraseEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelConfiguracionExtensionesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~PanelConfiguracionExtensionesBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class ExtensionPanelBase
+///////////////////////////////////////////////////////////////////////////////
+class ExtensionPanelBase : public GinkgoBoxPanel
+{
+private:
+
+protected:
+        wxStaticBitmap* m_pThumbnail;
+        wxStaticText* m_pLabelTitle;
+
+public:
+
+        ExtensionPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~ExtensionPanelBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoEditarCertificadoBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoEditarCertificadoBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        SubTitledPanel* m_pPanelDefault;
+        wxCheckBox* m_pCheckDefault;
+        SubTitledPanelSeparatorV* m_pSepDefault;
+        SubTitledPanel* m_pPanelPublic;
+        wxStaticText* m_pLabel;
+        wxTextCtrl* m_pTextoCertificado;
+        wxButton* m_button62;
+        SubTitledPanelSeparatorV* m_panel60;
+        SubTitledPanel* m_pPanelPrivate;
+        wxStaticText* m_pLabel11;
+        wxTextCtrl* m_pTextoPrivateKey;
+        wxButton* m_button621;
+        FooterPanel* m_pFooter;
+        wxButton* m_button48;
+        wxButton* m_button8;
+        wxButton* m_button9;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnCheckDefault( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnLoadPublicClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnLoadPrivateClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnResetToDefault( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAceptarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DialogoEditarCertificadoBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Certificate"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 450,550 ), long style = wxDEFAULT_DIALOG_STYLE );
+        ~DialogoEditarCertificadoBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class ProfileDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class ProfileDialogBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBasePanel;
+        TitledPanel* m_pTitledPanel;
+        wxStaticText* m_staticText47;
+        wxTextCtrl* m_pName;
+        wxPropertyGrid* m_pGridPermisos;
+        FooterPanel* m_pFooterPanel;
+        wxButton* m_button28;
+        wxButton* m_button29;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnOkClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancelClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        ProfileDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Edit profile"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 770,540 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~ProfileDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelConfiguracionPermisosBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelConfiguracionPermisosBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pBasePanel;
+        wxDataViewListCtrl* m_pListProfiles;
+        wxButton* m_button3;
+        wxButton* m_pBEdit;
+        wxButton* m_pBDelete;
+        wxButton* m_pBActive;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnSize( wxSizeEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnNuevoClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEditarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEliminarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSetActive( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelConfiguracionPermisosBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 501,160 ), long style = wxTAB_TRAVERSAL );
+        ~PanelConfiguracionPermisosBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelConfiguracionUbicacionesBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelConfiguracionUbicacionesBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pUbicaciones;
+        wxStaticText* m_staticTextExplicacion;
+        wxDataViewListCtrl* m_pListUbicaciones;
+        wxButton* m_pBotonNuevo;
+        wxButton* m_pBotonEdit;
+        wxButton* m_pBotonDelete;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnSize( wxSizeEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnNuevoClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEditarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEliminarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelConfiguracionUbicacionesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~PanelConfiguracionUbicacionesBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoAddLocationBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoAddLocationBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanel;
+        wxStaticText* m_pSTTitle;
+        wxTextCtrl* m_pTETitle;
+        wxStaticText* m_pSTLocation;
+        wxTextCtrl* m_pTELocation;
+        wxButton* m_pOpenDir;
+        wxStaticText* m_pSTDesc;
+        wxTextCtrl* m_pTEDesc;
+        wxCheckBox* m_pMonitorize;
+        wxCheckBox* m_pCleanAfter;
+        wxCheckBox* m_pCleanBefore;
+        FooterPanel* m_pFooter;
+        wxButton* m_pAccept;
+        wxButton* m_pCancel;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnOpenDirClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAceptarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DialogoAddLocationBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Add/Edit Location"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 450,450 ), long style = wxDEFAULT_DIALOG_STYLE );
+        ~DialogoAddLocationBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelConfiguracionSeguridadBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelConfiguracionSeguridadBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pSecurity;
+        wxStaticText* m_staticText47;
+        wxChoice* m_pSecType;
+        SubTitledPanelSeparatorV* m_pSep;
+        SubTitledPanel* m_pPanelUsuarios;
+        wxListCtrl* m_pListaUsuarios;
+        wxButton* m_button3;
+        wxButton* m_pBCambiarPassword;
+        wxButton* m_pBDelete;
+        SubTitledPanel* m_pPanelPassword;
+        wxStaticText* m_pLabelPassword;
+        wxButton* m_pButtonSetPassword;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnEraseBackground( wxEraseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSecTypeChoice( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnListaUsuariosItemDeSelected( wxListEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnListaUsuariosItemSelected( wxListEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnNuevoClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCambiarPasswordClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEliminarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSetMainPassword( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelConfiguracionSeguridadBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL );
+        ~PanelConfiguracionSeguridadBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class UserDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class UserDialogBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        TitledPanel* m_pFormPanel;
+        wxStaticText* m_pLabelUser;
+        wxTextCtrl* m_pTCUsuario;
+        wxStaticText* m_pstat2;
+        wxTextCtrl* m_pTCPassword0;
+        wxStaticText* m_pstat21;
+        wxTextCtrl* m_pTCPassword1;
+        FooterPanel* m_panel54;
+        wxButton* m_button42;
+        wxButton* m_button41;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnOkClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        UserDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Edit User"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 423,292 ), long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSTAY_ON_TOP );
+        ~UserDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelConfigurationAnonymizationBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelConfigurationAnonymizationBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pAnonimization;
+        wxStaticText* m_staticText52;
+        wxTextCtrl* m_pTextDefaultValue;
+
+public:
+
+        PanelConfigurationAnonymizationBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL );
+        ~PanelConfigurationAnonymizationBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class AddWLDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class AddWLDialogBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelMessage;
+        wxStaticText* m_staticText79;
+        wxStaticText* m_staticText59;
+        wxStaticText* m_staticText60;
+        FooterPanel* m_pFooter;
+        wxButton* m_pOkButton;
+        wxButton* m_button5;
+
+public:
+        wxTextCtrl* m_pLabel;
+        wxTextCtrl* m_pWindow;
+        wxTextCtrl* m_pLevel;
+        wxString windowValidator;
+        wxString levelValidator;
+
+        AddWLDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Add window/level"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~AddWLDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class EditCornerAnnotationsDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class EditCornerAnnotationsDialogBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pMainPanel;
+        wxStaticText* m_staticText84;
+        wxStaticText* m_staticText85;
+        wxStaticBitmap* m_pHelpBitmap;
+        wxGridSizer* m_pCornerAnnotationsSizer;
+        FooterPanel* m_pFooter;
+        wxButton* m_button70;
+        wxButton* m_pOkButton;
+        wxButton* m_button5;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnSetDefaultValues( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        EditCornerAnnotationsDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Edit corner annotations"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 850,650 ), long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~EditCornerAnnotationsDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class ModalityPanelBase
+///////////////////////////////////////////////////////////////////////////////
+class ModalityPanelBase : public wxPanel
+{
+private:
+
+protected:
+        wxDataViewListCtrl*  m_pListWL;
+        wxButton* m_button63;
+        wxButton* m_button64;
+        wxButton* m_button65;
+        wxStaticText* m_staticText68;
+        wxStaticText* m_staticText71;
+        wxButton* m_button67;
+        wxStaticText* m_staticText69;
+        wxChoice* m_pChoiceInterpolate;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnAddWL( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEditWL( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnDeleteWL( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnChoiceChanged( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSetupCornerAnnotations( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+        wxChoice* m_pDefaultWindowLevel;
+
+        ModalityPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~ModalityPanelBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class EditHangingProtocolDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class EditHangingProtocolDialogBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        wxNotebook* m_pMainNoteBook;
+        wxPanel* m_pGeneralPanel;
+        wxStaticText* m_staticText87;
+        wxTextCtrl* m_textName;
+        wxStaticText* m_staticText91;
+        wxTextCtrl* m_textOpeningMode;
+        wxStaticBoxSizer* m_pSizerStudyCriteria;
+        wxPanel* m_pWorkspacePanel;
+        wxAuiNotebook* m_pNoteBookWindows;
+        wxPanel* m_pAdddPanel;
+        FooterPanel* m_pFooter;
+        wxButton* m_button37;
+        wxButton* m_button38;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnPageChanging( wxAuiNotebookEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnPageClose( wxAuiNotebookEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnOkClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancelClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        EditHangingProtocolDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Hanging protocol"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 744,641 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
+        ~EditHangingProtocolDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class HangingProtocolConfigurationPanelBase
+///////////////////////////////////////////////////////////////////////////////
+class HangingProtocolConfigurationPanelBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pProtocols;
+        wxDataViewListCtrl* m_pListHanging;
+        wxButton* m_button3;
+        wxButton* m_pBEdit;
+        wxButton* m_pBDelete;
+        wxButton* m_pBActive;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnNuevoClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEditarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEliminarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSetActive( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        HangingProtocolConfigurationPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL );
+        ~HangingProtocolConfigurationPanelBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DefaultModalitySettingsConfigurationPanelBase
+///////////////////////////////////////////////////////////////////////////////
+class DefaultModalitySettingsConfigurationPanelBase : public wxPanel
+{
+private:
+
+protected:
+        wxSplitterWindow* m_splitter4;
+        wxPanel* m_panel90;
+        wxTreeCtrl* m_pWLList;
+        SubTitledPanelSinBorder* m_pTitledPanelModalities;
+        PanelScrollable* m_pModalityPanel;
+        wxBoxSizer* m_pSizerModalities;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnTreeSelChanged( wxTreeEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DefaultModalitySettingsConfigurationPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL );
+        ~DefaultModalitySettingsConfigurationPanelBase();
+
+        void m_splitter4OnIdle( wxIdleEvent& )
+        {
+                m_splitter4->SetSashPosition( 150 );
+                m_splitter4->Disconnect( wxEVT_IDLE, wxIdleEventHandler( DefaultModalitySettingsConfigurationPanelBase::m_splitter4OnIdle ), NULL, this );
+        }
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CornerAnnotationPanel
+///////////////////////////////////////////////////////////////////////////////
+class CornerAnnotationPanel : public wxPanel
+{
+private:
+
+protected:
+
+public:
+        wxStaticText* m_pLabel;
+        wxTextCtrl* m_pLine1;
+        wxTextCtrl* m_pLine2;
+        wxTextCtrl* m_pLine3;
+        wxTextCtrl* m_pLine4;
+
+        CornerAnnotationPanel( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~CornerAnnotationPanel();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class StudyWindowBase
+///////////////////////////////////////////////////////////////////////////////
+class StudyWindowBase : public wxPanel
+{
+private:
+
+protected:
+        SubTitledPanel* m_pConfigWindow;
+        wxStaticText* m_staticText72;
+        wxButton* m_button62;
+        wxButton* m_pSetupPositionButton;
+        SubTitledPanelSeparatorV* m_panel64111;
+        SubTitledPanel* m_pLayoutPreview;
+        wxBoxSizer* m_pSizerLayoutTools;
+        wxStaticText* m_staticText56;
+        wxSpinCtrl* m_pSpinRows;
+        wxStaticText* m_staticText57;
+        wxSpinCtrl* m_pSpinCols;
+        wxBoxSizer* m_pPreviewSizer;
+        wxBoxSizer* m_pSizerSeriesCriteria;
+        wxStaticText* m_staticText65;
+        SubTitledPanelSeparatorV* m_panel6411;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnSetDefaultWindowPosition( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSetupWindowPositionClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSpinRows( wxSpinEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSpinCols( wxSpinEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        StudyWindowBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL );
+        ~StudyWindowBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class EditCriteriaPanelBase
+///////////////////////////////////////////////////////////////////////////////
+class EditCriteriaPanelBase : public wxPanel
+{
+private:
+
+protected:
+        wxDataViewListCtrl* m_pListCriteria;
+        wxButton* m_button3;
+        wxButton* m_pBDelete;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnAddClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnDeleteClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+        wxBoxSizer* m_pGeneralSizer;
+        wxBoxSizer* m_pButtonSizer;
+
+        EditCriteriaPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,200 ), long style = wxTAB_TRAVERSAL );
+        ~EditCriteriaPanelBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class SelectOpeningModeBase
+///////////////////////////////////////////////////////////////////////////////
+class SelectOpeningModeBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelMessage;
+        wxStaticText* m_pLabel;
+        wxChoice* m_pOpeningMode;
+        FooterPanel* m_pFooter;
+        wxButton* m_pOkButton;
+        wxButton* m_button5;
+
+public:
+
+        SelectOpeningModeBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select opening mode"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~SelectOpeningModeBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class AddTagDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class AddTagDialogBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelMessage;
+        wxStaticText* m_staticText59;
+        wxStaticText* m_staticText60;
+        wxChoice* m_pChoiceTag;
+        wxTextCtrl* m_pTextValue;
+        FooterPanel* m_pFooter;
+        wxButton* m_pOkButton;
+        wxButton* m_button5;
+
+public:
+
+        AddTagDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Add tag"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~AddTagDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class SetupWindowPositionBase
+///////////////////////////////////////////////////////////////////////////////
+class SetupWindowPositionBase : public wxDialog
+{
+private:
+
+protected:
+        wxPanel* m_panel97;
+        wxStaticText* m_staticText73;
+        wxButton* m_button64;
+        wxButton* m_button65;
+
+public:
+
+        SetupWindowPositionBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Setup window position"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
+        ~SetupWindowPositionBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class SmartRetrieveConfigurationPanelBase
+///////////////////////////////////////////////////////////////////////////////
+class SmartRetrieveConfigurationPanelBase : public wxPanel
+{
+private:
+
+protected:
+        wxCheckBox* m_pCheckEnable;
+        SubTitledPanel* m_pPanelQueries;
+        wxDataViewListCtrl* m_pListQueries;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnCheckEnableBackgroundQueries( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        SmartRetrieveConfigurationPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL );
+        ~SmartRetrieveConfigurationPanelBase();
+
+};
+
+#endif //__PANELESCONFIGURACIONGINKGOBASE_H__
diff --git a/cadxcore/main/gui/configuration/smartretrieveconfigurationpanel.cpp b/cadxcore/main/gui/configuration/smartretrieveconfigurationpanel.cpp
new file mode 100644
index 0000000..a1ae111
--- /dev/null
+++ b/cadxcore/main/gui/configuration/smartretrieveconfigurationpanel.cpp
@@ -0,0 +1,166 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+#include <sstream>
+#include <limits>
+
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <api/internationalization/internationalization.h>
+#include <main/controllers/smartretrievecontroller.h>
+#include <main/controllers/storedqueriescontroller.h>
+#include <wx/valtext.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <wx/mstream.h>
+
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/log.h>
+#include <wx/busyinfo.h>
+#include <wx/xml/xml.h>
+#include <wx/sstream.h>
+#include <wx/log.h>
+#include <wx/menu.h>
+
+#include <wx/tokenzr.h>
+
+#include "smartretrieveconfigurationpanel.h"
+
+#include <sstream>
+
+
+#define POD_COL_NAME_IDX     0
+#define POD_COL_NAME_WIDTH   340
+#define POD_COL_ACTIVE_IDX   1
+#define POD_COL_ACTIVE_WIDTH 80
+
+namespace GNC
+{
+namespace GUI
+{
+////////////////-------------------------------------------------------------------------------------/////////////////////////////
+
+SmartRetrieveConfigurationPanel::SmartRetrieveConfigurationPanel(wxWindow* pParent,IDialogoConfiguracion* pDialogo): SmartRetrieveConfigurationPanelBase(pParent), IPasoConfiguracion(pDialogo)
+{
+        m_pModel = new wxDataViewListStore();
+        m_pListQueries->AssociateModel(m_pModel.get());
+
+        m_pListQueries->AppendTextColumn(_("Name"), wxDATAVIEW_CELL_INERT, POD_COL_NAME_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE );
+        m_pListQueries->AppendToggleColumn(_("Active"),wxDATAVIEW_CELL_ACTIVATABLE, POD_COL_ACTIVE_WIDTH, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE );
+
+        Recargar();
+
+        m_pListQueries->Connect(wxEVT_DATAVIEW_ITEM_EDITING_DONE, wxDataViewEventHandler( SmartRetrieveConfigurationPanel::OnItemEdited), NULL, this );
+        m_pListQueries->Connect(wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( SmartRetrieveConfigurationPanel::OnListItemActivated ), NULL, this);
+}
+
+SmartRetrieveConfigurationPanel::~SmartRetrieveConfigurationPanel()
+{
+}
+
+void SmartRetrieveConfigurationPanel::Recargar()
+{
+        m_pCheckEnable->SetValue(GNC::GCS::SmartRetrieveController::Instance()->isEnabled());
+
+        GNC::GCS::StoredQueryController::TStoredQueriesList listOfQueries = GNC::GCS::StoredQueryController::Instance()->getStoredQueries();
+        for (GNC::GCS::StoredQueryController::TStoredQueriesList::iterator it = listOfQueries.begin(); it != listOfQueries.end(); ++it) {
+                wxVector<wxVariant> data;
+                data.push_back(wxString::FromUTF8((*it)->getName().c_str()));
+                data.push_back((*it)->isActive());
+                m_pListQueries->AppendItem(data);
+
+        }
+
+        //refresh status
+        Refresh();
+}
+
+//region "Metodos de IPasoConfiguracion"
+wxWindow* SmartRetrieveConfigurationPanel::GetPanel()
+{
+        return this;
+}
+
+std::string SmartRetrieveConfigurationPanel::GetTitle()
+{
+        return _Std("Smart retrieve");
+}
+
+std::string SmartRetrieveConfigurationPanel::GetCabecera()
+{
+        return _Std("Smart retrieve settings");
+}
+
+bool SmartRetrieveConfigurationPanel::Validar()
+{
+        bool ok = true;
+        return ok;
+}
+
+bool SmartRetrieveConfigurationPanel::Guardar()
+{
+
+        GNC::GCS::SmartRetrieveController::Instance()->enable(m_pCheckEnable->GetValue());
+        //todo set status of queries...
+        GNC::GCS::StoredQueryController::TStoredQueriesList queries = GNC::GCS::StoredQueryController::Instance()->getStoredQueries();
+        for (unsigned  i = 0; i < m_pModel->GetCount(); ++i) {
+                wxVariant value;
+                m_pModel->GetValueByRow(value, i, POD_COL_ACTIVE_IDX);
+                bool active = value.GetBool();
+                m_pModel->GetValueByRow(value, i, POD_COL_NAME_IDX);
+                std::string name(value.GetString().ToUTF8());
+
+                for (GNC::GCS::StoredQueryController::TStoredQueriesList::iterator it = queries.begin(); it != queries.end(); ++it) {
+                        if ((*it)->getName() == name) {
+                                (*it)->setActive(active);
+                                break;
+                        }
+                }
+        }
+        GNC::GCS::StoredQueryController::Instance()->clearQueries();
+        GNC::GCS::StoredQueryController::Instance()->storeQueries(queries);
+        GNC::GCS::SmartRetrieveController::Instance()->resetStatus();
+        return true;
+}
+//endregion
+
+void SmartRetrieveConfigurationPanel::OnItemEdited(wxDataViewEvent& /*event*/)
+{
+        OnPropiedadCambiada();
+}
+
+void SmartRetrieveConfigurationPanel::OnCheckEnableBackgroundQueries(wxCommandEvent &/*evt*/)
+{
+        OnPropiedadCambiada();
+}
+
+void SmartRetrieveConfigurationPanel::OnListItemActivated(wxDataViewEvent& event)
+{
+        if (event.GetItem().IsOk()) {
+                int row = m_pModel->GetRow(event.GetItem());
+                m_pListQueries->SetToggleValue(!m_pListQueries->GetToggleValue(row, POD_COL_ACTIVE_IDX), row, POD_COL_ACTIVE_IDX);
+        }
+        OnPropiedadCambiada();
+}
+}
+}
diff --git a/cadxcore/main/gui/configuration/smartretrieveconfigurationpanel.h b/cadxcore/main/gui/configuration/smartretrieveconfigurationpanel.h
new file mode 100644
index 0000000..8539163
--- /dev/null
+++ b/cadxcore/main/gui/configuration/smartretrieveconfigurationpanel.h
@@ -0,0 +1,60 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iconfiguracion.h>
+#include "panelesconfiguracionginkgobase.h"
+#include <string>
+#include <vector>
+
+namespace GNC
+{
+namespace GUI
+{
+
+class SmartRetrieveConfigurationPanel: public SmartRetrieveConfigurationPanelBase, public IPasoConfiguracion
+{
+public:
+        SmartRetrieveConfigurationPanel(wxWindow* pParent,IDialogoConfiguracion* pDialogo);
+        ~SmartRetrieveConfigurationPanel();
+
+        void Recargar();
+
+        //region "Metodos de IPasoConfiguracion"
+        wxWindow* GetPanel();
+
+        std::string GetTitle();
+
+        std::string GetCabecera();
+
+        bool Validar();
+
+        bool Guardar();
+        //endregion
+
+protected:
+        virtual void OnItemEdited(wxDataViewEvent& event);
+        virtual void OnCheckEnableBackgroundQueries(wxCommandEvent &evt);
+        virtual void OnListItemActivated(wxDataViewEvent& event);
+        wxObjectDataPtr<wxDataViewListStore> m_pModel;
+
+};
+}
+}
diff --git a/cadxcore/main/gui/countdownmessage/CountDownMessage.fbp b/cadxcore/main/gui/countdownmessage/CountDownMessage.fbp
new file mode 100644
index 0000000..100288a
--- /dev/null
+++ b/cadxcore/main/gui/countdownmessage/CountDownMessage.fbp
@@ -0,0 +1,1382 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">countdownmessagebase</property>
+        <property name="first_id">1052</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">CountdownMessage</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">500,270</property>
+            <property name="name">InactivityCountdownMessageBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="style">wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">Closing</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose">OnClose</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Inactivity detected</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer141</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pFormPanel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Inactivity detected</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer19</property>
+                                        <property name="orient">wxHORIZONTAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label"></property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabelInactivity</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">380</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel6</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer14</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">0</property>
+                                <property name="flag"></property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Close</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pButtonClose</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCloseButton</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBotonCancelar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCancel</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">415,300</property>
+            <property name="name">CountdownMessageBase</property>
+            <property name="pos"></property>
+            <property name="size"></property>
+            <property name="style">wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Info</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer141</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pFormPanel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Inactivity detected</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer19</property>
+                                        <property name="orient">wxHORIZONTAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label"></property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabelInactivity</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel6</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer14</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">0</property>
+                                <property name="flag"></property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="1">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Ok</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pButtonOk</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBotonCancelar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/countdownmessage/countdownmessage.cpp b/cadxcore/main/gui/countdownmessage/countdownmessage.cpp
new file mode 100644
index 0000000..18f6760
--- /dev/null
+++ b/cadxcore/main/gui/countdownmessage/countdownmessage.cpp
@@ -0,0 +1,91 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/statbmp.h>
+#include <wx/bmpbuttn.h>
+
+#include "countdownmessage.h"
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/controllers/inactivitycontroller.h>
+#include <main/entorno.h>
+
+namespace GNC
+{
+namespace GUI
+{
+CountdownMessage::CountdownMessage(wxWindow* pParent, const wxString title, const wxString& message, int seconds): CountdownMessageBase(pParent), m_last(seconds)
+{
+        m_pBody->SetToolTip(title);
+        m_pFormPanel->SetToolTip(title);
+        m_message = message;
+        m_pFormPanel->Layout();
+        m_pBody->Layout();
+        Layout();
+}
+
+CountdownMessage::~CountdownMessage()
+{
+}
+
+int CountdownMessage::ShowModalCountdown()
+{
+        Notify();
+        return ShowModal();
+}
+
+bool CountdownMessage::Show(bool show)
+{
+        if (show && !IsShown()) {
+                Notify();
+        } else {
+                if (IsRunning()) {
+                        Stop();
+                }
+        }
+        return CountdownMessageBase::Show(show);
+}
+
+void CountdownMessage::Notify()
+{
+        if (m_last > 0) {
+                Freeze();
+                m_last--;
+                m_pLabelInactivity->SetLabel(wxString::Format(m_message, m_last));
+                m_pLabelInactivity->Wrap(m_pFormPanel->GetSize().x - 20);
+                m_pFormPanel->Layout();
+                m_pBody->Layout();
+                Layout();
+                this->Start(1000, true);
+                Thaw();
+        } else {
+                if (IsRunning()) {
+                        Stop();
+                }
+                if (IsModal()) {
+                        EndModal(wxID_OK);
+                } else {
+                        SetReturnCode(wxID_OK);
+                        Close();
+                }
+        }
+}
+}
+}
diff --git a/cadxcore/main/gui/countdownmessage/countdownmessage.h b/cadxcore/main/gui/countdownmessage/countdownmessage.h
new file mode 100644
index 0000000..052e5b8
--- /dev/null
+++ b/cadxcore/main/gui/countdownmessage/countdownmessage.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <wx/timer.h>
+#include "countdownmessagebase.h"
+
+namespace GNC
+{
+namespace GUI
+{
+class CountdownMessage: public CountdownMessageBase, public wxTimer
+{
+public:
+
+        CountdownMessage(wxWindow* pParent, const wxString title, const wxString& message, int seconds = 30);
+        ~CountdownMessage();
+        virtual int ShowModalCountdown();
+        virtual bool Show(bool show=true);
+protected:
+        virtual void Notify();
+        int m_last;
+        wxString m_message;
+};
+}
+}
diff --git a/cadxcore/main/gui/countdownmessage/countdownmessagebase.cpp b/cadxcore/main/gui/countdownmessage/countdownmessagebase.cpp
new file mode 100644
index 0000000..3f45a5c
--- /dev/null
+++ b/cadxcore/main/gui/countdownmessage/countdownmessagebase.cpp
@@ -0,0 +1,163 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "countdownmessagebase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+InactivityCountdownMessageBase::InactivityCountdownMessageBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 500,270 ), wxDefaultSize );
+
+        wxBoxSizer* m_pMainSizer;
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Inactivity detected") );
+
+        m_pMainSizer->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer141;
+        bSizer141 = new wxBoxSizer( wxVERTICAL );
+
+        m_pFormPanel = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pFormPanel->SetToolTip( _("Inactivity detected") );
+
+        wxBoxSizer* bSizer19;
+        bSizer19 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pLabelInactivity = new wxStaticText( m_pFormPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelInactivity->Wrap( 380 );
+        bSizer19->Add( m_pLabelInactivity, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pFormPanel->SetSizer( bSizer19 );
+        m_pFormPanel->Layout();
+        bSizer19->Fit( m_pFormPanel );
+        bSizer141->Add( m_pFormPanel, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer141 );
+        m_pBody->Layout();
+        bSizer141->Fit( m_pBody );
+        m_pMainSizer->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_panel6 = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer14;
+        bSizer14 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer14->Add( 0, 0, 1, 0, 0 );
+
+        m_pButtonClose = new wxButton( m_panel6, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer14->Add( m_pButtonClose, 0, wxRIGHT, 5 );
+
+        m_pBotonCancelar = new wxButton( m_panel6, wxID_OK, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBotonCancelar->SetDefault();
+        bSizer14->Add( m_pBotonCancelar, 0, wxALIGN_CENTER_VERTICAL|wxLEFT, 5 );
+
+
+        m_panel6->SetSizer( bSizer14 );
+        m_panel6->Layout();
+        bSizer14->Fit( m_panel6 );
+        m_pMainSizer->Add( m_panel6, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+        m_pMainSizer->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( InactivityCountdownMessageBase::OnClose ) );
+        m_pButtonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InactivityCountdownMessageBase::OnCloseButton ), NULL, this );
+        m_pBotonCancelar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InactivityCountdownMessageBase::OnCancel ), NULL, this );
+}
+
+InactivityCountdownMessageBase::~InactivityCountdownMessageBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( InactivityCountdownMessageBase::OnClose ) );
+        m_pButtonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InactivityCountdownMessageBase::OnCloseButton ), NULL, this );
+        m_pBotonCancelar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( InactivityCountdownMessageBase::OnCancel ), NULL, this );
+
+}
+
+CountdownMessageBase::CountdownMessageBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 415,300 ), wxDefaultSize );
+
+        wxBoxSizer* m_pMainSizer;
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Info") );
+
+        m_pMainSizer->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer141;
+        bSizer141 = new wxBoxSizer( wxVERTICAL );
+
+        m_pFormPanel = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pFormPanel->SetToolTip( _("Inactivity detected") );
+
+        wxBoxSizer* bSizer19;
+        bSizer19 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pLabelInactivity = new wxStaticText( m_pFormPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelInactivity->Wrap( -1 );
+        bSizer19->Add( m_pLabelInactivity, 0, wxALL|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pFormPanel->SetSizer( bSizer19 );
+        m_pFormPanel->Layout();
+        bSizer19->Fit( m_pFormPanel );
+        bSizer141->Add( m_pFormPanel, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer141 );
+        m_pBody->Layout();
+        bSizer141->Fit( m_pBody );
+        m_pMainSizer->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_panel6 = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer14;
+        bSizer14 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer14->Add( 0, 0, 1, 0, 0 );
+
+        m_pButtonOk = new wxButton( m_panel6, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pButtonOk->SetDefault();
+        bSizer14->Add( m_pButtonOk, 0, wxRIGHT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pBotonCancelar = new wxButton( m_panel6, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer14->Add( m_pBotonCancelar, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_panel6->SetSizer( bSizer14 );
+        m_panel6->Layout();
+        bSizer14->Fit( m_panel6 );
+        m_pMainSizer->Add( m_panel6, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+        m_pMainSizer->Fit( this );
+
+        this->Centre( wxBOTH );
+}
+
+CountdownMessageBase::~CountdownMessageBase()
+{
+}
diff --git a/cadxcore/main/gui/countdownmessage/countdownmessagebase.h b/cadxcore/main/gui/countdownmessage/countdownmessagebase.h
new file mode 100644
index 0000000..3847fdf
--- /dev/null
+++ b/cadxcore/main/gui/countdownmessage/countdownmessagebase.h
@@ -0,0 +1,101 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __COUNTDOWNMESSAGEBASE_H__
+#define __COUNTDOWNMESSAGEBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class HeaderPanel;
+class TitledPanel;
+
+#include <wx/panel.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/sizer.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class InactivityCountdownMessageBase
+///////////////////////////////////////////////////////////////////////////////
+class InactivityCountdownMessageBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        TitledPanel* m_pFormPanel;
+        wxStaticText* m_pLabelInactivity;
+        FooterPanel* m_panel6;
+        wxButton* m_pButtonClose;
+        wxButton* m_pBotonCancelar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnClose( wxCloseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCloseButton( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancel( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        InactivityCountdownMessageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Closing"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~InactivityCountdownMessageBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CountdownMessageBase
+///////////////////////////////////////////////////////////////////////////////
+class CountdownMessageBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        TitledPanel* m_pFormPanel;
+        wxStaticText* m_pLabelInactivity;
+        FooterPanel* m_panel6;
+        wxButton* m_pButtonOk;
+        wxButton* m_pBotonCancelar;
+
+public:
+
+        CountdownMessageBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~CountdownMessageBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__COUNTDOWNMESSAGEBASE_H__
diff --git a/cadxcore/main/gui/countdownmessage/inactivitycountdownmessage.cpp b/cadxcore/main/gui/countdownmessage/inactivitycountdownmessage.cpp
new file mode 100644
index 0000000..6329cf6
--- /dev/null
+++ b/cadxcore/main/gui/countdownmessage/inactivitycountdownmessage.cpp
@@ -0,0 +1,101 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/statbmp.h>
+#include <wx/bmpbuttn.h>
+
+#include "inactivitycountdownmessage.h"
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/controllers/inactivitycontroller.h>
+#include <main/entorno.h>
+
+namespace GNC
+{
+namespace GUI
+{
+InactivityCountdownMessage::InactivityCountdownMessage(wxWindow* pParent, const wxString& message): InactivityCountdownMessageBase(pParent), m_last(6)
+{
+        m_message = message;
+        m_pFormPanel->Layout();
+        m_pBody->Layout();
+        Layout();
+}
+
+InactivityCountdownMessage::~InactivityCountdownMessage()
+{
+        GNC::GCS::InactivityController::Instance()->DetachForm();
+}
+
+bool InactivityCountdownMessage::Show(bool show)
+{
+        if (show && !IsShown()) {
+                m_last = 6;
+                Notify();
+        } else {
+                if (IsRunning()) {
+                        Stop();
+                }
+                GNC::GCS::InactivityController::Instance()->RestartMonitoring();
+        }
+        return InactivityCountdownMessageBase::Show(show);
+}
+
+void InactivityCountdownMessage::Notify()
+{
+        if (m_last > 0) {
+                Freeze();
+                m_last--;
+                m_pLabelInactivity->SetLabel(wxString::Format(m_message, m_last));
+                m_pFormPanel->Layout();
+                m_pBody->Layout();
+                Layout();
+                this->Start(1000, true);
+                Thaw();
+        } else {
+                GNC::Entorno::Instance()->GetVentanaPrincipal()->Close();
+        }
+}
+
+void InactivityCountdownMessage::OnCancel(wxCommandEvent &)
+{
+        GNC::GCS::InactivityController::Instance()->RestartMonitoring();
+        if (IsRunning()) {
+                Stop();
+        }
+        ////////
+        Hide();
+}
+
+void InactivityCountdownMessage::OnCloseButton(wxCommandEvent &/*event*/)
+{
+        GNC::Entorno::Instance()->GetVentanaPrincipal()->Close();
+}
+void InactivityCountdownMessage::OnClose(wxCloseEvent &event)
+{
+        GNC::GCS::InactivityController::Instance()->RestartMonitoring();
+        if (IsRunning()) {
+                Stop();
+        }
+        event.Veto();
+        Hide();
+}
+}
+}
diff --git a/cadxcore/main/gui/countdownmessage/inactivitycountdownmessage.h b/cadxcore/main/gui/countdownmessage/inactivitycountdownmessage.h
new file mode 100644
index 0000000..043ca12
--- /dev/null
+++ b/cadxcore/main/gui/countdownmessage/inactivitycountdownmessage.h
@@ -0,0 +1,45 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <wx/timer.h>
+#include "countdownmessagebase.h"
+
+namespace GNC
+{
+namespace GUI
+{
+class InactivityCountdownMessage: public InactivityCountdownMessageBase, public wxTimer
+{
+public:
+        InactivityCountdownMessage(wxWindow* pParent, const wxString& message);
+        ~InactivityCountdownMessage();
+        virtual bool Show(bool show=true);
+protected:
+        virtual void OnCancel(wxCommandEvent &event);
+        virtual void OnCloseButton(wxCommandEvent &event);
+        virtual void OnClose(wxCloseEvent &event);
+        virtual void Notify();
+        int m_last;
+        wxString m_message;
+};
+}
+}
diff --git a/cadxcore/main/gui/dicomdirexport/dicomdirexport.fbp b/cadxcore/main/gui/dicomdirexport/dicomdirexport.fbp
new file mode 100644
index 0000000..bfd847f
--- /dev/null
+++ b/cadxcore/main/gui/dicomdirexport/dicomdirexport.fbp
@@ -0,0 +1,808 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="10" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">dicomdirexportbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">DICOMDIRExport</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">580,270</property>
+            <property name="name">ExportDicomBase</property>
+            <property name="pos"></property>
+            <property name="size"></property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Export DICOM</property>
+            <property name="tooltip"></property>
+            <property name="validator_data_type"></property>
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer13</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pHeader</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip">Export DICOM</property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pBody</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer8</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pAnonymize</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="tooltip">Anonymize</property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer3</property>
+                                        <property name="orient">wxHORIZONTAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer4</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxCheckBox" expanded="0">
+                                                        <property name="bg"></property>
+                                                        <property name="checked">0</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font"></property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Patient Id</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pCheckPatientId</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCheckBox"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxCheckBox" expanded="0">
+                                                        <property name="bg"></property>
+                                                        <property name="checked">0</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font"></property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Refering physician</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pCheckReferringPhysician</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCheckBox"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxCheckBox" expanded="0">
+                                                        <property name="bg"></property>
+                                                        <property name="checked">0</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font"></property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Institutions</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pCheckInstitutions</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCheckBox"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer5</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxCheckBox" expanded="0">
+                                                        <property name="bg"></property>
+                                                        <property name="checked">0</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font"></property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Patient's name and surname</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pCheckPatientName</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCheckBox"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxCheckBox" expanded="0">
+                                                        <property name="bg"></property>
+                                                        <property name="checked">0</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font"></property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Comments</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pCheckComments</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCheckBox"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxCheckBox" expanded="0">
+                                                        <property name="bg"></property>
+                                                        <property name="checked">0</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font"></property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Ginkgo CADx private tags</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pCheckPrivateTags</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnCheckBox"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pFooter</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer10</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="1">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Export</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_button1</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnExportClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_button2</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/dicomdirexport/dicomdirexportbase.cpp b/cadxcore/main/gui/dicomdirexport/dicomdirexportbase.cpp
new file mode 100644
index 0000000..14682a6
--- /dev/null
+++ b/cadxcore/main/gui/dicomdirexport/dicomdirexportbase.cpp
@@ -0,0 +1,109 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "dicomdirexportbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+ExportDicomBase::ExportDicomBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 580,270 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer13;
+        bSizer13 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Export DICOM") );
+
+        bSizer13->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxVERTICAL );
+
+        m_pAnonymize = new SubTitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pAnonymize->SetToolTip( _("Anonymize") );
+
+        wxBoxSizer* bSizer3;
+        bSizer3 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxVERTICAL );
+
+        m_pCheckPatientId = new wxCheckBox( m_pAnonymize, wxID_ANY, _("Patient Id"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer4->Add( m_pCheckPatientId, 0, wxALL, 5 );
+
+        m_pCheckReferringPhysician = new wxCheckBox( m_pAnonymize, wxID_ANY, _("Refering physician"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer4->Add( m_pCheckReferringPhysician, 0, wxALL, 5 );
+
+        m_pCheckInstitutions = new wxCheckBox( m_pAnonymize, wxID_ANY, _("Institutions"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer4->Add( m_pCheckInstitutions, 0, wxALL, 5 );
+
+        bSizer3->Add( bSizer4, 1, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+        m_pCheckPatientName = new wxCheckBox( m_pAnonymize, wxID_ANY, _("Patient's name and surname"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer5->Add( m_pCheckPatientName, 0, wxALL, 5 );
+
+        m_pCheckComments = new wxCheckBox( m_pAnonymize, wxID_ANY, _("Comments"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer5->Add( m_pCheckComments, 0, wxALL, 5 );
+
+        m_pCheckPrivateTags = new wxCheckBox( m_pAnonymize, wxID_ANY, _("Ginkgo CADx private tags"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer5->Add( m_pCheckPrivateTags, 0, wxALL, 5 );
+
+        bSizer3->Add( bSizer5, 1, wxEXPAND, 5 );
+
+        m_pAnonymize->SetSizer( bSizer3 );
+        m_pAnonymize->Layout();
+        bSizer3->Fit( m_pAnonymize );
+        bSizer8->Add( m_pAnonymize, 0, wxEXPAND, 5 );
+
+        m_pBody->SetSizer( bSizer8 );
+        m_pBody->Layout();
+        bSizer8->Fit( m_pBody );
+        bSizer13->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer10;
+        bSizer10 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer10->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button1 = new wxButton( m_pFooter, wxID_ANY, _("Export"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer10->Add( m_button1, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+        m_button2 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button2->SetDefault();
+        bSizer10->Add( m_button2, 0, wxRIGHT, 5 );
+
+        m_pFooter->SetSizer( bSizer10 );
+        m_pFooter->Layout();
+        bSizer10->Fit( m_pFooter );
+        bSizer13->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+        this->SetSizer( bSizer13 );
+        this->Layout();
+        bSizer13->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_button1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ExportDicomBase::OnExportClick ), NULL, this );
+}
+
+ExportDicomBase::~ExportDicomBase()
+{
+        // Disconnect Events
+        m_button1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ExportDicomBase::OnExportClick ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/dicomdirexport/dicomdirexportbase.h b/cadxcore/main/gui/dicomdirexport/dicomdirexportbase.h
new file mode 100644
index 0000000..e91315d
--- /dev/null
+++ b/cadxcore/main/gui/dicomdirexport/dicomdirexportbase.h
@@ -0,0 +1,75 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __dicomdirexportbase__
+#define __dicomdirexportbase__
+
+#include <wx/intl.h>
+
+class BodyPanel;
+class FooterPanel;
+class HeaderPanel;
+class SubTitledPanel;
+
+#include <wx/panel.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/checkbox.h>
+#include <wx/sizer.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class ExportDicomBase
+///////////////////////////////////////////////////////////////////////////////
+class ExportDicomBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        SubTitledPanel* m_pAnonymize;
+        wxCheckBox* m_pCheckPatientId;
+        wxCheckBox* m_pCheckReferringPhysician;
+        wxCheckBox* m_pCheckInstitutions;
+        wxCheckBox* m_pCheckPatientName;
+        wxCheckBox* m_pCheckComments;
+        wxCheckBox* m_pCheckPrivateTags;
+        FooterPanel* m_pFooter;
+
+        wxButton* m_button1;
+        wxButton* m_button2;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnExportClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        ExportDicomBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Export DICOM"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~ExportDicomBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__dicomdirexportbase__
diff --git a/cadxcore/main/gui/dicomdirexport/exportdicomdir.cpp b/cadxcore/main/gui/dicomdirexport/exportdicomdir.cpp
new file mode 100644
index 0000000..bfbdb85
--- /dev/null
+++ b/cadxcore/main/gui/dicomdirexport/exportdicomdir.cpp
@@ -0,0 +1,111 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <wx/file.h>
+#include <wx/filename.h>
+#include <wx/dirdlg.h>
+#include <wx/msgdlg.h>
+
+#include "exportdicomdir.h"
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/commandcontroller.h>
+#include <commands/exporttodicomdircommand.h>
+#include <api/internationalization/internationalization.h>
+
+#include <main/controllers/anonusagestats.h>
+
+namespace GNC
+{
+namespace GUI
+{
+
+ExportDicomDir::ExportDicomDir(wxWindow* pParent, const TIDList& pks): ExportDicomBase(pParent)
+{
+        LOG_STAT(ANON_STAT_DLG_DICOM_DIR_EXPORT)
+        m_pks = pks;
+        Layout();
+}
+
+
+ExportDicomDir::~ExportDicomDir()
+{
+}
+
+void ExportDicomDir::OnExportClick(wxCommandEvent&)
+{
+        std::string pathDef;
+        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Exportacion", "PathDefecto", pathDef);
+        wxString wxPathDefecto = wxString::FromUTF8(pathDef.c_str());
+        wxDirDialog seleccionarDirectorio(this,_("Select the directory where the files will be stored"),wxPathDefecto,wxDD_DEFAULT_STYLE|wxDD_NEW_DIR_BUTTON);
+        int response = seleccionarDirectorio.ShowModal();
+        if (response == wxID_OK) {
+                wxString wxPath = seleccionarDirectorio.GetPath();
+
+                if( !wxDirExists(wxPath) ) {
+                        wxMessageDialog dialog(NULL,_("The selected directory does not exist\nWould you like to create?"),_("Info"),wxYES_NO|wxICON_INFORMATION);
+                        if ( dialog.ShowModal() == wxID_NO) {
+                                return;
+                        }
+                        if(!wxFileName::Mkdir(wxPath)) {
+                                wxMessageBox(_("There was an error creating directory"), _("Info"),
+                                             wxOK | wxICON_INFORMATION, this);
+                                return;
+                        }
+                } else {
+                        if (wxDirExists(wxPath + wxFileName::GetPathSeparator() + wxT("DICOM"))) {
+                                wxMessageBox(_("There are other DICOM directory in selected path"), _("Info"),
+                                             wxOK | wxICON_INFORMATION, this);
+                                return;
+                        }
+                }
+                //anonimization
+                GIL::DICOM::DicomDataset base;
+                if (m_pCheckPatientName->IsChecked()) {
+                        base.tags["0010|0010"] = _Std("Unknown");
+                }
+                if (m_pCheckPatientId->IsChecked()) {
+                        base.tags["0010|0020"] = _Std("Unknown");
+                }
+                if (m_pCheckInstitutions->IsChecked()) {
+                        base.tags["0008|0080"] = _Std("Unknown");
+                }
+                if (m_pCheckReferringPhysician->IsChecked()) {
+                        base.tags["0008|0090"] = _Std("Unknown");
+                }
+                if (m_pCheckComments->IsChecked()) {
+                        base.tags["0008|1030"] = _Std("Unknown"); //study
+                        base.tags["0008|103e"] = _Std("Unknown"); //series
+                        base.tags["0020|4000"] = _Std("Unknown"); //image
+                }
+
+                std::string pathDicomDir(TOPATH(wxPath));
+                GADAPI::ExportToDicomDirCommandParams* pParams = new GADAPI::ExportToDicomDirCommandParams(m_pks, pathDicomDir, base, !m_pCheckPrivateTags->IsChecked());
+                GADAPI::ExportToDicomDirCommand* pCmd = new GADAPI::ExportToDicomDirCommand(pParams);
+                GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Exporting images ..."), pCmd, NULL);
+
+                GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Exportacion", "PathDefecto",std::string(wxPath.ToUTF8()));
+
+                EndModal(wxID_OK);
+        }
+}
+//endregion
+}
+}
diff --git a/cadxcore/main/gui/dicomdirexport/exportdicomdir.h b/cadxcore/main/gui/dicomdirexport/exportdicomdir.h
new file mode 100644
index 0000000..f81faa3
--- /dev/null
+++ b/cadxcore/main/gui/dicomdirexport/exportdicomdir.h
@@ -0,0 +1,52 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwizard.h>
+#include <api/ivista.h>
+#include <api/controllers/ipacscontroller.h>
+#include "dicomdirexportbase.h"
+
+#include <string>
+#include <vector>
+
+class IModeloDicom;
+
+namespace GNC
+{
+
+namespace GUI
+{
+
+class ExportDicomDir: public ExportDicomBase
+{
+public:
+        typedef std::list<long> TIDList;
+        ExportDicomDir(wxWindow* pParent, const TIDList& pks);
+        ~ExportDicomDir();
+
+protected:
+        virtual void OnExportClick(wxCommandEvent&);
+protected:
+        TIDList m_pks;
+
+};
+}
+}
diff --git a/cadxcore/main/gui/dicomdirmigration/DicomDirMigration.fbp b/cadxcore/main/gui/dicomdirmigration/DicomDirMigration.fbp
new file mode 100644
index 0000000..d8175f5
--- /dev/null
+++ b/cadxcore/main/gui/dicomdirmigration/DicomDirMigration.fbp
@@ -0,0 +1,807 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="10" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">dicomdirmigrationbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">DicomDirMigration</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">800,360</property>
+            <property name="name">DicomDirMigrationDialogBase</property>
+            <property name="pos"></property>
+            <property name="size"></property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSTAY_ON_TOP|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">DICOM Dir configuration</property>
+            <property name="tooltip"></property>
+            <property name="validator_data_type"></property>
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer8</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pBody</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer61</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pMainPanel</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="tooltip">DICOM Dir migration</property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer11</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxBoxSizer" expanded="1">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pSizerOld</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">protected</property>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="1">
+                                                        <property name="bg"></property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font"></property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label"></property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pLabelVersion</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxPanel" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pSep1</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxPanel" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_panelMigration</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                                <property name="tooltip">Migrate existing (recommended)</property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                                <object class="wxFlexGridSizer" expanded="1">
+                                                    <property name="cols">2</property>
+                                                    <property name="flexible_direction">wxBOTH</property>
+                                                    <property name="growablecols">1</property>
+                                                    <property name="growablerows"></property>
+                                                    <property name="hgap">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">fgSizer2</property>
+                                                    <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                    <property name="permission">none</property>
+                                                    <property name="rows">2</property>
+                                                    <property name="vgap">0</property>
+                                                    <object class="sizeritem" expanded="1">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxEXPAND</property>
+                                                        <property name="proportion">1</property>
+                                                        <object class="wxBoxSizer" expanded="1">
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">bSizer6</property>
+                                                            <property name="orient">wxVERTICAL</property>
+                                                            <property name="permission">none</property>
+                                                            <object class="sizeritem" expanded="1">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxStaticText" expanded="1">
+                                                                    <property name="bg"></property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="font"></property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="label">Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. Do not close Ginkgo CADx until migration is finished.</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="name">m_staticText31</property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="size"></property>
+                                                                    <property name="style"></property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="validator_data_type"></property>
+                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                    <property name="validator_variable"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <property name="wrap">610</property>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                            <object class="sizeritem" expanded="1">
+                                                                <property name="border">5</property>
+                                                                <property name="flag">wxALL</property>
+                                                                <property name="proportion">0</property>
+                                                                <object class="wxCheckBox" expanded="1">
+                                                                    <property name="bg"></property>
+                                                                    <property name="checked">1</property>
+                                                                    <property name="context_help"></property>
+                                                                    <property name="context_menu">1</property>
+                                                                    <property name="enabled">1</property>
+                                                                    <property name="fg"></property>
+                                                                    <property name="font"></property>
+                                                                    <property name="hidden">0</property>
+                                                                    <property name="id">wxID_ANY</property>
+                                                                    <property name="label">Remove old DICOM Dir after migration (will be renamed as *_old)</property>
+                                                                    <property name="maximum_size"></property>
+                                                                    <property name="minimum_size"></property>
+                                                                    <property name="name">m_pRemoveFiles</property>
+                                                                    <property name="permission">protected</property>
+                                                                    <property name="pos"></property>
+                                                                    <property name="size"></property>
+                                                                    <property name="style"></property>
+                                                                    <property name="subclass"></property>
+                                                                    <property name="tooltip"></property>
+                                                                    <property name="validator_data_type"></property>
+                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                    <property name="validator_variable"></property>
+                                                                    <property name="window_extra_style"></property>
+                                                                    <property name="window_name"></property>
+                                                                    <property name="window_style"></property>
+                                                                    <event name="OnChar"></event>
+                                                                    <event name="OnCheckBox"></event>
+                                                                    <event name="OnEnterWindow"></event>
+                                                                    <event name="OnEraseBackground"></event>
+                                                                    <event name="OnKeyDown"></event>
+                                                                    <event name="OnKeyUp"></event>
+                                                                    <event name="OnKillFocus"></event>
+                                                                    <event name="OnLeaveWindow"></event>
+                                                                    <event name="OnLeftDClick"></event>
+                                                                    <event name="OnLeftDown"></event>
+                                                                    <event name="OnLeftUp"></event>
+                                                                    <event name="OnMiddleDClick"></event>
+                                                                    <event name="OnMiddleDown"></event>
+                                                                    <event name="OnMiddleUp"></event>
+                                                                    <event name="OnMotion"></event>
+                                                                    <event name="OnMouseEvents"></event>
+                                                                    <event name="OnMouseWheel"></event>
+                                                                    <event name="OnPaint"></event>
+                                                                    <event name="OnRightDClick"></event>
+                                                                    <event name="OnRightDown"></event>
+                                                                    <event name="OnRightUp"></event>
+                                                                    <event name="OnSetFocus"></event>
+                                                                    <event name="OnSize"></event>
+                                                                    <event name="OnUpdateUI"></event>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="1">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxButton" expanded="1">
+                                                            <property name="bg"></property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default">0</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="font"></property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="label">Continue...</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_button5</property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pos"></property>
+                                                            <property name="size"></property>
+                                                            <property name="style"></property>
+                                                            <property name="subclass"></property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="validator_data_type"></property>
+                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                            <property name="validator_variable"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <event name="OnButtonClick">OnMigrate</event>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxPanel" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_panelMigrationSep</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxPanel" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_panel7</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                                <property name="tooltip">Select other</property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                                <object class="wxFlexGridSizer" expanded="1">
+                                                    <property name="cols">2</property>
+                                                    <property name="flexible_direction">wxBOTH</property>
+                                                    <property name="growablecols">1</property>
+                                                    <property name="growablerows"></property>
+                                                    <property name="hgap">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">fgSizer1</property>
+                                                    <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                    <property name="permission">none</property>
+                                                    <property name="rows">2</property>
+                                                    <property name="vgap">0</property>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALL</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxStaticText" expanded="0">
+                                                            <property name="bg"></property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="font"></property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="label">Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new one will be created, else existing DICOM Dir will be used</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_staticText3</property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pos"></property>
+                                                            <property name="size"></property>
+                                                            <property name="style"></property>
+                                                            <property name="subclass"></property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="validator_data_type"></property>
+                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                            <property name="validator_variable"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <property name="wrap">610</property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxButton" expanded="0">
+                                                            <property name="bg"></property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default">1</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="font"></property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="label">Browse...</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_button4</property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pos"></property>
+                                                            <property name="size"></property>
+                                                            <property name="style"></property>
+                                                            <property name="subclass"></property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="validator_data_type"></property>
+                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                            <property name="validator_variable"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <event name="OnButtonClick">OnSelectOther</event>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/dicomdirmigration/dicomdirmigration.cpp b/cadxcore/main/gui/dicomdirmigration/dicomdirmigration.cpp
new file mode 100644
index 0000000..def19e9
--- /dev/null
+++ b/cadxcore/main/gui/dicomdirmigration/dicomdirmigration.cpp
@@ -0,0 +1,164 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "dicomdirmigration.h"
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/filename.h>
+#include <wx/dirdlg.h>
+#include <wx/msgdlg.h>
+#include <wx/icon.h>
+#include <wx/stdpaths.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/globals.h>
+
+
+GNC::GUI::DicomDirMigrationDialog::DicomDirMigrationDialog(wxWindow* pParent, const std::string& dicomDirPath, int version, bool oldVersion): GNC::GUI::DicomDirMigrationDialogBase(pParent),
+        m_DicomDirPath(dicomDirPath),
+        m_OriginalDicomDirPath(dicomDirPath),
+        FromVersion(version),
+        Status(GNC::GUI::DicomDirMigrationDialog::TS_CloseAll)
+{
+        if (oldVersion) {
+                m_pLabelVersion->SetLabel(wxString::Format(_("Ginkgo CADx has detected a default DICOM Dir created with an old version of\nGinkgo CADx (BBDD v.%d). What do you want to do?"), (int) FromVersion));
+        } else {
+                m_pLabelVersion->SetLabel(wxString::Format(_("DICOM Dir has been created with a new version of Ginkgo CADx (BBDD v.%d).\nThis version is unabled to open it."), (int) FromVersion));
+        }
+        m_panelMigration->Show(oldVersion);
+        m_panelMigrationSep->Show(oldVersion);
+
+        wxIcon icono;
+        icono.CopyFromBitmap(GinkgoResourcesManager::Logos::GetLogoGinkgo32x32());
+        this->SetIcon(icono);
+        m_pMainPanel->Layout();
+}
+
+GNC::GUI::DicomDirMigrationDialog::~DicomDirMigrationDialog()
+{
+}
+
+GNC::GUI::DicomDirMigrationDialog::TStatus GNC::GUI::DicomDirMigrationDialog::GetStatus()
+{
+        return Status;
+}
+
+
+void GNC::GUI::DicomDirMigrationDialog::OnSelectOther(wxCommandEvent& )
+{
+        wxString path = SelectFolder();
+        if (!path.empty()) {
+                m_DicomDirPath = TOPATH(path);
+                Status=TS_Change;
+                Close();
+        }
+}
+
+std::string GNC::GUI::DicomDirMigrationDialog::GetDicomDirPath()
+{
+        return m_DicomDirPath;
+}
+
+std::string GNC::GUI::DicomDirMigrationDialog::GetOriginalDicomDirPath()
+{
+        return m_OriginalDicomDirPath;
+}
+
+bool GNC::GUI::DicomDirMigrationDialog::GetRemoveAfterMigration()
+{
+        return m_pRemoveFiles->IsChecked();
+}
+
+void GNC::GUI::DicomDirMigrationDialog::OnMigrate(wxCommandEvent& )
+{
+        wxString originalWx =  wxString(FROMPATH(m_OriginalDicomDirPath));
+        wxString newDicomDirPath = originalWx + wxString(wxT("_old"));
+        int index = 0;
+        while (wxDirExists(newDicomDirPath)) {
+                newDicomDirPath = originalWx + wxString::Format(wxT("_old%d"), (int) index);
+                index++;
+        }
+        if (!wxRenameFile(originalWx, newDicomDirPath)) {
+                wxMessageBox(_("Error renaming old dicomdir to <name>_old, ensure you have permissions to do it"),_("Info"),wxOK,this);
+                return;
+        }
+
+        m_DicomDirPath = m_OriginalDicomDirPath;
+        m_OriginalDicomDirPath = TOPATH(newDicomDirPath);
+
+        Status=TS_Migrate;
+        Close();
+}
+
+wxString GNC::GUI::DicomDirMigrationDialog::SelectFolder()
+{
+        wxDirDialog seleccionarDirectorio(this,_("Select the DICOM Dir folder"),FROMPATH(m_DicomDirPath),wxDD_DEFAULT_STYLE|wxDD_NEW_DIR_BUTTON);
+        int response = seleccionarDirectorio.ShowModal();
+        if (response == wxID_OK) {
+                wxString path = seleccionarDirectorio.GetPath();
+                wxFileName fileName(path);
+                if(!fileName.IsAbsolute()) {
+                        wxFileName pathOfExec(wxStandardPaths::Get().GetExecutablePath());
+                        fileName.MakeAbsolute(pathOfExec.GetPath());
+                        path = fileName.GetFullPath();
+                }
+
+                if(!wxDir::Exists(path)) {
+                        //se pregunta si desea crearlo
+                        int answer = wxMessageBox(_("The selected directory does not exist\nWould you like to create it?"),_("Info"),wxYES_NO,this);
+                        if(answer == wxNO) {
+                                return wxEmptyString;
+                        } else {
+                                bool success;
+#ifdef _WIN32
+                                success = wxMkdir(path,511);
+#else
+                                success = (wxMkDir(path.ToUTF8(), 0770) == 0);
+#endif
+                                if(!success || !wxDirExists(path)) {
+                                        wxMessageBox(_("Failed to create directory, make sure the path is correct and you have permissions on parent directory"), _("Info"));
+                                        return wxEmptyString;
+                                }
+                        }
+                } else {
+                        //se comprueba que puede escribir(escribimos y borramos un fichero chorra)
+                        wxString pathFicheroPrueba = path + wxFileName::GetPathSeparator() + wxString::Format(wxT("%d"), (int) rand());
+                        while(wxFileExists(pathFicheroPrueba)) {
+                                pathFicheroPrueba = path + wxFileName::GetPathSeparator() + wxString::Format(wxT("%d"), (int) rand());
+                        }
+                        {
+                                wxFile ficheroTmp;
+                                if(!ficheroTmp.Create(pathFicheroPrueba,false)) {
+                                        if(!wxFileExists(pathFicheroPrueba) ) {
+                                                wxMessageBox(_("There was an error reading the directory, make sure you have write permissions on it"), _("Info"));
+                                                return wxEmptyString;
+                                        }
+                                }
+                                ficheroTmp.Write(wxT("test"));
+                                ficheroTmp.Close();
+                        }
+                        wxRemoveFile(pathFicheroPrueba);
+                }
+                return path;
+        }
+        return wxEmptyString;
+}
diff --git a/cadxcore/main/gui/dicomdirmigration/dicomdirmigration.h b/cadxcore/main/gui/dicomdirmigration/dicomdirmigration.h
new file mode 100644
index 0000000..27b035d
--- /dev/null
+++ b/cadxcore/main/gui/dicomdirmigration/dicomdirmigration.h
@@ -0,0 +1,55 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include "dicomdirmigrationbase.h"
+
+namespace GNC
+{
+namespace GUI
+{
+class DicomDirMigrationDialog: public GNC::GUI::DicomDirMigrationDialogBase
+{
+public:
+        typedef enum TStatus {
+                TS_CloseAll,
+                TS_Migrate,
+                TS_Change
+        } TStatus;
+        DicomDirMigrationDialog(wxWindow* pParent, const std::string& dicomDirPath, int version, bool oldVersion);
+        ~DicomDirMigrationDialog();
+
+        TStatus GetStatus();
+        std::string GetDicomDirPath();
+        std::string GetOriginalDicomDirPath();
+        bool GetRemoveAfterMigration();
+
+protected:
+        virtual void OnSelectOther(wxCommandEvent& event);
+        virtual void OnMigrate(wxCommandEvent& event);
+        wxString SelectFolder();
+        std::string m_DicomDirPath;
+        std::string m_OriginalDicomDirPath;
+        int FromVersion;
+        TStatus Status;
+};
+}
+}
diff --git a/cadxcore/main/gui/dicomdirmigration/dicomdirmigrationbase.cpp b/cadxcore/main/gui/dicomdirmigration/dicomdirmigrationbase.cpp
new file mode 100644
index 0000000..3ef216e
--- /dev/null
+++ b/cadxcore/main/gui/dicomdirmigration/dicomdirmigrationbase.cpp
@@ -0,0 +1,125 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Sep  8 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "dicomdirmigrationbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+DicomDirMigrationDialogBase::DicomDirMigrationDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 800,360 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer61;
+        bSizer61 = new wxBoxSizer( wxVERTICAL );
+
+        m_pMainPanel = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pMainPanel->SetToolTip( _("DICOM Dir migration") );
+
+        wxBoxSizer* bSizer11;
+        bSizer11 = new wxBoxSizer( wxVERTICAL );
+
+        m_pSizerOld = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pLabelVersion = new wxStaticText( m_pMainPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelVersion->Wrap( -1 );
+        m_pSizerOld->Add( m_pLabelVersion, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        bSizer11->Add( m_pSizerOld, 0, wxEXPAND, 5 );
+
+        m_pSep1 = new SubTitledPanelSeparatorV( m_pMainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer11->Add( m_pSep1, 0, wxEXPAND, 5 );
+
+        m_panelMigration = new SubTitledPanel( m_pMainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panelMigration->SetToolTip( _("Migrate existing (recommended)") );
+
+        wxFlexGridSizer* fgSizer2;
+        fgSizer2 = new wxFlexGridSizer( 2, 2, 0, 0 );
+        fgSizer2->AddGrowableCol( 1 );
+        fgSizer2->SetFlexibleDirection( wxBOTH );
+        fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticText31 = new wxStaticText( m_panelMigration, wxID_ANY, _("Migrate existing DICOM Dir, existing files will be added to new DICOM Dir. Do not close Ginkgo CADx until migration is finished."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText31->Wrap( 610 );
+        bSizer6->Add( m_staticText31, 0, wxALL, 5 );
+
+        m_pRemoveFiles = new wxCheckBox( m_panelMigration, wxID_ANY, _("Remove old DICOM Dir after migration (will be renamed as *_old)"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pRemoveFiles->SetValue(true);
+        bSizer6->Add( m_pRemoveFiles, 0, wxALL, 5 );
+
+        fgSizer2->Add( bSizer6, 1, wxEXPAND, 5 );
+
+        m_button5 = new wxButton( m_panelMigration, wxID_ANY, _("Continue..."), wxDefaultPosition, wxDefaultSize, 0 );
+        fgSizer2->Add( m_button5, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+        m_panelMigration->SetSizer( fgSizer2 );
+        m_panelMigration->Layout();
+        fgSizer2->Fit( m_panelMigration );
+        bSizer11->Add( m_panelMigration, 0, wxEXPAND, 5 );
+
+        m_panelMigrationSep = new SubTitledPanelSeparatorV( m_pMainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer11->Add( m_panelMigrationSep, 0, wxEXPAND, 5 );
+
+        m_panel7 = new SubTitledPanel( m_pMainPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel7->SetToolTip( _("Select other") );
+
+        wxFlexGridSizer* fgSizer1;
+        fgSizer1 = new wxFlexGridSizer( 2, 2, 0, 0 );
+        fgSizer1->AddGrowableCol( 1 );
+        fgSizer1->SetFlexibleDirection( wxBOTH );
+        fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText3 = new wxStaticText( m_panel7, wxID_ANY, _("Select other path, if path doesn't contains a Ginkgo CADx DICOM Dir, a new one will be created, else existing DICOM Dir will be used"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText3->Wrap( 610 );
+        fgSizer1->Add( m_staticText3, 0, wxALL, 5 );
+
+        m_button4 = new wxButton( m_panel7, wxID_ANY, _("Browse..."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button4->SetDefault();
+        fgSizer1->Add( m_button4, 0, wxALL|wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT, 5 );
+
+        m_panel7->SetSizer( fgSizer1 );
+        m_panel7->Layout();
+        fgSizer1->Fit( m_panel7 );
+        bSizer11->Add( m_panel7, 0, wxEXPAND, 5 );
+
+        m_pMainPanel->SetSizer( bSizer11 );
+        m_pMainPanel->Layout();
+        bSizer11->Fit( m_pMainPanel );
+        bSizer61->Add( m_pMainPanel, 1, wxEXPAND, 5 );
+
+        m_pBody->SetSizer( bSizer61 );
+        m_pBody->Layout();
+        bSizer61->Fit( m_pBody );
+        bSizer8->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        this->SetSizer( bSizer8 );
+        this->Layout();
+        bSizer8->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DicomDirMigrationDialogBase::OnMigrate ), NULL, this );
+        m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DicomDirMigrationDialogBase::OnSelectOther ), NULL, this );
+}
+
+DicomDirMigrationDialogBase::~DicomDirMigrationDialogBase()
+{
+        // Disconnect Events
+        m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DicomDirMigrationDialogBase::OnMigrate ), NULL, this );
+        m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DicomDirMigrationDialogBase::OnSelectOther ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/dicomdirmigration/dicomdirmigrationbase.h b/cadxcore/main/gui/dicomdirmigration/dicomdirmigrationbase.h
new file mode 100644
index 0000000..7b37876
--- /dev/null
+++ b/cadxcore/main/gui/dicomdirmigration/dicomdirmigrationbase.h
@@ -0,0 +1,80 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Sep  8 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __dicomdirmigrationbase__
+#define __dicomdirmigrationbase__
+
+#include <wx/intl.h>
+
+class BodyPanel;
+class SubTitledPanel;
+class SubTitledPanelSeparatorV;
+class TitledPanel;
+
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/checkbox.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DicomDirMigrationDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class DicomDirMigrationDialogBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pMainPanel;
+        wxBoxSizer* m_pSizerOld;
+        wxStaticText* m_pLabelVersion;
+        SubTitledPanelSeparatorV* m_pSep1;
+        SubTitledPanel* m_panelMigration;
+        wxStaticText* m_staticText31;
+        wxCheckBox* m_pRemoveFiles;
+        wxButton* m_button5;
+        SubTitledPanelSeparatorV* m_panelMigrationSep;
+        SubTitledPanel* m_panel7;
+        wxStaticText* m_staticText3;
+        wxButton* m_button4;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnMigrate( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSelectOther( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DicomDirMigrationDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("DICOM Dir configuration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSTAY_ON_TOP|wxSYSTEM_MENU );
+        ~DicomDirMigrationDialogBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__dicomdirmigrationbase__
diff --git a/cadxcore/main/gui/droptargetmainwindow.cpp b/cadxcore/main/gui/droptargetmainwindow.cpp
new file mode 100644
index 0000000..752dad4
--- /dev/null
+++ b/cadxcore/main/gui/droptargetmainwindow.cpp
@@ -0,0 +1,48 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <wx/dir.h>
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+
+#include "droptargetmainwindow.h"
+#include <commands/comandoincluirhistorial.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/entorno.h>
+
+GNC::GUI::DropTargetMainWindow::DropTargetMainWindow():wxFileDropTarget()
+{
+}
+GNC::GUI::DropTargetMainWindow::~DropTargetMainWindow()
+{
+}
+/**
+When a file is dropped on the window, it will be processes as it was passed as first parameter to Ginkgo CADx
+*/
+bool GNC::GUI::DropTargetMainWindow::OnDropFiles(wxCoord /*x*/, wxCoord /*y*/, const wxArrayString& filenames)
+{
+        std::list<std::string> listaPaths;
+        for(wxArrayString::const_iterator it = filenames.begin(); it!= filenames.end(); ++it) {
+                GNC::Entorno::Instance()->GetVentanaPrincipal()->EjecutarParametro(*it, false);
+        }
+        return true;
+}
diff --git a/cadxcore/main/gui/droptargetmainwindow.h b/cadxcore/main/gui/droptargetmainwindow.h
new file mode 100644
index 0000000..2f2252b
--- /dev/null
+++ b/cadxcore/main/gui/droptargetmainwindow.h
@@ -0,0 +1,38 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/dnd.h>
+
+/**
+Drop target that executes dropped file for history and main window
+*/
+namespace GNC
+{
+namespace GUI
+{
+class DropTargetMainWindow: public wxFileDropTarget
+{
+public:
+        DropTargetMainWindow();
+        ~DropTargetMainWindow();
+        bool OnDropFiles(wxCoord /*x*/, wxCoord /*y*/, const wxArrayString& filenames);
+};
+}
+}
diff --git a/cadxcore/main/gui/export/PasosExportacion.fbp b/cadxcore/main/gui/export/PasosExportacion.fbp
new file mode 100644
index 0000000..ef258d0
--- /dev/null
+++ b/cadxcore/main/gui/export/PasosExportacion.fbp
@@ -0,0 +1,445 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">pasosexportacionbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">PasosExportacion</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Panel" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">ParametrosPrincipalesBase</property>
+            <property name="pos"></property>
+            <property name="size">765,350</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer14</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelProfile</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Profile</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer6</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxBoxSizer" expanded="1">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer61</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Format</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText15</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxChoice" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="choices">"DICOM (native format)" "Image (jpg, bmp, png)"</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pFormat</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="selection">0</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnChoice">OnChoiceFormatoDestino</event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxCheckBox" expanded="1">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="checked">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Export all files of opened tab</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pAllFiles</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnCheckBox"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/export/datospersistentesexportacion.h b/cadxcore/main/gui/export/datospersistentesexportacion.h
new file mode 100644
index 0000000..29e2c21
--- /dev/null
+++ b/cadxcore/main/gui/export/datospersistentesexportacion.h
@@ -0,0 +1,69 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <vector>
+
+#include <api/dicom/idicom.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+
+namespace GNC
+{
+namespace GUI
+{
+typedef struct TipoWizardExportacion {
+        typedef enum {EXTERNAL_FOLDER, OVERWRITE, NEW_STUDY} Target;
+        Target		  m_target;
+        std::string   m_pathDestino;
+
+        std::list<long> ListOfSeriesPks;
+        //parametros principales
+        std::list<std::string> ListOfDICOMPaths;
+
+        //exportacion ginkgo
+        GIL::DICOM::DicomDataset m_base;
+        bool m_incluirTagsGinkgo;
+
+
+        TipoWizardExportacion() :
+                m_target(EXTERNAL_FOLDER),
+                m_pathDestino(),
+                ListOfSeriesPks(),
+                m_base(),
+                m_incluirTagsGinkgo(true)
+        {
+        }
+
+        ~TipoWizardExportacion()
+        {
+        }
+
+} TipoWizardExportacion;
+}
+}
diff --git a/cadxcore/main/gui/export/parametrosprincipales.cpp b/cadxcore/main/gui/export/parametrosprincipales.cpp
new file mode 100644
index 0000000..f260b46
--- /dev/null
+++ b/cadxcore/main/gui/export/parametrosprincipales.cpp
@@ -0,0 +1,241 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+#include <sstream>
+
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/dirdlg.h>
+#include <wx/filedlg.h>
+#include <wx/msgdlg.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+#include <wx/propgrid/propgrid.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include "parametrosprincipales.h"
+
+#include <api/ientorno.h>
+#include <api/ivista.h>
+#include <api/istudycontext.h>
+#include <api/controllers/ipacscontroller.h>
+#include <api/dicom/idicommanager.h>
+#include <api/internationalization/internationalization.h>
+#include <export/contracts/iwidgetscontract.h>
+#include <eventos/render.h>
+#include <api/iwidgetsmanager.h>
+
+#include <main/controllers/commandcontroller.h>
+
+#include <commands/comandoexportacion.h>
+#include <api/istudycontext.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtk/vtkginkgoimageviewer.h>
+
+#include <vtkPolyDataMapper.h>
+#include <vtkActor.h>
+#include <vtkSmartPointer.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkPolyData.h>
+#include <vtkSphereSource.h>
+#include <vtkWindowToImageFilter.h>
+#include <vtkJPEGWriter.h>
+#include <vtkPNGWriter.h>
+#include <vtkBMPWriter.h>
+
+
+namespace GNC
+{
+namespace GUI
+{
+
+ParametrosPrincipales::ParametrosPrincipales(wxWindow* pParent,IWizard* pWizard, GNC::GCS::IWidgetsContract* widgetsContract):ParametrosPrincipalesBase(pParent),IPasoWizard(pWizard),
+        WidgetsContract(widgetsContract)
+{
+        //pillamos los mapas
+        bool valBoolTmp;
+        GNC::GCS::ConfigurationController::Instance()->readBoolUser("/GinkgoCore/ImageExport", "Scope", valBoolTmp, false);
+        m_pAllFiles->SetValue(valBoolTmp);
+
+        int valTmp;
+        GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/ImageExport", "Format", valTmp, 0);
+        m_pFormat->SetSelection(valTmp);
+        wxCommandEvent evt;
+        OnChoiceFormatoDestino(evt);
+
+        Layout();
+}
+
+ParametrosPrincipales::~ParametrosPrincipales()
+{
+}
+
+
+void ParametrosPrincipales::OnChoiceFormatoDestino(wxCommandEvent &)
+{
+        switch(m_pFormat->GetSelection()) {
+        case 0:
+                m_pAllFiles->Enable(true);
+                break;
+        case 1:
+                m_pAllFiles->Enable(false);
+                break;
+        }
+        Layout();
+}
+
+
+//region "Metodos heredados de Ipasowizard"
+std::string ParametrosPrincipales::GetTitle()
+{
+        return _Std("DICOM Export");
+}
+
+std::string ParametrosPrincipales::GetSubTitle()
+{
+        return _Std("Select the format and the images you want to export");
+}
+
+bool ParametrosPrincipales::Siguiente()
+{
+        return true;
+}
+
+bool ParametrosPrincipales::Anterior()
+{
+        return false;
+}
+
+bool ParametrosPrincipales::Cancelar()
+{
+        return true;
+}
+
+bool ParametrosPrincipales::Validar()
+{
+        GNC::GCS::ConfigurationController::Instance()->writeBoolUser("/GinkgoCore/ImageExport", "Scope", m_pAllFiles->GetValue());
+        GNC::GCS::ConfigurationController::Instance()->writeIntUser("/GinkgoCore/ImageExport", "Format", m_pFormat->GetSelection());
+
+        //select path...
+        std::string pathDef;
+        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Exportacion", "PathDefecto", pathDef);
+        wxString wxPathDefecto = wxString::FromUTF8(pathDef.c_str());
+
+        int response;
+        wxString wxPath;
+        if (!m_pAllFiles->IsEnabled() || !m_pAllFiles->IsChecked()) {
+                //select only a file to store
+                wxString fileWildCard;
+                if (m_pFormat->GetSelection() == 0) { //dicom
+                        fileWildCard = _("DICOM (*.dcm;)|*.dcm|All files(*.*)|*.*");
+                } else {
+                        fileWildCard = _("JPEG (*.jpg;)|*.jpg|BMP (*.bmp)|*.bmp|PNG (*.png)|*.png|All files(*.*)|*.*");
+                }
+
+                wxFileDialog selectFile(this, _("Select file"), wxPathDefecto, wxEmptyString, fileWildCard, wxFD_SAVE);
+                response = selectFile.ShowModal();
+                wxPath = selectFile.GetPath();
+        } else {
+                //select a folder
+                wxDirDialog seleccionarDirectorio(this,_("Select the directory where the files will be stored"),wxPathDefecto,wxDD_DEFAULT_STYLE|wxDD_NEW_DIR_BUTTON);
+                response = seleccionarDirectorio.ShowModal();
+                wxPath = seleccionarDirectorio.GetPath();
+                if( !wxDirExists(wxPath) ) {
+                        wxMessageDialog dialog(NULL,_("The selected directory does not exist\nWould you like to create?"),_("Info"),wxYES_NO|wxICON_INFORMATION);
+                        if ( dialog.ShowModal() == wxID_NO) {
+                                return false;;
+                        }
+                        if(!wxFileName::Mkdir(wxPath)) {
+                                wxMessageBox(_("There was an error creating directory"), _("Info"),
+                                             wxOK | wxICON_INFORMATION, this);
+                                return false;
+                        }
+                }
+        }
+        if (response == wxID_OK) {
+                //if it is an image file it has to be exported inmediatly... because it depends on the view
+                if (m_pFormat->GetSelection() == 0) { //DICOM
+                        GNC::GCS::Ptr<TipoWizardExportacion> m_pDatosPersistentes(new TipoWizardExportacion());
+                        m_pDatosPersistentes->m_pathDestino = TOPATH(wxPath);
+
+                        //get paths to be exported from view...
+                        if (m_pAllFiles->IsChecked()) {
+                                std::vector<long>& openedSeries = WidgetsContract->GetManager()->GetVista()->GetEstudio()->OpenedSeries;
+                                m_pDatosPersistentes->ListOfSeriesPks.insert(m_pDatosPersistentes->ListOfSeriesPks.begin(), openedSeries.begin(), openedSeries.end());
+                        } else {
+                                m_pDatosPersistentes->ListOfDICOMPaths.push_back(WidgetsContract->GetManager()->GetVista()->GetCurrentDICOM());
+                        }
+
+                        GADAPI::ComandoExportacionParams* pParams = new GADAPI::ComandoExportacionParams(m_pDatosPersistentes);
+                        GADAPI::ComandoExportacion* pCmd = new GADAPI::ComandoExportacion(pParams);
+                        GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Exporting images ..."), pCmd, NULL);
+                } else {
+                        //export image!
+                        ExportImage(wxPath);
+                }
+                GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Exportacion", "PathDefecto",std::string(wxPath.ToUTF8()));
+                return true;
+        } else {
+                return false;
+        }
+}
+
+void ParametrosPrincipales::ExportImage(const wxString& path)
+{
+        vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter =
+                vtkSmartPointer<vtkWindowToImageFilter>::New();
+        windowToImageFilter->SetInput(WidgetsContract->GetViewerActivo()->GetRenderWindow());
+        windowToImageFilter->SetInputBufferTypeToRGB(); //also record the alpha (transparency) channel
+        windowToImageFilter->Update();
+
+        wxFileName fn(path);
+        if (fn.GetExt() == wxT("bmp")) {
+                vtkSmartPointer<vtkBMPWriter> writer =
+                        vtkSmartPointer<vtkBMPWriter>::New();
+                writer->SetFileName(TOPATH(path).c_str());
+                writer->SetInputConnection(windowToImageFilter->GetOutputPort());
+                writer->Write();
+        } else if (fn.GetExt() == wxT("png")) {
+                vtkSmartPointer<vtkPNGWriter> writer =
+                        vtkSmartPointer<vtkPNGWriter>::New();
+                writer->SetFileName(TOPATH(path).c_str());
+                writer->SetInputConnection(windowToImageFilter->GetOutputPort());
+                writer->Write();
+        } else {
+                vtkSmartPointer<vtkJPEGWriter> writer =
+                        vtkSmartPointer<vtkJPEGWriter>::New();
+                writer->SetFileName(TOPATH(path).c_str());
+                writer->SetQuality(97);
+                writer->ProgressiveOn();
+                writer->SetInputConnection(windowToImageFilter->GetOutputPort());
+                writer->Write();
+        }
+}
+};
+
+};
diff --git a/cadxcore/main/gui/export/parametrosprincipales.h b/cadxcore/main/gui/export/parametrosprincipales.h
new file mode 100644
index 0000000..3bc6027
--- /dev/null
+++ b/cadxcore/main/gui/export/parametrosprincipales.h
@@ -0,0 +1,76 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <vector>
+
+#include <api/api.h>
+#include <api/autoptr.h>
+#include <api/iwizard.h>
+
+#include "pasosexportacionbase.h"
+#include "datospersistentesexportacion.h"
+
+
+namespace GNC
+{
+namespace GCS
+{
+class IWidgetsContract;
+class IVista;
+class IEntorno;
+}
+namespace GUI
+{
+
+class ParametrosPrincipales: public ParametrosPrincipalesBase,public IPasoWizard
+{
+public:
+
+        ParametrosPrincipales(wxWindow* pParent,IWizard* pWizard, GNC::GCS::IWidgetsContract* WidgetsContract);
+        ~ParametrosPrincipales();
+
+protected:
+        GNC::GCS::IWidgetsContract* WidgetsContract;
+
+        void OnChoiceFormatoDestino(wxCommandEvent &event);
+
+        void ExportImage(const wxString& path);
+
+public:
+
+        virtual std::string GetTitle();
+
+        virtual std::string GetSubTitle();
+
+        virtual bool Siguiente();
+
+        virtual bool Anterior();
+
+        virtual bool Cancelar();
+
+        virtual bool Validar();
+        //endregion
+
+};
+}
+}
diff --git a/cadxcore/main/gui/export/pasosexportacionbase.cpp b/cadxcore/main/gui/export/pasosexportacionbase.cpp
new file mode 100644
index 0000000..847580a
--- /dev/null
+++ b/cadxcore/main/gui/export/pasosexportacionbase.cpp
@@ -0,0 +1,89 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "pasosexportacionbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+ParametrosPrincipalesBase::ParametrosPrincipalesBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer14;
+        bSizer14 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelProfile = new TitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelProfile->SetToolTip( _("Profile") );
+
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer61;
+        bSizer61 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_staticText15 = new wxStaticText( m_pPanelProfile, wxID_ANY, _("Format"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText15->Wrap( -1 );
+        bSizer61->Add( m_staticText15, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        wxString m_pFormatChoices[] = { _("DICOM (native format)"), _("Image (jpg, bmp, png)") };
+        int m_pFormatNChoices = sizeof( m_pFormatChoices ) / sizeof( wxString );
+        m_pFormat = new wxChoice( m_pPanelProfile, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pFormatNChoices, m_pFormatChoices, 0 );
+        m_pFormat->SetSelection( 0 );
+        bSizer61->Add( m_pFormat, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pAllFiles = new wxCheckBox( m_pPanelProfile, wxID_ANY, _("Export all files of opened tab"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer61->Add( m_pAllFiles, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer6->Add( bSizer61, 1, wxEXPAND, 5 );
+
+
+        m_pPanelProfile->SetSizer( bSizer6 );
+        m_pPanelProfile->Layout();
+        bSizer6->Fit( m_pPanelProfile );
+        bSizer14->Add( m_pPanelProfile, 0, wxEXPAND, 5 );
+
+        m_pSep = new TitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer14->Add( m_pSep, 0, wxEXPAND, 5 );
+
+        m_pPanelJpeg = new TitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelJpeg->Hide();
+        m_pPanelJpeg->SetToolTip( _("JPEG") );
+
+        wxBoxSizer* bSizer6111;
+        bSizer6111 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_staticText6 = new wxStaticText( m_pPanelJpeg, wxID_ANY, _("Quality"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText6->Wrap( -1 );
+        bSizer6111->Add( m_staticText6, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+        m_pSliderCalidad = new wxSlider( m_pPanelJpeg, wxID_ANY, 95, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_HORIZONTAL|wxSL_LABELS|wxSL_TOP );
+        bSizer6111->Add( m_pSliderCalidad, 1, wxRIGHT|wxLEFT, 5 );
+
+
+        bSizer6111->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+        m_pPanelJpeg->SetSizer( bSizer6111 );
+        m_pPanelJpeg->Layout();
+        bSizer6111->Fit( m_pPanelJpeg );
+        bSizer14->Add( m_pPanelJpeg, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer14 );
+        this->Layout();
+
+        // Connect Events
+        m_pFormat->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ParametrosPrincipalesBase::OnChoiceFormatoDestino ), NULL, this );
+}
+
+ParametrosPrincipalesBase::~ParametrosPrincipalesBase()
+{
+        // Disconnect Events
+        m_pFormat->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( ParametrosPrincipalesBase::OnChoiceFormatoDestino ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/export/pasosexportacionbase.h b/cadxcore/main/gui/export/pasosexportacionbase.h
new file mode 100644
index 0000000..b3f1131
--- /dev/null
+++ b/cadxcore/main/gui/export/pasosexportacionbase.h
@@ -0,0 +1,63 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __PASOSEXPORTACIONBASE_H__
+#define __PASOSEXPORTACIONBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class TitledPanel;
+class TitledPanelSeparatorV;
+
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/choice.h>
+#include <wx/checkbox.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/slider.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class ParametrosPrincipalesBase
+///////////////////////////////////////////////////////////////////////////////
+class ParametrosPrincipalesBase : public wxPanel
+{
+private:
+
+protected:
+        TitledPanel* m_pPanelProfile;
+        wxStaticText* m_staticText15;
+        wxChoice* m_pFormat;
+        wxCheckBox* m_pAllFiles;
+        TitledPanelSeparatorV* m_pSep;
+        TitledPanel* m_pPanelJpeg;
+        wxStaticText* m_staticText6;
+        wxSlider* m_pSliderCalidad;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnChoiceFormatoDestino( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        ParametrosPrincipalesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 765,350 ), long style = wxTAB_TRAVERSAL );
+        ~ParametrosPrincipalesBase();
+
+};
+
+#endif //__PASOSEXPORTACIONBASE_H__
diff --git a/cadxcore/main/gui/export/wxwizardexportacionginkgo.cpp b/cadxcore/main/gui/export/wxwizardexportacionginkgo.cpp
new file mode 100644
index 0000000..6656e0d
--- /dev/null
+++ b/cadxcore/main/gui/export/wxwizardexportacionginkgo.cpp
@@ -0,0 +1,156 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/filename.h>
+#include <sstream>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/mstream.h>
+#include <wx/busyinfo.h>
+#include <wx/image.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <export/contracts/iwidgetscontract.h>
+#include <api/iwidgetsmanager.h>
+
+
+#include "parametrosprincipales.h"
+#include "wxwizardexportacionginkgo.h"
+
+#include <main/controllers/anonusagestats.h>
+
+#include <vector>
+
+#include <main/entorno.h>
+
+namespace GNC
+{
+namespace GUI
+{
+wxWidzardExportacionGinkgo::wxWidzardExportacionGinkgo(wxWindow* pParent, GNC::GCS::IWidgetsContract* WidgetsContract) : wxWizardGinkgoBase(pParent)
+{
+        LOG_STAT(ANON_STAT_DLG_EXPORT)
+        SetTitle(_("Image Export Wizard"));
+        m_OK = false;
+
+        //se pillan los pasos
+        IPasoWizard* pPaso=NULL;
+
+        pPaso = new ParametrosPrincipales(m_pPanelPrincipal, this, WidgetsContract);
+        m_ListaPasos.push_back(pPaso);
+        //
+
+        m_pBAnterior->Show(false);
+
+        m_currentPasoIndex=0;
+        CargarCurrent();
+}
+
+wxWidzardExportacionGinkgo::~wxWidzardExportacionGinkgo()
+{
+        m_ListaPasos.clear();
+}
+
+
+void wxWidzardExportacionGinkgo::OnCancelarClick(wxCommandEvent& )
+{
+        EndModal(wxCANCEL);
+}
+
+void wxWidzardExportacionGinkgo::OnSiguienteClick(wxCommandEvent& )
+{
+        ListaPasos::iterator it = m_ListaPasos.begin();
+
+        for (ListaPasos::size_type i = 0; i < m_currentPasoIndex; i++, ++it);
+        IPasoWizard* currentPaso = *it;
+        if(currentPaso->Validar()) {
+                wxWindow* pCurrent = dynamic_cast<wxWindow*> (currentPaso);
+                if (pCurrent != NULL && (currentPaso)->Detach()) {
+                        pCurrent->Hide();
+                        m_pSizerPrincipal->Detach(pCurrent);
+                        ++m_currentPasoIndex;
+                        if(m_currentPasoIndex >= m_ListaPasos.size()) {
+                                EndModal(wxOK);
+                                return;
+                        } else {
+                                CargarCurrent();
+                        }
+                }
+        }
+}
+
+void wxWidzardExportacionGinkgo::OnAnteriorClick(wxCommandEvent &)
+{
+        if(m_currentPasoIndex!=0) {
+                ListaPasos::iterator it = m_ListaPasos.begin();
+
+                for (ListaPasos::size_type i = 0; i < m_currentPasoIndex; i++, ++it);
+                //IPasoWizard* currentPaso = *it;
+
+                wxWindow* pCurrent = dynamic_cast<wxWindow*> (*it);
+                if (pCurrent != NULL && (*it)->Detach()) {
+                        pCurrent->Hide();
+                        m_pSizerPrincipal->Detach(pCurrent);
+                        switch(m_currentPasoIndex) {
+                        case 1:
+                                --m_currentPasoIndex;
+                                break;
+                        case 2:
+                                m_currentPasoIndex=0;
+                                break;
+                        }
+
+                        CargarCurrent();
+                }
+        }
+}
+
+bool wxWidzardExportacionGinkgo::IsOK()
+{
+        return m_OK;
+}
+
+void wxWidzardExportacionGinkgo::CargarCurrent()
+{
+        ListaPasos::iterator it = m_ListaPasos.begin();
+
+        for (ListaPasos::size_type i = 0; i < m_currentPasoIndex; i++, ++it);
+        IPasoWizard* currentPaso = *it;
+
+        wxWindow* pCurrent = dynamic_cast<wxWindow*> (currentPaso);
+        if (pCurrent != NULL && (currentPaso)->Attach()) {
+                pCurrent->Show(true);
+                m_pSizerPrincipal->Add(pCurrent, 10, wxEXPAND);
+
+                m_pHeader->SetTitle(wxString::FromUTF8(currentPaso->GetTitle().c_str()));
+                m_pHeader->SetSubtitle(wxString::FromUTF8(currentPaso->GetSubTitle().c_str()));
+                m_pBSiguiente->Enable(currentPaso->Siguiente());
+                m_pBAnterior->Enable(currentPaso->Anterior());
+                m_pBCerrar->Enable(currentPaso->Cancelar());
+                if(m_currentPasoIndex==m_ListaPasos.size()-1) {
+                        m_pBSiguiente->SetLabel(_("&Accept"));
+                } else {
+                        m_pBSiguiente->SetLabel(_("&Next >"));
+                }
+        }
+        m_pPanelPrincipal->Layout();
+        Layout();
+}
+};
+}
diff --git a/cadxcore/main/gui/export/wxwizardexportacionginkgo.h b/cadxcore/main/gui/export/wxwizardexportacionginkgo.h
new file mode 100644
index 0000000..504c1d6
--- /dev/null
+++ b/cadxcore/main/gui/export/wxwizardexportacionginkgo.h
@@ -0,0 +1,62 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <wx/wizardginkgo/wxwizardginkgobase.h>
+#include <api/iwizard.h>
+#include "datospersistentesexportacion.h"
+#include <api/ientorno.h>
+#include <string>
+#include <vector>
+
+namespace GNC
+{
+namespace GCS
+{
+class WidgetsContract;
+}
+namespace GUI
+{
+class wxWidzardExportacionGinkgo: public wxWizardGinkgoBase
+{
+
+public:
+        wxWidzardExportacionGinkgo(wxWindow* pParent, GNC::GCS::IWidgetsContract* WidgetsContract);
+        ~wxWidzardExportacionGinkgo();
+
+        virtual void OnCancelarClick(wxCommandEvent& event);
+        virtual void OnSiguienteClick(wxCommandEvent& event);
+        virtual void OnAnteriorClick(wxCommandEvent &event);
+
+        void CargarCurrent();
+
+        bool IsOK();
+
+
+protected:
+        typedef std::list<IPasoWizard*> ListaPasos;
+        ListaPasos m_ListaPasos;
+
+        ListaPasos::size_type m_currentPasoIndex;
+        bool            m_OK;
+
+};
+};
+};
diff --git a/cadxcore/main/gui/ginkgocloud/downloadcloud.fbp b/cadxcore/main/gui/ginkgocloud/downloadcloud.fbp
new file mode 100644
index 0000000..2b9b3fb
--- /dev/null
+++ b/cadxcore/main/gui/ginkgocloud/downloadcloud.fbp
@@ -0,0 +1,3746 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">downloadcloudbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">UploadCloud</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Frame" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">700,350</property>
+            <property name="name">OpenGinkgoCloudDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">700,350</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxFRAME_FLOAT_ON_PARENT|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Open Ginkgo Cloud</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <property name="xrc_skip_sizer">1</property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnKeyDown">OnKeyUp</event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizerPrincipal</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Ginkgo Cloud</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp">OnKeyUp</event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp">OnKeyUp</event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer11</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size">-1,-1</property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelSuperior</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Open link</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp">OnKeyUp</event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer81</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">File link:</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText6</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp">OnKeyUp</event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pFileLink</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxTE_MULTILINE</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp">OnKeyUp</event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp">OnKeyUp</event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer8</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">&Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_buttonAceptar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnAccept</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp">OnKeyUp</event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pButtonCancel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCancel</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp">OnKeyUp</event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">520,300</property>
+            <property name="name">GinkgoCloudSearchDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">1024,575</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Ginkgo Cloud search</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose">OnClose</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown">OnKeyDownFormulario</event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">protected</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size">-1,-1</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size">-1,-1</property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Ginkgo Cloud</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBodyPanel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer18</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size">-1,-1</property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelPACS</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Search</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">m_pSizerCamposBusqueda</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxBoxSizer" expanded="1">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer32</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxBoxSizer" expanded="1">
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">bSizer33</property>
+                                                        <property name="orient">wxHORIZONTAL</property>
+                                                        <property name="permission">none</property>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                            <property name="proportion">0</property>
+                                                            <object class="wxStaticText" expanded="0">
+                                                                <property name="BottomDockable">1</property>
+                                                                <property name="LeftDockable">1</property>
+                                                                <property name="RightDockable">1</property>
+                                                                <property name="TopDockable">1</property>
+                                                                <property name="aui_layer"></property>
+                                                                <property name="aui_name"></property>
+                                                                <property name="aui_position"></property>
+                                                                <property name="aui_row"></property>
+                                                                <property name="best_size"></property>
+                                                                <property name="bg"></property>
+                                                                <property name="caption"></property>
+                                                                <property name="caption_visible">1</property>
+                                                                <property name="center_pane">0</property>
+                                                                <property name="close_button">1</property>
+                                                                <property name="context_help"></property>
+                                                                <property name="context_menu">1</property>
+                                                                <property name="default_pane">0</property>
+                                                                <property name="dock">Dock</property>
+                                                                <property name="dock_fixed">0</property>
+                                                                <property name="docking">Left</property>
+                                                                <property name="enabled">1</property>
+                                                                <property name="fg"></property>
+                                                                <property name="floatable">1</property>
+                                                                <property name="font">,90,92,-1,70,0</property>
+                                                                <property name="gripper">0</property>
+                                                                <property name="hidden">0</property>
+                                                                <property name="id">wxID_ANY</property>
+                                                                <property name="label">Study</property>
+                                                                <property name="max_size"></property>
+                                                                <property name="maximize_button">0</property>
+                                                                <property name="maximum_size"></property>
+                                                                <property name="min_size"></property>
+                                                                <property name="minimize_button">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="moveable">1</property>
+                                                                <property name="name">m_pPatientLabelStr</property>
+                                                                <property name="pane_border">1</property>
+                                                                <property name="pane_position"></property>
+                                                                <property name="pane_size"></property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="pin_button">1</property>
+                                                                <property name="pos"></property>
+                                                                <property name="resize">Resizable</property>
+                                                                <property name="show">1</property>
+                                                                <property name="size"></property>
+                                                                <property name="style"></property>
+                                                                <property name="subclass"></property>
+                                                                <property name="toolbar_pane">0</property>
+                                                                <property name="tooltip"></property>
+                                                                <property name="window_extra_style"></property>
+                                                                <property name="window_name"></property>
+                                                                <property name="window_style"></property>
+                                                                <property name="wrap">-1</property>
+                                                                <event name="OnChar"></event>
+                                                                <event name="OnEnterWindow"></event>
+                                                                <event name="OnEraseBackground"></event>
+                                                                <event name="OnKeyDown"></event>
+                                                                <event name="OnKeyUp"></event>
+                                                                <event name="OnKillFocus"></event>
+                                                                <event name="OnLeaveWindow"></event>
+                                                                <event name="OnLeftDClick"></event>
+                                                                <event name="OnLeftDown"></event>
+                                                                <event name="OnLeftUp"></event>
+                                                                <event name="OnMiddleDClick"></event>
+                                                                <event name="OnMiddleDown"></event>
+                                                                <event name="OnMiddleUp"></event>
+                                                                <event name="OnMotion"></event>
+                                                                <event name="OnMouseEvents"></event>
+                                                                <event name="OnMouseWheel"></event>
+                                                                <event name="OnPaint"></event>
+                                                                <event name="OnRightDClick"></event>
+                                                                <event name="OnRightDown"></event>
+                                                                <event name="OnRightUp"></event>
+                                                                <event name="OnSetFocus"></event>
+                                                                <event name="OnSize"></event>
+                                                                <event name="OnUpdateUI"></event>
+                                                            </object>
+                                                        </object>
+                                                        <object class="sizeritem" expanded="1">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxEXPAND</property>
+                                                            <property name="proportion">1</property>
+                                                            <object class="wxBoxSizer" expanded="1">
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">bSizer23</property>
+                                                                <property name="orient">wxHORIZONTAL</property>
+                                                                <property name="permission">none</property>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                                    <property name="proportion">0</property>
+                                                                    <object class="wxComboBox" expanded="0">
+                                                                        <property name="BottomDockable">1</property>
+                                                                        <property name="LeftDockable">1</property>
+                                                                        <property name="RightDockable">1</property>
+                                                                        <property name="TopDockable">1</property>
+                                                                        <property name="aui_layer"></property>
+                                                                        <property name="aui_name"></property>
+                                                                        <property name="aui_position"></property>
+                                                                        <property name="aui_row"></property>
+                                                                        <property name="best_size"></property>
+                                                                        <property name="bg"></property>
+                                                                        <property name="caption"></property>
+                                                                        <property name="caption_visible">1</property>
+                                                                        <property name="center_pane">0</property>
+                                                                        <property name="choices">"Description" "User name"</property>
+                                                                        <property name="close_button">1</property>
+                                                                        <property name="context_help"></property>
+                                                                        <property name="context_menu">1</property>
+                                                                        <property name="default_pane">0</property>
+                                                                        <property name="dock">Dock</property>
+                                                                        <property name="dock_fixed">0</property>
+                                                                        <property name="docking">Left</property>
+                                                                        <property name="enabled">1</property>
+                                                                        <property name="fg"></property>
+                                                                        <property name="floatable">1</property>
+                                                                        <property name="font"></property>
+                                                                        <property name="gripper">0</property>
+                                                                        <property name="hidden">0</property>
+                                                                        <property name="id">wxID_ANY</property>
+                                                                        <property name="max_size"></property>
+                                                                        <property name="maximize_button">0</property>
+                                                                        <property name="maximum_size"></property>
+                                                                        <property name="min_size"></property>
+                                                                        <property name="minimize_button">0</property>
+                                                                        <property name="minimum_size">-1,-1</property>
+                                                                        <property name="moveable">1</property>
+                                                                        <property name="name">m_pFieldCombo</property>
+                                                                        <property name="pane_border">1</property>
+                                                                        <property name="pane_position"></property>
+                                                                        <property name="pane_size"></property>
+                                                                        <property name="permission">protected</property>
+                                                                        <property name="pin_button">1</property>
+                                                                        <property name="pos"></property>
+                                                                        <property name="resize">Resizable</property>
+                                                                        <property name="selection">-1</property>
+                                                                        <property name="show">1</property>
+                                                                        <property name="size">-1,-1</property>
+                                                                        <property name="style">wxCB_DROPDOWN|wxCB_READONLY</property>
+                                                                        <property name="subclass"></property>
+                                                                        <property name="toolbar_pane">0</property>
+                                                                        <property name="tooltip"></property>
+                                                                        <property name="validator_data_type"></property>
+                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                        <property name="validator_variable"></property>
+                                                                        <property name="value"></property>
+                                                                        <property name="window_extra_style"></property>
+                                                                        <property name="window_name"></property>
+                                                                        <property name="window_style"></property>
+                                                                        <event name="OnChar"></event>
+                                                                        <event name="OnCombobox">OnComboField</event>
+                                                                        <event name="OnEnterWindow"></event>
+                                                                        <event name="OnEraseBackground"></event>
+                                                                        <event name="OnKeyDown"></event>
+                                                                        <event name="OnKeyUp"></event>
+                                                                        <event name="OnKillFocus"></event>
+                                                                        <event name="OnLeaveWindow"></event>
+                                                                        <event name="OnLeftDClick"></event>
+                                                                        <event name="OnLeftDown"></event>
+                                                                        <event name="OnLeftUp"></event>
+                                                                        <event name="OnMiddleDClick"></event>
+                                                                        <event name="OnMiddleDown"></event>
+                                                                        <event name="OnMiddleUp"></event>
+                                                                        <event name="OnMotion"></event>
+                                                                        <event name="OnMouseEvents"></event>
+                                                                        <event name="OnMouseWheel"></event>
+                                                                        <event name="OnPaint"></event>
+                                                                        <event name="OnRightDClick"></event>
+                                                                        <event name="OnRightDown"></event>
+                                                                        <event name="OnRightUp"></event>
+                                                                        <event name="OnSetFocus"></event>
+                                                                        <event name="OnSize"></event>
+                                                                        <event name="OnText"></event>
+                                                                        <event name="OnTextEnter"></event>
+                                                                        <event name="OnUpdateUI"></event>
+                                                                    </object>
+                                                                </object>
+                                                                <object class="sizeritem" expanded="1">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+                                                                    <property name="proportion">1</property>
+                                                                    <object class="wxPanel" expanded="1">
+                                                                        <property name="BottomDockable">1</property>
+                                                                        <property name="LeftDockable">1</property>
+                                                                        <property name="RightDockable">1</property>
+                                                                        <property name="TopDockable">1</property>
+                                                                        <property name="aui_layer"></property>
+                                                                        <property name="aui_name"></property>
+                                                                        <property name="aui_position"></property>
+                                                                        <property name="aui_row"></property>
+                                                                        <property name="best_size"></property>
+                                                                        <property name="bg"></property>
+                                                                        <property name="caption"></property>
+                                                                        <property name="caption_visible">1</property>
+                                                                        <property name="center_pane">0</property>
+                                                                        <property name="close_button">1</property>
+                                                                        <property name="context_help"></property>
+                                                                        <property name="context_menu">1</property>
+                                                                        <property name="default_pane">0</property>
+                                                                        <property name="dock">Dock</property>
+                                                                        <property name="dock_fixed">0</property>
+                                                                        <property name="docking">Left</property>
+                                                                        <property name="enabled">1</property>
+                                                                        <property name="fg"></property>
+                                                                        <property name="floatable">1</property>
+                                                                        <property name="font"></property>
+                                                                        <property name="gripper">0</property>
+                                                                        <property name="hidden">0</property>
+                                                                        <property name="id">wxID_ANY</property>
+                                                                        <property name="max_size"></property>
+                                                                        <property name="maximize_button">0</property>
+                                                                        <property name="maximum_size"></property>
+                                                                        <property name="min_size"></property>
+                                                                        <property name="minimize_button">0</property>
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="moveable">1</property>
+                                                                        <property name="name">m_pSearchPanel</property>
+                                                                        <property name="pane_border">1</property>
+                                                                        <property name="pane_position"></property>
+                                                                        <property name="pane_size"></property>
+                                                                        <property name="permission">protected</property>
+                                                                        <property name="pin_button">1</property>
+                                                                        <property name="pos"></property>
+                                                                        <property name="resize">Resizable</property>
+                                                                        <property name="show">1</property>
+                                                                        <property name="size"></property>
+                                                                        <property name="subclass"></property>
+                                                                        <property name="toolbar_pane">0</property>
+                                                                        <property name="tooltip"></property>
+                                                                        <property name="window_extra_style"></property>
+                                                                        <property name="window_name"></property>
+                                                                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                                        <event name="OnChar"></event>
+                                                                        <event name="OnEnterWindow"></event>
+                                                                        <event name="OnEraseBackground"></event>
+                                                                        <event name="OnKeyDown"></event>
+                                                                        <event name="OnKeyUp"></event>
+                                                                        <event name="OnKillFocus"></event>
+                                                                        <event name="OnLeaveWindow"></event>
+                                                                        <event name="OnLeftDClick"></event>
+                                                                        <event name="OnLeftDown"></event>
+                                                                        <event name="OnLeftUp"></event>
+                                                                        <event name="OnMiddleDClick"></event>
+                                                                        <event name="OnMiddleDown"></event>
+                                                                        <event name="OnMiddleUp"></event>
+                                                                        <event name="OnMotion"></event>
+                                                                        <event name="OnMouseEvents"></event>
+                                                                        <event name="OnMouseWheel"></event>
+                                                                        <event name="OnPaint"></event>
+                                                                        <event name="OnRightDClick"></event>
+                                                                        <event name="OnRightDown"></event>
+                                                                        <event name="OnRightUp"></event>
+                                                                        <event name="OnSetFocus"></event>
+                                                                        <event name="OnSize"></event>
+                                                                        <event name="OnUpdateUI"></event>
+                                                                        <object class="wxBoxSizer" expanded="1">
+                                                                            <property name="minimum_size"></property>
+                                                                            <property name="name">bSizer271</property>
+                                                                            <property name="orient">wxHORIZONTAL</property>
+                                                                            <property name="permission">none</property>
+                                                                            <object class="sizeritem" expanded="0">
+                                                                                <property name="border">5</property>
+                                                                                <property name="flag">wxALL|wxEXPAND</property>
+                                                                                <property name="proportion">1</property>
+                                                                                <object class="wxSearchCtrl" expanded="0">
+                                                                                    <property name="BottomDockable">1</property>
+                                                                                    <property name="LeftDockable">1</property>
+                                                                                    <property name="RightDockable">1</property>
+                                                                                    <property name="TopDockable">1</property>
+                                                                                    <property name="aui_layer"></property>
+                                                                                    <property name="aui_name"></property>
+                                                                                    <property name="aui_position"></property>
+                                                                                    <property name="aui_row"></property>
+                                                                                    <property name="best_size"></property>
+                                                                                    <property name="bg"></property>
+                                                                                    <property name="cancel_button">0</property>
+                                                                                    <property name="caption"></property>
+                                                                                    <property name="caption_visible">1</property>
+                                                                                    <property name="center_pane">0</property>
+                                                                                    <property name="close_button">1</property>
+                                                                                    <property name="context_help"></property>
+                                                                                    <property name="context_menu">1</property>
+                                                                                    <property name="default_pane">0</property>
+                                                                                    <property name="dock">Dock</property>
+                                                                                    <property name="dock_fixed">0</property>
+                                                                                    <property name="docking">Left</property>
+                                                                                    <property name="enabled">1</property>
+                                                                                    <property name="fg"></property>
+                                                                                    <property name="floatable">1</property>
+                                                                                    <property name="font"></property>
+                                                                                    <property name="gripper">0</property>
+                                                                                    <property name="hidden">0</property>
+                                                                                    <property name="id">wxID_ANY</property>
+                                                                                    <property name="max_size"></property>
+                                                                                    <property name="maximize_button">0</property>
+                                                                                    <property name="maximum_size"></property>
+                                                                                    <property name="min_size"></property>
+                                                                                    <property name="minimize_button">0</property>
+                                                                                    <property name="minimum_size"></property>
+                                                                                    <property name="moveable">1</property>
+                                                                                    <property name="name">m_pTextControlField</property>
+                                                                                    <property name="pane_border">1</property>
+                                                                                    <property name="pane_position"></property>
+                                                                                    <property name="pane_size"></property>
+                                                                                    <property name="permission">protected</property>
+                                                                                    <property name="pin_button">1</property>
+                                                                                    <property name="pos"></property>
+                                                                                    <property name="resize">Resizable</property>
+                                                                                    <property name="search_button">1</property>
+                                                                                    <property name="show">1</property>
+                                                                                    <property name="size"></property>
+                                                                                    <property name="style">wxTE_PROCESS_ENTER</property>
+                                                                                    <property name="subclass"></property>
+                                                                                    <property name="toolbar_pane">0</property>
+                                                                                    <property name="tooltip"></property>
+                                                                                    <property name="validator_data_type"></property>
+                                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                                    <property name="validator_variable"></property>
+                                                                                    <property name="value"></property>
+                                                                                    <property name="window_extra_style"></property>
+                                                                                    <property name="window_name"></property>
+                                                                                    <property name="window_style"></property>
+                                                                                    <event name="OnCancelButton">OnCancelClick</event>
+                                                                                    <event name="OnChar"></event>
+                                                                                    <event name="OnEnterWindow"></event>
+                                                                                    <event name="OnEraseBackground"></event>
+                                                                                    <event name="OnKeyDown"></event>
+                                                                                    <event name="OnKeyUp"></event>
+                                                                                    <event name="OnKillFocus"></event>
+                                                                                    <event name="OnLeaveWindow"></event>
+                                                                                    <event name="OnLeftDClick"></event>
+                                                                                    <event name="OnLeftDown"></event>
+                                                                                    <event name="OnLeftUp"></event>
+                                                                                    <event name="OnMiddleDClick"></event>
+                                                                                    <event name="OnMiddleDown"></event>
+                                                                                    <event name="OnMiddleUp"></event>
+                                                                                    <event name="OnMotion"></event>
+                                                                                    <event name="OnMouseEvents"></event>
+                                                                                    <event name="OnMouseWheel"></event>
+                                                                                    <event name="OnPaint"></event>
+                                                                                    <event name="OnRightDClick"></event>
+                                                                                    <event name="OnRightDown"></event>
+                                                                                    <event name="OnRightUp"></event>
+                                                                                    <event name="OnSearchButton">OnBusquedaClick</event>
+                                                                                    <event name="OnSetFocus"></event>
+                                                                                    <event name="OnSize"></event>
+                                                                                    <event name="OnText"></event>
+                                                                                    <event name="OnTextEnter">OnBusquedaClick</event>
+                                                                                    <event name="OnUpdateUI"></event>
+                                                                                </object>
+                                                                            </object>
+                                                                            <object class="sizeritem" expanded="0">
+                                                                                <property name="border">5</property>
+                                                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                                                <property name="proportion">1</property>
+                                                                                <object class="wxStaticText" expanded="0">
+                                                                                    <property name="BottomDockable">1</property>
+                                                                                    <property name="LeftDockable">1</property>
+                                                                                    <property name="RightDockable">1</property>
+                                                                                    <property name="TopDockable">1</property>
+                                                                                    <property name="aui_layer"></property>
+                                                                                    <property name="aui_name"></property>
+                                                                                    <property name="aui_position"></property>
+                                                                                    <property name="aui_row"></property>
+                                                                                    <property name="best_size"></property>
+                                                                                    <property name="bg"></property>
+                                                                                    <property name="caption"></property>
+                                                                                    <property name="caption_visible">1</property>
+                                                                                    <property name="center_pane">0</property>
+                                                                                    <property name="close_button">1</property>
+                                                                                    <property name="context_help"></property>
+                                                                                    <property name="context_menu">1</property>
+                                                                                    <property name="default_pane">0</property>
+                                                                                    <property name="dock">Dock</property>
+                                                                                    <property name="dock_fixed">0</property>
+                                                                                    <property name="docking">Left</property>
+                                                                                    <property name="enabled">1</property>
+                                                                                    <property name="fg"></property>
+                                                                                    <property name="floatable">1</property>
+                                                                                    <property name="font"></property>
+                                                                                    <property name="gripper">0</property>
+                                                                                    <property name="hidden">1</property>
+                                                                                    <property name="id">wxID_ANY</property>
+                                                                                    <property name="label">PACS acquisition is restricted</property>
+                                                                                    <property name="max_size"></property>
+                                                                                    <property name="maximize_button">0</property>
+                                                                                    <property name="maximum_size"></property>
+                                                                                    <property name="min_size"></property>
+                                                                                    <property name="minimize_button">0</property>
+                                                                                    <property name="minimum_size"></property>
+                                                                                    <property name="moveable">1</property>
+                                                                                    <property name="name">m_pLabelRestricted</property>
+                                                                                    <property name="pane_border">1</property>
+                                                                                    <property name="pane_position"></property>
+                                                                                    <property name="pane_size"></property>
+                                                                                    <property name="permission">protected</property>
+                                                                                    <property name="pin_button">1</property>
+                                                                                    <property name="pos"></property>
+                                                                                    <property name="resize">Resizable</property>
+                                                                                    <property name="show">1</property>
+                                                                                    <property name="size"></property>
+                                                                                    <property name="style"></property>
+                                                                                    <property name="subclass"></property>
+                                                                                    <property name="toolbar_pane">0</property>
+                                                                                    <property name="tooltip"></property>
+                                                                                    <property name="window_extra_style"></property>
+                                                                                    <property name="window_name"></property>
+                                                                                    <property name="window_style"></property>
+                                                                                    <property name="wrap">-1</property>
+                                                                                    <event name="OnChar"></event>
+                                                                                    <event name="OnEnterWindow"></event>
+                                                                                    <event name="OnEraseBackground"></event>
+                                                                                    <event name="OnKeyDown"></event>
+                                                                                    <event name="OnKeyUp"></event>
+                                                                                    <event name="OnKillFocus"></event>
+                                                                                    <event name="OnLeaveWindow"></event>
+                                                                                    <event name="OnLeftDClick"></event>
+                                                                                    <event name="OnLeftDown"></event>
+                                                                                    <event name="OnLeftUp"></event>
+                                                                                    <event name="OnMiddleDClick"></event>
+                                                                                    <event name="OnMiddleDown"></event>
+                                                                                    <event name="OnMiddleUp"></event>
+                                                                                    <event name="OnMotion"></event>
+                                                                                    <event name="OnMouseEvents"></event>
+                                                                                    <event name="OnMouseWheel"></event>
+                                                                                    <event name="OnPaint"></event>
+                                                                                    <event name="OnRightDClick"></event>
+                                                                                    <event name="OnRightDown"></event>
+                                                                                    <event name="OnRightUp"></event>
+                                                                                    <event name="OnSetFocus"></event>
+                                                                                    <event name="OnSize"></event>
+                                                                                    <event name="OnUpdateUI"></event>
+                                                                                </object>
+                                                                            </object>
+                                                                            <object class="sizeritem" expanded="0">
+                                                                                <property name="border">5</property>
+                                                                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                                                                <property name="proportion">0</property>
+                                                                                <object class="wxBoxSizer" expanded="0">
+                                                                                    <property name="minimum_size"></property>
+                                                                                    <property name="name">m_pSizerAnimation</property>
+                                                                                    <property name="orient">wxHORIZONTAL</property>
+                                                                                    <property name="permission">protected</property>
+                                                                                </object>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxBOTTOM</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer27</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND|wxRIGHT</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxStaticBoxSizer" expanded="0">
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Date</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">sbSizer2</property>
+                                                        <property name="orient">wxVERTICAL</property>
+                                                        <property name="permission">none</property>
+                                                        <event name="OnUpdateUI"></event>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxEXPAND|wxALL</property>
+                                                            <property name="proportion">1</property>
+                                                            <object class="wxBoxSizer" expanded="0">
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">bSizer17</property>
+                                                                <property name="orient">wxHORIZONTAL</property>
+                                                                <property name="permission">none</property>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND</property>
+                                                                    <property name="proportion">1</property>
+                                                                    <object class="wxBoxSizer" expanded="0">
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">bSizer181</property>
+                                                                        <property name="orient">wxVERTICAL</property>
+                                                                        <property name="permission">none</property>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Any date</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pAnyDate</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style">wxRB_GROUP</property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">1</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Today</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pToday</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Yesterday</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pYesterday</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND</property>
+                                                                    <property name="proportion">1</property>
+                                                                    <object class="wxBoxSizer" expanded="0">
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">bSizer29</property>
+                                                                        <property name="orient">wxVERTICAL</property>
+                                                                        <property name="permission">none</property>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Last 7 days</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pLastWeek</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Last 30 days</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pLastMonth</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Last 3 months</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pLastThreeMonths</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND</property>
+                                                                    <property name="proportion">0</property>
+                                                                    <object class="wxBoxSizer" expanded="0">
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">bSizer201</property>
+                                                                        <property name="orient">wxVERTICAL</property>
+                                                                        <property name="permission">none</property>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Between:</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pBetween</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton"></event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">5</property>
+                                                                            <property name="flag">wxEXPAND|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxBoxSizer" expanded="0">
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="name">bSizer21</property>
+                                                                                <property name="orient">wxVERTICAL</property>
+                                                                                <property name="permission">none</property>
+                                                                                <object class="sizeritem" expanded="0">
+                                                                                    <property name="border">2</property>
+                                                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                                                    <property name="proportion">0</property>
+                                                                                    <object class="wxDatePickerCtrl" expanded="0">
+                                                                                        <property name="BottomDockable">1</property>
+                                                                                        <property name="LeftDockable">1</property>
+                                                                                        <property name="RightDockable">1</property>
+                                                                                        <property name="TopDockable">1</property>
+                                                                                        <property name="aui_layer"></property>
+                                                                                        <property name="aui_name"></property>
+                                                                                        <property name="aui_position"></property>
+                                                                                        <property name="aui_row"></property>
+                                                                                        <property name="best_size"></property>
+                                                                                        <property name="bg"></property>
+                                                                                        <property name="caption"></property>
+                                                                                        <property name="caption_visible">1</property>
+                                                                                        <property name="center_pane">0</property>
+                                                                                        <property name="close_button">1</property>
+                                                                                        <property name="context_help"></property>
+                                                                                        <property name="context_menu">1</property>
+                                                                                        <property name="default_pane">0</property>
+                                                                                        <property name="dock">Dock</property>
+                                                                                        <property name="dock_fixed">0</property>
+                                                                                        <property name="docking">Left</property>
+                                                                                        <property name="enabled">1</property>
+                                                                                        <property name="fg"></property>
+                                                                                        <property name="floatable">1</property>
+                                                                                        <property name="font"></property>
+                                                                                        <property name="gripper">0</property>
+                                                                                        <property name="hidden">0</property>
+                                                                                        <property name="id">wxID_ANY</property>
+                                                                                        <property name="max_size"></property>
+                                                                                        <property name="maximize_button">0</property>
+                                                                                        <property name="maximum_size"></property>
+                                                                                        <property name="min_size"></property>
+                                                                                        <property name="minimize_button">0</property>
+                                                                                        <property name="minimum_size"></property>
+                                                                                        <property name="moveable">1</property>
+                                                                                        <property name="name">m_pTextControlFechaDesde</property>
+                                                                                        <property name="pane_border">1</property>
+                                                                                        <property name="pane_position"></property>
+                                                                                        <property name="pane_size"></property>
+                                                                                        <property name="permission">protected</property>
+                                                                                        <property name="pin_button">1</property>
+                                                                                        <property name="pos"></property>
+                                                                                        <property name="resize">Resizable</property>
+                                                                                        <property name="show">1</property>
+                                                                                        <property name="size"></property>
+                                                                                        <property name="style">wxDP_DEFAULT|wxDP_DROPDOWN</property>
+                                                                                        <property name="subclass"></property>
+                                                                                        <property name="toolbar_pane">0</property>
+                                                                                        <property name="tooltip"></property>
+                                                                                        <property name="validator_data_type"></property>
+                                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                                        <property name="validator_variable"></property>
+                                                                                        <property name="window_extra_style"></property>
+                                                                                        <property name="window_name"></property>
+                                                                                        <property name="window_style"></property>
+                                                                                        <event name="OnChar"></event>
+                                                                                        <event name="OnDateChanged">OnFechaDesdeDateChanged</event>
+                                                                                        <event name="OnEnterWindow"></event>
+                                                                                        <event name="OnEraseBackground"></event>
+                                                                                        <event name="OnKeyDown">OnKeyDownFormulario</event>
+                                                                                        <event name="OnKeyUp"></event>
+                                                                                        <event name="OnKillFocus"></event>
+                                                                                        <event name="OnLeaveWindow"></event>
+                                                                                        <event name="OnLeftDClick"></event>
+                                                                                        <event name="OnLeftDown"></event>
+                                                                                        <event name="OnLeftUp"></event>
+                                                                                        <event name="OnMiddleDClick"></event>
+                                                                                        <event name="OnMiddleDown"></event>
+                                                                                        <event name="OnMiddleUp"></event>
+                                                                                        <event name="OnMotion"></event>
+                                                                                        <event name="OnMouseEvents"></event>
+                                                                                        <event name="OnMouseWheel"></event>
+                                                                                        <event name="OnPaint"></event>
+                                                                                        <event name="OnRightDClick"></event>
+                                                                                        <event name="OnRightDown"></event>
+                                                                                        <event name="OnRightUp"></event>
+                                                                                        <event name="OnSetFocus"></event>
+                                                                                        <event name="OnSize"></event>
+                                                                                        <event name="OnUpdateUI"></event>
+                                                                                    </object>
+                                                                                </object>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">5</property>
+                                                                            <property name="flag">wxEXPAND|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxBoxSizer" expanded="0">
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="name">bSizer22</property>
+                                                                                <property name="orient">wxVERTICAL</property>
+                                                                                <property name="permission">none</property>
+                                                                                <object class="sizeritem" expanded="0">
+                                                                                    <property name="border">2</property>
+                                                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                                                    <property name="proportion">0</property>
+                                                                                    <object class="wxDatePickerCtrl" expanded="0">
+                                                                                        <property name="BottomDockable">1</property>
+                                                                                        <property name="LeftDockable">1</property>
+                                                                                        <property name="RightDockable">1</property>
+                                                                                        <property name="TopDockable">1</property>
+                                                                                        <property name="aui_layer"></property>
+                                                                                        <property name="aui_name"></property>
+                                                                                        <property name="aui_position"></property>
+                                                                                        <property name="aui_row"></property>
+                                                                                        <property name="best_size"></property>
+                                                                                        <property name="bg"></property>
+                                                                                        <property name="caption"></property>
+                                                                                        <property name="caption_visible">1</property>
+                                                                                        <property name="center_pane">0</property>
+                                                                                        <property name="close_button">1</property>
+                                                                                        <property name="context_help"></property>
+                                                                                        <property name="context_menu">1</property>
+                                                                                        <property name="default_pane">0</property>
+                                                                                        <property name="dock">Dock</property>
+                                                                                        <property name="dock_fixed">0</property>
+                                                                                        <property name="docking">Left</property>
+                                                                                        <property name="enabled">1</property>
+                                                                                        <property name="fg"></property>
+                                                                                        <property name="floatable">1</property>
+                                                                                        <property name="font"></property>
+                                                                                        <property name="gripper">0</property>
+                                                                                        <property name="hidden">0</property>
+                                                                                        <property name="id">wxID_ANY</property>
+                                                                                        <property name="max_size"></property>
+                                                                                        <property name="maximize_button">0</property>
+                                                                                        <property name="maximum_size"></property>
+                                                                                        <property name="min_size"></property>
+                                                                                        <property name="minimize_button">0</property>
+                                                                                        <property name="minimum_size"></property>
+                                                                                        <property name="moveable">1</property>
+                                                                                        <property name="name">m_pTextControlFechaHasta</property>
+                                                                                        <property name="pane_border">1</property>
+                                                                                        <property name="pane_position"></property>
+                                                                                        <property name="pane_size"></property>
+                                                                                        <property name="permission">protected</property>
+                                                                                        <property name="pin_button">1</property>
+                                                                                        <property name="pos"></property>
+                                                                                        <property name="resize">Resizable</property>
+                                                                                        <property name="show">1</property>
+                                                                                        <property name="size"></property>
+                                                                                        <property name="style">wxDP_DEFAULT|wxDP_DROPDOWN</property>
+                                                                                        <property name="subclass"></property>
+                                                                                        <property name="toolbar_pane">0</property>
+                                                                                        <property name="tooltip"></property>
+                                                                                        <property name="validator_data_type"></property>
+                                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                                        <property name="validator_variable"></property>
+                                                                                        <property name="window_extra_style"></property>
+                                                                                        <property name="window_name"></property>
+                                                                                        <property name="window_style"></property>
+                                                                                        <event name="OnChar"></event>
+                                                                                        <event name="OnDateChanged">OnFechaHastaDateChanged</event>
+                                                                                        <event name="OnEnterWindow"></event>
+                                                                                        <event name="OnEraseBackground"></event>
+                                                                                        <event name="OnKeyDown">OnKeyDownFormulario</event>
+                                                                                        <event name="OnKeyUp"></event>
+                                                                                        <event name="OnKillFocus"></event>
+                                                                                        <event name="OnLeaveWindow"></event>
+                                                                                        <event name="OnLeftDClick"></event>
+                                                                                        <event name="OnLeftDown"></event>
+                                                                                        <event name="OnLeftUp"></event>
+                                                                                        <event name="OnMiddleDClick"></event>
+                                                                                        <event name="OnMiddleDown"></event>
+                                                                                        <event name="OnMiddleUp"></event>
+                                                                                        <event name="OnMotion"></event>
+                                                                                        <event name="OnMouseEvents"></event>
+                                                                                        <event name="OnMouseWheel"></event>
+                                                                                        <event name="OnPaint"></event>
+                                                                                        <event name="OnRightDClick"></event>
+                                                                                        <event name="OnRightDown"></event>
+                                                                                        <event name="OnRightUp"></event>
+                                                                                        <event name="OnSetFocus"></event>
+                                                                                        <event name="OnSize"></event>
+                                                                                        <event name="OnUpdateUI"></event>
+                                                                                    </object>
+                                                                                </object>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND|wxLEFT</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxStaticBoxSizer" expanded="0">
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Modalities</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">sbSizer3</property>
+                                                        <property name="orient">wxVERTICAL</property>
+                                                        <property name="permission">none</property>
+                                                        <event name="OnUpdateUI"></event>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxEXPAND|wxALL</property>
+                                                            <property name="proportion">1</property>
+                                                            <object class="wxGridSizer" expanded="0">
+                                                                <property name="cols">5</property>
+                                                                <property name="hgap">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">m_pModalitySizer</property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="rows">0</property>
+                                                                <property name="vgap">0</property>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxBoxSizer" expanded="1">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pSizerDataGrid</property>
+                                                <property name="orient">wxVERTICAL</property>
+                                                <property name="permission">protected</property>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxBoxSizer" expanded="1">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer20</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="spacer" expanded="0">
+                                                        <property name="height">0</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="width">0</property>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_BOTTOM|wxALIGN_RIGHT|wxTOP|wxLEFT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxButton" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default">0</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">0</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Download</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pBDescargar</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnButtonClick">OnDescargarClick</event>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">1</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">m_pSizerBotoneraVentana</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Close</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBotonClose</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCloseClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">650,350</property>
+            <property name="name">FileLinkDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">650,350</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizerPrincipal</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Ginkgo Cloud</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp">OnKeyUp</event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer11</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size">-1,-1</property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelSuperior</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Ginkgo Cloud link</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp">OnKeyUp</event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer81</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">File link:</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText6</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pFileLink</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxTE_MULTILINE|wxTE_READONLY</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp">OnKeyUp</event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font">,93,90,-1,70,0</property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">You can copy and paste link to use it in e-mails and web pages, you have to install Ginkgo CADx to download and visualize it.</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText7</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">490</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp">OnKeyUp</event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer8</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Send link by e-mail</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button7</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnSendMail</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Copy to clipboard</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pCopyClipboard</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCopyClipboard</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp">OnKeyUp</event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CLOSE</property>
+                                    <property name="label">&Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_buttonAceptar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnAccept</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp">OnKeyUp</event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/ginkgocloud/downloadcloudbase.cpp b/cadxcore/main/gui/ginkgocloud/downloadcloudbase.cpp
new file mode 100644
index 0000000..057d68f
--- /dev/null
+++ b/cadxcore/main/gui/ginkgocloud/downloadcloudbase.cpp
@@ -0,0 +1,481 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "downloadcloudbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+OpenGinkgoCloudDialogBase::OpenGinkgoCloudDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 700,350 ), wxDefaultSize );
+
+        wxBoxSizer* bSizerPrincipal;
+        bSizerPrincipal = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Ginkgo Cloud") );
+
+        bSizerPrincipal->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer11;
+        bSizer11 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelSuperior = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelSuperior->SetToolTip( _("Open link") );
+
+        wxBoxSizer* bSizer81;
+        bSizer81 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticText6 = new wxStaticText( m_pPanelSuperior, wxID_ANY, _("File link:"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText6->Wrap( -1 );
+        bSizer81->Add( m_staticText6, 0, wxALL, 5 );
+
+        m_pFileLink = new wxTextCtrl( m_pPanelSuperior, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+        bSizer81->Add( m_pFileLink, 1, wxALL|wxEXPAND, 5 );
+
+
+        m_pPanelSuperior->SetSizer( bSizer81 );
+        m_pPanelSuperior->Layout();
+        bSizer81->Fit( m_pPanelSuperior );
+        bSizer11->Add( m_pPanelSuperior, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer11 );
+        m_pBody->Layout();
+        bSizer11->Fit( m_pBody );
+        bSizerPrincipal->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_buttonAceptar = new wxButton( m_pFooter, wxID_OK, _("&Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_buttonAceptar->SetDefault();
+        bSizer8->Add( m_buttonAceptar, 0, wxLEFT, 5 );
+
+        m_pButtonCancel = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer8->Add( m_pButtonCancel, 0, 0, 5 );
+
+
+        m_pFooter->SetSizer( bSizer8 );
+        m_pFooter->Layout();
+        bSizer8->Fit( m_pFooter );
+        bSizerPrincipal->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizerPrincipal );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ) );
+        m_pHeader->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_pBody->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_pPanelSuperior->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_staticText6->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_pFileLink->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_pFooter->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_buttonAceptar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenGinkgoCloudDialogBase::OnAccept ), NULL, this );
+        m_buttonAceptar->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_pButtonCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenGinkgoCloudDialogBase::OnCancel ), NULL, this );
+        m_pButtonCancel->Connect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+}
+
+OpenGinkgoCloudDialogBase::~OpenGinkgoCloudDialogBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ) );
+        m_pHeader->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_pBody->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_pPanelSuperior->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_staticText6->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_pFileLink->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_pFooter->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_buttonAceptar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenGinkgoCloudDialogBase::OnAccept ), NULL, this );
+        m_buttonAceptar->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+        m_pButtonCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenGinkgoCloudDialogBase::OnCancel ), NULL, this );
+        m_pButtonCancel->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( OpenGinkgoCloudDialogBase::OnKeyUp ), NULL, this );
+
+}
+
+GinkgoCloudSearchDialogBase::GinkgoCloudSearchDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 520,300 ), wxDefaultSize );
+
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Ginkgo Cloud") );
+
+        m_pMainSizer->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBodyPanel = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer18;
+        bSizer18 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelPACS = new TitledPanel( m_pBodyPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelPACS->SetToolTip( _("Search") );
+
+        wxBoxSizer* m_pSizerCamposBusqueda;
+        m_pSizerCamposBusqueda = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer32;
+        bSizer32 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer33;
+        bSizer33 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pPatientLabelStr = new wxStaticText( m_pPanelPACS, wxID_ANY, _("Study"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pPatientLabelStr->Wrap( -1 );
+        m_pPatientLabelStr->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+        bSizer33->Add( m_pPatientLabelStr, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxBoxSizer* bSizer23;
+        bSizer23 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pFieldCombo = new wxComboBox( m_pPanelPACS, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( -1,-1 ), 0, NULL, wxCB_DROPDOWN|wxCB_READONLY );
+        m_pFieldCombo->Append( _("Description") );
+        m_pFieldCombo->Append( _("User name") );
+        bSizer23->Add( m_pFieldCombo, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pSearchPanel = new wxPanel( m_pPanelPACS, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer271;
+        bSizer271 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pTextControlField = new wxSearchCtrl( m_pSearchPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER );
+#ifndef __WXMAC__
+        m_pTextControlField->ShowSearchButton( true );
+#endif
+        m_pTextControlField->ShowCancelButton( false );
+        bSizer271->Add( m_pTextControlField, 1, wxALL|wxEXPAND, 5 );
+
+        m_pLabelRestricted = new wxStaticText( m_pSearchPanel, wxID_ANY, _("PACS acquisition is restricted"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelRestricted->Wrap( -1 );
+        m_pLabelRestricted->Hide();
+
+        bSizer271->Add( m_pLabelRestricted, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pSizerAnimation = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer271->Add( m_pSizerAnimation, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pSearchPanel->SetSizer( bSizer271 );
+        m_pSearchPanel->Layout();
+        bSizer271->Fit( m_pSearchPanel );
+        bSizer23->Add( m_pSearchPanel, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer33->Add( bSizer23, 1, wxEXPAND, 5 );
+
+
+        bSizer32->Add( bSizer33, 1, wxEXPAND, 5 );
+
+
+        m_pSizerCamposBusqueda->Add( bSizer32, 0, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer27;
+        bSizer27 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxStaticBoxSizer* sbSizer2;
+        sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_pPanelPACS, wxID_ANY, _("Date") ), wxVERTICAL );
+
+        wxBoxSizer* bSizer17;
+        bSizer17 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer181;
+        bSizer181 = new wxBoxSizer( wxVERTICAL );
+
+        m_pAnyDate = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Any date"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+        m_pAnyDate->SetValue( true );
+        bSizer181->Add( m_pAnyDate, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 2 );
+
+        m_pToday = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Today"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer181->Add( m_pToday, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        m_pYesterday = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Yesterday"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer181->Add( m_pYesterday, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 2 );
+
+
+        bSizer17->Add( bSizer181, 1, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer29;
+        bSizer29 = new wxBoxSizer( wxVERTICAL );
+
+        m_pLastWeek = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Last 7 days"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer29->Add( m_pLastWeek, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        m_pLastMonth = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Last 30 days"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer29->Add( m_pLastMonth, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        m_pLastThreeMonths = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Last 3 months"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer29->Add( m_pLastThreeMonths, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+
+        bSizer17->Add( bSizer29, 1, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer201;
+        bSizer201 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBetween = new wxRadioButton( m_pPanelPACS, wxID_ANY, _("Between:"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer201->Add( m_pBetween, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        wxBoxSizer* bSizer21;
+        bSizer21 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTextControlFechaDesde = new wxDatePickerCtrl( m_pPanelPACS, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_DROPDOWN );
+        bSizer21->Add( m_pTextControlFechaDesde, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 2 );
+
+
+        bSizer201->Add( bSizer21, 0, wxEXPAND|wxLEFT, 5 );
+
+        wxBoxSizer* bSizer22;
+        bSizer22 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTextControlFechaHasta = new wxDatePickerCtrl( m_pPanelPACS, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_DROPDOWN );
+        bSizer22->Add( m_pTextControlFechaHasta, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 2 );
+
+
+        bSizer201->Add( bSizer22, 0, wxEXPAND|wxLEFT, 5 );
+
+
+        bSizer17->Add( bSizer201, 0, wxEXPAND, 5 );
+
+
+        sbSizer2->Add( bSizer17, 1, wxEXPAND|wxALL, 5 );
+
+
+        bSizer27->Add( sbSizer2, 1, wxEXPAND|wxRIGHT, 5 );
+
+        wxStaticBoxSizer* sbSizer3;
+        sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_pPanelPACS, wxID_ANY, _("Modalities") ), wxVERTICAL );
+
+        m_pModalitySizer = new wxGridSizer( 0, 5, 0, 0 );
+
+
+        sbSizer3->Add( m_pModalitySizer, 1, wxEXPAND|wxALL, 5 );
+
+
+        bSizer27->Add( sbSizer3, 1, wxEXPAND|wxLEFT, 5 );
+
+
+        m_pSizerCamposBusqueda->Add( bSizer27, 0, wxEXPAND|wxBOTTOM, 5 );
+
+        m_pSizerDataGrid = new wxBoxSizer( wxVERTICAL );
+
+
+        m_pSizerCamposBusqueda->Add( m_pSizerDataGrid, 1, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer20;
+        bSizer20 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer20->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pBDescargar = new wxButton( m_pPanelPACS, wxID_ANY, _("Download"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBDescargar->Enable( false );
+
+        bSizer20->Add( m_pBDescargar, 0, wxALIGN_BOTTOM|wxALIGN_RIGHT|wxTOP|wxLEFT, 5 );
+
+
+        m_pSizerCamposBusqueda->Add( bSizer20, 0, wxEXPAND, 5 );
+
+
+        m_pPanelPACS->SetSizer( m_pSizerCamposBusqueda );
+        m_pPanelPACS->Layout();
+        m_pSizerCamposBusqueda->Fit( m_pPanelPACS );
+        bSizer18->Add( m_pPanelPACS, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
+
+
+        m_pBodyPanel->SetSizer( bSizer18 );
+        m_pBodyPanel->Layout();
+        bSizer18->Fit( m_pBodyPanel );
+        m_pMainSizer->Add( m_pBodyPanel, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pFooter->Hide();
+
+        wxBoxSizer* m_pSizerBotoneraVentana;
+        m_pSizerBotoneraVentana = new wxBoxSizer( wxHORIZONTAL );
+
+
+        m_pSizerBotoneraVentana->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pBotonClose = new wxButton( m_pFooter, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pSizerBotoneraVentana->Add( m_pBotonClose, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pFooter->SetSizer( m_pSizerBotoneraVentana );
+        m_pFooter->Layout();
+        m_pSizerBotoneraVentana->Fit( m_pFooter );
+        m_pMainSizer->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GinkgoCloudSearchDialogBase::OnClose ) );
+        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ) );
+        m_pFieldCombo->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnComboField ), NULL, this );
+        m_pTextControlField->Connect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnCancelClick ), NULL, this );
+        m_pTextControlField->Connect( wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnBusquedaClick ), NULL, this );
+        m_pTextControlField->Connect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnBusquedaClick ), NULL, this );
+        m_pAnyDate->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pToday->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pYesterday->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastWeek->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastMonth->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastThreeMonths->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pBetween->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pTextControlFechaDesde->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( GinkgoCloudSearchDialogBase::OnFechaDesdeDateChanged ), NULL, this );
+        m_pTextControlFechaDesde->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pTextControlFechaHasta->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( GinkgoCloudSearchDialogBase::OnFechaHastaDateChanged ), NULL, this );
+        m_pTextControlFechaHasta->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pBDescargar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnDescargarClick ), NULL, this );
+        m_pBotonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnCloseClick ), NULL, this );
+}
+
+GinkgoCloudSearchDialogBase::~GinkgoCloudSearchDialogBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( GinkgoCloudSearchDialogBase::OnClose ) );
+        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ) );
+        m_pFieldCombo->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnComboField ), NULL, this );
+        m_pTextControlField->Disconnect( wxEVT_COMMAND_SEARCHCTRL_CANCEL_BTN, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnCancelClick ), NULL, this );
+        m_pTextControlField->Disconnect( wxEVT_COMMAND_SEARCHCTRL_SEARCH_BTN, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnBusquedaClick ), NULL, this );
+        m_pTextControlField->Disconnect( wxEVT_COMMAND_TEXT_ENTER, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnBusquedaClick ), NULL, this );
+        m_pAnyDate->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pToday->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pYesterday->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastWeek->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastMonth->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pLastThreeMonths->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pBetween->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pTextControlFechaDesde->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( GinkgoCloudSearchDialogBase::OnFechaDesdeDateChanged ), NULL, this );
+        m_pTextControlFechaDesde->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pTextControlFechaHasta->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( GinkgoCloudSearchDialogBase::OnFechaHastaDateChanged ), NULL, this );
+        m_pTextControlFechaHasta->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoCloudSearchDialogBase::OnKeyDownFormulario ), NULL, this );
+        m_pBDescargar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnDescargarClick ), NULL, this );
+        m_pBotonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GinkgoCloudSearchDialogBase::OnCloseClick ), NULL, this );
+
+}
+
+FileLinkDialogBase::FileLinkDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 650,350 ), wxDefaultSize );
+
+        wxBoxSizer* bSizerPrincipal;
+        bSizerPrincipal = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Ginkgo Cloud") );
+
+        bSizerPrincipal->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer11;
+        bSizer11 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelSuperior = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelSuperior->SetToolTip( _("Ginkgo Cloud link") );
+
+        wxBoxSizer* bSizer81;
+        bSizer81 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticText6 = new wxStaticText( m_pPanelSuperior, wxID_ANY, _("File link:"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText6->Wrap( -1 );
+        bSizer81->Add( m_staticText6, 0, wxALL, 5 );
+
+        m_pFileLink = new wxTextCtrl( m_pPanelSuperior, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
+        bSizer81->Add( m_pFileLink, 1, wxALL|wxEXPAND, 5 );
+
+        m_staticText7 = new wxStaticText( m_pPanelSuperior, wxID_ANY, _("You can copy and paste link to use it in e-mails and web pages, you have to install Ginkgo CADx to download and visualize it."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText7->Wrap( 490 );
+        m_staticText7->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 93, 90, false, wxEmptyString ) );
+
+        bSizer81->Add( m_staticText7, 0, wxALL, 5 );
+
+
+        m_pPanelSuperior->SetSizer( bSizer81 );
+        m_pPanelSuperior->Layout();
+        bSizer81->Fit( m_pPanelSuperior );
+        bSizer11->Add( m_pPanelSuperior, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer11 );
+        m_pBody->Layout();
+        bSizer11->Fit( m_pBody );
+        bSizerPrincipal->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_button7 = new wxButton( m_pFooter, wxID_ANY, _("Send link by e-mail"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer8->Add( m_button7, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
+
+
+        bSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pCopyClipboard = new wxButton( m_pFooter, wxID_ANY, _("Copy to clipboard"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer8->Add( m_pCopyClipboard, 0, 0, 5 );
+
+        m_buttonAceptar = new wxButton( m_pFooter, wxID_CLOSE, _("&Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_buttonAceptar->SetDefault();
+        bSizer8->Add( m_buttonAceptar, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer8 );
+        m_pFooter->Layout();
+        bSizer8->Fit( m_pFooter );
+        bSizerPrincipal->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizerPrincipal );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pBody->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+        m_pPanelSuperior->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+        m_pFileLink->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+        m_pFooter->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+        m_button7->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnSendMail ), NULL, this );
+        m_pCopyClipboard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnCopyClipboard ), NULL, this );
+        m_pCopyClipboard->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+        m_buttonAceptar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnAccept ), NULL, this );
+        m_buttonAceptar->Connect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+}
+
+FileLinkDialogBase::~FileLinkDialogBase()
+{
+        // Disconnect Events
+        m_pBody->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+        m_pPanelSuperior->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+        m_pFileLink->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+        m_pFooter->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+        m_button7->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnSendMail ), NULL, this );
+        m_pCopyClipboard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnCopyClipboard ), NULL, this );
+        m_pCopyClipboard->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+        m_buttonAceptar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( FileLinkDialogBase::OnAccept ), NULL, this );
+        m_buttonAceptar->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( FileLinkDialogBase::OnKeyUp ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/ginkgocloud/downloadcloudbase.h b/cadxcore/main/gui/ginkgocloud/downloadcloudbase.h
new file mode 100644
index 0000000..8f448ba
--- /dev/null
+++ b/cadxcore/main/gui/ginkgocloud/downloadcloudbase.h
@@ -0,0 +1,212 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __DOWNLOADCLOUDBASE_H__
+#define __DOWNLOADCLOUDBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class HeaderPanel;
+class TitledPanel;
+
+#include <wx/panel.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/textctrl.h>
+#include <wx/sizer.h>
+#include <wx/button.h>
+#include <wx/frame.h>
+#include <wx/combobox.h>
+#include <wx/srchctrl.h>
+#include <wx/radiobut.h>
+#include <wx/datectrl.h>
+#include <wx/dateevt.h>
+#include <wx/statbox.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class OpenGinkgoCloudDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class OpenGinkgoCloudDialogBase : public wxFrame
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelSuperior;
+        wxStaticText* m_staticText6;
+        wxTextCtrl* m_pFileLink;
+        FooterPanel* m_pFooter;
+        wxButton* m_buttonAceptar;
+        wxButton* m_pButtonCancel;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnKeyUp( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAccept( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancel( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        OpenGinkgoCloudDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Open Ginkgo Cloud"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 700,350 ), long style = wxCAPTION|wxCLOSE_BOX|wxFRAME_FLOAT_ON_PARENT|wxRESIZE_BORDER|wxSYSTEM_MENU|wxTAB_TRAVERSAL );
+
+        ~OpenGinkgoCloudDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class GinkgoCloudSearchDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class GinkgoCloudSearchDialogBase : public wxDialog
+{
+private:
+
+protected:
+        wxBoxSizer* m_pMainSizer;
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBodyPanel;
+        TitledPanel* m_pPanelPACS;
+        wxStaticText* m_pPatientLabelStr;
+        wxComboBox* m_pFieldCombo;
+        wxPanel* m_pSearchPanel;
+        wxSearchCtrl* m_pTextControlField;
+        wxStaticText* m_pLabelRestricted;
+        wxBoxSizer* m_pSizerAnimation;
+        wxRadioButton* m_pAnyDate;
+        wxRadioButton* m_pToday;
+        wxRadioButton* m_pYesterday;
+        wxRadioButton* m_pLastWeek;
+        wxRadioButton* m_pLastMonth;
+        wxRadioButton* m_pLastThreeMonths;
+        wxRadioButton* m_pBetween;
+        wxDatePickerCtrl* m_pTextControlFechaDesde;
+        wxDatePickerCtrl* m_pTextControlFechaHasta;
+        wxGridSizer* m_pModalitySizer;
+        wxBoxSizer* m_pSizerDataGrid;
+        wxButton* m_pBDescargar;
+        FooterPanel* m_pFooter;
+        wxButton* m_pBotonClose;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnClose( wxCloseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnKeyDownFormulario( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnComboField( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancelClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnBusquedaClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnFechaDesdeDateChanged( wxDateEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnFechaHastaDateChanged( wxDateEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnDescargarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCloseClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        GinkgoCloudSearchDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Ginkgo Cloud search"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 1024,575 ), long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~GinkgoCloudSearchDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class FileLinkDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class FileLinkDialogBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelSuperior;
+        wxStaticText* m_staticText6;
+        wxTextCtrl* m_pFileLink;
+        wxStaticText* m_staticText7;
+        FooterPanel* m_pFooter;
+        wxButton* m_button7;
+        wxButton* m_pCopyClipboard;
+        wxButton* m_buttonAceptar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnKeyUp( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSendMail( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCopyClipboard( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAccept( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        FileLinkDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 650,350 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~FileLinkDialogBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__DOWNLOADCLOUDBASE_H__
diff --git a/cadxcore/main/gui/ginkgocloud/filelinkdialog.cpp b/cadxcore/main/gui/ginkgocloud/filelinkdialog.cpp
new file mode 100644
index 0000000..cf8433e
--- /dev/null
+++ b/cadxcore/main/gui/ginkgocloud/filelinkdialog.cpp
@@ -0,0 +1,78 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "filelinkdialog.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+#include <main/controllers/controladorlog.h>
+
+#include <wx/clipbrd.h>
+#include <wx/dataobj.h>
+
+GNC::GUI::FileLinkDialog::FileLinkDialog(wxWindow* pParent, std::string fileLink): GNC::GUI::FileLinkDialogBase(pParent)
+{
+        m_pFileLink->SetValue(wxString::FromUTF8(fileLink.c_str()));
+        wxIcon icono;
+        icono.CopyFromBitmap(GinkgoResourcesManager::Logos::GetLogoGinkgo32x32());
+        this->SetIcon(icono);
+}
+
+GNC::GUI::FileLinkDialog::~FileLinkDialog()
+{
+}
+
+void GNC::GUI::FileLinkDialog::OnCopyClipboard(wxCommandEvent& )
+{
+        if (wxTheClipboard->Open()) {
+                wxTheClipboard->SetData(new wxTextDataObject(m_pFileLink->GetValue()));
+                wxTheClipboard->Close();
+        }
+}
+
+void GNC::GUI::FileLinkDialog::OnAccept(wxCommandEvent &)
+{
+        Close();
+}
+
+void GNC::GUI::FileLinkDialog::OnKeyUp(wxKeyEvent &evt)
+{
+        if (evt.GetKeyCode() == WXK_ESCAPE) {
+                Close();
+        }
+        evt.Skip();
+}
+
+void GNC::GUI::FileLinkDialog::OnSendMail(wxCommandEvent& )
+{
+        std::ostringstream ostr;
+        ostr << "mailto:?Subject=" << _Std("New Ginkgo Cloud study") << "&body="<<_Std("To download the study, paste this url ");
+        ostr <<":\n\n" << m_pFileLink->GetValue().ToUTF8();
+        ostr <<"\n\n " << _Std("into \"Open Ginkgo Cloud link\" tool of Ginkgo CADx history, or paste it into the address bar of your browser.");
+
+
+        std::string url = ostr.str();
+
+        wxString wxUrl = wxString::FromUTF8(url.c_str());
+        wxUrl.Replace(wxT(" "), wxT("%20"));
+        wxUrl.Replace(wxT("\n"), wxT("%0A"));
+        LOG_DEBUG("SendMail", "url: " << wxUrl.ToUTF8());
+        wxLaunchDefaultBrowser(wxUrl);
+}
+
diff --git a/cadxcore/main/gui/ginkgocloud/filelinkdialog.h b/cadxcore/main/gui/ginkgocloud/filelinkdialog.h
new file mode 100644
index 0000000..9d71d75
--- /dev/null
+++ b/cadxcore/main/gui/ginkgocloud/filelinkdialog.h
@@ -0,0 +1,42 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "downloadcloudbase.h"
+
+namespace GNC
+{
+namespace GUI
+{
+
+class FileLinkDialog: public GNC::GUI::FileLinkDialogBase
+{
+public:
+        FileLinkDialog(wxWindow* pParent, std::string fileLink);
+        ~FileLinkDialog();
+
+protected:
+        virtual void OnCopyClipboard(wxCommandEvent& evt);
+        virtual void OnAccept(wxCommandEvent &evt);
+        virtual void OnKeyUp(wxKeyEvent &evt);
+        virtual void OnSendMail(wxCommandEvent& evt);
+};
+}
+}
diff --git a/cadxcore/main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp b/cadxcore/main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp
new file mode 100644
index 0000000..405a132
--- /dev/null
+++ b/cadxcore/main/gui/ginkgocloud/ginkgocloudsearchdialog.cpp
@@ -0,0 +1,500 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/cloud.h>
+#include <api/internationalization/internationalization.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include "ginkgocloudsearchdialog.h"
+#include <main/controllers/historytoolscontroller.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/configurationcontroller.h>
+#include <eventos/progresocomando.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include "filelinkdialog.h"
+
+#include <wx/menu.h>
+#include <wx/checkbox.h>
+#include <wx/animate.h>
+#include <wx/imaglist.h>
+#include <wx/msgdlg.h>
+
+#include <main/controllers/anonusagestats.h>
+
+#define SIZE_ICONOS 16
+
+#define STUDY_ICON 0
+#define SIZE_ICONOS 16
+
+#define CLOUD_STUDY_UID "studyInstanceUID"
+#define CLOUD_MD5 "md5File"
+#define CLOUD_CREATOR_USER_NAME "creatorUsername"
+#define CLOUD_LAST_MOD_USER_NAME "lastModificationUsername"
+#define CLOUD_DESCRIPTION "description"
+#define CLOUD_DATE "creationDate"
+#define CLOUD_MODALITIES "modalities"
+#define CLOUD_URL "urlDownload"
+
+#define DESCRIPTION_COLUMN 0
+#define MODALITY_COLUMN 1
+#define CREATOR_USER_NAME_COLUMN 2
+#define LAST_MODIFICATOR_USER_NAME_COLUMN 3
+#define DATE_COLUMN 4
+#define URL_COLUMN 5
+#define BUCKET_ID_COLUMN 6
+
+
+////////////////////////////////////////////////
+
+//---------------------------------------------------------------------------
+
+GNC::GUI::GinkgoCloudSearchDialog* GNC::GUI::GinkgoCloudSearchDialog::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new GinkgoCloudSearchDialog(GNC::HistoryToolsController::Instance()->GetHistoryPanel()->GetWxWindow());
+        }
+        return m_pInstance;
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::FreeInstance()
+{
+        if(m_pInstance!=NULL) {
+                m_pInstance->Close();
+                m_pInstance = NULL;
+        }
+}
+
+GNC::GUI::GinkgoCloudSearchDialog* GNC::GUI::GinkgoCloudSearchDialog::m_pInstance = NULL;
+
+
+GNC::GUI::GinkgoCloudSearchDialog::GinkgoCloudSearchDialog(wxWindow* pParent) : GinkgoCloudSearchDialogBase(pParent)
+{
+        m_pCommand = NULL;
+
+        //animation
+        m_pAnimation = new wxAnimationCtrl(m_pSearchPanel,wxID_ANY,GinkgoResourcesManager::ProgressBar::GetAniLoading());
+        m_pAnimation->Hide();
+        m_pSizerAnimation->Add(m_pAnimation, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+        m_pFieldCombo->Select(0);
+
+        //modalities
+        {
+                const int MaxModalityNumber=20; // Modificar la constante si se añaden o quitan códigos de modalidad
+                std::string modalidades[MaxModalityNumber] = {"CR","CT","DR","DX","IO","MG","MR","NM","OT","PT","RF","RG","SC","OCT","US","XA","XC","ES","ECG","HD"};
+                for(int i = 0; i<MaxModalityNumber; i++) {
+                        wxCheckBox* pCheckBox = new wxCheckBox( m_pPanelPACS, wxID_ANY, wxString::FromUTF8(modalidades[i].c_str()), wxDefaultPosition, wxDefaultSize, 0 );
+                        m_pModalitySizer->Add( pCheckBox, 0, wxALL, 2 );
+                        m_modalitiesList.push_back(pCheckBox);
+                        pCheckBox->Connect( wxEVT_KEY_UP, wxKeyEventHandler( GinkgoCloudSearchDialog::OnKeyDownFormulario ), NULL, this );
+                }
+                m_pPanelPACS->Layout();
+        }
+
+        //datagridview...
+        m_pResultsModel = new wxDataViewListStore();
+        m_pResultsView = new wxDataViewListCtrl(m_pPanelPACS, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_SINGLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);
+        m_pSizerDataGrid->Add(m_pResultsView, 1, wxEXPAND);
+        m_pResultsView->AssociateModel(m_pResultsModel.get());
+
+        // column 0 of the view control:
+        m_pResultsView->AppendColumn( new wxDataViewColumn( _("Description"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ), DESCRIPTION_COLUMN, 370, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pResultsView->AppendColumn( new wxDataViewColumn( _("Modalities"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ), MODALITY_COLUMN, 70, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pResultsView->AppendColumn( new wxDataViewColumn( _("Creator"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ), CREATOR_USER_NAME_COLUMN, 128, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pResultsView->AppendColumn( new wxDataViewColumn( _("Last Modificator"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ), LAST_MODIFICATOR_USER_NAME_COLUMN, 128, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pResultsView->AppendColumn( new wxDataViewColumn( _("Date Time"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ), DATE_COLUMN, 128, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+
+        m_pResultsView->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler(GinkgoCloudSearchDialog::OnDataSelChanged), NULL, this);
+        m_pResultsView->Connect(wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler(GinkgoCloudSearchDialog::OnDataItemActivated), NULL, this);
+        m_pResultsView->Connect(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler(GinkgoCloudSearchDialog::OnDataItemMenu), NULL, this);
+
+        m_pPanelPACS->Layout();
+        Layout();
+        GNC::GCS::ControladorEventos::Instance()->Registrar(this, GNC::GCS::Events::EventoProgresoComando());
+}
+
+GNC::GUI::GinkgoCloudSearchDialog::~GinkgoCloudSearchDialog()
+{
+        GNC::CommandController::Instance()->AbortarComandosDeOwner(this);
+        m_pAnimation->Destroy();
+}
+
+bool GNC::GUI::GinkgoCloudSearchDialog::Show(bool show)
+{
+        if (show) {
+                LOG_STAT(ANON_STAT_DLG_CLOUD_SEARCH)
+        }
+        if (IsIconized()) {
+                Iconize(false);
+        }
+        //se recarga la lista de servidores pacs
+        if (IsShown()) {
+                Raise();
+        }
+        return GinkgoCloudSearchDialogBase::Show(show);
+}
+
+
+
+//---------------------------------------------------------------------------
+//region Eventos de interfaz
+void GNC::GUI::GinkgoCloudSearchDialog::OnKeyDownFormulario( wxKeyEvent& event )
+{
+        if(event.GetKeyCode() == WXK_RETURN || event.GetKeyCode() == WXK_NUMPAD_ENTER) {
+                wxCommandEvent evt;
+                if (m_pTextControlField->IsEnabled()) {
+                        OnBusquedaClick(evt);
+                }
+                event.Skip(false);
+        } else {
+                if(event.GetKeyCode() == WXK_ESCAPE) {
+                        this->Hide();
+                        event.Skip(false);
+                }
+        }
+        event.Skip(true);
+}
+
+
+void GNC::GUI::GinkgoCloudSearchDialog::OnFechaDesdeDateChanged( wxDateEvent& /*event*/ )
+{
+        m_pBetween->SetValue(true);
+}
+
+
+void GNC::GUI::GinkgoCloudSearchDialog::OnFechaHastaDateChanged( wxDateEvent& /*event*/ )
+{
+        m_pBetween->SetValue(true);
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::OnCancelClick( wxCommandEvent&  )
+{
+        GNC::CommandController::Instance()->AbortarComandosDeOwnerAsincrono(this);
+        m_pTextControlField->ShowCancelButton(false);
+        ShowAnimation(false);
+        LimpiarBusquedas();
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::OnBusquedaClick( wxCommandEvent&  )
+{
+        Search();
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::Search()
+{
+        //cancel previous command (if any)
+        m_pTextControlField->ShowCancelButton(false);
+        ShowAnimation(false);
+        GNC::CommandController::Instance()->AbortarComandosDeOwnerAsincrono(this);
+        LimpiarBusquedas();
+        //
+
+        std::string fechaDesde("");
+        std::string fechaHasta("");
+        if (m_pBetween->GetValue()) {
+                if(m_pTextControlFechaDesde->GetValue().IsValid()) {
+                        fechaDesde =  std::string(m_pTextControlFechaDesde->GetValue().Format(wxT("%Y-%m-%d")).ToUTF8());
+                }
+                if(m_pTextControlFechaHasta->GetValue().IsValid()) {
+                        fechaHasta =  std::string(m_pTextControlFechaHasta->GetValue().Format(wxT("%Y-%m-%d")).ToUTF8());
+                }
+        } else if (m_pToday->GetValue()) {
+                fechaDesde = fechaHasta = wxDateTime::Now().Format(wxT("%Y-%m-%d")).ToUTF8();
+        } else if (m_pYesterday->GetValue()) {
+                fechaDesde = wxDateTime::Now().Add(wxDateSpan(0,0,0,-1)).Format(wxT("%Y-%m-%d")).ToUTF8();
+        } else if (m_pLastWeek->GetValue()) {
+                fechaDesde = wxDateTime::Now().Add(wxDateSpan(0,0,-1,0)).Format(wxT("%Y-%m-%d")).ToUTF8();
+        } else if (m_pLastMonth->GetValue()) {
+                fechaDesde = wxDateTime::Now().Add(wxDateSpan(0,-1,0,0)).Format(wxT("%Y-%m-%d")).ToUTF8();
+        } else if (m_pLastThreeMonths->GetValue()) {
+                fechaDesde = wxDateTime::Now().Add(wxDateSpan(0,-3,0,0)).Format(wxT("%Y-%m-%d")).ToUTF8();
+        }
+
+        std::string description, userName, modalities;
+
+        modalities = GetModalities();
+
+        if(fechaDesde == "" && fechaHasta == "" && modalities.empty() &&m_pTextControlField->GetValue().size() == 0) {
+                int answer = wxMessageBox(_("Search without parameters could take al long time\nWould you like to continue?"),_("Search"), wxYES_NO , this);
+                if (answer == wxNO) {
+                        return;
+                }
+        }
+
+        std::ostringstream ostrField;
+        if (m_pTextControlField->GetValue().Contains(wxT("*"))) {
+                wxString replaced = m_pTextControlField->GetValue();
+                replaced.Replace(wxT("*"),wxT("%"));
+                ostrField << replaced.ToUTF8();
+        } else {
+                ostrField << "%";
+                ostrField << m_pTextControlField->GetValue().ToUTF8();
+                ostrField << "%";
+        }
+        if (m_pFieldCombo->GetValue() == _("Description")) {
+                description = ostrField.str();
+        } else if (m_pFieldCombo->GetValue() == _("User name")) {
+                userName = ostrField.str();;
+        }
+
+        std::string bucketId;
+
+        if(!GNC::GCS::ConfigurationController::Instance()->readStringUser("/GNKPro/GinkgoCloud","bucketId", bucketId) || bucketId.empty()) {
+                bucketId = GINKGO_CLOUD_DEFAULT_BUCKET;
+        }
+
+        GNC::GCS::CloudFindCommandParams* pParams = new GNC::GCS::CloudFindCommandParams(bucketId, userName, description, GetModalities(), fechaDesde, fechaHasta);
+        GNC::GCS::CloudCommand* pCmd = new GNC::GCS::CloudCommand(pParams);
+        GNC::CommandController::Instance()->ProcessAsync(_Std("Exploring PACS..."),pCmd, this);
+        m_pTextControlField->ShowCancelButton(true);
+        ShowAnimation(true);
+}
+
+std::string GNC::GUI::GinkgoCloudSearchDialog::GetModalities()
+{
+        std::string modalities;
+
+        for (TModalitiesVector::iterator it =m_modalitiesList.begin(); it !=m_modalitiesList.end(); ++it) {
+                wxCheckBox* pCheck = dynamic_cast<wxCheckBox*>(*it);
+                if(pCheck != NULL)
+                        if(pCheck->IsChecked()) {
+                                if (modalities == "") {
+                                        modalities = pCheck->GetLabel().ToUTF8();
+                                } else {
+                                        modalities.append("//");
+                                        modalities.append(pCheck->GetLabel().ToUTF8());
+                                }
+                        }
+        }
+        return modalities;
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::OnCloseClick( wxCommandEvent& /*event*/ )
+{
+        Hide();
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::OnDescargarClick( wxCommandEvent& /*event*/ )
+{
+        AddDescarga();
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::OnDataSelChanged(wxDataViewEvent& evt)
+{
+        wxDataViewItem item = evt.GetItem();
+        if (item.IsOk()) {
+                m_pBDescargar->Enable(true);
+        } else {
+                m_pBDescargar->Enable(false);
+        }
+        evt.Skip(true);
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::OnDataItemActivated(wxDataViewEvent& event)
+{
+        AddDescarga();
+        event.Skip(true);
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::OnDataItemMenu(wxDataViewEvent& event)
+{
+        //clase menu contextual
+        class PopUpMenuDescargar: public wxMenu
+        {
+        public:
+                PopUpMenuDescargar(GinkgoCloudSearchDialog* pDlg) : wxMenu()
+                {
+                        m_pDlg = pDlg;
+                        wxMenuItem* descargar = new wxMenuItem( this,wxID_ANY,_("Download study"));
+#ifdef __WXMSW__
+                        descargar->SetBitmaps(GinkgoResourcesManager::Acquisition::GetIcoDownload());
+#else
+                        descargar->SetBitmap(GinkgoResourcesManager::Acquisition::GetIcoDownload());
+#endif
+                        Append(descargar);
+                        Connect(descargar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PopUpMenuDescargar::OnDownload ), NULL, this);
+
+
+                        wxMenuItem* link = new wxMenuItem( this, wxID_ANY, _("Show link..."));
+                        Append(link);
+                        Connect(link->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PopUpMenuDescargar::OnShowLink ),NULL, this);
+
+                }
+                ~PopUpMenuDescargar()
+                {
+                        m_pDlg = NULL;
+                        Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PopUpMenuDescargar::OnDownload ), NULL, this);
+                        Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( PopUpMenuDescargar::OnShowLink ), NULL, this);
+                }
+
+                void OnDownload(wxCommandEvent& )
+                {
+                        if (m_pDlg) {
+                                m_pDlg->AddDescarga();
+                        }
+                }
+
+                void OnShowLink(wxCommandEvent& )
+                {
+                        if (m_pDlg) {
+                                m_pDlg->ShowStudyLink();
+                        }
+                }
+
+
+                GinkgoCloudSearchDialog* m_pDlg;
+
+        };
+        //
+        wxDataViewItem item = event.GetItem();
+        if(item.IsOk()) {
+                PopUpMenuDescargar pMenu(this);
+                m_pResultsView->PopupMenu(&pMenu);
+        }
+}
+
+
+// Obtiene el item seleccionado del TreeList de resultados, genera una descarga, la apila y la inicia.
+void GNC::GUI::GinkgoCloudSearchDialog::AddDescarga()
+{
+        wxDataViewItem selection = m_pResultsView->GetSelection();
+        if(selection.IsOk()) {
+                wxVariant url;
+                m_pResultsModel->GetValue(url, selection, URL_COLUMN);
+                GNC::GCS::CloudGetCommandParams* pParams = new GNC::GCS::CloudGetCommandParams(std::string(url.GetString().ToUTF8()), true);
+                GNC::GCS::CloudCommand* pCmd = new GNC::GCS::CloudCommand(pParams);
+                GNC::CommandController::Instance()->ProcessAsync("Download", pCmd, NULL);
+        }
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::ShowStudyLink()
+{
+        wxDataViewItem selection = m_pResultsView->GetSelection();
+        if(selection.IsOk()) {
+                wxVariant url;
+                m_pResultsModel->GetValue(url, selection, URL_COLUMN);
+
+                GNC::GUI::FileLinkDialog* dlg = new GNC::GUI::FileLinkDialog(this, std::string(url.GetString().ToUTF8()));
+                dlg->Show();
+        }
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::ShowAnimation(bool show)
+{
+        if (show != m_pAnimation->IsShown()) {
+                m_pAnimation->Show(show);
+                if (show) {
+                        m_pAnimation->Play();
+                } else {
+                        m_pAnimation->Stop();
+                }
+                m_pTextControlField->ShowCancelButton(show);
+                m_pSearchPanel->Layout();
+        }
+}
+
+
+void GNC::GUI::GinkgoCloudSearchDialog::LimpiarBusquedas()
+{
+        m_pResultsModel->DeleteAllItems();
+}
+
+//endregion
+
+
+//---------------------------------------------------------------------------
+//region realizacion de la interfaz IComandoPACSNotificador
+void GNC::GUI::GinkgoCloudSearchDialog::LoadResults(const std::string& bucketId, const GNC::GCS::CloudFindCommandParams::Results& results)
+{
+        m_pTextControlField->ShowCancelButton(false);
+        ShowAnimation(false);
+
+        wxVector<wxVariant> data;
+        for (GNC::GCS::CloudFindCommandParams::Results::const_iterator itTuples = results.begin(); itTuples != results.end(); ++itTuples) {
+                const GNC::GCS::CloudFindCommandParams::ResultTuple& tuple = (*itTuples);
+                data.clear();
+                if (tuple.find(CLOUD_DESCRIPTION) != tuple.end()) {
+                        data.push_back(wxString::FromUTF8(tuple.find(CLOUD_DESCRIPTION)->second.c_str()));
+                } else {
+                        data.push_back(_("?"));
+                }
+                if (tuple.find(CLOUD_MODALITIES) != tuple.end()) {
+                        data.push_back(wxString::FromUTF8(tuple.find(CLOUD_MODALITIES)->second.c_str()));
+                } else {
+                        data.push_back( _("?"));
+                }
+                if (tuple.find(CLOUD_CREATOR_USER_NAME) != tuple.end()) {
+                        data.push_back(wxString::FromUTF8(tuple.find(CLOUD_CREATOR_USER_NAME)->second.c_str()));
+                } else {
+                        data.push_back(_("?"));
+                }
+                if (tuple.find(CLOUD_CREATOR_USER_NAME) != tuple.end()) {
+                        data.push_back(wxString::FromUTF8(tuple.find(CLOUD_LAST_MOD_USER_NAME)->second.c_str()));
+                } else {
+                        data.push_back(_("?"));
+                }
+
+                if (tuple.find(CLOUD_DATE) != tuple.end()) {
+                        wxDateTime wxDate;
+                        wxString dateStr = wxString::FromUTF8(tuple.find(CLOUD_DATE)->second.c_str());
+                        wxDate.ParseFormat( dateStr, wxT("%Y-%m-%d %H:%M:%S"), wxDefaultDateTime);
+
+                        if(wxDate.IsValid()) {
+                                dateStr = wxString(wxDate.Format(_("%m/%d/%Y %H:%M:%S"), wxDateTime::TimeZone(wxDateTime::GMT1)));
+                        }
+                        data.push_back( dateStr);
+                }
+                if (tuple.find(CLOUD_URL) != tuple.end()) {
+                        data.push_back( wxString::FromUTF8(tuple.find(CLOUD_URL)->second.c_str()));
+                }
+                data.push_back(wxString::FromUTF8(bucketId.c_str()));
+                m_pResultsModel->AppendItem(data);
+        }
+
+}
+
+void GNC::GUI::GinkgoCloudSearchDialog::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        GNC::GCS::Events::EventoProgresoComando* pEvt = dynamic_cast<GNC::GCS::Events::EventoProgresoComando*> (evt);
+        if (pEvt == NULL  || pEvt->GetComando() == NULL) {
+                return;
+        }
+
+        switch (pEvt->GetTipo()) {
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Iniciado:
+                break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Progreso:
+                break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Unknown:
+                break;
+        case GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado:
+                GNC::GCS::IComando* pCmd = pEvt->GetComando();
+                if (pCmd->GetOwner() == this && !pCmd->EstaAbortado()) {
+                        GNC::GCS::CloudFindCommandParams* pParams = dynamic_cast<GNC::GCS::CloudFindCommandParams*>(pCmd->GetParams());
+                        if (pParams != NULL) {
+                                //load results...
+                                LoadResults(pParams->m_bucketId, pParams->m_pResults);
+                        }
+                }
+                break;
+
+        }
+}
diff --git a/cadxcore/main/gui/ginkgocloud/ginkgocloudsearchdialog.h b/cadxcore/main/gui/ginkgocloud/ginkgocloudsearchdialog.h
new file mode 100644
index 0000000..b30fa9e
--- /dev/null
+++ b/cadxcore/main/gui/ginkgocloud/ginkgocloudsearchdialog.h
@@ -0,0 +1,108 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+
+#include <api/autoptr.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/imodelointegracion.h>
+#include <api/observers/ieventsobserver.h>
+#include <commands/cloudcommand.h>
+#include "downloadcloudbase.h"
+#include <wx/dataview.h>
+#include <wx/checkbox.h>
+
+class wxAnimationCtrl;
+class wxDataViewListCtrl;
+class wxDataViewListStore;
+
+namespace GNC
+{
+namespace GCS
+{
+class CloudCommand;
+}
+
+namespace GUI
+{
+class GinkgoCloudSearchDialog: public GinkgoCloudSearchDialogBase, public GNC::GCS::IEventsObserver
+{
+public:
+        static GinkgoCloudSearchDialog* Instance();
+        static void FreeInstance();
+
+        GinkgoCloudSearchDialog(wxWindow* pParent);
+        ~GinkgoCloudSearchDialog();
+
+        virtual bool Show(bool show = true);
+
+        //---------------------------------------------------------------------------
+        //region Eventos de interfaz
+        virtual void OnKeyDownFormulario( wxKeyEvent& event );
+        virtual void OnFechaDesdeDateChanged( wxDateEvent& event );
+        virtual void OnFechaHastaDateChanged( wxDateEvent& event );
+        virtual void OnBusquedaClick( wxCommandEvent& event );
+        virtual void Search();
+        virtual void OnCancelClick( wxCommandEvent& event);
+        std::string GetModalities();
+        virtual void OnCloseClick( wxCommandEvent& event );
+        virtual void OnDescargarClick( wxCommandEvent& event);
+
+        virtual void OnDataSelChanged(wxDataViewEvent& evt);
+        virtual void OnDataItemActivated(wxDataViewEvent& evt);
+        virtual void OnDataItemMenu(wxDataViewEvent& evt);
+        //---------------------------------------------------------------------------
+        //region Helpers
+        void AddDescarga();
+        void ShowStudyLink();
+        void ShowAnimation(bool show);
+
+        void LimpiarBusquedas();
+        void LoadResults(const std::string& bucketId, const GNC::GCS::CloudFindCommandParams::Results& results);
+        //endregion
+
+        //---------------------------------------------------------------------------
+
+        //para enterarse si ha parado un comando...
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+        //
+
+
+private:
+        static GinkgoCloudSearchDialog* m_pInstance;
+        wxDataViewListCtrl* m_pResultsView;
+        wxObjectDataPtr<wxDataViewListStore> m_pResultsModel;
+
+        wxAnimationCtrl* m_pAnimation;
+
+        GNC::GCS::CloudCommand*           m_pCommand;
+        bool m_reverseOrder;
+
+
+        GNC::GCS::ILockable m_TreeListResultadosLocker; // Necesario para evitar problemas con el treelistcontrol.
+
+        typedef std::list<wxCheckBox*>  TModalitiesVector;
+        TModalitiesVector m_modalitiesList;
+
+};
+}
+}
diff --git a/cadxcore/main/gui/ginkgocloud/openginkgoclouddialog.cpp b/cadxcore/main/gui/ginkgocloud/openginkgoclouddialog.cpp
new file mode 100644
index 0000000..f78cf28
--- /dev/null
+++ b/cadxcore/main/gui/ginkgocloud/openginkgoclouddialog.cpp
@@ -0,0 +1,73 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "openginkgoclouddialog.h"
+#include <commands/cloudcommand.h>
+#include <main/controllers/commandcontroller.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <wx/msgdlg.h>
+
+GNC::GUI::OpenGinkgoCloudDialog::OpenGinkgoCloudDialog(wxWindow* pParent): GNC::GUI::OpenGinkgoCloudDialogBase(pParent)
+{
+        wxIcon icono;
+        icono.CopyFromBitmap(GinkgoResourcesManager::Logos::GetLogoGinkgo32x32());
+        this->SetIcon(icono);
+
+        m_pFileLink->SetFocus();
+}
+
+GNC::GUI::OpenGinkgoCloudDialog::~OpenGinkgoCloudDialog()
+{
+}
+
+void GNC::GUI::OpenGinkgoCloudDialog::OnAccept(wxCommandEvent &)
+{
+        wxString link = m_pFileLink->GetValue().Trim(true).Trim(false);
+        if (!link.StartsWith(wxT("ginkgocadx://cloud:"))) {
+                wxMessageBox(_("Invalid link"), wxT("Ginkgo Cloud"), wxICON_WARNING|wxOK);
+                return;
+        } else {
+                std::string stdLink(link.SubString(19, link.size()-1).ToUTF8());
+                //call to command
+                GNC::GCS::CloudGetCommandParams* pParams = new GNC::GCS::CloudGetCommandParams(stdLink, true);
+                GNC::GCS::CloudCommand* pCmd = new GNC::GCS::CloudCommand(pParams);
+                GNC::CommandController::Instance()->ProcessAsync("Downloading...", pCmd, NULL);
+                //
+                Close();
+        }
+}
+
+void GNC::GUI::OpenGinkgoCloudDialog::OnCancel(wxCommandEvent& )
+{
+        Close();
+}
+
+void GNC::GUI::OpenGinkgoCloudDialog::OnKeyUp(wxKeyEvent &evt)
+{
+        if (evt.GetKeyCode() == WXK_ESCAPE) {
+                Close();
+        } else if (evt.GetKeyCode() == WXK_NUMPAD_ENTER || evt.GetKeyCode() == WXK_RETURN) {
+                wxCommandEvent evt;
+                OnAccept(evt);
+        }
+        evt.Skip();
+}
diff --git a/cadxcore/main/gui/ginkgocloud/openginkgoclouddialog.h b/cadxcore/main/gui/ginkgocloud/openginkgoclouddialog.h
new file mode 100644
index 0000000..f3f7d0f
--- /dev/null
+++ b/cadxcore/main/gui/ginkgocloud/openginkgoclouddialog.h
@@ -0,0 +1,41 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "downloadcloudbase.h"
+
+namespace GNC
+{
+namespace GUI
+{
+
+class OpenGinkgoCloudDialog: public GNC::GUI::OpenGinkgoCloudDialogBase
+{
+public:
+        OpenGinkgoCloudDialog(wxWindow* pParent);
+        ~OpenGinkgoCloudDialog();
+
+protected:
+        virtual void OnCancel(wxCommandEvent& evt);
+        virtual void OnAccept(wxCommandEvent &evt);
+        virtual void OnKeyUp(wxKeyEvent &evt);
+};
+}
+}
diff --git a/cadxcore/main/gui/ginkgocloud/wxtreelistctrlcloud.h b/cadxcore/main/gui/ginkgocloud/wxtreelistctrlcloud.h
new file mode 100644
index 0000000..bdbb976
--- /dev/null
+++ b/cadxcore/main/gui/ginkgocloud/wxtreelistctrlcloud.h
@@ -0,0 +1,131 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <wx/intl.h>
+
+#include <wx/panel.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/combobox.h>
+#include <wx/srchctrl.h>
+#include <wx/sizer.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/treelist.h>
+#include <wx/link_additions.h>
+#include <wx/radiobut.h>
+#include <wx/datectrl.h>
+#include <wx/dateevt.h>
+#include <wx/statbox.h>
+#include <wx/gbsizer.h>
+#include <wx/button.h>
+#include <wx/grid.h>
+#include <wx/notebook.h>
+#include <wx/dialog.h>
+#include <wx/listbox.h>
+
+
+#define DESCRIPTION_COLUMN 0
+#define MODALITY_COLUMN 1
+#define CREATOR_USER_NAME_COLUMN 2
+#define LAST_MODIFICATOR_USER_NAME_COLUMN 3
+#define DATE_COLUMN 4
+#define URL_COLUMN 5
+#define BUCKET_ID_COLUMN 6
+
+
+class wxTreeListCtrlCloud : public wxTreeListCtrl
+{
+public:
+        wxTreeListCtrlCloud(wxWindow *parent, wxWindowID id = -1,
+                            const wxPoint& pos = wxDefaultPosition,
+                            const wxSize& size = wxDefaultSize,
+                            long style = wxTR_DEFAULT_STYLE,
+                            const wxValidator &validator = wxDefaultValidator,
+                            const wxString& name = wxTreeListCtrlNameStr )
+                : wxTreeListCtrl(parent, id, pos, size, style, validator, name)
+        {
+        }
+        ~wxTreeListCtrlCloud() {}
+
+        virtual int OnCompareItems (const wxTreeItemId& item1, const wxTreeItemId& item2)
+        {
+                wxTreeItemId root = GetRootItem();
+                if (item1.IsOk() && item2.IsOk()) {
+                        //alphabetically no case sensitive
+                        int descCompare =  GetItemText(item1).CompareTo(GetItemText(item2), wxString::ignoreCase);
+                        if (descCompare !=0) {
+                                return descCompare;
+                        } else {
+                                //date compare...
+                                wxDateTime date1,date2;
+                                date1.ParseFormat(GetItemText(item1, DATE_COLUMN), _("%m/%d/%Y %H:%M:%S"));
+                                date2.ParseFormat(GetItemText(item2, DATE_COLUMN), _("%m/%d/%Y %H:%M:%S"));
+                                if (date1.IsValid() && date2.IsValid()) {
+                                        wxTimeSpan diff = date1.Subtract(date2);
+                                        if (diff.IsPositive()) {
+                                                return 1;
+                                        } else {
+                                                return -1;
+                                        }
+                                } else {
+                                        return 0;
+                                }
+                        }
+                }
+                return wxTreeListCtrl::OnCompareItems(item1, item2);
+        }
+
+        virtual int OnCompareItems (const wxTreeItemId& item1, const wxTreeItemId& item2, int column)
+        {
+                wxTreeItemId root = GetRootItem();
+                if (item1.IsOk() && item2.IsOk() && column == DATE_COLUMN) {
+                        if (GetItemParent(item1) == root && GetItemParent(item2) == root) {
+                                //first case patient level:
+                                //alphabetically no case sensitive
+                                return wxTreeListCtrl::OnCompareItems(item1, item2, column);
+                        } else {
+                                //study and series level
+                                //date compare...
+                                wxDateTime date1,date2;
+                                date1.ParseFormat(GetItemText(item1, DATE_COLUMN), _("%m/%d/%Y %H:%M:%S"));
+                                date2.ParseFormat(GetItemText(item2, DATE_COLUMN), _("%m/%d/%Y %H:%M:%S"));
+                                if (date1.IsValid() && date2.IsValid()) {
+                                        wxTimeSpan diff = date1.Subtract(date2);
+                                        if (diff.IsPositive()) {
+                                                return 1;
+                                        } else {
+                                                return -1;
+                                        }
+                                } else {
+                                        return 0;
+                                }
+                        }
+                }
+                return wxTreeListCtrl::OnCompareItems(item1, item2, column);
+        }
+};
diff --git a/cadxcore/main/gui/history3/HistoryPanel3.fbp b/cadxcore/main/gui/history3/HistoryPanel3.fbp
new file mode 100644
index 0000000..e81e370
--- /dev/null
+++ b/cadxcore/main/gui/history3/HistoryPanel3.fbp
@@ -0,0 +1,4108 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration"></property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">historypanel3base</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">HistoryPanel3</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Frame" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">800,600</property>
+            <property name="name">HistoryPanel3Base</property>
+            <property name="pos"></property>
+            <property name="size">800,600</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Medical history</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <property name="xrc_skip_sizer">1</property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose">OnClose</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle">OnHistoryPanelIdle</event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxMenuBar" expanded="0">
+                <property name="bg"></property>
+                <property name="context_help"></property>
+                <property name="context_menu">1</property>
+                <property name="enabled">1</property>
+                <property name="fg"></property>
+                <property name="font"></property>
+                <property name="hidden">0</property>
+                <property name="id">wxID_ANY</property>
+                <property name="label"></property>
+                <property name="maximum_size"></property>
+                <property name="minimum_size"></property>
+                <property name="name">m_pMenuBar</property>
+                <property name="permission">public</property>
+                <property name="pos"></property>
+                <property name="size"></property>
+                <property name="style"></property>
+                <property name="subclass"></property>
+                <property name="tooltip"></property>
+                <property name="window_extra_style"></property>
+                <property name="window_name"></property>
+                <property name="window_style"></property>
+                <event name="OnChar"></event>
+                <event name="OnEnterWindow"></event>
+                <event name="OnEraseBackground"></event>
+                <event name="OnKeyDown"></event>
+                <event name="OnKeyUp"></event>
+                <event name="OnKillFocus"></event>
+                <event name="OnLeaveWindow"></event>
+                <event name="OnLeftDClick"></event>
+                <event name="OnLeftDown"></event>
+                <event name="OnLeftUp"></event>
+                <event name="OnMiddleDClick"></event>
+                <event name="OnMiddleDown"></event>
+                <event name="OnMiddleUp"></event>
+                <event name="OnMotion"></event>
+                <event name="OnMouseEvents"></event>
+                <event name="OnMouseWheel"></event>
+                <event name="OnPaint"></event>
+                <event name="OnRightDClick"></event>
+                <event name="OnRightDown"></event>
+                <event name="OnRightUp"></event>
+                <event name="OnSetFocus"></event>
+                <event name="OnSize"></event>
+                <event name="OnUpdateUI"></event>
+            </object>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxBoxSizer" expanded="0">
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pSizerToolBar</property>
+                        <property name="orient">wxVERTICAL</property>
+                        <property name="permission">protected</property>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size">-1,-1</property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSearchPanel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer20</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxFlexGridSizer" expanded="1">
+                                    <property name="cols">1</property>
+                                    <property name="flexible_direction">wxBOTH</property>
+                                    <property name="growablecols">0</property>
+                                    <property name="growablerows">0,1</property>
+                                    <property name="hgap">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pSizerCamposBusqueda</property>
+                                    <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                    <property name="permission">none</property>
+                                    <property name="rows">2</property>
+                                    <property name="vgap">0</property>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">2</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxBoxSizer" expanded="0">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">m_pPatientSearchSizer</property>
+                                            <property name="orient">wxHORIZONTAL</property>
+                                            <property name="permission">none</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxEXPAND</property>
+                                                <property name="proportion">1</property>
+                                                <object class="wxBoxSizer" expanded="0">
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">bSizer33</property>
+                                                    <property name="orient">wxHORIZONTAL</property>
+                                                    <property name="permission">none</property>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxStaticText" expanded="0">
+                                                            <property name="BottomDockable">1</property>
+                                                            <property name="LeftDockable">1</property>
+                                                            <property name="RightDockable">1</property>
+                                                            <property name="TopDockable">1</property>
+                                                            <property name="aui_layer"></property>
+                                                            <property name="aui_name"></property>
+                                                            <property name="aui_position"></property>
+                                                            <property name="aui_row"></property>
+                                                            <property name="best_size"></property>
+                                                            <property name="bg"></property>
+                                                            <property name="caption"></property>
+                                                            <property name="caption_visible">1</property>
+                                                            <property name="center_pane">0</property>
+                                                            <property name="close_button">1</property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default_pane">0</property>
+                                                            <property name="dock">Dock</property>
+                                                            <property name="dock_fixed">0</property>
+                                                            <property name="docking">Left</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="floatable">1</property>
+                                                            <property name="font">,90,92,-1,70,0</property>
+                                                            <property name="gripper">0</property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="label">Patient</property>
+                                                            <property name="max_size"></property>
+                                                            <property name="maximize_button">0</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="min_size"></property>
+                                                            <property name="minimize_button">0</property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="moveable">1</property>
+                                                            <property name="name">m_pPatientLabelStr</property>
+                                                            <property name="pane_border">1</property>
+                                                            <property name="pane_position"></property>
+                                                            <property name="pane_size"></property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pin_button">1</property>
+                                                            <property name="pos"></property>
+                                                            <property name="resize">Resizable</property>
+                                                            <property name="show">1</property>
+                                                            <property name="size"></property>
+                                                            <property name="style"></property>
+                                                            <property name="subclass"></property>
+                                                            <property name="toolbar_pane">0</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <property name="wrap">-1</property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="1">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALL|wxEXPAND</property>
+                                                        <property name="proportion">1</property>
+                                                        <object class="wxComboBox" expanded="1">
+                                                            <property name="BottomDockable">1</property>
+                                                            <property name="LeftDockable">1</property>
+                                                            <property name="RightDockable">1</property>
+                                                            <property name="TopDockable">1</property>
+                                                            <property name="aui_layer"></property>
+                                                            <property name="aui_name"></property>
+                                                            <property name="aui_position"></property>
+                                                            <property name="aui_row"></property>
+                                                            <property name="best_size"></property>
+                                                            <property name="bg"></property>
+                                                            <property name="caption"></property>
+                                                            <property name="caption_visible">1</property>
+                                                            <property name="center_pane">0</property>
+                                                            <property name="choices"></property>
+                                                            <property name="close_button">1</property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default_pane">0</property>
+                                                            <property name="dock">Dock</property>
+                                                            <property name="dock_fixed">0</property>
+                                                            <property name="docking">Left</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="floatable">1</property>
+                                                            <property name="font"></property>
+                                                            <property name="gripper">0</property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="max_size"></property>
+                                                            <property name="maximize_button">0</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="min_size"></property>
+                                                            <property name="minimize_button">0</property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="moveable">1</property>
+                                                            <property name="name">m_pPatientCombo</property>
+                                                            <property name="pane_border">1</property>
+                                                            <property name="pane_position"></property>
+                                                            <property name="pane_size"></property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pin_button">1</property>
+                                                            <property name="pos"></property>
+                                                            <property name="resize">Resizable</property>
+                                                            <property name="selection">-1</property>
+                                                            <property name="show">1</property>
+                                                            <property name="size"></property>
+                                                            <property name="style"></property>
+                                                            <property name="subclass"></property>
+                                                            <property name="toolbar_pane">0</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="validator_data_type"></property>
+                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                            <property name="validator_variable"></property>
+                                                            <property name="value"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnCombobox"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnText"></event>
+                                                            <event name="OnTextEnter"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALL</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxToggleButton" expanded="0">
+                                                            <property name="BottomDockable">1</property>
+                                                            <property name="LeftDockable">1</property>
+                                                            <property name="RightDockable">1</property>
+                                                            <property name="TopDockable">1</property>
+                                                            <property name="aui_layer"></property>
+                                                            <property name="aui_name"></property>
+                                                            <property name="aui_position"></property>
+                                                            <property name="aui_row"></property>
+                                                            <property name="best_size"></property>
+                                                            <property name="bg"></property>
+                                                            <property name="caption"></property>
+                                                            <property name="caption_visible">1</property>
+                                                            <property name="center_pane">0</property>
+                                                            <property name="close_button">1</property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default_pane">0</property>
+                                                            <property name="dock">Dock</property>
+                                                            <property name="dock_fixed">0</property>
+                                                            <property name="docking">Left</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="floatable">1</property>
+                                                            <property name="font"></property>
+                                                            <property name="gripper">0</property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="label">Advanced search</property>
+                                                            <property name="max_size"></property>
+                                                            <property name="maximize_button">0</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="min_size"></property>
+                                                            <property name="minimize_button">0</property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="moveable">1</property>
+                                                            <property name="name">m_pAdvancedSearchButton</property>
+                                                            <property name="pane_border">1</property>
+                                                            <property name="pane_position"></property>
+                                                            <property name="pane_size"></property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pin_button">1</property>
+                                                            <property name="pos"></property>
+                                                            <property name="resize">Resizable</property>
+                                                            <property name="show">1</property>
+                                                            <property name="size"></property>
+                                                            <property name="subclass"></property>
+                                                            <property name="toolbar_pane">0</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="validator_data_type"></property>
+                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                            <property name="validator_variable"></property>
+                                                            <property name="value">0</property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnToggleButton">OnAdvancedSearchToggled</event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND | wxALL</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">1</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pAdvancedSearchPanel</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                            <object class="wxBoxSizer" expanded="0">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pAdvancedSearchSizer</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND|wxRIGHT</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxStaticBoxSizer" expanded="0">
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Acquisition date</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">sbSizer2</property>
+                                                        <property name="orient">wxVERTICAL</property>
+                                                        <property name="permission">none</property>
+                                                        <event name="OnUpdateUI"></event>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxEXPAND|wxALL</property>
+                                                            <property name="proportion">1</property>
+                                                            <object class="wxBoxSizer" expanded="0">
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">bSizer17</property>
+                                                                <property name="orient">wxHORIZONTAL</property>
+                                                                <property name="permission">none</property>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND</property>
+                                                                    <property name="proportion">1</property>
+                                                                    <object class="wxBoxSizer" expanded="0">
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">bSizer181</property>
+                                                                        <property name="orient">wxVERTICAL</property>
+                                                                        <property name="permission">none</property>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Any date</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pAnyDate</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style">wxRB_GROUP</property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">1</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton">OnSearchChange</event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Today AM</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pTodayAM</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown">OnKeyDownFormulario</event>
+                                                                                <event name="OnKeyUp"></event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton">OnSearchChange</event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Today PM</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pTodayPM</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton">OnSearchChange</event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Today</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pToday</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton">OnSearchChange</event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND</property>
+                                                                    <property name="proportion">1</property>
+                                                                    <object class="wxBoxSizer" expanded="0">
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">bSizer29</property>
+                                                                        <property name="orient">wxVERTICAL</property>
+                                                                        <property name="permission">none</property>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Yesterday</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pYesterday</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton">OnSearchChange</event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Last 7 days</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pLastWeek</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton">OnSearchChange</event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Last 30 days</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pLastMonth</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton">OnSearchChange</event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Last 3 months</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pLastThreeMonths</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton">OnSearchChange</event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxEXPAND</property>
+                                                                    <property name="proportion">0</property>
+                                                                    <object class="wxBoxSizer" expanded="0">
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">bSizer201</property>
+                                                                        <property name="orient">wxVERTICAL</property>
+                                                                        <property name="permission">none</property>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">2</property>
+                                                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxRadioButton" expanded="0">
+                                                                                <property name="BottomDockable">1</property>
+                                                                                <property name="LeftDockable">1</property>
+                                                                                <property name="RightDockable">1</property>
+                                                                                <property name="TopDockable">1</property>
+                                                                                <property name="aui_layer"></property>
+                                                                                <property name="aui_name"></property>
+                                                                                <property name="aui_position"></property>
+                                                                                <property name="aui_row"></property>
+                                                                                <property name="best_size"></property>
+                                                                                <property name="bg"></property>
+                                                                                <property name="caption"></property>
+                                                                                <property name="caption_visible">1</property>
+                                                                                <property name="center_pane">0</property>
+                                                                                <property name="close_button">1</property>
+                                                                                <property name="context_help"></property>
+                                                                                <property name="context_menu">1</property>
+                                                                                <property name="default_pane">0</property>
+                                                                                <property name="dock">Dock</property>
+                                                                                <property name="dock_fixed">0</property>
+                                                                                <property name="docking">Left</property>
+                                                                                <property name="enabled">1</property>
+                                                                                <property name="fg"></property>
+                                                                                <property name="floatable">1</property>
+                                                                                <property name="font"></property>
+                                                                                <property name="gripper">0</property>
+                                                                                <property name="hidden">0</property>
+                                                                                <property name="id">wxID_ANY</property>
+                                                                                <property name="label">Between:</property>
+                                                                                <property name="max_size"></property>
+                                                                                <property name="maximize_button">0</property>
+                                                                                <property name="maximum_size"></property>
+                                                                                <property name="min_size"></property>
+                                                                                <property name="minimize_button">0</property>
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="moveable">1</property>
+                                                                                <property name="name">m_pBetween</property>
+                                                                                <property name="pane_border">1</property>
+                                                                                <property name="pane_position"></property>
+                                                                                <property name="pane_size"></property>
+                                                                                <property name="permission">protected</property>
+                                                                                <property name="pin_button">1</property>
+                                                                                <property name="pos"></property>
+                                                                                <property name="resize">Resizable</property>
+                                                                                <property name="show">1</property>
+                                                                                <property name="size"></property>
+                                                                                <property name="style"></property>
+                                                                                <property name="subclass"></property>
+                                                                                <property name="toolbar_pane">0</property>
+                                                                                <property name="tooltip"></property>
+                                                                                <property name="validator_data_type"></property>
+                                                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                                                <property name="validator_type">wxDefaultValidator</property>
+                                                                                <property name="validator_variable"></property>
+                                                                                <property name="value">0</property>
+                                                                                <property name="window_extra_style"></property>
+                                                                                <property name="window_name"></property>
+                                                                                <property name="window_style"></property>
+                                                                                <event name="OnChar"></event>
+                                                                                <event name="OnEnterWindow"></event>
+                                                                                <event name="OnEraseBackground"></event>
+                                                                                <event name="OnKeyDown"></event>
+                                                                                <event name="OnKeyUp">OnKeyDownFormulario</event>
+                                                                                <event name="OnKillFocus"></event>
+                                                                                <event name="OnLeaveWindow"></event>
+                                                                                <event name="OnLeftDClick"></event>
+                                                                                <event name="OnLeftDown"></event>
+                                                                                <event name="OnLeftUp"></event>
+                                                                                <event name="OnMiddleDClick"></event>
+                                                                                <event name="OnMiddleDown"></event>
+                                                                                <event name="OnMiddleUp"></event>
+                                                                                <event name="OnMotion"></event>
+                                                                                <event name="OnMouseEvents"></event>
+                                                                                <event name="OnMouseWheel"></event>
+                                                                                <event name="OnPaint"></event>
+                                                                                <event name="OnRadioButton">OnSearchChange</event>
+                                                                                <event name="OnRightDClick"></event>
+                                                                                <event name="OnRightDown"></event>
+                                                                                <event name="OnRightUp"></event>
+                                                                                <event name="OnSetFocus"></event>
+                                                                                <event name="OnSize"></event>
+                                                                                <event name="OnUpdateUI"></event>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">5</property>
+                                                                            <property name="flag">wxEXPAND|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxBoxSizer" expanded="0">
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="name">bSizer21</property>
+                                                                                <property name="orient">wxVERTICAL</property>
+                                                                                <property name="permission">none</property>
+                                                                                <object class="sizeritem" expanded="0">
+                                                                                    <property name="border">2</property>
+                                                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                                                    <property name="proportion">0</property>
+                                                                                    <object class="wxDatePickerCtrl" expanded="0">
+                                                                                        <property name="BottomDockable">1</property>
+                                                                                        <property name="LeftDockable">1</property>
+                                                                                        <property name="RightDockable">1</property>
+                                                                                        <property name="TopDockable">1</property>
+                                                                                        <property name="aui_layer"></property>
+                                                                                        <property name="aui_name"></property>
+                                                                                        <property name="aui_position"></property>
+                                                                                        <property name="aui_row"></property>
+                                                                                        <property name="best_size"></property>
+                                                                                        <property name="bg"></property>
+                                                                                        <property name="caption"></property>
+                                                                                        <property name="caption_visible">1</property>
+                                                                                        <property name="center_pane">0</property>
+                                                                                        <property name="close_button">1</property>
+                                                                                        <property name="context_help"></property>
+                                                                                        <property name="context_menu">1</property>
+                                                                                        <property name="default_pane">0</property>
+                                                                                        <property name="dock">Dock</property>
+                                                                                        <property name="dock_fixed">0</property>
+                                                                                        <property name="docking">Left</property>
+                                                                                        <property name="enabled">1</property>
+                                                                                        <property name="fg"></property>
+                                                                                        <property name="floatable">1</property>
+                                                                                        <property name="font"></property>
+                                                                                        <property name="gripper">0</property>
+                                                                                        <property name="hidden">0</property>
+                                                                                        <property name="id">wxID_ANY</property>
+                                                                                        <property name="max_size"></property>
+                                                                                        <property name="maximize_button">0</property>
+                                                                                        <property name="maximum_size"></property>
+                                                                                        <property name="min_size"></property>
+                                                                                        <property name="minimize_button">0</property>
+                                                                                        <property name="minimum_size"></property>
+                                                                                        <property name="moveable">1</property>
+                                                                                        <property name="name">m_pTextControlFechaDesde</property>
+                                                                                        <property name="pane_border">1</property>
+                                                                                        <property name="pane_position"></property>
+                                                                                        <property name="pane_size"></property>
+                                                                                        <property name="permission">protected</property>
+                                                                                        <property name="pin_button">1</property>
+                                                                                        <property name="pos"></property>
+                                                                                        <property name="resize">Resizable</property>
+                                                                                        <property name="show">1</property>
+                                                                                        <property name="size"></property>
+                                                                                        <property name="style">wxDP_DEFAULT|wxDP_DROPDOWN</property>
+                                                                                        <property name="subclass"></property>
+                                                                                        <property name="toolbar_pane">0</property>
+                                                                                        <property name="tooltip"></property>
+                                                                                        <property name="validator_data_type"></property>
+                                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                                        <property name="validator_variable"></property>
+                                                                                        <property name="window_extra_style"></property>
+                                                                                        <property name="window_name"></property>
+                                                                                        <property name="window_style"></property>
+                                                                                        <event name="OnChar"></event>
+                                                                                        <event name="OnDateChanged">OnDateChanged</event>
+                                                                                        <event name="OnEnterWindow"></event>
+                                                                                        <event name="OnEraseBackground"></event>
+                                                                                        <event name="OnKeyDown">OnKeyDownFormulario</event>
+                                                                                        <event name="OnKeyUp"></event>
+                                                                                        <event name="OnKillFocus"></event>
+                                                                                        <event name="OnLeaveWindow"></event>
+                                                                                        <event name="OnLeftDClick"></event>
+                                                                                        <event name="OnLeftDown"></event>
+                                                                                        <event name="OnLeftUp"></event>
+                                                                                        <event name="OnMiddleDClick"></event>
+                                                                                        <event name="OnMiddleDown"></event>
+                                                                                        <event name="OnMiddleUp"></event>
+                                                                                        <event name="OnMotion"></event>
+                                                                                        <event name="OnMouseEvents"></event>
+                                                                                        <event name="OnMouseWheel"></event>
+                                                                                        <event name="OnPaint"></event>
+                                                                                        <event name="OnRightDClick"></event>
+                                                                                        <event name="OnRightDown"></event>
+                                                                                        <event name="OnRightUp"></event>
+                                                                                        <event name="OnSetFocus"></event>
+                                                                                        <event name="OnSize"></event>
+                                                                                        <event name="OnUpdateUI"></event>
+                                                                                    </object>
+                                                                                </object>
+                                                                            </object>
+                                                                        </object>
+                                                                        <object class="sizeritem" expanded="0">
+                                                                            <property name="border">5</property>
+                                                                            <property name="flag">wxEXPAND|wxLEFT</property>
+                                                                            <property name="proportion">0</property>
+                                                                            <object class="wxBoxSizer" expanded="0">
+                                                                                <property name="minimum_size"></property>
+                                                                                <property name="name">bSizer22</property>
+                                                                                <property name="orient">wxVERTICAL</property>
+                                                                                <property name="permission">none</property>
+                                                                                <object class="sizeritem" expanded="0">
+                                                                                    <property name="border">2</property>
+                                                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                                                    <property name="proportion">0</property>
+                                                                                    <object class="wxDatePickerCtrl" expanded="0">
+                                                                                        <property name="BottomDockable">1</property>
+                                                                                        <property name="LeftDockable">1</property>
+                                                                                        <property name="RightDockable">1</property>
+                                                                                        <property name="TopDockable">1</property>
+                                                                                        <property name="aui_layer"></property>
+                                                                                        <property name="aui_name"></property>
+                                                                                        <property name="aui_position"></property>
+                                                                                        <property name="aui_row"></property>
+                                                                                        <property name="best_size"></property>
+                                                                                        <property name="bg"></property>
+                                                                                        <property name="caption"></property>
+                                                                                        <property name="caption_visible">1</property>
+                                                                                        <property name="center_pane">0</property>
+                                                                                        <property name="close_button">1</property>
+                                                                                        <property name="context_help"></property>
+                                                                                        <property name="context_menu">1</property>
+                                                                                        <property name="default_pane">0</property>
+                                                                                        <property name="dock">Dock</property>
+                                                                                        <property name="dock_fixed">0</property>
+                                                                                        <property name="docking">Left</property>
+                                                                                        <property name="enabled">1</property>
+                                                                                        <property name="fg"></property>
+                                                                                        <property name="floatable">1</property>
+                                                                                        <property name="font"></property>
+                                                                                        <property name="gripper">0</property>
+                                                                                        <property name="hidden">0</property>
+                                                                                        <property name="id">wxID_ANY</property>
+                                                                                        <property name="max_size"></property>
+                                                                                        <property name="maximize_button">0</property>
+                                                                                        <property name="maximum_size"></property>
+                                                                                        <property name="min_size"></property>
+                                                                                        <property name="minimize_button">0</property>
+                                                                                        <property name="minimum_size"></property>
+                                                                                        <property name="moveable">1</property>
+                                                                                        <property name="name">m_pTextControlFechaHasta</property>
+                                                                                        <property name="pane_border">1</property>
+                                                                                        <property name="pane_position"></property>
+                                                                                        <property name="pane_size"></property>
+                                                                                        <property name="permission">protected</property>
+                                                                                        <property name="pin_button">1</property>
+                                                                                        <property name="pos"></property>
+                                                                                        <property name="resize">Resizable</property>
+                                                                                        <property name="show">1</property>
+                                                                                        <property name="size"></property>
+                                                                                        <property name="style">wxDP_DEFAULT|wxDP_DROPDOWN</property>
+                                                                                        <property name="subclass"></property>
+                                                                                        <property name="toolbar_pane">0</property>
+                                                                                        <property name="tooltip"></property>
+                                                                                        <property name="validator_data_type"></property>
+                                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                                        <property name="validator_variable"></property>
+                                                                                        <property name="window_extra_style"></property>
+                                                                                        <property name="window_name"></property>
+                                                                                        <property name="window_style"></property>
+                                                                                        <event name="OnChar"></event>
+                                                                                        <event name="OnDateChanged">OnDateChanged</event>
+                                                                                        <event name="OnEnterWindow"></event>
+                                                                                        <event name="OnEraseBackground"></event>
+                                                                                        <event name="OnKeyDown">OnKeyDownFormulario</event>
+                                                                                        <event name="OnKeyUp"></event>
+                                                                                        <event name="OnKillFocus"></event>
+                                                                                        <event name="OnLeaveWindow"></event>
+                                                                                        <event name="OnLeftDClick"></event>
+                                                                                        <event name="OnLeftDown"></event>
+                                                                                        <event name="OnLeftUp"></event>
+                                                                                        <event name="OnMiddleDClick"></event>
+                                                                                        <event name="OnMiddleDown"></event>
+                                                                                        <event name="OnMiddleUp"></event>
+                                                                                        <event name="OnMotion"></event>
+                                                                                        <event name="OnMouseEvents"></event>
+                                                                                        <event name="OnMouseWheel"></event>
+                                                                                        <event name="OnPaint"></event>
+                                                                                        <event name="OnRightDClick"></event>
+                                                                                        <event name="OnRightDown"></event>
+                                                                                        <event name="OnRightUp"></event>
+                                                                                        <event name="OnSetFocus"></event>
+                                                                                        <event name="OnSize"></event>
+                                                                                        <event name="OnUpdateUI"></event>
+                                                                                    </object>
+                                                                                </object>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxEXPAND|wxLEFT</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxStaticBoxSizer" expanded="0">
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Modalities</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">sbSizer3</property>
+                                                        <property name="orient">wxVERTICAL</property>
+                                                        <property name="permission">none</property>
+                                                        <event name="OnUpdateUI"></event>
+                                                        <object class="sizeritem" expanded="0">
+                                                            <property name="border">5</property>
+                                                            <property name="flag">wxEXPAND|wxALL</property>
+                                                            <property name="proportion">1</property>
+                                                            <object class="wxGridSizer" expanded="0">
+                                                                <property name="cols">5</property>
+                                                                <property name="hgap">0</property>
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">m_pModalitySizer</property>
+                                                                <property name="permission">protected</property>
+                                                                <property name="rows">5</property>
+                                                                <property name="vgap">0</property>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxSplitterWindow" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_pane_size">20</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_splitter1</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="sashgravity">0.0</property>
+                        <property name="sashpos">0</property>
+                        <property name="sashsize">-1</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="splitmode">wxSPLIT_HORIZONTAL</property>
+                        <property name="style">wxSP_3D</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnSplitterDClick"></event>
+                        <event name="OnSplitterSashPosChanged"></event>
+                        <event name="OnSplitterSashPosChanging"></event>
+                        <event name="OnSplitterUnsplit"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="splitteritem" expanded="1">
+                            <object class="wxPanel" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size">-1,100</property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pPanelResults</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="1">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pTreeListSizer</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">protected</property>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="splitteritem" expanded="1">
+                            <object class="wxPanel" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size">-1,100</property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pPanelPreviews</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="1">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer71</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">20</property>
+                                        <object class="CustomControl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="class">wxThumbnailCtrl</property>
+                                            <property name="close_button">1</property>
+                                            <property name="construction">m_pThumbnails = new wxThumbnailCtrl(m_pPanelPreviews, -1, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL|wxTH_MULTIPLE_SELECT);&#x0A;</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="declaration">wxThumbnailCtrl* m_pThumbnails;</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="include">#include <wx/thumbnailctrl/thumbnailctrl.h></property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pThumbnails</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="settings"></property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">18</property>
+                                        <object class="CustomControl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="class">vtkSmartPointer<wxVTKRenderWindowInteractor></property>
+                                            <property name="close_button">1</property>
+                                            <property name="construction">ViewInteractor2D  = new wxVTKRenderWindowInteractor(m_pPanelPreviews, wxID_ANY,&#x0A;                                                          wxDefaultPosition,&#x0A;                                                          wxDefaultSize,&#x0A;                                                          wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,&#x0A;                                                          wxT(" [...]
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="declaration">vtkSmartPointer<wxVTKRenderWindowInteractor> ViewInteractor2D;&#x0A;vtkSmartPointer<vtkGinkgoImageViewer> ViewImage2D;</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="include">#undef __DEPRECATED&#x0A;#include <vtkRenderer.h>&#x0A;#include <vtkSmartPointer.h>&#x0A;#include <wxVTKRenderWindowInteractor.h>&#x0A;#include <vtk/vtkginkgoimageviewer.h></property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">ViewInteractor2D</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="settings"></property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">18</property>
+                                        <object class="wxPanel" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg">0,0,0</property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">1</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pHideInteractorPanel</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">550,220</property>
+            <property name="name">ConfirmDeleteDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Confirm removal</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer5</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_body</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer22</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pTitled</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Confirm removal</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer23</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="spacer" expanded="1">
+                                                <property name="height">0</property>
+                                                <property name="permission">protected</property>
+                                                <property name="width">0</property>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Are you sure you want to delete </property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabelEliminar</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">450</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="spacer" expanded="1">
+                                                <property name="height">0</property>
+                                                <property name="permission">protected</property>
+                                                <property name="width">0</property>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Remove</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pEliminar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnEliminarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pCancelar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCancelarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">500,350</property>
+            <property name="name">OpenWithDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Open With ...</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer2</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer15</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelTitulo</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Choose the view you want to use to open file/s</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer16</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxListBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="choices"></property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pListaVistas</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxLB_SINGLE</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnListBox"></event>
+                                                <event name="OnListBoxDClick">OnAceptarClick</event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxTOP</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="checked">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Always use this view to open these files</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pCheckUtilizarSiempre</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCheckBox"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer3</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button3</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnAceptarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button4</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">520,250</property>
+            <property name="name">SynchronizeDialogBase</property>
+            <property name="pos"></property>
+            <property name="size"></property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Synchronize files</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer15</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelMessage</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Synchronize files</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer4</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">There are files that has to be downloaded to local database before executing this action, &#x0A;do you want to synchornize files now?</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabel</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer16</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="1">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Synchronize</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button4</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnSynchronize</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button5</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/history3/confirmdeletedialog.h b/cadxcore/main/gui/history3/confirmdeletedialog.h
new file mode 100644
index 0000000..77d7bfb
--- /dev/null
+++ b/cadxcore/main/gui/history3/confirmdeletedialog.h
@@ -0,0 +1,58 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "historypanel3base.h"
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+//----------DIALOGO CONFIRMAR ELIMINAR...-------------
+namespace GNC
+{
+namespace GUI
+{
+class ConfirmDeleteDialog:public ConfirmDeleteDialogBase
+{
+public:
+        ConfirmDeleteDialog(wxWindow* parent, const wxString& label):ConfirmDeleteDialogBase(parent)
+        {
+                m_pLabelEliminar->SetLabel(m_pLabelEliminar->GetLabel() + label + _(" from History?"));
+                m_pTitled->Layout();
+                m_body->Layout();
+                Layout();
+        };
+
+        ~ConfirmDeleteDialog()
+        {
+        };
+
+        void OnEliminarClick(wxCommandEvent &)
+        {
+                EndModal(wxOK);
+        }
+
+        void OnCancelarClick(wxCommandEvent &)
+        {
+                EndModal(wxCANCEL);
+        }
+
+protected:
+};
+};
+};
diff --git a/cadxcore/main/gui/history3/historypanel3.cpp b/cadxcore/main/gui/history3/historypanel3.cpp
new file mode 100644
index 0000000..5482a31
--- /dev/null
+++ b/cadxcore/main/gui/history3/historypanel3.cpp
@@ -0,0 +1,1258 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+
+#include <api/globals.h>
+#include <api/ilock.h>
+#include <set>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <wx/aui/aui.h>
+
+#include "historypanel3.h"
+#include "wxhistoryimagethumbnail.h"
+#include "historytablemodel.h"
+#include "historytoolmenu.h"
+#include "confirmdeletedialog.h"
+#include "openwithdialog.h"
+
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/entorno.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladorenviohl7.h>
+#include <main/controllers/streaming/streamingloader.h>
+#include <main/controllers/integrationcontroller.h>
+#include <main/controllers/hangingprotocolcontroller.h>
+#include <main/controllers/windowattributescontroller.h>
+
+#include <commands/comandoincluirhistorial.h>
+#include <commands/synchronizationcommand.h>
+
+#include <main/gui/import/wxwizardimportacionginkgo.h>
+#include <main/gui/acquisition/dialogoadquisicion.h>
+#include <main/gui/progress/statusbarprogreso.h>
+
+#include <api/dicom/idicommanager.h>
+#include <export/tagsprivadoscomunes.h>
+
+#include <commands/openremovableunit.h>
+#include <commands/sendpacscommand.h>
+
+#include <eventos/progresocomando.h>
+
+#include <vtkImageData.h>
+#include <vtkUnsignedCharArray.h>
+#include <vtkPointData.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <wxVTKRenderWindowInteractor.h>
+#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
+#include <main/gui/droptargetmainwindow.h>
+
+#include <main/controllers/anonusagestats.h>
+
+#define SIZE_THUMBNAILS 76
+#define HISTORY_WINDOW_ID "GinkgoCADxHistory"
+
+
+
+//////////////////////////////////////////////////////////////////////////
+namespace GNC
+{
+namespace GUI
+{
+class ReloadHistoryTimer:public wxTimer
+{
+public:
+        ReloadHistoryTimer(HistoryPanel3* pHistory)
+        {
+                m_pHistory = pHistory;
+        }
+
+        ~ReloadHistoryTimer()
+        {
+                m_pHistory=NULL;
+        }
+
+        virtual void Notify()
+        {
+                m_pHistory->RefreshSearch(true);
+        }
+
+        HistoryPanel3* m_pHistory;
+};
+///////////////////////////////////////////////////////////////////////////////////////////////////////
+class wxPatientData: public wxClientData
+{
+public:
+        wxPatientData(const GNC::GCS::HistoryController::PatientModel& patientModel):wxClientData()
+        {
+                m_PatientModel = patientModel;
+        }
+        ~wxPatientData()
+        {
+        }
+        GNC::GCS::HistoryController::PatientModel m_PatientModel;
+};
+
+///////////////////////////////////////////////
+class wxPopUpMenuThumbnails: public wxMenu
+{
+public:
+        wxPopUpMenuThumbnails(GNC::GUI::HistoryPanel3* historyPanel, long seriesPk) :wxMenu(),
+                SeriesPk(seriesPk),
+                HistoryPanel(historyPanel)
+        {
+                if (seriesPk != -1) {
+                        wxMenuItem* pItem = Append(wxID_ANY, _("Open Series"));
+                        Connect(pItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxPopUpMenuThumbnails::OnOpenMenu), NULL, this);
+                        pItem = Append(wxID_ANY, _("Open Series with .."));
+                        Connect(pItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxPopUpMenuThumbnails::OnOpenWithMenu), NULL, this);
+                        AppendSeparator();
+                }
+
+                GNC::HistoryToolsController::Instance()->AppendsToolInMenu(this, this, GNC::GCS::IHistoryTool::TFamily_Open);
+                if (GetMenuItemCount() > 0 && !GetMenuItems().back()->IsSeparator()) {
+                        AppendSeparator();
+                }
+                GNC::HistoryToolsController::Instance()->AppendsToolInMenu(this, this, GNC::GCS::IHistoryTool::TFamily_Q_R);
+                if (GetMenuItemCount() > 0 && !GetMenuItems().back()->IsSeparator()) {
+                        AppendSeparator();
+                }
+                GNC::HistoryToolsController::Instance()->AppendsToolInMenu(this, this, GNC::GCS::IHistoryTool::TFamily_Dicomize);
+        }
+        ~wxPopUpMenuThumbnails()
+        {
+                Disconnect(wxID_ANY,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( wxPopUpMenuThumbnails::OnOpenMenu),NULL,this);
+                Disconnect(wxID_ANY,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( wxPopUpMenuThumbnails::OnOpenWithMenu),NULL,this);
+        }
+
+        void OnOpenMenu(wxCommandEvent& )
+        {
+                HistoryPanel->OpenSeriesOrStudy(SeriesPk, true,!GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "reutilize_study"));
+        }
+
+        void OnOpenWithMenu(wxCommandEvent& )
+        {
+                HistoryPanel->OpenSeriesOrStudyWith(SeriesPk, true);
+        }
+
+        long SeriesPk;
+        GNC::GUI::HistoryPanel3* HistoryPanel;
+};
+
+}
+}
+
+//---------------------------------------------------------------------------
+
+GNC::GUI::HistoryPanel3* GNC::GUI::HistoryPanel3::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new HistoryPanel3(GNC::Entorno::Instance()->GetVentanaRaiz());
+        }
+        return m_pInstance;
+}
+
+void GNC::GUI::HistoryPanel3::FreeInstance()
+{
+        if(m_pInstance!=NULL) {
+                m_pInstance->Close();
+                m_pInstance = NULL;
+        }
+}
+
+GNC::GUI::HistoryPanel3* GNC::GUI::HistoryPanel3::m_pInstance = NULL;
+
+
+GNC::GUI::HistoryPanel3::HistoryPanel3(wxWindow* pParent) : HistoryPanel3Base(pParent), Loader(new GNC::StreamingLoader()),
+        m_RefreshOnIdle(false)
+{
+        //load attributes
+        GNC::GCS::WindowAttributesController::LoadWindowAttributes(HISTORY_WINDOW_ID, this, false);
+        //
+
+
+        m_pTimerReload = new ReloadHistoryTimer(this);
+
+        ViewImage2D->IImagePropertiesProxy = Loader;
+        ViewImage2D->SetInputConnection(Loader->GetOutputPort());
+        ViewImage2D->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION);
+        GinkgoInteractorStyleImage2D* pInteractor = GinkgoInteractorStyleImage2D::SafeDownCast(ViewImage2D->GetInteractorStyle().GetPointer());
+        if (pInteractor != NULL) {
+                pInteractor->SetPreviewMode(true);
+        }
+        wxIcon icono;
+        icono.CopyFromBitmap(GinkgoResourcesManager::History::GetIcoHistorialOpen());
+        this->SetIcon(icono);
+
+        m_pStatusBar = new GNC::GUI::StatusBarProgreso(this, m_pPanelPreviews, false);
+        SetStatusBar(m_pStatusBar);
+
+        wxBitmap bmp;
+
+        //modalities
+        {
+                const int MaxModalityNumber=20; // Modificar la constante si se añaden o quitan códigos de modalidad
+                std::string modalidades[MaxModalityNumber] = {"CR","CT","DR","DX","IO","MG","MR","NM","OT","PT","RF","RG","SC","OCT","US","XA","XC","ES","ECG","HD"};
+                for(int i = 0; i<MaxModalityNumber; i++) {
+                        wxCheckBox* pCheckBox = new wxCheckBox( m_pAdvancedSearchPanel, wxID_ANY, wxString::FromUTF8(modalidades[i].c_str()), wxDefaultPosition, wxDefaultSize, 0 );
+                        m_pModalitySizer->Add( pCheckBox, 0, wxALL, 2 );
+                        m_modalitiesList.push_back(pCheckBox);
+                        pCheckBox->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( HistoryPanel3::OnSearchChange ), NULL, this );
+                }
+        }
+
+        m_pHistoryTableView = new wxDataViewCtrl( m_pPanelResults, wxID_ANY, wxDefaultPosition, wxDefaultSize,  wxDV_MULTIPLE|wxDV_ROW_LINES);
+        m_pTreeListSizer->Add(m_pHistoryTableView, 1, wxEXPAND);
+
+        m_pHistoryTableModel = new HistoryTableModel();
+        m_pHistoryTableView->AssociateModel(m_pHistoryTableModel.get());
+
+        //columns...
+        m_pHistoryTableView->AppendColumn(new wxDataViewColumn(wxEmptyString, new wxDataViewBitmapRenderer( wxT("wxIcon"), wxDATAVIEW_CELL_INERT ),COL_ICON, 50, wxALIGN_CENTER));
+        m_pHistoryTableView->AppendColumn(new wxDataViewColumn(_("Patient name"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ),COL_PATIENT_NAME, 330, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pHistoryTableView->AppendColumn(new wxDataViewColumn(_("Patient id"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ),COL_PATIENT_ID, 100, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pHistoryTableView->AppendColumn(new wxDataViewColumn(_("Age"), new wxDataViewTextRenderer( wxT("long"), wxDATAVIEW_CELL_INERT ),COL_AGE, 30, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pHistoryTableView->AppendColumn(new wxDataViewColumn(_("Modality"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ),COL_MODALITY, 60, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pHistoryTableView->AppendColumn(new wxDataViewColumn(_("Date acquired"), new wxDataViewTextRenderer(wxT("string"), wxDATAVIEW_CELL_INERT),COL_DATE_TIME_ACQUIRED, 120, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pHistoryTableView->AppendColumn(new wxDataViewColumn(_("Description"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ),COL_DESCRIPTION, 110, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pHistoryTableView->AppendColumn(new wxDataViewColumn(_("Date added"), new wxDataViewTextRenderer(wxT("string"), wxDATAVIEW_CELL_INERT),COL_DATE_TIME_ADDED, 120, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pHistoryTableView->AppendColumn(new wxDataViewColumn(_("Accession number"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ),COL_ACCNUMBER, 128, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        //
+
+        m_pToolBar = new HistoryToolMenu(this);
+        m_pSizerToolBar->Insert(0, m_pToolBar, 0, wxEXPAND, 0);
+        m_pToolBar->Show();
+
+        m_pThumbnails->SetThumbnailImageSize(wxSize(SIZE_THUMBNAILS, SIZE_THUMBNAILS));
+        m_pThumbnails->SetBackgroundColour(wxColour(100,100,100));
+        m_pThumbnails->SetThumbnailMargin(0);
+        m_pThumbnails->SetThumbnailTextHeight(0);
+
+        m_pHistoryTableView->Connect(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( HistoryPanel3::OnTreeItemMenu ), NULL, this);
+        m_pHistoryTableView->Connect(wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( HistoryPanel3::OnTreeItemActivated ), NULL, this);
+        m_pHistoryTableView->Connect(wxEVT_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( HistoryPanel3::OnTreeSelChanged ), NULL, this);
+        m_pHistoryTableView->Connect(wxEVT_CHAR, wxKeyEventHandler( HistoryPanel3::OnTreeKeyDown), NULL, this);
+        m_pThumbnails->Connect(wxEVT_COMMAND_THUMBNAIL_ITEM_SELECTED,wxThumbnailHandler(HistoryPanel3::OnThumbnailSelected),NULL,this);
+        m_pThumbnails->Connect(wxEVT_COMMAND_THUMBNAIL_LEFT_DCLICK,wxThumbnailHandler(HistoryPanel3::OnThumbnailDClick),NULL,this);
+        m_pThumbnails->Connect(wxEVT_COMMAND_THUMBNAIL_RIGHT_CLICK, wxThumbnailHandler(HistoryPanel3::OnThumbnailRClick), NULL, this);
+
+        m_pPatientCombo->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( HistoryPanel3::OnSearchChange ), NULL, this );
+        m_pPatientCombo->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( HistoryPanel3::OnSearchChange ), NULL, this );
+
+        GNC::GCS::ControladorEventos::Instance()->Registrar(this, GNC::GCS::Events::EventoProgresoComando());
+        m_pSearchPanel->Layout();
+        Layout();
+
+        SetDropTarget(new GNC::GUI::DropTargetMainWindow());
+}
+
+GNC::GUI::HistoryPanel3::~HistoryPanel3()
+{
+        delete m_pTimerReload;
+
+        GNC::GCS::Permisos::EstadoPermiso estado = GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "anonymous_history");
+        if (estado) {
+                GNC::GCS::HistoryController::Instance()->EmptyHistory(true);
+        }
+
+        ViewImage2D->Detach();
+        //necesario para que no haga un doble delete
+        //        ViewInteractor2D->Reparent(NULL);
+        ViewInteractor2D->Delete();
+
+
+        //save window attributes
+        GNC::GCS::WindowAttributesController::SaveWindowAttributes(HISTORY_WINDOW_ID, this);
+
+}
+
+bool GNC::GUI::HistoryPanel3::Show(bool show)
+{
+        if (show) {
+                LOG_STAT(ANON_STAT_DLG_HISTORY);
+        }
+        return GNC::GUI::HistoryPanel3Base::Show(show);
+}
+
+void GNC::GUI::HistoryPanel3::ReloadHistory()
+{
+
+        ReloadCombos(false);
+        RefreshSearch(true);
+}
+
+void GNC::GUI::HistoryPanel3::ReloadToolBar()
+{
+        m_pToolBar->Reload();
+        //reload menus..
+        while (m_pMenuBar->GetMenuCount() > 0)
+                delete m_pMenuBar->Remove(0);
+        wxMenu* pMenuAcquire = new wxMenu();
+        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(this, pMenuAcquire, GNC::GCS::IHistoryTool::TFamily_Open);
+        if (pMenuAcquire->GetMenuItemCount() > 0 && !pMenuAcquire->GetMenuItems().back()->IsSeparator()) {
+                pMenuAcquire->AppendSeparator();
+        }
+        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(this, pMenuAcquire, GNC::GCS::IHistoryTool::TFamily_Q_R);
+        if (pMenuAcquire->GetMenuItemCount() >0) {
+                m_pMenuBar->Append( pMenuAcquire, _("Acquire") );
+        } else {
+                delete pMenuAcquire;
+        }
+
+        wxMenu* pMenuDicomize = new wxMenu();
+        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(this, pMenuDicomize, GNC::GCS::IHistoryTool::TFamily_Dicomize);
+        if (pMenuDicomize->GetMenuItemCount() >0) {
+                m_pMenuBar->Append( pMenuDicomize, _("Dicomize") );
+        } else {
+                delete pMenuDicomize;
+        }
+
+        wxMenu* pMenuTools = new wxMenu();
+        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(this, pMenuTools, GNC::GCS::IHistoryTool::TFamily_Delete);
+        if (pMenuTools->GetMenuItemCount() > 0 && !pMenuTools->GetMenuItems().back()->IsSeparator()) {
+                pMenuTools->AppendSeparator();
+        }
+        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(this, pMenuTools, GNC::GCS::IHistoryTool::TFamily_ShowMetadata);
+        if (pMenuTools->GetMenuItemCount() >0) {
+                m_pMenuBar->Append( pMenuTools, _("Tools") );
+        } else {
+                delete pMenuTools;
+        }
+
+        wxMenu* pMenuExport = new wxMenu();
+        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(this, pMenuExport, GNC::GCS::IHistoryTool::TFamily_Send);
+        if (pMenuExport->GetMenuItemCount() > 0 && !pMenuExport->GetMenuItems().back()->IsSeparator()) {
+                pMenuExport->AppendSeparator();
+        }
+        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(this, pMenuExport, GNC::GCS::IHistoryTool::TFamily_Export);
+        if (pMenuExport->GetMenuItemCount() >0) {
+                m_pMenuBar->Append( pMenuExport, _("Export") );
+        } else {
+                delete pMenuExport;
+        }
+}
+
+void GNC::GUI::HistoryPanel3::ReloadCombos(bool checkPurgue)
+{
+        if (checkPurgue) {
+                //si es preciso limpiar historial...
+                GNC::GCS::Permisos::EstadoPermiso estado = GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "anonymous_history");
+                if (estado) {
+                        GNC::GCS::HistoryController::Instance()->EmptyHistory(true);
+                }
+        }
+
+        //combo box pacientes
+        GNC::GCS::HistoryController::PatientModelList listaPacientes;
+        GNC::GCS::HistoryController::Instance()->GetAllPatients(listaPacientes);
+
+        m_pPatientCombo->Clear();
+
+        //m_pPatientCombo->Append(_("All patients"), GinkgoResourcesManager::History::GetIcoAllPatients());
+        m_pPatientCombo->Append(_("All patients"));
+
+        RefreshPatientFilter();
+        if (!m_patientFilter.IsEnabled()) {
+                m_pPatientCombo->Select(0);
+        }
+
+        /*	for (GNC::GCS::HistoryController::PatientModelList::iterator it = listaPacientes.begin(); it != listaPacientes.end(); ++it) {
+        		std::ostringstream ostr;
+        		ostr << (*it).name << " (" << (*it).id << ")";
+
+        		wxPatientData* pData = new wxPatientData((*it));
+        		int indice = -1;
+        		if ((*it).sex == 'M'){
+        			indice = m_pPatientCombo->Append(wxString::FromUTF8(ostr.str().c_str()), GinkgoResourcesManager::History::GetIcoHombre(), pData);
+        		}else if((*it).sex =='F'){
+        			indice = m_pPatientCombo->Append(wxString::FromUTF8(ostr.str().c_str()), GinkgoResourcesManager::History::GetIcoMujer(), pData);
+        		}else{
+        			indice = m_pPatientCombo->Append(wxString::FromUTF8(ostr.str().c_str()), GinkgoResourcesManager::History::GetIcoOtro(), pData);
+        		}
+
+        		if (m_patientFilter.IsEnabled() && (*it).id == m_patientFilter.GetPatientId()) {
+        			m_pPatientCombo->Select(indice);
+        		}
+        	}*/
+        for (GNC::GCS::HistoryController::PatientModelList::iterator it = listaPacientes.begin(); it != listaPacientes.end(); ++it) {
+                std::ostringstream ostr;
+                ostr << (*it).name << " (" << (*it).id << ")";
+
+                wxPatientData* pData = new wxPatientData((*it));
+                int indice = -1;
+                indice = m_pPatientCombo->Append(wxString::FromUTF8(ostr.str().c_str()), pData);
+
+                if (m_patientFilter.IsEnabled() && (*it).id == m_patientFilter.GetPatientId()) {
+                        m_pPatientCombo->Select(indice);
+                }
+        }
+        if (m_pPatientCombo->GetSelection() <0) {
+                m_pPatientCombo->Select(0);
+        }
+
+
+        if (checkPurgue) {
+                //load filter state
+                std::string strTmp;
+                if (GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/History", "PatientComboValue", strTmp)) {
+                        int pos = m_pPatientCombo->FindString(wxString::FromUTF8(strTmp.c_str()));
+                        if (pos >= 0) {
+                                m_pPatientCombo->Select(pos);
+                        }
+                }
+        }
+}
+
+
+void GNC::GUI::HistoryPanel3::RefreshSearch(bool force)
+{
+        if (force) {
+                doRefresh(force);
+        } else {
+                m_RefreshOnIdle = true;
+        }
+}
+
+void GNC::GUI::HistoryPanel3::GetSelectedSeriesPk(std::list<long>& listOfPks)
+{
+        wxDataViewItemArray selections;
+        int count = m_pHistoryTableView->GetSelections(selections);
+
+        std::set<long> setOfPks;
+        for (int i = 0; i < count; ++i) {
+                if (selections[i].IsOk()) {
+                        HistoryNode* pNode = (HistoryNode*) selections[i].GetID();
+                        GNC::GUI::HistoryNode::SeriesModelList seriesModels;
+                        pNode->GetSeriesModel(seriesModels);
+                        for (GNC::GUI::HistoryNode::SeriesModelList::iterator it = seriesModels.begin(); it != seriesModels.end(); ++it) {
+                                setOfPks.insert((*it)->pk);
+                        }
+                }
+        }
+        for (std::set<long>::iterator it = setOfPks.begin(); it != setOfPks.end(); ++it) {
+                listOfPks.push_back((*it));
+        }
+}
+
+void GNC::GUI::HistoryPanel3::OnHistoryPanelIdle( wxIdleEvent& /*event*/ )
+{
+        if (m_RefreshOnIdle) {
+                doRefresh();
+        }
+}
+
+void GNC::GUI::HistoryPanel3::doRefresh(bool force)
+{
+        RefreshPatientFilter();
+        RefreshModalityFilter();
+        RefreshDateFilter();
+
+        ////se eliminan todos los estudios que no están abiertos
+        Freeze();
+        //
+        std::list<GNC::GCS::History::IHistoryFilter*> filterList;
+        filterList.push_back(&m_modalityFilter);
+        filterList.push_back(&m_patientFilter);
+        filterList.push_back(&m_dateFilter);
+
+        GNC::GCS::HistoryController::StudyModelList studyList;
+        GNC::GCS::HistoryController::Instance()->GetStudies(filterList, studyList);
+        {
+                wxWindowDisabler disableAll;
+                Freeze();
+                ShowPreviewPanel(false);
+                m_pThumbnails->Clear();
+                m_pHistoryTableModel->ReloadTree(studyList, force);
+                int numberImages = 0;
+                for (GNC::GCS::HistoryController::StudyModelList::iterator it = studyList.begin(); it != studyList.end(); ++it) {
+                        numberImages += (*it).num_instances;
+                }
+                m_pStatusBar->SetStatusText(_("Results") + wxString::Format(_(" (%d images)"), numberImages));
+                Thaw();
+        }
+
+        Thaw();
+        m_RefreshOnIdle = false;
+}
+
+void GNC::GUI::HistoryPanel3::RefreshPatientFilter()
+{
+        if (m_pPatientCombo->GetSelection() > 0) {
+                wxPatientData* pPatient = static_cast<wxPatientData*>( m_pPatientCombo->GetClientObject(m_pPatientCombo->GetSelection()) );
+                if (pPatient != NULL) {
+                        m_patientFilter.Enable(true);
+                        m_patientFilter.SetPatientId(pPatient->m_PatientModel.id);
+                        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/History", "PatientComboValue", pPatient->m_PatientModel.id);
+                } else {
+                        m_patientFilter.Enable(false);
+                }
+        } else {
+                m_patientFilter.Enable(false);
+        }
+}
+void GNC::GUI::HistoryPanel3::RefreshModalityFilter()
+{
+        std::list<std::string> modalities;
+        for (TModalitiesVector::iterator it = m_modalitiesList.begin(); it != m_modalitiesList.end(); ++it) {
+                if ((*it)->IsChecked()) {
+                        std::string modality((*it)->GetLabel().ToUTF8());
+                        modalities.push_back(modality);
+                }
+        }
+        m_modalityFilter.Enable(!modalities.empty());
+        m_modalityFilter.SetModalities(modalities);
+}
+
+/** Advanced Search button toggled **/
+void GNC::GUI::HistoryPanel3::OnAdvancedSearchToggled( wxCommandEvent& event )
+{
+        Freeze();
+        if (event.IsChecked()) {
+                m_pAdvancedSearchPanel->Show();
+        } else {
+                m_pAdvancedSearchPanel->Hide();
+        }
+        Layout();
+        Thaw();
+
+}
+
+void GNC::GUI::HistoryPanel3::RefreshDateFilter()
+{
+
+        wxDateTime fromDate, toDate;
+        if (m_pBetween->GetValue()) {
+                if(m_pTextControlFechaDesde->GetValue().IsValid()) {
+                        fromDate =  m_pTextControlFechaDesde->GetValue();
+                }
+                if(m_pTextControlFechaHasta->GetValue().IsValid()) {
+                        toDate =  m_pTextControlFechaHasta->GetValue();
+                }
+        } else if (m_pToday->GetValue() || m_pTodayAM->GetValue() || m_pTodayPM->GetValue()) {
+                fromDate = toDate = wxDateTime::Now();
+                if (m_pTodayAM->GetValue()) {
+                        fromDate.SetHour(0);
+                        fromDate.SetMinute(0);
+                        fromDate.SetSecond(0);
+                        toDate.SetHour(11);
+                        toDate.SetMinute(59);
+                        toDate.SetSecond(59);
+                } else if (m_pTodayPM->GetValue()) {
+                        fromDate.SetHour(12);
+                        fromDate.SetMinute(0);
+                        fromDate.SetSecond(0);
+                        toDate.SetHour(23);
+                        toDate.SetMinute(59);
+                        toDate.SetSecond(59);
+                } else  {
+                        fromDate.SetHour(0);
+                        fromDate.SetMinute(0);
+                        fromDate.SetSecond(0);
+                        toDate.SetHour(23);
+                        toDate.SetMinute(59);
+                        toDate.SetSecond(59);
+                }
+        } else if (m_pYesterday->GetValue()) {
+                fromDate = wxDateTime::Now().Add(wxDateSpan(0,0,0,-1));
+        } else if (m_pLastWeek->GetValue()) {
+                fromDate = wxDateTime::Now().Add(wxDateSpan(0,0,-1,0));
+        } else if (m_pLastMonth->GetValue()) {
+                fromDate = wxDateTime::Now().Add(wxDateSpan(0,-1,0,0));
+        } else if (m_pLastThreeMonths->GetValue()) {
+                fromDate = wxDateTime::Now().Add(wxDateSpan(0,-3,0,0));
+        }
+        m_dateFilter.SetDates(fromDate, toDate);
+        m_dateFilter.Enable(fromDate.IsValid() || toDate.IsValid());
+}
+
+void GNC::GUI::HistoryPanel3::OnClose(wxCloseEvent &event)
+{
+        event.Skip(false);
+        Hide();
+}
+
+void GNC::GUI::HistoryPanel3::OnSearchChange( wxCommandEvent& )
+{
+        m_pTimerReload->Stop();
+        m_pTimerReload->Start(500,true);
+}
+
+void GNC::GUI::HistoryPanel3::OnDateChanged( wxDateEvent& /*event*/ )
+{
+        m_pBetween->SetValue(true);
+        m_pTimerReload->Stop();
+        m_pTimerReload->Start(500,true);
+}
+
+void GNC::GUI::HistoryPanel3::ShowPreviewPanel(bool visible)
+{
+        if (ViewInteractor2D->IsShown() != visible) {
+                ViewInteractor2D->Show(visible);
+                m_pHideInteractorPanel->Show(!visible);
+                m_pPanelPreviews->Layout();
+        }
+}
+
+void GNC::GUI::HistoryPanel3::OnTreeItemActivated(wxDataViewEvent& event)
+{
+        wxDataViewItem item = event.GetItem();
+        if (item.IsOk()) {
+                HistoryNode* pNode = (HistoryNode*) item.GetID();
+                if (pNode->IsStudyModel()) {
+                        OpenSeriesOrStudy(pNode->GetStudyModel()->pk, false,!GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "reutilize_study"));
+                } else {
+                        OpenSeriesOrStudy(pNode->GetSeriesModel()->pk, true,!GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "reutilize_study"));
+                }
+        }
+}
+
+void GNC::GUI::HistoryPanel3::OnTreeItemMenu(wxDataViewEvent& event)
+{
+        wxDataViewItem item = event.GetItem();
+        if(item.IsOk()) {
+                HistoryNode* pNode = (HistoryNode*) item.GetID();
+                wxMenu menu;
+                int idMenuItem = 1;
+
+                wxDataViewItemArray dummyArr;
+                if (m_pHistoryTableView->GetSelections(dummyArr) == 1) {
+                        if (pNode->IsStudyModel()) {
+                                menu.Append(idMenuItem, _("Open study"));
+                                menu.Connect(idMenuItem++,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( HistoryPanel3::OnOpenMenu),NULL,this);
+                                menu.Append(idMenuItem, _("Open study with .."));
+                                menu.Connect(idMenuItem++,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( HistoryPanel3::OnOpenWithMenu),NULL,this);
+                        } else {
+                                menu.Append(idMenuItem, _("Open Series"));
+                                menu.Connect(idMenuItem++,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( HistoryPanel3::OnOpenMenu),NULL,this);
+                                menu.Append(idMenuItem, _("Open Series with .."));
+                                menu.Connect(idMenuItem++,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( HistoryPanel3::OnOpenWithMenu),NULL,this);
+                        } // SERIES MENU
+                } else {
+                        //more than one item selected...
+                }
+
+                if (dummyArr.size() > 0) {
+                        if (menu.GetMenuItemCount() > 0 && !menu.GetMenuItems().back()->IsSeparator()) {
+                                menu.AppendSeparator();
+                        }
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(&menu, &menu, GNC::GCS::IHistoryTool::TFamily_Open);
+                        if (menu.GetMenuItemCount() > 0 && !menu.GetMenuItems().back()->IsSeparator()) {
+                                menu.AppendSeparator();
+                        }
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(&menu, &menu, GNC::GCS::IHistoryTool::TFamily_Dicomize);
+                        if (menu.GetMenuItemCount() > 0 && !menu.GetMenuItems().back()->IsSeparator()) {
+                                menu.AppendSeparator();
+                        }
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(&menu, &menu, GNC::GCS::IHistoryTool::TFamily_Q_R);
+                        {
+                                //synchronize option
+                                bool enableSynchronize = (pNode->IsStudyModel()?pNode->GetStudyModel()->location:pNode->GetSeriesModel()->location)
+                                                         == GNC::GCS::IHistoryController::TL_WadoLinked;
+                                wxMenuItem* pMenuSynchronize = new wxMenuItem(&menu, idMenuItem, wxString( _("Synchronize") ), _("Synchronize"), wxITEM_NORMAL );
+#ifdef __WXMSW__
+                                pMenuSynchronize->SetBitmaps(GinkgoResourcesManager::Acquisition::GetIcoDownload());
+#else
+                                pMenuSynchronize->SetBitmap(GinkgoResourcesManager::Acquisition::GetIcoDownload());
+#endif
+                                menu.Append(pMenuSynchronize);
+                                menu.Enable(idMenuItem, enableSynchronize);
+                                menu.Connect(idMenuItem++,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( HistoryPanel3::OnSynchronizeSelected),NULL,this);
+                        }
+                        if (menu.GetMenuItemCount() > 0 && !menu.GetMenuItems().back()->IsSeparator()) {
+                                menu.AppendSeparator();
+                        }
+                        if (!GNC::GCS::HistoryController::Instance()->IsReadOnly()) {
+                                wxMenuItem* pMenuEliminar = new wxMenuItem(&menu, idMenuItem, wxString( _("&Delete from history") ), _("Delete"), wxITEM_NORMAL );
+                                menu.Connect(idMenuItem++,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( HistoryPanel3::OnDelete),NULL,this);
+#ifdef __WXMSW__
+                                pMenuEliminar->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoEliminar());
+#else
+                                pMenuEliminar->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoEliminar());
+#endif
+                                menu.Append(pMenuEliminar);
+
+                                wxMenuItem* pMenuLimpiar = new wxMenuItem(&menu, idMenuItem, wxString( _("&Clear history") ), _("Delete"), wxITEM_NORMAL );
+                                menu.Connect(idMenuItem++,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( HistoryPanel3::OnClearHistory),NULL,this);
+#ifdef __WXMSW__
+                                pMenuLimpiar->SetBitmaps(GinkgoResourcesManager::History::GetIcoCleanAll());
+#else
+                                pMenuLimpiar->SetBitmap(GinkgoResourcesManager::History::GetIcoCleanAll());
+#endif
+                                menu.Append(pMenuLimpiar);
+                                GNC::HistoryToolsController::Instance()->AppendsToolInMenu(&menu, &menu, GNC::GCS::IHistoryTool::TFamily_Delete);
+                                if (menu.GetMenuItemCount() > 0 && !menu.GetMenuItems().back()->IsSeparator()) {
+                                        menu.AppendSeparator();
+                                }
+                        }
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(&menu, &menu, GNC::GCS::IHistoryTool::TFamily_ShowMetadata);
+                        if (menu.GetMenuItemCount() > 0 && !menu.GetMenuItems().back()->IsSeparator()) {
+                                menu.AppendSeparator();
+                        }
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(&menu, &menu, GNC::GCS::IHistoryTool::TFamily_Send);
+                        if (menu.GetMenuItemCount() > 0 && !menu.GetMenuItems().back()->IsSeparator()) {
+                                menu.AppendSeparator();
+                        }
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(&menu, &menu, GNC::GCS::IHistoryTool::TFamily_Anonymize);
+                        if (menu.GetMenuItemCount() > 0 && !menu.GetMenuItems().back()->IsSeparator()) {
+                                menu.AppendSeparator();
+                        }
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(&menu, &menu, GNC::GCS::IHistoryTool::TFamily_Export);
+                }
+
+                if (menu.GetMenuItemCount() > 0) {
+                        this->PopupMenu(&menu);
+                }
+
+                event.Skip(false);
+        } else {
+                event.Skip(true);
+        }
+}
+
+void GNC::GUI::HistoryPanel3::OnTreeSelChanged(wxDataViewEvent& event)
+{
+        wxDataViewItem item = event.GetItem();
+        if(item.IsOk()) {
+                ShowPreviewPanel(false);
+                HistoryNode* pNode = (HistoryNode*) item.GetID();
+                if (pNode->IsStudyModel()) {
+                        LoadPreviewsFromStudy(pNode->GetStudyModel());
+                } else {
+                        LoadPreviewsFromSeries(pNode->GetSeriesModel());
+                }
+        }
+
+        event.Skip(true);
+}
+
+void GNC::GUI::HistoryPanel3::OnTreeKeyDown(wxKeyEvent& event)
+{
+        if (event.GetKeyCode() == WXK_DELETE || event.GetKeyCode() == WXK_BACK|| event.GetKeyCode() == WXK_NUMPAD_DELETE) {
+                RemoveSelected();
+                event.Skip(false);
+        } else {
+                event.Skip(true);
+        }
+}
+
+
+void GNC::GUI::HistoryPanel3::OnThumbnailSelected(wxThumbnailEvent& /*evt*/)
+{
+        int selected = m_pThumbnails->GetSelection();
+        if (selected >= 0) {
+                try {
+                        ShowPreviewPanel(true);
+                        wxHistoryImageThumbnailItem* pItem = static_cast<wxHistoryImageThumbnailItem*>( m_pThumbnails->GetItem(selected) );
+                        long file_pk;
+                        pItem->GetFilename().ToLong(&file_pk);
+                        GNC::GCS::HistoryController::FileModel selectedFile = GNC::GCS::HistoryController::Instance()->GetFileModel(file_pk);
+                        if (m_currentPreviewedFile != selectedFile.real_path) {
+                                m_currentPreviewedFile = selectedFile.real_path;
+                                Loader->SetInput(selectedFile.real_path);
+                                Loader->UpdateInformation();
+                                Loader->SetOutputOrigin(selectedFile.image_position);
+                                double spacing[3] = {1.0,1.0,1.0};
+                                sscanf( selectedFile.spacing.c_str(), "%lf\\%lf", &spacing[0], &spacing[1]);
+                                Loader->SetOutputSpacing(spacing);
+                                if (ViewImage2D->GetNumberOfComponents() == 1) {
+                                        double window, level;
+                                        if (Loader->GetDefaultWindowLevel(window,level) && window != 0.0) {
+                                                ViewImage2D->SetWindow(window);
+                                                ViewImage2D->SetLevel(level);
+                                        } else {
+                                                ViewImage2D->SetAutoDefaultWindowLevel();
+                                        }
+                                }
+                                ViewImage2D->SetupPipeline(true);
+                                ViewImage2D->ResetZoom(false, 0);
+                                ViewImage2D->UpdateOrientation();
+                        }
+                        ViewInteractor2D->Render();
+                } catch( GNC::GCS::VistaException& ex ) {
+                        ShowPreviewPanel(false);
+                        std::string error = "Exception loading:" + ex.GetCause();
+                        LOG_ERROR("History3", error);
+                } catch (GNC::GCS::ControladorCargaException& ex) {
+                        ShowPreviewPanel(false);
+                        std::string error = "Exception loading:" + ex.GetCause();
+                        LOG_ERROR("History3", error);
+                } catch (...) {
+                        ShowPreviewPanel(false);
+                        std::string error = "Unknown exception loading";
+                        LOG_ERROR("History3", error);
+                }
+        }
+}
+
+void GNC::GUI::HistoryPanel3::OnThumbnailDClick(wxThumbnailEvent& /*evt*/)
+{
+        int selected = m_pThumbnails->GetSelection();
+        if (selected >= 0) {
+                wxHistoryImageThumbnailItem* pItem = static_cast<wxHistoryImageThumbnailItem*>(m_pThumbnails->GetItem(selected));
+                if (!pItem) {
+                        LOG_ERROR("History3", "selected item doesn't exists??");
+                        return;
+                }
+                if (pItem->GetType() == wxHistoryImageThumbnailItem::TI_Series) {
+                        //open series
+                        OpenSeriesOrStudy(pItem->GetSeriesPk(), true,!GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "reutilize_study"));
+                } else {
+                        //open image
+                        GNC::GCS::IVista* pView = GetViewFromSeries(pItem->GetSeriesPk());
+                        if (pView != NULL) {
+                                GNC::Entorno::Instance()->GetVentanaPrincipal()->ForzarCambioVista(pView);
+                                std::string pathOfFile(TOPATH(pItem->GetFilename()));
+                                pView->ActivarRuta(pItem->GetFilePk());
+                        } else  {
+                                OpenSeriesOrStudy(pItem->GetSeriesPk(), true,!GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "reutilize_study"));
+                        }
+                }
+        }
+}
+void GNC::GUI::HistoryPanel3::OnThumbnailRClick(wxThumbnailEvent& evt)
+{
+        wxHistoryImageThumbnailItem* pItem = static_cast<wxHistoryImageThumbnailItem*>(m_pThumbnails->GetItem(evt.GetIndex()));
+        if (pItem != NULL) {
+                wxPopUpMenuThumbnails menu(this, pItem->GetSeriesPk());
+                m_pThumbnails->PopupMenu(&menu);
+        } else {
+                wxPopUpMenuThumbnails menu(this, -1);
+                m_pThumbnails->PopupMenu(&menu);
+        }
+}
+
+
+void GNC::GUI::HistoryPanel3::OnOpenMenu(wxCommandEvent& /*event*/)
+{
+        wxDataViewItem item = m_pHistoryTableView->GetSelection();
+        if (item.IsOk()) {
+                HistoryNode* pNode = (HistoryNode*) item.GetID();
+                if (pNode->IsStudyModel()) {
+                        OpenSeriesOrStudy(pNode->GetStudyModel()->pk, false,!GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "reutilize_study"));
+                } else {
+                        OpenSeriesOrStudy(pNode->GetSeriesModel()->pk, true,!GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "reutilize_study"));
+                }
+        }
+}
+
+void GNC::GUI::HistoryPanel3::OnOpenWithMenu(wxCommandEvent& /*event*/)
+{
+        wxDataViewItem item = m_pHistoryTableView->GetSelection();
+        if (item.IsOk()) {
+                HistoryNode* pNode = (HistoryNode*) item.GetID();
+                if (pNode->IsStudyModel()) {
+                        OpenSeriesOrStudyWith(pNode->GetStudyModel()->pk, false);
+                } else {
+                        OpenSeriesOrStudyWith(pNode->GetSeriesModel()->pk, true);
+                }
+        }
+}
+
+void GNC::GUI::HistoryPanel3::OnDelete(wxCommandEvent& /*event*/)
+{
+        RemoveSelected();
+}
+
+void GNC::GUI::HistoryPanel3::OnClearHistory(wxCommandEvent& /*event*/)
+{
+        ClearHistory();
+}
+
+void GNC::GUI::HistoryPanel3::OnSynchronizeSelected(wxCommandEvent& /*event*/)
+{
+        SynchronizeSelected();
+}
+
+
+GNC::GCS::IVista* GNC::GUI::HistoryPanel3::GetViewFromSeries(long pk_series)
+{
+        GNC::GCS::ControladorVistas::TipoListaVistas viewList = GNC::Entorno::Instance()->GetControladorVistas()->GetVistas();
+        for (GNC::GCS::ControladorVistas::TipoListaVistas::iterator itViews = viewList.begin(); itViews != viewList.end(); ++itViews) {
+                if ((*itViews)->GetEstudio().IsValid()) {
+                        for(std::vector<long>::const_iterator itUID = (*itViews)->GetEstudio()->OpenedSeries.begin(); itUID != (*itViews)->GetEstudio()->OpenedSeries.end(); ++itUID) {
+                                if (pk_series == (*itUID)) {
+                                        return (*itViews);
+                                }
+                        }
+                }
+        }
+        return NULL;
+}
+
+void GNC::GUI::HistoryPanel3::OpenSeriesOrStudyWith(long pk, bool isSeries)
+{
+        GNC::GCS::Permisos::EstadoPermiso estado = GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "max_tabs");
+        if (estado) {
+                long maxNumberOfTabs = estado.ObtenerValor<long>();
+                if ((int)GNC::Entorno::Instance()->GetControladorVistas()->GetVistas().size() >= maxNumberOfTabs) {
+                        wxMessageBox(_("You have reached maximum number of opened tabs, close some tabs and try it again"), _("Info"),
+                                     wxOK | wxICON_INFORMATION, GNC::Entorno::Instance()->GetVentanaRaiz());
+                        return;
+                }
+        }
+        //max
+
+        GNC::GCS::IHistoryController::SeriesModelList seriesModelList;
+        if (isSeries) {
+                GNC::GCS::IHistoryController::SeriesModel seriesModel = GNC::GCS::HistoryController::Instance()->GetSeriesModel(pk);
+                seriesModelList.push_back(seriesModel);
+        } else {
+                GNC::GCS::HistoryController::Instance()->GetSeriesFromStudy(pk, seriesModelList);
+        }
+
+        OpenWithDialog::ListaModalidades listaModalidades;
+        for (GNC::GCS::IHistoryController::SeriesModelList::iterator itSeries = seriesModelList.begin(); itSeries != seriesModelList.end(); ++itSeries) {
+                GNC::GCS::IHistoryController::SeriesModel& seriesModel = (*itSeries);
+                for (GNC::GCS::HistoryController::StringList::iterator it = seriesModel.tsuids.begin(); it != seriesModel.tsuids.end(); ++it) {
+                        listaModalidades.push_back(std::pair<std::string,std::string>(seriesModel.series_modality, (*it)));
+                }
+        }
+
+        OpenWithDialog dialogoAbrir(this, listaModalidades);
+        int answer = dialogoAbrir.ShowModal();
+        if (answer == wxID_OK) {
+                OpenSeries(seriesModelList, dialogoAbrir.GetModuloSeleccionado(), dialogoAbrir.GetModoSeleccionado()->GetId());
+        }
+}
+
+void GNC::GUI::HistoryPanel3::OpenSeriesOrStudy(long pk, bool isSeries, bool force)
+{
+        //show current...
+        GNC::GCS::IHistoryController::SeriesModelList seriesModelList;
+        {
+                GNC::GCS::IVista* pView = NULL;
+                if (isSeries) {
+                        pView = GetViewFromSeries(pk);
+                        GNC::GCS::IHistoryController::SeriesModel seriesModel = GNC::GCS::HistoryController::Instance()->GetSeriesModel(pk);
+                        seriesModelList.push_back(seriesModel);
+                } else {
+                        GNC::GCS::HistoryController::Instance()->GetSeriesFromStudy(pk, seriesModelList);
+                        for (GNC::GCS::IHistoryController::SeriesModelList::const_iterator it = seriesModelList.begin(); it != seriesModelList.end(); ++it) {
+                                pView = GetViewFromSeries((*it).pk);
+                                if (pView != NULL) {
+                                        break;
+                                }
+                        }
+                }
+                if (seriesModelList.empty()) {
+                        LOG_WARN("HistoryPanel", "trying to open a series or a study that has been deleted");
+                        return;
+                }
+
+                if (pView != NULL) {
+                        GNC::Entorno::Instance()->GetVentanaPrincipal()->ForzarCambioVista(pView);
+                        GNC::GCS::HistoryController::FileModel fileModel = GNC::GCS::HistoryController::Instance()->GetFrameOfReference(seriesModelList.front().pk);
+                        pView->ActivarRuta(fileModel.pk);
+                        if (!force) {
+                                return;
+                        }
+                }
+        }
+
+        //max number of opened tabs
+        GNC::GCS::Permisos::EstadoPermiso estado = GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions", "max_tabs");
+        if (estado) {
+                long maxNumberOfTabs = estado.ObtenerValor<long>();
+                if ((int)GNC::Entorno::Instance()->GetControladorVistas()->GetVistas().size() >= maxNumberOfTabs) {
+                        wxMessageBox(_("You have reached maximum number of opened tabs, close some tabs and try it again"), _("Info"),
+                                     wxOK | wxICON_INFORMATION, GNC::Entorno::Instance()->GetVentanaRaiz());
+                        return;
+                }
+        }
+        //max
+
+        //select modulo and modo that opens all series of a kind...
+        GNC::GCS::IModuleController* pModulo = NULL;
+        GNC::GCS::ModoControlador* pModo = NULL;
+        GNC::GCS::Ptr<GNC::GCS::HangingProtocol> hp;
+
+        //ma
+        if (!isSeries) {
+                //it's an study maybe hanging protocols.....
+                hp = GNC::GCS::HangingProtocolController::Instance()->GetProtocolForStudy(pk);
+                if (hp.IsValid()) {
+                        pModulo = ControladorExtensiones::Instance()->ObtenerModulo(hp->getModuleSid());
+                        if (pModulo != NULL) {
+                                pModo = pModulo->GetModo(hp->getOpeningMode());
+                        }
+                }
+        }
+
+        //first try view that supports this importation uid
+        GNC::ControladorExtensiones::ListaModulos listaModulos = ControladorExtensiones::Instance()->Modulos();
+        for (GNC::GCS::IHistoryController::SeriesModelList::iterator itSeries = seriesModelList.begin(); itSeries != seriesModelList.end() && pModo == NULL && pModulo == NULL; ++itSeries) {
+                for(GNC::ControladorExtensiones::IteradorListaModulos itModulos = listaModulos.begin(); itModulos!= listaModulos.end() && pModo == NULL && pModulo == NULL; ++itModulos) {
+                        for(GNC::GCS::IModuleController::IteradorListaModos itModos = (*itModulos).second->GetListaModos().begin(); itModos != (*itModulos).second->GetListaModos().end(); ++itModos) {
+                                bool supports = true;
+                                for (GNC::GCS::HistoryController::StringList::iterator itTsyntax = (*itSeries).tsuids.begin(); itTsyntax != (*itSeries).tsuids.end(); ++itTsyntax) {
+                                        supports = supports && (*itModos)->SupportsImportationUID((*itSeries).uid_importer) && (*itModos)->SupportsModalityFile((*itSeries).series_modality,(*itTsyntax));
+                                }
+                                if (supports) {
+                                        pModo = (*itModos);
+                                        pModulo = (*itModulos).second;
+                                        break;
+                                }
+                        }
+                }
+
+                if(pModo== NULL || pModulo == NULL) {
+                        //second try by modality
+                        std::list<GNC::GCS::IModuleController*> listaModulos = ControladorExtensiones::Instance()->ModulosOrdenados();
+                        for(std::list<GNC::GCS::IModuleController*>::iterator itModulos=listaModulos.begin(); itModulos != listaModulos.end() && pModo == NULL && pModulo == NULL; ++itModulos) {
+                                for(GNC::GCS::IModuleController::IteradorListaModos itModos = (*itModulos)->GetListaModos().begin(); itModos != (*itModulos)->GetListaModos().end(); ++itModos) {
+                                        bool supports = true;
+                                        for (GNC::GCS::HistoryController::StringList::iterator itTsyntax = (*itSeries).tsuids.begin(); itTsyntax != (*itSeries).tsuids.end(); ++itTsyntax) {
+                                                supports = supports && (*itModos)->SupportsModalityFile((*itSeries).series_modality,(*itTsyntax));
+                                        }
+                                        if (supports) {
+                                                pModo = (*itModos);
+                                                pModulo = (*itModulos);
+                                                break;
+                                        }
+                                }
+                        }
+                }
+        }
+
+        if(pModo != NULL && pModulo != NULL) {
+                //openinG!!!
+                OpenSeries(seriesModelList, pModulo, pModo->GetId(), hp);
+
+        } else {
+                wxString strModalidades=wxT("");
+                wxMessageBox(_("Unable to open modality ") + wxString::FromUTF8(seriesModelList.front().series_modality.c_str()) + _( " with transfer syntax ") << wxString::FromUTF8(seriesModelList.front().tsuids.front().c_str()), _("Info"),
+                             wxOK | wxICON_INFORMATION, GNC::Entorno::Instance()->GetVentanaRaiz());
+        }
+}
+
+void GNC::GUI::HistoryPanel3::OpenSeries(GNC::GCS::HistoryController::SeriesModelList& seriesModelList, GNC::GCS::IModuleController* pModulo, int idModo, GNC::GCS::Ptr<GNC::GCS::HangingProtocol> hangingProtocol)
+{
+        try {
+                if (pModulo->OpenView(idModo,seriesModelList, hangingProtocol) == NULL) {
+                        LOG_ERROR("GNC/AbrirEstudio", "OpenView has returned null");
+                        if (hangingProtocol.IsValid()) {
+                                wxMessageBox(_("Error loading study, check hanging protocol settings"), _("Error loading study"),wxICON_ERROR);
+                        }
+                }
+        } catch (GNC::GCS::VistaException& ex) {
+                LOG_ERROR("GNC/AbrirEstudio", (std::string)ex );
+                wxMessageBox(wxString::FromUTF8( ((std::string)ex).c_str() ), _("Error loading study"),wxICON_ERROR);
+        } catch (...) {
+                LOG_ERROR("GNC/AbrirEstudio", "Error al abrir el estudio: Error interno");
+                wxMessageBox(_( "Internal error" ), _("Error loading study"),wxICON_ERROR);
+        }
+}
+
+void GNC::GUI::HistoryPanel3::ClearHistory()
+{
+        //if there is any view opened...
+        GNC::GCS::ControladorVistas::TipoListaVistas viewList = GNC::Entorno::Instance()->GetControladorVistas()->GetVistas();
+        for (GNC::GCS::ControladorVistas::TipoListaVistas::iterator itViews = viewList.begin(); itViews != viewList.end(); ++itViews) {
+                if ((*itViews)->GetEstudio().IsValid() && (*itViews)->GetEstudio()->OpenedSeries.size() > 0) {
+                        wxMessageBox(_("Failed to empty the history, you have to close opened studies"), _("Info"),
+                                     wxOK | wxICON_WARNING);
+                        return;
+                }
+        }
+
+        bool eliminar = false;
+
+        ConfirmDeleteDialog dlg(this, _("all files"));
+        switch (dlg.ShowModal()) {
+        case wxOK :
+                eliminar = GNC::GCS::HistoryController::Instance()->EmptyHistory(true);
+                break;
+        default :
+                break;
+        }
+        if(eliminar) {
+                RefreshSearch(true);
+                ReloadCombos(false);
+        }
+}
+
+void GNC::GUI::HistoryPanel3::RemoveSelected()
+{
+        GNC::GCS::HistoryController::IdList pkList;
+        GetSelectedSeriesPk(pkList);
+
+        if (pkList.empty()) {
+                wxMessageBox(_("Select at least one series"), _("Info"), wxOK | wxICON_WARNING);
+                return;
+        }
+        std::set<long> setOfPks;
+        setOfPks.insert(pkList.begin(), pkList.end());
+
+        //if there is any view opened...
+        GNC::GCS::ControladorVistas::TipoListaVistas viewList = GNC::Entorno::Instance()->GetControladorVistas()->GetVistas();
+        for (GNC::GCS::ControladorVistas::TipoListaVistas::iterator itViews = viewList.begin(); itViews != viewList.end(); ++itViews) {
+                if ((*itViews)->GetEstudio().IsValid()) {
+                        for (std::vector<long>::const_iterator itUIDs = (*itViews)->GetEstudio()->OpenedSeries.begin(); itUIDs != (*itViews)->GetEstudio()->OpenedSeries.end(); ++itUIDs) {
+                                if (setOfPks.find((*itUIDs)) != setOfPks.end()) {
+                                        wxMessageBox(_("You can't remove opened series"), _("Info"),
+                                                     wxOK | wxICON_WARNING);
+                                        return;
+                                }
+                        }
+                }
+        }
+
+        bool eliminar = false;
+        wxString msg = (setOfPks.size()>1)?_("those series"):_("this series");
+        ConfirmDeleteDialog dlg(this, msg);
+        switch (dlg.ShowModal()) {
+        case wxOK :
+                eliminar = true;
+                break;
+        default:
+                break;
+        }
+        if(eliminar) {
+                GNC::GCS::HistoryController::Instance()->DeleteSeriesList(pkList);
+                wxDataViewItemArray selections;
+                m_pHistoryTableView->Freeze();
+                m_pHistoryTableView->GetSelections(selections);
+                m_pHistoryTableModel->DeleteItems(selections);
+                m_pHistoryTableView->Thaw();
+
+                RefreshSearch();
+                m_pThumbnails->Clear();
+                ShowPreviewPanel(false);
+                ReloadCombos(false);
+        }
+}
+
+
+void GNC::GUI::HistoryPanel3::SelectAll()
+{
+        m_pHistoryTableView->SelectAll();
+}
+
+void GNC::GUI::HistoryPanel3::DeselectAll()
+{
+        m_pHistoryTableView->UnselectAll();
+        m_pThumbnails->Clear();
+        ShowPreviewPanel(false);
+}
+
+void GNC::GUI::HistoryPanel3::SynchronizeSelected()
+{
+        GNC::GCS::HistoryController::IdList pkList;
+        GetSelectedSeriesPk(pkList);
+
+        if (pkList.empty()) {
+                wxMessageBox(_("Select at least one series"), _("Info"), wxOK | wxICON_WARNING);
+                return;
+        }
+
+        GADAPI::SynchronizationCommandParameters* pParams = new GADAPI::SynchronizationCommandParameters(pkList, NULL);
+        GADAPI::SynchronizationCommand* pCmd = new GADAPI::SynchronizationCommand(pParams);
+        GNC::GCS::ICommandController::Instance()->ProcessAsync("syncronizing...", pCmd, NULL);
+}
+
+void GNC::GUI::HistoryPanel3::LoadPreviewsFromStudy(const GNC::GCS::Ptr<GNC::GCS::IHistoryController::StudyModel>& pModel)
+{
+        wxWindowDisabler disableAll;
+        m_pThumbnails->Freeze();
+        while (m_pThumbnails->GetCount()>0) {
+                m_pThumbnails->Delete(0);
+        }
+
+        GNC::GCS::HistoryController::SeriesModelList seriesList;
+        GNC::GCS::HistoryController::Instance()->GetSeriesFromStudy(pModel->pk, seriesList);
+
+        for (GNC::GCS::HistoryController::SeriesModelList::const_iterator it = seriesList.begin(); it != seriesList.end(); ++it) {
+                GNC::GCS::HistoryController::FileModel frame = GNC::GCS::HistoryController::Instance()->GetFrameOfReference((*it).pk);
+                wxString pathOfItem = wxString::Format(wxT("%d"), (int) frame.pk);
+
+
+                wxHistoryImageThumbnailItem* pItem = new wxHistoryImageThumbnailItem(pathOfItem, wxHistoryImageThumbnailItem::TI_Series, (*it).pk, frame.pk, pModel->location);
+                m_pThumbnails->Insert(pItem);
+        }
+        m_pThumbnails->Thaw();
+}
+
+void GNC::GUI::HistoryPanel3::LoadPreviewsFromSeries(const GNC::GCS::Ptr<GNC::GCS::IHistoryController::SeriesModel>& pModel)
+{
+        wxWindowDisabler disableAll;
+        m_pThumbnails->Freeze();
+        while (m_pThumbnails->GetCount()>0) {
+                m_pThumbnails->Delete(0);
+        }
+
+        GNC::GCS::HistoryController::LightFileModelList listOfFiles;
+        GNC::GCS::HistoryController::Instance()->GetSeriesSortedFileModels(pModel->pk, listOfFiles);
+
+        for (GNC::GCS::HistoryController::LightFileModelList::const_iterator it = listOfFiles.begin(); it != listOfFiles.end(); ++it) {
+                wxString pathOfItem = wxString::Format(wxT("%ld"), (int) (*it).pk);
+                wxHistoryImageThumbnailItem* pItem = new wxHistoryImageThumbnailItem(pathOfItem, wxHistoryImageThumbnailItem::TI_Image, pModel->pk, (*it).pk, pModel->location);
+                m_pThumbnails->Append(pItem);
+        }
+        m_pThumbnails->Thaw();
+}
+
+void GNC::GUI::HistoryPanel3::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        switch(evt->GetCodigoEvento()) {
+        case ginkgoEVT_Core_ProgresoComando: {
+                GNC::GCS::Events::EventoProgresoComando* pEvt = dynamic_cast<GNC::GCS::Events::EventoProgresoComando*> (evt);
+
+                if (pEvt == NULL  || pEvt->GetComando() == NULL) {
+                        return;
+                }
+                switch (pEvt->GetTipo()) {
+                case GNC::GCS::Events::EventoProgresoComando::TEP_Iniciado: {
+                        GNC::GCS::IPersistentCommand* pPersistent = dynamic_cast<GNC::GCS::IPersistentCommand*> (pEvt->GetComando());
+                        if (pPersistent != NULL) {
+                                RefreshSearch();
+                        }
+                        m_pStatusBar->InsertarTarea(pEvt->GetComando()->GetId(), pEvt->GetTexto());
+                }
+                break;
+                case GNC::GCS::Events::EventoProgresoComando::TEP_Progreso:
+                        //
+                        m_pStatusBar->SetProgresoTarea(pEvt->GetComando()->GetId(), pEvt->GetProgresoNormalizado(), pEvt->GetTexto());
+                        break;
+                case GNC::GCS::Events::EventoProgresoComando::TEP_Finalizado: {
+                        m_pStatusBar->EliminarTarea(pEvt->GetComando()->GetId());
+                        GNC::GCS::IPersistentCommand* pPersistent = dynamic_cast<GNC::GCS::IPersistentCommand*> (pEvt->GetComando());
+                        if (pPersistent != NULL) {
+                                RefreshSearch();
+                        }
+                }
+                break;
+                case GNC::GCS::Events::EventoProgresoComando::TEP_Unknown:
+                        break;
+                }
+        }
+        break;
+        }
+}
+
+//endregion
diff --git a/cadxcore/main/gui/history3/historypanel3.h b/cadxcore/main/gui/history3/historypanel3.h
new file mode 100644
index 0000000..cb0edb1
--- /dev/null
+++ b/cadxcore/main/gui/history3/historypanel3.h
@@ -0,0 +1,144 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+#include <wx/dataview.h>
+
+#include <api/autoptr.h>
+#include "historypanel3base.h"
+
+#include <api/observers/ieventsobserver.h>
+#include <api/controllers/imodulecontroller.h>
+#include <main/controllers/historytoolscontroller.h>
+#include <main/controllers/historycontroller.h>
+
+class wxImage;
+class wxDataViewCtrl;
+namespace GNC
+{
+class StreamingLoader;
+namespace GCS
+{
+class HangingProtocol;
+}
+namespace GUI
+{
+class HistoryToolMenu;
+class HistoryTableModel;
+class ReloadHistoryTimer;
+class StatusBarProgreso;
+class wxPopUpMenuThumbnails;
+
+class HistoryPanel3: public HistoryPanel3Base, public GNC::GCS::IHistoryPanel, public GNC::GCS::IEventsObserver
+{
+        friend class wxPopUpMenuThumbnails;
+public:
+        static HistoryPanel3* Instance();
+        static void FreeInstance();
+
+protected:
+        HistoryPanel3(wxWindow* pParent);
+        ~HistoryPanel3();
+        static HistoryPanel3* m_pInstance;
+
+public:
+        virtual bool Show(bool show = true);
+        virtual void ReloadHistory();
+        virtual void ReloadToolBar();
+        virtual void ReloadCombos(bool checkPurgue);
+
+        virtual void RefreshSearch(bool force = false);
+        virtual void GetSelectedSeriesPk(std::list<long>& listOfPks);
+        virtual wxWindow* GetWxWindow()
+        {
+                return this;
+        }
+
+protected:
+        virtual void OnHistoryPanelIdle( wxIdleEvent& event );
+        virtual void doRefresh(bool force = false);
+        void RefreshPatientFilter();
+        void RefreshModalityFilter();
+        void RefreshDateFilter();
+
+        /** Advanced Search button toggled **/
+        virtual void OnAdvancedSearchToggled( wxCommandEvent& event );
+
+        virtual void OnClose(wxCloseEvent &event);
+        virtual void OnSearchChange( wxCommandEvent& event );
+        void OnDateChanged( wxDateEvent& /*event*/ );
+        virtual void OnTreeItemActivated(wxDataViewEvent& event);
+        virtual void OnTreeItemMenu(wxDataViewEvent& event);
+        void ShowPreviewPanel(bool visible);
+        virtual void OnTreeSelChanged(wxDataViewEvent& event);
+        virtual void OnTreeKeyDown(wxKeyEvent& event);
+        virtual void OnThumbnailSelected(wxThumbnailEvent& evt);
+        virtual void OnThumbnailDClick(wxThumbnailEvent& evt);
+        virtual void OnThumbnailRClick(wxThumbnailEvent& evt);
+
+        virtual void OnOpenMenu(wxCommandEvent& event);
+        virtual void OnOpenWithMenu(wxCommandEvent& event);
+        virtual void OnDelete(wxCommandEvent& event);
+        virtual void OnClearHistory(wxCommandEvent& event);
+        virtual void OnSynchronizeSelected(wxCommandEvent& event);
+
+        GNC::GCS::IVista* GetViewFromSeries(long pk_series);
+
+public:
+        void OpenSeriesOrStudyWith( long pk_series, bool isSeries);
+        void OpenSeriesOrStudy(long pk_series, bool isSeries, bool force = false);
+        void OpenSeries(GNC::GCS::HistoryController::SeriesModelList& seriesModel, GNC::GCS::IModuleController* pModulo, int idModo, GNC::GCS::Ptr<GNC::GCS::HangingProtocol> hangingProtocol = NULL);
+
+public:
+        void ClearHistory();
+        void RemoveSelected();
+        void SelectAll();
+        void DeselectAll();
+        void SynchronizeSelected();
+protected:
+        void LoadPreviewsFromStudy(const GNC::GCS::Ptr<GNC::GCS::IHistoryController::StudyModel>& pModel);
+        void LoadPreviewsFromSeries(const GNC::GCS::Ptr<GNC::GCS::IHistoryController::SeriesModel>& pModel);
+
+public:
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+protected:
+        typedef std::list<wxCheckBox*>  TModalitiesVector;
+        TModalitiesVector m_modalitiesList;
+        HistoryToolMenu*	m_pToolBar;
+
+        wxObjectDataPtr<HistoryTableModel> m_pHistoryTableModel;
+        wxDataViewCtrl* m_pHistoryTableView;
+
+        ReloadHistoryTimer* m_pTimerReload;
+        GNC::GUI::StatusBarProgreso* m_pStatusBar;
+        std::string m_currentPreviewedFile;
+        //previews...
+        GNC::GCS::Ptr<GNC::StreamingLoader> Loader;
+        bool m_RefreshOnIdle;
+
+        GNC::GCS::History::StudyPatientFilter m_patientFilter;
+        GNC::GCS::History::StudyModalityFilter m_modalityFilter;
+        GNC::GCS::History::AcquisitionDateFilter m_dateFilter;
+};
+}
+}
diff --git a/cadxcore/main/gui/history3/historypanel3base.cpp b/cadxcore/main/gui/history3/historypanel3base.cpp
new file mode 100644
index 0000000..9d29878
--- /dev/null
+++ b/cadxcore/main/gui/history3/historypanel3base.cpp
@@ -0,0 +1,511 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "historypanel3base.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+HistoryPanel3Base::HistoryPanel3Base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 800,600 ), wxDefaultSize );
+
+        m_pMenuBar = new wxMenuBar( 0 );
+        this->SetMenuBar( m_pMenuBar );
+
+        wxBoxSizer* m_pMainSizer;
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pSizerToolBar = new wxBoxSizer( wxVERTICAL );
+
+
+        m_pMainSizer->Add( m_pSizerToolBar, 0, wxEXPAND, 5 );
+
+        m_pSearchPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer20;
+        bSizer20 = new wxBoxSizer( wxVERTICAL );
+
+        wxFlexGridSizer* m_pSizerCamposBusqueda;
+        m_pSizerCamposBusqueda = new wxFlexGridSizer( 2, 1, 0, 0 );
+        m_pSizerCamposBusqueda->AddGrowableCol( 0 );
+        m_pSizerCamposBusqueda->AddGrowableRow( 0 );
+        m_pSizerCamposBusqueda->AddGrowableRow( 1 );
+        m_pSizerCamposBusqueda->SetFlexibleDirection( wxBOTH );
+        m_pSizerCamposBusqueda->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        wxBoxSizer* m_pPatientSearchSizer;
+        m_pPatientSearchSizer = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer33;
+        bSizer33 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pPatientLabelStr = new wxStaticText( m_pSearchPanel, wxID_ANY, _("Patient"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pPatientLabelStr->Wrap( -1 );
+        m_pPatientLabelStr->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+        bSizer33->Add( m_pPatientLabelStr, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pPatientCombo = new wxComboBox( m_pSearchPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+        bSizer33->Add( m_pPatientCombo, 1, wxALL|wxEXPAND, 5 );
+
+        m_pAdvancedSearchButton = new wxToggleButton( m_pSearchPanel, wxID_ANY, _("Advanced search"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer33->Add( m_pAdvancedSearchButton, 0, wxALL, 5 );
+
+
+        m_pPatientSearchSizer->Add( bSizer33, 1, wxEXPAND, 5 );
+
+
+        m_pSizerCamposBusqueda->Add( m_pPatientSearchSizer, 1, wxEXPAND, 2 );
+
+        m_pAdvancedSearchPanel = new wxPanel( m_pSearchPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pAdvancedSearchPanel->Hide();
+
+        wxBoxSizer* m_pAdvancedSearchSizer;
+        m_pAdvancedSearchSizer = new wxBoxSizer( wxHORIZONTAL );
+
+        wxStaticBoxSizer* sbSizer2;
+        sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( m_pAdvancedSearchPanel, wxID_ANY, _("Acquisition date") ), wxVERTICAL );
+
+        wxBoxSizer* bSizer17;
+        bSizer17 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer181;
+        bSizer181 = new wxBoxSizer( wxVERTICAL );
+
+        m_pAnyDate = new wxRadioButton( m_pAdvancedSearchPanel, wxID_ANY, _("Any date"), wxDefaultPosition, wxDefaultSize, wxRB_GROUP );
+        m_pAnyDate->SetValue( true );
+        bSizer181->Add( m_pAnyDate, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 2 );
+
+        m_pTodayAM = new wxRadioButton( m_pAdvancedSearchPanel, wxID_ANY, _("Today AM"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer181->Add( m_pTodayAM, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        m_pTodayPM = new wxRadioButton( m_pAdvancedSearchPanel, wxID_ANY, _("Today PM"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer181->Add( m_pTodayPM, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        m_pToday = new wxRadioButton( m_pAdvancedSearchPanel, wxID_ANY, _("Today"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer181->Add( m_pToday, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+
+        bSizer17->Add( bSizer181, 1, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer29;
+        bSizer29 = new wxBoxSizer( wxVERTICAL );
+
+        m_pYesterday = new wxRadioButton( m_pAdvancedSearchPanel, wxID_ANY, _("Yesterday"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer29->Add( m_pYesterday, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 2 );
+
+        m_pLastWeek = new wxRadioButton( m_pAdvancedSearchPanel, wxID_ANY, _("Last 7 days"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer29->Add( m_pLastWeek, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        m_pLastMonth = new wxRadioButton( m_pAdvancedSearchPanel, wxID_ANY, _("Last 30 days"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer29->Add( m_pLastMonth, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        m_pLastThreeMonths = new wxRadioButton( m_pAdvancedSearchPanel, wxID_ANY, _("Last 3 months"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer29->Add( m_pLastThreeMonths, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+
+        bSizer17->Add( bSizer29, 1, wxEXPAND, 5 );
+
+        wxBoxSizer* bSizer201;
+        bSizer201 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBetween = new wxRadioButton( m_pAdvancedSearchPanel, wxID_ANY, _("Between:"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer201->Add( m_pBetween, 0, wxALIGN_CENTER_VERTICAL|wxALL, 2 );
+
+        wxBoxSizer* bSizer21;
+        bSizer21 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTextControlFechaDesde = new wxDatePickerCtrl( m_pAdvancedSearchPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_DROPDOWN );
+        bSizer21->Add( m_pTextControlFechaDesde, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 2 );
+
+
+        bSizer201->Add( bSizer21, 0, wxEXPAND|wxLEFT, 5 );
+
+        wxBoxSizer* bSizer22;
+        bSizer22 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTextControlFechaHasta = new wxDatePickerCtrl( m_pAdvancedSearchPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_DROPDOWN );
+        bSizer22->Add( m_pTextControlFechaHasta, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 2 );
+
+
+        bSizer201->Add( bSizer22, 0, wxEXPAND|wxLEFT, 5 );
+
+
+        bSizer17->Add( bSizer201, 0, wxEXPAND, 5 );
+
+
+        sbSizer2->Add( bSizer17, 1, wxEXPAND|wxALL, 5 );
+
+
+        m_pAdvancedSearchSizer->Add( sbSizer2, 1, wxEXPAND|wxRIGHT, 5 );
+
+        wxStaticBoxSizer* sbSizer3;
+        sbSizer3 = new wxStaticBoxSizer( new wxStaticBox( m_pAdvancedSearchPanel, wxID_ANY, _("Modalities") ), wxVERTICAL );
+
+        m_pModalitySizer = new wxGridSizer( 5, 5, 0, 0 );
+
+
+        sbSizer3->Add( m_pModalitySizer, 1, wxEXPAND|wxALL, 5 );
+
+
+        m_pAdvancedSearchSizer->Add( sbSizer3, 1, wxEXPAND|wxLEFT, 5 );
+
+
+        m_pAdvancedSearchPanel->SetSizer( m_pAdvancedSearchSizer );
+        m_pAdvancedSearchPanel->Layout();
+        m_pAdvancedSearchSizer->Fit( m_pAdvancedSearchPanel );
+        m_pSizerCamposBusqueda->Add( m_pAdvancedSearchPanel, 1, wxEXPAND | wxALL, 5 );
+
+
+        bSizer20->Add( m_pSizerCamposBusqueda, 1, wxEXPAND, 5 );
+
+
+        m_pSearchPanel->SetSizer( bSizer20 );
+        m_pSearchPanel->Layout();
+        bSizer20->Fit( m_pSearchPanel );
+        m_pMainSizer->Add( m_pSearchPanel, 0, wxEXPAND, 5 );
+
+        m_splitter1 = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
+        m_splitter1->Connect( wxEVT_IDLE, wxIdleEventHandler( HistoryPanel3Base::m_splitter1OnIdle ), NULL, this );
+        m_splitter1->SetMinimumPaneSize( 20 );
+
+        m_pPanelResults = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelResults->SetMinSize( wxSize( -1,100 ) );
+
+        m_pTreeListSizer = new wxBoxSizer( wxVERTICAL );
+
+
+        m_pPanelResults->SetSizer( m_pTreeListSizer );
+        m_pPanelResults->Layout();
+        m_pTreeListSizer->Fit( m_pPanelResults );
+        m_pPanelPreviews = new wxPanel( m_splitter1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelPreviews->SetMinSize( wxSize( -1,100 ) );
+
+        wxBoxSizer* bSizer71;
+        bSizer71 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pThumbnails = new wxThumbnailCtrl(m_pPanelPreviews, -1, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL|wxTH_MULTIPLE_SELECT);
+
+        bSizer71->Add( m_pThumbnails, 20, wxEXPAND, 5 );
+
+        ViewInteractor2D  = new wxVTKRenderWindowInteractor(m_pPanelPreviews, wxID_ANY,
+                        wxDefaultPosition,
+                        wxDefaultSize,
+                        wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
+                        wxT(""));
+
+        ViewImage2D = vtkSmartPointer<vtkGinkgoImageViewer> ::New();
+
+        vtkSmartPointer<vtkRenderer> rend1 = vtkSmartPointer<vtkRenderer>::New();
+
+        ViewImage2D->SetRenderWindow ( this->ViewInteractor2D->GetRenderWindow() );
+        ViewImage2D->SetRenderer (rend1);
+
+        bSizer71->Add( ViewInteractor2D, 18, wxEXPAND, 5 );
+
+        m_pHideInteractorPanel = new wxPanel( m_pPanelPreviews, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHideInteractorPanel->SetBackgroundColour( wxColour( 0, 0, 0 ) );
+        m_pHideInteractorPanel->Hide();
+
+        bSizer71->Add( m_pHideInteractorPanel, 18, wxEXPAND, 5 );
+
+
+        m_pPanelPreviews->SetSizer( bSizer71 );
+        m_pPanelPreviews->Layout();
+        bSizer71->Fit( m_pPanelPreviews );
+        m_splitter1->SplitHorizontally( m_pPanelResults, m_pPanelPreviews, 0 );
+        m_pMainSizer->Add( m_splitter1, 1, wxEXPAND, 5 );
+
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HistoryPanel3Base::OnClose ) );
+        this->Connect( wxEVT_IDLE, wxIdleEventHandler( HistoryPanel3Base::OnHistoryPanelIdle ) );
+        m_pAdvancedSearchButton->Connect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( HistoryPanel3Base::OnAdvancedSearchToggled ), NULL, this );
+        m_pAnyDate->Connect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pAnyDate->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pTodayAM->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pTodayAM->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pTodayPM->Connect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pTodayPM->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pToday->Connect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pToday->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pYesterday->Connect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pYesterday->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pLastWeek->Connect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pLastWeek->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pLastMonth->Connect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pLastMonth->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pLastThreeMonths->Connect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pLastThreeMonths->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pBetween->Connect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pBetween->Connect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pTextControlFechaDesde->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( HistoryPanel3Base::OnDateChanged ), NULL, this );
+        m_pTextControlFechaDesde->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pTextControlFechaHasta->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( HistoryPanel3Base::OnDateChanged ), NULL, this );
+        m_pTextControlFechaHasta->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+}
+
+HistoryPanel3Base::~HistoryPanel3Base()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( HistoryPanel3Base::OnClose ) );
+        this->Disconnect( wxEVT_IDLE, wxIdleEventHandler( HistoryPanel3Base::OnHistoryPanelIdle ) );
+        m_pAdvancedSearchButton->Disconnect( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, wxCommandEventHandler( HistoryPanel3Base::OnAdvancedSearchToggled ), NULL, this );
+        m_pAnyDate->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pAnyDate->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pTodayAM->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pTodayAM->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pTodayPM->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pTodayPM->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pToday->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pToday->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pYesterday->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pYesterday->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pLastWeek->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pLastWeek->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pLastMonth->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pLastMonth->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pLastThreeMonths->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pLastThreeMonths->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pBetween->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pBetween->Disconnect( wxEVT_COMMAND_RADIOBUTTON_SELECTED, wxCommandEventHandler( HistoryPanel3Base::OnSearchChange ), NULL, this );
+        m_pTextControlFechaDesde->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( HistoryPanel3Base::OnDateChanged ), NULL, this );
+        m_pTextControlFechaDesde->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+        m_pTextControlFechaHasta->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( HistoryPanel3Base::OnDateChanged ), NULL, this );
+        m_pTextControlFechaHasta->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( HistoryPanel3Base::OnKeyDownFormulario ), NULL, this );
+
+}
+
+ConfirmDeleteDialogBase::ConfirmDeleteDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 550,220 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+        m_body = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer22;
+        bSizer22 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTitled = new TitledPanel( m_body, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pTitled->SetToolTip( _("Confirm removal") );
+
+        wxBoxSizer* bSizer23;
+        bSizer23 = new wxBoxSizer( wxVERTICAL );
+
+
+        bSizer23->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pLabelEliminar = new wxStaticText( m_pTitled, wxID_ANY, _("Are you sure you want to delete "), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelEliminar->Wrap( 450 );
+        bSizer23->Add( m_pLabelEliminar, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+
+        bSizer23->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+        m_pTitled->SetSizer( bSizer23 );
+        m_pTitled->Layout();
+        bSizer23->Fit( m_pTitled );
+        bSizer22->Add( m_pTitled, 1, wxEXPAND, 5 );
+
+
+        m_body->SetSizer( bSizer22 );
+        m_body->Layout();
+        bSizer22->Fit( m_body );
+        bSizer5->Add( m_body, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pEliminar = new wxButton( m_pFooter, wxID_ANY, _("Remove"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer7->Add( m_pEliminar, 0, wxRIGHT, 5 );
+
+        m_pCancelar = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pCancelar->SetDefault();
+        bSizer7->Add( m_pCancelar, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer7 );
+        m_pFooter->Layout();
+        bSizer7->Fit( m_pFooter );
+        bSizer5->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer5 );
+        this->Layout();
+        bSizer5->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pEliminar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfirmDeleteDialogBase::OnEliminarClick ), NULL, this );
+        m_pCancelar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfirmDeleteDialogBase::OnCancelarClick ), NULL, this );
+}
+
+ConfirmDeleteDialogBase::~ConfirmDeleteDialogBase()
+{
+        // Disconnect Events
+        m_pEliminar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfirmDeleteDialogBase::OnEliminarClick ), NULL, this );
+        m_pCancelar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( ConfirmDeleteDialogBase::OnCancelarClick ), NULL, this );
+
+}
+
+OpenWithDialogBase::OpenWithDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 500,350 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer2;
+        bSizer2 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelTitulo = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelTitulo->SetToolTip( _("Choose the view you want to use to open file/s") );
+
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxVERTICAL );
+
+        m_pListaVistas = new wxListBox( m_pPanelTitulo, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE );
+        bSizer16->Add( m_pListaVistas, 1, wxEXPAND, 5 );
+
+        m_pCheckUtilizarSiempre = new wxCheckBox( m_pPanelTitulo, wxID_ANY, _("Always use this view to open these files"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_pCheckUtilizarSiempre, 0, wxTOP, 5 );
+
+
+        m_pPanelTitulo->SetSizer( bSizer16 );
+        m_pPanelTitulo->Layout();
+        bSizer16->Fit( m_pPanelTitulo );
+        bSizer15->Add( m_pPanelTitulo, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer15 );
+        m_pBody->Layout();
+        bSizer15->Fit( m_pBody );
+        bSizer2->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer3;
+        bSizer3 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button3 = new wxButton( m_pFooter, wxID_OK, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button3->SetDefault();
+        bSizer3->Add( m_button3, 0, wxRIGHT, 5 );
+
+        m_button4 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer3->Add( m_button4, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer3 );
+        m_pFooter->Layout();
+        bSizer3->Fit( m_pFooter );
+        bSizer2->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer2 );
+        this->Layout();
+        bSizer2->Fit( this );
+
+        // Connect Events
+        m_pListaVistas->Connect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( OpenWithDialogBase::OnAceptarClick ), NULL, this );
+        m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenWithDialogBase::OnAceptarClick ), NULL, this );
+}
+
+OpenWithDialogBase::~OpenWithDialogBase()
+{
+        // Disconnect Events
+        m_pListaVistas->Disconnect( wxEVT_COMMAND_LISTBOX_DOUBLECLICKED, wxCommandEventHandler( OpenWithDialogBase::OnAceptarClick ), NULL, this );
+        m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( OpenWithDialogBase::OnAceptarClick ), NULL, this );
+
+}
+
+SynchronizeDialogBase::SynchronizeDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 520,250 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelMessage = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelMessage->SetToolTip( _("Synchronize files") );
+
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxVERTICAL );
+
+        m_pLabel = new wxStaticText( m_pPanelMessage, wxID_ANY, _("There are files that has to be downloaded to local database before executing this action, \ndo you want to synchornize files now?"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->Wrap( -1 );
+        bSizer4->Add( m_pLabel, 0, wxALL, 5 );
+
+
+        m_pPanelMessage->SetSizer( bSizer4 );
+        m_pPanelMessage->Layout();
+        bSizer4->Fit( m_pPanelMessage );
+        bSizer7->Add( m_pPanelMessage, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer15->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button4 = new wxButton( m_pFooter, wxID_OK, _("Synchronize"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button4->SetDefault();
+        bSizer16->Add( m_button4, 0, wxRIGHT, 5 );
+
+        m_button5 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button5, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer16 );
+        m_pFooter->Layout();
+        bSizer16->Fit( m_pFooter );
+        bSizer15->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer15 );
+        this->Layout();
+        bSizer15->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SynchronizeDialogBase::OnSynchronize ), NULL, this );
+}
+
+SynchronizeDialogBase::~SynchronizeDialogBase()
+{
+        // Disconnect Events
+        m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SynchronizeDialogBase::OnSynchronize ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/history3/historypanel3base.h b/cadxcore/main/gui/history3/historypanel3base.h
new file mode 100644
index 0000000..340202b
--- /dev/null
+++ b/cadxcore/main/gui/history3/historypanel3base.h
@@ -0,0 +1,225 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __HISTORYPANEL3BASE_H__
+#define __HISTORYPANEL3BASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class TitledPanel;
+
+#include <wx/string.h>
+#include <wx/menu.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/sizer.h>
+#include <wx/stattext.h>
+#include <wx/combobox.h>
+#include <wx/tglbtn.h>
+#include <wx/radiobut.h>
+#include <wx/datectrl.h>
+#include <wx/dateevt.h>
+#include <wx/statbox.h>
+#include <wx/panel.h>
+#include <wx/thumbnailctrl/thumbnailctrl.h>
+#undef __DEPRECATED
+#include <vtkRenderer.h>
+#include <vtkSmartPointer.h>
+#include <wxVTKRenderWindowInteractor.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <wx/splitter.h>
+#include <wx/frame.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+#include <wx/listbox.h>
+#include <wx/checkbox.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class HistoryPanel3Base
+///////////////////////////////////////////////////////////////////////////////
+class HistoryPanel3Base : public wxFrame
+{
+private:
+
+protected:
+        wxBoxSizer* m_pSizerToolBar;
+        wxPanel* m_pSearchPanel;
+        wxStaticText* m_pPatientLabelStr;
+        wxComboBox* m_pPatientCombo;
+        wxToggleButton* m_pAdvancedSearchButton;
+        wxPanel* m_pAdvancedSearchPanel;
+        wxRadioButton* m_pAnyDate;
+        wxRadioButton* m_pTodayAM;
+        wxRadioButton* m_pTodayPM;
+        wxRadioButton* m_pToday;
+        wxRadioButton* m_pYesterday;
+        wxRadioButton* m_pLastWeek;
+        wxRadioButton* m_pLastMonth;
+        wxRadioButton* m_pLastThreeMonths;
+        wxRadioButton* m_pBetween;
+        wxDatePickerCtrl* m_pTextControlFechaDesde;
+        wxDatePickerCtrl* m_pTextControlFechaHasta;
+        wxGridSizer* m_pModalitySizer;
+        wxSplitterWindow* m_splitter1;
+        wxPanel* m_pPanelResults;
+        wxBoxSizer* m_pTreeListSizer;
+        wxPanel* m_pPanelPreviews;
+        wxThumbnailCtrl* m_pThumbnails;
+        vtkSmartPointer<wxVTKRenderWindowInteractor> ViewInteractor2D;
+        vtkSmartPointer<vtkGinkgoImageViewer> ViewImage2D;
+        wxPanel* m_pHideInteractorPanel;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnClose( wxCloseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnHistoryPanelIdle( wxIdleEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAdvancedSearchToggled( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnKeyDownFormulario( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSearchChange( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnDateChanged( wxDateEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+        wxMenuBar* m_pMenuBar;
+
+        HistoryPanel3Base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Medical history"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800,600 ), long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU|wxTAB_TRAVERSAL );
+
+        ~HistoryPanel3Base();
+
+        void m_splitter1OnIdle( wxIdleEvent& )
+        {
+                m_splitter1->SetSashPosition( 0 );
+                m_splitter1->Disconnect( wxEVT_IDLE, wxIdleEventHandler( HistoryPanel3Base::m_splitter1OnIdle ), NULL, this );
+        }
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class ConfirmDeleteDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class ConfirmDeleteDialogBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_body;
+        TitledPanel* m_pTitled;
+        wxStaticText* m_pLabelEliminar;
+        FooterPanel* m_pFooter;
+        wxButton* m_pEliminar;
+        wxButton* m_pCancelar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnEliminarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancelarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        ConfirmDeleteDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Confirm removal"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~ConfirmDeleteDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class OpenWithDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class OpenWithDialogBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelTitulo;
+        wxListBox* m_pListaVistas;
+        wxCheckBox* m_pCheckUtilizarSiempre;
+        FooterPanel* m_pFooter;
+        wxButton* m_button3;
+        wxButton* m_button4;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnAceptarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        OpenWithDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Open With ..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~OpenWithDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class SynchronizeDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class SynchronizeDialogBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelMessage;
+        wxStaticText* m_pLabel;
+        FooterPanel* m_pFooter;
+        wxButton* m_button4;
+        wxButton* m_button5;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnSynchronize( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        SynchronizeDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronize files"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~SynchronizeDialogBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__HISTORYPANEL3BASE_H__
diff --git a/cadxcore/main/gui/history3/historytablemodel.cpp b/cadxcore/main/gui/history3/historytablemodel.cpp
new file mode 100644
index 0000000..664801a
--- /dev/null
+++ b/cadxcore/main/gui/history3/historytablemodel.cpp
@@ -0,0 +1,644 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <map>
+#include "historytablemodel.h"
+#include <main/controllers/controladorlog.h>
+#include <set>
+#include <wx/imaglist.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#define SIZE_ICONOS 16
+
+#define ICONO_LOCAL_DATABASE 0
+#define ICONO_LOCAL_LINKED 1
+#define ICONO_WADO_LINKED 2
+#define ICONO_LOCAL_DATABASE_RECENT 3
+#define ICONO_LOCAL_LINKED_RECENT 4
+#define ICONO_WADO_LINKED_RECENT 5
+
+GNC::GUI::HistoryNode::HistoryNode(const GNC::GCS::IHistoryController::StudyModel& study): pParent(NULL)
+{
+        pStudy = GNC::GCS::Ptr<GNC::GCS::IHistoryController::StudyModel>(new GNC::GCS::IHistoryController::StudyModel(study));
+}
+
+GNC::GUI::HistoryNode::HistoryNode(const GNC::GCS::IHistoryController::SeriesModel& series, HistoryNode* parent):pParent(parent)
+{
+        pSeries = GNC::GCS::Ptr<GNC::GCS::IHistoryController::SeriesModel>(new GNC::GCS::IHistoryController::SeriesModel(series));
+}
+
+GNC::GUI::HistoryNode::HistoryNode(): pParent(NULL)
+{
+}
+
+GNC::GUI::HistoryNode::~HistoryNode()
+{
+        for (TMapIndex::iterator it = seriesMap.begin(); it !=  seriesMap.end(); ++it) {
+                delete (*it).second;
+        }
+}
+
+bool GNC::GUI::HistoryNode::IsStudyModel() const
+{
+        return pStudy.IsValid();
+}
+
+bool GNC::GUI::HistoryNode::IsSeriesModel() const
+{
+        return pSeries.IsValid();
+}
+
+GNC::GUI::HistoryNode* GNC::GUI::HistoryNode::GetParent()
+{
+        return pParent;
+}
+
+//if creation datetime is < now - 2 h => si se ha recibido antes de dos horas
+bool GNC::GUI::HistoryNode::IsRecent()
+{
+        wxDateTime creationDate;
+        if (IsSeriesModel()) {
+                creationDate.ParseFormat(wxString::FromUTF8( GetSeriesModel()->created_time.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+        } else {
+                creationDate.ParseFormat(wxString::FromUTF8( GetStudyModel()->created_time.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+        }
+        wxTimeSpan diff = wxDateTime::Now().Subtract(creationDate);
+        return diff.GetHours() < 2;
+}
+
+void GNC::GUI::HistoryNode::UpdateStudyModel(const GNC::GCS::IHistoryController::StudyModel& studyModel, wxDataViewItemArray& itemsAdded, wxDataViewItemArray& itemsChanged)
+{
+        if (pStudy.IsValid()) {
+                *pStudy = studyModel;
+                //if it's expanded... retry...
+                if (!seriesMap.empty()) {
+                        //insert or update series....
+                        GNC::GCS::ILocker lock(this);
+                        GNC::GCS::IHistoryController::SeriesModelList seriesList;
+                        GNC::GCS::IHistoryController::Instance()->GetSeriesFromStudy(GetStudyModel()->pk, seriesList);
+                        for(GNC::GCS::IHistoryController::SeriesModelList::const_iterator it = seriesList.begin(); it != seriesList.end(); ++it) {
+                                if (seriesMap.find((*it).pk) != seriesMap.end()) {
+                                        seriesMap[(*it).pk]->UpdateSeriesModel((*it));
+                                        itemsChanged.push_back(wxDataViewItem(seriesMap[(*it).pk]));
+                                } else {
+                                        HistoryNode* seriesNode = new HistoryNode((*it), this);
+                                        seriesMap[(*it).pk] = seriesNode;
+                                        itemsAdded.push_back(wxDataViewItem(seriesMap[(*it).pk]));
+                                }
+                        }
+                }
+        }
+}
+
+void GNC::GUI::HistoryNode::UpdateSeriesModel(const GNC::GCS::IHistoryController::SeriesModel& seriesModel)
+{
+        if (pSeries.IsValid()) {
+                *pSeries = seriesModel;
+        }
+}
+
+const GNC::GCS::Ptr<GNC::GCS::IHistoryController::StudyModel>& GNC::GUI::HistoryNode::GetStudyModel()
+{
+        return pStudy;
+}
+
+const GNC::GCS::Ptr<GNC::GCS::IHistoryController::SeriesModel>& GNC::GUI::HistoryNode::GetSeriesModel()
+{
+        return pSeries;
+}
+
+unsigned int GNC::GUI::HistoryNode::GetChildren(wxDataViewItemArray &array )
+{
+        if (IsSeriesModel()) {
+                return 0;
+        } else if (IsStudyModel()) {
+                ReloadSeries();
+                GNC::GCS::ILocker lock(this);
+                for (TMapIndex::const_iterator it = seriesMap.begin(); it != seriesMap.end(); ++it) {
+                        array.Add( wxDataViewItem( (void*) (*it).second) );
+                }
+                return seriesMap.size();
+        } else {
+                return 0;
+        }
+}
+
+void GNC::GUI::HistoryNode::GetSeriesModel(SeriesModelList& seriesList)
+{
+        if (IsSeriesModel()) {
+                seriesList.push_back(GetSeriesModel());
+        } else if (IsStudyModel()) {
+                ReloadSeries();
+                GNC::GCS::ILocker lock(this);
+                for (TMapIndex::const_iterator it = seriesMap.begin(); it != seriesMap.end(); ++it) {
+                        seriesList.push_back((*it).second->GetSeriesModel());
+                }
+        }
+
+}
+
+void GNC::GUI::HistoryNode::ReloadSeries()
+{
+        if (IsSeriesModel()) {
+                return;
+        } else {
+                if (seriesMap.empty()) {
+                        GNC::GCS::ILocker lock(this);
+                        GNC::GCS::IHistoryController::SeriesModelList seriesList;
+                        GNC::GCS::IHistoryController::Instance()->GetSeriesFromStudy(GetStudyModel()->pk, seriesList);
+                        for(GNC::GCS::IHistoryController::SeriesModelList::const_iterator it = seriesList.begin(); it != seriesList.end(); ++it) {
+                                HistoryNode* seriesNode = new HistoryNode((*it), this);
+                                seriesMap[(*it).pk] = seriesNode;
+                        }
+                }
+        }
+}
+
+void GNC::GUI::HistoryNode::DeleteSeries(long seriesPk)
+{
+        GNC::GCS::ILocker lock(this);
+        if (seriesMap.find(seriesPk) != seriesMap.end()) {
+                delete seriesMap.find(seriesPk)->second;
+                seriesMap.erase(seriesMap.find(seriesPk));
+        }
+
+}
+
+/////////////////////////////
+GNC::GUI::HistoryTableModel::HistoryTableModel()
+{
+        m_pImageList = new wxImageList(SIZE_ICONOS,SIZE_ICONOS,true);
+        wxBitmap bmp;
+        bmp = GinkgoResourcesManager::History::GetIcoLocalFile();
+        if (bmp.IsOk()) {
+                m_pImageList->Add(bmp);
+        }
+        bmp = GinkgoResourcesManager::History::GetIcoLocalLinked();
+        if (bmp.IsOk()) {
+                m_pImageList->Add(bmp);
+        }
+        bmp = GinkgoResourcesManager::History::GetIcoWadoLinked();
+        if (bmp.IsOk()) {
+                m_pImageList->Add(bmp);
+        }
+        bmp = GinkgoResourcesManager::History::GetIcoLocalFileRecent();
+        if (bmp.IsOk()) {
+                m_pImageList->Add(bmp);
+        }
+        bmp = GinkgoResourcesManager::History::GetIcoLocalLinkedRecent();
+        if (bmp.IsOk()) {
+                m_pImageList->Add(bmp);
+        }
+        bmp = GinkgoResourcesManager::History::GetIcoWadoLinkedRecent();
+        if (bmp.IsOk()) {
+                m_pImageList->Add(bmp);
+        }
+}
+
+
+GNC::GUI::HistoryTableModel::~HistoryTableModel()
+{
+        ClearStudyMap();
+        delete m_pImageList;
+}
+
+void GNC::GUI::HistoryTableModel::ClearStudyMap()
+{
+        for (TMapIndex::iterator it = studyMap.begin(); it !=  studyMap.end(); ++it) {
+                delete (*it).second;
+        }
+        studyMap.clear();
+}
+
+unsigned int GNC::GUI::HistoryTableModel::GetColumnCount() const
+{
+        return COL_HISTORY_MAX;
+}
+
+void GNC::GUI::HistoryTableModel::ReloadTree(const GNC::GCS::IHistoryController::StudyModelList& studyList, bool force)
+{
+        if (force) {
+                wxDataViewItemArray toDeleteList;
+                for (TMapIndex::iterator it = studyMap.begin(); it !=  studyMap.end(); ++it) {
+                        toDeleteList.push_back(wxDataViewItem((*it).second));
+                }
+                DeleteItems(toDeleteList);
+                Cleared();
+                //delete all and reload again...
+                wxDataViewItemArray addList;
+                ClearStudyMap();
+                for (GNC::GCS::IHistoryController::StudyModelList::const_iterator it = studyList.begin(); it != studyList.end(); ++it) {
+                        HistoryNode* pNode = new HistoryNode((*it));
+                        studyMap[(*it).pk] = pNode;
+                        addList.push_back(wxDataViewItem((void*)pNode));
+                }
+                ItemsAdded(wxDataViewItem(0), addList);
+        } else {
+                //check for changes...
+                //remove nodes that doesn't come in this new list
+                std::set<long> setOfpk;
+                for(GNC::GCS::IHistoryController::StudyModelList::const_iterator it = studyList.begin(); it!= studyList.end(); ++it) {
+                        setOfpk.insert((*it).pk);
+                }
+                wxDataViewItemArray toDeleteList;
+                for (TMapIndex::iterator itIndex = studyMap.begin(); itIndex != studyMap.end(); ++itIndex) {
+                        if (setOfpk.find((*itIndex).first) == setOfpk.end()) {
+                                toDeleteList.push_back(wxDataViewItem((void*)(*itIndex).second));
+                        }
+                }
+
+                ItemsDeleted(wxDataViewItem(0), toDeleteList);
+
+                //delete nodes...
+                for (wxDataViewItemArray::iterator it = toDeleteList.begin(); it != toDeleteList.end(); ++it) {
+                        HistoryNode* pNode = (HistoryNode*)(*it).GetID();
+                        studyMap.erase(studyMap.find(pNode->GetStudyModel()->pk));
+                        delete pNode;
+                }
+
+                //insert or update studies....
+                wxDataViewItemArray itemsAdded;
+                wxDataViewItemArray itemsChanged;
+                for(GNC::GCS::IHistoryController::StudyModelList::const_iterator it = studyList.begin(); it!= studyList.end(); ++it) {
+                        if (studyMap.find((*it).pk) != studyMap.end()) {
+                                //update
+                                wxDataViewItemArray itemsAddedToStudy;
+                                studyMap[(*it).pk]->UpdateStudyModel((*it), itemsAddedToStudy, itemsChanged);
+                                if (!itemsAddedToStudy.empty()) {
+                                        ItemsAdded(wxDataViewItem(studyMap[(*it).pk]), itemsAddedToStudy);
+                                }
+                        } else {
+                                //create
+                                HistoryNode* pNode = new HistoryNode((*it));
+                                studyMap[(*it).pk] = pNode;
+                                itemsAdded.push_back(wxDataViewItem(studyMap[(*it).pk]));
+                        }
+                }
+                ItemsChanged(itemsChanged);
+                ItemsAdded(wxDataViewItem(NULL), itemsAdded);
+        }
+}
+
+void GNC::GUI::HistoryTableModel::DeleteItems(wxDataViewItemArray& selected)
+{
+        //first of all delete series Nodes...
+        wxDataViewItemArray toDeleteList;
+        for (wxDataViewItemArray::iterator it = selected.begin(); it != selected.end(); ++it) {
+                if ((*it).IsOk()) {
+                        HistoryNode* pNode = (HistoryNode*) (*it).GetID();
+                        if (pNode->IsSeriesModel()) {
+                                ItemDeleted(wxDataViewItem(pNode->GetParent()), (*it));
+                                pNode->GetParent()->DeleteSeries(pNode->GetSeriesModel()->pk);
+                        } else {
+                                toDeleteList.push_back((*it));
+                        }
+                }
+        }
+        //then delete studies Nodes...
+        ItemsDeleted(wxDataViewItem(0), toDeleteList);
+
+        //delete nodes...
+        for (wxDataViewItemArray::iterator it = toDeleteList.begin(); it != toDeleteList.end(); ++it) {
+                HistoryNode* pNode = (HistoryNode*)(*it).GetID();
+                studyMap.erase(studyMap.find(pNode->GetStudyModel()->pk));
+                delete pNode;
+        }
+}
+
+wxString GNC::GUI::HistoryTableModel::GetColumnType( unsigned int col ) const
+{
+        switch (col) {
+        case COL_ICON:
+                return wxT("wxIcon");
+        case COL_AGE:
+                return wxT("long");
+        default:
+                return wxT("string");
+        }
+}
+
+void GNC::GUI::HistoryTableModel::GetValue( wxVariant &variant, const wxDataViewItem &item, unsigned int col ) const
+{
+        if (!item.IsOk()) {
+                return;
+        }
+        //if it's a study...
+        HistoryNode* pNode = (HistoryNode*)(item.GetID());
+        if (pNode->IsStudyModel()) {
+                const GNC::GCS::Ptr<GNC::GCS::IHistoryController::StudyModel> pModel = pNode->GetStudyModel();
+                switch (col) {
+                case COL_ICON: {
+                        int icono = 0;
+                        if (pNode->IsRecent()) {
+                                switch(pModel->location) {
+                                case GNC::GCS::IHistoryController::TL_LocalDatabase:
+                                        icono = ICONO_LOCAL_DATABASE_RECENT;
+                                        break;
+                                case GNC::GCS::IHistoryController::TL_LocalLinked:
+                                        icono = ICONO_LOCAL_LINKED_RECENT;
+                                        break;
+                                case GNC::GCS::IHistoryController::TL_WadoLinked:
+                                        icono = ICONO_WADO_LINKED_RECENT;
+                                        break;
+                                }
+                        } else {
+                                switch(pModel->location) {
+                                case GNC::GCS::IHistoryController::TL_LocalDatabase:
+                                        icono = ICONO_LOCAL_DATABASE;
+                                        break;
+                                case GNC::GCS::IHistoryController::TL_LocalLinked:
+                                        icono = ICONO_LOCAL_LINKED;
+                                        break;
+                                case GNC::GCS::IHistoryController::TL_WadoLinked:
+                                        icono = ICONO_WADO_LINKED;
+                                        break;
+                                }
+                        }
+                        variant << m_pImageList->GetIcon(icono);
+                }
+                break;
+                case COL_PATIENT_NAME:
+                        variant = wxString::FromUTF8(pModel->pat_name.c_str());
+                        break;
+                case COL_PATIENT_ID:
+                        variant = wxString::FromUTF8(pModel->pat_id.c_str());
+                        break;
+                case COL_AGE:
+                        variant = GetAge(pModel->pat_bithdate, pModel->study_datetime);
+                        break;
+                case COL_MODALITY: {
+                        std::ostringstream ostr;
+                        for (std::list<std::string>::const_iterator it = pModel->mods_in_study.begin(); it != pModel->mods_in_study.end(); ++it) {
+                                if (it != pModel->mods_in_study.begin()) {
+                                        ostr << "/";
+                                }
+                                ostr << (*it);
+                        }
+                        variant = wxString::FromUTF8(ostr.str().c_str());
+                }
+                break;
+                case COL_DESCRIPTION:
+                        variant = wxString::FromUTF8(pModel->study_desc.c_str());
+                        break;
+                case COL_DATE_TIME_ACQUIRED: {
+                        wxDateTime studyDateTime;
+                        studyDateTime.ParseFormat(wxString::FromUTF8( pModel->study_datetime.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        if(studyDateTime.IsValid()) {
+                                variant = wxString(studyDateTime.Format(_("%m/%d/%Y %H:%M:%S"), wxDateTime::TimeZone(wxDateTime::GMT1)));
+                        } else {
+                                variant = _("00/00/0000 00:00:00");
+                        }
+                }
+                break;
+                case COL_DATE_TIME_ADDED: {
+                        wxDateTime studyDateTime;
+                        studyDateTime.ParseFormat(wxString::FromUTF8( pModel->created_time.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        if(studyDateTime.IsValid()) {
+                                variant = wxString(studyDateTime.Format(_("%m/%d/%Y %H:%M:%S"), wxDateTime::TimeZone(wxDateTime::GMT1)));
+                        } else {
+                                variant = _("00/00/0000 00:00:00");
+                        }
+                }
+                break;
+                case COL_ACCNUMBER:
+                        variant = wxString::FromUTF8(pModel->study_acc_no.c_str());
+                        break;
+                default:
+                        LOG_ERROR("HistoryTableModel", "wrong column id " << col);
+                        break;
+                }
+        } else if (pNode->IsSeriesModel()) {
+                const GNC::GCS::Ptr<GNC::GCS::IHistoryController::SeriesModel> pModel = pNode->GetSeriesModel();
+                switch (col) {
+                case COL_ICON: {
+                        int icono = 0;
+                        switch(pModel->location) {
+                        case GNC::GCS::IHistoryController::TL_LocalDatabase:
+                                icono = ICONO_LOCAL_DATABASE;
+                                break;
+                        case GNC::GCS::IHistoryController::TL_LocalLinked:
+                                icono = ICONO_LOCAL_LINKED;
+                                break;
+                        case GNC::GCS::IHistoryController::TL_WadoLinked:
+                                icono = ICONO_WADO_LINKED;
+                                break;
+                        }
+                        variant << m_pImageList->GetIcon(icono);
+                }
+                break;
+                case COL_PATIENT_NAME:
+                        variant = wxString::FromUTF8(pModel->series_desc.c_str());
+                        break;
+                case COL_PATIENT_ID:
+                        variant = wxEmptyString;
+                        break;
+                case COL_AGE:
+                        //nothing to do... variant = wxString(pStudyModel->pat_name);
+                        break;
+                case COL_MODALITY:
+                        variant = wxString::FromUTF8(pModel->series_modality.c_str());
+                        break;
+                case COL_DESCRIPTION:
+                        variant = wxString::FromUTF8(pModel->series_desc.c_str());
+                        break;
+                case COL_DATE_TIME_ACQUIRED: {
+                        wxDateTime seriesDateTime;
+                        seriesDateTime.ParseFormat(wxString::FromUTF8( pModel->series_datetime.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        if(seriesDateTime.IsValid()) {
+                                variant = wxString(seriesDateTime.Format(_("%m/%d/%Y %H:%M:%S"), wxDateTime::TimeZone(wxDateTime::GMT1)));
+                        } else {
+                                variant = _("00/00/0000 00:00:00");
+                        }
+                }
+                break;
+                case COL_DATE_TIME_ADDED: {
+                        wxDateTime seriesDateTime;
+                        seriesDateTime.ParseFormat(wxString::FromUTF8( pModel->created_time.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        if(seriesDateTime.IsValid()) {
+                                variant = wxString(seriesDateTime.Format(_("%m/%d/%Y %H:%M:%S"), wxDateTime::TimeZone(wxDateTime::GMT1)));
+                        } else {
+                                variant = _("00/00/0000 00:00:00");
+                        }
+                }
+                break;
+                case COL_ACCNUMBER:
+                        //nothing to do variant = wxString(pStudyModel->pat_name);
+                        break;
+                default:
+                        LOG_ERROR("HistoryTableModel", "wrong column id " << col);
+                        break;
+                }
+        } else {
+                LOG_ERROR("HistoryTableModel", "invalid node");
+        }
+}
+
+
+
+bool GNC::GUI::HistoryTableModel::SetValue( const wxVariant &/*variant*/,const wxDataViewItem &/*item*/, unsigned int /*col*/ )
+{
+        //model cant be modified...
+        return false;
+}
+
+bool GNC::GUI::HistoryTableModel::IsEnabled( const wxDataViewItem &/*item*/, unsigned int/* col*/ ) const
+{
+        return true;
+}
+
+wxDataViewItem GNC::GUI::HistoryTableModel::GetParent( const wxDataViewItem &item ) const
+{
+        if (!item.IsOk()) {
+                return wxDataViewItem(0);
+        }
+        //if it's a study...
+        HistoryNode* pNode = (HistoryNode*)(item.GetID());
+        return wxDataViewItem( (void*) pNode->GetParent() );
+}
+
+bool GNC::GUI::HistoryTableModel::IsContainer( const wxDataViewItem &item ) const
+{
+        if (!item.IsOk()) {
+                return true;
+        }
+        HistoryNode* pNode = (HistoryNode*)(item.GetID());
+        return pNode->IsStudyModel();
+}
+
+bool GNC::GUI::HistoryTableModel::HasContainerColumns (const wxDataViewItem &/*item*/) const
+{
+        return true;
+}
+
+bool GNC::GUI::HistoryTableModel::HasValue (const wxDataViewItem &item, unsigned col) const
+{
+        if (!item.IsOk()) {
+                return false;
+        }
+        //if it's a study...
+        HistoryNode* pNode = (HistoryNode*)(item.GetID());
+        return (pNode->IsStudyModel()) ||
+               (pNode->IsSeriesModel() && (col!=COL_PATIENT_ID && col != COL_AGE && col!=COL_ACCNUMBER));
+}
+
+
+unsigned int GNC::GUI::HistoryTableModel::GetChildren( const wxDataViewItem &parent, wxDataViewItemArray &array ) const
+{
+        HistoryNode *node = (HistoryNode*) parent.GetID();
+        if (!node) {
+                unsigned int count = studyMap.size();
+                for (TMapIndex::const_iterator it = studyMap.begin(); it !=  studyMap.end(); ++it) {
+                        array.Add( wxDataViewItem( (void*) (*it).second) );
+                }
+                return count;
+        } else if (node->IsStudyModel()) {
+                //return series from study...
+                node->GetChildren(array);
+                return array.Count();
+        } else {
+                //series doesn't have children
+                return 0;
+        }
+}
+
+int GNC::GUI::HistoryTableModel::Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
+                unsigned int column, bool ascending ) const
+{
+        if ((column == COL_DATE_TIME_ACQUIRED || column == COL_DATE_TIME_ADDED) && item1.IsOk() && item2.IsOk()) {
+                HistoryNode *node1 = (HistoryNode*) item1.GetID();
+                HistoryNode *node2 = (HistoryNode*) item2.GetID();
+                wxDateTime date1, date2;
+                if (column == COL_DATE_TIME_ACQUIRED) {
+                        if (node1->IsSeriesModel()) {
+                                date1.ParseFormat(wxString::FromUTF8( node1->GetSeriesModel()->series_datetime.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        } else {
+                                date1.ParseFormat(wxString::FromUTF8( node1->GetStudyModel()->study_datetime.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        }
+                        if (node2->IsSeriesModel()) {
+                                date2.ParseFormat(wxString::FromUTF8( node2->GetSeriesModel()->series_datetime.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        } else {
+                                date2.ParseFormat(wxString::FromUTF8( node2->GetStudyModel()->study_datetime.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        }
+                } else {
+                        if (node1->IsSeriesModel()) {
+                                date1.ParseFormat(wxString::FromUTF8( node1->GetSeriesModel()->created_time.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        } else {
+                                date1.ParseFormat(wxString::FromUTF8( node1->GetStudyModel()->created_time.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        }
+                        if (node2->IsSeriesModel()) {
+                                date2.ParseFormat(wxString::FromUTF8( node2->GetSeriesModel()->created_time.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        } else {
+                                date2.ParseFormat(wxString::FromUTF8( node2->GetStudyModel()->created_time.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                        }
+                }
+
+                int res = 0;
+                if (date1.IsValid() && date2.IsValid()) {
+                        wxTimeSpan diff = date1.Subtract(date2);
+                        if (diff.IsPositive()) {
+                                res = 1;
+                        } else {
+                                res = -1;
+                        }
+                } else if (date1.IsValid()) {
+                        res = 1;
+                } else if (date2.IsValid()) {
+                        res =-1;
+                } else {
+                        res = 0;
+                }
+                if (!ascending) {
+                        if (res == 1) {
+                                res = -1;
+                        } else if (res == -1) {
+                                res = 1;
+                        }
+                }
+                return res;
+        }
+
+        return wxDataViewModel::Compare( item1, item2, column, ascending );
+}
+
+
+long GNC::GUI::HistoryTableModel::GetAge(const std::string& patBirthDate, const std::string& studyDateTime) const
+{
+        wxDateTime birthDate, studyDate;
+        birthDate.ParseFormat(wxString::FromUTF8( patBirthDate.c_str() ).GetData(), wxT("%Y-%m-%d"), wxDefaultDateTime);
+        studyDate.ParseFormat(wxString::FromUTF8( studyDateTime.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+        if (!birthDate.IsValid() || !studyDate.IsValid()) {
+                return -1;
+        }
+        if (studyDate.GetYear() == birthDate.GetYear()) {
+                return 0;
+        } else {
+                if (studyDate.GetMonth() > birthDate.GetMonth()) {
+                        return studyDate.GetYear() - birthDate.GetYear();
+                } else if (studyDate.GetMonth() < birthDate.GetMonth()) {
+                        return studyDate.GetYear() - birthDate.GetYear() -1;
+                } else {
+                        if (studyDate.GetDay() >= birthDate.GetDay()) {
+                                return studyDate.GetYear() - birthDate.GetYear();
+                        } else {
+                                return studyDate.GetYear() - birthDate.GetYear() -1;
+                        }
+                }
+        }
+}
diff --git a/cadxcore/main/gui/history3/historytablemodel.h b/cadxcore/main/gui/history3/historytablemodel.h
new file mode 100644
index 0000000..332883a
--- /dev/null
+++ b/cadxcore/main/gui/history3/historytablemodel.h
@@ -0,0 +1,117 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/dynarray.h>
+#include <wx/dataview.h>
+#include <prvext/prvext.h>
+#include <api/ilock.h>
+#include <api/autoptr.h>
+#include <main/controllers/historycontroller.h>
+
+
+#define COL_ICON			0
+#define COL_PATIENT_NAME	1
+#define COL_PATIENT_ID		2
+#define COL_AGE				3
+#define COL_MODALITY		4
+#define COL_DESCRIPTION		5
+#define COL_DATE_TIME_ACQUIRED		6
+#define COL_ACCNUMBER		7
+#define COL_DATE_TIME_ADDED		8
+#define COL_HISTORY_MAX		9
+
+class wxImageList;
+namespace GNC
+{
+namespace GUI
+{
+class HistoryNode: GNC::GCS::ILockable
+{
+public:
+        typedef std::list<GNC::GCS::Ptr<GNC::GCS::IHistoryController::SeriesModel> > SeriesModelList;
+        HistoryNode(const GNC::GCS::IHistoryController::StudyModel& study);
+        HistoryNode(const GNC::GCS::IHistoryController::SeriesModel& series, HistoryNode* parent);
+        HistoryNode();
+        virtual ~HistoryNode();
+
+        bool IsStudyModel() const;
+        bool IsSeriesModel() const;
+
+        HistoryNode* GetParent();
+
+        //if creation datetime is < now - 2 h => si se ha recibido antes de dos horas
+        bool IsRecent();
+
+        void UpdateStudyModel(const GNC::GCS::IHistoryController::StudyModel& studyModel, wxDataViewItemArray& itemsAdded, wxDataViewItemArray& itemsChanged);
+        void UpdateSeriesModel(const GNC::GCS::IHistoryController::SeriesModel& seriesModel);
+        const GNC::GCS::Ptr<GNC::GCS::IHistoryController::StudyModel>& GetStudyModel();
+        const GNC::GCS::Ptr<GNC::GCS::IHistoryController::SeriesModel>& GetSeriesModel();
+
+        virtual unsigned int GetChildren(wxDataViewItemArray &array) ;
+        virtual void GetSeriesModel(SeriesModelList& seriesList);
+
+        virtual void ReloadSeries();
+        virtual void DeleteSeries(long seriesPk);
+protected:
+        GNC::GCS::Ptr<GNC::GCS::IHistoryController::StudyModel> pStudy;
+        GNC::GCS::Ptr<GNC::GCS::IHistoryController::SeriesModel> pSeries;
+
+        typedef std::map<long, HistoryNode*> TMapIndex;
+        std::map<long, HistoryNode*> seriesMap;
+
+        HistoryNode* pParent;
+};
+
+class HistoryTableModel: public wxDataViewModel
+{
+public:
+        HistoryTableModel();
+        ~HistoryTableModel();
+        void ClearStudyMap();
+
+        //wxDataViewModel methods
+        virtual unsigned int GetColumnCount() const;
+        virtual wxString GetColumnType( unsigned int col ) const;
+        virtual void GetValue( wxVariant &variant,
+                               const wxDataViewItem &item, unsigned int col ) const;
+        virtual bool SetValue( const wxVariant &variant,
+                               const wxDataViewItem &item, unsigned int col );
+        virtual bool IsEnabled( const wxDataViewItem &item, unsigned int col ) const;
+        virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const;
+        virtual bool IsContainer( const wxDataViewItem &item ) const;
+        bool 	HasValue (const wxDataViewItem &item, unsigned col) const;
+        virtual bool HasContainerColumns (const wxDataViewItem &item) const ;
+        virtual unsigned int GetChildren( const wxDataViewItem &parent,
+                                          wxDataViewItemArray &array ) const;
+        int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
+                     unsigned int column, bool ascending ) const;
+        //
+
+        void ReloadTree(const GNC::GCS::HistoryController::StudyModelList& studyList, bool force);
+        void DeleteItems(wxDataViewItemArray& selected);
+
+protected:
+        long GetAge(const std::string& patBirthDate, const std::string& studyDateTime) const;
+        typedef std::map<long, HistoryNode*> TMapIndex;
+        std::map<long, HistoryNode*> studyMap;
+        wxImageList* m_pImageList;
+};
+}
+}
diff --git a/cadxcore/main/gui/history3/historytoolmenu.cpp b/cadxcore/main/gui/history3/historytoolmenu.cpp
new file mode 100644
index 0000000..3b9193f
--- /dev/null
+++ b/cadxcore/main/gui/history3/historytoolmenu.cpp
@@ -0,0 +1,284 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+
+#include <api/globals.h>
+#include <api/ilock.h>
+#include <set>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include "historytoolmenu.h"
+#include "historypanel3.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/entorno.h>
+#include <main/controllers/controladorpermisos.h>
+
+
+#define SIZE_ICONOS 16
+
+#define ID_REMOVE				1766
+#define ID_REMOVE_ALL		1780
+#define ID_FILE_DROP_DOWN	1781
+#define ID_SELECT_ALL	1782
+#define ID_DESELECT		1783
+#define ID_CLOSE_HISTORY		1784
+
+GNC::GUI::HistoryToolMenu::HistoryToolMenu(HistoryPanel3* pParent) : wxGinkgoToolBar(pParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE )
+{
+        HistoryPanel = pParent;
+
+        SetToolBitmapSize(wxSize(16,16));
+
+        //drop down
+        this->Connect(ID_FILE_DROP_DOWN,wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(HistoryToolMenu::OnDropDownOpenFile),NULL, this );
+        this->Connect(ID_REMOVE,wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(HistoryToolMenu::OnDropDownRemove),NULL, this );
+
+        this->Connect( ID_REMOVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(HistoryToolMenu::OnRemove),NULL, this );
+        this->Connect( ID_REMOVE_ALL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(HistoryToolMenu::OnRemoveAll),NULL, this );
+
+        Reload();
+}
+
+GNC::GUI::HistoryToolMenu::~HistoryToolMenu()
+{
+        this->Disconnect(ID_FILE_DROP_DOWN,wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(HistoryToolMenu::OnDropDownOpenFile),NULL, this );
+        this->Disconnect(ID_REMOVE,wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(HistoryToolMenu::OnDropDownRemove),NULL, this );
+
+        this->Disconnect( ID_REMOVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(HistoryToolMenu::OnRemove),NULL, this );
+        this->Disconnect( ID_REMOVE_ALL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(HistoryToolMenu::OnRemoveAll),NULL, this );
+}
+
+
+void GNC::GUI::HistoryToolMenu::Reload()
+{
+        wxMenuBar* pMenuBar = HistoryPanel->m_pMenuBar;
+        while (pMenuBar->GetMenuCount() > 0)
+                delete pMenuBar->Remove(0);
+
+        wxMenu* pHistoryMenu = new wxMenu();
+        wxMenu* pEditMenu = new wxMenu();
+        wxMenu* pExportMenu = new wxMenu();
+
+        //se vacía la barra y se borran los menus que se crearon en la anterior pasada
+        wxWindowDisabler dis;
+        while (GetToolCount() > 0) {
+                DeleteByIndex(0);
+        }
+
+        {
+                //acquisition
+                if(GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire")) {
+                        AddTool(ID_FILE_DROP_DOWN,_("Acquire"),GinkgoResourcesManager::MenuIcons::GetIcoOpenDir(),_("Acquire"));
+                        ForceSetToolDropDown(ID_FILE_DROP_DOWN, true);
+                        AddSeparator();
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(HistoryPanel, pHistoryMenu, GNC::GCS::IHistoryTool::TFamily_Open);
+                        pHistoryMenu->AppendSeparator();
+                }
+                //dicomization
+                if(GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","import")) {
+                        GNC::HistoryToolsController::Instance()->AppendsToolInToolBar(this, GNC::GCS::IHistoryTool::TFamily_Dicomize);
+                        AddSeparator();
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(HistoryPanel, pHistoryMenu, GNC::GCS::IHistoryTool::TFamily_Dicomize);
+                        pHistoryMenu->AppendSeparator();
+                }
+                //Q/R
+                if(GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire") && GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","pacs_acquisition")) {
+                        GNC::HistoryToolsController::Instance()->AppendsToolInToolBar(this, GNC::GCS::IHistoryTool::TFamily_Q_R);
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(HistoryPanel, pHistoryMenu, GNC::GCS::IHistoryTool::TFamily_Q_R);
+                }
+                AddSeparator();
+
+                AddTool(ID_REMOVE,_("Remove"),GinkgoResourcesManager::MenuIcons::GetIcoEliminar(),_("Remove"));
+                ForceSetToolDropDown(ID_REMOVE, true);
+                GNC::HistoryToolsController::Instance()->AppendsToolInToolBar(this, GNC::GCS::IHistoryTool::TFamily_Delete);
+                AddSeparator();
+                AppendEditTools(pEditMenu, HistoryPanel);
+                GNC::HistoryToolsController::Instance()->AppendsToolInMenu(HistoryPanel, pEditMenu, GNC::GCS::IHistoryTool::TFamily_Delete);
+                pEditMenu->AppendSeparator();
+                GNC::HistoryToolsController::Instance()->AppendsToolInToolBar(this, GNC::GCS::IHistoryTool::TFamily_ShowMetadata);
+                AddSeparator();
+                GNC::HistoryToolsController::Instance()->AppendsToolInMenu(HistoryPanel, pEditMenu, GNC::GCS::IHistoryTool::TFamily_ShowMetadata);
+                pEditMenu->AppendSeparator();
+                if(GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","pacs_upload")) {
+                        GNC::HistoryToolsController::Instance()->AppendsToolInToolBar(this, GNC::GCS::IHistoryTool::TFamily_Send);
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(HistoryPanel, pExportMenu, GNC::GCS::IHistoryTool::TFamily_Send);
+                        pExportMenu->AppendSeparator();
+                }
+                AddSeparator();
+                GNC::HistoryToolsController::Instance()->AppendsToolInToolBar(this, GNC::GCS::IHistoryTool::TFamily_Anonymize);
+                AddSeparator();
+                GNC::HistoryToolsController::Instance()->AppendsToolInMenu(HistoryPanel, pEditMenu, GNC::GCS::IHistoryTool::TFamily_Anonymize);
+                pEditMenu->AppendSeparator();
+                if(GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","export")) {
+                        GNC::HistoryToolsController::Instance()->AppendsToolInToolBar(this, GNC::GCS::IHistoryTool::TFamily_Export);
+                        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(HistoryPanel, pExportMenu, GNC::GCS::IHistoryTool::TFamily_Export);
+                        pExportMenu->AppendSeparator();
+                }
+                //todo grabar cds
+                GNC::HistoryToolsController::Instance()->AppendsToolInToolBar(this, GNC::GCS::IHistoryTool::TFamily_Other);
+                GNC::HistoryToolsController::Instance()->AppendsToolInMenu(HistoryPanel, pExportMenu, GNC::GCS::IHistoryTool::TFamily_Other);
+                pExportMenu->AppendSeparator();
+
+                if (pHistoryMenu->GetMenuItemCount() > 0) {
+                        while (pHistoryMenu->GetMenuItems().back()->IsSeparator()) {
+                                pHistoryMenu->Delete(pHistoryMenu->GetMenuItems().back());
+                        }
+                        pHistoryMenu->AppendSeparator();
+                        pHistoryMenu->Append(ID_CLOSE_HISTORY, _("Close history")+wxString(wxT(" \tAlt+q")), _("Close history"));
+                        pMenuBar->Append(pHistoryMenu, _("History"));
+                        HistoryPanel->Connect( ID_CLOSE_HISTORY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(HistoryToolMenu::OnCloseWindow),NULL, this );
+                } else {
+                        delete pHistoryMenu;
+                }
+
+                if (pEditMenu->GetMenuItemCount() > 0) {
+                        while (pEditMenu->GetMenuItems().back()->IsSeparator()) {
+                                pEditMenu->Delete(pEditMenu->GetMenuItems().back());
+                        }
+                        pMenuBar->Append(pEditMenu, _("Edit"));
+                } else {
+                        delete pEditMenu;
+                }
+
+                if (pExportMenu->GetMenuItemCount() > 0) {
+                        while (pExportMenu->GetMenuItems().back()->IsSeparator()) {
+                                pExportMenu->Delete(pExportMenu->GetMenuItems().back());
+                        }
+                        pMenuBar->Append(pExportMenu, _("Export"));
+                } else {
+                        delete pExportMenu;
+                }
+
+                Realize();
+        }
+}
+
+void GNC::GUI::HistoryToolMenu::OnDropDownOpenFile(wxAuiToolBarEvent& event)
+{
+        wxAuiToolBar* tb = static_cast<wxAuiToolBar*>(event.GetEventObject());
+
+        tb->SetToolSticky(event.GetId(), true);
+
+        // create the popup menu
+        wxMenu menuPopup;
+
+        GNC::HistoryToolsController::Instance()->AppendsToolInMenu(&menuPopup, &menuPopup, GNC::GCS::IHistoryTool::TFamily_Open);
+
+        // line up our menu with the button
+        wxRect rect = tb->GetToolRect(event.GetId());
+        wxPoint pt = tb->ClientToScreen(rect.GetBottomLeft());
+        pt = ScreenToClient(pt);
+
+        PopupMenu(&menuPopup, pt);
+
+        // make sure the button is "un-stuck"
+        tb->SetToolSticky(event.GetId(), false);
+}
+
+void GNC::GUI::HistoryToolMenu::OnDropDownRemove(wxAuiToolBarEvent& event)
+{
+        if (event.IsDropDownClicked()) {
+                wxAuiToolBar* tb = static_cast<wxAuiToolBar*>(event.GetEventObject());
+
+                tb->SetToolSticky(event.GetId(), true);
+
+                // create the popup menu
+                wxMenu menuPopup;
+
+                wxMenuItem* pMenuRemove = new wxMenuItem( &menuPopup, ID_REMOVE, wxString( _("Remove")), _("Remove"), wxITEM_NORMAL );
+                wxMenuItem* pMenuRemoveAll = new wxMenuItem( &menuPopup, ID_REMOVE_ALL, wxString( _("Clear history")), _("Clear history"), wxITEM_NORMAL );
+#ifdef __WXMSW__
+                pMenuRemove->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoEliminar());
+                pMenuRemoveAll->SetBitmaps(GinkgoResourcesManager::History::GetIcoCleanAll());
+#else
+                pMenuRemove->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoEliminar());
+                pMenuRemoveAll->SetBitmap(GinkgoResourcesManager::History::GetIcoCleanAll());
+#endif
+
+                menuPopup.Append( pMenuRemove );
+                menuPopup.Append( pMenuRemoveAll );
+
+                // line up our menu with the button
+                wxRect rect = tb->GetToolRect(event.GetId());
+                wxPoint pt = tb->ClientToScreen(rect.GetBottomLeft());
+                pt = ScreenToClient(pt);
+
+                PopupMenu(&menuPopup, pt);
+
+                // make sure the button is "un-stuck"
+                tb->SetToolSticky(event.GetId(), false);
+        } else {
+                event.Skip(true);
+        }
+}
+
+void GNC::GUI::HistoryToolMenu::AppendEditTools(wxMenu* pEditMenu, wxEvtHandler* pHandler)
+{
+        wxMenuItem* pMenuRemove = new wxMenuItem( pEditMenu, ID_REMOVE, wxString( _("Remove")), _("Remove"), wxITEM_NORMAL );
+        wxMenuItem* pMenuRemoveAll = new wxMenuItem( pEditMenu, ID_REMOVE_ALL, wxString( _("Clear history")), _("Clear history"), wxITEM_NORMAL );
+
+        wxMenuItem* pMenuSelect = new wxMenuItem( pEditMenu, ID_SELECT_ALL, wxString( _("Select all")), _("Select all"), wxITEM_NORMAL );
+        wxMenuItem* pMenuDeselect = new wxMenuItem( pEditMenu, ID_DESELECT, wxString( _("Deselect all")), _("Deselect all"), wxITEM_NORMAL );
+#ifdef __WXMSW__
+        pMenuRemove->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoEliminar());
+        pMenuRemoveAll->SetBitmaps(GinkgoResourcesManager::History::GetIcoCleanAll());
+#else
+        pMenuRemove->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoEliminar());
+        pMenuRemoveAll->SetBitmap(GinkgoResourcesManager::History::GetIcoCleanAll());
+#endif
+
+        pEditMenu->Append( pMenuRemove );
+        pEditMenu->Append( pMenuRemoveAll );
+        pEditMenu->AppendSeparator();
+        pEditMenu->Append( pMenuSelect );
+        pEditMenu->Append( pMenuDeselect );
+
+        pHandler->Connect( ID_REMOVE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(HistoryToolMenu::OnRemove),NULL, this );
+        pHandler->Connect( ID_REMOVE_ALL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(HistoryToolMenu::OnRemoveAll),NULL, this );
+        pHandler->Connect( ID_SELECT_ALL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(HistoryToolMenu::OnSelectAll),NULL, this );
+        pHandler->Connect( ID_DESELECT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(HistoryToolMenu::OnDeselectAll),NULL, this );
+}
+
+void GNC::GUI::HistoryToolMenu::OnRemove(wxCommandEvent& /*event*/)
+{
+        HistoryPanel->RemoveSelected();
+}
+
+void GNC::GUI::HistoryToolMenu::OnRemoveAll(wxCommandEvent& /*event*/)
+{
+        HistoryPanel->ClearHistory();
+}
+
+void GNC::GUI::HistoryToolMenu::OnSelectAll(wxCommandEvent& /*event*/)
+{
+        HistoryPanel->SelectAll();
+}
+
+void GNC::GUI::HistoryToolMenu::OnDeselectAll(wxCommandEvent& /*event*/)
+{
+        HistoryPanel->DeselectAll();
+}
+
+void GNC::GUI::HistoryToolMenu::OnCloseWindow(wxCommandEvent& /*event*/)
+{
+        HistoryPanel->Show(false);
+}
+
diff --git a/cadxcore/main/gui/history3/historytoolmenu.h b/cadxcore/main/gui/history3/historytoolmenu.h
new file mode 100644
index 0000000..7090a26
--- /dev/null
+++ b/cadxcore/main/gui/history3/historytoolmenu.h
@@ -0,0 +1,68 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+#include <api/autoptr.h>
+
+#include <main/controllers/historytoolscontroller.h>
+#include <api/controllers/ieventscontroller.h>
+
+#include <wx/wxginkgotoolbar.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class HistoryPanel3;
+
+class HistoryToolMenu: public wxGinkgoToolBar
+{
+public:
+        HistoryToolMenu(HistoryPanel3* pParent);
+        ~HistoryToolMenu();
+
+public:
+        void Reload();
+
+protected:
+        //MENUS...
+        //drop downs
+        void OnDropDownOpenFile(wxAuiToolBarEvent& event);
+        void OnDropDownRemove(wxAuiToolBarEvent& event);
+        //file actions...
+        //remove
+        void AppendEditTools(wxMenu* pEditMenu, wxEvtHandler* pHandler);
+        void OnRemove(wxCommandEvent& event);
+        void OnRemoveAll(wxCommandEvent& event);
+        void OnSelectAll(wxCommandEvent& event);
+        void OnDeselectAll(wxCommandEvent& event);
+        void OnInvertSelection(wxCommandEvent& event);
+        void OnCloseWindow(wxCommandEvent& event);
+        //query/retrieve
+        void OnQueryRetrieve(wxCommandEvent& event);
+
+
+public:
+        HistoryPanel3* HistoryPanel;
+};
+}
+}
diff --git a/cadxcore/main/gui/history3/openwithdialog.h b/cadxcore/main/gui/history3/openwithdialog.h
new file mode 100644
index 0000000..d5a4f2d
--- /dev/null
+++ b/cadxcore/main/gui/history3/openwithdialog.h
@@ -0,0 +1,108 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "historypanel3base.h"
+#include <utility>
+#include <main/controllers/controladorextensiones.h>
+#include <wx/msgdlg.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+//----------DIALOGO CONFIRMAR ELIMINAR...-------------
+namespace GNC
+{
+namespace GUI
+{
+class OpenWithDialog: public OpenWithDialogBase
+{
+public:
+        typedef std::list<std::pair<std::string,std::string> > ListaModalidades;
+        OpenWithDialog(wxWindow* parent, ListaModalidades& listaModalidades) :
+                OpenWithDialogBase(parent),
+                m_seleccionado(false)
+        {
+                //se buscan los modulos modos que abren la modalidad
+                GNC::ControladorExtensiones::ListaModulos listaModulos = ControladorExtensiones::Instance()->Modulos();
+                for(GNC::ControladorExtensiones::IteradorListaModulos itModulos=listaModulos.begin(); itModulos!=listaModulos.end(); ++itModulos) {
+                        for(GNC::GCS::IModuleController::IteradorListaModos itModos=(*itModulos).second->GetListaModos().begin(); itModos!=(*itModulos).second->GetListaModos().end(); ++itModos) {
+                                bool soporta = true;
+                                for(ListaModalidades::iterator itModalidad = listaModalidades.begin(); itModalidad != listaModalidades.end() && soporta; ++itModalidad) {
+                                        soporta = soporta && (*itModos)->SupportsModalityFile((*itModalidad).first, (*itModalidad).second);
+                                }
+                                if(soporta) {
+                                        wxString wxStr = wxString::FromUTF8((*itModos)->GetDescripcion().c_str());
+                                        m_pListaVistas->AppendString(wxStr);
+                                        m_modulos.push_back((*itModulos).second);
+                                        m_modos.push_back((*itModos));
+                                }
+                        }
+                }
+                if(m_pListaVistas->GetCount() > 0) {
+                        m_pListaVistas->Select(0);
+                }
+                m_pCheckUtilizarSiempre->Show(false);
+
+                m_pPanelTitulo->Layout();
+                Layout();
+        }
+
+        ~OpenWithDialog()
+        {
+                m_modulos.clear();
+                m_modos.clear();
+        }
+
+        void OnAceptarClick(wxCommandEvent &event)
+        {
+                m_seleccionado = m_pListaVistas->GetSelection();
+                if(m_seleccionado >=0 && m_seleccionado < (int)m_modos.size()) {
+                        /*if(m_pCheckUtilizarSiempre->IsChecked()){
+                        	wxConfigBase* config = wxConfigBase::Get();
+                        	wxString clave = wxT("/GinkgoCore/Historial/AbrirCon/") + wxString::FromUTF8(m_modalidad.c_str()) + wxT("/");
+                        	config->Write(clave + wxT("Modulo"),m_modulos[m_seleccionado]->GetUID());
+                        	config->Write(clave + wxT("Modo"),m_modos[m_seleccionado]->GetId());
+                        }*/
+                        EndModal(wxID_OK);
+                } else {
+                        wxMessageBox(_("Select a View"), _("Info"),
+                                     wxOK | wxICON_INFORMATION, this);
+                        event.Skip(false);
+                }
+        }
+
+        GNC::GCS::IModuleController* GetModuloSeleccionado()
+        {
+                return m_modulos[m_seleccionado];
+        }
+
+        GNC::GCS::ModoControlador* GetModoSeleccionado()
+        {
+                return m_modos[m_seleccionado];
+        }
+
+protected:
+        typedef std::vector<GNC::GCS::IModuleController*> TipoVectorModulos;
+        typedef std::vector<GNC::GCS::ModoControlador*> TipoVectorModos;
+        TipoVectorModulos m_modulos;
+        TipoVectorModos m_modos;
+        int m_seleccionado;
+};
+}
+}
diff --git a/cadxcore/main/gui/history3/synchronizedialog.cpp b/cadxcore/main/gui/history3/synchronizedialog.cpp
new file mode 100644
index 0000000..ca15468
--- /dev/null
+++ b/cadxcore/main/gui/history3/synchronizedialog.cpp
@@ -0,0 +1,65 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "synchronizedialog.h"
+#include <main/controllers/commandcontroller.h>
+#include <commands/synchronizationcommand.h>
+#include <main/controllers/hangingprotocolcontroller.h>
+
+
+GNC::GUI::SynchronizeDialog::SynchronizeDialog(wxWindow* parent, const std::list<long>& seriesPk, GNC::GCS::IHistoryTool* pTool): GNC::GUI::SynchronizeDialogBase(parent),
+        m_seriesPk(seriesPk),
+        m_pTool(pTool),
+        m_pCtrlMod(NULL),
+        m_mode(-1),
+        m_pHangingProtocol(NULL),
+        m_isToolMode(true)
+{
+}
+
+GNC::GUI::SynchronizeDialog::SynchronizeDialog(wxWindow* parent, const std::list<long>& seriesPk, GNC::GCS::IModuleController* pCtrlMod, int mode, const GNC::GCS::Ptr<GNC::GCS::HangingProtocol>& pHangingProtocol): GNC::GUI::SynchronizeDialogBase(parent),
+        m_seriesPk(seriesPk),
+        m_pTool(NULL),
+        m_pCtrlMod(pCtrlMod),
+        m_mode(mode),
+        m_pHangingProtocol(pHangingProtocol),
+        m_isToolMode(false)
+{
+}
+
+GNC::GUI::SynchronizeDialog::~SynchronizeDialog()
+{
+}
+
+void GNC::GUI::SynchronizeDialog::OnSynchronize(wxCommandEvent &/*evt*/)
+{
+        if (m_isToolMode) {
+                GADAPI::SynchronizationCommandParameters* pParams = new GADAPI::SynchronizationCommandParameters(m_seriesPk, m_pTool);
+                GADAPI::SynchronizationCommand* pCmd = new GADAPI::SynchronizationCommand(pParams);
+                GNC::GCS::ICommandController::Instance()->ProcessAsync("syncronizing...", pCmd, NULL);
+        } else {
+                GADAPI::SynchronizationCommandParameters* pParams = new GADAPI::SynchronizationCommandParameters(m_seriesPk, m_pCtrlMod, m_mode, m_pHangingProtocol);
+                GADAPI::SynchronizationCommand* pCmd = new GADAPI::SynchronizationCommand(pParams);
+                GNC::GCS::ICommandController::Instance()->ProcessAsync("syncronizing...", pCmd, NULL);
+        }
+
+        EndModal(wxOK);
+}
diff --git a/cadxcore/main/gui/history3/synchronizedialog.h b/cadxcore/main/gui/history3/synchronizedialog.h
new file mode 100644
index 0000000..3114c40
--- /dev/null
+++ b/cadxcore/main/gui/history3/synchronizedialog.h
@@ -0,0 +1,54 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "historypanel3base.h"
+#include <utility>
+
+//----------DIALOGO CONFIRMAR ELIMINAR...-------------
+namespace GNC
+{
+namespace GCS
+{
+class IHistoryTool;
+class IModuleController;
+class HangingProtocol;
+}
+namespace GUI
+{
+class SynchronizeDialog: public SynchronizeDialogBase
+{
+public:
+        SynchronizeDialog(wxWindow* parent, const std::list<long>& seriesPk, GNC::GCS::IHistoryTool* pTool);
+        SynchronizeDialog(wxWindow* parent, const std::list<long>& seriesPk, GNC::GCS::IModuleController* pCtrlMod, int mode, const GNC::GCS::Ptr<GNC::GCS::HangingProtocol>& pHangingProtocol);
+        ~SynchronizeDialog();
+        virtual void OnSynchronize(wxCommandEvent &evt);
+
+protected:
+        std::list<long> m_seriesPk;
+        GNC::GCS::IHistoryTool* m_pTool;
+        GNC::GCS::IModuleController* m_pCtrlMod;
+        int m_mode;
+        GNC::GCS::Ptr<GNC::GCS::HangingProtocol> m_pHangingProtocol;
+        bool m_isToolMode;
+
+};
+}
+}
diff --git a/cadxcore/main/gui/history3/wxhistoryimagethumbnail.cpp b/cadxcore/main/gui/history3/wxhistoryimagethumbnail.cpp
new file mode 100644
index 0000000..9e71656
--- /dev/null
+++ b/cadxcore/main/gui/history3/wxhistoryimagethumbnail.cpp
@@ -0,0 +1,64 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <wx/filename.h>
+#include <wx/dc.h>
+
+#include "wxhistoryimagethumbnail.h"
+#include <resources/ginkgoresourcesmanager.h>
+namespace GNC
+{
+namespace GUI
+{
+wxHistoryImageThumbnailItem::wxHistoryImageThumbnailItem(const wxString& filename, TItemType type, long series_pk, long file_pk, GNC::GCS::IHistoryController::TLocation source):wxImageThumbnailItem(filename)
+{
+        m_type = type;
+        m_filepk = file_pk;
+        m_seriespk = series_pk;
+        m_source = source;
+}
+
+bool wxHistoryImageThumbnailItem::Draw(wxDC& dc, wxThumbnailCtrl* ctrl, const wxRect& rect, int style)
+{
+        wxImageThumbnailItem::Draw(dc, ctrl, rect, style);
+        wxBitmap bmp;
+        switch (m_source) {
+        case GNC::GCS::IHistoryController::TL_LocalDatabase:
+                bmp = GinkgoResourcesManager::History::GetIcoLocalFile();
+                break;
+        case GNC::GCS::IHistoryController::TL_LocalLinked:
+                bmp = GinkgoResourcesManager::History::GetIcoLocalLinked();
+                break;
+        case GNC::GCS::IHistoryController::TL_WadoLinked:
+                bmp = GinkgoResourcesManager::History::GetIcoWadoLinked();
+                break;
+        default:
+                ;
+        }
+        if (bmp.IsOk()) {
+                int x = rect.x + ctrl->GetThumbnailMargin();
+                int y = rect.y + ctrl->GetThumbnailMargin();
+                dc.DrawBitmap(bmp, x, y, true);
+        }
+        return true;
+}
+}
+}
diff --git a/cadxcore/main/gui/history3/wxhistoryimagethumbnail.h b/cadxcore/main/gui/history3/wxhistoryimagethumbnail.h
new file mode 100644
index 0000000..61da2ab
--- /dev/null
+++ b/cadxcore/main/gui/history3/wxhistoryimagethumbnail.h
@@ -0,0 +1,64 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <wx/thumbnailctrl/thumbnailctrl.h>
+#include <api/controllers/ihistorycontroller.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class wxHistoryImageThumbnailItem: public wxImageThumbnailItem
+{
+public:
+        typedef enum TItemType {
+                TI_Series,
+                TI_Image
+        } TItemType;
+
+        wxHistoryImageThumbnailItem(const wxString& filename, TItemType type, long series_pk, long file_pk, GNC::GCS::IHistoryController::TLocation source);
+
+        TItemType GetType()
+        {
+                return m_type;
+        }
+
+        long GetFilePk()
+        {
+                return m_filepk;
+        }
+
+        long GetSeriesPk()
+        {
+                return m_seriespk;
+        }
+
+        virtual bool Draw(wxDC& dc, wxThumbnailCtrl* ctrl, const wxRect& rect, int style);
+
+protected:
+        TItemType m_type;
+        GNC::GCS::IHistoryController::TLocation m_source;
+        long m_filepk;
+        long m_seriespk;
+};
+}
+}
diff --git a/cadxcore/main/gui/hl7controlwindow/ventanaControlHL7.fbp b/cadxcore/main/gui/hl7controlwindow/ventanaControlHL7.fbp
new file mode 100644
index 0000000..47bf623
--- /dev/null
+++ b/cadxcore/main/gui/hl7controlwindow/ventanaControlHL7.fbp
@@ -0,0 +1,1814 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">ventanacontrolhl7base</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">VentanaControlHL7Base</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Frame" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">500,250</property>
+            <property name="name">VentanaControlHL7Base</property>
+            <property name="pos"></property>
+            <property name="size">600,250</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">HL7 monitor</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <property name="xrc_skip_sizer">1</property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar">OnKeyDown</event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnKeyDown">OnKeyDown</event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxMenuBar" expanded="1">
+                <property name="bg"></property>
+                <property name="context_help"></property>
+                <property name="context_menu">1</property>
+                <property name="enabled">1</property>
+                <property name="fg"></property>
+                <property name="font"></property>
+                <property name="hidden">0</property>
+                <property name="id">wxID_ANY</property>
+                <property name="label">MyMenuBar</property>
+                <property name="maximum_size"></property>
+                <property name="minimum_size"></property>
+                <property name="name">m_menubar1</property>
+                <property name="permission">protected</property>
+                <property name="pos"></property>
+                <property name="size"></property>
+                <property name="style"></property>
+                <property name="subclass"></property>
+                <property name="tooltip"></property>
+                <property name="window_extra_style"></property>
+                <property name="window_name"></property>
+                <property name="window_style"></property>
+                <event name="OnChar"></event>
+                <event name="OnEnterWindow"></event>
+                <event name="OnEraseBackground"></event>
+                <event name="OnKeyDown">OnKeyDown</event>
+                <event name="OnKeyUp"></event>
+                <event name="OnKillFocus"></event>
+                <event name="OnLeaveWindow"></event>
+                <event name="OnLeftDClick"></event>
+                <event name="OnLeftDown"></event>
+                <event name="OnLeftUp"></event>
+                <event name="OnMiddleDClick"></event>
+                <event name="OnMiddleDown"></event>
+                <event name="OnMiddleUp"></event>
+                <event name="OnMotion"></event>
+                <event name="OnMouseEvents"></event>
+                <event name="OnMouseWheel"></event>
+                <event name="OnPaint"></event>
+                <event name="OnRightDClick"></event>
+                <event name="OnRightDown"></event>
+                <event name="OnRightUp"></event>
+                <event name="OnSetFocus"></event>
+                <event name="OnSize"></event>
+                <event name="OnUpdateUI"></event>
+                <object class="wxMenu" expanded="1">
+                    <property name="label">Messages</property>
+                    <property name="name">m_menuMensajes</property>
+                    <property name="permission">protected</property>
+                    <object class="wxMenuItem" expanded="0">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Remove sent messages</property>
+                        <property name="name">m_menuItemPurgarMensajes</property>
+                        <property name="permission">protected</property>
+                        <property name="shortcut">ALT+p</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="separator" expanded="0">
+                        <property name="name">m_separator1</property>
+                        <property name="permission">none</property>
+                    </object>
+                    <object class="wxMenuItem" expanded="0">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Exit</property>
+                        <property name="name">m_menuItemSalir</property>
+                        <property name="permission">protected</property>
+                        <property name="shortcut">ESC</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="wxMenu" expanded="1">
+                    <property name="label">View</property>
+                    <property name="name">m_menu3</property>
+                    <property name="permission">protected</property>
+                    <object class="wxMenuItem" expanded="0">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Refresh</property>
+                        <property name="name">m_menuItemActualizar</property>
+                        <property name="permission">protected</property>
+                        <property name="shortcut">F5</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer5</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="CustomControl" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="class">wxDataViewListCtrl</property>
+                        <property name="close_button">1</property>
+                        <property name="construction">m_pListModel = new wxDataViewListStore();&#x0A;m_pListViewCtrl= new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_MULTIPLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);&#x0A;&#x0A;m_pListViewCtrl->AssociateModel(m_pListModel.get());</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="declaration">wxDataViewListCtrl* m_pListViewCtrl;&#x0A;wxObjectDataPtr<wxDataViewListStore> m_pListModel;</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="include">#include <wx/dataview.h></property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pListViewCtrl</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="settings"></property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">0</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panelEstado</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown">OnKeyDown</event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer3</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Send task status:</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pLabelEnvio</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown">OnKeyDown</event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg">0,174,0</property>
+                                    <property name="floatable">1</property>
+                                    <property name="font">,90,92,-1,70,0</property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Enabled</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pEstado</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown">OnKeyDown</event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Start</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBArrancarParar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxBU_EXACTFIT</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnArrancarPararClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown">OnKeyDown</event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">500,291</property>
+            <property name="name">DialogoMostrarMensajeBase</property>
+            <property name="pos"></property>
+            <property name="size">640,400</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Message detail</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer2</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxBoxSizer" expanded="1">
+                        <property name="minimum_size"></property>
+                        <property name="name">bSizer5</property>
+                        <property name="orient">wxVERTICAL</property>
+                        <property name="permission">none</property>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="wxStaticBoxSizer" expanded="1">
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Message</property>
+                                <property name="minimum_size"></property>
+                                <property name="name">sbSizer1</property>
+                                <property name="orient">wxVERTICAL</property>
+                                <property name="permission">none</property>
+                                <event name="OnUpdateUI"></event>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxEXPAND</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxFlexGridSizer" expanded="1">
+                                        <property name="cols">2</property>
+                                        <property name="flexible_direction">wxBOTH</property>
+                                        <property name="growablecols">1</property>
+                                        <property name="growablerows"></property>
+                                        <property name="hgap">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="name">fgSizer1</property>
+                                        <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                        <property name="permission">none</property>
+                                        <property name="rows">0</property>
+                                        <property name="vgap">0</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Date:</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText1</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">10000</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pFecha</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxTE_READONLY</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Destination:</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText5</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">0</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pDestino</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxTE_READONLY</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Status:</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText6</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxBoxSizer" expanded="1">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer6</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pEstado</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxTE_READONLY</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxChoice" expanded="1">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="choices">"Sent" "Pending" "Error" "Warning"</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">1</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pChoiceEstado</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="selection">0</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnChoice"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="0">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxStaticText" expanded="0">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="label">Message content:</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_staticText7</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <property name="wrap">-1</property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="0">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALL|wxEXPAND</property>
+                                    <property name="proportion">1</property>
+                                    <object class="wxTextCtrl" expanded="0">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg"></property>
+                                        <property name="floatable">1</property>
+                                        <property name="font"></property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="maxlength">0</property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_pContenido</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style">wxHSCROLL|wxTE_MULTILINE|wxTE_READONLY</property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="validator_data_type"></property>
+                                        <property name="validator_style">wxFILTER_NONE</property>
+                                        <property name="validator_type">wxDefaultValidator</property>
+                                        <property name="validator_variable"></property>
+                                        <property name="value"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <event name="OnChar"></event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground"></event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick"></event>
+                                        <event name="OnLeftDown"></event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel"></event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp"></event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnText"></event>
+                                        <event name="OnTextEnter"></event>
+                                        <event name="OnTextMaxLen"></event>
+                                        <event name="OnTextURL"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticLine" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_staticline1</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style">wxLI_HORIZONTAL</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxALIGN_RIGHT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxBoxSizer" expanded="0">
+                        <property name="minimum_size"></property>
+                        <property name="name">bSizer3</property>
+                        <property name="orient">wxHORIZONTAL</property>
+                        <property name="permission">none</property>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxButton" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_OK</property>
+                                <property name="label">OK</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_button1</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnButtonClick"></event>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxButton" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default">0</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_CANCEL</property>
+                                <property name="label">Cancel</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_CancelButton</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="validator_data_type"></property>
+                                <property name="validator_style">wxFILTER_NONE</property>
+                                <property name="validator_type">wxDefaultValidator</property>
+                                <property name="validator_variable"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnButtonClick"></event>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7.cpp b/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7.cpp
new file mode 100644
index 0000000..f18f64d
--- /dev/null
+++ b/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7.cpp
@@ -0,0 +1,500 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ventanacontrolhl7.h"
+#include <api/imodelohl7.h>
+
+#include <main/controllers/controladorenviohl7.h>
+#include <main/controllers/controladorbbddhl7.h>
+#include <main/controllers/configurationcontroller.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+#define LOGGER "VentanaControlHL7"
+#include <main/controllers/controladorlog.h>
+
+#include <main/entorno.h>
+#include <wx/log.h>
+#include <wx/msgdlg.h>
+#include <set>
+
+#define COL_FECHA           0
+#define COL_DESTINO         1
+#define COL_ESTADO          2
+#define COL_MENSAJE_ERROR   3
+#define COL_MENSAJE         4
+#define COL_ID              5
+
+namespace GNC
+{
+namespace GUI
+{
+/////////////////
+class DialogoMostrarMensaje: public GNC::GUI::DialogoMostrarMensajeBase
+{
+public:
+        DialogoMostrarMensaje(wxWindow* pParent, const wxString& fecha, const wxString& url, const wxString& estado, const wxString& mensaje, const bool editar):DialogoMostrarMensajeBase(pParent)
+        {
+                m_pFecha->SetValue(fecha);
+                m_pDestino->SetValue(url);
+                m_pEstado->SetValue(estado);
+                m_pContenido->SetValue(mensaje);
+                if(editar) {
+                        m_pDestino->SetEditable(true);
+                        m_pContenido->SetEditable(true);
+                        m_pFecha->Disable();
+                        m_pEstado->Show(false);
+                        m_pChoiceEstado->Show(true);
+                        m_pChoiceEstado->Select(m_pChoiceEstado->FindString(estado));
+                } else {
+                        m_CancelButton->Hide();
+                }
+        }
+        ~DialogoMostrarMensaje()
+        {
+        }
+
+        std::string GetMensaje()
+        {
+                std::string mensaje(m_pContenido->GetValue().ToUTF8());
+                return mensaje;
+        }
+
+        std::string GetDestino()
+        {
+                std::string destino(m_pDestino->GetValue().ToUTF8());
+                return destino;
+        }
+
+        GIL::HL7::MensajeHL7::TEstado GetEstado()
+        {
+                switch(m_pChoiceEstado->GetSelection()) {
+                case 0:
+                        return GIL::HL7::MensajeHL7::TE_Enviado;
+                case 1:
+                        return GIL::HL7::MensajeHL7::TE_Pendiente;
+                case 2:
+                        return GIL::HL7::MensajeHL7::TE_Error;
+                case 3:
+                        return GIL::HL7::MensajeHL7::TE_Warning;
+                }
+                return GIL::HL7::MensajeHL7::TE_Error;
+        }
+
+        virtual void OnKeyDown( wxKeyEvent& event )
+        {
+                if (event.GetKeyCode() == WXK_ESCAPE) {
+                        Close();
+                }
+                event.Skip();
+        }
+
+};
+///////////////////
+class TimerControlHL7: public wxTimer
+{
+public:
+        TimerControlHL7(VentanaControlHL7* pVentana)
+        {
+                m_pVentana = pVentana;
+        }
+        ~TimerControlHL7()
+        {
+                m_pVentana = NULL;
+        }
+        virtual void Notify()
+        {
+                m_pVentana->Refrescar();
+        }
+        VentanaControlHL7* m_pVentana;
+};
+///////////////////
+
+VentanaControlHL7* VentanaControlHL7::m_pInstance = NULL;
+
+VentanaControlHL7* VentanaControlHL7::Instance()
+{
+        if(m_pInstance == NULL) {
+                m_pInstance = new VentanaControlHL7();
+        }
+        return m_pInstance;
+}
+
+void VentanaControlHL7::CerrarSiAbierta()
+{
+        if(m_pInstance != NULL) {
+                m_pInstance->Close(true);
+        }
+}
+
+void VentanaControlHL7::Refrescar()
+{
+        ActualizarEstadoControlador();
+        RefrescarMensajes();
+}
+
+
+VentanaControlHL7::VentanaControlHL7():VentanaControlHL7Base(NULL)
+{
+        Freeze();
+        wxIcon icono;
+        icono.CopyFromBitmap(GinkgoResourcesManager::Logos::GetLogoGinkgo32x32());
+        this->SetIcon(icono);
+
+
+        // column 0 of the view control:
+        m_pListViewCtrl->AppendColumn( new wxDataViewColumn( _("Date"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ), COL_FECHA, 138, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListViewCtrl->AppendColumn( new wxDataViewColumn( _("Destination"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ), COL_DESTINO, 70, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListViewCtrl->AppendColumn( new wxDataViewColumn( _("Status"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ), COL_ESTADO, 128, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListViewCtrl->AppendColumn( new wxDataViewColumn( _("Error message"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ), COL_MENSAJE_ERROR, 128, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+        m_pListViewCtrl->AppendColumn( new wxDataViewColumn( _("Date Time"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ), COL_FECHA, 128, wxALIGN_LEFT,wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE ));
+
+
+        m_pLabelEnvio->SetLabel(wxString::FromUTF8("Proceso de envío:"));
+
+        m_pTimerRefresh = new TimerControlHL7(this);
+
+        ActualizarEstadoControlador();
+        RefrescarMensajes();
+
+        m_pListViewCtrl->Connect(wxEVT_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( VentanaControlHL7::OnMensajeMenu ), NULL, this );
+        m_pListViewCtrl->Connect(wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( VentanaControlHL7::OnMensajeDClick ), NULL, this );
+        m_pListViewCtrl->Connect(wxEVT_CHAR, wxKeyEventHandler( VentanaControlHL7::OnKeyDown ), NULL, this );
+
+        this->Connect( m_menuItemPurgarMensajes->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaControlHL7::OnPurgarMensajes ) );
+        this->Connect( m_menuItemSalir->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaControlHL7::OnMenuSalir ) );
+        this->Connect( m_menuItemActualizar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaControlHL7::OnActualizar ) );
+
+        Show();
+        Layout();
+        SetFocus();
+        Thaw();
+}
+
+VentanaControlHL7::~VentanaControlHL7()
+{
+        m_pInstance = NULL;
+        if(m_pTimerRefresh != NULL) {
+                delete m_pTimerRefresh;
+                m_pTimerRefresh = NULL;
+        }
+}
+
+void VentanaControlHL7::OnActivate(wxActivateEvent &event)
+{
+        if(event.GetActive()) {
+                m_pTimerRefresh->Start(5000);
+        } else {
+                m_pTimerRefresh->Stop();
+        }
+}
+
+void VentanaControlHL7::OnMensajeMenu(wxDataViewEvent& )
+{
+        //si hay un mensaje seleccionado..
+        wxDataViewItemArray seleccionados;
+        m_pListViewCtrl->GetSelections(seleccionados);
+        if(seleccionados.size() > 0) {
+                wxMenu* popup = new wxMenu();
+                wxMenuItem* pMenuMostrarVentana = new wxMenuItem(popup,wxID_ANY,_("Show Message"));
+                wxMenuItem* pMenuEditarVentana = new wxMenuItem(popup,wxID_ANY,_("Edit Message"));
+                wxMenuItem* pMenuEliminarMensaje = new wxMenuItem(popup,wxID_ANY,_("Delete message"));
+#ifdef __WXMSW__
+                pMenuMostrarVentana->SetBitmaps( GinkgoResourcesManager::MenuIcons::GetIcoEditor());
+                pMenuEliminarMensaje->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoEliminarWidget());
+#else
+                pMenuMostrarVentana->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoEditor());
+                pMenuEliminarMensaje->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoEliminarWidget());
+#endif
+                popup->Append(pMenuMostrarVentana);
+                popup->Append(pMenuEditarVentana);
+                popup->Append(pMenuEliminarMensaje);
+                popup->Connect(pMenuMostrarVentana->GetId(),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaControlHL7::OnMostrarMensaje ), NULL, this  );
+                popup->Connect(pMenuEditarVentana->GetId(),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaControlHL7::OnEditarMensaje ), NULL, this  );
+                popup->Connect(pMenuEliminarMensaje->GetId(),wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaControlHL7::OnEliminarMensaje ), NULL, this  );
+                this->PopupMenu(popup);
+                delete popup;
+        }
+}
+void VentanaControlHL7::OnMensajeDClick(wxDataViewEvent& )
+{
+        MostrarVentanaMensaje();
+}
+
+void VentanaControlHL7::OnMostrarMensaje(wxCommandEvent &)
+{
+        MostrarVentanaMensaje();
+}
+
+void VentanaControlHL7::OnEditarMensaje(wxCommandEvent &)
+{
+        wxDataViewItem id = m_pListViewCtrl->GetSelection();
+        if(id.IsOk()) {
+                wxVariant value;
+                m_pListModel->GetValue(value, id, COL_FECHA);
+                wxString fecha = value;
+                m_pListModel->GetValue(value, id, COL_DESTINO);
+                wxString destino = value;
+                m_pListModel->GetValue(value, id, COL_ESTADO);
+                wxString estado = value;
+                m_pListModel->GetValue(value, id, COL_MENSAJE);
+                wxString mensaje = value;
+                m_pListModel->GetValue(value, id, COL_ID);
+                wxString str = value;
+                long idMensaje;
+                if(str.ToLong(&idMensaje)) {
+                        DialogoMostrarMensaje mostrar(this,fecha,destino,estado,mensaje, true);
+                        if(mostrar.ShowModal() == wxID_OK) {
+                                try {
+                                        GIL::HL7::ControladorBBDDHl7::Instance()->ActualizarMensaje(idMensaje, mostrar.GetDestino(), mostrar.GetMensaje(), mostrar.GetEstado());
+                                        RefrescarMensajes();
+                                } catch (GIL::HL7::HL7Exception& ex) {
+                                        wxMessageBox(wxString::FromUTF8(ex.GetCause().c_str()), _("Error editing message"), wxICON_ERROR, this);
+                                }
+                        }
+                }
+        }
+}
+
+void VentanaControlHL7::OnListaKey(wxKeyEvent &event)
+{
+        int keycode = event.GetKeyCode();
+        switch (keycode) {
+        case WXK_DELETE:
+        case WXK_CLEAR:
+        case WXK_BACK:
+                EliminarMensaje();
+                event.Skip(false);
+                break;
+        case WXK_RETURN:
+                MostrarVentanaMensaje();
+                event.Skip(false);
+                break;
+        case WXK_ESCAPE:
+                Close();
+                event.Skip(false);
+                break;
+        case WXK_TAB:
+                SetFocus();
+                event.Skip(false);
+                break;
+        default:
+                event.Skip(true);
+        }
+}
+
+void VentanaControlHL7::OnEliminarMensaje(wxCommandEvent &)
+{
+        EliminarMensaje();
+}
+
+
+void VentanaControlHL7::OnPurgarMensajes(wxCommandEvent& )
+{
+        try {
+                GIL::HL7::ControladorBBDDHl7::Instance()->PurgarMensajesEnviados();
+        } catch (GIL::HL7::HL7Exception& ex) {
+                wxMessageBox(wxString::FromUTF8(ex.GetCause().c_str()), _("Error purguing messages"), wxICON_ERROR, this);
+        }
+        RefrescarMensajes();
+}
+
+void VentanaControlHL7::OnActualizar(wxCommandEvent &)
+{
+        ActualizarEstadoControlador();
+        RefrescarMensajes();
+}
+
+void VentanaControlHL7::OnArrancarPararClick(wxCommandEvent &)
+{
+        m_pBArrancarParar->Disable();
+        if (m_pBArrancarParar->GetLabel() == _("Stop") ) {
+                GNC::GCS::ConfigurationController::Instance()->writeBoolGeneral("/GinkgoCore/HCE", "HL7MonitorEnabled", false);
+                GIL::HL7::ControladorEnvioHl7::FreeInstance();
+        } else {
+                GNC::GCS::ConfigurationController::Instance()->writeBoolGeneral("/GinkgoCore/HCE", "HL7MonitorEnabled", true);
+                GIL::HL7::ControladorEnvioHl7::Arrancar();
+        }
+        ActualizarEstadoControlador();
+        m_pBArrancarParar->Enable();
+}
+
+void VentanaControlHL7::RefrescarMensajes()
+{
+        m_pTimerRefresh->Start(5000);
+        wxWindowDisabler disabler;
+        Freeze();
+        try {
+                //conservamos los ids seleccionados
+                wxDataViewItemArray seleccionados;
+                m_pListViewCtrl->GetSelections(seleccionados);
+                std::set<int> listaIds;
+                for(wxDataViewItemArray::iterator it =seleccionados.begin(); it!= seleccionados.end(); ++it) {
+                        wxVariant value;
+                        m_pListModel->GetValue(value, (*it), COL_ID);
+                        long id = value.GetLong();
+                        listaIds.insert((int)id);
+                }
+                //
+
+                typedef std::list<GIL::HL7::MensajeHL7> TListaMensajes;
+                TListaMensajes listaMensajes;
+                GIL::HL7::ControladorBBDDHl7::Instance()->GetMensajesHL7(listaMensajes);
+                //primero vaciamos el arbol
+                m_pListViewCtrl->DeleteAllItems();
+                wxVector<wxVariant> data;
+                for(TListaMensajes::iterator it = listaMensajes.begin(); it != listaMensajes.end(); ++it) {
+                        data.clear();
+                        data.push_back(wxString::FromUTF8((*it).m_fecha.c_str()));
+                        data.push_back(wxString::FromUTF8((*it).m_destino.c_str()));
+                        switch((*it).m_estado) {
+                        case GIL::HL7::MensajeHL7::TE_Enviado:
+                                data.push_back(_("Sent"));
+                                data.push_back(wxEmptyString);
+                                break;
+                        case GIL::HL7::MensajeHL7::TE_Pendiente:
+                                data.push_back(_("Pending"));
+                                data.push_back(wxEmptyString);
+                                break;
+                        case GIL::HL7::MensajeHL7::TE_Warning:
+                                data.push_back(_("Warning"));
+                                data.push_back(wxString::FromUTF8((*it).m_mensajeError.c_str()));
+                                break;
+                        case GIL::HL7::MensajeHL7::TE_Error:
+                                data.push_back(_("Error"));
+                                data.push_back(wxString::FromUTF8((*it).m_mensajeError.c_str()));
+                                break;
+                        default:
+                                LOG_DEBUG("HL7", "VentanaControlHL7::RefrescarMensajes: unknown message state");
+                        }
+                        data.push_back(wxString::FromUTF8((*it).m_mensaje.c_str()));
+                        data.push_back(wxString::Format(wxT("%d"), (*it).m_id));
+                        m_pListModel->AppendItem(data);
+
+                        if(listaIds.find((*it).m_id) != listaIds.end()) {
+                                m_pListViewCtrl->SelectRow(m_pListModel->GetItemCount()-1);
+                        }
+                }
+        } catch (GIL::HL7::HL7Exception& ex) {
+                Thaw();
+                wxMessageBox(wxString::FromUTF8(ex.GetCause().c_str()), _("Error getting message"), wxICON_ERROR, this);
+                return;
+        }
+        Thaw();
+}
+
+void VentanaControlHL7::ActualizarEstadoControlador()
+{
+        m_pTimerRefresh->Start(5000);
+        if(GIL::HL7::ControladorEnvioHl7::EstaArrancado()) {
+                m_pEstado->SetLabel(_("Running"));
+                m_pEstado->SetToolTip(_("The submission process is started and ready to send"));
+                m_pEstado->SetForegroundColour(wxColour(0,174,0));
+                m_pBArrancarParar->SetLabel(_("Stop"));
+        } else {
+                m_pEstado->SetLabel(_("Stopped"));
+                m_pEstado->SetToolTip(_("Usually due to an error in sending a message"));
+                m_pEstado->SetForegroundColour(wxColour(174,0,0));
+                m_pBArrancarParar->SetLabel(_("Start"));
+        }
+        m_panelEstado->Layout();
+}
+
+void VentanaControlHL7::MostrarVentanaMensaje()
+{
+        wxDataViewItem id = m_pListViewCtrl->GetSelection();
+        if(id.IsOk()) {
+                wxVariant value;
+                m_pListModel->GetValue(value, id, COL_FECHA);
+                wxString fecha = value;
+                m_pListModel->GetValue(value, id, COL_DESTINO);
+                wxString destino = value;
+                m_pListModel->GetValue(value, id, COL_ESTADO);
+                wxString estado = value;
+                m_pListModel->GetValue(value, id, COL_MENSAJE);
+                wxString mensaje = value;
+                DialogoMostrarMensaje* mostrar = new DialogoMostrarMensaje(this,fecha,destino,estado,mensaje, false);
+                mostrar->Show();
+        }
+}
+
+void VentanaControlHL7::EliminarMensaje()
+{
+        //pillamos los elementos seleccionados
+        wxDataViewItemArray seleccionados;
+        m_pListViewCtrl->GetSelections(seleccionados);
+        std::list<int> listaIds;
+
+        for(wxDataViewItemArray::iterator it =seleccionados.begin(); it!= seleccionados.end(); ++it) {
+                wxVariant value;
+                m_pListModel->GetValue(value, (*it), COL_ID);
+                listaIds.push_back(value.GetLong());
+        }
+
+        if(listaIds.empty()) {
+                return;
+        }
+
+        int answer = wxMessageBox(_("Would you like to remove these messages?"), _("Delete"), wxYES_NO, this);
+        if (answer == wxYES) {
+                for(std::list<int>::iterator it = listaIds.begin(); it != listaIds.end(); ++it) {
+                        try {
+                                GIL::HL7::ControladorBBDDHl7::Instance()->EliminarMensaje((*it));
+                        } catch (GIL::HL7::HL7Exception& ex) {
+                                wxMessageBox(wxString::FromUTF8(ex.GetCause().c_str()), _("Error deleting messages"), wxICON_ERROR, this);
+                        }
+                }
+                RefrescarMensajes();
+        }
+}
+
+void VentanaControlHL7::OnMenuSalir( wxCommandEvent& /*event*/ )
+{
+        Close();
+}
+
+void VentanaControlHL7::OnKeyDown( wxKeyEvent& event )
+{
+        switch (event.GetKeyCode()) {
+        case WXK_DELETE:
+        case WXK_CLEAR:
+        case WXK_BACK:
+                EliminarMensaje();
+                event.Skip(false);
+                break;
+        case WXK_RETURN: {
+                wxCommandEvent evt;
+                OnArrancarPararClick(evt);
+                event.Skip(false);
+        }
+        break;
+        case WXK_ESCAPE:
+                Close();
+                event.Skip(false);
+                break;
+        case WXK_TAB:
+                m_pListViewCtrl->SetFocus();
+                event.Skip(false);
+                break;
+        default:
+                event.Skip(true);
+        }
+}
+}
+}
diff --git a/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7.h b/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7.h
new file mode 100644
index 0000000..b3350df
--- /dev/null
+++ b/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7.h
@@ -0,0 +1,70 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <list>
+
+#include "ventanacontrolhl7base.h"
+
+
+class wxSQLite3Database;
+namespace GNC
+{
+namespace GUI
+{
+class TimerControlHL7;
+class VentanaControlHL7 : public VentanaControlHL7Base
+{
+public:
+        //singleton
+        static VentanaControlHL7* Instance();
+        static void CerrarSiAbierta();
+        void Refrescar();
+
+protected:
+        static VentanaControlHL7*  m_pInstance;
+        TimerControlHL7* m_pTimerRefresh;
+
+        VentanaControlHL7();
+        ~VentanaControlHL7();
+
+        void OnActivate(wxActivateEvent &event);
+        void OnMensajeMenu(wxDataViewEvent& event);
+        void OnMensajeDClick(wxDataViewEvent& event);
+        void OnMostrarMensaje(wxCommandEvent &event);
+        void OnEditarMensaje(wxCommandEvent &event);
+        void OnListaKey(wxKeyEvent &event);
+        void OnEliminarMensaje(wxCommandEvent &event);
+        void OnPurgarMensajes(wxCommandEvent& event);
+        void OnActualizar(wxCommandEvent &event);
+        void OnArrancarPararClick(wxCommandEvent &event);
+        void RefrescarMensajes();
+        void ActualizarEstadoControlador();
+        void MostrarVentanaMensaje();
+        void EliminarMensaje();
+
+        virtual void OnMenuSalir( wxCommandEvent& event );
+        virtual void OnKeyDown( wxKeyEvent& event );
+
+        //endregion
+
+};
+};
+};
diff --git a/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7base.cpp b/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7base.cpp
new file mode 100644
index 0000000..2d32bf6
--- /dev/null
+++ b/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7base.cpp
@@ -0,0 +1,204 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "ventanacontrolhl7base.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+VentanaControlHL7Base::VentanaControlHL7Base( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 500,250 ), wxDefaultSize );
+
+        m_menubar1 = new wxMenuBar( 0 );
+        m_menuMensajes = new wxMenu();
+        m_menuItemPurgarMensajes = new wxMenuItem( m_menuMensajes, wxID_ANY, wxString( _("Remove sent messages") ) + wxT('\t') + wxT("ALT+p"), wxEmptyString, wxITEM_NORMAL );
+        m_menuMensajes->Append( m_menuItemPurgarMensajes );
+
+        m_menuMensajes->AppendSeparator();
+
+        m_menuItemSalir = new wxMenuItem( m_menuMensajes, wxID_ANY, wxString( _("Exit") ) + wxT('\t') + wxT("ESC"), wxEmptyString, wxITEM_NORMAL );
+        m_menuMensajes->Append( m_menuItemSalir );
+
+        m_menubar1->Append( m_menuMensajes, _("Messages") );
+
+        m_menu3 = new wxMenu();
+        m_menuItemActualizar = new wxMenuItem( m_menu3, wxID_ANY, wxString( _("Refresh") ) + wxT('\t') + wxT("F5"), wxEmptyString, wxITEM_NORMAL );
+        m_menu3->Append( m_menuItemActualizar );
+
+        m_menubar1->Append( m_menu3, _("View") );
+
+        this->SetMenuBar( m_menubar1 );
+
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+        m_pListModel = new wxDataViewListStore();
+        m_pListViewCtrl= new wxDataViewListCtrl(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_MULTIPLE|wxDV_HORIZ_RULES|wxDV_ROW_LINES);
+
+        m_pListViewCtrl->AssociateModel(m_pListModel.get());
+        bSizer5->Add( m_pListViewCtrl, 1, wxEXPAND, 5 );
+
+        m_panelEstado = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer3;
+        bSizer3 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pLabelEnvio = new wxStaticText( m_panelEstado, wxID_ANY, _("Send task status:"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelEnvio->Wrap( -1 );
+        bSizer3->Add( m_pLabelEnvio, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pEstado = new wxStaticText( m_panelEstado, wxID_ANY, _("Enabled"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pEstado->Wrap( -1 );
+        m_pEstado->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+        m_pEstado->SetForegroundColour( wxColour( 0, 174, 0 ) );
+
+        bSizer3->Add( m_pEstado, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pBArrancarParar = new wxButton( m_panelEstado, wxID_ANY, _("Start"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        m_pBArrancarParar->SetDefault();
+        bSizer3->Add( m_pBArrancarParar, 0, wxALL, 5 );
+
+
+        m_panelEstado->SetSizer( bSizer3 );
+        m_panelEstado->Layout();
+        bSizer3->Fit( m_panelEstado );
+        bSizer5->Add( m_panelEstado, 0, wxEXPAND | wxALL, 0 );
+
+
+        this->SetSizer( bSizer5 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_CHAR, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ) );
+        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ) );
+        m_menubar1->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ), NULL, this );
+        m_panelEstado->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeydown ), NULL, this );
+        m_pLabelEnvio->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ), NULL, this );
+        m_pEstado->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ), NULL, this );
+        m_pBArrancarParar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VentanaControlHL7Base::OnArrancarPararClick ), NULL, this );
+        m_pBArrancarParar->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ), NULL, this );
+}
+
+VentanaControlHL7Base::~VentanaControlHL7Base()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CHAR, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ) );
+        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ) );
+        m_menubar1->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ), NULL, this );
+        m_panelEstado->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeydown ), NULL, this );
+        m_pLabelEnvio->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ), NULL, this );
+        m_pEstado->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ), NULL, this );
+        m_pBArrancarParar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VentanaControlHL7Base::OnArrancarPararClick ), NULL, this );
+        m_pBArrancarParar->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlHL7Base::OnKeyDown ), NULL, this );
+
+}
+
+DialogoMostrarMensajeBase::DialogoMostrarMensajeBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 500,291 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer2;
+        bSizer2 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+        wxStaticBoxSizer* sbSizer1;
+        sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Message") ), wxVERTICAL );
+
+        wxFlexGridSizer* fgSizer1;
+        fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer1->AddGrowableCol( 1 );
+        fgSizer1->SetFlexibleDirection( wxBOTH );
+        fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText1 = new wxStaticText( this, wxID_ANY, _("Date:"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText1->Wrap( -1 );
+        fgSizer1->Add( m_staticText1, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pFecha = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
+        m_pFecha->SetMaxLength( 10000 );
+        fgSizer1->Add( m_pFecha, 1, wxALL|wxEXPAND, 5 );
+
+        m_staticText5 = new wxStaticText( this, wxID_ANY, _("Destination:"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText5->Wrap( -1 );
+        fgSizer1->Add( m_staticText5, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pDestino = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
+        m_pDestino->SetMaxLength( 0 );
+        fgSizer1->Add( m_pDestino, 1, wxALL|wxEXPAND, 5 );
+
+        m_staticText6 = new wxStaticText( this, wxID_ANY, _("Status:"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText6->Wrap( -1 );
+        fgSizer1->Add( m_staticText6, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pEstado = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
+        m_pEstado->SetMaxLength( 0 );
+        bSizer6->Add( m_pEstado, 1, wxALL|wxEXPAND, 5 );
+
+        wxString m_pChoiceEstadoChoices[] = { _("Sent"), _("Pending"), _("Error"), _("Warning") };
+        int m_pChoiceEstadoNChoices = sizeof( m_pChoiceEstadoChoices ) / sizeof( wxString );
+        m_pChoiceEstado = new wxChoice( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pChoiceEstadoNChoices, m_pChoiceEstadoChoices, 0 );
+        m_pChoiceEstado->SetSelection( 0 );
+        m_pChoiceEstado->Hide();
+
+        bSizer6->Add( m_pChoiceEstado, 1, wxALL|wxEXPAND, 5 );
+
+
+        fgSizer1->Add( bSizer6, 1, wxEXPAND, 5 );
+
+
+        sbSizer1->Add( fgSizer1, 0, wxEXPAND, 5 );
+
+        m_staticText7 = new wxStaticText( this, wxID_ANY, _("Message content:"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText7->Wrap( -1 );
+        sbSizer1->Add( m_staticText7, 0, wxALL, 5 );
+
+        m_pContenido = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxTE_MULTILINE|wxTE_READONLY );
+        m_pContenido->SetMaxLength( 0 );
+        sbSizer1->Add( m_pContenido, 1, wxALL|wxEXPAND, 5 );
+
+
+        bSizer5->Add( sbSizer1, 1, wxEXPAND, 5 );
+
+
+        bSizer2->Add( bSizer5, 1, wxEXPAND, 5 );
+
+        m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+        bSizer2->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+
+        wxBoxSizer* bSizer3;
+        bSizer3 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_button1 = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button1->SetDefault();
+        bSizer3->Add( m_button1, 0, wxALL, 5 );
+
+        m_CancelButton = new wxButton( this, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer3->Add( m_CancelButton, 0, wxALL, 5 );
+
+
+        bSizer2->Add( bSizer3, 0, wxALIGN_RIGHT, 5 );
+
+
+        this->SetSizer( bSizer2 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+}
+
+DialogoMostrarMensajeBase::~DialogoMostrarMensajeBase()
+{
+}
diff --git a/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7base.h b/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7base.h
new file mode 100644
index 0000000..88131fa
--- /dev/null
+++ b/cadxcore/main/gui/hl7controlwindow/ventanacontrolhl7base.h
@@ -0,0 +1,117 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __VENTANACONTROLHL7BASE_H__
+#define __VENTANACONTROLHL7BASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+#include <wx/string.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/menu.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/dataview.h>
+#include <wx/stattext.h>
+#include <wx/button.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/frame.h>
+#include <wx/textctrl.h>
+#include <wx/choice.h>
+#include <wx/statbox.h>
+#include <wx/statline.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class VentanaControlHL7Base
+///////////////////////////////////////////////////////////////////////////////
+class VentanaControlHL7Base : public wxFrame
+{
+private:
+
+protected:
+        wxMenuBar* m_menubar1;
+        wxMenu* m_menuMensajes;
+        wxMenuItem* m_menuItemPurgarMensajes;
+        wxMenuItem* m_menuItemSalir;
+        wxMenu* m_menu3;
+        wxMenuItem* m_menuItemActualizar;
+        wxDataViewListCtrl* m_pListViewCtrl;
+        wxObjectDataPtr<wxDataViewListStore> m_pListModel;
+        wxPanel* m_panelEstado;
+        wxStaticText* m_pLabelEnvio;
+        wxStaticText* m_pEstado;
+        wxButton* m_pBArrancarParar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnKeyDown( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnKeydown( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnArrancarPararClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        VentanaControlHL7Base( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("HL7 monitor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,250 ), long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU|wxTAB_TRAVERSAL );
+
+        ~VentanaControlHL7Base();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoMostrarMensajeBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoMostrarMensajeBase : public wxDialog
+{
+private:
+
+protected:
+        wxStaticText* m_staticText1;
+        wxTextCtrl* m_pFecha;
+        wxStaticText* m_staticText5;
+        wxTextCtrl* m_pDestino;
+        wxStaticText* m_staticText6;
+        wxTextCtrl* m_pEstado;
+        wxChoice* m_pChoiceEstado;
+        wxStaticText* m_staticText7;
+        wxTextCtrl* m_pContenido;
+        wxStaticLine* m_staticline1;
+        wxButton* m_button1;
+        wxButton* m_CancelButton;
+
+public:
+
+        DialogoMostrarMensajeBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Message detail"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 640,400 ), long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~DialogoMostrarMensajeBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__VENTANACONTROLHL7BASE_H__
diff --git a/cadxcore/main/gui/import/PasosImportacion.fbp b/cadxcore/main/gui/import/PasosImportacion.fbp
new file mode 100644
index 0000000..7d98b52
--- /dev/null
+++ b/cadxcore/main/gui/import/PasosImportacion.fbp
@@ -0,0 +1,4356 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">pasosimportacionbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">ImportacionBrowser</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">SelectImagesImportationBase</property>
+            <property name="pos"></property>
+            <property name="size">645,464</property>
+            <property name="subclass">wxScrolledWindow; wx/scrolwin.h</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer7</property>
+                <property name="orient">wxHORIZONTAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">10</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panelStep0</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">TitledPanelSinBorder; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Selected images</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer11</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pSizerButtons</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">protected</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">1</property>
+                                <property name="flag">wxEXPAND|wxALL</property>
+                                <property name="proportion">1</property>
+                                <object class="CustomControl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg">255,255,255</property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="class">wxThumbnailCtrl</property>
+                                    <property name="close_button">1</property>
+                                    <property name="construction">m_pImagenes = new wxThumbnailCtrl(m_panelStep0, -1, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL|wxTH_MULTIPLE_SELECT|wxTH_TEXT_LABEL);&#x0A;</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="declaration">wxThumbnailCtrl* m_pImagenes;</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="include">#include "../../../wx/thumbnailctrl/thumbnailctrl.h"</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pImagenes</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="settings"></property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">1</property>
+                                <property name="flag">wxEXPAND | wxALL</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">1</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPreviewPanel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer71</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="CustomControl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="class">wxPrevisualizacionDicom</property>
+                                                <property name="close_button">1</property>
+                                                <property name="construction">m_pPreview = new wxPrevisualizacionDicom(m_pPreviewPanel, -1);&#x0A;</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="declaration">wxPrevisualizacionDicom* m_pPreview;</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="include">#include <main/gui/wxprevisualizaciondicom.h></property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pPreview</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="settings"></property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer8</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">2</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Preview</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pButtonPreview</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnPreviewClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="spacer" expanded="0">
+                                            <property name="height">0</property>
+                                            <property name="permission">protected</property>
+                                            <property name="width">0</property>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">2</property>
+                                        <property name="flag">wxALL|wxALIGN_RIGHT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Remove all</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pButtonRemoveAll</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnRemoveAll</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg">230,230,230</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">PasoPerfilImportacionBase</property>
+            <property name="pos"></property>
+            <property name="size">500,300</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer3</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">PanelDatosGeneralesBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass">wxScrolledWindow; wx/scrolwin.h</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer15</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panelDemographicData</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Demographic data</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer8</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer152</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxGridSizer" expanded="0">
+                                    <property name="cols">2</property>
+                                    <property name="hgap">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">gSizer1</property>
+                                    <property name="permission">none</property>
+                                    <property name="rows">0</property>
+                                    <property name="vgap">0</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxFlexGridSizer" expanded="0">
+                                            <property name="cols">2</property>
+                                            <property name="flexible_direction">wxBOTH</property>
+                                            <property name="growablecols">1</property>
+                                            <property name="growablerows"></property>
+                                            <property name="hgap">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="name">fgSizer2</property>
+                                            <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                            <property name="permission">none</property>
+                                            <property name="rows">0</property>
+                                            <property name="vgap">0</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Identificator *</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText311</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxEXPAND</property>
+                                                <property name="proportion">1</property>
+                                                <object class="wxBoxSizer" expanded="0">
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">bSizer3</property>
+                                                    <property name="orient">wxHORIZONTAL</property>
+                                                    <property name="permission">none</property>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxTextCtrl" expanded="0">
+                                                            <property name="BottomDockable">1</property>
+                                                            <property name="LeftDockable">1</property>
+                                                            <property name="RightDockable">1</property>
+                                                            <property name="TopDockable">1</property>
+                                                            <property name="aui_layer"></property>
+                                                            <property name="aui_name"></property>
+                                                            <property name="aui_position"></property>
+                                                            <property name="aui_row"></property>
+                                                            <property name="best_size"></property>
+                                                            <property name="bg"></property>
+                                                            <property name="caption"></property>
+                                                            <property name="caption_visible">1</property>
+                                                            <property name="center_pane">0</property>
+                                                            <property name="close_button">1</property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default_pane">0</property>
+                                                            <property name="dock">Dock</property>
+                                                            <property name="dock_fixed">0</property>
+                                                            <property name="docking">Left</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="floatable">1</property>
+                                                            <property name="font"></property>
+                                                            <property name="gripper">0</property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="max_size"></property>
+                                                            <property name="maximize_button">0</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="maxlength">64</property>
+                                                            <property name="min_size"></property>
+                                                            <property name="minimize_button">0</property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="moveable">1</property>
+                                                            <property name="name">m_pPacienteId</property>
+                                                            <property name="pane_border">1</property>
+                                                            <property name="pane_position"></property>
+                                                            <property name="pane_size"></property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pin_button">1</property>
+                                                            <property name="pos"></property>
+                                                            <property name="resize">Resizable</property>
+                                                            <property name="show">1</property>
+                                                            <property name="size"></property>
+                                                            <property name="style"></property>
+                                                            <property name="subclass"></property>
+                                                            <property name="toolbar_pane">0</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="validator_data_type"></property>
+                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                            <property name="validator_variable"></property>
+                                                            <property name="value"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnText"></event>
+                                                            <event name="OnTextEnter"></event>
+                                                            <event name="OnTextMaxLen"></event>
+                                                            <event name="OnTextURL"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxStaticText" expanded="0">
+                                                            <property name="BottomDockable">1</property>
+                                                            <property name="LeftDockable">1</property>
+                                                            <property name="RightDockable">1</property>
+                                                            <property name="TopDockable">1</property>
+                                                            <property name="aui_layer"></property>
+                                                            <property name="aui_name"></property>
+                                                            <property name="aui_position"></property>
+                                                            <property name="aui_row"></property>
+                                                            <property name="best_size"></property>
+                                                            <property name="bg"></property>
+                                                            <property name="caption"></property>
+                                                            <property name="caption_visible">1</property>
+                                                            <property name="center_pane">0</property>
+                                                            <property name="close_button">1</property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="default_pane">0</property>
+                                                            <property name="dock">Dock</property>
+                                                            <property name="dock_fixed">0</property>
+                                                            <property name="docking">Left</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="floatable">1</property>
+                                                            <property name="font"></property>
+                                                            <property name="gripper">0</property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="label">(ID or medical history number)</property>
+                                                            <property name="max_size"></property>
+                                                            <property name="maximize_button">0</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="min_size"></property>
+                                                            <property name="minimize_button">0</property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="moveable">1</property>
+                                                            <property name="name">m_staticText17</property>
+                                                            <property name="pane_border">1</property>
+                                                            <property name="pane_position"></property>
+                                                            <property name="pane_size"></property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pin_button">1</property>
+                                                            <property name="pos"></property>
+                                                            <property name="resize">Resizable</property>
+                                                            <property name="show">1</property>
+                                                            <property name="size"></property>
+                                                            <property name="style"></property>
+                                                            <property name="subclass"></property>
+                                                            <property name="toolbar_pane">0</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style"></property>
+                                                            <property name="wrap">-1</property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Name</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText23</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxEXPAND</property>
+                                                <property name="proportion">1</property>
+                                                <object class="wxTextCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="maxlength">64</property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pPacienteNombre</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size">125,-1</property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnText"></event>
+                                                    <event name="OnTextEnter"></event>
+                                                    <event name="OnTextMaxLen"></event>
+                                                    <event name="OnTextURL"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Birth date</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText41</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxDatePickerCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pPacienteFechaNacimiento</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style">wxDP_DEFAULT|wxDP_SHOWCENTURY</property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnDateChanged">OnDateChanged</event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxFlexGridSizer" expanded="0">
+                                            <property name="cols">2</property>
+                                            <property name="flexible_direction">wxBOTH</property>
+                                            <property name="growablecols">1</property>
+                                            <property name="growablerows"></property>
+                                            <property name="hgap">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="name">fgSizer3</property>
+                                            <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                            <property name="permission">none</property>
+                                            <property name="rows">0</property>
+                                            <property name="vgap">0</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label"></property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">dummy1</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label"></property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">dummy2</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Surname</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText261</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxEXPAND</property>
+                                                <property name="proportion">1</property>
+                                                <object class="wxTextCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="maxlength">64</property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pPatientSurname</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size">125,-1</property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnText"></event>
+                                                    <event name="OnTextEnter"></event>
+                                                    <event name="OnTextMaxLen"></event>
+                                                    <event name="OnTextURL"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Sex</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText13</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxChoice" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="choices">"Unknown" "Male" "Female" "Others"</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pPacienteSexo</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="selection">0</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnChoice"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSep</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">TitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panelStudyDetails</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Study Details</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer13</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND|wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxGridBagSizer" expanded="0">
+                                    <property name="empty_cell_size"></property>
+                                    <property name="flexible_direction">wxBOTH</property>
+                                    <property name="growablecols">4</property>
+                                    <property name="growablerows"></property>
+                                    <property name="hgap">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">gbSizer2</property>
+                                    <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                    <property name="permission">none</property>
+                                    <property name="vgap">0</property>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">0</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT</property>
+                                        <property name="row">0</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font">,90,92,-1,70,0</property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Patient</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size">75,-1</property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText22</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">1</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                        <property name="row">0</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Weight</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText11</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">2</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="row">0</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxBoxSizer" expanded="0">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">bSizer4</property>
+                                            <property name="orient">wxHORIZONTAL</property>
+                                            <property name="permission">none</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxTextCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="maxlength">0</property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pPacientePeso</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size">35,-1</property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnText"></event>
+                                                    <event name="OnTextEnter"></event>
+                                                    <event name="OnTextMaxLen"></event>
+                                                    <event name="OnTextURL"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Kg</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText18</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">3</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                        <property name="row">0</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Height</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText15</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">4</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="row">0</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxBoxSizer" expanded="0">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">bSizer5</property>
+                                            <property name="orient">wxHORIZONTAL</property>
+                                            <property name="permission">none</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxTextCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="maxlength">0</property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pPacienteAltura</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size">35,-1</property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnText"></event>
+                                                    <event name="OnTextEnter"></event>
+                                                    <event name="OnTextMaxLen"></event>
+                                                    <event name="OnTextURL"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">cm</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_staticText19</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">0</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                        <property name="row">2</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font">,90,92,-1,70,0</property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Study</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText221</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">1</property>
+                                        <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                        <property name="row">1</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Accession Number</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pLabelAccNumber</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">2</property>
+                                        <property name="flag">wxALL|wxEXPAND</property>
+                                        <property name="row">1</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxTextCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="maxlength">64</property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pAccessionNumber</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnText"></event>
+                                            <event name="OnTextEnter"></event>
+                                            <event name="OnTextMaxLen"></event>
+                                            <event name="OnTextURL"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">1</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                        <property name="row">2</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Date</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText2</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">2</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="row">2</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxDatePickerCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pEstudioFecha</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style">wxDP_DEFAULT|wxDP_SHOWCENTURY</property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnDateChanged">OnDateChanged</event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">3</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                        <property name="row">2</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Time</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText16</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">4</property>
+                                        <property name="flag">wxALL</property>
+                                        <property name="row">2</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="CustomControl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="class"> wxMaskedTextCtrl</property>
+                                            <property name="close_button">1</property>
+                                            <property name="construction">m_pEstudioTime = new wxMaskedTextCtrl(m_panelStudyDetails, -1, wxT("hh:nn:ss"), wxT(""), wxDefaultPosition, wxSize(80,-1), 0);</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="declaration"> wxMaskedTextCtrl *m_pEstudioTime;</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="include"> #include <wx/maskedtextctrl/maskedtextctrl.h></property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pEstudioTime</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="settings"></property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus">OnKillFocusEstudioTimeControl</event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">1</property>
+                                        <property name="column">1</property>
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                        <property name="row">3</property>
+                                        <property name="rowspan">1</property>
+                                        <object class="wxStaticText" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="label">Description</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_staticText3</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <property name="wrap">-1</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="gbsizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="colspan">4</property>
+                                        <property name="column">2</property>
+                                        <property name="flag">wxALL|wxEXPAND</property>
+                                        <property name="row">3</property>
+                                        <property name="rowspan">2</property>
+                                        <object class="wxTextCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="maxlength"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pEstudioDescripcion</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style">wxTE_MULTILINE|wxTE_WORDWRAP</property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnText"></event>
+                                            <event name="OnTextEnter"></event>
+                                            <event name="OnTextMaxLen"></event>
+                                            <event name="OnTextURL"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pSeriesPanel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer151</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxALL</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxGridBagSizer" expanded="0">
+                                                <property name="empty_cell_size"></property>
+                                                <property name="flexible_direction">wxBOTH</property>
+                                                <property name="growablecols">4</property>
+                                                <property name="growablerows"></property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pSeriesSizer</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="vgap">0</property>
+                                                <object class="gbsizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="colspan">1</property>
+                                                    <property name="column">0</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT</property>
+                                                    <property name="row">0</property>
+                                                    <property name="rowspan">1</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font">,90,92,-1,70,0</property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Series</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size">75,-1</property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText231</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="gbsizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="colspan">1</property>
+                                                    <property name="column">1</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                    <property name="row">0</property>
+                                                    <property name="rowspan">1</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Date</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText212</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="gbsizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="colspan">1</property>
+                                                    <property name="column">2</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="row">0</property>
+                                                    <property name="rowspan">1</property>
+                                                    <object class="wxDatePickerCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pSerieFecha</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxDP_DEFAULT|wxDP_SHOWCENTURY</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnDateChanged"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="gbsizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="colspan">1</property>
+                                                    <property name="column">3</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALL</property>
+                                                    <property name="row">0</property>
+                                                    <property name="rowspan">1</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Time</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText1611</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="gbsizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="colspan">1</property>
+                                                    <property name="column">4</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="row">0</property>
+                                                    <property name="rowspan">1</property>
+                                                    <object class="CustomControl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="class"> wxMaskedTextCtrl</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="construction">m_pSerieTime = new wxMaskedTextCtrl(m_pSeriesPanel, -1, wxT("hh:nn:ss"), wxT(""), wxDefaultPosition, wxSize(80,-1), 0);</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="declaration"> wxMaskedTextCtrl *m_pSerieTime;</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="include"> #include <wx/maskedtextctrl/maskedtextctrl.h></property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pSerieTime</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="settings"></property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus">OnKillFocusSerieTimeControl</event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="gbsizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="colspan">1</property>
+                                                    <property name="column">1</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="row">1</property>
+                                                    <property name="rowspan">1</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Description</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText312</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="gbsizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="colspan">4</property>
+                                                    <property name="column">2</property>
+                                                    <property name="flag">wxEXPAND|wxALL</property>
+                                                    <property name="row">1</property>
+                                                    <property name="rowspan">2</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pSerieDescripcion</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxTE_MULTILINE|wxTE_WORDWRAP</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/import/generaldata.cpp b/cadxcore/main/gui/import/generaldata.cpp
new file mode 100644
index 0000000..7b0fb9d
--- /dev/null
+++ b/cadxcore/main/gui/import/generaldata.cpp
@@ -0,0 +1,446 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <string>
+#include <sstream>
+#include <cmath>
+
+#include <wx/msgdlg.h>
+#include <wx/filedlg.h>
+#include <wx/valtext.h>
+#include <wx/busyinfo.h>
+#include <wx/image.h>
+#include <wx/filename.h>
+#include <wx/dir.h>
+#include <wx/msgdlg.h>
+#include <wx/tokenzr.h>
+
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/controladorpermisos.h>
+
+#include <api/ientorno.h>
+
+#include <api/dicom/idicommanager.h>
+
+#include <main/controllers/commandcontroller.h>
+
+#include <commands/comandopacs.h>
+
+#include <export/tagsprivadoscomunes.h>
+
+#include "generaldata.h"
+
+namespace GNC
+{
+namespace GUI
+{
+void SetStringField(GIL::DICOM::DicomDataset& tagsDicom, const std::string& tagDICOM, wxTextCtrl* field, bool autodisable = true)
+{
+        std::string value;
+        if (tagsDicom.getTag(tagDICOM, value)) {
+                field->SetValue(wxString::FromUTF8(value.c_str()));
+                if (autodisable) {
+                        field->Enable(false);
+                }
+        }
+}
+
+void SetDateField(GIL::DICOM::DicomDataset& tagsDicom, const std::string& tagDICOM, wxDatePickerCtrl* field, bool autodisable = true)
+{
+        std::string value;
+        if (tagsDicom.getTag(tagDICOM, value)) {
+                wxDateTime fecha;
+                fecha.ParseFormat(wxString::FromUTF8(value.c_str()),wxT("%Y%m%d"));
+                if(fecha.IsValid()) {
+                        field->SetValue(fecha);
+                }
+                if (autodisable) {
+                        field->Enable(false);
+                }
+        }
+}
+
+void SetTimeField(GIL::DICOM::DicomDataset& tagsDicom, const std::string& tagDICOM, wxMaskedTextCtrl* field, bool autodisable = true)
+{
+        std::string value;
+        if (tagsDicom.getTag(tagDICOM, value)) {
+                wxDateTime fecha;
+                fecha.ParseFormat(wxString::FromUTF8(value.c_str()),wxT("%H%M%S"));
+                if(fecha.IsValid()) {
+                        field->SetDateTimeValue(fecha);
+                }
+                if (autodisable) {
+                        field->Enable(false);
+                }
+        }
+}
+
+GeneralData::GeneralData(wxWindow* pParent,IWizard* pWizard,const GNC::GCS::Ptr<ImportationData>& importationData, bool seriesDescription):PanelDatosGeneralesBase(pParent),IPasoWizard(pWizard)
+{
+        Hide();
+        m_pImportData=importationData;
+
+        wxTextValidator OnlyNum = wxTextValidator(wxFILTER_NUMERIC);
+        m_pPacienteAltura->SetValidator(OnlyNum);
+        m_pPacientePeso->SetValidator(OnlyNum);
+
+        wxDateTime date = wxDateTime::Now();
+        m_pEstudioTime->SetDateTimeValue(date);
+        m_pSerieTime->SetDateTimeValue(date);
+
+        if(m_pImportData->m_pIntegrationModel.IsValid()) {
+                GIL::DICOM::DicomDataset& tagsDicom = m_pImportData->m_pIntegrationModel->TagsDICOMOverwrite;
+                SetStringField(tagsDicom, "0008|1030", m_pEstudioDescripcion, false);
+                SetDateField(tagsDicom, "0008|0020", m_pEstudioFecha);
+                SetTimeField(tagsDicom, "0008|0030", m_pEstudioTime);
+                SetStringField(tagsDicom, "0008|103e", m_pSerieDescripcion);
+                SetDateField(tagsDicom, "0008|0021", m_pSerieFecha);
+                SetTimeField(tagsDicom, "0008|0031", m_pSerieTime);
+                SetDateField(tagsDicom, "0010|0030", m_pPacienteFechaNacimiento);
+                std::string tmp;
+                if (tagsDicom.getTag("0010|1020", tmp)) { //height
+                        wxString value = wxString::FromUTF8(tmp.c_str());
+                        double height;
+                        if (value.ToDouble(&height)) {
+                                height *= 100.0;
+                                wxString wstraltura;
+                                wstraltura << ((int)height);
+                                m_pPacienteAltura->SetValue(wstraltura);
+                                m_pPacienteAltura->Enable(false);
+                        }
+                }
+                if (tagsDicom.getTag("0010|0040", tmp)) { //sex
+                        wxString value = wxString::FromUTF8(tmp.c_str());
+                        if(value.CompareTo(wxT("M"), wxString::ignoreCase) == 0) {
+                                m_pPacienteSexo->SetSelection(1);
+                        } else if(value.CompareTo(wxT("F"), wxString::ignoreCase) == 0) {
+                                m_pPacienteSexo->SetSelection(2);
+                        } else if(value.CompareTo(wxT("O"), wxString::ignoreCase) == 0) {
+                                m_pPacienteSexo->SetSelection(3);
+                        } else {
+                                m_pPacienteSexo->SetSelection(0);
+                        }
+                        m_pPacienteSexo->Enable(false);
+                }
+                if (tagsDicom.getTag("0010|0020", tmp)) { // patient id
+                        SetStringField(tagsDicom, "0010|0020", m_pPacienteId);
+                } else {
+                        m_pPacienteId->SetBackgroundColour(wxColor(255, 213, 213));
+                        m_pPacienteId->SetFocus();
+                }
+                //name and surname
+                if (tagsDicom.getTag("0010|0010", tmp)) { //name of patient
+                        wxString value = wxString::FromUTF8(tmp.c_str());
+                        wxStringTokenizer tokenizer(value, wxT("^"));
+                        if(tokenizer.HasMoreTokens()) {
+                                m_pPatientSurname->SetValue(tokenizer.GetNextToken());
+                        }
+                        if(tokenizer.HasMoreTokens()) {
+                                m_pPacienteNombre->SetValue(tokenizer.GetNextToken());
+                        }
+                        m_pPatientSurname->Enable(false);
+                        m_pPacienteNombre->Enable(false);
+                }
+
+                // Populate Accno
+                if (GNC::GCS::IControladorPermisos::Instance()->Get("core.importacion", "input_accno").Activo()) {
+                        SetStringField(tagsDicom, "0008|0050", m_pAccessionNumber);
+                        m_pAccessionNumber->Show();
+                        m_pLabelAccNumber->Show();
+                } else {
+                        m_pAccessionNumber->Hide();
+                        m_pLabelAccNumber->Hide();
+                }
+        }
+        m_pSeriesPanel->Show(seriesDescription);
+        m_panelStudyDetails->Layout();
+        Layout();
+}
+
+GeneralData::~GeneralData()
+{
+}
+
+
+//region "Metodos heredados de Ipasowizard"
+
+bool GeneralData::Attach()
+{
+        return true;
+}
+
+std::string GeneralData::GetTitle()
+{
+        return _Std("Overview data of DICOM files");
+}
+
+std::string GeneralData::GetSubTitle()
+{
+        return _Std("DICOM data from the files to be generated can be populated");
+}
+
+bool GeneralData::Siguiente()
+{
+        return true;
+}
+
+bool GeneralData::Anterior()
+{
+        return false;
+}
+
+bool GeneralData::Cancelar()
+{
+        return true;
+}
+
+bool GeneralData::Validar()
+{
+        return Validar(false);
+}
+
+bool GeneralData::Validar(bool silent)
+{
+        wxString mensaje = wxEmptyString;
+
+        if (m_pPacienteId->GetValue().IsEmpty()) {
+                mensaje += _("\n* The patient ID is required.");
+        }
+
+        if(m_pPacienteNombre->GetValue().size() + m_pPatientSurname->GetValue().size() > 61) {
+                mensaje += _("\n* Concatenation of patient name and surnames can't be higher than 61.");
+        }
+
+        if(!ValidarDouble(std::string(m_pPacienteAltura->GetValue().ToUTF8()),0.0f,400.0f, false, false)) {
+                mensaje += _("\n* The format of the height in centimeters is not correct. ");
+        }
+
+        if ( m_pPacienteFechaNacimiento->GetValue().IsLaterThan(m_pEstudioFecha->GetValue()) ) {
+                mensaje += _("\n* The patient's birth date is after the date of study");
+        }
+
+        if(!ValidarDouble(std::string(m_pPacientePeso->GetValue().ToUTF8()),0.0f,400.0f, false, false)) {
+                mensaje += _("\n* The format of the weight is not correct. Valid range is between 0 and 400 Kg.");
+        }
+
+        if(mensaje != wxEmptyString) {
+                if (!silent) {
+                        wxMessageBox(_("The following errors have occurred when validating fields") + mensaje, _("Error validating fields"), wxICON_ERROR);
+                }
+
+                return false;
+        } else {
+                GetPacienteAltura();
+                GetPacienteNombre();
+                GetPacienteIdentificador();
+                GetPacienteEdad();
+                GetPacienteFechaNacimiento();
+                GetPacientePeso();
+                GetPacienteSexo();
+                GetEstudioDescripcion();
+                GetEstudioFecha();
+                GetEstudioTime();
+                GetSerieDescripcion();
+                GetSerieFecha();
+                GetSerieTime();
+                if (GNC::GCS::IControladorPermisos::Instance()->Get("core.importacion", "input_accno").Activo()) {
+                        GetAccno();
+                }
+                return true;
+        }
+}
+
+bool GeneralData::IsSkipped()
+{
+        return GNC::GCS::IControladorPermisos::Instance()->ObtenerPermiso("core.importacion", "skip_demographic") && Validar(true);
+}
+
+void GeneralData::GetPacienteNombre()
+{
+        std::ostringstream ostr;
+        ostr << m_pPatientSurname->GetValue().ToUTF8();
+        ostr << "^" << m_pPacienteNombre->GetValue().ToUTF8();
+
+        m_pImportData->baseImages.tags["0010|0010"] = ostr.str();
+}
+
+void GeneralData::GetPacienteIdentificador()
+{
+        m_pImportData->baseImages.tags["0010|0020"] = std::string(m_pPacienteId->GetValue().ToUTF8());
+}
+
+void GeneralData::GetPacienteFechaNacimiento()
+{
+        m_pImportData->baseImages.tags["0010|0030"] =  std::string(m_pPacienteFechaNacimiento->GetValue().Format(wxT("%Y%m%d")).ToUTF8());
+}
+
+void GeneralData::GetPacienteEdad()
+{
+        int edad = CalcularEdad();
+        std::ostringstream os;
+        os.fill('0');
+        os.width(3);
+        os << edad << "Y";
+        m_pImportData->baseImages.tags["0010|1010"] =  os.str();
+}
+
+void GeneralData::GetPacientePeso()
+{
+        std::string peso = std::string(m_pPacientePeso->GetValue().ToUTF8());
+        if (peso.size() != 0) {
+                m_pImportData->baseImages.tags["0010|1030"] =peso;
+        }
+}
+
+void GeneralData::GetPacienteAltura()
+{
+        if (!m_pPacienteAltura->GetValue().IsEmpty()) {
+                std::istringstream is (std::string(m_pPacienteAltura->GetValue().ToUTF8()));
+                float altura = 0.0f;
+                is >> altura;
+                altura = std::floor(altura);
+                altura /= 100.0f;
+                std::ostringstream os;
+                os << altura;
+                m_pImportData->baseImages.tags["0010|1020"] = os.str();
+        }
+}
+
+void GeneralData::GetPacienteSexo()
+{
+        switch(m_pPacienteSexo->GetSelection()) {
+        case 1:
+                m_pImportData->baseImages.tags["0010|0040"] = "M";
+                break;
+        case 2:
+                m_pImportData->baseImages.tags["0010|0040"] = "F";
+                break;
+        case 3:
+                m_pImportData->baseImages.tags["0010|0040"] = "O";
+                break;
+        default:
+                break;
+        }
+}
+
+void GeneralData::OnKillFocusEstudioTimeControl(wxFocusEvent &)
+{
+        if(!m_pEstudioTime->GetDateTimeValue().IsValid()) {
+                wxDateTime ahora = wxDateTime::Now();
+                m_pEstudioTime->SetDateTimeValue(ahora);
+        }
+}
+
+void GeneralData::EnableComponents(bool enable)
+{
+        m_pEstudioDescripcion->Enable(enable);
+        m_pEstudioFecha->Enable(enable);
+        m_pEstudioTime->Enable(enable);
+        m_pSerieDescripcion->Enable(enable);
+        m_pSerieFecha->Enable(enable);
+        m_pSerieTime->Enable(enable);
+}
+
+
+void GeneralData::GetEstudioFecha()
+{
+        if(m_pEstudioFecha->GetValue().IsValid()) {
+                m_pImportData->baseImages.tags["0008|0020"] = std::string(m_pEstudioFecha->GetValue().Format(wxT("%Y%m%d")).ToUTF8());
+        }
+}
+
+void GeneralData::GetEstudioTime()
+{
+        if(m_pEstudioTime->GetDateTimeValue().IsValid()) {
+                m_pImportData->baseImages.tags["0008|0030"] = std::string(m_pEstudioTime->GetDateTimeValue().Format(wxT("%H%M%S")).ToUTF8());
+        }
+}
+
+void GeneralData::GetEstudioDescripcion()
+{
+        m_pImportData->baseImages.tags["0008|1030"] = std::string(m_pEstudioDescripcion->GetValue().ToUTF8());
+}
+
+void GeneralData::OnKillFocusSerieTimeControl(wxFocusEvent &)
+{
+        if(!m_pSerieTime->GetDateTimeValue().IsValid()) {
+                wxDateTime ahora = wxDateTime::Now();
+                m_pSerieTime->SetDateTimeValue(ahora);
+        }
+}
+
+void GeneralData::GetSerieFecha()
+{
+        if (m_pSeriesPanel->IsShown()) {
+                if(m_pSerieFecha->GetValue().IsValid()) {
+                        m_pImportData->baseImages.tags["0008|0021"] = std::string(m_pSerieFecha->GetValue().Format(wxT("%Y%m%d")).ToUTF8());
+                }
+        } else {
+                if(m_pEstudioFecha->GetValue().IsValid()) {
+                        m_pImportData->baseImages.tags["0008|0021"] = std::string(m_pEstudioFecha->GetValue().Format(wxT("%Y%m%d")).ToUTF8());
+                }
+        }
+}
+
+void GeneralData::GetSerieTime()
+{
+        if (m_pSeriesPanel->IsShown()) {
+                if(m_pSerieTime->GetDateTimeValue().IsValid()) {
+                        m_pImportData->baseImages.tags["0008|0031"] = std::string(m_pSerieTime->GetDateTimeValue().Format(wxT("%H%M%S")).ToUTF8());
+                }
+        } else {
+                if(m_pEstudioTime->GetDateTimeValue().IsValid()) {
+                        m_pImportData->baseImages.tags["0008|0031"] = std::string(m_pEstudioTime->GetDateTimeValue().Format(wxT("%H%M%S")).ToUTF8());
+                }
+        }
+}
+
+void GeneralData::GetAccno()
+{
+        if (m_pAccessionNumber->IsShown()) {
+                m_pImportData->baseImages.tags["0008|0050"] = std::string(m_pAccessionNumber->GetValue().ToUTF8());
+        }
+}
+
+void GeneralData::GetSerieDescripcion()
+{
+        if (m_pSeriesPanel->IsShown()) {
+                m_pImportData->baseImages.tags["0008|103e"] =  std::string(m_pSerieDescripcion->GetValue().ToUTF8());
+        } else {
+                m_pImportData->baseImages.tags["0008|103e"] =  std::string(m_pEstudioDescripcion->GetValue().ToUTF8());
+        }
+}
+
+int GeneralData::CalcularEdad()
+{
+        wxDateTime fechaEstudio = m_pEstudioFecha->GetValue();
+        wxDateTime fechaNacimiento = m_pPacienteFechaNacimiento->GetValue();
+        int edad = 0;
+        if( (fechaEstudio.GetMonth() > fechaNacimiento.GetMonth()) ||
+            (fechaEstudio.GetMonth() == fechaNacimiento.GetMonth() && fechaEstudio.GetDay() >= fechaNacimiento.GetDay()) ) {
+                edad = fechaEstudio.GetYear() - fechaNacimiento.GetYear();
+        } else {
+                edad = fechaEstudio.GetYear() - fechaNacimiento.GetYear() - 1;
+        }
+        return edad;
+}
+}
+}
diff --git a/cadxcore/main/gui/import/generaldata.h b/cadxcore/main/gui/import/generaldata.h
new file mode 100644
index 0000000..526b851
--- /dev/null
+++ b/cadxcore/main/gui/import/generaldata.h
@@ -0,0 +1,98 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwizard.h>
+#include <api/api.h>
+#include <main/gui/import/pasosimportacionbase.h>
+#include <string>
+#include <vector>
+#include <main/gui/import/importationdata.h>
+#include <api/dicom/idicomizador.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IEntorno;
+}
+}
+
+namespace GNC
+{
+namespace GUI
+{
+
+class EXTAPI GeneralData: public PanelDatosGeneralesBase,public IPasoWizard
+{
+public:
+        GeneralData(wxWindow* pParent,IWizard* pWizard,const GNC::GCS::Ptr<ImportationData>& importationData, bool seriesDescription);
+        ~GeneralData();
+
+        //region "Metodos heredados de IPasoWizard"
+        virtual bool Attach();
+
+        virtual std::string GetTitle();
+
+        virtual std::string GetSubTitle();
+
+        virtual bool Siguiente();
+
+        virtual bool Anterior();
+
+        virtual bool Cancelar();
+
+        virtual bool Validar();
+
+        virtual bool Validar(bool silent);
+
+        virtual bool IsSkipped();
+        //endregion
+protected:
+        virtual void GetPacienteNombre();
+        virtual void GetPacienteIdentificador();
+        virtual void GetPacienteFechaNacimiento();
+        virtual void GetPacienteEdad();
+        virtual void GetPacientePeso();
+        virtual void GetPacienteAltura();
+        virtual void GetPacienteSexo();
+
+        void OnKillFocusEstudioTimeControl(wxFocusEvent &event);
+        void EnableComponents(bool enable);
+
+        virtual void GetEstudioFecha();
+        virtual void GetEstudioTime();
+        virtual void GetEstudioDescripcion();
+
+        void OnKillFocusSerieTimeControl(wxFocusEvent &event);
+
+        virtual void GetSerieFecha();
+        virtual void GetSerieTime();
+        virtual void GetAccno();
+        virtual void GetSerieDescripcion();
+
+        GNC::GCS::Ptr<ImportationData> m_pImportData;
+
+        // Helpers: AutoEdad
+        int CalcularEdad();
+};
+}
+}
diff --git a/cadxcore/main/gui/import/importationdata.h b/cadxcore/main/gui/import/importationdata.h
new file mode 100644
index 0000000..7a6b692
--- /dev/null
+++ b/cadxcore/main/gui/import/importationdata.h
@@ -0,0 +1,60 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <string>
+#include <vector>
+#include <api/autoptr.h>
+#include <api/imodelointegracion.h>
+
+
+namespace GNC
+{
+namespace GUI
+{
+class EXTAPI ImportationData
+{
+public:
+        typedef std::list<std::string> TListOfFiles;
+        GNC::GCS::Ptr<GIL::IModeloIntegracion> m_pIntegrationModel;
+        GIL::DICOM::DicomDataset baseImages;
+        TListOfFiles m_SourceFiles;
+
+        ImportationData()
+        {
+                m_pIntegrationModel = GNC::GCS::Ptr<GIL::IModeloIntegracion>(new GIL::IModeloIntegracion());
+        }
+
+        ImportationData(GNC::GCS::Ptr<GIL::IModeloIntegracion>& pModeloIntegracion)
+        {
+                if (pModeloIntegracion.IsValid()) {
+                        m_pIntegrationModel = pModeloIntegracion;
+                } else {
+                        m_pIntegrationModel = GNC::GCS::Ptr<GIL::IModeloIntegracion>(new GIL::IModeloIntegracion());
+                }
+        }
+
+        virtual ~ImportationData()
+        {
+        }
+};
+};
+};
diff --git a/cadxcore/main/gui/import/pasoperfilimportacion.cpp b/cadxcore/main/gui/import/pasoperfilimportacion.cpp
new file mode 100644
index 0000000..f17879e
--- /dev/null
+++ b/cadxcore/main/gui/import/pasoperfilimportacion.cpp
@@ -0,0 +1,208 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "pasoperfilimportacion.h"
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <vector>
+#include <sstream>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <main/controllers/controladorextensiones.h>
+#include <api/internationalization/internationalization.h>
+
+#include <api/ientorno.h>
+#include <wx/dcbuffer.h>
+#include <wx/wxginkgotoolbar.h>
+
+namespace GNC
+{
+namespace GUI
+{
+
+class ImportProfileToolBar : public wxGinkgoToolBar
+{
+public:
+        ImportProfileToolBar(PasoPefilImportacion* pParent, const wxColor& color = wxColor(255, 255, 255)) : wxGinkgoToolBar(pParent,wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_TEXT),
+                m_pParent(pParent),
+                idTool(1)
+        {
+                SetToolBitmapSize(wxSize(64,64));
+                wxGinkgoToolBarArt* pToolArt= new wxGinkgoToolBarArt(color);
+                SetBackgroundColour(wxColour(255,255,255));
+                SetArtProvider(pToolArt);
+
+                this->Connect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ImportProfileToolBar::OnToolClick),NULL, this );
+                this->Connect( wxID_ANY, wxEVT_LEFT_DCLICK, wxCommandEventHandler(ImportProfileToolBar::OnToolDClick),NULL, this );
+        }
+
+        ~ImportProfileToolBar()
+        {
+                this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(ImportProfileToolBar::OnToolClick),NULL, this );
+                this->Disconnect( wxID_ANY, wxEVT_LEFT_DCLICK, wxCommandEventHandler(ImportProfileToolBar::OnToolDClick),NULL, this );
+        }
+
+        void AddTool(const std::string& toolTip, const wxBitmap& icon)
+        {
+                wxGinkgoToolBar::AddTool(idTool++, wxString::FromUTF8(toolTip.c_str()), icon, wxString::FromUTF8(toolTip.c_str()), wxITEM_CHECK);
+        }
+
+        void SelectTool(int defaultDicomizator)
+        {
+                for (int i = 1; i < idTool; ++i) {
+                        ForceToggleTool(i, i == defaultDicomizator);
+                }
+                if ((defaultDicomizator <1 || defaultDicomizator > idTool) && idTool > 1) {
+                        ForceToggleTool(1,true);
+                }
+        }
+
+
+        void OnToolClick(wxCommandEvent& event)
+        {
+                for (int i = 1; i < idTool; ++i) {
+                        ForceToggleTool(i, i == event.GetId());
+                }
+                Refresh(true);
+                event.Skip(false);
+        }
+
+
+        void OnToolDClick(wxCommandEvent& /*event*/)
+        {
+                m_pParent->SiguientePaso();
+        }
+
+        int GetIdSelected()
+        {
+                for (int i = 1; i < idTool; ++i) {
+                        if (wxAuiToolBar::GetToolToggled(i)) {
+                                return i;
+                        }
+                }
+                return -1;
+        }
+
+        std::string GetNameSelected()
+        {
+                for (int i = 1; i < idTool; ++i) {
+                        if (wxAuiToolBar::GetToolToggled(i)) {
+                                return std::string(GetToolLabel(i).ToUTF8());
+                        }
+                }
+                return "";
+        }
+
+        PasoPefilImportacion* m_pParent;
+        int idTool;
+};
+
+PasoPefilImportacion::PasoPefilImportacion(wxWindow* pParent,IWizard* pWizard):PasoPerfilImportacionBase(pParent),
+        IPasoWizard(pWizard),
+        m_pToolBar(new ImportProfileToolBar(this))
+{
+        m_pControladorModulo = NULL;
+
+        GetSizer()->Add( 0, 0, 1, wxEXPAND, 5 );
+        GetSizer()->Add(m_pToolBar, 0, wxALIGN_CENTER_HORIZONTAL);
+        GetSizer()->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+        GNC::ControladorExtensiones::ListaModulos listaModulos = ControladorExtensiones::Instance()->Modulos();
+        for(GNC::ControladorExtensiones::IteradorListaModulos it=listaModulos.begin(); it!=listaModulos.end(); ++it) {
+                GNC::GCS::IModuleController* modulo = (*it).second;
+                if(modulo->SoportaImportacion()) {
+                        m_pToolBar->AddTool(modulo->GetImporterDescription(), modulo->GetImporterIcon());
+                }
+        }
+
+        {
+                int defaultDicomizator;
+                GNC::GCS::ConfigurationController::Instance()->readIntUser("/GinkgoCore/Importacion", "DefaultDicomizator", defaultDicomizator);
+                m_pToolBar->SelectTool(defaultDicomizator);
+        }
+
+        m_pToolBar->Realize();
+        Layout();
+}
+
+PasoPefilImportacion::~PasoPefilImportacion()
+{
+        m_pControladorModulo = NULL;
+}
+
+//region "Metodos heredados de Ipasowizard"
+
+std::string PasoPefilImportacion::GetTitle()
+{
+        return _Std("Selecting Import Profile");
+}
+
+std::string PasoPefilImportacion::GetSubTitle()
+{
+        return _Std("You must select the profile you want to use import");
+}
+
+bool PasoPefilImportacion::Siguiente()
+{
+        return true;
+}
+
+bool PasoPefilImportacion::Anterior()
+{
+        return false;
+}
+
+bool PasoPefilImportacion::Cancelar()
+{
+        return true;
+}
+
+bool PasoPefilImportacion::Validar()
+{
+
+        if(m_pToolBar->GetIdSelected()<=0) {
+                wxMessageBox(_("You must select the import profile"), _("Info"),
+                             wxOK | wxICON_INFORMATION, this);
+                return false;
+        }
+
+        std::string nombreModulo(m_pToolBar->GetNameSelected());
+
+        GNC::ControladorExtensiones::ListaModulos listaModulos = ControladorExtensiones::Instance()->Modulos();
+        for(GNC::ControladorExtensiones::IteradorListaModulos it=listaModulos.begin(); it!=listaModulos.end(); ++it) {
+                GNC::GCS::IModuleController* modulo=(*it).second;
+                if(modulo->GetImporterDescription() == nombreModulo) {
+                        m_pControladorModulo = modulo;
+
+                        GNC::GCS::ConfigurationController::Instance()->writeIntUser("/GinkgoCore/Importacion", "DefaultDicomizator", m_pToolBar->GetIdSelected());
+                        return true;
+                }
+        }
+        //
+        wxMessageBox(_("Unexpected error, select the module again"), _("Info"),
+                     wxOK | wxICON_INFORMATION, this);
+        return false;
+}
+//endregion
+}
+}
diff --git a/cadxcore/main/gui/import/pasoperfilimportacion.h b/cadxcore/main/gui/import/pasoperfilimportacion.h
new file mode 100644
index 0000000..adb10c5
--- /dev/null
+++ b/cadxcore/main/gui/import/pasoperfilimportacion.h
@@ -0,0 +1,75 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include "pasosimportacionbase.h"
+
+#include <api/iwizard.h>
+#include <api/controllers/ipacscontroller.h>
+#include <api/ientorno.h>
+
+#include <string>
+#include <vector>
+
+namespace GNC
+{
+
+namespace GCS
+{
+class IEntorno;
+class IModuleController;
+}
+
+namespace GUI
+{
+class ImportProfileToolBar;
+
+class PasoPefilImportacion: public PasoPerfilImportacionBase, public IPasoWizard
+{
+public:
+        PasoPefilImportacion(wxWindow* pParent,IWizard* pWizard);
+        ~PasoPefilImportacion();
+
+        GNC::GCS::IModuleController* GetControladorSeleccionado()
+        {
+                return m_pControladorModulo;
+        };
+
+protected:
+        GNC::GCS::IModuleController* m_pControladorModulo;
+        ImportProfileToolBar* m_pToolBar;
+
+        //region "Metodos heredados de IPasoWizard"
+        virtual std::string GetTitle();
+
+        virtual std::string GetSubTitle();
+
+        virtual bool Siguiente();
+
+        virtual bool Anterior();
+
+        virtual bool Cancelar();
+
+        virtual bool Validar();
+        //endregion
+};
+}
+}
diff --git a/cadxcore/main/gui/import/pasosimportacionbase.cpp b/cadxcore/main/gui/import/pasosimportacionbase.cpp
new file mode 100644
index 0000000..38e6cdb
--- /dev/null
+++ b/cadxcore/main/gui/import/pasosimportacionbase.cpp
@@ -0,0 +1,384 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "pasosimportacionbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+SelectImagesImportationBase::SelectImagesImportationBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxScrolledWindow( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_panelStep0 = new TitledPanelSinBorder( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panelStep0->SetToolTip( _("Selected images") );
+
+        wxBoxSizer* bSizer11;
+        bSizer11 = new wxBoxSizer( wxVERTICAL );
+
+        m_pSizerButtons = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer11->Add( m_pSizerButtons, 0, wxEXPAND, 5 );
+
+        m_pImagenes = new wxThumbnailCtrl(m_panelStep0, -1, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL|wxTH_MULTIPLE_SELECT|wxTH_TEXT_LABEL);
+
+        m_pImagenes->SetBackgroundColour( wxColour( 255, 255, 255 ) );
+
+        bSizer11->Add( m_pImagenes, 1, wxEXPAND|wxALL, 1 );
+
+        m_pPreviewPanel = new wxPanel( m_panelStep0, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPreviewPanel->Hide();
+
+        wxBoxSizer* bSizer71;
+        bSizer71 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPreview = new wxPrevisualizacionDicom(m_pPreviewPanel, -1);
+
+        bSizer71->Add( m_pPreview, 1, wxEXPAND, 5 );
+
+
+        m_pPreviewPanel->SetSizer( bSizer71 );
+        m_pPreviewPanel->Layout();
+        bSizer71->Fit( m_pPreviewPanel );
+        bSizer11->Add( m_pPreviewPanel, 1, wxEXPAND | wxALL, 1 );
+
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pButtonPreview = new wxButton( m_panelStep0, wxID_ANY, _("Preview"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer8->Add( m_pButtonPreview, 0, wxALL, 2 );
+
+
+        bSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pButtonRemoveAll = new wxButton( m_panelStep0, wxID_ANY, _("Remove all"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer8->Add( m_pButtonRemoveAll, 0, wxALL|wxALIGN_RIGHT, 2 );
+
+
+        bSizer11->Add( bSizer8, 0, wxEXPAND, 5 );
+
+
+        m_panelStep0->SetSizer( bSizer11 );
+        m_panelStep0->Layout();
+        bSizer11->Fit( m_panelStep0 );
+        bSizer7->Add( m_panelStep0, 1, wxEXPAND, 10 );
+
+
+        this->SetSizer( bSizer7 );
+        this->Layout();
+
+        // Connect Events
+        m_pButtonPreview->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectImagesImportationBase::OnPreviewClick ), NULL, this );
+        m_pButtonRemoveAll->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectImagesImportationBase::OnRemoveAll ), NULL, this );
+}
+
+SelectImagesImportationBase::~SelectImagesImportationBase()
+{
+        // Disconnect Events
+        m_pButtonPreview->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectImagesImportationBase::OnPreviewClick ), NULL, this );
+        m_pButtonRemoveAll->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectImagesImportationBase::OnRemoveAll ), NULL, this );
+
+}
+
+PasoPerfilImportacionBase::PasoPerfilImportacionBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetBackgroundColour( wxColour( 230, 230, 230 ) );
+
+        wxBoxSizer* bSizer3;
+        bSizer3 = new wxBoxSizer( wxVERTICAL );
+
+
+        this->SetSizer( bSizer3 );
+        this->Layout();
+}
+
+PasoPerfilImportacionBase::~PasoPerfilImportacionBase()
+{
+}
+
+PanelDatosGeneralesBase::PanelDatosGeneralesBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxScrolledWindow( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_panelDemographicData = new TitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panelDemographicData->SetToolTip( _("Demographic data") );
+
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer152;
+        bSizer152 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer8->Add( bSizer152, 0, wxEXPAND, 5 );
+
+        wxGridSizer* gSizer1;
+        gSizer1 = new wxGridSizer( 0, 2, 0, 0 );
+
+        wxFlexGridSizer* fgSizer2;
+        fgSizer2 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer2->AddGrowableCol( 1 );
+        fgSizer2->SetFlexibleDirection( wxBOTH );
+        fgSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText311 = new wxStaticText( m_panelDemographicData, wxID_ANY, _("Identificator *"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText311->Wrap( -1 );
+        fgSizer2->Add( m_staticText311, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxBoxSizer* bSizer3;
+        bSizer3 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pPacienteId = new wxTextCtrl( m_panelDemographicData, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pPacienteId->SetMaxLength( 64 );
+        bSizer3->Add( m_pPacienteId, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_staticText17 = new wxStaticText( m_panelDemographicData, wxID_ANY, _("(ID or medical history number)"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText17->Wrap( -1 );
+        bSizer3->Add( m_staticText17, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+        fgSizer2->Add( bSizer3, 1, wxEXPAND, 5 );
+
+        m_staticText23 = new wxStaticText( m_panelDemographicData, wxID_ANY, _("Name"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText23->Wrap( -1 );
+        fgSizer2->Add( m_staticText23, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pPacienteNombre = new wxTextCtrl( m_panelDemographicData, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 125,-1 ), 0 );
+        m_pPacienteNombre->SetMaxLength( 64 );
+        fgSizer2->Add( m_pPacienteNombre, 1, wxALL|wxEXPAND, 5 );
+
+        m_staticText41 = new wxStaticText( m_panelDemographicData, wxID_ANY, _("Birth date"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText41->Wrap( -1 );
+        fgSizer2->Add( m_staticText41, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pPacienteFechaNacimiento = new wxDatePickerCtrl( m_panelDemographicData, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_SHOWCENTURY );
+        fgSizer2->Add( m_pPacienteFechaNacimiento, 0, wxALL, 5 );
+
+
+        gSizer1->Add( fgSizer2, 1, wxEXPAND, 5 );
+
+        wxFlexGridSizer* fgSizer3;
+        fgSizer3 = new wxFlexGridSizer( 0, 2, 0, 0 );
+        fgSizer3->AddGrowableCol( 1 );
+        fgSizer3->SetFlexibleDirection( wxBOTH );
+        fgSizer3->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        dummy1 = new wxStaticText( m_panelDemographicData, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        dummy1->Wrap( -1 );
+        fgSizer3->Add( dummy1, 0, wxALL, 5 );
+
+        dummy2 = new wxStaticText( m_panelDemographicData, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        dummy2->Wrap( -1 );
+        fgSizer3->Add( dummy2, 0, wxALL, 5 );
+
+        m_staticText261 = new wxStaticText( m_panelDemographicData, wxID_ANY, _("Surname"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText261->Wrap( -1 );
+        fgSizer3->Add( m_staticText261, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pPatientSurname = new wxTextCtrl( m_panelDemographicData, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 125,-1 ), 0 );
+        m_pPatientSurname->SetMaxLength( 64 );
+        fgSizer3->Add( m_pPatientSurname, 1, wxALL|wxEXPAND, 5 );
+
+        m_staticText13 = new wxStaticText( m_panelDemographicData, wxID_ANY, _("Sex"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText13->Wrap( -1 );
+        fgSizer3->Add( m_staticText13, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxString m_pPacienteSexoChoices[] = { _("Unknown"), _("Male"), _("Female"), _("Others") };
+        int m_pPacienteSexoNChoices = sizeof( m_pPacienteSexoChoices ) / sizeof( wxString );
+        m_pPacienteSexo = new wxChoice( m_panelDemographicData, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pPacienteSexoNChoices, m_pPacienteSexoChoices, 0 );
+        m_pPacienteSexo->SetSelection( 0 );
+        fgSizer3->Add( m_pPacienteSexo, 0, wxALL, 5 );
+
+
+        gSizer1->Add( fgSizer3, 1, wxEXPAND, 5 );
+
+
+        bSizer8->Add( gSizer1, 1, wxEXPAND, 5 );
+
+
+        m_panelDemographicData->SetSizer( bSizer8 );
+        m_panelDemographicData->Layout();
+        bSizer8->Fit( m_panelDemographicData );
+        bSizer15->Add( m_panelDemographicData, 0, wxEXPAND, 5 );
+
+        m_pSep = new TitledPanelSeparatorV( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer15->Add( m_pSep, 0, wxEXPAND, 5 );
+
+        m_panelStudyDetails = new TitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panelStudyDetails->SetToolTip( _("Study Details") );
+
+        wxBoxSizer* bSizer13;
+        bSizer13 = new wxBoxSizer( wxVERTICAL );
+
+        wxGridBagSizer* gbSizer2;
+        gbSizer2 = new wxGridBagSizer( 0, 0 );
+        gbSizer2->SetFlexibleDirection( wxBOTH );
+        gbSizer2->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText22 = new wxStaticText( m_panelStudyDetails, wxID_ANY, _("Patient"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText22->Wrap( -1 );
+        m_staticText22->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+        m_staticText22->SetMinSize( wxSize( 75,-1 ) );
+
+        gbSizer2->Add( m_staticText22, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 );
+
+        m_staticText11 = new wxStaticText( m_panelStudyDetails, wxID_ANY, _("Weight"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText11->Wrap( -1 );
+        gbSizer2->Add( m_staticText11, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pPacientePeso = new wxTextCtrl( m_panelStudyDetails, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 35,-1 ), 0 );
+        m_pPacientePeso->SetMaxLength( 0 );
+        bSizer4->Add( m_pPacientePeso, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+        m_staticText18 = new wxStaticText( m_panelStudyDetails, wxID_ANY, _("Kg"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText18->Wrap( -1 );
+        bSizer4->Add( m_staticText18, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+        gbSizer2->Add( bSizer4, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
+
+        m_staticText15 = new wxStaticText( m_panelStudyDetails, wxID_ANY, _("Height"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText15->Wrap( -1 );
+        gbSizer2->Add( m_staticText15, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pPacienteAltura = new wxTextCtrl( m_panelStudyDetails, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 35,-1 ), 0 );
+        m_pPacienteAltura->SetMaxLength( 0 );
+        bSizer5->Add( m_pPacienteAltura, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+        m_staticText19 = new wxStaticText( m_panelStudyDetails, wxID_ANY, _("cm"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText19->Wrap( -1 );
+        bSizer5->Add( m_staticText19, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+
+
+        gbSizer2->Add( bSizer5, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxEXPAND, 5 );
+
+        m_staticText221 = new wxStaticText( m_panelStudyDetails, wxID_ANY, _("Study"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText221->Wrap( -1 );
+        m_staticText221->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+        gbSizer2->Add( m_staticText221, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pLabelAccNumber = new wxStaticText( m_panelStudyDetails, wxID_ANY, _("Accession Number"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelAccNumber->Wrap( -1 );
+        gbSizer2->Add( m_pLabelAccNumber, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pAccessionNumber = new wxTextCtrl( m_panelStudyDetails, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pAccessionNumber->SetMaxLength( 64 );
+        gbSizer2->Add( m_pAccessionNumber, wxGBPosition( 1, 2 ), wxGBSpan( 1, 1 ), wxALL|wxEXPAND, 5 );
+
+        m_staticText2 = new wxStaticText( m_panelStudyDetails, wxID_ANY, _("Date"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText2->Wrap( -1 );
+        gbSizer2->Add( m_staticText2, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pEstudioFecha = new wxDatePickerCtrl( m_panelStudyDetails, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_SHOWCENTURY );
+        gbSizer2->Add( m_pEstudioFecha, wxGBPosition( 2, 2 ), wxGBSpan( 1, 1 ), wxALL, 5 );
+
+        m_staticText16 = new wxStaticText( m_panelStudyDetails, wxID_ANY, _("Time"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText16->Wrap( -1 );
+        gbSizer2->Add( m_staticText16, wxGBPosition( 2, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pEstudioTime = new wxMaskedTextCtrl(m_panelStudyDetails, -1, wxT("hh:nn:ss"), wxT(""), wxDefaultPosition, wxSize(80,-1), 0);
+        gbSizer2->Add( m_pEstudioTime, wxGBPosition( 2, 4 ), wxGBSpan( 1, 1 ), wxALL, 5 );
+
+        m_staticText3 = new wxStaticText( m_panelStudyDetails, wxID_ANY, _("Description"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText3->Wrap( -1 );
+        gbSizer2->Add( m_staticText3, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pEstudioDescripcion = new wxTextCtrl( m_panelStudyDetails, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_WORDWRAP );
+        gbSizer2->Add( m_pEstudioDescripcion, wxGBPosition( 3, 2 ), wxGBSpan( 2, 4 ), wxALL|wxEXPAND, 5 );
+
+
+        gbSizer2->AddGrowableCol( 4 );
+
+        bSizer13->Add( gbSizer2, 0, wxEXPAND|wxALL, 5 );
+
+        m_pSeriesPanel = new wxPanel( m_panelStudyDetails, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer151;
+        bSizer151 = new wxBoxSizer( wxVERTICAL );
+
+        wxGridBagSizer* m_pSeriesSizer;
+        m_pSeriesSizer = new wxGridBagSizer( 0, 0 );
+        m_pSeriesSizer->SetFlexibleDirection( wxBOTH );
+        m_pSeriesSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_staticText231 = new wxStaticText( m_pSeriesPanel, wxID_ANY, _("Series"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText231->Wrap( -1 );
+        m_staticText231->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+        m_staticText231->SetMinSize( wxSize( 75,-1 ) );
+
+        m_pSeriesSizer->Add( m_staticText231, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxRIGHT, 5 );
+
+        m_staticText212 = new wxStaticText( m_pSeriesPanel, wxID_ANY, _("Date"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText212->Wrap( -1 );
+        m_pSeriesSizer->Add( m_staticText212, wxGBPosition( 0, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pSerieFecha = new wxDatePickerCtrl( m_pSeriesPanel, wxID_ANY, wxDefaultDateTime, wxDefaultPosition, wxDefaultSize, wxDP_DEFAULT|wxDP_SHOWCENTURY );
+        m_pSeriesSizer->Add( m_pSerieFecha, wxGBPosition( 0, 2 ), wxGBSpan( 1, 1 ), wxALL, 5 );
+
+        m_staticText1611 = new wxStaticText( m_pSeriesPanel, wxID_ANY, _("Time"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText1611->Wrap( -1 );
+        m_pSeriesSizer->Add( m_staticText1611, wxGBPosition( 0, 3 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxALL, 5 );
+
+        m_pSerieTime = new wxMaskedTextCtrl(m_pSeriesPanel, -1, wxT("hh:nn:ss"), wxT(""), wxDefaultPosition, wxSize(80,-1), 0);
+        m_pSeriesSizer->Add( m_pSerieTime, wxGBPosition( 0, 4 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_staticText312 = new wxStaticText( m_pSeriesPanel, wxID_ANY, _("Description"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText312->Wrap( -1 );
+        m_pSeriesSizer->Add( m_staticText312, wxGBPosition( 1, 1 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pSerieDescripcion = new wxTextCtrl( m_pSeriesPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_WORDWRAP );
+        m_pSeriesSizer->Add( m_pSerieDescripcion, wxGBPosition( 1, 2 ), wxGBSpan( 2, 4 ), wxEXPAND|wxALL, 5 );
+
+
+        m_pSeriesSizer->AddGrowableCol( 4 );
+
+        bSizer151->Add( m_pSeriesSizer, 1, wxEXPAND|wxALL, 5 );
+
+
+        m_pSeriesPanel->SetSizer( bSizer151 );
+        m_pSeriesPanel->Layout();
+        bSizer151->Fit( m_pSeriesPanel );
+        bSizer13->Add( m_pSeriesPanel, 1, wxEXPAND, 5 );
+
+
+        m_panelStudyDetails->SetSizer( bSizer13 );
+        m_panelStudyDetails->Layout();
+        bSizer13->Fit( m_panelStudyDetails );
+        bSizer15->Add( m_panelStudyDetails, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer15 );
+        this->Layout();
+        bSizer15->Fit( this );
+
+        // Connect Events
+        m_pPacienteFechaNacimiento->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( PanelDatosGeneralesBase::OnDateChanged ), NULL, this );
+        m_pEstudioFecha->Connect( wxEVT_DATE_CHANGED, wxDateEventHandler( PanelDatosGeneralesBase::OnDateChanged ), NULL, this );
+        m_pEstudioTime->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( PanelDatosGeneralesBase::OnKillFocusEstudioTimeControl ), NULL, this );
+        m_pSerieTime->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( PanelDatosGeneralesBase::OnKillFocusSerieTimeControl ), NULL, this );
+}
+
+PanelDatosGeneralesBase::~PanelDatosGeneralesBase()
+{
+        // Disconnect Events
+        m_pPacienteFechaNacimiento->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( PanelDatosGeneralesBase::OnDateChanged ), NULL, this );
+        m_pEstudioFecha->Disconnect( wxEVT_DATE_CHANGED, wxDateEventHandler( PanelDatosGeneralesBase::OnDateChanged ), NULL, this );
+        m_pEstudioTime->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( PanelDatosGeneralesBase::OnKillFocusEstudioTimeControl ), NULL, this );
+        m_pSerieTime->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( PanelDatosGeneralesBase::OnKillFocusSerieTimeControl ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/import/pasosimportacionbase.h b/cadxcore/main/gui/import/pasosimportacionbase.h
new file mode 100644
index 0000000..9ed52ec
--- /dev/null
+++ b/cadxcore/main/gui/import/pasosimportacionbase.h
@@ -0,0 +1,169 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __PASOSIMPORTACIONBASE_H__
+#define __PASOSIMPORTACIONBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class TitledPanel;
+class TitledPanelSeparatorV;
+class TitledPanelSinBorder;
+class wxScrolledWindow;
+
+#include "wx/scrolwin.h"
+#include <wx/sizer.h>
+#include <wx/gdicmn.h>
+#include "../../../wx/thumbnailctrl/thumbnailctrl.h"
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <main/gui/wxprevisualizaciondicom.h>
+#include <wx/panel.h>
+#include <wx/button.h>
+#include <wx/stattext.h>
+#include <wx/textctrl.h>
+#include <wx/datectrl.h>
+#include <wx/dateevt.h>
+#include <wx/choice.h>
+#include <wx/maskedtextctrl/maskedtextctrl.h>
+#include <wx/gbsizer.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class SelectImagesImportationBase
+///////////////////////////////////////////////////////////////////////////////
+class SelectImagesImportationBase : public wxScrolledWindow
+{
+private:
+
+protected:
+        TitledPanelSinBorder* m_panelStep0;
+        wxBoxSizer* m_pSizerButtons;
+        wxThumbnailCtrl* m_pImagenes;
+        wxPanel* m_pPreviewPanel;
+        wxPrevisualizacionDicom* m_pPreview;
+        wxButton* m_pButtonPreview;
+        wxButton* m_pButtonRemoveAll;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnPreviewClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnRemoveAll( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        SelectImagesImportationBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 645,464 ), long style = wxTAB_TRAVERSAL );
+        ~SelectImagesImportationBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PasoPerfilImportacionBase
+///////////////////////////////////////////////////////////////////////////////
+class PasoPerfilImportacionBase : public wxPanel
+{
+private:
+
+protected:
+
+public:
+
+        PasoPerfilImportacionBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 500,300 ), long style = wxTAB_TRAVERSAL );
+        ~PasoPerfilImportacionBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelDatosGeneralesBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelDatosGeneralesBase : public wxScrolledWindow
+{
+private:
+
+protected:
+        TitledPanel* m_panelDemographicData;
+        wxStaticText* m_staticText311;
+        wxTextCtrl* m_pPacienteId;
+        wxStaticText* m_staticText17;
+        wxStaticText* m_staticText23;
+        wxTextCtrl* m_pPacienteNombre;
+        wxStaticText* m_staticText41;
+        wxDatePickerCtrl* m_pPacienteFechaNacimiento;
+        wxStaticText* dummy1;
+        wxStaticText* dummy2;
+        wxStaticText* m_staticText261;
+        wxTextCtrl* m_pPatientSurname;
+        wxStaticText* m_staticText13;
+        wxChoice* m_pPacienteSexo;
+        TitledPanelSeparatorV* m_pSep;
+        TitledPanel* m_panelStudyDetails;
+        wxStaticText* m_staticText22;
+        wxStaticText* m_staticText11;
+        wxTextCtrl* m_pPacientePeso;
+        wxStaticText* m_staticText18;
+        wxStaticText* m_staticText15;
+        wxTextCtrl* m_pPacienteAltura;
+        wxStaticText* m_staticText19;
+        wxStaticText* m_staticText221;
+        wxStaticText* m_pLabelAccNumber;
+        wxTextCtrl* m_pAccessionNumber;
+        wxStaticText* m_staticText2;
+        wxDatePickerCtrl* m_pEstudioFecha;
+        wxStaticText* m_staticText16;
+        wxMaskedTextCtrl *m_pEstudioTime;
+        wxStaticText* m_staticText3;
+        wxTextCtrl* m_pEstudioDescripcion;
+        wxPanel* m_pSeriesPanel;
+        wxStaticText* m_staticText231;
+        wxStaticText* m_staticText212;
+        wxDatePickerCtrl* m_pSerieFecha;
+        wxStaticText* m_staticText1611;
+        wxMaskedTextCtrl *m_pSerieTime;
+        wxStaticText* m_staticText312;
+        wxTextCtrl* m_pSerieDescripcion;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnDateChanged( wxDateEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnKillFocusEstudioTimeControl( wxFocusEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnKillFocusSerieTimeControl( wxFocusEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelDatosGeneralesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~PanelDatosGeneralesBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__PASOSIMPORTACIONBASE_H__
diff --git a/cadxcore/main/gui/import/selectimagesimportation.cpp b/cadxcore/main/gui/import/selectimagesimportation.cpp
new file mode 100644
index 0000000..3ee8033
--- /dev/null
+++ b/cadxcore/main/gui/import/selectimagesimportation.cpp
@@ -0,0 +1,812 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <vector>
+#include <sstream>
+
+#include <wx/image.h>
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/filename.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/file.h>
+#include <wx/filedlg.h>
+#include <wx/dnd.h>
+#include <wx/dir.h>
+#include <wx/busyinfo.h>
+#include <wx/pen.h>
+#include <wx/sizer.h>
+#include <wx/arrstr.h>
+#include <wx/thread.h>
+#include <wx/menu.h>
+#include <wx/wxginkgotoolbar.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include <api/ubication.h>
+#include <api/math/geometry.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <api/autoptr.h>
+#include <api/ubication.h>
+#include <main/entorno.h>
+
+#include "selectimagesimportation.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/controladorlog.h>
+#include <api/internationalization/internationalization.h>
+
+#include <vtkImageData.h>
+#include <vtkUnsignedCharArray.h>
+#include <vtkPointData.h>
+#include <vtk/vtkginkgoimageviewer.h>
+
+#include <wx/mimetype.h>
+#include <wx/clipbrd.h>
+#include <wx/wxginkgotoolbar.h>
+
+#define ID_BUTTON_HIDE 0
+#define ID_BUTTON_ROTATE_LEFT 1
+#define ID_BUTTON_ROTATE_RIGHT 2
+#define ID_BUTTON_DELETE 3
+
+
+namespace GNC
+{
+namespace GUI
+{
+
+//drag&drop////////////////////////////////////////////////////////
+class DropTargetSelectImages: public wxFileDropTarget
+{
+public:
+        DropTargetSelectImages(SelectImagesImportation* pParent, const std::list<std::string>& fileSpecs) :
+                wxFileDropTarget(),
+                m_pParent(pParent),
+                m_fileSpecs(fileSpecs),
+                m_enabled(true)
+        {
+        }
+
+        ~DropTargetSelectImages()
+        {
+        }
+
+        void SetEnable(bool enabled)
+        {
+                m_enabled = enabled;
+        }
+
+        bool OnDropFiles(wxCoord /*x*/, wxCoord /*y*/, const wxArrayString& filenames)
+        {
+                if (!m_enabled)
+                        return false;
+                wxArrayString images;
+                for(wxArrayString::const_iterator it = filenames.begin(); it!= filenames.end(); ++it) {
+                        if(wxDirExists((*it))) {
+                                m_pParent->ScanPath((*it));
+                        } else if(wxFileExists((*it))) {
+                                wxFileName filename((*it));
+                                wxString extensionFile = filename.GetExt().Lower();
+                                for (std::list<std::string>::iterator itSpecs = m_fileSpecs.begin(); itSpecs != m_fileSpecs.end(); ++itSpecs) {
+                                        wxFileName ext(wxString::FromUTF8((*itSpecs).c_str()).Lower());
+                                        if (extensionFile == ext.GetExt().Lower()) {
+                                                images.push_back((*it));
+                                                break;
+                                        }
+                                }
+                        }
+                }
+                m_pParent->AddImages(images);
+                return true;
+        }
+
+        SelectImagesImportation* m_pParent;
+        std::list<std::string> m_fileSpecs;
+        bool m_enabled;
+};
+/////////////////////////////////////////////////////TIMER DIRECTORY
+class TimerDirectory : public wxTimer
+{
+public:
+        TimerDirectory(SelectImagesImportation* pSelectImages) :
+                m_path(),
+                m_monitorize(false),
+                m_pSelectImages(pSelectImages)
+        {
+        }
+
+        ~TimerDirectory()
+        {
+        }
+
+        void SetPath(const std::string& path, bool monitorize)
+        {
+                m_path = wxString::FromUTF8(path.c_str());
+                m_monitorize = monitorize;
+        }
+
+        virtual void Notify()
+        {
+                if (m_monitorize) {
+                        if (m_pSelectImages->ScanPath(m_path)) {
+                                this->Start(1000, true);
+                        } else {
+                                wxMessageBox(_("Path of the location doesn't exists"), _("Info"), wxOK | wxICON_INFORMATION, m_pSelectImages);
+                        }
+                } else {
+                        m_pSelectImages->AddImage(m_path);
+                }
+        }
+
+protected:
+        wxString m_path;
+        bool m_monitorize;
+        SelectImagesImportation* m_pSelectImages;
+};
+
+
+////////////////////////////////////////////////////////
+
+SelectImagesImportation::SelectImagesImportation(wxWindow* pParent, const std::string& dirTemp, IWizard* pWizard, GNC::GCS::Ptr<GIL::IModeloIntegracion>& pModeloIntegracion, const std::list<std::string>& fileSpecs, const wxString& defaultFilter) : SelectImagesImportationBase(pParent), IPasoWizard(pWizard)
+{
+        SetScrollbars(10, 10, 50, 50, 0, 0, false);
+        AdjustScrollbars();
+        m_firstAttach = true;
+        m_pwxImagePreview = new wxImage();
+
+        m_fileSpecs = fileSpecs;
+        if (defaultFilter.IsEmpty()) {
+#if defined(_WIN32) || defined(__WXMAC__)
+                m_pDefaultFilter =_("Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg|BMP Images (*.bmp)|*.bmp|PNG Images (*.png)|*.png|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff|PDF documents (*.pdf)|*.pdf|All files(*.*)|*.*");
+#else
+                m_pDefaultFilter =_("Images (*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf)|*.jpg;*.jpeg;*.bmp;*.png;*.tif;*.tiff;*.pdf;*.JPG;*.JPEG;*.BMP;*.PNG;*.TIF;*.TIFF;*.PDF|JPEG Images (*.jpg;*.jpeg)|*.jpg;*.jpeg;*.JPG;*.JPEG|BMP Images (*.bmp)|*.bmp;*BMP|PNG Images (*.png)|*.png;*PNG|TIFF Images (*.tif;*.tiff)|*.tif;*.tiff;*TIF;*TIFF|PDF documents (*.pdf;*.PDF)|*.PDF;*.pdf|All files (*.*)|*.*");
+#endif
+                m_fileSpecs.push_back("*.jpg");
+                m_fileSpecs.push_back("*.jpeg");
+                m_fileSpecs.push_back("*.bmp");
+                m_fileSpecs.push_back("*.png");
+                m_fileSpecs.push_back("*.tif");
+                m_fileSpecs.push_back("*.tiff");
+                m_fileSpecs.push_back("*.pdf");
+        } else {
+                m_pDefaultFilter = defaultFilter;
+        }
+
+        m_pModeloIntegracion = pModeloIntegracion;
+        Hide();
+        m_dirTemp = dirTemp;
+
+        wxColour barColor = wxColour(200,200,200);
+        wxFont fontBar = wxFont( 10, 70, 90, wxFONTWEIGHT_BOLD, false, wxEmptyString );
+
+        m_pButtonsBar = new wxGinkgoToolBar(m_panelStep0, barColor, fontBar);
+        int idButton = 0;
+        m_pButtonsBar->AddTool(idButton, _("Select files..."), GinkgoResourcesManager::MenuIcons::GetIcoImportar(), _("Select files from filesystem"));
+        m_pButtonsBar->Connect(idButton++, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SelectImagesImportation::OnSelectFiles), NULL, this);
+
+        GNC::GCS::IEntorno::MapaUbicaciones& mapa = GNC::Entorno::Instance()->GetUbicaciones();
+
+        for (GNC::GCS::IEntorno::MapaUbicaciones::iterator it = mapa.begin(); it != mapa.end(); ++it) {
+                GIL::Ubicacion* u = (*it).second;
+
+                m_pButtonsBar->AddTool(idButton, wxString::FromUTF8(u->Titulo.c_str()), GinkgoResourcesManager::MenuIcons::GetIcoImportar(), wxString::FromUTF8(u->Descripcion.c_str()), wxITEM_CHECK);
+                m_pButtonsBar->Connect(idButton++, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SelectImagesImportation::OnUbicacionClick), NULL, this);
+        }
+        m_pButtonsBar->AddSeparator();
+        m_pButtonsBar->AddTool(idButton, _("Paste"), GinkgoResourcesManager::MenuIcons::GetIcoPaste(), _("Paste from clipboard"));
+        m_pButtonsBar->Connect(idButton++, wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler(SelectImagesImportation::OnPasteFromClipboard), NULL, this);
+
+        m_pButtonsBar->Realize();
+        m_pSizerButtons->Add(m_pButtonsBar, 1, wxEXPAND| wxALL, 0);
+
+        wxGinkgoToolBar* pToolPreview = new wxGinkgoToolBar(m_pPreviewPanel, barColor, fontBar);
+        pToolPreview->AddTool(ID_BUTTON_HIDE,_("Back"), GinkgoResourcesManager::Acquisition::GetIcoAdquireFile(), _("Back"));
+        pToolPreview->Connect(ID_BUTTON_HIDE,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( SelectImagesImportation::OnHidePreview),NULL,this);
+
+        pToolPreview->Realize();
+        m_pPreviewPanel->GetSizer()->Insert(0,pToolPreview,0,wxEXPAND);
+        m_pPreviewPanel->Layout();
+
+        m_pImagenes->Connect(wxEVT_COMMAND_THUMBNAIL_LEFT_DCLICK,wxCommandEventHandler(SelectImagesImportation::OnThumbLeftDClickSelected),NULL,this);
+        m_pImagenes->Connect(wxEVT_COMMAND_THUMBNAIL_RIGHT_CLICK,wxCommandEventHandler(SelectImagesImportation::OnThumbRightClickSelected),NULL,this);
+        m_pImagenes->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(SelectImagesImportation::OnImagenesKeyDown),NULL,this);
+
+        m_pTimerDirectory = new TimerDirectory(this);
+        m_pDropTarget = new DropTargetSelectImages(this, m_fileSpecs);
+        m_pImagenes->SetDropTarget(m_pDropTarget);
+
+        m_panelStep0->Layout();
+        Layout();
+}
+
+void SelectImagesImportation::SetDefaultImage(const wxImage& defaultImage)
+{
+        m_pDefaultImage = defaultImage;
+}
+
+SelectImagesImportation::~SelectImagesImportation()
+{
+        if (m_pTimerDirectory != NULL) {
+                delete m_pTimerDirectory;
+                m_pTimerDirectory = NULL;
+        }
+        GIL::Ubicacion* pUbicacion = GetUbicacionSelected();
+        if (pUbicacion != NULL && pUbicacion->CleanAfter) {
+                /*//remove content from ubicacion directory...
+                */
+                wxArrayString paths=this->GetSelectedPaths();
+                for (wxArrayString::iterator it = paths.begin(); it != paths.end(); ++it) {
+                        wxRemoveFile((*it));
+                }
+        }
+        if (m_pwxImagePreview != NULL) {
+                delete m_pwxImagePreview;
+                m_pwxImagePreview = NULL;
+        }
+        m_pImagenes->Disconnect(wxEVT_COMMAND_THUMBNAIL_LEFT_DCLICK,wxCommandEventHandler(SelectImagesImportation::OnThumbLeftDClickSelected),NULL,this);
+        m_pImagenes->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler(SelectImagesImportation::OnImagenesKeyDown),NULL,this);
+}
+
+void SelectImagesImportation::OnImagenesKeyDown(wxKeyEvent &event)
+{
+        if (event.GetKeyCode() == WXK_DELETE || event.GetKeyCode() == WXK_BACK) {
+                DeleteSelectedThumbnails();
+                event.Skip(false);
+        } else if ( event.ControlDown()) {
+                if (event.GetKeyCode() == 86 ) {
+                        wxCommandEvent ev;
+                        OnPasteFromClipboard(ev);
+                        event.Skip(false);
+                } else {
+                        event.Skip(true);
+                }
+        } else {
+                event.Skip(true);
+        }
+}
+
+void SelectImagesImportation::OnDeleteSelectedThumbnails(wxCommandEvent &)
+{
+        DeleteSelectedThumbnails();
+}
+
+void SelectImagesImportation::DeleteSelectedThumbnails()
+{
+        bool deleteFromDisk = false;
+        ///if monitoring... ask
+        GIL::Ubicacion* pUbicacion = GetUbicacionSelected();
+        if (pUbicacion != NULL) {
+                if (pUbicacion->Monitorize) {
+                        int answer = wxMessageBox(_("Are you sure to delete this file from disk?"),_("Delete"), wxYES_NO , this);
+                        if (answer == wxYES) {
+                                deleteFromDisk = true;
+                        } else {
+                                return;
+                        }
+                }
+        }
+        int selection = m_pImagenes->GetSelection();
+        while(selection != -1) {
+                if (deleteFromDisk) {
+                        wxThumbnailItem* item = m_pImagenes->GetItem(selection);
+                        if (item != NULL) {
+                                wxRemoveFile(item->GetFilename());
+                        }
+                }
+                m_pImagenes->Delete(selection);
+                selection = m_pImagenes->GetSelection();
+        }
+}
+
+void SelectImagesImportation::OnPreviewClick(wxCommandEvent &)
+{
+        ShowPreview();
+}
+
+void SelectImagesImportation::OnThumbLeftDClickSelected(wxCommandEvent& event)
+{
+        ShowPreview();
+        event.Skip();
+}
+
+void SelectImagesImportation::OnThumbRightClickSelected(wxCommandEvent& event)
+{
+        //menu...
+        wxArrayInt selection = m_pImagenes->GetSelections();
+        if (selection.size() == 0) {
+                return;
+        }
+
+        wxMenu contextual;
+        wxMenuItem* pRotateLeft = new wxMenuItem(&contextual, ID_BUTTON_DELETE, _("Delete selected items"));
+        contextual.Connect(ID_BUTTON_DELETE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( SelectImagesImportation::OnDeleteSelectedThumbnails),NULL,this);
+        contextual.Append(pRotateLeft);
+        m_pImagenes->PopupMenu(&contextual);
+        event.Skip();
+}
+
+void SelectImagesImportation::ShowPreview()
+{
+        // Si hacemos doble click ampliamos la imagen para una mejor visualizacion
+        if (m_pImagenes->GetSelections().size() != 1) {
+                wxMessageBox(_("You must select an image"), _("Info"), wxOK | wxICON_INFORMATION, this);
+                return;
+        }
+
+        wxBusyInfo info(_("Generating preview..."));
+
+        // coverity[NEGATIVE_RETURNS] since we force above that the size is one, this is not negative.
+        wxThumbnailItem* item = m_pImagenes->GetItem(m_pImagenes->GetSelection());
+        if (item == NULL)
+                return;
+
+        Freeze();
+        //load preview...
+        wxString pathTmp = item->GetFilename();
+        if (m_pwxImagePreview->LoadFile(pathTmp)) {
+                m_pImagenes->Hide();
+                m_pPreviewPanel->Show();
+                m_pButtonsBar->Hide();
+                m_pPreview->SetFocus();
+                m_pButtonRemoveAll->Hide();
+                m_pButtonPreview->Hide();
+
+
+
+                vtkSmartPointer<vtkImageData> data = vtkSmartPointer<vtkImageData>::New();
+                double spacing[3] = {1.0f,1.0f,1.0f};
+                double origin[3] = {0.0f,0.0f,0.0f};
+
+                data->SetDimensions(m_pwxImagePreview->GetWidth(), m_pwxImagePreview->GetHeight(), 1);
+                //data->SetNumberOfScalarComponents(3);
+                //data->SetScalarTypeToUnsignedChar();
+                data->SetSpacing(spacing[0],spacing[1],spacing[2]);
+                data->SetOrigin(origin[0],origin[1],origin[2]);
+
+                vtkSmartPointer<vtkUnsignedCharArray> dataImagen = vtkSmartPointer<vtkUnsignedCharArray>::New();
+                dataImagen->SetNumberOfComponents(3);
+                unsigned int size = data->GetDimensions()[0] * data->GetDimensions()[1];
+                dataImagen->SetArray(m_pwxImagePreview->GetData(),size,1);
+
+                data->GetPointData()->SetScalars(dataImagen);
+
+                m_pPreview->SetInput(data);
+                m_pPreview->GetView()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION);
+
+
+                m_panelStep0->Layout();
+                m_panelStep0->Refresh();
+        } else {
+                wxFileName fileName(pathTmp);
+                wxFileType* fileType = wxTheMimeTypesManager->GetFileTypeFromExtension(fileName.GetExt());
+                if (fileType != NULL) {
+                        wxExecute(fileType->GetOpenCommand(pathTmp));
+                        delete fileType;
+                }
+        }
+        Thaw();
+}
+
+void SelectImagesImportation::OnHidePreview(wxCommandEvent& )
+{
+        HidePreview();
+}
+
+void SelectImagesImportation::HidePreview()
+{
+        if (!m_pImagenes->IsShown()) {
+                Freeze();
+                m_pImagenes->Show();
+                m_pPreviewPanel->Hide();
+                m_pButtonRemoveAll->Show();
+                m_pButtonPreview->Show();
+                m_pButtonsBar->Show();
+
+                m_panelStep0->Layout();
+                m_panelStep0->Refresh();
+                Thaw();
+        }
+}
+
+void SelectImagesImportation::OnRemoveAll(wxCommandEvent &event)
+{
+        m_pImagenes->SelectAll();
+        DeleteSelectedThumbnails();
+        event.Skip();
+}
+
+void SelectImagesImportation::OnPasteFromClipboard(wxCommandEvent& )
+{
+
+        if (wxTheClipboard->Open()) {
+                if (wxTheClipboard->IsSupported( wxDF_BITMAP )) {
+                        wxBitmapDataObject bmpData;
+                        wxTheClipboard->GetData( bmpData );
+                        wxBitmap bmp = bmpData.GetBitmap();
+
+                        wxFileName tempDir = FROMPATH(m_dirTemp);
+                        wxFileName tempFileName(wxT("clipboard_") + wxString::Format(wxT("%d"), (int) rand()));
+                        //if files will be cleaned at the end, we have to copy it in temporally folder
+                        wxString tempFile = tempDir.GetFullPath() + wxFileName::GetPathSeparator() + tempFileName.GetName() + wxT(".bmp");
+
+                        if (bmp.SaveFile(tempFile, wxBITMAP_TYPE_BMP)) {
+
+                                wxThumbnailItem* pItem = NULL;
+                                pItem = new wxMemoryImageThumbnailItem(tempFile, bmp.ConvertToImage());
+                                m_pImagenes->Insert( pItem, m_pImagenes->GetCount());
+
+                                {
+                                        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Importacion", "LastMethod", "clipboard");
+                                        GNC::GCS::ConfigurationController::Instance()->Flush();
+                                }
+                        } else {
+                                LOG_ERROR("Importation", "Unable to save bitmap");
+                        }
+
+                } else if(wxTheClipboard->IsSupported( wxDF_FILENAME )) {
+                        wxFileDataObject fileData;
+                        wxTheClipboard->GetData(fileData);
+                        wxArrayString images;
+                        for(wxArrayString::const_iterator it = fileData.GetFilenames().begin(); it!= fileData.GetFilenames().end(); ++it) {
+                                if(wxDirExists((*it))) {
+                                        ScanPath((*it));
+                                } else if(wxFileExists((*it))) {
+                                        wxFileName filename((*it));
+                                        wxString extensionFile = filename.GetExt().Lower();
+                                        for (std::list<std::string>::iterator itSpecs = m_fileSpecs.begin(); itSpecs != m_fileSpecs.end(); ++itSpecs) {
+                                                wxFileName ext(wxString::FromUTF8((*itSpecs).c_str()).Lower());
+                                                if (extensionFile == ext.GetExt().Lower()) {
+                                                        images.push_back((*it));
+                                                        break;
+                                                }
+                                        }
+                                }
+                        }
+                        AddImages(images);
+                }
+                wxTheClipboard->Close();
+        }
+
+}
+
+void SelectImagesImportation::OnSelectFiles(wxCommandEvent & )
+{
+        UnCheckAll();
+        m_pDropTarget->SetEnable(true);
+        m_pTimerDirectory->Stop();
+        std::string pathDefecto;
+        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Importacion", "PathDefecto", pathDefecto);
+        wxString wxPathDefecto = wxString::FromUTF8(pathDefecto.c_str());
+        if(wxFileExists(wxPathDefecto) || wxDirExists(wxPathDefecto)) {
+                AddImage(wxPathDefecto);
+        } else {
+                AddImage(wxEmptyString);
+        }
+}
+
+void SelectImagesImportation::AddImage(const wxString& path)
+{
+        wxFileDialog seleccionarFichero (this, _("Select images"), path, wxT(""), m_pDefaultFilter, wxFD_OPEN|wxFD_FILE_MUST_EXIST|wxFD_MULTIPLE);
+        int response = seleccionarFichero.ShowModal();
+        if (response == wxID_OK) {
+                Update();
+                wxBusyInfo info(_("Creating Thumbnail..."));
+                wxArrayString paths;
+                seleccionarFichero.GetPaths(paths);
+
+                {
+                        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Importacion", "PathDefecto", std::string(wxPathOnly(seleccionarFichero.GetPath()).ToUTF8()));
+                        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Importacion", "LastMethod", "file");
+                        GNC::GCS::ConfigurationController::Instance()->Flush();
+                }
+
+                for (wxArrayString::iterator it = paths.begin(); it != paths.end(); ++it) {
+                        wxString& fileName = (*it);
+                        if(m_pImagenes->FindItemForFilename(fileName)==-1) {
+                                wxThumbnailItem* pItem = NULL;
+                                if (m_pDefaultImage.IsOk()) {
+                                        pItem = new wxMemoryImageThumbnailItem(fileName, m_pDefaultImage);
+                                } else {
+                                        pItem = new wxImageThumbnailItem(fileName);
+                                }
+                                m_pImagenes->Insert( pItem, m_pImagenes->GetCount());
+                        }
+                }
+        }
+}
+
+void SelectImagesImportation::AddImages(const wxArrayString& files)
+{
+        for (wxArrayString::const_iterator it = files.begin(); it != files.end(); ++it) {
+                const wxString& fileName = (*it);
+                if(m_pImagenes->FindItemForFilename(fileName)==-1) {
+                        wxBusyInfo info(_("Creating Thumbnails..."));
+                        wxThumbnailItem* pItem = NULL;
+                        if (m_pDefaultImage.IsOk()) {
+                                pItem = new wxMemoryImageThumbnailItem(fileName, m_pDefaultImage);
+                        } else {
+                                pItem = new wxImageThumbnailItem(fileName);
+                        }
+                        m_pImagenes->Insert( pItem, m_pImagenes->GetCount());
+                        Update();
+                }
+        }
+}
+
+bool SelectImagesImportation::ScanPath(const wxString& path)
+{
+        //se leen los ficheros dicom del directorio
+        if (!wxDirExists(path)) {
+                return false;
+        }
+
+        wxDir dir;
+        if (dir.Open(path)) {
+                wxArrayString images;
+                for (std::list<std::string>::iterator itSpecs = m_fileSpecs.begin(); itSpecs != m_fileSpecs.end(); ++itSpecs) {
+                        wxString wxPathFich;
+                        bool cont = dir.GetFirst(&wxPathFich, wxString::FromUTF8((*itSpecs).c_str()));
+                        while (cont) {
+                                wxPathFich=dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) +wxPathFich;
+                                images.push_back(wxPathFich);
+                                cont = dir.GetNext(&wxPathFich);
+                        }
+                }
+#if !defined(_WINDOWS)
+                for (std::list<std::string>::iterator itSpecs = m_fileSpecs.begin(); itSpecs != m_fileSpecs.end(); ++itSpecs) {
+                        wxString wxPathFich;
+                        bool cont = dir.GetFirst(&wxPathFich, wxString::FromUTF8((*itSpecs).c_str()).Upper());
+                        while (cont) {
+                                wxPathFich=dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) +wxPathFich;
+                                images.push_back(wxPathFich);
+                                cont = dir.GetNext(&wxPathFich);
+                        }
+                }
+#endif
+                AddImages(images);
+        }
+        return true;
+}
+
+wxArrayString SelectImagesImportation::GetSelectedPaths()
+{
+        wxArrayString resultado;
+        for(int i=0; i<m_pImagenes->GetCount(); ++i) {
+                wxThumbnailItem* item=dynamic_cast<wxThumbnailItem*>(m_pImagenes->GetItem(i));
+                if(item!=NULL) {
+                        resultado.push_back(item->GetFilename());
+                }
+        }
+        return resultado;
+}
+
+void SelectImagesImportation::UnCheckAll()
+{
+        for (unsigned int i = 1; i < m_pButtonsBar->GetToolCount(); i++) {
+                //uncheck ubicaciones
+                m_pButtonsBar->ForceToggleTool(i, false);
+        }
+        m_pButtonsBar->Refresh(true);
+}
+
+void SelectImagesImportation::OnUbicacionClick(wxCommandEvent& event)
+{
+        int id = event.GetId();
+        if (id == 0) {
+                UnCheckAll();
+                m_pTimerDirectory->Stop();
+                m_pDropTarget->SetEnable(true);
+        } else {
+                GNC::GCS::IEntorno::MapaUbicaciones& mapa = GNC::Entorno::Instance()->GetUbicaciones();
+                GNC::GCS::IEntorno::MapaUbicaciones::iterator it = mapa.begin();
+
+                for (int i = 1; i != id && it != mapa.end(); i++, ++it);
+                if (it != mapa.end()) {
+                        if (it->second->Monitorize && !m_pButtonsBar->GetToolToggled(id)) {
+                                //if uncheck a monitorize change to normal mode
+                                UnCheckAll();
+                                m_pTimerDirectory->Stop();
+                                m_pDropTarget->SetEnable(true);
+                        } else {
+                                SetUbicacion((*it).second, id);
+                        }
+                } else {
+                        // GW: this probably shouldn't happen
+                        LOG_ERROR("SelectImagesImportation", "id(" << id << ") not in Ubicationmap");
+                }
+
+        }
+}
+
+void SelectImagesImportation::SetUbicacion(GIL::Ubicacion* ubicacion, int id)
+{
+        UnCheckAll();
+        m_pTimerDirectory->Stop();
+        m_pButtonsBar->ForceToggleTool(id, true);
+        if (!ubicacion->Monitorize) {
+                m_pDropTarget->SetEnable(true);
+                m_pTimerDirectory->SetPath(ubicacion->Ruta, false);
+        } else {
+                m_pDropTarget->SetEnable(false);
+                m_pImagenes->Clear();
+                m_pTimerDirectory->SetPath(ubicacion->Ruta,true);
+        }
+        if (ubicacion->CleanBefore) {
+                wxDir dir;
+                if (dir.Open(FROMPATH(ubicacion->Ruta))) {
+                        wxString fileName;
+                        bool cont = dir.GetFirst(&fileName);
+                        while (cont) {
+                                fileName=dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) +fileName;
+                                if(wxFile::Exists(fileName)) {
+                                        if (wxRemoveFile(fileName)) {
+                                                cont = dir.GetNext(&fileName);
+                                        } else {
+                                                break;
+                                        }
+                                }
+                        }
+                }
+        }
+        m_pTimerDirectory->Start(100, true);
+}
+
+GIL::Ubicacion* SelectImagesImportation::GetUbicacionSelected()
+{
+        GNC::GCS::IEntorno::MapaUbicaciones& mapa = GNC::Entorno::Instance()->GetUbicaciones();
+        GNC::GCS::IEntorno::MapaUbicaciones::iterator it = mapa.begin();
+        for (unsigned int i = 1; i < m_pButtonsBar->GetToolCount() && it != mapa.end(); i++, ++it) {
+                if (m_pButtonsBar->GetToolToggled(i)) {
+                        return (*it).second;
+                }
+        }
+        return NULL;
+}
+
+//region "Metodos heredados de Ipasowizard"
+
+bool SelectImagesImportation::Attach()
+{
+        if (m_firstAttach) {
+                //maybe an ubication, maybe a normal path...
+                std::string lastLocation;
+                GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Importacion", "LastLocation", lastLocation);
+                GNC::GCS::IEntorno::MapaUbicaciones& mapa = GNC::Entorno::Instance()->GetUbicaciones();
+                GNC::GCS::IEntorno::MapaUbicaciones::iterator it = mapa.begin();
+                unsigned int id = 1;
+                for (; id < m_pButtonsBar->GetToolCount() && it != mapa.end(); id++, ++it) {
+                        if ((*it).first == lastLocation) {
+                                break;
+                        }
+                }
+                if (it == mapa.end()) {
+                        //opens select file dialog...
+                        std::string method;
+                        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Importacion", "LastMethod", method);
+                        if (method.empty() || method == "file") {
+                                wxCommandEvent openDialogEvent(wxEVT_COMMAND_TOOL_CLICKED, 0);
+                                m_pButtonsBar->GetEventHandler()->AddPendingEvent(openDialogEvent);
+                        }
+                } else {
+                        SetUbicacion((*it).second, id);
+                }
+                m_firstAttach = false;
+        }
+
+        GIL::Ubicacion* pUbicacion = GetUbicacionSelected();
+        if (pUbicacion != NULL && pUbicacion->Monitorize) {
+                m_pTimerDirectory->Start(100,true);
+        }
+
+        return true;
+}
+
+bool SelectImagesImportation::Detach()
+{
+        m_pTimerDirectory->Stop();
+        return true;
+}
+
+std::string SelectImagesImportation::GetTitle()
+{
+        return _Std("Image selection");
+}
+
+std::string SelectImagesImportation::GetSubTitle()
+{
+        return _Std("You must select the images you want to import");
+}
+
+bool SelectImagesImportation::Siguiente()
+{
+        return true;
+}
+
+bool SelectImagesImportation::Anterior()
+{
+        return true;
+}
+
+bool SelectImagesImportation::Cancelar()
+{
+        return true;
+}
+
+void SelectImagesImportation::OnCancelled()
+{
+        m_pTimerDirectory->Stop();
+        m_pImagenes->Clear();
+}
+
+bool SelectImagesImportation::Validar()
+{
+        wxArrayString paths=this->GetSelectedPaths();
+        if(paths.GetCount()==0) {
+                wxMessageBox(_("You must select at least one image"), _("Info"),
+                             wxOK | wxICON_INFORMATION, this);
+                return false;
+        }
+
+        m_pListaFicheros->clear();
+        GIL::Ubicacion* pUbicacion = GetUbicacionSelected();
+
+        if (pUbicacion != NULL) {
+                GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Importacion", "LastLocation", pUbicacion->Titulo);
+        } else {
+                GNC::GCS::ConfigurationController::Instance()->deleteEntryUser("/GinkgoCore/Importacion", "LastLocation");
+        }
+
+        //file must exist
+        for(wxArrayString::iterator it=paths.begin(); it!=paths.end(); ++it) {
+                if(!wxFileName::FileExists((*it))) {
+                        wxString str(_("The file"));
+                        wxMessageBox(str <<(*it) <<_(" doesn't exist"), _("Info"),
+                                     wxOK | wxICON_INFORMATION, this);
+                        m_pListaFicheros->clear();
+                        //el fichero no existe
+                        return false;
+                }
+
+                wxString wxDirTmp = FROMPATH(m_dirTemp);
+                wxFileName fileName((*it));
+                //if files will be cleaned at the end, we have to copy it in temporally folder
+                if (pUbicacion != NULL && pUbicacion->CleanAfter) {
+                        wxString nombreImagenTemporal = wxDirTmp + wxFileName::GetPathSeparator() + fileName.GetName() + wxString::Format(wxT("%d"), (int) rand()) + wxT(".jpg");
+                        while(wxFile::Exists(nombreImagenTemporal)) {
+                                //si existe se busca uno que no exista
+                                nombreImagenTemporal= wxDirTmp + wxFileName::GetPathSeparator() + fileName.GetName() + wxString::Format(wxT("%d"), (int) rand()) + wxT(".jpg");
+                        }
+                        if (!wxCopyFile((*it), nombreImagenTemporal)) {
+                                LOG_ERROR("SelectImagesImportation", "Error copying images from " << (*it).ToUTF8() << " TO " << nombreImagenTemporal.ToUTF8());
+                        }
+                        std::string path(TOPATH(nombreImagenTemporal));
+                        m_pListaFicheros->push_back(path);
+                } else {
+                        std::string path(TOPATH((*it)));
+                        m_pListaFicheros->push_back(path);
+                }
+        }
+
+        //
+        return true;
+}
+//endregion
+}
+}
diff --git a/cadxcore/main/gui/import/selectimagesimportation.h b/cadxcore/main/gui/import/selectimagesimportation.h
new file mode 100644
index 0000000..d6730fc
--- /dev/null
+++ b/cadxcore/main/gui/import/selectimagesimportation.h
@@ -0,0 +1,114 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <api/iwizard.h>
+#include <main/gui/import/pasosimportacionbase.h>
+#include <api/controllers/ipacscontroller.h>
+#include <api/ientorno.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/autoptr.h>
+#include <string>
+#include <vector>
+
+
+class wxGinkgoToolBar;
+
+namespace GIL
+{
+class IModeloIntegracion;
+}
+
+namespace GNC
+{
+namespace GUI
+{
+class TimerDirectory;
+class DropTargetSelectImages;
+
+class EXTAPI SelectImagesImportation: public SelectImagesImportationBase, public IPasoWizard
+{
+public:
+        SelectImagesImportation(wxWindow* pParent, const std::string& dirTemp, IWizard* pWizard, GNC::GCS::Ptr<GIL::IModeloIntegracion>& pModeloIntegracion, const std::list<std::string>& fileSpec = std::list<std::string>(), const wxString& defaultFilter = wxEmptyString);
+        void SetDefaultImage(const wxImage& defaultImage);
+        ~SelectImagesImportation();
+
+        virtual void AddImages(const wxArrayString& files);
+        virtual bool ScanPath(const wxString& path);
+
+protected:
+        bool                                    m_firstAttach;
+        std::string                             m_dirTemp;
+        GNC::GCS::Ptr<GIL::IModeloIntegracion>  m_pModeloIntegracion;
+        wxGinkgoToolBar*                        m_pButtonsBar;
+        wxString                                m_pDefaultFilter;
+        wxImage                                 m_pDefaultImage;
+        TimerDirectory*                         m_pTimerDirectory;
+        DropTargetSelectImages*                 m_pDropTarget;
+        std::list<std::string>                  m_fileSpecs;
+        wxImage*                                m_pwxImagePreview;
+
+        virtual wxArrayString GetSelectedPaths();
+        virtual void OnPasteFromClipboard(wxCommandEvent& event );
+        virtual void OnSelectFiles(wxCommandEvent &event);
+
+public:
+        virtual void AddImage(const wxString& path);
+protected:
+        virtual void OnPreviewClick(wxCommandEvent &event);
+        virtual void OnThumbLeftDClickSelected(wxCommandEvent& event);
+        virtual void OnThumbRightClickSelected(wxCommandEvent& event);
+        virtual void ShowPreview();
+        virtual void OnHidePreview(wxCommandEvent& event);
+        virtual void HidePreview();
+        virtual void OnRemoveAll(wxCommandEvent &event);
+        virtual void OnImagenesKeyDown(wxKeyEvent &event);
+        virtual void OnDeleteSelectedThumbnails(wxCommandEvent &event);
+        virtual void DeleteSelectedThumbnails();
+
+        virtual void UnCheckAll();
+        virtual void OnUbicacionClick(wxCommandEvent& event);
+        virtual void SetUbicacion(GIL::Ubicacion* ubicacion, int id);
+        GIL::Ubicacion* GetUbicacionSelected();
+
+        //region "Metodos heredados de IPasoWizard"
+        virtual bool Attach();
+
+        virtual bool Detach();
+
+        virtual std::string GetTitle();
+
+        virtual std::string GetSubTitle();
+
+        virtual bool Siguiente();
+
+        virtual bool Anterior();
+
+        virtual bool Cancelar();
+
+        virtual void OnCancelled();
+
+        virtual bool Validar();
+        //endregion
+
+};
+};
+};
diff --git a/cadxcore/main/gui/import/wxwizardimportacionginkgo.cpp b/cadxcore/main/gui/import/wxwizardimportacionginkgo.cpp
new file mode 100644
index 0000000..5c28deb
--- /dev/null
+++ b/cadxcore/main/gui/import/wxwizardimportacionginkgo.cpp
@@ -0,0 +1,387 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/dir.h>
+#include <wx/msgdlg.h>
+#include <wx/statbmp.h>
+#include <wx/bmpbuttn.h>
+
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include "wxwizardimportacionginkgo.h"
+#include "pasoperfilimportacion.h"
+
+#include <api/imodelointegracion.h>
+#include <main/entorno.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/controladorpermisos.h>
+#include <api/internationalization/internationalization.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/gui/progress/statusbarprogreso.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/windowattributescontroller.h>
+
+#include <main/controllers/anonusagestats.h>
+
+#include <vector>
+#include <sstream>
+
+#define DICOMIZE_WIZARD_ID "DicomizeWizard"
+
+namespace GNC
+{
+namespace GUI
+{
+wxWizardImportacionGinkgo::wxWizardImportacionGinkgo(wxWindow* pParent, GNC::GCS::Ptr<GIL::IModeloIntegracion> pModeloIntegracion, std::string uidModulo) : wxWizardGinkgoBase(pParent)
+{
+        //load attributes
+        GNC::GCS::WindowAttributesController::LoadWindowAttributes(DICOMIZE_WIZARD_ID, this, false);
+        //
+        wxWindowDisabler disabler;
+        SetTitle(_("Image Import Wizard"));
+        m_pModeloIntegracion = pModeloIntegracion;
+
+        m_pControladorModulo = NULL;
+
+        //si hay mas de un modulo con importador disponible habra que seleccionar el modulo...
+        int soportanImportacion=0;
+
+        GNC::ControladorExtensiones::ListaModulos listaModulos = ControladorExtensiones::Instance()->Modulos();
+        for(GNC::ControladorExtensiones::IteradorListaModulos it=listaModulos.begin(); it!=listaModulos.end(); ++it) {
+                GNC::GCS::IModuleController* modulo=(*it).second;
+                if(uidModulo == "") {	//se miran los modulos registrados y todo eso
+                        if(modulo->SoportaImportacion()) {
+                                m_pControladorModulo=modulo;
+                                ++soportanImportacion;
+                        }
+                } else {
+                        std::stringstream os;
+                        os<<modulo->GetUID();
+                        if(os.str() == uidModulo) {
+                                if(!modulo->SoportaImportacion()) {
+                                        wxMessageBox(_("Requested module does not support importation"), _("Info"),
+                                                     wxOK | wxICON_INFORMATION, this);
+                                        std::string msg(_Std("Requested module does not support importation"));
+                                        throw (GIL::DICOM::I2DException(msg));
+                                } else {
+                                        //importamos con el modulo que nos dicen
+                                        m_pControladorModulo=modulo;
+                                        ++soportanImportacion;
+                                        break;
+                                }
+                        }
+                }
+        }
+        if(soportanImportacion == 0) {
+                if(uidModulo == "") {
+                        wxMessageBox(_("There is not registered any module with importation support"), _("Info"),
+                                     wxOK | wxICON_INFORMATION, this);
+                        std::string msg(_Std("There aren't any module with importation support"));
+                        throw (GIL::DICOM::I2DException(msg));
+                } else {
+                        wxMessageBox(_("Requested module is not registered"), _("Info"),
+                                     wxOK | wxICON_INFORMATION, this);
+                        std::string msg(_Std("The requested module isn't registered"));
+                        throw (GIL::DICOM::I2DException(msg));
+                }
+        }
+
+        do {
+                int random = rand();
+                std::ostringstream osDir;
+                osDir << GNC::Entorno::Instance()->GetGinkgoTempDir() << (char) wxFileName::GetPathSeparator(wxPATH_NATIVE) << "_gnktmp_" << random;
+                m_pathDirTemporal = wxString::FromUTF8(osDir.str().c_str());
+        } while(wxDir::Exists(m_pathDirTemporal));
+
+#ifdef _WIN32
+        wxFileName::Mkdir(m_pathDirTemporal);
+#else
+        wxFileName::Mkdir(m_pathDirTemporal.c_str(), 0777);
+#endif
+
+        std::string dir_temp (TOPATH(m_pathDirTemporal));
+        if (soportanImportacion == 1) {
+                //guay porque el m_pControladorModulo ya tiene valor correcto
+                //se pillan los pasos
+                std::list<IPasoWizard*> pasosModulo;
+
+                m_pControladorModulo->GetPasosImportacion(this,pasosModulo, m_pPanelPrincipal,dir_temp, m_pModeloIntegracion);
+                {
+                        //anon statistics
+                        std::ostringstream ostrStat;
+                        ostrStat << ANON_STAT_DICOMIZE;
+                        ostrStat << m_pControladorModulo->GetUID();
+                        LOG_STAT(ostrStat.str())
+                }
+
+                if (m_pModeloIntegracion.IsValid()) {
+                        //////////TODOm_pModeloIntegracion->UIDModulo = m_pControladorModulo->GetUID();
+                }
+
+                for(std::list<IPasoWizard*>::iterator it=pasosModulo.begin(); it!=pasosModulo.end(); ++it) {
+                        if (!(*it)->IsSkipped()) {
+                                m_ListaPasos.push_back(*it);
+                                (*it)->AsignarListaFicheros(m_ListaFicheros);
+                        }
+                }
+                //
+        } else {
+                //se enchufa el paso perfilimportacion que se encargara de pillar el perfil
+                IPasoWizard* pPaso = new PasoPefilImportacion (m_pPanelPrincipal, this);
+                pPaso->AsignarListaFicheros(m_ListaFicheros);
+                m_ListaPasos.push_back(pPaso);
+        }
+
+        //free space
+        wxLongLong total = 0;
+        wxLongLong free = 0;
+
+        wxLongLong KB = 1024;
+        wxLongLong MB = KB*1024;
+        wxLongLong GB = MB*1024;
+
+        if (wxGetDiskSpace(FROMPATH(GNC::GCS::IEntorno::Instance()->GetGinkgoTempDir()), &total, &free) ) {
+                std::ostringstream os;
+                if (free > GB) {
+                        os << std::string((free / GB ).ToString().ToUTF8()) << " GB ";
+                } else if (free > MB) {
+                        os << std::string((free / MB ).ToString().ToUTF8()) << " MB ";
+                } else if (free > KB) {
+                        os << std::string((free / KB).ToString().ToUTF8()) << " KB ";
+                } else {
+                        os << std::string((free).ToString().ToUTF8()) << " B ";
+                }
+                os <<  _Std("free of") << " ";
+
+                if (total > GB) {
+                        os << std::string((total / GB ).ToString().ToUTF8()) << " GB ";
+                } else if (total > MB) {
+                        os << std::string((total / MB ).ToString().ToUTF8()) << " MB ";
+                } else if (total > KB) {
+                        os << std::string((total / KB).ToString().ToUTF8()) << " KB ";
+                } else {
+                        os << std::string((total).ToString().ToUTF8()) << " B ";
+                }
+                os << _Std("in dicomization dir.");
+                m_pBottomLeftLabel->SetLabel(wxString::FromUTF8(os.str().c_str()));
+                if (free < GB) {
+                        m_pBottomLeftLabel->SetForegroundColour(*wxRED);
+                }
+        } else {
+                m_pBottomLeftLabel->SetLabel(wxT(""));
+        }
+        //
+
+        m_currentPaso=m_ListaPasos.begin();
+        m_currentPasoIndex=1;
+        CargarCurrent();
+}
+
+wxWizardImportacionGinkgo::~wxWizardImportacionGinkgo()
+{
+        m_ListaPasos.clear();
+
+        //save window attributes
+        GNC::GCS::WindowAttributesController::SaveWindowAttributes(DICOMIZE_WIZARD_ID, this);
+}
+
+void  wxWizardImportacionGinkgo::BorrarArchivosTemporales()
+{
+        BorrarArchivosTemporales(m_pathDirTemporal);
+}
+
+bool  wxWizardImportacionGinkgo::BorrarArchivosTemporales(wxString dirPath)
+{
+        //borra en cascada
+        if(!wxRmdir(dirPath)) {
+                //vaciar
+                wxDir dir;
+                if (dir.Open(dirPath)) {
+                        wxString fileName;
+                        bool cont = dir.GetFirst(&fileName);
+                        while (cont) {
+                                fileName=dir.GetName()+ wxFileName::GetPathSeparator(wxPATH_NATIVE) +fileName;
+                                if(wxDir::Exists(fileName)) {
+                                        if (BorrarArchivosTemporales(fileName)) {
+                                                cont = dir.GetFirst(&fileName);
+                                        } else {
+                                                cont = dir.GetNext(&fileName);
+                                        }
+                                } else {
+                                        if (wxRemoveFile(fileName)) {
+                                                cont = dir.GetFirst(&fileName);
+                                        } else {
+                                                cont = dir.GetNext(&fileName);
+                                        }
+                                }
+                        }
+                }
+        }
+        if(wxDir::Exists(dirPath)) {
+                return wxRmdir(dirPath);
+        }
+        return true;
+}
+
+void wxWizardImportacionGinkgo::OnCancelarClick(wxCommandEvent&)
+{
+        if ((*m_currentPaso)->AllowCancel()) {
+                for(ListaPasos::iterator it=m_ListaPasos.begin(); it!=m_ListaPasos.end(); ++it) {
+                        (*it)->OnCancelled();
+                }
+                EndModal(wxCANCEL);
+        }
+}
+
+void wxWizardImportacionGinkgo::OnSiguienteClick(wxCommandEvent&)
+{
+        if ((*m_currentPaso)->Validar()) {
+                Freeze();
+
+                wxWindow* pCurrent = dynamic_cast<wxWindow*> (*m_currentPaso);
+                if (pCurrent != NULL && (*m_currentPaso)->Detach()) {
+                        pCurrent->Hide();
+                        m_pSizerPrincipal->Detach(pCurrent);
+
+                        PasoPefilImportacion* pasoPerfil = dynamic_cast<PasoPefilImportacion * > (*m_currentPaso);
+                        if(pasoPerfil != NULL) {
+                                //cargamos los pasos del perfil seleccionado...
+                                m_pControladorModulo = pasoPerfil->GetControladorSeleccionado();
+                                std::string dir_temp(TOPATH(m_pathDirTemporal));
+
+                                m_ListaPasos.clear();
+
+                                std::list<IPasoWizard*> pasosModulo;
+
+                                m_pControladorModulo->GetPasosImportacion(this,pasosModulo,m_pPanelPrincipal,dir_temp,m_pModeloIntegracion);
+                                {
+                                        //anon statistics
+                                        std::ostringstream ostrStat;
+                                        ostrStat << ANON_STAT_DICOMIZE;
+                                        ostrStat << m_pControladorModulo->GetUID();
+                                        LOG_STAT(ostrStat.str())
+                                }
+                                if (m_pModeloIntegracion.IsValid()) {
+////////TODO				m_pModeloIntegracion->UIDModulo = m_pControladorModulo->GetUID();
+                                }
+
+                                for(std::list<IPasoWizard*>::iterator it=pasosModulo.begin(); it!=pasosModulo.end(); ++it) {
+                                        if (!(*it)->IsSkipped()) {
+                                                m_ListaPasos.push_back(*it);
+                                                (*it)->AsignarListaFicheros(m_ListaFicheros);
+                                        }
+                                }
+
+                                m_currentPaso = m_ListaPasos.begin();
+                                m_currentPasoIndex=1;
+                        } else {
+                                do {
+                                        ++m_currentPasoIndex;
+                                        ++m_currentPaso;
+                                } while ((m_currentPaso != m_ListaPasos.end() && (*m_currentPaso)->IsSkipped()));
+                        }
+
+                        if(m_currentPaso==m_ListaPasos.end()) {
+                                if (GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","auto_close")) {
+                                        GNC::GUI::StatusBarProgreso* statusBar = (GNC::GUI::StatusBarProgreso*)GNC::Entorno::Instance()->GetVentanaPrincipal()->GetStatusBar();
+                                        statusBar->ShowProgressDialog(true);
+                                }
+                                EndModal(wxOK);
+                        } else {
+                                CargarCurrent();
+                        }
+                }
+
+                Thaw();
+        }
+}
+
+void wxWizardImportacionGinkgo::OnAnteriorClick(wxCommandEvent &)
+{
+        if(m_currentPaso!=m_ListaPasos.begin()) {
+                wxWindow* pCurrent = dynamic_cast<wxWindow*> (*m_currentPaso);
+                if (pCurrent != NULL && (*m_currentPaso)->Detach()) {
+                        pCurrent->Hide();
+                        m_pSizerPrincipal->Detach(pCurrent);
+
+                        --m_currentPaso;
+                        --m_currentPasoIndex;
+                        CargarCurrent();
+                }
+        }
+}
+
+void wxWizardImportacionGinkgo::OnClose(wxCloseEvent &event)
+{
+        if(m_pModeloIntegracion.IsValid()) {
+                int answer = wxMessageBox(_("Are you sure you want to cancel the import process?"),_("Cancel"), wxYES_NO ,this);
+                if(answer == wxYES) {
+                        BorrarArchivosTemporales();
+                        EndModal(wxCANCEL);
+                } else {
+                        event.Skip(false);
+                }
+        } else {
+                BorrarArchivosTemporales();
+                EndModal(wxCANCEL);
+        }
+}
+
+
+//devuelve la ruta del directorio temporal
+std::list<std::string> wxWizardImportacionGinkgo::GetRuta()
+{
+        std::list<std::string> salida;
+        for(IPasoWizard::ListaFicheros::iterator it = m_ListaFicheros.begin(); it!= m_ListaFicheros.end(); ++it) {
+                salida.push_back((*it));
+        }
+
+        return salida;
+}
+
+
+void wxWizardImportacionGinkgo::CargarCurrent()
+{
+        wxWindow* pCurrent = dynamic_cast<wxWindow*> (*m_currentPaso);
+        if (pCurrent != NULL && (*m_currentPaso)->Attach()) {
+                pCurrent->Show(true);
+                m_pSizerPrincipal->Add(pCurrent, 10, wxEXPAND);
+
+                wxString label= wxString::Format(_("Step %d of %d: "), (int) m_currentPasoIndex, (int) m_ListaPasos.size());
+                m_pHeader->SetTitle(label+wxString::FromUTF8((*m_currentPaso)->GetTitle().c_str()));
+                m_pBSiguiente->Enable((*m_currentPaso)->Siguiente());
+                m_pBAnterior->Enable((*m_currentPaso)->Anterior());
+                m_pBCerrar->Enable((*m_currentPaso)->Cancelar());
+                PasoPefilImportacion* pasoPerfil = dynamic_cast<PasoPefilImportacion * > (*m_currentPaso);
+                if(*(m_currentPaso)==m_ListaPasos.back() && pasoPerfil == NULL) {
+                        m_pBSiguiente->SetLabel(_("&End"));
+                } else {
+                        m_pBSiguiente->SetLabel(_("&Next >"));
+                }
+        }
+
+        m_pPanelPrincipal->Layout();
+        Layout();
+}
+}
+}
diff --git a/cadxcore/main/gui/import/wxwizardimportacionginkgo.h b/cadxcore/main/gui/import/wxwizardimportacionginkgo.h
new file mode 100644
index 0000000..8a72b48
--- /dev/null
+++ b/cadxcore/main/gui/import/wxwizardimportacionginkgo.h
@@ -0,0 +1,76 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <wx/wizardginkgo/wxwizardginkgobase.h>
+#include <api/iwizard.h>
+#include <api/dicom/idicomizador.h>
+#include <api/controllers/ipacscontroller.h>
+#include <string>
+#include <vector>
+
+namespace GIL
+{
+class IModeloIntegracion;
+}
+
+namespace GNC
+{
+namespace GUI
+{
+class wxWizardImportacionGinkgo: public wxWizardGinkgoBase
+{
+
+public:
+        wxWizardImportacionGinkgo(wxWindow* pParent, GNC::GCS::Ptr<GIL::IModeloIntegracion> pModeloIntegracion, std::string uidModulo = "");
+        ~wxWizardImportacionGinkgo();
+
+        virtual bool  BorrarArchivosTemporales(wxString dir);
+
+        virtual void  BorrarArchivosTemporales();
+
+        virtual void OnCancelarClick(wxCommandEvent& event);
+        virtual void OnSiguienteClick(wxCommandEvent& event);
+        virtual void OnAnteriorClick(wxCommandEvent &event);
+        virtual void OnClose(wxCloseEvent &event);
+
+
+//region "Metodos de obtencion de resultados del dialogo"
+        //devuelve la ruta del directorio temporal
+        virtual std::list<std::string> GetRuta();
+
+        virtual void CargarCurrent();
+//endregion
+
+
+protected:
+        GNC::GCS::IModuleController*     m_pControladorModulo;
+        typedef std::list<IPasoWizard*> ListaPasos;
+        ListaPasos                        m_ListaPasos;
+        ListaPasos::iterator              m_currentPaso;
+
+        int m_currentPasoIndex;
+
+        IPasoWizard::ListaFicheros        m_ListaFicheros;
+        wxString                          m_pathDirTemporal;
+        GNC::GCS::Ptr<GIL::IModeloIntegracion>   m_pModeloIntegracion;
+};
+}
+}
diff --git a/cadxcore/main/gui/license/AboutDialog.fbp b/cadxcore/main/gui/license/AboutDialog.fbp
new file mode 100644
index 0000000..2da1c31
--- /dev/null
+++ b/cadxcore/main/gui/license/AboutDialog.fbp
@@ -0,0 +1,1395 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">aboutdialogbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">AboutDialog</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size">-1,-1</property>
+            <property name="minimum_size">550,400</property>
+            <property name="name">AboutDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">660,500</property>
+            <property name="style">wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown">OnAnyKeyDown</event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize">OnSize</event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizerPrincipal</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Ginkgo CADx</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer11</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size">-1,-1</property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelSuperior</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Credits</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer81</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxHtmlWindow" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pCredits</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxHW_SCROLLBAR_AUTO</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnHtmlCellClicked"></event>
+                                                <event name="OnHtmlCellHover"></event>
+                                                <event name="OnHtmlLinkClicked">OnTextURL</event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer8</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Licenses</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_buttonLicenciasOS</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnLicenciasOpenSource</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">1</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">UPDATE_INFO</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pActualizacionInfo</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">public</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxALIGN_CENTRE</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">&Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_buttonAceptar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">520,300</property>
+            <property name="name">DialogoLicenciasOpenSourceBase</property>
+            <property name="pos"></property>
+            <property name="size">700,476</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">Open Source Licenses</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer5</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Open Source Licenses</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxListBox" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="choices">"Cairo" "DCMTK" "FamFamFam Icons" "Fugue Icons" "ITK" "LibJpeg" "LibPng" "OpenSSL" "VTK" "WxWidgets" "Zlib" "SQL Lite" "CharLS" "Dark Glass Icons" "Libcurl" "JsonCpp" "AIRS"</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pListaLicencias</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxLB_SINGLE</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnListBox">OnListaLicencias</event>
+                                    <event name="OnListBoxDClick"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND | wxALL</property>
+                                <property name="proportion">1</property>
+                                <object class="wxRichTextCtrl" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pRichTextTextoLicencia</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxTE_AUTO_URL|wxTE_READONLY</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRichTextCharacter"></event>
+                                    <event name="OnRichTextContentDeleted"></event>
+                                    <event name="OnRichTextContentInserted"></event>
+                                    <event name="OnRichTextDelete"></event>
+                                    <event name="OnRichTextReturn"></event>
+                                    <event name="OnRichTextStyleChanged"></event>
+                                    <event name="OnRichTextStyleSheetChanged"></event>
+                                    <event name="OnRichTextStyleSheetReplaced"></event>
+                                    <event name="OnRichTextStyleSheetReplacing"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText"></event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnTextMaxLen"></event>
+                                    <event name="OnTextURL"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer8</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag"></property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">&Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_buttonAceptar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/license/AcceptLicenseDialog.fbp b/cadxcore/main/gui/license/AcceptLicenseDialog.fbp
new file mode 100644
index 0000000..bb48f75
--- /dev/null
+++ b/cadxcore/main/gui/license/AcceptLicenseDialog.fbp
@@ -0,0 +1,637 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="10" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">acceptlicensedialogbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">AcceptLicenseDialog</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">AcceptLicenseDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">800,600</property>
+            <property name="style">wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">License agreement</property>
+            <property name="tooltip"></property>
+            <property name="validator_data_type"></property>
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown">OnAnyKeyDown</event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize">OnSize</event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizerPrincipal</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pHeader</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip">License agreement</property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pBody</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer4</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxTextCtrl" expanded="0">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="maxlength">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pTextoLicencia</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="style">wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP</property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="value"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText"></event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnTextMaxLen"></event>
+                                    <event name="OnTextURL"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">0</property>
+                    <property name="flag">wxALL|wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pFooter</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size">-1,-1</property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer5</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="1">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">If you accept the terms of the agreement, click "I Accept the license" to continue. You must accept the license to start using Ginkgo CADx.</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_staticText1</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxBoxSizer" expanded="1">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer7</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxBoxSizer" expanded="1">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">bSizer51</property>
+                                            <property name="orient">wxVERTICAL</property>
+                                            <property name="permission">none</property>
+                                            <object class="sizeritem" expanded="1">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxCheckBox" expanded="1">
+                                                    <property name="bg"></property>
+                                                    <property name="checked">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="font"></property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Check for updates automatically</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">m_pCheckForUpdates</property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pos"></property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnCheckBox"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="1">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxCheckBox" expanded="1">
+                                                    <property name="bg"></property>
+                                                    <property name="checked">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="font"></property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Help us sending anonymous usage data (no patient data will be sent)</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">m_pCheckAnonUsageStats</property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pos"></property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnCheckBox"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="spacer" expanded="1">
+                                            <property name="height">0</property>
+                                            <property name="permission">protected</property>
+                                            <property name="width">0</property>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxRIGHT|wxLEFT|wxALIGN_BOTTOM</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="1">
+                                            <property name="bg"></property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">1</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="font"></property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_OK</property>
+                                            <property name="label">I Accept the license</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="minimum_size"></property>
+                                            <property name="name">m_buttonAceptar</property>
+                                            <property name="permission">protected</property>
+                                            <property name="pos"></property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick">OnAceptarClick</event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxLEFT|wxALIGN_BOTTOM</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxButton" expanded="1">
+                                            <property name="bg"></property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default">0</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="font"></property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_CANCEL</property>
+                                            <property name="label">I do NOT accept the license</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="minimum_size"></property>
+                                            <property name="name">m_buttonCancelar</property>
+                                            <property name="permission">protected</property>
+                                            <property name="pos"></property>
+                                            <property name="size"></property>
+                                            <property name="style"></property>
+                                            <property name="subclass"></property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnButtonClick"></event>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/license/aboutdialog.cpp b/cadxcore/main/gui/license/aboutdialog.cpp
new file mode 100644
index 0000000..0b195fc
--- /dev/null
+++ b/cadxcore/main/gui/license/aboutdialog.cpp
@@ -0,0 +1,71 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "aboutdialog.h"
+#include <api/globals.h>
+
+#include <api/ientorno.h>
+#include <main/controllers/controladorextensiones.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include "dialogolicenciasopensource.h"
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+AboutDialog::AboutDialog(wxWindow* pPadre):AboutDialogBase(pPadre)
+{
+        wxString title = _("About");
+        title += wxT(" ");
+        title += wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetApplicationName().c_str()) + wxT("...");
+        SetTitle( title);
+        m_pHeader->SetTitle(wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetApplicationName().c_str()));
+        m_pHeader->SetSubtitle(wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetApplicationSubTitle().c_str()));
+
+        std::ostringstream ostr;
+        ostr << "<html><body><h1>";
+        ostr << GNC::GCS::IEntorno::Instance()->GetApplicationName() << " " << GNC::GCS::IEntorno::Instance()->GetGinkgoVersionString() << "</h1>";
+        ostr << GNC::GCS::IEntorno::Instance()->GetApplicationCredits();
+        ostr << "</body></html>";
+
+        m_pCredits->SetPage(wxString::FromUTF8(ostr.str().c_str()));
+
+        Layout();
+}
+
+AboutDialog::~AboutDialog()
+{
+
+}
+
+void AboutDialog::OnLicenciasOpenSource(wxCommandEvent &)
+{
+        DialogoLicenciasOpenSource dlg (this);
+        dlg.ShowModal();
+}
+
+void AboutDialog::OnSize(wxSizeEvent &event)
+{
+        Layout();
+        event.Skip(true);
+}
+
+void AboutDialog::OnTextURL(wxHtmlLinkEvent &event)
+{
+        wxLaunchDefaultBrowser(event.GetLinkInfo().GetHref());
+}
+
diff --git a/cadxcore/main/gui/license/aboutdialog.h b/cadxcore/main/gui/license/aboutdialog.h
new file mode 100644
index 0000000..d8aac06
--- /dev/null
+++ b/cadxcore/main/gui/license/aboutdialog.h
@@ -0,0 +1,42 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "aboutdialogbase.h"
+#include <string>
+
+
+class AboutDialog : public AboutDialogBase
+{
+public:
+        AboutDialog(wxWindow* pPadre);
+        ~AboutDialog();
+
+        virtual void OnLicenciasOpenSource(wxCommandEvent &event);
+
+        virtual void OnSize(wxSizeEvent &event);
+
+        virtual void OnTextURL(wxHtmlLinkEvent &event);
+
+private:
+
+//endregion
+
+};
diff --git a/cadxcore/main/gui/license/aboutdialogbase.cpp b/cadxcore/main/gui/license/aboutdialogbase.cpp
new file mode 100644
index 0000000..29ee741
--- /dev/null
+++ b/cadxcore/main/gui/license/aboutdialogbase.cpp
@@ -0,0 +1,177 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "aboutdialogbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+AboutDialogBase::AboutDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 550,400 ), wxSize( -1,-1 ) );
+
+        wxBoxSizer* bSizerPrincipal;
+        bSizerPrincipal = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Ginkgo CADx") );
+
+        bSizerPrincipal->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer11;
+        bSizer11 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelSuperior = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelSuperior->SetToolTip( _("Credits") );
+
+        wxBoxSizer* bSizer81;
+        bSizer81 = new wxBoxSizer( wxVERTICAL );
+
+        m_pCredits = new wxHtmlWindow( m_pPanelSuperior, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
+        bSizer81->Add( m_pCredits, 1, wxEXPAND, 5 );
+
+
+        m_pPanelSuperior->SetSizer( bSizer81 );
+        m_pPanelSuperior->Layout();
+        bSizer81->Fit( m_pPanelSuperior );
+        bSizer11->Add( m_pPanelSuperior, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer11 );
+        m_pBody->Layout();
+        bSizer11->Fit( m_pBody );
+        bSizerPrincipal->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_buttonLicenciasOS = new wxButton( m_pFooter, wxID_ANY, _("Licenses"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer8->Add( m_buttonLicenciasOS, 0, 0, 5 );
+
+        m_pActualizacionInfo = new wxStaticText( m_pFooter, wxID_ANY, _("UPDATE_INFO"), wxDefaultPosition, wxDefaultSize, wxALIGN_CENTRE );
+        m_pActualizacionInfo->Wrap( -1 );
+        m_pActualizacionInfo->Hide();
+
+        bSizer8->Add( m_pActualizacionInfo, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer8->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_buttonAceptar = new wxButton( m_pFooter, wxID_CANCEL, _("&Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_buttonAceptar->SetDefault();
+        bSizer8->Add( m_buttonAceptar, 0, 0, 5 );
+
+
+        m_pFooter->SetSizer( bSizer8 );
+        m_pFooter->Layout();
+        bSizer8->Fit( m_pFooter );
+        bSizerPrincipal->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizerPrincipal );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( AboutDialogBase::OnAnyKeyDown ) );
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( AboutDialogBase::OnSize ) );
+        m_pCredits->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( AboutDialogBase::OnTextURL ), NULL, this );
+        m_buttonLicenciasOS->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDialogBase::OnLicenciasOpenSource ), NULL, this );
+}
+
+AboutDialogBase::~AboutDialogBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( AboutDialogBase::OnAnyKeyDown ) );
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( AboutDialogBase::OnSize ) );
+        m_pCredits->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( AboutDialogBase::OnTextURL ), NULL, this );
+        m_buttonLicenciasOS->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AboutDialogBase::OnLicenciasOpenSource ), NULL, this );
+
+}
+
+DialogoLicenciasOpenSourceBase::DialogoLicenciasOpenSourceBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 520,300 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Open Source Licenses") );
+
+        bSizer5->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pListaLicencias = new wxListBox( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, wxLB_SINGLE );
+        m_pListaLicencias->Append( _("Cairo") );
+        m_pListaLicencias->Append( _("DCMTK") );
+        m_pListaLicencias->Append( _("FamFamFam Icons") );
+        m_pListaLicencias->Append( _("Fugue Icons") );
+        m_pListaLicencias->Append( _("ITK") );
+        m_pListaLicencias->Append( _("LibJpeg") );
+        m_pListaLicencias->Append( _("LibPng") );
+        m_pListaLicencias->Append( _("OpenSSL") );
+        m_pListaLicencias->Append( _("VTK") );
+        m_pListaLicencias->Append( _("WxWidgets") );
+        m_pListaLicencias->Append( _("Zlib") );
+        m_pListaLicencias->Append( _("SQL Lite") );
+        m_pListaLicencias->Append( _("CharLS") );
+        m_pListaLicencias->Append( _("Dark Glass Icons") );
+        m_pListaLicencias->Append( _("Libcurl") );
+        m_pListaLicencias->Append( _("JsonCpp") );
+        m_pListaLicencias->Append( _("AIRS") );
+        bSizer7->Add( m_pListaLicencias, 0, wxALL|wxEXPAND, 5 );
+
+        m_pRichTextTextoLicencia = new wxRichTextCtrl( m_pBody, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_AUTO_URL|wxTE_READONLY|wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS );
+        bSizer7->Add( m_pRichTextTextoLicencia, 1, wxEXPAND | wxALL, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer5->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer8->Add( 0, 0, 1, 0, 5 );
+
+        m_buttonAceptar = new wxButton( m_pFooter, wxID_CANCEL, _("&Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_buttonAceptar->SetDefault();
+        bSizer8->Add( m_buttonAceptar, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer8 );
+        m_pFooter->Layout();
+        bSizer8->Fit( m_pFooter );
+        bSizer5->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer5 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pListaLicencias->Connect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DialogoLicenciasOpenSourceBase::OnListaLicencias ), NULL, this );
+}
+
+DialogoLicenciasOpenSourceBase::~DialogoLicenciasOpenSourceBase()
+{
+        // Disconnect Events
+        m_pListaLicencias->Disconnect( wxEVT_COMMAND_LISTBOX_SELECTED, wxCommandEventHandler( DialogoLicenciasOpenSourceBase::OnListaLicencias ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/license/aboutdialogbase.h b/cadxcore/main/gui/license/aboutdialogbase.h
new file mode 100644
index 0000000..569e051
--- /dev/null
+++ b/cadxcore/main/gui/license/aboutdialogbase.h
@@ -0,0 +1,108 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __ABOUTDIALOGBASE_H__
+#define __ABOUTDIALOGBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class HeaderPanel;
+class TitledPanel;
+
+#include <wx/panel.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/html/htmlwin.h>
+#include <wx/sizer.h>
+#include <wx/button.h>
+#include <wx/stattext.h>
+#include <wx/dialog.h>
+#include <wx/listbox.h>
+#include <wx/richtext/richtextctrl.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class AboutDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class AboutDialogBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelSuperior;
+        wxHtmlWindow* m_pCredits;
+        FooterPanel* m_pFooter;
+        wxButton* m_buttonLicenciasOS;
+        wxButton* m_buttonAceptar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnAnyKeyDown( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSize( wxSizeEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnTextURL( wxHtmlLinkEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnLicenciasOpenSource( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+        wxStaticText* m_pActualizacionInfo;
+
+        AboutDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 660,500 ), long style = wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~AboutDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoLicenciasOpenSourceBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoLicenciasOpenSourceBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        wxListBox* m_pListaLicencias;
+        wxRichTextCtrl* m_pRichTextTextoLicencia;
+        FooterPanel* m_pFooter;
+        wxButton* m_buttonAceptar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnListaLicencias( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DialogoLicenciasOpenSourceBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Open Source Licenses"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 700,476 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~DialogoLicenciasOpenSourceBase();
+
+};
+
+#endif //__ABOUTDIALOGBASE_H__
diff --git a/cadxcore/main/gui/license/acceptlicensedialog.cpp b/cadxcore/main/gui/license/acceptlicensedialog.cpp
new file mode 100644
index 0000000..2e53f14
--- /dev/null
+++ b/cadxcore/main/gui/license/acceptlicensedialog.cpp
@@ -0,0 +1,67 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <string>
+#include <sstream>
+#include "acceptlicensedialog.h"
+#include <api/ientorno.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/controladorpermisos.h>
+#include <api/internationalization/internationalization.h>
+#include <main/controllers/anonusagestats.h>
+#include <api/globals.h>
+#include <main/license.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+
+
+GNC::GUI::AcceptLicenseDialog::AcceptLicenseDialog(wxWindow* pPadre):GNC::GUI::AcceptLicenseDialogBase(pPadre)
+{
+        m_pTextoLicencia->SetValue(wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetApplicationEula().c_str()));
+        Layout();
+        m_buttonAceptar->SetFocus();
+        GNC::GCS::Permisos::EstadoPermiso updates = GNC::GCS::IControladorPermisos::Instance()->Get("core.update","check_updates");
+        m_pCheckForUpdates->Show(updates);
+        m_pCheckForUpdates->SetValue(updates);
+#ifdef GINKGO_PRO
+        m_pCheckAnonUsageStats->Show();
+#else
+        m_pCheckAnonUsageStats->Show(false);
+#endif
+        m_pFooter->Layout();
+        Layout();
+}
+
+GNC::GUI::AcceptLicenseDialog::~AcceptLicenseDialog()
+{
+}
+
+void GNC::GUI::AcceptLicenseDialog::OnAceptarClick(wxCommandEvent &event)
+{
+        GNC::GCS::ConfigurationController::Instance()->writeBoolGeneral("/GinkgoCore/Estacion", "CheckForUpdates", m_pCheckForUpdates->GetValue());
+        GNC::GCS::ConfigurationController::Instance()->Flush();
+        event.Skip(true);
+#ifdef GINKGO_PRO
+        GNC::GCS::ConfigurationController::Instance()->writeBoolGeneral("/GinkgoCore/General", "AnonUsageStats", m_pCheckAnonUsageStats->GetValue());
+        GNC::GCS::ConfigurationController::Instance()->Flush();
+        GNC::GCS::AnonUsageStats::Instance()->resetSettings();
+#endif
+        LOG_STAT(ANON_STAT_ACCEPT_LICENSE)
+}
diff --git a/cadxcore/main/gui/license/acceptlicensedialog.h b/cadxcore/main/gui/license/acceptlicensedialog.h
new file mode 100644
index 0000000..01601f8
--- /dev/null
+++ b/cadxcore/main/gui/license/acceptlicensedialog.h
@@ -0,0 +1,40 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "acceptlicensedialogbase.h"
+
+namespace GNC
+{
+namespace GUI
+{
+class AcceptLicenseDialog : public AcceptLicenseDialogBase
+{
+public:
+        AcceptLicenseDialog(wxWindow* pPadre);
+        ~AcceptLicenseDialog();
+
+        virtual void OnAceptarClick(wxCommandEvent &event);
+
+        //endregion
+
+};
+};
+};
diff --git a/cadxcore/main/gui/license/acceptlicensedialogbase.cpp b/cadxcore/main/gui/license/acceptlicensedialogbase.cpp
new file mode 100644
index 0000000..84702a7
--- /dev/null
+++ b/cadxcore/main/gui/license/acceptlicensedialogbase.cpp
@@ -0,0 +1,98 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "acceptlicensedialogbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+AcceptLicenseDialogBase::AcceptLicenseDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+        wxBoxSizer* bSizerPrincipal;
+        bSizerPrincipal = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("License agreement") );
+
+        bSizerPrincipal->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTextoLicencia = new wxTextCtrl( m_pBody, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP );
+        bSizer4->Add( m_pTextoLicencia, 1, wxEXPAND, 5 );
+
+        m_pBody->SetSizer( bSizer4 );
+        m_pBody->Layout();
+        bSizer4->Fit( m_pBody );
+        bSizerPrincipal->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+        m_staticText1 = new wxStaticText( m_pFooter, wxID_ANY, _("If you accept the terms of the agreement, click \"I Accept the license\" to continue. You must accept the license to start using Ginkgo CADx."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText1->Wrap( -1 );
+        bSizer5->Add( m_staticText1, 0, wxALL, 5 );
+
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer51;
+        bSizer51 = new wxBoxSizer( wxVERTICAL );
+
+        m_pCheckForUpdates = new wxCheckBox( m_pFooter, wxID_ANY, _("Check for updates automatically"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pCheckForUpdates->SetValue(true);
+        bSizer51->Add( m_pCheckForUpdates, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pCheckAnonUsageStats = new wxCheckBox( m_pFooter, wxID_ANY, _("Help us sending anonymous usage data (no patient data will be sent)"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pCheckAnonUsageStats->SetValue(true);
+        bSizer51->Add( m_pCheckAnonUsageStats, 0, wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
+
+        bSizer7->Add( bSizer51, 1, wxEXPAND, 5 );
+
+
+        bSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_buttonAceptar = new wxButton( m_pFooter, wxID_OK, _("I Accept the license"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_buttonAceptar->SetDefault();
+        bSizer7->Add( m_buttonAceptar, 0, wxRIGHT|wxLEFT|wxALIGN_BOTTOM, 5 );
+
+        m_buttonCancelar = new wxButton( m_pFooter, wxID_CANCEL, _("I do NOT accept the license"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer7->Add( m_buttonCancelar, 0, wxLEFT|wxALIGN_BOTTOM, 5 );
+
+        bSizer5->Add( bSizer7, 1, wxEXPAND, 5 );
+
+        m_pFooter->SetSizer( bSizer5 );
+        m_pFooter->Layout();
+        bSizer5->Fit( m_pFooter );
+        bSizerPrincipal->Add( m_pFooter, 0, wxALL|wxEXPAND, 0 );
+
+        this->SetSizer( bSizerPrincipal );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( AcceptLicenseDialogBase::OnAnyKeyDown ) );
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( AcceptLicenseDialogBase::OnSize ) );
+        m_buttonAceptar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AcceptLicenseDialogBase::OnAceptarClick ), NULL, this );
+}
+
+AcceptLicenseDialogBase::~AcceptLicenseDialogBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( AcceptLicenseDialogBase::OnAnyKeyDown ) );
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( AcceptLicenseDialogBase::OnSize ) );
+        m_buttonAceptar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( AcceptLicenseDialogBase::OnAceptarClick ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/license/acceptlicensedialogbase.h b/cadxcore/main/gui/license/acceptlicensedialogbase.h
new file mode 100644
index 0000000..3955a91
--- /dev/null
+++ b/cadxcore/main/gui/license/acceptlicensedialogbase.h
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __acceptlicensedialogbase__
+#define __acceptlicensedialogbase__
+
+#include <wx/intl.h>
+
+class BodyPanel;
+class FooterPanel;
+class HeaderPanel;
+
+#include <wx/panel.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/textctrl.h>
+#include <wx/sizer.h>
+#include <wx/stattext.h>
+#include <wx/checkbox.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class AcceptLicenseDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class AcceptLicenseDialogBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        wxTextCtrl* m_pTextoLicencia;
+        FooterPanel* m_pFooter;
+        wxStaticText* m_staticText1;
+        wxCheckBox* m_pCheckForUpdates;
+        wxCheckBox* m_pCheckAnonUsageStats;
+
+        wxButton* m_buttonAceptar;
+        wxButton* m_buttonCancelar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnAnyKeyDown( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSize( wxSizeEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAceptarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        AcceptLicenseDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("License agreement"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800,600 ), long style = wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~AcceptLicenseDialogBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__acceptlicensedialogbase__
diff --git a/cadxcore/main/gui/license/dialogolicenciasopensource.cpp b/cadxcore/main/gui/license/dialogolicenciasopensource.cpp
new file mode 100644
index 0000000..e8a231e
--- /dev/null
+++ b/cadxcore/main/gui/license/dialogolicenciasopensource.cpp
@@ -0,0 +1,1443 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/richtext/richtextxml.h>
+#include "dialogolicenciasopensource.h"
+
+#include <api/globals.h>
+#include <main/entorno.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/license.h>
+#include <main/controllers/controladorextensiones.h>
+
+
+DialogoLicenciasOpenSource::DialogoLicenciasOpenSource(wxWindow* pPadre):DialogoLicenciasOpenSourceBase(pPadre)
+{
+        m_pListaLicencias->Insert(wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetApplicationName().c_str()), 0);
+        wxRichTextBuffer::AddHandler(new wxRichTextXMLHandler());
+        m_pListaLicencias->Select(0);
+
+        GNC::ControladorExtensiones::ListaModulos listaModulos = GNC::ControladorExtensiones::Instance()->Modulos();
+        for (GNC::ControladorExtensiones::ListaModulos::iterator it = listaModulos.begin(); it != listaModulos.end(); ++it) {
+                GNC::GCS::IModuleController::TExtraLicensesMap extraLicenses = (*it).second->GetExtraLicenses();
+                ExtraMap.insert(extraLicenses.begin(), extraLicenses.end());
+        }
+        for (GNC::GCS::IModuleController::TExtraLicensesMap::iterator it = ExtraMap.begin(); it != ExtraMap.end(); ++it) {
+                m_pListaLicencias->Append(wxString::FromUTF8((*it).first.c_str()));
+        }
+        EscribeLicenciaGinkgo();
+}
+
+DialogoLicenciasOpenSource::~DialogoLicenciasOpenSource()
+{
+
+}
+
+void DialogoLicenciasOpenSource::OnListaLicencias(wxCommandEvent &)
+{
+        wxString licencia = m_pListaLicencias->GetStringSelection();
+        std::string nombre (licencia.ToUTF8());
+        if(nombre == GNC::GCS::IEntorno::Instance()->GetApplicationName()) {
+                EscribeLicenciaGinkgo();
+        } else if(nombre == "Cairo") {
+                EscribeLicenciaCairo();
+        } else if (nombre == "DCMTK") {
+                EscribeLicenciaDCMTK();
+        } else if (nombre == "FamFamFam Icons") {
+                EscribeLicenciaFamFam();
+        } else if (nombre == "Fugue Icons") {
+                EscribeLicenciaFugue();
+        } else if (nombre == "ITK") {
+                EscribeLicenciaITK();
+        } else if (nombre == "LibJpeg") {
+                EscribeLicencialibjpeg();
+        } else if (nombre == "LibPng") {
+                EscribeLicencialibpng();
+        } else if (nombre == "OpenSSL") {
+                EscribeLicenciaOpenssl();
+        } else if (nombre == "VTK") {
+                EscribeLicenciaVTK();
+        } else if (nombre == "WxWidgets") {
+                EscribeLicenciawxWidgets();
+        } else if (nombre == "Zlib") {
+                EscribeLicenciazlib();
+        } else if(nombre == "SQL Lite") {
+                EscribeLicenciaSQLLite();
+        } else if (nombre == "CharLS") {
+                EscribeLicenciaCharLS();
+        } else if (nombre == "Dark Glass Icons") {
+                WriteDarkGlassLicense();
+        } else if (nombre == "Libcurl") {
+                WriteLibcurl();
+        } else if (nombre == "JsonCpp") {
+                WriteLibJsonCpp();
+        } else if (nombre == "AIRS") {
+                WriteLibAIRS();
+        } else if (ExtraMap.find(nombre) != ExtraMap.end()) {
+                EscribeTitulo(licencia + wxT("\n\n\n"));
+                wxString licenseText = wxString::FromUTF8(ExtraMap[nombre].c_str());
+                EscribeLicencia(licenseText);
+        } else {
+                m_pRichTextTextoLicencia->Clear();
+        }
+}
+
+void DialogoLicenciasOpenSource::EscribeTitulo(wxString titulo)
+{
+        m_pRichTextTextoLicencia->Clear();
+        m_pRichTextTextoLicencia->SetDefaultStyle(wxRichTextAttr());
+        m_pRichTextTextoLicencia->BeginBold();
+        m_pRichTextTextoLicencia->BeginFontSize(14);
+        m_pRichTextTextoLicencia->WriteText(titulo);
+        m_pRichTextTextoLicencia->EndFontSize();
+        m_pRichTextTextoLicencia->EndBold();
+}
+
+void DialogoLicenciasOpenSource::EscribeLicencia(wxString& licencia)
+{
+        m_pRichTextTextoLicencia->BeginFontSize(9);
+        m_pRichTextTextoLicencia->WriteText(licencia);
+        m_pRichTextTextoLicencia->EndFontSize();
+        m_pRichTextTextoLicencia->Enable(true);
+}
+
+void DialogoLicenciasOpenSource::EscribeLicenciaGinkgo()
+{
+        EscribeTitulo(wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetApplicationName().c_str()) +wxT("\n\n\n"));
+        std::string eula = GNC::Entorno::Instance()->GetApplicationEula();
+        wxString resultado = wxString::FromUTF8(eula.c_str());
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::EscribeLicenciaCairo()
+{
+        EscribeTitulo(wxT("Cairo\n\n\n"));
+        wxString resultado = wxEmptyString;
+
+        resultado += wxT("Mozilla Public License Version 1.1\n");
+        resultado += wxT("\n");
+        resultado += wxT("1. Definitions.\n");
+        resultado += wxT("\n");
+        resultado += wxT("1.0.1. \"Commercial Use\"\n");
+        resultado += wxT("means distribution or otherwise making the Covered Code available to a third party.\n");
+        resultado += wxT("1.1. \"Contributor\"\n");
+        resultado += wxT("means each entity that creates or contributes to the creation of Modifications.\n");
+        resultado += wxT("1.2. \"Contributor Version\"\n");
+        resultado += wxT("means the combination of the Original Code, prior Modifications used by a Contributor, and the Modifications made by that particular Contributor.\n");
+        resultado += wxT("1.3. \"Covered Code\"\n");
+        resultado += wxT("means the Original Code or Modifications or the combination of the Original Code and Modifications, in each case including portions thereof.\n");
+        resultado += wxT("1.4. \"Electronic Distribution Mechanism\"\n");
+        resultado += wxT("means a mechanism generally accepted in the software development community for the electronic transfer of data.\n");
+        resultado += wxT("1.5. \"Executable\"\n");
+        resultado += wxT("means Covered Code in any form other than Source Code.\n");
+        resultado += wxT("1.6. \"Initial Developer\"\n");
+        resultado += wxT("means the individual or entity identified as the Initial Developer in the Source Code notice required by Exhibit A.\n");
+        resultado += wxT("1.7. \"Larger Work\"\n");
+        resultado += wxT("means a work which combines Covered Code or portions thereof with code not governed by the terms of this License.\n");
+        resultado += wxT("1.8. \"License\"\n");
+        resultado += wxT("means this document.\n");
+        resultado += wxT("1.8.1. \"Licensable\"\n");
+        resultado += wxT("means having the right to grant, to the maximum extent possible, whether at the time of the initial grant or subsequently acquired, any and all of the rights conveyed herein.\n");
+        resultado += wxT("1.9. \"Modifications\"\n");
+        resultado += wxT("means any addition to or deletion from the substance or structure of either the Original Code or any previous Modifications. When Covered Code is released as a series of files, a Modification is:\n");
+        resultado += wxT("Any addition to or deletion from the contents of a file containing Original Code or previous Modifications.\n");
+        resultado += wxT("Any new file that contains any part of the Original Code or previous Modifications.\n");
+        resultado += wxT("1.10. \"Original Code\"\n");
+        resultado += wxT("means Source Code of computer software code which is described in the Source Code notice required by Exhibit A as Original Code, and which, at the time of its release under this License is not already Covered Code governed by this License.\n");
+        resultado += wxT("1.10.1. \"Patent Claims\"\n");
+        resultado += wxT("means any patent claim(s), now owned or hereafter acquired, including without limitation, method, process, and apparatus claims, in any patent Licensable by grantor.\n");
+        resultado += wxT("1.11. \"Source Code\"\n");
+        resultado += wxT("means the preferred form of the Covered Code for making modifications to it, including all modules it contains, plus any associated interface definition files, scripts used to control compilation and installation of an Executable, or source code differential comparisons against either the Original Code or another well known, available Covered Code of the Contributor's choice. The Source Code can be in a compressed or archival form, provided the appropriate decom [...]
+        resultado += wxT("1.12. \"You\" (or \"Your\")\n");
+        resultado += wxT("means an individual or a legal entity exercising rights under, and complying with all of the terms of, this License or a future version of this License issued under Section 6.1. For legal entities, \"You\" includes any entity which controls, is controlled by, or is under common control with You. For purposes of this definition, \"control\" means (a) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwi [...]
+        resultado += wxT("2. Source Code License.\n");
+        resultado += wxT("\n");
+        resultado += wxT("2.1. The Initial Developer Grant.\n");
+        resultado += wxT("\n");
+        resultado += wxT("The Initial Developer hereby grants You a world-wide, royalty-free, non-exclusive license, subject to third party intellectual property claims:\n");
+        resultado += wxT("\n");
+        resultado += wxT("under intellectual property rights (other than patent or trademark) Licensable by Initial Developer to use, reproduce, modify, display, perform, sublicense and distribute the Original Code (or portions thereof) with or without Modifications, and/or as part of a Larger Work; and\n");
+        resultado += wxT("under Patents Claims infringed by the making, using or selling of Original Code, to make, have made, use, practice, sell, and offer for sale, and/or otherwise dispose of the Original Code (or portions thereof).\n");
+        resultado += wxT("the licenses granted in this Section 2.1 (a) and (b) are effective on the date Initial Developer first distributes Original Code under the terms of this License.\n");
+        resultado += wxT("Notwithstanding Section 2.1 (b) above, no patent license is granted: 1) for code that You delete from the Original Code; 2) separate from the Original Code; or 3) for infringements caused by: i) the modification of the Original Code or ii) the combination of the Original Code with other software or devices.\n");
+        resultado += wxT("2.2. Contributor Grant.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Subject to third party intellectual property claims, each Contributor hereby grants You a world-wide, royalty-free, non-exclusive license\n");
+        resultado += wxT("\n");
+        resultado += wxT("under intellectual property rights (other than patent or trademark) Licensable by Contributor, to use, reproduce, modify, display, perform, sublicense and distribute the Modifications created by such Contributor (or portions thereof) either on an unmodified basis, with other Modifications, as Covered Code and/or as part of a Larger Work; and\n");
+        resultado += wxT("under Patent Claims infringed by the making, using, or selling of Modifications made by that Contributor either alone and/or in combination with its Contributor Version (or portions of such combination), to make, use, sell, offer for sale, have made, and/or otherwise dispose of: 1) Modifications made by that Contributor (or portions thereof); and 2) the combination of Modifications made by that Contributor with its Contributor Version (or portions of such combin [...]
+        resultado += wxT("the licenses granted in Sections 2.2 (a) and 2.2 (b) are effective on the date Contributor first makes Commercial Use of the Covered Code.\n");
+        resultado += wxT("Notwithstanding Section 2.2 (b) above, no patent license is granted: 1) for any code that Contributor has deleted from the Contributor Version; 2) separate from the Contributor Version; 3) for infringements caused by: i) third party modifications of Contributor Version or ii) the combination of Modifications made by that Contributor with other software (except as part of the Contributor Version) or other devices; or 4) under Patent Claims infringed by Covered Co [...]
+        resultado += wxT("3. Distribution Obligations.\n");
+        resultado += wxT("\n");
+        resultado += wxT("3.1. Application of License.\n");
+        resultado += wxT("\n");
+        resultado += wxT("The Modifications which You create or to which You contribute are governed by the terms of this License, including without limitation Section 2.2. The Source Code version of Covered Code may be distributed only under the terms of this License or a future version of this License released under Section 6.1, and You must include a copy of this License with every copy of the Source Code You distribute. You may not offer or impose any terms on any Source Code version [...]
+        resultado += wxT("\n");
+        resultado += wxT("3.2. Availability of Source Code.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Any Modification which You create or to which You contribute must be made available in Source Code form under the terms of this License either on the same media as an Executable version or via an accepted Electronic Distribution Mechanism to anyone to whom you made an Executable version available; and if made available via Electronic Distribution Mechanism, must remain available for at least twelve (12) months after the date it initially became available, or at  [...]
+        resultado += wxT("\n");
+        resultado += wxT("3.3. Description of Modifications.\n");
+        resultado += wxT("\n");
+        resultado += wxT("You must cause all Covered Code to which You contribute to contain a file documenting the changes You made to create that Covered Code and the date of any change. You must include a prominent statement that the Modification is derived, directly or indirectly, from Original Code provided by the Initial Developer and including the name of the Initial Developer in (a) the Source Code, and (b) in any notice in an Executable version or related documentation in which  [...]
+        resultado += wxT("\n");
+        resultado += wxT("3.4. Intellectual Property Matters\n");
+        resultado += wxT("\n");
+        resultado += wxT("(a) Third Party Claims\n");
+        resultado += wxT("\n");
+        resultado += wxT("If Contributor has knowledge that a license under a third party's intellectual property rights is required to exercise the rights granted by such Contributor under Sections 2.1 or 2.2, Contributor must include a text file with the Source Code distribution titled \"LEGAL\" which describes the claim and the party making the claim in sufficient detail that a recipient will know whom to contact. If Contributor obtains such knowledge after the Modification is made av [...]
+        resultado += wxT("\n");
+        resultado += wxT("(b) Contributor APIs\n");
+        resultado += wxT("\n");
+        resultado += wxT("If Contributor's Modifications include an application programming interface and Contributor has knowledge of patent licenses which are reasonably necessary to implement that API, Contributor must also include this information in the LEGAL file.\n");
+        resultado += wxT("\n");
+        resultado += wxT("(c) Representations.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Contributor represents that, except as disclosed pursuant to Section 3.4 (a) above, Contributor believes that Contributor's Modifications are Contributor's original creation(s) and/or Contributor has sufficient rights to grant the rights conveyed by this License.\n");
+        resultado += wxT("\n");
+        resultado += wxT("3.5. Required Notices.\n");
+        resultado += wxT("\n");
+        resultado += wxT("You must duplicate the notice in Exhibit A in each file of the Source Code. If it is not possible to put such notice in a particular Source Code file due to its structure, then You must include such notice in a location (such as a relevant directory) where a user would be likely to look for such a notice. If You created one or more Modification(s) You may add your name as a Contributor to the notice described in Exhibit A. You must also duplicate this License in [...]
+        resultado += wxT("\n");
+        resultado += wxT("3.6. Distribution of Executable Versions.\n");
+        resultado += wxT("\n");
+        resultado += wxT("You may distribute Covered Code in Executable form only if the requirements of Sections 3.1, 3.2, 3.3, 3.4 and 3.5 have been met for that Covered Code, and if You include a notice stating that the Source Code version of the Covered Code is available under the terms of this License, including a description of how and where You have fulfilled the obligations of Section 3.2. The notice must be conspicuously included in any notice in an Executable version, related d [...]
+        resultado += wxT("\n");
+        resultado += wxT("3.7. Larger Works.\n");
+        resultado += wxT("\n");
+        resultado += wxT("You may create a Larger Work by combining Covered Code with other code not governed by the terms of this License and distribute the Larger Work as a single product. In such a case, You must make sure the requirements of this License are fulfilled for the Covered Code.\n");
+        resultado += wxT("\n");
+        resultado += wxT("4. Inability to Comply Due to Statute or Regulation.\n");
+        resultado += wxT("\n");
+        resultado += wxT("If it is impossible for You to comply with any of the terms of this License with respect to some or all of the Covered Code due to statute, judicial order, or regulation then You must: (a) comply with the terms of this License to the maximum extent possible; and (b) describe the limitations and the code they affect. Such description must be included in the LEGAL file described in Section 3.4 and must be included with all distributions of the Source Code. Except  [...]
+        resultado += wxT("\n");
+        resultado += wxT("5. Application of this License.\n");
+        resultado += wxT("\n");
+        resultado += wxT("This License applies to code to which the Initial Developer has attached the notice in Exhibit A and to related Covered Code.\n");
+        resultado += wxT("\n");
+        resultado += wxT("6. Versions of the License.\n");
+        resultado += wxT("\n");
+        resultado += wxT("6.1. New Versions\n");
+        resultado += wxT("\n");
+        resultado += wxT("Netscape Communications Corporation (\"Netscape\") may publish revised and/or new versions of the License from time to time. Each version will be given a distinguishing version number.\n");
+        resultado += wxT("\n");
+        resultado += wxT("6.2. Effect of New Versions\n");
+        resultado += wxT("\n");
+        resultado += wxT("Once Covered Code has been published under a particular version of the License, You may always continue to use it under the terms of that version. You may also choose to use such Covered Code under the terms of any subsequent version of the License published by Netscape. No one other than Netscape has the right to modify the terms applicable to Covered Code created under this License.\n");
+        resultado += wxT("\n");
+        resultado += wxT("6.3. Derivative Works\n");
+        resultado += wxT("\n");
+        resultado += wxT("If You create or use a modified version of this License (which you may only do in order to apply it to code which is not already Covered Code governed by this License), You must (a) rename Your license so that the phrases \"Mozilla\", \"MOZILLAPL\", \"MOZPL\", \"Netscape\", \"MPL\", \"NPL\" or any confusingly similar phrase do not appear in your license (except to note that your license differs from this License) and (b) otherwise make it clear that Your version [...]
+        resultado += wxT("\n");
+        resultado += wxT("7. DISCLAIMER OF WARRANTY\n");
+        resultado += wxT("\n");
+        resultado += wxT("COVERED CODE IS PROVIDED UNDER THIS LICENSE ON AN \"AS IS\" BASIS, WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, WITHOUT LIMITATION, WARRANTIES THAT THE COVERED CODE IS FREE OF DEFECTS, MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE OR NON-INFRINGING. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE COVERED CODE IS WITH YOU. SHOULD ANY COVERED CODE PROVE DEFECTIVE IN ANY RESPECT, YOU (NOT THE INITIAL DEVELOPER OR ANY OTHER CONTRIBUTOR [...]
+        resultado += wxT("\n");
+        resultado += wxT("8. Termination\n");
+        resultado += wxT("\n");
+        resultado += wxT("8.1. This License and the rights granted hereunder will terminate automatically if You fail to comply with terms herein and fail to cure such breach within 30 days of becoming aware of the breach. All sublicenses to the Covered Code which are properly granted shall survive any termination of this License. Provisions which, by their nature, must remain in effect beyond the termination of this License shall survive.\n");
+        resultado += wxT("\n");
+        resultado += wxT("8.2. If You initiate litigation by asserting a patent infringement claim (excluding declatory judgment actions) against Initial Developer or a Contributor (the Initial Developer or Contributor against whom You file such action is referred to as \"Participant\") alleging that:\n");
+        resultado += wxT("\n");
+        resultado += wxT("such Participant's Contributor Version directly or indirectly infringes any patent, then any and all rights granted by such Participant to You under Sections 2.1 and/or 2.2 of this License shall, upon 60 days notice from Participant terminate prospectively, unless if within 60 days after receipt of notice You either: (i) agree in writing to pay Participant a mutually agreeable reasonable royalty for Your past and future use of Modifications made by such Particip [...]
+        resultado += wxT("any software, hardware, or device, other than such Participant's Contributor Version, directly or indirectly infringes any patent, then any rights granted to You by such Participant under Sections 2.1(b) and 2.2(b) are revoked effective as of the date You first made, used, sold, distributed, or had made, Modifications made by that Participant.\n");
+        resultado += wxT("8.3. If You assert a patent infringement claim against Participant alleging that such Participant's Contributor Version directly or indirectly infringes any patent where such claim is resolved (such as by license or settlement) prior to the initiation of patent infringement litigation, then the reasonable value of the licenses granted by such Participant under Sections 2.1 or 2.2 shall be taken into account in determining the amount or value of any payment or li [...]
+        resultado += wxT("\n");
+        resultado += wxT("8.4. In the event of termination under Sections 8.1 or 8.2 above, all end user license agreements (excluding distributors and resellers) which have been validly granted by You or any distributor hereunder prior to termination shall survive termination.\n");
+        resultado += wxT("\n");
+        resultado += wxT("9. LIMITATION OF LIABILITY\n");
+        resultado += wxT("\n");
+        resultado += wxT("UNDER NO CIRCUMSTANCES AND UNDER NO LEGAL THEORY, WHETHER TORT (INCLUDING NEGLIGENCE), CONTRACT, OR OTHERWISE, SHALL YOU, THE INITIAL DEVELOPER, ANY OTHER CONTRIBUTOR, OR ANY DISTRIBUTOR OF COVERED CODE, OR ANY SUPPLIER OF ANY OF SUCH PARTIES, BE LIABLE TO ANY PERSON FOR ANY INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES OF ANY CHARACTER INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS OF GOODWILL, WORK STOPPAGE, COMPUTER FAILURE OR MALFUNCTION, OR ANY A [...]
+        resultado += wxT("\n");
+        resultado += wxT("10. U.S. government end users\n");
+        resultado += wxT("\n");
+        resultado += wxT("The Covered Code is a \"commercial item,\" as that term is defined in 48 C.F.R. 2.101 (Oct. 1995), consisting of \"commercial computer software\" and \"commercial computer software documentation,\" as such terms are used in 48 C.F.R. 12.212 (Sept. 1995). Consistent with 48 C.F.R. 12.212 and 48 C.F.R. 227.7202-1 through 227.7202-4 (June 1995), all U.S. Government End Users acquire Covered Code with only those rights set forth herein.\n");
+        resultado += wxT("\n");
+        resultado += wxT("11. Miscellaneous\n");
+        resultado += wxT("\n");
+        resultado += wxT("This License represents the complete agreement concerning subject matter hereof. If any provision of this License is held to be unenforceable, such provision shall be reformed only to the extent necessary to make it enforceable. This License shall be governed by California law provisions (except to the extent applicable law, if any, provides otherwise), excluding its conflict-of-law provisions. With respect to disputes in which at least one party is a citizen of [...]
+        resultado += wxT("\n");
+        resultado += wxT("12. Responsibility for claims\n");
+        resultado += wxT("\n");
+        resultado += wxT("As between Initial Developer and the Contributors, each party is responsible for claims and damages arising, directly or indirectly, out of its utilization of rights under this License and You agree to work with Initial Developer and Contributors to distribute such responsibility on an equitable basis. Nothing herein is intended or shall be deemed to constitute any admission of liability.\n");
+        resultado += wxT("\n");
+        resultado += wxT("13. Multiple-licensed code\n");
+        resultado += wxT("\n");
+        resultado += wxT("Initial Developer may designate portions of the Covered Code as \"Multiple-Licensed\". \"Multiple-Licensed\" means that the Initial Developer permits you to utilize portions of the Covered Code under Your choice of the MPL or the alternative licenses, if any, specified by the Initial Developer in the file described in Exhibit A.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Exhibit A - Mozilla Public License.\n");
+        resultado += wxT("\n");
+        resultado += wxT("\"The contents of this file are subject to the Mozilla Public License\n");
+        resultado += wxT("Version 1.1 (the \"License\"); you may not use this file except in\n");
+        resultado += wxT("compliance with the License. You may obtain a copy of the License at\n");
+        resultado += wxT("http://www.mozilla.org/MPL/\n");
+        resultado += wxT("\n");
+        resultado += wxT("Software distributed under the License is distributed on an \"AS IS\"\n");
+        resultado += wxT("basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the\n");
+        resultado += wxT("License for the specific language governing rights and limitations\n");
+        resultado += wxT("under the License.\n");
+        resultado += wxT("\n");
+        resultado += wxT("The Original Code is ______________________________________.\n");
+        resultado += wxT("\n");
+        resultado += wxT("The Initial Developer of the Original Code is ________________________.\n");
+        resultado += wxT("Portions created by ______________________ are Copyright (C) ______\n");
+        resultado += wxT("_______________________. All Rights Reserved.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Contributor(s): ______________________________________.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Alternatively, the contents of this file may be used under the terms\n");
+        resultado += wxT("of the _____ license (the  \"[___] License\"), in which case the\n");
+        resultado += wxT("provisions of [______] License are applicable instead of those\n");
+        resultado += wxT("above. If you wish to allow use of your version of this file only\n");
+        resultado += wxT("under the terms of the [____] License and not to allow others to use\n");
+        resultado += wxT("your version of this file under the MPL, indicate your decision by\n");
+        resultado += wxT("deleting the provisions above and replace them with the notice and\n");
+        resultado += wxT("other provisions required by the [___] License. If you do not delete\n");
+        resultado += wxT("the provisions above, a recipient may use your version of this file\n");
+        resultado += wxT("under either the MPL or the [___] License.\"\n");
+        resultado += wxT("NOTE: The text of this Exhibit A may differ slightly from the text of the notices in the Source Code files of the Original Code. You should use the text of this Exhibit A rather than the text found in the Original Code Source Code for Your Modifications.\n\n");
+        EscribeLicencia(resultado);
+}
+
+
+void DialogoLicenciasOpenSource::EscribeLicenciaDCMTK()
+{
+        EscribeTitulo(wxT("DCMTK\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("COPYRIGHT\n");
+        resultado += wxT("\n");
+        resultado += wxT("Unless otherwise specified, the DCMTK software package has the\n");
+        resultado += wxT("following copyright:\n");
+        resultado += wxT("\n");
+        resultado += wxT("/*\n");
+        resultado += wxT(" *  Copyright (C) 1994-2004, OFFIS\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  This software and supporting documentation were developed by\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *    Kuratorium OFFIS e.V.\n");
+        resultado += wxT(" *    Healthcare Information and Communication Systems\n");
+        resultado += wxT(" *    Escherweg 2\n");
+        resultado += wxT(" *    D-26121 Oldenburg, Germany\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY\n");
+        resultado += wxT(" *  REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR\n");
+        resultado += wxT(" *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR\n");
+        resultado += wxT(" *  ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND\n");
+        resultado += wxT(" *  PERFORMANCE OF THE SOFTWARE IS WITH THE USER.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  Copyright of the software  and  supporting  documentation  is,  unless\n");
+        resultado += wxT(" *  otherwise stated, owned by OFFIS, and free access is hereby granted as\n");
+        resultado += wxT(" *  a license to  use  this  software,  copy  this  software  and  prepare\n");
+        resultado += wxT(" *  derivative works based upon this software.  However, any  distribution\n");
+        resultado += wxT(" *  of this software source code or supporting documentation or derivative\n");
+        resultado += wxT(" *  works  (source code and  supporting documentation)  must  include  the\n");
+        resultado += wxT(" *  three paragraphs of this copyright notice.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" */\n");
+        resultado += wxT("\n");
+        resultado += wxT("Some portions of the DCMTK software package are derived from earlier\n");
+        resultado += wxT("versions of this software with the following copyright, and can be\n");
+        resultado += wxT("identifed by the following copyright notice located in each source file:\n");
+        resultado += wxT("\n");
+        resultado += wxT("/*  \n");
+        resultado += wxT(" *  Copyright (C) 1993/1994, OFFIS, Oldenburg University and CERIUM\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *  This software and supporting documentation were\n");
+        resultado += wxT(" *  developed by\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *    Institut OFFIS\n");
+        resultado += wxT(" *    Bereich Kommunikationssysteme\n");
+        resultado += wxT(" *    Westerstr. 10-12\n");
+        resultado += wxT(" *    26121 Oldenburg, Germany\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *    Fachbereich Informatik\n");
+        resultado += wxT(" *    Abteilung Prozessinformatik\n");
+        resultado += wxT(" *    Carl von Ossietzky Universitaet Oldenburg\n");
+        resultado += wxT(" *    Ammerlaender Heerstr. 114-118\n");
+        resultado += wxT(" *    26111 Oldenburg, Germany\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *    CERIUM\n");
+        resultado += wxT(" *    Laboratoire SIM\n");
+        resultado += wxT(" *    Faculte de Medecine\n");
+        resultado += wxT(" *    2 Avenue du Pr. Leon Bernard\n");
+        resultado += wxT(" *    35043 Rennes Cedex, France\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *  for CEN/TC251/WG4 as a contribution to the Radiological\n");
+        resultado += wxT(" *  Society of North America (RSNA) 1993 Digital Imaging and\n");
+        resultado += wxT(" *  Communications in Medicine (DICOM) Demonstration.\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *  THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER OFFIS,\n");
+        resultado += wxT(" *  OLDENBURG UNIVERSITY NOR CERIUM MAKE ANY WARRANTY REGARDING\n");
+        resultado += wxT(" *  THE SOFTWARE, ITS PERFORMANCE, ITS MERCHANTABILITY OR\n");
+        resultado += wxT(" *  FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER\n");
+        resultado += wxT(" *  DISEASES OR ITS CONFORMITY TO ANY SPECIFICATION.  THE\n");
+        resultado += wxT(" *  ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF THE SOFTWARE\n");
+        resultado += wxT(" *  IS WITH THE USER.\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *  Copyright of the software and supporting documentation\n");
+        resultado += wxT(" *  is, unless otherwise stated, jointly owned by OFFIS,\n");
+        resultado += wxT(" *  Oldenburg University and CERIUM and free access is hereby\n");
+        resultado += wxT(" *  granted as a license to use this software, copy this\n");
+        resultado += wxT(" *  software and prepare derivative works based upon this\n");
+        resultado += wxT(" *  software. However, any distribution of this software\n");
+        resultado += wxT(" *  source code or supporting documentation or derivative\n");
+        resultado += wxT(" *  works (source code and supporting documentation) must\n");
+        resultado += wxT(" *  include the three paragraphs of this copyright notice.\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" */ \n");
+        resultado += wxT("\n");
+        resultado += wxT("Some other parts of this software within the dcmtk/dcmnet\n");
+        resultado += wxT("sub-package related to the DICOM Upper Layer Protocol are\n");
+        resultado += wxT("derived from software developed for the RSNA'93 DICOM\n");
+        resultado += wxT("demonstration and kindly made available to us by the Mallinckrodt\n");
+        resultado += wxT("Institute of Radiology.  Such software can be identifed by the\n");
+        resultado += wxT("following copyright notice located in each affected source file:\n");
+        resultado += wxT("\n");
+        resultado += wxT("/*\n");
+        resultado += wxT(" *  Copyright (C) 1993, RSNA and Washington University\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  The software and supporting documentation for the Radiological\n");
+        resultado += wxT(" *  Society of North America (RSNA) 1993 Digital Imaging and\n");
+        resultado += wxT(" *  Communications in Medicine (DICOM) Demonstration were developed\n");
+        resultado += wxT(" *  at the\n");
+        resultado += wxT(" *          Electronic Radiology Laboratory\n");
+        resultado += wxT(" *          Mallinckrodt Institute of Radiology\n");
+        resultado += wxT(" *          Washington University School of Medicine\n");
+        resultado += wxT(" *          510 S. Kingshighway Blvd.\n");
+        resultado += wxT(" *          St. Louis, MO 63110\n");
+        resultado += wxT(" *  as part of the 1993 DICOM Central Test Node project for, and\n");
+        resultado += wxT(" *  under contract with, the Radiological Society of North America.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  THIS SOFTWARE IS MADE AVAILABLE, AS IS, AND NEITHER RSNA NOR\n");
+        resultado += wxT(" *  WASHINGTON UNIVERSITY MAKE ANY WARRANTY ABOUT THE SOFTWARE, ITS\n");
+        resultado += wxT(" *  PERFORMANCE, ITS MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR\n");
+        resultado += wxT(" *  USE, FREEDOM FROM ANY COMPUTER DISEASES OR ITS CONFORMITY TO ANY\n");
+        resultado += wxT(" *  SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND PERFORMANCE OF\n");
+        resultado += wxT(" *  THE SOFTWARE IS WITH THE USER.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  Copyright of the software and supporting documentation is\n");
+        resultado += wxT(" *  jointly owned by RSNA and Washington University, and free access\n");
+        resultado += wxT(" *  is hereby granted as a license to use this software, copy this\n");
+        resultado += wxT(" *  software and prepare derivative works based upon this software.\n");
+        resultado += wxT(" *  However, any distribution of this software source code or\n");
+        resultado += wxT(" *  supporting documentation or derivative works (source code and\n");
+        resultado += wxT(" *  supporting documentation) must include the three paragraphs of\n");
+        resultado += wxT(" *  the copyright notice.\n");
+        resultado += wxT(" */\n");
+        resultado += wxT("\n");
+        resultado += wxT("The dcmjpeg sub-package includes an adapted version of the Independent JPEG\n");
+        resultado += wxT("Group Toolkit Version 6b, which is contained in dcmjpeg/libijg8,\n");
+        resultado += wxT("dcmjpeg/libijg12 and dcmjpeg/libijg16.  This toolkit is covered by the\n");
+        resultado += wxT("following copyright.  The original README file for the Independent JPEG\n");
+        resultado += wxT("Group Toolkit is located in dcmjpeg/docs/ijg_readme.txt.\n");
+        resultado += wxT("\n");
+        resultado += wxT("/*\n");
+        resultado += wxT(" *  The authors make NO WARRANTY or representation, either express or implied,\n");
+        resultado += wxT(" *  with respect to this software, its quality, accuracy, merchantability, or\n");
+        resultado += wxT(" *  fitness for a particular purpose.  This software is provided \"AS IS\", and you,\n");
+        resultado += wxT(" *  its user, assume the entire risk as to its quality and accuracy.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  This software is copyright (C) 1991-1998, Thomas G. Lane.\n");
+        resultado += wxT(" *  All Rights Reserved except as specified below.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  Permission is hereby granted to use, copy, modify, and distribute this\n");
+        resultado += wxT(" *  software (or portions thereof) for any purpose, without fee, subject to these\n");
+        resultado += wxT(" *  conditions:\n");
+        resultado += wxT(" *  (1) If any part of the source code for this software is distributed, then this\n");
+        resultado += wxT(" *  README file must be included, with this copyright and no-warranty notice\n");
+        resultado += wxT(" *  unaltered; and any additions, deletions, or changes to the original files\n");
+        resultado += wxT(" *  must be clearly indicated in accompanying documentation.\n");
+        resultado += wxT(" *  (2) If only executable code is distributed, then the accompanying\n");
+        resultado += wxT(" *  documentation must state that \"this software is based in part on the work of\n");
+        resultado += wxT(" *  the Independent JPEG Group\".\n");
+        resultado += wxT(" *  (3) Permission for use of this software is granted only if the user accepts\n");
+        resultado += wxT(" *  full responsibility for any undesirable consequences; the authors accept\n");
+        resultado += wxT(" *  NO LIABILITY for damages of any kind.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  These conditions apply to any software derived from or based on the IJG code,\n");
+        resultado += wxT(" *  not just to the unmodified library.  If you use our work, you ought to\n");
+        resultado += wxT(" *  acknowledge us.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  Permission is NOT granted for the use of any IJG author's name or company name\n");
+        resultado += wxT(" *  in advertising or publicity relating to this software or products derived from\n");
+        resultado += wxT(" *  it.  This software may be referred to only as \"the Independent JPEG Group's\n");
+        resultado += wxT(" *  software\".\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  We specifically permit and encourage the use of this software as the basis of\n");
+        resultado += wxT(" *  commercial products, provided that all warranty or liability claims are\n");
+        resultado += wxT(" *  assumed by the product vendor.\n");
+        resultado += wxT(" */\n");
+        resultado += wxT("\n");
+        resultado += wxT("\n");
+        resultado += wxT("The color quantization code in module dcmimage (dcmquant and the related\n");
+        resultado += wxT("classes) is derived from code written by Jef Poskanzer for the NetPBM\n");
+        resultado += wxT("toolkit which has the following copyright:\n");
+        resultado += wxT("\n");
+        resultado += wxT("/*\n");
+        resultado += wxT(" * Copyright (C) 1989, 1991 by Jef Poskanzer.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" * Permission to use, copy, modify, and distribute this software and its\n");
+        resultado += wxT(" * documentation for any purpose and without fee is hereby granted, provided\n");
+        resultado += wxT(" * that the above copyright notice appear in all copies and that both that\n");
+        resultado += wxT(" * copyright notice and this permission notice appear in supporting\n");
+        resultado += wxT(" * documentation.  This software is provided \"as is\" without express or\n");
+        resultado += wxT(" * implied warranty.\n");
+        resultado += wxT(" */\n");
+        resultado += wxT("\n");
+        resultado += wxT("\n");
+        resultado += wxT("The code for the OFStandard::strlcpy and OFStandard::strlcat helper\n");
+        resultado += wxT("functions in ofstd/libsrc/ofstd.cc has been derived from the BSD\n");
+        resultado += wxT("implementation of strlcpy() and strlcat() and which carries the\n");
+        resultado += wxT("following copyright notice:\n");
+        resultado += wxT("\n");
+        resultado += wxT("/*\n");
+        resultado += wxT(" *  Copyright (c) 1998 Todd C. Miller <Todd.Miller(at)courtesan.com>\n");
+        resultado += wxT(" *  All rights reserved.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  Redistribution and use in source and binary forms, with or without\n");
+        resultado += wxT(" *  modification, are permitted provided that the following conditions\n");
+        resultado += wxT(" *  are met:\n");
+        resultado += wxT(" *  1. Redistributions of source code must retain the above copyright\n");
+        resultado += wxT(" *     notice, this list of conditions and the following disclaimer.\n");
+        resultado += wxT(" *  2. Redistributions in binary form must reproduce the above copyright\n");
+        resultado += wxT(" *     notice, this list of conditions and the following disclaimer in the\n");
+        resultado += wxT(" *     documentation and/or other materials provided with the distribution.\n");
+        resultado += wxT(" *  3. The name of the author may not be used to endorse or promote products\n");
+        resultado += wxT(" *     derived from this software without specific prior written permission.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,\n");
+        resultado += wxT(" *  INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY\n");
+        resultado += wxT(" *  AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL\n");
+        resultado += wxT(" *  THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\n");
+        resultado += wxT(" *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,\n");
+        resultado += wxT(" *  PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;\n");
+        resultado += wxT(" *  OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,\n");
+        resultado += wxT(" *  WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR\n");
+        resultado += wxT(" *  OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF\n");
+        resultado += wxT(" *  ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n");
+        resultado += wxT(" */\n");
+        resultado += wxT("\n");
+        resultado += wxT("\n");
+        resultado += wxT("The code for the OFStandard::atof helper function in\n");
+        resultado += wxT("ofstd/libsrc/ofstd.cc has been derived from an implementation which\n");
+        resultado += wxT("carries the following copyright notice:\n");
+        resultado += wxT("\n");
+        resultado += wxT("/*\n");
+        resultado += wxT(" *  Copyright 1988 Regents of the University of California\n");
+        resultado += wxT(" *  Permission to use, copy, modify, and distribute this software and\n");
+        resultado += wxT(" *  its documentation for any purpose and without fee is hereby granted,\n");
+        resultado += wxT(" *  provided that the above copyright notice appear in all copies.  The\n");
+        resultado += wxT(" *  University of California makes no representations about the\n");
+        resultado += wxT(" *  suitability of this software for any purpose.  It is provided \"as\n");
+        resultado += wxT(" *  is\" without express or implied warranty.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  The code for OFStandard::ftoa has been derived\n");
+        resultado += wxT(" *  from an implementation which carries the following copyright notice:\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  Copyright (c) 1988 Regents of the University of California.\n");
+        resultado += wxT(" *  All rights reserved.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  Redistribution and use in source and binary forms are permitted\n");
+        resultado += wxT(" *  provided that the above copyright notice and this paragraph are\n");
+        resultado += wxT(" *  duplicated in all such forms and that any documentation,\n");
+        resultado += wxT(" *  advertising materials, and other materials related to such\n");
+        resultado += wxT(" *  distribution and use acknowledge that the software was developed\n");
+        resultado += wxT(" *  by the University of California, Berkeley.  The name of the\n");
+        resultado += wxT(" *  University may not be used to endorse or promote products derived\n");
+        resultado += wxT(" *  from this software without specific prior written permission.\n");
+        resultado += wxT(" *  THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR\n");
+        resultado += wxT(" *  IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED\n");
+        resultado += wxT(" *  WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.\n");
+        resultado += wxT(" */\n");
+        resultado += wxT("\n");
+        resultado += wxT("The \"Base64\" encoder/decoder in ofstd/libsrc/ofstd.cc has been derived\n");
+        resultado += wxT("from an implementation which carries the following copyright notice:\n");
+        resultado += wxT("\n");
+        resultado += wxT("/*\n");
+        resultado += wxT(" *  Copyright (c) 1999, Bob Withers - bwit(at)pobox.com\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" *  This code may be freely used for any purpose, either personal or commercial,\n");
+        resultado += wxT(" *  provided the authors copyright notice remains intact.\n");
+        resultado += wxT(" */\n");
+        resultado += wxT("\n");
+        resultado += wxT("The dcmjp2k sub-package (which is currently not part of the free \n");
+        resultado += wxT("toolkit) includes an adapted version of the JasPer JPEG 2000 toolkit, \n");
+        resultado += wxT("which is contained in dcmjp2k/libjaspr. This toolkit is covered by \n");
+        resultado += wxT("the following copyright.\n");
+        resultado += wxT("\n");
+        resultado += wxT("/*  JasPer License Version 2.0\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *  Copyright (c) 1999-2000 Image Power, Inc.\n");
+        resultado += wxT(" *  Copyright (c) 1999-2000 The University of British Columbia\n");
+        resultado += wxT(" *  Copyright (c) 2001-2003 Michael David Adams\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *  All rights reserved.\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *  Permission is hereby granted, free of charge, to any person (the\n");
+        resultado += wxT(" *  \"User\") obtaining a copy of this software and associated documentation\n");
+        resultado += wxT(" *  files (the \"Software\"), to deal in the Software without restriction,\n");
+        resultado += wxT(" *  including without limitation the rights to use, copy, modify, merge,\n");
+        resultado += wxT(" *  publish, distribute, and/or sell copies of the Software, and to permit\n");
+        resultado += wxT(" *  persons to whom the Software is furnished to do so, subject to the\n");
+        resultado += wxT(" *  following conditions:\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *  1.  The above copyright notices and this permission notice (which\n");
+        resultado += wxT(" *  includes the disclaimer below) shall be included in all copies or\n");
+        resultado += wxT(" *  substantial portions of the Software.\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *  2.  The name of a copyright holder shall not be used to endorse or\n");
+        resultado += wxT(" *  promote products derived from the Software without specific prior\n");
+        resultado += wxT(" *  written permission.\n");
+        resultado += wxT(" *  \n");
+        resultado += wxT(" *  THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS\n");
+        resultado += wxT(" *  LICENSE.  NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER\n");
+        resultado += wxT(" *  THIS DISCLAIMER.  THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS\n");
+        resultado += wxT(" *  \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING\n");
+        resultado += wxT(" *  BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A\n");
+        resultado += wxT(" *  PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.  IN NO\n");
+        resultado += wxT(" *  EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL\n");
+        resultado += wxT(" *  INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING\n");
+        resultado += wxT(" *  FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,\n");
+        resultado += wxT(" *  NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION\n");
+        resultado += wxT(" *  WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.  NO ASSURANCES ARE\n");
+        resultado += wxT(" *  PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE\n");
+        resultado += wxT(" *  THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY.\n");
+        resultado += wxT(" *  EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS\n");
+        resultado += wxT(" *  BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL\n");
+        resultado += wxT(" *  PROPERTY RIGHTS OR OTHERWISE.  AS A CONDITION TO EXERCISING THE RIGHTS\n");
+        resultado += wxT(" *  GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE\n");
+        resultado += wxT(" *  ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY.  THE SOFTWARE\n");
+        resultado += wxT(" *  IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL\n");
+        resultado += wxT(" *  SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES,\n");
+        resultado += wxT(" *  AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL\n");
+        resultado += wxT(" *  SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH\n");
+        resultado += wxT(" *  THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH,\n");
+        resultado += wxT(" *  PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE (\"HIGH\n");
+        resultado += wxT(" *  RISK ACTIVITIES\").  THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY\n");
+        resultado += wxT(" *  EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES.\n");
+        resultado += wxT(" */ \n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::EscribeLicenciaFamFam()
+{
+        EscribeTitulo(wxT("FamFamFam icons\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("Silk icon set 1.3\n");
+        resultado += wxT("\n");
+        resultado += wxT("_________________________________________\n");
+        resultado += wxT("Mark James\n");
+        resultado += wxT("http://www.famfamfam.com/lab/icons/silk/\n");
+        resultado += wxT("_________________________________________\n");
+        resultado += wxT("Creative Commons\n");
+        resultado += wxT("\n");
+        resultado += wxT("Attribution 2.5\n");
+        resultado += wxT("\n");
+        resultado += wxT("CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN \"AS-IS\" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE.\n");
+        resultado += wxT("License\n");
+        resultado += wxT("\n");
+        resultado += wxT("THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE (\"CCPL\" OR \"LICENSE\"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.\n");
+        resultado += wxT("\n");
+        resultado += wxT("BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.\n");
+        resultado += wxT("\n");
+        resultado += wxT("1. Definitions\n");
+        resultado += wxT("\n");
+        resultado += wxT("\"Collective Work\" means a work, such as a periodical issue, anthology or encyclopedia, in which the Work in its entirety in unmodified form, along with a number of other contributions, constituting separate and independent works in themselves, are assembled into a collective whole. A work that constitutes a Collective Work will not be considered a Derivative Work (as defined below) for the purposes of this License.\n");
+        resultado += wxT("\"Derivative Work\" means a work based upon the Work or upon the Work and other pre-existing works, such as a translation, musical arrangement, dramatization, fictionalization, motion picture version, sound recording, art reproduction, abridgment, condensation, or any other form in which the Work may be recast, transformed, or adapted, except that a work that constitutes a Collective Work will not be considered a Derivative Work for the purpose of this License.  [...]
+        resultado += wxT("\"Licensor\" means the individual or entity that offers the Work under the terms of this License.\n");
+        resultado += wxT("\"Original Author\" means the individual or entity who created the Work.\n");
+        resultado += wxT("\"Work\" means the copyrightable work of authorship offered under the terms of this License.\n");
+        resultado += wxT("\"You\" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.\n");
+        resultado += wxT("2. Fair Use Rights. Nothing in this license is intended to reduce, limit, or restrict any rights arising from fair use, first sale or other limitations on the exclusive rights of the copyright owner under copyright law or other applicable laws.\n");
+        resultado += wxT("\n");
+        resultado += wxT("3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:\n");
+        resultado += wxT("\n");
+        resultado += wxT("to reproduce the Work, to incorporate the Work into one or more Collective Works, and to reproduce the Work as incorporated in the Collective Works;\n");
+        resultado += wxT("to create and reproduce Derivative Works;\n");
+        resultado += wxT("to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission the Work including as incorporated in Collective Works;\n");
+        resultado += wxT("to distribute copies or phonorecords of, display publicly, perform publicly, and perform publicly by means of a digital audio transmission Derivative Works.\n");
+        resultado += wxT("For the avoidance of doubt, where the work is a musical composition:\n");
+        resultado += wxT("\n");
+        resultado += wxT("Performance Royalties Under Blanket Licenses. Licensor waives the exclusive right to collect, whether individually or via a performance rights society (e.g. ASCAP, BMI, SESAC), royalties for the public performance or public digital performance (e.g. webcast) of the Work.\n");
+        resultado += wxT("Mechanical Rights and Statutory Royalties. Licensor waives the exclusive right to collect, whether individually or via a music rights agency or designated agent (e.g. Harry Fox Agency), royalties for any phonorecord You create from the Work (\"cover version\") and distribute, subject to the compulsory license created by 17 USC Section 115 of the US Copyright Act (or the equivalent in other jurisdictions).\n");
+        resultado += wxT("Webcasting Rights and Statutory Royalties. For the avoidance of doubt, where the Work is a sound recording, Licensor waives the exclusive right to collect, whether individually or via a performance-rights society (e.g. SoundExchange), royalties for the public digital performance (e.g. webcast) of the Work, subject to the compulsory license created by 17 USC Section 114 of the US Copyright Act (or the equivalent in other jurisdictions).\n");
+        resultado += wxT("The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. All rights not expressly granted by Licensor are hereby reserved.\n");
+        resultado += wxT("\n");
+        resultado += wxT("4. Restrictions.The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:\n");
+        resultado += wxT("\n");
+        resultado += wxT("You may distribute, publicly display, publicly perform, or publicly digitally perform the Work only under the terms of this License, and You must include a copy of, or the Uniform Resource Identifier for, this License with every copy or phonorecord of the Work You distribute, publicly display, publicly perform, or publicly digitally perform. You may not offer or impose any terms on the Work that alter or restrict the terms of this License or the recipients' exer [...]
+        resultado += wxT("If you distribute, publicly display, publicly perform, or publicly digitally perform the Work or any Derivative Works or Collective Works, You must keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or (ii) if the Original Author and/or Licensor designate another party or parties (e.g. a sponsor institute, publishing en [...]
+        resultado += wxT("5. Representations, Warranties and Disclaimer\n");
+        resultado += wxT("\n");
+        resultado += wxT("UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICT [...]
+        resultado += wxT("\n");
+        resultado += wxT("6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n");
+        resultado += wxT("\n");
+        resultado += wxT("7. Termination\n");
+        resultado += wxT("\n");
+        resultado += wxT("This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Derivative Works or Collective Works from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.\n");
+        resultado += wxT("Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of this Li [...]
+        resultado += wxT("8. Miscellaneous\n");
+        resultado += wxT("\n");
+        resultado += wxT("Each time You distribute or publicly digitally perform the Work or a Collective Work, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.\n");
+        resultado += wxT("Each time You distribute or publicly digitally perform a Derivative Work, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.\n");
+        resultado += wxT("If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\n");
+        resultado += wxT("No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.\n");
+        resultado += wxT("This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.\n");
+        resultado += wxT("Creative Commons is not a party to this License, and makes no warranty whatsoever in connection with the Work. Creative Commons will not be liable to You or any party on any legal theory for any damages whatsoever, including without limitation any general, special, incidental or consequential damages arising in connection to this license. Notwithstanding the foregoing two (2) sentences, if Creative Commons has expressly identified itself as the Licensor hereunde [...]
+        resultado += wxT("\n");
+        resultado += wxT("Except for the limited purpose of indicating to the public that the Work is licensed under the CCPL, neither party will use the trademark \"Creative Commons\" or any related trademark or logo of Creative Commons without the prior written consent of Creative Commons. Any permitted use will be in compliance with Creative Commons' then-current trademark usage guidelines, as may be published on its website or otherwise made available upon request from time to time.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Creative Commons may be contacted at http://creativecommons.org/.\n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::EscribeLicenciaFugue()
+{
+        EscribeTitulo(wxT("Fugue icons\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("_________________________________________\n");
+        resultado += wxT("Yusuke Kamiyamane\n");
+        resultado += wxT("http://p.yusukekamiyamane.com/\n");
+        resultado += wxT("_________________________________________\n");
+        resultado += wxT("\n");
+        resultado += wxT("CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS INFORMATION ON AN \"AS-IS\" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR DAMAGES RESULTING FROM ITS USE. ");
+        resultado += wxT("\n");
+        resultado += wxT("License\n");
+        resultado += wxT("\n");
+        resultado += wxT("THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE COMMONS PUBLIC LICENSE (\"CCPL\" OR \"LICENSE\"). THE WORK IS PROTECTED BY COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.\n");
+        resultado += wxT("\n");
+        resultado += wxT("BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND CONDITIONS.\n");
+        resultado += wxT("\n");
+        resultado += wxT("1. Definitions\n");
+        resultado += wxT("\n");
+        resultado += wxT("   1. \"Adaptation\" means a work based upon the Work, or upon the Work and other pre-existing works, such as a translation, adaptation, derivative work, arrangement of music or other alterations of a literary or artistic work, or phonogram or performance and includes cinematographic adaptations or any other form in which the Work may be recast, transformed, or adapted including in any form recognizably derived from the original, except that a work that constitu [...]
+        resultado += wxT("   2. \"Collection\" means a collection of literary or artistic works, such as encyclopedias and anthologies, or performances, phonograms or broadcasts, or other works or subject matter other than works listed in Section 1(f) below, which, by reason of the selection and arrangement of their contents, constitute intellectual creations, in which the Work is included in its entirety in unmodified form along with one or more other contributions, each constituting se [...]
+        resultado += wxT("   3. \"Distribute\" means to make available to the public the original and copies of the Work or Adaptation, as appropriate, through sale or other transfer of ownership.\n");
+        resultado += wxT("   4. \"Licensor\" means the individual, individuals, entity or entities that offer(s) the Work under the terms of this License.\n");
+        resultado += wxT("   5. \"Original Author\" means, in the case of a literary or artistic work, the individual, individuals, entity or entities who created the Work or if no individual or entity can be identified, the publisher; and in addition (i) in the case of a performance the actors, singers, musicians, dancers, and other persons who act, sing, deliver, declaim, play in, interpret or otherwise perform literary or artistic works or expressions of folklore; (ii) in the case of  [...]
+        resultado += wxT("   6. \"Work\" means the literary and/or artistic work offered under the terms of this License including without limitation any production in the literary, scientific and artistic domain, whatever may be the mode or form of its expression including digital form, such as a book, pamphlet and other writing; a lecture, address, sermon or other work of the same nature; a dramatic or dramatico-musical work; a choreographic work or entertainment in dumb show; a musica [...]
+        resultado += wxT("   7. \"You\" means an individual or entity exercising rights under this License who has not previously violated the terms of this License with respect to the Work, or who has received express permission from the Licensor to exercise rights under this License despite a previous violation.\n");
+        resultado += wxT("   8. \"Publicly Perform\" means to perform public recitations of the Work and to communicate to the public those public recitations, by any means or process, including by wire or wireless means or public digital performances; to make available to the public Works in such a way that members of the public may access these Works from a place and at a place individually chosen by them; to perform the Work to the public by any means or process and the communication  [...]
+        resultado += wxT("   9. \"Reproduce\" means to make copies of the Work by any means including without limitation by sound or visual recordings and the right of fixation and reproducing fixations of the Work, including storage of a protected performance or phonogram in digital form or other electronic medium.\n");
+        resultado += wxT("\n");
+        resultado += wxT("2. Fair Dealing Rights. Nothing in this License is intended to reduce, limit, or restrict any uses free from copyright or rights arising from limitations or exceptions that are provided for in connection with the copyright protection under copyright law or other applicable laws.\n");
+        resultado += wxT("\n");
+        resultado += wxT("3. License Grant. Subject to the terms and conditions of this License, Licensor hereby grants You a worldwide, royalty-free, non-exclusive, perpetual (for the duration of the applicable copyright) license to exercise the rights in the Work as stated below:\n");
+        resultado += wxT("\n");
+        resultado += wxT("   1. to Reproduce the Work, to incorporate the Work into one or more Collections, and to Reproduce the Work as incorporated in the Collections;\n");
+        resultado += wxT("   2. to create and Reproduce Adaptations provided that any such Adaptation, including any translation in any medium, takes reasonable steps to clearly label, demarcate or otherwise identify that changes were made to the original Work. For example, a translation could be marked \"The original work was translated from English to Spanish,\" or a modification could indicate \"The original work has been modified.\";\n");
+        resultado += wxT("   3. to Distribute and Publicly Perform the Work including as incorporated in Collections; and,\n");
+        resultado += wxT("   4. to Distribute and Publicly Perform Adaptations.\n");
+        resultado += wxT("   5.\n");
+        resultado += wxT("\n");
+        resultado += wxT("      For the avoidance of doubt:\n");
+        resultado += wxT("         1. Non-waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme cannot be waived, the Licensor reserves the exclusive right to collect such royalties for any exercise by You of the rights granted under this License;\n");
+        resultado += wxT("         2. Waivable Compulsory License Schemes. In those jurisdictions in which the right to collect royalties through any statutory or compulsory licensing scheme can be waived, the Licensor waives the exclusive right to collect such royalties for any exercise by You of the rights granted under this License; and,\n");
+        resultado += wxT("         3. Voluntary License Schemes. The Licensor waives the right to collect royalties, whether individually or, in the event that the Licensor is a member of a collecting society that administers voluntary licensing schemes, via that society, from any exercise by You of the rights granted under this License.\n");
+        resultado += wxT("\n");
+        resultado += wxT("The above rights may be exercised in all media and formats whether now known or hereafter devised. The above rights include the right to make such modifications as are technically necessary to exercise the rights in other media and formats. Subject to Section 8(f), all rights not expressly granted by Licensor are hereby reserved.\n");
+        resultado += wxT("\n");
+        resultado += wxT("4. Restrictions. The license granted in Section 3 above is expressly made subject to and limited by the following restrictions:\n");
+        resultado += wxT("\n");
+        resultado += wxT("   1. You may Distribute or Publicly Perform the Work only under the terms of this License. You must include a copy of, or the Uniform Resource Identifier (URI) for, this License with every copy of the Work You Distribute or Publicly Perform. You may not offer or impose any terms on the Work that restrict the terms of this License or the ability of the recipient of the Work to exercise the rights granted to that recipient under the terms of the License. You may  [...]
+        resultado += wxT("   2. If You Distribute, or Publicly Perform the Work or any Adaptations or Collections, You must, unless a request has been made pursuant to Section 4(a), keep intact all copyright notices for the Work and provide, reasonable to the medium or means You are utilizing: (i) the name of the Original Author (or pseudonym, if applicable) if supplied, and/or if the Original Author and/or Licensor designate another party or parties (e.g., a sponsor institute, publishin [...]
+        resultado += wxT("   3. Except as otherwise agreed in writing by the Licensor or as may be otherwise permitted by applicable law, if You Reproduce, Distribute or Publicly Perform the Work either by itself or as part of any Adaptations or Collections, You must not distort, mutilate, modify or take other derogatory action in relation to the Work which would be prejudicial to the Original Author's honor or reputation. Licensor agrees that in those jurisdictions (e.g. Japan), in whic [...]
+        resultado += wxT("\n");
+        resultado += wxT("5. Representations, Warranties and Disclaimer\n");
+        resultado += wxT("\n");
+        resultado += wxT("UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY, FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS, WHETHER OR NOT DISCOVERABLE. SOME JURISDICT [...]
+        resultado += wxT("\n");
+        resultado += wxT("6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.\n");
+        resultado += wxT("\n");
+        resultado += wxT("7. Termination\n");
+        resultado += wxT("\n");
+        resultado += wxT("   1. This License and the rights granted hereunder will terminate automatically upon any breach by You of the terms of this License. Individuals or entities who have received Adaptations or Collections from You under this License, however, will not have their licenses terminated provided such individuals or entities remain in full compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will survive any termination of this License.\n");
+        resultado += wxT("   2. Subject to the above terms and conditions, the license granted here is perpetual (for the duration of the applicable copyright in the Work). Notwithstanding the above, Licensor reserves the right to release the Work under different license terms or to stop distributing the Work at any time; provided, however that any such election will not serve to withdraw this License (or any other license that has been, or is required to be, granted under the terms of t [...]
+        resultado += wxT("\n");
+        resultado += wxT("8. Miscellaneous\n");
+        resultado += wxT("\n");
+        resultado += wxT("   1. Each time You Distribute or Publicly Perform the Work or a Collection, the Licensor offers to the recipient a license to the Work on the same terms and conditions as the license granted to You under this License.\n");
+        resultado += wxT("   2. Each time You Distribute or Publicly Perform an Adaptation, Licensor offers to the recipient a license to the original Work on the same terms and conditions as the license granted to You under this License.\n");
+        resultado += wxT("   3. If any provision of this License is invalid or unenforceable under applicable law, it shall not affect the validity or enforceability of the remainder of the terms of this License, and without further action by the parties to this agreement, such provision shall be reformed to the minimum extent necessary to make such provision valid and enforceable.\n");
+        resultado += wxT("   4. No term or provision of this License shall be deemed waived and no breach consented to unless such waiver or consent shall be in writing and signed by the party to be charged with such waiver or consent.\n");
+        resultado += wxT("   5. This License constitutes the entire agreement between the parties with respect to the Work licensed here. There are no understandings, agreements or representations with respect to the Work not specified here. Licensor shall not be bound by any additional provisions that may appear in any communication from You. This License may not be modified without the mutual written agreement of the Licensor and You.\n");
+        resultado += wxT("   6. The rights granted under, and the subject matter referenced, in this License were drafted utilizing the terminology of the Berne Convention for the Protection of Literary and Artistic Works (as amended on September 28, 1979), the Rome Convention of 1961, the WIPO Copyright Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996 and the Universal Copyright Convention (as revised on July 24, 1971). These rights and subject matter take effect in t [...]
+        resultado += wxT("\n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::EscribeLicenciaITK()
+{
+        EscribeTitulo(wxT("ITK\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("The license of the Insight Toolkit is an open-source BSD license. It allows unrestricted use, including use in commercial products. (The only exceptions are software modules found in the patented software directory.)\n");
+        resultado += wxT("\n");
+        resultado += wxT("Starting with ITK 3.6, The Insight Toolkit is distributed under the new and simplified BSD license approved by the Open Source Initiative(OSI). The complete license is shown below.\n");
+        resultado += wxT("/*=========================================================================\n");
+        resultado += wxT("Copyright (c) 1999-2008 Insight Software Consortium All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n");
+        resultado += wxT("* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n");
+        resultado += wxT("* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n");
+        resultado += wxT("* Neither the name of the Insight Software Consortium nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n");
+        resultado += wxT("THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. ");
+        resultado += wxT("IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, ");
+        resultado += wxT("OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n");
+        resultado += wxT("=========================================================================*\n");
+        resultado += wxT("\n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::EscribeLicencialibjpeg()
+{
+        EscribeTitulo(wxT("LibJpeg\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("In plain English:\n");
+        resultado += wxT("\n");
+        resultado += wxT("1. We don't promise that this software works.  (But if you find any bugs,\n");
+        resultado += wxT("   please let us know!)\n");
+        resultado += wxT("2. You can use this software for whatever you want.  You don't have to pay us.\n");
+        resultado += wxT("3. You may not pretend that you wrote this software.  If you use it in a\n");
+        resultado += wxT("   program, you must acknowledge somewhere in your documentation that\n");
+        resultado += wxT("   you've used the IJG code.\n");
+        resultado += wxT("\n");
+        resultado += wxT("In legalese:\n");
+        resultado += wxT("\n");
+        resultado += wxT("The authors make NO WARRANTY or representation, either express or implied,\n");
+        resultado += wxT("with respect to this software, its quality, accuracy, merchantability, or\n");
+        resultado += wxT("fitness for a particular purpose.  This software is provided \"AS IS\", and you,\n");
+        resultado += wxT("its user, assume the entire risk as to its quality and accuracy.\n");
+        resultado += wxT("\n");
+        resultado += wxT("This software is copyright (C) 1991-2009, Thomas G. Lane, Guido Vollbeding.\n");
+        resultado += wxT("All Rights Reserved except as specified below.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Permission is hereby granted to use, copy, modify, and distribute this\n");
+        resultado += wxT("software (or portions thereof) for any purpose, without fee, subject to these\n");
+        resultado += wxT("conditions:\n");
+        resultado += wxT("(1) If any part of the source code for this software is distributed, then this\n");
+        resultado += wxT("README file must be included, with this copyright and no-warranty notice\n");
+        resultado += wxT("unaltered; and any additions, deletions, or changes to the original files\n");
+        resultado += wxT("must be clearly indicated in accompanying documentation.\n");
+        resultado += wxT("(2) If only executable code is distributed, then the accompanying\n");
+        resultado += wxT("documentation must state that \"this software is based in part on the work of\n");
+        resultado += wxT("the Independent JPEG Group\".\n");
+        resultado += wxT("(3) Permission for use of this software is granted only if the user accepts\n");
+        resultado += wxT("full responsibility for any undesirable consequences; the authors accept\n");
+        resultado += wxT("NO LIABILITY for damages of any kind.\n");
+        resultado += wxT("\n");
+        resultado += wxT("These conditions apply to any software derived from or based on the IJG code,\n");
+        resultado += wxT("not just to the unmodified library.  If you use our work, you ought to\n");
+        resultado += wxT("acknowledge us.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Permission is NOT granted for the use of any IJG author's name or company name\n");
+        resultado += wxT("in advertising or publicity relating to this software or products derived from\n");
+        resultado += wxT("it.  This software may be referred to only as \"the Independent JPEG Group's\n");
+        resultado += wxT("software\".\n");
+        resultado += wxT("\n");
+        resultado += wxT("We specifically permit and encourage the use of this software as the basis of\n");
+        resultado += wxT("commercial products, provided that all warranty or liability claims are\n");
+        resultado += wxT("assumed by the product vendor.\n");
+        resultado += wxT("\n");
+        resultado += wxT("\n");
+        resultado += wxT("ansi2knr.c is included in this distribution by permission of L. Peter Deutsch,\n");
+        resultado += wxT("sole proprietor of its copyright holder, Aladdin Enterprises of Menlo Park, CA.\n");
+        resultado += wxT("ansi2knr.c is NOT covered by the above copyright and conditions, but instead\n");
+        resultado += wxT("by the usual distribution terms of the Free Software Foundation; principally,\n");
+        resultado += wxT("that you must include source code if you redistribute it.  (See the file\n");
+        resultado += wxT("ansi2knr.c for full details.)  However, since ansi2knr.c is not needed as part\n");
+        resultado += wxT("of any program generated from the IJG code, this does not limit you more than\n");
+        resultado += wxT("the foregoing paragraphs do.\n");
+        resultado += wxT("\n");
+        resultado += wxT("The Unix configuration script \"configure\" was produced with GNU Autoconf.\n");
+        resultado += wxT("It is copyright by the Free Software Foundation but is freely distributable.\n");
+        resultado += wxT("The same holds for its supporting scripts (config.guess, config.sub,\n");
+        resultado += wxT("ltmain.sh).  Another support script, install-sh, is copyright by X Consortium\n");
+        resultado += wxT("but is also freely distributable.\n");
+        resultado += wxT("\n");
+        resultado += wxT("The IJG distribution formerly included code to read and write GIF files.\n");
+        resultado += wxT("To avoid entanglement with the Unisys LZW patent, GIF reading support has\n");
+        resultado += wxT("been removed altogether, and the GIF writer has been simplified to produce\n");
+        resultado += wxT("\"uncompressed GIFs\".  This technique does not use the LZW algorithm; the\n");
+        resultado += wxT("resulting GIF files are larger than usual, but are readable by all standard\n");
+        resultado += wxT("GIF decoders.\n");
+        resultado += wxT("\n");
+        resultado += wxT("We are required to state that\n");
+        resultado += wxT("    \"The Graphics Interchange Format(c) is the Copyright property of\n");
+        resultado += wxT("    CompuServe Incorporated.  GIF(sm) is a Service Mark property of\n");
+        resultado += wxT("    CompuServe Incorporated.\"\n");
+        resultado += wxT("\n");
+        resultado += wxT("\n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::EscribeLicencialibpng()
+{
+        EscribeTitulo(wxT("Libpng\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("This copy of the libpng notices is provided for your convenience.  In case of\n");
+        resultado += wxT("any discrepancy between this copy and the notices in the file png.h that is\n");
+        resultado += wxT("included in the libpng distribution, the latter shall prevail.\n");
+        resultado += wxT("\n");
+        resultado += wxT("COPYRIGHT NOTICE, DISCLAIMER, and LICENSE:\n");
+        resultado += wxT("\n");
+        resultado += wxT("If you modify libpng you may insert additional notices immediately following\n");
+        resultado += wxT("this sentence.\n");
+        resultado += wxT("\n");
+        resultado += wxT("This code is released under the libpng license.\n");
+        resultado += wxT("\n");
+        resultado += wxT("libpng versions 1.2.6, August 15, 2004, through 1.2.40, September 10, 2009, are\n");
+        resultado += wxT("Copyright (c) 2004, 2006-2009 Glenn Randers-Pehrson, and are\n");
+        resultado += wxT("distributed according to the same disclaimer and license as libpng-1.2.5\n");
+        resultado += wxT("with the following individual added to the list of Contributing Authors\n");
+        resultado += wxT("\n");
+        resultado += wxT("   Cosmin Truta\n");
+        resultado += wxT("\n");
+        resultado += wxT("libpng versions 1.0.7, July 1, 2000, through 1.2.5 - October 3, 2002, are\n");
+        resultado += wxT("Copyright (c) 2000-2002 Glenn Randers-Pehrson, and are\n");
+        resultado += wxT("distributed according to the same disclaimer and license as libpng-1.0.6\n");
+        resultado += wxT("with the following individuals added to the list of Contributing Authors\n");
+        resultado += wxT("\n");
+        resultado += wxT("   Simon-Pierre Cadieux\n");
+        resultado += wxT("   Eric S. Raymond\n");
+        resultado += wxT("   Gilles Vollant\n");
+        resultado += wxT("\n");
+        resultado += wxT("and with the following additions to the disclaimer:\n");
+        resultado += wxT("\n");
+        resultado += wxT("   There is no warranty against interference with your enjoyment of the\n");
+        resultado += wxT("   library or against infringement.  There is no warranty that our\n");
+        resultado += wxT("   efforts or the library will fulfill any of your particular purposes\n");
+        resultado += wxT("   or needs.  This library is provided with all faults, and the entire\n");
+        resultado += wxT("   risk of satisfactory quality, performance, accuracy, and effort is with\n");
+        resultado += wxT("   the user.\n");
+        resultado += wxT("\n");
+        resultado += wxT("libpng versions 0.97, January 1998, through 1.0.6, March 20, 2000, are\n");
+        resultado += wxT("Copyright (c) 1998, 1999 Glenn Randers-Pehrson, and are\n");
+        resultado += wxT("distributed according to the same disclaimer and license as libpng-0.96,\n");
+        resultado += wxT("with the following individuals added to the list of Contributing Authors:\n");
+        resultado += wxT("\n");
+        resultado += wxT("   Tom Lane\n");
+        resultado += wxT("   Glenn Randers-Pehrson\n");
+        resultado += wxT("   Willem van Schaik\n");
+        resultado += wxT("\n");
+        resultado += wxT("libpng versions 0.89, June 1996, through 0.96, May 1997, are\n");
+        resultado += wxT("Copyright (c) 1996, 1997 Andreas Dilger\n");
+        resultado += wxT("Distributed according to the same disclaimer and license as libpng-0.88,\n");
+        resultado += wxT("with the following individuals added to the list of Contributing Authors:\n");
+        resultado += wxT("\n");
+        resultado += wxT("   John Bowler\n");
+        resultado += wxT("   Kevin Bracey\n");
+        resultado += wxT("   Sam Bushell\n");
+        resultado += wxT("   Magnus Holmgren\n");
+        resultado += wxT("   Greg Roelofs\n");
+        resultado += wxT("   Tom Tanner\n");
+        resultado += wxT("\n");
+        resultado += wxT("libpng versions 0.5, May 1995, through 0.88, January 1996, are\n");
+        resultado += wxT("Copyright (c) 1995, 1996 Guy Eric Schalnat, Group 42, Inc.\n");
+        resultado += wxT("\n");
+        resultado += wxT("For the purposes of this copyright and license, \"Contributing Authors\"\n");
+        resultado += wxT("is defined as the following set of individuals:\n");
+        resultado += wxT("\n");
+        resultado += wxT("   Andreas Dilger\n");
+        resultado += wxT("   Dave Martindale\n");
+        resultado += wxT("   Guy Eric Schalnat\n");
+        resultado += wxT("   Paul Schmidt\n");
+        resultado += wxT("   Tim Wegner\n");
+        resultado += wxT("\n");
+        resultado += wxT("The PNG Reference Library is supplied \"AS IS\".  The Contributing Authors\n");
+        resultado += wxT("and Group 42, Inc. disclaim all warranties, expressed or implied,\n");
+        resultado += wxT("including, without limitation, the warranties of merchantability and of\n");
+        resultado += wxT("fitness for any purpose.  The Contributing Authors and Group 42, Inc.\n");
+        resultado += wxT("assume no liability for direct, indirect, incidental, special, exemplary,\n");
+        resultado += wxT("or consequential damages, which may result from the use of the PNG\n");
+        resultado += wxT("Reference Library, even if advised of the possibility of such damage.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Permission is hereby granted to use, copy, modify, and distribute this\n");
+        resultado += wxT("source code, or portions hereof, for any purpose, without fee, subject\n");
+        resultado += wxT("to the following restrictions:\n");
+        resultado += wxT("\n");
+        resultado += wxT("1. The origin of this source code must not be misrepresented.\n");
+        resultado += wxT("\n");
+        resultado += wxT("2. Altered versions must be plainly marked as such and must not\n");
+        resultado += wxT("   be misrepresented as being the original source.\n");
+        resultado += wxT("\n");
+        resultado += wxT("3. This Copyright notice may not be removed or altered from any\n");
+        resultado += wxT("   source or altered source distribution.\n");
+        resultado += wxT("\n");
+        resultado += wxT("The Contributing Authors and Group 42, Inc. specifically permit, without\n");
+        resultado += wxT("fee, and encourage the use of this source code as a component to\n");
+        resultado += wxT("supporting the PNG file format in commercial products.  If you use this\n");
+        resultado += wxT("source code in a product, acknowledgment is not required but would be\n");
+        resultado += wxT("appreciated.\n");
+        resultado += wxT("\n");
+        resultado += wxT("\n");
+        resultado += wxT("A \"png_get_copyright\" function is available, for convenient use in \"about\"\n");
+        resultado += wxT("boxes and the like:\n");
+        resultado += wxT("\n");
+        resultado += wxT("   printf(\"%s\",png_get_copyright(NULL));\n");
+        resultado += wxT("\n");
+        resultado += wxT("Also, the PNG logo (in PNG format, of course) is supplied in the\n");
+        resultado += wxT("files \"pngbar.png\" and \"pngbar.jpg (88x31) and \"pngnow.png\" (98x31).\n");
+        resultado += wxT("\n");
+        resultado += wxT("Libpng is OSI Certified Open Source Software.  OSI Certified Open Source is a\n");
+        resultado += wxT("certification mark of the Open Source Initiative.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Glenn Randers-Pehrson\n");
+        resultado += wxT("glennrp at users.sourceforge.net\n");
+        resultado += wxT("September 10, 2009\n");
+        resultado += wxT("\n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::EscribeLicenciaOpenssl()
+{
+        EscribeTitulo(wxT("OpenSSL\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("/* ====================================================================\n");
+        resultado += wxT(" * Copyright (c) 1998-2008 The OpenSSL Project.  All rights reserved.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" * Redistribution and use in source and binary forms, with or without\n");
+        resultado += wxT(" * modification, are permitted provided that the following conditions\n");
+        resultado += wxT(" * are met:\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" * 1. Redistributions of source code must retain the above copyright\n");
+        resultado += wxT(" *    notice, this list of conditions and the following disclaimer. \n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" * 2. Redistributions in binary form must reproduce the above copyright\n");
+        resultado += wxT(" *    notice, this list of conditions and the following disclaimer in\n");
+        resultado += wxT(" *    the documentation and/or other materials provided with the\n");
+        resultado += wxT(" *    distribution.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" * 3. All advertising materials mentioning features or use of this\n");
+        resultado += wxT(" *    software must display the following acknowledgment:\n");
+        resultado += wxT(" *    \"This product includes software developed by the OpenSSL Project\n");
+        resultado += wxT(" *    for use in the OpenSSL Toolkit. (http://www.openssl.org/)\"\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" * 4. The names \"OpenSSL Toolkit\" and \"OpenSSL Project\" must not be used to\n");
+        resultado += wxT(" *    endorse or promote products derived from this software without\n");
+        resultado += wxT(" *    prior written permission. For written permission, please contact\n");
+        resultado += wxT(" *    openssl-core at openssl.org.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" * 5. Products derived from this software may not be called \"OpenSSL\"\n");
+        resultado += wxT(" *    nor may \"OpenSSL\" appear in their names without prior written\n");
+        resultado += wxT(" *    permission of the OpenSSL Project.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" * 6. Redistributions of any form whatsoever must retain the following\n");
+        resultado += wxT(" *    acknowledgment:\n");
+        resultado += wxT(" *    \"This product includes software developed by the OpenSSL Project\n");
+        resultado += wxT(" *    for use in the OpenSSL Toolkit (http://www.openssl.org/)\"\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" * THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY\n");
+        resultado += wxT(" * EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n");
+        resultado += wxT(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n");
+        resultado += wxT(" * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE OpenSSL PROJECT OR\n");
+        resultado += wxT(" * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,\n");
+        resultado += wxT(" * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT\n");
+        resultado += wxT(" * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n");
+        resultado += wxT(" * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n");
+        resultado += wxT(" * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,\n");
+        resultado += wxT(" * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n");
+        resultado += wxT(" * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED\n");
+        resultado += wxT(" * OF THE POSSIBILITY OF SUCH DAMAGE.\n");
+        resultado += wxT(" * ====================================================================\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" * This product includes cryptographic software written by Eric Young\n");
+        resultado += wxT(" * (eay at cryptsoft.com).  This product includes software written by Tim\n");
+        resultado += wxT(" * Hudson (tjh at cryptsoft.com).\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" */\n");
+        resultado += wxT("\n");
+        resultado += wxT(" Original SSLeay License\n");
+        resultado += wxT(" -----------------------\n");
+        resultado += wxT("\n");
+        resultado += wxT("/* Copyright (C) 1995-1998 Eric Young (eay at cryptsoft.com)\n");
+        resultado += wxT(" * All rights reserved.\n");
+        resultado += wxT(" *\n");
+        resultado += wxT(" * This package is an SSL implementation written\n");
+        resultado += wxT(" * by Eric Young (eay at cryptsoft.com).\n");
+        resultado += wxT(" * The implementation was written so as to conform with Netscapes SSL.\n");
+        resultado += wxT(" * \n");
+        resultado += wxT(" * This library is free for commercial and non-commercial use as long as\n");
+        resultado += wxT(" * the following conditions are aheared to.  The following conditions\n");
+        resultado += wxT(" * apply to all code found in this distribution, be it the RC4, RSA,\n");
+        resultado += wxT(" * lhash, DES, etc., code; not just the SSL code.  The SSL documentation\n");
+        resultado += wxT(" * included with this distribution is covered by the same copyright terms\n");
+        resultado += wxT(" * except that the holder is Tim Hudson (tjh at cryptsoft.com).\n");
+        resultado += wxT(" * \n");
+        resultado += wxT(" * Copyright remains Eric Young's, and as such any Copyright notices in\n");
+        resultado += wxT(" * the code are not to be removed.\n");
+        resultado += wxT(" * If this package is used in a product, Eric Young should be given attribution\n");
+        resultado += wxT(" * as the author of the parts of the library used.\n");
+        resultado += wxT(" * This can be in the form of a textual message at program startup or\n");
+        resultado += wxT(" * in documentation (online or textual) provided with the package.\n");
+        resultado += wxT(" * \n");
+        resultado += wxT(" * Redistribution and use in source and binary forms, with or without\n");
+        resultado += wxT(" * modification, are permitted provided that the following conditions\n");
+        resultado += wxT(" * are met:\n");
+        resultado += wxT(" * 1. Redistributions of source code must retain the copyright\n");
+        resultado += wxT(" *    notice, this list of conditions and the following disclaimer.\n");
+        resultado += wxT(" * 2. Redistributions in binary form must reproduce the above copyright\n");
+        resultado += wxT(" *    notice, this list of conditions and the following disclaimer in the\n");
+        resultado += wxT(" *    documentation and/or other materials provided with the distribution.\n");
+        resultado += wxT(" * 3. All advertising materials mentioning features or use of this software\n");
+        resultado += wxT(" *    must display the following acknowledgement:\n");
+        resultado += wxT(" *    \"This product includes cryptographic software written by\n");
+        resultado += wxT(" *     Eric Young (eay at cryptsoft.com)\"\n");
+        resultado += wxT(" *    The word 'cryptographic' can be left out if the rouines from the library\n");
+        resultado += wxT(" *    being used are not cryptographic related :-).\n");
+        resultado += wxT(" * 4. If you include any Windows specific code (or a derivative thereof) from \n");
+        resultado += wxT(" *    the apps directory (application code) you must include an acknowledgement:\n");
+        resultado += wxT(" *    \"This product includes software written by Tim Hudson (tjh at cryptsoft.com)\"\n");
+        resultado += wxT(" * \n");
+        resultado += wxT(" * THIS SOFTWARE IS PROVIDED BY ERIC YOUNG ``AS IS'' AND\n");
+        resultado += wxT(" * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n");
+        resultado += wxT(" * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n");
+        resultado += wxT(" * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE\n");
+        resultado += wxT(" * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\n");
+        resultado += wxT(" * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS\n");
+        resultado += wxT(" * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)\n");
+        resultado += wxT(" * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\n");
+        resultado += wxT(" * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY\n");
+        resultado += wxT(" * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF\n");
+        resultado += wxT(" * SUCH DAMAGE.\n");
+        resultado += wxT(" * \n");
+        resultado += wxT(" * The licence and distribution terms for any publically available version or\n");
+        resultado += wxT(" * derivative of this code cannot be changed.  i.e. this code cannot simply be\n");
+        resultado += wxT(" * copied and put under another distribution licence\n");
+        resultado += wxT(" * [including the GNU Public Licence.]\n");
+        resultado += wxT(" */\n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::EscribeLicenciaVTK()
+{
+        EscribeTitulo(wxT("VTK\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("VTK is an open-source toolkit licensed under the BSD license.\n");
+        resultado += wxT("Copyright (c) 1993-2008 Ken Martin, Will Schroeder, Bill Lorensen\n");
+        resultado += wxT("All rights reserved.\n");
+        resultado += wxT("Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:\n");
+        resultado += wxT("Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.\n");
+        resultado += wxT("Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.\n");
+        resultado += wxT("Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names of any contributors may be used to endorse or promote products derived from this software without specific prior written permission.\n");
+        resultado += wxT("THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF [...]
+        resultado += wxT("\n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::EscribeLicenciawxWidgets()
+{
+        EscribeTitulo(wxT("wxWidgets\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("                wxWindows Library Licence, Version 3.1\n");
+        resultado += wxT("                ======================================\n");
+        resultado += wxT("\n");
+        resultado += wxT("  Copyright (C) 1998-2005 Julian Smart, Robert Roebling et al\n");
+        resultado += wxT("\n");
+        resultado += wxT("  Everyone is permitted to copy and distribute verbatim copies\n");
+        resultado += wxT("  of this licence document, but changing it is not allowed.\n");
+        resultado += wxT("\n");
+        resultado += wxT("                       WXWINDOWS LIBRARY LICENCE\n");
+        resultado += wxT("     TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION\n");
+        resultado += wxT("  \n");
+        resultado += wxT("  This library is free software; you can redistribute it and/or modify it\n");
+        resultado += wxT("  under the terms of the GNU Library General Public Licence as published by\n");
+        resultado += wxT("  the Free Software Foundation; either version 2 of the Licence, or (at\n");
+        resultado += wxT("  your option) any later version.\n");
+        resultado += wxT("  \n");
+        resultado += wxT("  This library is distributed in the hope that it will be useful, but\n");
+        resultado += wxT("  WITHOUT ANY WARRANTY; without even the implied warranty of\n");
+        resultado += wxT("  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Library\n");
+        resultado += wxT("  General Public Licence for more details.\n");
+        resultado += wxT("\n");
+        resultado += wxT("  You should have received a copy of the GNU Library General Public Licence\n");
+        resultado += wxT("  along with this software, usually in a file named COPYING.LIB.  If not,\n");
+        resultado += wxT("  write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330,\n");
+        resultado += wxT("  Boston, MA 02111-1307 USA.\n");
+        resultado += wxT("\n");
+        resultado += wxT("  EXCEPTION NOTICE\n");
+        resultado += wxT("\n");
+        resultado += wxT("  1. As a special exception, the copyright holders of this library give\n");
+        resultado += wxT("  permission for additional uses of the text contained in this release of\n");
+        resultado += wxT("  the library as licenced under the wxWindows Library Licence, applying\n");
+        resultado += wxT("  either version 3.1 of the Licence, or (at your option) any later version of\n");
+        resultado += wxT("  the Licence as published by the copyright holders of version\n");
+        resultado += wxT("  3.1 of the Licence document.\n");
+        resultado += wxT("\n");
+        resultado += wxT("  2. The exception is that you may use, copy, link, modify and distribute\n");
+        resultado += wxT("  under your own terms, binary object code versions of works based\n");
+        resultado += wxT("  on the Library.\n");
+        resultado += wxT("\n");
+        resultado += wxT("  3. If you copy code from files distributed under the terms of the GNU\n");
+        resultado += wxT("  General Public Licence or the GNU Library General Public Licence into a\n");
+        resultado += wxT("  copy of this library, as this licence permits, the exception does not\n");
+        resultado += wxT("  apply to the code that you add in this way.  To avoid misleading anyone as\n");
+        resultado += wxT("  to the status of such modified files, you must delete this exception\n");
+        resultado += wxT("  notice from such code and/or adjust the licensing conditions notice\n");
+        resultado += wxT("  accordingly.\n");
+        resultado += wxT("\n");
+        resultado += wxT("  4. If you write modifications of your own for this library, it is your\n");
+        resultado += wxT("  choice whether to permit this exception to apply to your modifications. \n");
+        resultado += wxT("  If you do not wish that, you must delete the exception notice from such\n");
+        resultado += wxT("  code and/or adjust the licensing conditions notice accordingly.\n");
+        resultado += wxT("\n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::EscribeLicenciazlib()
+{
+        EscribeTitulo(wxT("ZLib\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("/* zlib.h -- interface of the 'zlib' general purpose compression library\n");
+        resultado += wxT("  version 1.2.2, October 3rd, 2004\n");
+        resultado += wxT("\n");
+        resultado += wxT("  Copyright (C) 1995-2004 Jean-loup Gailly and Mark Adler\n");
+        resultado += wxT("\n");
+        resultado += wxT("  This software is provided 'as-is', without any express or implied\n");
+        resultado += wxT("  warranty.  In no event will the authors be held liable for any damages\n");
+        resultado += wxT("  arising from the use of this software.\n");
+        resultado += wxT("\n");
+        resultado += wxT("  Permission is granted to anyone to use this software for any purpose,\n");
+        resultado += wxT("  including commercial applications, and to alter it and redistribute it\n");
+        resultado += wxT("  freely, subject to the following restrictions:\n");
+        resultado += wxT("\n");
+        resultado += wxT("  1. The origin of this software must not be misrepresented; you must not\n");
+        resultado += wxT("     claim that you wrote the original software. If you use this software\n");
+        resultado += wxT("     in a product, an acknowledgment in the product documentation would be\n");
+        resultado += wxT("     appreciated but is not required.\n");
+        resultado += wxT("  2. Altered source versions must be plainly marked as such, and must not be\n");
+        resultado += wxT("     misrepresented as being the original software.\n");
+        resultado += wxT("  3. This notice may not be removed or altered from any source distribution.\n");
+        resultado += wxT("\n");
+        resultado += wxT("  Jean-loup Gailly jloup at gzip.org\n");
+        resultado += wxT("  Mark Adler madler at alumni.caltech.edu\n");
+        resultado += wxT("\n");
+        resultado += wxT("*\n");
+        EscribeLicencia(resultado);
+
+}
+
+void DialogoLicenciasOpenSource::EscribeLicenciaSQLLite()
+{
+        EscribeTitulo(wxT("SQL Lite Copyright\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("All of the deliverable code in SQLite has been dedicated to the public domain by the authors. All code authors, and representatives of the companies they work for, have signed affidavits dedicating their contributions to the public domain and originals of those signed affidavits are stored in a firesafe at the main offices of Hwaci. Anyone is free to copy, modify, publish, use, compile, sell, or distribute the original SQLite code, either in source code form or  [...]
+        resultado += wxT("\n");
+        resultado += wxT("The previous paragraph applies to the deliverable code in SQLite - those parts of the SQLite library that you actually bundle and ship with a larger application. Portions of the documentation and some code used as part of the build process might fall under other licenses. The details here are unclear. We do not worry about the licensing of the documentation and build code so much because none of these things are part of the core deliverable SQLite library.\n");
+        resultado += wxT("\n");
+        resultado += wxT("All of the deliverable code in SQLite has been written from scratch. No code has been taken from other projects or from the open internet. Every line of code can be traced back to its original author, and all of those authors have public domain dedications on file. So the SQLite code base is clean and is uncontaminated with licensed code from other projects. \n");
+
+        EscribeLicencia(resultado);
+}
+
+
+void DialogoLicenciasOpenSource::EscribeLicenciaCharLS()
+{
+        EscribeTitulo(wxT("CharLS\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado +=wxT("Copyright (c) 2007-2009, Jan de Vaan\n");
+        resultado +=wxT("All rights reserved.\n");
+        resultado +=wxT("\n");
+        resultado +=wxT("Redistribution and use in source and binary forms, with or without\n");
+        resultado +=wxT("modification, are permitted provided that the following conditions are met:\n");
+        resultado +=wxT("\n");
+        resultado +=wxT("* Redistributions of source code must retain the above copyright notice, this\n");
+        resultado +=wxT("  list of conditions and the following disclaimer.\n");
+        resultado +=wxT("\n");
+        resultado +=wxT("* Redistributions in binary form must reproduce the above copyright notice,\n");
+        resultado +=wxT("  this list of conditions and the following disclaimer in the documentation\n");
+        resultado +=wxT("  and/or other materials provided with the distribution.\n");
+        resultado +=wxT("\n");
+        resultado +=wxT("* Neither the name of my employer, nor the names of its contributors may be\n");
+        resultado +=wxT("  used to endorse or promote products derived from this software without\n");
+        resultado +=wxT("  specific prior written permission.\n");
+        resultado +=wxT("\n");
+        resultado +=wxT("THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n");
+        resultado +=wxT("AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n");
+        resultado +=wxT("IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\n");
+        resultado +=wxT("DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR\n");
+        resultado +=wxT("ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES\n");
+        resultado +=wxT("(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\n");
+        resultado +=wxT("LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON\n");
+        resultado +=wxT("ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT\n");
+        resultado +=wxT("(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS\n");
+        resultado +=wxT("SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\n");
+
+        EscribeLicencia(resultado);
+}
+
+
+void DialogoLicenciasOpenSource::WriteDarkGlassLicense()
+{
+        EscribeTitulo(wxT("Dark Glass Icons\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("*Credits must go to:\n");
+        resultado +=  wxT("*Mentalrey for many glass icons.\n");
+        resultado +=  wxT("\n");
+        resultado +=  wxT("*AleXander Kirichev for Slackware kmenu icon.\n");
+        resultado +=  wxT("*Amira Julia for the original art work that provided some printer and desktop icons.\n");
+        resultado +=  wxT("*Dirceu for the user avatars.\n");
+        resultado +=  wxT("*EKrava for the kmenu_Kubuntu icon.\n");
+        resultado +=  wxT("*Everaldo Coelho (realistiK & Crystal) - Ultra high quality open source icons.\n");
+        resultado +=  wxT("*Everaldo for the emotions.\n");
+        resultado +=  wxT("*Futurosoft for a couple of their GPL icons.\n");
+        resultado +=  wxT("*Guppetto (OS-L) - for (among other things) the best folder icons ever.\n");
+        resultado +=  wxT("*hammergom for kde_fedora icon, K3B, XGame and many icons from his Crystal Glossy set.\n");
+        resultado +=  wxT("*Keyser Soze for the Debian kmenu.\n");
+        resultado +=  wxT("*Marco Martin (Glaze) - for many actions.\n");
+        resultado +=  wxT("*Marco Martin for the kwifi icons.\n");
+        resultado +=  wxT("*Marc Mironescu for some email icon.\n");
+        resultado +=  wxT("*Matias Costa for creating some folder open and folder locked icons.\n");
+        resultado +=  wxT("*Rowancompsciguy for the laptop battery icons\n");
+        resultado +=  wxT("*Yaco for the Skype icon.\n");
+        resultado += wxT("\n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::WriteLibcurl()
+{
+        EscribeTitulo(wxT("Libcurl\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("COPYRIGHT AND PERMISSION NOTICE\n");
+        resultado += wxT(" \n");
+        resultado += wxT("Copyright (c) 1996 - 2012, Daniel Stenberg, <daniel at haxx.se>.\n");
+        resultado += wxT(" \n");
+        resultado += wxT("All rights reserved.\n");
+        resultado += wxT(" \n");
+        resultado += wxT("Permission to use, copy, modify, and distribute this software for any purpose");
+        resultado += wxT("with or without fee is hereby granted, provided that the above copyright");
+        resultado += wxT("notice and this permission notice appear in all copies.\n");
+        resultado += wxT(" \n");
+        resultado += wxT("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR");
+        resultado += wxT("IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,");
+        resultado += wxT("FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN");
+        resultado += wxT("NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,");
+        resultado += wxT("DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR");
+        resultado += wxT("OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE");
+        resultado += wxT("OR OTHER DEALINGS IN THE SOFTWARE.\n");
+        resultado += wxT(" \n");
+        resultado += wxT("Except as contained in this notice, the name of a copyright holder shall not");
+        resultado += wxT("be used in advertising or otherwise to promote the sale, use or other dealings");
+        resultado += wxT("in this Software without prior written authorization of the copyright holder.\n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::WriteLibJsonCpp()
+{
+        EscribeTitulo(wxT("JsonCpp\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("The JsonCpp library's source code, including accompanying documentation, ");
+        resultado += wxT("tests and demonstration applications, are licensed under the following");
+        resultado += wxT("conditions...\n");
+        resultado += wxT("\n");
+        resultado += wxT("The author (Baptiste Lepilleur) explicitly disclaims copyright in all ");
+        resultado += wxT("jurisdictions which recognize such a disclaimer. In such jurisdictions, ");
+        resultado += wxT("this software is released into the Public Domain.\n");
+        resultado += wxT("\n");
+        resultado += wxT("In jurisdictions which do not recognize Public Domain property (e.g. Germany as of ");
+        resultado += wxT("2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is ");
+        resultado += wxT("released under the terms of the MIT License (see below).\n");
+        resultado += wxT("\n");
+        resultado += wxT("In jurisdictions which recognize Public Domain property, the user of this ");
+        resultado += wxT("software may choose to accept it either as 1) Public Domain, 2) under the ");
+        resultado += wxT("conditions of the MIT License (see below), or 3) under the terms of dual ");
+        resultado += wxT("Public Domain/MIT License conditions described here, as they choose.\n");
+        resultado += wxT("\n");
+        resultado += wxT("The MIT License is about as close to Public Domain as a license can get, and is ");
+        resultado += wxT("described in clear, concise terms at:\n");
+        resultado += wxT("\n");
+        resultado += wxT("http://en.wikipedia.org/wiki/MIT_License\n");
+        resultado += wxT("\n");
+        resultado += wxT("The full text of the MIT License follows:\n");
+        resultado += wxT("\n");
+        resultado += wxT("========================================================================\n");
+        resultado += wxT("Copyright (c) 2007-2010 Baptiste Lepilleur\n");
+        resultado += wxT("\n");
+        resultado += wxT("Permission is hereby granted, free of charge, to any person ");
+        resultado += wxT("obtaining a copy of this software and associated documentation ");
+        resultado += wxT("files (the \"Software\"), to deal in the Software without ");
+        resultado += wxT("restriction, including without limitation the rights to use, copy, ");
+        resultado += wxT("modify, merge, publish, distribute, sublicense, and/or sell copies ");
+        resultado += wxT("of the Software, and to permit persons to whom the Software is ");
+        resultado += wxT("furnished to do so, subject to the following conditions:\n");
+        resultado += wxT("\n");
+        resultado += wxT("The above copyright notice and this permission notice shall be ");
+        resultado += wxT("included in all copies or substantial portions of the Software.\n");
+        resultado += wxT("\n");
+        resultado += wxT("THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, \n");
+        resultado += wxT("EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF ");
+        resultado += wxT("MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND ");
+        resultado += wxT("NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS ");
+        resultado += wxT("BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ");
+        resultado += wxT("ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN ");
+        resultado += wxT("CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE ");
+        resultado += wxT("SOFTWARE.\n");
+        resultado += wxT("========================================================================\n");
+        resultado += wxT("(END LICENSE TEXT)\n");
+        resultado += wxT("\n");
+        resultado += wxT("The MIT license is compatible with both the GPL and commercial ");
+        resultado += wxT("software, affording one all of the rights of Public Domain with the ");
+        resultado += wxT("minor nuisance of being required to keep the above copyright notice ");
+        resultado += wxT("and license text in the source code. Note also that by accepting the ");
+        resultado += wxT("Public Domain \"license\" you can re-license your copy using whatever ");
+        resultado += wxT("license you like.\n");
+        EscribeLicencia(resultado);
+}
+
+void DialogoLicenciasOpenSource::WriteLibAIRS()
+{
+        EscribeTitulo(wxT("AIRS\n\n\n"));
+        wxString resultado = wxEmptyString;
+        resultado += wxT("==========================================================================\n");
+        resultado += wxT("\n");
+        resultado += wxT("Copyright (c) 2000-2010 Atamai, Inc.\n");
+        resultado += wxT("\n");
+        resultado += wxT("Use, modification and redistribution of the software, in source or\n");
+        resultado += wxT("binary forms, are permitted provided that the following terms and\n");
+        resultado += wxT("conditions are met:\n");
+        resultado += wxT("\n");
+        resultado += wxT("\t1) Redistribution of the source code, in verbatim or modified\n");
+        resultado += wxT("\tform, must retain the above copyright notice, this license,\n");
+        resultado += wxT("\tthe following disclaimer, and any notices that refer to this\n");
+        resultado += wxT("\tlicense and/or the following disclaimer.\n");
+        resultado += wxT("\n");
+        resultado += wxT("\t2) Redistribution in binary form must include the above copyright\n");
+        resultado += wxT("\tnotice, a copy of this license and the following disclaimer\n");
+        resultado += wxT("\tin the documentation or with other materials provided with the\n");
+        resultado += wxT("\tdistribution.\n");
+        resultado += wxT("\n");
+        resultado += wxT("\t3) Modified copies of the source code must be clearly marked as such,\n");
+        resultado += wxT("\tand must not be misrepresented as verbatim copies of the source code.\n");
+        resultado += wxT("\n");
+        resultado += wxT("THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE \"AS IS\"\n");
+        resultado += wxT("WITHOUT EXPRESSED OR IMPLIED WARRANTY INCLUDING, BUT NOT LIMITED TO,\n");
+        resultado += wxT("THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\n");
+        resultado += wxT("PURPOSE. IN NO EVENT SHALL ANY COPYRIGHT HOLDER OR OTHER PARTY WHO MAY\n");
+        resultado += wxT("MODIFY AND/OR REDISTRIBUTE THE SOFTWARE UNDER THE TERMS OF THIS LICENSE\n");
+        resultado += wxT("BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES\n");
+        resultado += wxT("(INCLUDING, BUT NOT LIMITED TO, LOSS OF DATA OR DATA BECOMING INACCURATE\n");
+        resultado += wxT("OR LOSS OF PROFIT OR BUSINESS INTERRUPTION) ARISING IN ANY WAY OUT OF\n");
+        resultado += wxT("THE USE OR INABILITY TO USE THE SOFTWARE, EVEN IF ADVISED OF THE\n");
+        resultado += wxT("POSSIBILITY OF SUCH DAMAGES.\n");
+        resultado += wxT("\n");
+        resultado += wxT("=========================================================================\n");
+
+        EscribeLicencia(resultado);
+}
diff --git a/cadxcore/main/gui/license/dialogolicenciasopensource.h b/cadxcore/main/gui/license/dialogolicenciasopensource.h
new file mode 100644
index 0000000..23cf7fc
--- /dev/null
+++ b/cadxcore/main/gui/license/dialogolicenciasopensource.h
@@ -0,0 +1,60 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "aboutdialogbase.h"
+#include <api/controllers/imodulecontroller.h>
+
+
+class DialogoLicenciasOpenSource : public DialogoLicenciasOpenSourceBase
+{
+public:
+        DialogoLicenciasOpenSource(wxWindow* pPadre);
+        ~DialogoLicenciasOpenSource();
+
+        virtual void OnListaLicencias(wxCommandEvent &event);
+
+        void EscribeTitulo(wxString titulo);
+        void EscribeLicencia(wxString& licencia);
+
+        void EscribeLicenciaGinkgo();
+        void EscribeLicenciaCairo();
+        void EscribeLicenciaDCMTK();
+        void EscribeLicenciaFamFam();
+        void EscribeLicenciaFugue();
+        void EscribeLicenciaITK();
+        void EscribeLicencialibjpeg();
+        void EscribeLicencialibpng();
+        void EscribeLicenciaOpenssl();
+        void EscribeLicenciaVTK();
+        void EscribeLicenciawxWidgets();
+        void EscribeLicenciazlib();
+        void EscribeLicenciaSQLLite();
+        void EscribeLicenciaCharLS();
+        void WriteDarkGlassLicense();
+        void WriteLibcurl();
+        void WriteLibJsonCpp();
+        void WriteLibAIRS();
+
+
+        GNC::GCS::IModuleController::TExtraLicensesMap ExtraMap;
+//endregion
+
+};
diff --git a/cadxcore/main/gui/logcontrolwindow/ventanaControlLogs.fbp b/cadxcore/main/gui/logcontrolwindow/ventanaControlLogs.fbp
new file mode 100644
index 0000000..d18dfd4
--- /dev/null
+++ b/cadxcore/main/gui/logcontrolwindow/ventanaControlLogs.fbp
@@ -0,0 +1,1076 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">ventanacontrollogsbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">VentanaControlLogsBase</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Frame" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">500,200</property>
+            <property name="name">VentanaControlLogsBase</property>
+            <property name="pos"></property>
+            <property name="size">650,300</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Log monitor</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <property name="xrc_skip_sizer">1</property>
+            <event name="OnActivate">OnActivate</event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose">OnClose</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnKeyDown">OnKeyDown</event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxMenuBar" expanded="1">
+                <property name="bg"></property>
+                <property name="context_help"></property>
+                <property name="context_menu">1</property>
+                <property name="enabled">1</property>
+                <property name="fg"></property>
+                <property name="font"></property>
+                <property name="hidden">0</property>
+                <property name="id">wxID_ANY</property>
+                <property name="label">MyMenuBar</property>
+                <property name="maximum_size"></property>
+                <property name="minimum_size"></property>
+                <property name="name">m_menubar1</property>
+                <property name="permission">protected</property>
+                <property name="pos"></property>
+                <property name="size"></property>
+                <property name="style"></property>
+                <property name="subclass"></property>
+                <property name="tooltip"></property>
+                <property name="window_extra_style"></property>
+                <property name="window_name"></property>
+                <property name="window_style"></property>
+                <event name="OnChar"></event>
+                <event name="OnEnterWindow"></event>
+                <event name="OnEraseBackground"></event>
+                <event name="OnKeyDown"></event>
+                <event name="OnKeyUp"></event>
+                <event name="OnKillFocus"></event>
+                <event name="OnLeaveWindow"></event>
+                <event name="OnLeftDClick"></event>
+                <event name="OnLeftDown"></event>
+                <event name="OnLeftUp"></event>
+                <event name="OnMiddleDClick"></event>
+                <event name="OnMiddleDown"></event>
+                <event name="OnMiddleUp"></event>
+                <event name="OnMotion"></event>
+                <event name="OnMouseEvents"></event>
+                <event name="OnMouseWheel"></event>
+                <event name="OnPaint"></event>
+                <event name="OnRightDClick"></event>
+                <event name="OnRightDown"></event>
+                <event name="OnRightUp"></event>
+                <event name="OnSetFocus"></event>
+                <event name="OnSize"></event>
+                <event name="OnUpdateUI"></event>
+                <object class="wxMenu" expanded="1">
+                    <property name="label">Log</property>
+                    <property name="name">m_menuRegistros</property>
+                    <property name="permission">protected</property>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Save log...</property>
+                        <property name="name">m_menuItemGuardar</property>
+                        <property name="permission">protected</property>
+                        <property name="shortcut">ALT+g</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="separator" expanded="1">
+                        <property name="name">m_separator1</property>
+                        <property name="permission">none</property>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Clear log</property>
+                        <property name="name">m_menuItemLimpiar</property>
+                        <property name="permission">protected</property>
+                        <property name="shortcut">ALT+l</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection">OnLimpiarRegistros</event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                    <object class="separator" expanded="1">
+                        <property name="name">m_separator2</property>
+                        <property name="permission">none</property>
+                    </object>
+                    <object class="wxMenuItem" expanded="1">
+                        <property name="bitmap"></property>
+                        <property name="checked">0</property>
+                        <property name="enabled">1</property>
+                        <property name="help"></property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="kind">wxITEM_NORMAL</property>
+                        <property name="label">Exit</property>
+                        <property name="name">m_menuItemSalir</property>
+                        <property name="permission">protected</property>
+                        <property name="shortcut">ESC</property>
+                        <property name="unchecked_bitmap"></property>
+                        <event name="OnMenuSelection"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer5</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel3</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown">OnKeyDown</event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND | wxALL</property>
+                                <property name="proportion">1</property>
+                                <object class="wxRichTextCtrl" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pRegistros</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRichTextCharacter"></event>
+                                    <event name="OnRichTextContentDeleted"></event>
+                                    <event name="OnRichTextContentInserted"></event>
+                                    <event name="OnRichTextDelete"></event>
+                                    <event name="OnRichTextReturn"></event>
+                                    <event name="OnRichTextStyleChanged"></event>
+                                    <event name="OnRichTextStyleSheetChanged"></event>
+                                    <event name="OnRichTextStyleSheetReplaced"></event>
+                                    <event name="OnRichTextStyleSheetReplacing"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText"></event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnTextMaxLen"></event>
+                                    <event name="OnTextURL"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">0</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panelNivel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown">OnKeyDown</event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer3</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font">,90,92,-1,70,0</property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Level</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pNivel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown">OnKeyDown</event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxChoice" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="choices"></property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pComboNivel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="selection">0</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnChoice">OnNivelChoice</event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown">OnKeyDown</event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="1">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Clear</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBLimpiar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxBU_EXACTFIT</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnLimpiarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown">OnKeyDown</event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">500,242</property>
+            <property name="name">ShowPlainTextDialog</property>
+            <property name="pos"></property>
+            <property name="size">650,300</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Log node</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer5</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelLog</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">LogText</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxTextCtrl" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="maxlength">0</property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pLogText</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">public</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="value"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText"></event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnTextMaxLen"></event>
+                                    <event name="OnTextURL"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL|wxALIGN_RIGHT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxButton" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_CANCEL</property>
+                        <property name="label">Accept</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_button2</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style">wxBU_EXACTFIT</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnButtonClick"></event>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/logcontrolwindow/ventanacontrollogs.cpp b/cadxcore/main/gui/logcontrolwindow/ventanacontrollogs.cpp
new file mode 100644
index 0000000..5bcc927
--- /dev/null
+++ b/cadxcore/main/gui/logcontrolwindow/ventanacontrollogs.cpp
@@ -0,0 +1,248 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/wx.h>
+#include <main/controllers/log4cplus/guiappender.h>
+#include <main/controllers/configurationcontroller.h>
+#include <api/internationalization/internationalization.h>
+#include <set>
+#include <fstream>
+#include <sstream>
+#include <wx/strconv.h>
+#include <wx/log.h>
+#include <wx/filedlg.h>
+#include <wx/msgdlg.h>
+
+#include "ventanacontrollogs.h"
+
+#include <resources/ginkgoresourcesmanager.h>
+#define LOGGER "VentanaControlLogs"
+#include <main/controllers/controladorlog.h>
+#include <main/entorno.h>
+
+
+#define COL_FECHA           0
+#define COL_NIVEL           1
+#define COL_MENSAJE			2
+
+namespace GNC
+{
+namespace GUI
+{
+
+VentanaControlLogs* VentanaControlLogs::m_pInstance = NULL;
+
+VentanaControlLogs* VentanaControlLogs::Instance()
+{
+        if(m_pInstance == NULL) {
+                m_pInstance = new VentanaControlLogs();
+        }
+        return m_pInstance;
+}
+
+void VentanaControlLogs::CerrarSiAbierta()
+{
+        if(m_pInstance != NULL) {
+                m_pInstance->Close(true);
+                m_pInstance = NULL;
+        }
+}
+
+void VentanaControlLogs::Refrescar()
+{
+}
+
+//region Interfaz ILogger
+
+void VentanaControlLogs::Append(const GNC::GCS::Logging::LogEvent& le)
+{
+        GNC::GCS::ILocker lock(this);
+        //write event into pending events array and set flag to refresh in idle time
+        wxCSConv conv(wxFONTENCODING_UTF8);
+        wxString str(le.formattedmsg.c_str(), conv);
+        if (str.IsEmpty() && !le.formattedmsg.empty()) { // Fallback: CONV TO ISO
+                wxCSConv convLatin1(wxFONTENCODING_ISO8859_1);
+                str = wxString(le.formattedmsg.c_str(), convLatin1);
+        }
+        pendingLines.push_back(str);
+        m_needRefresh = true;
+}
+
+//endregion
+
+VentanaControlLogs::VentanaControlLogs() : VentanaControlLogsBase(NULL)
+{
+        m_needRefresh = false;
+
+        wxIcon icono;
+        icono.CopyFromBitmap(GinkgoResourcesManager::Logos::GetLogoGinkgo32x32());
+        this->SetIcon(icono);
+
+        // Setup del combobox de niveles
+
+        GNC::GCS::IControladorLog::Instance()->GetLogLevelsMap(m_MapaLogLevels);
+
+        int i = 0;
+
+        for (GNC::GCS::IControladorLog::MapaLogLevels::iterator it = m_MapaLogLevels.begin(); it != m_MapaLogLevels.end(); ++it, i++) {
+                m_pComboNivel->Insert(wxString::FromUTF8((*it).second.c_str()), 0);
+        }
+
+        // Setup del nivel actual
+
+        wxString nivelActual = wxString::FromUTF8(m_MapaLogLevels[GNC::GCS::IControladorLog::Instance()->GetActiveLogLevel()].c_str());
+
+        bool notfound = true;
+        for (int i = 0; notfound && i < (int)m_pComboNivel->GetCount(); i++) {
+                if (nivelActual == m_pComboNivel->GetString(i) ) {
+                        m_pComboNivel->Select(i);
+                        notfound = false;
+                }
+        }
+
+        this->Connect( m_menuItemGuardar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaControlLogs::OnGuardarRegistros ) );
+        this->Connect( m_menuItemLimpiar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaControlLogs::OnLimpiarClick ) );
+        this->Connect( m_menuItemSalir->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaControlLogs::OnSalirClick ) );
+
+        Layout();
+
+        gnkLog4cplus::GUIAppender::Instance()->Attach(this);
+
+        Show();
+}
+
+VentanaControlLogs::~VentanaControlLogs()
+{
+        m_pInstance = NULL;
+        gnkLog4cplus::GUIAppender::Instance()->Attach(NULL);
+
+}
+
+void VentanaControlLogs::OnClose( wxCloseEvent& event )
+{
+        gnkLog4cplus::GUIAppender::Instance()->Attach(NULL);
+        event.Skip();
+}
+
+void VentanaControlLogs::OnInternalIdle()
+{
+        if (m_needRefresh) {
+                GNC::GCS::ILocker locker(this);
+                //if text in the control is too big remove a half
+                const int maxBufferSize = 100*1024;
+                if (m_pRegistros->GetValue().size() > maxBufferSize) {
+                        //if it's bigger than 100K remove first 50K
+                        wxString value = m_pRegistros->GetValue();
+                        m_pRegistros->SetValue(value.substr(value.size() - maxBufferSize/2));
+                }
+
+                //write pending events
+                Freeze();
+                for (wxArrayString::iterator it = pendingLines.begin(); it != pendingLines.end(); ++it) {
+                        m_pRegistros->AppendText((*it));
+                }
+                //set stroll to the bottom
+                m_pRegistros->ShowPosition(m_pRegistros->GetLastPosition());
+                Thaw();
+                pendingLines.clear();
+                m_pRegistros->Refresh(true);
+                m_needRefresh = false;
+        }
+}
+
+void VentanaControlLogs::OnGuardarRegistros( wxCommandEvent& /*event*/ )
+{
+        wxFileDialog seleccionarFichero (this, _("Save logs"), wxT(""), wxT(""), _("Log file (*.log) | *.log | Text file (*.txt) | *.txt"),wxFD_SAVE);
+        int response = seleccionarFichero.ShowModal();
+        if (response == wxID_OK) {
+                if(wxFileExists(seleccionarFichero.GetPath())) {
+                        response = wxMessageBox(_("File exists\nWould you like to overwrite it?"),_("Overwrite"),wxYES_NO | wxCANCEL,this);
+                        if(response != wxYES) {
+                                return;
+                        }
+                }
+
+                std::ofstream fout;
+                std::ostringstream sout;
+                try {
+                        fout.open(TOPATH(seleccionarFichero.GetPath()).c_str());
+                } catch (std::exception& ex) {
+                        sout << _Std("File couldn't be stored ") << seleccionarFichero.GetPath().ToUTF8() << " : " << ex.what();
+                        wxMessageBox(wxString::FromUTF8(sout.str().c_str()),_("Error"),wxICON_ERROR);
+                        return;
+                }
+
+                if (!fout) {
+                        sout << _Std("File couldn't be stored ") << seleccionarFichero.GetPath().ToUTF8();
+                        wxMessageBox(wxString::FromUTF8(sout.str().c_str()),_("Error"),wxICON_ERROR);
+                        return;
+                }
+
+                try {
+                        fout << m_pRegistros->GetValue().ToUTF8();
+                } catch (std::exception& ex) {
+                        sout << _Std("File couldn't be stored ") << seleccionarFichero.GetPath().ToUTF8() << " : " << ex.what();
+                        wxMessageBox(wxString::FromUTF8(sout.str().c_str()),_("Error"),wxICON_ERROR);
+                        return;
+                }
+
+                try {
+                        fout.close();
+                } catch (std::exception& ex) {
+                        sout << _Std("Could not write to file") << seleccionarFichero.GetPath().ToUTF8() << " : " << ex.what();
+                        wxMessageBox(wxString::FromUTF8(sout.str().c_str()),_("Error"),wxICON_ERROR);
+                }
+        }
+}
+
+void VentanaControlLogs::OnNivelChoice( wxCommandEvent& /*event*/ )
+{
+
+        int nivel = GNC::GCS::IControladorLog::Instance()->GetLogLevelCode(std::string(m_pComboNivel->GetStringSelection().ToUTF8()));
+
+        GNC::GCS::IControladorLog::Instance()->SetActiveLogLevel(nivel);
+        GNC::GCS::ConfigurationController::Instance()->writeIntGeneral("/GinkgoCore/Log", "LogLevel", nivel);
+
+}
+
+void VentanaControlLogs::LimpiarRegistros()
+{
+        m_pRegistros->Clear();
+        gnkLog4cplus::GUIAppender::Instance()->clear();
+
+}
+
+void VentanaControlLogs::OnSalirClick( wxCommandEvent& /*event*/ )
+{
+        Close();
+}
+
+void VentanaControlLogs::OnKeyDown( wxKeyEvent& event )
+{
+        if (event.GetKeyCode() == WXK_ESCAPE) {
+                Close();
+                event.Skip(false);
+        } else {
+                event.Skip();
+        }
+}
+}
+
+}
diff --git a/cadxcore/main/gui/logcontrolwindow/ventanacontrollogs.h b/cadxcore/main/gui/logcontrolwindow/ventanacontrollogs.h
new file mode 100644
index 0000000..7921397
--- /dev/null
+++ b/cadxcore/main/gui/logcontrolwindow/ventanacontrollogs.h
@@ -0,0 +1,79 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <list>
+#include <api/controllers/icontroladorlog.h>
+#include <main/controllers/log4cplus/logdefines.h>
+#include <wx/event.h>
+#include "ventanacontrollogsbase.h"
+
+
+namespace GNC
+{
+namespace GUI
+{
+
+class VentanaControlLogs : public VentanaControlLogsBase, public GNC::GCS::Logging::ILogger
+{
+public:
+        //singleton
+        static VentanaControlLogs* Instance();
+        static void CerrarSiAbierta();
+        void Refrescar();
+
+        //region Interfaz ILogger
+        virtual void Append(const GNC::GCS::Logging::LogEvent& le);
+
+        //endregion
+
+protected:
+        static VentanaControlLogs*  m_pInstance;
+        GNC::GCS::IControladorLog::MapaLogLevels m_MapaLogLevels;
+        bool m_needRefresh;
+
+        VentanaControlLogs();
+        ~VentanaControlLogs();
+
+        virtual void OnClose(wxCloseEvent& event);
+
+        virtual void OnInternalIdle();
+
+        virtual void OnLimpiarClick( wxCommandEvent& /*event*/ )
+        {
+                LimpiarRegistros();
+        }
+        virtual void OnLimpiarRegistros( wxCommandEvent& /*event*/ )
+        {
+                LimpiarRegistros();
+        }
+
+        virtual void OnGuardarRegistros( wxCommandEvent& event );
+        virtual void OnNivelChoice( wxCommandEvent& event );
+
+        virtual void OnSalirClick( wxCommandEvent& event );
+        virtual void OnKeyDown( wxKeyEvent& event );
+        void LimpiarRegistros();
+
+        wxArrayString pendingLines;
+
+};
+}
+}
diff --git a/cadxcore/main/gui/logcontrolwindow/ventanacontrollogsbase.cpp b/cadxcore/main/gui/logcontrolwindow/ventanacontrollogsbase.cpp
new file mode 100644
index 0000000..d65f866
--- /dev/null
+++ b/cadxcore/main/gui/logcontrolwindow/ventanacontrollogsbase.cpp
@@ -0,0 +1,154 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "ventanacontrollogsbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+VentanaControlLogsBase::VentanaControlLogsBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 500,200 ), wxDefaultSize );
+
+        m_menubar1 = new wxMenuBar( 0 );
+        m_menuRegistros = new wxMenu();
+        m_menuItemGuardar = new wxMenuItem( m_menuRegistros, wxID_ANY, wxString( _("Save log...") ) + wxT('\t') + wxT("ALT+g"), wxEmptyString, wxITEM_NORMAL );
+        m_menuRegistros->Append( m_menuItemGuardar );
+
+        m_menuRegistros->AppendSeparator();
+
+        m_menuItemLimpiar = new wxMenuItem( m_menuRegistros, wxID_ANY, wxString( _("Clear log") ) + wxT('\t') + wxT("ALT+l"), wxEmptyString, wxITEM_NORMAL );
+        m_menuRegistros->Append( m_menuItemLimpiar );
+
+        m_menuRegistros->AppendSeparator();
+
+        m_menuItemSalir = new wxMenuItem( m_menuRegistros, wxID_ANY, wxString( _("Exit") ) + wxT('\t') + wxT("ESC"), wxEmptyString, wxITEM_NORMAL );
+        m_menuRegistros->Append( m_menuItemSalir );
+
+        m_menubar1->Append( m_menuRegistros, _("Log") );
+
+        this->SetMenuBar( m_menubar1 );
+
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel3 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pRegistros = new wxRichTextCtrl( m_panel3, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0|wxVSCROLL|wxHSCROLL|wxNO_BORDER|wxWANTS_CHARS );
+        bSizer7->Add( m_pRegistros, 1, wxEXPAND | wxALL, 5 );
+
+
+        m_panel3->SetSizer( bSizer7 );
+        m_panel3->Layout();
+        bSizer7->Fit( m_panel3 );
+        bSizer5->Add( m_panel3, 1, wxEXPAND, 5 );
+
+        m_panelNivel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer3;
+        bSizer3 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pNivel = new wxStaticText( m_panelNivel, wxID_ANY, _("Level"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pNivel->Wrap( -1 );
+        m_pNivel->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+        bSizer3->Add( m_pNivel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxArrayString m_pComboNivelChoices;
+        m_pComboNivel = new wxChoice( m_panelNivel, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pComboNivelChoices, 0 );
+        m_pComboNivel->SetSelection( 0 );
+        bSizer3->Add( m_pComboNivel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer3->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pBLimpiar = new wxButton( m_panelNivel, wxID_ANY, _("Clear"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        bSizer3->Add( m_pBLimpiar, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_panelNivel->SetSizer( bSizer3 );
+        m_panelNivel->Layout();
+        bSizer3->Fit( m_panelNivel );
+        bSizer5->Add( m_panelNivel, 0, wxEXPAND | wxALL, 0 );
+
+
+        this->SetSizer( bSizer5 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_ACTIVATE, wxActivateEventHandler( VentanaControlLogsBase::OnActivate ) );
+        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( VentanaControlLogsBase::OnClose ) );
+        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ) );
+        this->Connect( m_menuItemLimpiar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaControlLogsBase::OnLimpiarRegistros ) );
+        m_panel3->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ), NULL, this );
+        m_panelNivel->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ), NULL, this );
+        m_pNivel->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ), NULL, this );
+        m_pComboNivel->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( VentanaControlLogsBase::OnNivelChoice ), NULL, this );
+        m_pComboNivel->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ), NULL, this );
+        m_pBLimpiar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VentanaControlLogsBase::OnLimpiarClick ), NULL, this );
+        m_pBLimpiar->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ), NULL, this );
+}
+
+VentanaControlLogsBase::~VentanaControlLogsBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_ACTIVATE, wxActivateEventHandler( VentanaControlLogsBase::OnActivate ) );
+        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( VentanaControlLogsBase::OnClose ) );
+        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ) );
+        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaControlLogsBase::OnLimpiarRegistros ) );
+        m_panel3->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ), NULL, this );
+        m_panelNivel->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ), NULL, this );
+        m_pNivel->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ), NULL, this );
+        m_pComboNivel->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( VentanaControlLogsBase::OnNivelChoice ), NULL, this );
+        m_pComboNivel->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ), NULL, this );
+        m_pBLimpiar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( VentanaControlLogsBase::OnLimpiarClick ), NULL, this );
+        m_pBLimpiar->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaControlLogsBase::OnKeyDown ), NULL, this );
+
+}
+
+ShowPlainTextDialog::ShowPlainTextDialog( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 500,242 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelLog = new SubTitledPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelLog->SetToolTip( _("LogText") );
+
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pLogText = new wxTextCtrl( m_pPanelLog, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_DONTWRAP|wxTE_MULTILINE|wxTE_READONLY );
+        m_pLogText->SetMaxLength( 0 );
+        bSizer7->Add( m_pLogText, 1, wxEXPAND, 5 );
+
+
+        m_pPanelLog->SetSizer( bSizer7 );
+        m_pPanelLog->Layout();
+        bSizer7->Fit( m_pPanelLog );
+        bSizer5->Add( m_pPanelLog, 1, wxEXPAND | wxALL, 5 );
+
+        m_button2 = new wxButton( this, wxID_CANCEL, _("Accept"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        m_button2->SetDefault();
+        bSizer5->Add( m_button2, 0, wxALL|wxALIGN_RIGHT, 5 );
+
+
+        this->SetSizer( bSizer5 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+}
+
+ShowPlainTextDialog::~ShowPlainTextDialog()
+{
+}
diff --git a/cadxcore/main/gui/logcontrolwindow/ventanacontrollogsbase.h b/cadxcore/main/gui/logcontrolwindow/ventanacontrollogsbase.h
new file mode 100644
index 0000000..7fd491e
--- /dev/null
+++ b/cadxcore/main/gui/logcontrolwindow/ventanacontrollogsbase.h
@@ -0,0 +1,119 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __VENTANACONTROLLOGSBASE_H__
+#define __VENTANACONTROLLOGSBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class SubTitledPanel;
+
+#include <wx/string.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/menu.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/richtext/richtextctrl.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/stattext.h>
+#include <wx/choice.h>
+#include <wx/button.h>
+#include <wx/frame.h>
+#include <wx/textctrl.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class VentanaControlLogsBase
+///////////////////////////////////////////////////////////////////////////////
+class VentanaControlLogsBase : public wxFrame
+{
+private:
+
+protected:
+        wxMenuBar* m_menubar1;
+        wxMenu* m_menuRegistros;
+        wxMenuItem* m_menuItemGuardar;
+        wxMenuItem* m_menuItemLimpiar;
+        wxMenuItem* m_menuItemSalir;
+        wxPanel* m_panel3;
+        wxRichTextCtrl* m_pRegistros;
+        wxPanel* m_panelNivel;
+        wxStaticText* m_pNivel;
+        wxChoice* m_pComboNivel;
+        wxButton* m_pBLimpiar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnActivate( wxActivateEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnClose( wxCloseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnKeyDown( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnLimpiarRegistros( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnNivelChoice( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnLimpiarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        VentanaControlLogsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Log monitor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 650,300 ), long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU|wxTAB_TRAVERSAL );
+
+        ~VentanaControlLogsBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class ShowPlainTextDialog
+///////////////////////////////////////////////////////////////////////////////
+class ShowPlainTextDialog : public wxDialog
+{
+private:
+
+protected:
+        SubTitledPanel* m_pPanelLog;
+        wxButton* m_button2;
+
+public:
+        wxTextCtrl* m_pLogText;
+
+        ShowPlainTextDialog( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Log node"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 650,300 ), long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxMINIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~ShowPlainTextDialog();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__VENTANACONTROLLOGSBASE_H__
diff --git a/cadxcore/main/gui/login/dialogologin.cpp b/cadxcore/main/gui/login/dialogologin.cpp
new file mode 100644
index 0000000..b10fe00
--- /dev/null
+++ b/cadxcore/main/gui/login/dialogologin.cpp
@@ -0,0 +1,57 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <ostream>
+#include <wx/msgdlg.h>
+#include <wx/statbmp.h>
+#include <wx/bmpbuttn.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include "dialogologin.h"
+#include <main/controllers/controladorautenticacion.h>
+#include <main/controllers/controladorpermisos.h>
+GNC::GUI::DialogoLogin::DialogoLogin(wxWindow* pParent) : DialogoLoginBase(pParent)
+{
+        if (GSEC::Auth::ControladorAutenticacion::Instance()->GetTipoAutenticacion() == GSEC::Auth::TA_PASSWORD) {
+                m_pTCUsuario->SetValue(_("User"));
+                m_pTCUsuario->Show(false);
+                m_pLabelUser->Show(false);
+                m_pFormPanel->Layout();
+                m_pTCPassword->SetFocus();
+        } else {
+                m_pTCUsuario->SetFocus();
+        }
+}
+
+GNC::GUI::DialogoLogin::~DialogoLogin()
+{
+}
+
+void GNC::GUI::DialogoLogin::OnLogin( wxCommandEvent& /*event*/ )
+{
+        if (GSEC::Auth::ControladorAutenticacion::Instance()->Auth( std::string(m_pTCUsuario->GetValue().ToUTF8()), std::string(m_pTCPassword->GetValue().ToUTF8()) ) ) {
+                this->SetReturnCode(wxID_OK);
+                this->Hide();
+        } else {
+                this->SetReturnCode(wxID_CANCEL);
+                m_pTCPassword->SelectAll();
+                wxMessageBox(_("The username or password is incorrect"),_("Info"), wxOK | wxICON_INFORMATION, this);
+        }
+}
diff --git a/cadxcore/main/gui/login/dialogologin.h b/cadxcore/main/gui/login/dialogologin.h
new file mode 100644
index 0000000..15890b0
--- /dev/null
+++ b/cadxcore/main/gui/login/dialogologin.h
@@ -0,0 +1,40 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <main/gui/mainwindow/ventanaprincipalbase.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class DialogoLogin : public DialogoLoginBase
+{
+
+public:
+
+        DialogoLogin(wxWindow* pParent);
+        ~DialogoLogin();
+
+        virtual void OnLogin( wxCommandEvent& event );
+
+};
+}
+}
diff --git a/cadxcore/main/gui/mainwindow/InterfazGinkgo.fbp b/cadxcore/main/gui/mainwindow/InterfazGinkgo.fbp
new file mode 100644
index 0000000..cef0b6d
--- /dev/null
+++ b/cadxcore/main/gui/mainwindow/InterfazGinkgo.fbp
@@ -0,0 +1,2284 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">ventanaprincipalbase</property>
+        <property name="first_id">1052</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">Interfaz principal</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Frame" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style"></property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">800,600</property>
+            <property name="name">VentanaPrincipalBase</property>
+            <property name="pos"></property>
+            <property name="size">800,600</property>
+            <property name="style">wxDEFAULT_FRAME_STYLE|wxMAXIMIZE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxCLIP_CHILDREN|wxTAB_TRAVERSAL</property>
+            <property name="xrc_skip_sizer">1</property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnKeyDown">OnKeydown</event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">protected</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">0</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg">210,210,0</property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">1</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelActualizacion</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer18</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">2</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg">255,255,225</property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size">-1,-1</property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelActualizacionInterno</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">; </property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">New Update</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer17</property>
+                                        <property name="orient">wxHORIZONTAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxHyperlinkCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="hover_color"></property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">New version available</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pHipervinculoActualizacion</property>
+                                                <property name="normal_color"></property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxHL_DEFAULT_STYLE</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="url">https://github.com/gerddie/ginkgocadx</property>
+                                                <property name="visited_color"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnHyperlink"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">1</property>
+                                            <object class="spacer" expanded="0">
+                                                <property name="height">0</property>
+                                                <property name="permission">protected</property>
+                                                <property name="width">0</property>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxCheckBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="checked">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Do not warn me again about this update</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pDoNotWarnAgain</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCheckBox">OnDoNotWarnAgainClicked</event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">2</property>
+                                            <property name="flag">wxALIGN_CENTER|wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxALL|wxFIXED_MINSIZE</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxButton" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default">0</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font">,90,92,-1,70,0</property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">X</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pBotonCerrarPanelActualizacion</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxBU_EXACTFIT</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip">Close this notification</property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnButtonClick">OnVersionNotifierClose</event>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxBoxSizer" expanded="1">
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pSizerCentral</property>
+                        <property name="orient">wxHORIZONTAL</property>
+                        <property name="permission">protected</property>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">1</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="wxPanel" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg">wxSYS_COLOUR_WINDOW</property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size">-1,-1</property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pPanelCentral</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">510,230</property>
+            <property name="name">DialogoComandosEnEjecucionBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Closing Ginkgo CADx</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer3</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel10</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer15</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_panel11</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanelSinBorder; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">The following commands will be aborted if you close the application</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer16</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxListBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="choices"></property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pListacomandos</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnListBox"></event>
+                                                <event name="OnListBoxDClick"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel9</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer4</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Close Ginkgo CADx</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button1</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Closes the application and aborts pending commands</property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button2</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Do not close the application and keep commands running</property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Frame" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style"></property>
+            <property name="bg">0,0,0</property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">600,400</property>
+            <property name="name">DetachedDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">600,400</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxFRAME_FLOAT_ON_PARENT|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxCLIP_CHILDREN|wxTAB_TRAVERSAL</property>
+            <property name="xrc_skip_sizer">1</property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose">OnCloseDialogo</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer8</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">500,270</property>
+            <property name="name">DialogoLoginBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSTAY_ON_TOP</property>
+            <property name="subclass"></property>
+            <property name="title">User login</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">User login</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer141</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pFormPanel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">System authentication</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer19</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="spacer" expanded="1">
+                                                <property name="height">0</property>
+                                                <property name="permission">protected</property>
+                                                <property name="width">0</property>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxFlexGridSizer" expanded="0">
+                                                <property name="cols">2</property>
+                                                <property name="flexible_direction">wxBOTH</property>
+                                                <property name="growablecols">1</property>
+                                                <property name="growablerows"></property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pFormSizer</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="rows">2</property>
+                                                <property name="vgap">0</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxBOTTOM|wxRIGHT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">User name</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pLabelUser</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pTCUsuario</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Password</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText3</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxLEFT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxTextCtrl" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="maxlength">0</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pTCPassword</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxTE_PASSWORD</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="value"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnText"></event>
+                                                        <event name="OnTextEnter"></event>
+                                                        <event name="OnTextMaxLen"></event>
+                                                        <event name="OnTextURL"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="spacer" expanded="1">
+                                                <property name="height">0</property>
+                                                <property name="permission">protected</property>
+                                                <property name="width">0</property>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel6</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer14</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">0</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBotonCancelar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">0</property>
+                                <property name="flag"></property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">0</property>
+                                <property name="flag"></property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Login</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pButtonLogin</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnLogin</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/mainwindow/detacheddialog.cpp b/cadxcore/main/gui/mainwindow/detacheddialog.cpp
new file mode 100644
index 0000000..0d1c12d
--- /dev/null
+++ b/cadxcore/main/gui/mainwindow/detacheddialog.cpp
@@ -0,0 +1,125 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <wx/wx.h>
+#include <wx/aui/aui.h>
+#include <wx/menu.h>
+#include <wx/dcbuffer.h>
+#include <wx/dcclient.h>
+
+#include <api/globals.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/ivista.h>
+#include <main/entorno.h>
+
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/controllers/controladorvistas.h>
+
+#include "detacheddialog.h"
+
+namespace GNC
+{
+namespace GUI
+{
+DetachedDialog::DetachedDialog(wxWindow* pParent, VentanaPrincipal* pVentanaPrincipal): DetachedDialogBase(pParent)
+{
+        wxIcon icono;
+        icono.CopyFromBitmap(GinkgoResourcesManager::Logos::GetLogoGinkgo32x32());
+        this->SetIcon(icono);
+
+        GNC::Entorno::Instance()->ViewsObservers.push_back(this);
+        m_pWindow = NULL;
+        m_pVentanaPrincipal = pVentanaPrincipal;
+}
+
+DetachedDialog::~DetachedDialog()
+{
+        GNC::Entorno::Instance()->ViewsObservers.remove(this);
+        m_pWindow = NULL;
+        m_pVentanaPrincipal = NULL;
+}
+
+void DetachedDialog::AddPanel(wxWindow* pWin, const wxString& titulo)
+{
+        m_pWindow = pWin;
+        SetTitle(titulo);
+        if(m_pWindow->GetParent() != this) {
+                m_pWindow->GetParent()->GetSizer()->Detach(m_pWindow);
+                m_pWindow->Reparent(this);
+        }
+        m_pWindow->Show(true);
+        GetSizer()->Add(m_pWindow,1,wxEXPAND);
+}
+
+void DetachedDialog::SetTitulo(const wxString& titulo)
+{
+        SetTitle(titulo);
+}
+
+wxWindow* DetachedDialog::GetWindow()
+{
+        return m_pWindow;
+}
+
+wxString DetachedDialog::GetTitulo()
+{
+        return GetTitle();
+}
+
+void DetachedDialog::OnCloseDialogo(wxCloseEvent &event)
+{
+        if(!m_pVentanaPrincipal->CerrarVista(m_pWindow)) {
+                event.Veto();
+        } else {
+                event.Skip();
+                GetSizer()->Detach(m_pWindow);
+                GNC::GCS::ControladorVistas::Instance()->Destruir(m_pWindow);
+                // It's necessary to force this to activate startup view (and fill in archive menu)
+                if (m_pVentanaPrincipal->m_pNoteBook->GetPageCount() == 0) {
+                        //se muestra el mosaico
+                        m_pVentanaPrincipal->ShowStartUp(true);
+                }
+        }
+}
+
+//esto es para que se pinte correctamente el recuadro amarillo cuando cambias de ventana
+void DetachedDialog::OnVistaActivada(GNC::GCS::IVista* pVista)
+{
+        RefrescarVista(pVista);
+}
+
+void DetachedDialog::RefrescarVista(GNC::GCS::IVista* pVista)
+{
+        if(pVista != NULL) {
+                if(pVista->GetWindow()->GetParent() == m_pWindow) {
+                        m_pWindow->Refresh();
+                }
+        }
+}
+
+
+void DetachedDialog::OnBotonTitulo(wxCommandEvent &)
+{
+
+}
+}
+}
diff --git a/cadxcore/main/gui/mainwindow/detacheddialog.h b/cadxcore/main/gui/mainwindow/detacheddialog.h
new file mode 100644
index 0000000..0401781
--- /dev/null
+++ b/cadxcore/main/gui/mainwindow/detacheddialog.h
@@ -0,0 +1,51 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <main/gui/mainwindow/ventanaprincipalbase.h>
+#include <api/controllers/icontroladorvistas.h>
+
+class VentanaPrincipal;
+
+namespace GNC
+{
+namespace GUI
+{
+class DetachedDialog: public DetachedDialogBase, public GNC::GCS::IObservadorVistas
+{
+public:
+        DetachedDialog(wxWindow* pParent, VentanaPrincipal* pVentanaPrincipal);
+        ~DetachedDialog();
+        void AddPanel(wxWindow* pWin, const wxString& titulo);
+        void SetTitulo(const wxString& titulo);
+        wxWindow* GetWindow();
+        wxString GetTitulo();
+
+protected:
+        void OnBotonTitulo(wxCommandEvent &);
+        virtual void OnCloseDialogo(wxCloseEvent &event);
+        virtual void OnVistaActivada(GNC::GCS::IVista* pVista);
+        virtual void RefrescarVista(GNC::GCS::IVista* pVista);
+
+        wxWindow* m_pWindow;
+        VentanaPrincipal* m_pVentanaPrincipal;
+};
+}
+}
diff --git a/cadxcore/main/gui/mainwindow/ventanaprincipal.cpp b/cadxcore/main/gui/mainwindow/ventanaprincipal.cpp
new file mode 100644
index 0000000..9d2ae80
--- /dev/null
+++ b/cadxcore/main/gui/mainwindow/ventanaprincipal.cpp
@@ -0,0 +1,1921 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <iostream>
+#include <sstream>
+
+#include <wx/wx.h>
+#include <wx/zstream.h>
+#include <wx/wfstream.h>
+#include <wx/aui/aui.h>
+#include <wx/app.h>
+#include <wx/propgrid/propgrid.h>
+#include <wx/dir.h>
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/mstream.h>
+#include <wx/textfile.h>
+#include <wx/statbmp.h>
+
+#include <wx/filedlg.h>
+#include <wx/dirdlg.h>
+#include <wx/msgdlg.h>
+#include <wx/msgout.h>
+#include <wx/xml/xml.h>
+#include <wx/sstream.h>
+#include <wx/html/htmlwin.h>
+#include <wx/gbsizer.h>
+#include <wx/txtstrm.h>
+#include <wx/display.h>
+#include <wx/cmdline.h>
+#include <wx/stdpaths.h>
+#include <wx/mimetype.h>
+
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/gui/mainwindow/detacheddialog.h>
+#include <main/gui/login/dialogologin.h>
+#include <main/gui/open/abrir.h>
+#include <main/gui/license/aboutdialog.h>
+#include <main/gui/license/acceptlicensedialog.h>
+#include <main/gui/import/wxwizardimportacionginkgo.h>
+#include <main/gui/acquisition/dialogoadquisicion.h>
+#include <main/gui/ginkgocloud/ginkgocloudsearchdialog.h>
+#include <main/gui/history3/historypanel3.h>
+#include <main/gui/progress/statusbarprogreso.h>
+#include <main/gui/configuration/dialogoconfiguracion.h>
+#include <main/gui/hl7controlwindow/ventanacontrolhl7.h>
+#include <main/gui/logcontrolwindow/ventanacontrollogs.h>
+#include <main/gui/startup/startupview.h>
+#include <main/gui/droptargetmainwindow.h>
+
+#include <api/globals.h>
+#include <api/ivista.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/controllers/ipacscontroller.h>
+#include <api/controllers/icontroladorcarga.h>
+#include <api/toolsystem/itoolcontroller.h>
+#include <api/toolsystem/itoolsregistry.h>
+
+#include <main/entorno.h>
+
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/integrationcontroller.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/controllers/controladorhl7.h>
+#include <main/controllers/controladorenviohl7.h>
+#include <main/controllers/controladorautenticacion.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/dcmtk/dicomservers.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/windowattributescontroller.h>
+
+#include <commands/comandoactualizaciones.h>
+#include <commands/comandoincluirhistorial.h>
+#include <commands/openremovableunit.h>
+#include <commands/commandsynchronizewithgui.h>
+
+#include <eventos/updateavailable.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#define ID_CERRAR 1054
+#define ID_CERRAR_TODAS 1055
+#define ID_SALIR 1059
+#define ID_ONLINE_SUPPORT 1060
+#define ID_ACERCA_DE 1062
+#define ID_CONFIGURACION 1063
+#define ID_PANTALLA_COMPLETA 1070
+#define ID_MOSAICO_RESTAURAR 1075
+#define ID_CONTROLHL7 1076
+#define ID_CONTROLLOGS 1077
+#define ID_CHECK_UPDATES 1078
+#define ID_ONLINE_MANUAL 1079
+#define ID_EXTENSIONS_SUPPORT 1081
+#define ID_OPEN_TEST_CARD 1082
+
+#define MAIN_WINDOW_ID "GinkgoCADxMain"
+
+//////////////////////////
+#if defined(GINKGO_PRO)
+int InitTest(const std::string& pathTests);
+/**
+launches cppunit tests
+*/
+class TestLauncher: public wxThread
+{
+public:
+        TestLauncher(const std::string& pathTests) :m_path(pathTests)
+        {
+        }
+        virtual void *Entry()
+        {
+                LOG_INFO("INITWX", "Launching from external thread");
+                InitTest(m_path);
+                LOG_INFO("INITWX", "tests complete, launching closing command");
+
+                class CloseCommand: public GADAPI::ISynchronizedWithGUI
+                {
+                        virtual void ExecuteSynchronized(GADAPI::ISynchronizedData* )
+                        {
+                                LOG_INFO("INITWX", "Closing Ginkgo CADx...");
+                                GNC::Entorno::Instance()->GetVentanaPrincipal()->Close(true);
+                                wxExit();
+                                exit(0);
+                        }
+                };
+                GADAPI::CommandSynchronizeWithGUI* pCmd = new GADAPI::CommandSynchronizeWithGUI(new CloseCommand());
+                GNC::CommandController::Instance()->ProcessAsync("", pCmd, NULL);
+                LOG_INFO("INITWX", "closing command launched");
+
+                return NULL;
+        }
+        std::string m_path;
+};
+#endif
+///////////
+
+class wxGinkgoAuiNoteBook: public wxAuiNotebook
+{
+public:
+        wxGinkgoAuiNoteBook(): wxAuiNotebook()
+        { }
+
+        wxGinkgoAuiNoteBook(wxWindow* parent,
+                            wxWindowID id = wxID_ANY,
+                            const wxPoint& pos = wxDefaultPosition,
+                            const wxSize& size = wxDefaultSize,
+                            long style = wxAUI_NB_DEFAULT_STYLE): wxAuiNotebook(parent, id, pos, size, style)
+        {
+        }
+
+        virtual ~wxGinkgoAuiNoteBook()
+        {
+        }
+        //hack to expose this method
+        virtual wxAuiTabCtrl* GetActiveTabCtrl()
+        {
+                return wxAuiNotebook::GetActiveTabCtrl();
+        }
+};
+
+////
+
+
+EventoProgreso::EventoProgreso(TipoProgreso tipo, long threadId)
+{
+        SetEventType(wxEVT_PROGRESO);
+        m_Tipo = tipo;
+        m_ThreadId = threadId;
+}
+
+EventoProgreso::EventoProgreso(const EventoProgreso& event) : wxEvent(event), m_Tipo(event.m_Tipo), m_ThreadId(event.m_ThreadId)
+{
+}
+
+EventoProgreso::~EventoProgreso()
+{
+}
+
+wxEvent* EventoProgreso::Clone() const
+{
+        return new EventoProgreso(*this);
+}
+
+IMPLEMENT_DYNAMIC_CLASS(EventoProgreso, wxEvent)
+
+// Mapeo de eventos
+
+BEGIN_EVENT_TABLE(VentanaPrincipal, VentanaPrincipalBase)
+        EVT_CLOSE(VentanaPrincipal::OnWindowClose)
+        EVT_MENU(ID_Inicio_Aplicacion, VentanaPrincipal::OnInicioAplicacion)
+END_EVENT_TABLE()
+
+VentanaPrincipal::VentanaPrincipal(wxWindow* pParent, const wxString& title) :
+        VentanaPrincipalBase(pParent, wxID_ANY, title, wxDefaultPosition, wxSize( 800,600 ), wxDEFAULT_FRAME_STYLE),
+        m_mgr(m_pPanelCentral, wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_TRANSPARENT_DRAG | wxAUI_MGR_VENETIAN_BLINDS_HINT ),
+        StartupView(NULL)
+{
+        //load attributes
+        GNC::GCS::WindowAttributesController::LoadWindowAttributes(MAIN_WINDOW_ID, this, false);
+        //
+
+        //SetDoubleBuffered(true);
+        m_Iniciada = false;
+        m_VersionChecked = false;
+        wxIcon icono;
+        icono.CopyFromBitmap(GinkgoResourcesManager::Logos::GetLogoGinkgo32x32());
+        this->SetIcon(icono);
+
+        m_TratandoDeCerrar = false;
+        m_SuperFreezeCount = 0;
+
+        disabler = NULL;
+
+        GNC::Entorno* pEntorno = GNC::Entorno::Instance();
+
+        pEntorno->SetVentanaPrincipal(this);
+        pEntorno->SetVentanaRaiz(m_pPanelCentral);
+
+        SetAutoLayout(true);
+
+        // Subscripción a la notificación de carga y descarga de extensiones
+        pEntorno->ExtensionsObservers.push_back(this);
+
+        // Subscripción a la notificación de activación y desactivación de vistas/estudios
+        pEntorno->ViewsObservers.push_back(this);
+
+        m_mgr.SetDockSizeConstraint(0.5f, 0.5f);
+
+        //menu and tool bar
+        m_pMenuBar = new wxMenuBar( wxMB_DOCKABLE );
+        //
+
+        GNC::GUI::StatusBarProgreso* pStatusBar = new GNC::GUI::StatusBarProgreso(this, m_pPanelCentral, true);
+        SetStatusBar(pStatusBar);
+
+        {
+                wxString wxCaption = _("Tasks");
+                wxAuiPaneInfo pi(wxAuiPaneInfo().Caption(wxCaption).Float().BestSize(400,170).MinSize(200,100).Resizable(true).CloseButton(true).Show(false));
+                pi.DestroyOnClose(false);
+                m_mgr.AddPane(pStatusBar->m_pPanelTareas, pi);
+        }
+
+        GNC::CommandController::Instance()->RegistrarProgreso(pStatusBar);
+        Connect(wxEVT_PROGRESO, EventoProgresoFunctionHandler(VentanaPrincipal::OnComando), NULL, this);
+
+        m_pNoteBook = new wxGinkgoAuiNoteBook(m_pPanelCentral, wxID_ANY,wxDefaultPosition,
+                                              wxDefaultSize,
+                                              wxAUI_NB_TAB_SPLIT |  wxAUI_NB_TAB_MOVE | wxAUI_NB_SCROLL_BUTTONS
+                                              | wxAUI_NB_WINDOWLIST_BUTTON | wxAUI_NB_CLOSE_ON_ALL_TABS | wxEXPAND );
+        m_pNoteBook->SetBackgroundColour(wxColour(0, 0, 0));
+        m_pNoteBook->Connect( wxEVT_CHILD_FOCUS, wxChildFocusEventHandler( VentanaPrincipal::OnNotebookFocus ) );
+
+        m_mgr.AddPane(m_pNoteBook, wxAuiPaneInfo().Name(wxT("vistas")).CenterPane().Layer(0).PaneBorder(true).Movable(false).Floatable(false).Dockable(false).LeftDockable(false).RightDockable(false).TopDockable(false).BottomDockable(false).CloseButton(false).Hide());
+        //
+
+        wxString wxCaption;
+        m_mgr.Update();
+
+
+        //hay que conectarlo al auimanager, porque el notebook delega el procesado de eventos al auimanager
+        {
+                m_mgr.Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(VentanaPrincipal::OnNotebookPageClose),NULL,this);
+                m_mgr.Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGING, wxAuiNotebookEventHandler(VentanaPrincipal::OnNotebookPageChanging), NULL, this);
+                m_mgr.Connect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler(VentanaPrincipal::OnNotebookPageChanged),NULL,this);
+                m_mgr.Connect(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_UP, wxAuiNotebookEventHandler(VentanaPrincipal::OnNotebookMenuTab),NULL,this);
+                m_mgr.Connect(wxEVT_COMMAND_AUINOTEBOOK_TAB_RIGHT_DOWN, wxAuiNotebookEventHandler(VentanaPrincipal::OnNotebookCambiarTab),NULL,this);
+
+                m_mgr.Connect(wxEVT_AUI_PANE_CLOSE, wxAuiManagerEventHandler(VentanaPrincipal::OnPanelClose),NULL,this);
+        }
+
+        SetDropTarget(new GNC::GUI::DropTargetMainWindow());
+
+        Layout();
+
+}
+
+VentanaPrincipal::~VentanaPrincipal()
+{
+        m_pNoteBook->Disconnect( wxEVT_CHILD_FOCUS, wxChildFocusEventHandler( VentanaPrincipal::OnNotebookFocus ) );
+
+        Disconnect(wxEVT_PROGRESO, EventoProgresoFunctionHandler(VentanaPrincipal::OnComando), NULL, this);
+        GNC::CommandController::Instance()->RegistrarProgreso(NULL);
+        GNC::GUI::DialogoAdquisicion::FreeInstance();
+        GNC::GUI::GinkgoCloudSearchDialog::FreeInstance();
+        GNC::GCS::ICommandController::Instance()->AbortarComandosDeOwner(NULL);
+        //cierra la ventana si esta abierta
+        GNC::GUI::VentanaControlHL7::CerrarSiAbierta();
+        GNC::GUI::VentanaControlLogs::CerrarSiAbierta();
+
+        {
+                m_mgr.Disconnect(wxEVT_COMMAND_AUINOTEBOOK_PAGE_CLOSE, wxAuiNotebookEventHandler(VentanaPrincipal::OnNotebookPageClose),NULL,this);
+                m_mgr.Disconnect(m_pNoteBook->GetId(), wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler(VentanaPrincipal::OnNotebookPageChanged),NULL,this);
+        }
+
+
+        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnMenuCerrarTabClick ) );
+        this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( VentanaPrincipal::OnMenuCerrarTabUpdateUI ) );
+        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnMenuCerrarTodosTabsClick ) );
+        this->Disconnect( wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( VentanaPrincipal::OnMenuCerrarTodosTabsUpdateUI ) );
+        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnSalir ) );
+        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnConfiguracion ) );
+        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnMensajesHL7 ) );
+        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnControlLogs ) );
+        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnAcercaDe ) );
+        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnPantallaCompleta ) );
+        this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnMosaicoRestaurar ) );
+
+        //delete history tools
+        GNC::HistoryToolsController::Instance()->UnRegisterAll();
+
+        //
+        GNC::Entorno* pEntorno = GNC::Entorno::Instance();
+
+        GNC::ControladorExtensiones::Instance()->DesRegistrarModulos();
+        GNC::GCS::ControladorVistas::FreeInstance();
+        m_mgr.UnInit();
+        pEntorno->ExtensionsObservers.remove(this);
+        pEntorno->ViewsObservers.remove(this);
+        pEntorno->SetVentanaPrincipal(NULL);
+        pEntorno->SetVentanaRaiz(NULL);
+
+        //save attributes
+        GNC::GCS::WindowAttributesController::SaveWindowAttributes(MAIN_WINDOW_ID, this);
+}
+
+//region "Eventos de comprobacion de actualizaciones"
+void VentanaPrincipal::ComprobarActualizaciones()
+{
+        bool check;
+        GNC::GCS::ConfigurationController::Instance()->readBoolGeneral("/GinkgoCore/Estacion", "CheckForUpdates", check, true);
+        if (check) {
+                m_VersionChecked = false;
+                //this is the profile
+                GNC::GCS::Permisos::EstadoPermiso updates = GNC::GCS::IControladorPermisos::Instance()->Get("core.update","check_updates");
+                if (updates) {
+                        bool tryCheck = false;
+                        std::string lastDateStr;
+                        if (GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/LastUpdateDateTime", "LastDate", lastDateStr)) {
+                                GNC::GCS::Permisos::EstadoPermiso period = GNC::GCS::IControladorPermisos::Instance()->Get("core.update","update_period");
+                                std::string periodStr = period.ObtenerValor<std::string>();
+                                long iPeriod;
+                                if (!wxString::FromUTF8(periodStr.c_str()).ToLong(&iPeriod)) {
+                                        iPeriod = 2;
+                                }
+
+                                wxDateTime lastDate;
+
+                                lastDate.ParseFormat(wxString::FromUTF8(lastDateStr.c_str()), wxT("%d/%m/%Y %H:%M:%S"));
+                                if (!lastDate.IsValid()) {
+                                        lastDate = wxDateTime::Now();
+                                        lastDate.Subtract( wxDateSpan(0, 0, 0, iPeriod + 1 ) );
+                                }
+
+                                if (wxDateTime::Now().Subtract(lastDate).GetDays() > iPeriod) {
+                                        tryCheck = true;
+                                        GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Check Updates"),
+                                                        new GNC::ComandoComprobarActualizaciones(new GNC::ComandoComprobarActualizacionesParams(updates.ObtenerValor<std::string>(), false) ), this);
+                                }
+
+                        } else {
+                                //if there is no date in the ini file update will be checked
+                                GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Check Updates"),
+                                                new GNC::ComandoComprobarActualizaciones(new GNC::ComandoComprobarActualizacionesParams(updates.ObtenerValor<std::string>(), false) ), this);
+                                tryCheck = true;
+                        }
+
+                        if (tryCheck) {
+                                //writes date
+                                GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/LastUpdateDateTime", "LastDate", std::string(wxDateTime::Now().Format(wxT("%d/%m/%Y %H:%M:%S")).ToUTF8()));
+                        }
+                }
+        }
+
+}
+
+void VentanaPrincipal::OnDoNotWarnAgainClicked( wxCommandEvent& /*event*/ )
+{
+        if (m_VersionChecked) {
+                wxString valor;
+                GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/SkipUpdate", m_VersionCheck, "1");
+                GNC::GCS::ConfigurationController::Instance()->Flush();
+        }
+
+}
+
+void VentanaPrincipal::OnVersionNotifierClose( wxCommandEvent& /*event*/ )
+{
+        wxWindowDisabler dis;
+        SuperFreeze();
+        m_pPanelActualizacion->Hide();
+        //m_pPanelCentral->Layout();
+        Layout();
+        Refresh(true);
+        SuperThaw();
+
+}
+//endregion
+
+
+
+void VentanaPrincipal::ForzarCambioVista(GNC::GCS::IVista* pVistaCambiar)
+{
+        //se cambia la pestaña
+        //bool cerrar = true;
+
+        this->SetFocus();
+        GNC::GCS::ControladorVistas* pcv = GNC::GCS::ControladorVistas::Instance();
+        if (pcv == NULL) {
+                std::cerr << "Error: No se pudo obtener el controlador de vistas" << std::endl;
+                return ;
+        }
+
+        if (pcv->GetVistaActiva() != pVistaCambiar) {
+                pcv->SolicitarActivarVista(pVistaCambiar);
+        }
+
+        for (GNC::GCS::ControladorVistas::MapaVentanas::iterator it = pcv->m_MapaVentanas.begin(); it != pcv->m_MapaVentanas.end(); ++it) {
+                wxWindow* pVentana = (*it).first;
+                GNC::GCS::IVista*   pVista = (*it).second;
+                if (pVentana != NULL && pVista != NULL) {
+                        if (pVistaCambiar == pVista) {
+                                //Tenemos la ventana, la vista y el estudio
+                                //primero cambiamos de pestaña
+                                int selection = m_pNoteBook->GetPageIndex(pVentana);
+                                if (m_pNoteBook->IsShown() && selection >= 0) {
+                                        if(selection >= 0 && selection != m_pNoteBook->GetSelection()) {
+                                                wxWindowDisabler dis;
+                                                SuperFreeze();
+                                                m_pNoteBook->SetSelection(selection);
+                                                SuperThaw();
+                                                return;
+                                        }
+                                } else {
+                                        //desencajado
+                                        GNC::GUI::DetachedDialog* pDialogo = dynamic_cast<GNC::GUI::DetachedDialog*> (pVentana->GetParent());
+                                        if(pDialogo != NULL) {
+                                                if (pDialogo->IsIconized()) {
+                                                        pDialogo->Iconize(false);
+                                                }
+                                                pDialogo->Raise();
+                                        }
+                                }
+                        }
+                }
+        }
+}
+
+void VentanaPrincipal::OnSalir(wxCommandEvent& WXUNUSED(event))
+{
+        SuperFreeze();
+        Close();
+        SuperThaw();
+}
+void VentanaPrincipal::OnAcercaDe(wxCommandEvent& WXUNUSED(event))
+{
+        AboutDialog(this).ShowModal();
+}
+
+
+void VentanaPrincipal::OnOnlineHelp(wxCommandEvent& /*event*/)
+{
+        GNC::GCS::Permisos::EstadoPermiso manual = GNC::GCS::IControladorPermisos::Instance()->Get("core.help","url_manual");
+        wxString urlManual = wxString::FromUTF8(manual.ObtenerValor<std::string>().c_str());
+        if (urlManual != wxEmptyString) {
+                if (urlManual.StartsWith(wxT("http://"))) {
+                        wxLaunchDefaultBrowser(urlManual);
+                } else {
+                        urlManual.Replace(wxT("\\"), wxString(wxFileName::GetPathSeparator()));
+                        wxFileName executable_path = wxStandardPaths::Get().GetExecutablePath();
+                        wxString pathDocument = executable_path.GetPath() + wxFileName::GetPathSeparator() + urlManual;
+                        wxFileType* fileType = wxTheMimeTypesManager->GetFileTypeFromMimeType(wxT("application/pdf"));
+                        if (fileType == NULL) {
+                                wxMessageBox(_("There isn't any pdf reader registered in the system"), _("Info"), wxICON_WARNING|wxOK);
+                                return;
+                        }
+
+                        wxString openCmd = fileType->GetOpenCommand(pathDocument);
+                        if (!openCmd.IsEmpty()) {
+                                wxExecute(openCmd);
+                        } else {
+                                wxMessageBox(_("There isn't any pdf reader registered in the system"), _("Info"), wxICON_WARNING|wxOK);
+                        }
+
+                        delete fileType;
+                }
+        }
+}
+
+void VentanaPrincipal::OnOnlineSupport(wxCommandEvent& /*event*/)
+{
+        GNC::GCS::Permisos::EstadoPermiso updates = GNC::GCS::IControladorPermisos::Instance()->Get("core.help","url_support");
+        wxString urlSupport = wxString::FromUTF8(updates.ObtenerValor<std::string>().c_str());
+        if (urlSupport != wxEmptyString) {
+                wxLaunchDefaultBrowser(urlSupport);
+        }
+}
+
+void VentanaPrincipal::OnOpenTestCard(wxCommandEvent& /*event*/)
+{
+        wxFileName cpath = FROMPATH(GNC::GCS::IEntorno::Instance()->GetGinkgoResourcesDir()) + wxFileName::GetPathSeparator() + wxT("test_card.dcm");
+        std::string stdpath(cpath.GetFullPath().ToUTF8());
+        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(stdpath, false, GNC::GCS::IHistoryController::TAA_LINK);
+        pParams->m_abrirDespuesDeCargar = true;
+        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+        GNC::Entorno::Instance()->GetCommandController()->ProcessAsync(_Std("Included in the history ..."),pCmd, NULL);
+}
+
+/* Evento de lanzamiento de la comprobacion de actualizaciones */
+void VentanaPrincipal::OnCheckForUpdates(wxCommandEvent& /*event*/)
+{
+        m_VersionChecked = false;
+        GNC::GCS::Permisos::EstadoPermiso updates = GNC::GCS::IControladorPermisos::Instance()->Get("core.update","check_updates");
+        if (updates.ObtenerValor<std::string>().empty()) {
+                wxMessageBox(_("There is no URL to check updates on the current configuration."), _("Check update error"),wxICON_ERROR);
+        } else {
+                GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Check Updates"),
+                                new GNC::ComandoComprobarActualizaciones(new GNC::ComandoComprobarActualizacionesParams(updates.ObtenerValor<std::string>(), true) ), this);
+
+                GNC::GCS::ConfigurationController::Instance()->writeStringGeneral("/GinkgoCore/LastUpdateDateTime", "LastDate", std::string(wxDateTime::Now().Format().ToUTF8()));
+        }
+}
+
+/*startup page*/
+
+
+class DialogoComandosEnEjecucion: public DialogoComandosEnEjecucionBase
+{
+public:
+        DialogoComandosEnEjecucion(wxWindow* pParent, std::list<std::string>& listaNombres) : DialogoComandosEnEjecucionBase(pParent)
+        {
+                for (std::list<std::string>::iterator it = listaNombres.begin(); it!= listaNombres.end(); ++it) {
+                        m_pListacomandos->Append(wxString::FromUTF8((*it).c_str()));
+                }
+                Layout();
+        }
+
+        ~DialogoComandosEnEjecucion()
+        {
+        }
+};
+
+void VentanaPrincipal::OnWindowClose(wxCloseEvent& event)
+{
+#if defined (_WINDOWS)
+        wxWindowDisabler* dis = new wxWindowDisabler();
+#endif
+        SuperFreeze();
+
+        GNC::CommandController::ListaNombreComandos comandos =  GNC::CommandController::Instance()->GetComandosActivos();
+        if(comandos.size()>0 && event.CanVeto()) {
+                DialogoComandosEnEjecucion dlg(this,comandos);
+#if defined (_WINDOWS)
+                delete dis;
+                dis = NULL;
+#endif
+                this->SuperThaw();
+                int answer = dlg.ShowModal();
+#if defined (_WINDOWS)
+                dis = new wxWindowDisabler();
+#endif
+                this->SuperFreeze();
+                if(answer != wxID_OK) {
+                        event.Veto(true);
+#if defined (_WINDOWS)
+                        delete dis;
+#endif
+                        this->SuperThaw();
+                        return;
+                }
+        }
+
+        GNC::GCS::ICommandController::Instance()->AbortarComandosDeOwner(this);
+
+        if(CerrarTodosLosTabsYPanelGrids()) {
+                //cerramos todos las ventanas flotantes que podamos haber abierto...
+                int numeroVistas = GNC::GCS::ControladorVistas::Instance()->GetVistas().size();
+                while (numeroVistas == (int)GNC::GCS::ControladorVistas::Instance()->GetVistas().size() && GNC::GCS::ControladorVistas::Instance()->GetVistas().size()>0) {
+                        wxWindow* ventana = GNC::GCS::ControladorVistas::Instance()->GetVistas().front()->GetWindow();
+                        GNC::GUI::DetachedDialog* pDialogo = dynamic_cast<GNC::GUI::DetachedDialog*> (ventana->GetParent());
+                        if(pDialogo != NULL) {
+                                if(!pDialogo->Close() && event.CanVeto()) {
+                                        event.Veto(true);
+                                        break;
+                                }
+                        }
+                        numeroVistas --;
+                }
+                if(GNC::GCS::ControladorVistas::Instance()->GetVistas().size() != 0 && event.CanVeto()) {
+                        event.Veto(true);
+                } else {
+                        this->Destroy();
+                }
+        } else {
+                //si quedan tabs o panelgrids
+                if (event.CanVeto()) {
+                        event.Veto(true);
+                }
+        }
+        SuperThaw();
+        if (!event.GetVeto()) {
+                GNC::Entorno::Instance()->SetVentanaPrincipal(NULL);
+                GNC::Entorno::Instance()->SetVentanaRaiz(NULL);
+        }
+#if defined(_WINDOWS)
+        delete dis;
+#endif
+}
+
+#ifdef __WXMAC__
+void VentanaPrincipal::MacOpenFile(const wxString &fileName)
+{
+        try {
+                std::list<std::string> ruta;
+                ruta.push_back(std::string(fileName.ToUTF8()));
+                //m_pHistorial->CargarDICOM(ruta,true);
+        } catch(GIL::DICOM::I2DException& i) {
+                LOG_ERROR("Principal", "Error al cargar fichero: " << i.str());
+        }
+}
+#endif
+
+
+/* Evento de configuracion */
+void VentanaPrincipal::OnConfiguracion(wxCommandEvent& /*event*/)
+{
+
+        GNC::GUI::DialogoConfiguracion config(this);
+        config.ShowModal();
+}
+
+/*Evento de ventana de control de envio HL7*/
+void VentanaPrincipal::OnMensajesHL7(wxCommandEvent& /*event*/)
+{
+        GNC::GUI::VentanaControlHL7* ventana = GNC::GUI::VentanaControlHL7::Instance();
+        if(!ventana->IsActive()) {
+                ventana->RequestUserAttention();
+        }
+}
+
+/*Evento de ventana de control de registros (Logs)*/
+void VentanaPrincipal::OnControlLogs(wxCommandEvent& /*event*/)
+{
+        GNC::GUI::VentanaControlLogs* ventana = GNC::GUI::VentanaControlLogs::Instance();
+        if(!ventana->IsActive()) {
+                ventana->RequestUserAttention();
+        }
+}
+
+/* Evento de aplicacion de herramienta*/
+void VentanaPrincipal::OnAplicarHerramienta(wxCommandEvent& /*event*/)
+{
+        /*
+        GNC::GCS::IControladorHerramientas* cH = GNC::Entorno::Instance()->GetControladorHerramientas();
+        GNC::GCS::ITool* herr = NULL;
+        try {
+        	// Subscribimos la vista al contrato de herr
+        	herr= cH->ObtenerHerramienta(event.GetId());
+        	if(herr!=NULL){
+        		herr->SolicitarActivacion(GNC::GCS::TriggerButton().EnableLeft());
+        	}
+        }
+        catch (GNC::GCS::ControladorHerramientasException& ex) {
+        	std::cerr << "Error al obtener la herramienta puntero: No se pudo subscribir la herramienta: " << ex.GetCause() << std::endl;
+        }
+        event.Skip(false);
+        */
+}
+
+void VentanaPrincipal::OnUpdateUIHerramienta(wxUpdateUIEvent& /*event*/)
+{
+        /*
+        GNC::GCS::IControladorHerramientas* cH = GNC::Entorno::Instance()->GetControladorHerramientas();
+        GNC::GCS::ITool* herr = NULL;
+        try {
+        	// Subscribimos la vista al contrato de herr
+        	herr = cH->ObtenerHerramienta(event.GetId());
+        	if(herr!=NULL){
+        		event.Enable(herr->Habilitada());
+        		event.Show(herr->Habilitada());
+        	}
+        	else{
+        		event.Enable(false);
+        		event.Show(false);
+        	}
+        }
+        catch (GNC::GCS::ControladorHerramientasException& ex) {
+        	std::cerr << "Error al obtener la herramienta puntero: No se pudo subscribir la herramienta: " << ex.str() << std::endl;
+        }
+        event.Skip(true);
+        */
+}
+
+/* Eventos de teclado */
+void VentanaPrincipal::OnKeyDown(wxKeyEvent& event)
+{
+        GNC::GCS::IVista* pVista = GNC::GCS::ControladorVistas::Instance()->GetVistaActiva();
+        if(pVista != NULL) {
+                wxKeyEvent evt = event;
+                wxWindow* win = pVista->GetWindow();
+                if (win) {
+                        win->GetEventHandler()->AddPendingEvent(evt);
+                }
+                event.Skip(false);
+        } else {
+                event.Skip(true);
+        }
+}
+
+void VentanaPrincipal::OnMenuCerrarTabClick(wxCommandEvent& )
+{
+        GNC::GCS::IVista* pVista = GNC::GCS::ControladorVistas::Instance()->GetVistaActiva();
+        if(pVista != NULL) {
+                wxWindow* pVentana = pVista->GetWindow();
+                if(pVentana != NULL) {
+                        if(m_pNoteBook->GetPageIndex(pVentana) >= 0 && m_pNoteBook->GetSelection()!=-1) {
+                                wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, m_pNoteBook->GetSelection());
+                                evt.SetInt(wxAUI_BUTTON_CLOSE);
+                                evt.SetId(5380+500);
+                                evt.SetEventObject(((wxGinkgoAuiNoteBook*)m_pNoteBook)->GetActiveTabCtrl());
+                                m_pNoteBook->GetEventHandler()->ProcessEvent(evt);
+                        }
+                }
+        }
+}
+
+void VentanaPrincipal::OnMenuCerrarTodoExceptoActiva(wxCommandEvent& )
+{
+        /*NO ESTA CORRECTO
+         unsigned int pestanias = m_pNoteBook->GetPageCount();
+         //la segunda condicion es para que si das a cancelar pues pare
+         unsigned int tabActual = pestanias - 1;
+         while(m_pNoteBook->GetPageCount() > 1 && pestanias == m_pNoteBook->GetPageCount()){
+         if(m_pNoteBook->GetPage(tabActual) == m_pNoteBook->GetActiveTabCtrl()){
+
+         } else {
+         wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, m_pNoteBook->GetPage(tabActual)->GetId());
+         evt.SetInt(wxAUI_BUTTON_CLOSE);
+         evt.SetEventObject(m_pNoteBook->GetPage(tabActual));
+         m_pNoteBook->GetEventHandler()->ProcessEvent(evt);
+         pestanias --;
+         }
+         }	*/
+
+}
+
+void VentanaPrincipal::OnMenuCerrarTodosTabsClick(wxCommandEvent& )
+{
+        CerrarTodosLosTabsYPanelGrids();
+}
+
+//devuelve bool si ha cerrado todos
+bool VentanaPrincipal::CerrarTodosLosTabsYPanelGrids()
+{
+        bool todosCerrados = false;
+        unsigned int pestanias = m_pNoteBook->GetPageCount();
+        //la segunda condicion es para que si das a cancelar pues pare
+        while(m_pNoteBook->GetPageCount() > 0 && pestanias == m_pNoteBook->GetPageCount()) {
+                wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, m_pNoteBook->GetSelection());
+                evt.SetInt(wxAUI_BUTTON_CLOSE);
+                evt.SetId(5380+500);
+                evt.SetEventObject(((wxGinkgoAuiNoteBook*)m_pNoteBook)->GetActiveTabCtrl());
+                m_pNoteBook->GetEventHandler()->ProcessEvent(evt);
+                pestanias --;
+        }
+
+        if(m_pNoteBook->GetPageCount() == 0) {
+                //se cierran los paneles tabs...
+                todosCerrados = true;
+        }
+
+        // Se han eliminado todas las paginas
+        //se muestra el mosaico
+        ShowStartUp(todosCerrados);
+
+        return todosCerrados;
+}
+
+bool VentanaPrincipal::ClosesAllUndocked()
+{
+        std::list<GNC::GUI::DetachedDialog*> listaDesencajados;
+        GNC::GCS::ControladorVistas::TipoListaVistas viewsList = GNC::GCS::ControladorVistas::Instance()->GetVistas();
+        for (GNC::GCS::ControladorVistas::TipoListaVistas::iterator it = viewsList.begin(); it != viewsList.end(); ++it) {
+                GNC::GUI::DetachedDialog* pPanel = dynamic_cast<GNC::GUI::DetachedDialog*> ((*it)->GetWindow()->GetParent());
+                if(pPanel!=NULL) {
+                        listaDesencajados.push_back(pPanel);
+                }
+        }
+
+        for (std::list<GNC::GUI::DetachedDialog*>::iterator it = listaDesencajados.begin(); it != listaDesencajados.end(); ++it) {
+                if (!(*it)->Close()) {
+                        return false;
+                }
+        }
+        return true;
+}
+
+void VentanaPrincipal::OnMenuPrimerPlanoPestaniaActiva(wxCommandEvent& )
+{
+        if(m_pNoteBook->GetPageCount() > 0) {
+                PasarAPrimerPlano(m_pNoteBook->GetPage(m_pNoteBook->GetSelection()));
+        }
+}
+
+void VentanaPrincipal::OnMenuCerrarTabUpdateUI(wxUpdateUIEvent& event)
+{
+        event.Enable(m_pNoteBook->GetPageCount() > 0);
+}
+
+void VentanaPrincipal::OnMenuCerrarTodosTabsUpdateUI(wxUpdateUIEvent& event)
+{
+        event.Enable(m_pNoteBook->GetPageCount() > 0);
+}
+
+
+/*Eventos de impresion*/
+
+
+void VentanaPrincipal::OnPantallaCompleta(wxCommandEvent& )
+{
+        this->ShowFullScreen(!this->IsFullScreen(),wxFULLSCREEN_NOBORDER|wxFULLSCREEN_NOCAPTION);
+}
+
+wxWindow* VentanaPrincipal::GetRootWindow()
+{
+        return m_pPanelCentral;
+}
+
+void VentanaPrincipal::EncajarDesencajar(GNC::GCS::IVista* pVista)
+{
+        if(pVista != NULL) {
+                wxWindow* pVentana = pVista->GetWindow();
+                if(pVentana != NULL) {
+                        GNC::GCS::ControladorVistas::Instance()->SolicitarActivarVista(NULL);
+                        //la buscamos en el notebook
+                        if(m_pNoteBook->GetPageIndex(pVentana) >= 0) {
+                                GNC::GUI::DetachedDialog* pDlg;
+                                {
+#if defined (_WINDOWS)
+                                        wxWindowDisabler dis;
+#endif
+
+                                        SuperFreeze();
+                                        wxString caption = m_pNoteBook->GetPageText(m_pNoteBook->GetPageIndex(pVentana));
+                                        wxString titulo = m_pNoteBook->GetPageText(m_pNoteBook->GetPageIndex(pVentana));
+
+                                        m_pNoteBook->RemovePage(m_pNoteBook->GetPageIndex(pVentana));
+
+                                        if (m_pNoteBook->GetPageCount() == 0) {
+                                                ShowStartUp(true);
+                                        }
+
+                                        pDlg = new GNC::GUI::DetachedDialog(this, this);
+                                        pDlg->AddPanel(pVentana, titulo);
+
+                                        m_mgr.Update();
+                                        pDlg->Show(true);
+                                        SuperThaw();
+
+                                }
+                        } else { //esta desencajada => la encajamos
+                                GNC::GUI::DetachedDialog* pDlg = dynamic_cast<GNC::GUI::DetachedDialog*>(pVentana->GetParent());
+                                if(pDlg != NULL) {
+#if defined (_WINDOWS)
+                                        wxWindowDisabler dis;
+#endif
+                                        pDlg->Show(false);
+                                        pDlg->GetSizer()->Detach(pVentana);
+                                        SuperFreeze();
+                                        //encajar!
+                                        //encajar en el notebook
+                                        ShowStartUp(false);
+                                        pVentana->Reparent(m_pNoteBook);
+                                        m_pNoteBook->AddPage(pVentana, pDlg->GetTitulo());
+                                        pDlg->Destroy();
+                                        m_pNoteBook->Refresh();
+                                        m_mgr.GetPane(m_pNoteBook).Show(true);
+                                        m_mgr.Update();
+                                        SuperThaw();
+                                }
+                        }
+                        GNC::GCS::ControladorVistas::Instance()->SolicitarActivarVista(pVista);
+                }
+        }
+}
+
+
+void VentanaPrincipal::ShowStartUp(bool show)
+{
+        bool update = false;
+        if (StartupView == NULL) {
+                return;
+        }
+        if (StartupView->GetWindow()->IsShown() != show) {
+                m_mgr.GetPane(StartupView->GetWindow()).Show(show);
+                update = true;
+        }
+        if (show) {
+                GNC::GCS::ControladorVistas::Instance()->SolicitarActivarVista(StartupView);
+        }
+        if (m_pNoteBook->IsShown() == show) {
+                m_mgr.GetPane(m_pNoteBook).Show(!show);
+                update = true;
+                m_pNoteBook->Refresh(false);
+        }
+        if (update) {
+                m_mgr.Update();
+        }
+}
+
+void VentanaPrincipal::OnMosaicoRestaurar(wxCommandEvent& )
+{
+        wxWindowDisabler disabler;
+        SuperFreeze();
+        ReplegarPestanias();
+        m_mgr.Update();
+        SuperThaw();
+}
+
+void VentanaPrincipal::ReplegarPestanias()
+{
+        //remember the tab now selected
+        int nowSelected = m_pNoteBook->GetSelection();
+        //select first tab as destination
+        m_pNoteBook->SetSelection(0);
+        //iterate all other tabs
+        for( unsigned int idx = 0; idx < m_pNoteBook->GetPageCount(); idx++) {
+                //get win reference
+                wxWindow* win = m_pNoteBook->GetPage(idx);
+                //get tab title
+                wxString title = m_pNoteBook->GetPageText(idx);
+                //remove from notebook
+                m_pNoteBook->RemovePage(idx);
+                //re-add in the same position so it will tab
+                m_pNoteBook->InsertPage(idx, win, title);
+        }
+        //restore orignial selected tab
+        m_pNoteBook->SetSelection(nowSelected);
+}
+
+/* Añade una nueva pestaña al panel de estudios */
+void VentanaPrincipal::InsertarVentana(wxWindow* pVentana)
+{
+        wxWindowDisabler disabler;
+        SuperFreeze();
+        ShowStartUp(false);
+
+        m_pNoteBook->AddPage(pVentana, wxEmptyString, false);
+        m_mgr.Update();
+        SuperThaw();
+}
+
+/* Elimina un tab del panel de estudios */
+void VentanaPrincipal::EliminarVentana(wxWindow *WXUNUSED(pVentana))
+{
+        std::cerr << "Error: Metodo no implementado VentanaPrincipal::EstudioRemoveTab(Tab* t)" << std::endl;
+        throw new std::exception();
+}
+
+void VentanaPrincipal::OnInicioAplicacion(wxCommandEvent &)
+{
+        //parameters parsing...
+        bool aceptedLicense = false;
+        bool versionParameter = false;
+        wxString pathOfFile = wxEmptyString;
+
+        int argc = GNC::Entorno::Instance()->GetApp()->argc;
+        wxChar** argv = GNC::Entorno::Instance()->GetApp()->argv;
+        if (argc > 1) {
+                for (int i = 1; i < argc; i++) {
+                        wxString param(argv[i]);
+
+                        if ( param.CmpNoCase(wxT("-version")) == 0 || param.CmpNoCase(wxT("--version")) == 0 || param.CmpNoCase(wxT("-v")) == 0 ) {
+                                versionParameter = true;
+                                continue;
+                        }
+                        if (param.CmpNoCase(wxT("--accepted")) == 0 || param.CmpNoCase(wxT("-a")) == 0) {
+                                aceptedLicense = true;
+                                continue;
+                        }
+#if defined(GINKGO_PRO)
+                        else if (param.CmpNoCase(wxT("-unittest")) == 0) {
+                                LOG_INFO("INITWX", "Running unitttests");
+                                if (argc <= i+1) {
+                                        LOG_ERROR("INITWX", "no tests cases found for -unittest option. Usage -unittest <path_test_cases>");
+                                } else {
+                                        i++;
+                                        std::string pathTests = wxString(argv[i]).ToUTF8();
+                                        TestLauncher* test = new TestLauncher(pathTests);
+                                        test->Create();
+                                        test->Run();
+                                }
+                                continue;
+                        }
+#endif
+                        if (!param.StartsWith("--")) {
+                                pathOfFile = param;
+                        }
+                }
+        }
+
+        if (versionParameter) {
+                std::cout << GNC::GCS::IEntorno::Instance()->GetGinkgoVersionString() << std::endl;
+                GNC::GCS::IEntorno::FreeInstance();
+                Close();
+        }
+
+        if (!aceptedLicense) {
+                //aceptacion de la licencia
+                bool aceptada;
+                GNC::GCS::ConfigurationController::Instance()->readBoolGeneral("/GinkgoCore/Licencia", "Aceptada", aceptada, false);
+                if(!aceptada) {
+                        GNC::GUI::AcceptLicenseDialog dlgLicencia(NULL);
+                        wxYield();
+                        int answer = dlgLicencia.ShowModal();
+                        if(answer == wxID_OK) {
+                                GNC::GCS::ConfigurationController::Instance()->writeBoolGeneral("/GinkgoCore/Licencia", "Aceptada", true);
+                                GNC::GCS::ConfigurationController::Instance()->Flush();
+                        } else {
+                                GNC::GCS::ConfigurationController::Instance()->writeBoolGeneral("/GinkgoCore/Licencia", "Aceptada", false);
+                                GNC::GCS::ConfigurationController::Instance()->Flush();
+                                Close();
+                                return;
+                        }
+                }
+        }
+
+        //si viene un parametro y es un directorio... abrir directamente
+        if(!pathOfFile.empty()) {
+                Login();
+                EjecutarParametro(pathOfFile, true);
+        } else {
+                Login();
+        }
+}
+
+void VentanaPrincipal::EjecutarParametro(const wxString cadena, bool doLogin)
+{
+        std::string xmlString("");
+        std::string errorMsg;
+
+        bool error = false;
+
+        if (cadena.Lower().StartsWith(wxT("ginkgocadx://"))) {
+                try {
+                        xmlString = GIL::IntegrationController::Instance()->ParsesModelFromURL(cadena);
+                } catch (GIL::IntegrationException& ex) {
+                        LOG_ERROR("GIL/WF", "Semantic/Sintactic error parsing integration url: " << ex.GetFullCause());
+                        wxMessageBox(_("Semantic/Sintactic error parsing integration URL (see log for details):\n") + wxString::FromUTF8(ex.GetCause().c_str()),_("Error"),wxICON_INFORMATION);
+                }
+        } else {
+
+                wxFileName path = cadena;
+
+
+                if (path.IsOk()) {
+                        LOG_DEBUG("Core", "Interpretando " << std::string(TOPATH(path.GetFullPath())).c_str());
+                        if (path.IsRelative()) {
+                                LOG_DEBUG("Core", "Convirtiendo ruta en absoluta");
+#if defined(__WXGTK__)
+
+                                char* invocation_dir = getenv("INVOCATION_DIR");
+                                if (invocation_dir != NULL) {
+                                        wxString invocationDir = wxString::FromUTF8(invocation_dir);
+                                        if (!invocationDir.IsEmpty()) {
+                                                path = invocationDir + wxFileName::GetPathSeparator() + path.GetFullPath();
+                                        }
+                                }
+#else
+                                path.MakeAbsolute();
+#endif
+                                LOG_DEBUG("Core", "Ruta absoluta: " << std::string(TOPATH(path.GetFullPath())).c_str());
+                        }
+
+                        if(wxDirExists(path.GetFullPath()) && path.IsDirReadable()) {
+                                if(doLogin) {
+                                        Login();
+                                }
+                                std::list<std::string> rutas;
+                                rutas.push_back(std::string(TOPATH( path.GetFullPath() )));
+                                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(rutas,true,GNC::GCS::IHistoryController::TAA_LINK);
+                                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+                                GNC::Entorno::Instance()->GetCommandController()->ProcessAsync(_Std("Included in the history ..."), pCmd, NULL);
+                                return ;
+                        } else if(path.FileExists() && path.IsFileReadable()) {
+
+                                //estamos ante un fichero
+                                //se mira a ver si a partir del byte 128 pone DICM
+                                wxFile fichero(path.GetFullPath(), wxFile::read);
+
+                                bool esGzip = false;
+                                bool esDicom = false;
+                                if(fichero.IsOpened()) {
+                                        char buffer[128];
+                                        if(fichero.Read(buffer,128) == 128) {
+                                                esGzip = ((unsigned char)buffer[0]==0x1f) && ((unsigned char)buffer[1]==0x8b);
+                                                char numeroMagico[4];
+                                                if(fichero.Read(numeroMagico,4) == 4) {
+                                                        std::string str(numeroMagico,4);
+                                                        if(str == "DICM") {
+                                                                esDicom = true;
+                                                        }
+                                                }
+                                        }
+                                }
+                                if(esDicom) {
+                                        if (doLogin) {
+                                                Login();
+                                        }
+                                        //si no es un xml pues sera un dicom...
+                                        std::list<std::string> rutas;
+                                        rutas.push_back(std::string(TOPATH(path.GetFullPath()) ));
+                                        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(rutas,true,GNC::GCS::IHistoryController::TAA_LINK);
+                                        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+                                        GNC::Entorno::Instance()->GetCommandController()->ProcessAsync(_Std("Included in the history ..."),pCmd, NULL);
+                                } else {
+                                        //se lee el modelo
+                                        bool loaded = false;
+                                        wxXmlDocument documento;
+                                        if (esGzip) {
+                                                wxFileInputStream* fileIn = new wxFileInputStream(path.GetFullPath());
+                                                wxZlibInputStream zInput(fileIn);
+                                                loaded = documento.Load(zInput);
+                                        } else {
+                                                loaded = documento.Load(path.GetFullPath());
+                                        }
+                                        if(loaded) {
+                                                wxStringOutputStream out;
+                                                documento.Save(out);
+                                                xmlString=out.GetString().ToUTF8();
+                                        } else {
+                                                //dcmurl this is a file with a relative path...
+                                                LOG_DEBUG("GIL/WF", "Try reading dcmurl file...");
+                                                wxTextFile dcmURLFile;
+                                                if (!dcmURLFile.Open(path.GetFullPath(), wxMBConvUTF8())) {
+                                                        for (wxString line = dcmURLFile.GetFirstLine(); !dcmURLFile.Eof(); line = dcmURLFile.GetNextLine()) {
+                                                                wxFileName fileName(line);
+                                                                if (fileName.IsRelative()) {
+                                                                        fileName.MakeAbsolute(path.GetPath());
+                                                                }
+                                                                if (wxFileExists(fileName.GetFullPath())) {
+                                                                        EjecutarParametro(fileName.GetFullPath());
+                                                                } else {
+                                                                        LOG_ERROR("GIL/WF", "File doesn't exists");
+                                                                        break;
+                                                                }
+                                                        }
+                                                }
+                                                LOG_ERROR("GIL/WF", "Error al interpretar el fichero de entrada: XML mal formado");
+                                                wxMessageBox(_("Malformed XML"),_("Error"),wxICON_INFORMATION);
+                                                if (doLogin) {
+                                                        Login();
+                                                }
+                                        }
+                                }
+                        } else {
+                                error = true;
+                        }
+                } else {
+                        error = true;
+                }
+        }
+        if (error) {
+                LOG_ERROR("GIL/WF", "Error al interpretar los parámetros de la línea de comandos. (" << cadena.ToUTF8() << ") : " << errorMsg );
+                wxMessageBox(
+                        _("Error in interpreting the parameters of the command line. (")
+                        + cadena
+                        + wxT(") : ")
+                        + wxString::FromUTF8(errorMsg.c_str())
+                        ,_("Error"), wxICON_INFORMATION);
+                if (doLogin) {
+                        Login();
+                }
+                return;
+        }
+
+
+        if(xmlString != "") {
+                try {
+                        GIL::IntegrationModelList listaModelos;
+                        GIL::IntegrationController::Instance()->ParsearModeloIntegracion(listaModelos, xmlString, cadena);
+                        GIL::IntegrationController::Instance()->Process(listaModelos);
+                } catch (GIL::IntegrationException& ex) {
+                        LOG_ERROR("GIL/WF", "Semantic/Sintactic error parsing integration XML: " << ex.GetFullCause());
+                        wxMessageBox(_("Semantic/Sintactic error parsing integration XML (see log for details):\n") + wxString::FromUTF8(ex.GetCause().c_str()),_("Error"),wxICON_INFORMATION);
+                } catch (GIL::HL7::HL7XMLException& ex) {
+                        LOG_ERROR("GIL/WF", "Semantic/Sintactic error parsing integration XML: " << ex.GetFullCause());
+                        wxMessageBox(_("Semantic/Sintactic error parsing integration XML (see log for details):\n") + wxString::FromUTF8(ex.GetCause().c_str()),_("Error"),wxICON_INFORMATION);
+                } catch (GIL::HL7::HL7Exception& ex1) {
+                        LOG_ERROR("GIL/WF", "Error parsing integration XML: " << ex1.GetCause());
+                        wxMessageBox(_("Error parsing integration XML:\n") + wxString::FromUTF8(ex1.GetCause().c_str()),_("Error"),wxICON_INFORMATION);
+                } catch (GIL::DICOM::PACSException& ex3) {
+                        LOG_ERROR("GIL/WF", "PACS error: " << ex3.GetCause());
+                        wxMessageBox(_("PACS error:\n") + wxString::FromUTF8(ex3.GetCause().c_str()),_("Error"),wxICON_INFORMATION);
+                } catch (std::exception& ex4) {
+                        LOG_ERROR("GIL/WF", "Error executing WorkFlow: " << ex4.what());
+                        wxMessageBox(_("Error executing WorkFlow\n") + wxString::FromUTF8(ex4.what()),_("Error"),wxICON_INFORMATION);
+                } catch (...) {
+                        LOG_ERROR("GIL/WF", "Error executing WorkFlow: Internal error.");
+                        wxMessageBox(_("Error executing WorkFlow\nInternal Error"), _("Error"),wxICON_INFORMATION);
+                }
+
+                if (!m_Iniciada) {
+                        if (doLogin) {
+                                Login();
+                        }
+                }
+        } else {
+                if (doLogin) {
+                        Login();
+                }
+        }
+}
+
+void VentanaPrincipal::OnSize(wxSizeEvent& WXUNUSED(event))
+{
+        Layout();
+}
+
+
+void VentanaPrincipal::RefrescarMenus()
+{
+
+        //se vacía la barra y se borran los menus que se crearon en la anterior pasada
+        wxWindowDisabler dis;
+        SuperFreeze();
+
+        wxMenu* pMenuArchivo = new wxMenu();
+        wxMenu* pMenuEdicion = new wxMenu();
+        wxMenu* pMenuVer = new wxMenu();
+        wxMenu* pMenuSeries = new wxMenu();
+        wxMenu* pMenuHerramientas = new wxMenu();
+        wxMenu* pMenuAyuda = new wxMenu();
+
+        {
+                //menu archivo
+                wxMenuItem* m_pCerrar = new wxMenuItem( pMenuArchivo, ID_CERRAR, wxString( _("Close") ) + wxT("\tAlt+w"), _("Close current view"), wxITEM_NORMAL );
+                wxMenuItem* m_pCerrarTodas = new wxMenuItem( pMenuArchivo, ID_CERRAR_TODAS, wxString( _("Close all") ) , _("Close all views"), wxITEM_NORMAL );
+                wxMenuItem* m_pMenuSalir = new wxMenuItem( pMenuArchivo, ID_SALIR, wxString( _("&Exit") ) + wxT("\tAlt+s"), _("Exit application"), wxITEM_NORMAL );
+#ifdef __WXMSW__
+                m_pCerrar->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoCerrarTab());
+                m_pMenuSalir->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoSalir());
+#else
+                m_pCerrar->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoCerrarTab());
+                m_pMenuSalir->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoSalir());
+#endif
+                InsertToolsFromFamily(pMenuArchivo, GNC::GCS::ITool::TMenuArchivo);
+                if (pMenuArchivo->GetMenuItemCount() > 0) {
+                        pMenuArchivo->AppendSeparator();
+                }
+                pMenuArchivo->Append( m_pCerrar );
+                pMenuArchivo->Append( m_pCerrarTodas );
+                pMenuArchivo->AppendSeparator();
+                pMenuArchivo->Append( m_pMenuSalir );
+                this->Connect( m_pCerrar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnMenuCerrarTabClick ) );
+                this->Connect( m_pCerrar->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( VentanaPrincipal::OnMenuCerrarTabUpdateUI ) );
+                this->Connect( m_pCerrarTodas->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnMenuCerrarTodosTabsClick ) );
+                this->Connect( m_pCerrarTodas->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler( VentanaPrincipal::OnMenuCerrarTodosTabsUpdateUI ) );
+
+                this->Connect( m_pMenuSalir->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnSalir ) );
+
+                //edit
+                InsertToolsFromFamily(pMenuEdicion, GNC::GCS::ITool::TMenuEdicion);
+
+                //view
+                {
+                        wxMenuItem*  pPantallaCompleta = new wxMenuItem( pMenuVer, ID_PANTALLA_COMPLETA, wxString(_("Full screen"))+ wxT("\tF11"), _("Show full screen"), wxITEM_NORMAL );
+                        wxMenuItem* pMosaicoRestaurar = new wxMenuItem(pMenuVer, ID_MOSAICO_RESTAURAR, wxString( _("Tab grouping") ), _("Tab grouping"), wxITEM_NORMAL );
+
+#ifdef __WXMSW__
+                        pMosaicoRestaurar->SetBitmaps(GinkgoResourcesManager::MenuTabs::GetIcoReagrupar());
+                        pPantallaCompleta->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoPantallaCompleta());
+#else
+                        pMosaicoRestaurar->SetBitmap(GinkgoResourcesManager::MenuTabs::GetIcoReagrupar());
+                        pPantallaCompleta->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoPantallaCompleta());
+#endif
+                        pMenuVer->Append( pPantallaCompleta );
+                        pMenuVer->AppendSeparator();
+                        pMenuVer->Append(pMosaicoRestaurar);
+
+                        //image
+                        InsertToolsFromFamily(pMenuVer, GNC::GCS::ITool::TMenuVer);
+
+                        this->Connect( pPantallaCompleta->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnPantallaCompleta ) );
+                        this->Connect( pMosaicoRestaurar->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnMosaicoRestaurar ) );
+                }
+
+                //image
+                InsertToolsFromFamily(pMenuSeries, GNC::GCS::ITool::TSeriesMenu);
+
+                //tools
+                InsertToolsFromFamily(pMenuHerramientas, GNC::GCS::ITool::TMenuHerramientas);
+
+                //ayuda
+                wxMenuItem*  pMenuGNKHelp = new wxMenuItem( pMenuAyuda, ID_ONLINE_MANUAL, wxString( _("Ginkgo CADx manual ...") ), _("Ginkgo CADx manual ..."), wxITEM_NORMAL );
+                wxMenuItem*  m_pMenuOpenTestCard = new wxMenuItem( pMenuAyuda, ID_OPEN_TEST_CARD, wxString( _("Open test card") ), _("Open test card"), wxITEM_NORMAL );
+                wxMenuItem*  m_pMenuCheckUpdates = new wxMenuItem( pMenuAyuda, ID_CHECK_UPDATES, wxString( _("Check for updates") ), _("Check for newest versions"), wxITEM_NORMAL );
+                wxMenuItem*  pMenuOnlineSupport = new wxMenuItem( pMenuAyuda, ID_ONLINE_SUPPORT, wxString( _("Need support ...") ), _("Need support ..."), wxITEM_NORMAL );
+                wxMenuItem*  m_pMenuAcercaDe = new wxMenuItem( pMenuAyuda, ID_ACERCA_DE,  _("About") + wxString(wxT(" ")) + wxString::FromUTF8(GNC::Entorno::Instance()->GetApplicationName().c_str()) + wxT(" ...") ,  _("About ") + wxString::FromUTF8(GNC::Entorno::Instance()->GetApplicationName().c_str()) + wxT(" ...") , wxITEM_NORMAL );
+
+#ifdef __WXMSW__
+                pMenuGNKHelp->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoHelp());
+                pMenuOnlineSupport->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoSupport());
+#else
+                pMenuGNKHelp->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoHelp());
+                pMenuOnlineSupport->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoSupport());
+#endif
+
+                pMenuAyuda->Append( pMenuGNKHelp );
+                pMenuAyuda->AppendSeparator();
+                pMenuAyuda->Append( pMenuOnlineSupport );
+
+                pMenuAyuda->AppendSeparator();
+                pMenuAyuda->Append( m_pMenuCheckUpdates );
+                InsertToolsFromFamily(pMenuAyuda, GNC::GCS::ITool::TMenuHelp);
+                pMenuAyuda->AppendSeparator();
+                pMenuAyuda->Append( m_pMenuOpenTestCard );
+                pMenuAyuda->AppendSeparator();
+                pMenuAyuda->Append( m_pMenuAcercaDe );
+
+                this->Connect( pMenuGNKHelp->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnOnlineHelp ) );
+                this->Connect( m_pMenuOpenTestCard->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnOpenTestCard ) );
+                this->Connect( m_pMenuCheckUpdates->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnCheckForUpdates ) );
+                this->Connect( m_pMenuAcercaDe->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnAcercaDe ) );
+                this->Connect( pMenuOnlineSupport->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnOnlineSupport ) );
+        }
+
+        //herramientas -> configuracion, envio hl7 y logs
+        if(GNC::GCS::IControladorPermisos::Instance()->Get("core.menu","configuracion")) {
+                if(pMenuHerramientas->GetMenuItemCount() >0)
+                        pMenuHerramientas->AppendSeparator();
+                wxMenuItem*  pMenuConfiguracion = NULL;
+                wxMenuItem*  pMenuHL7 = NULL;
+                wxMenuItem*  pMenuLogs = NULL;
+                //herramientas
+                pMenuConfiguracion = new wxMenuItem( pMenuHerramientas, ID_CONFIGURACION, wxString(_("Settings")) + wxT("\tAlt+c"), _("Settings"), wxITEM_NORMAL );
+                pMenuHL7 = new wxMenuItem( pMenuHerramientas, ID_CONTROLHL7, wxString(_("HL7 monitor")) + wxT(""), _("HL7 message control"), wxITEM_NORMAL );
+                pMenuLogs = new wxMenuItem( pMenuHerramientas, ID_CONTROLLOGS, wxString(_("Log monitor")) + wxT("\tAlt+r"), _("Log monitored"), wxITEM_NORMAL );
+
+#ifdef __WXMSW__
+                pMenuConfiguracion->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoConfiguracion());
+#else
+                pMenuConfiguracion->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoConfiguracion());
+#endif
+                pMenuHerramientas->Append( pMenuLogs );
+                pMenuHerramientas->Append( pMenuHL7 );
+                pMenuHerramientas->AppendSeparator();
+                pMenuHerramientas->Append( pMenuConfiguracion );
+
+                this->Connect( pMenuConfiguracion->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnConfiguracion ) );
+                this->Connect( pMenuHL7->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnMensajesHL7 ) );
+                this->Connect( pMenuLogs->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( VentanaPrincipal::OnControlLogs ) );
+        }
+        //avoid hide bar => flickering!!
+        m_pMenuBar->Freeze();
+        m_pMenuBar->Append( pMenuArchivo, _("&File") );
+        while (m_pMenuBar->GetMenuCount() > 1)
+                delete m_pMenuBar->Remove(0);
+        m_pMenuBar->Append( pMenuEdicion, _("&Edit") );
+        m_pMenuBar->Append( pMenuVer, _("View") );
+        m_pMenuBar->Append( pMenuSeries, _("Series") );
+        m_pMenuBar->Append( pMenuHerramientas, _("Tools") );
+        m_pMenuBar->Append( pMenuAyuda, _("&Help") );
+
+        m_pMenuBar->Thaw();
+        this->SetMenuBar(m_pMenuBar);
+
+#ifdef __WXMAC__
+        wxMenuBar::MacSetCommonMenuBar(m_pMenuBar);
+#endif
+        SuperThaw();
+}
+
+void VentanaPrincipal::InsertToolsFromFamily(wxMenu* pParent, GNC::GCS::ITool::TToolFamily family)
+{
+        //general tools
+        GNC::GCS::IToolsRegistry::Instance()->AppendsToolInMenu(this, pParent, family);
+
+        GNC::GCS::IVista* pVistaActiva = GNC::GCS::ControladorVistas::Instance()->GetVistaActiva();
+        if (pVistaActiva == NULL) {
+                return;
+        }
+
+        GNC::GCS::IToolController* pToolController = pVistaActiva->GetToolController();
+        pToolController->AppendsToolInMenu(this, pParent, family);
+}
+
+void VentanaPrincipal::CargarHistorial()
+{
+        GNC::GUI::HistoryPanel3::Instance();
+        //if unittest... delete current history
+#if defined(GINKGO_PRO)
+        int argc = GNC::Entorno::Instance()->GetApp()->argc;
+        wxChar** argv = GNC::Entorno::Instance()->GetApp()->argv;
+        for (int i = 1; i < argc; i++) {
+                wxString param(argv[i]);
+                if (param.CmpNoCase(wxT("-unittest")) == 0) {
+                        //drop file
+                        std::string dirPath = GNC::GCS::HistoryController::GetDefaultDicomDirPath();
+                        LOG_INFO("INITWX", "Removing default dicomdir:" << dirPath);
+                        GNC::GCS::IEntorno::Instance()->RemoveDirRecursive(dirPath);
+                        LOG_INFO("INITWX", "Default dicomdir removed successfully");
+                        break;
+                }
+        }
+#endif
+        //
+
+        if (!GNC::GCS::HistoryController::Instance()->IsOk()) {
+                wxMessageBox(_("Error loading history, Ginkgo CADx will be closed"), _("Error"), wxICON_ERROR|wxOK, this);
+                Close(true);
+                return;
+        }
+
+        SuperFreeze();
+
+        GNC::GUI::HistoryPanel3::Instance()->ReloadCombos(true);
+        GNC::GUI::HistoryPanel3::Instance()->RefreshSearch(true);
+
+        GNC::GCS::Ptr<GNC::GUI::StartUpStudy> study(new GNC::GUI::StartUpStudy());
+        study->Module = NULL;
+        study->ParentWindow = m_pPanelCentral;
+        StartupView = new GNC::GUI::StartUpView(study);
+        m_mgr.AddPane(StartupView->GetWindow(), wxAuiPaneInfo().Name(_("Mosaic")).CenterPane().Layer(0).PaneBorder(true).Movable(false).Floatable(false).Dockable(false).LeftDockable(false).RightDockable(false).TopDockable(false).BottomDockable(false).CloseButton(false));
+
+        GNC::GCS::Ptr<GIL::IModeloIntegracion> ptr;
+        GNC::Entorno::Instance()->GetControladorCarga()->CargaAsincrona(StartupView, false);
+        m_mgr.Update();
+
+        SuperThaw();
+}
+
+void VentanaPrincipal::OnComando(EventoProgreso& evento)
+{
+        switch (evento.GetTipo()) {
+        case EventoProgreso::ComandoIniciado:
+                GNC::CommandController::Instance()->OnComandoLanzado(evento.GetThreadId());
+                break;
+        case EventoProgreso::ComandoEjecutando:
+                GNC::CommandController::Instance()->OnComandoProgreso(evento.GetThreadId());
+                break;
+        case EventoProgreso::ComandoFinalizado:
+                GNC::CommandController::Instance()->OnComandoFinalizado(evento.GetThreadId());
+                break;
+        default:
+                std::cerr << "Error, Tipo de notificacion de comando desconocida." << std::endl;
+                break;
+        }
+
+}
+
+void VentanaPrincipal::OnNotebookPageChanging(wxAuiNotebookEvent& /*event*/)
+{
+        /*
+        int old_idx = event.GetOldSelection();
+        int new_idx = event.GetSelection();
+
+        if (old_idx != new_idx && old_idx != -1 && new_idx != -1) {
+
+        	wxWindowDisabler dis;
+        	SuperFreeze();
+
+        	m_pNoteBook->SetSelection(new_idx);
+
+        	SuperThaw();
+        }
+
+        event.Skip(false);
+        */
+}
+
+
+void VentanaPrincipal::OnNotebookPageChanged(wxAuiNotebookEvent& event)
+{
+        SuperFreeze();
+        if (m_pNoteBook->GetPageCount() == 0) { // Se han eliminado todas las paginas
+                ShowStartUp(true);
+        } else {
+                // Se ha cambiado de pagina
+                ShowStartUp(false);
+                GNC::GCS::IVista* v  = GNC::GCS::ControladorVistas::Instance()->ObtenerVistaRegistrada(m_pNoteBook->GetPage(event.GetSelection()));
+                if (v != NULL) {
+                        GNC::GCS::ControladorVistas::Instance()->SolicitarActivarVista(v);
+                }
+        }
+        SuperThaw();
+
+}
+
+void VentanaPrincipal::OnPanelClose(wxAuiManagerEvent& event)
+{
+        wxWindowDisabler disabler;
+        SuperFreeze();
+        if(CerrarVista(event.GetPane()->window)) {
+                GNC::GCS::ControladorVistas::Instance()->Destruir(event.GetPane()->window);
+        }
+        SuperThaw();
+}
+
+
+void VentanaPrincipal::OnNotebookPageClose(wxAuiNotebookEvent& event)
+{
+        wxWindowDisabler disabler;
+        SuperFreeze();
+        if(CerrarVista(m_pNoteBook->GetPage(event.GetSelection()))) {
+                GNC::GCS::ControladorVistas::Instance()->Destruir(m_pNoteBook->GetPage(event.GetSelection()));
+                if (m_pNoteBook->GetPageCount() == 1) { // Se han eliminado todas las paginas
+                        //se muestra el mosaico
+                        ShowStartUp(true);
+                }
+        } else {
+                event.Veto();
+        }
+        SuperThaw();
+}
+
+void VentanaPrincipal::PasarAPrimerPlano(wxWindow* window)
+{
+        wxWindowDisabler disabler;
+        SuperFreeze();
+        ReplegarPestanias();
+        int index = m_pNoteBook->GetPageIndex(window);
+        if(index>0) {
+                m_pNoteBook->SetSelection(index);
+        }
+        //este update es necesario porque pasar a primer plano viene cuando estan en pestanias y cuando estan en grid
+        m_mgr.Update();
+        SuperThaw();
+}
+
+void VentanaPrincipal::DestruirPanelVista(wxWindow* panel)
+{
+        wxAuiNotebook* padreNotebook = dynamic_cast<wxAuiNotebook*> (panel->GetParent());
+        if(padreNotebook != NULL) {
+                CerrarNotebookPage(panel);
+        } else {
+                GNC::GUI::DetachedDialog* pDialogo = dynamic_cast<GNC::GUI::DetachedDialog*> (panel->GetParent());
+                if(pDialogo != NULL) {
+                        pDialogo->Close();
+                }
+        }
+}
+
+void VentanaPrincipal::CerrarNotebookPage(wxWindow* panel)
+{
+        int index = m_pNoteBook->GetPageIndex(panel);
+        if (index < 0 ) {
+                return;
+        }
+
+        SuperFreeze();
+        if(CerrarVista(panel)) {
+                m_pNoteBook->DeletePage(index);
+                if (m_pNoteBook->GetPageCount() == 0) { // Se han eliminado todas las paginas
+                        //se muestra el mosaico
+                        ShowStartUp(true);
+                }
+                m_mgr.Update();
+        }
+        SuperThaw();
+}
+
+bool VentanaPrincipal::CerrarVista(GNC::GCS::IVista* pVista)
+{
+        if (pVista == NULL)
+                return true;
+
+        //it's important to avoid focus errors
+        if (this->IsIconized()) {
+                this->Restore();
+        }
+        this->Raise();
+
+        wxWindow* pWindow = pVista->GetWindow();
+        //if it's a tab...
+        int idx = m_pNoteBook->GetPageIndex(pWindow);
+        if(idx >= 0) {
+                unsigned int tabCount = m_pNoteBook->GetPageCount();
+                //selects the page
+                if (idx >= 0) {
+                        if(idx != m_pNoteBook->GetSelection()) {
+                                wxWindowDisabler dis;
+                                SuperFreeze();
+                                m_pNoteBook->SetSelection(idx);
+                                SuperThaw();
+                        }
+                }
+                wxAuiNotebookEvent evt(wxEVT_COMMAND_AUINOTEBOOK_BUTTON, m_pNoteBook->GetSelection());
+                evt.SetInt(wxAUI_BUTTON_CLOSE);
+                evt.SetId(5380+500);
+                evt.SetEventObject(((wxGinkgoAuiNoteBook*)m_pNoteBook)->GetActiveTabCtrl());
+                m_pNoteBook->GetEventHandler()->ProcessEvent(evt);
+
+                return ( tabCount > m_pNoteBook->GetPageCount() );
+        } else {
+                GNC::GUI::DetachedDialog* pDlg = dynamic_cast<GNC::GUI::DetachedDialog*>(pWindow->GetParent());
+                if(pDlg != NULL) {
+                        bool closed = pDlg->Close();
+                        return closed;;
+                } else {
+                        return false;
+                }
+        }
+
+}
+
+bool VentanaPrincipal::CerrarVista(wxWindow* window)
+{
+        bool permitido = true;
+        SuperFreeze();
+
+        GNC::GCS::ControladorVistas* pcv = GNC::GCS::ControladorVistas::Instance();
+        if (pcv == NULL) {
+                std::cerr << "Error: No se pudo obtener el controlador de vistas" << std::endl;
+                SuperThaw();
+                return false;
+        }
+        GNC::GCS::IVista* v  = pcv->ObtenerVistaRegistrada(window);
+
+        if (v != NULL) {
+                if (v->SoportaGuardar() && v->EstaModificada()) {
+                        std::string titulo = GNC::GCS::ControladorVistas::Instance()->GetTitulo(v);
+                        wxString descr;
+                        std::ostringstream os;
+                        os << _Std("Would you like to save the changes in the study:") << titulo.c_str() << "?";
+                        PauseSuperFreeze();
+                        int answer = wxMessageBox(wxString::FromUTF8(os.str().c_str()), _("Unsaved data"), wxYES_NO | wxCANCEL, this);
+                        ContSuperFreeze();
+                        if (answer == wxCANCEL) {
+                                permitido = false;
+                        } else if (answer == wxYES) {
+                                if (!v->Guardar()) {
+
+                                        wxMessageDialog dialog(NULL,_("Errors have occurred when saving the series.\nWould you like to continue closing? "),_("Error saving"),wxYES_NO|wxICON_WARNING);
+                                        PauseSuperFreeze();
+                                        permitido = dialog.ShowModal() == wxID_YES;
+                                        ContSuperFreeze();
+                                }
+                        }
+                }
+        }
+
+        SuperThaw();
+
+        return permitido;
+}
+
+void VentanaPrincipal::OnNotebookCambiarTab(wxAuiNotebookEvent& event)
+{
+        wxWindowDisabler disabler;
+        SuperFreeze();
+        if(m_pNoteBook->GetSelection()!=-1) {
+                GNC::GCS::IVista* v  = GNC::GCS::ControladorVistas::Instance()->ObtenerVistaRegistrada(m_pNoteBook->GetPage(event.GetSelection()));
+                GNC::GCS::ControladorVistas* pcv = GNC::GCS::ControladorVistas::Instance();
+                if(v!=NULL && pcv != NULL) {
+                        pcv->SolicitarActivarVista(v);
+                }
+        }
+        SuperThaw();
+        event.Skip(true);
+}
+
+void VentanaPrincipal::OnNotebookMenuTab(wxAuiNotebookEvent& )
+{
+        wxMenu*  menu = new wxMenu();
+        //cerrar pestania activa
+        wxMenuItem*  pPantallaCompleta = new wxMenuItem( menu, ID_PANTALLA_COMPLETA, wxString(_("Full Screen")) + wxT("\tF11"), _("View Full Screen"), wxITEM_NORMAL );
+
+        wxMenu* subMenuPestanias = new wxMenu();
+        wxMenuItem* pMenuMostrarPrimerPlano = new wxMenuItem(subMenuPestanias, wxID_ANY, _("Tab Regroup"), _("Tab Regroup"), wxITEM_NORMAL );
+        wxMenuItem* pMenuCerrarActiva = new wxMenuItem(menu, ID_CERRAR, _("&Close"), _("Close"), wxITEM_NORMAL );
+        wxMenuItem* pMenuCerrarTodas = new wxMenuItem(menu, ID_CERRAR_TODAS, _("&Close all") , _("Close all windows"), wxITEM_NORMAL );
+
+        menu->Connect(pMenuMostrarPrimerPlano->GetId(),wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( VentanaPrincipal::OnMenuPrimerPlanoPestaniaActiva),NULL,this);
+
+#ifdef __WXMSW__
+        pMenuCerrarActiva->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoCerrarTab());
+        pMenuMostrarPrimerPlano->SetBitmaps(GinkgoResourcesManager::MenuTabs::GetIcoReagrupar());
+        pPantallaCompleta->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoPantallaCompleta());
+#else
+        pMenuCerrarActiva->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoCerrarTab());
+        pMenuMostrarPrimerPlano->SetBitmap(GinkgoResourcesManager::MenuTabs::GetIcoReagrupar());
+        pPantallaCompleta->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoPantallaCompleta());
+#endif
+
+        menu->Append( pPantallaCompleta );
+        menu->AppendSeparator();
+        subMenuPestanias->Append(pMenuMostrarPrimerPlano);
+        subMenuPestanias->AppendSeparator();
+        menu->AppendSubMenu(subMenuPestanias,_("Tabbed organization"));
+        menu->AppendSeparator();
+        menu->Append(pMenuCerrarActiva);
+        menu->Append(pMenuCerrarTodas);
+        m_pNoteBook->PopupMenu(menu);
+        delete menu;
+}
+
+void VentanaPrincipal::OnNotebookFocus(wxChildFocusEvent&)
+{
+
+}
+
+//region "eventos ginkgo"
+void VentanaPrincipal::ProcesarEvento(GNC::GCS::Events::IEvent *pEvt)
+{
+        LOG_ERROR("Core", "Currently the check for update event is disabled");
+}
+//endregion
+
+
+
+
+
+
+//------------------------------------------------------------------------------
+//region "IExtensionsObserver realization"
+
+void VentanaPrincipal::OnModuleLoaded(GNC::GCS::IModuleController* )
+{
+        //GTRACE("VentanaPrincipal::OnModuloCargado(" << pCM->GetNombre().c_str() << ")");
+        RefrescarMenus();
+        GNC::GUI::HistoryPanel3::Instance()->ReloadToolBar();
+}
+
+void VentanaPrincipal::OnModuleUnloaded(GNC::GCS::IModuleController* )
+{
+        //GTRACE("VentanaPrincipal::OnModuloDescargado(" << pCM->GetNombre().c_str() << ")");
+}
+
+void VentanaPrincipal::OnModuleActivated(GNC::GCS::IModuleController* /*pCM*/)
+{
+        /*
+        if (pCM != NULL) {
+        	GTRACE("VentanaPrincipal::OnModuloActivado(" << pCM->GetNombre().c_str() << ")");
+        }
+        else {
+        	GTRACE("VentanaPrincipal::OnModuloActivado(" << pCM->GetNombre().c_str() << ")");
+        }
+        */
+}
+
+void VentanaPrincipal::OnModuleDeactivated(GNC::GCS::IModuleController* )
+{
+        //GTRACE("VentanaPrincipal::OnModuloDeactivado(" << pCM->GetNombre().c_str() << ")");
+}
+//endregion
+
+
+
+//------------------------------------------------------------------------------
+//region "IExtensionsObserver realization"
+
+void VentanaPrincipal::OnVistaActivada(GNC::GCS::IVista* pVista)
+{
+#if defined (_WINDOWS)
+        wxWindowDisabler dis;
+#endif
+        if (pVista != NULL) {
+                ForzarCambioVista(pVista);
+        }
+        RefrescarMenus();
+}
+
+//endregion
+
+//region "helpers"
+void VentanaPrincipal::SuperFreeze()
+{
+        if (m_SuperFreezeCount <= 0) {
+                GTRACE("SuperFreeze Locked");
+                if (m_SuperFreezeCount < 0) {
+                        m_SuperFreezeCount = 0;
+                        std::cerr << "Error: Estado de bloqueo inconsistente." << std::endl;
+                }
+                /*Freeze();
+                m_pPanelActualizacion->Freeze();
+                m_pPanelCentral->Freeze();
+                m_pNoteBook->Freeze();
+                m_pMenuBar->Freeze();
+                */
+        }
+        m_SuperFreezeCount++;
+}
+
+void VentanaPrincipal::SuperThaw()
+{
+        m_SuperFreezeCount--;
+
+        if (m_SuperFreezeCount <= 0) {
+                GTRACE("SuperFreeze Released");
+                if (m_SuperFreezeCount < 0) {
+                        m_SuperFreezeCount = 0;
+                        std::cerr << "Error: Estado de bloqueo inconsistente." << std::endl;
+                }
+
+                /*m_pMenuBar->Thaw();
+                m_pNoteBook->Thaw();
+                m_pPanelCentral->Thaw();
+                m_pPanelActualizacion->Thaw();
+                Thaw();*/
+        }
+}
+
+void VentanaPrincipal::PauseSuperFreeze()
+{
+        if (m_SuperFreezeCount > 0) {
+                GTRACE("SuperFreeze Paused");
+
+                /*m_pMenuBar->Thaw();
+                m_pNoteBook->Thaw();
+                m_pPanelCentral->Thaw();
+                m_pPanelActualizacion->Thaw();
+                Thaw();*/
+        }
+}
+
+void VentanaPrincipal::ContSuperFreeze()
+{
+        if (m_SuperFreezeCount > 0) {
+                GTRACE("SuperFreeze Resumed");
+                /*	Freeze();
+                	m_pPanelCentral->Freeze();
+                	m_pPanelActualizacion->Freeze();
+                	m_pNoteBook->Freeze();
+                	m_pMenuBar->Freeze();*/
+        }
+}
+//endregion
+
+//region "login e inicializacion"
+void VentanaPrincipal::Login()
+{
+        if (GSEC::Auth::ControladorAutenticacion::Instance()->GetTipoAutenticacion() != GSEC::Auth::TA_NO_LOGIN) {
+                try {
+
+                        GNC::GUI::DialogoLogin dlg(NULL);
+                        if (dlg.ShowModal() == wxID_OK) {
+                                MostrarVentana();
+                        } else {
+                                Close();
+                        }
+                } catch (...) {
+                        LOG_ERROR("Core/Auth", "Error interno al autenticar");
+                        wxMessageBox(_("Internal error during auth process"), _("Internal error"), wxICON_ERROR);
+                        Close();
+                }
+        } else {
+                MostrarVentana();
+        }
+}
+
+void VentanaPrincipal::MostrarVentana()
+{
+        if (m_Iniciada) {
+                Show(true);
+                return;
+        }
+        m_Iniciada = true;
+        try {
+                //HL7 Service init
+                if (GNC::GCS::IControladorPermisos::Instance()->Get("core.hl7", "autostart")) {
+                        GIL::HL7::ControladorEnvioHl7::Arrancar();
+                }
+        } catch(...) {
+                LOG_ERROR("Core/Init", "Error starting HL7 service");
+        }
+
+        wxWindowDisabler dis;
+
+        GNC::GCS::ControladorEventos::Instance()->Registrar(this, GNC::GCS::Events::EventoUpdateAvailable() );
+
+        std::ostringstream os;
+        os <<  GNC::Entorno::Instance()->GetApplicationName() << " " << GNC::Entorno::Instance()->GetGinkgoCopyRight();
+        SetStatusText(wxString::FromUTF8(os.str().c_str()));
+        //Center();
+#if !defined(_GINKGO_DEBUG)
+/////////////////ATENCION!!!! esto es porque sino en windows no va bien, se desvincula la status bar
+#ifdef _WIN32
+        Show(true);
+        Maximize(true);
+#else
+        Show(true);
+#endif
+#else
+        Show(true);
+#endif
+        SetFocus();
+        //	ComprobarActualizaciones();
+
+}
+
+//endregion
+
+//region "Getters y Setters de elementos de la interfaz"
+
+wxAuiNotebook* VentanaPrincipal::GetAUINoteBook()
+{
+        return m_pNoteBook;
+}
+
+//endregion
diff --git a/cadxcore/main/gui/mainwindow/ventanaprincipal.h b/cadxcore/main/gui/mainwindow/ventanaprincipal.h
new file mode 100644
index 0000000..3a3fc0b
--- /dev/null
+++ b/cadxcore/main/gui/mainwindow/ventanaprincipal.h
@@ -0,0 +1,355 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/internal.h>
+#include "ventanaprincipalbase.h"
+
+#include <wx/event.h>
+#include <wx/aui/aui.h>
+#include <wx/statbmp.h>
+#include <wx/bmpbuttn.h>
+
+#include <api/globals.h>
+
+#include <api/toolsystem/itool.h>
+#include <api/observers/ieventsobserver.h>
+#include <api/observers/iviewsobserver.h>
+#include <api/observers/iextensionsobserver.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class PanelGrid;
+}
+namespace GCS
+{
+class IEntorno;
+}
+}
+class wxWindowDisabler;
+class wxScrolledWindow;
+class wxStaticBitmap;
+class wxBitmapButton;
+
+const wxEventType wxEVT_PROGRESO = wxNewEventType();
+
+extern const wxEventType wxEVT_PROGRESO;
+
+//DEFINE_EVENT_TYPE(wxEVT_PROGRESO)
+
+/*BEGIN_DECLARE_EVENT_TYPES()
+	DECLARE_EVENT_TYPE( wxEVT_PROGRESO, wxNewEventType() )
+END_DECLARE_EVENT_TYPES()
+*/
+class EventoProgreso : public wxEvent
+{
+public:
+
+        typedef enum {
+                ComandoIniciado = 0,
+                ComandoEjecutando,
+                ComandoFinalizado,
+                Invalido
+        } TipoProgreso;
+
+        EventoProgreso(TipoProgreso tipo = Invalido, long threadId = 0);
+
+        EventoProgreso(const EventoProgreso& event);
+
+        ~EventoProgreso();
+
+        long GetTipo() const
+        {
+                return m_Tipo;
+        }
+
+        long GetThreadId() const
+        {
+                return m_ThreadId;
+        }
+
+        virtual wxEvent *Clone() const;
+
+protected:
+        TipoProgreso m_Tipo;
+        long         m_ThreadId;
+
+private:
+        DECLARE_DYNAMIC_CLASS_NO_ASSIGN(EventoProgreso)
+};
+
+typedef void (wxEvtHandler::*EventoProgresoFunction)(EventoProgreso&);
+
+#define EventoProgresoFunctionHandler(func) \
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(EventoProgresoFunction, &func)
+
+#define EVT_PROGRESO(func) \
+    wx__DECLARE_EVT0(wxEVT_PROGRESO, EventoProgresoFunctionHandler(func))
+
+
+class EXTAPI VentanaPrincipal : public VentanaPrincipalBase, public GNC::GCS::IExtensionsObserver, public GNC::GCS::IObservadorVistas, public GNC::GCS::IEventsObserver
+{
+public:
+
+        /* Constructor */
+        VentanaPrincipal(wxWindow* pParent, const wxString& title);
+
+        /* Destructor */
+        ~VentanaPrincipal();
+
+        /*cambia de pestaña*/
+        void ForzarCambioVista(GNC::GCS::IVista* pVista);
+
+protected:
+
+//region "Helpers"
+
+public:
+        void RefrescarMenus();
+        void CargarHistorial();
+
+//endregion
+
+//region "Eventos de actualizaciones"
+
+protected:
+        std::string m_VersionNueva; // Cadena con la version nueva para mostrar en mensajes y notificaciones (Ej: "1.5.0 beta")
+        std::string m_VersionCheck; // Cadena con la version nueva con secuencia build para fichar version y poder ignorarla. (Ej: "1.5.0.0", que podria ser 1.5.0 beta | "1.5.0.1" que podria ser 1.5.0 final)
+        bool        m_VersionChecked;
+public:
+        void ComprobarActualizaciones();
+
+        virtual void OnDoNotWarnAgainClicked( wxCommandEvent& event );
+        virtual void OnVersionNotifierClose( wxCommandEvent& event );
+
+//endregion
+
+//region "Eventos de menu"
+public:
+        /* Evento de cerrar aplicacion (evitable) */
+        void OnWindowClose(wxCloseEvent& event);
+
+        /* Evento de salir de la aplicacion */
+        virtual void OnSalir(wxCommandEvent& event);
+
+        /* Evento de lanzamiento de ventana "Acerca De" */
+        virtual void OnAcercaDe(wxCommandEvent& event);
+
+        /* Evento de lanzamiento de ventana "Online Help" */
+        virtual void OnOnlineHelp(wxCommandEvent& event);
+
+        /* Evento de lanzamiento de ventana "Online support" */
+        virtual void OnOnlineSupport(wxCommandEvent& event);
+
+        /* Open test card */
+        virtual void OnOpenTestCard(wxCommandEvent& event);
+
+        /* Evento de lanzamiento de la comprobacion de actualizaciones */
+        virtual void OnCheckForUpdates(wxCommandEvent& event);
+
+#ifdef __WXMAC__
+        void MacOpenFile(const wxString &fileName);
+#endif
+
+        /* Evento de configuracion */
+        virtual void OnConfiguracion(wxCommandEvent& event);
+
+        /*Evento de ventana de control de envio HL7*/
+        virtual void OnMensajesHL7(wxCommandEvent& event);
+
+        /*Evento de ventana de control de registros (Logs)*/
+        virtual void OnControlLogs(wxCommandEvent& event);
+
+        /* Evento de aplicacion de herramientas*/
+        virtual void OnAplicarHerramienta(wxCommandEvent& event);
+        virtual void OnUpdateUIHerramienta(wxUpdateUIEvent& event);
+        virtual void InsertToolsFromFamily(wxMenu* pParent, GNC::GCS::ITool::TToolFamily family);
+
+        /* Eventos de teclado */
+        virtual void OnKeyDown(wxKeyEvent& event);
+
+        /*menu sobre pestanias*/
+        void OnMenuCerrarTabClick(wxCommandEvent& event);
+
+        void OnMenuCerrarTodoExceptoActiva(wxCommandEvent& event);
+
+        void OnMenuCerrarTodosTabsClick(wxCommandEvent& event);
+
+        //devuelve bool si ha cerrado todos
+        bool CerrarTodosLosTabsYPanelGrids();
+
+        //closes all undocked windows
+        bool ClosesAllUndocked();
+
+        void OnMenuCerrarTabUpdateUI(wxUpdateUIEvent& event);
+
+        void OnMenuCerrarTodosTabsUpdateUI(wxUpdateUIEvent& event);
+
+        void OnMenuPrimerPlanoPestaniaActiva(wxCommandEvent& event);
+
+        /*Eventos de vista*/
+        void OnPantallaCompleta(wxCommandEvent& event);
+
+        wxWindow* GetRootWindow();
+
+        /*reorganizacion de pestañas*/
+
+        //toggle entre enc
+        void ShowStartUp(bool show);
+        void EncajarDesencajar(GNC::GCS::IVista* pVista);
+        void OnMosaicoRestaurar(wxCommandEvent& event);
+        void ReplegarPestanias();
+
+//endregion
+
+public:
+//region "Eventos de ventana"
+
+        /*evento que se ejecuta cuando se activa la app sirve para parsear los parametros*/
+        void OnInicioAplicacion(wxCommandEvent& event);
+        void EjecutarParametro(const wxString cadena, bool doLogin = false);
+
+        /* Cambio de tamaño de la ventana */
+        void OnSize(wxSizeEvent& event);
+
+//endregion
+
+//region "Eventos del control de pestañas"
+        void OnPanelClose(wxAuiManagerEvent& event);
+public:
+        bool CerrarVista(GNC::GCS::IVista* pVista);
+        bool CerrarVista(wxWindow* window);
+        void PasarAPrimerPlano(wxWindow* window);
+protected:
+        void OnNotebookPageChanging(wxAuiNotebookEvent& event);
+        void OnNotebookPageChanged(wxAuiNotebookEvent& event);
+        void OnNotebookPageClose(wxAuiNotebookEvent&   event);
+        void OnNotebookCambiarTab(wxAuiNotebookEvent&  event);
+        void OnNotebookMenuTab(wxAuiNotebookEvent&     event);
+        void OnNotebookFocus(wxChildFocusEvent&        event);
+
+
+public:
+        void DestruirPanelVista(wxWindow* panel);
+
+protected:
+        void CerrarNotebookPage(wxWindow* panel);
+
+//endregion
+
+//region "eventos ginkgo"
+protected:
+        void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+//endregion
+
+//endregion
+
+
+//region "Puntos de entrada al hilo principal de la interfaz para controlar comandos"
+
+        void OnComando(EventoProgreso& event);
+
+//endregion
+
+//region "Punto de entrada al controlador de eventos"
+        void OnEvento(wxCommandEvent& event);
+//endregion
+
+public:
+        /* Inserta una ventana en el notebook o grid  */
+        void InsertarVentana(wxWindow* pVista);
+
+        /* Elimina una vista del notebook o grid */
+        void EliminarVentana(wxWindow* pVentana);
+
+//region "Getters y Setters de elementos de la interfaz"
+
+public:
+        wxAuiNotebook* GetAUINoteBook();
+
+public:
+
+//------------------------------------------------------------------------------
+//region "IExtensionsObserver realization"
+
+        /** The module is loaded **/
+        virtual void OnModuleLoaded(GNC::GCS::IModuleController* pMC);
+        /** The module is unloaded **/
+        virtual void OnModuleUnloaded(GNC::GCS::IModuleController* pMC);
+
+        /** The module is activated **/
+        virtual void OnModuleActivated(GNC::GCS::IModuleController* pMC);
+        /** The module is deactivated **/
+        virtual void OnModuleDeactivated(GNC::GCS::IModuleController* pMC);
+
+//endregion
+
+//region "Realización de la interfaz IObservadorVistas"
+
+        virtual void OnVistaActivada(GNC::GCS::IVista* pVista);
+
+//endregion
+
+        wxAuiManager          m_mgr;
+        wxAuiNotebook*        m_pNoteBook;
+        GNC::GCS::IVista*     StartupView;
+
+
+//region "helpers"
+        void SuperFreeze();
+        void SuperThaw();
+        void PauseSuperFreeze();
+        void ContSuperFreeze();
+
+protected:
+        int m_SuperFreezeCount;
+        wxWindowDisabler* disabler; // Implementación similar a freeze/thaw pero a nivel de eventos y no respecto a responsabilidad de widgets.
+
+//endregion
+
+
+//region "login e inicializacion"
+public:
+        void Login();
+        void MostrarVentana();
+
+//endregion
+
+protected:
+        wxMenu*                     m_pMenuModulo;
+
+        // Variable que controla la coherencia de confirmación entre cerrado de la aplicacion y cerrado de tabs para
+        // no informar varias veces de lo mismo.
+        bool                  m_TratandoDeCerrar;
+
+        wxMenuBar*            m_pMenuBar;
+
+        DECLARE_EVENT_TABLE()
+        //friend class GNC::GCS::ControladorVistas;
+        bool                  m_Iniciada;
+};
+
+/* Acciones de Menus */
+enum {
+        ID_Inicio_Aplicacion = 99
+};
diff --git a/cadxcore/main/gui/mainwindow/ventanaprincipalbase.cpp b/cadxcore/main/gui/mainwindow/ventanaprincipalbase.cpp
new file mode 100644
index 0000000..4637046
--- /dev/null
+++ b/cadxcore/main/gui/mainwindow/ventanaprincipalbase.cpp
@@ -0,0 +1,269 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "ventanaprincipalbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+VentanaPrincipalBase::VentanaPrincipalBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 800,600 ), wxDefaultSize );
+
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelActualizacion = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelActualizacion->SetBackgroundColour( wxColour( 210, 210, 0 ) );
+        m_pPanelActualizacion->Hide();
+
+        wxBoxSizer* bSizer18;
+        bSizer18 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelActualizacionInterno = new wxPanel( m_pPanelActualizacion, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelActualizacionInterno->SetBackgroundColour( wxColour( 255, 255, 225 ) );
+        m_pPanelActualizacionInterno->SetToolTip( _("New Update") );
+
+        wxBoxSizer* bSizer17;
+        bSizer17 = new wxBoxSizer( wxHORIZONTAL );
+
+
+
+        bSizer17->Add( 0, 0, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pPanelActualizacionInterno->SetSizer( bSizer17 );
+        m_pPanelActualizacionInterno->Layout();
+        bSizer17->Fit( m_pPanelActualizacionInterno );
+        bSizer18->Add( m_pPanelActualizacionInterno, 0, wxEXPAND, 2 );
+
+
+        m_pPanelActualizacion->SetSizer( bSizer18 );
+        m_pPanelActualizacion->Layout();
+        bSizer18->Fit( m_pPanelActualizacion );
+        m_pMainSizer->Add( m_pPanelActualizacion, 0, wxEXPAND, 0 );
+
+        m_pSizerCentral = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pPanelCentral = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelCentral->SetBackgroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOW ) );
+
+        m_pSizerCentral->Add( m_pPanelCentral, 1, wxEXPAND, 1 );
+
+
+        m_pMainSizer->Add( m_pSizerCentral, 1, wxEXPAND, 5 );
+
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaPrincipalBase::OnKeydown ) );
+}
+
+VentanaPrincipalBase::~VentanaPrincipalBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( VentanaPrincipalBase::OnKeydown ) );
+}
+
+DialogoComandosEnEjecucionBase::DialogoComandosEnEjecucionBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 510,230 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer3;
+        bSizer3 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel10 = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel11 = new TitledPanelSinBorder( m_panel10, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel11->SetToolTip( _("The following commands will be aborted if you close the application") );
+
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxVERTICAL );
+
+        m_pListacomandos = new wxListBox( m_panel11, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0, NULL, 0 );
+        bSizer16->Add( m_pListacomandos, 1, wxEXPAND, 5 );
+
+
+        m_panel11->SetSizer( bSizer16 );
+        m_panel11->Layout();
+        bSizer16->Fit( m_panel11 );
+        bSizer15->Add( m_panel11, 1, wxEXPAND, 5 );
+
+
+        m_panel10->SetSizer( bSizer15 );
+        m_panel10->Layout();
+        bSizer15->Fit( m_panel10 );
+        bSizer3->Add( m_panel10, 1, wxEXPAND, 5 );
+
+        m_panel9 = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer4->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button1 = new wxButton( m_panel9, wxID_OK, _("Close Ginkgo CADx"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button1->SetToolTip( _("Closes the application and aborts pending commands") );
+
+        bSizer4->Add( m_button1, 0, wxRIGHT, 5 );
+
+        m_button2 = new wxButton( m_panel9, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button2->SetDefault();
+        m_button2->SetToolTip( _("Do not close the application and keep commands running") );
+
+        bSizer4->Add( m_button2, 0, wxLEFT, 5 );
+
+
+        m_panel9->SetSizer( bSizer4 );
+        m_panel9->Layout();
+        bSizer4->Fit( m_panel9 );
+        bSizer3->Add( m_panel9, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer3 );
+        this->Layout();
+        bSizer3->Fit( this );
+
+        this->Centre( wxBOTH );
+}
+
+DialogoComandosEnEjecucionBase::~DialogoComandosEnEjecucionBase()
+{
+}
+
+DetachedDialogBase::DetachedDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxFrame( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 600,400 ), wxDefaultSize );
+        this->SetBackgroundColour( wxColour( 0, 0, 0 ) );
+
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxVERTICAL );
+
+
+        this->SetSizer( bSizer8 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DetachedDialogBase::OnCloseDialogo ) );
+}
+
+DetachedDialogBase::~DetachedDialogBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DetachedDialogBase::OnCloseDialogo ) );
+
+}
+
+DialogoLoginBase::DialogoLoginBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 500,270 ), wxDefaultSize );
+
+        wxBoxSizer* m_pMainSizer;
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("User login") );
+
+        m_pMainSizer->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer141;
+        bSizer141 = new wxBoxSizer( wxVERTICAL );
+
+        m_pFormPanel = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pFormPanel->SetToolTip( _("System authentication") );
+
+        wxBoxSizer* bSizer19;
+        bSizer19 = new wxBoxSizer( wxVERTICAL );
+
+
+        bSizer19->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        wxFlexGridSizer* m_pFormSizer;
+        m_pFormSizer = new wxFlexGridSizer( 2, 2, 0, 0 );
+        m_pFormSizer->AddGrowableCol( 1 );
+        m_pFormSizer->SetFlexibleDirection( wxBOTH );
+        m_pFormSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_pLabelUser = new wxStaticText( m_pFormPanel, wxID_ANY, _("User name"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelUser->Wrap( -1 );
+        m_pFormSizer->Add( m_pLabelUser, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxBOTTOM|wxRIGHT, 5 );
+
+        m_pTCUsuario = new wxTextCtrl( m_pFormPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pTCUsuario->SetMaxLength( 0 );
+        m_pFormSizer->Add( m_pTCUsuario, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM|wxLEFT, 5 );
+
+        m_staticText3 = new wxStaticText( m_pFormPanel, wxID_ANY, _("Password"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText3->Wrap( -1 );
+        m_pFormSizer->Add( m_staticText3, 0, wxALIGN_RIGHT|wxALIGN_CENTER_VERTICAL|wxTOP|wxRIGHT, 5 );
+
+        m_pTCPassword = new wxTextCtrl( m_pFormPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PASSWORD );
+        m_pTCPassword->SetMaxLength( 0 );
+        m_pFormSizer->Add( m_pTCPassword, 0, wxALIGN_CENTER_VERTICAL|wxEXPAND|wxTOP|wxLEFT, 5 );
+
+
+        bSizer19->Add( m_pFormSizer, 0, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer19->Add( 0, 0, 1, wxEXPAND, 5 );
+
+
+        m_pFormPanel->SetSizer( bSizer19 );
+        m_pFormPanel->Layout();
+        bSizer19->Fit( m_pFormPanel );
+        bSizer141->Add( m_pFormPanel, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer141 );
+        m_pBody->Layout();
+        bSizer141->Fit( m_pBody );
+        m_pMainSizer->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_panel6 = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer14;
+        bSizer14 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pBotonCancelar = new wxButton( m_panel6, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer14->Add( m_pBotonCancelar, 0, wxALIGN_CENTER_VERTICAL, 0 );
+
+
+        bSizer14->Add( 0, 0, 1, 0, 0 );
+
+        m_pButtonLogin = new wxButton( m_panel6, wxID_OK, _("Login"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pButtonLogin->SetDefault();
+        bSizer14->Add( m_pButtonLogin, 0, 0, 0 );
+
+
+        m_panel6->SetSizer( bSizer14 );
+        m_panel6->Layout();
+        bSizer14->Fit( m_panel6 );
+        m_pMainSizer->Add( m_panel6, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+        m_pMainSizer->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_pButtonLogin->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoLoginBase::OnLogin ), NULL, this );
+}
+
+DialogoLoginBase::~DialogoLoginBase()
+{
+        // Disconnect Events
+        m_pButtonLogin->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoLoginBase::OnLogin ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/mainwindow/ventanaprincipalbase.h b/cadxcore/main/gui/mainwindow/ventanaprincipalbase.h
new file mode 100644
index 0000000..5b6e17c
--- /dev/null
+++ b/cadxcore/main/gui/mainwindow/ventanaprincipalbase.h
@@ -0,0 +1,152 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __VENTANAPRINCIPALBASE_H__
+#define __VENTANAPRINCIPALBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class HeaderPanel;
+class TitledPanel;
+class TitledPanelSinBorder;
+
+#include <wx/string.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/hyperlink.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/checkbox.h>
+#include <wx/button.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/frame.h>
+#include <wx/listbox.h>
+#include <wx/dialog.h>
+#include <wx/stattext.h>
+#include <wx/textctrl.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class VentanaPrincipalBase
+///////////////////////////////////////////////////////////////////////////////
+class VentanaPrincipalBase : public wxFrame
+{
+private:
+
+protected:
+        wxBoxSizer* m_pMainSizer;
+        wxPanel* m_pPanelActualizacion;
+        wxPanel* m_pPanelActualizacionInterno;
+        //wxHyperlinkCtrl* m_pHipervinculoActualizacion;
+        wxBoxSizer* m_pSizerCentral;
+        wxPanel* m_pPanelCentral;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnKeydown( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnVersionNotifierClose( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        VentanaPrincipalBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 800,600 ), long style = wxDEFAULT_FRAME_STYLE );
+
+        ~VentanaPrincipalBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoComandosEnEjecucionBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoComandosEnEjecucionBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_panel10;
+        TitledPanelSinBorder* m_panel11;
+        wxListBox* m_pListacomandos;
+        FooterPanel* m_panel9;
+        wxButton* m_button1;
+        wxButton* m_button2;
+
+public:
+
+        DialogoComandosEnEjecucionBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Closing Ginkgo CADx"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~DialogoComandosEnEjecucionBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DetachedDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class DetachedDialogBase : public wxFrame
+{
+private:
+
+protected:
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnCloseDialogo( wxCloseEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DetachedDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 600,400 ), long style = wxCAPTION|wxCLOSE_BOX|wxFRAME_FLOAT_ON_PARENT|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLIP_CHILDREN|wxTAB_TRAVERSAL );
+
+        ~DetachedDialogBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoLoginBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoLoginBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        TitledPanel* m_pFormPanel;
+        wxStaticText* m_pLabelUser;
+        wxTextCtrl* m_pTCUsuario;
+        wxStaticText* m_staticText3;
+        wxTextCtrl* m_pTCPassword;
+        FooterPanel* m_panel6;
+        wxButton* m_pBotonCancelar;
+        wxButton* m_pButtonLogin;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnLogin( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DialogoLoginBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("User login"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSTAY_ON_TOP );
+        ~DialogoLoginBase();
+
+};
+
+#endif //__VENTANAPRINCIPALBASE_H__
diff --git a/cadxcore/main/gui/open/OpenDialogs.fbp b/cadxcore/main/gui/open/OpenDialogs.fbp
new file mode 100644
index 0000000..92200c2
--- /dev/null
+++ b/cadxcore/main/gui/open/OpenDialogs.fbp
@@ -0,0 +1,1990 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">opendialogsbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">OpenDialogs</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">880,521</property>
+            <property name="name">DialogoDicomDirBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Acquire from DICOM Dir</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer15</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Acquire from DICOM Dir</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL|wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="CustomControl" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="class">wxDataViewCtrl</property>
+                                    <property name="close_button">1</property>
+                                    <property name="construction"> m_pResultsView = new wxDataViewCtrl(m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize,  wxDV_MULTIPLE|wxDV_ROW_LINES);</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="declaration">wxDataViewCtrl* m_pResultsView;</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="include">#include <wx/dataview.h></property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pResultsView </property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="settings"></property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer16</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Copy</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button4</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCopyClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Link</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button13</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnLinkClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button5</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">380,220</property>
+            <property name="name">SelectDriveBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Select drive</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer15</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelMessage</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Select drive</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer4</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label"></property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabel</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxChoice" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="choices"></property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pUnits</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="selection">0</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnChoice"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer16</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Ok</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button4</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnEndClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button5</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">380,220</property>
+            <property name="name">CopyOrLinkBase</property>
+            <property name="pos"></property>
+            <property name="size"></property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Copy or link</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer15</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelMessage</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Copy or link</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer4</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Do you want to copy or link files?</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabel</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer16</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Copy</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button4</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCopy</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Link</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button5</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnLink</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/open/abrir.cpp b/cadxcore/main/gui/open/abrir.cpp
new file mode 100644
index 0000000..5b13835
--- /dev/null
+++ b/cadxcore/main/gui/open/abrir.cpp
@@ -0,0 +1,175 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <vector>
+#include <sstream>
+
+#include <wx/window.h>
+#include <wx/filename.h>
+#include <wx/imaglist.h>
+#include <wx/file.h>
+#include <wx/dnd.h>
+#include <wx/dir.h>
+#include <wx/busyinfo.h>
+#include <wx/menu.h>
+#include <wx/msgdlg.h>
+#include <wx/filedlg.h>
+#include <wx/dirdlg.h>
+
+#include "abrir.h"
+#include "opendialogs.h"
+
+
+#include <main/controllers/configurationcontroller.h>
+#include <main/entorno.h>
+#include <main/controllers/controladorextensiones.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/pacscontroller.h>
+#include <commands/comandoincluirhistorial.h>
+#include <api/dicom/imodelodicom.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <main/controllers/anonusagestats.h>
+
+namespace GNC
+{
+namespace GUI
+{
+
+Abrir::Abrir()
+{
+}
+
+Abrir::~Abrir()
+{
+
+}
+
+void Abrir::AbrirFichero(wxWindow* pParent, const std::list<std::string>* directLoads)
+{
+        LOG_STAT(ANON_STAT_OPEN_FILE)
+        bool success = false;
+        std::list<std::string> listaPaths;
+        wxString guiDir;
+
+        if (directLoads != NULL) {
+
+                listaPaths = (*directLoads);
+
+                success = !listaPaths.empty();
+
+        } else {
+                std::string pathDefectoStd;
+                GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Adquisicion", "PathDefecto", pathDefectoStd);
+                wxString defPathWx = wxString::FromUTF8(pathDefectoStd.c_str());
+                if(!wxDirExists(defPathWx)) {
+                        defPathWx = wxEmptyString;
+                }
+                //se muestra un dialogo de abrir fichero, si abre un fichero mira a ver si es dicomdir, si abre un directorio lo explora en profundidad
+#if defined(_WINDOWS)
+                wxFileDialog fileDialog(pParent,_("Open..."),defPathWx,wxEmptyString,wxT("*.*"), wxFD_OPEN | wxFD_MULTIPLE);
+#else
+                wxFileDialog fileDialog(pParent,_("Open..."),defPathWx,wxEmptyString,wxT("*"), wxFD_OPEN | wxFD_MULTIPLE);
+#endif
+                fileDialog.SetDirectory(defPathWx);
+                success = (fileDialog.ShowModal() == wxID_OK);
+
+                if (success) {
+
+                        guiDir = fileDialog.GetDirectory();
+                        wxArrayString ficherosWx;
+                        fileDialog.GetFilenames(ficherosWx);
+
+                        for(wxArrayString::iterator it = ficherosWx.begin(); it != ficherosWx.end(); ++it) {
+                                wxString wxPath = fileDialog.GetDirectory() + wxFileName::GetPathSeparator() + (*it);
+                                listaPaths.push_back(std::string(TOPATH(wxPath)));
+                        }
+                }
+        }
+
+        if (success) {
+
+                //si alguno de los ficheros es un dicomdir se pasa a tratarlos de una forma especial, si son ficheros normales, se lanza el comando
+                bool esDicomDir = false;
+                if (listaPaths.size() == 1 && GIL::DICOM::PACSController::Instance()->EsDICOM(listaPaths.front(),true,false)) {
+                        esDicomDir = true;
+                }
+
+                if (!esDicomDir) {
+                        CopyOrLink colDialog(pParent);
+                        if (colDialog.ShowModal() == wxID_OK) {
+                                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = NULL;
+                                if (colDialog.HasSelectedCopy()) {
+                                        pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(listaPaths, false, GNC::GCS::IHistoryController::TAA_COPY);
+                                } else {
+                                        pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(listaPaths, false, GNC::GCS::IHistoryController::TAA_LINK);
+                                }
+                                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+                                GNC::Entorno::Instance()->GetCommandController()->ProcessAsync(_Std("Storing in the history..."),pCmd, NULL);
+                        }
+                } else {
+                        //dialogo de adquisicion a traves de dicomdir...
+                        DialogoDicomDir dicomDirDialog(pParent,listaPaths.front());
+                        dicomDirDialog.ShowModal();
+                }
+
+                if (!guiDir.IsEmpty()) {
+                        //se actualiza el fichero de configuracion
+                        GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Adquisicion", "PathDefecto", std::string(guiDir.ToUTF8()));
+                        GNC::GCS::ConfigurationController::Instance()->Flush();
+                }
+        }
+}
+
+//abrir directorio
+void Abrir::AbrirDirectorio(wxWindow* pParent)
+{
+        LOG_STAT(ANON_STAT_OPEN_FOLDER)
+        std::string defPath;
+        GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Adquisicion", "PathDefecto", defPath);
+        wxString pathDefecto = wxString::FromUTF8(defPath.c_str());
+        if(!wxDirExists(pathDefecto)) {
+                pathDefecto = wxEmptyString;
+        }
+        wxDirDialog dd( pParent, _("Choose a directory"), pathDefecto, 0, wxDefaultPosition );
+        int response = dd.ShowModal();
+        if (response == wxID_OK) {
+                std::string stdPath(TOPATH(dd.GetPath()));
+                //se lanza el comando de incluir en el historial
+                CopyOrLink colDialog(pParent);
+                if (colDialog.ShowModal() == wxID_OK) {
+                        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = NULL;
+                        if (colDialog.HasSelectedCopy()) {
+                                pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(stdPath,true, GNC::GCS::IHistoryController::TAA_COPY);
+                        } else {
+                                pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(stdPath,true, GNC::GCS::IHistoryController::TAA_LINK);
+                        }
+                        GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+                        GNC::Entorno::Instance()->GetCommandController()->ProcessAsync(_Std("Storing in the history..."),pCmd, NULL);
+                }
+                //se actualiza el fichero de configuracion
+                GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/Adquisicion", "PathDefecto", std::string(dd.GetPath().ToUTF8()));
+                GNC::GCS::ConfigurationController::Instance()->Flush();
+        }
+}
+}
+
+}
diff --git a/cadxcore/main/gui/open/abrir.h b/cadxcore/main/gui/open/abrir.h
new file mode 100644
index 0000000..6da73b5
--- /dev/null
+++ b/cadxcore/main/gui/open/abrir.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+
+#include <main/controllers/pacscontroller.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class Abrir
+{
+
+public:
+        Abrir();
+        ~Abrir();
+
+        static void AbrirFichero(wxWindow* pParent, const std::list<std::string>* directLoads = NULL);
+        static void AbrirDirectorio(wxWindow* pParent);
+
+protected:
+};
+}
+}
diff --git a/cadxcore/main/gui/open/dicomdirtablemodel.cpp b/cadxcore/main/gui/open/dicomdirtablemodel.cpp
new file mode 100644
index 0000000..fe24658
--- /dev/null
+++ b/cadxcore/main/gui/open/dicomdirtablemodel.cpp
@@ -0,0 +1,260 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <map>
+#include "dicomdirtablemodel.h"
+#include <main/controllers/controladorlog.h>
+#include <set>
+#include <wx/imaglist.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/pacscontroller.h>
+
+#define SIZE_ICONOS 16
+
+
+/////////////////////////////
+GNC::GUI::DicomDirTableModel::DicomDirTableModel()
+{
+}
+
+
+GNC::GUI::DicomDirTableModel::~DicomDirTableModel()
+{
+}
+
+unsigned int GNC::GUI::DicomDirTableModel::GetColumnCount() const
+{
+        return COL_DICOM_DIR_MAX;
+}
+
+wxString GNC::GUI::DicomDirTableModel::GetColumnType( unsigned int/* col*/ ) const
+{
+        return wxT("string");
+}
+
+void GNC::GUI::DicomDirTableModel::GetValue( wxVariant &variant, const wxDataViewItem &item, unsigned int col ) const
+{
+        if (!item.IsOk()) {
+                return;
+        }
+        //if it's a study...
+        const IModeloEstudio* pNode = (const IModeloEstudio*)(item.GetID());
+        switch (col) {
+        case COL_CHECK: {
+                if (checkedStudies.find(pNode) == checkedStudies.end()) {
+                        variant = true;
+                } else {
+                        variant = (*checkedStudies.find(pNode)).second;
+                }
+        }
+        return;
+        case COL_PATIENT_NAME:
+                variant = wxString::FromUTF8(pNode->GetPatient()->GetNombre().c_str());
+                break;
+        case COL_PATIENT_ID:
+                variant = wxString::FromUTF8(pNode->GetPatient()->GetUID().c_str());
+                break;
+        case COL_MODALITY: {
+                if (pNode->GetModalidad().empty()) {
+                        //get modalities from series..
+                        std::ostringstream ostr;
+                        std::set<std::string> distinctModalities;
+                        for (IModeloEstudio::ListaSeriesType::const_iterator itSeries = pNode->ListaSeries().begin(); itSeries != pNode->ListaSeries().end(); ++itSeries) {
+                                distinctModalities.insert((*itSeries).GetTipo());
+                        }
+                        for (std::set<std::string>::iterator it = distinctModalities.begin(); it != distinctModalities.end(); ++it) {
+                                if(it != distinctModalities.begin()) {
+                                        ostr << "/";
+                                }
+                                ostr << *it;
+                        }
+                        variant = wxString::FromUTF8(ostr.str().c_str());
+                } else {
+                        variant = wxString::FromUTF8(pNode->GetModalidad().c_str());
+                }
+        }
+        break;
+        case COL_DESCRIPTION:
+                variant = wxString::FromUTF8(pNode->GetDescripcion().c_str());
+                break;
+        case COL_DATE_TIME: {
+                std::ostringstream ostr;
+                ostr << pNode->GetFecha() << pNode->GetHora();
+                wxDateTime studyDateTime;
+                studyDateTime.ParseFormat(wxString::FromUTF8( ostr.str().c_str() ).GetData(), wxT("%Y%m%d%H%M%S"), wxDefaultDateTime);
+                if(studyDateTime.IsValid()) {
+                        variant = wxString(studyDateTime.Format(_("%m/%d/%Y %H:%M:%S"), wxDateTime::TimeZone(wxDateTime::GMT1)));
+                } else {
+                        variant = _("00/00/0000 00:00:00");
+                }
+        }
+        break;
+        case COL_ACCNUMBER:
+                variant = wxString::FromUTF8(pNode->GetAccNumber().c_str());
+                break;
+        default:
+                LOG_ERROR("DicomDirTableModel", "wrong column id " << col);
+                break;
+        }
+}
+
+
+bool GNC::GUI::DicomDirTableModel::SetValue( const wxVariant &variant,const wxDataViewItem &item, unsigned int col )
+{
+        //model cant be modified...
+        if (!item.IsOk() || col != COL_CHECK) {
+                return false;
+        }
+        const IModeloEstudio* pNode = (const IModeloEstudio*)(item.GetID());
+        checkedStudies[pNode] = variant.GetBool();
+        return true;
+}
+
+bool GNC::GUI::DicomDirTableModel::IsEnabled( const wxDataViewItem &/*item*/, unsigned int/* col*/ ) const
+{
+        return true;
+}
+
+wxDataViewItem GNC::GUI::DicomDirTableModel::GetParent( const wxDataViewItem &/*item*/ ) const
+{
+        return wxDataViewItem(0);
+}
+
+bool GNC::GUI::DicomDirTableModel::IsContainer( const wxDataViewItem &item ) const
+{
+        return !item.IsOk();
+}
+
+bool GNC::GUI::DicomDirTableModel::HasContainerColumns (const wxDataViewItem &/*item*/) const
+{
+        return true;
+}
+
+bool GNC::GUI::DicomDirTableModel::HasValue (const wxDataViewItem &item, unsigned /*col*/) const
+{
+        if (!item.IsOk()) {
+                return false;
+        }
+        return true;
+}
+
+
+unsigned int GNC::GUI::DicomDirTableModel::GetChildren( const wxDataViewItem &parent, wxDataViewItemArray &array ) const
+{
+        if (!parent.IsOk()) {
+                //root items
+                //we will use pointers to IStudy as wxDataViewItems
+                for (IModeloDicom::ListaPacientesType::const_iterator itPatient = dicomModel.ListaPacientes().begin(); itPatient != dicomModel.ListaPacientes().end(); ++itPatient) {
+                        for (IModeloPaciente::ListaEstudiosType::const_iterator itStudy = (*itPatient).ListaEstudios().begin(); itStudy != (*itPatient).ListaEstudios().end(); ++itStudy) {
+                                const IModeloEstudio& study = *itStudy;
+                                array.Add( wxDataViewItem( (void*)&study ) );
+                        }
+                }
+                return array.Count();
+        } else {
+                return 0;
+        }
+}
+
+int GNC::GUI::DicomDirTableModel::Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
+                unsigned int column, bool ascending ) const
+{
+        if (column == COL_DATE_TIME && item1.IsOk() && item2.IsOk()) {
+                const IModeloEstudio* node1 = (const IModeloEstudio*) item1.GetID();
+                const IModeloEstudio* node2 = (const IModeloEstudio*) item1.GetID();
+
+                int res = node1->GetFecha().compare(node2->GetFecha());
+                if (res == 0) {
+                        res = node1->GetHora().compare(node2->GetHora());
+                }
+                if (!ascending) {
+                        if (res == 1) {
+                                res = -1;
+                        } else if (res == -1) {
+                                res = 1;
+                        }
+                }
+                return res;
+        }
+
+        return wxDataViewModel::Compare( item1, item2, column, ascending );
+}
+
+void GNC::GUI::DicomDirTableModel::GetSelectedPaths(TListPaths& paths)
+{
+        for (IModeloDicom::ListaPacientesType::const_iterator itPatient = dicomModel.ListaPacientes().begin(); itPatient != dicomModel.ListaPacientes().end(); ++itPatient) {
+                for (IModeloPaciente::ListaEstudiosType::const_iterator itStudy = (*itPatient).ListaEstudios().begin(); itStudy != (*itPatient).ListaEstudios().end(); ++itStudy) {
+                        const IModeloEstudio& study = (*itStudy);
+                        bool selected = true; //default value is true
+                        if (checkedStudies.find(&study) != checkedStudies.end()) {
+                                selected = (*checkedStudies.find(&study)).second;
+                        }
+                        if (selected) {
+                                for (IModeloEstudio::ListaSeriesType::const_iterator itSeries = study.ListaSeries().begin(); itSeries != study.ListaSeries().end(); ++itSeries) {
+                                        const IModeloSerie& series = (*itSeries);
+                                        for (IModeloSerie::ListaImagenesType::const_iterator itImages = series.ListaImagenes().begin(); itImages != series.ListaImagenes().end(); ++itImages) {
+                                                paths.push_back((*itImages).GetPathImagen());
+                                        }
+                                }
+                        }
+                }
+        }
+
+}
+
+IModeloDicom& GNC::GUI::DicomDirTableModel::GetModel()
+{
+        return dicomModel;
+}
+
+void GNC::GUI::DicomDirTableModel::ToggleAllSelections()
+{
+        //we will set false or not first value
+        bool newValue = false;
+        if (!checkedStudies.empty()) {
+                newValue = !checkedStudies.begin()->second;
+        }
+        wxDataViewItemArray itemsChanged;
+        for (IModeloDicom::ListaPacientesType::const_iterator itPatient = dicomModel.ListaPacientes().begin(); itPatient != dicomModel.ListaPacientes().end(); ++itPatient) {
+                for (IModeloPaciente::ListaEstudiosType::const_iterator itStudy = (*itPatient).ListaEstudios().begin(); itStudy != (*itPatient).ListaEstudios().end(); ++itStudy) {
+                        const IModeloEstudio& study = (*itStudy);
+                        checkedStudies[&study] = newValue;
+                        itemsChanged.Add( wxDataViewItem( (void*) &(*itStudy)) );
+                }
+        }
+        //all items has been modfied...
+        ItemsChanged(itemsChanged);
+}
+
+bool GNC::GUI::DicomDirTableModel::LoadModel(const std::string& pathDicomDir)
+{
+        Cleared();
+        if(!GIL::DICOM::PACSController::Instance()->LeerDicomDir(pathDicomDir,&dicomModel)) {
+                return false;
+        } else {
+                //in gtk implementation we have to to this...
+                wxDataViewItemArray childrenAdded;
+                if (GetChildren(wxDataViewItem(NULL), childrenAdded) > 0) {
+                        ItemsAdded(wxDataViewItem(NULL), childrenAdded);
+                }
+                return true;
+        }
+}
+
diff --git a/cadxcore/main/gui/open/dicomdirtablemodel.h b/cadxcore/main/gui/open/dicomdirtablemodel.h
new file mode 100644
index 0000000..f0168ec
--- /dev/null
+++ b/cadxcore/main/gui/open/dicomdirtablemodel.h
@@ -0,0 +1,83 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <map>
+#include <wx/dynarray.h>
+#include <wx/dataview.h>
+#include <prvext/prvext.h>
+#include <api/ilock.h>
+#include <api/autoptr.h>
+#include <api/dicom/imodelodicom.h>
+
+class wxImageList;
+namespace GNC
+{
+namespace GUI
+{
+class DicomDirTableModel: public wxDataViewModel
+{
+public:
+        enum {
+                COL_CHECK=0,
+                COL_ICON,
+                COL_PATIENT_NAME,
+                COL_PATIENT_ID,
+                COL_MODALITY,
+                COL_DESCRIPTION,
+                COL_DATE_TIME,
+                COL_ACCNUMBER,
+                COL_DICOM_DIR_MAX
+        };
+        DicomDirTableModel();
+        ~DicomDirTableModel();
+
+        //wxDataViewModel methods
+        virtual unsigned int GetColumnCount() const;
+        virtual wxString GetColumnType( unsigned int col ) const;
+        virtual void GetValue( wxVariant &variant,
+                               const wxDataViewItem &item, unsigned int col ) const;
+        virtual bool SetValue( const wxVariant &variant,
+                               const wxDataViewItem &item, unsigned int col );
+        virtual bool IsEnabled( const wxDataViewItem &item, unsigned int col ) const;
+        virtual wxDataViewItem GetParent( const wxDataViewItem &item ) const;
+        virtual bool IsContainer( const wxDataViewItem &item ) const;
+        bool 	HasValue (const wxDataViewItem &item, unsigned col) const;
+        virtual bool HasContainerColumns (const wxDataViewItem &item) const ;
+        virtual unsigned int GetChildren( const wxDataViewItem &parent,
+                                          wxDataViewItemArray &array ) const;
+        int Compare( const wxDataViewItem &item1, const wxDataViewItem &item2,
+                     unsigned int column, bool ascending ) const;
+        //
+        typedef std::list<std::string>TListPaths;
+        void GetSelectedPaths(TListPaths& paths);
+
+        IModeloDicom& GetModel();
+        void ToggleAllSelections();
+        bool LoadModel(const std::string& pathDicomDir);
+protected:
+        long GetAge(const std::string& patBirthDate, const std::string& studyDateTime) const;
+
+        typedef std::map<const IModeloEstudio*, bool> TStudiesChecked;
+        TStudiesChecked checkedStudies;
+        IModeloDicom dicomModel;
+};
+}
+}
diff --git a/cadxcore/main/gui/open/opendialogs.cpp b/cadxcore/main/gui/open/opendialogs.cpp
new file mode 100644
index 0000000..685dacb
--- /dev/null
+++ b/cadxcore/main/gui/open/opendialogs.cpp
@@ -0,0 +1,232 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <vector>
+#include <sstream>
+
+#include <wx/dialog.h>
+#include <wx/dirdlg.h>
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/imaglist.h>
+
+#include <main/controllers/configurationcontroller.h>
+#include <wx/msgdlg.h>
+#include "opendialogsbase.h"
+
+#include "opendialogs.h"
+#include "dicomdirtablemodel.h"
+
+#include <main/entorno.h>
+#include <main/controllers/commandcontroller.h>
+#include <commands/comandoincluirhistorial.h>
+#include <api/dicom/imodelodicom.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#define ICONO_ESTUDIO 0
+#define ICONO_SERIE 1
+#define ICONO_HOMBRE 2
+#define ICONO_MUJER 3
+#define ICONO_OTRO 4
+#define SIZE_ICONOS 16
+
+#define COLUMNA_DCMDIR_FECHA 2
+#define COLUMNA_DCMDIR_MODALIDAD 1
+#define COLUMNA_DCMDIR_MEDICO 3
+#define COLUMNA_DCMDIR_ACCNUMBER 4
+#define COLUMNA_DCMDIR_UID 5
+namespace GNC
+{
+namespace GUI
+{
+////////////////////////////////////////////////////
+////////////DIALOGO DICOMDIR////////////////////////
+////////////////////////////////////////////////////
+DialogoDicomDir::DialogoDicomDir(wxWindow* pParent, const std::string& pathDicomDir):
+        DialogoDicomDirBase(pParent),
+        m_pDicomDirTableModel(new DicomDirTableModel())
+{
+        m_pResultsView ->AssociateModel(m_pDicomDirTableModel.get());
+        m_pResultsView->AppendToggleColumn(GinkgoResourcesManager::MenuIcons::GetIcoAbrir(), DicomDirTableModel::COL_CHECK, wxDATAVIEW_CELL_ACTIVATABLE, 50, wxALIGN_CENTER);
+        m_pResultsView->AppendColumn(new wxDataViewColumn(_("Patient name"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ),DicomDirTableModel::COL_PATIENT_NAME, 200, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pResultsView->AppendColumn(new wxDataViewColumn(_("Patient id"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ),DicomDirTableModel::COL_PATIENT_ID, 100, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pResultsView->AppendColumn(new wxDataViewColumn(_("Modality"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ),DicomDirTableModel::COL_MODALITY, 60, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pResultsView->AppendColumn(new wxDataViewColumn(_("Date"), new wxDataViewTextRenderer(wxT("string"), wxDATAVIEW_CELL_INERT),DicomDirTableModel::COL_DATE_TIME, 120, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pResultsView->AppendColumn(new wxDataViewColumn(_("Description"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ),DicomDirTableModel::COL_DESCRIPTION, 110, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+        m_pResultsView->AppendColumn(new wxDataViewColumn(_("Accession number"), new wxDataViewTextRenderer( wxT("string"), wxDATAVIEW_CELL_INERT ),DicomDirTableModel::COL_ACCNUMBER, 128, wxALIGN_LEFT, wxDATAVIEW_COL_SORTABLE | wxDATAVIEW_COL_RESIZABLE));
+
+        wxString pathWx = FROMPATH(pathDicomDir);
+        if (wxFile::Exists(pathWx)) {
+                if (!m_pDicomDirTableModel->LoadModel(pathDicomDir)) {
+                        wxMessageBox(_("There was an error reading DICOMDIR file"), _("Info"),
+                                     wxOK | wxICON_INFORMATION, this);
+                }
+        } else {
+                wxMessageBox(_("Select a valid DICOMDIR file"), _("Info"),
+                             wxOK | wxICON_INFORMATION, this);
+        }
+        m_pBody->Layout();
+        Layout();
+        m_pResultsView->Connect(wxEVT_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DialogoDicomDir::OnItemActivation ), NULL, this);
+        m_pResultsView->Connect(wxEVT_DATAVIEW_COLUMN_HEADER_CLICK, wxDataViewEventHandler( DialogoDicomDir::OnColumnHeaderClick ), NULL, this);
+        m_pResultsView->Connect(wxEVT_CHAR, wxKeyEventHandler(DialogoDicomDir::OnListChar), NULL, this);
+}
+
+DialogoDicomDir::~DialogoDicomDir()
+{
+}
+
+void DialogoDicomDir::OnCopyClick(wxCommandEvent&)
+{
+        Acquire(true);
+}
+
+void DialogoDicomDir::OnLinkClick(wxCommandEvent&)
+{
+        Acquire(false);
+}
+
+void DialogoDicomDir::OnItemActivation(wxDataViewEvent& event)
+{
+        if (!event.GetItem().IsOk()) {
+                return;
+        }
+        wxDataViewItem item = event.GetItem();
+
+        wxVariant curValue;
+        m_pDicomDirTableModel->GetValue(curValue, item, DicomDirTableModel::COL_CHECK);
+        m_pDicomDirTableModel->SetValue(!curValue.GetBool(), item, DicomDirTableModel::COL_CHECK);
+        m_pDicomDirTableModel->ItemChanged(item);
+}
+
+void DialogoDicomDir::OnColumnHeaderClick(wxDataViewEvent& event)
+{
+        //minus or equal is because in GTK we receive -1 as column...
+        if (event.GetColumn() <= 0) {
+                m_pDicomDirTableModel->ToggleAllSelections();
+                event.Skip(false);
+        } else {
+                event.Skip(true);
+        }
+}
+
+void DialogoDicomDir::OnListChar(wxKeyEvent&event)
+{
+        if (event.GetKeyCode() == WXK_SPACE) {
+                wxDataViewItemArray selected;
+                m_pResultsView->GetSelections(selected);
+                wxVariant curValue;
+                for (wxDataViewItemArray::iterator it = selected.begin(); it != selected.end(); ++it) {
+                        m_pDicomDirTableModel->GetValue(curValue, *it, DicomDirTableModel::COL_CHECK);
+                        m_pDicomDirTableModel->SetValue(!curValue.GetBool(), *it, DicomDirTableModel::COL_CHECK);
+                }
+                m_pDicomDirTableModel->ItemsChanged(selected);
+                event.Skip(false);
+        } else {
+                event.Skip(true);
+        }
+}
+
+void DialogoDicomDir::Acquire(bool copy)
+{
+        //adquirimos desde dicomdir
+        std::list<std::string> listaPaths;
+        m_pDicomDirTableModel->GetSelectedPaths(listaPaths);
+
+        if(listaPaths.empty()) {
+                wxMessageBox(_("Select dicom dir files you want to acquire"), _("Info"),
+                             wxOK | wxICON_INFORMATION, this);
+                return;
+        } else {
+                //se lanza el comando de incluir en el historial
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams* pParams = NULL;
+                if (copy) {
+                        pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(listaPaths, false, GNC::GCS::IHistoryController::TAA_COPY);
+                } else {
+                        pParams = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorialParams(listaPaths, false, GNC::GCS::IHistoryController::TAA_LINK);
+                }
+                GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial* pCmd = new GADAPI::ComandoIncluirHistorial::ComandoIncluirHistorial(pParams);
+                GNC::Entorno::Instance()->GetCommandController()->ProcessAsync(_Std("Storing in the history..."),pCmd, NULL);
+
+                Close();
+        }
+}
+///////////////////////////////////////END OF DIALOGODICOMDIR
+SelectDrive::SelectDrive(wxWindow* pParent, const TListOfDrives& drives) : SelectDriveBase(pParent)
+{
+        m_drives = drives;
+        for (TListOfDrives::iterator it = m_drives.begin(); it != m_drives.end(); ++it) {
+                m_pUnits->Append(wxString::FromUTF8((*it).label.c_str()));
+        }
+        if (m_pUnits->GetCount() > 0) {
+                m_pUnits->Select(0);
+        }
+}
+SelectDrive::~SelectDrive()
+{
+}
+
+void SelectDrive::SetMessage(const wxString& label)
+{
+        m_pLabel->SetLabel(label);
+        m_pPanelMessage->Layout();
+        m_pBody->Layout();
+}
+
+std::string SelectDrive::GetSelectedDrive()
+{
+        TListOfDrives::iterator it = m_drives.begin();
+        for (int i = 0; i < m_pUnits->GetSelection(); ++i, ++it);
+        return (*it).id;
+}
+
+CopyOrLink::CopyOrLink(wxWindow* pParent) : CopyOrLinkBase(pParent, wxID_ANY, _("Copy or link"), wxDefaultPosition, wxDefaultSize, wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU)
+{
+        m_copy = true;
+        m_pPanelMessage->Layout();
+        m_pBody->Layout();
+        CentreOnParent();
+}
+
+CopyOrLink::~CopyOrLink()
+{
+}
+
+bool CopyOrLink::HasSelectedCopy()
+{
+        return m_copy;
+}
+
+void CopyOrLink::OnCopy(wxCommandEvent &/*event*/)
+{
+        m_copy = true;
+        EndModal(wxID_OK);
+}
+
+void CopyOrLink::OnLink(wxCommandEvent &/*event*/)
+{
+        m_copy = false;
+        EndModal(wxID_OK);
+}
+}
+}
diff --git a/cadxcore/main/gui/open/opendialogs.h b/cadxcore/main/gui/open/opendialogs.h
new file mode 100644
index 0000000..b95ba6b
--- /dev/null
+++ b/cadxcore/main/gui/open/opendialogs.h
@@ -0,0 +1,87 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <wx/dialog.h>
+#include <main/gui/open/opendialogsbase.h>
+
+
+namespace GNC
+{
+namespace GUI
+{
+////////////////////////////////////////////////////
+////////////DIALOGO DICOMDIR////////////////////////
+////////////////////////////////////////////////////
+
+class DicomDirTableModel;
+class DialogoDicomDir: public DialogoDicomDirBase
+{
+public:
+        DialogoDicomDir(wxWindow* pParent, const std::string& pathDicomDir);
+
+        ~DialogoDicomDir();
+        void OnCopyClick(wxCommandEvent&);
+        void OnLinkClick(wxCommandEvent&);
+        void OnItemActivation(wxDataViewEvent& event);
+        void OnColumnHeaderClick(wxDataViewEvent& event);
+        void OnListChar(wxKeyEvent&event);
+protected:
+        void Acquire(bool copy);
+
+        wxObjectDataPtr<DicomDirTableModel> m_pDicomDirTableModel;
+};
+
+class SelectDrive: public SelectDriveBase
+{
+public:
+        typedef struct TDrive {
+                std::string id;
+                std::string label;
+                TDrive(const std::string& id, const std::string& label)
+                {
+                        this->id = id;
+                        this->label = label;
+                }
+        } TDrive;
+        typedef std::list<TDrive> TListOfDrives;
+        TListOfDrives m_drives;
+
+        SelectDrive(wxWindow* pParent, const TListOfDrives& drives);
+        ~SelectDrive();
+
+        void SetMessage(const wxString& label);
+        std::string GetSelectedDrive();
+};
+
+class CopyOrLink: public CopyOrLinkBase
+{
+public:
+        CopyOrLink(wxWindow* pParent);
+        ~CopyOrLink();
+
+        bool HasSelectedCopy();
+protected:
+        void OnCopy(wxCommandEvent &event);
+        void OnLink(wxCommandEvent &event);
+        bool m_copy;
+};
+}
+}
diff --git a/cadxcore/main/gui/open/opendialogsbase.cpp b/cadxcore/main/gui/open/opendialogsbase.cpp
new file mode 100644
index 0000000..fb1bfab
--- /dev/null
+++ b/cadxcore/main/gui/open/opendialogsbase.cpp
@@ -0,0 +1,229 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "opendialogsbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+DialogoDicomDirBase::DialogoDicomDirBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 880,521 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pHeader->SetToolTip( _("Acquire from DICOM Dir") );
+
+        bSizer15->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pResultsView = new wxDataViewCtrl(m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize,  wxDV_MULTIPLE|wxDV_ROW_LINES);
+        bSizer7->Add( m_pResultsView , 1, wxALL|wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer15->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button4 = new wxButton( m_pFooter, wxID_OK, _("Copy"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button4->SetDefault();
+        bSizer16->Add( m_button4, 0, wxRIGHT, 5 );
+
+        m_button13 = new wxButton( m_pFooter, wxID_ANY, _("Link"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button13, 0, wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_button5 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button5, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer16 );
+        m_pFooter->Layout();
+        bSizer16->Fit( m_pFooter );
+        bSizer15->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer15 );
+        this->Layout();
+        bSizer15->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoDicomDirBase::OnCopyClick ), NULL, this );
+        m_button13->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoDicomDirBase::OnLinkClick ), NULL, this );
+}
+
+DialogoDicomDirBase::~DialogoDicomDirBase()
+{
+        // Disconnect Events
+        m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoDicomDirBase::OnCopyClick ), NULL, this );
+        m_button13->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoDicomDirBase::OnLinkClick ), NULL, this );
+
+}
+
+SelectDriveBase::SelectDriveBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 380,220 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelMessage = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelMessage->SetToolTip( _("Select drive") );
+
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxVERTICAL );
+
+        m_pLabel = new wxStaticText( m_pPanelMessage, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->Wrap( -1 );
+        bSizer4->Add( m_pLabel, 0, wxALL, 5 );
+
+        wxArrayString m_pUnitsChoices;
+        m_pUnits = new wxChoice( m_pPanelMessage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pUnitsChoices, 0 );
+        m_pUnits->SetSelection( 0 );
+        bSizer4->Add( m_pUnits, 0, wxALL, 5 );
+
+
+        m_pPanelMessage->SetSizer( bSizer4 );
+        m_pPanelMessage->Layout();
+        bSizer4->Fit( m_pPanelMessage );
+        bSizer7->Add( m_pPanelMessage, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer15->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button4 = new wxButton( m_pFooter, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button4->SetDefault();
+        bSizer16->Add( m_button4, 0, wxRIGHT, 5 );
+
+        m_button5 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button5, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer16 );
+        m_pFooter->Layout();
+        bSizer16->Fit( m_pFooter );
+        bSizer15->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer15 );
+        this->Layout();
+        bSizer15->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectDriveBase::OnEndClick ), NULL, this );
+}
+
+SelectDriveBase::~SelectDriveBase()
+{
+        // Disconnect Events
+        m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SelectDriveBase::OnEndClick ), NULL, this );
+
+}
+
+CopyOrLinkBase::CopyOrLinkBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 380,220 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelMessage = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelMessage->SetToolTip( _("Copy or link") );
+
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxVERTICAL );
+
+        m_pLabel = new wxStaticText( m_pPanelMessage, wxID_ANY, _("Do you want to copy or link files?"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->Wrap( -1 );
+        bSizer4->Add( m_pLabel, 0, wxALL, 5 );
+
+
+        m_pPanelMessage->SetSizer( bSizer4 );
+        m_pPanelMessage->Layout();
+        bSizer4->Fit( m_pPanelMessage );
+        bSizer7->Add( m_pPanelMessage, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer15->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button4 = new wxButton( m_pFooter, wxID_ANY, _("Copy"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button4->SetDefault();
+        bSizer16->Add( m_button4, 0, wxRIGHT, 5 );
+
+        m_button5 = new wxButton( m_pFooter, wxID_ANY, _("Link"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button5, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer16 );
+        m_pFooter->Layout();
+        bSizer16->Fit( m_pFooter );
+        bSizer15->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer15 );
+        this->Layout();
+        bSizer15->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyOrLinkBase::OnCopy ), NULL, this );
+        m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyOrLinkBase::OnLink ), NULL, this );
+}
+
+CopyOrLinkBase::~CopyOrLinkBase()
+{
+        // Disconnect Events
+        m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyOrLinkBase::OnCopy ), NULL, this );
+        m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CopyOrLinkBase::OnLink ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/open/opendialogsbase.h b/cadxcore/main/gui/open/opendialogsbase.h
new file mode 100644
index 0000000..f5d12dc
--- /dev/null
+++ b/cadxcore/main/gui/open/opendialogsbase.h
@@ -0,0 +1,132 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __OPENDIALOGSBASE_H__
+#define __OPENDIALOGSBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class HeaderPanel;
+class TitledPanel;
+
+#include <wx/panel.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/dataview.h>
+#include <wx/sizer.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+#include <wx/stattext.h>
+#include <wx/choice.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoDicomDirBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoDicomDirBase : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBody;
+        wxDataViewCtrl* m_pResultsView;
+        FooterPanel* m_pFooter;
+        wxButton* m_button4;
+        wxButton* m_button13;
+        wxButton* m_button5;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnCopyClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnLinkClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DialogoDicomDirBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Acquire from DICOM Dir"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~DialogoDicomDirBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class SelectDriveBase
+///////////////////////////////////////////////////////////////////////////////
+class SelectDriveBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelMessage;
+        wxStaticText* m_pLabel;
+        wxChoice* m_pUnits;
+        FooterPanel* m_pFooter;
+        wxButton* m_button4;
+        wxButton* m_button5;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnEndClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        SelectDriveBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select drive"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~SelectDriveBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CopyOrLinkBase
+///////////////////////////////////////////////////////////////////////////////
+class CopyOrLinkBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelMessage;
+        wxStaticText* m_pLabel;
+        FooterPanel* m_pFooter;
+        wxButton* m_button4;
+        wxButton* m_button5;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnCopy( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnLink( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        CopyOrLinkBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Copy or link"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~CopyOrLinkBase();
+
+};
+
+#endif //__OPENDIALOGSBASE_H__
diff --git a/cadxcore/main/gui/pacsupload/PACSUpload.fbp b/cadxcore/main/gui/pacsupload/PACSUpload.fbp
new file mode 100644
index 0000000..62df891
--- /dev/null
+++ b/cadxcore/main/gui/pacsupload/PACSUpload.fbp
@@ -0,0 +1,814 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">pacsuploaddialogbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">PACSUploadDialogBase</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">460,300</property>
+            <property name="name">PACSUploadDialogBase</property>
+            <property name="pos"></property>
+            <property name="size">712,495</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Upload study</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer15</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelMessage</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Upload study</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer6</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxBoxSizer" expanded="1">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer4</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Select PACS server</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pLabel</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND</property>
+                                                    <property name="proportion">1</property>
+                                                    <object class="wxChoice" expanded="0">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="choices"></property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font"></property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size">170,-1</property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_pServer</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="selection">0</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass">; </property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnChoice"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxCheckListBox" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="choices"></property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pSeriesList</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCheckListBox"></event>
+                                                <event name="OnCheckListBoxDClick"></event>
+                                                <event name="OnCheckListBoxToggled"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer16</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Ok</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pOkButton</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button5</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/pacsupload/pacsuploaddialog.cpp b/cadxcore/main/gui/pacsupload/pacsuploaddialog.cpp
new file mode 100644
index 0000000..47020e1
--- /dev/null
+++ b/cadxcore/main/gui/pacsupload/pacsuploaddialog.cpp
@@ -0,0 +1,127 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <set>
+
+#include "pacsuploaddialog.h"
+#include <main/controllers/dcmtk/dicomservers.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include <main/controllers/anonusagestats.h>
+
+#define SIZE_ICONOS 16
+
+#define COLUMNA_DCMDIR_FECHA 2
+#define COLUMNA_DCMDIR_MODALIDAD 1
+#define COLUMNA_DCMDIR_MEDICO 3
+#define COLUMNA_DCMDIR_ACCNUMBER 4
+#define COLUMNA_DCMDIR_UID 5
+
+
+namespace GNC
+{
+namespace GUI
+{
+PACSUploadDialog::PACSUploadDialog(wxWindow* pParent, const std::list<long>& seriesId, const std::list<long>& selectedSeriesId) : PACSUploadDialogBase(pParent)
+{
+        LOG_STAT(ANON_STAT_DLG_PACS_UPLOAD)
+        wxArrayString pacsList;
+        DicomServerList::TServerList ListOfServers = DicomServerList::Instance()->GetServerList();
+        for (DicomServerList::TServerList::iterator it = ListOfServers.begin(); it != ListOfServers.end(); ++it) {
+                pacsList.push_back(wxString::FromAscii((*it)->ID.c_str()));
+        }
+        m_pServer->Append(pacsList);
+
+        if(m_pServer->GetCount()>0) {
+                m_pServer->SetSelection(0);
+                std::string pacsDef;
+                GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/SubirPACS", "PACSDefecto", pacsDef);
+
+                for (unsigned int i =0; i< m_pServer->GetCount(); ++i) {
+                        if (m_pServer->GetString(i) == wxString::FromUTF8(pacsDef.c_str())) {
+                                m_pServer->Select(i);
+                                break;
+                        }
+                }
+        } else {
+                m_pServer->AppendString(_("There aren't any PACS configured"));
+                m_pServer->SetSelection(0);
+                m_pServer->Disable();
+                m_pOkButton->Disable();
+        }
+
+        m_pPanelMessage->Layout();
+        m_pBody->Layout();
+
+        std::set<long> setOfSelected;
+        setOfSelected.insert(selectedSeriesId.begin(), selectedSeriesId.end());
+
+        for (std::list<long>::const_iterator itSeries = seriesId.begin(); itSeries != seriesId.end(); ++itSeries) {
+                GNC::GCS::HistoryController::SeriesModel sm = GNC::GCS::HistoryController::Instance()->GetSeriesModel((*itSeries));
+                std::ostringstream ostr;
+                ostr << sm.series_desc << " - " << sm.series_modality << " (" << sm.num_instances << ") ";
+                wxDateTime seriesDate;
+                seriesDate.ParseFormat(wxString::FromUTF8( sm.series_datetime.c_str() ).GetData(), wxT("%Y-%m-%dT%H:%M:%S"), wxDefaultDateTime);
+                {
+                        if(seriesDate.IsValid()) {
+                                ostr << wxString(seriesDate.Format(_("%m/%d/%Y %H:%M:%S"), wxDateTime::TimeZone(wxDateTime::GMT1))).ToUTF8();
+                        } else {
+                                ostr << _Std("0000/00/00 00:00:00");
+                        }
+                }
+                int position = m_pSeriesList->Append(wxString::FromUTF8(ostr.str().c_str()));
+                m_positionsId[position] = (*itSeries);
+                if (setOfSelected.empty() || setOfSelected.find((*itSeries)) != setOfSelected.end()) {
+                        m_pSeriesList->Check(position);
+                }
+        }
+}
+PACSUploadDialog::~PACSUploadDialog()
+{
+}
+
+
+std::string PACSUploadDialog::GetSelectedServer()
+{
+        int selection = m_pServer->GetSelection();
+        if (selection >=0) {
+                std::string idServer(m_pServer->GetString(selection).ToUTF8());
+                GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/SubirPACS", "PACSDefecto", idServer);
+                return idServer;
+        } else {
+                return "";
+        }
+}
+
+std::list<long> PACSUploadDialog::GetSelectedSeries()
+{
+        std::list<long> series;
+        for (unsigned i = 0; i < m_pSeriesList->GetCount(); ++i) {
+                if (m_positionsId.find(i) != m_positionsId.end()) {
+                        series.push_back(m_positionsId[i]);
+                }
+        }
+        return series;
+}
+}
+}
diff --git a/cadxcore/main/gui/pacsupload/pacsuploaddialog.h b/cadxcore/main/gui/pacsupload/pacsuploaddialog.h
new file mode 100644
index 0000000..2addfa3
--- /dev/null
+++ b/cadxcore/main/gui/pacsupload/pacsuploaddialog.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <list>
+#include <map>
+#include "pacsuploaddialogbase.h"
+
+namespace GNC
+{
+namespace GUI
+{
+
+class PACSUploadDialog: public PACSUploadDialogBase
+{
+public:
+        PACSUploadDialog(wxWindow* pParent, const std::list<long>& seriesId, const std::list<long>& selectedSeriesId = std::list<long>());
+        ~PACSUploadDialog();
+        std::string GetSelectedServer();
+        std::list<long> GetSelectedSeries();
+protected:
+        std::map<int, long> m_positionsId;
+};
+
+}
+}
diff --git a/cadxcore/main/gui/pacsupload/pacsuploaddialogbase.cpp b/cadxcore/main/gui/pacsupload/pacsuploaddialogbase.cpp
new file mode 100644
index 0000000..be5ef26
--- /dev/null
+++ b/cadxcore/main/gui/pacsupload/pacsuploaddialogbase.cpp
@@ -0,0 +1,94 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "pacsuploaddialogbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+PACSUploadDialogBase::PACSUploadDialogBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 460,300 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelMessage = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelMessage->SetToolTip( _("Upload study") );
+
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pLabel = new wxStaticText( m_pPanelMessage, wxID_ANY, _("Select PACS server"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->Wrap( -1 );
+        bSizer4->Add( m_pLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxArrayString m_pServerChoices;
+        m_pServer = new wxChoice( m_pPanelMessage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pServerChoices, 0 );
+        m_pServer->SetSelection( 0 );
+        m_pServer->SetMaxSize( wxSize( 170,-1 ) );
+
+        bSizer4->Add( m_pServer, 1, wxALL|wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 );
+
+
+        bSizer6->Add( bSizer4, 0, wxEXPAND, 5 );
+
+        wxArrayString m_pSeriesListChoices;
+        m_pSeriesList = new wxCheckListBox( m_pPanelMessage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pSeriesListChoices, 0 );
+        bSizer6->Add( m_pSeriesList, 1, wxALL|wxEXPAND, 5 );
+
+
+        m_pPanelMessage->SetSizer( bSizer6 );
+        m_pPanelMessage->Layout();
+        bSizer6->Fit( m_pPanelMessage );
+        bSizer7->Add( m_pPanelMessage, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer15->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pOkButton = new wxButton( m_pFooter, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pOkButton->SetDefault();
+        bSizer16->Add( m_pOkButton, 0, wxRIGHT, 5 );
+
+        m_button5 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button5, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer16 );
+        m_pFooter->Layout();
+        bSizer16->Fit( m_pFooter );
+        bSizer15->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer15 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+}
+
+PACSUploadDialogBase::~PACSUploadDialogBase()
+{
+}
diff --git a/cadxcore/main/gui/pacsupload/pacsuploaddialogbase.h b/cadxcore/main/gui/pacsupload/pacsuploaddialogbase.h
new file mode 100644
index 0000000..483b263
--- /dev/null
+++ b/cadxcore/main/gui/pacsupload/pacsuploaddialogbase.h
@@ -0,0 +1,65 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __PACSUPLOADDIALOGBASE_H__
+#define __PACSUPLOADDIALOGBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class TitledPanel;
+
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/choice.h>
+#include <wx/sizer.h>
+#include <wx/checklst.h>
+#include <wx/panel.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PACSUploadDialogBase
+///////////////////////////////////////////////////////////////////////////////
+class PACSUploadDialogBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelMessage;
+        wxStaticText* m_pLabel;
+        wxChoice* m_pServer;
+        wxCheckListBox* m_pSeriesList;
+        FooterPanel* m_pFooter;
+        wxButton* m_pOkButton;
+        wxButton* m_button5;
+
+public:
+
+        PACSUploadDialogBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Upload study"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 712,495 ), long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~PACSUploadDialogBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__PACSUPLOADDIALOGBASE_H__
diff --git a/cadxcore/main/gui/paneltags/PanelTags.fbp b/cadxcore/main/gui/paneltags/PanelTags.fbp
new file mode 100644
index 0000000..a475dce
--- /dev/null
+++ b/cadxcore/main/gui/paneltags/PanelTags.fbp
@@ -0,0 +1,262 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="10" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">paneltagsbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">PanelTags</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">700,500</property>
+            <property name="name">PanelTagsBase</property>
+            <property name="pos"></property>
+            <property name="size"></property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">DICOM Inspector</property>
+            <property name="tooltip"></property>
+            <property name="validator_data_type"></property>
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose">OnClose</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown">OnKeyDown</event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">protected</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPropertyGrid" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="extra_style"></property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="include_advanced">1</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pTags</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="style">wxPG_BOLD_MODIFIED|wxPG_SPLITTER_AUTO_CENTER</property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown">OnKeyDown</event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_panel1</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown">OnKeyDown</event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer2</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_RIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Close</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_button1</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown">OnKeyDown</event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/paneltags/paneltags.cpp b/cadxcore/main/gui/paneltags/paneltags.cpp
new file mode 100644
index 0000000..7a86c79
--- /dev/null
+++ b/cadxcore/main/gui/paneltags/paneltags.cpp
@@ -0,0 +1,292 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+
+#include "paneltags.h"
+
+#include <api/controllers/ieventscontroller.h>
+
+#include <api/dicom/idicommanager.h>
+#include <api/istudycontext.h>
+
+#include <main/controllers/pacscontroller.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/controladorlog.h>
+
+GNC::GUI::PanelTags::PanelTags(wxWindow* pPadre, bool hideOnClose ) : PanelTagsBase(pPadre)
+{
+        m_hideOnClose = hideOnClose;
+        acquisitionGroup = NULL;
+        imagePresentationGroup = NULL;
+        metadataGroup = NULL;
+        textGroup = NULL;
+        otherGroup = NULL;
+        patientGroup = NULL;
+        identificationGroup = NULL;
+        relationshipGroup = NULL;
+        m_currentPath ="";
+}
+
+GNC::GUI::PanelTags::~PanelTags()
+{
+}
+
+bool GNC::GUI::PanelTags::IsVisiblePanelTags()
+{
+        return IsShown();
+}
+
+void GNC::GUI::PanelTags::MostrarOcultarPanelTags()
+{
+        if (IsShown()) {
+                Hide();
+        } else {
+                //aui bug...
+                Show();
+        }
+}
+
+void GNC::GUI::PanelTags::SetView(GNC::GCS::IVista* pView)
+{
+        if(pView == NULL || pView->GetCurrentDICOM() == "" || pView->GetCurrentDICOM() == m_currentPath) {
+                return;
+        }
+        CreateCategories();
+        m_currentPath = pView->GetCurrentDICOM();
+
+        GIL::DICOM::TipoMetaInfo info;
+        GIL::DICOM::DicomDataset base;
+
+        GIL::DICOM::IDICOMManager*	pDICOMManager = GIL::DICOM::PACSController::Instance()->CrearInstanciaDeDICOMManager();
+        try {
+                pDICOMManager->CargarFichero(m_currentPath, base, false);
+                pDICOMManager->CargarMetaInfo(m_currentPath, info);
+        } catch (...) {
+                LOG_ERROR("PanelTags", "Error loading path " + m_currentPath);
+        }
+
+        SetInfoTags(info, pDICOMManager);
+
+        SetTags(base, m_pTags->GetRoot(), pDICOMManager);
+        GIL::DICOM::PACSController::Instance()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+}
+
+bool GNC::GUI::PanelTags::SetSeriesPk(long pk)
+{
+        CreateCategories();
+
+        GNC::GCS::HistoryController::StringList paths = GNC::GCS::HistoryController::Instance()->GetSeriesSortedPaths(pk);
+        if (paths.empty()) {
+                return false;
+        }
+        m_currentPath = paths.front();
+
+        GIL::DICOM::TipoMetaInfo info;
+        GIL::DICOM::DicomDataset base;
+
+        GIL::DICOM::IDICOMManager*	pDICOMManager = GIL::DICOM::PACSController::Instance()->CrearInstanciaDeDICOMManager();
+        try {
+                pDICOMManager->CargarFichero(paths.front(), base, false);
+                pDICOMManager->CargarMetaInfo(paths.front(), info);
+        } catch (...) {
+                LOG_ERROR("PanelTags", "Error loading path " + paths.front());
+                return false;
+        }
+
+        SetInfoTags(info, pDICOMManager);
+
+        SetTags(base, m_pTags->GetRoot(), pDICOMManager);
+        GIL::DICOM::PACSController::Instance()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+        return true;
+}
+
+void GNC::GUI::PanelTags::CreateCategories()
+{
+        m_pTags->Clear();
+        metadataGroup =CreatePropertyGroup(_("Metadata"));
+        identificationGroup = CreatePropertyGroup(_("Identification information"));
+        patientGroup = CreatePropertyGroup(_("Patient information"));
+        acquisitionGroup = CreatePropertyGroup(_("Acquisition information"));
+        relationshipGroup = CreatePropertyGroup(_("Relationship information"));
+        imagePresentationGroup = CreatePropertyGroup(_("Image presentation information"));
+        textGroup = CreatePropertyGroup(_("Text"));
+        otherGroup = CreatePropertyGroup(_("Other"));
+}
+
+void GNC::GUI::PanelTags::SetInfoTags(GIL::DICOM::TipoMetaInfo& info, GIL::DICOM::IDICOMManager*	pDICOMManager)
+{
+        for(GIL::DICOM::TipoMetaInfo::ListaTags::iterator it = info.tags.begin(); it!= info.tags.end(); ++it) {
+                wxString helpString = wxString::FromUTF8(pDICOMManager->GetDescription((*it).first).c_str());
+
+                wxStringProperty* prop = NULL;
+                wxString valor;
+                if((*it).second.size()>100) {
+                        valor = _("Data");
+                } else {
+                        std::string oidname = pDICOMManager->GetOIDName((*it).second);
+                        if (oidname.size() > 0) {
+                                valor = wxString::FromUTF8(oidname.c_str()) + wxT("[") + wxString::FromUTF8((*it).second.c_str()) + wxT("]");
+                        } else {
+                                valor = wxString::FromUTF8((*it).second.c_str());
+                        }
+                }
+
+                wxString label;
+                if(helpString.size()>0) {
+                        label = wxT("(") + wxString::FromUTF8((*it).first.c_str()) + wxT(") ") + helpString;
+                } else {
+                        label = wxT("(") + wxString::FromUTF8((*it).first.c_str()) + wxT(") ");
+                }
+                while(m_pTags->GetProperty(label) != NULL)
+                        label = label + wxT(" ");
+                prop = new wxStringProperty(label,
+                                            wxPG_LABEL,valor);
+
+                prop->SetHelpString(wxString::FromUTF8((*it).first.c_str()));
+
+                m_pTags->AppendIn(metadataGroup, prop);
+                prop->SetFlagRecursively(wxPG_PROP_READONLY, true);
+        }
+}
+
+void GNC::GUI::PanelTags::SetTags(GIL::DICOM::DicomDataset& base, wxPGPropArg idPadre, GIL::DICOM::IDICOMManager* pDICOMManager)
+{
+        for(GIL::DICOM::ListaTags::iterator it = base.tags.begin(); it!= base.tags.end(); ++it) {
+                wxString helpString = wxString::FromUTF8(pDICOMManager->GetDescription((*it).first).c_str());
+                wxStringProperty* prop = NULL;
+                wxString valor;
+                if((*it).second.size()>100) {
+                        valor = _("Data");
+                } else {
+                        valor = wxString::FromUTF8((*it).second.c_str());
+                }
+
+                wxString label;
+                if(helpString.size()>0) {
+                        label = wxT("(") + wxString::FromUTF8((*it).first.c_str()) + wxT(") ") + helpString;
+                } else {
+                        label = wxT("(") + wxString::FromUTF8((*it).first.c_str()) + wxT(") ");
+                }
+                while(m_pTags->GetProperty(label) != NULL)
+                        label = label + wxT(" ");
+                prop = new wxStringProperty(label,
+                                            wxPG_LABEL,valor);
+
+                prop->SetHelpString(wxString::FromUTF8((*it).first.c_str()));
+
+                InsertTagInGroup(prop, (*it).first, idPadre);
+                prop->SetFlagRecursively(wxPG_PROP_READONLY, true);
+                //m_pTags->SetDisableProperty(prop);
+        }
+
+        for(GIL::DICOM::DicomDataset::DatasetList::iterator it = base.secuencias.begin(); it!=base.secuencias.end(); ++it) {
+                wxStringProperty* prop = NULL;
+                wxString helpString = wxString::FromUTF8(pDICOMManager->GetDescription((*it).tagName).c_str());
+
+                wxString label;
+                if(helpString.size()>0) {
+                        label = wxT("(") + wxString::FromUTF8((*it).tagName.c_str()) + wxT(") ") + helpString;
+                } else {
+                        label = wxT("(") + wxString::FromUTF8((*it).tagName.c_str()) + wxT(") ");
+                }
+                while(m_pTags->GetProperty(label) != NULL)
+                        label = label + wxT(" ");
+                prop = new wxStringProperty(label,
+                                            wxPG_LABEL,wxEmptyString);
+
+                prop->SetHelpString(wxString::FromUTF8((*it).tagName.c_str()));
+
+                InsertTagInGroup(prop, (*it).tagName, idPadre);
+                prop->SetFlagRecursively(wxPG_PROP_READONLY, true);
+                //m_pTags->DisableProperty(pIdSequencia);
+                //recursion
+                int i=0;
+                for(GIL::DICOM::DicomDataset::DatasetList::iterator it2 = (*it).items.begin(); it2!= (*it).items.end(); ++it2, ++i) {
+                        m_pTags->AppendIn(prop,new wxStringProperty(wxString::Format(wxT("Item %d"), (int) i),wxPG_LABEL,wxEmptyString));
+
+                        SetTags((*it2), prop, pDICOMManager);
+                }
+        }
+}
+
+//endregion
+void GNC::GUI::PanelTags::OnClose(wxCloseEvent &event)
+{
+        if (m_hideOnClose) {
+                Hide();
+                event.Skip(false);
+        } else {
+                event.Skip(true);
+        }
+}
+
+void GNC::GUI::PanelTags::OnKeyDown(wxKeyEvent &event)
+{
+        if (event.GetKeyCode() == WXK_ESCAPE) {
+                Close(true);
+        }
+}
+
+wxPGProperty* GNC::GUI::PanelTags::CreatePropertyGroup(const wxString& label)
+{
+        wxPGProperty* group = new wxPropertyCategory(label, wxPG_LABEL);
+        m_pTags->AppendIn(m_pTags->GetRoot(), group);
+        return group;
+}
+
+void GNC::GUI::PanelTags::InsertTagInGroup(wxPGProperty* prop, const std::string& key, wxPGPropArg idPadre)
+{
+        if (idPadre.GetPtr() == m_pTags->GetRoot()) {
+                //parse group
+                unsigned int g = 0xffff;
+                {
+                        unsigned int e = 0xffff;
+                        sscanf(key.c_str(), "%x|%x", &g, &e);
+                }
+
+                switch (g) {
+                case 0x0008:
+                        m_pTags->AppendIn(identificationGroup, prop);
+                        break;
+                case 0x0010:
+                        m_pTags->AppendIn(patientGroup, prop);
+                        break;
+                case 0x0018:
+                        m_pTags->AppendIn(acquisitionGroup, prop);
+                        break;
+                case 0x0020:
+                        m_pTags->AppendIn(relationshipGroup, prop);
+                        break;
+                case 0x0028:
+                        m_pTags->AppendIn(imagePresentationGroup, prop);
+                        break;
+                case 0x4000:
+                        m_pTags->AppendIn(textGroup, prop);
+                        break;
+                default:
+                        m_pTags->AppendIn(otherGroup, prop);
+                        break;
+                }
+        } else {
+                m_pTags->AppendIn(idPadre, prop);
+        }
+}
diff --git a/cadxcore/main/gui/paneltags/paneltags.h b/cadxcore/main/gui/paneltags/paneltags.h
new file mode 100644
index 0000000..227c3f3
--- /dev/null
+++ b/cadxcore/main/gui/paneltags/paneltags.h
@@ -0,0 +1,67 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "paneltagsbase.h"
+#include <api/controllers/ipacscontroller.h>
+#include <wx/propgrid/propgrid.h>
+#include <wx/propgrid/advprops.h>
+
+class PanelCustomPASI;
+
+namespace GNC
+{
+namespace GUI
+{
+
+class PanelTags : public PanelTagsBase
+{
+public:
+        PanelTags(wxWindow* pPadre, bool hideOnClose = true);
+        virtual ~PanelTags();
+
+        virtual bool IsVisiblePanelTags();
+        virtual void MostrarOcultarPanelTags();
+        virtual void SetView(GNC::GCS::IVista* pView);
+        virtual bool SetSeriesPk(long pk);
+
+private:
+        virtual void OnClose(wxCloseEvent &event);
+        virtual void OnKeyDown(wxKeyEvent &event);
+
+        void CreateCategories();
+        wxPGProperty* CreatePropertyGroup(const wxString& label);
+        void InsertTagInGroup(wxPGProperty* prop, const std::string& key, wxPGPropArg idPadre);
+        void SetInfoTags(GIL::DICOM::TipoMetaInfo& info, GIL::DICOM::IDICOMManager*	pDICOMManager);
+        void SetTags(GIL::DICOM::DicomDataset& base, wxPGPropArg idPadre, GIL::DICOM::IDICOMManager*	pDICOMManager);
+
+        wxPGProperty* metadataGroup;
+        wxPGProperty* identificationGroup;
+        wxPGProperty* patientGroup;
+        wxPGProperty* acquisitionGroup;
+        wxPGProperty* relationshipGroup;
+        wxPGProperty* imagePresentationGroup;
+        wxPGProperty* textGroup;
+        wxPGProperty* otherGroup;
+        std::string m_currentPath;
+        bool m_hideOnClose;
+};
+}
+}
diff --git a/cadxcore/main/gui/paneltags/paneltagsbase.cpp b/cadxcore/main/gui/paneltags/paneltagsbase.cpp
new file mode 100644
index 0000000..22867df
--- /dev/null
+++ b/cadxcore/main/gui/paneltags/paneltagsbase.cpp
@@ -0,0 +1,60 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "paneltagsbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+PanelTagsBase::PanelTagsBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 700,500 ), wxDefaultSize );
+
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pTags = new wxPropertyGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_BOLD_MODIFIED|wxPG_SPLITTER_AUTO_CENTER);
+        m_pMainSizer->Add( m_pTags, 1, wxEXPAND | wxALL, 5 );
+
+        m_panel1 = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer2;
+        bSizer2 = new wxBoxSizer( wxVERTICAL );
+
+        m_button1 = new wxButton( m_panel1, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_button1->SetDefault();
+        bSizer2->Add( m_button1, 0, wxALIGN_RIGHT, 5 );
+
+        m_panel1->SetSizer( bSizer2 );
+        m_panel1->Layout();
+        bSizer2->Fit( m_panel1 );
+        m_pMainSizer->Add( m_panel1, 0, wxEXPAND, 5 );
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+        m_pMainSizer->Fit( this );
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PanelTagsBase::OnClose ) );
+        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( PanelTagsBase::OnKeyDown ) );
+        m_pTags->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( PanelTagsBase::OnKeyDown ), NULL, this );
+        m_panel1->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( PanelTagsBase::OnKeyDown ), NULL, this );
+        m_button1->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( PanelTagsBase::OnKeyDown ), NULL, this );
+}
+
+PanelTagsBase::~PanelTagsBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PanelTagsBase::OnClose ) );
+        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( PanelTagsBase::OnKeyDown ) );
+        m_pTags->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( PanelTagsBase::OnKeyDown ), NULL, this );
+        m_panel1->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( PanelTagsBase::OnKeyDown ), NULL, this );
+        m_button1->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( PanelTagsBase::OnKeyDown ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/paneltags/paneltagsbase.h b/cadxcore/main/gui/paneltags/paneltagsbase.h
new file mode 100644
index 0000000..209789d
--- /dev/null
+++ b/cadxcore/main/gui/paneltags/paneltagsbase.h
@@ -0,0 +1,71 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __paneltagsbase__
+#define __paneltagsbase__
+
+#include <wx/intl.h>
+
+class FooterPanel;
+
+#include <wx/propgrid/propgrid.h>
+#include <wx/propgrid/advprops.h>
+#ifdef __VISUALC__
+#include <wx/link_additions.h>
+#endif //__VISUALC__
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/button.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelTagsBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelTagsBase : public wxDialog
+{
+private:
+
+protected:
+        wxBoxSizer* m_pMainSizer;
+        wxPropertyGrid* m_pTags;
+        FooterPanel* m_panel1;
+        wxButton* m_button1;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnClose( wxCloseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnKeyDown( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelTagsBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("DICOM Inspector"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~PanelTagsBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__paneltagsbase__
diff --git a/cadxcore/main/gui/previewpanel/PreviewPanel.fbp b/cadxcore/main/gui/previewpanel/PreviewPanel.fbp
new file mode 100644
index 0000000..c9f6ae3
--- /dev/null
+++ b/cadxcore/main/gui/previewpanel/PreviewPanel.fbp
@@ -0,0 +1,818 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">previewpanelbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">PanelHistorial</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Panel" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg">234,234,234</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size">-1,-1</property>
+            <property name="minimum_size">100,-1</property>
+            <property name="name">FirstLevelPanelBase</property>
+            <property name="pos"></property>
+            <property name="size">100,-1</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name">firstlevelpanel</property>
+            <property name="window_style">wxNO_BORDER|wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar">OnChar</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground">OnEraseBackground</event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick">OnPanelDClick</event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp">OnPanelClick</event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel">OnMouseWheel</event>
+            <event name="OnPaint">OnPaint</event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp">OnMenuMouse</event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize">OnSize</event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer10</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxBoxSizer" expanded="1">
+                        <property name="minimum_size">-1,20</property>
+                        <property name="name">bSizer18</property>
+                        <property name="orient">wxHORIZONTAL</property>
+                        <property name="permission">none</property>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxTOP|wxBOTTOM|wxLEFT</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg">0,0,0</property>
+                                <property name="floatable">1</property>
+                                <property name="font">,90,92,8,70,0</property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">javi</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pLabel</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar">OnChar</event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground">OnEraseBackground</event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp">OnCabeceraClick</event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel">OnMouseWheel</event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp">OnMenuMouse</event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg">204,204,204</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size">-1,-1</property>
+            <property name="minimum_size">100,120</property>
+            <property name="name">LeafPanelBase</property>
+            <property name="pos"></property>
+            <property name="size">100,120</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name">leafpanel</property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar">OnChar</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground">OnEraseBackground</event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick">OnLeafDClick</event>
+            <event name="OnLeftDown">OnLeafClick</event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel">OnMouseWheel</event>
+            <event name="OnPaint">OnPaint</event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp">OnMenuMouse</event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer11</property>
+                <property name="orient">wxHORIZONTAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">1</property>
+                    <property name="flag">wxEXPAND|wxALL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxBoxSizer" expanded="1">
+                        <property name="minimum_size"></property>
+                        <property name="name">bSizer12</property>
+                        <property name="orient">wxVERTICAL</property>
+                        <property name="permission">none</property>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticBitmap" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="bitmap"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size">76,76</property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size">76,76</property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pThumbnail</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar">OnChar</event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground">OnEraseBackground</event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick">OnLeafDClick</event>
+                                <event name="OnLeftDown">OnLeafClick</event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel">OnMouseWheel</event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp">OnMenuMouse</event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">6</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="wxBoxSizer" expanded="1">
+                                <property name="minimum_size"></property>
+                                <property name="name">bSizer9</property>
+                                <property name="orient">wxVERTICAL</property>
+                                <property name="permission">none</property>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">3</property>
+                                    <property name="flag">wxBOTTOM|wxALIGN_CENTER_HORIZONTAL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxStaticText" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg">32,32,32</property>
+                                        <property name="floatable">1</property>
+                                        <property name="font">,90,90,8,70,0</property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="label"></property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_pLabel</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <property name="wrap">-1</property>
+                                        <event name="OnChar">OnChar</event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground">OnEraseBackground</event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick">OnLeafDClick</event>
+                                        <event name="OnLeftDown">OnLeafClick</event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel">OnMouseWheel</event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp">OnMenuMouse</event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
+                                    <property name="proportion">0</property>
+                                    <object class="wxStaticText" expanded="1">
+                                        <property name="BottomDockable">1</property>
+                                        <property name="LeftDockable">1</property>
+                                        <property name="RightDockable">1</property>
+                                        <property name="TopDockable">1</property>
+                                        <property name="aui_layer"></property>
+                                        <property name="aui_name"></property>
+                                        <property name="aui_position"></property>
+                                        <property name="aui_row"></property>
+                                        <property name="best_size"></property>
+                                        <property name="bg"></property>
+                                        <property name="caption"></property>
+                                        <property name="caption_visible">1</property>
+                                        <property name="center_pane">0</property>
+                                        <property name="close_button">1</property>
+                                        <property name="context_help"></property>
+                                        <property name="context_menu">1</property>
+                                        <property name="default_pane">0</property>
+                                        <property name="dock">Dock</property>
+                                        <property name="dock_fixed">0</property>
+                                        <property name="docking">Left</property>
+                                        <property name="enabled">1</property>
+                                        <property name="fg">32,32,32</property>
+                                        <property name="floatable">1</property>
+                                        <property name="font">,90,90,8,70,0</property>
+                                        <property name="gripper">0</property>
+                                        <property name="hidden">0</property>
+                                        <property name="id">wxID_ANY</property>
+                                        <property name="label"></property>
+                                        <property name="max_size"></property>
+                                        <property name="maximize_button">0</property>
+                                        <property name="maximum_size"></property>
+                                        <property name="min_size"></property>
+                                        <property name="minimize_button">0</property>
+                                        <property name="minimum_size"></property>
+                                        <property name="moveable">1</property>
+                                        <property name="name">m_pLabel1</property>
+                                        <property name="pane_border">1</property>
+                                        <property name="pane_position"></property>
+                                        <property name="pane_size"></property>
+                                        <property name="permission">protected</property>
+                                        <property name="pin_button">1</property>
+                                        <property name="pos"></property>
+                                        <property name="resize">Resizable</property>
+                                        <property name="show">1</property>
+                                        <property name="size"></property>
+                                        <property name="style"></property>
+                                        <property name="subclass"></property>
+                                        <property name="toolbar_pane">0</property>
+                                        <property name="tooltip"></property>
+                                        <property name="window_extra_style"></property>
+                                        <property name="window_name"></property>
+                                        <property name="window_style"></property>
+                                        <property name="wrap">-1</property>
+                                        <event name="OnChar">OnChar</event>
+                                        <event name="OnEnterWindow"></event>
+                                        <event name="OnEraseBackground">OnEraseBackground</event>
+                                        <event name="OnKeyDown"></event>
+                                        <event name="OnKeyUp"></event>
+                                        <event name="OnKillFocus"></event>
+                                        <event name="OnLeaveWindow"></event>
+                                        <event name="OnLeftDClick">OnLeafDClick</event>
+                                        <event name="OnLeftDown">OnLeafClick</event>
+                                        <event name="OnLeftUp"></event>
+                                        <event name="OnMiddleDClick"></event>
+                                        <event name="OnMiddleDown"></event>
+                                        <event name="OnMiddleUp"></event>
+                                        <event name="OnMotion"></event>
+                                        <event name="OnMouseEvents"></event>
+                                        <event name="OnMouseWheel">OnMouseWheel</event>
+                                        <event name="OnPaint"></event>
+                                        <event name="OnRightDClick"></event>
+                                        <event name="OnRightDown"></event>
+                                        <event name="OnRightUp">OnMenuMouse</event>
+                                        <event name="OnSetFocus"></event>
+                                        <event name="OnSize"></event>
+                                        <event name="OnUpdateUI"></event>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg">128,128,128</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">1</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">PreviewPanelBase</property>
+            <property name="pos"></property>
+            <property name="size">110,-1</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name">previewpanel</property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar">OnChar</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel">OnMouseWheel</event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp">OnMenuMouse</event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer16</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPreviewTitle</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanelWithButton; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Previews</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar">OnChar</event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground">OnEraseBackground</event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxScrolledWindow" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size">-1,-1</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelPreviews</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="scroll_rate_x">0</property>
+                        <property name="scroll_rate_y">10</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxCLIP_CHILDREN|wxFULL_REPAINT_ON_RESIZE|wxHSCROLL|wxVSCROLL|wxWANTS_CHARS</property>
+                        <event name="OnChar">OnChar</event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown">OnChar</event>
+                        <event name="OnKeyUp">OnChar</event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp">OnMedicalHistoryClick</event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel">OnMouseWheel</event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp">OnMenuMouse</event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer17</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxALIGN_CENTER_HORIZONTAL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg">54,54,54</property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg">255,255,255</property>
+                        <property name="floatable">1</property>
+                        <property name="font">,90,92,10,70,0</property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">1</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size">26,-1</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size">26,-1</property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelVertical</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size">26,-1</property>
+                        <property name="subclass">VerticalHeader; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip">Previews</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar">OnChar</event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground">OnEraseBackground</event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp">OnShowPreviewsClick</event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/previewpanel/firstlevelpanel.cpp b/cadxcore/main/gui/previewpanel/firstlevelpanel.cpp
new file mode 100644
index 0000000..895f48a
--- /dev/null
+++ b/cadxcore/main/gui/previewpanel/firstlevelpanel.cpp
@@ -0,0 +1,129 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "firstlevelpanel.h"
+#include <sstream>
+#include <wx/dcbuffer.h>
+#include <main/entorno.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/controladorlog.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include "leafpanel.h"
+
+#define TEXT_LENGTH 75
+#define LEAF_HEIGHT 120
+#define FIRST_LEVEL_HEADER_HEIGHT 30
+
+#define FONDO_FIRST wxColour(194,194,194)
+
+namespace GNC
+{
+namespace GUI
+{
+FirstLevelPanel::FirstLevelPanel(GNC::GCS::IVista* pView, INodoHistorial* pParent,  GNC::GUI::IPreviewNode* pNode): FirstLevelPanelBase(pParent->GetWxWindow()),
+        INodoHistorial(pParent),
+        m_pView(pView)
+{
+        wxPanel::SetBackgroundColour(*wxWHITE);
+
+        m_pNode = pNode;
+
+        //truncate string...
+        wxString tmp = wxString::FromUTF8(pNode->GetLabel().c_str());
+        wxClientDC dc(this);
+        dc.SetFont(m_pLabel->GetFont());
+        int x,y;
+        dc.GetTextExtent(tmp, &x, &y, NULL, NULL, NULL);
+
+        while(x > TEXT_LENGTH) {
+                dc.GetTextExtent(tmp, &x, &y, NULL, NULL, NULL);
+                tmp = tmp.substr(0,tmp.size()-2);
+        }
+        m_pLabel->SetLabel(tmp);
+
+        this->SetToolTip(wxString::FromUTF8(pNode->GetLabel().c_str()));
+        m_pLabel->SetToolTip(wxString::FromUTF8(pNode->GetLabel().c_str()));
+        //end truncate
+        Layout();
+}
+
+FirstLevelPanel::~FirstLevelPanel()
+{
+}
+
+void FirstLevelPanel::GetNodeSize(int &x, int &y)
+{
+        GetSize(&x,&y);
+}
+
+void FirstLevelPanel::OnChar(wxKeyEvent &event)
+{
+        event.ResumePropagation(10);
+        event.Skip(true);
+}
+
+wxWindow* FirstLevelPanel::GetWxWindow()
+{
+        return this;
+}
+
+void FirstLevelPanel::OnPaint(wxPaintEvent& event)
+{
+        wxPaintDC dc(this);
+        const int width = dc.GetSize().x;
+        const int height = dc.GetSize().y;
+
+        dc.SetBrush(wxBrush(FONDO_FIRST));
+        dc.SetPen(wxPen(FONDO_FIRST, 1, wxSOLID));
+        m_pLabel->SetBackgroundColour(FONDO_FIRST);
+
+        dc.DrawRectangle(0,0,width,height);
+        //
+        FirstLevelPanelBase::OnPaint(event);
+
+        wxColour borderColor(0,0,0);
+        dc.SetBrush(wxBrush(borderColor,wxTRANSPARENT));
+        dc.SetPen(wxPen(borderColor, 1, wxSOLID));
+        dc.DrawRectangle(0,0,width,height - 1);
+}
+
+void FirstLevelPanel::OnSize(wxSizeEvent & event)
+{
+        Layout();
+        for (wxWindowList::iterator it = m_children.begin(); it != m_children.end(); ++it) {
+                (*it)->Layout();
+        }
+        event.Skip();
+}
+
+void FirstLevelPanel::OnMouseWheel(wxMouseEvent& event)
+{
+        event.ResumePropagation(2);
+        event.Skip(true);
+}
+
+
+void FirstLevelPanel::OnEraseBackground( wxEraseEvent& event )
+{
+        event.Skip(false);
+}
+};
+};
diff --git a/cadxcore/main/gui/previewpanel/firstlevelpanel.h b/cadxcore/main/gui/previewpanel/firstlevelpanel.h
new file mode 100644
index 0000000..c8c91c4
--- /dev/null
+++ b/cadxcore/main/gui/previewpanel/firstlevelpanel.h
@@ -0,0 +1,53 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/autoptr.h>
+#include "previewpanelbase.h"
+#include "ipreviewpanel.h"
+#include "previewpanelmodel.h"
+
+namespace GNC
+{
+namespace GUI
+{
+class FirstLevelPanel: public FirstLevelPanelBase, public INodoHistorial
+{
+public:
+        FirstLevelPanel(GNC::GCS::IVista* pView, INodoHistorial* pPadre,  GNC::GUI::IPreviewNode* pNode);
+        ~FirstLevelPanel();
+
+        wxWindow* GetWxWindow();
+        virtual void GetNodeSize(int &x, int &y);
+
+
+protected:
+        virtual void OnChar(wxKeyEvent &event);
+        virtual void OnPaint(wxPaintEvent& event);
+        virtual void OnSize(wxSizeEvent &event);
+        virtual void OnMouseWheel(wxMouseEvent &event);
+        virtual void OnEraseBackground( wxEraseEvent& event );
+
+        GNC::GUI::IPreviewNode* m_pNode;
+        GNC::GCS::IVista* m_pView;
+};
+}
+}
diff --git a/cadxcore/main/gui/previewpanel/ipreviewpanel.h b/cadxcore/main/gui/previewpanel/ipreviewpanel.h
new file mode 100644
index 0000000..2e5a9d4
--- /dev/null
+++ b/cadxcore/main/gui/previewpanel/ipreviewpanel.h
@@ -0,0 +1,130 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+#pragma once
+#include <vector>
+#include <list>
+#include <map>
+
+#include <api/ievento.h>
+#include <api/autoptr.h>
+#include <eventos/eventosginkgo.h>
+
+class wxWindow;
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+namespace GUI
+{
+//nodo seleccionable
+class ISeleccionablePreview
+{
+protected:
+        bool m_seleccionado;
+public:
+        ISeleccionablePreview()
+        {
+                m_seleccionado = false;
+        }
+        ~ISeleccionablePreview()
+        {
+        }
+        bool EstaSeleccionado()
+        {
+                return m_seleccionado;
+        }
+        virtual void Seleccionar(bool seleccionar, bool force=false) = 0;
+};
+
+class INodoHistorial
+{
+public:
+        typedef std::list<GNC::GUI::INodoHistorial*> TChildrenList;
+        INodoHistorial(INodoHistorial* pPadre)
+        {
+                m_pPadre = pPadre;
+        }
+        ~INodoHistorial()
+        {
+                m_pPadre = NULL;
+        }
+        INodoHistorial* GetParentNode()
+        {
+                return m_pPadre;
+        }
+
+        virtual void GetNodeSize(int & /*x*/, int &/*y*/) {};
+        virtual wxWindow* GetWxWindow() = 0;
+
+protected:
+        INodoHistorial* m_pPadre;
+};
+
+//eventos variados...
+//evento de seleccion
+namespace Events
+{
+class EventoSeleccionarHistorial: public GNC::GCS::Events::IEvent
+{
+public:
+        EventoSeleccionarHistorial(GNC::GCS::IVista* pView):GNC::GCS::Events::IEvent(ginkgoEVT_Core_HistorialSeleccionar, 0, 100, pView)
+        {
+                m_Nombre = "SeleccionarHistorial";
+                m_pSeleccionable=NULL;
+        }
+
+        EventoSeleccionarHistorial(GNC::GCS::IVista* pView, ISeleccionablePreview* pSeleccionable ):GNC::GCS::Events::IEvent(ginkgoEVT_Core_HistorialSeleccionar, 0 , 100, pView)
+        {
+                m_pSeleccionable = pSeleccionable;
+        }
+
+        ~EventoSeleccionarHistorial()
+        {
+        }
+
+        ISeleccionablePreview* GetSeleccionable()
+        {
+                return m_pSeleccionable;
+        }
+
+protected:
+        ISeleccionablePreview* m_pSeleccionable;
+};
+
+class EventoSetFocusHistorial: public GNC::GCS::Events::IEvent
+{
+public:
+
+        EventoSetFocusHistorial(GNC::GCS::IVista* pView):GNC::GCS::Events::IEvent(ginkgoEVT_Core_SetFocus, 0, 100, pView)
+        {
+                m_Nombre = "SetFocusHistorial";
+        }
+
+        ~EventoSetFocusHistorial()
+        {
+        }
+protected:
+};
+
+}//eventos
+}
+}
diff --git a/cadxcore/main/gui/previewpanel/leafpanel.cpp b/cadxcore/main/gui/previewpanel/leafpanel.cpp
new file mode 100644
index 0000000..608b2be
--- /dev/null
+++ b/cadxcore/main/gui/previewpanel/leafpanel.cpp
@@ -0,0 +1,190 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/event.h>
+#include <api/globals.h>
+#include <wx/dcbuffer.h>
+#include "leafpanel.h"
+#include <api/controllers/ieventscontroller.h>
+#include <main/controllers/thumbnailcontroller.h>
+
+
+#define FONDO_INACTIVO_E wxColour(194,194,194)
+#define FONDO_INACTIVO_O wxColour(234,234,234)
+#define FONDO_ACTIVO   wxColour(255,225,85)
+
+#define TEXT_LENGTH 80
+
+
+namespace GNC
+{
+namespace GUI
+{
+
+LeafPanel::LeafPanel(GNC::GCS::IVista* pView, INodoHistorial* pPadre,  GNC::GUI::IPreviewLeaf* pLeaf, bool rowEven) :
+        LeafPanelBase(pPadre->GetWxWindow()),
+        INodoHistorial(pPadre),
+        m_modificado(false),
+        m_pLeaf(pLeaf),
+        m_dibujada(false),
+        m_pView(pView),
+        m_rowEven(rowEven)
+{
+        wxPanel::SetBackgroundColour(wxBG_STYLE_CUSTOM);
+        //truncate string...
+        wxString tmp = wxString::FromUTF8(pLeaf->GetLabel().c_str());
+        wxClientDC dc(this);
+        dc.SetFont(m_pLabel->GetFont());
+        int x,y;
+        dc.GetTextExtent(tmp, &x, &y, NULL, NULL, NULL);
+
+        while(x > TEXT_LENGTH) {
+                dc.GetTextExtent(tmp, &x, &y, NULL, NULL, NULL);
+                tmp = tmp.substr(0,tmp.size()-1);
+        }
+        m_pLabel->SetLabel(tmp);
+        m_pLabel1->SetLabel(wxString::FromUTF8(pLeaf->GetLabel2().c_str()));
+        this->SetToolTip(wxString::FromUTF8(pLeaf->GetLabel().c_str()));
+        m_pLabel->SetToolTip(wxString::FromUTF8(pLeaf->GetLabel().c_str()));
+        //end truncate
+        m_pThumbnail->Hide();
+        Layout();
+}
+
+LeafPanel::~LeafPanel()
+{
+        if (!m_pThumbnail->IsShown() && m_dibujada) {
+                GNC::GCS::ThumbnailController::Instance()->removeRequest(this);
+        }
+}
+
+void LeafPanel::Seleccionar(bool seleccionar,bool force)
+{
+        if(m_seleccionado!=seleccionar || force) {
+                m_seleccionado = seleccionar;
+                Refresh();
+        }
+}
+
+wxWindow* LeafPanel::GetWxWindow()
+{
+        return this;
+}
+
+void LeafPanel::SetImage(long , wxImage* pImage)
+{
+        if(pImage != NULL && pImage->IsOk()) {
+                wxBitmap overBitmap = m_pLeaf->GetOverlayBitmap();
+                if (overBitmap.Ok()) {
+                        wxImage& img = (*pImage);
+                        img.Paste(overBitmap.ConvertToImage(), 2,2);
+                }
+                wxBitmap bitmap(*pImage);
+                m_pThumbnail->SetBitmap(bitmap);
+                m_pThumbnail->Show();
+        }
+        Layout();
+}
+
+void LeafPanel::GetNodeSize(int &x, int &y)
+{
+        GetSize(&x,&y);
+}
+
+void LeafPanel::OnLeafDClick(wxMouseEvent& event)
+{
+        m_pLeaf->OnPreviewDClick(this);
+        event.Skip(false);
+}
+
+void LeafPanel::OnChar(wxKeyEvent &event)
+{
+        event.ResumePropagation(10);
+        event.Skip(true);
+}
+
+void LeafPanel::OnLeafClick(wxMouseEvent &event)
+{
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GUI::Events::EventoSeleccionarHistorial(m_pView, this));
+        m_pLeaf->OnPreviewLDown(this);
+        event.Skip(false);
+}
+
+void LeafPanel::OnMouseWheel(wxMouseEvent& event)
+{
+        event.ResumePropagation(2);
+        event.Skip(true);
+}
+
+void LeafPanel::OnMenuMouse(wxMouseEvent& event)
+{
+        m_pLeaf->OnShowMenu(this);
+        event.Skip(false);
+}
+
+void LeafPanel::OnPaint(wxPaintEvent &event)
+{
+        //background...
+        wxPaintDC dc(this);
+        const int width = dc.GetSize().x;
+        const int height = dc.GetSize().y;
+
+        if (m_seleccionado) {
+                dc.SetBrush(wxBrush(FONDO_ACTIVO));
+                dc.SetPen(wxPen(FONDO_ACTIVO, 1, wxSOLID));
+                m_pLabel->SetBackgroundColour(FONDO_ACTIVO);
+                m_pLabel1->SetBackgroundColour(FONDO_ACTIVO);
+        } else {
+                if (m_rowEven) {
+                        dc.SetBrush(wxBrush(FONDO_INACTIVO_E));
+                        dc.SetPen(wxPen(FONDO_INACTIVO_E, 1, wxSOLID));
+                        m_pLabel->SetBackgroundColour(FONDO_INACTIVO_E);
+                        m_pLabel1->SetBackgroundColour(FONDO_INACTIVO_E);
+                } else {
+                        dc.SetBrush(wxBrush(FONDO_INACTIVO_O));
+                        dc.SetPen(wxPen(FONDO_INACTIVO_O, 1, wxSOLID));
+                        m_pLabel->SetBackgroundColour(FONDO_INACTIVO_O);
+                        m_pLabel1->SetBackgroundColour(FONDO_INACTIVO_O);
+                }
+        }
+        dc.DrawRectangle(0,0,width,height);
+        //
+        if (!m_dibujada) {
+                //la primera vez que se pinta se lanza el timer que generara el thumbnail (bajo demanda)
+                GNC::GCS::ThumbnailController::Instance()->requestThumbnail(m_pLeaf->GetFilePk(), this);
+                m_dibujada = true;
+        }
+        LeafPanelBase::OnPaint(event);
+
+        wxColour borderColor(0,0,0);
+        dc.SetBrush(wxBrush(borderColor,wxTRANSPARENT));
+        dc.SetPen(wxPen(borderColor, 1, wxSOLID));
+        dc.DrawLine(wxPoint(0,0), wxPoint(0, dc.GetSize().y-1));
+        dc.DrawLine(wxPoint(0, dc.GetSize().y-1), wxPoint(dc.GetSize().x - 1, dc.GetSize().y-1));
+        dc.DrawLine(wxPoint(dc.GetSize().x - 1, 0), wxPoint(dc.GetSize().x - 1, dc.GetSize().y-1));
+}
+
+void LeafPanel::OnEraseBackground( wxEraseEvent& event )
+{
+        event.Skip(false);
+}
+}
+}
+
diff --git a/cadxcore/main/gui/previewpanel/leafpanel.h b/cadxcore/main/gui/previewpanel/leafpanel.h
new file mode 100644
index 0000000..daa6a43
--- /dev/null
+++ b/cadxcore/main/gui/previewpanel/leafpanel.h
@@ -0,0 +1,140 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include "previewpanelbase.h"
+#include "previewpanelmodel.h"
+#include "ipreviewpanel.h"
+#include <main/controllers/thumbnailcontroller.h>
+
+class wxColour;
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+class IModuleController;
+}
+namespace GUI
+{
+class NotificadorPreview;
+}
+}
+
+namespace GNC
+{
+namespace GUI
+{
+class LeafTimer;
+
+class LeafPanel: public LeafPanelBase, public ISeleccionablePreview, public INodoHistorial, GADAPI::ThumbnailsNotifier
+{
+public:
+        LeafPanel(GNC::GCS::IVista* pView, INodoHistorial* pPadre,  GNC::GUI::IPreviewLeaf* pLeaf, bool rowEven);
+        ~LeafPanel();
+
+        void Seleccionar(bool seleccionar,bool force);
+        wxWindow* GetWxWindow();
+        void SetImage(long file_pk, wxImage* pImage);
+        virtual void GetNodeSize(int &x, int &y);
+
+
+protected:
+        virtual void OnChar(wxKeyEvent &event);
+        virtual void OnLeafClick(wxMouseEvent& event);
+        virtual void OnLeafDClick(wxMouseEvent& event);
+        virtual void OnMouseWheel(wxMouseEvent& event);
+        virtual void OnMenuMouse(wxMouseEvent& event);
+        void OnPaint(wxPaintEvent &event);
+        virtual void OnEraseBackground( wxEraseEvent& event );
+
+        bool                    m_modificado;
+        GNC::GUI::IPreviewLeaf* m_pLeaf;
+        bool					m_dibujada;
+        GNC::GCS::IVista*		m_pView;
+        bool m_rowEven;
+};
+
+//void SetModeloIntegracion (GNC::GCS::Ptr<GIL::IModeloIntegracion> pModeloIntegracion);
+
+//	std::list<GNC::GCS::IVista*> m_pVistas;
+
+//	void InitFields(const std::string& descripcion, const std::string& fecha,
+//		const std::string& hora, const std::string& id_importador, const std::string& id_modalidad,
+//		const std::string& uidEstudio, const std::string uidTransferSyntax);
+//	void Seleccionar(bool seleccionar,bool force=false);
+//	void SetAbierto(bool abierto);
+//	void SetModificado(bool modificado);
+//	void UpdateStatus();
+//	void SetImage(wxImage* pImage);
+//	void GenerarThumbnail();
+//	void OnTimerParpadeo();
+
+//	//eventos
+//	virtual void OnMouseAbrir(wxMouseEvent& event);
+//	virtual void OnMouseSeleccionar(wxMouseEvent &event);
+//	virtual void OnMenuMouse(wxMouseEvent &event);
+//	virtual void OnKeyDown(wxKeyEvent &event);
+//	virtual void OnMouseWheel( wxMouseEvent& event );
+//	//
+
+//	int RefrescarNumeroSlices();
+//	void IncrementarNumeroSlices();
+////	bool InsertarDCM(const GNC::GCS::ControladorHistorial::ModeloDCM& modeloDCM);
+
+//	//movidas de estudio para ver si esta abierto y tal
+//	virtual void AddVista(GNC::GCS::IVista* pVista);
+//	virtual void VistaModificada(GNC::GCS::IVista* pVista);
+//	virtual void VistaGuardada(GNC::GCS::IVista* pVista);
+//	virtual void RemoveVista(GNC::GCS::IVista* pVista);
+//	//
+//	void OnAbrir(wxCommandEvent& event);
+//	void Abrir(bool forzarEstudio = false);
+//	void OnAbrirCon(wxCommandEvent& event);
+//	void AbrirDICOM(GNC::GCS::IModuleController* pModulo, int idModo, bool forzarEstudio);
+//	void OnEliminar(wxCommandEvent &event);
+//	bool DoDelete(bool ask);
+//	void OnLimpiarHistorial(wxCommandEvent &event);
+//	void OnUploadPACS(wxCommandEvent &event);
+//	void OnReprocessIntegration(wxCommandEvent &event);
+
+//	void Detach(wxWindow* pHijo);
+//	void Eliminar();
+//	void OnPaint(wxPaintEvent &event);
+//
+//	std::string GetModalidad();
+
+//protected:
+
+//	bool m_modificado;
+//	//en una serie todo deberia importarse con el mismo importador, y todo deberia ser de la misma modalidad...
+//	GNC::GCS::Ptr<GIL::IModeloIntegracion> m_pModeloIntegracion;
+//	int					  m_numeroSlices;
+//	std::string			  m_uidEstudio;
+//	std::string         m_idImportador;
+//	std::string         m_idModalidad;
+//	std::string			  m_uidTransferSyntax;
+//	NotificadorPreview* m_pNotificadorPreview;
+//	TimerPanelSerie*    m_pTimer;
+//	wxWindow*           m_pBWin;
+//	bool					  m_dibujada;
+}
+}
diff --git a/cadxcore/main/gui/previewpanel/previewpanel.cpp b/cadxcore/main/gui/previewpanel/previewpanel.cpp
new file mode 100644
index 0000000..a990852
--- /dev/null
+++ b/cadxcore/main/gui/previewpanel/previewpanel.cpp
@@ -0,0 +1,197 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/dc.h>
+#include <wx/sizer.h>
+#include <wx/event.h>
+#include <wx/bitmap.h>
+#include <wx/menu.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <wx/aui/auibar.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/globals.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#include "previewpanel.h"
+#include "leafpanel.h"
+#include "firstlevelpanel.h"
+
+
+
+#define ID_MENUS 1401
+#define ID_EJECUTAR 1
+#define ID_TITULO 0
+
+#define MIN_WIDTH 100
+
+
+namespace GNC
+{
+namespace GUI
+{
+PreviewPanel::PreviewPanel(GNC::GCS::IVista* pView, wxWindow* parent) : PreviewPanelBase(parent),
+        INodoHistorial(NULL),
+        m_pView(pView),
+        m_dirty(true)
+{
+        //titulo
+        m_pPreviewTitle->GetButtonBar()->AddTool(ID_EJECUTAR,_("Hide"),GinkgoResourcesManager::History::GetIcoPlegar(),_("Hide"), wxITEM_NORMAL);
+        m_pPreviewTitle->GetButtonBar()->Connect(ID_EJECUTAR,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( PreviewPanel::OnHidePreviewsClick),NULL,this);
+        m_pPreviewTitle->Realize();
+
+        //se conecta el evento Ginkgo
+        GNC::GCS::IEventsController::Instance()->Registrar(this, GNC::GUI::Events::EventoSetFocusHistorial(m_pView));
+        GNC::GCS::IEventsController::Instance()->Registrar(this, GNC::GUI::Events::EventoSeleccionarHistorial(m_pView));
+
+
+        m_pSelected = NULL;
+        Layout();
+}
+
+PreviewPanel::~PreviewPanel()
+{
+}
+
+//interfaz modelo dicom
+void PreviewPanel::LoadModel(IPreviewNode* pNode )
+{
+        m_pPreviewTitle->SetToolTip(wxString::FromUTF8(pNode->GetLabel().c_str()));
+        m_pPanelVertical->SetToolTip(wxString::FromUTF8(pNode->GetLabel().c_str()));
+        m_pPanelPreviews->GetSizer()->Clear(true);
+        m_pSelected = NULL;
+
+        int leafIndex = 0;
+        for (IPreviewNode::TListNodes::iterator it = pNode->children.begin(); it != pNode->children.end(); ++it, ++leafIndex) {
+                IPreviewNode* curNode = (*it);
+                IPreviewLeaf* pLeaf = dynamic_cast<IPreviewLeaf*>(curNode);
+                if (pLeaf != NULL) {
+                        LeafPanel* p = new LeafPanel(m_pView, this, pLeaf, leafIndex%2);
+                        m_pPanelPreviews->GetSizer()->Add(p,0,wxBOTTOM|wxEXPAND,0);
+                } else {
+                        FirstLevelPanel* pNewLevel = new FirstLevelPanel(m_pView, this, curNode);
+                        m_pPanelPreviews->GetSizer()->Add(pNewLevel,0,wxBOTTOM|wxEXPAND,0);
+                        for (IPreviewNode::TListNodes::iterator itFirstLevel = curNode->children.begin(); itFirstLevel != curNode->children.end(); ++itFirstLevel, ++leafIndex) {
+                                IPreviewNode* curNode2 = (*itFirstLevel);
+                                IPreviewLeaf* pLeaf = dynamic_cast<IPreviewLeaf*>(curNode2);
+                                if (pLeaf != NULL) {
+                                        LeafPanel* p = new LeafPanel(m_pView, this, pLeaf, leafIndex%2);
+                                        m_pPanelPreviews->GetSizer()->Add(p,0,wxBOTTOM|wxEXPAND,0);
+                                } else {
+                                        LOG_ERROR("FirstLevelPanel", "leaf panel isn't an IPreviewLeaf");
+                                }
+                        }
+                }
+        }
+        Show();
+        GetParent()->Layout();
+}
+
+wxWindow* PreviewPanel::GetWxWindow()
+{
+        return m_pPanelPreviews;
+}
+
+void PreviewPanel::OnChar(wxKeyEvent &event)
+{
+        event.ResumePropagation(10);
+        event.Skip(true);
+}
+
+void PreviewPanel::OnHidePreviewsClick(wxCommandEvent& )
+{
+        FoldUp(true);
+}
+
+void PreviewPanel::OnShowPreviewsClick(wxMouseEvent& )
+{
+        FoldUp(false);
+}
+
+void PreviewPanel::FoldUp(bool plegar)
+{
+        m_pPanelPreviews->Show(!plegar);
+        m_pPreviewTitle->Show(!plegar);
+        m_pPanelVertical->Show(plegar);
+        if (plegar) {
+                SetSize(m_pPanelVertical->GetSize());
+                SetMaxSize(m_pPanelVertical->GetMaxSize());
+                SetMinSize(m_pPanelVertical->GetMinSize());
+        } else {
+                SetSize(m_pPanelPreviews->GetSize());
+                SetMaxSize(m_pPanelPreviews->GetMaxSize());
+                SetMinSize(m_pPanelPreviews->GetMinSize());
+        }
+        Layout();
+        GetParent()->Layout();
+}
+
+void PreviewPanel::PreProcesarEvento(GNC::GCS::Events::IEvent * evt, std::list<GNC::GCS::Events::IEvent*>& lista)
+{
+        if (evt == NULL) {
+                std::cerr << "Error: null event" << std::endl;
+                return;
+        }
+        switch (evt->GetCodigoEvento()) {
+        case ginkgoEVT_Core_HistorialSeleccionar: {
+                lista.push_back(new GNC::GUI::Events::EventoSetFocusHistorial(m_pView));
+        }
+        break;
+        default:
+                break;
+
+        }
+}
+
+void PreviewPanel::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        switch(evt->GetCodigoEvento()) {
+        case  ginkgoEVT_Core_HistorialSeleccionar: {
+                GNC::GUI::Events::EventoSeleccionarHistorial* pEvtSelecc = dynamic_cast<GNC::GUI::Events::EventoSeleccionarHistorial*>(evt);
+                if(pEvtSelecc != NULL) {
+                        GNC::GUI::ISeleccionablePreview* pSeleccionable = pEvtSelecc->GetSeleccionable();
+                        if(pSeleccionable != m_pSelected) {
+                                if(m_pSelected!= NULL) {
+                                        m_pSelected->Seleccionar(false);
+                                }
+                                if(pSeleccionable != NULL) {
+                                        pSeleccionable->Seleccionar(true);
+                                }
+                                m_pSelected = pSeleccionable;
+                        }
+                }
+        }
+        break;
+        case ginkgoEVT_Core_SetFocus: {
+#if defined(_WIN32) || defined(__WXOSX__)
+                m_pPanelPreviews->SetFocus();
+#endif
+        }
+        break;
+        }
+}
+
+void PreviewPanel::OnEraseBackground( wxEraseEvent& event )
+{
+        event.Skip(false);
+}
+
+};
+};
diff --git a/cadxcore/main/gui/previewpanel/previewpanel.h b/cadxcore/main/gui/previewpanel/previewpanel.h
new file mode 100644
index 0000000..5cdbb48
--- /dev/null
+++ b/cadxcore/main/gui/previewpanel/previewpanel.h
@@ -0,0 +1,69 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <map>
+#include <list>
+
+#include <api/autoptr.h>
+#include <api/observers/ieventsobserver.h>
+#include "ipreviewpanel.h"
+#include "previewpanelmodel.h"
+#include "previewpanelbase.h"
+
+#include <wx/scrolwin.h>
+#include <wx/datectrl.h>
+#include <wx/dateevt.h>
+
+class IModuleController;
+class PanelPreview;
+class SubTitledPanel;
+
+namespace GNC
+{
+namespace GUI
+{
+class EXTAPI PreviewPanel : public PreviewPanelBase , public GNC::GCS::IEventsObserver, public INodoHistorial
+{
+
+public:
+
+        PreviewPanel(GNC::GCS::IVista* pView, wxWindow* parent);
+        ~PreviewPanel();
+
+        void LoadModel(IPreviewNode* pNode);
+        wxWindow* GetWxWindow();
+
+protected:
+        virtual void OnChar(wxKeyEvent &event);
+        virtual void OnHidePreviewsClick(wxCommandEvent& event);
+        virtual void OnShowPreviewsClick(wxMouseEvent& event);
+        virtual void FoldUp(bool foldup);
+        virtual void PreProcesarEvento(GNC::GCS::Events::IEvent* evt, std::list<GNC::GCS::Events::IEvent*>& lista);
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent* evt) ;
+        virtual void OnEraseBackground( wxEraseEvent& event );
+
+        GNC::GUI::ISeleccionablePreview* m_pSelected;
+        GNC::GCS::IVista* m_pView;
+        bool m_dirty;
+};
+}
+}
+
diff --git a/cadxcore/main/gui/previewpanel/previewpanelbase.cpp b/cadxcore/main/gui/previewpanel/previewpanelbase.cpp
new file mode 100644
index 0000000..d27e0fa
--- /dev/null
+++ b/cadxcore/main/gui/previewpanel/previewpanelbase.cpp
@@ -0,0 +1,252 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "previewpanelbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+FirstLevelPanelBase::FirstLevelPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
+{
+        this->SetBackgroundColour( wxColour( 234, 234, 234 ) );
+        this->SetMinSize( wxSize( 100,-1 ) );
+
+        wxBoxSizer* bSizer10;
+        bSizer10 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer18;
+        bSizer18 = new wxBoxSizer( wxHORIZONTAL );
+
+        bSizer18->SetMinSize( wxSize( -1,20 ) );
+        m_pLabel = new wxStaticText( this, wxID_ANY, _("javi"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->Wrap( -1 );
+        m_pLabel->SetFont( wxFont( 8, 70, 90, 92, false, wxEmptyString ) );
+        m_pLabel->SetForegroundColour( wxColour( 0, 0, 0 ) );
+
+        bSizer18->Add( m_pLabel, 0, wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+
+        bSizer10->Add( bSizer18, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer10 );
+        this->Layout();
+
+        // Connect Events
+        this->Connect( wxEVT_CHAR, wxKeyEventHandler( FirstLevelPanelBase::OnChar ) );
+        this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( FirstLevelPanelBase::OnEraseBackground ) );
+        this->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( FirstLevelPanelBase::OnPanelDClick ) );
+        this->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( FirstLevelPanelBase::OnPanelClick ) );
+        this->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( FirstLevelPanelBase::OnMouseWheel ) );
+        this->Connect( wxEVT_PAINT, wxPaintEventHandler( FirstLevelPanelBase::OnPaint ) );
+        this->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( FirstLevelPanelBase::OnMenuMouse ) );
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( FirstLevelPanelBase::OnSize ) );
+        m_pLabel->Connect( wxEVT_CHAR, wxKeyEventHandler( FirstLevelPanelBase::OnChar ), NULL, this );
+        m_pLabel->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( FirstLevelPanelBase::OnEraseBackground ), NULL, this );
+        m_pLabel->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( FirstLevelPanelBase::OnCabeceraClick ), NULL, this );
+        m_pLabel->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( FirstLevelPanelBase::OnMouseWheel ), NULL, this );
+        m_pLabel->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( FirstLevelPanelBase::OnMenuMouse ), NULL, this );
+}
+
+FirstLevelPanelBase::~FirstLevelPanelBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CHAR, wxKeyEventHandler( FirstLevelPanelBase::OnChar ) );
+        this->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( FirstLevelPanelBase::OnEraseBackground ) );
+        this->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( FirstLevelPanelBase::OnPanelDClick ) );
+        this->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( FirstLevelPanelBase::OnPanelClick ) );
+        this->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( FirstLevelPanelBase::OnMouseWheel ) );
+        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( FirstLevelPanelBase::OnPaint ) );
+        this->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( FirstLevelPanelBase::OnMenuMouse ) );
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( FirstLevelPanelBase::OnSize ) );
+        m_pLabel->Disconnect( wxEVT_CHAR, wxKeyEventHandler( FirstLevelPanelBase::OnChar ), NULL, this );
+        m_pLabel->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( FirstLevelPanelBase::OnEraseBackground ), NULL, this );
+        m_pLabel->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( FirstLevelPanelBase::OnCabeceraClick ), NULL, this );
+        m_pLabel->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( FirstLevelPanelBase::OnMouseWheel ), NULL, this );
+        m_pLabel->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( FirstLevelPanelBase::OnMenuMouse ), NULL, this );
+
+}
+
+LeafPanelBase::LeafPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
+{
+        this->SetBackgroundColour( wxColour( 204, 204, 204 ) );
+        this->SetMinSize( wxSize( 100,120 ) );
+
+        wxBoxSizer* bSizer11;
+        bSizer11 = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer12;
+        bSizer12 = new wxBoxSizer( wxVERTICAL );
+
+        m_pThumbnail = new wxStaticBitmap( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pThumbnail->SetMinSize( wxSize( 76,76 ) );
+        m_pThumbnail->SetMaxSize( wxSize( 76,76 ) );
+
+        bSizer12->Add( m_pThumbnail, 0, wxALIGN_CENTER_HORIZONTAL|wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM, 5 );
+
+        wxBoxSizer* bSizer9;
+        bSizer9 = new wxBoxSizer( wxVERTICAL );
+
+        m_pLabel = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->Wrap( -1 );
+        m_pLabel->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) );
+        m_pLabel->SetForegroundColour( wxColour( 32, 32, 32 ) );
+
+        bSizer9->Add( m_pLabel, 0, wxBOTTOM|wxALIGN_CENTER_HORIZONTAL, 3 );
+
+        m_pLabel1 = new wxStaticText( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel1->Wrap( -1 );
+        m_pLabel1->SetFont( wxFont( 8, 70, 90, 90, false, wxEmptyString ) );
+        m_pLabel1->SetForegroundColour( wxColour( 32, 32, 32 ) );
+
+        bSizer9->Add( m_pLabel1, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+        bSizer12->Add( bSizer9, 1, wxEXPAND, 6 );
+
+
+        bSizer11->Add( bSizer12, 1, wxEXPAND|wxALL, 1 );
+
+
+        this->SetSizer( bSizer11 );
+        this->Layout();
+
+        // Connect Events
+        this->Connect( wxEVT_CHAR, wxKeyEventHandler( LeafPanelBase::OnChar ) );
+        this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( LeafPanelBase::OnEraseBackground ) );
+        this->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( LeafPanelBase::OnLeafDClick ) );
+        this->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LeafPanelBase::OnLeafClick ) );
+        this->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( LeafPanelBase::OnMouseWheel ) );
+        this->Connect( wxEVT_PAINT, wxPaintEventHandler( LeafPanelBase::OnPaint ) );
+        this->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( LeafPanelBase::OnMenuMouse ) );
+        m_pThumbnail->Connect( wxEVT_CHAR, wxKeyEventHandler( LeafPanelBase::OnChar ), NULL, this );
+        m_pThumbnail->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( LeafPanelBase::OnEraseBackground ), NULL, this );
+        m_pThumbnail->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( LeafPanelBase::OnLeafDClick ), NULL, this );
+        m_pThumbnail->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LeafPanelBase::OnLeafClick ), NULL, this );
+        m_pThumbnail->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( LeafPanelBase::OnMouseWheel ), NULL, this );
+        m_pThumbnail->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( LeafPanelBase::OnMenuMouse ), NULL, this );
+        m_pLabel->Connect( wxEVT_CHAR, wxKeyEventHandler( LeafPanelBase::OnChar ), NULL, this );
+        m_pLabel->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( LeafPanelBase::OnEraseBackground ), NULL, this );
+        m_pLabel->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( LeafPanelBase::OnLeafDClick ), NULL, this );
+        m_pLabel->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LeafPanelBase::OnLeafClick ), NULL, this );
+        m_pLabel->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( LeafPanelBase::OnMouseWheel ), NULL, this );
+        m_pLabel->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( LeafPanelBase::OnMenuMouse ), NULL, this );
+        m_pLabel1->Connect( wxEVT_CHAR, wxKeyEventHandler( LeafPanelBase::OnChar ), NULL, this );
+        m_pLabel1->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( LeafPanelBase::OnEraseBackground ), NULL, this );
+        m_pLabel1->Connect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( LeafPanelBase::OnLeafDClick ), NULL, this );
+        m_pLabel1->Connect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LeafPanelBase::OnLeafClick ), NULL, this );
+        m_pLabel1->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( LeafPanelBase::OnMouseWheel ), NULL, this );
+        m_pLabel1->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( LeafPanelBase::OnMenuMouse ), NULL, this );
+}
+
+LeafPanelBase::~LeafPanelBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CHAR, wxKeyEventHandler( LeafPanelBase::OnChar ) );
+        this->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( LeafPanelBase::OnEraseBackground ) );
+        this->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( LeafPanelBase::OnLeafDClick ) );
+        this->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LeafPanelBase::OnLeafClick ) );
+        this->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( LeafPanelBase::OnMouseWheel ) );
+        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( LeafPanelBase::OnPaint ) );
+        this->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( LeafPanelBase::OnMenuMouse ) );
+        m_pThumbnail->Disconnect( wxEVT_CHAR, wxKeyEventHandler( LeafPanelBase::OnChar ), NULL, this );
+        m_pThumbnail->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( LeafPanelBase::OnEraseBackground ), NULL, this );
+        m_pThumbnail->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( LeafPanelBase::OnLeafDClick ), NULL, this );
+        m_pThumbnail->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LeafPanelBase::OnLeafClick ), NULL, this );
+        m_pThumbnail->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( LeafPanelBase::OnMouseWheel ), NULL, this );
+        m_pThumbnail->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( LeafPanelBase::OnMenuMouse ), NULL, this );
+        m_pLabel->Disconnect( wxEVT_CHAR, wxKeyEventHandler( LeafPanelBase::OnChar ), NULL, this );
+        m_pLabel->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( LeafPanelBase::OnEraseBackground ), NULL, this );
+        m_pLabel->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( LeafPanelBase::OnLeafDClick ), NULL, this );
+        m_pLabel->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LeafPanelBase::OnLeafClick ), NULL, this );
+        m_pLabel->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( LeafPanelBase::OnMouseWheel ), NULL, this );
+        m_pLabel->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( LeafPanelBase::OnMenuMouse ), NULL, this );
+        m_pLabel1->Disconnect( wxEVT_CHAR, wxKeyEventHandler( LeafPanelBase::OnChar ), NULL, this );
+        m_pLabel1->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( LeafPanelBase::OnEraseBackground ), NULL, this );
+        m_pLabel1->Disconnect( wxEVT_LEFT_DCLICK, wxMouseEventHandler( LeafPanelBase::OnLeafDClick ), NULL, this );
+        m_pLabel1->Disconnect( wxEVT_LEFT_DOWN, wxMouseEventHandler( LeafPanelBase::OnLeafClick ), NULL, this );
+        m_pLabel1->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( LeafPanelBase::OnMouseWheel ), NULL, this );
+        m_pLabel1->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( LeafPanelBase::OnMenuMouse ), NULL, this );
+
+}
+
+PreviewPanelBase::PreviewPanelBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style, const wxString& name ) : wxPanel( parent, id, pos, size, style, name )
+{
+        this->SetBackgroundColour( wxColour( 128, 128, 128 ) );
+        this->Hide();
+
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPreviewTitle = new HeaderPanelWithButton( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPreviewTitle->SetToolTip( _("Previews") );
+
+        bSizer16->Add( m_pPreviewTitle, 0, wxEXPAND, 5 );
+
+        m_pPanelPreviews = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxCLIP_CHILDREN|wxFULL_REPAINT_ON_RESIZE|wxHSCROLL|wxVSCROLL|wxWANTS_CHARS );
+        m_pPanelPreviews->SetScrollRate( 0, 10 );
+        wxBoxSizer* bSizer17;
+        bSizer17 = new wxBoxSizer( wxVERTICAL );
+
+
+        m_pPanelPreviews->SetSizer( bSizer17 );
+        m_pPanelPreviews->Layout();
+        bSizer17->Fit( m_pPanelPreviews );
+        bSizer16->Add( m_pPanelPreviews, 1, wxEXPAND, 5 );
+
+        m_pPanelVertical = new VerticalHeader( this, wxID_ANY, wxDefaultPosition, wxSize( 26,-1 ), wxTAB_TRAVERSAL );
+        m_pPanelVertical->SetFont( wxFont( 10, 70, 90, 92, false, wxEmptyString ) );
+        m_pPanelVertical->SetForegroundColour( wxColour( 255, 255, 255 ) );
+        m_pPanelVertical->SetBackgroundColour( wxColour( 54, 54, 54 ) );
+        m_pPanelVertical->Hide();
+        m_pPanelVertical->SetToolTip( _("Previews") );
+        m_pPanelVertical->SetMinSize( wxSize( 26,-1 ) );
+        m_pPanelVertical->SetMaxSize( wxSize( 26,-1 ) );
+
+        bSizer16->Add( m_pPanelVertical, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+
+        this->SetSizer( bSizer16 );
+        this->Layout();
+
+        // Connect Events
+        this->Connect( wxEVT_CHAR, wxKeyEventHandler( PreviewPanelBase::OnChar ) );
+        this->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PreviewPanelBase::OnMouseWheel ) );
+        this->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( PreviewPanelBase::OnMenuMouse ) );
+        m_pPreviewTitle->Connect( wxEVT_CHAR, wxKeyEventHandler( PreviewPanelBase::OnChar ), NULL, this );
+        m_pPreviewTitle->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PreviewPanelBase::OnEraseBackground ), NULL, this );
+        m_pPanelPreviews->Connect( wxEVT_CHAR, wxKeyEventHandler( PreviewPanelBase::OnChar ), NULL, this );
+        m_pPanelPreviews->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( PreviewPanelBase::OnChar ), NULL, this );
+        m_pPanelPreviews->Connect( wxEVT_KEY_UP, wxKeyEventHandler( PreviewPanelBase::OnChar ), NULL, this );
+        m_pPanelPreviews->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( PreviewPanelBase::OnMedicalHistoryClick ), NULL, this );
+        m_pPanelPreviews->Connect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PreviewPanelBase::OnMouseWheel ), NULL, this );
+        m_pPanelPreviews->Connect( wxEVT_RIGHT_UP, wxMouseEventHandler( PreviewPanelBase::OnMenuMouse ), NULL, this );
+        m_pPanelVertical->Connect( wxEVT_CHAR, wxKeyEventHandler( PreviewPanelBase::OnChar ), NULL, this );
+        m_pPanelVertical->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PreviewPanelBase::OnEraseBackground ), NULL, this );
+        m_pPanelVertical->Connect( wxEVT_LEFT_UP, wxMouseEventHandler( PreviewPanelBase::OnShowPreviewsClick ), NULL, this );
+}
+
+PreviewPanelBase::~PreviewPanelBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CHAR, wxKeyEventHandler( PreviewPanelBase::OnChar ) );
+        this->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PreviewPanelBase::OnMouseWheel ) );
+        this->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( PreviewPanelBase::OnMenuMouse ) );
+        m_pPreviewTitle->Disconnect( wxEVT_CHAR, wxKeyEventHandler( PreviewPanelBase::OnChar ), NULL, this );
+        m_pPreviewTitle->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PreviewPanelBase::OnEraseBackground ), NULL, this );
+        m_pPanelPreviews->Disconnect( wxEVT_CHAR, wxKeyEventHandler( PreviewPanelBase::OnChar ), NULL, this );
+        m_pPanelPreviews->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( PreviewPanelBase::OnChar ), NULL, this );
+        m_pPanelPreviews->Disconnect( wxEVT_KEY_UP, wxKeyEventHandler( PreviewPanelBase::OnChar ), NULL, this );
+        m_pPanelPreviews->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( PreviewPanelBase::OnMedicalHistoryClick ), NULL, this );
+        m_pPanelPreviews->Disconnect( wxEVT_MOUSEWHEEL, wxMouseEventHandler( PreviewPanelBase::OnMouseWheel ), NULL, this );
+        m_pPanelPreviews->Disconnect( wxEVT_RIGHT_UP, wxMouseEventHandler( PreviewPanelBase::OnMenuMouse ), NULL, this );
+        m_pPanelVertical->Disconnect( wxEVT_CHAR, wxKeyEventHandler( PreviewPanelBase::OnChar ), NULL, this );
+        m_pPanelVertical->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( PreviewPanelBase::OnEraseBackground ), NULL, this );
+        m_pPanelVertical->Disconnect( wxEVT_LEFT_UP, wxMouseEventHandler( PreviewPanelBase::OnShowPreviewsClick ), NULL, this );
+
+}
diff --git a/cadxcore/main/gui/previewpanel/previewpanelbase.h b/cadxcore/main/gui/previewpanel/previewpanelbase.h
new file mode 100644
index 0000000..d128547
--- /dev/null
+++ b/cadxcore/main/gui/previewpanel/previewpanelbase.h
@@ -0,0 +1,186 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __PREVIEWPANELBASE_H__
+#define __PREVIEWPANELBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class HeaderPanelWithButton;
+class VerticalHeader;
+
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/statbmp.h>
+#include <wx/scrolwin.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class FirstLevelPanelBase
+///////////////////////////////////////////////////////////////////////////////
+class FirstLevelPanelBase : public wxPanel
+{
+private:
+
+protected:
+        wxStaticText* m_pLabel;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnChar( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEraseBackground( wxEraseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnPanelDClick( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnPanelClick( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnMouseWheel( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnPaint( wxPaintEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnMenuMouse( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSize( wxSizeEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCabeceraClick( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        FirstLevelPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 100,-1 ), long style = wxNO_BORDER|wxTAB_TRAVERSAL, const wxString& name = wxT("firstlevelpanel") );
+        ~FirstLevelPanelBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class LeafPanelBase
+///////////////////////////////////////////////////////////////////////////////
+class LeafPanelBase : public wxPanel
+{
+private:
+
+protected:
+        wxStaticBitmap* m_pThumbnail;
+        wxStaticText* m_pLabel;
+        wxStaticText* m_pLabel1;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnChar( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEraseBackground( wxEraseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnLeafDClick( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnLeafClick( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnMouseWheel( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnPaint( wxPaintEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnMenuMouse( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        LeafPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 100,120 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("leafpanel") );
+        ~LeafPanelBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PreviewPanelBase
+///////////////////////////////////////////////////////////////////////////////
+class PreviewPanelBase : public wxPanel
+{
+private:
+
+protected:
+        HeaderPanelWithButton* m_pPreviewTitle;
+        wxScrolledWindow* m_pPanelPreviews;
+        VerticalHeader* m_pPanelVertical;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnChar( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnMouseWheel( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnMenuMouse( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEraseBackground( wxEraseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnMedicalHistoryClick( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnShowPreviewsClick( wxMouseEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PreviewPanelBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 110,-1 ), long style = wxTAB_TRAVERSAL, const wxString& name = wxT("previewpanel") );
+        ~PreviewPanelBase();
+
+};
+
+#endif //__PREVIEWPANELBASE_H__
diff --git a/cadxcore/main/gui/previewpanel/previewpanelmodel.h b/cadxcore/main/gui/previewpanel/previewpanelmodel.h
new file mode 100644
index 0000000..65552a9
--- /dev/null
+++ b/cadxcore/main/gui/previewpanel/previewpanelmodel.h
@@ -0,0 +1,115 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <list>
+#include <api/autoptr.h>
+
+class wxWindow;
+namespace GNC
+{
+namespace GUI
+{
+class IPreviewLeaf;
+
+class EXTAPI IPreviewNode
+{
+public:
+        typedef std::list<IPreviewNode* > TListNodes;
+        IPreviewNode() {}
+        IPreviewNode(const std::string& label)
+        {
+                this->label = label;
+        }
+        virtual ~IPreviewNode()
+        {
+                for (TListNodes::iterator it = children.begin(); it != children.end(); ++it) {
+                        delete (*it);
+                }
+                children.clear();
+        }
+        std::string GetLabel()
+        {
+                return this->label;
+        }
+        void SetLabel(const std::string& label)
+        {
+                this->label = label;
+        }
+
+        void AddChild(IPreviewNode* child)
+        {
+                children.push_back(child);
+        }
+
+        TListNodes children;
+
+        virtual void OnShowMenu(wxWindow* pParent) = 0;
+        virtual void OnPreviewDClick(wxWindow* pParent) = 0;
+        virtual void OnPreviewLDown(wxWindow* pParent) = 0;
+        std::string label;
+};
+
+class EXTAPI IPreviewLeaf: public IPreviewNode
+{
+public:
+        IPreviewLeaf()
+        {
+        }
+        IPreviewLeaf(const std::string& label, const std::string& l2) :IPreviewNode(label), label2(l2), file_pk(-1)
+        {
+        }
+
+        virtual wxBitmap GetOverlayBitmap()
+        {
+                return wxBitmap();
+        }
+
+        std::string GetLabel2()
+        {
+                return this->label2;
+        }
+        void SetLabel2(const std::string& label)
+        {
+                this->label2 = label;
+        }
+        std::string GetLabel3()
+        {
+                return this->label3;
+        }
+        void SetLabel3(const std::string& label)
+        {
+                this->label3 = label;
+        }
+        long GetFilePk()
+        {
+                return this->file_pk;
+        }
+        void SetFilePk(long file_pk)
+        {
+                this->file_pk = file_pk;
+        }
+protected:
+        std::string label2;
+        std::string label3;
+        long file_pk;
+};
+};
+};
diff --git a/cadxcore/main/gui/progress/Progreso.fbp b/cadxcore/main/gui/progress/Progreso.fbp
new file mode 100644
index 0000000..81a9f94
--- /dev/null
+++ b/cadxcore/main/gui/progress/Progreso.fbp
@@ -0,0 +1,305 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="10" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">progresobase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">Progreso</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Panel" expanded="1">
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">PanelTareasBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass">; </property>
+            <property name="tooltip"></property>
+            <property name="validator_data_type"></property>
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pSizer1</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxScrolledWindow" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pTasks</property>
+                        <property name="permission">public</property>
+                        <property name="pos"></property>
+                        <property name="scroll_rate_x">5</property>
+                        <property name="scroll_rate_y">5</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxHSCROLL|wxVSCROLL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">m_pSizerTareas</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">public</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="1">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">There is no running tasks</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pSinTareas</property>
+                                    <property name="permission">public</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="1">
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">-1,-1</property>
+            <property name="name">PanelTareaBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="validator_data_type"></property>
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer5</property>
+                <property name="orient">wxHORIZONTAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pProgress</property>
+                        <property name="permission">public</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">GinkgoGauge; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/progress/paneltarea.cpp b/cadxcore/main/gui/progress/paneltarea.cpp
new file mode 100644
index 0000000..d3d594a
--- /dev/null
+++ b/cadxcore/main/gui/progress/paneltarea.cpp
@@ -0,0 +1,71 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "paneltarea.h"
+#include <main/controllers/commandcontroller.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <wx/image.h>
+#include <wx/dc.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <wx/wxginkgotoolbar.h>
+
+#define ID_BUTTON_INIT_STOP 0
+
+GNC::GUI::PanelTarea::PanelTarea( wxWindow* pPadre,long pidTarea) : PanelTareaBase(pPadre)
+{
+        m_PIDTarea = pidTarea;
+        m_pProgress->SetColorSchema(GinkgoGauge::TCS_BLUE);
+
+        wxGinkgoToolBar* m_pToolBar = new wxGinkgoToolBar(this, GetBackgroundColour());
+        m_pToolBar->AddTool(ID_BUTTON_INIT_STOP,_("Start"),GinkgoResourcesManager::CineBar::GetIcoStop(),_("Stop"));
+        m_pToolBar->Connect(ID_BUTTON_INIT_STOP,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( GNC::GUI::PanelTarea::OnTareaCancelarClick),NULL,this);
+
+        m_pToolBar->Realize();
+        GetSizer()->Add(m_pToolBar,0, wxALIGN_CENTER_VERTICAL|wxEXPAND,0);
+
+        m_pProgress->SetMinSize(wxSize(-1, m_pToolBar->GetSize().y));
+        Layout();
+}
+
+GNC::GUI::PanelTarea::~PanelTarea()
+{
+
+}
+
+void GNC::GUI::PanelTarea::SetProgress(const wxString& text, float progress)
+{
+        m_pProgress->SetStatus(text);
+        m_pProgress->SetProgress(progress);
+}
+
+wxString GNC::GUI::PanelTarea::GetStatus()
+{
+        return m_pProgress->GetStatus();
+}
+float GNC::GUI::PanelTarea::GetProgress()
+{
+        return m_pProgress->GetProgress();
+}
+
+void GNC::GUI::PanelTarea::OnTareaCancelarClick(wxCommandEvent &)
+{
+        GNC::GCS::ICommandController::Instance()->AbortarComando(m_PIDTarea, false);
+}
diff --git a/cadxcore/main/gui/progress/paneltarea.h b/cadxcore/main/gui/progress/paneltarea.h
new file mode 100644
index 0000000..57f1f7f
--- /dev/null
+++ b/cadxcore/main/gui/progress/paneltarea.h
@@ -0,0 +1,42 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "progresobase.h"
+namespace GNC
+{
+namespace GUI
+{
+
+class PanelTarea : public PanelTareaBase
+{
+public:
+        PanelTarea( wxWindow* pPadre,long pidTarea);
+        ~PanelTarea();
+
+        void SetProgress(const wxString& text, float progress);
+        wxString GetStatus();
+        float GetProgress();
+protected:
+        void OnTareaCancelarClick(wxCommandEvent &event);
+        long m_PIDTarea;
+};
+}
+}
diff --git a/cadxcore/main/gui/progress/progresobase.cpp b/cadxcore/main/gui/progress/progresobase.cpp
new file mode 100644
index 0000000..0d8e8f2
--- /dev/null
+++ b/cadxcore/main/gui/progress/progresobase.cpp
@@ -0,0 +1,56 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "progresobase.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+PanelTareasBase::PanelTareasBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* m_pSizer1;
+        m_pSizer1 = new wxBoxSizer( wxVERTICAL );
+
+        m_pTasks = new wxScrolledWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+        m_pTasks->SetScrollRate( 5, 5 );
+        m_pSizerTareas = new wxBoxSizer( wxVERTICAL );
+
+        m_pSinTareas = new wxStaticText( m_pTasks, wxID_ANY, _("There is no running tasks"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pSinTareas->Wrap( -1 );
+        m_pSizerTareas->Add( m_pSinTareas, 0, wxALL, 5 );
+
+        m_pTasks->SetSizer( m_pSizerTareas );
+        m_pTasks->Layout();
+        m_pSizerTareas->Fit( m_pTasks );
+        m_pSizer1->Add( m_pTasks, 1, wxEXPAND, 5 );
+
+        this->SetSizer( m_pSizer1 );
+        this->Layout();
+        m_pSizer1->Fit( this );
+}
+
+PanelTareasBase::~PanelTareasBase()
+{
+}
+
+PanelTareaBase::PanelTareaBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pProgress = new GinkgoGauge( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer5->Add( m_pProgress, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+        this->SetSizer( bSizer5 );
+        this->Layout();
+        bSizer5->Fit( this );
+}
+
+PanelTareaBase::~PanelTareaBase()
+{
+}
diff --git a/cadxcore/main/gui/progress/progresobase.h b/cadxcore/main/gui/progress/progresobase.h
new file mode 100644
index 0000000..9a731e2
--- /dev/null
+++ b/cadxcore/main/gui/progress/progresobase.h
@@ -0,0 +1,64 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __progresobase__
+#define __progresobase__
+
+#include <wx/intl.h>
+
+class GinkgoGauge;
+
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/sizer.h>
+#include <wx/scrolwin.h>
+#include <wx/panel.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelTareasBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelTareasBase : public wxPanel
+{
+private:
+
+protected:
+
+public:
+        wxScrolledWindow* m_pTasks;
+        wxBoxSizer* m_pSizerTareas;
+        wxStaticText* m_pSinTareas;
+
+        PanelTareasBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~PanelTareasBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelTareaBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelTareaBase : public wxPanel
+{
+private:
+
+protected:
+
+public:
+        GinkgoGauge* m_pProgress;
+
+        PanelTareaBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~PanelTareaBase();
+
+};
+
+#endif //__progresobase__
diff --git a/cadxcore/main/gui/progress/statusbarprogreso.cpp b/cadxcore/main/gui/progress/statusbarprogreso.cpp
new file mode 100644
index 0000000..f3b7d3f
--- /dev/null
+++ b/cadxcore/main/gui/progress/statusbarprogreso.cpp
@@ -0,0 +1,372 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/app.h>
+#include <wx/animate.h>
+#include <wx/mstream.h>
+#include <wx/gauge.h>
+#include <wx/msgdlg.h>
+#include <wx/statbmp.h>
+#include <wx/thread.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include "statusbarprogreso.h"
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/controladorvistas.h>
+#include <eventos/mensajes.h>
+#include <iostream>
+
+IMPLEMENT_DYNAMIC_CLASS(EventoMensajesUsuarioAsync, wxEvent)
+
+//dialogo tareas
+
+//
+
+
+GNC::GUI::StatusBarProgreso::StatusBarProgreso( wxWindow* pPadre, wxWindow* pPadrePanel, bool listenMessages, wxWindowID id, long style) :
+        wxStatusBar(pPadre, id, style),
+        m_dirty (true)
+{
+        m_pPanelTareas = new PanelTareasBase(pPadrePanel);
+        m_pPanelTareas->Show(false);
+
+        SetFieldsCount(Field_Max); //uno para el texto y el otro para lo q yo quiera
+        static const int widths[Field_Max] = { -1, 32, 250, 150};
+        SetStatusWidths(Field_Max, widths);
+
+        //mensaje tarea
+        m_pMensajeTarea = new wxStaticText(this,wxID_ANY,wxT(""), wxDefaultPosition, wxSize(250, -1), wxST_NO_AUTORESIZE);
+        m_pMensajeTarea->Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler( StatusBarProgreso::OnMostrarOcultarDialogoProgreso),NULL,this);
+
+        //botoncico de progreso
+        m_pIconoProgreso = new wxAnimationCtrl(this,wxID_ANY,GinkgoResourcesManager::ProgressBar::GetAniLoading());
+        m_pIconoProgreso->Hide();
+
+        m_pProgresoTarea = new wxGauge(this, wxID_ANY, 100);
+        m_pProgresoTarea->Hide();
+
+        m_pIconoParado = new wxStaticBitmap(this,wxID_ANY,GinkgoResourcesManager::ProgressBar::GetIcoStopped());
+        m_pIconoParado->Show(true);
+
+        //escuchamos el evento de mensajes
+        if (listenMessages) {
+                GNC::GCS::Events::EventoMensajes evt(NULL);
+                GNC::GCS::ControladorEventos::Instance()->Registrar(this,evt);
+        }
+
+        wxSizeEvent event(pPadre->GetSize());
+        OnSize(event);
+
+        //onsize
+        this->Connect(wxEVT_IDLE, wxIdleEventHandler(StatusBarProgreso::OnIdle), NULL, this);
+        this->Connect(wxEVT_SIZE,wxSizeEventHandler(StatusBarProgreso::OnSize),NULL,this);
+        this->GetParent()->Connect(wxEVT_MOVE,wxMoveEventHandler(StatusBarProgreso::OnMove),NULL,this);
+        this->Connect(wxEVT_MENSAJES_USUARIO_ASYNC, EventoMensajesUsuarioAsyncHandler(StatusBarProgreso::OnMensajeUsuario), NULL, this);
+}
+
+GNC::GUI::StatusBarProgreso::~StatusBarProgreso()
+{
+        m_pMensajeTarea->Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler( StatusBarProgreso::OnMostrarOcultarDialogoProgreso),NULL,this);
+
+        this->Disconnect(wxEVT_IDLE, wxIdleEventHandler(StatusBarProgreso::OnIdle), NULL, this);
+        this->Disconnect(wxEVT_MENSAJES_USUARIO_ASYNC, EventoMensajesUsuarioAsyncHandler(StatusBarProgreso::OnMensajeUsuario), NULL, this);
+        this->GetParent()->Disconnect(wxEVT_MOVE,wxMoveEventHandler(StatusBarProgreso::OnMove),NULL,this);
+        this->Disconnect(wxEVT_SIZE,wxSizeEventHandler(StatusBarProgreso::OnSize),NULL,this);
+
+        m_pIconoProgreso->Destroy();
+        m_pIconoProgreso = NULL;
+        m_pIconoParado->Destroy();
+        m_pIconoParado = NULL;
+        m_pProgresoTarea->Destroy();
+        m_pProgresoTarea = NULL;
+}
+
+void GNC::GUI::StatusBarProgreso::InsertarTarea(long taskId, const std::string& text)
+{
+        MapaTareasType::iterator it = m_MapaTareas.find(taskId);
+        if (it == m_MapaTareas.end()) {
+
+                PanelTarea* pt = new PanelTarea(m_pPanelTareas->m_pTasks, taskId);
+                wxString str = wxString::FromUTF8(text.c_str());
+                pt->SetProgress(str, 0);
+                m_MapaTareas[taskId] = pt;
+                pt->Show();
+                m_pPanelTareas->m_pSizerTareas->Add(pt, 0, wxEXPAND | wxDOWN, 5);
+                int ySize = pt->GetSize().y;
+                m_pPanelTareas->m_pTasks->Layout();
+                m_pPanelTareas->m_pTasks->SetVirtualSize(-1, ySize * m_MapaTareas.size());
+                m_pPanelTareas->m_pTasks->AdjustScrollbars();
+
+                m_pPanelTareas->Layout();
+
+                m_dirty = true;
+        }
+}
+
+void GNC::GUI::StatusBarProgreso::EliminarTarea(long taskId)
+{
+        PanelTarea* pt = NULL;
+        MapaTareasType::iterator it = m_MapaTareas.find(taskId);
+        if (it != m_MapaTareas.end()) {
+                pt = (*it).second;
+                m_MapaTareas.erase(it);
+
+                if (pt != NULL) {
+                        m_pPanelTareas->m_pSizerTareas->Detach(pt);
+                        int ySize = pt->GetSize().y;
+                        pt->Destroy();
+                        m_pPanelTareas->m_pTasks->SetVirtualSize(-1, ySize * m_MapaTareas.size());
+                        m_pPanelTareas->m_pTasks->AdjustScrollbars();
+                        m_pPanelTareas->m_pTasks->Layout();
+                }
+
+                m_dirty = true;
+        }
+
+}
+
+void GNC::GUI::StatusBarProgreso::SetProgresoTarea(long taskId, float normalizedProgress, const std::string& text)
+{
+
+        MapaTareasType::iterator it = m_MapaTareas.find(taskId);
+
+        if (it != m_MapaTareas.end()) {
+                PanelTarea* pt = (*it).second;
+                if (pt != NULL) {
+                        wxString str = wxString::FromUTF8(text.c_str());
+                        pt->SetProgress(str, normalizedProgress);
+                }
+
+                m_dirty = true;
+        }
+}
+
+void GNC::GUI::StatusBarProgreso::OnIdle(wxIdleEvent &WXUNUSED(event))
+{
+        if (m_dirty) {
+                if(m_MapaTareas.size() == 0) {
+                        if(m_pIconoProgreso->IsPlaying()) {
+                                m_pIconoProgreso->Stop();
+                        }
+                        m_pIconoProgreso->Hide();
+                        m_pProgresoTarea->Hide();
+                        m_pIconoParado->Show(true);
+
+                        m_pMensajeTarea->SetLabel(_("0 running tasks."));
+
+                        if (!m_pPanelTareas->m_pSinTareas->IsShown()) {
+                                m_pPanelTareas->m_pSinTareas->Show(true);
+                                m_pPanelTareas->Layout();
+                        }
+                } else {
+                        if (m_pPanelTareas->m_pSinTareas->IsShown()) {
+                                m_pPanelTareas->m_pSinTareas->Show(false);
+                                m_pPanelTareas->m_pTasks->Layout();
+                                m_pPanelTareas->Layout();
+                        }
+                        m_pIconoParado->Hide();
+                        if(!m_pIconoProgreso->IsPlaying()) {
+                                m_pIconoProgreso->Show();
+                                m_pIconoProgreso->Play();
+                        }
+                        if(m_MapaTareas.size() == 1) {
+                                if (!(*m_MapaTareas.begin()).second->GetStatus().empty()) {
+                                        m_pMensajeTarea->SetLabel((*m_MapaTareas.begin()).second->GetStatus());
+                                }
+
+                                m_pProgresoTarea->SetValue(((*m_MapaTareas.begin()).second->GetProgress() * 100));
+                                if (!m_pProgresoTarea->IsShown()) {
+                                        m_pProgresoTarea->Show();
+                                }
+                        } else {
+                                m_pMensajeTarea->SetLabel(wxString::Format(_("There are %d pending tasks"), (int) m_MapaTareas.size()));
+                                if (m_pProgresoTarea->IsShown()) {
+                                        m_pProgresoTarea->Hide();
+                                }
+                        }
+                }
+                m_dirty = false;
+        }
+        //Layout();
+}
+
+void GNC::GUI::StatusBarProgreso::ShowProgressDialog(bool show)
+{
+        bool isShown = GNC::GCS::ControladorVistas::Instance()->EsVisible(m_pPanelTareas);
+        if (!show && isShown) {
+                GNC::GCS::ControladorVistas::Instance()->OcultarPanel(m_pPanelTareas);
+        } else if (show && !isShown) {
+                wxPoint esquinaInferiorDerecha = GetParent()->GetPosition();
+                esquinaInferiorDerecha.x += GetParent()->GetSize().x;
+                esquinaInferiorDerecha.y += GetParent()->GetSize().y;
+                wxPoint posicionDialogo(0,0);
+                wxSize mejorSizeDialogo(400,170);
+#if defined (_WINDOWS)
+                posicionDialogo.x = esquinaInferiorDerecha.x - mejorSizeDialogo.x - 5;
+                posicionDialogo.y = esquinaInferiorDerecha.y - mejorSizeDialogo.y - 5 - GetSize().y;
+# else
+                posicionDialogo.x = esquinaInferiorDerecha.x - mejorSizeDialogo.x;
+                posicionDialogo.y = esquinaInferiorDerecha.y - mejorSizeDialogo.y;
+#endif
+                GNC::GCS::ControladorVistas::Instance()->MostrarPanelFlotante(m_pPanelTareas, posicionDialogo.x, posicionDialogo.y);
+        }
+}
+
+void GNC::GUI::StatusBarProgreso::OnMostrarOcultarDialogoProgreso(wxMouseEvent& )
+{
+        ShowProgressDialog(!GNC::GCS::ControladorVistas::Instance()->EsVisible(m_pPanelTareas));
+}
+
+
+void GNC::GUI::StatusBarProgreso::OnSize(wxSizeEvent& event)
+{
+        wxRect rect;
+        GetFieldRect(Field_GifProgreso, rect);
+        wxSize size = m_pIconoProgreso->GetSize();
+
+        m_pIconoProgreso->Move(rect.x + (rect.width - size.x) / 2,
+                               rect.y + (rect.height - size.y) / 2);
+        m_pIconoParado->Move(rect.x + (rect.width - size.x) / 2,
+                             rect.y + (rect.height - size.y) / 2);
+
+        GetFieldRect(Field_ProgresoTarea, rect);
+
+        wxPoint esquinaInferiorDerecha = GetParent()->GetPosition();
+        esquinaInferiorDerecha.x += GetParent()->GetSize().x;
+        esquinaInferiorDerecha.y += GetParent()->GetSize().y;
+
+        m_pProgresoTarea->SetSize(rect.x + 2, rect.y + 2, rect.width - 4, rect.height - 4);
+
+        GetFieldRect(Field_TextoTarea, rect);
+#if !defined(__WXOSX__)
+        m_pMensajeTarea->SetSize(rect.x + 2, rect.y + 2, rect.width - 4, rect.height - 4);
+#else
+        m_pMensajeTarea->SetSize(rect.x , rect.y, rect.width, rect.height);
+#endif
+
+        event.Skip();
+}
+
+void GNC::GUI::StatusBarProgreso::OnMove(wxMoveEvent& event)
+{
+        wxPoint esquinaInferiorDerecha = GetParent()->GetPosition();
+        esquinaInferiorDerecha.x += GetParent()->GetSize().x;
+        esquinaInferiorDerecha.y += GetParent()->GetSize().y;
+        event.Skip();
+}
+
+
+void GNC::GUI::StatusBarProgreso::OnMensajeUsuario(EventoMensajesUsuarioAsync& event )
+{
+        switch (event.GetTipo()) {
+        case EventoMensajesUsuarioAsync::StatusBar:
+                SetStatusText(event.GetTexto());
+                break;
+        case EventoMensajesUsuarioAsync::PopUp:
+                switch(event.GetGravedad()) {
+                case EventoMensajesUsuarioAsync::Error:
+                        wxMessageBox(event.GetTexto(), _("Error"),wxICON_ERROR);
+                        break;
+                case EventoMensajesUsuarioAsync::Aviso:
+                        wxMessageBox(event.GetTexto(), _("Warning"),wxICON_WARNING);
+                        break;
+                case EventoMensajesUsuarioAsync::Informacion:
+                        wxMessageBox(event.GetTexto(), _("Info"),wxICON_INFORMATION);
+                        break;
+                default:
+                        wxMessageBox(event.GetTexto(), _("Info"),wxICON_INFORMATION);
+                        break;
+                }
+                break;
+        default:
+                wxMessageBox(event.GetTexto(), _("Info"),wxICON_INFORMATION);
+                break;
+        }
+
+}
+
+void GNC::GUI::StatusBarProgreso::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        switch (evt->GetCodigoEvento()) {
+        case ginkgoEVT_Core_MensajesUsuario: {
+                GNC::GCS::Events::EventoMensajes* pEvt = dynamic_cast<GNC::GCS::Events::EventoMensajes*>(evt);
+                if(pEvt!=NULL) {
+                        switch(pEvt->GetTipo()) {
+                        case GNC::GCS::Events::EventoMensajes::StatusMessage : {
+                                switch (pEvt->GetGravedad()) {
+                                case GNC::GCS::Events::EventoMensajes::Error: {
+                                        EventoMensajesUsuarioAsync event(pEvt->GetMensaje(), EventoMensajesUsuarioAsync::StatusBar, EventoMensajesUsuarioAsync::Error);
+                                        this->GetEventHandler()->AddPendingEvent(event);
+                                }
+                                break;
+                                case GNC::GCS::Events::EventoMensajes::Aviso: {
+                                        EventoMensajesUsuarioAsync event(pEvt->GetMensaje(), EventoMensajesUsuarioAsync::StatusBar,EventoMensajesUsuarioAsync::Aviso);
+                                        this->GetEventHandler()->AddPendingEvent(event);
+                                }
+                                break;
+                                case GNC::GCS::Events::EventoMensajes::Informacion: {
+                                        EventoMensajesUsuarioAsync event(pEvt->GetMensaje(), EventoMensajesUsuarioAsync::StatusBar, EventoMensajesUsuarioAsync::Informacion);
+                                        this->GetEventHandler()->AddPendingEvent(event);
+                                }
+                                break;
+                                default: {
+                                        EventoMensajesUsuarioAsync event(pEvt->GetMensaje(), EventoMensajesUsuarioAsync::StatusBar, EventoMensajesUsuarioAsync::Informacion);
+                                        this->GetEventHandler()->AddPendingEvent(event);
+                                }
+                                break;
+                                }
+                        }
+                        break;
+                        case GNC::GCS::Events::EventoMensajes::PopUpMessage : {
+                                switch (pEvt->GetGravedad()) {
+                                case GNC::GCS::Events::EventoMensajes::Error: {
+                                        EventoMensajesUsuarioAsync event(pEvt->GetMensaje(),EventoMensajesUsuarioAsync::PopUp, EventoMensajesUsuarioAsync::Error);
+                                        this->GetEventHandler()->AddPendingEvent(event);
+                                }
+                                break;
+                                case GNC::GCS::Events::EventoMensajes::Aviso: {
+                                        EventoMensajesUsuarioAsync event(pEvt->GetMensaje(),EventoMensajesUsuarioAsync::PopUp, EventoMensajesUsuarioAsync::Aviso);
+                                        this->GetEventHandler()->AddPendingEvent(event);
+                                }
+                                break;
+                                case GNC::GCS::Events::EventoMensajes::Informacion: {
+                                        EventoMensajesUsuarioAsync event(pEvt->GetMensaje(),EventoMensajesUsuarioAsync::PopUp, EventoMensajesUsuarioAsync::Informacion);
+                                        this->GetEventHandler()->AddPendingEvent(event);
+                                }
+                                break;
+                                default: {
+                                        EventoMensajesUsuarioAsync event(pEvt->GetMensaje(),EventoMensajesUsuarioAsync::PopUp, EventoMensajesUsuarioAsync::Informacion);
+                                        this->GetEventHandler()->AddPendingEvent(event);
+                                }
+                                break;
+                                }
+                        }
+                        break;
+                        }
+                }
+        }
+        break;
+        default:
+                break;
+        }
+}
+
diff --git a/cadxcore/main/gui/progress/statusbarprogreso.h b/cadxcore/main/gui/progress/statusbarprogreso.h
new file mode 100644
index 0000000..eec79fc
--- /dev/null
+++ b/cadxcore/main/gui/progress/statusbarprogreso.h
@@ -0,0 +1,169 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <wx/event.h>
+#include <wx/timer.h>
+#include <wx/statusbr.h>
+
+#include "progresobase.h"
+#include "paneltarea.h"
+#include <api/controllers/iprogresscontroller.h>
+#include <api/observers/ieventsobserver.h>
+#include <map>
+#include <api/api.h>
+
+
+class wxAnimationCtrl;
+class wxGauge;
+class wxStaticBitmap;
+
+const wxEventType wxEVT_MENSAJES_USUARIO_ASYNC = wxNewEventType();
+
+extern const wxEventType wxEVT_MENSAJES_USUARIO_ASYNC;
+
+/*
+BEGIN_DECLARE_EVENT_TYPES()
+	DECLARE_EVENT_TYPE( wxEVT_MENSAJES_USUARIO_ASYNC, wxNewEventType() )
+END_DECLARE_EVENT_TYPES()
+*/
+class EventoMensajesUsuarioAsync : public wxEvent
+{
+
+public:
+        typedef enum {
+                StatusBar,
+                PopUp
+        } TTipoMensaje;
+
+        typedef enum {
+                Informacion,
+                Aviso,
+                Error
+        } TipoGravedad;
+
+        EventoMensajesUsuarioAsync(const std::string& texto = "", TTipoMensaje tipo = StatusBar, TipoGravedad gravedad = Informacion) : m_Texto(texto)
+        {
+                SetEventType(wxEVT_MENSAJES_USUARIO_ASYNC);
+                m_tipoMensaje = tipo;
+                m_gravedad = gravedad;
+        }
+
+        EventoMensajesUsuarioAsync(const EventoMensajesUsuarioAsync& event) : wxEvent(event), m_Texto(event.m_Texto), m_gravedad(event.m_gravedad)
+        {
+                m_tipoMensaje = event.m_tipoMensaje;
+        }
+
+        wxString GetTexto()
+        {
+                return wxString::FromUTF8(m_Texto.c_str());
+
+        }
+        TTipoMensaje GetTipo()
+        {
+                return m_tipoMensaje;
+        }
+
+        void SetGravedad(TipoGravedad gravedad)
+        {
+                m_gravedad = gravedad;
+        }
+
+        TipoGravedad GetGravedad()
+        {
+                return m_gravedad;
+        }
+
+        virtual wxEvent *Clone() const
+        {
+                return new EventoMensajesUsuarioAsync(*this);
+        }
+
+protected:
+        std::string m_Texto;
+        TTipoMensaje m_tipoMensaje;
+
+        TipoGravedad m_gravedad;
+
+private:
+        DECLARE_DYNAMIC_CLASS_NO_ASSIGN(EventoMensajesUsuarioAsync)
+};
+
+
+typedef void (wxEvtHandler::*EventoMensajesUsuarioAsyncFunction)(EventoMensajesUsuarioAsync&);
+
+#define EventoMensajesUsuarioAsyncHandler(func) \
+    (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(EventoMensajesUsuarioAsyncFunction, &func)
+
+#define EVT_MENSAJES_USUARIO(func) \
+    wx__DECLARE_EVT0(wxEVT_MENSAJES_USUARIO_ASYNC, EventoMensajesUsuarioAsyncHandler(func))
+
+namespace GNC
+{
+namespace GUI
+{
+class EXTAPI StatusBarProgreso : public wxStatusBar, public GNC::IControladorProgreso, public GNC::GCS::IEventsObserver
+{
+        enum {
+                Field_Text,
+                Field_GifProgreso,
+                Field_TextoTarea,
+                Field_ProgresoTarea,
+                Field_Max
+        };
+public:
+        typedef std::map<long, PanelTarea*> MapaTareasType;
+
+        StatusBarProgreso( wxWindow* pPadre, wxWindow* pPadrePanel, bool listenMessages, wxWindowID id = wxID_ANY, long style = wxST_SIZEGRIP );
+
+        ~StatusBarProgreso();
+
+        virtual void InsertarTarea(long taskId, const std::string& text);
+
+        virtual void EliminarTarea(long taskId);
+
+        virtual void SetProgresoTarea(long taskId, float normalizedProgress, const std::string& text);
+
+        virtual void ShowProgressDialog(bool show);
+
+
+protected:
+        void OnMostrarOcultarDialogoProgreso(wxMouseEvent& event);
+        void OnSize(wxSizeEvent& event);
+        void OnMove(wxMoveEvent& event);
+
+        void OnMensajeUsuario(EventoMensajesUsuarioAsync& event );
+        void OnIdle(wxIdleEvent &WXUNUSED(event));
+
+
+public:
+        void ProcesarEvento(GNC::GCS::Events::IEvent *evt) ;
+
+        MapaTareasType m_MapaTareas;
+        PanelTareasBase*	     m_pPanelTareas;
+        wxAnimationCtrl* m_pIconoProgreso;
+        wxGauge* m_pProgresoTarea;
+        wxStaticText* m_pMensajeTarea;
+        wxStaticBitmap* m_pIconoParado;
+        bool m_dirty;
+
+};
+}
+}
diff --git a/cadxcore/main/gui/selectpacsserver/SelectPacsServer.fbp b/cadxcore/main/gui/selectpacsserver/SelectPacsServer.fbp
new file mode 100644
index 0000000..440b3f6
--- /dev/null
+++ b/cadxcore/main/gui/selectpacsserver/SelectPacsServer.fbp
@@ -0,0 +1,714 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">selectpacsserverbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">SelectPacsServer</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">380,200</property>
+            <property name="name">SelectPacsServerBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Select PACS</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer15</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer7</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelMessage</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Select PACS</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer4</property>
+                                        <property name="orient">wxHORIZONTAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Select PACS server</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pLabel</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxChoice" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="choices"></property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size">160,-1</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pServer</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="selection">0</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnChoice"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer16</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Ok</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pOkButton</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button5</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/selectpacsserver/selectpacsserver.cpp b/cadxcore/main/gui/selectpacsserver/selectpacsserver.cpp
new file mode 100644
index 0000000..60ab9b9
--- /dev/null
+++ b/cadxcore/main/gui/selectpacsserver/selectpacsserver.cpp
@@ -0,0 +1,78 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "selectpacsserver.h"
+#include <main/controllers/dcmtk/dicomservers.h>
+#include <main/controllers/configurationcontroller.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+namespace GNC
+{
+namespace GUI
+{
+SelectPacsServer::SelectPacsServer(wxWindow* pParent) : SelectPacsServerBase(pParent)
+{
+        wxArrayString pacsList;
+        DicomServerList::TServerList ListOfServers = DicomServerList::Instance()->GetServerList();
+        for (DicomServerList::TServerList::iterator it = ListOfServers.begin(); it != ListOfServers.end(); ++it) {
+                pacsList.push_back(wxString::FromAscii((*it)->ID.c_str()));
+        }
+        m_pServer->Append(pacsList);
+
+        if(m_pServer->GetCount()>0) {
+                m_pServer->SetSelection(0);
+                std::string pacsDef;
+                GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/SubirPACS", "PACSDefecto", pacsDef);
+
+                for (unsigned int i =0; i< m_pServer->GetCount(); ++i) {
+                        if (m_pServer->GetString(i) == wxString::FromUTF8(pacsDef.c_str())) {
+                                m_pServer->Select(i);
+                                break;
+                        }
+                }
+        } else {
+                m_pServer->AppendString(_("There aren't any PACS configured"));
+                m_pServer->SetSelection(0);
+                m_pServer->Disable();
+                m_pOkButton->Disable();
+        }
+
+        m_pPanelMessage->Layout();
+        m_pBody->Layout();
+}
+SelectPacsServer::~SelectPacsServer()
+{
+}
+
+
+std::string SelectPacsServer::GetSelectedServer()
+{
+        int selection = m_pServer->GetSelection();
+        if (selection >=0) {
+                std::string idServer(m_pServer->GetString(selection).ToUTF8());
+                GNC::GCS::ConfigurationController::Instance()->writeStringUser("/GinkgoCore/SubirPACS", "PACSDefecto", idServer);
+                return idServer;
+        } else {
+                return "";
+        }
+}
+}
+}
diff --git a/cadxcore/main/gui/selectpacsserver/selectpacsserver.h b/cadxcore/main/gui/selectpacsserver/selectpacsserver.h
new file mode 100644
index 0000000..534fa23
--- /dev/null
+++ b/cadxcore/main/gui/selectpacsserver/selectpacsserver.h
@@ -0,0 +1,40 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include "selectpacsserverbase.h"
+
+
+namespace GNC
+{
+namespace GUI
+{
+
+class SelectPacsServer: public SelectPacsServerBase
+{
+public:
+        SelectPacsServer(wxWindow* pParent);
+        ~SelectPacsServer();
+        std::string GetSelectedServer();
+};
+
+}
+}
diff --git a/cadxcore/main/gui/selectpacsserver/selectpacsserverbase.cpp b/cadxcore/main/gui/selectpacsserver/selectpacsserverbase.cpp
new file mode 100644
index 0000000..bc06528
--- /dev/null
+++ b/cadxcore/main/gui/selectpacsserver/selectpacsserverbase.cpp
@@ -0,0 +1,85 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "selectpacsserverbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+SelectPacsServerBase::SelectPacsServerBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 380,200 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelMessage = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelMessage->SetToolTip( _("Select PACS") );
+
+        wxBoxSizer* bSizer4;
+        bSizer4 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pLabel = new wxStaticText( m_pPanelMessage, wxID_ANY, _("Select PACS server"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->Wrap( -1 );
+        bSizer4->Add( m_pLabel, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        wxArrayString m_pServerChoices;
+        m_pServer = new wxChoice( m_pPanelMessage, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pServerChoices, 0 );
+        m_pServer->SetSelection( 0 );
+        m_pServer->SetMaxSize( wxSize( 160,-1 ) );
+
+        bSizer4->Add( m_pServer, 1, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        m_pPanelMessage->SetSizer( bSizer4 );
+        m_pPanelMessage->Layout();
+        bSizer4->Fit( m_pPanelMessage );
+        bSizer7->Add( m_pPanelMessage, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer7 );
+        m_pBody->Layout();
+        bSizer7->Fit( m_pBody );
+        bSizer15->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer16;
+        bSizer16 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer16->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pOkButton = new wxButton( m_pFooter, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pOkButton->SetDefault();
+        bSizer16->Add( m_pOkButton, 0, wxRIGHT, 5 );
+
+        m_button5 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer16->Add( m_button5, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer16 );
+        m_pFooter->Layout();
+        bSizer16->Fit( m_pFooter );
+        bSizer15->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer15 );
+        this->Layout();
+        bSizer15->Fit( this );
+
+        this->Centre( wxBOTH );
+}
+
+SelectPacsServerBase::~SelectPacsServerBase()
+{
+}
diff --git a/cadxcore/main/gui/selectpacsserver/selectpacsserverbase.h b/cadxcore/main/gui/selectpacsserver/selectpacsserverbase.h
new file mode 100644
index 0000000..de7af03
--- /dev/null
+++ b/cadxcore/main/gui/selectpacsserver/selectpacsserverbase.h
@@ -0,0 +1,63 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __SELECTPACSSERVERBASE_H__
+#define __SELECTPACSSERVERBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class TitledPanel;
+
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/choice.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class SelectPacsServerBase
+///////////////////////////////////////////////////////////////////////////////
+class SelectPacsServerBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_pPanelMessage;
+        wxStaticText* m_pLabel;
+        wxChoice* m_pServer;
+        FooterPanel* m_pFooter;
+        wxButton* m_pOkButton;
+        wxButton* m_button5;
+
+public:
+
+        SelectPacsServerBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select PACS"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxMAXIMIZE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~SelectPacsServerBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__SELECTPACSSERVERBASE_H__
diff --git a/cadxcore/main/gui/startup/StartupForm.fbp b/cadxcore/main/gui/startup/StartupForm.fbp
new file mode 100644
index 0000000..a5695b3
--- /dev/null
+++ b/cadxcore/main/gui/startup/StartupForm.fbp
@@ -0,0 +1,664 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">startupformbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">startup form</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Panel" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style"></property>
+            <property name="bg">255,255,255</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">548,288</property>
+            <property name="name">StartUpFormBase</property>
+            <property name="pos"></property>
+            <property name="size">817,417</property>
+            <property name="subclass">; </property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxCLIP_CHILDREN|wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground">OnEraseBackground</event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer5</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND|wxALIGN_CENTER_HORIZONTAL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxBoxSizer" expanded="1">
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pSizerToolBar</property>
+                        <property name="orient">wxHORIZONTAL</property>
+                        <property name="permission">protected</property>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">20</property>
+                    <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxBoxSizer" expanded="1">
+                        <property name="minimum_size"></property>
+                        <property name="name">bSizer13</property>
+                        <property name="orient">wxHORIZONTAL</property>
+                        <property name="permission">none</property>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxHyperlinkCtrl" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="hover_color"></property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">http://ginkgo-cadx.com</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_hyperlink2</property>
+                                <property name="normal_color"></property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style">wxHL_DEFAULT_STYLE</property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="url">http://ginkgo-cadx.com</property>
+                                <property name="visited_color"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnHyperlink"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="1">
+                            <property name="border">5</property>
+                            <property name="flag">wxEXPAND|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">1</property>
+                            <object class="wxBoxSizer" expanded="1">
+                                <property name="minimum_size"></property>
+                                <property name="name">m_pSizerCenter</property>
+                                <property name="orient">wxHORIZONTAL</property>
+                                <property name="permission">public</property>
+                                <object class="sizeritem" expanded="1">
+                                    <property name="border">5</property>
+                                    <property name="flag">wxEXPAND</property>
+                                    <property name="proportion">1</property>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer51</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxBoxSizer" expanded="1">
+                                                <property name="minimum_size"></property>
+                                                <property name="name">bSizer6</property>
+                                                <property name="orient">wxHORIZONTAL</property>
+                                                <property name="permission">none</property>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxStaticText" expanded="1">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg">255,0,0</property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font">,90,92,-1,70,0</property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">No suitable for diagnostic usage. Please consider upgrade to</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_staticText2</property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">360</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="sizeritem" expanded="1">
+                                                    <property name="border">5</property>
+                                                    <property name="flag">wxALL</property>
+                                                    <property name="proportion">0</property>
+                                                    <object class="wxHyperlinkCtrl" expanded="1">
+                                                        <property name="BottomDockable">1</property>
+                                                        <property name="LeftDockable">1</property>
+                                                        <property name="RightDockable">1</property>
+                                                        <property name="TopDockable">1</property>
+                                                        <property name="aui_layer"></property>
+                                                        <property name="aui_name"></property>
+                                                        <property name="aui_position"></property>
+                                                        <property name="aui_row"></property>
+                                                        <property name="best_size"></property>
+                                                        <property name="bg"></property>
+                                                        <property name="caption"></property>
+                                                        <property name="caption_visible">1</property>
+                                                        <property name="center_pane">0</property>
+                                                        <property name="close_button">1</property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="default_pane">0</property>
+                                                        <property name="dock">Dock</property>
+                                                        <property name="dock_fixed">0</property>
+                                                        <property name="docking">Left</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="floatable">1</property>
+                                                        <property name="font">,90,92,-1,70,0</property>
+                                                        <property name="gripper">0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="hover_color"></property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">Ginkgo CADx Pro</property>
+                                                        <property name="max_size"></property>
+                                                        <property name="maximize_button">0</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="min_size"></property>
+                                                        <property name="minimize_button">0</property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="moveable">1</property>
+                                                        <property name="name">m_hyperlink31</property>
+                                                        <property name="normal_color"></property>
+                                                        <property name="pane_border">1</property>
+                                                        <property name="pane_position"></property>
+                                                        <property name="pane_size"></property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pin_button">1</property>
+                                                        <property name="pos"></property>
+                                                        <property name="resize">Resizable</property>
+                                                        <property name="show">1</property>
+                                                        <property name="size"></property>
+                                                        <property name="style">wxHL_DEFAULT_STYLE</property>
+                                                        <property name="subclass"></property>
+                                                        <property name="toolbar_pane">0</property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="url">http://ginkgo-cadx.com/en/downloads</property>
+                                                        <property name="visited_color"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnHyperlink"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="1">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font">,90,90,-1,70,0</property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Remember that when you buy Ginkgo CADx Pro, you are contributing to development efforts</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_staticText3</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxALIGN_CENTRE</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">350</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALIGN_RIGHT|wxTOP|wxBOTTOM|wxLEFT|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxStaticText" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">Powered by</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_staticText9</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <property name="wrap">-1</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">5</property>
+                            <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                            <property name="proportion">0</property>
+                            <object class="wxHyperlinkCtrl" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font">,90,90,-1,70,0</property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="hover_color"></property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="label">MetaEmotion Healthcare</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_hyperlink3</property>
+                                <property name="normal_color"></property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="style">wxHL_DEFAULT_STYLE</property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="url">http://healthcare.metaemotion.com</property>
+                                <property name="visited_color"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style"></property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnHyperlink">erasdf</event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="spacer" expanded="1">
+                        <property name="height">15</property>
+                        <property name="permission">protected</property>
+                        <property name="width">0</property>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/main/gui/startup/startupform.cpp b/cadxcore/main/gui/startup/startupform.cpp
new file mode 100644
index 0000000..2cb0d69
--- /dev/null
+++ b/cadxcore/main/gui/startup/startupform.cpp
@@ -0,0 +1,263 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "startupform.h"
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/entorno.h>
+#include <export/tools/iherramientascore.h>
+#include <main/gui/history3/historypanel3.h>
+#include <main/controllers/historytoolscontroller.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <wx/xml/xml.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <wx/dcbuffer.h>
+#include <wx/aui/auibar.h>
+#include <wx/wxginkgotoolbar.h>
+
+#define ID_FILE_DROP_DOWN	1781
+#define ID_SHOW_HISTORY	1782
+
+namespace GNC
+{
+namespace GUI
+{
+//////////////////////////////////////////////////////////////////
+struct RSSEntry {
+        std::string content;
+        std::string updated;
+        std::string link;
+};
+typedef std::list<RSSEntry> TListOfEntries;
+//////////////////////////////////////////////////////////////////
+///////////////////TOOL BAR///////////////////////////////////////
+class StartupFormToolbar : public wxGinkgoToolBar
+{
+public:
+        StartupFormToolbar(wxWindow* pParent, const wxColor& color = wxColor(255, 255, 255)): wxGinkgoToolBar(pParent,wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_TEXT)
+        {
+                SetToolBitmapSize(wxSize(64,64));
+                wxGinkgoToolBarArt* pToolArt= new wxGinkgoToolBarArt(color);
+                SetBackgroundColour(wxColour(255,255,255));
+                SetArtProvider(pToolArt);
+
+                AddTool(ID_SHOW_HISTORY, _("History"), GinkgoResourcesManager::BigIcons::GetIcoBigBook());
+
+                if(GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire") && GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","pacs_acquisition")) {
+                        AddTool(ID_FILE_DROP_DOWN, _("Acquire"), GinkgoResourcesManager::BigIcons::GetIcoBigAcquire());
+                        ForceSetToolDropDown(ID_FILE_DROP_DOWN, true);
+                        this->Connect(ID_FILE_DROP_DOWN,wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(StartupFormToolbar::OnDropDownAcquire),NULL, this );
+                }
+
+                GNC::HistoryToolsController::Instance()->AppendsBigToolsInToolBar(this);
+
+                this->Connect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(StartupFormToolbar::OnToolClick),NULL, this );
+        }
+
+        ~StartupFormToolbar()
+        {
+                this->Disconnect(ID_FILE_DROP_DOWN,wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN, wxAuiToolBarEventHandler(StartupFormToolbar::OnDropDownAcquire),NULL, this );
+                this->Disconnect( wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(StartupFormToolbar::OnToolClick),NULL, this );
+        }
+
+
+        void OnDropDownAcquire(wxAuiToolBarEvent& event)
+        {
+                wxAuiToolBar* tb = static_cast<wxAuiToolBar*>(event.GetEventObject());
+
+                tb->SetToolSticky(event.GetId(), true);
+
+                // create the popup menu
+                wxMenu menuPopup;
+
+                GNC::HistoryToolsController::Instance()->AppendsToolInMenu(&menuPopup, &menuPopup, GNC::GCS::IHistoryTool::TFamily_Open);
+
+                // line up our menu with the button
+                wxRect rect = tb->GetToolRect(event.GetId());
+                wxPoint pt = tb->ClientToScreen(rect.GetBottomLeft());
+                pt = ScreenToClient(pt);
+
+                PopupMenu(&menuPopup, pt);
+
+                // make sure the button is "un-stuck"
+                tb->SetToolSticky(event.GetId(), false);
+        }
+
+        void OnToolClick(wxCommandEvent& event)
+        {
+                switch (event.GetId()) {
+                case ID_SHOW_HISTORY: {
+                        if (GNC::GUI::HistoryPanel3::Instance()->IsIconized()) {
+                                GNC::GUI::HistoryPanel3::Instance()->Restore();
+                        }
+                        if (!GNC::GUI::HistoryPanel3::Instance()->IsShown()) {
+                                GNC::GUI::HistoryPanel3::Instance()->Show(true);
+                        } else {
+                                GNC::GUI::HistoryPanel3::Instance()->Raise();
+                        }
+                }
+                break;
+                case ID_FILE_DROP_DOWN: {
+                }
+                break;
+                default: {
+                        GNC::GCS::IHistoryTool* pTool = GNC::HistoryToolsController::Instance()->GetTool(event.GetId());
+                        if (pTool != NULL) {
+                                pTool->Execute();
+                        }
+                }
+                break;
+                }
+        }
+};
+//////////////////////////////////////////////////////////////////
+class StartUpTitle: public wxPanel
+{
+public:
+        StartUpTitle(wxWindow* pParent) : wxPanel(pParent)
+        {
+                m_bigFont = wxFont( 18, 70, 90, 90, false, wxEmptyString );
+
+                wxWindow::SetBackgroundStyle(wxBG_STYLE_CUSTOM);
+
+                wxClientDC dc(this);
+                dc.SetFont(m_bigFont);
+                int height,width;
+                dc.GetTextExtent(wxString::FromUTF8(GNC::Entorno::Instance()->GetApplicationName().c_str()) , &width, &height, NULL, NULL, NULL);
+
+                SetSize(width + 20 + 20, height + 20);
+                SetMinSize(wxSize(width + 20 + 20, height + 20));
+
+                std::ostringstream ostrVersion;
+                ostrVersion << GNC::Entorno::Instance()->GetApplicationName() << " v";
+                ostrVersion << GNC::Entorno::Instance()->GetGinkgoVersion();
+
+                if (sizeof(void*) == 4) {
+                        ostrVersion << " 32 bits";
+                } else if (sizeof(void*) == 8) {
+                        ostrVersion << " 64 bits";
+                }
+
+                if(GNC::GCS::IControladorPermisos::Instance()->Get("core.license","licenseinfo")) {
+                        ostrVersion << " ("<< GNC::GCS::IControladorPermisos::Instance()->Get("core.license","licenseinfo").GetRawValue() << ")";
+                }
+                m_Version = wxString::FromUTF8(ostrVersion.str().c_str());
+
+                this->Connect( wxEVT_PAINT, wxPaintEventHandler( StartUpTitle::OnPaint ), NULL, this );
+                this->Connect( wxEVT_SIZE, wxSizeEventHandler( StartUpTitle::OnSize ), NULL, this );
+        }
+        ~StartUpTitle()
+        {
+                this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( StartUpTitle::OnPaint ), NULL, this );
+                this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( StartUpTitle::OnSize ), NULL, this );
+        }
+protected:
+        virtual void OnPaint(wxPaintEvent &event)
+        {
+                wxPaintDC dc(this);
+                PrepareDC(dc);
+
+                int width = dc.GetSize().x;
+                int height = dc.GetSize().y;
+                wxRect cr(0,0, width, height);
+
+                dc.GradientFillLinear(cr, wxColour(255,255,255), wxColour(200,200,200), wxNORTH);
+
+                dc.SetFont(m_bigFont);
+                wxCoord tx = 0, ty = 0;
+                wxString str = wxString::FromUTF8(GNC::Entorno::Instance()->GetApplicationName().c_str());
+                dc.GetTextExtent(str, &tx, &ty, NULL, NULL, NULL);
+                dc.DrawText(str, 20,20);
+
+                //draw version text...
+                dc.SetFont(GetFont());
+                dc.GetTextExtent(m_Version, &tx, &ty, NULL, NULL, NULL);
+                dc.DrawText(m_Version, width - tx - 20, height - ty);
+
+                event.Skip(false);
+        }
+
+        void OnSize(wxSizeEvent & event)
+        {
+                this->Refresh(false);
+                event.Skip(false);
+        }
+
+        wxFont m_bigFont;
+        wxString m_Version;
+};
+//////////////////////////////////////////////////////////////////
+StartUpForm::StartUpForm(GNC::GCS::IVista* pView): StartUpFormBase(pView->GetEstudio()->ParentWindow)
+{
+        StartUpTitle* pFooter = new StartUpTitle( this);
+        GetSizer()->Insert(0, pFooter, 0, wxEXPAND);
+
+        IView = pView;
+        wxAuiToolBar * pToolbar = new StartupFormToolbar(this);
+        m_pSizerToolBar->Add( 0, 0, 1, wxEXPAND, 5 );
+        m_pSizerToolBar->Add(pToolbar, 0, wxALIGN_CENTER_VERTICAL);
+        m_pSizerToolBar->Add( 0, 0, 1, wxEXPAND, 5 );
+        pToolbar->Realize();
+
+        Layout();
+}
+StartUpForm::~StartUpForm()
+{
+        //this is the common way to destroy view without leaks
+        IView->Lock();
+        delete IView;
+}
+
+void StartUpForm::OnUpgradeLink(wxHyperlinkEvent& /*event*/)
+{
+
+}
+
+void StartUpForm::OnEraseBackground(wxEraseEvent &event)
+{
+        event.Skip(true);
+}
+
+/*void StartUpForm::OnPaint(wxPaintEvent &event)
+{
+	wxPaintDC dc(this);
+	PrepareDC(dc);
+
+	int width = dc.GetSize().x;
+	int height = dc.GetSize().y/2;
+	wxRect cr(0,height, width, height);
+
+	dc.GradientFillLinear(cr, wxColour(255,255,255), wxColour(200,200,200), wxSOUTH);
+
+	dc.SetFont(m_bigFont);
+	wxCoord tx = 0, tyBig = 0, ty = 0;
+	wxString str = wxT("Ginkgo CADx");
+	dc.GetTextExtent(str, &tx, &tyBig, NULL, NULL, NULL);
+	dc.DrawText(str, 20,20);
+
+	//draw version text...
+	dc.SetFont(GetFont());
+	dc.GetTextExtent(m_Version, &tx, &ty, NULL, NULL, NULL);
+	dc.DrawText(m_Version, width - tx - 20, 20 + tyBig - ty);
+	StartUpFormBase::OnPaint(event);
+}*/
+}
+}
diff --git a/cadxcore/main/gui/startup/startupform.h b/cadxcore/main/gui/startup/startupform.h
new file mode 100644
index 0000000..ee212fa
--- /dev/null
+++ b/cadxcore/main/gui/startup/startupform.h
@@ -0,0 +1,42 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "startupformbase.h"
+#include "startupview.h"
+
+namespace GNC
+{
+namespace GUI
+{
+class StartUpForm: public StartUpFormBase
+{
+public:
+        StartUpForm(GNC::GCS::IVista* pView);
+        ~StartUpForm();
+
+        virtual void OnUpgradeLink( wxHyperlinkEvent& event );
+protected:
+        virtual void OnEraseBackground(wxEraseEvent& event);
+        //virtual void OnPaint(wxPaintEvent &event);
+        GNC::GCS::IVista* IView;
+};
+}
+}
diff --git a/cadxcore/main/gui/startup/startupformbase.cpp b/cadxcore/main/gui/startup/startupformbase.cpp
new file mode 100644
index 0000000..aeb5ebc
--- /dev/null
+++ b/cadxcore/main/gui/startup/startupformbase.cpp
@@ -0,0 +1,63 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "startupformbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+StartUpFormBase::StartUpFormBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetBackgroundColour( wxColour( 255, 255, 255 ) );
+        this->SetMinSize( wxSize( 548,288 ) );
+
+        wxBoxSizer*bSizer5 = new wxBoxSizer( wxVERTICAL );
+        m_pSizerToolBar = new wxBoxSizer( wxHORIZONTAL );
+
+        bSizer5->Add( m_pSizerToolBar, 1, wxEXPAND|wxALIGN_CENTER_HORIZONTAL, 5 );
+
+        wxBoxSizer* bSizer13 = new wxBoxSizer( wxHORIZONTAL );
+        m_pSizerCenter = new wxBoxSizer( wxHORIZONTAL );
+
+        wxBoxSizer* bSizer51 = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer6 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_staticText2 = new wxStaticText( this, wxID_ANY, _("No suitable for diagnostic usage."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText2->Wrap( 360 );
+        m_staticText2->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+        m_staticText2->SetForegroundColour( wxColour( 255, 0, 0 ) );
+
+        bSizer6->Add( m_staticText2, 0, wxALIGN_CENTER_HORIZONTAL|wxEXPAND|wxTOP|wxBOTTOM|wxLEFT, 5 );
+
+        bSizer51->Add( bSizer6, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+        m_pSizerCenter->Add( bSizer51, 1, wxEXPAND, 5 );
+
+
+        bSizer13->Add( m_pSizerCenter, 1, wxEXPAND|wxALIGN_CENTER_VERTICAL, 5 );
+
+
+        bSizer5->Add( bSizer13, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 20 );
+
+
+        bSizer5->Add( 0, 15, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer5 );
+        this->Layout();
+
+        // Connect Events
+        this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( StartUpFormBase::OnEraseBackground ) );
+}
+
+StartUpFormBase::~StartUpFormBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( StartUpFormBase::OnEraseBackground ) );
+
+}
diff --git a/cadxcore/main/gui/startup/startupformbase.h b/cadxcore/main/gui/startup/startupformbase.h
new file mode 100644
index 0000000..14dbaf4
--- /dev/null
+++ b/cadxcore/main/gui/startup/startupformbase.h
@@ -0,0 +1,64 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __STARTUPFORMBASE_H__
+#define __STARTUPFORMBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+#include <wx/sizer.h>
+#include <wx/gdicmn.h>
+#include <wx/string.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/hyperlink.h>
+#include <wx/font.h>
+#include <wx/stattext.h>
+#include <wx/panel.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class StartUpFormBase
+///////////////////////////////////////////////////////////////////////////////
+class StartUpFormBase : public wxPanel
+{
+private:
+
+protected:
+        wxBoxSizer* m_pSizerToolBar;
+        wxStaticText* m_staticText2;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnEraseBackground( wxEraseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void erasdf( wxHyperlinkEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+        wxBoxSizer* m_pSizerCenter;
+
+        StartUpFormBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 817,417 ), long style = wxCLIP_CHILDREN|wxTAB_TRAVERSAL );
+        ~StartUpFormBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__STARTUPFORMBASE_H__
diff --git a/cadxcore/main/gui/startup/startupview.cpp b/cadxcore/main/gui/startup/startupview.cpp
new file mode 100644
index 0000000..28ca369
--- /dev/null
+++ b/cadxcore/main/gui/startup/startupview.cpp
@@ -0,0 +1,155 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/wx.h>
+#include <wx/dir.h>
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/busyinfo.h>
+#include <wx/msgdlg.h>
+#include <wx/thread.h>
+
+#include <wx/tarstrm.h>
+#include <wx/zstream.h>
+#include <wx/wfstream.h>
+
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <main/entorno.h>
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/controladoreventos.h>
+#include <eventos/views.h>
+#include <main/controllers/controladorinternacionalizacion.h>
+#include <export/tools/iherramientascore.h>
+#include <api/toolsystem/itoolcontroller.h>
+
+#include "startupview.h"
+#include "startupform.h"
+
+#include <api/ientorno.h>
+
+#undef __DEPRECATED
+#include <ios>
+#include <sstream>
+#include <ostream>
+
+
+#define LOGGER "STARTUP"
+#define DEFAULT_RSS "http://twitter.com/statuses/user_timeline/247267254.rss"
+#define DEFAULT_WELCOME_URL "http://ginkgo-cadx.com/[lan]/ginkgocadxwelcomescreen/"
+
+namespace GNC
+{
+namespace GUI
+{
+StartUpView ::StartUpView (const GNC::GCS::Ptr<GNC::GUI::StartUpStudy>& study) : GNC::GCS::IVista((GNC::GCS::Ptr<GNC::GCS::IStudyContext>)study)
+{
+        FooStudy = study;
+        m_Cargada = false;
+
+        FooStudy->Window = m_pWindow = new StartUpForm (this);
+
+        GNC::GCS::IToolController* pToolBar = this->GetToolController();
+        pToolBar->AddTool(HCore_ShowHistory, (GNC::GCS::IViewContract*) this);
+
+        pToolBar->AddTool(HCore_DicomizeFromView, (GNC::GCS::IViewContract*) this);
+        pToolBar->AddTool(HCore_AddFileToHistory, (GNC::GCS::IViewContract*) this);
+        pToolBar->AddTool(HCore_QueryRetrieve, (GNC::GCS::IViewContract*) this);
+
+        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventView(this, GNC::GCS::Events::EventView::Initialized));
+}
+
+StartUpView ::~StartUpView ()
+{
+}
+
+//----------------------------------------------------------------------------------------------------
+//region Loading interface
+
+// Starts loading. Synchronous with interface.
+void StartUpView::OnCargaIniciada()
+{
+}
+
+// Step1: LoadStudy not synchronized with interface thread
+void StartUpView::CargarEstudio(GNC::GCS::IComando* /*pCmdInvocador*/)
+{
+}
+
+//Ends loading. Synchronous with interface
+void StartUpView::OnCargaFinalizada()
+{
+}
+
+// Step2: init pipeline synchronous with interface
+void StartUpView::IniciarPipeline()
+{
+        //build view title
+        BuildTitle();
+}
+
+
+// stops pipeline, it's called if there has been an error loading study
+void StartUpView::DetenerPipeline()
+{
+}
+
+//endregion
+
+bool StartUpView::SoportaGuardar()
+{
+        return false;
+}
+
+bool StartUpView::SoportaExportar()
+{
+        return false;
+}
+
+GNC::GCS::IVista* StartUpView::GetView()
+{
+        return this;
+}
+
+void StartUpView::Activar()
+{
+        GNC::GCS::IVista::Activar();
+        m_pWindow->SetFocus();
+}
+
+wxWindow * StartUpView::GetWindow()
+{
+        return m_pWindow;
+}
+
+wxSizer* StartUpView::GetBottomSizer()
+{
+        return m_pWindow->m_pSizerCenter;
+}
+
+
+void StartUpView::BuildTitle()
+{
+        m_Titulo = _Std("Start page");
+}
+}
+}
diff --git a/cadxcore/main/gui/startup/startupview.h b/cadxcore/main/gui/startup/startupview.h
new file mode 100644
index 0000000..cdfccbb
--- /dev/null
+++ b/cadxcore/main/gui/startup/startupview.h
@@ -0,0 +1,117 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/globals.h>
+#include <api/ivista.h>
+
+#include <list>
+#include <vector>
+#include <map>
+#include <api/istudycontext.h>
+#include <export/contracts/iviewcontract.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IEntorno;
+}
+}
+
+class wxWindow;
+
+namespace GNC
+{
+namespace GUI
+{
+class StartUpForm;
+
+class StartUpStudy : public GNC::GCS::IStudyContext
+{
+public:
+
+        StartUpStudy() {}
+        ~StartUpStudy() {}
+
+        virtual void CallbackCargarTagsImagen(const int /*indice*/, GIL::DICOM::IDICOMManager* /*pDicomManager*/) {}
+
+protected:
+
+};
+
+class StartUpView  : public GNC::GCS::IVista, public GNC::GCS::IViewContract
+{
+public:
+        /* Constructor */
+        StartUpView (const GNC::GCS::Ptr<GNC::GUI::StartUpStudy>& study);
+
+        /* Destructor */
+        ~StartUpView ();
+
+        //suports save?
+        virtual bool SoportaGuardar();
+
+        //supports exportation?
+        virtual bool SoportaExportar();
+
+        //----------------------------------------------------------------------------------------------------
+        //region Loading interface
+
+        // Starts loading. Synchronous with interface.
+        virtual void OnCargaIniciada();
+
+        // Step1: LoadStudy not synchronized with interface thread
+        virtual void CargarEstudio(GNC::GCS::IComando* pCmdInvocador);
+
+        //Ends loading. Synchronous with interface
+        virtual void OnCargaFinalizada();
+
+        // Step2: init pipeline synchronous with interface
+        virtual void IniciarPipeline();
+
+        // stops pipeline, it's called if there has been an error loading study
+        virtual void DetenerPipeline();
+
+        //endregion
+
+        //call when this view is activated
+        virtual void Activar();
+
+        virtual void ActivarRuta(long /*file_pk*/) {}
+
+        //view contract
+        virtual GNC::GCS::IVista* GetView();
+
+        //return graphic form
+        virtual wxWindow* GetWindow();
+
+        virtual wxSizer* GetBottomSizer();
+
+protected:
+
+        void BuildTitle();
+
+        GNC::GUI::StartUpForm* m_pWindow;
+        GNC::GCS::Ptr<GNC::GUI::StartUpStudy>     FooStudy;
+};
+}
+}
diff --git a/cadxcore/main/gui/toolsystem/ginkgotoolsystembar.cpp b/cadxcore/main/gui/toolsystem/ginkgotoolsystembar.cpp
new file mode 100644
index 0000000..8f2ea5f
--- /dev/null
+++ b/cadxcore/main/gui/toolsystem/ginkgotoolsystembar.cpp
@@ -0,0 +1,356 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ginkgotoolsystembar.h"
+#include <api/toolsystem/itoolcontroller.h>
+#include <api/toolsystem/iwidgettool.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <eventos/toolevents.h>
+#include <api/controllers/ieventscontroller.h>
+#include <wx/wxginkgotoolbar.h>
+#include <wx/menu.h>
+#include <wx/aui/aui.h>
+
+#define MOUSE_MARK_BORDER_COLOR 128, 128, 128
+#define MOUSE_MARK_OFFSETS 2, 8, 14
+#define MOUSE_MARK_BRUSHES wxRED_BRUSH, wxGREEN_BRUSH, wxBLUE_BRUSH
+
+class GinkgoToolSystemBarArt : public wxGinkgoToolBarArt
+{
+public:
+
+        GinkgoToolSystemBarArt(GNC::GCS::IToolController* pControlador)
+        {
+                m_pToolBar = pControlador;
+        }
+
+        virtual ~GinkgoToolSystemBarArt() {}
+
+
+        ////////////////////////////////////////////////////begin draw drowpdown////////////////////////////////////////
+        //WXWIDGETS DOESN'T SUPPORT DRAW CHECKED + DROPDOWN
+        // wxAuiBlendColour is used by wxAuiStepColour
+        unsigned char wxAuiBlendColour(unsigned char fg, unsigned char bg, double alpha)
+        {
+                double result = bg + (alpha * (fg - bg));
+                if (result < 0.0)
+                        result = 0.0;
+                if (result > 255)
+                        result = 255;
+                return (unsigned char)result;
+        }
+
+        // wxAuiStepColour() it a utility function that simply darkens
+        // or lightens a color, based on the specified percentage
+        // ialpha of 0 would be completely black, 100 completely white
+        // an ialpha of 100 returns the same colour
+        wxColor wxAuiStepColour(const wxColor& c, int ialpha)
+        {
+                if (ialpha == 100)
+                        return c;
+
+                unsigned char r = c.Red(),
+                              g = c.Green(),
+                              b = c.Blue();
+                unsigned char bg;
+
+                // ialpha is 0..200 where 0 is completely black
+                // and 200 is completely white and 100 is the same
+                // convert that to normal alpha 0.0 - 1.0
+                ialpha = wxMin(ialpha, 200);
+                ialpha = wxMax(ialpha, 0);
+                double alpha = ((double)(ialpha - 100.0))/100.0;
+
+                if (ialpha > 100) {
+                        // blend with white
+                        bg = 255;
+                        alpha = 1.0 - alpha;  // 0 = transparent fg; 1 = opaque fg
+                } else {
+                        // blend with black
+                        bg = 0;
+                        alpha += 1.0;         // 0 = transparent fg; 1 = opaque fg
+                }
+
+                r = wxAuiBlendColour(r, bg, alpha);
+                g = wxAuiBlendColour(g, bg, alpha);
+                b = wxAuiBlendColour(b, bg, alpha);
+
+                return wxColour(r, g, b);
+        }
+
+        ////////////////////////////////////////////////////end draw drowpdown////////////////////////////////////////
+
+        void DrawExtraDecoration(
+                wxDC& dc,
+                wxWindow* /*wnd*/,
+                const wxAuiToolBarItem& item,
+                const wxRect& rect)
+        {
+                if (item.IsActive() && (item.GetState() & wxAUI_BUTTON_STATE_CHECKED) ) {
+                        GNC::GCS::IWidgetTool* pLeftTool = m_pToolBar->GetLeftTool();
+                        GNC::GCS::IWidgetTool* pRightTool = m_pToolBar->GetRightTool();
+                        GNC::GCS::IWidgetTool* pMiddleTool = m_pToolBar->GetMiddleTool();
+
+                        static const int offx[3] = { MOUSE_MARK_OFFSETS };
+
+                        bool drawItem[3] = {false, false, false};
+
+                        if ( (pLeftTool != NULL) && (pLeftTool->ID == (unsigned int)item.GetId()) && (pLeftTool->GetTriggerButton().IsLeftEnabled()) ) {
+                                drawItem[0] = true;
+                        }
+                        if ( (pMiddleTool != NULL) && (pMiddleTool->ID == (unsigned int)item.GetId()) && (pMiddleTool->GetTriggerButton().IsMiddleEnabled()) ) {
+                                drawItem[1] = true;
+                        }
+                        if ( (pRightTool != NULL) && (pRightTool->ID == (unsigned int)item.GetId()) && (pRightTool->GetTriggerButton().IsRightEnabled()) ) {
+                                drawItem[2] = true;
+                        }
+                        if (drawItem[0] || drawItem[1] || drawItem[2]) {
+                                dc.SetPen( wxPen( wxColor(MOUSE_MARK_BORDER_COLOR), 1 ) );
+                                dc.SetBrush(*wxTRANSPARENT_BRUSH);
+                                dc.DrawRoundedRectangle(rect.x + 1, rect.height - 6, 20, 7, -0.25);
+
+                                static const wxBrush* brush[3] = {MOUSE_MARK_BRUSHES};
+
+                                for (int i = 0; i < 3; ++i) {
+                                        if (drawItem[i]) {
+                                                dc.SetBrush(*brush[i]);
+                                        } else {
+                                                dc.SetBrush(*wxTRANSPARENT_BRUSH);
+                                        }
+                                        dc.DrawRoundedRectangle(rect.x + offx[i], rect.height - 6, 6, 7, -0.25);
+                                }
+                        }
+                }
+        }
+
+        virtual void DrawDropDownButton(
+                wxDC& dc,
+                wxWindow* wnd,
+                const wxAuiToolBarItem& item,
+                const wxRect& rect)
+        {
+                wxGinkgoToolBarArt::DrawDropDownButton(dc, wnd, item, rect);
+                DrawExtraDecoration(dc, wnd, item, rect);
+        }
+
+        virtual void DrawButton(
+                wxDC& dc,
+                wxWindow* wnd,
+                const wxAuiToolBarItem& item,
+                const wxRect& rect)
+        {
+                wxGinkgoToolBarArt::DrawButton(dc, wnd, item, rect);
+                DrawExtraDecoration(dc, wnd, item, rect);
+        }
+
+private:
+        GNC::GCS::IToolController* m_pToolBar;
+
+};
+
+GNC::GUI::GinkgoToolSystemBar::GinkgoToolSystemBar(wxWindow* pParent, GNC::GCS::IToolController* pToolBar, const GNC::GCS::ITool::TToolFamily& family) : wxGinkgoToolBar(pParent,wxID_ANY, wxDefaultPosition, wxDefaultSize,wxAUI_TB_DEFAULT_STYLE )
+{
+        this->Connect(wxID_ANY,wxEVT_LEFT_UP, wxMouseEventHandler( GinkgoToolSystemBar::OnLeftUp) , NULL, this);
+        this->Connect(wxID_ANY,wxEVT_RIGHT_UP, wxMouseEventHandler( GinkgoToolSystemBar::OnRightUp) , NULL, this);
+        this->Connect(wxID_ANY,wxEVT_MIDDLE_UP, wxMouseEventHandler( GinkgoToolSystemBar::OnMiddleUp) , NULL, this);
+        this->Connect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN,  wxAuiToolBarEventHandler(GinkgoToolSystemBar::OnDropDownTool) , NULL, this);
+        pParent->Connect(wxEVT_KEY_DOWN, wxKeyEventHandler(GinkgoToolSystemBar::OnKeyEvent ), NULL, this);
+
+        SetToolBitmapSize(wxSize(16,16));
+        SetAutoLayout(true);
+        m_pToolBar = pToolBar;
+        GinkgoToolSystemBarArt* pToolArt = new GinkgoToolSystemBarArt(pToolBar);
+        wxColor color = pToolArt->GetCustomBaseColor();
+        switch(family) {
+        case GNC::GCS::ITool::TFamiliaGlobal:
+                color = wxColor(67,67,67);
+                break;
+        case GNC::GCS::ITool::TFamiliaVisualizacion:
+                color = wxColor(255,255,186);
+                break;
+        case GNC::GCS::ITool::TFamiliaAnotacion:
+                color = wxColor(255,186,186);
+                break;
+        case GNC::GCS::ITool::TFamiliaMedicion:
+                color = wxColor(217,255,186);
+                break;
+        case GNC::GCS::ITool::TFamiliaVision:
+                color = wxColor(186,230,255);
+                break;
+        case GNC::GCS::ITool::TFamiliaChroma:
+                color = wxColor(230,181,242);
+                break;
+        case GNC::GCS::ITool::TMenuVer:
+                break;
+        case GNC::GCS::ITool::TSeriesMenu:
+                break;
+        case GNC::GCS::ITool::TMenuHerramientas:
+                break;
+        case GNC::GCS::ITool::TMenuExport:
+                break;
+        case GNC::GCS::ITool::TMenuEdicion:
+                break;
+        default:
+                break;
+        }
+        pToolArt->SetCustomBaseColor(color);
+
+        SetArtProvider(pToolArt);
+
+        GNC::GCS::IEventsController::Instance()->Registrar(this, GNC::GCS::Events::ToolConnectedEvent());
+        GNC::GCS::IEventsController::Instance()->Registrar(this, GNC::GCS::Events::ToolEnabledEvent());
+        GNC::GCS::IEventsController::Instance()->Registrar(this, GNC::GCS::Events::ChangeToolIconEvent());
+}
+
+GNC::GUI::GinkgoToolSystemBar::~GinkgoToolSystemBar()
+{
+        this->Disconnect(wxID_ANY, wxEVT_COMMAND_TOOL_CLICKED, wxMouseEventHandler( GinkgoToolSystemBar::OnLeftUp), NULL, this);
+        this->Disconnect(wxID_ANY, wxEVT_COMMAND_TOOL_CLICKED, wxMouseEventHandler( GinkgoToolSystemBar::OnRightUp), NULL, this);
+        this->Disconnect(wxID_ANY, wxEVT_COMMAND_TOOL_CLICKED, wxMouseEventHandler( GinkgoToolSystemBar::OnMiddleUp), NULL, this);
+        this->Disconnect(wxID_ANY, wxEVT_COMMAND_AUITOOLBAR_TOOL_DROPDOWN,  wxAuiToolBarEventHandler(GinkgoToolSystemBar::OnDropDownTool) , NULL, this);
+        GetParent()->Disconnect(wxEVT_KEY_DOWN, wxKeyEventHandler( GinkgoToolSystemBar::OnKeyEvent ), NULL, this);
+        m_pToolBar=NULL;
+}
+
+wxRect GNC::GUI::GinkgoToolSystemBar::GetToolRect(int tool_id) const
+{
+        wxRect rect = wxAuiToolBar::GetToolRect(tool_id);
+        rect.x -= 5;
+        rect.y -= 5;
+        rect.width += 5;
+        rect.height += 5;
+        return rect;
+}
+
+void GNC::GUI::GinkgoToolSystemBar::OnRightUp(wxMouseEvent& evt)
+{
+        wxAuiToolBarItem* hit_item;
+        hit_item = FindToolByPosition(evt.GetX(), evt.GetY());
+        if (hit_item != NULL && hit_item->IsActive()) {
+                m_pToolBar->ActivateTool(hit_item->GetId(), GNC::GCS::TriggerButton().EnableRight(), this);
+        }
+        //don't remove this line, parent has to process the event!!
+        wxGinkgoToolBar::OnRightUp(evt);
+}
+
+void GNC::GUI::GinkgoToolSystemBar::OnLeftUp(wxMouseEvent& evt)
+{
+        wxAuiToolBarItem* hit_item;
+        hit_item = FindToolByPosition(evt.GetX(), evt.GetY());
+        if (hit_item != NULL && hit_item->IsActive()) {
+                GNC::GCS::ITool* pTool = m_pToolBar->GetTool(hit_item->GetId());
+                if (pTool !=NULL && !pTool->AppendsInMenu()) {
+                        //if appends in menu avoid double calling
+                        m_pToolBar->ActivateTool(hit_item->GetId(), GNC::GCS::TriggerButton().EnableLeft(), this);
+                }
+        }
+        //don't remove this line, parent has to process the event!!
+        wxGinkgoToolBar::OnLeftUp(evt);
+}
+
+void GNC::GUI::GinkgoToolSystemBar::OnMiddleUp(wxMouseEvent& evt)
+{
+        wxAuiToolBarItem* hit_item;
+        hit_item = FindToolByPosition(evt.GetX(), evt.GetY());
+        if (hit_item != NULL && hit_item->IsActive()) {
+                m_pToolBar->ActivateTool(hit_item->GetId(), GNC::GCS::TriggerButton().EnableMiddle(), this);
+        }
+        //don't remove this line, parent has to process the event!!
+        wxGinkgoToolBar::OnMiddleUp(evt);
+}
+
+void GNC::GUI::GinkgoToolSystemBar::OnDropDownTool(wxAuiToolBarEvent& evt)
+{
+        if (evt.IsDropDownClicked()) {
+                wxAuiToolBarItem* hit_item;
+                hit_item = FindToolByPosition(evt.GetClickPoint().x, evt.GetClickPoint().y);
+                if (hit_item != NULL && hit_item->IsActive()) {
+                        //Activate...
+                        wxAuiToolBar* tb = static_cast<wxAuiToolBar*>(evt.GetEventObject());
+
+                        tb->SetToolSticky(evt.GetId(), true);
+                        // create the popup menu
+                        wxMenu menuPopup;
+
+                        m_pToolBar->AppendDropDownMenu(hit_item->GetId(), &menuPopup, &menuPopup);
+
+                        // line up our menu with the button
+                        wxRect rect = tb->GetToolRect(evt.GetId());
+                        wxPoint pt = tb->ClientToScreen(rect.GetBottomLeft());
+                        pt = ScreenToClient(pt);
+
+                        PopupMenu(&menuPopup, pt);
+
+                        // make sure the button is "un-stuck"
+                        tb->SetToolSticky(evt.GetId(), false);
+                        //	m_pToolBar->ActivateTool(hit_item->GetId(), GNC::GCS::TriggerButton().EnableLeft(), this);
+                }
+        }
+        evt.Skip(true);
+}
+
+void GNC::GUI::GinkgoToolSystemBar::OnKeyEvent(wxKeyEvent& event)
+{
+        GNC::GCS::Events::EventoTeclado evt(&event, NULL);
+        evt.Skip(true);
+        m_pToolBar->OnKeyAccelerator(evt, this);
+        /*
+        #if defined(__WXGTK__)
+        if (m_pParent != NULL) {
+        m_pParent->SetFocus();
+        }
+        #endif
+        */
+        event.Skip(evt.GetSkipped());
+        event.ResumePropagation(3);
+}
+
+void GNC::GUI::GinkgoToolSystemBar::ProcesarEvento(GNC::GCS::Events::IEvent* evt)
+{
+        switch (evt->GetCodigoEvento()) {
+        case ginkgoEVT_Core_ToolConnected: {
+                GNC::GCS::Events::ToolConnectedEvent* pToolEvt = static_cast<GNC::GCS::Events::ToolConnectedEvent*>(evt);
+                if (pToolEvt->GetToolBar() == m_pToolBar) {
+                        this->ForceToggleTool(pToolEvt->GetTool()->ID, pToolEvt->IsConnected());
+                        wxRect rect = GetToolRect(pToolEvt->GetTool()->ID);
+                        Refresh(true, &rect);
+                }
+        }
+        break;
+        case ginkgoEVT_Core_ToolEnabled: {
+                GNC::GCS::Events::ToolEnabledEvent* pToolEvt = static_cast<GNC::GCS::Events::ToolEnabledEvent*>(evt);
+                if (pToolEvt->GetToolBar() == m_pToolBar) {
+                        this->EnableTool(pToolEvt->GetTool()->ID, pToolEvt->IsEnabled());
+                        wxRect rect = GetToolRect(pToolEvt->GetTool()->ID);
+                        Refresh(true, &rect);
+                }
+        }
+        break;
+        case ginkgoEVT_Core_ToolIconChanged: {
+                GNC::GCS::Events::ChangeToolIconEvent* pToolEvt = static_cast<GNC::GCS::Events::ChangeToolIconEvent*>(evt);
+                if (pToolEvt->GetToolBar() == m_pToolBar) {
+                        this->SetToolBitmap(pToolEvt->GetTool()->ID, *pToolEvt->GetBitmap());
+                        wxRect rect = GetToolRect(pToolEvt->GetTool()->ID);
+                        Refresh(true, &rect);
+                }
+        }
+        break;
+        }
+}
diff --git a/cadxcore/main/gui/toolsystem/ginkgotoolsystembar.h b/cadxcore/main/gui/toolsystem/ginkgotoolsystembar.h
new file mode 100644
index 0000000..f6cce7b
--- /dev/null
+++ b/cadxcore/main/gui/toolsystem/ginkgotoolsystembar.h
@@ -0,0 +1,60 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef WXGINKGOTOOLBAR_H
+#define WXGINKGOTOOLBAR_H
+
+#include <api/toolsystem/itool.h>
+#include <api/observers/ieventsobserver.h>
+
+#include <wx/dc.h>
+#include <wx/wxginkgotoolbar.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IToolController;
+}
+namespace GUI
+{
+class GinkgoToolSystemBar : public wxGinkgoToolBar, public GNC::GCS::IEventsObserver
+{
+public:
+        GinkgoToolSystemBar(wxWindow* pParent, GNC::GCS::IToolController* pToolBar, const GNC::GCS::ITool::TToolFamily& family);
+        ~GinkgoToolSystemBar();
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent* evt);
+
+protected:
+        virtual wxRect GetToolRect(int tool_id) const;
+        virtual void OnRightUp(wxMouseEvent& evt);
+        virtual void OnLeftUp(wxMouseEvent& evt);
+        virtual void OnMiddleUp(wxMouseEvent& evt);
+        virtual void OnDropDownTool(wxAuiToolBarEvent& evt);
+        virtual void OnKeyEvent(wxKeyEvent& event);
+
+        GNC::GCS::IToolController* m_pToolBar;
+};
+}
+}
+
+#endif
diff --git a/cadxcore/main/gui/toolsystem/wxmenuitemtool.cpp b/cadxcore/main/gui/toolsystem/wxmenuitemtool.cpp
new file mode 100644
index 0000000..9467150
--- /dev/null
+++ b/cadxcore/main/gui/toolsystem/wxmenuitemtool.cpp
@@ -0,0 +1,90 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "wxmenuitemtool.h"
+
+#include <api/toolsystem/itool.h>
+#include <api/toolsystem/itoolcontroller.h>
+
+#include <wx/menuitem.h>
+
+
+GNC::GUI::wxMenuItemTool::wxMenuItemTool(wxMenu* pMenuPadre, long id, const wxString& name,
+                const wxBitmap& /*bitmap*/, wxEvtHandler* pHandler, int type):
+        wxMenuItem(pMenuPadre, id, name, name, type == wxITEM_CHECK ? wxITEM_CHECK : wxITEM_NORMAL)
+{
+        m_pHandler = pHandler;
+        //this->SetBitmap(bitmap);
+}
+
+GNC::GUI::wxMenuItemTool::~wxMenuItemTool()
+{
+        if(m_pHandler != NULL) {
+                delete m_pHandler;
+                m_pHandler = NULL;
+        }
+}
+
+
+GNC::GUI::wxDefaultEvtHandlerTool::wxDefaultEvtHandlerTool(wxEvtHandler* pParent, GNC::GCS::ITool* pTool):wxEvtHandler()
+{
+        m_pParent = pParent;
+        m_pTool=pTool;
+        // Connect Events
+        m_pParent->Connect(m_pTool->ID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxDefaultEvtHandlerTool::OnToolClick),NULL,this);
+        m_pParent->Connect(m_pTool->ID, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxDefaultEvtHandlerTool::OnUpdateUI),NULL,this);
+}
+
+GNC::GUI::wxDefaultEvtHandlerTool::~wxDefaultEvtHandlerTool()
+{
+        m_pParent->Disconnect(m_pTool->ID, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxDefaultEvtHandlerTool::OnToolClick),NULL,this);
+        m_pParent->Disconnect(m_pTool->ID, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxDefaultEvtHandlerTool::OnUpdateUI),NULL,this);
+}
+
+void GNC::GUI::wxDefaultEvtHandlerTool::OnToolClick(wxCommandEvent& event)
+{
+        GNC::GCS::TriggerButton button;
+        button.EnableLeft();
+        event.Skip(false);
+        if (m_pTool->GetToolBar() != NULL) {
+                m_pTool->GetToolBar()->ActivateTool(m_pTool->ID, button, NULL);
+        }
+        if (m_pTool->AppendsInGlobalMenu()) {
+                m_pTool->ExecuteAction();
+        }
+}
+
+void GNC::GUI::wxDefaultEvtHandlerTool::OnUpdateUI(wxUpdateUIEvent& event)
+{
+        event.Enable(m_pTool->IsEnabled());
+}
+
+GNC::GUI::wxMenuTool::wxMenuTool(wxEvtHandler* pHandler)
+{
+        m_pHandler = pHandler;
+}
+
+GNC::GUI::wxMenuTool::~wxMenuTool()
+{
+        if(m_pHandler != NULL) {
+                delete m_pHandler;
+                m_pHandler = NULL;
+        }
+}
diff --git a/cadxcore/main/gui/toolsystem/wxmenuitemtool.h b/cadxcore/main/gui/toolsystem/wxmenuitemtool.h
new file mode 100644
index 0000000..fcb96fa
--- /dev/null
+++ b/cadxcore/main/gui/toolsystem/wxmenuitemtool.h
@@ -0,0 +1,71 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef WXMENUITEMTOOL_H
+#define WXMENUITEMTOOL_H
+#include <api/api.h>
+#include <wx/menu.h>
+#include <wx/menuitem.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class ITool;
+}
+namespace GUI
+{
+class EXTAPI wxMenuItemTool : public wxMenuItem
+{
+public:
+        wxMenuItemTool(wxMenu* pMenuPadre, long id, const wxString& name, const wxBitmap& bitmap, wxEvtHandler* pHandler, int type = wxITEM_NORMAL);
+
+        virtual ~wxMenuItemTool();
+
+        wxEvtHandler* m_pHandler;
+};
+
+class EXTAPI wxDefaultEvtHandlerTool: public wxEvtHandler
+{
+public:
+        wxDefaultEvtHandlerTool(wxEvtHandler* pParent, GNC::GCS::ITool* pTool);
+        virtual ~wxDefaultEvtHandlerTool();
+
+        virtual void OnToolClick(wxCommandEvent& event);
+        virtual void OnUpdateUI(wxUpdateUIEvent& event);
+protected:
+        GNC::GCS::ITool* m_pTool;
+        wxEvtHandler* m_pParent;
+};
+
+class EXTAPI wxMenuTool : public wxMenu
+{
+public:
+        wxMenuTool(wxEvtHandler* pHandler);
+
+        virtual ~wxMenuTool();
+
+        wxEvtHandler* m_pHandler;
+};
+}
+}
+
+#endif
diff --git a/cadxcore/main/gui/wxprevisualizaciondicom.cpp b/cadxcore/main/gui/wxprevisualizaciondicom.cpp
new file mode 100644
index 0000000..0c883fc
--- /dev/null
+++ b/cadxcore/main/gui/wxprevisualizaciondicom.cpp
@@ -0,0 +1,140 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include "wxprevisualizaciondicom.h"
+
+#include <vtkImageData.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderWindowInteractor.h>
+#include <wxVTKRenderWindowInteractor.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
+
+
+class wxPreviewVTKRenderWindowInteractor: public wxVTKRenderWindowInteractor
+{
+public:
+        wxPreviewVTKRenderWindowInteractor(wxPrevisualizacionDicom *parent,
+                                           wxWindowID id,
+                                           const wxPoint &pos = wxDefaultPosition,
+                                           const wxSize &size = wxDefaultSize,
+                                           long style = wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
+                                           const wxString &name = wxPanelNameStr) : wxVTKRenderWindowInteractor(parent, id, pos, size, style, name)
+        {
+                m_pParent = parent;
+        }
+        virtual void OnMouseDoubleClick(wxMouseEvent& event)
+        {
+                if (!Enabled || (ActiveButton != wxEVT_NULL)) {
+                        return;
+                }
+                Activar();
+                ActiveButton = event.GetEventType();
+
+                // On Mac (Carbon) and Windows we don't automatically get the focus when
+                // you click inside the window
+                // we therefore set the focus explicitly
+                // Apparently we need that on linux (GTK) too:
+                this->SetFocus();
+
+                SetEventInformationFlipY(event.GetX(), event.GetY(),
+                                         event.ControlDown(), event.ShiftDown(), '\0', 1, NULL);
+
+                if (event.LeftDClick()) {
+                        m_pParent->OnMouseLeftDClick();
+                }
+
+                ActiveButton = wxEVT_NULL;
+                TransformarEvento(event);
+        }
+        wxPrevisualizacionDicom* m_pParent;
+};
+
+wxPrevisualizacionDicom::wxPrevisualizacionDicom(wxWindow* parent, wxWindowID ) : wxPanel(parent, wxID_ANY)
+{
+        Sizer = new wxBoxSizer( wxHORIZONTAL );
+
+        ViewInteractor = NULL;
+        ViewInteractor = new wxPreviewVTKRenderWindowInteractor (this, wxID_ANY,
+                        wxDefaultPosition,
+                        wxDefaultSize,
+                        wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
+                        wxT(""));
+
+        ViewImage2D = vtkGinkgoImageViewer::New();
+
+        vtkRenderer* rend = vtkRenderer::New();
+
+        ViewImage2D->SetRenderWindow ( this->ViewInteractor->GetRenderWindow() );
+        ViewImage2D->SetRenderer (rend);
+
+        ViewImage2D->SetBackgroundColor(0.0f,0.0f,0.0f);
+
+        ViewImage2D->SetShowAnnotations(false);
+        ViewImage2D->SetInteractionOn();
+        GinkgoInteractorStyleImage2D* pInteractor = GinkgoInteractorStyleImage2D::SafeDownCast(ViewImage2D->GetInteractorStyle().GetPointer());
+        if (pInteractor != NULL) {
+                pInteractor->SetPreviewMode(true);
+        }
+
+        ViewImage2D->SetOrientation(vtkGinkgoImageViewer::AXIAL_ID);
+
+        rend->Delete();
+
+        this->SetSizer( Sizer );
+
+        Sizer->Add( ViewInteractor, 1, wxEXPAND );
+
+
+        this->Layout();
+}
+
+wxPrevisualizacionDicom::~wxPrevisualizacionDicom()
+{
+        reset();
+}
+
+void wxPrevisualizacionDicom::SetInput(vtkSmartPointer<vtkImageData>& data)
+{
+        if (data == NULL) {
+                reset();
+        } else {
+                ViewImage2D->SetInput(data, true);
+                ViewImage2D->ResetZoom(false, 0);
+                ViewInteractor->Render();
+        }
+}
+
+void wxPrevisualizacionDicom::reset()
+{
+        if (ViewImage2D != NULL) {
+                ViewImage2D->Detach();
+                ViewImage2D->Delete();
+        }
+        if (ViewInteractor != NULL) {
+                ViewInteractor->Delete();
+        }
+}
+
+void wxPrevisualizacionDicom::OnMouseLeftDClick() {}
diff --git a/cadxcore/main/gui/wxprevisualizaciondicom.h b/cadxcore/main/gui/wxprevisualizaciondicom.h
new file mode 100644
index 0000000..25d759f
--- /dev/null
+++ b/cadxcore/main/gui/wxprevisualizaciondicom.h
@@ -0,0 +1,69 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#if defined(__DEPRECATED)
+#undef __DEPRECATED
+#endif
+
+#include <api/api.h>
+#include <wx/window.h>
+#include <wx/panel.h>
+#include <wx/sizer.h>
+#include <vtkSmartPointer.h>
+
+class GinkgoRenderWindowInteractor;
+class GinkgoImageViewer;
+class vtkImageData;
+class wxVTKRenderWindowInteractor;
+class vtkGinkgoImageViewer;
+
+
+class EXTAPI wxPrevisualizacionDicom : public wxPanel
+{
+public:
+        wxPrevisualizacionDicom(wxWindow* parent, wxWindowID id = wxID_ANY);
+        ~wxPrevisualizacionDicom();
+
+        void SetInput(vtkSmartPointer<vtkImageData>& data);
+
+        vtkGinkgoImageViewer* GetView()
+        {
+                return ViewImage2D;
+        };
+        wxVTKRenderWindowInteractor* GetInteractor()
+        {
+                return ViewInteractor;
+        }
+
+        virtual void OnMouseLeftDClick();
+
+protected:
+        /*
+         GinkgoRenderWindowInteractor* ViewInteractor;
+         GinkgoImageViewer*            ViewImage2D;
+         */
+        wxVTKRenderWindowInteractor*  ViewInteractor;
+        vtkGinkgoImageViewer*     ViewImage2D;
+        wxBoxSizer*                   Sizer;
+
+        void reset();
+};
diff --git a/cadxcore/main/license.h b/cadxcore/main/license.h
new file mode 100644
index 0000000..5245e95
--- /dev/null
+++ b/cadxcore/main/license.h
@@ -0,0 +1,81 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+
+#define GINKGO_COPYRIGHT   "© 2007-2016"
+#define PRODUCT_NAME	"Ginkgo CADx"
+#define PRODUCT_SUBTITLE _Std("Open Source DICOM CADx environment")
+#define CREDITS "<a href=\"https://github.com/gerddie/ginkgocadx\">https://github.com/gerddie/ginkgocadx</a>"\
+"<p>© 2015-2016 Gert Wollny</p>"\
+"<p>© 2007-2014 <a href=\"http://healthcare.metaemotion.com/\">MetaEmotion Healthcare</a></p>"\
+"<p>¡Queremos agradecer a Sacyl por todo el apoyo en la creación de Ginkgo CADx!</p>"\
+"<h3>Traductores</h3>"\
+"<ul>"\
+"<li>Japonés: Noriya Yokohama</li>"\
+"<li>Alemán: Sebastian Hilbert</li>"\
+"<li>Turco: zeugma (sunder67)</li>"\
+"<li>Español: JFLP (jluna80)</li>"\
+"<li>Portugués (Brasil): Marcel Ribeiro Dantas</li>"\
+"<li>Portugués (Portugal): Vitor Neves</li>"\
+"</ul>"\
+"<h3>Agradecimientos</h3>"\
+"<ul>"\
+"<li>Debian-Med team especialmente a Andreas Tille and Karlsten Hilbert: empaquetado, pruebas y reporte de errores</li>"\
+"<li>Ross Boswell: pruebas de compatibilidad con PACS</li>"\
+"</ul>"
+
+
+//
+//
+// Permisos completos
+// "<?xml version=\"1.0\"?>\n"
+// "<permisos>\n"
+// "<permiso namespace=\"core\" id=\"default\" accion=\"activar\"/>"
+// "<permiso namespace=\"core.pacs.limits\" id=\"pacs\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"core.pacs.limits\" id=\"pacs_upload\" accion=\"activar\"/>"
+// "<permiso namespace=\"core.menu\" id=\"configuracion\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"core.menu\" id=\"filtrado\" accion=\"activar\"/>"
+// "<permiso namespace=\"atencionprimaria\" id=\"dicomizador\" accion=\"activar\"/>"
+// "<permiso namespace=\"atencionprimaria\" id=\"vista2d\" accion=\"activar\"/>"
+// "<permiso namespace=\"atencionprimaria\" id=\"vistasac\" accion=\"activar\"/>"
+// "<permiso namespace=\"atencionprimaria.vistasimple\" id=\"guardar cambios\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"oftalmologia\" id=\"dicomizador\" accion=\"activar\"/>"
+// "<permiso namespace=\"oftalmologia\" id=\"vistaoftal\" accion=\"activar\"/>"
+// "<permiso namespace=\"oftalmologia.vistaoftal\" id=\"Marcado del arbol de venas\" accion=\"activar\"/>"
+// "<permiso namespace=\"oftalmologia.vistaoftal\" id=\"Marcado de Oftalmologia\" accion=\"activar\"/>"
+// "<permiso namespace=\"oftalmologia.vistaoftal\" id=\"CoreMarcado\" accion=\"activar\"/>"
+// "<permiso namespace=\"oftalmologia.vistaoftal\" id=\"Pegado de imagenes de la serie\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"oftalmologia.vistaoftal\" id=\"CoreAnotacion\" accion=\"activar\"/>"
+// "<permiso namespace=\"oftalmologia.vistaoftal\" id=\"CoreElevacion\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"oftalmologia.vistaoftal\" id=\"CoreVarita\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"oftalmologia.vistaoftal\" id=\"panel de herramientas\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"oftalmologia.vistaoftal\" id=\"guardar cambios\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"dermatologia\" id=\"dicomizador\" accion=\"activar\"/>"
+// "<permiso namespace=\"dermatologia\" id=\"vistapasi\" accion=\"activar\"/>"
+// "<permiso namespace=\"dermatologia.vistapasi\" id=\"CoreMarcado\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"dermatologia.vistapasi\" id=\"DermaAnonimizacion\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"dermatologia.vistapasi\" id=\"CoreNota\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"dermatologia.vistapasi\" id=\"CoreElevacion\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"dermatologia.vistapasi\" id=\"CoreVarita\" accion=\"desactivar\"/>"
+// "<permiso namespace=\"dermatologia.vistapasi\" id=\"panel de herramientas pasi\" accion=\"activar\"/>"
+// "<permiso namespace=\"dermatologia.vistapasi\" id=\"guardar cambios\" accion=\"desactivar\"/>"
+// "</permisos>\n"
diff --git a/cadxcore/main/managers/widgetsmanager.cpp b/cadxcore/main/managers/widgetsmanager.cpp
new file mode 100644
index 0000000..8bdba1b
--- /dev/null
+++ b/cadxcore/main/managers/widgetsmanager.cpp
@@ -0,0 +1,1158 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#if defined(__DEPRECATED)
+#undef __DEPRECATED
+#endif
+
+#include <wx/wx.h>
+#include <wx/menu.h>
+#include <wx/image.h>
+#include <wx/timer.h>
+
+#include <api/globals.h>
+#include <api/icontexto.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/iannotator.h>
+#include <api/ivista.h>
+#include <api/toolsystem/itool.h>
+#include <api/toolsystem/itoolcontroller.h>
+
+#include <eventos/modificacionwidget.h>
+
+#include <api/westilo.h>
+#include <main/entorno.h>
+#include <main/controllers/controladoreventos.h>
+#include <widgets/wanotacionesquina.h>
+#include <widgets/wanotacionposicion.h>
+#include <widgets/wstaticrule.h>
+
+#include "widgetsmanager.h"
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <cairo/cairo.h>
+
+#include <vtk/vtkginkgoimageviewer.h>
+
+class TimerAnimation : public wxTimer
+{
+public:
+        TimerAnimation(GNC::GCS::IWidgetsManager* pManager)
+        {
+                m_pManager = pManager;
+                m_Frecuencia = 20.0f;
+        }
+
+        ~TimerAnimation() {}
+
+        virtual void Notify()
+        {
+                m_pManager->TickAnimation(m_Frecuencia);
+                //std::cout << "Tick()" << std::endl;
+                m_pManager->Render();
+        }
+
+        void Enable()
+        {
+                if (IsRunning()) {
+                        Stop();
+                }
+                Start((int)( 1000.0f * (1.0f/m_Frecuencia) ) );
+        }
+
+        void Disable()
+        {
+                if (IsRunning()) {
+                        Stop();
+                }
+        }
+protected:
+        GNC::GCS::IWidgetsManager* m_pManager;
+        double                     m_Frecuencia;
+};
+
+GNC::WidgetsManager::WidgetsManager(GNC::GCS::IVista* pVista):GNC::GCS::IWidgetsManager(pVista), m_pAnnotator(new GNC::GCS::IAnnotator(pVista))
+{
+        m_pRendererActivo = NULL;
+        m_cursor = GNC::GCS::Widgets::CUR_FLECHA;
+        m_mouseDerechoDown = false;
+        m_mouseIzquierdoDown = false;
+        m_middleDown = false;
+        m_pTimerAnimation = new TimerAnimation(this);
+
+        GNC::GCS::Widgets::WAnotador* pW = new GNC::GCS::Widgets::WAnotador(this,-1,"",-1);
+        InsertarWidget(pW);
+        GNC::GCS::Widgets::WAnotacionPosicion* pPosicion = new GNC::GCS::Widgets::WAnotacionPosicion(this,-1,"",-1);
+        InsertarWidget(pPosicion);
+        GNC::GCS::Widgets::WStaticRule* pStaticRule = new GNC::GCS::Widgets::WStaticRule(this,-1,"",-1);
+        InsertarWidget(pStaticRule);
+}
+
+GNC::WidgetsManager::~WidgetsManager()
+{
+        if (m_pTimerAnimation != NULL) {
+                delete m_pTimerAnimation;
+                m_pTimerAnimation = NULL;
+        }
+
+        for (GNC::GCS::ListaRenderers::iterator itr = m_Renderers.begin(); itr != m_Renderers.end(); ++itr) {
+                GNC::GCS::IWidgetsRenderer* pRenderer = *itr;
+                pRenderer->WSetCurrent();
+                for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                        GNC::GCS::Widgets::IWidget* w = (*it);
+                        if(w->ReservaRecursos()) {
+                                w->LiberarRecursos(pRenderer);
+                        }
+                }
+        }
+
+        GNC::GCS::ListaRenderers copia(m_Renderers); // Porque los renderers invocaran a EliminarRenderer de esta misma instancia;
+
+        for (GNC::GCS::ListaRenderers::iterator it = copia.begin(); it != copia.end(); ++it) {
+                GNC::GCS::IWidgetsRenderer* renderer = *it;
+
+                renderer->SetManager(NULL);
+        }
+
+        m_Widgets.clear();
+
+}
+
+void GNC::WidgetsManager::TickAnimation(double freq)
+{
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = *it;
+                if (!w->EstaOculto()) {
+                        w->TickAnimation(freq);
+                }
+        }
+}
+
+void GNC::WidgetsManager::EnableAnimation()
+{
+        m_pTimerAnimation->Enable();
+}
+
+void GNC::WidgetsManager::DisableAnimation()
+{
+        m_pTimerAnimation->Disable();
+}
+
+inline void GNC::WidgetsManager::ModificarRenderersDeWidget(GNC::GCS::Widgets::IWidget* w)
+{
+        if (w != NULL && !w->EsTopLevel()) {
+                for (GNC::GCS::ListaRenderers::iterator itr = m_Renderers.begin(); itr != m_Renderers.end(); ++itr) {
+                        GNC::GCS::IWidgetsRenderer* ren = *itr;
+                        if (w->GetVID() != -1 && w->GetVID() == ren->GetVID()) {
+                                ren->Modificar(true);
+                        }
+                }
+        }
+}
+
+//----------------------------------------------------------------------------------------------------
+//region "Interfaz especifica"
+
+void GNC::WidgetsManager::RenderPrivate(GNC::GCS::Contexto3D* c)
+{
+        if (!m_Enabled) {
+                return;
+        }
+
+        glPushAttrib(GL_ENABLE_BIT);
+        bool widgetIluminado = false;
+        // Primera pasada: widgets normales.
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = *it;
+                if (!w->EsTopLevel() && (w->GetVID() == c->GetRenderer()->GetVID() || w->GetVID() == -1) ) {
+                        w->Render(c);
+                        w->Modificar(false);
+                }
+                widgetIluminado = widgetIluminado || (!w->EstaOculto()&& w->EstaIluminado());
+        }
+
+        // Segunda pasada: widgets toplevel.
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = *it;
+                if (w->EsTopLevel()) {
+                        w->Render(c);
+                }
+        }
+
+        if (c->GetRenderer() == m_pRendererActivo) {
+                for (GNC::GCS::ListaBuilders::iterator it = m_pBuilders.begin(); it != m_pBuilders.end(); ++it) {
+                        (*it)->Render(c);
+                }
+        }
+
+        //cursor
+        if(widgetIluminado) {
+                //encima de un widget selecc e iluminado => si esta pulsando el boton derecho moviendose, si no pues no
+                if(m_mouseIzquierdoDown) {
+                        SetCursor(GNC::GCS::Widgets::CUR_MANO_CERRADA);
+                        //std::cout << "WIluminado: IZDown: Mano Cerrada " << std::endl;
+                } else {
+                        SetCursor(GNC::GCS::Widgets::CUR_MANO_ABIERTA);
+                        //std::cout << "WIluminado !IZDown: Mano Abierta " << std::endl;
+                }
+        } else {
+                bool cursorNotFound = true;
+                if (m_mouseIzquierdoDown) {
+                        //si no se lo pedimos al primer builder que encontremos
+                        for (GNC::GCS::ListaBuilders::iterator it = m_pBuilders.begin(); cursorNotFound && it != m_pBuilders.end(); ++it) {
+                                if ((*it)->GetButtonMask().IsLeftEnabled()) {
+                                        if((*it)->GetCursor() != GNC::GCS::Widgets::CUR_INVALIDO) {
+                                                //std::cout << "!WIluminado: !DERDown: Builder cursor " << std::endl;
+                                                SetCursor((*it)->GetCursor());
+                                                cursorNotFound = false;
+                                        }
+                                }
+                        }
+                }
+                if (m_middleDown) {
+                        for (GNC::GCS::ListaBuilders::iterator it = m_pBuilders.begin(); cursorNotFound && it != m_pBuilders.end(); ++it) {
+                                if ((*it)->GetButtonMask().IsMiddleEnabled()) {
+                                        if((*it)->GetCursor() != GNC::GCS::Widgets::CUR_INVALIDO) {
+                                                //std::cout << "!WIluminado: !DERDown: Builder cursor " << std::endl;
+                                                SetCursor((*it)->GetCursor());
+                                                cursorNotFound = false;
+                                        }
+                                }
+                        }
+                }
+                if (m_mouseDerechoDown) {
+                        //builder que atienda al boton derecho
+                        for (GNC::GCS::ListaBuilders::iterator it = m_pBuilders.begin(); cursorNotFound && it != m_pBuilders.end(); ++it) {
+                                if ((*it)->GetButtonMask().IsRightEnabled()) {
+                                        if((*it)->GetCursor() != GNC::GCS::Widgets::CUR_INVALIDO) {
+                                                //std::cout << "!WIluminado: !DERDown: Builder cursor " << std::endl;
+                                                SetCursor((*it)->GetCursor());
+                                                cursorNotFound = false;
+                                        }
+                                }
+                        }
+                }
+                if (cursorNotFound) {
+                        //try left...
+                        //si no se lo pedimos al primer builder que encontremos
+                        for (GNC::GCS::ListaBuilders::iterator it = m_pBuilders.begin(); cursorNotFound && it != m_pBuilders.end(); ++it) {
+                                if ((*it)->GetButtonMask().IsLeftEnabled()) {
+                                        if((*it)->GetCursor() != GNC::GCS::Widgets::CUR_INVALIDO) {
+                                                //std::cout << "!WIluminado: !DERDown: Builder cursor " << std::endl;
+                                                SetCursor((*it)->GetCursor());
+                                                cursorNotFound = false;
+                                        }
+                                }
+                        }
+                        if (cursorNotFound) {
+                                SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+                        }
+                }
+        }
+
+        c->GetRenderer()->Modificar(false);
+
+        glPopAttrib();
+}
+
+void GNC::WidgetsManager::Render()
+{
+        if (!m_Enabled) {
+                return;
+        }
+
+        bool seleccionEnActual = false;
+        bool seleccionEnOtro = false;
+
+        // Primera pasada: Widgets
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = *it;
+                if (!w->EsTopLevel() && !w->EstaOculto()) {
+                        if (m_pRendererActivo) { // Si hay renderer activo, comprobamos las selecciones.
+                                if (w->EstaSeleccionado()) {
+                                        if (w->GetVID() == m_pRendererActivo->GetVID()) {
+                                                seleccionEnActual = true;
+                                        } else {
+                                                seleccionEnOtro = true;
+                                        }
+                                }
+                        }
+                        if (w->EstaModificado()) {
+                                w->Modificar(false);
+                                ModificarRenderersDeWidget(w);
+                        }
+                }
+        }
+
+        if (seleccionEnActual && seleccionEnOtro) {
+                // Segunda pasada opcional: Deseleccion de selecciones en renderers no activos
+                for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                        GNC::GCS::Widgets::IWidget* w = *it;
+                        if (!w->EsTopLevel() && !w->EstaOculto()) {
+                                if (m_pRendererActivo) { // Si hay renderer activo, comprobamos las selecciones.
+                                        if (w->EstaSeleccionado()) {
+                                                if (w->GetVID() != m_pRendererActivo->GetVID()) {
+                                                        w->Seleccionar(false);
+                                                        w->Modificar(false);
+                                                        ModificarRenderersDeWidget(w);
+                                                }
+                                        }
+                                }
+                        }
+                }
+        }
+
+        for (GNC::GCS::ListaRenderers::iterator it = m_Renderers.begin(); it != m_Renderers.end(); ++it) {
+                GNC::GCS::IWidgetsRenderer* ren = *it;
+                if (ren->EstaModificado()) {
+                        GTRACE("Renderer[" << ren->GetVID() << "] modificado. Rendering...");
+                        //si el renderer es el activo, provoca un update inmediato, sino solo un refresh que hará un update cuando pueda
+                        ren->PostRender(ren == m_pRendererActivo);
+                        ren->Modificar(false);
+                }
+        }
+}
+
+void GNC::WidgetsManager::OffScreenRender(GNC::GCS::Contexto3D* c)
+{
+        if (!m_Enabled) {
+                return;
+        }
+
+        // Primera pasada: Widgets normales
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = *it;
+                if (!w->EstaOculto() && !w->EsTopLevel() && w->GetVID() == c->OVID) {
+                        w->OffscreenRender(c);
+                }
+        }
+
+        // Primera pasada: Widgets top level
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = *it;
+                if (!w->EstaOculto() && w->EsTopLevel()) {
+                        w->OffscreenRender(c);
+                }
+        }
+}
+
+void GNC::WidgetsManager::Modificado()
+{
+        if (m_pRendererActivo != NULL) {
+                m_pRendererActivo->Modificar(true);
+        }
+}
+
+void GNC::WidgetsManager::ModificadoPorWidget(GNC::GCS::Widgets::IWidget* w)
+{
+        this->ModificarRenderersDeWidget(w);
+}
+
+void GNC::WidgetsManager::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_Enabled) {
+                return;
+        }
+        evento.Skip(true);
+
+        if (!evento.c->IsOk()) {
+                std::cerr << "Adverencia: Render omitido: singularidad en contexto" << std::endl;
+        }
+
+        //pillamos boton derecho e izquierdo down-up
+
+        m_mouseIzquierdoDown = evento.LeftIsDown();
+        m_middleDown = evento.MiddleIsDown();
+        m_mouseDerechoDown = evento.RightIsDown();
+
+
+        // Primera pasada: widgets toplevel.
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if(!w->EstaOculto() && w->EsTopLevel() && !w->IgnoraEventos()) {
+                        w->OnMouseEvents(evento);
+                        if (w->EstaModificado()) {
+                                Modificado();
+                                if (w->RequiereNotificarCambios()) {
+                                        w->NotificarCambios(false);
+                                        NotificarModificacion(w);
+                                }
+                                w->Modificar(false);
+                        }
+                }
+        }
+        // Segunda pasada: widgets normales.
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if(!w->EstaOculto() && !w->EsTopLevel() && !w->IgnoraEventos() && ( w->GetVID() == evento.c->GetRenderer()->GetVID())) {
+                        w->OnMouseEvents(evento);
+                        if (w->EstaModificado()) {
+                                Modificado();
+                                if (w->RequiereNotificarCambios()) {
+                                        w->NotificarCambios(false);
+                                        NotificarModificacion(w);
+                                }
+                                w->Modificar(false);
+                        }
+                        if (w->EstaIluminado() && ( evento.LeftUp() ||evento.LeftDown() )) { // Si el widget esta iluminado y este evento es up/down del boton izquierdo, forzamos render para cambiar el cursor.
+                                Modificado();
+                        }
+                }
+        }
+
+        for (GNC::GCS::ListaBuilders::iterator it = m_pBuilders.begin(); evento.GetSkipped() && it != m_pBuilders.end(); ++it) {
+                (*it)->OnMouseEvents(evento);
+                if (!evento.GetSkipped()) {
+                        break;
+                }
+        }
+
+        if (evento.GetSkipped()) {
+                DefaultMouseEventProcess(evento);
+                if (evento.GetSkipped()) {
+                        if (this->m_pDefaultEventListenerDelegate != NULL) {
+                                this->m_pDefaultEventListenerDelegate->OnMouseEvents(evento);
+                        } else {
+                                if (m_pView != NULL && evento.ButtonUp(GNC::GCS::Events::EventoRaton::EB_DERECHO)) {
+                                        wxMenu menu;
+                                        m_pView->GetToolController()->AppendsToolInMenu(this, &menu, GNC::GCS::ITool::TSeriesMenu);
+                                        evento.c->pWindow->PopupMenu(&menu, wxPoint(evento.sX, evento.sY));
+                                }
+                        }
+                }
+        }
+        if (m_pRendererActivo != NULL && m_pRendererActivo->EstaModificado()) {
+                Render();
+        }
+}
+
+void GNC::WidgetsManager::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (!m_Enabled) {
+                return;
+        }
+        evento.Skip(true);
+
+        /* Paso de auto-borrado (si lo soporta el widget) */
+        if (evento.GetKeyCode() == WXK_DELETE || evento.GetKeyCode() == WXK_BACK) {
+                GNC::GCS::ListaWidgets lw;
+                for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                        GNC::GCS::Widgets::IWidget* w = (*it);
+
+                        if(!w->EstaOculto() && w->EstaSeleccionado() && w->SoportaAutoBorrado() && (w->GetVID() == -1 || w->GetVID() == evento.c->GetRenderer()->GetVID())) {
+                                lw.push_back(w);
+
+                        }
+                }
+                for (IteradorListaWidgets it = lw.begin(); it != lw.end(); ++it) {
+                        EliminarWidget(*it, true);
+                        Modificado();
+                }
+        } else if (evento.GetKeyCode() == 'r' || evento.GetKeyCode() == 'R') {
+                for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                        GNC::GCS::Widgets::IWidget* w = (*it);
+                        w->Modificar(true);
+                }
+        }
+
+        for (GNC::GCS::ListaBuilders::iterator it = m_pBuilders.begin(); it != m_pBuilders.end(); ++it) {
+                (*it)->OnKeyEvents(evento);
+                if (!evento.GetSkipped()) {
+                        break;
+                }
+        }
+
+        // Primera pasada: widgets toplevel.
+        for (IteradorListaWidgets it = m_Widgets.begin(); evento.GetSkipped() && it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if(!w->EstaOculto() && w->EsTopLevel() && !w->IgnoraEventos() && (w->GetVID() == evento.c->GetRenderer()->GetVID())) {
+                        w->OnKeyEvents(evento);
+                        if (w->EstaModificado()) {
+                                Modificado();
+                                if (w->RequiereNotificarCambios()) {
+                                        w->NotificarCambios(false);
+                                        NotificarModificacion(w);
+                                }
+                        }
+                }
+        }
+        // Segunda pasada: widgets normales.
+        for (IteradorListaWidgets it = m_Widgets.begin(); evento.GetSkipped() && it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if(!w->EstaOculto() && !w->EsTopLevel() && !w->IgnoraEventos() && (w->GetVID() == evento.c->GetRenderer()->GetVID())) {
+                        w->OnKeyEvents(evento);
+                        if (w->EstaModificado()) {
+                                Modificado();
+                                if (w->RequiereNotificarCambios()) {
+                                        w->NotificarCambios(false);
+                                        NotificarModificacion(w);
+                                }
+                        }
+                }
+        }
+
+        if (evento.GetSkipped()) {
+                DefaultKeyEventProcess(evento);
+        }
+        Render();
+}
+
+void GNC::WidgetsManager::DefaultMouseEventProcess(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_Enabled) {
+                return;
+        }
+
+        /* Paso de mostrar menu si procede */
+        if (evento.ButtonUp(GNC::GCS::Events::EventoRaton::EB_DERECHO)) {
+
+                //std::cout << "DerUp! ¿Render?" << std::endl;
+
+                SetCursor(GNC::GCS::Widgets::CUR_MANO_ABIERTA);
+
+                GNC::GCS::ListaWidgets lw;
+
+                for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                        GNC::GCS::Widgets::IWidget* w = (*it);
+                        if(!w->EstaOculto() && w->EstaSeleccionado() && !w->IgnoraEventos() && (w->GetVID() == -1 || w->GetVID() == evento.c->GetRenderer()->GetVID())) {
+                                lw.push_back(w);
+                        }
+                }
+
+                if(lw.size()>0) {
+                        //comprobamos si alguno de los seleccionados valida el hittest
+                        for (IteradorListaWidgets it = lw.begin(); it != lw.end(); ++it) {
+                                GNC::GCS::Widgets::IWidget* w = (*it);
+                                if(w->HitTest(evento.iP.x, evento.iP.y, evento.c->RelacionImagenPantalla())) {
+                                        wxMenu menu;
+                                        if(lw.size() == 1) {
+                                                //se meten las opciones que pueda aportar el widget
+                                                w->GetMenuContextual(&menu, evento.c->pWindow );
+                                                if(menu.GetMenuItemCount()>0) {
+                                                        menu.AppendSeparator();
+                                                }
+                                        }
+                                        GetMenuContextual(&menu);
+                                        //en este caso hay varios seleccionados pues se muestra el menu comun...
+                                        evento.c->pWindow->PopupMenu(&menu,wxPoint(evento.sX, evento.sY));
+                                        bool cursorNotFound = true;
+                                        for (GNC::GCS::ListaBuilders::iterator it = m_pBuilders.begin(); cursorNotFound && it != m_pBuilders.end(); ++it) {
+                                                if ((*it)->GetCursor() != GNC::GCS::Widgets::CUR_INVALIDO) {
+                                                        SetCursor((*it)->GetCursor());
+                                                        cursorNotFound = false;
+                                                }
+                                        }
+                                        if (cursorNotFound) {
+                                                //y si no pues si esta pulsando el derecho es que esta haciendo pan
+                                                SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+                                        }
+                                        ConsumirEvento();
+                                        break;
+                                }
+                        }
+                }
+
+                if(!(EventoConsumido())) {
+                        if(lw.size()>0) {
+                                //se deseleccionan los widgets seleccionados
+                                for (IteradorListaWidgets it = lw.begin(); it != lw.end(); ++it) {
+                                        GNC::GCS::Widgets::IWidget* w = (*it);
+                                        w->Seleccionar(false);
+                                }
+                        }
+                        //hay que buscar si algun widget valida el hittest, en ese caso se selecciona y se muestra el menu
+                        GNC::GCS::Widgets::IWidget* widgetMenu = NULL;
+                        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                                GNC::GCS::Widgets::IWidget* w = (*it);
+                                if(!w->EstaOculto() && !w->IgnoraEventos() && (w->GetVID() == -1 || w->GetVID() == evento.c->GetRenderer()->GetVID()) && w->HitTest(evento.iP.x, evento.iP.y, evento.c->RelacionImagenPantalla())) {
+                                        widgetMenu = w;
+                                        break;
+                                }
+                        }
+                        if(widgetMenu != NULL) {
+                                widgetMenu->Seleccionar(true);
+                                wxMenu menu;
+                                //se meten las opciones que pueda aportar el widget
+                                widgetMenu->GetMenuContextual(&menu, evento.c->pWindow );
+                                if(menu.GetMenuItemCount()>0) {
+                                        menu.AppendSeparator();
+                                }
+
+                                GetMenuContextual(&menu);
+
+                                //en este caso hay varios seleccionados pues se muestra el menu comun...
+                                evento.c->pWindow->PopupMenu(&menu, wxPoint(evento.sX, evento.sY));
+                                ConsumirEvento();
+                        }
+                }
+        } else {
+                evento.Skip(true);
+        }
+}
+
+void GNC::WidgetsManager::DefaultKeyEventProcess(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (!m_Enabled) {
+                return;
+        }
+        evento.Skip(true);
+}
+
+void GNC::WidgetsManager::PropagarHitTestSeleccion(GNC::GCS::Vector* vertices, int numVertices)
+{
+        if (!m_Enabled) {
+                return;
+        }
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if(!w->EstaOculto() && !w->IgnoraEventos() && w->HitTest(vertices, numVertices)) {
+                        w->Seleccionar(true);
+                }
+        }
+}
+
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//region "Interfaz de registro de Renderers"
+
+void GNC::WidgetsManager::SetRendererActivo(GNC::GCS::IWidgetsRenderer* pRenderer)
+{
+        if (m_pRendererActivo != pRenderer) {
+                if (m_pRendererActivo != NULL) {
+                        m_pRendererActivo->Modificar(true);
+                }
+                m_pRendererActivo = pRenderer;
+        }
+}
+
+void GNC::WidgetsManager::InsertarRenderer(GNC::GCS::IWidgetsRenderer* pRenderer)
+{
+        bool notfound = true;
+        for (GNC::GCS::ListaRenderers::iterator it = m_Renderers.begin(); notfound && (it != m_Renderers.end()); ++it) {
+                GNC::GCS::IWidgetsRenderer* renderer = *it;
+
+                if (pRenderer == renderer) {
+                        notfound = false;
+                }
+        }
+        if (notfound == true) {
+                m_Renderers.push_back(pRenderer);
+        }
+
+}
+
+void GNC::WidgetsManager::EliminarRenderer(GNC::GCS::IWidgetsRenderer* pRenderer)
+{
+        bool notfound = true;
+        GNC::GCS::ListaRenderers::iterator itpos = m_Renderers.end();
+        for (GNC::GCS::ListaRenderers::iterator it = m_Renderers.begin(); notfound && (it != m_Renderers.end()); ++it) {
+                GNC::GCS::IWidgetsRenderer* renderer = *it;
+
+                if (pRenderer == renderer) {
+                        if (renderer == m_pRendererActivo) {
+                                m_pRendererActivo = NULL;
+                        }
+                        notfound = false;
+                        itpos = it;
+                }
+        }
+        if (itpos != m_Renderers.end()) {
+                m_Renderers.erase(itpos);
+        }
+        if (m_pRendererActivo == NULL && m_Renderers.size() > 0) {
+                m_pRendererActivo = m_Renderers.front();
+        }
+}
+
+
+
+void GNC::WidgetsManager::LiberarRecursos(GNC::GCS::IWidgetsRenderer* pRenderer)
+{
+        pRenderer->WSetCurrent();
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                (*it)->LiberarRecursos(pRenderer);
+        }
+}
+
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//region "Interfaz de registro de IWidget's"
+
+void GNC::WidgetsManager::InsertarWidget(GNC::GCS::Widgets::IWidget* pWidget, bool propagarEvento)
+{
+        m_Widgets.push_back(pWidget);
+        if (propagarEvento) {
+                NotificarCreacion(pWidget);
+        }
+}
+
+void GNC::WidgetsManager::EliminarWidget(const GNC::GCS::Widgets::IWidget* pWidget, bool propagarEvento)
+{
+        IteradorListaWidgets it;
+
+        for (it = m_Widgets.begin(); it != m_Widgets.end() && (*it) != pWidget; ++it);
+
+        if (it != m_Widgets.end()) {
+                GNC::GCS::Widgets::IWidget* pRemovingWidget = (*it);
+                if (pRemovingWidget != NULL) {
+                        if (propagarEvento) {
+                                NotificarDestruccion(pRemovingWidget);
+                        }
+                        if(pRemovingWidget->ReservaRecursos()) {
+                                for (GNC::GCS::ListaRenderers::iterator itr = m_Renderers.begin(); itr != m_Renderers.end(); ++itr) {
+                                        GNC::GCS::IWidgetsRenderer* pRenderer = *itr;
+                                        pRenderer->WSetCurrent();
+                                        pRemovingWidget->LiberarRecursos(pRenderer);
+                                }
+
+                        }
+                        delete pRemovingWidget;
+                }
+                m_Widgets.erase(it);
+        }
+}
+
+void GNC::WidgetsManager::EliminarWidget(GNC::GCS::IWidgetsManager::IteradorListaWidgets& it, bool propagarEvento)
+{
+        if (it != m_Widgets.end()) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if (propagarEvento) {
+                        NotificarDestruccion(w);
+                }
+                if(w->ReservaRecursos()) {
+                        for (GNC::GCS::ListaRenderers::iterator itr = m_Renderers.begin(); itr != m_Renderers.end(); ++itr) {
+                                GNC::GCS::IWidgetsRenderer* pRenderer = *itr;
+                                pRenderer->WSetCurrent();
+                                w->LiberarRecursos(pRenderer);
+                        }
+                }
+                delete w;
+                m_Widgets.erase(it);
+        }
+}
+
+void GNC::WidgetsManager::RemoveAllWidgetsExceptTID(long tid, bool propagateEvents)
+{
+        GNC::GCS::ListaWidgets lw;
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if (w != NULL && w->GetTID() != tid) {
+                        lw.push_back(w);
+                }
+        }
+        for (IteradorListaWidgets it = lw.begin(); it != lw.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if (propagateEvents) {
+                        NotificarDestruccion(w);
+                }
+                if(w->ReservaRecursos()) {
+                        for (GNC::GCS::ListaRenderers::iterator itr = m_Renderers.begin(); itr != m_Renderers.end(); ++itr) {
+                                GNC::GCS::IWidgetsRenderer* pRenderer = *itr;
+                                pRenderer->WSetCurrent();
+                                w->LiberarRecursos(pRenderer);
+                        }
+                }
+                m_Widgets.remove(w);
+                delete w;
+        }
+}
+
+void GNC::WidgetsManager::RemoveUserAnnotationWidgets(bool propagateEvents)
+{
+        GNC::GCS::ListaWidgets lw;
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if (w != NULL && w->GetTID() == TID_USER_ANNOTATION_WIDGET) {
+                        lw.push_back(w);
+                }
+        }
+        for (IteradorListaWidgets it = lw.begin(); it != lw.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if (propagateEvents) {
+                        NotificarDestruccion(w);
+                }
+                if(w->ReservaRecursos()) {
+                        for (GNC::GCS::ListaRenderers::iterator itr = m_Renderers.begin(); itr != m_Renderers.end(); ++itr) {
+                                GNC::GCS::IWidgetsRenderer* pRenderer = *itr;
+                                pRenderer->WSetCurrent();
+                                w->LiberarRecursos(pRenderer);
+                        }
+                }
+                m_Widgets.remove(w);
+                delete w;
+        }
+}
+
+void GNC::WidgetsManager::EliminarTodosLosWidgets(bool propagarEventos)
+{
+        while (!m_Widgets.empty()) {
+                GNC::GCS::Widgets::IWidget* w = m_Widgets.front();
+                if (propagarEventos) {
+                        NotificarDestruccion(w);
+                }
+                if(w->ReservaRecursos()) {
+                        for (GNC::GCS::ListaRenderers::iterator itr = m_Renderers.begin(); itr != m_Renderers.end(); ++itr) {
+                                GNC::GCS::IWidgetsRenderer* pRenderer = *itr;
+                                pRenderer->WSetCurrent();
+                                w->LiberarRecursos(pRenderer);
+                        }
+                }
+                delete w;
+                m_Widgets.erase(m_Widgets.begin());
+        }
+}
+
+/** Set visible on all widgets matching TID **/
+void GNC::WidgetsManager::SetVisibleByTID(bool visible, long tid)
+{
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if(w->GetTID() == tid) {
+                        if(!visible && w->ReservaRecursos()) {
+                                for (GNC::GCS::ListaRenderers::iterator itr = m_Renderers.begin(); itr != m_Renderers.end(); ++itr) {
+                                        GNC::GCS::IWidgetsRenderer* pRenderer = *itr;
+                                        pRenderer->WSetCurrent();
+                                        w->LiberarRecursos(pRenderer);
+                                }
+                        }
+                        w->Ocultar(!visible);
+                }
+        }
+}
+
+void GNC::WidgetsManager::OcultarTodosLosWidgets(bool ocultar, long GID)
+{
+
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if(w->GetGID() == GID) {
+                        if(ocultar && w->ReservaRecursos()) {
+                                for (GNC::GCS::ListaRenderers::iterator itr = m_Renderers.begin(); itr != m_Renderers.end(); ++itr) {
+                                        GNC::GCS::IWidgetsRenderer* pRenderer = *itr;
+                                        pRenderer->WSetCurrent();
+                                        w->LiberarRecursos(pRenderer);
+                                }
+                        }
+                        w->Ocultar(ocultar);
+                }
+        }
+}
+
+void GNC::WidgetsManager::EliminarTodosLosWidgets(long GID)
+{
+        GNC::GCS::ListaWidgets listaEliminados;
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+                if(w->GetGID() == GID) {
+                        listaEliminados.push_back(w);
+                }
+        }
+        for(IteradorListaWidgets it = listaEliminados.begin(); it!= listaEliminados.end(); ++it) {
+                EliminarWidget((*it));
+        }
+}
+
+void GNC::WidgetsManager::OcultarWidgetsDeSubVista(bool /*ocultar*/, long /*vid*/)
+{
+        /*
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+        	GNC::GCS::Widgets::IWidget* w = *it;
+        	if(w->GetVID() == vid){
+        		if( w->EstaOculto() != ocultar ) {
+        			if (ocultar && w->ReservaRecursos()) {
+        				for (ListaRenderers::iterator itr = m_Renderers.begin(); itr != m_Renderers.end(); ++itr)
+        				{
+        					GNC::GCS::IWidgetsRenderer* pRenderer = *itr;
+        					pRenderer->WSetCurrent();
+        					w->LiberarRecursos(pRenderer);
+        				}
+        			}
+        			w->Ocultar(ocultar);
+        			Modificado();
+        		}
+        	}
+        }
+         */
+}
+
+GNC::GCS::ListaWidgets& GNC::WidgetsManager::GetListaWidgets()
+{
+        return m_Widgets;
+}
+
+void GNC::WidgetsManager::GetListaWidgetsSubVista(long vid, GNC::GCS::ListaWidgets& lista)
+{
+        for(GNC::GCS::IWidgetsManager::IteradorListaWidgets it = m_Widgets.begin(); it!= m_Widgets.end(); ++it) {
+                if((*it)->GetVID() == vid) {
+                        lista.push_back((*it));
+                }
+        }
+}
+
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//endregion "Interfaz de Observadores"
+
+void GNC::WidgetsManager::NotificarCreacion(GNC::GCS::Widgets::IWidget* pWidget)
+{
+
+        for (IteradorListaObservadores it = m_Observadores.begin(); it != m_Observadores.end(); ++it) {
+                GNC::GCS::Widgets::IObservadorWidget* pObservador = *it;
+                //TODO hasta que no se adapten los observadores de las herramientas no se pondra esta linea que es la buena
+                //if ((pObservador->VID == -1 || pObservador->VID == m_pRendererActivo->GetVID())&& pObservador->GID == pWidget->GetGID()) {
+                if (pObservador->GID == pWidget->GetGID()) {
+                        //
+                        pObservador->OnWidgetCreado(pWidget);
+                }
+        }
+}
+
+void GNC::WidgetsManager::NotificarDestruccion(GNC::GCS::Widgets::IWidget* pWidget)
+{
+
+        for (IteradorListaObservadores it = m_Observadores.begin(); it != m_Observadores.end(); ++it) {
+                GNC::GCS::Widgets::IObservadorWidget* pObservador = *it;
+                //TODO hasta que no se adapten los observadores de las herramientas no se pondra esta linea que es la buena
+                //if ((pObservador->VID == -1 || pObservador->VID == m_pRendererActivo->GetVID())&& pObservador->GID == pWidget->GetGID()) {
+                if (pObservador->GID == pWidget->GetGID()) {
+                        //
+                        pObservador->OnWidgetDestruido(pWidget);
+                }
+        }
+}
+
+void GNC::WidgetsManager::NotificarModificacion(GNC::GCS::Widgets::IWidget* pWidget)
+{
+
+        for (IteradorListaObservadores it = m_Observadores.begin(); it != m_Observadores.end(); ++it) {
+                GNC::GCS::Widgets::IObservadorWidget* pObservador = *it;
+                //TODO hasta que no se adapten los observadores de las herramientas no se pondra esta linea que es la buena
+                //if ((pObservador->VID == -1 || pObservador->VID == m_pRendererActivo->GetVID())&& pObservador->GID == pWidget->GetGID()) {
+                if (pObservador->GID == pWidget->GetGID()) {
+                        //
+                        pObservador->OnWidgetModificado(pWidget);
+                }
+        }
+}
+
+//endregion
+
+//----------------------------------------------------------------------------------------------------
+//region "Interfaz general"
+
+void GNC::WidgetsManager::SetAnnotator(const GNC::GCS::Ptr<GNC::GCS::IAnnotator>& pAnnotador)
+{
+        m_pAnnotator = pAnnotador;
+        Modificado();
+        Render();
+}
+
+const GNC::GCS::Ptr<GNC::GCS::IAnnotator>& GNC::WidgetsManager::GetAnnotator()
+{
+        return m_pAnnotator;
+}
+
+void GNC::WidgetsManager::ShowAnnotations(bool show)
+{
+        //buscamos los widgets anotadores y los establecemos el modo
+        for( GNC::GCS::ListaWidgets::iterator it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = *it;
+                if (w->GetVID() == -1 && w->GetGID() == -1) {
+                        GNC::GCS::Widgets::WAnotador* pAnotador = dynamic_cast<GNC::GCS::Widgets::WAnotador*> (w);
+                        if (pAnotador != NULL) {
+                                pAnotador->Ocultar(!show);
+                        } else {
+                                GNC::GCS::Widgets::WStaticRule* pStaticRule = dynamic_cast<GNC::GCS::Widgets::WStaticRule*> (w);
+                                if (pStaticRule != NULL) {
+                                        pStaticRule->Ocultar(!show);
+                                }
+                        }
+                }
+        }
+}
+
+bool GNC::WidgetsManager::IsShownAnnotations()
+{
+        for( GNC::GCS::ListaWidgets::iterator it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = *it;
+                if (w->GetVID() == -1 && w->GetGID() == -1) {
+                        GNC::GCS::Widgets::WAnotador* pAnotador = dynamic_cast<GNC::GCS::Widgets::WAnotador*> (w);
+                        if (pAnotador != NULL) {
+                                return !pAnotador->EstaOculto();
+                        }
+                }
+        }
+        return false;
+}
+//enderegion
+
+//----------------------------------------------------------------------------------------------------
+//region "Interfaz de acceso al sistema de eventos ginkgo"
+
+void GNC::WidgetsManager::LanzarEventoCreacion(GNC::GCS::Widgets::IWidget* w)
+{
+        GNC::Entorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionWidget(m_pView,GNC::GCS::Events::EventoModificacionWidget::WidgetCreado, w));
+}
+
+void GNC::WidgetsManager::LanzarEventoModificacion(GNC::GCS::Widgets::IWidget* w)
+{
+        GNC::Entorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionWidget(m_pView,GNC::GCS::Events::EventoModificacionWidget::WidgetModificado, w));
+}
+
+void GNC::WidgetsManager::LanzarEventoDestruccion(GNC::GCS::Widgets::IWidget* w)
+{
+        GNC::Entorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionWidget(m_pView,GNC::GCS::Events::EventoModificacionWidget::WidgetDestruido, w));
+}
+
+void GNC::WidgetsManager::ProcesarEvento(GNC::GCS::Events::IEvent* /*evt*/)
+{
+
+}
+
+//endregion
+
+void GNC::WidgetsManager::OnClickEnPropiedades(wxCommandEvent& )
+{
+        //eliminamos los widgets seleccionados que soporten autoborrar
+        GNC::GCS::ListaWidgets lw;
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+
+                if(!w->EstaOculto() && w->EstaSeleccionado()) {
+                        lw.push_back(w);
+                }
+        }
+        for (IteradorListaWidgets it = lw.begin(); it != lw.end(); ++it) {
+                //mostrar propiedades de los widgets
+                (*it)->MostrarPropiedades(GNC::Entorno::Instance()->GetVentanaRaiz());
+        }
+}
+
+void GNC::WidgetsManager::OnClickEnEliminar(wxCommandEvent& )
+{
+        //eliminamos los widgets seleccionados que soporten autoborrar
+        GNC::GCS::ListaWidgets lw;
+        for (IteradorListaWidgets it = m_Widgets.begin(); it != m_Widgets.end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = (*it);
+
+                if(!w->EstaOculto() && w->EstaSeleccionado() && w->SoportaAutoBorrado() ) {
+                        lw.push_back(w);
+
+                }
+        }
+        for (IteradorListaWidgets it = lw.begin(); it != lw.end(); ++it) {
+                EliminarWidget(*it, true);
+                Modificado();
+        }
+}
+
+bool GNC::WidgetsManager::GetMenuContextual(wxMenu* menuContextual) const
+{
+        if (!m_Enabled) {
+                return false;
+        }
+        wxMenuItem* pMenuEliminar = new wxMenuItem(menuContextual, -1, _("Delete"), _("Delete Widget"), wxITEM_NORMAL );
+        menuContextual->Connect(pMenuEliminar->GetId(),(int)wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(WidgetsManager::OnClickEnEliminar),NULL,(wxEvtHandler*)this);
+#ifdef __WXMSW__
+        pMenuEliminar->SetBitmaps( GinkgoResourcesManager::MenuIcons::GetIcoEliminarWidget());
+#else
+        pMenuEliminar->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoEliminarWidget());
+#endif
+        menuContextual->Append(pMenuEliminar);
+
+        menuContextual->AppendSeparator();
+
+        wxMenuItem* pMenuPropiedades = new wxMenuItem(menuContextual, -1, _("Properties ..."), _("Widget Properties"), wxITEM_NORMAL );
+        menuContextual->Connect(pMenuPropiedades->GetId(),(int)wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler(WidgetsManager::OnClickEnPropiedades),NULL,(wxEvtHandler*)this);
+        menuContextual->Append(pMenuPropiedades);
+        return true;
+}
+
+void GNC::WidgetsManager::SetCursor(GNC::GCS::Widgets::TipoCursor cursor)
+{
+        if(m_cursor != cursor) {
+                for (GNC::GCS::ListaRenderers::iterator itr = m_Renderers.begin(); itr != m_Renderers.end(); ++itr) {
+                        switch (cursor) {
+                        case GNC::GCS::Widgets::CUR_TRANSPARENTE:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorTransparente()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_LUPA:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorLupa()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_SELECCION:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorSeleccionar()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_FLECHA:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(wxCURSOR_ARROW));
+                                break;
+                        case GNC::GCS::Widgets::CUR_MANO_ABIERTA:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorManoAbierta()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_MANO_CERRADA:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorManoCerrada()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_CREAR_LINEA:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorCrearLinea()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_CREAR_ANGULO_COBB:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorCrearAnguloCobb()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_CREAR_ANGULO_NORMAL:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorCrearAnguloNormal()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_CREAR_ANOTACION:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorCrearAnotacion()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_CREAR_ELIPSE:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorCrearElipse()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_CREAR_PUNTO:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorCrearPunto()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_CREAR_POLIGONO:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorCrearPoligono()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_CREAR_RECTANGULO:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorCrearRectangulo()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_WINDOW_LEVEL:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorWindowLevel()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_ANCLA_SIMPLE:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorAnclaSimple()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_ANCLA_COMPUESTA:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetCursorAnclaCompuesta()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_ROTATION:
+                                (*itr)->m_c->pWindow->SetCursor(wxCursor(GinkgoResourcesManager::Cursors::GetRotationCursor()));
+                                break;
+                        case GNC::GCS::Widgets::CUR_INVALIDO:
+                                break;
+                        }
+                }
+                m_cursor = cursor;
+        }
+}
diff --git a/cadxcore/main/managers/widgetsmanager.h b/cadxcore/main/managers/widgetsmanager.h
new file mode 100644
index 0000000..6bf555b
--- /dev/null
+++ b/cadxcore/main/managers/widgetsmanager.h
@@ -0,0 +1,194 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+
+#include <wx/event.h>
+
+#include <api/iwidgets.h>
+#include <api/iwidgetsmanager.h>
+#include <api/observers/iwidgetsobserver.h>
+#include <api/observers/ieventsobserver.h>
+#include <api/controllers/ieventscontroller.h>
+
+//----------------------------------------------------------------------------------------------------
+//Forward Declarations
+
+namespace GNC
+{
+namespace GCS
+{
+class IWidgetsRenderer;
+}
+}
+class TimerAnimation;
+class wxMenu;
+
+//End Forward Declarations
+
+namespace GNC
+{
+class WidgetsManager : public wxEvtHandler, public GNC::GCS::IWidgetsManager, public GNC::GCS::IEventsObserver
+{
+
+public:
+        WidgetsManager(GNC::GCS::IVista* pVista);
+        virtual ~WidgetsManager();
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz especifica"
+
+        virtual void RenderPrivate(GNC::GCS::Contexto3D* c);
+
+        virtual void TickAnimation(double freq);
+
+        virtual void EnableAnimation();
+
+        virtual void DisableAnimation();
+
+        virtual void Render();
+
+        virtual void OffScreenRender(GNC::GCS::Contexto3D* c);
+
+        virtual void Modificado();
+
+        virtual void ModificadoPorWidget(GNC::GCS::Widgets::IWidget* w);
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton& evento);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento);
+
+        virtual void DefaultMouseEventProcess(GNC::GCS::Events::EventoRaton& evento);
+
+        virtual void DefaultKeyEventProcess(GNC::GCS::Events::EventoTeclado& event);
+
+        // Propaga a todos los widgets no ocultos un hit test de seleccion. Los widgets se seleccionan si validan un hittest con el bounding box especificado.
+        virtual void PropagarHitTestSeleccion(GNC::GCS::Vector* vertices, int numVertices);
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de registro de Renderers"
+
+public:
+
+        virtual void SetRendererActivo(GNC::GCS::IWidgetsRenderer* pRenderer);
+
+        virtual void InsertarRenderer(GNC::GCS::IWidgetsRenderer* pRenderer);
+
+        virtual void EliminarRenderer(GNC::GCS::IWidgetsRenderer* pRenderer);
+
+        virtual void LiberarRecursos(GNC::GCS::IWidgetsRenderer* pRenderer);
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de registro de IWidget's"
+
+        virtual void InsertarWidget(GNC::GCS::Widgets::IWidget* pWidget, bool propagarEvento=true);
+
+        virtual void EliminarWidget(const GNC::GCS::Widgets::IWidget* pWidget, bool propagarEvento=true);
+
+        /** Remove all widgets except anyone with this tid **/
+        virtual void RemoveAllWidgetsExceptTID(long tid, bool propagateEvents=true);
+
+        virtual void RemoveUserAnnotationWidgets(bool propagateEvents = true);
+
+        virtual void EliminarWidget(GNC::GCS::IWidgetsManager::IteradorListaWidgets& it, bool propagarEvento=true);
+
+        virtual void EliminarTodosLosWidgets(bool propagarEventos=true);
+
+        /** Set visible on all widgets matching TID **/
+        virtual void SetVisibleByTID(bool visible, long tid);
+
+        virtual void OcultarTodosLosWidgets(bool ocultar, long GID);
+
+        virtual void EliminarTodosLosWidgets(long GID);
+
+        virtual void OcultarWidgetsDeSubVista(bool ocultar, long vid);
+
+        virtual GNC::GCS::ListaWidgets& GetListaWidgets();
+
+        virtual void GetListaWidgetsSubVista(long vid, GNC::GCS::ListaWidgets& lista);
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //endregion "Interfaz de Observadores"
+
+        virtual void NotificarCreacion(GNC::GCS::Widgets::IWidget* pWidget);
+
+        virtual void NotificarDestruccion(GNC::GCS::Widgets::IWidget* pWidget);
+
+        virtual void NotificarModificacion(GNC::GCS::Widgets::IWidget* pWidget);
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz annotation"
+
+        virtual void SetAnnotator(const GNC::GCS::Ptr<GNC::GCS::IAnnotator>& pAnnotador);
+        virtual const GNC::GCS::Ptr<GNC::GCS::IAnnotator>& GetAnnotator();
+        virtual void ShowAnnotations(bool show);
+        virtual bool IsShownAnnotations();
+
+        //enderegion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de acceso al sistema de eventos ginkgo"
+
+        virtual void LanzarEventoCreacion(GNC::GCS::Widgets::IWidget* w);
+        virtual void LanzarEventoModificacion(GNC::GCS::Widgets::IWidget* w);
+        virtual void LanzarEventoDestruccion(GNC::GCS::Widgets::IWidget* w);
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Gestion propia de WX"
+
+        virtual void OnClickEnEliminar(wxCommandEvent& );
+
+        virtual void OnClickEnPropiedades(wxCommandEvent& );
+
+        virtual bool GetMenuContextual(wxMenu* menuContextual) const;
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Cursores
+        virtual void SetCursor(GNC::GCS::Widgets::TipoCursor cursor);
+        //endregion
+
+        bool m_mouseDerechoDown;
+        bool m_mouseIzquierdoDown;
+        bool m_middleDown;
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Helpers"
+private:
+        inline void ModificarRenderersDeWidget(GNC::GCS::Widgets::IWidget* w);
+        TimerAnimation* m_pTimerAnimation;
+        GNC::GCS::Ptr<GNC::GCS::IAnnotator> m_pAnnotator;
+        //endregion
+};
+}
diff --git a/cadxcore/main/tools/addfiletohistorytool.cpp b/cadxcore/main/tools/addfiletohistorytool.cpp
new file mode 100644
index 0000000..13f84cc
--- /dev/null
+++ b/cadxcore/main/tools/addfiletohistorytool.cpp
@@ -0,0 +1,162 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "addfiletohistorytool.h"
+#include <export/contracts/iviewcontract.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/gui/open/abrir.h>
+#include <commands/openremovableunit.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/gui/ginkgocloud/openginkgoclouddialog.h>
+
+
+
+#define OPEN_FILE  1866
+#define OPEN_FOLDER  1867
+#define OPEN_REMOVABLE  1868
+#define OPEN_GINKGO_CLOUD  1869
+
+namespace GNC
+{
+namespace GUI
+{
+class wxEventHandlerOpenStudy : public wxEvtHandler
+{
+public:
+        wxEventHandlerOpenStudy(wxEvtHandler* pParent, GNC::AddFileToHistory* pHerramienta):wxEvtHandler()
+        {
+                m_pEvtParent = pParent;
+                m_pHerramienta=pHerramienta;
+
+                m_pEvtParent->Connect(OPEN_FILE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerOpenStudy::OnOpenFile),NULL,this);
+                m_pEvtParent->Connect(OPEN_FOLDER, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerOpenStudy::OnOpenFolder),NULL,this);
+                m_pEvtParent->Connect(OPEN_REMOVABLE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerOpenStudy::OnOpenRemovable),NULL,this);
+                m_pEvtParent->Connect(OPEN_GINKGO_CLOUD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerOpenStudy::OnOpenGinkgoCloud),NULL,this);
+        }
+
+        ~wxEventHandlerOpenStudy()
+        {
+
+                m_pEvtParent->Disconnect(OPEN_FILE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerOpenStudy::OnOpenFile),NULL,this);
+                m_pEvtParent->Disconnect(OPEN_FOLDER, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerOpenStudy::OnOpenFolder),NULL,this);
+                m_pEvtParent->Disconnect(OPEN_REMOVABLE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerOpenStudy::OnOpenRemovable),NULL,this);
+                m_pEvtParent->Disconnect(OPEN_GINKGO_CLOUD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerOpenStudy::OnOpenGinkgoCloud),NULL,this);
+                m_pEvtParent = NULL;
+                m_pHerramienta = NULL;
+        }
+
+        void OnOpenFile( wxCommandEvent& event )
+        {
+                m_pHerramienta->OpenFile();
+                event.Skip(false);
+        }
+
+        void OnOpenFolder( wxCommandEvent& event )
+        {
+                m_pHerramienta->OpenFolder();
+                event.Skip(false);
+        }
+
+        void OnOpenRemovable( wxCommandEvent& event )
+        {
+                m_pHerramienta->OpenRemovable();
+                event.Skip(false);
+        }
+
+        void OnOpenGinkgoCloud( wxCommandEvent& event )
+        {
+                m_pHerramienta->OpenGinkgoCloud();
+                event.Skip(false);
+        }
+
+        GNC::AddFileToHistory* m_pHerramienta;
+        wxEvtHandler* m_pEvtParent;
+};
+}
+}
+
+GNC::GCS::ITool* GNC::AddFileToHistory::NewTool()
+{
+        return new GNC::AddFileToHistory();
+}
+
+GNC::AddFileToHistory::AddFileToHistory()
+{
+        Enable(GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire"));
+}
+GNC::AddFileToHistory::~AddFileToHistory()
+{
+}
+
+bool GNC::AddFileToHistory::ExecuteAction()
+{
+        return false;
+}
+
+bool GNC::AddFileToHistory::HasDropDownMenu()
+{
+        return true;
+}
+
+void GNC::AddFileToHistory::AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (pMenu->GetMenuItemCount() > 0 && !pMenu->GetMenuItems().back()->IsSeparator()) {
+                pMenu->AppendSeparator();
+        }
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, OPEN_FILE, wxString(_("Open file")) + wxT(" \tAlt+f"), GinkgoResourcesManager::MenuIcons::GetIcoOpenFile(), new GNC::GUI::wxEventHandlerOpenStudy( pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, OPEN_FOLDER, wxString(_("Open folder")) + wxT(" \tAlt+d"), GinkgoResourcesManager::MenuIcons::GetIcoOpenDir(), new GNC::GUI::wxEventHandlerOpenStudy( pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, OPEN_REMOVABLE, _("Open removable unit"), GinkgoResourcesManager::MenuIcons::GetIcoRemovableUnit(), new GNC::GUI::wxEventHandlerOpenStudy( pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, OPEN_GINKGO_CLOUD, _("Open Ginkgo Cloud link"), GinkgoResourcesManager::ToolIcons::GetIcoDownloadCloud(), new GNC::GUI::wxEventHandlerOpenStudy( pParent, this)));
+}
+
+void GNC::AddFileToHistory::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                AppendDropDownMenu(pParent, pMenu);
+        }
+}
+
+void GNC::AddFileToHistory::OpenFile()
+{
+        GNC::GUI::Abrir::AbrirFichero(ViewContract->GetView()->GetWindow());
+
+}
+
+void GNC::AddFileToHistory::OpenFolder()
+{
+        GNC::GUI::Abrir::AbrirDirectorio(ViewContract->GetView()->GetWindow());
+}
+
+void GNC::AddFileToHistory::OpenRemovable()
+{
+        GADAPI::OpenRemovableUnitCommandParams* pParams = new GADAPI::OpenRemovableUnitCommandParams(ViewContract->GetView()->GetWindow());
+        GADAPI::OpenRemovableUnitCommand* pCmd = new GADAPI::OpenRemovableUnitCommand(pParams);
+        GNC::GCS::ICommandController::Instance()->ProcessAsync("Listing units...", pCmd, NULL);
+}
+
+void GNC::AddFileToHistory::OpenGinkgoCloud()
+{
+        GNC::GUI::OpenGinkgoCloudDialog* dlg = new GNC::GUI::OpenGinkgoCloudDialog(ViewContract->GetView()->GetWindow());
+        dlg->Show();
+        dlg->Raise();
+}
diff --git a/cadxcore/main/tools/addfiletohistorytool.h b/cadxcore/main/tools/addfiletohistorytool.h
new file mode 100644
index 0000000..70776d0
--- /dev/null
+++ b/cadxcore/main/tools/addfiletohistorytool.h
@@ -0,0 +1,50 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <export/tools/iaddfiletohistorytool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+
+class EXTAPI AddFileToHistory : public GNC::GCS::IAddFileToHistory
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        AddFileToHistory();
+        ~AddFileToHistory();
+
+        virtual bool HasDropDownMenu();
+        void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual void OpenFile();
+        virtual void OpenFolder();
+        virtual void OpenRemovable();
+        virtual void OpenGinkgoCloud();
+
+protected:
+
+};
+}
diff --git a/cadxcore/main/tools/angletool.cpp b/cadxcore/main/tools/angletool.cpp
new file mode 100644
index 0000000..15bec89
--- /dev/null
+++ b/cadxcore/main/tools/angletool.cpp
@@ -0,0 +1,171 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/menu.h>
+
+#include "angletool.h"
+#if defined(ENABLE_ANGLETOOL)
+
+#include <api/iwidgetsmanager.h>
+#include <api/internationalization/internationalization.h>
+#include <export/contracts/iwidgetscontract.h>
+#include <eventos/toolevents.h>
+#include <api/controllers/ieventscontroller.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+
+#include <widgets/wangulo.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <iostream>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+
+#define TIPO_NORMAL 1211
+#define TIPO_COBB   1212
+
+namespace GNC
+{
+namespace GUI
+{
+class EventHandlerAngleTools: public wxEvtHandler
+{
+public:
+        EventHandlerAngleTools(wxEvtHandler* pParent, GNC::AngleTool* pHerramienta):wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pHerramienta=pHerramienta;
+                // Connect Events
+                m_pParent->Connect(TIPO_NORMAL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerAngleTools::OnTipoAnguloNormalClick),NULL,this);
+                m_pParent->Connect(TIPO_COBB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerAngleTools::OnTipoAnguloCobbClick),NULL,this);
+        }
+
+        ~EventHandlerAngleTools()
+        {
+                m_pParent->Disconnect(TIPO_NORMAL, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerAngleTools::OnTipoAnguloNormalClick),NULL,this);
+                m_pParent->Disconnect(TIPO_COBB, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerAngleTools::OnTipoAnguloCobbClick),NULL,this);
+        }
+
+        virtual void OnTipoAnguloNormalClick(wxCommandEvent& event)
+        {
+                m_pHerramienta->SetTipo(GNC::AngleTool::TA_Normal);
+                event.Skip(false);
+        }
+
+        virtual void OnTipoAnguloCobbClick(wxCommandEvent& event)
+        {
+                m_pHerramienta->SetTipo(GNC::AngleTool::TA_Cobb);
+                event.Skip(false);
+        }
+
+        GNC::AngleTool* m_pHerramienta;
+        wxEvtHandler* m_pParent;
+};
+}
+}
+
+
+GNC::AngleTool::AngleTool()
+{
+        m_TipoAngulo = TA_Normal;
+        m_pAnguloBuilder = NULL;
+}
+
+GNC::AngleTool::~AngleTool()
+{
+        if (m_pAnguloBuilder != NULL) {
+                delete m_pAnguloBuilder;
+                m_pAnguloBuilder = NULL;
+        }
+}
+
+//------------------------------------------------------------------------------
+//region "ITool/IContract realization"
+
+GNC::GCS::ITool* GNC::AngleTool::NewTool()
+{
+        return new GNC::AngleTool();
+}
+
+
+void GNC::AngleTool::Connect()
+{
+        if (m_pAnguloBuilder != NULL) {
+                delete m_pAnguloBuilder;
+                m_pAnguloBuilder = NULL;
+        }
+        m_pAnguloBuilder = new GNC::GCS::Widgets::WAnguloBuilder(WidgetsContract->GetManager(), GetTriggerButton());
+        if (m_TipoAngulo == TA_Normal) {
+                m_pAnguloBuilder->SetModo(GNC::GCS::Widgets::MA_Normal);
+        } else {
+                m_pAnguloBuilder->SetModo(GNC::GCS::Widgets::MA_Cobb);
+        }
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(m_pAnguloBuilder->GetCursor());
+}
+
+void GNC::AngleTool::Disconnect()
+{
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        if (m_pAnguloBuilder != NULL) {
+                delete m_pAnguloBuilder;
+                m_pAnguloBuilder = NULL;
+        }
+}
+
+bool GNC::AngleTool::HasDropDownMenu()
+{
+        return true;
+}
+
+void GNC::AngleTool::AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, TIPO_NORMAL,_("Normal Angle (3 points)"), GinkgoResourcesManager::AngleBar::GetIcoAnguloNormal(), new GNC::GUI::EventHandlerAngleTools(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, TIPO_COBB,_("Cobb Angle (2 straight lines)"), GinkgoResourcesManager::AngleBar::GetIcoAnguloCobb(), new GNC::GUI::EventHandlerAngleTools(pParent, this)));
+}
+
+
+void GNC::AngleTool::SetTipo(TipoAngulo tipo)
+{
+        if (m_TipoAngulo != tipo) {
+                m_TipoAngulo = tipo;
+
+                wxBitmap icon;
+                if (m_TipoAngulo == TA_Normal) {
+                        if (m_pAnguloBuilder != NULL) {
+                                m_pAnguloBuilder->SetModo(GNC::GCS::Widgets::MA_Normal);
+                        }
+                        icon = GinkgoResourcesManager::AngleBar::GetIcoAnguloNormal();
+                } else {
+                        if (m_pAnguloBuilder != NULL) {
+                                m_pAnguloBuilder->SetModo(GNC::GCS::Widgets::MA_Cobb);
+                        }
+                        icon = GinkgoResourcesManager::AngleBar::GetIcoAnguloCobb();
+                }
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ChangeToolIconEvent(&icon, this, m_pParent));
+        }
+}
+
+//endregion
+
+#endif
diff --git a/cadxcore/main/tools/angletool.h b/cadxcore/main/tools/angletool.h
new file mode 100644
index 0000000..77366e4
--- /dev/null
+++ b/cadxcore/main/tools/angletool.h
@@ -0,0 +1,70 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "enabled_tools.h"
+#if defined(ENABLE_ANGLETOOL)
+#ifndef ANGLETOOL_H
+#define ANGLETOOL_H
+#include <api/api.h>
+#include <export/tools/iangletool.h>
+
+namespace GNC
+{
+
+namespace GCS
+{
+namespace Widgets
+{
+class WAnguloBuilder;
+}
+}
+
+class EXTAPI AngleTool : public GNC::GCS::IAngleTool
+{
+public:
+
+        typedef enum TipoAngulo {
+                TA_Normal,
+                TA_Cobb
+        } TipoAngulo;
+
+        AngleTool();
+        ~AngleTool();
+//------------------------------------------------------------------------------
+//region "ITool/IContract realization"
+
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+
+        virtual bool HasDropDownMenu();
+        void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+        void SetTipo(TipoAngulo tipo);
+//endregion
+
+protected:
+        GNC::GCS::Widgets::WAnguloBuilder* m_pAnguloBuilder;
+        TipoAngulo                         m_TipoAngulo;
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/anonymizetool.cpp b/cadxcore/main/tools/anonymizetool.cpp
new file mode 100644
index 0000000..e7f6a2c
--- /dev/null
+++ b/cadxcore/main/tools/anonymizetool.cpp
@@ -0,0 +1,67 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/msgdlg.h>
+#include "anonymizetool.h"
+
+#if defined(ENABLE_ANONYMIZETOOL)
+
+#include <main/gui/anonymize/anonymizedialog.h>
+#include <main/gui/history3/synchronizedialog.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+
+//----------------------------------------------------------------------
+
+GNC::AnonymizeTool::AnonymizeTool(): GNC::GCS::IHistoryTool(ID,GNC::GCS::IHistoryTool::TFamily_Anonymize, _Std("Anonymize"), _Std("Anonymize"), GinkgoResourcesManager::ToolIcons::GetIcoAnonymize())
+{
+}
+
+GNC::AnonymizeTool::~AnonymizeTool()
+{
+}
+
+void GNC::AnonymizeTool::Execute()
+{
+        GNC::GCS::IHistoryPanel* pHistory = GNC::HistoryToolsController::Instance()->GetHistoryPanel();
+        std::list<long> listOfPks;
+        pHistory->GetSelectedSeriesPk(listOfPks);
+        Execute (listOfPks);
+}
+
+void GNC::AnonymizeTool::Execute(const std::list<long>& seriesPk)
+{
+        GNC::GCS::IHistoryPanel* pHistory = GNC::HistoryToolsController::Instance()->GetHistoryPanel();
+        if (seriesPk.empty()) {
+                wxMessageBox(_("Select at least one series"), _("Info"), wxICON_INFORMATION, pHistory->GetWxWindow());
+                return;
+        }
+
+        if (!AreSeriesFullyDownloaded(seriesPk)) {
+                GNC::GUI::SynchronizeDialog dlg(pHistory->GetWxWindow(), seriesPk, this);
+                dlg.ShowModal();
+        } else {
+                GNC::GUI::AnonymizeDialog dlg(pHistory->GetWxWindow(), seriesPk);
+                dlg.ShowModal();
+        }
+
+}
+
+#endif
diff --git a/cadxcore/main/tools/anonymizetool.h b/cadxcore/main/tools/anonymizetool.h
new file mode 100644
index 0000000..453b569
--- /dev/null
+++ b/cadxcore/main/tools/anonymizetool.h
@@ -0,0 +1,43 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#if defined(ENABLE_ANONYMIZETOOL)
+#ifndef ANONYMIZETOOL_H
+#define ANONYMIZETOOL_H
+#include <export/tools/iherramientascore.h>
+#include <api/ihistorytool.h>
+
+namespace GNC
+{
+
+class AnonymizeTool : public GNC::GCS::IHistoryTool
+{
+public:
+        static const GNC::GCS::IHistoryTool::UID ID =  HCore_Anonymize;
+        AnonymizeTool();
+        virtual ~AnonymizeTool();
+
+        virtual void Execute();
+        virtual void Execute(const std::list<long>& seriesPk);
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/brightnesscontrasttool.cpp b/cadxcore/main/tools/brightnesscontrasttool.cpp
new file mode 100644
index 0000000..2f98f31
--- /dev/null
+++ b/cadxcore/main/tools/brightnesscontrasttool.cpp
@@ -0,0 +1,76 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "brightnesscontrasttool.h"
+#if defined(ENABLE_BRIGHTNESSCONTRASTTOOL)
+
+#include <api/globals.h>
+#include <export/contracts/iwidgetscontract.h>
+#include <api/iwidgetsmanager.h>
+#include <widgets/wbrightnesscontrast.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+
+GNC::BrightnessContrastTool::BrightnessContrastTool() : m_pBuilder(NULL)
+{
+        m_pBuilder = NULL;
+}
+
+GNC::BrightnessContrastTool::~BrightnessContrastTool()
+{
+
+}
+
+//------------------------------------------------------------------------------
+//region "ITool/IContract realization"
+
+GNC::GCS::ITool* GNC::BrightnessContrastTool::NewTool()
+{
+        return new GNC::BrightnessContrastTool();
+}
+
+void GNC::BrightnessContrastTool::Connect()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+
+        m_pBuilder = new GNC::GCS::Widgets::WBrightnessContrastBuilder(WidgetsContract->GetManager(), GetTriggerButton(), (unsigned long) this);
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(m_pBuilder->GetCursor());
+}
+
+void GNC::BrightnessContrastTool::Disconnect()
+{
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        if (m_pBuilder != NULL) {
+                // DesSubscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
+
+//endregion
+#endif
diff --git a/cadxcore/main/tools/brightnesscontrasttool.h b/cadxcore/main/tools/brightnesscontrasttool.h
new file mode 100644
index 0000000..d9cfd83
--- /dev/null
+++ b/cadxcore/main/tools/brightnesscontrasttool.h
@@ -0,0 +1,58 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_MARKERTOOL)
+#ifndef BRIGHTNESSCONTRASTOOL_H
+#define BRIGHTNESSCONTRASTOOL_H
+#include <api/api.h>
+#include <export/tools/ibrightnesscontrasttool.h>
+
+namespace GNC
+{
+
+namespace GCS
+{
+namespace Widgets
+{
+class IWidgetBuilder;
+}
+}
+
+class EXTAPI BrightnessContrastTool : public GNC::GCS::IBrightnessContrastTool
+{
+public:
+
+        BrightnessContrastTool();
+        ~BrightnessContrastTool();
+
+//region "ITool/IContract realization"
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+//endregion
+
+protected:
+        GNC::GCS::Widgets::IWidgetBuilder*                 m_pBuilder;
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/camerarotationtool.cpp b/cadxcore/main/tools/camerarotationtool.cpp
new file mode 100644
index 0000000..1cbe868
--- /dev/null
+++ b/cadxcore/main/tools/camerarotationtool.cpp
@@ -0,0 +1,78 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "camerarotationtool.h"
+
+
+#include <export/contracts/iwidgetscontract.h>
+
+#include <api/globals.h>
+#include <api/iwidgetsmanager.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <widgets/wcamerarotation.h>
+
+#include <iostream>
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
+
+
+GNC::CameraRotationTool::CameraRotationTool()
+{
+        m_pBuilder = NULL;
+}
+
+GNC::CameraRotationTool::~CameraRotationTool()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
+
+GNC::GCS::ITool* GNC::CameraRotationTool::NewTool()
+{
+        return new GNC::CameraRotationTool();
+}
+
+void GNC::CameraRotationTool::Connect()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+        m_pBuilder = new TBuilder(WidgetsContract->GetManager(), GetTriggerButton(), (unsigned long)this);
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(m_pBuilder->GetCursor());
+}
+
+void GNC::CameraRotationTool::Disconnect()
+{
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        // DesSubscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
diff --git a/cadxcore/main/tools/camerarotationtool.h b/cadxcore/main/tools/camerarotationtool.h
new file mode 100644
index 0000000..a563b78
--- /dev/null
+++ b/cadxcore/main/tools/camerarotationtool.h
@@ -0,0 +1,69 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+
+#include <export/tools/icamerarotationtool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+class WCameraRotation;
+}
+namespace Events
+{
+class EventoRaton;
+class EventoTeclado;
+}
+}
+
+class EXTAPI CameraRotationTool : public GNC::GCS::ICameraRotationTool
+{
+public:
+        typedef GNC::GCS::Events::EventoRaton       TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado     TEventoTeclado;
+        typedef GNC::GCS::Widgets::WCameraRotation TBuilder;
+        CameraRotationTool();
+        ~CameraRotationTool();
+
+//region "Realización de la interfaz IHerramienta"
+
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+
+//endregion
+
+
+//region "Eventos refinados desde los paneles"
+
+//endregion
+
+protected:
+
+        TBuilder*            m_pBuilder;
+};
+}
diff --git a/cadxcore/main/tools/colormaptool.cpp b/cadxcore/main/tools/colormaptool.cpp
new file mode 100644
index 0000000..7cd00a7
--- /dev/null
+++ b/cadxcore/main/tools/colormaptool.cpp
@@ -0,0 +1,207 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "colormaptool.h"
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <export/contracts/iwidgetscontract.h>
+#include <api/controllers/ieventscontroller.h>
+#include <eventos/render.h>
+#include <api/iwidgetsmanager.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtkVISUManagement/vtkLookupTableManager.h>
+#include <vtk/vtkginkgoimageviewer.h>
+
+#define INVERTIR_COLORES  4100
+#define MENU_MAPAS_COLOR  4101
+
+namespace GNC
+{
+namespace GUI
+{
+class wxEventHandlerColorMap : public wxEvtHandler
+{
+public:
+        wxEventHandlerColorMap(wxEvtHandler* pParent, GNC::ColorMapTool* pHerramienta):wxEvtHandler()
+        {
+                m_pEvtParent = pParent;
+                m_pHerramienta=pHerramienta;
+
+                m_pEvtParent->Connect(m_pHerramienta->ID, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerColorMap::OnUpdateColorMapUI),NULL,this);
+                m_pEvtParent->Connect(INVERTIR_COLORES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerColorMap::OnInvertColorMapClick),NULL,this);
+                m_pEvtParent->Connect(INVERTIR_COLORES, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerColorMap::OnUpdateColorMapUI),NULL,this);
+        }
+
+        ~wxEventHandlerColorMap()
+        {
+                m_pEvtParent->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerColorMap::OnSeleccionarMapa ),NULL,this);
+                m_pEvtParent->Disconnect(wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler( wxEventHandlerColorMap::OnUpdateMenuMapaColorUI ),NULL,this);
+
+                m_pEvtParent->Disconnect(m_pHerramienta->ID, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerColorMap::OnUpdateColorMapUI),NULL,this);
+                m_pEvtParent->Disconnect(INVERTIR_COLORES, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerColorMap::OnInvertColorMapClick),NULL,this);
+                m_pEvtParent->Disconnect(INVERTIR_COLORES, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerColorMap::OnUpdateColorMapUI),NULL,this);
+                m_pEvtParent = NULL;
+                m_pHerramienta = NULL;
+        }
+
+        void OnSeleccionarMapa( wxCommandEvent& event )
+        {
+                int idMapa = event.GetId() - MENU_MAPAS_COLOR;
+                m_pHerramienta->SeleccionarMapa(idMapa);
+                event.Skip(false);
+        }
+
+
+        void OnUpdateMenuMapaColorUI(wxUpdateUIEvent& event)
+        {
+                if ((event.GetId() - MENU_MAPAS_COLOR) >= 0)  {
+                        int idMapaSeleccionado = m_pHerramienta->GetIdLookupTable();
+                        event.Check(event.GetId()-MENU_MAPAS_COLOR == idMapaSeleccionado);
+                }
+        }
+
+
+        void OnInvertColorMapClick( wxCommandEvent& event )
+        {
+                m_pHerramienta->InvertColorMap();
+                event.Skip(false);
+        }
+
+        void OnUpdateColorMapUI(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->SoportaMapas());
+        }
+
+        GNC::ColorMapTool* m_pHerramienta;
+        wxEvtHandler* m_pEvtParent;
+};
+}
+}
+
+
+
+GNC::GCS::ITool* GNC::ColorMapTool::NewTool()
+{
+        return new GNC::ColorMapTool();
+}
+
+GNC::ColorMapTool::ColorMapTool()
+{
+}
+GNC::ColorMapTool::~ColorMapTool()
+{
+}
+
+bool GNC::ColorMapTool::HasDropDownMenu()
+{
+        return true;
+}
+
+void GNC::ColorMapTool::AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        std::list<std::string> choices = vtkLookupTableManager::GetAvailableLookupTables();
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, INVERTIR_COLORES,_("Invert color map"), GinkgoResourcesManager::ToolIcons::GetIcoInvert(), new GNC::GUI::wxEventHandlerColorMap( pParent, this)));
+        pMenu->AppendSeparator();
+        int idMapa = MENU_MAPAS_COLOR;
+        wxBitmap icon;
+        for(std::list<std::string>::iterator it = choices.begin(); it!= choices.end(); ++it,idMapa++) {
+                GNC::GUI::wxMenuItemTool* pItem =  new GNC::GUI::wxMenuItemTool(pMenu, idMapa,wxString::FromUTF8((*it).c_str()), icon, new GNC::GUI::wxEventHandlerColorMap(pParent, this), wxITEM_CHECK);
+                pParent->Connect(pItem->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( GNC::GUI::wxEventHandlerColorMap::OnSeleccionarMapa ),NULL,pItem->m_pHandler);
+                pParent->Connect(pItem->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(GNC::GUI::wxEventHandlerColorMap::OnUpdateMenuMapaColorUI),NULL,pItem->m_pHandler);
+                pMenu->Append(pItem);
+        }
+}
+
+bool GNC::ColorMapTool::ExecuteAction()
+{
+        return false;
+}
+
+
+void GNC::ColorMapTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                wxMenu* pLayoutMenu = new wxMenu();
+                AppendDropDownMenu(pParent, pLayoutMenu);
+                pMenu->Append(ID,wxString::FromUTF8(Name.c_str()),pLayoutMenu);
+                pMenu->Enable(ID,Enabled);
+        }
+}
+
+
+bool GNC::ColorMapTool::SoportaMapas()
+{
+        if (WidgetsContract->Inicializado()) {
+                GNC::GCS::IWidgetsContract::TViewerList listViewers;
+                WidgetsContract->GetAllViewers(listViewers);
+                bool soporta =true;
+                for (GNC::GCS::IWidgetsContract::TViewerList::iterator it = listViewers.begin(); it != listViewers.end(); ++it) {
+                        soporta = ( soporta && ((*it)->GetNumberOfComponents()==1));
+                }
+                return soporta;
+        } else {
+                return false;
+        }
+}
+
+void GNC::ColorMapTool::SeleccionarMapa(int idMapa)
+{
+        if (WidgetsContract->Inicializado()) {
+                if(idMapa>=0 && idMapa<(int)vtkLookupTableManager::GetAvailableLookupTables().size()) {
+                        vtkLookupTable* vtkTabla = vtkLookupTableManager::GetLookupTable(idMapa);
+                        if(vtkTabla != NULL) {
+                                GNC::GCS::IWidgetsContract::TViewerList listViewers;
+                                WidgetsContract->GetAllViewers(listViewers);
+
+                                for (GNC::GCS::IWidgetsContract::TViewerList::iterator it = listViewers.begin(); it != listViewers.end(); ++it) {
+                                        (*it)->SetLookupTable(vtkTabla, idMapa);
+                                }
+                                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoRender(WidgetsContract->GetManager()->GetVista()));
+                        }
+                }
+        }
+}
+
+int GNC::ColorMapTool::GetIdLookupTable()
+{
+        if (!SoportaMapas())
+                return -1;
+        int idMapa = -1;
+        if (WidgetsContract->Inicializado()) {
+                idMapa = WidgetsContract->GetViewerActivo()->GetIdLookupTable();
+        }
+        return idMapa;
+}
+
+void GNC::ColorMapTool::InvertColorMap()
+{
+        int idMapa = GetIdLookupTable();
+
+        if (idMapa == vtkLookupTableManager::LUT_LINEAR) {
+                idMapa = vtkLookupTableManager::LUT_LINEAR_INV;
+        } else if (idMapa == vtkLookupTableManager::LUT_LINEAR_INV) {
+                idMapa = vtkLookupTableManager::LUT_LINEAR;
+        }
+        SeleccionarMapa(idMapa);
+}
+
diff --git a/cadxcore/main/tools/colormaptool.h b/cadxcore/main/tools/colormaptool.h
new file mode 100644
index 0000000..74134e8
--- /dev/null
+++ b/cadxcore/main/tools/colormaptool.h
@@ -0,0 +1,55 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#ifndef COLORMAPTOOL_H
+#define COLORMAPTOOL_H
+
+#include <export/tools/icolormaptool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+
+class ColorMapTool : public GNC::GCS::IColorMapTool
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        ColorMapTool();
+        ~ColorMapTool();
+
+        virtual bool HasDropDownMenu();
+        void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        //cuando hacen click en ella...
+        virtual bool SoportaMapas();
+        virtual void SeleccionarMapa(int id);
+
+        int GetIdLookupTable();
+        virtual void InvertColorMap();
+
+protected:
+
+};
+}
+#endif
diff --git a/cadxcore/main/tools/copyimagetoclipboardtool.cpp b/cadxcore/main/tools/copyimagetoclipboardtool.cpp
new file mode 100644
index 0000000..495daee
--- /dev/null
+++ b/cadxcore/main/tools/copyimagetoclipboardtool.cpp
@@ -0,0 +1,102 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "copyimagetoclipboardtool.h"
+#include <export/contracts/iwidgetscontract.h>
+#include <api/controllers/ieventscontroller.h>
+#include <eventos/modificacionimagen.h>
+#include <eventos/render.h>
+#include <api/iwidgetsmanager.h>
+#include <main/entorno.h>
+#include <main/controllers/commandcontroller.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtk/vtkginkgoimageviewer.h>
+
+#include <vtkPolyDataMapper.h>
+#include <vtkActor.h>
+#include <vtkSmartPointer.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkPolyData.h>
+#include <vtkSphereSource.h>
+#include <vtkWindowToImageFilter.h>
+#include <vtkJPEGWriter.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/dataobj.h>
+#include <wx/clipbrd.h>
+
+GNC::GCS::ITool* GNC::CopyImageToClipboardTool::NewTool()
+{
+        return new GNC::CopyImageToClipboardTool();
+}
+
+GNC::CopyImageToClipboardTool::CopyImageToClipboardTool()
+{
+}
+GNC::CopyImageToClipboardTool::~CopyImageToClipboardTool()
+{
+}
+
+bool GNC::CopyImageToClipboardTool::ExecuteAction()
+{
+        std::string tempName = GNC::Entorno::Instance()->CreateGinkgoTempFile();
+        {
+                vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter =
+                        vtkSmartPointer<vtkWindowToImageFilter>::New();
+                windowToImageFilter->SetInput(WidgetsContract->GetViewerActivo()->GetRenderWindow());
+                windowToImageFilter->SetInputBufferTypeToRGB(); //also record the alpha (transparency) channel
+                windowToImageFilter->Update();
+                //copy image to wx...
+                // put the pixels into a wxImage ...
+                vtkSmartPointer<vtkImageData> timg = windowToImageFilter->GetOutput();
+                unsigned char *pVtkPix = (unsigned char *)timg->GetScalarPointer();
+
+                unsigned long imgsize = timg->GetDimensions()[0] * timg->GetDimensions()[1] * sizeof(unsigned char) * 3;
+                unsigned char* data = new unsigned char[imgsize];
+                int linesize = timg->GetDimensions()[0] *3;
+                for (int y = 0; y < timg->GetDimensions()[1]; ++y) {
+                        int offsetWx = imgsize - (linesize * (y +1));
+                        int offsetVtk = y*linesize;
+                        for (int x = 0; x < linesize; ++x) {
+                                data[offsetWx+x] = pVtkPix[offsetVtk+x];
+                        }
+                }
+
+                wxImage image(timg->GetDimensions()[0], timg->GetDimensions()[1],data,false);
+                // ... and send the image to the clipboard
+                if (wxTheClipboard->Open()) {
+                        wxTheClipboard->SetData( new wxBitmapDataObject(wxBitmap(image)) );
+                        wxTheClipboard->Close();
+                }
+
+        }
+
+        return true;
+}
diff --git a/cadxcore/main/tools/copyimagetoclipboardtool.h b/cadxcore/main/tools/copyimagetoclipboardtool.h
new file mode 100644
index 0000000..cd63ba0
--- /dev/null
+++ b/cadxcore/main/tools/copyimagetoclipboardtool.h
@@ -0,0 +1,41 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <export/tools/icopyimagetoclipboardtool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+
+class EXTAPI CopyImageToClipboardTool : public GNC::GCS::ICopyImageToClipboardTool
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        CopyImageToClipboardTool();
+        ~CopyImageToClipboardTool();
+
+        virtual bool ExecuteAction();
+
+protected:
+
+};
+}
diff --git a/cadxcore/main/tools/coretools.cpp b/cadxcore/main/tools/coretools.cpp
new file mode 100644
index 0000000..5dfe650
--- /dev/null
+++ b/cadxcore/main/tools/coretools.cpp
@@ -0,0 +1,181 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <ostream>
+
+#include "coretools.h"
+#include "angletool.h"
+#include "pointertool.h"
+#include "ruletool.h"
+#include "toolzoom.h"
+#include "toolpan.h"
+#include "anonymizetool.h"
+#include "cornerannotationstool.h"
+#include "dicomizetool.h"
+#include "detachwindowtool.h"
+#include "metricgridtool.h"
+#include "resettool.h"
+#include "pixelsbluringtool.h"
+#include "windowlayouttool.h"
+#include "markertool.h"
+#include "undotool.h"
+#include "toolslider.h"
+#include "notetool.h"
+#include "toolwindowlevel.h"
+#include "showtagstool.h"
+#include "rotateandfliptool.h"
+#include "colormaptool.h"
+#include "showhistorytool.h"
+#include "imageexporttool.h"
+#include "queryretrievetool.h"
+#include "trackballtool.h"
+#include "camerarotationtool.h"
+#include "videotool.h"
+#include "secondarycapturetool.h"
+#include "pacsuploadtool.h"
+#include "startdicomizationtool.h"
+#include "addfiletohistorytool.h"
+#include "openginkgocloudlinktool.h"
+#include "copyimagetoclipboardtool.h"
+#include "simpleprinttool.h"
+#include "brightnesscontrasttool.h"
+
+#include <main/tools/historytools.h>
+#include <main/controllers/historytoolscontroller.h>
+
+void GNC::RegisterCoreTools()
+{
+
+#ifdef ENABLE_ANGLETOOL
+        (new GNC::AngleTool())->RegisterTool();
+#endif
+        /*
+        #ifdef ENABLE_ANONYMIZETOOL
+        (new GNC::AnonymizeTool())->RegisterTool();
+        #endif
+        */
+#ifdef ENABLE_CALIBRATIONTOOL
+        (new GNC::CalibrationTool())->RegisterTool();
+#endif
+#ifdef ENABLE_CORNERANNOTATIONTOOL
+        (new GNC::CornerAnnotationsTool())->RegisterTool();
+#endif
+        /*
+        #ifdef ENABLE_DICOMEXPORTTOOL
+        	(new GNC::DicomExportTool())->RegisterTool();
+        #endif
+        */
+        /*
+        #ifdef ENABLE_DICOMIZETOOL
+        	(new GNC::DicomizeTool())->RegisterTool();
+        #endif
+        */
+#ifdef ENABLE_DETACHWINDOWTOOL
+        (new GNC::DetachWindowTool())->RegisterTool();
+#endif
+#ifdef ENABLE_ELEVATIONTOOL
+        (new GNC::ElevationTool())->RegisterTool();
+#endif
+#ifdef ENABLE_INTERPOLATETOOL
+        (new GNC::InterpolateTool())->RegisterTool();
+#endif
+#ifdef ENABLE_MAGNIFIERTOOL
+        (new GNC::MagnifierTool())->RegisterTool();
+#endif
+#ifdef ENABLE_MARKERTOOL
+        (new GNC::MarkerTool())->RegisterTool();
+#endif
+#ifdef ENABLE_METRICGRIDTOOL
+        (new GNC::MetricGridTool())->RegisterTool();
+#endif
+#ifdef ENABLE_NOTETOOL
+        (new GNC::NoteTool())->RegisterTool();
+#endif
+#ifdef ENABLE_PANTOOL
+        (new GNC::ToolPan())->RegisterTool();
+#endif
+#ifdef ENABLE_POINTERTOOL
+        (new GNC::PointerTool())->RegisterTool();
+#endif
+#ifdef ENABLE_QUERYRETRIEVETOOL
+        (new GNC::QueryRetrieveTool())->RegisterTool();
+#endif
+#ifdef ENABLE_RESETTOOL
+        (new GNC::ResetTool())->RegisterTool();
+#endif
+#ifdef ENABLE_RULETOOL
+        (new GNC::RuleTool())->RegisterTool();
+#endif
+#ifdef ENABLE_PIXELSBLURING
+        (new GNC::PixelsBluringTool())->RegisterTool();
+#endif
+#ifdef ENABLE_SHOWTAGSTOOL
+        (new GNC::ShowTagsTool())->RegisterTool();
+#endif
+#ifdef ENABLE_SLIDERTOOL
+        (new GNC::ToolSlider())->RegisterTool();
+#endif
+#ifdef ENABLE_TAGSPANELTOOL
+        (new GNC::TagsPanelTool())->RegisterTool();
+#endif
+#ifdef ENABLE_UNDOTOOL
+        (new GNC::UndoTool())->RegisterTool();
+#endif
+#ifdef ENABLE_WINDOWLAYOUTTOOL
+        (new GNC::WindowLayoutTool())->RegisterTool();
+#endif
+#ifdef ENABLE_WINDOWLEVELTOOL
+        (new GNC::ToolWindowLevel())->RegisterTool();
+#endif
+#ifdef ENABLE_ZOOMTOOL
+        (new GNC::ToolZoom())->RegisterTool();
+#endif
+#ifdef ENABLE_BRIGHTNESSCONTRASTTOOL
+        (new GNC::BrightnessContrastTool())->RegisterTool();
+#endif
+
+        (new GNC::RotateAndFlipTool())->RegisterTool();
+        (new GNC::ColorMapTool())->RegisterTool();
+        (new GNC::ShowHistoryTool())->RegisterTool();
+        (new GNC::ImageExportTool())->RegisterTool();
+        (new GNC::TrackballTool())->RegisterTool();
+        (new GNC::VideoTool())->RegisterTool();
+        (new GNC::SecondaryCaptureTool())->RegisterTool();
+        (new GNC::PACSUploadTool())->RegisterTool();
+        (new GNC::StartDicomizationTool())->RegisterTool();
+        (new GNC::AddFileToHistory())->RegisterTool();
+        (new GNC::CopyImageToClipboardTool())->RegisterTool();
+        (new GNC::CameraRotationTool())->RegisterTool();
+        (new GNC::SimplePrintTool())->RegisterTool();
+
+        //history
+        GNC::HistoryToolsController::Instance()->RegisterTool(new GNC::AnonymizeTool());
+        GNC::HistoryToolsController::Instance()->RegisterTool(new GNC::ShowTagsHistoryTool());
+        GNC::HistoryToolsController::Instance()->RegisterTool(new GNC::OpenFileTool());
+        GNC::HistoryToolsController::Instance()->RegisterTool(new GNC::OpenFolderTool());
+        GNC::HistoryToolsController::Instance()->RegisterTool(new GNC::OpenRemovableTool());
+        GNC::HistoryToolsController::Instance()->RegisterTool(new GNC::DicomizeTool());
+        GNC::HistoryToolsController::Instance()->RegisterTool(new GNC::QueryRetrieveHistoryTool());
+        GNC::HistoryToolsController::Instance()->RegisterTool(new GNC::SendPACSTool());
+        GNC::HistoryToolsController::Instance()->RegisterTool(new GNC::ExportDicomDirTool());
+        GNC::HistoryToolsController::Instance()->RegisterTool(new GNC::OpenGinkgoCloudLinkTool());
+        GNC::HistoryToolsController::Instance()->RegisterTool(new GNC::SearchGinkgoCloudHistoryTool());
+}
diff --git a/cadxcore/main/tools/coretools.h b/cadxcore/main/tools/coretools.h
new file mode 100644
index 0000000..f633702
--- /dev/null
+++ b/cadxcore/main/tools/coretools.h
@@ -0,0 +1,29 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef TOOLSREGISTRY_H
+#define TOOLSREGISTRY_H
+#include <api/api.h>
+namespace GNC
+{
+void EXTAPI RegisterCoreTools();
+}
+#endif
diff --git a/cadxcore/main/tools/cornerannotationstool.cpp b/cadxcore/main/tools/cornerannotationstool.cpp
new file mode 100644
index 0000000..d367647
--- /dev/null
+++ b/cadxcore/main/tools/cornerannotationstool.cpp
@@ -0,0 +1,96 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/menu.h>
+
+#include "cornerannotationstool.h"
+#include <api/iwidgetsmanager.h>
+#include <export/contracts/iwidgetscontract.h>
+
+#include <main/controllers/controladoreventos.h>
+#include <eventos/render.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+
+#if defined(ENABLE_CORNERANNOTATIONTOOL)
+
+namespace GNC
+{
+namespace GUI
+{
+class wxCornerAnnotationsEventHandler: public wxDefaultEvtHandlerTool
+{
+public:
+        wxCornerAnnotationsEventHandler(wxEvtHandler* pParent, GNC::CornerAnnotationsTool* pTool): wxDefaultEvtHandlerTool(pParent, pTool)
+        {
+                m_pCornerTool = pTool;
+        }
+
+        ~wxCornerAnnotationsEventHandler()
+        {
+        }
+
+        virtual void OnUpdateUI(wxUpdateUIEvent &event)
+        {
+                wxDefaultEvtHandlerTool::OnUpdateUI(event);
+                if(m_pCornerTool->IsVisible()) {
+                        event.SetText(_("Hide corner annotations"));
+                } else {
+                        event.SetText(_("Show corner annotations"));
+                }
+        }
+        GNC::CornerAnnotationsTool* m_pCornerTool;
+};
+
+}
+}
+
+
+GNC::GCS::ITool* GNC::CornerAnnotationsTool::NewTool()
+{
+        return new GNC::CornerAnnotationsTool();
+}
+
+GNC::CornerAnnotationsTool::CornerAnnotationsTool()
+{
+}
+GNC::CornerAnnotationsTool::~CornerAnnotationsTool()
+{
+}
+
+bool GNC::CornerAnnotationsTool::ExecuteAction()
+{
+        WidgetsContract->GetManager()->ShowAnnotations(!WidgetsContract->GetManager()->IsShownAnnotations());
+        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoRender(WidgetsContract->GetManager()->GetVista()));
+        return true;
+}
+
+void GNC::CornerAnnotationsTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                GNC::GUI::wxCornerAnnotationsEventHandler* evtHandler = new GNC::GUI::wxCornerAnnotationsEventHandler(pParent, this);
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ID, wxString::FromUTF8(Name.c_str()),Icon, evtHandler));
+        }
+}
+
+bool GNC::CornerAnnotationsTool::IsVisible()
+{
+        return WidgetsContract->GetManager()->IsShownAnnotations();
+}
+#endif
diff --git a/cadxcore/main/tools/cornerannotationstool.h b/cadxcore/main/tools/cornerannotationstool.h
new file mode 100644
index 0000000..b2b6364
--- /dev/null
+++ b/cadxcore/main/tools/cornerannotationstool.h
@@ -0,0 +1,50 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#if defined(ENABLE_CORNERANNOTATIONTOOL)
+#ifndef CORNERANNOTATIONTOOL_H
+#define CORNERANNOTATIONTOOL_H
+
+#include <export/tools/icornerannotationstool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+
+class EXTAPI CornerAnnotationsTool : public GNC::GCS::ICornerAnnotationsTool
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        CornerAnnotationsTool();
+        ~CornerAnnotationsTool();
+
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+        bool IsVisible();
+
+
+protected:
+
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/detachwindowtool.cpp b/cadxcore/main/tools/detachwindowtool.cpp
new file mode 100644
index 0000000..051f4fe
--- /dev/null
+++ b/cadxcore/main/tools/detachwindowtool.cpp
@@ -0,0 +1,122 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "detachwindowtool.h"
+#include <export/contracts/iviewcontract.h>
+#include <api/ivista.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <main/entorno.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+
+//----------------------------------------------------------------------
+namespace GNC
+{
+namespace GUI
+{
+class wxDetachWindowEventHandler: public wxDefaultEvtHandlerTool
+{
+public:
+        wxDetachWindowEventHandler(wxEvtHandler* pParent, GNC::DetachWindowTool* pTool): wxDefaultEvtHandlerTool(pParent, pTool)
+        {
+                m_pCornerTool = pTool;
+        }
+
+        ~wxDetachWindowEventHandler()
+        {
+        }
+
+        virtual void OnUpdateUI(wxUpdateUIEvent &event)
+        {
+                wxDefaultEvtHandlerTool::OnUpdateUI(event);
+                if(m_pCornerTool->IsDetached()) {
+                        event.SetText(_("Attach View"));
+                } else {
+                        event.SetText(_("Detach view"));
+                }
+        }
+
+        virtual void OnToolClick(wxCommandEvent &)
+        {
+                m_pCornerTool->doDetach();
+        }
+
+        GNC::DetachWindowTool* m_pCornerTool;
+};
+
+}
+}
+
+GNC::GCS::ITool* GNC::DetachWindowTool::NewTool()
+{
+        return new GNC::DetachWindowTool();
+}
+
+GNC::DetachWindowTool::DetachWindowTool()
+{
+}
+GNC::DetachWindowTool::~DetachWindowTool()
+{
+}
+
+bool GNC::DetachWindowTool::ExecuteAction()
+{
+        //if i put it here it will be called twice because of toolsystembar
+        //GNC::Entorno::Instance()->GetVentanaPrincipal()->EncajarDesencajar(ViewContract->GetView());
+        return false;
+}
+
+void GNC::DetachWindowTool::doDetach()
+{
+        GNC::Entorno::Instance()->GetVentanaPrincipal()->EncajarDesencajar(ViewContract->GetView());
+}
+
+void GNC::DetachWindowTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                GNC::GUI::wxDetachWindowEventHandler* evtHandler = new GNC::GUI::wxDetachWindowEventHandler(pParent, this);
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ID, wxString::FromUTF8(Name.c_str()),Icon, evtHandler));
+        }
+}
+
+bool GNC::DetachWindowTool::IsDetached()
+{
+        //si el padre de la vistapadre de la vista es un dialogo esta desencajada si no no
+
+        if(ViewContract->GetView() != NULL) {
+                wxWindow* pVentana = ViewContract->GetView()->GetWindow();
+                if(pVentana != NULL) {
+                        wxWindow* pVentanaPadre = pVentana->GetParent();
+                        if(pVentanaPadre != NULL) {
+                                wxFrame* pdlg = dynamic_cast<wxFrame*>(pVentanaPadre);
+                                if(pdlg != NULL) {
+                                        return true;
+                                } else {
+                                        return false;
+                                }
+                        }
+                } else {
+                        LOG_WARN("Core/HerramientaDesencajar", "Error al obtener la ventana asociada a la vista para comprobar encaje. Incosistencia interna");
+                }
+        }
+        return false;
+}
+
+
diff --git a/cadxcore/main/tools/detachwindowtool.h b/cadxcore/main/tools/detachwindowtool.h
new file mode 100644
index 0000000..f09c008
--- /dev/null
+++ b/cadxcore/main/tools/detachwindowtool.h
@@ -0,0 +1,54 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#if defined(ENABLE_DETACHWINDOWTOOL)
+#ifndef DETACHWINDOWTOOL_H
+#define DETACHWINDOWTOOL_H
+#include <export/tools/idetachwindowtool.h>
+#include <api/api.h>
+
+#include <map>
+
+
+namespace GNC
+{
+
+class EXTAPI DetachWindowTool : public GNC::GCS::IDetachWindowTool
+{
+
+protected:
+
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        DetachWindowTool();
+        ~DetachWindowTool();
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+        bool IsDetached();
+        void doDetach();
+
+protected:
+
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/dicomizetool.cpp b/cadxcore/main/tools/dicomizetool.cpp
new file mode 100644
index 0000000..1fd2e0b
--- /dev/null
+++ b/cadxcore/main/tools/dicomizetool.cpp
@@ -0,0 +1,60 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+
+#include "dicomizetool.h"
+
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/icontroladorpermisos.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+#include <main/gui/import/wxwizardimportacionginkgo.h>
+#include <api/internationalization/internationalization.h>
+
+//----------------------------------------------------------------------
+
+GNC::DicomizeTool::DicomizeTool(): GNC::GCS::IHistoryTool(ID,GNC::GCS::IHistoryTool::TFamily_Dicomize, _Std("Dicomize"), _Std("Dicomize files")+ " \tAlt+d", GinkgoResourcesManager::MenuIcons::GetIcoImportar(), GinkgoResourcesManager::BigIcons::GetIcoBigDicomize())
+{
+}
+
+GNC::DicomizeTool::~DicomizeTool()
+{
+}
+
+bool GNC::DicomizeTool::Enabled()
+{
+        return GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","import");
+}
+
+void GNC::DicomizeTool::Execute()
+{
+        try {
+                GNC::GUI::wxWizardImportacionGinkgo ib(GNC::HistoryToolsController::Instance()->GetHistoryPanel()->GetWxWindow(),NULL);
+
+                ib.ShowModal();
+        } catch(GIL::DICOM::I2DException& i) {
+                LOG_ERROR("DicomizeTool", "Error in dicomization: " << i.GetCause())
+        }
+}
+
+
+
diff --git a/cadxcore/main/tools/dicomizetool.h b/cadxcore/main/tools/dicomizetool.h
new file mode 100644
index 0000000..d22ee6e
--- /dev/null
+++ b/cadxcore/main/tools/dicomizetool.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_DICOMIZETOOL)
+#ifndef DICOMIZETOOL_H
+#define DICOMIZETOOL_H
+#include <main/controllers/historytoolscontroller.h>
+#include <export/tools/iherramientascore.h>
+
+namespace GNC
+{
+
+class DicomizeTool : public GNC::GCS::IHistoryTool
+{
+public:
+        static const GNC::GCS::IHistoryTool::UID ID =  HCore_DicomizeFromHistory;
+        DicomizeTool();
+        virtual ~DicomizeTool();
+        virtual bool Enabled();
+
+        virtual void Execute();
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/enabled_tools.h b/cadxcore/main/tools/enabled_tools.h
new file mode 100644
index 0000000..73beb09
--- /dev/null
+++ b/cadxcore/main/tools/enabled_tools.h
@@ -0,0 +1,31 @@
+
+#define ENABLE_ANGLETOOL
+#define ENABLE_ANONYMIZETOOL
+#define ENABLE_CORNERANNOTATIONTOOL
+#define ENABLE_DICOMEXPORTTOOL
+#define ENABLE_DICOMIZETOOL
+#define ENABLE_DETACHWINDOWTOOL
+#define ENABLE_PIXELSBLURING
+#define ENABLE_MARKERTOOL
+#define ENABLE_METRICGRIDTOOL
+#define ENABLE_NOTETOOL
+#define ENABLE_OPENFILETOOL
+#define ENABLE_OPENFOLDERTOOL
+#define ENABLE_OPENREMOVABLETOOL
+#define ENABLE_PANTOOL
+#define ENABLE_POINTERTOOL
+#define ENABLE_QUERYRETRIEVETOOL
+#define ENABLE_RESETTOOL
+#define ENABLE_RULETOOL
+#define ENABLE_SENDPACSTOOL
+#define ENABLE_SHOWTAGSHISTORYTOOL
+#define ENABLE_SHOWTAGSTOOL
+#define ENABLE_SLIDERTOOL
+#define ENABLE_UNDOTOOL
+#define ENABLE_WINDOWLAYOUTTOOL
+#define ENABLE_WINDOWLEVELTOOL
+#define ENABLE_ZOOMTOOL
+#define ENABLE_RESETONEONETOOL
+#define ENABLE_BRIGHTNESSCONTRASTTOOL
+
+
diff --git a/cadxcore/main/tools/exportdicomdirtool.cpp b/cadxcore/main/tools/exportdicomdirtool.cpp
new file mode 100644
index 0000000..00232cb
--- /dev/null
+++ b/cadxcore/main/tools/exportdicomdirtool.cpp
@@ -0,0 +1,78 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+
+#include <wx/msgdlg.h>
+
+#include "exportdicomdirtool.h"
+
+#include <api/imodelointegracion.h>
+
+#include <api/controllers/icontroladorpermisos.h>
+#include <main/gui/dicomdirexport/exportdicomdir.h>
+#include <main/gui/history3/synchronizedialog.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+
+#include <api/internationalization/internationalization.h>
+
+//----------------------------------------------------------------------
+
+GNC::ExportDicomDirTool::ExportDicomDirTool(): GNC::GCS::IHistoryTool(ID,GNC::GCS::IHistoryTool::TFamily_Export, _Std("Export to DICOM Dir"), _Std("Export to DICOM Dir")+ " \tAlt+e", GinkgoResourcesManager::MenuIcons::GetIcoDicomDir())
+{
+}
+
+GNC::ExportDicomDirTool::~ExportDicomDirTool()
+{
+}
+
+bool GNC::ExportDicomDirTool::Enabled()
+{
+        return GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","export");
+}
+
+void GNC::ExportDicomDirTool::Execute()
+{
+        GNC::GCS::IHistoryPanel* pHistory = GNC::HistoryToolsController::Instance()->GetHistoryPanel();
+        std::list<long> listOfPks;
+        pHistory->GetSelectedSeriesPk(listOfPks);
+        Execute(listOfPks);
+}
+
+void GNC::ExportDicomDirTool::Execute(const std::list<long>& listOfPks)
+{
+        GNC::GCS::IHistoryPanel* pHistory = GNC::HistoryToolsController::Instance()->GetHistoryPanel();
+        if (listOfPks.empty()) {
+                wxMessageBox(_("Select at least one series"), _("Info"), wxICON_INFORMATION, pHistory->GetWxWindow());
+                return;
+        }
+
+        if (!AreSeriesFullyDownloaded(listOfPks)) {
+                GNC::GUI::SynchronizeDialog dlg(pHistory->GetWxWindow(), listOfPks, this);
+                dlg.ShowModal();
+        } else {
+                GNC::GUI::ExportDicomDir dlg(pHistory->GetWxWindow(), listOfPks);
+                dlg.ShowModal();
+        }
+}
+
+
+
diff --git a/cadxcore/main/tools/exportdicomdirtool.h b/cadxcore/main/tools/exportdicomdirtool.h
new file mode 100644
index 0000000..83aa874
--- /dev/null
+++ b/cadxcore/main/tools/exportdicomdirtool.h
@@ -0,0 +1,45 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#if defined(ENABLE_DICOMEXPORTTOOL)
+#ifndef DICOMEXPORTTOOL_H
+#define DICOMEXPORTTOOL_H
+#include <main/controllers/historytoolscontroller.h>
+#include <export/tools/iherramientascore.h>
+
+namespace GNC
+{
+
+class ExportDicomDirTool : public GNC::GCS::IHistoryTool
+{
+public:
+        static const GNC::GCS::IHistoryTool::UID ID =  HCore_ExportDicomDir;
+        ExportDicomDirTool();
+        virtual ~ExportDicomDirTool();
+        virtual bool Enabled();
+
+        virtual void Execute();
+        virtual void Execute(const std::list<long>& seriesPk);
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/historytools.h b/cadxcore/main/tools/historytools.h
new file mode 100644
index 0000000..e87599e
--- /dev/null
+++ b/cadxcore/main/tools/historytools.h
@@ -0,0 +1,31 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "anonymizetool.h"
+#include "showtagshistorytool.h"
+#include "openfiletool.h"
+#include "openfoldertool.h"
+#include "openremovabletool.h"
+#include "dicomizetool.h"
+#include "queryretrievehistorytool.h"
+#include "sendpacstool.h"
+#include "exportdicomdirtool.h"
+#include "searchginkgocloudhistorytool.h"
diff --git a/cadxcore/main/tools/imageexporttool.cpp b/cadxcore/main/tools/imageexporttool.cpp
new file mode 100644
index 0000000..ed3b9ce
--- /dev/null
+++ b/cadxcore/main/tools/imageexporttool.cpp
@@ -0,0 +1,85 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "imageexporttool.h"
+#include <api/ivista.h>
+#include <export/contracts/iwidgetscontract.h>
+#include <api/iwidgetsmanager.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <main/gui/export/wxwizardexportacionginkgo.h>
+
+
+//----------------------------------------------------------------------
+namespace GNC
+{
+namespace GUI
+{
+class wxImageExportEventHandler: public wxDefaultEvtHandlerTool
+{
+public:
+        wxImageExportEventHandler(wxEvtHandler* pParent, GNC::ImageExportTool* pTool): wxDefaultEvtHandlerTool(pParent, pTool)
+        {
+                m_pImageExport = pTool;
+        }
+
+        ~wxImageExportEventHandler()
+        {
+        }
+
+        virtual void OnUpdateUI(wxUpdateUIEvent &event)
+        {
+                wxDefaultEvtHandlerTool::OnUpdateUI(event);
+                if (event.GetEnabled()) {
+                        event.Enable(m_pImageExport->IsEnabled());
+                }
+        }
+        GNC::ImageExportTool* m_pImageExport;
+};
+
+}
+}
+
+GNC::GCS::ITool* GNC::ImageExportTool::NewTool()
+{
+        return new GNC::ImageExportTool();
+}
+
+GNC::ImageExportTool::ImageExportTool()
+{
+}
+GNC::ImageExportTool::~ImageExportTool()
+{
+}
+
+bool GNC::ImageExportTool::ExecuteAction()
+{
+        GNC::GUI::wxWidzardExportacionGinkgo dlg(WidgetsContract->GetManager()->GetVista()->GetWindow(), WidgetsContract);
+        dlg.ShowModal();
+        return true;
+}
+
+void GNC::ImageExportTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                GNC::GUI::wxImageExportEventHandler* evtHandler = new GNC::GUI::wxImageExportEventHandler(pParent, this);
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ID, wxString::FromUTF8(Name.c_str()),Icon, evtHandler));
+        }
+}
+
diff --git a/cadxcore/main/tools/imageexporttool.h b/cadxcore/main/tools/imageexporttool.h
new file mode 100644
index 0000000..5856909
--- /dev/null
+++ b/cadxcore/main/tools/imageexporttool.h
@@ -0,0 +1,50 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#ifndef IMAGEEXPORTTTOOL_H
+#define IMAGEEXPORTTTOOL_H
+#include <export/tools/iimageexporttool.h>
+#include <api/api.h>
+
+#include <map>
+
+
+namespace GNC
+{
+
+class EXTAPI ImageExportTool : public GNC::GCS::IImageExportTool
+{
+
+protected:
+
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        ImageExportTool();
+        ~ImageExportTool();
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+protected:
+
+};
+}
+#endif
diff --git a/cadxcore/main/tools/markertool.cpp b/cadxcore/main/tools/markertool.cpp
new file mode 100644
index 0000000..1108340
--- /dev/null
+++ b/cadxcore/main/tools/markertool.cpp
@@ -0,0 +1,248 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "markertool.h"
+
+#if defined(ENABLE_MARKERTOOL)
+#include <wx/menu.h>
+#include <api/iwidgetsmanager.h>
+#include <api/internationalization/internationalization.h>
+#include <export/contracts/iwidgetscontract.h>
+#include <eventos/toolevents.h>
+#include <api/controllers/ieventscontroller.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+
+#include <api/iwidgetsmanager.h>
+#include <widgets/wflecha.h>
+#include <widgets/welipse.h>
+#include <widgets/wpunto.h>
+#include <widgets/wtrapezoide.h>
+#include <widgets/wfreeform.h>
+#include <widgets/wpolygon.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+
+#include <iostream>
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+
+#define USAR_FLECHA     1451
+#define USAR_ELIPSE     1452
+#define USAR_TRAPEZOIDE 1453
+#define USAR_FREEFORM   1454
+#define USAR_PUNTO      1455
+#define USAR_POLYGON      1456
+
+namespace GNC
+{
+namespace GUI
+{
+class EventHandlerMarkerTools: public wxEvtHandler
+{
+public:
+        EventHandlerMarkerTools(wxEvtHandler* pParent, GNC::MarkerTool* pHerramienta):wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pHerramienta=pHerramienta;
+                // Connect Events
+                m_pParent->Connect(USAR_PUNTO, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaPuntoClick),NULL,this);
+                m_pParent->Connect(USAR_FLECHA, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaFlechaClick),NULL,this);
+                m_pParent->Connect(USAR_ELIPSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaElipseClick),NULL,this);
+                m_pParent->Connect(USAR_TRAPEZOIDE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaTrapezoideClick),NULL,this);
+                m_pParent->Connect(USAR_FREEFORM,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaFreeFormClick),NULL,this);
+                m_pParent->Connect(USAR_POLYGON,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaPolygonClick),NULL,this);
+        }
+
+        ~EventHandlerMarkerTools()
+        {
+                m_pParent->Disconnect(USAR_PUNTO, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaPuntoClick),NULL,this);
+                m_pParent->Disconnect(USAR_FLECHA, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaFlechaClick),NULL,this);
+                m_pParent->Disconnect(USAR_ELIPSE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaElipseClick),NULL,this);
+                m_pParent->Disconnect(USAR_TRAPEZOIDE, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaTrapezoideClick),NULL,this);
+                m_pParent->Disconnect(USAR_FREEFORM,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaFreeFormClick),NULL,this);
+                m_pParent->Disconnect(USAR_POLYGON,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerMarkerTools::OnHerramientaPolygonClick),NULL,this);
+                m_pParent = NULL;
+                m_pHerramienta = NULL;
+        }
+
+        virtual void OnHerramientaPuntoClick( wxCommandEvent& event )
+        {
+                m_pHerramienta->SetTipoMarcado(GNC::MarkerTool::TW_Punto);
+                event.Skip(false);
+        }
+
+        virtual void OnHerramientaFlechaClick( wxCommandEvent& event )
+        {
+                m_pHerramienta->SetTipoMarcado(GNC::MarkerTool::TW_Flecha);
+                event.Skip(false);
+        }
+
+        virtual void OnHerramientaElipseClick( wxCommandEvent& event )
+        {
+                m_pHerramienta->SetTipoMarcado(GNC::MarkerTool::TW_Elipse);
+                event.Skip(false);
+        }
+
+        virtual void OnHerramientaTrapezoideClick( wxCommandEvent& event )
+        {
+                m_pHerramienta->SetTipoMarcado(GNC::MarkerTool::TW_Trapezoide);
+                event.Skip(false);
+        }
+
+        virtual void OnHerramientaFreeFormClick( wxCommandEvent& event )
+        {
+                m_pHerramienta->SetTipoMarcado(GNC::MarkerTool::TW_FreeForm);
+                event.Skip(false);
+        }
+
+        virtual void OnHerramientaPolygonClick( wxCommandEvent& event )
+        {
+                m_pHerramienta->SetTipoMarcado(GNC::MarkerTool::TW_Polygon);
+                event.Skip(false);
+        }
+
+        GNC::MarkerTool* m_pHerramienta;
+        wxEvtHandler* m_pParent;
+};
+}
+}
+
+GNC::MarkerTool::MarkerTool()
+{
+        m_MarcadoActivo = TW_Punto;
+        m_pBuilder = NULL;
+}
+
+GNC::MarkerTool::~MarkerTool()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
+
+
+//------------------------------------------------------------------------------
+//region "ITool/IContract realization"
+
+GNC::GCS::ITool* GNC::MarkerTool::NewTool()
+{
+        return new GNC::MarkerTool();
+}
+
+
+void GNC::MarkerTool::Connect()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+        SetTipoMarcado(m_MarcadoActivo);
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        if (m_pBuilder != NULL) {
+                WidgetsContract->GetManager()->SetCursor(m_pBuilder->GetCursor());
+        } else {
+                WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        }
+}
+
+void GNC::MarkerTool::Disconnect()
+{
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
+
+bool GNC::MarkerTool::HasDropDownMenu()
+{
+        return true;
+}
+
+void GNC::MarkerTool::AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu,USAR_PUNTO,_("Point"), GinkgoResourcesManager::MarkingBar::GetIcoPunto(), new GNC::GUI::EventHandlerMarkerTools(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu,USAR_FLECHA,_("Arrow"), GinkgoResourcesManager::MarkingBar::GetIcoFlecha(),new GNC::GUI::EventHandlerMarkerTools(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu,USAR_ELIPSE,_("Ellipse"), GinkgoResourcesManager::MarkingBar::GetIcoElipse(), new GNC::GUI::EventHandlerMarkerTools(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu,USAR_TRAPEZOIDE,_("Trapezoid"), GinkgoResourcesManager::MarkingBar::GetIcoTrapezoide(), new GNC::GUI::EventHandlerMarkerTools(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu,USAR_POLYGON,_("Polygon"), GinkgoResourcesManager::MarkingBar::GetIcoPoligono(), new GNC::GUI::EventHandlerMarkerTools(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu,USAR_FREEFORM,_("Free form"), GinkgoResourcesManager::MarkingBar::GetIcoFreeForm(), new GNC::GUI::EventHandlerMarkerTools(pParent, this)));
+}
+
+
+void GNC::MarkerTool::SetTipoMarcado(TipoMarcado tipo)
+{
+        wxBitmap icon;
+        if (m_MarcadoActivo == tipo && m_pBuilder != NULL) {
+                return;
+        } else {
+                if (m_pBuilder != NULL) {
+                        delete m_pBuilder;
+                        m_pBuilder = NULL;
+                }
+                m_MarcadoActivo = tipo;
+                switch (m_MarcadoActivo) {
+                case TW_Flecha:
+                        m_pBuilder = new GNC::GCS::Widgets::WFlechaBuilder(WidgetsContract->GetManager(), GetTriggerButton());
+                        icon = GinkgoResourcesManager::MarkingBar::GetIcoFlecha();
+                        break;
+                case TW_Elipse:
+                        m_pBuilder = new GNC::GCS::Widgets::WElipseBuilder(WidgetsContract->GetManager(), GetTriggerButton(), (unsigned long)this);
+                        icon = GinkgoResourcesManager::MarkingBar::GetIcoElipse();
+                        break;
+                case TW_Trapezoide:
+                        m_pBuilder = new GNC::GCS::Widgets::WTrapezoideBuilder(WidgetsContract->GetManager(), GetTriggerButton(), (unsigned long)this);
+                        icon = GinkgoResourcesManager::MarkingBar::GetIcoTrapezoide();
+                        break;
+                case TW_FreeForm:
+                        m_pBuilder = new GNC::GCS::Widgets::WFreeFormBuilder(WidgetsContract->GetManager(), GetTriggerButton());
+                        icon = GinkgoResourcesManager::MarkingBar::GetIcoFreeForm();
+                        break;
+                case TW_Punto: {
+                        m_pBuilder = new GNC::GCS::Widgets::WPuntoBuilder(WidgetsContract->GetManager(), GetTriggerButton(), (unsigned long)this);
+                        icon = GinkgoResourcesManager::MarkingBar::GetIcoPunto();
+                }
+                break;
+                case TW_Polygon: {
+                        m_pBuilder = new GNC::GCS::Widgets::WPolygonBuilder(WidgetsContract->GetManager(), GetTriggerButton());
+                        icon = GinkgoResourcesManager::MarkingBar::GetIcoPoligono();
+                }
+                break;
+                default:
+                        std::cerr << "Error, Elemento de marcado no soportado." << std::endl;
+                        break;
+                }
+                if (m_pBuilder != NULL) {
+                        WidgetsContract->GetManager()->SetCursor(m_pBuilder->GetCursor());
+                } else {
+                        WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+                }
+        }
+        if (icon.IsOk()) {
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ChangeToolIconEvent(&icon, this, m_pParent));
+        }
+}
+
+//endregion
+#endif
diff --git a/cadxcore/main/tools/markertool.h b/cadxcore/main/tools/markertool.h
new file mode 100644
index 0000000..64329b9
--- /dev/null
+++ b/cadxcore/main/tools/markertool.h
@@ -0,0 +1,77 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_MARKERTOOL)
+#ifndef MARKERTOOL_H
+#define MARKERTOOL_H
+#include <api/api.h>
+#include <export/tools/imarkertool.h>
+
+
+namespace GNC
+{
+
+namespace GCS
+{
+namespace Widgets
+{
+class IWidgetBuilder;
+}
+}
+
+class EXTAPI MarkerTool : public GNC::GCS::IMarkerTool
+{
+public:
+        typedef enum TipoMarcado {
+                TW_Ninguno,
+                TW_Flecha,
+                TW_Elipse,
+                TW_Punto,
+                TW_Trapezoide,
+                TW_FreeForm,
+                TW_Polygon
+        } TipoMarcado;
+
+        MarkerTool();
+        ~MarkerTool();
+
+//region "ITool/IContract realization"
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+
+        virtual bool HasDropDownMenu();
+        void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+//endregion
+        //region "Eventos refinados desde los paneles"
+
+        virtual void SetTipoMarcado(TipoMarcado tipo);
+
+        //endregion
+
+protected:
+        GNC::GCS::Widgets::IWidgetBuilder*                 m_pBuilder;
+        TipoMarcado                                        m_MarcadoActivo;
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/metricgridtool.cpp b/cadxcore/main/tools/metricgridtool.cpp
new file mode 100644
index 0000000..df39ca1
--- /dev/null
+++ b/cadxcore/main/tools/metricgridtool.cpp
@@ -0,0 +1,370 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "metricgridtool.h"
+#if defined(ENABLE_METRICGRIDTOOL)
+#include <widgets/wrejilla.h>
+#include <wx/aui/aui.h>
+#include <wx/spinctrl.h>
+#include <wx/dialog.h>
+#include <wx/statbox.h>
+#include <wx/stattext.h>
+#include <wx/button.h>
+#include <wx/menu.h>
+#include <wx/choice.h>
+
+
+#include <api/ievento.h>
+#include <eventos/render.h>
+#include <api/controllers/ieventscontroller.h>
+#include <export/contracts/iwidgetscontract.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+
+#include <api/iwidgetsmanager.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+
+#define ACTIVAR_REJILLA  1241
+#define ESCALA_REJILLA 1242
+
+namespace GNC
+{
+namespace GUI
+{
+class DialogoRejilla: public wxDialog
+{
+public:
+        typedef enum TMetrica {
+                TM_UM = 0,
+                TM_MM,
+                TM_CM,
+                TM_M
+        } TMetrica;
+
+        DialogoRejilla(wxWindow* pParent, GNC::MetricGridTool* pHerramienta):
+                wxDialog(pParent,wxID_ANY,_("Grid"),wxDefaultPosition,wxDefaultSize,wxDEFAULT_DIALOG_STYLE)
+        {
+                m_pHerramienta=pHerramienta;
+
+                this->SetSizeHints( wxDefaultSize, wxDefaultSize );
+
+                wxBoxSizer* bSizer5;
+                bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+                wxStaticBoxSizer* sbSizer2;
+                sbSizer2 = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Grid Scale") ), wxVERTICAL );
+
+                wxFlexGridSizer* fgSizer1;
+                fgSizer1 = new wxFlexGridSizer( 2, 3, 0, 0 );
+                fgSizer1->SetFlexibleDirection( wxBOTH );
+                fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+                wxStaticText* m_staticText4 = new wxStaticText( this, wxID_ANY, _("Scale X"), wxDefaultPosition, wxDefaultSize, 0 );
+                fgSizer1->Add(m_staticText4,0,wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL,5);
+
+                m_pSpinEscalaX = new wxSpinCtrl( this, wxID_ANY, wxT("50"), wxDefaultPosition, wxSize(60,-1), wxSP_ARROW_KEYS, 1, 10000, 50 );
+                m_pSpinEscalaX->SetToolTip(_("X axis scale"));
+                fgSizer1->Add(m_pSpinEscalaX,0,wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL,5);
+
+                std::string micrometros("µm.");
+                wxString choices[] = {wxString::FromUTF8(micrometros.c_str()),wxT("mm."),wxT("cm."),wxT("m.")};
+                int choice2NChoices = sizeof( choices ) / sizeof( wxString );
+                m_pChoiceX = new wxChoice(this,wxID_ANY, wxDefaultPosition, wxDefaultSize, choice2NChoices, choices);
+                fgSizer1->Add(m_pChoiceX,0,wxALL|wxALIGN_CENTER_VERTICAL,5);
+
+                wxStaticText* m_staticText5 = new wxStaticText( this, wxID_ANY, _("Scale Y"), wxDefaultPosition, wxDefaultSize, 0 );
+                fgSizer1->Add(m_staticText5,0,wxALL|wxEXPAND,5);
+
+                m_pSpinEscalaY = new wxSpinCtrl( this, wxID_ANY, wxT("50"), wxDefaultPosition, wxSize(60,-1), wxSP_ARROW_KEYS, 1, 10000, 50 );
+                m_pSpinEscalaY->SetToolTip(_("Y axis scale"));
+                fgSizer1->Add(m_pSpinEscalaY,0,wxALL|wxEXPAND|wxALIGN_CENTER_VERTICAL,5);
+
+                m_pChoiceY = new wxChoice(this,wxID_ANY, wxDefaultPosition, wxDefaultSize, choice2NChoices, choices);
+                fgSizer1->Add(m_pChoiceY,0,wxALL|wxALIGN_CENTER_VERTICAL,5);
+
+                sbSizer2->Add( fgSizer1, 1, wxEXPAND|wxALL, 5 );
+
+                bSizer5->Add( sbSizer2, 1,wxALL|wxEXPAND, 5 );
+
+                wxButton* m_button3 = new wxButton( this, wxID_OK, _("Ok"), wxDefaultPosition, wxDefaultSize, 0 );
+                m_button3->SetDefault();
+                bSizer5->Add( m_button3, 0, wxALL|wxALIGN_RIGHT, 5 );
+
+                this->SetSizer( bSizer5 );
+                this->Layout();
+                bSizer5->Fit( this );
+
+                this->Centre( wxBOTH );
+
+
+                double escalaX = m_pHerramienta->GetScaleX();
+                m_pChoiceX->Select((int)AjustaAMetricaApropiada(escalaX));
+                m_pSpinEscalaX->SetValue(escalaX);
+                double escalaY = m_pHerramienta->GetScaleY();
+                m_pChoiceY->Select((int)AjustaAMetricaApropiada(escalaY));
+                m_pSpinEscalaY->SetValue(escalaY);
+
+                m_pSpinEscalaX->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DialogoRejilla::OnSpinCtrlX ), NULL, this );
+                m_pSpinEscalaY->Connect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DialogoRejilla::OnSpinCtrlY ), NULL, this );
+                m_pChoiceX->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DialogoRejilla::OnEscalaX), NULL, this);
+                m_pChoiceY->Connect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DialogoRejilla::OnEscalaY), NULL, this);
+        }
+
+        ~DialogoRejilla()
+        {
+                m_pSpinEscalaX->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DialogoRejilla::OnSpinCtrlX ), NULL, this );
+                m_pSpinEscalaX->Disconnect( wxEVT_COMMAND_SPINCTRL_UPDATED, wxSpinEventHandler( DialogoRejilla::OnSpinCtrlY ), NULL, this );
+                m_pChoiceX->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DialogoRejilla::OnEscalaX), NULL, this);
+                m_pChoiceY->Disconnect( wxEVT_COMMAND_CHOICE_SELECTED, wxCommandEventHandler( DialogoRejilla::OnEscalaY), NULL, this);
+                m_pHerramienta = NULL;
+        }
+
+        TMetrica AjustaAMetricaApropiada(double &escala)
+        {
+                if (escala > 10000.0f) {
+                        escala = (int)(escala / 1000.0f);
+                        return TM_M;
+                } else if (escala > 100.0f) {
+                        escala = (int)(escala / 10.0f);
+                        return TM_CM;
+                } else if (escala < 10.0f) {
+                        escala = (int)(escala * 1000.0f);
+                        return TM_UM;
+                } else {
+                        escala = (int)(escala);
+                        return TM_MM;
+                }
+        }
+
+        double TransformToMM(double valor, TMetrica escala)
+        {
+                switch (escala) {
+                case TM_M:
+                        return valor * 1000.0;
+                case TM_CM:
+                        return valor*10.0;
+                case TM_UM:
+                        return valor / 1000.0;
+                case TM_MM:
+                        return valor;
+                }
+                return valor;
+        }
+
+        void OnSpinCtrlX( wxSpinEvent&  )
+        {
+                const double valor = TransformToMM(m_pSpinEscalaX->GetValue(), (TMetrica)m_pChoiceX->GetSelection());
+                m_pHerramienta->SetScaleX(valor);
+        }
+
+        void OnEscalaX( wxCommandEvent &)
+        {
+                const double valor = TransformToMM(m_pSpinEscalaX->GetValue(), (TMetrica)m_pChoiceX->GetSelection());
+                m_pHerramienta->SetScaleX(valor);
+        }
+
+        void OnSpinCtrlY( wxSpinEvent&  )
+        {
+                const double valor = TransformToMM(m_pSpinEscalaY->GetValue(), (TMetrica)m_pChoiceY->GetSelection());
+                m_pHerramienta->SetScaleY(valor);
+        }
+
+        void OnEscalaY( wxCommandEvent &)
+        {
+                const double valor = TransformToMM(m_pSpinEscalaY->GetValue(), (TMetrica)m_pChoiceY->GetSelection());
+                m_pHerramienta->SetScaleY(valor);
+        }
+
+        wxSpinCtrl* m_pSpinEscalaX;
+        wxSpinCtrl* m_pSpinEscalaY;
+        wxChoice* m_pChoiceX;
+        wxChoice* m_pChoiceY;
+        GNC::MetricGridTool* m_pHerramienta;
+};
+
+
+class MenuMetricGridTool : public wxMenu
+{
+public:
+        MenuMetricGridTool(wxEvtHandler* pParent, GNC::MetricGridTool* pHerramienta):wxMenu()
+        {
+                m_pParent = pParent;
+                m_pHerramienta=pHerramienta;
+                wxMenuItem* pItemVer = new wxMenuItem(this,ACTIVAR_REJILLA,_("Show grid"),_("Show grid"),wxITEM_NORMAL);
+                wxMenuItem* pItemEscala = new wxMenuItem(this,ESCALA_REJILLA,_("Configure Grid ..."),_("Configure Grid"),wxITEM_NORMAL);
+#ifdef __WXMSW__
+                pItemVer->SetBitmaps(GinkgoResourcesManager::GridBar::GetIcoVerRejilla());
+#else
+                pItemVer->SetBitmap(GinkgoResourcesManager::GridBar::GetIcoVerRejilla());
+#endif
+                m_pParent->Connect(pItemVer->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MenuMetricGridTool::OnActivarRejillaClick),NULL,this);
+                m_pParent->Connect(pItemVer->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuMetricGridTool::OnUpdateUIMostrar),NULL,this);
+                m_pParent->Connect(pItemEscala->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MenuMetricGridTool::OnEscalaClick),NULL,this);
+                m_pParent->Connect(pItemEscala->GetId(), wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuMetricGridTool::OnUpdateUIHerramienta),NULL,this);
+                Append(pItemVer);
+                Append(pItemEscala);
+
+                m_pParent->Connect(m_pHerramienta->ID, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuMetricGridTool::OnUpdateUIHerramienta),NULL,this);
+        }
+
+        ~MenuMetricGridTool()
+        {
+                m_pParent->Disconnect(ACTIVAR_REJILLA, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MenuMetricGridTool::OnActivarRejillaClick),NULL,this);
+                m_pParent->Disconnect(ESCALA_REJILLA, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MenuMetricGridTool::OnEscalaClick),NULL,this);
+                m_pParent->Disconnect(ACTIVAR_REJILLA, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuMetricGridTool::OnUpdateUIMostrar),NULL,this);
+                m_pParent->Disconnect(ESCALA_REJILLA, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuMetricGridTool::OnUpdateUIHerramienta),NULL,this);
+
+                m_pParent->Disconnect(m_pHerramienta->ID, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuMetricGridTool::OnUpdateUIHerramienta),NULL,this);
+
+                m_pParent = NULL;
+                m_pHerramienta = NULL;
+        }
+
+        void OnActivarRejillaClick( wxCommandEvent& event )
+        {
+                m_pHerramienta->ToggleGrid();
+                event.Skip(false);
+        }
+
+        void OnEscalaClick( wxCommandEvent& event )
+        {
+                DialogoRejilla dlg(NULL,m_pHerramienta);
+                dlg.ShowModal();
+                event.Skip(false);
+        }
+
+        void OnUpdateUIMostrar(wxUpdateUIEvent& event)
+        {
+                if(m_pHerramienta->IsVisible()) {
+                        event.SetText(_("Hide Grid"));
+                } else {
+                        event.SetText(_("Show Grid"));
+                }
+        }
+
+        void OnUpdateUIHerramienta(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->IsEnabled());
+        }
+
+        GNC::MetricGridTool* m_pHerramienta;
+        wxEvtHandler* m_pParent;
+};
+}
+}
+
+
+
+
+
+GNC::GCS::ITool* GNC::MetricGridTool::NewTool()
+{
+        return new GNC::MetricGridTool();
+}
+
+GNC::MetricGridTool::MetricGridTool()
+{
+}
+GNC::MetricGridTool::~MetricGridTool()
+{
+}
+
+bool GNC::MetricGridTool::ExecuteAction()
+{
+        ToggleGrid();
+        return true;
+}
+
+void GNC::MetricGridTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                wxMenu* pGridMenu = new GNC::GUI::MenuMetricGridTool(pParent,this);
+                pMenu->Append(ID,wxString::FromUTF8(Name.c_str()),pGridMenu);
+                pMenu->Enable(ID,Enabled);
+        }
+}
+
+bool GNC::MetricGridTool::IsVisible()
+{
+        GNC::GCS::Widgets::WRejillaBuilder* pRejillaBuilder = new GNC::GCS::Widgets::WRejillaBuilder(WidgetsContract->GetManager(), (unsigned long)this);
+        bool visible = pRejillaBuilder->IsRejillaVisible();
+        delete pRejillaBuilder;
+        return visible;
+}
+
+void GNC::MetricGridTool::ToggleGrid()
+{
+        double spacing[3] = {1.0,1.0,1.0};
+        int dimensions[3] = {0,0,0};
+        WidgetsContract->GetViewerActivo()->GetSpacing(spacing);
+        WidgetsContract->GetViewerActivo()->GetDimensions(dimensions);
+
+        double escalaXDefecto = spacing[0] * dimensions [0] / 10;
+        double escalaYDefecto = spacing[1] * dimensions [1] / 10;
+
+        GNC::GCS::Widgets::WRejillaBuilder* pRejillaBuilder = new GNC::GCS::Widgets::WRejillaBuilder(WidgetsContract->GetManager(), (unsigned long)this, escalaXDefecto, escalaYDefecto);
+        pRejillaBuilder->ActivarRejilla(!pRejillaBuilder->IsRejillaVisible());
+        delete pRejillaBuilder;
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoRender(WidgetsContract->GetManager()->GetVista()));
+}
+
+void GNC::MetricGridTool::SetScaleX(double escala)
+{
+        GNC::GCS::Widgets::WRejillaBuilder* pRejillaBuilder = new GNC::GCS::Widgets::WRejillaBuilder(WidgetsContract->GetManager(), (unsigned long)this);
+        pRejillaBuilder->ActivarRejilla(true);
+        pRejillaBuilder->SetEscalaX(escala);
+        delete pRejillaBuilder;
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoRender(WidgetsContract->GetManager()->GetVista()));
+}
+
+void GNC::MetricGridTool::SetScaleY(double escala)
+{
+        GNC::GCS::Widgets::WRejillaBuilder* pRejillaBuilder = new GNC::GCS::Widgets::WRejillaBuilder(WidgetsContract->GetManager(), (unsigned long)this);
+        pRejillaBuilder->ActivarRejilla(true);
+        pRejillaBuilder->SetEscalaY(escala);
+        delete pRejillaBuilder;
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoRender(WidgetsContract->GetManager()->GetVista()));
+}
+
+double GNC::MetricGridTool::GetScaleX()
+{
+        double scale = 50.0;
+        GNC::GCS::Widgets::WRejillaBuilder* pRejillaBuilder = new GNC::GCS::Widgets::WRejillaBuilder(WidgetsContract->GetManager(), (unsigned long)this);
+        scale = pRejillaBuilder->GetEscalaX();
+        delete pRejillaBuilder;
+        return scale;
+}
+
+double GNC::MetricGridTool::GetScaleY()
+{
+        double scale = 50.0;
+        GNC::GCS::Widgets::WRejillaBuilder* pRejillaBuilder = new GNC::GCS::Widgets::WRejillaBuilder(WidgetsContract->GetManager(), (unsigned long)this);
+        scale = pRejillaBuilder->GetEscalaY();
+        delete pRejillaBuilder;
+        return scale;
+}
+
+
+#endif
diff --git a/cadxcore/main/tools/metricgridtool.h b/cadxcore/main/tools/metricgridtool.h
new file mode 100644
index 0000000..a6c9bc0
--- /dev/null
+++ b/cadxcore/main/tools/metricgridtool.h
@@ -0,0 +1,56 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_METRICGRIDTOOL)
+#ifndef METRICGRIDTOOL_H
+#define METRICGRIDTOOL_H
+#include <export/tools/imetricgridtool.h>
+
+#include <api/api.h>
+
+#include <map>
+
+namespace GNC
+{
+class EXTAPI MetricGridTool : public GNC::GCS::IMetricGridTool
+{
+
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        MetricGridTool();
+        ~MetricGridTool();
+
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+        bool IsVisible();
+        void ToggleGrid();
+
+        void SetScaleX(double escala);
+        void SetScaleY(double escala);
+
+        double GetScaleX();
+        double GetScaleY();
+protected:
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/notetool.cpp b/cadxcore/main/tools/notetool.cpp
new file mode 100644
index 0000000..5817c3d
--- /dev/null
+++ b/cadxcore/main/tools/notetool.cpp
@@ -0,0 +1,82 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "notetool.h"
+#if defined(ENABLE_NOTETOOL)
+#include <export/contracts/iwidgetscontract.h>
+
+#include <api/globals.h>
+#include <api/iwidgetsmanager.h>
+
+#include <widgets/wnota.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+
+
+GNC::NoteTool::NoteTool()
+{
+        m_pBuilder = NULL;
+}
+
+GNC::NoteTool::~NoteTool()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
+
+
+//------------------------------------------------------------------------------
+//region "ITool/IContract realization"
+
+GNC::GCS::ITool* GNC::NoteTool::NewTool()
+{
+        return new GNC::NoteTool();
+}
+
+void GNC::NoteTool::Connect()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+        m_pBuilder = new GNC::GCS::Widgets::WNotaBuilder(WidgetsContract->GetManager(), GetTriggerButton());
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(m_pBuilder->GetCursor());
+}
+
+void GNC::NoteTool::Disconnect()
+{
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
+
+//endregion
+#endif
diff --git a/cadxcore/main/tools/notetool.h b/cadxcore/main/tools/notetool.h
new file mode 100644
index 0000000..bb4bbd4
--- /dev/null
+++ b/cadxcore/main/tools/notetool.h
@@ -0,0 +1,59 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_NOTETOOL)
+#ifndef NOTETOOL_H
+#define NOTETOOL_H
+#include <export/tools/inotetool.h>
+#include <api/api.h>
+
+
+namespace GNC
+{
+
+namespace GCS
+{
+namespace Widgets
+{
+class WNotaBuilder;
+}
+}
+
+class EXTAPI NoteTool : public GNC::GCS::INoteTool
+{
+public:
+        NoteTool();
+        ~NoteTool();
+//------------------------------------------------------------------------------
+//region "ITool/IContract realization"
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+
+//endregion
+
+protected:
+        GNC::GCS::Widgets::WNotaBuilder* m_pBuilder;
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/openfiletool.cpp b/cadxcore/main/tools/openfiletool.cpp
new file mode 100644
index 0000000..730700d
--- /dev/null
+++ b/cadxcore/main/tools/openfiletool.cpp
@@ -0,0 +1,54 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+
+#include "openfiletool.h"
+
+#include <api/controllers/icontroladorpermisos.h>
+#include <main/gui/open/abrir.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+
+
+#include <api/internationalization/internationalization.h>
+
+//----------------------------------------------------------------------
+
+GNC::OpenFileTool::OpenFileTool(): GNC::GCS::IHistoryTool(ID,GNC::GCS::IHistoryTool::TFamily_Open, _Std("Open File"), _Std("Open File")+ " \tAlt+f", GinkgoResourcesManager::MenuIcons::GetIcoOpenFile())
+{
+}
+
+GNC::OpenFileTool::~OpenFileTool()
+{
+}
+
+bool GNC::OpenFileTool::Enabled()
+{
+        return GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire");
+}
+
+void GNC::OpenFileTool::Execute()
+{
+        GNC::GUI::Abrir::AbrirFichero(GNC::HistoryToolsController::Instance()->GetHistoryPanel()->GetWxWindow());
+}
+
+
+
diff --git a/cadxcore/main/tools/openfiletool.h b/cadxcore/main/tools/openfiletool.h
new file mode 100644
index 0000000..6c86cb6
--- /dev/null
+++ b/cadxcore/main/tools/openfiletool.h
@@ -0,0 +1,44 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#if defined(ENABLE_OPENFILETOOL)
+#ifndef OPENFILETOOL_H
+#define OPENFILETOOL_H
+#include <main/controllers/historytoolscontroller.h>
+#include <export/tools/iherramientascore.h>
+
+namespace GNC
+{
+
+class OpenFileTool : public GNC::GCS::IHistoryTool
+{
+public:
+        static const GNC::GCS::IHistoryTool::UID ID =  HCore_OpenFile;
+        OpenFileTool();
+        virtual ~OpenFileTool();
+        virtual bool Enabled();
+
+        virtual void Execute();
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/openfoldertool.cpp b/cadxcore/main/tools/openfoldertool.cpp
new file mode 100644
index 0000000..e8ad631
--- /dev/null
+++ b/cadxcore/main/tools/openfoldertool.cpp
@@ -0,0 +1,54 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "openfoldertool.h"
+#include <api/internationalization/internationalization.h>
+
+#if defined(ENABLE_OPENFOLDERTOOL)
+
+#include <main/gui/open/abrir.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+#include <main/controllers/controladorpermisos.h>
+
+//----------------------------------------------------------------------
+
+GNC::OpenFolderTool::OpenFolderTool(): GNC::GCS::IHistoryTool(ID,GNC::GCS::IHistoryTool::TFamily_Open, _Std("Open folder"), _Std("Open folder")+ " \tAlt+o", GinkgoResourcesManager::MenuIcons::GetIcoOpenDir())
+{
+}
+
+GNC::OpenFolderTool::~OpenFolderTool()
+{
+}
+
+bool GNC::OpenFolderTool::Enabled()
+{
+        return GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire");
+}
+
+void GNC::OpenFolderTool::Execute()
+{
+        GNC::GUI::Abrir::AbrirDirectorio(GNC::HistoryToolsController::Instance()->GetHistoryPanel()->GetWxWindow());
+}
+
+
+
+#endif
diff --git a/cadxcore/main/tools/openfoldertool.h b/cadxcore/main/tools/openfoldertool.h
new file mode 100644
index 0000000..578dfc2
--- /dev/null
+++ b/cadxcore/main/tools/openfoldertool.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_OPENFOLDERTOOL)
+#ifndef OPENFOLDERTOOL_H
+#define OPENFOLDERTOOL_H
+#include <main/controllers/historytoolscontroller.h>
+#include <export/tools/iherramientascore.h>
+
+namespace GNC
+{
+
+class OpenFolderTool : public GNC::GCS::IHistoryTool
+{
+public:
+        static const GNC::GCS::IHistoryTool::UID ID =  HCore_OpenFolder;
+        OpenFolderTool();
+        virtual ~OpenFolderTool();
+        virtual bool Enabled();
+
+        virtual void Execute();
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/openginkgocloudlinktool.cpp b/cadxcore/main/tools/openginkgocloudlinktool.cpp
new file mode 100644
index 0000000..a5e0f71
--- /dev/null
+++ b/cadxcore/main/tools/openginkgocloudlinktool.cpp
@@ -0,0 +1,55 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "openginkgocloudlinktool.h"
+
+#include <api/controllers/icontroladorpermisos.h>
+#include <main/gui/ginkgocloud/openginkgoclouddialog.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+
+
+#include <api/internationalization/internationalization.h>
+
+//----------------------------------------------------------------------
+
+GNC::OpenGinkgoCloudLinkTool::OpenGinkgoCloudLinkTool(): GNC::GCS::IHistoryTool(ID,GNC::GCS::IHistoryTool::TFamily_Open, _Std("Open Ginkgo Cloud link"), _Std("Open Ginkgo Cloud link"), GinkgoResourcesManager::ToolIcons::GetIcoDownloadCloud())
+{
+}
+
+GNC::OpenGinkgoCloudLinkTool::~OpenGinkgoCloudLinkTool()
+{
+}
+
+bool GNC::OpenGinkgoCloudLinkTool::Enabled()
+{
+        return GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire") && GNC::GCS::IControladorPermisos::Instance()->Get("ginkgocloud","download");
+}
+
+void GNC::OpenGinkgoCloudLinkTool::Execute()
+{
+        GNC::GUI::OpenGinkgoCloudDialog* dlg = new GNC::GUI::OpenGinkgoCloudDialog(GNC::HistoryToolsController::Instance()->GetHistoryPanel()->GetWxWindow());
+        dlg->Show();
+        dlg->Raise();
+}
+
+
+
diff --git a/cadxcore/main/tools/openginkgocloudlinktool.h b/cadxcore/main/tools/openginkgocloudlinktool.h
new file mode 100644
index 0000000..8ba5cf1
--- /dev/null
+++ b/cadxcore/main/tools/openginkgocloudlinktool.h
@@ -0,0 +1,37 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <main/controllers/historytoolscontroller.h>
+#include <export/tools/iherramientascore.h>
+
+namespace GNC
+{
+
+class OpenGinkgoCloudLinkTool : public GNC::GCS::IHistoryTool
+{
+public:
+        static const GNC::GCS::IHistoryTool::UID ID =  HCore_OpenGinkgoCloudLinkHistory;
+        OpenGinkgoCloudLinkTool();
+        virtual ~OpenGinkgoCloudLinkTool();
+        virtual bool Enabled();
+
+        virtual void Execute();
+};
+}
diff --git a/cadxcore/main/tools/openremovabletool.cpp b/cadxcore/main/tools/openremovabletool.cpp
new file mode 100644
index 0000000..5fc55d5
--- /dev/null
+++ b/cadxcore/main/tools/openremovabletool.cpp
@@ -0,0 +1,59 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "openremovabletool.h"
+
+#if defined(ENABLE_OPENREMOVABLETOOL)
+
+#include <commands/openremovableunit.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+#include <main/controllers/controladorpermisos.h>
+#include <main/controllers/commandcontroller.h>
+#include <api/internationalization/internationalization.h>
+
+//----------------------------------------------------------------------
+
+GNC::OpenRemovableTool::OpenRemovableTool(): GNC::GCS::IHistoryTool(ID,GNC::GCS::IHistoryTool::TFamily_Open, _Std("Open removable unit"),_Std("Open removable unit"), GinkgoResourcesManager::MenuIcons::GetIcoRemovableUnit())
+{
+}
+
+GNC::OpenRemovableTool::~OpenRemovableTool()
+{
+}
+
+bool GNC::OpenRemovableTool::Enabled()
+{
+#ifdef _WIN32
+        return GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire");
+#else
+        return false;
+#endif
+}
+
+void GNC::OpenRemovableTool::Execute()
+{
+        GADAPI::OpenRemovableUnitCommandParams* pParams = new GADAPI::OpenRemovableUnitCommandParams(GNC::HistoryToolsController::Instance()->GetHistoryPanel()->GetWxWindow());
+        GADAPI::OpenRemovableUnitCommand* pCmd = new GADAPI::OpenRemovableUnitCommand(pParams);
+        GNC::GCS::ICommandController::Instance()->ProcessAsync("Listing units...", pCmd, NULL);
+}
+
+#endif
diff --git a/cadxcore/main/tools/openremovabletool.h b/cadxcore/main/tools/openremovabletool.h
new file mode 100644
index 0000000..af59193
--- /dev/null
+++ b/cadxcore/main/tools/openremovabletool.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_OPENREMOVABLETOOL)
+#ifndef OPENREMOVABLETOOL_H
+#define OPENREMOVABLETOOL_H
+#include <main/controllers/historytoolscontroller.h>
+#include <export/tools/iherramientascore.h>
+
+namespace GNC
+{
+
+class OpenRemovableTool : public GNC::GCS::IHistoryTool
+{
+public:
+        static const GNC::GCS::IHistoryTool::UID ID =  HCore_OpenRemovable;
+        OpenRemovableTool();
+        virtual ~OpenRemovableTool();
+        virtual bool Enabled();
+
+        virtual void Execute();
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/pacsuploadtool.cpp b/cadxcore/main/tools/pacsuploadtool.cpp
new file mode 100644
index 0000000..1b67fe2
--- /dev/null
+++ b/cadxcore/main/tools/pacsuploadtool.cpp
@@ -0,0 +1,75 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "pacsuploadtool.h"
+#include <wx/dialog.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+
+#include <api/internationalization/internationalization.h>
+#include <export/contracts/iviewcontract.h>
+#include <api/ivista.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/gui/pacsupload/pacsuploaddialog.h>
+#include <main/entorno.h>
+#include <api/istudycontext.h>
+#include <commands/sendpacscommand.h>
+#include <main/controllers/commandcontroller.h>
+
+//----------------------------------------------------------------------
+
+GNC::GCS::ITool* GNC::PACSUploadTool::NewTool()
+{
+        return new GNC::PACSUploadTool();
+}
+
+GNC::PACSUploadTool::PACSUploadTool()
+{
+}
+GNC::PACSUploadTool::~PACSUploadTool()
+{
+}
+
+bool GNC::PACSUploadTool::ExecuteAction()
+{
+        std::list<long> viewSeries;
+        viewSeries.insert(viewSeries.begin(), ViewContract->GetView()->GetEstudio()->OpenedSeries.begin(), ViewContract->GetView()->GetEstudio()->OpenedSeries.end());
+
+        GNC::GUI::PACSUploadDialog dlg(ViewContract->GetView()->GetWindow(), viewSeries);
+
+        if (dlg.ShowModal() == wxID_OK) {
+                std::list<long> listOfSeries;
+                listOfSeries = dlg.GetSelectedSeries();
+                if (!listOfSeries.empty()) {
+                        GADAPI::SendPACSCommand* pCmd = new GADAPI::SendPACSCommand(dlg.GetSelectedServer(), "", listOfSeries);
+                        GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Send to PACS..."),pCmd, NULL);
+                }
+        }
+
+        return true;
+}
+
+void GNC::PACSUploadTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                GNC::GUI::wxDefaultEvtHandlerTool* evtHandler = new GNC::GUI::wxDefaultEvtHandlerTool(pParent, this);
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ID, wxString::FromUTF8(Name.c_str()),Icon, evtHandler));
+        }
+}
+
diff --git a/cadxcore/main/tools/pacsuploadtool.h b/cadxcore/main/tools/pacsuploadtool.h
new file mode 100644
index 0000000..bc4f00f
--- /dev/null
+++ b/cadxcore/main/tools/pacsuploadtool.h
@@ -0,0 +1,45 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <export/tools/ipacsuploadtool.h>
+#include <api/api.h>
+
+#include <map>
+
+
+namespace GNC
+{
+
+class EXTAPI PACSUploadTool : public GNC::GCS::IPACSUploadTool
+{
+
+protected:
+
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        PACSUploadTool();
+        ~PACSUploadTool();
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+protected:
+
+};
+}
diff --git a/cadxcore/main/tools/pixelsbluringtool.cpp b/cadxcore/main/tools/pixelsbluringtool.cpp
new file mode 100644
index 0000000..eb877b5
--- /dev/null
+++ b/cadxcore/main/tools/pixelsbluringtool.cpp
@@ -0,0 +1,139 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "pixelsbluringtool.h"
+#if defined(ENABLE_PIXELSBLURING)
+#include <wx/menu.h>
+#include "pixelsbluringtool.h"
+#include <api/iwidgetsmanager.h>
+#include <export/contracts/ipixelsbluringcontract.h>
+
+#include <main/controllers/controladoreventos.h>
+#include <eventos/render.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtkObject.h>
+#include <vtkSmartPointer.h>
+#include <vtkPointData.h>
+#include <vtkImageData.h>
+#include <vtkLookupTable.h>
+#include <vtkImageActor.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtk/vtkginkgoimageviewer.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class wxPixelsBluringEventHandler: public wxDefaultEvtHandlerTool
+{
+public:
+        wxPixelsBluringEventHandler(wxEvtHandler* pParent, GNC::PixelsBluringTool* pTool): wxDefaultEvtHandlerTool(pParent, pTool)
+        {
+                m_pPixelsBluringTool = pTool;
+        }
+
+        ~wxPixelsBluringEventHandler()
+        {
+        }
+
+        virtual void OnUpdateUI(wxUpdateUIEvent &event)
+        {
+                if (m_pPixelsBluringTool->IsEnabled()) {
+                        wxDefaultEvtHandlerTool::OnUpdateUI(event);
+                        if(m_pPixelsBluringTool->IsSet()) {
+                                event.SetText(_("Unset pixels blurring"));
+                        } else {
+                                event.SetText(_("Set pixels blurring"));
+                        }
+                        event.Enable(true);
+                } else {
+                        event.Enable(false);
+                }
+        }
+        GNC::PixelsBluringTool* m_pPixelsBluringTool;
+};
+
+}
+}
+
+
+GNC::GCS::ITool* GNC::PixelsBluringTool::NewTool()
+{
+        return new GNC::PixelsBluringTool();
+}
+
+GNC::PixelsBluringTool::PixelsBluringTool()
+{
+}
+GNC::PixelsBluringTool::~PixelsBluringTool()
+{
+}
+
+bool GNC::PixelsBluringTool::ExecuteAction()
+{
+        if (PixelsBluringContract->Inicializado()) {
+                GNC::GCS::IWidgetsContract::TViewerList list;
+                PixelsBluringContract->GetAllViewers(list);
+                bool enable = false;
+                if (PixelsBluringContract->GetViewerActivo()->GetInterpolationMode() == VTK_LINEAR_INTERPOLATION) {
+                        enable = true;
+                }
+                for (GNC::GCS::IWidgetsContract::TViewerList::iterator it = list.begin(); it != list.end(); ++it) {
+                        vtkGinkgoImageViewer* pW = (*it);
+                        if (enable) {
+                                pW->SetInterpolationMode(VTK_NEAREST_INTERPOLATION);
+                        } else {
+                                pW->SetInterpolationMode(VTK_LINEAR_INTERPOLATION);
+                        }
+                }
+                GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoRender(PixelsBluringContract->GetManager()->GetVista()));
+        }
+        return true;
+}
+
+void GNC::PixelsBluringTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                GNC::GUI::wxPixelsBluringEventHandler* evtHandler = new GNC::GUI::wxPixelsBluringEventHandler(pParent, this);
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ID, wxString::FromUTF8(Name.c_str()),Icon, evtHandler));
+        }
+}
+
+bool GNC::PixelsBluringTool::IsSet()
+{
+        if (PixelsBluringContract->GetViewerActivo() != NULL) {
+                return PixelsBluringContract->GetViewerActivo()->GetInterpolationMode() == VTK_LINEAR_INTERPOLATION;
+        } else {
+                return NULL;
+        }
+}
+
+bool GNC::PixelsBluringTool::IsEnabled()
+{
+        return PixelsBluringContract->GetViewerActivo() != NULL;
+}
+#endif
diff --git a/cadxcore/main/tools/pixelsbluringtool.h b/cadxcore/main/tools/pixelsbluringtool.h
new file mode 100644
index 0000000..6fc7539
--- /dev/null
+++ b/cadxcore/main/tools/pixelsbluringtool.h
@@ -0,0 +1,53 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_PIXELSBLURING)
+#ifndef INTERPOLATETOOL_H
+#define INTERPOLATETOOL_H
+
+
+#include <export/tools/ipixelsbluringtool.h>
+#include <api/api.h>
+
+class HerramientaOpcionesGUIBase;
+
+namespace GNC
+{
+class EXTAPI PixelsBluringTool : public GNC::GCS::IPixelsBluringTool
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        PixelsBluringTool();
+        ~PixelsBluringTool();
+
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+        bool IsSet();
+        bool IsEnabled();
+
+
+protected:
+
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/pointertool.cpp b/cadxcore/main/tools/pointertool.cpp
new file mode 100644
index 0000000..dbf0ad0
--- /dev/null
+++ b/cadxcore/main/tools/pointertool.cpp
@@ -0,0 +1,77 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/globals.h>
+#include <export/contracts/iwidgetscontract.h>
+#include <api/iwidgetsmanager.h>
+#include "pointertool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+#include <widgets/wseleccion.h>
+
+#include <iostream>
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+
+
+GNC::PointerTool::PointerTool()
+{
+        m_pSeleccionBuilder = NULL;
+}
+
+GNC::PointerTool::~PointerTool()
+{
+        if (m_pSeleccionBuilder != NULL) {
+                // DesSubscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
+                delete m_pSeleccionBuilder;
+                m_pSeleccionBuilder = NULL;
+        }
+}
+
+GNC::GCS::ITool* GNC::PointerTool::NewTool()
+{
+        return new GNC::PointerTool();
+}
+
+void GNC::PointerTool::Connect()
+{
+        if (m_pSeleccionBuilder != NULL) {
+                // DesSubscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
+                delete m_pSeleccionBuilder;
+                m_pSeleccionBuilder = NULL;
+        }
+        m_pSeleccionBuilder = new TSeleccionBuilder(WidgetsContract->GetManager(), GetTriggerButton(), (unsigned long)this);
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(m_pSeleccionBuilder->GetCursor());
+}
+
+void GNC::PointerTool::Disconnect()
+{
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        if (m_pSeleccionBuilder != NULL) {
+                // DesSubscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
+                delete m_pSeleccionBuilder;
+                m_pSeleccionBuilder = NULL;
+        }
+}
diff --git a/cadxcore/main/tools/pointertool.h b/cadxcore/main/tools/pointertool.h
new file mode 100644
index 0000000..7e335b8
--- /dev/null
+++ b/cadxcore/main/tools/pointertool.h
@@ -0,0 +1,80 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_POINTERTOOL)
+#ifndef POINTERTOOL_H
+#define POINTERTOOL_H
+
+#include <export/tools/ipointertool.h>
+#include <api/api.h>
+
+/// Forward declarations
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Events
+{
+class EventoRaton;
+class EventoTeclado;
+}
+namespace Widgets
+{
+class WSeleccionBuilder;
+}
+}
+}
+
+
+namespace GNC
+{
+
+class EXTAPI PointerTool : public GNC::GCS::IPointerTool
+{
+public:
+        typedef GNC::GCS::Events::EventoRaton       TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado     TEventoTeclado;
+        typedef GNC::GCS::Widgets::WSeleccionBuilder TSeleccionBuilder;
+        PointerTool();
+        ~PointerTool();
+
+//region "Realización de la interfaz IHerramienta"
+
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+
+//endregion
+
+
+//region "Eventos refinados desde los paneles"
+
+//endregion
+
+protected:
+
+        TSeleccionBuilder*            m_pSeleccionBuilder;
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/queryretrievehistorytool.cpp b/cadxcore/main/tools/queryretrievehistorytool.cpp
new file mode 100644
index 0000000..0ecb0e9
--- /dev/null
+++ b/cadxcore/main/tools/queryretrievehistorytool.cpp
@@ -0,0 +1,52 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+
+#include "queryretrievehistorytool.h"
+#include <api/controllers/icontroladorpermisos.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+#include <main/gui/acquisition/dialogoadquisicion.h>
+
+//----------------------------------------------------------------------
+
+GNC::QueryRetrieveHistoryTool::QueryRetrieveHistoryTool(): GNC::GCS::IHistoryTool(ID,GNC::GCS::IHistoryTool::TFamily_Q_R, _Std("PACS Q/R"), _Std("Acquire a DICOM study from PACS")+ " \tAlt+a", GinkgoResourcesManager::Acquisition::GetIcoAdquirePACS(), GinkgoResourcesManager::BigIcons::GetIcoBigQR())
+{
+}
+
+GNC::QueryRetrieveHistoryTool::~QueryRetrieveHistoryTool()
+{
+}
+
+bool GNC::QueryRetrieveHistoryTool::Enabled()
+{
+        return GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire") &&
+               GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","pacs_acquisition");
+}
+
+void GNC::QueryRetrieveHistoryTool::Execute()
+{
+        GNC::GUI::DialogoAdquisicion::Instance()->Show();
+}
+
+
+
diff --git a/cadxcore/main/tools/queryretrievehistorytool.h b/cadxcore/main/tools/queryretrievehistorytool.h
new file mode 100644
index 0000000..f47dc29
--- /dev/null
+++ b/cadxcore/main/tools/queryretrievehistorytool.h
@@ -0,0 +1,43 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#if defined(ENABLE_QUERYRETRIEVETOOL)
+#ifndef QUERYRETRIEVETOOL_H
+#define QUERYRETRIEVETOOL_H
+#include <main/controllers/historytoolscontroller.h>
+#include <export/tools/iherramientascore.h>
+
+namespace GNC
+{
+
+class QueryRetrieveHistoryTool : public GNC::GCS::IHistoryTool
+{
+public:
+        static const GNC::GCS::IHistoryTool::UID ID =  HCore_QueryRetrieveHistory;
+        QueryRetrieveHistoryTool();
+        virtual ~QueryRetrieveHistoryTool();
+        virtual bool Enabled();
+
+        virtual void Execute();
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/queryretrievetool.cpp b/cadxcore/main/tools/queryretrievetool.cpp
new file mode 100644
index 0000000..7e9d996
--- /dev/null
+++ b/cadxcore/main/tools/queryretrievetool.cpp
@@ -0,0 +1,128 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "queryretrievetool.h"
+#include <export/contracts/iviewcontract.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/controladorpermisos.h>
+
+#include <main/gui/acquisition/dialogoadquisicion.h>
+#include <main/gui/ginkgocloud/ginkgocloudsearchdialog.h>
+
+
+#define QUERY_PACS  1871
+#define QUERY_CLOUD  1872
+
+namespace GNC
+{
+namespace GUI
+{
+class wxEventHandlerQRStudy : public wxEvtHandler
+{
+public:
+        wxEventHandlerQRStudy(wxEvtHandler* pParent, GNC::QueryRetrieveTool* pHerramienta):wxEvtHandler()
+        {
+                m_pEvtParent = pParent;
+                m_pHerramienta=pHerramienta;
+
+                m_pEvtParent->Connect(QUERY_PACS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerQRStudy::OnQueryPacs),NULL,this);
+                m_pEvtParent->Connect(QUERY_CLOUD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerQRStudy::OnQueryCloud),NULL,this);
+        }
+
+        ~wxEventHandlerQRStudy()
+        {
+                m_pEvtParent->Disconnect(QUERY_PACS, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerQRStudy::OnQueryPacs),NULL,this);
+                m_pEvtParent->Disconnect(QUERY_CLOUD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerQRStudy::OnQueryCloud),NULL,this);
+                m_pEvtParent = NULL;
+                m_pHerramienta = NULL;
+        }
+
+        void OnQueryPacs( wxCommandEvent& event )
+        {
+                m_pHerramienta->QueryRetrievePacs();
+                event.Skip(false);
+        }
+
+        void OnQueryCloud( wxCommandEvent& event )
+        {
+                m_pHerramienta->QueryRetrieveCloud();
+                event.Skip(false);
+        }
+
+        GNC::QueryRetrieveTool* m_pHerramienta;
+        wxEvtHandler* m_pEvtParent;
+};
+}
+}
+
+GNC::GCS::ITool* GNC::QueryRetrieveTool::NewTool()
+{
+        return new GNC::QueryRetrieveTool();
+}
+
+GNC::QueryRetrieveTool::QueryRetrieveTool()
+{
+}
+GNC::QueryRetrieveTool::~QueryRetrieveTool()
+{
+}
+
+bool GNC::QueryRetrieveTool::ExecuteAction()
+{
+        return false;
+}
+
+bool GNC::QueryRetrieveTool::HasDropDownMenu()
+{
+        return true;
+}
+
+void GNC::QueryRetrieveTool::AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (pMenu->GetMenuItemCount() > 0 && !pMenu->GetMenuItems().back()->IsSeparator()) {
+                pMenu->AppendSeparator();
+        }
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, QUERY_PACS, wxString(_("Acquire a DICOM study from PACS")), GinkgoResourcesManager::Acquisition::GetIcoAdquirePACS(), new GNC::GUI::wxEventHandlerQRStudy( pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, QUERY_CLOUD, wxString(_("Search Ginkgo Cloud")), GinkgoResourcesManager::ToolIcons::GetIcoSearchCloud(), new GNC::GUI::wxEventHandlerQRStudy( pParent, this)));
+
+        pMenu->Enable(QUERY_PACS, GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire") &&
+                      GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","pacs_acquisition"));
+        pMenu->Enable(QUERY_CLOUD,  GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire") && GNC::GCS::IControladorPermisos::Instance()->Get("ginkgocloud","download"));
+}
+
+void GNC::QueryRetrieveTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                AppendDropDownMenu(pParent, pMenu);
+        }
+}
+
+void GNC::QueryRetrieveTool::QueryRetrievePacs()
+{
+        GNC::GUI::DialogoAdquisicion::Instance()->Show();
+}
+
+void GNC::QueryRetrieveTool::QueryRetrieveCloud()
+{
+        GNC::GUI::GinkgoCloudSearchDialog::Instance()->Show();
+}
diff --git a/cadxcore/main/tools/queryretrievetool.h b/cadxcore/main/tools/queryretrievetool.h
new file mode 100644
index 0000000..5201ea0
--- /dev/null
+++ b/cadxcore/main/tools/queryretrievetool.h
@@ -0,0 +1,48 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <export/tools/iqueryretrievetool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+
+class EXTAPI QueryRetrieveTool : public GNC::GCS::IQueryRetrieveTool
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        QueryRetrieveTool();
+        ~QueryRetrieveTool();
+
+        virtual bool HasDropDownMenu();
+        void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual void QueryRetrievePacs();
+        virtual void QueryRetrieveCloud();
+
+protected:
+
+};
+}
diff --git a/cadxcore/main/tools/resettool.cpp b/cadxcore/main/tools/resettool.cpp
new file mode 100644
index 0000000..900cc38
--- /dev/null
+++ b/cadxcore/main/tools/resettool.cpp
@@ -0,0 +1,71 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "resettool.h"
+#if defined(ENABLE_RESETTOOL)
+#include <export/contracts/iwidgetscontract.h>
+#include <api/controllers/ieventscontroller.h>
+#include <eventos/modificacionimagen.h>
+#include <eventos/render.h>
+#include <api/iwidgetsmanager.h>
+
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtkObject.h>
+#include <vtkSmartPointer.h>
+#include <vtkPointData.h>
+#include <vtkImageData.h>
+#include <vtkLookupTable.h>
+#include <vtkImageActor.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+GNC::GCS::ITool* GNC::ResetTool::NewTool()
+{
+        return new GNC::ResetTool();
+}
+
+GNC::ResetTool::ResetTool()
+{
+}
+GNC::ResetTool::~ResetTool()
+{
+}
+
+bool GNC::ResetTool::ExecuteAction()
+{
+        GNC::GCS::Events::EventoModificacionImagen* pEvt = new GNC::GCS::Events::EventoModificacionImagen(WidgetsContract->GetManager()->GetVista(),GNC::GCS::Events::EventoModificacionImagen::VisualizacionImagenModificada);
+        pEvt->EnableResetWindowLevel();
+        pEvt->EnableResetBrightnessContrast();
+        pEvt->EnableResetCurrentPoint();
+        pEvt->EnableResetZoom();
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(pEvt);
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoRender(WidgetsContract->GetManager()->GetVista()));
+        return true;
+}
+
+#endif
diff --git a/cadxcore/main/tools/resettool.h b/cadxcore/main/tools/resettool.h
new file mode 100644
index 0000000..3c143e0
--- /dev/null
+++ b/cadxcore/main/tools/resettool.h
@@ -0,0 +1,47 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_RESETTOOL)
+#ifndef RESETTOOL_H
+#define RESETTOOL_H
+
+#include <export/tools/iresettool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+
+class EXTAPI ResetTool : public GNC::GCS::IResetTool
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        ResetTool();
+        ~ResetTool();
+
+        virtual bool ExecuteAction();
+
+protected:
+
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/rotateandfliptool.cpp b/cadxcore/main/tools/rotateandfliptool.cpp
new file mode 100644
index 0000000..c7543df
--- /dev/null
+++ b/cadxcore/main/tools/rotateandfliptool.cpp
@@ -0,0 +1,211 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "rotateandfliptool.h"
+#include <export/contracts/iwidgetscontract.h>
+#include <api/controllers/ieventscontroller.h>
+#include <eventos/modificacionimagen.h>
+#include <eventos/render.h>
+#include <api/iwidgetsmanager.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtkObject.h>
+#include <vtkSmartPointer.h>
+#include <vtkPointData.h>
+#include <vtkImageData.h>
+#include <vtkLookupTable.h>
+#include <vtkImageActor.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+
+#define ROTATE_LEFT  1861
+#define ROTATE_RIGHT  1862
+#define FLIP_H			1863
+#define FLIP_V			1864
+#define CLEAR_ROTATION_AND_FLIP	1865
+
+namespace GNC
+{
+namespace GUI
+{
+class wxEventHandlerRotateAndFlip : public wxEvtHandler
+{
+public:
+        wxEventHandlerRotateAndFlip(wxEvtHandler* pParent, GNC::RotateAndFlipTool* pHerramienta):wxEvtHandler()
+        {
+                m_pEvtParent = pParent;
+                m_pHerramienta=pHerramienta;
+
+                m_pEvtParent->Connect(ROTATE_LEFT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerRotateAndFlip::OnUpdateRotateAndFlipUI),NULL,this);
+                m_pEvtParent->Connect(ROTATE_RIGHT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerRotateAndFlip::OnUpdateRotateAndFlipUI),NULL,this);
+                m_pEvtParent->Connect(FLIP_H, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerRotateAndFlip::OnUpdateRotateAndFlipUI),NULL,this);
+                m_pEvtParent->Connect(FLIP_V, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerRotateAndFlip::OnUpdateRotateAndFlipUI),NULL,this);
+                m_pEvtParent->Connect(CLEAR_ROTATION_AND_FLIP, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerRotateAndFlip::OnUpdateRotateAndFlipUI),NULL,this);
+
+                m_pEvtParent->Connect(ROTATE_LEFT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerRotateAndFlip::OnRotateLeft),NULL,this);
+                m_pEvtParent->Connect(ROTATE_RIGHT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerRotateAndFlip::OnRotateRight),NULL,this);
+                m_pEvtParent->Connect(FLIP_H, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerRotateAndFlip::OnFlipH),NULL,this);
+                m_pEvtParent->Connect(FLIP_V, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerRotateAndFlip::OnFlipV),NULL,this);
+                m_pEvtParent->Connect(CLEAR_ROTATION_AND_FLIP, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerRotateAndFlip::ClearRotationAndFlip),NULL,this);
+        }
+
+        ~wxEventHandlerRotateAndFlip()
+        {
+                m_pEvtParent->Disconnect(ROTATE_LEFT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerRotateAndFlip::OnUpdateRotateAndFlipUI),NULL,this);
+                m_pEvtParent->Disconnect(ROTATE_RIGHT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerRotateAndFlip::OnUpdateRotateAndFlipUI),NULL,this);
+                m_pEvtParent->Disconnect(FLIP_H, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerRotateAndFlip::OnUpdateRotateAndFlipUI),NULL,this);
+                m_pEvtParent->Disconnect(FLIP_V, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerRotateAndFlip::OnUpdateRotateAndFlipUI),NULL,this);
+                m_pEvtParent->Disconnect(CLEAR_ROTATION_AND_FLIP, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerRotateAndFlip::OnUpdateRotateAndFlipUI),NULL,this);
+
+                m_pEvtParent->Disconnect(ROTATE_LEFT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerRotateAndFlip::OnRotateLeft),NULL,this);
+                m_pEvtParent->Disconnect(ROTATE_RIGHT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerRotateAndFlip::OnRotateRight),NULL,this);
+                m_pEvtParent->Disconnect(FLIP_H, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerRotateAndFlip::OnFlipH),NULL,this);
+                m_pEvtParent->Disconnect(FLIP_V, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerRotateAndFlip::OnFlipV),NULL,this);
+                m_pEvtParent->Disconnect(CLEAR_ROTATION_AND_FLIP, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerRotateAndFlip::ClearRotationAndFlip),NULL,this);
+                m_pEvtParent = NULL;
+                m_pHerramienta = NULL;
+        }
+
+        void OnRotateLeft( wxCommandEvent& event )
+        {
+                m_pHerramienta->Rotate(false);
+                event.Skip(false);
+        }
+
+        void OnRotateRight( wxCommandEvent& event )
+        {
+                m_pHerramienta->Rotate(true);
+                event.Skip(false);
+        }
+
+        void OnFlipH( wxCommandEvent& event )
+        {
+                m_pHerramienta->Flip(false);
+                event.Skip(false);
+        }
+
+        void OnFlipV( wxCommandEvent& event )
+        {
+                m_pHerramienta->Flip(true);
+                event.Skip(false);
+        }
+
+        void OnUpdateRotateAndFlipUI(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->IsEnabled());
+        }
+
+        void ClearRotationAndFlip( wxCommandEvent& event )
+        {
+                m_pHerramienta->Clear();
+                event.Skip(false);
+        }
+
+        GNC::RotateAndFlipTool* m_pHerramienta;
+        wxEvtHandler* m_pEvtParent;
+};
+}
+}
+
+GNC::GCS::ITool* GNC::RotateAndFlipTool::NewTool()
+{
+        return new GNC::RotateAndFlipTool();
+}
+
+GNC::RotateAndFlipTool::RotateAndFlipTool()
+{
+}
+GNC::RotateAndFlipTool::~RotateAndFlipTool()
+{
+}
+
+bool GNC::RotateAndFlipTool::ExecuteAction()
+{
+        return false;
+}
+
+bool GNC::RotateAndFlipTool::HasDropDownMenu()
+{
+        return true;
+}
+
+void GNC::RotateAndFlipTool::AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (pMenu->GetMenuItemCount() > 0 && !pMenu->GetMenuItems().back()->IsSeparator()) {
+                pMenu->AppendSeparator();
+        }
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, CLEAR_ROTATION_AND_FLIP, _("Undo rotate and flip"), GinkgoResourcesManager::MenuIcons::GetIcoReset(), new GNC::GUI::wxEventHandlerRotateAndFlip( pParent, this)));
+        pMenu->AppendSeparator();
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ROTATE_LEFT, _("Rotate 90") + wxString::FromUTF8("º ")+ _("counter-clockwise"), GinkgoResourcesManager::ToolIcons::GetIcoRotateLeft(), new GNC::GUI::wxEventHandlerRotateAndFlip( pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ROTATE_RIGHT, _("Rotate 90") + wxString::FromUTF8("º ")+ _("clockwise"), GinkgoResourcesManager::ToolIcons::GetIcoRotateRight(), new GNC::GUI::wxEventHandlerRotateAndFlip( pParent, this)));
+        pMenu->AppendSeparator();
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, FLIP_H, _("Flip horizontal"), GinkgoResourcesManager::ToolIcons::GetIcoFlipHorizontal(), new GNC::GUI::wxEventHandlerRotateAndFlip( pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, FLIP_V, _("Flip vertical"), GinkgoResourcesManager::ToolIcons::GetIcoFlipVertical(), new GNC::GUI::wxEventHandlerRotateAndFlip( pParent, this)));
+}
+
+void GNC::RotateAndFlipTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                AppendDropDownMenu(pParent, pMenu);
+        }
+}
+
+void GNC::RotateAndFlipTool::Rotate(bool right)
+{
+        GNC::GCS::IWidgetsContract::TViewerList listOfViewers;
+        WidgetsContract->GetAllViewers(listOfViewers);
+        for (GNC::GCS::IWidgetsContract::TViewerList::iterator it =listOfViewers.begin(); it != listOfViewers.end(); ++it) {
+                (*it)->RotateCamera(right);
+        }
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(WidgetsContract->GetManager()->GetVista(), GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas));
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoRender(WidgetsContract->GetManager()->GetVista()));
+}
+
+void GNC::RotateAndFlipTool::Flip(bool vertical)
+{
+        GNC::GCS::IWidgetsContract::TViewerList listOfViewers;
+        WidgetsContract->GetAllViewers(listOfViewers);
+        for (GNC::GCS::IWidgetsContract::TViewerList::iterator it =listOfViewers.begin(); it != listOfViewers.end(); ++it) {
+                (*it)->Flip(vertical);
+        }
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(WidgetsContract->GetManager()->GetVista(), GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas));
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoRender(WidgetsContract->GetManager()->GetVista()));
+}
+
+void GNC::RotateAndFlipTool::Clear()
+{
+        GNC::GCS::IWidgetsContract::TViewerList listOfViewers;
+        WidgetsContract->GetAllViewers(listOfViewers);
+        for (GNC::GCS::IWidgetsContract::TViewerList::iterator it =listOfViewers.begin(); it != listOfViewers.end(); ++it) {
+                (*it)->ClearRotationAndFlip(true);
+        }
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(WidgetsContract->GetManager()->GetVista(), GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas));
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoRender(WidgetsContract->GetManager()->GetVista()));
+}
diff --git a/cadxcore/main/tools/rotateandfliptool.h b/cadxcore/main/tools/rotateandfliptool.h
new file mode 100644
index 0000000..7988840
--- /dev/null
+++ b/cadxcore/main/tools/rotateandfliptool.h
@@ -0,0 +1,53 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#ifndef ROTATEANDFLIPTOOL_H
+#define ROTATEANDFLIPTOOL_H
+
+#include <export/tools/irotateandfliptool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+
+class EXTAPI RotateAndFlipTool : public GNC::GCS::IRotateAndFlipTool
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        RotateAndFlipTool();
+        ~RotateAndFlipTool();
+
+        virtual bool HasDropDownMenu();
+        void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual void Rotate(bool right);
+        virtual void Flip(bool vertical);
+
+        virtual void Clear();
+
+protected:
+
+};
+}
+#endif
diff --git a/cadxcore/main/tools/ruletool.cpp b/cadxcore/main/tools/ruletool.cpp
new file mode 100644
index 0000000..070bce3
--- /dev/null
+++ b/cadxcore/main/tools/ruletool.cpp
@@ -0,0 +1,88 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ruletool.h"
+
+#if defined(ENABLE_RULETOOL)
+#include <export/contracts/irulecontract.h>
+#include <iostream>
+
+#include <widgets/wrule.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+
+GNC::RuleTool::RuleTool() :
+        m_pRuleBuilder(NULL)
+{
+        m_pRuleBuilder = NULL;
+}
+
+GNC::RuleTool::~RuleTool()
+{
+
+}
+
+
+//------------------------------------------------------------------------------
+//region "ITool/IContract realization"
+
+GNC::GCS::ITool* GNC::RuleTool::NewTool()
+{
+        return new GNC::RuleTool();
+}
+
+void GNC::RuleTool::Connect()
+{
+        if (RuleContract == NULL || RuleContract->GetManager()==NULL) {
+                return;
+        }
+        if (m_pRuleBuilder != NULL) {
+                delete m_pRuleBuilder;
+                m_pRuleBuilder = NULL;
+        }
+
+        m_pRuleBuilder = new GNC::GCS::Widgets::WRuleBuilder(RuleContract->GetManager(), GetTriggerButton(), RuleContract->SupportsCallibration());
+        RuleContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        RuleContract->GetManager()->SetCursor(m_pRuleBuilder->GetCursor());
+}
+
+void GNC::RuleTool::Disconnect()
+{
+        if (RuleContract == NULL) {
+                return;
+        }
+        if (RuleContract->GetViewerActivo() != NULL) {
+                RuleContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        }
+        if (RuleContract->GetManager() != NULL) {
+                RuleContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        }
+        if (m_pRuleBuilder != NULL) {
+                delete m_pRuleBuilder;
+                m_pRuleBuilder = NULL;
+        }
+}
+
+//endregion
+#endif
diff --git a/cadxcore/main/tools/ruletool.h b/cadxcore/main/tools/ruletool.h
new file mode 100644
index 0000000..fc97398
--- /dev/null
+++ b/cadxcore/main/tools/ruletool.h
@@ -0,0 +1,60 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#if defined(ENABLE_RULETOOL)
+#ifndef RULETOOL_H
+#define RULETOOL_H
+#include <export/tools/iruletool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+
+namespace GCS
+{
+namespace Widgets
+{
+class WRuleBuilder;
+}
+}
+
+class EXTAPI RuleTool : public GNC::GCS::IRuleTool
+{
+public:
+        RuleTool();
+        ~RuleTool();
+
+
+//------------------------------------------------------------------------------
+//region "ITool/IContract realization"
+
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+
+//endregion
+
+protected:
+        GNC::GCS::Widgets::WRuleBuilder* m_pRuleBuilder;
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/searchginkgocloudhistorytool.cpp b/cadxcore/main/tools/searchginkgocloudhistorytool.cpp
new file mode 100644
index 0000000..ece9572
--- /dev/null
+++ b/cadxcore/main/tools/searchginkgocloudhistorytool.cpp
@@ -0,0 +1,54 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+
+#include "searchginkgocloudhistorytool.h"
+
+#include <api/controllers/icontroladorpermisos.h>
+#include <main/gui/ginkgocloud/ginkgocloudsearchdialog.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+
+
+#include <api/internationalization/internationalization.h>
+
+//----------------------------------------------------------------------
+
+GNC::SearchGinkgoCloudHistoryTool::SearchGinkgoCloudHistoryTool(): GNC::GCS::IHistoryTool(ID,GNC::GCS::IHistoryTool::TFamily_Q_R, _Std("Search Ginkgo Cloud"), _Std("Search Ginkgo Cloud"), GinkgoResourcesManager::ToolIcons::GetIcoSearchCloud(),GinkgoResourcesManager::BigIcons::GetIcoBigGinkgoCloudSearch())
+{
+}
+
+GNC::SearchGinkgoCloudHistoryTool::~SearchGinkgoCloudHistoryTool()
+{
+}
+
+bool GNC::SearchGinkgoCloudHistoryTool::Enabled()
+{
+        return GNC::GCS::IControladorPermisos::Instance()->Get("core.restrictions","acquire") && GNC::GCS::IControladorPermisos::Instance()->Get("ginkgocloud","download");
+}
+
+void GNC::SearchGinkgoCloudHistoryTool::Execute()
+{
+        GNC::GUI::GinkgoCloudSearchDialog::Instance()->Show();
+}
+
+
+
diff --git a/cadxcore/main/tools/searchginkgocloudhistorytool.h b/cadxcore/main/tools/searchginkgocloudhistorytool.h
new file mode 100644
index 0000000..62da68d
--- /dev/null
+++ b/cadxcore/main/tools/searchginkgocloudhistorytool.h
@@ -0,0 +1,37 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <main/controllers/historytoolscontroller.h>
+#include <export/tools/iherramientascore.h>
+
+namespace GNC
+{
+
+class SearchGinkgoCloudHistoryTool : public GNC::GCS::IHistoryTool
+{
+public:
+        static const GNC::GCS::IHistoryTool::UID ID =  HCore_SearchGinkgoCloudHistory;
+        SearchGinkgoCloudHistoryTool();
+        virtual ~SearchGinkgoCloudHistoryTool();
+        virtual bool Enabled();
+
+        virtual void Execute();
+};
+}
diff --git a/cadxcore/main/tools/secondarycapturetool.cpp b/cadxcore/main/tools/secondarycapturetool.cpp
new file mode 100644
index 0000000..eeb09d4
--- /dev/null
+++ b/cadxcore/main/tools/secondarycapturetool.cpp
@@ -0,0 +1,87 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "secondarycapturetool.h"
+#include <export/contracts/iwidgetscontract.h>
+#include <api/controllers/ieventscontroller.h>
+#include <eventos/modificacionimagen.h>
+#include <eventos/render.h>
+#include <api/iwidgetsmanager.h>
+#include <main/entorno.h>
+#include <commands/secondarycapturedicomizecommand.h>
+#include <main/controllers/commandcontroller.h>
+
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtk/vtkginkgoimageviewer.h>
+
+#include <vtkPolyDataMapper.h>
+#include <vtkActor.h>
+#include <vtkSmartPointer.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkPolyData.h>
+#include <vtkSphereSource.h>
+#include <vtkWindowToImageFilter.h>
+#include <vtkJPEGWriter.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+
+GNC::GCS::ITool* GNC::SecondaryCaptureTool::NewTool()
+{
+        return new GNC::SecondaryCaptureTool();
+}
+
+GNC::SecondaryCaptureTool::SecondaryCaptureTool()
+{
+}
+GNC::SecondaryCaptureTool::~SecondaryCaptureTool()
+{
+}
+
+bool GNC::SecondaryCaptureTool::ExecuteAction()
+{
+        std::string tempName = GNC::Entorno::Instance()->CreateGinkgoTempFile();
+        {
+                vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter =
+                        vtkSmartPointer<vtkWindowToImageFilter>::New();
+                windowToImageFilter->SetInput(WidgetsContract->GetViewerActivo()->GetRenderWindow());
+                windowToImageFilter->SetInputBufferTypeToRGB(); //also record the alpha (transparency) channel
+                windowToImageFilter->Update();
+
+                vtkSmartPointer<vtkJPEGWriter> writer =
+                        vtkSmartPointer<vtkJPEGWriter>::New();
+                writer->SetFileName(tempName.c_str());
+                writer->SetQuality(97);
+                writer->ProgressiveOn();
+                writer->SetInputConnection(windowToImageFilter->GetOutputPort());
+                writer->Write();
+        }
+        GADAPI::SecondaryCaptureDicomizeCommandParameters* pParams = new GADAPI::SecondaryCaptureDicomizeCommandParameters(WidgetsContract->GetManager()->GetVista(), tempName);
+        GADAPI::SecondaryCaptureDicomizeCommand* pCmd = new GADAPI::SecondaryCaptureDicomizeCommand(pParams);
+        GNC::CommandController::Instance()->ProcessAsync("SC", pCmd, WidgetsContract->GetManager()->GetVista());
+
+        return true;
+}
diff --git a/cadxcore/main/tools/secondarycapturetool.h b/cadxcore/main/tools/secondarycapturetool.h
new file mode 100644
index 0000000..bf6f2c4
--- /dev/null
+++ b/cadxcore/main/tools/secondarycapturetool.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#ifndef SECONDARYCAPTURETOOL_H
+#define SECONDARYCAPTURETOOL_H
+
+#include <export/tools/isecondarycapturetool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+
+class EXTAPI SecondaryCaptureTool : public GNC::GCS::ISecondaryCaptureTool
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        SecondaryCaptureTool();
+        ~SecondaryCaptureTool();
+
+        virtual bool ExecuteAction();
+
+protected:
+
+};
+}
+#endif
diff --git a/cadxcore/main/tools/sendpacstool.cpp b/cadxcore/main/tools/sendpacstool.cpp
new file mode 100644
index 0000000..2acdf82
--- /dev/null
+++ b/cadxcore/main/tools/sendpacstool.cpp
@@ -0,0 +1,83 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+
+#include <wx/msgdlg.h>
+
+#include "sendpacstool.h"
+
+#include <api/internationalization/internationalization.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include <main/controllers/commandcontroller.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+#include <main/gui/selectpacsserver/selectpacsserver.h>
+#include <main/gui/history3/synchronizedialog.h>
+#include <main/controllers/historycontroller.h>
+#include <commands/sendpacscommand.h>
+
+
+
+//----------------------------------------------------------------------
+
+GNC::SendPACSTool::SendPACSTool(): GNC::GCS::IHistoryTool(ID,GNC::GCS::IHistoryTool::TFamily_Send, _Std("Send to PACS"), _Std("Send to PACS"), GinkgoResourcesManager::MenuIcons::GetIcoSendToPACS())
+{
+}
+
+GNC::SendPACSTool::~SendPACSTool()
+{
+}
+
+bool GNC::SendPACSTool::Enabled()
+{
+        return GNC::GCS::IControladorPermisos::Instance()->Get("core.pacs.limits","pacs_upload");
+}
+
+void GNC::SendPACSTool::Execute()
+{
+        GNC::GCS::IHistoryPanel* pHistory = GNC::HistoryToolsController::Instance()->GetHistoryPanel();
+        std::list<long> listOfPks;
+        pHistory->GetSelectedSeriesPk(listOfPks);
+        Execute(listOfPks);
+}
+
+void GNC::SendPACSTool::Execute(const std::list<long>& listOfPks)
+{
+        GNC::GCS::IHistoryPanel* pHistory = GNC::HistoryToolsController::Instance()->GetHistoryPanel();
+        if (listOfPks.empty()) {
+                wxMessageBox(_("Select at least one series"), _("Info"), wxICON_INFORMATION, pHistory->GetWxWindow());
+                return;
+        }
+
+        if (!AreSeriesFullyDownloaded(listOfPks)) {
+                GNC::GUI::SynchronizeDialog dlg(pHistory->GetWxWindow(), listOfPks, this);
+                dlg.ShowModal();
+        } else {
+                GNC::GUI::SelectPacsServer dlg(pHistory->GetWxWindow());
+                if (dlg.ShowModal() == wxID_OK) {
+                        GADAPI::SendPACSCommand* pCmd = new GADAPI::SendPACSCommand(dlg.GetSelectedServer(), "", listOfPks);
+                        GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Sending to PACS..."),pCmd, NULL);
+                }
+        }
+}
+
+
+
diff --git a/cadxcore/main/tools/sendpacstool.h b/cadxcore/main/tools/sendpacstool.h
new file mode 100644
index 0000000..4cf5df9
--- /dev/null
+++ b/cadxcore/main/tools/sendpacstool.h
@@ -0,0 +1,44 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#if defined(ENABLE_SENDPACSTOOL)
+#ifndef SENDPACSTOOL_H
+#define SENDPACSTOOL_H
+#include <main/controllers/historytoolscontroller.h>
+#include <export/tools/iherramientascore.h>
+
+namespace GNC
+{
+
+class SendPACSTool : public GNC::GCS::IHistoryTool
+{
+public:
+        static const GNC::GCS::IHistoryTool::UID ID =  HCore_HistoryPACSUpload;
+        SendPACSTool();
+        virtual ~SendPACSTool();
+        virtual bool Enabled();
+
+        virtual void Execute();
+        virtual void Execute(const std::list<long>& seriesPk);
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/showhistorytool.cpp b/cadxcore/main/tools/showhistorytool.cpp
new file mode 100644
index 0000000..60b7af5
--- /dev/null
+++ b/cadxcore/main/tools/showhistorytool.cpp
@@ -0,0 +1,69 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "showhistorytool.h"
+#include <export/contracts/iviewcontract.h>
+#include <api/ivista.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <main/entorno.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/gui/history3/historypanel3.h>
+
+//----------------------------------------------------------------------
+
+GNC::GCS::ITool* GNC::ShowHistoryTool::NewTool()
+{
+        return new GNC::ShowHistoryTool();
+}
+
+GNC::ShowHistoryTool::ShowHistoryTool()
+{
+}
+GNC::ShowHistoryTool::~ShowHistoryTool()
+{
+}
+
+bool GNC::ShowHistoryTool::ExecuteAction()
+{
+        if (GNC::GUI::HistoryPanel3::Instance()->IsIconized()) {
+                GNC::GUI::HistoryPanel3::Instance()->Restore();
+        }
+        if (!GNC::GUI::HistoryPanel3::Instance()->IsShown()) {
+                GNC::GUI::HistoryPanel3::Instance()->Show(true);
+        } else {
+                GNC::GUI::HistoryPanel3::Instance()->Raise();
+        }
+
+        return true;
+}
+
+void GNC::ShowHistoryTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                GNC::GUI::wxDefaultEvtHandlerTool* evtHandler = new GNC::GUI::wxDefaultEvtHandlerTool(pParent, this);
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ID, wxString::FromUTF8(Name.c_str()),Icon, evtHandler));
+        }
+}
+
+bool GNC::ShowHistoryTool::IsShown()
+{
+        return GNC::GUI::HistoryPanel3::Instance()->IsShown();
+}
diff --git a/cadxcore/main/tools/showhistorytool.h b/cadxcore/main/tools/showhistorytool.h
new file mode 100644
index 0000000..355beb3
--- /dev/null
+++ b/cadxcore/main/tools/showhistorytool.h
@@ -0,0 +1,51 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#ifndef SHOWHISTORYTOOL_H
+#define SHOWHISTORYTOOL_H
+#include <export/tools/ishowhistorytool.h>
+#include <api/api.h>
+
+#include <map>
+
+
+namespace GNC
+{
+
+class EXTAPI ShowHistoryTool : public GNC::GCS::IShowHistoryTool
+{
+
+protected:
+
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        ShowHistoryTool();
+        ~ShowHistoryTool();
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+        bool IsShown();
+
+protected:
+
+};
+}
+#endif
diff --git a/cadxcore/main/tools/showtagshistorytool.cpp b/cadxcore/main/tools/showtagshistorytool.cpp
new file mode 100644
index 0000000..336fa99
--- /dev/null
+++ b/cadxcore/main/tools/showtagshistorytool.cpp
@@ -0,0 +1,67 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "showtagshistorytool.h"
+
+#if defined(ENABLE_SHOWTAGSHISTORYTOOL)
+#include <wx/msgdlg.h>
+#include <main/gui/paneltags/paneltags.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+#include <api/internationalization/internationalization.h>
+
+//----------------------------------------------------------------------
+
+GNC::ShowTagsHistoryTool::ShowTagsHistoryTool(): GNC::GCS::IHistoryTool(ID,GNC::GCS::IHistoryTool::TFamily_ShowMetadata, _Std("DICOM inspector"), _Std("DICOM inspector"), GinkgoResourcesManager::ToolIcons::GetIcoMostrarOcultarTags())
+{
+}
+
+GNC::ShowTagsHistoryTool::~ShowTagsHistoryTool()
+{
+}
+
+void GNC::ShowTagsHistoryTool::Execute()
+{
+        GNC::GCS::IHistoryPanel* pHistory = GNC::HistoryToolsController::Instance()->GetHistoryPanel();
+        std::list<long> listOfPks;
+        pHistory->GetSelectedSeriesPk(listOfPks);
+
+        if (listOfPks.empty()) {
+                wxMessageBox(_("Select at least one series"), _("Info"), wxICON_INFORMATION, pHistory->GetWxWindow());
+                return;
+        }
+        int i = 0;
+        for (std::list<long>::iterator it = listOfPks.begin(); it != listOfPks.end(); ++it) {
+                GNC::GUI::PanelTags* m_pPanel = new GNC::GUI::PanelTags(pHistory->GetWxWindow(), false);
+                if (m_pPanel->SetSeriesPk((*it))) {
+                        m_pPanel->Show(true);
+                        wxPoint position = m_pPanel->GetPosition();
+                        position.x += i;
+                        position.y += i;
+                        m_pPanel->SetPosition(position);
+                        i += 10;
+                } else {
+                        m_pPanel->Destroy();
+                }
+        }
+}
+
+#endif
diff --git a/cadxcore/main/tools/showtagshistorytool.h b/cadxcore/main/tools/showtagshistorytool.h
new file mode 100644
index 0000000..7df84c3
--- /dev/null
+++ b/cadxcore/main/tools/showtagshistorytool.h
@@ -0,0 +1,42 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#if defined(ENABLE_SHOWTAGSHISTORYTOOL)
+#ifndef SHOWTAGSHISTORYTOOL_H
+#define SHOWTAGSHISTORYTOOL_H
+#include <main/controllers/historytoolscontroller.h>
+#include <export/tools/iherramientascore.h>
+
+namespace GNC
+{
+
+class ShowTagsHistoryTool : public GNC::GCS::IHistoryTool
+{
+public:
+        static const GNC::GCS::IHistoryTool::UID ID =  HCore_ShowDicomTagsHistory;
+        ShowTagsHistoryTool();
+        virtual ~ShowTagsHistoryTool();
+
+        virtual void Execute();
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/showtagstool.cpp b/cadxcore/main/tools/showtagstool.cpp
new file mode 100644
index 0000000..c66b83f
--- /dev/null
+++ b/cadxcore/main/tools/showtagstool.cpp
@@ -0,0 +1,144 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "showtagstool.h"
+#include <export/contracts/iviewcontract.h>
+#include <api/ivista.h>
+#include <api/istudycontext.h>
+#include <api/controllers/ieventscontroller.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <main/gui/paneltags/paneltags.h>
+#include <main/entorno.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <eventos/modificacionimagen.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class EventHandlerShowTagsTool: public GNC::GUI::wxDefaultEvtHandlerTool
+{
+public:
+        EventHandlerShowTagsTool(wxEvtHandler* pParent, GNC::ShowTagsTool* pTool): GNC::GUI::wxDefaultEvtHandlerTool(pParent, pTool)
+        {
+                m_pHerramienta = pTool;
+                m_pParent = pParent;
+        }
+        ~EventHandlerShowTagsTool()
+        {
+        }
+
+        virtual void OnUpdateUI(wxUpdateUIEvent &event)
+        {
+                wxDefaultEvtHandlerTool::OnUpdateUI(event);
+                if(m_pHerramienta->IsVisible()) {
+                        event.SetText(_("Hide DICOM inspector"));
+                } else {
+                        event.SetText(_("Show DICOM inspector"));
+                }
+        }
+
+        GNC::ShowTagsTool* m_pHerramienta;
+        wxEvtHandler* m_pParent;
+};
+}
+}
+
+
+GNC::GCS::ITool* GNC::ShowTagsTool::NewTool()
+{
+        return new GNC::ShowTagsTool();
+}
+
+GNC::ShowTagsTool::ShowTagsTool()
+{
+        m_pPanelTags = NULL;
+}
+GNC::ShowTagsTool::~ShowTagsTool()
+{
+        if (m_pPanelTags != NULL) {
+                m_pPanelTags->Close(true);
+                m_pPanelTags->Destroy();
+        }
+}
+
+bool GNC::ShowTagsTool::ExecuteAction()
+{
+        if (m_pPanelTags == NULL) {
+                m_pPanelTags = new GNC::GUI::PanelTags(GNC::Entorno::Instance()->GetVentanaRaiz());
+                GNC::GCS::IEventsController::Instance()->Registrar(this, GNC::GCS::Events::EventoModificacionImagen(ViewContract->GetView()));
+        }
+        if (m_pPanelTags != NULL) {
+                if (!IsVisible()) {
+                        if (ViewContract->GetView() != NULL) {
+                                m_pPanelTags->SetView(ViewContract->GetView());
+                        } else {
+                                m_pPanelTags->SetView(NULL);
+                        }
+                }
+                m_pPanelTags->MostrarOcultarPanelTags();
+        }
+        return true;
+}
+
+
+void GNC::ShowTagsTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                GNC::GUI::EventHandlerShowTagsTool* evtHandler = new GNC::GUI::EventHandlerShowTagsTool(pParent, this);
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ID, wxString::FromUTF8(Name.c_str()),Icon, evtHandler));
+        }
+}
+
+bool GNC::ShowTagsTool::IsVisible()
+{
+        bool isVisible =false;
+
+        if (m_pPanelTags != NULL) {
+                isVisible = m_pPanelTags->IsVisiblePanelTags();
+        }
+
+        return isVisible;
+}
+
+void GNC::ShowTagsTool::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        if ( evt->GetCodigoEvento() == ginkgoEVT_Core_ModificacionImagen) {
+                GNC::GCS::Events::EventoModificacionImagen* pEvt = dynamic_cast<GNC::GCS::Events::EventoModificacionImagen*>(evt);
+
+                if (!pEvt)
+                        return;
+
+                if (pEvt->GetTipo() == GNC::GCS::Events::EventoModificacionImagen::SliceCambiado
+                    || pEvt->GetTipo() == GNC::GCS::Events::EventoModificacionImagen::ImagenCargada
+                    || pEvt->GetTipo() == GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas) {
+                        if (m_pPanelTags != NULL) {
+                                if (IsVisible()) {
+                                        if (ViewContract->GetView() != NULL) {
+                                                m_pPanelTags->SetView(ViewContract->GetView());
+                                        } else {
+                                                m_pPanelTags->SetView(NULL);
+                                        }
+                                }
+                        }
+                }
+        }
+}
+
diff --git a/cadxcore/main/tools/showtagstool.h b/cadxcore/main/tools/showtagstool.h
new file mode 100644
index 0000000..65f8424
--- /dev/null
+++ b/cadxcore/main/tools/showtagstool.h
@@ -0,0 +1,106 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_SHOWTAGSTOOL)
+#ifndef SHOWTAGSTOOL_H
+#define SHOWTAGSTOOL_H
+#include <export/tools/ishowtagstool.h>
+#include <api/api.h>
+#include <api/observers/ieventsobserver.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class PanelTags;
+}
+
+class EXTAPI ShowTagsTool : public GNC::GCS::IShowTagsTool, public GNC::GCS::IEventsObserver
+{
+protected:
+
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        ShowTagsTool();
+        ~ShowTagsTool();
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+        bool IsVisible();
+protected:
+        GNC::GUI::PanelTags*								m_pPanelTags;
+};
+}
+#endif
+#endif
+
+/*
+#include "enabled_tools.h"
+#if defined(ENABLE_SHOWTAGSTOOL)
+#ifndef SHOWTAGSTOOL_H
+#define SHOWTAGSTOOL_H
+#include <export/iherramientapaneltags.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/api.h>
+
+#include <map>
+
+class HerramientaOpcionesGUIBase;
+
+namespace GNC {
+
+	class EXTAPI HerramientaPanelTags : public GNC::GCS::IToolPanelTags, public GNC::GCS::IObservadorEventos {
+
+	protected:
+
+	public:
+		HerramientaPanelTags();
+		~HerramientaPanelTags();
+
+		virtual bool AppendInMenu(wxWindow* pParent, wxMenu* pMenuParent);
+
+		//region "Realizacion de la interfaz IHerramienta"
+
+		// Setup de paneles
+		virtual void CrearPaneles( wxPanel* pParent );
+		//endregion
+
+		//cuando hacen click en ella...
+		bool IsVisible();
+		virtual void SolicitarActivacion(const GNC::GCS::TriggerButton& buttonmask);
+
+		virtual void ConectarContratoFalso(bool activar);
+		virtual void SetVistaActiva(GNC::GCS::IVista* pVista);
+		virtual void ConectarContratos(bool activar);
+
+		virtual void SetVentanaTags(GNC::GCS::IPanelHerramientaTags* pWindow) ;
+
+		virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+	protected:
+		GNC::GCS::IPanelHerramientaTags*								m_pPanelTags;
+
+	};
+}
+#endif
+#endif*/
diff --git a/cadxcore/main/tools/simpleprinttool.cpp b/cadxcore/main/tools/simpleprinttool.cpp
new file mode 100644
index 0000000..506ff32
--- /dev/null
+++ b/cadxcore/main/tools/simpleprinttool.cpp
@@ -0,0 +1,306 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "simpleprinttool.h"
+#include <export/contracts/iwidgetscontract.h>
+#include <api/controllers/ieventscontroller.h>
+#include <eventos/modificacionimagen.h>
+#include <eventos/render.h>
+#include <api/iwidgetsmanager.h>
+#include <api/ivista.h>
+#include <main/entorno.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtk/vtkginkgoimageviewer.h>
+
+#include <vtkPolyDataMapper.h>
+#include <vtkActor.h>
+#include <vtkSmartPointer.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkPolyData.h>
+#include <vtkSphereSource.h>
+#include <vtkWindowToImageFilter.h>
+#include <vtkJPEGWriter.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/dataobj.h>
+#include <wx/filename.h>
+#include <wx/textfile.h>
+#include <wx/print.h>
+#include <wx/printdlg.h>
+
+#define SIMPLE_SETUP  1876
+#define SIMPLE_PRINT  1877
+#define SIMPLE_PRINT_PREVIEW  1878
+
+namespace GNC
+{
+namespace GUI
+{
+class wxEventHandlerSimplePrint : public wxEvtHandler
+{
+public:
+        wxEventHandlerSimplePrint(wxEvtHandler* pParent, GNC::SimplePrintTool* pHerramienta):wxEvtHandler()
+        {
+                m_pEvtParent = pParent;
+                m_pHerramienta=pHerramienta;
+
+                m_pEvtParent->Connect(SIMPLE_SETUP, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerSimplePrint::OnUpdateUI),NULL,this);
+                m_pEvtParent->Connect(SIMPLE_PRINT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerSimplePrint::OnUpdateUI),NULL,this);
+                m_pEvtParent->Connect(SIMPLE_PRINT_PREVIEW, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerSimplePrint::OnUpdateUI),NULL,this);
+
+                m_pEvtParent->Connect(SIMPLE_SETUP, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerSimplePrint::OnSetup),NULL,this);
+                m_pEvtParent->Connect(SIMPLE_PRINT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerSimplePrint::OnPrint),NULL,this);
+                m_pEvtParent->Connect(SIMPLE_PRINT_PREVIEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerSimplePrint::OnPrintPreview),NULL,this);
+        }
+
+        ~wxEventHandlerSimplePrint()
+        {
+                m_pEvtParent->Disconnect(SIMPLE_SETUP, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerSimplePrint::OnUpdateUI),NULL,this);
+                m_pEvtParent->Disconnect(SIMPLE_PRINT, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerSimplePrint::OnUpdateUI),NULL,this);
+                m_pEvtParent->Disconnect(SIMPLE_PRINT_PREVIEW, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerSimplePrint::OnUpdateUI),NULL,this);
+
+                m_pEvtParent->Disconnect(SIMPLE_SETUP, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerSimplePrint::OnSetup),NULL,this);
+                m_pEvtParent->Disconnect(SIMPLE_PRINT, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerSimplePrint::OnPrint),NULL,this);
+                m_pEvtParent->Disconnect(SIMPLE_PRINT_PREVIEW, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler(wxEventHandlerSimplePrint::OnPrintPreview),NULL,this);
+                m_pEvtParent = NULL;
+                m_pHerramienta = NULL;
+        }
+
+        void OnPrint( wxCommandEvent& event )
+        {
+                m_pHerramienta->doPrint();
+                event.Skip(false);
+        }
+
+        void OnSetup( wxCommandEvent& event )
+        {
+                m_pHerramienta->doSetup();
+                event.Skip(false);
+        }
+
+        void OnPrintPreview(wxCommandEvent& event)
+        {
+                m_pHerramienta->doPrintPreview();
+                event.Skip(false);
+        }
+
+        void OnUpdateUI(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->IsEnabled());
+        }
+
+
+        GNC::SimplePrintTool* m_pHerramienta;
+        wxEvtHandler* m_pEvtParent;
+};
+}
+
+///////printout helper
+class ginkgoPrintOutImage: public wxPrintout
+{
+public:
+        ginkgoPrintOutImage(const wxImage& im):wxPrintout(_("Image printing")),img(im)
+        {
+        }
+
+        ~ginkgoPrintOutImage()
+        {
+        }
+
+        virtual bool HasPage(int page)
+        {
+                return page == 1;
+        }
+
+        virtual void GetPageInfo(int *minPage, int *maxPage, int *pageFrom, int *pageTo)
+        {
+                *minPage = *maxPage = *pageFrom = *pageTo= 1;
+        }
+
+        virtual bool OnPrintPage(int /*page*/)
+        {
+                wxDC *dc = GetDC();
+                if (dc) {
+                        //limpioi
+                        dc->SetBackground(*wxWHITE_BRUSH);
+                        dc->Clear();
+                        if (img.IsOk()) {
+                                wxSize pageSize = this->GetLogicalPageRect().GetSize();
+                                wxSize imgSize = img.GetSize();
+
+                                bool resample = false;
+
+                                if (imgSize.x > pageSize.x || imgSize.y > pageSize.y) {
+                                        //downscale
+                                        if (imgSize.x > pageSize.x) {
+                                                imgSize.y = ((double)pageSize.x/imgSize.x)*imgSize.y;
+                                                imgSize.x = pageSize.x;
+                                                resample = true;
+                                        }
+                                        if (imgSize.y > pageSize.y) {
+                                                imgSize.x = ((double)pageSize.y/imgSize.y)*imgSize.x;
+                                                imgSize.y = pageSize.y;
+                                                resample = true;
+                                        }
+                                } else {
+                                        //upscale
+                                        if (((float)imgSize.x/pageSize.x) > ((float)imgSize.y/pageSize.y)) {
+                                                imgSize.y = ((double)pageSize.x/imgSize.x)*imgSize.y;
+                                                imgSize.x = pageSize.x;
+                                                resample = true;
+                                        } else {
+                                                imgSize.x = ((double)pageSize.y/imgSize.y)*imgSize.x;
+                                                imgSize.y = pageSize.y;
+                                                resample = true;
+                                        }
+                                }
+
+                                if (resample) {
+                                        img.Rescale(imgSize.x, imgSize.y, wxIMAGE_QUALITY_BILINEAR);
+                                }
+                                dc->DrawBitmap( img, 0, 0 );
+                        }
+
+                        return true;
+                } else {
+                        return false;
+                }
+        }
+
+
+        wxImage img;
+};
+}
+
+
+GNC::GCS::ITool* GNC::SimplePrintTool::NewTool()
+{
+        return new GNC::SimplePrintTool();
+}
+
+GNC::SimplePrintTool::SimplePrintTool()
+{
+        pData = new wxPrintData();
+}
+GNC::SimplePrintTool::~SimplePrintTool()
+{
+        delete pData;
+}
+
+bool GNC::SimplePrintTool::ExecuteAction()
+{
+        return false;
+}
+
+bool GNC::SimplePrintTool::HasDropDownMenu()
+{
+        return true;
+}
+
+void GNC::SimplePrintTool::AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (pMenu->GetMenuItemCount() > 0 && !pMenu->GetMenuItems().back()->IsSeparator()) {
+                pMenu->AppendSeparator();
+        }
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, SIMPLE_SETUP, _("Page setup") + wxString(wxT("...")), wxNullBitmap, new GNC::GUI::wxEventHandlerSimplePrint( pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, SIMPLE_PRINT_PREVIEW, _("Print preview") + wxString(wxT("...")), wxNullBitmap, new GNC::GUI::wxEventHandlerSimplePrint( pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, SIMPLE_PRINT, _("Print") + wxString(wxT("...")), GinkgoResourcesManager::MenuIcons::GetIcoImpresora(), new GNC::GUI::wxEventHandlerSimplePrint( pParent, this)));
+}
+
+void GNC::SimplePrintTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                AppendDropDownMenu(pParent, pMenu);
+        }
+}
+
+wxImage getImage(const vtkSmartPointer<vtkRenderWindow>& rendWin)
+{
+        if (rendWin == NULL) {
+                return wxNullImage;
+        }
+        vtkSmartPointer<vtkWindowToImageFilter> windowToImageFilter =
+                vtkSmartPointer<vtkWindowToImageFilter>::New();
+        windowToImageFilter->SetInput(rendWin);
+
+        windowToImageFilter->SetInputBufferTypeToRGB(); //also record the alpha (transparency) channel
+        windowToImageFilter->Update();
+        //copy image to wx...
+        // put the pixels into a wxImage ...
+        vtkSmartPointer<vtkImageData> timg = windowToImageFilter->GetOutput();
+        unsigned char *pVtkPix = (unsigned char *)timg->GetScalarPointer();
+
+        unsigned long imgsize = timg->GetDimensions()[0] * timg->GetDimensions()[1] * sizeof(unsigned char) * 3;
+        unsigned char* data = new unsigned char[imgsize];
+        int linesize = timg->GetDimensions()[0] *3;
+        for (int y = 0; y < timg->GetDimensions()[1]; ++y) {
+                int offsetWx = imgsize - (linesize * (y +1));
+                int offsetVtk = y*linesize;
+                for (int x = 0; x < linesize; ++x) {
+                        data[offsetWx+x] = pVtkPix[offsetVtk+x];
+                }
+        }
+
+        return wxImage(timg->GetDimensions()[0], timg->GetDimensions()[1],data,false);
+}
+
+void GNC::SimplePrintTool::doPrintPreview()
+{
+        wxImage image = getImage(WidgetsContract->GetViewerActivo()->GetRenderWindow());
+        if (image.IsOk()) {
+                wxPrintPreview* myPrintPreview = new wxPrintPreview(new ginkgoPrintOutImage(image), new ginkgoPrintOutImage(image), pData);
+                wxPreviewFrame *frame = new wxPreviewFrame(myPrintPreview, WidgetsContract->GetManager()->GetVista()->GetWindow(),
+                                _("Print image"), wxDefaultPosition, wxSize(800, 600));
+                frame->InitializeWithModality(wxPreviewFrame_WindowModal);
+                frame->Show(true);
+                frame->Show(true);
+        }
+}
+
+void GNC::SimplePrintTool::doPrint()
+{
+        wxImage image = getImage(WidgetsContract->GetViewerActivo()->GetRenderWindow());
+        if (image.IsOk()) {
+                wxPrintDialogData dlgData(*pData);
+                wxPrinter printer(&dlgData);
+                ginkgoPrintOutImage prOut(image);
+                printer.Print(WidgetsContract->GetManager()->GetVista()->GetWindow(), &prOut);
+        }
+}
+
+void GNC::SimplePrintTool::doSetup()
+{
+        wxPageSetupDialogData dlgData(*pData);
+        wxPageSetupDialog dlg(WidgetsContract->GetManager()->GetVista()->GetWindow(), &dlgData);
+        dlg.ShowModal();
+}
+
diff --git a/cadxcore/main/tools/simpleprinttool.h b/cadxcore/main/tools/simpleprinttool.h
new file mode 100644
index 0000000..01674e9
--- /dev/null
+++ b/cadxcore/main/tools/simpleprinttool.h
@@ -0,0 +1,49 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <export/tools/isimpleprinttool.h>
+#include <api/api.h>
+
+class wxPrintData;
+namespace GNC
+{
+class EXTAPI SimplePrintTool : public GNC::GCS::ISimplePrintTool
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        SimplePrintTool();
+        ~SimplePrintTool();
+
+        virtual bool ExecuteAction();
+
+        virtual bool HasDropDownMenu();
+        virtual void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        void doPrint();
+        void doPrintPreview();
+        void doSetup();
+
+protected:
+        wxPrintData* pData;
+};
+}
diff --git a/cadxcore/main/tools/startdicomizationtool.cpp b/cadxcore/main/tools/startdicomizationtool.cpp
new file mode 100644
index 0000000..ccdf8ee
--- /dev/null
+++ b/cadxcore/main/tools/startdicomizationtool.cpp
@@ -0,0 +1,73 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "startdicomizationtool.h"
+#include <export/contracts/iviewcontract.h>
+#include <api/ivista.h>
+#include <api/controllers/icontroladorlog.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <main/entorno.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/gui/history3/historypanel3.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/historytoolscontroller.h>
+#include <main/gui/import/wxwizardimportacionginkgo.h>
+#include <api/internationalization/internationalization.h>
+
+//----------------------------------------------------------------------
+
+GNC::GCS::ITool* GNC::StartDicomizationTool::NewTool()
+{
+        return new GNC::StartDicomizationTool();
+}
+
+GNC::StartDicomizationTool::StartDicomizationTool()
+{
+}
+GNC::StartDicomizationTool::~StartDicomizationTool()
+{
+}
+
+bool GNC::StartDicomizationTool::ExecuteAction()
+{
+        try {
+                GNC::GUI::wxWizardImportacionGinkgo ib(GNC::HistoryToolsController::Instance()->GetHistoryPanel()->GetWxWindow(),NULL);
+
+                ib.ShowModal();
+        } catch(GIL::DICOM::I2DException& i) {
+                LOG_ERROR("DicomizeTool", "Error in dicomization: " << i.GetCause())
+        }
+
+        return true;
+}
+
+void GNC::StartDicomizationTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                GNC::GUI::wxDefaultEvtHandlerTool* evtHandler = new GNC::GUI::wxDefaultEvtHandlerTool(pParent, this);
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ID, wxString::FromUTF8(Name.c_str()),Icon, evtHandler));
+        }
+}
+
+bool GNC::StartDicomizationTool::IsShown()
+{
+        return GNC::GUI::HistoryPanel3::Instance()->IsShown();
+}
diff --git a/cadxcore/main/tools/startdicomizationtool.h b/cadxcore/main/tools/startdicomizationtool.h
new file mode 100644
index 0000000..ef6a3b2
--- /dev/null
+++ b/cadxcore/main/tools/startdicomizationtool.h
@@ -0,0 +1,48 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#include <export/tools/istartdicomizationtool.h>
+#include <api/api.h>
+
+#include <map>
+
+
+namespace GNC
+{
+
+class EXTAPI StartDicomizationTool : public GNC::GCS::IStartDicomizationTool
+{
+
+protected:
+
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        StartDicomizationTool();
+        ~StartDicomizationTool();
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+        bool IsShown();
+
+protected:
+
+};
+}
diff --git a/cadxcore/main/tools/toolpan.cpp b/cadxcore/main/tools/toolpan.cpp
new file mode 100644
index 0000000..debe78b
--- /dev/null
+++ b/cadxcore/main/tools/toolpan.cpp
@@ -0,0 +1,78 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "toolpan.h"
+
+#if defined(ENABLE_PANTOOL)
+#include <export/contracts/iwidgetscontract.h>
+
+#include <api/globals.h>
+#include <api/iwidgetsmanager.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <iostream>
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
+
+
+GNC::ToolPan::ToolPan()
+{
+        m_pBuilder = NULL;
+}
+
+GNC::ToolPan::~ToolPan()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
+
+GNC::GCS::ITool* GNC::ToolPan::NewTool()
+{
+        return new GNC::ToolPan();
+}
+
+void GNC::ToolPan::Connect()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+        m_pBuilder = new TBuilder(WidgetsContract->GetManager(), GetTriggerButton(), (unsigned long)this);
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(m_pBuilder->GetCursor());
+}
+
+void GNC::ToolPan::Disconnect()
+{
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        // DesSubscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
+#endif
diff --git a/cadxcore/main/tools/toolpan.h b/cadxcore/main/tools/toolpan.h
new file mode 100644
index 0000000..04e2666
--- /dev/null
+++ b/cadxcore/main/tools/toolpan.h
@@ -0,0 +1,62 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_PANTOOL)
+#ifndef PANTOOL_H
+#define PANTOOL_H
+
+#include <export/tools/itoolpan.h>
+#include <widgets/wpan.h>
+#include <api/api.h>
+
+namespace GNC
+{
+
+class EXTAPI ToolPan : public GNC::GCS::IToolPan
+{
+public:
+        typedef GNC::GCS::Events::EventoRaton       TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado     TEventoTeclado;
+        typedef GNC::GCS::Widgets::WPanBuilder TBuilder;
+        ToolPan();
+        ~ToolPan();
+
+//region "Realización de la interfaz IHerramienta"
+
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+
+//endregion
+
+
+//region "Eventos refinados desde los paneles"
+
+//endregion
+
+protected:
+
+        TBuilder*            m_pBuilder;
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/toolslider.cpp b/cadxcore/main/tools/toolslider.cpp
new file mode 100644
index 0000000..4fafe5d
--- /dev/null
+++ b/cadxcore/main/tools/toolslider.cpp
@@ -0,0 +1,177 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "toolslider.h"
+
+#if defined (ENABLE_SLIDERTOOL)
+#include <export/contracts/iwidgetscontract.h>
+
+#include <api/globals.h>
+#include <api/iwidgetsmanager.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <vtkInteractorStyle.h>
+#include <main/managers/widgetsmanager.h>
+#include <api/ivista.h>
+#include <main/controllers/controladorlog.h>
+
+
+#include <iostream>
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+
+namespace GNC
+{
+class EXTAPI wxToolSliderKeyHandler: public wxEvtHandler
+{
+public:
+        wxToolSliderKeyHandler(wxEvtHandler* pParent, GNC::ToolSlider* pTool): wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pTool = pTool;
+                // Connect Events
+                m_pParent->Connect(wxEVT_CHAR, wxKeyEventHandler( wxToolSliderKeyHandler::OnChar),NULL,this);
+        }
+
+        virtual ~wxToolSliderKeyHandler()
+        {
+                m_pParent->Disconnect(wxEVT_CHAR, wxKeyEventHandler( wxToolSliderKeyHandler::OnChar),NULL,this);
+        }
+
+        virtual void OnChar(wxKeyEvent& event)
+        {
+                GNC::GCS::ISliderContract* SliderContract = m_pTool->SliderContract;
+                switch(event.GetKeyCode()) {
+                case WXK_RIGHT: {
+                        if (SliderContract) {
+                                const int maxSlices = SliderContract->GetNumberOfSlices();
+                                const int newSlice = SliderContract->GetSlice() + 1;
+                                if (newSlice >= maxSlices) {
+                                        SliderContract->SetSlice(0);
+                                } else {
+                                        SliderContract->SetSlice( newSlice );
+                                }
+                        }
+                        event.Skip(false);
+                }
+                break;
+                case WXK_LEFT: {
+                        if (SliderContract) {
+                                const int newSlice = SliderContract->GetSlice() - 1;
+                                if (newSlice >= 0) {
+                                        SliderContract->SetSlice(newSlice);
+                                } else {
+                                        const int maxSlices = SliderContract->GetNumberOfSlices();
+                                        SliderContract->SetSlice( maxSlices - 1 );
+                                }
+                        }
+                        event.Skip(false);
+                }
+                break;
+                case WXK_UP: {
+                        if (SliderContract) {
+                                SliderContract->GoToPrevSeries();
+                        }
+                        event.Skip(false);
+                }
+                break;
+                case WXK_DOWN: {
+                        if (SliderContract) {
+                                SliderContract->GoToNextSeries();
+                        }
+                        event.Skip(false);
+                }
+                break;
+                default:
+                        event.ResumePropagation(10);
+                        event.Skip(true);
+                }
+        }
+protected:
+        wxEvtHandler* m_pParent;
+        GNC::ToolSlider* m_pTool;
+};
+}
+
+
+GNC::ToolSlider::ToolSlider()
+{
+        m_pBuilder = NULL;
+        m_pHandler = NULL;
+}
+
+GNC::ToolSlider::~ToolSlider()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+        if (m_pHandler != NULL) {
+                delete m_pHandler;
+        }
+}
+
+
+GNC::GCS::ITool* GNC::ToolSlider::NewTool()
+{
+        return new GNC::ToolSlider();
+}
+
+void GNC::ToolSlider::Connect()
+{
+        if (SliderContract) {
+                if (m_pBuilder != NULL) {
+                        delete m_pBuilder;
+                        m_pBuilder = NULL;
+                }
+
+                m_pBuilder = new TBuilder(SliderContract->GetManager(),SliderContract, GetTriggerButton(), (unsigned long)this);
+                SliderContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+                SliderContract->GetManager()->SetCursor(m_pBuilder->GetCursor());
+        }
+}
+
+void GNC::ToolSlider::Disconnect()
+{
+        if (SliderContract) {
+                SliderContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+                SliderContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+                // DesSubscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
+                if (m_pBuilder != NULL) {
+                        delete m_pBuilder;
+                        m_pBuilder = NULL;
+                }
+        }
+}
+
+void GNC::ToolSlider::ConnectKeyEvents(wxWindow* pWindow)
+{
+        if (pWindow) {
+                if (m_pHandler != NULL) {
+                        LOG_WARN("ToolSlider", "Registering key events twice");
+                        delete m_pHandler;
+                }
+                m_pHandler = new wxToolSliderKeyHandler(pWindow, this);
+        }
+}
+//endregion
+#endif
diff --git a/cadxcore/main/tools/toolslider.h b/cadxcore/main/tools/toolslider.h
new file mode 100644
index 0000000..c5d636b
--- /dev/null
+++ b/cadxcore/main/tools/toolslider.h
@@ -0,0 +1,55 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_SLIDERTOOL)
+#ifndef SLIDERTOOL_H
+#define SLIDERTOOL_H
+#include <export/tools/itoolslider.h>
+#include <widgets/wslider.h>
+#include <api/api.h>
+
+namespace GNC
+{
+class wxToolSliderKeyHandler;
+
+class EXTAPI ToolSlider : public GNC::GCS::IToolSlider
+{
+public:
+        typedef GNC::GCS::Widgets::WSliderBuilder      TBuilder;
+        ToolSlider();
+        ~ToolSlider();
+
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+
+        virtual void ConnectKeyEvents(wxWindow* pWindow);
+
+protected:
+        friend class wxToolSliderKeyHandler;
+
+        TBuilder*            m_pBuilder;
+        wxToolSliderKeyHandler* m_pHandler;
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/toolwindowlevel.cpp b/cadxcore/main/tools/toolwindowlevel.cpp
new file mode 100644
index 0000000..f693b29
--- /dev/null
+++ b/cadxcore/main/tools/toolwindowlevel.cpp
@@ -0,0 +1,330 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "toolwindowlevel.h"
+#if defined(ENABLE_WINDOWLEVELTOOL)
+
+#include <api/iwidgetsmanager.h>
+#include <api/internationalization/internationalization.h>
+
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <widgets/wwindowlevel.h>
+
+#include <api/controllers/ieventscontroller.h>
+#include <api/controllers/icontroladorlog.h>
+#include <eventos/modificacionimagen.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtkImageData.h>
+#include <vtkPointData.h>
+
+#include <vtkImageData.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkSmartPointer.h>
+#include <vtkObject.h>
+#include <vtkPointData.h>
+#include <vtkImageData.h>
+#include <vtkLookupTable.h>
+#include <vtkImageActor.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderer.h>
+
+#define RESETEAR_WINDOWLEVEL 1221
+#define AUTO_CALCULE 1222
+#define FIRST_WINDOW_LEVEL 1223
+
+namespace GNC
+{
+namespace GUI
+{
+class EventHandlerWindowLevel: public wxEvtHandler
+{
+public:
+        EventHandlerWindowLevel(wxEvtHandler* pParent, GNC::ToolWindowLevel* pHerramienta, GNC::GCS::IWindowLevelContract::ListaWindowLevels* pListaWindowLevels):wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pHerramienta=pHerramienta;
+                m_pWindowLevelList = pListaWindowLevels;
+                // Connect Events
+                m_pParent->Connect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerWindowLevel::OnMenuWindowLevelClick),NULL,this);
+        }
+
+        ~EventHandlerWindowLevel()
+        {
+                m_pParent->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerWindowLevel::OnMenuWindowLevelClick),NULL,this);
+                m_pParent = NULL;
+                m_pHerramienta = NULL;
+        }
+
+
+        virtual void OnMenuWindowLevelClick( wxCommandEvent& event )
+        {
+                if (event.GetId() == RESETEAR_WINDOWLEVEL) {
+                        m_pHerramienta->Resetear();
+                } else if (event.GetId() == AUTO_CALCULE) {
+                        m_pHerramienta->AutoCalcule();
+                } else {
+                        if (m_pWindowLevelList != NULL) {
+                                int index = event.GetId() - FIRST_WINDOW_LEVEL;
+                                GNC::GCS::IWindowLevelContract::ListaWindowLevels::iterator it = m_pWindowLevelList->begin();
+                                for (int i = 0; index != i && it != m_pWindowLevelList->end(); ++it, ++i);
+                                if (it != m_pWindowLevelList->end()) {
+                                        m_pHerramienta->SetWindowLevel((*it).m_label);
+                                }
+                        }
+                }
+                event.Skip(false);
+        }
+
+        GNC::ToolWindowLevel* m_pHerramienta;
+        wxEvtHandler* m_pParent;
+        GNC::GCS::IWindowLevelContract::ListaWindowLevels* m_pWindowLevelList;
+};
+}
+}
+
+//----------------------------------------------------------------------
+
+GNC::ToolWindowLevel::ToolWindowLevel()
+{
+        m_pWindowLevelBuilder = NULL;
+}
+
+GNC::ToolWindowLevel::~ToolWindowLevel()
+{
+        if (m_pWindowLevelBuilder != NULL) {
+                delete m_pWindowLevelBuilder;
+                m_pWindowLevelBuilder = NULL;
+        }
+}
+
+GNC::GCS::ITool* GNC::ToolWindowLevel::NewTool()
+{
+        return new GNC::ToolWindowLevel();
+}
+
+
+
+void GNC::ToolWindowLevel::Connect()
+{
+        if (m_pWindowLevelBuilder != NULL) {
+                delete m_pWindowLevelBuilder;
+                m_pWindowLevelBuilder = NULL;
+        }
+
+        if (WindowLevelContract->Inicializado()) {
+                // Subscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
+                // Usamos de Id de grupo el valor del puntero de la herramienta, WindowLevelContract es unico y no cambia
+                m_pWindowLevelBuilder = new GNC::GCS::Widgets::WWindowLevelBuilder(WindowLevelContract->GetManager(), GetTriggerButton(), (unsigned long)this);
+                m_pWindowLevelBuilder->SetObservador(this);
+                WindowLevelContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+                WindowLevelContract->GetManager()->SetCursor(m_pWindowLevelBuilder->GetCursor());
+        }
+}
+
+void GNC::ToolWindowLevel::Disconnect()
+{
+        if (m_pWindowLevelBuilder != NULL) {
+                delete m_pWindowLevelBuilder;
+                m_pWindowLevelBuilder = NULL;
+        }
+        WindowLevelContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WindowLevelContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+}
+
+
+bool GNC::ToolWindowLevel::HasDropDownMenu()
+{
+        return true;
+}
+
+
+void GNC::ToolWindowLevel::AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (!WindowLevelContract->GetWindowLevelList().empty()) {
+                double window = -1, level = -1;
+                if (WindowLevelContract->Inicializado()) {
+                        window = WindowLevelContract->GetCurrentWindow();
+                        level = WindowLevelContract->GetCurrentLevel();
+                }	else {
+                        return;
+                }
+
+                bool inserted = false;
+                //first file
+                int i = FIRST_WINDOW_LEVEL;
+                wxBitmap icon;
+                for (GNC::GCS::IWindowLevelContract::ListaWindowLevels::iterator it = WindowLevelContract->GetWindowLevelList().begin(); it != WindowLevelContract->GetWindowLevelList().end(); ++it) {
+                        if ((*it).m_type == TWindowLevelContract::WindowLevel::TWLT_FILE) {
+                                wxMenuItem* pItem = new GNC::GUI::wxMenuItemTool(pMenu, i++,wxString::FromUTF8((*it).m_label.c_str()), icon, new GNC::GUI::EventHandlerWindowLevel(pParent, this, &WindowLevelContract->GetWindowLevelList()), wxITEM_CHECK);
+                                pMenu->Append(pItem);
+                                pMenu->Check(pItem->GetId(), (window == (*it).m_window && level == (*it).m_level));
+                                inserted = true;
+                        }
+                }
+                if (inserted) {
+                        pMenu->AppendSeparator();
+                }
+                inserted = false;
+                for (GNC::GCS::IWindowLevelContract::ListaWindowLevels::iterator it = WindowLevelContract->GetWindowLevelList().begin(); it != WindowLevelContract->GetWindowLevelList().end(); ++it) {
+                        if ((*it).m_type == TWindowLevelContract::WindowLevel::TWLT_PREDEFINED) {
+                                wxMenuItem* pItem = new GNC::GUI::wxMenuItemTool(pMenu, i++,wxString::FromUTF8((*it).m_label.c_str()), icon, new GNC::GUI::EventHandlerWindowLevel(pParent, this, &WindowLevelContract->GetWindowLevelList()), wxITEM_CHECK);
+                                pMenu->Append(pItem);
+                                pMenu->Check(pItem->GetId(), (window == (*it).m_window && level == (*it).m_level));
+                                inserted = true;
+                        }
+                }
+                if (inserted) {
+                        pMenu->AppendSeparator();
+                }
+        }
+
+        wxBitmap icon;
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, RESETEAR_WINDOWLEVEL,_("Reset to default"), GinkgoResourcesManager::MenuIcons::GetIcoReset(), new GNC::GUI::EventHandlerWindowLevel(pParent, this, &WindowLevelContract->GetWindowLevelList())));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, AUTO_CALCULE,_("Auto calculate"), icon, new GNC::GUI::EventHandlerWindowLevel(pParent, this, &WindowLevelContract->GetWindowLevelList())));
+}
+
+
+//region "Realización de la interfaz IHerramienta"
+
+void GNC::ToolWindowLevel::OnStart()
+{
+        double window = WindowLevelContract->GetCurrentWindow();
+        double level = WindowLevelContract->GetCurrentLevel();
+        m_WindowLevelInicial = GNC::GCS::IWindowLevelContract::WindowLevel("",window, level, TWindowLevelContract::WindowLevel::TWLT_PREDEFINED);
+}
+
+
+void GNC::ToolWindowLevel::OnAjuste(TVector& start, TVector& stop)
+{
+        vtkGinkgoImageViewer* pIV = WindowLevelContract->GetViewerActivo();
+
+        int* size = pIV->GetRenderWindow()->GetSize();
+
+        TVector delta = ((stop - start) * 2) / TVector(size[0], size[1]);
+
+        if (std::abs(m_WindowLevelInicial.m_window) > 0.01) {
+                delta.x *= m_WindowLevelInicial.m_window;
+        } else {
+                delta.x *= (m_WindowLevelInicial.m_window < 0 ? -0.01 : 0.01);
+        }
+        if (std::abs(m_WindowLevelInicial.m_level) > 0.01) {
+                delta.y *= m_WindowLevelInicial.m_level;
+        } else {
+                delta.y *= (m_WindowLevelInicial.m_level < 0 ? -0.01 : 0.01);
+        }
+
+        // Abs so that direction does not flip
+
+        if (m_WindowLevelInicial.m_window < 0.0) {
+                delta.x *= -1.0f;
+        }
+        if (m_WindowLevelInicial.m_level < 0.0) {
+                delta.y *= -1.0f;
+        }
+
+        // Compute new window level
+
+        double newWindow = delta.x + m_WindowLevelInicial.m_window;
+        double newLevel = m_WindowLevelInicial.m_level - delta.y;
+
+        // Stay away from zero and really
+
+        newWindow = std::max((double)0.01f, newWindow);
+        if (std::abs(newLevel) < 0.01) {
+                newLevel = 0.01*(newLevel < 0 ? -1 : 1);
+        }
+
+        double newClampedWindow = newWindow;
+        double newClampedLevel = newLevel;
+        ClampWindowLevel(newWindow, newLevel, newClampedWindow, newClampedLevel);
+
+        WindowLevelContract->SetUserDefinedWindowLevel(newClampedWindow, newClampedLevel);
+        SetWindowLevel(newClampedWindow, newClampedLevel);
+}
+
+void GNC::ToolWindowLevel::OnEnd()
+{
+}
+
+//endregion
+
+//region "metodos propios de la herramienta window/level"
+
+void GNC::ToolWindowLevel::ClampWindowLevel(double window, double level, double& clampedWindow, double& clampedLevel)
+{
+        clampedWindow = window;
+        clampedLevel = level;
+}
+
+void GNC::ToolWindowLevel::SetWindowLevel(const std::string& label)
+{
+        for (TWindowLevelContract::ListaWindowLevels::iterator it = WindowLevelContract->GetWindowLevelList().begin(); it != WindowLevelContract->GetWindowLevelList().end(); ++it) {
+                if ( (*it).m_label == label) {
+                        WindowLevelContract->SetLabelCurrent(label);
+                        SetWindowLevel((*it).m_window, (*it).m_level);
+                        return;
+                }
+        }
+}
+
+void GNC::ToolWindowLevel::SetWindowLevel(double window, double level)
+{
+        GNC::GCS::Events::EventoModificacionImagen* pEvt = new GNC::GCS::Events::EventoModificacionImagen(WindowLevelContract->GetManager()->GetVista(),GNC::GCS::Events::EventoModificacionImagen::VisualizacionImagenModificada, -1);
+        pEvt->SetWindow(window);
+        pEvt->SetLevel(level);
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(pEvt);
+}
+
+void GNC::ToolWindowLevel::Resetear()
+{
+        wxString wLStr, wWStr;
+        vtkGinkgoImageViewer* pIV = WindowLevelContract->GetViewerActivo();
+        if (pIV == NULL) {
+                return;
+        }
+
+        GNC::GCS::Events::EventoModificacionImagen* pEvt = new GNC::GCS::Events::EventoModificacionImagen(WindowLevelContract->GetManager()->GetVista(),GNC::GCS::Events::EventoModificacionImagen::VisualizacionImagenModificada, -1);
+
+        pEvt->EnableResetWindowLevel();
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(pEvt);
+
+        double window = WindowLevelContract->GetCurrentWindow();
+        double level = WindowLevelContract->GetCurrentLevel();
+
+        WindowLevelContract->SetLabelCurrent("");
+        SetWindowLevel(window, level);
+}
+
+void GNC::ToolWindowLevel::AutoCalcule()
+{
+        GNC::GCS::Events::EventoModificacionImagen* pEvt = new GNC::GCS::Events::EventoModificacionImagen(WindowLevelContract->GetManager()->GetVista(),GNC::GCS::Events::EventoModificacionImagen::VisualizacionImagenModificada, -1);
+        pEvt->EnableAutoCalculeWindowLevel();
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(pEvt);
+}
+
+//endregion
+#endif
diff --git a/cadxcore/main/tools/toolwindowlevel.h b/cadxcore/main/tools/toolwindowlevel.h
new file mode 100644
index 0000000..747fe17
--- /dev/null
+++ b/cadxcore/main/tools/toolwindowlevel.h
@@ -0,0 +1,86 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_WINDOWLEVELTOOL)
+#ifndef WINDOWLEVELTOOL_H
+#define WINDOWLEVELTOOL_H
+#include <export/tools/itoolwindowlevel.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/api.h>
+#include <widgets/observers/iobservadorwindowlevel.h>
+#include <export/contracts/iwindowlevelcontract.h>
+
+#include <map>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+class WWindowLevelBuilder;
+}
+}
+
+class EXTAPI ToolWindowLevel : public GNC::GCS::IToolWindowLevel, public GNC::GCS::Widgets::Observadores::IObservadorWindowLevel
+{
+
+public:
+        typedef GNC::GCS::Widgets::WWindowLevelBuilder TBuilder;
+        typedef GNC::GCS::IWindowLevelContract TWindowLevelContract;
+
+        ToolWindowLevel();
+        virtual ~ToolWindowLevel();
+
+        //region "ITool/IContract realization"
+
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+
+        virtual bool HasDropDownMenu();
+        void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+        //endregion
+
+        //region "Realización de la interfaz IHerramienta"
+        virtual void OnStart();
+        virtual void OnAjuste(TVector& start, TVector& stop);
+        virtual void OnEnd();
+        //endregion
+
+        //region "metodos propios de la herramienta window/level"
+        virtual void ClampWindowLevel(double window, double level, double& clampedWindow, double& clampedLevel);
+
+        void SetWindowLevel(const std::string& label);
+        virtual void SetWindowLevel(double window, double level);
+        void Resetear();
+        void AutoCalcule();
+        //endregion
+
+protected:
+        TBuilder*  m_pWindowLevelBuilder;
+        GNC::GCS::IWindowLevelContract::WindowLevel m_WindowLevelInicial;
+
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/toolzoom.cpp b/cadxcore/main/tools/toolzoom.cpp
new file mode 100644
index 0000000..7fdf101
--- /dev/null
+++ b/cadxcore/main/tools/toolzoom.cpp
@@ -0,0 +1,218 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <ostream>
+#include "toolzoom.h"
+#if defined(ENABLE_ZOOMTOOL)
+#include <export/contracts/iwidgetscontract.h>
+
+#include <api/globals.h>
+#include <api/iwidgetsmanager.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <vtkInteractorStyle.h>
+#include <eventos/modificacionimagen.h>
+#include <eventos/render.h>
+#include <api/controllers/ieventscontroller.h>
+#include <main/controllers/controladorlog.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <vtkRenderer.h>
+#include <vtkInteractorStyle.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
+
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+
+
+#define ZOOM_1_1 1211
+namespace GNC
+{
+namespace GUI
+{
+class EventHandlerZoomTool: public wxEvtHandler
+{
+public:
+        EventHandlerZoomTool(wxEvtHandler* pParent, GNC::ToolZoom* pHerramienta):wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pHerramienta=pHerramienta;
+                // Connect Events
+                m_pParent->Connect(ZOOM_1_1, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerZoomTool::OnZoom1_1Click),NULL,this);
+        }
+
+        ~EventHandlerZoomTool()
+        {
+                m_pParent->Disconnect(ZOOM_1_1, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerZoomTool::OnZoom1_1Click),NULL,this);
+        }
+
+        virtual void OnZoom1_1Click(wxCommandEvent& event)
+        {
+                m_pHerramienta->ZoomOneOne();
+                event.Skip(false);
+        }
+        GNC::ToolZoom* m_pHerramienta;
+        wxEvtHandler* m_pParent;
+};
+}
+class EXTAPI wxToolZoomKeyHandler: public wxEvtHandler
+{
+public:
+        wxToolZoomKeyHandler(wxEvtHandler* pParent, GNC::ToolZoom* pTool): wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pTool = pTool;
+                // Connect Events
+                m_pParent->Connect(wxEVT_CHAR, wxKeyEventHandler( wxToolZoomKeyHandler::OnChar),NULL,this);
+        }
+
+        virtual ~wxToolZoomKeyHandler()
+        {
+                m_pParent->Disconnect(wxEVT_CHAR, wxKeyEventHandler( wxToolZoomKeyHandler::OnChar),NULL,this);
+        }
+
+        void DoZoom(int steps)
+        {
+                if (m_pTool->WidgetsContract && m_pTool->WidgetsContract->GetViewerActivo()) {
+                        vtkSmartPointer<vtkRenderWindowInteractor> rwi = m_pTool->WidgetsContract->GetViewerActivo()->GetRenderWindowInteractor();
+                        vtkSmartPointer<GinkgoInteractorStyleImage2D> is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+                        if (is != NULL) {
+                                if (is->GetState() != VTKIS_ZOOM) {
+                                        is->StartZoom();
+                                }
+                                double factor = 0.1* steps * is->GetMouseWheelMotionFactor();
+                                //this->Dolly(pow((double)1.1, factor));
+                                is->DoZoom(factor, true);
+                        }
+                }
+
+        }
+
+        virtual void OnChar(wxKeyEvent& event)
+        {
+                switch(event.GetKeyCode()) {
+                case WXK_PAGEUP: {
+                        //zoom -
+                        DoZoom(3);
+                        event.Skip(false);
+                }
+                break;
+                case WXK_PAGEDOWN: {
+                        //zoom +
+                        DoZoom(-3);
+                        event.Skip(false);
+                }
+                break;
+                default:
+                        event.ResumePropagation(10);
+                        event.Skip(true);
+                }
+        }
+protected:
+        wxEvtHandler* m_pParent;
+        GNC::ToolZoom* m_pTool;
+};
+
+}
+
+
+GNC::ToolZoom::ToolZoom()
+{
+        m_pBuilder = NULL;
+        m_pHandler = NULL;
+}
+
+GNC::ToolZoom::~ToolZoom()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+        if (m_pHandler != NULL) {
+                delete m_pHandler;
+        }
+}
+
+
+GNC::GCS::ITool* GNC::ToolZoom::NewTool()
+{
+        return new GNC::ToolZoom();
+}
+
+void GNC::ToolZoom::Connect()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+
+        m_pBuilder = new TBuilder(WidgetsContract->GetManager(), GetTriggerButton(), (unsigned long)this);
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(m_pBuilder->GetCursor());
+}
+
+void GNC::ToolZoom::Disconnect()
+{
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        // DesSubscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
+
+bool GNC::ToolZoom::HasDropDownMenu()
+{
+        return true;
+}
+
+void GNC::ToolZoom::AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ZOOM_1_1,_("Reset size to display resolution"), GinkgoResourcesManager::MagnifierBar::GetIcoZoomIn(), new GNC::GUI::EventHandlerZoomTool(pParent, this)));
+}
+
+
+void GNC::ToolZoom::ZoomOneOne()
+{
+        GNC::GCS::IWidgetsContract::TViewerList listOfViewers;
+        WidgetsContract->GetAllViewers(listOfViewers);
+        for (GNC::GCS::IWidgetsContract::TViewerList::iterator it = listOfViewers.begin(); it != listOfViewers.end(); ++it) {
+                GNC::GCS::IWidgetsContract::TViewerList::reference element = (*it);
+                if (element) {
+                        element->ResetZoom(false, (int)GNC::GCS::Events::EventoModificacionImagen::ZM_CenteredOriginalSize);
+                }
+        }
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoRender(WidgetsContract->GetManager()->GetVista()));
+}
+
+void GNC::ToolZoom::ConnectKeyEvents(wxWindow* pWindow)
+{
+        if (pWindow) {
+                if (m_pHandler != NULL) {
+                        LOG_WARN("ToolZoom", "Registering key events twice");
+                        delete m_pHandler;
+                }
+                m_pHandler = new wxToolZoomKeyHandler(pWindow, this);
+        }
+}
+#endif
diff --git a/cadxcore/main/tools/toolzoom.h b/cadxcore/main/tools/toolzoom.h
new file mode 100644
index 0000000..349a2a9
--- /dev/null
+++ b/cadxcore/main/tools/toolzoom.h
@@ -0,0 +1,58 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_ZOOMTOOL)
+#ifndef ZOOMTOOL_H
+#define ZOOMTOOL_H
+#include <export/tools/itoolzoom.h>
+#include <api/api.h>
+#include <widgets/wzoom.h>
+
+namespace GNC
+{
+class wxToolZoomKeyHandler;
+class EXTAPI ToolZoom : public GNC::GCS::IToolZoom
+{
+public:
+        typedef GNC::GCS::Events::EventoRaton       TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado     TEventoTeclado;
+        typedef GNC::GCS::Widgets::WZoomBuilder      TBuilder;
+        ToolZoom();
+        ~ToolZoom();
+
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+        virtual bool HasDropDownMenu();
+        virtual void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual void ZoomOneOne();
+        virtual void ConnectKeyEvents(wxWindow* pWindow);
+
+protected:
+        friend class wxToolZoomKeyHandler;
+        TBuilder*            m_pBuilder;
+        wxToolZoomKeyHandler* m_pHandler;
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/trackballtool.cpp b/cadxcore/main/tools/trackballtool.cpp
new file mode 100644
index 0000000..4614bbd
--- /dev/null
+++ b/cadxcore/main/tools/trackballtool.cpp
@@ -0,0 +1,78 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "trackballtool.h"
+
+
+#include <export/contracts/iwidgetscontract.h>
+
+#include <api/globals.h>
+#include <api/iwidgetsmanager.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <widgets/wtrackball.h>
+
+#include <iostream>
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
+
+
+GNC::TrackballTool::TrackballTool()
+{
+        m_pBuilder = NULL;
+}
+
+GNC::TrackballTool::~TrackballTool()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
+
+GNC::GCS::ITool* GNC::TrackballTool::NewTool()
+{
+        return new GNC::TrackballTool();
+}
+
+void GNC::TrackballTool::Connect()
+{
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+        m_pBuilder = new TBuilder(WidgetsContract->GetManager(), GetTriggerButton(), (unsigned long)this);
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(m_pBuilder->GetCursor());
+}
+
+void GNC::TrackballTool::Disconnect()
+{
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        // DesSubscribimos los eventos de la ventana a un metodo especifico del panel de esta herramienta
+        if (m_pBuilder != NULL) {
+                delete m_pBuilder;
+                m_pBuilder = NULL;
+        }
+}
diff --git a/cadxcore/main/tools/trackballtool.h b/cadxcore/main/tools/trackballtool.h
new file mode 100644
index 0000000..668ef51
--- /dev/null
+++ b/cadxcore/main/tools/trackballtool.h
@@ -0,0 +1,72 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#ifndef TRACKBALLTOOL_H
+#define TRACKBALLTOOL_H
+
+#include <export/tools/itrackballtool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+class WTrackballBuilder;
+}
+namespace Events
+{
+class EventoRaton;
+class EventoTeclado;
+}
+}
+
+class EXTAPI TrackballTool : public GNC::GCS::ITrackballTool
+{
+public:
+        typedef GNC::GCS::Events::EventoRaton       TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado     TEventoTeclado;
+        typedef GNC::GCS::Widgets::WTrackballBuilder TBuilder;
+        TrackballTool();
+        ~TrackballTool();
+
+//region "Realización de la interfaz IHerramienta"
+
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+
+//endregion
+
+
+//region "Eventos refinados desde los paneles"
+
+//endregion
+
+protected:
+
+        TBuilder*            m_pBuilder;
+};
+}
+#endif
diff --git a/cadxcore/main/tools/undotool.cpp b/cadxcore/main/tools/undotool.cpp
new file mode 100644
index 0000000..d48872a
--- /dev/null
+++ b/cadxcore/main/tools/undotool.cpp
@@ -0,0 +1,144 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <sstream>
+#include "undotool.h"
+
+#if defined(ENABLE_UNDOTOOL)
+
+#include <wx/menu.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <export/contracts/iviewcontract.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <api/internationalization/internationalization.h>
+#include <main/entorno.h>
+#include <api/globals.h>
+#include <main/controllers/controladoracciones.h>
+
+//----------------------------------------------------------------------
+#define ID_DESHACER  1721
+#define ID_REHACER   1722
+
+namespace GNC
+{
+namespace GUI
+{
+class EventHandlerUndo: public wxEvtHandler
+{
+public:
+        EventHandlerUndo(wxEvtHandler* pParent, GNC::UndoTool* pHerramienta):wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pHerramienta=pHerramienta;
+                m_pParent->Connect(ID_DESHACER, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerUndo::OnDeshacer),NULL,this);
+                m_pParent->Connect(ID_DESHACER, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EventHandlerUndo::OnUpdateDeshacerUI),NULL,this);
+                m_pParent->Connect(ID_REHACER, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerUndo::OnRehacer),NULL,this);
+                m_pParent->Connect(ID_REHACER, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EventHandlerUndo::OnUpdateRehacerUI),NULL,this);
+        }
+        ~EventHandlerUndo()
+        {
+                m_pParent->Disconnect(ID_DESHACER, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerUndo::OnDeshacer),NULL,this);
+                m_pParent->Disconnect(ID_DESHACER, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EventHandlerUndo::OnUpdateDeshacerUI),NULL,this);
+                m_pParent->Disconnect(ID_REHACER, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerUndo::OnRehacer),NULL,this);
+                m_pParent->Disconnect(ID_REHACER, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EventHandlerUndo::OnUpdateRehacerUI),NULL,this);
+                m_pParent = NULL;
+                m_pHerramienta = NULL;
+        }
+
+        void OnDeshacer(wxCommandEvent& event)
+        {
+                m_pHerramienta->Deshacer();
+                event.Skip(false);
+        }
+
+        void OnUpdateDeshacerUI(wxUpdateUIEvent& event)
+        {
+                std::string titulo;
+                event.Enable(m_pHerramienta->PuedeDeshacer(titulo));
+                event.Skip(false);
+        }
+
+        void OnRehacer(wxCommandEvent& event)
+        {
+                m_pHerramienta->Rehacer();
+                event.Skip(false);
+        }
+
+        void OnUpdateRehacerUI(wxUpdateUIEvent& event)
+        {
+                std::string titulo;
+                event.Enable(m_pHerramienta->PuedeRehacer(titulo));
+                event.Skip(false);
+        }
+
+        GNC::UndoTool* m_pHerramienta;
+        wxEvtHandler* m_pParent;
+};
+}
+}
+
+
+GNC::GCS::ITool* GNC::UndoTool::NewTool()
+{
+        return new GNC::UndoTool();
+}
+
+GNC::UndoTool::UndoTool()
+{
+}
+GNC::UndoTool::~UndoTool()
+{
+}
+
+bool GNC::UndoTool::ExecuteAction()
+{
+        return false;
+}
+
+void GNC::UndoTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                wxBitmap icon;
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu,ID_DESHACER,_("Undo")+wxString(wxT(" \tCtrl+z")), icon, new GNC::GUI::EventHandlerUndo(pParent, this)));
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu,ID_REHACER,_("Redo")+wxString(wxT(" \tCtrl+y")), icon, new GNC::GUI::EventHandlerUndo(pParent, this)));
+        }
+}
+
+void GNC::UndoTool::Deshacer()
+{
+        return GNC::GCS::ControladorAcciones::Instance()->Deshacer(ViewContract->GetView());
+}
+
+void GNC::UndoTool::Rehacer()
+{
+        return GNC::GCS::ControladorAcciones::Instance()->Hacer(ViewContract->GetView());
+}
+
+bool GNC::UndoTool::PuedeDeshacer(std::string& nombreAccion)
+{
+        return GNC::GCS::ControladorAcciones::Instance()->PuedeDeshacer(ViewContract->GetView(),nombreAccion);
+}
+bool GNC::UndoTool::PuedeRehacer(std::string& nombreAccion)
+{
+        return GNC::GCS::ControladorAcciones::Instance()->PuedeHacer(ViewContract->GetView(),nombreAccion);
+}
+
+#endif
diff --git a/cadxcore/main/tools/undotool.h b/cadxcore/main/tools/undotool.h
new file mode 100644
index 0000000..1df0e74
--- /dev/null
+++ b/cadxcore/main/tools/undotool.h
@@ -0,0 +1,57 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "enabled_tools.h"
+#if defined(ENABLE_UNDOTOOL)
+#ifndef UNDOTOOL_H
+#define UNDOTOOL_H
+#include <export/tools/iundotool.h>
+#include <api/api.h>
+
+#include <map>
+
+namespace GNC
+{
+
+class EXTAPI UndoTool : public GNC::GCS::IUndoTool
+{
+
+protected:
+
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        UndoTool();
+        ~UndoTool();
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        //deshacer
+        virtual void Deshacer();
+        //rehacer
+        virtual void Rehacer();
+        virtual bool PuedeDeshacer(std::string& nombreAccion);
+        virtual bool PuedeRehacer(std::string& nombreAccion);
+protected:
+
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/tools/videotool.cpp b/cadxcore/main/tools/videotool.cpp
new file mode 100644
index 0000000..e68a177
--- /dev/null
+++ b/cadxcore/main/tools/videotool.cpp
@@ -0,0 +1,245 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "videotool.h"
+#include <wx/thread.h>
+#include <export/contracts/islidercontract.h>
+#include <api/globals.h>
+#include <eventos/toolevents.h>
+#include <api/controllers/ieventscontroller.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <vtkInteractorStyle.h>
+
+
+#include <iostream>
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+
+#define BUCLE_BUTTON 1211
+#define SPEED_BUTTON 1212
+
+namespace GNC
+{
+namespace GUI
+{
+class VideoToolTimer : public wxTimer
+{
+public:
+        VideoToolTimer(GNC::VideoTool* pTool): VideoTool(pTool)
+        {
+        }
+        ~VideoToolTimer()
+        {
+                VideoTool = NULL;
+        }
+
+        void StartTimer()
+        {
+                if (IsRunning()) {
+                        Stop();
+                }
+                Start(VideoTool->GetPeriod(), true);
+        }
+
+        virtual void Notify()
+        {
+                if (VideoTool->GoToNextSlide()) {
+                        Start(VideoTool->GetPeriod(), true);
+                }
+        }
+protected:
+        GNC::VideoTool* VideoTool;
+};
+
+class EventHandlerVideoTool: public wxEvtHandler
+{
+public:
+        EventHandlerVideoTool(wxEvtHandler* pParent, GNC::VideoTool* pHerramienta):wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pHerramienta=pHerramienta;
+                // Connect Events
+                m_pParent->Connect(BUCLE_BUTTON, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerVideoTool::OnEnableBucle),NULL,this);
+        }
+
+        ~EventHandlerVideoTool()
+        {
+                m_pParent->Disconnect(BUCLE_BUTTON, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerVideoTool::OnEnableBucle),NULL,this);
+        }
+
+        virtual void OnEnableBucle(wxCommandEvent& event)
+        {
+                m_pHerramienta->SetBucle(!m_pHerramienta->IsBucleEnabled());
+                event.Skip(false);
+        }
+
+        GNC::VideoTool* m_pHerramienta;
+        wxEvtHandler* m_pParent;
+};
+
+class EventHandlerSetFPS: public wxEvtHandler
+{
+public:
+        EventHandlerSetFPS(wxEvtHandler* pParent, GNC::VideoTool* pHerramienta, int fps, int id):wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pHerramienta=pHerramienta;
+                m_fps = fps;
+                m_id = id;
+                // Connect Events
+                m_pParent->Connect(m_id, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerSetFPS::OnSetFPS),NULL,this);
+        }
+
+        ~EventHandlerSetFPS()
+        {
+                m_pParent->Disconnect(m_id, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerSetFPS::OnSetFPS),NULL,this);
+        }
+
+        virtual void OnSetFPS(wxCommandEvent& event)
+        {
+                m_pHerramienta->SetPeriod(m_fps);
+                event.Skip(false);
+        }
+
+        GNC::VideoTool* m_pHerramienta;
+        wxEvtHandler* m_pParent;
+        int m_fps;
+        int m_id;
+};
+
+
+}
+}
+
+
+GNC::VideoTool::VideoTool() : BlucleEnabled(true), Period(50)
+{
+        pTimer = new GNC::GUI::VideoToolTimer(this);
+}
+
+GNC::VideoTool::~VideoTool()
+{
+        delete pTimer;
+        pTimer = NULL;
+}
+
+
+GNC::GCS::ITool* GNC::VideoTool::NewTool()
+{
+        return new GNC::VideoTool();
+}
+
+bool GNC::VideoTool::HasDropDownMenu()
+{
+        return true;
+}
+
+void GNC::VideoTool::AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        {
+                wxBitmap iconBucle;
+                wxString message;
+                if (BlucleEnabled) {
+                        iconBucle = GinkgoResourcesManager::CineBar::GetIcoNoBucle();
+                        message = _("Disable loop");
+                } else {
+                        iconBucle = GinkgoResourcesManager::CineBar::GetIcoBucle();
+                        message = _("Enable loop");
+                }
+                pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, BUCLE_BUTTON,message, iconBucle, new GNC::GUI::EventHandlerVideoTool(pParent, this)));
+        }
+        pMenu->AppendSeparator();
+        wxBitmap icon;
+        int periodos[8] = {50,125,250,500,1000,2000,5000,10000};
+        for (int id = SPEED_BUTTON; id < SPEED_BUTTON + 8; id++) {
+                int period = periodos[id-SPEED_BUTTON];
+                GNC::GUI::wxMenuItemTool* pItem =new GNC::GUI::wxMenuItemTool(pMenu, id,wxString::Format(_("%.1f fps"), (1000.0/period) ), icon, new GNC::GUI::EventHandlerSetFPS(pParent, this, period, id),wxITEM_CHECK);
+                pMenu->Append(pItem);
+                pItem->Check(Period ==period);
+        }
+}
+
+bool GNC::VideoTool::ExecuteAction()
+{
+        wxBitmap icon;
+        if (pTimer->IsRunning()) {
+                pTimer->Stop();
+                icon = GinkgoResourcesManager::CineBar::GetIcoPlay();
+        } else {
+                if (SliderContract->GetSlice() == (SliderContract->GetNumberOfSlices()-1)) {
+                        GoToNextSlide(true);
+                }
+                pTimer->StartTimer();
+                icon = GinkgoResourcesManager::CineBar::GetIcoPause();
+        }
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ChangeToolIconEvent(&icon, this, m_pParent));
+        return true;
+}
+
+bool GNC::VideoTool::GoToNextSlide(bool force)
+{
+        bool continuePlaying = false;
+        int maxSlice = SliderContract->GetNumberOfSlices();
+        if (maxSlice > 1) {
+                int current = SliderContract->GetSlice();
+                if ((current + 1) < maxSlice) {
+                        SliderContract->SetSlice(current+1);
+                        continuePlaying = true;
+                } else {
+                        if (BlucleEnabled || force) {
+                                SliderContract->SetSlice(0);
+                                continuePlaying = true;
+                        }
+                }
+        }
+        if (!continuePlaying) {
+                wxBitmap icon = GinkgoResourcesManager::CineBar::GetIcoPlay();
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ChangeToolIconEvent(&icon, this, m_pParent));
+        }
+        return continuePlaying;
+}
+
+bool GNC::VideoTool::IsBucleEnabled()
+{
+        return BlucleEnabled;
+}
+void GNC::VideoTool::SetBucle(bool bucle)
+{
+        BlucleEnabled = bucle;
+}
+int GNC::VideoTool::GetPeriod()
+{
+        return Period;
+}
+void GNC::VideoTool::SetPeriod(int period)
+{
+        if (period != this->Period) {
+                this->Period = period;
+                if (pTimer->IsRunning()) {
+                        pTimer->Stop();
+                        pTimer->StartTimer();
+                }
+        }
+}
+//endregion
diff --git a/cadxcore/main/tools/videotool.h b/cadxcore/main/tools/videotool.h
new file mode 100644
index 0000000..db28a4e
--- /dev/null
+++ b/cadxcore/main/tools/videotool.h
@@ -0,0 +1,57 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#ifndef VIDEOTOOL_H
+#define VIDEOTOOL_H
+#include <export/tools/ivideotool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+namespace GUI
+{
+class VideoToolTimer;
+}
+class EXTAPI VideoTool : public GNC::GCS::IVideoTool
+{
+public:
+        VideoTool();
+        ~VideoTool();
+
+        virtual GNC::GCS::ITool* NewTool();
+
+        virtual bool HasDropDownMenu();
+        void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual bool ExecuteAction();
+        virtual bool GoToNextSlide(bool force = false);
+        virtual bool IsBucleEnabled();
+        virtual void SetBucle(bool bucle);
+        virtual int GetPeriod();
+        virtual void SetPeriod(int period);
+
+protected:
+        GNC::GUI::VideoToolTimer* pTimer;
+        bool BlucleEnabled;
+        int Period;
+};
+}
+#endif
diff --git a/cadxcore/main/tools/windowlayouttool.cpp b/cadxcore/main/tools/windowlayouttool.cpp
new file mode 100644
index 0000000..87ea765
--- /dev/null
+++ b/cadxcore/main/tools/windowlayouttool.cpp
@@ -0,0 +1,377 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "windowlayouttool.h"
+#if defined(ENABLE_WINDOWLAYOUTTOOL)
+
+#include <wx/menu.h>
+#include <api/globals.h>
+#include <export/contracts/iwindowlayoutcontract.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#define ADD_FILA  1601
+#define ADD_COL	1602
+#define DEL_FILA  1603
+#define DEL_COL	1604
+
+#define LAY_1_1	1605
+#define LAY_1_2	1606
+#define LAY_2_1	1607
+#define LAY_2_2	1608
+#define LAY_3_3	1609
+#define LAY_4_4	1610
+
+#define SPLIT_H	1611
+#define SPLIT_V	1612
+
+//layouts por defecto...
+namespace GNC
+{
+namespace GUI
+{
+class wxEventHandlerWindowLayout: public wxEvtHandler
+{
+public:
+        wxEventHandlerWindowLayout(wxEvtHandler* pParent, GNC::WindowLayoutTool* pHerramienta): wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pHerramienta=pHerramienta;
+
+                m_pParent->Connect(ADD_COL,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnAddColumn),NULL,this);
+                m_pParent->Connect(ADD_FILA,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnAddRow),NULL,this);
+                m_pParent->Connect(DEL_COL,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnDelColumn),NULL,this);
+                m_pParent->Connect(DEL_FILA,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnDelRow),NULL,this);
+
+                m_pParent->Connect(LAY_1_1,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay1x1),NULL,this);
+                m_pParent->Connect(LAY_1_2,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay1x2),NULL,this);
+                m_pParent->Connect(LAY_2_1,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay2x1),NULL,this);
+                m_pParent->Connect(LAY_2_2,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay2x2),NULL,this);
+                m_pParent->Connect(LAY_3_3,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay3x3),NULL,this);
+                m_pParent->Connect(LAY_4_4,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay4x4),NULL,this);
+
+                m_pParent->Connect(SPLIT_V,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnSplitV),NULL,this);
+                m_pParent->Connect(SPLIT_H,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnSplitH),NULL,this);
+
+                m_pParent->Connect(ADD_COL, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnAddColumnUpdate),NULL,this);
+                m_pParent->Connect(ADD_FILA, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnAddRowUpdate),NULL,this);
+                m_pParent->Connect(DEL_COL, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnDelColumnUpdate),NULL,this);
+                m_pParent->Connect(DEL_FILA, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnDelRowUpdate),NULL,this);
+
+                m_pParent->Connect(LAY_1_1, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay1x1Update),NULL,this);
+                m_pParent->Connect(LAY_1_2, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay1x2Update),NULL,this);
+                m_pParent->Connect(LAY_2_1, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay2x1Update),NULL,this);
+                m_pParent->Connect(LAY_2_2, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay2x2Update),NULL,this);
+                m_pParent->Connect(LAY_3_3, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay3x3Update),NULL,this);
+                m_pParent->Connect(LAY_4_4, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay4x4Update),NULL,this);
+
+                m_pParent->Connect(SPLIT_V, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnSplitUpdate),NULL,this);
+                m_pParent->Connect(SPLIT_H, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnSplitUpdate),NULL,this);
+
+                m_pParent->Connect(m_pHerramienta->ID, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnUpdateMenuLayout),NULL,this);
+        }
+
+        ~wxEventHandlerWindowLayout()
+        {
+                m_pParent->Disconnect(ADD_COL,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnAddColumn),NULL,this);
+                m_pParent->Disconnect(ADD_FILA,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnAddRow),NULL,this);
+                m_pParent->Disconnect(DEL_COL,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnDelColumn),NULL,this);
+                m_pParent->Disconnect(DEL_FILA,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnDelRow),NULL,this);
+
+                m_pParent->Disconnect(LAY_1_1,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay1x1),NULL,this);
+                m_pParent->Disconnect(LAY_1_2,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay1x2),NULL,this);
+                m_pParent->Disconnect(LAY_2_1,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay2x1),NULL,this);
+                m_pParent->Disconnect(LAY_2_2,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay2x2),NULL,this);
+                m_pParent->Disconnect(LAY_3_3,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay3x3),NULL,this);
+                m_pParent->Disconnect(LAY_4_4,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnLay4x4),NULL,this);
+
+                m_pParent->Disconnect(SPLIT_V,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnSplitV),NULL,this);
+                m_pParent->Disconnect(SPLIT_H,wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerWindowLayout::OnSplitH),NULL,this);
+
+                m_pParent->Disconnect(ADD_COL, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnAddColumnUpdate),NULL,this);
+                m_pParent->Disconnect(ADD_FILA, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnAddRowUpdate),NULL,this);
+                m_pParent->Disconnect(DEL_COL, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnDelColumnUpdate),NULL,this);
+                m_pParent->Disconnect(DEL_FILA, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnDelRowUpdate),NULL,this);
+
+                m_pParent->Disconnect(LAY_1_1, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay1x1Update),NULL,this);
+                m_pParent->Disconnect(LAY_1_2, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay1x2Update),NULL,this);
+                m_pParent->Disconnect(LAY_2_1, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay2x1Update),NULL,this);
+                m_pParent->Disconnect(LAY_2_2, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay2x2Update),NULL,this);
+                m_pParent->Disconnect(LAY_3_3, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay3x3Update),NULL,this);
+                m_pParent->Disconnect(LAY_4_4, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnLay4x4Update),NULL,this);
+
+                m_pParent->Disconnect(SPLIT_V, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnSplitUpdate),NULL,this);
+                m_pParent->Disconnect(SPLIT_H, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnSplitUpdate),NULL,this);
+
+                m_pParent->Disconnect(m_pHerramienta->ID, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerWindowLayout::OnUpdateMenuLayout),NULL,this);
+        }
+
+        void OnAddRow(wxCommandEvent& )
+        {
+                m_pHerramienta->AddRow();
+        }
+
+        void OnAddColumn(wxCommandEvent& )
+        {
+                m_pHerramienta->AddColumn();
+        }
+
+        void OnDelRow(wxCommandEvent& )
+        {
+                m_pHerramienta->DelRow();
+        }
+
+        void OnDelColumn(wxCommandEvent& )
+        {
+                m_pHerramienta->DelColumn();
+        }
+
+        void OnLay1x1(wxCommandEvent& )
+        {
+                m_pHerramienta->SetWindowLayout(1,1);
+        }
+
+        void OnLay1x2(wxCommandEvent& )
+        {
+                m_pHerramienta->SetWindowLayout(1,2);
+        }
+
+        void OnLay2x1(wxCommandEvent& )
+        {
+                m_pHerramienta->SetWindowLayout(2,1);
+        }
+
+        void OnLay2x2(wxCommandEvent& )
+        {
+                m_pHerramienta->SetWindowLayout(2,2);
+        }
+
+        void OnLay3x3(wxCommandEvent& )
+        {
+                m_pHerramienta->SetWindowLayout(3,3);
+        }
+
+        void OnLay4x4(wxCommandEvent& )
+        {
+                m_pHerramienta->SetWindowLayout(4,4);
+        }
+
+        void OnSplitV(wxCommandEvent &)
+        {
+                m_pHerramienta->SplitActive(true);
+        }
+
+        void OnSplitH(wxCommandEvent &)
+        {
+                m_pHerramienta->SplitActive(false);
+        }
+
+        void OnAddColumnUpdate(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->AddAllowed());
+        }
+
+        void OnAddRowUpdate(wxUpdateUIEvent& event)
+        {
+
+                event.Enable(m_pHerramienta->AddAllowed());
+        }
+
+        void OnDelColumnUpdate(wxUpdateUIEvent& event)
+        {
+
+                event.Enable(m_pHerramienta->DeleteColumnAllowed());
+        }
+
+        void OnDelRowUpdate(wxUpdateUIEvent& event)
+        {
+
+                event.Enable(m_pHerramienta->DeleteRowAllowed());
+        }
+
+        void OnLay1x1Update(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->Supports(1,1));
+        }
+
+        void OnLay1x2Update(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->Supports(1,2));
+        }
+
+        void OnLay2x1Update(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->Supports(2,1));
+        }
+
+        void OnLay2x2Update(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->Supports(2,2));
+        }
+
+        void OnLay3x3Update(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->Supports(3,3));
+        }
+
+        void OnLay4x4Update(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->Supports(4,4));
+        }
+
+        void OnUpdateMenuLayout(wxUpdateUIEvent& /*event*/)
+        {
+        }
+
+        void OnSplitUpdate(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pHerramienta->SupportsSplit());
+        }
+
+        GNC::WindowLayoutTool* m_pHerramienta;
+        wxEvtHandler* m_pParent;
+};
+}
+}
+
+
+GNC::GCS::ITool* GNC::WindowLayoutTool::NewTool()
+{
+        return new GNC::WindowLayoutTool();
+}
+
+GNC::WindowLayoutTool::WindowLayoutTool()
+{
+}
+GNC::WindowLayoutTool::~WindowLayoutTool()
+{
+}
+
+bool GNC::WindowLayoutTool::HasDropDownMenu()
+{
+        return true;
+}
+
+void GNC::WindowLayoutTool::AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ADD_COL,_("Add column"), GinkgoResourcesManager::LayoutBar::GetIcoAddColumn(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, ADD_FILA,_("Add row"), GinkgoResourcesManager::LayoutBar::GetIcoAddRow(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+        pMenu->AppendSeparator();
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, DEL_COL,_("Remove column"), GinkgoResourcesManager::LayoutBar::GetIcoDelColumn(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, DEL_FILA,_("Remove row"), GinkgoResourcesManager::LayoutBar::GetIcoDelRow(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+        pMenu->AppendSeparator();
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, SPLIT_H,_("Split active horizontally"), GinkgoResourcesManager::LayoutBar::GetIcoLayout2x1(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, SPLIT_V,_("Split active vertically"), GinkgoResourcesManager::LayoutBar::GetIcoLayout1x2(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+        pMenu->AppendSeparator();
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, LAY_1_1,_("1x1 Layout"), GinkgoResourcesManager::LayoutBar::GetIcoLayout1x1(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, LAY_1_2,_("1x2 Layout"), GinkgoResourcesManager::LayoutBar::GetIcoLayout1x2(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, LAY_2_1,_("2x1 Layout"), GinkgoResourcesManager::LayoutBar::GetIcoLayout2x1(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, LAY_2_2,_("2x2 Layout"), GinkgoResourcesManager::LayoutBar::GetIcoLayout2x2(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, LAY_3_3,_("3x3 Layout"), GinkgoResourcesManager::LayoutBar::GetIcoLayout3x3(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+        pMenu->Append(new GNC::GUI::wxMenuItemTool(pMenu, LAY_4_4,_("4x4 Layout"), GinkgoResourcesManager::LayoutBar::GetIcoLayout4x4(), new GNC::GUI::wxEventHandlerWindowLayout(pParent, this)));
+}
+
+bool GNC::WindowLayoutTool::ExecuteAction()
+{
+        return false;
+}
+
+void GNC::WindowLayoutTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                wxMenu* pLayoutMenu = new wxMenu();
+                AppendDropDownMenu(pParent, pLayoutMenu);
+                pMenu->Append(ID,wxString::FromUTF8(Name.c_str()),pLayoutMenu);
+        }
+}
+
+void GNC::WindowLayoutTool::SetWindowLayout(int filas, int columnas)
+{
+        WindowLayoutContract->SetWindowLayout(filas,columnas);
+}
+
+void GNC::WindowLayoutTool::AddRow()
+{
+        WindowLayoutContract->AddRow();
+}
+
+void GNC::WindowLayoutTool::AddColumn()
+{
+        WindowLayoutContract->AddColumn();
+}
+
+void GNC::WindowLayoutTool::DelRow()
+{
+        WindowLayoutContract->DelRow();
+}
+
+void GNC::WindowLayoutTool::DelColumn()
+{
+        WindowLayoutContract->DelColumn();
+}
+
+bool GNC::WindowLayoutTool::AddAllowed()
+{
+        if( WindowLayoutContract->GetRows() * WindowLayoutContract->GetColumns() >= (WindowLayoutContract->m_MaxSlice-WindowLayoutContract->m_MinSlice +1)) {
+                return false;
+        }
+        return true;
+}
+
+bool GNC::WindowLayoutTool::Supports(int filas, int columnas)
+{
+        int zocalos = filas * columnas;
+        int slices = WindowLayoutContract->m_MaxSlice - WindowLayoutContract->m_MinSlice +1;
+
+        if(zocalos-slices  >= std::min(filas,columnas)) {
+                return false;
+        }
+        return true;
+}
+
+bool GNC::WindowLayoutTool::DeleteRowAllowed()
+{
+        if( WindowLayoutContract->GetRows() <=1) {
+                return false;
+        }
+        return true;
+}
+bool GNC::WindowLayoutTool::DeleteColumnAllowed()
+{
+        if( WindowLayoutContract->GetColumns() <=1) {
+                return false;
+        }
+        return true;
+}
+
+bool GNC::WindowLayoutTool::SupportsSplit()
+{
+        return WindowLayoutContract->SupportsSplit();
+}
+
+void GNC::WindowLayoutTool::SplitActive(bool vertically)
+{
+        return WindowLayoutContract->SplitActive(vertically);
+}
+
+
+#endif
diff --git a/cadxcore/main/tools/windowlayouttool.h b/cadxcore/main/tools/windowlayouttool.h
new file mode 100644
index 0000000..e686780
--- /dev/null
+++ b/cadxcore/main/tools/windowlayouttool.h
@@ -0,0 +1,65 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "enabled_tools.h"
+#if defined(ENABLE_WINDOWLAYOUTTOOL)
+#ifndef WINDOWLAYOUTTOOL_H
+#define WINDOWLAYOUTTOOL_H
+
+#include <export/tools/iwindowlayouttool.h>
+#include <api/api.h>
+
+namespace GNC
+{
+
+class EXTAPI WindowLayoutTool : public GNC::GCS::IWindowLayoutTool
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        WindowLayoutTool();
+        ~WindowLayoutTool();
+
+        virtual bool HasDropDownMenu();
+        void AppendDropDownMenu(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        virtual void SetWindowLayout(int filas, int columnas);
+        virtual void AddRow();
+        virtual void AddColumn();
+        virtual void DelRow();
+        virtual void DelColumn();
+
+        virtual bool AddAllowed();
+        virtual bool Supports(int filas, int columnas);
+        virtual bool DeleteRowAllowed();
+        virtual bool DeleteColumnAllowed();
+
+        virtual bool SupportsSplit();
+        virtual void SplitActive(bool vertically);
+
+protected:
+
+};
+}
+#endif
+#endif
diff --git a/cadxcore/main/toolsystem/toolcontroller.cpp b/cadxcore/main/toolsystem/toolcontroller.cpp
new file mode 100644
index 0000000..1ae56be
--- /dev/null
+++ b/cadxcore/main/toolsystem/toolcontroller.cpp
@@ -0,0 +1,587 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <map>
+#include <set>
+
+#include "toolcontroller.h"
+
+#include <main/gui/toolsystem/ginkgotoolsystembar.h>
+#include <api/toolsystem/iwidgettool.h>
+#include <api/toolsystem/itoolsregistry.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/iconfigurationcontroller.h>
+#include <api/controllers/ieventscontroller.h>
+#include <eventos/toolevents.h>
+#include <api/icontract.h>
+#include <api/ientorno.h>
+
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/menu.h>
+#include <wx/wxginkgotoolbar.h>
+
+#define LEFT_BUTTON_CONF_KEY   "lbt"
+#define MIDDLE_BUTTON_CONF_KEY "mbt"
+#define RIGHT_BUTTON_CONF_KEY  "rbt"
+
+namespace GNC
+{
+namespace GUI
+{
+const wxEventType wxEVT_ACTIVATE_TOOL_ASYNC = wxNewEventType();
+class wxActivateToolAsync : public wxEvent
+{
+
+public:
+        wxActivateToolAsync(GNC::ToolController* pToolController = NULL, long idTool = -1, const GNC::GCS::TriggerButton& buttonMask = GNC::GCS::TriggerButton(), wxWindow* pWindow = NULL): ToolController(pToolController),
+                IdTool(idTool),
+                ButtonMask(buttonMask),
+                Window(pWindow)
+        {
+                SetEventType(wxEVT_ACTIVATE_TOOL_ASYNC);
+        }
+
+        wxActivateToolAsync(const wxActivateToolAsync& event):wxEvent(event),ToolController(event.ToolController),
+                IdTool(event.IdTool),
+                ButtonMask(event.ButtonMask),
+                Window(event.Window)
+        {
+        }
+
+        GNC::ToolController* GetToolController()
+        {
+                return ToolController;
+        }
+
+        long GetIdTool()
+        {
+                return IdTool;
+        }
+
+        wxWindow* GetWindow()
+        {
+                return Window;
+        }
+
+        GNC::GCS::TriggerButton GetButtonMask()
+        {
+                return ButtonMask;
+        }
+
+        virtual wxEvent *Clone() const
+        {
+                return new wxActivateToolAsync(*this);
+        }
+
+protected:
+        GNC::ToolController* ToolController;
+        long IdTool;
+        GNC::GCS::TriggerButton ButtonMask;
+        wxWindow* Window;
+
+private:
+        DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxActivateToolAsync)
+};
+
+typedef void (wxEvtHandler::*wxActivateToolAsyncFunction)(wxActivateToolAsync&);
+
+#define wxActivateToolAsyncHandler(func) \
+			 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxActivateToolAsyncFunction, &func)
+
+#define EVT_MENSAJES_USUARIO(func) \
+			 wx__DECLARE_EVT0(wxEVT_CLOSE_SERIESVIEWER_ASYNC, wxActivateToolAsyncHandler(func))
+
+IMPLEMENT_DYNAMIC_CLASS(GNC::GUI::wxActivateToolAsync, wxEvent)
+
+class wxEventHandlerToolController: public wxEvtHandler
+{
+public:
+        wxEventHandlerToolController(GNC::ToolController* pToolController): ToolController(pToolController),
+                IdEventHandler(wxNewId())
+        {
+                GNC::GCS::IEntorno::Instance()->GetVentanaRaiz()->Connect(IdEventHandler, wxEVT_ACTIVATE_TOOL_ASYNC, wxActivateToolAsyncHandler(wxEventHandlerToolController::OnActivateTool), NULL, this);
+        }
+        ~wxEventHandlerToolController()
+        {
+                if (GNC::GCS::IEntorno::Instance()->GetVentanaRaiz() != NULL) {
+                        GNC::GCS::IEntorno::Instance()->GetVentanaRaiz()->Disconnect(IdEventHandler, wxEVT_ACTIVATE_TOOL_ASYNC, wxActivateToolAsyncHandler(wxEventHandlerToolController::OnActivateTool), NULL, this);
+                }
+        }
+        void OnActivateTool(wxActivateToolAsync& event )
+        {
+                if (ToolController == event.GetToolController()) {
+                        ToolController->DoActivateTool(event.GetIdTool(), event.GetButtonMask(), event.GetWindow());
+                }
+        }
+
+        long GetId()
+        {
+                return IdEventHandler;
+        }
+
+protected:
+        GNC::ToolController* ToolController;
+        long IdEventHandler;
+};
+}
+}
+
+GNC::ToolController::ToolController(): EventHandler(new GNC::GUI::wxEventHandlerToolController(this)),
+        m_leftTool(NULL),
+        m_rightTool(NULL),
+        m_middleTool(NULL)
+{
+}
+
+GNC::ToolController::~ToolController()
+{
+        for (TToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                GNC::GCS::ITool*& pTool = (*it).second;
+                delete pTool;
+        }
+        m_tools.clear();
+}
+
+void GNC::ToolController::InitializeToolController()
+{
+
+        // By default, try to select:
+        // * The first visualization tool available => to left button,
+        // * The next visualiation tool available after left button assignation => to right button
+        // * The next visualiation tool available after rifht button assignation => to middle button
+        for (TToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                GNC::GCS::ITool* pWidgetTool = dynamic_cast<GNC::GCS::ITool*> ((*it).second);
+                if (pWidgetTool != NULL && pWidgetTool->FamilyId == GNC::GCS::ITool::TFamiliaVisualizacion && pWidgetTool->IsReady()) {
+                        if (m_leftTool == NULL) {
+                                GNC::GCS::TriggerButton buttonMask;
+                                buttonMask.EnableLeft();
+                                DoActivateTool(pWidgetTool->ID, buttonMask, NULL);
+                        } else if (m_rightTool == NULL) {
+                                GNC::GCS::TriggerButton buttonMask;
+                                buttonMask.EnableRight();
+                                DoActivateTool(pWidgetTool->ID, buttonMask, NULL);
+                        } else if (m_middleTool == NULL) {
+                                GNC::GCS::TriggerButton buttonMask;
+                                buttonMask.EnableMiddle();
+                                DoActivateTool(pWidgetTool->ID, buttonMask, NULL);
+                        } else {
+                                break;
+                        }
+                }
+        }
+}
+
+void GNC::ToolController::FinalizeToolController()
+{
+        if (m_leftTool != NULL) {
+                m_leftTool->GetTriggerButton().DisableLeft();
+                m_leftTool->Disconnect();
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ToolConnectedEvent(false, m_leftTool, this));
+        }
+
+        if (m_rightTool != NULL) {
+                m_rightTool->GetTriggerButton().DisableRight();
+                m_rightTool->Disconnect();
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ToolConnectedEvent(false, m_rightTool, this));
+        }
+
+        if (m_middleTool != NULL) {
+                m_middleTool->GetTriggerButton().DisableMiddle();
+                m_middleTool->Disconnect();
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ToolConnectedEvent(false, m_middleTool, this));
+        }
+}
+
+void GNC::ToolController::ReconnectToolController()
+{
+        if (m_leftTool != NULL) {
+                m_leftTool->Disconnect();
+        }
+        if (m_rightTool != NULL) {
+                m_rightTool->Disconnect();
+        }
+        if (m_middleTool != NULL) {
+                m_middleTool->Disconnect();
+        }
+
+        if(m_leftTool != NULL && m_leftTool->IsEnabled()) {
+                m_leftTool->Connect();
+        }
+        if (m_rightTool != NULL && m_rightTool->IsEnabled() && m_rightTool != m_leftTool) {
+                m_rightTool->Connect();
+        }
+        if (m_middleTool != NULL && m_middleTool->IsEnabled() && m_middleTool != m_leftTool && m_middleTool != m_rightTool) {
+                m_middleTool->Connect();
+        }
+}
+
+void GNC::ToolController::LoadStatus(const std::string& view, const std::string& modality)
+{
+
+        if ( view.empty() || modality.empty() ) {
+                return;
+        }
+
+        int selectedLeftToolId = -1;
+        int selectedMiddleToolId = -1;
+        int selectedRightToolId = -1;
+
+        std::string scope(GetToolStatusScope(view, modality));
+
+        GNC::GCS::IConfigurationController::Instance()->readIntUser(scope, LEFT_BUTTON_CONF_KEY, selectedLeftToolId, -1);
+        GNC::GCS::IConfigurationController::Instance()->readIntUser(scope, MIDDLE_BUTTON_CONF_KEY, selectedMiddleToolId, -1);
+        GNC::GCS::IConfigurationController::Instance()->readIntUser(scope, RIGHT_BUTTON_CONF_KEY, selectedRightToolId, -1);
+
+        if (selectedLeftToolId != -1) {
+                GNC::GCS::TriggerButton buttonMask;
+                buttonMask.EnableLeft();
+                DoActivateTool(selectedLeftToolId, buttonMask, NULL);
+        }
+        if (selectedMiddleToolId != -1) {
+                GNC::GCS::TriggerButton buttonMask;
+                buttonMask.EnableMiddle();
+                DoActivateTool(selectedMiddleToolId, buttonMask, NULL);
+        }
+        if (selectedRightToolId != -1) {
+                GNC::GCS::TriggerButton buttonMask;
+                buttonMask.EnableRight();
+                DoActivateTool(selectedRightToolId, buttonMask, NULL);
+        }
+}
+
+void GNC::ToolController::SaveStatus(const std::string& view, const std::string& modality)
+{
+
+        if ( view.empty() || modality.empty() ) {
+                return;
+        }
+
+        std::string scope(GetToolStatusScope(view, modality));
+
+        if (m_leftTool != NULL) {
+                GNC::GCS::IConfigurationController::Instance()->writeIntUser(scope, LEFT_BUTTON_CONF_KEY, m_leftTool->ID);
+        }
+        if (m_middleTool != NULL) {
+                GNC::GCS::IConfigurationController::Instance()->writeIntUser(scope, MIDDLE_BUTTON_CONF_KEY, m_middleTool->ID);
+        }
+        if (m_rightTool != NULL) {
+                GNC::GCS::IConfigurationController::Instance()->writeIntUser(scope, RIGHT_BUTTON_CONF_KEY, m_rightTool->ID);
+        }
+}
+
+void GNC::ToolController::AddTool(long idTool, GNC::GCS::IContract* pContract)
+{
+        GNC::GCS::ITool* pTool = GNC::GCS::IToolsRegistry::Instance()->NewTool(idTool);
+        if (pTool != NULL && pTool->IsReady()) {
+                GNC::GCS::IContractable* pContractableTool = dynamic_cast<GNC::GCS::IContractable*>(pTool);
+                if (pContractableTool) {
+                        if (pContractableTool->IsValidContract(pContract)) {
+                                pContractableTool->Register(pContract);
+                        } else {
+                                LOG_WARN("ToolControler", "The tool \"" << pTool->Name.c_str() << "\" is not compatible with the specified contract");
+                                return;
+                        }
+                }
+                pTool->SetToolBar(this);
+                m_tools[idTool] = pTool;
+        } else if (pTool != NULL) {
+                delete pTool;
+        }
+}
+
+void GNC::ToolController::RemoveTool(long /*idTool*/)
+{
+
+}
+
+GNC::GCS::ITool* GNC::ToolController::GetTool(long idTool)
+{
+        GNC::GCS::ITool* pTool = NULL;
+        if (m_tools.find(idTool) != m_tools.end()) {
+                pTool = m_tools[idTool];
+        }
+        return pTool;
+}
+
+void GNC::ToolController::Enable(long idTool, bool enabled)
+{
+        GNC::GCS::ITool* pTool = GetTool(idTool);
+        if (pTool != NULL && pTool->IsEnabled() != enabled) {
+                pTool->Enable(enabled);
+                ReconnectToolController();
+                GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ToolEnabledEvent(enabled, pTool, this));
+        }
+}
+
+wxWindow* GNC::ToolController::CreateNewToolBar(wxWindow* pParent, GNC::GCS::ITool::TToolFamily family, bool alignLeft)
+{
+        GNC::GUI::GinkgoToolSystemBar* pToolController = new GNC::GUI::GinkgoToolSystemBar(pParent, this, family);
+        if (!alignLeft) {
+                pToolController->AddStretchSpacer(1);
+        }
+        AppendsToolsInToolBar(pToolController, family);
+        pToolController->Realize();
+        return pToolController;
+}
+
+wxWindow* GNC::ToolController::CreateNewToolBar(wxWindow* pParent, const GNC::GCS::IToolController::TIdList& toolsToInclude, bool alignLeft)
+{
+        GNC::GUI::GinkgoToolSystemBar* pToolController = new GNC::GUI::GinkgoToolSystemBar(pParent, this, GNC::GCS::ITool::TFamiliaGlobal);
+        if (!alignLeft) {
+                pToolController->AddStretchSpacer(1);
+        }
+        AppendsToolsInToolBar(pToolController, toolsToInclude);
+        pToolController->Realize();
+        return pToolController;
+}
+
+wxWindow* GNC::ToolController::CreateNewToolBar(wxWindow* pParent, bool alignLeft)
+{
+        wxPanel* toolBarPanel = new wxPanel(pParent);
+        wxBoxSizer* mainSizer = new wxBoxSizer(wxHORIZONTAL);
+
+        typedef std::map<GNC::GCS::ITool::TToolFamily, GNC::GUI::GinkgoToolSystemBar*> TFamiliesMap;
+        TFamiliesMap mapOfFamilies;
+
+        for (TToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                GNC::GCS::ITool*& pTool = (*it).second;
+                if (mapOfFamilies.find(pTool->GetFamily()) == mapOfFamilies.end() && pTool->IsReady()) {
+                        mapOfFamilies[pTool->GetFamily()] = new GNC::GUI::GinkgoToolSystemBar(toolBarPanel, this, pTool->GetFamily());
+                        if (!alignLeft) {
+                                mapOfFamilies[pTool->GetFamily()]->AddStretchSpacer(1);
+                        }
+                }
+                pTool->AppendToolIn(mapOfFamilies[pTool->GetFamily()]);
+        }
+        for (TFamiliesMap::iterator it = mapOfFamilies.begin(); it != mapOfFamilies.end(); ++it) {
+                if ((*it).second->GetToolCount() == 0) {
+                        delete (*it).second;
+                } else {
+                        (*it).second->Realize();
+                        mainSizer->Add((*it).second,0, wxEXPAND, 0);
+                }
+        }
+        toolBarPanel->SetSizer(mainSizer);
+        toolBarPanel->Layout();
+        return toolBarPanel;
+}
+
+void GNC::ToolController::AppendsToolInMenu(wxEvtHandler* pParent, wxMenu* pMenu, GNC::GCS::ITool::TToolFamily family)
+{
+        std::map<int , std::list<GNC::GCS::ITool*> > mapSubFamilies;
+        for (TToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                GNC::GCS::ITool*& pTool = (*it).second;
+                if (pTool->GetFamily() == family && pTool->IsReady()) {
+                        if (mapSubFamilies.find(pTool->GetSubFamily()) == mapSubFamilies.end()) {
+                                mapSubFamilies[pTool->GetSubFamily()] = std::list<GNC::GCS::ITool*>();
+                        }
+                        mapSubFamilies[pTool->GetSubFamily()].push_back(pTool);
+                }
+        }
+        for (std::map<int , std::list<GNC::GCS::ITool*> >::iterator itSubFamilies = mapSubFamilies.begin(); itSubFamilies != mapSubFamilies.end(); ++itSubFamilies) {
+                if (!pMenu->GetMenuItems().empty() && !pMenu->GetMenuItems().back()->IsSeparator()) {
+                        pMenu->AppendSeparator();
+                }
+                for (std::list<GNC::GCS::ITool*>::iterator itTools = (*itSubFamilies).second.begin(); itTools != (*itSubFamilies).second.end(); ++itTools) {
+                        GNC::GCS::ITool*& pTool = (*itTools);
+                        pTool->AppendToolIn(pParent, pMenu);
+                }
+                if (!pMenu->GetMenuItems().empty() && pMenu->GetMenuItems().back()->IsSeparator()) {
+                        pMenu->Delete(pMenu->GetMenuItems().back()->GetId());
+                }
+        }
+        if (!pMenu->GetMenuItems().empty() && pMenu->GetMenuItems().back()->IsSeparator()) {
+                pMenu->Delete(pMenu->GetMenuItems().back()->GetId());
+        }
+}
+
+void GNC::ToolController::AppendsToolsInToolBar(wxGinkgoToolBar* pToolBar, GNC::GCS::ITool::TToolFamily family)
+{
+        for (TToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                GNC::GCS::ITool*& pTool = (*it).second;
+                if (pTool->GetFamily() == family && pTool->IsReady()) {
+                        pTool->AppendToolIn(pToolBar);
+                }
+        }
+}
+
+void GNC::ToolController::AppendsToolsInToolBar(wxGinkgoToolBar* pToolBar, const GNC::GCS::IToolController::TIdList& toolsToInclude)
+{
+        std::set<long> setOfIds;
+        setOfIds.insert(toolsToInclude.begin(), toolsToInclude.end());
+
+        for (TToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                GNC::GCS::ITool*& pTool = (*it).second;
+                if (pTool != NULL && setOfIds.find(pTool->ID) != setOfIds.end() && pTool->IsReady()) {
+                        pTool->AppendToolIn(pToolBar);
+                }
+        }
+}
+
+void GNC::ToolController::OnKeyAccelerator(GNC::GCS::Events::EventoTeclado& evento, wxWindow* pWindow)
+{
+        if (evento.ControlDown() || evento.GetKeyCode() == WXK_ESCAPE) {
+                for (TToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                        GNC::GCS::ITool*& pTool = (*it).second;
+                        if (pTool->IsEnabled() && pTool->GetKeyCode() == evento.GetKeyCode()) {
+                                GNC::GCS::TriggerButton buttonMask;
+                                if (evento.ShiftDown() && evento.AltDown() ) {
+                                        buttonMask.EnableMiddle();
+                                }
+                                if (evento.ShiftDown()) {
+                                        buttonMask.EnableRight();
+                                } else {
+                                        buttonMask.EnableLeft();
+                                }
+                                ActivateTool(pTool->ID, buttonMask, pWindow);
+                                evento.Skip(false);
+                                return;
+                        }
+                }
+        }
+        evento.Skip(true);
+}
+
+void GNC::ToolController::ActivateTool(long idTool, const GNC::GCS::TriggerButton& buttonMask, wxWindow* pWindow)
+{
+        if (!wxIsMainThread()) {
+                //activation will be processed in next iteration of loop event to avoid that component that request activation has been removed in action execution
+                GNC::GUI::wxActivateToolAsync evt(this, idTool, buttonMask, pWindow);
+                evt.SetId(EventHandler->GetId());
+                GNC::GCS::IEntorno::Instance()->GetVentanaRaiz()->GetEventHandler()->AddPendingEvent(evt);
+        } else {
+                DoActivateTool(idTool, buttonMask, pWindow);
+        }
+}
+
+void GNC::ToolController::DoActivateTool(long idTool, const GNC::GCS::TriggerButton& buttonMask, wxWindow* pWindow)
+{
+        if (m_tools.find(idTool) == m_tools.end()) {
+                return;
+        }
+        GNC::GCS::ITool* pTool = m_tools[idTool];
+        if (!pTool->IsEnabled()) {
+                return;
+        }
+
+        GNC::GCS::IWidgetTool* pWidgetTool = dynamic_cast<GNC::GCS::IWidgetTool*> (pTool);
+        if (pWidgetTool == NULL) {
+                //regular tools...
+                if (!pTool->ExecuteAction()) {
+                        if (pTool->HasDropDownMenu() && pWindow != NULL) {
+                                wxMenu DropDownMenu;
+                                pTool->AppendDropDownMenu(&DropDownMenu, &DropDownMenu);
+                                pWindow->PopupMenu(&DropDownMenu);
+                        }
+                }
+        } else {
+                if (m_leftTool != NULL) {
+                        m_leftTool->GetTriggerButton().DisableLeft();
+                        m_leftTool->Disconnect();
+                        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ToolConnectedEvent(false, m_leftTool, this));
+                }
+                if (m_rightTool != NULL) {
+                        m_rightTool->GetTriggerButton().DisableRight();
+                        m_rightTool->Disconnect();
+                        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ToolConnectedEvent(false, m_rightTool, this));
+                }
+                if (m_middleTool != NULL) {
+                        m_middleTool->GetTriggerButton().DisableMiddle();
+                        m_middleTool->Disconnect();
+                        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ToolConnectedEvent(false, m_middleTool, this));
+                }
+
+                if ( buttonMask.IsLeftEnabled() && !pWidgetTool->GetTriggerButton().IsLeftEnabled()) {
+                        m_leftTool = pWidgetTool;
+                }
+                if ( buttonMask.IsRightEnabled() && !pWidgetTool->GetTriggerButton().IsRightEnabled()) {
+                        m_rightTool = pWidgetTool;
+                }
+                if ( buttonMask.IsMiddleEnabled() && !pWidgetTool->GetTriggerButton().IsMiddleEnabled()) {
+                        m_middleTool = pWidgetTool;
+                }
+
+                if (m_leftTool != NULL) {
+                        m_leftTool->GetTriggerButton().EnableLeft();
+                }
+                if (m_rightTool != NULL) {
+                        m_rightTool->GetTriggerButton().EnableRight();
+                }
+                if (m_middleTool != NULL) {
+                        m_middleTool->GetTriggerButton().EnableMiddle();
+                }
+
+                if (m_rightTool != NULL && m_rightTool->IsEnabled() && m_rightTool != m_leftTool) {
+                        m_rightTool->Connect();
+                        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ToolConnectedEvent(true, m_rightTool, this));
+                }
+                if (m_middleTool != NULL && m_middleTool->IsEnabled() && m_middleTool != m_leftTool && m_middleTool != m_rightTool) {
+                        m_middleTool->Connect();
+                        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ToolConnectedEvent(true, m_middleTool, this));
+                }
+                if(m_leftTool != NULL && m_leftTool->IsEnabled()) {
+                        m_leftTool->Connect();
+                        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::ToolConnectedEvent(true, m_leftTool, this));
+                }
+        }
+}
+
+void GNC::ToolController::AppendDropDownMenu(long idTool, wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (m_tools.find(idTool) == m_tools.end()) {
+                return;
+        }
+        GNC::GCS::ITool* pTool = m_tools[idTool];
+        if (pTool->IsReady()) {
+                pTool->AppendDropDownMenu(pParent,pMenu);
+        }
+}
+
+void GNC::ToolController::ConnectKeyEvents(wxWindow* pParent)
+{
+        for (TToolMap::iterator it = m_tools.begin(); it != m_tools.end(); ++it) {
+                GNC::GCS::ITool*& pTool = (*it).second;
+                pTool->ConnectKeyEvents(pParent);
+        }
+
+}
+
+GNC::GCS::IWidgetTool* GNC::ToolController::GetLeftTool()
+{
+        return m_leftTool;
+}
+
+GNC::GCS::IWidgetTool* GNC::ToolController::GetRightTool()
+{
+        return m_rightTool;
+}
+
+GNC::GCS::IWidgetTool* GNC::ToolController::GetMiddleTool()
+{
+        return m_middleTool;
+}
+
+std::string GNC::ToolController::GetToolStatusScope(const std::string& view, const std::string& modality)
+{
+        std::ostringstream os;
+        os << "/TooBarStatus/" << view << "/" << modality;
+        return os.str();
+}
diff --git a/cadxcore/main/toolsystem/toolcontroller.h b/cadxcore/main/toolsystem/toolcontroller.h
new file mode 100644
index 0000000..5308066
--- /dev/null
+++ b/cadxcore/main/toolsystem/toolcontroller.h
@@ -0,0 +1,98 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef TOOLCONTROLLER_H
+#define TOOLCONTROLLER_H
+#include <api/api.h>
+#include <api/autoptr.h>
+#include <api/toolsystem/itoolcontroller.h>
+
+// Forward declarations
+namespace GNC
+{
+namespace GCS
+{
+class IWidgetTool;
+}
+}
+
+namespace GNC
+{
+namespace GUI
+{
+class wxEventHandlerToolController;
+}
+
+class EXTAPI ToolController : public GNC::GCS::IToolController
+{
+public:
+
+        ToolController();
+
+        virtual ~ToolController();
+
+        virtual void InitializeToolController();
+        virtual void ReconnectToolController();
+        virtual void FinalizeToolController();
+
+        virtual void LoadStatus(const std::string& view, const std::string& modality = "ALL");
+        virtual void SaveStatus(const std::string& view, const std::string& modality = "ALL");
+
+        virtual void AddTool(long idTool, GNC::GCS::IContract* pContract);
+        virtual void RemoveTool(long idTool);
+
+        virtual GNC::GCS::ITool* GetTool(long idTool);
+        virtual void Enable(long idTool, bool enabled);
+
+        virtual wxWindow* CreateNewToolBar(wxWindow* pParent, bool alignLeft = true);
+        virtual wxWindow* CreateNewToolBar(wxWindow* pParent, GNC::GCS::ITool::TToolFamily family, bool alignLeft = true);
+        virtual wxWindow* CreateNewToolBar(wxWindow* pParent, const TIdList& toolsToInclude, bool alignLeft = true);
+        virtual void AppendsToolInMenu(wxEvtHandler* pParent, wxMenu* pMenu, GNC::GCS::ITool::TToolFamily family);
+        virtual void AppendsToolsInToolBar(wxGinkgoToolBar* pToolBar, GNC::GCS::ITool::TToolFamily family);
+        virtual void AppendsToolsInToolBar(wxGinkgoToolBar* pToolBar, const GNC::GCS::IToolController::TIdList& toolsToInclude);
+
+        virtual void OnKeyAccelerator(GNC::GCS::Events::EventoTeclado& evento, wxWindow* pWindow);
+
+        virtual void ActivateTool(long idTool, const GNC::GCS::TriggerButton& buttonmask, wxWindow* pParent);
+        virtual void DoActivateTool(long idTool, const GNC::GCS::TriggerButton& buttonmask, wxWindow* pParent);
+        virtual void AppendDropDownMenu(long idTool, wxEvtHandler* pParent, wxMenu* pMenu);
+
+        //connect key events to child tools
+        virtual void ConnectKeyEvents(wxWindow* pParent);
+
+        virtual GNC::GCS::IWidgetTool* GetLeftTool();
+        virtual GNC::GCS::IWidgetTool* GetRightTool();
+        virtual GNC::GCS::IWidgetTool* GetMiddleTool();
+
+        typedef std::map<long, GNC::GCS::ITool*> TToolMap;
+        TToolMap m_tools;
+        GNC::GCS::Ptr<GNC::GUI::wxEventHandlerToolController> EventHandler;
+        GNC::GCS::IWidgetTool* m_leftTool;
+        GNC::GCS::IWidgetTool* m_rightTool;
+        GNC::GCS::IWidgetTool* m_middleTool;
+
+
+
+private:
+        std::string GetToolStatusScope(const std::string& view, const std::string& modality);
+};
+}
+#endif
diff --git a/cadxcore/main/toolsystem/toolsregistry.cpp b/cadxcore/main/toolsystem/toolsregistry.cpp
new file mode 100644
index 0000000..0ffdd95
--- /dev/null
+++ b/cadxcore/main/toolsystem/toolsregistry.cpp
@@ -0,0 +1,192 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/ientorno.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/internationalization/internationalization.h>
+#include <api/toolsystem/itool.h>
+
+#include "toolsregistry.h"
+
+#include <wx/menu.h>
+
+//------------------------------------------------------------------------------
+//region "Singleton pattern"
+
+GNC::ToolsRegistry* GNC::ToolsRegistry::m_pInstance = 0;
+
+/** Singleton getter **/
+GNC::GCS::IToolsRegistry* GNC::ToolsRegistry::Instance()
+{
+        if (m_pInstance == NULL) {
+                m_pInstance = new GNC::ToolsRegistry();
+        }
+        return m_pInstance;
+}
+
+/** Singleton free **/
+void GNC::ToolsRegistry::FreeInstance()
+{
+        if (m_pInstance != NULL) {
+                delete m_pInstance;
+                m_pInstance = NULL;
+        }
+}
+
+GNC::ToolsRegistry::ToolsRegistry()
+{
+        GNC::GCS::IEntorno::Instance()->RegisterExtensionsObserver(this);
+}
+
+GNC::ToolsRegistry::~ToolsRegistry()
+{
+        GNC::GCS::IEntorno::Instance()->UnRegisterExtensionsObserver(this);
+
+        GNC::GCS::ILocker lock(RegistryLock);
+
+        for(ToolRegistry::iterator it = Registry.begin(); it != Registry.end(); ++it) {
+                GNC::GCS::ITool* pTool = (*it).second;
+                if (pTool->GetOwnerModule() != NULL) {
+                        LOG_WARN("Core", _Std("Module tool still registered when disposing ToolsRegistry"));
+                }
+                delete pTool;
+        }
+        Registry.clear();
+
+}
+
+//endregion
+
+//------------------------------------------------------------------------------
+//region "IToolsRegistry realization"
+
+/** Registers a tool **/
+void GNC::ToolsRegistry::RegisterTool(GNC::GCS::ITool* pTool)
+{
+        GNC::GCS::ILocker lock(RegistryLock);
+        ToolRegistry::iterator it = Registry.find(pTool->ID);
+        if (it != Registry.end()) {
+                LOG_WARN("Core", _Std("The tool is already registered"));
+                delete pTool;
+        } else {
+                Registry[pTool->ID] = pTool;
+        }
+}
+
+/** UnRegisters a tool given its uid and frees its factory instance **/
+void GNC::ToolsRegistry::UnRegisterTool(GNC::GCS::ITool::UID uid)
+{
+        GNC::GCS::ILocker lock(RegistryLock);
+
+        ToolRegistry::iterator it = Registry.find(uid);
+        if (it != Registry.end()) {
+                GNC::GCS::ITool* pTool = (*it).second;
+                delete pTool;
+                Registry.erase(it);
+        }
+}
+
+/** Constructs and returns a new abstract instance of a tool given its uid **/
+GNC::GCS::ITool* GNC::ToolsRegistry::NewTool(GNC::GCS::ITool::UID uid)
+{
+        GNC::GCS::ILocker lock(RegistryLock);
+
+        GNC::GCS::ITool* pTool = NULL;
+        ToolRegistry::iterator it = Registry.find(uid);
+        if (it != Registry.end()) {
+                GNC::GCS::ITool* pSrcTool = (*it).second;
+                pTool = pSrcTool->NewTool();
+                pTool->SetOwnerModule(pSrcTool->GetOwnerModule());
+        }
+        return pTool;
+}
+
+GNC::GCS::IToolsRegistry::TToolMap GNC::ToolsRegistry::GetToolsFromFamily(GNC::GCS::ITool::TToolFamily family)
+{
+        GNC::GCS::ILocker lock(RegistryLock);
+
+        TToolMap tools;
+        for (ToolRegistry::iterator it = Registry.begin(); it != Registry.end(); ++it) {
+                GNC::GCS::ITool* pSrcTool = (*it).second;
+                if (pSrcTool->FamilyId == family) {
+                        if (tools.find(pSrcTool->SubFamilyId) == tools.end()) {
+                                tools[pSrcTool->SubFamilyId] = TToolList();
+                        }
+                        tools[pSrcTool->SubFamilyId].push_back(pSrcTool);
+                }
+        }
+        return tools;
+}
+
+void GNC::ToolsRegistry::AppendsToolInMenu(wxEvtHandler* pParent, wxMenu* pMenu, GNC::GCS::ITool::TToolFamily family)
+{
+        std::map<int , std::list<GNC::GCS::ITool*> > mapSubFamilies;
+        for (ToolRegistry::iterator it = Registry.begin(); it != Registry.end(); ++it) {
+                GNC::GCS::ITool* pTool = (*it).second;
+                if (pTool->AppendsInGlobalMenu() && pTool->GetFamily() == family) {
+                        if (mapSubFamilies.find(pTool->GetSubFamily()) == mapSubFamilies.end()) {
+                                mapSubFamilies[pTool->GetSubFamily()] = std::list<GNC::GCS::ITool*>();
+                        }
+                        mapSubFamilies[pTool->GetSubFamily()].push_back(pTool);
+                }
+        }
+        for (std::map<int , std::list<GNC::GCS::ITool*> >::iterator itSubFamilies = mapSubFamilies.begin(); itSubFamilies != mapSubFamilies.end(); ++itSubFamilies) {
+                if (!pMenu->GetMenuItems().empty() && !pMenu->GetMenuItems().back()->IsSeparator()) {
+                        pMenu->AppendSeparator();
+                }
+                for (std::list<GNC::GCS::ITool*>::iterator itTools = (*itSubFamilies).second.begin(); itTools != (*itSubFamilies).second.end(); ++itTools) {
+                        GNC::GCS::ITool*& pTool = (*itTools);
+                        pTool->AppendToolIn(pParent, pMenu);
+                }
+                if (!pMenu->GetMenuItems().empty() && pMenu->GetMenuItems().back()->IsSeparator()) {
+                        pMenu->Delete(pMenu->GetMenuItems().back()->GetId());
+                }
+        }
+        if (!pMenu->GetMenuItems().empty() && pMenu->GetMenuItems().back()->IsSeparator()) {
+                pMenu->Delete(pMenu->GetMenuItems().back()->GetId());
+        }
+}
+
+//endregion
+
+//------------------------------------------------------------------------------
+//region "IExtensionsObserver realization"
+
+/** The module is loaded **/
+void GNC::ToolsRegistry::OnModuleLoaded(GNC::GCS::IModuleController* /*pMC*/)
+{
+}
+
+/** The module is unloaded **/
+void GNC::ToolsRegistry::OnModuleUnloaded(GNC::GCS::IModuleController* pMC)
+{
+        GNC::GCS::ILocker lock(RegistryLock);
+
+        for (ToolRegistry::iterator it = Registry.begin(); it != Registry.end(); ++it) {
+                GNC::GCS::ITool* pTool = (*it).second;
+                if (pMC == pTool->GetOwnerModule()) {
+                        LOG_WARN("Core", _Std("The module ")  << pMC->GetUID() << (" was unloaded before its tools were unregistered"));
+                }
+        }
+}
+
+//endregion
diff --git a/cadxcore/main/toolsystem/toolsregistry.h b/cadxcore/main/toolsystem/toolsregistry.h
new file mode 100644
index 0000000..181a08e
--- /dev/null
+++ b/cadxcore/main/toolsystem/toolsregistry.h
@@ -0,0 +1,108 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#ifndef TOOLSREGISTRY_H
+#define TOOLSREGISTRY_H
+#include <map>
+
+#include <api/ilock.h>
+#include <api/observers/iviewsobserver.h>
+#include <api/observers/iextensionsobserver.h>
+
+#include <api/toolsystem/itoolsregistry.h>
+
+namespace GNC
+{
+
+/** Tools Registry container internal implementation **/
+class ToolsRegistry : public GNC::GCS::IToolsRegistry, public GNC::GCS::IExtensionsObserver
+{
+
+//------------------------------------------------------------------------------
+//region "Singleton pattern"
+
+public:
+        /** Singleton getter **/
+        static GNC::GCS::IToolsRegistry* Instance();
+        /** Singleton free **/
+        static void FreeInstance();
+
+protected:
+        /** Singleton protected constructor **/
+        ToolsRegistry();
+        /** Singleton protected destructor **/
+        ~ToolsRegistry();
+
+        static GNC::ToolsRegistry* m_pInstance;
+
+//endregion
+
+//------------------------------------------------------------------------------
+//region "IToolsRegistry realization"
+
+public:
+
+        /** Registers a tool **/
+        virtual void RegisterTool(GNC::GCS::ITool* pTool);
+
+        /** UnRegisters a tool given its uid and frees its factory instance **/
+        virtual void UnRegisterTool(GNC::GCS::ITool::UID uid);
+
+        /** Constructs and returns a new abstract instance of a tool given its uid **/
+        virtual GNC::GCS::ITool* NewTool(GNC::GCS::ITool::UID uid);
+
+        void AppendsToolInMenu(wxEvtHandler* pParent, wxMenu* pMenu, GNC::GCS::ITool::TToolFamily family);
+
+        /** Returns tools of a concrete family **/
+        virtual TToolMap GetToolsFromFamily(GNC::GCS::ITool::TToolFamily family);
+
+//endregion
+
+//------------------------------------------------------------------------------
+//region "IExtensionsObserver realization"
+
+public:
+
+        /** The module is loaded **/
+        virtual void OnModuleLoaded(GNC::GCS::IModuleController* pControladorModulo);
+
+        /** The module is unloaded **/
+        virtual void OnModuleUnloaded(GNC::GCS::IModuleController* pControladorModulo);
+
+//endregion
+
+
+//------------------------------------------------------------------------------
+//region "Attributes"
+protected:
+
+        typedef std::map< GNC::GCS::ITool::UID, GNC::GCS::ITool* > ToolRegistry;
+
+        ToolRegistry Registry;
+
+        GNC::GCS::ILockable RegistryLock;
+
+//endregion
+
+};
+}
+#endif
diff --git a/cadxcore/main/utils/ginkgomatrix4x4.cpp b/cadxcore/main/utils/ginkgomatrix4x4.cpp
new file mode 100644
index 0000000..06d754c
--- /dev/null
+++ b/cadxcore/main/utils/ginkgomatrix4x4.cpp
@@ -0,0 +1,146 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef __DEPRECATED
+#define __DEPRECATED
+#endif
+#include "ginkgomatrix4x4.h"
+
+GNC::GinkgoMatrix4x4::GinkgoMatrix4x4(): rawMatrix(vtkSmartPointer<vtkMatrix4x4>::New())
+{
+        rawMatrix->Zero();
+}
+GNC::GinkgoMatrix4x4::GinkgoMatrix4x4(const vtkSmartPointer<vtkMatrix4x4>& raw): rawMatrix(raw)
+{
+}
+
+GNC::GinkgoMatrix4x4::~GinkgoMatrix4x4()
+{
+}
+
+void GNC::GinkgoMatrix4x4::Print(std::ostream& os)
+{
+        rawMatrix->Print(os);
+}
+
+void GNC::GinkgoMatrix4x4::DeepCopy(const GNC::GCS::IGinkgoMatrix4x4* other)
+{
+        const GinkgoMatrix4x4* pMatrix = dynamic_cast<const GinkgoMatrix4x4*>(other);
+        if (pMatrix != NULL) {
+                rawMatrix->DeepCopy(pMatrix->rawMatrix);
+        }
+}
+
+void GNC::GinkgoMatrix4x4::Zero()
+{
+        rawMatrix->Zero();
+}
+
+void GNC::GinkgoMatrix4x4::Identity()
+{
+        rawMatrix->Identity();
+}
+
+
+GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GNC::GinkgoMatrix4x4::Invert()
+{
+        vtkSmartPointer<vtkMatrix4x4> other = vtkSmartPointer<vtkMatrix4x4>::New();
+        vtkMatrix4x4::Invert(rawMatrix, other);
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> returnPtr((GNC::GCS::IGinkgoMatrix4x4*)new GinkgoMatrix4x4(other));
+        return returnPtr;
+}
+
+GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GNC::GinkgoMatrix4x4::Transpose()
+{
+        vtkSmartPointer<vtkMatrix4x4> other = vtkSmartPointer<vtkMatrix4x4>::New();
+        vtkMatrix4x4::Transpose(rawMatrix, other);
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> returnPtr((GNC::GCS::IGinkgoMatrix4x4*)new GinkgoMatrix4x4(other));
+        return returnPtr;
+}
+
+double* GNC::GinkgoMatrix4x4::MultiplyPoint(const double in[4], double out[4])
+{
+        rawMatrix->MultiplyPoint(in, out);
+        return out;
+}
+
+GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GNC::GinkgoMatrix4x4::Multiply4x4(const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4>& other)
+{
+        const GinkgoMatrix4x4* pMatrix = dynamic_cast<const GinkgoMatrix4x4*>(other.GetRawPointer());
+        if (pMatrix != NULL) {
+                vtkSmartPointer<vtkMatrix4x4> result = vtkSmartPointer<vtkMatrix4x4>::New();
+                vtkMatrix4x4::Multiply4x4(rawMatrix, pMatrix->rawMatrix, result);
+                GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> returnPtr((GNC::GCS::IGinkgoMatrix4x4*)new GinkgoMatrix4x4(result));
+                return returnPtr;
+        }
+        return NULL;
+}
+
+GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GNC::GinkgoMatrix4x4::Multiply4x4(const vtkMatrix4x4* other)
+{
+        vtkSmartPointer<vtkMatrix4x4> result = vtkSmartPointer<vtkMatrix4x4>::New();
+#if defined(_WINDOWS)
+        vtkMatrix4x4::Multiply4x4(rawMatrix, other, result);
+#else // Hack: VTK version of linux version requires the second parameter to be const
+        vtkSmartPointer<vtkMatrix4x4> copy = vtkSmartPointer<vtkMatrix4x4>::New();
+        for (int i = 0; i < 4; ++i) {
+                for (int j = 0; j < 4; ++j) {
+                        copy->SetElement(i,j, other->GetElement(i,j));
+                }
+        }
+
+        vtkMatrix4x4::Multiply4x4(rawMatrix, copy, result);
+#endif
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> returnPtr((GNC::GCS::IGinkgoMatrix4x4*)new GinkgoMatrix4x4(result));
+        return returnPtr;
+}
+
+GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> GNC::GinkgoMatrix4x4::Adjoint()
+{
+        vtkSmartPointer<vtkMatrix4x4> other = vtkSmartPointer<vtkMatrix4x4>::New();
+        rawMatrix->Adjoint(rawMatrix, other);
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> returnPtr((GNC::GCS::IGinkgoMatrix4x4*)new GinkgoMatrix4x4(other));
+        return returnPtr;
+}
+
+double GNC::GinkgoMatrix4x4::Determinant()
+{
+        return rawMatrix->Determinant();
+}
+
+void GNC::GinkgoMatrix4x4::SetElement(int i, int j, double value)
+{
+        rawMatrix->SetElement(i,j,value);
+}
+
+double GNC::GinkgoMatrix4x4::GetElement(int i, int j) const
+{
+        return rawMatrix->GetElement(i,j);
+}
+
+void GNC::GinkgoMatrix4x4::ToDoubleArrayByColumns(double matrix[16])
+{
+        for (int i = 0,k=0; i < 4; ++i) {
+                for (int j = 0; j<4; ++j,++k) {
+                        matrix[k] = rawMatrix->GetElement(j,i);
+                }
+        }
+}
+
diff --git a/cadxcore/main/utils/ginkgomatrix4x4.h b/cadxcore/main/utils/ginkgomatrix4x4.h
new file mode 100644
index 0000000..d185ea9
--- /dev/null
+++ b/cadxcore/main/utils/ginkgomatrix4x4.h
@@ -0,0 +1,66 @@
+#pragma once
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#ifndef GINKGOMATRIX4X4
+#define GINKGOMATRIX4X4
+#ifndef __DEPRECATED
+#define __DEPRECATED
+#endif
+#include <api/utils/iginkgomatrix4x4.h>
+#include <vtkSmartPointer.h>
+#include <vtkMatrix4x4.h>
+
+namespace GNC
+{
+class GinkgoMatrix4x4: public GNC::GCS::IGinkgoMatrix4x4
+{
+public:
+        GinkgoMatrix4x4();
+        GinkgoMatrix4x4(const vtkSmartPointer<vtkMatrix4x4>& raw);
+        virtual ~GinkgoMatrix4x4();
+        virtual void Print(std::ostream& os);
+        virtual void DeepCopy(const GNC::GCS::IGinkgoMatrix4x4* other);
+        virtual void Zero();
+        virtual void Identity();
+        virtual GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> Invert();
+        virtual GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> Transpose();
+        virtual double* MultiplyPoint(const double in[4], double out[4]);
+        // Multiplies other to the right result = this * other
+        virtual GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> Multiply4x4(const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4>& other);
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> Multiply4x4(const vtkMatrix4x4* other);
+        // Description:
+        // Compute adjoint of the matrix and put it into out.
+        virtual GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> Adjoint();
+        // Description:
+        // Compute the determinant of the matrix and return it.
+        virtual double Determinant();
+        // Description:
+        // Sets the element i,j in the matrix.
+        virtual void SetElement(int i, int j, double value);
+        // Description:
+        // Returns the element i,j from the matrix.
+        virtual double GetElement(int i, int j) const;
+        virtual void ToDoubleArrayByColumns(double matrix[16]);
+protected:
+        vtkSmartPointer<vtkMatrix4x4> rawMatrix;
+};
+}
+#endif
diff --git a/cadxcore/prvext/prvext.h b/cadxcore/prvext/prvext.h
new file mode 100644
index 0000000..44724da
--- /dev/null
+++ b/cadxcore/prvext/prvext.h
@@ -0,0 +1,165 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#ifndef PRVEXT_H
+#define PRVEXT_H
+
+#include <iostream>
+#include <string>
+#include <fstream>
+#include <sstream>
+#include <list>
+
+#include <api/api.h>
+
+#if defined(_WINDOWS)
+#define _WINSOCKAPI_    // stops windows.h including winsock.h
+#include <windows.h>
+#endif
+
+#include <main/license.h>
+
+#include <wx/bitmap.h>
+
+class wxWindow;
+
+namespace GNC
+{
+namespace GCS
+{
+class IEntorno;
+class IModuleController;
+}
+}
+class EXTAPI PrivateExtension
+{
+public:
+        typedef std::list<GNC::GCS::IModuleController*> TListControllers;
+        PrivateExtension(const std::string& sid, const std::string& provider, const std::string& description, const char* updateurl)
+        {
+                this->sid = sid;
+                this->provider = provider;
+                this->description = description;
+                this->updateurl = updateurl;
+        }
+        PrivateExtension(const std::string& sid, const std::string& provider, const std::string& description, const char* updateurl, const wxBitmap& bitmapIcon) : icon(bitmapIcon)
+        {
+                this->sid = sid;
+                this->provider = provider;
+                this->description = description;
+                this->updateurl = updateurl;
+        }
+
+        PrivateExtension(const PrivateExtension& o) = default;
+
+        virtual ~PrivateExtension()
+        {
+        }
+
+        virtual TListControllers InitializeLibrary(GNC::GCS::IEntorno* pEntorno) = 0;
+
+        virtual bool IsActive() = 0;
+
+
+        const std::string& GetSID() const
+        {
+                return this->sid;
+        }
+
+        const std::string& GetProvider() const
+        {
+                return this->provider;
+        }
+
+        const std::string& GetDescription() const
+        {
+                return this->description;
+        }
+
+        void AsignPath(const std::string& path)
+        {
+                this->path = path;
+        }
+
+        const std::string& GetPath() const
+        {
+                return this->path;
+        }
+
+        const std::string& GetUpdateURL() const
+        {
+                return updateurl;
+        }
+
+        wxBitmap& GetIcon()
+        {
+                return icon;
+        }
+
+        PrivateExtension& operator=(const PrivateExtension& o) = default;
+
+        friend std::ostream& operator<<(std::ostream &os, const PrivateExtension& ext)
+        {
+                os << "SID=" << ext.sid.c_str() << std::endl;
+                os << "DESCRIPTION=" << ext.description.c_str() << std::endl;
+                os << "PROVIDER=" << ext.provider.c_str() << std::endl;
+                os << "UPDATEURL=" << ext.updateurl.c_str();
+                return os;
+        }
+
+        friend std::ostream& operator<<(std::ostream& os, PrivateExtension* ext)
+        {
+                if (ext != NULL) {
+                        return os << (*ext);
+                } else {
+                        return os << "NULL";
+                }
+        }
+
+protected:
+        std::string sid;
+        std::string provider;
+        std::string description;
+        std::string path;
+        std::string updateurl;
+        wxBitmap    icon;
+
+private:
+        int ParseSVNBuild(const char* str)
+        {
+                int num = -1;
+                std::string beg;
+                std::string end;
+                std::stringstream ss(str);
+                ss >> beg >> num >> end;
+                return num;
+        }
+
+};
+
+//define a function pointer type for convenience
+#ifndef __PLUGIN_FUNCTION
+#define __PLUGIN_FUNCTION
+typedef PrivateExtension* ( *CreatePrivateExtension_function)();
+#endif //__PLUGIN_FUNCTION
+
+#endif
diff --git a/cadxcore/resources/cadxcore.icns b/cadxcore/resources/cadxcore.icns
new file mode 100644
index 0000000..01a3c93
Binary files /dev/null and b/cadxcore/resources/cadxcore.icns differ
diff --git a/cadxcore/resources/conformance.xml b/cadxcore/resources/conformance.xml
new file mode 100644
index 0000000..fbcc7eb
--- /dev/null
+++ b/cadxcore/resources/conformance.xml
@@ -0,0 +1,1082 @@
+<?xml version="1.0"?>
+<dicom-conformance>
+
+	<transfer-syntaxes>
+		<transfer-syntax ref-id="LittleEndianImplicitTransferSyntax" uid="1.2.840.10008.1.2" />
+		<transfer-syntax ref-id="LittleEndianExplicitTransferSyntax" uid="1.2.840.10008.1.2.1" />
+		<transfer-syntax ref-id="BigEndianExplicitTransferSyntax" uid="1.2.840.10008.1.2.2" />
+		<transfer-syntax ref-id="DeflatedExplicitVRLittleEndianTransferSyntax" uid="1.2.840.10008.1.2.1.99" />
+		
+		<transfer-syntax ref-id="JPEGProcess1TransferSyntax" uid="1.2.840.10008.1.2.4.50" />
+		<transfer-syntax ref-id="JPEGProcess2_4TransferSyntax" uid="1.2.840.10008.1.2.4.51" />
+		<transfer-syntax ref-id="JPEGProcess14TransferSyntax" uid="1.2.840.10008.1.2.4.57" />
+		<transfer-syntax ref-id="JPEGProcess14SV1TransferSyntax" uid="1.2.840.10008.1.2.4.70" />
+		<transfer-syntax ref-id="JPEGLSLosslessTransferSyntax" uid="1.2.840.10008.1.2.4.80" />
+		<transfer-syntax ref-id="JPEGLSLossyTransferSyntax" uid="1.2.840.10008.1.2.4.81" />
+		<transfer-syntax ref-id="JPEG2000LosslessOnlyTransferSyntax" uid="1.2.840.10008.1.2.4.90" />
+		<transfer-syntax ref-id="JPEG2000TransferSyntax" uid="1.2.840.10008.1.2.4.91" />
+		<transfer-syntax ref-id="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" uid="1.2.840.10008.1.2.4.92" />
+		<transfer-syntax ref-id="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" uid="1.2.840.10008.1.2.4.93" />
+		<transfer-syntax ref-id="RLELosslessTransferSyntax" uid="1.2.840.10008.1.2.5" />
+		
+		<transfer-syntax ref-id="MPEG2MainProfileAtMainLevelTransferSyntax" uid="1.2.840.10008.1.2.4.100" />
+		<transfer-syntax ref-id="MPEG2MainProfileAtHighLevelTransferSyntax" uid="1.2.840.10008.1.2.4.101" />
+		<transfer-syntax ref-id="MPEG4HighProfileLevel4_1TransferSyntax" uid="1.2.840.10008.1.2.4.102" />
+		<transfer-syntax ref-id="MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax" uid="1.2.840.10008.1.2.4.103" />
+	</transfer-syntaxes>
+
+  <storage-sop-classes>
+  
+	<sop-class ref-id="HardcopyGrayscaleImageStorage" uid="1.2.840.10008.5.1.1.29">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="HardcopyColorImageStorage" uid="1.2.840.10008.5.1.1.30">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="ComputedRadiographyImageStorage" uid="1.2.840.10008.5.1.4.1.1.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="DigitalXRayImageStorageForPresentation" uid="1.2.840.10008.5.1.4.1.1.1.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="DigitalXRayImageStorageForProcessing" uid="1.2.840.10008.5.1.4.1.1.1.1.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="DigitalMammographyXRayImageStorageForPresentation" uid="1.2.840.10008.5.1.4.1.1.1.2">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="DigitalMammographyXRayImageStorageForProcessing" uid="1.2.840.10008.5.1.4.1.1.1.2.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="DigitalIntraOralXRayImageStorageForPresentation" uid="1.2.840.10008.5.1.4.1.1.1.3">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="DigitalIntraOralXRayImageStorageForProcessing" uid="1.2.840.10008.5.1.4.1.1.1.3.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+	
+	
+
+	<sop-class ref-id="CTImageStorage" uid="1.2.840.10008.5.1.4.1.1.2" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="EnhancedCTImageStorage" uid="1.2.840.10008.5.1.4.1.1.2.1" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="UltrasoundMultiframeImageStorage" uid="1.2.840.10008.5.1.4.1.1.3.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+  <sop-class ref-id="RetiredUltrasoundMultiframeImageStorage" uid="1.2.840.10008.5.1.4.1.1.3">
+    <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+    <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+    <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+    <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    <allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+    <allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+    <allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+    <allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+    <allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+    <allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+    <allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+    <allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+    <allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+    <allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+    <allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+  </sop-class>
+
+	<sop-class ref-id="MRImageStorage" uid="1.2.840.10008.5.1.4.1.1.4">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="EnhancedMRImageStorage" uid="1.2.840.10008.5.1.4.1.1.4.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="MRSpectroscopyStorage" uid="1.2.840.10008.5.1.4.1.1.4.2">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="EnhancedMRColorImageStorage" uid="1.2.840.10008.5.1.4.1.1.4.3">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="UltrasoundImageStorage" uid="1.2.840.10008.5.1.4.1.1.6.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="EnhancedUSVolumeStorage" uid="1.2.840.10008.5.1.4.1.1.6.2">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="SecondaryCaptureImageStorage" uid="1.2.840.10008.5.1.4.1.1.7">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="MultiframeSingleBitSecondaryCaptureImageStorage" uid="1.2.840.10008.5.1.4.1.1.7.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="MultiframeGrayscaleByteSecondaryCaptureImageStorage" uid="1.2.840.10008.5.1.4.1.1.7.2">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="MultiframeGrayscaleWordSecondaryCaptureImageStorage" uid="1.2.840.10008.5.1.4.1.1.7.3">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="MultiframeTrueColorSecondaryCaptureImageStorage" uid="1.2.840.10008.5.1.4.1.1.7.4">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="XRayRadiofluoroscopicImageStorage" uid="1.2.840.10008.5.1.4.1.1.12.2">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="XRayAngiographicImageStorage" uid="1.2.840.10008.5.1.4.1.1.12.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="EnhancedXAImageStorage" uid="1.2.840.10008.5.1.4.1.1.12.1.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="EnhancedXRFImageStorage" uid="1.2.840.10008.5.1.4.1.1.12.2.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="XRay3DAngiographicImageStorage" uid="1.2.840.10008.5.1.4.1.1.13.1.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="NuclearMedicineImageStorage" uid="1.2.840.10008.5.1.4.1.1.20">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="RawDataStorage" uid="1.2.840.10008.5.1.4.1.1.66">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="VLEndoscopicImageStorage" uid="1.2.840.10008.5.1.4.1.1.77.1.1" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+    
+	<sop-class ref-id="VideoEndoscopicImageStorage" uid="1.2.840.10008.5.1.4.1.1.77.1.1.1" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="MPEG2MainProfileAtMainLevelTransferSyntax" />
+		<allowed-transfer-syntax ref="MPEG2MainProfileAtHighLevelTransferSyntax"/>
+		<allowed-transfer-syntax ref="MPEG4HighProfileLevel4_1TransferSyntax" />
+		<allowed-transfer-syntax ref="MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax" />
+	</sop-class>
+    
+	<sop-class ref-id="VLMicroscopicImageStorage" uid="1.2.840.10008.5.1.4.1.1.77.1.2">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="VideoMicroscopicImageStorage" uid="1.2.840.10008.5.1.4.1.1.77.1.2.1" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="MPEG2MainProfileAtMainLevelTransferSyntax" />
+		<allowed-transfer-syntax ref="MPEG2MainProfileAtHighLevelTransferSyntax"/>
+		<allowed-transfer-syntax ref="MPEG4HighProfileLevel4_1TransferSyntax" />
+		<allowed-transfer-syntax ref="MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax" />
+	</sop-class>
+    
+	<sop-class ref-id="VLSlideCoordinatesMicroscopicImageStorage" uid="1.2.840.10008.5.1.4.1.1.77.1.3">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="VLPhotographicImageStorage" uid="1.2.840.10008.5.1.4.1.1.77.1.4" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="VideoPhotographicImageStorage" uid="1.2.840.10008.5.1.4.1.1.77.1.4.1" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="MPEG2MainProfileAtMainLevelTransferSyntax" />
+		<allowed-transfer-syntax ref="MPEG2MainProfileAtHighLevelTransferSyntax"/>
+		<allowed-transfer-syntax ref="MPEG4HighProfileLevel4_1TransferSyntax" />
+		<allowed-transfer-syntax ref="MPEG4BDcompatibleHighProfileLevel4_1TransferSyntax" />
+	</sop-class>
+    
+	<sop-class ref-id="PositronEmissionTomographyImageStorage" uid="1.2.840.10008.5.1.4.1.1.128">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="RTImageStorage" uid="1.2.840.10008.5.1.4.1.1.481.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="GrayscaleSoftcopyPresentationStateStorage" uid="1.2.840.10008.5.1.4.1.1.11.1">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="BasicTextSRStorage" uid="1.2.840.10008.5.1.4.1.1.88.11">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="EnhancedSRStorage" uid="1.2.840.10008.5.1.4.1.1.88.22">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="ComprehensiveSRStorage" uid="1.2.840.10008.5.1.4.1.1.88.33">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="MammographyCADSRStorage" uid="1.2.840.10008.5.1.4.1.1.88.50">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="KeyObjectSelectionDocumentStorage" uid="1.2.840.10008.5.1.4.1.1.88.59">
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="SecondaryCaptureImageStorage" uid="1.2.840.10008.5.1.4.1.1.7" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess2_4TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGProcess14SV1TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLosslessTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEGLSLossyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000LosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000TransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionLosslessOnlyTransferSyntax" />
+		<allowed-transfer-syntax ref="JPEG2000Part2MulticomponentImageCompressionTransferSyntax" />
+		<allowed-transfer-syntax ref="RLELosslessTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="ArterialPulseWaveformStorage" uid="1.2.840.10008.5.1.4.1.1.9.5.1" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="RespiratoryWaveformStorage" uid="1.2.840.10008.5.1.4.1.1.9.6.1" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="HemodynamicWaveformStorage" uid="1.2.840.10008.5.1.4.1.1.9.2.1" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="TwelveLeadECGWaveformStorage" uid="1.2.840.10008.5.1.4.1.1.9.1.1" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="GeneralECGWaveformStorage" uid="1.2.840.10008.5.1.4.1.1.9.1.2" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="AmbulatoryECGWaveformStorage" uid="1.2.840.10008.5.1.4.1.1.9.1.3" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+	</sop-class>
+
+	<sop-class ref-id="CardiacElectrophysiologyWaveformStorage" uid="1.2.840.10008.5.1.4.1.1.9.3.1" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="EncapsulatedPDFStorage" uid="1.2.840.10008.5.1.4.1.1.104.1" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+	</sop-class>
+	
+	<sop-class ref-id="StandaloneCurveStorage" uid="1.2.840.10008.5.1.4.1.1.9" >
+		<allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+		<allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+	</sop-class>
+	</storage-sop-classes>
+
+  <scu-sop-classes>
+    
+    <sop-class ref-id="VerificationSOPClass" uid="1.2.840.10008.1.1">
+      <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    </sop-class>
+
+    <sop-class ref-id="FINDPatientRootQueryRetrieveInformationModel" uid="1.2.840.10008.5.1.4.1.2.1.1">
+      <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    </sop-class>
+
+    <sop-class ref-id="FINDStudyRootQueryRetrieveInformationModel" uid="1.2.840.10008.5.1.4.1.2.2.1">
+      <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    </sop-class>
+
+    <sop-class ref-id="MOVEPatientRootQueryRetrieveInformationModel" uid="1.2.840.10008.5.1.4.1.2.1.2">
+      <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    </sop-class>
+
+    <sop-class ref-id="MOVEStudyRootQueryRetrieveInformationModel" uid="1.2.840.10008.5.1.4.1.2.2.2">
+      <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    </sop-class>
+
+    <sop-class ref-id="GETPatientRootQueryRetrieveInformationModel" uid="1.2.840.10008.5.1.4.1.2.1.3">
+      <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    </sop-class>
+
+    <sop-class ref-id="GETStudyRootQueryRetrieveInformationModel" uid="1.2.840.10008.5.1.4.1.2.2.3">
+      <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    </sop-class>
+
+    <include-storage-sop-classes />
+
+  </scu-sop-classes>
+
+  <scp-sop-classes>
+    
+    <sop-class ref-id="VerificationSOPClass" uid="1.2.840.10008.1.1">
+      <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    </sop-class>
+
+    <sop-class ref-id="GETStudyRootQueryRetrieveInformationModel" uid="1.2.840.10008.5.1.4.1.2.2.3">
+      <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    </sop-class>
+
+    <sop-class ref-id="MOVEPatientRootQueryRetrieveInformationModel" uid="1.2.840.10008.5.1.4.1.2.1.2">
+      <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    </sop-class>
+
+    <sop-class ref-id="MOVEStudyRootQueryRetrieveInformationModel" uid="1.2.840.10008.5.1.4.1.2.2.2">
+      <allowed-transfer-syntax ref="LittleEndianImplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="LittleEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="BigEndianExplicitTransferSyntax" />
+      <allowed-transfer-syntax ref="DeflatedExplicitVRLittleEndianTransferSyntax" />
+    </sop-class>
+
+    <include-storage-sop-classes />
+    
+  </scp-sop-classes>
+	
+	<!-- Modality-TransferSyntax Map: Used for fast C-GET -->
+		
+	<modalities-map>
+	
+		<modality ref-id="ECG" descr="Electrocardiogram" >
+			<allowed-sop-class ref="HemodynamicWaveformStorage" />
+			<allowed-sop-class ref="TwelveLeadECGWaveformStorage" />
+			<allowed-sop-class ref="GeneralECGWaveformStorage" />
+			<allowed-sop-class ref="AmbulatoryECGWaveformStorage" />
+			<allowed-sop-class ref="CardiacElectrophysiologyWaveformStorage" />
+		</modality>	
+		
+		<modality ref-id="CR" descr="Computed Radiography" >
+			<allowed-sop-class ref="ComputedRadiographyImageStorage" />
+		</modality>
+		
+		<modality ref-id="CT" descr="Computed Tomography" >
+			<allowed-sop-class ref="CTImageStorage" />
+			<allowed-sop-class ref="SecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="EnhancedCTImageStorage" />	
+			<allowed-sop-class ref="DigitalIntraOralXRayImageStorageForProcessing" />
+			<allowed-sop-class ref="DigitalIntraOralXRayImageStorageForPresentation" />
+		</modality>
+		
+		<modality ref-id="ES" descr ="Endoscopy" >
+			<allowed-sop-class ref="VLEndoscopicImageStorage" />
+			<allowed-sop-class ref="VideoEndoscopicImageStorage" />
+			<allowed-sop-class ref="VLPhotographicImageStorage" />
+			<allowed-sop-class ref="VideoPhotographicImageStorage" />
+			<allowed-sop-class ref="SecondaryCaptureImageStorage" />
+		</modality>
+		
+		<modality ref-id="XC" descr ="eXternal Camera" >
+			<allowed-sop-class ref="VLEndoscopicImageStorage" />
+			<allowed-sop-class ref="VideoEndoscopicImageStorage" />
+			<allowed-sop-class ref="VideoMicroscopicImageStorage" />
+			<allowed-sop-class ref="VLPhotographicImageStorage" />
+			<allowed-sop-class ref="VideoPhotographicImageStorage" />
+			<allowed-sop-class ref="SecondaryCaptureImageStorage" />
+		</modality>
+		
+		<modality ref-id="DM" descr="Digital Microscopy" >
+			<allowed-sop-class ref="VLMicroscopicImageStorage" />
+			<allowed-sop-class ref="VideoMicroscopicImageStorage" />
+			<allowed-sop-class ref="VLSlideCoordinatesMicroscopicImageStorage" />
+		</modality>
+		
+		<modality ref-id="DX" descr="Digital radiography" >
+			<allowed-sop-class ref="DigitalXRayImageStorageForPresentation" />
+			<allowed-sop-class ref="DigitalXRayImageStorageForProcessing" />
+			<allowed-sop-class ref="DigitalIntraOralXRayImageStorageForPresentation" />
+			<allowed-sop-class ref="DigitalIntraOralXRayImageStorageForProcessing" />
+      <allowed-sop-class ref="ComputedRadiographyImageStorage" />
+			<allowed-sop-class ref="XRayRadiofluoroscopicImageStorage" />
+		</modality>
+			
+		<modality ref-id="ES" descr="Endoscopy" >
+			<allowed-sop-class ref="VLEndoscopicImageStorage" />
+			<allowed-sop-class ref="VideoEndoscopicImageStorage" />
+		</modality>
+		
+		<modality ref-id="HC" descr="Hard Copy" >
+			<allowed-sop-class ref="HardcopyGrayscaleImageStorage" />
+			<allowed-sop-class ref="HardcopyColorImageStorage" />
+		</modality>
+		
+		<modality ref-id="HD" descr="Hemodynamics" >
+			<allowed-sop-class ref="HemodynamicWaveformStorage" />
+			<allowed-sop-class ref="ArterialPulseWaveformStorage" />
+			<allowed-sop-class ref="RespiratoryWaveformStorage" />
+			<allowed-sop-class ref="TwelveLeadECGWaveformStorage" />
+			<allowed-sop-class ref="GeneralECGWaveformStorage" />
+			<allowed-sop-class ref="AmbulatoryECGWaveformStorage" />
+			<allowed-sop-class ref="CardiacElectrophysiologyWaveformStorage" />
+		</modality>
+		
+		<modality ref-id="MG" descr="Mammography" >
+			<allowed-sop-class ref="SecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="DigitalMammographyXRayImageStorageForPresentation" />
+			<allowed-sop-class ref="DigitalMammographyXRayImageStorageForProcessing" />
+		</modality>
+			
+		<modality ref-id="MR" descr="Magnetic Resonance" >
+			<allowed-sop-class ref="MRImageStorage" />
+			<allowed-sop-class ref="EnhancedMRImageStorage" />
+			<allowed-sop-class ref="MRSpectroscopyStorage" />
+			<allowed-sop-class ref="EnhancedMRColorImageStorage" />
+		</modality>
+		
+		<modality ref-id="NM" descr="Nuclear Medicine" >
+			<allowed-sop-class ref="NuclearMedicineImageStorage" />
+			<allowed-sop-class ref="SecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="StandaloneCurveStorage" />
+		</modality>
+		
+		<modality ref-id="OT" descr="Other" >
+      <allowed-sop-class ref="SecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="VLPhotographicImageStorage" />
+			<allowed-sop-class ref="VideoPhotographicImageStorage" />			
+			<allowed-sop-class ref="RawDataStorage" />
+		</modality>
+
+    <modality ref-id="DOC" descr="Document" >
+      <allowed-sop-class ref="SecondaryCaptureImageStorage" />
+      <allowed-sop-class ref="EncapsulatedPDFStorage" />
+      <allowed-sop-class ref="RawDataStorage" />
+    </modality>
+		
+		<modality ref-id="PET" descr="Positron Emission Tomography" >
+			<allowed-sop-class ref="PositronEmissionTomographyImageStorage" />
+		</modality>
+		
+		<modality ref-id="PT" descr="Positron Emission Tomography" >
+			<allowed-sop-class ref="PositronEmissionTomographyImageStorage" />
+		</modality>
+		
+		<modality ref-id="RF" descr="Radio Fluoroscopy" >
+			<allowed-sop-class ref="XRayRadiofluoroscopicImageStorage" />
+			<allowed-sop-class ref="DigitalIntraOralXRayImageStorageForProcessing" />
+			<allowed-sop-class ref="DigitalIntraOralXRayImageStorageForPresentation" />
+		</modality>
+	
+		<modality ref-id="RT" descr="Radiotherapy Image" >
+			<allowed-sop-class ref="RTImageStorage" />			
+		</modality>
+		
+		<modality ref-id="SR" descr="Structured Report" >
+			<allowed-sop-class ref="BasicTextSRStorage" />
+			<allowed-sop-class ref="EnhancedSRStorage" />
+			<allowed-sop-class ref="MammographyCADSRStorage" />
+			<allowed-sop-class ref="ComprehensiveSRStorage" />
+			<allowed-sop-class ref="KeyObjectSelectionDocumentStorage" />
+		</modality>
+		
+		<modality ref-id="SC" descr="Secondary Capture" >
+			<allowed-sop-class ref="SecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="EncapsulatedPDFStorage" />
+			<allowed-sop-class ref="MultiframeSingleBitSecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="MultiframeGrayscaleByteSecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="MultiframeGrayscaleWordSecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="MultiframeTrueColorSecondaryCaptureImageStorage" />
+		</modality>
+
+		
+		<modality ref-id="US" descr="Ultrasound" >
+			<allowed-sop-class ref="SecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="UltrasoundImageStorage" />
+			<allowed-sop-class ref="UltrasoundMultiframeImageStorage" />
+			<allowed-sop-class ref="MultiframeSingleBitSecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="MultiframeGrayscaleByteSecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="MultiframeGrayscaleWordSecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="MultiframeTrueColorSecondaryCaptureImageStorage" />
+      <allowed-sop-class ref="RetiredUltrasoundMultiframeImageStorage" />
+		</modality>
+		
+		<modality ref-id="XA" descr="X-Ray Angiography" >
+			<allowed-sop-class ref="SecondaryCaptureImageStorage" />
+			<allowed-sop-class ref="XRayAngiographicImageStorage" />
+			<allowed-sop-class ref="EnhancedXAImageStorage" />
+			<allowed-sop-class ref="XRayRadiofluoroscopicImageStorage" />
+			<allowed-sop-class ref="EnhancedXRFImageStorage" />
+			<allowed-sop-class ref="XRay3DAngiographicImageStorage" />
+			<allowed-sop-class ref="XRayRadiofluoroscopicImageStorage" />
+		</modality>
+		
+		<modality ref-id="XC" descr="eXternal Capture" >			
+			<allowed-sop-class ref="VLPhotographicImageStorage" />
+			<allowed-sop-class ref="VideoPhotographicImageStorage" />
+			<allowed-sop-class ref="VLEndoscopicImageStorage" />
+			<allowed-sop-class ref="VLMicroscopicImageStorage" />
+			<allowed-sop-class ref="VideoMicroscopicImageStorage" />
+			<!-- <allowed-sop-class ref="VLSlideCoordinatesMicroscopicImageStorage" /> -->
+		</modality>
+		
+		<modality ref-id="OCT" descr="Opthalmologic Computerized Tomography" >			
+			<allowed-sop-class ref="VLPhotographicImageStorage" />
+		</modality>
+	
+	</modalities-map>
+	
+</dicom-conformance>
diff --git a/cadxcore/resources/files/acquisition/ico_acquire_file.png b/cadxcore/resources/files/acquisition/ico_acquire_file.png
new file mode 100644
index 0000000..f6b74cc
Binary files /dev/null and b/cadxcore/resources/files/acquisition/ico_acquire_file.png differ
diff --git a/cadxcore/resources/files/acquisition/ico_acquire_pacs.png b/cadxcore/resources/files/acquisition/ico_acquire_pacs.png
new file mode 100644
index 0000000..6613419
Binary files /dev/null and b/cadxcore/resources/files/acquisition/ico_acquire_pacs.png differ
diff --git a/cadxcore/resources/files/acquisition/ico_clear.png b/cadxcore/resources/files/acquisition/ico_clear.png
new file mode 100644
index 0000000..2c6152e
Binary files /dev/null and b/cadxcore/resources/files/acquisition/ico_clear.png differ
diff --git a/cadxcore/resources/files/acquisition/ico_download.png b/cadxcore/resources/files/acquisition/ico_download.png
new file mode 100644
index 0000000..cd77cbd
Binary files /dev/null and b/cadxcore/resources/files/acquisition/ico_download.png differ
diff --git a/cadxcore/resources/files/acquisition/ico_remove_download.png b/cadxcore/resources/files/acquisition/ico_remove_download.png
new file mode 100644
index 0000000..1514d51
Binary files /dev/null and b/cadxcore/resources/files/acquisition/ico_remove_download.png differ
diff --git a/cadxcore/resources/files/angle_bar/ico_angulo_cobb.png b/cadxcore/resources/files/angle_bar/ico_angulo_cobb.png
new file mode 100644
index 0000000..0e3b44f
Binary files /dev/null and b/cadxcore/resources/files/angle_bar/ico_angulo_cobb.png differ
diff --git a/cadxcore/resources/files/angle_bar/ico_angulo_normal.png b/cadxcore/resources/files/angle_bar/ico_angulo_normal.png
new file mode 100644
index 0000000..102af6f
Binary files /dev/null and b/cadxcore/resources/files/angle_bar/ico_angulo_normal.png differ
diff --git a/cadxcore/resources/files/big_icons/ico_acquire_big.png b/cadxcore/resources/files/big_icons/ico_acquire_big.png
new file mode 100644
index 0000000..298b3ab
Binary files /dev/null and b/cadxcore/resources/files/big_icons/ico_acquire_big.png differ
diff --git a/cadxcore/resources/files/big_icons/ico_default_dicomizer.png b/cadxcore/resources/files/big_icons/ico_default_dicomizer.png
new file mode 100644
index 0000000..35ecf2b
Binary files /dev/null and b/cadxcore/resources/files/big_icons/ico_default_dicomizer.png differ
diff --git a/cadxcore/resources/files/big_icons/ico_dicomize_big.png b/cadxcore/resources/files/big_icons/ico_dicomize_big.png
new file mode 100644
index 0000000..a96155f
Binary files /dev/null and b/cadxcore/resources/files/big_icons/ico_dicomize_big.png differ
diff --git a/cadxcore/resources/files/big_icons/ico_history_big.png b/cadxcore/resources/files/big_icons/ico_history_big.png
new file mode 100644
index 0000000..bb4cbde
Binary files /dev/null and b/cadxcore/resources/files/big_icons/ico_history_big.png differ
diff --git a/cadxcore/resources/files/big_icons/ico_qr_big.png b/cadxcore/resources/files/big_icons/ico_qr_big.png
new file mode 100644
index 0000000..61de818
Binary files /dev/null and b/cadxcore/resources/files/big_icons/ico_qr_big.png differ
diff --git a/cadxcore/resources/files/big_icons/ico_qr_big.svg b/cadxcore/resources/files/big_icons/ico_qr_big.svg
new file mode 100644
index 0000000..00516e1
--- /dev/null
+++ b/cadxcore/resources/files/big_icons/ico_qr_big.svg
@@ -0,0 +1,1341 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   width="64"
+   height="64"
+   id="svg4249"
+   version="1.1"
+   inkscape:version="0.48.2 r9819"
+   sodipodi:docname="ico_qr.svg"
+   inkscape:export-filename="C:\proyectos\metaemotion\ginkgo3\trunk\src\cadxcore\resources\bigicons\ico_qr.png"
+   inkscape:export-xdpi="90"
+   inkscape:export-ydpi="90">
+  <defs
+     id="defs4251">
+    <inkscape:perspective
+       sodipodi:type="inkscape:persp3d"
+       inkscape:vp_x="0 : 526.18109 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_z="744.09448 : 526.18109 : 1"
+       inkscape:persp3d-origin="372.04724 : 350.78739 : 1"
+       id="perspective4257" />
+    <inkscape:perspective
+       id="perspective4040"
+       inkscape:persp3d-origin="0.5 : 0.33333333 : 1"
+       inkscape:vp_z="1 : 0.5 : 1"
+       inkscape:vp_y="0 : 1000 : 0"
+       inkscape:vp_x="0 : 0.5 : 1"
+       sodipodi:type="inkscape:persp3d" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3750"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient3753">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop3755" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop3757" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3752"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4049">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4051" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4053" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3754"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4056">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4058" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4060" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3756"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4063">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4065" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4067" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3758"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4070">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4072" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4074" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3760"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4077">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4079" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4081" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3762"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4084">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4086" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4088" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3764"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4091">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4093" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4095" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3766"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4098">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4100" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4102" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3768"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4105">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4107" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4109" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3770"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4112">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4114" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4116" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3772"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4119">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4121" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4123" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3774"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4126">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4128" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4130" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3776"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4133">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4135" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4137" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3778"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4140">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4142" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4144" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3780"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4147">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4149" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4151" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3782"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4154">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4156" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4158" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3753"
+       id="linearGradient3784"
+       gradientUnits="userSpaceOnUse"
+       x1="316.61093"
+       y1="163.13255"
+       x2="319.65189"
+       y2="167.29497" />
+    <linearGradient
+       id="linearGradient4161">
+      <stop
+         style="stop-color:#ededed;stop-opacity:1;"
+         offset="0"
+         id="stop4163" />
+      <stop
+         style="stop-color:#bebebe;stop-opacity:1;"
+         offset="1"
+         id="stop4165" />
+    </linearGradient>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter4102">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="5.728125"
+         id="feGaussianBlur4104" />
+    </filter>
+    <linearGradient
+       id="linearGradient3879">
+      <stop
+         style="stop-color:#9c9c9c;stop-opacity:1;"
+         offset="0"
+         id="stop3881" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop3883" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3786"
+       inkscape:collect="always">
+      <stop
+         id="stop3788"
+         offset="0"
+         style="stop-color:#d5f6ff;stop-opacity:1;" />
+      <stop
+         id="stop3790"
+         offset="1"
+         style="stop-color:#0098be;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2836"
+       inkscape:collect="always">
+      <stop
+         id="stop2838"
+         offset="0"
+         style="stop-color:#999999;stop-opacity:1" />
+      <stop
+         id="stop2840"
+         offset="1"
+         style="stop-color:#e6e6e6;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3245">
+      <stop
+         style="stop-color:#9c9c9c;stop-opacity:1;"
+         offset="0"
+         id="stop3247" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop3249" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3848">
+      <path
+         inkscape:connector-curvature="0"
+         mask="none"
+         style="opacity:0.78846154;fill:url(#radialGradient3852);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3850" />
+    </mask>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3842"
+       id="radialGradient3852"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5623658,0,0,0.84386701,-49.215801,156.39732)"
+       cx="87.515625"
+       cy="851.13416"
+       fx="87.515625"
+       fy="851.13416"
+       r="54.046875" />
+    <linearGradient
+       id="linearGradient3842"
+       inkscape:collect="always">
+      <stop
+         id="stop3844"
+         offset="0"
+         style="stop-color:#666666;stop-opacity:1" />
+      <stop
+         id="stop3846"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3772">
+      <path
+         inkscape:connector-curvature="0"
+         id="path3774"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         style="fill:url(#linearGradient3776-1);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709-1"
+       id="linearGradient3776-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0,3.426562e-6)"
+       x1="33.46875"
+       y1="854.68097"
+       x2="141.5625"
+       y2="854.68097" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3709-1">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop3711-7" />
+      <stop
+         style="stop-color:#4d4d4d;stop-opacity:1"
+         offset="1"
+         id="stop3713-4" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3719">
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:url(#linearGradient3723);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3721" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709"
+       id="linearGradient3723"
+       gradientUnits="userSpaceOnUse"
+       x1="87.515625"
+       y1="829.03296"
+       x2="87.515625"
+       y2="887.91498" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3709">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop3711" />
+      <stop
+         style="stop-color:#4d4d4d;stop-opacity:1"
+         offset="1"
+         id="stop3713" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3269">
+      <path
+         inkscape:connector-curvature="0"
+         mask="none"
+         style="opacity:0.78846154;fill:url(#radialGradient3852);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3271" />
+    </mask>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3842"
+       id="radialGradient3273"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5623658,0,0,0.84386701,-49.215801,156.39732)"
+       cx="87.515625"
+       cy="851.13416"
+       fx="87.515625"
+       fy="851.13416"
+       r="54.046875" />
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3281">
+      <path
+         inkscape:connector-curvature="0"
+         id="path3283"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         style="fill:url(#linearGradient3776-1);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709-1"
+       id="linearGradient3285"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0,3.426562e-6)"
+       x1="33.46875"
+       y1="854.68097"
+       x2="141.5625"
+       y2="854.68097" />
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3293">
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:url(#linearGradient3723);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3295" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709"
+       id="linearGradient3297"
+       gradientUnits="userSpaceOnUse"
+       x1="87.515625"
+       y1="829.03296"
+       x2="87.515625"
+       y2="887.91498" />
+    <linearGradient
+       id="linearGradient3313">
+      <stop
+         style="stop-color:#9c9c9c;stop-opacity:1;"
+         offset="0"
+         id="stop3315" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop3317" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3932">
+      <stop
+         id="stop3934"
+         offset="0"
+         style="stop-color:#d81c00;stop-opacity:1;" />
+      <stop
+         style="stop-color:#ffb5b5;stop-opacity:1;"
+         offset="0.31135339"
+         id="stop3938" />
+      <stop
+         id="stop3940"
+         offset="0.70969218"
+         style="stop-color:#ec1a1a;stop-opacity:1;" />
+      <stop
+         id="stop3936"
+         offset="1"
+         style="stop-color:#880000;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879"
+       id="linearGradient3537"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1862691,0,0,1.1862691,-130.76538,-102.74484)"
+       x1="765.03625"
+       y1="581.32336"
+       x2="765.03625"
+       y2="545.69836" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3786"
+       id="radialGradient3539"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.8704967,0,0,1.8684871,-79.653359,-806.39971)"
+       cx="87.456055"
+       cy="939.89185"
+       fx="87.456055"
+       fy="939.89185"
+       r="56.45491" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2836"
+       id="linearGradient3541"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.6260765,0,0,0.6260765,-92.314478,681.97677)"
+       x1="298.58945"
+       y1="445.73376"
+       x2="298.58945"
+       y2="117.73463" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879"
+       id="linearGradient3543"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.7352862,0,0,1.7352862,-90.468415,708.86477)"
+       x1="130.627"
+       y1="143.61298"
+       x2="142.95343"
+       y2="111.64885" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3842"
+       id="radialGradient3545"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.7951974,0.74897089,-0.92973401,3.4698146,-136.5708,-548.08768)"
+       cx="165.0791"
+       cy="171.85429"
+       fx="165.0791"
+       fy="171.85429"
+       r="11.283379" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879"
+       id="linearGradient3547"
+       gradientUnits="userSpaceOnUse"
+       x1="164.5791"
+       y1="171.57541"
+       x2="143.01236"
+       y2="143.57001" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3932"
+       id="linearGradient3549"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1862691,0,0,1.1862691,-101.40672,-96.453697)"
+       x1="763.36316"
+       y1="570.19403"
+       x2="763.23535"
+       y2="545.37799" />
+  </defs>
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="11.313708"
+     inkscape:cx="32.733077"
+     inkscape:cy="18.554724"
+     inkscape:document-units="px"
+     inkscape:current-layer="g3952"
+     showgrid="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="976"
+     inkscape:window-x="-8"
+     inkscape:window-y="-8"
+     inkscape:window-maximized="1" />
+  <metadata
+     id="metadata4254">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     inkscape:label="Layer 1"
+     inkscape:groupmode="layer"
+     id="layer1"
+     transform="translate(-343.3125,-522.50281)">
+    <g
+       transform="matrix(0.57741613,0,0,0.57741613,153.63141,442.99834)"
+       id="g4320">
+      <path
+         id="path4322"
+         d="m 383.5625,139.96875 -30.6875,17.71875 0,70.84375 30.6875,17.71875 30.6875,-17.71875 0,-70.84375 -30.6875,-17.71875 z"
+         style="fill:#000000;fill-opacity:1;stroke:#000000;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path4324"
+         d="m 352.8883,157.67714 0,70.86614 30.68594,17.71654 0,-70.86614 -30.68594,-17.71654 z"
+         style="fill:#808388;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#7e7e82;fill-opacity:1;stroke:none"
+         d="m 356.07143,216.27072 24.43422,14.04422 0,10.62992 -24.54875,-14.17322 0.11453,-10.50092 z"
+         id="path4326"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 359.02549,228.54329 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         id="path4328"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4330"
+         d="m 380.50565,240.94486 0,-10.62991 -3.06859,-1.77166 0,10.62993 3.06859,1.77164 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4332"
+         d="m 371.29987,235.6299 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 368.23127,233.85825 0,-10.62991 -3.06859,-1.77166 0,10.62993 3.06859,1.77164 z"
+         id="path4334"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:type="arc"
+         style="fill:url(#linearGradient3750);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         id="path4336"
+         sodipodi:cx="316.22275"
+         sodipodi:cy="163.34666"
+         sodipodi:rx="5.9796319"
+         sodipodi:ry="5.9796319"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,305.9432,155.42973)" />
+      <path
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,295.05249,149.05315)"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         sodipodi:ry="5.9796319"
+         sodipodi:rx="5.9796319"
+         sodipodi:cy="163.34666"
+         sodipodi:cx="316.22275"
+         id="path4338"
+         style="fill:url(#linearGradient3752);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:url(#linearGradient3754);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         id="path4340"
+         sodipodi:cx="316.22275"
+         sodipodi:cy="163.34666"
+         sodipodi:rx="5.9796319"
+         sodipodi:ry="5.9796319"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,316.6445,161.55378)" />
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path4342"
+         d="m 383.57424,139.96061 -30.68594,17.71653 30.68594,17.71654 30.68594,-17.71654 -30.68594,-17.71653 z"
+         style="fill:#808388;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4344"
+         d="m 356.07143,163.12111 24.43422,14.04422 0,10.62992 -24.54875,-14.17322 0.11453,-10.50092 z"
+         style="fill:#7e7e82;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4346"
+         d="m 359.02549,175.39368 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 380.50565,187.79525 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         id="path4348"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 371.29987,182.48029 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         id="path4350"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4352"
+         d="m 368.23127,180.70864 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,305.9432,102.28012)"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         sodipodi:ry="5.9796319"
+         sodipodi:rx="5.9796319"
+         sodipodi:cy="163.34666"
+         sodipodi:cx="316.22275"
+         id="path4354"
+         style="fill:url(#linearGradient3756);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:url(#linearGradient3758);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         id="path4356"
+         sodipodi:cx="316.22275"
+         sodipodi:cy="163.34666"
+         sodipodi:rx="5.9796319"
+         sodipodi:ry="5.9796319"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,295.05249,95.903532)" />
+      <path
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,316.6445,108.40417)"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         sodipodi:ry="5.9796319"
+         sodipodi:rx="5.9796319"
+         sodipodi:cy="163.34666"
+         sodipodi:cx="316.22275"
+         id="path4358"
+         style="fill:url(#linearGradient3760);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:nodetypes="ccccc"
+         id="path4360"
+         d="m 383.57424,175.39368 30.68594,-17.71654 0,70.86614 -30.68594,17.71654 0,-70.86614 z"
+         style="fill:#3e4447;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4362"
+         d="m 355.9569,162.9921 24.54875,14.17323 0,10.62992 -24.54875,-14.17322 0,-10.62993 z"
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#7e7e82;fill-opacity:1;stroke:none"
+         d="m 356.07143,173.75104 24.43422,14.04422 0,10.62992 -24.54875,-14.17322 0.11453,-10.50092 z"
+         id="path4364"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 359.02549,186.02361 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         id="path4366"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4368"
+         d="m 380.50565,198.42518 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4370"
+         d="m 371.29987,193.11022 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 368.23127,191.33857 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         id="path4372"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:type="arc"
+         style="fill:url(#linearGradient3762);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         id="path4374"
+         sodipodi:cx="316.22275"
+         sodipodi:cy="163.34666"
+         sodipodi:rx="5.9796319"
+         sodipodi:ry="5.9796319"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,305.9432,112.91005)" />
+      <path
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,295.05249,106.53346)"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         sodipodi:ry="5.9796319"
+         sodipodi:rx="5.9796319"
+         sodipodi:cy="163.34666"
+         sodipodi:cx="316.22275"
+         id="path4376"
+         style="fill:url(#linearGradient3764);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:url(#linearGradient3766);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         id="path4378"
+         sodipodi:cx="316.22275"
+         sodipodi:cy="163.34666"
+         sodipodi:rx="5.9796319"
+         sodipodi:ry="5.9796319"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,316.6445,119.0341)" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 355.9569,173.62202 24.54875,14.17323 0,10.62992 -24.54875,-14.17322 0,-10.62993 z"
+         id="path4380"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4382"
+         d="m 356.07143,184.38095 24.43422,14.04422 0,10.62992 -24.54875,-14.17322 0.11453,-10.50092 z"
+         style="fill:#7e7e82;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4384"
+         d="m 359.02549,196.65352 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 380.50565,209.05509 0,-10.62991 -3.06859,-1.77166 0,10.62993 3.06859,1.77164 z"
+         id="path4386"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 371.29987,203.74013 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         id="path4388"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4390"
+         d="m 368.23127,201.96848 0,-10.62991 -3.06859,-1.77166 0,10.62993 3.06859,1.77164 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,305.9432,123.53996)"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         sodipodi:ry="5.9796319"
+         sodipodi:rx="5.9796319"
+         sodipodi:cy="163.34666"
+         sodipodi:cx="316.22275"
+         id="path4392"
+         style="fill:url(#linearGradient3768);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:url(#linearGradient3770);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         id="path4394"
+         sodipodi:cx="316.22275"
+         sodipodi:cy="163.34666"
+         sodipodi:rx="5.9796319"
+         sodipodi:ry="5.9796319"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,295.05249,117.16338)" />
+      <path
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,316.6445,129.66401)"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         sodipodi:ry="5.9796319"
+         sodipodi:rx="5.9796319"
+         sodipodi:cy="163.34666"
+         sodipodi:cx="316.22275"
+         id="path4396"
+         style="fill:url(#linearGradient3772);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         sodipodi:type="arc" />
+      <path
+         id="path4398"
+         d="m 356.07143,205.6408 24.43422,14.04422 0,10.62992 -24.54875,-14.17322 0.11453,-10.50092 z"
+         style="fill:#7e7e82;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4400"
+         d="m 359.02549,217.91337 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 380.50565,230.31494 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         id="path4402"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 371.29987,224.99998 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         id="path4404"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4406"
+         d="m 368.23127,223.22833 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,305.9432,144.79981)"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         sodipodi:ry="5.9796319"
+         sodipodi:rx="5.9796319"
+         sodipodi:cy="163.34666"
+         sodipodi:cx="316.22275"
+         id="path4408"
+         style="fill:url(#linearGradient3774);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:url(#linearGradient3776);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         id="path4410"
+         sodipodi:cx="316.22275"
+         sodipodi:cy="163.34666"
+         sodipodi:rx="5.9796319"
+         sodipodi:ry="5.9796319"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,295.05249,138.42322)" />
+      <path
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,316.6445,150.92386)"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         sodipodi:ry="5.9796319"
+         sodipodi:rx="5.9796319"
+         sodipodi:cy="163.34666"
+         sodipodi:cx="316.22275"
+         id="path4412"
+         style="fill:url(#linearGradient3778);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         sodipodi:type="arc" />
+      <path
+         id="path4414"
+         d="m 355.9569,184.25194 24.54875,14.17323 0,10.62992 -24.54875,-14.17322 0,-10.62993 z"
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 355.9569,194.88187 24.54875,14.17323 0,10.62992 -24.54875,-14.17322 0,-10.62993 z"
+         id="path4416"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#7e7e82;fill-opacity:1;stroke:none"
+         d="m 356.07143,195.01088 24.43422,14.04422 0,10.62992 -24.54875,-14.17322 0.11453,-10.50092 z"
+         id="path4418"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 359.02549,207.28345 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         id="path4420"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4422"
+         d="m 380.50565,219.68502 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4424"
+         d="m 371.29987,214.37006 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#6c6c6c;fill-opacity:1;stroke:none"
+         d="m 368.23127,212.59841 0,-10.62992 -3.06859,-1.77166 0,10.62993 3.06859,1.77165 z"
+         id="path4426"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:type="arc"
+         style="fill:url(#linearGradient3780);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         id="path4428"
+         sodipodi:cx="316.22275"
+         sodipodi:cy="163.34666"
+         sodipodi:rx="5.9796319"
+         sodipodi:ry="5.9796319"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,305.9432,134.16989)" />
+      <path
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,295.05249,127.7933)"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         sodipodi:ry="5.9796319"
+         sodipodi:rx="5.9796319"
+         sodipodi:cy="163.34666"
+         sodipodi:cx="316.22275"
+         id="path4430"
+         style="fill:url(#linearGradient3782);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:url(#linearGradient3784);fill-opacity:1;stroke:#4c4c4c;stroke-opacity:1"
+         id="path4432"
+         sodipodi:cx="316.22275"
+         sodipodi:cy="163.34666"
+         sodipodi:rx="5.9796319"
+         sodipodi:ry="5.9796319"
+         d="m 322.20238,163.34666 c 0,3.30246 -2.67717,5.97964 -5.97963,5.97964 -3.30246,0 -5.97963,-2.67718 -5.97963,-5.97964 0,-3.30246 2.67717,-5.97963 5.97963,-5.97963 3.30246,0 5.97963,2.67717 5.97963,5.97963 z"
+         transform="matrix(0.19723515,0.11387376,0,0.22774632,316.6445,140.29394)" />
+      <path
+         id="path4434"
+         d="m 355.9569,205.51179 24.54875,14.17323 0,10.62992 -24.54875,-14.17322 0,-10.62993 z"
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 355.9569,216.14171 24.54875,14.17323 0,10.62992 -24.54875,-14.17322 0,-10.62993 z"
+         id="path4436"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4438"
+         d="m 355.9569,162.9921 0,31.88977 24.54875,14.17323 0,-31.88977 -24.54875,-14.17323 z"
+         style="fill:none;stroke:#000000;stroke-width:1.79999995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:none;stroke:#000000;stroke-width:1.79999995;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         d="m 355.9569,194.88186 0,31.88977 24.54875,14.17323 0,-31.88977 -24.54875,-14.17323 z"
+         id="path4440"
+         inkscape:connector-curvature="0" />
+      <path
+         sodipodi:nodetypes="cccc"
+         id="path4442"
+         d="m 352.8883,157.67714 30.68594,17.71654 0,70.86614 0,0"
+         style="fill:none;stroke:#ababab;stroke-width:0.40000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4444"
+         d="m 352.8883,157.67714 0,70.86614 30.68594,17.71654 0,0"
+         style="fill:none;stroke:#6c6c6c;stroke-width:0.40000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4446"
+         d="m 383.57424,175.39368 30.68594,-17.71654"
+         style="fill:none;stroke:#757575;stroke-width:0.40000001;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path4448"
+         d="m 411.19159,162.9921 -24.54875,14.17323 0,28.34646 24.54875,-14.17323 0,-28.34646 0,0 z"
+         style="fill:#262626;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         inkscape:connector-curvature="0" />
+      <path
+         style="fill:#262626;fill-opacity:1;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+         d="m 411.19159,198.42517 -24.54875,14.17323 0,28.34646 24.54875,-14.17323 0,-28.34646 0,0 z"
+         id="path4450"
+         inkscape:connector-curvature="0" />
+      <g
+         id="g4452">
+        <path
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 389.76795,175.41904 -0.0565,28.3211"
+           id="path4454"
+           inkscape:connector-curvature="0" />
+        <path
+           id="path4456"
+           d="m 392.78003,173.62203 -0.0565,28.3211"
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           inkscape:connector-curvature="0" />
+        <path
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 395.84862,171.85037 -0.0565,28.3211"
+           id="path4458"
+           inkscape:connector-curvature="0" />
+        <path
+           id="path4460"
+           d="m 398.91721,170.07872 -0.0565,28.3211"
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           inkscape:connector-curvature="0" />
+        <path
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 401.98581,168.30706 -0.0565,28.3211"
+           id="path4462"
+           inkscape:connector-curvature="0" />
+        <path
+           id="path4464"
+           d="m 405.0544,166.53541 -0.0565,28.3211"
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           inkscape:connector-curvature="0" />
+        <path
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 408.123,164.76376 -0.0565,28.3211"
+           id="path4466"
+           inkscape:connector-curvature="0" />
+      </g>
+      <g
+         transform="translate(0.05649565,35.458423)"
+         id="g4468">
+        <path
+           id="path4470"
+           d="m 389.76795,175.41904 -0.0565,28.3211"
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           inkscape:connector-curvature="0" />
+        <path
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 392.78003,173.62203 -0.0565,28.3211"
+           id="path4472"
+           inkscape:connector-curvature="0" />
+        <path
+           id="path4474"
+           d="m 395.84862,171.85037 -0.0565,28.3211"
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           inkscape:connector-curvature="0" />
+        <path
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 398.91721,170.07872 -0.0565,28.3211"
+           id="path4476"
+           inkscape:connector-curvature="0" />
+        <path
+           id="path4478"
+           d="m 401.98581,168.30706 -0.0565,28.3211"
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           inkscape:connector-curvature="0" />
+        <path
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           d="m 405.0544,166.53541 -0.0565,28.3211"
+           id="path4480"
+           inkscape:connector-curvature="0" />
+        <path
+           id="path4482"
+           d="m 408.123,164.76376 -0.0565,28.3211"
+           style="fill:none;stroke:#000000;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+           inkscape:connector-curvature="0" />
+      </g>
+    </g>
+    <path
+       style="opacity:0.39183673;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4102)"
+       d="m 83.875,810.01843 c -40.2578,0 -72.875,32.6172 -72.875,72.875 0,40.2578 32.6172,72.875 72.875,72.875 13.2715,0 25.71701,-3.55532 36.4375,-9.75 3.30469,3.03958 7.68735,4.9375 12.53125,4.9375 1.99215,0 3.91915,-0.32441 5.71875,-0.90625 l 11.78125,11.78125 c 0.0921,2.5836 1.04084,4.96033 2.59375,6.8125 l -2.34375,2.34375 67.84375,67.84372 2.65625,-2.6562 c 2.00433,1.9184 4.72523,3.125 7.71875,3.125 6.16398,0 11.15625,-5.0235 11.15625,-11.1875 0,-3.0019 -1.19712,-5.7128 -3.125,-7. [...]
+       id="rect3971"
+       inkscape:connector-curvature="0"
+       transform="matrix(0.17180768,0,0,0.17180768,358.91684,403.23055)" />
+    <g
+       id="g3952"
+       transform="matrix(0.17180768,0,0,0.17180768,358.65499,403.23055)">
+      <rect
+         transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)"
+         y="557.64929"
+         x="763.72455"
+         height="16.162916"
+         width="26.097921"
+         id="rect3904"
+         style="fill:url(#linearGradient3537);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+      <path
+         id="path2856"
+         d="m 83.873821,815.98685 c -29.667896,-0.49624 -57.868935,21.34735 -64.830986,50.19623 -6.576641,25.04499 2.768979,53.4347 23.348559,69.28581 21.469622,17.20406 53.744555,19.23178 76.932956,4.23746 22.07561,-13.64456 34.93273,-40.74154 30.81599,-66.4669 -3.66514,-26.25171 -24.18863,-49.23769 -50.09149,-55.26317 -5.285987,-1.30802 -10.729667,-1.9771 -16.175029,-1.98943 z"
+         style="opacity:0.40384617;fill:url(#radialGradient3539);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path2816"
+         d="m 83.873821,810.01843 c -40.2578,0 -72.88141,32.62361 -72.88141,72.88141 0,40.2578 32.62361,72.88141 72.88141,72.88141 40.257799,0 72.918479,-32.62361 72.918479,-72.88141 0,-40.2578 -32.66068,-72.88141 -72.918479,-72.88141 z m 0,5.96842 c 2.309297,0 4.609081,0.1423 6.858118,0.37071 2.249037,0.2284 4.458125,0.55532 6.635693,1.00091 2.177563,0.44559 4.318378,1.01661 6.413268,1.66819 2.09489,0.65158 4.15277,1.3779 6.15377,2.22426 2.001,0.84635 3.92423,1.78747 5.82013,2.81739 1.8 [...]
+         style="fill:url(#linearGradient3541);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path3890"
+         d="m 120.27745,945.99453 c 3.30844,3.05705 7.70725,4.9675 12.56704,4.9675 10.24978,0 18.57253,-8.32274 18.57253,-18.57252 0,-4.78276 -1.88497,-9.09107 -4.85629,-12.38169 -0.72536,1.22066 -1.43097,2.45961 -2.22425,3.63295 -1.31069,1.93863 -2.70272,3.8351 -4.18902,5.63478 -1.4863,1.79968 -3.05833,3.50434 -4.708,5.15286 -1.64968,1.64851 -3.38911,3.22284 -5.18993,4.708 -1.80082,1.48516 -3.65799,2.87942 -5.59771,4.18901 -1.40595,0.94923 -2.90097,1.81764 -4.37437,2.66911 z"
+         style="fill:url(#linearGradient3543);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         inkscape:connector-curvature="0" />
+      <g
+         transform="matrix(1.1862691,0,0,1.1862691,-19.813516,-165.11666)"
+         id="g3868">
+        <g
+           id="g3860">
+          <g
+             mask="url(#mask3848)"
+             id="g3798">
+            <g
+               id="g3750"
+               mask="url(#mask3772)"
+               style="opacity:0.78846154">
+              <path
+                 id="path3725"
+                 d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+                 style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+                 mask="url(#mask3719)"
+                 inkscape:connector-curvature="0" />
+            </g>
+          </g>
+          <g
+             id="g3854"
+             mask="url(#mask3848)">
+            <g
+               style="opacity:0.78846154"
+               mask="url(#mask3772)"
+               id="g3856">
+              <path
+                 mask="url(#mask3719)"
+                 style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+                 d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+                 id="path3858"
+                 inkscape:connector-curvature="0" />
+            </g>
+          </g>
+        </g>
+      </g>
+      <path
+         transform="matrix(1.0350067,0,0,1.0350067,2.304076,801.68339)"
+         d="m 164.57911,154.35339 c 0,5.9555 -4.82788,10.78338 -10.78338,10.78338 -5.95549,0 -10.78338,-4.82788 -10.78338,-10.78338 0,-5.95549 4.82789,-10.78338 10.78338,-10.78338 5.9555,0 10.78338,4.82789 10.78338,10.78338 z"
+         sodipodi:ry="10.783379"
+         sodipodi:rx="10.783379"
+         sodipodi:cy="154.35339"
+         sodipodi:cx="153.79573"
+         id="path3918"
+         style="fill:url(#radialGradient3545);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:url(#linearGradient3547);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         id="path3942"
+         sodipodi:cx="153.79573"
+         sodipodi:cy="154.35339"
+         sodipodi:rx="10.783379"
+         sodipodi:ry="10.783379"
+         d="m 164.57911,154.35339 c 0,5.9555 -4.82788,10.78338 -10.78338,10.78338 -5.95549,0 -10.78338,-4.82788 -10.78338,-10.78338 0,-5.95549 4.82789,-10.78338 10.78338,-10.78338 5.9555,0 10.78338,4.82789 10.78338,10.78338 z"
+         transform="matrix(1.0350067,0,0,1.0350067,69.619296,868.3695)" />
+      <rect
+         style="fill:url(#linearGradient3549);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         id="rect3928"
+         width="95.929596"
+         height="29.584063"
+         x="793.08319"
+         y="550.51929"
+         transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)" />
+    </g>
+  </g>
+</svg>
diff --git a/cadxcore/resources/files/big_icons/ico_search_ginkgocloud.png b/cadxcore/resources/files/big_icons/ico_search_ginkgocloud.png
new file mode 100644
index 0000000..fc11bc6
Binary files /dev/null and b/cadxcore/resources/files/big_icons/ico_search_ginkgocloud.png differ
diff --git a/cadxcore/resources/files/big_icons/ico_search_ginkgocloud.svg b/cadxcore/resources/files/big_icons/ico_search_ginkgocloud.svg
new file mode 100644
index 0000000..d10ee00
--- /dev/null
+++ b/cadxcore/resources/files/big_icons/ico_search_ginkgocloud.svg
@@ -0,0 +1,20130 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:xlink="http://www.w3.org/1999/xlink"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   inkscape:export-ydpi="90"
+   inkscape:export-xdpi="90"
+   inkscape:export-filename="C:\proyectos\metaemotion\ginkgo3\trunk\src\cadxcore\resources\files\big_icons\ico_search_ginkgocloud.png"
+   sodipodi:docname="ico_search_ginkgocloud.svg"
+   inkscape:version="0.48.4 r9939"
+   version="1.1"
+   id="svg3090"
+   height="64"
+   width="64">
+  <sodipodi:namedview
+     id="base"
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1.0"
+     inkscape:pageopacity="0.0"
+     inkscape:pageshadow="2"
+     inkscape:zoom="4.6077785"
+     inkscape:cx="-8.2531442"
+     inkscape:cy="28.109211"
+     inkscape:document-units="px"
+     inkscape:current-layer="layer1"
+     showgrid="false"
+     inkscape:window-width="1920"
+     inkscape:window-height="976"
+     inkscape:window-x="-8"
+     inkscape:window-y="-8"
+     inkscape:window-maximized="1"
+     fit-margin-top="-40"
+     fit-margin-left="-45"
+     fit-margin-right="-45"
+     fit-margin-bottom="-40" />
+  <defs
+     id="defs3092">
+    <marker
+       style="overflow:visible"
+       id="TriangleInM"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="Arrow1Lend"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="Arrow1Lend">
+      <path
+         inkscape:connector-curvature="0"
+         transform="matrix(-0.8,0,0,-0.8,-10,0)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="M 0,0 5,-5 -12.5,0 5,5 0,0 z"
+         id="path7643" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient6035">
+      <stop
+         id="stop6037"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop6039"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3065">
+      <stop
+         id="stop3067"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop3069"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3072">
+      <stop
+         id="stop3074"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop3076"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3282">
+      <stop
+         id="stop3284"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:0.29411766;" />
+      <stop
+         id="stop3286"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3278">
+      <stop
+         id="stop3280"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:0.29411766;" />
+      <stop
+         id="stop3282"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3235">
+      <stop
+         id="stop3237"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#43ff38;stop-opacity:1;"
+         offset="0.26785713"
+         id="stop3247" />
+      <stop
+         id="stop3239"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3290">
+      <stop
+         id="stop3292"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#43ff38;stop-opacity:1;"
+         offset="0.26785713"
+         id="stop3294" />
+      <stop
+         id="stop3296"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3302">
+      <stop
+         id="stop3304"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.29411766;"
+         offset="0.20000003"
+         id="stop3310" />
+      <stop
+         id="stop3306"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12828">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830" />
+      <stop
+         id="stop12862"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12001">
+      <stop
+         id="stop12003"
+         offset="0"
+         style="stop-color:#1b4a78;stop-opacity:1;" />
+      <stop
+         id="stop12005"
+         offset="1"
+         style="stop-color:#5dacd1;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient6035-0">
+      <stop
+         id="stop6037-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop6039-6"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7359">
+      <stop
+         id="stop7361"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7363"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7366">
+      <stop
+         id="stop7368"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7370"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient6035-0-6">
+      <stop
+         id="stop6037-7-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop6039-6-7"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7487">
+      <stop
+         id="stop7489"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7491"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7494">
+      <stop
+         id="stop7496"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7498"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-8"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-0"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-1"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-2"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-9"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-4"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-7"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-8"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-3"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient4334">
+      <stop
+         style="stop-color:#464646;stop-opacity:1"
+         offset="0"
+         id="stop4336" />
+      <stop
+         style="stop-color:#cccccc;stop-opacity:0;"
+         offset="1"
+         id="stop4338" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4314">
+      <stop
+         style="stop-color:#cccccc;stop-opacity:1"
+         offset="0"
+         id="stop4316" />
+      <stop
+         style="stop-color:#999999;stop-opacity:1"
+         offset="1"
+         id="stop4318" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5328">
+      <stop
+         id="stop5330"
+         offset="0"
+         style="stop-color:#a3a3a3;stop-opacity:1" />
+      <stop
+         id="stop5332"
+         offset="1"
+         style="stop-color:#c4c4c4;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4266">
+      <stop
+         style="stop-color:#595959;stop-opacity:1;"
+         offset="0"
+         id="stop4268" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop4270" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3757">
+      <stop
+         style="stop-color:#4d4d4d;stop-opacity:1"
+         offset="0"
+         id="stop3759" />
+      <stop
+         style="stop-color:#000000;stop-opacity:1"
+         offset="1"
+         id="stop3761" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274">
+      <stop
+         style="stop-color:#4a4a4a;stop-opacity:1;"
+         offset="0"
+         id="stop4276" />
+      <stop
+         style="stop-color:#cccccc;stop-opacity:0;"
+         offset="1"
+         id="stop4278" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4368">
+      <stop
+         style="stop-color:#6f6f6f;stop-opacity:1"
+         offset="0"
+         id="stop4370" />
+      <stop
+         style="stop-color:#a9a9a9;stop-opacity:1"
+         offset="1"
+         id="stop4372" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4376">
+      <stop
+         style="stop-color:#a3a3a3;stop-opacity:1"
+         offset="0"
+         id="stop4378" />
+      <stop
+         style="stop-color:#515151;stop-opacity:1"
+         offset="1"
+         id="stop4380" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient10007">
+      <stop
+         style="stop-color:#a3a3a3;stop-opacity:1"
+         offset="0"
+         id="stop10009" />
+      <stop
+         style="stop-color:#515151;stop-opacity:1"
+         offset="1"
+         id="stop10011" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4290-8-5">
+      <stop
+         style="stop-color:#404040;stop-opacity:1;"
+         offset="0"
+         id="stop4292-2-1" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0;"
+         offset="1"
+         id="stop4294-4-7" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12408">
+      <stop
+         id="stop12410"
+         offset="0"
+         style="stop-color:#1a1a1a;stop-opacity:1" />
+      <stop
+         id="stop12412"
+         offset="1"
+         style="stop-color:#616161;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12249">
+      <stop
+         style="stop-color:#a3a3a3;stop-opacity:1;"
+         offset="0"
+         id="stop12251" />
+      <stop
+         id="stop12406"
+         offset="0.15499026"
+         style="stop-color:#7f7f7f;stop-opacity:1;" />
+      <stop
+         id="stop12404"
+         offset="0.45738119"
+         style="stop-color:#cfcfcf;stop-opacity:1;" />
+      <stop
+         id="stop12402"
+         offset="0.77458733"
+         style="stop-color:#898989;stop-opacity:1;" />
+      <stop
+         style="stop-color:#999999;stop-opacity:1"
+         offset="1"
+         id="stop12253" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12259">
+      <stop
+         style="stop-color:#181818;stop-opacity:1;"
+         offset="0"
+         id="stop12261" />
+      <stop
+         style="stop-color:#616161;stop-opacity:1;"
+         offset="1"
+         id="stop12263" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12382">
+      <stop
+         id="stop12384"
+         offset="0"
+         style="stop-color:#1a1a1a;stop-opacity:1" />
+      <stop
+         id="stop12386"
+         offset="1"
+         style="stop-color:#333333;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12302">
+      <stop
+         style="stop-color:#1a1a1a;stop-opacity:0;"
+         offset="0"
+         id="stop12304" />
+      <stop
+         id="stop12306"
+         offset="0.60532665"
+         style="stop-color:#505050;stop-opacity:0.94674557;" />
+      <stop
+         style="stop-color:#212121;stop-opacity:1"
+         offset="1"
+         id="stop12308" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11116">
+      <stop
+         id="stop11118"
+         offset="0"
+         style="stop-color:#1a1a1a;stop-opacity:1" />
+      <stop
+         id="stop11120"
+         offset="1"
+         style="stop-color:#333333;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12346">
+      <stop
+         style="stop-color:#838383;stop-opacity:1;"
+         offset="0"
+         id="stop12348" />
+      <stop
+         id="stop12378"
+         offset="0.57679939"
+         style="stop-color:#333333;stop-opacity:1" />
+      <stop
+         style="stop-color:#808080;stop-opacity:1"
+         offset="1"
+         id="stop12350" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12427">
+      <stop
+         style="stop-color:#8f8f8f;stop-opacity:0;"
+         offset="0"
+         id="stop12429" />
+      <stop
+         style="stop-color:#808080;stop-opacity:1"
+         offset="1"
+         id="stop12431" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12525">
+      <stop
+         style="stop-color:#5aa02c;stop-opacity:1;"
+         offset="0"
+         id="stop12527" />
+      <stop
+         id="stop12545"
+         offset="0.58476084"
+         style="stop-color:#9cd973;stop-opacity:1;" />
+      <stop
+         id="stop12543"
+         offset="0.80130512"
+         style="stop-color:#c1e7a7;stop-opacity:1;" />
+      <stop
+         style="stop-color:#90d463;stop-opacity:1;"
+         offset="1"
+         id="stop12529" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12563">
+      <stop
+         id="stop12565"
+         offset="0"
+         style="stop-color:#a02c42;stop-opacity:1" />
+      <stop
+         style="stop-color:#d97386;stop-opacity:1"
+         offset="0.58476084"
+         id="stop12567" />
+      <stop
+         style="stop-color:#e7a7b3;stop-opacity:1"
+         offset="0.80130512"
+         id="stop12569" />
+      <stop
+         id="stop12571"
+         offset="1"
+         style="stop-color:#d36076;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12595">
+      <stop
+         style="stop-color:#000000;stop-opacity:0;"
+         offset="0"
+         id="stop12597" />
+      <stop
+         id="stop12605"
+         offset="0.42495269"
+         style="stop-color:#1a1a1a;stop-opacity:1;" />
+      <stop
+         style="stop-color:#1a1a1a;stop-opacity:0;"
+         offset="1"
+         id="stop12599" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5206">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.70535713;"
+         offset="0"
+         id="stop5208" />
+      <stop
+         style="stop-color:#000000;stop-opacity:1"
+         offset="1"
+         id="stop5210" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5130">
+      <stop
+         id="stop5132"
+         offset="0"
+         style="stop-color:#000000;stop-opacity:1;" />
+      <stop
+         id="stop5134"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5237">
+      <stop
+         id="stop5239"
+         offset="0"
+         style="stop-color:#fafafd;stop-opacity:1;" />
+      <stop
+         id="stop5241"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:0;" />
+    </linearGradient>
+    <clipPath
+       id="SVGID_4_">
+      <polygon
+         id="use11740"
+         points="123.104,61.751 123.104,63.935 121.414,63.935 121.414,66.421 123.164,66.421 123.166,68.71 135.69,68.71 135.689,61.751 " />
+    </clipPath>
+    <linearGradient
+       y2="365.8613"
+       x2="115.2539"
+       y1="397.2822"
+       x1="115.2539"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_2_">
+      <stop
+         id="stop11710"
+         style="stop-color:#FFFFFF"
+         offset="0" />
+      <stop
+         id="stop11712"
+         style="stop-color:#000000"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       y2="404.51089"
+       x2="8.8099003"
+       y1="19.262199"
+       x1="205.02541"
+       gradientUnits="userSpaceOnUse"
+       id="SVGID_1_">
+      <stop
+         id="stop11693"
+         style="stop-color:#B1B3B4"
+         offset="0" />
+      <stop
+         id="stop11695"
+         style="stop-color:#000000"
+         offset="1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5664-4-3-6">
+      <stop
+         style="stop-color:#151515;stop-opacity:1;"
+         offset="0"
+         id="stop5733-8-1-8" />
+      <stop
+         id="stop5735-3-0-0"
+         offset="0.60526323"
+         style="stop-color:#151515;stop-opacity:1;" />
+      <stop
+         style="stop-color:#525252;stop-opacity:1;"
+         offset="0.81578958"
+         id="stop5731-9-2-5" />
+      <stop
+         id="stop5668-3-6-9"
+         offset="1"
+         style="stop-color:#919192;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16020"
+       inkscape:collect="always">
+      <stop
+         id="stop16022"
+         offset="0"
+         style="stop-color:#282c32;stop-opacity:1;" />
+      <stop
+         id="stop16024"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5617">
+      <stop
+         id="stop5619"
+         offset="0"
+         style="stop-color:#595b5e;stop-opacity:1;" />
+      <stop
+         style="stop-color:#595b5e;stop-opacity:1;"
+         offset="0.5"
+         id="stop5625" />
+      <stop
+         id="stop5621"
+         offset="1"
+         style="stop-color:#595b5e;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5458">
+      <stop
+         id="stop5460"
+         offset="0"
+         style="stop-color:#b0b0b2;stop-opacity:1;" />
+      <stop
+         style="stop-color:#b0b0b2;stop-opacity:1;"
+         offset="0.5"
+         id="stop5466" />
+      <stop
+         id="stop5462"
+         offset="1"
+         style="stop-color:#b0b0b2;stop-opacity:0;" />
+    </linearGradient>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect5360"
+       effect="spiro" />
+    <inkscape:path-effect
+       fuse_tolerance="0"
+       vertical_pattern="false"
+       prop_units="false"
+       tang_offset="0"
+       normal_offset="0"
+       spacing="0"
+       scale_y_rel="false"
+       prop_scale="1"
+       copytype="single_stretched"
+       pattern="m -1086.391,-162.35622 c 0,-2.76 2.24,-5 5,-5 2.76,0 5,2.24 5,5 0,2.76 -2.24,5 -5,5 -2.76,0 -5,-2.24 -5,-5 z"
+       is_visible="true"
+       id="path-effect5362"
+       effect="skeletal" />
+    <linearGradient
+       id="linearGradient5378">
+      <stop
+         id="stop5380"
+         offset="0"
+         style="stop-color:#686a6e;stop-opacity:1;" />
+      <stop
+         style="stop-color:#686a6e;stop-opacity:1;"
+         offset="0.5"
+         id="stop5410" />
+      <stop
+         id="stop5382"
+         offset="1"
+         style="stop-color:#686a6e;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient13067">
+      <stop
+         id="stop13069"
+         offset="0"
+         style="stop-color:#686a6e;stop-opacity:1;" />
+      <stop
+         style="stop-color:#686a6e;stop-opacity:1;"
+         offset="0.5"
+         id="stop13071" />
+      <stop
+         id="stop13073"
+         offset="1"
+         style="stop-color:#686a6e;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5507">
+      <stop
+         id="stop5509"
+         offset="0"
+         style="stop-color:#5d5e61;stop-opacity:1;" />
+      <stop
+         style="stop-color:#5d5e61;stop-opacity:1;"
+         offset="0.25229657"
+         id="stop5515" />
+      <stop
+         id="stop5511"
+         offset="1"
+         style="stop-color:#5d5e61;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient13081">
+      <stop
+         id="stop13083"
+         offset="0"
+         style="stop-color:#686a6e;stop-opacity:1;" />
+      <stop
+         style="stop-color:#686a6e;stop-opacity:1;"
+         offset="0.5"
+         id="stop13085" />
+      <stop
+         id="stop13087"
+         offset="1"
+         style="stop-color:#686a6e;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5542">
+      <stop
+         id="stop5544"
+         offset="0"
+         style="stop-color:#4e4f51;stop-opacity:1;" />
+      <stop
+         style="stop-color:#4e4f51;stop-opacity:1;"
+         offset="0.21943673"
+         id="stop5550" />
+      <stop
+         id="stop5546"
+         offset="1"
+         style="stop-color:#000000;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5883">
+      <stop
+         style="stop-color:#262a2d;stop-opacity:1;"
+         offset="0"
+         id="stop5885" />
+      <stop
+         id="stop5887"
+         offset="0.08591129"
+         style="stop-color:#606567;stop-opacity:1;" />
+      <stop
+         style="stop-color:#262a2d;stop-opacity:1;"
+         offset="0.2080123"
+         id="stop5889" />
+      <stop
+         style="stop-color:#262a2d;stop-opacity:1;"
+         offset="1"
+         id="stop5891" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5900-2-2-7-5">
+      <stop
+         id="stop5902-6-25-2-9"
+         offset="0"
+         style="stop-color:#262a2d;stop-opacity:1;" />
+      <stop
+         style="stop-color:#606567;stop-opacity:1;"
+         offset="0.12389387"
+         id="stop5908-3-6-4-7" />
+      <stop
+         id="stop5910-6-2-1-8"
+         offset="0.26769921"
+         style="stop-color:#262a2d;stop-opacity:1;" />
+      <stop
+         id="stop5904-5-0-0-3"
+         offset="1"
+         style="stop-color:#262a2d;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5900-0-9-5">
+      <stop
+         id="stop5902-8-1-1"
+         offset="0"
+         style="stop-color:#262a2d;stop-opacity:1;" />
+      <stop
+         style="stop-color:#606567;stop-opacity:1;"
+         offset="0.12389387"
+         id="stop5908-8-5-3" />
+      <stop
+         id="stop5910-3-9-0"
+         offset="0.26769921"
+         style="stop-color:#262a2d;stop-opacity:1;" />
+      <stop
+         id="stop5904-1-1-7"
+         offset="1"
+         style="stop-color:#262a2d;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       y2="404.51089"
+       x2="8.8099003"
+       y1="19.262199"
+       x1="205.02541"
+       gradientTransform="matrix(0.53874314,0,0,0.53874314,-111.65498,64.320828)"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient13429"
+       xlink:href="#SVGID_1_"
+       inkscape:collect="always" />
+    <linearGradient
+       y2="365.8613"
+       x2="115.2539"
+       y1="397.2822"
+       x1="115.2539"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient13431"
+       xlink:href="#SVGID_2_"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient3771-3">
+      <stop
+         id="stop3773-8"
+         offset="0"
+         style="stop-color:#999999;stop-opacity:1" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0.45398712"
+         id="stop3781-3" />
+      <stop
+         style="stop-color:#999999;stop-opacity:1"
+         offset="0.58583456"
+         id="stop3779-7" />
+      <stop
+         id="stop3775-1"
+         offset="1"
+         style="stop-color:#b3b3b3;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3962-8-1">
+      <stop
+         id="stop3964-2-5"
+         offset="0.0000000"
+         style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4134-2-9"
+         offset="0.15517241"
+         style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4346-9-9"
+         offset="0.75000000"
+         style="stop-color:#4074ae;stop-opacity:1.0000000;" />
+      <stop
+         id="stop3966-0-1"
+         offset="1.0000000"
+         style="stop-color:#36486c;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11391"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8">
+      <stop
+         id="stop4752-4-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop4758-2-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4754-7-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11315"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16212">
+      <stop
+         id="stop16214"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16216"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16218"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11313"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16221">
+      <stop
+         id="stop16223"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16225"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16227"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16230">
+      <stop
+         id="stop16232"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16234"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16236"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11321"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16239">
+      <stop
+         id="stop16241"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16243"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16245"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11319"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16248">
+      <stop
+         id="stop16250"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16252"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16254"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16257">
+      <stop
+         id="stop16259"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16261"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16263"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11327"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16266">
+      <stop
+         id="stop16268"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16270"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16272"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11325"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16275">
+      <stop
+         id="stop16277"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16279"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16281"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16284">
+      <stop
+         id="stop16286"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16288"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16290"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11333"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16293">
+      <stop
+         id="stop16295"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16297"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16299"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11331"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16302">
+      <stop
+         id="stop16304"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16306"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16308"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16311">
+      <stop
+         id="stop16313"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16315"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16317"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11339"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16320">
+      <stop
+         id="stop16322"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16324"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16326"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11337"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16329">
+      <stop
+         id="stop16331"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16333"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16335"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16338">
+      <stop
+         id="stop16340"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16342"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16344"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11345"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16347">
+      <stop
+         id="stop16349"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16351"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16353"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11343"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16356">
+      <stop
+         id="stop16358"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16360"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16362"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16365">
+      <stop
+         id="stop16367"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16369"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16371"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11351"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16374">
+      <stop
+         id="stop16376"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16378"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16380"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11349"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16383">
+      <stop
+         id="stop16385"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16387"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16389"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16392">
+      <stop
+         id="stop16394"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16396"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16398"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11357"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16401">
+      <stop
+         id="stop16403"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16405"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16407"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11355"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16410">
+      <stop
+         id="stop16412"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16414"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16416"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16419">
+      <stop
+         id="stop16421"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16423"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16425"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11367"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16428">
+      <stop
+         id="stop16430"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16432"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16434"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11361"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16437">
+      <stop
+         id="stop16439"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16441"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16443"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16446">
+      <stop
+         id="stop16448"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16450"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16452"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11365"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16455">
+      <stop
+         id="stop16457"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16459"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16461"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16464">
+      <stop
+         id="stop16466"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16468"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16470"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11377"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16473">
+      <stop
+         id="stop16475"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16477"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16479"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11371"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16482">
+      <stop
+         id="stop16484"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16486"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16488"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16491">
+      <stop
+         id="stop16493"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16495"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16497"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11375"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16500">
+      <stop
+         id="stop16502"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16504"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16506"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16509">
+      <stop
+         id="stop16511"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16513"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16515"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11383"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16518">
+      <stop
+         id="stop16520"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16522"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16524"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11381"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16527">
+      <stop
+         id="stop16529"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16531"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16533"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16536">
+      <stop
+         id="stop16538"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16540"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16542"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11389"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16545">
+      <stop
+         id="stop16547"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16549"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16551"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient11387"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient16554">
+      <stop
+         id="stop16556"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16558"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16560"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16563">
+      <stop
+         id="stop16565"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16567"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop16569"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126-4-3">
+      <stop
+         id="stop4128-0-5"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4130-1-1"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17602"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17604"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17608"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17610"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17614"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17616"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17620"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17622"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17626"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17628"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17632"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17634"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17638"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17640"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17644"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17646"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17650"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17654"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17656"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17660"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17664"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17666"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17670"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17672"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17676"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17678"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17680"
+       xlink:href="#linearGradient4750-9-8"
+       inkscape:collect="always" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-83"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-48"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-4"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-9"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-3"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-3"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-3"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-7"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-4"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-2"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-2"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-8"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-28"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-4-9"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-7"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-8"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-15"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-86"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-4-9-1"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-4"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-25"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-86"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-26"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-4-9-5"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-1"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-82"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-11"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-97"
+         inkscape:connector-curvature="0" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-4-9-1-6"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-17"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-40" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-9"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-4" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-4-9-1-6-8"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-24"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-5" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-5"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-1" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-4-9-1-6-8-7"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-174"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-09" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-48"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-82" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-4-9-4"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient3962-8-1-1">
+      <stop
+         id="stop3964-2-5-7"
+         offset="0.0000000"
+         style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4134-2-9-1"
+         offset="0.15517241"
+         style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4346-9-9-1"
+         offset="0.75000000"
+         style="stop-color:#4074ae;stop-opacity:1.0000000;" />
+      <stop
+         id="stop3966-0-1-5"
+         offset="1.0000000"
+         style="stop-color:#36486c;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17680-4"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2">
+      <stop
+         id="stop4752-4-7-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop4758-2-0-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4754-7-4-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17604-1"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5042">
+      <stop
+         id="stop5044"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5046"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5048"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17602-6"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5051">
+      <stop
+         id="stop5053"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5055"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5057"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5060">
+      <stop
+         id="stop5062"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5064"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5066"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17610-5"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5069">
+      <stop
+         id="stop5071"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5073"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5075"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17608-7"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5078">
+      <stop
+         id="stop5080"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5082"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5084"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5087">
+      <stop
+         id="stop5089"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5091"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5093"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17616-1"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5096">
+      <stop
+         id="stop5098"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5100"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5102"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17614-8"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5105">
+      <stop
+         id="stop5107"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5109"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5111"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5114">
+      <stop
+         id="stop5116"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5118"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5120"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17622-2"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5123">
+      <stop
+         id="stop5125"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5127"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5129"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17620-7"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5132">
+      <stop
+         id="stop5134-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5136"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5138"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5141">
+      <stop
+         id="stop5143"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5145"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5147"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17628-4"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5150">
+      <stop
+         id="stop5152"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5154"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5156"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17626-3"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5159">
+      <stop
+         id="stop5161"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5163"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5165"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5168">
+      <stop
+         id="stop5170"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5172"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5174"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17634-2"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5177">
+      <stop
+         id="stop5179"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5181"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5183"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17632-3"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5186">
+      <stop
+         id="stop5188"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5190"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5192"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5195">
+      <stop
+         id="stop5197"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5199"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5201"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17640-4"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5204">
+      <stop
+         id="stop5206"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5208-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5210-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17638-3"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5213">
+      <stop
+         id="stop5215"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5217"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5219"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5222">
+      <stop
+         id="stop5224"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5226"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5228"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17646-7"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5231">
+      <stop
+         id="stop5233"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5235"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5237"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17644-4"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5240">
+      <stop
+         id="stop5242"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5244"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5246"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5249">
+      <stop
+         id="stop5251"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5253"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5255"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17656-7"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5258">
+      <stop
+         id="stop5260"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5262"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5264"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17650-7"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5267">
+      <stop
+         id="stop5269"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5271"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5273"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5276">
+      <stop
+         id="stop5278"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5280"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5282"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17654-3"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5285">
+      <stop
+         id="stop5287"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5289"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5291"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5294">
+      <stop
+         id="stop5296"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5298"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5300"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17666-9"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5303">
+      <stop
+         id="stop5305"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5307"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5309"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17660-8"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5312">
+      <stop
+         id="stop5314"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5316"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5318"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5321">
+      <stop
+         id="stop5323"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5325"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5327"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17664-5"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5330">
+      <stop
+         id="stop5332-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5334"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5336"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5339">
+      <stop
+         id="stop5341"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5343"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5345"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17672-8"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5348">
+      <stop
+         id="stop5350"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5352"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5354"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17670-6"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5357">
+      <stop
+         id="stop5359"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5361"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5363"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5366">
+      <stop
+         id="stop5368"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5370"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5372"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17678-2"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5375">
+      <stop
+         id="stop5377"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5379"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5381"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17676-4"
+       xlink:href="#linearGradient4750-9-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient5384">
+      <stop
+         id="stop5386"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5388"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5390"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5393">
+      <stop
+         id="stop5395"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop5397"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop5399"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126-4-3-5">
+      <stop
+         id="stop4128-0-5-0"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4130-1-1-9"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3962-8-1-1-87">
+      <stop
+         id="stop10595"
+         offset="0.0000000"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10597"
+         offset="0.15517241"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10599"
+         offset="0.75000000"
+         style="stop-color:#6b6b6b;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10601"
+         offset="1.0000000"
+         style="stop-color:#474747;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17680-4-934"
+       xlink:href="#linearGradient4750-9-8-2-440"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-440">
+      <stop
+         id="stop10611"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10613"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10615"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17604-1-898"
+       xlink:href="#linearGradient4750-9-8-2-661"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-661">
+      <stop
+         id="stop10619"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10621"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10623"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17602-6-494"
+       xlink:href="#linearGradient4750-9-8-2-242"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-242">
+      <stop
+         id="stop10627"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10629"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10631"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-94">
+      <stop
+         id="stop10635"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10637"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10639"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17610-5-69"
+       xlink:href="#linearGradient4750-9-8-2-119"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-119">
+      <stop
+         id="stop10643"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10645"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10647"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17608-7-181"
+       xlink:href="#linearGradient4750-9-8-2-957"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-957">
+      <stop
+         id="stop10651"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10653"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10655"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-181">
+      <stop
+         id="stop10659"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10661"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10663"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17616-1-513"
+       xlink:href="#linearGradient4750-9-8-2-667"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-667">
+      <stop
+         id="stop10667"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10669"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10671"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17614-8-56"
+       xlink:href="#linearGradient4750-9-8-2-376"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-376">
+      <stop
+         id="stop10675"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10677"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10679"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-417">
+      <stop
+         id="stop10683"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10685"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10687"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17622-2-276"
+       xlink:href="#linearGradient4750-9-8-2-288"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-288">
+      <stop
+         id="stop10691"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10693"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10695"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17620-7-59"
+       xlink:href="#linearGradient4750-9-8-2-877"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-877">
+      <stop
+         id="stop10699"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10701"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10703"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-841">
+      <stop
+         id="stop10707"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10709"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10711"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17628-4-136"
+       xlink:href="#linearGradient4750-9-8-2-848"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-848">
+      <stop
+         id="stop10715"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10717"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10719"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17626-3-710"
+       xlink:href="#linearGradient4750-9-8-2-502"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-502">
+      <stop
+         id="stop10723"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10725"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10727"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-627">
+      <stop
+         id="stop10731"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10733"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10735"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17634-2-59"
+       xlink:href="#linearGradient4750-9-8-2-585"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-585">
+      <stop
+         id="stop10739"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10741"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10743"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17632-3-677"
+       xlink:href="#linearGradient4750-9-8-2-866"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-866">
+      <stop
+         id="stop10747"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10749"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10751"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-974">
+      <stop
+         id="stop10755"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10757"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10759"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17640-4-736"
+       xlink:href="#linearGradient4750-9-8-2-828"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-828">
+      <stop
+         id="stop10763"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10765"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10767"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17638-3-543"
+       xlink:href="#linearGradient4750-9-8-2-755"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-755">
+      <stop
+         id="stop10771"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10773"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10775"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-702">
+      <stop
+         id="stop10779"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10781"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10783"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17646-7-613"
+       xlink:href="#linearGradient4750-9-8-2-269"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-269">
+      <stop
+         id="stop10787"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10789"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10791"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17644-4-744"
+       xlink:href="#linearGradient4750-9-8-2-622"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-622">
+      <stop
+         id="stop10795"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10797"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10799"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-878">
+      <stop
+         id="stop10803"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10805"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10807"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17656-7-261"
+       xlink:href="#linearGradient4750-9-8-2-800"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-800">
+      <stop
+         id="stop10811"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10813"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10815"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17650-7-582"
+       xlink:href="#linearGradient4750-9-8-2-24"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-24">
+      <stop
+         id="stop10819"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10821"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10823"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-456">
+      <stop
+         id="stop10827"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10829"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10831"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17654-3-751"
+       xlink:href="#linearGradient4750-9-8-2-236"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-236">
+      <stop
+         id="stop10835"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10837"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10839"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-370">
+      <stop
+         id="stop10843"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10845"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10847"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17666-9-489"
+       xlink:href="#linearGradient4750-9-8-2-525"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-525">
+      <stop
+         id="stop10851"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10853"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10855"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17660-8-76"
+       xlink:href="#linearGradient4750-9-8-2-643"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-643">
+      <stop
+         id="stop10859"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10861"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10863"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-539">
+      <stop
+         id="stop10867"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10869"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10871"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17664-5-693"
+       xlink:href="#linearGradient4750-9-8-2-675"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-675">
+      <stop
+         id="stop10875"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10877"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10879"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-223">
+      <stop
+         id="stop10883"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10885"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10887"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17672-8-943"
+       xlink:href="#linearGradient4750-9-8-2-349"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-349">
+      <stop
+         id="stop10891"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10893"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10895"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17670-6-89"
+       xlink:href="#linearGradient4750-9-8-2-931"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-931">
+      <stop
+         id="stop10899"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10901"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10903"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-636">
+      <stop
+         id="stop10907"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10909"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10911"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17678-2-227"
+       xlink:href="#linearGradient4750-9-8-2-759"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-759">
+      <stop
+         id="stop10915"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10917"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10919"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17676-4-692"
+       xlink:href="#linearGradient4750-9-8-2-110"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-110">
+      <stop
+         id="stop10923"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10925"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10927"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-954">
+      <stop
+         id="stop10931"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10933"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10935"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126-4-3-5-840">
+      <stop
+         id="stop10939"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10941"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3962-8-1-1-87-3">
+      <stop
+         id="stop10595-7"
+         offset="0.0000000"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10597-4"
+         offset="0.15517241"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10599-3"
+         offset="0.75000000"
+         style="stop-color:#6b6b6b;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10601-8"
+         offset="1.0000000"
+         style="stop-color:#474747;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17680-4-934-6"
+       xlink:href="#linearGradient4750-9-8-2-440-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-440-8">
+      <stop
+         id="stop10611-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10613-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10615-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17604-1-898-9"
+       xlink:href="#linearGradient4750-9-8-2-661-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-661-7">
+      <stop
+         id="stop10619-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10621-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10623-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17602-6-494-2"
+       xlink:href="#linearGradient4750-9-8-2-242-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-242-8">
+      <stop
+         id="stop10627-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10629-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10631-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-94-1">
+      <stop
+         id="stop10635-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10637-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10639-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17610-5-69-1"
+       xlink:href="#linearGradient4750-9-8-2-119-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-119-2">
+      <stop
+         id="stop10643-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10645-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10647-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17608-7-181-8"
+       xlink:href="#linearGradient4750-9-8-2-957-6"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-957-6">
+      <stop
+         id="stop10651-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10653-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10655-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-181-9">
+      <stop
+         id="stop10659-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10661-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10663-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17616-1-513-1"
+       xlink:href="#linearGradient4750-9-8-2-667-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-667-8">
+      <stop
+         id="stop10667-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10669-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10671-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17614-8-56-9"
+       xlink:href="#linearGradient4750-9-8-2-376-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-376-7">
+      <stop
+         id="stop10675-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10677-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10679-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-417-2">
+      <stop
+         id="stop10683-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10685-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10687-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17622-2-276-9"
+       xlink:href="#linearGradient4750-9-8-2-288-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-288-1">
+      <stop
+         id="stop10691-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10693-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10695-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17620-7-59-5"
+       xlink:href="#linearGradient4750-9-8-2-877-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-877-3">
+      <stop
+         id="stop10699-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10701-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10703-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-841-8">
+      <stop
+         id="stop10707-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10709-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10711-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17628-4-136-2"
+       xlink:href="#linearGradient4750-9-8-2-848-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-848-2">
+      <stop
+         id="stop10715-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10717-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10719-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17626-3-710-9"
+       xlink:href="#linearGradient4750-9-8-2-502-6"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-502-6">
+      <stop
+         id="stop10723-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10725-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10727-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-627-5">
+      <stop
+         id="stop10731-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10733-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10735-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17634-2-59-2"
+       xlink:href="#linearGradient4750-9-8-2-585-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-585-5">
+      <stop
+         id="stop10739-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10741-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10743-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17632-3-677-9"
+       xlink:href="#linearGradient4750-9-8-2-866-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-866-3">
+      <stop
+         id="stop10747-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10749-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10751-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-974-9">
+      <stop
+         id="stop10755-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10757-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10759-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17640-4-736-3"
+       xlink:href="#linearGradient4750-9-8-2-828-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-828-5">
+      <stop
+         id="stop10763-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10765-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10767-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17638-3-543-5"
+       xlink:href="#linearGradient4750-9-8-2-755-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-755-8">
+      <stop
+         id="stop10771-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10773-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10775-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-702-1">
+      <stop
+         id="stop10779-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10781-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10783-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17646-7-613-3"
+       xlink:href="#linearGradient4750-9-8-2-269-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-269-3">
+      <stop
+         id="stop10787-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10789-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10791-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17644-4-744-2"
+       xlink:href="#linearGradient4750-9-8-2-622-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-622-8">
+      <stop
+         id="stop10795-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10797-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10799-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-878-1">
+      <stop
+         id="stop10803-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10805-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10807-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17656-7-261-1"
+       xlink:href="#linearGradient4750-9-8-2-800-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-800-4">
+      <stop
+         id="stop10811-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10813-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10815-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17650-7-582-1"
+       xlink:href="#linearGradient4750-9-8-2-24-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-24-5">
+      <stop
+         id="stop10819-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10821-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10823-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-456-9">
+      <stop
+         id="stop10827-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10829-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10831-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17654-3-751-4"
+       xlink:href="#linearGradient4750-9-8-2-236-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-236-4">
+      <stop
+         id="stop10835-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10837-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10839-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-370-3">
+      <stop
+         id="stop10843-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10845-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10847-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17666-9-489-8"
+       xlink:href="#linearGradient4750-9-8-2-525-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-525-7">
+      <stop
+         id="stop10851-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10853-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10855-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17660-8-76-2"
+       xlink:href="#linearGradient4750-9-8-2-643-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-643-5">
+      <stop
+         id="stop10859-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10861-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10863-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-539-4">
+      <stop
+         id="stop10867-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10869-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10871-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17664-5-693-3"
+       xlink:href="#linearGradient4750-9-8-2-675-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-675-0">
+      <stop
+         id="stop10875-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10877-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10879-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-223-3">
+      <stop
+         id="stop10883-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10885-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10887-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17672-8-943-2"
+       xlink:href="#linearGradient4750-9-8-2-349-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-349-5">
+      <stop
+         id="stop10891-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10893-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10895-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17670-6-89-7"
+       xlink:href="#linearGradient4750-9-8-2-931-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-931-2">
+      <stop
+         id="stop10899-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10901-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10903-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-636-4">
+      <stop
+         id="stop10907-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10909-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10911-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17678-2-227-1"
+       xlink:href="#linearGradient4750-9-8-2-759-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-759-3">
+      <stop
+         id="stop10915-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10917-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10919-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17676-4-692-5"
+       xlink:href="#linearGradient4750-9-8-2-110-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-110-1">
+      <stop
+         id="stop10923-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10925-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10927-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-954-4">
+      <stop
+         id="stop10931-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10933-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10935-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126-4-3-5-840-4">
+      <stop
+         id="stop10939-0"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10941-0"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3962-8-1-1-87-4">
+      <stop
+         id="stop10595-2"
+         offset="0.0000000"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10597-7"
+         offset="0.15517241"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10599-9"
+         offset="0.75000000"
+         style="stop-color:#6b6b6b;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10601-2"
+         offset="1.0000000"
+         style="stop-color:#474747;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17680-4-934-5"
+       xlink:href="#linearGradient4750-9-8-2-440-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-440-7">
+      <stop
+         id="stop10611-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10613-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10615-83"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17604-1-898-2"
+       xlink:href="#linearGradient4750-9-8-2-661-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-661-4">
+      <stop
+         id="stop10619-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10621-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10623-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17602-6-494-9"
+       xlink:href="#linearGradient4750-9-8-2-242-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-242-5">
+      <stop
+         id="stop10627-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10629-06"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10631-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-94-3">
+      <stop
+         id="stop10635-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10637-89"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10639-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17610-5-69-3"
+       xlink:href="#linearGradient4750-9-8-2-119-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-119-4">
+      <stop
+         id="stop10643-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10645-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10647-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17608-7-181-3"
+       xlink:href="#linearGradient4750-9-8-2-957-65"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-957-65">
+      <stop
+         id="stop10651-28"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10653-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10655-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-181-5">
+      <stop
+         id="stop10659-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10661-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10663-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17616-1-513-17"
+       xlink:href="#linearGradient4750-9-8-2-667-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-667-4">
+      <stop
+         id="stop10667-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10669-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10671-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17614-8-56-6"
+       xlink:href="#linearGradient4750-9-8-2-376-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-376-3">
+      <stop
+         id="stop10675-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10677-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10679-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-417-8">
+      <stop
+         id="stop10683-07"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10685-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10687-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17622-2-276-5"
+       xlink:href="#linearGradient4750-9-8-2-288-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-288-9">
+      <stop
+         id="stop10691-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10693-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10695-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17620-7-59-50"
+       xlink:href="#linearGradient4750-9-8-2-877-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-877-7">
+      <stop
+         id="stop10699-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10701-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10703-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-841-4">
+      <stop
+         id="stop10707-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10709-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10711-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17628-4-136-8"
+       xlink:href="#linearGradient4750-9-8-2-848-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-848-5">
+      <stop
+         id="stop10715-92"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10717-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10719-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17626-3-710-1"
+       xlink:href="#linearGradient4750-9-8-2-502-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-502-3">
+      <stop
+         id="stop10723-95"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10725-82"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10727-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-627-6">
+      <stop
+         id="stop10731-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10733-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10735-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17634-2-59-1"
+       xlink:href="#linearGradient4750-9-8-2-585-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-585-9">
+      <stop
+         id="stop10739-03"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10741-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10743-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17632-3-677-7"
+       xlink:href="#linearGradient4750-9-8-2-866-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-866-5">
+      <stop
+         id="stop10747-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10749-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10751-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-974-1">
+      <stop
+         id="stop10755-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10757-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10759-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17640-4-736-8"
+       xlink:href="#linearGradient4750-9-8-2-828-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-828-7">
+      <stop
+         id="stop10763-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10765-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10767-68"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17638-3-543-0"
+       xlink:href="#linearGradient4750-9-8-2-755-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-755-7">
+      <stop
+         id="stop10771-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10773-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10775-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-702-3">
+      <stop
+         id="stop10779-63"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10781-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10783-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17646-7-613-9"
+       xlink:href="#linearGradient4750-9-8-2-269-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-269-0">
+      <stop
+         id="stop10787-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10789-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10791-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17644-4-744-3"
+       xlink:href="#linearGradient4750-9-8-2-622-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-622-1">
+      <stop
+         id="stop10795-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10797-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10799-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-878-5">
+      <stop
+         id="stop10803-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10805-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10807-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17656-7-261-2"
+       xlink:href="#linearGradient4750-9-8-2-800-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-800-8">
+      <stop
+         id="stop10811-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10813-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10815-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17650-7-582-14"
+       xlink:href="#linearGradient4750-9-8-2-24-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-24-3">
+      <stop
+         id="stop10819-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10821-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10823-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-456-8">
+      <stop
+         id="stop10827-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10829-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10831-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17654-3-751-5"
+       xlink:href="#linearGradient4750-9-8-2-236-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-236-9">
+      <stop
+         id="stop10835-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10837-50"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10839-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-370-8">
+      <stop
+         id="stop10843-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10845-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10847-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17666-9-489-2"
+       xlink:href="#linearGradient4750-9-8-2-525-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-525-2">
+      <stop
+         id="stop10851-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10853-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10855-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17660-8-76-3"
+       xlink:href="#linearGradient4750-9-8-2-643-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-643-1">
+      <stop
+         id="stop10859-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10861-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10863-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-539-9">
+      <stop
+         id="stop10867-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10869-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10871-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17664-5-693-37"
+       xlink:href="#linearGradient4750-9-8-2-675-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-675-8">
+      <stop
+         id="stop10875-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10877-79"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10879-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-223-1">
+      <stop
+         id="stop10883-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10885-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10887-80"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17672-8-943-1"
+       xlink:href="#linearGradient4750-9-8-2-349-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-349-8">
+      <stop
+         id="stop10891-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10893-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10895-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17670-6-89-0"
+       xlink:href="#linearGradient4750-9-8-2-931-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-931-9">
+      <stop
+         id="stop10899-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10901-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10903-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-636-7">
+      <stop
+         id="stop10907-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10909-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10911-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17678-2-227-6"
+       xlink:href="#linearGradient4750-9-8-2-759-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-759-5">
+      <stop
+         id="stop10915-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10917-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10919-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17676-4-692-4"
+       xlink:href="#linearGradient4750-9-8-2-110-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-110-8">
+      <stop
+         id="stop10923-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10925-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10927-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-954-5">
+      <stop
+         id="stop10931-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10933-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10935-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126-4-3-5-840-5">
+      <stop
+         id="stop10939-1"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10941-9"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3962-8-1-1-87-4-9">
+      <stop
+         id="stop10595-2-3"
+         offset="0.0000000"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10597-7-8"
+         offset="0.15517241"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10599-9-1"
+         offset="0.75000000"
+         style="stop-color:#6b6b6b;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10601-2-0"
+         offset="1.0000000"
+         style="stop-color:#474747;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17680-4-934-5-8"
+       xlink:href="#linearGradient4750-9-8-2-440-7-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-440-7-0">
+      <stop
+         id="stop10611-8-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10613-5-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10615-83-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17604-1-898-2-1"
+       xlink:href="#linearGradient4750-9-8-2-661-4-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-661-4-3">
+      <stop
+         id="stop10619-1-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10621-1-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10623-5-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17602-6-494-9-8"
+       xlink:href="#linearGradient4750-9-8-2-242-5-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-242-5-5">
+      <stop
+         id="stop10627-1-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10629-06-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10631-4-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-94-3-9">
+      <stop
+         id="stop10635-0-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10637-89-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10639-1-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17610-5-69-3-6"
+       xlink:href="#linearGradient4750-9-8-2-119-4-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-119-4-9">
+      <stop
+         id="stop10643-7-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10645-4-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10647-6-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17608-7-181-3-4"
+       xlink:href="#linearGradient4750-9-8-2-957-65-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-957-65-1">
+      <stop
+         id="stop10651-28-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10653-1-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10655-0-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-181-5-6">
+      <stop
+         id="stop10659-5-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10661-2-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10663-2-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17616-1-513-17-4"
+       xlink:href="#linearGradient4750-9-8-2-667-4-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-667-4-0">
+      <stop
+         id="stop10667-8-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10669-2-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10671-3-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17614-8-56-6-1"
+       xlink:href="#linearGradient4750-9-8-2-376-3-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-376-3-4">
+      <stop
+         id="stop10675-0-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10677-3-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10679-5-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-417-8-4">
+      <stop
+         id="stop10683-07-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10685-2-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10687-2-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17622-2-276-5-3"
+       xlink:href="#linearGradient4750-9-8-2-288-9-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-288-9-1">
+      <stop
+         id="stop10691-1-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10693-0-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10695-8-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17620-7-59-50-2"
+       xlink:href="#linearGradient4750-9-8-2-877-7-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-877-7-7">
+      <stop
+         id="stop10699-9-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10701-0-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10703-5-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-841-4-0">
+      <stop
+         id="stop10707-1-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10709-0-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10711-4-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17628-4-136-8-6"
+       xlink:href="#linearGradient4750-9-8-2-848-5-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-848-5-0">
+      <stop
+         id="stop10715-92-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10717-5-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10719-4-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17626-3-710-1-4"
+       xlink:href="#linearGradient4750-9-8-2-502-3-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-502-3-5">
+      <stop
+         id="stop10723-95-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10725-82-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10727-7-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-627-6-1">
+      <stop
+         id="stop10731-1-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10733-7-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10735-7-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17634-2-59-1-2"
+       xlink:href="#linearGradient4750-9-8-2-585-9-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-585-9-4">
+      <stop
+         id="stop10739-03-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10741-4-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10743-1-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17632-3-677-7-9"
+       xlink:href="#linearGradient4750-9-8-2-866-5-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-866-5-8">
+      <stop
+         id="stop10747-3-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10749-3-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10751-2-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-974-1-8">
+      <stop
+         id="stop10755-2-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10757-9-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10759-0-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17640-4-736-8-3"
+       xlink:href="#linearGradient4750-9-8-2-828-7-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-828-7-8">
+      <stop
+         id="stop10763-4-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10765-5-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10767-68-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17638-3-543-0-7"
+       xlink:href="#linearGradient4750-9-8-2-755-7-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-755-7-5">
+      <stop
+         id="stop10771-7-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10773-4-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10775-3-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-702-3-8">
+      <stop
+         id="stop10779-63-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10781-0-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10783-1-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17646-7-613-9-8"
+       xlink:href="#linearGradient4750-9-8-2-269-0-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-269-0-9">
+      <stop
+         id="stop10787-4-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10789-2-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10791-9-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17644-4-744-3-0"
+       xlink:href="#linearGradient4750-9-8-2-622-1-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-622-1-5">
+      <stop
+         id="stop10795-4-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10797-8-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10799-2-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-878-5-7">
+      <stop
+         id="stop10803-5-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10805-9-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10807-3-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17656-7-261-2-1"
+       xlink:href="#linearGradient4750-9-8-2-800-8-6"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-800-8-6">
+      <stop
+         id="stop10811-7-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10813-4-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10815-8-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17650-7-582-14-8"
+       xlink:href="#linearGradient4750-9-8-2-24-3-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-24-3-9">
+      <stop
+         id="stop10819-5-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10821-5-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10823-2-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-456-8-2">
+      <stop
+         id="stop10827-9-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10829-2-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10831-9-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17654-3-751-5-1"
+       xlink:href="#linearGradient4750-9-8-2-236-9-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-236-9-4">
+      <stop
+         id="stop10835-4-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10837-50-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10839-5-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-370-8-8">
+      <stop
+         id="stop10843-0-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10845-1-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10847-3-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17666-9-489-2-5"
+       xlink:href="#linearGradient4750-9-8-2-525-2-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-525-2-5">
+      <stop
+         id="stop10851-2-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10853-7-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10855-0-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17660-8-76-3-8"
+       xlink:href="#linearGradient4750-9-8-2-643-1-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-643-1-4">
+      <stop
+         id="stop10859-3-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10861-3-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10863-7-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-539-9-2">
+      <stop
+         id="stop10867-5-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10869-5-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10871-8-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17664-5-693-37-9"
+       xlink:href="#linearGradient4750-9-8-2-675-8-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-675-8-0">
+      <stop
+         id="stop10875-3-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10877-79-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10879-3-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-223-1-0">
+      <stop
+         id="stop10883-8-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10885-2-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10887-80-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17672-8-943-1-8"
+       xlink:href="#linearGradient4750-9-8-2-349-8-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-349-8-3">
+      <stop
+         id="stop10891-4-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10893-8-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10895-6-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17670-6-89-0-1"
+       xlink:href="#linearGradient4750-9-8-2-931-9-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-931-9-9">
+      <stop
+         id="stop10899-3-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10901-0-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10903-0-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-636-7-7">
+      <stop
+         id="stop10907-6-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10909-3-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10911-5-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17678-2-227-6-8"
+       xlink:href="#linearGradient4750-9-8-2-759-5-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-759-5-8">
+      <stop
+         id="stop10915-8-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10917-3-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10919-9-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17676-4-692-4-3"
+       xlink:href="#linearGradient4750-9-8-2-110-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-110-8-2">
+      <stop
+         id="stop10923-3-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10925-9-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10927-7-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-954-5-2">
+      <stop
+         id="stop10931-8-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10933-6-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10935-1-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126-4-3-5-840-5-3">
+      <stop
+         id="stop10939-1-1"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10941-9-1"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3962-8-1-1-87-4-9-2">
+      <stop
+         id="stop10595-2-3-7"
+         offset="0.0000000"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10597-7-8-7"
+         offset="0.15517241"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10599-9-1-0"
+         offset="0.75000000"
+         style="stop-color:#6b6b6b;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10601-2-0-2"
+         offset="1.0000000"
+         style="stop-color:#474747;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17680-4-934-5-8-7"
+       xlink:href="#linearGradient4750-9-8-2-440-7-0-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-440-7-0-3">
+      <stop
+         id="stop10611-8-1-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10613-5-5-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10615-83-4-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17604-1-898-2-1-7"
+       xlink:href="#linearGradient4750-9-8-2-661-4-3-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-661-4-3-2">
+      <stop
+         id="stop10619-1-7-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10621-1-3-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10623-5-5-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17602-6-494-9-8-6"
+       xlink:href="#linearGradient4750-9-8-2-242-5-5-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-242-5-5-7">
+      <stop
+         id="stop10627-1-6-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10629-06-9-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10631-4-0-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-94-3-9-3">
+      <stop
+         id="stop10635-0-3-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10637-89-6-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10639-1-0-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17610-5-69-3-6-2"
+       xlink:href="#linearGradient4750-9-8-2-119-4-9-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-119-4-9-0">
+      <stop
+         id="stop10643-7-7-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10645-4-8-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10647-6-9-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17608-7-181-3-4-1"
+       xlink:href="#linearGradient4750-9-8-2-957-65-1-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-957-65-1-8">
+      <stop
+         id="stop10651-28-5-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10653-1-6-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10655-0-6-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-181-5-6-1">
+      <stop
+         id="stop10659-5-6-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10661-2-7-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10663-2-1-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17616-1-513-17-4-8"
+       xlink:href="#linearGradient4750-9-8-2-667-4-0-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-667-4-0-8">
+      <stop
+         id="stop10667-8-6-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10669-2-1-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10671-3-2-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17614-8-56-6-1-7"
+       xlink:href="#linearGradient4750-9-8-2-376-3-4-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-376-3-4-8">
+      <stop
+         id="stop10675-0-9-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10677-3-5-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10679-5-2-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-417-8-4-6">
+      <stop
+         id="stop10683-07-1-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10685-2-5-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10687-2-2-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17622-2-276-5-3-0"
+       xlink:href="#linearGradient4750-9-8-2-288-9-1-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-288-9-1-8">
+      <stop
+         id="stop10691-1-6-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10693-0-8-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10695-8-8-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17620-7-59-50-2-0"
+       xlink:href="#linearGradient4750-9-8-2-877-7-7-6"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-877-7-7-6">
+      <stop
+         id="stop10699-9-7-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10701-0-1-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10703-5-2-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-841-4-0-2">
+      <stop
+         id="stop10707-1-4-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10709-0-9-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10711-4-4-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17628-4-136-8-6-9"
+       xlink:href="#linearGradient4750-9-8-2-848-5-0-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-848-5-0-4">
+      <stop
+         id="stop10715-92-3-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10717-5-6-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10719-4-2-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17626-3-710-1-4-7"
+       xlink:href="#linearGradient4750-9-8-2-502-3-5-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-502-3-5-2">
+      <stop
+         id="stop10723-95-8-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10725-82-8-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10727-7-1-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-627-6-1-3">
+      <stop
+         id="stop10731-1-4-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10733-7-9-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10735-7-8-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17634-2-59-1-2-9"
+       xlink:href="#linearGradient4750-9-8-2-585-9-4-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-585-9-4-0">
+      <stop
+         id="stop10739-03-5-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10741-4-2-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10743-1-9-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17632-3-677-7-9-1"
+       xlink:href="#linearGradient4750-9-8-2-866-5-8-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-866-5-8-4">
+      <stop
+         id="stop10747-3-3-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10749-3-8-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10751-2-6-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-974-1-8-0">
+      <stop
+         id="stop10755-2-6-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10757-9-6-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10759-0-2-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17640-4-736-8-3-8"
+       xlink:href="#linearGradient4750-9-8-2-828-7-8-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-828-7-8-1">
+      <stop
+         id="stop10763-4-2-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10765-5-6-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10767-68-2-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17638-3-543-0-7-9"
+       xlink:href="#linearGradient4750-9-8-2-755-7-5-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-755-7-5-5">
+      <stop
+         id="stop10771-7-7-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10773-4-8-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10775-3-2-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-702-3-8-2">
+      <stop
+         id="stop10779-63-0-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10781-0-2-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10783-1-0-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17646-7-613-9-8-0"
+       xlink:href="#linearGradient4750-9-8-2-269-0-9-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-269-0-9-7">
+      <stop
+         id="stop10787-4-2-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10789-2-8-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10791-9-2-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17644-4-744-3-0-5"
+       xlink:href="#linearGradient4750-9-8-2-622-1-5-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-622-1-5-1">
+      <stop
+         id="stop10795-4-5-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10797-8-2-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10799-2-7-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-878-5-7-9">
+      <stop
+         id="stop10803-5-8-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10805-9-7-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10807-3-8-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17656-7-261-2-1-3"
+       xlink:href="#linearGradient4750-9-8-2-800-8-6-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-800-8-6-0">
+      <stop
+         id="stop10811-7-0-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10813-4-9-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10815-8-5-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17650-7-582-14-8-0"
+       xlink:href="#linearGradient4750-9-8-2-24-3-9-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-24-3-9-2">
+      <stop
+         id="stop10819-5-0-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10821-5-0-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10823-2-0-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-456-8-2-9">
+      <stop
+         id="stop10827-9-5-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10829-2-5-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10831-9-2-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17654-3-751-5-1-0"
+       xlink:href="#linearGradient4750-9-8-2-236-9-4-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-236-9-4-8">
+      <stop
+         id="stop10835-4-8-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10837-50-6-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10839-5-4-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-370-8-8-0">
+      <stop
+         id="stop10843-0-9-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10845-1-8-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10847-3-3-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17666-9-489-2-5-2"
+       xlink:href="#linearGradient4750-9-8-2-525-2-5-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-525-2-5-1">
+      <stop
+         id="stop10851-2-1-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10853-7-5-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10855-0-5-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17660-8-76-3-8-0"
+       xlink:href="#linearGradient4750-9-8-2-643-1-4-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-643-1-4-3">
+      <stop
+         id="stop10859-3-0-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10861-3-5-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10863-7-4-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-539-9-2-1">
+      <stop
+         id="stop10867-5-1-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10869-5-4-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10871-8-9-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17664-5-693-37-9-6"
+       xlink:href="#linearGradient4750-9-8-2-675-8-0-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-675-8-0-0">
+      <stop
+         id="stop10875-3-3-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10877-79-0-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10879-3-3-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-223-1-0-0">
+      <stop
+         id="stop10883-8-7-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10885-2-6-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10887-80-7-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17672-8-943-1-8-4"
+       xlink:href="#linearGradient4750-9-8-2-349-8-3-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-349-8-3-0">
+      <stop
+         id="stop10891-4-6-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10893-8-4-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10895-6-4-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17670-6-89-0-1-1"
+       xlink:href="#linearGradient4750-9-8-2-931-9-9-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-931-9-9-2">
+      <stop
+         id="stop10899-3-5-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10901-0-5-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10903-0-7-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-636-7-7-1">
+      <stop
+         id="stop10907-6-3-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10909-3-4-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10911-5-0-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17678-2-227-6-8-8"
+       xlink:href="#linearGradient4750-9-8-2-759-5-8-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-759-5-8-8">
+      <stop
+         id="stop10915-8-1-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10917-3-5-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10919-9-2-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17676-4-692-4-3-0"
+       xlink:href="#linearGradient4750-9-8-2-110-8-2-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-110-8-2-7">
+      <stop
+         id="stop10923-3-4-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10925-9-6-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10927-7-6-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-954-5-2-6">
+      <stop
+         id="stop10931-8-9-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10933-6-0-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10935-1-4-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126-4-3-5-840-5-3-3">
+      <stop
+         id="stop10939-1-1-8"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10941-9-1-2"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3962-8-1-1-87-4-9-2-2">
+      <stop
+         id="stop10595-2-3-7-6"
+         offset="0.0000000"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10597-7-8-7-1"
+         offset="0.15517241"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10599-9-1-0-7"
+         offset="0.75000000"
+         style="stop-color:#6b6b6b;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10601-2-0-2-0"
+         offset="1.0000000"
+         style="stop-color:#474747;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17680-4-934-5-8-7-9"
+       xlink:href="#linearGradient4750-9-8-2-440-7-0-3-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-440-7-0-3-0">
+      <stop
+         id="stop10611-8-1-9-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10613-5-5-5-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10615-83-4-9-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17604-1-898-2-1-7-3"
+       xlink:href="#linearGradient4750-9-8-2-661-4-3-2-6"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-661-4-3-2-6">
+      <stop
+         id="stop10619-1-7-0-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10621-1-3-2-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10623-5-5-8-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17602-6-494-9-8-6-1"
+       xlink:href="#linearGradient4750-9-8-2-242-5-5-7-6"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-242-5-5-7-6">
+      <stop
+         id="stop10627-1-6-0-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10629-06-9-8-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10631-4-0-1-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-94-3-9-3-9">
+      <stop
+         id="stop10635-0-3-0-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10637-89-6-3-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10639-1-0-6-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17610-5-69-3-6-2-9"
+       xlink:href="#linearGradient4750-9-8-2-119-4-9-0-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-119-4-9-0-8">
+      <stop
+         id="stop10643-7-7-2-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10645-4-8-8-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10647-6-9-4-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17608-7-181-3-4-1-4"
+       xlink:href="#linearGradient4750-9-8-2-957-65-1-8-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-957-65-1-8-8">
+      <stop
+         id="stop10651-28-5-3-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10653-1-6-7-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10655-0-6-5-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-181-5-6-1-0">
+      <stop
+         id="stop10659-5-6-7-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10661-2-7-0-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10663-2-1-4-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17616-1-513-17-4-8-9"
+       xlink:href="#linearGradient4750-9-8-2-667-4-0-8-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-667-4-0-8-0">
+      <stop
+         id="stop10667-8-6-1-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10669-2-1-3-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10671-3-2-6-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17614-8-56-6-1-7-5"
+       xlink:href="#linearGradient4750-9-8-2-376-3-4-8-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-376-3-4-8-5">
+      <stop
+         id="stop10675-0-9-9-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10677-3-5-5-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10679-5-2-5-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-417-8-4-6-7">
+      <stop
+         id="stop10683-07-1-6-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10685-2-5-3-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10687-2-2-0-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17622-2-276-5-3-0-0"
+       xlink:href="#linearGradient4750-9-8-2-288-9-1-8-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-288-9-1-8-7">
+      <stop
+         id="stop10691-1-6-8-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10693-0-8-2-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10695-8-8-3-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17620-7-59-50-2-0-1"
+       xlink:href="#linearGradient4750-9-8-2-877-7-7-6-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-877-7-7-6-8">
+      <stop
+         id="stop10699-9-7-5-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10701-0-1-0-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10703-5-2-9-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-841-4-0-2-4">
+      <stop
+         id="stop10707-1-4-2-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10709-0-9-8-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10711-4-4-2-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17628-4-136-8-6-9-2"
+       xlink:href="#linearGradient4750-9-8-2-848-5-0-4-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-848-5-0-4-3">
+      <stop
+         id="stop10715-92-3-4-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10717-5-6-8-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10719-4-2-2-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17626-3-710-1-4-7-8"
+       xlink:href="#linearGradient4750-9-8-2-502-3-5-2-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-502-3-5-2-8">
+      <stop
+         id="stop10723-95-8-5-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10725-82-8-8-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10727-7-1-4-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-627-6-1-3-3">
+      <stop
+         id="stop10731-1-4-9-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10733-7-9-5-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10735-7-8-1-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17634-2-59-1-2-9-3"
+       xlink:href="#linearGradient4750-9-8-2-585-9-4-0-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-585-9-4-0-7">
+      <stop
+         id="stop10739-03-5-2-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10741-4-2-8-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10743-1-9-3-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17632-3-677-7-9-1-5"
+       xlink:href="#linearGradient4750-9-8-2-866-5-8-4-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-866-5-8-4-3">
+      <stop
+         id="stop10747-3-3-3-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10749-3-8-1-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10751-2-6-0-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-974-1-8-0-1">
+      <stop
+         id="stop10755-2-6-7-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10757-9-6-9-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10759-0-2-0-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17640-4-736-8-3-8-6"
+       xlink:href="#linearGradient4750-9-8-2-828-7-8-1-6"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-828-7-8-1-6">
+      <stop
+         id="stop10763-4-2-4-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10765-5-6-0-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10767-68-2-7-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17638-3-543-0-7-9-0"
+       xlink:href="#linearGradient4750-9-8-2-755-7-5-5-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-755-7-5-5-8">
+      <stop
+         id="stop10771-7-7-3-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10773-4-8-8-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10775-3-2-2-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-702-3-8-2-6">
+      <stop
+         id="stop10779-63-0-1-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10781-0-2-0-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10783-1-0-4-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17646-7-613-9-8-0-1"
+       xlink:href="#linearGradient4750-9-8-2-269-0-9-7-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-269-0-9-7-3">
+      <stop
+         id="stop10787-4-2-5-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10789-2-8-9-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10791-9-2-0-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17644-4-744-3-0-5-3"
+       xlink:href="#linearGradient4750-9-8-2-622-1-5-1-6"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-622-1-5-1-6">
+      <stop
+         id="stop10795-4-5-2-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10797-8-2-0-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10799-2-7-9-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-878-5-7-9-5">
+      <stop
+         id="stop10803-5-8-1-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10805-9-7-7-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10807-3-8-3-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17656-7-261-2-1-3-5"
+       xlink:href="#linearGradient4750-9-8-2-800-8-6-0-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-800-8-6-0-1">
+      <stop
+         id="stop10811-7-0-7-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10813-4-9-6-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10815-8-5-6-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17650-7-582-14-8-0-2"
+       xlink:href="#linearGradient4750-9-8-2-24-3-9-2-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-24-3-9-2-2">
+      <stop
+         id="stop10819-5-0-8-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10821-5-0-9-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10823-2-0-8-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-456-8-2-9-5">
+      <stop
+         id="stop10827-9-5-9-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10829-2-5-4-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10831-9-2-2-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17654-3-751-5-1-0-7"
+       xlink:href="#linearGradient4750-9-8-2-236-9-4-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-236-9-4-8-2">
+      <stop
+         id="stop10835-4-8-7-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10837-50-6-8-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10839-5-4-7-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-370-8-8-0-8">
+      <stop
+         id="stop10843-0-9-7-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10845-1-8-6-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10847-3-3-4-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17666-9-489-2-5-2-4"
+       xlink:href="#linearGradient4750-9-8-2-525-2-5-1-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-525-2-5-1-3">
+      <stop
+         id="stop10851-2-1-9-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10853-7-5-1-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10855-0-5-6-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17660-8-76-3-8-0-2"
+       xlink:href="#linearGradient4750-9-8-2-643-1-4-3-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-643-1-4-3-0">
+      <stop
+         id="stop10859-3-0-3-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10861-3-5-6-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10863-7-4-2-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-539-9-2-1-8">
+      <stop
+         id="stop10867-5-1-4-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10869-5-4-3-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10871-8-9-2-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17664-5-693-37-9-6-6"
+       xlink:href="#linearGradient4750-9-8-2-675-8-0-0-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-675-8-0-0-5">
+      <stop
+         id="stop10875-3-3-5-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10877-79-0-4-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10879-3-3-9-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-223-1-0-0-2">
+      <stop
+         id="stop10883-8-7-8-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10885-2-6-2-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10887-80-7-7-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17672-8-943-1-8-4-2"
+       xlink:href="#linearGradient4750-9-8-2-349-8-3-0-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-349-8-3-0-2">
+      <stop
+         id="stop10891-4-6-7-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10893-8-4-6-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10895-6-4-0-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17670-6-89-0-1-1-7"
+       xlink:href="#linearGradient4750-9-8-2-931-9-9-2-4"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-931-9-9-2-4">
+      <stop
+         id="stop10899-3-5-9-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10901-0-5-3-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10903-0-7-8-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-636-7-7-1-9">
+      <stop
+         id="stop10907-6-3-5-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10909-3-4-6-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10911-5-0-6-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17678-2-227-6-8-8-9"
+       xlink:href="#linearGradient4750-9-8-2-759-5-8-8-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-759-5-8-8-9">
+      <stop
+         id="stop10915-8-1-9-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10917-3-5-8-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10919-9-2-7-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17676-4-692-4-3-0-1"
+       xlink:href="#linearGradient4750-9-8-2-110-8-2-7-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-110-8-2-7-2">
+      <stop
+         id="stop10923-3-4-9-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10925-9-6-1-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10927-7-6-5-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-954-5-2-6-2">
+      <stop
+         id="stop10931-8-9-3-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10933-6-0-9-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10935-1-4-4-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126-4-3-5-840-5-3-3-8">
+      <stop
+         id="stop10939-1-1-8-4"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10941-9-1-2-3"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-78"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-9" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-77"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-16" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-4-9-4-5"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-13"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-26" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-0"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-5" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-4-9-4-5-7"
+       effect="spiro" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5900-0-9-5"
+       id="linearGradient19063"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.5245056,0,0,0.48233328,376.84519,-134.22873)"
+       x1="-16.021391"
+       y1="76.362366"
+       x2="-16.021391"
+       y2="108.11002" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5900-2-2-7-5"
+       id="linearGradient19065"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.3268915,0,0,0.63288273,379.79539,-85.581831)"
+       x1="-16.021391"
+       y1="76.362366"
+       x2="-16.021391"
+       y2="108.11002" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5883"
+       id="linearGradient19067"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.3268915,0,0,-0.63288274,379.79539,91.269369)"
+       x1="-16.021328"
+       y1="124.2259"
+       x2="-16.021328"
+       y2="81.569756" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5542"
+       id="radialGradient19069"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.4231746,0,0,-1.0200611,3954.3265,-131.63447)"
+       cx="2509.4014"
+       cy="86.458908"
+       fx="2509.4014"
+       fy="86.458908"
+       r="480.99509" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5378"
+       id="radialGradient19071"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-0.0032427,1.3443917,-1.9632258,-0.00473528,-665.75147,-877.54323)"
+       cx="486.3223"
+       cy="-50.613247"
+       fx="486.3223"
+       fy="-50.613247"
+       r="33.140625" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5507"
+       id="radialGradient19073"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.8321034,0,0,-0.44989367,3047.2288,-316.26798)"
+       cx="1459.5582"
+       cy="-208.54828"
+       fx="1459.5582"
+       fy="-208.54828"
+       r="258.06482" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5378"
+       id="radialGradient19075"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(8.2939826e-7,-1.3399154,1.2273753,7.5973672e-7,-1074.5555,2981.7186)"
+       cx="1465.8906"
+       cy="1184.6857"
+       fx="1465.8906"
+       fy="1184.6857"
+       r="33.1562" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5378"
+       id="radialGradient19077"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.2711532,1.6299351e-6,-1.7113401e-6,1.3346393,-1225.2745,-563.93796)"
+       cx="513.125"
+       cy="1183.7839"
+       fx="513.125"
+       fy="1183.7839"
+       r="33.140625" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5458"
+       id="radialGradient19079"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(-1.8818786,-1.4896875e-7,3.95982e-7,-5.0023248,3143.5521,582.62699)"
+       cx="1467.7728"
+       cy="158.66927"
+       fx="1467.7728"
+       fy="158.66927"
+       r="136.5625" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5617"
+       id="linearGradient19081"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-1086.391,-167.35622)"
+       x1="1379.4375"
+       y1="52.28125"
+       x2="1157.5625"
+       y2="261.53125" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient16020"
+       id="linearGradient19083"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(-1086.391,-167.35622)"
+       x1="1375.422"
+       y1="-210.53049"
+       x2="663.89581"
+       y2="976.08313" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5664-4-3-6"
+       id="linearGradient19085"
+       gradientUnits="userSpaceOnUse"
+       x1="194.48981"
+       y1="625.30121"
+       x2="194.48981"
+       y2="695.09711" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19135"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19137"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19139"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19141"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19143"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19145"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19147"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19149"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19151"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19153"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19155"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19157"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19159"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19161"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19163"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19165"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19167"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19169"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19171"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19173"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19175"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19177"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19179"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19181"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19183"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19185"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9-8"
+       id="radialGradient19187"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12828-7"
+       id="radialGradient6017-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.177184,0,495.9268)"
+       cx="328.57144"
+       cy="602.7193"
+       fx="328.57144"
+       fy="602.7193"
+       r="147.14285" />
+    <linearGradient
+       id="linearGradient12828-7">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-4" />
+      <stop
+         id="stop12862-0"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-9" />
+    </linearGradient>
+    <radialGradient
+       r="147.14285"
+       fy="602.7193"
+       fx="328.57144"
+       cy="602.7193"
+       cx="328.57144"
+       gradientTransform="matrix(1,0,0,0.177184,0,495.9268)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient6035-8"
+       xlink:href="#linearGradient12828-7-8"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient12828-7-8">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-4-2" />
+      <stop
+         id="stop12862-0-4"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-9-5" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12828-1"
+       id="radialGradient6017-17"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.177184,0,495.9268)"
+       cx="328.57144"
+       cy="602.7193"
+       fx="328.57144"
+       fy="602.7193"
+       r="147.14285" />
+    <linearGradient
+       id="linearGradient12828-1">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-1" />
+      <stop
+         id="stop12862-5"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-2" />
+    </linearGradient>
+    <radialGradient
+       r="147.14285"
+       fy="602.7193"
+       fx="328.57144"
+       cy="602.7193"
+       cx="328.57144"
+       gradientTransform="matrix(1,0,0,0.177184,0,495.9268)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient6109-6"
+       xlink:href="#linearGradient12828-1-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient12828-1-1">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-1-4" />
+      <stop
+         id="stop12862-5-2"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-2-3" />
+    </linearGradient>
+    <radialGradient
+       r="147.14285"
+       fy="602.7193"
+       fx="328.57144"
+       cy="602.7193"
+       cx="328.57144"
+       gradientTransform="matrix(1,0,0,0.177184,0,495.9268)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient6146-2"
+       xlink:href="#linearGradient12828-1-1-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient12828-1-1-1">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-1-4-6" />
+      <stop
+         id="stop12862-5-2-8"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-2-3-5" />
+    </linearGradient>
+    <radialGradient
+       r="147.14285"
+       fy="602.7193"
+       fx="328.57144"
+       cy="602.7193"
+       cx="328.57144"
+       gradientTransform="matrix(1,0,0,0.177184,0,495.9268)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient6183-6"
+       xlink:href="#linearGradient12828-1-1-1-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient12828-1-1-1-1">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-1-4-6-8" />
+      <stop
+         id="stop12862-5-2-8-9"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-2-3-5-2" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5048">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050" />
+      <stop
+         id="stop5056"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient259">
+      <stop
+         style="stop-color:#fafafa;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop260" />
+      <stop
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop261" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient269">
+      <stop
+         style="stop-color:#a3a3a3;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop270" />
+      <stop
+         style="stop-color:#4c4c4c;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop271" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient15662">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop15664" />
+      <stop
+         style="stop-color:#f8f8f8;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop15666" />
+    </linearGradient>
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       fy="114.5684"
+       fx="20.892099"
+       r="5.256"
+       cy="114.5684"
+       cx="20.892099"
+       id="aigrd2">
+      <stop
+         id="stop15566"
+         style="stop-color:#F0F0F0"
+         offset="0" />
+      <stop
+         id="stop15568"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         offset="1.0000000" />
+    </radialGradient>
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       fy="64.567902"
+       fx="20.892099"
+       r="5.257"
+       cy="64.567902"
+       cx="20.892099"
+       id="aigrd3">
+      <stop
+         id="stop15573"
+         style="stop-color:#F0F0F0"
+         offset="0" />
+      <stop
+         id="stop15575"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         offset="1.0000000" />
+    </radialGradient>
+    <linearGradient
+       id="linearGradient3962">
+      <stop
+         id="stop3964"
+         offset="0.0000000"
+         style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4134"
+         offset="0.15517241"
+         style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4346"
+         offset="0.75000000"
+         style="stop-color:#4074ae;stop-opacity:1.0000000;" />
+      <stop
+         id="stop3966"
+         offset="1.0000000"
+         style="stop-color:#36486c;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7214"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient4750">
+      <stop
+         id="stop4752"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop4758"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4754"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7216"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7300">
+      <stop
+         id="stop7302"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7304"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7306"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7220"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7309">
+      <stop
+         id="stop7311"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7313"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7315"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7318">
+      <stop
+         id="stop7320"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7322"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7324"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7224"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7327">
+      <stop
+         id="stop7329"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7331"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7333"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7228"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7336">
+      <stop
+         id="stop7338"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7340"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7342"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7345">
+      <stop
+         id="stop7347"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7349"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7351"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7232"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7354">
+      <stop
+         id="stop7356"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7358"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7360"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7236"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7363">
+      <stop
+         id="stop7365"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7367"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7369"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7372">
+      <stop
+         id="stop7374"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7376"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7378"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7240"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7381">
+      <stop
+         id="stop7383"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7385"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7387"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7244"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7390">
+      <stop
+         id="stop7392"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7394"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7396"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7399">
+      <stop
+         id="stop7401"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7403"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7405"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7248"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7408">
+      <stop
+         id="stop7410"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7412"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7414"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7252"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7417">
+      <stop
+         id="stop7419"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7421"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7423"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7426">
+      <stop
+         id="stop7428"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7430"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7432"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7256"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7435">
+      <stop
+         id="stop7437"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7439"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7441"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7260"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7444">
+      <stop
+         id="stop7446"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7448"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7450"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7453">
+      <stop
+         id="stop7455"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7457"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7459"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7264"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7462">
+      <stop
+         id="stop7464"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7466"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7468"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7268"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7471">
+      <stop
+         id="stop7473"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7475"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7477"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7480">
+      <stop
+         id="stop7482"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7484"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7486"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7272"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7489">
+      <stop
+         id="stop7491-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7493"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7495"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7276"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7498">
+      <stop
+         id="stop7500"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7502"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7504"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7507">
+      <stop
+         id="stop7509"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7511"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7513"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7280"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7516">
+      <stop
+         id="stop7518"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7520"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7522"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7282"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7525">
+      <stop
+         id="stop7527"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7529"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7531"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7534">
+      <stop
+         id="stop7536"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7538"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7540"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7286"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7543">
+      <stop
+         id="stop7545"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7547"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7549"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7552">
+      <stop
+         id="stop7554"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7556"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7558"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7290"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7561">
+      <stop
+         id="stop7563"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7565"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7567"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7292"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7570">
+      <stop
+         id="stop7572"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7574"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7576"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7579">
+      <stop
+         id="stop7581"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7583"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7585"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7296"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7588">
+      <stop
+         id="stop7590"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7592"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7594"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7597">
+      <stop
+         id="stop7599"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7601"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7603"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7300"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7606">
+      <stop
+         id="stop7608"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7610"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7612"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7304"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7615">
+      <stop
+         id="stop7617"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7619"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7621"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7624">
+      <stop
+         id="stop7626"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7628"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7630"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7308"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7633">
+      <stop
+         id="stop7635"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7637"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7639"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient7312"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient7642">
+      <stop
+         id="stop7644"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7646"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7648"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7651">
+      <stop
+         id="stop7653"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7655"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop7657"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126">
+      <stop
+         id="stop4128"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4130"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-171"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-1" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-52"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-76" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-1"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient4228-3-3">
+      <stop
+         id="stop4230-2-8"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232-2-9"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244-6-4">
+      <stop
+         id="stop4246-8-4"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248-5-6"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184-6-6">
+      <stop
+         id="stop4186-1-6"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188-8-1"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274-4-7">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276-3-8" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278-1-8" />
+    </linearGradient>
+    <linearGradient
+       y2="11.780679"
+       x2="21.747974"
+       y1="31.964777"
+       x1="33.431175"
+       gradientUnits="userSpaceOnUse"
+       id="linearGradient8934"
+       xlink:href="#linearGradient2555-1-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient2555-1-9">
+      <stop
+         id="stop2557-3-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561-8-4" />
+      <stop
+         id="stop2563-7-0"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565-4-7" />
+      <stop
+         id="stop2559-2-6"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5048-7">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050-7" />
+      <stop
+         id="stop5056-8"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052-3" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4228">
+      <stop
+         id="stop4230"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244">
+      <stop
+         id="stop4246"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184">
+      <stop
+         id="stop4186"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274-7">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276-34" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278-9" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2555">
+      <stop
+         id="stop2557"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561" />
+      <stop
+         id="stop2563"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565" />
+      <stop
+         id="stop2559"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4228-3">
+      <stop
+         id="stop4230-2"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232-2"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244-6">
+      <stop
+         id="stop4246-8"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248-5"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184-6">
+      <stop
+         id="stop4186-1"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188-8"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274-4">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276-3" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278-1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2555-1">
+      <stop
+         id="stop2557-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561-8" />
+      <stop
+         id="stop2563-7"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565-4" />
+      <stop
+         id="stop2559-2"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4228-3-3-5">
+      <stop
+         id="stop4230-2-8-1"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232-2-9-0"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244-6-4-9">
+      <stop
+         id="stop4246-8-4-6"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248-5-6-8"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184-6-6-4">
+      <stop
+         id="stop4186-1-6-8"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188-8-1-4"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274-4-7-3">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276-3-8-3" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278-1-8-3" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2555-1-9-8">
+      <stop
+         id="stop2557-3-8-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561-8-4-0" />
+      <stop
+         id="stop2563-7-0-6"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565-4-7-8" />
+      <stop
+         id="stop2559-2-6-1"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12828-2">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-46" />
+      <stop
+         id="stop12862-1"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-8" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12001-1">
+      <stop
+         id="stop12003-1"
+         offset="0"
+         style="stop-color:#1b4a78;stop-opacity:1;" />
+      <stop
+         id="stop12005-9"
+         offset="1"
+         style="stop-color:#5dacd1;stop-opacity:1;" />
+    </linearGradient>
+    <filter
+       id="filter10150"
+       inkscape:label="filtro6"
+       color-interpolation-filters="sRGB">
+      <feColorMatrix
+         id="feColorMatrix10152"
+         type="hueRotate"
+         values="158.18181818181819" />
+    </filter>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-81"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-95" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-32"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-52" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-5"
+       effect="spiro" />
+    <filter
+       id="filter11294"
+       inkscape:label="Drop shadow"
+       width="1.5"
+       height="1.5"
+       x="-0.25"
+       y="-0.25"
+       color-interpolation-filters="sRGB">
+      <feGaussianBlur
+         id="feGaussianBlur11296"
+         in="SourceAlpha"
+         stdDeviation="2"
+         result="blur" />
+      <feColorMatrix
+         id="feColorMatrix11298"
+         result="bluralpha"
+         type="matrix"
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.4 0 " />
+      <feOffset
+         id="feOffset11300"
+         in="bluralpha"
+         dx="2"
+         dy="2"
+         result="offsetBlur" />
+      <feMerge
+         id="feMerge11302">
+        <feMergeNode
+           id="feMergeNode11304"
+           in="offsetBlur" />
+        <feMergeNode
+           id="feMergeNode11306"
+           in="SourceGraphic" />
+      </feMerge>
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       id="filter11294-6"
+       inkscape:label="Drop shadow"
+       width="1.5"
+       height="1.5"
+       x="-0.25"
+       y="-0.25">
+      <feGaussianBlur
+         id="feGaussianBlur11296-9"
+         in="SourceAlpha"
+         stdDeviation="2"
+         result="blur" />
+      <feColorMatrix
+         id="feColorMatrix11298-8"
+         result="bluralpha"
+         type="matrix"
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.4 0 " />
+      <feOffset
+         id="feOffset11300-2"
+         in="bluralpha"
+         dx="2"
+         dy="2"
+         result="offsetBlur" />
+      <feMerge
+         id="feMerge11302-5">
+        <feMergeNode
+           id="feMergeNode11304-5"
+           in="offsetBlur" />
+        <feMergeNode
+           id="feMergeNode11306-4"
+           in="SourceGraphic" />
+      </feMerge>
+    </filter>
+    <linearGradient
+       id="linearGradient6035-9">
+      <stop
+         id="stop6037-76"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop6039-9"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11588">
+      <stop
+         id="stop11590"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11592"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11595">
+      <stop
+         id="stop11597"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11599"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12828-6">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-5" />
+      <stop
+         id="stop12862-8"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-25" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12001-4">
+      <stop
+         id="stop12003-16"
+         offset="0"
+         style="stop-color:#1b4a78;stop-opacity:1;" />
+      <stop
+         id="stop12005-1"
+         offset="1"
+         style="stop-color:#5dacd1;stop-opacity:1;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-6"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-33" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-55"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-3" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-2"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient5048-5">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050-3" />
+      <stop
+         id="stop5056-6"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052-1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient259-9">
+      <stop
+         style="stop-color:#fafafa;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop260-1" />
+      <stop
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop261-5" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient269-3">
+      <stop
+         style="stop-color:#a3a3a3;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop270-6" />
+      <stop
+         style="stop-color:#4c4c4c;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop271-4" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient15662-2">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop15664-9" />
+      <stop
+         style="stop-color:#f8f8f8;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop15666-3" />
+    </linearGradient>
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       fy="114.5684"
+       fx="20.892099"
+       r="5.256"
+       cy="114.5684"
+       cx="20.892099"
+       id="aigrd2-4">
+      <stop
+         id="stop15566-0"
+         style="stop-color:#F0F0F0"
+         offset="0" />
+      <stop
+         id="stop15568-5"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         offset="1.0000000" />
+    </radialGradient>
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       fy="64.567902"
+       fx="20.892099"
+       r="5.257"
+       cy="64.567902"
+       cx="20.892099"
+       id="aigrd3-6">
+      <stop
+         id="stop15573-3"
+         style="stop-color:#F0F0F0"
+         offset="0" />
+      <stop
+         id="stop15575-4"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         offset="1.0000000" />
+    </radialGradient>
+    <linearGradient
+       id="linearGradient3962-8">
+      <stop
+         id="stop3964-1"
+         offset="0.0000000"
+         style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4134-2"
+         offset="0.15517241"
+         style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4346-5"
+         offset="0.75000000"
+         style="stop-color:#4074ae;stop-opacity:1.0000000;" />
+      <stop
+         id="stop3966-7"
+         offset="1.0000000"
+         style="stop-color:#36486c;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7214-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient4750-2">
+      <stop
+         id="stop4752-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop4758-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4754-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7216-7"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11671">
+      <stop
+         id="stop11673"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11675"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11677"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7220-7"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11680">
+      <stop
+         id="stop11682"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11684"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11686"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11689">
+      <stop
+         id="stop11691"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11693-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11695-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7224-0"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11698">
+      <stop
+         id="stop11700"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11702"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11704"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7228-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11707">
+      <stop
+         id="stop11709"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11711"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11713"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11716">
+      <stop
+         id="stop11718"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11720"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11722"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7232-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11725">
+      <stop
+         id="stop11727"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11729"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11731"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7236-5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11734">
+      <stop
+         id="stop11736"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11738"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11740"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11743">
+      <stop
+         id="stop11745"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11747"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11749"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7240-0"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11752">
+      <stop
+         id="stop11754"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11756"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11758"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7244-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11761">
+      <stop
+         id="stop11763"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11765"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11767"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11770">
+      <stop
+         id="stop11772"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11774"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11776"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7248-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11779">
+      <stop
+         id="stop11781"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11783"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11785"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7252-9"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11788">
+      <stop
+         id="stop11790"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11792"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11794"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11797">
+      <stop
+         id="stop11799"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11801"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11803"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7256-5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11806">
+      <stop
+         id="stop11808"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11810"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11812"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7260-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11815">
+      <stop
+         id="stop11817"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11819"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11821"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11824">
+      <stop
+         id="stop11826"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11828"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11830"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7264-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11833">
+      <stop
+         id="stop11835"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11837"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11839"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7268-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11842">
+      <stop
+         id="stop11844"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11846"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11848"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11851">
+      <stop
+         id="stop11853"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11855"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11857"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7272-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11860">
+      <stop
+         id="stop11862"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11864"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11866"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7276-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11869">
+      <stop
+         id="stop11871"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11873"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11875"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11878">
+      <stop
+         id="stop11880"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11882"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11884"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7280-5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11887">
+      <stop
+         id="stop11889"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11891"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11893"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7282-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11896">
+      <stop
+         id="stop11898"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11900"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11902"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11905">
+      <stop
+         id="stop11907"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11909"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11911"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7286-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11914">
+      <stop
+         id="stop11916"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11918"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11920"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11923">
+      <stop
+         id="stop11925"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11927"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11929"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7290-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11932">
+      <stop
+         id="stop11934"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11936"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11938"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7292-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11941">
+      <stop
+         id="stop11943"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11945"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11947"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11950">
+      <stop
+         id="stop11952"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11954"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11956"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7296-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11959">
+      <stop
+         id="stop11961"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11963"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11965"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11968">
+      <stop
+         id="stop11970"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11972"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11974"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7300-7"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11977">
+      <stop
+         id="stop11979"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11981"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11983"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7304-0"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient11986">
+      <stop
+         id="stop11988"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11990"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop11992"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient11995">
+      <stop
+         id="stop11997"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop11999"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop12001"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7308-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient12004">
+      <stop
+         id="stop12006"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop12008"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop12010"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-2"
+       id="radialGradient7312-0"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient12013">
+      <stop
+         id="stop12015"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop12017"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop12019"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12022">
+      <stop
+         id="stop12024"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop12026"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop12028"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126-3">
+      <stop
+         id="stop4128-1"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4130-0"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5048-7-7">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050-7-5" />
+      <stop
+         id="stop5056-8-0"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052-3-0" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4228-4">
+      <stop
+         id="stop4230-8"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232-21"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244-8">
+      <stop
+         id="stop4246-3"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248-1"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184-8">
+      <stop
+         id="stop4186-4"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188-9"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274-7-7">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276-34-0" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278-9-5" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2555-6">
+      <stop
+         id="stop2557-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561-7" />
+      <stop
+         id="stop2563-74"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565-5" />
+      <stop
+         id="stop2559-7"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4228-3-8">
+      <stop
+         id="stop4230-2-3"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232-2-0"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244-6-2">
+      <stop
+         id="stop4246-8-3"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248-5-67"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184-6-5">
+      <stop
+         id="stop4186-1-5"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188-8-4"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274-4-1">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276-3-1" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278-1-1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2555-1-8">
+      <stop
+         id="stop2557-3-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561-8-0" />
+      <stop
+         id="stop2563-7-1"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565-4-2" />
+      <stop
+         id="stop2559-2-9"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4228-3-3-5-3">
+      <stop
+         id="stop4230-2-8-1-8"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232-2-9-0-8"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244-6-4-9-7">
+      <stop
+         id="stop4246-8-4-6-7"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248-5-6-8-0"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184-6-6-4-9">
+      <stop
+         id="stop4186-1-6-8-3"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188-8-1-4-0"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274-4-7-3-7">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276-3-8-3-1" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278-1-8-3-0" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2555-1-9-8-0">
+      <stop
+         id="stop2557-3-8-8-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561-8-4-0-4" />
+      <stop
+         id="stop2563-7-0-6-5"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565-4-7-8-6" />
+      <stop
+         id="stop2559-2-6-1-2"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="marker12143"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path12145" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="marker12147"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path12149" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-5-0"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="marker12152"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path12154" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="marker12156"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path12158" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-1-3"
+       effect="spiro" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13774"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13776"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13780"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13782"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13786"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13788"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13792"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13794"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13798"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13800"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13804"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13806"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13810"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13812"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13816"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13818"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13822"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13826"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13828"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13832"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13836"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13842"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13844"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13848"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13850"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient13852"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <filter
+       color-interpolation-filters="sRGB"
+       id="filter11294-65"
+       inkscape:label="Drop shadow"
+       width="1.5"
+       height="1.5"
+       x="-0.25"
+       y="-0.25">
+      <feGaussianBlur
+         id="feGaussianBlur11296-8"
+         in="SourceAlpha"
+         stdDeviation="2"
+         result="blur" />
+      <feColorMatrix
+         id="feColorMatrix11298-3"
+         result="bluralpha"
+         type="matrix"
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.4 0 " />
+      <feOffset
+         id="feOffset11300-9"
+         in="bluralpha"
+         dx="2"
+         dy="2"
+         result="offsetBlur" />
+      <feMerge
+         id="feMerge11302-4">
+        <feMergeNode
+           id="feMergeNode11304-8"
+           in="offsetBlur" />
+        <feMergeNode
+           id="feMergeNode11306-3"
+           in="SourceGraphic" />
+      </feMerge>
+    </filter>
+    <linearGradient
+       id="linearGradient6035-2">
+      <stop
+         id="stop6037-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop6039-3"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14429">
+      <stop
+         id="stop14431"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14433"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14436">
+      <stop
+         id="stop14438"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14440"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12828-26">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6" />
+      <stop
+         id="stop12862-3"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12001-6">
+      <stop
+         id="stop12003-2"
+         offset="0"
+         style="stop-color:#1b4a78;stop-opacity:1;" />
+      <stop
+         id="stop12005-5"
+         offset="1"
+         style="stop-color:#5dacd1;stop-opacity:1;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-35"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-6" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-6"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-14" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-4"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient5048-2">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050-6" />
+      <stop
+         id="stop5056-82"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052-5" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient259-7">
+      <stop
+         style="stop-color:#fafafa;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop260-6" />
+      <stop
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop261-0" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient269-2">
+      <stop
+         style="stop-color:#a3a3a3;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop270-4" />
+      <stop
+         style="stop-color:#4c4c4c;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop271-3" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient15662-6">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="0.0000000"
+         id="stop15664-2" />
+      <stop
+         style="stop-color:#f8f8f8;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop15666-8" />
+    </linearGradient>
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       fy="114.5684"
+       fx="20.892099"
+       r="5.256"
+       cy="114.5684"
+       cx="20.892099"
+       id="aigrd2-3">
+      <stop
+         id="stop15566-4"
+         style="stop-color:#F0F0F0"
+         offset="0" />
+      <stop
+         id="stop15568-3"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         offset="1.0000000" />
+    </radialGradient>
+    <radialGradient
+       gradientUnits="userSpaceOnUse"
+       fy="64.567902"
+       fx="20.892099"
+       r="5.257"
+       cy="64.567902"
+       cx="20.892099"
+       id="aigrd3-3">
+      <stop
+         id="stop15573-6"
+         style="stop-color:#F0F0F0"
+         offset="0" />
+      <stop
+         id="stop15575-8"
+         style="stop-color:#9a9a9a;stop-opacity:1.0000000;"
+         offset="1.0000000" />
+    </radialGradient>
+    <linearGradient
+       id="linearGradient3962-0">
+      <stop
+         id="stop3964-0"
+         offset="0.0000000"
+         style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4134-8"
+         offset="0.15517241"
+         style="stop-color:#d3e9ff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4346-8"
+         offset="0.75000000"
+         style="stop-color:#4074ae;stop-opacity:1.0000000;" />
+      <stop
+         id="stop3966-0"
+         offset="1.0000000"
+         style="stop-color:#36486c;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13852-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient4750-9">
+      <stop
+         id="stop4752-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop4758-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4754-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13776-8"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14512">
+      <stop
+         id="stop14514"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14516"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14518"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13774-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14521">
+      <stop
+         id="stop14523"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14525"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14527"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14530">
+      <stop
+         id="stop14532"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14534"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14536"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13782-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14539">
+      <stop
+         id="stop14541"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14543"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14545"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13780-0"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14548">
+      <stop
+         id="stop14550"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14552"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14554"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14557">
+      <stop
+         id="stop14559"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14561"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14563"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13788-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14566">
+      <stop
+         id="stop14568"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14570"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14572"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13786-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14575">
+      <stop
+         id="stop14577"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14579"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14581"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14584">
+      <stop
+         id="stop14586"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14588"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14590"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13794-8"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14593">
+      <stop
+         id="stop14595"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14597"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14599"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13792-9"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14602">
+      <stop
+         id="stop14604"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14606"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14608"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14611">
+      <stop
+         id="stop14613"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14615"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14617"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13800-9"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14620">
+      <stop
+         id="stop14622"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14624"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14626"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13798-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14629">
+      <stop
+         id="stop14631"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14633"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14635"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14638">
+      <stop
+         id="stop14640"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14642"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14644"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13806-5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14647">
+      <stop
+         id="stop14649"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14651"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14653"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13804-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14656">
+      <stop
+         id="stop14658"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14660"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14662"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14665">
+      <stop
+         id="stop14667"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14669"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14671"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13812-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14674">
+      <stop
+         id="stop14676"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14678"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14680"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13810-5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14683">
+      <stop
+         id="stop14685"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14687"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14689"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14692">
+      <stop
+         id="stop14694"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14696"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14698"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13818-8"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14701">
+      <stop
+         id="stop14703"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14705"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14707"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13816-9"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14710">
+      <stop
+         id="stop14712"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14714"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14716"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14719">
+      <stop
+         id="stop14721"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14723"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14725"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13828-8"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14728">
+      <stop
+         id="stop14730"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14732"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14734"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13822-7"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14737">
+      <stop
+         id="stop14739"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14741"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14743"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14746">
+      <stop
+         id="stop14748"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14750"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14752"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13826-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14755">
+      <stop
+         id="stop14757"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14759"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14761"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14764">
+      <stop
+         id="stop14766"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14768"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14770"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13838-8"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14773">
+      <stop
+         id="stop14775"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14777"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14779"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13832-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14782">
+      <stop
+         id="stop14784"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14786"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14788"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14791">
+      <stop
+         id="stop14793"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14795"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14797"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13836-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14800">
+      <stop
+         id="stop14802"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14804"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14806"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14809">
+      <stop
+         id="stop14811"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14813"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14815"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13844-9"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14818">
+      <stop
+         id="stop14820"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14822"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14824"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13842-7"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14827">
+      <stop
+         id="stop14829"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14831"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14833"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14836">
+      <stop
+         id="stop14838"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14840"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14842"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13850-8"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14845">
+      <stop
+         id="stop14847"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14849"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14851"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient13848-0"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient14854">
+      <stop
+         id="stop14856"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14858"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14860"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient14863">
+      <stop
+         id="stop14865"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop14867"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop14869"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126-7">
+      <stop
+         id="stop4128-5"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4130-5"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5048-7-0">
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="0"
+         id="stop5050-7-9" />
+      <stop
+         id="stop5056-8-2"
+         offset="0.5"
+         style="stop-color:black;stop-opacity:1;" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5052-3-8" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient5060-3-4"
+       id="radialGradient13858-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.774389,0,0,1.969706,-1891.633,-872.8854)"
+       cx="605.71429"
+       cy="486.64789"
+       fx="605.71429"
+       fy="486.64789"
+       r="117.14286" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient5060-3-4">
+      <stop
+         style="stop-color:black;stop-opacity:1;"
+         offset="0"
+         id="stop5062-7-5" />
+      <stop
+         style="stop-color:black;stop-opacity:0;"
+         offset="1"
+         id="stop5064-1-0" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4228-0">
+      <stop
+         id="stop4230-5"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232-1"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244-5">
+      <stop
+         id="stop4246-9"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248-0"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184-3">
+      <stop
+         id="stop4186-8"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188-7"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274-7-1">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276-34-03" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278-9-3" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2555-5">
+      <stop
+         id="stop2557-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561-1" />
+      <stop
+         id="stop2563-3"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565-7" />
+      <stop
+         id="stop2559-3"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4228-3-85">
+      <stop
+         id="stop4230-2-6"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232-2-90"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244-6-9">
+      <stop
+         id="stop4246-8-36"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248-5-0"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184-6-9">
+      <stop
+         id="stop4186-1-7"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188-8-8"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274-4-6">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276-3-6" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278-1-6" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2555-1-6">
+      <stop
+         id="stop2557-3-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561-8-2" />
+      <stop
+         id="stop2563-7-14"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565-4-9" />
+      <stop
+         id="stop2559-2-5"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4228-3-3-5-34">
+      <stop
+         id="stop4230-2-8-1-1"
+         offset="0.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4232-2-9-0-5"
+         offset="1.0000000"
+         style="stop-color:#9f9f9f;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4244-6-4-9-3">
+      <stop
+         id="stop4246-8-4-6-1"
+         offset="0.0000000"
+         style="stop-color:#e4e4e4;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4248-5-6-8-6"
+         offset="1.0000000"
+         style="stop-color:#d3d3d3;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4184-6-6-4-8">
+      <stop
+         id="stop4186-1-6-8-2"
+         offset="0.0000000"
+         style="stop-color:#838383;stop-opacity:1.0000000;" />
+      <stop
+         id="stop4188-8-1-4-7"
+         offset="1.0000000"
+         style="stop-color:#bbbbbb;stop-opacity:0.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4274-4-7-3-4">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:0.25490198;"
+         offset="0.0000000"
+         id="stop4276-3-8-3-9" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1.0000000;"
+         offset="1.0000000"
+         id="stop4278-1-8-3-4" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2555-1-9-8-5">
+      <stop
+         id="stop2557-3-8-8-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         style="stop-color:#e6e6e6;stop-opacity:1.0000000;"
+         offset="0.50000000"
+         id="stop2561-8-4-0-8" />
+      <stop
+         id="stop2563-7-0-6-1"
+         offset="0.75000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         style="stop-color:#e1e1e1;stop-opacity:1.0000000;"
+         offset="0.84166664"
+         id="stop2565-4-7-8-2" />
+      <stop
+         id="stop2559-2-6-1-1"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="marker14984"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path14986" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="marker14988"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path14990" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-5-4"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="marker14993"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path14995" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="marker14997"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path14999" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-1-9"
+       effect="spiro" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16577"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16579"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16581"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16583"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16585"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16587"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16589"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16591"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16593"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16595"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16597"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16599"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16601"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16603"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16605"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16607"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16609"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16611"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16613"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16615"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16617"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16619"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16621"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16623"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16625"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16627"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient16629"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-85"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-87" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-33"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-10" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-8"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient6035-0-6-1">
+      <stop
+         id="stop6037-7-0-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop6039-6-7-7"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16843">
+      <stop
+         id="stop16845"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16847"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient16850">
+      <stop
+         id="stop16852"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop16854"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-0"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-28" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-67"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-0" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-3-8"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient3771-3-2">
+      <stop
+         id="stop3773-8-0"
+         offset="0"
+         style="stop-color:#999999;stop-opacity:1" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0.45398712"
+         id="stop3781-3-2" />
+      <stop
+         style="stop-color:#999999;stop-opacity:1"
+         offset="0.58583456"
+         id="stop3779-7-8" />
+      <stop
+         id="stop3775-1-4"
+         offset="1"
+         style="stop-color:#b3b3b3;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3771-3-2-1">
+      <stop
+         id="stop3773-8-0-3"
+         offset="0"
+         style="stop-color:#999999;stop-opacity:1" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0.45398712"
+         id="stop3781-3-2-6" />
+      <stop
+         style="stop-color:#999999;stop-opacity:1"
+         offset="0.58583456"
+         id="stop3779-7-8-7" />
+      <stop
+         id="stop3775-1-4-8"
+         offset="1"
+         style="stop-color:#b3b3b3;stop-opacity:1" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-30"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-65" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-09"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-72" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-3-2"
+       effect="spiro" />
+    <filter
+       color-interpolation-filters="sRGB"
+       id="filter10150-8"
+       inkscape:label="filtro6">
+      <feColorMatrix
+         id="feColorMatrix10152-2"
+         type="hueRotate"
+         values="158.18181818181819" />
+    </filter>
+    <linearGradient
+       id="linearGradient12828-2-4">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-46-4" />
+      <stop
+         id="stop12862-1-8"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-8-2" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12001-1-2">
+      <stop
+         id="stop12003-1-5"
+         offset="0"
+         style="stop-color:#1b4a78;stop-opacity:1;" />
+      <stop
+         id="stop12005-9-8"
+         offset="1"
+         style="stop-color:#5dacd1;stop-opacity:1;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="marker17789"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path17791" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="marker17793"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path17795" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-3-8-4"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-31"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-04" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-07"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-90" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-81"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-40"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-7" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-95"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-38" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-81-2"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-21"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-040" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-75"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-905" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-3-1"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-173"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-30" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-76"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-6" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-3-1-0"
+       effect="spiro" />
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_7_"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="109.2632"
+       y2="109.2632">
+      <stop
+         id="stop6"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop8"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop10"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop12"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop14"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5401,205.5401,0,-94889.922,51048.383)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_8_"
+       x1="-248.4731"
+       x2="-246.68941"
+       y1="461.95169"
+       y2="461.95169">
+      <stop
+         id="stop19"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop21"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_9_"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="68.888199"
+       y2="68.888199">
+      <stop
+         id="stop34"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop36"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop38"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop40"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop42"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5463,205.5463,0,-94893.484,51026.383)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_10_"
+       x1="-248.55811"
+       x2="-246.7719"
+       y1="461.95261"
+       y2="461.95261">
+      <stop
+         id="stop47"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop49"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_11_"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="28.517599"
+       y2="28.517599">
+      <stop
+         id="stop60"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop62"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop64"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop66"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop68"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5401,205.5401,0,-94889.922,51003.008)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_12_"
+       x1="-248.644"
+       x2="-246.86349"
+       y1="461.95169"
+       y2="461.95169">
+      <stop
+         id="stop73"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop75"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient12828-26-7"
+       id="radialGradient13746-8-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.177184,0,495.9268)"
+       cx="328.57144"
+       cy="602.7193"
+       fx="328.57144"
+       fy="602.7193"
+       r="147.14285" />
+    <linearGradient
+       id="linearGradient12828-26-7">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-4" />
+      <stop
+         id="stop12862-3-0"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-9" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12828-26-7-8">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-4-2" />
+      <stop
+         id="stop12862-3-0-4"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-9-5" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_7_-5"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="109.2632"
+       y2="109.2632">
+      <stop
+         id="stop6-1"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop8-7"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop10-1"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop12-1"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop14-5"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5401,205.5401,0,-94889.922,51048.383)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_8_-2"
+       x1="-248.4731"
+       x2="-246.68941"
+       y1="461.95169"
+       y2="461.95169">
+      <stop
+         id="stop19-7"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop21-6"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_9_-1"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="68.888199"
+       y2="68.888199">
+      <stop
+         id="stop34-4"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop36-2"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop38-3"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop40-2"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop42-2"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5463,205.5463,0,-94893.484,51026.383)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_10_-1"
+       x1="-248.55811"
+       x2="-246.7719"
+       y1="461.95261"
+       y2="461.95261">
+      <stop
+         id="stop47-6"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop49-8"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_11_-5"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="28.517599"
+       y2="28.517599">
+      <stop
+         id="stop60-7"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop62-6"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop64-1"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop66-8"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop68-9"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5401,205.5401,0,-94889.922,51003.008)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_12_-2"
+       x1="-248.644"
+       x2="-246.86349"
+       y1="461.95169"
+       y2="461.95169">
+      <stop
+         id="stop73-7"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop75-9"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-49"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-63" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-78"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-829" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-81-1"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient12828-26-7-84">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-4-0" />
+      <stop
+         id="stop12862-3-0-7"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-9-6" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_7_-3"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="109.2632"
+       y2="109.2632">
+      <stop
+         id="stop6-6"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop8-1"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop10-5"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop12-4"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop14-2"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5401,205.5401,0,-94889.922,51048.383)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_8_-0"
+       x1="-248.4731"
+       x2="-246.68941"
+       y1="461.95169"
+       y2="461.95169">
+      <stop
+         id="stop19-9"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop21-7"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_9_-3"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="68.888199"
+       y2="68.888199">
+      <stop
+         id="stop34-7"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop36-26"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop38-0"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop40-1"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop42-6"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5463,205.5463,0,-94893.484,51026.383)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_10_-5"
+       x1="-248.55811"
+       x2="-246.7719"
+       y1="461.95261"
+       y2="461.95261">
+      <stop
+         id="stop47-7"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop49-5"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_11_-4"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="28.517599"
+       y2="28.517599">
+      <stop
+         id="stop60-1"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop62-2"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop64-0"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop66-0"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop68-1"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5401,205.5401,0,-94889.922,51003.008)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_12_-4"
+       x1="-248.644"
+       x2="-246.86349"
+       y1="461.95169"
+       y2="461.95169">
+      <stop
+         id="stop73-6"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop75-0"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-38"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-37" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-10"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-73" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-81-1-4"
+       effect="spiro" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8748"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8750"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8752"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8754"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8756"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8758"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8760"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8762"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8764"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8766"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8768"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8770"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8772"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8774"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8776"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8778"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8780"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8782"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8784"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8786"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8788"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8790"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8792"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8794"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8796"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8798"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750"
+       id="radialGradient8800"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8802"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8804"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8806"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8808"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8810"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8812"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8814"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8816"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8818"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8820"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8822"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8824"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8826"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8828"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8830"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8832"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8834"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8836"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8838"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8840"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8842"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8844"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8846"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8848"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8850"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8852"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4750-9"
+       id="radialGradient8854"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="scale(1.036822,0.964486)"
+       cx="18.63378"
+       cy="17.486208"
+       fx="18.934305"
+       fy="17.810213"
+       r="40.692665" />
+    <linearGradient
+       id="linearGradient12828-26-4">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-0" />
+      <stop
+         id="stop12862-3-9"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-4" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12001-6-8">
+      <stop
+         id="stop12003-2-2"
+         offset="0"
+         style="stop-color:#1b4a78;stop-opacity:1;" />
+      <stop
+         id="stop12005-5-4"
+         offset="1"
+         style="stop-color:#5dacd1;stop-opacity:1;" />
+    </linearGradient>
+    <filter
+       color-interpolation-filters="sRGB"
+       id="filter11294-65-2"
+       inkscape:label="Drop shadow"
+       width="1.5"
+       height="1.5"
+       x="-0.25"
+       y="-0.25">
+      <feGaussianBlur
+         id="feGaussianBlur11296-8-2"
+         in="SourceAlpha"
+         stdDeviation="2"
+         result="blur" />
+      <feColorMatrix
+         id="feColorMatrix11298-3-1"
+         result="bluralpha"
+         type="matrix"
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.4 0 " />
+      <feOffset
+         id="feOffset11300-9-6"
+         in="bluralpha"
+         dx="2"
+         dy="2"
+         result="offsetBlur" />
+      <feMerge
+         id="feMerge11302-4-8">
+        <feMergeNode
+           id="feMergeNode11304-8-5"
+           in="offsetBlur" />
+        <feMergeNode
+           id="feMergeNode11306-3-7"
+           in="SourceGraphic" />
+      </feMerge>
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       id="filter11294-65-2-1"
+       inkscape:label="Drop shadow"
+       width="1.5"
+       height="1.5"
+       x="-0.25"
+       y="-0.25">
+      <feGaussianBlur
+         id="feGaussianBlur11296-8-2-8"
+         in="SourceAlpha"
+         stdDeviation="2"
+         result="blur" />
+      <feColorMatrix
+         id="feColorMatrix11298-3-1-9"
+         result="bluralpha"
+         type="matrix"
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.4 0 " />
+      <feOffset
+         id="feOffset11300-9-6-2"
+         in="bluralpha"
+         dx="2"
+         dy="2"
+         result="offsetBlur" />
+      <feMerge
+         id="feMerge11302-4-8-7">
+        <feMergeNode
+           id="feMergeNode11304-8-5-9"
+           in="offsetBlur" />
+        <feMergeNode
+           id="feMergeNode11306-3-7-5"
+           in="SourceGraphic" />
+      </feMerge>
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       id="filter11294-65-2-3"
+       inkscape:label="Drop shadow"
+       width="1.5"
+       height="1.5"
+       x="-0.25"
+       y="-0.25">
+      <feGaussianBlur
+         id="feGaussianBlur11296-8-2-1"
+         in="SourceAlpha"
+         stdDeviation="2"
+         result="blur" />
+      <feColorMatrix
+         id="feColorMatrix11298-3-1-2"
+         result="bluralpha"
+         type="matrix"
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.4 0 " />
+      <feOffset
+         id="feOffset11300-9-6-3"
+         in="bluralpha"
+         dx="2"
+         dy="2"
+         result="offsetBlur" />
+      <feMerge
+         id="feMerge11302-4-8-3">
+        <feMergeNode
+           id="feMergeNode11304-8-5-4"
+           in="offsetBlur" />
+        <feMergeNode
+           id="feMergeNode11306-3-7-1"
+           in="SourceGraphic" />
+      </feMerge>
+    </filter>
+    <linearGradient
+       id="linearGradient12828-26-4-8">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-0-7" />
+      <stop
+         id="stop12862-3-9-4"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-4-2" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12001-6-8-7">
+      <stop
+         id="stop12003-2-2-9"
+         offset="0"
+         style="stop-color:#1b4a78;stop-opacity:1;" />
+      <stop
+         id="stop12005-5-4-3"
+         offset="1"
+         style="stop-color:#5dacd1;stop-opacity:1;" />
+    </linearGradient>
+    <filter
+       color-interpolation-filters="sRGB"
+       id="filter11294-65-8"
+       inkscape:label="Drop shadow"
+       width="1.5"
+       height="1.5"
+       x="-0.25"
+       y="-0.25">
+      <feGaussianBlur
+         id="feGaussianBlur11296-8-6"
+         in="SourceAlpha"
+         stdDeviation="2"
+         result="blur" />
+      <feColorMatrix
+         id="feColorMatrix11298-3-5"
+         result="bluralpha"
+         type="matrix"
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.4 0 " />
+      <feOffset
+         id="feOffset11300-9-0"
+         in="bluralpha"
+         dx="2"
+         dy="2"
+         result="offsetBlur" />
+      <feMerge
+         id="feMerge11302-4-9">
+        <feMergeNode
+           id="feMergeNode11304-8-0"
+           in="offsetBlur" />
+        <feMergeNode
+           id="feMergeNode11306-3-0"
+           in="SourceGraphic" />
+      </feMerge>
+    </filter>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771-3-2-1-4"
+       id="linearGradient17492-6-8-5"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.48858904,-17.155692,400.03359)"
+       x1="1271.4286"
+       y1="623.79077"
+       x2="1280"
+       y2="1120.9336" />
+    <linearGradient
+       id="linearGradient3771-3-2-1-4">
+      <stop
+         id="stop3773-8-0-3-2"
+         offset="0"
+         style="stop-color:#999999;stop-opacity:1" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0.45398712"
+         id="stop3781-3-2-6-0" />
+      <stop
+         style="stop-color:#999999;stop-opacity:1"
+         offset="0.58583456"
+         id="stop3779-7-8-7-9" />
+      <stop
+         id="stop3775-1-4-8-7"
+         offset="1"
+         style="stop-color:#b3b3b3;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771-3-2-6"
+       id="linearGradient17735-2"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.48858904,-17.155692,400.03359)"
+       x1="1271.4286"
+       y1="623.79077"
+       x2="1280"
+       y2="1120.9336" />
+    <linearGradient
+       id="linearGradient3771-3-2-6">
+      <stop
+         id="stop3773-8-0-0"
+         offset="0"
+         style="stop-color:#999999;stop-opacity:1" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0.45398712"
+         id="stop3781-3-2-1" />
+      <stop
+         style="stop-color:#999999;stop-opacity:1"
+         offset="0.58583456"
+         id="stop3779-7-8-6" />
+      <stop
+         id="stop3775-1-4-5"
+         offset="1"
+         style="stop-color:#b3b3b3;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771-3-1"
+       id="linearGradient17492-4"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.48858904,-17.155692,400.03359)"
+       x1="1271.4286"
+       y1="623.79077"
+       x2="1280"
+       y2="1120.9336" />
+    <linearGradient
+       id="linearGradient3771-3-1">
+      <stop
+         id="stop3773-8-2"
+         offset="0"
+         style="stop-color:#999999;stop-opacity:1" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="0.45398712"
+         id="stop3781-3-0" />
+      <stop
+         style="stop-color:#999999;stop-opacity:1"
+         offset="0.58583456"
+         id="stop3779-7-0" />
+      <stop
+         id="stop3775-1-1"
+         offset="1"
+         style="stop-color:#b3b3b3;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient6035-2-6">
+      <stop
+         id="stop6037-5-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop6039-3-8"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7849">
+      <stop
+         id="stop7851"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7853"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7856">
+      <stop
+         id="stop7858"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7860"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient6035-0-7">
+      <stop
+         id="stop6037-7-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop6039-6-1"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7337">
+      <stop
+         id="stop7339"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7341"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7344">
+      <stop
+         id="stop7346"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7348"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient6035-0-6-7">
+      <stop
+         id="stop6037-7-0-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop6039-6-7-1"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7366-9">
+      <stop
+         id="stop7368-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7370-7"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7373">
+      <stop
+         id="stop7375"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7377"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient6035-0-6-1-7">
+      <stop
+         id="stop6037-7-0-2-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop6039-6-7-7-2"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7395">
+      <stop
+         id="stop7397"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7399"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient7402">
+      <stop
+         id="stop7404"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop7406"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-84"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-07" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-63"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-61" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-81-2-5"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-20"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-97" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-37"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-260" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-5-4-1"
+       effect="spiro" />
+    <filter
+       color-interpolation-filters="sRGB"
+       id="filter10150-8-4"
+       inkscape:label="filtro6">
+      <feColorMatrix
+         id="feColorMatrix10152-2-1"
+         type="hueRotate"
+         values="158.18181818181819" />
+    </filter>
+    <linearGradient
+       id="linearGradient12828-2-4-0">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-46-4-0" />
+      <stop
+         id="stop12862-1-8-1"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-8-2-4" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12001-1-2-0">
+      <stop
+         id="stop12003-1-5-7"
+         offset="0"
+         style="stop-color:#1b4a78;stop-opacity:1;" />
+      <stop
+         id="stop12005-9-8-1"
+         offset="1"
+         style="stop-color:#5dacd1;stop-opacity:1;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-26"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-60" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-38"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-01" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-4-2"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient6035-2-6-1">
+      <stop
+         id="stop6037-5-1-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop6039-3-8-9"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient9753">
+      <stop
+         id="stop9755"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop9757"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient9760">
+      <stop
+         id="stop9762"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop9764"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:0;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12828-26-4-8-3">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-0-7-4" />
+      <stop
+         id="stop12862-3-9-4-9"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-4-2-6" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12001-6-8-7-1">
+      <stop
+         id="stop12003-2-2-9-0"
+         offset="0"
+         style="stop-color:#1b4a78;stop-opacity:1;" />
+      <stop
+         id="stop12005-5-4-3-9"
+         offset="1"
+         style="stop-color:#5dacd1;stop-opacity:1;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-33"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-374" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-380"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-88" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-81-2-0"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-819"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-89" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-72"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-282" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-81-1-8"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-781"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-58" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-61"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-24" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-3-1-0-2"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-86"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-265" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-39"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-246" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-81-1-1"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-211"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-976" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-2"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-95" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-81-1-1-2"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient12828-26-7-0">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-4-3" />
+      <stop
+         id="stop12862-3-0-9"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-9-1" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_7_-8"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="109.2632"
+       y2="109.2632">
+      <stop
+         id="stop6-19"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop8-5"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop10-3"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop12-2"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop14-52"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5401,205.5401,0,-94889.922,51048.383)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_8_-5"
+       x1="-248.4731"
+       x2="-246.68941"
+       y1="461.95169"
+       y2="461.95169">
+      <stop
+         id="stop19-8"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop21-67"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_9_-7"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="68.888199"
+       y2="68.888199">
+      <stop
+         id="stop34-2"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop36-29"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop38-4"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop40-19"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop42-69"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5463,205.5463,0,-94893.484,51026.383)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_10_-8"
+       x1="-248.55811"
+       x2="-246.7719"
+       y1="461.95261"
+       y2="461.95261">
+      <stop
+         id="stop47-2"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop49-55"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_11_-49"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="28.517599"
+       y2="28.517599">
+      <stop
+         id="stop60-12"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop62-5"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop64-08"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop66-3"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop68-93"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5401,205.5401,0,-94889.922,51003.008)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_12_-9"
+       x1="-248.644"
+       x2="-246.86349"
+       y1="461.95169"
+       y2="461.95169">
+      <stop
+         id="stop73-67"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop75-99"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12828-7-4">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-4-29" />
+      <stop
+         id="stop12862-0-3"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-9-0" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3962-8-1-1-87-4-9-7">
+      <stop
+         id="stop10595-2-3-78"
+         offset="0.0000000"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10597-7-8-73"
+         offset="0.15517241"
+         style="stop-color:#e5e5e5;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10599-9-1-03"
+         offset="0.75000000"
+         style="stop-color:#6b6b6b;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10601-2-0-8"
+         offset="1.0000000"
+         style="stop-color:#474747;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17680-4-934-5-8-2"
+       xlink:href="#linearGradient4750-9-8-2-440-7-0-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-440-7-0-5">
+      <stop
+         id="stop10611-8-1-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10613-5-5-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10615-83-4-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17604-1-898-2-1-72"
+       xlink:href="#linearGradient4750-9-8-2-661-4-3-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-661-4-3-9">
+      <stop
+         id="stop10619-1-7-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10621-1-3-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10623-5-5-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17602-6-494-9-8-4"
+       xlink:href="#linearGradient4750-9-8-2-242-5-5-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-242-5-5-3">
+      <stop
+         id="stop10627-1-6-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10629-06-9-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10631-4-0-13"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-94-3-9-2">
+      <stop
+         id="stop10635-0-3-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10637-89-6-35"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10639-1-0-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17610-5-69-3-6-22"
+       xlink:href="#linearGradient4750-9-8-2-119-4-9-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-119-4-9-2">
+      <stop
+         id="stop10643-7-7-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10645-4-8-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10647-6-9-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17608-7-181-3-4-7"
+       xlink:href="#linearGradient4750-9-8-2-957-65-1-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-957-65-1-0">
+      <stop
+         id="stop10651-28-5-34"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10653-1-6-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10655-0-6-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-181-5-6-5">
+      <stop
+         id="stop10659-5-6-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10661-2-7-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10663-2-1-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17616-1-513-17-4-6"
+       xlink:href="#linearGradient4750-9-8-2-667-4-0-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-667-4-0-7">
+      <stop
+         id="stop10667-8-6-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10669-2-1-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10671-3-2-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17614-8-56-6-1-4"
+       xlink:href="#linearGradient4750-9-8-2-376-3-4-5"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-376-3-4-5">
+      <stop
+         id="stop10675-0-9-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10677-3-5-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10679-5-2-56"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-417-8-4-4">
+      <stop
+         id="stop10683-07-1-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10685-2-5-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10687-2-2-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17622-2-276-5-3-6"
+       xlink:href="#linearGradient4750-9-8-2-288-9-1-83"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-288-9-1-83">
+      <stop
+         id="stop10691-1-6-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10693-0-8-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10695-8-8-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17620-7-59-50-2-4"
+       xlink:href="#linearGradient4750-9-8-2-877-7-7-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-877-7-7-9">
+      <stop
+         id="stop10699-9-7-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10701-0-1-07"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10703-5-2-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-841-4-0-6">
+      <stop
+         id="stop10707-1-4-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10709-0-9-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10711-4-4-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17628-4-136-8-6-5"
+       xlink:href="#linearGradient4750-9-8-2-848-5-0-6"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-848-5-0-6">
+      <stop
+         id="stop10715-92-3-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10717-5-6-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10719-4-2-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17626-3-710-1-4-4"
+       xlink:href="#linearGradient4750-9-8-2-502-3-5-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-502-3-5-9">
+      <stop
+         id="stop10723-95-8-2"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10725-82-8-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10727-7-1-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-627-6-1-7">
+      <stop
+         id="stop10731-1-4-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10733-7-9-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10735-7-8-5"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17634-2-59-1-2-7"
+       xlink:href="#linearGradient4750-9-8-2-585-9-4-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-585-9-4-9">
+      <stop
+         id="stop10739-03-5-8"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10741-4-2-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10743-1-9-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17632-3-677-7-9-2"
+       xlink:href="#linearGradient4750-9-8-2-866-5-8-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-866-5-8-2">
+      <stop
+         id="stop10747-3-3-36"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10749-3-8-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10751-2-6-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-974-1-8-5">
+      <stop
+         id="stop10755-2-6-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10757-9-6-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10759-0-2-02"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17640-4-736-8-3-6"
+       xlink:href="#linearGradient4750-9-8-2-828-7-8-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-828-7-8-0">
+      <stop
+         id="stop10763-4-2-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10765-5-6-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10767-68-2-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17638-3-543-0-7-1"
+       xlink:href="#linearGradient4750-9-8-2-755-7-5-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-755-7-5-7">
+      <stop
+         id="stop10771-7-7-30"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10773-4-8-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10775-3-2-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-702-3-8-8">
+      <stop
+         id="stop10779-63-0-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10781-0-2-01"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10783-1-0-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17646-7-613-9-8-9"
+       xlink:href="#linearGradient4750-9-8-2-269-0-9-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-269-0-9-0">
+      <stop
+         id="stop10787-4-2-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10789-2-8-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10791-9-2-8"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17644-4-744-3-0-57"
+       xlink:href="#linearGradient4750-9-8-2-622-1-5-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-622-1-5-7">
+      <stop
+         id="stop10795-4-5-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10797-8-2-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10799-2-7-93"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-878-5-7-0">
+      <stop
+         id="stop10803-5-8-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10805-9-7-4"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10807-3-8-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17656-7-261-2-1-8"
+       xlink:href="#linearGradient4750-9-8-2-800-8-6-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-800-8-6-3">
+      <stop
+         id="stop10811-7-0-71"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10813-4-9-0"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10815-8-5-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17650-7-582-14-8-8"
+       xlink:href="#linearGradient4750-9-8-2-24-3-9-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-24-3-9-3">
+      <stop
+         id="stop10819-5-0-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10821-5-0-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10823-2-0-0"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-456-8-2-1">
+      <stop
+         id="stop10827-9-5-4"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10829-2-5-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10831-9-2-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17654-3-751-5-1-2"
+       xlink:href="#linearGradient4750-9-8-2-236-9-4-0"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-236-9-4-0">
+      <stop
+         id="stop10835-4-8-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10837-50-6-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10839-5-4-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-370-8-8-6">
+      <stop
+         id="stop10843-0-9-6"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10845-1-8-7"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10847-3-3-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17666-9-489-2-5-7"
+       xlink:href="#linearGradient4750-9-8-2-525-2-5-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-525-2-5-7">
+      <stop
+         id="stop10851-2-1-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10853-7-5-9"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10855-0-5-1"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17660-8-76-3-8-6"
+       xlink:href="#linearGradient4750-9-8-2-643-1-4-2"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-643-1-4-2">
+      <stop
+         id="stop10859-3-0-7"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10861-3-5-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10863-7-4-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-539-9-2-6">
+      <stop
+         id="stop10867-5-1-5"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10869-5-4-1"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10871-8-9-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17664-5-693-37-9-9"
+       xlink:href="#linearGradient4750-9-8-2-675-8-0-9"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-675-8-0-9">
+      <stop
+         id="stop10875-3-3-59"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10877-79-0-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10879-3-3-6"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-223-1-0-5">
+      <stop
+         id="stop10883-8-7-3"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10885-2-6-24"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10887-80-7-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17672-8-943-1-8-42"
+       xlink:href="#linearGradient4750-9-8-2-349-8-3-7"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-349-8-3-7">
+      <stop
+         id="stop10891-4-6-9"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10893-8-4-2"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10895-6-4-3"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17670-6-89-0-1-7"
+       xlink:href="#linearGradient4750-9-8-2-931-9-9-3"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-931-9-9-3">
+      <stop
+         id="stop10899-3-5-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10901-0-5-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10903-0-7-7"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-636-7-7-8">
+      <stop
+         id="stop10907-6-3-58"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10909-3-4-3"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10911-5-0-2"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17678-2-227-6-8-4"
+       xlink:href="#linearGradient4750-9-8-2-759-5-8-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-759-5-8-1">
+      <stop
+         id="stop10915-8-1-1"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10917-3-5-5"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10919-9-2-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <radialGradient
+       r="40.692665"
+       fy="17.810213"
+       fx="18.934305"
+       cy="17.486208"
+       cx="18.63378"
+       gradientTransform="scale(1.036822,0.964486)"
+       gradientUnits="userSpaceOnUse"
+       id="radialGradient17676-4-692-4-3-5"
+       xlink:href="#linearGradient4750-9-8-2-110-8-2-1"
+       inkscape:collect="always" />
+    <linearGradient
+       id="linearGradient4750-9-8-2-110-8-2-1">
+      <stop
+         id="stop10923-3-4-0"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10925-9-6-6"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10927-7-6-4"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4750-9-8-2-954-5-2-5">
+      <stop
+         id="stop10931-8-9-30"
+         offset="0"
+         style="stop-color:#ffffff;stop-opacity:1;" />
+      <stop
+         id="stop10933-6-0-8"
+         offset="0.37931034"
+         style="stop-color:#fefefe;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10935-1-4-9"
+         offset="1.0000000"
+         style="stop-color:#1d1d1d;stop-opacity:1.0000000;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient4126-4-3-5-840-5-3-1">
+      <stop
+         id="stop10939-1-1-3"
+         offset="0.0000000"
+         style="stop-color:#ffffff;stop-opacity:1.0000000;" />
+      <stop
+         id="stop10941-9-1-4"
+         offset="1.0000000"
+         style="stop-color:#ffffff;stop-opacity:0.16494845;" />
+    </linearGradient>
+    <filter
+       color-interpolation-filters="sRGB"
+       y="-0.25"
+       x="-0.25"
+       height="1.5"
+       width="1.5"
+       inkscape:label="Drop shadow"
+       id="filter10497-15">
+      <feGaussianBlur
+         result="blur"
+         stdDeviation="2"
+         in="SourceAlpha"
+         id="feGaussianBlur10499-4" />
+      <feColorMatrix
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.3 0 "
+         type="matrix"
+         result="bluralpha"
+         id="feColorMatrix10501-2" />
+      <feOffset
+         result="offsetBlur"
+         dy="2"
+         dx="2"
+         in="bluralpha"
+         id="feOffset10503-09" />
+      <feMerge
+         id="feMerge10505-7">
+        <feMergeNode
+           in="offsetBlur"
+           id="feMergeNode10507-3" />
+        <feMergeNode
+           in="SourceGraphic"
+           id="feMergeNode10509-7" />
+      </feMerge>
+    </filter>
+    <linearGradient
+       id="linearGradient3753-6">
+      <stop
+         id="stop3755-01"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop3757-6"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5108">
+      <stop
+         id="stop5110"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5112"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5115">
+      <stop
+         id="stop5117"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5119"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5122">
+      <stop
+         id="stop5124"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5126"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5129">
+      <stop
+         id="stop5131"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5133"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5136">
+      <stop
+         id="stop5138-7"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5140"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5143">
+      <stop
+         id="stop5145-4"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5147-6"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5150-3">
+      <stop
+         id="stop5152-6"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5154-5"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5157">
+      <stop
+         id="stop5159"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5161-2"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5164">
+      <stop
+         id="stop5166"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5168"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5171">
+      <stop
+         id="stop5173"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5175"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5178">
+      <stop
+         id="stop5180"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5182"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5185">
+      <stop
+         id="stop5187"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5189"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5192">
+      <stop
+         id="stop5194"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5196"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5199">
+      <stop
+         id="stop5201-8"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5203"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5206-1">
+      <stop
+         id="stop5208-0"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5210-3"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5213-1">
+      <stop
+         id="stop5215-5"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5217-5"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient5220">
+      <stop
+         id="stop5222"
+         offset="0"
+         style="stop-color:#ededed;stop-opacity:1;" />
+      <stop
+         id="stop5224-2"
+         offset="1"
+         style="stop-color:#bebebe;stop-opacity:1;" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12828-26-7-0-1">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-4-3-7" />
+      <stop
+         id="stop12862-3-0-9-4"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-9-1-8" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_7_-8-2"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="109.2632"
+       y2="109.2632">
+      <stop
+         id="stop6-19-3"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop8-5-6"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop10-3-3"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop12-2-0"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop14-52-3"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5401,205.5401,0,-94889.922,51048.383)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_8_-5-5"
+       x1="-248.4731"
+       x2="-246.68941"
+       y1="461.95169"
+       y2="461.95169">
+      <stop
+         id="stop19-8-2"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop21-67-8"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_9_-7-0"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="68.888199"
+       y2="68.888199">
+      <stop
+         id="stop34-2-7"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop36-29-2"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop38-4-2"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop40-19-5"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop42-69-9"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5463,205.5463,0,-94893.484,51026.383)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_10_-8-1"
+       x1="-248.55811"
+       x2="-246.7719"
+       y1="461.95261"
+       y2="461.95261">
+      <stop
+         id="stop47-2-0"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop49-55-8"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_11_-49-5"
+       x1="0.94679999"
+       x2="117.5381"
+       y1="28.517599"
+       y2="28.517599">
+      <stop
+         id="stop60-12-0"
+         offset="0"
+         style="stop-color:#DFDFDF" />
+      <stop
+         id="stop62-5-7"
+         offset="0.2168"
+         style="stop-color:#DADADA" />
+      <stop
+         id="stop64-08-9"
+         offset="0.4798"
+         style="stop-color:#CBCBCB" />
+      <stop
+         id="stop66-3-0"
+         offset="0.7655"
+         style="stop-color:#B3B3B3" />
+      <stop
+         id="stop68-93-5"
+         offset="1"
+         style="stop-color:#9A9999" />
+    </linearGradient>
+    <linearGradient
+       gradientTransform="matrix(0,205.5401,205.5401,0,-94889.922,51003.008)"
+       gradientUnits="userSpaceOnUse"
+       id="XMLID_12_-9-3"
+       x1="-248.644"
+       x2="-246.86349"
+       y1="461.95169"
+       y2="461.95169">
+      <stop
+         id="stop73-67-4"
+         offset="0"
+         style="stop-color:#FFFFFF" />
+      <stop
+         id="stop75-99-1"
+         offset="1"
+         style="stop-color:#000000" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12828-26-7-0-1-0">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-4-3-7-4" />
+      <stop
+         id="stop12862-3-0-9-4-2"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-9-1-8-9" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-80"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-18" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-486"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-09" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-5-3"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-76"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-35" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-65"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-83" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-3-9"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient12828-26-7-0-1-3">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-4-3-7-9" />
+      <stop
+         id="stop12862-3-0-9-4-7"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-9-1-8-6" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-98"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-00" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-88"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-05" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-4-2-1"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-36"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-39" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-21"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-98" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-3-23"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-89"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-13" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-51"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-42" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-3-5"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient12828-26-7-0-1-3-7">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-4-3-7-9-0" />
+      <stop
+         id="stop12862-3-0-9-4-7-1"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-9-1-8-6-4" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-93"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-606" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-97"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-89" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-5-81-1-8-4"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient12828-26-7-0-1-0-7">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-4-3-7-4-4" />
+      <stop
+         id="stop12862-3-0-9-4-2-0"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-9-1-8-9-9" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-48"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-650" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-90"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-06" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-5-3-1"
+       effect="spiro" />
+    <linearGradient
+       id="linearGradient12828-26-4-8-3-7">
+      <stop
+         style="stop-color:#484849;stop-opacity:1;"
+         offset="0"
+         id="stop12830-6-0-7-4-4" />
+      <stop
+         id="stop12862-3-9-4-9-0"
+         offset="0"
+         style="stop-color:#434344;stop-opacity:1;" />
+      <stop
+         style="stop-color:#8f8f90;stop-opacity:0.0000000;"
+         offset="1.0000000"
+         id="stop12832-94-4-2-6-9" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient12001-6-8-7-1-8">
+      <stop
+         id="stop12003-2-2-9-0-8"
+         offset="0"
+         style="stop-color:#1b4a78;stop-opacity:1;" />
+      <stop
+         id="stop12005-5-4-3-9-2"
+         offset="1"
+         style="stop-color:#5dacd1;stop-opacity:1;" />
+    </linearGradient>
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-45"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-51" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-71"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-15" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-4-2-1-2"
+       effect="spiro" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-61"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-42" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-322"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-168" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-4-2-1-2-5"
+       effect="spiro" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8526"
+       id="radialGradient8532"
+       cx="354.28571"
+       cy="309.50504"
+       fx="354.28571"
+       fy="309.50504"
+       r="143.7242"
+       gradientTransform="matrix(1,0,0,0.84990513,0,46.455121)"
+       gradientUnits="userSpaceOnUse" />
+    <linearGradient
+       id="linearGradient8526">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop8528" />
+      <stop
+         style="stop-color:#f9f9f9;stop-opacity:1;"
+         offset="1"
+         id="stop8530" />
+    </linearGradient>
+    <filter
+       id="filter8600"
+       inkscape:label="Drop shadow"
+       width="1.5"
+       height="1.5"
+       x="-0.25"
+       y="-0.25"
+       color-interpolation-filters="sRGB">
+      <feGaussianBlur
+         id="feGaussianBlur8602"
+         in="SourceAlpha"
+         stdDeviation="2"
+         result="blur" />
+      <feColorMatrix
+         id="feColorMatrix8604"
+         result="bluralpha"
+         type="matrix"
+         values="1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0.35 0 " />
+      <feOffset
+         id="feOffset8606"
+         in="bluralpha"
+         dx="3"
+         dy="3"
+         result="offsetBlur" />
+      <feMerge
+         id="feMerge8608">
+        <feMergeNode
+           id="feMergeNode8610"
+           in="offsetBlur" />
+        <feMergeNode
+           id="feMergeNode8612"
+           in="SourceGraphic" />
+      </feMerge>
+    </filter>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8526"
+       id="radialGradient8620"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.71858897,0,0,0.61073245,760.61741,-1182.4908)"
+       cx="354.28571"
+       cy="309.50504"
+       fx="354.28571"
+       fy="309.50504"
+       r="143.7242" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771-3-2-1-4"
+       id="linearGradient8760"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.48858904,-17.155692,400.03359)"
+       x1="1271.4286"
+       y1="623.79077"
+       x2="1280"
+       y2="1120.9336" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3771-3-2-6"
+       id="linearGradient8762"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,0.48858904,-17.155692,400.03359)"
+       x1="1271.4286"
+       y1="623.79077"
+       x2="1280"
+       y2="1120.9336" />
+    <marker
+       style="overflow:visible"
+       id="TriangleInM-94"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleInM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(-0.4,-0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7777-88" />
+    </marker>
+    <marker
+       style="overflow:visible"
+       id="TriangleOutM-24"
+       refX="0"
+       refY="0"
+       orient="auto"
+       inkscape:stockid="TriangleOutM">
+      <path
+         inkscape:connector-curvature="0"
+         transform="scale(0.4,0.4)"
+         style="fill-rule:evenodd;stroke:#000000;stroke-width:1pt;marker-start:none"
+         d="m 5.77,0 -8.65,5 0,-10 8.65,5 z"
+         id="path7786-55" />
+    </marker>
+    <inkscape:path-effect
+       is_visible="true"
+       id="path-effect7635-9-4-2-1-1"
+       effect="spiro" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8526"
+       id="radialGradient6795"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.71858897,0,0,0.61073245,760.61741,-1182.4908)"
+       cx="354.28571"
+       cy="309.50504"
+       fx="354.28571"
+       fy="309.50504"
+       r="143.7242" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient8526"
+       id="radialGradient6798"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.71858897,0,0,0.61073245,671.15081,-1237.6344)"
+       cx="354.28571"
+       cy="309.50504"
+       fx="354.28571"
+       fy="309.50504"
+       r="143.7242" />
+    <clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath4516">
+      <rect
+         style="opacity:0.28163267;fill:#222222;fill-opacity:1;stroke:#414141;stroke-width:24.60760307;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="rect4518"
+         width="1420.2938"
+         height="818.34723"
+         x="-344.77484"
+         y="-255.36827"
+         rx="41.918407"
+         ry="118.42776" />
+    </clipPath>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4835-717-4-09-3"
+       id="radialGradient17693-8-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1450096,-133.97806,-53.959804)"
+       spreadMethod="pad"
+       cx="506.53619"
+       cy="382.54471"
+       fx="506.53619"
+       fy="382.54471"
+       r="256.77951" />
+    <linearGradient
+       id="linearGradient4835-717-4-09-3">
+      <stop
+         style="stop-color:#004d0a;stop-opacity:1;"
+         offset="0"
+         id="stop2445-7-5-7" />
+      <stop
+         style="stop-color:#82a200;stop-opacity:1;"
+         offset="1"
+         id="stop2447-8-6-1" />
+    </linearGradient>
+    <clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath4512">
+      <rect
+         style="opacity:0.28163267;fill:#222222;fill-opacity:1;stroke:#414141;stroke-width:24.60760307;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="rect4514"
+         width="1420.2938"
+         height="818.34723"
+         x="-344.77484"
+         y="-255.36827"
+         rx="41.918407"
+         ry="118.42776" />
+    </clipPath>
+    <filter
+       inkscape:label="filtroHoja"
+       id="filter10727-9-2"
+       color-interpolation-filters="sRGB">
+      <feColorMatrix
+         values="91.609353507565331"
+         type="hueRotate"
+         id="feColorMatrix10729-0-7" />
+    </filter>
+    <clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath4508">
+      <rect
+         style="opacity:0.28163267;fill:#222222;fill-opacity:1;stroke:#414141;stroke-width:24.60760307;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="rect4510"
+         width="1420.2938"
+         height="818.34723"
+         x="-344.77484"
+         y="-255.36827"
+         rx="41.918407"
+         ry="118.42776" />
+    </clipPath>
+    <clipPath
+       clipPathUnits="userSpaceOnUse"
+       id="clipPath4504-2">
+      <rect
+         style="opacity:0.28163267;fill:#222222;fill-opacity:1;stroke:#414141;stroke-width:24.60760307;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none"
+         id="rect4506-45"
+         width="1420.2938"
+         height="818.34723"
+         x="-344.77484"
+         y="-255.36827"
+         rx="41.918407"
+         ry="118.42776" />
+    </clipPath>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8144">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="2.7589726"
+         id="feGaussianBlur8146" />
+    </filter>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient4835-717"
+       id="radialGradient2723"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1,0,0,1.1450096,-149.50073,-83.798866)"
+       spreadMethod="pad"
+       cx="506.53619"
+       cy="382.54471"
+       fx="506.53619"
+       fy="382.54471"
+       r="256.77951" />
+    <linearGradient
+       id="linearGradient4835-717">
+      <stop
+         id="stop2445"
+         offset="0"
+         style="stop-color:#004d0a;stop-opacity:1;" />
+      <stop
+         id="stop2447"
+         offset="1"
+         style="stop-color:#82a200;stop-opacity:1;" />
+    </linearGradient>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8048"
+       x="-0.3198064"
+       width="1.6396128"
+       y="-0.067081399"
+       height="1.1341628">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="6.1505141"
+         id="feGaussianBlur8050" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8044"
+       x="-0.32565096"
+       width="1.6513019"
+       y="-0.050140463"
+       height="1.1002809">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="6.1505141"
+         id="feGaussianBlur8046" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8040"
+       x="-0.16028415"
+       width="1.3205683"
+       y="-0.050845541"
+       height="1.1016911">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="6.1505141"
+         id="feGaussianBlur8042" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8036"
+       x="-0.101408"
+       width="1.202816"
+       y="-0.050108138"
+       height="1.1002163">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="6.1505141"
+         id="feGaussianBlur8038" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8032">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="6.1505141"
+         id="feGaussianBlur8034" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8028"
+       x="-0.12262698"
+       width="1.245254"
+       y="-0.050789628"
+       height="1.1015793">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="6.1505141"
+         id="feGaussianBlur8030" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8024">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="6.1505141"
+         id="feGaussianBlur8026" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8020">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="6.1505141"
+         id="feGaussianBlur8022" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8016">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="6.1505141"
+         id="feGaussianBlur8018" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8012"
+       x="-0.55770385"
+       width="2.1154077"
+       y="-0.045776103"
+       height="1.0915523">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="6.1505141"
+         id="feGaussianBlur8014" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8008">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="6.1505141"
+         id="feGaussianBlur8010" />
+    </filter>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter8164">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="5.2340473"
+         id="feGaussianBlur8166" />
+    </filter>
+    <filter
+       id="filter8391"
+       inkscape:label="Drop Shadow"
+       color-interpolation-filters="sRGB">
+      <feFlood
+         id="feFlood8393"
+         flood-opacity="0.35"
+         flood-color="rgb(0,0,0)"
+         result="flood" />
+      <feComposite
+         id="feComposite8395"
+         in2="SourceGraphic"
+         in="flood"
+         operator="in"
+         result="composite1" />
+      <feGaussianBlur
+         id="feGaussianBlur8397"
+         stdDeviation="3"
+         result="blur" />
+      <feOffset
+         id="feOffset8399"
+         dx="3"
+         dy="3"
+         result="offset" />
+      <feComposite
+         id="feComposite8401"
+         in2="offset"
+         in="SourceGraphic"
+         operator="over"
+         result="composite2" />
+    </filter>
+    <linearGradient
+       id="linearGradient3879">
+      <stop
+         style="stop-color:#9c9c9c;stop-opacity:1;"
+         offset="0"
+         id="stop3881" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop3883" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3786"
+       inkscape:collect="always">
+      <stop
+         id="stop3788"
+         offset="0"
+         style="stop-color:#d5f6ff;stop-opacity:1;" />
+      <stop
+         id="stop3790"
+         offset="1"
+         style="stop-color:#0098be;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient2836"
+       inkscape:collect="always">
+      <stop
+         id="stop2838"
+         offset="0"
+         style="stop-color:#999999;stop-opacity:1" />
+      <stop
+         id="stop2840"
+         offset="1"
+         style="stop-color:#e6e6e6;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3234">
+      <stop
+         style="stop-color:#9c9c9c;stop-opacity:1;"
+         offset="0"
+         id="stop3236" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop3238" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3848">
+      <path
+         inkscape:connector-curvature="0"
+         mask="none"
+         style="opacity:0.78846154;fill:url(#radialGradient3852);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3850" />
+    </mask>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3842"
+       id="radialGradient3852"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5623658,0,0,0.84386701,-49.215801,156.39732)"
+       cx="87.515625"
+       cy="851.13416"
+       fx="87.515625"
+       fy="851.13416"
+       r="54.046875" />
+    <linearGradient
+       id="linearGradient3842"
+       inkscape:collect="always">
+      <stop
+         id="stop3844"
+         offset="0"
+         style="stop-color:#666666;stop-opacity:1" />
+      <stop
+         id="stop3846"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3772">
+      <path
+         inkscape:connector-curvature="0"
+         id="path3774"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         style="fill:url(#linearGradient3776-1);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709-1"
+       id="linearGradient3776-1"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0,3.426562e-6)"
+       x1="33.46875"
+       y1="854.68097"
+       x2="141.5625"
+       y2="854.68097" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3709-1">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop3711-7" />
+      <stop
+         style="stop-color:#4d4d4d;stop-opacity:1"
+         offset="1"
+         id="stop3713-4" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3719">
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:url(#linearGradient3723);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3721" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709"
+       id="linearGradient3723"
+       gradientUnits="userSpaceOnUse"
+       x1="87.515625"
+       y1="829.03296"
+       x2="87.515625"
+       y2="887.91498" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3709">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop3711" />
+      <stop
+         style="stop-color:#4d4d4d;stop-opacity:1"
+         offset="1"
+         id="stop3713" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3258">
+      <path
+         inkscape:connector-curvature="0"
+         mask="none"
+         style="opacity:0.78846154;fill:url(#radialGradient3852);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3260" />
+    </mask>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3842"
+       id="radialGradient3262"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5623658,0,0,0.84386701,-49.215801,156.39732)"
+       cx="87.515625"
+       cy="851.13416"
+       fx="87.515625"
+       fy="851.13416"
+       r="54.046875" />
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3270">
+      <path
+         inkscape:connector-curvature="0"
+         id="path3272"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         style="fill:url(#linearGradient3776-1);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709-1"
+       id="linearGradient3274"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0,3.426562e-6)"
+       x1="33.46875"
+       y1="854.68097"
+       x2="141.5625"
+       y2="854.68097" />
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3282">
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:url(#linearGradient3723);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3284" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709"
+       id="linearGradient3286"
+       gradientUnits="userSpaceOnUse"
+       x1="87.515625"
+       y1="829.03296"
+       x2="87.515625"
+       y2="887.91498" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3842"
+       id="radialGradient3545"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.7951974,0.74897089,-0.92973401,3.4698146,-136.5708,-548.08768)"
+       cx="165.0791"
+       cy="171.85429"
+       fx="165.0791"
+       fy="171.85429"
+       r="11.283379" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879"
+       id="linearGradient3547"
+       gradientUnits="userSpaceOnUse"
+       x1="164.5791"
+       y1="171.57541"
+       x2="143.01236"
+       y2="143.57001" />
+    <linearGradient
+       id="linearGradient3302-4">
+      <stop
+         style="stop-color:#9c9c9c;stop-opacity:1;"
+         offset="0"
+         id="stop3304-0" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop3306-9" />
+    </linearGradient>
+    <linearGradient
+       id="linearGradient3932">
+      <stop
+         id="stop3934"
+         offset="0"
+         style="stop-color:#00b7d8;stop-opacity:1;" />
+      <stop
+         style="stop-color:#b5e7ff;stop-opacity:1;"
+         offset="0.31135339"
+         id="stop3938" />
+      <stop
+         id="stop3940"
+         offset="0.70969218"
+         style="stop-color:#1accec;stop-opacity:1;" />
+      <stop
+         id="stop3936"
+         offset="1"
+         style="stop-color:#006288;stop-opacity:1;" />
+    </linearGradient>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter4102">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="5.728125"
+         id="feGaussianBlur4104" />
+    </filter>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3932"
+       id="linearGradient7008"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.22602241,0,0,0.22602241,-215.24965,-1473.1525)"
+       x1="763.36316"
+       y1="570.19403"
+       x2="763.23535"
+       y2="545.37799" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879"
+       id="linearGradient7021"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.33062781,0,0,0.33062781,872.90177,-1032.162)"
+       x1="130.627"
+       y1="143.61298"
+       x2="142.95343"
+       y2="111.64885" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2836"
+       id="linearGradient7024"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.1192877,0,0,0.1192877,872.55004,-1037.285)"
+       x1="298.58945"
+       y1="445.73376"
+       x2="298.58945"
+       y2="117.73463" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3786"
+       id="radialGradient7027"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.35638976,0,0,0.35600686,874.96239,-1320.8686)"
+       cx="87.456055"
+       cy="939.89185"
+       fx="87.456055"
+       fy="939.89185"
+       r="56.45491" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879"
+       id="linearGradient7030"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.22602241,0,0,0.22602241,-220.84342,-1474.3511)"
+       x1="765.03625"
+       y1="581.32336"
+       x2="765.03625"
+       y2="545.69836" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879"
+       id="linearGradient8424"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.22602241,0,0,0.22602241,-220.84342,-1474.3511)"
+       x1="765.03625"
+       y1="581.32336"
+       x2="765.03625"
+       y2="545.69836" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3786"
+       id="radialGradient8426"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.35638976,0,0,0.35600686,874.96239,-1320.8686)"
+       cx="87.456055"
+       cy="939.89185"
+       fx="87.456055"
+       fy="939.89185"
+       r="56.45491" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2836"
+       id="linearGradient8428"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.1192877,0,0,0.1192877,872.55004,-1037.285)"
+       x1="298.58945"
+       y1="445.73376"
+       x2="298.58945"
+       y2="117.73463" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879"
+       id="linearGradient8430"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.33062781,0,0,0.33062781,872.90177,-1032.162)"
+       x1="130.627"
+       y1="143.61298"
+       x2="142.95343"
+       y2="111.64885" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3842"
+       id="radialGradient8432"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.7951974,0.74897089,-0.92973401,3.4698146,-136.5708,-548.08768)"
+       cx="165.0791"
+       cy="171.85429"
+       fx="165.0791"
+       fy="171.85429"
+       r="11.283379" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879"
+       id="linearGradient8434"
+       gradientUnits="userSpaceOnUse"
+       x1="164.5791"
+       y1="171.57541"
+       x2="143.01236"
+       y2="143.57001" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3932"
+       id="linearGradient8436"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.22602241,0,0,0.22602241,-215.24965,-1473.1525)"
+       x1="763.36316"
+       y1="570.19403"
+       x2="763.23535"
+       y2="545.37799" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879-5"
+       id="linearGradient3537"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1862691,0,0,1.1862691,-130.76538,-102.74484)"
+       x1="765.03625"
+       y1="581.32336"
+       x2="765.03625"
+       y2="545.69836" />
+    <linearGradient
+       id="linearGradient3879-5">
+      <stop
+         style="stop-color:#9c9c9c;stop-opacity:1;"
+         offset="0"
+         id="stop3881-1" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop3883-0" />
+    </linearGradient>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3786-9"
+       id="radialGradient3539"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.8704967,0,0,1.8684871,-79.653359,-806.39971)"
+       cx="87.456055"
+       cy="939.89185"
+       fx="87.456055"
+       fy="939.89185"
+       r="56.45491" />
+    <linearGradient
+       id="linearGradient3786-9"
+       inkscape:collect="always">
+      <stop
+         id="stop3788-9"
+         offset="0"
+         style="stop-color:#d5f6ff;stop-opacity:1;" />
+      <stop
+         id="stop3790-6"
+         offset="1"
+         style="stop-color:#0098be;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2836-8"
+       id="linearGradient3541"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.6260765,0,0,0.6260765,-92.314478,681.97677)"
+       x1="298.58945"
+       y1="445.73376"
+       x2="298.58945"
+       y2="117.73463" />
+    <linearGradient
+       id="linearGradient2836-8"
+       inkscape:collect="always">
+      <stop
+         id="stop2838-3"
+         offset="0"
+         style="stop-color:#999999;stop-opacity:1" />
+      <stop
+         id="stop2840-4"
+         offset="1"
+         style="stop-color:#e6e6e6;stop-opacity:1" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879-5"
+       id="linearGradient3543"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.7352862,0,0,1.7352862,-90.468415,708.86477)"
+       x1="130.627"
+       y1="143.61298"
+       x2="142.95343"
+       y2="111.64885" />
+    <linearGradient
+       id="linearGradient3356">
+      <stop
+         style="stop-color:#9c9c9c;stop-opacity:1;"
+         offset="0"
+         id="stop3358" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop3360" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3848-8">
+      <path
+         inkscape:connector-curvature="0"
+         mask="none"
+         style="opacity:0.78846154000000002;fill:url(#radialGradient3852-9);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3850-4" />
+    </mask>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3842-9"
+       id="radialGradient3852-9"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5623658,0,0,0.84386701,-49.215801,156.39732)"
+       cx="87.515625"
+       cy="851.13416"
+       fx="87.515625"
+       fy="851.13416"
+       r="54.046875" />
+    <linearGradient
+       id="linearGradient3842-9"
+       inkscape:collect="always">
+      <stop
+         id="stop3844-2"
+         offset="0"
+         style="stop-color:#666666;stop-opacity:1" />
+      <stop
+         id="stop3846-5"
+         offset="1"
+         style="stop-color:#ffffff;stop-opacity:1" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3772-5">
+      <path
+         inkscape:connector-curvature="0"
+         id="path3774-3"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         style="fill:url(#linearGradient3776-1-3);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709-1-3"
+       id="linearGradient3776-1-3"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0,3.426562e-6)"
+       x1="33.46875"
+       y1="854.68097"
+       x2="141.5625"
+       y2="854.68097" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3709-1-3">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop3711-7-7" />
+      <stop
+         style="stop-color:#4d4d4d;stop-opacity:1"
+         offset="1"
+         id="stop3713-4-4" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3719-3">
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:url(#linearGradient3723-0);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3721-8" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709-8"
+       id="linearGradient3723-0"
+       gradientUnits="userSpaceOnUse"
+       x1="87.515625"
+       y1="829.03296"
+       x2="87.515625"
+       y2="887.91498" />
+    <linearGradient
+       inkscape:collect="always"
+       id="linearGradient3709-8">
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1;"
+         offset="0"
+         id="stop3711-8" />
+      <stop
+         style="stop-color:#4d4d4d;stop-opacity:1"
+         offset="1"
+         id="stop3713-0" />
+    </linearGradient>
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3380">
+      <path
+         inkscape:connector-curvature="0"
+         mask="none"
+         style="opacity:0.78846154000000002;fill:url(#radialGradient3852-9);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3382" />
+    </mask>
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3842-9"
+       id="radialGradient3384"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.5623658,0,0,0.84386701,-49.215801,156.39732)"
+       cx="87.515625"
+       cy="851.13416"
+       fx="87.515625"
+       fy="851.13416"
+       r="54.046875" />
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3392">
+      <path
+         inkscape:connector-curvature="0"
+         id="path3394"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         style="fill:url(#linearGradient3776-1-3);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709-1-3"
+       id="linearGradient3396"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="translate(0,3.426562e-6)"
+       x1="33.46875"
+       y1="854.68097"
+       x2="141.5625"
+       y2="854.68097" />
+    <mask
+       maskUnits="userSpaceOnUse"
+       id="mask3404">
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:url(#linearGradient3723-0);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+         id="path3406" />
+    </mask>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3709-8"
+       id="linearGradient3408"
+       gradientUnits="userSpaceOnUse"
+       x1="87.515625"
+       y1="829.03296"
+       x2="87.515625"
+       y2="887.91498" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3842-9"
+       id="radialGradient3545-6"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.7951974,0.74897089,-0.92973401,3.4698146,-136.5708,-548.08768)"
+       cx="165.0791"
+       cy="171.85429"
+       fx="165.0791"
+       fy="171.85429"
+       r="11.283379" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879-5"
+       id="linearGradient3547-8"
+       gradientUnits="userSpaceOnUse"
+       x1="164.5791"
+       y1="171.57541"
+       x2="143.01236"
+       y2="143.57001" />
+    <linearGradient
+       id="linearGradient3424">
+      <stop
+         style="stop-color:#9c9c9c;stop-opacity:1;"
+         offset="0"
+         id="stop3426" />
+      <stop
+         style="stop-color:#ffffff;stop-opacity:1"
+         offset="1"
+         id="stop3428" />
+    </linearGradient>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3932-1"
+       id="linearGradient3549"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1862691,0,0,1.1862691,-101.40672,-96.453697)"
+       x1="763.36316"
+       y1="570.19403"
+       x2="763.23535"
+       y2="545.37799" />
+    <linearGradient
+       id="linearGradient3932-1">
+      <stop
+         id="stop3934-9"
+         offset="0"
+         style="stop-color:#d81c00;stop-opacity:1;" />
+      <stop
+         style="stop-color:#ffb5b5;stop-opacity:1;"
+         offset="0.31135339"
+         id="stop3938-8" />
+      <stop
+         id="stop3940-9"
+         offset="0.70969218"
+         style="stop-color:#ec1a1a;stop-opacity:1;" />
+      <stop
+         id="stop3936-7"
+         offset="1"
+         style="stop-color:#880000;stop-opacity:1;" />
+    </linearGradient>
+    <filter
+       color-interpolation-filters="sRGB"
+       inkscape:collect="always"
+       id="filter4102-2">
+      <feGaussianBlur
+         inkscape:collect="always"
+         stdDeviation="5.728125"
+         id="feGaussianBlur4104-2" />
+    </filter>
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879-5"
+       id="linearGradient8632"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1862691,0,0,1.1862691,-130.76538,-102.74484)"
+       x1="765.03625"
+       y1="581.32336"
+       x2="765.03625"
+       y2="545.69836" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3786-9"
+       id="radialGradient8634"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.8704967,0,0,1.8684871,-79.653359,-806.39971)"
+       cx="87.456055"
+       cy="939.89185"
+       fx="87.456055"
+       fy="939.89185"
+       r="56.45491" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient2836-8"
+       id="linearGradient8636"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(0.6260765,0,0,0.6260765,-92.314478,681.97677)"
+       x1="298.58945"
+       y1="445.73376"
+       x2="298.58945"
+       y2="117.73463" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879-5"
+       id="linearGradient8638"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.7352862,0,0,1.7352862,-90.468415,708.86477)"
+       x1="130.627"
+       y1="143.61298"
+       x2="142.95343"
+       y2="111.64885" />
+    <radialGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3842-9"
+       id="radialGradient8640"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(2.7951974,0.74897089,-0.92973401,3.4698146,-136.5708,-548.08768)"
+       cx="165.0791"
+       cy="171.85429"
+       fx="165.0791"
+       fy="171.85429"
+       r="11.283379" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3879-5"
+       id="linearGradient8642"
+       gradientUnits="userSpaceOnUse"
+       x1="164.5791"
+       y1="171.57541"
+       x2="143.01236"
+       y2="143.57001" />
+    <linearGradient
+       inkscape:collect="always"
+       xlink:href="#linearGradient3932-1"
+       id="linearGradient8644"
+       gradientUnits="userSpaceOnUse"
+       gradientTransform="matrix(1.1862691,0,0,1.1862691,-101.40672,-96.453697)"
+       x1="763.36316"
+       y1="570.19403"
+       x2="763.23535"
+       y2="545.37799" />
+  </defs>
+  <metadata
+     id="metadata3095">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+        <dc:title></dc:title>
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <g
+     transform="translate(-816.14654,1021.272)"
+     id="layer1"
+     inkscape:groupmode="layer"
+     inkscape:label="Capa 1">
+    <g
+       id="g7265"
+       transform="translate(-74.268997,-62.343371)" />
+    <flowRoot
+       transform="translate(305.60706,-1304.5302)"
+       style="font-size:40px;font-style:normal;font-weight:normal;line-height:125%;letter-spacing:0px;word-spacing:0px;fill:#000000;fill-opacity:1;stroke:none;font-family:Sans"
+       id="flowRoot6890"
+       xml:space="preserve"><flowRegion
+         id="flowRegion6892"><rect
+           y="-198.42101"
+           x="478.79324"
+           height="276.22687"
+           width="408.81577"
+           id="rect6894" /></flowRegion><flowPara
+         id="flowPara6896" /></flowRoot>    <path
+       inkscape:connector-curvature="0"
+       d="m 966.26061,-1131.3362 c -13.1534,-3.5244 -26.46441,0.5089 -35.6538,9.2713 -4.80111,-5.7709 -11.30201,-10.2248 -19.09951,-12.314 -20.06784,-5.377 -40.74126,6.5586 -46.11846,26.6265 -0.39513,1.4747 -0.49915,2.9575 -0.71105,4.4323 -18.07206,-1.8785 -35.36415,9.435 -40.21558,27.5409 -4.80708,17.9403 4.26414,36.2848 20.5682,43.8273 -0.88625,1.9219 -1.71259,3.9018 -2.27871,6.0143 -5.3771,20.0679 6.57057,40.69688 26.63843,46.07393 9.82928,2.63411 19.76259,1.08736 28.00842,-3.50405 4. [...]
+       id="path4952"
+       style="fill:url(#radialGradient6798);fill-opacity:1;stroke:#545801;stroke-width:1;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;filter:url(#filter8600)"
+       transform="matrix(0.2932655,0,0,0.2932655,576.55236,-683.77158)" />
+    <g
+       transform="matrix(0.06040365,0,0,0.06040365,826.9035,-1011.2641)"
+       id="g2462"
+       style="filter:url(#filter8391)">
+      <path
+         inkscape:connector-curvature="0"
+         style="opacity:0.12643678;fill:#000000;fill-opacity:1;stroke:#0b4e0b;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker-start:none;filter:url(#filter8144)"
+         d="m 328.67485,656.69784 c -0.29655,-0.39955 -1.20089,-0.84695 -2.00965,-0.99423 -2.29959,-0.41875 -1.62815,-3.80633 2.72912,-13.76904 5.02423,-11.48767 4.61797,-10.4634 8.87668,-22.37971 6.9092,-19.33262 15.44662,-48.90301 19.6831,-68.1749 3.30988,-15.05673 2.68926,-10.9729 6.98309,-45.95042 2.75362,-22.43101 3.23501,-43.05223 1.39578,-59.79086 -0.97543,-8.87728 -7.7315,-27.47582 -12.90632,-35.52935 -9.05567,-14.09328 -42.09907,-52.5518 -45.69137,-53.17923 -0.54907,-0.0959 -2.8 [...]
+         id="path8140"
+         sodipodi:nodetypes="cssssssssssssssssssssssssssssssscccscccsssssssssssssssssssssssssssssssssssssssc" />
+      <path
+         inkscape:connector-curvature="0"
+         style="fill:url(#radialGradient2723);fill-opacity:1;stroke:#0b4e0b;stroke-width:1;stroke-linecap:butt;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;stroke-dashoffset:0;marker-start:none"
+         d="m 323.30734,647.51514 c -0.29655,-0.39955 -1.20089,-0.84695 -2.00965,-0.99423 -2.29959,-0.41875 -1.62815,-3.80633 2.72912,-13.76904 5.02423,-11.48767 4.61797,-10.4634 8.87668,-22.37971 6.9092,-19.33262 15.44662,-48.90301 19.6831,-68.1749 3.30988,-15.05673 2.68926,-10.9729 6.98309,-45.95042 2.75362,-22.43101 3.23501,-43.05223 1.39578,-59.79086 -0.97543,-8.87728 -7.7315,-27.47582 -12.90632,-35.52935 -9.05567,-14.09328 -42.09907,-52.5518 -45.69137,-53.17923 -0.54907,-0.0959 -2.8 [...]
+         id="path2409"
+         sodipodi:nodetypes="cssssssssssssssssssssssssssssssscccscccsssssssssssssssssssssssssssssssssssssssc" />
+      <path
+         inkscape:connector-curvature="0"
+         d="m 325.97176,181.12667 c 1.10398,2.39623 1.9503,4.89021 2.85321,7.36497 1.28578,3.24894 1.73094,6.67041 2.26202,10.0937 0.58596,4.97993 1.14312,9.96239 1.72769,14.94241 0.73707,5.15283 1.69976,10.27314 2.65752,15.38927 1.13049,5.46688 2.31368,10.92367 3.61805,16.35207 1.07554,3.56406 1.62686,7.2597 2.54198,10.86131 0.45769,1.8013 1.03756,3.56934 1.55061,5.35565 1.3634,4.5696 2.75968,9.16194 4.68916,13.5292 1.31351,2.93461 2.53453,5.91437 3.86631,8.84069 1.17788,2.6156 1.85606, [...]
+         id="path3591"
+         style="opacity:0.27203064;fill:#004600;fill-opacity:1;stroke:none;filter:url(#filter8048)" />
+      <path
+         inkscape:connector-curvature="0"
+         d="m 405.95197,72.758508 c -2.5247,3.34412 -4.18887,7.231448 -5.92811,11.01789 -2.36232,4.803185 -3.92476,9.886302 -5.10836,15.088783 -1.09156,6.065289 -1.38441,12.245299 -1.77711,18.387589 -0.58025,6.28176 -1.35777,12.54806 -2.25707,18.79213 -1.11713,8.66023 -2.13659,17.33327 -2.83567,26.0378 -0.8697,9.2686 -1.36563,18.56738 -1.54588,27.87361 -0.30529,8.19842 -0.57585,16.396 -0.61859,24.60031 0.14655,6.04472 0.58415,12.07787 1.09046,18.10156 0.66737,6.36819 1.4756,12.7136 1.881 [...]
+         id="path3593"
+         style="opacity:0.27203064;fill:#004600;fill-opacity:1;stroke:none;filter:url(#filter8044)" />
+      <path
+         inkscape:connector-curvature="0"
+         d="m 453.49479,92.364428 c -5.4266,2.464329 -9.08837,7.313177 -12.56939,11.947932 -5.59625,8.10296 -10.40376,16.77947 -13.86265,26.01565 -0.77352,2.06553 -1.41838,4.17699 -2.12758,6.26549 -4.29127,13.85122 -5.52796,28.36208 -6.34458,42.76419 -0.48669,9.77285 -0.27276,19.5572 -0.0406,29.33303 -0.0869,3.70382 0.42636,7.43679 0.13161,11.13811 -0.16036,2.01366 -0.49281,3.3305 -0.89633,5.3128 -1.3566,6.5321 -4.23193,12.57645 -6.91128,18.64 -3.00515,6.65759 -6.13555,13.25908 -9.07749, [...]
+         id="path3595"
+         style="opacity:0.27203064;fill:#004600;fill-opacity:1;stroke:none;filter:url(#filter8040)" />
+      <path
+         inkscape:connector-curvature="0"
+         d="m 356.70506,400.97809 c 2.82438,-5.31656 4.98898,-10.94782 7.14056,-16.56033 2.46514,-6.44322 4.06952,-13.16081 6.20093,-19.71182 1.38827,-4.58983 4.08831,-8.54915 6.73516,-12.48488 3.55452,-5.30801 7.19899,-10.55542 10.99953,-15.69028 5.07602,-6.84491 9.54008,-13.93405 13.58413,-21.42991 4.99185,-9.6327 9.45481,-19.52515 14.08643,-29.33314 5.40886,-11.99574 10.60046,-24.08004 16.43832,-35.87662 6.05741,-12.37027 13.455,-23.9874 20.62307,-35.72321 4.54078,-7.75226 8.87291,-15 [...]
+         id="path3597"
+         style="opacity:0.27203064;fill:#004600;fill-opacity:1;stroke:none;filter:url(#filter8036)" />
+      <path
+         inkscape:connector-curvature="0"
+         d="m 555.5249,140.30471 c -4.69559,2.20259 -8.6056,5.59134 -12.38527,9.07308 -6.2608,6.37266 -11.27267,13.86746 -16.02162,21.39951 -5.46652,8.64557 -10.69185,17.43952 -15.76592,26.32005 -4.51297,8.35665 -9.76643,16.28007 -15.16879,24.08046 -4.48128,6.37452 -9.18252,12.5974 -14.334,18.44625 -3.00061,3.57306 -6.41782,6.7087 -10.17696,9.45687 -4.56099,3.18894 -9.06166,6.46213 -13.48529,9.83901 -5.62137,4.2134 -11.14925,8.54907 -16.6953,12.86129 -6.49905,4.96 -12.45713,10.53344 -18. [...]
+         id="path3599"
+         style="opacity:0.27203064;fill:#004600;fill-opacity:1;stroke:none;stroke-width:1;marker-start:none;marker-end:none;filter:url(#filter8032)" />
+      <path
+         inkscape:connector-curvature="0"
+         d="m 359.04111,399.40548 c 0.70122,-3.92828 0.77837,-7.93669 0.90205,-11.91567 0.21649,-6.11347 -1.66108,-11.88046 -3.5681,-17.59878 -2.75755,-7.87701 -6.52261,-15.34645 -10.50306,-22.66376 -5.13457,-9.5507 -10.83119,-18.78149 -16.26529,-28.1611 -6.12716,-10.70429 -11.83655,-21.62695 -17.1532,-32.75347 -4.31267,-8.82769 -8.3336,-17.79049 -12.00831,-26.90199 -2.4353,-5.88626 -3.97889,-12.07398 -5.45365,-18.25331 -1.21406,-5.53391 -1.88102,-11.16768 -2.7448,-16.76386 -0.72323,-6.1 [...]
+         id="path3601"
+         style="opacity:0.27203064;fill:#004600;fill-opacity:1;stroke:none;filter:url(#filter8028)" />
+      <path
+         inkscape:connector-curvature="0"
+         d="m 203.26785,142.85331 c 5.39631,2.99172 10.5602,6.30152 15.5651,9.90809 6.48201,4.93414 11.54279,11.39388 15.4797,18.48885 0.86959,1.56715 1.62065,3.19719 2.43097,4.79579 4.28342,8.80313 7.35759,18.08258 9.95073,27.49837 1.1344,3.43222 1.91505,6.98707 3.12091,10.39668 1.00804,2.8503 2.36531,5.57385 3.72165,8.26808 2.66811,4.92693 6.13626,9.30722 9.83936,13.48254 3.54371,3.65719 7.12688,7.26373 10.42337,11.15134 3.72886,4.17365 6.66123,8.95075 9.3469,13.83657 2.88188,5.96392 6 [...]
+         id="path3603"
+         style="opacity:0.27203064;fill:#004600;fill-opacity:1;stroke:none;filter:url(#filter8024)" />
+      <path
+         inkscape:connector-curvature="0"
+         d="m 162.97391,163.80259 c 4.34439,2.56028 8.77242,4.96166 13.0343,7.66204 6.14727,3.73685 11.42701,8.62831 16.46037,13.71876 5.40634,5.72966 9.48091,12.53218 13.49412,19.26663 3.70982,6.17171 6.78056,12.69729 10.4237,18.90236 2.86459,4.81975 6.10836,9.38235 9.75859,13.63434 2.41338,2.95967 5.40089,5.23273 8.64919,7.18332 3.97113,2.20821 8.11784,4.06294 12.08144,6.28439 2.20356,1.49936 4.48595,3.07195 6.31034,5.04224 0.98114,1.05959 1.6362,2.07458 2.46343,3.25063 2.90378,4.48603 [...]
+         id="path3605"
+         style="opacity:0.27203064;fill:#004600;fill-opacity:1;stroke:none;filter:url(#filter8020)" />
+      <path
+         inkscape:connector-curvature="0"
+         d="m 128.35036,210.78055 c 1.91574,0.99054 4.01308,1.56054 5.96546,2.47155 1.20563,0.56257 2.36543,1.2186 3.55235,1.81963 4.89629,2.73898 9.53523,5.8977 14.31407,8.82826 6.15516,3.96824 12.60224,7.4552 18.76397,11.40976 4.6846,2.97715 9.32356,6.0224 13.93008,9.11873 3.98593,2.70963 8.19369,5.066 12.25326,7.6548 3.71834,2.36085 7.31675,4.92858 10.67653,7.77694 3.99636,3.47924 7.98797,6.96632 12.05531,10.36413 2.81592,2.06257 5.65521,4.16894 8.74611,5.81317 1.43263,0.76211 2.92544 [...]
+         id="path3607"
+         style="opacity:0.27203064;fill:#004600;fill-opacity:1;stroke:none;filter:url(#filter8016)" />
+      <path
+         inkscape:connector-curvature="0"
+         d="m 355.54446,70.165078 c -2.38101,4.248907 -3.66616,8.997015 -4.87764,13.68324 -1.36321,5.074697 -2.23242,10.258875 -2.24851,15.514926 0.43172,8.104356 3.28557,15.750716 5.8689,23.356436 1.97133,5.57989 4.08481,11.11518 5.47783,16.87368 0.80176,4.37816 1.23239,8.81342 1.50823,13.25252 0.246,5.11691 -0.18453,10.23915 -0.36184,15.35409 -0.34367,6.05844 -0.18455,12.12649 0.27637,18.17317 0.52983,5.9725 1.3637,11.91779 2.19765,17.85551 0.82148,5.51069 1.56329,11.02972 2.22722,16.5 [...]
+         id="path3609"
+         style="opacity:0.27203064;fill:#004600;fill-opacity:1;stroke:none;filter:url(#filter8012)" />
+      <path
+         inkscape:connector-curvature="0"
+         d="m 599.4789,173.0437 c -3.13264,2.15815 -6.0754,4.58501 -8.90052,7.12856 -3.50642,2.99627 -6.72881,6.30279 -9.97296,9.57552 -3.03279,3.23669 -5.88544,6.63814 -8.74823,10.02487 -2.57796,3.19878 -5.50719,6.05541 -8.42242,8.93836 -3.14089,3.04388 -6.19126,6.1743 -9.25571,9.29411 -2.66478,3.11567 -6.00623,5.38737 -9.51114,7.43983 -3.83559,2.36717 -8.1212,3.85777 -12.34704,5.36271 -4.94554,1.696 -9.91559,3.30785 -14.78267,5.22073 -4.90445,1.96436 -9.49276,4.58821 -14.14138,7.074 -3 [...]
+         id="path3611"
+         style="opacity:0.27203064;fill:#004600;fill-opacity:1;stroke:none;filter:url(#filter8008)" />
+      <text
+         id="text8132"
+         y="343.96573"
+         x="-120.2768"
+         style="font-size:144px;font-style:normal;font-weight:normal;fill:#000000;fill-opacity:1;stroke:none;font-family:Bitstream Vera Sans"
+         xml:space="preserve"><tspan
+           y="343.96573"
+           x="-120.2768"
+           id="tspan8134"
+           sodipodi:role="line" /></text>
+      <path
+         inkscape:connector-curvature="0"
+         style="opacity:0.09578546;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1;marker-start:none;filter:url(#filter8164)"
+         d="m 322.71219,624.20073 c -0.2828,-0.37851 -1.1452,-0.80235 -1.91645,-0.94188 -2.19294,-0.3967 -1.55264,-3.60591 2.60255,-13.04404 4.79123,-10.88279 4.40381,-9.91245 8.46501,-21.20132 6.58878,-18.31467 14.73026,-46.32805 18.77026,-64.58519 3.15638,-14.26393 2.56454,-10.39513 6.65924,-43.53093 2.62592,-21.24992 3.08498,-40.78534 1.33105,-56.64261 -0.93019,-8.40986 -7.37294,-26.0291 -12.30777,-33.65858 -8.6357,-13.3512 -40.14665,-49.78472 -43.57235,-50.37911 -0.52361,-0.0908 -2.7 [...]
+         id="path8148"
+         sodipodi:nodetypes="cssssssssssssssssssssssssssssssscccscccsssssssssssssssssssssssssssssssssssssssc" />
+    </g>
+    <g
+       id="g8406"
+       transform="matrix(0.85814735,0,0,0.85814735,70.921545,-134.04628)">
+      <path
+         transform="matrix(0.19053215,0,0,0.19053215,890.66792,-1166.384)"
+         inkscape:connector-curvature="0"
+         id="rect3971"
+         d="m 83.875,810.01843 c -40.2578,0 -72.875,32.6172 -72.875,72.875 0,40.2578 32.6172,72.875 72.875,72.875 13.2715,0 25.71701,-3.55532 36.4375,-9.75 3.30469,3.03958 7.68735,4.9375 12.53125,4.9375 1.99215,0 3.91915,-0.32441 5.71875,-0.90625 l 11.78125,11.78125 c 0.0921,2.5836 1.04084,4.96033 2.59375,6.8125 l -2.34375,2.34375 67.84375,67.84372 2.65625,-2.6562 c 2.00433,1.9184 4.72523,3.125 7.71875,3.125 6.16398,0 11.15625,-5.0235 11.15625,-11.1875 0,-3.0019 -1.19712,-5.7128 -3.125,- [...]
+         style="opacity:0.39183673;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;filter:url(#filter4102)" />
+      <rect
+         transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)"
+         y="-1348.5248"
+         x="-50.414314"
+         height="3.0795553"
+         width="4.9724932"
+         id="rect3904"
+         style="fill:url(#linearGradient8424);fill-opacity:1;fill-rule:evenodd;stroke:none" />
+      <path
+         id="path2856"
+         d="m 906.11957,-1011.7518 c -5.65268,-0.095 -11.02589,4.0674 -12.35238,9.564 -1.25306,4.77188 0.52758,10.18103 4.44865,13.20117 4.09065,3.27793 10.24006,3.66428 14.6582,0.80738 4.20611,-2.59973 6.65581,-7.76258 5.87144,-12.66405 -0.69833,-5.0018 -4.60871,-9.3814 -9.54404,-10.5294 -1.00715,-0.2493 -2.04435,-0.3767 -3.08187,-0.3791 z"
+         style="opacity:0.40384617;fill:url(#radialGradient8426);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path2816"
+         d="m 906.11957,-1012.889 c -7.6704,0 -13.88625,6.2159 -13.88625,13.88628 0,7.6704 6.21585,13.88625 13.88625,13.88625 7.67041,0 13.89332,-6.21585 13.89332,-13.88625 0,-7.67038 -6.22291,-13.88628 -13.89332,-13.88628 z m 0,1.1372 c 0.44,0 0.87818,0.027 1.3067,0.071 0.42851,0.044 0.84941,0.1058 1.26431,0.1907 0.4149,0.085 0.82279,0.1937 1.22193,0.3179 0.39915,0.1241 0.79124,0.2625 1.17249,0.4238 0.38126,0.1612 0.7477,0.3405 1.10893,0.5368 0.36123,0.1962 0.71334,0.4137 1.05241,0.6427 [...]
+         style="fill:url(#linearGradient8428);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         inkscape:connector-curvature="0" />
+      <path
+         id="path3890"
+         d="m 913.05564,-986.98115 c 0.63036,0.58246 1.46848,0.94646 2.39442,0.94646 1.95291,0 3.53867,-1.58574 3.53867,-3.53866 0,-0.91127 -0.35915,-1.73214 -0.92528,-2.35911 -0.13821,0.23258 -0.27265,0.46864 -0.42379,0.6922 -0.24973,0.36937 -0.51496,0.73071 -0.79815,1.0736 -0.28319,0.3429 -0.58271,0.66769 -0.89702,0.98179 -0.31432,0.31409 -0.64574,0.61405 -0.98885,0.89702 -0.34312,0.28297 -0.69697,0.54863 -1.06655,0.79815 -0.26787,0.18085 -0.55272,0.34631 -0.83345,0.50855 z"
+         style="fill:url(#linearGradient8430);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         inkscape:connector-curvature="0" />
+      <g
+         transform="matrix(0.2260224,0,0,0.2260224,886.3638,-1198.6836)"
+         id="g3868">
+        <g
+           id="g3860">
+          <g
+             mask="url(#mask3848)"
+             id="g3798">
+            <g
+               id="g3750"
+               mask="url(#mask3772)"
+               style="opacity:0.78846154">
+              <path
+                 id="path3725"
+                 d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+                 style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+                 mask="url(#mask3719)"
+                 inkscape:connector-curvature="0" />
+            </g>
+          </g>
+          <g
+             id="g3854"
+             mask="url(#mask3848)">
+            <g
+               style="opacity:0.78846154"
+               mask="url(#mask3772)"
+               id="g3856">
+              <path
+                 mask="url(#mask3719)"
+                 style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none"
+                 d="m 84.09375,829.08093 c -25.153026,1.24332 -47.920392,22.01569 -50.625,47.25 12.098726,10.7507 30.81239,16.08294 45.25,6.84375 8.656085,-5.61829 15.867557,-14.30779 26.6875,-15.71875 12.90875,-2.42731 25.77813,3.02585 36.15625,10.3125 -2.27545,-26.83607 -27.23872,-49.43791 -54.1875,-48.71875 -1.093733,0.0112 -2.188288,-0.0277 -3.28125,0.0312 z"
+                 id="path3858"
+                 inkscape:connector-curvature="0" />
+            </g>
+          </g>
+        </g>
+      </g>
+      <path
+         transform="matrix(0.19720205,0,0,0.19720205,890.57792,-1014.4771)"
+         d="m 164.57911,154.35339 c 0,5.9555 -4.82788,10.78338 -10.78338,10.78338 -5.95549,0 -10.78338,-4.82788 -10.78338,-10.78338 0,-5.95549 4.82789,-10.78338 10.78338,-10.78338 5.9555,0 10.78338,4.82789 10.78338,10.78338 z"
+         sodipodi:ry="10.783379"
+         sodipodi:rx="10.783379"
+         sodipodi:cy="154.35339"
+         sodipodi:cx="153.79573"
+         id="path3918"
+         style="fill:url(#radialGradient8432);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         sodipodi:type="arc" />
+      <path
+         sodipodi:type="arc"
+         style="fill:url(#linearGradient8434);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         id="path3942"
+         sodipodi:cx="153.79573"
+         sodipodi:cy="154.35339"
+         sodipodi:rx="10.783379"
+         sodipodi:ry="10.783379"
+         d="m 164.57911,154.35339 c 0,5.9555 -4.82788,10.78338 -10.78338,10.78338 -5.95549,0 -10.78338,-4.82788 -10.78338,-10.78338 0,-5.95549 4.82789,-10.78338 10.78338,-10.78338 5.9555,0 10.78338,4.82789 10.78338,10.78338 z"
+         transform="matrix(0.19720205,0,0,0.19720205,903.40363,-1001.7712)" />
+      <rect
+         style="fill:url(#linearGradient8436);fill-opacity:1;fill-rule:evenodd;stroke:none"
+         id="rect3928"
+         width="18.277674"
+         height="5.6367154"
+         x="-44.820549"
+         y="-1349.8833"
+         transform="matrix(0.70710678,0.70710678,-0.70710678,0.70710678,0,0)" />
+    </g>
+  </g>
+</svg>
diff --git a/cadxcore/resources/files/cine_bar/ico_bucle.png b/cadxcore/resources/files/cine_bar/ico_bucle.png
new file mode 100644
index 0000000..406ec33
Binary files /dev/null and b/cadxcore/resources/files/cine_bar/ico_bucle.png differ
diff --git a/cadxcore/resources/files/cine_bar/ico_cine.png b/cadxcore/resources/files/cine_bar/ico_cine.png
new file mode 100644
index 0000000..b0ce7bb
Binary files /dev/null and b/cadxcore/resources/files/cine_bar/ico_cine.png differ
diff --git a/cadxcore/resources/files/cine_bar/ico_no_bucle.png b/cadxcore/resources/files/cine_bar/ico_no_bucle.png
new file mode 100644
index 0000000..4904f4a
Binary files /dev/null and b/cadxcore/resources/files/cine_bar/ico_no_bucle.png differ
diff --git a/cadxcore/resources/files/cine_bar/ico_pause.png b/cadxcore/resources/files/cine_bar/ico_pause.png
new file mode 100644
index 0000000..ec61099
Binary files /dev/null and b/cadxcore/resources/files/cine_bar/ico_pause.png differ
diff --git a/cadxcore/resources/files/cine_bar/ico_play.png b/cadxcore/resources/files/cine_bar/ico_play.png
new file mode 100644
index 0000000..f8c8ec6
Binary files /dev/null and b/cadxcore/resources/files/cine_bar/ico_play.png differ
diff --git a/cadxcore/resources/files/cine_bar/ico_stop.png b/cadxcore/resources/files/cine_bar/ico_stop.png
new file mode 100644
index 0000000..e6f75d2
Binary files /dev/null and b/cadxcore/resources/files/cine_bar/ico_stop.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_ancla_compuesta.png b/cadxcore/resources/files/cursors/ico_cursor_ancla_compuesta.png
new file mode 100644
index 0000000..f6e0831
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_ancla_compuesta.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_ancla_simple.png b/cadxcore/resources/files/cursors/ico_cursor_ancla_simple.png
new file mode 100644
index 0000000..7f210b3
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_ancla_simple.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_crear_angulo_cobb.png b/cadxcore/resources/files/cursors/ico_cursor_crear_angulo_cobb.png
new file mode 100644
index 0000000..c378938
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_crear_angulo_cobb.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_crear_angulo_normal.png b/cadxcore/resources/files/cursors/ico_cursor_crear_angulo_normal.png
new file mode 100644
index 0000000..750cba7
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_crear_angulo_normal.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_crear_anotacion.png b/cadxcore/resources/files/cursors/ico_cursor_crear_anotacion.png
new file mode 100644
index 0000000..d9a9f16
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_crear_anotacion.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_crear_elipse.png b/cadxcore/resources/files/cursors/ico_cursor_crear_elipse.png
new file mode 100644
index 0000000..8e6d905
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_crear_elipse.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_crear_linea.png b/cadxcore/resources/files/cursors/ico_cursor_crear_linea.png
new file mode 100644
index 0000000..9f7d872
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_crear_linea.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_crear_poligono.png b/cadxcore/resources/files/cursors/ico_cursor_crear_poligono.png
new file mode 100644
index 0000000..c263b0e
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_crear_poligono.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_crear_punto.png b/cadxcore/resources/files/cursors/ico_cursor_crear_punto.png
new file mode 100644
index 0000000..a3dd26b
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_crear_punto.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_crear_rectangulo.png b/cadxcore/resources/files/cursors/ico_cursor_crear_rectangulo.png
new file mode 100644
index 0000000..8a9c31e
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_crear_rectangulo.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_lupa.png b/cadxcore/resources/files/cursors/ico_cursor_lupa.png
new file mode 100644
index 0000000..e0a3b68
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_lupa.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_mano_abierta.png b/cadxcore/resources/files/cursors/ico_cursor_mano_abierta.png
new file mode 100644
index 0000000..d02d1d6
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_mano_abierta.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_mano_cerrada.png b/cadxcore/resources/files/cursors/ico_cursor_mano_cerrada.png
new file mode 100644
index 0000000..a60d6c9
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_mano_cerrada.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_seleccionar.png b/cadxcore/resources/files/cursors/ico_cursor_seleccionar.png
new file mode 100644
index 0000000..ff6ad98
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_seleccionar.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_transparente.png b/cadxcore/resources/files/cursors/ico_cursor_transparente.png
new file mode 100644
index 0000000..19c05bb
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_transparente.png differ
diff --git a/cadxcore/resources/files/cursors/ico_cursor_window_level.png b/cadxcore/resources/files/cursors/ico_cursor_window_level.png
new file mode 100644
index 0000000..f45c360
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_cursor_window_level.png differ
diff --git a/cadxcore/resources/files/cursors/ico_rotate_cursor.png b/cadxcore/resources/files/cursors/ico_rotate_cursor.png
new file mode 100644
index 0000000..b5b06f1
Binary files /dev/null and b/cadxcore/resources/files/cursors/ico_rotate_cursor.png differ
diff --git a/cadxcore/resources/files/grid_bar/ico_ocultar_rejilla.png b/cadxcore/resources/files/grid_bar/ico_ocultar_rejilla.png
new file mode 100644
index 0000000..c77fafa
Binary files /dev/null and b/cadxcore/resources/files/grid_bar/ico_ocultar_rejilla.png differ
diff --git a/cadxcore/resources/files/grid_bar/ico_ver_rejilla.png b/cadxcore/resources/files/grid_bar/ico_ver_rejilla.png
new file mode 100644
index 0000000..564a1a9
Binary files /dev/null and b/cadxcore/resources/files/grid_bar/ico_ver_rejilla.png differ
diff --git a/cadxcore/resources/files/history/ico_all_patients.png b/cadxcore/resources/files/history/ico_all_patients.png
new file mode 100644
index 0000000..a8f5da0
Binary files /dev/null and b/cadxcore/resources/files/history/ico_all_patients.png differ
diff --git a/cadxcore/resources/files/history/ico_clean_all.png b/cadxcore/resources/files/history/ico_clean_all.png
new file mode 100644
index 0000000..2c6152e
Binary files /dev/null and b/cadxcore/resources/files/history/ico_clean_all.png differ
diff --git a/cadxcore/resources/files/history/ico_desplegar.png b/cadxcore/resources/files/history/ico_desplegar.png
new file mode 100644
index 0000000..5bf4646
Binary files /dev/null and b/cadxcore/resources/files/history/ico_desplegar.png differ
diff --git a/cadxcore/resources/files/history/ico_estudio.png b/cadxcore/resources/files/history/ico_estudio.png
new file mode 100644
index 0000000..abcd936
Binary files /dev/null and b/cadxcore/resources/files/history/ico_estudio.png differ
diff --git a/cadxcore/resources/files/history/ico_fichero_clave.png b/cadxcore/resources/files/history/ico_fichero_clave.png
new file mode 100644
index 0000000..4ec1a92
Binary files /dev/null and b/cadxcore/resources/files/history/ico_fichero_clave.png differ
diff --git a/cadxcore/resources/files/history/ico_historial_open.png b/cadxcore/resources/files/history/ico_historial_open.png
new file mode 100644
index 0000000..7d863f9
Binary files /dev/null and b/cadxcore/resources/files/history/ico_historial_open.png differ
diff --git a/cadxcore/resources/files/history/ico_hombre.png b/cadxcore/resources/files/history/ico_hombre.png
new file mode 100644
index 0000000..25d6ea9
Binary files /dev/null and b/cadxcore/resources/files/history/ico_hombre.png differ
diff --git a/cadxcore/resources/files/history/ico_imagen.png b/cadxcore/resources/files/history/ico_imagen.png
new file mode 100644
index 0000000..4a158fe
Binary files /dev/null and b/cadxcore/resources/files/history/ico_imagen.png differ
diff --git a/cadxcore/resources/files/history/ico_local_file.png b/cadxcore/resources/files/history/ico_local_file.png
new file mode 100644
index 0000000..3d09261
Binary files /dev/null and b/cadxcore/resources/files/history/ico_local_file.png differ
diff --git a/cadxcore/resources/files/history/ico_local_file_recent.png b/cadxcore/resources/files/history/ico_local_file_recent.png
new file mode 100644
index 0000000..772a463
Binary files /dev/null and b/cadxcore/resources/files/history/ico_local_file_recent.png differ
diff --git a/cadxcore/resources/files/history/ico_local_linked.png b/cadxcore/resources/files/history/ico_local_linked.png
new file mode 100644
index 0000000..25eacb7
Binary files /dev/null and b/cadxcore/resources/files/history/ico_local_linked.png differ
diff --git a/cadxcore/resources/files/history/ico_local_linked_recent.png b/cadxcore/resources/files/history/ico_local_linked_recent.png
new file mode 100644
index 0000000..cb945a7
Binary files /dev/null and b/cadxcore/resources/files/history/ico_local_linked_recent.png differ
diff --git a/cadxcore/resources/files/history/ico_movie_preview.png b/cadxcore/resources/files/history/ico_movie_preview.png
new file mode 100644
index 0000000..cae6b5b
Binary files /dev/null and b/cadxcore/resources/files/history/ico_movie_preview.png differ
diff --git a/cadxcore/resources/files/history/ico_mujer.png b/cadxcore/resources/files/history/ico_mujer.png
new file mode 100644
index 0000000..f92958e
Binary files /dev/null and b/cadxcore/resources/files/history/ico_mujer.png differ
diff --git a/cadxcore/resources/files/history/ico_otro.png b/cadxcore/resources/files/history/ico_otro.png
new file mode 100644
index 0000000..5c87017
Binary files /dev/null and b/cadxcore/resources/files/history/ico_otro.png differ
diff --git a/cadxcore/resources/files/history/ico_pdf_preview.png b/cadxcore/resources/files/history/ico_pdf_preview.png
new file mode 100644
index 0000000..406d2e5
Binary files /dev/null and b/cadxcore/resources/files/history/ico_pdf_preview.png differ
diff --git a/cadxcore/resources/files/history/ico_plegar.png b/cadxcore/resources/files/history/ico_plegar.png
new file mode 100644
index 0000000..3215caa
Binary files /dev/null and b/cadxcore/resources/files/history/ico_plegar.png differ
diff --git a/cadxcore/resources/files/history/ico_serie.png b/cadxcore/resources/files/history/ico_serie.png
new file mode 100644
index 0000000..d9591c1
Binary files /dev/null and b/cadxcore/resources/files/history/ico_serie.png differ
diff --git a/cadxcore/resources/files/history/ico_unknown_file.png b/cadxcore/resources/files/history/ico_unknown_file.png
new file mode 100644
index 0000000..387668a
Binary files /dev/null and b/cadxcore/resources/files/history/ico_unknown_file.png differ
diff --git a/cadxcore/resources/files/history/ico_wado_linked.png b/cadxcore/resources/files/history/ico_wado_linked.png
new file mode 100644
index 0000000..5235753
Binary files /dev/null and b/cadxcore/resources/files/history/ico_wado_linked.png differ
diff --git a/cadxcore/resources/files/history/ico_wado_linked_preview.png b/cadxcore/resources/files/history/ico_wado_linked_preview.png
new file mode 100644
index 0000000..3cafb12
Binary files /dev/null and b/cadxcore/resources/files/history/ico_wado_linked_preview.png differ
diff --git a/cadxcore/resources/files/history/ico_wado_linked_recent.png b/cadxcore/resources/files/history/ico_wado_linked_recent.png
new file mode 100644
index 0000000..d6f4d9c
Binary files /dev/null and b/cadxcore/resources/files/history/ico_wado_linked_recent.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_add_columna.png b/cadxcore/resources/files/layout_bar/ico_add_columna.png
new file mode 100644
index 0000000..52586c4
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_add_columna.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_add_fila.png b/cadxcore/resources/files/layout_bar/ico_add_fila.png
new file mode 100644
index 0000000..afeb400
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_add_fila.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_del_columna.png b/cadxcore/resources/files/layout_bar/ico_del_columna.png
new file mode 100644
index 0000000..ae5840f
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_del_columna.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_del_fila.png b/cadxcore/resources/files/layout_bar/ico_del_fila.png
new file mode 100644
index 0000000..080f83a
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_del_fila.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_layout_1x1.png b/cadxcore/resources/files/layout_bar/ico_layout_1x1.png
new file mode 100644
index 0000000..74dd1d6
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_layout_1x1.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_layout_1x2.png b/cadxcore/resources/files/layout_bar/ico_layout_1x2.png
new file mode 100644
index 0000000..8b9c6a9
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_layout_1x2.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_layout_1x2_blue.png b/cadxcore/resources/files/layout_bar/ico_layout_1x2_blue.png
new file mode 100644
index 0000000..23e9c1c
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_layout_1x2_blue.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_layout_2x1.png b/cadxcore/resources/files/layout_bar/ico_layout_2x1.png
new file mode 100644
index 0000000..c8220de
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_layout_2x1.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_layout_2x1_blue.png b/cadxcore/resources/files/layout_bar/ico_layout_2x1_blue.png
new file mode 100644
index 0000000..3d12922
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_layout_2x1_blue.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_layout_2x2.png b/cadxcore/resources/files/layout_bar/ico_layout_2x2.png
new file mode 100644
index 0000000..d86b663
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_layout_2x2.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_layout_3x3.png b/cadxcore/resources/files/layout_bar/ico_layout_3x3.png
new file mode 100644
index 0000000..7cf016d
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_layout_3x3.png differ
diff --git a/cadxcore/resources/files/layout_bar/ico_layout_4x4.png b/cadxcore/resources/files/layout_bar/ico_layout_4x4.png
new file mode 100644
index 0000000..e054add
Binary files /dev/null and b/cadxcore/resources/files/layout_bar/ico_layout_4x4.png differ
diff --git a/cadxcore/resources/files/logos/extensions_logo.png b/cadxcore/resources/files/logos/extensions_logo.png
new file mode 100644
index 0000000..ffbc698
Binary files /dev/null and b/cadxcore/resources/files/logos/extensions_logo.png differ
diff --git a/cadxcore/resources/files/logos/ginkgo48x48.png b/cadxcore/resources/files/logos/ginkgo48x48.png
new file mode 100644
index 0000000..fb603b5
Binary files /dev/null and b/cadxcore/resources/files/logos/ginkgo48x48.png differ
diff --git a/cadxcore/resources/files/logos/ico_extension_error.png b/cadxcore/resources/files/logos/ico_extension_error.png
new file mode 100644
index 0000000..ebc03bc
Binary files /dev/null and b/cadxcore/resources/files/logos/ico_extension_error.png differ
diff --git a/cadxcore/resources/files/logos/ico_ginkgo16x16.png b/cadxcore/resources/files/logos/ico_ginkgo16x16.png
new file mode 100644
index 0000000..b00aa0f
Binary files /dev/null and b/cadxcore/resources/files/logos/ico_ginkgo16x16.png differ
diff --git a/cadxcore/resources/files/logos/ico_ginkgo32x32.png b/cadxcore/resources/files/logos/ico_ginkgo32x32.png
new file mode 100644
index 0000000..b1b4d8a
Binary files /dev/null and b/cadxcore/resources/files/logos/ico_ginkgo32x32.png differ
diff --git a/cadxcore/resources/files/logos/ico_logo_splash.png b/cadxcore/resources/files/logos/ico_logo_splash.png
new file mode 100644
index 0000000..76abbd9
Binary files /dev/null and b/cadxcore/resources/files/logos/ico_logo_splash.png differ
diff --git a/cadxcore/resources/files/magnifier_bar/ico_zoom_in.png b/cadxcore/resources/files/magnifier_bar/ico_zoom_in.png
new file mode 100644
index 0000000..cdf0a52
Binary files /dev/null and b/cadxcore/resources/files/magnifier_bar/ico_zoom_in.png differ
diff --git a/cadxcore/resources/files/magnifier_bar/ico_zoom_out.png b/cadxcore/resources/files/magnifier_bar/ico_zoom_out.png
new file mode 100644
index 0000000..07bf98a
Binary files /dev/null and b/cadxcore/resources/files/magnifier_bar/ico_zoom_out.png differ
diff --git a/cadxcore/resources/files/marking_bar/ico_elipse_marcado.png b/cadxcore/resources/files/marking_bar/ico_elipse_marcado.png
new file mode 100644
index 0000000..a186a26
Binary files /dev/null and b/cadxcore/resources/files/marking_bar/ico_elipse_marcado.png differ
diff --git a/cadxcore/resources/files/marking_bar/ico_flecha_marcado.png b/cadxcore/resources/files/marking_bar/ico_flecha_marcado.png
new file mode 100644
index 0000000..2471972
Binary files /dev/null and b/cadxcore/resources/files/marking_bar/ico_flecha_marcado.png differ
diff --git a/cadxcore/resources/files/marking_bar/ico_free_form.png b/cadxcore/resources/files/marking_bar/ico_free_form.png
new file mode 100644
index 0000000..a51fc78
Binary files /dev/null and b/cadxcore/resources/files/marking_bar/ico_free_form.png differ
diff --git a/cadxcore/resources/files/marking_bar/ico_poligono_marcado.png b/cadxcore/resources/files/marking_bar/ico_poligono_marcado.png
new file mode 100644
index 0000000..28eba7d
Binary files /dev/null and b/cadxcore/resources/files/marking_bar/ico_poligono_marcado.png differ
diff --git a/cadxcore/resources/files/marking_bar/ico_punto_marcado.png b/cadxcore/resources/files/marking_bar/ico_punto_marcado.png
new file mode 100644
index 0000000..a7651ec
Binary files /dev/null and b/cadxcore/resources/files/marking_bar/ico_punto_marcado.png differ
diff --git a/cadxcore/resources/files/marking_bar/ico_rectangulo_marcado.png b/cadxcore/resources/files/marking_bar/ico_rectangulo_marcado.png
new file mode 100644
index 0000000..7c7883c
Binary files /dev/null and b/cadxcore/resources/files/marking_bar/ico_rectangulo_marcado.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_abrir.png b/cadxcore/resources/files/menu_icons/ico_abrir.png
new file mode 100644
index 0000000..fc5d613
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_abrir.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_acercade.png b/cadxcore/resources/files/menu_icons/ico_acercade.png
new file mode 100644
index 0000000..fa9a60b
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_acercade.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_calibrar_imagen.png b/cadxcore/resources/files/menu_icons/ico_calibrar_imagen.png
new file mode 100644
index 0000000..345d549
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_calibrar_imagen.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_cerrar_tab.png b/cadxcore/resources/files/menu_icons/ico_cerrar_tab.png
new file mode 100644
index 0000000..94af849
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_cerrar_tab.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_configuracion.png b/cadxcore/resources/files/menu_icons/ico_configuracion.png
new file mode 100644
index 0000000..89ab15f
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_configuracion.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_cross.png b/cadxcore/resources/files/menu_icons/ico_cross.png
new file mode 100644
index 0000000..6b9fa6d
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_cross.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_dicom_dir.png b/cadxcore/resources/files/menu_icons/ico_dicom_dir.png
new file mode 100644
index 0000000..f06a297
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_dicom_dir.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_editar.png b/cadxcore/resources/files/menu_icons/ico_editar.png
new file mode 100644
index 0000000..dbab8f4
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_editar.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_editor.png b/cadxcore/resources/files/menu_icons/ico_editor.png
new file mode 100644
index 0000000..b0e549e
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_editor.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_eliminar_todo.png b/cadxcore/resources/files/menu_icons/ico_eliminar_todo.png
new file mode 100644
index 0000000..b2c7e9e
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_eliminar_todo.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_eliminar_widget.png b/cadxcore/resources/files/menu_icons/ico_eliminar_widget.png
new file mode 100644
index 0000000..1514d51
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_eliminar_widget.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_exportar.png b/cadxcore/resources/files/menu_icons/ico_exportar.png
new file mode 100644
index 0000000..f501a59
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_exportar.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_filtrado.png b/cadxcore/resources/files/menu_icons/ico_filtrado.png
new file mode 100644
index 0000000..1f69604
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_filtrado.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_guardar.png b/cadxcore/resources/files/menu_icons/ico_guardar.png
new file mode 100644
index 0000000..99d532e
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_guardar.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_help.png b/cadxcore/resources/files/menu_icons/ico_help.png
new file mode 100644
index 0000000..30a4703
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_help.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_importar.png b/cadxcore/resources/files/menu_icons/ico_importar.png
new file mode 100644
index 0000000..08b5da9
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_importar.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_impresora.png b/cadxcore/resources/files/menu_icons/ico_impresora.png
new file mode 100644
index 0000000..9edfbbc
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_impresora.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_obtain_extensions.png b/cadxcore/resources/files/menu_icons/ico_obtain_extensions.png
new file mode 100644
index 0000000..7851cf3
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_obtain_extensions.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_open_dir.png b/cadxcore/resources/files/menu_icons/ico_open_dir.png
new file mode 100644
index 0000000..529fe8f
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_open_dir.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_open_disc.png b/cadxcore/resources/files/menu_icons/ico_open_disc.png
new file mode 100644
index 0000000..8dbb00f
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_open_disc.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_open_file.png b/cadxcore/resources/files/menu_icons/ico_open_file.png
new file mode 100644
index 0000000..d6d3f85
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_open_file.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_pantalla_completa.png b/cadxcore/resources/files/menu_icons/ico_pantalla_completa.png
new file mode 100644
index 0000000..d040bd0
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_pantalla_completa.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_paste.png b/cadxcore/resources/files/menu_icons/ico_paste.png
new file mode 100644
index 0000000..968f073
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_paste.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_reset.png b/cadxcore/resources/files/menu_icons/ico_reset.png
new file mode 100644
index 0000000..0de2656
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_reset.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_salir.png b/cadxcore/resources/files/menu_icons/ico_salir.png
new file mode 100644
index 0000000..1514d51
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_salir.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_send_to_pacs.png b/cadxcore/resources/files/menu_icons/ico_send_to_pacs.png
new file mode 100644
index 0000000..fb2d64f
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_send_to_pacs.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_support.png b/cadxcore/resources/files/menu_icons/ico_support.png
new file mode 100644
index 0000000..2fb98bf
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_support.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_tick.png b/cadxcore/resources/files/menu_icons/ico_tick.png
new file mode 100644
index 0000000..2414885
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_tick.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_user.png b/cadxcore/resources/files/menu_icons/ico_user.png
new file mode 100644
index 0000000..79f35cc
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_user.png differ
diff --git a/cadxcore/resources/files/menu_icons/ico_vista_preliminar.png b/cadxcore/resources/files/menu_icons/ico_vista_preliminar.png
new file mode 100644
index 0000000..f6b74cc
Binary files /dev/null and b/cadxcore/resources/files/menu_icons/ico_vista_preliminar.png differ
diff --git a/cadxcore/resources/files/menu_tabs/ico_cerrar_tab_32.png b/cadxcore/resources/files/menu_tabs/ico_cerrar_tab_32.png
new file mode 100644
index 0000000..6b9fa6d
Binary files /dev/null and b/cadxcore/resources/files/menu_tabs/ico_cerrar_tab_32.png differ
diff --git a/cadxcore/resources/files/menu_tabs/ico_grid_2_col.png b/cadxcore/resources/files/menu_tabs/ico_grid_2_col.png
new file mode 100644
index 0000000..6a6a494
Binary files /dev/null and b/cadxcore/resources/files/menu_tabs/ico_grid_2_col.png differ
diff --git a/cadxcore/resources/files/menu_tabs/ico_grid_3_col.png b/cadxcore/resources/files/menu_tabs/ico_grid_3_col.png
new file mode 100644
index 0000000..b446574
Binary files /dev/null and b/cadxcore/resources/files/menu_tabs/ico_grid_3_col.png differ
diff --git a/cadxcore/resources/files/menu_tabs/ico_primer_plano_tab.png b/cadxcore/resources/files/menu_tabs/ico_primer_plano_tab.png
new file mode 100644
index 0000000..1dee9e3
Binary files /dev/null and b/cadxcore/resources/files/menu_tabs/ico_primer_plano_tab.png differ
diff --git a/cadxcore/resources/files/menu_tabs/ico_reagrupar.png b/cadxcore/resources/files/menu_tabs/ico_reagrupar.png
new file mode 100644
index 0000000..4212819
Binary files /dev/null and b/cadxcore/resources/files/menu_tabs/ico_reagrupar.png differ
diff --git a/cadxcore/resources/files/progress_bar/ico_loading.gif b/cadxcore/resources/files/progress_bar/ico_loading.gif
new file mode 100644
index 0000000..d0bce15
Binary files /dev/null and b/cadxcore/resources/files/progress_bar/ico_loading.gif differ
diff --git a/cadxcore/resources/files/progress_bar/ico_stopped.png b/cadxcore/resources/files/progress_bar/ico_stopped.png
new file mode 100644
index 0000000..94ff593
Binary files /dev/null and b/cadxcore/resources/files/progress_bar/ico_stopped.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_angulo.png b/cadxcore/resources/files/tool_icons/ico_angulo.png
new file mode 100644
index 0000000..108ded7
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_angulo.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_anonymize.png b/cadxcore/resources/files/tool_icons/ico_anonymize.png
new file mode 100644
index 0000000..09f73c2
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_anonymize.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_anotacion.png b/cadxcore/resources/files/tool_icons/ico_anotacion.png
new file mode 100644
index 0000000..f85ee3c
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_anotacion.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_brightness_contrast.png b/cadxcore/resources/files/tool_icons/ico_brightness_contrast.png
new file mode 100644
index 0000000..447a264
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_brightness_contrast.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_copy.png b/cadxcore/resources/files/tool_icons/ico_copy.png
new file mode 100644
index 0000000..182804a
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_copy.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_corner_annotations.png b/cadxcore/resources/files/tool_icons/ico_corner_annotations.png
new file mode 100644
index 0000000..e499e45
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_corner_annotations.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_cruz.png b/cadxcore/resources/files/tool_icons/ico_cruz.png
new file mode 100644
index 0000000..26b0d04
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_cruz.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_debug.png b/cadxcore/resources/files/tool_icons/ico_debug.png
new file mode 100644
index 0000000..0de2656
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_debug.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_desencajar.png b/cadxcore/resources/files/tool_icons/ico_desencajar.png
new file mode 100644
index 0000000..647592f
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_desencajar.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_download_cloud.png b/cadxcore/resources/files/tool_icons/ico_download_cloud.png
new file mode 100644
index 0000000..9178fea
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_download_cloud.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_elevacion.png b/cadxcore/resources/files/tool_icons/ico_elevacion.png
new file mode 100644
index 0000000..fdbd443
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_elevacion.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_flecha.png b/cadxcore/resources/files/tool_icons/ico_flecha.png
new file mode 100644
index 0000000..ee4cb38
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_flecha.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_flip_horizontal.png b/cadxcore/resources/files/tool_icons/ico_flip_horizontal.png
new file mode 100644
index 0000000..8667c81
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_flip_horizontal.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_flip_vertical.png b/cadxcore/resources/files/tool_icons/ico_flip_vertical.png
new file mode 100644
index 0000000..0bd66d1
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_flip_vertical.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_informe.png b/cadxcore/resources/files/tool_icons/ico_informe.png
new file mode 100644
index 0000000..0f9ed4d
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_informe.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_invert.png b/cadxcore/resources/files/tool_icons/ico_invert.png
new file mode 100644
index 0000000..ded8fe3
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_invert.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_layout.png b/cadxcore/resources/files/tool_icons/ico_layout.png
new file mode 100644
index 0000000..d86b663
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_layout.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_lazo_chroma.png b/cadxcore/resources/files/tool_icons/ico_lazo_chroma.png
new file mode 100644
index 0000000..961c799
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_lazo_chroma.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_longitud.png b/cadxcore/resources/files/tool_icons/ico_longitud.png
new file mode 100644
index 0000000..ba99125
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_longitud.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_lupa.png b/cadxcore/resources/files/tool_icons/ico_lupa.png
new file mode 100644
index 0000000..a052429
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_lupa.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_marcado.png b/cadxcore/resources/files/tool_icons/ico_marcado.png
new file mode 100644
index 0000000..902bbe6
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_marcado.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_mostrar_ocultar_tags.png b/cadxcore/resources/files/tool_icons/ico_mostrar_ocultar_tags.png
new file mode 100644
index 0000000..34f6b38
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_mostrar_ocultar_tags.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_mouse_l.png b/cadxcore/resources/files/tool_icons/ico_mouse_l.png
new file mode 100644
index 0000000..9ecaa64
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_mouse_l.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_mouse_r.png b/cadxcore/resources/files/tool_icons/ico_mouse_r.png
new file mode 100644
index 0000000..c89314c
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_mouse_r.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_mouse_rl.png b/cadxcore/resources/files/tool_icons/ico_mouse_rl.png
new file mode 100644
index 0000000..73a8201
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_mouse_rl.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_pan.png b/cadxcore/resources/files/tool_icons/ico_pan.png
new file mode 100644
index 0000000..391a01f
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_pan.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_rejilla.png b/cadxcore/resources/files/tool_icons/ico_rejilla.png
new file mode 100644
index 0000000..fab324d
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_rejilla.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_rotate_left.png b/cadxcore/resources/files/tool_icons/ico_rotate_left.png
new file mode 100644
index 0000000..fe97c4a
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_rotate_left.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_rotate_right.png b/cadxcore/resources/files/tool_icons/ico_rotate_right.png
new file mode 100644
index 0000000..8baf084
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_rotate_right.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_search_cloud.png b/cadxcore/resources/files/tool_icons/ico_search_cloud.png
new file mode 100644
index 0000000..2146386
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_search_cloud.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_sin_opciones.png b/cadxcore/resources/files/tool_icons/ico_sin_opciones.png
new file mode 100644
index 0000000..08f2493
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_sin_opciones.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_slider.png b/cadxcore/resources/files/tool_icons/ico_slider.png
new file mode 100644
index 0000000..7267af8
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_slider.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_trackball.png b/cadxcore/resources/files/tool_icons/ico_trackball.png
new file mode 100644
index 0000000..99cd418
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_trackball.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_varita.png b/cadxcore/resources/files/tool_icons/ico_varita.png
new file mode 100644
index 0000000..1e2724e
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_varita.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_wl.png b/cadxcore/resources/files/tool_icons/ico_wl.png
new file mode 100644
index 0000000..447a264
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_wl.png differ
diff --git a/cadxcore/resources/files/tool_icons/ico_zoom.png b/cadxcore/resources/files/tool_icons/ico_zoom.png
new file mode 100644
index 0000000..908612e
Binary files /dev/null and b/cadxcore/resources/files/tool_icons/ico_zoom.png differ
diff --git a/cadxcore/resources/files/windowlevel_bar/ico_reset_wl.png b/cadxcore/resources/files/windowlevel_bar/ico_reset_wl.png
new file mode 100644
index 0000000..0de2656
Binary files /dev/null and b/cadxcore/resources/files/windowlevel_bar/ico_reset_wl.png differ
diff --git a/cadxcore/resources/files/wizards/ico_barra_superior.png b/cadxcore/resources/files/wizards/ico_barra_superior.png
new file mode 100644
index 0000000..819e46c
Binary files /dev/null and b/cadxcore/resources/files/wizards/ico_barra_superior.png differ
diff --git a/cadxcore/resources/ginkgoresourcesmanager.cpp b/cadxcore/resources/ginkgoresourcesmanager.cpp
new file mode 100644
index 0000000..b5c1d2e
--- /dev/null
+++ b/cadxcore/resources/ginkgoresourcesmanager.cpp
@@ -0,0 +1,1130 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/globals.h>
+#include <api/ientorno.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/internationalization/internationalization.h>
+
+#include "ginkgoresourcesmanager.h"
+
+#include <wx/image.h>
+#include <wx/filename.h>
+
+static wxString bundleDir(wxString(wxT("resources")) + wxFileName::GetPathSeparator() + wxT("cadxcore"));
+
+static wxString AcquisitionDir(wxT("acquisition"));
+static wxString AngleBarDir(wxT("angle_bar"));
+static wxString MagnifierBarDir(wxT("magnifier_bar"));
+static wxString GridBarDir(wxT("grid_bar"));
+static wxString WindowLevelBarDir(wxT("windowlevel_bar"));
+static wxString MarkingBarDir(wxT("marking_bar"));
+static wxString HistoryDir(wxT("history"));
+static wxString ToolIconsDir(wxT("tool_icons"));
+static wxString MenuIconsDir(wxT("menu_icons"));
+static wxString LogosDir(wxT("logos"));
+static wxString BigIconsDir(wxT("big_icons"));
+static wxString CursorsDir(wxT("cursors"));
+static wxString ProgressBarDir(wxT("progress_bar"));
+static wxString WizardsDir(wxT("wizards"));
+static wxString LayoutBarDir(wxT("layout_bar"));
+static wxString MenuTabsDir(wxT("menu_tabs"));
+static wxString CineBarDir(wxT("cine_bar"));
+
+
+static void LoadPNG(wxBitmap& bmp, const wxString& section, const wxString& filename)
+{
+        wxString path = wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetGinkgoResourcesDir().c_str()) + wxFileName::GetPathSeparator() + bundleDir + wxFileName::GetPathSeparator() + section + wxFileName::GetPathSeparator() + filename;
+        if (!bmp.LoadFile(path, wxBITMAP_TYPE_PNG)) {
+                LOG_ERROR("Core/Resources", _Std("Unable to load PNG bitmap resource") << ": " << std::string(path.ToUTF8()));
+        }
+}
+
+static void LoadPNG(wxImage& img, const wxString& section, const wxString& filename)
+{
+        wxString path = wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetGinkgoResourcesDir().c_str()) + wxFileName::GetPathSeparator() + bundleDir + wxFileName::GetPathSeparator() + section + wxFileName::GetPathSeparator() + filename;
+        if (!img.LoadFile(path, wxBITMAP_TYPE_PNG)) {
+                LOG_ERROR("Core/Resources", _Std("Unable to load PNG image resource") << ": " << std::string(path.ToUTF8()));
+        }
+}
+
+static void LoadGIF(wxAnimation& anim, const wxString& section, const wxString& filename)
+{
+        wxString path = wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetGinkgoResourcesDir().c_str()) + wxFileName::GetPathSeparator() + bundleDir + wxFileName::GetPathSeparator() + section + wxFileName::GetPathSeparator() + filename;
+        if (!anim.LoadFile(path, wxANIMATION_TYPE_GIF)) {
+                LOG_ERROR("Core/Resources", _Std("Unable to load GIF animation resource") << ": " << std::string(path.ToUTF8()));
+        }
+}
+
+// Adquisicion
+
+wxBitmap GinkgoResourcesManager::Acquisition::GetIcoAdquireFile()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, AcquisitionDir, wxT("ico_acquire_file.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::Acquisition::GetIcoAdquirePACS()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, AcquisitionDir, wxT("ico_acquire_pacs.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::Acquisition::GetIcoDownload()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, AcquisitionDir, wxT("ico_download.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::Acquisition::GetIcoClear()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, AcquisitionDir, wxT("ico_clear.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::Acquisition::GetIcoRemoveDownload()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, AcquisitionDir, wxT("ico_remove_download.png"));
+        return bmp;
+}
+
+// Angle Bar
+
+wxBitmap GinkgoResourcesManager::AngleBar::GetIcoAnguloCobb()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, AngleBarDir, wxT("ico_angulo_cobb.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::AngleBar::GetIcoAnguloNormal()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, AngleBarDir, wxT("ico_angulo_normal.png"));
+        return bmp;
+}
+
+// Magnifier Bar
+wxBitmap GinkgoResourcesManager::MagnifierBar::GetIcoZoomIn()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MagnifierBarDir, wxT("ico_zoom_in.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MagnifierBar::GetIcoZoomOut()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MagnifierBarDir, wxT("ico_zoom_out.png"));
+        return bmp;
+}
+
+// Barra Grid Bar
+wxBitmap GinkgoResourcesManager::GridBar::GetIcoVerRejilla()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, GridBarDir, wxT("ico_ver_rejilla.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::GridBar::GetIcoOcultarRejilla()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, GridBarDir, wxT("ico_ocultar_rejilla.png"));
+        return bmp;
+}
+
+// WindowLevel Bar
+wxBitmap GinkgoResourcesManager::WindowLevelBar::GetIcoReset()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, WindowLevelBarDir, wxT("ico_reset_wl.png"));
+        return bmp;
+}
+
+// Marking Bar
+wxBitmap GinkgoResourcesManager::MarkingBar::GetIcoElipse()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MarkingBarDir, wxT("ico_elipse_marcado.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MarkingBar::GetIcoFlecha()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MarkingBarDir, wxT("ico_flecha_marcado.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MarkingBar::GetIcoPoligono()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MarkingBarDir, wxT("ico_poligono_marcado.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MarkingBar::GetIcoFreeForm()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MarkingBarDir, wxT("ico_free_form.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MarkingBar::GetIcoPunto()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MarkingBarDir, wxT("ico_punto_marcado.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MarkingBar::GetIcoRectangulo()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MarkingBarDir, wxT("ico_rectangulo_marcado.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MarkingBar::GetIcoTrapezoide()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MarkingBarDir, wxT("ico_rectangulo_marcado.png"));
+        return bmp;
+}
+
+// History
+wxBitmap GinkgoResourcesManager::History::GetIcoEstudio()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_estudio.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoSerie()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_serie.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoImagen()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_imagen.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoHistorialOpen()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_historial_open.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoHombre()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_hombre.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoMujer()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_mujer.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoOtro()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_otro.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoFicheroClave()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_fichero_clave.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoPlegar()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_plegar.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoDesplegar()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_desplegar.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetMoviePreview()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_movie_preview.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetPDFPreview()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_pdf_preview.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoUnknownFile()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_unknown_file.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoCleanAll()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_clean_all.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::History::GetIcoAllPatients()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_all_patients.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::History::GetIcoLocalLinked()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_local_linked.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::History::GetIcoLocalFile()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_local_file.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::History::GetIcoWadoLinkedRecent()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_wado_linked_recent.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::History::GetIcoLocalLinkedRecent()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_local_linked_recent.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::History::GetIcoLocalFileRecent()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_local_file_recent.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::History::GetIcoWadoLinked()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_wado_linked.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::History::GetIcoWadoLinkedPreview()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, HistoryDir, wxT("ico_wado_linked_preview.png"));
+        return bmp;
+}
+
+// Tool Icons
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoAngulo()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_angulo.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoAnotacion()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_anotacion.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoCruz()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_cruz.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoElevacion()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_elevacion.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoFlecha()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_flecha.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoLongitud()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_longitud.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoVarita()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_varita.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoLazoChroma()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_lazo_chroma.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoWindowLevel()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_wl.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoZoom()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_zoom.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoSinOpciones()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_sin_opciones.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoDebug()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_debug.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoMarcado()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_marcado.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoRejilla()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_rejilla.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoMostrarOcultarTags()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_mostrar_ocultar_tags.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoDesencajar()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_desencajar.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoCornerAnnotations()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_corner_annotations.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoInforme()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_informe.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoSlider()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_slider.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoLupa()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_lupa.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoPan()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_pan.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoMouseR()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_mouse_r.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoMouseL()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_mouse_l.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoMouseRL()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_mouse_rl.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoAnonymize()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_anonymize.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoLayout()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_layout.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoRotateLeft()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_rotate_left.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoRotateRight()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_rotate_right.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoFlipVertical()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_flip_vertical.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoFlipHorizontal()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_flip_horizontal.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoInvert()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_invert.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoTrackball()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_trackball.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoDownloadCloud()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_download_cloud.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoSearchCloud()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_search_cloud.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoCopyToClipboard()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_copy.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::ToolIcons::GetIcoBrightnessContrast()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_brightness_contrast.png"));
+        return bmp;
+}
+
+// Menu Icons
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoAbrir()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_abrir.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoOpenDir()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_open_dir.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoRemovableUnit()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_open_disc.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoOpenFile()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_open_file.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoCerrarTab()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_cerrar_tab.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoConfiguracion()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_configuracion.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoEditor()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_editor.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoExportar()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_exportar.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoFiltrado()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_filtrado.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoGuardar()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_guardar.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoImportar()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_importar.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoDicomDir()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_dicom_dir.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoReset()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_reset.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoSalir()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_salir.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoImpresora()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_impresora.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoVistaPreliminar()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_vista_preliminar.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoCalibrarImagen()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_calibrar_imagen.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoEliminar()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_eliminar_widget.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoEliminarTodo()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_eliminar_todo.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoEditar()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_editar.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoSendToPACS()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_send_to_pacs.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoEliminarWidget()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_eliminar_widget.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoPantallaCompleta()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_pantalla_completa.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoUser()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_user.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoHelp()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_help.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoSupport()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_support.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoObtainExtensions()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_obtain_extensions.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoTick()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_tick.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoCross()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_cross.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuIcons::GetIcoPaste()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuIconsDir, wxT("ico_paste.png"));
+        return bmp;
+}
+
+// Logos
+wxBitmap GinkgoResourcesManager::Logos::GetLogoGinkgo48x48()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LogosDir, wxT("ginkgo48x48.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::Logos::GetLogoGinkgo16x16()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LogosDir, wxT("ico_ginkgo16x16.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::Logos::GetLogoGinkgo32x32()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LogosDir, wxT("ico_ginkgo32x32.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::Logos::GetLogoSplash()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LogosDir, wxT("ico_logo_splash.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::Logos::GetExtensionsLogo()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LogosDir, wxT("extensions_logo.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::Logos::GetExtensionsErrorLogo()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LogosDir, wxT("ico_extension_error.png"));
+        return bmp;
+}
+
+// Big Icons
+wxBitmap GinkgoResourcesManager::BigIcons::GetIcoBigBook()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, BigIconsDir, wxT("ico_history_big.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::BigIcons::GetIcoBigDicomize()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, BigIconsDir, wxT("ico_dicomize_big.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::BigIcons::GetIcoBigQR()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, BigIconsDir, wxT("ico_qr_big.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::BigIcons::GetIcoBigAcquire()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, BigIconsDir, wxT("ico_acquire_big.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::BigIcons::GetIcoBigGinkgoCloudSearch()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, BigIconsDir, wxT("ico_search_ginkgocloud.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::BigIcons::GetIcoDefaultDicomizer()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, BigIconsDir, wxT("ico_default_dicomizer.png"));
+        return bmp;
+}
+
+// Cursors
+wxImage GinkgoResourcesManager::Cursors::GetCursorTransparente()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_transparente.png"));
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorLupa()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_lupa.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorCrearLinea()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_crear_linea.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorManoAbierta()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_mano_abierta.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorManoCerrada()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_mano_cerrada.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorSeleccionar()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_seleccionar.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorCrearAnguloCobb()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_crear_angulo_cobb.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorCrearAnguloNormal()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_crear_angulo_normal.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorCrearAnotacion()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_crear_anotacion.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorCrearElipse()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_crear_elipse.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorCrearPoligono()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_crear_poligono.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorCrearPunto()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_crear_punto.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorCrearRectangulo()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_crear_rectangulo.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorWindowLevel()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_window_level.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 4);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 26);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorAnclaSimple()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_ancla_simple.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+wxImage GinkgoResourcesManager::Cursors::GetCursorAnclaCompuesta()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_cursor_ancla_compuesta.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+
+wxImage GinkgoResourcesManager::Cursors::GetRotationCursor()
+{
+        wxImage img;
+        LoadPNG(img, CursorsDir, wxT("ico_rotate_cursor.png"));
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_X, 16);
+        img.SetOption(wxIMAGE_OPTION_CUR_HOTSPOT_Y, 16);
+        return img;
+}
+
+// Progres Bar
+wxAnimation GinkgoResourcesManager::ProgressBar::GetAniLoading()
+{
+        wxAnimation animation;
+        LoadGIF(animation, ProgressBarDir, wxT("ico_loading.gif"));
+        return animation;
+}
+wxBitmap GinkgoResourcesManager::ProgressBar::GetIcoStopped()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ProgressBarDir, wxT("ico_stopped.png"));
+        return bmp;
+}
+
+// Wizards
+wxBitmap GinkgoResourcesManager::Wizards::GetIcoBarraSuperior()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, WizardsDir, wxT("ico_barra_superior.png"));
+        return bmp;
+}
+
+// Layout bar
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoAddColumn()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_add_columna.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoAddRow()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_add_fila.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoDelColumn()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_del_columna.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoDelRow()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_del_fila.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoLayout1x1()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_layout_1x1.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoLayout1x2()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_layout_1x2.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoLayout2x1()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_layout_2x1.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoLayout2x2()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_layout_2x2.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoLayout3x3()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_layout_3x3.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoLayout4x4()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_layout_4x4.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoLayout1x2Blue()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_layout_1x2_blue.png"));
+        return bmp;
+}
+
+wxBitmap GinkgoResourcesManager::LayoutBar::GetIcoLayout2x1Blue()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LayoutBarDir, wxT("ico_layout_2x1_blue.png"));
+        return bmp;
+}
+
+// Menu Tabs
+wxBitmap GinkgoResourcesManager::MenuTabs::GetIcoCerrarTab()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuTabsDir, wxT("ico_cerrar_tab_32.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuTabs::GetIcoPrimerPlano()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuTabsDir, wxT("ico_primer_plano_tab.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuTabs::GetIcoGrid2Col()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuTabsDir, wxT("ico_grid_2_col.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuTabs::GetIcoGrid3Col()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuTabsDir, wxT("ico_grid_3_col.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::MenuTabs::GetIcoReagrupar()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, MenuTabsDir, wxT("ico_reagrupar.png"));
+        return bmp;
+}
+
+// Cine bar
+wxBitmap GinkgoResourcesManager::CineBar::GetIcoPlay()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, CineBarDir, wxT("ico_play.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::CineBar::GetIcoBucle()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, CineBarDir, wxT("ico_bucle.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::CineBar::GetIcoNoBucle()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, CineBarDir, wxT("ico_no_bucle.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::CineBar::GetIcoStop()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, CineBarDir, wxT("ico_stop.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::CineBar::GetIcoPause()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, CineBarDir, wxT("ico_pause.png"));
+        return bmp;
+}
+wxBitmap GinkgoResourcesManager::CineBar::GetIcoCine()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, CineBarDir, wxT("ico_cine.png"));
+        return bmp;
+}
diff --git a/cadxcore/resources/ginkgoresourcesmanager.h b/cadxcore/resources/ginkgoresourcesmanager.h
new file mode 100644
index 0000000..e3559db
--- /dev/null
+++ b/cadxcore/resources/ginkgoresourcesmanager.h
@@ -0,0 +1,279 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <wx/bitmap.h>
+#include <wx/animate.h>
+
+class EXTAPI GinkgoResourcesManager
+{
+
+public:
+
+        // Adquisicion
+        class EXTAPI Acquisition
+        {
+        public:
+                static wxBitmap GetIcoAdquireFile();
+                static wxBitmap GetIcoAdquirePACS();
+                static wxBitmap GetIcoDownload();
+                static wxBitmap GetIcoClear();
+                static wxBitmap GetIcoRemoveDownload();
+        };
+
+        class EXTAPI AngleBar
+        {
+        public:
+                static wxBitmap GetIcoAnguloCobb();
+                static wxBitmap GetIcoAnguloNormal();
+        };
+
+        class EXTAPI MagnifierBar
+        {
+        public:
+                static wxBitmap GetIcoZoomIn();
+                static wxBitmap GetIcoZoomOut();
+        };
+
+        class EXTAPI GridBar
+        {
+        public:
+                static wxBitmap GetIcoVerRejilla();
+                static wxBitmap GetIcoOcultarRejilla();
+        };
+
+        class EXTAPI WindowLevelBar
+        {
+        public:
+                static wxBitmap GetIcoReset();
+        };
+
+        class EXTAPI MarkingBar
+        {
+        public:
+                static wxBitmap GetIcoElipse();
+                static wxBitmap GetIcoFlecha();
+                static wxBitmap GetIcoPoligono();
+                static wxBitmap GetIcoFreeForm();
+                static wxBitmap GetIcoPunto();
+                static wxBitmap GetIcoRectangulo();
+                static wxBitmap GetIcoTrapezoide();
+        };
+
+        class EXTAPI History
+        {
+        public:
+                static wxBitmap GetIcoEstudio();
+                static wxBitmap GetIcoSerie();
+                static wxBitmap GetIcoImagen();
+                static wxBitmap GetIcoHistorialOpen();
+                static wxBitmap GetIcoHombre();
+                static wxBitmap GetIcoMujer();
+                static wxBitmap GetIcoOtro();
+                static wxBitmap GetIcoFicheroClave();
+                static wxBitmap GetIcoPlegar();
+                static wxBitmap GetIcoDesplegar();
+                static wxBitmap GetMoviePreview();
+                static wxBitmap GetPDFPreview();
+                static wxBitmap GetIcoUnknownFile();
+                static wxBitmap GetIcoCleanAll();
+                static wxBitmap GetIcoAllPatients();
+                static wxBitmap GetIcoLocalFile();
+                static wxBitmap GetIcoLocalLinked();
+                static wxBitmap GetIcoWadoLinked();
+                static wxBitmap GetIcoLocalFileRecent();
+                static wxBitmap GetIcoLocalLinkedRecent();
+                static wxBitmap GetIcoWadoLinkedRecent();
+                static wxBitmap GetIcoWadoLinkedPreview();
+        };
+
+        class EXTAPI ToolIcons
+        {
+        public:
+                static wxBitmap GetIcoAngulo();
+                static wxBitmap GetIcoAnotacion();
+                static wxBitmap GetIcoCruz();
+                static wxBitmap GetIcoElevacion();
+                static wxBitmap GetIcoFlecha();
+                static wxBitmap GetIcoLongitud();
+                static wxBitmap GetIcoVarita();
+                static wxBitmap GetIcoLazoChroma();
+                static wxBitmap GetIcoWindowLevel();
+                static wxBitmap GetIcoZoom();
+                static wxBitmap GetIcoSinOpciones();
+                static wxBitmap GetIcoDebug();
+                static wxBitmap GetIcoMarcado();
+                static wxBitmap GetIcoRejilla();
+                static wxBitmap GetIcoMostrarOcultarTags();
+                static wxBitmap GetIcoDesencajar();
+                static wxBitmap GetIcoCornerAnnotations();
+                static wxBitmap GetIcoInforme();
+                static wxBitmap GetIcoSlider();
+                static wxBitmap GetIcoLupa();
+                static wxBitmap GetIcoPan();
+                static wxBitmap GetIcoMouseR();
+                static wxBitmap GetIcoMouseL();
+                static wxBitmap GetIcoMouseRL();
+                static wxBitmap GetIcoAnonymize();
+                static wxBitmap GetIcoLayout();
+                static wxBitmap GetIcoFlipVertical();
+                static wxBitmap GetIcoFlipHorizontal();
+                static wxBitmap GetIcoRotateLeft();
+                static wxBitmap GetIcoRotateRight();
+                static wxBitmap GetIcoInvert();
+                static wxBitmap GetIcoTrackball();
+                static wxBitmap GetIcoDownloadCloud();
+                static wxBitmap GetIcoSearchCloud();
+                static wxBitmap GetIcoCopyToClipboard();
+                static wxBitmap GetIcoBrightnessContrast();
+        };
+
+        class EXTAPI MenuIcons
+        {
+        public:
+                static wxBitmap GetIcoAbrir();
+                static wxBitmap GetIcoOpenDir();
+                static wxBitmap GetIcoRemovableUnit();
+                static wxBitmap GetIcoOpenFile();
+                static wxBitmap GetIcoCerrarTab();
+                static wxBitmap GetIcoConfiguracion();
+                static wxBitmap GetIcoEditor();
+                static wxBitmap GetIcoExportar();
+                static wxBitmap GetIcoFiltrado();
+                static wxBitmap GetIcoGuardar();
+                static wxBitmap GetIcoImportar();
+                static wxBitmap GetIcoDicomDir();
+                static wxBitmap GetIcoReset();
+                static wxBitmap GetIcoSalir();
+                static wxBitmap GetIcoImpresora();
+                static wxBitmap GetIcoVistaPreliminar();
+                static wxBitmap GetIcoCalibrarImagen();
+                static wxBitmap GetIcoEliminar();
+                static wxBitmap GetIcoEliminarTodo();
+                static wxBitmap GetIcoEditar();
+                static wxBitmap GetIcoSendToPACS();
+                static wxBitmap GetIcoEliminarWidget();
+                static wxBitmap GetIcoPantallaCompleta();
+                static wxBitmap GetIcoUser();
+                static wxBitmap GetIcoHelp();
+                static wxBitmap GetIcoSupport();
+                static wxBitmap GetIcoObtainExtensions();
+                static wxBitmap GetIcoTick();
+                static wxBitmap GetIcoCross();
+                static wxBitmap GetIcoPaste();
+        };
+
+        class EXTAPI Logos
+        {
+        public:
+                static wxBitmap GetLogoGinkgo48x48();
+                static wxBitmap GetLogoGinkgo16x16();
+                static wxBitmap GetLogoGinkgo32x32();
+                static wxBitmap GetLogoSplash();
+                static wxBitmap GetExtensionsLogo();
+                static wxBitmap GetExtensionsErrorLogo();
+        };
+
+        class EXTAPI BigIcons
+        {
+        public:
+                static wxBitmap GetIcoBigBook();
+                static wxBitmap GetIcoBigDicomize();
+                static wxBitmap GetIcoBigQR();
+                static wxBitmap GetIcoBigAcquire();
+                static wxBitmap GetIcoBigGinkgoCloudSearch();
+                static wxBitmap GetIcoDefaultDicomizer();
+        };
+
+        class EXTAPI Cursors
+        {
+        public:
+                static wxImage GetCursorTransparente();
+                static wxImage GetCursorLupa();
+                static wxImage GetCursorCrearLinea();
+                static wxImage GetCursorManoAbierta();
+                static wxImage GetCursorManoCerrada();
+                static wxImage GetCursorSeleccionar();
+                static wxImage GetCursorCrearAnguloCobb();
+                static wxImage GetCursorCrearAnguloNormal();
+                static wxImage GetCursorCrearAnotacion();
+                static wxImage GetCursorCrearElipse();
+                static wxImage GetCursorCrearPoligono();
+                static wxImage GetCursorCrearPunto();
+                static wxImage GetCursorCrearRectangulo();
+                static wxImage GetCursorWindowLevel();
+                static wxImage GetCursorAnclaSimple();
+                static wxImage GetCursorAnclaCompuesta();
+                static wxImage GetRotationCursor();
+        };
+
+        class EXTAPI ProgressBar
+        {
+        public:
+                static wxAnimation GetAniLoading();
+                static wxBitmap GetIcoStopped();
+        };
+
+        class EXTAPI Wizards
+        {
+        public:
+                static wxBitmap GetIcoBarraSuperior();
+        };
+
+        class EXTAPI LayoutBar
+        {
+        public:
+                static wxBitmap GetIcoAddColumn();
+                static wxBitmap GetIcoAddRow();
+                static wxBitmap GetIcoDelColumn();
+                static wxBitmap GetIcoDelRow();
+                static wxBitmap GetIcoLayout1x1();
+                static wxBitmap GetIcoLayout1x2();
+                static wxBitmap GetIcoLayout2x1();
+                static wxBitmap GetIcoLayout2x2();
+                static wxBitmap GetIcoLayout3x3();
+                static wxBitmap GetIcoLayout4x4();
+                static wxBitmap GetIcoLayout1x2Blue();
+                static wxBitmap GetIcoLayout2x1Blue();
+        };
+
+        class EXTAPI MenuTabs
+        {
+        public:
+                static wxBitmap GetIcoCerrarTab();
+                static wxBitmap GetIcoPrimerPlano();
+                static wxBitmap GetIcoGrid2Col();
+                static wxBitmap GetIcoGrid3Col();
+                static wxBitmap GetIcoReagrupar();
+        };
+
+        class EXTAPI CineBar
+        {
+        public:
+                static wxBitmap GetIcoPlay();
+                static wxBitmap GetIcoBucle();
+                static wxBitmap GetIcoNoBucle();
+                static wxBitmap GetIcoStop();
+                static wxBitmap GetIcoPause();
+                static wxBitmap GetIcoCine();
+        };
+
+};
diff --git a/cadxcore/resources/test_card.dcm b/cadxcore/resources/test_card.dcm
new file mode 100644
index 0000000..59fc78b
Binary files /dev/null and b/cadxcore/resources/test_card.dcm differ
diff --git a/cadxcore/singleinstance.h b/cadxcore/singleinstance.h
new file mode 100644
index 0000000..271a8f6
--- /dev/null
+++ b/cadxcore/singleinstance.h
@@ -0,0 +1,191 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <wx/ipc.h>
+#include <main/entorno.h>
+#include <main/gui/mainwindow/ventanaprincipal.h>
+#include <main/controllers/controladorlog.h>
+// Connection class, for use by both communicating instances
+
+class GinkgoDispatcher: public GNC::GCS::ILockable
+{
+public:
+        static GinkgoDispatcher* Instance()
+        {
+                if (m_pInstance == NULL) {
+                        m_pInstance = new GinkgoDispatcher();
+                }
+                return m_pInstance;
+        }
+        static void FreeInstance()
+        {
+                if (m_pInstance != NULL) {
+                        delete m_pInstance;
+                        m_pInstance = NULL;
+                }
+        }
+
+        void InsertarPeticion(const std::string& peticion)
+        {
+                {
+                        GNC::GCS::ILocker lock(this);
+                        m_listaPeticiones.push_back(peticion);
+                }
+                if (!m_timer.IsRunning()) {
+                        Procesar();
+                }
+
+        }
+
+        void Procesar()
+        {
+                if (m_listaPeticiones.size() == 0)
+                        return;
+                // Check that there are no modal dialogs active
+                wxWindowList::compatibility_iterator node = wxTopLevelWindows.GetFirst();
+                while (node) {
+                        wxDialog* dialog = wxDynamicCast(node->GetData(), wxDialog);
+                        if (dialog && dialog->IsModal()) {
+                                LOG_INFO("GinkgoDispatcher", "GinkgoDispatcher, hay di�logos abiertos no se procesa el mensaje");
+                                m_timer.Start(1000, true);
+                                return ;
+                        }
+                        node = node->GetNext();
+                }
+                std::string peticion;
+                //extraigo la peticion a procesar
+                {
+                        GNC::GCS::ILocker lock(this);
+                        peticion = m_listaPeticiones.front();
+                        m_listaPeticiones.pop_front();
+                }
+
+                //la proceso...
+                wxString fileName = FROMPATH(peticion);
+                GNC::Entorno::Instance()->GetVentanaPrincipal()->EjecutarParametro(fileName, false);
+
+                {
+                        GNC::GCS::ILocker lock(this);
+                        if (m_listaPeticiones.size() > 0) {
+                                m_timer.Start(1000, true);
+                        }
+                }
+        }
+
+protected:
+        class wxTimerServer: public wxTimer
+        {
+        public:
+                wxTimerServer(GinkgoDispatcher* pServer)
+                {
+                        m_pServer = pServer;
+                }
+
+                ~wxTimerServer()
+                {}
+
+                virtual void Notify()
+                {
+                        m_pServer->Procesar();
+                }
+                GinkgoDispatcher* m_pServer;
+        };
+
+        GinkgoDispatcher(): m_timer(this) {}
+        ~GinkgoDispatcher() {}
+
+        static GinkgoDispatcher* m_pInstance;
+
+        wxTimerServer m_timer;
+        std::list<std::string> m_listaPeticiones;
+};
+GinkgoDispatcher* GinkgoDispatcher::m_pInstance = NULL;
+
+//conexion
+class stConnection : public wxConnection
+{
+public:
+        stConnection() {}
+
+        ~stConnection() {}
+
+        virtual bool OnExec(const wxString& WXUNUSED(topic),
+                            const wxString& data)
+        {
+
+                wxString filename(data);
+                LOG_INFO("Core", "Servidor, OnExecute "<< filename.ToUTF8());
+                if (filename.IsEmpty()) {
+                        // Just raise the main window
+                        wxTopLevelWindow* frame = GNC::Entorno::Instance()->GetVentanaPrincipal();
+                        if (frame) {
+                                if (frame->IsIconized()) {
+                                        frame->Restore();
+                                }
+                                frame->Raise();
+                        }
+                } else {
+                        GinkgoDispatcher::Instance()->InsertarPeticion(std::string(TOPATH(filename)));
+                }
+                return true;
+        }
+};
+
+class stServer: public wxServer
+{
+public:
+        stServer()
+        {
+                //std::cout << "== stServer::stServer ( " << this << " )" << std::endl;
+        }
+
+        ~stServer()
+        {
+                GinkgoDispatcher::FreeInstance();
+                //std::cout << "== stServer::~stServer ( " << this << " )" << std::endl;
+        }
+
+        wxConnectionBase *OnAcceptConnection(const wxString& topic)
+        {
+                const wxString name = wxString::Format(wxT("Ginkgo-%s"), wxGetUserId().c_str());
+                if (topic == name) {
+                        LOG_INFO("Core", "Servidor, conexi�n aceptada");
+                        return new stConnection();
+                } else {
+                        LOG_INFO("Core", "Se han intentado comunicar con el servidor usando un topic desconocido");
+                        return NULL;
+                }
+        }
+};
+// Client class, to be used by subsequent instances in OnInit
+class stClient: public wxClient
+{
+public:
+        stClient() {};
+        wxConnectionBase *OnMakeConnection()
+        {
+                return new stConnection;
+        }
+};
+
+
+
+
diff --git a/cadxcore/sqlite/ginkgosqlite.h b/cadxcore/sqlite/ginkgosqlite.h
new file mode 100644
index 0000000..ce09e89
--- /dev/null
+++ b/cadxcore/sqlite/ginkgosqlite.h
@@ -0,0 +1,415 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <wx/wxsqlite3/wxsqlite3.h>
+#ifndef _WIN32
+#include <unistd.h>
+#define Sleep sleep
+#define strcpy_s strcpy
+#define strcat_s strcat
+#endif
+
+//version of ginkgo bbdd
+#define GINKGO_BBDD_VERSION 7
+
+//#define _GINKGO_TRACE
+
+/** Timeout values on busy or lock conditions   **/
+/** if you observe lock errors you might try to **/
+/** increase the values.                        **/
+
+int AbrirConexion(wxSQLite3Database& dataBase,const std::string& DBFileName)
+{
+        if(dataBase.IsOpen()) {
+                return (0);
+        }
+
+        dataBase.Open(FROMPATH(DBFileName),wxEmptyString, WXSQLITE_OPEN_READWRITE|WXSQLITE_OPEN_CREATE);
+
+        dataBase.EnableForeignKeySupport(true);
+
+        dataBase.ExecuteUpdate(wxT("PRAGMA recursive_triggers = true;"));
+        dataBase.ExecuteUpdate(wxT("PRAGMA synchronous=NORMAL;"));
+
+#ifdef _GINKGO_TRACE
+
+        dataBase.ExecuteUpdate(wxT("PRAGMA parser_trace  = true;"));
+
+#endif
+
+        return 1;
+}
+
+int CreateGinkgoDB(wxSQLite3Database& dataBase,const char *DBFileName)
+{
+        if (!AbrirConexion(dataBase, DBFileName)) {
+                return (0);
+        }
+        /** Create Tables del Historial: **/
+        /** 1. study table **/
+        wxString sentencia = wxEmptyString;
+        sentencia << wxT("CREATE TABLE Study (");
+        sentencia << wxT("pk INTEGER PRIMARY KEY,"); //autoincrement by default (SQLITE)
+        sentencia << wxT("pat_id VARCHAR(250) ,");
+        sentencia << wxT("pat_id_issuer VARCHAR(250),");
+        sentencia << wxT("pat_name VARCHAR(250) ,");
+        sentencia << wxT("pat_birthdate DATE,");
+        sentencia << wxT("pat_sex	VARCHAR(250),");
+        sentencia << wxT("study_iuid VARCHAR(250),");
+        sentencia << wxT("study_id VARCHAR(250),");
+        sentencia << wxT("study_datetime DATETIME,");
+        sentencia << wxT("accession_no VARCHAR(250),");
+        sentencia << wxT("ref_physician VARCHAR(250),");
+        sentencia << wxT("study_desc VARCHAR(250),");
+        sentencia << wxT("mods_in_study VARCHAR(250),");
+        sentencia << wxT("cuids_in_study VARCHAR(250),");
+        sentencia << wxT("num_series INTEGER,");
+        sentencia << wxT("num_instances INTEGER,");
+        sentencia << wxT("location CHAR DEFAULT 'B',"); //B implies fully local L implies some files linked W implies some files wado linked
+        sentencia << wxT("created_time DATETIME DEFAULT CURRENT_TIMESTAMP,");
+        sentencia << wxT("updated_time DATETIME);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        //study indexes
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index pat_id ");
+        sentencia << wxT("ON Study(pat_id, pat_id_issuer);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index pat_name ");
+        sentencia << wxT("ON Study(pat_name);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index pat_birthdate ");
+        sentencia << wxT("ON Study(pat_birthdate);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index pat_sex ");
+        sentencia << wxT("ON Study(pat_sex);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index study_iuid ");
+        sentencia << wxT("ON Study(study_iuid);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index study_datetime ");
+        sentencia << wxT("ON Study(study_datetime);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index accession_no ");
+        sentencia << wxT("ON Study(accession_no);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index ref_physician ");
+        sentencia << wxT("ON Study(ref_physician);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index study_desc ");
+        sentencia << wxT("ON Study(study_desc);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        /** 1. Tabla de series **/
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE TABLE Series (");
+        sentencia << wxT("pk INTEGER PRIMARY KEY,"); //autoincrement by default (SQLITE)
+        sentencia << wxT("study_fk INTEGER REFERENCES Study(pk) ON UPDATE CASCADE ON DELETE CASCADE,");
+        sentencia << wxT("series_iuid VARCHAR(250),");
+        sentencia << wxT("series_datetime DATETIME,");
+        sentencia << wxT("series_no VARCHAR(250),");
+        sentencia << wxT("modality VARCHAR(250),");
+        sentencia << wxT("uid_importer VARCHAR(250),");
+        sentencia << wxT("body_part VARCHAR(250),");
+        sentencia << wxT("laterality VARCHAR(250),");
+        sentencia << wxT("series_desc VARCHAR(250),");
+        sentencia << wxT("institution VARCHAR(250),");
+        sentencia << wxT("station_name VARCHAR(250),");
+        sentencia << wxT("department VARCHAR(250),");
+        sentencia << wxT("perf_physician VARCHAR(250),");
+        sentencia << wxT("num_instances INTEGER,");
+        sentencia << wxT("frame_of_reference_uid VARCHAR(250),");
+        sentencia << wxT("tuids_in_series VARCHAR(250),");
+        sentencia << wxT("location CHAR DEFAULT 'B',"); //B implies fully local L implies some files linked W implies some files wado linked
+        sentencia << wxT("created_time DATETIME DEFAULT CURRENT_TIMESTAMP,");
+        sentencia << wxT("updated_time DATETIME);");
+        dataBase.ExecuteUpdate(sentencia);
+
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index series_iuid ");
+        sentencia << wxT("ON Series(series_iuid);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index series_datetime ");
+        sentencia << wxT("ON Series(series_datetime);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index modality ");
+        sentencia << wxT("ON Series(modality);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index body_part ");
+        sentencia << wxT("ON Series(body_part);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index laterality ");
+        sentencia << wxT("ON Series(laterality);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index series_desc ");
+        sentencia << wxT("ON Series(series_desc);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index institution ");
+        sentencia << wxT("ON Series(institution);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index station_name ");
+        sentencia << wxT("ON Series(station_name);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index department ");
+        sentencia << wxT("ON Series(department);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index perf_physician ");
+        sentencia << wxT("ON Series(perf_physician);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index series_study ");
+        sentencia << wxT("ON Series(pk, study_fk);");
+        dataBase.ExecuteUpdate(sentencia);
+
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index series_location ");
+        sentencia << wxT("ON Series(study_fk, location);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        /** 1. Tabla de ficheros **/
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE TABLE File (");
+        sentencia << wxT("pk INTEGER PRIMARY KEY,"); //autoincrement by default (SQLITE)
+        sentencia << wxT("series_fk INTEGER REFERENCES Series(pk) ON UPDATE CASCADE ON DELETE CASCADE,");
+#ifdef _WIN32
+        sentencia << wxT("file_path VARCHAR(1024) COLLATE NOCASE,");
+#else
+        sentencia << wxT("file_path VARCHAR(1024),");
+#endif
+        sentencia << wxT("file_sopiuid VARCHAR(240),");
+        sentencia << wxT("file_tsuid VARCHAR(240),");
+        sentencia << wxT("content_datetime DATETIME,");
+        sentencia << wxT("sopcuid VARCHAR(240),");
+        sentencia << wxT("orientation CHAR,");//A,C,S, O
+        sentencia << wxT("image_positionx DOUBLE,");//patients position en la coordenada que interesa
+        sentencia << wxT("image_positiony DOUBLE,");//patients position en la coordenada que interesa
+        sentencia << wxT("image_positionz DOUBLE,");//patients position en la coordenada que interesa
+        sentencia << wxT("slice_location DOUBLE,");//slice location
+        sentencia << wxT("slice_thickness DOUBLE,");//slice thickness
+        sentencia << wxT("height INTEGER,");	//altura imagen
+        sentencia << wxT("width INTEGER,");		//anchura imagen
+        sentencia << wxT("number_of_frames INTEGER,"); //image number of frames
+        sentencia << wxT("instance_number INTEGER,"); //instance number
+        sentencia << wxT("file_desc VARCHAR(240),");
+        sentencia << wxT("spacing VARCHAR(240),");
+        sentencia << wxT("direction_cosines VARCHAR(240),");
+        sentencia << wxT("location CHAR DEFAULT 'B',"); //B implies fully local L implies some files linked W implies some files wado linked
+        sentencia << wxT("created_time DATETIME DEFAULT CURRENT_TIMESTAMP,");
+        sentencia << wxT("updated_time DATETIME);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index file_tsuid ");
+        sentencia << wxT("ON File(file_tsuid);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index orderBy1 ");
+        sentencia << wxT("ON File(instance_number, content_datetime, image_positionz);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index orderBy2 ");
+        sentencia << wxT("ON File(instance_number, content_datetime, image_positiony);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index orderBy3 ");
+        sentencia << wxT("ON File(instance_number, content_datetime, image_positionx);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index orderBy4 ");
+        sentencia << wxT("ON File(instance_number, content_datetime, slice_location);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index instance_number ");
+        sentencia << wxT("ON File(instance_number);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index content_datetime ");
+        sentencia << wxT("ON File(content_datetime);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index sopcuid ");
+        sentencia << wxT("ON File(sopcuid);");
+        dataBase.ExecuteUpdate(sentencia);
+        sentencia = wxEmptyString;
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index file_series ");
+        sentencia << wxT("ON File(pk, series_fk);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index file_location ");
+        sentencia << wxT("ON File(series_fk, location);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        //version table
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE TABLE MetadataBBDD (");
+        sentencia << wxT("Property VARCHAR(70) PRIMARY KEY, ");
+        sentencia << wxT("Value    VARCHAR(70));");
+        dataBase.ExecuteUpdate(sentencia);
+
+        //insert version value
+        sentencia = wxEmptyString;
+        sentencia << wxT("INSERT INTO MetadataBBDD (Property, Value) VALUES ('Version',") << GINKGO_BBDD_VERSION << wxT(");");
+        dataBase.ExecuteUpdate(sentencia);
+
+        /** tasks table **/
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE TABLE Tasks (");
+        sentencia << wxT("pk INTEGER PRIMARY KEY,"); //autoincrement by default (SQLITE)
+        sentencia << wxT("created_time DATETIME DEFAULT CURRENT_TIMESTAMP,");
+        sentencia << wxT("uid VARCHAR(40),");//class uid
+        sentencia << wxT("status INGEGER(1) DEFAULT '0',");//status
+        sentencia << wxT("error_description VARCHAR(240) DEFAULT '',");//message
+        sentencia << wxT("description VARCHAR(250),");//description
+        sentencia << wxT("data TEXT);");//task data
+        dataBase.ExecuteUpdate(sentencia);
+
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE Index task_created_time ");
+        sentencia << wxT("ON Tasks(created_time);");
+        dataBase.ExecuteUpdate(sentencia);
+
+        /** tasks table **/
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE TABLE TasksSeries (");
+        sentencia << wxT("task_fk INTEGER REFERENCES Tasks(pk) ON UPDATE CASCADE ON DELETE CASCADE,"); //task
+        sentencia << wxT("series_fk INTEGER REFERENCES Series(pk) ON UPDATE CASCADE ON DELETE CASCADE,");
+        sentencia << wxT("PRIMARY KEY (task_fk, series_fk));");//series
+        dataBase.ExecuteUpdate(sentencia);
+
+        /*Triggers de mantenimiento*/
+
+        //si se borran todos los ficheros de una serie se borra la serie
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE TRIGGER delete_fichero1 AFTER DELETE ON File ");
+        sentencia << wxT("FOR EACH ROW ");
+        sentencia << wxT("WHEN ((SELECT series_fk FROM File WHERE series_fk = OLD.series_fk) IS NULL) ");
+        sentencia << wxT("BEGIN ");
+        sentencia << wxT("DELETE FROM Series WHERE pk = OLD.series_fk; ");
+        sentencia << wxT("END;");
+        dataBase.ExecuteUpdate(sentencia);
+
+
+        //si se borran todas las series de un estudio se borra el estudio
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE TRIGGER delete_serie AFTER DELETE ON Series ");
+        sentencia << wxT("FOR EACH ROW ");
+        sentencia << wxT("WHEN ((SELECT study_fk FROM Series WHERE study_fk = OLD.study_fk) IS NULL) ");
+        sentencia << wxT("BEGIN ");
+        sentencia << wxT("DELETE FROM Study WHERE pk = OLD.study_fk; ");
+        sentencia << wxT("END;");
+        dataBase.ExecuteUpdate(sentencia);
+
+        //si se borran todas las tareas que no apunten a ninguna serie
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE TRIGGER delete_task AFTER DELETE ON TasksSeries ");
+        sentencia << wxT("FOR EACH ROW ");
+        sentencia << wxT("WHEN ((SELECT task_fk FROM TasksSeries WHERE task_fk = OLD.task_fk) IS NULL) ");
+        sentencia << wxT("BEGIN ");
+        sentencia << wxT("DELETE FROM Tasks WHERE pk = OLD.task_fk; ");
+        sentencia << wxT("END;");
+        dataBase.ExecuteUpdate(sentencia);
+
+        return(1);
+
+}
+
+int AbrirConexionThumbnails(wxSQLite3Database& dataBase,const std::string& DBFileName)
+{
+        if(dataBase.IsOpen()) {
+                return (0);
+        }
+
+        dataBase.Open(FROMPATH(DBFileName),wxEmptyString, WXSQLITE_OPEN_READWRITE|WXSQLITE_OPEN_CREATE);
+
+        return 1;
+}
+
+int CreateGinkgoDBThumbnails(wxSQLite3Database& dataBase,const std::string& DBFileName)
+{
+        if (!AbrirConexionThumbnails(dataBase, DBFileName)) {
+                return (0);
+        }
+        /** Create Tables del Historial: **/
+
+        wxString sentencia(wxT(""));
+        /** 1. Tabla de thumbnails **/
+        sentencia = wxEmptyString;
+        sentencia << wxT("CREATE TABLE Thumbnails (");
+        sentencia << wxT("file_pk INTEGER,");
+        sentencia << wxT("width INTEGER,");
+        sentencia << wxT("height INTEGER,");
+        sentencia << wxT("thumb BLOB ");
+        sentencia << wxT(", PRIMARY KEY (file_pk, width, height))");
+        dataBase.ExecuteUpdate(sentencia);
+        return(1);
+
+}
+
+
+
+
diff --git a/cadxcore/sqlite/hl7sqlite.h b/cadxcore/sqlite/hl7sqlite.h
new file mode 100644
index 0000000..b0d0ae9
--- /dev/null
+++ b/cadxcore/sqlite/hl7sqlite.h
@@ -0,0 +1,80 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <wx/wxsqlite3/wxsqlite3.h>
+#include <api/globals.h>
+#ifndef _WIN32
+#include <unistd.h>
+#define Sleep sleep
+#define strcpy_s strcpy
+#define strcat_s strcat
+#endif
+
+//#define _GINKGO_TRACE
+
+/** Timeout values on busy or lock conditions   **/
+/** if you observe lock errors you might try to **/
+/** increase the values.                        **/
+#define SQLTM_COUNT       200  /** -> SQLTM_COUNT*SQLTM_TIME ms timeout **/
+#define SQLTM_TIME        50
+
+inline int AbrirConexionBBDDMensajes(wxSQLite3Database& dataBase,const std::string& DBFileName)
+{
+        if(dataBase.IsOpen()) {
+                return (0);
+        }
+
+        dataBase.Open(FROMPATH(DBFileName),wxEmptyString, WXSQLITE_OPEN_READWRITE|WXSQLITE_OPEN_CREATE);
+
+        dataBase.EnableForeignKeySupport(false);
+
+        return 1;
+}
+
+inline int CreateMensajesHl7DB(wxSQLite3Database& dataBase,const std::string& DBFileName)
+{
+        if (!AbrirConexionBBDDMensajes(dataBase, DBFileName)) {
+                return (0);
+        }
+        /** Create Tables del Historial: **/
+
+        /** 1. Tabla de mensajes **/
+        wxString sentencia(wxT(""));
+        sentencia << wxT("CREATE TABLE MensajesHL7 (");
+        sentencia << wxT("IDMensaje INTEGER PRIMARY KEY,");
+        sentencia << wxT("FechaEnvio DATETIME,");
+        sentencia << wxT("Mensaje TEXT,");
+        sentencia << wxT("URLEnvio VARCHAR(1000),");
+        sentencia << wxT("Protocolo integer,");
+        sentencia << wxT("ProcesarACK CHAR,");
+        sentencia << wxT("MsgControlId VARCHAR(100) Default '',");
+        sentencia << wxT("MensajeError VARCHAR(500) Default NULL,");
+        sentencia << wxT("Enviado CHAR Default 'N');");
+        dataBase.ExecuteUpdate(sentencia);
+
+        return(1);
+
+}
+
+
+
+
diff --git a/cadxcore/sqlite/seguridad.h b/cadxcore/sqlite/seguridad.h
new file mode 100644
index 0000000..bea7b09
--- /dev/null
+++ b/cadxcore/sqlite/seguridad.h
@@ -0,0 +1,71 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <wx/wxsqlite3/wxsqlite3.h>
+#include <api/globals.h>
+#ifndef _WIN32
+#include <unistd.h>
+#define Sleep sleep
+#define strcpy_s strcpy
+#define strcat_s strcat
+#endif
+
+//#define _GINKGO_TRACE
+
+/** Timeout values on busy or lock conditions   **/
+/** if you observe lock errors you might try to **/
+/** increase the values.                        **/
+#define SQLTM_COUNT       200  /** -> SQLTM_COUNT*SQLTM_TIME ms timeout **/
+#define SQLTM_TIME        50
+
+inline int AbrirConexionBBDDSeguridad(wxSQLite3Database& dataBase,const std::string& DBFileName)
+{
+        if(dataBase.IsOpen()) {
+                return (0);
+        }
+
+        dataBase.Open(FROMPATH(DBFileName),wxEmptyString, WXSQLITE_OPEN_READWRITE|WXSQLITE_OPEN_CREATE);
+
+        dataBase.EnableForeignKeySupport(false);
+
+        return 1;
+}
+
+inline int CreateSeguridadDB(wxSQLite3Database& dataBase,const std::string& DBFileName)
+{
+        if (!AbrirConexionBBDDSeguridad(dataBase, DBFileName)) {
+                return (0);
+        }
+        /** Create Tables del Seguridad: **/
+
+        /** 1. Tabla de usuario/password **/
+        wxString sentencia(wxT(""));
+        sentencia << wxT("CREATE TABLE UserPass (");
+        sentencia << wxT("User VARCHAR(20) PRIMARY KEY,");
+        sentencia << wxT("Password VARCHAR(64));");
+        dataBase.ExecuteUpdate(sentencia);
+
+        return(1);
+}
+
+
+
+
diff --git a/cadxcore/sqlite/sqlite3.c b/cadxcore/sqlite/sqlite3.c
new file mode 100644
index 0000000..f0f5ffb
--- /dev/null
+++ b/cadxcore/sqlite/sqlite3.c
@@ -0,0 +1,126007 @@
+/******************************************************************************
+** This file is an amalgamation of many separate C source files from SQLite
+** version 3.7.6.2.  By combining all the individual C code files into this 
+** single large file, the entire code can be compiled as a single translation
+** unit.  This allows many compilers to do optimizations that would not be
+** possible if the files were compiled separately.  Performance improvements
+** of 5% or more are commonly seen when SQLite is compiled as a single
+** translation unit.
+**
+** This file is all you need to compile SQLite.  To use SQLite in other
+** programs, you need this file and the "sqlite3.h" header file that defines
+** the programming interface to the SQLite library.  (If you do not have 
+** the "sqlite3.h" header file at hand, you will find a copy embedded within
+** the text of this file.  Search for "Begin file sqlite3.h" to find the start
+** of the embedded sqlite3.h header file.) Additional code files may be needed
+** if you want a wrapper to interface SQLite with your choice of programming
+** language. The code for the "sqlite3" command-line shell is also in a
+** separate file. This file contains only code for the core SQLite library.
+*/
+#define SQLITE_CORE 1
+#define SQLITE_AMALGAMATION 1
+#ifndef SQLITE_PRIVATE
+# define SQLITE_PRIVATE static
+#endif
+#ifndef SQLITE_API
+# define SQLITE_API
+#endif
+/************** Begin file sqliteInt.h ***************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** Internal interface definitions for SQLite.
+**
+*/
+#ifndef _SQLITEINT_H_
+#define _SQLITEINT_H_
+
+/*
+** These #defines should enable >2GB file support on POSIX if the
+** underlying operating system supports it.  If the OS lacks
+** large file support, or if the OS is windows, these should be no-ops.
+**
+** Ticket #2739:  The _LARGEFILE_SOURCE macro must appear before any
+** system #includes.  Hence, this block of code must be the very first
+** code in all source files.
+**
+** Large file support can be disabled using the -DSQLITE_DISABLE_LFS switch
+** on the compiler command line.  This is necessary if you are compiling
+** on a recent machine (ex: Red Hat 7.2) but you want your code to work
+** on an older machine (ex: Red Hat 6.0).  If you compile on Red Hat 7.2
+** without this option, LFS is enable.  But LFS does not exist in the kernel
+** in Red Hat 6.0, so the code won't work.  Hence, for maximum binary
+** portability you should omit LFS.
+**
+** Similar is true for Mac OS X.  LFS is only supported on Mac OS X 9 and later.
+*/
+#ifndef SQLITE_DISABLE_LFS
+# define _LARGE_FILE       1
+# ifndef _FILE_OFFSET_BITS
+#   define _FILE_OFFSET_BITS 64
+# endif
+# define _LARGEFILE_SOURCE 1
+#endif
+
+/*
+** Include the configuration header output by 'configure' if we're using the
+** autoconf-based build
+*/
+#ifdef _HAVE_SQLITE_CONFIG_H
+#include "config.h"
+#endif
+
+/************** Include sqliteLimit.h in the middle of sqliteInt.h ***********/
+/************** Begin file sqliteLimit.h *************************************/
+/*
+** 2007 May 7
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** 
+** This file defines various limits of what SQLite can process.
+*/
+
+/*
+** The maximum length of a TEXT or BLOB in bytes.   This also
+** limits the size of a row in a table or index.
+**
+** The hard limit is the ability of a 32-bit signed integer
+** to count the size: 2^31-1 or 2147483647.
+*/
+#ifndef SQLITE_MAX_LENGTH
+# define SQLITE_MAX_LENGTH 1000000000
+#endif
+
+/*
+** This is the maximum number of
+**
+**    * Columns in a table
+**    * Columns in an index
+**    * Columns in a view
+**    * Terms in the SET clause of an UPDATE statement
+**    * Terms in the result set of a SELECT statement
+**    * Terms in the GROUP BY or ORDER BY clauses of a SELECT statement.
+**    * Terms in the VALUES clause of an INSERT statement
+**
+** The hard upper limit here is 32676.  Most database people will
+** tell you that in a well-normalized database, you usually should
+** not have more than a dozen or so columns in any table.  And if
+** that is the case, there is no point in having more than a few
+** dozen values in any of the other situations described above.
+*/
+#ifndef SQLITE_MAX_COLUMN
+# define SQLITE_MAX_COLUMN 2000
+#endif
+
+/*
+** The maximum length of a single SQL statement in bytes.
+**
+** It used to be the case that setting this value to zero would
+** turn the limit off.  That is no longer true.  It is not possible
+** to turn this limit off.
+*/
+#ifndef SQLITE_MAX_SQL_LENGTH
+# define SQLITE_MAX_SQL_LENGTH 1000000000
+#endif
+
+/*
+** The maximum depth of an expression tree. This is limited to 
+** some extent by SQLITE_MAX_SQL_LENGTH. But sometime you might 
+** want to place more severe limits on the complexity of an 
+** expression.
+**
+** A value of 0 used to mean that the limit was not enforced.
+** But that is no longer true.  The limit is now strictly enforced
+** at all times.
+*/
+#ifndef SQLITE_MAX_EXPR_DEPTH
+# define SQLITE_MAX_EXPR_DEPTH 1000
+#endif
+
+/*
+** The maximum number of terms in a compound SELECT statement.
+** The code generator for compound SELECT statements does one
+** level of recursion for each term.  A stack overflow can result
+** if the number of terms is too large.  In practice, most SQL
+** never has more than 3 or 4 terms.  Use a value of 0 to disable
+** any limit on the number of terms in a compount SELECT.
+*/
+#ifndef SQLITE_MAX_COMPOUND_SELECT
+# define SQLITE_MAX_COMPOUND_SELECT 500
+#endif
+
+/*
+** The maximum number of opcodes in a VDBE program.
+** Not currently enforced.
+*/
+#ifndef SQLITE_MAX_VDBE_OP
+# define SQLITE_MAX_VDBE_OP 25000
+#endif
+
+/*
+** The maximum number of arguments to an SQL function.
+*/
+#ifndef SQLITE_MAX_FUNCTION_ARG
+# define SQLITE_MAX_FUNCTION_ARG 127
+#endif
+
+/*
+** The maximum number of in-memory pages to use for the main database
+** table and for temporary tables.  The SQLITE_DEFAULT_CACHE_SIZE
+*/
+#ifndef SQLITE_DEFAULT_CACHE_SIZE
+# define SQLITE_DEFAULT_CACHE_SIZE  2000
+#endif
+#ifndef SQLITE_DEFAULT_TEMP_CACHE_SIZE
+# define SQLITE_DEFAULT_TEMP_CACHE_SIZE  500
+#endif
+
+/*
+** The default number of frames to accumulate in the log file before
+** checkpointing the database in WAL mode.
+*/
+#ifndef SQLITE_DEFAULT_WAL_AUTOCHECKPOINT
+# define SQLITE_DEFAULT_WAL_AUTOCHECKPOINT  1000
+#endif
+
+/*
+** The maximum number of attached databases.  This must be between 0
+** and 62.  The upper bound on 62 is because a 64-bit integer bitmap
+** is used internally to track attached databases.
+*/
+#ifndef SQLITE_MAX_ATTACHED
+# define SQLITE_MAX_ATTACHED 10
+#endif
+
+
+/*
+** The maximum value of a ?nnn wildcard that the parser will accept.
+*/
+#ifndef SQLITE_MAX_VARIABLE_NUMBER
+# define SQLITE_MAX_VARIABLE_NUMBER 999
+#endif
+
+/* Maximum page size.  The upper bound on this value is 65536.  This a limit
+** imposed by the use of 16-bit offsets within each page.
+**
+** Earlier versions of SQLite allowed the user to change this value at
+** compile time. This is no longer permitted, on the grounds that it creates
+** a library that is technically incompatible with an SQLite library 
+** compiled with a different limit. If a process operating on a database 
+** with a page-size of 65536 bytes crashes, then an instance of SQLite 
+** compiled with the default page-size limit will not be able to rollback 
+** the aborted transaction. This could lead to database corruption.
+*/
+#ifdef SQLITE_MAX_PAGE_SIZE
+# undef SQLITE_MAX_PAGE_SIZE
+#endif
+#define SQLITE_MAX_PAGE_SIZE 65536
+
+
+/*
+** The default size of a database page.
+*/
+#ifndef SQLITE_DEFAULT_PAGE_SIZE
+# define SQLITE_DEFAULT_PAGE_SIZE 1024
+#endif
+#if SQLITE_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE
+# undef SQLITE_DEFAULT_PAGE_SIZE
+# define SQLITE_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE
+#endif
+
+/*
+** Ordinarily, if no value is explicitly provided, SQLite creates databases
+** with page size SQLITE_DEFAULT_PAGE_SIZE. However, based on certain
+** device characteristics (sector-size and atomic write() support),
+** SQLite may choose a larger value. This constant is the maximum value
+** SQLite will choose on its own.
+*/
+#ifndef SQLITE_MAX_DEFAULT_PAGE_SIZE
+# define SQLITE_MAX_DEFAULT_PAGE_SIZE 8192
+#endif
+#if SQLITE_MAX_DEFAULT_PAGE_SIZE>SQLITE_MAX_PAGE_SIZE
+# undef SQLITE_MAX_DEFAULT_PAGE_SIZE
+# define SQLITE_MAX_DEFAULT_PAGE_SIZE SQLITE_MAX_PAGE_SIZE
+#endif
+
+
+/*
+** Maximum number of pages in one database file.
+**
+** This is really just the default value for the max_page_count pragma.
+** This value can be lowered (or raised) at run-time using that the
+** max_page_count macro.
+*/
+#ifndef SQLITE_MAX_PAGE_COUNT
+# define SQLITE_MAX_PAGE_COUNT 1073741823
+#endif
+
+/*
+** Maximum length (in bytes) of the pattern in a LIKE or GLOB
+** operator.
+*/
+#ifndef SQLITE_MAX_LIKE_PATTERN_LENGTH
+# define SQLITE_MAX_LIKE_PATTERN_LENGTH 50000
+#endif
+
+/*
+** Maximum depth of recursion for triggers.
+**
+** A value of 1 means that a trigger program will not be able to itself
+** fire any triggers. A value of 0 means that no trigger programs at all 
+** may be executed.
+*/
+#ifndef SQLITE_MAX_TRIGGER_DEPTH
+# define SQLITE_MAX_TRIGGER_DEPTH 1000
+#endif
+
+/************** End of sqliteLimit.h *****************************************/
+/************** Continuing where we left off in sqliteInt.h ******************/
+
+/* Disable nuisance warnings on Borland compilers */
+#if defined(__BORLANDC__)
+#pragma warn -rch /* unreachable code */
+#pragma warn -ccc /* Condition is always true or false */
+#pragma warn -aus /* Assigned value is never used */
+#pragma warn -csu /* Comparing signed and unsigned */
+#pragma warn -spa /* Suspicious pointer arithmetic */
+#endif
+
+/* Needed for various definitions... */
+#ifndef _GNU_SOURCE
+# define _GNU_SOURCE
+#endif
+
+/*
+** Include standard header files as necessary
+*/
+#ifdef HAVE_STDINT_H
+#include <stdint.h>
+#endif
+#ifdef HAVE_INTTYPES_H
+#include <inttypes.h>
+#endif
+
+/*
+** The number of samples of an index that SQLite takes in order to 
+** construct a histogram of the table content when running ANALYZE
+** and with SQLITE_ENABLE_STAT2
+*/
+#define SQLITE_INDEX_SAMPLES 10
+
+/*
+** The following macros are used to cast pointers to integers and
+** integers to pointers.  The way you do this varies from one compiler
+** to the next, so we have developed the following set of #if statements
+** to generate appropriate macros for a wide range of compilers.
+**
+** The correct "ANSI" way to do this is to use the intptr_t type. 
+** Unfortunately, that typedef is not available on all compilers, or
+** if it is available, it requires an #include of specific headers
+** that vary from one machine to the next.
+**
+** Ticket #3860:  The llvm-gcc-4.2 compiler from Apple chokes on
+** the ((void*)&((char*)0)[X]) construct.  But MSVC chokes on ((void*)(X)).
+** So we have to define the macros in different ways depending on the
+** compiler.
+*/
+#if defined(__PTRDIFF_TYPE__)  /* This case should work for GCC */
+# define SQLITE_INT_TO_PTR(X)  ((void*)(__PTRDIFF_TYPE__)(X))
+# define SQLITE_PTR_TO_INT(X)  ((int)(__PTRDIFF_TYPE__)(X))
+#elif !defined(__GNUC__)       /* Works for compilers other than LLVM */
+# define SQLITE_INT_TO_PTR(X)  ((void*)&((char*)0)[X])
+# define SQLITE_PTR_TO_INT(X)  ((int)(((char*)X)-(char*)0))
+#elif defined(HAVE_STDINT_H)   /* Use this case if we have ANSI headers */
+# define SQLITE_INT_TO_PTR(X)  ((void*)(intptr_t)(X))
+# define SQLITE_PTR_TO_INT(X)  ((int)(intptr_t)(X))
+#else                          /* Generates a warning - but it always works */
+# define SQLITE_INT_TO_PTR(X)  ((void*)(X))
+# define SQLITE_PTR_TO_INT(X)  ((int)(X))
+#endif
+
+/*
+** The SQLITE_THREADSAFE macro must be defined as 0, 1, or 2.
+** 0 means mutexes are permanently disable and the library is never
+** threadsafe.  1 means the library is serialized which is the highest
+** level of threadsafety.  2 means the libary is multithreaded - multiple
+** threads can use SQLite as long as no two threads try to use the same
+** database connection at the same time.
+**
+** Older versions of SQLite used an optional THREADSAFE macro.
+** We support that for legacy.
+*/
+#if !defined(SQLITE_THREADSAFE)
+#if defined(THREADSAFE)
+# define SQLITE_THREADSAFE THREADSAFE
+#else
+# define SQLITE_THREADSAFE 1 /* IMP: R-07272-22309 */
+#endif
+#endif
+
+/*
+** The SQLITE_DEFAULT_MEMSTATUS macro must be defined as either 0 or 1.
+** It determines whether or not the features related to 
+** SQLITE_CONFIG_MEMSTATUS are available by default or not. This value can
+** be overridden at runtime using the sqlite3_config() API.
+*/
+#if !defined(SQLITE_DEFAULT_MEMSTATUS)
+# define SQLITE_DEFAULT_MEMSTATUS 1
+#endif
+
+/*
+** Exactly one of the following macros must be defined in order to
+** specify which memory allocation subsystem to use.
+**
+**     SQLITE_SYSTEM_MALLOC          // Use normal system malloc()
+**     SQLITE_MEMDEBUG               // Debugging version of system malloc()
+**
+** (Historical note:  There used to be several other options, but we've
+** pared it down to just these two.)
+**
+** If none of the above are defined, then set SQLITE_SYSTEM_MALLOC as
+** the default.
+*/
+#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)>1
+# error "At most one of the following compile-time configuration options\
+ is allows: SQLITE_SYSTEM_MALLOC, SQLITE_MEMDEBUG"
+#endif
+#if defined(SQLITE_SYSTEM_MALLOC)+defined(SQLITE_MEMDEBUG)==0
+# define SQLITE_SYSTEM_MALLOC 1
+#endif
+
+/*
+** If SQLITE_MALLOC_SOFT_LIMIT is not zero, then try to keep the
+** sizes of memory allocations below this value where possible.
+*/
+#if !defined(SQLITE_MALLOC_SOFT_LIMIT)
+# define SQLITE_MALLOC_SOFT_LIMIT 1024
+#endif
+
+/*
+** We need to define _XOPEN_SOURCE as follows in order to enable
+** recursive mutexes on most Unix systems.  But Mac OS X is different.
+** The _XOPEN_SOURCE define causes problems for Mac OS X we are told,
+** so it is omitted there.  See ticket #2673.
+**
+** Later we learn that _XOPEN_SOURCE is poorly or incorrectly
+** implemented on some systems.  So we avoid defining it at all
+** if it is already defined or if it is unneeded because we are
+** not doing a threadsafe build.  Ticket #2681.
+**
+** See also ticket #2741.
+*/
+#if !defined(_XOPEN_SOURCE) && !defined(__DARWIN__) && !defined(__APPLE__) && SQLITE_THREADSAFE
+#  define _XOPEN_SOURCE 500  /* Needed to enable pthread recursive mutexes */
+#endif
+
+/*
+** The TCL headers are only needed when compiling the TCL bindings.
+*/
+#if defined(SQLITE_TCL) || defined(TCLSH)
+# include <tcl.h>
+#endif
+
+/*
+** Many people are failing to set -DNDEBUG=1 when compiling SQLite.
+** Setting NDEBUG makes the code smaller and run faster.  So the following
+** lines are added to automatically set NDEBUG unless the -DSQLITE_DEBUG=1
+** option is set.  Thus NDEBUG becomes an opt-in rather than an opt-out
+** feature.
+*/
+#if !defined(NDEBUG) && !defined(SQLITE_DEBUG) 
+# define NDEBUG 1
+#endif
+
+/*
+** The testcase() macro is used to aid in coverage testing.  When 
+** doing coverage testing, the condition inside the argument to
+** testcase() must be evaluated both true and false in order to
+** get full branch coverage.  The testcase() macro is inserted
+** to help ensure adequate test coverage in places where simple
+** condition/decision coverage is inadequate.  For example, testcase()
+** can be used to make sure boundary values are tested.  For
+** bitmask tests, testcase() can be used to make sure each bit
+** is significant and used at least once.  On switch statements
+** where multiple cases go to the same block of code, testcase()
+** can insure that all cases are evaluated.
+**
+*/
+#ifdef SQLITE_COVERAGE_TEST
+SQLITE_PRIVATE   void sqlite3Coverage(int);
+# define testcase(X)  if( X ){ sqlite3Coverage(__LINE__); }
+#else
+# define testcase(X)
+#endif
+
+/*
+** The TESTONLY macro is used to enclose variable declarations or
+** other bits of code that are needed to support the arguments
+** within testcase() and assert() macros.
+*/
+#if !defined(NDEBUG) || defined(SQLITE_COVERAGE_TEST)
+# define TESTONLY(X)  X
+#else
+# define TESTONLY(X)
+#endif
+
+/*
+** Sometimes we need a small amount of code such as a variable initialization
+** to setup for a later assert() statement.  We do not want this code to
+** appear when assert() is disabled.  The following macro is therefore
+** used to contain that setup code.  The "VVA" acronym stands for
+** "Verification, Validation, and Accreditation".  In other words, the
+** code within VVA_ONLY() will only run during verification processes.
+*/
+#ifndef NDEBUG
+# define VVA_ONLY(X)  X
+#else
+# define VVA_ONLY(X)
+#endif
+
+/*
+** The ALWAYS and NEVER macros surround boolean expressions which 
+** are intended to always be true or false, respectively.  Such
+** expressions could be omitted from the code completely.  But they
+** are included in a few cases in order to enhance the resilience
+** of SQLite to unexpected behavior - to make the code "self-healing"
+** or "ductile" rather than being "brittle" and crashing at the first
+** hint of unplanned behavior.
+**
+** In other words, ALWAYS and NEVER are added for defensive code.
+**
+** When doing coverage testing ALWAYS and NEVER are hard-coded to
+** be true and false so that the unreachable code then specify will
+** not be counted as untested code.
+*/
+#if defined(SQLITE_COVERAGE_TEST)
+# define ALWAYS(X)      (1)
+# define NEVER(X)       (0)
+#elif !defined(NDEBUG)
+# define ALWAYS(X)      ((X)?1:(assert(0),0))
+# define NEVER(X)       ((X)?(assert(0),1):0)
+#else
+# define ALWAYS(X)      (X)
+# define NEVER(X)       (X)
+#endif
+
+/*
+** Return true (non-zero) if the input is a integer that is too large
+** to fit in 32-bits.  This macro is used inside of various testcase()
+** macros to verify that we have tested SQLite for large-file support.
+*/
+#define IS_BIG_INT(X)  (((X)&~(i64)0xffffffff)!=0)
+
+/*
+** The macro unlikely() is a hint that surrounds a boolean
+** expression that is usually false.  Macro likely() surrounds
+** a boolean expression that is usually true.  GCC is able to
+** use these hints to generate better code, sometimes.
+*/
+#if defined(__GNUC__) && 0
+# define likely(X)    __builtin_expect((X),1)
+# define unlikely(X)  __builtin_expect((X),0)
+#else
+# define likely(X)    !!(X)
+# define unlikely(X)  !!(X)
+#endif
+
+/************** Include sqlite3.h in the middle of sqliteInt.h ***************/
+/************** Begin file sqlite3.h *****************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This header file defines the interface that the SQLite library
+** presents to client programs.  If a C-function, structure, datatype,
+** or constant definition does not appear in this file, then it is
+** not a published API of SQLite, is subject to change without
+** notice, and should not be referenced by programs that use SQLite.
+**
+** Some of the definitions that are in this file are marked as
+** "experimental".  Experimental interfaces are normally new
+** features recently added to SQLite.  We do not anticipate changes
+** to experimental interfaces but reserve the right to make minor changes
+** if experience from use "in the wild" suggest such changes are prudent.
+**
+** The official C-language API documentation for SQLite is derived
+** from comments in this file.  This file is the authoritative source
+** on how SQLite interfaces are suppose to operate.
+**
+** The name of this file under configuration management is "sqlite.h.in".
+** The makefile makes some minor changes to this file (such as inserting
+** the version number) and changes its name to "sqlite3.h" as
+** part of the build process.
+*/
+#ifndef _SQLITE3_H_
+#define _SQLITE3_H_
+#include <stdarg.h>     /* Needed for the definition of va_list */
+
+/*
+** Make sure we can call this stuff from C++.
+*/
+#if 0
+extern "C" {
+#endif
+
+
+/*
+** Add the ability to override 'extern'
+*/
+#ifndef SQLITE_EXTERN
+# define SQLITE_EXTERN extern
+#endif
+
+#ifndef SQLITE_API
+# define SQLITE_API
+#endif
+
+
+/*
+** These no-op macros are used in front of interfaces to mark those
+** interfaces as either deprecated or experimental.  New applications
+** should not use deprecated interfaces - they are support for backwards
+** compatibility only.  Application writers should be aware that
+** experimental interfaces are subject to change in point releases.
+**
+** These macros used to resolve to various kinds of compiler magic that
+** would generate warning messages when they were used.  But that
+** compiler magic ended up generating such a flurry of bug reports
+** that we have taken it all out and gone back to using simple
+** noop macros.
+*/
+#define SQLITE_DEPRECATED
+#define SQLITE_EXPERIMENTAL
+
+/*
+** Ensure these symbols were not defined by some previous header file.
+*/
+#ifdef SQLITE_VERSION
+# undef SQLITE_VERSION
+#endif
+#ifdef SQLITE_VERSION_NUMBER
+# undef SQLITE_VERSION_NUMBER
+#endif
+
+/*
+** CAPI3REF: Compile-Time Library Version Numbers
+**
+** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header
+** evaluates to a string literal that is the SQLite version in the
+** format "X.Y.Z" where X is the major version number (always 3 for
+** SQLite3) and Y is the minor version number and Z is the release number.)^
+** ^(The [SQLITE_VERSION_NUMBER] C preprocessor macro resolves to an integer
+** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same
+** numbers used in [SQLITE_VERSION].)^
+** The SQLITE_VERSION_NUMBER for any given release of SQLite will also
+** be larger than the release from which it is derived.  Either Y will
+** be held constant and Z will be incremented or else Y will be incremented
+** and Z will be reset to zero.
+**
+** Since version 3.6.18, SQLite source code has been stored in the
+** <a href="http://www.fossil-scm.org/">Fossil configuration management
+** system</a>.  ^The SQLITE_SOURCE_ID macro evaluates to
+** a string which identifies a particular check-in of SQLite
+** within its configuration management system.  ^The SQLITE_SOURCE_ID
+** string contains the date and time of the check-in (UTC) and an SHA1
+** hash of the entire source tree.
+**
+** See also: [sqlite3_libversion()],
+** [sqlite3_libversion_number()], [sqlite3_sourceid()],
+** [sqlite_version()] and [sqlite_source_id()].
+*/
+#define SQLITE_VERSION        "3.7.6.2"
+#define SQLITE_VERSION_NUMBER 3007006
+#define SQLITE_SOURCE_ID      "2011-04-17 17:25:17 154ddbc17120be2915eb03edc52af1225eb7cb5e"
+
+/*
+** CAPI3REF: Run-Time Library Version Numbers
+** KEYWORDS: sqlite3_version, sqlite3_sourceid
+**
+** These interfaces provide the same information as the [SQLITE_VERSION],
+** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
+** but are associated with the library instead of the header file.  ^(Cautious
+** programmers might include assert() statements in their application to
+** verify that values returned by these interfaces match the macros in
+** the header, and thus insure that the application is
+** compiled with matching library and header files.
+**
+** <blockquote><pre>
+** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
+** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
+** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
+** </pre></blockquote>)^
+**
+** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION]
+** macro.  ^The sqlite3_libversion() function returns a pointer to the
+** to the sqlite3_version[] string constant.  The sqlite3_libversion()
+** function is provided for use in DLLs since DLL users usually do not have
+** direct access to string constants within the DLL.  ^The
+** sqlite3_libversion_number() function returns an integer equal to
+** [SQLITE_VERSION_NUMBER].  ^The sqlite3_sourceid() function returns 
+** a pointer to a string constant whose value is the same as the 
+** [SQLITE_SOURCE_ID] C preprocessor macro.
+**
+** See also: [sqlite_version()] and [sqlite_source_id()].
+*/
+SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
+SQLITE_API const char *sqlite3_libversion(void);
+SQLITE_API const char *sqlite3_sourceid(void);
+SQLITE_API int sqlite3_libversion_number(void);
+
+/*
+** CAPI3REF: Run-Time Library Compilation Options Diagnostics
+**
+** ^The sqlite3_compileoption_used() function returns 0 or 1 
+** indicating whether the specified option was defined at 
+** compile time.  ^The SQLITE_ prefix may be omitted from the 
+** option name passed to sqlite3_compileoption_used().  
+**
+** ^The sqlite3_compileoption_get() function allows iterating
+** over the list of options that were defined at compile time by
+** returning the N-th compile time option string.  ^If N is out of range,
+** sqlite3_compileoption_get() returns a NULL pointer.  ^The SQLITE_ 
+** prefix is omitted from any strings returned by 
+** sqlite3_compileoption_get().
+**
+** ^Support for the diagnostic functions sqlite3_compileoption_used()
+** and sqlite3_compileoption_get() may be omitted by specifying the 
+** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time.
+**
+** See also: SQL functions [sqlite_compileoption_used()] and
+** [sqlite_compileoption_get()] and the [compile_options pragma].
+*/
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
+SQLITE_API const char *sqlite3_compileoption_get(int N);
+#endif
+
+/*
+** CAPI3REF: Test To See If The Library Is Threadsafe
+**
+** ^The sqlite3_threadsafe() function returns zero if and only if
+** SQLite was compiled mutexing code omitted due to the
+** [SQLITE_THREADSAFE] compile-time option being set to 0.
+**
+** SQLite can be compiled with or without mutexes.  When
+** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes
+** are enabled and SQLite is threadsafe.  When the
+** [SQLITE_THREADSAFE] macro is 0, 
+** the mutexes are omitted.  Without the mutexes, it is not safe
+** to use SQLite concurrently from more than one thread.
+**
+** Enabling mutexes incurs a measurable performance penalty.
+** So if speed is of utmost importance, it makes sense to disable
+** the mutexes.  But for maximum safety, mutexes should be enabled.
+** ^The default behavior is for mutexes to be enabled.
+**
+** This interface can be used by an application to make sure that the
+** version of SQLite that it is linking against was compiled with
+** the desired setting of the [SQLITE_THREADSAFE] macro.
+**
+** This interface only reports on the compile-time mutex setting
+** of the [SQLITE_THREADSAFE] flag.  If SQLite is compiled with
+** SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but
+** can be fully or partially disabled using a call to [sqlite3_config()]
+** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],
+** or [SQLITE_CONFIG_MUTEX].  ^(The return value of the
+** sqlite3_threadsafe() function shows only the compile-time setting of
+** thread safety, not any run-time changes to that setting made by
+** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
+** is unchanged by calls to sqlite3_config().)^
+**
+** See the [threading mode] documentation for additional information.
+*/
+SQLITE_API int sqlite3_threadsafe(void);
+
+/*
+** CAPI3REF: Database Connection Handle
+** KEYWORDS: {database connection} {database connections}
+**
+** Each open SQLite database is represented by a pointer to an instance of
+** the opaque structure named "sqlite3".  It is useful to think of an sqlite3
+** pointer as an object.  The [sqlite3_open()], [sqlite3_open16()], and
+** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]
+** is its destructor.  There are many other interfaces (such as
+** [sqlite3_prepare_v2()], [sqlite3_create_function()], and
+** [sqlite3_busy_timeout()] to name but three) that are methods on an
+** sqlite3 object.
+*/
+typedef struct sqlite3 sqlite3;
+
+/*
+** CAPI3REF: 64-Bit Integer Types
+** KEYWORDS: sqlite_int64 sqlite_uint64
+**
+** Because there is no cross-platform way to specify 64-bit integer types
+** SQLite includes typedefs for 64-bit signed and unsigned integers.
+**
+** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.
+** The sqlite_int64 and sqlite_uint64 types are supported for backwards
+** compatibility only.
+**
+** ^The sqlite3_int64 and sqlite_int64 types can store integer values
+** between -9223372036854775808 and +9223372036854775807 inclusive.  ^The
+** sqlite3_uint64 and sqlite_uint64 types can store integer values 
+** between 0 and +18446744073709551615 inclusive.
+*/
+#ifdef SQLITE_INT64_TYPE
+  typedef SQLITE_INT64_TYPE sqlite_int64;
+  typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
+#elif defined(_MSC_VER) || defined(__BORLANDC__)
+  typedef __int64 sqlite_int64;
+  typedef unsigned __int64 sqlite_uint64;
+#else
+  typedef long long int sqlite_int64;
+  typedef unsigned long long int sqlite_uint64;
+#endif
+typedef sqlite_int64 sqlite3_int64;
+typedef sqlite_uint64 sqlite3_uint64;
+
+/*
+** If compiling for a processor that lacks floating point support,
+** substitute integer for floating-point.
+*/
+#ifdef SQLITE_OMIT_FLOATING_POINT
+# define double sqlite3_int64
+#endif
+
+/*
+** CAPI3REF: Closing A Database Connection
+**
+** ^The sqlite3_close() routine is the destructor for the [sqlite3] object.
+** ^Calls to sqlite3_close() return SQLITE_OK if the [sqlite3] object is
+** successfully destroyed and all associated resources are deallocated.
+**
+** Applications must [sqlite3_finalize | finalize] all [prepared statements]
+** and [sqlite3_blob_close | close] all [BLOB handles] associated with
+** the [sqlite3] object prior to attempting to close the object.  ^If
+** sqlite3_close() is called on a [database connection] that still has
+** outstanding [prepared statements] or [BLOB handles], then it returns
+** SQLITE_BUSY.
+**
+** ^If [sqlite3_close()] is invoked while a transaction is open,
+** the transaction is automatically rolled back.
+**
+** The C parameter to [sqlite3_close(C)] must be either a NULL
+** pointer or an [sqlite3] object pointer obtained
+** from [sqlite3_open()], [sqlite3_open16()], or
+** [sqlite3_open_v2()], and not previously closed.
+** ^Calling sqlite3_close() with a NULL pointer argument is a 
+** harmless no-op.
+*/
+SQLITE_API int sqlite3_close(sqlite3 *);
+
+/*
+** The type for a callback function.
+** This is legacy and deprecated.  It is included for historical
+** compatibility and is not documented.
+*/
+typedef int (*sqlite3_callback)(void*,int,char**, char**);
+
+/*
+** CAPI3REF: One-Step Query Execution Interface
+**
+** The sqlite3_exec() interface is a convenience wrapper around
+** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()],
+** that allows an application to run multiple statements of SQL
+** without having to use a lot of C code. 
+**
+** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded,
+** semicolon-separate SQL statements passed into its 2nd argument,
+** in the context of the [database connection] passed in as its 1st
+** argument.  ^If the callback function of the 3rd argument to
+** sqlite3_exec() is not NULL, then it is invoked for each result row
+** coming out of the evaluated SQL statements.  ^The 4th argument to
+** to sqlite3_exec() is relayed through to the 1st argument of each
+** callback invocation.  ^If the callback pointer to sqlite3_exec()
+** is NULL, then no callback is ever invoked and result rows are
+** ignored.
+**
+** ^If an error occurs while evaluating the SQL statements passed into
+** sqlite3_exec(), then execution of the current statement stops and
+** subsequent statements are skipped.  ^If the 5th parameter to sqlite3_exec()
+** is not NULL then any error message is written into memory obtained
+** from [sqlite3_malloc()] and passed back through the 5th parameter.
+** To avoid memory leaks, the application should invoke [sqlite3_free()]
+** on error message strings returned through the 5th parameter of
+** of sqlite3_exec() after the error message string is no longer needed.
+** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors
+** occur, then sqlite3_exec() sets the pointer in its 5th parameter to
+** NULL before returning.
+**
+** ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec()
+** routine returns SQLITE_ABORT without invoking the callback again and
+** without running any subsequent SQL statements.
+**
+** ^The 2nd argument to the sqlite3_exec() callback function is the
+** number of columns in the result.  ^The 3rd argument to the sqlite3_exec()
+** callback is an array of pointers to strings obtained as if from
+** [sqlite3_column_text()], one for each column.  ^If an element of a
+** result row is NULL then the corresponding string pointer for the
+** sqlite3_exec() callback is a NULL pointer.  ^The 4th argument to the
+** sqlite3_exec() callback is an array of pointers to strings where each
+** entry represents the name of corresponding result column as obtained
+** from [sqlite3_column_name()].
+**
+** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer
+** to an empty string, or a pointer that contains only whitespace and/or 
+** SQL comments, then no SQL statements are evaluated and the database
+** is not changed.
+**
+** Restrictions:
+**
+** <ul>
+** <li> The application must insure that the 1st parameter to sqlite3_exec()
+**      is a valid and open [database connection].
+** <li> The application must not close [database connection] specified by
+**      the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
+** <li> The application must not modify the SQL statement text passed into
+**      the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
+** </ul>
+*/
+SQLITE_API int sqlite3_exec(
+  sqlite3*,                                  /* An open database */
+  const char *sql,                           /* SQL to be evaluated */
+  int (*callback)(void*,int,char**,char**),  /* Callback function */
+  void *,                                    /* 1st argument to callback */
+  char **errmsg                              /* Error msg written here */
+);
+
+/*
+** CAPI3REF: Result Codes
+** KEYWORDS: SQLITE_OK {error code} {error codes}
+** KEYWORDS: {result code} {result codes}
+**
+** Many SQLite functions return an integer result code from the set shown
+** here in order to indicates success or failure.
+**
+** New error codes may be added in future versions of SQLite.
+**
+** See also: [SQLITE_IOERR_READ | extended result codes]
+*/
+#define SQLITE_OK           0   /* Successful result */
+/* beginning-of-error-codes */
+#define SQLITE_ERROR        1   /* SQL error or missing database */
+#define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */
+#define SQLITE_PERM         3   /* Access permission denied */
+#define SQLITE_ABORT        4   /* Callback routine requested an abort */
+#define SQLITE_BUSY         5   /* The database file is locked */
+#define SQLITE_LOCKED       6   /* A table in the database is locked */
+#define SQLITE_NOMEM        7   /* A malloc() failed */
+#define SQLITE_READONLY     8   /* Attempt to write a readonly database */
+#define SQLITE_INTERRUPT    9   /* Operation terminated by sqlite3_interrupt()*/
+#define SQLITE_IOERR       10   /* Some kind of disk I/O error occurred */
+#define SQLITE_CORRUPT     11   /* The database disk image is malformed */
+#define SQLITE_NOTFOUND    12   /* Unknown opcode in sqlite3_file_control() */
+#define SQLITE_FULL        13   /* Insertion failed because database is full */
+#define SQLITE_CANTOPEN    14   /* Unable to open the database file */
+#define SQLITE_PROTOCOL    15   /* Database lock protocol error */
+#define SQLITE_EMPTY       16   /* Database is empty */
+#define SQLITE_SCHEMA      17   /* The database schema changed */
+#define SQLITE_TOOBIG      18   /* String or BLOB exceeds size limit */
+#define SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */
+#define SQLITE_MISMATCH    20   /* Data type mismatch */
+#define SQLITE_MISUSE      21   /* Library used incorrectly */
+#define SQLITE_NOLFS       22   /* Uses OS features not supported on host */
+#define SQLITE_AUTH        23   /* Authorization denied */
+#define SQLITE_FORMAT      24   /* Auxiliary database format error */
+#define SQLITE_RANGE       25   /* 2nd parameter to sqlite3_bind out of range */
+#define SQLITE_NOTADB      26   /* File opened that is not a database file */
+#define SQLITE_ROW         100  /* sqlite3_step() has another row ready */
+#define SQLITE_DONE        101  /* sqlite3_step() has finished executing */
+/* end-of-error-codes */
+
+/*
+** CAPI3REF: Extended Result Codes
+** KEYWORDS: {extended error code} {extended error codes}
+** KEYWORDS: {extended result code} {extended result codes}
+**
+** In its default configuration, SQLite API routines return one of 26 integer
+** [SQLITE_OK | result codes].  However, experience has shown that many of
+** these result codes are too coarse-grained.  They do not provide as
+** much information about problems as programmers might like.  In an effort to
+** address this, newer versions of SQLite (version 3.3.8 and later) include
+** support for additional result codes that provide more detailed information
+** about errors. The extended result codes are enabled or disabled
+** on a per database connection basis using the
+** [sqlite3_extended_result_codes()] API.
+**
+** Some of the available extended result codes are listed here.
+** One may expect the number of extended result codes will be expand
+** over time.  Software that uses extended result codes should expect
+** to see new result codes in future releases of SQLite.
+**
+** The SQLITE_OK result code will never be extended.  It will always
+** be exactly zero.
+*/
+#define SQLITE_IOERR_READ              (SQLITE_IOERR | (1<<8))
+#define SQLITE_IOERR_SHORT_READ        (SQLITE_IOERR | (2<<8))
+#define SQLITE_IOERR_WRITE             (SQLITE_IOERR | (3<<8))
+#define SQLITE_IOERR_FSYNC             (SQLITE_IOERR | (4<<8))
+#define SQLITE_IOERR_DIR_FSYNC         (SQLITE_IOERR | (5<<8))
+#define SQLITE_IOERR_TRUNCATE          (SQLITE_IOERR | (6<<8))
+#define SQLITE_IOERR_FSTAT             (SQLITE_IOERR | (7<<8))
+#define SQLITE_IOERR_UNLOCK            (SQLITE_IOERR | (8<<8))
+#define SQLITE_IOERR_RDLOCK            (SQLITE_IOERR | (9<<8))
+#define SQLITE_IOERR_DELETE            (SQLITE_IOERR | (10<<8))
+#define SQLITE_IOERR_BLOCKED           (SQLITE_IOERR | (11<<8))
+#define SQLITE_IOERR_NOMEM             (SQLITE_IOERR | (12<<8))
+#define SQLITE_IOERR_ACCESS            (SQLITE_IOERR | (13<<8))
+#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))
+#define SQLITE_IOERR_LOCK              (SQLITE_IOERR | (15<<8))
+#define SQLITE_IOERR_CLOSE             (SQLITE_IOERR | (16<<8))
+#define SQLITE_IOERR_DIR_CLOSE         (SQLITE_IOERR | (17<<8))
+#define SQLITE_IOERR_SHMOPEN           (SQLITE_IOERR | (18<<8))
+#define SQLITE_IOERR_SHMSIZE           (SQLITE_IOERR | (19<<8))
+#define SQLITE_IOERR_SHMLOCK           (SQLITE_IOERR | (20<<8))
+#define SQLITE_LOCKED_SHAREDCACHE      (SQLITE_LOCKED |  (1<<8))
+#define SQLITE_BUSY_RECOVERY           (SQLITE_BUSY   |  (1<<8))
+#define SQLITE_CANTOPEN_NOTEMPDIR      (SQLITE_CANTOPEN | (1<<8))
+
+/*
+** CAPI3REF: Flags For File Open Operations
+**
+** These bit values are intended for use in the
+** 3rd parameter to the [sqlite3_open_v2()] interface and
+** in the 4th parameter to the xOpen method of the
+** [sqlite3_vfs] object.
+*/
+#define SQLITE_OPEN_READONLY         0x00000001  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_READWRITE        0x00000002  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_CREATE           0x00000004  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_DELETEONCLOSE    0x00000008  /* VFS only */
+#define SQLITE_OPEN_EXCLUSIVE        0x00000010  /* VFS only */
+#define SQLITE_OPEN_AUTOPROXY        0x00000020  /* VFS only */
+#define SQLITE_OPEN_MAIN_DB          0x00000100  /* VFS only */
+#define SQLITE_OPEN_TEMP_DB          0x00000200  /* VFS only */
+#define SQLITE_OPEN_TRANSIENT_DB     0x00000400  /* VFS only */
+#define SQLITE_OPEN_MAIN_JOURNAL     0x00000800  /* VFS only */
+#define SQLITE_OPEN_TEMP_JOURNAL     0x00001000  /* VFS only */
+#define SQLITE_OPEN_SUBJOURNAL       0x00002000  /* VFS only */
+#define SQLITE_OPEN_MASTER_JOURNAL   0x00004000  /* VFS only */
+#define SQLITE_OPEN_NOMUTEX          0x00008000  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_FULLMUTEX        0x00010000  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_SHAREDCACHE      0x00020000  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_PRIVATECACHE     0x00040000  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_WAL              0x00080000  /* VFS only */
+
+/* Reserved:                         0x00F00000 */
+
+/*
+** CAPI3REF: Device Characteristics
+**
+** The xDeviceCharacteristics method of the [sqlite3_io_methods]
+** object returns an integer which is a vector of the these
+** bit values expressing I/O characteristics of the mass storage
+** device that holds the file that the [sqlite3_io_methods]
+** refers to.
+**
+** The SQLITE_IOCAP_ATOMIC property means that all writes of
+** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
+** mean that writes of blocks that are nnn bytes in size and
+** are aligned to an address which is an integer multiple of
+** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
+** that when data is appended to a file, the data is appended
+** first then the size of the file is extended, never the other
+** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
+** information is written to disk in the same order as calls
+** to xWrite().
+*/
+#define SQLITE_IOCAP_ATOMIC                 0x00000001
+#define SQLITE_IOCAP_ATOMIC512              0x00000002
+#define SQLITE_IOCAP_ATOMIC1K               0x00000004
+#define SQLITE_IOCAP_ATOMIC2K               0x00000008
+#define SQLITE_IOCAP_ATOMIC4K               0x00000010
+#define SQLITE_IOCAP_ATOMIC8K               0x00000020
+#define SQLITE_IOCAP_ATOMIC16K              0x00000040
+#define SQLITE_IOCAP_ATOMIC32K              0x00000080
+#define SQLITE_IOCAP_ATOMIC64K              0x00000100
+#define SQLITE_IOCAP_SAFE_APPEND            0x00000200
+#define SQLITE_IOCAP_SEQUENTIAL             0x00000400
+#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN  0x00000800
+
+/*
+** CAPI3REF: File Locking Levels
+**
+** SQLite uses one of these integer values as the second
+** argument to calls it makes to the xLock() and xUnlock() methods
+** of an [sqlite3_io_methods] object.
+*/
+#define SQLITE_LOCK_NONE          0
+#define SQLITE_LOCK_SHARED        1
+#define SQLITE_LOCK_RESERVED      2
+#define SQLITE_LOCK_PENDING       3
+#define SQLITE_LOCK_EXCLUSIVE     4
+
+/*
+** CAPI3REF: Synchronization Type Flags
+**
+** When SQLite invokes the xSync() method of an
+** [sqlite3_io_methods] object it uses a combination of
+** these integer values as the second argument.
+**
+** When the SQLITE_SYNC_DATAONLY flag is used, it means that the
+** sync operation only needs to flush data to mass storage.  Inode
+** information need not be flushed. If the lower four bits of the flag
+** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.
+** If the lower four bits equal SQLITE_SYNC_FULL, that means
+** to use Mac OS X style fullsync instead of fsync().
+**
+** Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags
+** with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL
+** settings.  The [synchronous pragma] determines when calls to the
+** xSync VFS method occur and applies uniformly across all platforms.
+** The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how
+** energetic or rigorous or forceful the sync operations are and
+** only make a difference on Mac OSX for the default SQLite code.
+** (Third-party VFS implementations might also make the distinction
+** between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the
+** operating systems natively supported by SQLite, only Mac OSX
+** cares about the difference.)
+*/
+#define SQLITE_SYNC_NORMAL        0x00002
+#define SQLITE_SYNC_FULL          0x00003
+#define SQLITE_SYNC_DATAONLY      0x00010
+
+/*
+** CAPI3REF: OS Interface Open File Handle
+**
+** An [sqlite3_file] object represents an open file in the 
+** [sqlite3_vfs | OS interface layer].  Individual OS interface
+** implementations will
+** want to subclass this object by appending additional fields
+** for their own use.  The pMethods entry is a pointer to an
+** [sqlite3_io_methods] object that defines methods for performing
+** I/O operations on the open file.
+*/
+typedef struct sqlite3_file sqlite3_file;
+struct sqlite3_file {
+  const struct sqlite3_io_methods *pMethods;  /* Methods for an open file */
+};
+
+/*
+** CAPI3REF: OS Interface File Virtual Methods Object
+**
+** Every file opened by the [sqlite3_vfs] xOpen method populates an
+** [sqlite3_file] object (or, more commonly, a subclass of the
+** [sqlite3_file] object) with a pointer to an instance of this object.
+** This object defines the methods used to perform various operations
+** against the open file represented by the [sqlite3_file] object.
+**
+** If the xOpen method sets the sqlite3_file.pMethods element 
+** to a non-NULL pointer, then the sqlite3_io_methods.xClose method
+** may be invoked even if the xOpen reported that it failed.  The
+** only way to prevent a call to xClose following a failed xOpen
+** is for the xOpen to set the sqlite3_file.pMethods element to NULL.
+**
+** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or
+** [SQLITE_SYNC_FULL].  The first choice is the normal fsync().
+** The second choice is a Mac OS X style fullsync.  The [SQLITE_SYNC_DATAONLY]
+** flag may be ORed in to indicate that only the data of the file
+** and not its inode needs to be synced.
+**
+** The integer values to xLock() and xUnlock() are one of
+** <ul>
+** <li> [SQLITE_LOCK_NONE],
+** <li> [SQLITE_LOCK_SHARED],
+** <li> [SQLITE_LOCK_RESERVED],
+** <li> [SQLITE_LOCK_PENDING], or
+** <li> [SQLITE_LOCK_EXCLUSIVE].
+** </ul>
+** xLock() increases the lock. xUnlock() decreases the lock.
+** The xCheckReservedLock() method checks whether any database connection,
+** either in this process or in some other process, is holding a RESERVED,
+** PENDING, or EXCLUSIVE lock on the file.  It returns true
+** if such a lock exists and false otherwise.
+**
+** The xFileControl() method is a generic interface that allows custom
+** VFS implementations to directly control an open file using the
+** [sqlite3_file_control()] interface.  The second "op" argument is an
+** integer opcode.  The third argument is a generic pointer intended to
+** point to a structure that may contain arguments or space in which to
+** write return values.  Potential uses for xFileControl() might be
+** functions to enable blocking locks with timeouts, to change the
+** locking strategy (for example to use dot-file locks), to inquire
+** about the status of a lock, or to break stale locks.  The SQLite
+** core reserves all opcodes less than 100 for its own use.
+** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available.
+** Applications that define a custom xFileControl method should use opcodes
+** greater than 100 to avoid conflicts.  VFS implementations should
+** return [SQLITE_NOTFOUND] for file control opcodes that they do not
+** recognize.
+**
+** The xSectorSize() method returns the sector size of the
+** device that underlies the file.  The sector size is the
+** minimum write that can be performed without disturbing
+** other bytes in the file.  The xDeviceCharacteristics()
+** method returns a bit vector describing behaviors of the
+** underlying device:
+**
+** <ul>
+** <li> [SQLITE_IOCAP_ATOMIC]
+** <li> [SQLITE_IOCAP_ATOMIC512]
+** <li> [SQLITE_IOCAP_ATOMIC1K]
+** <li> [SQLITE_IOCAP_ATOMIC2K]
+** <li> [SQLITE_IOCAP_ATOMIC4K]
+** <li> [SQLITE_IOCAP_ATOMIC8K]
+** <li> [SQLITE_IOCAP_ATOMIC16K]
+** <li> [SQLITE_IOCAP_ATOMIC32K]
+** <li> [SQLITE_IOCAP_ATOMIC64K]
+** <li> [SQLITE_IOCAP_SAFE_APPEND]
+** <li> [SQLITE_IOCAP_SEQUENTIAL]
+** </ul>
+**
+** The SQLITE_IOCAP_ATOMIC property means that all writes of
+** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
+** mean that writes of blocks that are nnn bytes in size and
+** are aligned to an address which is an integer multiple of
+** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
+** that when data is appended to a file, the data is appended
+** first then the size of the file is extended, never the other
+** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
+** information is written to disk in the same order as calls
+** to xWrite().
+**
+** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill
+** in the unread portions of the buffer with zeros.  A VFS that
+** fails to zero-fill short reads might seem to work.  However,
+** failure to zero-fill short reads will eventually lead to
+** database corruption.
+*/
+typedef struct sqlite3_io_methods sqlite3_io_methods;
+struct sqlite3_io_methods {
+  int iVersion;
+  int (*xClose)(sqlite3_file*);
+  int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);
+  int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);
+  int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
+  int (*xSync)(sqlite3_file*, int flags);
+  int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);
+  int (*xLock)(sqlite3_file*, int);
+  int (*xUnlock)(sqlite3_file*, int);
+  int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);
+  int (*xFileControl)(sqlite3_file*, int op, void *pArg);
+  int (*xSectorSize)(sqlite3_file*);
+  int (*xDeviceCharacteristics)(sqlite3_file*);
+  /* Methods above are valid for version 1 */
+  int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**);
+  int (*xShmLock)(sqlite3_file*, int offset, int n, int flags);
+  void (*xShmBarrier)(sqlite3_file*);
+  int (*xShmUnmap)(sqlite3_file*, int deleteFlag);
+  /* Methods above are valid for version 2 */
+  /* Additional methods may be added in future releases */
+};
+
+/*
+** CAPI3REF: Standard File Control Opcodes
+**
+** These integer constants are opcodes for the xFileControl method
+** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()]
+** interface.
+**
+** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging.  This
+** opcode causes the xFileControl method to write the current state of
+** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED],
+** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE])
+** into an integer that the pArg argument points to. This capability
+** is used during testing and only needs to be supported when SQLITE_TEST
+** is defined.
+**
+** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS
+** layer a hint of how large the database file will grow to be during the
+** current transaction.  This hint is not guaranteed to be accurate but it
+** is often close.  The underlying VFS might choose to preallocate database
+** file space based on this hint in order to help writes to the database
+** file run faster.
+**
+** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS
+** extends and truncates the database file in chunks of a size specified
+** by the user. The fourth argument to [sqlite3_file_control()] should 
+** point to an integer (type int) containing the new chunk-size to use
+** for the nominated database. Allocating database file space in large
+** chunks (say 1MB at a time), may reduce file-system fragmentation and
+** improve performance on some systems.
+**
+** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer
+** to the [sqlite3_file] object associated with a particular database
+** connection.  See the [sqlite3_file_control()] documentation for
+** additional information.
+**
+** ^(The [SQLITE_FCNTL_SYNC_OMITTED] opcode is generated internally by
+** SQLite and sent to all VFSes in place of a call to the xSync method
+** when the database connection has [PRAGMA synchronous] set to OFF.)^
+** Some specialized VFSes need this signal in order to operate correctly
+** when [PRAGMA synchronous | PRAGMA synchronous=OFF] is set, but most 
+** VFSes do not need this signal and should silently ignore this opcode.
+** Applications should not call [sqlite3_file_control()] with this
+** opcode as doing so may disrupt the operation of the specialized VFSes
+** that do require it.  
+*/
+#define SQLITE_FCNTL_LOCKSTATE        1
+#define SQLITE_GET_LOCKPROXYFILE      2
+#define SQLITE_SET_LOCKPROXYFILE      3
+#define SQLITE_LAST_ERRNO             4
+#define SQLITE_FCNTL_SIZE_HINT        5
+#define SQLITE_FCNTL_CHUNK_SIZE       6
+#define SQLITE_FCNTL_FILE_POINTER     7
+#define SQLITE_FCNTL_SYNC_OMITTED     8
+
+
+/*
+** CAPI3REF: Mutex Handle
+**
+** The mutex module within SQLite defines [sqlite3_mutex] to be an
+** abstract type for a mutex object.  The SQLite core never looks
+** at the internal representation of an [sqlite3_mutex].  It only
+** deals with pointers to the [sqlite3_mutex] object.
+**
+** Mutexes are created using [sqlite3_mutex_alloc()].
+*/
+typedef struct sqlite3_mutex sqlite3_mutex;
+
+/*
+** CAPI3REF: OS Interface Object
+**
+** An instance of the sqlite3_vfs object defines the interface between
+** the SQLite core and the underlying operating system.  The "vfs"
+** in the name of the object stands for "virtual file system".
+**
+** The value of the iVersion field is initially 1 but may be larger in
+** future versions of SQLite.  Additional fields may be appended to this
+** object when the iVersion value is increased.  Note that the structure
+** of the sqlite3_vfs object changes in the transaction between
+** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not
+** modified.
+**
+** The szOsFile field is the size of the subclassed [sqlite3_file]
+** structure used by this VFS.  mxPathname is the maximum length of
+** a pathname in this VFS.
+**
+** Registered sqlite3_vfs objects are kept on a linked list formed by
+** the pNext pointer.  The [sqlite3_vfs_register()]
+** and [sqlite3_vfs_unregister()] interfaces manage this list
+** in a thread-safe way.  The [sqlite3_vfs_find()] interface
+** searches the list.  Neither the application code nor the VFS
+** implementation should use the pNext pointer.
+**
+** The pNext field is the only field in the sqlite3_vfs
+** structure that SQLite will ever modify.  SQLite will only access
+** or modify this field while holding a particular static mutex.
+** The application should never modify anything within the sqlite3_vfs
+** object once the object has been registered.
+**
+** The zName field holds the name of the VFS module.  The name must
+** be unique across all VFS modules.
+**
+** ^SQLite guarantees that the zFilename parameter to xOpen
+** is either a NULL pointer or string obtained
+** from xFullPathname() with an optional suffix added.
+** ^If a suffix is added to the zFilename parameter, it will
+** consist of a single "-" character followed by no more than
+** 10 alphanumeric and/or "-" characters.
+** ^SQLite further guarantees that
+** the string will be valid and unchanged until xClose() is
+** called. Because of the previous sentence,
+** the [sqlite3_file] can safely store a pointer to the
+** filename if it needs to remember the filename for some reason.
+** If the zFilename parameter to xOpen is a NULL pointer then xOpen
+** must invent its own temporary name for the file.  ^Whenever the 
+** xFilename parameter is NULL it will also be the case that the
+** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].
+**
+** The flags argument to xOpen() includes all bits set in
+** the flags argument to [sqlite3_open_v2()].  Or if [sqlite3_open()]
+** or [sqlite3_open16()] is used, then flags includes at least
+** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]. 
+** If xOpen() opens a file read-only then it sets *pOutFlags to
+** include [SQLITE_OPEN_READONLY].  Other bits in *pOutFlags may be set.
+**
+** ^(SQLite will also add one of the following flags to the xOpen()
+** call, depending on the object being opened:
+**
+** <ul>
+** <li>  [SQLITE_OPEN_MAIN_DB]
+** <li>  [SQLITE_OPEN_MAIN_JOURNAL]
+** <li>  [SQLITE_OPEN_TEMP_DB]
+** <li>  [SQLITE_OPEN_TEMP_JOURNAL]
+** <li>  [SQLITE_OPEN_TRANSIENT_DB]
+** <li>  [SQLITE_OPEN_SUBJOURNAL]
+** <li>  [SQLITE_OPEN_MASTER_JOURNAL]
+** <li>  [SQLITE_OPEN_WAL]
+** </ul>)^
+**
+** The file I/O implementation can use the object type flags to
+** change the way it deals with files.  For example, an application
+** that does not care about crash recovery or rollback might make
+** the open of a journal file a no-op.  Writes to this journal would
+** also be no-ops, and any attempt to read the journal would return
+** SQLITE_IOERR.  Or the implementation might recognize that a database
+** file will be doing page-aligned sector reads and writes in a random
+** order and set up its I/O subsystem accordingly.
+**
+** SQLite might also add one of the following flags to the xOpen method:
+**
+** <ul>
+** <li> [SQLITE_OPEN_DELETEONCLOSE]
+** <li> [SQLITE_OPEN_EXCLUSIVE]
+** </ul>
+**
+** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be
+** deleted when it is closed.  ^The [SQLITE_OPEN_DELETEONCLOSE]
+** will be set for TEMP databases and their journals, transient
+** databases, and subjournals.
+**
+** ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction
+** with the [SQLITE_OPEN_CREATE] flag, which are both directly
+** analogous to the O_EXCL and O_CREAT flags of the POSIX open()
+** API.  The SQLITE_OPEN_EXCLUSIVE flag, when paired with the 
+** SQLITE_OPEN_CREATE, is used to indicate that file should always
+** be created, and that it is an error if it already exists.
+** It is <i>not</i> used to indicate the file should be opened 
+** for exclusive access.
+**
+** ^At least szOsFile bytes of memory are allocated by SQLite
+** to hold the  [sqlite3_file] structure passed as the third
+** argument to xOpen.  The xOpen method does not have to
+** allocate the structure; it should just fill it in.  Note that
+** the xOpen method must set the sqlite3_file.pMethods to either
+** a valid [sqlite3_io_methods] object or to NULL.  xOpen must do
+** this even if the open fails.  SQLite expects that the sqlite3_file.pMethods
+** element will be valid after xOpen returns regardless of the success
+** or failure of the xOpen call.
+**
+** ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]
+** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
+** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]
+** to test whether a file is at least readable.   The file can be a
+** directory.
+**
+** ^SQLite will always allocate at least mxPathname+1 bytes for the
+** output buffer xFullPathname.  The exact size of the output buffer
+** is also passed as a parameter to both  methods. If the output buffer
+** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is
+** handled as a fatal error by SQLite, vfs implementations should endeavor
+** to prevent this by setting mxPathname to a sufficiently large value.
+**
+** The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64()
+** interfaces are not strictly a part of the filesystem, but they are
+** included in the VFS structure for completeness.
+** The xRandomness() function attempts to return nBytes bytes
+** of good-quality randomness into zOut.  The return value is
+** the actual number of bytes of randomness obtained.
+** The xSleep() method causes the calling thread to sleep for at
+** least the number of microseconds given.  ^The xCurrentTime()
+** method returns a Julian Day Number for the current date and time as
+** a floating point value.
+** ^The xCurrentTimeInt64() method returns, as an integer, the Julian
+** Day Number multipled by 86400000 (the number of milliseconds in 
+** a 24-hour day).  
+** ^SQLite will use the xCurrentTimeInt64() method to get the current
+** date and time if that method is available (if iVersion is 2 or 
+** greater and the function pointer is not NULL) and will fall back
+** to xCurrentTime() if xCurrentTimeInt64() is unavailable.
+**
+** ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces
+** are not used by the SQLite core.  These optional interfaces are provided
+** by some VFSes to facilitate testing of the VFS code. By overriding 
+** system calls with functions under its control, a test program can
+** simulate faults and error conditions that would otherwise be difficult
+** or impossible to induce.  The set of system calls that can be overridden
+** varies from one VFS to another, and from one version of the same VFS to the
+** next.  Applications that use these interfaces must be prepared for any
+** or all of these interfaces to be NULL or for their behavior to change
+** from one release to the next.  Applications must not attempt to access
+** any of these methods if the iVersion of the VFS is less than 3.
+*/
+typedef struct sqlite3_vfs sqlite3_vfs;
+typedef void (*sqlite3_syscall_ptr)(void);
+struct sqlite3_vfs {
+  int iVersion;            /* Structure version number (currently 3) */
+  int szOsFile;            /* Size of subclassed sqlite3_file */
+  int mxPathname;          /* Maximum file pathname length */
+  sqlite3_vfs *pNext;      /* Next registered VFS */
+  const char *zName;       /* Name of this virtual file system */
+  void *pAppData;          /* Pointer to application-specific data */
+  int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,
+               int flags, int *pOutFlags);
+  int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
+  int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
+  int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
+  void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);
+  void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
+  void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
+  void (*xDlClose)(sqlite3_vfs*, void*);
+  int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
+  int (*xSleep)(sqlite3_vfs*, int microseconds);
+  int (*xCurrentTime)(sqlite3_vfs*, double*);
+  int (*xGetLastError)(sqlite3_vfs*, int, char *);
+  /*
+  ** The methods above are in version 1 of the sqlite_vfs object
+  ** definition.  Those that follow are added in version 2 or later
+  */
+  int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);
+  /*
+  ** The methods above are in versions 1 and 2 of the sqlite_vfs object.
+  ** Those below are for version 3 and greater.
+  */
+  int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr);
+  sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName);
+  const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName);
+  /*
+  ** The methods above are in versions 1 through 3 of the sqlite_vfs object.
+  ** New fields may be appended in figure versions.  The iVersion
+  ** value will increment whenever this happens. 
+  */
+};
+
+/*
+** CAPI3REF: Flags for the xAccess VFS method
+**
+** These integer constants can be used as the third parameter to
+** the xAccess method of an [sqlite3_vfs] object.  They determine
+** what kind of permissions the xAccess method is looking for.
+** With SQLITE_ACCESS_EXISTS, the xAccess method
+** simply checks whether the file exists.
+** With SQLITE_ACCESS_READWRITE, the xAccess method
+** checks whether the named directory is both readable and writable
+** (in other words, if files can be added, removed, and renamed within
+** the directory).
+** The SQLITE_ACCESS_READWRITE constant is currently used only by the
+** [temp_store_directory pragma], though this could change in a future
+** release of SQLite.
+** With SQLITE_ACCESS_READ, the xAccess method
+** checks whether the file is readable.  The SQLITE_ACCESS_READ constant is
+** currently unused, though it might be used in a future release of
+** SQLite.
+*/
+#define SQLITE_ACCESS_EXISTS    0
+#define SQLITE_ACCESS_READWRITE 1   /* Used by PRAGMA temp_store_directory */
+#define SQLITE_ACCESS_READ      2   /* Unused */
+
+/*
+** CAPI3REF: Flags for the xShmLock VFS method
+**
+** These integer constants define the various locking operations
+** allowed by the xShmLock method of [sqlite3_io_methods].  The
+** following are the only legal combinations of flags to the
+** xShmLock method:
+**
+** <ul>
+** <li>  SQLITE_SHM_LOCK | SQLITE_SHM_SHARED
+** <li>  SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE
+** <li>  SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED
+** <li>  SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE
+** </ul>
+**
+** When unlocking, the same SHARED or EXCLUSIVE flag must be supplied as
+** was given no the corresponding lock.  
+**
+** The xShmLock method can transition between unlocked and SHARED or
+** between unlocked and EXCLUSIVE.  It cannot transition between SHARED
+** and EXCLUSIVE.
+*/
+#define SQLITE_SHM_UNLOCK       1
+#define SQLITE_SHM_LOCK         2
+#define SQLITE_SHM_SHARED       4
+#define SQLITE_SHM_EXCLUSIVE    8
+
+/*
+** CAPI3REF: Maximum xShmLock index
+**
+** The xShmLock method on [sqlite3_io_methods] may use values
+** between 0 and this upper bound as its "offset" argument.
+** The SQLite core will never attempt to acquire or release a
+** lock outside of this range
+*/
+#define SQLITE_SHM_NLOCK        8
+
+
+/*
+** CAPI3REF: Initialize The SQLite Library
+**
+** ^The sqlite3_initialize() routine initializes the
+** SQLite library.  ^The sqlite3_shutdown() routine
+** deallocates any resources that were allocated by sqlite3_initialize().
+** These routines are designed to aid in process initialization and
+** shutdown on embedded systems.  Workstation applications using
+** SQLite normally do not need to invoke either of these routines.
+**
+** A call to sqlite3_initialize() is an "effective" call if it is
+** the first time sqlite3_initialize() is invoked during the lifetime of
+** the process, or if it is the first time sqlite3_initialize() is invoked
+** following a call to sqlite3_shutdown().  ^(Only an effective call
+** of sqlite3_initialize() does any initialization.  All other calls
+** are harmless no-ops.)^
+**
+** A call to sqlite3_shutdown() is an "effective" call if it is the first
+** call to sqlite3_shutdown() since the last sqlite3_initialize().  ^(Only
+** an effective call to sqlite3_shutdown() does any deinitialization.
+** All other valid calls to sqlite3_shutdown() are harmless no-ops.)^
+**
+** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown()
+** is not.  The sqlite3_shutdown() interface must only be called from a
+** single thread.  All open [database connections] must be closed and all
+** other SQLite resources must be deallocated prior to invoking
+** sqlite3_shutdown().
+**
+** Among other things, ^sqlite3_initialize() will invoke
+** sqlite3_os_init().  Similarly, ^sqlite3_shutdown()
+** will invoke sqlite3_os_end().
+**
+** ^The sqlite3_initialize() routine returns [SQLITE_OK] on success.
+** ^If for some reason, sqlite3_initialize() is unable to initialize
+** the library (perhaps it is unable to allocate a needed resource such
+** as a mutex) it returns an [error code] other than [SQLITE_OK].
+**
+** ^The sqlite3_initialize() routine is called internally by many other
+** SQLite interfaces so that an application usually does not need to
+** invoke sqlite3_initialize() directly.  For example, [sqlite3_open()]
+** calls sqlite3_initialize() so the SQLite library will be automatically
+** initialized when [sqlite3_open()] is called if it has not be initialized
+** already.  ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT]
+** compile-time option, then the automatic calls to sqlite3_initialize()
+** are omitted and the application must call sqlite3_initialize() directly
+** prior to using any other SQLite interface.  For maximum portability,
+** it is recommended that applications always invoke sqlite3_initialize()
+** directly prior to using any other SQLite interface.  Future releases
+** of SQLite may require this.  In other words, the behavior exhibited
+** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the
+** default behavior in some future release of SQLite.
+**
+** The sqlite3_os_init() routine does operating-system specific
+** initialization of the SQLite library.  The sqlite3_os_end()
+** routine undoes the effect of sqlite3_os_init().  Typical tasks
+** performed by these routines include allocation or deallocation
+** of static resources, initialization of global variables,
+** setting up a default [sqlite3_vfs] module, or setting up
+** a default configuration using [sqlite3_config()].
+**
+** The application should never invoke either sqlite3_os_init()
+** or sqlite3_os_end() directly.  The application should only invoke
+** sqlite3_initialize() and sqlite3_shutdown().  The sqlite3_os_init()
+** interface is called automatically by sqlite3_initialize() and
+** sqlite3_os_end() is called by sqlite3_shutdown().  Appropriate
+** implementations for sqlite3_os_init() and sqlite3_os_end()
+** are built into SQLite when it is compiled for Unix, Windows, or OS/2.
+** When [custom builds | built for other platforms]
+** (using the [SQLITE_OS_OTHER=1] compile-time
+** option) the application must supply a suitable implementation for
+** sqlite3_os_init() and sqlite3_os_end().  An application-supplied
+** implementation of sqlite3_os_init() or sqlite3_os_end()
+** must return [SQLITE_OK] on success and some other [error code] upon
+** failure.
+*/
+SQLITE_API int sqlite3_initialize(void);
+SQLITE_API int sqlite3_shutdown(void);
+SQLITE_API int sqlite3_os_init(void);
+SQLITE_API int sqlite3_os_end(void);
+
+/*
+** CAPI3REF: Configuring The SQLite Library
+**
+** The sqlite3_config() interface is used to make global configuration
+** changes to SQLite in order to tune SQLite to the specific needs of
+** the application.  The default configuration is recommended for most
+** applications and so this routine is usually not necessary.  It is
+** provided to support rare applications with unusual needs.
+**
+** The sqlite3_config() interface is not threadsafe.  The application
+** must insure that no other SQLite interfaces are invoked by other
+** threads while sqlite3_config() is running.  Furthermore, sqlite3_config()
+** may only be invoked prior to library initialization using
+** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].
+** ^If sqlite3_config() is called after [sqlite3_initialize()] and before
+** [sqlite3_shutdown()] then it will return SQLITE_MISUSE.
+** Note, however, that ^sqlite3_config() can be called as part of the
+** implementation of an application-defined [sqlite3_os_init()].
+**
+** The first argument to sqlite3_config() is an integer
+** [SQLITE_CONFIG_SINGLETHREAD | configuration option] that determines
+** what property of SQLite is to be configured.  Subsequent arguments
+** vary depending on the [SQLITE_CONFIG_SINGLETHREAD | configuration option]
+** in the first argument.
+**
+** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
+** ^If the option is unknown or SQLite is unable to set the option
+** then this routine returns a non-zero [error code].
+*/
+SQLITE_API int sqlite3_config(int, ...);
+
+/*
+** CAPI3REF: Configure database connections
+**
+** The sqlite3_db_config() interface is used to make configuration
+** changes to a [database connection].  The interface is similar to
+** [sqlite3_config()] except that the changes apply to a single
+** [database connection] (specified in the first argument).
+**
+** The second argument to sqlite3_db_config(D,V,...)  is the
+** [SQLITE_DBCONFIG_LOOKASIDE | configuration verb] - an integer code 
+** that indicates what aspect of the [database connection] is being configured.
+** Subsequent arguments vary depending on the configuration verb.
+**
+** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
+** the call is considered successful.
+*/
+SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
+
+/*
+** CAPI3REF: Memory Allocation Routines
+**
+** An instance of this object defines the interface between SQLite
+** and low-level memory allocation routines.
+**
+** This object is used in only one place in the SQLite interface.
+** A pointer to an instance of this object is the argument to
+** [sqlite3_config()] when the configuration option is
+** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC].  
+** By creating an instance of this object
+** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])
+** during configuration, an application can specify an alternative
+** memory allocation subsystem for SQLite to use for all of its
+** dynamic memory needs.
+**
+** Note that SQLite comes with several [built-in memory allocators]
+** that are perfectly adequate for the overwhelming majority of applications
+** and that this object is only useful to a tiny minority of applications
+** with specialized memory allocation requirements.  This object is
+** also used during testing of SQLite in order to specify an alternative
+** memory allocator that simulates memory out-of-memory conditions in
+** order to verify that SQLite recovers gracefully from such
+** conditions.
+**
+** The xMalloc and xFree methods must work like the
+** malloc() and free() functions from the standard C library.
+** The xRealloc method must work like realloc() from the standard C library
+** with the exception that if the second argument to xRealloc is zero,
+** xRealloc must be a no-op - it must not perform any allocation or
+** deallocation.  ^SQLite guarantees that the second argument to
+** xRealloc is always a value returned by a prior call to xRoundup.
+** And so in cases where xRoundup always returns a positive number,
+** xRealloc can perform exactly as the standard library realloc() and
+** still be in compliance with this specification.
+**
+** xSize should return the allocated size of a memory allocation
+** previously obtained from xMalloc or xRealloc.  The allocated size
+** is always at least as big as the requested size but may be larger.
+**
+** The xRoundup method returns what would be the allocated size of
+** a memory allocation given a particular requested size.  Most memory
+** allocators round up memory allocations at least to the next multiple
+** of 8.  Some allocators round up to a larger multiple or to a power of 2.
+** Every memory allocation request coming in through [sqlite3_malloc()]
+** or [sqlite3_realloc()] first calls xRoundup.  If xRoundup returns 0, 
+** that causes the corresponding memory allocation to fail.
+**
+** The xInit method initializes the memory allocator.  (For example,
+** it might allocate any require mutexes or initialize internal data
+** structures.  The xShutdown method is invoked (indirectly) by
+** [sqlite3_shutdown()] and should deallocate any resources acquired
+** by xInit.  The pAppData pointer is used as the only parameter to
+** xInit and xShutdown.
+**
+** SQLite holds the [SQLITE_MUTEX_STATIC_MASTER] mutex when it invokes
+** the xInit method, so the xInit method need not be threadsafe.  The
+** xShutdown method is only called from [sqlite3_shutdown()] so it does
+** not need to be threadsafe either.  For all other methods, SQLite
+** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the
+** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which
+** it is by default) and so the methods are automatically serialized.
+** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other
+** methods must be threadsafe or else make their own arrangements for
+** serialization.
+**
+** SQLite will never invoke xInit() more than once without an intervening
+** call to xShutdown().
+*/
+typedef struct sqlite3_mem_methods sqlite3_mem_methods;
+struct sqlite3_mem_methods {
+  void *(*xMalloc)(int);         /* Memory allocation function */
+  void (*xFree)(void*);          /* Free a prior allocation */
+  void *(*xRealloc)(void*,int);  /* Resize an allocation */
+  int (*xSize)(void*);           /* Return the size of an allocation */
+  int (*xRoundup)(int);          /* Round up request size to allocation size */
+  int (*xInit)(void*);           /* Initialize the memory allocator */
+  void (*xShutdown)(void*);      /* Deinitialize the memory allocator */
+  void *pAppData;                /* Argument to xInit() and xShutdown() */
+};
+
+/*
+** CAPI3REF: Configuration Options
+**
+** These constants are the available integer configuration options that
+** can be passed as the first argument to the [sqlite3_config()] interface.
+**
+** New configuration options may be added in future releases of SQLite.
+** Existing configuration options might be discontinued.  Applications
+** should check the return code from [sqlite3_config()] to make sure that
+** the call worked.  The [sqlite3_config()] interface will return a
+** non-zero [error code] if a discontinued or unsupported configuration option
+** is invoked.
+**
+** <dl>
+** <dt>SQLITE_CONFIG_SINGLETHREAD</dt>
+** <dd>There are no arguments to this option.  ^This option sets the
+** [threading mode] to Single-thread.  In other words, it disables
+** all mutexing and puts SQLite into a mode where it can only be used
+** by a single thread.   ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** it is not possible to change the [threading mode] from its default
+** value of Single-thread and so [sqlite3_config()] will return 
+** [SQLITE_ERROR] if called with the SQLITE_CONFIG_SINGLETHREAD
+** configuration option.</dd>
+**
+** <dt>SQLITE_CONFIG_MULTITHREAD</dt>
+** <dd>There are no arguments to this option.  ^This option sets the
+** [threading mode] to Multi-thread.  In other words, it disables
+** mutexing on [database connection] and [prepared statement] objects.
+** The application is responsible for serializing access to
+** [database connections] and [prepared statements].  But other mutexes
+** are enabled so that SQLite will be safe to use in a multi-threaded
+** environment as long as no two threads attempt to use the same
+** [database connection] at the same time.  ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** it is not possible to set the Multi-thread [threading mode] and
+** [sqlite3_config()] will return [SQLITE_ERROR] if called with the
+** SQLITE_CONFIG_MULTITHREAD configuration option.</dd>
+**
+** <dt>SQLITE_CONFIG_SERIALIZED</dt>
+** <dd>There are no arguments to this option.  ^This option sets the
+** [threading mode] to Serialized. In other words, this option enables
+** all mutexes including the recursive
+** mutexes on [database connection] and [prepared statement] objects.
+** In this mode (which is the default when SQLite is compiled with
+** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access
+** to [database connections] and [prepared statements] so that the
+** application is free to use the same [database connection] or the
+** same [prepared statement] in different threads at the same time.
+** ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** it is not possible to set the Serialized [threading mode] and
+** [sqlite3_config()] will return [SQLITE_ERROR] if called with the
+** SQLITE_CONFIG_SERIALIZED configuration option.</dd>
+**
+** <dt>SQLITE_CONFIG_MALLOC</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mem_methods] structure.  The argument specifies
+** alternative low-level memory allocation routines to be used in place of
+** the memory allocation routines built into SQLite.)^ ^SQLite makes
+** its own private copy of the content of the [sqlite3_mem_methods] structure
+** before the [sqlite3_config()] call returns.</dd>
+**
+** <dt>SQLITE_CONFIG_GETMALLOC</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mem_methods] structure.  The [sqlite3_mem_methods]
+** structure is filled with the currently defined memory allocation routines.)^
+** This option can be used to overload the default memory allocation
+** routines with a wrapper that simulations memory allocation failure or
+** tracks memory usage, for example. </dd>
+**
+** <dt>SQLITE_CONFIG_MEMSTATUS</dt>
+** <dd> ^This option takes single argument of type int, interpreted as a 
+** boolean, which enables or disables the collection of memory allocation 
+** statistics. ^(When memory allocation statistics are disabled, the 
+** following SQLite interfaces become non-operational:
+**   <ul>
+**   <li> [sqlite3_memory_used()]
+**   <li> [sqlite3_memory_highwater()]
+**   <li> [sqlite3_soft_heap_limit64()]
+**   <li> [sqlite3_status()]
+**   </ul>)^
+** ^Memory allocation statistics are enabled by default unless SQLite is
+** compiled with [SQLITE_DEFAULT_MEMSTATUS]=0 in which case memory
+** allocation statistics are disabled by default.
+** </dd>
+**
+** <dt>SQLITE_CONFIG_SCRATCH</dt>
+** <dd> ^This option specifies a static memory buffer that SQLite can use for
+** scratch memory.  There are three arguments:  A pointer an 8-byte
+** aligned memory buffer from which the scratch allocations will be
+** drawn, the size of each scratch allocation (sz),
+** and the maximum number of scratch allocations (N).  The sz
+** argument must be a multiple of 16.
+** The first argument must be a pointer to an 8-byte aligned buffer
+** of at least sz*N bytes of memory.
+** ^SQLite will use no more than two scratch buffers per thread.  So
+** N should be set to twice the expected maximum number of threads.
+** ^SQLite will never require a scratch buffer that is more than 6
+** times the database page size. ^If SQLite needs needs additional
+** scratch memory beyond what is provided by this configuration option, then 
+** [sqlite3_malloc()] will be used to obtain the memory needed.</dd>
+**
+** <dt>SQLITE_CONFIG_PAGECACHE</dt>
+** <dd> ^This option specifies a static memory buffer that SQLite can use for
+** the database page cache with the default page cache implemenation.  
+** This configuration should not be used if an application-define page
+** cache implementation is loaded using the SQLITE_CONFIG_PCACHE option.
+** There are three arguments to this option: A pointer to 8-byte aligned
+** memory, the size of each page buffer (sz), and the number of pages (N).
+** The sz argument should be the size of the largest database page
+** (a power of two between 512 and 32768) plus a little extra for each
+** page header.  ^The page header size is 20 to 40 bytes depending on
+** the host architecture.  ^It is harmless, apart from the wasted memory,
+** to make sz a little too large.  The first
+** argument should point to an allocation of at least sz*N bytes of memory.
+** ^SQLite will use the memory provided by the first argument to satisfy its
+** memory needs for the first N pages that it adds to cache.  ^If additional
+** page cache memory is needed beyond what is provided by this option, then
+** SQLite goes to [sqlite3_malloc()] for the additional storage space.
+** The pointer in the first argument must
+** be aligned to an 8-byte boundary or subsequent behavior of SQLite
+** will be undefined.</dd>
+**
+** <dt>SQLITE_CONFIG_HEAP</dt>
+** <dd> ^This option specifies a static memory buffer that SQLite will use
+** for all of its dynamic memory allocation needs beyond those provided
+** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE].
+** There are three arguments: An 8-byte aligned pointer to the memory,
+** the number of bytes in the memory buffer, and the minimum allocation size.
+** ^If the first pointer (the memory pointer) is NULL, then SQLite reverts
+** to using its default memory allocator (the system malloc() implementation),
+** undoing any prior invocation of [SQLITE_CONFIG_MALLOC].  ^If the
+** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or
+** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory
+** allocator is engaged to handle all of SQLites memory allocation needs.
+** The first pointer (the memory pointer) must be aligned to an 8-byte
+** boundary or subsequent behavior of SQLite will be undefined.
+** The minimum allocation size is capped at 2^12. Reasonable values
+** for the minimum allocation size are 2^5 through 2^8.</dd>
+**
+** <dt>SQLITE_CONFIG_MUTEX</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mutex_methods] structure.  The argument specifies
+** alternative low-level mutex routines to be used in place
+** the mutex routines built into SQLite.)^  ^SQLite makes a copy of the
+** content of the [sqlite3_mutex_methods] structure before the call to
+** [sqlite3_config()] returns. ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** the entire mutexing subsystem is omitted from the build and hence calls to
+** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will
+** return [SQLITE_ERROR].</dd>
+**
+** <dt>SQLITE_CONFIG_GETMUTEX</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mutex_methods] structure.  The
+** [sqlite3_mutex_methods]
+** structure is filled with the currently defined mutex routines.)^
+** This option can be used to overload the default mutex allocation
+** routines with a wrapper used to track mutex usage for performance
+** profiling or testing, for example.   ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** the entire mutexing subsystem is omitted from the build and hence calls to
+** [sqlite3_config()] with the SQLITE_CONFIG_GETMUTEX configuration option will
+** return [SQLITE_ERROR].</dd>
+**
+** <dt>SQLITE_CONFIG_LOOKASIDE</dt>
+** <dd> ^(This option takes two arguments that determine the default
+** memory allocation for the lookaside memory allocator on each
+** [database connection].  The first argument is the
+** size of each lookaside buffer slot and the second is the number of
+** slots allocated to each database connection.)^  ^(This option sets the
+** <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
+** verb to [sqlite3_db_config()] can be used to change the lookaside
+** configuration on individual connections.)^ </dd>
+**
+** <dt>SQLITE_CONFIG_PCACHE</dt>
+** <dd> ^(This option takes a single argument which is a pointer to
+** an [sqlite3_pcache_methods] object.  This object specifies the interface
+** to a custom page cache implementation.)^  ^SQLite makes a copy of the
+** object and uses it for page cache memory allocations.</dd>
+**
+** <dt>SQLITE_CONFIG_GETPCACHE</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** [sqlite3_pcache_methods] object.  SQLite copies of the current
+** page cache implementation into that object.)^ </dd>
+**
+** <dt>SQLITE_CONFIG_LOG</dt>
+** <dd> ^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a
+** function with a call signature of void(*)(void*,int,const char*), 
+** and a pointer to void. ^If the function pointer is not NULL, it is
+** invoked by [sqlite3_log()] to process each logging event.  ^If the
+** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op.
+** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is
+** passed through as the first parameter to the application-defined logger
+** function whenever that function is invoked.  ^The second parameter to
+** the logger function is a copy of the first parameter to the corresponding
+** [sqlite3_log()] call and is intended to be a [result code] or an
+** [extended result code].  ^The third parameter passed to the logger is
+** log message after formatting via [sqlite3_snprintf()].
+** The SQLite logging interface is not reentrant; the logger function
+** supplied by the application must not invoke any SQLite interface.
+** In a multi-threaded application, the application-defined logger
+** function must be threadsafe. </dd>
+**
+** </dl>
+*/
+#define SQLITE_CONFIG_SINGLETHREAD  1  /* nil */
+#define SQLITE_CONFIG_MULTITHREAD   2  /* nil */
+#define SQLITE_CONFIG_SERIALIZED    3  /* nil */
+#define SQLITE_CONFIG_MALLOC        4  /* sqlite3_mem_methods* */
+#define SQLITE_CONFIG_GETMALLOC     5  /* sqlite3_mem_methods* */
+#define SQLITE_CONFIG_SCRATCH       6  /* void*, int sz, int N */
+#define SQLITE_CONFIG_PAGECACHE     7  /* void*, int sz, int N */
+#define SQLITE_CONFIG_HEAP          8  /* void*, int nByte, int min */
+#define SQLITE_CONFIG_MEMSTATUS     9  /* boolean */
+#define SQLITE_CONFIG_MUTEX        10  /* sqlite3_mutex_methods* */
+#define SQLITE_CONFIG_GETMUTEX     11  /* sqlite3_mutex_methods* */
+/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */ 
+#define SQLITE_CONFIG_LOOKASIDE    13  /* int int */
+#define SQLITE_CONFIG_PCACHE       14  /* sqlite3_pcache_methods* */
+#define SQLITE_CONFIG_GETPCACHE    15  /* sqlite3_pcache_methods* */
+#define SQLITE_CONFIG_LOG          16  /* xFunc, void* */
+
+/*
+** CAPI3REF: Database Connection Configuration Options
+**
+** These constants are the available integer configuration options that
+** can be passed as the second argument to the [sqlite3_db_config()] interface.
+**
+** New configuration options may be added in future releases of SQLite.
+** Existing configuration options might be discontinued.  Applications
+** should check the return code from [sqlite3_db_config()] to make sure that
+** the call worked.  ^The [sqlite3_db_config()] interface will return a
+** non-zero [error code] if a discontinued or unsupported configuration option
+** is invoked.
+**
+** <dl>
+** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
+** <dd> ^This option takes three additional arguments that determine the 
+** [lookaside memory allocator] configuration for the [database connection].
+** ^The first argument (the third parameter to [sqlite3_db_config()] is a
+** pointer to a memory buffer to use for lookaside memory.
+** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb
+** may be NULL in which case SQLite will allocate the
+** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the
+** size of each lookaside buffer slot.  ^The third argument is the number of
+** slots.  The size of the buffer in the first argument must be greater than
+** or equal to the product of the second and third arguments.  The buffer
+** must be aligned to an 8-byte boundary.  ^If the second argument to
+** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally
+** rounded down to the next smaller multiple of 8.  ^(The lookaside memory
+** configuration for a database connection can only be changed when that
+** connection is not currently using lookaside memory, or in other words
+** when the "current value" returned by
+** [sqlite3_db_status](D,[SQLITE_CONFIG_LOOKASIDE],...) is zero.
+** Any attempt to change the lookaside memory configuration when lookaside
+** memory is in use leaves the configuration unchanged and returns 
+** [SQLITE_BUSY].)^</dd>
+**
+** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
+** <dd> ^This option is used to enable or disable the enforcement of
+** [foreign key constraints].  There should be two additional arguments.
+** The first argument is an integer which is 0 to disable FK enforcement,
+** positive to enable FK enforcement or negative to leave FK enforcement
+** unchanged.  The second parameter is a pointer to an integer into which
+** is written 0 or 1 to indicate whether FK enforcement is off or on
+** following this call.  The second parameter may be a NULL pointer, in
+** which case the FK enforcement setting is not reported back. </dd>
+**
+** <dt>SQLITE_DBCONFIG_ENABLE_TRIGGER</dt>
+** <dd> ^This option is used to enable or disable [CREATE TRIGGER | triggers].
+** There should be two additional arguments.
+** The first argument is an integer which is 0 to disable triggers,
+** positive to enable triggers or negative to leave the setting unchanged.
+** The second parameter is a pointer to an integer into which
+** is written 0 or 1 to indicate whether triggers are disabled or enabled
+** following this call.  The second parameter may be a NULL pointer, in
+** which case the trigger setting is not reported back. </dd>
+**
+** </dl>
+*/
+#define SQLITE_DBCONFIG_LOOKASIDE       1001  /* void* int int */
+#define SQLITE_DBCONFIG_ENABLE_FKEY     1002  /* int int* */
+#define SQLITE_DBCONFIG_ENABLE_TRIGGER  1003  /* int int* */
+
+
+/*
+** CAPI3REF: Enable Or Disable Extended Result Codes
+**
+** ^The sqlite3_extended_result_codes() routine enables or disables the
+** [extended result codes] feature of SQLite. ^The extended result
+** codes are disabled by default for historical compatibility.
+*/
+SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
+
+/*
+** CAPI3REF: Last Insert Rowid
+**
+** ^Each entry in an SQLite table has a unique 64-bit signed
+** integer key called the [ROWID | "rowid"]. ^The rowid is always available
+** as an undeclared column named ROWID, OID, or _ROWID_ as long as those
+** names are not also used by explicitly declared columns. ^If
+** the table has a column of type [INTEGER PRIMARY KEY] then that column
+** is another alias for the rowid.
+**
+** ^This routine returns the [rowid] of the most recent
+** successful [INSERT] into the database from the [database connection]
+** in the first argument.  ^If no successful [INSERT]s
+** have ever occurred on that database connection, zero is returned.
+**
+** ^(If an [INSERT] occurs within a trigger, then the [rowid] of the inserted
+** row is returned by this routine as long as the trigger is running.
+** But once the trigger terminates, the value returned by this routine
+** reverts to the last value inserted before the trigger fired.)^
+**
+** ^An [INSERT] that fails due to a constraint violation is not a
+** successful [INSERT] and does not change the value returned by this
+** routine.  ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,
+** and INSERT OR ABORT make no changes to the return value of this
+** routine when their insertion fails.  ^(When INSERT OR REPLACE
+** encounters a constraint violation, it does not fail.  The
+** INSERT continues to completion after deleting rows that caused
+** the constraint problem so INSERT OR REPLACE will always change
+** the return value of this interface.)^
+**
+** ^For the purposes of this routine, an [INSERT] is considered to
+** be successful even if it is subsequently rolled back.
+**
+** This function is accessible to SQL statements via the
+** [last_insert_rowid() SQL function].
+**
+** If a separate thread performs a new [INSERT] on the same
+** database connection while the [sqlite3_last_insert_rowid()]
+** function is running and thus changes the last insert [rowid],
+** then the value returned by [sqlite3_last_insert_rowid()] is
+** unpredictable and might not equal either the old or the new
+** last insert [rowid].
+*/
+SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
+
+/*
+** CAPI3REF: Count The Number Of Rows Modified
+**
+** ^This function returns the number of database rows that were changed
+** or inserted or deleted by the most recently completed SQL statement
+** on the [database connection] specified by the first parameter.
+** ^(Only changes that are directly specified by the [INSERT], [UPDATE],
+** or [DELETE] statement are counted.  Auxiliary changes caused by
+** triggers or [foreign key actions] are not counted.)^ Use the
+** [sqlite3_total_changes()] function to find the total number of changes
+** including changes caused by triggers and foreign key actions.
+**
+** ^Changes to a view that are simulated by an [INSTEAD OF trigger]
+** are not counted.  Only real table changes are counted.
+**
+** ^(A "row change" is a change to a single row of a single table
+** caused by an INSERT, DELETE, or UPDATE statement.  Rows that
+** are changed as side effects of [REPLACE] constraint resolution,
+** rollback, ABORT processing, [DROP TABLE], or by any other
+** mechanisms do not count as direct row changes.)^
+**
+** A "trigger context" is a scope of execution that begins and
+** ends with the script of a [CREATE TRIGGER | trigger]. 
+** Most SQL statements are
+** evaluated outside of any trigger.  This is the "top level"
+** trigger context.  If a trigger fires from the top level, a
+** new trigger context is entered for the duration of that one
+** trigger.  Subtriggers create subcontexts for their duration.
+**
+** ^Calling [sqlite3_exec()] or [sqlite3_step()] recursively does
+** not create a new trigger context.
+**
+** ^This function returns the number of direct row changes in the
+** most recent INSERT, UPDATE, or DELETE statement within the same
+** trigger context.
+**
+** ^Thus, when called from the top level, this function returns the
+** number of changes in the most recent INSERT, UPDATE, or DELETE
+** that also occurred at the top level.  ^(Within the body of a trigger,
+** the sqlite3_changes() interface can be called to find the number of
+** changes in the most recently completed INSERT, UPDATE, or DELETE
+** statement within the body of the same trigger.
+** However, the number returned does not include changes
+** caused by subtriggers since those have their own context.)^
+**
+** See also the [sqlite3_total_changes()] interface, the
+** [count_changes pragma], and the [changes() SQL function].
+**
+** If a separate thread makes changes on the same database connection
+** while [sqlite3_changes()] is running then the value returned
+** is unpredictable and not meaningful.
+*/
+SQLITE_API int sqlite3_changes(sqlite3*);
+
+/*
+** CAPI3REF: Total Number Of Rows Modified
+**
+** ^This function returns the number of row changes caused by [INSERT],
+** [UPDATE] or [DELETE] statements since the [database connection] was opened.
+** ^(The count returned by sqlite3_total_changes() includes all changes
+** from all [CREATE TRIGGER | trigger] contexts and changes made by
+** [foreign key actions]. However,
+** the count does not include changes used to implement [REPLACE] constraints,
+** do rollbacks or ABORT processing, or [DROP TABLE] processing.  The
+** count does not include rows of views that fire an [INSTEAD OF trigger],
+** though if the INSTEAD OF trigger makes changes of its own, those changes 
+** are counted.)^
+** ^The sqlite3_total_changes() function counts the changes as soon as
+** the statement that makes them is completed (when the statement handle
+** is passed to [sqlite3_reset()] or [sqlite3_finalize()]).
+**
+** See also the [sqlite3_changes()] interface, the
+** [count_changes pragma], and the [total_changes() SQL function].
+**
+** If a separate thread makes changes on the same database connection
+** while [sqlite3_total_changes()] is running then the value
+** returned is unpredictable and not meaningful.
+*/
+SQLITE_API int sqlite3_total_changes(sqlite3*);
+
+/*
+** CAPI3REF: Interrupt A Long-Running Query
+**
+** ^This function causes any pending database operation to abort and
+** return at its earliest opportunity. This routine is typically
+** called in response to a user action such as pressing "Cancel"
+** or Ctrl-C where the user wants a long query operation to halt
+** immediately.
+**
+** ^It is safe to call this routine from a thread different from the
+** thread that is currently running the database operation.  But it
+** is not safe to call this routine with a [database connection] that
+** is closed or might close before sqlite3_interrupt() returns.
+**
+** ^If an SQL operation is very nearly finished at the time when
+** sqlite3_interrupt() is called, then it might not have an opportunity
+** to be interrupted and might continue to completion.
+**
+** ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT].
+** ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE
+** that is inside an explicit transaction, then the entire transaction
+** will be rolled back automatically.
+**
+** ^The sqlite3_interrupt(D) call is in effect until all currently running
+** SQL statements on [database connection] D complete.  ^Any new SQL statements
+** that are started after the sqlite3_interrupt() call and before the 
+** running statements reaches zero are interrupted as if they had been
+** running prior to the sqlite3_interrupt() call.  ^New SQL statements
+** that are started after the running statement count reaches zero are
+** not effected by the sqlite3_interrupt().
+** ^A call to sqlite3_interrupt(D) that occurs when there are no running
+** SQL statements is a no-op and has no effect on SQL statements
+** that are started after the sqlite3_interrupt() call returns.
+**
+** If the database connection closes while [sqlite3_interrupt()]
+** is running then bad things will likely happen.
+*/
+SQLITE_API void sqlite3_interrupt(sqlite3*);
+
+/*
+** CAPI3REF: Determine If An SQL Statement Is Complete
+**
+** These routines are useful during command-line input to determine if the
+** currently entered text seems to form a complete SQL statement or
+** if additional input is needed before sending the text into
+** SQLite for parsing.  ^These routines return 1 if the input string
+** appears to be a complete SQL statement.  ^A statement is judged to be
+** complete if it ends with a semicolon token and is not a prefix of a
+** well-formed CREATE TRIGGER statement.  ^Semicolons that are embedded within
+** string literals or quoted identifier names or comments are not
+** independent tokens (they are part of the token in which they are
+** embedded) and thus do not count as a statement terminator.  ^Whitespace
+** and comments that follow the final semicolon are ignored.
+**
+** ^These routines return 0 if the statement is incomplete.  ^If a
+** memory allocation fails, then SQLITE_NOMEM is returned.
+**
+** ^These routines do not parse the SQL statements thus
+** will not detect syntactically incorrect SQL.
+**
+** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior 
+** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked
+** automatically by sqlite3_complete16().  If that initialization fails,
+** then the return value from sqlite3_complete16() will be non-zero
+** regardless of whether or not the input SQL is complete.)^
+**
+** The input to [sqlite3_complete()] must be a zero-terminated
+** UTF-8 string.
+**
+** The input to [sqlite3_complete16()] must be a zero-terminated
+** UTF-16 string in native byte order.
+*/
+SQLITE_API int sqlite3_complete(const char *sql);
+SQLITE_API int sqlite3_complete16(const void *sql);
+
+/*
+** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
+**
+** ^This routine sets a callback function that might be invoked whenever
+** an attempt is made to open a database table that another thread
+** or process has locked.
+**
+** ^If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]
+** is returned immediately upon encountering the lock.  ^If the busy callback
+** is not NULL, then the callback might be invoked with two arguments.
+**
+** ^The first argument to the busy handler is a copy of the void* pointer which
+** is the third argument to sqlite3_busy_handler().  ^The second argument to
+** the busy handler callback is the number of times that the busy handler has
+** been invoked for this locking event.  ^If the
+** busy callback returns 0, then no additional attempts are made to
+** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned.
+** ^If the callback returns non-zero, then another attempt
+** is made to open the database for reading and the cycle repeats.
+**
+** The presence of a busy handler does not guarantee that it will be invoked
+** when there is lock contention. ^If SQLite determines that invoking the busy
+** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY]
+** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler.
+** Consider a scenario where one process is holding a read lock that
+** it is trying to promote to a reserved lock and
+** a second process is holding a reserved lock that it is trying
+** to promote to an exclusive lock.  The first process cannot proceed
+** because it is blocked by the second and the second process cannot
+** proceed because it is blocked by the first.  If both processes
+** invoke the busy handlers, neither will make any progress.  Therefore,
+** SQLite returns [SQLITE_BUSY] for the first process, hoping that this
+** will induce the first process to release its read lock and allow
+** the second process to proceed.
+**
+** ^The default busy callback is NULL.
+**
+** ^The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED]
+** when SQLite is in the middle of a large transaction where all the
+** changes will not fit into the in-memory cache.  SQLite will
+** already hold a RESERVED lock on the database file, but it needs
+** to promote this lock to EXCLUSIVE so that it can spill cache
+** pages into the database file without harm to concurrent
+** readers.  ^If it is unable to promote the lock, then the in-memory
+** cache will be left in an inconsistent state and so the error
+** code is promoted from the relatively benign [SQLITE_BUSY] to
+** the more severe [SQLITE_IOERR_BLOCKED].  ^This error code promotion
+** forces an automatic rollback of the changes.  See the
+** <a href="/cvstrac/wiki?p=CorruptionFollowingBusyError">
+** CorruptionFollowingBusyError</a> wiki page for a discussion of why
+** this is important.
+**
+** ^(There can only be a single busy handler defined for each
+** [database connection].  Setting a new busy handler clears any
+** previously set handler.)^  ^Note that calling [sqlite3_busy_timeout()]
+** will also set or clear the busy handler.
+**
+** The busy callback should not take any actions which modify the
+** database connection that invoked the busy handler.  Any such actions
+** result in undefined behavior.
+** 
+** A busy handler must not close the database connection
+** or [prepared statement] that invoked the busy handler.
+*/
+SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
+
+/*
+** CAPI3REF: Set A Busy Timeout
+**
+** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps
+** for a specified amount of time when a table is locked.  ^The handler
+** will sleep multiple times until at least "ms" milliseconds of sleeping
+** have accumulated.  ^After at least "ms" milliseconds of sleeping,
+** the handler returns 0 which causes [sqlite3_step()] to return
+** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED].
+**
+** ^Calling this routine with an argument less than or equal to zero
+** turns off all busy handlers.
+**
+** ^(There can only be a single busy handler for a particular
+** [database connection] any any given moment.  If another busy handler
+** was defined  (using [sqlite3_busy_handler()]) prior to calling
+** this routine, that other busy handler is cleared.)^
+*/
+SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
+
+/*
+** CAPI3REF: Convenience Routines For Running Queries
+**
+** This is a legacy interface that is preserved for backwards compatibility.
+** Use of this interface is not recommended.
+**
+** Definition: A <b>result table</b> is memory data structure created by the
+** [sqlite3_get_table()] interface.  A result table records the
+** complete query results from one or more queries.
+**
+** The table conceptually has a number of rows and columns.  But
+** these numbers are not part of the result table itself.  These
+** numbers are obtained separately.  Let N be the number of rows
+** and M be the number of columns.
+**
+** A result table is an array of pointers to zero-terminated UTF-8 strings.
+** There are (N+1)*M elements in the array.  The first M pointers point
+** to zero-terminated strings that  contain the names of the columns.
+** The remaining entries all point to query results.  NULL values result
+** in NULL pointers.  All other values are in their UTF-8 zero-terminated
+** string representation as returned by [sqlite3_column_text()].
+**
+** A result table might consist of one or more memory allocations.
+** It is not safe to pass a result table directly to [sqlite3_free()].
+** A result table should be deallocated using [sqlite3_free_table()].
+**
+** ^(As an example of the result table format, suppose a query result
+** is as follows:
+**
+** <blockquote><pre>
+**        Name        | Age
+**        -----------------------
+**        Alice       | 43
+**        Bob         | 28
+**        Cindy       | 21
+** </pre></blockquote>
+**
+** There are two column (M==2) and three rows (N==3).  Thus the
+** result table has 8 entries.  Suppose the result table is stored
+** in an array names azResult.  Then azResult holds this content:
+**
+** <blockquote><pre>
+**        azResult[0] = "Name";
+**        azResult[1] = "Age";
+**        azResult[2] = "Alice";
+**        azResult[3] = "43";
+**        azResult[4] = "Bob";
+**        azResult[5] = "28";
+**        azResult[6] = "Cindy";
+**        azResult[7] = "21";
+** </pre></blockquote>)^
+**
+** ^The sqlite3_get_table() function evaluates one or more
+** semicolon-separated SQL statements in the zero-terminated UTF-8
+** string of its 2nd parameter and returns a result table to the
+** pointer given in its 3rd parameter.
+**
+** After the application has finished with the result from sqlite3_get_table(),
+** it must pass the result table pointer to sqlite3_free_table() in order to
+** release the memory that was malloced.  Because of the way the
+** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling
+** function must not try to call [sqlite3_free()] directly.  Only
+** [sqlite3_free_table()] is able to release the memory properly and safely.
+**
+** The sqlite3_get_table() interface is implemented as a wrapper around
+** [sqlite3_exec()].  The sqlite3_get_table() routine does not have access
+** to any internal data structures of SQLite.  It uses only the public
+** interface defined here.  As a consequence, errors that occur in the
+** wrapper layer outside of the internal [sqlite3_exec()] call are not
+** reflected in subsequent calls to [sqlite3_errcode()] or
+** [sqlite3_errmsg()].
+*/
+SQLITE_API int sqlite3_get_table(
+  sqlite3 *db,          /* An open database */
+  const char *zSql,     /* SQL to be evaluated */
+  char ***pazResult,    /* Results of the query */
+  int *pnRow,           /* Number of result rows written here */
+  int *pnColumn,        /* Number of result columns written here */
+  char **pzErrmsg       /* Error msg written here */
+);
+SQLITE_API void sqlite3_free_table(char **result);
+
+/*
+** CAPI3REF: Formatted String Printing Functions
+**
+** These routines are work-alikes of the "printf()" family of functions
+** from the standard C library.
+**
+** ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their
+** results into memory obtained from [sqlite3_malloc()].
+** The strings returned by these two routines should be
+** released by [sqlite3_free()].  ^Both routines return a
+** NULL pointer if [sqlite3_malloc()] is unable to allocate enough
+** memory to hold the resulting string.
+**
+** ^(The sqlite3_snprintf() routine is similar to "snprintf()" from
+** the standard C library.  The result is written into the
+** buffer supplied as the second parameter whose size is given by
+** the first parameter. Note that the order of the
+** first two parameters is reversed from snprintf().)^  This is an
+** historical accident that cannot be fixed without breaking
+** backwards compatibility.  ^(Note also that sqlite3_snprintf()
+** returns a pointer to its buffer instead of the number of
+** characters actually written into the buffer.)^  We admit that
+** the number of characters written would be a more useful return
+** value but we cannot change the implementation of sqlite3_snprintf()
+** now without breaking compatibility.
+**
+** ^As long as the buffer size is greater than zero, sqlite3_snprintf()
+** guarantees that the buffer is always zero-terminated.  ^The first
+** parameter "n" is the total size of the buffer, including space for
+** the zero terminator.  So the longest string that can be completely
+** written will be n-1 characters.
+**
+** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf().
+**
+** These routines all implement some additional formatting
+** options that are useful for constructing SQL statements.
+** All of the usual printf() formatting options apply.  In addition, there
+** is are "%q", "%Q", and "%z" options.
+**
+** ^(The %q option works like %s in that it substitutes a null-terminated
+** string from the argument list.  But %q also doubles every '\'' character.
+** %q is designed for use inside a string literal.)^  By doubling each '\''
+** character it escapes that character and allows it to be inserted into
+** the string.
+**
+** For example, assume the string variable zText contains text as follows:
+**
+** <blockquote><pre>
+**  char *zText = "It's a happy day!";
+** </pre></blockquote>
+**
+** One can use this text in an SQL statement as follows:
+**
+** <blockquote><pre>
+**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
+**  sqlite3_exec(db, zSQL, 0, 0, 0);
+**  sqlite3_free(zSQL);
+** </pre></blockquote>
+**
+** Because the %q format string is used, the '\'' character in zText
+** is escaped and the SQL generated is as follows:
+**
+** <blockquote><pre>
+**  INSERT INTO table1 VALUES('It''s a happy day!')
+** </pre></blockquote>
+**
+** This is correct.  Had we used %s instead of %q, the generated SQL
+** would have looked like this:
+**
+** <blockquote><pre>
+**  INSERT INTO table1 VALUES('It's a happy day!');
+** </pre></blockquote>
+**
+** This second example is an SQL syntax error.  As a general rule you should
+** always use %q instead of %s when inserting text into a string literal.
+**
+** ^(The %Q option works like %q except it also adds single quotes around
+** the outside of the total string.  Additionally, if the parameter in the
+** argument list is a NULL pointer, %Q substitutes the text "NULL" (without
+** single quotes).)^  So, for example, one could say:
+**
+** <blockquote><pre>
+**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
+**  sqlite3_exec(db, zSQL, 0, 0, 0);
+**  sqlite3_free(zSQL);
+** </pre></blockquote>
+**
+** The code above will render a correct SQL statement in the zSQL
+** variable even if the zText variable is a NULL pointer.
+**
+** ^(The "%z" formatting option works like "%s" but with the
+** addition that after the string has been read and copied into
+** the result, [sqlite3_free()] is called on the input string.)^
+*/
+SQLITE_API char *sqlite3_mprintf(const char*,...);
+SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
+SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
+SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
+
+/*
+** CAPI3REF: Memory Allocation Subsystem
+**
+** The SQLite core uses these three routines for all of its own
+** internal memory allocation needs. "Core" in the previous sentence
+** does not include operating-system specific VFS implementation.  The
+** Windows VFS uses native malloc() and free() for some operations.
+**
+** ^The sqlite3_malloc() routine returns a pointer to a block
+** of memory at least N bytes in length, where N is the parameter.
+** ^If sqlite3_malloc() is unable to obtain sufficient free
+** memory, it returns a NULL pointer.  ^If the parameter N to
+** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns
+** a NULL pointer.
+**
+** ^Calling sqlite3_free() with a pointer previously returned
+** by sqlite3_malloc() or sqlite3_realloc() releases that memory so
+** that it might be reused.  ^The sqlite3_free() routine is
+** a no-op if is called with a NULL pointer.  Passing a NULL pointer
+** to sqlite3_free() is harmless.  After being freed, memory
+** should neither be read nor written.  Even reading previously freed
+** memory might result in a segmentation fault or other severe error.
+** Memory corruption, a segmentation fault, or other severe error
+** might result if sqlite3_free() is called with a non-NULL pointer that
+** was not obtained from sqlite3_malloc() or sqlite3_realloc().
+**
+** ^(The sqlite3_realloc() interface attempts to resize a
+** prior memory allocation to be at least N bytes, where N is the
+** second parameter.  The memory allocation to be resized is the first
+** parameter.)^ ^ If the first parameter to sqlite3_realloc()
+** is a NULL pointer then its behavior is identical to calling
+** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc().
+** ^If the second parameter to sqlite3_realloc() is zero or
+** negative then the behavior is exactly the same as calling
+** sqlite3_free(P) where P is the first parameter to sqlite3_realloc().
+** ^sqlite3_realloc() returns a pointer to a memory allocation
+** of at least N bytes in size or NULL if sufficient memory is unavailable.
+** ^If M is the size of the prior allocation, then min(N,M) bytes
+** of the prior allocation are copied into the beginning of buffer returned
+** by sqlite3_realloc() and the prior allocation is freed.
+** ^If sqlite3_realloc() returns NULL, then the prior allocation
+** is not freed.
+**
+** ^The memory returned by sqlite3_malloc() and sqlite3_realloc()
+** is always aligned to at least an 8 byte boundary, or to a
+** 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time
+** option is used.
+**
+** In SQLite version 3.5.0 and 3.5.1, it was possible to define
+** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in
+** implementation of these routines to be omitted.  That capability
+** is no longer provided.  Only built-in memory allocators can be used.
+**
+** The Windows OS interface layer calls
+** the system malloc() and free() directly when converting
+** filenames between the UTF-8 encoding used by SQLite
+** and whatever filename encoding is used by the particular Windows
+** installation.  Memory allocation errors are detected, but
+** they are reported back as [SQLITE_CANTOPEN] or
+** [SQLITE_IOERR] rather than [SQLITE_NOMEM].
+**
+** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()]
+** must be either NULL or else pointers obtained from a prior
+** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have
+** not yet been released.
+**
+** The application must not read or write any part of
+** a block of memory after it has been released using
+** [sqlite3_free()] or [sqlite3_realloc()].
+*/
+SQLITE_API void *sqlite3_malloc(int);
+SQLITE_API void *sqlite3_realloc(void*, int);
+SQLITE_API void sqlite3_free(void*);
+
+/*
+** CAPI3REF: Memory Allocator Statistics
+**
+** SQLite provides these two interfaces for reporting on the status
+** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()]
+** routines, which form the built-in memory allocation subsystem.
+**
+** ^The [sqlite3_memory_used()] routine returns the number of bytes
+** of memory currently outstanding (malloced but not freed).
+** ^The [sqlite3_memory_highwater()] routine returns the maximum
+** value of [sqlite3_memory_used()] since the high-water mark
+** was last reset.  ^The values returned by [sqlite3_memory_used()] and
+** [sqlite3_memory_highwater()] include any overhead
+** added by SQLite in its implementation of [sqlite3_malloc()],
+** but not overhead added by the any underlying system library
+** routines that [sqlite3_malloc()] may call.
+**
+** ^The memory high-water mark is reset to the current value of
+** [sqlite3_memory_used()] if and only if the parameter to
+** [sqlite3_memory_highwater()] is true.  ^The value returned
+** by [sqlite3_memory_highwater(1)] is the high-water mark
+** prior to the reset.
+*/
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
+
+/*
+** CAPI3REF: Pseudo-Random Number Generator
+**
+** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
+** select random [ROWID | ROWIDs] when inserting new records into a table that
+** already uses the largest possible [ROWID].  The PRNG is also used for
+** the build-in random() and randomblob() SQL functions.  This interface allows
+** applications to access the same PRNG for other purposes.
+**
+** ^A call to this routine stores N bytes of randomness into buffer P.
+**
+** ^The first time this routine is invoked (either internally or by
+** the application) the PRNG is seeded using randomness obtained
+** from the xRandomness method of the default [sqlite3_vfs] object.
+** ^On all subsequent invocations, the pseudo-randomness is generated
+** internally and without recourse to the [sqlite3_vfs] xRandomness
+** method.
+*/
+SQLITE_API void sqlite3_randomness(int N, void *P);
+
+/*
+** CAPI3REF: Compile-Time Authorization Callbacks
+**
+** ^This routine registers an authorizer callback with a particular
+** [database connection], supplied in the first argument.
+** ^The authorizer callback is invoked as SQL statements are being compiled
+** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],
+** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()].  ^At various
+** points during the compilation process, as logic is being created
+** to perform various actions, the authorizer callback is invoked to
+** see if those actions are allowed.  ^The authorizer callback should
+** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the
+** specific action but allow the SQL statement to continue to be
+** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be
+** rejected with an error.  ^If the authorizer callback returns
+** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY]
+** then the [sqlite3_prepare_v2()] or equivalent call that triggered
+** the authorizer will fail with an error message.
+**
+** When the callback returns [SQLITE_OK], that means the operation
+** requested is ok.  ^When the callback returns [SQLITE_DENY], the
+** [sqlite3_prepare_v2()] or equivalent call that triggered the
+** authorizer will fail with an error message explaining that
+** access is denied. 
+**
+** ^The first parameter to the authorizer callback is a copy of the third
+** parameter to the sqlite3_set_authorizer() interface. ^The second parameter
+** to the callback is an integer [SQLITE_COPY | action code] that specifies
+** the particular action to be authorized. ^The third through sixth parameters
+** to the callback are zero-terminated strings that contain additional
+** details about the action to be authorized.
+**
+** ^If the action code is [SQLITE_READ]
+** and the callback returns [SQLITE_IGNORE] then the
+** [prepared statement] statement is constructed to substitute
+** a NULL value in place of the table column that would have
+** been read if [SQLITE_OK] had been returned.  The [SQLITE_IGNORE]
+** return can be used to deny an untrusted user access to individual
+** columns of a table.
+** ^If the action code is [SQLITE_DELETE] and the callback returns
+** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the
+** [truncate optimization] is disabled and all rows are deleted individually.
+**
+** An authorizer is used when [sqlite3_prepare | preparing]
+** SQL statements from an untrusted source, to ensure that the SQL statements
+** do not try to access data they are not allowed to see, or that they do not
+** try to execute malicious statements that damage the database.  For
+** example, an application may allow a user to enter arbitrary
+** SQL queries for evaluation by a database.  But the application does
+** not want the user to be able to make arbitrary changes to the
+** database.  An authorizer could then be put in place while the
+** user-entered SQL is being [sqlite3_prepare | prepared] that
+** disallows everything except [SELECT] statements.
+**
+** Applications that need to process SQL from untrusted sources
+** might also consider lowering resource limits using [sqlite3_limit()]
+** and limiting database size using the [max_page_count] [PRAGMA]
+** in addition to using an authorizer.
+**
+** ^(Only a single authorizer can be in place on a database connection
+** at a time.  Each call to sqlite3_set_authorizer overrides the
+** previous call.)^  ^Disable the authorizer by installing a NULL callback.
+** The authorizer is disabled by default.
+**
+** The authorizer callback must not do anything that will modify
+** the database connection that invoked the authorizer callback.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** ^When [sqlite3_prepare_v2()] is used to prepare a statement, the
+** statement might be re-prepared during [sqlite3_step()] due to a 
+** schema change.  Hence, the application should ensure that the
+** correct authorizer callback remains in place during the [sqlite3_step()].
+**
+** ^Note that the authorizer callback is invoked only during
+** [sqlite3_prepare()] or its variants.  Authorization is not
+** performed during statement evaluation in [sqlite3_step()], unless
+** as stated in the previous paragraph, sqlite3_step() invokes
+** sqlite3_prepare_v2() to reprepare a statement after a schema change.
+*/
+SQLITE_API int sqlite3_set_authorizer(
+  sqlite3*,
+  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
+  void *pUserData
+);
+
+/*
+** CAPI3REF: Authorizer Return Codes
+**
+** The [sqlite3_set_authorizer | authorizer callback function] must
+** return either [SQLITE_OK] or one of these two constants in order
+** to signal SQLite whether or not the action is permitted.  See the
+** [sqlite3_set_authorizer | authorizer documentation] for additional
+** information.
+*/
+#define SQLITE_DENY   1   /* Abort the SQL statement with an error */
+#define SQLITE_IGNORE 2   /* Don't allow access, but don't generate an error */
+
+/*
+** CAPI3REF: Authorizer Action Codes
+**
+** The [sqlite3_set_authorizer()] interface registers a callback function
+** that is invoked to authorize certain SQL statement actions.  The
+** second parameter to the callback is an integer code that specifies
+** what action is being authorized.  These are the integer action codes that
+** the authorizer callback may be passed.
+**
+** These action code values signify what kind of operation is to be
+** authorized.  The 3rd and 4th parameters to the authorization
+** callback function will be parameters or NULL depending on which of these
+** codes is used as the second parameter.  ^(The 5th parameter to the
+** authorizer callback is the name of the database ("main", "temp",
+** etc.) if applicable.)^  ^The 6th parameter to the authorizer callback
+** is the name of the inner-most trigger or view that is responsible for
+** the access attempt or NULL if this access attempt is directly from
+** top-level SQL code.
+*/
+/******************************************* 3rd ************ 4th ***********/
+#define SQLITE_CREATE_INDEX          1   /* Index Name      Table Name      */
+#define SQLITE_CREATE_TABLE          2   /* Table Name      NULL            */
+#define SQLITE_CREATE_TEMP_INDEX     3   /* Index Name      Table Name      */
+#define SQLITE_CREATE_TEMP_TABLE     4   /* Table Name      NULL            */
+#define SQLITE_CREATE_TEMP_TRIGGER   5   /* Trigger Name    Table Name      */
+#define SQLITE_CREATE_TEMP_VIEW      6   /* View Name       NULL            */
+#define SQLITE_CREATE_TRIGGER        7   /* Trigger Name    Table Name      */
+#define SQLITE_CREATE_VIEW           8   /* View Name       NULL            */
+#define SQLITE_DELETE                9   /* Table Name      NULL            */
+#define SQLITE_DROP_INDEX           10   /* Index Name      Table Name      */
+#define SQLITE_DROP_TABLE           11   /* Table Name      NULL            */
+#define SQLITE_DROP_TEMP_INDEX      12   /* Index Name      Table Name      */
+#define SQLITE_DROP_TEMP_TABLE      13   /* Table Name      NULL            */
+#define SQLITE_DROP_TEMP_TRIGGER    14   /* Trigger Name    Table Name      */
+#define SQLITE_DROP_TEMP_VIEW       15   /* View Name       NULL            */
+#define SQLITE_DROP_TRIGGER         16   /* Trigger Name    Table Name      */
+#define SQLITE_DROP_VIEW            17   /* View Name       NULL            */
+#define SQLITE_INSERT               18   /* Table Name      NULL            */
+#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */
+#define SQLITE_READ                 20   /* Table Name      Column Name     */
+#define SQLITE_SELECT               21   /* NULL            NULL            */
+#define SQLITE_TRANSACTION          22   /* Operation       NULL            */
+#define SQLITE_UPDATE               23   /* Table Name      Column Name     */
+#define SQLITE_ATTACH               24   /* Filename        NULL            */
+#define SQLITE_DETACH               25   /* Database Name   NULL            */
+#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */
+#define SQLITE_REINDEX              27   /* Index Name      NULL            */
+#define SQLITE_ANALYZE              28   /* Table Name      NULL            */
+#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */
+#define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */
+#define SQLITE_FUNCTION             31   /* NULL            Function Name   */
+#define SQLITE_SAVEPOINT            32   /* Operation       Savepoint Name  */
+#define SQLITE_COPY                  0   /* No longer used */
+
+/*
+** CAPI3REF: Tracing And Profiling Functions
+**
+** These routines register callback functions that can be used for
+** tracing and profiling the execution of SQL statements.
+**
+** ^The callback function registered by sqlite3_trace() is invoked at
+** various times when an SQL statement is being run by [sqlite3_step()].
+** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the
+** SQL statement text as the statement first begins executing.
+** ^(Additional sqlite3_trace() callbacks might occur
+** as each triggered subprogram is entered.  The callbacks for triggers
+** contain a UTF-8 SQL comment that identifies the trigger.)^
+**
+** ^The callback function registered by sqlite3_profile() is invoked
+** as each SQL statement finishes.  ^The profile callback contains
+** the original statement text and an estimate of wall-clock time
+** of how long that statement took to run.  ^The profile callback
+** time is in units of nanoseconds, however the current implementation
+** is only capable of millisecond resolution so the six least significant
+** digits in the time are meaningless.  Future versions of SQLite
+** might provide greater resolution on the profiler callback.  The
+** sqlite3_profile() function is considered experimental and is
+** subject to change in future versions of SQLite.
+*/
+SQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
+SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*,
+   void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
+
+/*
+** CAPI3REF: Query Progress Callbacks
+**
+** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback
+** function X to be invoked periodically during long running calls to
+** [sqlite3_exec()], [sqlite3_step()] and [sqlite3_get_table()] for
+** database connection D.  An example use for this
+** interface is to keep a GUI updated during a large query.
+**
+** ^The parameter P is passed through as the only parameter to the 
+** callback function X.  ^The parameter N is the number of 
+** [virtual machine instructions] that are evaluated between successive
+** invocations of the callback X.
+**
+** ^Only a single progress handler may be defined at one time per
+** [database connection]; setting a new progress handler cancels the
+** old one.  ^Setting parameter X to NULL disables the progress handler.
+** ^The progress handler is also disabled by setting N to a value less
+** than 1.
+**
+** ^If the progress callback returns non-zero, the operation is
+** interrupted.  This feature can be used to implement a
+** "Cancel" button on a GUI progress dialog box.
+**
+** The progress handler callback must not do anything that will modify
+** the database connection that invoked the progress handler.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+*/
+SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
+
+/*
+** CAPI3REF: Opening A New Database Connection
+**
+** ^These routines open an SQLite database file whose name is given by the
+** filename argument. ^The filename argument is interpreted as UTF-8 for
+** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte
+** order for sqlite3_open16(). ^(A [database connection] handle is usually
+** returned in *ppDb, even if an error occurs.  The only exception is that
+** if SQLite is unable to allocate memory to hold the [sqlite3] object,
+** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]
+** object.)^ ^(If the database is opened (and/or created) successfully, then
+** [SQLITE_OK] is returned.  Otherwise an [error code] is returned.)^ ^The
+** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain
+** an English language description of the error following a failure of any
+** of the sqlite3_open() routines.
+**
+** ^The default encoding for the database will be UTF-8 if
+** sqlite3_open() or sqlite3_open_v2() is called and
+** UTF-16 in the native byte order if sqlite3_open16() is used.
+**
+** Whether or not an error occurs when it is opened, resources
+** associated with the [database connection] handle should be released by
+** passing it to [sqlite3_close()] when it is no longer required.
+**
+** The sqlite3_open_v2() interface works like sqlite3_open()
+** except that it accepts two additional parameters for additional control
+** over the new database connection.  ^(The flags parameter to
+** sqlite3_open_v2() can take one of
+** the following three values, optionally combined with the 
+** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE],
+** and/or [SQLITE_OPEN_PRIVATECACHE] flags:)^
+**
+** <dl>
+** ^(<dt>[SQLITE_OPEN_READONLY]</dt>
+** <dd>The database is opened in read-only mode.  If the database does not
+** already exist, an error is returned.</dd>)^
+**
+** ^(<dt>[SQLITE_OPEN_READWRITE]</dt>
+** <dd>The database is opened for reading and writing if possible, or reading
+** only if the file is write protected by the operating system.  In either
+** case the database must already exist, otherwise an error is returned.</dd>)^
+**
+** ^(<dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt>
+** <dd>The database is opened for reading and writing, and is created if
+** it does not already exist. This is the behavior that is always used for
+** sqlite3_open() and sqlite3_open16().</dd>)^
+** </dl>
+**
+** If the 3rd parameter to sqlite3_open_v2() is not one of the
+** combinations shown above or one of the combinations shown above combined
+** with the [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX],
+** [SQLITE_OPEN_SHAREDCACHE] and/or [SQLITE_OPEN_PRIVATECACHE] flags,
+** then the behavior is undefined.
+**
+** ^If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection
+** opens in the multi-thread [threading mode] as long as the single-thread
+** mode has not been set at compile-time or start-time.  ^If the
+** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens
+** in the serialized [threading mode] unless single-thread was
+** previously selected at compile-time or start-time.
+** ^The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be
+** eligible to use [shared cache mode], regardless of whether or not shared
+** cache is enabled using [sqlite3_enable_shared_cache()].  ^The
+** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not
+** participate in [shared cache mode] even if it is enabled.
+**
+** ^If the filename is ":memory:", then a private, temporary in-memory database
+** is created for the connection.  ^This in-memory database will vanish when
+** the database connection is closed.  Future versions of SQLite might
+** make use of additional special filenames that begin with the ":" character.
+** It is recommended that when a database filename actually does begin with
+** a ":" character you should prefix the filename with a pathname such as
+** "./" to avoid ambiguity.
+**
+** ^If the filename is an empty string, then a private, temporary
+** on-disk database will be created.  ^This private database will be
+** automatically deleted as soon as the database connection is closed.
+**
+** ^The fourth parameter to sqlite3_open_v2() is the name of the
+** [sqlite3_vfs] object that defines the operating system interface that
+** the new database connection should use.  ^If the fourth parameter is
+** a NULL pointer then the default [sqlite3_vfs] object is used.
+**
+** <b>Note to Windows users:</b>  The encoding used for the filename argument
+** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
+** codepage is currently defined.  Filenames containing international
+** characters must be converted to UTF-8 prior to passing them into
+** sqlite3_open() or sqlite3_open_v2().
+*/
+SQLITE_API int sqlite3_open(
+  const char *filename,   /* Database filename (UTF-8) */
+  sqlite3 **ppDb          /* OUT: SQLite db handle */
+);
+SQLITE_API int sqlite3_open16(
+  const void *filename,   /* Database filename (UTF-16) */
+  sqlite3 **ppDb          /* OUT: SQLite db handle */
+);
+SQLITE_API int sqlite3_open_v2(
+  const char *filename,   /* Database filename (UTF-8) */
+  sqlite3 **ppDb,         /* OUT: SQLite db handle */
+  int flags,              /* Flags */
+  const char *zVfs        /* Name of VFS module to use */
+);
+
+/*
+** CAPI3REF: Error Codes And Messages
+**
+** ^The sqlite3_errcode() interface returns the numeric [result code] or
+** [extended result code] for the most recent failed sqlite3_* API call
+** associated with a [database connection]. If a prior API call failed
+** but the most recent API call succeeded, the return value from
+** sqlite3_errcode() is undefined.  ^The sqlite3_extended_errcode()
+** interface is the same except that it always returns the 
+** [extended result code] even when extended result codes are
+** disabled.
+**
+** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
+** text that describes the error, as either UTF-8 or UTF-16 respectively.
+** ^(Memory to hold the error message string is managed internally.
+** The application does not need to worry about freeing the result.
+** However, the error string might be overwritten or deallocated by
+** subsequent calls to other SQLite interface functions.)^
+**
+** When the serialized [threading mode] is in use, it might be the
+** case that a second error occurs on a separate thread in between
+** the time of the first error and the call to these interfaces.
+** When that happens, the second error will be reported since these
+** interfaces always report the most recent result.  To avoid
+** this, each thread can obtain exclusive use of the [database connection] D
+** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning
+** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after
+** all calls to the interfaces listed here are completed.
+**
+** If an interface fails with SQLITE_MISUSE, that means the interface
+** was invoked incorrectly by the application.  In that case, the
+** error code and message may or may not be set.
+*/
+SQLITE_API int sqlite3_errcode(sqlite3 *db);
+SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
+SQLITE_API const char *sqlite3_errmsg(sqlite3*);
+SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
+
+/*
+** CAPI3REF: SQL Statement Object
+** KEYWORDS: {prepared statement} {prepared statements}
+**
+** An instance of this object represents a single SQL statement.
+** This object is variously known as a "prepared statement" or a
+** "compiled SQL statement" or simply as a "statement".
+**
+** The life of a statement object goes something like this:
+**
+** <ol>
+** <li> Create the object using [sqlite3_prepare_v2()] or a related
+**      function.
+** <li> Bind values to [host parameters] using the sqlite3_bind_*()
+**      interfaces.
+** <li> Run the SQL by calling [sqlite3_step()] one or more times.
+** <li> Reset the statement using [sqlite3_reset()] then go back
+**      to step 2.  Do this zero or more times.
+** <li> Destroy the object using [sqlite3_finalize()].
+** </ol>
+**
+** Refer to documentation on individual methods above for additional
+** information.
+*/
+typedef struct sqlite3_stmt sqlite3_stmt;
+
+/*
+** CAPI3REF: Run-time Limits
+**
+** ^(This interface allows the size of various constructs to be limited
+** on a connection by connection basis.  The first parameter is the
+** [database connection] whose limit is to be set or queried.  The
+** second parameter is one of the [limit categories] that define a
+** class of constructs to be size limited.  The third parameter is the
+** new limit for that construct.)^
+**
+** ^If the new limit is a negative number, the limit is unchanged.
+** ^(For each limit category SQLITE_LIMIT_<i>NAME</i> there is a 
+** [limits | hard upper bound]
+** set at compile-time by a C preprocessor macro called
+** [limits | SQLITE_MAX_<i>NAME</i>].
+** (The "_LIMIT_" in the name is changed to "_MAX_".))^
+** ^Attempts to increase a limit above its hard upper bound are
+** silently truncated to the hard upper bound.
+**
+** ^Regardless of whether or not the limit was changed, the 
+** [sqlite3_limit()] interface returns the prior value of the limit.
+** ^Hence, to find the current value of a limit without changing it,
+** simply invoke this interface with the third parameter set to -1.
+**
+** Run-time limits are intended for use in applications that manage
+** both their own internal database and also databases that are controlled
+** by untrusted external sources.  An example application might be a
+** web browser that has its own databases for storing history and
+** separate databases controlled by JavaScript applications downloaded
+** off the Internet.  The internal databases can be given the
+** large, default limits.  Databases managed by external sources can
+** be given much smaller limits designed to prevent a denial of service
+** attack.  Developers might also want to use the [sqlite3_set_authorizer()]
+** interface to further control untrusted SQL.  The size of the database
+** created by an untrusted script can be contained using the
+** [max_page_count] [PRAGMA].
+**
+** New run-time limit categories may be added in future releases.
+*/
+SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
+
+/*
+** CAPI3REF: Run-Time Limit Categories
+** KEYWORDS: {limit category} {*limit categories}
+**
+** These constants define various performance limits
+** that can be lowered at run-time using [sqlite3_limit()].
+** The synopsis of the meanings of the various limits is shown below.
+** Additional information is available at [limits | Limits in SQLite].
+**
+** <dl>
+** ^(<dt>SQLITE_LIMIT_LENGTH</dt>
+** <dd>The maximum size of any string or BLOB or table row, in bytes.<dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_SQL_LENGTH</dt>
+** <dd>The maximum length of an SQL statement, in bytes.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_COLUMN</dt>
+** <dd>The maximum number of columns in a table definition or in the
+** result set of a [SELECT] or the maximum number of columns in an index
+** or in an ORDER BY or GROUP BY clause.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_EXPR_DEPTH</dt>
+** <dd>The maximum depth of the parse tree on any expression.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_COMPOUND_SELECT</dt>
+** <dd>The maximum number of terms in a compound SELECT statement.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_VDBE_OP</dt>
+** <dd>The maximum number of instructions in a virtual machine program
+** used to implement an SQL statement.  This limit is not currently
+** enforced, though that might be added in some future release of
+** SQLite.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_FUNCTION_ARG</dt>
+** <dd>The maximum number of arguments on a function.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_ATTACHED</dt>
+** <dd>The maximum number of [ATTACH | attached databases].)^</dd>
+**
+** ^(<dt>SQLITE_LIMIT_LIKE_PATTERN_LENGTH</dt>
+** <dd>The maximum length of the pattern argument to the [LIKE] or
+** [GLOB] operators.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt>
+** <dd>The maximum index number of any [parameter] in an SQL statement.)^
+**
+** ^(<dt>SQLITE_LIMIT_TRIGGER_DEPTH</dt>
+** <dd>The maximum depth of recursion for triggers.</dd>)^
+** </dl>
+*/
+#define SQLITE_LIMIT_LENGTH                    0
+#define SQLITE_LIMIT_SQL_LENGTH                1
+#define SQLITE_LIMIT_COLUMN                    2
+#define SQLITE_LIMIT_EXPR_DEPTH                3
+#define SQLITE_LIMIT_COMPOUND_SELECT           4
+#define SQLITE_LIMIT_VDBE_OP                   5
+#define SQLITE_LIMIT_FUNCTION_ARG              6
+#define SQLITE_LIMIT_ATTACHED                  7
+#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH       8
+#define SQLITE_LIMIT_VARIABLE_NUMBER           9
+#define SQLITE_LIMIT_TRIGGER_DEPTH            10
+
+/*
+** CAPI3REF: Compiling An SQL Statement
+** KEYWORDS: {SQL statement compiler}
+**
+** To execute an SQL query, it must first be compiled into a byte-code
+** program using one of these routines.
+**
+** The first argument, "db", is a [database connection] obtained from a
+** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or
+** [sqlite3_open16()].  The database connection must not have been closed.
+**
+** The second argument, "zSql", is the statement to be compiled, encoded
+** as either UTF-8 or UTF-16.  The sqlite3_prepare() and sqlite3_prepare_v2()
+** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2()
+** use UTF-16.
+**
+** ^If the nByte argument is less than zero, then zSql is read up to the
+** first zero terminator. ^If nByte is non-negative, then it is the maximum
+** number of  bytes read from zSql.  ^When nByte is non-negative, the
+** zSql string ends at either the first '\000' or '\u0000' character or
+** the nByte-th byte, whichever comes first. If the caller knows
+** that the supplied string is nul-terminated, then there is a small
+** performance advantage to be gained by passing an nByte parameter that
+** is equal to the number of bytes in the input string <i>including</i>
+** the nul-terminator bytes.
+**
+** ^If pzTail is not NULL then *pzTail is made to point to the first byte
+** past the end of the first SQL statement in zSql.  These routines only
+** compile the first statement in zSql, so *pzTail is left pointing to
+** what remains uncompiled.
+**
+** ^*ppStmt is left pointing to a compiled [prepared statement] that can be
+** executed using [sqlite3_step()].  ^If there is an error, *ppStmt is set
+** to NULL.  ^If the input text contains no SQL (if the input is an empty
+** string or a comment) then *ppStmt is set to NULL.
+** The calling procedure is responsible for deleting the compiled
+** SQL statement using [sqlite3_finalize()] after it has finished with it.
+** ppStmt may not be NULL.
+**
+** ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK];
+** otherwise an [error code] is returned.
+**
+** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are
+** recommended for all new programs. The two older interfaces are retained
+** for backwards compatibility, but their use is discouraged.
+** ^In the "v2" interfaces, the prepared statement
+** that is returned (the [sqlite3_stmt] object) contains a copy of the
+** original SQL text. This causes the [sqlite3_step()] interface to
+** behave differently in three ways:
+**
+** <ol>
+** <li>
+** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it
+** always used to do, [sqlite3_step()] will automatically recompile the SQL
+** statement and try to run it again.
+** </li>
+**
+** <li>
+** ^When an error occurs, [sqlite3_step()] will return one of the detailed
+** [error codes] or [extended error codes].  ^The legacy behavior was that
+** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code
+** and the application would have to make a second call to [sqlite3_reset()]
+** in order to find the underlying cause of the problem. With the "v2" prepare
+** interfaces, the underlying reason for the error is returned immediately.
+** </li>
+**
+** <li>
+** ^If the specific value bound to [parameter | host parameter] in the 
+** WHERE clause might influence the choice of query plan for a statement,
+** then the statement will be automatically recompiled, as if there had been 
+** a schema change, on the first  [sqlite3_step()] call following any change
+** to the [sqlite3_bind_text | bindings] of that [parameter]. 
+** ^The specific value of WHERE-clause [parameter] might influence the 
+** choice of query plan if the parameter is the left-hand side of a [LIKE]
+** or [GLOB] operator or if the parameter is compared to an indexed column
+** and the [SQLITE_ENABLE_STAT2] compile-time option is enabled.
+** the 
+** </li>
+** </ol>
+*/
+SQLITE_API int sqlite3_prepare(
+  sqlite3 *db,            /* Database handle */
+  const char *zSql,       /* SQL statement, UTF-8 encoded */
+  int nByte,              /* Maximum length of zSql in bytes. */
+  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
+  const char **pzTail     /* OUT: Pointer to unused portion of zSql */
+);
+SQLITE_API int sqlite3_prepare_v2(
+  sqlite3 *db,            /* Database handle */
+  const char *zSql,       /* SQL statement, UTF-8 encoded */
+  int nByte,              /* Maximum length of zSql in bytes. */
+  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
+  const char **pzTail     /* OUT: Pointer to unused portion of zSql */
+);
+SQLITE_API int sqlite3_prepare16(
+  sqlite3 *db,            /* Database handle */
+  const void *zSql,       /* SQL statement, UTF-16 encoded */
+  int nByte,              /* Maximum length of zSql in bytes. */
+  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
+  const void **pzTail     /* OUT: Pointer to unused portion of zSql */
+);
+SQLITE_API int sqlite3_prepare16_v2(
+  sqlite3 *db,            /* Database handle */
+  const void *zSql,       /* SQL statement, UTF-16 encoded */
+  int nByte,              /* Maximum length of zSql in bytes. */
+  sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
+  const void **pzTail     /* OUT: Pointer to unused portion of zSql */
+);
+
+/*
+** CAPI3REF: Retrieving Statement SQL
+**
+** ^This interface can be used to retrieve a saved copy of the original
+** SQL text used to create a [prepared statement] if that statement was
+** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].
+*/
+SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Determine If An SQL Statement Writes The Database
+**
+** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if
+** and only if the [prepared statement] X makes no direct changes to
+** the content of the database file.
+**
+** Note that [application-defined SQL functions] or
+** [virtual tables] might change the database indirectly as a side effect.  
+** ^(For example, if an application defines a function "eval()" that 
+** calls [sqlite3_exec()], then the following SQL statement would
+** change the database file through side-effects:
+**
+** <blockquote><pre>
+**    SELECT eval('DELETE FROM t1') FROM t2;
+** </pre></blockquote>
+**
+** But because the [SELECT] statement does not change the database file
+** directly, sqlite3_stmt_readonly() would still return true.)^
+**
+** ^Transaction control statements such as [BEGIN], [COMMIT], [ROLLBACK],
+** [SAVEPOINT], and [RELEASE] cause sqlite3_stmt_readonly() to return true,
+** since the statements themselves do not actually modify the database but
+** rather they control the timing of when other statements modify the 
+** database.  ^The [ATTACH] and [DETACH] statements also cause
+** sqlite3_stmt_readonly() to return true since, while those statements
+** change the configuration of a database connection, they do not make 
+** changes to the content of the database files on disk.
+*/
+SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Dynamically Typed Value Object
+** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
+**
+** SQLite uses the sqlite3_value object to represent all values
+** that can be stored in a database table. SQLite uses dynamic typing
+** for the values it stores.  ^Values stored in sqlite3_value objects
+** can be integers, floating point values, strings, BLOBs, or NULL.
+**
+** An sqlite3_value object may be either "protected" or "unprotected".
+** Some interfaces require a protected sqlite3_value.  Other interfaces
+** will accept either a protected or an unprotected sqlite3_value.
+** Every interface that accepts sqlite3_value arguments specifies
+** whether or not it requires a protected sqlite3_value.
+**
+** The terms "protected" and "unprotected" refer to whether or not
+** a mutex is held.  An internal mutex is held for a protected
+** sqlite3_value object but no mutex is held for an unprotected
+** sqlite3_value object.  If SQLite is compiled to be single-threaded
+** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0)
+** or if SQLite is run in one of reduced mutex modes 
+** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD]
+** then there is no distinction between protected and unprotected
+** sqlite3_value objects and they can be used interchangeably.  However,
+** for maximum code portability it is recommended that applications
+** still make the distinction between protected and unprotected
+** sqlite3_value objects even when not strictly required.
+**
+** ^The sqlite3_value objects that are passed as parameters into the
+** implementation of [application-defined SQL functions] are protected.
+** ^The sqlite3_value object returned by
+** [sqlite3_column_value()] is unprotected.
+** Unprotected sqlite3_value objects may only be used with
+** [sqlite3_result_value()] and [sqlite3_bind_value()].
+** The [sqlite3_value_blob | sqlite3_value_type()] family of
+** interfaces require protected sqlite3_value objects.
+*/
+typedef struct Mem sqlite3_value;
+
+/*
+** CAPI3REF: SQL Function Context Object
+**
+** The context in which an SQL function executes is stored in an
+** sqlite3_context object.  ^A pointer to an sqlite3_context object
+** is always first parameter to [application-defined SQL functions].
+** The application-defined SQL function implementation will pass this
+** pointer through into calls to [sqlite3_result_int | sqlite3_result()],
+** [sqlite3_aggregate_context()], [sqlite3_user_data()],
+** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()],
+** and/or [sqlite3_set_auxdata()].
+*/
+typedef struct sqlite3_context sqlite3_context;
+
+/*
+** CAPI3REF: Binding Values To Prepared Statements
+** KEYWORDS: {host parameter} {host parameters} {host parameter name}
+** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}
+**
+** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,
+** literals may be replaced by a [parameter] that matches one of following
+** templates:
+**
+** <ul>
+** <li>  ?
+** <li>  ?NNN
+** <li>  :VVV
+** <li>  @VVV
+** <li>  $VVV
+** </ul>
+**
+** In the templates above, NNN represents an integer literal,
+** and VVV represents an alphanumeric identifier.)^  ^The values of these
+** parameters (also called "host parameter names" or "SQL parameters")
+** can be set using the sqlite3_bind_*() routines defined here.
+**
+** ^The first argument to the sqlite3_bind_*() routines is always
+** a pointer to the [sqlite3_stmt] object returned from
+** [sqlite3_prepare_v2()] or its variants.
+**
+** ^The second argument is the index of the SQL parameter to be set.
+** ^The leftmost SQL parameter has an index of 1.  ^When the same named
+** SQL parameter is used more than once, second and subsequent
+** occurrences have the same index as the first occurrence.
+** ^The index for named parameters can be looked up using the
+** [sqlite3_bind_parameter_index()] API if desired.  ^The index
+** for "?NNN" parameters is the value of NNN.
+** ^The NNN value must be between 1 and the [sqlite3_limit()]
+** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999).
+**
+** ^The third argument is the value to bind to the parameter.
+**
+** ^(In those routines that have a fourth argument, its value is the
+** number of bytes in the parameter.  To be clear: the value is the
+** number of <u>bytes</u> in the value, not the number of characters.)^
+** ^If the fourth parameter is negative, the length of the string is
+** the number of bytes up to the first zero terminator.
+**
+** ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and
+** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or
+** string after SQLite has finished with it.  ^The destructor is called
+** to dispose of the BLOB or string even if the call to sqlite3_bind_blob(),
+** sqlite3_bind_text(), or sqlite3_bind_text16() fails.  
+** ^If the fifth argument is
+** the special value [SQLITE_STATIC], then SQLite assumes that the
+** information is in static, unmanaged space and does not need to be freed.
+** ^If the fifth argument has the value [SQLITE_TRANSIENT], then
+** SQLite makes its own private copy of the data immediately, before
+** the sqlite3_bind_*() routine returns.
+**
+** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that
+** is filled with zeroes.  ^A zeroblob uses a fixed amount of memory
+** (just an integer to hold its size) while it is being processed.
+** Zeroblobs are intended to serve as placeholders for BLOBs whose
+** content is later written using
+** [sqlite3_blob_open | incremental BLOB I/O] routines.
+** ^A negative value for the zeroblob results in a zero-length BLOB.
+**
+** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer
+** for the [prepared statement] or with a prepared statement for which
+** [sqlite3_step()] has been called more recently than [sqlite3_reset()],
+** then the call will return [SQLITE_MISUSE].  If any sqlite3_bind_()
+** routine is passed a [prepared statement] that has been finalized, the
+** result is undefined and probably harmful.
+**
+** ^Bindings are not cleared by the [sqlite3_reset()] routine.
+** ^Unbound parameters are interpreted as NULL.
+**
+** ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an
+** [error code] if anything goes wrong.
+** ^[SQLITE_RANGE] is returned if the parameter
+** index is out of range.  ^[SQLITE_NOMEM] is returned if malloc() fails.
+**
+** See also: [sqlite3_bind_parameter_count()],
+** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
+SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
+SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
+SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
+SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
+SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
+SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
+SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
+SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
+
+/*
+** CAPI3REF: Number Of SQL Parameters
+**
+** ^This routine can be used to find the number of [SQL parameters]
+** in a [prepared statement].  SQL parameters are tokens of the
+** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as
+** placeholders for values that are [sqlite3_bind_blob | bound]
+** to the parameters at a later time.
+**
+** ^(This routine actually returns the index of the largest (rightmost)
+** parameter. For all forms except ?NNN, this will correspond to the
+** number of unique parameters.  If parameters of the ?NNN form are used,
+** there may be gaps in the list.)^
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_name()], and
+** [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Name Of A Host Parameter
+**
+** ^The sqlite3_bind_parameter_name(P,N) interface returns
+** the name of the N-th [SQL parameter] in the [prepared statement] P.
+** ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA"
+** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA"
+** respectively.
+** In other words, the initial ":" or "$" or "@" or "?"
+** is included as part of the name.)^
+** ^Parameters of the form "?" without a following integer have no name
+** and are referred to as "nameless" or "anonymous parameters".
+**
+** ^The first host parameter has an index of 1, not 0.
+**
+** ^If the value N is out of range or if the N-th parameter is
+** nameless, then NULL is returned.  ^The returned string is
+** always in UTF-8 encoding even if the named parameter was
+** originally specified as UTF-16 in [sqlite3_prepare16()] or
+** [sqlite3_prepare16_v2()].
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_count()], and
+** [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
+
+/*
+** CAPI3REF: Index Of A Parameter With A Given Name
+**
+** ^Return the index of an SQL parameter given its name.  ^The
+** index value returned is suitable for use as the second
+** parameter to [sqlite3_bind_blob|sqlite3_bind()].  ^A zero
+** is returned if no matching parameter is found.  ^The parameter
+** name must be given in UTF-8 even if the original statement
+** was prepared from UTF-16 text using [sqlite3_prepare16_v2()].
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_count()], and
+** [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
+
+/*
+** CAPI3REF: Reset All Bindings On A Prepared Statement
+**
+** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
+** the [sqlite3_bind_blob | bindings] on a [prepared statement].
+** ^Use this routine to reset all host parameters to NULL.
+*/
+SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Number Of Columns In A Result Set
+**
+** ^Return the number of columns in the result set returned by the
+** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
+** statement that does not return data (for example an [UPDATE]).
+**
+** See also: [sqlite3_data_count()]
+*/
+SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Column Names In A Result Set
+**
+** ^These routines return the name assigned to a particular column
+** in the result set of a [SELECT] statement.  ^The sqlite3_column_name()
+** interface returns a pointer to a zero-terminated UTF-8 string
+** and sqlite3_column_name16() returns a pointer to a zero-terminated
+** UTF-16 string.  ^The first parameter is the [prepared statement]
+** that implements the [SELECT] statement. ^The second parameter is the
+** column number.  ^The leftmost column is number 0.
+**
+** ^The returned string pointer is valid until either the [prepared statement]
+** is destroyed by [sqlite3_finalize()] or until the statement is automatically
+** reprepared by the first call to [sqlite3_step()] for a particular run
+** or until the next call to
+** sqlite3_column_name() or sqlite3_column_name16() on the same column.
+**
+** ^If sqlite3_malloc() fails during the processing of either routine
+** (for example during a conversion from UTF-8 to UTF-16) then a
+** NULL pointer is returned.
+**
+** ^The name of a result column is the value of the "AS" clause for
+** that column, if there is an AS clause.  If there is no AS clause
+** then the name of the column is unspecified and may change from
+** one release of SQLite to the next.
+*/
+SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
+SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
+
+/*
+** CAPI3REF: Source Of Data In A Query Result
+**
+** ^These routines provide a means to determine the database, table, and
+** table column that is the origin of a particular result column in
+** [SELECT] statement.
+** ^The name of the database or table or column can be returned as
+** either a UTF-8 or UTF-16 string.  ^The _database_ routines return
+** the database name, the _table_ routines return the table name, and
+** the origin_ routines return the column name.
+** ^The returned string is valid until the [prepared statement] is destroyed
+** using [sqlite3_finalize()] or until the statement is automatically
+** reprepared by the first call to [sqlite3_step()] for a particular run
+** or until the same information is requested
+** again in a different encoding.
+**
+** ^The names returned are the original un-aliased names of the
+** database, table, and column.
+**
+** ^The first argument to these interfaces is a [prepared statement].
+** ^These functions return information about the Nth result column returned by
+** the statement, where N is the second function argument.
+** ^The left-most column is column 0 for these routines.
+**
+** ^If the Nth column returned by the statement is an expression or
+** subquery and is not a column value, then all of these functions return
+** NULL.  ^These routine might also return NULL if a memory allocation error
+** occurs.  ^Otherwise, they return the name of the attached database, table,
+** or column that query result column was extracted from.
+**
+** ^As with all other SQLite APIs, those whose names end with "16" return
+** UTF-16 encoded strings and the other functions return UTF-8.
+**
+** ^These APIs are only available if the library was compiled with the
+** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol.
+**
+** If two or more threads call one or more of these routines against the same
+** prepared statement and column at the same time then the results are
+** undefined.
+**
+** If two or more threads call one or more
+** [sqlite3_column_database_name | column metadata interfaces]
+** for the same [prepared statement] and result column
+** at the same time then the results are undefined.
+*/
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
+
+/*
+** CAPI3REF: Declared Datatype Of A Query Result
+**
+** ^(The first parameter is a [prepared statement].
+** If this statement is a [SELECT] statement and the Nth column of the
+** returned result set of that [SELECT] is a table column (not an
+** expression or subquery) then the declared type of the table
+** column is returned.)^  ^If the Nth column of the result set is an
+** expression or subquery, then a NULL pointer is returned.
+** ^The returned string is always UTF-8 encoded.
+**
+** ^(For example, given the database schema:
+**
+** CREATE TABLE t1(c1 VARIANT);
+**
+** and the following statement to be compiled:
+**
+** SELECT c1 + 1, c1 FROM t1;
+**
+** this routine would return the string "VARIANT" for the second result
+** column (i==1), and a NULL pointer for the first result column (i==0).)^
+**
+** ^SQLite uses dynamic run-time typing.  ^So just because a column
+** is declared to contain a particular type does not mean that the
+** data stored in that column is of the declared type.  SQLite is
+** strongly typed, but the typing is dynamic not static.  ^Type
+** is associated with individual values, not with the containers
+** used to hold those values.
+*/
+SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
+
+/*
+** CAPI3REF: Evaluate An SQL Statement
+**
+** After a [prepared statement] has been prepared using either
+** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy
+** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function
+** must be called one or more times to evaluate the statement.
+**
+** The details of the behavior of the sqlite3_step() interface depend
+** on whether the statement was prepared using the newer "v2" interface
+** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy
+** interface [sqlite3_prepare()] and [sqlite3_prepare16()].  The use of the
+** new "v2" interface is recommended for new applications but the legacy
+** interface will continue to be supported.
+**
+** ^In the legacy interface, the return value will be either [SQLITE_BUSY],
+** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].
+** ^With the "v2" interface, any of the other [result codes] or
+** [extended result codes] might be returned as well.
+**
+** ^[SQLITE_BUSY] means that the database engine was unable to acquire the
+** database locks it needs to do its job.  ^If the statement is a [COMMIT]
+** or occurs outside of an explicit transaction, then you can retry the
+** statement.  If the statement is not a [COMMIT] and occurs within a
+** explicit transaction then you should rollback the transaction before
+** continuing.
+**
+** ^[SQLITE_DONE] means that the statement has finished executing
+** successfully.  sqlite3_step() should not be called again on this virtual
+** machine without first calling [sqlite3_reset()] to reset the virtual
+** machine back to its initial state.
+**
+** ^If the SQL statement being executed returns any data, then [SQLITE_ROW]
+** is returned each time a new row of data is ready for processing by the
+** caller. The values may be accessed using the [column access functions].
+** sqlite3_step() is called again to retrieve the next row of data.
+**
+** ^[SQLITE_ERROR] means that a run-time error (such as a constraint
+** violation) has occurred.  sqlite3_step() should not be called again on
+** the VM. More information may be found by calling [sqlite3_errmsg()].
+** ^With the legacy interface, a more specific error code (for example,
+** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)
+** can be obtained by calling [sqlite3_reset()] on the
+** [prepared statement].  ^In the "v2" interface,
+** the more specific error code is returned directly by sqlite3_step().
+**
+** [SQLITE_MISUSE] means that the this routine was called inappropriately.
+** Perhaps it was called on a [prepared statement] that has
+** already been [sqlite3_finalize | finalized] or on one that had
+** previously returned [SQLITE_ERROR] or [SQLITE_DONE].  Or it could
+** be the case that the same database connection is being used by two or
+** more threads at the same moment in time.
+**
+** For all versions of SQLite up to and including 3.6.23.1, a call to
+** [sqlite3_reset()] was required after sqlite3_step() returned anything
+** other than [SQLITE_ROW] before any subsequent invocation of
+** sqlite3_step().  Failure to reset the prepared statement using 
+** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from
+** sqlite3_step().  But after version 3.6.23.1, sqlite3_step() began
+** calling [sqlite3_reset()] automatically in this circumstance rather
+** than returning [SQLITE_MISUSE].  This is not considered a compatibility
+** break because any application that ever receives an SQLITE_MISUSE error
+** is broken by definition.  The [SQLITE_OMIT_AUTORESET] compile-time option
+** can be used to restore the legacy behavior.
+**
+** <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step()
+** API always returns a generic error code, [SQLITE_ERROR], following any
+** error other than [SQLITE_BUSY] and [SQLITE_MISUSE].  You must call
+** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the
+** specific [error codes] that better describes the error.
+** We admit that this is a goofy design.  The problem has been fixed
+** with the "v2" interface.  If you prepare all of your SQL statements
+** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
+** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
+** then the more specific [error codes] are returned directly
+** by sqlite3_step().  The use of the "v2" interface is recommended.
+*/
+SQLITE_API int sqlite3_step(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Number of columns in a result set
+**
+** ^The sqlite3_data_count(P) interface returns the number of columns in the
+** current row of the result set of [prepared statement] P.
+** ^If prepared statement P does not have results ready to return
+** (via calls to the [sqlite3_column_int | sqlite3_column_*()] of
+** interfaces) then sqlite3_data_count(P) returns 0.
+** ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer.
+**
+** See also: [sqlite3_column_count()]
+*/
+SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Fundamental Datatypes
+** KEYWORDS: SQLITE_TEXT
+**
+** ^(Every value in SQLite has one of five fundamental datatypes:
+**
+** <ul>
+** <li> 64-bit signed integer
+** <li> 64-bit IEEE floating point number
+** <li> string
+** <li> BLOB
+** <li> NULL
+** </ul>)^
+**
+** These constants are codes for each of those types.
+**
+** Note that the SQLITE_TEXT constant was also used in SQLite version 2
+** for a completely different meaning.  Software that links against both
+** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not
+** SQLITE_TEXT.
+*/
+#define SQLITE_INTEGER  1
+#define SQLITE_FLOAT    2
+#define SQLITE_BLOB     4
+#define SQLITE_NULL     5
+#ifdef SQLITE_TEXT
+# undef SQLITE_TEXT
+#else
+# define SQLITE_TEXT     3
+#endif
+#define SQLITE3_TEXT     3
+
+/*
+** CAPI3REF: Result Values From A Query
+** KEYWORDS: {column access functions}
+**
+** These routines form the "result set" interface.
+**
+** ^These routines return information about a single column of the current
+** result row of a query.  ^In every case the first argument is a pointer
+** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]
+** that was returned from [sqlite3_prepare_v2()] or one of its variants)
+** and the second argument is the index of the column for which information
+** should be returned. ^The leftmost column of the result set has the index 0.
+** ^The number of columns in the result can be determined using
+** [sqlite3_column_count()].
+**
+** If the SQL statement does not currently point to a valid row, or if the
+** column index is out of range, the result is undefined.
+** These routines may only be called when the most recent call to
+** [sqlite3_step()] has returned [SQLITE_ROW] and neither
+** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently.
+** If any of these routines are called after [sqlite3_reset()] or
+** [sqlite3_finalize()] or after [sqlite3_step()] has returned
+** something other than [SQLITE_ROW], the results are undefined.
+** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()]
+** are called from a different thread while any of these routines
+** are pending, then the results are undefined.
+**
+** ^The sqlite3_column_type() routine returns the
+** [SQLITE_INTEGER | datatype code] for the initial data type
+** of the result column.  ^The returned value is one of [SQLITE_INTEGER],
+** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].  The value
+** returned by sqlite3_column_type() is only meaningful if no type
+** conversions have occurred as described below.  After a type conversion,
+** the value returned by sqlite3_column_type() is undefined.  Future
+** versions of SQLite may change the behavior of sqlite3_column_type()
+** following a type conversion.
+**
+** ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()
+** routine returns the number of bytes in that BLOB or string.
+** ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts
+** the string to UTF-8 and then returns the number of bytes.
+** ^If the result is a numeric value then sqlite3_column_bytes() uses
+** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns
+** the number of bytes in that string.
+** ^If the result is NULL, then sqlite3_column_bytes() returns zero.
+**
+** ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16()
+** routine returns the number of bytes in that BLOB or string.
+** ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts
+** the string to UTF-16 and then returns the number of bytes.
+** ^If the result is a numeric value then sqlite3_column_bytes16() uses
+** [sqlite3_snprintf()] to convert that value to a UTF-16 string and returns
+** the number of bytes in that string.
+** ^If the result is NULL, then sqlite3_column_bytes16() returns zero.
+**
+** ^The values returned by [sqlite3_column_bytes()] and 
+** [sqlite3_column_bytes16()] do not include the zero terminators at the end
+** of the string.  ^For clarity: the values returned by
+** [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of
+** bytes in the string, not the number of characters.
+**
+** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(),
+** even empty strings, are always zero terminated.  ^The return
+** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer.
+**
+** ^The object returned by [sqlite3_column_value()] is an
+** [unprotected sqlite3_value] object.  An unprotected sqlite3_value object
+** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()].
+** If the [unprotected sqlite3_value] object returned by
+** [sqlite3_column_value()] is used in any other way, including calls
+** to routines like [sqlite3_value_int()], [sqlite3_value_text()],
+** or [sqlite3_value_bytes()], then the behavior is undefined.
+**
+** These routines attempt to convert the value where appropriate.  ^For
+** example, if the internal representation is FLOAT and a text result
+** is requested, [sqlite3_snprintf()] is used internally to perform the
+** conversion automatically.  ^(The following table details the conversions
+** that are applied:
+**
+** <blockquote>
+** <table border="1">
+** <tr><th> Internal<br>Type <th> Requested<br>Type <th>  Conversion
+**
+** <tr><td>  NULL    <td> INTEGER   <td> Result is 0
+** <tr><td>  NULL    <td>  FLOAT    <td> Result is 0.0
+** <tr><td>  NULL    <td>   TEXT    <td> Result is NULL pointer
+** <tr><td>  NULL    <td>   BLOB    <td> Result is NULL pointer
+** <tr><td> INTEGER  <td>  FLOAT    <td> Convert from integer to float
+** <tr><td> INTEGER  <td>   TEXT    <td> ASCII rendering of the integer
+** <tr><td> INTEGER  <td>   BLOB    <td> Same as INTEGER->TEXT
+** <tr><td>  FLOAT   <td> INTEGER   <td> Convert from float to integer
+** <tr><td>  FLOAT   <td>   TEXT    <td> ASCII rendering of the float
+** <tr><td>  FLOAT   <td>   BLOB    <td> Same as FLOAT->TEXT
+** <tr><td>  TEXT    <td> INTEGER   <td> Use atoi()
+** <tr><td>  TEXT    <td>  FLOAT    <td> Use atof()
+** <tr><td>  TEXT    <td>   BLOB    <td> No change
+** <tr><td>  BLOB    <td> INTEGER   <td> Convert to TEXT then use atoi()
+** <tr><td>  BLOB    <td>  FLOAT    <td> Convert to TEXT then use atof()
+** <tr><td>  BLOB    <td>   TEXT    <td> Add a zero terminator if needed
+** </table>
+** </blockquote>)^
+**
+** The table above makes reference to standard C library functions atoi()
+** and atof().  SQLite does not really use these functions.  It has its
+** own equivalent internal routines.  The atoi() and atof() names are
+** used in the table for brevity and because they are familiar to most
+** C programmers.
+**
+** Note that when type conversions occur, pointers returned by prior
+** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or
+** sqlite3_column_text16() may be invalidated.
+** Type conversions and pointer invalidations might occur
+** in the following cases:
+**
+** <ul>
+** <li> The initial content is a BLOB and sqlite3_column_text() or
+**      sqlite3_column_text16() is called.  A zero-terminator might
+**      need to be added to the string.</li>
+** <li> The initial content is UTF-8 text and sqlite3_column_bytes16() or
+**      sqlite3_column_text16() is called.  The content must be converted
+**      to UTF-16.</li>
+** <li> The initial content is UTF-16 text and sqlite3_column_bytes() or
+**      sqlite3_column_text() is called.  The content must be converted
+**      to UTF-8.</li>
+** </ul>
+**
+** ^Conversions between UTF-16be and UTF-16le are always done in place and do
+** not invalidate a prior pointer, though of course the content of the buffer
+** that the prior pointer references will have been modified.  Other kinds
+** of conversion are done in place when it is possible, but sometimes they
+** are not possible and in those cases prior pointers are invalidated.
+**
+** The safest and easiest to remember policy is to invoke these routines
+** in one of the following ways:
+**
+** <ul>
+**  <li>sqlite3_column_text() followed by sqlite3_column_bytes()</li>
+**  <li>sqlite3_column_blob() followed by sqlite3_column_bytes()</li>
+**  <li>sqlite3_column_text16() followed by sqlite3_column_bytes16()</li>
+** </ul>
+**
+** In other words, you should call sqlite3_column_text(),
+** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result
+** into the desired format, then invoke sqlite3_column_bytes() or
+** sqlite3_column_bytes16() to find the size of the result.  Do not mix calls
+** to sqlite3_column_text() or sqlite3_column_blob() with calls to
+** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16()
+** with calls to sqlite3_column_bytes().
+**
+** ^The pointers returned are valid until a type conversion occurs as
+** described above, or until [sqlite3_step()] or [sqlite3_reset()] or
+** [sqlite3_finalize()] is called.  ^The memory space used to hold strings
+** and BLOBs is freed automatically.  Do <b>not</b> pass the pointers returned
+** [sqlite3_column_blob()], [sqlite3_column_text()], etc. into
+** [sqlite3_free()].
+**
+** ^(If a memory allocation error occurs during the evaluation of any
+** of these routines, a default value is returned.  The default value
+** is either the integer 0, the floating point number 0.0, or a NULL
+** pointer.  Subsequent calls to [sqlite3_errcode()] will return
+** [SQLITE_NOMEM].)^
+*/
+SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
+SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
+SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
+SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
+SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
+SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
+
+/*
+** CAPI3REF: Destroy A Prepared Statement Object
+**
+** ^The sqlite3_finalize() function is called to delete a [prepared statement].
+** ^If the most recent evaluation of the statement encountered no errors or
+** or if the statement is never been evaluated, then sqlite3_finalize() returns
+** SQLITE_OK.  ^If the most recent evaluation of statement S failed, then
+** sqlite3_finalize(S) returns the appropriate [error code] or
+** [extended error code].
+**
+** ^The sqlite3_finalize(S) routine can be called at any point during
+** the life cycle of [prepared statement] S:
+** before statement S is ever evaluated, after
+** one or more calls to [sqlite3_reset()], or after any call
+** to [sqlite3_step()] regardless of whether or not the statement has
+** completed execution.
+**
+** ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op.
+**
+** The application must finalize every [prepared statement] in order to avoid
+** resource leaks.  It is a grievous error for the application to try to use
+** a prepared statement after it has been finalized.  Any use of a prepared
+** statement after it has been finalized can result in undefined and
+** undesirable behavior such as segfaults and heap corruption.
+*/
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Reset A Prepared Statement Object
+**
+** The sqlite3_reset() function is called to reset a [prepared statement]
+** object back to its initial state, ready to be re-executed.
+** ^Any SQL statement variables that had values bound to them using
+** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values.
+** Use [sqlite3_clear_bindings()] to reset the bindings.
+**
+** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S
+** back to the beginning of its program.
+**
+** ^If the most recent call to [sqlite3_step(S)] for the
+** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE],
+** or if [sqlite3_step(S)] has never before been called on S,
+** then [sqlite3_reset(S)] returns [SQLITE_OK].
+**
+** ^If the most recent call to [sqlite3_step(S)] for the
+** [prepared statement] S indicated an error, then
+** [sqlite3_reset(S)] returns an appropriate [error code].
+**
+** ^The [sqlite3_reset(S)] interface does not change the values
+** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
+*/
+SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Create Or Redefine SQL Functions
+** KEYWORDS: {function creation routines}
+** KEYWORDS: {application-defined SQL function}
+** KEYWORDS: {application-defined SQL functions}
+**
+** ^These functions (collectively known as "function creation routines")
+** are used to add SQL functions or aggregates or to redefine the behavior
+** of existing SQL functions or aggregates.  The only differences between
+** these routines are the text encoding expected for
+** the second parameter (the name of the function being created)
+** and the presence or absence of a destructor callback for
+** the application data pointer.
+**
+** ^The first parameter is the [database connection] to which the SQL
+** function is to be added.  ^If an application uses more than one database
+** connection then application-defined SQL functions must be added
+** to each database connection separately.
+**
+** ^The second parameter is the name of the SQL function to be created or
+** redefined.  ^The length of the name is limited to 255 bytes in a UTF-8
+** representation, exclusive of the zero-terminator.  ^Note that the name
+** length limit is in UTF-8 bytes, not characters nor UTF-16 bytes.  
+** ^Any attempt to create a function with a longer name
+** will result in [SQLITE_MISUSE] being returned.
+**
+** ^The third parameter (nArg)
+** is the number of arguments that the SQL function or
+** aggregate takes. ^If this parameter is -1, then the SQL function or
+** aggregate may take any number of arguments between 0 and the limit
+** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]).  If the third
+** parameter is less than -1 or greater than 127 then the behavior is
+** undefined.
+**
+** ^The fourth parameter, eTextRep, specifies what
+** [SQLITE_UTF8 | text encoding] this SQL function prefers for
+** its parameters.  Every SQL function implementation must be able to work
+** with UTF-8, UTF-16le, or UTF-16be.  But some implementations may be
+** more efficient with one encoding than another.  ^An application may
+** invoke sqlite3_create_function() or sqlite3_create_function16() multiple
+** times with the same function but with different values of eTextRep.
+** ^When multiple implementations of the same function are available, SQLite
+** will pick the one that involves the least amount of data conversion.
+** If there is only a single implementation which does not care what text
+** encoding is used, then the fourth argument should be [SQLITE_ANY].
+**
+** ^(The fifth parameter is an arbitrary pointer.  The implementation of the
+** function can gain access to this pointer using [sqlite3_user_data()].)^
+**
+** ^The sixth, seventh and eighth parameters, xFunc, xStep and xFinal, are
+** pointers to C-language functions that implement the SQL function or
+** aggregate. ^A scalar SQL function requires an implementation of the xFunc
+** callback only; NULL pointers must be passed as the xStep and xFinal
+** parameters. ^An aggregate SQL function requires an implementation of xStep
+** and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing
+** SQL function or aggregate, pass NULL pointers for all three function
+** callbacks.
+**
+** ^(If the ninth parameter to sqlite3_create_function_v2() is not NULL,
+** then it is destructor for the application data pointer. 
+** The destructor is invoked when the function is deleted, either by being
+** overloaded or when the database connection closes.)^
+** ^The destructor is also invoked if the call to
+** sqlite3_create_function_v2() fails.
+** ^When the destructor callback of the tenth parameter is invoked, it
+** is passed a single argument which is a copy of the application data 
+** pointer which was the fifth parameter to sqlite3_create_function_v2().
+**
+** ^It is permitted to register multiple implementations of the same
+** functions with the same name but with either differing numbers of
+** arguments or differing preferred text encodings.  ^SQLite will use
+** the implementation that most closely matches the way in which the
+** SQL function is used.  ^A function implementation with a non-negative
+** nArg parameter is a better match than a function implementation with
+** a negative nArg.  ^A function where the preferred text encoding
+** matches the database encoding is a better
+** match than a function where the encoding is different.  
+** ^A function where the encoding difference is between UTF16le and UTF16be
+** is a closer match than a function where the encoding difference is
+** between UTF8 and UTF16.
+**
+** ^Built-in functions may be overloaded by new application-defined functions.
+**
+** ^An application-defined function is permitted to call other
+** SQLite interfaces.  However, such calls must not
+** close the database connection nor finalize or reset the prepared
+** statement in which the function is running.
+*/
+SQLITE_API int sqlite3_create_function(
+  sqlite3 *db,
+  const char *zFunctionName,
+  int nArg,
+  int eTextRep,
+  void *pApp,
+  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
+  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
+  void (*xFinal)(sqlite3_context*)
+);
+SQLITE_API int sqlite3_create_function16(
+  sqlite3 *db,
+  const void *zFunctionName,
+  int nArg,
+  int eTextRep,
+  void *pApp,
+  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
+  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
+  void (*xFinal)(sqlite3_context*)
+);
+SQLITE_API int sqlite3_create_function_v2(
+  sqlite3 *db,
+  const char *zFunctionName,
+  int nArg,
+  int eTextRep,
+  void *pApp,
+  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
+  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
+  void (*xFinal)(sqlite3_context*),
+  void(*xDestroy)(void*)
+);
+
+/*
+** CAPI3REF: Text Encodings
+**
+** These constant define integer codes that represent the various
+** text encodings supported by SQLite.
+*/
+#define SQLITE_UTF8           1
+#define SQLITE_UTF16LE        2
+#define SQLITE_UTF16BE        3
+#define SQLITE_UTF16          4    /* Use native byte order */
+#define SQLITE_ANY            5    /* sqlite3_create_function only */
+#define SQLITE_UTF16_ALIGNED  8    /* sqlite3_create_collation only */
+
+/*
+** CAPI3REF: Deprecated Functions
+** DEPRECATED
+**
+** These functions are [deprecated].  In order to maintain
+** backwards compatibility with older code, these functions continue 
+** to be supported.  However, new applications should avoid
+** the use of these functions.  To help encourage people to avoid
+** using these functions, we are not going to tell you what they do.
+*/
+#ifndef SQLITE_OMIT_DEPRECATED
+SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
+SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64);
+#endif
+
+/*
+** CAPI3REF: Obtaining SQL Function Parameter Values
+**
+** The C-language implementation of SQL functions and aggregates uses
+** this set of interface routines to access the parameter values on
+** the function or aggregate.
+**
+** The xFunc (for scalar functions) or xStep (for aggregates) parameters
+** to [sqlite3_create_function()] and [sqlite3_create_function16()]
+** define callbacks that implement the SQL functions and aggregates.
+** The 3rd parameter to these callbacks is an array of pointers to
+** [protected sqlite3_value] objects.  There is one [sqlite3_value] object for
+** each parameter to the SQL function.  These routines are used to
+** extract values from the [sqlite3_value] objects.
+**
+** These routines work only with [protected sqlite3_value] objects.
+** Any attempt to use these routines on an [unprotected sqlite3_value]
+** object results in undefined behavior.
+**
+** ^These routines work just like the corresponding [column access functions]
+** except that  these routines take a single [protected sqlite3_value] object
+** pointer instead of a [sqlite3_stmt*] pointer and an integer column number.
+**
+** ^The sqlite3_value_text16() interface extracts a UTF-16 string
+** in the native byte-order of the host machine.  ^The
+** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces
+** extract UTF-16 strings as big-endian and little-endian respectively.
+**
+** ^(The sqlite3_value_numeric_type() interface attempts to apply
+** numeric affinity to the value.  This means that an attempt is
+** made to convert the value to an integer or floating point.  If
+** such a conversion is possible without loss of information (in other
+** words, if the value is a string that looks like a number)
+** then the conversion is performed.  Otherwise no conversion occurs.
+** The [SQLITE_INTEGER | datatype] after conversion is returned.)^
+**
+** Please pay particular attention to the fact that the pointer returned
+** from [sqlite3_value_blob()], [sqlite3_value_text()], or
+** [sqlite3_value_text16()] can be invalidated by a subsequent call to
+** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()],
+** or [sqlite3_value_text16()].
+**
+** These routines must be called from the same thread as
+** the SQL function that supplied the [sqlite3_value*] parameters.
+*/
+SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
+SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
+SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
+SQLITE_API double sqlite3_value_double(sqlite3_value*);
+SQLITE_API int sqlite3_value_int(sqlite3_value*);
+SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
+SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
+SQLITE_API int sqlite3_value_type(sqlite3_value*);
+SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
+
+/*
+** CAPI3REF: Obtain Aggregate Function Context
+**
+** Implementations of aggregate SQL functions use this
+** routine to allocate memory for storing their state.
+**
+** ^The first time the sqlite3_aggregate_context(C,N) routine is called 
+** for a particular aggregate function, SQLite
+** allocates N of memory, zeroes out that memory, and returns a pointer
+** to the new memory. ^On second and subsequent calls to
+** sqlite3_aggregate_context() for the same aggregate function instance,
+** the same buffer is returned.  Sqlite3_aggregate_context() is normally
+** called once for each invocation of the xStep callback and then one
+** last time when the xFinal callback is invoked.  ^(When no rows match
+** an aggregate query, the xStep() callback of the aggregate function
+** implementation is never called and xFinal() is called exactly once.
+** In those cases, sqlite3_aggregate_context() might be called for the
+** first time from within xFinal().)^
+**
+** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer if N is
+** less than or equal to zero or if a memory allocate error occurs.
+**
+** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
+** determined by the N parameter on first successful call.  Changing the
+** value of N in subsequent call to sqlite3_aggregate_context() within
+** the same aggregate function instance will not resize the memory
+** allocation.)^
+**
+** ^SQLite automatically frees the memory allocated by 
+** sqlite3_aggregate_context() when the aggregate query concludes.
+**
+** The first parameter must be a copy of the
+** [sqlite3_context | SQL function context] that is the first parameter
+** to the xStep or xFinal callback routine that implements the aggregate
+** function.
+**
+** This routine must be called from the same thread in which
+** the aggregate SQL function is running.
+*/
+SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
+
+/*
+** CAPI3REF: User Data For Functions
+**
+** ^The sqlite3_user_data() interface returns a copy of
+** the pointer that was the pUserData parameter (the 5th parameter)
+** of the [sqlite3_create_function()]
+** and [sqlite3_create_function16()] routines that originally
+** registered the application defined function.
+**
+** This routine must be called from the same thread in which
+** the application-defined function is running.
+*/
+SQLITE_API void *sqlite3_user_data(sqlite3_context*);
+
+/*
+** CAPI3REF: Database Connection For Functions
+**
+** ^The sqlite3_context_db_handle() interface returns a copy of
+** the pointer to the [database connection] (the 1st parameter)
+** of the [sqlite3_create_function()]
+** and [sqlite3_create_function16()] routines that originally
+** registered the application defined function.
+*/
+SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
+
+/*
+** CAPI3REF: Function Auxiliary Data
+**
+** The following two functions may be used by scalar SQL functions to
+** associate metadata with argument values. If the same value is passed to
+** multiple invocations of the same SQL function during query execution, under
+** some circumstances the associated metadata may be preserved. This may
+** be used, for example, to add a regular-expression matching scalar
+** function. The compiled version of the regular expression is stored as
+** metadata associated with the SQL value passed as the regular expression
+** pattern.  The compiled regular expression can be reused on multiple
+** invocations of the same function so that the original pattern string
+** does not need to be recompiled on each invocation.
+**
+** ^The sqlite3_get_auxdata() interface returns a pointer to the metadata
+** associated by the sqlite3_set_auxdata() function with the Nth argument
+** value to the application-defined function. ^If no metadata has been ever
+** been set for the Nth argument of the function, or if the corresponding
+** function parameter has changed since the meta-data was set,
+** then sqlite3_get_auxdata() returns a NULL pointer.
+**
+** ^The sqlite3_set_auxdata() interface saves the metadata
+** pointed to by its 3rd parameter as the metadata for the N-th
+** argument of the application-defined function.  Subsequent
+** calls to sqlite3_get_auxdata() might return this data, if it has
+** not been destroyed.
+** ^If it is not NULL, SQLite will invoke the destructor
+** function given by the 4th parameter to sqlite3_set_auxdata() on
+** the metadata when the corresponding function parameter changes
+** or when the SQL statement completes, whichever comes first.
+**
+** SQLite is free to call the destructor and drop metadata on any
+** parameter of any function at any time.  ^The only guarantee is that
+** the destructor will be called before the metadata is dropped.
+**
+** ^(In practice, metadata is preserved between function calls for
+** expressions that are constant at compile time. This includes literal
+** values and [parameters].)^
+**
+** These routines must be called from the same thread in which
+** the SQL function is running.
+*/
+SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
+SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
+
+
+/*
+** CAPI3REF: Constants Defining Special Destructor Behavior
+**
+** These are special values for the destructor that is passed in as the
+** final argument to routines like [sqlite3_result_blob()].  ^If the destructor
+** argument is SQLITE_STATIC, it means that the content pointer is constant
+** and will never change.  It does not need to be destroyed.  ^The
+** SQLITE_TRANSIENT value means that the content will likely change in
+** the near future and that SQLite should make its own private copy of
+** the content before returning.
+**
+** The typedef is necessary to work around problems in certain
+** C++ compilers.  See ticket #2191.
+*/
+typedef void (*sqlite3_destructor_type)(void*);
+#define SQLITE_STATIC      ((sqlite3_destructor_type)0)
+#define SQLITE_TRANSIENT   ((sqlite3_destructor_type)-1)
+
+/*
+** CAPI3REF: Setting The Result Of An SQL Function
+**
+** These routines are used by the xFunc or xFinal callbacks that
+** implement SQL functions and aggregates.  See
+** [sqlite3_create_function()] and [sqlite3_create_function16()]
+** for additional information.
+**
+** These functions work very much like the [parameter binding] family of
+** functions used to bind values to host parameters in prepared statements.
+** Refer to the [SQL parameter] documentation for additional information.
+**
+** ^The sqlite3_result_blob() interface sets the result from
+** an application-defined function to be the BLOB whose content is pointed
+** to by the second parameter and which is N bytes long where N is the
+** third parameter.
+**
+** ^The sqlite3_result_zeroblob() interfaces set the result of
+** the application-defined function to be a BLOB containing all zero
+** bytes and N bytes in size, where N is the value of the 2nd parameter.
+**
+** ^The sqlite3_result_double() interface sets the result from
+** an application-defined function to be a floating point value specified
+** by its 2nd argument.
+**
+** ^The sqlite3_result_error() and sqlite3_result_error16() functions
+** cause the implemented SQL function to throw an exception.
+** ^SQLite uses the string pointed to by the
+** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16()
+** as the text of an error message.  ^SQLite interprets the error
+** message string from sqlite3_result_error() as UTF-8. ^SQLite
+** interprets the string from sqlite3_result_error16() as UTF-16 in native
+** byte order.  ^If the third parameter to sqlite3_result_error()
+** or sqlite3_result_error16() is negative then SQLite takes as the error
+** message all text up through the first zero character.
+** ^If the third parameter to sqlite3_result_error() or
+** sqlite3_result_error16() is non-negative then SQLite takes that many
+** bytes (not characters) from the 2nd parameter as the error message.
+** ^The sqlite3_result_error() and sqlite3_result_error16()
+** routines make a private copy of the error message text before
+** they return.  Hence, the calling function can deallocate or
+** modify the text after they return without harm.
+** ^The sqlite3_result_error_code() function changes the error code
+** returned by SQLite as a result of an error in a function.  ^By default,
+** the error code is SQLITE_ERROR.  ^A subsequent call to sqlite3_result_error()
+** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.
+**
+** ^The sqlite3_result_toobig() interface causes SQLite to throw an error
+** indicating that a string or BLOB is too long to represent.
+**
+** ^The sqlite3_result_nomem() interface causes SQLite to throw an error
+** indicating that a memory allocation failed.
+**
+** ^The sqlite3_result_int() interface sets the return value
+** of the application-defined function to be the 32-bit signed integer
+** value given in the 2nd argument.
+** ^The sqlite3_result_int64() interface sets the return value
+** of the application-defined function to be the 64-bit signed integer
+** value given in the 2nd argument.
+**
+** ^The sqlite3_result_null() interface sets the return value
+** of the application-defined function to be NULL.
+**
+** ^The sqlite3_result_text(), sqlite3_result_text16(),
+** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces
+** set the return value of the application-defined function to be
+** a text string which is represented as UTF-8, UTF-16 native byte order,
+** UTF-16 little endian, or UTF-16 big endian, respectively.
+** ^SQLite takes the text result from the application from
+** the 2nd parameter of the sqlite3_result_text* interfaces.
+** ^If the 3rd parameter to the sqlite3_result_text* interfaces
+** is negative, then SQLite takes result text from the 2nd parameter
+** through the first zero character.
+** ^If the 3rd parameter to the sqlite3_result_text* interfaces
+** is non-negative, then as many bytes (not characters) of the text
+** pointed to by the 2nd parameter are taken as the application-defined
+** function result.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces
+** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that
+** function as the destructor on the text or BLOB result when it has
+** finished using that result.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces or to
+** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite
+** assumes that the text or BLOB result is in constant space and does not
+** copy the content of the parameter nor call a destructor on the content
+** when it has finished using that result.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces
+** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT
+** then SQLite makes a copy of the result into space obtained from
+** from [sqlite3_malloc()] before it returns.
+**
+** ^The sqlite3_result_value() interface sets the result of
+** the application-defined function to be a copy the
+** [unprotected sqlite3_value] object specified by the 2nd parameter.  ^The
+** sqlite3_result_value() interface makes a copy of the [sqlite3_value]
+** so that the [sqlite3_value] specified in the parameter may change or
+** be deallocated after sqlite3_result_value() returns without harm.
+** ^A [protected sqlite3_value] object may always be used where an
+** [unprotected sqlite3_value] object is required, so either
+** kind of [sqlite3_value] object can be used with this interface.
+**
+** If these routines are called from within the different thread
+** than the one containing the application-defined function that received
+** the [sqlite3_context] pointer, the results are undefined.
+*/
+SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
+SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
+SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
+SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
+SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
+SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
+SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
+SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
+SQLITE_API void sqlite3_result_null(sqlite3_context*);
+SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
+SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
+SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
+SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
+
+/*
+** CAPI3REF: Define New Collating Sequences
+**
+** ^These functions add, remove, or modify a [collation] associated
+** with the [database connection] specified as the first argument.
+**
+** ^The name of the collation is a UTF-8 string
+** for sqlite3_create_collation() and sqlite3_create_collation_v2()
+** and a UTF-16 string in native byte order for sqlite3_create_collation16().
+** ^Collation names that compare equal according to [sqlite3_strnicmp()] are
+** considered to be the same name.
+**
+** ^(The third argument (eTextRep) must be one of the constants:
+** <ul>
+** <li> [SQLITE_UTF8],
+** <li> [SQLITE_UTF16LE],
+** <li> [SQLITE_UTF16BE],
+** <li> [SQLITE_UTF16], or
+** <li> [SQLITE_UTF16_ALIGNED].
+** </ul>)^
+** ^The eTextRep argument determines the encoding of strings passed
+** to the collating function callback, xCallback.
+** ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep
+** force strings to be UTF16 with native byte order.
+** ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin
+** on an even byte address.
+**
+** ^The fourth argument, pArg, is an application data pointer that is passed
+** through as the first argument to the collating function callback.
+**
+** ^The fifth argument, xCallback, is a pointer to the collating function.
+** ^Multiple collating functions can be registered using the same name but
+** with different eTextRep parameters and SQLite will use whichever
+** function requires the least amount of data transformation.
+** ^If the xCallback argument is NULL then the collating function is
+** deleted.  ^When all collating functions having the same name are deleted,
+** that collation is no longer usable.
+**
+** ^The collating function callback is invoked with a copy of the pArg 
+** application data pointer and with two strings in the encoding specified
+** by the eTextRep argument.  The collating function must return an
+** integer that is negative, zero, or positive
+** if the first string is less than, equal to, or greater than the second,
+** respectively.  A collating function must always return the same answer
+** given the same inputs.  If two or more collating functions are registered
+** to the same collation name (using different eTextRep values) then all
+** must give an equivalent answer when invoked with equivalent strings.
+** The collating function must obey the following properties for all
+** strings A, B, and C:
+**
+** <ol>
+** <li> If A==B then B==A.
+** <li> If A==B and B==C then A==C.
+** <li> If A<B THEN B>A.
+** <li> If A<B and B<C then A<C.
+** </ol>
+**
+** If a collating function fails any of the above constraints and that
+** collating function is  registered and used, then the behavior of SQLite
+** is undefined.
+**
+** ^The sqlite3_create_collation_v2() works like sqlite3_create_collation()
+** with the addition that the xDestroy callback is invoked on pArg when
+** the collating function is deleted.
+** ^Collating functions are deleted when they are overridden by later
+** calls to the collation creation functions or when the
+** [database connection] is closed using [sqlite3_close()].
+**
+** ^The xDestroy callback is <u>not</u> called if the 
+** sqlite3_create_collation_v2() function fails.  Applications that invoke
+** sqlite3_create_collation_v2() with a non-NULL xDestroy argument should 
+** check the return code and dispose of the application data pointer
+** themselves rather than expecting SQLite to deal with it for them.
+** This is different from every other SQLite interface.  The inconsistency 
+** is unfortunate but cannot be changed without breaking backwards 
+** compatibility.
+**
+** See also:  [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
+*/
+SQLITE_API int sqlite3_create_collation(
+  sqlite3*, 
+  const char *zName, 
+  int eTextRep, 
+  void *pArg,
+  int(*xCompare)(void*,int,const void*,int,const void*)
+);
+SQLITE_API int sqlite3_create_collation_v2(
+  sqlite3*, 
+  const char *zName, 
+  int eTextRep, 
+  void *pArg,
+  int(*xCompare)(void*,int,const void*,int,const void*),
+  void(*xDestroy)(void*)
+);
+SQLITE_API int sqlite3_create_collation16(
+  sqlite3*, 
+  const void *zName,
+  int eTextRep, 
+  void *pArg,
+  int(*xCompare)(void*,int,const void*,int,const void*)
+);
+
+/*
+** CAPI3REF: Collation Needed Callbacks
+**
+** ^To avoid having to register all collation sequences before a database
+** can be used, a single callback function may be registered with the
+** [database connection] to be invoked whenever an undefined collation
+** sequence is required.
+**
+** ^If the function is registered using the sqlite3_collation_needed() API,
+** then it is passed the names of undefined collation sequences as strings
+** encoded in UTF-8. ^If sqlite3_collation_needed16() is used,
+** the names are passed as UTF-16 in machine native byte order.
+** ^A call to either function replaces the existing collation-needed callback.
+**
+** ^(When the callback is invoked, the first argument passed is a copy
+** of the second argument to sqlite3_collation_needed() or
+** sqlite3_collation_needed16().  The second argument is the database
+** connection.  The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE],
+** or [SQLITE_UTF16LE], indicating the most desirable form of the collation
+** sequence function required.  The fourth parameter is the name of the
+** required collation sequence.)^
+**
+** The callback function should register the desired collation using
+** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
+** [sqlite3_create_collation_v2()].
+*/
+SQLITE_API int sqlite3_collation_needed(
+  sqlite3*, 
+  void*, 
+  void(*)(void*,sqlite3*,int eTextRep,const char*)
+);
+SQLITE_API int sqlite3_collation_needed16(
+  sqlite3*, 
+  void*,
+  void(*)(void*,sqlite3*,int eTextRep,const void*)
+);
+
+#ifdef SQLITE_HAS_CODEC
+/*
+** Specify the key for an encrypted database.  This routine should be
+** called right after sqlite3_open().
+**
+** The code to implement this API is not available in the public release
+** of SQLite.
+*/
+SQLITE_API int sqlite3_key(
+  sqlite3 *db,                   /* Database to be rekeyed */
+  const void *pKey, int nKey     /* The key */
+);
+
+/*
+** Change the key on an open database.  If the current database is not
+** encrypted, this routine will encrypt it.  If pNew==0 or nNew==0, the
+** database is decrypted.
+**
+** The code to implement this API is not available in the public release
+** of SQLite.
+*/
+SQLITE_API int sqlite3_rekey(
+  sqlite3 *db,                   /* Database to be rekeyed */
+  const void *pKey, int nKey     /* The new key */
+);
+
+/*
+** Specify the activation key for a SEE database.  Unless 
+** activated, none of the SEE routines will work.
+*/
+SQLITE_API void sqlite3_activate_see(
+  const char *zPassPhrase        /* Activation phrase */
+);
+#endif
+
+#ifdef SQLITE_ENABLE_CEROD
+/*
+** Specify the activation key for a CEROD database.  Unless 
+** activated, none of the CEROD routines will work.
+*/
+SQLITE_API void sqlite3_activate_cerod(
+  const char *zPassPhrase        /* Activation phrase */
+);
+#endif
+
+/*
+** CAPI3REF: Suspend Execution For A Short Time
+**
+** The sqlite3_sleep() function causes the current thread to suspend execution
+** for at least a number of milliseconds specified in its parameter.
+**
+** If the operating system does not support sleep requests with
+** millisecond time resolution, then the time will be rounded up to
+** the nearest second. The number of milliseconds of sleep actually
+** requested from the operating system is returned.
+**
+** ^SQLite implements this interface by calling the xSleep()
+** method of the default [sqlite3_vfs] object.  If the xSleep() method
+** of the default VFS is not implemented correctly, or not implemented at
+** all, then the behavior of sqlite3_sleep() may deviate from the description
+** in the previous paragraphs.
+*/
+SQLITE_API int sqlite3_sleep(int);
+
+/*
+** CAPI3REF: Name Of The Folder Holding Temporary Files
+**
+** ^(If this global variable is made to point to a string which is
+** the name of a folder (a.k.a. directory), then all temporary files
+** created by SQLite when using a built-in [sqlite3_vfs | VFS]
+** will be placed in that directory.)^  ^If this variable
+** is a NULL pointer, then SQLite performs a search for an appropriate
+** temporary file directory.
+**
+** It is not safe to read or modify this variable in more than one
+** thread at a time.  It is not safe to read or modify this variable
+** if a [database connection] is being used at the same time in a separate
+** thread.
+** It is intended that this variable be set once
+** as part of process initialization and before any SQLite interface
+** routines have been called and that this variable remain unchanged
+** thereafter.
+**
+** ^The [temp_store_directory pragma] may modify this variable and cause
+** it to point to memory obtained from [sqlite3_malloc].  ^Furthermore,
+** the [temp_store_directory pragma] always assumes that any string
+** that this variable points to is held in memory obtained from 
+** [sqlite3_malloc] and the pragma may attempt to free that memory
+** using [sqlite3_free].
+** Hence, if this variable is modified directly, either it should be
+** made NULL or made to point to memory obtained from [sqlite3_malloc]
+** or else the use of the [temp_store_directory pragma] should be avoided.
+*/
+SQLITE_API char *sqlite3_temp_directory;
+
+/*
+** CAPI3REF: Test For Auto-Commit Mode
+** KEYWORDS: {autocommit mode}
+**
+** ^The sqlite3_get_autocommit() interface returns non-zero or
+** zero if the given database connection is or is not in autocommit mode,
+** respectively.  ^Autocommit mode is on by default.
+** ^Autocommit mode is disabled by a [BEGIN] statement.
+** ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].
+**
+** If certain kinds of errors occur on a statement within a multi-statement
+** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR],
+** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the
+** transaction might be rolled back automatically.  The only way to
+** find out whether SQLite automatically rolled back the transaction after
+** an error is to use this function.
+**
+** If another thread changes the autocommit status of the database
+** connection while this routine is running, then the return value
+** is undefined.
+*/
+SQLITE_API int sqlite3_get_autocommit(sqlite3*);
+
+/*
+** CAPI3REF: Find The Database Handle Of A Prepared Statement
+**
+** ^The sqlite3_db_handle interface returns the [database connection] handle
+** to which a [prepared statement] belongs.  ^The [database connection]
+** returned by sqlite3_db_handle is the same [database connection]
+** that was the first argument
+** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
+** create the statement in the first place.
+*/
+SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Find the next prepared statement
+**
+** ^This interface returns a pointer to the next [prepared statement] after
+** pStmt associated with the [database connection] pDb.  ^If pStmt is NULL
+** then this interface returns a pointer to the first prepared statement
+** associated with the database connection pDb.  ^If no prepared statement
+** satisfies the conditions of this routine, it returns NULL.
+**
+** The [database connection] pointer D in a call to
+** [sqlite3_next_stmt(D,S)] must refer to an open database
+** connection and in particular must not be a NULL pointer.
+*/
+SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Commit And Rollback Notification Callbacks
+**
+** ^The sqlite3_commit_hook() interface registers a callback
+** function to be invoked whenever a transaction is [COMMIT | committed].
+** ^Any callback set by a previous call to sqlite3_commit_hook()
+** for the same database connection is overridden.
+** ^The sqlite3_rollback_hook() interface registers a callback
+** function to be invoked whenever a transaction is [ROLLBACK | rolled back].
+** ^Any callback set by a previous call to sqlite3_rollback_hook()
+** for the same database connection is overridden.
+** ^The pArg argument is passed through to the callback.
+** ^If the callback on a commit hook function returns non-zero,
+** then the commit is converted into a rollback.
+**
+** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions
+** return the P argument from the previous call of the same function
+** on the same [database connection] D, or NULL for
+** the first call for each function on D.
+**
+** The callback implementation must not do anything that will modify
+** the database connection that invoked the callback.  Any actions
+** to modify the database connection must be deferred until after the
+** completion of the [sqlite3_step()] call that triggered the commit
+** or rollback hook in the first place.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** ^Registering a NULL function disables the callback.
+**
+** ^When the commit hook callback routine returns zero, the [COMMIT]
+** operation is allowed to continue normally.  ^If the commit hook
+** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].
+** ^The rollback hook is invoked on a rollback that results from a commit
+** hook returning non-zero, just as it would be with any other rollback.
+**
+** ^For the purposes of this API, a transaction is said to have been
+** rolled back if an explicit "ROLLBACK" statement is executed, or
+** an error or constraint causes an implicit rollback to occur.
+** ^The rollback callback is not invoked if a transaction is
+** automatically rolled back because the database connection is closed.
+**
+** See also the [sqlite3_update_hook()] interface.
+*/
+SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
+SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
+
+/*
+** CAPI3REF: Data Change Notification Callbacks
+**
+** ^The sqlite3_update_hook() interface registers a callback function
+** with the [database connection] identified by the first argument
+** to be invoked whenever a row is updated, inserted or deleted.
+** ^Any callback set by a previous call to this function
+** for the same database connection is overridden.
+**
+** ^The second argument is a pointer to the function to invoke when a
+** row is updated, inserted or deleted.
+** ^The first argument to the callback is a copy of the third argument
+** to sqlite3_update_hook().
+** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
+** or [SQLITE_UPDATE], depending on the operation that caused the callback
+** to be invoked.
+** ^The third and fourth arguments to the callback contain pointers to the
+** database and table name containing the affected row.
+** ^The final callback parameter is the [rowid] of the row.
+** ^In the case of an update, this is the [rowid] after the update takes place.
+**
+** ^(The update hook is not invoked when internal system tables are
+** modified (i.e. sqlite_master and sqlite_sequence).)^
+**
+** ^In the current implementation, the update hook
+** is not invoked when duplication rows are deleted because of an
+** [ON CONFLICT | ON CONFLICT REPLACE] clause.  ^Nor is the update hook
+** invoked when rows are deleted using the [truncate optimization].
+** The exceptions defined in this paragraph might change in a future
+** release of SQLite.
+**
+** The update hook implementation must not do anything that will modify
+** the database connection that invoked the update hook.  Any actions
+** to modify the database connection must be deferred until after the
+** completion of the [sqlite3_step()] call that triggered the update hook.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** ^The sqlite3_update_hook(D,C,P) function
+** returns the P argument from the previous call
+** on the same [database connection] D, or NULL for
+** the first call on D.
+**
+** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()]
+** interfaces.
+*/
+SQLITE_API void *sqlite3_update_hook(
+  sqlite3*, 
+  void(*)(void *,int ,char const *,char const *,sqlite3_int64),
+  void*
+);
+
+/*
+** CAPI3REF: Enable Or Disable Shared Pager Cache
+** KEYWORDS: {shared cache}
+**
+** ^(This routine enables or disables the sharing of the database cache
+** and schema data structures between [database connection | connections]
+** to the same database. Sharing is enabled if the argument is true
+** and disabled if the argument is false.)^
+**
+** ^Cache sharing is enabled and disabled for an entire process.
+** This is a change as of SQLite version 3.5.0. In prior versions of SQLite,
+** sharing was enabled or disabled for each thread separately.
+**
+** ^(The cache sharing mode set by this interface effects all subsequent
+** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()].
+** Existing database connections continue use the sharing mode
+** that was in effect at the time they were opened.)^
+**
+** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled
+** successfully.  An [error code] is returned otherwise.)^
+**
+** ^Shared cache is disabled by default. But this might change in
+** future releases of SQLite.  Applications that care about shared
+** cache setting should set it explicitly.
+**
+** See Also:  [SQLite Shared-Cache Mode]
+*/
+SQLITE_API int sqlite3_enable_shared_cache(int);
+
+/*
+** CAPI3REF: Attempt To Free Heap Memory
+**
+** ^The sqlite3_release_memory() interface attempts to free N bytes
+** of heap memory by deallocating non-essential memory allocations
+** held by the database library.   Memory used to cache database
+** pages to improve performance is an example of non-essential memory.
+** ^sqlite3_release_memory() returns the number of bytes actually freed,
+** which might be more or less than the amount requested.
+** ^The sqlite3_release_memory() routine is a no-op returning zero
+** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
+*/
+SQLITE_API int sqlite3_release_memory(int);
+
+/*
+** CAPI3REF: Impose A Limit On Heap Size
+**
+** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
+** soft limit on the amount of heap memory that may be allocated by SQLite.
+** ^SQLite strives to keep heap memory utilization below the soft heap
+** limit by reducing the number of pages held in the page cache
+** as heap memory usages approaches the limit.
+** ^The soft heap limit is "soft" because even though SQLite strives to stay
+** below the limit, it will exceed the limit rather than generate
+** an [SQLITE_NOMEM] error.  In other words, the soft heap limit 
+** is advisory only.
+**
+** ^The return value from sqlite3_soft_heap_limit64() is the size of
+** the soft heap limit prior to the call.  ^If the argument N is negative
+** then no change is made to the soft heap limit.  Hence, the current
+** size of the soft heap limit can be determined by invoking
+** sqlite3_soft_heap_limit64() with a negative argument.
+**
+** ^If the argument N is zero then the soft heap limit is disabled.
+**
+** ^(The soft heap limit is not enforced in the current implementation
+** if one or more of following conditions are true:
+**
+** <ul>
+** <li> The soft heap limit is set to zero.
+** <li> Memory accounting is disabled using a combination of the
+**      [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and
+**      the [SQLITE_DEFAULT_MEMSTATUS] compile-time option.
+** <li> An alternative page cache implementation is specified using
+**      [sqlite3_config]([SQLITE_CONFIG_PCACHE],...).
+** <li> The page cache allocates from its own memory pool supplied
+**      by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than
+**      from the heap.
+** </ul>)^
+**
+** Beginning with SQLite version 3.7.3, the soft heap limit is enforced
+** regardless of whether or not the [SQLITE_ENABLE_MEMORY_MANAGEMENT]
+** compile-time option is invoked.  With [SQLITE_ENABLE_MEMORY_MANAGEMENT],
+** the soft heap limit is enforced on every memory allocation.  Without
+** [SQLITE_ENABLE_MEMORY_MANAGEMENT], the soft heap limit is only enforced
+** when memory is allocated by the page cache.  Testing suggests that because
+** the page cache is the predominate memory user in SQLite, most
+** applications will achieve adequate soft heap limit enforcement without
+** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
+**
+** The circumstances under which SQLite will enforce the soft heap limit may
+** changes in future releases of SQLite.
+*/
+SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
+
+/*
+** CAPI3REF: Deprecated Soft Heap Limit Interface
+** DEPRECATED
+**
+** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
+** interface.  This routine is provided for historical compatibility
+** only.  All new applications should use the
+** [sqlite3_soft_heap_limit64()] interface rather than this one.
+*/
+SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
+
+
+/*
+** CAPI3REF: Extract Metadata About A Column Of A Table
+**
+** ^This routine returns metadata about a specific column of a specific
+** database table accessible using the [database connection] handle
+** passed as the first function argument.
+**
+** ^The column is identified by the second, third and fourth parameters to
+** this function. ^The second parameter is either the name of the database
+** (i.e. "main", "temp", or an attached database) containing the specified
+** table or NULL. ^If it is NULL, then all attached databases are searched
+** for the table using the same algorithm used by the database engine to
+** resolve unqualified table references.
+**
+** ^The third and fourth parameters to this function are the table and column
+** name of the desired column, respectively. Neither of these parameters
+** may be NULL.
+**
+** ^Metadata is returned by writing to the memory locations passed as the 5th
+** and subsequent parameters to this function. ^Any of these arguments may be
+** NULL, in which case the corresponding element of metadata is omitted.
+**
+** ^(<blockquote>
+** <table border="1">
+** <tr><th> Parameter <th> Output<br>Type <th>  Description
+**
+** <tr><td> 5th <td> const char* <td> Data type
+** <tr><td> 6th <td> const char* <td> Name of default collation sequence
+** <tr><td> 7th <td> int         <td> True if column has a NOT NULL constraint
+** <tr><td> 8th <td> int         <td> True if column is part of the PRIMARY KEY
+** <tr><td> 9th <td> int         <td> True if column is [AUTOINCREMENT]
+** </table>
+** </blockquote>)^
+**
+** ^The memory pointed to by the character pointers returned for the
+** declaration type and collation sequence is valid only until the next
+** call to any SQLite API function.
+**
+** ^If the specified table is actually a view, an [error code] is returned.
+**
+** ^If the specified column is "rowid", "oid" or "_rowid_" and an
+** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output
+** parameters are set for the explicitly declared column. ^(If there is no
+** explicitly declared [INTEGER PRIMARY KEY] column, then the output
+** parameters are set as follows:
+**
+** <pre>
+**     data type: "INTEGER"
+**     collation sequence: "BINARY"
+**     not null: 0
+**     primary key: 1
+**     auto increment: 0
+** </pre>)^
+**
+** ^(This function may load one or more schemas from database files. If an
+** error occurs during this process, or if the requested table or column
+** cannot be found, an [error code] is returned and an error message left
+** in the [database connection] (to be retrieved using sqlite3_errmsg()).)^
+**
+** ^This API is only available if the library was compiled with the
+** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.
+*/
+SQLITE_API int sqlite3_table_column_metadata(
+  sqlite3 *db,                /* Connection handle */
+  const char *zDbName,        /* Database name or NULL */
+  const char *zTableName,     /* Table name */
+  const char *zColumnName,    /* Column name */
+  char const **pzDataType,    /* OUTPUT: Declared data type */
+  char const **pzCollSeq,     /* OUTPUT: Collation sequence name */
+  int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */
+  int *pPrimaryKey,           /* OUTPUT: True if column part of PK */
+  int *pAutoinc               /* OUTPUT: True if column is auto-increment */
+);
+
+/*
+** CAPI3REF: Load An Extension
+**
+** ^This interface loads an SQLite extension library from the named file.
+**
+** ^The sqlite3_load_extension() interface attempts to load an
+** SQLite extension library contained in the file zFile.
+**
+** ^The entry point is zProc.
+** ^zProc may be 0, in which case the name of the entry point
+** defaults to "sqlite3_extension_init".
+** ^The sqlite3_load_extension() interface returns
+** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.
+** ^If an error occurs and pzErrMsg is not 0, then the
+** [sqlite3_load_extension()] interface shall attempt to
+** fill *pzErrMsg with error message text stored in memory
+** obtained from [sqlite3_malloc()]. The calling function
+** should free this memory by calling [sqlite3_free()].
+**
+** ^Extension loading must be enabled using
+** [sqlite3_enable_load_extension()] prior to calling this API,
+** otherwise an error will be returned.
+**
+** See also the [load_extension() SQL function].
+*/
+SQLITE_API int sqlite3_load_extension(
+  sqlite3 *db,          /* Load the extension into this database connection */
+  const char *zFile,    /* Name of the shared library containing extension */
+  const char *zProc,    /* Entry point.  Derived from zFile if 0 */
+  char **pzErrMsg       /* Put error message here if not 0 */
+);
+
+/*
+** CAPI3REF: Enable Or Disable Extension Loading
+**
+** ^So as not to open security holes in older applications that are
+** unprepared to deal with extension loading, and as a means of disabling
+** extension loading while evaluating user-entered SQL, the following API
+** is provided to turn the [sqlite3_load_extension()] mechanism on and off.
+**
+** ^Extension loading is off by default. See ticket #1863.
+** ^Call the sqlite3_enable_load_extension() routine with onoff==1
+** to turn extension loading on and call it with onoff==0 to turn
+** it back off again.
+*/
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
+
+/*
+** CAPI3REF: Automatically Load Statically Linked Extensions
+**
+** ^This interface causes the xEntryPoint() function to be invoked for
+** each new [database connection] that is created.  The idea here is that
+** xEntryPoint() is the entry point for a statically linked SQLite extension
+** that is to be automatically loaded into all new database connections.
+**
+** ^(Even though the function prototype shows that xEntryPoint() takes
+** no arguments and returns void, SQLite invokes xEntryPoint() with three
+** arguments and expects and integer result as if the signature of the
+** entry point where as follows:
+**
+** <blockquote><pre>
+**    int xEntryPoint(
+**      sqlite3 *db,
+**      const char **pzErrMsg,
+**      const struct sqlite3_api_routines *pThunk
+**    );
+** </pre></blockquote>)^
+**
+** If the xEntryPoint routine encounters an error, it should make *pzErrMsg
+** point to an appropriate error message (obtained from [sqlite3_mprintf()])
+** and return an appropriate [error code].  ^SQLite ensures that *pzErrMsg
+** is NULL before calling the xEntryPoint().  ^SQLite will invoke
+** [sqlite3_free()] on *pzErrMsg after xEntryPoint() returns.  ^If any
+** xEntryPoint() returns an error, the [sqlite3_open()], [sqlite3_open16()],
+** or [sqlite3_open_v2()] call that provoked the xEntryPoint() will fail.
+**
+** ^Calling sqlite3_auto_extension(X) with an entry point X that is already
+** on the list of automatic extensions is a harmless no-op. ^No entry point
+** will be called more than once for each database connection that is opened.
+**
+** See also: [sqlite3_reset_auto_extension()].
+*/
+SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void));
+
+/*
+** CAPI3REF: Reset Automatic Extension Loading
+**
+** ^This interface disables all automatic extensions previously
+** registered using [sqlite3_auto_extension()].
+*/
+SQLITE_API void sqlite3_reset_auto_extension(void);
+
+/*
+** The interface to the virtual-table mechanism is currently considered
+** to be experimental.  The interface might change in incompatible ways.
+** If this is a problem for you, do not use the interface at this time.
+**
+** When the virtual-table mechanism stabilizes, we will declare the
+** interface fixed, support it indefinitely, and remove this comment.
+*/
+
+/*
+** Structures used by the virtual table interface
+*/
+typedef struct sqlite3_vtab sqlite3_vtab;
+typedef struct sqlite3_index_info sqlite3_index_info;
+typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor;
+typedef struct sqlite3_module sqlite3_module;
+
+/*
+** CAPI3REF: Virtual Table Object
+** KEYWORDS: sqlite3_module {virtual table module}
+**
+** This structure, sometimes called a "virtual table module", 
+** defines the implementation of a [virtual tables].  
+** This structure consists mostly of methods for the module.
+**
+** ^A virtual table module is created by filling in a persistent
+** instance of this structure and passing a pointer to that instance
+** to [sqlite3_create_module()] or [sqlite3_create_module_v2()].
+** ^The registration remains valid until it is replaced by a different
+** module or until the [database connection] closes.  The content
+** of this structure must not change while it is registered with
+** any database connection.
+*/
+struct sqlite3_module {
+  int iVersion;
+  int (*xCreate)(sqlite3*, void *pAux,
+               int argc, const char *const*argv,
+               sqlite3_vtab **ppVTab, char**);
+  int (*xConnect)(sqlite3*, void *pAux,
+               int argc, const char *const*argv,
+               sqlite3_vtab **ppVTab, char**);
+  int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
+  int (*xDisconnect)(sqlite3_vtab *pVTab);
+  int (*xDestroy)(sqlite3_vtab *pVTab);
+  int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
+  int (*xClose)(sqlite3_vtab_cursor*);
+  int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,
+                int argc, sqlite3_value **argv);
+  int (*xNext)(sqlite3_vtab_cursor*);
+  int (*xEof)(sqlite3_vtab_cursor*);
+  int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
+  int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);
+  int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);
+  int (*xBegin)(sqlite3_vtab *pVTab);
+  int (*xSync)(sqlite3_vtab *pVTab);
+  int (*xCommit)(sqlite3_vtab *pVTab);
+  int (*xRollback)(sqlite3_vtab *pVTab);
+  int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
+                       void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),
+                       void **ppArg);
+  int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
+};
+
+/*
+** CAPI3REF: Virtual Table Indexing Information
+** KEYWORDS: sqlite3_index_info
+**
+** The sqlite3_index_info structure and its substructures is used as part
+** of the [virtual table] interface to
+** pass information into and receive the reply from the [xBestIndex]
+** method of a [virtual table module].  The fields under **Inputs** are the
+** inputs to xBestIndex and are read-only.  xBestIndex inserts its
+** results into the **Outputs** fields.
+**
+** ^(The aConstraint[] array records WHERE clause constraints of the form:
+**
+** <blockquote>column OP expr</blockquote>
+**
+** where OP is =, <, <=, >, or >=.)^  ^(The particular operator is
+** stored in aConstraint[].op using one of the
+** [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^
+** ^(The index of the column is stored in
+** aConstraint[].iColumn.)^  ^(aConstraint[].usable is TRUE if the
+** expr on the right-hand side can be evaluated (and thus the constraint
+** is usable) and false if it cannot.)^
+**
+** ^The optimizer automatically inverts terms of the form "expr OP column"
+** and makes other simplifications to the WHERE clause in an attempt to
+** get as many WHERE clause terms into the form shown above as possible.
+** ^The aConstraint[] array only reports WHERE clause terms that are
+** relevant to the particular virtual table being queried.
+**
+** ^Information about the ORDER BY clause is stored in aOrderBy[].
+** ^Each term of aOrderBy records a column of the ORDER BY clause.
+**
+** The [xBestIndex] method must fill aConstraintUsage[] with information
+** about what parameters to pass to xFilter.  ^If argvIndex>0 then
+** the right-hand side of the corresponding aConstraint[] is evaluated
+** and becomes the argvIndex-th entry in argv.  ^(If aConstraintUsage[].omit
+** is true, then the constraint is assumed to be fully handled by the
+** virtual table and is not checked again by SQLite.)^
+**
+** ^The idxNum and idxPtr values are recorded and passed into the
+** [xFilter] method.
+** ^[sqlite3_free()] is used to free idxPtr if and only if
+** needToFreeIdxPtr is true.
+**
+** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in
+** the correct order to satisfy the ORDER BY clause so that no separate
+** sorting step is required.
+**
+** ^The estimatedCost value is an estimate of the cost of doing the
+** particular lookup.  A full scan of a table with N entries should have
+** a cost of N.  A binary search of a table of N entries should have a
+** cost of approximately log(N).
+*/
+struct sqlite3_index_info {
+  /* Inputs */
+  int nConstraint;           /* Number of entries in aConstraint */
+  struct sqlite3_index_constraint {
+     int iColumn;              /* Column on left-hand side of constraint */
+     unsigned char op;         /* Constraint operator */
+     unsigned char usable;     /* True if this constraint is usable */
+     int iTermOffset;          /* Used internally - xBestIndex should ignore */
+  } *aConstraint;            /* Table of WHERE clause constraints */
+  int nOrderBy;              /* Number of terms in the ORDER BY clause */
+  struct sqlite3_index_orderby {
+     int iColumn;              /* Column number */
+     unsigned char desc;       /* True for DESC.  False for ASC. */
+  } *aOrderBy;               /* The ORDER BY clause */
+  /* Outputs */
+  struct sqlite3_index_constraint_usage {
+    int argvIndex;           /* if >0, constraint is part of argv to xFilter */
+    unsigned char omit;      /* Do not code a test for this constraint */
+  } *aConstraintUsage;
+  int idxNum;                /* Number used to identify the index */
+  char *idxStr;              /* String, possibly obtained from sqlite3_malloc */
+  int needToFreeIdxStr;      /* Free idxStr using sqlite3_free() if true */
+  int orderByConsumed;       /* True if output is already ordered */
+  double estimatedCost;      /* Estimated cost of using this index */
+};
+
+/*
+** CAPI3REF: Virtual Table Constraint Operator Codes
+**
+** These macros defined the allowed values for the
+** [sqlite3_index_info].aConstraint[].op field.  Each value represents
+** an operator that is part of a constraint term in the wHERE clause of
+** a query that uses a [virtual table].
+*/
+#define SQLITE_INDEX_CONSTRAINT_EQ    2
+#define SQLITE_INDEX_CONSTRAINT_GT    4
+#define SQLITE_INDEX_CONSTRAINT_LE    8
+#define SQLITE_INDEX_CONSTRAINT_LT    16
+#define SQLITE_INDEX_CONSTRAINT_GE    32
+#define SQLITE_INDEX_CONSTRAINT_MATCH 64
+
+/*
+** CAPI3REF: Register A Virtual Table Implementation
+**
+** ^These routines are used to register a new [virtual table module] name.
+** ^Module names must be registered before
+** creating a new [virtual table] using the module and before using a
+** preexisting [virtual table] for the module.
+**
+** ^The module name is registered on the [database connection] specified
+** by the first parameter.  ^The name of the module is given by the 
+** second parameter.  ^The third parameter is a pointer to
+** the implementation of the [virtual table module].   ^The fourth
+** parameter is an arbitrary client data pointer that is passed through
+** into the [xCreate] and [xConnect] methods of the virtual table module
+** when a new virtual table is be being created or reinitialized.
+**
+** ^The sqlite3_create_module_v2() interface has a fifth parameter which
+** is a pointer to a destructor for the pClientData.  ^SQLite will
+** invoke the destructor function (if it is not NULL) when SQLite
+** no longer needs the pClientData pointer.  ^The destructor will also
+** be invoked if the call to sqlite3_create_module_v2() fails.
+** ^The sqlite3_create_module()
+** interface is equivalent to sqlite3_create_module_v2() with a NULL
+** destructor.
+*/
+SQLITE_API int sqlite3_create_module(
+  sqlite3 *db,               /* SQLite connection to register module with */
+  const char *zName,         /* Name of the module */
+  const sqlite3_module *p,   /* Methods for the module */
+  void *pClientData          /* Client data for xCreate/xConnect */
+);
+SQLITE_API int sqlite3_create_module_v2(
+  sqlite3 *db,               /* SQLite connection to register module with */
+  const char *zName,         /* Name of the module */
+  const sqlite3_module *p,   /* Methods for the module */
+  void *pClientData,         /* Client data for xCreate/xConnect */
+  void(*xDestroy)(void*)     /* Module destructor function */
+);
+
+/*
+** CAPI3REF: Virtual Table Instance Object
+** KEYWORDS: sqlite3_vtab
+**
+** Every [virtual table module] implementation uses a subclass
+** of this object to describe a particular instance
+** of the [virtual table].  Each subclass will
+** be tailored to the specific needs of the module implementation.
+** The purpose of this superclass is to define certain fields that are
+** common to all module implementations.
+**
+** ^Virtual tables methods can set an error message by assigning a
+** string obtained from [sqlite3_mprintf()] to zErrMsg.  The method should
+** take care that any prior string is freed by a call to [sqlite3_free()]
+** prior to assigning a new string to zErrMsg.  ^After the error message
+** is delivered up to the client application, the string will be automatically
+** freed by sqlite3_free() and the zErrMsg field will be zeroed.
+*/
+struct sqlite3_vtab {
+  const sqlite3_module *pModule;  /* The module for this virtual table */
+  int nRef;                       /* NO LONGER USED */
+  char *zErrMsg;                  /* Error message from sqlite3_mprintf() */
+  /* Virtual table implementations will typically add additional fields */
+};
+
+/*
+** CAPI3REF: Virtual Table Cursor Object
+** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor}
+**
+** Every [virtual table module] implementation uses a subclass of the
+** following structure to describe cursors that point into the
+** [virtual table] and are used
+** to loop through the virtual table.  Cursors are created using the
+** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed
+** by the [sqlite3_module.xClose | xClose] method.  Cursors are used
+** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods
+** of the module.  Each module implementation will define
+** the content of a cursor structure to suit its own needs.
+**
+** This superclass exists in order to define fields of the cursor that
+** are common to all implementations.
+*/
+struct sqlite3_vtab_cursor {
+  sqlite3_vtab *pVtab;      /* Virtual table of this cursor */
+  /* Virtual table implementations will typically add additional fields */
+};
+
+/*
+** CAPI3REF: Declare The Schema Of A Virtual Table
+**
+** ^The [xCreate] and [xConnect] methods of a
+** [virtual table module] call this interface
+** to declare the format (the names and datatypes of the columns) of
+** the virtual tables they implement.
+*/
+SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
+
+/*
+** CAPI3REF: Overload A Function For A Virtual Table
+**
+** ^(Virtual tables can provide alternative implementations of functions
+** using the [xFindFunction] method of the [virtual table module].  
+** But global versions of those functions
+** must exist in order to be overloaded.)^
+**
+** ^(This API makes sure a global version of a function with a particular
+** name and number of parameters exists.  If no such function exists
+** before this API is called, a new function is created.)^  ^The implementation
+** of the new function always causes an exception to be thrown.  So
+** the new function is not good for anything by itself.  Its only
+** purpose is to be a placeholder function that can be overloaded
+** by a [virtual table].
+*/
+SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
+
+/*
+** The interface to the virtual-table mechanism defined above (back up
+** to a comment remarkably similar to this one) is currently considered
+** to be experimental.  The interface might change in incompatible ways.
+** If this is a problem for you, do not use the interface at this time.
+**
+** When the virtual-table mechanism stabilizes, we will declare the
+** interface fixed, support it indefinitely, and remove this comment.
+*/
+
+/*
+** CAPI3REF: A Handle To An Open BLOB
+** KEYWORDS: {BLOB handle} {BLOB handles}
+**
+** An instance of this object represents an open BLOB on which
+** [sqlite3_blob_open | incremental BLOB I/O] can be performed.
+** ^Objects of this type are created by [sqlite3_blob_open()]
+** and destroyed by [sqlite3_blob_close()].
+** ^The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces
+** can be used to read or write small subsections of the BLOB.
+** ^The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes.
+*/
+typedef struct sqlite3_blob sqlite3_blob;
+
+/*
+** CAPI3REF: Open A BLOB For Incremental I/O
+**
+** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located
+** in row iRow, column zColumn, table zTable in database zDb;
+** in other words, the same BLOB that would be selected by:
+**
+** <pre>
+**     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
+** </pre>)^
+**
+** ^If the flags parameter is non-zero, then the BLOB is opened for read
+** and write access. ^If it is zero, the BLOB is opened for read access.
+** ^It is not possible to open a column that is part of an index or primary 
+** key for writing. ^If [foreign key constraints] are enabled, it is 
+** not possible to open a column that is part of a [child key] for writing.
+**
+** ^Note that the database name is not the filename that contains
+** the database but rather the symbolic name of the database that
+** appears after the AS keyword when the database is connected using [ATTACH].
+** ^For the main database file, the database name is "main".
+** ^For TEMP tables, the database name is "temp".
+**
+** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is written
+** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set
+** to be a null pointer.)^
+** ^This function sets the [database connection] error code and message
+** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related
+** functions. ^Note that the *ppBlob variable is always initialized in a
+** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob
+** regardless of the success or failure of this routine.
+**
+** ^(If the row that a BLOB handle points to is modified by an
+** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects
+** then the BLOB handle is marked as "expired".
+** This is true if any column of the row is changed, even a column
+** other than the one the BLOB handle is open on.)^
+** ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for
+** an expired BLOB handle fail with a return code of [SQLITE_ABORT].
+** ^(Changes written into a BLOB prior to the BLOB expiring are not
+** rolled back by the expiration of the BLOB.  Such changes will eventually
+** commit if the transaction continues to completion.)^
+**
+** ^Use the [sqlite3_blob_bytes()] interface to determine the size of
+** the opened blob.  ^The size of a blob may not be changed by this
+** interface.  Use the [UPDATE] SQL command to change the size of a
+** blob.
+**
+** ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces
+** and the built-in [zeroblob] SQL function can be used, if desired,
+** to create an empty, zero-filled blob in which to read or write using
+** this interface.
+**
+** To avoid a resource leak, every open [BLOB handle] should eventually
+** be released by a call to [sqlite3_blob_close()].
+*/
+SQLITE_API int sqlite3_blob_open(
+  sqlite3*,
+  const char *zDb,
+  const char *zTable,
+  const char *zColumn,
+  sqlite3_int64 iRow,
+  int flags,
+  sqlite3_blob **ppBlob
+);
+
+/*
+** CAPI3REF: Move a BLOB Handle to a New Row
+**
+** ^This function is used to move an existing blob handle so that it points
+** to a different row of the same database table. ^The new row is identified
+** by the rowid value passed as the second argument. Only the row can be
+** changed. ^The database, table and column on which the blob handle is open
+** remain the same. Moving an existing blob handle to a new row can be
+** faster than closing the existing handle and opening a new one.
+**
+** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] -
+** it must exist and there must be either a blob or text value stored in
+** the nominated column.)^ ^If the new row is not present in the table, or if
+** it does not contain a blob or text value, or if another error occurs, an
+** SQLite error code is returned and the blob handle is considered aborted.
+** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
+** [sqlite3_blob_reopen()] on an aborted blob handle immediately return
+** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
+** always returns zero.
+**
+** ^This function sets the database handle error code and message.
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
+
+/*
+** CAPI3REF: Close A BLOB Handle
+**
+** ^Closes an open [BLOB handle].
+**
+** ^Closing a BLOB shall cause the current transaction to commit
+** if there are no other BLOBs, no pending prepared statements, and the
+** database connection is in [autocommit mode].
+** ^If any writes were made to the BLOB, they might be held in cache
+** until the close operation if they will fit.
+**
+** ^(Closing the BLOB often forces the changes
+** out to disk and so if any I/O errors occur, they will likely occur
+** at the time when the BLOB is closed.  Any errors that occur during
+** closing are reported as a non-zero return value.)^
+**
+** ^(The BLOB is closed unconditionally.  Even if this routine returns
+** an error code, the BLOB is still closed.)^
+**
+** ^Calling this routine with a null pointer (such as would be returned
+** by a failed call to [sqlite3_blob_open()]) is a harmless no-op.
+*/
+SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
+
+/*
+** CAPI3REF: Return The Size Of An Open BLOB
+**
+** ^Returns the size in bytes of the BLOB accessible via the 
+** successfully opened [BLOB handle] in its only argument.  ^The
+** incremental blob I/O routines can only read or overwriting existing
+** blob content; they cannot change the size of a blob.
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()].  Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+*/
+SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
+
+/*
+** CAPI3REF: Read Data From A BLOB Incrementally
+**
+** ^(This function is used to read data from an open [BLOB handle] into a
+** caller-supplied buffer. N bytes of data are copied into buffer Z
+** from the open BLOB, starting at offset iOffset.)^
+**
+** ^If offset iOffset is less than N bytes from the end of the BLOB,
+** [SQLITE_ERROR] is returned and no data is read.  ^If N or iOffset is
+** less than zero, [SQLITE_ERROR] is returned and no data is read.
+** ^The size of the blob (and hence the maximum value of N+iOffset)
+** can be determined using the [sqlite3_blob_bytes()] interface.
+**
+** ^An attempt to read from an expired [BLOB handle] fails with an
+** error code of [SQLITE_ABORT].
+**
+** ^(On success, sqlite3_blob_read() returns SQLITE_OK.
+** Otherwise, an [error code] or an [extended error code] is returned.)^
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()].  Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+**
+** See also: [sqlite3_blob_write()].
+*/
+SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
+
+/*
+** CAPI3REF: Write Data Into A BLOB Incrementally
+**
+** ^This function is used to write data into an open [BLOB handle] from a
+** caller-supplied buffer. ^N bytes of data are copied from the buffer Z
+** into the open BLOB, starting at offset iOffset.
+**
+** ^If the [BLOB handle] passed as the first argument was not opened for
+** writing (the flags parameter to [sqlite3_blob_open()] was zero),
+** this function returns [SQLITE_READONLY].
+**
+** ^This function may only modify the contents of the BLOB; it is
+** not possible to increase the size of a BLOB using this API.
+** ^If offset iOffset is less than N bytes from the end of the BLOB,
+** [SQLITE_ERROR] is returned and no data is written.  ^If N is
+** less than zero [SQLITE_ERROR] is returned and no data is written.
+** The size of the BLOB (and hence the maximum value of N+iOffset)
+** can be determined using the [sqlite3_blob_bytes()] interface.
+**
+** ^An attempt to write to an expired [BLOB handle] fails with an
+** error code of [SQLITE_ABORT].  ^Writes to the BLOB that occurred
+** before the [BLOB handle] expired are not rolled back by the
+** expiration of the handle, though of course those changes might
+** have been overwritten by the statement that expired the BLOB handle
+** or by other independent statements.
+**
+** ^(On success, sqlite3_blob_write() returns SQLITE_OK.
+** Otherwise, an  [error code] or an [extended error code] is returned.)^
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()].  Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+**
+** See also: [sqlite3_blob_read()].
+*/
+SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
+
+/*
+** CAPI3REF: Virtual File System Objects
+**
+** A virtual filesystem (VFS) is an [sqlite3_vfs] object
+** that SQLite uses to interact
+** with the underlying operating system.  Most SQLite builds come with a
+** single default VFS that is appropriate for the host computer.
+** New VFSes can be registered and existing VFSes can be unregistered.
+** The following interfaces are provided.
+**
+** ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name.
+** ^Names are case sensitive.
+** ^Names are zero-terminated UTF-8 strings.
+** ^If there is no match, a NULL pointer is returned.
+** ^If zVfsName is NULL then the default VFS is returned.
+**
+** ^New VFSes are registered with sqlite3_vfs_register().
+** ^Each new VFS becomes the default VFS if the makeDflt flag is set.
+** ^The same VFS can be registered multiple times without injury.
+** ^To make an existing VFS into the default VFS, register it again
+** with the makeDflt flag set.  If two different VFSes with the
+** same name are registered, the behavior is undefined.  If a
+** VFS is registered with a name that is NULL or an empty string,
+** then the behavior is undefined.
+**
+** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
+** ^(If the default VFS is unregistered, another VFS is chosen as
+** the default.  The choice for the new VFS is arbitrary.)^
+*/
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
+
+/*
+** CAPI3REF: Mutexes
+**
+** The SQLite core uses these routines for thread
+** synchronization. Though they are intended for internal
+** use by SQLite, code that links against SQLite is
+** permitted to use any of these routines.
+**
+** The SQLite source code contains multiple implementations
+** of these mutex routines.  An appropriate implementation
+** is selected automatically at compile-time.  ^(The following
+** implementations are available in the SQLite core:
+**
+** <ul>
+** <li>   SQLITE_MUTEX_OS2
+** <li>   SQLITE_MUTEX_PTHREAD
+** <li>   SQLITE_MUTEX_W32
+** <li>   SQLITE_MUTEX_NOOP
+** </ul>)^
+**
+** ^The SQLITE_MUTEX_NOOP implementation is a set of routines
+** that does no real locking and is appropriate for use in
+** a single-threaded application.  ^The SQLITE_MUTEX_OS2,
+** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations
+** are appropriate for use on OS/2, Unix, and Windows.
+**
+** ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
+** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex
+** implementation is included with the library. In this case the
+** application must supply a custom mutex implementation using the
+** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function
+** before calling sqlite3_initialize() or any other public sqlite3_
+** function that calls sqlite3_initialize().)^
+**
+** ^The sqlite3_mutex_alloc() routine allocates a new
+** mutex and returns a pointer to it. ^If it returns NULL
+** that means that a mutex could not be allocated.  ^SQLite
+** will unwind its stack and return an error.  ^(The argument
+** to sqlite3_mutex_alloc() is one of these integer constants:
+**
+** <ul>
+** <li>  SQLITE_MUTEX_FAST
+** <li>  SQLITE_MUTEX_RECURSIVE
+** <li>  SQLITE_MUTEX_STATIC_MASTER
+** <li>  SQLITE_MUTEX_STATIC_MEM
+** <li>  SQLITE_MUTEX_STATIC_MEM2
+** <li>  SQLITE_MUTEX_STATIC_PRNG
+** <li>  SQLITE_MUTEX_STATIC_LRU
+** <li>  SQLITE_MUTEX_STATIC_LRU2
+** </ul>)^
+**
+** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)
+** cause sqlite3_mutex_alloc() to create
+** a new mutex.  ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
+** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
+** The mutex implementation does not need to make a distinction
+** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
+** not want to.  ^SQLite will only request a recursive mutex in
+** cases where it really needs one.  ^If a faster non-recursive mutex
+** implementation is available on the host platform, the mutex subsystem
+** might return such a mutex in response to SQLITE_MUTEX_FAST.
+**
+** ^The other allowed parameters to sqlite3_mutex_alloc() (anything other
+** than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return
+** a pointer to a static preexisting mutex.  ^Six static mutexes are
+** used by the current version of SQLite.  Future versions of SQLite
+** may add additional static mutexes.  Static mutexes are for internal
+** use by SQLite only.  Applications that use SQLite mutexes should
+** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
+** SQLITE_MUTEX_RECURSIVE.
+**
+** ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
+** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
+** returns a different mutex on every call.  ^But for the static
+** mutex types, the same mutex is returned on every call that has
+** the same type number.
+**
+** ^The sqlite3_mutex_free() routine deallocates a previously
+** allocated dynamic mutex.  ^SQLite is careful to deallocate every
+** dynamic mutex that it allocates.  The dynamic mutexes must not be in
+** use when they are deallocated.  Attempting to deallocate a static
+** mutex results in undefined behavior.  ^SQLite never deallocates
+** a static mutex.
+**
+** ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
+** to enter a mutex.  ^If another thread is already within the mutex,
+** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
+** SQLITE_BUSY.  ^The sqlite3_mutex_try() interface returns [SQLITE_OK]
+** upon successful entry.  ^(Mutexes created using
+** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.
+** In such cases the,
+** mutex must be exited an equal number of times before another thread
+** can enter.)^  ^(If the same thread tries to enter any other
+** kind of mutex more than once, the behavior is undefined.
+** SQLite will never exhibit
+** such behavior in its own use of mutexes.)^
+**
+** ^(Some systems (for example, Windows 95) do not support the operation
+** implemented by sqlite3_mutex_try().  On those systems, sqlite3_mutex_try()
+** will always return SQLITE_BUSY.  The SQLite core only ever uses
+** sqlite3_mutex_try() as an optimization so this is acceptable behavior.)^
+**
+** ^The sqlite3_mutex_leave() routine exits a mutex that was
+** previously entered by the same thread.   ^(The behavior
+** is undefined if the mutex is not currently entered by the
+** calling thread or is not currently allocated.  SQLite will
+** never do either.)^
+**
+** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or
+** sqlite3_mutex_leave() is a NULL pointer, then all three routines
+** behave as no-ops.
+**
+** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
+*/
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
+
+/*
+** CAPI3REF: Mutex Methods Object
+**
+** An instance of this structure defines the low-level routines
+** used to allocate and use mutexes.
+**
+** Usually, the default mutex implementations provided by SQLite are
+** sufficient, however the user has the option of substituting a custom
+** implementation for specialized deployments or systems for which SQLite
+** does not provide a suitable implementation. In this case, the user
+** creates and populates an instance of this structure to pass
+** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.
+** Additionally, an instance of this structure can be used as an
+** output variable when querying the system for the current mutex
+** implementation, using the [SQLITE_CONFIG_GETMUTEX] option.
+**
+** ^The xMutexInit method defined by this structure is invoked as
+** part of system initialization by the sqlite3_initialize() function.
+** ^The xMutexInit routine is called by SQLite exactly once for each
+** effective call to [sqlite3_initialize()].
+**
+** ^The xMutexEnd method defined by this structure is invoked as
+** part of system shutdown by the sqlite3_shutdown() function. The
+** implementation of this method is expected to release all outstanding
+** resources obtained by the mutex methods implementation, especially
+** those obtained by the xMutexInit method.  ^The xMutexEnd()
+** interface is invoked exactly once for each call to [sqlite3_shutdown()].
+**
+** ^(The remaining seven methods defined by this structure (xMutexAlloc,
+** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and
+** xMutexNotheld) implement the following interfaces (respectively):
+**
+** <ul>
+**   <li>  [sqlite3_mutex_alloc()] </li>
+**   <li>  [sqlite3_mutex_free()] </li>
+**   <li>  [sqlite3_mutex_enter()] </li>
+**   <li>  [sqlite3_mutex_try()] </li>
+**   <li>  [sqlite3_mutex_leave()] </li>
+**   <li>  [sqlite3_mutex_held()] </li>
+**   <li>  [sqlite3_mutex_notheld()] </li>
+** </ul>)^
+**
+** The only difference is that the public sqlite3_XXX functions enumerated
+** above silently ignore any invocations that pass a NULL pointer instead
+** of a valid mutex handle. The implementations of the methods defined
+** by this structure are not required to handle this case, the results
+** of passing a NULL pointer instead of a valid mutex handle are undefined
+** (i.e. it is acceptable to provide an implementation that segfaults if
+** it is passed a NULL pointer).
+**
+** The xMutexInit() method must be threadsafe.  ^It must be harmless to
+** invoke xMutexInit() multiple times within the same process and without
+** intervening calls to xMutexEnd().  Second and subsequent calls to
+** xMutexInit() must be no-ops.
+**
+** ^xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
+** and its associates).  ^Similarly, xMutexAlloc() must not use SQLite memory
+** allocation for a static mutex.  ^However xMutexAlloc() may use SQLite
+** memory allocation for a fast or recursive mutex.
+**
+** ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is
+** called, but only if the prior call to xMutexInit returned SQLITE_OK.
+** If xMutexInit fails in any way, it is expected to clean up after itself
+** prior to returning.
+*/
+typedef struct sqlite3_mutex_methods sqlite3_mutex_methods;
+struct sqlite3_mutex_methods {
+  int (*xMutexInit)(void);
+  int (*xMutexEnd)(void);
+  sqlite3_mutex *(*xMutexAlloc)(int);
+  void (*xMutexFree)(sqlite3_mutex *);
+  void (*xMutexEnter)(sqlite3_mutex *);
+  int (*xMutexTry)(sqlite3_mutex *);
+  void (*xMutexLeave)(sqlite3_mutex *);
+  int (*xMutexHeld)(sqlite3_mutex *);
+  int (*xMutexNotheld)(sqlite3_mutex *);
+};
+
+/*
+** CAPI3REF: Mutex Verification Routines
+**
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines
+** are intended for use inside assert() statements.  ^The SQLite core
+** never uses these routines except inside an assert() and applications
+** are advised to follow the lead of the core.  ^The SQLite core only
+** provides implementations for these routines when it is compiled
+** with the SQLITE_DEBUG flag.  ^External mutex implementations
+** are only required to provide these routines if SQLITE_DEBUG is
+** defined and if NDEBUG is not defined.
+**
+** ^These routines should return true if the mutex in their argument
+** is held or not held, respectively, by the calling thread.
+**
+** ^The implementation is not required to provided versions of these
+** routines that actually work. If the implementation does not provide working
+** versions of these routines, it should at least provide stubs that always
+** return true so that one does not get spurious assertion failures.
+**
+** ^If the argument to sqlite3_mutex_held() is a NULL pointer then
+** the routine should return 1.   This seems counter-intuitive since
+** clearly the mutex cannot be held if it does not exist.  But the
+** the reason the mutex does not exist is because the build is not
+** using mutexes.  And we do not want the assert() containing the
+** call to sqlite3_mutex_held() to fail, so a non-zero return is
+** the appropriate thing to do.  ^The sqlite3_mutex_notheld()
+** interface should also return 1 when given a NULL pointer.
+*/
+#ifndef NDEBUG
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
+#endif
+
+/*
+** CAPI3REF: Mutex Types
+**
+** The [sqlite3_mutex_alloc()] interface takes a single argument
+** which is one of these integer constants.
+**
+** The set of static mutexes may change from one SQLite release to the
+** next.  Applications that override the built-in mutex logic must be
+** prepared to accommodate additional static mutexes.
+*/
+#define SQLITE_MUTEX_FAST             0
+#define SQLITE_MUTEX_RECURSIVE        1
+#define SQLITE_MUTEX_STATIC_MASTER    2
+#define SQLITE_MUTEX_STATIC_MEM       3  /* sqlite3_malloc() */
+#define SQLITE_MUTEX_STATIC_MEM2      4  /* NOT USED */
+#define SQLITE_MUTEX_STATIC_OPEN      4  /* sqlite3BtreeOpen() */
+#define SQLITE_MUTEX_STATIC_PRNG      5  /* sqlite3_random() */
+#define SQLITE_MUTEX_STATIC_LRU       6  /* lru page list */
+#define SQLITE_MUTEX_STATIC_LRU2      7  /* NOT USED */
+#define SQLITE_MUTEX_STATIC_PMEM      7  /* sqlite3PageMalloc() */
+
+/*
+** CAPI3REF: Retrieve the mutex for a database connection
+**
+** ^This interface returns a pointer the [sqlite3_mutex] object that 
+** serializes access to the [database connection] given in the argument
+** when the [threading mode] is Serialized.
+** ^If the [threading mode] is Single-thread or Multi-thread then this
+** routine returns a NULL pointer.
+*/
+SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
+
+/*
+** CAPI3REF: Low-Level Control Of Database Files
+**
+** ^The [sqlite3_file_control()] interface makes a direct call to the
+** xFileControl method for the [sqlite3_io_methods] object associated
+** with a particular database identified by the second argument. ^The
+** name of the database is "main" for the main database or "temp" for the
+** TEMP database, or the name that appears after the AS keyword for
+** databases that are added using the [ATTACH] SQL command.
+** ^A NULL pointer can be used in place of "main" to refer to the
+** main database file.
+** ^The third and fourth parameters to this routine
+** are passed directly through to the second and third parameters of
+** the xFileControl method.  ^The return value of the xFileControl
+** method becomes the return value of this routine.
+**
+** ^The SQLITE_FCNTL_FILE_POINTER value for the op parameter causes
+** a pointer to the underlying [sqlite3_file] object to be written into
+** the space pointed to by the 4th parameter.  ^The SQLITE_FCNTL_FILE_POINTER
+** case is a short-circuit path which does not actually invoke the
+** underlying sqlite3_io_methods.xFileControl method.
+**
+** ^If the second parameter (zDbName) does not match the name of any
+** open database file, then SQLITE_ERROR is returned.  ^This error
+** code is not remembered and will not be recalled by [sqlite3_errcode()]
+** or [sqlite3_errmsg()].  The underlying xFileControl method might
+** also return SQLITE_ERROR.  There is no way to distinguish between
+** an incorrect zDbName and an SQLITE_ERROR return from the underlying
+** xFileControl method.
+**
+** See also: [SQLITE_FCNTL_LOCKSTATE]
+*/
+SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
+
+/*
+** CAPI3REF: Testing Interface
+**
+** ^The sqlite3_test_control() interface is used to read out internal
+** state of SQLite and to inject faults into SQLite for testing
+** purposes.  ^The first parameter is an operation code that determines
+** the number, meaning, and operation of all subsequent parameters.
+**
+** This interface is not for use by applications.  It exists solely
+** for verifying the correct operation of the SQLite library.  Depending
+** on how the SQLite library is compiled, this interface might not exist.
+**
+** The details of the operation codes, their meanings, the parameters
+** they take, and what they do are all subject to change without notice.
+** Unlike most of the SQLite API, this function is not guaranteed to
+** operate consistently from one release to the next.
+*/
+SQLITE_API int sqlite3_test_control(int op, ...);
+
+/*
+** CAPI3REF: Testing Interface Operation Codes
+**
+** These constants are the valid operation code parameters used
+** as the first argument to [sqlite3_test_control()].
+**
+** These parameters and their meanings are subject to change
+** without notice.  These values are for testing purposes only.
+** Applications should not use any of these parameters or the
+** [sqlite3_test_control()] interface.
+*/
+#define SQLITE_TESTCTRL_FIRST                    5
+#define SQLITE_TESTCTRL_PRNG_SAVE                5
+#define SQLITE_TESTCTRL_PRNG_RESTORE             6
+#define SQLITE_TESTCTRL_PRNG_RESET               7
+#define SQLITE_TESTCTRL_BITVEC_TEST              8
+#define SQLITE_TESTCTRL_FAULT_INSTALL            9
+#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS     10
+#define SQLITE_TESTCTRL_PENDING_BYTE            11
+#define SQLITE_TESTCTRL_ASSERT                  12
+#define SQLITE_TESTCTRL_ALWAYS                  13
+#define SQLITE_TESTCTRL_RESERVE                 14
+#define SQLITE_TESTCTRL_OPTIMIZATIONS           15
+#define SQLITE_TESTCTRL_ISKEYWORD               16
+#define SQLITE_TESTCTRL_PGHDRSZ                 17
+#define SQLITE_TESTCTRL_SCRATCHMALLOC           18
+#define SQLITE_TESTCTRL_LAST                    18
+
+/*
+** CAPI3REF: SQLite Runtime Status
+**
+** ^This interface is used to retrieve runtime status information
+** about the performance of SQLite, and optionally to reset various
+** highwater marks.  ^The first argument is an integer code for
+** the specific parameter to measure.  ^(Recognized integer codes
+** are of the form [SQLITE_STATUS_MEMORY_USED | SQLITE_STATUS_...].)^
+** ^The current value of the parameter is returned into *pCurrent.
+** ^The highest recorded value is returned in *pHighwater.  ^If the
+** resetFlag is true, then the highest record value is reset after
+** *pHighwater is written.  ^(Some parameters do not record the highest
+** value.  For those parameters
+** nothing is written into *pHighwater and the resetFlag is ignored.)^
+** ^(Other parameters record only the highwater mark and not the current
+** value.  For these latter parameters nothing is written into *pCurrent.)^
+**
+** ^The sqlite3_status() routine returns SQLITE_OK on success and a
+** non-zero [error code] on failure.
+**
+** This routine is threadsafe but is not atomic.  This routine can be
+** called while other threads are running the same or different SQLite
+** interfaces.  However the values returned in *pCurrent and
+** *pHighwater reflect the status of SQLite at different points in time
+** and it is possible that another thread might change the parameter
+** in between the times when *pCurrent and *pHighwater are written.
+**
+** See also: [sqlite3_db_status()]
+*/
+SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
+
+
+/*
+** CAPI3REF: Status Parameters
+**
+** These integer constants designate various run-time status parameters
+** that can be returned by [sqlite3_status()].
+**
+** <dl>
+** ^(<dt>SQLITE_STATUS_MEMORY_USED</dt>
+** <dd>This parameter is the current amount of memory checked out
+** using [sqlite3_malloc()], either directly or indirectly.  The
+** figure includes calls made to [sqlite3_malloc()] by the application
+** and internal memory usage by the SQLite library.  Scratch memory
+** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache
+** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in
+** this parameter.  The amount returned is the sum of the allocation
+** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_MALLOC_SIZE</dt>
+** <dd>This parameter records the largest memory allocation request
+** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their
+** internal equivalents).  Only the value returned in the
+** *pHighwater parameter to [sqlite3_status()] is of interest.  
+** The value written into the *pCurrent parameter is undefined.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_MALLOC_COUNT</dt>
+** <dd>This parameter records the number of separate memory allocations
+** currently checked out.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PAGECACHE_USED</dt>
+** <dd>This parameter returns the number of pages used out of the
+** [pagecache memory allocator] that was configured using 
+** [SQLITE_CONFIG_PAGECACHE].  The
+** value returned is in pages, not in bytes.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PAGECACHE_OVERFLOW</dt>
+** <dd>This parameter returns the number of bytes of page cache
+** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE]
+** buffer and where forced to overflow to [sqlite3_malloc()].  The
+** returned value includes allocations that overflowed because they
+** where too large (they were larger than the "sz" parameter to
+** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because
+** no space was left in the page cache.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PAGECACHE_SIZE</dt>
+** <dd>This parameter records the largest memory allocation request
+** handed to [pagecache memory allocator].  Only the value returned in the
+** *pHighwater parameter to [sqlite3_status()] is of interest.  
+** The value written into the *pCurrent parameter is undefined.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_SCRATCH_USED</dt>
+** <dd>This parameter returns the number of allocations used out of the
+** [scratch memory allocator] configured using
+** [SQLITE_CONFIG_SCRATCH].  The value returned is in allocations, not
+** in bytes.  Since a single thread may only have one scratch allocation
+** outstanding at time, this parameter also reports the number of threads
+** using scratch memory at the same time.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt>
+** <dd>This parameter returns the number of bytes of scratch memory
+** allocation which could not be satisfied by the [SQLITE_CONFIG_SCRATCH]
+** buffer and where forced to overflow to [sqlite3_malloc()].  The values
+** returned include overflows because the requested allocation was too
+** larger (that is, because the requested allocation was larger than the
+** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer
+** slots were available.
+** </dd>)^
+**
+** ^(<dt>SQLITE_STATUS_SCRATCH_SIZE</dt>
+** <dd>This parameter records the largest memory allocation request
+** handed to [scratch memory allocator].  Only the value returned in the
+** *pHighwater parameter to [sqlite3_status()] is of interest.  
+** The value written into the *pCurrent parameter is undefined.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PARSER_STACK</dt>
+** <dd>This parameter records the deepest parser stack.  It is only
+** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].</dd>)^
+** </dl>
+**
+** New status parameters may be added from time to time.
+*/
+#define SQLITE_STATUS_MEMORY_USED          0
+#define SQLITE_STATUS_PAGECACHE_USED       1
+#define SQLITE_STATUS_PAGECACHE_OVERFLOW   2
+#define SQLITE_STATUS_SCRATCH_USED         3
+#define SQLITE_STATUS_SCRATCH_OVERFLOW     4
+#define SQLITE_STATUS_MALLOC_SIZE          5
+#define SQLITE_STATUS_PARSER_STACK         6
+#define SQLITE_STATUS_PAGECACHE_SIZE       7
+#define SQLITE_STATUS_SCRATCH_SIZE         8
+#define SQLITE_STATUS_MALLOC_COUNT         9
+
+/*
+** CAPI3REF: Database Connection Status
+**
+** ^This interface is used to retrieve runtime status information 
+** about a single [database connection].  ^The first argument is the
+** database connection object to be interrogated.  ^The second argument
+** is an integer constant, taken from the set of
+** [SQLITE_DBSTATUS_LOOKASIDE_USED | SQLITE_DBSTATUS_*] macros, that
+** determines the parameter to interrogate.  The set of 
+** [SQLITE_DBSTATUS_LOOKASIDE_USED | SQLITE_DBSTATUS_*] macros is likely
+** to grow in future releases of SQLite.
+**
+** ^The current value of the requested parameter is written into *pCur
+** and the highest instantaneous value is written into *pHiwtr.  ^If
+** the resetFlg is true, then the highest instantaneous value is
+** reset back down to the current value.
+**
+** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
+** non-zero [error code] on failure.
+**
+** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
+*/
+SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
+
+/*
+** CAPI3REF: Status Parameters for database connections
+**
+** These constants are the available integer "verbs" that can be passed as
+** the second argument to the [sqlite3_db_status()] interface.
+**
+** New verbs may be added in future releases of SQLite. Existing verbs
+** might be discontinued. Applications should check the return code from
+** [sqlite3_db_status()] to make sure that the call worked.
+** The [sqlite3_db_status()] interface will return a non-zero error code
+** if a discontinued or unsupported verb is invoked.
+**
+** <dl>
+** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_USED</dt>
+** <dd>This parameter returns the number of lookaside memory slots currently
+** checked out.</dd>)^
+**
+** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_HIT</dt>
+** <dd>This parameter returns the number malloc attempts that were 
+** satisfied using lookaside memory. Only the high-water value is meaningful;
+** the current value is always zero.)^
+**
+** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</dt>
+** <dd>This parameter returns the number malloc attempts that might have
+** been satisfied using lookaside memory but failed due to the amount of
+** memory requested being larger than the lookaside slot size.
+** Only the high-water value is meaningful;
+** the current value is always zero.)^
+**
+** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</dt>
+** <dd>This parameter returns the number malloc attempts that might have
+** been satisfied using lookaside memory but failed due to all lookaside
+** memory already being in use.
+** Only the high-water value is meaningful;
+** the current value is always zero.)^
+**
+** ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt>
+** <dd>This parameter returns the approximate number of of bytes of heap
+** memory used by all pager caches associated with the database connection.)^
+** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
+**
+** ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>
+** <dd>This parameter returns the approximate number of of bytes of heap
+** memory used to store the schema for all databases associated
+** with the connection - main, temp, and any [ATTACH]-ed databases.)^ 
+** ^The full amount of memory used by the schemas is reported, even if the
+** schema memory is shared with other database connections due to
+** [shared cache mode] being enabled.
+** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0.
+**
+** ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt>
+** <dd>This parameter returns the approximate number of of bytes of heap
+** and lookaside memory used by all prepared statements associated with
+** the database connection.)^
+** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0.
+** </dd>
+** </dl>
+*/
+#define SQLITE_DBSTATUS_LOOKASIDE_USED       0
+#define SQLITE_DBSTATUS_CACHE_USED           1
+#define SQLITE_DBSTATUS_SCHEMA_USED          2
+#define SQLITE_DBSTATUS_STMT_USED            3
+#define SQLITE_DBSTATUS_LOOKASIDE_HIT        4
+#define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE  5
+#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL  6
+#define SQLITE_DBSTATUS_MAX                  6   /* Largest defined DBSTATUS */
+
+
+/*
+** CAPI3REF: Prepared Statement Status
+**
+** ^(Each prepared statement maintains various
+** [SQLITE_STMTSTATUS_SORT | counters] that measure the number
+** of times it has performed specific operations.)^  These counters can
+** be used to monitor the performance characteristics of the prepared
+** statements.  For example, if the number of table steps greatly exceeds
+** the number of table searches or result rows, that would tend to indicate
+** that the prepared statement is using a full table scan rather than
+** an index.  
+**
+** ^(This interface is used to retrieve and reset counter values from
+** a [prepared statement].  The first argument is the prepared statement
+** object to be interrogated.  The second argument
+** is an integer code for a specific [SQLITE_STMTSTATUS_SORT | counter]
+** to be interrogated.)^
+** ^The current value of the requested counter is returned.
+** ^If the resetFlg is true, then the counter is reset to zero after this
+** interface call returns.
+**
+** See also: [sqlite3_status()] and [sqlite3_db_status()].
+*/
+SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
+
+/*
+** CAPI3REF: Status Parameters for prepared statements
+**
+** These preprocessor macros define integer codes that name counter
+** values associated with the [sqlite3_stmt_status()] interface.
+** The meanings of the various counters are as follows:
+**
+** <dl>
+** <dt>SQLITE_STMTSTATUS_FULLSCAN_STEP</dt>
+** <dd>^This is the number of times that SQLite has stepped forward in
+** a table as part of a full table scan.  Large numbers for this counter
+** may indicate opportunities for performance improvement through 
+** careful use of indices.</dd>
+**
+** <dt>SQLITE_STMTSTATUS_SORT</dt>
+** <dd>^This is the number of sort operations that have occurred.
+** A non-zero value in this counter may indicate an opportunity to
+** improvement performance through careful use of indices.</dd>
+**
+** <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt>
+** <dd>^This is the number of rows inserted into transient indices that
+** were created automatically in order to help joins run faster.
+** A non-zero value in this counter may indicate an opportunity to
+** improvement performance by adding permanent indices that do not
+** need to be reinitialized each time the statement is run.</dd>
+**
+** </dl>
+*/
+#define SQLITE_STMTSTATUS_FULLSCAN_STEP     1
+#define SQLITE_STMTSTATUS_SORT              2
+#define SQLITE_STMTSTATUS_AUTOINDEX         3
+
+/*
+** CAPI3REF: Custom Page Cache Object
+**
+** The sqlite3_pcache type is opaque.  It is implemented by
+** the pluggable module.  The SQLite core has no knowledge of
+** its size or internal structure and never deals with the
+** sqlite3_pcache object except by holding and passing pointers
+** to the object.
+**
+** See [sqlite3_pcache_methods] for additional information.
+*/
+typedef struct sqlite3_pcache sqlite3_pcache;
+
+/*
+** CAPI3REF: Application Defined Page Cache.
+** KEYWORDS: {page cache}
+**
+** ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE], ...) interface can
+** register an alternative page cache implementation by passing in an 
+** instance of the sqlite3_pcache_methods structure.)^
+** In many applications, most of the heap memory allocated by 
+** SQLite is used for the page cache.
+** By implementing a 
+** custom page cache using this API, an application can better control
+** the amount of memory consumed by SQLite, the way in which 
+** that memory is allocated and released, and the policies used to 
+** determine exactly which parts of a database file are cached and for 
+** how long.
+**
+** The alternative page cache mechanism is an
+** extreme measure that is only needed by the most demanding applications.
+** The built-in page cache is recommended for most uses.
+**
+** ^(The contents of the sqlite3_pcache_methods structure are copied to an
+** internal buffer by SQLite within the call to [sqlite3_config].  Hence
+** the application may discard the parameter after the call to
+** [sqlite3_config()] returns.)^
+**
+** ^(The xInit() method is called once for each effective 
+** call to [sqlite3_initialize()])^
+** (usually only once during the lifetime of the process). ^(The xInit()
+** method is passed a copy of the sqlite3_pcache_methods.pArg value.)^
+** The intent of the xInit() method is to set up global data structures 
+** required by the custom page cache implementation. 
+** ^(If the xInit() method is NULL, then the 
+** built-in default page cache is used instead of the application defined
+** page cache.)^
+**
+** ^The xShutdown() method is called by [sqlite3_shutdown()].
+** It can be used to clean up 
+** any outstanding resources before process shutdown, if required.
+** ^The xShutdown() method may be NULL.
+**
+** ^SQLite automatically serializes calls to the xInit method,
+** so the xInit method need not be threadsafe.  ^The
+** xShutdown method is only called from [sqlite3_shutdown()] so it does
+** not need to be threadsafe either.  All other methods must be threadsafe
+** in multithreaded applications.
+**
+** ^SQLite will never invoke xInit() more than once without an intervening
+** call to xShutdown().
+**
+** ^SQLite invokes the xCreate() method to construct a new cache instance.
+** SQLite will typically create one cache instance for each open database file,
+** though this is not guaranteed. ^The
+** first parameter, szPage, is the size in bytes of the pages that must
+** be allocated by the cache.  ^szPage will not be a power of two.  ^szPage
+** will the page size of the database file that is to be cached plus an
+** increment (here called "R") of less than 250.  SQLite will use the
+** extra R bytes on each page to store metadata about the underlying
+** database page on disk.  The value of R depends
+** on the SQLite version, the target platform, and how SQLite was compiled.
+** ^(R is constant for a particular build of SQLite. Except, there are two
+** distinct values of R when SQLite is compiled with the proprietary
+** ZIPVFS extension.)^  ^The second argument to
+** xCreate(), bPurgeable, is true if the cache being created will
+** be used to cache database pages of a file stored on disk, or
+** false if it is used for an in-memory database. The cache implementation
+** does not have to do anything special based with the value of bPurgeable;
+** it is purely advisory.  ^On a cache where bPurgeable is false, SQLite will
+** never invoke xUnpin() except to deliberately delete a page.
+** ^In other words, calls to xUnpin() on a cache with bPurgeable set to
+** false will always have the "discard" flag set to true.  
+** ^Hence, a cache created with bPurgeable false will
+** never contain any unpinned pages.
+**
+** ^(The xCachesize() method may be called at any time by SQLite to set the
+** suggested maximum cache-size (number of pages stored by) the cache
+** instance passed as the first argument. This is the value configured using
+** the SQLite "[PRAGMA cache_size]" command.)^  As with the bPurgeable
+** parameter, the implementation is not required to do anything with this
+** value; it is advisory only.
+**
+** The xPagecount() method must return the number of pages currently
+** stored in the cache, both pinned and unpinned.
+** 
+** The xFetch() method locates a page in the cache and returns a pointer to 
+** the page, or a NULL pointer.
+** A "page", in this context, means a buffer of szPage bytes aligned at an
+** 8-byte boundary. The page to be fetched is determined by the key. ^The
+** mimimum key value is 1.  After it has been retrieved using xFetch, the page 
+** is considered to be "pinned".
+**
+** If the requested page is already in the page cache, then the page cache
+** implementation must return a pointer to the page buffer with its content
+** intact.  If the requested page is not already in the cache, then the
+** cache implementation should use the value of the createFlag
+** parameter to help it determined what action to take:
+**
+** <table border=1 width=85% align=center>
+** <tr><th> createFlag <th> Behaviour when page is not already in cache
+** <tr><td> 0 <td> Do not allocate a new page.  Return NULL.
+** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
+**                 Otherwise return NULL.
+** <tr><td> 2 <td> Make every effort to allocate a new page.  Only return
+**                 NULL if allocating a new page is effectively impossible.
+** </table>
+**
+** ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1.  SQLite
+** will only use a createFlag of 2 after a prior call with a createFlag of 1
+** failed.)^  In between the to xFetch() calls, SQLite may
+** attempt to unpin one or more cache pages by spilling the content of
+** pinned pages to disk and synching the operating system disk cache.
+**
+** ^xUnpin() is called by SQLite with a pointer to a currently pinned page
+** as its second argument.  If the third parameter, discard, is non-zero,
+** then the page must be evicted from the cache.
+** ^If the discard parameter is
+** zero, then the page may be discarded or retained at the discretion of
+** page cache implementation. ^The page cache implementation
+** may choose to evict unpinned pages at any time.
+**
+** The cache must not perform any reference counting. A single 
+** call to xUnpin() unpins the page regardless of the number of prior calls 
+** to xFetch().
+**
+** The xRekey() method is used to change the key value associated with the
+** page passed as the second argument. If the cache
+** previously contains an entry associated with newKey, it must be
+** discarded. ^Any prior cache entry associated with newKey is guaranteed not
+** to be pinned.
+**
+** When SQLite calls the xTruncate() method, the cache must discard all
+** existing cache entries with page numbers (keys) greater than or equal
+** to the value of the iLimit parameter passed to xTruncate(). If any
+** of these pages are pinned, they are implicitly unpinned, meaning that
+** they can be safely discarded.
+**
+** ^The xDestroy() method is used to delete a cache allocated by xCreate().
+** All resources associated with the specified cache should be freed. ^After
+** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]
+** handle invalid, and will not use it with any other sqlite3_pcache_methods
+** functions.
+*/
+typedef struct sqlite3_pcache_methods sqlite3_pcache_methods;
+struct sqlite3_pcache_methods {
+  void *pArg;
+  int (*xInit)(void*);
+  void (*xShutdown)(void*);
+  sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);
+  void (*xCachesize)(sqlite3_pcache*, int nCachesize);
+  int (*xPagecount)(sqlite3_pcache*);
+  void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);
+  void (*xUnpin)(sqlite3_pcache*, void*, int discard);
+  void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);
+  void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);
+  void (*xDestroy)(sqlite3_pcache*);
+};
+
+/*
+** CAPI3REF: Online Backup Object
+**
+** The sqlite3_backup object records state information about an ongoing
+** online backup operation.  ^The sqlite3_backup object is created by
+** a call to [sqlite3_backup_init()] and is destroyed by a call to
+** [sqlite3_backup_finish()].
+**
+** See Also: [Using the SQLite Online Backup API]
+*/
+typedef struct sqlite3_backup sqlite3_backup;
+
+/*
+** CAPI3REF: Online Backup API.
+**
+** The backup API copies the content of one database into another.
+** It is useful either for creating backups of databases or
+** for copying in-memory databases to or from persistent files. 
+**
+** See Also: [Using the SQLite Online Backup API]
+**
+** ^SQLite holds a write transaction open on the destination database file
+** for the duration of the backup operation.
+** ^The source database is read-locked only while it is being read;
+** it is not locked continuously for the entire backup operation.
+** ^Thus, the backup may be performed on a live source database without
+** preventing other database connections from
+** reading or writing to the source database while the backup is underway.
+** 
+** ^(To perform a backup operation: 
+**   <ol>
+**     <li><b>sqlite3_backup_init()</b> is called once to initialize the
+**         backup, 
+**     <li><b>sqlite3_backup_step()</b> is called one or more times to transfer 
+**         the data between the two databases, and finally
+**     <li><b>sqlite3_backup_finish()</b> is called to release all resources 
+**         associated with the backup operation. 
+**   </ol>)^
+** There should be exactly one call to sqlite3_backup_finish() for each
+** successful call to sqlite3_backup_init().
+**
+** <b>sqlite3_backup_init()</b>
+**
+** ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the 
+** [database connection] associated with the destination database 
+** and the database name, respectively.
+** ^The database name is "main" for the main database, "temp" for the
+** temporary database, or the name specified after the AS keyword in
+** an [ATTACH] statement for an attached database.
+** ^The S and M arguments passed to 
+** sqlite3_backup_init(D,N,S,M) identify the [database connection]
+** and database name of the source database, respectively.
+** ^The source and destination [database connections] (parameters S and D)
+** must be different or else sqlite3_backup_init(D,N,S,M) will fail with
+** an error.
+**
+** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is
+** returned and an error code and error message are stored in the
+** destination [database connection] D.
+** ^The error code and message for the failed call to sqlite3_backup_init()
+** can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or
+** [sqlite3_errmsg16()] functions.
+** ^A successful call to sqlite3_backup_init() returns a pointer to an
+** [sqlite3_backup] object.
+** ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and
+** sqlite3_backup_finish() functions to perform the specified backup 
+** operation.
+**
+** <b>sqlite3_backup_step()</b>
+**
+** ^Function sqlite3_backup_step(B,N) will copy up to N pages between 
+** the source and destination databases specified by [sqlite3_backup] object B.
+** ^If N is negative, all remaining source pages are copied. 
+** ^If sqlite3_backup_step(B,N) successfully copies N pages and there
+** are still more pages to be copied, then the function returns [SQLITE_OK].
+** ^If sqlite3_backup_step(B,N) successfully finishes copying all pages
+** from source to destination, then it returns [SQLITE_DONE].
+** ^If an error occurs while running sqlite3_backup_step(B,N),
+** then an [error code] is returned. ^As well as [SQLITE_OK] and
+** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY],
+** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an
+** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code.
+**
+** ^(The sqlite3_backup_step() might return [SQLITE_READONLY] if
+** <ol>
+** <li> the destination database was opened read-only, or
+** <li> the destination database is using write-ahead-log journaling
+** and the destination and source page sizes differ, or
+** <li> the destination database is an in-memory database and the
+** destination and source page sizes differ.
+** </ol>)^
+**
+** ^If sqlite3_backup_step() cannot obtain a required file-system lock, then
+** the [sqlite3_busy_handler | busy-handler function]
+** is invoked (if one is specified). ^If the 
+** busy-handler returns non-zero before the lock is available, then 
+** [SQLITE_BUSY] is returned to the caller. ^In this case the call to
+** sqlite3_backup_step() can be retried later. ^If the source
+** [database connection]
+** is being used to write to the source database when sqlite3_backup_step()
+** is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this
+** case the call to sqlite3_backup_step() can be retried later on. ^(If
+** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or
+** [SQLITE_READONLY] is returned, then 
+** there is no point in retrying the call to sqlite3_backup_step(). These 
+** errors are considered fatal.)^  The application must accept 
+** that the backup operation has failed and pass the backup operation handle 
+** to the sqlite3_backup_finish() to release associated resources.
+**
+** ^The first call to sqlite3_backup_step() obtains an exclusive lock
+** on the destination file. ^The exclusive lock is not released until either 
+** sqlite3_backup_finish() is called or the backup operation is complete 
+** and sqlite3_backup_step() returns [SQLITE_DONE].  ^Every call to
+** sqlite3_backup_step() obtains a [shared lock] on the source database that
+** lasts for the duration of the sqlite3_backup_step() call.
+** ^Because the source database is not locked between calls to
+** sqlite3_backup_step(), the source database may be modified mid-way
+** through the backup process.  ^If the source database is modified by an
+** external process or via a database connection other than the one being
+** used by the backup operation, then the backup will be automatically
+** restarted by the next call to sqlite3_backup_step(). ^If the source 
+** database is modified by the using the same database connection as is used
+** by the backup operation, then the backup database is automatically
+** updated at the same time.
+**
+** <b>sqlite3_backup_finish()</b>
+**
+** When sqlite3_backup_step() has returned [SQLITE_DONE], or when the 
+** application wishes to abandon the backup operation, the application
+** should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish().
+** ^The sqlite3_backup_finish() interfaces releases all
+** resources associated with the [sqlite3_backup] object. 
+** ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any
+** active write-transaction on the destination database is rolled back.
+** The [sqlite3_backup] object is invalid
+** and may not be used following a call to sqlite3_backup_finish().
+**
+** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no
+** sqlite3_backup_step() errors occurred, regardless or whether or not
+** sqlite3_backup_step() completed.
+** ^If an out-of-memory condition or IO error occurred during any prior
+** sqlite3_backup_step() call on the same [sqlite3_backup] object, then
+** sqlite3_backup_finish() returns the corresponding [error code].
+**
+** ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step()
+** is not a permanent error and does not affect the return value of
+** sqlite3_backup_finish().
+**
+** <b>sqlite3_backup_remaining(), sqlite3_backup_pagecount()</b>
+**
+** ^Each call to sqlite3_backup_step() sets two values inside
+** the [sqlite3_backup] object: the number of pages still to be backed
+** up and the total number of pages in the source database file.
+** The sqlite3_backup_remaining() and sqlite3_backup_pagecount() interfaces
+** retrieve these two values, respectively.
+**
+** ^The values returned by these functions are only updated by
+** sqlite3_backup_step(). ^If the source database is modified during a backup
+** operation, then the values are not updated to account for any extra
+** pages that need to be updated or the size of the source database file
+** changing.
+**
+** <b>Concurrent Usage of Database Handles</b>
+**
+** ^The source [database connection] may be used by the application for other
+** purposes while a backup operation is underway or being initialized.
+** ^If SQLite is compiled and configured to support threadsafe database
+** connections, then the source database connection may be used concurrently
+** from within other threads.
+**
+** However, the application must guarantee that the destination 
+** [database connection] is not passed to any other API (by any thread) after 
+** sqlite3_backup_init() is called and before the corresponding call to
+** sqlite3_backup_finish().  SQLite does not currently check to see
+** if the application incorrectly accesses the destination [database connection]
+** and so no error code is reported, but the operations may malfunction
+** nevertheless.  Use of the destination database connection while a
+** backup is in progress might also also cause a mutex deadlock.
+**
+** If running in [shared cache mode], the application must
+** guarantee that the shared cache used by the destination database
+** is not accessed while the backup is running. In practice this means
+** that the application must guarantee that the disk file being 
+** backed up to is not accessed by any connection within the process,
+** not just the specific connection that was passed to sqlite3_backup_init().
+**
+** The [sqlite3_backup] object itself is partially threadsafe. Multiple 
+** threads may safely make multiple concurrent calls to sqlite3_backup_step().
+** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
+** APIs are not strictly speaking threadsafe. If they are invoked at the
+** same time as another thread is invoking sqlite3_backup_step() it is
+** possible that they return invalid values.
+*/
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
+  sqlite3 *pDest,                        /* Destination database handle */
+  const char *zDestName,                 /* Destination database name */
+  sqlite3 *pSource,                      /* Source database handle */
+  const char *zSourceName                /* Source database name */
+);
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
+
+/*
+** CAPI3REF: Unlock Notification
+**
+** ^When running in shared-cache mode, a database operation may fail with
+** an [SQLITE_LOCKED] error if the required locks on the shared-cache or
+** individual tables within the shared-cache cannot be obtained. See
+** [SQLite Shared-Cache Mode] for a description of shared-cache locking. 
+** ^This API may be used to register a callback that SQLite will invoke 
+** when the connection currently holding the required lock relinquishes it.
+** ^This API is only available if the library was compiled with the
+** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined.
+**
+** See Also: [Using the SQLite Unlock Notification Feature].
+**
+** ^Shared-cache locks are released when a database connection concludes
+** its current transaction, either by committing it or rolling it back. 
+**
+** ^When a connection (known as the blocked connection) fails to obtain a
+** shared-cache lock and SQLITE_LOCKED is returned to the caller, the
+** identity of the database connection (the blocking connection) that
+** has locked the required resource is stored internally. ^After an 
+** application receives an SQLITE_LOCKED error, it may call the
+** sqlite3_unlock_notify() method with the blocked connection handle as 
+** the first argument to register for a callback that will be invoked
+** when the blocking connections current transaction is concluded. ^The
+** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
+** call that concludes the blocking connections transaction.
+**
+** ^(If sqlite3_unlock_notify() is called in a multi-threaded application,
+** there is a chance that the blocking connection will have already
+** concluded its transaction by the time sqlite3_unlock_notify() is invoked.
+** If this happens, then the specified callback is invoked immediately,
+** from within the call to sqlite3_unlock_notify().)^
+**
+** ^If the blocked connection is attempting to obtain a write-lock on a
+** shared-cache table, and more than one other connection currently holds
+** a read-lock on the same table, then SQLite arbitrarily selects one of 
+** the other connections to use as the blocking connection.
+**
+** ^(There may be at most one unlock-notify callback registered by a 
+** blocked connection. If sqlite3_unlock_notify() is called when the
+** blocked connection already has a registered unlock-notify callback,
+** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
+** called with a NULL pointer as its second argument, then any existing
+** unlock-notify callback is canceled. ^The blocked connections 
+** unlock-notify callback may also be canceled by closing the blocked
+** connection using [sqlite3_close()].
+**
+** The unlock-notify callback is not reentrant. If an application invokes
+** any sqlite3_xxx API functions from within an unlock-notify callback, a
+** crash or deadlock may be the result.
+**
+** ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always
+** returns SQLITE_OK.
+**
+** <b>Callback Invocation Details</b>
+**
+** When an unlock-notify callback is registered, the application provides a 
+** single void* pointer that is passed to the callback when it is invoked.
+** However, the signature of the callback function allows SQLite to pass
+** it an array of void* context pointers. The first argument passed to
+** an unlock-notify callback is a pointer to an array of void* pointers,
+** and the second is the number of entries in the array.
+**
+** When a blocking connections transaction is concluded, there may be
+** more than one blocked connection that has registered for an unlock-notify
+** callback. ^If two or more such blocked connections have specified the
+** same callback function, then instead of invoking the callback function
+** multiple times, it is invoked once with the set of void* context pointers
+** specified by the blocked connections bundled together into an array.
+** This gives the application an opportunity to prioritize any actions 
+** related to the set of unblocked database connections.
+**
+** <b>Deadlock Detection</b>
+**
+** Assuming that after registering for an unlock-notify callback a 
+** database waits for the callback to be issued before taking any further
+** action (a reasonable assumption), then using this API may cause the
+** application to deadlock. For example, if connection X is waiting for
+** connection Y's transaction to be concluded, and similarly connection
+** Y is waiting on connection X's transaction, then neither connection
+** will proceed and the system may remain deadlocked indefinitely.
+**
+** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock
+** detection. ^If a given call to sqlite3_unlock_notify() would put the
+** system in a deadlocked state, then SQLITE_LOCKED is returned and no
+** unlock-notify callback is registered. The system is said to be in
+** a deadlocked state if connection A has registered for an unlock-notify
+** callback on the conclusion of connection B's transaction, and connection
+** B has itself registered for an unlock-notify callback when connection
+** A's transaction is concluded. ^Indirect deadlock is also detected, so
+** the system is also considered to be deadlocked if connection B has
+** registered for an unlock-notify callback on the conclusion of connection
+** C's transaction, where connection C is waiting on connection A. ^Any
+** number of levels of indirection are allowed.
+**
+** <b>The "DROP TABLE" Exception</b>
+**
+** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost 
+** always appropriate to call sqlite3_unlock_notify(). There is however,
+** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement,
+** SQLite checks if there are any currently executing SELECT statements
+** that belong to the same connection. If there are, SQLITE_LOCKED is
+** returned. In this case there is no "blocking connection", so invoking
+** sqlite3_unlock_notify() results in the unlock-notify callback being
+** invoked immediately. If the application then re-attempts the "DROP TABLE"
+** or "DROP INDEX" query, an infinite loop might be the result.
+**
+** One way around this problem is to check the extended error code returned
+** by an sqlite3_step() call. ^(If there is a blocking connection, then the
+** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
+** the special "DROP TABLE/INDEX" case, the extended error code is just 
+** SQLITE_LOCKED.)^
+*/
+SQLITE_API int sqlite3_unlock_notify(
+  sqlite3 *pBlocked,                          /* Waiting connection */
+  void (*xNotify)(void **apArg, int nArg),    /* Callback function to invoke */
+  void *pNotifyArg                            /* Argument to pass to xNotify */
+);
+
+
+/*
+** CAPI3REF: String Comparison
+**
+** ^The [sqlite3_strnicmp()] API allows applications and extensions to
+** compare the contents of two buffers containing UTF-8 strings in a
+** case-independent fashion, using the same definition of case independence 
+** that SQLite uses internally when comparing identifiers.
+*/
+SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
+
+/*
+** CAPI3REF: Error Logging Interface
+**
+** ^The [sqlite3_log()] interface writes a message into the error log
+** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()].
+** ^If logging is enabled, the zFormat string and subsequent arguments are
+** used with [sqlite3_snprintf()] to generate the final output string.
+**
+** The sqlite3_log() interface is intended for use by extensions such as
+** virtual tables, collating functions, and SQL functions.  While there is
+** nothing to prevent an application from calling sqlite3_log(), doing so
+** is considered bad form.
+**
+** The zFormat string must not be NULL.
+**
+** To avoid deadlocks and other threading problems, the sqlite3_log() routine
+** will not use dynamically allocated memory.  The log message is stored in
+** a fixed-length buffer on the stack.  If the log message is longer than
+** a few hundred characters, it will be truncated to the length of the
+** buffer.
+*/
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
+
+/*
+** CAPI3REF: Write-Ahead Log Commit Hook
+**
+** ^The [sqlite3_wal_hook()] function is used to register a callback that
+** will be invoked each time a database connection commits data to a
+** [write-ahead log] (i.e. whenever a transaction is committed in
+** [journal_mode | journal_mode=WAL mode]). 
+**
+** ^The callback is invoked by SQLite after the commit has taken place and 
+** the associated write-lock on the database released, so the implementation 
+** may read, write or [checkpoint] the database as required.
+**
+** ^The first parameter passed to the callback function when it is invoked
+** is a copy of the third parameter passed to sqlite3_wal_hook() when
+** registering the callback. ^The second is a copy of the database handle.
+** ^The third parameter is the name of the database that was written to -
+** either "main" or the name of an [ATTACH]-ed database. ^The fourth parameter
+** is the number of pages currently in the write-ahead log file,
+** including those that were just committed.
+**
+** The callback function should normally return [SQLITE_OK].  ^If an error
+** code is returned, that error will propagate back up through the
+** SQLite code base to cause the statement that provoked the callback
+** to report an error, though the commit will have still occurred. If the
+** callback returns [SQLITE_ROW] or [SQLITE_DONE], or if it returns a value
+** that does not correspond to any valid SQLite error code, the results
+** are undefined.
+**
+** A single database handle may have at most a single write-ahead log callback 
+** registered at one time. ^Calling [sqlite3_wal_hook()] replaces any
+** previously registered write-ahead log callback. ^Note that the
+** [sqlite3_wal_autocheckpoint()] interface and the
+** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
+** those overwrite any prior [sqlite3_wal_hook()] settings.
+*/
+SQLITE_API void *sqlite3_wal_hook(
+  sqlite3*, 
+  int(*)(void *,sqlite3*,const char*,int),
+  void*
+);
+
+/*
+** CAPI3REF: Configure an auto-checkpoint
+**
+** ^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around
+** [sqlite3_wal_hook()] that causes any database on [database connection] D
+** to automatically [checkpoint]
+** after committing a transaction if there are N or
+** more frames in the [write-ahead log] file.  ^Passing zero or 
+** a negative value as the nFrame parameter disables automatic
+** checkpoints entirely.
+**
+** ^The callback registered by this function replaces any existing callback
+** registered using [sqlite3_wal_hook()].  ^Likewise, registering a callback
+** using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism
+** configured by this function.
+**
+** ^The [wal_autocheckpoint pragma] can be used to invoke this interface
+** from SQL.
+**
+** ^Every new [database connection] defaults to having the auto-checkpoint
+** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
+** pages.  The use of this interface
+** is only necessary if the default setting is found to be suboptimal
+** for a particular application.
+*/
+SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
+
+/*
+** CAPI3REF: Checkpoint a database
+**
+** ^The [sqlite3_wal_checkpoint(D,X)] interface causes database named X
+** on [database connection] D to be [checkpointed].  ^If X is NULL or an
+** empty string, then a checkpoint is run on all databases of
+** connection D.  ^If the database connection D is not in
+** [WAL | write-ahead log mode] then this interface is a harmless no-op.
+**
+** ^The [wal_checkpoint pragma] can be used to invoke this interface
+** from SQL.  ^The [sqlite3_wal_autocheckpoint()] interface and the
+** [wal_autocheckpoint pragma] can be used to cause this interface to be
+** run whenever the WAL reaches a certain size threshold.
+**
+** See also: [sqlite3_wal_checkpoint_v2()]
+*/
+SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
+
+/*
+** CAPI3REF: Checkpoint a database
+**
+** Run a checkpoint operation on WAL database zDb attached to database 
+** handle db. The specific operation is determined by the value of the 
+** eMode parameter:
+**
+** <dl>
+** <dt>SQLITE_CHECKPOINT_PASSIVE<dd>
+**   Checkpoint as many frames as possible without waiting for any database 
+**   readers or writers to finish. Sync the db file if all frames in the log
+**   are checkpointed. This mode is the same as calling 
+**   sqlite3_wal_checkpoint(). The busy-handler callback is never invoked.
+**
+** <dt>SQLITE_CHECKPOINT_FULL<dd>
+**   This mode blocks (calls the busy-handler callback) until there is no
+**   database writer and all readers are reading from the most recent database
+**   snapshot. It then checkpoints all frames in the log file and syncs the
+**   database file. This call blocks database writers while it is running,
+**   but not database readers.
+**
+** <dt>SQLITE_CHECKPOINT_RESTART<dd>
+**   This mode works the same way as SQLITE_CHECKPOINT_FULL, except after 
+**   checkpointing the log file it blocks (calls the busy-handler callback)
+**   until all readers are reading from the database file only. This ensures 
+**   that the next client to write to the database file restarts the log file 
+**   from the beginning. This call blocks database writers while it is running,
+**   but not database readers.
+** </dl>
+**
+** If pnLog is not NULL, then *pnLog is set to the total number of frames in
+** the log file before returning. If pnCkpt is not NULL, then *pnCkpt is set to
+** the total number of checkpointed frames (including any that were already
+** checkpointed when this function is called). *pnLog and *pnCkpt may be
+** populated even if sqlite3_wal_checkpoint_v2() returns other than SQLITE_OK.
+** If no values are available because of an error, they are both set to -1
+** before returning to communicate this to the caller.
+**
+** All calls obtain an exclusive "checkpoint" lock on the database file. If
+** any other process is running a checkpoint operation at the same time, the 
+** lock cannot be obtained and SQLITE_BUSY is returned. Even if there is a 
+** busy-handler configured, it will not be invoked in this case.
+**
+** The SQLITE_CHECKPOINT_FULL and RESTART modes also obtain the exclusive 
+** "writer" lock on the database file. If the writer lock cannot be obtained
+** immediately, and a busy-handler is configured, it is invoked and the writer
+** lock retried until either the busy-handler returns 0 or the lock is
+** successfully obtained. The busy-handler is also invoked while waiting for
+** database readers as described above. If the busy-handler returns 0 before
+** the writer lock is obtained or while waiting for database readers, the
+** checkpoint operation proceeds from that point in the same way as 
+** SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible 
+** without blocking any further. SQLITE_BUSY is returned in this case.
+**
+** If parameter zDb is NULL or points to a zero length string, then the
+** specified operation is attempted on all WAL databases. In this case the
+** values written to output parameters *pnLog and *pnCkpt are undefined. If 
+** an SQLITE_BUSY error is encountered when processing one or more of the 
+** attached WAL databases, the operation is still attempted on any remaining 
+** attached databases and SQLITE_BUSY is returned to the caller. If any other 
+** error occurs while processing an attached database, processing is abandoned 
+** and the error code returned to the caller immediately. If no error 
+** (SQLITE_BUSY or otherwise) is encountered while processing the attached 
+** databases, SQLITE_OK is returned.
+**
+** If database zDb is the name of an attached database that is not in WAL
+** mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. If
+** zDb is not NULL (or a zero length string) and is not the name of any
+** attached database, SQLITE_ERROR is returned to the caller.
+*/
+SQLITE_API int sqlite3_wal_checkpoint_v2(
+  sqlite3 *db,                    /* Database handle */
+  const char *zDb,                /* Name of attached database (or NULL) */
+  int eMode,                      /* SQLITE_CHECKPOINT_* value */
+  int *pnLog,                     /* OUT: Size of WAL log in frames */
+  int *pnCkpt                     /* OUT: Total number of frames checkpointed */
+);
+
+/*
+** CAPI3REF: Checkpoint operation parameters
+**
+** These constants can be used as the 3rd parameter to
+** [sqlite3_wal_checkpoint_v2()].  See the [sqlite3_wal_checkpoint_v2()]
+** documentation for additional information about the meaning and use of
+** each of these values.
+*/
+#define SQLITE_CHECKPOINT_PASSIVE 0
+#define SQLITE_CHECKPOINT_FULL    1
+#define SQLITE_CHECKPOINT_RESTART 2
+
+
+/*
+** Undo the hack that converts floating point types to integer for
+** builds on processors without floating point support.
+*/
+#ifdef SQLITE_OMIT_FLOATING_POINT
+# undef double
+#endif
+
+#if 0
+}  /* End of the 'extern "C"' block */
+#endif
+#endif
+
+/*
+** 2010 August 30
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+*/
+
+#ifndef _SQLITE3RTREE_H_
+#define _SQLITE3RTREE_H_
+
+
+#if 0
+extern "C" {
+#endif
+
+typedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry;
+
+/*
+** Register a geometry callback named zGeom that can be used as part of an
+** R-Tree geometry query as follows:
+**
+**   SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
+*/
+SQLITE_API int sqlite3_rtree_geometry_callback(
+  sqlite3 *db,
+  const char *zGeom,
+  int (*xGeom)(sqlite3_rtree_geometry *, int nCoord, double *aCoord, int *pRes),
+  void *pContext
+);
+
+
+/*
+** A pointer to a structure of the following type is passed as the first
+** argument to callbacks registered using rtree_geometry_callback().
+*/
+struct sqlite3_rtree_geometry {
+  void *pContext;                 /* Copy of pContext passed to s_r_g_c() */
+  int nParam;                     /* Size of array aParam[] */
+  double *aParam;                 /* Parameters passed to SQL geom function */
+  void *pUser;                    /* Callback implementation user data */
+  void (*xDelUser)(void *);       /* Called by SQLite to clean up pUser */
+};
+
+
+#if 0
+}  /* end of the 'extern "C"' block */
+#endif
+
+#endif  /* ifndef _SQLITE3RTREE_H_ */
+
+
+/************** End of sqlite3.h *********************************************/
+/************** Continuing where we left off in sqliteInt.h ******************/
+/************** Include hash.h in the middle of sqliteInt.h ******************/
+/************** Begin file hash.h ********************************************/
+/*
+** 2001 September 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This is the header file for the generic hash-table implemenation
+** used in SQLite.
+*/
+#ifndef _SQLITE_HASH_H_
+#define _SQLITE_HASH_H_
+
+/* Forward declarations of structures. */
+typedef struct Hash Hash;
+typedef struct HashElem HashElem;
+
+/* A complete hash table is an instance of the following structure.
+** The internals of this structure are intended to be opaque -- client
+** code should not attempt to access or modify the fields of this structure
+** directly.  Change this structure only by using the routines below.
+** However, some of the "procedures" and "functions" for modifying and
+** accessing this structure are really macros, so we can't really make
+** this structure opaque.
+**
+** All elements of the hash table are on a single doubly-linked list.
+** Hash.first points to the head of this list.
+**
+** There are Hash.htsize buckets.  Each bucket points to a spot in
+** the global doubly-linked list.  The contents of the bucket are the
+** element pointed to plus the next _ht.count-1 elements in the list.
+**
+** Hash.htsize and Hash.ht may be zero.  In that case lookup is done
+** by a linear search of the global list.  For small tables, the 
+** Hash.ht table is never allocated because if there are few elements
+** in the table, it is faster to do a linear search than to manage
+** the hash table.
+*/
+struct Hash {
+  unsigned int htsize;      /* Number of buckets in the hash table */
+  unsigned int count;       /* Number of entries in this table */
+  HashElem *first;          /* The first element of the array */
+  struct _ht {              /* the hash table */
+    int count;                 /* Number of entries with this hash */
+    HashElem *chain;           /* Pointer to first entry with this hash */
+  } *ht;
+};
+
+/* Each element in the hash table is an instance of the following 
+** structure.  All elements are stored on a single doubly-linked list.
+**
+** Again, this structure is intended to be opaque, but it can't really
+** be opaque because it is used by macros.
+*/
+struct HashElem {
+  HashElem *next, *prev;       /* Next and previous elements in the table */
+  void *data;                  /* Data associated with this element */
+  const char *pKey; int nKey;  /* Key associated with this element */
+};
+
+/*
+** Access routines.  To delete, insert a NULL pointer.
+*/
+SQLITE_PRIVATE void sqlite3HashInit(Hash*);
+SQLITE_PRIVATE void *sqlite3HashInsert(Hash*, const char *pKey, int nKey, void *pData);
+SQLITE_PRIVATE void *sqlite3HashFind(const Hash*, const char *pKey, int nKey);
+SQLITE_PRIVATE void sqlite3HashClear(Hash*);
+
+/*
+** Macros for looping over all elements of a hash table.  The idiom is
+** like this:
+**
+**   Hash h;
+**   HashElem *p;
+**   ...
+**   for(p=sqliteHashFirst(&h); p; p=sqliteHashNext(p)){
+**     SomeStructure *pData = sqliteHashData(p);
+**     // do something with pData
+**   }
+*/
+#define sqliteHashFirst(H)  ((H)->first)
+#define sqliteHashNext(E)   ((E)->next)
+#define sqliteHashData(E)   ((E)->data)
+/* #define sqliteHashKey(E)    ((E)->pKey) // NOT USED */
+/* #define sqliteHashKeysize(E) ((E)->nKey)  // NOT USED */
+
+/*
+** Number of entries in a hash table
+*/
+/* #define sqliteHashCount(H)  ((H)->count) // NOT USED */
+
+#endif /* _SQLITE_HASH_H_ */
+
+/************** End of hash.h ************************************************/
+/************** Continuing where we left off in sqliteInt.h ******************/
+/************** Include parse.h in the middle of sqliteInt.h *****************/
+/************** Begin file parse.h *******************************************/
+#define TK_SEMI                            1
+#define TK_EXPLAIN                         2
+#define TK_QUERY                           3
+#define TK_PLAN                            4
+#define TK_BEGIN                           5
+#define TK_TRANSACTION                     6
+#define TK_DEFERRED                        7
+#define TK_IMMEDIATE                       8
+#define TK_EXCLUSIVE                       9
+#define TK_COMMIT                         10
+#define TK_END                            11
+#define TK_ROLLBACK                       12
+#define TK_SAVEPOINT                      13
+#define TK_RELEASE                        14
+#define TK_TO                             15
+#define TK_TABLE                          16
+#define TK_CREATE                         17
+#define TK_IF                             18
+#define TK_NOT                            19
+#define TK_EXISTS                         20
+#define TK_TEMP                           21
+#define TK_LP                             22
+#define TK_RP                             23
+#define TK_AS                             24
+#define TK_COMMA                          25
+#define TK_ID                             26
+#define TK_INDEXED                        27
+#define TK_ABORT                          28
+#define TK_ACTION                         29
+#define TK_AFTER                          30
+#define TK_ANALYZE                        31
+#define TK_ASC                            32
+#define TK_ATTACH                         33
+#define TK_BEFORE                         34
+#define TK_BY                             35
+#define TK_CASCADE                        36
+#define TK_CAST                           37
+#define TK_COLUMNKW                       38
+#define TK_CONFLICT                       39
+#define TK_DATABASE                       40
+#define TK_DESC                           41
+#define TK_DETACH                         42
+#define TK_EACH                           43
+#define TK_FAIL                           44
+#define TK_FOR                            45
+#define TK_IGNORE                         46
+#define TK_INITIALLY                      47
+#define TK_INSTEAD                        48
+#define TK_LIKE_KW                        49
+#define TK_MATCH                          50
+#define TK_NO                             51
+#define TK_KEY                            52
+#define TK_OF                             53
+#define TK_OFFSET                         54
+#define TK_PRAGMA                         55
+#define TK_RAISE                          56
+#define TK_REPLACE                        57
+#define TK_RESTRICT                       58
+#define TK_ROW                            59
+#define TK_TRIGGER                        60
+#define TK_VACUUM                         61
+#define TK_VIEW                           62
+#define TK_VIRTUAL                        63
+#define TK_REINDEX                        64
+#define TK_RENAME                         65
+#define TK_CTIME_KW                       66
+#define TK_ANY                            67
+#define TK_OR                             68
+#define TK_AND                            69
+#define TK_IS                             70
+#define TK_BETWEEN                        71
+#define TK_IN                             72
+#define TK_ISNULL                         73
+#define TK_NOTNULL                        74
+#define TK_NE                             75
+#define TK_EQ                             76
+#define TK_GT                             77
+#define TK_LE                             78
+#define TK_LT                             79
+#define TK_GE                             80
+#define TK_ESCAPE                         81
+#define TK_BITAND                         82
+#define TK_BITOR                          83
+#define TK_LSHIFT                         84
+#define TK_RSHIFT                         85
+#define TK_PLUS                           86
+#define TK_MINUS                          87
+#define TK_STAR                           88
+#define TK_SLASH                          89
+#define TK_REM                            90
+#define TK_CONCAT                         91
+#define TK_COLLATE                        92
+#define TK_BITNOT                         93
+#define TK_STRING                         94
+#define TK_JOIN_KW                        95
+#define TK_CONSTRAINT                     96
+#define TK_DEFAULT                        97
+#define TK_NULL                           98
+#define TK_PRIMARY                        99
+#define TK_UNIQUE                         100
+#define TK_CHECK                          101
+#define TK_REFERENCES                     102
+#define TK_AUTOINCR                       103
+#define TK_ON                             104
+#define TK_INSERT                         105
+#define TK_DELETE                         106
+#define TK_UPDATE                         107
+#define TK_SET                            108
+#define TK_DEFERRABLE                     109
+#define TK_FOREIGN                        110
+#define TK_DROP                           111
+#define TK_UNION                          112
+#define TK_ALL                            113
+#define TK_EXCEPT                         114
+#define TK_INTERSECT                      115
+#define TK_SELECT                         116
+#define TK_DISTINCT                       117
+#define TK_DOT                            118
+#define TK_FROM                           119
+#define TK_JOIN                           120
+#define TK_USING                          121
+#define TK_ORDER                          122
+#define TK_GROUP                          123
+#define TK_HAVING                         124
+#define TK_LIMIT                          125
+#define TK_WHERE                          126
+#define TK_INTO                           127
+#define TK_VALUES                         128
+#define TK_INTEGER                        129
+#define TK_FLOAT                          130
+#define TK_BLOB                           131
+#define TK_REGISTER                       132
+#define TK_VARIABLE                       133
+#define TK_CASE                           134
+#define TK_WHEN                           135
+#define TK_THEN                           136
+#define TK_ELSE                           137
+#define TK_INDEX                          138
+#define TK_ALTER                          139
+#define TK_ADD                            140
+#define TK_TO_TEXT                        141
+#define TK_TO_BLOB                        142
+#define TK_TO_NUMERIC                     143
+#define TK_TO_INT                         144
+#define TK_TO_REAL                        145
+#define TK_ISNOT                          146
+#define TK_END_OF_FILE                    147
+#define TK_ILLEGAL                        148
+#define TK_SPACE                          149
+#define TK_UNCLOSED_STRING                150
+#define TK_FUNCTION                       151
+#define TK_COLUMN                         152
+#define TK_AGG_FUNCTION                   153
+#define TK_AGG_COLUMN                     154
+#define TK_CONST_FUNC                     155
+#define TK_UMINUS                         156
+#define TK_UPLUS                          157
+
+/************** End of parse.h ***********************************************/
+/************** Continuing where we left off in sqliteInt.h ******************/
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include <stddef.h>
+
+/*
+** If compiling for a processor that lacks floating point support,
+** substitute integer for floating-point
+*/
+#ifdef SQLITE_OMIT_FLOATING_POINT
+# define double sqlite_int64
+# define float sqlite_int64
+# define LONGDOUBLE_TYPE sqlite_int64
+# ifndef SQLITE_BIG_DBL
+#   define SQLITE_BIG_DBL (((sqlite3_int64)1)<<50)
+# endif
+# define SQLITE_OMIT_DATETIME_FUNCS 1
+# define SQLITE_OMIT_TRACE 1
+# undef SQLITE_MIXED_ENDIAN_64BIT_FLOAT
+# undef SQLITE_HAVE_ISNAN
+#endif
+#ifndef SQLITE_BIG_DBL
+# define SQLITE_BIG_DBL (1e99)
+#endif
+
+/*
+** OMIT_TEMPDB is set to 1 if SQLITE_OMIT_TEMPDB is defined, or 0
+** afterward. Having this macro allows us to cause the C compiler 
+** to omit code used by TEMP tables without messy #ifndef statements.
+*/
+#ifdef SQLITE_OMIT_TEMPDB
+#define OMIT_TEMPDB 1
+#else
+#define OMIT_TEMPDB 0
+#endif
+
+/*
+** The "file format" number is an integer that is incremented whenever
+** the VDBE-level file format changes.  The following macros define the
+** the default file format for new databases and the maximum file format
+** that the library can read.
+*/
+#define SQLITE_MAX_FILE_FORMAT 4
+#ifndef SQLITE_DEFAULT_FILE_FORMAT
+# define SQLITE_DEFAULT_FILE_FORMAT 1
+#endif
+
+/*
+** Determine whether triggers are recursive by default.  This can be
+** changed at run-time using a pragma.
+*/
+#ifndef SQLITE_DEFAULT_RECURSIVE_TRIGGERS
+# define SQLITE_DEFAULT_RECURSIVE_TRIGGERS 0
+#endif
+
+/*
+** Provide a default value for SQLITE_TEMP_STORE in case it is not specified
+** on the command-line
+*/
+#ifndef SQLITE_TEMP_STORE
+# define SQLITE_TEMP_STORE 1
+#endif
+
+/*
+** GCC does not define the offsetof() macro so we'll have to do it
+** ourselves.
+*/
+#ifndef offsetof
+#define offsetof(STRUCTURE,FIELD) ((int)((char*)&((STRUCTURE*)0)->FIELD))
+#endif
+
+/*
+** Check to see if this machine uses EBCDIC.  (Yes, believe it or
+** not, there are still machines out there that use EBCDIC.)
+*/
+#if 'A' == '\301'
+# define SQLITE_EBCDIC 1
+#else
+# define SQLITE_ASCII 1
+#endif
+
+/*
+** Integers of known sizes.  These typedefs might change for architectures
+** where the sizes very.  Preprocessor macros are available so that the
+** types can be conveniently redefined at compile-type.  Like this:
+**
+**         cc '-DUINTPTR_TYPE=long long int' ...
+*/
+#ifndef UINT32_TYPE
+# ifdef HAVE_UINT32_T
+#  define UINT32_TYPE uint32_t
+# else
+#  define UINT32_TYPE unsigned int
+# endif
+#endif
+#ifndef UINT16_TYPE
+# ifdef HAVE_UINT16_T
+#  define UINT16_TYPE uint16_t
+# else
+#  define UINT16_TYPE unsigned short int
+# endif
+#endif
+#ifndef INT16_TYPE
+# ifdef HAVE_INT16_T
+#  define INT16_TYPE int16_t
+# else
+#  define INT16_TYPE short int
+# endif
+#endif
+#ifndef UINT8_TYPE
+# ifdef HAVE_UINT8_T
+#  define UINT8_TYPE uint8_t
+# else
+#  define UINT8_TYPE unsigned char
+# endif
+#endif
+#ifndef INT8_TYPE
+# ifdef HAVE_INT8_T
+#  define INT8_TYPE int8_t
+# else
+#  define INT8_TYPE signed char
+# endif
+#endif
+#ifndef LONGDOUBLE_TYPE
+# define LONGDOUBLE_TYPE long double
+#endif
+typedef sqlite_int64 i64;          /* 8-byte signed integer */
+typedef sqlite_uint64 u64;         /* 8-byte unsigned integer */
+typedef UINT32_TYPE u32;           /* 4-byte unsigned integer */
+typedef UINT16_TYPE u16;           /* 2-byte unsigned integer */
+typedef INT16_TYPE i16;            /* 2-byte signed integer */
+typedef UINT8_TYPE u8;             /* 1-byte unsigned integer */
+typedef INT8_TYPE i8;              /* 1-byte signed integer */
+
+/*
+** SQLITE_MAX_U32 is a u64 constant that is the maximum u64 value
+** that can be stored in a u32 without loss of data.  The value
+** is 0x00000000ffffffff.  But because of quirks of some compilers, we
+** have to specify the value in the less intuitive manner shown:
+*/
+#define SQLITE_MAX_U32  ((((u64)1)<<32)-1)
+
+/*
+** Macros to determine whether the machine is big or little endian,
+** evaluated at runtime.
+*/
+#ifdef SQLITE_AMALGAMATION
+SQLITE_PRIVATE const int sqlite3one = 1;
+#else
+SQLITE_PRIVATE const int sqlite3one;
+#endif
+#if defined(i386) || defined(__i386__) || defined(_M_IX86)\
+                             || defined(__x86_64) || defined(__x86_64__)
+# define SQLITE_BIGENDIAN    0
+# define SQLITE_LITTLEENDIAN 1
+# define SQLITE_UTF16NATIVE  SQLITE_UTF16LE
+#else
+# define SQLITE_BIGENDIAN    (*(char *)(&sqlite3one)==0)
+# define SQLITE_LITTLEENDIAN (*(char *)(&sqlite3one)==1)
+# define SQLITE_UTF16NATIVE (SQLITE_BIGENDIAN?SQLITE_UTF16BE:SQLITE_UTF16LE)
+#endif
+
+/*
+** Constants for the largest and smallest possible 64-bit signed integers.
+** These macros are designed to work correctly on both 32-bit and 64-bit
+** compilers.
+*/
+#define LARGEST_INT64  (0xffffffff|(((i64)0x7fffffff)<<32))
+#define SMALLEST_INT64 (((i64)-1) - LARGEST_INT64)
+
+/* 
+** Round up a number to the next larger multiple of 8.  This is used
+** to force 8-byte alignment on 64-bit architectures.
+*/
+#define ROUND8(x)     (((x)+7)&~7)
+
+/*
+** Round down to the nearest multiple of 8
+*/
+#define ROUNDDOWN8(x) ((x)&~7)
+
+/*
+** Assert that the pointer X is aligned to an 8-byte boundary.  This
+** macro is used only within assert() to verify that the code gets
+** all alignment restrictions correct.
+**
+** Except, if SQLITE_4_BYTE_ALIGNED_MALLOC is defined, then the
+** underlying malloc() implemention might return us 4-byte aligned
+** pointers.  In that case, only verify 4-byte alignment.
+*/
+#ifdef SQLITE_4_BYTE_ALIGNED_MALLOC
+# define EIGHT_BYTE_ALIGNMENT(X)   ((((char*)(X) - (char*)0)&3)==0)
+#else
+# define EIGHT_BYTE_ALIGNMENT(X)   ((((char*)(X) - (char*)0)&7)==0)
+#endif
+
+
+/*
+** An instance of the following structure is used to store the busy-handler
+** callback for a given sqlite handle. 
+**
+** The sqlite.busyHandler member of the sqlite struct contains the busy
+** callback for the database handle. Each pager opened via the sqlite
+** handle is passed a pointer to sqlite.busyHandler. The busy-handler
+** callback is currently invoked only from within pager.c.
+*/
+typedef struct BusyHandler BusyHandler;
+struct BusyHandler {
+  int (*xFunc)(void *,int);  /* The busy callback */
+  void *pArg;                /* First arg to busy callback */
+  int nBusy;                 /* Incremented with each busy call */
+};
+
+/*
+** Name of the master database table.  The master database table
+** is a special table that holds the names and attributes of all
+** user tables and indices.
+*/
+#define MASTER_NAME       "sqlite_master"
+#define TEMP_MASTER_NAME  "sqlite_temp_master"
+
+/*
+** The root-page of the master database table.
+*/
+#define MASTER_ROOT       1
+
+/*
+** The name of the schema table.
+*/
+#define SCHEMA_TABLE(x)  ((!OMIT_TEMPDB)&&(x==1)?TEMP_MASTER_NAME:MASTER_NAME)
+
+/*
+** A convenience macro that returns the number of elements in
+** an array.
+*/
+#define ArraySize(X)    ((int)(sizeof(X)/sizeof(X[0])))
+
+/*
+** The following value as a destructor means to use sqlite3DbFree().
+** This is an internal extension to SQLITE_STATIC and SQLITE_TRANSIENT.
+*/
+#define SQLITE_DYNAMIC   ((sqlite3_destructor_type)sqlite3DbFree)
+
+/*
+** When SQLITE_OMIT_WSD is defined, it means that the target platform does
+** not support Writable Static Data (WSD) such as global and static variables.
+** All variables must either be on the stack or dynamically allocated from
+** the heap.  When WSD is unsupported, the variable declarations scattered
+** throughout the SQLite code must become constants instead.  The SQLITE_WSD
+** macro is used for this purpose.  And instead of referencing the variable
+** directly, we use its constant as a key to lookup the run-time allocated
+** buffer that holds real variable.  The constant is also the initializer
+** for the run-time allocated buffer.
+**
+** In the usual case where WSD is supported, the SQLITE_WSD and GLOBAL
+** macros become no-ops and have zero performance impact.
+*/
+#ifdef SQLITE_OMIT_WSD
+  #define SQLITE_WSD const
+  #define GLOBAL(t,v) (*(t*)sqlite3_wsd_find((void*)&(v), sizeof(v)))
+  #define sqlite3GlobalConfig GLOBAL(struct Sqlite3Config, sqlite3Config)
+SQLITE_API   int sqlite3_wsd_init(int N, int J);
+SQLITE_API   void *sqlite3_wsd_find(void *K, int L);
+#else
+  #define SQLITE_WSD 
+  #define GLOBAL(t,v) v
+  #define sqlite3GlobalConfig sqlite3Config
+#endif
+
+/*
+** The following macros are used to suppress compiler warnings and to
+** make it clear to human readers when a function parameter is deliberately 
+** left unused within the body of a function. This usually happens when
+** a function is called via a function pointer. For example the 
+** implementation of an SQL aggregate step callback may not use the
+** parameter indicating the number of arguments passed to the aggregate,
+** if it knows that this is enforced elsewhere.
+**
+** When a function parameter is not used at all within the body of a function,
+** it is generally named "NotUsed" or "NotUsed2" to make things even clearer.
+** However, these macros may also be used to suppress warnings related to
+** parameters that may or may not be used depending on compilation options.
+** For example those parameters only used in assert() statements. In these
+** cases the parameters are named as per the usual conventions.
+*/
+#define UNUSED_PARAMETER(x) (void)(x)
+#define UNUSED_PARAMETER2(x,y) UNUSED_PARAMETER(x),UNUSED_PARAMETER(y)
+
+/*
+** Forward references to structures
+*/
+typedef struct AggInfo AggInfo;
+typedef struct AuthContext AuthContext;
+typedef struct AutoincInfo AutoincInfo;
+typedef struct Bitvec Bitvec;
+typedef struct CollSeq CollSeq;
+typedef struct Column Column;
+typedef struct Db Db;
+typedef struct Schema Schema;
+typedef struct Expr Expr;
+typedef struct ExprList ExprList;
+typedef struct ExprSpan ExprSpan;
+typedef struct FKey FKey;
+typedef struct FuncDestructor FuncDestructor;
+typedef struct FuncDef FuncDef;
+typedef struct FuncDefHash FuncDefHash;
+typedef struct IdList IdList;
+typedef struct Index Index;
+typedef struct IndexSample IndexSample;
+typedef struct KeyClass KeyClass;
+typedef struct KeyInfo KeyInfo;
+typedef struct Lookaside Lookaside;
+typedef struct LookasideSlot LookasideSlot;
+typedef struct Module Module;
+typedef struct NameContext NameContext;
+typedef struct Parse Parse;
+typedef struct RowSet RowSet;
+typedef struct Savepoint Savepoint;
+typedef struct Select Select;
+typedef struct SrcList SrcList;
+typedef struct StrAccum StrAccum;
+typedef struct Table Table;
+typedef struct TableLock TableLock;
+typedef struct Token Token;
+typedef struct Trigger Trigger;
+typedef struct TriggerPrg TriggerPrg;
+typedef struct TriggerStep TriggerStep;
+typedef struct UnpackedRecord UnpackedRecord;
+typedef struct VTable VTable;
+typedef struct Walker Walker;
+typedef struct WherePlan WherePlan;
+typedef struct WhereInfo WhereInfo;
+typedef struct WhereLevel WhereLevel;
+
+/*
+** Defer sourcing vdbe.h and btree.h until after the "u8" and 
+** "BusyHandler" typedefs. vdbe.h also requires a few of the opaque
+** pointer types (i.e. FuncDef) defined above.
+*/
+/************** Include btree.h in the middle of sqliteInt.h *****************/
+/************** Begin file btree.h *******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This header file defines the interface that the sqlite B-Tree file
+** subsystem.  See comments in the source code for a detailed description
+** of what each interface routine does.
+*/
+#ifndef _BTREE_H_
+#define _BTREE_H_
+
+/* TODO: This definition is just included so other modules compile. It
+** needs to be revisited.
+*/
+#define SQLITE_N_BTREE_META 10
+
+/*
+** If defined as non-zero, auto-vacuum is enabled by default. Otherwise
+** it must be turned on for each database using "PRAGMA auto_vacuum = 1".
+*/
+#ifndef SQLITE_DEFAULT_AUTOVACUUM
+  #define SQLITE_DEFAULT_AUTOVACUUM 0
+#endif
+
+#define BTREE_AUTOVACUUM_NONE 0        /* Do not do auto-vacuum */
+#define BTREE_AUTOVACUUM_FULL 1        /* Do full auto-vacuum */
+#define BTREE_AUTOVACUUM_INCR 2        /* Incremental vacuum */
+
+/*
+** Forward declarations of structure
+*/
+typedef struct Btree Btree;
+typedef struct BtCursor BtCursor;
+typedef struct BtShared BtShared;
+
+
+SQLITE_PRIVATE int sqlite3BtreeOpen(
+  const char *zFilename,   /* Name of database file to open */
+  sqlite3 *db,             /* Associated database connection */
+  Btree **ppBtree,         /* Return open Btree* here */
+  int flags,               /* Flags */
+  int vfsFlags             /* Flags passed through to VFS open */
+);
+
+/* The flags parameter to sqlite3BtreeOpen can be the bitwise or of the
+** following values.
+**
+** NOTE:  These values must match the corresponding PAGER_ values in
+** pager.h.
+*/
+#define BTREE_OMIT_JOURNAL  1  /* Do not create or use a rollback journal */
+#define BTREE_NO_READLOCK   2  /* Omit readlocks on readonly files */
+#define BTREE_MEMORY        4  /* This is an in-memory DB */
+#define BTREE_SINGLE        8  /* The file contains at most 1 b-tree */
+#define BTREE_UNORDERED    16  /* Use of a hash implementation is OK */
+
+SQLITE_PRIVATE int sqlite3BtreeClose(Btree*);
+SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree*,int);
+SQLITE_PRIVATE int sqlite3BtreeSetSafetyLevel(Btree*,int,int,int);
+SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree*);
+SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int nPagesize, int nReserve, int eFix);
+SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree*);
+SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree*,int);
+SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree*);
+SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree*,int);
+SQLITE_PRIVATE int sqlite3BtreeGetReserve(Btree*);
+SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *, int);
+SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *);
+SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree*,int);
+SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree*, const char *zMaster);
+SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree*, int);
+SQLITE_PRIVATE int sqlite3BtreeCommit(Btree*);
+SQLITE_PRIVATE int sqlite3BtreeRollback(Btree*);
+SQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree*,int);
+SQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree*, int*, int flags);
+SQLITE_PRIVATE int sqlite3BtreeIsInTrans(Btree*);
+SQLITE_PRIVATE int sqlite3BtreeIsInReadTrans(Btree*);
+SQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree*);
+SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *, int, void(*)(void *));
+SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *pBtree);
+SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *pBtree, int iTab, u8 isWriteLock);
+SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *, int, int);
+
+SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *);
+SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *);
+SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *, Btree *);
+
+SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *);
+
+/* The flags parameter to sqlite3BtreeCreateTable can be the bitwise OR
+** of the flags shown below.
+**
+** Every SQLite table must have either BTREE_INTKEY or BTREE_BLOBKEY set.
+** With BTREE_INTKEY, the table key is a 64-bit integer and arbitrary data
+** is stored in the leaves.  (BTREE_INTKEY is used for SQL tables.)  With
+** BTREE_BLOBKEY, the key is an arbitrary BLOB and no content is stored
+** anywhere - the key is the content.  (BTREE_BLOBKEY is used for SQL
+** indices.)
+*/
+#define BTREE_INTKEY     1    /* Table has only 64-bit signed integer keys */
+#define BTREE_BLOBKEY    2    /* Table has keys only - no data */
+
+SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree*, int, int*);
+SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree*, int, int*);
+SQLITE_PRIVATE void sqlite3BtreeTripAllCursors(Btree*, int);
+
+SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *pBtree, int idx, u32 *pValue);
+SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree*, int idx, u32 value);
+
+/*
+** The second parameter to sqlite3BtreeGetMeta or sqlite3BtreeUpdateMeta
+** should be one of the following values. The integer values are assigned 
+** to constants so that the offset of the corresponding field in an
+** SQLite database header may be found using the following formula:
+**
+**   offset = 36 + (idx * 4)
+**
+** For example, the free-page-count field is located at byte offset 36 of
+** the database file header. The incr-vacuum-flag field is located at
+** byte offset 64 (== 36+4*7).
+*/
+#define BTREE_FREE_PAGE_COUNT     0
+#define BTREE_SCHEMA_VERSION      1
+#define BTREE_FILE_FORMAT         2
+#define BTREE_DEFAULT_CACHE_SIZE  3
+#define BTREE_LARGEST_ROOT_PAGE   4
+#define BTREE_TEXT_ENCODING       5
+#define BTREE_USER_VERSION        6
+#define BTREE_INCR_VACUUM         7
+
+SQLITE_PRIVATE int sqlite3BtreeCursor(
+  Btree*,                              /* BTree containing table to open */
+  int iTable,                          /* Index of root page */
+  int wrFlag,                          /* 1 for writing.  0 for read-only */
+  struct KeyInfo*,                     /* First argument to compare function */
+  BtCursor *pCursor                    /* Space to write cursor structure */
+);
+SQLITE_PRIVATE int sqlite3BtreeCursorSize(void);
+SQLITE_PRIVATE void sqlite3BtreeCursorZero(BtCursor*);
+
+SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor*);
+SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
+  BtCursor*,
+  UnpackedRecord *pUnKey,
+  i64 intKey,
+  int bias,
+  int *pRes
+);
+SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor*, int*);
+SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor*);
+SQLITE_PRIVATE int sqlite3BtreeInsert(BtCursor*, const void *pKey, i64 nKey,
+                                  const void *pData, int nData,
+                                  int nZero, int bias, int seekResult);
+SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor*, int *pRes);
+SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor*, int *pRes);
+SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor*, int *pRes);
+SQLITE_PRIVATE int sqlite3BtreeEof(BtCursor*);
+SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor*, int *pRes);
+SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor*, i64 *pSize);
+SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor*, u32 offset, u32 amt, void*);
+SQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor*, int *pAmt);
+SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor*, int *pAmt);
+SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor*, u32 *pSize);
+SQLITE_PRIVATE int sqlite3BtreeData(BtCursor*, u32 offset, u32 amt, void*);
+SQLITE_PRIVATE void sqlite3BtreeSetCachedRowid(BtCursor*, sqlite3_int64);
+SQLITE_PRIVATE sqlite3_int64 sqlite3BtreeGetCachedRowid(BtCursor*);
+
+SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(Btree*, int *aRoot, int nRoot, int, int*);
+SQLITE_PRIVATE struct Pager *sqlite3BtreePager(Btree*);
+
+SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor*, u32 offset, u32 amt, void*);
+SQLITE_PRIVATE void sqlite3BtreeCacheOverflow(BtCursor *);
+SQLITE_PRIVATE void sqlite3BtreeClearCursor(BtCursor *);
+
+SQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBt, int iVersion);
+
+#ifndef NDEBUG
+SQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor*);
+#endif
+
+#ifndef SQLITE_OMIT_BTREECOUNT
+SQLITE_PRIVATE int sqlite3BtreeCount(BtCursor *, i64 *);
+#endif
+
+#ifdef SQLITE_TEST
+SQLITE_PRIVATE int sqlite3BtreeCursorInfo(BtCursor*, int*, int);
+SQLITE_PRIVATE void sqlite3BtreeCursorList(Btree*);
+#endif
+
+#ifndef SQLITE_OMIT_WAL
+SQLITE_PRIVATE   int sqlite3BtreeCheckpoint(Btree*, int, int *, int *);
+#endif
+
+/*
+** If we are not using shared cache, then there is no need to
+** use mutexes to access the BtShared structures.  So make the
+** Enter and Leave procedures no-ops.
+*/
+#ifndef SQLITE_OMIT_SHARED_CACHE
+SQLITE_PRIVATE   void sqlite3BtreeEnter(Btree*);
+SQLITE_PRIVATE   void sqlite3BtreeEnterAll(sqlite3*);
+#else
+# define sqlite3BtreeEnter(X) 
+# define sqlite3BtreeEnterAll(X)
+#endif
+
+#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE
+SQLITE_PRIVATE   int sqlite3BtreeSharable(Btree*);
+SQLITE_PRIVATE   void sqlite3BtreeLeave(Btree*);
+SQLITE_PRIVATE   void sqlite3BtreeEnterCursor(BtCursor*);
+SQLITE_PRIVATE   void sqlite3BtreeLeaveCursor(BtCursor*);
+SQLITE_PRIVATE   void sqlite3BtreeLeaveAll(sqlite3*);
+#ifndef NDEBUG
+  /* These routines are used inside assert() statements only. */
+SQLITE_PRIVATE   int sqlite3BtreeHoldsMutex(Btree*);
+SQLITE_PRIVATE   int sqlite3BtreeHoldsAllMutexes(sqlite3*);
+SQLITE_PRIVATE   int sqlite3SchemaMutexHeld(sqlite3*,int,Schema*);
+#endif
+#else
+
+# define sqlite3BtreeSharable(X) 0
+# define sqlite3BtreeLeave(X)
+# define sqlite3BtreeEnterCursor(X)
+# define sqlite3BtreeLeaveCursor(X)
+# define sqlite3BtreeLeaveAll(X)
+
+# define sqlite3BtreeHoldsMutex(X) 1
+# define sqlite3BtreeHoldsAllMutexes(X) 1
+# define sqlite3SchemaMutexHeld(X,Y,Z) 1
+#endif
+
+
+#endif /* _BTREE_H_ */
+
+/************** End of btree.h ***********************************************/
+/************** Continuing where we left off in sqliteInt.h ******************/
+/************** Include vdbe.h in the middle of sqliteInt.h ******************/
+/************** Begin file vdbe.h ********************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** Header file for the Virtual DataBase Engine (VDBE)
+**
+** This header defines the interface to the virtual database engine
+** or VDBE.  The VDBE implements an abstract machine that runs a
+** simple program to access and modify the underlying database.
+*/
+#ifndef _SQLITE_VDBE_H_
+#define _SQLITE_VDBE_H_
+
+/*
+** A single VDBE is an opaque structure named "Vdbe".  Only routines
+** in the source file sqliteVdbe.c are allowed to see the insides
+** of this structure.
+*/
+typedef struct Vdbe Vdbe;
+
+/*
+** The names of the following types declared in vdbeInt.h are required
+** for the VdbeOp definition.
+*/
+typedef struct VdbeFunc VdbeFunc;
+typedef struct Mem Mem;
+typedef struct SubProgram SubProgram;
+
+/*
+** A single instruction of the virtual machine has an opcode
+** and as many as three operands.  The instruction is recorded
+** as an instance of the following structure:
+*/
+struct VdbeOp {
+  u8 opcode;          /* What operation to perform */
+  signed char p4type; /* One of the P4_xxx constants for p4 */
+  u8 opflags;         /* Mask of the OPFLG_* flags in opcodes.h */
+  u8 p5;              /* Fifth parameter is an unsigned character */
+  int p1;             /* First operand */
+  int p2;             /* Second parameter (often the jump destination) */
+  int p3;             /* The third parameter */
+  union {             /* fourth parameter */
+    int i;                 /* Integer value if p4type==P4_INT32 */
+    void *p;               /* Generic pointer */
+    char *z;               /* Pointer to data for string (char array) types */
+    i64 *pI64;             /* Used when p4type is P4_INT64 */
+    double *pReal;         /* Used when p4type is P4_REAL */
+    FuncDef *pFunc;        /* Used when p4type is P4_FUNCDEF */
+    VdbeFunc *pVdbeFunc;   /* Used when p4type is P4_VDBEFUNC */
+    CollSeq *pColl;        /* Used when p4type is P4_COLLSEQ */
+    Mem *pMem;             /* Used when p4type is P4_MEM */
+    VTable *pVtab;         /* Used when p4type is P4_VTAB */
+    KeyInfo *pKeyInfo;     /* Used when p4type is P4_KEYINFO */
+    int *ai;               /* Used when p4type is P4_INTARRAY */
+    SubProgram *pProgram;  /* Used when p4type is P4_SUBPROGRAM */
+  } p4;
+#ifdef SQLITE_DEBUG
+  char *zComment;          /* Comment to improve readability */
+#endif
+#ifdef VDBE_PROFILE
+  int cnt;                 /* Number of times this instruction was executed */
+  u64 cycles;              /* Total time spent executing this instruction */
+#endif
+};
+typedef struct VdbeOp VdbeOp;
+
+
+/*
+** A sub-routine used to implement a trigger program.
+*/
+struct SubProgram {
+  VdbeOp *aOp;                  /* Array of opcodes for sub-program */
+  int nOp;                      /* Elements in aOp[] */
+  int nMem;                     /* Number of memory cells required */
+  int nCsr;                     /* Number of cursors required */
+  void *token;                  /* id that may be used to recursive triggers */
+  SubProgram *pNext;            /* Next sub-program already visited */
+};
+
+/*
+** A smaller version of VdbeOp used for the VdbeAddOpList() function because
+** it takes up less space.
+*/
+struct VdbeOpList {
+  u8 opcode;          /* What operation to perform */
+  signed char p1;     /* First operand */
+  signed char p2;     /* Second parameter (often the jump destination) */
+  signed char p3;     /* Third parameter */
+};
+typedef struct VdbeOpList VdbeOpList;
+
+/*
+** Allowed values of VdbeOp.p4type
+*/
+#define P4_NOTUSED    0   /* The P4 parameter is not used */
+#define P4_DYNAMIC  (-1)  /* Pointer to a string obtained from sqliteMalloc() */
+#define P4_STATIC   (-2)  /* Pointer to a static string */
+#define P4_COLLSEQ  (-4)  /* P4 is a pointer to a CollSeq structure */
+#define P4_FUNCDEF  (-5)  /* P4 is a pointer to a FuncDef structure */
+#define P4_KEYINFO  (-6)  /* P4 is a pointer to a KeyInfo structure */
+#define P4_VDBEFUNC (-7)  /* P4 is a pointer to a VdbeFunc structure */
+#define P4_MEM      (-8)  /* P4 is a pointer to a Mem*    structure */
+#define P4_TRANSIENT  0   /* P4 is a pointer to a transient string */
+#define P4_VTAB     (-10) /* P4 is a pointer to an sqlite3_vtab structure */
+#define P4_MPRINTF  (-11) /* P4 is a string obtained from sqlite3_mprintf() */
+#define P4_REAL     (-12) /* P4 is a 64-bit floating point value */
+#define P4_INT64    (-13) /* P4 is a 64-bit signed integer */
+#define P4_INT32    (-14) /* P4 is a 32-bit signed integer */
+#define P4_INTARRAY (-15) /* P4 is a vector of 32-bit integers */
+#define P4_SUBPROGRAM  (-18) /* P4 is a pointer to a SubProgram structure */
+
+/* When adding a P4 argument using P4_KEYINFO, a copy of the KeyInfo structure
+** is made.  That copy is freed when the Vdbe is finalized.  But if the
+** argument is P4_KEYINFO_HANDOFF, the passed in pointer is used.  It still
+** gets freed when the Vdbe is finalized so it still should be obtained
+** from a single sqliteMalloc().  But no copy is made and the calling
+** function should *not* try to free the KeyInfo.
+*/
+#define P4_KEYINFO_HANDOFF (-16)
+#define P4_KEYINFO_STATIC  (-17)
+
+/*
+** The Vdbe.aColName array contains 5n Mem structures, where n is the 
+** number of columns of data returned by the statement.
+*/
+#define COLNAME_NAME     0
+#define COLNAME_DECLTYPE 1
+#define COLNAME_DATABASE 2
+#define COLNAME_TABLE    3
+#define COLNAME_COLUMN   4
+#ifdef SQLITE_ENABLE_COLUMN_METADATA
+# define COLNAME_N        5      /* Number of COLNAME_xxx symbols */
+#else
+# ifdef SQLITE_OMIT_DECLTYPE
+#   define COLNAME_N      1      /* Store only the name */
+# else
+#   define COLNAME_N      2      /* Store the name and decltype */
+# endif
+#endif
+
+/*
+** The following macro converts a relative address in the p2 field
+** of a VdbeOp structure into a negative number so that 
+** sqlite3VdbeAddOpList() knows that the address is relative.  Calling
+** the macro again restores the address.
+*/
+#define ADDR(X)  (-1-(X))
+
+/*
+** The makefile scans the vdbe.c source file and creates the "opcodes.h"
+** header file that defines a number for each opcode used by the VDBE.
+*/
+/************** Include opcodes.h in the middle of vdbe.h ********************/
+/************** Begin file opcodes.h *****************************************/
+/* Automatically generated.  Do not edit */
+/* See the mkopcodeh.awk script for details */
+#define OP_Goto                                 1
+#define OP_Gosub                                2
+#define OP_Return                               3
+#define OP_Yield                                4
+#define OP_HaltIfNull                           5
+#define OP_Halt                                 6
+#define OP_Integer                              7
+#define OP_Int64                                8
+#define OP_Real                               130   /* same as TK_FLOAT    */
+#define OP_String8                             94   /* same as TK_STRING   */
+#define OP_String                               9
+#define OP_Null                                10
+#define OP_Blob                                11
+#define OP_Variable                            12
+#define OP_Move                                13
+#define OP_Copy                                14
+#define OP_SCopy                               15
+#define OP_ResultRow                           16
+#define OP_Concat                              91   /* same as TK_CONCAT   */
+#define OP_Add                                 86   /* same as TK_PLUS     */
+#define OP_Subtract                            87   /* same as TK_MINUS    */
+#define OP_Multiply                            88   /* same as TK_STAR     */
+#define OP_Divide                              89   /* same as TK_SLASH    */
+#define OP_Remainder                           90   /* same as TK_REM      */
+#define OP_CollSeq                             17
+#define OP_Function                            18
+#define OP_BitAnd                              82   /* same as TK_BITAND   */
+#define OP_BitOr                               83   /* same as TK_BITOR    */
+#define OP_ShiftLeft                           84   /* same as TK_LSHIFT   */
+#define OP_ShiftRight                          85   /* same as TK_RSHIFT   */
+#define OP_AddImm                              20
+#define OP_MustBeInt                           21
+#define OP_RealAffinity                        22
+#define OP_ToText                             141   /* same as TK_TO_TEXT  */
+#define OP_ToBlob                             142   /* same as TK_TO_BLOB  */
+#define OP_ToNumeric                          143   /* same as TK_TO_NUMERIC*/
+#define OP_ToInt                              144   /* same as TK_TO_INT   */
+#define OP_ToReal                             145   /* same as TK_TO_REAL  */
+#define OP_Eq                                  76   /* same as TK_EQ       */
+#define OP_Ne                                  75   /* same as TK_NE       */
+#define OP_Lt                                  79   /* same as TK_LT       */
+#define OP_Le                                  78   /* same as TK_LE       */
+#define OP_Gt                                  77   /* same as TK_GT       */
+#define OP_Ge                                  80   /* same as TK_GE       */
+#define OP_Permutation                         23
+#define OP_Compare                             24
+#define OP_Jump                                25
+#define OP_And                                 69   /* same as TK_AND      */
+#define OP_Or                                  68   /* same as TK_OR       */
+#define OP_Not                                 19   /* same as TK_NOT      */
+#define OP_BitNot                              93   /* same as TK_BITNOT   */
+#define OP_If                                  26
+#define OP_IfNot                               27
+#define OP_IsNull                              73   /* same as TK_ISNULL   */
+#define OP_NotNull                             74   /* same as TK_NOTNULL  */
+#define OP_Column                              28
+#define OP_Affinity                            29
+#define OP_MakeRecord                          30
+#define OP_Count                               31
+#define OP_Savepoint                           32
+#define OP_AutoCommit                          33
+#define OP_Transaction                         34
+#define OP_ReadCookie                          35
+#define OP_SetCookie                           36
+#define OP_VerifyCookie                        37
+#define OP_OpenRead                            38
+#define OP_OpenWrite                           39
+#define OP_OpenAutoindex                       40
+#define OP_OpenEphemeral                       41
+#define OP_OpenPseudo                          42
+#define OP_Close                               43
+#define OP_SeekLt                              44
+#define OP_SeekLe                              45
+#define OP_SeekGe                              46
+#define OP_SeekGt                              47
+#define OP_Seek                                48
+#define OP_NotFound                            49
+#define OP_Found                               50
+#define OP_IsUnique                            51
+#define OP_NotExists                           52
+#define OP_Sequence                            53
+#define OP_NewRowid                            54
+#define OP_Insert                              55
+#define OP_InsertInt                           56
+#define OP_Delete                              57
+#define OP_ResetCount                          58
+#define OP_RowKey                              59
+#define OP_RowData                             60
+#define OP_Rowid                               61
+#define OP_NullRow                             62
+#define OP_Last                                63
+#define OP_Sort                                64
+#define OP_Rewind                              65
+#define OP_Prev                                66
+#define OP_Next                                67
+#define OP_IdxInsert                           70
+#define OP_IdxDelete                           71
+#define OP_IdxRowid                            72
+#define OP_IdxLT                               81
+#define OP_IdxGE                               92
+#define OP_Destroy                             95
+#define OP_Clear                               96
+#define OP_CreateIndex                         97
+#define OP_CreateTable                         98
+#define OP_ParseSchema                         99
+#define OP_LoadAnalysis                       100
+#define OP_DropTable                          101
+#define OP_DropIndex                          102
+#define OP_DropTrigger                        103
+#define OP_IntegrityCk                        104
+#define OP_RowSetAdd                          105
+#define OP_RowSetRead                         106
+#define OP_RowSetTest                         107
+#define OP_Program                            108
+#define OP_Param                              109
+#define OP_FkCounter                          110
+#define OP_FkIfZero                           111
+#define OP_MemMax                             112
+#define OP_IfPos                              113
+#define OP_IfNeg                              114
+#define OP_IfZero                             115
+#define OP_AggStep                            116
+#define OP_AggFinal                           117
+#define OP_Checkpoint                         118
+#define OP_JournalMode                        119
+#define OP_Vacuum                             120
+#define OP_IncrVacuum                         121
+#define OP_Expire                             122
+#define OP_TableLock                          123
+#define OP_VBegin                             124
+#define OP_VCreate                            125
+#define OP_VDestroy                           126
+#define OP_VOpen                              127
+#define OP_VFilter                            128
+#define OP_VColumn                            129
+#define OP_VNext                              131
+#define OP_VRename                            132
+#define OP_VUpdate                            133
+#define OP_Pagecount                          134
+#define OP_MaxPgcnt                           135
+#define OP_Trace                              136
+#define OP_Noop                               137
+#define OP_Explain                            138
+
+/* The following opcode values are never used */
+#define OP_NotUsed_139                        139
+#define OP_NotUsed_140                        140
+
+
+/* Properties such as "out2" or "jump" that are specified in
+** comments following the "case" for each opcode in the vdbe.c
+** are encoded into bitvectors as follows:
+*/
+#define OPFLG_JUMP            0x0001  /* jump:  P2 holds jmp target */
+#define OPFLG_OUT2_PRERELEASE 0x0002  /* out2-prerelease: */
+#define OPFLG_IN1             0x0004  /* in1:   P1 is an input */
+#define OPFLG_IN2             0x0008  /* in2:   P2 is an input */
+#define OPFLG_IN3             0x0010  /* in3:   P3 is an input */
+#define OPFLG_OUT2            0x0020  /* out2:  P2 is an output */
+#define OPFLG_OUT3            0x0040  /* out3:  P3 is an output */
+#define OPFLG_INITIALIZER {\
+/*   0 */ 0x00, 0x01, 0x05, 0x04, 0x04, 0x10, 0x00, 0x02,\
+/*   8 */ 0x02, 0x02, 0x02, 0x02, 0x02, 0x00, 0x24, 0x24,\
+/*  16 */ 0x00, 0x00, 0x00, 0x24, 0x04, 0x05, 0x04, 0x00,\
+/*  24 */ 0x00, 0x01, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02,\
+/*  32 */ 0x00, 0x00, 0x00, 0x02, 0x10, 0x00, 0x00, 0x00,\
+/*  40 */ 0x00, 0x00, 0x00, 0x00, 0x11, 0x11, 0x11, 0x11,\
+/*  48 */ 0x08, 0x11, 0x11, 0x11, 0x11, 0x02, 0x02, 0x00,\
+/*  56 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x01,\
+/*  64 */ 0x01, 0x01, 0x01, 0x01, 0x4c, 0x4c, 0x08, 0x00,\
+/*  72 */ 0x02, 0x05, 0x05, 0x15, 0x15, 0x15, 0x15, 0x15,\
+/*  80 */ 0x15, 0x01, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c, 0x4c,\
+/*  88 */ 0x4c, 0x4c, 0x4c, 0x4c, 0x01, 0x24, 0x02, 0x02,\
+/*  96 */ 0x00, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x00,\
+/* 104 */ 0x00, 0x0c, 0x45, 0x15, 0x01, 0x02, 0x00, 0x01,\
+/* 112 */ 0x08, 0x05, 0x05, 0x05, 0x00, 0x00, 0x00, 0x02,\
+/* 120 */ 0x00, 0x01, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,\
+/* 128 */ 0x01, 0x00, 0x02, 0x01, 0x00, 0x00, 0x02, 0x02,\
+/* 136 */ 0x00, 0x00, 0x00, 0x00, 0x00, 0x04, 0x04, 0x04,\
+/* 144 */ 0x04, 0x04,}
+
+/************** End of opcodes.h *********************************************/
+/************** Continuing where we left off in vdbe.h ***********************/
+
+/*
+** Prototypes for the VDBE interface.  See comments on the implementation
+** for a description of what each of these routines does.
+*/
+SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3*);
+SQLITE_PRIVATE int sqlite3VdbeAddOp0(Vdbe*,int);
+SQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe*,int,int);
+SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe*,int,int,int);
+SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe*,int,int,int,int);
+SQLITE_PRIVATE int sqlite3VdbeAddOp4(Vdbe*,int,int,int,int,const char *zP4,int);
+SQLITE_PRIVATE int sqlite3VdbeAddOp4Int(Vdbe*,int,int,int,int,int);
+SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe*, int nOp, VdbeOpList const *aOp);
+SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe*, int addr, int P1);
+SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe*, int addr, int P2);
+SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe*, int addr, int P3);
+SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe*, u8 P5);
+SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe*, int addr);
+SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe*, int addr, int N);
+SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe*, int addr, const char *zP4, int N);
+SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe*, int);
+SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe*, int);
+SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe*);
+SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe*);
+SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe*);
+SQLITE_PRIVATE void sqlite3VdbeDeleteObject(sqlite3*,Vdbe*);
+SQLITE_PRIVATE void sqlite3VdbeMakeReady(Vdbe*,int,int,int,int,int,int);
+SQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe*);
+SQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe*, int);
+SQLITE_PRIVATE int sqlite3VdbeCurrentAddr(Vdbe*);
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE   int sqlite3VdbeAssertMayAbort(Vdbe *, int);
+SQLITE_PRIVATE   void sqlite3VdbeTrace(Vdbe*,FILE*);
+#endif
+SQLITE_PRIVATE void sqlite3VdbeResetStepResult(Vdbe*);
+SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe*);
+SQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe*,int);
+SQLITE_PRIVATE int sqlite3VdbeSetColName(Vdbe*, int, int, const char *, void(*)(void*));
+SQLITE_PRIVATE void sqlite3VdbeCountChanges(Vdbe*);
+SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe*);
+SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe*, const char *z, int n, int);
+SQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe*,Vdbe*);
+SQLITE_PRIVATE VdbeOp *sqlite3VdbeTakeOpArray(Vdbe*, int*, int*);
+SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetValue(Vdbe*, int, u8);
+SQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe*, int);
+#ifndef SQLITE_OMIT_TRACE
+SQLITE_PRIVATE   char *sqlite3VdbeExpandSql(Vdbe*, const char*);
+#endif
+
+SQLITE_PRIVATE UnpackedRecord *sqlite3VdbeRecordUnpack(KeyInfo*,int,const void*,char*,int);
+SQLITE_PRIVATE void sqlite3VdbeDeleteUnpackedRecord(UnpackedRecord*);
+SQLITE_PRIVATE int sqlite3VdbeRecordCompare(int,const void*,UnpackedRecord*);
+
+#ifndef SQLITE_OMIT_TRIGGER
+SQLITE_PRIVATE void sqlite3VdbeLinkSubProgram(Vdbe *, SubProgram *);
+#endif
+
+
+#ifndef NDEBUG
+SQLITE_PRIVATE   void sqlite3VdbeComment(Vdbe*, const char*, ...);
+# define VdbeComment(X)  sqlite3VdbeComment X
+SQLITE_PRIVATE   void sqlite3VdbeNoopComment(Vdbe*, const char*, ...);
+# define VdbeNoopComment(X)  sqlite3VdbeNoopComment X
+#else
+# define VdbeComment(X)
+# define VdbeNoopComment(X)
+#endif
+
+#endif
+
+/************** End of vdbe.h ************************************************/
+/************** Continuing where we left off in sqliteInt.h ******************/
+/************** Include pager.h in the middle of sqliteInt.h *****************/
+/************** Begin file pager.h *******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This header file defines the interface that the sqlite page cache
+** subsystem.  The page cache subsystem reads and writes a file a page
+** at a time and provides a journal for rollback.
+*/
+
+#ifndef _PAGER_H_
+#define _PAGER_H_
+
+/*
+** Default maximum size for persistent journal files. A negative 
+** value means no limit. This value may be overridden using the 
+** sqlite3PagerJournalSizeLimit() API. See also "PRAGMA journal_size_limit".
+*/
+#ifndef SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT
+  #define SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT -1
+#endif
+
+/*
+** The type used to represent a page number.  The first page in a file
+** is called page 1.  0 is used to represent "not a page".
+*/
+typedef u32 Pgno;
+
+/*
+** Each open file is managed by a separate instance of the "Pager" structure.
+*/
+typedef struct Pager Pager;
+
+/*
+** Handle type for pages.
+*/
+typedef struct PgHdr DbPage;
+
+/*
+** Page number PAGER_MJ_PGNO is never used in an SQLite database (it is
+** reserved for working around a windows/posix incompatibility). It is
+** used in the journal to signify that the remainder of the journal file 
+** is devoted to storing a master journal name - there are no more pages to
+** roll back. See comments for function writeMasterJournal() in pager.c 
+** for details.
+*/
+#define PAGER_MJ_PGNO(x) ((Pgno)((PENDING_BYTE/((x)->pageSize))+1))
+
+/*
+** Allowed values for the flags parameter to sqlite3PagerOpen().
+**
+** NOTE: These values must match the corresponding BTREE_ values in btree.h.
+*/
+#define PAGER_OMIT_JOURNAL  0x0001    /* Do not use a rollback journal */
+#define PAGER_NO_READLOCK   0x0002    /* Omit readlocks on readonly files */
+#define PAGER_MEMORY        0x0004    /* In-memory database */
+
+/*
+** Valid values for the second argument to sqlite3PagerLockingMode().
+*/
+#define PAGER_LOCKINGMODE_QUERY      -1
+#define PAGER_LOCKINGMODE_NORMAL      0
+#define PAGER_LOCKINGMODE_EXCLUSIVE   1
+
+/*
+** Numeric constants that encode the journalmode.  
+*/
+#define PAGER_JOURNALMODE_QUERY     (-1)  /* Query the value of journalmode */
+#define PAGER_JOURNALMODE_DELETE      0   /* Commit by deleting journal file */
+#define PAGER_JOURNALMODE_PERSIST     1   /* Commit by zeroing journal header */
+#define PAGER_JOURNALMODE_OFF         2   /* Journal omitted.  */
+#define PAGER_JOURNALMODE_TRUNCATE    3   /* Commit by truncating journal */
+#define PAGER_JOURNALMODE_MEMORY      4   /* In-memory journal file */
+#define PAGER_JOURNALMODE_WAL         5   /* Use write-ahead logging */
+
+/*
+** The remainder of this file contains the declarations of the functions
+** that make up the Pager sub-system API. See source code comments for 
+** a detailed description of each routine.
+*/
+
+/* Open and close a Pager connection. */ 
+SQLITE_PRIVATE int sqlite3PagerOpen(
+  sqlite3_vfs*,
+  Pager **ppPager,
+  const char*,
+  int,
+  int,
+  int,
+  void(*)(DbPage*)
+);
+SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager);
+SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager*, int, unsigned char*);
+
+/* Functions used to configure a Pager object. */
+SQLITE_PRIVATE void sqlite3PagerSetBusyhandler(Pager*, int(*)(void *), void *);
+SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager*, u32*, int);
+SQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager*, int);
+SQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager*, int);
+SQLITE_PRIVATE void sqlite3PagerSetSafetyLevel(Pager*,int,int,int);
+SQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *, int);
+SQLITE_PRIVATE int sqlite3PagerSetJournalMode(Pager *, int);
+SQLITE_PRIVATE int sqlite3PagerGetJournalMode(Pager*);
+SQLITE_PRIVATE int sqlite3PagerOkToChangeJournalMode(Pager*);
+SQLITE_PRIVATE i64 sqlite3PagerJournalSizeLimit(Pager *, i64);
+SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager*);
+
+/* Functions used to obtain and release page references. */ 
+SQLITE_PRIVATE int sqlite3PagerAcquire(Pager *pPager, Pgno pgno, DbPage **ppPage, int clrFlag);
+#define sqlite3PagerGet(A,B,C) sqlite3PagerAcquire(A,B,C,0)
+SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno);
+SQLITE_PRIVATE void sqlite3PagerRef(DbPage*);
+SQLITE_PRIVATE void sqlite3PagerUnref(DbPage*);
+
+/* Operations on page references. */
+SQLITE_PRIVATE int sqlite3PagerWrite(DbPage*);
+SQLITE_PRIVATE void sqlite3PagerDontWrite(DbPage*);
+SQLITE_PRIVATE int sqlite3PagerMovepage(Pager*,DbPage*,Pgno,int);
+SQLITE_PRIVATE int sqlite3PagerPageRefcount(DbPage*);
+SQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *); 
+SQLITE_PRIVATE void *sqlite3PagerGetExtra(DbPage *); 
+
+/* Functions used to manage pager transactions and savepoints. */
+SQLITE_PRIVATE void sqlite3PagerPagecount(Pager*, int*);
+SQLITE_PRIVATE int sqlite3PagerBegin(Pager*, int exFlag, int);
+SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(Pager*,const char *zMaster, int);
+SQLITE_PRIVATE int sqlite3PagerExclusiveLock(Pager*);
+SQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager);
+SQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager*);
+SQLITE_PRIVATE int sqlite3PagerRollback(Pager*);
+SQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int n);
+SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint);
+SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager);
+
+SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, int, int*, int*);
+SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager);
+SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager);
+SQLITE_PRIVATE int sqlite3PagerOpenWal(Pager *pPager, int *pisOpen);
+SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager);
+
+/* Functions used to query pager state and configuration. */
+SQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager*);
+SQLITE_PRIVATE int sqlite3PagerRefcount(Pager*);
+SQLITE_PRIVATE int sqlite3PagerMemUsed(Pager*);
+SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager*);
+SQLITE_PRIVATE const sqlite3_vfs *sqlite3PagerVfs(Pager*);
+SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager*);
+SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager*);
+SQLITE_PRIVATE int sqlite3PagerNosync(Pager*);
+SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager*);
+SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager*);
+
+/* Functions used to truncate the database file. */
+SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager*,Pgno);
+
+#if defined(SQLITE_HAS_CODEC) && !defined(SQLITE_OMIT_WAL)
+SQLITE_PRIVATE void *sqlite3PagerCodec(DbPage *);
+#endif
+
+/* Functions to support testing and debugging. */
+#if !defined(NDEBUG) || defined(SQLITE_TEST)
+SQLITE_PRIVATE   Pgno sqlite3PagerPagenumber(DbPage*);
+SQLITE_PRIVATE   int sqlite3PagerIswriteable(DbPage*);
+#endif
+#ifdef SQLITE_TEST
+SQLITE_PRIVATE   int *sqlite3PagerStats(Pager*);
+SQLITE_PRIVATE   void sqlite3PagerRefdump(Pager*);
+  void disable_simulated_io_errors(void);
+  void enable_simulated_io_errors(void);
+#else
+# define disable_simulated_io_errors()
+# define enable_simulated_io_errors()
+#endif
+
+#endif /* _PAGER_H_ */
+
+/************** End of pager.h ***********************************************/
+/************** Continuing where we left off in sqliteInt.h ******************/
+/************** Include pcache.h in the middle of sqliteInt.h ****************/
+/************** Begin file pcache.h ******************************************/
+/*
+** 2008 August 05
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This header file defines the interface that the sqlite page cache
+** subsystem. 
+*/
+
+#ifndef _PCACHE_H_
+
+typedef struct PgHdr PgHdr;
+typedef struct PCache PCache;
+
+/*
+** Every page in the cache is controlled by an instance of the following
+** structure.
+*/
+struct PgHdr {
+  void *pData;                   /* Content of this page */
+  void *pExtra;                  /* Extra content */
+  PgHdr *pDirty;                 /* Transient list of dirty pages */
+  Pgno pgno;                     /* Page number for this page */
+  Pager *pPager;                 /* The pager this page is part of */
+#ifdef SQLITE_CHECK_PAGES
+  u32 pageHash;                  /* Hash of page content */
+#endif
+  u16 flags;                     /* PGHDR flags defined below */
+
+  /**********************************************************************
+  ** Elements above are public.  All that follows is private to pcache.c
+  ** and should not be accessed by other modules.
+  */
+  i16 nRef;                      /* Number of users of this page */
+  PCache *pCache;                /* Cache that owns this page */
+
+  PgHdr *pDirtyNext;             /* Next element in list of dirty pages */
+  PgHdr *pDirtyPrev;             /* Previous element in list of dirty pages */
+};
+
+/* Bit values for PgHdr.flags */
+#define PGHDR_DIRTY             0x002  /* Page has changed */
+#define PGHDR_NEED_SYNC         0x004  /* Fsync the rollback journal before
+                                       ** writing this page to the database */
+#define PGHDR_NEED_READ         0x008  /* Content is unread */
+#define PGHDR_REUSE_UNLIKELY    0x010  /* A hint that reuse is unlikely */
+#define PGHDR_DONT_WRITE        0x020  /* Do not write content to disk */
+
+/* Initialize and shutdown the page cache subsystem */
+SQLITE_PRIVATE int sqlite3PcacheInitialize(void);
+SQLITE_PRIVATE void sqlite3PcacheShutdown(void);
+
+/* Page cache buffer management:
+** These routines implement SQLITE_CONFIG_PAGECACHE.
+*/
+SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *, int sz, int n);
+
+/* Create a new pager cache.
+** Under memory stress, invoke xStress to try to make pages clean.
+** Only clean and unpinned pages can be reclaimed.
+*/
+SQLITE_PRIVATE void sqlite3PcacheOpen(
+  int szPage,                    /* Size of every page */
+  int szExtra,                   /* Extra space associated with each page */
+  int bPurgeable,                /* True if pages are on backing store */
+  int (*xStress)(void*, PgHdr*), /* Call to try to make pages clean */
+  void *pStress,                 /* Argument to xStress */
+  PCache *pToInit                /* Preallocated space for the PCache */
+);
+
+/* Modify the page-size after the cache has been created. */
+SQLITE_PRIVATE void sqlite3PcacheSetPageSize(PCache *, int);
+
+/* Return the size in bytes of a PCache object.  Used to preallocate
+** storage space.
+*/
+SQLITE_PRIVATE int sqlite3PcacheSize(void);
+
+/* One release per successful fetch.  Page is pinned until released.
+** Reference counted. 
+*/
+SQLITE_PRIVATE int sqlite3PcacheFetch(PCache*, Pgno, int createFlag, PgHdr**);
+SQLITE_PRIVATE void sqlite3PcacheRelease(PgHdr*);
+
+SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr*);         /* Remove page from cache */
+SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr*);    /* Make sure page is marked dirty */
+SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr*);    /* Mark a single page as clean */
+SQLITE_PRIVATE void sqlite3PcacheCleanAll(PCache*);    /* Mark all dirty list pages as clean */
+
+/* Change a page number.  Used by incr-vacuum. */
+SQLITE_PRIVATE void sqlite3PcacheMove(PgHdr*, Pgno);
+
+/* Remove all pages with pgno>x.  Reset the cache if x==0 */
+SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache*, Pgno x);
+
+/* Get a list of all dirty pages in the cache, sorted by page number */
+SQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache*);
+
+/* Reset and close the cache object */
+SQLITE_PRIVATE void sqlite3PcacheClose(PCache*);
+
+/* Clear flags from pages of the page cache */
+SQLITE_PRIVATE void sqlite3PcacheClearSyncFlags(PCache *);
+
+/* Discard the contents of the cache */
+SQLITE_PRIVATE void sqlite3PcacheClear(PCache*);
+
+/* Return the total number of outstanding page references */
+SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache*);
+
+/* Increment the reference count of an existing page */
+SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr*);
+
+SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr*);
+
+/* Return the total number of pages stored in the cache */
+SQLITE_PRIVATE int sqlite3PcachePagecount(PCache*);
+
+#if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG)
+/* Iterate through all dirty pages currently stored in the cache. This
+** interface is only available if SQLITE_CHECK_PAGES is defined when the 
+** library is built.
+*/
+SQLITE_PRIVATE void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter)(PgHdr *));
+#endif
+
+/* Set and get the suggested cache-size for the specified pager-cache.
+**
+** If no global maximum is configured, then the system attempts to limit
+** the total number of pages cached by purgeable pager-caches to the sum
+** of the suggested cache-sizes.
+*/
+SQLITE_PRIVATE void sqlite3PcacheSetCachesize(PCache *, int);
+#ifdef SQLITE_TEST
+SQLITE_PRIVATE int sqlite3PcacheGetCachesize(PCache *);
+#endif
+
+#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
+/* Try to return memory used by the pcache module to the main memory heap */
+SQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int);
+#endif
+
+#ifdef SQLITE_TEST
+SQLITE_PRIVATE void sqlite3PcacheStats(int*,int*,int*,int*);
+#endif
+
+SQLITE_PRIVATE void sqlite3PCacheSetDefault(void);
+
+#endif /* _PCACHE_H_ */
+
+/************** End of pcache.h **********************************************/
+/************** Continuing where we left off in sqliteInt.h ******************/
+
+/************** Include os.h in the middle of sqliteInt.h ********************/
+/************** Begin file os.h **********************************************/
+/*
+** 2001 September 16
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This header file (together with is companion C source-code file
+** "os.c") attempt to abstract the underlying operating system so that
+** the SQLite library will work on both POSIX and windows systems.
+**
+** This header file is #include-ed by sqliteInt.h and thus ends up
+** being included by every source file.
+*/
+#ifndef _SQLITE_OS_H_
+#define _SQLITE_OS_H_
+
+/*
+** Figure out if we are dealing with Unix, Windows, or some other
+** operating system.  After the following block of preprocess macros,
+** all of SQLITE_OS_UNIX, SQLITE_OS_WIN, SQLITE_OS_OS2, and SQLITE_OS_OTHER 
+** will defined to either 1 or 0.  One of the four will be 1.  The other 
+** three will be 0.
+*/
+#if defined(SQLITE_OS_OTHER)
+# if SQLITE_OS_OTHER==1
+#   undef SQLITE_OS_UNIX
+#   define SQLITE_OS_UNIX 0
+#   undef SQLITE_OS_WIN
+#   define SQLITE_OS_WIN 0
+#   undef SQLITE_OS_OS2
+#   define SQLITE_OS_OS2 0
+# else
+#   undef SQLITE_OS_OTHER
+# endif
+#endif
+#if !defined(SQLITE_OS_UNIX) && !defined(SQLITE_OS_OTHER)
+# define SQLITE_OS_OTHER 0
+# ifndef SQLITE_OS_WIN
+#   if defined(_WIN32) || defined(WIN32) || defined(__CYGWIN__) || defined(__MINGW32__) || defined(__BORLANDC__)
+#     define SQLITE_OS_WIN 1
+#     define SQLITE_OS_UNIX 0
+#     define SQLITE_OS_OS2 0
+#   elif defined(__EMX__) || defined(_OS2) || defined(OS2) || defined(_OS2_) || defined(__OS2__)
+#     define SQLITE_OS_WIN 0
+#     define SQLITE_OS_UNIX 0
+#     define SQLITE_OS_OS2 1
+#   else
+#     define SQLITE_OS_WIN 0
+#     define SQLITE_OS_UNIX 1
+#     define SQLITE_OS_OS2 0
+#  endif
+# else
+#  define SQLITE_OS_UNIX 0
+#  define SQLITE_OS_OS2 0
+# endif
+#else
+# ifndef SQLITE_OS_WIN
+#  define SQLITE_OS_WIN 0
+# endif
+#endif
+
+/*
+** Determine if we are dealing with WindowsCE - which has a much
+** reduced API.
+*/
+#if defined(_WIN32_WCE)
+# define SQLITE_OS_WINCE 1
+#else
+# define SQLITE_OS_WINCE 0
+#endif
+
+
+/*
+** Define the maximum size of a temporary filename
+*/
+#if SQLITE_OS_WIN
+#define _WINSOCKAPI_    // stops windows.h including winsock.h
+# include <windows.h>
+# define SQLITE_TEMPNAME_SIZE (MAX_PATH+50)
+#elif SQLITE_OS_OS2
+# if (__GNUC__ > 3 || __GNUC__ == 3 && __GNUC_MINOR__ >= 3) && defined(OS2_HIGH_MEMORY)
+#  include <os2safe.h> /* has to be included before os2.h for linking to work */
+# endif
+# define INCL_DOSDATETIME
+# define INCL_DOSFILEMGR
+# define INCL_DOSERRORS
+# define INCL_DOSMISC
+# define INCL_DOSPROCESS
+# define INCL_DOSMODULEMGR
+# define INCL_DOSSEMAPHORES
+# include <os2.h>
+# include <uconv.h>
+# define SQLITE_TEMPNAME_SIZE (CCHMAXPATHCOMP)
+#else
+# define SQLITE_TEMPNAME_SIZE 200
+#endif
+
+/* If the SET_FULLSYNC macro is not defined above, then make it
+** a no-op
+*/
+#ifndef SET_FULLSYNC
+# define SET_FULLSYNC(x,y)
+#endif
+
+/*
+** The default size of a disk sector
+*/
+#ifndef SQLITE_DEFAULT_SECTOR_SIZE
+# define SQLITE_DEFAULT_SECTOR_SIZE 512
+#endif
+
+/*
+** Temporary files are named starting with this prefix followed by 16 random
+** alphanumeric characters, and no file extension. They are stored in the
+** OS's standard temporary file directory, and are deleted prior to exit.
+** If sqlite is being embedded in another program, you may wish to change the
+** prefix to reflect your program's name, so that if your program exits
+** prematurely, old temporary files can be easily identified. This can be done
+** using -DSQLITE_TEMP_FILE_PREFIX=myprefix_ on the compiler command line.
+**
+** 2006-10-31:  The default prefix used to be "sqlite_".  But then
+** Mcafee started using SQLite in their anti-virus product and it
+** started putting files with the "sqlite" name in the c:/temp folder.
+** This annoyed many windows users.  Those users would then do a 
+** Google search for "sqlite", find the telephone numbers of the
+** developers and call to wake them up at night and complain.
+** For this reason, the default name prefix is changed to be "sqlite" 
+** spelled backwards.  So the temp files are still identified, but
+** anybody smart enough to figure out the code is also likely smart
+** enough to know that calling the developer will not help get rid
+** of the file.
+*/
+#ifndef SQLITE_TEMP_FILE_PREFIX
+# define SQLITE_TEMP_FILE_PREFIX "etilqs_"
+#endif
+
+/*
+** The following values may be passed as the second argument to
+** sqlite3OsLock(). The various locks exhibit the following semantics:
+**
+** SHARED:    Any number of processes may hold a SHARED lock simultaneously.
+** RESERVED:  A single process may hold a RESERVED lock on a file at
+**            any time. Other processes may hold and obtain new SHARED locks.
+** PENDING:   A single process may hold a PENDING lock on a file at
+**            any one time. Existing SHARED locks may persist, but no new
+**            SHARED locks may be obtained by other processes.
+** EXCLUSIVE: An EXCLUSIVE lock precludes all other locks.
+**
+** PENDING_LOCK may not be passed directly to sqlite3OsLock(). Instead, a
+** process that requests an EXCLUSIVE lock may actually obtain a PENDING
+** lock. This can be upgraded to an EXCLUSIVE lock by a subsequent call to
+** sqlite3OsLock().
+*/
+#define NO_LOCK         0
+#define SHARED_LOCK     1
+#define RESERVED_LOCK   2
+#define PENDING_LOCK    3
+#define EXCLUSIVE_LOCK  4
+
+/*
+** File Locking Notes:  (Mostly about windows but also some info for Unix)
+**
+** We cannot use LockFileEx() or UnlockFileEx() on Win95/98/ME because
+** those functions are not available.  So we use only LockFile() and
+** UnlockFile().
+**
+** LockFile() prevents not just writing but also reading by other processes.
+** A SHARED_LOCK is obtained by locking a single randomly-chosen 
+** byte out of a specific range of bytes. The lock byte is obtained at 
+** random so two separate readers can probably access the file at the 
+** same time, unless they are unlucky and choose the same lock byte.
+** An EXCLUSIVE_LOCK is obtained by locking all bytes in the range.
+** There can only be one writer.  A RESERVED_LOCK is obtained by locking
+** a single byte of the file that is designated as the reserved lock byte.
+** A PENDING_LOCK is obtained by locking a designated byte different from
+** the RESERVED_LOCK byte.
+**
+** On WinNT/2K/XP systems, LockFileEx() and UnlockFileEx() are available,
+** which means we can use reader/writer locks.  When reader/writer locks
+** are used, the lock is placed on the same range of bytes that is used
+** for probabilistic locking in Win95/98/ME.  Hence, the locking scheme
+** will support two or more Win95 readers or two or more WinNT readers.
+** But a single Win95 reader will lock out all WinNT readers and a single
+** WinNT reader will lock out all other Win95 readers.
+**
+** The following #defines specify the range of bytes used for locking.
+** SHARED_SIZE is the number of bytes available in the pool from which
+** a random byte is selected for a shared lock.  The pool of bytes for
+** shared locks begins at SHARED_FIRST. 
+**
+** The same locking strategy and
+** byte ranges are used for Unix.  This leaves open the possiblity of having
+** clients on win95, winNT, and unix all talking to the same shared file
+** and all locking correctly.  To do so would require that samba (or whatever
+** tool is being used for file sharing) implements locks correctly between
+** windows and unix.  I'm guessing that isn't likely to happen, but by
+** using the same locking range we are at least open to the possibility.
+**
+** Locking in windows is manditory.  For this reason, we cannot store
+** actual data in the bytes used for locking.  The pager never allocates
+** the pages involved in locking therefore.  SHARED_SIZE is selected so
+** that all locks will fit on a single page even at the minimum page size.
+** PENDING_BYTE defines the beginning of the locks.  By default PENDING_BYTE
+** is set high so that we don't have to allocate an unused page except
+** for very large databases.  But one should test the page skipping logic 
+** by setting PENDING_BYTE low and running the entire regression suite.
+**
+** Changing the value of PENDING_BYTE results in a subtly incompatible
+** file format.  Depending on how it is changed, you might not notice
+** the incompatibility right away, even running a full regression test.
+** The default location of PENDING_BYTE is the first byte past the
+** 1GB boundary.
+**
+*/
+#ifdef SQLITE_OMIT_WSD
+# define PENDING_BYTE     (0x40000000)
+#else
+# define PENDING_BYTE      sqlite3PendingByte
+#endif
+#define RESERVED_BYTE     (PENDING_BYTE+1)
+#define SHARED_FIRST      (PENDING_BYTE+2)
+#define SHARED_SIZE       510
+
+/*
+** Wrapper around OS specific sqlite3_os_init() function.
+*/
+SQLITE_PRIVATE int sqlite3OsInit(void);
+
+/* 
+** Functions for accessing sqlite3_file methods 
+*/
+SQLITE_PRIVATE int sqlite3OsClose(sqlite3_file*);
+SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file*, void*, int amt, i64 offset);
+SQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file*, const void*, int amt, i64 offset);
+SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file*, i64 size);
+SQLITE_PRIVATE int sqlite3OsSync(sqlite3_file*, int);
+SQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file*, i64 *pSize);
+SQLITE_PRIVATE int sqlite3OsLock(sqlite3_file*, int);
+SQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file*, int);
+SQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut);
+SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file*,int,void*);
+#define SQLITE_FCNTL_DB_UNCHANGED 0xca093fa0
+SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id);
+SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id);
+SQLITE_PRIVATE int sqlite3OsShmMap(sqlite3_file *,int,int,int,void volatile **);
+SQLITE_PRIVATE int sqlite3OsShmLock(sqlite3_file *id, int, int, int);
+SQLITE_PRIVATE void sqlite3OsShmBarrier(sqlite3_file *id);
+SQLITE_PRIVATE int sqlite3OsShmUnmap(sqlite3_file *id, int);
+
+/* 
+** Functions for accessing sqlite3_vfs methods 
+*/
+SQLITE_PRIVATE int sqlite3OsOpen(sqlite3_vfs *, const char *, sqlite3_file*, int, int *);
+SQLITE_PRIVATE int sqlite3OsDelete(sqlite3_vfs *, const char *, int);
+SQLITE_PRIVATE int sqlite3OsAccess(sqlite3_vfs *, const char *, int, int *pResOut);
+SQLITE_PRIVATE int sqlite3OsFullPathname(sqlite3_vfs *, const char *, int, char *);
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
+SQLITE_PRIVATE void *sqlite3OsDlOpen(sqlite3_vfs *, const char *);
+SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *, int, char *);
+SQLITE_PRIVATE void (*sqlite3OsDlSym(sqlite3_vfs *, void *, const char *))(void);
+SQLITE_PRIVATE void sqlite3OsDlClose(sqlite3_vfs *, void *);
+#endif /* SQLITE_OMIT_LOAD_EXTENSION */
+SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *, int, char *);
+SQLITE_PRIVATE int sqlite3OsSleep(sqlite3_vfs *, int);
+SQLITE_PRIVATE int sqlite3OsCurrentTimeInt64(sqlite3_vfs *, sqlite3_int64*);
+
+/*
+** Convenience functions for opening and closing files using 
+** sqlite3_malloc() to obtain space for the file-handle structure.
+*/
+SQLITE_PRIVATE int sqlite3OsOpenMalloc(sqlite3_vfs *, const char *, sqlite3_file **, int,int*);
+SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *);
+
+#endif /* _SQLITE_OS_H_ */
+
+/************** End of os.h **************************************************/
+/************** Continuing where we left off in sqliteInt.h ******************/
+/************** Include mutex.h in the middle of sqliteInt.h *****************/
+/************** Begin file mutex.h *******************************************/
+/*
+** 2007 August 28
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains the common header for all mutex implementations.
+** The sqliteInt.h header #includes this file so that it is available
+** to all source files.  We break it out in an effort to keep the code
+** better organized.
+**
+** NOTE:  source files should *not* #include this header file directly.
+** Source files should #include the sqliteInt.h file and let that file
+** include this one indirectly.
+*/
+
+
+/*
+** Figure out what version of the code to use.  The choices are
+**
+**   SQLITE_MUTEX_OMIT         No mutex logic.  Not even stubs.  The
+**                             mutexes implemention cannot be overridden
+**                             at start-time.
+**
+**   SQLITE_MUTEX_NOOP         For single-threaded applications.  No
+**                             mutual exclusion is provided.  But this
+**                             implementation can be overridden at
+**                             start-time.
+**
+**   SQLITE_MUTEX_PTHREADS     For multi-threaded applications on Unix.
+**
+**   SQLITE_MUTEX_W32          For multi-threaded applications on Win32.
+**
+**   SQLITE_MUTEX_OS2          For multi-threaded applications on OS/2.
+*/
+#if !SQLITE_THREADSAFE
+# define SQLITE_MUTEX_OMIT
+#endif
+#if SQLITE_THREADSAFE && !defined(SQLITE_MUTEX_NOOP)
+#  if SQLITE_OS_UNIX
+#    define SQLITE_MUTEX_PTHREADS
+#  elif SQLITE_OS_WIN
+#    define SQLITE_MUTEX_W32
+#  elif SQLITE_OS_OS2
+#    define SQLITE_MUTEX_OS2
+#  else
+#    define SQLITE_MUTEX_NOOP
+#  endif
+#endif
+
+#ifdef SQLITE_MUTEX_OMIT
+/*
+** If this is a no-op implementation, implement everything as macros.
+*/
+#define sqlite3_mutex_alloc(X)    ((sqlite3_mutex*)8)
+#define sqlite3_mutex_free(X)
+#define sqlite3_mutex_enter(X)
+#define sqlite3_mutex_try(X)      SQLITE_OK
+#define sqlite3_mutex_leave(X)
+#define sqlite3_mutex_held(X)     ((void)(X),1)
+#define sqlite3_mutex_notheld(X)  ((void)(X),1)
+#define sqlite3MutexAlloc(X)      ((sqlite3_mutex*)8)
+#define sqlite3MutexInit()        SQLITE_OK
+#define sqlite3MutexEnd()
+#endif /* defined(SQLITE_MUTEX_OMIT) */
+
+/************** End of mutex.h ***********************************************/
+/************** Continuing where we left off in sqliteInt.h ******************/
+
+
+/*
+** Each database file to be accessed by the system is an instance
+** of the following structure.  There are normally two of these structures
+** in the sqlite.aDb[] array.  aDb[0] is the main database file and
+** aDb[1] is the database file used to hold temporary tables.  Additional
+** databases may be attached.
+*/
+struct Db {
+  char *zName;         /* Name of this database */
+  Btree *pBt;          /* The B*Tree structure for this database file */
+  u8 inTrans;          /* 0: not writable.  1: Transaction.  2: Checkpoint */
+  u8 safety_level;     /* How aggressive at syncing data to disk */
+  Schema *pSchema;     /* Pointer to database schema (possibly shared) */
+};
+
+/*
+** An instance of the following structure stores a database schema.
+**
+** Most Schema objects are associated with a Btree.  The exception is
+** the Schema for the TEMP databaes (sqlite3.aDb[1]) which is free-standing.
+** In shared cache mode, a single Schema object can be shared by multiple
+** Btrees that refer to the same underlying BtShared object.
+** 
+** Schema objects are automatically deallocated when the last Btree that
+** references them is destroyed.   The TEMP Schema is manually freed by
+** sqlite3_close().
+*
+** A thread must be holding a mutex on the corresponding Btree in order
+** to access Schema content.  This implies that the thread must also be
+** holding a mutex on the sqlite3 connection pointer that owns the Btree.
+** For a TEMP Schema, on the connection mutex is required.
+*/
+struct Schema {
+  int schema_cookie;   /* Database schema version number for this file */
+  int iGeneration;     /* Generation counter.  Incremented with each change */
+  Hash tblHash;        /* All tables indexed by name */
+  Hash idxHash;        /* All (named) indices indexed by name */
+  Hash trigHash;       /* All triggers indexed by name */
+  Hash fkeyHash;       /* All foreign keys by referenced table name */
+  Table *pSeqTab;      /* The sqlite_sequence table used by AUTOINCREMENT */
+  u8 file_format;      /* Schema format version for this file */
+  u8 enc;              /* Text encoding used by this database */
+  u16 flags;           /* Flags associated with this schema */
+  int cache_size;      /* Number of pages to use in the cache */
+};
+
+/*
+** These macros can be used to test, set, or clear bits in the 
+** Db.pSchema->flags field.
+*/
+#define DbHasProperty(D,I,P)     (((D)->aDb[I].pSchema->flags&(P))==(P))
+#define DbHasAnyProperty(D,I,P)  (((D)->aDb[I].pSchema->flags&(P))!=0)
+#define DbSetProperty(D,I,P)     (D)->aDb[I].pSchema->flags|=(P)
+#define DbClearProperty(D,I,P)   (D)->aDb[I].pSchema->flags&=~(P)
+
+/*
+** Allowed values for the DB.pSchema->flags field.
+**
+** The DB_SchemaLoaded flag is set after the database schema has been
+** read into internal hash tables.
+**
+** DB_UnresetViews means that one or more views have column names that
+** have been filled out.  If the schema changes, these column names might
+** changes and so the view will need to be reset.
+*/
+#define DB_SchemaLoaded    0x0001  /* The schema has been loaded */
+#define DB_UnresetViews    0x0002  /* Some views have defined column names */
+#define DB_Empty           0x0004  /* The file is empty (length 0 bytes) */
+
+/*
+** The number of different kinds of things that can be limited
+** using the sqlite3_limit() interface.
+*/
+#define SQLITE_N_LIMIT (SQLITE_LIMIT_TRIGGER_DEPTH+1)
+
+/*
+** Lookaside malloc is a set of fixed-size buffers that can be used
+** to satisfy small transient memory allocation requests for objects
+** associated with a particular database connection.  The use of
+** lookaside malloc provides a significant performance enhancement
+** (approx 10%) by avoiding numerous malloc/free requests while parsing
+** SQL statements.
+**
+** The Lookaside structure holds configuration information about the
+** lookaside malloc subsystem.  Each available memory allocation in
+** the lookaside subsystem is stored on a linked list of LookasideSlot
+** objects.
+**
+** Lookaside allocations are only allowed for objects that are associated
+** with a particular database connection.  Hence, schema information cannot
+** be stored in lookaside because in shared cache mode the schema information
+** is shared by multiple database connections.  Therefore, while parsing
+** schema information, the Lookaside.bEnabled flag is cleared so that
+** lookaside allocations are not used to construct the schema objects.
+*/
+struct Lookaside {
+  u16 sz;                 /* Size of each buffer in bytes */
+  u8 bEnabled;            /* False to disable new lookaside allocations */
+  u8 bMalloced;           /* True if pStart obtained from sqlite3_malloc() */
+  int nOut;               /* Number of buffers currently checked out */
+  int mxOut;              /* Highwater mark for nOut */
+  int anStat[3];          /* 0: hits.  1: size misses.  2: full misses */
+  LookasideSlot *pFree;   /* List of available buffers */
+  void *pStart;           /* First byte of available memory space */
+  void *pEnd;             /* First byte past end of available space */
+};
+struct LookasideSlot {
+  LookasideSlot *pNext;    /* Next buffer in the list of free buffers */
+};
+
+/*
+** A hash table for function definitions.
+**
+** Hash each FuncDef structure into one of the FuncDefHash.a[] slots.
+** Collisions are on the FuncDef.pHash chain.
+*/
+struct FuncDefHash {
+  FuncDef *a[23];       /* Hash table for functions */
+};
+
+/*
+** Each database connection is an instance of the following structure.
+**
+** The sqlite.lastRowid records the last insert rowid generated by an
+** insert statement.  Inserts on views do not affect its value.  Each
+** trigger has its own context, so that lastRowid can be updated inside
+** triggers as usual.  The previous value will be restored once the trigger
+** exits.  Upon entering a before or instead of trigger, lastRowid is no
+** longer (since after version 2.8.12) reset to -1.
+**
+** The sqlite.nChange does not count changes within triggers and keeps no
+** context.  It is reset at start of sqlite3_exec.
+** The sqlite.lsChange represents the number of changes made by the last
+** insert, update, or delete statement.  It remains constant throughout the
+** length of a statement and is then updated by OP_SetCounts.  It keeps a
+** context stack just like lastRowid so that the count of changes
+** within a trigger is not seen outside the trigger.  Changes to views do not
+** affect the value of lsChange.
+** The sqlite.csChange keeps track of the number of current changes (since
+** the last statement) and is used to update sqlite_lsChange.
+**
+** The member variables sqlite.errCode, sqlite.zErrMsg and sqlite.zErrMsg16
+** store the most recent error code and, if applicable, string. The
+** internal function sqlite3Error() is used to set these variables
+** consistently.
+*/
+struct sqlite3 {
+  sqlite3_vfs *pVfs;            /* OS Interface */
+  int nDb;                      /* Number of backends currently in use */
+  Db *aDb;                      /* All backends */
+  int flags;                    /* Miscellaneous flags. See below */
+  int openFlags;                /* Flags passed to sqlite3_vfs.xOpen() */
+  int errCode;                  /* Most recent error code (SQLITE_*) */
+  int errMask;                  /* & result codes with this before returning */
+  u8 autoCommit;                /* The auto-commit flag. */
+  u8 temp_store;                /* 1: file 2: memory 0: default */
+  u8 mallocFailed;              /* True if we have seen a malloc failure */
+  u8 dfltLockMode;              /* Default locking-mode for attached dbs */
+  signed char nextAutovac;      /* Autovac setting after VACUUM if >=0 */
+  u8 suppressErr;               /* Do not issue error messages if true */
+  int nextPagesize;             /* Pagesize after VACUUM if >0 */
+  int nTable;                   /* Number of tables in the database */
+  CollSeq *pDfltColl;           /* The default collating sequence (BINARY) */
+  i64 lastRowid;                /* ROWID of most recent insert (see above) */
+  u32 magic;                    /* Magic number for detect library misuse */
+  int nChange;                  /* Value returned by sqlite3_changes() */
+  int nTotalChange;             /* Value returned by sqlite3_total_changes() */
+  sqlite3_mutex *mutex;         /* Connection mutex */
+  int aLimit[SQLITE_N_LIMIT];   /* Limits */
+  struct sqlite3InitInfo {      /* Information used during initialization */
+    int iDb;                    /* When back is being initialized */
+    int newTnum;                /* Rootpage of table being initialized */
+    u8 busy;                    /* TRUE if currently initializing */
+    u8 orphanTrigger;           /* Last statement is orphaned TEMP trigger */
+  } init;
+  int nExtension;               /* Number of loaded extensions */
+  void **aExtension;            /* Array of shared library handles */
+  struct Vdbe *pVdbe;           /* List of active virtual machines */
+  int activeVdbeCnt;            /* Number of VDBEs currently executing */
+  int writeVdbeCnt;             /* Number of active VDBEs that are writing */
+  int vdbeExecCnt;              /* Number of nested calls to VdbeExec() */
+  void (*xTrace)(void*,const char*);        /* Trace function */
+  void *pTraceArg;                          /* Argument to the trace function */
+  void (*xProfile)(void*,const char*,u64);  /* Profiling function */
+  void *pProfileArg;                        /* Argument to profile function */
+  void *pCommitArg;                 /* Argument to xCommitCallback() */   
+  int (*xCommitCallback)(void*);    /* Invoked at every commit. */
+  void *pRollbackArg;               /* Argument to xRollbackCallback() */   
+  void (*xRollbackCallback)(void*); /* Invoked at every commit. */
+  void *pUpdateArg;
+  void (*xUpdateCallback)(void*,int, const char*,const char*,sqlite_int64);
+#ifndef SQLITE_OMIT_WAL
+  int (*xWalCallback)(void *, sqlite3 *, const char *, int);
+  void *pWalArg;
+#endif
+  void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*);
+  void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*);
+  void *pCollNeededArg;
+  sqlite3_value *pErr;          /* Most recent error message */
+  char *zErrMsg;                /* Most recent error message (UTF-8 encoded) */
+  char *zErrMsg16;              /* Most recent error message (UTF-16 encoded) */
+  union {
+    volatile int isInterrupted; /* True if sqlite3_interrupt has been called */
+    double notUsed1;            /* Spacer */
+  } u1;
+  Lookaside lookaside;          /* Lookaside malloc configuration */
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*);
+                                /* Access authorization function */
+  void *pAuthArg;               /* 1st argument to the access auth function */
+#endif
+#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
+  int (*xProgress)(void *);     /* The progress callback */
+  void *pProgressArg;           /* Argument to the progress callback */
+  int nProgressOps;             /* Number of opcodes for progress callback */
+#endif
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  Hash aModule;                 /* populated by sqlite3_create_module() */
+  Table *pVTab;                 /* vtab with active Connect/Create method */
+  VTable **aVTrans;             /* Virtual tables with open transactions */
+  int nVTrans;                  /* Allocated size of aVTrans */
+  VTable *pDisconnect;    /* Disconnect these in next sqlite3_prepare() */
+#endif
+  FuncDefHash aFunc;            /* Hash table of connection functions */
+  Hash aCollSeq;                /* All collating sequences */
+  BusyHandler busyHandler;      /* Busy callback */
+  int busyTimeout;              /* Busy handler timeout, in msec */
+  Db aDbStatic[2];              /* Static space for the 2 default backends */
+  Savepoint *pSavepoint;        /* List of active savepoints */
+  int nSavepoint;               /* Number of non-transaction savepoints */
+  int nStatement;               /* Number of nested statement-transactions  */
+  u8 isTransactionSavepoint;    /* True if the outermost savepoint is a TS */
+  i64 nDeferredCons;            /* Net deferred constraints this transaction. */
+  int *pnBytesFreed;            /* If not NULL, increment this in DbFree() */
+
+#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
+  /* The following variables are all protected by the STATIC_MASTER 
+  ** mutex, not by sqlite3.mutex. They are used by code in notify.c. 
+  **
+  ** When X.pUnlockConnection==Y, that means that X is waiting for Y to
+  ** unlock so that it can proceed.
+  **
+  ** When X.pBlockingConnection==Y, that means that something that X tried
+  ** tried to do recently failed with an SQLITE_LOCKED error due to locks
+  ** held by Y.
+  */
+  sqlite3 *pBlockingConnection; /* Connection that caused SQLITE_LOCKED */
+  sqlite3 *pUnlockConnection;           /* Connection to watch for unlock */
+  void *pUnlockArg;                     /* Argument to xUnlockNotify */
+  void (*xUnlockNotify)(void **, int);  /* Unlock notify callback */
+  sqlite3 *pNextBlocked;        /* Next in list of all blocked connections */
+#endif
+};
+
+/*
+** A macro to discover the encoding of a database.
+*/
+#define ENC(db) ((db)->aDb[0].pSchema->enc)
+
+/*
+** Possible values for the sqlite3.flags.
+*/
+#define SQLITE_VdbeTrace      0x00000100  /* True to trace VDBE execution */
+#define SQLITE_InternChanges  0x00000200  /* Uncommitted Hash table changes */
+#define SQLITE_FullColNames   0x00000400  /* Show full column names on SELECT */
+#define SQLITE_ShortColNames  0x00000800  /* Show short columns names */
+#define SQLITE_CountRows      0x00001000  /* Count rows changed by INSERT, */
+                                          /*   DELETE, or UPDATE and return */
+                                          /*   the count using a callback. */
+#define SQLITE_NullCallback   0x00002000  /* Invoke the callback once if the */
+                                          /*   result set is empty */
+#define SQLITE_SqlTrace       0x00004000  /* Debug print SQL as it executes */
+#define SQLITE_VdbeListing    0x00008000  /* Debug listings of VDBE programs */
+#define SQLITE_WriteSchema    0x00010000  /* OK to update SQLITE_MASTER */
+#define SQLITE_NoReadlock     0x00020000  /* Readlocks are omitted when 
+                                          ** accessing read-only databases */
+#define SQLITE_IgnoreChecks   0x00040000  /* Do not enforce check constraints */
+#define SQLITE_ReadUncommitted 0x0080000  /* For shared-cache mode */
+#define SQLITE_LegacyFileFmt  0x00100000  /* Create new databases in format 1 */
+#define SQLITE_FullFSync      0x00200000  /* Use full fsync on the backend */
+#define SQLITE_CkptFullFSync  0x00400000  /* Use full fsync for checkpoint */
+#define SQLITE_RecoveryMode   0x00800000  /* Ignore schema errors */
+#define SQLITE_ReverseOrder   0x01000000  /* Reverse unordered SELECTs */
+#define SQLITE_RecTriggers    0x02000000  /* Enable recursive triggers */
+#define SQLITE_ForeignKeys    0x04000000  /* Enforce foreign key constraints  */
+#define SQLITE_AutoIndex      0x08000000  /* Enable automatic indexes */
+#define SQLITE_PreferBuiltin  0x10000000  /* Preference to built-in funcs */
+#define SQLITE_LoadExtension  0x20000000  /* Enable load_extension */
+#define SQLITE_EnableTrigger  0x40000000  /* True to enable triggers */
+
+/*
+** Bits of the sqlite3.flags field that are used by the
+** sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS,...) interface.
+** These must be the low-order bits of the flags field.
+*/
+#define SQLITE_QueryFlattener 0x01        /* Disable query flattening */
+#define SQLITE_ColumnCache    0x02        /* Disable the column cache */
+#define SQLITE_IndexSort      0x04        /* Disable indexes for sorting */
+#define SQLITE_IndexSearch    0x08        /* Disable indexes for searching */
+#define SQLITE_IndexCover     0x10        /* Disable index covering table */
+#define SQLITE_GroupByOrder   0x20        /* Disable GROUPBY cover of ORDERBY */
+#define SQLITE_FactorOutConst 0x40        /* Disable factoring out constants */
+#define SQLITE_OptMask        0xff        /* Mask of all disablable opts */
+
+/*
+** Possible values for the sqlite.magic field.
+** The numbers are obtained at random and have no special meaning, other
+** than being distinct from one another.
+*/
+#define SQLITE_MAGIC_OPEN     0xa029a697  /* Database is open */
+#define SQLITE_MAGIC_CLOSED   0x9f3c2d33  /* Database is closed */
+#define SQLITE_MAGIC_SICK     0x4b771290  /* Error and awaiting close */
+#define SQLITE_MAGIC_BUSY     0xf03b7906  /* Database currently in use */
+#define SQLITE_MAGIC_ERROR    0xb5357930  /* An SQLITE_MISUSE error occurred */
+
+/*
+** Each SQL function is defined by an instance of the following
+** structure.  A pointer to this structure is stored in the sqlite.aFunc
+** hash table.  When multiple functions have the same name, the hash table
+** points to a linked list of these structures.
+*/
+struct FuncDef {
+  i16 nArg;            /* Number of arguments.  -1 means unlimited */
+  u8 iPrefEnc;         /* Preferred text encoding (SQLITE_UTF8, 16LE, 16BE) */
+  u8 flags;            /* Some combination of SQLITE_FUNC_* */
+  void *pUserData;     /* User data parameter */
+  FuncDef *pNext;      /* Next function with same name */
+  void (*xFunc)(sqlite3_context*,int,sqlite3_value**); /* Regular function */
+  void (*xStep)(sqlite3_context*,int,sqlite3_value**); /* Aggregate step */
+  void (*xFinalize)(sqlite3_context*);                /* Aggregate finalizer */
+  char *zName;         /* SQL name of the function. */
+  FuncDef *pHash;      /* Next with a different name but the same hash */
+  FuncDestructor *pDestructor;   /* Reference counted destructor function */
+};
+
+/*
+** This structure encapsulates a user-function destructor callback (as
+** configured using create_function_v2()) and a reference counter. When
+** create_function_v2() is called to create a function with a destructor,
+** a single object of this type is allocated. FuncDestructor.nRef is set to 
+** the number of FuncDef objects created (either 1 or 3, depending on whether
+** or not the specified encoding is SQLITE_ANY). The FuncDef.pDestructor
+** member of each of the new FuncDef objects is set to point to the allocated
+** FuncDestructor.
+**
+** Thereafter, when one of the FuncDef objects is deleted, the reference
+** count on this object is decremented. When it reaches 0, the destructor
+** is invoked and the FuncDestructor structure freed.
+*/
+struct FuncDestructor {
+  int nRef;
+  void (*xDestroy)(void *);
+  void *pUserData;
+};
+
+/*
+** Possible values for FuncDef.flags
+*/
+#define SQLITE_FUNC_LIKE     0x01 /* Candidate for the LIKE optimization */
+#define SQLITE_FUNC_CASE     0x02 /* Case-sensitive LIKE-type function */
+#define SQLITE_FUNC_EPHEM    0x04 /* Ephemeral.  Delete with VDBE */
+#define SQLITE_FUNC_NEEDCOLL 0x08 /* sqlite3GetFuncCollSeq() might be called */
+#define SQLITE_FUNC_PRIVATE  0x10 /* Allowed for internal use only */
+#define SQLITE_FUNC_COUNT    0x20 /* Built-in count(*) aggregate */
+#define SQLITE_FUNC_COALESCE 0x40 /* Built-in coalesce() or ifnull() function */
+
+/*
+** The following three macros, FUNCTION(), LIKEFUNC() and AGGREGATE() are
+** used to create the initializers for the FuncDef structures.
+**
+**   FUNCTION(zName, nArg, iArg, bNC, xFunc)
+**     Used to create a scalar function definition of a function zName 
+**     implemented by C function xFunc that accepts nArg arguments. The
+**     value passed as iArg is cast to a (void*) and made available
+**     as the user-data (sqlite3_user_data()) for the function. If 
+**     argument bNC is true, then the SQLITE_FUNC_NEEDCOLL flag is set.
+**
+**   AGGREGATE(zName, nArg, iArg, bNC, xStep, xFinal)
+**     Used to create an aggregate function definition implemented by
+**     the C functions xStep and xFinal. The first four parameters
+**     are interpreted in the same way as the first 4 parameters to
+**     FUNCTION().
+**
+**   LIKEFUNC(zName, nArg, pArg, flags)
+**     Used to create a scalar function definition of a function zName 
+**     that accepts nArg arguments and is implemented by a call to C 
+**     function likeFunc. Argument pArg is cast to a (void *) and made
+**     available as the function user-data (sqlite3_user_data()). The
+**     FuncDef.flags variable is set to the value passed as the flags
+**     parameter.
+*/
+#define FUNCTION(zName, nArg, iArg, bNC, xFunc) \
+  {nArg, SQLITE_UTF8, bNC*SQLITE_FUNC_NEEDCOLL, \
+   SQLITE_INT_TO_PTR(iArg), 0, xFunc, 0, 0, #zName, 0, 0}
+#define STR_FUNCTION(zName, nArg, pArg, bNC, xFunc) \
+  {nArg, SQLITE_UTF8, bNC*SQLITE_FUNC_NEEDCOLL, \
+   pArg, 0, xFunc, 0, 0, #zName, 0, 0}
+#define LIKEFUNC(zName, nArg, arg, flags) \
+  {nArg, SQLITE_UTF8, flags, (void *)arg, 0, likeFunc, 0, 0, #zName, 0, 0}
+#define AGGREGATE(zName, nArg, arg, nc, xStep, xFinal) \
+  {nArg, SQLITE_UTF8, nc*SQLITE_FUNC_NEEDCOLL, \
+   SQLITE_INT_TO_PTR(arg), 0, 0, xStep,xFinal,#zName,0,0}
+
+/*
+** All current savepoints are stored in a linked list starting at
+** sqlite3.pSavepoint. The first element in the list is the most recently
+** opened savepoint. Savepoints are added to the list by the vdbe
+** OP_Savepoint instruction.
+*/
+struct Savepoint {
+  char *zName;                        /* Savepoint name (nul-terminated) */
+  i64 nDeferredCons;                  /* Number of deferred fk violations */
+  Savepoint *pNext;                   /* Parent savepoint (if any) */
+};
+
+/*
+** The following are used as the second parameter to sqlite3Savepoint(),
+** and as the P1 argument to the OP_Savepoint instruction.
+*/
+#define SAVEPOINT_BEGIN      0
+#define SAVEPOINT_RELEASE    1
+#define SAVEPOINT_ROLLBACK   2
+
+
+/*
+** Each SQLite module (virtual table definition) is defined by an
+** instance of the following structure, stored in the sqlite3.aModule
+** hash table.
+*/
+struct Module {
+  const sqlite3_module *pModule;       /* Callback pointers */
+  const char *zName;                   /* Name passed to create_module() */
+  void *pAux;                          /* pAux passed to create_module() */
+  void (*xDestroy)(void *);            /* Module destructor function */
+};
+
+/*
+** information about each column of an SQL table is held in an instance
+** of this structure.
+*/
+struct Column {
+  char *zName;     /* Name of this column */
+  Expr *pDflt;     /* Default value of this column */
+  char *zDflt;     /* Original text of the default value */
+  char *zType;     /* Data type for this column */
+  char *zColl;     /* Collating sequence.  If NULL, use the default */
+  u8 notNull;      /* True if there is a NOT NULL constraint */
+  u8 isPrimKey;    /* True if this column is part of the PRIMARY KEY */
+  char affinity;   /* One of the SQLITE_AFF_... values */
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  u8 isHidden;     /* True if this column is 'hidden' */
+#endif
+};
+
+/*
+** A "Collating Sequence" is defined by an instance of the following
+** structure. Conceptually, a collating sequence consists of a name and
+** a comparison routine that defines the order of that sequence.
+**
+** There may two separate implementations of the collation function, one
+** that processes text in UTF-8 encoding (CollSeq.xCmp) and another that
+** processes text encoded in UTF-16 (CollSeq.xCmp16), using the machine
+** native byte order. When a collation sequence is invoked, SQLite selects
+** the version that will require the least expensive encoding
+** translations, if any.
+**
+** The CollSeq.pUser member variable is an extra parameter that passed in
+** as the first argument to the UTF-8 comparison function, xCmp.
+** CollSeq.pUser16 is the equivalent for the UTF-16 comparison function,
+** xCmp16.
+**
+** If both CollSeq.xCmp and CollSeq.xCmp16 are NULL, it means that the
+** collating sequence is undefined.  Indices built on an undefined
+** collating sequence may not be read or written.
+*/
+struct CollSeq {
+  char *zName;          /* Name of the collating sequence, UTF-8 encoded */
+  u8 enc;               /* Text encoding handled by xCmp() */
+  u8 type;              /* One of the SQLITE_COLL_... values below */
+  void *pUser;          /* First argument to xCmp() */
+  int (*xCmp)(void*,int, const void*, int, const void*);
+  void (*xDel)(void*);  /* Destructor for pUser */
+};
+
+/*
+** Allowed values of CollSeq.type:
+*/
+#define SQLITE_COLL_BINARY  1  /* The default memcmp() collating sequence */
+#define SQLITE_COLL_NOCASE  2  /* The built-in NOCASE collating sequence */
+#define SQLITE_COLL_REVERSE 3  /* The built-in REVERSE collating sequence */
+#define SQLITE_COLL_USER    0  /* Any other user-defined collating sequence */
+
+/*
+** A sort order can be either ASC or DESC.
+*/
+#define SQLITE_SO_ASC       0  /* Sort in ascending order */
+#define SQLITE_SO_DESC      1  /* Sort in ascending order */
+
+/*
+** Column affinity types.
+**
+** These used to have mnemonic name like 'i' for SQLITE_AFF_INTEGER and
+** 't' for SQLITE_AFF_TEXT.  But we can save a little space and improve
+** the speed a little by numbering the values consecutively.  
+**
+** But rather than start with 0 or 1, we begin with 'a'.  That way,
+** when multiple affinity types are concatenated into a string and
+** used as the P4 operand, they will be more readable.
+**
+** Note also that the numeric types are grouped together so that testing
+** for a numeric type is a single comparison.
+*/
+#define SQLITE_AFF_TEXT     'a'
+#define SQLITE_AFF_NONE     'b'
+#define SQLITE_AFF_NUMERIC  'c'
+#define SQLITE_AFF_INTEGER  'd'
+#define SQLITE_AFF_REAL     'e'
+
+#define sqlite3IsNumericAffinity(X)  ((X)>=SQLITE_AFF_NUMERIC)
+
+/*
+** The SQLITE_AFF_MASK values masks off the significant bits of an
+** affinity value. 
+*/
+#define SQLITE_AFF_MASK     0x67
+
+/*
+** Additional bit values that can be ORed with an affinity without
+** changing the affinity.
+*/
+#define SQLITE_JUMPIFNULL   0x08  /* jumps if either operand is NULL */
+#define SQLITE_STOREP2      0x10  /* Store result in reg[P2] rather than jump */
+#define SQLITE_NULLEQ       0x80  /* NULL=NULL */
+
+/*
+** An object of this type is created for each virtual table present in
+** the database schema. 
+**
+** If the database schema is shared, then there is one instance of this
+** structure for each database connection (sqlite3*) that uses the shared
+** schema. This is because each database connection requires its own unique
+** instance of the sqlite3_vtab* handle used to access the virtual table 
+** implementation. sqlite3_vtab* handles can not be shared between 
+** database connections, even when the rest of the in-memory database 
+** schema is shared, as the implementation often stores the database
+** connection handle passed to it via the xConnect() or xCreate() method
+** during initialization internally. This database connection handle may
+** then be used by the virtual table implementation to access real tables 
+** within the database. So that they appear as part of the callers 
+** transaction, these accesses need to be made via the same database 
+** connection as that used to execute SQL operations on the virtual table.
+**
+** All VTable objects that correspond to a single table in a shared
+** database schema are initially stored in a linked-list pointed to by
+** the Table.pVTable member variable of the corresponding Table object.
+** When an sqlite3_prepare() operation is required to access the virtual
+** table, it searches the list for the VTable that corresponds to the
+** database connection doing the preparing so as to use the correct
+** sqlite3_vtab* handle in the compiled query.
+**
+** When an in-memory Table object is deleted (for example when the
+** schema is being reloaded for some reason), the VTable objects are not 
+** deleted and the sqlite3_vtab* handles are not xDisconnect()ed 
+** immediately. Instead, they are moved from the Table.pVTable list to
+** another linked list headed by the sqlite3.pDisconnect member of the
+** corresponding sqlite3 structure. They are then deleted/xDisconnected 
+** next time a statement is prepared using said sqlite3*. This is done
+** to avoid deadlock issues involving multiple sqlite3.mutex mutexes.
+** Refer to comments above function sqlite3VtabUnlockList() for an
+** explanation as to why it is safe to add an entry to an sqlite3.pDisconnect
+** list without holding the corresponding sqlite3.mutex mutex.
+**
+** The memory for objects of this type is always allocated by 
+** sqlite3DbMalloc(), using the connection handle stored in VTable.db as 
+** the first argument.
+*/
+struct VTable {
+  sqlite3 *db;              /* Database connection associated with this table */
+  Module *pMod;             /* Pointer to module implementation */
+  sqlite3_vtab *pVtab;      /* Pointer to vtab instance */
+  int nRef;                 /* Number of pointers to this structure */
+  VTable *pNext;            /* Next in linked list (see above) */
+};
+
+/*
+** Each SQL table is represented in memory by an instance of the
+** following structure.
+**
+** Table.zName is the name of the table.  The case of the original
+** CREATE TABLE statement is stored, but case is not significant for
+** comparisons.
+**
+** Table.nCol is the number of columns in this table.  Table.aCol is a
+** pointer to an array of Column structures, one for each column.
+**
+** If the table has an INTEGER PRIMARY KEY, then Table.iPKey is the index of
+** the column that is that key.   Otherwise Table.iPKey is negative.  Note
+** that the datatype of the PRIMARY KEY must be INTEGER for this field to
+** be set.  An INTEGER PRIMARY KEY is used as the rowid for each row of
+** the table.  If a table has no INTEGER PRIMARY KEY, then a random rowid
+** is generated for each row of the table.  TF_HasPrimaryKey is set if
+** the table has any PRIMARY KEY, INTEGER or otherwise.
+**
+** Table.tnum is the page number for the root BTree page of the table in the
+** database file.  If Table.iDb is the index of the database table backend
+** in sqlite.aDb[].  0 is for the main database and 1 is for the file that
+** holds temporary tables and indices.  If TF_Ephemeral is set
+** then the table is stored in a file that is automatically deleted
+** when the VDBE cursor to the table is closed.  In this case Table.tnum 
+** refers VDBE cursor number that holds the table open, not to the root
+** page number.  Transient tables are used to hold the results of a
+** sub-query that appears instead of a real table name in the FROM clause 
+** of a SELECT statement.
+*/
+struct Table {
+  char *zName;         /* Name of the table or view */
+  int iPKey;           /* If not negative, use aCol[iPKey] as the primary key */
+  int nCol;            /* Number of columns in this table */
+  Column *aCol;        /* Information about each column */
+  Index *pIndex;       /* List of SQL indexes on this table. */
+  int tnum;            /* Root BTree node for this table (see note above) */
+  unsigned nRowEst;    /* Estimated rows in table - from sqlite_stat1 table */
+  Select *pSelect;     /* NULL for tables.  Points to definition if a view. */
+  u16 nRef;            /* Number of pointers to this Table */
+  u8 tabFlags;         /* Mask of TF_* values */
+  u8 keyConf;          /* What to do in case of uniqueness conflict on iPKey */
+  FKey *pFKey;         /* Linked list of all foreign keys in this table */
+  char *zColAff;       /* String defining the affinity of each column */
+#ifndef SQLITE_OMIT_CHECK
+  Expr *pCheck;        /* The AND of all CHECK constraints */
+#endif
+#ifndef SQLITE_OMIT_ALTERTABLE
+  int addColOffset;    /* Offset in CREATE TABLE stmt to add a new column */
+#endif
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  VTable *pVTable;     /* List of VTable objects. */
+  int nModuleArg;      /* Number of arguments to the module */
+  char **azModuleArg;  /* Text of all module args. [0] is module name */
+#endif
+  Trigger *pTrigger;   /* List of triggers stored in pSchema */
+  Schema *pSchema;     /* Schema that contains this table */
+  Table *pNextZombie;  /* Next on the Parse.pZombieTab list */
+};
+
+/*
+** Allowed values for Tabe.tabFlags.
+*/
+#define TF_Readonly        0x01    /* Read-only system table */
+#define TF_Ephemeral       0x02    /* An ephemeral table */
+#define TF_HasPrimaryKey   0x04    /* Table has a primary key */
+#define TF_Autoincrement   0x08    /* Integer primary key is autoincrement */
+#define TF_Virtual         0x10    /* Is a virtual table */
+#define TF_NeedMetadata    0x20    /* aCol[].zType and aCol[].pColl missing */
+
+
+
+/*
+** Test to see whether or not a table is a virtual table.  This is
+** done as a macro so that it will be optimized out when virtual
+** table support is omitted from the build.
+*/
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+#  define IsVirtual(X)      (((X)->tabFlags & TF_Virtual)!=0)
+#  define IsHiddenColumn(X) ((X)->isHidden)
+#else
+#  define IsVirtual(X)      0
+#  define IsHiddenColumn(X) 0
+#endif
+
+/*
+** Each foreign key constraint is an instance of the following structure.
+**
+** A foreign key is associated with two tables.  The "from" table is
+** the table that contains the REFERENCES clause that creates the foreign
+** key.  The "to" table is the table that is named in the REFERENCES clause.
+** Consider this example:
+**
+**     CREATE TABLE ex1(
+**       a INTEGER PRIMARY KEY,
+**       b INTEGER CONSTRAINT fk1 REFERENCES ex2(x)
+**     );
+**
+** For foreign key "fk1", the from-table is "ex1" and the to-table is "ex2".
+**
+** Each REFERENCES clause generates an instance of the following structure
+** which is attached to the from-table.  The to-table need not exist when
+** the from-table is created.  The existence of the to-table is not checked.
+*/
+struct FKey {
+  Table *pFrom;     /* Table containing the REFERENCES clause (aka: Child) */
+  FKey *pNextFrom;  /* Next foreign key in pFrom */
+  char *zTo;        /* Name of table that the key points to (aka: Parent) */
+  FKey *pNextTo;    /* Next foreign key on table named zTo */
+  FKey *pPrevTo;    /* Previous foreign key on table named zTo */
+  int nCol;         /* Number of columns in this key */
+  /* EV: R-30323-21917 */
+  u8 isDeferred;    /* True if constraint checking is deferred till COMMIT */
+  u8 aAction[2];          /* ON DELETE and ON UPDATE actions, respectively */
+  Trigger *apTrigger[2];  /* Triggers for aAction[] actions */
+  struct sColMap {  /* Mapping of columns in pFrom to columns in zTo */
+    int iFrom;         /* Index of column in pFrom */
+    char *zCol;        /* Name of column in zTo.  If 0 use PRIMARY KEY */
+  } aCol[1];        /* One entry for each of nCol column s */
+};
+
+/*
+** SQLite supports many different ways to resolve a constraint
+** error.  ROLLBACK processing means that a constraint violation
+** causes the operation in process to fail and for the current transaction
+** to be rolled back.  ABORT processing means the operation in process
+** fails and any prior changes from that one operation are backed out,
+** but the transaction is not rolled back.  FAIL processing means that
+** the operation in progress stops and returns an error code.  But prior
+** changes due to the same operation are not backed out and no rollback
+** occurs.  IGNORE means that the particular row that caused the constraint
+** error is not inserted or updated.  Processing continues and no error
+** is returned.  REPLACE means that preexisting database rows that caused
+** a UNIQUE constraint violation are removed so that the new insert or
+** update can proceed.  Processing continues and no error is reported.
+**
+** RESTRICT, SETNULL, and CASCADE actions apply only to foreign keys.
+** RESTRICT is the same as ABORT for IMMEDIATE foreign keys and the
+** same as ROLLBACK for DEFERRED keys.  SETNULL means that the foreign
+** key is set to NULL.  CASCADE means that a DELETE or UPDATE of the
+** referenced table row is propagated into the row that holds the
+** foreign key.
+** 
+** The following symbolic values are used to record which type
+** of action to take.
+*/
+#define OE_None     0   /* There is no constraint to check */
+#define OE_Rollback 1   /* Fail the operation and rollback the transaction */
+#define OE_Abort    2   /* Back out changes but do no rollback transaction */
+#define OE_Fail     3   /* Stop the operation but leave all prior changes */
+#define OE_Ignore   4   /* Ignore the error. Do not do the INSERT or UPDATE */
+#define OE_Replace  5   /* Delete existing record, then do INSERT or UPDATE */
+
+#define OE_Restrict 6   /* OE_Abort for IMMEDIATE, OE_Rollback for DEFERRED */
+#define OE_SetNull  7   /* Set the foreign key value to NULL */
+#define OE_SetDflt  8   /* Set the foreign key value to its default */
+#define OE_Cascade  9   /* Cascade the changes */
+
+#define OE_Default  99  /* Do whatever the default action is */
+
+
+/*
+** An instance of the following structure is passed as the first
+** argument to sqlite3VdbeKeyCompare and is used to control the 
+** comparison of the two index keys.
+*/
+struct KeyInfo {
+  sqlite3 *db;        /* The database connection */
+  u8 enc;             /* Text encoding - one of the SQLITE_UTF* values */
+  u16 nField;         /* Number of entries in aColl[] */
+  u8 *aSortOrder;     /* Sort order for each column.  May be NULL */
+  CollSeq *aColl[1];  /* Collating sequence for each term of the key */
+};
+
+/*
+** An instance of the following structure holds information about a
+** single index record that has already been parsed out into individual
+** values.
+**
+** A record is an object that contains one or more fields of data.
+** Records are used to store the content of a table row and to store
+** the key of an index.  A blob encoding of a record is created by
+** the OP_MakeRecord opcode of the VDBE and is disassembled by the
+** OP_Column opcode.
+**
+** This structure holds a record that has already been disassembled
+** into its constituent fields.
+*/
+struct UnpackedRecord {
+  KeyInfo *pKeyInfo;  /* Collation and sort-order information */
+  u16 nField;         /* Number of entries in apMem[] */
+  u16 flags;          /* Boolean settings.  UNPACKED_... below */
+  i64 rowid;          /* Used by UNPACKED_PREFIX_SEARCH */
+  Mem *aMem;          /* Values */
+};
+
+/*
+** Allowed values of UnpackedRecord.flags
+*/
+#define UNPACKED_NEED_FREE     0x0001  /* Memory is from sqlite3Malloc() */
+#define UNPACKED_NEED_DESTROY  0x0002  /* apMem[]s should all be destroyed */
+#define UNPACKED_IGNORE_ROWID  0x0004  /* Ignore trailing rowid on key1 */
+#define UNPACKED_INCRKEY       0x0008  /* Make this key an epsilon larger */
+#define UNPACKED_PREFIX_MATCH  0x0010  /* A prefix match is considered OK */
+#define UNPACKED_PREFIX_SEARCH 0x0020  /* A prefix match is considered OK */
+
+/*
+** Each SQL index is represented in memory by an
+** instance of the following structure.
+**
+** The columns of the table that are to be indexed are described
+** by the aiColumn[] field of this structure.  For example, suppose
+** we have the following table and index:
+**
+**     CREATE TABLE Ex1(c1 int, c2 int, c3 text);
+**     CREATE INDEX Ex2 ON Ex1(c3,c1);
+**
+** In the Table structure describing Ex1, nCol==3 because there are
+** three columns in the table.  In the Index structure describing
+** Ex2, nColumn==2 since 2 of the 3 columns of Ex1 are indexed.
+** The value of aiColumn is {2, 0}.  aiColumn[0]==2 because the 
+** first column to be indexed (c3) has an index of 2 in Ex1.aCol[].
+** The second column to be indexed (c1) has an index of 0 in
+** Ex1.aCol[], hence Ex2.aiColumn[1]==0.
+**
+** The Index.onError field determines whether or not the indexed columns
+** must be unique and what to do if they are not.  When Index.onError=OE_None,
+** it means this is not a unique index.  Otherwise it is a unique index
+** and the value of Index.onError indicate the which conflict resolution 
+** algorithm to employ whenever an attempt is made to insert a non-unique
+** element.
+*/
+struct Index {
+  char *zName;     /* Name of this index */
+  int nColumn;     /* Number of columns in the table used by this index */
+  int *aiColumn;   /* Which columns are used by this index.  1st is 0 */
+  unsigned *aiRowEst; /* Result of ANALYZE: Est. rows selected by each column */
+  Table *pTable;   /* The SQL table being indexed */
+  int tnum;        /* Page containing root of this index in database file */
+  u8 onError;      /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
+  u8 autoIndex;    /* True if is automatically created (ex: by UNIQUE) */
+  u8 bUnordered;   /* Use this index for == or IN queries only */
+  char *zColAff;   /* String defining the affinity of each column */
+  Index *pNext;    /* The next index associated with the same table */
+  Schema *pSchema; /* Schema containing this index */
+  u8 *aSortOrder;  /* Array of size Index.nColumn. True==DESC, False==ASC */
+  char **azColl;   /* Array of collation sequence names for index */
+  IndexSample *aSample;    /* Array of SQLITE_INDEX_SAMPLES samples */
+};
+
+/*
+** Each sample stored in the sqlite_stat2 table is represented in memory 
+** using a structure of this type.
+*/
+struct IndexSample {
+  union {
+    char *z;        /* Value if eType is SQLITE_TEXT or SQLITE_BLOB */
+    double r;       /* Value if eType is SQLITE_FLOAT or SQLITE_INTEGER */
+  } u;
+  u8 eType;         /* SQLITE_NULL, SQLITE_INTEGER ... etc. */
+  u8 nByte;         /* Size in byte of text or blob. */
+};
+
+/*
+** Each token coming out of the lexer is an instance of
+** this structure.  Tokens are also used as part of an expression.
+**
+** Note if Token.z==0 then Token.dyn and Token.n are undefined and
+** may contain random values.  Do not make any assumptions about Token.dyn
+** and Token.n when Token.z==0.
+*/
+struct Token {
+  const char *z;     /* Text of the token.  Not NULL-terminated! */
+  unsigned int n;    /* Number of characters in this token */
+};
+
+/*
+** An instance of this structure contains information needed to generate
+** code for a SELECT that contains aggregate functions.
+**
+** If Expr.op==TK_AGG_COLUMN or TK_AGG_FUNCTION then Expr.pAggInfo is a
+** pointer to this structure.  The Expr.iColumn field is the index in
+** AggInfo.aCol[] or AggInfo.aFunc[] of information needed to generate
+** code for that node.
+**
+** AggInfo.pGroupBy and AggInfo.aFunc.pExpr point to fields within the
+** original Select structure that describes the SELECT statement.  These
+** fields do not need to be freed when deallocating the AggInfo structure.
+*/
+struct AggInfo {
+  u8 directMode;          /* Direct rendering mode means take data directly
+                          ** from source tables rather than from accumulators */
+  u8 useSortingIdx;       /* In direct mode, reference the sorting index rather
+                          ** than the source table */
+  int sortingIdx;         /* Cursor number of the sorting index */
+  ExprList *pGroupBy;     /* The group by clause */
+  int nSortingColumn;     /* Number of columns in the sorting index */
+  struct AggInfo_col {    /* For each column used in source tables */
+    Table *pTab;             /* Source table */
+    int iTable;              /* Cursor number of the source table */
+    int iColumn;             /* Column number within the source table */
+    int iSorterColumn;       /* Column number in the sorting index */
+    int iMem;                /* Memory location that acts as accumulator */
+    Expr *pExpr;             /* The original expression */
+  } *aCol;
+  int nColumn;            /* Number of used entries in aCol[] */
+  int nColumnAlloc;       /* Number of slots allocated for aCol[] */
+  int nAccumulator;       /* Number of columns that show through to the output.
+                          ** Additional columns are used only as parameters to
+                          ** aggregate functions */
+  struct AggInfo_func {   /* For each aggregate function */
+    Expr *pExpr;             /* Expression encoding the function */
+    FuncDef *pFunc;          /* The aggregate function implementation */
+    int iMem;                /* Memory location that acts as accumulator */
+    int iDistinct;           /* Ephemeral table used to enforce DISTINCT */
+  } *aFunc;
+  int nFunc;              /* Number of entries in aFunc[] */
+  int nFuncAlloc;         /* Number of slots allocated for aFunc[] */
+};
+
+/*
+** The datatype ynVar is a signed integer, either 16-bit or 32-bit.
+** Usually it is 16-bits.  But if SQLITE_MAX_VARIABLE_NUMBER is greater
+** than 32767 we have to make it 32-bit.  16-bit is preferred because
+** it uses less memory in the Expr object, which is a big memory user
+** in systems with lots of prepared statements.  And few applications
+** need more than about 10 or 20 variables.  But some extreme users want
+** to have prepared statements with over 32767 variables, and for them
+** the option is available (at compile-time).
+*/
+#if SQLITE_MAX_VARIABLE_NUMBER<=32767
+typedef i16 ynVar;
+#else
+typedef int ynVar;
+#endif
+
+/*
+** Each node of an expression in the parse tree is an instance
+** of this structure.
+**
+** Expr.op is the opcode. The integer parser token codes are reused
+** as opcodes here. For example, the parser defines TK_GE to be an integer
+** code representing the ">=" operator. This same integer code is reused
+** to represent the greater-than-or-equal-to operator in the expression
+** tree.
+**
+** If the expression is an SQL literal (TK_INTEGER, TK_FLOAT, TK_BLOB, 
+** or TK_STRING), then Expr.token contains the text of the SQL literal. If
+** the expression is a variable (TK_VARIABLE), then Expr.token contains the 
+** variable name. Finally, if the expression is an SQL function (TK_FUNCTION),
+** then Expr.token contains the name of the function.
+**
+** Expr.pRight and Expr.pLeft are the left and right subexpressions of a
+** binary operator. Either or both may be NULL.
+**
+** Expr.x.pList is a list of arguments if the expression is an SQL function,
+** a CASE expression or an IN expression of the form "<lhs> IN (<y>, <z>...)".
+** Expr.x.pSelect is used if the expression is a sub-select or an expression of
+** the form "<lhs> IN (SELECT ...)". If the EP_xIsSelect bit is set in the
+** Expr.flags mask, then Expr.x.pSelect is valid. Otherwise, Expr.x.pList is 
+** valid.
+**
+** An expression of the form ID or ID.ID refers to a column in a table.
+** For such expressions, Expr.op is set to TK_COLUMN and Expr.iTable is
+** the integer cursor number of a VDBE cursor pointing to that table and
+** Expr.iColumn is the column number for the specific column.  If the
+** expression is used as a result in an aggregate SELECT, then the
+** value is also stored in the Expr.iAgg column in the aggregate so that
+** it can be accessed after all aggregates are computed.
+**
+** If the expression is an unbound variable marker (a question mark 
+** character '?' in the original SQL) then the Expr.iTable holds the index 
+** number for that variable.
+**
+** If the expression is a subquery then Expr.iColumn holds an integer
+** register number containing the result of the subquery.  If the
+** subquery gives a constant result, then iTable is -1.  If the subquery
+** gives a different answer at different times during statement processing
+** then iTable is the address of a subroutine that computes the subquery.
+**
+** If the Expr is of type OP_Column, and the table it is selecting from
+** is a disk table or the "old.*" pseudo-table, then pTab points to the
+** corresponding table definition.
+**
+** ALLOCATION NOTES:
+**
+** Expr objects can use a lot of memory space in database schema.  To
+** help reduce memory requirements, sometimes an Expr object will be
+** truncated.  And to reduce the number of memory allocations, sometimes
+** two or more Expr objects will be stored in a single memory allocation,
+** together with Expr.zToken strings.
+**
+** If the EP_Reduced and EP_TokenOnly flags are set when
+** an Expr object is truncated.  When EP_Reduced is set, then all
+** the child Expr objects in the Expr.pLeft and Expr.pRight subtrees
+** are contained within the same memory allocation.  Note, however, that
+** the subtrees in Expr.x.pList or Expr.x.pSelect are always separately
+** allocated, regardless of whether or not EP_Reduced is set.
+*/
+struct Expr {
+  u8 op;                 /* Operation performed by this node */
+  char affinity;         /* The affinity of the column or 0 if not a column */
+  u16 flags;             /* Various flags.  EP_* See below */
+  union {
+    char *zToken;          /* Token value. Zero terminated and dequoted */
+    int iValue;            /* Non-negative integer value if EP_IntValue */
+  } u;
+
+  /* If the EP_TokenOnly flag is set in the Expr.flags mask, then no
+  ** space is allocated for the fields below this point. An attempt to
+  ** access them will result in a segfault or malfunction. 
+  *********************************************************************/
+
+  Expr *pLeft;           /* Left subnode */
+  Expr *pRight;          /* Right subnode */
+  union {
+    ExprList *pList;     /* Function arguments or in "<expr> IN (<expr-list)" */
+    Select *pSelect;     /* Used for sub-selects and "<expr> IN (<select>)" */
+  } x;
+  CollSeq *pColl;        /* The collation type of the column or 0 */
+
+  /* If the EP_Reduced flag is set in the Expr.flags mask, then no
+  ** space is allocated for the fields below this point. An attempt to
+  ** access them will result in a segfault or malfunction.
+  *********************************************************************/
+
+  int iTable;            /* TK_COLUMN: cursor number of table holding column
+                         ** TK_REGISTER: register number
+                         ** TK_TRIGGER: 1 -> new, 0 -> old */
+  ynVar iColumn;         /* TK_COLUMN: column index.  -1 for rowid.
+                         ** TK_VARIABLE: variable number (always >= 1). */
+  i16 iAgg;              /* Which entry in pAggInfo->aCol[] or ->aFunc[] */
+  i16 iRightJoinTable;   /* If EP_FromJoin, the right table of the join */
+  u8 flags2;             /* Second set of flags.  EP2_... */
+  u8 op2;                /* If a TK_REGISTER, the original value of Expr.op */
+  AggInfo *pAggInfo;     /* Used by TK_AGG_COLUMN and TK_AGG_FUNCTION */
+  Table *pTab;           /* Table for TK_COLUMN expressions. */
+#if SQLITE_MAX_EXPR_DEPTH>0
+  int nHeight;           /* Height of the tree headed by this node */
+#endif
+};
+
+/*
+** The following are the meanings of bits in the Expr.flags field.
+*/
+#define EP_FromJoin   0x0001  /* Originated in ON or USING clause of a join */
+#define EP_Agg        0x0002  /* Contains one or more aggregate functions */
+#define EP_Resolved   0x0004  /* IDs have been resolved to COLUMNs */
+#define EP_Error      0x0008  /* Expression contains one or more errors */
+#define EP_Distinct   0x0010  /* Aggregate function with DISTINCT keyword */
+#define EP_VarSelect  0x0020  /* pSelect is correlated, not constant */
+#define EP_DblQuoted  0x0040  /* token.z was originally in "..." */
+#define EP_InfixFunc  0x0080  /* True for an infix function: LIKE, GLOB, etc */
+#define EP_ExpCollate 0x0100  /* Collating sequence specified explicitly */
+#define EP_FixedDest  0x0200  /* Result needed in a specific register */
+#define EP_IntValue   0x0400  /* Integer value contained in u.iValue */
+#define EP_xIsSelect  0x0800  /* x.pSelect is valid (otherwise x.pList is) */
+
+#define EP_Reduced    0x1000  /* Expr struct is EXPR_REDUCEDSIZE bytes only */
+#define EP_TokenOnly  0x2000  /* Expr struct is EXPR_TOKENONLYSIZE bytes only */
+#define EP_Static     0x4000  /* Held in memory not obtained from malloc() */
+
+/*
+** The following are the meanings of bits in the Expr.flags2 field.
+*/
+#define EP2_MallocedToken  0x0001  /* Need to sqlite3DbFree() Expr.zToken */
+#define EP2_Irreducible    0x0002  /* Cannot EXPRDUP_REDUCE this Expr */
+
+/*
+** The pseudo-routine sqlite3ExprSetIrreducible sets the EP2_Irreducible
+** flag on an expression structure.  This flag is used for VV&A only.  The
+** routine is implemented as a macro that only works when in debugging mode,
+** so as not to burden production code.
+*/
+#ifdef SQLITE_DEBUG
+# define ExprSetIrreducible(X)  (X)->flags2 |= EP2_Irreducible
+#else
+# define ExprSetIrreducible(X)
+#endif
+
+/*
+** These macros can be used to test, set, or clear bits in the 
+** Expr.flags field.
+*/
+#define ExprHasProperty(E,P)     (((E)->flags&(P))==(P))
+#define ExprHasAnyProperty(E,P)  (((E)->flags&(P))!=0)
+#define ExprSetProperty(E,P)     (E)->flags|=(P)
+#define ExprClearProperty(E,P)   (E)->flags&=~(P)
+
+/*
+** Macros to determine the number of bytes required by a normal Expr 
+** struct, an Expr struct with the EP_Reduced flag set in Expr.flags 
+** and an Expr struct with the EP_TokenOnly flag set.
+*/
+#define EXPR_FULLSIZE           sizeof(Expr)           /* Full size */
+#define EXPR_REDUCEDSIZE        offsetof(Expr,iTable)  /* Common features */
+#define EXPR_TOKENONLYSIZE      offsetof(Expr,pLeft)   /* Fewer features */
+
+/*
+** Flags passed to the sqlite3ExprDup() function. See the header comment 
+** above sqlite3ExprDup() for details.
+*/
+#define EXPRDUP_REDUCE         0x0001  /* Used reduced-size Expr nodes */
+
+/*
+** A list of expressions.  Each expression may optionally have a
+** name.  An expr/name combination can be used in several ways, such
+** as the list of "expr AS ID" fields following a "SELECT" or in the
+** list of "ID = expr" items in an UPDATE.  A list of expressions can
+** also be used as the argument to a function, in which case the a.zName
+** field is not used.
+*/
+struct ExprList {
+  int nExpr;             /* Number of expressions on the list */
+  int nAlloc;            /* Number of entries allocated below */
+  int iECursor;          /* VDBE Cursor associated with this ExprList */
+  struct ExprList_item {
+    Expr *pExpr;           /* The list of expressions */
+    char *zName;           /* Token associated with this expression */
+    char *zSpan;           /* Original text of the expression */
+    u8 sortOrder;          /* 1 for DESC or 0 for ASC */
+    u8 done;               /* A flag to indicate when processing is finished */
+    u16 iCol;              /* For ORDER BY, column number in result set */
+    u16 iAlias;            /* Index into Parse.aAlias[] for zName */
+  } *a;                  /* One entry for each expression */
+};
+
+/*
+** An instance of this structure is used by the parser to record both
+** the parse tree for an expression and the span of input text for an
+** expression.
+*/
+struct ExprSpan {
+  Expr *pExpr;          /* The expression parse tree */
+  const char *zStart;   /* First character of input text */
+  const char *zEnd;     /* One character past the end of input text */
+};
+
+/*
+** An instance of this structure can hold a simple list of identifiers,
+** such as the list "a,b,c" in the following statements:
+**
+**      INSERT INTO t(a,b,c) VALUES ...;
+**      CREATE INDEX idx ON t(a,b,c);
+**      CREATE TRIGGER trig BEFORE UPDATE ON t(a,b,c) ...;
+**
+** The IdList.a.idx field is used when the IdList represents the list of
+** column names after a table name in an INSERT statement.  In the statement
+**
+**     INSERT INTO t(a,b,c) ...
+**
+** If "a" is the k-th column of table "t", then IdList.a[0].idx==k.
+*/
+struct IdList {
+  struct IdList_item {
+    char *zName;      /* Name of the identifier */
+    int idx;          /* Index in some Table.aCol[] of a column named zName */
+  } *a;
+  int nId;         /* Number of identifiers on the list */
+  int nAlloc;      /* Number of entries allocated for a[] below */
+};
+
+/*
+** The bitmask datatype defined below is used for various optimizations.
+**
+** Changing this from a 64-bit to a 32-bit type limits the number of
+** tables in a join to 32 instead of 64.  But it also reduces the size
+** of the library by 738 bytes on ix86.
+*/
+typedef u64 Bitmask;
+
+/*
+** The number of bits in a Bitmask.  "BMS" means "BitMask Size".
+*/
+#define BMS  ((int)(sizeof(Bitmask)*8))
+
+/*
+** The following structure describes the FROM clause of a SELECT statement.
+** Each table or subquery in the FROM clause is a separate element of
+** the SrcList.a[] array.
+**
+** With the addition of multiple database support, the following structure
+** can also be used to describe a particular table such as the table that
+** is modified by an INSERT, DELETE, or UPDATE statement.  In standard SQL,
+** such a table must be a simple name: ID.  But in SQLite, the table can
+** now be identified by a database name, a dot, then the table name: ID.ID.
+**
+** The jointype starts out showing the join type between the current table
+** and the next table on the list.  The parser builds the list this way.
+** But sqlite3SrcListShiftJoinType() later shifts the jointypes so that each
+** jointype expresses the join between the table and the previous table.
+**
+** In the colUsed field, the high-order bit (bit 63) is set if the table
+** contains more than 63 columns and the 64-th or later column is used.
+*/
+struct SrcList {
+  i16 nSrc;        /* Number of tables or subqueries in the FROM clause */
+  i16 nAlloc;      /* Number of entries allocated in a[] below */
+  struct SrcList_item {
+    char *zDatabase;  /* Name of database holding this table */
+    char *zName;      /* Name of the table */
+    char *zAlias;     /* The "B" part of a "A AS B" phrase.  zName is the "A" */
+    Table *pTab;      /* An SQL table corresponding to zName */
+    Select *pSelect;  /* A SELECT statement used in place of a table name */
+    u8 isPopulated;   /* Temporary table associated with SELECT is populated */
+    u8 jointype;      /* Type of join between this able and the previous */
+    u8 notIndexed;    /* True if there is a NOT INDEXED clause */
+#ifndef SQLITE_OMIT_EXPLAIN
+    u8 iSelectId;     /* If pSelect!=0, the id of the sub-select in EQP */
+#endif
+    int iCursor;      /* The VDBE cursor number used to access this table */
+    Expr *pOn;        /* The ON clause of a join */
+    IdList *pUsing;   /* The USING clause of a join */
+    Bitmask colUsed;  /* Bit N (1<<N) set if column N of pTab is used */
+    char *zIndex;     /* Identifier from "INDEXED BY <zIndex>" clause */
+    Index *pIndex;    /* Index structure corresponding to zIndex, if any */
+  } a[1];             /* One entry for each identifier on the list */
+};
+
+/*
+** Permitted values of the SrcList.a.jointype field
+*/
+#define JT_INNER     0x0001    /* Any kind of inner or cross join */
+#define JT_CROSS     0x0002    /* Explicit use of the CROSS keyword */
+#define JT_NATURAL   0x0004    /* True for a "natural" join */
+#define JT_LEFT      0x0008    /* Left outer join */
+#define JT_RIGHT     0x0010    /* Right outer join */
+#define JT_OUTER     0x0020    /* The "OUTER" keyword is present */
+#define JT_ERROR     0x0040    /* unknown or unsupported join type */
+
+
+/*
+** A WherePlan object holds information that describes a lookup
+** strategy.
+**
+** This object is intended to be opaque outside of the where.c module.
+** It is included here only so that that compiler will know how big it
+** is.  None of the fields in this object should be used outside of
+** the where.c module.
+**
+** Within the union, pIdx is only used when wsFlags&WHERE_INDEXED is true.
+** pTerm is only used when wsFlags&WHERE_MULTI_OR is true.  And pVtabIdx
+** is only used when wsFlags&WHERE_VIRTUALTABLE is true.  It is never the
+** case that more than one of these conditions is true.
+*/
+struct WherePlan {
+  u32 wsFlags;                   /* WHERE_* flags that describe the strategy */
+  u32 nEq;                       /* Number of == constraints */
+  double nRow;                   /* Estimated number of rows (for EQP) */
+  union {
+    Index *pIdx;                   /* Index when WHERE_INDEXED is true */
+    struct WhereTerm *pTerm;       /* WHERE clause term for OR-search */
+    sqlite3_index_info *pVtabIdx;  /* Virtual table index to use */
+  } u;
+};
+
+/*
+** For each nested loop in a WHERE clause implementation, the WhereInfo
+** structure contains a single instance of this structure.  This structure
+** is intended to be private the the where.c module and should not be
+** access or modified by other modules.
+**
+** The pIdxInfo field is used to help pick the best index on a
+** virtual table.  The pIdxInfo pointer contains indexing
+** information for the i-th table in the FROM clause before reordering.
+** All the pIdxInfo pointers are freed by whereInfoFree() in where.c.
+** All other information in the i-th WhereLevel object for the i-th table
+** after FROM clause ordering.
+*/
+struct WhereLevel {
+  WherePlan plan;       /* query plan for this element of the FROM clause */
+  int iLeftJoin;        /* Memory cell used to implement LEFT OUTER JOIN */
+  int iTabCur;          /* The VDBE cursor used to access the table */
+  int iIdxCur;          /* The VDBE cursor used to access pIdx */
+  int addrBrk;          /* Jump here to break out of the loop */
+  int addrNxt;          /* Jump here to start the next IN combination */
+  int addrCont;         /* Jump here to continue with the next loop cycle */
+  int addrFirst;        /* First instruction of interior of the loop */
+  u8 iFrom;             /* Which entry in the FROM clause */
+  u8 op, p5;            /* Opcode and P5 of the opcode that ends the loop */
+  int p1, p2;           /* Operands of the opcode used to ends the loop */
+  union {               /* Information that depends on plan.wsFlags */
+    struct {
+      int nIn;              /* Number of entries in aInLoop[] */
+      struct InLoop {
+        int iCur;              /* The VDBE cursor used by this IN operator */
+        int addrInTop;         /* Top of the IN loop */
+      } *aInLoop;           /* Information about each nested IN operator */
+    } in;                 /* Used when plan.wsFlags&WHERE_IN_ABLE */
+  } u;
+
+  /* The following field is really not part of the current level.  But
+  ** we need a place to cache virtual table index information for each
+  ** virtual table in the FROM clause and the WhereLevel structure is
+  ** a convenient place since there is one WhereLevel for each FROM clause
+  ** element.
+  */
+  sqlite3_index_info *pIdxInfo;  /* Index info for n-th source table */
+};
+
+/*
+** Flags appropriate for the wctrlFlags parameter of sqlite3WhereBegin()
+** and the WhereInfo.wctrlFlags member.
+*/
+#define WHERE_ORDERBY_NORMAL   0x0000 /* No-op */
+#define WHERE_ORDERBY_MIN      0x0001 /* ORDER BY processing for min() func */
+#define WHERE_ORDERBY_MAX      0x0002 /* ORDER BY processing for max() func */
+#define WHERE_ONEPASS_DESIRED  0x0004 /* Want to do one-pass UPDATE/DELETE */
+#define WHERE_DUPLICATES_OK    0x0008 /* Ok to return a row more than once */
+#define WHERE_OMIT_OPEN        0x0010 /* Table cursors are already open */
+#define WHERE_OMIT_CLOSE       0x0020 /* Omit close of table & index cursors */
+#define WHERE_FORCE_TABLE      0x0040 /* Do not use an index-only search */
+#define WHERE_ONETABLE_ONLY    0x0080 /* Only code the 1st table in pTabList */
+
+/*
+** The WHERE clause processing routine has two halves.  The
+** first part does the start of the WHERE loop and the second
+** half does the tail of the WHERE loop.  An instance of
+** this structure is returned by the first half and passed
+** into the second half to give some continuity.
+*/
+struct WhereInfo {
+  Parse *pParse;       /* Parsing and code generating context */
+  u16 wctrlFlags;      /* Flags originally passed to sqlite3WhereBegin() */
+  u8 okOnePass;        /* Ok to use one-pass algorithm for UPDATE or DELETE */
+  u8 untestedTerms;    /* Not all WHERE terms resolved by outer loop */
+  SrcList *pTabList;             /* List of tables in the join */
+  int iTop;                      /* The very beginning of the WHERE loop */
+  int iContinue;                 /* Jump here to continue with next record */
+  int iBreak;                    /* Jump here to break out of the loop */
+  int nLevel;                    /* Number of nested loop */
+  struct WhereClause *pWC;       /* Decomposition of the WHERE clause */
+  double savedNQueryLoop;        /* pParse->nQueryLoop outside the WHERE loop */
+  double nRowOut;                /* Estimated number of output rows */
+  WhereLevel a[1];               /* Information about each nest loop in WHERE */
+};
+
+/*
+** A NameContext defines a context in which to resolve table and column
+** names.  The context consists of a list of tables (the pSrcList) field and
+** a list of named expression (pEList).  The named expression list may
+** be NULL.  The pSrc corresponds to the FROM clause of a SELECT or
+** to the table being operated on by INSERT, UPDATE, or DELETE.  The
+** pEList corresponds to the result set of a SELECT and is NULL for
+** other statements.
+**
+** NameContexts can be nested.  When resolving names, the inner-most 
+** context is searched first.  If no match is found, the next outer
+** context is checked.  If there is still no match, the next context
+** is checked.  This process continues until either a match is found
+** or all contexts are check.  When a match is found, the nRef member of
+** the context containing the match is incremented. 
+**
+** Each subquery gets a new NameContext.  The pNext field points to the
+** NameContext in the parent query.  Thus the process of scanning the
+** NameContext list corresponds to searching through successively outer
+** subqueries looking for a match.
+*/
+struct NameContext {
+  Parse *pParse;       /* The parser */
+  SrcList *pSrcList;   /* One or more tables used to resolve names */
+  ExprList *pEList;    /* Optional list of named expressions */
+  int nRef;            /* Number of names resolved by this context */
+  int nErr;            /* Number of errors encountered while resolving names */
+  u8 allowAgg;         /* Aggregate functions allowed here */
+  u8 hasAgg;           /* True if aggregates are seen */
+  u8 isCheck;          /* True if resolving names in a CHECK constraint */
+  int nDepth;          /* Depth of subquery recursion. 1 for no recursion */
+  AggInfo *pAggInfo;   /* Information about aggregates at this level */
+  NameContext *pNext;  /* Next outer name context.  NULL for outermost */
+};
+
+/*
+** An instance of the following structure contains all information
+** needed to generate code for a single SELECT statement.
+**
+** nLimit is set to -1 if there is no LIMIT clause.  nOffset is set to 0.
+** If there is a LIMIT clause, the parser sets nLimit to the value of the
+** limit and nOffset to the value of the offset (or 0 if there is not
+** offset).  But later on, nLimit and nOffset become the memory locations
+** in the VDBE that record the limit and offset counters.
+**
+** addrOpenEphm[] entries contain the address of OP_OpenEphemeral opcodes.
+** These addresses must be stored so that we can go back and fill in
+** the P4_KEYINFO and P2 parameters later.  Neither the KeyInfo nor
+** the number of columns in P2 can be computed at the same time
+** as the OP_OpenEphm instruction is coded because not
+** enough information about the compound query is known at that point.
+** The KeyInfo for addrOpenTran[0] and [1] contains collating sequences
+** for the result set.  The KeyInfo for addrOpenTran[2] contains collating
+** sequences for the ORDER BY clause.
+*/
+struct Select {
+  ExprList *pEList;      /* The fields of the result */
+  u8 op;                 /* One of: TK_UNION TK_ALL TK_INTERSECT TK_EXCEPT */
+  char affinity;         /* MakeRecord with this affinity for SRT_Set */
+  u16 selFlags;          /* Various SF_* values */
+  SrcList *pSrc;         /* The FROM clause */
+  Expr *pWhere;          /* The WHERE clause */
+  ExprList *pGroupBy;    /* The GROUP BY clause */
+  Expr *pHaving;         /* The HAVING clause */
+  ExprList *pOrderBy;    /* The ORDER BY clause */
+  Select *pPrior;        /* Prior select in a compound select statement */
+  Select *pNext;         /* Next select to the left in a compound */
+  Select *pRightmost;    /* Right-most select in a compound select statement */
+  Expr *pLimit;          /* LIMIT expression. NULL means not used. */
+  Expr *pOffset;         /* OFFSET expression. NULL means not used. */
+  int iLimit, iOffset;   /* Memory registers holding LIMIT & OFFSET counters */
+  int addrOpenEphm[3];   /* OP_OpenEphem opcodes related to this select */
+  double nSelectRow;     /* Estimated number of result rows */
+};
+
+/*
+** Allowed values for Select.selFlags.  The "SF" prefix stands for
+** "Select Flag".
+*/
+#define SF_Distinct        0x0001  /* Output should be DISTINCT */
+#define SF_Resolved        0x0002  /* Identifiers have been resolved */
+#define SF_Aggregate       0x0004  /* Contains aggregate functions */
+#define SF_UsesEphemeral   0x0008  /* Uses the OpenEphemeral opcode */
+#define SF_Expanded        0x0010  /* sqlite3SelectExpand() called on this */
+#define SF_HasTypeInfo     0x0020  /* FROM subqueries have Table metadata */
+
+
+/*
+** The results of a select can be distributed in several ways.  The
+** "SRT" prefix means "SELECT Result Type".
+*/
+#define SRT_Union        1  /* Store result as keys in an index */
+#define SRT_Except       2  /* Remove result from a UNION index */
+#define SRT_Exists       3  /* Store 1 if the result is not empty */
+#define SRT_Discard      4  /* Do not save the results anywhere */
+
+/* The ORDER BY clause is ignored for all of the above */
+#define IgnorableOrderby(X) ((X->eDest)<=SRT_Discard)
+
+#define SRT_Output       5  /* Output each row of result */
+#define SRT_Mem          6  /* Store result in a memory cell */
+#define SRT_Set          7  /* Store results as keys in an index */
+#define SRT_Table        8  /* Store result as data with an automatic rowid */
+#define SRT_EphemTab     9  /* Create transient tab and store like SRT_Table */
+#define SRT_Coroutine   10  /* Generate a single row of result */
+
+/*
+** A structure used to customize the behavior of sqlite3Select(). See
+** comments above sqlite3Select() for details.
+*/
+typedef struct SelectDest SelectDest;
+struct SelectDest {
+  u8 eDest;         /* How to dispose of the results */
+  u8 affinity;      /* Affinity used when eDest==SRT_Set */
+  int iParm;        /* A parameter used by the eDest disposal method */
+  int iMem;         /* Base register where results are written */
+  int nMem;         /* Number of registers allocated */
+};
+
+/*
+** During code generation of statements that do inserts into AUTOINCREMENT 
+** tables, the following information is attached to the Table.u.autoInc.p
+** pointer of each autoincrement table to record some side information that
+** the code generator needs.  We have to keep per-table autoincrement
+** information in case inserts are down within triggers.  Triggers do not
+** normally coordinate their activities, but we do need to coordinate the
+** loading and saving of autoincrement information.
+*/
+struct AutoincInfo {
+  AutoincInfo *pNext;   /* Next info block in a list of them all */
+  Table *pTab;          /* Table this info block refers to */
+  int iDb;              /* Index in sqlite3.aDb[] of database holding pTab */
+  int regCtr;           /* Memory register holding the rowid counter */
+};
+
+/*
+** Size of the column cache
+*/
+#ifndef SQLITE_N_COLCACHE
+# define SQLITE_N_COLCACHE 10
+#endif
+
+/*
+** At least one instance of the following structure is created for each 
+** trigger that may be fired while parsing an INSERT, UPDATE or DELETE
+** statement. All such objects are stored in the linked list headed at
+** Parse.pTriggerPrg and deleted once statement compilation has been
+** completed.
+**
+** A Vdbe sub-program that implements the body and WHEN clause of trigger
+** TriggerPrg.pTrigger, assuming a default ON CONFLICT clause of
+** TriggerPrg.orconf, is stored in the TriggerPrg.pProgram variable.
+** The Parse.pTriggerPrg list never contains two entries with the same
+** values for both pTrigger and orconf.
+**
+** The TriggerPrg.aColmask[0] variable is set to a mask of old.* columns
+** accessed (or set to 0 for triggers fired as a result of INSERT 
+** statements). Similarly, the TriggerPrg.aColmask[1] variable is set to
+** a mask of new.* columns used by the program.
+*/
+struct TriggerPrg {
+  Trigger *pTrigger;      /* Trigger this program was coded from */
+  int orconf;             /* Default ON CONFLICT policy */
+  SubProgram *pProgram;   /* Program implementing pTrigger/orconf */
+  u32 aColmask[2];        /* Masks of old.*, new.* columns accessed */
+  TriggerPrg *pNext;      /* Next entry in Parse.pTriggerPrg list */
+};
+
+/*
+** The yDbMask datatype for the bitmask of all attached databases.
+*/
+#if SQLITE_MAX_ATTACHED>30
+  typedef sqlite3_uint64 yDbMask;
+#else
+  typedef unsigned int yDbMask;
+#endif
+
+/*
+** An SQL parser context.  A copy of this structure is passed through
+** the parser and down into all the parser action routine in order to
+** carry around information that is global to the entire parse.
+**
+** The structure is divided into two parts.  When the parser and code
+** generate call themselves recursively, the first part of the structure
+** is constant but the second part is reset at the beginning and end of
+** each recursion.
+**
+** The nTableLock and aTableLock variables are only used if the shared-cache 
+** feature is enabled (if sqlite3Tsd()->useSharedData is true). They are
+** used to store the set of table-locks required by the statement being
+** compiled. Function sqlite3TableLock() is used to add entries to the
+** list.
+*/
+struct Parse {
+  sqlite3 *db;         /* The main database structure */
+  int rc;              /* Return code from execution */
+  char *zErrMsg;       /* An error message */
+  Vdbe *pVdbe;         /* An engine for executing database bytecode */
+  u8 colNamesSet;      /* TRUE after OP_ColumnName has been issued to pVdbe */
+  u8 nameClash;        /* A permanent table name clashes with temp table name */
+  u8 checkSchema;      /* Causes schema cookie check after an error */
+  u8 nested;           /* Number of nested calls to the parser/code generator */
+  u8 parseError;       /* True after a parsing error.  Ticket #1794 */
+  u8 nTempReg;         /* Number of temporary registers in aTempReg[] */
+  u8 nTempInUse;       /* Number of aTempReg[] currently checked out */
+  int aTempReg[8];     /* Holding area for temporary registers */
+  int nRangeReg;       /* Size of the temporary register block */
+  int iRangeReg;       /* First register in temporary register block */
+  int nErr;            /* Number of errors seen */
+  int nTab;            /* Number of previously allocated VDBE cursors */
+  int nMem;            /* Number of memory cells used so far */
+  int nSet;            /* Number of sets used so far */
+  int ckBase;          /* Base register of data during check constraints */
+  int iCacheLevel;     /* ColCache valid when aColCache[].iLevel<=iCacheLevel */
+  int iCacheCnt;       /* Counter used to generate aColCache[].lru values */
+  u8 nColCache;        /* Number of entries in the column cache */
+  u8 iColCache;        /* Next entry of the cache to replace */
+  struct yColCache {
+    int iTable;           /* Table cursor number */
+    int iColumn;          /* Table column number */
+    u8 tempReg;           /* iReg is a temp register that needs to be freed */
+    int iLevel;           /* Nesting level */
+    int iReg;             /* Reg with value of this column. 0 means none. */
+    int lru;              /* Least recently used entry has the smallest value */
+  } aColCache[SQLITE_N_COLCACHE];  /* One for each column cache entry */
+  yDbMask writeMask;   /* Start a write transaction on these databases */
+  yDbMask cookieMask;  /* Bitmask of schema verified databases */
+  u8 isMultiWrite;     /* True if statement may affect/insert multiple rows */
+  u8 mayAbort;         /* True if statement may throw an ABORT exception */
+  int cookieGoto;      /* Address of OP_Goto to cookie verifier subroutine */
+  int cookieValue[SQLITE_MAX_ATTACHED+2];  /* Values of cookies to verify */
+#ifndef SQLITE_OMIT_SHARED_CACHE
+  int nTableLock;        /* Number of locks in aTableLock */
+  TableLock *aTableLock; /* Required table locks for shared-cache mode */
+#endif
+  int regRowid;        /* Register holding rowid of CREATE TABLE entry */
+  int regRoot;         /* Register holding root page number for new objects */
+  AutoincInfo *pAinc;  /* Information about AUTOINCREMENT counters */
+  int nMaxArg;         /* Max args passed to user function by sub-program */
+
+  /* Information used while coding trigger programs. */
+  Parse *pToplevel;    /* Parse structure for main program (or NULL) */
+  Table *pTriggerTab;  /* Table triggers are being coded for */
+  u32 oldmask;         /* Mask of old.* columns referenced */
+  u32 newmask;         /* Mask of new.* columns referenced */
+  u8 eTriggerOp;       /* TK_UPDATE, TK_INSERT or TK_DELETE */
+  u8 eOrconf;          /* Default ON CONFLICT policy for trigger steps */
+  u8 disableTriggers;  /* True to disable triggers */
+  double nQueryLoop;   /* Estimated number of iterations of a query */
+
+  /* Above is constant between recursions.  Below is reset before and after
+  ** each recursion */
+
+  int nVar;            /* Number of '?' variables seen in the SQL so far */
+  int nVarExpr;        /* Number of used slots in apVarExpr[] */
+  int nVarExprAlloc;   /* Number of allocated slots in apVarExpr[] */
+  Expr **apVarExpr;    /* Pointers to :aaa and $aaaa wildcard expressions */
+  Vdbe *pReprepare;    /* VM being reprepared (sqlite3Reprepare()) */
+  int nAlias;          /* Number of aliased result set columns */
+  int nAliasAlloc;     /* Number of allocated slots for aAlias[] */
+  int *aAlias;         /* Register used to hold aliased result */
+  u8 explain;          /* True if the EXPLAIN flag is found on the query */
+  Token sNameToken;    /* Token with unqualified schema object name */
+  Token sLastToken;    /* The last token parsed */
+  const char *zTail;   /* All SQL text past the last semicolon parsed */
+  Table *pNewTable;    /* A table being constructed by CREATE TABLE */
+  Trigger *pNewTrigger;     /* Trigger under construct by a CREATE TRIGGER */
+  const char *zAuthContext; /* The 6th parameter to db->xAuth callbacks */
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  Token sArg;                /* Complete text of a module argument */
+  u8 declareVtab;            /* True if inside sqlite3_declare_vtab() */
+  int nVtabLock;             /* Number of virtual tables to lock */
+  Table **apVtabLock;        /* Pointer to virtual tables needing locking */
+#endif
+  int nHeight;            /* Expression tree height of current sub-select */
+  Table *pZombieTab;      /* List of Table objects to delete after code gen */
+  TriggerPrg *pTriggerPrg;    /* Linked list of coded triggers */
+
+#ifndef SQLITE_OMIT_EXPLAIN
+  int iSelectId;
+  int iNextSelectId;
+#endif
+};
+
+#ifdef SQLITE_OMIT_VIRTUALTABLE
+  #define IN_DECLARE_VTAB 0
+#else
+  #define IN_DECLARE_VTAB (pParse->declareVtab)
+#endif
+
+/*
+** An instance of the following structure can be declared on a stack and used
+** to save the Parse.zAuthContext value so that it can be restored later.
+*/
+struct AuthContext {
+  const char *zAuthContext;   /* Put saved Parse.zAuthContext here */
+  Parse *pParse;              /* The Parse structure */
+};
+
+/*
+** Bitfield flags for P5 value in OP_Insert and OP_Delete
+*/
+#define OPFLAG_NCHANGE       0x01    /* Set to update db->nChange */
+#define OPFLAG_LASTROWID     0x02    /* Set to update db->lastRowid */
+#define OPFLAG_ISUPDATE      0x04    /* This OP_Insert is an sql UPDATE */
+#define OPFLAG_APPEND        0x08    /* This is likely to be an append */
+#define OPFLAG_USESEEKRESULT 0x10    /* Try to avoid a seek in BtreeInsert() */
+#define OPFLAG_CLEARCACHE    0x20    /* Clear pseudo-table cache in OP_Column */
+
+/*
+ * Each trigger present in the database schema is stored as an instance of
+ * struct Trigger. 
+ *
+ * Pointers to instances of struct Trigger are stored in two ways.
+ * 1. In the "trigHash" hash table (part of the sqlite3* that represents the 
+ *    database). This allows Trigger structures to be retrieved by name.
+ * 2. All triggers associated with a single table form a linked list, using the
+ *    pNext member of struct Trigger. A pointer to the first element of the
+ *    linked list is stored as the "pTrigger" member of the associated
+ *    struct Table.
+ *
+ * The "step_list" member points to the first element of a linked list
+ * containing the SQL statements specified as the trigger program.
+ */
+struct Trigger {
+  char *zName;            /* The name of the trigger                        */
+  char *table;            /* The table or view to which the trigger applies */
+  u8 op;                  /* One of TK_DELETE, TK_UPDATE, TK_INSERT         */
+  u8 tr_tm;               /* One of TRIGGER_BEFORE, TRIGGER_AFTER */
+  Expr *pWhen;            /* The WHEN clause of the expression (may be NULL) */
+  IdList *pColumns;       /* If this is an UPDATE OF <column-list> trigger,
+                             the <column-list> is stored here */
+  Schema *pSchema;        /* Schema containing the trigger */
+  Schema *pTabSchema;     /* Schema containing the table */
+  TriggerStep *step_list; /* Link list of trigger program steps             */
+  Trigger *pNext;         /* Next trigger associated with the table */
+};
+
+/*
+** A trigger is either a BEFORE or an AFTER trigger.  The following constants
+** determine which. 
+**
+** If there are multiple triggers, you might of some BEFORE and some AFTER.
+** In that cases, the constants below can be ORed together.
+*/
+#define TRIGGER_BEFORE  1
+#define TRIGGER_AFTER   2
+
+/*
+ * An instance of struct TriggerStep is used to store a single SQL statement
+ * that is a part of a trigger-program. 
+ *
+ * Instances of struct TriggerStep are stored in a singly linked list (linked
+ * using the "pNext" member) referenced by the "step_list" member of the 
+ * associated struct Trigger instance. The first element of the linked list is
+ * the first step of the trigger-program.
+ * 
+ * The "op" member indicates whether this is a "DELETE", "INSERT", "UPDATE" or
+ * "SELECT" statement. The meanings of the other members is determined by the 
+ * value of "op" as follows:
+ *
+ * (op == TK_INSERT)
+ * orconf    -> stores the ON CONFLICT algorithm
+ * pSelect   -> If this is an INSERT INTO ... SELECT ... statement, then
+ *              this stores a pointer to the SELECT statement. Otherwise NULL.
+ * target    -> A token holding the quoted name of the table to insert into.
+ * pExprList -> If this is an INSERT INTO ... VALUES ... statement, then
+ *              this stores values to be inserted. Otherwise NULL.
+ * pIdList   -> If this is an INSERT INTO ... (<column-names>) VALUES ... 
+ *              statement, then this stores the column-names to be
+ *              inserted into.
+ *
+ * (op == TK_DELETE)
+ * target    -> A token holding the quoted name of the table to delete from.
+ * pWhere    -> The WHERE clause of the DELETE statement if one is specified.
+ *              Otherwise NULL.
+ * 
+ * (op == TK_UPDATE)
+ * target    -> A token holding the quoted name of the table to update rows of.
+ * pWhere    -> The WHERE clause of the UPDATE statement if one is specified.
+ *              Otherwise NULL.
+ * pExprList -> A list of the columns to update and the expressions to update
+ *              them to. See sqlite3Update() documentation of "pChanges"
+ *              argument.
+ * 
+ */
+struct TriggerStep {
+  u8 op;               /* One of TK_DELETE, TK_UPDATE, TK_INSERT, TK_SELECT */
+  u8 orconf;           /* OE_Rollback etc. */
+  Trigger *pTrig;      /* The trigger that this step is a part of */
+  Select *pSelect;     /* SELECT statment or RHS of INSERT INTO .. SELECT ... */
+  Token target;        /* Target table for DELETE, UPDATE, INSERT */
+  Expr *pWhere;        /* The WHERE clause for DELETE or UPDATE steps */
+  ExprList *pExprList; /* SET clause for UPDATE.  VALUES clause for INSERT */
+  IdList *pIdList;     /* Column names for INSERT */
+  TriggerStep *pNext;  /* Next in the link-list */
+  TriggerStep *pLast;  /* Last element in link-list. Valid for 1st elem only */
+};
+
+/*
+** The following structure contains information used by the sqliteFix...
+** routines as they walk the parse tree to make database references
+** explicit.  
+*/
+typedef struct DbFixer DbFixer;
+struct DbFixer {
+  Parse *pParse;      /* The parsing context.  Error messages written here */
+  const char *zDb;    /* Make sure all objects are contained in this database */
+  const char *zType;  /* Type of the container - used for error messages */
+  const Token *pName; /* Name of the container - used for error messages */
+};
+
+/*
+** An objected used to accumulate the text of a string where we
+** do not necessarily know how big the string will be in the end.
+*/
+struct StrAccum {
+  sqlite3 *db;         /* Optional database for lookaside.  Can be NULL */
+  char *zBase;         /* A base allocation.  Not from malloc. */
+  char *zText;         /* The string collected so far */
+  int  nChar;          /* Length of the string so far */
+  int  nAlloc;         /* Amount of space allocated in zText */
+  int  mxAlloc;        /* Maximum allowed string length */
+  u8   mallocFailed;   /* Becomes true if any memory allocation fails */
+  u8   useMalloc;      /* 0: none,  1: sqlite3DbMalloc,  2: sqlite3_malloc */
+  u8   tooBig;         /* Becomes true if string size exceeds limits */
+};
+
+/*
+** A pointer to this structure is used to communicate information
+** from sqlite3Init and OP_ParseSchema into the sqlite3InitCallback.
+*/
+typedef struct {
+  sqlite3 *db;        /* The database being initialized */
+  int iDb;            /* 0 for main database.  1 for TEMP, 2.. for ATTACHed */
+  char **pzErrMsg;    /* Error message stored here */
+  int rc;             /* Result code stored here */
+} InitData;
+
+/*
+** Structure containing global configuration data for the SQLite library.
+**
+** This structure also contains some state information.
+*/
+struct Sqlite3Config {
+  int bMemstat;                     /* True to enable memory status */
+  int bCoreMutex;                   /* True to enable core mutexing */
+  int bFullMutex;                   /* True to enable full mutexing */
+  int mxStrlen;                     /* Maximum string length */
+  int szLookaside;                  /* Default lookaside buffer size */
+  int nLookaside;                   /* Default lookaside buffer count */
+  sqlite3_mem_methods m;            /* Low-level memory allocation interface */
+  sqlite3_mutex_methods mutex;      /* Low-level mutex interface */
+  sqlite3_pcache_methods pcache;    /* Low-level page-cache interface */
+  void *pHeap;                      /* Heap storage space */
+  int nHeap;                        /* Size of pHeap[] */
+  int mnReq, mxReq;                 /* Min and max heap requests sizes */
+  void *pScratch;                   /* Scratch memory */
+  int szScratch;                    /* Size of each scratch buffer */
+  int nScratch;                     /* Number of scratch buffers */
+  void *pPage;                      /* Page cache memory */
+  int szPage;                       /* Size of each page in pPage[] */
+  int nPage;                        /* Number of pages in pPage[] */
+  int mxParserStack;                /* maximum depth of the parser stack */
+  int sharedCacheEnabled;           /* true if shared-cache mode enabled */
+  /* The above might be initialized to non-zero.  The following need to always
+  ** initially be zero, however. */
+  int isInit;                       /* True after initialization has finished */
+  int inProgress;                   /* True while initialization in progress */
+  int isMutexInit;                  /* True after mutexes are initialized */
+  int isMallocInit;                 /* True after malloc is initialized */
+  int isPCacheInit;                 /* True after malloc is initialized */
+  sqlite3_mutex *pInitMutex;        /* Mutex used by sqlite3_initialize() */
+  int nRefInitMutex;                /* Number of users of pInitMutex */
+  void (*xLog)(void*,int,const char*); /* Function for logging */
+  void *pLogArg;                       /* First argument to xLog() */
+};
+
+/*
+** Context pointer passed down through the tree-walk.
+*/
+struct Walker {
+  int (*xExprCallback)(Walker*, Expr*);     /* Callback for expressions */
+  int (*xSelectCallback)(Walker*,Select*);  /* Callback for SELECTs */
+  Parse *pParse;                            /* Parser context.  */
+  union {                                   /* Extra data for callback */
+    NameContext *pNC;                          /* Naming context */
+    int i;                                     /* Integer value */
+  } u;
+};
+
+/* Forward declarations */
+SQLITE_PRIVATE int sqlite3WalkExpr(Walker*, Expr*);
+SQLITE_PRIVATE int sqlite3WalkExprList(Walker*, ExprList*);
+SQLITE_PRIVATE int sqlite3WalkSelect(Walker*, Select*);
+SQLITE_PRIVATE int sqlite3WalkSelectExpr(Walker*, Select*);
+SQLITE_PRIVATE int sqlite3WalkSelectFrom(Walker*, Select*);
+
+/*
+** Return code from the parse-tree walking primitives and their
+** callbacks.
+*/
+#define WRC_Continue    0   /* Continue down into children */
+#define WRC_Prune       1   /* Omit children but continue walking siblings */
+#define WRC_Abort       2   /* Abandon the tree walk */
+
+/*
+** Assuming zIn points to the first byte of a UTF-8 character,
+** advance zIn to point to the first byte of the next UTF-8 character.
+*/
+#define SQLITE_SKIP_UTF8(zIn) {                        \
+  if( (*(zIn++))>=0xc0 ){                              \
+    while( (*zIn & 0xc0)==0x80 ){ zIn++; }             \
+  }                                                    \
+}
+
+/*
+** The SQLITE_*_BKPT macros are substitutes for the error codes with
+** the same name but without the _BKPT suffix.  These macros invoke
+** routines that report the line-number on which the error originated
+** using sqlite3_log().  The routines also provide a convenient place
+** to set a debugger breakpoint.
+*/
+SQLITE_PRIVATE int sqlite3CorruptError(int);
+SQLITE_PRIVATE int sqlite3MisuseError(int);
+SQLITE_PRIVATE int sqlite3CantopenError(int);
+#define SQLITE_CORRUPT_BKPT sqlite3CorruptError(__LINE__)
+#define SQLITE_MISUSE_BKPT sqlite3MisuseError(__LINE__)
+#define SQLITE_CANTOPEN_BKPT sqlite3CantopenError(__LINE__)
+
+
+/*
+** FTS4 is really an extension for FTS3.  It is enabled using the
+** SQLITE_ENABLE_FTS3 macro.  But to avoid confusion we also all
+** the SQLITE_ENABLE_FTS4 macro to serve as an alisse for SQLITE_ENABLE_FTS3.
+*/
+#if defined(SQLITE_ENABLE_FTS4) && !defined(SQLITE_ENABLE_FTS3)
+# define SQLITE_ENABLE_FTS3
+#endif
+
+/*
+** The ctype.h header is needed for non-ASCII systems.  It is also
+** needed by FTS3 when FTS3 is included in the amalgamation.
+*/
+#if !defined(SQLITE_ASCII) || \
+    (defined(SQLITE_ENABLE_FTS3) && defined(SQLITE_AMALGAMATION))
+# include <ctype.h>
+#endif
+
+/*
+** The following macros mimic the standard library functions toupper(),
+** isspace(), isalnum(), isdigit() and isxdigit(), respectively. The
+** sqlite versions only work for ASCII characters, regardless of locale.
+*/
+#ifdef SQLITE_ASCII
+# define sqlite3Toupper(x)  ((x)&~(sqlite3CtypeMap[(unsigned char)(x)]&0x20))
+# define sqlite3Isspace(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x01)
+# define sqlite3Isalnum(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x06)
+# define sqlite3Isalpha(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x02)
+# define sqlite3Isdigit(x)   (sqlite3CtypeMap[(unsigned char)(x)]&0x04)
+# define sqlite3Isxdigit(x)  (sqlite3CtypeMap[(unsigned char)(x)]&0x08)
+# define sqlite3Tolower(x)   (sqlite3UpperToLower[(unsigned char)(x)])
+#else
+# define sqlite3Toupper(x)   toupper((unsigned char)(x))
+# define sqlite3Isspace(x)   isspace((unsigned char)(x))
+# define sqlite3Isalnum(x)   isalnum((unsigned char)(x))
+# define sqlite3Isalpha(x)   isalpha((unsigned char)(x))
+# define sqlite3Isdigit(x)   isdigit((unsigned char)(x))
+# define sqlite3Isxdigit(x)  isxdigit((unsigned char)(x))
+# define sqlite3Tolower(x)   tolower((unsigned char)(x))
+#endif
+
+/*
+** Internal function prototypes
+*/
+SQLITE_PRIVATE int sqlite3StrICmp(const char *, const char *);
+SQLITE_PRIVATE int sqlite3Strlen30(const char*);
+#define sqlite3StrNICmp sqlite3_strnicmp
+
+SQLITE_PRIVATE int sqlite3MallocInit(void);
+SQLITE_PRIVATE void sqlite3MallocEnd(void);
+SQLITE_PRIVATE void *sqlite3Malloc(int);
+SQLITE_PRIVATE void *sqlite3MallocZero(int);
+SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3*, int);
+SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3*, int);
+SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3*,const char*);
+SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3*,const char*, int);
+SQLITE_PRIVATE void *sqlite3Realloc(void*, int);
+SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *, void *, int);
+SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *, void *, int);
+SQLITE_PRIVATE void sqlite3DbFree(sqlite3*, void*);
+SQLITE_PRIVATE int sqlite3MallocSize(void*);
+SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3*, void*);
+SQLITE_PRIVATE void *sqlite3ScratchMalloc(int);
+SQLITE_PRIVATE void sqlite3ScratchFree(void*);
+SQLITE_PRIVATE void *sqlite3PageMalloc(int);
+SQLITE_PRIVATE void sqlite3PageFree(void*);
+SQLITE_PRIVATE void sqlite3MemSetDefault(void);
+SQLITE_PRIVATE void sqlite3BenignMallocHooks(void (*)(void), void (*)(void));
+SQLITE_PRIVATE int sqlite3HeapNearlyFull(void);
+
+/*
+** On systems with ample stack space and that support alloca(), make
+** use of alloca() to obtain space for large automatic objects.  By default,
+** obtain space from malloc().
+**
+** The alloca() routine never returns NULL.  This will cause code paths
+** that deal with sqlite3StackAlloc() failures to be unreachable.
+*/
+#ifdef SQLITE_USE_ALLOCA
+# define sqlite3StackAllocRaw(D,N)   alloca(N)
+# define sqlite3StackAllocZero(D,N)  memset(alloca(N), 0, N)
+# define sqlite3StackFree(D,P)       
+#else
+# define sqlite3StackAllocRaw(D,N)   sqlite3DbMallocRaw(D,N)
+# define sqlite3StackAllocZero(D,N)  sqlite3DbMallocZero(D,N)
+# define sqlite3StackFree(D,P)       sqlite3DbFree(D,P)
+#endif
+
+#ifdef SQLITE_ENABLE_MEMSYS3
+SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void);
+#endif
+#ifdef SQLITE_ENABLE_MEMSYS5
+SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void);
+#endif
+
+
+#ifndef SQLITE_MUTEX_OMIT
+SQLITE_PRIVATE   sqlite3_mutex_methods const *sqlite3DefaultMutex(void);
+SQLITE_PRIVATE   sqlite3_mutex_methods const *sqlite3NoopMutex(void);
+SQLITE_PRIVATE   sqlite3_mutex *sqlite3MutexAlloc(int);
+SQLITE_PRIVATE   int sqlite3MutexInit(void);
+SQLITE_PRIVATE   int sqlite3MutexEnd(void);
+#endif
+
+SQLITE_PRIVATE int sqlite3StatusValue(int);
+SQLITE_PRIVATE void sqlite3StatusAdd(int, int);
+SQLITE_PRIVATE void sqlite3StatusSet(int, int);
+
+#ifndef SQLITE_OMIT_FLOATING_POINT
+SQLITE_PRIVATE   int sqlite3IsNaN(double);
+#else
+# define sqlite3IsNaN(X)  0
+#endif
+
+SQLITE_PRIVATE void sqlite3VXPrintf(StrAccum*, int, const char*, va_list);
+#ifndef SQLITE_OMIT_TRACE
+SQLITE_PRIVATE void sqlite3XPrintf(StrAccum*, const char*, ...);
+#endif
+SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3*,const char*, ...);
+SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3*,const char*, va_list);
+SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3*,char*,const char*,...);
+#if defined(SQLITE_TEST) || defined(SQLITE_DEBUG)
+SQLITE_PRIVATE   void sqlite3DebugPrintf(const char*, ...);
+#endif
+#if defined(SQLITE_TEST)
+SQLITE_PRIVATE   void *sqlite3TestTextToPtr(const char*);
+#endif
+SQLITE_PRIVATE void sqlite3SetString(char **, sqlite3*, const char*, ...);
+SQLITE_PRIVATE void sqlite3ErrorMsg(Parse*, const char*, ...);
+SQLITE_PRIVATE int sqlite3Dequote(char*);
+SQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char*, int);
+SQLITE_PRIVATE int sqlite3RunParser(Parse*, const char*, char **);
+SQLITE_PRIVATE void sqlite3FinishCoding(Parse*);
+SQLITE_PRIVATE int sqlite3GetTempReg(Parse*);
+SQLITE_PRIVATE void sqlite3ReleaseTempReg(Parse*,int);
+SQLITE_PRIVATE int sqlite3GetTempRange(Parse*,int);
+SQLITE_PRIVATE void sqlite3ReleaseTempRange(Parse*,int,int);
+SQLITE_PRIVATE Expr *sqlite3ExprAlloc(sqlite3*,int,const Token*,int);
+SQLITE_PRIVATE Expr *sqlite3Expr(sqlite3*,int,const char*);
+SQLITE_PRIVATE void sqlite3ExprAttachSubtrees(sqlite3*,Expr*,Expr*,Expr*);
+SQLITE_PRIVATE Expr *sqlite3PExpr(Parse*, int, Expr*, Expr*, const Token*);
+SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3*,Expr*, Expr*);
+SQLITE_PRIVATE Expr *sqlite3ExprFunction(Parse*,ExprList*, Token*);
+SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse*, Expr*);
+SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3*, Expr*);
+SQLITE_PRIVATE ExprList *sqlite3ExprListAppend(Parse*,ExprList*,Expr*);
+SQLITE_PRIVATE void sqlite3ExprListSetName(Parse*,ExprList*,Token*,int);
+SQLITE_PRIVATE void sqlite3ExprListSetSpan(Parse*,ExprList*,ExprSpan*);
+SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3*, ExprList*);
+SQLITE_PRIVATE int sqlite3Init(sqlite3*, char**);
+SQLITE_PRIVATE int sqlite3InitCallback(void*, int, char**, char**);
+SQLITE_PRIVATE void sqlite3Pragma(Parse*,Token*,Token*,Token*,int);
+SQLITE_PRIVATE void sqlite3ResetInternalSchema(sqlite3*, int);
+SQLITE_PRIVATE void sqlite3BeginParse(Parse*,int);
+SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3*);
+SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse*,Select*);
+SQLITE_PRIVATE void sqlite3OpenMasterTable(Parse *, int);
+SQLITE_PRIVATE void sqlite3StartTable(Parse*,Token*,Token*,int,int,int,int);
+SQLITE_PRIVATE void sqlite3AddColumn(Parse*,Token*);
+SQLITE_PRIVATE void sqlite3AddNotNull(Parse*, int);
+SQLITE_PRIVATE void sqlite3AddPrimaryKey(Parse*, ExprList*, int, int, int);
+SQLITE_PRIVATE void sqlite3AddCheckConstraint(Parse*, Expr*);
+SQLITE_PRIVATE void sqlite3AddColumnType(Parse*,Token*);
+SQLITE_PRIVATE void sqlite3AddDefaultValue(Parse*,ExprSpan*);
+SQLITE_PRIVATE void sqlite3AddCollateType(Parse*, Token*);
+SQLITE_PRIVATE void sqlite3EndTable(Parse*,Token*,Token*,Select*);
+
+SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32);
+SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec*, u32);
+SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec*, u32);
+SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec*, u32, void*);
+SQLITE_PRIVATE void sqlite3BitvecDestroy(Bitvec*);
+SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec*);
+SQLITE_PRIVATE int sqlite3BitvecBuiltinTest(int,int*);
+
+SQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3*, void*, unsigned int);
+SQLITE_PRIVATE void sqlite3RowSetClear(RowSet*);
+SQLITE_PRIVATE void sqlite3RowSetInsert(RowSet*, i64);
+SQLITE_PRIVATE int sqlite3RowSetTest(RowSet*, u8 iBatch, i64);
+SQLITE_PRIVATE int sqlite3RowSetNext(RowSet*, i64*);
+
+SQLITE_PRIVATE void sqlite3CreateView(Parse*,Token*,Token*,Token*,Select*,int,int);
+
+#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
+SQLITE_PRIVATE   int sqlite3ViewGetColumnNames(Parse*,Table*);
+#else
+# define sqlite3ViewGetColumnNames(A,B) 0
+#endif
+
+SQLITE_PRIVATE void sqlite3DropTable(Parse*, SrcList*, int, int);
+SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3*, Table*);
+#ifndef SQLITE_OMIT_AUTOINCREMENT
+SQLITE_PRIVATE   void sqlite3AutoincrementBegin(Parse *pParse);
+SQLITE_PRIVATE   void sqlite3AutoincrementEnd(Parse *pParse);
+#else
+# define sqlite3AutoincrementBegin(X)
+# define sqlite3AutoincrementEnd(X)
+#endif
+SQLITE_PRIVATE void sqlite3Insert(Parse*, SrcList*, ExprList*, Select*, IdList*, int);
+SQLITE_PRIVATE void *sqlite3ArrayAllocate(sqlite3*,void*,int,int,int*,int*,int*);
+SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3*, IdList*, Token*);
+SQLITE_PRIVATE int sqlite3IdListIndex(IdList*,const char*);
+SQLITE_PRIVATE SrcList *sqlite3SrcListEnlarge(sqlite3*, SrcList*, int, int);
+SQLITE_PRIVATE SrcList *sqlite3SrcListAppend(sqlite3*, SrcList*, Token*, Token*);
+SQLITE_PRIVATE SrcList *sqlite3SrcListAppendFromTerm(Parse*, SrcList*, Token*, Token*,
+                                      Token*, Select*, Expr*, IdList*);
+SQLITE_PRIVATE void sqlite3SrcListIndexedBy(Parse *, SrcList *, Token *);
+SQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *, struct SrcList_item *);
+SQLITE_PRIVATE void sqlite3SrcListShiftJoinType(SrcList*);
+SQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse*, SrcList*);
+SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3*, IdList*);
+SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3*, SrcList*);
+SQLITE_PRIVATE Index *sqlite3CreateIndex(Parse*,Token*,Token*,SrcList*,ExprList*,int,Token*,
+                        Token*, int, int);
+SQLITE_PRIVATE void sqlite3DropIndex(Parse*, SrcList*, int);
+SQLITE_PRIVATE int sqlite3Select(Parse*, Select*, SelectDest*);
+SQLITE_PRIVATE Select *sqlite3SelectNew(Parse*,ExprList*,SrcList*,Expr*,ExprList*,
+                         Expr*,ExprList*,int,Expr*,Expr*);
+SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3*, Select*);
+SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse*, SrcList*);
+SQLITE_PRIVATE int sqlite3IsReadOnly(Parse*, Table*, int);
+SQLITE_PRIVATE void sqlite3OpenTable(Parse*, int iCur, int iDb, Table*, int);
+#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)
+SQLITE_PRIVATE Expr *sqlite3LimitWhere(Parse *, SrcList *, Expr *, ExprList *, Expr *, Expr *, char *);
+#endif
+SQLITE_PRIVATE void sqlite3DeleteFrom(Parse*, SrcList*, Expr*);
+SQLITE_PRIVATE void sqlite3Update(Parse*, SrcList*, ExprList*, Expr*, int);
+SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(Parse*, SrcList*, Expr*, ExprList**, u16);
+SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo*);
+SQLITE_PRIVATE int sqlite3ExprCodeGetColumn(Parse*, Table*, int, int, int);
+SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable(Vdbe*, Table*, int, int, int);
+SQLITE_PRIVATE void sqlite3ExprCodeMove(Parse*, int, int, int);
+SQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse*, int, int, int);
+SQLITE_PRIVATE void sqlite3ExprCacheStore(Parse*, int, int, int);
+SQLITE_PRIVATE void sqlite3ExprCachePush(Parse*);
+SQLITE_PRIVATE void sqlite3ExprCachePop(Parse*, int);
+SQLITE_PRIVATE void sqlite3ExprCacheRemove(Parse*, int, int);
+SQLITE_PRIVATE void sqlite3ExprCacheClear(Parse*);
+SQLITE_PRIVATE void sqlite3ExprCacheAffinityChange(Parse*, int, int);
+SQLITE_PRIVATE int sqlite3ExprCode(Parse*, Expr*, int);
+SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse*, Expr*, int*);
+SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse*, Expr*, int);
+SQLITE_PRIVATE int sqlite3ExprCodeAndCache(Parse*, Expr*, int);
+SQLITE_PRIVATE void sqlite3ExprCodeConstants(Parse*, Expr*);
+SQLITE_PRIVATE int sqlite3ExprCodeExprList(Parse*, ExprList*, int, int);
+SQLITE_PRIVATE void sqlite3ExprIfTrue(Parse*, Expr*, int, int);
+SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse*, Expr*, int, int);
+SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3*,const char*, const char*);
+SQLITE_PRIVATE Table *sqlite3LocateTable(Parse*,int isView,const char*, const char*);
+SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3*,const char*, const char*);
+SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3*,int,const char*);
+SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3*,int,const char*);
+SQLITE_PRIVATE void sqlite3Vacuum(Parse*);
+SQLITE_PRIVATE int sqlite3RunVacuum(char**, sqlite3*);
+SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3*, Token*);
+SQLITE_PRIVATE int sqlite3ExprCompare(Expr*, Expr*);
+SQLITE_PRIVATE int sqlite3ExprListCompare(ExprList*, ExprList*);
+SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext*, Expr*);
+SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext*,ExprList*);
+SQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse*);
+SQLITE_PRIVATE void sqlite3PrngSaveState(void);
+SQLITE_PRIVATE void sqlite3PrngRestoreState(void);
+SQLITE_PRIVATE void sqlite3PrngResetState(void);
+SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3*);
+SQLITE_PRIVATE void sqlite3CodeVerifySchema(Parse*, int);
+SQLITE_PRIVATE void sqlite3CodeVerifyNamedSchema(Parse*, const char *zDb);
+SQLITE_PRIVATE void sqlite3BeginTransaction(Parse*, int);
+SQLITE_PRIVATE void sqlite3CommitTransaction(Parse*);
+SQLITE_PRIVATE void sqlite3RollbackTransaction(Parse*);
+SQLITE_PRIVATE void sqlite3Savepoint(Parse*, int, Token*);
+SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *);
+SQLITE_PRIVATE int sqlite3ExprIsConstant(Expr*);
+SQLITE_PRIVATE int sqlite3ExprIsConstantNotJoin(Expr*);
+SQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr*);
+SQLITE_PRIVATE int sqlite3ExprIsInteger(Expr*, int*);
+SQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr*);
+SQLITE_PRIVATE void sqlite3ExprCodeIsNullJump(Vdbe*, const Expr*, int, int);
+SQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr*, char);
+SQLITE_PRIVATE int sqlite3IsRowid(const char*);
+SQLITE_PRIVATE void sqlite3GenerateRowDelete(Parse*, Table*, int, int, int, Trigger *, int);
+SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(Parse*, Table*, int, int*);
+SQLITE_PRIVATE int sqlite3GenerateIndexKey(Parse*, Index*, int, int, int);
+SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(Parse*,Table*,int,int,
+                                     int*,int,int,int,int,int*);
+SQLITE_PRIVATE void sqlite3CompleteInsertion(Parse*, Table*, int, int, int*, int, int, int);
+SQLITE_PRIVATE int sqlite3OpenTableAndIndices(Parse*, Table*, int, int);
+SQLITE_PRIVATE void sqlite3BeginWriteOperation(Parse*, int, int);
+SQLITE_PRIVATE void sqlite3MultiWrite(Parse*);
+SQLITE_PRIVATE void sqlite3MayAbort(Parse*);
+SQLITE_PRIVATE void sqlite3HaltConstraint(Parse*, int, char*, int);
+SQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3*,Expr*,int);
+SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3*,ExprList*,int);
+SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3*,SrcList*,int);
+SQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3*,IdList*);
+SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3*,Select*,int);
+SQLITE_PRIVATE void sqlite3FuncDefInsert(FuncDefHash*, FuncDef*);
+SQLITE_PRIVATE FuncDef *sqlite3FindFunction(sqlite3*,const char*,int,int,u8,int);
+SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3*);
+SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void);
+SQLITE_PRIVATE void sqlite3RegisterGlobalFunctions(void);
+SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3*);
+SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3*);
+SQLITE_PRIVATE void sqlite3ChangeCookie(Parse*, int);
+
+#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)
+SQLITE_PRIVATE void sqlite3MaterializeView(Parse*, Table*, Expr*, int);
+#endif
+
+#ifndef SQLITE_OMIT_TRIGGER
+SQLITE_PRIVATE   void sqlite3BeginTrigger(Parse*, Token*,Token*,int,int,IdList*,SrcList*,
+                           Expr*,int, int);
+SQLITE_PRIVATE   void sqlite3FinishTrigger(Parse*, TriggerStep*, Token*);
+SQLITE_PRIVATE   void sqlite3DropTrigger(Parse*, SrcList*, int);
+SQLITE_PRIVATE   void sqlite3DropTriggerPtr(Parse*, Trigger*);
+SQLITE_PRIVATE   Trigger *sqlite3TriggersExist(Parse *, Table*, int, ExprList*, int *pMask);
+SQLITE_PRIVATE   Trigger *sqlite3TriggerList(Parse *, Table *);
+SQLITE_PRIVATE   void sqlite3CodeRowTrigger(Parse*, Trigger *, int, ExprList*, int, Table *,
+                            int, int, int);
+SQLITE_PRIVATE   void sqlite3CodeRowTriggerDirect(Parse *, Trigger *, Table *, int, int, int);
+  void sqliteViewTriggers(Parse*, Table*, Expr*, int, ExprList*);
+SQLITE_PRIVATE   void sqlite3DeleteTriggerStep(sqlite3*, TriggerStep*);
+SQLITE_PRIVATE   TriggerStep *sqlite3TriggerSelectStep(sqlite3*,Select*);
+SQLITE_PRIVATE   TriggerStep *sqlite3TriggerInsertStep(sqlite3*,Token*, IdList*,
+                                        ExprList*,Select*,u8);
+SQLITE_PRIVATE   TriggerStep *sqlite3TriggerUpdateStep(sqlite3*,Token*,ExprList*, Expr*, u8);
+SQLITE_PRIVATE   TriggerStep *sqlite3TriggerDeleteStep(sqlite3*,Token*, Expr*);
+SQLITE_PRIVATE   void sqlite3DeleteTrigger(sqlite3*, Trigger*);
+SQLITE_PRIVATE   void sqlite3UnlinkAndDeleteTrigger(sqlite3*,int,const char*);
+SQLITE_PRIVATE   u32 sqlite3TriggerColmask(Parse*,Trigger*,ExprList*,int,int,Table*,int);
+# define sqlite3ParseToplevel(p) ((p)->pToplevel ? (p)->pToplevel : (p))
+#else
+# define sqlite3TriggersExist(B,C,D,E,F) 0
+# define sqlite3DeleteTrigger(A,B)
+# define sqlite3DropTriggerPtr(A,B)
+# define sqlite3UnlinkAndDeleteTrigger(A,B,C)
+# define sqlite3CodeRowTrigger(A,B,C,D,E,F,G,H,I)
+# define sqlite3CodeRowTriggerDirect(A,B,C,D,E,F)
+# define sqlite3TriggerList(X, Y) 0
+# define sqlite3ParseToplevel(p) p
+# define sqlite3TriggerColmask(A,B,C,D,E,F,G) 0
+#endif
+
+SQLITE_PRIVATE int sqlite3JoinType(Parse*, Token*, Token*, Token*);
+SQLITE_PRIVATE void sqlite3CreateForeignKey(Parse*, ExprList*, Token*, ExprList*, int);
+SQLITE_PRIVATE void sqlite3DeferForeignKey(Parse*, int);
+#ifndef SQLITE_OMIT_AUTHORIZATION
+SQLITE_PRIVATE   void sqlite3AuthRead(Parse*,Expr*,Schema*,SrcList*);
+SQLITE_PRIVATE   int sqlite3AuthCheck(Parse*,int, const char*, const char*, const char*);
+SQLITE_PRIVATE   void sqlite3AuthContextPush(Parse*, AuthContext*, const char*);
+SQLITE_PRIVATE   void sqlite3AuthContextPop(AuthContext*);
+SQLITE_PRIVATE   int sqlite3AuthReadCol(Parse*, const char *, const char *, int);
+#else
+# define sqlite3AuthRead(a,b,c,d)
+# define sqlite3AuthCheck(a,b,c,d,e)    SQLITE_OK
+# define sqlite3AuthContextPush(a,b,c)
+# define sqlite3AuthContextPop(a)  ((void)(a))
+#endif
+SQLITE_PRIVATE void sqlite3Attach(Parse*, Expr*, Expr*, Expr*);
+SQLITE_PRIVATE void sqlite3Detach(Parse*, Expr*);
+SQLITE_PRIVATE int sqlite3FixInit(DbFixer*, Parse*, int, const char*, const Token*);
+SQLITE_PRIVATE int sqlite3FixSrcList(DbFixer*, SrcList*);
+SQLITE_PRIVATE int sqlite3FixSelect(DbFixer*, Select*);
+SQLITE_PRIVATE int sqlite3FixExpr(DbFixer*, Expr*);
+SQLITE_PRIVATE int sqlite3FixExprList(DbFixer*, ExprList*);
+SQLITE_PRIVATE int sqlite3FixTriggerStep(DbFixer*, TriggerStep*);
+SQLITE_PRIVATE int sqlite3AtoF(const char *z, double*, int, u8);
+SQLITE_PRIVATE int sqlite3GetInt32(const char *, int*);
+SQLITE_PRIVATE int sqlite3Atoi(const char*);
+SQLITE_PRIVATE int sqlite3Utf16ByteLen(const void *pData, int nChar);
+SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *pData, int nByte);
+SQLITE_PRIVATE int sqlite3Utf8Read(const u8*, const u8**);
+
+/*
+** Routines to read and write variable-length integers.  These used to
+** be defined locally, but now we use the varint routines in the util.c
+** file.  Code should use the MACRO forms below, as the Varint32 versions
+** are coded to assume the single byte case is already handled (which 
+** the MACRO form does).
+*/
+SQLITE_PRIVATE int sqlite3PutVarint(unsigned char*, u64);
+SQLITE_PRIVATE int sqlite3PutVarint32(unsigned char*, u32);
+SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *, u64 *);
+SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *, u32 *);
+SQLITE_PRIVATE int sqlite3VarintLen(u64 v);
+
+/*
+** The header of a record consists of a sequence variable-length integers.
+** These integers are almost always small and are encoded as a single byte.
+** The following macros take advantage this fact to provide a fast encode
+** and decode of the integers in a record header.  It is faster for the common
+** case where the integer is a single byte.  It is a little slower when the
+** integer is two or more bytes.  But overall it is faster.
+**
+** The following expressions are equivalent:
+**
+**     x = sqlite3GetVarint32( A, &B );
+**     x = sqlite3PutVarint32( A, B );
+**
+**     x = getVarint32( A, B );
+**     x = putVarint32( A, B );
+**
+*/
+#define getVarint32(A,B)  (u8)((*(A)<(u8)0x80) ? ((B) = (u32)*(A)),1 : sqlite3GetVarint32((A), (u32 *)&(B)))
+#define putVarint32(A,B)  (u8)(((u32)(B)<(u32)0x80) ? (*(A) = (unsigned char)(B)),1 : sqlite3PutVarint32((A), (B)))
+#define getVarint    sqlite3GetVarint
+#define putVarint    sqlite3PutVarint
+
+
+SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *, Index *);
+SQLITE_PRIVATE void sqlite3TableAffinityStr(Vdbe *, Table *);
+SQLITE_PRIVATE char sqlite3CompareAffinity(Expr *pExpr, char aff2);
+SQLITE_PRIVATE int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity);
+SQLITE_PRIVATE char sqlite3ExprAffinity(Expr *pExpr);
+SQLITE_PRIVATE int sqlite3Atoi64(const char*, i64*, int, u8);
+SQLITE_PRIVATE void sqlite3Error(sqlite3*, int, const char*,...);
+SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3*, const char *z, int n);
+SQLITE_PRIVATE int sqlite3TwoPartName(Parse *, Token *, Token *, Token **);
+SQLITE_PRIVATE const char *sqlite3ErrStr(int);
+SQLITE_PRIVATE int sqlite3ReadSchema(Parse *pParse);
+SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(sqlite3*,u8 enc, const char*,int);
+SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char*zName);
+SQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr);
+SQLITE_PRIVATE Expr *sqlite3ExprSetColl(Expr*, CollSeq*);
+SQLITE_PRIVATE Expr *sqlite3ExprSetCollByToken(Parse *pParse, Expr*, Token*);
+SQLITE_PRIVATE int sqlite3CheckCollSeq(Parse *, CollSeq *);
+SQLITE_PRIVATE int sqlite3CheckObjectName(Parse *, const char *);
+SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *, int);
+SQLITE_PRIVATE int sqlite3AddInt64(i64*,i64);
+SQLITE_PRIVATE int sqlite3SubInt64(i64*,i64);
+SQLITE_PRIVATE int sqlite3MulInt64(i64*,i64);
+SQLITE_PRIVATE int sqlite3AbsInt32(int);
+
+SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value*, u8);
+SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value*, u8);
+SQLITE_PRIVATE void sqlite3ValueSetStr(sqlite3_value*, int, const void *,u8, 
+                        void(*)(void*));
+SQLITE_PRIVATE void sqlite3ValueFree(sqlite3_value*);
+SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *);
+SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *, const void*, int, u8);
+#ifdef SQLITE_ENABLE_STAT2
+SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *, u8, char *, int, int *);
+#endif
+SQLITE_PRIVATE int sqlite3ValueFromExpr(sqlite3 *, Expr *, u8, u8, sqlite3_value **);
+SQLITE_PRIVATE void sqlite3ValueApplyAffinity(sqlite3_value *, u8, u8);
+#ifndef SQLITE_AMALGAMATION
+SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[];
+SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[];
+SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[];
+SQLITE_PRIVATE const Token sqlite3IntTokens[];
+SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config;
+SQLITE_PRIVATE SQLITE_WSD FuncDefHash sqlite3GlobalFunctions;
+#ifndef SQLITE_OMIT_WSD
+SQLITE_PRIVATE int sqlite3PendingByte;
+#endif
+#endif
+SQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3*, int, int, int);
+SQLITE_PRIVATE void sqlite3Reindex(Parse*, Token*, Token*);
+SQLITE_PRIVATE void sqlite3AlterFunctions(void);
+SQLITE_PRIVATE void sqlite3AlterRenameTable(Parse*, SrcList*, Token*);
+SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *, int *);
+SQLITE_PRIVATE void sqlite3NestedParse(Parse*, const char*, ...);
+SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3*);
+SQLITE_PRIVATE int sqlite3CodeSubselect(Parse *, Expr *, int, int);
+SQLITE_PRIVATE void sqlite3SelectPrep(Parse*, Select*, NameContext*);
+SQLITE_PRIVATE int sqlite3ResolveExprNames(NameContext*, Expr*);
+SQLITE_PRIVATE void sqlite3ResolveSelectNames(Parse*, Select*, NameContext*);
+SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(Parse*, Select*, ExprList*, const char*);
+SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *, Table *, int, int);
+SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *, Token *);
+SQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *, SrcList *);
+SQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(sqlite3*, u8, CollSeq *, const char*);
+SQLITE_PRIVATE char sqlite3AffinityType(const char*);
+SQLITE_PRIVATE void sqlite3Analyze(Parse*, Token*, Token*);
+SQLITE_PRIVATE int sqlite3InvokeBusyHandler(BusyHandler*);
+SQLITE_PRIVATE int sqlite3FindDb(sqlite3*, Token*);
+SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *, const char *);
+SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3*,int iDB);
+SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3*,Index*);
+SQLITE_PRIVATE void sqlite3DefaultRowEst(Index*);
+SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3*, int);
+SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3*,Expr*,int*,char*);
+SQLITE_PRIVATE void sqlite3MinimumFileFormat(Parse*, int, int);
+SQLITE_PRIVATE void sqlite3SchemaClear(void *);
+SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *, Btree *);
+SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *);
+SQLITE_PRIVATE KeyInfo *sqlite3IndexKeyinfo(Parse *, Index *);
+SQLITE_PRIVATE int sqlite3CreateFunc(sqlite3 *, const char *, int, int, void *, 
+  void (*)(sqlite3_context*,int,sqlite3_value **),
+  void (*)(sqlite3_context*,int,sqlite3_value **), void (*)(sqlite3_context*),
+  FuncDestructor *pDestructor
+);
+SQLITE_PRIVATE int sqlite3ApiExit(sqlite3 *db, int);
+SQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *);
+
+SQLITE_PRIVATE void sqlite3StrAccumInit(StrAccum*, char*, int, int);
+SQLITE_PRIVATE void sqlite3StrAccumAppend(StrAccum*,const char*,int);
+SQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum*);
+SQLITE_PRIVATE void sqlite3StrAccumReset(StrAccum*);
+SQLITE_PRIVATE void sqlite3SelectDestInit(SelectDest*,int,int);
+SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *, SrcList *, int, int);
+
+SQLITE_PRIVATE void sqlite3BackupRestart(sqlite3_backup *);
+SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *, Pgno, const u8 *);
+
+/*
+** The interface to the LEMON-generated parser
+*/
+SQLITE_PRIVATE void *sqlite3ParserAlloc(void*(*)(size_t));
+SQLITE_PRIVATE void sqlite3ParserFree(void*, void(*)(void*));
+SQLITE_PRIVATE void sqlite3Parser(void*, int, Token, Parse*);
+#ifdef YYTRACKMAXSTACKDEPTH
+SQLITE_PRIVATE   int sqlite3ParserStackPeak(void*);
+#endif
+
+SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3*);
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
+SQLITE_PRIVATE   void sqlite3CloseExtensions(sqlite3*);
+#else
+# define sqlite3CloseExtensions(X)
+#endif
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+SQLITE_PRIVATE   void sqlite3TableLock(Parse *, int, int, u8, const char *);
+#else
+  #define sqlite3TableLock(v,w,x,y,z)
+#endif
+
+#ifdef SQLITE_TEST
+SQLITE_PRIVATE   int sqlite3Utf8To8(unsigned char*);
+#endif
+
+#ifdef SQLITE_OMIT_VIRTUALTABLE
+#  define sqlite3VtabClear(Y)
+#  define sqlite3VtabSync(X,Y) SQLITE_OK
+#  define sqlite3VtabRollback(X)
+#  define sqlite3VtabCommit(X)
+#  define sqlite3VtabInSync(db) 0
+#  define sqlite3VtabLock(X) 
+#  define sqlite3VtabUnlock(X)
+#  define sqlite3VtabUnlockList(X)
+#else
+SQLITE_PRIVATE    void sqlite3VtabClear(sqlite3 *db, Table*);
+SQLITE_PRIVATE    int sqlite3VtabSync(sqlite3 *db, char **);
+SQLITE_PRIVATE    int sqlite3VtabRollback(sqlite3 *db);
+SQLITE_PRIVATE    int sqlite3VtabCommit(sqlite3 *db);
+SQLITE_PRIVATE    void sqlite3VtabLock(VTable *);
+SQLITE_PRIVATE    void sqlite3VtabUnlock(VTable *);
+SQLITE_PRIVATE    void sqlite3VtabUnlockList(sqlite3*);
+#  define sqlite3VtabInSync(db) ((db)->nVTrans>0 && (db)->aVTrans==0)
+#endif
+SQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse*,Table*);
+SQLITE_PRIVATE void sqlite3VtabBeginParse(Parse*, Token*, Token*, Token*);
+SQLITE_PRIVATE void sqlite3VtabFinishParse(Parse*, Token*);
+SQLITE_PRIVATE void sqlite3VtabArgInit(Parse*);
+SQLITE_PRIVATE void sqlite3VtabArgExtend(Parse*, Token*);
+SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3*, int, const char *, char **);
+SQLITE_PRIVATE int sqlite3VtabCallConnect(Parse*, Table*);
+SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3*, int, const char *);
+SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *, VTable *);
+SQLITE_PRIVATE FuncDef *sqlite3VtabOverloadFunction(sqlite3 *,FuncDef*, int nArg, Expr*);
+SQLITE_PRIVATE void sqlite3InvalidFunction(sqlite3_context*,int,sqlite3_value**);
+SQLITE_PRIVATE int sqlite3VdbeParameterIndex(Vdbe*, const char*, int);
+SQLITE_PRIVATE int sqlite3TransferBindings(sqlite3_stmt *, sqlite3_stmt *);
+SQLITE_PRIVATE int sqlite3Reprepare(Vdbe*);
+SQLITE_PRIVATE void sqlite3ExprListCheckLength(Parse*, ExprList*, const char*);
+SQLITE_PRIVATE CollSeq *sqlite3BinaryCompareCollSeq(Parse *, Expr *, Expr *);
+SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3*);
+SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3*, Table*);
+SQLITE_PRIVATE const char *sqlite3JournalModename(int);
+SQLITE_PRIVATE int sqlite3Checkpoint(sqlite3*, int, int, int*, int*);
+SQLITE_PRIVATE int sqlite3WalDefaultHook(void*,sqlite3*,const char*,int);
+
+/* Declarations for functions in fkey.c. All of these are replaced by
+** no-op macros if OMIT_FOREIGN_KEY is defined. In this case no foreign
+** key functionality is available. If OMIT_TRIGGER is defined but
+** OMIT_FOREIGN_KEY is not, only some of the functions are no-oped. In
+** this case foreign keys are parsed, but no other functionality is 
+** provided (enforcement of FK constraints requires the triggers sub-system).
+*/
+#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
+SQLITE_PRIVATE   void sqlite3FkCheck(Parse*, Table*, int, int);
+SQLITE_PRIVATE   void sqlite3FkDropTable(Parse*, SrcList *, Table*);
+SQLITE_PRIVATE   void sqlite3FkActions(Parse*, Table*, ExprList*, int);
+SQLITE_PRIVATE   int sqlite3FkRequired(Parse*, Table*, int*, int);
+SQLITE_PRIVATE   u32 sqlite3FkOldmask(Parse*, Table*);
+SQLITE_PRIVATE   FKey *sqlite3FkReferences(Table *);
+#else
+  #define sqlite3FkActions(a,b,c,d)
+  #define sqlite3FkCheck(a,b,c,d)
+  #define sqlite3FkDropTable(a,b,c)
+  #define sqlite3FkOldmask(a,b)      0
+  #define sqlite3FkRequired(a,b,c,d) 0
+#endif
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+SQLITE_PRIVATE   void sqlite3FkDelete(sqlite3 *, Table*);
+#else
+  #define sqlite3FkDelete(a,b)
+#endif
+
+
+/*
+** Available fault injectors.  Should be numbered beginning with 0.
+*/
+#define SQLITE_FAULTINJECTOR_MALLOC     0
+#define SQLITE_FAULTINJECTOR_COUNT      1
+
+/*
+** The interface to the code in fault.c used for identifying "benign"
+** malloc failures. This is only present if SQLITE_OMIT_BUILTIN_TEST
+** is not defined.
+*/
+#ifndef SQLITE_OMIT_BUILTIN_TEST
+SQLITE_PRIVATE   void sqlite3BeginBenignMalloc(void);
+SQLITE_PRIVATE   void sqlite3EndBenignMalloc(void);
+#else
+  #define sqlite3BeginBenignMalloc()
+  #define sqlite3EndBenignMalloc()
+#endif
+
+#define IN_INDEX_ROWID           1
+#define IN_INDEX_EPH             2
+#define IN_INDEX_INDEX           3
+SQLITE_PRIVATE int sqlite3FindInIndex(Parse *, Expr *, int*);
+
+#ifdef SQLITE_ENABLE_ATOMIC_WRITE
+SQLITE_PRIVATE   int sqlite3JournalOpen(sqlite3_vfs *, const char *, sqlite3_file *, int, int);
+SQLITE_PRIVATE   int sqlite3JournalSize(sqlite3_vfs *);
+SQLITE_PRIVATE   int sqlite3JournalCreate(sqlite3_file *);
+#else
+  #define sqlite3JournalSize(pVfs) ((pVfs)->szOsFile)
+#endif
+
+SQLITE_PRIVATE void sqlite3MemJournalOpen(sqlite3_file *);
+SQLITE_PRIVATE int sqlite3MemJournalSize(void);
+SQLITE_PRIVATE int sqlite3IsMemJournal(sqlite3_file *);
+
+#if SQLITE_MAX_EXPR_DEPTH>0
+SQLITE_PRIVATE   void sqlite3ExprSetHeight(Parse *pParse, Expr *p);
+SQLITE_PRIVATE   int sqlite3SelectExprHeight(Select *);
+SQLITE_PRIVATE   int sqlite3ExprCheckHeight(Parse*, int);
+#else
+  #define sqlite3ExprSetHeight(x,y)
+  #define sqlite3SelectExprHeight(x) 0
+  #define sqlite3ExprCheckHeight(x,y)
+#endif
+
+SQLITE_PRIVATE u32 sqlite3Get4byte(const u8*);
+SQLITE_PRIVATE void sqlite3Put4byte(u8*, u32);
+
+#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
+SQLITE_PRIVATE   void sqlite3ConnectionBlocked(sqlite3 *, sqlite3 *);
+SQLITE_PRIVATE   void sqlite3ConnectionUnlocked(sqlite3 *db);
+SQLITE_PRIVATE   void sqlite3ConnectionClosed(sqlite3 *db);
+#else
+  #define sqlite3ConnectionBlocked(x,y)
+  #define sqlite3ConnectionUnlocked(x)
+  #define sqlite3ConnectionClosed(x)
+#endif
+
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE   void sqlite3ParserTrace(FILE*, char *);
+#endif
+
+/*
+** If the SQLITE_ENABLE IOTRACE exists then the global variable
+** sqlite3IoTrace is a pointer to a printf-like routine used to
+** print I/O tracing messages. 
+*/
+#ifdef SQLITE_ENABLE_IOTRACE
+# define IOTRACE(A)  if( sqlite3IoTrace ){ sqlite3IoTrace A; }
+SQLITE_PRIVATE   void sqlite3VdbeIOTraceSql(Vdbe*);
+SQLITE_PRIVATE void (*sqlite3IoTrace)(const char*,...);
+#else
+# define IOTRACE(A)
+# define sqlite3VdbeIOTraceSql(X)
+#endif
+
+/*
+** These routines are available for the mem2.c debugging memory allocator
+** only.  They are used to verify that different "types" of memory
+** allocations are properly tracked by the system.
+**
+** sqlite3MemdebugSetType() sets the "type" of an allocation to one of
+** the MEMTYPE_* macros defined below.  The type must be a bitmask with
+** a single bit set.
+**
+** sqlite3MemdebugHasType() returns true if any of the bits in its second
+** argument match the type set by the previous sqlite3MemdebugSetType().
+** sqlite3MemdebugHasType() is intended for use inside assert() statements.
+**
+** sqlite3MemdebugNoType() returns true if none of the bits in its second
+** argument match the type set by the previous sqlite3MemdebugSetType().
+**
+** Perhaps the most important point is the difference between MEMTYPE_HEAP
+** and MEMTYPE_LOOKASIDE.  If an allocation is MEMTYPE_LOOKASIDE, that means
+** it might have been allocated by lookaside, except the allocation was
+** too large or lookaside was already full.  It is important to verify
+** that allocations that might have been satisfied by lookaside are not
+** passed back to non-lookaside free() routines.  Asserts such as the
+** example above are placed on the non-lookaside free() routines to verify
+** this constraint. 
+**
+** All of this is no-op for a production build.  It only comes into
+** play when the SQLITE_MEMDEBUG compile-time option is used.
+*/
+#ifdef SQLITE_MEMDEBUG
+SQLITE_PRIVATE   void sqlite3MemdebugSetType(void*,u8);
+SQLITE_PRIVATE   int sqlite3MemdebugHasType(void*,u8);
+SQLITE_PRIVATE   int sqlite3MemdebugNoType(void*,u8);
+#else
+# define sqlite3MemdebugSetType(X,Y)  /* no-op */
+# define sqlite3MemdebugHasType(X,Y)  1
+# define sqlite3MemdebugNoType(X,Y)   1
+#endif
+#define MEMTYPE_HEAP       0x01  /* General heap allocations */
+#define MEMTYPE_LOOKASIDE  0x02  /* Might have been lookaside memory */
+#define MEMTYPE_SCRATCH    0x04  /* Scratch allocations */
+#define MEMTYPE_PCACHE     0x08  /* Page cache allocations */
+#define MEMTYPE_DB         0x10  /* Uses sqlite3DbMalloc, not sqlite_malloc */
+
+#endif /* _SQLITEINT_H_ */
+
+/************** End of sqliteInt.h *******************************************/
+/************** Begin file global.c ******************************************/
+/*
+** 2008 June 13
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains definitions of global variables and contants.
+*/
+
+/* An array to map all upper-case characters into their corresponding
+** lower-case character. 
+**
+** SQLite only considers US-ASCII (or EBCDIC) characters.  We do not
+** handle case conversions for the UTF character set since the tables
+** involved are nearly as big or bigger than SQLite itself.
+*/
+SQLITE_PRIVATE const unsigned char sqlite3UpperToLower[] = {
+#ifdef SQLITE_ASCII
+      0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, 16, 17,
+     18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35,
+     36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53,
+     54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 97, 98, 99,100,101,102,103,
+    104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,
+    122, 91, 92, 93, 94, 95, 96, 97, 98, 99,100,101,102,103,104,105,106,107,
+    108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,
+    126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,
+    144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,
+    162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,
+    180,181,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,
+    198,199,200,201,202,203,204,205,206,207,208,209,210,211,212,213,214,215,
+    216,217,218,219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,
+    234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,
+    252,253,254,255
+#endif
+#ifdef SQLITE_EBCDIC
+      0,  1,  2,  3,  4,  5,  6,  7,  8,  9, 10, 11, 12, 13, 14, 15, /* 0x */
+     16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, /* 1x */
+     32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, /* 2x */
+     48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, /* 3x */
+     64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, /* 4x */
+     80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, /* 5x */
+     96, 97, 66, 67, 68, 69, 70, 71, 72, 73,106,107,108,109,110,111, /* 6x */
+    112, 81, 82, 83, 84, 85, 86, 87, 88, 89,122,123,124,125,126,127, /* 7x */
+    128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143, /* 8x */
+    144,145,146,147,148,149,150,151,152,153,154,155,156,157,156,159, /* 9x */
+    160,161,162,163,164,165,166,167,168,169,170,171,140,141,142,175, /* Ax */
+    176,177,178,179,180,181,182,183,184,185,186,187,188,189,190,191, /* Bx */
+    192,129,130,131,132,133,134,135,136,137,202,203,204,205,206,207, /* Cx */
+    208,145,146,147,148,149,150,151,152,153,218,219,220,221,222,223, /* Dx */
+    224,225,162,163,164,165,166,167,168,169,232,203,204,205,206,207, /* Ex */
+    239,240,241,242,243,244,245,246,247,248,249,219,220,221,222,255, /* Fx */
+#endif
+};
+
+/*
+** The following 256 byte lookup table is used to support SQLites built-in
+** equivalents to the following standard library functions:
+**
+**   isspace()                        0x01
+**   isalpha()                        0x02
+**   isdigit()                        0x04
+**   isalnum()                        0x06
+**   isxdigit()                       0x08
+**   toupper()                        0x20
+**   SQLite identifier character      0x40
+**
+** Bit 0x20 is set if the mapped character requires translation to upper
+** case. i.e. if the character is a lower-case ASCII character.
+** If x is a lower-case ASCII character, then its upper-case equivalent
+** is (x - 0x20). Therefore toupper() can be implemented as:
+**
+**   (x & ~(map[x]&0x20))
+**
+** Standard function tolower() is implemented using the sqlite3UpperToLower[]
+** array. tolower() is used more often than toupper() by SQLite.
+**
+** Bit 0x40 is set if the character non-alphanumeric and can be used in an 
+** SQLite identifier.  Identifiers are alphanumerics, "_", "$", and any
+** non-ASCII UTF character. Hence the test for whether or not a character is
+** part of an identifier is 0x46.
+**
+** SQLite's versions are identical to the standard versions assuming a
+** locale of "C". They are implemented as macros in sqliteInt.h.
+*/
+#ifdef SQLITE_ASCII
+SQLITE_PRIVATE const unsigned char sqlite3CtypeMap[256] = {
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 00..07    ........ */
+  0x00, 0x01, 0x01, 0x01, 0x01, 0x01, 0x00, 0x00,  /* 08..0f    ........ */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 10..17    ........ */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 18..1f    ........ */
+  0x01, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00,  /* 20..27     !"#$%&' */
+  0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 28..2f    ()*+,-./ */
+  0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c, 0x0c,  /* 30..37    01234567 */
+  0x0c, 0x0c, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 38..3f    89:;<=>? */
+
+  0x00, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x0a, 0x02,  /* 40..47    @ABCDEFG */
+  0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,  /* 48..4f    HIJKLMNO */
+  0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02,  /* 50..57    PQRSTUVW */
+  0x02, 0x02, 0x02, 0x00, 0x00, 0x00, 0x00, 0x40,  /* 58..5f    XYZ[\]^_ */
+  0x00, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x2a, 0x22,  /* 60..67    `abcdefg */
+  0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,  /* 68..6f    hijklmno */
+  0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22, 0x22,  /* 70..77    pqrstuvw */
+  0x22, 0x22, 0x22, 0x00, 0x00, 0x00, 0x00, 0x00,  /* 78..7f    xyz{|}~. */
+
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* 80..87    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* 88..8f    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* 90..97    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* 98..9f    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* a0..a7    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* a8..af    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* b0..b7    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* b8..bf    ........ */
+
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* c0..c7    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* c8..cf    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* d0..d7    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* d8..df    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* e0..e7    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* e8..ef    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40,  /* f0..f7    ........ */
+  0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40, 0x40   /* f8..ff    ........ */
+};
+#endif
+
+
+
+/*
+** The following singleton contains the global configuration for
+** the SQLite library.
+*/
+SQLITE_PRIVATE SQLITE_WSD struct Sqlite3Config sqlite3Config = {
+   SQLITE_DEFAULT_MEMSTATUS,  /* bMemstat */
+   1,                         /* bCoreMutex */
+   SQLITE_THREADSAFE==1,      /* bFullMutex */
+   0x7ffffffe,                /* mxStrlen */
+   100,                       /* szLookaside */
+   500,                       /* nLookaside */
+   {0,0,0,0,0,0,0,0},         /* m */
+   {0,0,0,0,0,0,0,0,0},       /* mutex */
+   {0,0,0,0,0,0,0,0,0,0,0},   /* pcache */
+   (void*)0,                  /* pHeap */
+   0,                         /* nHeap */
+   0, 0,                      /* mnHeap, mxHeap */
+   (void*)0,                  /* pScratch */
+   0,                         /* szScratch */
+   0,                         /* nScratch */
+   (void*)0,                  /* pPage */
+   0,                         /* szPage */
+   0,                         /* nPage */
+   0,                         /* mxParserStack */
+   0,                         /* sharedCacheEnabled */
+   /* All the rest should always be initialized to zero */
+   0,                         /* isInit */
+   0,                         /* inProgress */
+   0,                         /* isMutexInit */
+   0,                         /* isMallocInit */
+   0,                         /* isPCacheInit */
+   0,                         /* pInitMutex */
+   0,                         /* nRefInitMutex */
+   0,                         /* xLog */
+   0,                         /* pLogArg */
+};
+
+
+/*
+** Hash table for global functions - functions common to all
+** database connections.  After initialization, this table is
+** read-only.
+*/
+SQLITE_PRIVATE SQLITE_WSD FuncDefHash sqlite3GlobalFunctions;
+
+/*
+** Constant tokens for values 0 and 1.
+*/
+SQLITE_PRIVATE const Token sqlite3IntTokens[] = {
+   { "0", 1 },
+   { "1", 1 }
+};
+
+
+/*
+** The value of the "pending" byte must be 0x40000000 (1 byte past the
+** 1-gibabyte boundary) in a compatible database.  SQLite never uses
+** the database page that contains the pending byte.  It never attempts
+** to read or write that page.  The pending byte page is set assign
+** for use by the VFS layers as space for managing file locks.
+**
+** During testing, it is often desirable to move the pending byte to
+** a different position in the file.  This allows code that has to
+** deal with the pending byte to run on files that are much smaller
+** than 1 GiB.  The sqlite3_test_control() interface can be used to
+** move the pending byte.
+**
+** IMPORTANT:  Changing the pending byte to any value other than
+** 0x40000000 results in an incompatible database file format!
+** Changing the pending byte during operating results in undefined
+** and dileterious behavior.
+*/
+#ifndef SQLITE_OMIT_WSD
+SQLITE_PRIVATE int sqlite3PendingByte = 0x40000000;
+#endif
+
+/*
+** Properties of opcodes.  The OPFLG_INITIALIZER macro is
+** created by mkopcodeh.awk during compilation.  Data is obtained
+** from the comments following the "case OP_xxxx:" statements in
+** the vdbe.c file.  
+*/
+SQLITE_PRIVATE const unsigned char sqlite3OpcodeProperty[] = OPFLG_INITIALIZER;
+
+/************** End of global.c **********************************************/
+/************** Begin file ctime.c *******************************************/
+/*
+** 2010 February 23
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file implements routines used to report what compile-time options
+** SQLite was built with.
+*/
+
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+
+
+/*
+** An array of names of all compile-time options.  This array should 
+** be sorted A-Z.
+**
+** This array looks large, but in a typical installation actually uses
+** only a handful of compile-time options, so most times this array is usually
+** rather short and uses little memory space.
+*/
+static const char * const azCompileOpt[] = {
+
+/* These macros are provided to "stringify" the value of the define
+** for those options in which the value is meaningful. */
+#define CTIMEOPT_VAL_(opt) #opt
+#define CTIMEOPT_VAL(opt) CTIMEOPT_VAL_(opt)
+
+#ifdef SQLITE_32BIT_ROWID
+  "32BIT_ROWID",
+#endif
+#ifdef SQLITE_4_BYTE_ALIGNED_MALLOC
+  "4_BYTE_ALIGNED_MALLOC",
+#endif
+#ifdef SQLITE_CASE_SENSITIVE_LIKE
+  "CASE_SENSITIVE_LIKE",
+#endif
+#ifdef SQLITE_CHECK_PAGES
+  "CHECK_PAGES",
+#endif
+#ifdef SQLITE_COVERAGE_TEST
+  "COVERAGE_TEST",
+#endif
+#ifdef SQLITE_DEBUG
+  "DEBUG",
+#endif
+#ifdef SQLITE_DEFAULT_LOCKING_MODE
+  "DEFAULT_LOCKING_MODE=" CTIMEOPT_VAL(SQLITE_DEFAULT_LOCKING_MODE),
+#endif
+#ifdef SQLITE_DISABLE_DIRSYNC
+  "DISABLE_DIRSYNC",
+#endif
+#ifdef SQLITE_DISABLE_LFS
+  "DISABLE_LFS",
+#endif
+#ifdef SQLITE_ENABLE_ATOMIC_WRITE
+  "ENABLE_ATOMIC_WRITE",
+#endif
+#ifdef SQLITE_ENABLE_CEROD
+  "ENABLE_CEROD",
+#endif
+#ifdef SQLITE_ENABLE_COLUMN_METADATA
+  "ENABLE_COLUMN_METADATA",
+#endif
+#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
+  "ENABLE_EXPENSIVE_ASSERT",
+#endif
+#ifdef SQLITE_ENABLE_FTS1
+  "ENABLE_FTS1",
+#endif
+#ifdef SQLITE_ENABLE_FTS2
+  "ENABLE_FTS2",
+#endif
+#ifdef SQLITE_ENABLE_FTS3
+  "ENABLE_FTS3",
+#endif
+#ifdef SQLITE_ENABLE_FTS3_PARENTHESIS
+  "ENABLE_FTS3_PARENTHESIS",
+#endif
+#ifdef SQLITE_ENABLE_FTS4
+  "ENABLE_FTS4",
+#endif
+#ifdef SQLITE_ENABLE_ICU
+  "ENABLE_ICU",
+#endif
+#ifdef SQLITE_ENABLE_IOTRACE
+  "ENABLE_IOTRACE",
+#endif
+#ifdef SQLITE_ENABLE_LOAD_EXTENSION
+  "ENABLE_LOAD_EXTENSION",
+#endif
+#ifdef SQLITE_ENABLE_LOCKING_STYLE
+  "ENABLE_LOCKING_STYLE=" CTIMEOPT_VAL(SQLITE_ENABLE_LOCKING_STYLE),
+#endif
+#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
+  "ENABLE_MEMORY_MANAGEMENT",
+#endif
+#ifdef SQLITE_ENABLE_MEMSYS3
+  "ENABLE_MEMSYS3",
+#endif
+#ifdef SQLITE_ENABLE_MEMSYS5
+  "ENABLE_MEMSYS5",
+#endif
+#ifdef SQLITE_ENABLE_OVERSIZE_CELL_CHECK
+  "ENABLE_OVERSIZE_CELL_CHECK",
+#endif
+#ifdef SQLITE_ENABLE_RTREE
+  "ENABLE_RTREE",
+#endif
+#ifdef SQLITE_ENABLE_STAT2
+  "ENABLE_STAT2",
+#endif
+#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
+  "ENABLE_UNLOCK_NOTIFY",
+#endif
+#ifdef SQLITE_ENABLE_UPDATE_DELETE_LIMIT
+  "ENABLE_UPDATE_DELETE_LIMIT",
+#endif
+#ifdef SQLITE_HAS_CODEC
+  "HAS_CODEC",
+#endif
+#ifdef SQLITE_HAVE_ISNAN
+  "HAVE_ISNAN",
+#endif
+#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
+  "HOMEGROWN_RECURSIVE_MUTEX",
+#endif
+#ifdef SQLITE_IGNORE_AFP_LOCK_ERRORS
+  "IGNORE_AFP_LOCK_ERRORS",
+#endif
+#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
+  "IGNORE_FLOCK_LOCK_ERRORS",
+#endif
+#ifdef SQLITE_INT64_TYPE
+  "INT64_TYPE",
+#endif
+#ifdef SQLITE_LOCK_TRACE
+  "LOCK_TRACE",
+#endif
+#ifdef SQLITE_MEMDEBUG
+  "MEMDEBUG",
+#endif
+#ifdef SQLITE_MIXED_ENDIAN_64BIT_FLOAT
+  "MIXED_ENDIAN_64BIT_FLOAT",
+#endif
+#ifdef SQLITE_NO_SYNC
+  "NO_SYNC",
+#endif
+#ifdef SQLITE_OMIT_ALTERTABLE
+  "OMIT_ALTERTABLE",
+#endif
+#ifdef SQLITE_OMIT_ANALYZE
+  "OMIT_ANALYZE",
+#endif
+#ifdef SQLITE_OMIT_ATTACH
+  "OMIT_ATTACH",
+#endif
+#ifdef SQLITE_OMIT_AUTHORIZATION
+  "OMIT_AUTHORIZATION",
+#endif
+#ifdef SQLITE_OMIT_AUTOINCREMENT
+  "OMIT_AUTOINCREMENT",
+#endif
+#ifdef SQLITE_OMIT_AUTOINIT
+  "OMIT_AUTOINIT",
+#endif
+#ifdef SQLITE_OMIT_AUTOMATIC_INDEX
+  "OMIT_AUTOMATIC_INDEX",
+#endif
+#ifdef SQLITE_OMIT_AUTORESET
+  "OMIT_AUTORESET",
+#endif
+#ifdef SQLITE_OMIT_AUTOVACUUM
+  "OMIT_AUTOVACUUM",
+#endif
+#ifdef SQLITE_OMIT_BETWEEN_OPTIMIZATION
+  "OMIT_BETWEEN_OPTIMIZATION",
+#endif
+#ifdef SQLITE_OMIT_BLOB_LITERAL
+  "OMIT_BLOB_LITERAL",
+#endif
+#ifdef SQLITE_OMIT_BTREECOUNT
+  "OMIT_BTREECOUNT",
+#endif
+#ifdef SQLITE_OMIT_BUILTIN_TEST
+  "OMIT_BUILTIN_TEST",
+#endif
+#ifdef SQLITE_OMIT_CAST
+  "OMIT_CAST",
+#endif
+#ifdef SQLITE_OMIT_CHECK
+  "OMIT_CHECK",
+#endif
+/* // redundant
+** #ifdef SQLITE_OMIT_COMPILEOPTION_DIAGS
+**   "OMIT_COMPILEOPTION_DIAGS",
+** #endif
+*/
+#ifdef SQLITE_OMIT_COMPLETE
+  "OMIT_COMPLETE",
+#endif
+#ifdef SQLITE_OMIT_COMPOUND_SELECT
+  "OMIT_COMPOUND_SELECT",
+#endif
+#ifdef SQLITE_OMIT_DATETIME_FUNCS
+  "OMIT_DATETIME_FUNCS",
+#endif
+#ifdef SQLITE_OMIT_DECLTYPE
+  "OMIT_DECLTYPE",
+#endif
+#ifdef SQLITE_OMIT_DEPRECATED
+  "OMIT_DEPRECATED",
+#endif
+#ifdef SQLITE_OMIT_DISKIO
+  "OMIT_DISKIO",
+#endif
+#ifdef SQLITE_OMIT_EXPLAIN
+  "OMIT_EXPLAIN",
+#endif
+#ifdef SQLITE_OMIT_FLAG_PRAGMAS
+  "OMIT_FLAG_PRAGMAS",
+#endif
+#ifdef SQLITE_OMIT_FLOATING_POINT
+  "OMIT_FLOATING_POINT",
+#endif
+#ifdef SQLITE_OMIT_FOREIGN_KEY
+  "OMIT_FOREIGN_KEY",
+#endif
+#ifdef SQLITE_OMIT_GET_TABLE
+  "OMIT_GET_TABLE",
+#endif
+#ifdef SQLITE_OMIT_INCRBLOB
+  "OMIT_INCRBLOB",
+#endif
+#ifdef SQLITE_OMIT_INTEGRITY_CHECK
+  "OMIT_INTEGRITY_CHECK",
+#endif
+#ifdef SQLITE_OMIT_LIKE_OPTIMIZATION
+  "OMIT_LIKE_OPTIMIZATION",
+#endif
+#ifdef SQLITE_OMIT_LOAD_EXTENSION
+  "OMIT_LOAD_EXTENSION",
+#endif
+#ifdef SQLITE_OMIT_LOCALTIME
+  "OMIT_LOCALTIME",
+#endif
+#ifdef SQLITE_OMIT_LOOKASIDE
+  "OMIT_LOOKASIDE",
+#endif
+#ifdef SQLITE_OMIT_MEMORYDB
+  "OMIT_MEMORYDB",
+#endif
+#ifdef SQLITE_OMIT_OR_OPTIMIZATION
+  "OMIT_OR_OPTIMIZATION",
+#endif
+#ifdef SQLITE_OMIT_PAGER_PRAGMAS
+  "OMIT_PAGER_PRAGMAS",
+#endif
+#ifdef SQLITE_OMIT_PRAGMA
+  "OMIT_PRAGMA",
+#endif
+#ifdef SQLITE_OMIT_PROGRESS_CALLBACK
+  "OMIT_PROGRESS_CALLBACK",
+#endif
+#ifdef SQLITE_OMIT_QUICKBALANCE
+  "OMIT_QUICKBALANCE",
+#endif
+#ifdef SQLITE_OMIT_REINDEX
+  "OMIT_REINDEX",
+#endif
+#ifdef SQLITE_OMIT_SCHEMA_PRAGMAS
+  "OMIT_SCHEMA_PRAGMAS",
+#endif
+#ifdef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
+  "OMIT_SCHEMA_VERSION_PRAGMAS",
+#endif
+#ifdef SQLITE_OMIT_SHARED_CACHE
+  "OMIT_SHARED_CACHE",
+#endif
+#ifdef SQLITE_OMIT_SUBQUERY
+  "OMIT_SUBQUERY",
+#endif
+#ifdef SQLITE_OMIT_TCL_VARIABLE
+  "OMIT_TCL_VARIABLE",
+#endif
+#ifdef SQLITE_OMIT_TEMPDB
+  "OMIT_TEMPDB",
+#endif
+#ifdef SQLITE_OMIT_TRACE
+  "OMIT_TRACE",
+#endif
+#ifdef SQLITE_OMIT_TRIGGER
+  "OMIT_TRIGGER",
+#endif
+#ifdef SQLITE_OMIT_TRUNCATE_OPTIMIZATION
+  "OMIT_TRUNCATE_OPTIMIZATION",
+#endif
+#ifdef SQLITE_OMIT_UTF16
+  "OMIT_UTF16",
+#endif
+#ifdef SQLITE_OMIT_VACUUM
+  "OMIT_VACUUM",
+#endif
+#ifdef SQLITE_OMIT_VIEW
+  "OMIT_VIEW",
+#endif
+#ifdef SQLITE_OMIT_VIRTUALTABLE
+  "OMIT_VIRTUALTABLE",
+#endif
+#ifdef SQLITE_OMIT_WAL
+  "OMIT_WAL",
+#endif
+#ifdef SQLITE_OMIT_WSD
+  "OMIT_WSD",
+#endif
+#ifdef SQLITE_OMIT_XFER_OPT
+  "OMIT_XFER_OPT",
+#endif
+#ifdef SQLITE_PERFORMANCE_TRACE
+  "PERFORMANCE_TRACE",
+#endif
+#ifdef SQLITE_PROXY_DEBUG
+  "PROXY_DEBUG",
+#endif
+#ifdef SQLITE_SECURE_DELETE
+  "SECURE_DELETE",
+#endif
+#ifdef SQLITE_SMALL_STACK
+  "SMALL_STACK",
+#endif
+#ifdef SQLITE_SOUNDEX
+  "SOUNDEX",
+#endif
+#ifdef SQLITE_TCL
+  "TCL",
+#endif
+#ifdef SQLITE_TEMP_STORE
+  "TEMP_STORE=" CTIMEOPT_VAL(SQLITE_TEMP_STORE),
+#endif
+#ifdef SQLITE_TEST
+  "TEST",
+#endif
+#ifdef SQLITE_THREADSAFE
+  "THREADSAFE=" CTIMEOPT_VAL(SQLITE_THREADSAFE),
+#endif
+#ifdef SQLITE_USE_ALLOCA
+  "USE_ALLOCA",
+#endif
+#ifdef SQLITE_ZERO_MALLOC
+  "ZERO_MALLOC"
+#endif
+};
+
+/*
+** Given the name of a compile-time option, return true if that option
+** was used and false if not.
+**
+** The name can optionally begin with "SQLITE_" but the "SQLITE_" prefix
+** is not required for a match.
+*/
+SQLITE_API int sqlite3_compileoption_used(const char *zOptName){
+  int i, n;
+  if( sqlite3StrNICmp(zOptName, "SQLITE_", 7)==0 ) zOptName += 7;
+  n = sqlite3Strlen30(zOptName);
+
+  /* Since ArraySize(azCompileOpt) is normally in single digits, a
+  ** linear search is adequate.  No need for a binary search. */
+  for(i=0; i<ArraySize(azCompileOpt); i++){
+    if(   (sqlite3StrNICmp(zOptName, azCompileOpt[i], n)==0)
+       && ( (azCompileOpt[i][n]==0) || (azCompileOpt[i][n]=='=') ) ) return 1;
+  }
+  return 0;
+}
+
+/*
+** Return the N-th compile-time option string.  If N is out of range,
+** return a NULL pointer.
+*/
+SQLITE_API const char *sqlite3_compileoption_get(int N){
+  if( N>=0 && N<ArraySize(azCompileOpt) ){
+    return azCompileOpt[N];
+  }
+  return 0;
+}
+
+#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
+
+/************** End of ctime.c ***********************************************/
+/************** Begin file status.c ******************************************/
+/*
+** 2008 June 18
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This module implements the sqlite3_status() interface and related
+** functionality.
+*/
+/************** Include vdbeInt.h in the middle of status.c ******************/
+/************** Begin file vdbeInt.h *****************************************/
+/*
+** 2003 September 6
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This is the header file for information that is private to the
+** VDBE.  This information used to all be at the top of the single
+** source code file "vdbe.c".  When that file became too big (over
+** 6000 lines long) it was split up into several smaller files and
+** this header information was factored out.
+*/
+#ifndef _VDBEINT_H_
+#define _VDBEINT_H_
+
+/*
+** SQL is translated into a sequence of instructions to be
+** executed by a virtual machine.  Each instruction is an instance
+** of the following structure.
+*/
+typedef struct VdbeOp Op;
+
+/*
+** Boolean values
+*/
+typedef unsigned char Bool;
+
+/*
+** A cursor is a pointer into a single BTree within a database file.
+** The cursor can seek to a BTree entry with a particular key, or
+** loop over all entries of the Btree.  You can also insert new BTree
+** entries or retrieve the key or data from the entry that the cursor
+** is currently pointing to.
+** 
+** Every cursor that the virtual machine has open is represented by an
+** instance of the following structure.
+*/
+struct VdbeCursor {
+  BtCursor *pCursor;    /* The cursor structure of the backend */
+  Btree *pBt;           /* Separate file holding temporary table */
+  KeyInfo *pKeyInfo;    /* Info about index keys needed by index cursors */
+  int iDb;              /* Index of cursor database in db->aDb[] (or -1) */
+  int pseudoTableReg;   /* Register holding pseudotable content. */
+  int nField;           /* Number of fields in the header */
+  Bool zeroed;          /* True if zeroed out and ready for reuse */
+  Bool rowidIsValid;    /* True if lastRowid is valid */
+  Bool atFirst;         /* True if pointing to first entry */
+  Bool useRandomRowid;  /* Generate new record numbers semi-randomly */
+  Bool nullRow;         /* True if pointing to a row with no data */
+  Bool deferredMoveto;  /* A call to sqlite3BtreeMoveto() is needed */
+  Bool isTable;         /* True if a table requiring integer keys */
+  Bool isIndex;         /* True if an index containing keys only - no data */
+  Bool isOrdered;       /* True if the underlying table is BTREE_UNORDERED */
+  sqlite3_vtab_cursor *pVtabCursor;  /* The cursor for a virtual table */
+  const sqlite3_module *pModule;     /* Module for cursor pVtabCursor */
+  i64 seqCount;         /* Sequence counter */
+  i64 movetoTarget;     /* Argument to the deferred sqlite3BtreeMoveto() */
+  i64 lastRowid;        /* Last rowid from a Next or NextIdx operation */
+
+  /* Result of last sqlite3BtreeMoveto() done by an OP_NotExists or 
+  ** OP_IsUnique opcode on this cursor. */
+  int seekResult;
+
+  /* Cached information about the header for the data record that the
+  ** cursor is currently pointing to.  Only valid if cacheStatus matches
+  ** Vdbe.cacheCtr.  Vdbe.cacheCtr will never take on the value of
+  ** CACHE_STALE and so setting cacheStatus=CACHE_STALE guarantees that
+  ** the cache is out of date.
+  **
+  ** aRow might point to (ephemeral) data for the current row, or it might
+  ** be NULL.
+  */
+  u32 cacheStatus;      /* Cache is valid if this matches Vdbe.cacheCtr */
+  int payloadSize;      /* Total number of bytes in the record */
+  u32 *aType;           /* Type values for all entries in the record */
+  u32 *aOffset;         /* Cached offsets to the start of each columns data */
+  u8 *aRow;             /* Data for the current row, if all on one page */
+};
+typedef struct VdbeCursor VdbeCursor;
+
+/*
+** When a sub-program is executed (OP_Program), a structure of this type
+** is allocated to store the current value of the program counter, as
+** well as the current memory cell array and various other frame specific
+** values stored in the Vdbe struct. When the sub-program is finished, 
+** these values are copied back to the Vdbe from the VdbeFrame structure,
+** restoring the state of the VM to as it was before the sub-program
+** began executing.
+**
+** The memory for a VdbeFrame object is allocated and managed by a memory
+** cell in the parent (calling) frame. When the memory cell is deleted or
+** overwritten, the VdbeFrame object is not freed immediately. Instead, it
+** is linked into the Vdbe.pDelFrame list. The contents of the Vdbe.pDelFrame
+** list is deleted when the VM is reset in VdbeHalt(). The reason for doing
+** this instead of deleting the VdbeFrame immediately is to avoid recursive
+** calls to sqlite3VdbeMemRelease() when the memory cells belonging to the
+** child frame are released.
+**
+** The currently executing frame is stored in Vdbe.pFrame. Vdbe.pFrame is
+** set to NULL if the currently executing frame is the main program.
+*/
+typedef struct VdbeFrame VdbeFrame;
+struct VdbeFrame {
+  Vdbe *v;                /* VM this frame belongs to */
+  int pc;                 /* Program Counter in parent (calling) frame */
+  Op *aOp;                /* Program instructions for parent frame */
+  int nOp;                /* Size of aOp array */
+  Mem *aMem;              /* Array of memory cells for parent frame */
+  int nMem;               /* Number of entries in aMem */
+  VdbeCursor **apCsr;     /* Array of Vdbe cursors for parent frame */
+  u16 nCursor;            /* Number of entries in apCsr */
+  void *token;            /* Copy of SubProgram.token */
+  int nChildMem;          /* Number of memory cells for child frame */
+  int nChildCsr;          /* Number of cursors for child frame */
+  i64 lastRowid;          /* Last insert rowid (sqlite3.lastRowid) */
+  int nChange;            /* Statement changes (Vdbe.nChanges)     */
+  VdbeFrame *pParent;     /* Parent of this frame, or NULL if parent is main */
+};
+
+#define VdbeFrameMem(p) ((Mem *)&((u8 *)p)[ROUND8(sizeof(VdbeFrame))])
+
+/*
+** A value for VdbeCursor.cacheValid that means the cache is always invalid.
+*/
+#define CACHE_STALE 0
+
+/*
+** Internally, the vdbe manipulates nearly all SQL values as Mem
+** structures. Each Mem struct may cache multiple representations (string,
+** integer etc.) of the same value.
+*/
+struct Mem {
+  sqlite3 *db;        /* The associated database connection */
+  char *z;            /* String or BLOB value */
+  double r;           /* Real value */
+  union {
+    i64 i;              /* Integer value used when MEM_Int is set in flags */
+    int nZero;          /* Used when bit MEM_Zero is set in flags */
+    FuncDef *pDef;      /* Used only when flags==MEM_Agg */
+    RowSet *pRowSet;    /* Used only when flags==MEM_RowSet */
+    VdbeFrame *pFrame;  /* Used when flags==MEM_Frame */
+  } u;
+  int n;              /* Number of characters in string value, excluding '\0' */
+  u16 flags;          /* Some combination of MEM_Null, MEM_Str, MEM_Dyn, etc. */
+  u8  type;           /* One of SQLITE_NULL, SQLITE_TEXT, SQLITE_INTEGER, etc */
+  u8  enc;            /* SQLITE_UTF8, SQLITE_UTF16BE, SQLITE_UTF16LE */
+#ifdef SQLITE_DEBUG
+  Mem *pScopyFrom;    /* This Mem is a shallow copy of pScopyFrom */
+  void *pFiller;      /* So that sizeof(Mem) is a multiple of 8 */
+#endif
+  void (*xDel)(void *);  /* If not null, call this function to delete Mem.z */
+  char *zMalloc;      /* Dynamic buffer allocated by sqlite3_malloc() */
+};
+
+/* One or more of the following flags are set to indicate the validOK
+** representations of the value stored in the Mem struct.
+**
+** If the MEM_Null flag is set, then the value is an SQL NULL value.
+** No other flags may be set in this case.
+**
+** If the MEM_Str flag is set then Mem.z points at a string representation.
+** Usually this is encoded in the same unicode encoding as the main
+** database (see below for exceptions). If the MEM_Term flag is also
+** set, then the string is nul terminated. The MEM_Int and MEM_Real 
+** flags may coexist with the MEM_Str flag.
+*/
+#define MEM_Null      0x0001   /* Value is NULL */
+#define MEM_Str       0x0002   /* Value is a string */
+#define MEM_Int       0x0004   /* Value is an integer */
+#define MEM_Real      0x0008   /* Value is a real number */
+#define MEM_Blob      0x0010   /* Value is a BLOB */
+#define MEM_RowSet    0x0020   /* Value is a RowSet object */
+#define MEM_Frame     0x0040   /* Value is a VdbeFrame object */
+#define MEM_Invalid   0x0080   /* Value is undefined */
+#define MEM_TypeMask  0x00ff   /* Mask of type bits */
+
+/* Whenever Mem contains a valid string or blob representation, one of
+** the following flags must be set to determine the memory management
+** policy for Mem.z.  The MEM_Term flag tells us whether or not the
+** string is \000 or \u0000 terminated
+*/
+#define MEM_Term      0x0200   /* String rep is nul terminated */
+#define MEM_Dyn       0x0400   /* Need to call sqliteFree() on Mem.z */
+#define MEM_Static    0x0800   /* Mem.z points to a static string */
+#define MEM_Ephem     0x1000   /* Mem.z points to an ephemeral string */
+#define MEM_Agg       0x2000   /* Mem.z points to an agg function context */
+#define MEM_Zero      0x4000   /* Mem.i contains count of 0s appended to blob */
+#ifdef SQLITE_OMIT_INCRBLOB
+  #undef MEM_Zero
+  #define MEM_Zero 0x0000
+#endif
+
+/*
+** Clear any existing type flags from a Mem and replace them with f
+*/
+#define MemSetTypeFlag(p, f) \
+   ((p)->flags = ((p)->flags&~(MEM_TypeMask|MEM_Zero))|f)
+
+/*
+** Return true if a memory cell is not marked as invalid.  This macro
+** is for use inside assert() statements only.
+*/
+#ifdef SQLITE_DEBUG
+#define memIsValid(M)  ((M)->flags & MEM_Invalid)==0
+#endif
+
+
+/* A VdbeFunc is just a FuncDef (defined in sqliteInt.h) that contains
+** additional information about auxiliary information bound to arguments
+** of the function.  This is used to implement the sqlite3_get_auxdata()
+** and sqlite3_set_auxdata() APIs.  The "auxdata" is some auxiliary data
+** that can be associated with a constant argument to a function.  This
+** allows functions such as "regexp" to compile their constant regular
+** expression argument once and reused the compiled code for multiple
+** invocations.
+*/
+struct VdbeFunc {
+  FuncDef *pFunc;               /* The definition of the function */
+  int nAux;                     /* Number of entries allocated for apAux[] */
+  struct AuxData {
+    void *pAux;                   /* Aux data for the i-th argument */
+    void (*xDelete)(void *);      /* Destructor for the aux data */
+  } apAux[1];                   /* One slot for each function argument */
+};
+
+/*
+** The "context" argument for a installable function.  A pointer to an
+** instance of this structure is the first argument to the routines used
+** implement the SQL functions.
+**
+** There is a typedef for this structure in sqlite.h.  So all routines,
+** even the public interface to SQLite, can use a pointer to this structure.
+** But this file is the only place where the internal details of this
+** structure are known.
+**
+** This structure is defined inside of vdbeInt.h because it uses substructures
+** (Mem) which are only defined there.
+*/
+struct sqlite3_context {
+  FuncDef *pFunc;       /* Pointer to function information.  MUST BE FIRST */
+  VdbeFunc *pVdbeFunc;  /* Auxilary data, if created. */
+  Mem s;                /* The return value is stored here */
+  Mem *pMem;            /* Memory cell used to store aggregate context */
+  int isError;          /* Error code returned by the function. */
+  CollSeq *pColl;       /* Collating sequence */
+};
+
+/*
+** An instance of the virtual machine.  This structure contains the complete
+** state of the virtual machine.
+**
+** The "sqlite3_stmt" structure pointer that is returned by sqlite3_prepare()
+** is really a pointer to an instance of this structure.
+**
+** The Vdbe.inVtabMethod variable is set to non-zero for the duration of
+** any virtual table method invocations made by the vdbe program. It is
+** set to 2 for xDestroy method calls and 1 for all other methods. This
+** variable is used for two purposes: to allow xDestroy methods to execute
+** "DROP TABLE" statements and to prevent some nasty side effects of
+** malloc failure when SQLite is invoked recursively by a virtual table 
+** method function.
+*/
+struct Vdbe {
+  sqlite3 *db;            /* The database connection that owns this statement */
+  Op *aOp;                /* Space to hold the virtual machine's program */
+  Mem *aMem;              /* The memory locations */
+  Mem **apArg;            /* Arguments to currently executing user function */
+  Mem *aColName;          /* Column names to return */
+  Mem *pResultSet;        /* Pointer to an array of results */
+  int nMem;               /* Number of memory locations currently allocated */
+  int nOp;                /* Number of instructions in the program */
+  int nOpAlloc;           /* Number of slots allocated for aOp[] */
+  int nLabel;             /* Number of labels used */
+  int nLabelAlloc;        /* Number of slots allocated in aLabel[] */
+  int *aLabel;            /* Space to hold the labels */
+  u16 nResColumn;         /* Number of columns in one row of the result set */
+  u16 nCursor;            /* Number of slots in apCsr[] */
+  u32 magic;              /* Magic number for sanity checking */
+  char *zErrMsg;          /* Error message written here */
+  Vdbe *pPrev,*pNext;     /* Linked list of VDBEs with the same Vdbe.db */
+  VdbeCursor **apCsr;     /* One element of this array for each open cursor */
+  Mem *aVar;              /* Values for the OP_Variable opcode. */
+  char **azVar;           /* Name of variables */
+  ynVar nVar;             /* Number of entries in aVar[] */
+  u32 cacheCtr;           /* VdbeCursor row cache generation counter */
+  int pc;                 /* The program counter */
+  int rc;                 /* Value to return */
+  u8 errorAction;         /* Recovery action to do in case of an error */
+  u8 okVar;               /* True if azVar[] has been initialized */
+  u8 explain;             /* True if EXPLAIN present on SQL command */
+  u8 changeCntOn;         /* True to update the change-counter */
+  u8 expired;             /* True if the VM needs to be recompiled */
+  u8 runOnlyOnce;         /* Automatically expire on reset */
+  u8 minWriteFileFormat;  /* Minimum file format for writable database files */
+  u8 inVtabMethod;        /* See comments above */
+  u8 usesStmtJournal;     /* True if uses a statement journal */
+  u8 readOnly;            /* True for read-only statements */
+  u8 isPrepareV2;         /* True if prepared with prepare_v2() */
+  int nChange;            /* Number of db changes made since last reset */
+  yDbMask btreeMask;      /* Bitmask of db->aDb[] entries referenced */
+  yDbMask lockMask;       /* Subset of btreeMask that requires a lock */
+  int iStatement;         /* Statement number (or 0 if has not opened stmt) */
+  int aCounter[3];        /* Counters used by sqlite3_stmt_status() */
+#ifndef SQLITE_OMIT_TRACE
+  i64 startTime;          /* Time when query started - used for profiling */
+#endif
+  i64 nFkConstraint;      /* Number of imm. FK constraints this VM */
+  i64 nStmtDefCons;       /* Number of def. constraints when stmt started */
+  char *zSql;             /* Text of the SQL statement that generated this */
+  void *pFree;            /* Free this when deleting the vdbe */
+#ifdef SQLITE_DEBUG
+  FILE *trace;            /* Write an execution trace here, if not NULL */
+#endif
+  VdbeFrame *pFrame;      /* Parent frame */
+  VdbeFrame *pDelFrame;   /* List of frame objects to free on VM reset */
+  int nFrame;             /* Number of frames in pFrame list */
+  u32 expmask;            /* Binding to these vars invalidates VM */
+  SubProgram *pProgram;   /* Linked list of all sub-programs used by VM */
+};
+
+/*
+** The following are allowed values for Vdbe.magic
+*/
+#define VDBE_MAGIC_INIT     0x26bceaa5    /* Building a VDBE program */
+#define VDBE_MAGIC_RUN      0xbdf20da3    /* VDBE is ready to execute */
+#define VDBE_MAGIC_HALT     0x519c2973    /* VDBE has completed execution */
+#define VDBE_MAGIC_DEAD     0xb606c3c8    /* The VDBE has been deallocated */
+
+/*
+** Function prototypes
+*/
+SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *, VdbeCursor*);
+void sqliteVdbePopStack(Vdbe*,int);
+SQLITE_PRIVATE int sqlite3VdbeCursorMoveto(VdbeCursor*);
+#if defined(SQLITE_DEBUG) || defined(VDBE_PROFILE)
+SQLITE_PRIVATE void sqlite3VdbePrintOp(FILE*, int, Op*);
+#endif
+SQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32);
+SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem*, int);
+SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(unsigned char*, int, Mem*, int);
+SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(const unsigned char*, u32, Mem*);
+SQLITE_PRIVATE void sqlite3VdbeDeleteAuxData(VdbeFunc*, int);
+
+int sqlite2BtreeKeyCompare(BtCursor *, const void *, int, int, int *);
+SQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare(VdbeCursor*,UnpackedRecord*,int*);
+SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3*, BtCursor *, i64 *);
+SQLITE_PRIVATE int sqlite3MemCompare(const Mem*, const Mem*, const CollSeq*);
+SQLITE_PRIVATE int sqlite3VdbeExec(Vdbe*);
+SQLITE_PRIVATE int sqlite3VdbeList(Vdbe*);
+SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe*);
+SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *, int);
+SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem*);
+SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem*, const Mem*);
+SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem*, const Mem*, int);
+SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem*, Mem*);
+SQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem*);
+SQLITE_PRIVATE int sqlite3VdbeMemSetStr(Mem*, const char*, int, u8, void(*)(void*));
+SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem*, i64);
+#ifdef SQLITE_OMIT_FLOATING_POINT
+# define sqlite3VdbeMemSetDouble sqlite3VdbeMemSetInt64
+#else
+SQLITE_PRIVATE   void sqlite3VdbeMemSetDouble(Mem*, double);
+#endif
+SQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem*);
+SQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem*,int);
+SQLITE_PRIVATE void sqlite3VdbeMemSetRowSet(Mem*);
+SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem*);
+SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem*, int);
+SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem*);
+SQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem*);
+SQLITE_PRIVATE double sqlite3VdbeRealValue(Mem*);
+SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem*);
+SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem*);
+SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem*);
+SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(BtCursor*,int,int,int,Mem*);
+SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p);
+SQLITE_PRIVATE void sqlite3VdbeMemReleaseExternal(Mem *p);
+SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem*, FuncDef*);
+SQLITE_PRIVATE const char *sqlite3OpcodeName(int);
+SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve);
+SQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *, int);
+SQLITE_PRIVATE void sqlite3VdbeFrameDelete(VdbeFrame*);
+SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *);
+SQLITE_PRIVATE void sqlite3VdbeMemStoreType(Mem *pMem);
+
+#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE>0
+SQLITE_PRIVATE   void sqlite3VdbeEnter(Vdbe*);
+SQLITE_PRIVATE   void sqlite3VdbeLeave(Vdbe*);
+#else
+# define sqlite3VdbeEnter(X)
+# define sqlite3VdbeLeave(X)
+#endif
+
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE void sqlite3VdbeMemPrepareToChange(Vdbe*,Mem*);
+#endif
+
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+SQLITE_PRIVATE int sqlite3VdbeCheckFk(Vdbe *, int);
+#else
+# define sqlite3VdbeCheckFk(p,i) 0
+#endif
+
+SQLITE_PRIVATE int sqlite3VdbeMemTranslate(Mem*, u8);
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE   void sqlite3VdbePrintSql(Vdbe*);
+SQLITE_PRIVATE   void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf);
+#endif
+SQLITE_PRIVATE int sqlite3VdbeMemHandleBom(Mem *pMem);
+
+#ifndef SQLITE_OMIT_INCRBLOB
+SQLITE_PRIVATE   int sqlite3VdbeMemExpandBlob(Mem *);
+#else
+  #define sqlite3VdbeMemExpandBlob(x) SQLITE_OK
+#endif
+
+#endif /* !defined(_VDBEINT_H_) */
+
+/************** End of vdbeInt.h *********************************************/
+/************** Continuing where we left off in status.c *********************/
+
+/*
+** Variables in which to record status information.
+*/
+typedef struct sqlite3StatType sqlite3StatType;
+static SQLITE_WSD struct sqlite3StatType {
+  int nowValue[10];         /* Current value */
+  int mxValue[10];          /* Maximum value */
+} sqlite3Stat = { {0,}, {0,} };
+
+
+/* The "wsdStat" macro will resolve to the status information
+** state vector.  If writable static data is unsupported on the target,
+** we have to locate the state vector at run-time.  In the more common
+** case where writable static data is supported, wsdStat can refer directly
+** to the "sqlite3Stat" state vector declared above.
+*/
+#ifdef SQLITE_OMIT_WSD
+# define wsdStatInit  sqlite3StatType *x = &GLOBAL(sqlite3StatType,sqlite3Stat)
+# define wsdStat x[0]
+#else
+# define wsdStatInit
+# define wsdStat sqlite3Stat
+#endif
+
+/*
+** Return the current value of a status parameter.
+*/
+SQLITE_PRIVATE int sqlite3StatusValue(int op){
+  wsdStatInit;
+  assert( op>=0 && op<ArraySize(wsdStat.nowValue) );
+  return wsdStat.nowValue[op];
+}
+
+/*
+** Add N to the value of a status record.  It is assumed that the
+** caller holds appropriate locks.
+*/
+SQLITE_PRIVATE void sqlite3StatusAdd(int op, int N){
+  wsdStatInit;
+  assert( op>=0 && op<ArraySize(wsdStat.nowValue) );
+  wsdStat.nowValue[op] += N;
+  if( wsdStat.nowValue[op]>wsdStat.mxValue[op] ){
+    wsdStat.mxValue[op] = wsdStat.nowValue[op];
+  }
+}
+
+/*
+** Set the value of a status to X.
+*/
+SQLITE_PRIVATE void sqlite3StatusSet(int op, int X){
+  wsdStatInit;
+  assert( op>=0 && op<ArraySize(wsdStat.nowValue) );
+  wsdStat.nowValue[op] = X;
+  if( wsdStat.nowValue[op]>wsdStat.mxValue[op] ){
+    wsdStat.mxValue[op] = wsdStat.nowValue[op];
+  }
+}
+
+/*
+** Query status information.
+**
+** This implementation assumes that reading or writing an aligned
+** 32-bit integer is an atomic operation.  If that assumption is not true,
+** then this routine is not threadsafe.
+*/
+SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag){
+  wsdStatInit;
+  if( op<0 || op>=ArraySize(wsdStat.nowValue) ){
+    return SQLITE_MISUSE_BKPT;
+  }
+  *pCurrent = wsdStat.nowValue[op];
+  *pHighwater = wsdStat.mxValue[op];
+  if( resetFlag ){
+    wsdStat.mxValue[op] = wsdStat.nowValue[op];
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Query status information for a single database connection
+*/
+SQLITE_API int sqlite3_db_status(
+  sqlite3 *db,          /* The database connection whose status is desired */
+  int op,               /* Status verb */
+  int *pCurrent,        /* Write current value here */
+  int *pHighwater,      /* Write high-water mark here */
+  int resetFlag         /* Reset high-water mark if true */
+){
+  int rc = SQLITE_OK;   /* Return code */
+  sqlite3_mutex_enter(db->mutex);
+  switch( op ){
+    case SQLITE_DBSTATUS_LOOKASIDE_USED: {
+      *pCurrent = db->lookaside.nOut;
+      *pHighwater = db->lookaside.mxOut;
+      if( resetFlag ){
+        db->lookaside.mxOut = db->lookaside.nOut;
+      }
+      break;
+    }
+
+    case SQLITE_DBSTATUS_LOOKASIDE_HIT:
+    case SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE:
+    case SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL: {
+      testcase( op==SQLITE_DBSTATUS_LOOKASIDE_HIT );
+      testcase( op==SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE );
+      testcase( op==SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL );
+      assert( (op-SQLITE_DBSTATUS_LOOKASIDE_HIT)>=0 );
+      assert( (op-SQLITE_DBSTATUS_LOOKASIDE_HIT)<3 );
+      *pCurrent = 0;
+      *pHighwater = db->lookaside.anStat[op - SQLITE_DBSTATUS_LOOKASIDE_HIT];
+      if( resetFlag ){
+        db->lookaside.anStat[op - SQLITE_DBSTATUS_LOOKASIDE_HIT] = 0;
+      }
+      break;
+    }
+
+    /* 
+    ** Return an approximation for the amount of memory currently used
+    ** by all pagers associated with the given database connection.  The
+    ** highwater mark is meaningless and is returned as zero.
+    */
+    case SQLITE_DBSTATUS_CACHE_USED: {
+      int totalUsed = 0;
+      int i;
+      sqlite3BtreeEnterAll(db);
+      for(i=0; i<db->nDb; i++){
+        Btree *pBt = db->aDb[i].pBt;
+        if( pBt ){
+          Pager *pPager = sqlite3BtreePager(pBt);
+          totalUsed += sqlite3PagerMemUsed(pPager);
+        }
+      }
+      sqlite3BtreeLeaveAll(db);
+      *pCurrent = totalUsed;
+      *pHighwater = 0;
+      break;
+    }
+
+    /*
+    ** *pCurrent gets an accurate estimate of the amount of memory used
+    ** to store the schema for all databases (main, temp, and any ATTACHed
+    ** databases.  *pHighwater is set to zero.
+    */
+    case SQLITE_DBSTATUS_SCHEMA_USED: {
+      int i;                      /* Used to iterate through schemas */
+      int nByte = 0;              /* Used to accumulate return value */
+
+      sqlite3BtreeEnterAll(db);
+      db->pnBytesFreed = &nByte;
+      for(i=0; i<db->nDb; i++){
+        Schema *pSchema = db->aDb[i].pSchema;
+        if( ALWAYS(pSchema!=0) ){
+          HashElem *p;
+
+          nByte += sqlite3GlobalConfig.m.xRoundup(sizeof(HashElem)) * (
+              pSchema->tblHash.count 
+            + pSchema->trigHash.count
+            + pSchema->idxHash.count
+            + pSchema->fkeyHash.count
+          );
+          nByte += sqlite3MallocSize(pSchema->tblHash.ht);
+          nByte += sqlite3MallocSize(pSchema->trigHash.ht);
+          nByte += sqlite3MallocSize(pSchema->idxHash.ht);
+          nByte += sqlite3MallocSize(pSchema->fkeyHash.ht);
+
+          for(p=sqliteHashFirst(&pSchema->trigHash); p; p=sqliteHashNext(p)){
+            sqlite3DeleteTrigger(db, (Trigger*)sqliteHashData(p));
+          }
+          for(p=sqliteHashFirst(&pSchema->tblHash); p; p=sqliteHashNext(p)){
+            sqlite3DeleteTable(db, (Table *)sqliteHashData(p));
+          }
+        }
+      }
+      db->pnBytesFreed = 0;
+      sqlite3BtreeLeaveAll(db);
+
+      *pHighwater = 0;
+      *pCurrent = nByte;
+      break;
+    }
+
+    /*
+    ** *pCurrent gets an accurate estimate of the amount of memory used
+    ** to store all prepared statements.
+    ** *pHighwater is set to zero.
+    */
+    case SQLITE_DBSTATUS_STMT_USED: {
+      struct Vdbe *pVdbe;         /* Used to iterate through VMs */
+      int nByte = 0;              /* Used to accumulate return value */
+
+      db->pnBytesFreed = &nByte;
+      for(pVdbe=db->pVdbe; pVdbe; pVdbe=pVdbe->pNext){
+        sqlite3VdbeDeleteObject(db, pVdbe);
+      }
+      db->pnBytesFreed = 0;
+
+      *pHighwater = 0;
+      *pCurrent = nByte;
+
+      break;
+    }
+
+    default: {
+      rc = SQLITE_ERROR;
+    }
+  }
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+/************** End of status.c **********************************************/
+/************** Begin file date.c ********************************************/
+/*
+** 2003 October 31
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the C functions that implement date and time
+** functions for SQLite.  
+**
+** There is only one exported symbol in this file - the function
+** sqlite3RegisterDateTimeFunctions() found at the bottom of the file.
+** All other code has file scope.
+**
+** SQLite processes all times and dates as Julian Day numbers.  The
+** dates and times are stored as the number of days since noon
+** in Greenwich on November 24, 4714 B.C. according to the Gregorian
+** calendar system. 
+**
+** 1970-01-01 00:00:00 is JD 2440587.5
+** 2000-01-01 00:00:00 is JD 2451544.5
+**
+** This implemention requires years to be expressed as a 4-digit number
+** which means that only dates between 0000-01-01 and 9999-12-31 can
+** be represented, even though julian day numbers allow a much wider
+** range of dates.
+**
+** The Gregorian calendar system is used for all dates and times,
+** even those that predate the Gregorian calendar.  Historians usually
+** use the Julian calendar for dates prior to 1582-10-15 and for some
+** dates afterwards, depending on locale.  Beware of this difference.
+**
+** The conversion algorithms are implemented based on descriptions
+** in the following text:
+**
+**      Jean Meeus
+**      Astronomical Algorithms, 2nd Edition, 1998
+**      ISBM 0-943396-61-1
+**      Willmann-Bell, Inc
+**      Richmond, Virginia (USA)
+*/
+#include <time.h>
+
+#ifndef SQLITE_OMIT_DATETIME_FUNCS
+
+/*
+** On recent Windows platforms, the localtime_s() function is available
+** as part of the "Secure CRT". It is essentially equivalent to 
+** localtime_r() available under most POSIX platforms, except that the 
+** order of the parameters is reversed.
+**
+** See http://msdn.microsoft.com/en-us/library/a442x3ye(VS.80).aspx.
+**
+** If the user has not indicated to use localtime_r() or localtime_s()
+** already, check for an MSVC build environment that provides 
+** localtime_s().
+*/
+#if !defined(HAVE_LOCALTIME_R) && !defined(HAVE_LOCALTIME_S) && \
+     defined(_MSC_VER) && defined(_CRT_INSECURE_DEPRECATE)
+#define HAVE_LOCALTIME_S 1
+#endif
+
+/*
+** A structure for holding a single date and time.
+*/
+typedef struct DateTime DateTime;
+struct DateTime {
+  sqlite3_int64 iJD; /* The julian day number times 86400000 */
+  int Y, M, D;       /* Year, month, and day */
+  int h, m;          /* Hour and minutes */
+  int tz;            /* Timezone offset in minutes */
+  double s;          /* Seconds */
+  char validYMD;     /* True (1) if Y,M,D are valid */
+  char validHMS;     /* True (1) if h,m,s are valid */
+  char validJD;      /* True (1) if iJD is valid */
+  char validTZ;      /* True (1) if tz is valid */
+};
+
+
+/*
+** Convert zDate into one or more integers.  Additional arguments
+** come in groups of 5 as follows:
+**
+**       N       number of digits in the integer
+**       min     minimum allowed value of the integer
+**       max     maximum allowed value of the integer
+**       nextC   first character after the integer
+**       pVal    where to write the integers value.
+**
+** Conversions continue until one with nextC==0 is encountered.
+** The function returns the number of successful conversions.
+*/
+static int getDigits(const char *zDate, ...){
+  va_list ap;
+  int val;
+  int N;
+  int min;
+  int max;
+  int nextC;
+  int *pVal;
+  int cnt = 0;
+  va_start(ap, zDate);
+  do{
+    N = va_arg(ap, int);
+    min = va_arg(ap, int);
+    max = va_arg(ap, int);
+    nextC = va_arg(ap, int);
+    pVal = va_arg(ap, int*);
+    val = 0;
+    while( N-- ){
+      if( !sqlite3Isdigit(*zDate) ){
+        goto end_getDigits;
+      }
+      val = val*10 + *zDate - '0';
+      zDate++;
+    }
+    if( val<min || val>max || (nextC!=0 && nextC!=*zDate) ){
+      goto end_getDigits;
+    }
+    *pVal = val;
+    zDate++;
+    cnt++;
+  }while( nextC );
+end_getDigits:
+  va_end(ap);
+  return cnt;
+}
+
+/*
+** Parse a timezone extension on the end of a date-time.
+** The extension is of the form:
+**
+**        (+/-)HH:MM
+**
+** Or the "zulu" notation:
+**
+**        Z
+**
+** If the parse is successful, write the number of minutes
+** of change in p->tz and return 0.  If a parser error occurs,
+** return non-zero.
+**
+** A missing specifier is not considered an error.
+*/
+static int parseTimezone(const char *zDate, DateTime *p){
+  int sgn = 0;
+  int nHr, nMn;
+  int c;
+  while( sqlite3Isspace(*zDate) ){ zDate++; }
+  p->tz = 0;
+  c = *zDate;
+  if( c=='-' ){
+    sgn = -1;
+  }else if( c=='+' ){
+    sgn = +1;
+  }else if( c=='Z' || c=='z' ){
+    zDate++;
+    goto zulu_time;
+  }else{
+    return c!=0;
+  }
+  zDate++;
+  if( getDigits(zDate, 2, 0, 14, ':', &nHr, 2, 0, 59, 0, &nMn)!=2 ){
+    return 1;
+  }
+  zDate += 5;
+  p->tz = sgn*(nMn + nHr*60);
+zulu_time:
+  while( sqlite3Isspace(*zDate) ){ zDate++; }
+  return *zDate!=0;
+}
+
+/*
+** Parse times of the form HH:MM or HH:MM:SS or HH:MM:SS.FFFF.
+** The HH, MM, and SS must each be exactly 2 digits.  The
+** fractional seconds FFFF can be one or more digits.
+**
+** Return 1 if there is a parsing error and 0 on success.
+*/
+static int parseHhMmSs(const char *zDate, DateTime *p){
+  int h, m, s;
+  double ms = 0.0;
+  if( getDigits(zDate, 2, 0, 24, ':', &h, 2, 0, 59, 0, &m)!=2 ){
+    return 1;
+  }
+  zDate += 5;
+  if( *zDate==':' ){
+    zDate++;
+    if( getDigits(zDate, 2, 0, 59, 0, &s)!=1 ){
+      return 1;
+    }
+    zDate += 2;
+    if( *zDate=='.' && sqlite3Isdigit(zDate[1]) ){
+      double rScale = 1.0;
+      zDate++;
+      while( sqlite3Isdigit(*zDate) ){
+        ms = ms*10.0 + *zDate - '0';
+        rScale *= 10.0;
+        zDate++;
+      }
+      ms /= rScale;
+    }
+  }else{
+    s = 0;
+  }
+  p->validJD = 0;
+  p->validHMS = 1;
+  p->h = h;
+  p->m = m;
+  p->s = s + ms;
+  if( parseTimezone(zDate, p) ) return 1;
+  p->validTZ = (p->tz!=0)?1:0;
+  return 0;
+}
+
+/*
+** Convert from YYYY-MM-DD HH:MM:SS to julian day.  We always assume
+** that the YYYY-MM-DD is according to the Gregorian calendar.
+**
+** Reference:  Meeus page 61
+*/
+static void computeJD(DateTime *p){
+  int Y, M, D, A, B, X1, X2;
+
+  if( p->validJD ) return;
+  if( p->validYMD ){
+    Y = p->Y;
+    M = p->M;
+    D = p->D;
+  }else{
+    Y = 2000;  /* If no YMD specified, assume 2000-Jan-01 */
+    M = 1;
+    D = 1;
+  }
+  if( M<=2 ){
+    Y--;
+    M += 12;
+  }
+  A = Y/100;
+  B = 2 - A + (A/4);
+  X1 = 36525*(Y+4716)/100;
+  X2 = 306001*(M+1)/10000;
+  p->iJD = (sqlite3_int64)((X1 + X2 + D + B - 1524.5 ) * 86400000);
+  p->validJD = 1;
+  if( p->validHMS ){
+    p->iJD += p->h*3600000 + p->m*60000 + (sqlite3_int64)(p->s*1000);
+    if( p->validTZ ){
+      p->iJD -= p->tz*60000;
+      p->validYMD = 0;
+      p->validHMS = 0;
+      p->validTZ = 0;
+    }
+  }
+}
+
+/*
+** Parse dates of the form
+**
+**     YYYY-MM-DD HH:MM:SS.FFF
+**     YYYY-MM-DD HH:MM:SS
+**     YYYY-MM-DD HH:MM
+**     YYYY-MM-DD
+**
+** Write the result into the DateTime structure and return 0
+** on success and 1 if the input string is not a well-formed
+** date.
+*/
+static int parseYyyyMmDd(const char *zDate, DateTime *p){
+  int Y, M, D, neg;
+
+  if( zDate[0]=='-' ){
+    zDate++;
+    neg = 1;
+  }else{
+    neg = 0;
+  }
+  if( getDigits(zDate,4,0,9999,'-',&Y,2,1,12,'-',&M,2,1,31,0,&D)!=3 ){
+    return 1;
+  }
+  zDate += 10;
+  while( sqlite3Isspace(*zDate) || 'T'==*(u8*)zDate ){ zDate++; }
+  if( parseHhMmSs(zDate, p)==0 ){
+    /* We got the time */
+  }else if( *zDate==0 ){
+    p->validHMS = 0;
+  }else{
+    return 1;
+  }
+  p->validJD = 0;
+  p->validYMD = 1;
+  p->Y = neg ? -Y : Y;
+  p->M = M;
+  p->D = D;
+  if( p->validTZ ){
+    computeJD(p);
+  }
+  return 0;
+}
+
+/*
+** Set the time to the current time reported by the VFS
+*/
+static void setDateTimeToCurrent(sqlite3_context *context, DateTime *p){
+  sqlite3 *db = sqlite3_context_db_handle(context);
+  sqlite3OsCurrentTimeInt64(db->pVfs, &p->iJD);
+  p->validJD = 1;
+}
+
+/*
+** Attempt to parse the given string into a Julian Day Number.  Return
+** the number of errors.
+**
+** The following are acceptable forms for the input string:
+**
+**      YYYY-MM-DD HH:MM:SS.FFF  +/-HH:MM
+**      DDDD.DD 
+**      now
+**
+** In the first form, the +/-HH:MM is always optional.  The fractional
+** seconds extension (the ".FFF") is optional.  The seconds portion
+** (":SS.FFF") is option.  The year and date can be omitted as long
+** as there is a time string.  The time string can be omitted as long
+** as there is a year and date.
+*/
+static int parseDateOrTime(
+  sqlite3_context *context, 
+  const char *zDate, 
+  DateTime *p
+){
+  double r;
+  if( parseYyyyMmDd(zDate,p)==0 ){
+    return 0;
+  }else if( parseHhMmSs(zDate, p)==0 ){
+    return 0;
+  }else if( sqlite3StrICmp(zDate,"now")==0){
+    setDateTimeToCurrent(context, p);
+    return 0;
+  }else if( sqlite3AtoF(zDate, &r, sqlite3Strlen30(zDate), SQLITE_UTF8) ){
+    p->iJD = (sqlite3_int64)(r*86400000.0 + 0.5);
+    p->validJD = 1;
+    return 0;
+  }
+  return 1;
+}
+
+/*
+** Compute the Year, Month, and Day from the julian day number.
+*/
+static void computeYMD(DateTime *p){
+  int Z, A, B, C, D, E, X1;
+  if( p->validYMD ) return;
+  if( !p->validJD ){
+    p->Y = 2000;
+    p->M = 1;
+    p->D = 1;
+  }else{
+    Z = (int)((p->iJD + 43200000)/86400000);
+    A = (int)((Z - 1867216.25)/36524.25);
+    A = Z + 1 + A - (A/4);
+    B = A + 1524;
+    C = (int)((B - 122.1)/365.25);
+    D = (36525*C)/100;
+    E = (int)((B-D)/30.6001);
+    X1 = (int)(30.6001*E);
+    p->D = B - D - X1;
+    p->M = E<14 ? E-1 : E-13;
+    p->Y = p->M>2 ? C - 4716 : C - 4715;
+  }
+  p->validYMD = 1;
+}
+
+/*
+** Compute the Hour, Minute, and Seconds from the julian day number.
+*/
+static void computeHMS(DateTime *p){
+  int s;
+  if( p->validHMS ) return;
+  computeJD(p);
+  s = (int)((p->iJD + 43200000) % 86400000);
+  p->s = s/1000.0;
+  s = (int)p->s;
+  p->s -= s;
+  p->h = s/3600;
+  s -= p->h*3600;
+  p->m = s/60;
+  p->s += s - p->m*60;
+  p->validHMS = 1;
+}
+
+/*
+** Compute both YMD and HMS
+*/
+static void computeYMD_HMS(DateTime *p){
+  computeYMD(p);
+  computeHMS(p);
+}
+
+/*
+** Clear the YMD and HMS and the TZ
+*/
+static void clearYMD_HMS_TZ(DateTime *p){
+  p->validYMD = 0;
+  p->validHMS = 0;
+  p->validTZ = 0;
+}
+
+#ifndef SQLITE_OMIT_LOCALTIME
+/*
+** Compute the difference (in milliseconds)
+** between localtime and UTC (a.k.a. GMT)
+** for the time value p where p is in UTC.
+*/
+static sqlite3_int64 localtimeOffset(DateTime *p){
+  DateTime x, y;
+  time_t t;
+  x = *p;
+  computeYMD_HMS(&x);
+  if( x.Y<1971 || x.Y>=2038 ){
+    x.Y = 2000;
+    x.M = 1;
+    x.D = 1;
+    x.h = 0;
+    x.m = 0;
+    x.s = 0.0;
+  } else {
+    int s = (int)(x.s + 0.5);
+    x.s = s;
+  }
+  x.tz = 0;
+  x.validJD = 0;
+  computeJD(&x);
+  t = (time_t)(x.iJD/1000 - 21086676*(i64)10000);
+#ifdef HAVE_LOCALTIME_R
+  {
+    struct tm sLocal;
+    localtime_r(&t, &sLocal);
+    y.Y = sLocal.tm_year + 1900;
+    y.M = sLocal.tm_mon + 1;
+    y.D = sLocal.tm_mday;
+    y.h = sLocal.tm_hour;
+    y.m = sLocal.tm_min;
+    y.s = sLocal.tm_sec;
+  }
+#elif defined(HAVE_LOCALTIME_S) && HAVE_LOCALTIME_S
+  {
+    struct tm sLocal;
+    localtime_s(&sLocal, &t);
+    y.Y = sLocal.tm_year + 1900;
+    y.M = sLocal.tm_mon + 1;
+    y.D = sLocal.tm_mday;
+    y.h = sLocal.tm_hour;
+    y.m = sLocal.tm_min;
+    y.s = sLocal.tm_sec;
+  }
+#else
+  {
+    struct tm *pTm;
+    sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+    pTm = localtime(&t);
+    y.Y = pTm->tm_year + 1900;
+    y.M = pTm->tm_mon + 1;
+    y.D = pTm->tm_mday;
+    y.h = pTm->tm_hour;
+    y.m = pTm->tm_min;
+    y.s = pTm->tm_sec;
+    sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+  }
+#endif
+  y.validYMD = 1;
+  y.validHMS = 1;
+  y.validJD = 0;
+  y.validTZ = 0;
+  computeJD(&y);
+  return y.iJD - x.iJD;
+}
+#endif /* SQLITE_OMIT_LOCALTIME */
+
+/*
+** Process a modifier to a date-time stamp.  The modifiers are
+** as follows:
+**
+**     NNN days
+**     NNN hours
+**     NNN minutes
+**     NNN.NNNN seconds
+**     NNN months
+**     NNN years
+**     start of month
+**     start of year
+**     start of week
+**     start of day
+**     weekday N
+**     unixepoch
+**     localtime
+**     utc
+**
+** Return 0 on success and 1 if there is any kind of error.
+*/
+static int parseModifier(const char *zMod, DateTime *p){
+  int rc = 1;
+  int n;
+  double r;
+  char *z, zBuf[30];
+  z = zBuf;
+  for(n=0; n<ArraySize(zBuf)-1 && zMod[n]; n++){
+    z[n] = (char)sqlite3UpperToLower[(u8)zMod[n]];
+  }
+  z[n] = 0;
+  switch( z[0] ){
+#ifndef SQLITE_OMIT_LOCALTIME
+    case 'l': {
+      /*    localtime
+      **
+      ** Assuming the current time value is UTC (a.k.a. GMT), shift it to
+      ** show local time.
+      */
+      if( strcmp(z, "localtime")==0 ){
+        computeJD(p);
+        p->iJD += localtimeOffset(p);
+        clearYMD_HMS_TZ(p);
+        rc = 0;
+      }
+      break;
+    }
+#endif
+    case 'u': {
+      /*
+      **    unixepoch
+      **
+      ** Treat the current value of p->iJD as the number of
+      ** seconds since 1970.  Convert to a real julian day number.
+      */
+      if( strcmp(z, "unixepoch")==0 && p->validJD ){
+        p->iJD = (p->iJD + 43200)/86400 + 21086676*(i64)10000000;
+        clearYMD_HMS_TZ(p);
+        rc = 0;
+      }
+#ifndef SQLITE_OMIT_LOCALTIME
+      else if( strcmp(z, "utc")==0 ){
+        sqlite3_int64 c1;
+        computeJD(p);
+        c1 = localtimeOffset(p);
+        p->iJD -= c1;
+        clearYMD_HMS_TZ(p);
+        p->iJD += c1 - localtimeOffset(p);
+        rc = 0;
+      }
+#endif
+      break;
+    }
+    case 'w': {
+      /*
+      **    weekday N
+      **
+      ** Move the date to the same time on the next occurrence of
+      ** weekday N where 0==Sunday, 1==Monday, and so forth.  If the
+      ** date is already on the appropriate weekday, this is a no-op.
+      */
+      if( strncmp(z, "weekday ", 8)==0
+               && sqlite3AtoF(&z[8], &r, sqlite3Strlen30(&z[8]), SQLITE_UTF8)
+               && (n=(int)r)==r && n>=0 && r<7 ){
+        sqlite3_int64 Z;
+        computeYMD_HMS(p);
+        p->validTZ = 0;
+        p->validJD = 0;
+        computeJD(p);
+        Z = ((p->iJD + 129600000)/86400000) % 7;
+        if( Z>n ) Z -= 7;
+        p->iJD += (n - Z)*86400000;
+        clearYMD_HMS_TZ(p);
+        rc = 0;
+      }
+      break;
+    }
+    case 's': {
+      /*
+      **    start of TTTTT
+      **
+      ** Move the date backwards to the beginning of the current day,
+      ** or month or year.
+      */
+      if( strncmp(z, "start of ", 9)!=0 ) break;
+      z += 9;
+      computeYMD(p);
+      p->validHMS = 1;
+      p->h = p->m = 0;
+      p->s = 0.0;
+      p->validTZ = 0;
+      p->validJD = 0;
+      if( strcmp(z,"month")==0 ){
+        p->D = 1;
+        rc = 0;
+      }else if( strcmp(z,"year")==0 ){
+        computeYMD(p);
+        p->M = 1;
+        p->D = 1;
+        rc = 0;
+      }else if( strcmp(z,"day")==0 ){
+        rc = 0;
+      }
+      break;
+    }
+    case '+':
+    case '-':
+    case '0':
+    case '1':
+    case '2':
+    case '3':
+    case '4':
+    case '5':
+    case '6':
+    case '7':
+    case '8':
+    case '9': {
+      double rRounder;
+      for(n=1; z[n] && z[n]!=':' && !sqlite3Isspace(z[n]); n++){}
+      if( !sqlite3AtoF(z, &r, n, SQLITE_UTF8) ){
+        rc = 1;
+        break;
+      }
+      if( z[n]==':' ){
+        /* A modifier of the form (+|-)HH:MM:SS.FFF adds (or subtracts) the
+        ** specified number of hours, minutes, seconds, and fractional seconds
+        ** to the time.  The ".FFF" may be omitted.  The ":SS.FFF" may be
+        ** omitted.
+        */
+        const char *z2 = z;
+        DateTime tx;
+        sqlite3_int64 day;
+        if( !sqlite3Isdigit(*z2) ) z2++;
+        memset(&tx, 0, sizeof(tx));
+        if( parseHhMmSs(z2, &tx) ) break;
+        computeJD(&tx);
+        tx.iJD -= 43200000;
+        day = tx.iJD/86400000;
+        tx.iJD -= day*86400000;
+        if( z[0]=='-' ) tx.iJD = -tx.iJD;
+        computeJD(p);
+        clearYMD_HMS_TZ(p);
+        p->iJD += tx.iJD;
+        rc = 0;
+        break;
+      }
+      z += n;
+      while( sqlite3Isspace(*z) ) z++;
+      n = sqlite3Strlen30(z);
+      if( n>10 || n<3 ) break;
+      if( z[n-1]=='s' ){ z[n-1] = 0; n--; }
+      computeJD(p);
+      rc = 0;
+      rRounder = r<0 ? -0.5 : +0.5;
+      if( n==3 && strcmp(z,"day")==0 ){
+        p->iJD += (sqlite3_int64)(r*86400000.0 + rRounder);
+      }else if( n==4 && strcmp(z,"hour")==0 ){
+        p->iJD += (sqlite3_int64)(r*(86400000.0/24.0) + rRounder);
+      }else if( n==6 && strcmp(z,"minute")==0 ){
+        p->iJD += (sqlite3_int64)(r*(86400000.0/(24.0*60.0)) + rRounder);
+      }else if( n==6 && strcmp(z,"second")==0 ){
+        p->iJD += (sqlite3_int64)(r*(86400000.0/(24.0*60.0*60.0)) + rRounder);
+      }else if( n==5 && strcmp(z,"month")==0 ){
+        int x, y;
+        computeYMD_HMS(p);
+        p->M += (int)r;
+        x = p->M>0 ? (p->M-1)/12 : (p->M-12)/12;
+        p->Y += x;
+        p->M -= x*12;
+        p->validJD = 0;
+        computeJD(p);
+        y = (int)r;
+        if( y!=r ){
+          p->iJD += (sqlite3_int64)((r - y)*30.0*86400000.0 + rRounder);
+        }
+      }else if( n==4 && strcmp(z,"year")==0 ){
+        int y = (int)r;
+        computeYMD_HMS(p);
+        p->Y += y;
+        p->validJD = 0;
+        computeJD(p);
+        if( y!=r ){
+          p->iJD += (sqlite3_int64)((r - y)*365.0*86400000.0 + rRounder);
+        }
+      }else{
+        rc = 1;
+      }
+      clearYMD_HMS_TZ(p);
+      break;
+    }
+    default: {
+      break;
+    }
+  }
+  return rc;
+}
+
+/*
+** Process time function arguments.  argv[0] is a date-time stamp.
+** argv[1] and following are modifiers.  Parse them all and write
+** the resulting time into the DateTime structure p.  Return 0
+** on success and 1 if there are any errors.
+**
+** If there are zero parameters (if even argv[0] is undefined)
+** then assume a default value of "now" for argv[0].
+*/
+static int isDate(
+  sqlite3_context *context, 
+  int argc, 
+  sqlite3_value **argv, 
+  DateTime *p
+){
+  int i;
+  const unsigned char *z;
+  int eType;
+  memset(p, 0, sizeof(*p));
+  if( argc==0 ){
+    setDateTimeToCurrent(context, p);
+  }else if( (eType = sqlite3_value_type(argv[0]))==SQLITE_FLOAT
+                   || eType==SQLITE_INTEGER ){
+    p->iJD = (sqlite3_int64)(sqlite3_value_double(argv[0])*86400000.0 + 0.5);
+    p->validJD = 1;
+  }else{
+    z = sqlite3_value_text(argv[0]);
+    if( !z || parseDateOrTime(context, (char*)z, p) ){
+      return 1;
+    }
+  }
+  for(i=1; i<argc; i++){
+    if( (z = sqlite3_value_text(argv[i]))==0 || parseModifier((char*)z, p) ){
+      return 1;
+    }
+  }
+  return 0;
+}
+
+
+/*
+** The following routines implement the various date and time functions
+** of SQLite.
+*/
+
+/*
+**    julianday( TIMESTRING, MOD, MOD, ...)
+**
+** Return the julian day number of the date specified in the arguments
+*/
+static void juliandayFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  DateTime x;
+  if( isDate(context, argc, argv, &x)==0 ){
+    computeJD(&x);
+    sqlite3_result_double(context, x.iJD/86400000.0);
+  }
+}
+
+/*
+**    datetime( TIMESTRING, MOD, MOD, ...)
+**
+** Return YYYY-MM-DD HH:MM:SS
+*/
+static void datetimeFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  DateTime x;
+  if( isDate(context, argc, argv, &x)==0 ){
+    char zBuf[100];
+    computeYMD_HMS(&x);
+    sqlite3_snprintf(sizeof(zBuf), zBuf, "%04d-%02d-%02d %02d:%02d:%02d",
+                     x.Y, x.M, x.D, x.h, x.m, (int)(x.s));
+    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
+  }
+}
+
+/*
+**    time( TIMESTRING, MOD, MOD, ...)
+**
+** Return HH:MM:SS
+*/
+static void timeFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  DateTime x;
+  if( isDate(context, argc, argv, &x)==0 ){
+    char zBuf[100];
+    computeHMS(&x);
+    sqlite3_snprintf(sizeof(zBuf), zBuf, "%02d:%02d:%02d", x.h, x.m, (int)x.s);
+    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
+  }
+}
+
+/*
+**    date( TIMESTRING, MOD, MOD, ...)
+**
+** Return YYYY-MM-DD
+*/
+static void dateFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  DateTime x;
+  if( isDate(context, argc, argv, &x)==0 ){
+    char zBuf[100];
+    computeYMD(&x);
+    sqlite3_snprintf(sizeof(zBuf), zBuf, "%04d-%02d-%02d", x.Y, x.M, x.D);
+    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
+  }
+}
+
+/*
+**    strftime( FORMAT, TIMESTRING, MOD, MOD, ...)
+**
+** Return a string described by FORMAT.  Conversions as follows:
+**
+**   %d  day of month
+**   %f  ** fractional seconds  SS.SSS
+**   %H  hour 00-24
+**   %j  day of year 000-366
+**   %J  ** Julian day number
+**   %m  month 01-12
+**   %M  minute 00-59
+**   %s  seconds since 1970-01-01
+**   %S  seconds 00-59
+**   %w  day of week 0-6  sunday==0
+**   %W  week of year 00-53
+**   %Y  year 0000-9999
+**   %%  %
+*/
+static void strftimeFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  DateTime x;
+  u64 n;
+  size_t i,j;
+  char *z;
+  sqlite3 *db;
+  const char *zFmt = (const char*)sqlite3_value_text(argv[0]);
+  char zBuf[100];
+  if( zFmt==0 || isDate(context, argc-1, argv+1, &x) ) return;
+  db = sqlite3_context_db_handle(context);
+  for(i=0, n=1; zFmt[i]; i++, n++){
+    if( zFmt[i]=='%' ){
+      switch( zFmt[i+1] ){
+        case 'd':
+        case 'H':
+        case 'm':
+        case 'M':
+        case 'S':
+        case 'W':
+          n++;
+          /* fall thru */
+        case 'w':
+        case '%':
+          break;
+        case 'f':
+          n += 8;
+          break;
+        case 'j':
+          n += 3;
+          break;
+        case 'Y':
+          n += 8;
+          break;
+        case 's':
+        case 'J':
+          n += 50;
+          break;
+        default:
+          return;  /* ERROR.  return a NULL */
+      }
+      i++;
+    }
+  }
+  testcase( n==sizeof(zBuf)-1 );
+  testcase( n==sizeof(zBuf) );
+  testcase( n==(u64)db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
+  testcase( n==(u64)db->aLimit[SQLITE_LIMIT_LENGTH] );
+  if( n<sizeof(zBuf) ){
+    z = zBuf;
+  }else if( n>(u64)db->aLimit[SQLITE_LIMIT_LENGTH] ){
+    sqlite3_result_error_toobig(context);
+    return;
+  }else{
+    z = sqlite3DbMallocRaw(db, (int)n);
+    if( z==0 ){
+      sqlite3_result_error_nomem(context);
+      return;
+    }
+  }
+  computeJD(&x);
+  computeYMD_HMS(&x);
+  for(i=j=0; zFmt[i]; i++){
+    if( zFmt[i]!='%' ){
+      z[j++] = zFmt[i];
+    }else{
+      i++;
+      switch( zFmt[i] ){
+        case 'd':  sqlite3_snprintf(3, &z[j],"%02d",x.D); j+=2; break;
+        case 'f': {
+          double s = x.s;
+          if( s>59.999 ) s = 59.999;
+          sqlite3_snprintf(7, &z[j],"%06.3f", s);
+          j += sqlite3Strlen30(&z[j]);
+          break;
+        }
+        case 'H':  sqlite3_snprintf(3, &z[j],"%02d",x.h); j+=2; break;
+        case 'W': /* Fall thru */
+        case 'j': {
+          int nDay;             /* Number of days since 1st day of year */
+          DateTime y = x;
+          y.validJD = 0;
+          y.M = 1;
+          y.D = 1;
+          computeJD(&y);
+          nDay = (int)((x.iJD-y.iJD+43200000)/86400000);
+          if( zFmt[i]=='W' ){
+            int wd;   /* 0=Monday, 1=Tuesday, ... 6=Sunday */
+            wd = (int)(((x.iJD+43200000)/86400000)%7);
+            sqlite3_snprintf(3, &z[j],"%02d",(nDay+7-wd)/7);
+            j += 2;
+          }else{
+            sqlite3_snprintf(4, &z[j],"%03d",nDay+1);
+            j += 3;
+          }
+          break;
+        }
+        case 'J': {
+          sqlite3_snprintf(20, &z[j],"%.16g",x.iJD/86400000.0);
+          j+=sqlite3Strlen30(&z[j]);
+          break;
+        }
+        case 'm':  sqlite3_snprintf(3, &z[j],"%02d",x.M); j+=2; break;
+        case 'M':  sqlite3_snprintf(3, &z[j],"%02d",x.m); j+=2; break;
+        case 's': {
+          sqlite3_snprintf(30,&z[j],"%lld",
+                           (i64)(x.iJD/1000 - 21086676*(i64)10000));
+          j += sqlite3Strlen30(&z[j]);
+          break;
+        }
+        case 'S':  sqlite3_snprintf(3,&z[j],"%02d",(int)x.s); j+=2; break;
+        case 'w': {
+          z[j++] = (char)(((x.iJD+129600000)/86400000) % 7) + '0';
+          break;
+        }
+        case 'Y': {
+          sqlite3_snprintf(5,&z[j],"%04d",x.Y); j+=sqlite3Strlen30(&z[j]);
+          break;
+        }
+        default:   z[j++] = '%'; break;
+      }
+    }
+  }
+  z[j] = 0;
+  sqlite3_result_text(context, z, -1,
+                      z==zBuf ? SQLITE_TRANSIENT : SQLITE_DYNAMIC);
+}
+
+/*
+** current_time()
+**
+** This function returns the same value as time('now').
+*/
+static void ctimeFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **NotUsed2
+){
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  timeFunc(context, 0, 0);
+}
+
+/*
+** current_date()
+**
+** This function returns the same value as date('now').
+*/
+static void cdateFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **NotUsed2
+){
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  dateFunc(context, 0, 0);
+}
+
+/*
+** current_timestamp()
+**
+** This function returns the same value as datetime('now').
+*/
+static void ctimestampFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **NotUsed2
+){
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  datetimeFunc(context, 0, 0);
+}
+#endif /* !defined(SQLITE_OMIT_DATETIME_FUNCS) */
+
+#ifdef SQLITE_OMIT_DATETIME_FUNCS
+/*
+** If the library is compiled to omit the full-scale date and time
+** handling (to get a smaller binary), the following minimal version
+** of the functions current_time(), current_date() and current_timestamp()
+** are included instead. This is to support column declarations that
+** include "DEFAULT CURRENT_TIME" etc.
+**
+** This function uses the C-library functions time(), gmtime()
+** and strftime(). The format string to pass to strftime() is supplied
+** as the user-data for the function.
+*/
+static void currentTimeFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  time_t t;
+  char *zFormat = (char *)sqlite3_user_data(context);
+  sqlite3 *db;
+  sqlite3_int64 iT;
+  char zBuf[20];
+
+  UNUSED_PARAMETER(argc);
+  UNUSED_PARAMETER(argv);
+
+  db = sqlite3_context_db_handle(context);
+  sqlite3OsCurrentTimeInt64(db->pVfs, &iT);
+  t = iT/1000 - 10000*(sqlite3_int64)21086676;
+#ifdef HAVE_GMTIME_R
+  {
+    struct tm sNow;
+    gmtime_r(&t, &sNow);
+    strftime(zBuf, 20, zFormat, &sNow);
+  }
+#else
+  {
+    struct tm *pTm;
+    sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+    pTm = gmtime(&t);
+    strftime(zBuf, 20, zFormat, pTm);
+    sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+  }
+#endif
+
+  sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
+}
+#endif
+
+/*
+** This function registered all of the above C functions as SQL
+** functions.  This should be the only routine in this file with
+** external linkage.
+*/
+SQLITE_PRIVATE void sqlite3RegisterDateTimeFunctions(void){
+  static SQLITE_WSD FuncDef aDateTimeFuncs[] = {
+#ifndef SQLITE_OMIT_DATETIME_FUNCS
+    FUNCTION(julianday,        -1, 0, 0, juliandayFunc ),
+    FUNCTION(date,             -1, 0, 0, dateFunc      ),
+    FUNCTION(time,             -1, 0, 0, timeFunc      ),
+    FUNCTION(datetime,         -1, 0, 0, datetimeFunc  ),
+    FUNCTION(strftime,         -1, 0, 0, strftimeFunc  ),
+    FUNCTION(current_time,      0, 0, 0, ctimeFunc     ),
+    FUNCTION(current_timestamp, 0, 0, 0, ctimestampFunc),
+    FUNCTION(current_date,      0, 0, 0, cdateFunc     ),
+#else
+    STR_FUNCTION(current_time,      0, "%H:%M:%S",          0, currentTimeFunc),
+    STR_FUNCTION(current_date,      0, "%Y-%m-%d",          0, currentTimeFunc),
+    STR_FUNCTION(current_timestamp, 0, "%Y-%m-%d %H:%M:%S", 0, currentTimeFunc),
+#endif
+  };
+  int i;
+  FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
+  FuncDef *aFunc = (FuncDef*)&GLOBAL(FuncDef, aDateTimeFuncs);
+
+  for(i=0; i<ArraySize(aDateTimeFuncs); i++){
+    sqlite3FuncDefInsert(pHash, &aFunc[i]);
+  }
+}
+
+/************** End of date.c ************************************************/
+/************** Begin file os.c **********************************************/
+/*
+** 2005 November 29
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains OS interface code that is common to all
+** architectures.
+*/
+#define _SQLITE_OS_C_ 1
+#undef _SQLITE_OS_C_
+
+/*
+** The default SQLite sqlite3_vfs implementations do not allocate
+** memory (actually, os_unix.c allocates a small amount of memory
+** from within OsOpen()), but some third-party implementations may.
+** So we test the effects of a malloc() failing and the sqlite3OsXXX()
+** function returning SQLITE_IOERR_NOMEM using the DO_OS_MALLOC_TEST macro.
+**
+** The following functions are instrumented for malloc() failure 
+** testing:
+**
+**     sqlite3OsOpen()
+**     sqlite3OsRead()
+**     sqlite3OsWrite()
+**     sqlite3OsSync()
+**     sqlite3OsLock()
+**
+*/
+#if defined(SQLITE_TEST)
+SQLITE_API int sqlite3_memdebug_vfs_oom_test = 1;
+  #define DO_OS_MALLOC_TEST(x)                                       \
+  if (sqlite3_memdebug_vfs_oom_test && (!x || !sqlite3IsMemJournal(x))) {  \
+    void *pTstAlloc = sqlite3Malloc(10);                             \
+    if (!pTstAlloc) return SQLITE_IOERR_NOMEM;                       \
+    sqlite3_free(pTstAlloc);                                         \
+  }
+#else
+  #define DO_OS_MALLOC_TEST(x)
+#endif
+
+/*
+** The following routines are convenience wrappers around methods
+** of the sqlite3_file object.  This is mostly just syntactic sugar. All
+** of this would be completely automatic if SQLite were coded using
+** C++ instead of plain old C.
+*/
+SQLITE_PRIVATE int sqlite3OsClose(sqlite3_file *pId){
+  int rc = SQLITE_OK;
+  if( pId->pMethods ){
+    rc = pId->pMethods->xClose(pId);
+    pId->pMethods = 0;
+  }
+  return rc;
+}
+SQLITE_PRIVATE int sqlite3OsRead(sqlite3_file *id, void *pBuf, int amt, i64 offset){
+  DO_OS_MALLOC_TEST(id);
+  return id->pMethods->xRead(id, pBuf, amt, offset);
+}
+SQLITE_PRIVATE int sqlite3OsWrite(sqlite3_file *id, const void *pBuf, int amt, i64 offset){
+  DO_OS_MALLOC_TEST(id);
+  return id->pMethods->xWrite(id, pBuf, amt, offset);
+}
+SQLITE_PRIVATE int sqlite3OsTruncate(sqlite3_file *id, i64 size){
+  return id->pMethods->xTruncate(id, size);
+}
+SQLITE_PRIVATE int sqlite3OsSync(sqlite3_file *id, int flags){
+  DO_OS_MALLOC_TEST(id);
+  return id->pMethods->xSync(id, flags);
+}
+SQLITE_PRIVATE int sqlite3OsFileSize(sqlite3_file *id, i64 *pSize){
+  DO_OS_MALLOC_TEST(id);
+  return id->pMethods->xFileSize(id, pSize);
+}
+SQLITE_PRIVATE int sqlite3OsLock(sqlite3_file *id, int lockType){
+  DO_OS_MALLOC_TEST(id);
+  return id->pMethods->xLock(id, lockType);
+}
+SQLITE_PRIVATE int sqlite3OsUnlock(sqlite3_file *id, int lockType){
+  return id->pMethods->xUnlock(id, lockType);
+}
+SQLITE_PRIVATE int sqlite3OsCheckReservedLock(sqlite3_file *id, int *pResOut){
+  DO_OS_MALLOC_TEST(id);
+  return id->pMethods->xCheckReservedLock(id, pResOut);
+}
+SQLITE_PRIVATE int sqlite3OsFileControl(sqlite3_file *id, int op, void *pArg){
+  return id->pMethods->xFileControl(id, op, pArg);
+}
+SQLITE_PRIVATE int sqlite3OsSectorSize(sqlite3_file *id){
+  int (*xSectorSize)(sqlite3_file*) = id->pMethods->xSectorSize;
+  return (xSectorSize ? xSectorSize(id) : SQLITE_DEFAULT_SECTOR_SIZE);
+}
+SQLITE_PRIVATE int sqlite3OsDeviceCharacteristics(sqlite3_file *id){
+  return id->pMethods->xDeviceCharacteristics(id);
+}
+SQLITE_PRIVATE int sqlite3OsShmLock(sqlite3_file *id, int offset, int n, int flags){
+  return id->pMethods->xShmLock(id, offset, n, flags);
+}
+SQLITE_PRIVATE void sqlite3OsShmBarrier(sqlite3_file *id){
+  id->pMethods->xShmBarrier(id);
+}
+SQLITE_PRIVATE int sqlite3OsShmUnmap(sqlite3_file *id, int deleteFlag){
+  return id->pMethods->xShmUnmap(id, deleteFlag);
+}
+SQLITE_PRIVATE int sqlite3OsShmMap(
+  sqlite3_file *id,               /* Database file handle */
+  int iPage,
+  int pgsz,
+  int bExtend,                    /* True to extend file if necessary */
+  void volatile **pp              /* OUT: Pointer to mapping */
+){
+  return id->pMethods->xShmMap(id, iPage, pgsz, bExtend, pp);
+}
+
+/*
+** The next group of routines are convenience wrappers around the
+** VFS methods.
+*/
+SQLITE_PRIVATE int sqlite3OsOpen(
+  sqlite3_vfs *pVfs, 
+  const char *zPath, 
+  sqlite3_file *pFile, 
+  int flags, 
+  int *pFlagsOut
+){
+  int rc;
+  DO_OS_MALLOC_TEST(0);
+  /* 0x87f3f is a mask of SQLITE_OPEN_ flags that are valid to be passed
+  ** down into the VFS layer.  Some SQLITE_OPEN_ flags (for example,
+  ** SQLITE_OPEN_FULLMUTEX or SQLITE_OPEN_SHAREDCACHE) are blocked before
+  ** reaching the VFS. */
+  rc = pVfs->xOpen(pVfs, zPath, pFile, flags & 0x87f3f, pFlagsOut);
+  assert( rc==SQLITE_OK || pFile->pMethods==0 );
+  return rc;
+}
+SQLITE_PRIVATE int sqlite3OsDelete(sqlite3_vfs *pVfs, const char *zPath, int dirSync){
+  return pVfs->xDelete(pVfs, zPath, dirSync);
+}
+SQLITE_PRIVATE int sqlite3OsAccess(
+  sqlite3_vfs *pVfs, 
+  const char *zPath, 
+  int flags, 
+  int *pResOut
+){
+  DO_OS_MALLOC_TEST(0);
+  return pVfs->xAccess(pVfs, zPath, flags, pResOut);
+}
+SQLITE_PRIVATE int sqlite3OsFullPathname(
+  sqlite3_vfs *pVfs, 
+  const char *zPath, 
+  int nPathOut, 
+  char *zPathOut
+){
+  zPathOut[0] = 0;
+  return pVfs->xFullPathname(pVfs, zPath, nPathOut, zPathOut);
+}
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
+SQLITE_PRIVATE void *sqlite3OsDlOpen(sqlite3_vfs *pVfs, const char *zPath){
+  return pVfs->xDlOpen(pVfs, zPath);
+}
+SQLITE_PRIVATE void sqlite3OsDlError(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
+  pVfs->xDlError(pVfs, nByte, zBufOut);
+}
+SQLITE_PRIVATE void (*sqlite3OsDlSym(sqlite3_vfs *pVfs, void *pHdle, const char *zSym))(void){
+  return pVfs->xDlSym(pVfs, pHdle, zSym);
+}
+SQLITE_PRIVATE void sqlite3OsDlClose(sqlite3_vfs *pVfs, void *pHandle){
+  pVfs->xDlClose(pVfs, pHandle);
+}
+#endif /* SQLITE_OMIT_LOAD_EXTENSION */
+SQLITE_PRIVATE int sqlite3OsRandomness(sqlite3_vfs *pVfs, int nByte, char *zBufOut){
+  return pVfs->xRandomness(pVfs, nByte, zBufOut);
+}
+SQLITE_PRIVATE int sqlite3OsSleep(sqlite3_vfs *pVfs, int nMicro){
+  return pVfs->xSleep(pVfs, nMicro);
+}
+SQLITE_PRIVATE int sqlite3OsCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *pTimeOut){
+  int rc;
+  /* IMPLEMENTATION-OF: R-49045-42493 SQLite will use the xCurrentTimeInt64()
+  ** method to get the current date and time if that method is available
+  ** (if iVersion is 2 or greater and the function pointer is not NULL) and
+  ** will fall back to xCurrentTime() if xCurrentTimeInt64() is
+  ** unavailable.
+  */
+  if( pVfs->iVersion>=2 && pVfs->xCurrentTimeInt64 ){
+    rc = pVfs->xCurrentTimeInt64(pVfs, pTimeOut);
+  }else{
+    double r;
+    rc = pVfs->xCurrentTime(pVfs, &r);
+    *pTimeOut = (sqlite3_int64)(r*86400000.0);
+  }
+  return rc;
+}
+
+SQLITE_PRIVATE int sqlite3OsOpenMalloc(
+  sqlite3_vfs *pVfs, 
+  const char *zFile, 
+  sqlite3_file **ppFile, 
+  int flags,
+  int *pOutFlags
+){
+  int rc = SQLITE_NOMEM;
+  sqlite3_file *pFile;
+  pFile = (sqlite3_file *)sqlite3Malloc(pVfs->szOsFile);
+  if( pFile ){
+    rc = sqlite3OsOpen(pVfs, zFile, pFile, flags, pOutFlags);
+    if( rc!=SQLITE_OK ){
+      sqlite3_free(pFile);
+    }else{
+      *ppFile = pFile;
+    }
+  }
+  return rc;
+}
+SQLITE_PRIVATE int sqlite3OsCloseFree(sqlite3_file *pFile){
+  int rc = SQLITE_OK;
+  assert( pFile );
+  rc = sqlite3OsClose(pFile);
+  sqlite3_free(pFile);
+  return rc;
+}
+
+/*
+** This function is a wrapper around the OS specific implementation of
+** sqlite3_os_init(). The purpose of the wrapper is to provide the
+** ability to simulate a malloc failure, so that the handling of an
+** error in sqlite3_os_init() by the upper layers can be tested.
+*/
+SQLITE_PRIVATE int sqlite3OsInit(void){
+  void *p = sqlite3_malloc(10);
+  if( p==0 ) return SQLITE_NOMEM;
+  sqlite3_free(p);
+  return sqlite3_os_init();
+}
+
+/*
+** The list of all registered VFS implementations.
+*/
+static sqlite3_vfs * SQLITE_WSD vfsList = 0;
+#define vfsList GLOBAL(sqlite3_vfs *, vfsList)
+
+/*
+** Locate a VFS by name.  If no name is given, simply return the
+** first VFS on the list.
+*/
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfs){
+  sqlite3_vfs *pVfs = 0;
+#if SQLITE_THREADSAFE
+  sqlite3_mutex *mutex;
+#endif
+#ifndef SQLITE_OMIT_AUTOINIT
+  int rc = sqlite3_initialize();
+  if( rc ) return 0;
+#endif
+#if SQLITE_THREADSAFE
+  mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
+#endif
+  sqlite3_mutex_enter(mutex);
+  for(pVfs = vfsList; pVfs; pVfs=pVfs->pNext){
+    if( zVfs==0 ) break;
+    if( strcmp(zVfs, pVfs->zName)==0 ) break;
+  }
+  sqlite3_mutex_leave(mutex);
+  return pVfs;
+}
+
+/*
+** Unlink a VFS from the linked list
+*/
+static void vfsUnlink(sqlite3_vfs *pVfs){
+  assert( sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER)) );
+  if( pVfs==0 ){
+    /* No-op */
+  }else if( vfsList==pVfs ){
+    vfsList = pVfs->pNext;
+  }else if( vfsList ){
+    sqlite3_vfs *p = vfsList;
+    while( p->pNext && p->pNext!=pVfs ){
+      p = p->pNext;
+    }
+    if( p->pNext==pVfs ){
+      p->pNext = pVfs->pNext;
+    }
+  }
+}
+
+/*
+** Register a VFS with the system.  It is harmless to register the same
+** VFS multiple times.  The new VFS becomes the default if makeDflt is
+** true.
+*/
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs *pVfs, int makeDflt){
+  sqlite3_mutex *mutex = 0;
+#ifndef SQLITE_OMIT_AUTOINIT
+  int rc = sqlite3_initialize();
+  if( rc ) return rc;
+#endif
+  mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
+  sqlite3_mutex_enter(mutex);
+  vfsUnlink(pVfs);
+  if( makeDflt || vfsList==0 ){
+    pVfs->pNext = vfsList;
+    vfsList = pVfs;
+  }else{
+    pVfs->pNext = vfsList->pNext;
+    vfsList->pNext = pVfs;
+  }
+  assert(vfsList);
+  sqlite3_mutex_leave(mutex);
+  return SQLITE_OK;
+}
+
+/*
+** Unregister a VFS so that it is no longer accessible.
+*/
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs *pVfs){
+#if SQLITE_THREADSAFE
+  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
+#endif
+  sqlite3_mutex_enter(mutex);
+  vfsUnlink(pVfs);
+  sqlite3_mutex_leave(mutex);
+  return SQLITE_OK;
+}
+
+/************** End of os.c **************************************************/
+/************** Begin file fault.c *******************************************/
+/*
+** 2008 Jan 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains code to support the concept of "benign" 
+** malloc failures (when the xMalloc() or xRealloc() method of the
+** sqlite3_mem_methods structure fails to allocate a block of memory
+** and returns 0). 
+**
+** Most malloc failures are non-benign. After they occur, SQLite
+** abandons the current operation and returns an error code (usually
+** SQLITE_NOMEM) to the user. However, sometimes a fault is not necessarily
+** fatal. For example, if a malloc fails while resizing a hash table, this 
+** is completely recoverable simply by not carrying out the resize. The 
+** hash table will continue to function normally.  So a malloc failure 
+** during a hash table resize is a benign fault.
+*/
+
+
+#ifndef SQLITE_OMIT_BUILTIN_TEST
+
+/*
+** Global variables.
+*/
+typedef struct BenignMallocHooks BenignMallocHooks;
+static SQLITE_WSD struct BenignMallocHooks {
+  void (*xBenignBegin)(void);
+  void (*xBenignEnd)(void);
+} sqlite3Hooks = { 0, 0 };
+
+/* The "wsdHooks" macro will resolve to the appropriate BenignMallocHooks
+** structure.  If writable static data is unsupported on the target,
+** we have to locate the state vector at run-time.  In the more common
+** case where writable static data is supported, wsdHooks can refer directly
+** to the "sqlite3Hooks" state vector declared above.
+*/
+#ifdef SQLITE_OMIT_WSD
+# define wsdHooksInit \
+  BenignMallocHooks *x = &GLOBAL(BenignMallocHooks,sqlite3Hooks)
+# define wsdHooks x[0]
+#else
+# define wsdHooksInit
+# define wsdHooks sqlite3Hooks
+#endif
+
+
+/*
+** Register hooks to call when sqlite3BeginBenignMalloc() and
+** sqlite3EndBenignMalloc() are called, respectively.
+*/
+SQLITE_PRIVATE void sqlite3BenignMallocHooks(
+  void (*xBenignBegin)(void),
+  void (*xBenignEnd)(void)
+){
+  wsdHooksInit;
+  wsdHooks.xBenignBegin = xBenignBegin;
+  wsdHooks.xBenignEnd = xBenignEnd;
+}
+
+/*
+** This (sqlite3EndBenignMalloc()) is called by SQLite code to indicate that
+** subsequent malloc failures are benign. A call to sqlite3EndBenignMalloc()
+** indicates that subsequent malloc failures are non-benign.
+*/
+SQLITE_PRIVATE void sqlite3BeginBenignMalloc(void){
+  wsdHooksInit;
+  if( wsdHooks.xBenignBegin ){
+    wsdHooks.xBenignBegin();
+  }
+}
+SQLITE_PRIVATE void sqlite3EndBenignMalloc(void){
+  wsdHooksInit;
+  if( wsdHooks.xBenignEnd ){
+    wsdHooks.xBenignEnd();
+  }
+}
+
+#endif   /* #ifndef SQLITE_OMIT_BUILTIN_TEST */
+
+/************** End of fault.c ***********************************************/
+/************** Begin file mem0.c ********************************************/
+/*
+** 2008 October 28
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains a no-op memory allocation drivers for use when
+** SQLITE_ZERO_MALLOC is defined.  The allocation drivers implemented
+** here always fail.  SQLite will not operate with these drivers.  These
+** are merely placeholders.  Real drivers must be substituted using
+** sqlite3_config() before SQLite will operate.
+*/
+
+/*
+** This version of the memory allocator is the default.  It is
+** used when no other memory allocator is specified using compile-time
+** macros.
+*/
+#ifdef SQLITE_ZERO_MALLOC
+
+/*
+** No-op versions of all memory allocation routines
+*/
+static void *sqlite3MemMalloc(int nByte){ return 0; }
+static void sqlite3MemFree(void *pPrior){ return; }
+static void *sqlite3MemRealloc(void *pPrior, int nByte){ return 0; }
+static int sqlite3MemSize(void *pPrior){ return 0; }
+static int sqlite3MemRoundup(int n){ return n; }
+static int sqlite3MemInit(void *NotUsed){ return SQLITE_OK; }
+static void sqlite3MemShutdown(void *NotUsed){ return; }
+
+/*
+** This routine is the only routine in this file with external linkage.
+**
+** Populate the low-level memory allocation function pointers in
+** sqlite3GlobalConfig.m with pointers to the routines in this file.
+*/
+SQLITE_PRIVATE void sqlite3MemSetDefault(void){
+  static const sqlite3_mem_methods defaultMethods = {
+     sqlite3MemMalloc,
+     sqlite3MemFree,
+     sqlite3MemRealloc,
+     sqlite3MemSize,
+     sqlite3MemRoundup,
+     sqlite3MemInit,
+     sqlite3MemShutdown,
+     0
+  };
+  sqlite3_config(SQLITE_CONFIG_MALLOC, &defaultMethods);
+}
+
+#endif /* SQLITE_ZERO_MALLOC */
+
+/************** End of mem0.c ************************************************/
+/************** Begin file mem1.c ********************************************/
+/*
+** 2007 August 14
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains low-level memory allocation drivers for when
+** SQLite will use the standard C-library malloc/realloc/free interface
+** to obtain the memory it needs.
+**
+** This file contains implementations of the low-level memory allocation
+** routines specified in the sqlite3_mem_methods object.
+*/
+
+/*
+** This version of the memory allocator is the default.  It is
+** used when no other memory allocator is specified using compile-time
+** macros.
+*/
+#ifdef SQLITE_SYSTEM_MALLOC
+
+/*
+** Like malloc(), but remember the size of the allocation
+** so that we can find it later using sqlite3MemSize().
+**
+** For this low-level routine, we are guaranteed that nByte>0 because
+** cases of nByte<=0 will be intercepted and dealt with by higher level
+** routines.
+*/
+static void *sqlite3MemMalloc(int nByte){
+  sqlite3_int64 *p;
+  assert( nByte>0 );
+  nByte = ROUND8(nByte);
+  p = malloc( nByte+8 );
+  if( p ){
+    p[0] = nByte;
+    p++;
+  }else{
+    testcase( sqlite3GlobalConfig.xLog!=0 );
+    sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes of memory", nByte);
+  }
+  return (void *)p;
+}
+
+/*
+** Like free() but works for allocations obtained from sqlite3MemMalloc()
+** or sqlite3MemRealloc().
+**
+** For this low-level routine, we already know that pPrior!=0 since
+** cases where pPrior==0 will have been intecepted and dealt with
+** by higher-level routines.
+*/
+static void sqlite3MemFree(void *pPrior){
+  sqlite3_int64 *p = (sqlite3_int64*)pPrior;
+  assert( pPrior!=0 );
+  p--;
+  free(p);
+}
+
+/*
+** Report the allocated size of a prior return from xMalloc()
+** or xRealloc().
+*/
+static int sqlite3MemSize(void *pPrior){
+  sqlite3_int64 *p;
+  if( pPrior==0 ) return 0;
+  p = (sqlite3_int64*)pPrior;
+  p--;
+  return (int)p[0];
+}
+
+/*
+** Like realloc().  Resize an allocation previously obtained from
+** sqlite3MemMalloc().
+**
+** For this low-level interface, we know that pPrior!=0.  Cases where
+** pPrior==0 while have been intercepted by higher-level routine and
+** redirected to xMalloc.  Similarly, we know that nByte>0 becauses
+** cases where nByte<=0 will have been intercepted by higher-level
+** routines and redirected to xFree.
+*/
+static void *sqlite3MemRealloc(void *pPrior, int nByte){
+  sqlite3_int64 *p = (sqlite3_int64*)pPrior;
+  assert( pPrior!=0 && nByte>0 );
+  assert( nByte==ROUND8(nByte) ); /* EV: R-46199-30249 */
+  p--;
+  p = realloc(p, nByte+8 );
+  if( p ){
+    p[0] = nByte;
+    p++;
+  }else{
+    testcase( sqlite3GlobalConfig.xLog!=0 );
+    sqlite3_log(SQLITE_NOMEM,
+      "failed memory resize %u to %u bytes",
+      sqlite3MemSize(pPrior), nByte);
+  }
+  return (void*)p;
+}
+
+/*
+** Round up a request size to the next valid allocation size.
+*/
+static int sqlite3MemRoundup(int n){
+  return ROUND8(n);
+}
+
+/*
+** Initialize this module.
+*/
+static int sqlite3MemInit(void *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  return SQLITE_OK;
+}
+
+/*
+** Deinitialize this module.
+*/
+static void sqlite3MemShutdown(void *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  return;
+}
+
+/*
+** This routine is the only routine in this file with external linkage.
+**
+** Populate the low-level memory allocation function pointers in
+** sqlite3GlobalConfig.m with pointers to the routines in this file.
+*/
+SQLITE_PRIVATE void sqlite3MemSetDefault(void){
+  static const sqlite3_mem_methods defaultMethods = {
+     sqlite3MemMalloc,
+     sqlite3MemFree,
+     sqlite3MemRealloc,
+     sqlite3MemSize,
+     sqlite3MemRoundup,
+     sqlite3MemInit,
+     sqlite3MemShutdown,
+     0
+  };
+  sqlite3_config(SQLITE_CONFIG_MALLOC, &defaultMethods);
+}
+
+#endif /* SQLITE_SYSTEM_MALLOC */
+
+/************** End of mem1.c ************************************************/
+/************** Begin file mem2.c ********************************************/
+/*
+** 2007 August 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains low-level memory allocation drivers for when
+** SQLite will use the standard C-library malloc/realloc/free interface
+** to obtain the memory it needs while adding lots of additional debugging
+** information to each allocation in order to help detect and fix memory
+** leaks and memory usage errors.
+**
+** This file contains implementations of the low-level memory allocation
+** routines specified in the sqlite3_mem_methods object.
+*/
+
+/*
+** This version of the memory allocator is used only if the
+** SQLITE_MEMDEBUG macro is defined
+*/
+#ifdef SQLITE_MEMDEBUG
+
+/*
+** The backtrace functionality is only available with GLIBC
+*/
+#ifdef __GLIBC__
+  extern int backtrace(void**,int);
+  extern void backtrace_symbols_fd(void*const*,int,int);
+#else
+# define backtrace(A,B) 1
+# define backtrace_symbols_fd(A,B,C)
+#endif
+
+/*
+** Each memory allocation looks like this:
+**
+**  ------------------------------------------------------------------------
+**  | Title |  backtrace pointers |  MemBlockHdr |  allocation |  EndGuard |
+**  ------------------------------------------------------------------------
+**
+** The application code sees only a pointer to the allocation.  We have
+** to back up from the allocation pointer to find the MemBlockHdr.  The
+** MemBlockHdr tells us the size of the allocation and the number of
+** backtrace pointers.  There is also a guard word at the end of the
+** MemBlockHdr.
+*/
+struct MemBlockHdr {
+  i64 iSize;                          /* Size of this allocation */
+  struct MemBlockHdr *pNext, *pPrev;  /* Linked list of all unfreed memory */
+  char nBacktrace;                    /* Number of backtraces on this alloc */
+  char nBacktraceSlots;               /* Available backtrace slots */
+  u8 nTitle;                          /* Bytes of title; includes '\0' */
+  u8 eType;                           /* Allocation type code */
+  int iForeGuard;                     /* Guard word for sanity */
+};
+
+/*
+** Guard words
+*/
+#define FOREGUARD 0x80F5E153
+#define REARGUARD 0xE4676B53
+
+/*
+** Number of malloc size increments to track.
+*/
+#define NCSIZE  1000
+
+/*
+** All of the static variables used by this module are collected
+** into a single structure named "mem".  This is to keep the
+** static variables organized and to reduce namespace pollution
+** when this module is combined with other in the amalgamation.
+*/
+static struct {
+  
+  /*
+  ** Mutex to control access to the memory allocation subsystem.
+  */
+  sqlite3_mutex *mutex;
+
+  /*
+  ** Head and tail of a linked list of all outstanding allocations
+  */
+  struct MemBlockHdr *pFirst;
+  struct MemBlockHdr *pLast;
+  
+  /*
+  ** The number of levels of backtrace to save in new allocations.
+  */
+  int nBacktrace;
+  void (*xBacktrace)(int, int, void **);
+
+  /*
+  ** Title text to insert in front of each block
+  */
+  int nTitle;        /* Bytes of zTitle to save.  Includes '\0' and padding */
+  char zTitle[100];  /* The title text */
+
+  /* 
+  ** sqlite3MallocDisallow() increments the following counter.
+  ** sqlite3MallocAllow() decrements it.
+  */
+  int disallow; /* Do not allow memory allocation */
+
+  /*
+  ** Gather statistics on the sizes of memory allocations.
+  ** nAlloc[i] is the number of allocation attempts of i*8
+  ** bytes.  i==NCSIZE is the number of allocation attempts for
+  ** sizes more than NCSIZE*8 bytes.
+  */
+  int nAlloc[NCSIZE];      /* Total number of allocations */
+  int nCurrent[NCSIZE];    /* Current number of allocations */
+  int mxCurrent[NCSIZE];   /* Highwater mark for nCurrent */
+
+} mem;
+
+
+/*
+** Adjust memory usage statistics
+*/
+static void adjustStats(int iSize, int increment){
+  int i = ROUND8(iSize)/8;
+  if( i>NCSIZE-1 ){
+    i = NCSIZE - 1;
+  }
+  if( increment>0 ){
+    mem.nAlloc[i]++;
+    mem.nCurrent[i]++;
+    if( mem.nCurrent[i]>mem.mxCurrent[i] ){
+      mem.mxCurrent[i] = mem.nCurrent[i];
+    }
+  }else{
+    mem.nCurrent[i]--;
+    assert( mem.nCurrent[i]>=0 );
+  }
+}
+
+/*
+** Given an allocation, find the MemBlockHdr for that allocation.
+**
+** This routine checks the guards at either end of the allocation and
+** if they are incorrect it asserts.
+*/
+static struct MemBlockHdr *sqlite3MemsysGetHeader(void *pAllocation){
+  struct MemBlockHdr *p;
+  int *pInt;
+  u8 *pU8;
+  int nReserve;
+
+  p = (struct MemBlockHdr*)pAllocation;
+  p--;
+  assert( p->iForeGuard==(int)FOREGUARD );
+  nReserve = ROUND8(p->iSize);
+  pInt = (int*)pAllocation;
+  pU8 = (u8*)pAllocation;
+  assert( pInt[nReserve/sizeof(int)]==(int)REARGUARD );
+  /* This checks any of the "extra" bytes allocated due
+  ** to rounding up to an 8 byte boundary to ensure 
+  ** they haven't been overwritten.
+  */
+  while( nReserve-- > p->iSize ) assert( pU8[nReserve]==0x65 );
+  return p;
+}
+
+/*
+** Return the number of bytes currently allocated at address p.
+*/
+static int sqlite3MemSize(void *p){
+  struct MemBlockHdr *pHdr;
+  if( !p ){
+    return 0;
+  }
+  pHdr = sqlite3MemsysGetHeader(p);
+  return pHdr->iSize;
+}
+
+/*
+** Initialize the memory allocation subsystem.
+*/
+static int sqlite3MemInit(void *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  assert( (sizeof(struct MemBlockHdr)&7) == 0 );
+  if( !sqlite3GlobalConfig.bMemstat ){
+    /* If memory status is enabled, then the malloc.c wrapper will already
+    ** hold the STATIC_MEM mutex when the routines here are invoked. */
+    mem.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Deinitialize the memory allocation subsystem.
+*/
+static void sqlite3MemShutdown(void *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  mem.mutex = 0;
+}
+
+/*
+** Round up a request size to the next valid allocation size.
+*/
+static int sqlite3MemRoundup(int n){
+  return ROUND8(n);
+}
+
+/*
+** Fill a buffer with pseudo-random bytes.  This is used to preset
+** the content of a new memory allocation to unpredictable values and
+** to clear the content of a freed allocation to unpredictable values.
+*/
+static void randomFill(char *pBuf, int nByte){
+  unsigned int x, y, r;
+  x = SQLITE_PTR_TO_INT(pBuf);
+  y = nByte | 1;
+  while( nByte >= 4 ){
+    x = (x>>1) ^ (-(x&1) & 0xd0000001);
+    y = y*1103515245 + 12345;
+    r = x ^ y;
+    *(int*)pBuf = r;
+    pBuf += 4;
+    nByte -= 4;
+  }
+  while( nByte-- > 0 ){
+    x = (x>>1) ^ (-(x&1) & 0xd0000001);
+    y = y*1103515245 + 12345;
+    r = x ^ y;
+    *(pBuf++) = r & 0xff;
+  }
+}
+
+/*
+** Allocate nByte bytes of memory.
+*/
+static void *sqlite3MemMalloc(int nByte){
+  struct MemBlockHdr *pHdr;
+  void **pBt;
+  char *z;
+  int *pInt;
+  void *p = 0;
+  int totalSize;
+  int nReserve;
+  sqlite3_mutex_enter(mem.mutex);
+  assert( mem.disallow==0 );
+  nReserve = ROUND8(nByte);
+  totalSize = nReserve + sizeof(*pHdr) + sizeof(int) +
+               mem.nBacktrace*sizeof(void*) + mem.nTitle;
+  p = malloc(totalSize);
+  if( p ){
+    z = p;
+    pBt = (void**)&z[mem.nTitle];
+    pHdr = (struct MemBlockHdr*)&pBt[mem.nBacktrace];
+    pHdr->pNext = 0;
+    pHdr->pPrev = mem.pLast;
+    if( mem.pLast ){
+      mem.pLast->pNext = pHdr;
+    }else{
+      mem.pFirst = pHdr;
+    }
+    mem.pLast = pHdr;
+    pHdr->iForeGuard = FOREGUARD;
+    pHdr->eType = MEMTYPE_HEAP;
+    pHdr->nBacktraceSlots = mem.nBacktrace;
+    pHdr->nTitle = mem.nTitle;
+    if( mem.nBacktrace ){
+      void *aAddr[40];
+      pHdr->nBacktrace = backtrace(aAddr, mem.nBacktrace+1)-1;
+      memcpy(pBt, &aAddr[1], pHdr->nBacktrace*sizeof(void*));
+      assert(pBt[0]);
+      if( mem.xBacktrace ){
+        mem.xBacktrace(nByte, pHdr->nBacktrace-1, &aAddr[1]);
+      }
+    }else{
+      pHdr->nBacktrace = 0;
+    }
+    if( mem.nTitle ){
+      memcpy(z, mem.zTitle, mem.nTitle);
+    }
+    pHdr->iSize = nByte;
+    adjustStats(nByte, +1);
+    pInt = (int*)&pHdr[1];
+    pInt[nReserve/sizeof(int)] = REARGUARD;
+    randomFill((char*)pInt, nByte);
+    memset(((char*)pInt)+nByte, 0x65, nReserve-nByte);
+    p = (void*)pInt;
+  }
+  sqlite3_mutex_leave(mem.mutex);
+  return p; 
+}
+
+/*
+** Free memory.
+*/
+static void sqlite3MemFree(void *pPrior){
+  struct MemBlockHdr *pHdr;
+  void **pBt;
+  char *z;
+  assert( sqlite3GlobalConfig.bMemstat || sqlite3GlobalConfig.bCoreMutex==0 
+       || mem.mutex!=0 );
+  pHdr = sqlite3MemsysGetHeader(pPrior);
+  pBt = (void**)pHdr;
+  pBt -= pHdr->nBacktraceSlots;
+  sqlite3_mutex_enter(mem.mutex);
+  if( pHdr->pPrev ){
+    assert( pHdr->pPrev->pNext==pHdr );
+    pHdr->pPrev->pNext = pHdr->pNext;
+  }else{
+    assert( mem.pFirst==pHdr );
+    mem.pFirst = pHdr->pNext;
+  }
+  if( pHdr->pNext ){
+    assert( pHdr->pNext->pPrev==pHdr );
+    pHdr->pNext->pPrev = pHdr->pPrev;
+  }else{
+    assert( mem.pLast==pHdr );
+    mem.pLast = pHdr->pPrev;
+  }
+  z = (char*)pBt;
+  z -= pHdr->nTitle;
+  adjustStats(pHdr->iSize, -1);
+  randomFill(z, sizeof(void*)*pHdr->nBacktraceSlots + sizeof(*pHdr) +
+                pHdr->iSize + sizeof(int) + pHdr->nTitle);
+  free(z);
+  sqlite3_mutex_leave(mem.mutex);  
+}
+
+/*
+** Change the size of an existing memory allocation.
+**
+** For this debugging implementation, we *always* make a copy of the
+** allocation into a new place in memory.  In this way, if the 
+** higher level code is using pointer to the old allocation, it is 
+** much more likely to break and we are much more liking to find
+** the error.
+*/
+static void *sqlite3MemRealloc(void *pPrior, int nByte){
+  struct MemBlockHdr *pOldHdr;
+  void *pNew;
+  assert( mem.disallow==0 );
+  assert( (nByte & 7)==0 );     /* EV: R-46199-30249 */
+  pOldHdr = sqlite3MemsysGetHeader(pPrior);
+  pNew = sqlite3MemMalloc(nByte);
+  if( pNew ){
+    memcpy(pNew, pPrior, nByte<pOldHdr->iSize ? nByte : pOldHdr->iSize);
+    if( nByte>pOldHdr->iSize ){
+      randomFill(&((char*)pNew)[pOldHdr->iSize], nByte - pOldHdr->iSize);
+    }
+    sqlite3MemFree(pPrior);
+  }
+  return pNew;
+}
+
+/*
+** Populate the low-level memory allocation function pointers in
+** sqlite3GlobalConfig.m with pointers to the routines in this file.
+*/
+SQLITE_PRIVATE void sqlite3MemSetDefault(void){
+  static const sqlite3_mem_methods defaultMethods = {
+     sqlite3MemMalloc,
+     sqlite3MemFree,
+     sqlite3MemRealloc,
+     sqlite3MemSize,
+     sqlite3MemRoundup,
+     sqlite3MemInit,
+     sqlite3MemShutdown,
+     0
+  };
+  sqlite3_config(SQLITE_CONFIG_MALLOC, &defaultMethods);
+}
+
+/*
+** Set the "type" of an allocation.
+*/
+SQLITE_PRIVATE void sqlite3MemdebugSetType(void *p, u8 eType){
+  if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){
+    struct MemBlockHdr *pHdr;
+    pHdr = sqlite3MemsysGetHeader(p);
+    assert( pHdr->iForeGuard==FOREGUARD );
+    pHdr->eType = eType;
+  }
+}
+
+/*
+** Return TRUE if the mask of type in eType matches the type of the
+** allocation p.  Also return true if p==NULL.
+**
+** This routine is designed for use within an assert() statement, to
+** verify the type of an allocation.  For example:
+**
+**     assert( sqlite3MemdebugHasType(p, MEMTYPE_DB) );
+*/
+SQLITE_PRIVATE int sqlite3MemdebugHasType(void *p, u8 eType){
+  int rc = 1;
+  if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){
+    struct MemBlockHdr *pHdr;
+    pHdr = sqlite3MemsysGetHeader(p);
+    assert( pHdr->iForeGuard==FOREGUARD );         /* Allocation is valid */
+    if( (pHdr->eType&eType)==0 ){
+      rc = 0;
+    }
+  }
+  return rc;
+}
+
+/*
+** Return TRUE if the mask of type in eType matches no bits of the type of the
+** allocation p.  Also return true if p==NULL.
+**
+** This routine is designed for use within an assert() statement, to
+** verify the type of an allocation.  For example:
+**
+**     assert( sqlite3MemdebugNoType(p, MEMTYPE_DB) );
+*/
+SQLITE_PRIVATE int sqlite3MemdebugNoType(void *p, u8 eType){
+  int rc = 1;
+  if( p && sqlite3GlobalConfig.m.xMalloc==sqlite3MemMalloc ){
+    struct MemBlockHdr *pHdr;
+    pHdr = sqlite3MemsysGetHeader(p);
+    assert( pHdr->iForeGuard==FOREGUARD );         /* Allocation is valid */
+    if( (pHdr->eType&eType)!=0 ){
+      rc = 0;
+    }
+  }
+  return rc;
+}
+
+/*
+** Set the number of backtrace levels kept for each allocation.
+** A value of zero turns off backtracing.  The number is always rounded
+** up to a multiple of 2.
+*/
+SQLITE_PRIVATE void sqlite3MemdebugBacktrace(int depth){
+  if( depth<0 ){ depth = 0; }
+  if( depth>20 ){ depth = 20; }
+  depth = (depth+1)&0xfe;
+  mem.nBacktrace = depth;
+}
+
+SQLITE_PRIVATE void sqlite3MemdebugBacktraceCallback(void (*xBacktrace)(int, int, void **)){
+  mem.xBacktrace = xBacktrace;
+}
+
+/*
+** Set the title string for subsequent allocations.
+*/
+SQLITE_PRIVATE void sqlite3MemdebugSettitle(const char *zTitle){
+  unsigned int n = sqlite3Strlen30(zTitle) + 1;
+  sqlite3_mutex_enter(mem.mutex);
+  if( n>=sizeof(mem.zTitle) ) n = sizeof(mem.zTitle)-1;
+  memcpy(mem.zTitle, zTitle, n);
+  mem.zTitle[n] = 0;
+  mem.nTitle = ROUND8(n);
+  sqlite3_mutex_leave(mem.mutex);
+}
+
+SQLITE_PRIVATE void sqlite3MemdebugSync(){
+  struct MemBlockHdr *pHdr;
+  for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){
+    void **pBt = (void**)pHdr;
+    pBt -= pHdr->nBacktraceSlots;
+    mem.xBacktrace(pHdr->iSize, pHdr->nBacktrace-1, &pBt[1]);
+  }
+}
+
+/*
+** Open the file indicated and write a log of all unfreed memory 
+** allocations into that log.
+*/
+SQLITE_PRIVATE void sqlite3MemdebugDump(const char *zFilename){
+  FILE *out;
+  struct MemBlockHdr *pHdr;
+  void **pBt;
+  int i;
+  out = fopen(zFilename, "w");
+  if( out==0 ){
+    fprintf(stderr, "** Unable to output memory debug output log: %s **\n",
+                    zFilename);
+    return;
+  }
+  for(pHdr=mem.pFirst; pHdr; pHdr=pHdr->pNext){
+    char *z = (char*)pHdr;
+    z -= pHdr->nBacktraceSlots*sizeof(void*) + pHdr->nTitle;
+    fprintf(out, "**** %lld bytes at %p from %s ****\n", 
+            pHdr->iSize, &pHdr[1], pHdr->nTitle ? z : "???");
+    if( pHdr->nBacktrace ){
+      fflush(out);
+      pBt = (void**)pHdr;
+      pBt -= pHdr->nBacktraceSlots;
+      backtrace_symbols_fd(pBt, pHdr->nBacktrace, fileno(out));
+      fprintf(out, "\n");
+    }
+  }
+  fprintf(out, "COUNTS:\n");
+  for(i=0; i<NCSIZE-1; i++){
+    if( mem.nAlloc[i] ){
+      fprintf(out, "   %5d: %10d %10d %10d\n", 
+            i*8, mem.nAlloc[i], mem.nCurrent[i], mem.mxCurrent[i]);
+    }
+  }
+  if( mem.nAlloc[NCSIZE-1] ){
+    fprintf(out, "   %5d: %10d %10d %10d\n",
+             NCSIZE*8-8, mem.nAlloc[NCSIZE-1],
+             mem.nCurrent[NCSIZE-1], mem.mxCurrent[NCSIZE-1]);
+  }
+  fclose(out);
+}
+
+/*
+** Return the number of times sqlite3MemMalloc() has been called.
+*/
+SQLITE_PRIVATE int sqlite3MemdebugMallocCount(){
+  int i;
+  int nTotal = 0;
+  for(i=0; i<NCSIZE; i++){
+    nTotal += mem.nAlloc[i];
+  }
+  return nTotal;
+}
+
+
+#endif /* SQLITE_MEMDEBUG */
+
+/************** End of mem2.c ************************************************/
+/************** Begin file mem3.c ********************************************/
+/*
+** 2007 October 14
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the C functions that implement a memory
+** allocation subsystem for use by SQLite. 
+**
+** This version of the memory allocation subsystem omits all
+** use of malloc(). The SQLite user supplies a block of memory
+** before calling sqlite3_initialize() from which allocations
+** are made and returned by the xMalloc() and xRealloc() 
+** implementations. Once sqlite3_initialize() has been called,
+** the amount of memory available to SQLite is fixed and cannot
+** be changed.
+**
+** This version of the memory allocation subsystem is included
+** in the build only if SQLITE_ENABLE_MEMSYS3 is defined.
+*/
+
+/*
+** This version of the memory allocator is only built into the library
+** SQLITE_ENABLE_MEMSYS3 is defined. Defining this symbol does not
+** mean that the library will use a memory-pool by default, just that
+** it is available. The mempool allocator is activated by calling
+** sqlite3_config().
+*/
+#ifdef SQLITE_ENABLE_MEMSYS3
+
+/*
+** Maximum size (in Mem3Blocks) of a "small" chunk.
+*/
+#define MX_SMALL 10
+
+
+/*
+** Number of freelist hash slots
+*/
+#define N_HASH  61
+
+/*
+** A memory allocation (also called a "chunk") consists of two or 
+** more blocks where each block is 8 bytes.  The first 8 bytes are 
+** a header that is not returned to the user.
+**
+** A chunk is two or more blocks that is either checked out or
+** free.  The first block has format u.hdr.  u.hdr.size4x is 4 times the
+** size of the allocation in blocks if the allocation is free.
+** The u.hdr.size4x&1 bit is true if the chunk is checked out and
+** false if the chunk is on the freelist.  The u.hdr.size4x&2 bit
+** is true if the previous chunk is checked out and false if the
+** previous chunk is free.  The u.hdr.prevSize field is the size of
+** the previous chunk in blocks if the previous chunk is on the
+** freelist. If the previous chunk is checked out, then
+** u.hdr.prevSize can be part of the data for that chunk and should
+** not be read or written.
+**
+** We often identify a chunk by its index in mem3.aPool[].  When
+** this is done, the chunk index refers to the second block of
+** the chunk.  In this way, the first chunk has an index of 1.
+** A chunk index of 0 means "no such chunk" and is the equivalent
+** of a NULL pointer.
+**
+** The second block of free chunks is of the form u.list.  The
+** two fields form a double-linked list of chunks of related sizes.
+** Pointers to the head of the list are stored in mem3.aiSmall[] 
+** for smaller chunks and mem3.aiHash[] for larger chunks.
+**
+** The second block of a chunk is user data if the chunk is checked 
+** out.  If a chunk is checked out, the user data may extend into
+** the u.hdr.prevSize value of the following chunk.
+*/
+typedef struct Mem3Block Mem3Block;
+struct Mem3Block {
+  union {
+    struct {
+      u32 prevSize;   /* Size of previous chunk in Mem3Block elements */
+      u32 size4x;     /* 4x the size of current chunk in Mem3Block elements */
+    } hdr;
+    struct {
+      u32 next;       /* Index in mem3.aPool[] of next free chunk */
+      u32 prev;       /* Index in mem3.aPool[] of previous free chunk */
+    } list;
+  } u;
+};
+
+/*
+** All of the static variables used by this module are collected
+** into a single structure named "mem3".  This is to keep the
+** static variables organized and to reduce namespace pollution
+** when this module is combined with other in the amalgamation.
+*/
+static SQLITE_WSD struct Mem3Global {
+  /*
+  ** Memory available for allocation. nPool is the size of the array
+  ** (in Mem3Blocks) pointed to by aPool less 2.
+  */
+  u32 nPool;
+  Mem3Block *aPool;
+
+  /*
+  ** True if we are evaluating an out-of-memory callback.
+  */
+  int alarmBusy;
+  
+  /*
+  ** Mutex to control access to the memory allocation subsystem.
+  */
+  sqlite3_mutex *mutex;
+  
+  /*
+  ** The minimum amount of free space that we have seen.
+  */
+  u32 mnMaster;
+
+  /*
+  ** iMaster is the index of the master chunk.  Most new allocations
+  ** occur off of this chunk.  szMaster is the size (in Mem3Blocks)
+  ** of the current master.  iMaster is 0 if there is not master chunk.
+  ** The master chunk is not in either the aiHash[] or aiSmall[].
+  */
+  u32 iMaster;
+  u32 szMaster;
+
+  /*
+  ** Array of lists of free blocks according to the block size 
+  ** for smaller chunks, or a hash on the block size for larger
+  ** chunks.
+  */
+  u32 aiSmall[MX_SMALL-1];   /* For sizes 2 through MX_SMALL, inclusive */
+  u32 aiHash[N_HASH];        /* For sizes MX_SMALL+1 and larger */
+} mem3 = { 97535575 };
+
+#define mem3 GLOBAL(struct Mem3Global, mem3)
+
+/*
+** Unlink the chunk at mem3.aPool[i] from list it is currently
+** on.  *pRoot is the list that i is a member of.
+*/
+static void memsys3UnlinkFromList(u32 i, u32 *pRoot){
+  u32 next = mem3.aPool[i].u.list.next;
+  u32 prev = mem3.aPool[i].u.list.prev;
+  assert( sqlite3_mutex_held(mem3.mutex) );
+  if( prev==0 ){
+    *pRoot = next;
+  }else{
+    mem3.aPool[prev].u.list.next = next;
+  }
+  if( next ){
+    mem3.aPool[next].u.list.prev = prev;
+  }
+  mem3.aPool[i].u.list.next = 0;
+  mem3.aPool[i].u.list.prev = 0;
+}
+
+/*
+** Unlink the chunk at index i from 
+** whatever list is currently a member of.
+*/
+static void memsys3Unlink(u32 i){
+  u32 size, hash;
+  assert( sqlite3_mutex_held(mem3.mutex) );
+  assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 );
+  assert( i>=1 );
+  size = mem3.aPool[i-1].u.hdr.size4x/4;
+  assert( size==mem3.aPool[i+size-1].u.hdr.prevSize );
+  assert( size>=2 );
+  if( size <= MX_SMALL ){
+    memsys3UnlinkFromList(i, &mem3.aiSmall[size-2]);
+  }else{
+    hash = size % N_HASH;
+    memsys3UnlinkFromList(i, &mem3.aiHash[hash]);
+  }
+}
+
+/*
+** Link the chunk at mem3.aPool[i] so that is on the list rooted
+** at *pRoot.
+*/
+static void memsys3LinkIntoList(u32 i, u32 *pRoot){
+  assert( sqlite3_mutex_held(mem3.mutex) );
+  mem3.aPool[i].u.list.next = *pRoot;
+  mem3.aPool[i].u.list.prev = 0;
+  if( *pRoot ){
+    mem3.aPool[*pRoot].u.list.prev = i;
+  }
+  *pRoot = i;
+}
+
+/*
+** Link the chunk at index i into either the appropriate
+** small chunk list, or into the large chunk hash table.
+*/
+static void memsys3Link(u32 i){
+  u32 size, hash;
+  assert( sqlite3_mutex_held(mem3.mutex) );
+  assert( i>=1 );
+  assert( (mem3.aPool[i-1].u.hdr.size4x & 1)==0 );
+  size = mem3.aPool[i-1].u.hdr.size4x/4;
+  assert( size==mem3.aPool[i+size-1].u.hdr.prevSize );
+  assert( size>=2 );
+  if( size <= MX_SMALL ){
+    memsys3LinkIntoList(i, &mem3.aiSmall[size-2]);
+  }else{
+    hash = size % N_HASH;
+    memsys3LinkIntoList(i, &mem3.aiHash[hash]);
+  }
+}
+
+/*
+** If the STATIC_MEM mutex is not already held, obtain it now. The mutex
+** will already be held (obtained by code in malloc.c) if
+** sqlite3GlobalConfig.bMemStat is true.
+*/
+static void memsys3Enter(void){
+  if( sqlite3GlobalConfig.bMemstat==0 && mem3.mutex==0 ){
+    mem3.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
+  }
+  sqlite3_mutex_enter(mem3.mutex);
+}
+static void memsys3Leave(void){
+  sqlite3_mutex_leave(mem3.mutex);
+}
+
+/*
+** Called when we are unable to satisfy an allocation of nBytes.
+*/
+static void memsys3OutOfMemory(int nByte){
+  if( !mem3.alarmBusy ){
+    mem3.alarmBusy = 1;
+    assert( sqlite3_mutex_held(mem3.mutex) );
+    sqlite3_mutex_leave(mem3.mutex);
+    sqlite3_release_memory(nByte);
+    sqlite3_mutex_enter(mem3.mutex);
+    mem3.alarmBusy = 0;
+  }
+}
+
+
+/*
+** Chunk i is a free chunk that has been unlinked.  Adjust its 
+** size parameters for check-out and return a pointer to the 
+** user portion of the chunk.
+*/
+static void *memsys3Checkout(u32 i, u32 nBlock){
+  u32 x;
+  assert( sqlite3_mutex_held(mem3.mutex) );
+  assert( i>=1 );
+  assert( mem3.aPool[i-1].u.hdr.size4x/4==nBlock );
+  assert( mem3.aPool[i+nBlock-1].u.hdr.prevSize==nBlock );
+  x = mem3.aPool[i-1].u.hdr.size4x;
+  mem3.aPool[i-1].u.hdr.size4x = nBlock*4 | 1 | (x&2);
+  mem3.aPool[i+nBlock-1].u.hdr.prevSize = nBlock;
+  mem3.aPool[i+nBlock-1].u.hdr.size4x |= 2;
+  return &mem3.aPool[i];
+}
+
+/*
+** Carve a piece off of the end of the mem3.iMaster free chunk.
+** Return a pointer to the new allocation.  Or, if the master chunk
+** is not large enough, return 0.
+*/
+static void *memsys3FromMaster(u32 nBlock){
+  assert( sqlite3_mutex_held(mem3.mutex) );
+  assert( mem3.szMaster>=nBlock );
+  if( nBlock>=mem3.szMaster-1 ){
+    /* Use the entire master */
+    void *p = memsys3Checkout(mem3.iMaster, mem3.szMaster);
+    mem3.iMaster = 0;
+    mem3.szMaster = 0;
+    mem3.mnMaster = 0;
+    return p;
+  }else{
+    /* Split the master block.  Return the tail. */
+    u32 newi, x;
+    newi = mem3.iMaster + mem3.szMaster - nBlock;
+    assert( newi > mem3.iMaster+1 );
+    mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = nBlock;
+    mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x |= 2;
+    mem3.aPool[newi-1].u.hdr.size4x = nBlock*4 + 1;
+    mem3.szMaster -= nBlock;
+    mem3.aPool[newi-1].u.hdr.prevSize = mem3.szMaster;
+    x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2;
+    mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x;
+    if( mem3.szMaster < mem3.mnMaster ){
+      mem3.mnMaster = mem3.szMaster;
+    }
+    return (void*)&mem3.aPool[newi];
+  }
+}
+
+/*
+** *pRoot is the head of a list of free chunks of the same size
+** or same size hash.  In other words, *pRoot is an entry in either
+** mem3.aiSmall[] or mem3.aiHash[].  
+**
+** This routine examines all entries on the given list and tries
+** to coalesce each entries with adjacent free chunks.  
+**
+** If it sees a chunk that is larger than mem3.iMaster, it replaces 
+** the current mem3.iMaster with the new larger chunk.  In order for
+** this mem3.iMaster replacement to work, the master chunk must be
+** linked into the hash tables.  That is not the normal state of
+** affairs, of course.  The calling routine must link the master
+** chunk before invoking this routine, then must unlink the (possibly
+** changed) master chunk once this routine has finished.
+*/
+static void memsys3Merge(u32 *pRoot){
+  u32 iNext, prev, size, i, x;
+
+  assert( sqlite3_mutex_held(mem3.mutex) );
+  for(i=*pRoot; i>0; i=iNext){
+    iNext = mem3.aPool[i].u.list.next;
+    size = mem3.aPool[i-1].u.hdr.size4x;
+    assert( (size&1)==0 );
+    if( (size&2)==0 ){
+      memsys3UnlinkFromList(i, pRoot);
+      assert( i > mem3.aPool[i-1].u.hdr.prevSize );
+      prev = i - mem3.aPool[i-1].u.hdr.prevSize;
+      if( prev==iNext ){
+        iNext = mem3.aPool[prev].u.list.next;
+      }
+      memsys3Unlink(prev);
+      size = i + size/4 - prev;
+      x = mem3.aPool[prev-1].u.hdr.size4x & 2;
+      mem3.aPool[prev-1].u.hdr.size4x = size*4 | x;
+      mem3.aPool[prev+size-1].u.hdr.prevSize = size;
+      memsys3Link(prev);
+      i = prev;
+    }else{
+      size /= 4;
+    }
+    if( size>mem3.szMaster ){
+      mem3.iMaster = i;
+      mem3.szMaster = size;
+    }
+  }
+}
+
+/*
+** Return a block of memory of at least nBytes in size.
+** Return NULL if unable.
+**
+** This function assumes that the necessary mutexes, if any, are
+** already held by the caller. Hence "Unsafe".
+*/
+static void *memsys3MallocUnsafe(int nByte){
+  u32 i;
+  u32 nBlock;
+  u32 toFree;
+
+  assert( sqlite3_mutex_held(mem3.mutex) );
+  assert( sizeof(Mem3Block)==8 );
+  if( nByte<=12 ){
+    nBlock = 2;
+  }else{
+    nBlock = (nByte + 11)/8;
+  }
+  assert( nBlock>=2 );
+
+  /* STEP 1:
+  ** Look for an entry of the correct size in either the small
+  ** chunk table or in the large chunk hash table.  This is
+  ** successful most of the time (about 9 times out of 10).
+  */
+  if( nBlock <= MX_SMALL ){
+    i = mem3.aiSmall[nBlock-2];
+    if( i>0 ){
+      memsys3UnlinkFromList(i, &mem3.aiSmall[nBlock-2]);
+      return memsys3Checkout(i, nBlock);
+    }
+  }else{
+    int hash = nBlock % N_HASH;
+    for(i=mem3.aiHash[hash]; i>0; i=mem3.aPool[i].u.list.next){
+      if( mem3.aPool[i-1].u.hdr.size4x/4==nBlock ){
+        memsys3UnlinkFromList(i, &mem3.aiHash[hash]);
+        return memsys3Checkout(i, nBlock);
+      }
+    }
+  }
+
+  /* STEP 2:
+  ** Try to satisfy the allocation by carving a piece off of the end
+  ** of the master chunk.  This step usually works if step 1 fails.
+  */
+  if( mem3.szMaster>=nBlock ){
+    return memsys3FromMaster(nBlock);
+  }
+
+
+  /* STEP 3:  
+  ** Loop through the entire memory pool.  Coalesce adjacent free
+  ** chunks.  Recompute the master chunk as the largest free chunk.
+  ** Then try again to satisfy the allocation by carving a piece off
+  ** of the end of the master chunk.  This step happens very
+  ** rarely (we hope!)
+  */
+  for(toFree=nBlock*16; toFree<(mem3.nPool*16); toFree *= 2){
+    memsys3OutOfMemory(toFree);
+    if( mem3.iMaster ){
+      memsys3Link(mem3.iMaster);
+      mem3.iMaster = 0;
+      mem3.szMaster = 0;
+    }
+    for(i=0; i<N_HASH; i++){
+      memsys3Merge(&mem3.aiHash[i]);
+    }
+    for(i=0; i<MX_SMALL-1; i++){
+      memsys3Merge(&mem3.aiSmall[i]);
+    }
+    if( mem3.szMaster ){
+      memsys3Unlink(mem3.iMaster);
+      if( mem3.szMaster>=nBlock ){
+        return memsys3FromMaster(nBlock);
+      }
+    }
+  }
+
+  /* If none of the above worked, then we fail. */
+  return 0;
+}
+
+/*
+** Free an outstanding memory allocation.
+**
+** This function assumes that the necessary mutexes, if any, are
+** already held by the caller. Hence "Unsafe".
+*/
+void memsys3FreeUnsafe(void *pOld){
+  Mem3Block *p = (Mem3Block*)pOld;
+  int i;
+  u32 size, x;
+  assert( sqlite3_mutex_held(mem3.mutex) );
+  assert( p>mem3.aPool && p<&mem3.aPool[mem3.nPool] );
+  i = p - mem3.aPool;
+  assert( (mem3.aPool[i-1].u.hdr.size4x&1)==1 );
+  size = mem3.aPool[i-1].u.hdr.size4x/4;
+  assert( i+size<=mem3.nPool+1 );
+  mem3.aPool[i-1].u.hdr.size4x &= ~1;
+  mem3.aPool[i+size-1].u.hdr.prevSize = size;
+  mem3.aPool[i+size-1].u.hdr.size4x &= ~2;
+  memsys3Link(i);
+
+  /* Try to expand the master using the newly freed chunk */
+  if( mem3.iMaster ){
+    while( (mem3.aPool[mem3.iMaster-1].u.hdr.size4x&2)==0 ){
+      size = mem3.aPool[mem3.iMaster-1].u.hdr.prevSize;
+      mem3.iMaster -= size;
+      mem3.szMaster += size;
+      memsys3Unlink(mem3.iMaster);
+      x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2;
+      mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x;
+      mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = mem3.szMaster;
+    }
+    x = mem3.aPool[mem3.iMaster-1].u.hdr.size4x & 2;
+    while( (mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x&1)==0 ){
+      memsys3Unlink(mem3.iMaster+mem3.szMaster);
+      mem3.szMaster += mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.size4x/4;
+      mem3.aPool[mem3.iMaster-1].u.hdr.size4x = mem3.szMaster*4 | x;
+      mem3.aPool[mem3.iMaster+mem3.szMaster-1].u.hdr.prevSize = mem3.szMaster;
+    }
+  }
+}
+
+/*
+** Return the size of an outstanding allocation, in bytes.  The
+** size returned omits the 8-byte header overhead.  This only
+** works for chunks that are currently checked out.
+*/
+static int memsys3Size(void *p){
+  Mem3Block *pBlock;
+  if( p==0 ) return 0;
+  pBlock = (Mem3Block*)p;
+  assert( (pBlock[-1].u.hdr.size4x&1)!=0 );
+  return (pBlock[-1].u.hdr.size4x&~3)*2 - 4;
+}
+
+/*
+** Round up a request size to the next valid allocation size.
+*/
+static int memsys3Roundup(int n){
+  if( n<=12 ){
+    return 12;
+  }else{
+    return ((n+11)&~7) - 4;
+  }
+}
+
+/*
+** Allocate nBytes of memory.
+*/
+static void *memsys3Malloc(int nBytes){
+  sqlite3_int64 *p;
+  assert( nBytes>0 );          /* malloc.c filters out 0 byte requests */
+  memsys3Enter();
+  p = memsys3MallocUnsafe(nBytes);
+  memsys3Leave();
+  return (void*)p; 
+}
+
+/*
+** Free memory.
+*/
+void memsys3Free(void *pPrior){
+  assert( pPrior );
+  memsys3Enter();
+  memsys3FreeUnsafe(pPrior);
+  memsys3Leave();
+}
+
+/*
+** Change the size of an existing memory allocation
+*/
+void *memsys3Realloc(void *pPrior, int nBytes){
+  int nOld;
+  void *p;
+  if( pPrior==0 ){
+    return sqlite3_malloc(nBytes);
+  }
+  if( nBytes<=0 ){
+    sqlite3_free(pPrior);
+    return 0;
+  }
+  nOld = memsys3Size(pPrior);
+  if( nBytes<=nOld && nBytes>=nOld-128 ){
+    return pPrior;
+  }
+  memsys3Enter();
+  p = memsys3MallocUnsafe(nBytes);
+  if( p ){
+    if( nOld<nBytes ){
+      memcpy(p, pPrior, nOld);
+    }else{
+      memcpy(p, pPrior, nBytes);
+    }
+    memsys3FreeUnsafe(pPrior);
+  }
+  memsys3Leave();
+  return p;
+}
+
+/*
+** Initialize this module.
+*/
+static int memsys3Init(void *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  if( !sqlite3GlobalConfig.pHeap ){
+    return SQLITE_ERROR;
+  }
+
+  /* Store a pointer to the memory block in global structure mem3. */
+  assert( sizeof(Mem3Block)==8 );
+  mem3.aPool = (Mem3Block *)sqlite3GlobalConfig.pHeap;
+  mem3.nPool = (sqlite3GlobalConfig.nHeap / sizeof(Mem3Block)) - 2;
+
+  /* Initialize the master block. */
+  mem3.szMaster = mem3.nPool;
+  mem3.mnMaster = mem3.szMaster;
+  mem3.iMaster = 1;
+  mem3.aPool[0].u.hdr.size4x = (mem3.szMaster<<2) + 2;
+  mem3.aPool[mem3.nPool].u.hdr.prevSize = mem3.nPool;
+  mem3.aPool[mem3.nPool].u.hdr.size4x = 1;
+
+  return SQLITE_OK;
+}
+
+/*
+** Deinitialize this module.
+*/
+static void memsys3Shutdown(void *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  mem3.mutex = 0;
+  return;
+}
+
+
+
+/*
+** Open the file indicated and write a log of all unfreed memory 
+** allocations into that log.
+*/
+SQLITE_PRIVATE void sqlite3Memsys3Dump(const char *zFilename){
+#ifdef SQLITE_DEBUG
+  FILE *out;
+  u32 i, j;
+  u32 size;
+  if( zFilename==0 || zFilename[0]==0 ){
+    out = stdout;
+  }else{
+    out = fopen(zFilename, "w");
+    if( out==0 ){
+      fprintf(stderr, "** Unable to output memory debug output log: %s **\n",
+                      zFilename);
+      return;
+    }
+  }
+  memsys3Enter();
+  fprintf(out, "CHUNKS:\n");
+  for(i=1; i<=mem3.nPool; i+=size/4){
+    size = mem3.aPool[i-1].u.hdr.size4x;
+    if( size/4<=1 ){
+      fprintf(out, "%p size error\n", &mem3.aPool[i]);
+      assert( 0 );
+      break;
+    }
+    if( (size&1)==0 && mem3.aPool[i+size/4-1].u.hdr.prevSize!=size/4 ){
+      fprintf(out, "%p tail size does not match\n", &mem3.aPool[i]);
+      assert( 0 );
+      break;
+    }
+    if( ((mem3.aPool[i+size/4-1].u.hdr.size4x&2)>>1)!=(size&1) ){
+      fprintf(out, "%p tail checkout bit is incorrect\n", &mem3.aPool[i]);
+      assert( 0 );
+      break;
+    }
+    if( size&1 ){
+      fprintf(out, "%p %6d bytes checked out\n", &mem3.aPool[i], (size/4)*8-8);
+    }else{
+      fprintf(out, "%p %6d bytes free%s\n", &mem3.aPool[i], (size/4)*8-8,
+                  i==mem3.iMaster ? " **master**" : "");
+    }
+  }
+  for(i=0; i<MX_SMALL-1; i++){
+    if( mem3.aiSmall[i]==0 ) continue;
+    fprintf(out, "small(%2d):", i);
+    for(j = mem3.aiSmall[i]; j>0; j=mem3.aPool[j].u.list.next){
+      fprintf(out, " %p(%d)", &mem3.aPool[j],
+              (mem3.aPool[j-1].u.hdr.size4x/4)*8-8);
+    }
+    fprintf(out, "\n"); 
+  }
+  for(i=0; i<N_HASH; i++){
+    if( mem3.aiHash[i]==0 ) continue;
+    fprintf(out, "hash(%2d):", i);
+    for(j = mem3.aiHash[i]; j>0; j=mem3.aPool[j].u.list.next){
+      fprintf(out, " %p(%d)", &mem3.aPool[j],
+              (mem3.aPool[j-1].u.hdr.size4x/4)*8-8);
+    }
+    fprintf(out, "\n"); 
+  }
+  fprintf(out, "master=%d\n", mem3.iMaster);
+  fprintf(out, "nowUsed=%d\n", mem3.nPool*8 - mem3.szMaster*8);
+  fprintf(out, "mxUsed=%d\n", mem3.nPool*8 - mem3.mnMaster*8);
+  sqlite3_mutex_leave(mem3.mutex);
+  if( out==stdout ){
+    fflush(stdout);
+  }else{
+    fclose(out);
+  }
+#else
+  UNUSED_PARAMETER(zFilename);
+#endif
+}
+
+/*
+** This routine is the only routine in this file with external 
+** linkage.
+**
+** Populate the low-level memory allocation function pointers in
+** sqlite3GlobalConfig.m with pointers to the routines in this file. The
+** arguments specify the block of memory to manage.
+**
+** This routine is only called by sqlite3_config(), and therefore
+** is not required to be threadsafe (it is not).
+*/
+SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys3(void){
+  static const sqlite3_mem_methods mempoolMethods = {
+     memsys3Malloc,
+     memsys3Free,
+     memsys3Realloc,
+     memsys3Size,
+     memsys3Roundup,
+     memsys3Init,
+     memsys3Shutdown,
+     0
+  };
+  return &mempoolMethods;
+}
+
+#endif /* SQLITE_ENABLE_MEMSYS3 */
+
+/************** End of mem3.c ************************************************/
+/************** Begin file mem5.c ********************************************/
+/*
+** 2007 October 14
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the C functions that implement a memory
+** allocation subsystem for use by SQLite. 
+**
+** This version of the memory allocation subsystem omits all
+** use of malloc(). The application gives SQLite a block of memory
+** before calling sqlite3_initialize() from which allocations
+** are made and returned by the xMalloc() and xRealloc() 
+** implementations. Once sqlite3_initialize() has been called,
+** the amount of memory available to SQLite is fixed and cannot
+** be changed.
+**
+** This version of the memory allocation subsystem is included
+** in the build only if SQLITE_ENABLE_MEMSYS5 is defined.
+**
+** This memory allocator uses the following algorithm:
+**
+**   1.  All memory allocations sizes are rounded up to a power of 2.
+**
+**   2.  If two adjacent free blocks are the halves of a larger block,
+**       then the two blocks are coalesed into the single larger block.
+**
+**   3.  New memory is allocated from the first available free block.
+**
+** This algorithm is described in: J. M. Robson. "Bounds for Some Functions
+** Concerning Dynamic Storage Allocation". Journal of the Association for
+** Computing Machinery, Volume 21, Number 8, July 1974, pages 491-499.
+** 
+** Let n be the size of the largest allocation divided by the minimum
+** allocation size (after rounding all sizes up to a power of 2.)  Let M
+** be the maximum amount of memory ever outstanding at one time.  Let
+** N be the total amount of memory available for allocation.  Robson
+** proved that this memory allocator will never breakdown due to 
+** fragmentation as long as the following constraint holds:
+**
+**      N >=  M*(1 + log2(n)/2) - n + 1
+**
+** The sqlite3_status() logic tracks the maximum values of n and M so
+** that an application can, at any time, verify this constraint.
+*/
+
+/*
+** This version of the memory allocator is used only when 
+** SQLITE_ENABLE_MEMSYS5 is defined.
+*/
+#ifdef SQLITE_ENABLE_MEMSYS5
+
+/*
+** A minimum allocation is an instance of the following structure.
+** Larger allocations are an array of these structures where the
+** size of the array is a power of 2.
+**
+** The size of this object must be a power of two.  That fact is
+** verified in memsys5Init().
+*/
+typedef struct Mem5Link Mem5Link;
+struct Mem5Link {
+  int next;       /* Index of next free chunk */
+  int prev;       /* Index of previous free chunk */
+};
+
+/*
+** Maximum size of any allocation is ((1<<LOGMAX)*mem5.szAtom). Since
+** mem5.szAtom is always at least 8 and 32-bit integers are used,
+** it is not actually possible to reach this limit.
+*/
+#define LOGMAX 30
+
+/*
+** Masks used for mem5.aCtrl[] elements.
+*/
+#define CTRL_LOGSIZE  0x1f    /* Log2 Size of this block */
+#define CTRL_FREE     0x20    /* True if not checked out */
+
+/*
+** All of the static variables used by this module are collected
+** into a single structure named "mem5".  This is to keep the
+** static variables organized and to reduce namespace pollution
+** when this module is combined with other in the amalgamation.
+*/
+static SQLITE_WSD struct Mem5Global {
+  /*
+  ** Memory available for allocation
+  */
+  int szAtom;      /* Smallest possible allocation in bytes */
+  int nBlock;      /* Number of szAtom sized blocks in zPool */
+  u8 *zPool;       /* Memory available to be allocated */
+  
+  /*
+  ** Mutex to control access to the memory allocation subsystem.
+  */
+  sqlite3_mutex *mutex;
+
+  /*
+  ** Performance statistics
+  */
+  u64 nAlloc;         /* Total number of calls to malloc */
+  u64 totalAlloc;     /* Total of all malloc calls - includes internal frag */
+  u64 totalExcess;    /* Total internal fragmentation */
+  u32 currentOut;     /* Current checkout, including internal fragmentation */
+  u32 currentCount;   /* Current number of distinct checkouts */
+  u32 maxOut;         /* Maximum instantaneous currentOut */
+  u32 maxCount;       /* Maximum instantaneous currentCount */
+  u32 maxRequest;     /* Largest allocation (exclusive of internal frag) */
+  
+  /*
+  ** Lists of free blocks.  aiFreelist[0] is a list of free blocks of
+  ** size mem5.szAtom.  aiFreelist[1] holds blocks of size szAtom*2.
+  ** and so forth.
+  */
+  int aiFreelist[LOGMAX+1];
+
+  /*
+  ** Space for tracking which blocks are checked out and the size
+  ** of each block.  One byte per block.
+  */
+  u8 *aCtrl;
+
+} mem5;
+
+/*
+** Access the static variable through a macro for SQLITE_OMIT_WSD
+*/
+#define mem5 GLOBAL(struct Mem5Global, mem5)
+
+/*
+** Assuming mem5.zPool is divided up into an array of Mem5Link
+** structures, return a pointer to the idx-th such lik.
+*/
+#define MEM5LINK(idx) ((Mem5Link *)(&mem5.zPool[(idx)*mem5.szAtom]))
+
+/*
+** Unlink the chunk at mem5.aPool[i] from list it is currently
+** on.  It should be found on mem5.aiFreelist[iLogsize].
+*/
+static void memsys5Unlink(int i, int iLogsize){
+  int next, prev;
+  assert( i>=0 && i<mem5.nBlock );
+  assert( iLogsize>=0 && iLogsize<=LOGMAX );
+  assert( (mem5.aCtrl[i] & CTRL_LOGSIZE)==iLogsize );
+
+  next = MEM5LINK(i)->next;
+  prev = MEM5LINK(i)->prev;
+  if( prev<0 ){
+    mem5.aiFreelist[iLogsize] = next;
+  }else{
+    MEM5LINK(prev)->next = next;
+  }
+  if( next>=0 ){
+    MEM5LINK(next)->prev = prev;
+  }
+}
+
+/*
+** Link the chunk at mem5.aPool[i] so that is on the iLogsize
+** free list.
+*/
+static void memsys5Link(int i, int iLogsize){
+  int x;
+  assert( sqlite3_mutex_held(mem5.mutex) );
+  assert( i>=0 && i<mem5.nBlock );
+  assert( iLogsize>=0 && iLogsize<=LOGMAX );
+  assert( (mem5.aCtrl[i] & CTRL_LOGSIZE)==iLogsize );
+
+  x = MEM5LINK(i)->next = mem5.aiFreelist[iLogsize];
+  MEM5LINK(i)->prev = -1;
+  if( x>=0 ){
+    assert( x<mem5.nBlock );
+    MEM5LINK(x)->prev = i;
+  }
+  mem5.aiFreelist[iLogsize] = i;
+}
+
+/*
+** If the STATIC_MEM mutex is not already held, obtain it now. The mutex
+** will already be held (obtained by code in malloc.c) if
+** sqlite3GlobalConfig.bMemStat is true.
+*/
+static void memsys5Enter(void){
+  sqlite3_mutex_enter(mem5.mutex);
+}
+static void memsys5Leave(void){
+  sqlite3_mutex_leave(mem5.mutex);
+}
+
+/*
+** Return the size of an outstanding allocation, in bytes.  The
+** size returned omits the 8-byte header overhead.  This only
+** works for chunks that are currently checked out.
+*/
+static int memsys5Size(void *p){
+  int iSize = 0;
+  if( p ){
+    int i = ((u8 *)p-mem5.zPool)/mem5.szAtom;
+    assert( i>=0 && i<mem5.nBlock );
+    iSize = mem5.szAtom * (1 << (mem5.aCtrl[i]&CTRL_LOGSIZE));
+  }
+  return iSize;
+}
+
+/*
+** Find the first entry on the freelist iLogsize.  Unlink that
+** entry and return its index. 
+*/
+static int memsys5UnlinkFirst(int iLogsize){
+  int i;
+  int iFirst;
+
+  assert( iLogsize>=0 && iLogsize<=LOGMAX );
+  i = iFirst = mem5.aiFreelist[iLogsize];
+  assert( iFirst>=0 );
+  while( i>0 ){
+    if( i<iFirst ) iFirst = i;
+    i = MEM5LINK(i)->next;
+  }
+  memsys5Unlink(iFirst, iLogsize);
+  return iFirst;
+}
+
+/*
+** Return a block of memory of at least nBytes in size.
+** Return NULL if unable.  Return NULL if nBytes==0.
+**
+** The caller guarantees that nByte positive.
+**
+** The caller has obtained a mutex prior to invoking this
+** routine so there is never any chance that two or more
+** threads can be in this routine at the same time.
+*/
+static void *memsys5MallocUnsafe(int nByte){
+  int i;           /* Index of a mem5.aPool[] slot */
+  int iBin;        /* Index into mem5.aiFreelist[] */
+  int iFullSz;     /* Size of allocation rounded up to power of 2 */
+  int iLogsize;    /* Log2 of iFullSz/POW2_MIN */
+
+  /* nByte must be a positive */
+  assert( nByte>0 );
+
+  /* Keep track of the maximum allocation request.  Even unfulfilled
+  ** requests are counted */
+  if( (u32)nByte>mem5.maxRequest ){
+    mem5.maxRequest = nByte;
+  }
+
+  /* Abort if the requested allocation size is larger than the largest
+  ** power of two that we can represent using 32-bit signed integers.
+  */
+  if( nByte > 0x40000000 ){
+    return 0;
+  }
+
+  /* Round nByte up to the next valid power of two */
+  for(iFullSz=mem5.szAtom, iLogsize=0; iFullSz<nByte; iFullSz *= 2, iLogsize++){}
+
+  /* Make sure mem5.aiFreelist[iLogsize] contains at least one free
+  ** block.  If not, then split a block of the next larger power of
+  ** two in order to create a new free block of size iLogsize.
+  */
+  for(iBin=iLogsize; mem5.aiFreelist[iBin]<0 && iBin<=LOGMAX; iBin++){}
+  if( iBin>LOGMAX ){
+    testcase( sqlite3GlobalConfig.xLog!=0 );
+    sqlite3_log(SQLITE_NOMEM, "failed to allocate %u bytes", nByte);
+    return 0;
+  }
+  i = memsys5UnlinkFirst(iBin);
+  while( iBin>iLogsize ){
+    int newSize;
+
+    iBin--;
+    newSize = 1 << iBin;
+    mem5.aCtrl[i+newSize] = CTRL_FREE | iBin;
+    memsys5Link(i+newSize, iBin);
+  }
+  mem5.aCtrl[i] = iLogsize;
+
+  /* Update allocator performance statistics. */
+  mem5.nAlloc++;
+  mem5.totalAlloc += iFullSz;
+  mem5.totalExcess += iFullSz - nByte;
+  mem5.currentCount++;
+  mem5.currentOut += iFullSz;
+  if( mem5.maxCount<mem5.currentCount ) mem5.maxCount = mem5.currentCount;
+  if( mem5.maxOut<mem5.currentOut ) mem5.maxOut = mem5.currentOut;
+
+  /* Return a pointer to the allocated memory. */
+  return (void*)&mem5.zPool[i*mem5.szAtom];
+}
+
+/*
+** Free an outstanding memory allocation.
+*/
+static void memsys5FreeUnsafe(void *pOld){
+  u32 size, iLogsize;
+  int iBlock;
+
+  /* Set iBlock to the index of the block pointed to by pOld in 
+  ** the array of mem5.szAtom byte blocks pointed to by mem5.zPool.
+  */
+  iBlock = ((u8 *)pOld-mem5.zPool)/mem5.szAtom;
+
+  /* Check that the pointer pOld points to a valid, non-free block. */
+  assert( iBlock>=0 && iBlock<mem5.nBlock );
+  assert( ((u8 *)pOld-mem5.zPool)%mem5.szAtom==0 );
+  assert( (mem5.aCtrl[iBlock] & CTRL_FREE)==0 );
+
+  iLogsize = mem5.aCtrl[iBlock] & CTRL_LOGSIZE;
+  size = 1<<iLogsize;
+  assert( iBlock+size-1<(u32)mem5.nBlock );
+
+  mem5.aCtrl[iBlock] |= CTRL_FREE;
+  mem5.aCtrl[iBlock+size-1] |= CTRL_FREE;
+  assert( mem5.currentCount>0 );
+  assert( mem5.currentOut>=(size*mem5.szAtom) );
+  mem5.currentCount--;
+  mem5.currentOut -= size*mem5.szAtom;
+  assert( mem5.currentOut>0 || mem5.currentCount==0 );
+  assert( mem5.currentCount>0 || mem5.currentOut==0 );
+
+  mem5.aCtrl[iBlock] = CTRL_FREE | iLogsize;
+  while( ALWAYS(iLogsize<LOGMAX) ){
+    int iBuddy;
+    if( (iBlock>>iLogsize) & 1 ){
+      iBuddy = iBlock - size;
+    }else{
+      iBuddy = iBlock + size;
+    }
+    assert( iBuddy>=0 );
+    if( (iBuddy+(1<<iLogsize))>mem5.nBlock ) break;
+    if( mem5.aCtrl[iBuddy]!=(CTRL_FREE | iLogsize) ) break;
+    memsys5Unlink(iBuddy, iLogsize);
+    iLogsize++;
+    if( iBuddy<iBlock ){
+      mem5.aCtrl[iBuddy] = CTRL_FREE | iLogsize;
+      mem5.aCtrl[iBlock] = 0;
+      iBlock = iBuddy;
+    }else{
+      mem5.aCtrl[iBlock] = CTRL_FREE | iLogsize;
+      mem5.aCtrl[iBuddy] = 0;
+    }
+    size *= 2;
+  }
+  memsys5Link(iBlock, iLogsize);
+}
+
+/*
+** Allocate nBytes of memory
+*/
+static void *memsys5Malloc(int nBytes){
+  sqlite3_int64 *p = 0;
+  if( nBytes>0 ){
+    memsys5Enter();
+    p = memsys5MallocUnsafe(nBytes);
+    memsys5Leave();
+  }
+  return (void*)p; 
+}
+
+/*
+** Free memory.
+**
+** The outer layer memory allocator prevents this routine from
+** being called with pPrior==0.
+*/
+static void memsys5Free(void *pPrior){
+  assert( pPrior!=0 );
+  memsys5Enter();
+  memsys5FreeUnsafe(pPrior);
+  memsys5Leave();  
+}
+
+/*
+** Change the size of an existing memory allocation.
+**
+** The outer layer memory allocator prevents this routine from
+** being called with pPrior==0.  
+**
+** nBytes is always a value obtained from a prior call to
+** memsys5Round().  Hence nBytes is always a non-negative power
+** of two.  If nBytes==0 that means that an oversize allocation
+** (an allocation larger than 0x40000000) was requested and this
+** routine should return 0 without freeing pPrior.
+*/
+static void *memsys5Realloc(void *pPrior, int nBytes){
+  int nOld;
+  void *p;
+  assert( pPrior!=0 );
+  assert( (nBytes&(nBytes-1))==0 );  /* EV: R-46199-30249 */
+  assert( nBytes>=0 );
+  if( nBytes==0 ){
+    return 0;
+  }
+  nOld = memsys5Size(pPrior);
+  if( nBytes<=nOld ){
+    return pPrior;
+  }
+  memsys5Enter();
+  p = memsys5MallocUnsafe(nBytes);
+  if( p ){
+    memcpy(p, pPrior, nOld);
+    memsys5FreeUnsafe(pPrior);
+  }
+  memsys5Leave();
+  return p;
+}
+
+/*
+** Round up a request size to the next valid allocation size.  If
+** the allocation is too large to be handled by this allocation system,
+** return 0.
+**
+** All allocations must be a power of two and must be expressed by a
+** 32-bit signed integer.  Hence the largest allocation is 0x40000000
+** or 1073741824 bytes.
+*/
+static int memsys5Roundup(int n){
+  int iFullSz;
+  if( n > 0x40000000 ) return 0;
+  for(iFullSz=mem5.szAtom; iFullSz<n; iFullSz *= 2);
+  return iFullSz;
+}
+
+/*
+** Return the ceiling of the logarithm base 2 of iValue.
+**
+** Examples:   memsys5Log(1) -> 0
+**             memsys5Log(2) -> 1
+**             memsys5Log(4) -> 2
+**             memsys5Log(5) -> 3
+**             memsys5Log(8) -> 3
+**             memsys5Log(9) -> 4
+*/
+static int memsys5Log(int iValue){
+  int iLog;
+  for(iLog=0; (iLog<(int)((sizeof(int)*8)-1)) && (1<<iLog)<iValue; iLog++);
+  return iLog;
+}
+
+/*
+** Initialize the memory allocator.
+**
+** This routine is not threadsafe.  The caller must be holding a mutex
+** to prevent multiple threads from entering at the same time.
+*/
+static int memsys5Init(void *NotUsed){
+  int ii;            /* Loop counter */
+  int nByte;         /* Number of bytes of memory available to this allocator */
+  u8 *zByte;         /* Memory usable by this allocator */
+  int nMinLog;       /* Log base 2 of minimum allocation size in bytes */
+  int iOffset;       /* An offset into mem5.aCtrl[] */
+
+  UNUSED_PARAMETER(NotUsed);
+
+  /* For the purposes of this routine, disable the mutex */
+  mem5.mutex = 0;
+
+  /* The size of a Mem5Link object must be a power of two.  Verify that
+  ** this is case.
+  */
+  assert( (sizeof(Mem5Link)&(sizeof(Mem5Link)-1))==0 );
+
+  nByte = sqlite3GlobalConfig.nHeap;
+  zByte = (u8*)sqlite3GlobalConfig.pHeap;
+  assert( zByte!=0 );  /* sqlite3_config() does not allow otherwise */
+
+  /* boundaries on sqlite3GlobalConfig.mnReq are enforced in sqlite3_config() */
+  nMinLog = memsys5Log(sqlite3GlobalConfig.mnReq);
+  mem5.szAtom = (1<<nMinLog);
+  while( (int)sizeof(Mem5Link)>mem5.szAtom ){
+    mem5.szAtom = mem5.szAtom << 1;
+  }
+
+  mem5.nBlock = (nByte / (mem5.szAtom+sizeof(u8)));
+  mem5.zPool = zByte;
+  mem5.aCtrl = (u8 *)&mem5.zPool[mem5.nBlock*mem5.szAtom];
+
+  for(ii=0; ii<=LOGMAX; ii++){
+    mem5.aiFreelist[ii] = -1;
+  }
+
+  iOffset = 0;
+  for(ii=LOGMAX; ii>=0; ii--){
+    int nAlloc = (1<<ii);
+    if( (iOffset+nAlloc)<=mem5.nBlock ){
+      mem5.aCtrl[iOffset] = ii | CTRL_FREE;
+      memsys5Link(iOffset, ii);
+      iOffset += nAlloc;
+    }
+    assert((iOffset+nAlloc)>mem5.nBlock);
+  }
+
+  /* If a mutex is required for normal operation, allocate one */
+  if( sqlite3GlobalConfig.bMemstat==0 ){
+    mem5.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** Deinitialize this module.
+*/
+static void memsys5Shutdown(void *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  mem5.mutex = 0;
+  return;
+}
+
+#ifdef SQLITE_TEST
+/*
+** Open the file indicated and write a log of all unfreed memory 
+** allocations into that log.
+*/
+SQLITE_PRIVATE void sqlite3Memsys5Dump(const char *zFilename){
+  FILE *out;
+  int i, j, n;
+  int nMinLog;
+
+  if( zFilename==0 || zFilename[0]==0 ){
+    out = stdout;
+  }else{
+    out = fopen(zFilename, "w");
+    if( out==0 ){
+      fprintf(stderr, "** Unable to output memory debug output log: %s **\n",
+                      zFilename);
+      return;
+    }
+  }
+  memsys5Enter();
+  nMinLog = memsys5Log(mem5.szAtom);
+  for(i=0; i<=LOGMAX && i+nMinLog<32; i++){
+    for(n=0, j=mem5.aiFreelist[i]; j>=0; j = MEM5LINK(j)->next, n++){}
+    fprintf(out, "freelist items of size %d: %d\n", mem5.szAtom << i, n);
+  }
+  fprintf(out, "mem5.nAlloc       = %llu\n", mem5.nAlloc);
+  fprintf(out, "mem5.totalAlloc   = %llu\n", mem5.totalAlloc);
+  fprintf(out, "mem5.totalExcess  = %llu\n", mem5.totalExcess);
+  fprintf(out, "mem5.currentOut   = %u\n", mem5.currentOut);
+  fprintf(out, "mem5.currentCount = %u\n", mem5.currentCount);
+  fprintf(out, "mem5.maxOut       = %u\n", mem5.maxOut);
+  fprintf(out, "mem5.maxCount     = %u\n", mem5.maxCount);
+  fprintf(out, "mem5.maxRequest   = %u\n", mem5.maxRequest);
+  memsys5Leave();
+  if( out==stdout ){
+    fflush(stdout);
+  }else{
+    fclose(out);
+  }
+}
+#endif
+
+/*
+** This routine is the only routine in this file with external 
+** linkage. It returns a pointer to a static sqlite3_mem_methods
+** struct populated with the memsys5 methods.
+*/
+SQLITE_PRIVATE const sqlite3_mem_methods *sqlite3MemGetMemsys5(void){
+  static const sqlite3_mem_methods memsys5Methods = {
+     memsys5Malloc,
+     memsys5Free,
+     memsys5Realloc,
+     memsys5Size,
+     memsys5Roundup,
+     memsys5Init,
+     memsys5Shutdown,
+     0
+  };
+  return &memsys5Methods;
+}
+
+#endif /* SQLITE_ENABLE_MEMSYS5 */
+
+/************** End of mem5.c ************************************************/
+/************** Begin file mutex.c *******************************************/
+/*
+** 2007 August 14
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the C functions that implement mutexes.
+**
+** This file contains code that is common across all mutex implementations.
+*/
+
+#if defined(SQLITE_DEBUG) && !defined(SQLITE_MUTEX_OMIT)
+/*
+** For debugging purposes, record when the mutex subsystem is initialized
+** and uninitialized so that we can assert() if there is an attempt to
+** allocate a mutex while the system is uninitialized.
+*/
+static SQLITE_WSD int mutexIsInit = 0;
+#endif /* SQLITE_DEBUG */
+
+
+#ifndef SQLITE_MUTEX_OMIT
+/*
+** Initialize the mutex system.
+*/
+SQLITE_PRIVATE int sqlite3MutexInit(void){ 
+  int rc = SQLITE_OK;
+  if( !sqlite3GlobalConfig.mutex.xMutexAlloc ){
+    /* If the xMutexAlloc method has not been set, then the user did not
+    ** install a mutex implementation via sqlite3_config() prior to 
+    ** sqlite3_initialize() being called. This block copies pointers to
+    ** the default implementation into the sqlite3GlobalConfig structure.
+    */
+    sqlite3_mutex_methods const *pFrom;
+    sqlite3_mutex_methods *pTo = &sqlite3GlobalConfig.mutex;
+
+    if( sqlite3GlobalConfig.bCoreMutex ){
+      pFrom = sqlite3DefaultMutex();
+    }else{
+      pFrom = sqlite3NoopMutex();
+    }
+    memcpy(pTo, pFrom, offsetof(sqlite3_mutex_methods, xMutexAlloc));
+    memcpy(&pTo->xMutexFree, &pFrom->xMutexFree,
+           sizeof(*pTo) - offsetof(sqlite3_mutex_methods, xMutexFree));
+    pTo->xMutexAlloc = pFrom->xMutexAlloc;
+  }
+  rc = sqlite3GlobalConfig.mutex.xMutexInit();
+
+#ifdef SQLITE_DEBUG
+  GLOBAL(int, mutexIsInit) = 1;
+#endif
+
+  return rc;
+}
+
+/*
+** Shutdown the mutex system. This call frees resources allocated by
+** sqlite3MutexInit().
+*/
+SQLITE_PRIVATE int sqlite3MutexEnd(void){
+  int rc = SQLITE_OK;
+  if( sqlite3GlobalConfig.mutex.xMutexEnd ){
+    rc = sqlite3GlobalConfig.mutex.xMutexEnd();
+  }
+
+#ifdef SQLITE_DEBUG
+  GLOBAL(int, mutexIsInit) = 0;
+#endif
+
+  return rc;
+}
+
+/*
+** Retrieve a pointer to a static mutex or allocate a new dynamic one.
+*/
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int id){
+#ifndef SQLITE_OMIT_AUTOINIT
+  if( sqlite3_initialize() ) return 0;
+#endif
+  return sqlite3GlobalConfig.mutex.xMutexAlloc(id);
+}
+
+SQLITE_PRIVATE sqlite3_mutex *sqlite3MutexAlloc(int id){
+  if( !sqlite3GlobalConfig.bCoreMutex ){
+    return 0;
+  }
+  assert( GLOBAL(int, mutexIsInit) );
+  return sqlite3GlobalConfig.mutex.xMutexAlloc(id);
+}
+
+/*
+** Free a dynamic mutex.
+*/
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex *p){
+  if( p ){
+    sqlite3GlobalConfig.mutex.xMutexFree(p);
+  }
+}
+
+/*
+** Obtain the mutex p. If some other thread already has the mutex, block
+** until it can be obtained.
+*/
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex *p){
+  if( p ){
+    sqlite3GlobalConfig.mutex.xMutexEnter(p);
+  }
+}
+
+/*
+** Obtain the mutex p. If successful, return SQLITE_OK. Otherwise, if another
+** thread holds the mutex and it cannot be obtained, return SQLITE_BUSY.
+*/
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex *p){
+  int rc = SQLITE_OK;
+  if( p ){
+    return sqlite3GlobalConfig.mutex.xMutexTry(p);
+  }
+  return rc;
+}
+
+/*
+** The sqlite3_mutex_leave() routine exits a mutex that was previously
+** entered by the same thread.  The behavior is undefined if the mutex 
+** is not currently entered. If a NULL pointer is passed as an argument
+** this function is a no-op.
+*/
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex *p){
+  if( p ){
+    sqlite3GlobalConfig.mutex.xMutexLeave(p);
+  }
+}
+
+#ifndef NDEBUG
+/*
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
+** intended for use inside assert() statements.
+*/
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex *p){
+  return p==0 || sqlite3GlobalConfig.mutex.xMutexHeld(p);
+}
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex *p){
+  return p==0 || sqlite3GlobalConfig.mutex.xMutexNotheld(p);
+}
+#endif
+
+#endif /* SQLITE_MUTEX_OMIT */
+
+/************** End of mutex.c ***********************************************/
+/************** Begin file mutex_noop.c **************************************/
+/*
+** 2008 October 07
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the C functions that implement mutexes.
+**
+** This implementation in this file does not provide any mutual
+** exclusion and is thus suitable for use only in applications
+** that use SQLite in a single thread.  The routines defined
+** here are place-holders.  Applications can substitute working
+** mutex routines at start-time using the
+**
+**     sqlite3_config(SQLITE_CONFIG_MUTEX,...)
+**
+** interface.
+**
+** If compiled with SQLITE_DEBUG, then additional logic is inserted
+** that does error checking on mutexes to make sure they are being
+** called correctly.
+*/
+
+#ifndef SQLITE_MUTEX_OMIT
+
+#ifndef SQLITE_DEBUG
+/*
+** Stub routines for all mutex methods.
+**
+** This routines provide no mutual exclusion or error checking.
+*/
+static int noopMutexInit(void){ return SQLITE_OK; }
+static int noopMutexEnd(void){ return SQLITE_OK; }
+static sqlite3_mutex *noopMutexAlloc(int id){ 
+  UNUSED_PARAMETER(id);
+  return (sqlite3_mutex*)8; 
+}
+static void noopMutexFree(sqlite3_mutex *p){ UNUSED_PARAMETER(p); return; }
+static void noopMutexEnter(sqlite3_mutex *p){ UNUSED_PARAMETER(p); return; }
+static int noopMutexTry(sqlite3_mutex *p){
+  UNUSED_PARAMETER(p);
+  return SQLITE_OK;
+}
+static void noopMutexLeave(sqlite3_mutex *p){ UNUSED_PARAMETER(p); return; }
+
+SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3NoopMutex(void){
+  static const sqlite3_mutex_methods sMutex = {
+    noopMutexInit,
+    noopMutexEnd,
+    noopMutexAlloc,
+    noopMutexFree,
+    noopMutexEnter,
+    noopMutexTry,
+    noopMutexLeave,
+
+    0,
+    0,
+  };
+
+  return &sMutex;
+}
+#endif /* !SQLITE_DEBUG */
+
+#ifdef SQLITE_DEBUG
+/*
+** In this implementation, error checking is provided for testing
+** and debugging purposes.  The mutexes still do not provide any
+** mutual exclusion.
+*/
+
+/*
+** The mutex object
+*/
+typedef struct sqlite3_debug_mutex {
+  int id;     /* The mutex type */
+  int cnt;    /* Number of entries without a matching leave */
+} sqlite3_debug_mutex;
+
+/*
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
+** intended for use inside assert() statements.
+*/
+static int debugMutexHeld(sqlite3_mutex *pX){
+  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;
+  return p==0 || p->cnt>0;
+}
+static int debugMutexNotheld(sqlite3_mutex *pX){
+  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;
+  return p==0 || p->cnt==0;
+}
+
+/*
+** Initialize and deinitialize the mutex subsystem.
+*/
+static int debugMutexInit(void){ return SQLITE_OK; }
+static int debugMutexEnd(void){ return SQLITE_OK; }
+
+/*
+** The sqlite3_mutex_alloc() routine allocates a new
+** mutex and returns a pointer to it.  If it returns NULL
+** that means that a mutex could not be allocated. 
+*/
+static sqlite3_mutex *debugMutexAlloc(int id){
+  static sqlite3_debug_mutex aStatic[6];
+  sqlite3_debug_mutex *pNew = 0;
+  switch( id ){
+    case SQLITE_MUTEX_FAST:
+    case SQLITE_MUTEX_RECURSIVE: {
+      pNew = sqlite3Malloc(sizeof(*pNew));
+      if( pNew ){
+        pNew->id = id;
+        pNew->cnt = 0;
+      }
+      break;
+    }
+    default: {
+      assert( id-2 >= 0 );
+      assert( id-2 < (int)(sizeof(aStatic)/sizeof(aStatic[0])) );
+      pNew = &aStatic[id-2];
+      pNew->id = id;
+      break;
+    }
+  }
+  return (sqlite3_mutex*)pNew;
+}
+
+/*
+** This routine deallocates a previously allocated mutex.
+*/
+static void debugMutexFree(sqlite3_mutex *pX){
+  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;
+  assert( p->cnt==0 );
+  assert( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE );
+  sqlite3_free(p);
+}
+
+/*
+** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
+** to enter a mutex.  If another thread is already within the mutex,
+** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
+** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK
+** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can
+** be entered multiple times by the same thread.  In such cases the,
+** mutex must be exited an equal number of times before another thread
+** can enter.  If the same thread tries to enter any other kind of mutex
+** more than once, the behavior is undefined.
+*/
+static void debugMutexEnter(sqlite3_mutex *pX){
+  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;
+  assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(pX) );
+  p->cnt++;
+}
+static int debugMutexTry(sqlite3_mutex *pX){
+  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;
+  assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(pX) );
+  p->cnt++;
+  return SQLITE_OK;
+}
+
+/*
+** The sqlite3_mutex_leave() routine exits a mutex that was
+** previously entered by the same thread.  The behavior
+** is undefined if the mutex is not currently entered or
+** is not currently allocated.  SQLite will never do either.
+*/
+static void debugMutexLeave(sqlite3_mutex *pX){
+  sqlite3_debug_mutex *p = (sqlite3_debug_mutex*)pX;
+  assert( debugMutexHeld(pX) );
+  p->cnt--;
+  assert( p->id==SQLITE_MUTEX_RECURSIVE || debugMutexNotheld(pX) );
+}
+
+SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3NoopMutex(void){
+  static const sqlite3_mutex_methods sMutex = {
+    debugMutexInit,
+    debugMutexEnd,
+    debugMutexAlloc,
+    debugMutexFree,
+    debugMutexEnter,
+    debugMutexTry,
+    debugMutexLeave,
+
+    debugMutexHeld,
+    debugMutexNotheld
+  };
+
+  return &sMutex;
+}
+#endif /* SQLITE_DEBUG */
+
+/*
+** If compiled with SQLITE_MUTEX_NOOP, then the no-op mutex implementation
+** is used regardless of the run-time threadsafety setting.
+*/
+#ifdef SQLITE_MUTEX_NOOP
+SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
+  return sqlite3NoopMutex();
+}
+#endif /* SQLITE_MUTEX_NOOP */
+#endif /* SQLITE_MUTEX_OMIT */
+
+/************** End of mutex_noop.c ******************************************/
+/************** Begin file mutex_os2.c ***************************************/
+/*
+** 2007 August 28
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the C functions that implement mutexes for OS/2
+*/
+
+/*
+** The code in this file is only used if SQLITE_MUTEX_OS2 is defined.
+** See the mutex.h file for details.
+*/
+#ifdef SQLITE_MUTEX_OS2
+
+/********************** OS/2 Mutex Implementation **********************
+**
+** This implementation of mutexes is built using the OS/2 API.
+*/
+
+/*
+** The mutex object
+** Each recursive mutex is an instance of the following structure.
+*/
+struct sqlite3_mutex {
+  HMTX mutex;       /* Mutex controlling the lock */
+  int  id;          /* Mutex type */
+#ifdef SQLITE_DEBUG
+ int   trace;       /* True to trace changes */
+#endif
+};
+
+#ifdef SQLITE_DEBUG
+#define SQLITE3_MUTEX_INITIALIZER { 0, 0, 0 }
+#else
+#define SQLITE3_MUTEX_INITIALIZER { 0, 0 }
+#endif
+
+/*
+** Initialize and deinitialize the mutex subsystem.
+*/
+static int os2MutexInit(void){ return SQLITE_OK; }
+static int os2MutexEnd(void){ return SQLITE_OK; }
+
+/*
+** The sqlite3_mutex_alloc() routine allocates a new
+** mutex and returns a pointer to it.  If it returns NULL
+** that means that a mutex could not be allocated. 
+** SQLite will unwind its stack and return an error.  The argument
+** to sqlite3_mutex_alloc() is one of these integer constants:
+**
+** <ul>
+** <li>  SQLITE_MUTEX_FAST
+** <li>  SQLITE_MUTEX_RECURSIVE
+** <li>  SQLITE_MUTEX_STATIC_MASTER
+** <li>  SQLITE_MUTEX_STATIC_MEM
+** <li>  SQLITE_MUTEX_STATIC_MEM2
+** <li>  SQLITE_MUTEX_STATIC_PRNG
+** <li>  SQLITE_MUTEX_STATIC_LRU
+** <li>  SQLITE_MUTEX_STATIC_LRU2
+** </ul>
+**
+** The first two constants cause sqlite3_mutex_alloc() to create
+** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
+** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
+** The mutex implementation does not need to make a distinction
+** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
+** not want to.  But SQLite will only request a recursive mutex in
+** cases where it really needs one.  If a faster non-recursive mutex
+** implementation is available on the host platform, the mutex subsystem
+** might return such a mutex in response to SQLITE_MUTEX_FAST.
+**
+** The other allowed parameters to sqlite3_mutex_alloc() each return
+** a pointer to a static preexisting mutex.  Six static mutexes are
+** used by the current version of SQLite.  Future versions of SQLite
+** may add additional static mutexes.  Static mutexes are for internal
+** use by SQLite only.  Applications that use SQLite mutexes should
+** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
+** SQLITE_MUTEX_RECURSIVE.
+**
+** Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
+** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
+** returns a different mutex on every call.  But for the static
+** mutex types, the same mutex is returned on every call that has
+** the same type number.
+*/
+static sqlite3_mutex *os2MutexAlloc(int iType){
+  sqlite3_mutex *p = NULL;
+  switch( iType ){
+    case SQLITE_MUTEX_FAST:
+    case SQLITE_MUTEX_RECURSIVE: {
+      p = sqlite3MallocZero( sizeof(*p) );
+      if( p ){
+        p->id = iType;
+        if( DosCreateMutexSem( 0, &p->mutex, 0, FALSE ) != NO_ERROR ){
+          sqlite3_free( p );
+          p = NULL;
+        }
+      }
+      break;
+    }
+    default: {
+      static volatile int isInit = 0;
+      static sqlite3_mutex staticMutexes[6] = {
+        SQLITE3_MUTEX_INITIALIZER,
+        SQLITE3_MUTEX_INITIALIZER,
+        SQLITE3_MUTEX_INITIALIZER,
+        SQLITE3_MUTEX_INITIALIZER,
+        SQLITE3_MUTEX_INITIALIZER,
+        SQLITE3_MUTEX_INITIALIZER,
+      };
+      if ( !isInit ){
+        APIRET rc;
+        PTIB ptib;
+        PPIB ppib;
+        HMTX mutex;
+        char name[32];
+        DosGetInfoBlocks( &ptib, &ppib );
+        sqlite3_snprintf( sizeof(name), name, "\\SEM32\\SQLITE%04x",
+                          ppib->pib_ulpid );
+        while( !isInit ){
+          mutex = 0;
+          rc = DosCreateMutexSem( name, &mutex, 0, FALSE);
+          if( rc == NO_ERROR ){
+            unsigned int i;
+            if( !isInit ){
+              for( i = 0; i < sizeof(staticMutexes)/sizeof(staticMutexes[0]); i++ ){
+                DosCreateMutexSem( 0, &staticMutexes[i].mutex, 0, FALSE );
+              }
+              isInit = 1;
+            }
+            DosCloseMutexSem( mutex );
+          }else if( rc == ERROR_DUPLICATE_NAME ){
+            DosSleep( 1 );
+          }else{
+            return p;
+          }
+        }
+      }
+      assert( iType-2 >= 0 );
+      assert( iType-2 < sizeof(staticMutexes)/sizeof(staticMutexes[0]) );
+      p = &staticMutexes[iType-2];
+      p->id = iType;
+      break;
+    }
+  }
+  return p;
+}
+
+
+/*
+** This routine deallocates a previously allocated mutex.
+** SQLite is careful to deallocate every mutex that it allocates.
+*/
+static void os2MutexFree(sqlite3_mutex *p){
+#ifdef SQLITE_DEBUG
+  TID tid;
+  PID pid;
+  ULONG ulCount;
+  DosQueryMutexSem(p->mutex, &pid, &tid, &ulCount);
+  assert( ulCount==0 );
+  assert( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE );
+#endif
+  DosCloseMutexSem( p->mutex );
+  sqlite3_free( p );
+}
+
+#ifdef SQLITE_DEBUG
+/*
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
+** intended for use inside assert() statements.
+*/
+static int os2MutexHeld(sqlite3_mutex *p){
+  TID tid;
+  PID pid;
+  ULONG ulCount;
+  PTIB ptib;
+  DosQueryMutexSem(p->mutex, &pid, &tid, &ulCount);
+  if( ulCount==0 || ( ulCount>1 && p->id!=SQLITE_MUTEX_RECURSIVE ) )
+    return 0;
+  DosGetInfoBlocks(&ptib, NULL);
+  return tid==ptib->tib_ptib2->tib2_ultid;
+}
+static int os2MutexNotheld(sqlite3_mutex *p){
+  TID tid;
+  PID pid;
+  ULONG ulCount;
+  PTIB ptib;
+  DosQueryMutexSem(p->mutex, &pid, &tid, &ulCount);
+  if( ulCount==0 )
+    return 1;
+  DosGetInfoBlocks(&ptib, NULL);
+  return tid!=ptib->tib_ptib2->tib2_ultid;
+}
+static void os2MutexTrace(sqlite3_mutex *p, char *pAction){
+  TID   tid;
+  PID   pid;
+  ULONG ulCount;
+  DosQueryMutexSem(p->mutex, &pid, &tid, &ulCount);
+  printf("%s mutex %p (%d) with nRef=%ld\n", pAction, (void*)p, p->trace, ulCount);
+}
+#endif
+
+/*
+** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
+** to enter a mutex.  If another thread is already within the mutex,
+** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
+** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK
+** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can
+** be entered multiple times by the same thread.  In such cases the,
+** mutex must be exited an equal number of times before another thread
+** can enter.  If the same thread tries to enter any other kind of mutex
+** more than once, the behavior is undefined.
+*/
+static void os2MutexEnter(sqlite3_mutex *p){
+  assert( p->id==SQLITE_MUTEX_RECURSIVE || os2MutexNotheld(p) );
+  DosRequestMutexSem(p->mutex, SEM_INDEFINITE_WAIT);
+#ifdef SQLITE_DEBUG
+  if( p->trace ) os2MutexTrace(p, "enter");
+#endif
+}
+static int os2MutexTry(sqlite3_mutex *p){
+  int rc = SQLITE_BUSY;
+  assert( p->id==SQLITE_MUTEX_RECURSIVE || os2MutexNotheld(p) );
+  if( DosRequestMutexSem(p->mutex, SEM_IMMEDIATE_RETURN) == NO_ERROR ) {
+    rc = SQLITE_OK;
+#ifdef SQLITE_DEBUG
+    if( p->trace ) os2MutexTrace(p, "try");
+#endif
+  }
+  return rc;
+}
+
+/*
+** The sqlite3_mutex_leave() routine exits a mutex that was
+** previously entered by the same thread.  The behavior
+** is undefined if the mutex is not currently entered or
+** is not currently allocated.  SQLite will never do either.
+*/
+static void os2MutexLeave(sqlite3_mutex *p){
+  assert( os2MutexHeld(p) );
+  DosReleaseMutexSem(p->mutex);
+#ifdef SQLITE_DEBUG
+  if( p->trace ) os2MutexTrace(p, "leave");
+#endif
+}
+
+SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
+  static const sqlite3_mutex_methods sMutex = {
+    os2MutexInit,
+    os2MutexEnd,
+    os2MutexAlloc,
+    os2MutexFree,
+    os2MutexEnter,
+    os2MutexTry,
+    os2MutexLeave,
+#ifdef SQLITE_DEBUG
+    os2MutexHeld,
+    os2MutexNotheld
+#else
+    0,
+    0
+#endif
+  };
+
+  return &sMutex;
+}
+#endif /* SQLITE_MUTEX_OS2 */
+
+/************** End of mutex_os2.c *******************************************/
+/************** Begin file mutex_unix.c **************************************/
+/*
+** 2007 August 28
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the C functions that implement mutexes for pthreads
+*/
+
+/*
+** The code in this file is only used if we are compiling threadsafe
+** under unix with pthreads.
+**
+** Note that this implementation requires a version of pthreads that
+** supports recursive mutexes.
+*/
+#ifdef SQLITE_MUTEX_PTHREADS
+
+#include <pthread.h>
+
+/*
+** The sqlite3_mutex.id, sqlite3_mutex.nRef, and sqlite3_mutex.owner fields
+** are necessary under two condidtions:  (1) Debug builds and (2) using
+** home-grown mutexes.  Encapsulate these conditions into a single #define.
+*/
+#if defined(SQLITE_DEBUG) || defined(SQLITE_HOMEGROWN_RECURSIVE_MUTEX)
+# define SQLITE_MUTEX_NREF 1
+#else
+# define SQLITE_MUTEX_NREF 0
+#endif
+
+/*
+** Each recursive mutex is an instance of the following structure.
+*/
+struct sqlite3_mutex {
+  pthread_mutex_t mutex;     /* Mutex controlling the lock */
+#if SQLITE_MUTEX_NREF
+  int id;                    /* Mutex type */
+  volatile int nRef;         /* Number of entrances */
+  volatile pthread_t owner;  /* Thread that is within this mutex */
+  int trace;                 /* True to trace changes */
+#endif
+};
+#if SQLITE_MUTEX_NREF
+#define SQLITE3_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER, 0, 0, (pthread_t)0, 0 }
+#else
+#define SQLITE3_MUTEX_INITIALIZER { PTHREAD_MUTEX_INITIALIZER }
+#endif
+
+/*
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
+** intended for use only inside assert() statements.  On some platforms,
+** there might be race conditions that can cause these routines to
+** deliver incorrect results.  In particular, if pthread_equal() is
+** not an atomic operation, then these routines might delivery
+** incorrect results.  On most platforms, pthread_equal() is a 
+** comparison of two integers and is therefore atomic.  But we are
+** told that HPUX is not such a platform.  If so, then these routines
+** will not always work correctly on HPUX.
+**
+** On those platforms where pthread_equal() is not atomic, SQLite
+** should be compiled without -DSQLITE_DEBUG and with -DNDEBUG to
+** make sure no assert() statements are evaluated and hence these
+** routines are never called.
+*/
+#if !defined(NDEBUG) || defined(SQLITE_DEBUG)
+static int pthreadMutexHeld(sqlite3_mutex *p){
+  return (p->nRef!=0 && pthread_equal(p->owner, pthread_self()));
+}
+static int pthreadMutexNotheld(sqlite3_mutex *p){
+  return p->nRef==0 || pthread_equal(p->owner, pthread_self())==0;
+}
+#endif
+
+/*
+** Initialize and deinitialize the mutex subsystem.
+*/
+static int pthreadMutexInit(void){ return SQLITE_OK; }
+static int pthreadMutexEnd(void){ return SQLITE_OK; }
+
+/*
+** The sqlite3_mutex_alloc() routine allocates a new
+** mutex and returns a pointer to it.  If it returns NULL
+** that means that a mutex could not be allocated.  SQLite
+** will unwind its stack and return an error.  The argument
+** to sqlite3_mutex_alloc() is one of these integer constants:
+**
+** <ul>
+** <li>  SQLITE_MUTEX_FAST
+** <li>  SQLITE_MUTEX_RECURSIVE
+** <li>  SQLITE_MUTEX_STATIC_MASTER
+** <li>  SQLITE_MUTEX_STATIC_MEM
+** <li>  SQLITE_MUTEX_STATIC_MEM2
+** <li>  SQLITE_MUTEX_STATIC_PRNG
+** <li>  SQLITE_MUTEX_STATIC_LRU
+** <li>  SQLITE_MUTEX_STATIC_PMEM
+** </ul>
+**
+** The first two constants cause sqlite3_mutex_alloc() to create
+** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
+** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
+** The mutex implementation does not need to make a distinction
+** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
+** not want to.  But SQLite will only request a recursive mutex in
+** cases where it really needs one.  If a faster non-recursive mutex
+** implementation is available on the host platform, the mutex subsystem
+** might return such a mutex in response to SQLITE_MUTEX_FAST.
+**
+** The other allowed parameters to sqlite3_mutex_alloc() each return
+** a pointer to a static preexisting mutex.  Six static mutexes are
+** used by the current version of SQLite.  Future versions of SQLite
+** may add additional static mutexes.  Static mutexes are for internal
+** use by SQLite only.  Applications that use SQLite mutexes should
+** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
+** SQLITE_MUTEX_RECURSIVE.
+**
+** Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
+** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
+** returns a different mutex on every call.  But for the static 
+** mutex types, the same mutex is returned on every call that has
+** the same type number.
+*/
+static sqlite3_mutex *pthreadMutexAlloc(int iType){
+  static sqlite3_mutex staticMutexes[] = {
+    SQLITE3_MUTEX_INITIALIZER,
+    SQLITE3_MUTEX_INITIALIZER,
+    SQLITE3_MUTEX_INITIALIZER,
+    SQLITE3_MUTEX_INITIALIZER,
+    SQLITE3_MUTEX_INITIALIZER,
+    SQLITE3_MUTEX_INITIALIZER
+  };
+  sqlite3_mutex *p;
+  switch( iType ){
+    case SQLITE_MUTEX_RECURSIVE: {
+      p = sqlite3MallocZero( sizeof(*p) );
+      if( p ){
+#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
+        /* If recursive mutexes are not available, we will have to
+        ** build our own.  See below. */
+        pthread_mutex_init(&p->mutex, 0);
+#else
+        /* Use a recursive mutex if it is available */
+        pthread_mutexattr_t recursiveAttr;
+        pthread_mutexattr_init(&recursiveAttr);
+        pthread_mutexattr_settype(&recursiveAttr, PTHREAD_MUTEX_RECURSIVE);
+        pthread_mutex_init(&p->mutex, &recursiveAttr);
+        pthread_mutexattr_destroy(&recursiveAttr);
+#endif
+#if SQLITE_MUTEX_NREF
+        p->id = iType;
+#endif
+      }
+      break;
+    }
+    case SQLITE_MUTEX_FAST: {
+      p = sqlite3MallocZero( sizeof(*p) );
+      if( p ){
+#if SQLITE_MUTEX_NREF
+        p->id = iType;
+#endif
+        pthread_mutex_init(&p->mutex, 0);
+      }
+      break;
+    }
+    default: {
+      assert( iType-2 >= 0 );
+      assert( iType-2 < ArraySize(staticMutexes) );
+      p = &staticMutexes[iType-2];
+#if SQLITE_MUTEX_NREF
+      p->id = iType;
+#endif
+      break;
+    }
+  }
+  return p;
+}
+
+
+/*
+** This routine deallocates a previously
+** allocated mutex.  SQLite is careful to deallocate every
+** mutex that it allocates.
+*/
+static void pthreadMutexFree(sqlite3_mutex *p){
+  assert( p->nRef==0 );
+  assert( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE );
+  pthread_mutex_destroy(&p->mutex);
+  sqlite3_free(p);
+}
+
+/*
+** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
+** to enter a mutex.  If another thread is already within the mutex,
+** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
+** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK
+** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can
+** be entered multiple times by the same thread.  In such cases the,
+** mutex must be exited an equal number of times before another thread
+** can enter.  If the same thread tries to enter any other kind of mutex
+** more than once, the behavior is undefined.
+*/
+static void pthreadMutexEnter(sqlite3_mutex *p){
+  assert( p->id==SQLITE_MUTEX_RECURSIVE || pthreadMutexNotheld(p) );
+
+#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
+  /* If recursive mutexes are not available, then we have to grow
+  ** our own.  This implementation assumes that pthread_equal()
+  ** is atomic - that it cannot be deceived into thinking self
+  ** and p->owner are equal if p->owner changes between two values
+  ** that are not equal to self while the comparison is taking place.
+  ** This implementation also assumes a coherent cache - that 
+  ** separate processes cannot read different values from the same
+  ** address at the same time.  If either of these two conditions
+  ** are not met, then the mutexes will fail and problems will result.
+  */
+  {
+    pthread_t self = pthread_self();
+    if( p->nRef>0 && pthread_equal(p->owner, self) ){
+      p->nRef++;
+    }else{
+      pthread_mutex_lock(&p->mutex);
+      assert( p->nRef==0 );
+      p->owner = self;
+      p->nRef = 1;
+    }
+  }
+#else
+  /* Use the built-in recursive mutexes if they are available.
+  */
+  pthread_mutex_lock(&p->mutex);
+#if SQLITE_MUTEX_NREF
+  assert( p->nRef>0 || p->owner==0 );
+  p->owner = pthread_self();
+  p->nRef++;
+#endif
+#endif
+
+#ifdef SQLITE_DEBUG
+  if( p->trace ){
+    printf("enter mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
+  }
+#endif
+}
+static int pthreadMutexTry(sqlite3_mutex *p){
+  int rc;
+  assert( p->id==SQLITE_MUTEX_RECURSIVE || pthreadMutexNotheld(p) );
+
+#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
+  /* If recursive mutexes are not available, then we have to grow
+  ** our own.  This implementation assumes that pthread_equal()
+  ** is atomic - that it cannot be deceived into thinking self
+  ** and p->owner are equal if p->owner changes between two values
+  ** that are not equal to self while the comparison is taking place.
+  ** This implementation also assumes a coherent cache - that 
+  ** separate processes cannot read different values from the same
+  ** address at the same time.  If either of these two conditions
+  ** are not met, then the mutexes will fail and problems will result.
+  */
+  {
+    pthread_t self = pthread_self();
+    if( p->nRef>0 && pthread_equal(p->owner, self) ){
+      p->nRef++;
+      rc = SQLITE_OK;
+    }else if( pthread_mutex_trylock(&p->mutex)==0 ){
+      assert( p->nRef==0 );
+      p->owner = self;
+      p->nRef = 1;
+      rc = SQLITE_OK;
+    }else{
+      rc = SQLITE_BUSY;
+    }
+  }
+#else
+  /* Use the built-in recursive mutexes if they are available.
+  */
+  if( pthread_mutex_trylock(&p->mutex)==0 ){
+#if SQLITE_MUTEX_NREF
+    p->owner = pthread_self();
+    p->nRef++;
+#endif
+    rc = SQLITE_OK;
+  }else{
+    rc = SQLITE_BUSY;
+  }
+#endif
+
+#ifdef SQLITE_DEBUG
+  if( rc==SQLITE_OK && p->trace ){
+    printf("enter mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
+  }
+#endif
+  return rc;
+}
+
+/*
+** The sqlite3_mutex_leave() routine exits a mutex that was
+** previously entered by the same thread.  The behavior
+** is undefined if the mutex is not currently entered or
+** is not currently allocated.  SQLite will never do either.
+*/
+static void pthreadMutexLeave(sqlite3_mutex *p){
+  assert( pthreadMutexHeld(p) );
+#if SQLITE_MUTEX_NREF
+  p->nRef--;
+  if( p->nRef==0 ) p->owner = 0;
+#endif
+  assert( p->nRef==0 || p->id==SQLITE_MUTEX_RECURSIVE );
+
+#ifdef SQLITE_HOMEGROWN_RECURSIVE_MUTEX
+  if( p->nRef==0 ){
+    pthread_mutex_unlock(&p->mutex);
+  }
+#else
+  pthread_mutex_unlock(&p->mutex);
+#endif
+
+#ifdef SQLITE_DEBUG
+  if( p->trace ){
+    printf("leave mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
+  }
+#endif
+}
+
+SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
+  static const sqlite3_mutex_methods sMutex = {
+    pthreadMutexInit,
+    pthreadMutexEnd,
+    pthreadMutexAlloc,
+    pthreadMutexFree,
+    pthreadMutexEnter,
+    pthreadMutexTry,
+    pthreadMutexLeave,
+#ifdef SQLITE_DEBUG
+    pthreadMutexHeld,
+    pthreadMutexNotheld
+#else
+    0,
+    0
+#endif
+  };
+
+  return &sMutex;
+}
+
+#endif /* SQLITE_MUTEX_PTHREAD */
+
+/************** End of mutex_unix.c ******************************************/
+/************** Begin file mutex_w32.c ***************************************/
+/*
+** 2007 August 14
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the C functions that implement mutexes for win32
+*/
+
+/*
+** The code in this file is only used if we are compiling multithreaded
+** on a win32 system.
+*/
+#ifdef SQLITE_MUTEX_W32
+
+/*
+** Each recursive mutex is an instance of the following structure.
+*/
+struct sqlite3_mutex {
+  CRITICAL_SECTION mutex;    /* Mutex controlling the lock */
+  int id;                    /* Mutex type */
+#ifdef SQLITE_DEBUG
+  volatile int nRef;         /* Number of enterances */
+  volatile DWORD owner;      /* Thread holding this mutex */
+  int trace;                 /* True to trace changes */
+#endif
+};
+#define SQLITE_W32_MUTEX_INITIALIZER { 0 }
+#ifdef SQLITE_DEBUG
+#define SQLITE3_MUTEX_INITIALIZER { SQLITE_W32_MUTEX_INITIALIZER, 0, 0L, (DWORD)0, 0 }
+#else
+#define SQLITE3_MUTEX_INITIALIZER { SQLITE_W32_MUTEX_INITIALIZER, 0 }
+#endif
+
+/*
+** Return true (non-zero) if we are running under WinNT, Win2K, WinXP,
+** or WinCE.  Return false (zero) for Win95, Win98, or WinME.
+**
+** Here is an interesting observation:  Win95, Win98, and WinME lack
+** the LockFileEx() API.  But we can still statically link against that
+** API as long as we don't call it win running Win95/98/ME.  A call to
+** this routine is used to determine if the host is Win95/98/ME or
+** WinNT/2K/XP so that we will know whether or not we can safely call
+** the LockFileEx() API.
+**
+** mutexIsNT() is only used for the TryEnterCriticalSection() API call,
+** which is only available if your application was compiled with 
+** _WIN32_WINNT defined to a value >= 0x0400.  Currently, the only
+** call to TryEnterCriticalSection() is #ifdef'ed out, so #ifdef 
+** this out as well.
+*/
+#if 0
+#if SQLITE_OS_WINCE
+# define mutexIsNT()  (1)
+#else
+  static int mutexIsNT(void){
+    static int osType = 0;
+    if( osType==0 ){
+      OSVERSIONINFO sInfo;
+      sInfo.dwOSVersionInfoSize = sizeof(sInfo);
+      GetVersionEx(&sInfo);
+      osType = sInfo.dwPlatformId==VER_PLATFORM_WIN32_NT ? 2 : 1;
+    }
+    return osType==2;
+  }
+#endif /* SQLITE_OS_WINCE */
+#endif
+
+#ifdef SQLITE_DEBUG
+/*
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routine are
+** intended for use only inside assert() statements.
+*/
+static int winMutexHeld(sqlite3_mutex *p){
+  return p->nRef!=0 && p->owner==GetCurrentThreadId();
+}
+static int winMutexNotheld2(sqlite3_mutex *p, DWORD tid){
+  return p->nRef==0 || p->owner!=tid;
+}
+static int winMutexNotheld(sqlite3_mutex *p){
+  DWORD tid = GetCurrentThreadId(); 
+  return winMutexNotheld2(p, tid);
+}
+#endif
+
+
+/*
+** Initialize and deinitialize the mutex subsystem.
+*/
+static sqlite3_mutex winMutex_staticMutexes[6] = {
+  SQLITE3_MUTEX_INITIALIZER,
+  SQLITE3_MUTEX_INITIALIZER,
+  SQLITE3_MUTEX_INITIALIZER,
+  SQLITE3_MUTEX_INITIALIZER,
+  SQLITE3_MUTEX_INITIALIZER,
+  SQLITE3_MUTEX_INITIALIZER
+};
+static int winMutex_isInit = 0;
+/* As winMutexInit() and winMutexEnd() are called as part
+** of the sqlite3_initialize and sqlite3_shutdown()
+** processing, the "interlocked" magic is probably not
+** strictly necessary.
+*/
+static long winMutex_lock = 0;
+
+static int winMutexInit(void){ 
+  /* The first to increment to 1 does actual initialization */
+  if( InterlockedCompareExchange(&winMutex_lock, 1, 0)==0 ){
+    int i;
+    for(i=0; i<ArraySize(winMutex_staticMutexes); i++){
+      InitializeCriticalSection(&winMutex_staticMutexes[i].mutex);
+    }
+    winMutex_isInit = 1;
+  }else{
+    /* Someone else is in the process of initing the static mutexes */
+    while( !winMutex_isInit ){
+      Sleep(1);
+    }
+  }
+  return SQLITE_OK; 
+}
+
+static int winMutexEnd(void){ 
+  /* The first to decrement to 0 does actual shutdown 
+  ** (which should be the last to shutdown.) */
+  if( InterlockedCompareExchange(&winMutex_lock, 0, 1)==1 ){
+    if( winMutex_isInit==1 ){
+      int i;
+      for(i=0; i<ArraySize(winMutex_staticMutexes); i++){
+        DeleteCriticalSection(&winMutex_staticMutexes[i].mutex);
+      }
+      winMutex_isInit = 0;
+    }
+  }
+  return SQLITE_OK; 
+}
+
+/*
+** The sqlite3_mutex_alloc() routine allocates a new
+** mutex and returns a pointer to it.  If it returns NULL
+** that means that a mutex could not be allocated.  SQLite
+** will unwind its stack and return an error.  The argument
+** to sqlite3_mutex_alloc() is one of these integer constants:
+**
+** <ul>
+** <li>  SQLITE_MUTEX_FAST
+** <li>  SQLITE_MUTEX_RECURSIVE
+** <li>  SQLITE_MUTEX_STATIC_MASTER
+** <li>  SQLITE_MUTEX_STATIC_MEM
+** <li>  SQLITE_MUTEX_STATIC_MEM2
+** <li>  SQLITE_MUTEX_STATIC_PRNG
+** <li>  SQLITE_MUTEX_STATIC_LRU
+** <li>  SQLITE_MUTEX_STATIC_PMEM
+** </ul>
+**
+** The first two constants cause sqlite3_mutex_alloc() to create
+** a new mutex.  The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
+** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
+** The mutex implementation does not need to make a distinction
+** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
+** not want to.  But SQLite will only request a recursive mutex in
+** cases where it really needs one.  If a faster non-recursive mutex
+** implementation is available on the host platform, the mutex subsystem
+** might return such a mutex in response to SQLITE_MUTEX_FAST.
+**
+** The other allowed parameters to sqlite3_mutex_alloc() each return
+** a pointer to a static preexisting mutex.  Six static mutexes are
+** used by the current version of SQLite.  Future versions of SQLite
+** may add additional static mutexes.  Static mutexes are for internal
+** use by SQLite only.  Applications that use SQLite mutexes should
+** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
+** SQLITE_MUTEX_RECURSIVE.
+**
+** Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
+** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
+** returns a different mutex on every call.  But for the static 
+** mutex types, the same mutex is returned on every call that has
+** the same type number.
+*/
+static sqlite3_mutex *winMutexAlloc(int iType){
+  sqlite3_mutex *p;
+
+  switch( iType ){
+    case SQLITE_MUTEX_FAST:
+    case SQLITE_MUTEX_RECURSIVE: {
+      p = sqlite3MallocZero( sizeof(*p) );
+      if( p ){  
+#ifdef SQLITE_DEBUG
+        p->id = iType;
+#endif
+        InitializeCriticalSection(&p->mutex);
+      }
+      break;
+    }
+    default: {
+      assert( winMutex_isInit==1 );
+      assert( iType-2 >= 0 );
+      assert( iType-2 < ArraySize(winMutex_staticMutexes) );
+      p = &winMutex_staticMutexes[iType-2];
+#ifdef SQLITE_DEBUG
+      p->id = iType;
+#endif
+      break;
+    }
+  }
+  return p;
+}
+
+
+/*
+** This routine deallocates a previously
+** allocated mutex.  SQLite is careful to deallocate every
+** mutex that it allocates.
+*/
+static void winMutexFree(sqlite3_mutex *p){
+  assert( p );
+  assert( p->nRef==0 && p->owner==0 );
+  assert( p->id==SQLITE_MUTEX_FAST || p->id==SQLITE_MUTEX_RECURSIVE );
+  DeleteCriticalSection(&p->mutex);
+  sqlite3_free(p);
+}
+
+/*
+** The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
+** to enter a mutex.  If another thread is already within the mutex,
+** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
+** SQLITE_BUSY.  The sqlite3_mutex_try() interface returns SQLITE_OK
+** upon successful entry.  Mutexes created using SQLITE_MUTEX_RECURSIVE can
+** be entered multiple times by the same thread.  In such cases the,
+** mutex must be exited an equal number of times before another thread
+** can enter.  If the same thread tries to enter any other kind of mutex
+** more than once, the behavior is undefined.
+*/
+static void winMutexEnter(sqlite3_mutex *p){
+#ifdef SQLITE_DEBUG
+  DWORD tid = GetCurrentThreadId(); 
+  assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld2(p, tid) );
+#endif
+  EnterCriticalSection(&p->mutex);
+#ifdef SQLITE_DEBUG
+  assert( p->nRef>0 || p->owner==0 );
+  p->owner = tid; 
+  p->nRef++;
+  if( p->trace ){
+    printf("enter mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
+  }
+#endif
+}
+static int winMutexTry(sqlite3_mutex *p){
+#ifndef NDEBUG
+  DWORD tid = GetCurrentThreadId(); 
+#endif
+  int rc = SQLITE_BUSY;
+  assert( p->id==SQLITE_MUTEX_RECURSIVE || winMutexNotheld2(p, tid) );
+  /*
+  ** The sqlite3_mutex_try() routine is very rarely used, and when it
+  ** is used it is merely an optimization.  So it is OK for it to always
+  ** fail.  
+  **
+  ** The TryEnterCriticalSection() interface is only available on WinNT.
+  ** And some windows compilers complain if you try to use it without
+  ** first doing some #defines that prevent SQLite from building on Win98.
+  ** For that reason, we will omit this optimization for now.  See
+  ** ticket #2685.
+  */
+#if 0
+  if( mutexIsNT() && TryEnterCriticalSection(&p->mutex) ){
+    p->owner = tid;
+    p->nRef++;
+    rc = SQLITE_OK;
+  }
+#else
+  UNUSED_PARAMETER(p);
+#endif
+#ifdef SQLITE_DEBUG
+  if( rc==SQLITE_OK && p->trace ){
+    printf("try mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
+  }
+#endif
+  return rc;
+}
+
+/*
+** The sqlite3_mutex_leave() routine exits a mutex that was
+** previously entered by the same thread.  The behavior
+** is undefined if the mutex is not currently entered or
+** is not currently allocated.  SQLite will never do either.
+*/
+static void winMutexLeave(sqlite3_mutex *p){
+#ifndef NDEBUG
+  DWORD tid = GetCurrentThreadId();
+  assert( p->nRef>0 );
+  assert( p->owner==tid );
+  p->nRef--;
+  if( p->nRef==0 ) p->owner = 0;
+  assert( p->nRef==0 || p->id==SQLITE_MUTEX_RECURSIVE );
+#endif
+  LeaveCriticalSection(&p->mutex);
+#ifdef SQLITE_DEBUG
+  if( p->trace ){
+    printf("leave mutex %p (%d) with nRef=%d\n", p, p->trace, p->nRef);
+  }
+#endif
+}
+
+SQLITE_PRIVATE sqlite3_mutex_methods const *sqlite3DefaultMutex(void){
+  static const sqlite3_mutex_methods sMutex = {
+    winMutexInit,
+    winMutexEnd,
+    winMutexAlloc,
+    winMutexFree,
+    winMutexEnter,
+    winMutexTry,
+    winMutexLeave,
+#ifdef SQLITE_DEBUG
+    winMutexHeld,
+    winMutexNotheld
+#else
+    0,
+    0
+#endif
+  };
+
+  return &sMutex;
+}
+#endif /* SQLITE_MUTEX_W32 */
+
+/************** End of mutex_w32.c *******************************************/
+/************** Begin file malloc.c ******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** Memory allocation functions used throughout sqlite.
+*/
+
+/*
+** Attempt to release up to n bytes of non-essential memory currently
+** held by SQLite. An example of non-essential memory is memory used to
+** cache database pages that are not currently in use.
+*/
+SQLITE_API int sqlite3_release_memory(int n){
+#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
+  return sqlite3PcacheReleaseMemory(n);
+#else
+  /* IMPLEMENTATION-OF: R-34391-24921 The sqlite3_release_memory() routine
+  ** is a no-op returning zero if SQLite is not compiled with
+  ** SQLITE_ENABLE_MEMORY_MANAGEMENT. */
+  UNUSED_PARAMETER(n);
+  return 0;
+#endif
+}
+
+/*
+** An instance of the following object records the location of
+** each unused scratch buffer.
+*/
+typedef struct ScratchFreeslot {
+  struct ScratchFreeslot *pNext;   /* Next unused scratch buffer */
+} ScratchFreeslot;
+
+/*
+** State information local to the memory allocation subsystem.
+*/
+static SQLITE_WSD struct Mem0Global {
+  sqlite3_mutex *mutex;         /* Mutex to serialize access */
+
+  /*
+  ** The alarm callback and its arguments.  The mem0.mutex lock will
+  ** be held while the callback is running.  Recursive calls into
+  ** the memory subsystem are allowed, but no new callbacks will be
+  ** issued.
+  */
+  sqlite3_int64 alarmThreshold;
+  void (*alarmCallback)(void*, sqlite3_int64,int);
+  void *alarmArg;
+
+  /*
+  ** Pointers to the end of sqlite3GlobalConfig.pScratch memory
+  ** (so that a range test can be used to determine if an allocation
+  ** being freed came from pScratch) and a pointer to the list of
+  ** unused scratch allocations.
+  */
+  void *pScratchEnd;
+  ScratchFreeslot *pScratchFree;
+  u32 nScratchFree;
+
+  /*
+  ** True if heap is nearly "full" where "full" is defined by the
+  ** sqlite3_soft_heap_limit() setting.
+  */
+  int nearlyFull;
+} mem0 = { 0, 0, 0, 0, 0, 0, 0, 0 };
+
+#define mem0 GLOBAL(struct Mem0Global, mem0)
+
+/*
+** This routine runs when the memory allocator sees that the
+** total memory allocation is about to exceed the soft heap
+** limit.
+*/
+static void softHeapLimitEnforcer(
+  void *NotUsed, 
+  sqlite3_int64 NotUsed2,
+  int allocSize
+){
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  sqlite3_release_memory(allocSize);
+}
+
+/*
+** Change the alarm callback
+*/
+static int sqlite3MemoryAlarm(
+  void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
+  void *pArg,
+  sqlite3_int64 iThreshold
+){
+  int nUsed;
+  sqlite3_mutex_enter(mem0.mutex);
+  mem0.alarmCallback = xCallback;
+  mem0.alarmArg = pArg;
+  mem0.alarmThreshold = iThreshold;
+  nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
+  mem0.nearlyFull = (iThreshold>0 && iThreshold<=nUsed);
+  sqlite3_mutex_leave(mem0.mutex);
+  return SQLITE_OK;
+}
+
+#ifndef SQLITE_OMIT_DEPRECATED
+/*
+** Deprecated external interface.  Internal/core SQLite code
+** should call sqlite3MemoryAlarm.
+*/
+SQLITE_API int sqlite3_memory_alarm(
+  void(*xCallback)(void *pArg, sqlite3_int64 used,int N),
+  void *pArg,
+  sqlite3_int64 iThreshold
+){
+  return sqlite3MemoryAlarm(xCallback, pArg, iThreshold);
+}
+#endif
+
+/*
+** Set the soft heap-size limit for the library. Passing a zero or 
+** negative value indicates no limit.
+*/
+SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 n){
+  sqlite3_int64 priorLimit;
+  sqlite3_int64 excess;
+#ifndef SQLITE_OMIT_AUTOINIT
+  sqlite3_initialize();
+#endif
+  sqlite3_mutex_enter(mem0.mutex);
+  priorLimit = mem0.alarmThreshold;
+  sqlite3_mutex_leave(mem0.mutex);
+  if( n<0 ) return priorLimit;
+  if( n>0 ){
+    sqlite3MemoryAlarm(softHeapLimitEnforcer, 0, n);
+  }else{
+    sqlite3MemoryAlarm(0, 0, 0);
+  }
+  excess = sqlite3_memory_used() - n;
+  if( excess>0 ) sqlite3_release_memory((int)(excess & 0x7fffffff));
+  return priorLimit;
+}
+SQLITE_API void sqlite3_soft_heap_limit(int n){
+  if( n<0 ) n = 0;
+  sqlite3_soft_heap_limit64(n);
+}
+
+/*
+** Initialize the memory allocation subsystem.
+*/
+SQLITE_PRIVATE int sqlite3MallocInit(void){
+  if( sqlite3GlobalConfig.m.xMalloc==0 ){
+    sqlite3MemSetDefault();
+  }
+  memset(&mem0, 0, sizeof(mem0));
+  if( sqlite3GlobalConfig.bCoreMutex ){
+    mem0.mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MEM);
+  }
+  if( sqlite3GlobalConfig.pScratch && sqlite3GlobalConfig.szScratch>=100
+      && sqlite3GlobalConfig.nScratch>0 ){
+    int i, n, sz;
+    ScratchFreeslot *pSlot;
+    sz = ROUNDDOWN8(sqlite3GlobalConfig.szScratch);
+    sqlite3GlobalConfig.szScratch = sz;
+    pSlot = (ScratchFreeslot*)sqlite3GlobalConfig.pScratch;
+    n = sqlite3GlobalConfig.nScratch;
+    mem0.pScratchFree = pSlot;
+    mem0.nScratchFree = n;
+    for(i=0; i<n-1; i++){
+      pSlot->pNext = (ScratchFreeslot*)(sz+(char*)pSlot);
+      pSlot = pSlot->pNext;
+    }
+    pSlot->pNext = 0;
+    mem0.pScratchEnd = (void*)&pSlot[1];
+  }else{
+    mem0.pScratchEnd = 0;
+    sqlite3GlobalConfig.pScratch = 0;
+    sqlite3GlobalConfig.szScratch = 0;
+    sqlite3GlobalConfig.nScratch = 0;
+  }
+  if( sqlite3GlobalConfig.pPage==0 || sqlite3GlobalConfig.szPage<512
+      || sqlite3GlobalConfig.nPage<1 ){
+    sqlite3GlobalConfig.pPage = 0;
+    sqlite3GlobalConfig.szPage = 0;
+    sqlite3GlobalConfig.nPage = 0;
+  }
+  return sqlite3GlobalConfig.m.xInit(sqlite3GlobalConfig.m.pAppData);
+}
+
+/*
+** Return true if the heap is currently under memory pressure - in other
+** words if the amount of heap used is close to the limit set by
+** sqlite3_soft_heap_limit().
+*/
+SQLITE_PRIVATE int sqlite3HeapNearlyFull(void){
+  return mem0.nearlyFull;
+}
+
+/*
+** Deinitialize the memory allocation subsystem.
+*/
+SQLITE_PRIVATE void sqlite3MallocEnd(void){
+  if( sqlite3GlobalConfig.m.xShutdown ){
+    sqlite3GlobalConfig.m.xShutdown(sqlite3GlobalConfig.m.pAppData);
+  }
+  memset(&mem0, 0, sizeof(mem0));
+}
+
+/*
+** Return the amount of memory currently checked out.
+*/
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void){
+  int n, mx;
+  sqlite3_int64 res;
+  sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, 0);
+  res = (sqlite3_int64)n;  /* Work around bug in Borland C. Ticket #3216 */
+  return res;
+}
+
+/*
+** Return the maximum amount of memory that has ever been
+** checked out since either the beginning of this process
+** or since the most recent reset.
+*/
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag){
+  int n, mx;
+  sqlite3_int64 res;
+  sqlite3_status(SQLITE_STATUS_MEMORY_USED, &n, &mx, resetFlag);
+  res = (sqlite3_int64)mx;  /* Work around bug in Borland C. Ticket #3216 */
+  return res;
+}
+
+/*
+** Trigger the alarm 
+*/
+static void sqlite3MallocAlarm(int nByte){
+  void (*xCallback)(void*,sqlite3_int64,int);
+  sqlite3_int64 nowUsed;
+  void *pArg;
+  if( mem0.alarmCallback==0 ) return;
+  xCallback = mem0.alarmCallback;
+  nowUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
+  pArg = mem0.alarmArg;
+  mem0.alarmCallback = 0;
+  sqlite3_mutex_leave(mem0.mutex);
+  xCallback(pArg, nowUsed, nByte);
+  sqlite3_mutex_enter(mem0.mutex);
+  mem0.alarmCallback = xCallback;
+  mem0.alarmArg = pArg;
+}
+
+/*
+** Do a memory allocation with statistics and alarms.  Assume the
+** lock is already held.
+*/
+static int mallocWithAlarm(int n, void **pp){
+  int nFull;
+  void *p;
+  assert( sqlite3_mutex_held(mem0.mutex) );
+  nFull = sqlite3GlobalConfig.m.xRoundup(n);
+  sqlite3StatusSet(SQLITE_STATUS_MALLOC_SIZE, n);
+  if( mem0.alarmCallback!=0 ){
+    int nUsed = sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED);
+    if( nUsed+nFull >= mem0.alarmThreshold ){
+      mem0.nearlyFull = 1;
+      sqlite3MallocAlarm(nFull);
+    }else{
+      mem0.nearlyFull = 0;
+    }
+  }
+  p = sqlite3GlobalConfig.m.xMalloc(nFull);
+#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
+  if( p==0 && mem0.alarmCallback ){
+    sqlite3MallocAlarm(nFull);
+    p = sqlite3GlobalConfig.m.xMalloc(nFull);
+  }
+#endif
+  if( p ){
+    nFull = sqlite3MallocSize(p);
+    sqlite3StatusAdd(SQLITE_STATUS_MEMORY_USED, nFull);
+    sqlite3StatusAdd(SQLITE_STATUS_MALLOC_COUNT, 1);
+  }
+  *pp = p;
+  return nFull;
+}
+
+/*
+** Allocate memory.  This routine is like sqlite3_malloc() except that it
+** assumes the memory subsystem has already been initialized.
+*/
+SQLITE_PRIVATE void *sqlite3Malloc(int n){
+  void *p;
+  if( n<=0               /* IMP: R-65312-04917 */ 
+   || n>=0x7fffff00
+  ){
+    /* A memory allocation of a number of bytes which is near the maximum
+    ** signed integer value might cause an integer overflow inside of the
+    ** xMalloc().  Hence we limit the maximum size to 0x7fffff00, giving
+    ** 255 bytes of overhead.  SQLite itself will never use anything near
+    ** this amount.  The only way to reach the limit is with sqlite3_malloc() */
+    p = 0;
+  }else if( sqlite3GlobalConfig.bMemstat ){
+    sqlite3_mutex_enter(mem0.mutex);
+    mallocWithAlarm(n, &p);
+    sqlite3_mutex_leave(mem0.mutex);
+  }else{
+    p = sqlite3GlobalConfig.m.xMalloc(n);
+  }
+  assert( EIGHT_BYTE_ALIGNMENT(p) );  /* IMP: R-04675-44850 */
+  return p;
+}
+
+/*
+** This version of the memory allocation is for use by the application.
+** First make sure the memory subsystem is initialized, then do the
+** allocation.
+*/
+SQLITE_API void *sqlite3_malloc(int n){
+#ifndef SQLITE_OMIT_AUTOINIT
+  if( sqlite3_initialize() ) return 0;
+#endif
+  return sqlite3Malloc(n);
+}
+
+/*
+** Each thread may only have a single outstanding allocation from
+** xScratchMalloc().  We verify this constraint in the single-threaded
+** case by setting scratchAllocOut to 1 when an allocation
+** is outstanding clearing it when the allocation is freed.
+*/
+#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
+static int scratchAllocOut = 0;
+#endif
+
+
+/*
+** Allocate memory that is to be used and released right away.
+** This routine is similar to alloca() in that it is not intended
+** for situations where the memory might be held long-term.  This
+** routine is intended to get memory to old large transient data
+** structures that would not normally fit on the stack of an
+** embedded processor.
+*/
+SQLITE_PRIVATE void *sqlite3ScratchMalloc(int n){
+  void *p;
+  assert( n>0 );
+
+  sqlite3_mutex_enter(mem0.mutex);
+  if( mem0.nScratchFree && sqlite3GlobalConfig.szScratch>=n ){
+    p = mem0.pScratchFree;
+    mem0.pScratchFree = mem0.pScratchFree->pNext;
+    mem0.nScratchFree--;
+    sqlite3StatusAdd(SQLITE_STATUS_SCRATCH_USED, 1);
+    sqlite3StatusSet(SQLITE_STATUS_SCRATCH_SIZE, n);
+    sqlite3_mutex_leave(mem0.mutex);
+  }else{
+    if( sqlite3GlobalConfig.bMemstat ){
+      sqlite3StatusSet(SQLITE_STATUS_SCRATCH_SIZE, n);
+      n = mallocWithAlarm(n, &p);
+      if( p ) sqlite3StatusAdd(SQLITE_STATUS_SCRATCH_OVERFLOW, n);
+      sqlite3_mutex_leave(mem0.mutex);
+    }else{
+      sqlite3_mutex_leave(mem0.mutex);
+      p = sqlite3GlobalConfig.m.xMalloc(n);
+    }
+    sqlite3MemdebugSetType(p, MEMTYPE_SCRATCH);
+  }
+  assert( sqlite3_mutex_notheld(mem0.mutex) );
+
+
+#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
+  /* Verify that no more than two scratch allocations per thread
+  ** are outstanding at one time.  (This is only checked in the
+  ** single-threaded case since checking in the multi-threaded case
+  ** would be much more complicated.) */
+  assert( scratchAllocOut<=1 );
+  if( p ) scratchAllocOut++;
+#endif
+
+  return p;
+}
+SQLITE_PRIVATE void sqlite3ScratchFree(void *p){
+  if( p ){
+
+#if SQLITE_THREADSAFE==0 && !defined(NDEBUG)
+    /* Verify that no more than two scratch allocation per thread
+    ** is outstanding at one time.  (This is only checked in the
+    ** single-threaded case since checking in the multi-threaded case
+    ** would be much more complicated.) */
+    assert( scratchAllocOut>=1 && scratchAllocOut<=2 );
+    scratchAllocOut--;
+#endif
+
+    if( p>=sqlite3GlobalConfig.pScratch && p<mem0.pScratchEnd ){
+      /* Release memory from the SQLITE_CONFIG_SCRATCH allocation */
+      ScratchFreeslot *pSlot;
+      pSlot = (ScratchFreeslot*)p;
+      sqlite3_mutex_enter(mem0.mutex);
+      pSlot->pNext = mem0.pScratchFree;
+      mem0.pScratchFree = pSlot;
+      mem0.nScratchFree++;
+      assert( mem0.nScratchFree <= (u32)sqlite3GlobalConfig.nScratch );
+      sqlite3StatusAdd(SQLITE_STATUS_SCRATCH_USED, -1);
+      sqlite3_mutex_leave(mem0.mutex);
+    }else{
+      /* Release memory back to the heap */
+      assert( sqlite3MemdebugHasType(p, MEMTYPE_SCRATCH) );
+      assert( sqlite3MemdebugNoType(p, ~MEMTYPE_SCRATCH) );
+      sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
+      if( sqlite3GlobalConfig.bMemstat ){
+        int iSize = sqlite3MallocSize(p);
+        sqlite3_mutex_enter(mem0.mutex);
+        sqlite3StatusAdd(SQLITE_STATUS_SCRATCH_OVERFLOW, -iSize);
+        sqlite3StatusAdd(SQLITE_STATUS_MEMORY_USED, -iSize);
+        sqlite3StatusAdd(SQLITE_STATUS_MALLOC_COUNT, -1);
+        sqlite3GlobalConfig.m.xFree(p);
+        sqlite3_mutex_leave(mem0.mutex);
+      }else{
+        sqlite3GlobalConfig.m.xFree(p);
+      }
+    }
+  }
+}
+
+/*
+** TRUE if p is a lookaside memory allocation from db
+*/
+#ifndef SQLITE_OMIT_LOOKASIDE
+static int isLookaside(sqlite3 *db, void *p){
+  return p && p>=db->lookaside.pStart && p<db->lookaside.pEnd;
+}
+#else
+#define isLookaside(A,B) 0
+#endif
+
+/*
+** Return the size of a memory allocation previously obtained from
+** sqlite3Malloc() or sqlite3_malloc().
+*/
+SQLITE_PRIVATE int sqlite3MallocSize(void *p){
+  assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
+  assert( sqlite3MemdebugNoType(p, MEMTYPE_DB) );
+  return sqlite3GlobalConfig.m.xSize(p);
+}
+SQLITE_PRIVATE int sqlite3DbMallocSize(sqlite3 *db, void *p){
+  assert( db==0 || sqlite3_mutex_held(db->mutex) );
+  if( db && isLookaside(db, p) ){
+    return db->lookaside.sz;
+  }else{
+    assert( sqlite3MemdebugHasType(p, MEMTYPE_DB) );
+    assert( sqlite3MemdebugHasType(p, MEMTYPE_LOOKASIDE|MEMTYPE_HEAP) );
+    assert( db!=0 || sqlite3MemdebugNoType(p, MEMTYPE_LOOKASIDE) );
+    return sqlite3GlobalConfig.m.xSize(p);
+  }
+}
+
+/*
+** Free memory previously obtained from sqlite3Malloc().
+*/
+SQLITE_API void sqlite3_free(void *p){
+  if( p==0 ) return;  /* IMP: R-49053-54554 */
+  assert( sqlite3MemdebugNoType(p, MEMTYPE_DB) );
+  assert( sqlite3MemdebugHasType(p, MEMTYPE_HEAP) );
+  if( sqlite3GlobalConfig.bMemstat ){
+    sqlite3_mutex_enter(mem0.mutex);
+    sqlite3StatusAdd(SQLITE_STATUS_MEMORY_USED, -sqlite3MallocSize(p));
+    sqlite3StatusAdd(SQLITE_STATUS_MALLOC_COUNT, -1);
+    sqlite3GlobalConfig.m.xFree(p);
+    sqlite3_mutex_leave(mem0.mutex);
+  }else{
+    sqlite3GlobalConfig.m.xFree(p);
+  }
+}
+
+/*
+** Free memory that might be associated with a particular database
+** connection.
+*/
+SQLITE_PRIVATE void sqlite3DbFree(sqlite3 *db, void *p){
+  assert( db==0 || sqlite3_mutex_held(db->mutex) );
+  if( db ){
+    if( db->pnBytesFreed ){
+      *db->pnBytesFreed += sqlite3DbMallocSize(db, p);
+      return;
+    }
+    if( isLookaside(db, p) ){
+      LookasideSlot *pBuf = (LookasideSlot*)p;
+      pBuf->pNext = db->lookaside.pFree;
+      db->lookaside.pFree = pBuf;
+      db->lookaside.nOut--;
+      return;
+    }
+  }
+  assert( sqlite3MemdebugHasType(p, MEMTYPE_DB) );
+  assert( sqlite3MemdebugHasType(p, MEMTYPE_LOOKASIDE|MEMTYPE_HEAP) );
+  assert( db!=0 || sqlite3MemdebugNoType(p, MEMTYPE_LOOKASIDE) );
+  sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
+  sqlite3_free(p);
+}
+
+/*
+** Change the size of an existing memory allocation
+*/
+SQLITE_PRIVATE void *sqlite3Realloc(void *pOld, int nBytes){
+  int nOld, nNew;
+  void *pNew;
+  if( pOld==0 ){
+    return sqlite3Malloc(nBytes); /* IMP: R-28354-25769 */
+  }
+  if( nBytes<=0 ){
+    sqlite3_free(pOld); /* IMP: R-31593-10574 */
+    return 0;
+  }
+  if( nBytes>=0x7fffff00 ){
+    /* The 0x7ffff00 limit term is explained in comments on sqlite3Malloc() */
+    return 0;
+  }
+  nOld = sqlite3MallocSize(pOld);
+  /* IMPLEMENTATION-OF: R-46199-30249 SQLite guarantees that the second
+  ** argument to xRealloc is always a value returned by a prior call to
+  ** xRoundup. */
+  nNew = sqlite3GlobalConfig.m.xRoundup(nBytes);
+  if( nOld==nNew ){
+    pNew = pOld;
+  }else if( sqlite3GlobalConfig.bMemstat ){
+    sqlite3_mutex_enter(mem0.mutex);
+    sqlite3StatusSet(SQLITE_STATUS_MALLOC_SIZE, nBytes);
+    if( sqlite3StatusValue(SQLITE_STATUS_MEMORY_USED)+nNew-nOld >= 
+          mem0.alarmThreshold ){
+      sqlite3MallocAlarm(nNew-nOld);
+    }
+    assert( sqlite3MemdebugHasType(pOld, MEMTYPE_HEAP) );
+    assert( sqlite3MemdebugNoType(pOld, ~MEMTYPE_HEAP) );
+    pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
+    if( pNew==0 && mem0.alarmCallback ){
+      sqlite3MallocAlarm(nBytes);
+      pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
+    }
+    if( pNew ){
+      nNew = sqlite3MallocSize(pNew);
+      sqlite3StatusAdd(SQLITE_STATUS_MEMORY_USED, nNew-nOld);
+    }
+    sqlite3_mutex_leave(mem0.mutex);
+  }else{
+    pNew = sqlite3GlobalConfig.m.xRealloc(pOld, nNew);
+  }
+  assert( EIGHT_BYTE_ALIGNMENT(pNew) ); /* IMP: R-04675-44850 */
+  return pNew;
+}
+
+/*
+** The public interface to sqlite3Realloc.  Make sure that the memory
+** subsystem is initialized prior to invoking sqliteRealloc.
+*/
+SQLITE_API void *sqlite3_realloc(void *pOld, int n){
+#ifndef SQLITE_OMIT_AUTOINIT
+  if( sqlite3_initialize() ) return 0;
+#endif
+  return sqlite3Realloc(pOld, n);
+}
+
+
+/*
+** Allocate and zero memory.
+*/ 
+SQLITE_PRIVATE void *sqlite3MallocZero(int n){
+  void *p = sqlite3Malloc(n);
+  if( p ){
+    memset(p, 0, n);
+  }
+  return p;
+}
+
+/*
+** Allocate and zero memory.  If the allocation fails, make
+** the mallocFailed flag in the connection pointer.
+*/
+SQLITE_PRIVATE void *sqlite3DbMallocZero(sqlite3 *db, int n){
+  void *p = sqlite3DbMallocRaw(db, n);
+  if( p ){
+    memset(p, 0, n);
+  }
+  return p;
+}
+
+/*
+** Allocate and zero memory.  If the allocation fails, make
+** the mallocFailed flag in the connection pointer.
+**
+** If db!=0 and db->mallocFailed is true (indicating a prior malloc
+** failure on the same database connection) then always return 0.
+** Hence for a particular database connection, once malloc starts
+** failing, it fails consistently until mallocFailed is reset.
+** This is an important assumption.  There are many places in the
+** code that do things like this:
+**
+**         int *a = (int*)sqlite3DbMallocRaw(db, 100);
+**         int *b = (int*)sqlite3DbMallocRaw(db, 200);
+**         if( b ) a[10] = 9;
+**
+** In other words, if a subsequent malloc (ex: "b") worked, it is assumed
+** that all prior mallocs (ex: "a") worked too.
+*/
+SQLITE_PRIVATE void *sqlite3DbMallocRaw(sqlite3 *db, int n){
+  void *p;
+  assert( db==0 || sqlite3_mutex_held(db->mutex) );
+  assert( db==0 || db->pnBytesFreed==0 );
+#ifndef SQLITE_OMIT_LOOKASIDE
+  if( db ){
+    LookasideSlot *pBuf;
+    if( db->mallocFailed ){
+      return 0;
+    }
+    if( db->lookaside.bEnabled ){
+      if( n>db->lookaside.sz ){
+        db->lookaside.anStat[1]++;
+      }else if( (pBuf = db->lookaside.pFree)==0 ){
+        db->lookaside.anStat[2]++;
+      }else{
+        db->lookaside.pFree = pBuf->pNext;
+        db->lookaside.nOut++;
+        db->lookaside.anStat[0]++;
+        if( db->lookaside.nOut>db->lookaside.mxOut ){
+          db->lookaside.mxOut = db->lookaside.nOut;
+        }
+        return (void*)pBuf;
+      }
+    }
+  }
+#else
+  if( db && db->mallocFailed ){
+    return 0;
+  }
+#endif
+  p = sqlite3Malloc(n);
+  if( !p && db ){
+    db->mallocFailed = 1;
+  }
+  sqlite3MemdebugSetType(p, MEMTYPE_DB |
+         ((db && db->lookaside.bEnabled) ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP));
+  return p;
+}
+
+/*
+** Resize the block of memory pointed to by p to n bytes. If the
+** resize fails, set the mallocFailed flag in the connection object.
+*/
+SQLITE_PRIVATE void *sqlite3DbRealloc(sqlite3 *db, void *p, int n){
+  void *pNew = 0;
+  assert( db!=0 );
+  assert( sqlite3_mutex_held(db->mutex) );
+  if( db->mallocFailed==0 ){
+    if( p==0 ){
+      return sqlite3DbMallocRaw(db, n);
+    }
+    if( isLookaside(db, p) ){
+      if( n<=db->lookaside.sz ){
+        return p;
+      }
+      pNew = sqlite3DbMallocRaw(db, n);
+      if( pNew ){
+        memcpy(pNew, p, db->lookaside.sz);
+        sqlite3DbFree(db, p);
+      }
+    }else{
+      assert( sqlite3MemdebugHasType(p, MEMTYPE_DB) );
+      assert( sqlite3MemdebugHasType(p, MEMTYPE_LOOKASIDE|MEMTYPE_HEAP) );
+      sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
+      pNew = sqlite3_realloc(p, n);
+      if( !pNew ){
+        sqlite3MemdebugSetType(p, MEMTYPE_DB|MEMTYPE_HEAP);
+        db->mallocFailed = 1;
+      }
+      sqlite3MemdebugSetType(pNew, MEMTYPE_DB | 
+            (db->lookaside.bEnabled ? MEMTYPE_LOOKASIDE : MEMTYPE_HEAP));
+    }
+  }
+  return pNew;
+}
+
+/*
+** Attempt to reallocate p.  If the reallocation fails, then free p
+** and set the mallocFailed flag in the database connection.
+*/
+SQLITE_PRIVATE void *sqlite3DbReallocOrFree(sqlite3 *db, void *p, int n){
+  void *pNew;
+  pNew = sqlite3DbRealloc(db, p, n);
+  if( !pNew ){
+    sqlite3DbFree(db, p);
+  }
+  return pNew;
+}
+
+/*
+** Make a copy of a string in memory obtained from sqliteMalloc(). These 
+** functions call sqlite3MallocRaw() directly instead of sqliteMalloc(). This
+** is because when memory debugging is turned on, these two functions are 
+** called via macros that record the current file and line number in the
+** ThreadData structure.
+*/
+SQLITE_PRIVATE char *sqlite3DbStrDup(sqlite3 *db, const char *z){
+  char *zNew;
+  size_t n;
+  if( z==0 ){
+    return 0;
+  }
+  n = sqlite3Strlen30(z) + 1;
+  assert( (n&0x7fffffff)==n );
+  zNew = sqlite3DbMallocRaw(db, (int)n);
+  if( zNew ){
+    memcpy(zNew, z, n);
+  }
+  return zNew;
+}
+SQLITE_PRIVATE char *sqlite3DbStrNDup(sqlite3 *db, const char *z, int n){
+  char *zNew;
+  if( z==0 ){
+    return 0;
+  }
+  assert( (n&0x7fffffff)==n );
+  zNew = sqlite3DbMallocRaw(db, n+1);
+  if( zNew ){
+    memcpy(zNew, z, n);
+    zNew[n] = 0;
+  }
+  return zNew;
+}
+
+/*
+** Create a string from the zFromat argument and the va_list that follows.
+** Store the string in memory obtained from sqliteMalloc() and make *pz
+** point to that string.
+*/
+SQLITE_PRIVATE void sqlite3SetString(char **pz, sqlite3 *db, const char *zFormat, ...){
+  va_list ap;
+  char *z;
+
+  va_start(ap, zFormat);
+  z = sqlite3VMPrintf(db, zFormat, ap);
+  va_end(ap);
+  sqlite3DbFree(db, *pz);
+  *pz = z;
+}
+
+
+/*
+** This function must be called before exiting any API function (i.e. 
+** returning control to the user) that has called sqlite3_malloc or
+** sqlite3_realloc.
+**
+** The returned value is normally a copy of the second argument to this
+** function. However, if a malloc() failure has occurred since the previous
+** invocation SQLITE_NOMEM is returned instead. 
+**
+** If the first argument, db, is not NULL and a malloc() error has occurred,
+** then the connection error-code (the value returned by sqlite3_errcode())
+** is set to SQLITE_NOMEM.
+*/
+SQLITE_PRIVATE int sqlite3ApiExit(sqlite3* db, int rc){
+  /* If the db handle is not NULL, then we must hold the connection handle
+  ** mutex here. Otherwise the read (and possible write) of db->mallocFailed 
+  ** is unsafe, as is the call to sqlite3Error().
+  */
+  assert( !db || sqlite3_mutex_held(db->mutex) );
+  if( db && (db->mallocFailed || rc==SQLITE_IOERR_NOMEM) ){
+    sqlite3Error(db, SQLITE_NOMEM, 0);
+    db->mallocFailed = 0;
+    rc = SQLITE_NOMEM;
+  }
+  return rc & (db ? db->errMask : 0xff);
+}
+
+/************** End of malloc.c **********************************************/
+/************** Begin file printf.c ******************************************/
+/*
+** The "printf" code that follows dates from the 1980's.  It is in
+** the public domain.  The original comments are included here for
+** completeness.  They are very out-of-date but might be useful as
+** an historical reference.  Most of the "enhancements" have been backed
+** out so that the functionality is now the same as standard printf().
+**
+**************************************************************************
+**
+** The following modules is an enhanced replacement for the "printf" subroutines
+** found in the standard C library.  The following enhancements are
+** supported:
+**
+**      +  Additional functions.  The standard set of "printf" functions
+**         includes printf, fprintf, sprintf, vprintf, vfprintf, and
+**         vsprintf.  This module adds the following:
+**
+**           *  snprintf -- Works like sprintf, but has an extra argument
+**                          which is the size of the buffer written to.
+**
+**           *  mprintf --  Similar to sprintf.  Writes output to memory
+**                          obtained from malloc.
+**
+**           *  xprintf --  Calls a function to dispose of output.
+**
+**           *  nprintf --  No output, but returns the number of characters
+**                          that would have been output by printf.
+**
+**           *  A v- version (ex: vsnprintf) of every function is also
+**              supplied.
+**
+**      +  A few extensions to the formatting notation are supported:
+**
+**           *  The "=" flag (similar to "-") causes the output to be
+**              be centered in the appropriately sized field.
+**
+**           *  The %b field outputs an integer in binary notation.
+**
+**           *  The %c field now accepts a precision.  The character output
+**              is repeated by the number of times the precision specifies.
+**
+**           *  The %' field works like %c, but takes as its character the
+**              next character of the format string, instead of the next
+**              argument.  For example,  printf("%.78'-")  prints 78 minus
+**              signs, the same as  printf("%.78c",'-').
+**
+**      +  When compiled using GCC on a SPARC, this version of printf is
+**         faster than the library printf for SUN OS 4.1.
+**
+**      +  All functions are fully reentrant.
+**
+*/
+
+/*
+** Conversion types fall into various categories as defined by the
+** following enumeration.
+*/
+#define etRADIX       1 /* Integer types.  %d, %x, %o, and so forth */
+#define etFLOAT       2 /* Floating point.  %f */
+#define etEXP         3 /* Exponentional notation. %e and %E */
+#define etGENERIC     4 /* Floating or exponential, depending on exponent. %g */
+#define etSIZE        5 /* Return number of characters processed so far. %n */
+#define etSTRING      6 /* Strings. %s */
+#define etDYNSTRING   7 /* Dynamically allocated strings. %z */
+#define etPERCENT     8 /* Percent symbol. %% */
+#define etCHARX       9 /* Characters. %c */
+/* The rest are extensions, not normally found in printf() */
+#define etSQLESCAPE  10 /* Strings with '\'' doubled.  %q */
+#define etSQLESCAPE2 11 /* Strings with '\'' doubled and enclosed in '',
+                          NULL pointers replaced by SQL NULL.  %Q */
+#define etTOKEN      12 /* a pointer to a Token structure */
+#define etSRCLIST    13 /* a pointer to a SrcList */
+#define etPOINTER    14 /* The %p conversion */
+#define etSQLESCAPE3 15 /* %w -> Strings with '\"' doubled */
+#define etORDINAL    16 /* %r -> 1st, 2nd, 3rd, 4th, etc.  English only */
+
+#define etINVALID     0 /* Any unrecognized conversion type */
+
+
+/*
+** An "etByte" is an 8-bit unsigned value.
+*/
+typedef unsigned char etByte;
+
+/*
+** Each builtin conversion character (ex: the 'd' in "%d") is described
+** by an instance of the following structure
+*/
+typedef struct et_info {   /* Information about each format field */
+  char fmttype;            /* The format field code letter */
+  etByte base;             /* The base for radix conversion */
+  etByte flags;            /* One or more of FLAG_ constants below */
+  etByte type;             /* Conversion paradigm */
+  etByte charset;          /* Offset into aDigits[] of the digits string */
+  etByte prefix;           /* Offset into aPrefix[] of the prefix string */
+} et_info;
+
+/*
+** Allowed values for et_info.flags
+*/
+#define FLAG_SIGNED  1     /* True if the value to convert is signed */
+#define FLAG_INTERN  2     /* True if for internal use only */
+#define FLAG_STRING  4     /* Allow infinity precision */
+
+
+/*
+** The following table is searched linearly, so it is good to put the
+** most frequently used conversion types first.
+*/
+static const char aDigits[] = "0123456789ABCDEF0123456789abcdef";
+static const char aPrefix[] = "-x0\000X0";
+static const et_info fmtinfo[] = {
+  {  'd', 10, 1, etRADIX,      0,  0 },
+  {  's',  0, 4, etSTRING,     0,  0 },
+  {  'g',  0, 1, etGENERIC,    30, 0 },
+  {  'z',  0, 4, etDYNSTRING,  0,  0 },
+  {  'q',  0, 4, etSQLESCAPE,  0,  0 },
+  {  'Q',  0, 4, etSQLESCAPE2, 0,  0 },
+  {  'w',  0, 4, etSQLESCAPE3, 0,  0 },
+  {  'c',  0, 0, etCHARX,      0,  0 },
+  {  'o',  8, 0, etRADIX,      0,  2 },
+  {  'u', 10, 0, etRADIX,      0,  0 },
+  {  'x', 16, 0, etRADIX,      16, 1 },
+  {  'X', 16, 0, etRADIX,      0,  4 },
+#ifndef SQLITE_OMIT_FLOATING_POINT
+  {  'f',  0, 1, etFLOAT,      0,  0 },
+  {  'e',  0, 1, etEXP,        30, 0 },
+  {  'E',  0, 1, etEXP,        14, 0 },
+  {  'G',  0, 1, etGENERIC,    14, 0 },
+#endif
+  {  'i', 10, 1, etRADIX,      0,  0 },
+  {  'n',  0, 0, etSIZE,       0,  0 },
+  {  '%',  0, 0, etPERCENT,    0,  0 },
+  {  'p', 16, 0, etPOINTER,    0,  1 },
+
+/* All the rest have the FLAG_INTERN bit set and are thus for internal
+** use only */
+  {  'T',  0, 2, etTOKEN,      0,  0 },
+  {  'S',  0, 2, etSRCLIST,    0,  0 },
+  {  'r', 10, 3, etORDINAL,    0,  0 },
+};
+
+/*
+** If SQLITE_OMIT_FLOATING_POINT is defined, then none of the floating point
+** conversions will work.
+*/
+#ifndef SQLITE_OMIT_FLOATING_POINT
+/*
+** "*val" is a double such that 0.1 <= *val < 10.0
+** Return the ascii code for the leading digit of *val, then
+** multiply "*val" by 10.0 to renormalize.
+**
+** Example:
+**     input:     *val = 3.14159
+**     output:    *val = 1.4159    function return = '3'
+**
+** The counter *cnt is incremented each time.  After counter exceeds
+** 16 (the number of significant digits in a 64-bit float) '0' is
+** always returned.
+*/
+static char et_getdigit(LONGDOUBLE_TYPE *val, int *cnt){
+  int digit;
+  LONGDOUBLE_TYPE d;
+  if( (*cnt)++ >= 16 ) return '0';
+  digit = (int)*val;
+  d = digit;
+  digit += '0';
+  *val = (*val - d)*10.0;
+  return (char)digit;
+}
+#endif /* SQLITE_OMIT_FLOATING_POINT */
+
+/*
+** Append N space characters to the given string buffer.
+*/
+static void appendSpace(StrAccum *pAccum, int N){
+  static const char zSpaces[] = "                             ";
+  while( N>=(int)sizeof(zSpaces)-1 ){
+    sqlite3StrAccumAppend(pAccum, zSpaces, sizeof(zSpaces)-1);
+    N -= sizeof(zSpaces)-1;
+  }
+  if( N>0 ){
+    sqlite3StrAccumAppend(pAccum, zSpaces, N);
+  }
+}
+
+/*
+** On machines with a small stack size, you can redefine the
+** SQLITE_PRINT_BUF_SIZE to be less than 350.
+*/
+#ifndef SQLITE_PRINT_BUF_SIZE
+# if defined(SQLITE_SMALL_STACK)
+#   define SQLITE_PRINT_BUF_SIZE 50
+# else
+#   define SQLITE_PRINT_BUF_SIZE 350
+# endif
+#endif
+#define etBUFSIZE SQLITE_PRINT_BUF_SIZE  /* Size of the output buffer */
+
+/*
+** The root program.  All variations call this core.
+**
+** INPUTS:
+**   func   This is a pointer to a function taking three arguments
+**            1. A pointer to anything.  Same as the "arg" parameter.
+**            2. A pointer to the list of characters to be output
+**               (Note, this list is NOT null terminated.)
+**            3. An integer number of characters to be output.
+**               (Note: This number might be zero.)
+**
+**   arg    This is the pointer to anything which will be passed as the
+**          first argument to "func".  Use it for whatever you like.
+**
+**   fmt    This is the format string, as in the usual print.
+**
+**   ap     This is a pointer to a list of arguments.  Same as in
+**          vfprint.
+**
+** OUTPUTS:
+**          The return value is the total number of characters sent to
+**          the function "func".  Returns -1 on a error.
+**
+** Note that the order in which automatic variables are declared below
+** seems to make a big difference in determining how fast this beast
+** will run.
+*/
+SQLITE_PRIVATE void sqlite3VXPrintf(
+  StrAccum *pAccum,                  /* Accumulate results here */
+  int useExtended,                   /* Allow extended %-conversions */
+  const char *fmt,                   /* Format string */
+  va_list ap                         /* arguments */
+){
+  int c;                     /* Next character in the format string */
+  char *bufpt;               /* Pointer to the conversion buffer */
+  int precision;             /* Precision of the current field */
+  int length;                /* Length of the field */
+  int idx;                   /* A general purpose loop counter */
+  int width;                 /* Width of the current field */
+  etByte flag_leftjustify;   /* True if "-" flag is present */
+  etByte flag_plussign;      /* True if "+" flag is present */
+  etByte flag_blanksign;     /* True if " " flag is present */
+  etByte flag_alternateform; /* True if "#" flag is present */
+  etByte flag_altform2;      /* True if "!" flag is present */
+  etByte flag_zeropad;       /* True if field width constant starts with zero */
+  etByte flag_long;          /* True if "l" flag is present */
+  etByte flag_longlong;      /* True if the "ll" flag is present */
+  etByte done;               /* Loop termination flag */
+  sqlite_uint64 longvalue;   /* Value for integer types */
+  LONGDOUBLE_TYPE realvalue; /* Value for real types */
+  const et_info *infop;      /* Pointer to the appropriate info structure */
+  char buf[etBUFSIZE];       /* Conversion buffer */
+  char prefix;               /* Prefix character.  "+" or "-" or " " or '\0'. */
+  etByte xtype = 0;          /* Conversion paradigm */
+  char *zExtra;              /* Extra memory used for etTCLESCAPE conversions */
+#ifndef SQLITE_OMIT_FLOATING_POINT
+  int  exp, e2;              /* exponent of real numbers */
+  double rounder;            /* Used for rounding floating point values */
+  etByte flag_dp;            /* True if decimal point should be shown */
+  etByte flag_rtz;           /* True if trailing zeros should be removed */
+  etByte flag_exp;           /* True to force display of the exponent */
+  int nsd;                   /* Number of significant digits returned */
+#endif
+
+  length = 0;
+  bufpt = 0;
+  for(; (c=(*fmt))!=0; ++fmt){
+    if( c!='%' ){
+      int amt;
+      bufpt = (char *)fmt;
+      amt = 1;
+      while( (c=(*++fmt))!='%' && c!=0 ) amt++;
+      sqlite3StrAccumAppend(pAccum, bufpt, amt);
+      if( c==0 ) break;
+    }
+    if( (c=(*++fmt))==0 ){
+      sqlite3StrAccumAppend(pAccum, "%", 1);
+      break;
+    }
+    /* Find out what flags are present */
+    flag_leftjustify = flag_plussign = flag_blanksign = 
+     flag_alternateform = flag_altform2 = flag_zeropad = 0;
+    done = 0;
+    do{
+      switch( c ){
+        case '-':   flag_leftjustify = 1;     break;
+        case '+':   flag_plussign = 1;        break;
+        case ' ':   flag_blanksign = 1;       break;
+        case '#':   flag_alternateform = 1;   break;
+        case '!':   flag_altform2 = 1;        break;
+        case '0':   flag_zeropad = 1;         break;
+        default:    done = 1;                 break;
+      }
+    }while( !done && (c=(*++fmt))!=0 );
+    /* Get the field width */
+    width = 0;
+    if( c=='*' ){
+      width = va_arg(ap,int);
+      if( width<0 ){
+        flag_leftjustify = 1;
+        width = -width;
+      }
+      c = *++fmt;
+    }else{
+      while( c>='0' && c<='9' ){
+        width = width*10 + c - '0';
+        c = *++fmt;
+      }
+    }
+    if( width > etBUFSIZE-10 ){
+      width = etBUFSIZE-10;
+    }
+    /* Get the precision */
+    if( c=='.' ){
+      precision = 0;
+      c = *++fmt;
+      if( c=='*' ){
+        precision = va_arg(ap,int);
+        if( precision<0 ) precision = -precision;
+        c = *++fmt;
+      }else{
+        while( c>='0' && c<='9' ){
+          precision = precision*10 + c - '0';
+          c = *++fmt;
+        }
+      }
+    }else{
+      precision = -1;
+    }
+    /* Get the conversion type modifier */
+    if( c=='l' ){
+      flag_long = 1;
+      c = *++fmt;
+      if( c=='l' ){
+        flag_longlong = 1;
+        c = *++fmt;
+      }else{
+        flag_longlong = 0;
+      }
+    }else{
+      flag_long = flag_longlong = 0;
+    }
+    /* Fetch the info entry for the field */
+    infop = &fmtinfo[0];
+    xtype = etINVALID;
+    for(idx=0; idx<ArraySize(fmtinfo); idx++){
+      if( c==fmtinfo[idx].fmttype ){
+        infop = &fmtinfo[idx];
+        if( useExtended || (infop->flags & FLAG_INTERN)==0 ){
+          xtype = infop->type;
+        }else{
+          return;
+        }
+        break;
+      }
+    }
+    zExtra = 0;
+
+
+    /* Limit the precision to prevent overflowing buf[] during conversion */
+    if( precision>etBUFSIZE-40 && (infop->flags & FLAG_STRING)==0 ){
+      precision = etBUFSIZE-40;
+    }
+
+    /*
+    ** At this point, variables are initialized as follows:
+    **
+    **   flag_alternateform          TRUE if a '#' is present.
+    **   flag_altform2               TRUE if a '!' is present.
+    **   flag_plussign               TRUE if a '+' is present.
+    **   flag_leftjustify            TRUE if a '-' is present or if the
+    **                               field width was negative.
+    **   flag_zeropad                TRUE if the width began with 0.
+    **   flag_long                   TRUE if the letter 'l' (ell) prefixed
+    **                               the conversion character.
+    **   flag_longlong               TRUE if the letter 'll' (ell ell) prefixed
+    **                               the conversion character.
+    **   flag_blanksign              TRUE if a ' ' is present.
+    **   width                       The specified field width.  This is
+    **                               always non-negative.  Zero is the default.
+    **   precision                   The specified precision.  The default
+    **                               is -1.
+    **   xtype                       The class of the conversion.
+    **   infop                       Pointer to the appropriate info struct.
+    */
+    switch( xtype ){
+      case etPOINTER:
+        flag_longlong = sizeof(char*)==sizeof(i64);
+        flag_long = sizeof(char*)==sizeof(long int);
+        /* Fall through into the next case */
+      case etORDINAL:
+      case etRADIX:
+        if( infop->flags & FLAG_SIGNED ){
+          i64 v;
+          if( flag_longlong ){
+            v = va_arg(ap,i64);
+          }else if( flag_long ){
+            v = va_arg(ap,long int);
+          }else{
+            v = va_arg(ap,int);
+          }
+          if( v<0 ){
+            if( v==SMALLEST_INT64 ){
+              longvalue = ((u64)1)<<63;
+            }else{
+              longvalue = -v;
+            }
+            prefix = '-';
+          }else{
+            longvalue = v;
+            if( flag_plussign )        prefix = '+';
+            else if( flag_blanksign )  prefix = ' ';
+            else                       prefix = 0;
+          }
+        }else{
+          if( flag_longlong ){
+            longvalue = va_arg(ap,u64);
+          }else if( flag_long ){
+            longvalue = va_arg(ap,unsigned long int);
+          }else{
+            longvalue = va_arg(ap,unsigned int);
+          }
+          prefix = 0;
+        }
+        if( longvalue==0 ) flag_alternateform = 0;
+        if( flag_zeropad && precision<width-(prefix!=0) ){
+          precision = width-(prefix!=0);
+        }
+        bufpt = &buf[etBUFSIZE-1];
+        if( xtype==etORDINAL ){
+          static const char zOrd[] = "thstndrd";
+          int x = (int)(longvalue % 10);
+          if( x>=4 || (longvalue/10)%10==1 ){
+            x = 0;
+          }
+          buf[etBUFSIZE-3] = zOrd[x*2];
+          buf[etBUFSIZE-2] = zOrd[x*2+1];
+          bufpt -= 2;
+        }
+        {
+          register const char *cset;      /* Use registers for speed */
+          register int base;
+          cset = &aDigits[infop->charset];
+          base = infop->base;
+          do{                                           /* Convert to ascii */
+            *(--bufpt) = cset[longvalue%base];
+            longvalue = longvalue/base;
+          }while( longvalue>0 );
+        }
+        length = (int)(&buf[etBUFSIZE-1]-bufpt);
+        for(idx=precision-length; idx>0; idx--){
+          *(--bufpt) = '0';                             /* Zero pad */
+        }
+        if( prefix ) *(--bufpt) = prefix;               /* Add sign */
+        if( flag_alternateform && infop->prefix ){      /* Add "0" or "0x" */
+          const char *pre;
+          char x;
+          pre = &aPrefix[infop->prefix];
+          for(; (x=(*pre))!=0; pre++) *(--bufpt) = x;
+        }
+        length = (int)(&buf[etBUFSIZE-1]-bufpt);
+        break;
+      case etFLOAT:
+      case etEXP:
+      case etGENERIC:
+        realvalue = va_arg(ap,double);
+#ifdef SQLITE_OMIT_FLOATING_POINT
+        length = 0;
+#else
+        if( precision<0 ) precision = 6;         /* Set default precision */
+        if( precision>etBUFSIZE/2-10 ) precision = etBUFSIZE/2-10;
+        if( realvalue<0.0 ){
+          realvalue = -realvalue;
+          prefix = '-';
+        }else{
+          if( flag_plussign )          prefix = '+';
+          else if( flag_blanksign )    prefix = ' ';
+          else                         prefix = 0;
+        }
+        if( xtype==etGENERIC && precision>0 ) precision--;
+#if 0
+        /* Rounding works like BSD when the constant 0.4999 is used.  Wierd! */
+        for(idx=precision, rounder=0.4999; idx>0; idx--, rounder*=0.1);
+#else
+        /* It makes more sense to use 0.5 */
+        for(idx=precision, rounder=0.5; idx>0; idx--, rounder*=0.1){}
+#endif
+        if( xtype==etFLOAT ) realvalue += rounder;
+        /* Normalize realvalue to within 10.0 > realvalue >= 1.0 */
+        exp = 0;
+        if( sqlite3IsNaN((double)realvalue) ){
+          bufpt = "NaN";
+          length = 3;
+          break;
+        }
+        if( realvalue>0.0 ){
+          while( realvalue>=1e32 && exp<=350 ){ realvalue *= 1e-32; exp+=32; }
+          while( realvalue>=1e8 && exp<=350 ){ realvalue *= 1e-8; exp+=8; }
+          while( realvalue>=10.0 && exp<=350 ){ realvalue *= 0.1; exp++; }
+          while( realvalue<1e-8 ){ realvalue *= 1e8; exp-=8; }
+          while( realvalue<1.0 ){ realvalue *= 10.0; exp--; }
+          if( exp>350 ){
+            if( prefix=='-' ){
+              bufpt = "-Inf";
+            }else if( prefix=='+' ){
+              bufpt = "+Inf";
+            }else{
+              bufpt = "Inf";
+            }
+            length = sqlite3Strlen30(bufpt);
+            break;
+          }
+        }
+        bufpt = buf;
+        /*
+        ** If the field type is etGENERIC, then convert to either etEXP
+        ** or etFLOAT, as appropriate.
+        */
+        flag_exp = xtype==etEXP;
+        if( xtype!=etFLOAT ){
+          realvalue += rounder;
+          if( realvalue>=10.0 ){ realvalue *= 0.1; exp++; }
+        }
+        if( xtype==etGENERIC ){
+          flag_rtz = !flag_alternateform;
+          if( exp<-4 || exp>precision ){
+            xtype = etEXP;
+          }else{
+            precision = precision - exp;
+            xtype = etFLOAT;
+          }
+        }else{
+          flag_rtz = 0;
+        }
+        if( xtype==etEXP ){
+          e2 = 0;
+        }else{
+          e2 = exp;
+        }
+        nsd = 0;
+        flag_dp = (precision>0 ?1:0) | flag_alternateform | flag_altform2;
+        /* The sign in front of the number */
+        if( prefix ){
+          *(bufpt++) = prefix;
+        }
+        /* Digits prior to the decimal point */
+        if( e2<0 ){
+          *(bufpt++) = '0';
+        }else{
+          for(; e2>=0; e2--){
+            *(bufpt++) = et_getdigit(&realvalue,&nsd);
+          }
+        }
+        /* The decimal point */
+        if( flag_dp ){
+          *(bufpt++) = '.';
+        }
+        /* "0" digits after the decimal point but before the first
+        ** significant digit of the number */
+        for(e2++; e2<0; precision--, e2++){
+          assert( precision>0 );
+          *(bufpt++) = '0';
+        }
+        /* Significant digits after the decimal point */
+        while( (precision--)>0 ){
+          *(bufpt++) = et_getdigit(&realvalue,&nsd);
+        }
+        /* Remove trailing zeros and the "." if no digits follow the "." */
+        if( flag_rtz && flag_dp ){
+          while( bufpt[-1]=='0' ) *(--bufpt) = 0;
+          assert( bufpt>buf );
+          if( bufpt[-1]=='.' ){
+            if( flag_altform2 ){
+              *(bufpt++) = '0';
+            }else{
+              *(--bufpt) = 0;
+            }
+          }
+        }
+        /* Add the "eNNN" suffix */
+        if( flag_exp || xtype==etEXP ){
+          *(bufpt++) = aDigits[infop->charset];
+          if( exp<0 ){
+            *(bufpt++) = '-'; exp = -exp;
+          }else{
+            *(bufpt++) = '+';
+          }
+          if( exp>=100 ){
+            *(bufpt++) = (char)((exp/100)+'0');        /* 100's digit */
+            exp %= 100;
+          }
+          *(bufpt++) = (char)(exp/10+'0');             /* 10's digit */
+          *(bufpt++) = (char)(exp%10+'0');             /* 1's digit */
+        }
+        *bufpt = 0;
+
+        /* The converted number is in buf[] and zero terminated. Output it.
+        ** Note that the number is in the usual order, not reversed as with
+        ** integer conversions. */
+        length = (int)(bufpt-buf);
+        bufpt = buf;
+
+        /* Special case:  Add leading zeros if the flag_zeropad flag is
+        ** set and we are not left justified */
+        if( flag_zeropad && !flag_leftjustify && length < width){
+          int i;
+          int nPad = width - length;
+          for(i=width; i>=nPad; i--){
+            bufpt[i] = bufpt[i-nPad];
+          }
+          i = prefix!=0;
+          while( nPad-- ) bufpt[i++] = '0';
+          length = width;
+        }
+#endif /* !defined(SQLITE_OMIT_FLOATING_POINT) */
+        break;
+      case etSIZE:
+        *(va_arg(ap,int*)) = pAccum->nChar;
+        length = width = 0;
+        break;
+      case etPERCENT:
+        buf[0] = '%';
+        bufpt = buf;
+        length = 1;
+        break;
+      case etCHARX:
+        c = va_arg(ap,int);
+        buf[0] = (char)c;
+        if( precision>=0 ){
+          for(idx=1; idx<precision; idx++) buf[idx] = (char)c;
+          length = precision;
+        }else{
+          length =1;
+        }
+        bufpt = buf;
+        break;
+      case etSTRING:
+      case etDYNSTRING:
+        bufpt = va_arg(ap,char*);
+        if( bufpt==0 ){
+          bufpt = "";
+        }else if( xtype==etDYNSTRING ){
+          zExtra = bufpt;
+        }
+        if( precision>=0 ){
+          for(length=0; length<precision && bufpt[length]; length++){}
+        }else{
+          length = sqlite3Strlen30(bufpt);
+        }
+        break;
+      case etSQLESCAPE:
+      case etSQLESCAPE2:
+      case etSQLESCAPE3: {
+        int i, j, k, n, isnull;
+        int needQuote;
+        char ch;
+        char q = ((xtype==etSQLESCAPE3)?'"':'\'');   /* Quote character */
+        char *escarg = va_arg(ap,char*);
+        isnull = escarg==0;
+        if( isnull ) escarg = (xtype==etSQLESCAPE2 ? "NULL" : "(NULL)");
+        k = precision;
+        for(i=n=0; k!=0 && (ch=escarg[i])!=0; i++, k--){
+          if( ch==q )  n++;
+        }
+        needQuote = !isnull && xtype==etSQLESCAPE2;
+        n += i + 1 + needQuote*2;
+        if( n>etBUFSIZE ){
+          bufpt = zExtra = sqlite3Malloc( n );
+          if( bufpt==0 ){
+            pAccum->mallocFailed = 1;
+            return;
+          }
+        }else{
+          bufpt = buf;
+        }
+        j = 0;
+        if( needQuote ) bufpt[j++] = q;
+        k = i;
+        for(i=0; i<k; i++){
+          bufpt[j++] = ch = escarg[i];
+          if( ch==q ) bufpt[j++] = ch;
+        }
+        if( needQuote ) bufpt[j++] = q;
+        bufpt[j] = 0;
+        length = j;
+        /* The precision in %q and %Q means how many input characters to
+        ** consume, not the length of the output...
+        ** if( precision>=0 && precision<length ) length = precision; */
+        break;
+      }
+      case etTOKEN: {
+        Token *pToken = va_arg(ap, Token*);
+        if( pToken ){
+          sqlite3StrAccumAppend(pAccum, (const char*)pToken->z, pToken->n);
+        }
+        length = width = 0;
+        break;
+      }
+      case etSRCLIST: {
+        SrcList *pSrc = va_arg(ap, SrcList*);
+        int k = va_arg(ap, int);
+        struct SrcList_item *pItem = &pSrc->a[k];
+        assert( k>=0 && k<pSrc->nSrc );
+        if( pItem->zDatabase ){
+          sqlite3StrAccumAppend(pAccum, pItem->zDatabase, -1);
+          sqlite3StrAccumAppend(pAccum, ".", 1);
+        }
+        sqlite3StrAccumAppend(pAccum, pItem->zName, -1);
+        length = width = 0;
+        break;
+      }
+      default: {
+        assert( xtype==etINVALID );
+        return;
+      }
+    }/* End switch over the format type */
+    /*
+    ** The text of the conversion is pointed to by "bufpt" and is
+    ** "length" characters long.  The field width is "width".  Do
+    ** the output.
+    */
+    if( !flag_leftjustify ){
+      register int nspace;
+      nspace = width-length;
+      if( nspace>0 ){
+        appendSpace(pAccum, nspace);
+      }
+    }
+    if( length>0 ){
+      sqlite3StrAccumAppend(pAccum, bufpt, length);
+    }
+    if( flag_leftjustify ){
+      register int nspace;
+      nspace = width-length;
+      if( nspace>0 ){
+        appendSpace(pAccum, nspace);
+      }
+    }
+    if( zExtra ){
+      sqlite3_free(zExtra);
+    }
+  }/* End for loop over the format string */
+} /* End of function */
+
+/*
+** Append N bytes of text from z to the StrAccum object.
+*/
+SQLITE_PRIVATE void sqlite3StrAccumAppend(StrAccum *p, const char *z, int N){
+  assert( z!=0 || N==0 );
+  if( p->tooBig | p->mallocFailed ){
+    testcase(p->tooBig);
+    testcase(p->mallocFailed);
+    return;
+  }
+  if( N<0 ){
+    N = sqlite3Strlen30(z);
+  }
+  if( N==0 || NEVER(z==0) ){
+    return;
+  }
+  if( p->nChar+N >= p->nAlloc ){
+    char *zNew;
+    if( !p->useMalloc ){
+      p->tooBig = 1;
+      N = p->nAlloc - p->nChar - 1;
+      if( N<=0 ){
+        return;
+      }
+    }else{
+      char *zOld = (p->zText==p->zBase ? 0 : p->zText);
+      i64 szNew = p->nChar;
+      szNew += N + 1;
+      if( szNew > p->mxAlloc ){
+        sqlite3StrAccumReset(p);
+        p->tooBig = 1;
+        return;
+      }else{
+        p->nAlloc = (int)szNew;
+      }
+      if( p->useMalloc==1 ){
+        zNew = sqlite3DbRealloc(p->db, zOld, p->nAlloc);
+      }else{
+        zNew = sqlite3_realloc(zOld, p->nAlloc);
+      }
+      if( zNew ){
+        if( zOld==0 ) memcpy(zNew, p->zText, p->nChar);
+        p->zText = zNew;
+      }else{
+        p->mallocFailed = 1;
+        sqlite3StrAccumReset(p);
+        return;
+      }
+    }
+  }
+  memcpy(&p->zText[p->nChar], z, N);
+  p->nChar += N;
+}
+
+/*
+** Finish off a string by making sure it is zero-terminated.
+** Return a pointer to the resulting string.  Return a NULL
+** pointer if any kind of error was encountered.
+*/
+SQLITE_PRIVATE char *sqlite3StrAccumFinish(StrAccum *p){
+  if( p->zText ){
+    p->zText[p->nChar] = 0;
+    if( p->useMalloc && p->zText==p->zBase ){
+      if( p->useMalloc==1 ){
+        p->zText = sqlite3DbMallocRaw(p->db, p->nChar+1 );
+      }else{
+        p->zText = sqlite3_malloc(p->nChar+1);
+      }
+      if( p->zText ){
+        memcpy(p->zText, p->zBase, p->nChar+1);
+      }else{
+        p->mallocFailed = 1;
+      }
+    }
+  }
+  return p->zText;
+}
+
+/*
+** Reset an StrAccum string.  Reclaim all malloced memory.
+*/
+SQLITE_PRIVATE void sqlite3StrAccumReset(StrAccum *p){
+  if( p->zText!=p->zBase ){
+    if( p->useMalloc==1 ){
+      sqlite3DbFree(p->db, p->zText);
+    }else{
+      sqlite3_free(p->zText);
+    }
+  }
+  p->zText = 0;
+}
+
+/*
+** Initialize a string accumulator
+*/
+SQLITE_PRIVATE void sqlite3StrAccumInit(StrAccum *p, char *zBase, int n, int mx){
+  p->zText = p->zBase = zBase;
+  p->db = 0;
+  p->nChar = 0;
+  p->nAlloc = n;
+  p->mxAlloc = mx;
+  p->useMalloc = 1;
+  p->tooBig = 0;
+  p->mallocFailed = 0;
+}
+
+/*
+** Print into memory obtained from sqliteMalloc().  Use the internal
+** %-conversion extensions.
+*/
+SQLITE_PRIVATE char *sqlite3VMPrintf(sqlite3 *db, const char *zFormat, va_list ap){
+  char *z;
+  char zBase[SQLITE_PRINT_BUF_SIZE];
+  StrAccum acc;
+  assert( db!=0 );
+  sqlite3StrAccumInit(&acc, zBase, sizeof(zBase),
+                      db->aLimit[SQLITE_LIMIT_LENGTH]);
+  acc.db = db;
+  sqlite3VXPrintf(&acc, 1, zFormat, ap);
+  z = sqlite3StrAccumFinish(&acc);
+  if( acc.mallocFailed ){
+    db->mallocFailed = 1;
+  }
+  return z;
+}
+
+/*
+** Print into memory obtained from sqliteMalloc().  Use the internal
+** %-conversion extensions.
+*/
+SQLITE_PRIVATE char *sqlite3MPrintf(sqlite3 *db, const char *zFormat, ...){
+  va_list ap;
+  char *z;
+  va_start(ap, zFormat);
+  z = sqlite3VMPrintf(db, zFormat, ap);
+  va_end(ap);
+  return z;
+}
+
+/*
+** Like sqlite3MPrintf(), but call sqlite3DbFree() on zStr after formatting
+** the string and before returnning.  This routine is intended to be used
+** to modify an existing string.  For example:
+**
+**       x = sqlite3MPrintf(db, x, "prefix %s suffix", x);
+**
+*/
+SQLITE_PRIVATE char *sqlite3MAppendf(sqlite3 *db, char *zStr, const char *zFormat, ...){
+  va_list ap;
+  char *z;
+  va_start(ap, zFormat);
+  z = sqlite3VMPrintf(db, zFormat, ap);
+  va_end(ap);
+  sqlite3DbFree(db, zStr);
+  return z;
+}
+
+/*
+** Print into memory obtained from sqlite3_malloc().  Omit the internal
+** %-conversion extensions.
+*/
+SQLITE_API char *sqlite3_vmprintf(const char *zFormat, va_list ap){
+  char *z;
+  char zBase[SQLITE_PRINT_BUF_SIZE];
+  StrAccum acc;
+#ifndef SQLITE_OMIT_AUTOINIT
+  if( sqlite3_initialize() ) return 0;
+#endif
+  sqlite3StrAccumInit(&acc, zBase, sizeof(zBase), SQLITE_MAX_LENGTH);
+  acc.useMalloc = 2;
+  sqlite3VXPrintf(&acc, 0, zFormat, ap);
+  z = sqlite3StrAccumFinish(&acc);
+  return z;
+}
+
+/*
+** Print into memory obtained from sqlite3_malloc()().  Omit the internal
+** %-conversion extensions.
+*/
+SQLITE_API char *sqlite3_mprintf(const char *zFormat, ...){
+  va_list ap;
+  char *z;
+#ifndef SQLITE_OMIT_AUTOINIT
+  if( sqlite3_initialize() ) return 0;
+#endif
+  va_start(ap, zFormat);
+  z = sqlite3_vmprintf(zFormat, ap);
+  va_end(ap);
+  return z;
+}
+
+/*
+** sqlite3_snprintf() works like snprintf() except that it ignores the
+** current locale settings.  This is important for SQLite because we
+** are not able to use a "," as the decimal point in place of "." as
+** specified by some locales.
+**
+** Oops:  The first two arguments of sqlite3_snprintf() are backwards
+** from the snprintf() standard.  Unfortunately, it is too late to change
+** this without breaking compatibility, so we just have to live with the
+** mistake.
+**
+** sqlite3_vsnprintf() is the varargs version.
+*/
+SQLITE_API char *sqlite3_vsnprintf(int n, char *zBuf, const char *zFormat, va_list ap){
+  StrAccum acc;
+  if( n<=0 ) return zBuf;
+  sqlite3StrAccumInit(&acc, zBuf, n, 0);
+  acc.useMalloc = 0;
+  sqlite3VXPrintf(&acc, 0, zFormat, ap);
+  return sqlite3StrAccumFinish(&acc);
+}
+SQLITE_API char *sqlite3_snprintf(int n, char *zBuf, const char *zFormat, ...){
+  char *z;
+  va_list ap;
+  va_start(ap,zFormat);
+  z = sqlite3_vsnprintf(n, zBuf, zFormat, ap);
+  va_end(ap);
+  return z;
+}
+
+/*
+** This is the routine that actually formats the sqlite3_log() message.
+** We house it in a separate routine from sqlite3_log() to avoid using
+** stack space on small-stack systems when logging is disabled.
+**
+** sqlite3_log() must render into a static buffer.  It cannot dynamically
+** allocate memory because it might be called while the memory allocator
+** mutex is held.
+*/
+static void renderLogMsg(int iErrCode, const char *zFormat, va_list ap){
+  StrAccum acc;                          /* String accumulator */
+  char zMsg[SQLITE_PRINT_BUF_SIZE*3];    /* Complete log message */
+
+  sqlite3StrAccumInit(&acc, zMsg, sizeof(zMsg), 0);
+  acc.useMalloc = 0;
+  sqlite3VXPrintf(&acc, 0, zFormat, ap);
+  sqlite3GlobalConfig.xLog(sqlite3GlobalConfig.pLogArg, iErrCode,
+                           sqlite3StrAccumFinish(&acc));
+}
+
+/*
+** Format and write a message to the log if logging is enabled.
+*/
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...){
+  va_list ap;                             /* Vararg list */
+  if( sqlite3GlobalConfig.xLog ){
+    va_start(ap, zFormat);
+    renderLogMsg(iErrCode, zFormat, ap);
+    va_end(ap);
+  }
+}
+
+#if defined(SQLITE_DEBUG)
+/*
+** A version of printf() that understands %lld.  Used for debugging.
+** The printf() built into some versions of windows does not understand %lld
+** and segfaults if you give it a long long int.
+*/
+SQLITE_PRIVATE void sqlite3DebugPrintf(const char *zFormat, ...){
+  va_list ap;
+  StrAccum acc;
+  char zBuf[500];
+  sqlite3StrAccumInit(&acc, zBuf, sizeof(zBuf), 0);
+  acc.useMalloc = 0;
+  va_start(ap,zFormat);
+  sqlite3VXPrintf(&acc, 0, zFormat, ap);
+  va_end(ap);
+  sqlite3StrAccumFinish(&acc);
+  fprintf(stdout,"%s", zBuf);
+  fflush(stdout);
+}
+#endif
+
+#ifndef SQLITE_OMIT_TRACE
+/*
+** variable-argument wrapper around sqlite3VXPrintf().
+*/
+SQLITE_PRIVATE void sqlite3XPrintf(StrAccum *p, const char *zFormat, ...){
+  va_list ap;
+  va_start(ap,zFormat);
+  sqlite3VXPrintf(p, 1, zFormat, ap);
+  va_end(ap);
+}
+#endif
+
+/************** End of printf.c **********************************************/
+/************** Begin file random.c ******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains code to implement a pseudo-random number
+** generator (PRNG) for SQLite.
+**
+** Random numbers are used by some of the database backends in order
+** to generate random integer keys for tables or random filenames.
+*/
+
+
+/* All threads share a single random number generator.
+** This structure is the current state of the generator.
+*/
+static SQLITE_WSD struct sqlite3PrngType {
+  unsigned char isInit;          /* True if initialized */
+  unsigned char i, j;            /* State variables */
+  unsigned char s[256];          /* State variables */
+} sqlite3Prng;
+
+/*
+** Get a single 8-bit random value from the RC4 PRNG.  The Mutex
+** must be held while executing this routine.
+**
+** Why not just use a library random generator like lrand48() for this?
+** Because the OP_NewRowid opcode in the VDBE depends on having a very
+** good source of random numbers.  The lrand48() library function may
+** well be good enough.  But maybe not.  Or maybe lrand48() has some
+** subtle problems on some systems that could cause problems.  It is hard
+** to know.  To minimize the risk of problems due to bad lrand48()
+** implementations, SQLite uses this random number generator based
+** on RC4, which we know works very well.
+**
+** (Later):  Actually, OP_NewRowid does not depend on a good source of
+** randomness any more.  But we will leave this code in all the same.
+*/
+static u8 randomByte(void){
+  unsigned char t;
+
+
+  /* The "wsdPrng" macro will resolve to the pseudo-random number generator
+  ** state vector.  If writable static data is unsupported on the target,
+  ** we have to locate the state vector at run-time.  In the more common
+  ** case where writable static data is supported, wsdPrng can refer directly
+  ** to the "sqlite3Prng" state vector declared above.
+  */
+#ifdef SQLITE_OMIT_WSD
+  struct sqlite3PrngType *p = &GLOBAL(struct sqlite3PrngType, sqlite3Prng);
+# define wsdPrng p[0]
+#else
+# define wsdPrng sqlite3Prng
+#endif
+
+
+  /* Initialize the state of the random number generator once,
+  ** the first time this routine is called.  The seed value does
+  ** not need to contain a lot of randomness since we are not
+  ** trying to do secure encryption or anything like that...
+  **
+  ** Nothing in this file or anywhere else in SQLite does any kind of
+  ** encryption.  The RC4 algorithm is being used as a PRNG (pseudo-random
+  ** number generator) not as an encryption device.
+  */
+  if( !wsdPrng.isInit ){
+    int i;
+    char k[256];
+    wsdPrng.j = 0;
+    wsdPrng.i = 0;
+    sqlite3OsRandomness(sqlite3_vfs_find(0), 256, k);
+    for(i=0; i<256; i++){
+      wsdPrng.s[i] = (u8)i;
+    }
+    for(i=0; i<256; i++){
+      wsdPrng.j += wsdPrng.s[i] + k[i];
+      t = wsdPrng.s[wsdPrng.j];
+      wsdPrng.s[wsdPrng.j] = wsdPrng.s[i];
+      wsdPrng.s[i] = t;
+    }
+    wsdPrng.isInit = 1;
+  }
+
+  /* Generate and return single random byte
+  */
+  wsdPrng.i++;
+  t = wsdPrng.s[wsdPrng.i];
+  wsdPrng.j += t;
+  wsdPrng.s[wsdPrng.i] = wsdPrng.s[wsdPrng.j];
+  wsdPrng.s[wsdPrng.j] = t;
+  t += wsdPrng.s[wsdPrng.i];
+  return wsdPrng.s[t];
+}
+
+/*
+** Return N random bytes.
+*/
+SQLITE_API void sqlite3_randomness(int N, void *pBuf){
+  unsigned char *zBuf = pBuf;
+#if SQLITE_THREADSAFE
+  sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_PRNG);
+#endif
+  sqlite3_mutex_enter(mutex);
+  while( N-- ){
+    *(zBuf++) = randomByte();
+  }
+  sqlite3_mutex_leave(mutex);
+}
+
+#ifndef SQLITE_OMIT_BUILTIN_TEST
+/*
+** For testing purposes, we sometimes want to preserve the state of
+** PRNG and restore the PRNG to its saved state at a later time, or
+** to reset the PRNG to its initial state.  These routines accomplish
+** those tasks.
+**
+** The sqlite3_test_control() interface calls these routines to
+** control the PRNG.
+*/
+static SQLITE_WSD struct sqlite3PrngType sqlite3SavedPrng;
+SQLITE_PRIVATE void sqlite3PrngSaveState(void){
+  memcpy(
+    &GLOBAL(struct sqlite3PrngType, sqlite3SavedPrng),
+    &GLOBAL(struct sqlite3PrngType, sqlite3Prng),
+    sizeof(sqlite3Prng)
+  );
+}
+SQLITE_PRIVATE void sqlite3PrngRestoreState(void){
+  memcpy(
+    &GLOBAL(struct sqlite3PrngType, sqlite3Prng),
+    &GLOBAL(struct sqlite3PrngType, sqlite3SavedPrng),
+    sizeof(sqlite3Prng)
+  );
+}
+SQLITE_PRIVATE void sqlite3PrngResetState(void){
+  GLOBAL(struct sqlite3PrngType, sqlite3Prng).isInit = 0;
+}
+#endif /* SQLITE_OMIT_BUILTIN_TEST */
+
+/************** End of random.c **********************************************/
+/************** Begin file utf.c *********************************************/
+/*
+** 2004 April 13
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains routines used to translate between UTF-8, 
+** UTF-16, UTF-16BE, and UTF-16LE.
+**
+** Notes on UTF-8:
+**
+**   Byte-0    Byte-1    Byte-2    Byte-3    Value
+**  0xxxxxxx                                 00000000 00000000 0xxxxxxx
+**  110yyyyy  10xxxxxx                       00000000 00000yyy yyxxxxxx
+**  1110zzzz  10yyyyyy  10xxxxxx             00000000 zzzzyyyy yyxxxxxx
+**  11110uuu  10uuzzzz  10yyyyyy  10xxxxxx   000uuuuu zzzzyyyy yyxxxxxx
+**
+**
+** Notes on UTF-16:  (with wwww+1==uuuuu)
+**
+**      Word-0               Word-1          Value
+**  110110ww wwzzzzyy   110111yy yyxxxxxx    000uuuuu zzzzyyyy yyxxxxxx
+**  zzzzyyyy yyxxxxxx                        00000000 zzzzyyyy yyxxxxxx
+**
+**
+** BOM or Byte Order Mark:
+**     0xff 0xfe   little-endian utf-16 follows
+**     0xfe 0xff   big-endian utf-16 follows
+**
+*/
+
+#ifndef SQLITE_AMALGAMATION
+/*
+** The following constant value is used by the SQLITE_BIGENDIAN and
+** SQLITE_LITTLEENDIAN macros.
+*/
+SQLITE_PRIVATE const int sqlite3one = 1;
+#endif /* SQLITE_AMALGAMATION */
+
+/*
+** This lookup table is used to help decode the first byte of
+** a multi-byte UTF8 character.
+*/
+static const unsigned char sqlite3Utf8Trans1[] = {
+  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+  0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
+  0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f,
+  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+  0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f,
+  0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07,
+  0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x00, 0x00,
+};
+
+
+#define WRITE_UTF8(zOut, c) {                          \
+  if( c<0x00080 ){                                     \
+    *zOut++ = (u8)(c&0xFF);                            \
+  }                                                    \
+  else if( c<0x00800 ){                                \
+    *zOut++ = 0xC0 + (u8)((c>>6)&0x1F);                \
+    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \
+  }                                                    \
+  else if( c<0x10000 ){                                \
+    *zOut++ = 0xE0 + (u8)((c>>12)&0x0F);               \
+    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \
+    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \
+  }else{                                               \
+    *zOut++ = 0xF0 + (u8)((c>>18) & 0x07);             \
+    *zOut++ = 0x80 + (u8)((c>>12) & 0x3F);             \
+    *zOut++ = 0x80 + (u8)((c>>6) & 0x3F);              \
+    *zOut++ = 0x80 + (u8)(c & 0x3F);                   \
+  }                                                    \
+}
+
+#define WRITE_UTF16LE(zOut, c) {                                    \
+  if( c<=0xFFFF ){                                                  \
+    *zOut++ = (u8)(c&0x00FF);                                       \
+    *zOut++ = (u8)((c>>8)&0x00FF);                                  \
+  }else{                                                            \
+    *zOut++ = (u8)(((c>>10)&0x003F) + (((c-0x10000)>>10)&0x00C0));  \
+    *zOut++ = (u8)(0x00D8 + (((c-0x10000)>>18)&0x03));              \
+    *zOut++ = (u8)(c&0x00FF);                                       \
+    *zOut++ = (u8)(0x00DC + ((c>>8)&0x03));                         \
+  }                                                                 \
+}
+
+#define WRITE_UTF16BE(zOut, c) {                                    \
+  if( c<=0xFFFF ){                                                  \
+    *zOut++ = (u8)((c>>8)&0x00FF);                                  \
+    *zOut++ = (u8)(c&0x00FF);                                       \
+  }else{                                                            \
+    *zOut++ = (u8)(0x00D8 + (((c-0x10000)>>18)&0x03));              \
+    *zOut++ = (u8)(((c>>10)&0x003F) + (((c-0x10000)>>10)&0x00C0));  \
+    *zOut++ = (u8)(0x00DC + ((c>>8)&0x03));                         \
+    *zOut++ = (u8)(c&0x00FF);                                       \
+  }                                                                 \
+}
+
+#define READ_UTF16LE(zIn, TERM, c){                                   \
+  c = (*zIn++);                                                       \
+  c += ((*zIn++)<<8);                                                 \
+  if( c>=0xD800 && c<0xE000 && TERM ){                                \
+    int c2 = (*zIn++);                                                \
+    c2 += ((*zIn++)<<8);                                              \
+    c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);   \
+  }                                                                   \
+}
+
+#define READ_UTF16BE(zIn, TERM, c){                                   \
+  c = ((*zIn++)<<8);                                                  \
+  c += (*zIn++);                                                      \
+  if( c>=0xD800 && c<0xE000 && TERM ){                                \
+    int c2 = ((*zIn++)<<8);                                           \
+    c2 += (*zIn++);                                                   \
+    c = (c2&0x03FF) + ((c&0x003F)<<10) + (((c&0x03C0)+0x0040)<<10);   \
+  }                                                                   \
+}
+
+/*
+** Translate a single UTF-8 character.  Return the unicode value.
+**
+** During translation, assume that the byte that zTerm points
+** is a 0x00.
+**
+** Write a pointer to the next unread byte back into *pzNext.
+**
+** Notes On Invalid UTF-8:
+**
+**  *  This routine never allows a 7-bit character (0x00 through 0x7f) to
+**     be encoded as a multi-byte character.  Any multi-byte character that
+**     attempts to encode a value between 0x00 and 0x7f is rendered as 0xfffd.
+**
+**  *  This routine never allows a UTF16 surrogate value to be encoded.
+**     If a multi-byte character attempts to encode a value between
+**     0xd800 and 0xe000 then it is rendered as 0xfffd.
+**
+**  *  Bytes in the range of 0x80 through 0xbf which occur as the first
+**     byte of a character are interpreted as single-byte characters
+**     and rendered as themselves even though they are technically
+**     invalid characters.
+**
+**  *  This routine accepts an infinite number of different UTF8 encodings
+**     for unicode values 0x80 and greater.  It do not change over-length
+**     encodings to 0xfffd as some systems recommend.
+*/
+#define READ_UTF8(zIn, zTerm, c)                           \
+  c = *(zIn++);                                            \
+  if( c>=0xc0 ){                                           \
+    c = sqlite3Utf8Trans1[c-0xc0];                         \
+    while( zIn!=zTerm && (*zIn & 0xc0)==0x80 ){            \
+      c = (c<<6) + (0x3f & *(zIn++));                      \
+    }                                                      \
+    if( c<0x80                                             \
+        || (c&0xFFFFF800)==0xD800                          \
+        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }        \
+  }
+SQLITE_PRIVATE int sqlite3Utf8Read(
+  const unsigned char *zIn,       /* First byte of UTF-8 character */
+  const unsigned char **pzNext    /* Write first byte past UTF-8 char here */
+){
+  unsigned int c;
+
+  /* Same as READ_UTF8() above but without the zTerm parameter.
+  ** For this routine, we assume the UTF8 string is always zero-terminated.
+  */
+  c = *(zIn++);
+  if( c>=0xc0 ){
+    c = sqlite3Utf8Trans1[c-0xc0];
+    while( (*zIn & 0xc0)==0x80 ){
+      c = (c<<6) + (0x3f & *(zIn++));
+    }
+    if( c<0x80
+        || (c&0xFFFFF800)==0xD800
+        || (c&0xFFFFFFFE)==0xFFFE ){  c = 0xFFFD; }
+  }
+  *pzNext = zIn;
+  return c;
+}
+
+
+
+
+/*
+** If the TRANSLATE_TRACE macro is defined, the value of each Mem is
+** printed on stderr on the way into and out of sqlite3VdbeMemTranslate().
+*/ 
+/* #define TRANSLATE_TRACE 1 */
+
+#ifndef SQLITE_OMIT_UTF16
+/*
+** This routine transforms the internal text encoding used by pMem to
+** desiredEnc. It is an error if the string is already of the desired
+** encoding, or if *pMem does not contain a string value.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemTranslate(Mem *pMem, u8 desiredEnc){
+  int len;                    /* Maximum length of output string in bytes */
+  unsigned char *zOut;                  /* Output buffer */
+  unsigned char *zIn;                   /* Input iterator */
+  unsigned char *zTerm;                 /* End of input */
+  unsigned char *z;                     /* Output iterator */
+  unsigned int c;
+
+  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+  assert( pMem->flags&MEM_Str );
+  assert( pMem->enc!=desiredEnc );
+  assert( pMem->enc!=0 );
+  assert( pMem->n>=0 );
+
+#if defined(TRANSLATE_TRACE) && defined(SQLITE_DEBUG)
+  {
+    char zBuf[100];
+    sqlite3VdbeMemPrettyPrint(pMem, zBuf);
+    fprintf(stderr, "INPUT:  %s\n", zBuf);
+  }
+#endif
+
+  /* If the translation is between UTF-16 little and big endian, then 
+  ** all that is required is to swap the byte order. This case is handled
+  ** differently from the others.
+  */
+  if( pMem->enc!=SQLITE_UTF8 && desiredEnc!=SQLITE_UTF8 ){
+    u8 temp;
+    int rc;
+    rc = sqlite3VdbeMemMakeWriteable(pMem);
+    if( rc!=SQLITE_OK ){
+      assert( rc==SQLITE_NOMEM );
+      return SQLITE_NOMEM;
+    }
+    zIn = (u8*)pMem->z;
+    zTerm = &zIn[pMem->n&~1];
+    while( zIn<zTerm ){
+      temp = *zIn;
+      *zIn = *(zIn+1);
+      zIn++;
+      *zIn++ = temp;
+    }
+    pMem->enc = desiredEnc;
+    goto translate_out;
+  }
+
+  /* Set len to the maximum number of bytes required in the output buffer. */
+  if( desiredEnc==SQLITE_UTF8 ){
+    /* When converting from UTF-16, the maximum growth results from
+    ** translating a 2-byte character to a 4-byte UTF-8 character.
+    ** A single byte is required for the output string
+    ** nul-terminator.
+    */
+    pMem->n &= ~1;
+    len = pMem->n * 2 + 1;
+  }else{
+    /* When converting from UTF-8 to UTF-16 the maximum growth is caused
+    ** when a 1-byte UTF-8 character is translated into a 2-byte UTF-16
+    ** character. Two bytes are required in the output buffer for the
+    ** nul-terminator.
+    */
+    len = pMem->n * 2 + 2;
+  }
+
+  /* Set zIn to point at the start of the input buffer and zTerm to point 1
+  ** byte past the end.
+  **
+  ** Variable zOut is set to point at the output buffer, space obtained
+  ** from sqlite3_malloc().
+  */
+  zIn = (u8*)pMem->z;
+  zTerm = &zIn[pMem->n];
+  zOut = sqlite3DbMallocRaw(pMem->db, len);
+  if( !zOut ){
+    return SQLITE_NOMEM;
+  }
+  z = zOut;
+
+  if( pMem->enc==SQLITE_UTF8 ){
+    if( desiredEnc==SQLITE_UTF16LE ){
+      /* UTF-8 -> UTF-16 Little-endian */
+      while( zIn<zTerm ){
+        /* c = sqlite3Utf8Read(zIn, zTerm, (const u8**)&zIn); */
+        READ_UTF8(zIn, zTerm, c);
+        WRITE_UTF16LE(z, c);
+      }
+    }else{
+      assert( desiredEnc==SQLITE_UTF16BE );
+      /* UTF-8 -> UTF-16 Big-endian */
+      while( zIn<zTerm ){
+        /* c = sqlite3Utf8Read(zIn, zTerm, (const u8**)&zIn); */
+        READ_UTF8(zIn, zTerm, c);
+        WRITE_UTF16BE(z, c);
+      }
+    }
+    pMem->n = (int)(z - zOut);
+    *z++ = 0;
+  }else{
+    assert( desiredEnc==SQLITE_UTF8 );
+    if( pMem->enc==SQLITE_UTF16LE ){
+      /* UTF-16 Little-endian -> UTF-8 */
+      while( zIn<zTerm ){
+        READ_UTF16LE(zIn, zIn<zTerm, c); 
+        WRITE_UTF8(z, c);
+      }
+    }else{
+      /* UTF-16 Big-endian -> UTF-8 */
+      while( zIn<zTerm ){
+        READ_UTF16BE(zIn, zIn<zTerm, c); 
+        WRITE_UTF8(z, c);
+      }
+    }
+    pMem->n = (int)(z - zOut);
+  }
+  *z = 0;
+  assert( (pMem->n+(desiredEnc==SQLITE_UTF8?1:2))<=len );
+
+  sqlite3VdbeMemRelease(pMem);
+  pMem->flags &= ~(MEM_Static|MEM_Dyn|MEM_Ephem);
+  pMem->enc = desiredEnc;
+  pMem->flags |= (MEM_Term|MEM_Dyn);
+  pMem->z = (char*)zOut;
+  pMem->zMalloc = pMem->z;
+
+translate_out:
+#if defined(TRANSLATE_TRACE) && defined(SQLITE_DEBUG)
+  {
+    char zBuf[100];
+    sqlite3VdbeMemPrettyPrint(pMem, zBuf);
+    fprintf(stderr, "OUTPUT: %s\n", zBuf);
+  }
+#endif
+  return SQLITE_OK;
+}
+
+/*
+** This routine checks for a byte-order mark at the beginning of the 
+** UTF-16 string stored in *pMem. If one is present, it is removed and
+** the encoding of the Mem adjusted. This routine does not do any
+** byte-swapping, it just sets Mem.enc appropriately.
+**
+** The allocation (static, dynamic etc.) and encoding of the Mem may be
+** changed by this function.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemHandleBom(Mem *pMem){
+  int rc = SQLITE_OK;
+  u8 bom = 0;
+
+  assert( pMem->n>=0 );
+  if( pMem->n>1 ){
+    u8 b1 = *(u8 *)pMem->z;
+    u8 b2 = *(((u8 *)pMem->z) + 1);
+    if( b1==0xFE && b2==0xFF ){
+      bom = SQLITE_UTF16BE;
+    }
+    if( b1==0xFF && b2==0xFE ){
+      bom = SQLITE_UTF16LE;
+    }
+  }
+  
+  if( bom ){
+    rc = sqlite3VdbeMemMakeWriteable(pMem);
+    if( rc==SQLITE_OK ){
+      pMem->n -= 2;
+      memmove(pMem->z, &pMem->z[2], pMem->n);
+      pMem->z[pMem->n] = '\0';
+      pMem->z[pMem->n+1] = '\0';
+      pMem->flags |= MEM_Term;
+      pMem->enc = bom;
+    }
+  }
+  return rc;
+}
+#endif /* SQLITE_OMIT_UTF16 */
+
+/*
+** pZ is a UTF-8 encoded unicode string. If nByte is less than zero,
+** return the number of unicode characters in pZ up to (but not including)
+** the first 0x00 byte. If nByte is not less than zero, return the
+** number of unicode characters in the first nByte of pZ (or up to 
+** the first 0x00, whichever comes first).
+*/
+SQLITE_PRIVATE int sqlite3Utf8CharLen(const char *zIn, int nByte){
+  int r = 0;
+  const u8 *z = (const u8*)zIn;
+  const u8 *zTerm;
+  if( nByte>=0 ){
+    zTerm = &z[nByte];
+  }else{
+    zTerm = (const u8*)(-1);
+  }
+  assert( z<=zTerm );
+  while( *z!=0 && z<zTerm ){
+    SQLITE_SKIP_UTF8(z);
+    r++;
+  }
+  return r;
+}
+
+/* This test function is not currently used by the automated test-suite. 
+** Hence it is only available in debug builds.
+*/
+#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)
+/*
+** Translate UTF-8 to UTF-8.
+**
+** This has the effect of making sure that the string is well-formed
+** UTF-8.  Miscoded characters are removed.
+**
+** The translation is done in-place and aborted if the output
+** overruns the input.
+*/
+SQLITE_PRIVATE int sqlite3Utf8To8(unsigned char *zIn){
+  unsigned char *zOut = zIn;
+  unsigned char *zStart = zIn;
+  u32 c;
+
+  while( zIn[0] && zOut<=zIn ){
+    c = sqlite3Utf8Read(zIn, (const u8**)&zIn);
+    if( c!=0xfffd ){
+      WRITE_UTF8(zOut, c);
+    }
+  }
+  *zOut = 0;
+  return (int)(zOut - zStart);
+}
+#endif
+
+#ifndef SQLITE_OMIT_UTF16
+/*
+** Convert a UTF-16 string in the native encoding into a UTF-8 string.
+** Memory to hold the UTF-8 string is obtained from sqlite3_malloc and must
+** be freed by the calling function.
+**
+** NULL is returned if there is an allocation error.
+*/
+SQLITE_PRIVATE char *sqlite3Utf16to8(sqlite3 *db, const void *z, int nByte, u8 enc){
+  Mem m;
+  memset(&m, 0, sizeof(m));
+  m.db = db;
+  sqlite3VdbeMemSetStr(&m, z, nByte, enc, SQLITE_STATIC);
+  sqlite3VdbeChangeEncoding(&m, SQLITE_UTF8);
+  if( db->mallocFailed ){
+    sqlite3VdbeMemRelease(&m);
+    m.z = 0;
+  }
+  assert( (m.flags & MEM_Term)!=0 || db->mallocFailed );
+  assert( (m.flags & MEM_Str)!=0 || db->mallocFailed );
+  assert( (m.flags & MEM_Dyn)!=0 || db->mallocFailed );
+  assert( m.z || db->mallocFailed );
+  return m.z;
+}
+
+/*
+** Convert a UTF-8 string to the UTF-16 encoding specified by parameter
+** enc. A pointer to the new string is returned, and the value of *pnOut
+** is set to the length of the returned string in bytes. The call should
+** arrange to call sqlite3DbFree() on the returned pointer when it is
+** no longer required.
+** 
+** If a malloc failure occurs, NULL is returned and the db.mallocFailed
+** flag set.
+*/
+#ifdef SQLITE_ENABLE_STAT2
+SQLITE_PRIVATE char *sqlite3Utf8to16(sqlite3 *db, u8 enc, char *z, int n, int *pnOut){
+  Mem m;
+  memset(&m, 0, sizeof(m));
+  m.db = db;
+  sqlite3VdbeMemSetStr(&m, z, n, SQLITE_UTF8, SQLITE_STATIC);
+  if( sqlite3VdbeMemTranslate(&m, enc) ){
+    assert( db->mallocFailed );
+    return 0;
+  }
+  assert( m.z==m.zMalloc );
+  *pnOut = m.n;
+  return m.z;
+}
+#endif
+
+/*
+** zIn is a UTF-16 encoded unicode string at least nChar characters long.
+** Return the number of bytes in the first nChar unicode characters
+** in pZ.  nChar must be non-negative.
+*/
+SQLITE_PRIVATE int sqlite3Utf16ByteLen(const void *zIn, int nChar){
+  int c;
+  unsigned char const *z = zIn;
+  int n = 0;
+  
+#ifdef SQLITE_BIGENDIAN
+    while( n<nChar ){
+		const int term = 1;
+      READ_UTF16BE(z, term, c);
+      n++;
+    }
+#else
+    while( n<nChar ){
+		const int term = 1;
+		READ_UTF16LE(z, term, c);
+		n++;
+    }
+#endif
+  return (int)(z-(unsigned char const *)zIn);
+}
+
+#if defined(SQLITE_TEST)
+/*
+** This routine is called from the TCL test function "translate_selftest".
+** It checks that the primitives for serializing and deserializing
+** characters in each encoding are inverses of each other.
+*/
+SQLITE_PRIVATE void sqlite3UtfSelfTest(void){
+  unsigned int i, t;
+  unsigned char zBuf[20];
+  unsigned char *z;
+  int n;
+  unsigned int c;
+
+  for(i=0; i<0x00110000; i++){
+    z = zBuf;
+    WRITE_UTF8(z, i);
+    n = (int)(z-zBuf);
+    assert( n>0 && n<=4 );
+    z[0] = 0;
+    z = zBuf;
+    c = sqlite3Utf8Read(z, (const u8**)&z);
+    t = i;
+    if( i>=0xD800 && i<=0xDFFF ) t = 0xFFFD;
+    if( (i&0xFFFFFFFE)==0xFFFE ) t = 0xFFFD;
+    assert( c==t );
+    assert( (z-zBuf)==n );
+  }
+  for(i=0; i<0x00110000; i++){
+    if( i>=0xD800 && i<0xE000 ) continue;
+    z = zBuf;
+    WRITE_UTF16LE(z, i);
+    n = (int)(z-zBuf);
+    assert( n>0 && n<=4 );
+    z[0] = 0;
+    z = zBuf;
+    READ_UTF16LE(z, 1, c);
+    assert( c==i );
+    assert( (z-zBuf)==n );
+  }
+  for(i=0; i<0x00110000; i++){
+    if( i>=0xD800 && i<0xE000 ) continue;
+    z = zBuf;
+    WRITE_UTF16BE(z, i);
+    n = (int)(z-zBuf);
+    assert( n>0 && n<=4 );
+    z[0] = 0;
+    z = zBuf;
+    READ_UTF16BE(z, 1, c);
+    assert( c==i );
+    assert( (z-zBuf)==n );
+  }
+}
+#endif /* SQLITE_TEST */
+#endif /* SQLITE_OMIT_UTF16 */
+
+/************** End of utf.c *************************************************/
+/************** Begin file util.c ********************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** Utility functions used throughout sqlite.
+**
+** This file contains functions for allocating memory, comparing
+** strings, and stuff like that.
+**
+*/
+#ifdef SQLITE_HAVE_ISNAN
+# include <math.h>
+#endif
+
+/*
+** Routine needed to support the testcase() macro.
+*/
+#ifdef SQLITE_COVERAGE_TEST
+SQLITE_PRIVATE void sqlite3Coverage(int x){
+  static unsigned dummy = 0;
+  dummy += (unsigned)x;
+}
+#endif
+
+#ifndef SQLITE_OMIT_FLOATING_POINT
+/*
+** Return true if the floating point value is Not a Number (NaN).
+**
+** Use the math library isnan() function if compiled with SQLITE_HAVE_ISNAN.
+** Otherwise, we have our own implementation that works on most systems.
+*/
+SQLITE_PRIVATE int sqlite3IsNaN(double x){
+  int rc;   /* The value return */
+#if !defined(SQLITE_HAVE_ISNAN)
+  /*
+  ** Systems that support the isnan() library function should probably
+  ** make use of it by compiling with -DSQLITE_HAVE_ISNAN.  But we have
+  ** found that many systems do not have a working isnan() function so
+  ** this implementation is provided as an alternative.
+  **
+  ** This NaN test sometimes fails if compiled on GCC with -ffast-math.
+  ** On the other hand, the use of -ffast-math comes with the following
+  ** warning:
+  **
+  **      This option [-ffast-math] should never be turned on by any
+  **      -O option since it can result in incorrect output for programs
+  **      which depend on an exact implementation of IEEE or ISO 
+  **      rules/specifications for math functions.
+  **
+  ** Under MSVC, this NaN test may fail if compiled with a floating-
+  ** point precision mode other than /fp:precise.  From the MSDN 
+  ** documentation:
+  **
+  **      The compiler [with /fp:precise] will properly handle comparisons 
+  **      involving NaN. For example, x != x evaluates to true if x is NaN 
+  **      ...
+  */
+#ifdef __FAST_MATH__
+# error SQLite will not work correctly with the -ffast-math option of GCC.
+#endif
+  volatile double y = x;
+  volatile double z = y;
+  rc = (y!=z);
+#else  /* if defined(SQLITE_HAVE_ISNAN) */
+  rc = isnan(x);
+#endif /* SQLITE_HAVE_ISNAN */
+  testcase( rc );
+  return rc;
+}
+#endif /* SQLITE_OMIT_FLOATING_POINT */
+
+/*
+** Compute a string length that is limited to what can be stored in
+** lower 30 bits of a 32-bit signed integer.
+**
+** The value returned will never be negative.  Nor will it ever be greater
+** than the actual length of the string.  For very long strings (greater
+** than 1GiB) the value returned might be less than the true string length.
+*/
+SQLITE_PRIVATE int sqlite3Strlen30(const char *z){
+  const char *z2 = z;
+  if( z==0 ) return 0;
+  while( *z2 ){ z2++; }
+  return 0x3fffffff & (int)(z2 - z);
+}
+
+/*
+** Set the most recent error code and error string for the sqlite
+** handle "db". The error code is set to "err_code".
+**
+** If it is not NULL, string zFormat specifies the format of the
+** error string in the style of the printf functions: The following
+** format characters are allowed:
+**
+**      %s      Insert a string
+**      %z      A string that should be freed after use
+**      %d      Insert an integer
+**      %T      Insert a token
+**      %S      Insert the first element of a SrcList
+**
+** zFormat and any string tokens that follow it are assumed to be
+** encoded in UTF-8.
+**
+** To clear the most recent error for sqlite handle "db", sqlite3Error
+** should be called with err_code set to SQLITE_OK and zFormat set
+** to NULL.
+*/
+SQLITE_PRIVATE void sqlite3Error(sqlite3 *db, int err_code, const char *zFormat, ...){
+  if( db && (db->pErr || (db->pErr = sqlite3ValueNew(db))!=0) ){
+    db->errCode = err_code;
+    if( zFormat ){
+      char *z;
+      va_list ap;
+      va_start(ap, zFormat);
+      z = sqlite3VMPrintf(db, zFormat, ap);
+      va_end(ap);
+      sqlite3ValueSetStr(db->pErr, -1, z, SQLITE_UTF8, SQLITE_DYNAMIC);
+    }else{
+      sqlite3ValueSetStr(db->pErr, 0, 0, SQLITE_UTF8, SQLITE_STATIC);
+    }
+  }
+}
+
+/*
+** Add an error message to pParse->zErrMsg and increment pParse->nErr.
+** The following formatting characters are allowed:
+**
+**      %s      Insert a string
+**      %z      A string that should be freed after use
+**      %d      Insert an integer
+**      %T      Insert a token
+**      %S      Insert the first element of a SrcList
+**
+** This function should be used to report any error that occurs whilst
+** compiling an SQL statement (i.e. within sqlite3_prepare()). The
+** last thing the sqlite3_prepare() function does is copy the error
+** stored by this function into the database handle using sqlite3Error().
+** Function sqlite3Error() should be used during statement execution
+** (sqlite3_step() etc.).
+*/
+SQLITE_PRIVATE void sqlite3ErrorMsg(Parse *pParse, const char *zFormat, ...){
+  char *zMsg;
+  va_list ap;
+  sqlite3 *db = pParse->db;
+  va_start(ap, zFormat);
+  zMsg = sqlite3VMPrintf(db, zFormat, ap);
+  va_end(ap);
+  if( db->suppressErr ){
+    sqlite3DbFree(db, zMsg);
+  }else{
+    pParse->nErr++;
+    sqlite3DbFree(db, pParse->zErrMsg);
+    pParse->zErrMsg = zMsg;
+    pParse->rc = SQLITE_ERROR;
+  }
+}
+
+/*
+** Convert an SQL-style quoted string into a normal string by removing
+** the quote characters.  The conversion is done in-place.  If the
+** input does not begin with a quote character, then this routine
+** is a no-op.
+**
+** The input string must be zero-terminated.  A new zero-terminator
+** is added to the dequoted string.
+**
+** The return value is -1 if no dequoting occurs or the length of the
+** dequoted string, exclusive of the zero terminator, if dequoting does
+** occur.
+**
+** 2002-Feb-14: This routine is extended to remove MS-Access style
+** brackets from around identifers.  For example:  "[a-b-c]" becomes
+** "a-b-c".
+*/
+SQLITE_PRIVATE int sqlite3Dequote(char *z){
+  char quote;
+  int i, j;
+  if( z==0 ) return -1;
+  quote = z[0];
+  switch( quote ){
+    case '\'':  break;
+    case '"':   break;
+    case '`':   break;                /* For MySQL compatibility */
+    case '[':   quote = ']';  break;  /* For MS SqlServer compatibility */
+    default:    return -1;
+  }
+  for(i=1, j=0; ALWAYS(z[i]); i++){
+    if( z[i]==quote ){
+      if( z[i+1]==quote ){
+        z[j++] = quote;
+        i++;
+      }else{
+        break;
+      }
+    }else{
+      z[j++] = z[i];
+    }
+  }
+  z[j] = 0;
+  return j;
+}
+
+/* Convenient short-hand */
+#define UpperToLower sqlite3UpperToLower
+
+/*
+** Some systems have stricmp().  Others have strcasecmp().  Because
+** there is no consistency, we will define our own.
+**
+** IMPLEMENTATION-OF: R-20522-24639 The sqlite3_strnicmp() API allows
+** applications and extensions to compare the contents of two buffers
+** containing UTF-8 strings in a case-independent fashion, using the same
+** definition of case independence that SQLite uses internally when
+** comparing identifiers.
+*/
+SQLITE_PRIVATE int sqlite3StrICmp(const char *zLeft, const char *zRight){
+  register unsigned char *a, *b;
+  a = (unsigned char *)zLeft;
+  b = (unsigned char *)zRight;
+  while( *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
+  return UpperToLower[*a] - UpperToLower[*b];
+}
+SQLITE_API int sqlite3_strnicmp(const char *zLeft, const char *zRight, int N){
+  register unsigned char *a, *b;
+  a = (unsigned char *)zLeft;
+  b = (unsigned char *)zRight;
+  while( N-- > 0 && *a!=0 && UpperToLower[*a]==UpperToLower[*b]){ a++; b++; }
+  return N<0 ? 0 : UpperToLower[*a] - UpperToLower[*b];
+}
+
+/*
+** The string z[] is an text representation of a real number.
+** Convert this string to a double and write it into *pResult.
+**
+** The string z[] is length bytes in length (bytes, not characters) and
+** uses the encoding enc.  The string is not necessarily zero-terminated.
+**
+** Return TRUE if the result is a valid real number (or integer) and FALSE
+** if the string is empty or contains extraneous text.  Valid numbers
+** are in one of these formats:
+**
+**    [+-]digits[E[+-]digits]
+**    [+-]digits.[digits][E[+-]digits]
+**    [+-].digits[E[+-]digits]
+**
+** Leading and trailing whitespace is ignored for the purpose of determining
+** validity.
+**
+** If some prefix of the input string is a valid number, this routine
+** returns FALSE but it still converts the prefix and writes the result
+** into *pResult.
+*/
+SQLITE_PRIVATE int sqlite3AtoF(const char *z, double *pResult, int length, u8 enc){
+#ifndef SQLITE_OMIT_FLOATING_POINT
+  int incr = (enc==SQLITE_UTF8?1:2);
+  const char *zEnd = z + length;
+  /* sign * significand * (10 ^ (esign * exponent)) */
+  int sign = 1;    /* sign of significand */
+  i64 s = 0;       /* significand */
+  int d = 0;       /* adjust exponent for shifting decimal point */
+  int esign = 1;   /* sign of exponent */
+  int e = 0;       /* exponent */
+  int eValid = 1;  /* True exponent is either not used or is well-formed */
+  double result;
+  int nDigits = 0;
+
+  *pResult = 0.0;   /* Default return value, in case of an error */
+
+  if( enc==SQLITE_UTF16BE ) z++;
+
+  /* skip leading spaces */
+  while( z<zEnd && sqlite3Isspace(*z) ) z+=incr;
+  if( z>=zEnd ) return 0;
+
+  /* get sign of significand */
+  if( *z=='-' ){
+    sign = -1;
+    z+=incr;
+  }else if( *z=='+' ){
+    z+=incr;
+  }
+
+  /* skip leading zeroes */
+  while( z<zEnd && z[0]=='0' ) z+=incr, nDigits++;
+
+  /* copy max significant digits to significand */
+  while( z<zEnd && sqlite3Isdigit(*z) && s<((LARGEST_INT64-9)/10) ){
+    s = s*10 + (*z - '0');
+    z+=incr, nDigits++;
+  }
+
+  /* skip non-significant significand digits
+  ** (increase exponent by d to shift decimal left) */
+  while( z<zEnd && sqlite3Isdigit(*z) ) z+=incr, nDigits++, d++;
+  if( z>=zEnd ) goto do_atof_calc;
+
+  /* if decimal point is present */
+  if( *z=='.' ){
+    z+=incr;
+    /* copy digits from after decimal to significand
+    ** (decrease exponent by d to shift decimal right) */
+    while( z<zEnd && sqlite3Isdigit(*z) && s<((LARGEST_INT64-9)/10) ){
+      s = s*10 + (*z - '0');
+      z+=incr, nDigits++, d--;
+    }
+    /* skip non-significant digits */
+    while( z<zEnd && sqlite3Isdigit(*z) ) z+=incr, nDigits++;
+  }
+  if( z>=zEnd ) goto do_atof_calc;
+
+  /* if exponent is present */
+  if( *z=='e' || *z=='E' ){
+    z+=incr;
+    eValid = 0;
+    if( z>=zEnd ) goto do_atof_calc;
+    /* get sign of exponent */
+    if( *z=='-' ){
+      esign = -1;
+      z+=incr;
+    }else if( *z=='+' ){
+      z+=incr;
+    }
+    /* copy digits to exponent */
+    while( z<zEnd && sqlite3Isdigit(*z) ){
+      e = e*10 + (*z - '0');
+      z+=incr;
+      eValid = 1;
+    }
+  }
+
+  /* skip trailing spaces */
+  if( nDigits && eValid ){
+    while( z<zEnd && sqlite3Isspace(*z) ) z+=incr;
+  }
+
+do_atof_calc:
+  /* adjust exponent by d, and update sign */
+  e = (e*esign) + d;
+  if( e<0 ) {
+    esign = -1;
+    e *= -1;
+  } else {
+    esign = 1;
+  }
+
+  /* if 0 significand */
+  if( !s ) {
+    /* In the IEEE 754 standard, zero is signed.
+    ** Add the sign if we've seen at least one digit */
+    result = (sign<0 && nDigits) ? -(double)0 : (double)0;
+  } else {
+    /* attempt to reduce exponent */
+    if( esign>0 ){
+      while( s<(LARGEST_INT64/10) && e>0 ) e--,s*=10;
+    }else{
+      while( !(s%10) && e>0 ) e--,s/=10;
+    }
+
+    /* adjust the sign of significand */
+    s = sign<0 ? -s : s;
+
+    /* if exponent, scale significand as appropriate
+    ** and store in result. */
+    if( e ){
+      double scale = 1.0;
+      /* attempt to handle extremely small/large numbers better */
+      if( e>307 && e<342 ){
+        while( e%308 ) { scale *= 1.0e+1; e -= 1; }
+        if( esign<0 ){
+          result = s / scale;
+          result /= 1.0e+308;
+        }else{
+          result = s * scale;
+          result *= 1.0e+308;
+        }
+      }else{
+        /* 1.0e+22 is the largest power of 10 than can be 
+        ** represented exactly. */
+        while( e%22 ) { scale *= 1.0e+1; e -= 1; }
+        while( e>0 ) { scale *= 1.0e+22; e -= 22; }
+        if( esign<0 ){
+          result = s / scale;
+        }else{
+          result = s * scale;
+        }
+      }
+    } else {
+      result = (double)s;
+    }
+  }
+
+  /* store the result */
+  *pResult = result;
+
+  /* return true if number and no extra non-whitespace chracters after */
+  return z>=zEnd && nDigits>0 && eValid;
+#else
+  return !sqlite3Atoi64(z, pResult, length, enc);
+#endif /* SQLITE_OMIT_FLOATING_POINT */
+}
+
+/*
+** Compare the 19-character string zNum against the text representation
+** value 2^63:  9223372036854775808.  Return negative, zero, or positive
+** if zNum is less than, equal to, or greater than the string.
+** Note that zNum must contain exactly 19 characters.
+**
+** Unlike memcmp() this routine is guaranteed to return the difference
+** in the values of the last digit if the only difference is in the
+** last digit.  So, for example,
+**
+**      compare2pow63("9223372036854775800", 1)
+**
+** will return -8.
+*/
+static int compare2pow63(const char *zNum, int incr){
+  int c = 0;
+  int i;
+                    /* 012345678901234567 */
+  const char *pow63 = "922337203685477580";
+  for(i=0; c==0 && i<18; i++){
+    c = (zNum[i*incr]-pow63[i])*10;
+  }
+  if( c==0 ){
+    c = zNum[18*incr] - '8';
+    testcase( c==(-1) );
+    testcase( c==0 );
+    testcase( c==(+1) );
+  }
+  return c;
+}
+
+
+/*
+** Convert zNum to a 64-bit signed integer.
+**
+** If the zNum value is representable as a 64-bit twos-complement 
+** integer, then write that value into *pNum and return 0.
+**
+** If zNum is exactly 9223372036854665808, return 2.  This special
+** case is broken out because while 9223372036854665808 cannot be a 
+** signed 64-bit integer, its negative -9223372036854665808 can be.
+**
+** If zNum is too big for a 64-bit integer and is not
+** 9223372036854665808 then return 1.
+**
+** length is the number of bytes in the string (bytes, not characters).
+** The string is not necessarily zero-terminated.  The encoding is
+** given by enc.
+*/
+SQLITE_PRIVATE int sqlite3Atoi64(const char *zNum, i64 *pNum, int length, u8 enc){
+  int incr = (enc==SQLITE_UTF8?1:2);
+  u64 u = 0;
+  int neg = 0; /* assume positive */
+  int i;
+  int c = 0;
+  const char *zStart;
+  const char *zEnd = zNum + length;
+  if( enc==SQLITE_UTF16BE ) zNum++;
+  while( zNum<zEnd && sqlite3Isspace(*zNum) ) zNum+=incr;
+  if( zNum<zEnd ){
+    if( *zNum=='-' ){
+      neg = 1;
+      zNum+=incr;
+    }else if( *zNum=='+' ){
+      zNum+=incr;
+    }
+  }
+  zStart = zNum;
+  while( zNum<zEnd && zNum[0]=='0' ){ zNum+=incr; } /* Skip leading zeros. */
+  for(i=0; &zNum[i]<zEnd && (c=zNum[i])>='0' && c<='9'; i+=incr){
+    u = u*10 + c - '0';
+  }
+  if( u>LARGEST_INT64 ){
+    *pNum = SMALLEST_INT64;
+  }else if( neg ){
+    *pNum = -(i64)u;
+  }else{
+    *pNum = (i64)u;
+  }
+  testcase( i==18 );
+  testcase( i==19 );
+  testcase( i==20 );
+  if( (c!=0 && &zNum[i]<zEnd) || (i==0 && zStart==zNum) || i>19*incr ){
+    /* zNum is empty or contains non-numeric text or is longer
+    ** than 19 digits (thus guaranteeing that it is too large) */
+    return 1;
+  }else if( i<19*incr ){
+    /* Less than 19 digits, so we know that it fits in 64 bits */
+    assert( u<=LARGEST_INT64 );
+    return 0;
+  }else{
+    /* zNum is a 19-digit numbers.  Compare it against 9223372036854775808. */
+    c = compare2pow63(zNum, incr);
+    if( c<0 ){
+      /* zNum is less than 9223372036854775808 so it fits */
+      assert( u<=LARGEST_INT64 );
+      return 0;
+    }else if( c>0 ){
+      /* zNum is greater than 9223372036854775808 so it overflows */
+      return 1;
+    }else{
+      /* zNum is exactly 9223372036854775808.  Fits if negative.  The
+      ** special case 2 overflow if positive */
+      assert( u-1==LARGEST_INT64 );
+      assert( (*pNum)==SMALLEST_INT64 );
+      return neg ? 0 : 2;
+    }
+  }
+}
+
+/*
+** If zNum represents an integer that will fit in 32-bits, then set
+** *pValue to that integer and return true.  Otherwise return false.
+**
+** Any non-numeric characters that following zNum are ignored.
+** This is different from sqlite3Atoi64() which requires the
+** input number to be zero-terminated.
+*/
+SQLITE_PRIVATE int sqlite3GetInt32(const char *zNum, int *pValue){
+  sqlite_int64 v = 0;
+  int i, c;
+  int neg = 0;
+  if( zNum[0]=='-' ){
+    neg = 1;
+    zNum++;
+  }else if( zNum[0]=='+' ){
+    zNum++;
+  }
+  while( zNum[0]=='0' ) zNum++;
+  for(i=0; i<11 && (c = zNum[i] - '0')>=0 && c<=9; i++){
+    v = v*10 + c;
+  }
+
+  /* The longest decimal representation of a 32 bit integer is 10 digits:
+  **
+  **             1234567890
+  **     2^31 -> 2147483648
+  */
+  testcase( i==10 );
+  if( i>10 ){
+    return 0;
+  }
+  testcase( v-neg==2147483647 );
+  if( v-neg>2147483647 ){
+    return 0;
+  }
+  if( neg ){
+    v = -v;
+  }
+  *pValue = (int)v;
+  return 1;
+}
+
+/*
+** Return a 32-bit integer value extracted from a string.  If the
+** string is not an integer, just return 0.
+*/
+SQLITE_PRIVATE int sqlite3Atoi(const char *z){
+  int x = 0;
+  if( z ) sqlite3GetInt32(z, &x);
+  return x;
+}
+
+/*
+** The variable-length integer encoding is as follows:
+**
+** KEY:
+**         A = 0xxxxxxx    7 bits of data and one flag bit
+**         B = 1xxxxxxx    7 bits of data and one flag bit
+**         C = xxxxxxxx    8 bits of data
+**
+**  7 bits - A
+** 14 bits - BA
+** 21 bits - BBA
+** 28 bits - BBBA
+** 35 bits - BBBBA
+** 42 bits - BBBBBA
+** 49 bits - BBBBBBA
+** 56 bits - BBBBBBBA
+** 64 bits - BBBBBBBBC
+*/
+
+/*
+** Write a 64-bit variable-length integer to memory starting at p[0].
+** The length of data write will be between 1 and 9 bytes.  The number
+** of bytes written is returned.
+**
+** A variable-length integer consists of the lower 7 bits of each byte
+** for all bytes that have the 8th bit set and one byte with the 8th
+** bit clear.  Except, if we get to the 9th byte, it stores the full
+** 8 bits and is the last byte.
+*/
+SQLITE_PRIVATE int sqlite3PutVarint(unsigned char *p, u64 v){
+  int i, j, n;
+  u8 buf[10];
+  if( v & (((u64)0xff000000)<<32) ){
+    p[8] = (u8)v;
+    v >>= 8;
+    for(i=7; i>=0; i--){
+      p[i] = (u8)((v & 0x7f) | 0x80);
+      v >>= 7;
+    }
+    return 9;
+  }    
+  n = 0;
+  do{
+    buf[n++] = (u8)((v & 0x7f) | 0x80);
+    v >>= 7;
+  }while( v!=0 );
+  buf[0] &= 0x7f;
+  assert( n<=9 );
+  for(i=0, j=n-1; j>=0; j--, i++){
+    p[i] = buf[j];
+  }
+  return n;
+}
+
+/*
+** This routine is a faster version of sqlite3PutVarint() that only
+** works for 32-bit positive integers and which is optimized for
+** the common case of small integers.  A MACRO version, putVarint32,
+** is provided which inlines the single-byte case.  All code should use
+** the MACRO version as this function assumes the single-byte case has
+** already been handled.
+*/
+SQLITE_PRIVATE int sqlite3PutVarint32(unsigned char *p, u32 v){
+#ifndef putVarint32
+  if( (v & ~0x7f)==0 ){
+    p[0] = v;
+    return 1;
+  }
+#endif
+  if( (v & ~0x3fff)==0 ){
+    p[0] = (u8)((v>>7) | 0x80);
+    p[1] = (u8)(v & 0x7f);
+    return 2;
+  }
+  return sqlite3PutVarint(p, v);
+}
+
+/*
+** Bitmasks used by sqlite3GetVarint().  These precomputed constants
+** are defined here rather than simply putting the constant expressions
+** inline in order to work around bugs in the RVT compiler.
+**
+** SLOT_2_0     A mask for  (0x7f<<14) | 0x7f
+**
+** SLOT_4_2_0   A mask for  (0x7f<<28) | SLOT_2_0
+*/
+#define SLOT_2_0     0x001fc07f
+#define SLOT_4_2_0   0xf01fc07f
+
+
+/*
+** Read a 64-bit variable-length integer from memory starting at p[0].
+** Return the number of bytes read.  The value is stored in *v.
+*/
+SQLITE_PRIVATE u8 sqlite3GetVarint(const unsigned char *p, u64 *v){
+  u32 a,b,s;
+
+  a = *p;
+  /* a: p0 (unmasked) */
+  if (!(a&0x80))
+  {
+    *v = a;
+    return 1;
+  }
+
+  p++;
+  b = *p;
+  /* b: p1 (unmasked) */
+  if (!(b&0x80))
+  {
+    a &= 0x7f;
+    a = a<<7;
+    a |= b;
+    *v = a;
+    return 2;
+  }
+
+  /* Verify that constants are precomputed correctly */
+  assert( SLOT_2_0 == ((0x7f<<14) | (0x7f)) );
+  assert( SLOT_4_2_0 == ((0xfU<<28) | (0x7f<<14) | (0x7f)) );
+
+  p++;
+  a = a<<14;
+  a |= *p;
+  /* a: p0<<14 | p2 (unmasked) */
+  if (!(a&0x80))
+  {
+    a &= SLOT_2_0;
+    b &= 0x7f;
+    b = b<<7;
+    a |= b;
+    *v = a;
+    return 3;
+  }
+
+  /* CSE1 from below */
+  a &= SLOT_2_0;
+  p++;
+  b = b<<14;
+  b |= *p;
+  /* b: p1<<14 | p3 (unmasked) */
+  if (!(b&0x80))
+  {
+    b &= SLOT_2_0;
+    /* moved CSE1 up */
+    /* a &= (0x7f<<14)|(0x7f); */
+    a = a<<7;
+    a |= b;
+    *v = a;
+    return 4;
+  }
+
+  /* a: p0<<14 | p2 (masked) */
+  /* b: p1<<14 | p3 (unmasked) */
+  /* 1:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
+  /* moved CSE1 up */
+  /* a &= (0x7f<<14)|(0x7f); */
+  b &= SLOT_2_0;
+  s = a;
+  /* s: p0<<14 | p2 (masked) */
+
+  p++;
+  a = a<<14;
+  a |= *p;
+  /* a: p0<<28 | p2<<14 | p4 (unmasked) */
+  if (!(a&0x80))
+  {
+    /* we can skip these cause they were (effectively) done above in calc'ing s */
+    /* a &= (0x7f<<28)|(0x7f<<14)|(0x7f); */
+    /* b &= (0x7f<<14)|(0x7f); */
+    b = b<<7;
+    a |= b;
+    s = s>>18;
+    *v = ((u64)s)<<32 | a;
+    return 5;
+  }
+
+  /* 2:save off p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
+  s = s<<7;
+  s |= b;
+  /* s: p0<<21 | p1<<14 | p2<<7 | p3 (masked) */
+
+  p++;
+  b = b<<14;
+  b |= *p;
+  /* b: p1<<28 | p3<<14 | p5 (unmasked) */
+  if (!(b&0x80))
+  {
+    /* we can skip this cause it was (effectively) done above in calc'ing s */
+    /* b &= (0x7f<<28)|(0x7f<<14)|(0x7f); */
+    a &= SLOT_2_0;
+    a = a<<7;
+    a |= b;
+    s = s>>18;
+    *v = ((u64)s)<<32 | a;
+    return 6;
+  }
+
+  p++;
+  a = a<<14;
+  a |= *p;
+  /* a: p2<<28 | p4<<14 | p6 (unmasked) */
+  if (!(a&0x80))
+  {
+    a &= SLOT_4_2_0;
+    b &= SLOT_2_0;
+    b = b<<7;
+    a |= b;
+    s = s>>11;
+    *v = ((u64)s)<<32 | a;
+    return 7;
+  }
+
+  /* CSE2 from below */
+  a &= SLOT_2_0;
+  p++;
+  b = b<<14;
+  b |= *p;
+  /* b: p3<<28 | p5<<14 | p7 (unmasked) */
+  if (!(b&0x80))
+  {
+    b &= SLOT_4_2_0;
+    /* moved CSE2 up */
+    /* a &= (0x7f<<14)|(0x7f); */
+    a = a<<7;
+    a |= b;
+    s = s>>4;
+    *v = ((u64)s)<<32 | a;
+    return 8;
+  }
+
+  p++;
+  a = a<<15;
+  a |= *p;
+  /* a: p4<<29 | p6<<15 | p8 (unmasked) */
+
+  /* moved CSE2 up */
+  /* a &= (0x7f<<29)|(0x7f<<15)|(0xff); */
+  b &= SLOT_2_0;
+  b = b<<8;
+  a |= b;
+
+  s = s<<4;
+  b = p[-4];
+  b &= 0x7f;
+  b = b>>3;
+  s |= b;
+
+  *v = ((u64)s)<<32 | a;
+
+  return 9;
+}
+
+/*
+** Read a 32-bit variable-length integer from memory starting at p[0].
+** Return the number of bytes read.  The value is stored in *v.
+**
+** If the varint stored in p[0] is larger than can fit in a 32-bit unsigned
+** integer, then set *v to 0xffffffff.
+**
+** A MACRO version, getVarint32, is provided which inlines the 
+** single-byte case.  All code should use the MACRO version as 
+** this function assumes the single-byte case has already been handled.
+*/
+SQLITE_PRIVATE u8 sqlite3GetVarint32(const unsigned char *p, u32 *v){
+  u32 a,b;
+
+  /* The 1-byte case.  Overwhelmingly the most common.  Handled inline
+  ** by the getVarin32() macro */
+  a = *p;
+  /* a: p0 (unmasked) */
+#ifndef getVarint32
+  if (!(a&0x80))
+  {
+    /* Values between 0 and 127 */
+    *v = a;
+    return 1;
+  }
+#endif
+
+  /* The 2-byte case */
+  p++;
+  b = *p;
+  /* b: p1 (unmasked) */
+  if (!(b&0x80))
+  {
+    /* Values between 128 and 16383 */
+    a &= 0x7f;
+    a = a<<7;
+    *v = a | b;
+    return 2;
+  }
+
+  /* The 3-byte case */
+  p++;
+  a = a<<14;
+  a |= *p;
+  /* a: p0<<14 | p2 (unmasked) */
+  if (!(a&0x80))
+  {
+    /* Values between 16384 and 2097151 */
+    a &= (0x7f<<14)|(0x7f);
+    b &= 0x7f;
+    b = b<<7;
+    *v = a | b;
+    return 3;
+  }
+
+  /* A 32-bit varint is used to store size information in btrees.
+  ** Objects are rarely larger than 2MiB limit of a 3-byte varint.
+  ** A 3-byte varint is sufficient, for example, to record the size
+  ** of a 1048569-byte BLOB or string.
+  **
+  ** We only unroll the first 1-, 2-, and 3- byte cases.  The very
+  ** rare larger cases can be handled by the slower 64-bit varint
+  ** routine.
+  */
+#if 1
+  {
+    u64 v64;
+    u8 n;
+
+    p -= 2;
+    n = sqlite3GetVarint(p, &v64);
+    assert( n>3 && n<=9 );
+    if( (v64 & SQLITE_MAX_U32)!=v64 ){
+      *v = 0xffffffff;
+    }else{
+      *v = (u32)v64;
+    }
+    return n;
+  }
+
+#else
+  /* For following code (kept for historical record only) shows an
+  ** unrolling for the 3- and 4-byte varint cases.  This code is
+  ** slightly faster, but it is also larger and much harder to test.
+  */
+  p++;
+  b = b<<14;
+  b |= *p;
+  /* b: p1<<14 | p3 (unmasked) */
+  if (!(b&0x80))
+  {
+    /* Values between 2097152 and 268435455 */
+    b &= (0x7f<<14)|(0x7f);
+    a &= (0x7f<<14)|(0x7f);
+    a = a<<7;
+    *v = a | b;
+    return 4;
+  }
+
+  p++;
+  a = a<<14;
+  a |= *p;
+  /* a: p0<<28 | p2<<14 | p4 (unmasked) */
+  if (!(a&0x80))
+  {
+    /* Values  between 268435456 and 34359738367 */
+    a &= SLOT_4_2_0;
+    b &= SLOT_4_2_0;
+    b = b<<7;
+    *v = a | b;
+    return 5;
+  }
+
+  /* We can only reach this point when reading a corrupt database
+  ** file.  In that case we are not in any hurry.  Use the (relatively
+  ** slow) general-purpose sqlite3GetVarint() routine to extract the
+  ** value. */
+  {
+    u64 v64;
+    u8 n;
+
+    p -= 4;
+    n = sqlite3GetVarint(p, &v64);
+    assert( n>5 && n<=9 );
+    *v = (u32)v64;
+    return n;
+  }
+#endif
+}
+
+/*
+** Return the number of bytes that will be needed to store the given
+** 64-bit integer.
+*/
+SQLITE_PRIVATE int sqlite3VarintLen(u64 v){
+  int i = 0;
+  do{
+    i++;
+    v >>= 7;
+  }while( v!=0 && ALWAYS(i<9) );
+  return i;
+}
+
+
+/*
+** Read or write a four-byte big-endian integer value.
+*/
+SQLITE_PRIVATE u32 sqlite3Get4byte(const u8 *p){
+  return (p[0]<<24) | (p[1]<<16) | (p[2]<<8) | p[3];
+}
+SQLITE_PRIVATE void sqlite3Put4byte(unsigned char *p, u32 v){
+  p[0] = (u8)(v>>24);
+  p[1] = (u8)(v>>16);
+  p[2] = (u8)(v>>8);
+  p[3] = (u8)v;
+}
+
+
+
+#if !defined(SQLITE_OMIT_BLOB_LITERAL) || defined(SQLITE_HAS_CODEC)
+/*
+** Translate a single byte of Hex into an integer.
+** This routine only works if h really is a valid hexadecimal
+** character:  0..9a..fA..F
+*/
+static u8 hexToInt(int h){
+  assert( (h>='0' && h<='9') ||  (h>='a' && h<='f') ||  (h>='A' && h<='F') );
+#ifdef SQLITE_ASCII
+  h += 9*(1&(h>>6));
+#endif
+#ifdef SQLITE_EBCDIC
+  h += 9*(1&~(h>>4));
+#endif
+  return (u8)(h & 0xf);
+}
+#endif /* !SQLITE_OMIT_BLOB_LITERAL || SQLITE_HAS_CODEC */
+
+#if !defined(SQLITE_OMIT_BLOB_LITERAL) || defined(SQLITE_HAS_CODEC)
+/*
+** Convert a BLOB literal of the form "x'hhhhhh'" into its binary
+** value.  Return a pointer to its binary value.  Space to hold the
+** binary value has been obtained from malloc and must be freed by
+** the calling routine.
+*/
+SQLITE_PRIVATE void *sqlite3HexToBlob(sqlite3 *db, const char *z, int n){
+  char *zBlob;
+  int i;
+
+  zBlob = (char *)sqlite3DbMallocRaw(db, n/2 + 1);
+  n--;
+  if( zBlob ){
+    for(i=0; i<n; i+=2){
+      zBlob[i/2] = (hexToInt(z[i])<<4) | hexToInt(z[i+1]);
+    }
+    zBlob[i/2] = 0;
+  }
+  return zBlob;
+}
+#endif /* !SQLITE_OMIT_BLOB_LITERAL || SQLITE_HAS_CODEC */
+
+/*
+** Log an error that is an API call on a connection pointer that should
+** not have been used.  The "type" of connection pointer is given as the
+** argument.  The zType is a word like "NULL" or "closed" or "invalid".
+*/
+static void logBadConnection(const char *zType){
+  sqlite3_log(SQLITE_MISUSE, 
+     "API call with %s database connection pointer",
+     zType
+  );
+}
+
+/*
+** Check to make sure we have a valid db pointer.  This test is not
+** foolproof but it does provide some measure of protection against
+** misuse of the interface such as passing in db pointers that are
+** NULL or which have been previously closed.  If this routine returns
+** 1 it means that the db pointer is valid and 0 if it should not be
+** dereferenced for any reason.  The calling function should invoke
+** SQLITE_MISUSE immediately.
+**
+** sqlite3SafetyCheckOk() requires that the db pointer be valid for
+** use.  sqlite3SafetyCheckSickOrOk() allows a db pointer that failed to
+** open properly and is not fit for general use but which can be
+** used as an argument to sqlite3_errmsg() or sqlite3_close().
+*/
+SQLITE_PRIVATE int sqlite3SafetyCheckOk(sqlite3 *db){
+  u32 magic;
+  if( db==0 ){
+    logBadConnection("NULL");
+    return 0;
+  }
+  magic = db->magic;
+  if( magic!=SQLITE_MAGIC_OPEN ){
+    if( sqlite3SafetyCheckSickOrOk(db) ){
+      testcase( sqlite3GlobalConfig.xLog!=0 );
+      logBadConnection("unopened");
+    }
+    return 0;
+  }else{
+    return 1;
+  }
+}
+SQLITE_PRIVATE int sqlite3SafetyCheckSickOrOk(sqlite3 *db){
+  u32 magic;
+  magic = db->magic;
+  if( magic!=SQLITE_MAGIC_SICK &&
+      magic!=SQLITE_MAGIC_OPEN &&
+      magic!=SQLITE_MAGIC_BUSY ){
+    testcase( sqlite3GlobalConfig.xLog!=0 );
+    logBadConnection("invalid");
+    return 0;
+  }else{
+    return 1;
+  }
+}
+
+/*
+** Attempt to add, substract, or multiply the 64-bit signed value iB against
+** the other 64-bit signed integer at *pA and store the result in *pA.
+** Return 0 on success.  Or if the operation would have resulted in an
+** overflow, leave *pA unchanged and return 1.
+*/
+SQLITE_PRIVATE int sqlite3AddInt64(i64 *pA, i64 iB){
+  i64 iA = *pA;
+  testcase( iA==0 ); testcase( iA==1 );
+  testcase( iB==-1 ); testcase( iB==0 );
+  if( iB>=0 ){
+    testcase( iA>0 && LARGEST_INT64 - iA == iB );
+    testcase( iA>0 && LARGEST_INT64 - iA == iB - 1 );
+    if( iA>0 && LARGEST_INT64 - iA < iB ) return 1;
+    *pA += iB;
+  }else{
+    testcase( iA<0 && -(iA + LARGEST_INT64) == iB + 1 );
+    testcase( iA<0 && -(iA + LARGEST_INT64) == iB + 2 );
+    if( iA<0 && -(iA + LARGEST_INT64) > iB + 1 ) return 1;
+    *pA += iB;
+  }
+  return 0; 
+}
+SQLITE_PRIVATE int sqlite3SubInt64(i64 *pA, i64 iB){
+  testcase( iB==SMALLEST_INT64+1 );
+  if( iB==SMALLEST_INT64 ){
+    testcase( (*pA)==(-1) ); testcase( (*pA)==0 );
+    if( (*pA)>=0 ) return 1;
+    *pA -= iB;
+    return 0;
+  }else{
+    return sqlite3AddInt64(pA, -iB);
+  }
+}
+#define TWOPOWER32 (((i64)1)<<32)
+#define TWOPOWER31 (((i64)1)<<31)
+SQLITE_PRIVATE int sqlite3MulInt64(i64 *pA, i64 iB){
+  i64 iA = *pA;
+  i64 iA1, iA0, iB1, iB0, r;
+
+  iA1 = iA/TWOPOWER32;
+  iA0 = iA % TWOPOWER32;
+  iB1 = iB/TWOPOWER32;
+  iB0 = iB % TWOPOWER32;
+  if( iA1*iB1 != 0 ) return 1;
+  assert( iA1*iB0==0 || iA0*iB1==0 );
+  r = iA1*iB0 + iA0*iB1;
+  testcase( r==(-TWOPOWER31)-1 );
+  testcase( r==(-TWOPOWER31) );
+  testcase( r==TWOPOWER31 );
+  testcase( r==TWOPOWER31-1 );
+  if( r<(-TWOPOWER31) || r>=TWOPOWER31 ) return 1;
+  r *= TWOPOWER32;
+  if( sqlite3AddInt64(&r, iA0*iB0) ) return 1;
+  *pA = r;
+  return 0;
+}
+
+/*
+** Compute the absolute value of a 32-bit signed integer, of possible.  Or 
+** if the integer has a value of -2147483648, return +2147483647
+*/
+SQLITE_PRIVATE int sqlite3AbsInt32(int x){
+  if( x>=0 ) return x;
+  if( x==(int)0x80000000 ) return 0x7fffffff;
+  return -x;
+}
+
+/************** End of util.c ************************************************/
+/************** Begin file hash.c ********************************************/
+/*
+** 2001 September 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This is the implementation of generic hash-tables
+** used in SQLite.
+*/
+
+/* Turn bulk memory into a hash table object by initializing the
+** fields of the Hash structure.
+**
+** "pNew" is a pointer to the hash table that is to be initialized.
+*/
+SQLITE_PRIVATE void sqlite3HashInit(Hash *pNew){
+  assert( pNew!=0 );
+  pNew->first = 0;
+  pNew->count = 0;
+  pNew->htsize = 0;
+  pNew->ht = 0;
+}
+
+/* Remove all entries from a hash table.  Reclaim all memory.
+** Call this routine to delete a hash table or to reset a hash table
+** to the empty state.
+*/
+SQLITE_PRIVATE void sqlite3HashClear(Hash *pH){
+  HashElem *elem;         /* For looping over all elements of the table */
+
+  assert( pH!=0 );
+  elem = pH->first;
+  pH->first = 0;
+  sqlite3_free(pH->ht);
+  pH->ht = 0;
+  pH->htsize = 0;
+  while( elem ){
+    HashElem *next_elem = elem->next;
+    sqlite3_free(elem);
+    elem = next_elem;
+  }
+  pH->count = 0;
+}
+
+/*
+** The hashing function.
+*/
+static unsigned int strHash(const char *z, int nKey){
+  int h = 0;
+  assert( nKey>=0 );
+  while( nKey > 0  ){
+    h = (h<<3) ^ h ^ sqlite3UpperToLower[(unsigned char)*z++];
+    nKey--;
+  }
+  return h;
+}
+
+
+/* Link pNew element into the hash table pH.  If pEntry!=0 then also
+** insert pNew into the pEntry hash bucket.
+*/
+static void insertElement(
+  Hash *pH,              /* The complete hash table */
+  struct _ht *pEntry,    /* The entry into which pNew is inserted */
+  HashElem *pNew         /* The element to be inserted */
+){
+  HashElem *pHead;       /* First element already in pEntry */
+  if( pEntry ){
+    pHead = pEntry->count ? pEntry->chain : 0;
+    pEntry->count++;
+    pEntry->chain = pNew;
+  }else{
+    pHead = 0;
+  }
+  if( pHead ){
+    pNew->next = pHead;
+    pNew->prev = pHead->prev;
+    if( pHead->prev ){ pHead->prev->next = pNew; }
+    else             { pH->first = pNew; }
+    pHead->prev = pNew;
+  }else{
+    pNew->next = pH->first;
+    if( pH->first ){ pH->first->prev = pNew; }
+    pNew->prev = 0;
+    pH->first = pNew;
+  }
+}
+
+
+/* Resize the hash table so that it cantains "new_size" buckets.
+**
+** The hash table might fail to resize if sqlite3_malloc() fails or
+** if the new size is the same as the prior size.
+** Return TRUE if the resize occurs and false if not.
+*/
+static int rehash(Hash *pH, unsigned int new_size){
+  struct _ht *new_ht;            /* The new hash table */
+  HashElem *elem, *next_elem;    /* For looping over existing elements */
+
+#if SQLITE_MALLOC_SOFT_LIMIT>0
+  if( new_size*sizeof(struct _ht)>SQLITE_MALLOC_SOFT_LIMIT ){
+    new_size = SQLITE_MALLOC_SOFT_LIMIT/sizeof(struct _ht);
+  }
+  if( new_size==pH->htsize ) return 0;
+#endif
+
+  /* The inability to allocates space for a larger hash table is
+  ** a performance hit but it is not a fatal error.  So mark the
+  ** allocation as a benign.
+  */
+  sqlite3BeginBenignMalloc();
+  new_ht = (struct _ht *)sqlite3Malloc( new_size*sizeof(struct _ht) );
+  sqlite3EndBenignMalloc();
+
+  if( new_ht==0 ) return 0;
+  sqlite3_free(pH->ht);
+  pH->ht = new_ht;
+  pH->htsize = new_size = sqlite3MallocSize(new_ht)/sizeof(struct _ht);
+  memset(new_ht, 0, new_size*sizeof(struct _ht));
+  for(elem=pH->first, pH->first=0; elem; elem = next_elem){
+    unsigned int h = strHash(elem->pKey, elem->nKey) % new_size;
+    next_elem = elem->next;
+    insertElement(pH, &new_ht[h], elem);
+  }
+  return 1;
+}
+
+/* This function (for internal use only) locates an element in an
+** hash table that matches the given key.  The hash for this key has
+** already been computed and is passed as the 4th parameter.
+*/
+static HashElem *findElementGivenHash(
+  const Hash *pH,     /* The pH to be searched */
+  const char *pKey,   /* The key we are searching for */
+  int nKey,           /* Bytes in key (not counting zero terminator) */
+  unsigned int h      /* The hash for this key. */
+){
+  HashElem *elem;                /* Used to loop thru the element list */
+  int count;                     /* Number of elements left to test */
+
+  if( pH->ht ){
+    struct _ht *pEntry = &pH->ht[h];
+    elem = pEntry->chain;
+    count = pEntry->count;
+  }else{
+    elem = pH->first;
+    count = pH->count;
+  }
+  while( count-- && ALWAYS(elem) ){
+    if( elem->nKey==nKey && sqlite3StrNICmp(elem->pKey,pKey,nKey)==0 ){ 
+      return elem;
+    }
+    elem = elem->next;
+  }
+  return 0;
+}
+
+/* Remove a single entry from the hash table given a pointer to that
+** element and a hash on the element's key.
+*/
+static void removeElementGivenHash(
+  Hash *pH,         /* The pH containing "elem" */
+  HashElem* elem,   /* The element to be removed from the pH */
+  unsigned int h    /* Hash value for the element */
+){
+  struct _ht *pEntry;
+  if( elem->prev ){
+    elem->prev->next = elem->next; 
+  }else{
+    pH->first = elem->next;
+  }
+  if( elem->next ){
+    elem->next->prev = elem->prev;
+  }
+  if( pH->ht ){
+    pEntry = &pH->ht[h];
+    if( pEntry->chain==elem ){
+      pEntry->chain = elem->next;
+    }
+    pEntry->count--;
+    assert( pEntry->count>=0 );
+  }
+  sqlite3_free( elem );
+  pH->count--;
+  if( pH->count<=0 ){
+    assert( pH->first==0 );
+    assert( pH->count==0 );
+    sqlite3HashClear(pH);
+  }
+}
+
+/* Attempt to locate an element of the hash table pH with a key
+** that matches pKey,nKey.  Return the data for this element if it is
+** found, or NULL if there is no match.
+*/
+SQLITE_PRIVATE void *sqlite3HashFind(const Hash *pH, const char *pKey, int nKey){
+  HashElem *elem;    /* The element that matches key */
+  unsigned int h;    /* A hash on key */
+
+  assert( pH!=0 );
+  assert( pKey!=0 );
+  assert( nKey>=0 );
+  if( pH->ht ){
+    h = strHash(pKey, nKey) % pH->htsize;
+  }else{
+    h = 0;
+  }
+  elem = findElementGivenHash(pH, pKey, nKey, h);
+  return elem ? elem->data : 0;
+}
+
+/* Insert an element into the hash table pH.  The key is pKey,nKey
+** and the data is "data".
+**
+** If no element exists with a matching key, then a new
+** element is created and NULL is returned.
+**
+** If another element already exists with the same key, then the
+** new data replaces the old data and the old data is returned.
+** The key is not copied in this instance.  If a malloc fails, then
+** the new data is returned and the hash table is unchanged.
+**
+** If the "data" parameter to this function is NULL, then the
+** element corresponding to "key" is removed from the hash table.
+*/
+SQLITE_PRIVATE void *sqlite3HashInsert(Hash *pH, const char *pKey, int nKey, void *data){
+  unsigned int h;       /* the hash of the key modulo hash table size */
+  HashElem *elem;       /* Used to loop thru the element list */
+  HashElem *new_elem;   /* New element added to the pH */
+
+  assert( pH!=0 );
+  assert( pKey!=0 );
+  assert( nKey>=0 );
+  if( pH->htsize ){
+    h = strHash(pKey, nKey) % pH->htsize;
+  }else{
+    h = 0;
+  }
+  elem = findElementGivenHash(pH,pKey,nKey,h);
+  if( elem ){
+    void *old_data = elem->data;
+    if( data==0 ){
+      removeElementGivenHash(pH,elem,h);
+    }else{
+      elem->data = data;
+      elem->pKey = pKey;
+      assert(nKey==elem->nKey);
+    }
+    return old_data;
+  }
+  if( data==0 ) return 0;
+  new_elem = (HashElem*)sqlite3Malloc( sizeof(HashElem) );
+  if( new_elem==0 ) return data;
+  new_elem->pKey = pKey;
+  new_elem->nKey = nKey;
+  new_elem->data = data;
+  pH->count++;
+  if( pH->count>=10 && pH->count > 2*pH->htsize ){
+    if( rehash(pH, pH->count*2) ){
+      assert( pH->htsize>0 );
+      h = strHash(pKey, nKey) % pH->htsize;
+    }
+  }
+  if( pH->ht ){
+    insertElement(pH, &pH->ht[h], new_elem);
+  }else{
+    insertElement(pH, 0, new_elem);
+  }
+  return 0;
+}
+
+/************** End of hash.c ************************************************/
+/************** Begin file opcodes.c *****************************************/
+/* Automatically generated.  Do not edit */
+/* See the mkopcodec.awk script for details. */
+#if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
+SQLITE_PRIVATE const char *sqlite3OpcodeName(int i){
+ static const char *const azName[] = { "?",
+     /*   1 */ "Goto",
+     /*   2 */ "Gosub",
+     /*   3 */ "Return",
+     /*   4 */ "Yield",
+     /*   5 */ "HaltIfNull",
+     /*   6 */ "Halt",
+     /*   7 */ "Integer",
+     /*   8 */ "Int64",
+     /*   9 */ "String",
+     /*  10 */ "Null",
+     /*  11 */ "Blob",
+     /*  12 */ "Variable",
+     /*  13 */ "Move",
+     /*  14 */ "Copy",
+     /*  15 */ "SCopy",
+     /*  16 */ "ResultRow",
+     /*  17 */ "CollSeq",
+     /*  18 */ "Function",
+     /*  19 */ "Not",
+     /*  20 */ "AddImm",
+     /*  21 */ "MustBeInt",
+     /*  22 */ "RealAffinity",
+     /*  23 */ "Permutation",
+     /*  24 */ "Compare",
+     /*  25 */ "Jump",
+     /*  26 */ "If",
+     /*  27 */ "IfNot",
+     /*  28 */ "Column",
+     /*  29 */ "Affinity",
+     /*  30 */ "MakeRecord",
+     /*  31 */ "Count",
+     /*  32 */ "Savepoint",
+     /*  33 */ "AutoCommit",
+     /*  34 */ "Transaction",
+     /*  35 */ "ReadCookie",
+     /*  36 */ "SetCookie",
+     /*  37 */ "VerifyCookie",
+     /*  38 */ "OpenRead",
+     /*  39 */ "OpenWrite",
+     /*  40 */ "OpenAutoindex",
+     /*  41 */ "OpenEphemeral",
+     /*  42 */ "OpenPseudo",
+     /*  43 */ "Close",
+     /*  44 */ "SeekLt",
+     /*  45 */ "SeekLe",
+     /*  46 */ "SeekGe",
+     /*  47 */ "SeekGt",
+     /*  48 */ "Seek",
+     /*  49 */ "NotFound",
+     /*  50 */ "Found",
+     /*  51 */ "IsUnique",
+     /*  52 */ "NotExists",
+     /*  53 */ "Sequence",
+     /*  54 */ "NewRowid",
+     /*  55 */ "Insert",
+     /*  56 */ "InsertInt",
+     /*  57 */ "Delete",
+     /*  58 */ "ResetCount",
+     /*  59 */ "RowKey",
+     /*  60 */ "RowData",
+     /*  61 */ "Rowid",
+     /*  62 */ "NullRow",
+     /*  63 */ "Last",
+     /*  64 */ "Sort",
+     /*  65 */ "Rewind",
+     /*  66 */ "Prev",
+     /*  67 */ "Next",
+     /*  68 */ "Or",
+     /*  69 */ "And",
+     /*  70 */ "IdxInsert",
+     /*  71 */ "IdxDelete",
+     /*  72 */ "IdxRowid",
+     /*  73 */ "IsNull",
+     /*  74 */ "NotNull",
+     /*  75 */ "Ne",
+     /*  76 */ "Eq",
+     /*  77 */ "Gt",
+     /*  78 */ "Le",
+     /*  79 */ "Lt",
+     /*  80 */ "Ge",
+     /*  81 */ "IdxLT",
+     /*  82 */ "BitAnd",
+     /*  83 */ "BitOr",
+     /*  84 */ "ShiftLeft",
+     /*  85 */ "ShiftRight",
+     /*  86 */ "Add",
+     /*  87 */ "Subtract",
+     /*  88 */ "Multiply",
+     /*  89 */ "Divide",
+     /*  90 */ "Remainder",
+     /*  91 */ "Concat",
+     /*  92 */ "IdxGE",
+     /*  93 */ "BitNot",
+     /*  94 */ "String8",
+     /*  95 */ "Destroy",
+     /*  96 */ "Clear",
+     /*  97 */ "CreateIndex",
+     /*  98 */ "CreateTable",
+     /*  99 */ "ParseSchema",
+     /* 100 */ "LoadAnalysis",
+     /* 101 */ "DropTable",
+     /* 102 */ "DropIndex",
+     /* 103 */ "DropTrigger",
+     /* 104 */ "IntegrityCk",
+     /* 105 */ "RowSetAdd",
+     /* 106 */ "RowSetRead",
+     /* 107 */ "RowSetTest",
+     /* 108 */ "Program",
+     /* 109 */ "Param",
+     /* 110 */ "FkCounter",
+     /* 111 */ "FkIfZero",
+     /* 112 */ "MemMax",
+     /* 113 */ "IfPos",
+     /* 114 */ "IfNeg",
+     /* 115 */ "IfZero",
+     /* 116 */ "AggStep",
+     /* 117 */ "AggFinal",
+     /* 118 */ "Checkpoint",
+     /* 119 */ "JournalMode",
+     /* 120 */ "Vacuum",
+     /* 121 */ "IncrVacuum",
+     /* 122 */ "Expire",
+     /* 123 */ "TableLock",
+     /* 124 */ "VBegin",
+     /* 125 */ "VCreate",
+     /* 126 */ "VDestroy",
+     /* 127 */ "VOpen",
+     /* 128 */ "VFilter",
+     /* 129 */ "VColumn",
+     /* 130 */ "Real",
+     /* 131 */ "VNext",
+     /* 132 */ "VRename",
+     /* 133 */ "VUpdate",
+     /* 134 */ "Pagecount",
+     /* 135 */ "MaxPgcnt",
+     /* 136 */ "Trace",
+     /* 137 */ "Noop",
+     /* 138 */ "Explain",
+     /* 139 */ "NotUsed_139",
+     /* 140 */ "NotUsed_140",
+     /* 141 */ "ToText",
+     /* 142 */ "ToBlob",
+     /* 143 */ "ToNumeric",
+     /* 144 */ "ToInt",
+     /* 145 */ "ToReal",
+  };
+  return azName[i];
+}
+#endif
+
+/************** End of opcodes.c *********************************************/
+/************** Begin file os_os2.c ******************************************/
+/*
+** 2006 Feb 14
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains code that is specific to OS/2.
+*/
+
+
+#if SQLITE_OS_OS2
+
+/*
+** A Note About Memory Allocation:
+**
+** This driver uses malloc()/free() directly rather than going through
+** the SQLite-wrappers sqlite3_malloc()/sqlite3_free().  Those wrappers
+** are designed for use on embedded systems where memory is scarce and
+** malloc failures happen frequently.  OS/2 does not typically run on
+** embedded systems, and when it does the developers normally have bigger
+** problems to worry about than running out of memory.  So there is not
+** a compelling need to use the wrappers.
+**
+** But there is a good reason to not use the wrappers.  If we use the
+** wrappers then we will get simulated malloc() failures within this
+** driver.  And that causes all kinds of problems for our tests.  We
+** could enhance SQLite to deal with simulated malloc failures within
+** the OS driver, but the code to deal with those failure would not
+** be exercised on Linux (which does not need to malloc() in the driver)
+** and so we would have difficulty writing coverage tests for that
+** code.  Better to leave the code out, we think.
+**
+** The point of this discussion is as follows:  When creating a new
+** OS layer for an embedded system, if you use this file as an example,
+** avoid the use of malloc()/free().  Those routines work ok on OS/2
+** desktops but not so well in embedded systems.
+*/
+
+/*
+** Macros used to determine whether or not to use threads.
+*/
+#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE
+# define SQLITE_OS2_THREADS 1
+#endif
+
+/*
+** Include code that is common to all os_*.c files
+*/
+/************** Include os_common.h in the middle of os_os2.c ****************/
+/************** Begin file os_common.h ***************************************/
+/*
+** 2004 May 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains macros and a little bit of code that is common to
+** all of the platform-specific files (os_*.c) and is #included into those
+** files.
+**
+** This file should be #included by the os_*.c files only.  It is not a
+** general purpose header file.
+*/
+#ifndef _OS_COMMON_H_
+#define _OS_COMMON_H_
+
+/*
+** At least two bugs have slipped in because we changed the MEMORY_DEBUG
+** macro to SQLITE_DEBUG and some older makefiles have not yet made the
+** switch.  The following code should catch this problem at compile-time.
+*/
+#ifdef MEMORY_DEBUG
+# error "The MEMORY_DEBUG macro is obsolete.  Use SQLITE_DEBUG instead."
+#endif
+
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE int sqlite3OSTrace = 0;
+#define OSTRACE(X)          if( sqlite3OSTrace ) sqlite3DebugPrintf X
+#else
+#define OSTRACE(X)
+#endif
+
+/*
+** Macros for performance tracing.  Normally turned off.  Only works
+** on i486 hardware.
+*/
+#ifdef SQLITE_PERFORMANCE_TRACE
+
+/* 
+** hwtime.h contains inline assembler code for implementing 
+** high-performance timing routines.
+*/
+/************** Include hwtime.h in the middle of os_common.h ****************/
+/************** Begin file hwtime.h ******************************************/
+/*
+** 2008 May 27
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains inline asm code for retrieving "high-performance"
+** counters for x86 class CPUs.
+*/
+#ifndef _HWTIME_H_
+#define _HWTIME_H_
+
+/*
+** The following routine only works on pentium-class (or newer) processors.
+** It uses the RDTSC opcode to read the cycle count value out of the
+** processor and returns that value.  This can be used for high-res
+** profiling.
+*/
+#if (defined(__GNUC__) || defined(_MSC_VER)) && \
+      (defined(i386) || defined(__i386__) || defined(_M_IX86))
+
+  #if defined(__GNUC__)
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+     unsigned int lo, hi;
+     __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
+     return (sqlite_uint64)hi << 32 | lo;
+  }
+
+  #elif defined(_MSC_VER)
+
+  __declspec(naked) __inline sqlite_uint64 __cdecl sqlite3Hwtime(void){
+     __asm {
+        rdtsc
+        ret       ; return value at EDX:EAX
+     }
+  }
+
+  #endif
+
+#elif (defined(__GNUC__) && defined(__x86_64__))
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+      unsigned long val;
+      __asm__ __volatile__ ("rdtsc" : "=A" (val));
+      return val;
+  }
+ 
+#elif (defined(__GNUC__) && defined(__ppc__))
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+      unsigned long long retval;
+      unsigned long junk;
+      __asm__ __volatile__ ("\n\
+          1:      mftbu   %1\n\
+                  mftb    %L0\n\
+                  mftbu   %0\n\
+                  cmpw    %0,%1\n\
+                  bne     1b"
+                  : "=r" (retval), "=r" (junk));
+      return retval;
+  }
+
+#else
+
+  #error Need implementation of sqlite3Hwtime() for your platform.
+
+  /*
+  ** To compile without implementing sqlite3Hwtime() for your platform,
+  ** you can remove the above #error and use the following
+  ** stub function.  You will lose timing support for many
+  ** of the debugging and testing utilities, but it should at
+  ** least compile and run.
+  */
+SQLITE_PRIVATE   sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
+
+#endif
+
+#endif /* !defined(_HWTIME_H_) */
+
+/************** End of hwtime.h **********************************************/
+/************** Continuing where we left off in os_common.h ******************/
+
+static sqlite_uint64 g_start;
+static sqlite_uint64 g_elapsed;
+#define TIMER_START       g_start=sqlite3Hwtime()
+#define TIMER_END         g_elapsed=sqlite3Hwtime()-g_start
+#define TIMER_ELAPSED     g_elapsed
+#else
+#define TIMER_START
+#define TIMER_END
+#define TIMER_ELAPSED     ((sqlite_uint64)0)
+#endif
+
+/*
+** If we compile with the SQLITE_TEST macro set, then the following block
+** of code will give us the ability to simulate a disk I/O error.  This
+** is used for testing the I/O recovery logic.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_io_error_hit = 0;            /* Total number of I/O Errors */
+SQLITE_API int sqlite3_io_error_hardhit = 0;        /* Number of non-benign errors */
+SQLITE_API int sqlite3_io_error_pending = 0;        /* Count down to first I/O error */
+SQLITE_API int sqlite3_io_error_persist = 0;        /* True if I/O errors persist */
+SQLITE_API int sqlite3_io_error_benign = 0;         /* True if errors are benign */
+SQLITE_API int sqlite3_diskfull_pending = 0;
+SQLITE_API int sqlite3_diskfull = 0;
+#define SimulateIOErrorBenign(X) sqlite3_io_error_benign=(X)
+#define SimulateIOError(CODE)  \
+  if( (sqlite3_io_error_persist && sqlite3_io_error_hit) \
+       || sqlite3_io_error_pending-- == 1 )  \
+              { local_ioerr(); CODE; }
+static void local_ioerr(){
+  IOTRACE(("IOERR\n"));
+  sqlite3_io_error_hit++;
+  if( !sqlite3_io_error_benign ) sqlite3_io_error_hardhit++;
+}
+#define SimulateDiskfullError(CODE) \
+   if( sqlite3_diskfull_pending ){ \
+     if( sqlite3_diskfull_pending == 1 ){ \
+       local_ioerr(); \
+       sqlite3_diskfull = 1; \
+       sqlite3_io_error_hit = 1; \
+       CODE; \
+     }else{ \
+       sqlite3_diskfull_pending--; \
+     } \
+   }
+#else
+#define SimulateIOErrorBenign(X)
+#define SimulateIOError(A)
+#define SimulateDiskfullError(A)
+#endif
+
+/*
+** When testing, keep a count of the number of open files.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_open_file_count = 0;
+#define OpenCounter(X)  sqlite3_open_file_count+=(X)
+#else
+#define OpenCounter(X)
+#endif
+
+#endif /* !defined(_OS_COMMON_H_) */
+
+/************** End of os_common.h *******************************************/
+/************** Continuing where we left off in os_os2.c *********************/
+
+/* Forward references */
+typedef struct os2File os2File;         /* The file structure */
+typedef struct os2ShmNode os2ShmNode;   /* A shared descritive memory node */
+typedef struct os2ShmLink os2ShmLink;   /* A connection to shared-memory */
+
+/*
+** The os2File structure is subclass of sqlite3_file specific for the OS/2
+** protability layer.
+*/
+struct os2File {
+  const sqlite3_io_methods *pMethod;  /* Always the first entry */
+  HFILE h;                  /* Handle for accessing the file */
+  int flags;                /* Flags provided to os2Open() */
+  int locktype;             /* Type of lock currently held on this file */
+  int szChunk;              /* Chunk size configured by FCNTL_CHUNK_SIZE */
+  char *zFullPathCp;        /* Full path name of this file */
+  os2ShmLink *pShmLink;     /* Instance of shared memory on this file */
+};
+
+#define LOCK_TIMEOUT 10L /* the default locking timeout */
+
+/*
+** Missing from some versions of the OS/2 toolkit -
+** used to allocate from high memory if possible
+*/
+#ifndef OBJ_ANY
+# define OBJ_ANY 0x00000400
+#endif
+
+/*****************************************************************************
+** The next group of routines implement the I/O methods specified
+** by the sqlite3_io_methods object.
+******************************************************************************/
+
+/*
+** Close a file.
+*/
+static int os2Close( sqlite3_file *id ){
+  APIRET rc;
+  os2File *pFile = (os2File*)id;
+
+  assert( id!=0 );
+  OSTRACE(( "CLOSE %d (%s)\n", pFile->h, pFile->zFullPathCp ));
+
+  rc = DosClose( pFile->h );
+
+  if( pFile->flags & SQLITE_OPEN_DELETEONCLOSE )
+    DosForceDelete( (PSZ)pFile->zFullPathCp );
+
+  free( pFile->zFullPathCp );
+  pFile->zFullPathCp = NULL;
+  pFile->locktype = NO_LOCK;
+  pFile->h = (HFILE)-1;
+  pFile->flags = 0;
+
+  OpenCounter( -1 );
+  return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
+}
+
+/*
+** Read data from a file into a buffer.  Return SQLITE_OK if all
+** bytes were read successfully and SQLITE_IOERR if anything goes
+** wrong.
+*/
+static int os2Read(
+  sqlite3_file *id,               /* File to read from */
+  void *pBuf,                     /* Write content into this buffer */
+  int amt,                        /* Number of bytes to read */
+  sqlite3_int64 offset            /* Begin reading at this offset */
+){
+  ULONG fileLocation = 0L;
+  ULONG got;
+  os2File *pFile = (os2File*)id;
+  assert( id!=0 );
+  SimulateIOError( return SQLITE_IOERR_READ );
+  OSTRACE(( "READ %d lock=%d\n", pFile->h, pFile->locktype ));
+  if( DosSetFilePtr(pFile->h, offset, FILE_BEGIN, &fileLocation) != NO_ERROR ){
+    return SQLITE_IOERR;
+  }
+  if( DosRead( pFile->h, pBuf, amt, &got ) != NO_ERROR ){
+    return SQLITE_IOERR_READ;
+  }
+  if( got == (ULONG)amt )
+    return SQLITE_OK;
+  else {
+    /* Unread portions of the input buffer must be zero-filled */
+    memset(&((char*)pBuf)[got], 0, amt-got);
+    return SQLITE_IOERR_SHORT_READ;
+  }
+}
+
+/*
+** Write data from a buffer into a file.  Return SQLITE_OK on success
+** or some other error code on failure.
+*/
+static int os2Write(
+  sqlite3_file *id,               /* File to write into */
+  const void *pBuf,               /* The bytes to be written */
+  int amt,                        /* Number of bytes to write */
+  sqlite3_int64 offset            /* Offset into the file to begin writing at */
+){
+  ULONG fileLocation = 0L;
+  APIRET rc = NO_ERROR;
+  ULONG wrote;
+  os2File *pFile = (os2File*)id;
+  assert( id!=0 );
+  SimulateIOError( return SQLITE_IOERR_WRITE );
+  SimulateDiskfullError( return SQLITE_FULL );
+  OSTRACE(( "WRITE %d lock=%d\n", pFile->h, pFile->locktype ));
+  if( DosSetFilePtr(pFile->h, offset, FILE_BEGIN, &fileLocation) != NO_ERROR ){
+    return SQLITE_IOERR;
+  }
+  assert( amt>0 );
+  while( amt > 0 &&
+         ( rc = DosWrite( pFile->h, (PVOID)pBuf, amt, &wrote ) ) == NO_ERROR &&
+         wrote > 0
+  ){
+    amt -= wrote;
+    pBuf = &((char*)pBuf)[wrote];
+  }
+
+  return ( rc != NO_ERROR || amt > (int)wrote ) ? SQLITE_FULL : SQLITE_OK;
+}
+
+/*
+** Truncate an open file to a specified size
+*/
+static int os2Truncate( sqlite3_file *id, i64 nByte ){
+  APIRET rc;
+  os2File *pFile = (os2File*)id;
+  assert( id!=0 );
+  OSTRACE(( "TRUNCATE %d %lld\n", pFile->h, nByte ));
+  SimulateIOError( return SQLITE_IOERR_TRUNCATE );
+
+  /* If the user has configured a chunk-size for this file, truncate the
+  ** file so that it consists of an integer number of chunks (i.e. the
+  ** actual file size after the operation may be larger than the requested
+  ** size).
+  */
+  if( pFile->szChunk ){
+    nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
+  }
+  
+  rc = DosSetFileSize( pFile->h, nByte );
+  return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR_TRUNCATE;
+}
+
+#ifdef SQLITE_TEST
+/*
+** Count the number of fullsyncs and normal syncs.  This is used to test
+** that syncs and fullsyncs are occuring at the right times.
+*/
+SQLITE_API int sqlite3_sync_count = 0;
+SQLITE_API int sqlite3_fullsync_count = 0;
+#endif
+
+/*
+** Make sure all writes to a particular file are committed to disk.
+*/
+static int os2Sync( sqlite3_file *id, int flags ){
+  os2File *pFile = (os2File*)id;
+  OSTRACE(( "SYNC %d lock=%d\n", pFile->h, pFile->locktype ));
+#ifdef SQLITE_TEST
+  if( flags & SQLITE_SYNC_FULL){
+    sqlite3_fullsync_count++;
+  }
+  sqlite3_sync_count++;
+#endif
+  /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a
+  ** no-op
+  */
+#ifdef SQLITE_NO_SYNC
+  UNUSED_PARAMETER(pFile);
+  return SQLITE_OK;
+#else
+  return DosResetBuffer( pFile->h ) == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
+#endif
+}
+
+/*
+** Determine the current size of a file in bytes
+*/
+static int os2FileSize( sqlite3_file *id, sqlite3_int64 *pSize ){
+  APIRET rc = NO_ERROR;
+  FILESTATUS3 fsts3FileInfo;
+  memset(&fsts3FileInfo, 0, sizeof(fsts3FileInfo));
+  assert( id!=0 );
+  SimulateIOError( return SQLITE_IOERR_FSTAT );
+  rc = DosQueryFileInfo( ((os2File*)id)->h, FIL_STANDARD, &fsts3FileInfo, sizeof(FILESTATUS3) );
+  if( rc == NO_ERROR ){
+    *pSize = fsts3FileInfo.cbFile;
+    return SQLITE_OK;
+  }else{
+    return SQLITE_IOERR_FSTAT;
+  }
+}
+
+/*
+** Acquire a reader lock.
+*/
+static int getReadLock( os2File *pFile ){
+  FILELOCK  LockArea,
+            UnlockArea;
+  APIRET res;
+  memset(&LockArea, 0, sizeof(LockArea));
+  memset(&UnlockArea, 0, sizeof(UnlockArea));
+  LockArea.lOffset = SHARED_FIRST;
+  LockArea.lRange = SHARED_SIZE;
+  UnlockArea.lOffset = 0L;
+  UnlockArea.lRange = 0L;
+  res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 1L );
+  OSTRACE(( "GETREADLOCK %d res=%d\n", pFile->h, res ));
+  return res;
+}
+
+/*
+** Undo a readlock
+*/
+static int unlockReadLock( os2File *id ){
+  FILELOCK  LockArea,
+            UnlockArea;
+  APIRET res;
+  memset(&LockArea, 0, sizeof(LockArea));
+  memset(&UnlockArea, 0, sizeof(UnlockArea));
+  LockArea.lOffset = 0L;
+  LockArea.lRange = 0L;
+  UnlockArea.lOffset = SHARED_FIRST;
+  UnlockArea.lRange = SHARED_SIZE;
+  res = DosSetFileLocks( id->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 1L );
+  OSTRACE(( "UNLOCK-READLOCK file handle=%d res=%d?\n", id->h, res ));
+  return res;
+}
+
+/*
+** Lock the file with the lock specified by parameter locktype - one
+** of the following:
+**
+**     (1) SHARED_LOCK
+**     (2) RESERVED_LOCK
+**     (3) PENDING_LOCK
+**     (4) EXCLUSIVE_LOCK
+**
+** Sometimes when requesting one lock state, additional lock states
+** are inserted in between.  The locking might fail on one of the later
+** transitions leaving the lock state different from what it started but
+** still short of its goal.  The following chart shows the allowed
+** transitions and the inserted intermediate states:
+**
+**    UNLOCKED -> SHARED
+**    SHARED -> RESERVED
+**    SHARED -> (PENDING) -> EXCLUSIVE
+**    RESERVED -> (PENDING) -> EXCLUSIVE
+**    PENDING -> EXCLUSIVE
+**
+** This routine will only increase a lock.  The os2Unlock() routine
+** erases all locks at once and returns us immediately to locking level 0.
+** It is not possible to lower the locking level one step at a time.  You
+** must go straight to locking level 0.
+*/
+static int os2Lock( sqlite3_file *id, int locktype ){
+  int rc = SQLITE_OK;       /* Return code from subroutines */
+  APIRET res = NO_ERROR;    /* Result of an OS/2 lock call */
+  int newLocktype;       /* Set pFile->locktype to this value before exiting */
+  int gotPendingLock = 0;/* True if we acquired a PENDING lock this time */
+  FILELOCK  LockArea,
+            UnlockArea;
+  os2File *pFile = (os2File*)id;
+  memset(&LockArea, 0, sizeof(LockArea));
+  memset(&UnlockArea, 0, sizeof(UnlockArea));
+  assert( pFile!=0 );
+  OSTRACE(( "LOCK %d %d was %d\n", pFile->h, locktype, pFile->locktype ));
+
+  /* If there is already a lock of this type or more restrictive on the
+  ** os2File, do nothing. Don't use the end_lock: exit path, as
+  ** sqlite3_mutex_enter() hasn't been called yet.
+  */
+  if( pFile->locktype>=locktype ){
+    OSTRACE(( "LOCK %d %d ok (already held)\n", pFile->h, locktype ));
+    return SQLITE_OK;
+  }
+
+  /* Make sure the locking sequence is correct
+  */
+  assert( pFile->locktype!=NO_LOCK || locktype==SHARED_LOCK );
+  assert( locktype!=PENDING_LOCK );
+  assert( locktype!=RESERVED_LOCK || pFile->locktype==SHARED_LOCK );
+
+  /* Lock the PENDING_LOCK byte if we need to acquire a PENDING lock or
+  ** a SHARED lock.  If we are acquiring a SHARED lock, the acquisition of
+  ** the PENDING_LOCK byte is temporary.
+  */
+  newLocktype = pFile->locktype;
+  if( pFile->locktype==NO_LOCK
+      || (locktype==EXCLUSIVE_LOCK && pFile->locktype==RESERVED_LOCK)
+  ){
+    LockArea.lOffset = PENDING_BYTE;
+    LockArea.lRange = 1L;
+    UnlockArea.lOffset = 0L;
+    UnlockArea.lRange = 0L;
+
+    /* wait longer than LOCK_TIMEOUT here not to have to try multiple times */
+    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, 100L, 0L );
+    if( res == NO_ERROR ){
+      gotPendingLock = 1;
+      OSTRACE(( "LOCK %d pending lock boolean set.  res=%d\n", pFile->h, res ));
+    }
+  }
+
+  /* Acquire a shared lock
+  */
+  if( locktype==SHARED_LOCK && res == NO_ERROR ){
+    assert( pFile->locktype==NO_LOCK );
+    res = getReadLock(pFile);
+    if( res == NO_ERROR ){
+      newLocktype = SHARED_LOCK;
+    }
+    OSTRACE(( "LOCK %d acquire shared lock. res=%d\n", pFile->h, res ));
+  }
+
+  /* Acquire a RESERVED lock
+  */
+  if( locktype==RESERVED_LOCK && res == NO_ERROR ){
+    assert( pFile->locktype==SHARED_LOCK );
+    LockArea.lOffset = RESERVED_BYTE;
+    LockArea.lRange = 1L;
+    UnlockArea.lOffset = 0L;
+    UnlockArea.lRange = 0L;
+    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
+    if( res == NO_ERROR ){
+      newLocktype = RESERVED_LOCK;
+    }
+    OSTRACE(( "LOCK %d acquire reserved lock. res=%d\n", pFile->h, res ));
+  }
+
+  /* Acquire a PENDING lock
+  */
+  if( locktype==EXCLUSIVE_LOCK && res == NO_ERROR ){
+    newLocktype = PENDING_LOCK;
+    gotPendingLock = 0;
+    OSTRACE(( "LOCK %d acquire pending lock. pending lock boolean unset.\n",
+               pFile->h ));
+  }
+
+  /* Acquire an EXCLUSIVE lock
+  */
+  if( locktype==EXCLUSIVE_LOCK && res == NO_ERROR ){
+    assert( pFile->locktype>=SHARED_LOCK );
+    res = unlockReadLock(pFile);
+    OSTRACE(( "unreadlock = %d\n", res ));
+    LockArea.lOffset = SHARED_FIRST;
+    LockArea.lRange = SHARED_SIZE;
+    UnlockArea.lOffset = 0L;
+    UnlockArea.lRange = 0L;
+    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
+    if( res == NO_ERROR ){
+      newLocktype = EXCLUSIVE_LOCK;
+    }else{
+      OSTRACE(( "OS/2 error-code = %d\n", res ));
+      getReadLock(pFile);
+    }
+    OSTRACE(( "LOCK %d acquire exclusive lock.  res=%d\n", pFile->h, res ));
+  }
+
+  /* If we are holding a PENDING lock that ought to be released, then
+  ** release it now.
+  */
+  if( gotPendingLock && locktype==SHARED_LOCK ){
+    int r;
+    LockArea.lOffset = 0L;
+    LockArea.lRange = 0L;
+    UnlockArea.lOffset = PENDING_BYTE;
+    UnlockArea.lRange = 1L;
+    r = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
+    OSTRACE(( "LOCK %d unlocking pending/is shared. r=%d\n", pFile->h, r ));
+  }
+
+  /* Update the state of the lock has held in the file descriptor then
+  ** return the appropriate result code.
+  */
+  if( res == NO_ERROR ){
+    rc = SQLITE_OK;
+  }else{
+    OSTRACE(( "LOCK FAILED %d trying for %d but got %d\n", pFile->h,
+              locktype, newLocktype ));
+    rc = SQLITE_BUSY;
+  }
+  pFile->locktype = newLocktype;
+  OSTRACE(( "LOCK %d now %d\n", pFile->h, pFile->locktype ));
+  return rc;
+}
+
+/*
+** This routine checks if there is a RESERVED lock held on the specified
+** file by this or any other process. If such a lock is held, return
+** non-zero, otherwise zero.
+*/
+static int os2CheckReservedLock( sqlite3_file *id, int *pOut ){
+  int r = 0;
+  os2File *pFile = (os2File*)id;
+  assert( pFile!=0 );
+  if( pFile->locktype>=RESERVED_LOCK ){
+    r = 1;
+    OSTRACE(( "TEST WR-LOCK %d %d (local)\n", pFile->h, r ));
+  }else{
+    FILELOCK  LockArea,
+              UnlockArea;
+    APIRET rc = NO_ERROR;
+    memset(&LockArea, 0, sizeof(LockArea));
+    memset(&UnlockArea, 0, sizeof(UnlockArea));
+    LockArea.lOffset = RESERVED_BYTE;
+    LockArea.lRange = 1L;
+    UnlockArea.lOffset = 0L;
+    UnlockArea.lRange = 0L;
+    rc = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
+    OSTRACE(( "TEST WR-LOCK %d lock reserved byte rc=%d\n", pFile->h, rc ));
+    if( rc == NO_ERROR ){
+      APIRET rcu = NO_ERROR; /* return code for unlocking */
+      LockArea.lOffset = 0L;
+      LockArea.lRange = 0L;
+      UnlockArea.lOffset = RESERVED_BYTE;
+      UnlockArea.lRange = 1L;
+      rcu = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
+      OSTRACE(( "TEST WR-LOCK %d unlock reserved byte r=%d\n", pFile->h, rcu ));
+    }
+    r = !(rc == NO_ERROR);
+    OSTRACE(( "TEST WR-LOCK %d %d (remote)\n", pFile->h, r ));
+  }
+  *pOut = r;
+  return SQLITE_OK;
+}
+
+/*
+** Lower the locking level on file descriptor id to locktype.  locktype
+** must be either NO_LOCK or SHARED_LOCK.
+**
+** If the locking level of the file descriptor is already at or below
+** the requested locking level, this routine is a no-op.
+**
+** It is not possible for this routine to fail if the second argument
+** is NO_LOCK.  If the second argument is SHARED_LOCK then this routine
+** might return SQLITE_IOERR;
+*/
+static int os2Unlock( sqlite3_file *id, int locktype ){
+  int type;
+  os2File *pFile = (os2File*)id;
+  APIRET rc = SQLITE_OK;
+  APIRET res = NO_ERROR;
+  FILELOCK  LockArea,
+            UnlockArea;
+  memset(&LockArea, 0, sizeof(LockArea));
+  memset(&UnlockArea, 0, sizeof(UnlockArea));
+  assert( pFile!=0 );
+  assert( locktype<=SHARED_LOCK );
+  OSTRACE(( "UNLOCK %d to %d was %d\n", pFile->h, locktype, pFile->locktype ));
+  type = pFile->locktype;
+  if( type>=EXCLUSIVE_LOCK ){
+    LockArea.lOffset = 0L;
+    LockArea.lRange = 0L;
+    UnlockArea.lOffset = SHARED_FIRST;
+    UnlockArea.lRange = SHARED_SIZE;
+    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
+    OSTRACE(( "UNLOCK %d exclusive lock res=%d\n", pFile->h, res ));
+    if( locktype==SHARED_LOCK && getReadLock(pFile) != NO_ERROR ){
+      /* This should never happen.  We should always be able to
+      ** reacquire the read lock */
+      OSTRACE(( "UNLOCK %d to %d getReadLock() failed\n", pFile->h, locktype ));
+      rc = SQLITE_IOERR_UNLOCK;
+    }
+  }
+  if( type>=RESERVED_LOCK ){
+    LockArea.lOffset = 0L;
+    LockArea.lRange = 0L;
+    UnlockArea.lOffset = RESERVED_BYTE;
+    UnlockArea.lRange = 1L;
+    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
+    OSTRACE(( "UNLOCK %d reserved res=%d\n", pFile->h, res ));
+  }
+  if( locktype==NO_LOCK && type>=SHARED_LOCK ){
+    res = unlockReadLock(pFile);
+    OSTRACE(( "UNLOCK %d is %d want %d res=%d\n",
+              pFile->h, type, locktype, res ));
+  }
+  if( type>=PENDING_LOCK ){
+    LockArea.lOffset = 0L;
+    LockArea.lRange = 0L;
+    UnlockArea.lOffset = PENDING_BYTE;
+    UnlockArea.lRange = 1L;
+    res = DosSetFileLocks( pFile->h, &UnlockArea, &LockArea, LOCK_TIMEOUT, 0L );
+    OSTRACE(( "UNLOCK %d pending res=%d\n", pFile->h, res ));
+  }
+  pFile->locktype = locktype;
+  OSTRACE(( "UNLOCK %d now %d\n", pFile->h, pFile->locktype ));
+  return rc;
+}
+
+/*
+** Control and query of the open file handle.
+*/
+static int os2FileControl(sqlite3_file *id, int op, void *pArg){
+  switch( op ){
+    case SQLITE_FCNTL_LOCKSTATE: {
+      *(int*)pArg = ((os2File*)id)->locktype;
+      OSTRACE(( "FCNTL_LOCKSTATE %d lock=%d\n",
+                ((os2File*)id)->h, ((os2File*)id)->locktype ));
+      return SQLITE_OK;
+    }
+    case SQLITE_FCNTL_CHUNK_SIZE: {
+      ((os2File*)id)->szChunk = *(int*)pArg;
+      return SQLITE_OK;
+    }
+    case SQLITE_FCNTL_SIZE_HINT: {
+      sqlite3_int64 sz = *(sqlite3_int64*)pArg;
+      SimulateIOErrorBenign(1);
+      os2Truncate(id, sz);
+      SimulateIOErrorBenign(0);
+      return SQLITE_OK;
+    }
+    case SQLITE_FCNTL_SYNC_OMITTED: {
+      return SQLITE_OK;
+    }
+  }
+  return SQLITE_NOTFOUND;
+}
+
+/*
+** Return the sector size in bytes of the underlying block device for
+** the specified file. This is almost always 512 bytes, but may be
+** larger for some devices.
+**
+** SQLite code assumes this function cannot fail. It also assumes that
+** if two files are created in the same file-system directory (i.e.
+** a database and its journal file) that the sector size will be the
+** same for both.
+*/
+static int os2SectorSize(sqlite3_file *id){
+  UNUSED_PARAMETER(id);
+  return SQLITE_DEFAULT_SECTOR_SIZE;
+}
+
+/*
+** Return a vector of device characteristics.
+*/
+static int os2DeviceCharacteristics(sqlite3_file *id){
+  UNUSED_PARAMETER(id);
+  return SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN;
+}
+
+
+/*
+** Character set conversion objects used by conversion routines.
+*/
+static UconvObject ucUtf8 = NULL; /* convert between UTF-8 and UCS-2 */
+static UconvObject uclCp = NULL;  /* convert between local codepage and UCS-2 */
+
+/*
+** Helper function to initialize the conversion objects from and to UTF-8.
+*/
+static void initUconvObjects( void ){
+  if( UniCreateUconvObject( UTF_8, &ucUtf8 ) != ULS_SUCCESS )
+    ucUtf8 = NULL;
+  if ( UniCreateUconvObject( (UniChar *)L"@path=yes", &uclCp ) != ULS_SUCCESS )
+    uclCp = NULL;
+}
+
+/*
+** Helper function to free the conversion objects from and to UTF-8.
+*/
+static void freeUconvObjects( void ){
+  if ( ucUtf8 )
+    UniFreeUconvObject( ucUtf8 );
+  if ( uclCp )
+    UniFreeUconvObject( uclCp );
+  ucUtf8 = NULL;
+  uclCp = NULL;
+}
+
+/*
+** Helper function to convert UTF-8 filenames to local OS/2 codepage.
+** The two-step process: first convert the incoming UTF-8 string
+** into UCS-2 and then from UCS-2 to the current codepage.
+** The returned char pointer has to be freed.
+*/
+static char *convertUtf8PathToCp( const char *in ){
+  UniChar tempPath[CCHMAXPATH];
+  char *out = (char *)calloc( CCHMAXPATH, 1 );
+
+  if( !out )
+    return NULL;
+
+  if( !ucUtf8 || !uclCp )
+    initUconvObjects();
+
+  /* determine string for the conversion of UTF-8 which is CP1208 */
+  if( UniStrToUcs( ucUtf8, tempPath, (char *)in, CCHMAXPATH ) != ULS_SUCCESS )
+    return out; /* if conversion fails, return the empty string */
+
+  /* conversion for current codepage which can be used for paths */
+  UniStrFromUcs( uclCp, out, tempPath, CCHMAXPATH );
+
+  return out;
+}
+
+/*
+** Helper function to convert filenames from local codepage to UTF-8.
+** The two-step process: first convert the incoming codepage-specific
+** string into UCS-2 and then from UCS-2 to the codepage of UTF-8.
+** The returned char pointer has to be freed.
+**
+** This function is non-static to be able to use this in shell.c and
+** similar applications that take command line arguments.
+*/
+char *convertCpPathToUtf8( const char *in ){
+  UniChar tempPath[CCHMAXPATH];
+  char *out = (char *)calloc( CCHMAXPATH, 1 );
+
+  if( !out )
+    return NULL;
+
+  if( !ucUtf8 || !uclCp )
+    initUconvObjects();
+
+  /* conversion for current codepage which can be used for paths */
+  if( UniStrToUcs( uclCp, tempPath, (char *)in, CCHMAXPATH ) != ULS_SUCCESS )
+    return out; /* if conversion fails, return the empty string */
+
+  /* determine string for the conversion of UTF-8 which is CP1208 */
+  UniStrFromUcs( ucUtf8, out, tempPath, CCHMAXPATH );
+
+  return out;
+}
+
+
+#ifndef SQLITE_OMIT_WAL
+
+/*
+** Use main database file for interprocess locking. If un-defined
+** a separate file is created for this purpose. The file will be
+** used only to set file locks. There will be no data written to it.
+*/
+#define SQLITE_OS2_NO_WAL_LOCK_FILE     
+
+#if 0
+static void _ERR_TRACE( const char *fmt, ... ) {
+  va_list  ap;
+  va_start(ap, fmt);
+  vfprintf(stderr, fmt, ap);
+  fflush(stderr);
+}
+#define ERR_TRACE(rc, msg)        \
+        if( (rc) != SQLITE_OK ) _ERR_TRACE msg;
+#else
+#define ERR_TRACE(rc, msg)
+#endif
+
+/*
+** Helper functions to obtain and relinquish the global mutex. The
+** global mutex is used to protect os2ShmNodeList.
+**
+** Function os2ShmMutexHeld() is used to assert() that the global mutex 
+** is held when required. This function is only used as part of assert() 
+** statements. e.g.
+**
+**   os2ShmEnterMutex()
+**     assert( os2ShmMutexHeld() );
+**   os2ShmLeaveMutex()
+*/
+static void os2ShmEnterMutex(void){
+  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+}
+static void os2ShmLeaveMutex(void){
+  sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+}
+#ifdef SQLITE_DEBUG
+static int os2ShmMutexHeld(void) {
+  return sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+}
+int GetCurrentProcessId(void) {
+  PPIB pib;
+  DosGetInfoBlocks(NULL, &pib);
+  return (int)pib->pib_ulpid;
+}
+#endif
+
+/*
+** Object used to represent a the shared memory area for a single log file.
+** When multiple threads all reference the same log-summary, each thread has
+** its own os2File object, but they all point to a single instance of this 
+** object.  In other words, each log-summary is opened only once per process.
+**
+** os2ShmMutexHeld() must be true when creating or destroying
+** this object or while reading or writing the following fields:
+**
+**      nRef
+**      pNext 
+**
+** The following fields are read-only after the object is created:
+** 
+**      szRegion
+**      hLockFile
+**      shmBaseName
+**
+** Either os2ShmNode.mutex must be held or os2ShmNode.nRef==0 and
+** os2ShmMutexHeld() is true when reading or writing any other field
+** in this structure.
+**
+*/
+struct os2ShmNode {
+  sqlite3_mutex *mutex;      /* Mutex to access this object */
+  os2ShmNode *pNext;         /* Next in list of all os2ShmNode objects */
+
+  int szRegion;              /* Size of shared-memory regions */
+
+  int nRegion;               /* Size of array apRegion */
+  void **apRegion;           /* Array of pointers to shared-memory regions */
+
+  int nRef;                  /* Number of os2ShmLink objects pointing to this */
+  os2ShmLink *pFirst;        /* First os2ShmLink object pointing to this */
+
+  HFILE hLockFile;           /* File used for inter-process memory locking */
+  char shmBaseName[1];       /* Name of the memory object !!! must last !!! */
+};
+
+
+/*
+** Structure used internally by this VFS to record the state of an
+** open shared memory connection.
+**
+** The following fields are initialized when this object is created and
+** are read-only thereafter:
+**
+**    os2Shm.pShmNode
+**    os2Shm.id
+**
+** All other fields are read/write.  The os2Shm.pShmNode->mutex must be held
+** while accessing any read/write fields.
+*/
+struct os2ShmLink {
+  os2ShmNode *pShmNode;      /* The underlying os2ShmNode object */
+  os2ShmLink *pNext;         /* Next os2Shm with the same os2ShmNode */
+  u32 sharedMask;            /* Mask of shared locks held */
+  u32 exclMask;              /* Mask of exclusive locks held */
+#ifdef SQLITE_DEBUG
+  u8 id;                     /* Id of this connection with its os2ShmNode */
+#endif
+};
+
+
+/*
+** A global list of all os2ShmNode objects.
+**
+** The os2ShmMutexHeld() must be true while reading or writing this list.
+*/
+static os2ShmNode *os2ShmNodeList = NULL;
+
+/*
+** Constants used for locking
+*/
+#ifdef  SQLITE_OS2_NO_WAL_LOCK_FILE
+#define OS2_SHM_BASE   (PENDING_BYTE + 0x10000)         /* first lock byte */
+#else
+#define OS2_SHM_BASE   ((22+SQLITE_SHM_NLOCK)*4)        /* first lock byte */
+#endif
+
+#define OS2_SHM_DMS    (OS2_SHM_BASE+SQLITE_SHM_NLOCK)  /* deadman switch */
+
+/*
+** Apply advisory locks for all n bytes beginning at ofst.
+*/
+#define _SHM_UNLCK  1   /* no lock */
+#define _SHM_RDLCK  2   /* shared lock, no wait */
+#define _SHM_WRLCK  3   /* exlusive lock, no wait */
+#define _SHM_WRLCK_WAIT 4 /* exclusive lock, wait */
+static int os2ShmSystemLock(
+  os2ShmNode *pNode,    /* Apply locks to this open shared-memory segment */
+  int lockType,         /* _SHM_UNLCK, _SHM_RDLCK, _SHM_WRLCK or _SHM_WRLCK_WAIT */
+  int ofst,             /* Offset to first byte to be locked/unlocked */
+  int nByte             /* Number of bytes to lock or unlock */
+){
+  APIRET rc;
+  FILELOCK area;
+  ULONG mode, timeout;
+
+  /* Access to the os2ShmNode object is serialized by the caller */
+  assert( sqlite3_mutex_held(pNode->mutex) || pNode->nRef==0 );
+
+  mode = 1;     /* shared lock */
+  timeout = 0;  /* no wait */
+  area.lOffset = ofst;
+  area.lRange = nByte;
+
+  switch( lockType ) {
+    case _SHM_WRLCK_WAIT:
+      timeout = (ULONG)-1;      /* wait forever */
+    case _SHM_WRLCK:
+      mode = 0;                 /* exclusive lock */
+    case _SHM_RDLCK:
+      rc = DosSetFileLocks(pNode->hLockFile, 
+                           NULL, &area, timeout, mode);
+      break;
+    /* case _SHM_UNLCK: */
+    default:
+      rc = DosSetFileLocks(pNode->hLockFile, 
+                           &area, NULL, 0, 0);
+      break;
+  }
+                          
+  OSTRACE(("SHM-LOCK %d %s %s 0x%08lx\n", 
+           pNode->hLockFile,
+           rc==SQLITE_OK ? "ok" : "failed",
+           lockType==_SHM_UNLCK ? "Unlock" : "Lock",
+           rc));
+
+  ERR_TRACE(rc, ("os2ShmSystemLock: %d %s\n", rc, pNode->shmBaseName))
+
+  return ( rc == 0 ) ?  SQLITE_OK : SQLITE_BUSY;
+}
+
+/*
+** Find an os2ShmNode in global list or allocate a new one, if not found.
+**
+** This is not a VFS shared-memory method; it is a utility function called
+** by VFS shared-memory methods.
+*/
+static int os2OpenSharedMemory( os2File *fd, int szRegion ) {
+  os2ShmLink *pLink;
+  os2ShmNode *pNode;
+  int cbShmName, rc = SQLITE_OK;
+  char shmName[CCHMAXPATH + 30];
+#ifndef SQLITE_OS2_NO_WAL_LOCK_FILE
+  ULONG action;
+#endif
+  
+  /* We need some additional space at the end to append the region number */
+  cbShmName = sprintf(shmName, "\\SHAREMEM\\%s", fd->zFullPathCp );
+  if( cbShmName >= CCHMAXPATH-8 )
+    return SQLITE_IOERR_SHMOPEN; 
+
+  /* Replace colon in file name to form a valid shared memory name */
+  shmName[10+1] = '!';
+
+  /* Allocate link object (we free it later in case of failure) */
+  pLink = sqlite3_malloc( sizeof(*pLink) );
+  if( !pLink )
+    return SQLITE_NOMEM;
+
+  /* Access node list */
+  os2ShmEnterMutex();
+
+  /* Find node by it's shared memory base name */
+  for( pNode = os2ShmNodeList; 
+       pNode && stricmp(shmName, pNode->shmBaseName) != 0; 
+       pNode = pNode->pNext )   ;
+
+  /* Not found: allocate a new node */
+  if( !pNode ) {
+    pNode = sqlite3_malloc( sizeof(*pNode) + cbShmName );
+    if( pNode ) {
+      memset(pNode, 0, sizeof(*pNode) );
+      pNode->szRegion = szRegion;
+      pNode->hLockFile = (HFILE)-1;      
+      strcpy(pNode->shmBaseName, shmName);
+
+#ifdef SQLITE_OS2_NO_WAL_LOCK_FILE
+      if( DosDupHandle(fd->h, &pNode->hLockFile) != 0 ) {
+#else
+      sprintf(shmName, "%s-lck", fd->zFullPathCp);
+      if( DosOpen((PSZ)shmName, &pNode->hLockFile, &action, 0, FILE_NORMAL, 
+                  OPEN_ACTION_OPEN_IF_EXISTS | OPEN_ACTION_CREATE_IF_NEW,
+                  OPEN_ACCESS_READWRITE | OPEN_SHARE_DENYNONE | 
+                  OPEN_FLAGS_NOINHERIT | OPEN_FLAGS_FAIL_ON_ERROR,
+                  NULL) != 0 ) {
+#endif
+        sqlite3_free(pNode);  
+        rc = SQLITE_IOERR;
+      } else {
+        pNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
+        if( !pNode->mutex ) {
+          sqlite3_free(pNode);  
+          rc = SQLITE_NOMEM;
+        }
+      }   
+    } else {
+      rc = SQLITE_NOMEM;
+    }
+    
+    if( rc == SQLITE_OK ) {
+      pNode->pNext = os2ShmNodeList;
+      os2ShmNodeList = pNode;
+    } else {
+      pNode = NULL;
+    }
+  } else if( pNode->szRegion != szRegion ) {
+    rc = SQLITE_IOERR_SHMSIZE;
+    pNode = NULL;
+  }
+
+  if( pNode ) {
+    sqlite3_mutex_enter(pNode->mutex);
+
+    memset(pLink, 0, sizeof(*pLink));
+
+    pLink->pShmNode = pNode;
+    pLink->pNext = pNode->pFirst;
+    pNode->pFirst = pLink;
+    pNode->nRef++;
+
+    fd->pShmLink = pLink;
+
+    sqlite3_mutex_leave(pNode->mutex);
+    
+  } else {
+    /* Error occured. Free our link object. */
+    sqlite3_free(pLink);  
+  }
+
+  os2ShmLeaveMutex();
+
+  ERR_TRACE(rc, ("os2OpenSharedMemory: %d  %s\n", rc, fd->zFullPathCp))  
+  
+  return rc;
+}
+
+/*
+** Purge the os2ShmNodeList list of all entries with nRef==0.
+**
+** This is not a VFS shared-memory method; it is a utility function called
+** by VFS shared-memory methods.
+*/
+static void os2PurgeShmNodes( int deleteFlag ) {
+  os2ShmNode *pNode;
+  os2ShmNode **ppNode;
+
+  os2ShmEnterMutex();
+  
+  ppNode = &os2ShmNodeList;
+
+  while( *ppNode ) {
+    pNode = *ppNode;
+
+    if( pNode->nRef == 0 ) {
+      *ppNode = pNode->pNext;   
+     
+      if( pNode->apRegion ) {
+        /* Prevent other processes from resizing the shared memory */
+        os2ShmSystemLock(pNode, _SHM_WRLCK_WAIT, OS2_SHM_DMS, 1);
+
+        while( pNode->nRegion-- ) {
+#ifdef SQLITE_DEBUG
+          int rc = 
+#endif          
+          DosFreeMem(pNode->apRegion[pNode->nRegion]);
+
+          OSTRACE(("SHM-PURGE pid-%d unmap region=%d %s\n",
+                  (int)GetCurrentProcessId(), pNode->nRegion,
+                  rc == 0 ? "ok" : "failed"));
+        }
+
+        /* Allow other processes to resize the shared memory */
+        os2ShmSystemLock(pNode, _SHM_UNLCK, OS2_SHM_DMS, 1);
+
+        sqlite3_free(pNode->apRegion);
+      }  
+
+      DosClose(pNode->hLockFile);
+      
+#ifndef SQLITE_OS2_NO_WAL_LOCK_FILE
+      if( deleteFlag ) {
+         char fileName[CCHMAXPATH];
+         /* Skip "\\SHAREMEM\\" */
+         sprintf(fileName, "%s-lck", pNode->shmBaseName + 10);
+         /* restore colon */
+         fileName[1] = ':';
+         
+         DosForceDelete(fileName); 
+      }
+#endif
+
+      sqlite3_mutex_free(pNode->mutex);
+
+      sqlite3_free(pNode);
+      
+    } else {
+      ppNode = &pNode->pNext;
+    }
+  } 
+
+  os2ShmLeaveMutex();
+}
+
+/*
+** This function is called to obtain a pointer to region iRegion of the
+** shared-memory associated with the database file id. Shared-memory regions
+** are numbered starting from zero. Each shared-memory region is szRegion
+** bytes in size.
+**
+** If an error occurs, an error code is returned and *pp is set to NULL.
+**
+** Otherwise, if the bExtend parameter is 0 and the requested shared-memory
+** region has not been allocated (by any client, including one running in a
+** separate process), then *pp is set to NULL and SQLITE_OK returned. If
+** bExtend is non-zero and the requested shared-memory region has not yet
+** been allocated, it is allocated by this function.
+**
+** If the shared-memory region has already been allocated or is allocated by
+** this call as described above, then it is mapped into this processes
+** address space (if it is not already), *pp is set to point to the mapped
+** memory and SQLITE_OK returned.
+*/
+static int os2ShmMap(
+  sqlite3_file *id,               /* Handle open on database file */
+  int iRegion,                    /* Region to retrieve */
+  int szRegion,                   /* Size of regions */
+  int bExtend,                    /* True to extend block if necessary */
+  void volatile **pp              /* OUT: Mapped memory */
+){
+  PVOID pvTemp;
+  void **apRegion;
+  os2ShmNode *pNode;
+  int n, rc = SQLITE_OK;
+  char shmName[CCHMAXPATH];
+  os2File *pFile = (os2File*)id;
+  
+  *pp = NULL;
+
+  if( !pFile->pShmLink )
+    rc = os2OpenSharedMemory( pFile, szRegion );
+  
+  if( rc == SQLITE_OK ) {
+    pNode = pFile->pShmLink->pShmNode ;
+    
+    sqlite3_mutex_enter(pNode->mutex);
+    
+    assert( szRegion==pNode->szRegion );
+
+    /* Unmapped region ? */
+    if( iRegion >= pNode->nRegion ) {
+      /* Prevent other processes from resizing the shared memory */
+      os2ShmSystemLock(pNode, _SHM_WRLCK_WAIT, OS2_SHM_DMS, 1);
+
+      apRegion = sqlite3_realloc(
+        pNode->apRegion, (iRegion + 1) * sizeof(apRegion[0]));
+
+      if( apRegion ) {
+        pNode->apRegion = apRegion;
+
+        while( pNode->nRegion <= iRegion ) {
+          sprintf(shmName, "%s-%u", 
+                  pNode->shmBaseName, pNode->nRegion);
+
+          if( DosGetNamedSharedMem(&pvTemp, (PSZ)shmName, 
+                PAG_READ | PAG_WRITE) != NO_ERROR ) {
+            if( !bExtend )
+              break;
+
+            if( DosAllocSharedMem(&pvTemp, (PSZ)shmName, szRegion,
+                  PAG_READ | PAG_WRITE | PAG_COMMIT | OBJ_ANY) != NO_ERROR && 
+                DosAllocSharedMem(&pvTemp, (PSZ)shmName, szRegion,
+                  PAG_READ | PAG_WRITE | PAG_COMMIT) != NO_ERROR ) { 
+              rc = SQLITE_NOMEM;
+              break;
+            }
+          }
+
+          apRegion[pNode->nRegion++] = pvTemp;
+        }
+
+        /* zero out remaining entries */ 
+        for( n = pNode->nRegion; n <= iRegion; n++ )
+          pNode->apRegion[n] = NULL;
+
+        /* Return this region (maybe zero) */
+        *pp = pNode->apRegion[iRegion];
+      } else {
+        rc = SQLITE_NOMEM;
+      }
+
+      /* Allow other processes to resize the shared memory */
+      os2ShmSystemLock(pNode, _SHM_UNLCK, OS2_SHM_DMS, 1);
+      
+    } else {
+      /* Region has been mapped previously */
+      *pp = pNode->apRegion[iRegion];
+    }
+
+    sqlite3_mutex_leave(pNode->mutex);
+  } 
+
+  ERR_TRACE(rc, ("os2ShmMap: %s iRgn = %d, szRgn = %d, bExt = %d : %d\n", 
+                 pFile->zFullPathCp, iRegion, szRegion, bExtend, rc))
+          
+  return rc;
+}
+
+/*
+** Close a connection to shared-memory.  Delete the underlying
+** storage if deleteFlag is true.
+**
+** If there is no shared memory associated with the connection then this
+** routine is a harmless no-op.
+*/
+static int os2ShmUnmap(
+  sqlite3_file *id,               /* The underlying database file */
+  int deleteFlag                  /* Delete shared-memory if true */
+){
+  os2File *pFile = (os2File*)id;
+  os2ShmLink *pLink = pFile->pShmLink;
+  
+  if( pLink ) {
+    int nRef = -1;
+    os2ShmLink **ppLink;
+    os2ShmNode *pNode = pLink->pShmNode;
+
+    sqlite3_mutex_enter(pNode->mutex);
+    
+    for( ppLink = &pNode->pFirst;
+         *ppLink && *ppLink != pLink;
+         ppLink = &(*ppLink)->pNext )   ;
+         
+    assert(*ppLink);
+
+    if( *ppLink ) {
+      *ppLink = pLink->pNext;
+      nRef = --pNode->nRef;
+    } else {
+      ERR_TRACE(1, ("os2ShmUnmap: link not found ! %s\n", 
+                    pNode->shmBaseName))
+    }
+    
+    pFile->pShmLink = NULL;
+    sqlite3_free(pLink);
+
+    sqlite3_mutex_leave(pNode->mutex);
+    
+    if( nRef == 0 )
+      os2PurgeShmNodes( deleteFlag );
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** Change the lock state for a shared-memory segment.
+**
+** Note that the relationship between SHAREd and EXCLUSIVE locks is a little
+** different here than in posix.  In xShmLock(), one can go from unlocked
+** to shared and back or from unlocked to exclusive and back.  But one may
+** not go from shared to exclusive or from exclusive to shared.
+*/
+static int os2ShmLock(
+  sqlite3_file *id,          /* Database file holding the shared memory */
+  int ofst,                  /* First lock to acquire or release */
+  int n,                     /* Number of locks to acquire or release */
+  int flags                  /* What to do with the lock */
+){
+  u32 mask;                             /* Mask of locks to take or release */
+  int rc = SQLITE_OK;                   /* Result code */
+  os2File *pFile = (os2File*)id;
+  os2ShmLink *p = pFile->pShmLink;      /* The shared memory being locked */
+  os2ShmLink *pX;                       /* For looping over all siblings */
+  os2ShmNode *pShmNode = p->pShmNode;   /* Our node */
+  
+  assert( ofst>=0 && ofst+n<=SQLITE_SHM_NLOCK );
+  assert( n>=1 );
+  assert( flags==(SQLITE_SHM_LOCK | SQLITE_SHM_SHARED)
+       || flags==(SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE)
+       || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED)
+       || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE) );
+  assert( n==1 || (flags & SQLITE_SHM_EXCLUSIVE)!=0 );
+
+  mask = (u32)((1U<<(ofst+n)) - (1U<<ofst));
+  assert( n>1 || mask==(1<<ofst) );
+
+
+  sqlite3_mutex_enter(pShmNode->mutex);
+
+  if( flags & SQLITE_SHM_UNLOCK ){
+    u32 allMask = 0; /* Mask of locks held by siblings */
+
+    /* See if any siblings hold this same lock */
+    for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
+      if( pX==p ) continue;
+      assert( (pX->exclMask & (p->exclMask|p->sharedMask))==0 );
+      allMask |= pX->sharedMask;
+    }
+
+    /* Unlock the system-level locks */
+    if( (mask & allMask)==0 ){
+      rc = os2ShmSystemLock(pShmNode, _SHM_UNLCK, ofst+OS2_SHM_BASE, n);
+    }else{
+      rc = SQLITE_OK;
+    }
+
+    /* Undo the local locks */
+    if( rc==SQLITE_OK ){
+      p->exclMask &= ~mask;
+      p->sharedMask &= ~mask;
+    } 
+  }else if( flags & SQLITE_SHM_SHARED ){
+    u32 allShared = 0;  /* Union of locks held by connections other than "p" */
+
+    /* Find out which shared locks are already held by sibling connections.
+    ** If any sibling already holds an exclusive lock, go ahead and return
+    ** SQLITE_BUSY.
+    */
+    for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
+      if( (pX->exclMask & mask)!=0 ){
+        rc = SQLITE_BUSY;
+        break;
+      }
+      allShared |= pX->sharedMask;
+    }
+
+    /* Get shared locks at the system level, if necessary */
+    if( rc==SQLITE_OK ){
+      if( (allShared & mask)==0 ){
+        rc = os2ShmSystemLock(pShmNode, _SHM_RDLCK, ofst+OS2_SHM_BASE, n);
+      }else{
+        rc = SQLITE_OK;
+      }
+    }
+
+    /* Get the local shared locks */
+    if( rc==SQLITE_OK ){
+      p->sharedMask |= mask;
+    }
+  }else{
+    /* Make sure no sibling connections hold locks that will block this
+    ** lock.  If any do, return SQLITE_BUSY right away.
+    */
+    for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
+      if( (pX->exclMask & mask)!=0 || (pX->sharedMask & mask)!=0 ){
+        rc = SQLITE_BUSY;
+        break;
+      }
+    }
+  
+    /* Get the exclusive locks at the system level.  Then if successful
+    ** also mark the local connection as being locked.
+    */
+    if( rc==SQLITE_OK ){
+      rc = os2ShmSystemLock(pShmNode, _SHM_WRLCK, ofst+OS2_SHM_BASE, n);
+      if( rc==SQLITE_OK ){
+        assert( (p->sharedMask & mask)==0 );
+        p->exclMask |= mask;
+      }
+    }
+  }
+
+  sqlite3_mutex_leave(pShmNode->mutex);
+  
+  OSTRACE(("SHM-LOCK shmid-%d, pid-%d got %03x,%03x %s\n",
+           p->id, (int)GetCurrentProcessId(), p->sharedMask, p->exclMask,
+           rc ? "failed" : "ok"));
+
+  ERR_TRACE(rc, ("os2ShmLock: ofst = %d, n = %d, flags = 0x%x -> %d \n", 
+                 ofst, n, flags, rc))
+                  
+  return rc; 
+}
+
+/*
+** Implement a memory barrier or memory fence on shared memory.
+**
+** All loads and stores begun before the barrier must complete before
+** any load or store begun after the barrier.
+*/
+static void os2ShmBarrier(
+  sqlite3_file *id                /* Database file holding the shared memory */
+){
+  UNUSED_PARAMETER(id);
+  os2ShmEnterMutex();
+  os2ShmLeaveMutex();
+}
+
+#else
+# define os2ShmMap     0
+# define os2ShmLock    0
+# define os2ShmBarrier 0
+# define os2ShmUnmap   0
+#endif /* #ifndef SQLITE_OMIT_WAL */
+
+
+/*
+** This vector defines all the methods that can operate on an
+** sqlite3_file for os2.
+*/
+static const sqlite3_io_methods os2IoMethod = {
+  2,                              /* iVersion */
+  os2Close,                       /* xClose */
+  os2Read,                        /* xRead */
+  os2Write,                       /* xWrite */
+  os2Truncate,                    /* xTruncate */
+  os2Sync,                        /* xSync */
+  os2FileSize,                    /* xFileSize */
+  os2Lock,                        /* xLock */
+  os2Unlock,                      /* xUnlock */
+  os2CheckReservedLock,           /* xCheckReservedLock */
+  os2FileControl,                 /* xFileControl */
+  os2SectorSize,                  /* xSectorSize */
+  os2DeviceCharacteristics,       /* xDeviceCharacteristics */
+  os2ShmMap,                      /* xShmMap */
+  os2ShmLock,                     /* xShmLock */
+  os2ShmBarrier,                  /* xShmBarrier */
+  os2ShmUnmap                     /* xShmUnmap */
+};
+
+
+/***************************************************************************
+** Here ends the I/O methods that form the sqlite3_io_methods object.
+**
+** The next block of code implements the VFS methods.
+****************************************************************************/
+
+/*
+** Create a temporary file name in zBuf.  zBuf must be big enough to
+** hold at pVfs->mxPathname characters.
+*/
+static int getTempname(int nBuf, char *zBuf ){
+  static const char zChars[] =
+    "abcdefghijklmnopqrstuvwxyz"
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+    "0123456789";
+  int i, j;
+  PSZ zTempPathCp;      
+  char zTempPath[CCHMAXPATH];
+  ULONG ulDriveNum, ulDriveMap;
+  
+  /* It's odd to simulate an io-error here, but really this is just
+  ** using the io-error infrastructure to test that SQLite handles this
+  ** function failing. 
+  */
+  SimulateIOError( return SQLITE_IOERR );
+
+  if( sqlite3_temp_directory ) {
+    sqlite3_snprintf(CCHMAXPATH-30, zTempPath, "%s", sqlite3_temp_directory);
+  } else if( DosScanEnv( (PSZ)"TEMP",   &zTempPathCp ) == NO_ERROR ||
+             DosScanEnv( (PSZ)"TMP",    &zTempPathCp ) == NO_ERROR ||
+             DosScanEnv( (PSZ)"TMPDIR", &zTempPathCp ) == NO_ERROR ) {
+    char *zTempPathUTF = convertCpPathToUtf8( (char *)zTempPathCp );
+    sqlite3_snprintf(CCHMAXPATH-30, zTempPath, "%s", zTempPathUTF);
+    free( zTempPathUTF );
+  } else if( DosQueryCurrentDisk( &ulDriveNum, &ulDriveMap ) == NO_ERROR ) {
+    zTempPath[0] = (char)('A' + ulDriveNum - 1);
+    zTempPath[1] = ':'; 
+    zTempPath[2] = '\0'; 
+  } else {
+    zTempPath[0] = '\0'; 
+  }
+  
+  /* Strip off a trailing slashes or backslashes, otherwise we would get *
+   * multiple (back)slashes which causes DosOpen() to fail.              *
+   * Trailing spaces are not allowed, either.                            */
+  j = sqlite3Strlen30(zTempPath);
+  while( j > 0 && ( zTempPath[j-1] == '\\' || zTempPath[j-1] == '/' || 
+                    zTempPath[j-1] == ' ' ) ){
+    j--;
+  }
+  zTempPath[j] = '\0';
+  
+  /* We use 20 bytes to randomize the name */
+  sqlite3_snprintf(nBuf-22, zBuf,
+                   "%s\\"SQLITE_TEMP_FILE_PREFIX, zTempPath);
+  j = sqlite3Strlen30(zBuf);
+  sqlite3_randomness( 20, &zBuf[j] );
+  for( i = 0; i < 20; i++, j++ ){
+    zBuf[j] = zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
+  }
+  zBuf[j] = 0;
+
+  OSTRACE(( "TEMP FILENAME: %s\n", zBuf ));
+  return SQLITE_OK;
+}
+
+
+/*
+** Turn a relative pathname into a full pathname.  Write the full
+** pathname into zFull[].  zFull[] will be at least pVfs->mxPathname
+** bytes in size.
+*/
+static int os2FullPathname(
+  sqlite3_vfs *pVfs,          /* Pointer to vfs object */
+  const char *zRelative,      /* Possibly relative input path */
+  int nFull,                  /* Size of output buffer in bytes */
+  char *zFull                 /* Output buffer */
+){
+  char *zRelativeCp = convertUtf8PathToCp( zRelative );
+  char zFullCp[CCHMAXPATH] = "\0";
+  char *zFullUTF;
+  APIRET rc = DosQueryPathInfo( (PSZ)zRelativeCp, FIL_QUERYFULLNAME, 
+                                zFullCp, CCHMAXPATH );
+  free( zRelativeCp );
+  zFullUTF = convertCpPathToUtf8( zFullCp );
+  sqlite3_snprintf( nFull, zFull, zFullUTF );
+  free( zFullUTF );
+  return rc == NO_ERROR ? SQLITE_OK : SQLITE_IOERR;
+}
+
+
+/*
+** Open a file.
+*/
+static int os2Open(
+  sqlite3_vfs *pVfs,            /* Not used */
+  const char *zName,            /* Name of the file (UTF-8) */
+  sqlite3_file *id,             /* Write the SQLite file handle here */
+  int flags,                    /* Open mode flags */
+  int *pOutFlags                /* Status return flags */
+){
+  HFILE h;
+  ULONG ulOpenFlags = 0;
+  ULONG ulOpenMode = 0;
+  ULONG ulAction = 0;
+  ULONG rc;
+  os2File *pFile = (os2File*)id;
+  const char *zUtf8Name = zName;
+  char *zNameCp;
+  char  zTmpname[CCHMAXPATH];
+
+  int isExclusive  = (flags & SQLITE_OPEN_EXCLUSIVE);
+  int isCreate     = (flags & SQLITE_OPEN_CREATE);
+  int isReadWrite  = (flags & SQLITE_OPEN_READWRITE);
+#ifndef NDEBUG
+  int isDelete     = (flags & SQLITE_OPEN_DELETEONCLOSE);
+  int isReadonly   = (flags & SQLITE_OPEN_READONLY);
+  int eType        = (flags & 0xFFFFFF00);
+  int isOpenJournal = (isCreate && (
+        eType==SQLITE_OPEN_MASTER_JOURNAL 
+     || eType==SQLITE_OPEN_MAIN_JOURNAL 
+     || eType==SQLITE_OPEN_WAL
+  ));
+#endif
+
+  UNUSED_PARAMETER(pVfs);
+  assert( id!=0 );
+
+  /* Check the following statements are true: 
+  **
+  **   (a) Exactly one of the READWRITE and READONLY flags must be set, and 
+  **   (b) if CREATE is set, then READWRITE must also be set, and
+  **   (c) if EXCLUSIVE is set, then CREATE must also be set.
+  **   (d) if DELETEONCLOSE is set, then CREATE must also be set.
+  */
+  assert((isReadonly==0 || isReadWrite==0) && (isReadWrite || isReadonly));
+  assert(isCreate==0 || isReadWrite);
+  assert(isExclusive==0 || isCreate);
+  assert(isDelete==0 || isCreate);
+
+  /* The main DB, main journal, WAL file and master journal are never 
+  ** automatically deleted. Nor are they ever temporary files.  */
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );
+
+  /* Assert that the upper layer has set one of the "file-type" flags. */
+  assert( eType==SQLITE_OPEN_MAIN_DB      || eType==SQLITE_OPEN_TEMP_DB 
+       || eType==SQLITE_OPEN_MAIN_JOURNAL || eType==SQLITE_OPEN_TEMP_JOURNAL 
+       || eType==SQLITE_OPEN_SUBJOURNAL   || eType==SQLITE_OPEN_MASTER_JOURNAL 
+       || eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL
+  );
+
+  memset( pFile, 0, sizeof(*pFile) );
+  pFile->h = (HFILE)-1;
+
+  /* If the second argument to this function is NULL, generate a 
+  ** temporary file name to use 
+  */
+  if( !zUtf8Name ){
+    assert(isDelete && !isOpenJournal);
+    rc = getTempname(CCHMAXPATH, zTmpname);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+    zUtf8Name = zTmpname;
+  }
+
+  if( isReadWrite ){
+    ulOpenMode |= OPEN_ACCESS_READWRITE;
+  }else{
+    ulOpenMode |= OPEN_ACCESS_READONLY;
+  }
+
+  /* Open in random access mode for possibly better speed.  Allow full
+  ** sharing because file locks will provide exclusive access when needed.
+  ** The handle should not be inherited by child processes and we don't 
+  ** want popups from the critical error handler.
+  */
+  ulOpenMode |= OPEN_FLAGS_RANDOM | OPEN_SHARE_DENYNONE | 
+                OPEN_FLAGS_NOINHERIT | OPEN_FLAGS_FAIL_ON_ERROR;
+
+  /* SQLITE_OPEN_EXCLUSIVE is used to make sure that a new file is 
+  ** created. SQLite doesn't use it to indicate "exclusive access" 
+  ** as it is usually understood.
+  */
+  if( isExclusive ){
+    /* Creates a new file, only if it does not already exist. */
+    /* If the file exists, it fails. */
+    ulOpenFlags |= OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_FAIL_IF_EXISTS;
+  }else if( isCreate ){
+    /* Open existing file, or create if it doesn't exist */
+    ulOpenFlags |= OPEN_ACTION_CREATE_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS;
+  }else{
+    /* Opens a file, only if it exists. */
+    ulOpenFlags |= OPEN_ACTION_FAIL_IF_NEW | OPEN_ACTION_OPEN_IF_EXISTS;
+  }
+
+  zNameCp = convertUtf8PathToCp( zUtf8Name );
+  rc = DosOpen( (PSZ)zNameCp,
+                &h,
+                &ulAction,
+                0L,
+                FILE_NORMAL,
+                ulOpenFlags,
+                ulOpenMode,
+                (PEAOP2)NULL );
+  free( zNameCp );
+
+  if( rc != NO_ERROR ){
+    OSTRACE(( "OPEN Invalid handle rc=%d: zName=%s, ulAction=%#lx, ulFlags=%#lx, ulMode=%#lx\n",
+              rc, zUtf8Name, ulAction, ulOpenFlags, ulOpenMode ));
+
+    if( isReadWrite ){
+      return os2Open( pVfs, zName, id,
+                      ((flags|SQLITE_OPEN_READONLY)&~(SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE)),
+                      pOutFlags );
+    }else{
+      return SQLITE_CANTOPEN;
+    }
+  }
+
+  if( pOutFlags ){
+    *pOutFlags = isReadWrite ? SQLITE_OPEN_READWRITE : SQLITE_OPEN_READONLY;
+  }
+
+  os2FullPathname( pVfs, zUtf8Name, sizeof( zTmpname ), zTmpname );
+  pFile->zFullPathCp = convertUtf8PathToCp( zTmpname );
+  pFile->pMethod = &os2IoMethod;
+  pFile->flags = flags;
+  pFile->h = h;
+
+  OpenCounter(+1);
+  OSTRACE(( "OPEN %d pOutFlags=%d\n", pFile->h, pOutFlags ));
+  return SQLITE_OK;
+}
+
+/*
+** Delete the named file.
+*/
+static int os2Delete(
+  sqlite3_vfs *pVfs,                     /* Not used on os2 */
+  const char *zFilename,                 /* Name of file to delete */
+  int syncDir                            /* Not used on os2 */
+){
+  APIRET rc;
+  char *zFilenameCp;
+  SimulateIOError( return SQLITE_IOERR_DELETE );
+  zFilenameCp = convertUtf8PathToCp( zFilename );
+  rc = DosDelete( (PSZ)zFilenameCp );
+  free( zFilenameCp );
+  OSTRACE(( "DELETE \"%s\"\n", zFilename ));
+  return (rc == NO_ERROR ||
+          rc == ERROR_FILE_NOT_FOUND ||
+          rc == ERROR_PATH_NOT_FOUND ) ? SQLITE_OK : SQLITE_IOERR_DELETE;
+}
+
+/*
+** Check the existance and status of a file.
+*/
+static int os2Access(
+  sqlite3_vfs *pVfs,        /* Not used on os2 */
+  const char *zFilename,    /* Name of file to check */
+  int flags,                /* Type of test to make on this file */
+  int *pOut                 /* Write results here */
+){
+  APIRET rc;
+  FILESTATUS3 fsts3ConfigInfo;
+  char *zFilenameCp;
+
+  UNUSED_PARAMETER(pVfs);
+  SimulateIOError( return SQLITE_IOERR_ACCESS; );
+  
+  zFilenameCp = convertUtf8PathToCp( zFilename );
+  rc = DosQueryPathInfo( (PSZ)zFilenameCp, FIL_STANDARD,
+                         &fsts3ConfigInfo, sizeof(FILESTATUS3) );
+  free( zFilenameCp );
+  OSTRACE(( "ACCESS fsts3ConfigInfo.attrFile=%d flags=%d rc=%d\n",
+            fsts3ConfigInfo.attrFile, flags, rc ));
+
+  switch( flags ){
+    case SQLITE_ACCESS_EXISTS:
+      /* For an SQLITE_ACCESS_EXISTS query, treat a zero-length file
+      ** as if it does not exist.
+      */
+      if( fsts3ConfigInfo.cbFile == 0 ) 
+        rc = ERROR_FILE_NOT_FOUND;
+      break;
+    case SQLITE_ACCESS_READ:
+      break;
+    case SQLITE_ACCESS_READWRITE:
+      if( fsts3ConfigInfo.attrFile & FILE_READONLY )
+        rc = ERROR_ACCESS_DENIED;
+      break;
+    default:
+      rc = ERROR_FILE_NOT_FOUND;
+      assert( !"Invalid flags argument" );
+  }
+
+  *pOut = (rc == NO_ERROR);
+  OSTRACE(( "ACCESS %s flags %d: rc=%d\n", zFilename, flags, *pOut ));
+
+  return SQLITE_OK;
+}
+
+
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
+/*
+** Interfaces for opening a shared library, finding entry points
+** within the shared library, and closing the shared library.
+*/
+/*
+** Interfaces for opening a shared library, finding entry points
+** within the shared library, and closing the shared library.
+*/
+static void *os2DlOpen(sqlite3_vfs *pVfs, const char *zFilename){
+  HMODULE hmod;
+  APIRET rc;
+  char *zFilenameCp = convertUtf8PathToCp(zFilename);
+  rc = DosLoadModule(NULL, 0, (PSZ)zFilenameCp, &hmod);
+  free(zFilenameCp);
+  return rc != NO_ERROR ? 0 : (void*)hmod;
+}
+/*
+** A no-op since the error code is returned on the DosLoadModule call.
+** os2Dlopen returns zero if DosLoadModule is not successful.
+*/
+static void os2DlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){
+/* no-op */
+}
+static void (*os2DlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol))(void){
+  PFN pfn;
+  APIRET rc;
+  rc = DosQueryProcAddr((HMODULE)pHandle, 0L, (PSZ)zSymbol, &pfn);
+  if( rc != NO_ERROR ){
+    /* if the symbol itself was not found, search again for the same
+     * symbol with an extra underscore, that might be needed depending
+     * on the calling convention */
+    char _zSymbol[256] = "_";
+    strncat(_zSymbol, zSymbol, 254);
+    rc = DosQueryProcAddr((HMODULE)pHandle, 0L, (PSZ)_zSymbol, &pfn);
+  }
+  return rc != NO_ERROR ? 0 : (void(*)(void))pfn;
+}
+static void os2DlClose(sqlite3_vfs *pVfs, void *pHandle){
+  DosFreeModule((HMODULE)pHandle);
+}
+#else /* if SQLITE_OMIT_LOAD_EXTENSION is defined: */
+  #define os2DlOpen 0
+  #define os2DlError 0
+  #define os2DlSym 0
+  #define os2DlClose 0
+#endif
+
+
+/*
+** Write up to nBuf bytes of randomness into zBuf.
+*/
+static int os2Randomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf ){
+  int n = 0;
+#if defined(SQLITE_TEST)
+  n = nBuf;
+  memset(zBuf, 0, nBuf);
+#else
+  int i;                           
+  PPIB ppib;
+  PTIB ptib;
+  DATETIME dt; 
+  static unsigned c = 0;
+  /* Ordered by variation probability */
+  static ULONG svIdx[6] = { QSV_MS_COUNT, QSV_TIME_LOW,
+                            QSV_MAXPRMEM, QSV_MAXSHMEM,
+                            QSV_TOTAVAILMEM, QSV_TOTRESMEM };
+
+  /* 8 bytes; timezone and weekday don't increase the randomness much */
+  if( (int)sizeof(dt)-3 <= nBuf - n ){
+    c += 0x0100;
+    DosGetDateTime(&dt);
+    dt.year = (USHORT)((dt.year - 1900) | c);
+    memcpy(&zBuf[n], &dt, sizeof(dt)-3);
+    n += sizeof(dt)-3;
+  }
+
+  /* 4 bytes; PIDs and TIDs are 16 bit internally, so combine them */
+  if( (int)sizeof(ULONG) <= nBuf - n ){
+    DosGetInfoBlocks(&ptib, &ppib);
+    *(PULONG)&zBuf[n] = MAKELONG(ppib->pib_ulpid,
+                                 ptib->tib_ptib2->tib2_ultid);
+    n += sizeof(ULONG);
+  }
+
+  /* Up to 6 * 4 bytes; variables depend on the system state */
+  for( i = 0; i < 6 && (int)sizeof(ULONG) <= nBuf - n; i++ ){
+    DosQuerySysInfo(svIdx[i], svIdx[i], 
+                    (PULONG)&zBuf[n], sizeof(ULONG));
+    n += sizeof(ULONG);
+  } 
+#endif
+
+  return n;
+}
+
+/*
+** Sleep for a little while.  Return the amount of time slept.
+** The argument is the number of microseconds we want to sleep.
+** The return value is the number of microseconds of sleep actually
+** requested from the underlying operating system, a number which
+** might be greater than or equal to the argument, but not less
+** than the argument.
+*/
+static int os2Sleep( sqlite3_vfs *pVfs, int microsec ){
+  DosSleep( (microsec/1000) );
+  return microsec;
+}
+
+/*
+** The following variable, if set to a non-zero value, becomes the result
+** returned from sqlite3OsCurrentTime().  This is used for testing.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_current_time = 0;
+#endif
+
+/*
+** Find the current time (in Universal Coordinated Time).  Write into *piNow
+** the current time and date as a Julian Day number times 86_400_000.  In
+** other words, write into *piNow the number of milliseconds since the Julian
+** epoch of noon in Greenwich on November 24, 4714 B.C according to the
+** proleptic Gregorian calendar.
+**
+** On success, return 0.  Return 1 if the time and date cannot be found.
+*/
+static int os2CurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *piNow){
+#ifdef SQLITE_TEST
+  static const sqlite3_int64 unixEpoch = 24405875*(sqlite3_int64)8640000;
+#endif
+  int year, month, datepart, timepart;
+ 
+  DATETIME dt;
+  DosGetDateTime( &dt );
+
+  year = dt.year;
+  month = dt.month;
+
+  /* Calculations from http://www.astro.keele.ac.uk/~rno/Astronomy/hjd.html
+  ** http://www.astro.keele.ac.uk/~rno/Astronomy/hjd-0.1.c
+  ** Calculate the Julian days
+  */
+  datepart = (int)dt.day - 32076 +
+    1461*(year + 4800 + (month - 14)/12)/4 +
+    367*(month - 2 - (month - 14)/12*12)/12 -
+    3*((year + 4900 + (month - 14)/12)/100)/4;
+
+  /* Time in milliseconds, hours to noon added */
+  timepart = 12*3600*1000 + dt.hundredths*10 + dt.seconds*1000 +
+    ((int)dt.minutes + dt.timezone)*60*1000 + dt.hours*3600*1000;
+
+  *piNow = (sqlite3_int64)datepart*86400*1000 + timepart;
+   
+#ifdef SQLITE_TEST
+  if( sqlite3_current_time ){
+    *piNow = 1000*(sqlite3_int64)sqlite3_current_time + unixEpoch;
+  }
+#endif
+
+  UNUSED_PARAMETER(pVfs);
+  return 0;
+}
+
+/*
+** Find the current time (in Universal Coordinated Time).  Write the
+** current time and date as a Julian Day number into *prNow and
+** return 0.  Return 1 if the time and date cannot be found.
+*/
+static int os2CurrentTime( sqlite3_vfs *pVfs, double *prNow ){
+  int rc;
+  sqlite3_int64 i;
+  rc = os2CurrentTimeInt64(pVfs, &i);
+  if( !rc ){
+    *prNow = i/86400000.0;
+  }
+  return rc;
+}
+
+/*
+** The idea is that this function works like a combination of
+** GetLastError() and FormatMessage() on windows (or errno and
+** strerror_r() on unix). After an error is returned by an OS
+** function, SQLite calls this function with zBuf pointing to
+** a buffer of nBuf bytes. The OS layer should populate the
+** buffer with a nul-terminated UTF-8 encoded error message
+** describing the last IO error to have occurred within the calling
+** thread.
+**
+** If the error message is too large for the supplied buffer,
+** it should be truncated. The return value of xGetLastError
+** is zero if the error message fits in the buffer, or non-zero
+** otherwise (if the message was truncated). If non-zero is returned,
+** then it is not necessary to include the nul-terminator character
+** in the output buffer.
+**
+** Not supplying an error message will have no adverse effect
+** on SQLite. It is fine to have an implementation that never
+** returns an error message:
+**
+**   int xGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
+**     assert(zBuf[0]=='\0');
+**     return 0;
+**   }
+**
+** However if an error message is supplied, it will be incorporated
+** by sqlite into the error message available to the user using
+** sqlite3_errmsg(), possibly making IO errors easier to debug.
+*/
+static int os2GetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
+  assert(zBuf[0]=='\0');
+  return 0;
+}
+
+/*
+** Initialize and deinitialize the operating system interface.
+*/
+SQLITE_API int sqlite3_os_init(void){
+  static sqlite3_vfs os2Vfs = {
+    3,                 /* iVersion */
+    sizeof(os2File),   /* szOsFile */
+    CCHMAXPATH,        /* mxPathname */
+    0,                 /* pNext */
+    "os2",             /* zName */
+    0,                 /* pAppData */
+
+    os2Open,           /* xOpen */
+    os2Delete,         /* xDelete */
+    os2Access,         /* xAccess */
+    os2FullPathname,   /* xFullPathname */
+    os2DlOpen,         /* xDlOpen */
+    os2DlError,        /* xDlError */
+    os2DlSym,          /* xDlSym */
+    os2DlClose,        /* xDlClose */
+    os2Randomness,     /* xRandomness */
+    os2Sleep,          /* xSleep */
+    os2CurrentTime,    /* xCurrentTime */
+    os2GetLastError,   /* xGetLastError */
+    os2CurrentTimeInt64, /* xCurrentTimeInt64 */
+    0,                 /* xSetSystemCall */
+    0,                 /* xGetSystemCall */
+    0                  /* xNextSystemCall */
+  };
+  sqlite3_vfs_register(&os2Vfs, 1);
+  initUconvObjects();
+/*  sqlite3OSTrace = 1; */
+  return SQLITE_OK;
+}
+SQLITE_API int sqlite3_os_end(void){
+  freeUconvObjects();
+  return SQLITE_OK;
+}
+
+#endif /* SQLITE_OS_OS2 */
+
+/************** End of os_os2.c **********************************************/
+/************** Begin file os_unix.c *****************************************/
+/*
+** 2004 May 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains the VFS implementation for unix-like operating systems
+** include Linux, MacOSX, *BSD, QNX, VxWorks, AIX, HPUX, and others.
+**
+** There are actually several different VFS implementations in this file.
+** The differences are in the way that file locking is done.  The default
+** implementation uses Posix Advisory Locks.  Alternative implementations
+** use flock(), dot-files, various proprietary locking schemas, or simply
+** skip locking all together.
+**
+** This source file is organized into divisions where the logic for various
+** subfunctions is contained within the appropriate division.  PLEASE
+** KEEP THE STRUCTURE OF THIS FILE INTACT.  New code should be placed
+** in the correct division and should be clearly labeled.
+**
+** The layout of divisions is as follows:
+**
+**   *  General-purpose declarations and utility functions.
+**   *  Unique file ID logic used by VxWorks.
+**   *  Various locking primitive implementations (all except proxy locking):
+**      + for Posix Advisory Locks
+**      + for no-op locks
+**      + for dot-file locks
+**      + for flock() locking
+**      + for named semaphore locks (VxWorks only)
+**      + for AFP filesystem locks (MacOSX only)
+**   *  sqlite3_file methods not associated with locking.
+**   *  Definitions of sqlite3_io_methods objects for all locking
+**      methods plus "finder" functions for each locking method.
+**   *  sqlite3_vfs method implementations.
+**   *  Locking primitives for the proxy uber-locking-method. (MacOSX only)
+**   *  Definitions of sqlite3_vfs objects for all locking methods
+**      plus implementations of sqlite3_os_init() and sqlite3_os_end().
+*/
+#if SQLITE_OS_UNIX              /* This file is used on unix only */
+
+/*
+** There are various methods for file locking used for concurrency
+** control:
+**
+**   1. POSIX locking (the default),
+**   2. No locking,
+**   3. Dot-file locking,
+**   4. flock() locking,
+**   5. AFP locking (OSX only),
+**   6. Named POSIX semaphores (VXWorks only),
+**   7. proxy locking. (OSX only)
+**
+** Styles 4, 5, and 7 are only available of SQLITE_ENABLE_LOCKING_STYLE
+** is defined to 1.  The SQLITE_ENABLE_LOCKING_STYLE also enables automatic
+** selection of the appropriate locking style based on the filesystem
+** where the database is located.  
+*/
+#if !defined(SQLITE_ENABLE_LOCKING_STYLE)
+#  if defined(__APPLE__)
+#    define SQLITE_ENABLE_LOCKING_STYLE 1
+#  else
+#    define SQLITE_ENABLE_LOCKING_STYLE 0
+#  endif
+#endif
+
+/*
+** Define the OS_VXWORKS pre-processor macro to 1 if building on 
+** vxworks, or 0 otherwise.
+*/
+#ifndef OS_VXWORKS
+#  if defined(__RTP__) || defined(_WRS_KERNEL)
+#    define OS_VXWORKS 1
+#  else
+#    define OS_VXWORKS 0
+#  endif
+#endif
+
+/*
+** These #defines should enable >2GB file support on Posix if the
+** underlying operating system supports it.  If the OS lacks
+** large file support, these should be no-ops.
+**
+** Large file support can be disabled using the -DSQLITE_DISABLE_LFS switch
+** on the compiler command line.  This is necessary if you are compiling
+** on a recent machine (ex: RedHat 7.2) but you want your code to work
+** on an older machine (ex: RedHat 6.0).  If you compile on RedHat 7.2
+** without this option, LFS is enable.  But LFS does not exist in the kernel
+** in RedHat 6.0, so the code won't work.  Hence, for maximum binary
+** portability you should omit LFS.
+**
+** The previous paragraph was written in 2005.  (This paragraph is written
+** on 2008-11-28.) These days, all Linux kernels support large files, so
+** you should probably leave LFS enabled.  But some embedded platforms might
+** lack LFS in which case the SQLITE_DISABLE_LFS macro might still be useful.
+*/
+#ifndef SQLITE_DISABLE_LFS
+# define _LARGE_FILE       1
+# ifndef _FILE_OFFSET_BITS
+#   define _FILE_OFFSET_BITS 64
+# endif
+# define _LARGEFILE_SOURCE 1
+#endif
+
+/*
+** standard include files.
+*/
+#include <sys/types.h>
+#include <sys/stat.h>
+#include <fcntl.h>
+#include <unistd.h>
+#include <sys/time.h>
+#include <errno.h>
+#ifndef SQLITE_OMIT_WAL
+#include <sys/mman.h>
+#endif
+
+#if SQLITE_ENABLE_LOCKING_STYLE
+# include <sys/ioctl.h>
+# if OS_VXWORKS
+#  include <semaphore.h>
+#  include <limits.h>
+# else
+#  include <sys/file.h>
+#  include <sys/param.h>
+# endif
+#endif /* SQLITE_ENABLE_LOCKING_STYLE */
+
+#if defined(__APPLE__) || (SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS)
+# include <sys/mount.h>
+#endif
+
+/*
+** Allowed values of unixFile.fsFlags
+*/
+#define SQLITE_FSFLAGS_IS_MSDOS     0x1
+
+/*
+** If we are to be thread-safe, include the pthreads header and define
+** the SQLITE_UNIX_THREADS macro.
+*/
+#if SQLITE_THREADSAFE
+# define SQLITE_UNIX_THREADS 1
+#endif
+
+/*
+** Default permissions when creating a new file
+*/
+#ifndef SQLITE_DEFAULT_FILE_PERMISSIONS
+# define SQLITE_DEFAULT_FILE_PERMISSIONS 0644
+#endif
+
+/*
+ ** Default permissions when creating auto proxy dir
+ */
+#ifndef SQLITE_DEFAULT_PROXYDIR_PERMISSIONS
+# define SQLITE_DEFAULT_PROXYDIR_PERMISSIONS 0755
+#endif
+
+/*
+** Maximum supported path-length.
+*/
+#define MAX_PATHNAME 512
+
+/*
+** Only set the lastErrno if the error code is a real error and not 
+** a normal expected return code of SQLITE_BUSY or SQLITE_OK
+*/
+#define IS_LOCK_ERROR(x)  ((x != SQLITE_OK) && (x != SQLITE_BUSY))
+
+/* Forward references */
+typedef struct unixShm unixShm;               /* Connection shared memory */
+typedef struct unixShmNode unixShmNode;       /* Shared memory instance */
+typedef struct unixInodeInfo unixInodeInfo;   /* An i-node */
+typedef struct UnixUnusedFd UnixUnusedFd;     /* An unused file descriptor */
+
+/*
+** Sometimes, after a file handle is closed by SQLite, the file descriptor
+** cannot be closed immediately. In these cases, instances of the following
+** structure are used to store the file descriptor while waiting for an
+** opportunity to either close or reuse it.
+*/
+struct UnixUnusedFd {
+  int fd;                   /* File descriptor to close */
+  int flags;                /* Flags this file descriptor was opened with */
+  UnixUnusedFd *pNext;      /* Next unused file descriptor on same file */
+};
+
+/*
+** The unixFile structure is subclass of sqlite3_file specific to the unix
+** VFS implementations.
+*/
+typedef struct unixFile unixFile;
+struct unixFile {
+  sqlite3_io_methods const *pMethod;  /* Always the first entry */
+  unixInodeInfo *pInode;              /* Info about locks on this inode */
+  int h;                              /* The file descriptor */
+  int dirfd;                          /* File descriptor for the directory */
+  unsigned char eFileLock;            /* The type of lock held on this fd */
+  unsigned char ctrlFlags;            /* Behavioral bits.  UNIXFILE_* flags */
+  int lastErrno;                      /* The unix errno from last I/O error */
+  void *lockingContext;               /* Locking style specific state */
+  UnixUnusedFd *pUnused;              /* Pre-allocated UnixUnusedFd */
+  const char *zPath;                  /* Name of the file */
+  unixShm *pShm;                      /* Shared memory segment information */
+  int szChunk;                        /* Configured by FCNTL_CHUNK_SIZE */
+#if SQLITE_ENABLE_LOCKING_STYLE
+  int openFlags;                      /* The flags specified at open() */
+#endif
+#if SQLITE_ENABLE_LOCKING_STYLE || defined(__APPLE__)
+  unsigned fsFlags;                   /* cached details from statfs() */
+#endif
+#if OS_VXWORKS
+  int isDelete;                       /* Delete on close if true */
+  struct vxworksFileId *pId;          /* Unique file ID */
+#endif
+#ifndef NDEBUG
+  /* The next group of variables are used to track whether or not the
+  ** transaction counter in bytes 24-27 of database files are updated
+  ** whenever any part of the database changes.  An assertion fault will
+  ** occur if a file is updated without also updating the transaction
+  ** counter.  This test is made to avoid new problems similar to the
+  ** one described by ticket #3584. 
+  */
+  unsigned char transCntrChng;   /* True if the transaction counter changed */
+  unsigned char dbUpdate;        /* True if any part of database file changed */
+  unsigned char inNormalWrite;   /* True if in a normal write operation */
+#endif
+#ifdef SQLITE_TEST
+  /* In test mode, increase the size of this structure a bit so that 
+  ** it is larger than the struct CrashFile defined in test6.c.
+  */
+  char aPadding[32];
+#endif
+};
+
+/*
+** Allowed values for the unixFile.ctrlFlags bitmask:
+*/
+#define UNIXFILE_EXCL   0x01     /* Connections from one process only */
+#define UNIXFILE_RDONLY 0x02     /* Connection is read only */
+
+/*
+** Include code that is common to all os_*.c files
+*/
+/************** Include os_common.h in the middle of os_unix.c ***************/
+/************** Begin file os_common.h ***************************************/
+/*
+** 2004 May 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains macros and a little bit of code that is common to
+** all of the platform-specific files (os_*.c) and is #included into those
+** files.
+**
+** This file should be #included by the os_*.c files only.  It is not a
+** general purpose header file.
+*/
+#ifndef _OS_COMMON_H_
+#define _OS_COMMON_H_
+
+/*
+** At least two bugs have slipped in because we changed the MEMORY_DEBUG
+** macro to SQLITE_DEBUG and some older makefiles have not yet made the
+** switch.  The following code should catch this problem at compile-time.
+*/
+#ifdef MEMORY_DEBUG
+# error "The MEMORY_DEBUG macro is obsolete.  Use SQLITE_DEBUG instead."
+#endif
+
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE int sqlite3OSTrace = 0;
+#define OSTRACE(X)          if( sqlite3OSTrace ) sqlite3DebugPrintf X
+#else
+#define OSTRACE(X)
+#endif
+
+/*
+** Macros for performance tracing.  Normally turned off.  Only works
+** on i486 hardware.
+*/
+#ifdef SQLITE_PERFORMANCE_TRACE
+
+/* 
+** hwtime.h contains inline assembler code for implementing 
+** high-performance timing routines.
+*/
+/************** Include hwtime.h in the middle of os_common.h ****************/
+/************** Begin file hwtime.h ******************************************/
+/*
+** 2008 May 27
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains inline asm code for retrieving "high-performance"
+** counters for x86 class CPUs.
+*/
+#ifndef _HWTIME_H_
+#define _HWTIME_H_
+
+/*
+** The following routine only works on pentium-class (or newer) processors.
+** It uses the RDTSC opcode to read the cycle count value out of the
+** processor and returns that value.  This can be used for high-res
+** profiling.
+*/
+#if (defined(__GNUC__) || defined(_MSC_VER)) && \
+      (defined(i386) || defined(__i386__) || defined(_M_IX86))
+
+  #if defined(__GNUC__)
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+     unsigned int lo, hi;
+     __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
+     return (sqlite_uint64)hi << 32 | lo;
+  }
+
+  #elif defined(_MSC_VER)
+
+  __declspec(naked) __inline sqlite_uint64 __cdecl sqlite3Hwtime(void){
+     __asm {
+        rdtsc
+        ret       ; return value at EDX:EAX
+     }
+  }
+
+  #endif
+
+#elif (defined(__GNUC__) && defined(__x86_64__))
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+      unsigned long val;
+      __asm__ __volatile__ ("rdtsc" : "=A" (val));
+      return val;
+  }
+ 
+#elif (defined(__GNUC__) && defined(__ppc__))
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+      unsigned long long retval;
+      unsigned long junk;
+      __asm__ __volatile__ ("\n\
+          1:      mftbu   %1\n\
+                  mftb    %L0\n\
+                  mftbu   %0\n\
+                  cmpw    %0,%1\n\
+                  bne     1b"
+                  : "=r" (retval), "=r" (junk));
+      return retval;
+  }
+
+#else
+
+  #error Need implementation of sqlite3Hwtime() for your platform.
+
+  /*
+  ** To compile without implementing sqlite3Hwtime() for your platform,
+  ** you can remove the above #error and use the following
+  ** stub function.  You will lose timing support for many
+  ** of the debugging and testing utilities, but it should at
+  ** least compile and run.
+  */
+SQLITE_PRIVATE   sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
+
+#endif
+
+#endif /* !defined(_HWTIME_H_) */
+
+/************** End of hwtime.h **********************************************/
+/************** Continuing where we left off in os_common.h ******************/
+
+static sqlite_uint64 g_start;
+static sqlite_uint64 g_elapsed;
+#define TIMER_START       g_start=sqlite3Hwtime()
+#define TIMER_END         g_elapsed=sqlite3Hwtime()-g_start
+#define TIMER_ELAPSED     g_elapsed
+#else
+#define TIMER_START
+#define TIMER_END
+#define TIMER_ELAPSED     ((sqlite_uint64)0)
+#endif
+
+/*
+** If we compile with the SQLITE_TEST macro set, then the following block
+** of code will give us the ability to simulate a disk I/O error.  This
+** is used for testing the I/O recovery logic.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_io_error_hit = 0;            /* Total number of I/O Errors */
+SQLITE_API int sqlite3_io_error_hardhit = 0;        /* Number of non-benign errors */
+SQLITE_API int sqlite3_io_error_pending = 0;        /* Count down to first I/O error */
+SQLITE_API int sqlite3_io_error_persist = 0;        /* True if I/O errors persist */
+SQLITE_API int sqlite3_io_error_benign = 0;         /* True if errors are benign */
+SQLITE_API int sqlite3_diskfull_pending = 0;
+SQLITE_API int sqlite3_diskfull = 0;
+#define SimulateIOErrorBenign(X) sqlite3_io_error_benign=(X)
+#define SimulateIOError(CODE)  \
+  if( (sqlite3_io_error_persist && sqlite3_io_error_hit) \
+       || sqlite3_io_error_pending-- == 1 )  \
+              { local_ioerr(); CODE; }
+static void local_ioerr(){
+  IOTRACE(("IOERR\n"));
+  sqlite3_io_error_hit++;
+  if( !sqlite3_io_error_benign ) sqlite3_io_error_hardhit++;
+}
+#define SimulateDiskfullError(CODE) \
+   if( sqlite3_diskfull_pending ){ \
+     if( sqlite3_diskfull_pending == 1 ){ \
+       local_ioerr(); \
+       sqlite3_diskfull = 1; \
+       sqlite3_io_error_hit = 1; \
+       CODE; \
+     }else{ \
+       sqlite3_diskfull_pending--; \
+     } \
+   }
+#else
+#define SimulateIOErrorBenign(X)
+#define SimulateIOError(A)
+#define SimulateDiskfullError(A)
+#endif
+
+/*
+** When testing, keep a count of the number of open files.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_open_file_count = 0;
+#define OpenCounter(X)  sqlite3_open_file_count+=(X)
+#else
+#define OpenCounter(X)
+#endif
+
+#endif /* !defined(_OS_COMMON_H_) */
+
+/************** End of os_common.h *******************************************/
+/************** Continuing where we left off in os_unix.c ********************/
+
+/*
+** Define various macros that are missing from some systems.
+*/
+#ifndef O_LARGEFILE
+# define O_LARGEFILE 0
+#endif
+#ifdef SQLITE_DISABLE_LFS
+# undef O_LARGEFILE
+# define O_LARGEFILE 0
+#endif
+#ifndef O_NOFOLLOW
+# define O_NOFOLLOW 0
+#endif
+#ifndef O_BINARY
+# define O_BINARY 0
+#endif
+
+/*
+** The threadid macro resolves to the thread-id or to 0.  Used for
+** testing and debugging only.
+*/
+#if SQLITE_THREADSAFE
+#define threadid pthread_self()
+#else
+#define threadid 0
+#endif
+
+/*
+** Many system calls are accessed through pointer-to-functions so that
+** they may be overridden at runtime to facilitate fault injection during
+** testing and sandboxing.  The following array holds the names and pointers
+** to all overrideable system calls.
+*/
+static struct unix_syscall {
+  const char *zName;            /* Name of the sytem call */
+  sqlite3_syscall_ptr pCurrent; /* Current value of the system call */
+  sqlite3_syscall_ptr pDefault; /* Default value */
+} aSyscall[] = {
+  { "open",         (sqlite3_syscall_ptr)open,       0  },
+#define osOpen      ((int(*)(const char*,int,...))aSyscall[0].pCurrent)
+
+  { "close",        (sqlite3_syscall_ptr)close,      0  },
+#define osClose     ((int(*)(int))aSyscall[1].pCurrent)
+
+  { "access",       (sqlite3_syscall_ptr)access,     0  },
+#define osAccess    ((int(*)(const char*,int))aSyscall[2].pCurrent)
+
+  { "getcwd",       (sqlite3_syscall_ptr)getcwd,     0  },
+#define osGetcwd    ((char*(*)(char*,size_t))aSyscall[3].pCurrent)
+
+  { "stat",         (sqlite3_syscall_ptr)stat,       0  },
+#define osStat      ((int(*)(const char*,struct stat*))aSyscall[4].pCurrent)
+
+/*
+** The DJGPP compiler environment looks mostly like Unix, but it
+** lacks the fcntl() system call.  So redefine fcntl() to be something
+** that always succeeds.  This means that locking does not occur under
+** DJGPP.  But it is DOS - what did you expect?
+*/
+#ifdef __DJGPP__
+  { "fstat",        0,                 0  },
+#define osFstat(a,b,c)    0
+#else     
+  { "fstat",        (sqlite3_syscall_ptr)fstat,      0  },
+#define osFstat     ((int(*)(int,struct stat*))aSyscall[5].pCurrent)
+#endif
+
+  { "ftruncate",    (sqlite3_syscall_ptr)ftruncate,  0  },
+#define osFtruncate ((int(*)(int,off_t))aSyscall[6].pCurrent)
+
+  { "fcntl",        (sqlite3_syscall_ptr)fcntl,      0  },
+#define osFcntl     ((int(*)(int,int,...))aSyscall[7].pCurrent)
+
+  { "read",         (sqlite3_syscall_ptr)read,       0  },
+#define osRead      ((ssize_t(*)(int,void*,size_t))aSyscall[8].pCurrent)
+
+#if defined(USE_PREAD) || defined(SQLITE_ENABLE_LOCKING_STYLE)
+  { "pread",        (sqlite3_syscall_ptr)pread,      0  },
+#else
+  { "pread",        (sqlite3_syscall_ptr)0,          0  },
+#endif
+#define osPread     ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[9].pCurrent)
+
+#if defined(USE_PREAD64)
+  { "pread64",      (sqlite3_syscall_ptr)pread64,    0  },
+#else
+  { "pread64",      (sqlite3_syscall_ptr)0,          0  },
+#endif
+#define osPread64   ((ssize_t(*)(int,void*,size_t,off_t))aSyscall[10].pCurrent)
+
+  { "write",        (sqlite3_syscall_ptr)write,      0  },
+#define osWrite     ((ssize_t(*)(int,const void*,size_t))aSyscall[11].pCurrent)
+
+#if defined(USE_PREAD) || defined(SQLITE_ENABLE_LOCKING_STYLE)
+  { "pwrite",       (sqlite3_syscall_ptr)pwrite,     0  },
+#else
+  { "pwrite",       (sqlite3_syscall_ptr)0,          0  },
+#endif
+#define osPwrite    ((ssize_t(*)(int,const void*,size_t,off_t))\
+                    aSyscall[12].pCurrent)
+
+#if defined(USE_PREAD64)
+  { "pwrite64",     (sqlite3_syscall_ptr)pwrite64,   0  },
+#else
+  { "pwrite64",     (sqlite3_syscall_ptr)0,          0  },
+#endif
+#define osPwrite64  ((ssize_t(*)(int,const void*,size_t,off_t))\
+                    aSyscall[13].pCurrent)
+
+#if SQLITE_ENABLE_LOCKING_STYLE
+  { "fchmod",       (sqlite3_syscall_ptr)fchmod,     0  },
+#else
+  { "fchmod",       (sqlite3_syscall_ptr)0,          0  },
+#endif
+#define osFchmod    ((int(*)(int,mode_t))aSyscall[14].pCurrent)
+
+#if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE
+  { "fallocate",    (sqlite3_syscall_ptr)posix_fallocate,  0 },
+#else
+  { "fallocate",    (sqlite3_syscall_ptr)0,                0 },
+#endif
+#define osFallocate ((int(*)(int,off_t,off_t))aSyscall[15].pCurrent)
+
+}; /* End of the overrideable system calls */
+
+/*
+** This is the xSetSystemCall() method of sqlite3_vfs for all of the
+** "unix" VFSes.  Return SQLITE_OK opon successfully updating the
+** system call pointer, or SQLITE_NOTFOUND if there is no configurable
+** system call named zName.
+*/
+static int unixSetSystemCall(
+  sqlite3_vfs *pNotUsed,        /* The VFS pointer.  Not used */
+  const char *zName,            /* Name of system call to override */
+  sqlite3_syscall_ptr pNewFunc  /* Pointer to new system call value */
+){
+  unsigned int i;
+  int rc = SQLITE_NOTFOUND;
+
+  UNUSED_PARAMETER(pNotUsed);
+  if( zName==0 ){
+    /* If no zName is given, restore all system calls to their default
+    ** settings and return NULL
+    */
+    rc = SQLITE_OK;
+    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){
+      if( aSyscall[i].pDefault ){
+        aSyscall[i].pCurrent = aSyscall[i].pDefault;
+      }
+    }
+  }else{
+    /* If zName is specified, operate on only the one system call
+    ** specified.
+    */
+    for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){
+      if( strcmp(zName, aSyscall[i].zName)==0 ){
+        if( aSyscall[i].pDefault==0 ){
+          aSyscall[i].pDefault = aSyscall[i].pCurrent;
+        }
+        rc = SQLITE_OK;
+        if( pNewFunc==0 ) pNewFunc = aSyscall[i].pDefault;
+        aSyscall[i].pCurrent = pNewFunc;
+        break;
+      }
+    }
+  }
+  return rc;
+}
+
+/*
+** Return the value of a system call.  Return NULL if zName is not a
+** recognized system call name.  NULL is also returned if the system call
+** is currently undefined.
+*/
+static sqlite3_syscall_ptr unixGetSystemCall(
+  sqlite3_vfs *pNotUsed,
+  const char *zName
+){
+  unsigned int i;
+
+  UNUSED_PARAMETER(pNotUsed);
+  for(i=0; i<sizeof(aSyscall)/sizeof(aSyscall[0]); i++){
+    if( strcmp(zName, aSyscall[i].zName)==0 ) return aSyscall[i].pCurrent;
+  }
+  return 0;
+}
+
+/*
+** Return the name of the first system call after zName.  If zName==NULL
+** then return the name of the first system call.  Return NULL if zName
+** is the last system call or if zName is not the name of a valid
+** system call.
+*/
+static const char *unixNextSystemCall(sqlite3_vfs *p, const char *zName){
+  int i = -1;
+
+  UNUSED_PARAMETER(p);
+  if( zName ){
+    for(i=0; i<ArraySize(aSyscall)-1; i++){
+      if( strcmp(zName, aSyscall[i].zName)==0 ) break;
+    }
+  }
+  for(i++; i<ArraySize(aSyscall); i++){
+    if( aSyscall[i].pCurrent!=0 ) return aSyscall[i].zName;
+  }
+  return 0;
+}
+
+/*
+** Retry open() calls that fail due to EINTR
+*/
+static int robust_open(const char *z, int f, int m){
+  int rc;
+  do{ rc = osOpen(z,f,m); }while( rc<0 && errno==EINTR );
+  return rc;
+}
+
+/*
+** Helper functions to obtain and relinquish the global mutex. The
+** global mutex is used to protect the unixInodeInfo and
+** vxworksFileId objects used by this file, all of which may be 
+** shared by multiple threads.
+**
+** Function unixMutexHeld() is used to assert() that the global mutex 
+** is held when required. This function is only used as part of assert() 
+** statements. e.g.
+**
+**   unixEnterMutex()
+**     assert( unixMutexHeld() );
+**   unixEnterLeave()
+*/
+static void unixEnterMutex(void){
+  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+}
+static void unixLeaveMutex(void){
+  sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+}
+#ifdef SQLITE_DEBUG
+static int unixMutexHeld(void) {
+  return sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+}
+#endif
+
+
+#ifdef SQLITE_DEBUG
+/*
+** Helper function for printing out trace information from debugging
+** binaries. This returns the string represetation of the supplied
+** integer lock-type.
+*/
+static const char *azFileLock(int eFileLock){
+  switch( eFileLock ){
+    case NO_LOCK: return "NONE";
+    case SHARED_LOCK: return "SHARED";
+    case RESERVED_LOCK: return "RESERVED";
+    case PENDING_LOCK: return "PENDING";
+    case EXCLUSIVE_LOCK: return "EXCLUSIVE";
+  }
+  return "ERROR";
+}
+#endif
+
+#ifdef SQLITE_LOCK_TRACE
+/*
+** Print out information about all locking operations.
+**
+** This routine is used for troubleshooting locks on multithreaded
+** platforms.  Enable by compiling with the -DSQLITE_LOCK_TRACE
+** command-line option on the compiler.  This code is normally
+** turned off.
+*/
+static int lockTrace(int fd, int op, struct flock *p){
+  char *zOpName, *zType;
+  int s;
+  int savedErrno;
+  if( op==F_GETLK ){
+    zOpName = "GETLK";
+  }else if( op==F_SETLK ){
+    zOpName = "SETLK";
+  }else{
+    s = osFcntl(fd, op, p);
+    sqlite3DebugPrintf("fcntl unknown %d %d %d\n", fd, op, s);
+    return s;
+  }
+  if( p->l_type==F_RDLCK ){
+    zType = "RDLCK";
+  }else if( p->l_type==F_WRLCK ){
+    zType = "WRLCK";
+  }else if( p->l_type==F_UNLCK ){
+    zType = "UNLCK";
+  }else{
+    assert( 0 );
+  }
+  assert( p->l_whence==SEEK_SET );
+  s = osFcntl(fd, op, p);
+  savedErrno = errno;
+  sqlite3DebugPrintf("fcntl %d %d %s %s %d %d %d %d\n",
+     threadid, fd, zOpName, zType, (int)p->l_start, (int)p->l_len,
+     (int)p->l_pid, s);
+  if( s==(-1) && op==F_SETLK && (p->l_type==F_RDLCK || p->l_type==F_WRLCK) ){
+    struct flock l2;
+    l2 = *p;
+    osFcntl(fd, F_GETLK, &l2);
+    if( l2.l_type==F_RDLCK ){
+      zType = "RDLCK";
+    }else if( l2.l_type==F_WRLCK ){
+      zType = "WRLCK";
+    }else if( l2.l_type==F_UNLCK ){
+      zType = "UNLCK";
+    }else{
+      assert( 0 );
+    }
+    sqlite3DebugPrintf("fcntl-failure-reason: %s %d %d %d\n",
+       zType, (int)l2.l_start, (int)l2.l_len, (int)l2.l_pid);
+  }
+  errno = savedErrno;
+  return s;
+}
+#undef osFcntl
+#define osFcntl lockTrace
+#endif /* SQLITE_LOCK_TRACE */
+
+/*
+** Retry ftruncate() calls that fail due to EINTR
+*/
+static int robust_ftruncate(int h, sqlite3_int64 sz){
+  int rc;
+  do{ rc = osFtruncate(h,sz); }while( rc<0 && errno==EINTR );
+  return rc;
+}
+
+/*
+** This routine translates a standard POSIX errno code into something
+** useful to the clients of the sqlite3 functions.  Specifically, it is
+** intended to translate a variety of "try again" errors into SQLITE_BUSY
+** and a variety of "please close the file descriptor NOW" errors into 
+** SQLITE_IOERR
+** 
+** Errors during initialization of locks, or file system support for locks,
+** should handle ENOLCK, ENOTSUP, EOPNOTSUPP separately.
+*/
+static int sqliteErrorFromPosixError(int posixError, int sqliteIOErr) {
+  switch (posixError) {
+#if 0
+  /* At one point this code was not commented out. In theory, this branch
+  ** should never be hit, as this function should only be called after
+  ** a locking-related function (i.e. fcntl()) has returned non-zero with
+  ** the value of errno as the first argument. Since a system call has failed,
+  ** errno should be non-zero.
+  **
+  ** Despite this, if errno really is zero, we still don't want to return
+  ** SQLITE_OK. The system call failed, and *some* SQLite error should be
+  ** propagated back to the caller. Commenting this branch out means errno==0
+  ** will be handled by the "default:" case below.
+  */
+  case 0: 
+    return SQLITE_OK;
+#endif
+
+  case EAGAIN:
+  case ETIMEDOUT:
+  case EBUSY:
+  case EINTR:
+  case ENOLCK:  
+    /* random NFS retry error, unless during file system support 
+     * introspection, in which it actually means what it says */
+    return SQLITE_BUSY;
+    
+  case EACCES: 
+    /* EACCES is like EAGAIN during locking operations, but not any other time*/
+    if( (sqliteIOErr == SQLITE_IOERR_LOCK) || 
+	(sqliteIOErr == SQLITE_IOERR_UNLOCK) || 
+	(sqliteIOErr == SQLITE_IOERR_RDLOCK) ||
+	(sqliteIOErr == SQLITE_IOERR_CHECKRESERVEDLOCK) ){
+      return SQLITE_BUSY;
+    }
+    /* else fall through */
+  case EPERM: 
+    return SQLITE_PERM;
+    
+  /* EDEADLK is only possible if a call to fcntl(F_SETLKW) is made. And
+  ** this module never makes such a call. And the code in SQLite itself 
+  ** asserts that SQLITE_IOERR_BLOCKED is never returned. For these reasons
+  ** this case is also commented out. If the system does set errno to EDEADLK,
+  ** the default SQLITE_IOERR_XXX code will be returned. */
+#if 0
+  case EDEADLK:
+    return SQLITE_IOERR_BLOCKED;
+#endif
+    
+#if EOPNOTSUPP!=ENOTSUP
+  case EOPNOTSUPP: 
+    /* something went terribly awry, unless during file system support 
+     * introspection, in which it actually means what it says */
+#endif
+#ifdef ENOTSUP
+  case ENOTSUP: 
+    /* invalid fd, unless during file system support introspection, in which 
+     * it actually means what it says */
+#endif
+  case EIO:
+  case EBADF:
+  case EINVAL:
+  case ENOTCONN:
+  case ENODEV:
+  case ENXIO:
+  case ENOENT:
+  case ESTALE:
+  case ENOSYS:
+    /* these should force the client to close the file and reconnect */
+    
+  default: 
+    return sqliteIOErr;
+  }
+}
+
+
+
+/******************************************************************************
+****************** Begin Unique File ID Utility Used By VxWorks ***************
+**
+** On most versions of unix, we can get a unique ID for a file by concatenating
+** the device number and the inode number.  But this does not work on VxWorks.
+** On VxWorks, a unique file id must be based on the canonical filename.
+**
+** A pointer to an instance of the following structure can be used as a
+** unique file ID in VxWorks.  Each instance of this structure contains
+** a copy of the canonical filename.  There is also a reference count.  
+** The structure is reclaimed when the number of pointers to it drops to
+** zero.
+**
+** There are never very many files open at one time and lookups are not
+** a performance-critical path, so it is sufficient to put these
+** structures on a linked list.
+*/
+struct vxworksFileId {
+  struct vxworksFileId *pNext;  /* Next in a list of them all */
+  int nRef;                     /* Number of references to this one */
+  int nName;                    /* Length of the zCanonicalName[] string */
+  char *zCanonicalName;         /* Canonical filename */
+};
+
+#if OS_VXWORKS
+/* 
+** All unique filenames are held on a linked list headed by this
+** variable:
+*/
+static struct vxworksFileId *vxworksFileList = 0;
+
+/*
+** Simplify a filename into its canonical form
+** by making the following changes:
+**
+**  * removing any trailing and duplicate /
+**  * convert /./ into just /
+**  * convert /A/../ where A is any simple name into just /
+**
+** Changes are made in-place.  Return the new name length.
+**
+** The original filename is in z[0..n-1].  Return the number of
+** characters in the simplified name.
+*/
+static int vxworksSimplifyName(char *z, int n){
+  int i, j;
+  while( n>1 && z[n-1]=='/' ){ n--; }
+  for(i=j=0; i<n; i++){
+    if( z[i]=='/' ){
+      if( z[i+1]=='/' ) continue;
+      if( z[i+1]=='.' && i+2<n && z[i+2]=='/' ){
+        i += 1;
+        continue;
+      }
+      if( z[i+1]=='.' && i+3<n && z[i+2]=='.' && z[i+3]=='/' ){
+        while( j>0 && z[j-1]!='/' ){ j--; }
+        if( j>0 ){ j--; }
+        i += 2;
+        continue;
+      }
+    }
+    z[j++] = z[i];
+  }
+  z[j] = 0;
+  return j;
+}
+
+/*
+** Find a unique file ID for the given absolute pathname.  Return
+** a pointer to the vxworksFileId object.  This pointer is the unique
+** file ID.
+**
+** The nRef field of the vxworksFileId object is incremented before
+** the object is returned.  A new vxworksFileId object is created
+** and added to the global list if necessary.
+**
+** If a memory allocation error occurs, return NULL.
+*/
+static struct vxworksFileId *vxworksFindFileId(const char *zAbsoluteName){
+  struct vxworksFileId *pNew;         /* search key and new file ID */
+  struct vxworksFileId *pCandidate;   /* For looping over existing file IDs */
+  int n;                              /* Length of zAbsoluteName string */
+
+  assert( zAbsoluteName[0]=='/' );
+  n = (int)strlen(zAbsoluteName);
+  pNew = sqlite3_malloc( sizeof(*pNew) + (n+1) );
+  if( pNew==0 ) return 0;
+  pNew->zCanonicalName = (char*)&pNew[1];
+  memcpy(pNew->zCanonicalName, zAbsoluteName, n+1);
+  n = vxworksSimplifyName(pNew->zCanonicalName, n);
+
+  /* Search for an existing entry that matching the canonical name.
+  ** If found, increment the reference count and return a pointer to
+  ** the existing file ID.
+  */
+  unixEnterMutex();
+  for(pCandidate=vxworksFileList; pCandidate; pCandidate=pCandidate->pNext){
+    if( pCandidate->nName==n 
+     && memcmp(pCandidate->zCanonicalName, pNew->zCanonicalName, n)==0
+    ){
+       sqlite3_free(pNew);
+       pCandidate->nRef++;
+       unixLeaveMutex();
+       return pCandidate;
+    }
+  }
+
+  /* No match was found.  We will make a new file ID */
+  pNew->nRef = 1;
+  pNew->nName = n;
+  pNew->pNext = vxworksFileList;
+  vxworksFileList = pNew;
+  unixLeaveMutex();
+  return pNew;
+}
+
+/*
+** Decrement the reference count on a vxworksFileId object.  Free
+** the object when the reference count reaches zero.
+*/
+static void vxworksReleaseFileId(struct vxworksFileId *pId){
+  unixEnterMutex();
+  assert( pId->nRef>0 );
+  pId->nRef--;
+  if( pId->nRef==0 ){
+    struct vxworksFileId **pp;
+    for(pp=&vxworksFileList; *pp && *pp!=pId; pp = &((*pp)->pNext)){}
+    assert( *pp==pId );
+    *pp = pId->pNext;
+    sqlite3_free(pId);
+  }
+  unixLeaveMutex();
+}
+#endif /* OS_VXWORKS */
+/*************** End of Unique File ID Utility Used By VxWorks ****************
+******************************************************************************/
+
+
+/******************************************************************************
+*************************** Posix Advisory Locking ****************************
+**
+** POSIX advisory locks are broken by design.  ANSI STD 1003.1 (1996)
+** section 6.5.2.2 lines 483 through 490 specify that when a process
+** sets or clears a lock, that operation overrides any prior locks set
+** by the same process.  It does not explicitly say so, but this implies
+** that it overrides locks set by the same process using a different
+** file descriptor.  Consider this test case:
+**
+**       int fd1 = open("./file1", O_RDWR|O_CREAT, 0644);
+**       int fd2 = open("./file2", O_RDWR|O_CREAT, 0644);
+**
+** Suppose ./file1 and ./file2 are really the same file (because
+** one is a hard or symbolic link to the other) then if you set
+** an exclusive lock on fd1, then try to get an exclusive lock
+** on fd2, it works.  I would have expected the second lock to
+** fail since there was already a lock on the file due to fd1.
+** But not so.  Since both locks came from the same process, the
+** second overrides the first, even though they were on different
+** file descriptors opened on different file names.
+**
+** This means that we cannot use POSIX locks to synchronize file access
+** among competing threads of the same process.  POSIX locks will work fine
+** to synchronize access for threads in separate processes, but not
+** threads within the same process.
+**
+** To work around the problem, SQLite has to manage file locks internally
+** on its own.  Whenever a new database is opened, we have to find the
+** specific inode of the database file (the inode is determined by the
+** st_dev and st_ino fields of the stat structure that fstat() fills in)
+** and check for locks already existing on that inode.  When locks are
+** created or removed, we have to look at our own internal record of the
+** locks to see if another thread has previously set a lock on that same
+** inode.
+**
+** (Aside: The use of inode numbers as unique IDs does not work on VxWorks.
+** For VxWorks, we have to use the alternative unique ID system based on
+** canonical filename and implemented in the previous division.)
+**
+** The sqlite3_file structure for POSIX is no longer just an integer file
+** descriptor.  It is now a structure that holds the integer file
+** descriptor and a pointer to a structure that describes the internal
+** locks on the corresponding inode.  There is one locking structure
+** per inode, so if the same inode is opened twice, both unixFile structures
+** point to the same locking structure.  The locking structure keeps
+** a reference count (so we will know when to delete it) and a "cnt"
+** field that tells us its internal lock status.  cnt==0 means the
+** file is unlocked.  cnt==-1 means the file has an exclusive lock.
+** cnt>0 means there are cnt shared locks on the file.
+**
+** Any attempt to lock or unlock a file first checks the locking
+** structure.  The fcntl() system call is only invoked to set a 
+** POSIX lock if the internal lock structure transitions between
+** a locked and an unlocked state.
+**
+** But wait:  there are yet more problems with POSIX advisory locks.
+**
+** If you close a file descriptor that points to a file that has locks,
+** all locks on that file that are owned by the current process are
+** released.  To work around this problem, each unixInodeInfo object
+** maintains a count of the number of pending locks on tha inode.
+** When an attempt is made to close an unixFile, if there are
+** other unixFile open on the same inode that are holding locks, the call
+** to close() the file descriptor is deferred until all of the locks clear.
+** The unixInodeInfo structure keeps a list of file descriptors that need to
+** be closed and that list is walked (and cleared) when the last lock
+** clears.
+**
+** Yet another problem:  LinuxThreads do not play well with posix locks.
+**
+** Many older versions of linux use the LinuxThreads library which is
+** not posix compliant.  Under LinuxThreads, a lock created by thread
+** A cannot be modified or overridden by a different thread B.
+** Only thread A can modify the lock.  Locking behavior is correct
+** if the appliation uses the newer Native Posix Thread Library (NPTL)
+** on linux - with NPTL a lock created by thread A can override locks
+** in thread B.  But there is no way to know at compile-time which
+** threading library is being used.  So there is no way to know at
+** compile-time whether or not thread A can override locks on thread B.
+** One has to do a run-time check to discover the behavior of the
+** current process.
+**
+** SQLite used to support LinuxThreads.  But support for LinuxThreads
+** was dropped beginning with version 3.7.0.  SQLite will still work with
+** LinuxThreads provided that (1) there is no more than one connection 
+** per database file in the same process and (2) database connections
+** do not move across threads.
+*/
+
+/*
+** An instance of the following structure serves as the key used
+** to locate a particular unixInodeInfo object.
+*/
+struct unixFileId {
+  dev_t dev;                  /* Device number */
+#if OS_VXWORKS
+  struct vxworksFileId *pId;  /* Unique file ID for vxworks. */
+#else
+  ino_t ino;                  /* Inode number */
+#endif
+};
+
+/*
+** An instance of the following structure is allocated for each open
+** inode.  Or, on LinuxThreads, there is one of these structures for
+** each inode opened by each thread.
+**
+** A single inode can have multiple file descriptors, so each unixFile
+** structure contains a pointer to an instance of this object and this
+** object keeps a count of the number of unixFile pointing to it.
+*/
+struct unixInodeInfo {
+  struct unixFileId fileId;       /* The lookup key */
+  int nShared;                    /* Number of SHARED locks held */
+  unsigned char eFileLock;        /* One of SHARED_LOCK, RESERVED_LOCK etc. */
+  unsigned char bProcessLock;     /* An exclusive process lock is held */
+  int nRef;                       /* Number of pointers to this structure */
+  unixShmNode *pShmNode;          /* Shared memory associated with this inode */
+  int nLock;                      /* Number of outstanding file locks */
+  UnixUnusedFd *pUnused;          /* Unused file descriptors to close */
+  unixInodeInfo *pNext;           /* List of all unixInodeInfo objects */
+  unixInodeInfo *pPrev;           /*    .... doubly linked */
+#if defined(SQLITE_ENABLE_LOCKING_STYLE)
+  unsigned long long sharedByte;  /* for AFP simulated shared lock */
+#endif
+#if OS_VXWORKS
+  sem_t *pSem;                    /* Named POSIX semaphore */
+  char aSemName[MAX_PATHNAME+2];  /* Name of that semaphore */
+#endif
+};
+
+/*
+** A lists of all unixInodeInfo objects.
+*/
+static unixInodeInfo *inodeList = 0;
+
+/*
+**
+** This function - unixLogError_x(), is only ever called via the macro
+** unixLogError().
+**
+** It is invoked after an error occurs in an OS function and errno has been
+** set. It logs a message using sqlite3_log() containing the current value of
+** errno and, if possible, the human-readable equivalent from strerror() or
+** strerror_r().
+**
+** The first argument passed to the macro should be the error code that
+** will be returned to SQLite (e.g. SQLITE_IOERR_DELETE, SQLITE_CANTOPEN). 
+** The two subsequent arguments should be the name of the OS function that
+** failed (e.g. "unlink", "open") and the the associated file-system path,
+** if any.
+*/
+#define unixLogError(a,b,c)     unixLogErrorAtLine(a,b,c,__LINE__)
+static int unixLogErrorAtLine(
+  int errcode,                    /* SQLite error code */
+  const char *zFunc,              /* Name of OS function that failed */
+  const char *zPath,              /* File path associated with error */
+  int iLine                       /* Source line number where error occurred */
+){
+  char *zErr;                     /* Message from strerror() or equivalent */
+  int iErrno = errno;             /* Saved syscall error number */
+
+  /* If this is not a threadsafe build (SQLITE_THREADSAFE==0), then use
+  ** the strerror() function to obtain the human-readable error message
+  ** equivalent to errno. Otherwise, use strerror_r().
+  */ 
+#if SQLITE_THREADSAFE && defined(HAVE_STRERROR_R)
+  char aErr[80];
+  memset(aErr, 0, sizeof(aErr));
+  zErr = aErr;
+
+  /* If STRERROR_R_CHAR_P (set by autoconf scripts) or __USE_GNU is defined,
+  ** assume that the system provides the the GNU version of strerror_r() that 
+  ** returns a pointer to a buffer containing the error message. That pointer 
+  ** may point to aErr[], or it may point to some static storage somewhere. 
+  ** Otherwise, assume that the system provides the POSIX version of 
+  ** strerror_r(), which always writes an error message into aErr[].
+  **
+  ** If the code incorrectly assumes that it is the POSIX version that is
+  ** available, the error message will often be an empty string. Not a
+  ** huge problem. Incorrectly concluding that the GNU version is available 
+  ** could lead to a segfault though.
+  */
+#if defined(STRERROR_R_CHAR_P) || defined(__USE_GNU)
+  zErr = 
+# endif
+  strerror_r(iErrno, aErr, sizeof(aErr)-1);
+
+#elif SQLITE_THREADSAFE
+  /* This is a threadsafe build, but strerror_r() is not available. */
+  zErr = "";
+#else
+  /* Non-threadsafe build, use strerror(). */
+  zErr = strerror(iErrno);
+#endif
+
+  assert( errcode!=SQLITE_OK );
+  if( zPath==0 ) zPath = "";
+  sqlite3_log(errcode,
+      "os_unix.c:%d: (%d) %s(%s) - %s",
+      iLine, iErrno, zFunc, zPath, zErr
+  );
+
+  return errcode;
+}
+
+/*
+** Close a file descriptor.
+**
+** We assume that close() almost always works, since it is only in a
+** very sick application or on a very sick platform that it might fail.
+** If it does fail, simply leak the file descriptor, but do log the
+** error.
+**
+** Note that it is not safe to retry close() after EINTR since the
+** file descriptor might have already been reused by another thread.
+** So we don't even try to recover from an EINTR.  Just log the error
+** and move on.
+*/
+static void robust_close(unixFile *pFile, int h, int lineno){
+  if( osClose(h) ){
+    unixLogErrorAtLine(SQLITE_IOERR_CLOSE, "close",
+                       pFile ? pFile->zPath : 0, lineno);
+  }
+}
+
+/*
+** Close all file descriptors accumuated in the unixInodeInfo->pUnused list.
+*/ 
+static void closePendingFds(unixFile *pFile){
+  unixInodeInfo *pInode = pFile->pInode;
+  UnixUnusedFd *p;
+  UnixUnusedFd *pNext;
+  for(p=pInode->pUnused; p; p=pNext){
+    pNext = p->pNext;
+    robust_close(pFile, p->fd, __LINE__);
+    sqlite3_free(p);
+  }
+  pInode->pUnused = 0;
+}
+
+/*
+** Release a unixInodeInfo structure previously allocated by findInodeInfo().
+**
+** The mutex entered using the unixEnterMutex() function must be held
+** when this function is called.
+*/
+static void releaseInodeInfo(unixFile *pFile){
+  unixInodeInfo *pInode = pFile->pInode;
+  assert( unixMutexHeld() );
+  if( ALWAYS(pInode) ){
+    pInode->nRef--;
+    if( pInode->nRef==0 ){
+      assert( pInode->pShmNode==0 );
+      closePendingFds(pFile);
+      if( pInode->pPrev ){
+        assert( pInode->pPrev->pNext==pInode );
+        pInode->pPrev->pNext = pInode->pNext;
+      }else{
+        assert( inodeList==pInode );
+        inodeList = pInode->pNext;
+      }
+      if( pInode->pNext ){
+        assert( pInode->pNext->pPrev==pInode );
+        pInode->pNext->pPrev = pInode->pPrev;
+      }
+      sqlite3_free(pInode);
+    }
+  }
+}
+
+/*
+** Given a file descriptor, locate the unixInodeInfo object that
+** describes that file descriptor.  Create a new one if necessary.  The
+** return value might be uninitialized if an error occurs.
+**
+** The mutex entered using the unixEnterMutex() function must be held
+** when this function is called.
+**
+** Return an appropriate error code.
+*/
+static int findInodeInfo(
+  unixFile *pFile,               /* Unix file with file desc used in the key */
+  unixInodeInfo **ppInode        /* Return the unixInodeInfo object here */
+){
+  int rc;                        /* System call return code */
+  int fd;                        /* The file descriptor for pFile */
+  struct unixFileId fileId;      /* Lookup key for the unixInodeInfo */
+  struct stat statbuf;           /* Low-level file information */
+  unixInodeInfo *pInode = 0;     /* Candidate unixInodeInfo object */
+
+  assert( unixMutexHeld() );
+
+  /* Get low-level information about the file that we can used to
+  ** create a unique name for the file.
+  */
+  fd = pFile->h;
+  rc = osFstat(fd, &statbuf);
+  if( rc!=0 ){
+    pFile->lastErrno = errno;
+#ifdef EOVERFLOW
+    if( pFile->lastErrno==EOVERFLOW ) return SQLITE_NOLFS;
+#endif
+    return SQLITE_IOERR;
+  }
+
+#ifdef __APPLE__
+  /* On OS X on an msdos filesystem, the inode number is reported
+  ** incorrectly for zero-size files.  See ticket #3260.  To work
+  ** around this problem (we consider it a bug in OS X, not SQLite)
+  ** we always increase the file size to 1 by writing a single byte
+  ** prior to accessing the inode number.  The one byte written is
+  ** an ASCII 'S' character which also happens to be the first byte
+  ** in the header of every SQLite database.  In this way, if there
+  ** is a race condition such that another thread has already populated
+  ** the first page of the database, no damage is done.
+  */
+  if( statbuf.st_size==0 && (pFile->fsFlags & SQLITE_FSFLAGS_IS_MSDOS)!=0 ){
+    do{ rc = osWrite(fd, "S", 1); }while( rc<0 && errno==EINTR );
+    if( rc!=1 ){
+      pFile->lastErrno = errno;
+      return SQLITE_IOERR;
+    }
+    rc = osFstat(fd, &statbuf);
+    if( rc!=0 ){
+      pFile->lastErrno = errno;
+      return SQLITE_IOERR;
+    }
+  }
+#endif
+
+  memset(&fileId, 0, sizeof(fileId));
+  fileId.dev = statbuf.st_dev;
+#if OS_VXWORKS
+  fileId.pId = pFile->pId;
+#else
+  fileId.ino = statbuf.st_ino;
+#endif
+  pInode = inodeList;
+  while( pInode && memcmp(&fileId, &pInode->fileId, sizeof(fileId)) ){
+    pInode = pInode->pNext;
+  }
+  if( pInode==0 ){
+    pInode = sqlite3_malloc( sizeof(*pInode) );
+    if( pInode==0 ){
+      return SQLITE_NOMEM;
+    }
+    memset(pInode, 0, sizeof(*pInode));
+    memcpy(&pInode->fileId, &fileId, sizeof(fileId));
+    pInode->nRef = 1;
+    pInode->pNext = inodeList;
+    pInode->pPrev = 0;
+    if( inodeList ) inodeList->pPrev = pInode;
+    inodeList = pInode;
+  }else{
+    pInode->nRef++;
+  }
+  *ppInode = pInode;
+  return SQLITE_OK;
+}
+
+
+/*
+** This routine checks if there is a RESERVED lock held on the specified
+** file by this or any other process. If such a lock is held, set *pResOut
+** to a non-zero value otherwise *pResOut is set to zero.  The return value
+** is set to SQLITE_OK unless an I/O error occurs during lock checking.
+*/
+static int unixCheckReservedLock(sqlite3_file *id, int *pResOut){
+  int rc = SQLITE_OK;
+  int reserved = 0;
+  unixFile *pFile = (unixFile*)id;
+
+  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
+
+  assert( pFile );
+  unixEnterMutex(); /* Because pFile->pInode is shared across threads */
+
+  /* Check if a thread in this process holds such a lock */
+  if( pFile->pInode->eFileLock>SHARED_LOCK ){
+    reserved = 1;
+  }
+
+  /* Otherwise see if some other process holds it.
+  */
+#ifndef __DJGPP__
+  if( !reserved && !pFile->pInode->bProcessLock ){
+    struct flock lock;
+    lock.l_whence = SEEK_SET;
+    lock.l_start = RESERVED_BYTE;
+    lock.l_len = 1;
+    lock.l_type = F_WRLCK;
+    if( osFcntl(pFile->h, F_GETLK, &lock) ){
+      rc = SQLITE_IOERR_CHECKRESERVEDLOCK;
+      pFile->lastErrno = errno;
+    } else if( lock.l_type!=F_UNLCK ){
+      reserved = 1;
+    }
+  }
+#endif
+  
+  unixLeaveMutex();
+  OSTRACE(("TEST WR-LOCK %d %d %d (unix)\n", pFile->h, rc, reserved));
+
+  *pResOut = reserved;
+  return rc;
+}
+
+/*
+** Attempt to set a system-lock on the file pFile.  The lock is 
+** described by pLock.
+**
+** If the pFile was opened read/write from unix-excl, then the only lock
+** ever obtained is an exclusive lock, and it is obtained exactly once
+** the first time any lock is attempted.  All subsequent system locking
+** operations become no-ops.  Locking operations still happen internally,
+** in order to coordinate access between separate database connections
+** within this process, but all of that is handled in memory and the
+** operating system does not participate.
+**
+** This function is a pass-through to fcntl(F_SETLK) if pFile is using
+** any VFS other than "unix-excl" or if pFile is opened on "unix-excl"
+** and is read-only.
+**
+** Zero is returned if the call completes successfully, or -1 if a call
+** to fcntl() fails. In this case, errno is set appropriately (by fcntl()).
+*/
+static int unixFileLock(unixFile *pFile, struct flock *pLock){
+  int rc;
+  unixInodeInfo *pInode = pFile->pInode;
+  assert( unixMutexHeld() );
+  assert( pInode!=0 );
+  if( ((pFile->ctrlFlags & UNIXFILE_EXCL)!=0 || pInode->bProcessLock)
+   && ((pFile->ctrlFlags & UNIXFILE_RDONLY)==0)
+  ){
+    if( pInode->bProcessLock==0 ){
+      struct flock lock;
+      assert( pInode->nLock==0 );
+      lock.l_whence = SEEK_SET;
+      lock.l_start = SHARED_FIRST;
+      lock.l_len = SHARED_SIZE;
+      lock.l_type = F_WRLCK;
+      rc = osFcntl(pFile->h, F_SETLK, &lock);
+      if( rc<0 ) return rc;
+      pInode->bProcessLock = 1;
+      pInode->nLock++;
+    }else{
+      rc = 0;
+    }
+  }else{
+    rc = osFcntl(pFile->h, F_SETLK, pLock);
+  }
+  return rc;
+}
+
+/*
+** Lock the file with the lock specified by parameter eFileLock - one
+** of the following:
+**
+**     (1) SHARED_LOCK
+**     (2) RESERVED_LOCK
+**     (3) PENDING_LOCK
+**     (4) EXCLUSIVE_LOCK
+**
+** Sometimes when requesting one lock state, additional lock states
+** are inserted in between.  The locking might fail on one of the later
+** transitions leaving the lock state different from what it started but
+** still short of its goal.  The following chart shows the allowed
+** transitions and the inserted intermediate states:
+**
+**    UNLOCKED -> SHARED
+**    SHARED -> RESERVED
+**    SHARED -> (PENDING) -> EXCLUSIVE
+**    RESERVED -> (PENDING) -> EXCLUSIVE
+**    PENDING -> EXCLUSIVE
+**
+** This routine will only increase a lock.  Use the sqlite3OsUnlock()
+** routine to lower a locking level.
+*/
+static int unixLock(sqlite3_file *id, int eFileLock){
+  /* The following describes the implementation of the various locks and
+  ** lock transitions in terms of the POSIX advisory shared and exclusive
+  ** lock primitives (called read-locks and write-locks below, to avoid
+  ** confusion with SQLite lock names). The algorithms are complicated
+  ** slightly in order to be compatible with windows systems simultaneously
+  ** accessing the same database file, in case that is ever required.
+  **
+  ** Symbols defined in os.h indentify the 'pending byte' and the 'reserved
+  ** byte', each single bytes at well known offsets, and the 'shared byte
+  ** range', a range of 510 bytes at a well known offset.
+  **
+  ** To obtain a SHARED lock, a read-lock is obtained on the 'pending
+  ** byte'.  If this is successful, a random byte from the 'shared byte
+  ** range' is read-locked and the lock on the 'pending byte' released.
+  **
+  ** A process may only obtain a RESERVED lock after it has a SHARED lock.
+  ** A RESERVED lock is implemented by grabbing a write-lock on the
+  ** 'reserved byte'. 
+  **
+  ** A process may only obtain a PENDING lock after it has obtained a
+  ** SHARED lock. A PENDING lock is implemented by obtaining a write-lock
+  ** on the 'pending byte'. This ensures that no new SHARED locks can be
+  ** obtained, but existing SHARED locks are allowed to persist. A process
+  ** does not have to obtain a RESERVED lock on the way to a PENDING lock.
+  ** This property is used by the algorithm for rolling back a journal file
+  ** after a crash.
+  **
+  ** An EXCLUSIVE lock, obtained after a PENDING lock is held, is
+  ** implemented by obtaining a write-lock on the entire 'shared byte
+  ** range'. Since all other locks require a read-lock on one of the bytes
+  ** within this range, this ensures that no other locks are held on the
+  ** database. 
+  **
+  ** The reason a single byte cannot be used instead of the 'shared byte
+  ** range' is that some versions of windows do not support read-locks. By
+  ** locking a random byte from a range, concurrent SHARED locks may exist
+  ** even if the locking primitive used is always a write-lock.
+  */
+  int rc = SQLITE_OK;
+  unixFile *pFile = (unixFile*)id;
+  unixInodeInfo *pInode = pFile->pInode;
+  struct flock lock;
+  int tErrno = 0;
+
+  assert( pFile );
+  OSTRACE(("LOCK    %d %s was %s(%s,%d) pid=%d (unix)\n", pFile->h,
+      azFileLock(eFileLock), azFileLock(pFile->eFileLock),
+      azFileLock(pInode->eFileLock), pInode->nShared , getpid()));
+
+  /* If there is already a lock of this type or more restrictive on the
+  ** unixFile, do nothing. Don't use the end_lock: exit path, as
+  ** unixEnterMutex() hasn't been called yet.
+  */
+  if( pFile->eFileLock>=eFileLock ){
+    OSTRACE(("LOCK    %d %s ok (already held) (unix)\n", pFile->h,
+            azFileLock(eFileLock)));
+    return SQLITE_OK;
+  }
+
+  /* Make sure the locking sequence is correct.
+  **  (1) We never move from unlocked to anything higher than shared lock.
+  **  (2) SQLite never explicitly requests a pendig lock.
+  **  (3) A shared lock is always held when a reserve lock is requested.
+  */
+  assert( pFile->eFileLock!=NO_LOCK || eFileLock==SHARED_LOCK );
+  assert( eFileLock!=PENDING_LOCK );
+  assert( eFileLock!=RESERVED_LOCK || pFile->eFileLock==SHARED_LOCK );
+
+  /* This mutex is needed because pFile->pInode is shared across threads
+  */
+  unixEnterMutex();
+  pInode = pFile->pInode;
+
+  /* If some thread using this PID has a lock via a different unixFile*
+  ** handle that precludes the requested lock, return BUSY.
+  */
+  if( (pFile->eFileLock!=pInode->eFileLock && 
+          (pInode->eFileLock>=PENDING_LOCK || eFileLock>SHARED_LOCK))
+  ){
+    rc = SQLITE_BUSY;
+    goto end_lock;
+  }
+
+  /* If a SHARED lock is requested, and some thread using this PID already
+  ** has a SHARED or RESERVED lock, then increment reference counts and
+  ** return SQLITE_OK.
+  */
+  if( eFileLock==SHARED_LOCK && 
+      (pInode->eFileLock==SHARED_LOCK || pInode->eFileLock==RESERVED_LOCK) ){
+    assert( eFileLock==SHARED_LOCK );
+    assert( pFile->eFileLock==0 );
+    assert( pInode->nShared>0 );
+    pFile->eFileLock = SHARED_LOCK;
+    pInode->nShared++;
+    pInode->nLock++;
+    goto end_lock;
+  }
+
+
+  /* A PENDING lock is needed before acquiring a SHARED lock and before
+  ** acquiring an EXCLUSIVE lock.  For the SHARED lock, the PENDING will
+  ** be released.
+  */
+  lock.l_len = 1L;
+  lock.l_whence = SEEK_SET;
+  if( eFileLock==SHARED_LOCK 
+      || (eFileLock==EXCLUSIVE_LOCK && pFile->eFileLock<PENDING_LOCK)
+  ){
+    lock.l_type = (eFileLock==SHARED_LOCK?F_RDLCK:F_WRLCK);
+    lock.l_start = PENDING_BYTE;
+    if( unixFileLock(pFile, &lock) ){
+      tErrno = errno;
+      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
+      if( rc!=SQLITE_BUSY ){
+        pFile->lastErrno = tErrno;
+      }
+      goto end_lock;
+    }
+  }
+
+
+  /* If control gets to this point, then actually go ahead and make
+  ** operating system calls for the specified lock.
+  */
+  if( eFileLock==SHARED_LOCK ){
+    assert( pInode->nShared==0 );
+    assert( pInode->eFileLock==0 );
+    assert( rc==SQLITE_OK );
+
+    /* Now get the read-lock */
+    lock.l_start = SHARED_FIRST;
+    lock.l_len = SHARED_SIZE;
+    if( unixFileLock(pFile, &lock) ){
+      tErrno = errno;
+      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
+    }
+
+    /* Drop the temporary PENDING lock */
+    lock.l_start = PENDING_BYTE;
+    lock.l_len = 1L;
+    lock.l_type = F_UNLCK;
+    if( unixFileLock(pFile, &lock) && rc==SQLITE_OK ){
+      /* This could happen with a network mount */
+      tErrno = errno;
+      rc = SQLITE_IOERR_UNLOCK; 
+    }
+
+    if( rc ){
+      if( rc!=SQLITE_BUSY ){
+        pFile->lastErrno = tErrno;
+      }
+      goto end_lock;
+    }else{
+      pFile->eFileLock = SHARED_LOCK;
+      pInode->nLock++;
+      pInode->nShared = 1;
+    }
+  }else if( eFileLock==EXCLUSIVE_LOCK && pInode->nShared>1 ){
+    /* We are trying for an exclusive lock but another thread in this
+    ** same process is still holding a shared lock. */
+    rc = SQLITE_BUSY;
+  }else{
+    /* The request was for a RESERVED or EXCLUSIVE lock.  It is
+    ** assumed that there is a SHARED or greater lock on the file
+    ** already.
+    */
+    assert( 0!=pFile->eFileLock );
+    lock.l_type = F_WRLCK;
+
+    assert( eFileLock==RESERVED_LOCK || eFileLock==EXCLUSIVE_LOCK );
+    if( eFileLock==RESERVED_LOCK ){
+      lock.l_start = RESERVED_BYTE;
+      lock.l_len = 1L;
+    }else{
+      lock.l_start = SHARED_FIRST;
+      lock.l_len = SHARED_SIZE;
+    }
+
+    if( unixFileLock(pFile, &lock) ){
+      tErrno = errno;
+      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
+      if( rc!=SQLITE_BUSY ){
+        pFile->lastErrno = tErrno;
+      }
+    }
+  }
+  
+
+#ifndef NDEBUG
+  /* Set up the transaction-counter change checking flags when
+  ** transitioning from a SHARED to a RESERVED lock.  The change
+  ** from SHARED to RESERVED marks the beginning of a normal
+  ** write operation (not a hot journal rollback).
+  */
+  if( rc==SQLITE_OK
+   && pFile->eFileLock<=SHARED_LOCK
+   && eFileLock==RESERVED_LOCK
+  ){
+    pFile->transCntrChng = 0;
+    pFile->dbUpdate = 0;
+    pFile->inNormalWrite = 1;
+  }
+#endif
+
+
+  if( rc==SQLITE_OK ){
+    pFile->eFileLock = eFileLock;
+    pInode->eFileLock = eFileLock;
+  }else if( eFileLock==EXCLUSIVE_LOCK ){
+    pFile->eFileLock = PENDING_LOCK;
+    pInode->eFileLock = PENDING_LOCK;
+  }
+
+end_lock:
+  unixLeaveMutex();
+  OSTRACE(("LOCK    %d %s %s (unix)\n", pFile->h, azFileLock(eFileLock), 
+      rc==SQLITE_OK ? "ok" : "failed"));
+  return rc;
+}
+
+/*
+** Add the file descriptor used by file handle pFile to the corresponding
+** pUnused list.
+*/
+static void setPendingFd(unixFile *pFile){
+  unixInodeInfo *pInode = pFile->pInode;
+  UnixUnusedFd *p = pFile->pUnused;
+  p->pNext = pInode->pUnused;
+  pInode->pUnused = p;
+  pFile->h = -1;
+  pFile->pUnused = 0;
+}
+
+/*
+** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock
+** must be either NO_LOCK or SHARED_LOCK.
+**
+** If the locking level of the file descriptor is already at or below
+** the requested locking level, this routine is a no-op.
+** 
+** If handleNFSUnlock is true, then on downgrading an EXCLUSIVE_LOCK to SHARED
+** the byte range is divided into 2 parts and the first part is unlocked then
+** set to a read lock, then the other part is simply unlocked.  This works 
+** around a bug in BSD NFS lockd (also seen on MacOSX 10.3+) that fails to 
+** remove the write lock on a region when a read lock is set.
+*/
+static int posixUnlock(sqlite3_file *id, int eFileLock, int handleNFSUnlock){
+  unixFile *pFile = (unixFile*)id;
+  unixInodeInfo *pInode;
+  struct flock lock;
+  int rc = SQLITE_OK;
+  int h;
+
+  assert( pFile );
+  OSTRACE(("UNLOCK  %d %d was %d(%d,%d) pid=%d (unix)\n", pFile->h, eFileLock,
+      pFile->eFileLock, pFile->pInode->eFileLock, pFile->pInode->nShared,
+      getpid()));
+
+  assert( eFileLock<=SHARED_LOCK );
+  if( pFile->eFileLock<=eFileLock ){
+    return SQLITE_OK;
+  }
+  unixEnterMutex();
+  h = pFile->h;
+  pInode = pFile->pInode;
+  assert( pInode->nShared!=0 );
+  if( pFile->eFileLock>SHARED_LOCK ){
+    assert( pInode->eFileLock==pFile->eFileLock );
+    SimulateIOErrorBenign(1);
+    SimulateIOError( h=(-1) )
+    SimulateIOErrorBenign(0);
+
+#ifndef NDEBUG
+    /* When reducing a lock such that other processes can start
+    ** reading the database file again, make sure that the
+    ** transaction counter was updated if any part of the database
+    ** file changed.  If the transaction counter is not updated,
+    ** other connections to the same file might not realize that
+    ** the file has changed and hence might not know to flush their
+    ** cache.  The use of a stale cache can lead to database corruption.
+    */
+#if 0
+    assert( pFile->inNormalWrite==0
+         || pFile->dbUpdate==0
+         || pFile->transCntrChng==1 );
+#endif
+    pFile->inNormalWrite = 0;
+#endif
+
+    /* downgrading to a shared lock on NFS involves clearing the write lock
+    ** before establishing the readlock - to avoid a race condition we downgrade
+    ** the lock in 2 blocks, so that part of the range will be covered by a 
+    ** write lock until the rest is covered by a read lock:
+    **  1:   [WWWWW]
+    **  2:   [....W]
+    **  3:   [RRRRW]
+    **  4:   [RRRR.]
+    */
+    if( eFileLock==SHARED_LOCK ){
+
+#if !defined(__APPLE__) || !SQLITE_ENABLE_LOCKING_STYLE
+      (void)handleNFSUnlock;
+      assert( handleNFSUnlock==0 );
+#endif
+#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
+      if( handleNFSUnlock ){
+        int tErrno;               /* Error code from system call errors */
+        off_t divSize = SHARED_SIZE - 1;
+        
+        lock.l_type = F_UNLCK;
+        lock.l_whence = SEEK_SET;
+        lock.l_start = SHARED_FIRST;
+        lock.l_len = divSize;
+        if( unixFileLock(pFile, &lock)==(-1) ){
+          tErrno = errno;
+          rc = SQLITE_IOERR_UNLOCK;
+          if( IS_LOCK_ERROR(rc) ){
+            pFile->lastErrno = tErrno;
+          }
+          goto end_unlock;
+        }
+        lock.l_type = F_RDLCK;
+        lock.l_whence = SEEK_SET;
+        lock.l_start = SHARED_FIRST;
+        lock.l_len = divSize;
+        if( unixFileLock(pFile, &lock)==(-1) ){
+          tErrno = errno;
+          rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_RDLOCK);
+          if( IS_LOCK_ERROR(rc) ){
+            pFile->lastErrno = tErrno;
+          }
+          goto end_unlock;
+        }
+        lock.l_type = F_UNLCK;
+        lock.l_whence = SEEK_SET;
+        lock.l_start = SHARED_FIRST+divSize;
+        lock.l_len = SHARED_SIZE-divSize;
+        if( unixFileLock(pFile, &lock)==(-1) ){
+          tErrno = errno;
+          rc = SQLITE_IOERR_UNLOCK;
+          if( IS_LOCK_ERROR(rc) ){
+            pFile->lastErrno = tErrno;
+          }
+          goto end_unlock;
+        }
+      }else
+#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */
+      {
+        lock.l_type = F_RDLCK;
+        lock.l_whence = SEEK_SET;
+        lock.l_start = SHARED_FIRST;
+        lock.l_len = SHARED_SIZE;
+        if( unixFileLock(pFile, &lock) ){
+          /* In theory, the call to unixFileLock() cannot fail because another
+          ** process is holding an incompatible lock. If it does, this 
+          ** indicates that the other process is not following the locking
+          ** protocol. If this happens, return SQLITE_IOERR_RDLOCK. Returning
+          ** SQLITE_BUSY would confuse the upper layer (in practice it causes 
+          ** an assert to fail). */ 
+          rc = SQLITE_IOERR_RDLOCK;
+          pFile->lastErrno = errno;
+          goto end_unlock;
+        }
+      }
+    }
+    lock.l_type = F_UNLCK;
+    lock.l_whence = SEEK_SET;
+    lock.l_start = PENDING_BYTE;
+    lock.l_len = 2L;  assert( PENDING_BYTE+1==RESERVED_BYTE );
+    if( unixFileLock(pFile, &lock)==0 ){
+      pInode->eFileLock = SHARED_LOCK;
+    }else{
+      rc = SQLITE_IOERR_UNLOCK;
+      pFile->lastErrno = errno;
+      goto end_unlock;
+    }
+  }
+  if( eFileLock==NO_LOCK ){
+    /* Decrement the shared lock counter.  Release the lock using an
+    ** OS call only when all threads in this same process have released
+    ** the lock.
+    */
+    pInode->nShared--;
+    if( pInode->nShared==0 ){
+      lock.l_type = F_UNLCK;
+      lock.l_whence = SEEK_SET;
+      lock.l_start = lock.l_len = 0L;
+      SimulateIOErrorBenign(1);
+      SimulateIOError( h=(-1) )
+      SimulateIOErrorBenign(0);
+      if( unixFileLock(pFile, &lock)==0 ){
+        pInode->eFileLock = NO_LOCK;
+      }else{
+        rc = SQLITE_IOERR_UNLOCK;
+	pFile->lastErrno = errno;
+        pInode->eFileLock = NO_LOCK;
+        pFile->eFileLock = NO_LOCK;
+      }
+    }
+
+    /* Decrement the count of locks against this same file.  When the
+    ** count reaches zero, close any other file descriptors whose close
+    ** was deferred because of outstanding locks.
+    */
+    pInode->nLock--;
+    assert( pInode->nLock>=0 );
+    if( pInode->nLock==0 ){
+      closePendingFds(pFile);
+    }
+  }
+	
+end_unlock:
+  unixLeaveMutex();
+  if( rc==SQLITE_OK ) pFile->eFileLock = eFileLock;
+  return rc;
+}
+
+/*
+** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock
+** must be either NO_LOCK or SHARED_LOCK.
+**
+** If the locking level of the file descriptor is already at or below
+** the requested locking level, this routine is a no-op.
+*/
+static int unixUnlock(sqlite3_file *id, int eFileLock){
+  return posixUnlock(id, eFileLock, 0);
+}
+
+/*
+** This function performs the parts of the "close file" operation 
+** common to all locking schemes. It closes the directory and file
+** handles, if they are valid, and sets all fields of the unixFile
+** structure to 0.
+**
+** It is *not* necessary to hold the mutex when this routine is called,
+** even on VxWorks.  A mutex will be acquired on VxWorks by the
+** vxworksReleaseFileId() routine.
+*/
+static int closeUnixFile(sqlite3_file *id){
+  unixFile *pFile = (unixFile*)id;
+  if( pFile->dirfd>=0 ){
+    robust_close(pFile, pFile->dirfd, __LINE__);
+    pFile->dirfd=-1;
+  }
+  if( pFile->h>=0 ){
+    robust_close(pFile, pFile->h, __LINE__);
+    pFile->h = -1;
+  }
+#if OS_VXWORKS
+  if( pFile->pId ){
+    if( pFile->isDelete ){
+      unlink(pFile->pId->zCanonicalName);
+    }
+    vxworksReleaseFileId(pFile->pId);
+    pFile->pId = 0;
+  }
+#endif
+  OSTRACE(("CLOSE   %-3d\n", pFile->h));
+  OpenCounter(-1);
+  sqlite3_free(pFile->pUnused);
+  memset(pFile, 0, sizeof(unixFile));
+  return SQLITE_OK;
+}
+
+/*
+** Close a file.
+*/
+static int unixClose(sqlite3_file *id){
+  int rc = SQLITE_OK;
+  unixFile *pFile = (unixFile *)id;
+  unixUnlock(id, NO_LOCK);
+  unixEnterMutex();
+
+  /* unixFile.pInode is always valid here. Otherwise, a different close
+  ** routine (e.g. nolockClose()) would be called instead.
+  */
+  assert( pFile->pInode->nLock>0 || pFile->pInode->bProcessLock==0 );
+  if( ALWAYS(pFile->pInode) && pFile->pInode->nLock ){
+    /* If there are outstanding locks, do not actually close the file just
+    ** yet because that would clear those locks.  Instead, add the file
+    ** descriptor to pInode->pUnused list.  It will be automatically closed 
+    ** when the last lock is cleared.
+    */
+    setPendingFd(pFile);
+  }
+  releaseInodeInfo(pFile);
+  rc = closeUnixFile(id);
+  unixLeaveMutex();
+  return rc;
+}
+
+/************** End of the posix advisory lock implementation *****************
+******************************************************************************/
+
+/******************************************************************************
+****************************** No-op Locking **********************************
+**
+** Of the various locking implementations available, this is by far the
+** simplest:  locking is ignored.  No attempt is made to lock the database
+** file for reading or writing.
+**
+** This locking mode is appropriate for use on read-only databases
+** (ex: databases that are burned into CD-ROM, for example.)  It can
+** also be used if the application employs some external mechanism to
+** prevent simultaneous access of the same database by two or more
+** database connections.  But there is a serious risk of database
+** corruption if this locking mode is used in situations where multiple
+** database connections are accessing the same database file at the same
+** time and one or more of those connections are writing.
+*/
+
+static int nolockCheckReservedLock(sqlite3_file *NotUsed, int *pResOut){
+  UNUSED_PARAMETER(NotUsed);
+  *pResOut = 0;
+  return SQLITE_OK;
+}
+static int nolockLock(sqlite3_file *NotUsed, int NotUsed2){
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  return SQLITE_OK;
+}
+static int nolockUnlock(sqlite3_file *NotUsed, int NotUsed2){
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  return SQLITE_OK;
+}
+
+/*
+** Close the file.
+*/
+static int nolockClose(sqlite3_file *id) {
+  return closeUnixFile(id);
+}
+
+/******************* End of the no-op lock implementation *********************
+******************************************************************************/
+
+/******************************************************************************
+************************* Begin dot-file Locking ******************************
+**
+** The dotfile locking implementation uses the existance of separate lock
+** files in order to control access to the database.  This works on just
+** about every filesystem imaginable.  But there are serious downsides:
+**
+**    (1)  There is zero concurrency.  A single reader blocks all other
+**         connections from reading or writing the database.
+**
+**    (2)  An application crash or power loss can leave stale lock files
+**         sitting around that need to be cleared manually.
+**
+** Nevertheless, a dotlock is an appropriate locking mode for use if no
+** other locking strategy is available.
+**
+** Dotfile locking works by creating a file in the same directory as the
+** database and with the same name but with a ".lock" extension added.
+** The existance of a lock file implies an EXCLUSIVE lock.  All other lock
+** types (SHARED, RESERVED, PENDING) are mapped into EXCLUSIVE.
+*/
+
+/*
+** The file suffix added to the data base filename in order to create the
+** lock file.
+*/
+#define DOTLOCK_SUFFIX ".lock"
+
+/*
+** This routine checks if there is a RESERVED lock held on the specified
+** file by this or any other process. If such a lock is held, set *pResOut
+** to a non-zero value otherwise *pResOut is set to zero.  The return value
+** is set to SQLITE_OK unless an I/O error occurs during lock checking.
+**
+** In dotfile locking, either a lock exists or it does not.  So in this
+** variation of CheckReservedLock(), *pResOut is set to true if any lock
+** is held on the file and false if the file is unlocked.
+*/
+static int dotlockCheckReservedLock(sqlite3_file *id, int *pResOut) {
+  int rc = SQLITE_OK;
+  int reserved = 0;
+  unixFile *pFile = (unixFile*)id;
+
+  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
+  
+  assert( pFile );
+
+  /* Check if a thread in this process holds such a lock */
+  if( pFile->eFileLock>SHARED_LOCK ){
+    /* Either this connection or some other connection in the same process
+    ** holds a lock on the file.  No need to check further. */
+    reserved = 1;
+  }else{
+    /* The lock is held if and only if the lockfile exists */
+    const char *zLockFile = (const char*)pFile->lockingContext;
+    reserved = osAccess(zLockFile, 0)==0;
+  }
+  OSTRACE(("TEST WR-LOCK %d %d %d (dotlock)\n", pFile->h, rc, reserved));
+  *pResOut = reserved;
+  return rc;
+}
+
+/*
+** Lock the file with the lock specified by parameter eFileLock - one
+** of the following:
+**
+**     (1) SHARED_LOCK
+**     (2) RESERVED_LOCK
+**     (3) PENDING_LOCK
+**     (4) EXCLUSIVE_LOCK
+**
+** Sometimes when requesting one lock state, additional lock states
+** are inserted in between.  The locking might fail on one of the later
+** transitions leaving the lock state different from what it started but
+** still short of its goal.  The following chart shows the allowed
+** transitions and the inserted intermediate states:
+**
+**    UNLOCKED -> SHARED
+**    SHARED -> RESERVED
+**    SHARED -> (PENDING) -> EXCLUSIVE
+**    RESERVED -> (PENDING) -> EXCLUSIVE
+**    PENDING -> EXCLUSIVE
+**
+** This routine will only increase a lock.  Use the sqlite3OsUnlock()
+** routine to lower a locking level.
+**
+** With dotfile locking, we really only support state (4): EXCLUSIVE.
+** But we track the other locking levels internally.
+*/
+static int dotlockLock(sqlite3_file *id, int eFileLock) {
+  unixFile *pFile = (unixFile*)id;
+  int fd;
+  char *zLockFile = (char *)pFile->lockingContext;
+  int rc = SQLITE_OK;
+
+
+  /* If we have any lock, then the lock file already exists.  All we have
+  ** to do is adjust our internal record of the lock level.
+  */
+  if( pFile->eFileLock > NO_LOCK ){
+    pFile->eFileLock = eFileLock;
+#if !OS_VXWORKS
+    /* Always update the timestamp on the old file */
+    utimes(zLockFile, NULL);
+#endif
+    return SQLITE_OK;
+  }
+  
+  /* grab an exclusive lock */
+  fd = robust_open(zLockFile,O_RDONLY|O_CREAT|O_EXCL,0600);
+  if( fd<0 ){
+    /* failed to open/create the file, someone else may have stolen the lock */
+    int tErrno = errno;
+    if( EEXIST == tErrno ){
+      rc = SQLITE_BUSY;
+    } else {
+      rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
+      if( IS_LOCK_ERROR(rc) ){
+        pFile->lastErrno = tErrno;
+      }
+    }
+    return rc;
+  } 
+  robust_close(pFile, fd, __LINE__);
+  
+  /* got it, set the type and return ok */
+  pFile->eFileLock = eFileLock;
+  return rc;
+}
+
+/*
+** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock
+** must be either NO_LOCK or SHARED_LOCK.
+**
+** If the locking level of the file descriptor is already at or below
+** the requested locking level, this routine is a no-op.
+**
+** When the locking level reaches NO_LOCK, delete the lock file.
+*/
+static int dotlockUnlock(sqlite3_file *id, int eFileLock) {
+  unixFile *pFile = (unixFile*)id;
+  char *zLockFile = (char *)pFile->lockingContext;
+
+  assert( pFile );
+  OSTRACE(("UNLOCK  %d %d was %d pid=%d (dotlock)\n", pFile->h, eFileLock,
+	   pFile->eFileLock, getpid()));
+  assert( eFileLock<=SHARED_LOCK );
+  
+  /* no-op if possible */
+  if( pFile->eFileLock==eFileLock ){
+    return SQLITE_OK;
+  }
+
+  /* To downgrade to shared, simply update our internal notion of the
+  ** lock state.  No need to mess with the file on disk.
+  */
+  if( eFileLock==SHARED_LOCK ){
+    pFile->eFileLock = SHARED_LOCK;
+    return SQLITE_OK;
+  }
+  
+  /* To fully unlock the database, delete the lock file */
+  assert( eFileLock==NO_LOCK );
+  if( unlink(zLockFile) ){
+    int rc = 0;
+    int tErrno = errno;
+    if( ENOENT != tErrno ){
+      rc = SQLITE_IOERR_UNLOCK;
+    }
+    if( IS_LOCK_ERROR(rc) ){
+      pFile->lastErrno = tErrno;
+    }
+    return rc; 
+  }
+  pFile->eFileLock = NO_LOCK;
+  return SQLITE_OK;
+}
+
+/*
+** Close a file.  Make sure the lock has been released before closing.
+*/
+static int dotlockClose(sqlite3_file *id) {
+  int rc;
+  if( id ){
+    unixFile *pFile = (unixFile*)id;
+    dotlockUnlock(id, NO_LOCK);
+    sqlite3_free(pFile->lockingContext);
+  }
+  rc = closeUnixFile(id);
+  return rc;
+}
+/****************** End of the dot-file lock implementation *******************
+******************************************************************************/
+
+/******************************************************************************
+************************** Begin flock Locking ********************************
+**
+** Use the flock() system call to do file locking.
+**
+** flock() locking is like dot-file locking in that the various
+** fine-grain locking levels supported by SQLite are collapsed into
+** a single exclusive lock.  In other words, SHARED, RESERVED, and
+** PENDING locks are the same thing as an EXCLUSIVE lock.  SQLite
+** still works when you do this, but concurrency is reduced since
+** only a single process can be reading the database at a time.
+**
+** Omit this section if SQLITE_ENABLE_LOCKING_STYLE is turned off or if
+** compiling for VXWORKS.
+*/
+#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS
+
+/*
+** Retry flock() calls that fail with EINTR
+*/
+#ifdef EINTR
+static int robust_flock(int fd, int op){
+  int rc;
+  do{ rc = flock(fd,op); }while( rc<0 && errno==EINTR );
+  return rc;
+}
+#else
+# define robust_flock(a,b) flock(a,b)
+#endif
+     
+
+/*
+** This routine checks if there is a RESERVED lock held on the specified
+** file by this or any other process. If such a lock is held, set *pResOut
+** to a non-zero value otherwise *pResOut is set to zero.  The return value
+** is set to SQLITE_OK unless an I/O error occurs during lock checking.
+*/
+static int flockCheckReservedLock(sqlite3_file *id, int *pResOut){
+  int rc = SQLITE_OK;
+  int reserved = 0;
+  unixFile *pFile = (unixFile*)id;
+  
+  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
+  
+  assert( pFile );
+  
+  /* Check if a thread in this process holds such a lock */
+  if( pFile->eFileLock>SHARED_LOCK ){
+    reserved = 1;
+  }
+  
+  /* Otherwise see if some other process holds it. */
+  if( !reserved ){
+    /* attempt to get the lock */
+    int lrc = robust_flock(pFile->h, LOCK_EX | LOCK_NB);
+    if( !lrc ){
+      /* got the lock, unlock it */
+      lrc = robust_flock(pFile->h, LOCK_UN);
+      if ( lrc ) {
+        int tErrno = errno;
+        /* unlock failed with an error */
+        lrc = SQLITE_IOERR_UNLOCK; 
+        if( IS_LOCK_ERROR(lrc) ){
+          pFile->lastErrno = tErrno;
+          rc = lrc;
+        }
+      }
+    } else {
+      int tErrno = errno;
+      reserved = 1;
+      /* someone else might have it reserved */
+      lrc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK); 
+      if( IS_LOCK_ERROR(lrc) ){
+        pFile->lastErrno = tErrno;
+        rc = lrc;
+      }
+    }
+  }
+  OSTRACE(("TEST WR-LOCK %d %d %d (flock)\n", pFile->h, rc, reserved));
+
+#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
+  if( (rc & SQLITE_IOERR) == SQLITE_IOERR ){
+    rc = SQLITE_OK;
+    reserved=1;
+  }
+#endif /* SQLITE_IGNORE_FLOCK_LOCK_ERRORS */
+  *pResOut = reserved;
+  return rc;
+}
+
+/*
+** Lock the file with the lock specified by parameter eFileLock - one
+** of the following:
+**
+**     (1) SHARED_LOCK
+**     (2) RESERVED_LOCK
+**     (3) PENDING_LOCK
+**     (4) EXCLUSIVE_LOCK
+**
+** Sometimes when requesting one lock state, additional lock states
+** are inserted in between.  The locking might fail on one of the later
+** transitions leaving the lock state different from what it started but
+** still short of its goal.  The following chart shows the allowed
+** transitions and the inserted intermediate states:
+**
+**    UNLOCKED -> SHARED
+**    SHARED -> RESERVED
+**    SHARED -> (PENDING) -> EXCLUSIVE
+**    RESERVED -> (PENDING) -> EXCLUSIVE
+**    PENDING -> EXCLUSIVE
+**
+** flock() only really support EXCLUSIVE locks.  We track intermediate
+** lock states in the sqlite3_file structure, but all locks SHARED or
+** above are really EXCLUSIVE locks and exclude all other processes from
+** access the file.
+**
+** This routine will only increase a lock.  Use the sqlite3OsUnlock()
+** routine to lower a locking level.
+*/
+static int flockLock(sqlite3_file *id, int eFileLock) {
+  int rc = SQLITE_OK;
+  unixFile *pFile = (unixFile*)id;
+
+  assert( pFile );
+
+  /* if we already have a lock, it is exclusive.  
+  ** Just adjust level and punt on outta here. */
+  if (pFile->eFileLock > NO_LOCK) {
+    pFile->eFileLock = eFileLock;
+    return SQLITE_OK;
+  }
+  
+  /* grab an exclusive lock */
+  
+  if (robust_flock(pFile->h, LOCK_EX | LOCK_NB)) {
+    int tErrno = errno;
+    /* didn't get, must be busy */
+    rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_LOCK);
+    if( IS_LOCK_ERROR(rc) ){
+      pFile->lastErrno = tErrno;
+    }
+  } else {
+    /* got it, set the type and return ok */
+    pFile->eFileLock = eFileLock;
+  }
+  OSTRACE(("LOCK    %d %s %s (flock)\n", pFile->h, azFileLock(eFileLock), 
+           rc==SQLITE_OK ? "ok" : "failed"));
+#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
+  if( (rc & SQLITE_IOERR) == SQLITE_IOERR ){
+    rc = SQLITE_BUSY;
+  }
+#endif /* SQLITE_IGNORE_FLOCK_LOCK_ERRORS */
+  return rc;
+}
+
+
+/*
+** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock
+** must be either NO_LOCK or SHARED_LOCK.
+**
+** If the locking level of the file descriptor is already at or below
+** the requested locking level, this routine is a no-op.
+*/
+static int flockUnlock(sqlite3_file *id, int eFileLock) {
+  unixFile *pFile = (unixFile*)id;
+  
+  assert( pFile );
+  OSTRACE(("UNLOCK  %d %d was %d pid=%d (flock)\n", pFile->h, eFileLock,
+           pFile->eFileLock, getpid()));
+  assert( eFileLock<=SHARED_LOCK );
+  
+  /* no-op if possible */
+  if( pFile->eFileLock==eFileLock ){
+    return SQLITE_OK;
+  }
+  
+  /* shared can just be set because we always have an exclusive */
+  if (eFileLock==SHARED_LOCK) {
+    pFile->eFileLock = eFileLock;
+    return SQLITE_OK;
+  }
+  
+  /* no, really, unlock. */
+  if( robust_flock(pFile->h, LOCK_UN) ){
+#ifdef SQLITE_IGNORE_FLOCK_LOCK_ERRORS
+    return SQLITE_OK;
+#endif /* SQLITE_IGNORE_FLOCK_LOCK_ERRORS */
+    return SQLITE_IOERR_UNLOCK;
+  }else{
+    pFile->eFileLock = NO_LOCK;
+    return SQLITE_OK;
+  }
+}
+
+/*
+** Close a file.
+*/
+static int flockClose(sqlite3_file *id) {
+  if( id ){
+    flockUnlock(id, NO_LOCK);
+  }
+  return closeUnixFile(id);
+}
+
+#endif /* SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORK */
+
+/******************* End of the flock lock implementation *********************
+******************************************************************************/
+
+/******************************************************************************
+************************ Begin Named Semaphore Locking ************************
+**
+** Named semaphore locking is only supported on VxWorks.
+**
+** Semaphore locking is like dot-lock and flock in that it really only
+** supports EXCLUSIVE locking.  Only a single process can read or write
+** the database file at a time.  This reduces potential concurrency, but
+** makes the lock implementation much easier.
+*/
+#if OS_VXWORKS
+
+/*
+** This routine checks if there is a RESERVED lock held on the specified
+** file by this or any other process. If such a lock is held, set *pResOut
+** to a non-zero value otherwise *pResOut is set to zero.  The return value
+** is set to SQLITE_OK unless an I/O error occurs during lock checking.
+*/
+static int semCheckReservedLock(sqlite3_file *id, int *pResOut) {
+  int rc = SQLITE_OK;
+  int reserved = 0;
+  unixFile *pFile = (unixFile*)id;
+
+  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
+  
+  assert( pFile );
+
+  /* Check if a thread in this process holds such a lock */
+  if( pFile->eFileLock>SHARED_LOCK ){
+    reserved = 1;
+  }
+  
+  /* Otherwise see if some other process holds it. */
+  if( !reserved ){
+    sem_t *pSem = pFile->pInode->pSem;
+    struct stat statBuf;
+
+    if( sem_trywait(pSem)==-1 ){
+      int tErrno = errno;
+      if( EAGAIN != tErrno ){
+        rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_CHECKRESERVEDLOCK);
+        pFile->lastErrno = tErrno;
+      } else {
+        /* someone else has the lock when we are in NO_LOCK */
+        reserved = (pFile->eFileLock < SHARED_LOCK);
+      }
+    }else{
+      /* we could have it if we want it */
+      sem_post(pSem);
+    }
+  }
+  OSTRACE(("TEST WR-LOCK %d %d %d (sem)\n", pFile->h, rc, reserved));
+
+  *pResOut = reserved;
+  return rc;
+}
+
+/*
+** Lock the file with the lock specified by parameter eFileLock - one
+** of the following:
+**
+**     (1) SHARED_LOCK
+**     (2) RESERVED_LOCK
+**     (3) PENDING_LOCK
+**     (4) EXCLUSIVE_LOCK
+**
+** Sometimes when requesting one lock state, additional lock states
+** are inserted in between.  The locking might fail on one of the later
+** transitions leaving the lock state different from what it started but
+** still short of its goal.  The following chart shows the allowed
+** transitions and the inserted intermediate states:
+**
+**    UNLOCKED -> SHARED
+**    SHARED -> RESERVED
+**    SHARED -> (PENDING) -> EXCLUSIVE
+**    RESERVED -> (PENDING) -> EXCLUSIVE
+**    PENDING -> EXCLUSIVE
+**
+** Semaphore locks only really support EXCLUSIVE locks.  We track intermediate
+** lock states in the sqlite3_file structure, but all locks SHARED or
+** above are really EXCLUSIVE locks and exclude all other processes from
+** access the file.
+**
+** This routine will only increase a lock.  Use the sqlite3OsUnlock()
+** routine to lower a locking level.
+*/
+static int semLock(sqlite3_file *id, int eFileLock) {
+  unixFile *pFile = (unixFile*)id;
+  int fd;
+  sem_t *pSem = pFile->pInode->pSem;
+  int rc = SQLITE_OK;
+
+  /* if we already have a lock, it is exclusive.  
+  ** Just adjust level and punt on outta here. */
+  if (pFile->eFileLock > NO_LOCK) {
+    pFile->eFileLock = eFileLock;
+    rc = SQLITE_OK;
+    goto sem_end_lock;
+  }
+  
+  /* lock semaphore now but bail out when already locked. */
+  if( sem_trywait(pSem)==-1 ){
+    rc = SQLITE_BUSY;
+    goto sem_end_lock;
+  }
+
+  /* got it, set the type and return ok */
+  pFile->eFileLock = eFileLock;
+
+ sem_end_lock:
+  return rc;
+}
+
+/*
+** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock
+** must be either NO_LOCK or SHARED_LOCK.
+**
+** If the locking level of the file descriptor is already at or below
+** the requested locking level, this routine is a no-op.
+*/
+static int semUnlock(sqlite3_file *id, int eFileLock) {
+  unixFile *pFile = (unixFile*)id;
+  sem_t *pSem = pFile->pInode->pSem;
+
+  assert( pFile );
+  assert( pSem );
+  OSTRACE(("UNLOCK  %d %d was %d pid=%d (sem)\n", pFile->h, eFileLock,
+	   pFile->eFileLock, getpid()));
+  assert( eFileLock<=SHARED_LOCK );
+  
+  /* no-op if possible */
+  if( pFile->eFileLock==eFileLock ){
+    return SQLITE_OK;
+  }
+  
+  /* shared can just be set because we always have an exclusive */
+  if (eFileLock==SHARED_LOCK) {
+    pFile->eFileLock = eFileLock;
+    return SQLITE_OK;
+  }
+  
+  /* no, really unlock. */
+  if ( sem_post(pSem)==-1 ) {
+    int rc, tErrno = errno;
+    rc = sqliteErrorFromPosixError(tErrno, SQLITE_IOERR_UNLOCK);
+    if( IS_LOCK_ERROR(rc) ){
+      pFile->lastErrno = tErrno;
+    }
+    return rc; 
+  }
+  pFile->eFileLock = NO_LOCK;
+  return SQLITE_OK;
+}
+
+/*
+ ** Close a file.
+ */
+static int semClose(sqlite3_file *id) {
+  if( id ){
+    unixFile *pFile = (unixFile*)id;
+    semUnlock(id, NO_LOCK);
+    assert( pFile );
+    unixEnterMutex();
+    releaseInodeInfo(pFile);
+    unixLeaveMutex();
+    closeUnixFile(id);
+  }
+  return SQLITE_OK;
+}
+
+#endif /* OS_VXWORKS */
+/*
+** Named semaphore locking is only available on VxWorks.
+**
+*************** End of the named semaphore lock implementation ****************
+******************************************************************************/
+
+
+/******************************************************************************
+*************************** Begin AFP Locking *********************************
+**
+** AFP is the Apple Filing Protocol.  AFP is a network filesystem found
+** on Apple Macintosh computers - both OS9 and OSX.
+**
+** Third-party implementations of AFP are available.  But this code here
+** only works on OSX.
+*/
+
+#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
+/*
+** The afpLockingContext structure contains all afp lock specific state
+*/
+typedef struct afpLockingContext afpLockingContext;
+struct afpLockingContext {
+  int reserved;
+  const char *dbPath;             /* Name of the open file */
+};
+
+struct ByteRangeLockPB2
+{
+  unsigned long long offset;        /* offset to first byte to lock */
+  unsigned long long length;        /* nbr of bytes to lock */
+  unsigned long long retRangeStart; /* nbr of 1st byte locked if successful */
+  unsigned char unLockFlag;         /* 1 = unlock, 0 = lock */
+  unsigned char startEndFlag;       /* 1=rel to end of fork, 0=rel to start */
+  int fd;                           /* file desc to assoc this lock with */
+};
+
+#define afpfsByteRangeLock2FSCTL        _IOWR('z', 23, struct ByteRangeLockPB2)
+
+/*
+** This is a utility for setting or clearing a bit-range lock on an
+** AFP filesystem.
+** 
+** Return SQLITE_OK on success, SQLITE_BUSY on failure.
+*/
+static int afpSetLock(
+  const char *path,              /* Name of the file to be locked or unlocked */
+  unixFile *pFile,               /* Open file descriptor on path */
+  unsigned long long offset,     /* First byte to be locked */
+  unsigned long long length,     /* Number of bytes to lock */
+  int setLockFlag                /* True to set lock.  False to clear lock */
+){
+  struct ByteRangeLockPB2 pb;
+  int err;
+  
+  pb.unLockFlag = setLockFlag ? 0 : 1;
+  pb.startEndFlag = 0;
+  pb.offset = offset;
+  pb.length = length; 
+  pb.fd = pFile->h;
+  
+  OSTRACE(("AFPSETLOCK [%s] for %d%s in range %llx:%llx\n", 
+    (setLockFlag?"ON":"OFF"), pFile->h, (pb.fd==-1?"[testval-1]":""),
+    offset, length));
+  err = fsctl(path, afpfsByteRangeLock2FSCTL, &pb, 0);
+  if ( err==-1 ) {
+    int rc;
+    int tErrno = errno;
+    OSTRACE(("AFPSETLOCK failed to fsctl() '%s' %d %s\n",
+             path, tErrno, strerror(tErrno)));
+#ifdef SQLITE_IGNORE_AFP_LOCK_ERRORS
+    rc = SQLITE_BUSY;
+#else
+    rc = sqliteErrorFromPosixError(tErrno,
+                    setLockFlag ? SQLITE_IOERR_LOCK : SQLITE_IOERR_UNLOCK);
+#endif /* SQLITE_IGNORE_AFP_LOCK_ERRORS */
+    if( IS_LOCK_ERROR(rc) ){
+      pFile->lastErrno = tErrno;
+    }
+    return rc;
+  } else {
+    return SQLITE_OK;
+  }
+}
+
+/*
+** This routine checks if there is a RESERVED lock held on the specified
+** file by this or any other process. If such a lock is held, set *pResOut
+** to a non-zero value otherwise *pResOut is set to zero.  The return value
+** is set to SQLITE_OK unless an I/O error occurs during lock checking.
+*/
+static int afpCheckReservedLock(sqlite3_file *id, int *pResOut){
+  int rc = SQLITE_OK;
+  int reserved = 0;
+  unixFile *pFile = (unixFile*)id;
+  
+  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
+  
+  assert( pFile );
+  afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;
+  if( context->reserved ){
+    *pResOut = 1;
+    return SQLITE_OK;
+  }
+  unixEnterMutex(); /* Because pFile->pInode is shared across threads */
+  
+  /* Check if a thread in this process holds such a lock */
+  if( pFile->pInode->eFileLock>SHARED_LOCK ){
+    reserved = 1;
+  }
+  
+  /* Otherwise see if some other process holds it.
+   */
+  if( !reserved ){
+    /* lock the RESERVED byte */
+    int lrc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1,1);  
+    if( SQLITE_OK==lrc ){
+      /* if we succeeded in taking the reserved lock, unlock it to restore
+      ** the original state */
+      lrc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1, 0);
+    } else {
+      /* if we failed to get the lock then someone else must have it */
+      reserved = 1;
+    }
+    if( IS_LOCK_ERROR(lrc) ){
+      rc=lrc;
+    }
+  }
+  
+  unixLeaveMutex();
+  OSTRACE(("TEST WR-LOCK %d %d %d (afp)\n", pFile->h, rc, reserved));
+  
+  *pResOut = reserved;
+  return rc;
+}
+
+/*
+** Lock the file with the lock specified by parameter eFileLock - one
+** of the following:
+**
+**     (1) SHARED_LOCK
+**     (2) RESERVED_LOCK
+**     (3) PENDING_LOCK
+**     (4) EXCLUSIVE_LOCK
+**
+** Sometimes when requesting one lock state, additional lock states
+** are inserted in between.  The locking might fail on one of the later
+** transitions leaving the lock state different from what it started but
+** still short of its goal.  The following chart shows the allowed
+** transitions and the inserted intermediate states:
+**
+**    UNLOCKED -> SHARED
+**    SHARED -> RESERVED
+**    SHARED -> (PENDING) -> EXCLUSIVE
+**    RESERVED -> (PENDING) -> EXCLUSIVE
+**    PENDING -> EXCLUSIVE
+**
+** This routine will only increase a lock.  Use the sqlite3OsUnlock()
+** routine to lower a locking level.
+*/
+static int afpLock(sqlite3_file *id, int eFileLock){
+  int rc = SQLITE_OK;
+  unixFile *pFile = (unixFile*)id;
+  unixInodeInfo *pInode = pFile->pInode;
+  afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;
+  
+  assert( pFile );
+  OSTRACE(("LOCK    %d %s was %s(%s,%d) pid=%d (afp)\n", pFile->h,
+           azFileLock(eFileLock), azFileLock(pFile->eFileLock),
+           azFileLock(pInode->eFileLock), pInode->nShared , getpid()));
+
+  /* If there is already a lock of this type or more restrictive on the
+  ** unixFile, do nothing. Don't use the afp_end_lock: exit path, as
+  ** unixEnterMutex() hasn't been called yet.
+  */
+  if( pFile->eFileLock>=eFileLock ){
+    OSTRACE(("LOCK    %d %s ok (already held) (afp)\n", pFile->h,
+           azFileLock(eFileLock)));
+    return SQLITE_OK;
+  }
+
+  /* Make sure the locking sequence is correct
+  **  (1) We never move from unlocked to anything higher than shared lock.
+  **  (2) SQLite never explicitly requests a pendig lock.
+  **  (3) A shared lock is always held when a reserve lock is requested.
+  */
+  assert( pFile->eFileLock!=NO_LOCK || eFileLock==SHARED_LOCK );
+  assert( eFileLock!=PENDING_LOCK );
+  assert( eFileLock!=RESERVED_LOCK || pFile->eFileLock==SHARED_LOCK );
+  
+  /* This mutex is needed because pFile->pInode is shared across threads
+  */
+  unixEnterMutex();
+  pInode = pFile->pInode;
+
+  /* If some thread using this PID has a lock via a different unixFile*
+  ** handle that precludes the requested lock, return BUSY.
+  */
+  if( (pFile->eFileLock!=pInode->eFileLock && 
+       (pInode->eFileLock>=PENDING_LOCK || eFileLock>SHARED_LOCK))
+     ){
+    rc = SQLITE_BUSY;
+    goto afp_end_lock;
+  }
+  
+  /* If a SHARED lock is requested, and some thread using this PID already
+  ** has a SHARED or RESERVED lock, then increment reference counts and
+  ** return SQLITE_OK.
+  */
+  if( eFileLock==SHARED_LOCK && 
+     (pInode->eFileLock==SHARED_LOCK || pInode->eFileLock==RESERVED_LOCK) ){
+    assert( eFileLock==SHARED_LOCK );
+    assert( pFile->eFileLock==0 );
+    assert( pInode->nShared>0 );
+    pFile->eFileLock = SHARED_LOCK;
+    pInode->nShared++;
+    pInode->nLock++;
+    goto afp_end_lock;
+  }
+    
+  /* A PENDING lock is needed before acquiring a SHARED lock and before
+  ** acquiring an EXCLUSIVE lock.  For the SHARED lock, the PENDING will
+  ** be released.
+  */
+  if( eFileLock==SHARED_LOCK 
+      || (eFileLock==EXCLUSIVE_LOCK && pFile->eFileLock<PENDING_LOCK)
+  ){
+    int failed;
+    failed = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 1);
+    if (failed) {
+      rc = failed;
+      goto afp_end_lock;
+    }
+  }
+  
+  /* If control gets to this point, then actually go ahead and make
+  ** operating system calls for the specified lock.
+  */
+  if( eFileLock==SHARED_LOCK ){
+    int lrc1, lrc2, lrc1Errno;
+    long lk, mask;
+    
+    assert( pInode->nShared==0 );
+    assert( pInode->eFileLock==0 );
+        
+    mask = (sizeof(long)==8) ? LARGEST_INT64 : 0x7fffffff;
+    /* Now get the read-lock SHARED_LOCK */
+    /* note that the quality of the randomness doesn't matter that much */
+    lk = random(); 
+    pInode->sharedByte = (lk & mask)%(SHARED_SIZE - 1);
+    lrc1 = afpSetLock(context->dbPath, pFile, 
+          SHARED_FIRST+pInode->sharedByte, 1, 1);
+    if( IS_LOCK_ERROR(lrc1) ){
+      lrc1Errno = pFile->lastErrno;
+    }
+    /* Drop the temporary PENDING lock */
+    lrc2 = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 0);
+    
+    if( IS_LOCK_ERROR(lrc1) ) {
+      pFile->lastErrno = lrc1Errno;
+      rc = lrc1;
+      goto afp_end_lock;
+    } else if( IS_LOCK_ERROR(lrc2) ){
+      rc = lrc2;
+      goto afp_end_lock;
+    } else if( lrc1 != SQLITE_OK ) {
+      rc = lrc1;
+    } else {
+      pFile->eFileLock = SHARED_LOCK;
+      pInode->nLock++;
+      pInode->nShared = 1;
+    }
+  }else if( eFileLock==EXCLUSIVE_LOCK && pInode->nShared>1 ){
+    /* We are trying for an exclusive lock but another thread in this
+     ** same process is still holding a shared lock. */
+    rc = SQLITE_BUSY;
+  }else{
+    /* The request was for a RESERVED or EXCLUSIVE lock.  It is
+    ** assumed that there is a SHARED or greater lock on the file
+    ** already.
+    */
+    int failed = 0;
+    assert( 0!=pFile->eFileLock );
+    if (eFileLock >= RESERVED_LOCK && pFile->eFileLock < RESERVED_LOCK) {
+        /* Acquire a RESERVED lock */
+        failed = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1,1);
+      if( !failed ){
+        context->reserved = 1;
+      }
+    }
+    if (!failed && eFileLock == EXCLUSIVE_LOCK) {
+      /* Acquire an EXCLUSIVE lock */
+        
+      /* Remove the shared lock before trying the range.  we'll need to 
+      ** reestablish the shared lock if we can't get the  afpUnlock
+      */
+      if( !(failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST +
+                         pInode->sharedByte, 1, 0)) ){
+        int failed2 = SQLITE_OK;
+        /* now attemmpt to get the exclusive lock range */
+        failed = afpSetLock(context->dbPath, pFile, SHARED_FIRST, 
+                               SHARED_SIZE, 1);
+        if( failed && (failed2 = afpSetLock(context->dbPath, pFile, 
+                       SHARED_FIRST + pInode->sharedByte, 1, 1)) ){
+          /* Can't reestablish the shared lock.  Sqlite can't deal, this is
+          ** a critical I/O error
+          */
+          rc = ((failed & SQLITE_IOERR) == SQLITE_IOERR) ? failed2 : 
+               SQLITE_IOERR_LOCK;
+          goto afp_end_lock;
+        } 
+      }else{
+        rc = failed; 
+      }
+    }
+    if( failed ){
+      rc = failed;
+    }
+  }
+  
+  if( rc==SQLITE_OK ){
+    pFile->eFileLock = eFileLock;
+    pInode->eFileLock = eFileLock;
+  }else if( eFileLock==EXCLUSIVE_LOCK ){
+    pFile->eFileLock = PENDING_LOCK;
+    pInode->eFileLock = PENDING_LOCK;
+  }
+  
+afp_end_lock:
+  unixLeaveMutex();
+  OSTRACE(("LOCK    %d %s %s (afp)\n", pFile->h, azFileLock(eFileLock), 
+         rc==SQLITE_OK ? "ok" : "failed"));
+  return rc;
+}
+
+/*
+** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock
+** must be either NO_LOCK or SHARED_LOCK.
+**
+** If the locking level of the file descriptor is already at or below
+** the requested locking level, this routine is a no-op.
+*/
+static int afpUnlock(sqlite3_file *id, int eFileLock) {
+  int rc = SQLITE_OK;
+  unixFile *pFile = (unixFile*)id;
+  unixInodeInfo *pInode;
+  afpLockingContext *context = (afpLockingContext *) pFile->lockingContext;
+  int skipShared = 0;
+#ifdef SQLITE_TEST
+  int h = pFile->h;
+#endif
+
+  assert( pFile );
+  OSTRACE(("UNLOCK  %d %d was %d(%d,%d) pid=%d (afp)\n", pFile->h, eFileLock,
+           pFile->eFileLock, pFile->pInode->eFileLock, pFile->pInode->nShared,
+           getpid()));
+
+  assert( eFileLock<=SHARED_LOCK );
+  if( pFile->eFileLock<=eFileLock ){
+    return SQLITE_OK;
+  }
+  unixEnterMutex();
+  pInode = pFile->pInode;
+  assert( pInode->nShared!=0 );
+  if( pFile->eFileLock>SHARED_LOCK ){
+    assert( pInode->eFileLock==pFile->eFileLock );
+    SimulateIOErrorBenign(1);
+    SimulateIOError( h=(-1) )
+    SimulateIOErrorBenign(0);
+    
+#ifndef NDEBUG
+    /* When reducing a lock such that other processes can start
+    ** reading the database file again, make sure that the
+    ** transaction counter was updated if any part of the database
+    ** file changed.  If the transaction counter is not updated,
+    ** other connections to the same file might not realize that
+    ** the file has changed and hence might not know to flush their
+    ** cache.  The use of a stale cache can lead to database corruption.
+    */
+    assert( pFile->inNormalWrite==0
+           || pFile->dbUpdate==0
+           || pFile->transCntrChng==1 );
+    pFile->inNormalWrite = 0;
+#endif
+    
+    if( pFile->eFileLock==EXCLUSIVE_LOCK ){
+      rc = afpSetLock(context->dbPath, pFile, SHARED_FIRST, SHARED_SIZE, 0);
+      if( rc==SQLITE_OK && (eFileLock==SHARED_LOCK || pInode->nShared>1) ){
+        /* only re-establish the shared lock if necessary */
+        int sharedLockByte = SHARED_FIRST+pInode->sharedByte;
+        rc = afpSetLock(context->dbPath, pFile, sharedLockByte, 1, 1);
+      } else {
+        skipShared = 1;
+      }
+    }
+    if( rc==SQLITE_OK && pFile->eFileLock>=PENDING_LOCK ){
+      rc = afpSetLock(context->dbPath, pFile, PENDING_BYTE, 1, 0);
+    } 
+    if( rc==SQLITE_OK && pFile->eFileLock>=RESERVED_LOCK && context->reserved ){
+      rc = afpSetLock(context->dbPath, pFile, RESERVED_BYTE, 1, 0);
+      if( !rc ){ 
+        context->reserved = 0; 
+      }
+    }
+    if( rc==SQLITE_OK && (eFileLock==SHARED_LOCK || pInode->nShared>1)){
+      pInode->eFileLock = SHARED_LOCK;
+    }
+  }
+  if( rc==SQLITE_OK && eFileLock==NO_LOCK ){
+
+    /* Decrement the shared lock counter.  Release the lock using an
+    ** OS call only when all threads in this same process have released
+    ** the lock.
+    */
+    unsigned long long sharedLockByte = SHARED_FIRST+pInode->sharedByte;
+    pInode->nShared--;
+    if( pInode->nShared==0 ){
+      SimulateIOErrorBenign(1);
+      SimulateIOError( h=(-1) )
+      SimulateIOErrorBenign(0);
+      if( !skipShared ){
+        rc = afpSetLock(context->dbPath, pFile, sharedLockByte, 1, 0);
+      }
+      if( !rc ){
+        pInode->eFileLock = NO_LOCK;
+        pFile->eFileLock = NO_LOCK;
+      }
+    }
+    if( rc==SQLITE_OK ){
+      pInode->nLock--;
+      assert( pInode->nLock>=0 );
+      if( pInode->nLock==0 ){
+        closePendingFds(pFile);
+      }
+    }
+  }
+  
+  unixLeaveMutex();
+  if( rc==SQLITE_OK ) pFile->eFileLock = eFileLock;
+  return rc;
+}
+
+/*
+** Close a file & cleanup AFP specific locking context 
+*/
+static int afpClose(sqlite3_file *id) {
+  int rc = SQLITE_OK;
+  if( id ){
+    unixFile *pFile = (unixFile*)id;
+    afpUnlock(id, NO_LOCK);
+    unixEnterMutex();
+    if( pFile->pInode && pFile->pInode->nLock ){
+      /* If there are outstanding locks, do not actually close the file just
+      ** yet because that would clear those locks.  Instead, add the file
+      ** descriptor to pInode->aPending.  It will be automatically closed when
+      ** the last lock is cleared.
+      */
+      setPendingFd(pFile);
+    }
+    releaseInodeInfo(pFile);
+    sqlite3_free(pFile->lockingContext);
+    rc = closeUnixFile(id);
+    unixLeaveMutex();
+  }
+  return rc;
+}
+
+#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */
+/*
+** The code above is the AFP lock implementation.  The code is specific
+** to MacOSX and does not work on other unix platforms.  No alternative
+** is available.  If you don't compile for a mac, then the "unix-afp"
+** VFS is not available.
+**
+********************* End of the AFP lock implementation **********************
+******************************************************************************/
+
+/******************************************************************************
+*************************** Begin NFS Locking ********************************/
+
+#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
+/*
+ ** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock
+ ** must be either NO_LOCK or SHARED_LOCK.
+ **
+ ** If the locking level of the file descriptor is already at or below
+ ** the requested locking level, this routine is a no-op.
+ */
+static int nfsUnlock(sqlite3_file *id, int eFileLock){
+  return posixUnlock(id, eFileLock, 1);
+}
+
+#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */
+/*
+** The code above is the NFS lock implementation.  The code is specific
+** to MacOSX and does not work on other unix platforms.  No alternative
+** is available.  
+**
+********************* End of the NFS lock implementation **********************
+******************************************************************************/
+
+/******************************************************************************
+**************** Non-locking sqlite3_file methods *****************************
+**
+** The next division contains implementations for all methods of the 
+** sqlite3_file object other than the locking methods.  The locking
+** methods were defined in divisions above (one locking method per
+** division).  Those methods that are common to all locking modes
+** are gather together into this division.
+*/
+
+/*
+** Seek to the offset passed as the second argument, then read cnt 
+** bytes into pBuf. Return the number of bytes actually read.
+**
+** NB:  If you define USE_PREAD or USE_PREAD64, then it might also
+** be necessary to define _XOPEN_SOURCE to be 500.  This varies from
+** one system to another.  Since SQLite does not define USE_PREAD
+** any any form by default, we will not attempt to define _XOPEN_SOURCE.
+** See tickets #2741 and #2681.
+**
+** To avoid stomping the errno value on a failed read the lastErrno value
+** is set before returning.
+*/
+static int seekAndRead(unixFile *id, sqlite3_int64 offset, void *pBuf, int cnt){
+  int got;
+#if (!defined(USE_PREAD) && !defined(USE_PREAD64))
+  i64 newOffset;
+#endif
+  TIMER_START;
+#if defined(USE_PREAD)
+  do{ got = osPread(id->h, pBuf, cnt, offset); }while( got<0 && errno==EINTR );
+  SimulateIOError( got = -1 );
+#elif defined(USE_PREAD64)
+  do{ got = osPread64(id->h, pBuf, cnt, offset); }while( got<0 && errno==EINTR);
+  SimulateIOError( got = -1 );
+#else
+  newOffset = lseek(id->h, offset, SEEK_SET);
+  SimulateIOError( newOffset-- );
+  if( newOffset!=offset ){
+    if( newOffset == -1 ){
+      ((unixFile*)id)->lastErrno = errno;
+    }else{
+      ((unixFile*)id)->lastErrno = 0;			
+    }
+    return -1;
+  }
+  do{ got = osRead(id->h, pBuf, cnt); }while( got<0 && errno==EINTR );
+#endif
+  TIMER_END;
+  if( got<0 ){
+    ((unixFile*)id)->lastErrno = errno;
+  }
+  OSTRACE(("READ    %-3d %5d %7lld %llu\n", id->h, got, offset, TIMER_ELAPSED));
+  return got;
+}
+
+/*
+** Read data from a file into a buffer.  Return SQLITE_OK if all
+** bytes were read successfully and SQLITE_IOERR if anything goes
+** wrong.
+*/
+static int unixRead(
+  sqlite3_file *id, 
+  void *pBuf, 
+  int amt,
+  sqlite3_int64 offset
+){
+  unixFile *pFile = (unixFile *)id;
+  int got;
+  assert( id );
+
+  /* If this is a database file (not a journal, master-journal or temp
+  ** file), the bytes in the locking range should never be read or written. */
+#if 0
+  assert( pFile->pUnused==0
+       || offset>=PENDING_BYTE+512
+       || offset+amt<=PENDING_BYTE 
+  );
+#endif
+
+  got = seekAndRead(pFile, offset, pBuf, amt);
+  if( got==amt ){
+    return SQLITE_OK;
+  }else if( got<0 ){
+    /* lastErrno set by seekAndRead */
+    return SQLITE_IOERR_READ;
+  }else{
+    pFile->lastErrno = 0; /* not a system error */
+    /* Unread parts of the buffer must be zero-filled */
+    memset(&((char*)pBuf)[got], 0, amt-got);
+    return SQLITE_IOERR_SHORT_READ;
+  }
+}
+
+/*
+** Seek to the offset in id->offset then read cnt bytes into pBuf.
+** Return the number of bytes actually read.  Update the offset.
+**
+** To avoid stomping the errno value on a failed write the lastErrno value
+** is set before returning.
+*/
+static int seekAndWrite(unixFile *id, i64 offset, const void *pBuf, int cnt){
+  int got;
+#if (!defined(USE_PREAD) && !defined(USE_PREAD64))
+  i64 newOffset;
+#endif
+  TIMER_START;
+#if defined(USE_PREAD)
+  do{ got = osPwrite(id->h, pBuf, cnt, offset); }while( got<0 && errno==EINTR );
+#elif defined(USE_PREAD64)
+  do{ got = osPwrite64(id->h, pBuf, cnt, offset);}while( got<0 && errno==EINTR);
+#else
+  newOffset = lseek(id->h, offset, SEEK_SET);
+  SimulateIOError( newOffset-- );
+  if( newOffset!=offset ){
+    if( newOffset == -1 ){
+      ((unixFile*)id)->lastErrno = errno;
+    }else{
+      ((unixFile*)id)->lastErrno = 0;			
+    }
+    return -1;
+  }
+  do{ got = osWrite(id->h, pBuf, cnt); }while( got<0 && errno==EINTR );
+#endif
+  TIMER_END;
+  if( got<0 ){
+    ((unixFile*)id)->lastErrno = errno;
+  }
+
+  OSTRACE(("WRITE   %-3d %5d %7lld %llu\n", id->h, got, offset, TIMER_ELAPSED));
+  return got;
+}
+
+
+/*
+** Write data from a buffer into a file.  Return SQLITE_OK on success
+** or some other error code on failure.
+*/
+static int unixWrite(
+  sqlite3_file *id, 
+  const void *pBuf, 
+  int amt,
+  sqlite3_int64 offset 
+){
+  unixFile *pFile = (unixFile*)id;
+  int wrote = 0;
+  assert( id );
+  assert( amt>0 );
+
+  /* If this is a database file (not a journal, master-journal or temp
+  ** file), the bytes in the locking range should never be read or written. */
+#if 0
+  assert( pFile->pUnused==0
+       || offset>=PENDING_BYTE+512
+       || offset+amt<=PENDING_BYTE 
+  );
+#endif
+
+#ifndef NDEBUG
+  /* If we are doing a normal write to a database file (as opposed to
+  ** doing a hot-journal rollback or a write to some file other than a
+  ** normal database file) then record the fact that the database
+  ** has changed.  If the transaction counter is modified, record that
+  ** fact too.
+  */
+  if( pFile->inNormalWrite ){
+    pFile->dbUpdate = 1;  /* The database has been modified */
+    if( offset<=24 && offset+amt>=27 ){
+      int rc;
+      char oldCntr[4];
+      SimulateIOErrorBenign(1);
+      rc = seekAndRead(pFile, 24, oldCntr, 4);
+      SimulateIOErrorBenign(0);
+      if( rc!=4 || memcmp(oldCntr, &((char*)pBuf)[24-offset], 4)!=0 ){
+        pFile->transCntrChng = 1;  /* The transaction counter has changed */
+      }
+    }
+  }
+#endif
+
+  while( amt>0 && (wrote = seekAndWrite(pFile, offset, pBuf, amt))>0 ){
+    amt -= wrote;
+    offset += wrote;
+    pBuf = &((char*)pBuf)[wrote];
+  }
+  SimulateIOError(( wrote=(-1), amt=1 ));
+  SimulateDiskfullError(( wrote=0, amt=1 ));
+
+  if( amt>0 ){
+    if( wrote<0 ){
+      /* lastErrno set by seekAndWrite */
+      return SQLITE_IOERR_WRITE;
+    }else{
+      pFile->lastErrno = 0; /* not a system error */
+      return SQLITE_FULL;
+    }
+  }
+
+  return SQLITE_OK;
+}
+
+#ifdef SQLITE_TEST
+/*
+** Count the number of fullsyncs and normal syncs.  This is used to test
+** that syncs and fullsyncs are occurring at the right times.
+*/
+SQLITE_API int sqlite3_sync_count = 0;
+SQLITE_API int sqlite3_fullsync_count = 0;
+#endif
+
+/*
+** We do not trust systems to provide a working fdatasync().  Some do.
+** Others do no.  To be safe, we will stick with the (slower) fsync().
+** If you know that your system does support fdatasync() correctly,
+** then simply compile with -Dfdatasync=fdatasync
+*/
+#if !defined(fdatasync) && !defined(__linux__)
+# define fdatasync fsync
+#endif
+
+/*
+** Define HAVE_FULLFSYNC to 0 or 1 depending on whether or not
+** the F_FULLFSYNC macro is defined.  F_FULLFSYNC is currently
+** only available on Mac OS X.  But that could change.
+*/
+#ifdef F_FULLFSYNC
+# define HAVE_FULLFSYNC 1
+#else
+# define HAVE_FULLFSYNC 0
+#endif
+
+
+/*
+** The fsync() system call does not work as advertised on many
+** unix systems.  The following procedure is an attempt to make
+** it work better.
+**
+** The SQLITE_NO_SYNC macro disables all fsync()s.  This is useful
+** for testing when we want to run through the test suite quickly.
+** You are strongly advised *not* to deploy with SQLITE_NO_SYNC
+** enabled, however, since with SQLITE_NO_SYNC enabled, an OS crash
+** or power failure will likely corrupt the database file.
+**
+** SQLite sets the dataOnly flag if the size of the file is unchanged.
+** The idea behind dataOnly is that it should only write the file content
+** to disk, not the inode.  We only set dataOnly if the file size is 
+** unchanged since the file size is part of the inode.  However, 
+** Ted Ts'o tells us that fdatasync() will also write the inode if the
+** file size has changed.  The only real difference between fdatasync()
+** and fsync(), Ted tells us, is that fdatasync() will not flush the
+** inode if the mtime or owner or other inode attributes have changed.
+** We only care about the file size, not the other file attributes, so
+** as far as SQLite is concerned, an fdatasync() is always adequate.
+** So, we always use fdatasync() if it is available, regardless of
+** the value of the dataOnly flag.
+*/
+static int full_fsync(int fd, int fullSync, int dataOnly){
+  int rc;
+
+  /* The following "ifdef/elif/else/" block has the same structure as
+  ** the one below. It is replicated here solely to avoid cluttering 
+  ** up the real code with the UNUSED_PARAMETER() macros.
+  */
+#ifdef SQLITE_NO_SYNC
+  UNUSED_PARAMETER(fd);
+  UNUSED_PARAMETER(fullSync);
+  UNUSED_PARAMETER(dataOnly);
+#elif HAVE_FULLFSYNC
+  UNUSED_PARAMETER(dataOnly);
+#else
+  UNUSED_PARAMETER(fullSync);
+  UNUSED_PARAMETER(dataOnly);
+#endif
+
+  /* Record the number of times that we do a normal fsync() and 
+  ** FULLSYNC.  This is used during testing to verify that this procedure
+  ** gets called with the correct arguments.
+  */
+#ifdef SQLITE_TEST
+  if( fullSync ) sqlite3_fullsync_count++;
+  sqlite3_sync_count++;
+#endif
+
+  /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a
+  ** no-op
+  */
+#ifdef SQLITE_NO_SYNC
+  rc = SQLITE_OK;
+#elif HAVE_FULLFSYNC
+  if( fullSync ){
+    rc = osFcntl(fd, F_FULLFSYNC, 0);
+  }else{
+    rc = 1;
+  }
+  /* If the FULLFSYNC failed, fall back to attempting an fsync().
+  ** It shouldn't be possible for fullfsync to fail on the local 
+  ** file system (on OSX), so failure indicates that FULLFSYNC
+  ** isn't supported for this file system. So, attempt an fsync 
+  ** and (for now) ignore the overhead of a superfluous fcntl call.  
+  ** It'd be better to detect fullfsync support once and avoid 
+  ** the fcntl call every time sync is called.
+  */
+  if( rc ) rc = fsync(fd);
+
+#elif defined(__APPLE__)
+  /* fdatasync() on HFS+ doesn't yet flush the file size if it changed correctly
+  ** so currently we default to the macro that redefines fdatasync to fsync
+  */
+  rc = fsync(fd);
+#else 
+  rc = fdatasync(fd);
+#if OS_VXWORKS
+  if( rc==-1 && errno==ENOTSUP ){
+    rc = fsync(fd);
+  }
+#endif /* OS_VXWORKS */
+#endif /* ifdef SQLITE_NO_SYNC elif HAVE_FULLFSYNC */
+
+  if( OS_VXWORKS && rc!= -1 ){
+    rc = 0;
+  }
+  return rc;
+}
+
+/*
+** Make sure all writes to a particular file are committed to disk.
+**
+** If dataOnly==0 then both the file itself and its metadata (file
+** size, access time, etc) are synced.  If dataOnly!=0 then only the
+** file data is synced.
+**
+** Under Unix, also make sure that the directory entry for the file
+** has been created by fsync-ing the directory that contains the file.
+** If we do not do this and we encounter a power failure, the directory
+** entry for the journal might not exist after we reboot.  The next
+** SQLite to access the file will not know that the journal exists (because
+** the directory entry for the journal was never created) and the transaction
+** will not roll back - possibly leading to database corruption.
+*/
+static int unixSync(sqlite3_file *id, int flags){
+  int rc;
+  unixFile *pFile = (unixFile*)id;
+
+  int isDataOnly = (flags&SQLITE_SYNC_DATAONLY);
+  int isFullsync = (flags&0x0F)==SQLITE_SYNC_FULL;
+
+  /* Check that one of SQLITE_SYNC_NORMAL or FULL was passed */
+  assert((flags&0x0F)==SQLITE_SYNC_NORMAL
+      || (flags&0x0F)==SQLITE_SYNC_FULL
+  );
+
+  /* Unix cannot, but some systems may return SQLITE_FULL from here. This
+  ** line is to test that doing so does not cause any problems.
+  */
+  SimulateDiskfullError( return SQLITE_FULL );
+
+  assert( pFile );
+  OSTRACE(("SYNC    %-3d\n", pFile->h));
+  rc = full_fsync(pFile->h, isFullsync, isDataOnly);
+  SimulateIOError( rc=1 );
+  if( rc ){
+    pFile->lastErrno = errno;
+    return unixLogError(SQLITE_IOERR_FSYNC, "full_fsync", pFile->zPath);
+  }
+  if( pFile->dirfd>=0 ){
+    OSTRACE(("DIRSYNC %-3d (have_fullfsync=%d fullsync=%d)\n", pFile->dirfd,
+            HAVE_FULLFSYNC, isFullsync));
+#ifndef SQLITE_DISABLE_DIRSYNC
+    /* The directory sync is only attempted if full_fsync is
+    ** turned off or unavailable.  If a full_fsync occurred above,
+    ** then the directory sync is superfluous.
+    */
+    if( (!HAVE_FULLFSYNC || !isFullsync) && full_fsync(pFile->dirfd,0,0) ){
+       /*
+       ** We have received multiple reports of fsync() returning
+       ** errors when applied to directories on certain file systems.
+       ** A failed directory sync is not a big deal.  So it seems
+       ** better to ignore the error.  Ticket #1657
+       */
+       /* pFile->lastErrno = errno; */
+       /* return SQLITE_IOERR; */
+    }
+#endif
+    /* Only need to sync once, so close the  directory when we are done */
+    robust_close(pFile, pFile->dirfd, __LINE__);
+    pFile->dirfd = -1;
+  }
+  return rc;
+}
+
+/*
+** Truncate an open file to a specified size
+*/
+static int unixTruncate(sqlite3_file *id, i64 nByte){
+  unixFile *pFile = (unixFile *)id;
+  int rc;
+  assert( pFile );
+  SimulateIOError( return SQLITE_IOERR_TRUNCATE );
+
+  /* If the user has configured a chunk-size for this file, truncate the
+  ** file so that it consists of an integer number of chunks (i.e. the
+  ** actual file size after the operation may be larger than the requested
+  ** size).
+  */
+  if( pFile->szChunk ){
+    nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
+  }
+
+  rc = robust_ftruncate(pFile->h, (off_t)nByte);
+  if( rc ){
+    pFile->lastErrno = errno;
+    return unixLogError(SQLITE_IOERR_TRUNCATE, "ftruncate", pFile->zPath);
+  }else{
+#ifndef NDEBUG
+    /* If we are doing a normal write to a database file (as opposed to
+    ** doing a hot-journal rollback or a write to some file other than a
+    ** normal database file) and we truncate the file to zero length,
+    ** that effectively updates the change counter.  This might happen
+    ** when restoring a database using the backup API from a zero-length
+    ** source.
+    */
+    if( pFile->inNormalWrite && nByte==0 ){
+      pFile->transCntrChng = 1;
+    }
+#endif
+
+    return SQLITE_OK;
+  }
+}
+
+/*
+** Determine the current size of a file in bytes
+*/
+static int unixFileSize(sqlite3_file *id, i64 *pSize){
+  int rc;
+  struct stat buf;
+  assert( id );
+  rc = osFstat(((unixFile*)id)->h, &buf);
+  SimulateIOError( rc=1 );
+  if( rc!=0 ){
+    ((unixFile*)id)->lastErrno = errno;
+    return SQLITE_IOERR_FSTAT;
+  }
+  *pSize = buf.st_size;
+
+  /* When opening a zero-size database, the findInodeInfo() procedure
+  ** writes a single byte into that file in order to work around a bug
+  ** in the OS-X msdos filesystem.  In order to avoid problems with upper
+  ** layers, we need to report this file size as zero even though it is
+  ** really 1.   Ticket #3260.
+  */
+  if( *pSize==1 ) *pSize = 0;
+
+
+  return SQLITE_OK;
+}
+
+#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
+/*
+** Handler for proxy-locking file-control verbs.  Defined below in the
+** proxying locking division.
+*/
+static int proxyFileControl(sqlite3_file*,int,void*);
+#endif
+
+/* 
+** This function is called to handle the SQLITE_FCNTL_SIZE_HINT 
+** file-control operation.
+**
+** If the user has configured a chunk-size for this file, it could be
+** that the file needs to be extended at this point. Otherwise, the
+** SQLITE_FCNTL_SIZE_HINT operation is a no-op for Unix.
+*/
+static int fcntlSizeHint(unixFile *pFile, i64 nByte){
+  if( pFile->szChunk ){
+    i64 nSize;                    /* Required file size */
+    struct stat buf;              /* Used to hold return values of fstat() */
+   
+    if( osFstat(pFile->h, &buf) ) return SQLITE_IOERR_FSTAT;
+
+    nSize = ((nByte+pFile->szChunk-1) / pFile->szChunk) * pFile->szChunk;
+    if( nSize>(i64)buf.st_size ){
+
+#if defined(HAVE_POSIX_FALLOCATE) && HAVE_POSIX_FALLOCATE
+      /* The code below is handling the return value of osFallocate() 
+      ** correctly. posix_fallocate() is defined to "returns zero on success, 
+      ** or an error number on  failure". See the manpage for details. */
+      int err;
+      do{
+        err = osFallocate(pFile->h, buf.st_size, nSize-buf.st_size);
+      }while( err==EINTR );
+      if( err ) return SQLITE_IOERR_WRITE;
+#else
+      /* If the OS does not have posix_fallocate(), fake it. First use
+      ** ftruncate() to set the file size, then write a single byte to
+      ** the last byte in each block within the extended region. This
+      ** is the same technique used by glibc to implement posix_fallocate()
+      ** on systems that do not have a real fallocate() system call.
+      */
+      int nBlk = buf.st_blksize;  /* File-system block size */
+      i64 iWrite;                 /* Next offset to write to */
+
+      if( robust_ftruncate(pFile->h, nSize) ){
+        pFile->lastErrno = errno;
+        return unixLogError(SQLITE_IOERR_TRUNCATE, "ftruncate", pFile->zPath);
+      }
+      iWrite = ((buf.st_size + 2*nBlk - 1)/nBlk)*nBlk-1;
+      while( iWrite<nSize ){
+        int nWrite = seekAndWrite(pFile, iWrite, "", 1);
+        if( nWrite!=1 ) return SQLITE_IOERR_WRITE;
+        iWrite += nBlk;
+      }
+#endif
+    }
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** Information and control of an open file handle.
+*/
+static int unixFileControl(sqlite3_file *id, int op, void *pArg){
+  switch( op ){
+    case SQLITE_FCNTL_LOCKSTATE: {
+      *(int*)pArg = ((unixFile*)id)->eFileLock;
+      return SQLITE_OK;
+    }
+    case SQLITE_LAST_ERRNO: {
+      *(int*)pArg = ((unixFile*)id)->lastErrno;
+      return SQLITE_OK;
+    }
+    case SQLITE_FCNTL_CHUNK_SIZE: {
+      ((unixFile*)id)->szChunk = *(int *)pArg;
+      return SQLITE_OK;
+    }
+    case SQLITE_FCNTL_SIZE_HINT: {
+      return fcntlSizeHint((unixFile *)id, *(i64 *)pArg);
+    }
+#ifndef NDEBUG
+    /* The pager calls this method to signal that it has done
+    ** a rollback and that the database is therefore unchanged and
+    ** it hence it is OK for the transaction change counter to be
+    ** unchanged.
+    */
+    case SQLITE_FCNTL_DB_UNCHANGED: {
+      ((unixFile*)id)->dbUpdate = 0;
+      return SQLITE_OK;
+    }
+#endif
+#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
+    case SQLITE_SET_LOCKPROXYFILE:
+    case SQLITE_GET_LOCKPROXYFILE: {
+      return proxyFileControl(id,op,pArg);
+    }
+#endif /* SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__) */
+    case SQLITE_FCNTL_SYNC_OMITTED: {
+      return SQLITE_OK;  /* A no-op */
+    }
+  }
+  return SQLITE_NOTFOUND;
+}
+
+/*
+** Return the sector size in bytes of the underlying block device for
+** the specified file. This is almost always 512 bytes, but may be
+** larger for some devices.
+**
+** SQLite code assumes this function cannot fail. It also assumes that
+** if two files are created in the same file-system directory (i.e.
+** a database and its journal file) that the sector size will be the
+** same for both.
+*/
+static int unixSectorSize(sqlite3_file *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  return SQLITE_DEFAULT_SECTOR_SIZE;
+}
+
+/*
+** Return the device characteristics for the file. This is always 0 for unix.
+*/
+static int unixDeviceCharacteristics(sqlite3_file *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  return 0;
+}
+
+#ifndef SQLITE_OMIT_WAL
+
+
+/*
+** Object used to represent an shared memory buffer.  
+**
+** When multiple threads all reference the same wal-index, each thread
+** has its own unixShm object, but they all point to a single instance
+** of this unixShmNode object.  In other words, each wal-index is opened
+** only once per process.
+**
+** Each unixShmNode object is connected to a single unixInodeInfo object.
+** We could coalesce this object into unixInodeInfo, but that would mean
+** every open file that does not use shared memory (in other words, most
+** open files) would have to carry around this extra information.  So
+** the unixInodeInfo object contains a pointer to this unixShmNode object
+** and the unixShmNode object is created only when needed.
+**
+** unixMutexHeld() must be true when creating or destroying
+** this object or while reading or writing the following fields:
+**
+**      nRef
+**
+** The following fields are read-only after the object is created:
+** 
+**      fid
+**      zFilename
+**
+** Either unixShmNode.mutex must be held or unixShmNode.nRef==0 and
+** unixMutexHeld() is true when reading or writing any other field
+** in this structure.
+*/
+struct unixShmNode {
+  unixInodeInfo *pInode;     /* unixInodeInfo that owns this SHM node */
+  sqlite3_mutex *mutex;      /* Mutex to access this object */
+  char *zFilename;           /* Name of the mmapped file */
+  int h;                     /* Open file descriptor */
+  int szRegion;              /* Size of shared-memory regions */
+  int nRegion;               /* Size of array apRegion */
+  char **apRegion;           /* Array of mapped shared-memory regions */
+  int nRef;                  /* Number of unixShm objects pointing to this */
+  unixShm *pFirst;           /* All unixShm objects pointing to this */
+#ifdef SQLITE_DEBUG
+  u8 exclMask;               /* Mask of exclusive locks held */
+  u8 sharedMask;             /* Mask of shared locks held */
+  u8 nextShmId;              /* Next available unixShm.id value */
+#endif
+};
+
+/*
+** Structure used internally by this VFS to record the state of an
+** open shared memory connection.
+**
+** The following fields are initialized when this object is created and
+** are read-only thereafter:
+**
+**    unixShm.pFile
+**    unixShm.id
+**
+** All other fields are read/write.  The unixShm.pFile->mutex must be held
+** while accessing any read/write fields.
+*/
+struct unixShm {
+  unixShmNode *pShmNode;     /* The underlying unixShmNode object */
+  unixShm *pNext;            /* Next unixShm with the same unixShmNode */
+  u8 hasMutex;               /* True if holding the unixShmNode mutex */
+  u16 sharedMask;            /* Mask of shared locks held */
+  u16 exclMask;              /* Mask of exclusive locks held */
+#ifdef SQLITE_DEBUG
+  u8 id;                     /* Id of this connection within its unixShmNode */
+#endif
+};
+
+/*
+** Constants used for locking
+*/
+#define UNIX_SHM_BASE   ((22+SQLITE_SHM_NLOCK)*4)         /* first lock byte */
+#define UNIX_SHM_DMS    (UNIX_SHM_BASE+SQLITE_SHM_NLOCK)  /* deadman switch */
+
+/*
+** Apply posix advisory locks for all bytes from ofst through ofst+n-1.
+**
+** Locks block if the mask is exactly UNIX_SHM_C and are non-blocking
+** otherwise.
+*/
+static int unixShmSystemLock(
+  unixShmNode *pShmNode, /* Apply locks to this open shared-memory segment */
+  int lockType,          /* F_UNLCK, F_RDLCK, or F_WRLCK */
+  int ofst,              /* First byte of the locking range */
+  int n                  /* Number of bytes to lock */
+){
+  struct flock f;       /* The posix advisory locking structure */
+  int rc = SQLITE_OK;   /* Result code form fcntl() */
+
+  /* Access to the unixShmNode object is serialized by the caller */
+  assert( sqlite3_mutex_held(pShmNode->mutex) || pShmNode->nRef==0 );
+
+  /* Shared locks never span more than one byte */
+  assert( n==1 || lockType!=F_RDLCK );
+
+  /* Locks are within range */
+  assert( n>=1 && n<SQLITE_SHM_NLOCK );
+
+  if( pShmNode->h>=0 ){
+    /* Initialize the locking parameters */
+    memset(&f, 0, sizeof(f));
+    f.l_type = lockType;
+    f.l_whence = SEEK_SET;
+    f.l_start = ofst;
+    f.l_len = n;
+
+    rc = osFcntl(pShmNode->h, F_SETLK, &f);
+    rc = (rc!=(-1)) ? SQLITE_OK : SQLITE_BUSY;
+  }
+
+  /* Update the global lock state and do debug tracing */
+#ifdef SQLITE_DEBUG
+  { u16 mask;
+  OSTRACE(("SHM-LOCK "));
+  mask = (1<<(ofst+n)) - (1<<ofst);
+  if( rc==SQLITE_OK ){
+    if( lockType==F_UNLCK ){
+      OSTRACE(("unlock %d ok", ofst));
+      pShmNode->exclMask &= ~mask;
+      pShmNode->sharedMask &= ~mask;
+    }else if( lockType==F_RDLCK ){
+      OSTRACE(("read-lock %d ok", ofst));
+      pShmNode->exclMask &= ~mask;
+      pShmNode->sharedMask |= mask;
+    }else{
+      assert( lockType==F_WRLCK );
+      OSTRACE(("write-lock %d ok", ofst));
+      pShmNode->exclMask |= mask;
+      pShmNode->sharedMask &= ~mask;
+    }
+  }else{
+    if( lockType==F_UNLCK ){
+      OSTRACE(("unlock %d failed", ofst));
+    }else if( lockType==F_RDLCK ){
+      OSTRACE(("read-lock failed"));
+    }else{
+      assert( lockType==F_WRLCK );
+      OSTRACE(("write-lock %d failed", ofst));
+    }
+  }
+  OSTRACE((" - afterwards %03x,%03x\n",
+           pShmNode->sharedMask, pShmNode->exclMask));
+  }
+#endif
+
+  return rc;        
+}
+
+
+/*
+** Purge the unixShmNodeList list of all entries with unixShmNode.nRef==0.
+**
+** This is not a VFS shared-memory method; it is a utility function called
+** by VFS shared-memory methods.
+*/
+static void unixShmPurge(unixFile *pFd){
+  unixShmNode *p = pFd->pInode->pShmNode;
+  assert( unixMutexHeld() );
+  if( p && p->nRef==0 ){
+    int i;
+    assert( p->pInode==pFd->pInode );
+    if( p->mutex ) sqlite3_mutex_free(p->mutex);
+    for(i=0; i<p->nRegion; i++){
+      if( p->h>=0 ){
+        munmap(p->apRegion[i], p->szRegion);
+      }else{
+        sqlite3_free(p->apRegion[i]);
+      }
+    }
+    sqlite3_free(p->apRegion);
+    if( p->h>=0 ){
+      robust_close(pFd, p->h, __LINE__);
+      p->h = -1;
+    }
+    p->pInode->pShmNode = 0;
+    sqlite3_free(p);
+  }
+}
+
+/*
+** Open a shared-memory area associated with open database file pDbFd.  
+** This particular implementation uses mmapped files.
+**
+** The file used to implement shared-memory is in the same directory
+** as the open database file and has the same name as the open database
+** file with the "-shm" suffix added.  For example, if the database file
+** is "/home/user1/config.db" then the file that is created and mmapped
+** for shared memory will be called "/home/user1/config.db-shm".  
+**
+** Another approach to is to use files in /dev/shm or /dev/tmp or an
+** some other tmpfs mount. But if a file in a different directory
+** from the database file is used, then differing access permissions
+** or a chroot() might cause two different processes on the same
+** database to end up using different files for shared memory - 
+** meaning that their memory would not really be shared - resulting
+** in database corruption.  Nevertheless, this tmpfs file usage
+** can be enabled at compile-time using -DSQLITE_SHM_DIRECTORY="/dev/shm"
+** or the equivalent.  The use of the SQLITE_SHM_DIRECTORY compile-time
+** option results in an incompatible build of SQLite;  builds of SQLite
+** that with differing SQLITE_SHM_DIRECTORY settings attempt to use the
+** same database file at the same time, database corruption will likely
+** result. The SQLITE_SHM_DIRECTORY compile-time option is considered
+** "unsupported" and may go away in a future SQLite release.
+**
+** When opening a new shared-memory file, if no other instances of that
+** file are currently open, in this process or in other processes, then
+** the file must be truncated to zero length or have its header cleared.
+**
+** If the original database file (pDbFd) is using the "unix-excl" VFS
+** that means that an exclusive lock is held on the database file and
+** that no other processes are able to read or write the database.  In
+** that case, we do not really need shared memory.  No shared memory
+** file is created.  The shared memory will be simulated with heap memory.
+*/
+static int unixOpenSharedMemory(unixFile *pDbFd){
+  struct unixShm *p = 0;          /* The connection to be opened */
+  struct unixShmNode *pShmNode;   /* The underlying mmapped file */
+  int rc;                         /* Result code */
+  unixInodeInfo *pInode;          /* The inode of fd */
+  char *zShmFilename;             /* Name of the file used for SHM */
+  int nShmFilename;               /* Size of the SHM filename in bytes */
+
+  /* Allocate space for the new unixShm object. */
+  p = sqlite3_malloc( sizeof(*p) );
+  if( p==0 ) return SQLITE_NOMEM;
+  memset(p, 0, sizeof(*p));
+  assert( pDbFd->pShm==0 );
+
+  /* Check to see if a unixShmNode object already exists. Reuse an existing
+  ** one if present. Create a new one if necessary.
+  */
+  unixEnterMutex();
+  pInode = pDbFd->pInode;
+  pShmNode = pInode->pShmNode;
+  if( pShmNode==0 ){
+    struct stat sStat;                 /* fstat() info for database file */
+
+    /* Call fstat() to figure out the permissions on the database file. If
+    ** a new *-shm file is created, an attempt will be made to create it
+    ** with the same permissions. The actual permissions the file is created
+    ** with are subject to the current umask setting.
+    */
+    if( osFstat(pDbFd->h, &sStat) && pInode->bProcessLock==0 ){
+      rc = SQLITE_IOERR_FSTAT;
+      goto shm_open_err;
+    }
+
+#ifdef SQLITE_SHM_DIRECTORY
+    nShmFilename = sizeof(SQLITE_SHM_DIRECTORY) + 30;
+#else
+    nShmFilename = 5 + (int)strlen(pDbFd->zPath);
+#endif
+    pShmNode = sqlite3_malloc( sizeof(*pShmNode) + nShmFilename );
+    if( pShmNode==0 ){
+      rc = SQLITE_NOMEM;
+      goto shm_open_err;
+    }
+    memset(pShmNode, 0, sizeof(*pShmNode));
+    zShmFilename = pShmNode->zFilename = (char*)&pShmNode[1];
+#ifdef SQLITE_SHM_DIRECTORY
+    sqlite3_snprintf(nShmFilename, zShmFilename, 
+                     SQLITE_SHM_DIRECTORY "/sqlite-shm-%x-%x",
+                     (u32)sStat.st_ino, (u32)sStat.st_dev);
+#else
+    sqlite3_snprintf(nShmFilename, zShmFilename, "%s-shm", pDbFd->zPath);
+#endif
+    pShmNode->h = -1;
+    pDbFd->pInode->pShmNode = pShmNode;
+    pShmNode->pInode = pDbFd->pInode;
+    pShmNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
+    if( pShmNode->mutex==0 ){
+      rc = SQLITE_NOMEM;
+      goto shm_open_err;
+    }
+
+    if( pInode->bProcessLock==0 ){
+      pShmNode->h = robust_open(zShmFilename, O_RDWR|O_CREAT,
+                               (sStat.st_mode & 0777));
+      if( pShmNode->h<0 ){
+        rc = unixLogError(SQLITE_CANTOPEN_BKPT, "open", zShmFilename);
+        goto shm_open_err;
+      }
+  
+      /* Check to see if another process is holding the dead-man switch.
+      ** If not, truncate the file to zero length. 
+      */
+      rc = SQLITE_OK;
+      if( unixShmSystemLock(pShmNode, F_WRLCK, UNIX_SHM_DMS, 1)==SQLITE_OK ){
+        if( robust_ftruncate(pShmNode->h, 0) ){
+          rc = unixLogError(SQLITE_IOERR_SHMOPEN, "ftruncate", zShmFilename);
+        }
+      }
+      if( rc==SQLITE_OK ){
+        rc = unixShmSystemLock(pShmNode, F_RDLCK, UNIX_SHM_DMS, 1);
+      }
+      if( rc ) goto shm_open_err;
+    }
+  }
+
+  /* Make the new connection a child of the unixShmNode */
+  p->pShmNode = pShmNode;
+#ifdef SQLITE_DEBUG
+  p->id = pShmNode->nextShmId++;
+#endif
+  pShmNode->nRef++;
+  pDbFd->pShm = p;
+  unixLeaveMutex();
+
+  /* The reference count on pShmNode has already been incremented under
+  ** the cover of the unixEnterMutex() mutex and the pointer from the
+  ** new (struct unixShm) object to the pShmNode has been set. All that is
+  ** left to do is to link the new object into the linked list starting
+  ** at pShmNode->pFirst. This must be done while holding the pShmNode->mutex 
+  ** mutex.
+  */
+  sqlite3_mutex_enter(pShmNode->mutex);
+  p->pNext = pShmNode->pFirst;
+  pShmNode->pFirst = p;
+  sqlite3_mutex_leave(pShmNode->mutex);
+  return SQLITE_OK;
+
+  /* Jump here on any error */
+shm_open_err:
+  unixShmPurge(pDbFd);       /* This call frees pShmNode if required */
+  sqlite3_free(p);
+  unixLeaveMutex();
+  return rc;
+}
+
+/*
+** This function is called to obtain a pointer to region iRegion of the 
+** shared-memory associated with the database file fd. Shared-memory regions 
+** are numbered starting from zero. Each shared-memory region is szRegion 
+** bytes in size.
+**
+** If an error occurs, an error code is returned and *pp is set to NULL.
+**
+** Otherwise, if the bExtend parameter is 0 and the requested shared-memory
+** region has not been allocated (by any client, including one running in a
+** separate process), then *pp is set to NULL and SQLITE_OK returned. If 
+** bExtend is non-zero and the requested shared-memory region has not yet 
+** been allocated, it is allocated by this function.
+**
+** If the shared-memory region has already been allocated or is allocated by
+** this call as described above, then it is mapped into this processes 
+** address space (if it is not already), *pp is set to point to the mapped 
+** memory and SQLITE_OK returned.
+*/
+static int unixShmMap(
+  sqlite3_file *fd,               /* Handle open on database file */
+  int iRegion,                    /* Region to retrieve */
+  int szRegion,                   /* Size of regions */
+  int bExtend,                    /* True to extend file if necessary */
+  void volatile **pp              /* OUT: Mapped memory */
+){
+  unixFile *pDbFd = (unixFile*)fd;
+  unixShm *p;
+  unixShmNode *pShmNode;
+  int rc = SQLITE_OK;
+
+  /* If the shared-memory file has not yet been opened, open it now. */
+  if( pDbFd->pShm==0 ){
+    rc = unixOpenSharedMemory(pDbFd);
+    if( rc!=SQLITE_OK ) return rc;
+  }
+
+  p = pDbFd->pShm;
+  pShmNode = p->pShmNode;
+  sqlite3_mutex_enter(pShmNode->mutex);
+  assert( szRegion==pShmNode->szRegion || pShmNode->nRegion==0 );
+  assert( pShmNode->pInode==pDbFd->pInode );
+  assert( pShmNode->h>=0 || pDbFd->pInode->bProcessLock==1 );
+  assert( pShmNode->h<0 || pDbFd->pInode->bProcessLock==0 );
+
+  if( pShmNode->nRegion<=iRegion ){
+    char **apNew;                      /* New apRegion[] array */
+    int nByte = (iRegion+1)*szRegion;  /* Minimum required file size */
+    struct stat sStat;                 /* Used by fstat() */
+
+    pShmNode->szRegion = szRegion;
+
+    if( pShmNode->h>=0 ){
+      /* The requested region is not mapped into this processes address space.
+      ** Check to see if it has been allocated (i.e. if the wal-index file is
+      ** large enough to contain the requested region).
+      */
+      if( osFstat(pShmNode->h, &sStat) ){
+        rc = SQLITE_IOERR_SHMSIZE;
+        goto shmpage_out;
+      }
+  
+      if( sStat.st_size<nByte ){
+        /* The requested memory region does not exist. If bExtend is set to
+        ** false, exit early. *pp will be set to NULL and SQLITE_OK returned.
+        **
+        ** Alternatively, if bExtend is true, use ftruncate() to allocate
+        ** the requested memory region.
+        */
+        if( !bExtend ) goto shmpage_out;
+        if( robust_ftruncate(pShmNode->h, nByte) ){
+          rc = unixLogError(SQLITE_IOERR_SHMSIZE, "ftruncate",
+                            pShmNode->zFilename);
+          goto shmpage_out;
+        }
+      }
+    }
+
+    /* Map the requested memory region into this processes address space. */
+    apNew = (char **)sqlite3_realloc(
+        pShmNode->apRegion, (iRegion+1)*sizeof(char *)
+    );
+    if( !apNew ){
+      rc = SQLITE_IOERR_NOMEM;
+      goto shmpage_out;
+    }
+    pShmNode->apRegion = apNew;
+    while(pShmNode->nRegion<=iRegion){
+      void *pMem;
+      if( pShmNode->h>=0 ){
+        pMem = mmap(0, szRegion, PROT_READ|PROT_WRITE, 
+            MAP_SHARED, pShmNode->h, pShmNode->nRegion*szRegion
+        );
+        if( pMem==MAP_FAILED ){
+          rc = SQLITE_IOERR;
+          goto shmpage_out;
+        }
+      }else{
+        pMem = sqlite3_malloc(szRegion);
+        if( pMem==0 ){
+          rc = SQLITE_NOMEM;
+          goto shmpage_out;
+        }
+        memset(pMem, 0, szRegion);
+      }
+      pShmNode->apRegion[pShmNode->nRegion] = pMem;
+      pShmNode->nRegion++;
+    }
+  }
+
+shmpage_out:
+  if( pShmNode->nRegion>iRegion ){
+    *pp = pShmNode->apRegion[iRegion];
+  }else{
+    *pp = 0;
+  }
+  sqlite3_mutex_leave(pShmNode->mutex);
+  return rc;
+}
+
+/*
+** Change the lock state for a shared-memory segment.
+**
+** Note that the relationship between SHAREd and EXCLUSIVE locks is a little
+** different here than in posix.  In xShmLock(), one can go from unlocked
+** to shared and back or from unlocked to exclusive and back.  But one may
+** not go from shared to exclusive or from exclusive to shared.
+*/
+static int unixShmLock(
+  sqlite3_file *fd,          /* Database file holding the shared memory */
+  int ofst,                  /* First lock to acquire or release */
+  int n,                     /* Number of locks to acquire or release */
+  int flags                  /* What to do with the lock */
+){
+  unixFile *pDbFd = (unixFile*)fd;      /* Connection holding shared memory */
+  unixShm *p = pDbFd->pShm;             /* The shared memory being locked */
+  unixShm *pX;                          /* For looping over all siblings */
+  unixShmNode *pShmNode = p->pShmNode;  /* The underlying file iNode */
+  int rc = SQLITE_OK;                   /* Result code */
+  u16 mask;                             /* Mask of locks to take or release */
+
+  assert( pShmNode==pDbFd->pInode->pShmNode );
+  assert( pShmNode->pInode==pDbFd->pInode );
+  assert( ofst>=0 && ofst+n<=SQLITE_SHM_NLOCK );
+  assert( n>=1 );
+  assert( flags==(SQLITE_SHM_LOCK | SQLITE_SHM_SHARED)
+       || flags==(SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE)
+       || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED)
+       || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE) );
+  assert( n==1 || (flags & SQLITE_SHM_EXCLUSIVE)!=0 );
+  assert( pShmNode->h>=0 || pDbFd->pInode->bProcessLock==1 );
+  assert( pShmNode->h<0 || pDbFd->pInode->bProcessLock==0 );
+
+  mask = (1<<(ofst+n)) - (1<<ofst);
+  assert( n>1 || mask==(1<<ofst) );
+  sqlite3_mutex_enter(pShmNode->mutex);
+  if( flags & SQLITE_SHM_UNLOCK ){
+    u16 allMask = 0; /* Mask of locks held by siblings */
+
+    /* See if any siblings hold this same lock */
+    for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
+      if( pX==p ) continue;
+      assert( (pX->exclMask & (p->exclMask|p->sharedMask))==0 );
+      allMask |= pX->sharedMask;
+    }
+
+    /* Unlock the system-level locks */
+    if( (mask & allMask)==0 ){
+      rc = unixShmSystemLock(pShmNode, F_UNLCK, ofst+UNIX_SHM_BASE, n);
+    }else{
+      rc = SQLITE_OK;
+    }
+
+    /* Undo the local locks */
+    if( rc==SQLITE_OK ){
+      p->exclMask &= ~mask;
+      p->sharedMask &= ~mask;
+    } 
+  }else if( flags & SQLITE_SHM_SHARED ){
+    u16 allShared = 0;  /* Union of locks held by connections other than "p" */
+
+    /* Find out which shared locks are already held by sibling connections.
+    ** If any sibling already holds an exclusive lock, go ahead and return
+    ** SQLITE_BUSY.
+    */
+    for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
+      if( (pX->exclMask & mask)!=0 ){
+        rc = SQLITE_BUSY;
+        break;
+      }
+      allShared |= pX->sharedMask;
+    }
+
+    /* Get shared locks at the system level, if necessary */
+    if( rc==SQLITE_OK ){
+      if( (allShared & mask)==0 ){
+        rc = unixShmSystemLock(pShmNode, F_RDLCK, ofst+UNIX_SHM_BASE, n);
+      }else{
+        rc = SQLITE_OK;
+      }
+    }
+
+    /* Get the local shared locks */
+    if( rc==SQLITE_OK ){
+      p->sharedMask |= mask;
+    }
+  }else{
+    /* Make sure no sibling connections hold locks that will block this
+    ** lock.  If any do, return SQLITE_BUSY right away.
+    */
+    for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
+      if( (pX->exclMask & mask)!=0 || (pX->sharedMask & mask)!=0 ){
+        rc = SQLITE_BUSY;
+        break;
+      }
+    }
+  
+    /* Get the exclusive locks at the system level.  Then if successful
+    ** also mark the local connection as being locked.
+    */
+    if( rc==SQLITE_OK ){
+      rc = unixShmSystemLock(pShmNode, F_WRLCK, ofst+UNIX_SHM_BASE, n);
+      if( rc==SQLITE_OK ){
+        assert( (p->sharedMask & mask)==0 );
+        p->exclMask |= mask;
+      }
+    }
+  }
+  sqlite3_mutex_leave(pShmNode->mutex);
+  OSTRACE(("SHM-LOCK shmid-%d, pid-%d got %03x,%03x\n",
+           p->id, getpid(), p->sharedMask, p->exclMask));
+  return rc;
+}
+
+/*
+** Implement a memory barrier or memory fence on shared memory.  
+**
+** All loads and stores begun before the barrier must complete before
+** any load or store begun after the barrier.
+*/
+static void unixShmBarrier(
+  sqlite3_file *fd                /* Database file holding the shared memory */
+){
+  UNUSED_PARAMETER(fd);
+  unixEnterMutex();
+  unixLeaveMutex();
+}
+
+/*
+** Close a connection to shared-memory.  Delete the underlying 
+** storage if deleteFlag is true.
+**
+** If there is no shared memory associated with the connection then this
+** routine is a harmless no-op.
+*/
+static int unixShmUnmap(
+  sqlite3_file *fd,               /* The underlying database file */
+  int deleteFlag                  /* Delete shared-memory if true */
+){
+  unixShm *p;                     /* The connection to be closed */
+  unixShmNode *pShmNode;          /* The underlying shared-memory file */
+  unixShm **pp;                   /* For looping over sibling connections */
+  unixFile *pDbFd;                /* The underlying database file */
+
+  pDbFd = (unixFile*)fd;
+  p = pDbFd->pShm;
+  if( p==0 ) return SQLITE_OK;
+  pShmNode = p->pShmNode;
+
+  assert( pShmNode==pDbFd->pInode->pShmNode );
+  assert( pShmNode->pInode==pDbFd->pInode );
+
+  /* Remove connection p from the set of connections associated
+  ** with pShmNode */
+  sqlite3_mutex_enter(pShmNode->mutex);
+  for(pp=&pShmNode->pFirst; (*pp)!=p; pp = &(*pp)->pNext){}
+  *pp = p->pNext;
+
+  /* Free the connection p */
+  sqlite3_free(p);
+  pDbFd->pShm = 0;
+  sqlite3_mutex_leave(pShmNode->mutex);
+
+  /* If pShmNode->nRef has reached 0, then close the underlying
+  ** shared-memory file, too */
+  unixEnterMutex();
+  assert( pShmNode->nRef>0 );
+  pShmNode->nRef--;
+  if( pShmNode->nRef==0 ){
+    if( deleteFlag && pShmNode->h>=0 ) unlink(pShmNode->zFilename);
+    unixShmPurge(pDbFd);
+  }
+  unixLeaveMutex();
+
+  return SQLITE_OK;
+}
+
+
+#else
+# define unixShmMap     0
+# define unixShmLock    0
+# define unixShmBarrier 0
+# define unixShmUnmap   0
+#endif /* #ifndef SQLITE_OMIT_WAL */
+
+/*
+** Here ends the implementation of all sqlite3_file methods.
+**
+********************** End sqlite3_file Methods *******************************
+******************************************************************************/
+
+/*
+** This division contains definitions of sqlite3_io_methods objects that
+** implement various file locking strategies.  It also contains definitions
+** of "finder" functions.  A finder-function is used to locate the appropriate
+** sqlite3_io_methods object for a particular database file.  The pAppData
+** field of the sqlite3_vfs VFS objects are initialized to be pointers to
+** the correct finder-function for that VFS.
+**
+** Most finder functions return a pointer to a fixed sqlite3_io_methods
+** object.  The only interesting finder-function is autolockIoFinder, which
+** looks at the filesystem type and tries to guess the best locking
+** strategy from that.
+**
+** For finder-funtion F, two objects are created:
+**
+**    (1) The real finder-function named "FImpt()".
+**
+**    (2) A constant pointer to this function named just "F".
+**
+**
+** A pointer to the F pointer is used as the pAppData value for VFS
+** objects.  We have to do this instead of letting pAppData point
+** directly at the finder-function since C90 rules prevent a void*
+** from be cast into a function pointer.
+**
+**
+** Each instance of this macro generates two objects:
+**
+**   *  A constant sqlite3_io_methods object call METHOD that has locking
+**      methods CLOSE, LOCK, UNLOCK, CKRESLOCK.
+**
+**   *  An I/O method finder function called FINDER that returns a pointer
+**      to the METHOD object in the previous bullet.
+*/
+#define IOMETHODS(FINDER, METHOD, VERSION, CLOSE, LOCK, UNLOCK, CKLOCK)      \
+static const sqlite3_io_methods METHOD = {                                   \
+   VERSION,                    /* iVersion */                                \
+   CLOSE,                      /* xClose */                                  \
+   unixRead,                   /* xRead */                                   \
+   unixWrite,                  /* xWrite */                                  \
+   unixTruncate,               /* xTruncate */                               \
+   unixSync,                   /* xSync */                                   \
+   unixFileSize,               /* xFileSize */                               \
+   LOCK,                       /* xLock */                                   \
+   UNLOCK,                     /* xUnlock */                                 \
+   CKLOCK,                     /* xCheckReservedLock */                      \
+   unixFileControl,            /* xFileControl */                            \
+   unixSectorSize,             /* xSectorSize */                             \
+   unixDeviceCharacteristics,  /* xDeviceCapabilities */                     \
+   unixShmMap,                 /* xShmMap */                                 \
+   unixShmLock,                /* xShmLock */                                \
+   unixShmBarrier,             /* xShmBarrier */                             \
+   unixShmUnmap                /* xShmUnmap */                               \
+};                                                                           \
+static const sqlite3_io_methods *FINDER##Impl(const char *z, unixFile *p){   \
+  UNUSED_PARAMETER(z); UNUSED_PARAMETER(p);                                  \
+  return &METHOD;                                                            \
+}                                                                            \
+static const sqlite3_io_methods *(*const FINDER)(const char*,unixFile *p)    \
+    = FINDER##Impl;
+
+/*
+** Here are all of the sqlite3_io_methods objects for each of the
+** locking strategies.  Functions that return pointers to these methods
+** are also created.
+*/
+IOMETHODS(
+  posixIoFinder,            /* Finder function name */
+  posixIoMethods,           /* sqlite3_io_methods object name */
+  2,                        /* shared memory is enabled */
+  unixClose,                /* xClose method */
+  unixLock,                 /* xLock method */
+  unixUnlock,               /* xUnlock method */
+  unixCheckReservedLock     /* xCheckReservedLock method */
+)
+IOMETHODS(
+  nolockIoFinder,           /* Finder function name */
+  nolockIoMethods,          /* sqlite3_io_methods object name */
+  1,                        /* shared memory is disabled */
+  nolockClose,              /* xClose method */
+  nolockLock,               /* xLock method */
+  nolockUnlock,             /* xUnlock method */
+  nolockCheckReservedLock   /* xCheckReservedLock method */
+)
+IOMETHODS(
+  dotlockIoFinder,          /* Finder function name */
+  dotlockIoMethods,         /* sqlite3_io_methods object name */
+  1,                        /* shared memory is disabled */
+  dotlockClose,             /* xClose method */
+  dotlockLock,              /* xLock method */
+  dotlockUnlock,            /* xUnlock method */
+  dotlockCheckReservedLock  /* xCheckReservedLock method */
+)
+
+#if SQLITE_ENABLE_LOCKING_STYLE && !OS_VXWORKS
+IOMETHODS(
+  flockIoFinder,            /* Finder function name */
+  flockIoMethods,           /* sqlite3_io_methods object name */
+  1,                        /* shared memory is disabled */
+  flockClose,               /* xClose method */
+  flockLock,                /* xLock method */
+  flockUnlock,              /* xUnlock method */
+  flockCheckReservedLock    /* xCheckReservedLock method */
+)
+#endif
+
+#if OS_VXWORKS
+IOMETHODS(
+  semIoFinder,              /* Finder function name */
+  semIoMethods,             /* sqlite3_io_methods object name */
+  1,                        /* shared memory is disabled */
+  semClose,                 /* xClose method */
+  semLock,                  /* xLock method */
+  semUnlock,                /* xUnlock method */
+  semCheckReservedLock      /* xCheckReservedLock method */
+)
+#endif
+
+#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
+IOMETHODS(
+  afpIoFinder,              /* Finder function name */
+  afpIoMethods,             /* sqlite3_io_methods object name */
+  1,                        /* shared memory is disabled */
+  afpClose,                 /* xClose method */
+  afpLock,                  /* xLock method */
+  afpUnlock,                /* xUnlock method */
+  afpCheckReservedLock      /* xCheckReservedLock method */
+)
+#endif
+
+/*
+** The proxy locking method is a "super-method" in the sense that it
+** opens secondary file descriptors for the conch and lock files and
+** it uses proxy, dot-file, AFP, and flock() locking methods on those
+** secondary files.  For this reason, the division that implements
+** proxy locking is located much further down in the file.  But we need
+** to go ahead and define the sqlite3_io_methods and finder function
+** for proxy locking here.  So we forward declare the I/O methods.
+*/
+#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
+static int proxyClose(sqlite3_file*);
+static int proxyLock(sqlite3_file*, int);
+static int proxyUnlock(sqlite3_file*, int);
+static int proxyCheckReservedLock(sqlite3_file*, int*);
+IOMETHODS(
+  proxyIoFinder,            /* Finder function name */
+  proxyIoMethods,           /* sqlite3_io_methods object name */
+  1,                        /* shared memory is disabled */
+  proxyClose,               /* xClose method */
+  proxyLock,                /* xLock method */
+  proxyUnlock,              /* xUnlock method */
+  proxyCheckReservedLock    /* xCheckReservedLock method */
+)
+#endif
+
+/* nfs lockd on OSX 10.3+ doesn't clear write locks when a read lock is set */
+#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
+IOMETHODS(
+  nfsIoFinder,               /* Finder function name */
+  nfsIoMethods,              /* sqlite3_io_methods object name */
+  1,                         /* shared memory is disabled */
+  unixClose,                 /* xClose method */
+  unixLock,                  /* xLock method */
+  nfsUnlock,                 /* xUnlock method */
+  unixCheckReservedLock      /* xCheckReservedLock method */
+)
+#endif
+
+#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
+/* 
+** This "finder" function attempts to determine the best locking strategy 
+** for the database file "filePath".  It then returns the sqlite3_io_methods
+** object that implements that strategy.
+**
+** This is for MacOSX only.
+*/
+static const sqlite3_io_methods *autolockIoFinderImpl(
+  const char *filePath,    /* name of the database file */
+  unixFile *pNew           /* open file object for the database file */
+){
+  static const struct Mapping {
+    const char *zFilesystem;              /* Filesystem type name */
+    const sqlite3_io_methods *pMethods;   /* Appropriate locking method */
+  } aMap[] = {
+    { "hfs",    &posixIoMethods },
+    { "ufs",    &posixIoMethods },
+    { "afpfs",  &afpIoMethods },
+    { "smbfs",  &afpIoMethods },
+    { "webdav", &nolockIoMethods },
+    { 0, 0 }
+  };
+  int i;
+  struct statfs fsInfo;
+  struct flock lockInfo;
+
+  if( !filePath ){
+    /* If filePath==NULL that means we are dealing with a transient file
+    ** that does not need to be locked. */
+    return &nolockIoMethods;
+  }
+  if( statfs(filePath, &fsInfo) != -1 ){
+    if( fsInfo.f_flags & MNT_RDONLY ){
+      return &nolockIoMethods;
+    }
+    for(i=0; aMap[i].zFilesystem; i++){
+      if( strcmp(fsInfo.f_fstypename, aMap[i].zFilesystem)==0 ){
+        return aMap[i].pMethods;
+      }
+    }
+  }
+
+  /* Default case. Handles, amongst others, "nfs".
+  ** Test byte-range lock using fcntl(). If the call succeeds, 
+  ** assume that the file-system supports POSIX style locks. 
+  */
+  lockInfo.l_len = 1;
+  lockInfo.l_start = 0;
+  lockInfo.l_whence = SEEK_SET;
+  lockInfo.l_type = F_RDLCK;
+  if( osFcntl(pNew->h, F_GETLK, &lockInfo)!=-1 ) {
+    if( strcmp(fsInfo.f_fstypename, "nfs")==0 ){
+      return &nfsIoMethods;
+    } else {
+      return &posixIoMethods;
+    }
+  }else{
+    return &dotlockIoMethods;
+  }
+}
+static const sqlite3_io_methods 
+  *(*const autolockIoFinder)(const char*,unixFile*) = autolockIoFinderImpl;
+
+#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */
+
+#if OS_VXWORKS && SQLITE_ENABLE_LOCKING_STYLE
+/* 
+** This "finder" function attempts to determine the best locking strategy 
+** for the database file "filePath".  It then returns the sqlite3_io_methods
+** object that implements that strategy.
+**
+** This is for VXWorks only.
+*/
+static const sqlite3_io_methods *autolockIoFinderImpl(
+  const char *filePath,    /* name of the database file */
+  unixFile *pNew           /* the open file object */
+){
+  struct flock lockInfo;
+
+  if( !filePath ){
+    /* If filePath==NULL that means we are dealing with a transient file
+    ** that does not need to be locked. */
+    return &nolockIoMethods;
+  }
+
+  /* Test if fcntl() is supported and use POSIX style locks.
+  ** Otherwise fall back to the named semaphore method.
+  */
+  lockInfo.l_len = 1;
+  lockInfo.l_start = 0;
+  lockInfo.l_whence = SEEK_SET;
+  lockInfo.l_type = F_RDLCK;
+  if( osFcntl(pNew->h, F_GETLK, &lockInfo)!=-1 ) {
+    return &posixIoMethods;
+  }else{
+    return &semIoMethods;
+  }
+}
+static const sqlite3_io_methods 
+  *(*const autolockIoFinder)(const char*,unixFile*) = autolockIoFinderImpl;
+
+#endif /* OS_VXWORKS && SQLITE_ENABLE_LOCKING_STYLE */
+
+/*
+** An abstract type for a pointer to a IO method finder function:
+*/
+typedef const sqlite3_io_methods *(*finder_type)(const char*,unixFile*);
+
+
+/****************************************************************************
+**************************** sqlite3_vfs methods ****************************
+**
+** This division contains the implementation of methods on the
+** sqlite3_vfs object.
+*/
+
+/*
+** Initialize the contents of the unixFile structure pointed to by pId.
+*/
+static int fillInUnixFile(
+  sqlite3_vfs *pVfs,      /* Pointer to vfs object */
+  int h,                  /* Open file descriptor of file being opened */
+  int dirfd,              /* Directory file descriptor */
+  sqlite3_file *pId,      /* Write to the unixFile structure here */
+  const char *zFilename,  /* Name of the file being opened */
+  int noLock,             /* Omit locking if true */
+  int isDelete,           /* Delete on close if true */
+  int isReadOnly          /* True if the file is opened read-only */
+){
+  const sqlite3_io_methods *pLockingStyle;
+  unixFile *pNew = (unixFile *)pId;
+  int rc = SQLITE_OK;
+
+  assert( pNew->pInode==NULL );
+
+  /* Parameter isDelete is only used on vxworks. Express this explicitly 
+  ** here to prevent compiler warnings about unused parameters.
+  */
+  UNUSED_PARAMETER(isDelete);
+
+  /* Usually the path zFilename should not be a relative pathname. The
+  ** exception is when opening the proxy "conch" file in builds that
+  ** include the special Apple locking styles.
+  */
+#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
+  assert( zFilename==0 || zFilename[0]=='/' 
+    || pVfs->pAppData==(void*)&autolockIoFinder );
+#else
+  assert( zFilename==0 || zFilename[0]=='/' );
+#endif
+
+  OSTRACE(("OPEN    %-3d %s\n", h, zFilename));
+  pNew->h = h;
+  pNew->dirfd = dirfd;
+  pNew->zPath = zFilename;
+  if( memcmp(pVfs->zName,"unix-excl",10)==0 ){
+    pNew->ctrlFlags = UNIXFILE_EXCL;
+  }else{
+    pNew->ctrlFlags = 0;
+  }
+  if( isReadOnly ){
+    pNew->ctrlFlags |= UNIXFILE_RDONLY;
+  }
+
+#if OS_VXWORKS
+  pNew->pId = vxworksFindFileId(zFilename);
+  if( pNew->pId==0 ){
+    noLock = 1;
+    rc = SQLITE_NOMEM;
+  }
+#endif
+
+  if( noLock ){
+    pLockingStyle = &nolockIoMethods;
+  }else{
+    pLockingStyle = (**(finder_type*)pVfs->pAppData)(zFilename, pNew);
+#if SQLITE_ENABLE_LOCKING_STYLE
+    /* Cache zFilename in the locking context (AFP and dotlock override) for
+    ** proxyLock activation is possible (remote proxy is based on db name)
+    ** zFilename remains valid until file is closed, to support */
+    pNew->lockingContext = (void*)zFilename;
+#endif
+  }
+
+  if( pLockingStyle == &posixIoMethods
+#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
+    || pLockingStyle == &nfsIoMethods
+#endif
+  ){
+    unixEnterMutex();
+    rc = findInodeInfo(pNew, &pNew->pInode);
+    if( rc!=SQLITE_OK ){
+      /* If an error occured in findInodeInfo(), close the file descriptor
+      ** immediately, before releasing the mutex. findInodeInfo() may fail
+      ** in two scenarios:
+      **
+      **   (a) A call to fstat() failed.
+      **   (b) A malloc failed.
+      **
+      ** Scenario (b) may only occur if the process is holding no other
+      ** file descriptors open on the same file. If there were other file
+      ** descriptors on this file, then no malloc would be required by
+      ** findInodeInfo(). If this is the case, it is quite safe to close
+      ** handle h - as it is guaranteed that no posix locks will be released
+      ** by doing so.
+      **
+      ** If scenario (a) caused the error then things are not so safe. The
+      ** implicit assumption here is that if fstat() fails, things are in
+      ** such bad shape that dropping a lock or two doesn't matter much.
+      */
+      robust_close(pNew, h, __LINE__);
+      h = -1;
+    }
+    unixLeaveMutex();
+  }
+
+#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
+  else if( pLockingStyle == &afpIoMethods ){
+    /* AFP locking uses the file path so it needs to be included in
+    ** the afpLockingContext.
+    */
+    afpLockingContext *pCtx;
+    pNew->lockingContext = pCtx = sqlite3_malloc( sizeof(*pCtx) );
+    if( pCtx==0 ){
+      rc = SQLITE_NOMEM;
+    }else{
+      /* NB: zFilename exists and remains valid until the file is closed
+      ** according to requirement F11141.  So we do not need to make a
+      ** copy of the filename. */
+      pCtx->dbPath = zFilename;
+      pCtx->reserved = 0;
+      srandomdev();
+      unixEnterMutex();
+      rc = findInodeInfo(pNew, &pNew->pInode);
+      if( rc!=SQLITE_OK ){
+        sqlite3_free(pNew->lockingContext);
+        robust_close(pNew, h, __LINE__);
+        h = -1;
+      }
+      unixLeaveMutex();        
+    }
+  }
+#endif
+
+  else if( pLockingStyle == &dotlockIoMethods ){
+    /* Dotfile locking uses the file path so it needs to be included in
+    ** the dotlockLockingContext 
+    */
+    char *zLockFile;
+    int nFilename;
+    nFilename = (int)strlen(zFilename) + 6;
+    zLockFile = (char *)sqlite3_malloc(nFilename);
+    if( zLockFile==0 ){
+      rc = SQLITE_NOMEM;
+    }else{
+      sqlite3_snprintf(nFilename, zLockFile, "%s" DOTLOCK_SUFFIX, zFilename);
+    }
+    pNew->lockingContext = zLockFile;
+  }
+
+#if OS_VXWORKS
+  else if( pLockingStyle == &semIoMethods ){
+    /* Named semaphore locking uses the file path so it needs to be
+    ** included in the semLockingContext
+    */
+    unixEnterMutex();
+    rc = findInodeInfo(pNew, &pNew->pInode);
+    if( (rc==SQLITE_OK) && (pNew->pInode->pSem==NULL) ){
+      char *zSemName = pNew->pInode->aSemName;
+      int n;
+      sqlite3_snprintf(MAX_PATHNAME, zSemName, "/%s.sem",
+                       pNew->pId->zCanonicalName);
+      for( n=1; zSemName[n]; n++ )
+        if( zSemName[n]=='/' ) zSemName[n] = '_';
+      pNew->pInode->pSem = sem_open(zSemName, O_CREAT, 0666, 1);
+      if( pNew->pInode->pSem == SEM_FAILED ){
+        rc = SQLITE_NOMEM;
+        pNew->pInode->aSemName[0] = '\0';
+      }
+    }
+    unixLeaveMutex();
+  }
+#endif
+  
+  pNew->lastErrno = 0;
+#if OS_VXWORKS
+  if( rc!=SQLITE_OK ){
+    if( h>=0 ) robust_close(pNew, h, __LINE__);
+    h = -1;
+    unlink(zFilename);
+    isDelete = 0;
+  }
+  pNew->isDelete = isDelete;
+#endif
+  if( rc!=SQLITE_OK ){
+    if( dirfd>=0 ) robust_close(pNew, dirfd, __LINE__);
+    if( h>=0 ) robust_close(pNew, h, __LINE__);
+  }else{
+    pNew->pMethod = pLockingStyle;
+    OpenCounter(+1);
+  }
+  return rc;
+}
+
+/*
+** Open a file descriptor to the directory containing file zFilename.
+** If successful, *pFd is set to the opened file descriptor and
+** SQLITE_OK is returned. If an error occurs, either SQLITE_NOMEM
+** or SQLITE_CANTOPEN is returned and *pFd is set to an undefined
+** value.
+**
+** If SQLITE_OK is returned, the caller is responsible for closing
+** the file descriptor *pFd using close().
+*/
+static int openDirectory(const char *zFilename, int *pFd){
+  int ii;
+  int fd = -1;
+  char zDirname[MAX_PATHNAME+1];
+
+  sqlite3_snprintf(MAX_PATHNAME, zDirname, "%s", zFilename);
+  for(ii=(int)strlen(zDirname); ii>1 && zDirname[ii]!='/'; ii--);
+  if( ii>0 ){
+    zDirname[ii] = '\0';
+    fd = robust_open(zDirname, O_RDONLY|O_BINARY, 0);
+    if( fd>=0 ){
+#ifdef FD_CLOEXEC
+      osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
+#endif
+      OSTRACE(("OPENDIR %-3d %s\n", fd, zDirname));
+    }
+  }
+  *pFd = fd;
+  return (fd>=0?SQLITE_OK:unixLogError(SQLITE_CANTOPEN_BKPT, "open", zDirname));
+}
+
+/*
+** Return the name of a directory in which to put temporary files.
+** If no suitable temporary file directory can be found, return NULL.
+*/
+static const char *unixTempFileDir(void){
+  static const char *azDirs[] = {
+     0,
+     0,
+     "/var/tmp",
+     "/usr/tmp",
+     "/tmp",
+     0        /* List terminator */
+  };
+  unsigned int i;
+  struct stat buf;
+  const char *zDir = 0;
+
+  azDirs[0] = sqlite3_temp_directory;
+  if( !azDirs[1] ) azDirs[1] = getenv("TMPDIR");
+  for(i=0; i<sizeof(azDirs)/sizeof(azDirs[0]); zDir=azDirs[i++]){
+    if( zDir==0 ) continue;
+    if( osStat(zDir, &buf) ) continue;
+    if( !S_ISDIR(buf.st_mode) ) continue;
+    if( osAccess(zDir, 07) ) continue;
+    break;
+  }
+  return zDir;
+}
+
+/*
+** Create a temporary file name in zBuf.  zBuf must be allocated
+** by the calling process and must be big enough to hold at least
+** pVfs->mxPathname bytes.
+*/
+static int unixGetTempname(int nBuf, char *zBuf){
+  static const unsigned char zChars[] =
+    "abcdefghijklmnopqrstuvwxyz"
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+    "0123456789";
+  unsigned int i, j;
+  const char *zDir;
+
+  /* It's odd to simulate an io-error here, but really this is just
+  ** using the io-error infrastructure to test that SQLite handles this
+  ** function failing. 
+  */
+  SimulateIOError( return SQLITE_IOERR );
+
+  zDir = unixTempFileDir();
+  if( zDir==0 ) zDir = ".";
+
+  /* Check that the output buffer is large enough for the temporary file 
+  ** name. If it is not, return SQLITE_ERROR.
+  */
+  if( (strlen(zDir) + strlen(SQLITE_TEMP_FILE_PREFIX) + 17) >= (size_t)nBuf ){
+    return SQLITE_ERROR;
+  }
+
+  do{
+    sqlite3_snprintf(nBuf-17, zBuf, "%s/"SQLITE_TEMP_FILE_PREFIX, zDir);
+    j = (int)strlen(zBuf);
+    sqlite3_randomness(15, &zBuf[j]);
+    for(i=0; i<15; i++, j++){
+      zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
+    }
+    zBuf[j] = 0;
+  }while( osAccess(zBuf,0)==0 );
+  return SQLITE_OK;
+}
+
+#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
+/*
+** Routine to transform a unixFile into a proxy-locking unixFile.
+** Implementation in the proxy-lock division, but used by unixOpen()
+** if SQLITE_PREFER_PROXY_LOCKING is defined.
+*/
+static int proxyTransformUnixFile(unixFile*, const char*);
+#endif
+
+/*
+** Search for an unused file descriptor that was opened on the database 
+** file (not a journal or master-journal file) identified by pathname
+** zPath with SQLITE_OPEN_XXX flags matching those passed as the second
+** argument to this function.
+**
+** Such a file descriptor may exist if a database connection was closed
+** but the associated file descriptor could not be closed because some
+** other file descriptor open on the same file is holding a file-lock.
+** Refer to comments in the unixClose() function and the lengthy comment
+** describing "Posix Advisory Locking" at the start of this file for 
+** further details. Also, ticket #4018.
+**
+** If a suitable file descriptor is found, then it is returned. If no
+** such file descriptor is located, -1 is returned.
+*/
+static UnixUnusedFd *findReusableFd(const char *zPath, int flags){
+  UnixUnusedFd *pUnused = 0;
+
+  /* Do not search for an unused file descriptor on vxworks. Not because
+  ** vxworks would not benefit from the change (it might, we're not sure),
+  ** but because no way to test it is currently available. It is better 
+  ** not to risk breaking vxworks support for the sake of such an obscure 
+  ** feature.  */
+#if !OS_VXWORKS
+  struct stat sStat;                   /* Results of stat() call */
+
+  /* A stat() call may fail for various reasons. If this happens, it is
+  ** almost certain that an open() call on the same path will also fail.
+  ** For this reason, if an error occurs in the stat() call here, it is
+  ** ignored and -1 is returned. The caller will try to open a new file
+  ** descriptor on the same path, fail, and return an error to SQLite.
+  **
+  ** Even if a subsequent open() call does succeed, the consequences of
+  ** not searching for a resusable file descriptor are not dire.  */
+  if( 0==stat(zPath, &sStat) ){
+    unixInodeInfo *pInode;
+
+    unixEnterMutex();
+    pInode = inodeList;
+    while( pInode && (pInode->fileId.dev!=sStat.st_dev
+                     || pInode->fileId.ino!=sStat.st_ino) ){
+       pInode = pInode->pNext;
+    }
+    if( pInode ){
+      UnixUnusedFd **pp;
+      for(pp=&pInode->pUnused; *pp && (*pp)->flags!=flags; pp=&((*pp)->pNext));
+      pUnused = *pp;
+      if( pUnused ){
+        *pp = pUnused->pNext;
+      }
+    }
+    unixLeaveMutex();
+  }
+#endif    /* if !OS_VXWORKS */
+  return pUnused;
+}
+
+/*
+** This function is called by unixOpen() to determine the unix permissions
+** to create new files with. If no error occurs, then SQLITE_OK is returned
+** and a value suitable for passing as the third argument to open(2) is
+** written to *pMode. If an IO error occurs, an SQLite error code is 
+** returned and the value of *pMode is not modified.
+**
+** If the file being opened is a temporary file, it is always created with
+** the octal permissions 0600 (read/writable by owner only). If the file
+** is a database or master journal file, it is created with the permissions 
+** mask SQLITE_DEFAULT_FILE_PERMISSIONS.
+**
+** Finally, if the file being opened is a WAL or regular journal file, then 
+** this function queries the file-system for the permissions on the 
+** corresponding database file and sets *pMode to this value. Whenever 
+** possible, WAL and journal files are created using the same permissions 
+** as the associated database file.
+*/
+static int findCreateFileMode(
+  const char *zPath,              /* Path of file (possibly) being created */
+  int flags,                      /* Flags passed as 4th argument to xOpen() */
+  mode_t *pMode                   /* OUT: Permissions to open file with */
+){
+  int rc = SQLITE_OK;             /* Return Code */
+  if( flags & (SQLITE_OPEN_WAL|SQLITE_OPEN_MAIN_JOURNAL) ){
+    char zDb[MAX_PATHNAME+1];     /* Database file path */
+    int nDb;                      /* Number of valid bytes in zDb */
+    struct stat sStat;            /* Output of stat() on database file */
+
+    /* zPath is a path to a WAL or journal file. The following block derives
+    ** the path to the associated database file from zPath. This block handles
+    ** the following naming conventions:
+    **
+    **   "<path to db>-journal"
+    **   "<path to db>-wal"
+    **   "<path to db>-journal-NNNN"
+    **   "<path to db>-wal-NNNN"
+    **
+    ** where NNNN is a 4 digit decimal number. The NNNN naming schemes are 
+    ** used by the test_multiplex.c module.
+    */
+    nDb = sqlite3Strlen30(zPath) - 1; 
+    while( nDb>0 && zPath[nDb]!='l' ) nDb--;
+    nDb -= ((flags & SQLITE_OPEN_WAL) ? 3 : 7);
+    memcpy(zDb, zPath, nDb);
+    zDb[nDb] = '\0';
+
+    if( 0==stat(zDb, &sStat) ){
+      *pMode = sStat.st_mode & 0777;
+    }else{
+      rc = SQLITE_IOERR_FSTAT;
+    }
+  }else if( flags & SQLITE_OPEN_DELETEONCLOSE ){
+    *pMode = 0600;
+  }else{
+    *pMode = SQLITE_DEFAULT_FILE_PERMISSIONS;
+  }
+  return rc;
+}
+
+/*
+** Open the file zPath.
+** 
+** Previously, the SQLite OS layer used three functions in place of this
+** one:
+**
+**     sqlite3OsOpenReadWrite();
+**     sqlite3OsOpenReadOnly();
+**     sqlite3OsOpenExclusive();
+**
+** These calls correspond to the following combinations of flags:
+**
+**     ReadWrite() ->     (READWRITE | CREATE)
+**     ReadOnly()  ->     (READONLY) 
+**     OpenExclusive() -> (READWRITE | CREATE | EXCLUSIVE)
+**
+** The old OpenExclusive() accepted a boolean argument - "delFlag". If
+** true, the file was configured to be automatically deleted when the
+** file handle closed. To achieve the same effect using this new 
+** interface, add the DELETEONCLOSE flag to those specified above for 
+** OpenExclusive().
+*/
+static int unixOpen(
+  sqlite3_vfs *pVfs,           /* The VFS for which this is the xOpen method */
+  const char *zPath,           /* Pathname of file to be opened */
+  sqlite3_file *pFile,         /* The file descriptor to be filled in */
+  int flags,                   /* Input flags to control the opening */
+  int *pOutFlags               /* Output flags returned to SQLite core */
+){
+  unixFile *p = (unixFile *)pFile;
+  int fd = -1;                   /* File descriptor returned by open() */
+  int dirfd = -1;                /* Directory file descriptor */
+  int openFlags = 0;             /* Flags to pass to open() */
+  int eType = flags&0xFFFFFF00;  /* Type of file to open */
+  int noLock;                    /* True to omit locking primitives */
+  int rc = SQLITE_OK;            /* Function Return Code */
+
+  int isExclusive  = (flags & SQLITE_OPEN_EXCLUSIVE);
+  int isDelete     = (flags & SQLITE_OPEN_DELETEONCLOSE);
+  int isCreate     = (flags & SQLITE_OPEN_CREATE);
+  int isReadonly   = (flags & SQLITE_OPEN_READONLY);
+  int isReadWrite  = (flags & SQLITE_OPEN_READWRITE);
+#if SQLITE_ENABLE_LOCKING_STYLE
+  int isAutoProxy  = (flags & SQLITE_OPEN_AUTOPROXY);
+#endif
+
+  /* If creating a master or main-file journal, this function will open
+  ** a file-descriptor on the directory too. The first time unixSync()
+  ** is called the directory file descriptor will be fsync()ed and close()d.
+  */
+  int isOpenDirectory = (isCreate && (
+        eType==SQLITE_OPEN_MASTER_JOURNAL 
+     || eType==SQLITE_OPEN_MAIN_JOURNAL 
+     || eType==SQLITE_OPEN_WAL
+  ));
+
+  /* If argument zPath is a NULL pointer, this function is required to open
+  ** a temporary file. Use this buffer to store the file name in.
+  */
+  char zTmpname[MAX_PATHNAME+1];
+  const char *zName = zPath;
+
+  /* Check the following statements are true: 
+  **
+  **   (a) Exactly one of the READWRITE and READONLY flags must be set, and 
+  **   (b) if CREATE is set, then READWRITE must also be set, and
+  **   (c) if EXCLUSIVE is set, then CREATE must also be set.
+  **   (d) if DELETEONCLOSE is set, then CREATE must also be set.
+  */
+  assert((isReadonly==0 || isReadWrite==0) && (isReadWrite || isReadonly));
+  assert(isCreate==0 || isReadWrite);
+  assert(isExclusive==0 || isCreate);
+  assert(isDelete==0 || isCreate);
+
+  /* The main DB, main journal, WAL file and master journal are never 
+  ** automatically deleted. Nor are they ever temporary files.  */
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );
+
+  /* Assert that the upper layer has set one of the "file-type" flags. */
+  assert( eType==SQLITE_OPEN_MAIN_DB      || eType==SQLITE_OPEN_TEMP_DB 
+       || eType==SQLITE_OPEN_MAIN_JOURNAL || eType==SQLITE_OPEN_TEMP_JOURNAL 
+       || eType==SQLITE_OPEN_SUBJOURNAL   || eType==SQLITE_OPEN_MASTER_JOURNAL 
+       || eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL
+  );
+
+  memset(p, 0, sizeof(unixFile));
+
+  if( eType==SQLITE_OPEN_MAIN_DB ){
+    UnixUnusedFd *pUnused;
+    pUnused = findReusableFd(zName, flags);
+    if( pUnused ){
+      fd = pUnused->fd;
+    }else{
+      pUnused = sqlite3_malloc(sizeof(*pUnused));
+      if( !pUnused ){
+        return SQLITE_NOMEM;
+      }
+    }
+    p->pUnused = pUnused;
+  }else if( !zName ){
+    /* If zName is NULL, the upper layer is requesting a temp file. */
+    assert(isDelete && !isOpenDirectory);
+    rc = unixGetTempname(MAX_PATHNAME+1, zTmpname);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+    zName = zTmpname;
+  }
+
+  /* Determine the value of the flags parameter passed to POSIX function
+  ** open(). These must be calculated even if open() is not called, as
+  ** they may be stored as part of the file handle and used by the 
+  ** 'conch file' locking functions later on.  */
+  if( isReadonly )  openFlags |= O_RDONLY;
+  if( isReadWrite ) openFlags |= O_RDWR;
+  if( isCreate )    openFlags |= O_CREAT;
+  if( isExclusive ) openFlags |= (O_EXCL|O_NOFOLLOW);
+  openFlags |= (O_LARGEFILE|O_BINARY);
+
+  if( fd<0 ){
+    mode_t openMode;              /* Permissions to create file with */
+    rc = findCreateFileMode(zName, flags, &openMode);
+    if( rc!=SQLITE_OK ){
+      assert( !p->pUnused );
+      assert( eType==SQLITE_OPEN_WAL || eType==SQLITE_OPEN_MAIN_JOURNAL );
+      return rc;
+    }
+    fd = robust_open(zName, openFlags, openMode);
+    OSTRACE(("OPENX   %-3d %s 0%o\n", fd, zName, openFlags));
+    if( fd<0 && errno!=EISDIR && isReadWrite && !isExclusive ){
+      /* Failed to open the file for read/write access. Try read-only. */
+      flags &= ~(SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE);
+      openFlags &= ~(O_RDWR|O_CREAT);
+      flags |= SQLITE_OPEN_READONLY;
+      openFlags |= O_RDONLY;
+      isReadonly = 1;
+      fd = robust_open(zName, openFlags, openMode);
+    }
+    if( fd<0 ){
+      rc = unixLogError(SQLITE_CANTOPEN_BKPT, "open", zName);
+      goto open_finished;
+    }
+  }
+  assert( fd>=0 );
+  if( pOutFlags ){
+    *pOutFlags = flags;
+  }
+
+  if( p->pUnused ){
+    p->pUnused->fd = fd;
+    p->pUnused->flags = flags;
+  }
+
+  if( isDelete ){
+#if OS_VXWORKS
+    zPath = zName;
+#else
+    unlink(zName);
+#endif
+  }
+#if SQLITE_ENABLE_LOCKING_STYLE
+  else{
+    p->openFlags = openFlags;
+  }
+#endif
+
+  if( isOpenDirectory ){
+    rc = openDirectory(zPath, &dirfd);
+    if( rc!=SQLITE_OK ){
+      /* It is safe to close fd at this point, because it is guaranteed not
+      ** to be open on a database file. If it were open on a database file,
+      ** it would not be safe to close as this would release any locks held
+      ** on the file by this process.  */
+      assert( eType!=SQLITE_OPEN_MAIN_DB );
+      robust_close(p, fd, __LINE__);
+      goto open_finished;
+    }
+  }
+
+#ifdef FD_CLOEXEC
+  osFcntl(fd, F_SETFD, osFcntl(fd, F_GETFD, 0) | FD_CLOEXEC);
+#endif
+
+  noLock = eType!=SQLITE_OPEN_MAIN_DB;
+
+  
+#if defined(__APPLE__) || SQLITE_ENABLE_LOCKING_STYLE
+  struct statfs fsInfo;
+  if( fstatfs(fd, &fsInfo) == -1 ){
+    ((unixFile*)pFile)->lastErrno = errno;
+    if( dirfd>=0 ) robust_close(p, dirfd, __LINE__);
+    robust_close(p, fd, __LINE__);
+    return SQLITE_IOERR_ACCESS;
+  }
+  if (0 == strncmp("msdos", fsInfo.f_fstypename, 5)) {
+    ((unixFile*)pFile)->fsFlags |= SQLITE_FSFLAGS_IS_MSDOS;
+  }
+#endif
+  
+#if SQLITE_ENABLE_LOCKING_STYLE
+#if SQLITE_PREFER_PROXY_LOCKING
+  isAutoProxy = 1;
+#endif
+  if( isAutoProxy && (zPath!=NULL) && (!noLock) && pVfs->xOpen ){
+    char *envforce = getenv("SQLITE_FORCE_PROXY_LOCKING");
+    int useProxy = 0;
+
+    /* SQLITE_FORCE_PROXY_LOCKING==1 means force always use proxy, 0 means 
+    ** never use proxy, NULL means use proxy for non-local files only.  */
+    if( envforce!=NULL ){
+      useProxy = atoi(envforce)>0;
+    }else{
+      struct statfs fsInfo;
+      if( statfs(zPath, &fsInfo) == -1 ){
+        /* In theory, the close(fd) call is sub-optimal. If the file opened
+        ** with fd is a database file, and there are other connections open
+        ** on that file that are currently holding advisory locks on it,
+        ** then the call to close() will cancel those locks. In practice,
+        ** we're assuming that statfs() doesn't fail very often. At least
+        ** not while other file descriptors opened by the same process on
+        ** the same file are working.  */
+        p->lastErrno = errno;
+        if( dirfd>=0 ){
+          robust_close(p, dirfd, __LINE__);
+        }
+        robust_close(p, fd, __LINE__);
+        rc = SQLITE_IOERR_ACCESS;
+        goto open_finished;
+      }
+      useProxy = !(fsInfo.f_flags&MNT_LOCAL);
+    }
+    if( useProxy ){
+      rc = fillInUnixFile(pVfs, fd, dirfd, pFile, zPath, noLock,
+                          isDelete, isReadonly);
+      if( rc==SQLITE_OK ){
+        rc = proxyTransformUnixFile((unixFile*)pFile, ":auto:");
+        if( rc!=SQLITE_OK ){
+          /* Use unixClose to clean up the resources added in fillInUnixFile 
+          ** and clear all the structure's references.  Specifically, 
+          ** pFile->pMethods will be NULL so sqlite3OsClose will be a no-op 
+          */
+          unixClose(pFile);
+          return rc;
+        }
+      }
+      goto open_finished;
+    }
+  }
+#endif
+  
+  rc = fillInUnixFile(pVfs, fd, dirfd, pFile, zPath, noLock,
+                      isDelete, isReadonly);
+open_finished:
+  if( rc!=SQLITE_OK ){
+    sqlite3_free(p->pUnused);
+  }
+  return rc;
+}
+
+
+/*
+** Delete the file at zPath. If the dirSync argument is true, fsync()
+** the directory after deleting the file.
+*/
+static int unixDelete(
+  sqlite3_vfs *NotUsed,     /* VFS containing this as the xDelete method */
+  const char *zPath,        /* Name of file to be deleted */
+  int dirSync               /* If true, fsync() directory after deleting file */
+){
+  int rc = SQLITE_OK;
+  UNUSED_PARAMETER(NotUsed);
+  SimulateIOError(return SQLITE_IOERR_DELETE);
+  if( unlink(zPath)==(-1) && errno!=ENOENT ){
+    return unixLogError(SQLITE_IOERR_DELETE, "unlink", zPath);
+  }
+#ifndef SQLITE_DISABLE_DIRSYNC
+  if( dirSync ){
+    int fd;
+    rc = openDirectory(zPath, &fd);
+    if( rc==SQLITE_OK ){
+#if OS_VXWORKS
+      if( fsync(fd)==-1 )
+#else
+      if( fsync(fd) )
+#endif
+      {
+        rc = unixLogError(SQLITE_IOERR_DIR_FSYNC, "fsync", zPath);
+      }
+      robust_close(0, fd, __LINE__);
+    }
+  }
+#endif
+  return rc;
+}
+
+/*
+** Test the existance of or access permissions of file zPath. The
+** test performed depends on the value of flags:
+**
+**     SQLITE_ACCESS_EXISTS: Return 1 if the file exists
+**     SQLITE_ACCESS_READWRITE: Return 1 if the file is read and writable.
+**     SQLITE_ACCESS_READONLY: Return 1 if the file is readable.
+**
+** Otherwise return 0.
+*/
+static int unixAccess(
+  sqlite3_vfs *NotUsed,   /* The VFS containing this xAccess method */
+  const char *zPath,      /* Path of the file to examine */
+  int flags,              /* What do we want to learn about the zPath file? */
+  int *pResOut            /* Write result boolean here */
+){
+  int amode = 0;
+  UNUSED_PARAMETER(NotUsed);
+  SimulateIOError( return SQLITE_IOERR_ACCESS; );
+  switch( flags ){
+    case SQLITE_ACCESS_EXISTS:
+      amode = F_OK;
+      break;
+    case SQLITE_ACCESS_READWRITE:
+      amode = W_OK|R_OK;
+      break;
+    case SQLITE_ACCESS_READ:
+      amode = R_OK;
+      break;
+
+    default:
+      assert(!"Invalid flags argument");
+  }
+  *pResOut = (osAccess(zPath, amode)==0);
+  if( flags==SQLITE_ACCESS_EXISTS && *pResOut ){
+    struct stat buf;
+    if( 0==stat(zPath, &buf) && buf.st_size==0 ){
+      *pResOut = 0;
+    }
+  }
+  return SQLITE_OK;
+}
+
+
+/*
+** Turn a relative pathname into a full pathname. The relative path
+** is stored as a nul-terminated string in the buffer pointed to by
+** zPath. 
+**
+** zOut points to a buffer of at least sqlite3_vfs.mxPathname bytes 
+** (in this case, MAX_PATHNAME bytes). The full-path is written to
+** this buffer before returning.
+*/
+static int unixFullPathname(
+  sqlite3_vfs *pVfs,            /* Pointer to vfs object */
+  const char *zPath,            /* Possibly relative input path */
+  int nOut,                     /* Size of output buffer in bytes */
+  char *zOut                    /* Output buffer */
+){
+
+  /* It's odd to simulate an io-error here, but really this is just
+  ** using the io-error infrastructure to test that SQLite handles this
+  ** function failing. This function could fail if, for example, the
+  ** current working directory has been unlinked.
+  */
+  SimulateIOError( return SQLITE_ERROR );
+
+  assert( pVfs->mxPathname==MAX_PATHNAME );
+  UNUSED_PARAMETER(pVfs);
+
+  zOut[nOut-1] = '\0';
+  if( zPath[0]=='/' ){
+    sqlite3_snprintf(nOut, zOut, "%s", zPath);
+  }else{
+    int nCwd;
+    if( osGetcwd(zOut, nOut-1)==0 ){
+      return unixLogError(SQLITE_CANTOPEN_BKPT, "getcwd", zPath);
+    }
+    nCwd = (int)strlen(zOut);
+    sqlite3_snprintf(nOut-nCwd, &zOut[nCwd], "/%s", zPath);
+  }
+  return SQLITE_OK;
+}
+
+
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
+/*
+** Interfaces for opening a shared library, finding entry points
+** within the shared library, and closing the shared library.
+*/
+#include <dlfcn.h>
+static void *unixDlOpen(sqlite3_vfs *NotUsed, const char *zFilename){
+  UNUSED_PARAMETER(NotUsed);
+  return dlopen(zFilename, RTLD_NOW | RTLD_GLOBAL);
+}
+
+/*
+** SQLite calls this function immediately after a call to unixDlSym() or
+** unixDlOpen() fails (returns a null pointer). If a more detailed error
+** message is available, it is written to zBufOut. If no error message
+** is available, zBufOut is left unmodified and SQLite uses a default
+** error message.
+*/
+static void unixDlError(sqlite3_vfs *NotUsed, int nBuf, char *zBufOut){
+  const char *zErr;
+  UNUSED_PARAMETER(NotUsed);
+  unixEnterMutex();
+  zErr = dlerror();
+  if( zErr ){
+    sqlite3_snprintf(nBuf, zBufOut, "%s", zErr);
+  }
+  unixLeaveMutex();
+}
+static void (*unixDlSym(sqlite3_vfs *NotUsed, void *p, const char*zSym))(void){
+  /* 
+  ** GCC with -pedantic-errors says that C90 does not allow a void* to be
+  ** cast into a pointer to a function.  And yet the library dlsym() routine
+  ** returns a void* which is really a pointer to a function.  So how do we
+  ** use dlsym() with -pedantic-errors?
+  **
+  ** Variable x below is defined to be a pointer to a function taking
+  ** parameters void* and const char* and returning a pointer to a function.
+  ** We initialize x by assigning it a pointer to the dlsym() function.
+  ** (That assignment requires a cast.)  Then we call the function that
+  ** x points to.  
+  **
+  ** This work-around is unlikely to work correctly on any system where
+  ** you really cannot cast a function pointer into void*.  But then, on the
+  ** other hand, dlsym() will not work on such a system either, so we have
+  ** not really lost anything.
+  */
+  void (*(*x)(void*,const char*))(void);
+  UNUSED_PARAMETER(NotUsed);
+  x = (void(*(*)(void*,const char*))(void))dlsym;
+  return (*x)(p, zSym);
+}
+static void unixDlClose(sqlite3_vfs *NotUsed, void *pHandle){
+  UNUSED_PARAMETER(NotUsed);
+  dlclose(pHandle);
+}
+#else /* if SQLITE_OMIT_LOAD_EXTENSION is defined: */
+  #define unixDlOpen  0
+  #define unixDlError 0
+  #define unixDlSym   0
+  #define unixDlClose 0
+#endif
+
+/*
+** Write nBuf bytes of random data to the supplied buffer zBuf.
+*/
+static int unixRandomness(sqlite3_vfs *NotUsed, int nBuf, char *zBuf){
+  UNUSED_PARAMETER(NotUsed);
+  assert((size_t)nBuf>=(sizeof(time_t)+sizeof(int)));
+
+  /* We have to initialize zBuf to prevent valgrind from reporting
+  ** errors.  The reports issued by valgrind are incorrect - we would
+  ** prefer that the randomness be increased by making use of the
+  ** uninitialized space in zBuf - but valgrind errors tend to worry
+  ** some users.  Rather than argue, it seems easier just to initialize
+  ** the whole array and silence valgrind, even if that means less randomness
+  ** in the random seed.
+  **
+  ** When testing, initializing zBuf[] to zero is all we do.  That means
+  ** that we always use the same random number sequence.  This makes the
+  ** tests repeatable.
+  */
+  memset(zBuf, 0, nBuf);
+#if !defined(SQLITE_TEST)
+  {
+    int pid, fd;
+    fd = robust_open("/dev/urandom", O_RDONLY, 0);
+    if( fd<0 ){
+      time_t t;
+      time(&t);
+      memcpy(zBuf, &t, sizeof(t));
+      pid = getpid();
+      memcpy(&zBuf[sizeof(t)], &pid, sizeof(pid));
+      assert( sizeof(t)+sizeof(pid)<=(size_t)nBuf );
+      nBuf = sizeof(t) + sizeof(pid);
+    }else{
+      do{ nBuf = osRead(fd, zBuf, nBuf); }while( nBuf<0 && errno==EINTR );
+      robust_close(0, fd, __LINE__);
+    }
+  }
+#endif
+  return nBuf;
+}
+
+
+/*
+** Sleep for a little while.  Return the amount of time slept.
+** The argument is the number of microseconds we want to sleep.
+** The return value is the number of microseconds of sleep actually
+** requested from the underlying operating system, a number which
+** might be greater than or equal to the argument, but not less
+** than the argument.
+*/
+static int unixSleep(sqlite3_vfs *NotUsed, int microseconds){
+#if OS_VXWORKS
+  struct timespec sp;
+
+  sp.tv_sec = microseconds / 1000000;
+  sp.tv_nsec = (microseconds % 1000000) * 1000;
+  nanosleep(&sp, NULL);
+  UNUSED_PARAMETER(NotUsed);
+  return microseconds;
+#elif defined(HAVE_USLEEP) && HAVE_USLEEP
+  usleep(microseconds);
+  UNUSED_PARAMETER(NotUsed);
+  return microseconds;
+#else
+  int seconds = (microseconds+999999)/1000000;
+  sleep(seconds);
+  UNUSED_PARAMETER(NotUsed);
+  return seconds*1000000;
+#endif
+}
+
+/*
+** The following variable, if set to a non-zero value, is interpreted as
+** the number of seconds since 1970 and is used to set the result of
+** sqlite3OsCurrentTime() during testing.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_current_time = 0;  /* Fake system time in seconds since 1970. */
+#endif
+
+/*
+** Find the current time (in Universal Coordinated Time).  Write into *piNow
+** the current time and date as a Julian Day number times 86_400_000.  In
+** other words, write into *piNow the number of milliseconds since the Julian
+** epoch of noon in Greenwich on November 24, 4714 B.C according to the
+** proleptic Gregorian calendar.
+**
+** On success, return 0.  Return 1 if the time and date cannot be found.
+*/
+static int unixCurrentTimeInt64(sqlite3_vfs *NotUsed, sqlite3_int64 *piNow){
+  static const sqlite3_int64 unixEpoch = 24405875*(sqlite3_int64)8640000;
+#if defined(NO_GETTOD)
+  time_t t;
+  time(&t);
+  *piNow = ((sqlite3_int64)t)*1000 + unixEpoch;
+#elif OS_VXWORKS
+  struct timespec sNow;
+  clock_gettime(CLOCK_REALTIME, &sNow);
+  *piNow = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_nsec/1000000;
+#else
+  struct timeval sNow;
+  gettimeofday(&sNow, 0);
+  *piNow = unixEpoch + 1000*(sqlite3_int64)sNow.tv_sec + sNow.tv_usec/1000;
+#endif
+
+#ifdef SQLITE_TEST
+  if( sqlite3_current_time ){
+    *piNow = 1000*(sqlite3_int64)sqlite3_current_time + unixEpoch;
+  }
+#endif
+  UNUSED_PARAMETER(NotUsed);
+  return 0;
+}
+
+/*
+** Find the current time (in Universal Coordinated Time).  Write the
+** current time and date as a Julian Day number into *prNow and
+** return 0.  Return 1 if the time and date cannot be found.
+*/
+static int unixCurrentTime(sqlite3_vfs *NotUsed, double *prNow){
+  sqlite3_int64 i;
+  UNUSED_PARAMETER(NotUsed);
+  unixCurrentTimeInt64(0, &i);
+  *prNow = i/86400000.0;
+  return 0;
+}
+
+/*
+** We added the xGetLastError() method with the intention of providing
+** better low-level error messages when operating-system problems come up
+** during SQLite operation.  But so far, none of that has been implemented
+** in the core.  So this routine is never called.  For now, it is merely
+** a place-holder.
+*/
+static int unixGetLastError(sqlite3_vfs *NotUsed, int NotUsed2, char *NotUsed3){
+  UNUSED_PARAMETER(NotUsed);
+  UNUSED_PARAMETER(NotUsed2);
+  UNUSED_PARAMETER(NotUsed3);
+  return 0;
+}
+
+
+/*
+************************ End of sqlite3_vfs methods ***************************
+******************************************************************************/
+
+/******************************************************************************
+************************** Begin Proxy Locking ********************************
+**
+** Proxy locking is a "uber-locking-method" in this sense:  It uses the
+** other locking methods on secondary lock files.  Proxy locking is a
+** meta-layer over top of the primitive locking implemented above.  For
+** this reason, the division that implements of proxy locking is deferred
+** until late in the file (here) after all of the other I/O methods have
+** been defined - so that the primitive locking methods are available
+** as services to help with the implementation of proxy locking.
+**
+****
+**
+** The default locking schemes in SQLite use byte-range locks on the
+** database file to coordinate safe, concurrent access by multiple readers
+** and writers [http://sqlite.org/lockingv3.html].  The five file locking
+** states (UNLOCKED, PENDING, SHARED, RESERVED, EXCLUSIVE) are implemented
+** as POSIX read & write locks over fixed set of locations (via fsctl),
+** on AFP and SMB only exclusive byte-range locks are available via fsctl
+** with _IOWR('z', 23, struct ByteRangeLockPB2) to track the same 5 states.
+** To simulate a F_RDLCK on the shared range, on AFP a randomly selected
+** address in the shared range is taken for a SHARED lock, the entire
+** shared range is taken for an EXCLUSIVE lock):
+**
+**      PENDING_BYTE        0x40000000		   	
+**      RESERVED_BYTE       0x40000001
+**      SHARED_RANGE        0x40000002 -> 0x40000200
+**
+** This works well on the local file system, but shows a nearly 100x
+** slowdown in read performance on AFP because the AFP client disables
+** the read cache when byte-range locks are present.  Enabling the read
+** cache exposes a cache coherency problem that is present on all OS X
+** supported network file systems.  NFS and AFP both observe the
+** close-to-open semantics for ensuring cache coherency
+** [http://nfs.sourceforge.net/#faq_a8], which does not effectively
+** address the requirements for concurrent database access by multiple
+** readers and writers
+** [http://www.nabble.com/SQLite-on-NFS-cache-coherency-td15655701.html].
+**
+** To address the performance and cache coherency issues, proxy file locking
+** changes the way database access is controlled by limiting access to a
+** single host at a time and moving file locks off of the database file
+** and onto a proxy file on the local file system.  
+**
+**
+** Using proxy locks
+** -----------------
+**
+** C APIs
+**
+**  sqlite3_file_control(db, dbname, SQLITE_SET_LOCKPROXYFILE,
+**                       <proxy_path> | ":auto:");
+**  sqlite3_file_control(db, dbname, SQLITE_GET_LOCKPROXYFILE, &<proxy_path>);
+**
+**
+** SQL pragmas
+**
+**  PRAGMA [database.]lock_proxy_file=<proxy_path> | :auto:
+**  PRAGMA [database.]lock_proxy_file
+**
+** Specifying ":auto:" means that if there is a conch file with a matching
+** host ID in it, the proxy path in the conch file will be used, otherwise
+** a proxy path based on the user's temp dir
+** (via confstr(_CS_DARWIN_USER_TEMP_DIR,...)) will be used and the
+** actual proxy file name is generated from the name and path of the
+** database file.  For example:
+**
+**       For database path "/Users/me/foo.db" 
+**       The lock path will be "<tmpdir>/sqliteplocks/_Users_me_foo.db:auto:")
+**
+** Once a lock proxy is configured for a database connection, it can not
+** be removed, however it may be switched to a different proxy path via
+** the above APIs (assuming the conch file is not being held by another
+** connection or process). 
+**
+**
+** How proxy locking works
+** -----------------------
+**
+** Proxy file locking relies primarily on two new supporting files: 
+**
+**   *  conch file to limit access to the database file to a single host
+**      at a time
+**
+**   *  proxy file to act as a proxy for the advisory locks normally
+**      taken on the database
+**
+** The conch file - to use a proxy file, sqlite must first "hold the conch"
+** by taking an sqlite-style shared lock on the conch file, reading the
+** contents and comparing the host's unique host ID (see below) and lock
+** proxy path against the values stored in the conch.  The conch file is
+** stored in the same directory as the database file and the file name
+** is patterned after the database file name as ".<databasename>-conch".
+** If the conch file does not exist, or it's contents do not match the
+** host ID and/or proxy path, then the lock is escalated to an exclusive
+** lock and the conch file contents is updated with the host ID and proxy
+** path and the lock is downgraded to a shared lock again.  If the conch
+** is held by another process (with a shared lock), the exclusive lock
+** will fail and SQLITE_BUSY is returned.
+**
+** The proxy file - a single-byte file used for all advisory file locks
+** normally taken on the database file.   This allows for safe sharing
+** of the database file for multiple readers and writers on the same
+** host (the conch ensures that they all use the same local lock file).
+**
+** Requesting the lock proxy does not immediately take the conch, it is
+** only taken when the first request to lock database file is made.  
+** This matches the semantics of the traditional locking behavior, where
+** opening a connection to a database file does not take a lock on it.
+** The shared lock and an open file descriptor are maintained until 
+** the connection to the database is closed. 
+**
+** The proxy file and the lock file are never deleted so they only need
+** to be created the first time they are used.
+**
+** Configuration options
+** ---------------------
+**
+**  SQLITE_PREFER_PROXY_LOCKING
+**
+**       Database files accessed on non-local file systems are
+**       automatically configured for proxy locking, lock files are
+**       named automatically using the same logic as
+**       PRAGMA lock_proxy_file=":auto:"
+**    
+**  SQLITE_PROXY_DEBUG
+**
+**       Enables the logging of error messages during host id file
+**       retrieval and creation
+**
+**  LOCKPROXYDIR
+**
+**       Overrides the default directory used for lock proxy files that
+**       are named automatically via the ":auto:" setting
+**
+**  SQLITE_DEFAULT_PROXYDIR_PERMISSIONS
+**
+**       Permissions to use when creating a directory for storing the
+**       lock proxy files, only used when LOCKPROXYDIR is not set.
+**    
+**    
+** As mentioned above, when compiled with SQLITE_PREFER_PROXY_LOCKING,
+** setting the environment variable SQLITE_FORCE_PROXY_LOCKING to 1 will
+** force proxy locking to be used for every database file opened, and 0
+** will force automatic proxy locking to be disabled for all database
+** files (explicity calling the SQLITE_SET_LOCKPROXYFILE pragma or
+** sqlite_file_control API is not affected by SQLITE_FORCE_PROXY_LOCKING).
+*/
+
+/*
+** Proxy locking is only available on MacOSX 
+*/
+#if defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE
+
+/*
+** The proxyLockingContext has the path and file structures for the remote 
+** and local proxy files in it
+*/
+typedef struct proxyLockingContext proxyLockingContext;
+struct proxyLockingContext {
+  unixFile *conchFile;         /* Open conch file */
+  char *conchFilePath;         /* Name of the conch file */
+  unixFile *lockProxy;         /* Open proxy lock file */
+  char *lockProxyPath;         /* Name of the proxy lock file */
+  char *dbPath;                /* Name of the open file */
+  int conchHeld;               /* 1 if the conch is held, -1 if lockless */
+  void *oldLockingContext;     /* Original lockingcontext to restore on close */
+  sqlite3_io_methods const *pOldMethod;     /* Original I/O methods for close */
+};
+
+/* 
+** The proxy lock file path for the database at dbPath is written into lPath, 
+** which must point to valid, writable memory large enough for a maxLen length
+** file path. 
+*/
+static int proxyGetLockPath(const char *dbPath, char *lPath, size_t maxLen){
+  int len;
+  int dbLen;
+  int i;
+
+#ifdef LOCKPROXYDIR
+  len = strlcpy(lPath, LOCKPROXYDIR, maxLen);
+#else
+# ifdef _CS_DARWIN_USER_TEMP_DIR
+  {
+    if( !confstr(_CS_DARWIN_USER_TEMP_DIR, lPath, maxLen) ){
+      OSTRACE(("GETLOCKPATH  failed %s errno=%d pid=%d\n",
+               lPath, errno, getpid()));
+      return SQLITE_IOERR_LOCK;
+    }
+    len = strlcat(lPath, "sqliteplocks", maxLen);    
+  }
+# else
+  len = strlcpy(lPath, "/tmp/", maxLen);
+# endif
+#endif
+
+  if( lPath[len-1]!='/' ){
+    len = strlcat(lPath, "/", maxLen);
+  }
+  
+  /* transform the db path to a unique cache name */
+  dbLen = (int)strlen(dbPath);
+  for( i=0; i<dbLen && (i+len+7)<(int)maxLen; i++){
+    char c = dbPath[i];
+    lPath[i+len] = (c=='/')?'_':c;
+  }
+  lPath[i+len]='\0';
+  strlcat(lPath, ":auto:", maxLen);
+  OSTRACE(("GETLOCKPATH  proxy lock path=%s pid=%d\n", lPath, getpid()));
+  return SQLITE_OK;
+}
+
+/* 
+ ** Creates the lock file and any missing directories in lockPath
+ */
+static int proxyCreateLockPath(const char *lockPath){
+  int i, len;
+  char buf[MAXPATHLEN];
+  int start = 0;
+  
+  assert(lockPath!=NULL);
+  /* try to create all the intermediate directories */
+  len = (int)strlen(lockPath);
+  buf[0] = lockPath[0];
+  for( i=1; i<len; i++ ){
+    if( lockPath[i] == '/' && (i - start > 0) ){
+      /* only mkdir if leaf dir != "." or "/" or ".." */
+      if( i-start>2 || (i-start==1 && buf[start] != '.' && buf[start] != '/') 
+         || (i-start==2 && buf[start] != '.' && buf[start+1] != '.') ){
+        buf[i]='\0';
+        if( mkdir(buf, SQLITE_DEFAULT_PROXYDIR_PERMISSIONS) ){
+          int err=errno;
+          if( err!=EEXIST ) {
+            OSTRACE(("CREATELOCKPATH  FAILED creating %s, "
+                     "'%s' proxy lock path=%s pid=%d\n",
+                     buf, strerror(err), lockPath, getpid()));
+            return err;
+          }
+        }
+      }
+      start=i+1;
+    }
+    buf[i] = lockPath[i];
+  }
+  OSTRACE(("CREATELOCKPATH  proxy lock path=%s pid=%d\n", lockPath, getpid()));
+  return 0;
+}
+
+/*
+** Create a new VFS file descriptor (stored in memory obtained from
+** sqlite3_malloc) and open the file named "path" in the file descriptor.
+**
+** The caller is responsible not only for closing the file descriptor
+** but also for freeing the memory associated with the file descriptor.
+*/
+static int proxyCreateUnixFile(
+    const char *path,        /* path for the new unixFile */
+    unixFile **ppFile,       /* unixFile created and returned by ref */
+    int islockfile           /* if non zero missing dirs will be created */
+) {
+  int fd = -1;
+  int dirfd = -1;
+  unixFile *pNew;
+  int rc = SQLITE_OK;
+  int openFlags = O_RDWR | O_CREAT;
+  sqlite3_vfs dummyVfs;
+  int terrno = 0;
+  UnixUnusedFd *pUnused = NULL;
+
+  /* 1. first try to open/create the file
+  ** 2. if that fails, and this is a lock file (not-conch), try creating
+  ** the parent directories and then try again.
+  ** 3. if that fails, try to open the file read-only
+  ** otherwise return BUSY (if lock file) or CANTOPEN for the conch file
+  */
+  pUnused = findReusableFd(path, openFlags);
+  if( pUnused ){
+    fd = pUnused->fd;
+  }else{
+    pUnused = sqlite3_malloc(sizeof(*pUnused));
+    if( !pUnused ){
+      return SQLITE_NOMEM;
+    }
+  }
+  if( fd<0 ){
+    fd = robust_open(path, openFlags, SQLITE_DEFAULT_FILE_PERMISSIONS);
+    terrno = errno;
+    if( fd<0 && errno==ENOENT && islockfile ){
+      if( proxyCreateLockPath(path) == SQLITE_OK ){
+        fd = robust_open(path, openFlags, SQLITE_DEFAULT_FILE_PERMISSIONS);
+      }
+    }
+  }
+  if( fd<0 ){
+    openFlags = O_RDONLY;
+    fd = robust_open(path, openFlags, SQLITE_DEFAULT_FILE_PERMISSIONS);
+    terrno = errno;
+  }
+  if( fd<0 ){
+    if( islockfile ){
+      return SQLITE_BUSY;
+    }
+    switch (terrno) {
+      case EACCES:
+        return SQLITE_PERM;
+      case EIO: 
+        return SQLITE_IOERR_LOCK; /* even though it is the conch */
+      default:
+        return SQLITE_CANTOPEN_BKPT;
+    }
+  }
+  
+  pNew = (unixFile *)sqlite3_malloc(sizeof(*pNew));
+  if( pNew==NULL ){
+    rc = SQLITE_NOMEM;
+    goto end_create_proxy;
+  }
+  memset(pNew, 0, sizeof(unixFile));
+  pNew->openFlags = openFlags;
+  memset(&dummyVfs, 0, sizeof(dummyVfs));
+  dummyVfs.pAppData = (void*)&autolockIoFinder;
+  dummyVfs.zName = "dummy";
+  pUnused->fd = fd;
+  pUnused->flags = openFlags;
+  pNew->pUnused = pUnused;
+  
+  rc = fillInUnixFile(&dummyVfs, fd, dirfd, (sqlite3_file*)pNew, path, 0, 0, 0);
+  if( rc==SQLITE_OK ){
+    *ppFile = pNew;
+    return SQLITE_OK;
+  }
+end_create_proxy:    
+  robust_close(pNew, fd, __LINE__);
+  sqlite3_free(pNew);
+  sqlite3_free(pUnused);
+  return rc;
+}
+
+#ifdef SQLITE_TEST
+/* simulate multiple hosts by creating unique hostid file paths */
+SQLITE_API int sqlite3_hostid_num = 0;
+#endif
+
+#define PROXY_HOSTIDLEN    16  /* conch file host id length */
+
+/* Not always defined in the headers as it ought to be */
+extern int gethostuuid(uuid_t id, const struct timespec *wait);
+
+/* get the host ID via gethostuuid(), pHostID must point to PROXY_HOSTIDLEN 
+** bytes of writable memory.
+*/
+static int proxyGetHostID(unsigned char *pHostID, int *pError){
+  assert(PROXY_HOSTIDLEN == sizeof(uuid_t));
+  memset(pHostID, 0, PROXY_HOSTIDLEN);
+#if defined(__MAX_OS_X_VERSION_MIN_REQUIRED)\
+               && __MAC_OS_X_VERSION_MIN_REQUIRED<1050
+  {
+    static const struct timespec timeout = {1, 0}; /* 1 sec timeout */
+    if( gethostuuid(pHostID, &timeout) ){
+      int err = errno;
+      if( pError ){
+        *pError = err;
+      }
+      return SQLITE_IOERR;
+    }
+  }
+#endif
+#ifdef SQLITE_TEST
+  /* simulate multiple hosts by creating unique hostid file paths */
+  if( sqlite3_hostid_num != 0){
+    pHostID[0] = (char)(pHostID[0] + (char)(sqlite3_hostid_num & 0xFF));
+  }
+#endif
+  
+  return SQLITE_OK;
+}
+
+/* The conch file contains the header, host id and lock file path
+ */
+#define PROXY_CONCHVERSION 2   /* 1-byte header, 16-byte host id, path */
+#define PROXY_HEADERLEN    1   /* conch file header length */
+#define PROXY_PATHINDEX    (PROXY_HEADERLEN+PROXY_HOSTIDLEN)
+#define PROXY_MAXCONCHLEN  (PROXY_HEADERLEN+PROXY_HOSTIDLEN+MAXPATHLEN)
+
+/* 
+** Takes an open conch file, copies the contents to a new path and then moves 
+** it back.  The newly created file's file descriptor is assigned to the
+** conch file structure and finally the original conch file descriptor is 
+** closed.  Returns zero if successful.
+*/
+static int proxyBreakConchLock(unixFile *pFile, uuid_t myHostID){
+  proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext; 
+  unixFile *conchFile = pCtx->conchFile;
+  char tPath[MAXPATHLEN];
+  char buf[PROXY_MAXCONCHLEN];
+  char *cPath = pCtx->conchFilePath;
+  size_t readLen = 0;
+  size_t pathLen = 0;
+  char errmsg[64] = "";
+  int fd = -1;
+  int rc = -1;
+  UNUSED_PARAMETER(myHostID);
+
+  /* create a new path by replace the trailing '-conch' with '-break' */
+  pathLen = strlcpy(tPath, cPath, MAXPATHLEN);
+  if( pathLen>MAXPATHLEN || pathLen<6 || 
+     (strlcpy(&tPath[pathLen-5], "break", 6) != 5) ){
+    sqlite3_snprintf(sizeof(errmsg),errmsg,"path error (len %d)",(int)pathLen);
+    goto end_breaklock;
+  }
+  /* read the conch content */
+  readLen = osPread(conchFile->h, buf, PROXY_MAXCONCHLEN, 0);
+  if( readLen<PROXY_PATHINDEX ){
+    sqlite3_snprintf(sizeof(errmsg),errmsg,"read error (len %d)",(int)readLen);
+    goto end_breaklock;
+  }
+  /* write it out to the temporary break file */
+  fd = robust_open(tPath, (O_RDWR|O_CREAT|O_EXCL),
+                   SQLITE_DEFAULT_FILE_PERMISSIONS);
+  if( fd<0 ){
+    sqlite3_snprintf(sizeof(errmsg), errmsg, "create failed (%d)", errno);
+    goto end_breaklock;
+  }
+  if( osPwrite(fd, buf, readLen, 0) != (ssize_t)readLen ){
+    sqlite3_snprintf(sizeof(errmsg), errmsg, "write failed (%d)", errno);
+    goto end_breaklock;
+  }
+  if( rename(tPath, cPath) ){
+    sqlite3_snprintf(sizeof(errmsg), errmsg, "rename failed (%d)", errno);
+    goto end_breaklock;
+  }
+  rc = 0;
+  fprintf(stderr, "broke stale lock on %s\n", cPath);
+  robust_close(pFile, conchFile->h, __LINE__);
+  conchFile->h = fd;
+  conchFile->openFlags = O_RDWR | O_CREAT;
+
+end_breaklock:
+  if( rc ){
+    if( fd>=0 ){
+      unlink(tPath);
+      robust_close(pFile, fd, __LINE__);
+    }
+    fprintf(stderr, "failed to break stale lock on %s, %s\n", cPath, errmsg);
+  }
+  return rc;
+}
+
+/* Take the requested lock on the conch file and break a stale lock if the 
+** host id matches.
+*/
+static int proxyConchLock(unixFile *pFile, uuid_t myHostID, int lockType){
+  proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext; 
+  unixFile *conchFile = pCtx->conchFile;
+  int rc = SQLITE_OK;
+  int nTries = 0;
+  struct timespec conchModTime;
+  
+  do {
+    rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, lockType);
+    nTries ++;
+    if( rc==SQLITE_BUSY ){
+      /* If the lock failed (busy):
+       * 1st try: get the mod time of the conch, wait 0.5s and try again. 
+       * 2nd try: fail if the mod time changed or host id is different, wait 
+       *           10 sec and try again
+       * 3rd try: break the lock unless the mod time has changed.
+       */
+      struct stat buf;
+      if( osFstat(conchFile->h, &buf) ){
+        pFile->lastErrno = errno;
+        return SQLITE_IOERR_LOCK;
+      }
+      
+      if( nTries==1 ){
+        conchModTime = buf.st_mtimespec;
+        usleep(500000); /* wait 0.5 sec and try the lock again*/
+        continue;  
+      }
+
+      assert( nTries>1 );
+      if( conchModTime.tv_sec != buf.st_mtimespec.tv_sec || 
+         conchModTime.tv_nsec != buf.st_mtimespec.tv_nsec ){
+        return SQLITE_BUSY;
+      }
+      
+      if( nTries==2 ){  
+        char tBuf[PROXY_MAXCONCHLEN];
+        int len = osPread(conchFile->h, tBuf, PROXY_MAXCONCHLEN, 0);
+        if( len<0 ){
+          pFile->lastErrno = errno;
+          return SQLITE_IOERR_LOCK;
+        }
+        if( len>PROXY_PATHINDEX && tBuf[0]==(char)PROXY_CONCHVERSION){
+          /* don't break the lock if the host id doesn't match */
+          if( 0!=memcmp(&tBuf[PROXY_HEADERLEN], myHostID, PROXY_HOSTIDLEN) ){
+            return SQLITE_BUSY;
+          }
+        }else{
+          /* don't break the lock on short read or a version mismatch */
+          return SQLITE_BUSY;
+        }
+        usleep(10000000); /* wait 10 sec and try the lock again */
+        continue; 
+      }
+      
+      assert( nTries==3 );
+      if( 0==proxyBreakConchLock(pFile, myHostID) ){
+        rc = SQLITE_OK;
+        if( lockType==EXCLUSIVE_LOCK ){
+          rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, SHARED_LOCK);          
+        }
+        if( !rc ){
+          rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, lockType);
+        }
+      }
+    }
+  } while( rc==SQLITE_BUSY && nTries<3 );
+  
+  return rc;
+}
+
+/* Takes the conch by taking a shared lock and read the contents conch, if 
+** lockPath is non-NULL, the host ID and lock file path must match.  A NULL 
+** lockPath means that the lockPath in the conch file will be used if the 
+** host IDs match, or a new lock path will be generated automatically 
+** and written to the conch file.
+*/
+static int proxyTakeConch(unixFile *pFile){
+  proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext; 
+  
+  if( pCtx->conchHeld!=0 ){
+    return SQLITE_OK;
+  }else{
+    unixFile *conchFile = pCtx->conchFile;
+    uuid_t myHostID;
+    int pError = 0;
+    char readBuf[PROXY_MAXCONCHLEN];
+    char lockPath[MAXPATHLEN];
+    char *tempLockPath = NULL;
+    int rc = SQLITE_OK;
+    int createConch = 0;
+    int hostIdMatch = 0;
+    int readLen = 0;
+    int tryOldLockPath = 0;
+    int forceNewLockPath = 0;
+    
+    OSTRACE(("TAKECONCH  %d for %s pid=%d\n", conchFile->h,
+             (pCtx->lockProxyPath ? pCtx->lockProxyPath : ":auto:"), getpid()));
+
+    rc = proxyGetHostID(myHostID, &pError);
+    if( (rc&0xff)==SQLITE_IOERR ){
+      pFile->lastErrno = pError;
+      goto end_takeconch;
+    }
+    rc = proxyConchLock(pFile, myHostID, SHARED_LOCK);
+    if( rc!=SQLITE_OK ){
+      goto end_takeconch;
+    }
+    /* read the existing conch file */
+    readLen = seekAndRead((unixFile*)conchFile, 0, readBuf, PROXY_MAXCONCHLEN);
+    if( readLen<0 ){
+      /* I/O error: lastErrno set by seekAndRead */
+      pFile->lastErrno = conchFile->lastErrno;
+      rc = SQLITE_IOERR_READ;
+      goto end_takeconch;
+    }else if( readLen<=(PROXY_HEADERLEN+PROXY_HOSTIDLEN) || 
+             readBuf[0]!=(char)PROXY_CONCHVERSION ){
+      /* a short read or version format mismatch means we need to create a new 
+      ** conch file. 
+      */
+      createConch = 1;
+    }
+    /* if the host id matches and the lock path already exists in the conch
+    ** we'll try to use the path there, if we can't open that path, we'll 
+    ** retry with a new auto-generated path 
+    */
+    do { /* in case we need to try again for an :auto: named lock file */
+
+      if( !createConch && !forceNewLockPath ){
+        hostIdMatch = !memcmp(&readBuf[PROXY_HEADERLEN], myHostID, 
+                                  PROXY_HOSTIDLEN);
+        /* if the conch has data compare the contents */
+        if( !pCtx->lockProxyPath ){
+          /* for auto-named local lock file, just check the host ID and we'll
+           ** use the local lock file path that's already in there
+           */
+          if( hostIdMatch ){
+            size_t pathLen = (readLen - PROXY_PATHINDEX);
+            
+            if( pathLen>=MAXPATHLEN ){
+              pathLen=MAXPATHLEN-1;
+            }
+            memcpy(lockPath, &readBuf[PROXY_PATHINDEX], pathLen);
+            lockPath[pathLen] = 0;
+            tempLockPath = lockPath;
+            tryOldLockPath = 1;
+            /* create a copy of the lock path if the conch is taken */
+            goto end_takeconch;
+          }
+        }else if( hostIdMatch
+               && !strncmp(pCtx->lockProxyPath, &readBuf[PROXY_PATHINDEX],
+                           readLen-PROXY_PATHINDEX)
+        ){
+          /* conch host and lock path match */
+          goto end_takeconch; 
+        }
+      }
+      
+      /* if the conch isn't writable and doesn't match, we can't take it */
+      if( (conchFile->openFlags&O_RDWR) == 0 ){
+        rc = SQLITE_BUSY;
+        goto end_takeconch;
+      }
+      
+      /* either the conch didn't match or we need to create a new one */
+      if( !pCtx->lockProxyPath ){
+        proxyGetLockPath(pCtx->dbPath, lockPath, MAXPATHLEN);
+        tempLockPath = lockPath;
+        /* create a copy of the lock path _only_ if the conch is taken */
+      }
+      
+      /* update conch with host and path (this will fail if other process
+      ** has a shared lock already), if the host id matches, use the big
+      ** stick.
+      */
+      futimes(conchFile->h, NULL);
+      if( hostIdMatch && !createConch ){
+        if( conchFile->pInode && conchFile->pInode->nShared>1 ){
+          /* We are trying for an exclusive lock but another thread in this
+           ** same process is still holding a shared lock. */
+          rc = SQLITE_BUSY;
+        } else {          
+          rc = proxyConchLock(pFile, myHostID, EXCLUSIVE_LOCK);
+        }
+      }else{
+        rc = conchFile->pMethod->xLock((sqlite3_file*)conchFile, EXCLUSIVE_LOCK);
+      }
+      if( rc==SQLITE_OK ){
+        char writeBuffer[PROXY_MAXCONCHLEN];
+        int writeSize = 0;
+        
+        writeBuffer[0] = (char)PROXY_CONCHVERSION;
+        memcpy(&writeBuffer[PROXY_HEADERLEN], myHostID, PROXY_HOSTIDLEN);
+        if( pCtx->lockProxyPath!=NULL ){
+          strlcpy(&writeBuffer[PROXY_PATHINDEX], pCtx->lockProxyPath, MAXPATHLEN);
+        }else{
+          strlcpy(&writeBuffer[PROXY_PATHINDEX], tempLockPath, MAXPATHLEN);
+        }
+        writeSize = PROXY_PATHINDEX + strlen(&writeBuffer[PROXY_PATHINDEX]);
+        robust_ftruncate(conchFile->h, writeSize);
+        rc = unixWrite((sqlite3_file *)conchFile, writeBuffer, writeSize, 0);
+        fsync(conchFile->h);
+        /* If we created a new conch file (not just updated the contents of a 
+         ** valid conch file), try to match the permissions of the database 
+         */
+        if( rc==SQLITE_OK && createConch ){
+          struct stat buf;
+          int err = osFstat(pFile->h, &buf);
+          if( err==0 ){
+            mode_t cmode = buf.st_mode&(S_IRUSR|S_IWUSR | S_IRGRP|S_IWGRP |
+                                        S_IROTH|S_IWOTH);
+            /* try to match the database file R/W permissions, ignore failure */
+#ifndef SQLITE_PROXY_DEBUG
+            osFchmod(conchFile->h, cmode);
+#else
+            do{
+              rc = osFchmod(conchFile->h, cmode);
+            }while( rc==(-1) && errno==EINTR );
+            if( rc!=0 ){
+              int code = errno;
+              fprintf(stderr, "fchmod %o FAILED with %d %s\n",
+                      cmode, code, strerror(code));
+            } else {
+              fprintf(stderr, "fchmod %o SUCCEDED\n",cmode);
+            }
+          }else{
+            int code = errno;
+            fprintf(stderr, "STAT FAILED[%d] with %d %s\n", 
+                    err, code, strerror(code));
+#endif
+          }
+        }
+      }
+      conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, SHARED_LOCK);
+      
+    end_takeconch:
+      OSTRACE(("TRANSPROXY: CLOSE  %d\n", pFile->h));
+      if( rc==SQLITE_OK && pFile->openFlags ){
+        if( pFile->h>=0 ){
+          robust_close(pFile, pFile->h, __LINE__);
+        }
+        pFile->h = -1;
+        int fd = robust_open(pCtx->dbPath, pFile->openFlags,
+                      SQLITE_DEFAULT_FILE_PERMISSIONS);
+        OSTRACE(("TRANSPROXY: OPEN  %d\n", fd));
+        if( fd>=0 ){
+          pFile->h = fd;
+        }else{
+          rc=SQLITE_CANTOPEN_BKPT; /* SQLITE_BUSY? proxyTakeConch called
+           during locking */
+        }
+      }
+      if( rc==SQLITE_OK && !pCtx->lockProxy ){
+        char *path = tempLockPath ? tempLockPath : pCtx->lockProxyPath;
+        rc = proxyCreateUnixFile(path, &pCtx->lockProxy, 1);
+        if( rc!=SQLITE_OK && rc!=SQLITE_NOMEM && tryOldLockPath ){
+          /* we couldn't create the proxy lock file with the old lock file path
+           ** so try again via auto-naming 
+           */
+          forceNewLockPath = 1;
+          tryOldLockPath = 0;
+          continue; /* go back to the do {} while start point, try again */
+        }
+      }
+      if( rc==SQLITE_OK ){
+        /* Need to make a copy of path if we extracted the value
+         ** from the conch file or the path was allocated on the stack
+         */
+        if( tempLockPath ){
+          pCtx->lockProxyPath = sqlite3DbStrDup(0, tempLockPath);
+          if( !pCtx->lockProxyPath ){
+            rc = SQLITE_NOMEM;
+          }
+        }
+      }
+      if( rc==SQLITE_OK ){
+        pCtx->conchHeld = 1;
+        
+        if( pCtx->lockProxy->pMethod == &afpIoMethods ){
+          afpLockingContext *afpCtx;
+          afpCtx = (afpLockingContext *)pCtx->lockProxy->lockingContext;
+          afpCtx->dbPath = pCtx->lockProxyPath;
+        }
+      } else {
+        conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK);
+      }
+      OSTRACE(("TAKECONCH  %d %s\n", conchFile->h,
+               rc==SQLITE_OK?"ok":"failed"));
+      return rc;
+    } while (1); /* in case we need to retry the :auto: lock file - 
+                 ** we should never get here except via the 'continue' call. */
+  }
+}
+
+/*
+** If pFile holds a lock on a conch file, then release that lock.
+*/
+static int proxyReleaseConch(unixFile *pFile){
+  int rc = SQLITE_OK;         /* Subroutine return code */
+  proxyLockingContext *pCtx;  /* The locking context for the proxy lock */
+  unixFile *conchFile;        /* Name of the conch file */
+
+  pCtx = (proxyLockingContext *)pFile->lockingContext;
+  conchFile = pCtx->conchFile;
+  OSTRACE(("RELEASECONCH  %d for %s pid=%d\n", conchFile->h,
+           (pCtx->lockProxyPath ? pCtx->lockProxyPath : ":auto:"), 
+           getpid()));
+  if( pCtx->conchHeld>0 ){
+    rc = conchFile->pMethod->xUnlock((sqlite3_file*)conchFile, NO_LOCK);
+  }
+  pCtx->conchHeld = 0;
+  OSTRACE(("RELEASECONCH  %d %s\n", conchFile->h,
+           (rc==SQLITE_OK ? "ok" : "failed")));
+  return rc;
+}
+
+/*
+** Given the name of a database file, compute the name of its conch file.
+** Store the conch filename in memory obtained from sqlite3_malloc().
+** Make *pConchPath point to the new name.  Return SQLITE_OK on success
+** or SQLITE_NOMEM if unable to obtain memory.
+**
+** The caller is responsible for ensuring that the allocated memory
+** space is eventually freed.
+**
+** *pConchPath is set to NULL if a memory allocation error occurs.
+*/
+static int proxyCreateConchPathname(char *dbPath, char **pConchPath){
+  int i;                        /* Loop counter */
+  int len = (int)strlen(dbPath); /* Length of database filename - dbPath */
+  char *conchPath;              /* buffer in which to construct conch name */
+
+  /* Allocate space for the conch filename and initialize the name to
+  ** the name of the original database file. */  
+  *pConchPath = conchPath = (char *)sqlite3_malloc(len + 8);
+  if( conchPath==0 ){
+    return SQLITE_NOMEM;
+  }
+  memcpy(conchPath, dbPath, len+1);
+  
+  /* now insert a "." before the last / character */
+  for( i=(len-1); i>=0; i-- ){
+    if( conchPath[i]=='/' ){
+      i++;
+      break;
+    }
+  }
+  conchPath[i]='.';
+  while ( i<len ){
+    conchPath[i+1]=dbPath[i];
+    i++;
+  }
+
+  /* append the "-conch" suffix to the file */
+  memcpy(&conchPath[i+1], "-conch", 7);
+  assert( (int)strlen(conchPath) == len+7 );
+
+  return SQLITE_OK;
+}
+
+
+/* Takes a fully configured proxy locking-style unix file and switches
+** the local lock file path 
+*/
+static int switchLockProxyPath(unixFile *pFile, const char *path) {
+  proxyLockingContext *pCtx = (proxyLockingContext*)pFile->lockingContext;
+  char *oldPath = pCtx->lockProxyPath;
+  int rc = SQLITE_OK;
+
+  if( pFile->eFileLock!=NO_LOCK ){
+    return SQLITE_BUSY;
+  }  
+
+  /* nothing to do if the path is NULL, :auto: or matches the existing path */
+  if( !path || path[0]=='\0' || !strcmp(path, ":auto:") ||
+    (oldPath && !strncmp(oldPath, path, MAXPATHLEN)) ){
+    return SQLITE_OK;
+  }else{
+    unixFile *lockProxy = pCtx->lockProxy;
+    pCtx->lockProxy=NULL;
+    pCtx->conchHeld = 0;
+    if( lockProxy!=NULL ){
+      rc=lockProxy->pMethod->xClose((sqlite3_file *)lockProxy);
+      if( rc ) return rc;
+      sqlite3_free(lockProxy);
+    }
+    sqlite3_free(oldPath);
+    pCtx->lockProxyPath = sqlite3DbStrDup(0, path);
+  }
+  
+  return rc;
+}
+
+/*
+** pFile is a file that has been opened by a prior xOpen call.  dbPath
+** is a string buffer at least MAXPATHLEN+1 characters in size.
+**
+** This routine find the filename associated with pFile and writes it
+** int dbPath.
+*/
+static int proxyGetDbPathForUnixFile(unixFile *pFile, char *dbPath){
+#if defined(__APPLE__)
+  if( pFile->pMethod == &afpIoMethods ){
+    /* afp style keeps a reference to the db path in the filePath field 
+    ** of the struct */
+    assert( (int)strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
+    strlcpy(dbPath, ((afpLockingContext *)pFile->lockingContext)->dbPath, MAXPATHLEN);
+  } else
+#endif
+  if( pFile->pMethod == &dotlockIoMethods ){
+    /* dot lock style uses the locking context to store the dot lock
+    ** file path */
+    int len = strlen((char *)pFile->lockingContext) - strlen(DOTLOCK_SUFFIX);
+    memcpy(dbPath, (char *)pFile->lockingContext, len + 1);
+  }else{
+    /* all other styles use the locking context to store the db file path */
+    assert( strlen((char*)pFile->lockingContext)<=MAXPATHLEN );
+    strlcpy(dbPath, (char *)pFile->lockingContext, MAXPATHLEN);
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Takes an already filled in unix file and alters it so all file locking 
+** will be performed on the local proxy lock file.  The following fields
+** are preserved in the locking context so that they can be restored and 
+** the unix structure properly cleaned up at close time:
+**  ->lockingContext
+**  ->pMethod
+*/
+static int proxyTransformUnixFile(unixFile *pFile, const char *path) {
+  proxyLockingContext *pCtx;
+  char dbPath[MAXPATHLEN+1];       /* Name of the database file */
+  char *lockPath=NULL;
+  int rc = SQLITE_OK;
+  
+  if( pFile->eFileLock!=NO_LOCK ){
+    return SQLITE_BUSY;
+  }
+  proxyGetDbPathForUnixFile(pFile, dbPath);
+  if( !path || path[0]=='\0' || !strcmp(path, ":auto:") ){
+    lockPath=NULL;
+  }else{
+    lockPath=(char *)path;
+  }
+  
+  OSTRACE(("TRANSPROXY  %d for %s pid=%d\n", pFile->h,
+           (lockPath ? lockPath : ":auto:"), getpid()));
+
+  pCtx = sqlite3_malloc( sizeof(*pCtx) );
+  if( pCtx==0 ){
+    return SQLITE_NOMEM;
+  }
+  memset(pCtx, 0, sizeof(*pCtx));
+
+  rc = proxyCreateConchPathname(dbPath, &pCtx->conchFilePath);
+  if( rc==SQLITE_OK ){
+    rc = proxyCreateUnixFile(pCtx->conchFilePath, &pCtx->conchFile, 0);
+    if( rc==SQLITE_CANTOPEN && ((pFile->openFlags&O_RDWR) == 0) ){
+      /* if (a) the open flags are not O_RDWR, (b) the conch isn't there, and
+      ** (c) the file system is read-only, then enable no-locking access.
+      ** Ugh, since O_RDONLY==0x0000 we test for !O_RDWR since unixOpen asserts
+      ** that openFlags will have only one of O_RDONLY or O_RDWR.
+      */
+      struct statfs fsInfo;
+      struct stat conchInfo;
+      int goLockless = 0;
+
+      if( osStat(pCtx->conchFilePath, &conchInfo) == -1 ) {
+        int err = errno;
+        if( (err==ENOENT) && (statfs(dbPath, &fsInfo) != -1) ){
+          goLockless = (fsInfo.f_flags&MNT_RDONLY) == MNT_RDONLY;
+        }
+      }
+      if( goLockless ){
+        pCtx->conchHeld = -1; /* read only FS/ lockless */
+        rc = SQLITE_OK;
+      }
+    }
+  }  
+  if( rc==SQLITE_OK && lockPath ){
+    pCtx->lockProxyPath = sqlite3DbStrDup(0, lockPath);
+  }
+
+  if( rc==SQLITE_OK ){
+    pCtx->dbPath = sqlite3DbStrDup(0, dbPath);
+    if( pCtx->dbPath==NULL ){
+      rc = SQLITE_NOMEM;
+    }
+  }
+  if( rc==SQLITE_OK ){
+    /* all memory is allocated, proxys are created and assigned, 
+    ** switch the locking context and pMethod then return.
+    */
+    pCtx->oldLockingContext = pFile->lockingContext;
+    pFile->lockingContext = pCtx;
+    pCtx->pOldMethod = pFile->pMethod;
+    pFile->pMethod = &proxyIoMethods;
+  }else{
+    if( pCtx->conchFile ){ 
+      pCtx->conchFile->pMethod->xClose((sqlite3_file *)pCtx->conchFile);
+      sqlite3_free(pCtx->conchFile);
+    }
+    sqlite3DbFree(0, pCtx->lockProxyPath);
+    sqlite3_free(pCtx->conchFilePath); 
+    sqlite3_free(pCtx);
+  }
+  OSTRACE(("TRANSPROXY  %d %s\n", pFile->h,
+           (rc==SQLITE_OK ? "ok" : "failed")));
+  return rc;
+}
+
+
+/*
+** This routine handles sqlite3_file_control() calls that are specific
+** to proxy locking.
+*/
+static int proxyFileControl(sqlite3_file *id, int op, void *pArg){
+  switch( op ){
+    case SQLITE_GET_LOCKPROXYFILE: {
+      unixFile *pFile = (unixFile*)id;
+      if( pFile->pMethod == &proxyIoMethods ){
+        proxyLockingContext *pCtx = (proxyLockingContext*)pFile->lockingContext;
+        proxyTakeConch(pFile);
+        if( pCtx->lockProxyPath ){
+          *(const char **)pArg = pCtx->lockProxyPath;
+        }else{
+          *(const char **)pArg = ":auto: (not held)";
+        }
+      } else {
+        *(const char **)pArg = NULL;
+      }
+      return SQLITE_OK;
+    }
+    case SQLITE_SET_LOCKPROXYFILE: {
+      unixFile *pFile = (unixFile*)id;
+      int rc = SQLITE_OK;
+      int isProxyStyle = (pFile->pMethod == &proxyIoMethods);
+      if( pArg==NULL || (const char *)pArg==0 ){
+        if( isProxyStyle ){
+          /* turn off proxy locking - not supported */
+          rc = SQLITE_ERROR /*SQLITE_PROTOCOL? SQLITE_MISUSE?*/;
+        }else{
+          /* turn off proxy locking - already off - NOOP */
+          rc = SQLITE_OK;
+        }
+      }else{
+        const char *proxyPath = (const char *)pArg;
+        if( isProxyStyle ){
+          proxyLockingContext *pCtx = 
+            (proxyLockingContext*)pFile->lockingContext;
+          if( !strcmp(pArg, ":auto:") 
+           || (pCtx->lockProxyPath &&
+               !strncmp(pCtx->lockProxyPath, proxyPath, MAXPATHLEN))
+          ){
+            rc = SQLITE_OK;
+          }else{
+            rc = switchLockProxyPath(pFile, proxyPath);
+          }
+        }else{
+          /* turn on proxy file locking */
+          rc = proxyTransformUnixFile(pFile, proxyPath);
+        }
+      }
+      return rc;
+    }
+    default: {
+      assert( 0 );  /* The call assures that only valid opcodes are sent */
+    }
+  }
+  /*NOTREACHED*/
+  return SQLITE_ERROR;
+}
+
+/*
+** Within this division (the proxying locking implementation) the procedures
+** above this point are all utilities.  The lock-related methods of the
+** proxy-locking sqlite3_io_method object follow.
+*/
+
+
+/*
+** This routine checks if there is a RESERVED lock held on the specified
+** file by this or any other process. If such a lock is held, set *pResOut
+** to a non-zero value otherwise *pResOut is set to zero.  The return value
+** is set to SQLITE_OK unless an I/O error occurs during lock checking.
+*/
+static int proxyCheckReservedLock(sqlite3_file *id, int *pResOut) {
+  unixFile *pFile = (unixFile*)id;
+  int rc = proxyTakeConch(pFile);
+  if( rc==SQLITE_OK ){
+    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
+    if( pCtx->conchHeld>0 ){
+      unixFile *proxy = pCtx->lockProxy;
+      return proxy->pMethod->xCheckReservedLock((sqlite3_file*)proxy, pResOut);
+    }else{ /* conchHeld < 0 is lockless */
+      pResOut=0;
+    }
+  }
+  return rc;
+}
+
+/*
+** Lock the file with the lock specified by parameter eFileLock - one
+** of the following:
+**
+**     (1) SHARED_LOCK
+**     (2) RESERVED_LOCK
+**     (3) PENDING_LOCK
+**     (4) EXCLUSIVE_LOCK
+**
+** Sometimes when requesting one lock state, additional lock states
+** are inserted in between.  The locking might fail on one of the later
+** transitions leaving the lock state different from what it started but
+** still short of its goal.  The following chart shows the allowed
+** transitions and the inserted intermediate states:
+**
+**    UNLOCKED -> SHARED
+**    SHARED -> RESERVED
+**    SHARED -> (PENDING) -> EXCLUSIVE
+**    RESERVED -> (PENDING) -> EXCLUSIVE
+**    PENDING -> EXCLUSIVE
+**
+** This routine will only increase a lock.  Use the sqlite3OsUnlock()
+** routine to lower a locking level.
+*/
+static int proxyLock(sqlite3_file *id, int eFileLock) {
+  unixFile *pFile = (unixFile*)id;
+  int rc = proxyTakeConch(pFile);
+  if( rc==SQLITE_OK ){
+    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
+    if( pCtx->conchHeld>0 ){
+      unixFile *proxy = pCtx->lockProxy;
+      rc = proxy->pMethod->xLock((sqlite3_file*)proxy, eFileLock);
+      pFile->eFileLock = proxy->eFileLock;
+    }else{
+      /* conchHeld < 0 is lockless */
+    }
+  }
+  return rc;
+}
+
+
+/*
+** Lower the locking level on file descriptor pFile to eFileLock.  eFileLock
+** must be either NO_LOCK or SHARED_LOCK.
+**
+** If the locking level of the file descriptor is already at or below
+** the requested locking level, this routine is a no-op.
+*/
+static int proxyUnlock(sqlite3_file *id, int eFileLock) {
+  unixFile *pFile = (unixFile*)id;
+  int rc = proxyTakeConch(pFile);
+  if( rc==SQLITE_OK ){
+    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
+    if( pCtx->conchHeld>0 ){
+      unixFile *proxy = pCtx->lockProxy;
+      rc = proxy->pMethod->xUnlock((sqlite3_file*)proxy, eFileLock);
+      pFile->eFileLock = proxy->eFileLock;
+    }else{
+      /* conchHeld < 0 is lockless */
+    }
+  }
+  return rc;
+}
+
+/*
+** Close a file that uses proxy locks.
+*/
+static int proxyClose(sqlite3_file *id) {
+  if( id ){
+    unixFile *pFile = (unixFile*)id;
+    proxyLockingContext *pCtx = (proxyLockingContext *)pFile->lockingContext;
+    unixFile *lockProxy = pCtx->lockProxy;
+    unixFile *conchFile = pCtx->conchFile;
+    int rc = SQLITE_OK;
+    
+    if( lockProxy ){
+      rc = lockProxy->pMethod->xUnlock((sqlite3_file*)lockProxy, NO_LOCK);
+      if( rc ) return rc;
+      rc = lockProxy->pMethod->xClose((sqlite3_file*)lockProxy);
+      if( rc ) return rc;
+      sqlite3_free(lockProxy);
+      pCtx->lockProxy = 0;
+    }
+    if( conchFile ){
+      if( pCtx->conchHeld ){
+        rc = proxyReleaseConch(pFile);
+        if( rc ) return rc;
+      }
+      rc = conchFile->pMethod->xClose((sqlite3_file*)conchFile);
+      if( rc ) return rc;
+      sqlite3_free(conchFile);
+    }
+    sqlite3DbFree(0, pCtx->lockProxyPath);
+    sqlite3_free(pCtx->conchFilePath);
+    sqlite3DbFree(0, pCtx->dbPath);
+    /* restore the original locking context and pMethod then close it */
+    pFile->lockingContext = pCtx->oldLockingContext;
+    pFile->pMethod = pCtx->pOldMethod;
+    sqlite3_free(pCtx);
+    return pFile->pMethod->xClose(id);
+  }
+  return SQLITE_OK;
+}
+
+
+
+#endif /* defined(__APPLE__) && SQLITE_ENABLE_LOCKING_STYLE */
+/*
+** The proxy locking style is intended for use with AFP filesystems.
+** And since AFP is only supported on MacOSX, the proxy locking is also
+** restricted to MacOSX.
+** 
+**
+******************* End of the proxy lock implementation **********************
+******************************************************************************/
+
+/*
+** Initialize the operating system interface.
+**
+** This routine registers all VFS implementations for unix-like operating
+** systems.  This routine, and the sqlite3_os_end() routine that follows,
+** should be the only routines in this file that are visible from other
+** files.
+**
+** This routine is called once during SQLite initialization and by a
+** single thread.  The memory allocation and mutex subsystems have not
+** necessarily been initialized when this routine is called, and so they
+** should not be used.
+*/
+SQLITE_API int sqlite3_os_init(void){ 
+  /* 
+  ** The following macro defines an initializer for an sqlite3_vfs object.
+  ** The name of the VFS is NAME.  The pAppData is a pointer to a pointer
+  ** to the "finder" function.  (pAppData is a pointer to a pointer because
+  ** silly C90 rules prohibit a void* from being cast to a function pointer
+  ** and so we have to go through the intermediate pointer to avoid problems
+  ** when compiling with -pedantic-errors on GCC.)
+  **
+  ** The FINDER parameter to this macro is the name of the pointer to the
+  ** finder-function.  The finder-function returns a pointer to the
+  ** sqlite_io_methods object that implements the desired locking
+  ** behaviors.  See the division above that contains the IOMETHODS
+  ** macro for addition information on finder-functions.
+  **
+  ** Most finders simply return a pointer to a fixed sqlite3_io_methods
+  ** object.  But the "autolockIoFinder" available on MacOSX does a little
+  ** more than that; it looks at the filesystem type that hosts the 
+  ** database file and tries to choose an locking method appropriate for
+  ** that filesystem time.
+  */
+  #define UNIXVFS(VFSNAME, FINDER) {                        \
+    3,                    /* iVersion */                    \
+    sizeof(unixFile),     /* szOsFile */                    \
+    MAX_PATHNAME,         /* mxPathname */                  \
+    0,                    /* pNext */                       \
+    VFSNAME,              /* zName */                       \
+    (void*)&FINDER,       /* pAppData */                    \
+    unixOpen,             /* xOpen */                       \
+    unixDelete,           /* xDelete */                     \
+    unixAccess,           /* xAccess */                     \
+    unixFullPathname,     /* xFullPathname */               \
+    unixDlOpen,           /* xDlOpen */                     \
+    unixDlError,          /* xDlError */                    \
+    unixDlSym,            /* xDlSym */                      \
+    unixDlClose,          /* xDlClose */                    \
+    unixRandomness,       /* xRandomness */                 \
+    unixSleep,            /* xSleep */                      \
+    unixCurrentTime,      /* xCurrentTime */                \
+    unixGetLastError,     /* xGetLastError */               \
+    unixCurrentTimeInt64, /* xCurrentTimeInt64 */           \
+    unixSetSystemCall,    /* xSetSystemCall */              \
+    unixGetSystemCall,    /* xGetSystemCall */              \
+    unixNextSystemCall,   /* xNextSystemCall */             \
+  }
+
+  /*
+  ** All default VFSes for unix are contained in the following array.
+  **
+  ** Note that the sqlite3_vfs.pNext field of the VFS object is modified
+  ** by the SQLite core when the VFS is registered.  So the following
+  ** array cannot be const.
+  */
+  static sqlite3_vfs aVfs[] = {
+#if SQLITE_ENABLE_LOCKING_STYLE && (OS_VXWORKS || defined(__APPLE__))
+    UNIXVFS("unix",          autolockIoFinder ),
+#else
+    UNIXVFS("unix",          posixIoFinder ),
+#endif
+    UNIXVFS("unix-none",     nolockIoFinder ),
+    UNIXVFS("unix-dotfile",  dotlockIoFinder ),
+    UNIXVFS("unix-excl",     posixIoFinder ),
+#if OS_VXWORKS
+    UNIXVFS("unix-namedsem", semIoFinder ),
+#endif
+#if SQLITE_ENABLE_LOCKING_STYLE
+    UNIXVFS("unix-posix",    posixIoFinder ),
+#if !OS_VXWORKS
+    UNIXVFS("unix-flock",    flockIoFinder ),
+#endif
+#endif
+#if SQLITE_ENABLE_LOCKING_STYLE && defined(__APPLE__)
+    UNIXVFS("unix-afp",      afpIoFinder ),
+    UNIXVFS("unix-nfs",      nfsIoFinder ),
+    UNIXVFS("unix-proxy",    proxyIoFinder ),
+#endif
+  };
+  unsigned int i;          /* Loop counter */
+
+  /* Double-check that the aSyscall[] array has been constructed
+  ** correctly.  See ticket [bb3a86e890c8e96ab] */
+  assert( ArraySize(aSyscall)==16 );
+
+  /* Register all VFSes defined in the aVfs[] array */
+  for(i=0; i<(sizeof(aVfs)/sizeof(sqlite3_vfs)); i++){
+    sqlite3_vfs_register(&aVfs[i], i==0);
+  }
+  return SQLITE_OK; 
+}
+
+/*
+** Shutdown the operating system interface.
+**
+** Some operating systems might need to do some cleanup in this routine,
+** to release dynamically allocated objects.  But not on unix.
+** This routine is a no-op for unix.
+*/
+SQLITE_API int sqlite3_os_end(void){ 
+  return SQLITE_OK; 
+}
+ 
+#endif /* SQLITE_OS_UNIX */
+
+/************** End of os_unix.c *********************************************/
+/************** Begin file os_win.c ******************************************/
+/*
+** 2004 May 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains code that is specific to windows.
+*/
+#if SQLITE_OS_WIN               /* This file is used for windows only */
+
+
+/*
+** A Note About Memory Allocation:
+**
+** This driver uses malloc()/free() directly rather than going through
+** the SQLite-wrappers sqlite3_malloc()/sqlite3_free().  Those wrappers
+** are designed for use on embedded systems where memory is scarce and
+** malloc failures happen frequently.  Win32 does not typically run on
+** embedded systems, and when it does the developers normally have bigger
+** problems to worry about than running out of memory.  So there is not
+** a compelling need to use the wrappers.
+**
+** But there is a good reason to not use the wrappers.  If we use the
+** wrappers then we will get simulated malloc() failures within this
+** driver.  And that causes all kinds of problems for our tests.  We
+** could enhance SQLite to deal with simulated malloc failures within
+** the OS driver, but the code to deal with those failure would not
+** be exercised on Linux (which does not need to malloc() in the driver)
+** and so we would have difficulty writing coverage tests for that
+** code.  Better to leave the code out, we think.
+**
+** The point of this discussion is as follows:  When creating a new
+** OS layer for an embedded system, if you use this file as an example,
+** avoid the use of malloc()/free().  Those routines work ok on windows
+** desktops but not so well in embedded systems.
+*/
+
+#include <winbase.h>
+
+#ifdef __CYGWIN__
+# include <sys/cygwin.h>
+#endif
+
+/*
+** Macros used to determine whether or not to use threads.
+*/
+#if defined(THREADSAFE) && THREADSAFE
+# define SQLITE_W32_THREADS 1
+#endif
+
+/*
+** Include code that is common to all os_*.c files
+*/
+/************** Include os_common.h in the middle of os_win.c ****************/
+/************** Begin file os_common.h ***************************************/
+/*
+** 2004 May 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains macros and a little bit of code that is common to
+** all of the platform-specific files (os_*.c) and is #included into those
+** files.
+**
+** This file should be #included by the os_*.c files only.  It is not a
+** general purpose header file.
+*/
+#ifndef _OS_COMMON_H_
+#define _OS_COMMON_H_
+
+/*
+** At least two bugs have slipped in because we changed the MEMORY_DEBUG
+** macro to SQLITE_DEBUG and some older makefiles have not yet made the
+** switch.  The following code should catch this problem at compile-time.
+*/
+#ifdef MEMORY_DEBUG
+# error "The MEMORY_DEBUG macro is obsolete.  Use SQLITE_DEBUG instead."
+#endif
+
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE int sqlite3OSTrace = 0;
+#define OSTRACE(X)          if( sqlite3OSTrace ) sqlite3DebugPrintf X
+#else
+#define OSTRACE(X)
+#endif
+
+/*
+** Macros for performance tracing.  Normally turned off.  Only works
+** on i486 hardware.
+*/
+#ifdef SQLITE_PERFORMANCE_TRACE
+
+/* 
+** hwtime.h contains inline assembler code for implementing 
+** high-performance timing routines.
+*/
+/************** Include hwtime.h in the middle of os_common.h ****************/
+/************** Begin file hwtime.h ******************************************/
+/*
+** 2008 May 27
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains inline asm code for retrieving "high-performance"
+** counters for x86 class CPUs.
+*/
+#ifndef _HWTIME_H_
+#define _HWTIME_H_
+
+/*
+** The following routine only works on pentium-class (or newer) processors.
+** It uses the RDTSC opcode to read the cycle count value out of the
+** processor and returns that value.  This can be used for high-res
+** profiling.
+*/
+#if (defined(__GNUC__) || defined(_MSC_VER)) && \
+      (defined(i386) || defined(__i386__) || defined(_M_IX86))
+
+  #if defined(__GNUC__)
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+     unsigned int lo, hi;
+     __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
+     return (sqlite_uint64)hi << 32 | lo;
+  }
+
+  #elif defined(_MSC_VER)
+
+  __declspec(naked) __inline sqlite_uint64 __cdecl sqlite3Hwtime(void){
+     __asm {
+        rdtsc
+        ret       ; return value at EDX:EAX
+     }
+  }
+
+  #endif
+
+#elif (defined(__GNUC__) && defined(__x86_64__))
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+      unsigned long val;
+      __asm__ __volatile__ ("rdtsc" : "=A" (val));
+      return val;
+  }
+ 
+#elif (defined(__GNUC__) && defined(__ppc__))
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+      unsigned long long retval;
+      unsigned long junk;
+      __asm__ __volatile__ ("\n\
+          1:      mftbu   %1\n\
+                  mftb    %L0\n\
+                  mftbu   %0\n\
+                  cmpw    %0,%1\n\
+                  bne     1b"
+                  : "=r" (retval), "=r" (junk));
+      return retval;
+  }
+
+#else
+
+  #error Need implementation of sqlite3Hwtime() for your platform.
+
+  /*
+  ** To compile without implementing sqlite3Hwtime() for your platform,
+  ** you can remove the above #error and use the following
+  ** stub function.  You will lose timing support for many
+  ** of the debugging and testing utilities, but it should at
+  ** least compile and run.
+  */
+SQLITE_PRIVATE   sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
+
+#endif
+
+#endif /* !defined(_HWTIME_H_) */
+
+/************** End of hwtime.h **********************************************/
+/************** Continuing where we left off in os_common.h ******************/
+
+static sqlite_uint64 g_start;
+static sqlite_uint64 g_elapsed;
+#define TIMER_START       g_start=sqlite3Hwtime()
+#define TIMER_END         g_elapsed=sqlite3Hwtime()-g_start
+#define TIMER_ELAPSED     g_elapsed
+#else
+#define TIMER_START
+#define TIMER_END
+#define TIMER_ELAPSED     ((sqlite_uint64)0)
+#endif
+
+/*
+** If we compile with the SQLITE_TEST macro set, then the following block
+** of code will give us the ability to simulate a disk I/O error.  This
+** is used for testing the I/O recovery logic.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_io_error_hit = 0;            /* Total number of I/O Errors */
+SQLITE_API int sqlite3_io_error_hardhit = 0;        /* Number of non-benign errors */
+SQLITE_API int sqlite3_io_error_pending = 0;        /* Count down to first I/O error */
+SQLITE_API int sqlite3_io_error_persist = 0;        /* True if I/O errors persist */
+SQLITE_API int sqlite3_io_error_benign = 0;         /* True if errors are benign */
+SQLITE_API int sqlite3_diskfull_pending = 0;
+SQLITE_API int sqlite3_diskfull = 0;
+#define SimulateIOErrorBenign(X) sqlite3_io_error_benign=(X)
+#define SimulateIOError(CODE)  \
+  if( (sqlite3_io_error_persist && sqlite3_io_error_hit) \
+       || sqlite3_io_error_pending-- == 1 )  \
+              { local_ioerr(); CODE; }
+static void local_ioerr(){
+  IOTRACE(("IOERR\n"));
+  sqlite3_io_error_hit++;
+  if( !sqlite3_io_error_benign ) sqlite3_io_error_hardhit++;
+}
+#define SimulateDiskfullError(CODE) \
+   if( sqlite3_diskfull_pending ){ \
+     if( sqlite3_diskfull_pending == 1 ){ \
+       local_ioerr(); \
+       sqlite3_diskfull = 1; \
+       sqlite3_io_error_hit = 1; \
+       CODE; \
+     }else{ \
+       sqlite3_diskfull_pending--; \
+     } \
+   }
+#else
+#define SimulateIOErrorBenign(X)
+#define SimulateIOError(A)
+#define SimulateDiskfullError(A)
+#endif
+
+/*
+** When testing, keep a count of the number of open files.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_open_file_count = 0;
+#define OpenCounter(X)  sqlite3_open_file_count+=(X)
+#else
+#define OpenCounter(X)
+#endif
+
+#endif /* !defined(_OS_COMMON_H_) */
+
+/************** End of os_common.h *******************************************/
+/************** Continuing where we left off in os_win.c *********************/
+
+/*
+** Some microsoft compilers lack this definition.
+*/
+#ifndef INVALID_FILE_ATTRIBUTES
+# define INVALID_FILE_ATTRIBUTES ((DWORD)-1) 
+#endif
+
+/*
+** Determine if we are dealing with WindowsCE - which has a much
+** reduced API.
+*/
+#if SQLITE_OS_WINCE
+# define AreFileApisANSI() 1
+# define FormatMessageW(a,b,c,d,e,f,g) 0
+#endif
+
+/* Forward references */
+typedef struct winShm winShm;           /* A connection to shared-memory */
+typedef struct winShmNode winShmNode;   /* A region of shared-memory */
+
+/*
+** WinCE lacks native support for file locking so we have to fake it
+** with some code of our own.
+*/
+#if SQLITE_OS_WINCE
+typedef struct winceLock {
+  int nReaders;       /* Number of reader locks obtained */
+  BOOL bPending;      /* Indicates a pending lock has been obtained */
+  BOOL bReserved;     /* Indicates a reserved lock has been obtained */
+  BOOL bExclusive;    /* Indicates an exclusive lock has been obtained */
+} winceLock;
+#endif
+
+/*
+** The winFile structure is a subclass of sqlite3_file* specific to the win32
+** portability layer.
+*/
+typedef struct winFile winFile;
+struct winFile {
+  const sqlite3_io_methods *pMethod; /*** Must be first ***/
+  sqlite3_vfs *pVfs;      /* The VFS used to open this file */
+  HANDLE h;               /* Handle for accessing the file */
+  unsigned char locktype; /* Type of lock currently held on this file */
+  short sharedLockByte;   /* Randomly chosen byte used as a shared lock */
+  DWORD lastErrno;        /* The Windows errno from the last I/O error */
+  DWORD sectorSize;       /* Sector size of the device file is on */
+  winShm *pShm;           /* Instance of shared memory on this file */
+  const char *zPath;      /* Full pathname of this file */
+  int szChunk;            /* Chunk size configured by FCNTL_CHUNK_SIZE */
+#if SQLITE_OS_WINCE
+  WCHAR *zDeleteOnClose;  /* Name of file to delete when closing */
+  HANDLE hMutex;          /* Mutex used to control access to shared lock */  
+  HANDLE hShared;         /* Shared memory segment used for locking */
+  winceLock local;        /* Locks obtained by this instance of winFile */
+  winceLock *shared;      /* Global shared lock memory for the file  */
+#endif
+};
+
+/*
+** Forward prototypes.
+*/
+static int getSectorSize(
+    sqlite3_vfs *pVfs,
+    const char *zRelative     /* UTF-8 file name */
+);
+
+/*
+** The following variable is (normally) set once and never changes
+** thereafter.  It records whether the operating system is Win95
+** or WinNT.
+**
+** 0:   Operating system unknown.
+** 1:   Operating system is Win95.
+** 2:   Operating system is WinNT.
+**
+** In order to facilitate testing on a WinNT system, the test fixture
+** can manually set this value to 1 to emulate Win98 behavior.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_os_type = 0;
+#else
+static int sqlite3_os_type = 0;
+#endif
+
+/*
+** Return true (non-zero) if we are running under WinNT, Win2K, WinXP,
+** or WinCE.  Return false (zero) for Win95, Win98, or WinME.
+**
+** Here is an interesting observation:  Win95, Win98, and WinME lack
+** the LockFileEx() API.  But we can still statically link against that
+** API as long as we don't call it when running Win95/98/ME.  A call to
+** this routine is used to determine if the host is Win95/98/ME or
+** WinNT/2K/XP so that we will know whether or not we can safely call
+** the LockFileEx() API.
+*/
+#if SQLITE_OS_WINCE
+# define isNT()  (1)
+#else
+  static int isNT(void){
+    if( sqlite3_os_type==0 ){
+      OSVERSIONINFO sInfo;
+      sInfo.dwOSVersionInfoSize = sizeof(sInfo);
+      GetVersionEx(&sInfo);
+      sqlite3_os_type = sInfo.dwPlatformId==VER_PLATFORM_WIN32_NT ? 2 : 1;
+    }
+    return sqlite3_os_type==2;
+  }
+#endif /* SQLITE_OS_WINCE */
+
+/*
+** Convert a UTF-8 string to microsoft unicode (UTF-16?). 
+**
+** Space to hold the returned string is obtained from malloc.
+*/
+static WCHAR *utf8ToUnicode(const char *zFilename){
+  int nChar;
+  WCHAR *zWideFilename;
+
+  nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, NULL, 0);
+  zWideFilename = malloc( nChar*sizeof(zWideFilename[0]) );
+  if( zWideFilename==0 ){
+    return 0;
+  }
+  nChar = MultiByteToWideChar(CP_UTF8, 0, zFilename, -1, zWideFilename, nChar);
+  if( nChar==0 ){
+    free(zWideFilename);
+    zWideFilename = 0;
+  }
+  return zWideFilename;
+}
+
+/*
+** Convert microsoft unicode to UTF-8.  Space to hold the returned string is
+** obtained from malloc().
+*/
+static char *unicodeToUtf8(const WCHAR *zWideFilename){
+  int nByte;
+  char *zFilename;
+
+  nByte = WideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, 0, 0, 0, 0);
+  zFilename = malloc( nByte );
+  if( zFilename==0 ){
+    return 0;
+  }
+  nByte = WideCharToMultiByte(CP_UTF8, 0, zWideFilename, -1, zFilename, nByte,
+                              0, 0);
+  if( nByte == 0 ){
+    free(zFilename);
+    zFilename = 0;
+  }
+  return zFilename;
+}
+
+/*
+** Convert an ansi string to microsoft unicode, based on the
+** current codepage settings for file apis.
+** 
+** Space to hold the returned string is obtained
+** from malloc.
+*/
+static WCHAR *mbcsToUnicode(const char *zFilename){
+  int nByte;
+  WCHAR *zMbcsFilename;
+  int codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
+
+  nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, NULL,0)*sizeof(WCHAR);
+  zMbcsFilename = malloc( nByte*sizeof(zMbcsFilename[0]) );
+  if( zMbcsFilename==0 ){
+    return 0;
+  }
+  nByte = MultiByteToWideChar(codepage, 0, zFilename, -1, zMbcsFilename, nByte);
+  if( nByte==0 ){
+    free(zMbcsFilename);
+    zMbcsFilename = 0;
+  }
+  return zMbcsFilename;
+}
+
+/*
+** Convert microsoft unicode to multibyte character string, based on the
+** user's Ansi codepage.
+**
+** Space to hold the returned string is obtained from
+** malloc().
+*/
+static char *unicodeToMbcs(const WCHAR *zWideFilename){
+  int nByte;
+  char *zFilename;
+  int codepage = AreFileApisANSI() ? CP_ACP : CP_OEMCP;
+
+  nByte = WideCharToMultiByte(codepage, 0, zWideFilename, -1, 0, 0, 0, 0);
+  zFilename = malloc( nByte );
+  if( zFilename==0 ){
+    return 0;
+  }
+  nByte = WideCharToMultiByte(codepage, 0, zWideFilename, -1, zFilename, nByte,
+                              0, 0);
+  if( nByte == 0 ){
+    free(zFilename);
+    zFilename = 0;
+  }
+  return zFilename;
+}
+
+/*
+** Convert multibyte character string to UTF-8.  Space to hold the
+** returned string is obtained from malloc().
+*/
+SQLITE_API char *sqlite3_win32_mbcs_to_utf8(const char *zFilename){
+  char *zFilenameUtf8;
+  WCHAR *zTmpWide;
+
+  zTmpWide = mbcsToUnicode(zFilename);
+  if( zTmpWide==0 ){
+    return 0;
+  }
+  zFilenameUtf8 = unicodeToUtf8(zTmpWide);
+  free(zTmpWide);
+  return zFilenameUtf8;
+}
+
+/*
+** Convert UTF-8 to multibyte character string.  Space to hold the 
+** returned string is obtained from malloc().
+*/
+static char *utf8ToMbcs(const char *zFilename){
+  char *zFilenameMbcs;
+  WCHAR *zTmpWide;
+
+  zTmpWide = utf8ToUnicode(zFilename);
+  if( zTmpWide==0 ){
+    return 0;
+  }
+  zFilenameMbcs = unicodeToMbcs(zTmpWide);
+  free(zTmpWide);
+  return zFilenameMbcs;
+}
+
+#if SQLITE_OS_WINCE
+/*************************************************************************
+** This section contains code for WinCE only.
+*/
+/*
+** WindowsCE does not have a localtime() function.  So create a
+** substitute.
+*/
+struct tm *__cdecl localtime(const time_t *t)
+{
+  static struct tm y;
+  FILETIME uTm, lTm;
+  SYSTEMTIME pTm;
+  sqlite3_int64 t64;
+  t64 = *t;
+  t64 = (t64 + 11644473600)*10000000;
+  uTm.dwLowDateTime = (DWORD)(t64 & 0xFFFFFFFF);
+  uTm.dwHighDateTime= (DWORD)(t64 >> 32);
+  FileTimeToLocalFileTime(&uTm,&lTm);
+  FileTimeToSystemTime(&lTm,&pTm);
+  y.tm_year = pTm.wYear - 1900;
+  y.tm_mon = pTm.wMonth - 1;
+  y.tm_wday = pTm.wDayOfWeek;
+  y.tm_mday = pTm.wDay;
+  y.tm_hour = pTm.wHour;
+  y.tm_min = pTm.wMinute;
+  y.tm_sec = pTm.wSecond;
+  return &y;
+}
+
+/* This will never be called, but defined to make the code compile */
+#define GetTempPathA(a,b)
+
+#define LockFile(a,b,c,d,e)       winceLockFile(&a, b, c, d, e)
+#define UnlockFile(a,b,c,d,e)     winceUnlockFile(&a, b, c, d, e)
+#define LockFileEx(a,b,c,d,e,f)   winceLockFileEx(&a, b, c, d, e, f)
+
+#define HANDLE_TO_WINFILE(a) (winFile*)&((char*)a)[-(int)offsetof(winFile,h)]
+
+/*
+** Acquire a lock on the handle h
+*/
+static void winceMutexAcquire(HANDLE h){
+   DWORD dwErr;
+   do {
+     dwErr = WaitForSingleObject(h, INFINITE);
+   } while (dwErr != WAIT_OBJECT_0 && dwErr != WAIT_ABANDONED);
+}
+/*
+** Release a lock acquired by winceMutexAcquire()
+*/
+#define winceMutexRelease(h) ReleaseMutex(h)
+
+/*
+** Create the mutex and shared memory used for locking in the file
+** descriptor pFile
+*/
+static BOOL winceCreateLock(const char *zFilename, winFile *pFile){
+  WCHAR *zTok;
+  WCHAR *zName = utf8ToUnicode(zFilename);
+  BOOL bInit = TRUE;
+
+  /* Initialize the local lockdata */
+  ZeroMemory(&pFile->local, sizeof(pFile->local));
+
+  /* Replace the backslashes from the filename and lowercase it
+  ** to derive a mutex name. */
+  zTok = CharLowerW(zName);
+  for (;*zTok;zTok++){
+    if (*zTok == '\\') *zTok = '_';
+  }
+
+  /* Create/open the named mutex */
+  pFile->hMutex = CreateMutexW(NULL, FALSE, zName);
+  if (!pFile->hMutex){
+    pFile->lastErrno = GetLastError();
+    free(zName);
+    return FALSE;
+  }
+
+  /* Acquire the mutex before continuing */
+  winceMutexAcquire(pFile->hMutex);
+  
+  /* Since the names of named mutexes, semaphores, file mappings etc are 
+  ** case-sensitive, take advantage of that by uppercasing the mutex name
+  ** and using that as the shared filemapping name.
+  */
+  CharUpperW(zName);
+  pFile->hShared = CreateFileMappingW(INVALID_HANDLE_VALUE, NULL,
+                                       PAGE_READWRITE, 0, sizeof(winceLock),
+                                       zName);  
+
+  /* Set a flag that indicates we're the first to create the memory so it 
+  ** must be zero-initialized */
+  if (GetLastError() == ERROR_ALREADY_EXISTS){
+    bInit = FALSE;
+  }
+
+  free(zName);
+
+  /* If we succeeded in making the shared memory handle, map it. */
+  if (pFile->hShared){
+    pFile->shared = (winceLock*)MapViewOfFile(pFile->hShared, 
+             FILE_MAP_READ|FILE_MAP_WRITE, 0, 0, sizeof(winceLock));
+    /* If mapping failed, close the shared memory handle and erase it */
+    if (!pFile->shared){
+      pFile->lastErrno = GetLastError();
+      CloseHandle(pFile->hShared);
+      pFile->hShared = NULL;
+    }
+  }
+
+  /* If shared memory could not be created, then close the mutex and fail */
+  if (pFile->hShared == NULL){
+    winceMutexRelease(pFile->hMutex);
+    CloseHandle(pFile->hMutex);
+    pFile->hMutex = NULL;
+    return FALSE;
+  }
+  
+  /* Initialize the shared memory if we're supposed to */
+  if (bInit) {
+    ZeroMemory(pFile->shared, sizeof(winceLock));
+  }
+
+  winceMutexRelease(pFile->hMutex);
+  return TRUE;
+}
+
+/*
+** Destroy the part of winFile that deals with wince locks
+*/
+static void winceDestroyLock(winFile *pFile){
+  if (pFile->hMutex){
+    /* Acquire the mutex */
+    winceMutexAcquire(pFile->hMutex);
+
+    /* The following blocks should probably assert in debug mode, but they
+       are to cleanup in case any locks remained open */
+    if (pFile->local.nReaders){
+      pFile->shared->nReaders --;
+    }
+    if (pFile->local.bReserved){
+      pFile->shared->bReserved = FALSE;
+    }
+    if (pFile->local.bPending){
+      pFile->shared->bPending = FALSE;
+    }
+    if (pFile->local.bExclusive){
+      pFile->shared->bExclusive = FALSE;
+    }
+
+    /* De-reference and close our copy of the shared memory handle */
+    UnmapViewOfFile(pFile->shared);
+    CloseHandle(pFile->hShared);
+
+    /* Done with the mutex */
+    winceMutexRelease(pFile->hMutex);    
+    CloseHandle(pFile->hMutex);
+    pFile->hMutex = NULL;
+  }
+}
+
+/* 
+** An implementation of the LockFile() API of windows for wince
+*/
+static BOOL winceLockFile(
+  HANDLE *phFile,
+  DWORD dwFileOffsetLow,
+  DWORD dwFileOffsetHigh,
+  DWORD nNumberOfBytesToLockLow,
+  DWORD nNumberOfBytesToLockHigh
+){
+  winFile *pFile = HANDLE_TO_WINFILE(phFile);
+  BOOL bReturn = FALSE;
+
+  UNUSED_PARAMETER(dwFileOffsetHigh);
+  UNUSED_PARAMETER(nNumberOfBytesToLockHigh);
+
+  if (!pFile->hMutex) return TRUE;
+  winceMutexAcquire(pFile->hMutex);
+
+  /* Wanting an exclusive lock? */
+  if (dwFileOffsetLow == (DWORD)SHARED_FIRST
+       && nNumberOfBytesToLockLow == (DWORD)SHARED_SIZE){
+    if (pFile->shared->nReaders == 0 && pFile->shared->bExclusive == 0){
+       pFile->shared->bExclusive = TRUE;
+       pFile->local.bExclusive = TRUE;
+       bReturn = TRUE;
+    }
+  }
+
+  /* Want a read-only lock? */
+  else if (dwFileOffsetLow == (DWORD)SHARED_FIRST &&
+           nNumberOfBytesToLockLow == 1){
+    if (pFile->shared->bExclusive == 0){
+      pFile->local.nReaders ++;
+      if (pFile->local.nReaders == 1){
+        pFile->shared->nReaders ++;
+      }
+      bReturn = TRUE;
+    }
+  }
+
+  /* Want a pending lock? */
+  else if (dwFileOffsetLow == (DWORD)PENDING_BYTE && nNumberOfBytesToLockLow == 1){
+    /* If no pending lock has been acquired, then acquire it */
+    if (pFile->shared->bPending == 0) {
+      pFile->shared->bPending = TRUE;
+      pFile->local.bPending = TRUE;
+      bReturn = TRUE;
+    }
+  }
+
+  /* Want a reserved lock? */
+  else if (dwFileOffsetLow == (DWORD)RESERVED_BYTE && nNumberOfBytesToLockLow == 1){
+    if (pFile->shared->bReserved == 0) {
+      pFile->shared->bReserved = TRUE;
+      pFile->local.bReserved = TRUE;
+      bReturn = TRUE;
+    }
+  }
+
+  winceMutexRelease(pFile->hMutex);
+  return bReturn;
+}
+
+/*
+** An implementation of the UnlockFile API of windows for wince
+*/
+static BOOL winceUnlockFile(
+  HANDLE *phFile,
+  DWORD dwFileOffsetLow,
+  DWORD dwFileOffsetHigh,
+  DWORD nNumberOfBytesToUnlockLow,
+  DWORD nNumberOfBytesToUnlockHigh
+){
+  winFile *pFile = HANDLE_TO_WINFILE(phFile);
+  BOOL bReturn = FALSE;
+
+  UNUSED_PARAMETER(dwFileOffsetHigh);
+  UNUSED_PARAMETER(nNumberOfBytesToUnlockHigh);
+
+  if (!pFile->hMutex) return TRUE;
+  winceMutexAcquire(pFile->hMutex);
+
+  /* Releasing a reader lock or an exclusive lock */
+  if (dwFileOffsetLow == (DWORD)SHARED_FIRST){
+    /* Did we have an exclusive lock? */
+    if (pFile->local.bExclusive){
+      assert(nNumberOfBytesToUnlockLow == (DWORD)SHARED_SIZE);
+      pFile->local.bExclusive = FALSE;
+      pFile->shared->bExclusive = FALSE;
+      bReturn = TRUE;
+    }
+
+    /* Did we just have a reader lock? */
+    else if (pFile->local.nReaders){
+      assert(nNumberOfBytesToUnlockLow == (DWORD)SHARED_SIZE || nNumberOfBytesToUnlockLow == 1);
+      pFile->local.nReaders --;
+      if (pFile->local.nReaders == 0)
+      {
+        pFile->shared->nReaders --;
+      }
+      bReturn = TRUE;
+    }
+  }
+
+  /* Releasing a pending lock */
+  else if (dwFileOffsetLow == (DWORD)PENDING_BYTE && nNumberOfBytesToUnlockLow == 1){
+    if (pFile->local.bPending){
+      pFile->local.bPending = FALSE;
+      pFile->shared->bPending = FALSE;
+      bReturn = TRUE;
+    }
+  }
+  /* Releasing a reserved lock */
+  else if (dwFileOffsetLow == (DWORD)RESERVED_BYTE && nNumberOfBytesToUnlockLow == 1){
+    if (pFile->local.bReserved) {
+      pFile->local.bReserved = FALSE;
+      pFile->shared->bReserved = FALSE;
+      bReturn = TRUE;
+    }
+  }
+
+  winceMutexRelease(pFile->hMutex);
+  return bReturn;
+}
+
+/*
+** An implementation of the LockFileEx() API of windows for wince
+*/
+static BOOL winceLockFileEx(
+  HANDLE *phFile,
+  DWORD dwFlags,
+  DWORD dwReserved,
+  DWORD nNumberOfBytesToLockLow,
+  DWORD nNumberOfBytesToLockHigh,
+  LPOVERLAPPED lpOverlapped
+){
+  UNUSED_PARAMETER(dwReserved);
+  UNUSED_PARAMETER(nNumberOfBytesToLockHigh);
+
+  /* If the caller wants a shared read lock, forward this call
+  ** to winceLockFile */
+  if (lpOverlapped->Offset == (DWORD)SHARED_FIRST &&
+      dwFlags == 1 &&
+      nNumberOfBytesToLockLow == (DWORD)SHARED_SIZE){
+    return winceLockFile(phFile, SHARED_FIRST, 0, 1, 0);
+  }
+  return FALSE;
+}
+/*
+** End of the special code for wince
+*****************************************************************************/
+#endif /* SQLITE_OS_WINCE */
+
+/*****************************************************************************
+** The next group of routines implement the I/O methods specified
+** by the sqlite3_io_methods object.
+******************************************************************************/
+
+/*
+** Some microsoft compilers lack this definition.
+*/
+#ifndef INVALID_SET_FILE_POINTER
+# define INVALID_SET_FILE_POINTER ((DWORD)-1)
+#endif
+
+/*
+** Move the current position of the file handle passed as the first 
+** argument to offset iOffset within the file. If successful, return 0. 
+** Otherwise, set pFile->lastErrno and return non-zero.
+*/
+static int seekWinFile(winFile *pFile, sqlite3_int64 iOffset){
+  LONG upperBits;                 /* Most sig. 32 bits of new offset */
+  LONG lowerBits;                 /* Least sig. 32 bits of new offset */
+  DWORD dwRet;                    /* Value returned by SetFilePointer() */
+
+  upperBits = (LONG)((iOffset>>32) & 0x7fffffff);
+  lowerBits = (LONG)(iOffset & 0xffffffff);
+
+  /* API oddity: If successful, SetFilePointer() returns a dword 
+  ** containing the lower 32-bits of the new file-offset. Or, if it fails,
+  ** it returns INVALID_SET_FILE_POINTER. However according to MSDN, 
+  ** INVALID_SET_FILE_POINTER may also be a valid new offset. So to determine 
+  ** whether an error has actually occured, it is also necessary to call 
+  ** GetLastError().
+  */
+  dwRet = SetFilePointer(pFile->h, lowerBits, &upperBits, FILE_BEGIN);
+  if( (dwRet==INVALID_SET_FILE_POINTER && GetLastError()!=NO_ERROR) ){
+    pFile->lastErrno = GetLastError();
+    return 1;
+  }
+
+  return 0;
+}
+
+/*
+** Close a file.
+**
+** It is reported that an attempt to close a handle might sometimes
+** fail.  This is a very unreasonable result, but windows is notorious
+** for being unreasonable so I do not doubt that it might happen.  If
+** the close fails, we pause for 100 milliseconds and try again.  As
+** many as MX_CLOSE_ATTEMPT attempts to close the handle are made before
+** giving up and returning an error.
+*/
+#define MX_CLOSE_ATTEMPT 3
+static int winClose(sqlite3_file *id){
+  int rc, cnt = 0;
+  winFile *pFile = (winFile*)id;
+
+  assert( id!=0 );
+  assert( pFile->pShm==0 );
+  OSTRACE(("CLOSE %d\n", pFile->h));
+  do{
+    rc = CloseHandle(pFile->h);
+    /* SimulateIOError( rc=0; cnt=MX_CLOSE_ATTEMPT; ); */
+  }while( rc==0 && ++cnt < MX_CLOSE_ATTEMPT && (Sleep(100), 1) );
+#if SQLITE_OS_WINCE
+#define WINCE_DELETION_ATTEMPTS 3
+  winceDestroyLock(pFile);
+  if( pFile->zDeleteOnClose ){
+    int cnt = 0;
+    while(
+           DeleteFileW(pFile->zDeleteOnClose)==0
+        && GetFileAttributesW(pFile->zDeleteOnClose)!=0xffffffff 
+        && cnt++ < WINCE_DELETION_ATTEMPTS
+    ){
+       Sleep(100);  /* Wait a little before trying again */
+    }
+    free(pFile->zDeleteOnClose);
+  }
+#endif
+  OSTRACE(("CLOSE %d %s\n", pFile->h, rc ? "ok" : "failed"));
+  OpenCounter(-1);
+  return rc ? SQLITE_OK : SQLITE_IOERR;
+}
+
+/*
+** Read data from a file into a buffer.  Return SQLITE_OK if all
+** bytes were read successfully and SQLITE_IOERR if anything goes
+** wrong.
+*/
+static int winRead(
+  sqlite3_file *id,          /* File to read from */
+  void *pBuf,                /* Write content into this buffer */
+  int amt,                   /* Number of bytes to read */
+  sqlite3_int64 offset       /* Begin reading at this offset */
+){
+  winFile *pFile = (winFile*)id;  /* file handle */
+  DWORD nRead;                    /* Number of bytes actually read from file */
+
+  assert( id!=0 );
+  SimulateIOError(return SQLITE_IOERR_READ);
+  OSTRACE(("READ %d lock=%d\n", pFile->h, pFile->locktype));
+
+  if( seekWinFile(pFile, offset) ){
+    return SQLITE_FULL;
+  }
+  if( !ReadFile(pFile->h, pBuf, amt, &nRead, 0) ){
+    pFile->lastErrno = GetLastError();
+    return SQLITE_IOERR_READ;
+  }
+  if( nRead<(DWORD)amt ){
+    /* Unread parts of the buffer must be zero-filled */
+    memset(&((char*)pBuf)[nRead], 0, amt-nRead);
+    return SQLITE_IOERR_SHORT_READ;
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** Write data from a buffer into a file.  Return SQLITE_OK on success
+** or some other error code on failure.
+*/
+static int winWrite(
+  sqlite3_file *id,               /* File to write into */
+  const void *pBuf,               /* The bytes to be written */
+  int amt,                        /* Number of bytes to write */
+  sqlite3_int64 offset            /* Offset into the file to begin writing at */
+){
+  int rc;                         /* True if error has occured, else false */
+  winFile *pFile = (winFile*)id;  /* File handle */
+
+  assert( amt>0 );
+  assert( pFile );
+  SimulateIOError(return SQLITE_IOERR_WRITE);
+  SimulateDiskfullError(return SQLITE_FULL);
+
+  OSTRACE(("WRITE %d lock=%d\n", pFile->h, pFile->locktype));
+
+  rc = seekWinFile(pFile, offset);
+  if( rc==0 ){
+    u8 *aRem = (u8 *)pBuf;        /* Data yet to be written */
+    int nRem = amt;               /* Number of bytes yet to be written */
+    DWORD nWrite;                 /* Bytes written by each WriteFile() call */
+
+    while( nRem>0 && WriteFile(pFile->h, aRem, nRem, &nWrite, 0) && nWrite>0 ){
+      aRem += nWrite;
+      nRem -= nWrite;
+    }
+    if( nRem>0 ){
+      pFile->lastErrno = GetLastError();
+      rc = 1;
+    }
+  }
+
+  if( rc ){
+    if( pFile->lastErrno==ERROR_HANDLE_DISK_FULL ){
+      return SQLITE_FULL;
+    }
+    return SQLITE_IOERR_WRITE;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Truncate an open file to a specified size
+*/
+static int winTruncate(sqlite3_file *id, sqlite3_int64 nByte){
+  winFile *pFile = (winFile*)id;  /* File handle object */
+  int rc = SQLITE_OK;             /* Return code for this function */
+
+  assert( pFile );
+
+  OSTRACE(("TRUNCATE %d %lld\n", pFile->h, nByte));
+  SimulateIOError(return SQLITE_IOERR_TRUNCATE);
+
+  /* If the user has configured a chunk-size for this file, truncate the
+  ** file so that it consists of an integer number of chunks (i.e. the
+  ** actual file size after the operation may be larger than the requested
+  ** size).
+  */
+  if( pFile->szChunk ){
+    nByte = ((nByte + pFile->szChunk - 1)/pFile->szChunk) * pFile->szChunk;
+  }
+
+  /* SetEndOfFile() returns non-zero when successful, or zero when it fails. */
+  if( seekWinFile(pFile, nByte) ){
+    rc = SQLITE_IOERR_TRUNCATE;
+  }else if( 0==SetEndOfFile(pFile->h) ){
+    pFile->lastErrno = GetLastError();
+    rc = SQLITE_IOERR_TRUNCATE;
+  }
+
+  OSTRACE(("TRUNCATE %d %lld %s\n", pFile->h, nByte, rc ? "failed" : "ok"));
+  return rc;
+}
+
+#ifdef SQLITE_TEST
+/*
+** Count the number of fullsyncs and normal syncs.  This is used to test
+** that syncs and fullsyncs are occuring at the right times.
+*/
+SQLITE_API int sqlite3_sync_count = 0;
+SQLITE_API int sqlite3_fullsync_count = 0;
+#endif
+
+/*
+** Make sure all writes to a particular file are committed to disk.
+*/
+static int winSync(sqlite3_file *id, int flags){
+#if !defined(NDEBUG) || !defined(SQLITE_NO_SYNC) || defined(SQLITE_DEBUG)
+  winFile *pFile = (winFile*)id;
+#else
+  UNUSED_PARAMETER(id);
+#endif
+
+  assert( pFile );
+  /* Check that one of SQLITE_SYNC_NORMAL or FULL was passed */
+  assert((flags&0x0F)==SQLITE_SYNC_NORMAL
+      || (flags&0x0F)==SQLITE_SYNC_FULL
+  );
+
+  OSTRACE(("SYNC %d lock=%d\n", pFile->h, pFile->locktype));
+
+#ifndef SQLITE_TEST
+  UNUSED_PARAMETER(flags);
+#else
+  if( flags & SQLITE_SYNC_FULL ){
+    sqlite3_fullsync_count++;
+  }
+  sqlite3_sync_count++;
+#endif
+
+  /* Unix cannot, but some systems may return SQLITE_FULL from here. This
+  ** line is to test that doing so does not cause any problems.
+  */
+  SimulateDiskfullError( return SQLITE_FULL );
+  SimulateIOError( return SQLITE_IOERR; );
+
+  /* If we compiled with the SQLITE_NO_SYNC flag, then syncing is a
+  ** no-op
+  */
+#ifdef SQLITE_NO_SYNC
+  return SQLITE_OK;
+#else
+  if( FlushFileBuffers(pFile->h) ){
+    return SQLITE_OK;
+  }else{
+    pFile->lastErrno = GetLastError();
+    return SQLITE_IOERR;
+  }
+#endif
+}
+
+/*
+** Determine the current size of a file in bytes
+*/
+static int winFileSize(sqlite3_file *id, sqlite3_int64 *pSize){
+  DWORD upperBits;
+  DWORD lowerBits;
+  winFile *pFile = (winFile*)id;
+  DWORD error;
+
+  assert( id!=0 );
+  SimulateIOError(return SQLITE_IOERR_FSTAT);
+  lowerBits = GetFileSize(pFile->h, &upperBits);
+  if(   (lowerBits == INVALID_FILE_SIZE)
+     && ((error = GetLastError()) != NO_ERROR) )
+  {
+    pFile->lastErrno = error;
+    return SQLITE_IOERR_FSTAT;
+  }
+  *pSize = (((sqlite3_int64)upperBits)<<32) + lowerBits;
+  return SQLITE_OK;
+}
+
+/*
+** LOCKFILE_FAIL_IMMEDIATELY is undefined on some Windows systems.
+*/
+#ifndef LOCKFILE_FAIL_IMMEDIATELY
+# define LOCKFILE_FAIL_IMMEDIATELY 1
+#endif
+
+/*
+** Acquire a reader lock.
+** Different API routines are called depending on whether or not this
+** is Win95 or WinNT.
+*/
+static int getReadLock(winFile *pFile){
+  int res;
+  if( isNT() ){
+    OVERLAPPED ovlp;
+    ovlp.Offset = SHARED_FIRST;
+    ovlp.OffsetHigh = 0;
+    ovlp.hEvent = 0;
+    res = LockFileEx(pFile->h, LOCKFILE_FAIL_IMMEDIATELY,
+                     0, SHARED_SIZE, 0, &ovlp);
+/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
+*/
+#if SQLITE_OS_WINCE==0
+  }else{
+    int lk;
+    sqlite3_randomness(sizeof(lk), &lk);
+    pFile->sharedLockByte = (short)((lk & 0x7fffffff)%(SHARED_SIZE - 1));
+    res = LockFile(pFile->h, SHARED_FIRST+pFile->sharedLockByte, 0, 1, 0);
+#endif
+  }
+  if( res == 0 ){
+    pFile->lastErrno = GetLastError();
+  }
+  return res;
+}
+
+/*
+** Undo a readlock
+*/
+static int unlockReadLock(winFile *pFile){
+  int res;
+  if( isNT() ){
+    res = UnlockFile(pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);
+/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
+*/
+#if SQLITE_OS_WINCE==0
+  }else{
+    res = UnlockFile(pFile->h, SHARED_FIRST + pFile->sharedLockByte, 0, 1, 0);
+#endif
+  }
+  if( res == 0 ){
+    pFile->lastErrno = GetLastError();
+  }
+  return res;
+}
+
+/*
+** Lock the file with the lock specified by parameter locktype - one
+** of the following:
+**
+**     (1) SHARED_LOCK
+**     (2) RESERVED_LOCK
+**     (3) PENDING_LOCK
+**     (4) EXCLUSIVE_LOCK
+**
+** Sometimes when requesting one lock state, additional lock states
+** are inserted in between.  The locking might fail on one of the later
+** transitions leaving the lock state different from what it started but
+** still short of its goal.  The following chart shows the allowed
+** transitions and the inserted intermediate states:
+**
+**    UNLOCKED -> SHARED
+**    SHARED -> RESERVED
+**    SHARED -> (PENDING) -> EXCLUSIVE
+**    RESERVED -> (PENDING) -> EXCLUSIVE
+**    PENDING -> EXCLUSIVE
+**
+** This routine will only increase a lock.  The winUnlock() routine
+** erases all locks at once and returns us immediately to locking level 0.
+** It is not possible to lower the locking level one step at a time.  You
+** must go straight to locking level 0.
+*/
+static int winLock(sqlite3_file *id, int locktype){
+  int rc = SQLITE_OK;    /* Return code from subroutines */
+  int res = 1;           /* Result of a windows lock call */
+  int newLocktype;       /* Set pFile->locktype to this value before exiting */
+  int gotPendingLock = 0;/* True if we acquired a PENDING lock this time */
+  winFile *pFile = (winFile*)id;
+  DWORD error = NO_ERROR;
+
+  assert( id!=0 );
+  OSTRACE(("LOCK %d %d was %d(%d)\n",
+           pFile->h, locktype, pFile->locktype, pFile->sharedLockByte));
+
+  /* If there is already a lock of this type or more restrictive on the
+  ** OsFile, do nothing. Don't use the end_lock: exit path, as
+  ** sqlite3OsEnterMutex() hasn't been called yet.
+  */
+  if( pFile->locktype>=locktype ){
+    return SQLITE_OK;
+  }
+
+  /* Make sure the locking sequence is correct
+  */
+  assert( pFile->locktype!=NO_LOCK || locktype==SHARED_LOCK );
+  assert( locktype!=PENDING_LOCK );
+  assert( locktype!=RESERVED_LOCK || pFile->locktype==SHARED_LOCK );
+
+  /* Lock the PENDING_LOCK byte if we need to acquire a PENDING lock or
+  ** a SHARED lock.  If we are acquiring a SHARED lock, the acquisition of
+  ** the PENDING_LOCK byte is temporary.
+  */
+  newLocktype = pFile->locktype;
+  if(   (pFile->locktype==NO_LOCK)
+     || (   (locktype==EXCLUSIVE_LOCK)
+         && (pFile->locktype==RESERVED_LOCK))
+  ){
+    int cnt = 3;
+    while( cnt-->0 && (res = LockFile(pFile->h, PENDING_BYTE, 0, 1, 0))==0 ){
+      /* Try 3 times to get the pending lock.  The pending lock might be
+      ** held by another reader process who will release it momentarily.
+      */
+      OSTRACE(("could not get a PENDING lock. cnt=%d\n", cnt));
+      Sleep(1);
+    }
+    gotPendingLock = res;
+    if( !res ){
+      error = GetLastError();
+    }
+  }
+
+  /* Acquire a shared lock
+  */
+  if( locktype==SHARED_LOCK && res ){
+    assert( pFile->locktype==NO_LOCK );
+    res = getReadLock(pFile);
+    if( res ){
+      newLocktype = SHARED_LOCK;
+    }else{
+      error = GetLastError();
+    }
+  }
+
+  /* Acquire a RESERVED lock
+  */
+  if( locktype==RESERVED_LOCK && res ){
+    assert( pFile->locktype==SHARED_LOCK );
+    res = LockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
+    if( res ){
+      newLocktype = RESERVED_LOCK;
+    }else{
+      error = GetLastError();
+    }
+  }
+
+  /* Acquire a PENDING lock
+  */
+  if( locktype==EXCLUSIVE_LOCK && res ){
+    newLocktype = PENDING_LOCK;
+    gotPendingLock = 0;
+  }
+
+  /* Acquire an EXCLUSIVE lock
+  */
+  if( locktype==EXCLUSIVE_LOCK && res ){
+    assert( pFile->locktype>=SHARED_LOCK );
+    res = unlockReadLock(pFile);
+    OSTRACE(("unreadlock = %d\n", res));
+    res = LockFile(pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);
+    if( res ){
+      newLocktype = EXCLUSIVE_LOCK;
+    }else{
+      error = GetLastError();
+      OSTRACE(("error-code = %d\n", error));
+      getReadLock(pFile);
+    }
+  }
+
+  /* If we are holding a PENDING lock that ought to be released, then
+  ** release it now.
+  */
+  if( gotPendingLock && locktype==SHARED_LOCK ){
+    UnlockFile(pFile->h, PENDING_BYTE, 0, 1, 0);
+  }
+
+  /* Update the state of the lock has held in the file descriptor then
+  ** return the appropriate result code.
+  */
+  if( res ){
+    rc = SQLITE_OK;
+  }else{
+    OSTRACE(("LOCK FAILED %d trying for %d but got %d\n", pFile->h,
+           locktype, newLocktype));
+    pFile->lastErrno = error;
+    rc = SQLITE_BUSY;
+  }
+  pFile->locktype = (u8)newLocktype;
+  return rc;
+}
+
+/*
+** This routine checks if there is a RESERVED lock held on the specified
+** file by this or any other process. If such a lock is held, return
+** non-zero, otherwise zero.
+*/
+static int winCheckReservedLock(sqlite3_file *id, int *pResOut){
+  int rc;
+  winFile *pFile = (winFile*)id;
+
+  SimulateIOError( return SQLITE_IOERR_CHECKRESERVEDLOCK; );
+
+  assert( id!=0 );
+  if( pFile->locktype>=RESERVED_LOCK ){
+    rc = 1;
+    OSTRACE(("TEST WR-LOCK %d %d (local)\n", pFile->h, rc));
+  }else{
+    rc = LockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
+    if( rc ){
+      UnlockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
+    }
+    rc = !rc;
+    OSTRACE(("TEST WR-LOCK %d %d (remote)\n", pFile->h, rc));
+  }
+  *pResOut = rc;
+  return SQLITE_OK;
+}
+
+/*
+** Lower the locking level on file descriptor id to locktype.  locktype
+** must be either NO_LOCK or SHARED_LOCK.
+**
+** If the locking level of the file descriptor is already at or below
+** the requested locking level, this routine is a no-op.
+**
+** It is not possible for this routine to fail if the second argument
+** is NO_LOCK.  If the second argument is SHARED_LOCK then this routine
+** might return SQLITE_IOERR;
+*/
+static int winUnlock(sqlite3_file *id, int locktype){
+  int type;
+  winFile *pFile = (winFile*)id;
+  int rc = SQLITE_OK;
+  assert( pFile!=0 );
+  assert( locktype<=SHARED_LOCK );
+  OSTRACE(("UNLOCK %d to %d was %d(%d)\n", pFile->h, locktype,
+          pFile->locktype, pFile->sharedLockByte));
+  type = pFile->locktype;
+  if( type>=EXCLUSIVE_LOCK ){
+    UnlockFile(pFile->h, SHARED_FIRST, 0, SHARED_SIZE, 0);
+    if( locktype==SHARED_LOCK && !getReadLock(pFile) ){
+      /* This should never happen.  We should always be able to
+      ** reacquire the read lock */
+      rc = SQLITE_IOERR_UNLOCK;
+    }
+  }
+  if( type>=RESERVED_LOCK ){
+    UnlockFile(pFile->h, RESERVED_BYTE, 0, 1, 0);
+  }
+  if( locktype==NO_LOCK && type>=SHARED_LOCK ){
+    unlockReadLock(pFile);
+  }
+  if( type>=PENDING_LOCK ){
+    UnlockFile(pFile->h, PENDING_BYTE, 0, 1, 0);
+  }
+  pFile->locktype = (u8)locktype;
+  return rc;
+}
+
+/*
+** Control and query of the open file handle.
+*/
+static int winFileControl(sqlite3_file *id, int op, void *pArg){
+  switch( op ){
+    case SQLITE_FCNTL_LOCKSTATE: {
+      *(int*)pArg = ((winFile*)id)->locktype;
+      return SQLITE_OK;
+    }
+    case SQLITE_LAST_ERRNO: {
+      *(int*)pArg = (int)((winFile*)id)->lastErrno;
+      return SQLITE_OK;
+    }
+    case SQLITE_FCNTL_CHUNK_SIZE: {
+      ((winFile*)id)->szChunk = *(int *)pArg;
+      return SQLITE_OK;
+    }
+    case SQLITE_FCNTL_SIZE_HINT: {
+      sqlite3_int64 sz = *(sqlite3_int64*)pArg;
+      SimulateIOErrorBenign(1);
+      winTruncate(id, sz);
+      SimulateIOErrorBenign(0);
+      return SQLITE_OK;
+    }
+    case SQLITE_FCNTL_SYNC_OMITTED: {
+      return SQLITE_OK;
+    }
+  }
+  return SQLITE_NOTFOUND;
+}
+
+/*
+** Return the sector size in bytes of the underlying block device for
+** the specified file. This is almost always 512 bytes, but may be
+** larger for some devices.
+**
+** SQLite code assumes this function cannot fail. It also assumes that
+** if two files are created in the same file-system directory (i.e.
+** a database and its journal file) that the sector size will be the
+** same for both.
+*/
+static int winSectorSize(sqlite3_file *id){
+  assert( id!=0 );
+  return (int)(((winFile*)id)->sectorSize);
+}
+
+/*
+** Return a vector of device characteristics.
+*/
+static int winDeviceCharacteristics(sqlite3_file *id){
+  UNUSED_PARAMETER(id);
+  return SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN;
+}
+
+#ifndef SQLITE_OMIT_WAL
+
+/* 
+** Windows will only let you create file view mappings
+** on allocation size granularity boundaries.
+** During sqlite3_os_init() we do a GetSystemInfo()
+** to get the granularity size.
+*/
+SYSTEM_INFO winSysInfo;
+
+/*
+** Helper functions to obtain and relinquish the global mutex. The
+** global mutex is used to protect the winLockInfo objects used by 
+** this file, all of which may be shared by multiple threads.
+**
+** Function winShmMutexHeld() is used to assert() that the global mutex 
+** is held when required. This function is only used as part of assert() 
+** statements. e.g.
+**
+**   winShmEnterMutex()
+**     assert( winShmMutexHeld() );
+**   winShmLeaveMutex()
+*/
+static void winShmEnterMutex(void){
+  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+}
+static void winShmLeaveMutex(void){
+  sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+}
+#ifdef SQLITE_DEBUG
+static int winShmMutexHeld(void) {
+  return sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+}
+#endif
+
+/*
+** Object used to represent a single file opened and mmapped to provide
+** shared memory.  When multiple threads all reference the same
+** log-summary, each thread has its own winFile object, but they all
+** point to a single instance of this object.  In other words, each
+** log-summary is opened only once per process.
+**
+** winShmMutexHeld() must be true when creating or destroying
+** this object or while reading or writing the following fields:
+**
+**      nRef
+**      pNext 
+**
+** The following fields are read-only after the object is created:
+** 
+**      fid
+**      zFilename
+**
+** Either winShmNode.mutex must be held or winShmNode.nRef==0 and
+** winShmMutexHeld() is true when reading or writing any other field
+** in this structure.
+**
+*/
+struct winShmNode {
+  sqlite3_mutex *mutex;      /* Mutex to access this object */
+  char *zFilename;           /* Name of the file */
+  winFile hFile;             /* File handle from winOpen */
+
+  int szRegion;              /* Size of shared-memory regions */
+  int nRegion;               /* Size of array apRegion */
+  struct ShmRegion {
+    HANDLE hMap;             /* File handle from CreateFileMapping */
+    void *pMap;
+  } *aRegion;
+  DWORD lastErrno;           /* The Windows errno from the last I/O error */
+
+  int nRef;                  /* Number of winShm objects pointing to this */
+  winShm *pFirst;            /* All winShm objects pointing to this */
+  winShmNode *pNext;         /* Next in list of all winShmNode objects */
+#ifdef SQLITE_DEBUG
+  u8 nextShmId;              /* Next available winShm.id value */
+#endif
+};
+
+/*
+** A global array of all winShmNode objects.
+**
+** The winShmMutexHeld() must be true while reading or writing this list.
+*/
+static winShmNode *winShmNodeList = 0;
+
+/*
+** Structure used internally by this VFS to record the state of an
+** open shared memory connection.
+**
+** The following fields are initialized when this object is created and
+** are read-only thereafter:
+**
+**    winShm.pShmNode
+**    winShm.id
+**
+** All other fields are read/write.  The winShm.pShmNode->mutex must be held
+** while accessing any read/write fields.
+*/
+struct winShm {
+  winShmNode *pShmNode;      /* The underlying winShmNode object */
+  winShm *pNext;             /* Next winShm with the same winShmNode */
+  u8 hasMutex;               /* True if holding the winShmNode mutex */
+  u16 sharedMask;            /* Mask of shared locks held */
+  u16 exclMask;              /* Mask of exclusive locks held */
+#ifdef SQLITE_DEBUG
+  u8 id;                     /* Id of this connection with its winShmNode */
+#endif
+};
+
+/*
+** Constants used for locking
+*/
+#define WIN_SHM_BASE   ((22+SQLITE_SHM_NLOCK)*4)        /* first lock byte */
+#define WIN_SHM_DMS    (WIN_SHM_BASE+SQLITE_SHM_NLOCK)  /* deadman switch */
+
+/*
+** Apply advisory locks for all n bytes beginning at ofst.
+*/
+#define _SHM_UNLCK  1
+#define _SHM_RDLCK  2
+#define _SHM_WRLCK  3
+static int winShmSystemLock(
+  winShmNode *pFile,    /* Apply locks to this open shared-memory segment */
+  int lockType,         /* _SHM_UNLCK, _SHM_RDLCK, or _SHM_WRLCK */
+  int ofst,             /* Offset to first byte to be locked/unlocked */
+  int nByte             /* Number of bytes to lock or unlock */
+){
+  OVERLAPPED ovlp;
+  DWORD dwFlags;
+  int rc = 0;           /* Result code form Lock/UnlockFileEx() */
+
+  /* Access to the winShmNode object is serialized by the caller */
+  assert( sqlite3_mutex_held(pFile->mutex) || pFile->nRef==0 );
+
+  /* Initialize the locking parameters */
+  dwFlags = LOCKFILE_FAIL_IMMEDIATELY;
+  if( lockType == _SHM_WRLCK ) dwFlags |= LOCKFILE_EXCLUSIVE_LOCK;
+
+  memset(&ovlp, 0, sizeof(OVERLAPPED));
+  ovlp.Offset = ofst;
+
+  /* Release/Acquire the system-level lock */
+  if( lockType==_SHM_UNLCK ){
+    rc = UnlockFileEx(pFile->hFile.h, 0, nByte, 0, &ovlp);
+  }else{
+    rc = LockFileEx(pFile->hFile.h, dwFlags, 0, nByte, 0, &ovlp);
+  }
+  
+  if( rc!= 0 ){
+    rc = SQLITE_OK;
+  }else{
+    pFile->lastErrno =  GetLastError();
+    rc = SQLITE_BUSY;
+  }
+
+  OSTRACE(("SHM-LOCK %d %s %s 0x%08lx\n", 
+           pFile->hFile.h,
+           rc==SQLITE_OK ? "ok" : "failed",
+           lockType==_SHM_UNLCK ? "UnlockFileEx" : "LockFileEx",
+           pFile->lastErrno));
+
+  return rc;
+}
+
+/* Forward references to VFS methods */
+static int winOpen(sqlite3_vfs*,const char*,sqlite3_file*,int,int*);
+static int winDelete(sqlite3_vfs *,const char*,int);
+
+/*
+** Purge the winShmNodeList list of all entries with winShmNode.nRef==0.
+**
+** This is not a VFS shared-memory method; it is a utility function called
+** by VFS shared-memory methods.
+*/
+static void winShmPurge(sqlite3_vfs *pVfs, int deleteFlag){
+  winShmNode **pp;
+  winShmNode *p;
+  BOOL bRc;
+  assert( winShmMutexHeld() );
+  pp = &winShmNodeList;
+  while( (p = *pp)!=0 ){
+    if( p->nRef==0 ){
+      int i;
+      if( p->mutex ) sqlite3_mutex_free(p->mutex);
+      for(i=0; i<p->nRegion; i++){
+        bRc = UnmapViewOfFile(p->aRegion[i].pMap);
+        OSTRACE(("SHM-PURGE pid-%d unmap region=%d %s\n",
+                 (int)GetCurrentProcessId(), i,
+                 bRc ? "ok" : "failed"));
+        bRc = CloseHandle(p->aRegion[i].hMap);
+        OSTRACE(("SHM-PURGE pid-%d close region=%d %s\n",
+                 (int)GetCurrentProcessId(), i,
+                 bRc ? "ok" : "failed"));
+      }
+      if( p->hFile.h != INVALID_HANDLE_VALUE ){
+        SimulateIOErrorBenign(1);
+        winClose((sqlite3_file *)&p->hFile);
+        SimulateIOErrorBenign(0);
+      }
+      if( deleteFlag ){
+        SimulateIOErrorBenign(1);
+        winDelete(pVfs, p->zFilename, 0);
+        SimulateIOErrorBenign(0);
+      }
+      *pp = p->pNext;
+      sqlite3_free(p->aRegion);
+      sqlite3_free(p);
+    }else{
+      pp = &p->pNext;
+    }
+  }
+}
+
+/*
+** Open the shared-memory area associated with database file pDbFd.
+**
+** When opening a new shared-memory file, if no other instances of that
+** file are currently open, in this process or in other processes, then
+** the file must be truncated to zero length or have its header cleared.
+*/
+static int winOpenSharedMemory(winFile *pDbFd){
+  struct winShm *p;                  /* The connection to be opened */
+  struct winShmNode *pShmNode = 0;   /* The underlying mmapped file */
+  int rc;                            /* Result code */
+  struct winShmNode *pNew;           /* Newly allocated winShmNode */
+  int nName;                         /* Size of zName in bytes */
+
+  assert( pDbFd->pShm==0 );    /* Not previously opened */
+
+  /* Allocate space for the new sqlite3_shm object.  Also speculatively
+  ** allocate space for a new winShmNode and filename.
+  */
+  p = sqlite3_malloc( sizeof(*p) );
+  if( p==0 ) return SQLITE_NOMEM;
+  memset(p, 0, sizeof(*p));
+  nName = sqlite3Strlen30(pDbFd->zPath);
+  pNew = sqlite3_malloc( sizeof(*pShmNode) + nName + 15 );
+  if( pNew==0 ){
+    sqlite3_free(p);
+    return SQLITE_NOMEM;
+  }
+  memset(pNew, 0, sizeof(*pNew));
+  pNew->zFilename = (char*)&pNew[1];
+  sqlite3_snprintf(nName+15, pNew->zFilename, "%s-shm", pDbFd->zPath);
+
+  /* Look to see if there is an existing winShmNode that can be used.
+  ** If no matching winShmNode currently exists, create a new one.
+  */
+  winShmEnterMutex();
+  for(pShmNode = winShmNodeList; pShmNode; pShmNode=pShmNode->pNext){
+    /* TBD need to come up with better match here.  Perhaps
+    ** use FILE_ID_BOTH_DIR_INFO Structure.
+    */
+    if( sqlite3StrICmp(pShmNode->zFilename, pNew->zFilename)==0 ) break;
+  }
+  if( pShmNode ){
+    sqlite3_free(pNew);
+  }else{
+    pShmNode = pNew;
+    pNew = 0;
+    ((winFile*)(&pShmNode->hFile))->h = INVALID_HANDLE_VALUE;
+    pShmNode->pNext = winShmNodeList;
+    winShmNodeList = pShmNode;
+
+    pShmNode->mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_FAST);
+    if( pShmNode->mutex==0 ){
+      rc = SQLITE_NOMEM;
+      goto shm_open_err;
+    }
+
+    rc = winOpen(pDbFd->pVfs,
+                 pShmNode->zFilename,             /* Name of the file (UTF-8) */
+                 (sqlite3_file*)&pShmNode->hFile,  /* File handle here */
+                 SQLITE_OPEN_WAL | SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, /* Mode flags */
+                 0);
+    if( SQLITE_OK!=rc ){
+      rc = SQLITE_CANTOPEN_BKPT;
+      goto shm_open_err;
+    }
+
+    /* Check to see if another process is holding the dead-man switch.
+    ** If not, truncate the file to zero length. 
+    */
+    if( winShmSystemLock(pShmNode, _SHM_WRLCK, WIN_SHM_DMS, 1)==SQLITE_OK ){
+      rc = winTruncate((sqlite3_file *)&pShmNode->hFile, 0);
+      if( rc!=SQLITE_OK ){
+        rc = SQLITE_IOERR_SHMOPEN;
+      }
+    }
+    if( rc==SQLITE_OK ){
+      winShmSystemLock(pShmNode, _SHM_UNLCK, WIN_SHM_DMS, 1);
+      rc = winShmSystemLock(pShmNode, _SHM_RDLCK, WIN_SHM_DMS, 1);
+    }
+    if( rc ) goto shm_open_err;
+  }
+
+  /* Make the new connection a child of the winShmNode */
+  p->pShmNode = pShmNode;
+#ifdef SQLITE_DEBUG
+  p->id = pShmNode->nextShmId++;
+#endif
+  pShmNode->nRef++;
+  pDbFd->pShm = p;
+  winShmLeaveMutex();
+
+  /* The reference count on pShmNode has already been incremented under
+  ** the cover of the winShmEnterMutex() mutex and the pointer from the
+  ** new (struct winShm) object to the pShmNode has been set. All that is
+  ** left to do is to link the new object into the linked list starting
+  ** at pShmNode->pFirst. This must be done while holding the pShmNode->mutex 
+  ** mutex.
+  */
+  sqlite3_mutex_enter(pShmNode->mutex);
+  p->pNext = pShmNode->pFirst;
+  pShmNode->pFirst = p;
+  sqlite3_mutex_leave(pShmNode->mutex);
+  return SQLITE_OK;
+
+  /* Jump here on any error */
+shm_open_err:
+  winShmSystemLock(pShmNode, _SHM_UNLCK, WIN_SHM_DMS, 1);
+  winShmPurge(pDbFd->pVfs, 0);      /* This call frees pShmNode if required */
+  sqlite3_free(p);
+  sqlite3_free(pNew);
+  winShmLeaveMutex();
+  return rc;
+}
+
+/*
+** Close a connection to shared-memory.  Delete the underlying 
+** storage if deleteFlag is true.
+*/
+static int winShmUnmap(
+  sqlite3_file *fd,          /* Database holding shared memory */
+  int deleteFlag             /* Delete after closing if true */
+){
+  winFile *pDbFd;       /* Database holding shared-memory */
+  winShm *p;            /* The connection to be closed */
+  winShmNode *pShmNode; /* The underlying shared-memory file */
+  winShm **pp;          /* For looping over sibling connections */
+
+  pDbFd = (winFile*)fd;
+  p = pDbFd->pShm;
+  if( p==0 ) return SQLITE_OK;
+  pShmNode = p->pShmNode;
+
+  /* Remove connection p from the set of connections associated
+  ** with pShmNode */
+  sqlite3_mutex_enter(pShmNode->mutex);
+  for(pp=&pShmNode->pFirst; (*pp)!=p; pp = &(*pp)->pNext){}
+  *pp = p->pNext;
+
+  /* Free the connection p */
+  sqlite3_free(p);
+  pDbFd->pShm = 0;
+  sqlite3_mutex_leave(pShmNode->mutex);
+
+  /* If pShmNode->nRef has reached 0, then close the underlying
+  ** shared-memory file, too */
+  winShmEnterMutex();
+  assert( pShmNode->nRef>0 );
+  pShmNode->nRef--;
+  if( pShmNode->nRef==0 ){
+    winShmPurge(pDbFd->pVfs, deleteFlag);
+  }
+  winShmLeaveMutex();
+
+  return SQLITE_OK;
+}
+
+/*
+** Change the lock state for a shared-memory segment.
+*/
+static int winShmLock(
+  sqlite3_file *fd,          /* Database file holding the shared memory */
+  int ofst,                  /* First lock to acquire or release */
+  int n,                     /* Number of locks to acquire or release */
+  int flags                  /* What to do with the lock */
+){
+  winFile *pDbFd = (winFile*)fd;        /* Connection holding shared memory */
+  winShm *p = pDbFd->pShm;              /* The shared memory being locked */
+  winShm *pX;                           /* For looping over all siblings */
+  winShmNode *pShmNode = p->pShmNode;
+  int rc = SQLITE_OK;                   /* Result code */
+  u16 mask;                             /* Mask of locks to take or release */
+
+  assert( ofst>=0 && ofst+n<=SQLITE_SHM_NLOCK );
+  assert( n>=1 );
+  assert( flags==(SQLITE_SHM_LOCK | SQLITE_SHM_SHARED)
+       || flags==(SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE)
+       || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED)
+       || flags==(SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE) );
+  assert( n==1 || (flags & SQLITE_SHM_EXCLUSIVE)!=0 );
+
+  mask = (u16)((1U<<(ofst+n)) - (1U<<ofst));
+  assert( n>1 || mask==(1<<ofst) );
+  sqlite3_mutex_enter(pShmNode->mutex);
+  if( flags & SQLITE_SHM_UNLOCK ){
+    u16 allMask = 0; /* Mask of locks held by siblings */
+
+    /* See if any siblings hold this same lock */
+    for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
+      if( pX==p ) continue;
+      assert( (pX->exclMask & (p->exclMask|p->sharedMask))==0 );
+      allMask |= pX->sharedMask;
+    }
+
+    /* Unlock the system-level locks */
+    if( (mask & allMask)==0 ){
+      rc = winShmSystemLock(pShmNode, _SHM_UNLCK, ofst+WIN_SHM_BASE, n);
+    }else{
+      rc = SQLITE_OK;
+    }
+
+    /* Undo the local locks */
+    if( rc==SQLITE_OK ){
+      p->exclMask &= ~mask;
+      p->sharedMask &= ~mask;
+    } 
+  }else if( flags & SQLITE_SHM_SHARED ){
+    u16 allShared = 0;  /* Union of locks held by connections other than "p" */
+
+    /* Find out which shared locks are already held by sibling connections.
+    ** If any sibling already holds an exclusive lock, go ahead and return
+    ** SQLITE_BUSY.
+    */
+    for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
+      if( (pX->exclMask & mask)!=0 ){
+        rc = SQLITE_BUSY;
+        break;
+      }
+      allShared |= pX->sharedMask;
+    }
+
+    /* Get shared locks at the system level, if necessary */
+    if( rc==SQLITE_OK ){
+      if( (allShared & mask)==0 ){
+        rc = winShmSystemLock(pShmNode, _SHM_RDLCK, ofst+WIN_SHM_BASE, n);
+      }else{
+        rc = SQLITE_OK;
+      }
+    }
+
+    /* Get the local shared locks */
+    if( rc==SQLITE_OK ){
+      p->sharedMask |= mask;
+    }
+  }else{
+    /* Make sure no sibling connections hold locks that will block this
+    ** lock.  If any do, return SQLITE_BUSY right away.
+    */
+    for(pX=pShmNode->pFirst; pX; pX=pX->pNext){
+      if( (pX->exclMask & mask)!=0 || (pX->sharedMask & mask)!=0 ){
+        rc = SQLITE_BUSY;
+        break;
+      }
+    }
+  
+    /* Get the exclusive locks at the system level.  Then if successful
+    ** also mark the local connection as being locked.
+    */
+    if( rc==SQLITE_OK ){
+      rc = winShmSystemLock(pShmNode, _SHM_WRLCK, ofst+WIN_SHM_BASE, n);
+      if( rc==SQLITE_OK ){
+        assert( (p->sharedMask & mask)==0 );
+        p->exclMask |= mask;
+      }
+    }
+  }
+  sqlite3_mutex_leave(pShmNode->mutex);
+  OSTRACE(("SHM-LOCK shmid-%d, pid-%d got %03x,%03x %s\n",
+           p->id, (int)GetCurrentProcessId(), p->sharedMask, p->exclMask,
+           rc ? "failed" : "ok"));
+  return rc;
+}
+
+/*
+** Implement a memory barrier or memory fence on shared memory.  
+**
+** All loads and stores begun before the barrier must complete before
+** any load or store begun after the barrier.
+*/
+static void winShmBarrier(
+  sqlite3_file *fd          /* Database holding the shared memory */
+){
+  UNUSED_PARAMETER(fd);
+  /* MemoryBarrier(); // does not work -- do not know why not */
+  winShmEnterMutex();
+  winShmLeaveMutex();
+}
+
+/*
+** This function is called to obtain a pointer to region iRegion of the 
+** shared-memory associated with the database file fd. Shared-memory regions 
+** are numbered starting from zero. Each shared-memory region is szRegion 
+** bytes in size.
+**
+** If an error occurs, an error code is returned and *pp is set to NULL.
+**
+** Otherwise, if the isWrite parameter is 0 and the requested shared-memory
+** region has not been allocated (by any client, including one running in a
+** separate process), then *pp is set to NULL and SQLITE_OK returned. If 
+** isWrite is non-zero and the requested shared-memory region has not yet 
+** been allocated, it is allocated by this function.
+**
+** If the shared-memory region has already been allocated or is allocated by
+** this call as described above, then it is mapped into this processes 
+** address space (if it is not already), *pp is set to point to the mapped 
+** memory and SQLITE_OK returned.
+*/
+static int winShmMap(
+  sqlite3_file *fd,               /* Handle open on database file */
+  int iRegion,                    /* Region to retrieve */
+  int szRegion,                   /* Size of regions */
+  int isWrite,                    /* True to extend file if necessary */
+  void volatile **pp              /* OUT: Mapped memory */
+){
+  winFile *pDbFd = (winFile*)fd;
+  winShm *p = pDbFd->pShm;
+  winShmNode *pShmNode;
+  int rc = SQLITE_OK;
+
+  if( !p ){
+    rc = winOpenSharedMemory(pDbFd);
+    if( rc!=SQLITE_OK ) return rc;
+    p = pDbFd->pShm;
+  }
+  pShmNode = p->pShmNode;
+
+  sqlite3_mutex_enter(pShmNode->mutex);
+  assert( szRegion==pShmNode->szRegion || pShmNode->nRegion==0 );
+
+  if( pShmNode->nRegion<=iRegion ){
+    struct ShmRegion *apNew;           /* New aRegion[] array */
+    int nByte = (iRegion+1)*szRegion;  /* Minimum required file size */
+    sqlite3_int64 sz;                  /* Current size of wal-index file */
+
+    pShmNode->szRegion = szRegion;
+
+    /* The requested region is not mapped into this processes address space.
+    ** Check to see if it has been allocated (i.e. if the wal-index file is
+    ** large enough to contain the requested region).
+    */
+    rc = winFileSize((sqlite3_file *)&pShmNode->hFile, &sz);
+    if( rc!=SQLITE_OK ){
+      rc = SQLITE_IOERR_SHMSIZE;
+      goto shmpage_out;
+    }
+
+    if( sz<nByte ){
+      /* The requested memory region does not exist. If isWrite is set to
+      ** zero, exit early. *pp will be set to NULL and SQLITE_OK returned.
+      **
+      ** Alternatively, if isWrite is non-zero, use ftruncate() to allocate
+      ** the requested memory region.
+      */
+      if( !isWrite ) goto shmpage_out;
+      rc = winTruncate((sqlite3_file *)&pShmNode->hFile, nByte);
+      if( rc!=SQLITE_OK ){
+        rc = SQLITE_IOERR_SHMSIZE;
+        goto shmpage_out;
+      }
+    }
+
+    /* Map the requested memory region into this processes address space. */
+    apNew = (struct ShmRegion *)sqlite3_realloc(
+        pShmNode->aRegion, (iRegion+1)*sizeof(apNew[0])
+    );
+    if( !apNew ){
+      rc = SQLITE_IOERR_NOMEM;
+      goto shmpage_out;
+    }
+    pShmNode->aRegion = apNew;
+
+    while( pShmNode->nRegion<=iRegion ){
+      HANDLE hMap;                /* file-mapping handle */
+      void *pMap = 0;             /* Mapped memory region */
+     
+      hMap = CreateFileMapping(pShmNode->hFile.h, 
+          NULL, PAGE_READWRITE, 0, nByte, NULL
+      );
+      OSTRACE(("SHM-MAP pid-%d create region=%d nbyte=%d %s\n",
+               (int)GetCurrentProcessId(), pShmNode->nRegion, nByte,
+               hMap ? "ok" : "failed"));
+      if( hMap ){
+        int iOffset = pShmNode->nRegion*szRegion;
+        int iOffsetShift = iOffset % winSysInfo.dwAllocationGranularity;
+        pMap = MapViewOfFile(hMap, FILE_MAP_WRITE | FILE_MAP_READ,
+            0, iOffset - iOffsetShift, szRegion + iOffsetShift
+        );
+        OSTRACE(("SHM-MAP pid-%d map region=%d offset=%d size=%d %s\n",
+                 (int)GetCurrentProcessId(), pShmNode->nRegion, iOffset, szRegion,
+                 pMap ? "ok" : "failed"));
+      }
+      if( !pMap ){
+        pShmNode->lastErrno = GetLastError();
+        rc = SQLITE_IOERR;
+        if( hMap ) CloseHandle(hMap);
+        goto shmpage_out;
+      }
+
+      pShmNode->aRegion[pShmNode->nRegion].pMap = pMap;
+      pShmNode->aRegion[pShmNode->nRegion].hMap = hMap;
+      pShmNode->nRegion++;
+    }
+  }
+
+shmpage_out:
+  if( pShmNode->nRegion>iRegion ){
+    int iOffset = iRegion*szRegion;
+    int iOffsetShift = iOffset % winSysInfo.dwAllocationGranularity;
+    char *p = (char *)pShmNode->aRegion[iRegion].pMap;
+    *pp = (void *)&p[iOffsetShift];
+  }else{
+    *pp = 0;
+  }
+  sqlite3_mutex_leave(pShmNode->mutex);
+  return rc;
+}
+
+#else
+# define winShmMap     0
+# define winShmLock    0
+# define winShmBarrier 0
+# define winShmUnmap   0
+#endif /* #ifndef SQLITE_OMIT_WAL */
+
+/*
+** Here ends the implementation of all sqlite3_file methods.
+**
+********************** End sqlite3_file Methods *******************************
+******************************************************************************/
+
+/*
+** This vector defines all the methods that can operate on an
+** sqlite3_file for win32.
+*/
+static const sqlite3_io_methods winIoMethod = {
+  2,                              /* iVersion */
+  winClose,                       /* xClose */
+  winRead,                        /* xRead */
+  winWrite,                       /* xWrite */
+  winTruncate,                    /* xTruncate */
+  winSync,                        /* xSync */
+  winFileSize,                    /* xFileSize */
+  winLock,                        /* xLock */
+  winUnlock,                      /* xUnlock */
+  winCheckReservedLock,           /* xCheckReservedLock */
+  winFileControl,                 /* xFileControl */
+  winSectorSize,                  /* xSectorSize */
+  winDeviceCharacteristics,       /* xDeviceCharacteristics */
+  winShmMap,                      /* xShmMap */
+  winShmLock,                     /* xShmLock */
+  winShmBarrier,                  /* xShmBarrier */
+  winShmUnmap                     /* xShmUnmap */
+};
+
+/****************************************************************************
+**************************** sqlite3_vfs methods ****************************
+**
+** This division contains the implementation of methods on the
+** sqlite3_vfs object.
+*/
+
+/*
+** Convert a UTF-8 filename into whatever form the underlying
+** operating system wants filenames in.  Space to hold the result
+** is obtained from malloc and must be freed by the calling
+** function.
+*/
+static void *convertUtf8Filename(const char *zFilename){
+  void *zConverted = 0;
+  if( isNT() ){
+    zConverted = utf8ToUnicode(zFilename);
+/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
+*/
+#if SQLITE_OS_WINCE==0
+  }else{
+    zConverted = utf8ToMbcs(zFilename);
+#endif
+  }
+  /* caller will handle out of memory */
+  return zConverted;
+}
+
+/*
+** Create a temporary file name in zBuf.  zBuf must be big enough to
+** hold at pVfs->mxPathname characters.
+*/
+static int getTempname(int nBuf, char *zBuf){
+  static char zChars[] =
+    "abcdefghijklmnopqrstuvwxyz"
+    "ABCDEFGHIJKLMNOPQRSTUVWXYZ"
+    "0123456789";
+  size_t i, j;
+  char zTempPath[MAX_PATH+1];
+
+  /* It's odd to simulate an io-error here, but really this is just
+  ** using the io-error infrastructure to test that SQLite handles this
+  ** function failing. 
+  */
+  SimulateIOError( return SQLITE_IOERR );
+
+  if( sqlite3_temp_directory ){
+    sqlite3_snprintf(MAX_PATH-30, zTempPath, "%s", sqlite3_temp_directory);
+  }else if( isNT() ){
+    char *zMulti;
+    WCHAR zWidePath[MAX_PATH];
+    GetTempPathW(MAX_PATH-30, zWidePath);
+    zMulti = unicodeToUtf8(zWidePath);
+    if( zMulti ){
+      sqlite3_snprintf(MAX_PATH-30, zTempPath, "%s", zMulti);
+      free(zMulti);
+    }else{
+      return SQLITE_NOMEM;
+    }
+/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
+** Since the ASCII version of these Windows API do not exist for WINCE,
+** it's important to not reference them for WINCE builds.
+*/
+#if SQLITE_OS_WINCE==0
+  }else{
+    char *zUtf8;
+    char zMbcsPath[MAX_PATH];
+    GetTempPathA(MAX_PATH-30, zMbcsPath);
+    zUtf8 = sqlite3_win32_mbcs_to_utf8(zMbcsPath);
+    if( zUtf8 ){
+      sqlite3_snprintf(MAX_PATH-30, zTempPath, "%s", zUtf8);
+      free(zUtf8);
+    }else{
+      return SQLITE_NOMEM;
+    }
+#endif
+  }
+
+  /* Check that the output buffer is large enough for the temporary file 
+  ** name. If it is not, return SQLITE_ERROR.
+  */
+  if( (sqlite3Strlen30(zTempPath) + sqlite3Strlen30(SQLITE_TEMP_FILE_PREFIX) + 17) >= nBuf ){
+    return SQLITE_ERROR;
+  }
+
+  for(i=sqlite3Strlen30(zTempPath); i>0 && zTempPath[i-1]=='\\'; i--){}
+  zTempPath[i] = 0;
+
+  sqlite3_snprintf(nBuf-17, zBuf,
+                   "%s\\"SQLITE_TEMP_FILE_PREFIX, zTempPath);
+  j = sqlite3Strlen30(zBuf);
+  sqlite3_randomness(15, &zBuf[j]);
+  for(i=0; i<15; i++, j++){
+    zBuf[j] = (char)zChars[ ((unsigned char)zBuf[j])%(sizeof(zChars)-1) ];
+  }
+  zBuf[j] = 0;
+
+  OSTRACE(("TEMP FILENAME: %s\n", zBuf));
+  return SQLITE_OK; 
+}
+
+/*
+** The return value of getLastErrorMsg
+** is zero if the error message fits in the buffer, or non-zero
+** otherwise (if the message was truncated).
+*/
+static int getLastErrorMsg(int nBuf, char *zBuf){
+  /* FormatMessage returns 0 on failure.  Otherwise it
+  ** returns the number of TCHARs written to the output
+  ** buffer, excluding the terminating null char.
+  */
+  DWORD error = GetLastError();
+  DWORD dwLen = 0;
+  char *zOut = 0;
+
+  if( isNT() ){
+    WCHAR *zTempWide = NULL;
+    dwLen = FormatMessageW(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+                           NULL,
+                           error,
+                           0,
+                           (LPWSTR) &zTempWide,
+                           0,
+                           0);
+    if( dwLen > 0 ){
+      /* allocate a buffer and convert to UTF8 */
+      zOut = unicodeToUtf8(zTempWide);
+      /* free the system buffer allocated by FormatMessage */
+      LocalFree(zTempWide);
+    }
+/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
+** Since the ASCII version of these Windows API do not exist for WINCE,
+** it's important to not reference them for WINCE builds.
+*/
+#if SQLITE_OS_WINCE==0
+  }else{
+    char *zTemp = NULL;
+    dwLen = FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM | FORMAT_MESSAGE_IGNORE_INSERTS,
+                           NULL,
+                           error,
+                           0,
+                           (LPSTR) &zTemp,
+                           0,
+                           0);
+    if( dwLen > 0 ){
+      /* allocate a buffer and convert to UTF8 */
+      zOut = sqlite3_win32_mbcs_to_utf8(zTemp);
+      /* free the system buffer allocated by FormatMessage */
+      LocalFree(zTemp);
+    }
+#endif
+  }
+  if( 0 == dwLen ){
+    sqlite3_snprintf(nBuf, zBuf, "OsError 0x%x (%u)", error, error);
+  }else{
+    /* copy a maximum of nBuf chars to output buffer */
+    sqlite3_snprintf(nBuf, zBuf, "%s", zOut);
+    /* free the UTF8 buffer */
+    free(zOut);
+  }
+  return 0;
+}
+
+/*
+** Open a file.
+*/
+static int winOpen(
+  sqlite3_vfs *pVfs,        /* Not used */
+  const char *zName,        /* Name of the file (UTF-8) */
+  sqlite3_file *id,         /* Write the SQLite file handle here */
+  int flags,                /* Open mode flags */
+  int *pOutFlags            /* Status return flags */
+){
+  HANDLE h;
+  DWORD dwDesiredAccess;
+  DWORD dwShareMode;
+  DWORD dwCreationDisposition;
+  DWORD dwFlagsAndAttributes = 0;
+#if SQLITE_OS_WINCE
+  int isTemp = 0;
+#endif
+  winFile *pFile = (winFile*)id;
+  void *zConverted;              /* Filename in OS encoding */
+  const char *zUtf8Name = zName; /* Filename in UTF-8 encoding */
+
+  /* If argument zPath is a NULL pointer, this function is required to open
+  ** a temporary file. Use this buffer to store the file name in.
+  */
+  char zTmpname[MAX_PATH+1];     /* Buffer used to create temp filename */
+
+  int rc = SQLITE_OK;            /* Function Return Code */
+#if !defined(NDEBUG) || SQLITE_OS_WINCE
+  int eType = flags&0xFFFFFF00;  /* Type of file to open */
+#endif
+
+  int isExclusive  = (flags & SQLITE_OPEN_EXCLUSIVE);
+  int isDelete     = (flags & SQLITE_OPEN_DELETEONCLOSE);
+  int isCreate     = (flags & SQLITE_OPEN_CREATE);
+#ifndef NDEBUG
+  int isReadonly   = (flags & SQLITE_OPEN_READONLY);
+#endif
+  int isReadWrite  = (flags & SQLITE_OPEN_READWRITE);
+
+#ifndef NDEBUG
+  int isOpenJournal = (isCreate && (
+        eType==SQLITE_OPEN_MASTER_JOURNAL 
+     || eType==SQLITE_OPEN_MAIN_JOURNAL 
+     || eType==SQLITE_OPEN_WAL
+  ));
+#endif
+
+  /* Check the following statements are true: 
+  **
+  **   (a) Exactly one of the READWRITE and READONLY flags must be set, and 
+  **   (b) if CREATE is set, then READWRITE must also be set, and
+  **   (c) if EXCLUSIVE is set, then CREATE must also be set.
+  **   (d) if DELETEONCLOSE is set, then CREATE must also be set.
+  */
+  assert((isReadonly==0 || isReadWrite==0) && (isReadWrite || isReadonly));
+  assert(isCreate==0 || isReadWrite);
+  assert(isExclusive==0 || isCreate);
+  assert(isDelete==0 || isCreate);
+
+  /* The main DB, main journal, WAL file and master journal are never 
+  ** automatically deleted. Nor are they ever temporary files.  */
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_DB );
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MAIN_JOURNAL );
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_MASTER_JOURNAL );
+  assert( (!isDelete && zName) || eType!=SQLITE_OPEN_WAL );
+
+  /* Assert that the upper layer has set one of the "file-type" flags. */
+  assert( eType==SQLITE_OPEN_MAIN_DB      || eType==SQLITE_OPEN_TEMP_DB 
+       || eType==SQLITE_OPEN_MAIN_JOURNAL || eType==SQLITE_OPEN_TEMP_JOURNAL 
+       || eType==SQLITE_OPEN_SUBJOURNAL   || eType==SQLITE_OPEN_MASTER_JOURNAL 
+       || eType==SQLITE_OPEN_TRANSIENT_DB || eType==SQLITE_OPEN_WAL
+  );
+
+  assert( id!=0 );
+  UNUSED_PARAMETER(pVfs);
+
+  pFile->h = INVALID_HANDLE_VALUE;
+
+  /* If the second argument to this function is NULL, generate a 
+  ** temporary file name to use 
+  */
+  if( !zUtf8Name ){
+    assert(isDelete && !isOpenJournal);
+    rc = getTempname(MAX_PATH+1, zTmpname);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+    zUtf8Name = zTmpname;
+  }
+
+  /* Convert the filename to the system encoding. */
+  zConverted = convertUtf8Filename(zUtf8Name);
+  if( zConverted==0 ){
+    return SQLITE_NOMEM;
+  }
+
+  if( isReadWrite ){
+    dwDesiredAccess = GENERIC_READ | GENERIC_WRITE;
+  }else{
+    dwDesiredAccess = GENERIC_READ;
+  }
+
+  /* SQLITE_OPEN_EXCLUSIVE is used to make sure that a new file is 
+  ** created. SQLite doesn't use it to indicate "exclusive access" 
+  ** as it is usually understood.
+  */
+  if( isExclusive ){
+    /* Creates a new file, only if it does not already exist. */
+    /* If the file exists, it fails. */
+    dwCreationDisposition = CREATE_NEW;
+  }else if( isCreate ){
+    /* Open existing file, or create if it doesn't exist */
+    dwCreationDisposition = OPEN_ALWAYS;
+  }else{
+    /* Opens a file, only if it exists. */
+    dwCreationDisposition = OPEN_EXISTING;
+  }
+
+  dwShareMode = FILE_SHARE_READ | FILE_SHARE_WRITE;
+
+  if( isDelete ){
+#if SQLITE_OS_WINCE
+    dwFlagsAndAttributes = FILE_ATTRIBUTE_HIDDEN;
+    isTemp = 1;
+#else
+    dwFlagsAndAttributes = FILE_ATTRIBUTE_TEMPORARY
+                               | FILE_ATTRIBUTE_HIDDEN
+                               | FILE_FLAG_DELETE_ON_CLOSE;
+#endif
+  }else{
+    dwFlagsAndAttributes = FILE_ATTRIBUTE_NORMAL;
+  }
+  /* Reports from the internet are that performance is always
+  ** better if FILE_FLAG_RANDOM_ACCESS is used.  Ticket #2699. */
+#if SQLITE_OS_WINCE
+  dwFlagsAndAttributes |= FILE_FLAG_RANDOM_ACCESS;
+#endif
+
+  if( isNT() ){
+    h = CreateFileW((WCHAR*)zConverted,
+       dwDesiredAccess,
+       dwShareMode,
+       NULL,
+       dwCreationDisposition,
+       dwFlagsAndAttributes,
+       NULL
+    );
+/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
+** Since the ASCII version of these Windows API do not exist for WINCE,
+** it's important to not reference them for WINCE builds.
+*/
+#if SQLITE_OS_WINCE==0
+  }else{
+    h = CreateFileA((char*)zConverted,
+       dwDesiredAccess,
+       dwShareMode,
+       NULL,
+       dwCreationDisposition,
+       dwFlagsAndAttributes,
+       NULL
+    );
+#endif
+  }
+
+  OSTRACE(("OPEN %d %s 0x%lx %s\n", 
+           h, zName, dwDesiredAccess, 
+           h==INVALID_HANDLE_VALUE ? "failed" : "ok"));
+
+  if( h==INVALID_HANDLE_VALUE ){
+    pFile->lastErrno = GetLastError();
+    free(zConverted);
+    if( isReadWrite ){
+      return winOpen(pVfs, zName, id, 
+             ((flags|SQLITE_OPEN_READONLY)&~(SQLITE_OPEN_CREATE|SQLITE_OPEN_READWRITE)), pOutFlags);
+    }else{
+      return SQLITE_CANTOPEN_BKPT;
+    }
+  }
+
+  if( pOutFlags ){
+    if( isReadWrite ){
+      *pOutFlags = SQLITE_OPEN_READWRITE;
+    }else{
+      *pOutFlags = SQLITE_OPEN_READONLY;
+    }
+  }
+
+  memset(pFile, 0, sizeof(*pFile));
+  pFile->pMethod = &winIoMethod;
+  pFile->h = h;
+  pFile->lastErrno = NO_ERROR;
+  pFile->pVfs = pVfs;
+  pFile->pShm = 0;
+  pFile->zPath = zName;
+  pFile->sectorSize = getSectorSize(pVfs, zUtf8Name);
+
+#if SQLITE_OS_WINCE
+  if( isReadWrite && eType==SQLITE_OPEN_MAIN_DB
+       && !winceCreateLock(zName, pFile)
+  ){
+    CloseHandle(h);
+    free(zConverted);
+    return SQLITE_CANTOPEN_BKPT;
+  }
+  if( isTemp ){
+    pFile->zDeleteOnClose = zConverted;
+  }else
+#endif
+  {
+    free(zConverted);
+  }
+
+  OpenCounter(+1);
+  return rc;
+}
+
+/*
+** Delete the named file.
+**
+** Note that windows does not allow a file to be deleted if some other
+** process has it open.  Sometimes a virus scanner or indexing program
+** will open a journal file shortly after it is created in order to do
+** whatever it does.  While this other process is holding the
+** file open, we will be unable to delete it.  To work around this
+** problem, we delay 100 milliseconds and try to delete again.  Up
+** to MX_DELETION_ATTEMPTs deletion attempts are run before giving
+** up and returning an error.
+*/
+#define MX_DELETION_ATTEMPTS 5
+static int winDelete(
+  sqlite3_vfs *pVfs,          /* Not used on win32 */
+  const char *zFilename,      /* Name of file to delete */
+  int syncDir                 /* Not used on win32 */
+){
+  int cnt = 0;
+  DWORD rc;
+  DWORD error = 0;
+  void *zConverted;
+  UNUSED_PARAMETER(pVfs);
+  UNUSED_PARAMETER(syncDir);
+
+  SimulateIOError(return SQLITE_IOERR_DELETE);
+  zConverted = convertUtf8Filename(zFilename);
+  if( zConverted==0 ){
+    return SQLITE_NOMEM;
+  }
+  if( isNT() ){
+    do{
+      DeleteFileW(zConverted);
+    }while(   (   ((rc = GetFileAttributesW(zConverted)) != INVALID_FILE_ATTRIBUTES)
+               || ((error = GetLastError()) == ERROR_ACCESS_DENIED))
+           && (++cnt < MX_DELETION_ATTEMPTS)
+           && (Sleep(100), 1) );
+/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
+** Since the ASCII version of these Windows API do not exist for WINCE,
+** it's important to not reference them for WINCE builds.
+*/
+#if SQLITE_OS_WINCE==0
+  }else{
+    do{
+      DeleteFileA(zConverted);
+    }while(   (   ((rc = GetFileAttributesA(zConverted)) != INVALID_FILE_ATTRIBUTES)
+               || ((error = GetLastError()) == ERROR_ACCESS_DENIED))
+           && (++cnt < MX_DELETION_ATTEMPTS)
+           && (Sleep(100), 1) );
+#endif
+  }
+  free(zConverted);
+  OSTRACE(("DELETE \"%s\" %s\n", zFilename,
+       ( (rc==INVALID_FILE_ATTRIBUTES) && (error==ERROR_FILE_NOT_FOUND)) ?
+         "ok" : "failed" ));
+ 
+  return (   (rc == INVALID_FILE_ATTRIBUTES) 
+          && (error == ERROR_FILE_NOT_FOUND)) ? SQLITE_OK : SQLITE_IOERR_DELETE;
+}
+
+/*
+** Check the existance and status of a file.
+*/
+static int winAccess(
+  sqlite3_vfs *pVfs,         /* Not used on win32 */
+  const char *zFilename,     /* Name of file to check */
+  int flags,                 /* Type of test to make on this file */
+  int *pResOut               /* OUT: Result */
+){
+  DWORD attr;
+  int rc = 0;
+  void *zConverted;
+  UNUSED_PARAMETER(pVfs);
+
+  SimulateIOError( return SQLITE_IOERR_ACCESS; );
+  zConverted = convertUtf8Filename(zFilename);
+  if( zConverted==0 ){
+    return SQLITE_NOMEM;
+  }
+  if( isNT() ){
+    WIN32_FILE_ATTRIBUTE_DATA sAttrData;
+    memset(&sAttrData, 0, sizeof(sAttrData));
+    if( GetFileAttributesExW((WCHAR*)zConverted,
+                             GetFileExInfoStandard, 
+                             &sAttrData) ){
+      /* For an SQLITE_ACCESS_EXISTS query, treat a zero-length file
+      ** as if it does not exist.
+      */
+      if(    flags==SQLITE_ACCESS_EXISTS
+          && sAttrData.nFileSizeHigh==0 
+          && sAttrData.nFileSizeLow==0 ){
+        attr = INVALID_FILE_ATTRIBUTES;
+      }else{
+        attr = sAttrData.dwFileAttributes;
+      }
+    }else{
+      if( GetLastError()!=ERROR_FILE_NOT_FOUND ){
+        free(zConverted);
+        return SQLITE_IOERR_ACCESS;
+      }else{
+        attr = INVALID_FILE_ATTRIBUTES;
+      }
+    }
+/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
+** Since the ASCII version of these Windows API do not exist for WINCE,
+** it's important to not reference them for WINCE builds.
+*/
+#if SQLITE_OS_WINCE==0
+  }else{
+    attr = GetFileAttributesA((char*)zConverted);
+#endif
+  }
+  free(zConverted);
+  switch( flags ){
+    case SQLITE_ACCESS_READ:
+    case SQLITE_ACCESS_EXISTS:
+      rc = attr!=INVALID_FILE_ATTRIBUTES;
+      break;
+    case SQLITE_ACCESS_READWRITE:
+      rc = (attr & FILE_ATTRIBUTE_READONLY)==0;
+      break;
+    default:
+      assert(!"Invalid flags argument");
+  }
+  *pResOut = rc;
+  return SQLITE_OK;
+}
+
+
+/*
+** Turn a relative pathname into a full pathname.  Write the full
+** pathname into zOut[].  zOut[] will be at least pVfs->mxPathname
+** bytes in size.
+*/
+static int winFullPathname(
+  sqlite3_vfs *pVfs,            /* Pointer to vfs object */
+  const char *zRelative,        /* Possibly relative input path */
+  int nFull,                    /* Size of output buffer in bytes */
+  char *zFull                   /* Output buffer */
+){
+  
+#if defined(__CYGWIN__)
+  SimulateIOError( return SQLITE_ERROR );
+  UNUSED_PARAMETER(nFull);
+  cygwin_conv_to_full_win32_path(zRelative, zFull);
+  return SQLITE_OK;
+#endif
+
+#if SQLITE_OS_WINCE
+  SimulateIOError( return SQLITE_ERROR );
+  UNUSED_PARAMETER(nFull);
+  /* WinCE has no concept of a relative pathname, or so I am told. */
+  sqlite3_snprintf(pVfs->mxPathname, zFull, "%s", zRelative);
+  return SQLITE_OK;
+#endif
+
+#if !SQLITE_OS_WINCE && !defined(__CYGWIN__)
+  int nByte;
+  void *zConverted;
+  char *zOut;
+
+  /* It's odd to simulate an io-error here, but really this is just
+  ** using the io-error infrastructure to test that SQLite handles this
+  ** function failing. This function could fail if, for example, the
+  ** current working directory has been unlinked.
+  */
+  SimulateIOError( return SQLITE_ERROR );
+  UNUSED_PARAMETER(nFull);
+  zConverted = convertUtf8Filename(zRelative);
+  if( isNT() ){
+    WCHAR *zTemp;
+    nByte = GetFullPathNameW((WCHAR*)zConverted, 0, 0, 0) + 3;
+    zTemp = malloc( nByte*sizeof(zTemp[0]) );
+    if( zTemp==0 ){
+      free(zConverted);
+      return SQLITE_NOMEM;
+    }
+    GetFullPathNameW((WCHAR*)zConverted, nByte, zTemp, 0);
+    free(zConverted);
+    zOut = unicodeToUtf8(zTemp);
+    free(zTemp);
+/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
+** Since the ASCII version of these Windows API do not exist for WINCE,
+** it's important to not reference them for WINCE builds.
+*/
+#if SQLITE_OS_WINCE==0
+  }else{
+    char *zTemp;
+    nByte = GetFullPathNameA((char*)zConverted, 0, 0, 0) + 3;
+    zTemp = malloc( nByte*sizeof(zTemp[0]) );
+    if( zTemp==0 ){
+      free(zConverted);
+      return SQLITE_NOMEM;
+    }
+    GetFullPathNameA((char*)zConverted, nByte, zTemp, 0);
+    free(zConverted);
+    zOut = sqlite3_win32_mbcs_to_utf8(zTemp);
+    free(zTemp);
+#endif
+  }
+  if( zOut ){
+    sqlite3_snprintf(pVfs->mxPathname, zFull, "%s", zOut);
+    free(zOut);
+    return SQLITE_OK;
+  }else{
+    return SQLITE_NOMEM;
+  }
+#endif
+}
+
+/*
+** Get the sector size of the device used to store
+** file.
+*/
+static int getSectorSize(
+    sqlite3_vfs *pVfs,
+    const char *zRelative     /* UTF-8 file name */
+){
+  DWORD bytesPerSector = SQLITE_DEFAULT_SECTOR_SIZE;
+  /* GetDiskFreeSpace is not supported under WINCE */
+#if SQLITE_OS_WINCE
+  UNUSED_PARAMETER(pVfs);
+  UNUSED_PARAMETER(zRelative);
+#else
+  char zFullpath[MAX_PATH+1];
+  int rc;
+  DWORD dwRet = 0;
+  DWORD dwDummy;
+
+  /*
+  ** We need to get the full path name of the file
+  ** to get the drive letter to look up the sector
+  ** size.
+  */
+  SimulateIOErrorBenign(1);
+  rc = winFullPathname(pVfs, zRelative, MAX_PATH, zFullpath);
+  SimulateIOErrorBenign(0);
+  if( rc == SQLITE_OK )
+  {
+    void *zConverted = convertUtf8Filename(zFullpath);
+    if( zConverted ){
+      if( isNT() ){
+        /* trim path to just drive reference */
+        WCHAR *p = zConverted;
+        for(;*p;p++){
+          if( *p == '\\' ){
+            *p = '\0';
+            break;
+          }
+        }
+        dwRet = GetDiskFreeSpaceW((WCHAR*)zConverted,
+                                  &dwDummy,
+                                  &bytesPerSector,
+                                  &dwDummy,
+                                  &dwDummy);
+      }else{
+        /* trim path to just drive reference */
+        char *p = (char *)zConverted;
+        for(;*p;p++){
+          if( *p == '\\' ){
+            *p = '\0';
+            break;
+          }
+        }
+        dwRet = GetDiskFreeSpaceA((char*)zConverted,
+                                  &dwDummy,
+                                  &bytesPerSector,
+                                  &dwDummy,
+                                  &dwDummy);
+      }
+      free(zConverted);
+    }
+    if( !dwRet ){
+      bytesPerSector = SQLITE_DEFAULT_SECTOR_SIZE;
+    }
+  }
+#endif
+  return (int) bytesPerSector; 
+}
+
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
+/*
+** Interfaces for opening a shared library, finding entry points
+** within the shared library, and closing the shared library.
+*/
+/*
+** Interfaces for opening a shared library, finding entry points
+** within the shared library, and closing the shared library.
+*/
+static void *winDlOpen(sqlite3_vfs *pVfs, const char *zFilename){
+  HANDLE h;
+  void *zConverted = convertUtf8Filename(zFilename);
+  UNUSED_PARAMETER(pVfs);
+  if( zConverted==0 ){
+    return 0;
+  }
+  if( isNT() ){
+    h = LoadLibraryW((WCHAR*)zConverted);
+/* isNT() is 1 if SQLITE_OS_WINCE==1, so this else is never executed. 
+** Since the ASCII version of these Windows API do not exist for WINCE,
+** it's important to not reference them for WINCE builds.
+*/
+#if SQLITE_OS_WINCE==0
+  }else{
+    h = LoadLibraryA((char*)zConverted);
+#endif
+  }
+  free(zConverted);
+  return (void*)h;
+}
+static void winDlError(sqlite3_vfs *pVfs, int nBuf, char *zBufOut){
+  UNUSED_PARAMETER(pVfs);
+  getLastErrorMsg(nBuf, zBufOut);
+}
+void (*winDlSym(sqlite3_vfs *pVfs, void *pHandle, const char *zSymbol))(void){
+  UNUSED_PARAMETER(pVfs);
+#if SQLITE_OS_WINCE
+  /* The GetProcAddressA() routine is only available on wince. */
+  return (void(*)(void))GetProcAddressA((HANDLE)pHandle, zSymbol);
+#else
+  /* All other windows platforms expect GetProcAddress() to take
+  ** an Ansi string regardless of the _UNICODE setting */
+  return (void(*)(void))GetProcAddress((HANDLE)pHandle, zSymbol);
+#endif
+}
+void winDlClose(sqlite3_vfs *pVfs, void *pHandle){
+  UNUSED_PARAMETER(pVfs);
+  FreeLibrary((HANDLE)pHandle);
+}
+#else /* if SQLITE_OMIT_LOAD_EXTENSION is defined: */
+  #define winDlOpen  0
+  #define winDlError 0
+  #define winDlSym   0
+  #define winDlClose 0
+#endif
+
+
+/*
+** Write up to nBuf bytes of randomness into zBuf.
+*/
+static int winRandomness(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
+  int n = 0;
+  UNUSED_PARAMETER(pVfs);
+#if defined(SQLITE_TEST)
+  n = nBuf;
+  memset(zBuf, 0, nBuf);
+#else
+  if( sizeof(SYSTEMTIME)<=nBuf-n ){
+    SYSTEMTIME x;
+    GetSystemTime(&x);
+    memcpy(&zBuf[n], &x, sizeof(x));
+    n += sizeof(x);
+  }
+  if( sizeof(DWORD)<=nBuf-n ){
+    DWORD pid = GetCurrentProcessId();
+    memcpy(&zBuf[n], &pid, sizeof(pid));
+    n += sizeof(pid);
+  }
+  if( sizeof(DWORD)<=nBuf-n ){
+    DWORD cnt = GetTickCount();
+    memcpy(&zBuf[n], &cnt, sizeof(cnt));
+    n += sizeof(cnt);
+  }
+  if( sizeof(LARGE_INTEGER)<=nBuf-n ){
+    LARGE_INTEGER i;
+    QueryPerformanceCounter(&i);
+    memcpy(&zBuf[n], &i, sizeof(i));
+    n += sizeof(i);
+  }
+#endif
+  return n;
+}
+
+
+/*
+** Sleep for a little while.  Return the amount of time slept.
+*/
+static int winSleep(sqlite3_vfs *pVfs, int microsec){
+  Sleep((microsec+999)/1000);
+  UNUSED_PARAMETER(pVfs);
+  return ((microsec+999)/1000)*1000;
+}
+
+/*
+** The following variable, if set to a non-zero value, is interpreted as
+** the number of seconds since 1970 and is used to set the result of
+** sqlite3OsCurrentTime() during testing.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_current_time = 0;  /* Fake system time in seconds since 1970. */
+#endif
+
+/*
+** Find the current time (in Universal Coordinated Time).  Write into *piNow
+** the current time and date as a Julian Day number times 86_400_000.  In
+** other words, write into *piNow the number of milliseconds since the Julian
+** epoch of noon in Greenwich on November 24, 4714 B.C according to the
+** proleptic Gregorian calendar.
+**
+** On success, return 0.  Return 1 if the time and date cannot be found.
+*/
+static int winCurrentTimeInt64(sqlite3_vfs *pVfs, sqlite3_int64 *piNow){
+  /* FILETIME structure is a 64-bit value representing the number of 
+     100-nanosecond intervals since January 1, 1601 (= JD 2305813.5). 
+  */
+  FILETIME ft;
+  static const sqlite3_int64 winFiletimeEpoch = 23058135*(sqlite3_int64)8640000;
+#ifdef SQLITE_TEST
+  static const sqlite3_int64 unixEpoch = 24405875*(sqlite3_int64)8640000;
+#endif
+  /* 2^32 - to avoid use of LL and warnings in gcc */
+  static const sqlite3_int64 max32BitValue = 
+      (sqlite3_int64)2000000000 + (sqlite3_int64)2000000000 + (sqlite3_int64)294967296;
+
+#if SQLITE_OS_WINCE
+  SYSTEMTIME time;
+  GetSystemTime(&time);
+  /* if SystemTimeToFileTime() fails, it returns zero. */
+  if (!SystemTimeToFileTime(&time,&ft)){
+    return 1;
+  }
+#else
+  GetSystemTimeAsFileTime( &ft );
+#endif
+
+  *piNow = winFiletimeEpoch +
+            ((((sqlite3_int64)ft.dwHighDateTime)*max32BitValue) + 
+               (sqlite3_int64)ft.dwLowDateTime)/(sqlite3_int64)10000;
+
+#ifdef SQLITE_TEST
+  if( sqlite3_current_time ){
+    *piNow = 1000*(sqlite3_int64)sqlite3_current_time + unixEpoch;
+  }
+#endif
+  UNUSED_PARAMETER(pVfs);
+  return 0;
+}
+
+/*
+** Find the current time (in Universal Coordinated Time).  Write the
+** current time and date as a Julian Day number into *prNow and
+** return 0.  Return 1 if the time and date cannot be found.
+*/
+int winCurrentTime(sqlite3_vfs *pVfs, double *prNow){
+  int rc;
+  sqlite3_int64 i;
+  rc = winCurrentTimeInt64(pVfs, &i);
+  if( !rc ){
+    *prNow = i/86400000.0;
+  }
+  return rc;
+}
+
+/*
+** The idea is that this function works like a combination of
+** GetLastError() and FormatMessage() on windows (or errno and
+** strerror_r() on unix). After an error is returned by an OS
+** function, SQLite calls this function with zBuf pointing to
+** a buffer of nBuf bytes. The OS layer should populate the
+** buffer with a nul-terminated UTF-8 encoded error message
+** describing the last IO error to have occurred within the calling
+** thread.
+**
+** If the error message is too large for the supplied buffer,
+** it should be truncated. The return value of xGetLastError
+** is zero if the error message fits in the buffer, or non-zero
+** otherwise (if the message was truncated). If non-zero is returned,
+** then it is not necessary to include the nul-terminator character
+** in the output buffer.
+**
+** Not supplying an error message will have no adverse effect
+** on SQLite. It is fine to have an implementation that never
+** returns an error message:
+**
+**   int xGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
+**     assert(zBuf[0]=='\0');
+**     return 0;
+**   }
+**
+** However if an error message is supplied, it will be incorporated
+** by sqlite into the error message available to the user using
+** sqlite3_errmsg(), possibly making IO errors easier to debug.
+*/
+static int winGetLastError(sqlite3_vfs *pVfs, int nBuf, char *zBuf){
+  UNUSED_PARAMETER(pVfs);
+  return getLastErrorMsg(nBuf, zBuf);
+}
+
+
+
+/*
+** Initialize and deinitialize the operating system interface.
+*/
+SQLITE_API int sqlite3_os_init(void){
+  static sqlite3_vfs winVfs = {
+    3,                   /* iVersion */
+    sizeof(winFile),     /* szOsFile */
+    MAX_PATH,            /* mxPathname */
+    0,                   /* pNext */
+    "win32",             /* zName */
+    0,                   /* pAppData */
+    winOpen,             /* xOpen */
+    winDelete,           /* xDelete */
+    winAccess,           /* xAccess */
+    winFullPathname,     /* xFullPathname */
+    winDlOpen,           /* xDlOpen */
+    winDlError,          /* xDlError */
+    winDlSym,            /* xDlSym */
+    winDlClose,          /* xDlClose */
+    winRandomness,       /* xRandomness */
+    winSleep,            /* xSleep */
+    winCurrentTime,      /* xCurrentTime */
+    winGetLastError,     /* xGetLastError */
+    winCurrentTimeInt64, /* xCurrentTimeInt64 */
+    0,                   /* xSetSystemCall */
+    0,                   /* xGetSystemCall */
+    0,                   /* xNextSystemCall */
+  };
+
+#ifndef SQLITE_OMIT_WAL
+  /* get memory map allocation granularity */
+  memset(&winSysInfo, 0, sizeof(SYSTEM_INFO));
+  GetSystemInfo(&winSysInfo);
+  assert(winSysInfo.dwAllocationGranularity > 0);
+#endif
+
+  sqlite3_vfs_register(&winVfs, 1);
+  return SQLITE_OK; 
+}
+SQLITE_API int sqlite3_os_end(void){ 
+  return SQLITE_OK;
+}
+
+#endif /* SQLITE_OS_WIN */
+
+/************** End of os_win.c **********************************************/
+/************** Begin file bitvec.c ******************************************/
+/*
+** 2008 February 16
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file implements an object that represents a fixed-length
+** bitmap.  Bits are numbered starting with 1.
+**
+** A bitmap is used to record which pages of a database file have been
+** journalled during a transaction, or which pages have the "dont-write"
+** property.  Usually only a few pages are meet either condition.
+** So the bitmap is usually sparse and has low cardinality.
+** But sometimes (for example when during a DROP of a large table) most
+** or all of the pages in a database can get journalled.  In those cases, 
+** the bitmap becomes dense with high cardinality.  The algorithm needs 
+** to handle both cases well.
+**
+** The size of the bitmap is fixed when the object is created.
+**
+** All bits are clear when the bitmap is created.  Individual bits
+** may be set or cleared one at a time.
+**
+** Test operations are about 100 times more common that set operations.
+** Clear operations are exceedingly rare.  There are usually between
+** 5 and 500 set operations per Bitvec object, though the number of sets can
+** sometimes grow into tens of thousands or larger.  The size of the
+** Bitvec object is the number of pages in the database file at the
+** start of a transaction, and is thus usually less than a few thousand,
+** but can be as large as 2 billion for a really big database.
+*/
+
+/* Size of the Bitvec structure in bytes. */
+#define BITVEC_SZ        512
+
+/* Round the union size down to the nearest pointer boundary, since that's how 
+** it will be aligned within the Bitvec struct. */
+#define BITVEC_USIZE     (((BITVEC_SZ-(3*sizeof(u32)))/sizeof(Bitvec*))*sizeof(Bitvec*))
+
+/* Type of the array "element" for the bitmap representation. 
+** Should be a power of 2, and ideally, evenly divide into BITVEC_USIZE. 
+** Setting this to the "natural word" size of your CPU may improve
+** performance. */
+#define BITVEC_TELEM     u8
+/* Size, in bits, of the bitmap element. */
+#define BITVEC_SZELEM    8
+/* Number of elements in a bitmap array. */
+#define BITVEC_NELEM     (BITVEC_USIZE/sizeof(BITVEC_TELEM))
+/* Number of bits in the bitmap array. */
+#define BITVEC_NBIT      (BITVEC_NELEM*BITVEC_SZELEM)
+
+/* Number of u32 values in hash table. */
+#define BITVEC_NINT      (BITVEC_USIZE/sizeof(u32))
+/* Maximum number of entries in hash table before 
+** sub-dividing and re-hashing. */
+#define BITVEC_MXHASH    (BITVEC_NINT/2)
+/* Hashing function for the aHash representation.
+** Empirical testing showed that the *37 multiplier 
+** (an arbitrary prime)in the hash function provided 
+** no fewer collisions than the no-op *1. */
+#define BITVEC_HASH(X)   (((X)*1)%BITVEC_NINT)
+
+#define BITVEC_NPTR      (BITVEC_USIZE/sizeof(Bitvec *))
+
+
+/*
+** A bitmap is an instance of the following structure.
+**
+** This bitmap records the existance of zero or more bits
+** with values between 1 and iSize, inclusive.
+**
+** There are three possible representations of the bitmap.
+** If iSize<=BITVEC_NBIT, then Bitvec.u.aBitmap[] is a straight
+** bitmap.  The least significant bit is bit 1.
+**
+** If iSize>BITVEC_NBIT and iDivisor==0 then Bitvec.u.aHash[] is
+** a hash table that will hold up to BITVEC_MXHASH distinct values.
+**
+** Otherwise, the value i is redirected into one of BITVEC_NPTR
+** sub-bitmaps pointed to by Bitvec.u.apSub[].  Each subbitmap
+** handles up to iDivisor separate values of i.  apSub[0] holds
+** values between 1 and iDivisor.  apSub[1] holds values between
+** iDivisor+1 and 2*iDivisor.  apSub[N] holds values between
+** N*iDivisor+1 and (N+1)*iDivisor.  Each subbitmap is normalized
+** to hold deal with values between 1 and iDivisor.
+*/
+struct Bitvec {
+  u32 iSize;      /* Maximum bit index.  Max iSize is 4,294,967,296. */
+  u32 nSet;       /* Number of bits that are set - only valid for aHash
+                  ** element.  Max is BITVEC_NINT.  For BITVEC_SZ of 512,
+                  ** this would be 125. */
+  u32 iDivisor;   /* Number of bits handled by each apSub[] entry. */
+                  /* Should >=0 for apSub element. */
+                  /* Max iDivisor is max(u32) / BITVEC_NPTR + 1.  */
+                  /* For a BITVEC_SZ of 512, this would be 34,359,739. */
+  union {
+    BITVEC_TELEM aBitmap[BITVEC_NELEM];    /* Bitmap representation */
+    u32 aHash[BITVEC_NINT];      /* Hash table representation */
+    Bitvec *apSub[BITVEC_NPTR];  /* Recursive representation */
+  } u;
+};
+
+/*
+** Create a new bitmap object able to handle bits between 0 and iSize,
+** inclusive.  Return a pointer to the new object.  Return NULL if 
+** malloc fails.
+*/
+SQLITE_PRIVATE Bitvec *sqlite3BitvecCreate(u32 iSize){
+  Bitvec *p;
+  assert( sizeof(*p)==BITVEC_SZ );
+  p = sqlite3MallocZero( sizeof(*p) );
+  if( p ){
+    p->iSize = iSize;
+  }
+  return p;
+}
+
+/*
+** Check to see if the i-th bit is set.  Return true or false.
+** If p is NULL (if the bitmap has not been created) or if
+** i is out of range, then return false.
+*/
+SQLITE_PRIVATE int sqlite3BitvecTest(Bitvec *p, u32 i){
+  if( p==0 ) return 0;
+  if( i>p->iSize || i==0 ) return 0;
+  i--;
+  while( p->iDivisor ){
+    u32 bin = i/p->iDivisor;
+    i = i%p->iDivisor;
+    p = p->u.apSub[bin];
+    if (!p) {
+      return 0;
+    }
+  }
+  if( p->iSize<=BITVEC_NBIT ){
+    return (p->u.aBitmap[i/BITVEC_SZELEM] & (1<<(i&(BITVEC_SZELEM-1))))!=0;
+  } else{
+    u32 h = BITVEC_HASH(i++);
+    while( p->u.aHash[h] ){
+      if( p->u.aHash[h]==i ) return 1;
+      h = (h+1) % BITVEC_NINT;
+    }
+    return 0;
+  }
+}
+
+/*
+** Set the i-th bit.  Return 0 on success and an error code if
+** anything goes wrong.
+**
+** This routine might cause sub-bitmaps to be allocated.  Failing
+** to get the memory needed to hold the sub-bitmap is the only
+** that can go wrong with an insert, assuming p and i are valid.
+**
+** The calling function must ensure that p is a valid Bitvec object
+** and that the value for "i" is within range of the Bitvec object.
+** Otherwise the behavior is undefined.
+*/
+SQLITE_PRIVATE int sqlite3BitvecSet(Bitvec *p, u32 i){
+  u32 h;
+  if( p==0 ) return SQLITE_OK;
+  assert( i>0 );
+  assert( i<=p->iSize );
+  i--;
+  while((p->iSize > BITVEC_NBIT) && p->iDivisor) {
+    u32 bin = i/p->iDivisor;
+    i = i%p->iDivisor;
+    if( p->u.apSub[bin]==0 ){
+      p->u.apSub[bin] = sqlite3BitvecCreate( p->iDivisor );
+      if( p->u.apSub[bin]==0 ) return SQLITE_NOMEM;
+    }
+    p = p->u.apSub[bin];
+  }
+  if( p->iSize<=BITVEC_NBIT ){
+    p->u.aBitmap[i/BITVEC_SZELEM] |= 1 << (i&(BITVEC_SZELEM-1));
+    return SQLITE_OK;
+  }
+  h = BITVEC_HASH(i++);
+  /* if there wasn't a hash collision, and this doesn't */
+  /* completely fill the hash, then just add it without */
+  /* worring about sub-dividing and re-hashing. */
+  if( !p->u.aHash[h] ){
+    if (p->nSet<(BITVEC_NINT-1)) {
+      goto bitvec_set_end;
+    } else {
+      goto bitvec_set_rehash;
+    }
+  }
+  /* there was a collision, check to see if it's already */
+  /* in hash, if not, try to find a spot for it */
+  do {
+    if( p->u.aHash[h]==i ) return SQLITE_OK;
+    h++;
+    if( h>=BITVEC_NINT ) h = 0;
+  } while( p->u.aHash[h] );
+  /* we didn't find it in the hash.  h points to the first */
+  /* available free spot. check to see if this is going to */
+  /* make our hash too "full".  */
+bitvec_set_rehash:
+  if( p->nSet>=BITVEC_MXHASH ){
+    unsigned int j;
+    int rc;
+    u32 *aiValues = sqlite3StackAllocRaw(0, sizeof(p->u.aHash));
+    if( aiValues==0 ){
+      return SQLITE_NOMEM;
+    }else{
+      memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));
+      memset(p->u.apSub, 0, sizeof(p->u.apSub));
+      p->iDivisor = (p->iSize + BITVEC_NPTR - 1)/BITVEC_NPTR;
+      rc = sqlite3BitvecSet(p, i);
+      for(j=0; j<BITVEC_NINT; j++){
+        if( aiValues[j] ) rc |= sqlite3BitvecSet(p, aiValues[j]);
+      }
+      sqlite3StackFree(0, aiValues);
+      return rc;
+    }
+  }
+bitvec_set_end:
+  p->nSet++;
+  p->u.aHash[h] = i;
+  return SQLITE_OK;
+}
+
+/*
+** Clear the i-th bit.
+**
+** pBuf must be a pointer to at least BITVEC_SZ bytes of temporary storage
+** that BitvecClear can use to rebuilt its hash table.
+*/
+SQLITE_PRIVATE void sqlite3BitvecClear(Bitvec *p, u32 i, void *pBuf){
+  if( p==0 ) return;
+  assert( i>0 );
+  i--;
+  while( p->iDivisor ){
+    u32 bin = i/p->iDivisor;
+    i = i%p->iDivisor;
+    p = p->u.apSub[bin];
+    if (!p) {
+      return;
+    }
+  }
+  if( p->iSize<=BITVEC_NBIT ){
+    p->u.aBitmap[i/BITVEC_SZELEM] &= ~(1 << (i&(BITVEC_SZELEM-1)));
+  }else{
+    unsigned int j;
+    u32 *aiValues = pBuf;
+    memcpy(aiValues, p->u.aHash, sizeof(p->u.aHash));
+    memset(p->u.aHash, 0, sizeof(p->u.aHash));
+    p->nSet = 0;
+    for(j=0; j<BITVEC_NINT; j++){
+      if( aiValues[j] && aiValues[j]!=(i+1) ){
+        u32 h = BITVEC_HASH(aiValues[j]-1);
+        p->nSet++;
+        while( p->u.aHash[h] ){
+          h++;
+          if( h>=BITVEC_NINT ) h = 0;
+        }
+        p->u.aHash[h] = aiValues[j];
+      }
+    }
+  }
+}
+
+/*
+** Destroy a bitmap object.  Reclaim all memory used.
+*/
+SQLITE_PRIVATE void sqlite3BitvecDestroy(Bitvec *p){
+  if( p==0 ) return;
+  if( p->iDivisor ){
+    unsigned int i;
+    for(i=0; i<BITVEC_NPTR; i++){
+      sqlite3BitvecDestroy(p->u.apSub[i]);
+    }
+  }
+  sqlite3_free(p);
+}
+
+/*
+** Return the value of the iSize parameter specified when Bitvec *p
+** was created.
+*/
+SQLITE_PRIVATE u32 sqlite3BitvecSize(Bitvec *p){
+  return p->iSize;
+}
+
+#ifndef SQLITE_OMIT_BUILTIN_TEST
+/*
+** Let V[] be an array of unsigned characters sufficient to hold
+** up to N bits.  Let I be an integer between 0 and N.  0<=I<N.
+** Then the following macros can be used to set, clear, or test
+** individual bits within V.
+*/
+#define SETBIT(V,I)      V[I>>3] |= (1<<(I&7))
+#define CLEARBIT(V,I)    V[I>>3] &= ~(1<<(I&7))
+#define TESTBIT(V,I)     (V[I>>3]&(1<<(I&7)))!=0
+
+/*
+** This routine runs an extensive test of the Bitvec code.
+**
+** The input is an array of integers that acts as a program
+** to test the Bitvec.  The integers are opcodes followed
+** by 0, 1, or 3 operands, depending on the opcode.  Another
+** opcode follows immediately after the last operand.
+**
+** There are 6 opcodes numbered from 0 through 5.  0 is the
+** "halt" opcode and causes the test to end.
+**
+**    0          Halt and return the number of errors
+**    1 N S X    Set N bits beginning with S and incrementing by X
+**    2 N S X    Clear N bits beginning with S and incrementing by X
+**    3 N        Set N randomly chosen bits
+**    4 N        Clear N randomly chosen bits
+**    5 N S X    Set N bits from S increment X in array only, not in bitvec
+**
+** The opcodes 1 through 4 perform set and clear operations are performed
+** on both a Bitvec object and on a linear array of bits obtained from malloc.
+** Opcode 5 works on the linear array only, not on the Bitvec.
+** Opcode 5 is used to deliberately induce a fault in order to
+** confirm that error detection works.
+**
+** At the conclusion of the test the linear array is compared
+** against the Bitvec object.  If there are any differences,
+** an error is returned.  If they are the same, zero is returned.
+**
+** If a memory allocation error occurs, return -1.
+*/
+SQLITE_PRIVATE int sqlite3BitvecBuiltinTest(int sz, int *aOp){
+  Bitvec *pBitvec = 0;
+  unsigned char *pV = 0;
+  int rc = -1;
+  int i, nx, pc, op;
+  void *pTmpSpace;
+
+  /* Allocate the Bitvec to be tested and a linear array of
+  ** bits to act as the reference */
+  pBitvec = sqlite3BitvecCreate( sz );
+  pV = sqlite3_malloc( (sz+7)/8 + 1 );
+  pTmpSpace = sqlite3_malloc(BITVEC_SZ);
+  if( pBitvec==0 || pV==0 || pTmpSpace==0  ) goto bitvec_end;
+  memset(pV, 0, (sz+7)/8 + 1);
+
+  /* NULL pBitvec tests */
+  sqlite3BitvecSet(0, 1);
+  sqlite3BitvecClear(0, 1, pTmpSpace);
+
+  /* Run the program */
+  pc = 0;
+  while( (op = aOp[pc])!=0 ){
+    switch( op ){
+      case 1:
+      case 2:
+      case 5: {
+        nx = 4;
+        i = aOp[pc+2] - 1;
+        aOp[pc+2] += aOp[pc+3];
+        break;
+      }
+      case 3:
+      case 4: 
+      default: {
+        nx = 2;
+        sqlite3_randomness(sizeof(i), &i);
+        break;
+      }
+    }
+    if( (--aOp[pc+1]) > 0 ) nx = 0;
+    pc += nx;
+    i = (i & 0x7fffffff)%sz;
+    if( (op & 1)!=0 ){
+      SETBIT(pV, (i+1));
+      if( op!=5 ){
+        if( sqlite3BitvecSet(pBitvec, i+1) ) goto bitvec_end;
+      }
+    }else{
+      CLEARBIT(pV, (i+1));
+      sqlite3BitvecClear(pBitvec, i+1, pTmpSpace);
+    }
+  }
+
+  /* Test to make sure the linear array exactly matches the
+  ** Bitvec object.  Start with the assumption that they do
+  ** match (rc==0).  Change rc to non-zero if a discrepancy
+  ** is found.
+  */
+  rc = sqlite3BitvecTest(0,0) + sqlite3BitvecTest(pBitvec, sz+1)
+          + sqlite3BitvecTest(pBitvec, 0)
+          + (sqlite3BitvecSize(pBitvec) - sz);
+  for(i=1; i<=sz; i++){
+    if(  (TESTBIT(pV,i))!=sqlite3BitvecTest(pBitvec,i) ){
+      rc = i;
+      break;
+    }
+  }
+
+  /* Free allocated structure */
+bitvec_end:
+  sqlite3_free(pTmpSpace);
+  sqlite3_free(pV);
+  sqlite3BitvecDestroy(pBitvec);
+  return rc;
+}
+#endif /* SQLITE_OMIT_BUILTIN_TEST */
+
+/************** End of bitvec.c **********************************************/
+/************** Begin file pcache.c ******************************************/
+/*
+** 2008 August 05
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file implements that page cache.
+*/
+
+/*
+** A complete page cache is an instance of this structure.
+*/
+struct PCache {
+  PgHdr *pDirty, *pDirtyTail;         /* List of dirty pages in LRU order */
+  PgHdr *pSynced;                     /* Last synced page in dirty page list */
+  int nRef;                           /* Number of referenced pages */
+  int nMax;                           /* Configured cache size */
+  int szPage;                         /* Size of every page in this cache */
+  int szExtra;                        /* Size of extra space for each page */
+  int bPurgeable;                     /* True if pages are on backing store */
+  int (*xStress)(void*,PgHdr*);       /* Call to try make a page clean */
+  void *pStress;                      /* Argument to xStress */
+  sqlite3_pcache *pCache;             /* Pluggable cache module */
+  PgHdr *pPage1;                      /* Reference to page 1 */
+};
+
+/*
+** Some of the assert() macros in this code are too expensive to run
+** even during normal debugging.  Use them only rarely on long-running
+** tests.  Enable the expensive asserts using the
+** -DSQLITE_ENABLE_EXPENSIVE_ASSERT=1 compile-time option.
+*/
+#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
+# define expensive_assert(X)  assert(X)
+#else
+# define expensive_assert(X)
+#endif
+
+/********************************** Linked List Management ********************/
+
+#if !defined(NDEBUG) && defined(SQLITE_ENABLE_EXPENSIVE_ASSERT)
+/*
+** Check that the pCache->pSynced variable is set correctly. If it
+** is not, either fail an assert or return zero. Otherwise, return
+** non-zero. This is only used in debugging builds, as follows:
+**
+**   expensive_assert( pcacheCheckSynced(pCache) );
+*/
+static int pcacheCheckSynced(PCache *pCache){
+  PgHdr *p;
+  for(p=pCache->pDirtyTail; p!=pCache->pSynced; p=p->pDirtyPrev){
+    assert( p->nRef || (p->flags&PGHDR_NEED_SYNC) );
+  }
+  return (p==0 || p->nRef || (p->flags&PGHDR_NEED_SYNC)==0);
+}
+#endif /* !NDEBUG && SQLITE_ENABLE_EXPENSIVE_ASSERT */
+
+/*
+** Remove page pPage from the list of dirty pages.
+*/
+static void pcacheRemoveFromDirtyList(PgHdr *pPage){
+  PCache *p = pPage->pCache;
+
+  assert( pPage->pDirtyNext || pPage==p->pDirtyTail );
+  assert( pPage->pDirtyPrev || pPage==p->pDirty );
+
+  /* Update the PCache1.pSynced variable if necessary. */
+  if( p->pSynced==pPage ){
+    PgHdr *pSynced = pPage->pDirtyPrev;
+    while( pSynced && (pSynced->flags&PGHDR_NEED_SYNC) ){
+      pSynced = pSynced->pDirtyPrev;
+    }
+    p->pSynced = pSynced;
+  }
+
+  if( pPage->pDirtyNext ){
+    pPage->pDirtyNext->pDirtyPrev = pPage->pDirtyPrev;
+  }else{
+    assert( pPage==p->pDirtyTail );
+    p->pDirtyTail = pPage->pDirtyPrev;
+  }
+  if( pPage->pDirtyPrev ){
+    pPage->pDirtyPrev->pDirtyNext = pPage->pDirtyNext;
+  }else{
+    assert( pPage==p->pDirty );
+    p->pDirty = pPage->pDirtyNext;
+  }
+  pPage->pDirtyNext = 0;
+  pPage->pDirtyPrev = 0;
+
+  expensive_assert( pcacheCheckSynced(p) );
+}
+
+/*
+** Add page pPage to the head of the dirty list (PCache1.pDirty is set to
+** pPage).
+*/
+static void pcacheAddToDirtyList(PgHdr *pPage){
+  PCache *p = pPage->pCache;
+
+  assert( pPage->pDirtyNext==0 && pPage->pDirtyPrev==0 && p->pDirty!=pPage );
+
+  pPage->pDirtyNext = p->pDirty;
+  if( pPage->pDirtyNext ){
+    assert( pPage->pDirtyNext->pDirtyPrev==0 );
+    pPage->pDirtyNext->pDirtyPrev = pPage;
+  }
+  p->pDirty = pPage;
+  if( !p->pDirtyTail ){
+    p->pDirtyTail = pPage;
+  }
+  if( !p->pSynced && 0==(pPage->flags&PGHDR_NEED_SYNC) ){
+    p->pSynced = pPage;
+  }
+  expensive_assert( pcacheCheckSynced(p) );
+}
+
+/*
+** Wrapper around the pluggable caches xUnpin method. If the cache is
+** being used for an in-memory database, this function is a no-op.
+*/
+static void pcacheUnpin(PgHdr *p){
+  PCache *pCache = p->pCache;
+  if( pCache->bPurgeable ){
+    if( p->pgno==1 ){
+      pCache->pPage1 = 0;
+    }
+    sqlite3GlobalConfig.pcache.xUnpin(pCache->pCache, p, 0);
+  }
+}
+
+/*************************************************** General Interfaces ******
+**
+** Initialize and shutdown the page cache subsystem. Neither of these 
+** functions are threadsafe.
+*/
+SQLITE_PRIVATE int sqlite3PcacheInitialize(void){
+  if( sqlite3GlobalConfig.pcache.xInit==0 ){
+    /* IMPLEMENTATION-OF: R-26801-64137 If the xInit() method is NULL, then the
+    ** built-in default page cache is used instead of the application defined
+    ** page cache. */
+    sqlite3PCacheSetDefault();
+  }
+  return sqlite3GlobalConfig.pcache.xInit(sqlite3GlobalConfig.pcache.pArg);
+}
+SQLITE_PRIVATE void sqlite3PcacheShutdown(void){
+  if( sqlite3GlobalConfig.pcache.xShutdown ){
+    /* IMPLEMENTATION-OF: R-26000-56589 The xShutdown() method may be NULL. */
+    sqlite3GlobalConfig.pcache.xShutdown(sqlite3GlobalConfig.pcache.pArg);
+  }
+}
+
+/*
+** Return the size in bytes of a PCache object.
+*/
+SQLITE_PRIVATE int sqlite3PcacheSize(void){ return sizeof(PCache); }
+
+/*
+** Create a new PCache object. Storage space to hold the object
+** has already been allocated and is passed in as the p pointer. 
+** The caller discovers how much space needs to be allocated by 
+** calling sqlite3PcacheSize().
+*/
+SQLITE_PRIVATE void sqlite3PcacheOpen(
+  int szPage,                  /* Size of every page */
+  int szExtra,                 /* Extra space associated with each page */
+  int bPurgeable,              /* True if pages are on backing store */
+  int (*xStress)(void*,PgHdr*),/* Call to try to make pages clean */
+  void *pStress,               /* Argument to xStress */
+  PCache *p                    /* Preallocated space for the PCache */
+){
+  memset(p, 0, sizeof(PCache));
+  p->szPage = szPage;
+  p->szExtra = szExtra;
+  p->bPurgeable = bPurgeable;
+  p->xStress = xStress;
+  p->pStress = pStress;
+  p->nMax = 100;
+}
+
+/*
+** Change the page size for PCache object. The caller must ensure that there
+** are no outstanding page references when this function is called.
+*/
+SQLITE_PRIVATE void sqlite3PcacheSetPageSize(PCache *pCache, int szPage){
+  assert( pCache->nRef==0 && pCache->pDirty==0 );
+  if( pCache->pCache ){
+    sqlite3GlobalConfig.pcache.xDestroy(pCache->pCache);
+    pCache->pCache = 0;
+    pCache->pPage1 = 0;
+  }
+  pCache->szPage = szPage;
+}
+
+/*
+** Try to obtain a page from the cache.
+*/
+SQLITE_PRIVATE int sqlite3PcacheFetch(
+  PCache *pCache,       /* Obtain the page from this cache */
+  Pgno pgno,            /* Page number to obtain */
+  int createFlag,       /* If true, create page if it does not exist already */
+  PgHdr **ppPage        /* Write the page here */
+){
+  PgHdr *pPage = 0;
+  int eCreate;
+
+  assert( pCache!=0 );
+  assert( createFlag==1 || createFlag==0 );
+  assert( pgno>0 );
+
+  /* If the pluggable cache (sqlite3_pcache*) has not been allocated,
+  ** allocate it now.
+  */
+  if( !pCache->pCache && createFlag ){
+    sqlite3_pcache *p;
+    int nByte;
+    nByte = pCache->szPage + pCache->szExtra + sizeof(PgHdr);
+    p = sqlite3GlobalConfig.pcache.xCreate(nByte, pCache->bPurgeable);
+    if( !p ){
+      return SQLITE_NOMEM;
+    }
+    sqlite3GlobalConfig.pcache.xCachesize(p, pCache->nMax);
+    pCache->pCache = p;
+  }
+
+  eCreate = createFlag * (1 + (!pCache->bPurgeable || !pCache->pDirty));
+  if( pCache->pCache ){
+    pPage = sqlite3GlobalConfig.pcache.xFetch(pCache->pCache, pgno, eCreate);
+  }
+
+  if( !pPage && eCreate==1 ){
+    PgHdr *pPg;
+
+    /* Find a dirty page to write-out and recycle. First try to find a 
+    ** page that does not require a journal-sync (one with PGHDR_NEED_SYNC
+    ** cleared), but if that is not possible settle for any other 
+    ** unreferenced dirty page.
+    */
+    expensive_assert( pcacheCheckSynced(pCache) );
+    for(pPg=pCache->pSynced; 
+        pPg && (pPg->nRef || (pPg->flags&PGHDR_NEED_SYNC)); 
+        pPg=pPg->pDirtyPrev
+    );
+    pCache->pSynced = pPg;
+    if( !pPg ){
+      for(pPg=pCache->pDirtyTail; pPg && pPg->nRef; pPg=pPg->pDirtyPrev);
+    }
+    if( pPg ){
+      int rc;
+      rc = pCache->xStress(pCache->pStress, pPg);
+      if( rc!=SQLITE_OK && rc!=SQLITE_BUSY ){
+        return rc;
+      }
+    }
+
+    pPage = sqlite3GlobalConfig.pcache.xFetch(pCache->pCache, pgno, 2);
+  }
+
+  if( pPage ){
+    if( !pPage->pData ){
+      memset(pPage, 0, sizeof(PgHdr));
+      pPage->pData = (void *)&pPage[1];
+      pPage->pExtra = (void*)&((char *)pPage->pData)[pCache->szPage];
+      memset(pPage->pExtra, 0, pCache->szExtra);
+      pPage->pCache = pCache;
+      pPage->pgno = pgno;
+    }
+    assert( pPage->pCache==pCache );
+    assert( pPage->pgno==pgno );
+    assert( pPage->pData==(void *)&pPage[1] );
+    assert( pPage->pExtra==(void *)&((char *)&pPage[1])[pCache->szPage] );
+
+    if( 0==pPage->nRef ){
+      pCache->nRef++;
+    }
+    pPage->nRef++;
+    if( pgno==1 ){
+      pCache->pPage1 = pPage;
+    }
+  }
+  *ppPage = pPage;
+  return (pPage==0 && eCreate) ? SQLITE_NOMEM : SQLITE_OK;
+}
+
+/*
+** Decrement the reference count on a page. If the page is clean and the
+** reference count drops to 0, then it is made elible for recycling.
+*/
+SQLITE_PRIVATE void sqlite3PcacheRelease(PgHdr *p){
+  assert( p->nRef>0 );
+  p->nRef--;
+  if( p->nRef==0 ){
+    PCache *pCache = p->pCache;
+    pCache->nRef--;
+    if( (p->flags&PGHDR_DIRTY)==0 ){
+      pcacheUnpin(p);
+    }else{
+      /* Move the page to the head of the dirty list. */
+      pcacheRemoveFromDirtyList(p);
+      pcacheAddToDirtyList(p);
+    }
+  }
+}
+
+/*
+** Increase the reference count of a supplied page by 1.
+*/
+SQLITE_PRIVATE void sqlite3PcacheRef(PgHdr *p){
+  assert(p->nRef>0);
+  p->nRef++;
+}
+
+/*
+** Drop a page from the cache. There must be exactly one reference to the
+** page. This function deletes that reference, so after it returns the
+** page pointed to by p is invalid.
+*/
+SQLITE_PRIVATE void sqlite3PcacheDrop(PgHdr *p){
+  PCache *pCache;
+  assert( p->nRef==1 );
+  if( p->flags&PGHDR_DIRTY ){
+    pcacheRemoveFromDirtyList(p);
+  }
+  pCache = p->pCache;
+  pCache->nRef--;
+  if( p->pgno==1 ){
+    pCache->pPage1 = 0;
+  }
+  sqlite3GlobalConfig.pcache.xUnpin(pCache->pCache, p, 1);
+}
+
+/*
+** Make sure the page is marked as dirty. If it isn't dirty already,
+** make it so.
+*/
+SQLITE_PRIVATE void sqlite3PcacheMakeDirty(PgHdr *p){
+  p->flags &= ~PGHDR_DONT_WRITE;
+  assert( p->nRef>0 );
+  if( 0==(p->flags & PGHDR_DIRTY) ){
+    p->flags |= PGHDR_DIRTY;
+    pcacheAddToDirtyList( p);
+  }
+}
+
+/*
+** Make sure the page is marked as clean. If it isn't clean already,
+** make it so.
+*/
+SQLITE_PRIVATE void sqlite3PcacheMakeClean(PgHdr *p){
+  if( (p->flags & PGHDR_DIRTY) ){
+    pcacheRemoveFromDirtyList(p);
+    p->flags &= ~(PGHDR_DIRTY|PGHDR_NEED_SYNC);
+    if( p->nRef==0 ){
+      pcacheUnpin(p);
+    }
+  }
+}
+
+/*
+** Make every page in the cache clean.
+*/
+SQLITE_PRIVATE void sqlite3PcacheCleanAll(PCache *pCache){
+  PgHdr *p;
+  while( (p = pCache->pDirty)!=0 ){
+    sqlite3PcacheMakeClean(p);
+  }
+}
+
+/*
+** Clear the PGHDR_NEED_SYNC flag from all dirty pages.
+*/
+SQLITE_PRIVATE void sqlite3PcacheClearSyncFlags(PCache *pCache){
+  PgHdr *p;
+  for(p=pCache->pDirty; p; p=p->pDirtyNext){
+    p->flags &= ~PGHDR_NEED_SYNC;
+  }
+  pCache->pSynced = pCache->pDirtyTail;
+}
+
+/*
+** Change the page number of page p to newPgno. 
+*/
+SQLITE_PRIVATE void sqlite3PcacheMove(PgHdr *p, Pgno newPgno){
+  PCache *pCache = p->pCache;
+  assert( p->nRef>0 );
+  assert( newPgno>0 );
+  sqlite3GlobalConfig.pcache.xRekey(pCache->pCache, p, p->pgno, newPgno);
+  p->pgno = newPgno;
+  if( (p->flags&PGHDR_DIRTY) && (p->flags&PGHDR_NEED_SYNC) ){
+    pcacheRemoveFromDirtyList(p);
+    pcacheAddToDirtyList(p);
+  }
+}
+
+/*
+** Drop every cache entry whose page number is greater than "pgno". The
+** caller must ensure that there are no outstanding references to any pages
+** other than page 1 with a page number greater than pgno.
+**
+** If there is a reference to page 1 and the pgno parameter passed to this
+** function is 0, then the data area associated with page 1 is zeroed, but
+** the page object is not dropped.
+*/
+SQLITE_PRIVATE void sqlite3PcacheTruncate(PCache *pCache, Pgno pgno){
+  if( pCache->pCache ){
+    PgHdr *p;
+    PgHdr *pNext;
+    for(p=pCache->pDirty; p; p=pNext){
+      pNext = p->pDirtyNext;
+      /* This routine never gets call with a positive pgno except right
+      ** after sqlite3PcacheCleanAll().  So if there are dirty pages,
+      ** it must be that pgno==0.
+      */
+      assert( p->pgno>0 );
+      if( ALWAYS(p->pgno>pgno) ){
+        assert( p->flags&PGHDR_DIRTY );
+        sqlite3PcacheMakeClean(p);
+      }
+    }
+    if( pgno==0 && pCache->pPage1 ){
+      memset(pCache->pPage1->pData, 0, pCache->szPage);
+      pgno = 1;
+    }
+    sqlite3GlobalConfig.pcache.xTruncate(pCache->pCache, pgno+1);
+  }
+}
+
+/*
+** Close a cache.
+*/
+SQLITE_PRIVATE void sqlite3PcacheClose(PCache *pCache){
+  if( pCache->pCache ){
+    sqlite3GlobalConfig.pcache.xDestroy(pCache->pCache);
+  }
+}
+
+/* 
+** Discard the contents of the cache.
+*/
+SQLITE_PRIVATE void sqlite3PcacheClear(PCache *pCache){
+  sqlite3PcacheTruncate(pCache, 0);
+}
+
+/*
+** Merge two lists of pages connected by pDirty and in pgno order.
+** Do not both fixing the pDirtyPrev pointers.
+*/
+static PgHdr *pcacheMergeDirtyList(PgHdr *pA, PgHdr *pB){
+  PgHdr result, *pTail;
+  pTail = &result;
+  while( pA && pB ){
+    if( pA->pgno<pB->pgno ){
+      pTail->pDirty = pA;
+      pTail = pA;
+      pA = pA->pDirty;
+    }else{
+      pTail->pDirty = pB;
+      pTail = pB;
+      pB = pB->pDirty;
+    }
+  }
+  if( pA ){
+    pTail->pDirty = pA;
+  }else if( pB ){
+    pTail->pDirty = pB;
+  }else{
+    pTail->pDirty = 0;
+  }
+  return result.pDirty;
+}
+
+/*
+** Sort the list of pages in accending order by pgno.  Pages are
+** connected by pDirty pointers.  The pDirtyPrev pointers are
+** corrupted by this sort.
+**
+** Since there cannot be more than 2^31 distinct pages in a database,
+** there cannot be more than 31 buckets required by the merge sorter.
+** One extra bucket is added to catch overflow in case something
+** ever changes to make the previous sentence incorrect.
+*/
+#define N_SORT_BUCKET  32
+static PgHdr *pcacheSortDirtyList(PgHdr *pIn){
+  PgHdr *a[N_SORT_BUCKET], *p;
+  int i;
+  memset(a, 0, sizeof(a));
+  while( pIn ){
+    p = pIn;
+    pIn = p->pDirty;
+    p->pDirty = 0;
+    for(i=0; ALWAYS(i<N_SORT_BUCKET-1); i++){
+      if( a[i]==0 ){
+        a[i] = p;
+        break;
+      }else{
+        p = pcacheMergeDirtyList(a[i], p);
+        a[i] = 0;
+      }
+    }
+    if( NEVER(i==N_SORT_BUCKET-1) ){
+      /* To get here, there need to be 2^(N_SORT_BUCKET) elements in
+      ** the input list.  But that is impossible.
+      */
+      a[i] = pcacheMergeDirtyList(a[i], p);
+    }
+  }
+  p = a[0];
+  for(i=1; i<N_SORT_BUCKET; i++){
+    p = pcacheMergeDirtyList(p, a[i]);
+  }
+  return p;
+}
+
+/*
+** Return a list of all dirty pages in the cache, sorted by page number.
+*/
+SQLITE_PRIVATE PgHdr *sqlite3PcacheDirtyList(PCache *pCache){
+  PgHdr *p;
+  for(p=pCache->pDirty; p; p=p->pDirtyNext){
+    p->pDirty = p->pDirtyNext;
+  }
+  return pcacheSortDirtyList(pCache->pDirty);
+}
+
+/* 
+** Return the total number of referenced pages held by the cache.
+*/
+SQLITE_PRIVATE int sqlite3PcacheRefCount(PCache *pCache){
+  return pCache->nRef;
+}
+
+/*
+** Return the number of references to the page supplied as an argument.
+*/
+SQLITE_PRIVATE int sqlite3PcachePageRefcount(PgHdr *p){
+  return p->nRef;
+}
+
+/* 
+** Return the total number of pages in the cache.
+*/
+SQLITE_PRIVATE int sqlite3PcachePagecount(PCache *pCache){
+  int nPage = 0;
+  if( pCache->pCache ){
+    nPage = sqlite3GlobalConfig.pcache.xPagecount(pCache->pCache);
+  }
+  return nPage;
+}
+
+#ifdef SQLITE_TEST
+/*
+** Get the suggested cache-size value.
+*/
+SQLITE_PRIVATE int sqlite3PcacheGetCachesize(PCache *pCache){
+  return pCache->nMax;
+}
+#endif
+
+/*
+** Set the suggested cache-size value.
+*/
+SQLITE_PRIVATE void sqlite3PcacheSetCachesize(PCache *pCache, int mxPage){
+  pCache->nMax = mxPage;
+  if( pCache->pCache ){
+    sqlite3GlobalConfig.pcache.xCachesize(pCache->pCache, mxPage);
+  }
+}
+
+#if defined(SQLITE_CHECK_PAGES) || defined(SQLITE_DEBUG)
+/*
+** For all dirty pages currently in the cache, invoke the specified
+** callback. This is only used if the SQLITE_CHECK_PAGES macro is
+** defined.
+*/
+SQLITE_PRIVATE void sqlite3PcacheIterateDirty(PCache *pCache, void (*xIter)(PgHdr *)){
+  PgHdr *pDirty;
+  for(pDirty=pCache->pDirty; pDirty; pDirty=pDirty->pDirtyNext){
+    xIter(pDirty);
+  }
+}
+#endif
+
+/************** End of pcache.c **********************************************/
+/************** Begin file pcache1.c *****************************************/
+/*
+** 2008 November 05
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file implements the default page cache implementation (the
+** sqlite3_pcache interface). It also contains part of the implementation
+** of the SQLITE_CONFIG_PAGECACHE and sqlite3_release_memory() features.
+** If the default page cache implementation is overridden, then neither of
+** these two features are available.
+*/
+
+
+typedef struct PCache1 PCache1;
+typedef struct PgHdr1 PgHdr1;
+typedef struct PgFreeslot PgFreeslot;
+typedef struct PGroup PGroup;
+
+/* Each page cache (or PCache) belongs to a PGroup.  A PGroup is a set 
+** of one or more PCaches that are able to recycle each others unpinned
+** pages when they are under memory pressure.  A PGroup is an instance of
+** the following object.
+**
+** This page cache implementation works in one of two modes:
+**
+**   (1)  Every PCache is the sole member of its own PGroup.  There is
+**        one PGroup per PCache.
+**
+**   (2)  There is a single global PGroup that all PCaches are a member
+**        of.
+**
+** Mode 1 uses more memory (since PCache instances are not able to rob
+** unused pages from other PCaches) but it also operates without a mutex,
+** and is therefore often faster.  Mode 2 requires a mutex in order to be
+** threadsafe, but is able recycle pages more efficient.
+**
+** For mode (1), PGroup.mutex is NULL.  For mode (2) there is only a single
+** PGroup which is the pcache1.grp global variable and its mutex is
+** SQLITE_MUTEX_STATIC_LRU.
+*/
+struct PGroup {
+  sqlite3_mutex *mutex;          /* MUTEX_STATIC_LRU or NULL */
+  int nMaxPage;                  /* Sum of nMax for purgeable caches */
+  int nMinPage;                  /* Sum of nMin for purgeable caches */
+  int mxPinned;                  /* nMaxpage + 10 - nMinPage */
+  int nCurrentPage;              /* Number of purgeable pages allocated */
+  PgHdr1 *pLruHead, *pLruTail;   /* LRU list of unpinned pages */
+};
+
+/* Each page cache is an instance of the following object.  Every
+** open database file (including each in-memory database and each
+** temporary or transient database) has a single page cache which
+** is an instance of this object.
+**
+** Pointers to structures of this type are cast and returned as 
+** opaque sqlite3_pcache* handles.
+*/
+struct PCache1 {
+  /* Cache configuration parameters. Page size (szPage) and the purgeable
+  ** flag (bPurgeable) are set when the cache is created. nMax may be 
+  ** modified at any time by a call to the pcache1CacheSize() method.
+  ** The PGroup mutex must be held when accessing nMax.
+  */
+  PGroup *pGroup;                     /* PGroup this cache belongs to */
+  int szPage;                         /* Size of allocated pages in bytes */
+  int bPurgeable;                     /* True if cache is purgeable */
+  unsigned int nMin;                  /* Minimum number of pages reserved */
+  unsigned int nMax;                  /* Configured "cache_size" value */
+  unsigned int n90pct;                /* nMax*9/10 */
+
+  /* Hash table of all pages. The following variables may only be accessed
+  ** when the accessor is holding the PGroup mutex.
+  */
+  unsigned int nRecyclable;           /* Number of pages in the LRU list */
+  unsigned int nPage;                 /* Total number of pages in apHash */
+  unsigned int nHash;                 /* Number of slots in apHash[] */
+  PgHdr1 **apHash;                    /* Hash table for fast lookup by key */
+
+  unsigned int iMaxKey;               /* Largest key seen since xTruncate() */
+};
+
+/*
+** Each cache entry is represented by an instance of the following 
+** structure. A buffer of PgHdr1.pCache->szPage bytes is allocated 
+** directly before this structure in memory (see the PGHDR1_TO_PAGE() 
+** macro below).
+*/
+struct PgHdr1 {
+  unsigned int iKey;             /* Key value (page number) */
+  PgHdr1 *pNext;                 /* Next in hash table chain */
+  PCache1 *pCache;               /* Cache that currently owns this page */
+  PgHdr1 *pLruNext;              /* Next in LRU list of unpinned pages */
+  PgHdr1 *pLruPrev;              /* Previous in LRU list of unpinned pages */
+};
+
+/*
+** Free slots in the allocator used to divide up the buffer provided using
+** the SQLITE_CONFIG_PAGECACHE mechanism.
+*/
+struct PgFreeslot {
+  PgFreeslot *pNext;  /* Next free slot */
+};
+
+/*
+** Global data used by this cache.
+*/
+static SQLITE_WSD struct PCacheGlobal {
+  PGroup grp;                    /* The global PGroup for mode (2) */
+
+  /* Variables related to SQLITE_CONFIG_PAGECACHE settings.  The
+  ** szSlot, nSlot, pStart, pEnd, nReserve, and isInit values are all
+  ** fixed at sqlite3_initialize() time and do not require mutex protection.
+  ** The nFreeSlot and pFree values do require mutex protection.
+  */
+  int isInit;                    /* True if initialized */
+  int szSlot;                    /* Size of each free slot */
+  int nSlot;                     /* The number of pcache slots */
+  int nReserve;                  /* Try to keep nFreeSlot above this */
+  void *pStart, *pEnd;           /* Bounds of pagecache malloc range */
+  /* Above requires no mutex.  Use mutex below for variable that follow. */
+  sqlite3_mutex *mutex;          /* Mutex for accessing the following: */
+  int nFreeSlot;                 /* Number of unused pcache slots */
+  PgFreeslot *pFree;             /* Free page blocks */
+  /* The following value requires a mutex to change.  We skip the mutex on
+  ** reading because (1) most platforms read a 32-bit integer atomically and
+  ** (2) even if an incorrect value is read, no great harm is done since this
+  ** is really just an optimization. */
+  int bUnderPressure;            /* True if low on PAGECACHE memory */
+} pcache1_g;
+
+/*
+** All code in this file should access the global structure above via the
+** alias "pcache1". This ensures that the WSD emulation is used when
+** compiling for systems that do not support real WSD.
+*/
+#define pcache1 (GLOBAL(struct PCacheGlobal, pcache1_g))
+
+/*
+** When a PgHdr1 structure is allocated, the associated PCache1.szPage
+** bytes of data are located directly before it in memory (i.e. the total
+** size of the allocation is sizeof(PgHdr1)+PCache1.szPage byte). The
+** PGHDR1_TO_PAGE() macro takes a pointer to a PgHdr1 structure as
+** an argument and returns a pointer to the associated block of szPage
+** bytes. The PAGE_TO_PGHDR1() macro does the opposite: its argument is
+** a pointer to a block of szPage bytes of data and the return value is
+** a pointer to the associated PgHdr1 structure.
+**
+**   assert( PGHDR1_TO_PAGE(PAGE_TO_PGHDR1(pCache, X))==X );
+*/
+#define PGHDR1_TO_PAGE(p)    (void*)(((char*)p) - p->pCache->szPage)
+#define PAGE_TO_PGHDR1(c, p) (PgHdr1*)(((char*)p) + c->szPage)
+
+/*
+** Macros to enter and leave the PCache LRU mutex.
+*/
+#define pcache1EnterMutex(X) sqlite3_mutex_enter((X)->mutex)
+#define pcache1LeaveMutex(X) sqlite3_mutex_leave((X)->mutex)
+
+/******************************************************************************/
+/******** Page Allocation/SQLITE_CONFIG_PCACHE Related Functions **************/
+
+/*
+** This function is called during initialization if a static buffer is 
+** supplied to use for the page-cache by passing the SQLITE_CONFIG_PAGECACHE
+** verb to sqlite3_config(). Parameter pBuf points to an allocation large
+** enough to contain 'n' buffers of 'sz' bytes each.
+**
+** This routine is called from sqlite3_initialize() and so it is guaranteed
+** to be serialized already.  There is no need for further mutexing.
+*/
+SQLITE_PRIVATE void sqlite3PCacheBufferSetup(void *pBuf, int sz, int n){
+  if( pcache1.isInit ){
+    PgFreeslot *p;
+    sz = ROUNDDOWN8(sz);
+    pcache1.szSlot = sz;
+    pcache1.nSlot = pcache1.nFreeSlot = n;
+    pcache1.nReserve = n>90 ? 10 : (n/10 + 1);
+    pcache1.pStart = pBuf;
+    pcache1.pFree = 0;
+    pcache1.bUnderPressure = 0;
+    while( n-- ){
+      p = (PgFreeslot*)pBuf;
+      p->pNext = pcache1.pFree;
+      pcache1.pFree = p;
+      pBuf = (void*)&((char*)pBuf)[sz];
+    }
+    pcache1.pEnd = pBuf;
+  }
+}
+
+/*
+** Malloc function used within this file to allocate space from the buffer
+** configured using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no 
+** such buffer exists or there is no space left in it, this function falls 
+** back to sqlite3Malloc().
+**
+** Multiple threads can run this routine at the same time.  Global variables
+** in pcache1 need to be protected via mutex.
+*/
+static void *pcache1Alloc(int nByte){
+  void *p = 0;
+  assert( sqlite3_mutex_notheld(pcache1.grp.mutex) );
+  sqlite3StatusSet(SQLITE_STATUS_PAGECACHE_SIZE, nByte);
+  if( nByte<=pcache1.szSlot ){
+    sqlite3_mutex_enter(pcache1.mutex);
+    p = (PgHdr1 *)pcache1.pFree;
+    if( p ){
+      pcache1.pFree = pcache1.pFree->pNext;
+      pcache1.nFreeSlot--;
+      pcache1.bUnderPressure = pcache1.nFreeSlot<pcache1.nReserve;
+      assert( pcache1.nFreeSlot>=0 );
+      sqlite3StatusAdd(SQLITE_STATUS_PAGECACHE_USED, 1);
+    }
+    sqlite3_mutex_leave(pcache1.mutex);
+  }
+  if( p==0 ){
+    /* Memory is not available in the SQLITE_CONFIG_PAGECACHE pool.  Get
+    ** it from sqlite3Malloc instead.
+    */
+    p = sqlite3Malloc(nByte);
+    if( p ){
+      int sz = sqlite3MallocSize(p);
+      sqlite3_mutex_enter(pcache1.mutex);
+      sqlite3StatusAdd(SQLITE_STATUS_PAGECACHE_OVERFLOW, sz);
+      sqlite3_mutex_leave(pcache1.mutex);
+    }
+    sqlite3MemdebugSetType(p, MEMTYPE_PCACHE);
+  }
+  return p;
+}
+
+/*
+** Free an allocated buffer obtained from pcache1Alloc().
+*/
+static void pcache1Free(void *p){
+  if( p==0 ) return;
+  if( p>=pcache1.pStart && p<pcache1.pEnd ){
+    PgFreeslot *pSlot;
+    sqlite3_mutex_enter(pcache1.mutex);
+    sqlite3StatusAdd(SQLITE_STATUS_PAGECACHE_USED, -1);
+    pSlot = (PgFreeslot*)p;
+    pSlot->pNext = pcache1.pFree;
+    pcache1.pFree = pSlot;
+    pcache1.nFreeSlot++;
+    pcache1.bUnderPressure = pcache1.nFreeSlot<pcache1.nReserve;
+    assert( pcache1.nFreeSlot<=pcache1.nSlot );
+    sqlite3_mutex_leave(pcache1.mutex);
+  }else{
+    int iSize;
+    assert( sqlite3MemdebugHasType(p, MEMTYPE_PCACHE) );
+    sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
+    iSize = sqlite3MallocSize(p);
+    sqlite3_mutex_enter(pcache1.mutex);
+    sqlite3StatusAdd(SQLITE_STATUS_PAGECACHE_OVERFLOW, -iSize);
+    sqlite3_mutex_leave(pcache1.mutex);
+    sqlite3_free(p);
+  }
+}
+
+#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
+/*
+** Return the size of a pcache allocation
+*/
+static int pcache1MemSize(void *p){
+  if( p>=pcache1.pStart && p<pcache1.pEnd ){
+    return pcache1.szSlot;
+  }else{
+    int iSize;
+    assert( sqlite3MemdebugHasType(p, MEMTYPE_PCACHE) );
+    sqlite3MemdebugSetType(p, MEMTYPE_HEAP);
+    iSize = sqlite3MallocSize(p);
+    sqlite3MemdebugSetType(p, MEMTYPE_PCACHE);
+    return iSize;
+  }
+}
+#endif /* SQLITE_ENABLE_MEMORY_MANAGEMENT */
+
+/*
+** Allocate a new page object initially associated with cache pCache.
+*/
+static PgHdr1 *pcache1AllocPage(PCache1 *pCache){
+  int nByte = sizeof(PgHdr1) + pCache->szPage;
+  void *pPg = pcache1Alloc(nByte);
+  PgHdr1 *p;
+  if( pPg ){
+    p = PAGE_TO_PGHDR1(pCache, pPg);
+    if( pCache->bPurgeable ){
+      pCache->pGroup->nCurrentPage++;
+    }
+  }else{
+    p = 0;
+  }
+  return p;
+}
+
+/*
+** Free a page object allocated by pcache1AllocPage().
+**
+** The pointer is allowed to be NULL, which is prudent.  But it turns out
+** that the current implementation happens to never call this routine
+** with a NULL pointer, so we mark the NULL test with ALWAYS().
+*/
+static void pcache1FreePage(PgHdr1 *p){
+  if( ALWAYS(p) ){
+    PCache1 *pCache = p->pCache;
+    if( pCache->bPurgeable ){
+      pCache->pGroup->nCurrentPage--;
+    }
+    pcache1Free(PGHDR1_TO_PAGE(p));
+  }
+}
+
+/*
+** Malloc function used by SQLite to obtain space from the buffer configured
+** using sqlite3_config(SQLITE_CONFIG_PAGECACHE) option. If no such buffer
+** exists, this function falls back to sqlite3Malloc().
+*/
+SQLITE_PRIVATE void *sqlite3PageMalloc(int sz){
+  return pcache1Alloc(sz);
+}
+
+/*
+** Free an allocated buffer obtained from sqlite3PageMalloc().
+*/
+SQLITE_PRIVATE void sqlite3PageFree(void *p){
+  pcache1Free(p);
+}
+
+
+/*
+** Return true if it desirable to avoid allocating a new page cache
+** entry.
+**
+** If memory was allocated specifically to the page cache using
+** SQLITE_CONFIG_PAGECACHE but that memory has all been used, then
+** it is desirable to avoid allocating a new page cache entry because
+** presumably SQLITE_CONFIG_PAGECACHE was suppose to be sufficient
+** for all page cache needs and we should not need to spill the
+** allocation onto the heap.
+**
+** Or, the heap is used for all page cache memory put the heap is
+** under memory pressure, then again it is desirable to avoid
+** allocating a new page cache entry in order to avoid stressing
+** the heap even further.
+*/
+static int pcache1UnderMemoryPressure(PCache1 *pCache){
+  if( pcache1.nSlot && pCache->szPage<=pcache1.szSlot ){
+    return pcache1.bUnderPressure;
+  }else{
+    return sqlite3HeapNearlyFull();
+  }
+}
+
+/******************************************************************************/
+/******** General Implementation Functions ************************************/
+
+/*
+** This function is used to resize the hash table used by the cache passed
+** as the first argument.
+**
+** The PCache mutex must be held when this function is called.
+*/
+static int pcache1ResizeHash(PCache1 *p){
+  PgHdr1 **apNew;
+  unsigned int nNew;
+  unsigned int i;
+
+  assert( sqlite3_mutex_held(p->pGroup->mutex) );
+
+  nNew = p->nHash*2;
+  if( nNew<256 ){
+    nNew = 256;
+  }
+
+  pcache1LeaveMutex(p->pGroup);
+  if( p->nHash ){ sqlite3BeginBenignMalloc(); }
+  apNew = (PgHdr1 **)sqlite3_malloc(sizeof(PgHdr1 *)*nNew);
+  if( p->nHash ){ sqlite3EndBenignMalloc(); }
+  pcache1EnterMutex(p->pGroup);
+  if( apNew ){
+    memset(apNew, 0, sizeof(PgHdr1 *)*nNew);
+    for(i=0; i<p->nHash; i++){
+      PgHdr1 *pPage;
+      PgHdr1 *pNext = p->apHash[i];
+      while( (pPage = pNext)!=0 ){
+        unsigned int h = pPage->iKey % nNew;
+        pNext = pPage->pNext;
+        pPage->pNext = apNew[h];
+        apNew[h] = pPage;
+      }
+    }
+    sqlite3_free(p->apHash);
+    p->apHash = apNew;
+    p->nHash = nNew;
+  }
+
+  return (p->apHash ? SQLITE_OK : SQLITE_NOMEM);
+}
+
+/*
+** This function is used internally to remove the page pPage from the 
+** PGroup LRU list, if is part of it. If pPage is not part of the PGroup
+** LRU list, then this function is a no-op.
+**
+** The PGroup mutex must be held when this function is called.
+**
+** If pPage is NULL then this routine is a no-op.
+*/
+static void pcache1PinPage(PgHdr1 *pPage){
+  PCache1 *pCache;
+  PGroup *pGroup;
+
+  if( pPage==0 ) return;
+  pCache = pPage->pCache;
+  pGroup = pCache->pGroup;
+  assert( sqlite3_mutex_held(pGroup->mutex) );
+  if( pPage->pLruNext || pPage==pGroup->pLruTail ){
+    if( pPage->pLruPrev ){
+      pPage->pLruPrev->pLruNext = pPage->pLruNext;
+    }
+    if( pPage->pLruNext ){
+      pPage->pLruNext->pLruPrev = pPage->pLruPrev;
+    }
+    if( pGroup->pLruHead==pPage ){
+      pGroup->pLruHead = pPage->pLruNext;
+    }
+    if( pGroup->pLruTail==pPage ){
+      pGroup->pLruTail = pPage->pLruPrev;
+    }
+    pPage->pLruNext = 0;
+    pPage->pLruPrev = 0;
+    pPage->pCache->nRecyclable--;
+  }
+}
+
+
+/*
+** Remove the page supplied as an argument from the hash table 
+** (PCache1.apHash structure) that it is currently stored in.
+**
+** The PGroup mutex must be held when this function is called.
+*/
+static void pcache1RemoveFromHash(PgHdr1 *pPage){
+  unsigned int h;
+  PCache1 *pCache = pPage->pCache;
+  PgHdr1 **pp;
+
+  assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
+  h = pPage->iKey % pCache->nHash;
+  for(pp=&pCache->apHash[h]; (*pp)!=pPage; pp=&(*pp)->pNext);
+  *pp = (*pp)->pNext;
+
+  pCache->nPage--;
+}
+
+/*
+** If there are currently more than nMaxPage pages allocated, try
+** to recycle pages to reduce the number allocated to nMaxPage.
+*/
+static void pcache1EnforceMaxPage(PGroup *pGroup){
+  assert( sqlite3_mutex_held(pGroup->mutex) );
+  while( pGroup->nCurrentPage>pGroup->nMaxPage && pGroup->pLruTail ){
+    PgHdr1 *p = pGroup->pLruTail;
+    assert( p->pCache->pGroup==pGroup );
+    pcache1PinPage(p);
+    pcache1RemoveFromHash(p);
+    pcache1FreePage(p);
+  }
+}
+
+/*
+** Discard all pages from cache pCache with a page number (key value) 
+** greater than or equal to iLimit. Any pinned pages that meet this 
+** criteria are unpinned before they are discarded.
+**
+** The PCache mutex must be held when this function is called.
+*/
+static void pcache1TruncateUnsafe(
+  PCache1 *pCache,             /* The cache to truncate */
+  unsigned int iLimit          /* Drop pages with this pgno or larger */
+){
+  TESTONLY( unsigned int nPage = 0; )  /* To assert pCache->nPage is correct */
+  unsigned int h;
+  assert( sqlite3_mutex_held(pCache->pGroup->mutex) );
+  for(h=0; h<pCache->nHash; h++){
+    PgHdr1 **pp = &pCache->apHash[h]; 
+    PgHdr1 *pPage;
+    while( (pPage = *pp)!=0 ){
+      if( pPage->iKey>=iLimit ){
+        pCache->nPage--;
+        *pp = pPage->pNext;
+        pcache1PinPage(pPage);
+        pcache1FreePage(pPage);
+      }else{
+        pp = &pPage->pNext;
+        TESTONLY( nPage++; )
+      }
+    }
+  }
+  assert( pCache->nPage==nPage );
+}
+
+/******************************************************************************/
+/******** sqlite3_pcache Methods **********************************************/
+
+/*
+** Implementation of the sqlite3_pcache.xInit method.
+*/
+static int pcache1Init(void *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  assert( pcache1.isInit==0 );
+  memset(&pcache1, 0, sizeof(pcache1));
+  if( sqlite3GlobalConfig.bCoreMutex ){
+    pcache1.grp.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_LRU);
+    pcache1.mutex = sqlite3_mutex_alloc(SQLITE_MUTEX_STATIC_PMEM);
+  }
+  pcache1.grp.mxPinned = 10;
+  pcache1.isInit = 1;
+  return SQLITE_OK;
+}
+
+/*
+** Implementation of the sqlite3_pcache.xShutdown method.
+** Note that the static mutex allocated in xInit does 
+** not need to be freed.
+*/
+static void pcache1Shutdown(void *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  assert( pcache1.isInit!=0 );
+  memset(&pcache1, 0, sizeof(pcache1));
+}
+
+/*
+** Implementation of the sqlite3_pcache.xCreate method.
+**
+** Allocate a new cache.
+*/
+static sqlite3_pcache *pcache1Create(int szPage, int bPurgeable){
+  PCache1 *pCache;      /* The newly created page cache */
+  PGroup *pGroup;       /* The group the new page cache will belong to */
+  int sz;               /* Bytes of memory required to allocate the new cache */
+
+  /*
+  ** The seperateCache variable is true if each PCache has its own private
+  ** PGroup.  In other words, separateCache is true for mode (1) where no
+  ** mutexing is required.
+  **
+  **   *  Always use a unified cache (mode-2) if ENABLE_MEMORY_MANAGEMENT
+  **
+  **   *  Always use a unified cache in single-threaded applications
+  **
+  **   *  Otherwise (if multi-threaded and ENABLE_MEMORY_MANAGEMENT is off)
+  **      use separate caches (mode-1)
+  */
+#if defined(SQLITE_ENABLE_MEMORY_MANAGEMENT) || SQLITE_THREADSAFE==0
+  const int separateCache = 0;
+#else
+  int separateCache = sqlite3GlobalConfig.bCoreMutex>0;
+#endif
+
+  sz = sizeof(PCache1) + sizeof(PGroup)*separateCache;
+  pCache = (PCache1 *)sqlite3_malloc(sz);
+  if( pCache ){
+    memset(pCache, 0, sz);
+    if( separateCache ){
+      pGroup = (PGroup*)&pCache[1];
+      pGroup->mxPinned = 10;
+    }else{
+      pGroup = &pcache1_g.grp;
+    }
+    pCache->pGroup = pGroup;
+    pCache->szPage = szPage;
+    pCache->bPurgeable = (bPurgeable ? 1 : 0);
+    if( bPurgeable ){
+      pCache->nMin = 10;
+      pcache1EnterMutex(pGroup);
+      pGroup->nMinPage += pCache->nMin;
+      pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
+      pcache1LeaveMutex(pGroup);
+    }
+  }
+  return (sqlite3_pcache *)pCache;
+}
+
+/*
+** Implementation of the sqlite3_pcache.xCachesize method. 
+**
+** Configure the cache_size limit for a cache.
+*/
+static void pcache1Cachesize(sqlite3_pcache *p, int nMax){
+  PCache1 *pCache = (PCache1 *)p;
+  if( pCache->bPurgeable ){
+    PGroup *pGroup = pCache->pGroup;
+    pcache1EnterMutex(pGroup);
+    pGroup->nMaxPage += (nMax - pCache->nMax);
+    pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
+    pCache->nMax = nMax;
+    pCache->n90pct = pCache->nMax*9/10;
+    pcache1EnforceMaxPage(pGroup);
+    pcache1LeaveMutex(pGroup);
+  }
+}
+
+/*
+** Implementation of the sqlite3_pcache.xPagecount method. 
+*/
+static int pcache1Pagecount(sqlite3_pcache *p){
+  int n;
+  PCache1 *pCache = (PCache1*)p;
+  pcache1EnterMutex(pCache->pGroup);
+  n = pCache->nPage;
+  pcache1LeaveMutex(pCache->pGroup);
+  return n;
+}
+
+/*
+** Implementation of the sqlite3_pcache.xFetch method. 
+**
+** Fetch a page by key value.
+**
+** Whether or not a new page may be allocated by this function depends on
+** the value of the createFlag argument.  0 means do not allocate a new
+** page.  1 means allocate a new page if space is easily available.  2 
+** means to try really hard to allocate a new page.
+**
+** For a non-purgeable cache (a cache used as the storage for an in-memory
+** database) there is really no difference between createFlag 1 and 2.  So
+** the calling function (pcache.c) will never have a createFlag of 1 on
+** a non-purgable cache.
+**
+** There are three different approaches to obtaining space for a page,
+** depending on the value of parameter createFlag (which may be 0, 1 or 2).
+**
+**   1. Regardless of the value of createFlag, the cache is searched for a 
+**      copy of the requested page. If one is found, it is returned.
+**
+**   2. If createFlag==0 and the page is not already in the cache, NULL is
+**      returned.
+**
+**   3. If createFlag is 1, and the page is not already in the cache, then
+**      return NULL (do not allocate a new page) if any of the following
+**      conditions are true:
+**
+**       (a) the number of pages pinned by the cache is greater than
+**           PCache1.nMax, or
+**
+**       (b) the number of pages pinned by the cache is greater than
+**           the sum of nMax for all purgeable caches, less the sum of 
+**           nMin for all other purgeable caches, or
+**
+**   4. If none of the first three conditions apply and the cache is marked
+**      as purgeable, and if one of the following is true:
+**
+**       (a) The number of pages allocated for the cache is already 
+**           PCache1.nMax, or
+**
+**       (b) The number of pages allocated for all purgeable caches is
+**           already equal to or greater than the sum of nMax for all
+**           purgeable caches,
+**
+**       (c) The system is under memory pressure and wants to avoid
+**           unnecessary pages cache entry allocations
+**
+**      then attempt to recycle a page from the LRU list. If it is the right
+**      size, return the recycled buffer. Otherwise, free the buffer and
+**      proceed to step 5. 
+**
+**   5. Otherwise, allocate and return a new page buffer.
+*/
+static void *pcache1Fetch(sqlite3_pcache *p, unsigned int iKey, int createFlag){
+  int nPinned;
+  PCache1 *pCache = (PCache1 *)p;
+  PGroup *pGroup;
+  PgHdr1 *pPage = 0;
+
+  assert( pCache->bPurgeable || createFlag!=1 );
+  assert( pCache->bPurgeable || pCache->nMin==0 );
+  assert( pCache->bPurgeable==0 || pCache->nMin==10 );
+  assert( pCache->nMin==0 || pCache->bPurgeable );
+  pcache1EnterMutex(pGroup = pCache->pGroup);
+
+  /* Step 1: Search the hash table for an existing entry. */
+  if( pCache->nHash>0 ){
+    unsigned int h = iKey % pCache->nHash;
+    for(pPage=pCache->apHash[h]; pPage&&pPage->iKey!=iKey; pPage=pPage->pNext);
+  }
+
+  /* Step 2: Abort if no existing page is found and createFlag is 0 */
+  if( pPage || createFlag==0 ){
+    pcache1PinPage(pPage);
+    goto fetch_out;
+  }
+
+  /* The pGroup local variable will normally be initialized by the
+  ** pcache1EnterMutex() macro above.  But if SQLITE_MUTEX_OMIT is defined,
+  ** then pcache1EnterMutex() is a no-op, so we have to initialize the
+  ** local variable here.  Delaying the initialization of pGroup is an
+  ** optimization:  The common case is to exit the module before reaching
+  ** this point.
+  */
+#ifdef SQLITE_MUTEX_OMIT
+  pGroup = pCache->pGroup;
+#endif
+
+
+  /* Step 3: Abort if createFlag is 1 but the cache is nearly full */
+  nPinned = pCache->nPage - pCache->nRecyclable;
+  assert( nPinned>=0 );
+  assert( pGroup->mxPinned == pGroup->nMaxPage + 10 - pGroup->nMinPage );
+  assert( pCache->n90pct == pCache->nMax*9/10 );
+  if( createFlag==1 && (
+        nPinned>=pGroup->mxPinned
+     || nPinned>=(int)pCache->n90pct
+     || pcache1UnderMemoryPressure(pCache)
+  )){
+    goto fetch_out;
+  }
+
+  if( pCache->nPage>=pCache->nHash && pcache1ResizeHash(pCache) ){
+    goto fetch_out;
+  }
+
+  /* Step 4. Try to recycle a page. */
+  if( pCache->bPurgeable && pGroup->pLruTail && (
+         (pCache->nPage+1>=pCache->nMax)
+      || pGroup->nCurrentPage>=pGroup->nMaxPage
+      || pcache1UnderMemoryPressure(pCache)
+  )){
+    PCache1 *pOtherCache;
+    pPage = pGroup->pLruTail;
+    pcache1RemoveFromHash(pPage);
+    pcache1PinPage(pPage);
+    if( (pOtherCache = pPage->pCache)->szPage!=pCache->szPage ){
+      pcache1FreePage(pPage);
+      pPage = 0;
+    }else{
+      pGroup->nCurrentPage -= 
+               (pOtherCache->bPurgeable - pCache->bPurgeable);
+    }
+  }
+
+  /* Step 5. If a usable page buffer has still not been found, 
+  ** attempt to allocate a new one. 
+  */
+  if( !pPage ){
+    if( createFlag==1 ) sqlite3BeginBenignMalloc();
+    pcache1LeaveMutex(pGroup);
+    pPage = pcache1AllocPage(pCache);
+    pcache1EnterMutex(pGroup);
+    if( createFlag==1 ) sqlite3EndBenignMalloc();
+  }
+
+  if( pPage ){
+    unsigned int h = iKey % pCache->nHash;
+    pCache->nPage++;
+    pPage->iKey = iKey;
+    pPage->pNext = pCache->apHash[h];
+    pPage->pCache = pCache;
+    pPage->pLruPrev = 0;
+    pPage->pLruNext = 0;
+    *(void **)(PGHDR1_TO_PAGE(pPage)) = 0;
+    pCache->apHash[h] = pPage;
+  }
+
+fetch_out:
+  if( pPage && iKey>pCache->iMaxKey ){
+    pCache->iMaxKey = iKey;
+  }
+  pcache1LeaveMutex(pGroup);
+  return (pPage ? PGHDR1_TO_PAGE(pPage) : 0);
+}
+
+
+/*
+** Implementation of the sqlite3_pcache.xUnpin method.
+**
+** Mark a page as unpinned (eligible for asynchronous recycling).
+*/
+static void pcache1Unpin(sqlite3_pcache *p, void *pPg, int reuseUnlikely){
+  PCache1 *pCache = (PCache1 *)p;
+  PgHdr1 *pPage = PAGE_TO_PGHDR1(pCache, pPg);
+  PGroup *pGroup = pCache->pGroup;
+ 
+  assert( pPage->pCache==pCache );
+  pcache1EnterMutex(pGroup);
+
+  /* It is an error to call this function if the page is already 
+  ** part of the PGroup LRU list.
+  */
+  assert( pPage->pLruPrev==0 && pPage->pLruNext==0 );
+  assert( pGroup->pLruHead!=pPage && pGroup->pLruTail!=pPage );
+
+  if( reuseUnlikely || pGroup->nCurrentPage>pGroup->nMaxPage ){
+    pcache1RemoveFromHash(pPage);
+    pcache1FreePage(pPage);
+  }else{
+    /* Add the page to the PGroup LRU list. */
+    if( pGroup->pLruHead ){
+      pGroup->pLruHead->pLruPrev = pPage;
+      pPage->pLruNext = pGroup->pLruHead;
+      pGroup->pLruHead = pPage;
+    }else{
+      pGroup->pLruTail = pPage;
+      pGroup->pLruHead = pPage;
+    }
+    pCache->nRecyclable++;
+  }
+
+  pcache1LeaveMutex(pCache->pGroup);
+}
+
+/*
+** Implementation of the sqlite3_pcache.xRekey method. 
+*/
+static void pcache1Rekey(
+  sqlite3_pcache *p,
+  void *pPg,
+  unsigned int iOld,
+  unsigned int iNew
+){
+  PCache1 *pCache = (PCache1 *)p;
+  PgHdr1 *pPage = PAGE_TO_PGHDR1(pCache, pPg);
+  PgHdr1 **pp;
+  unsigned int h; 
+  assert( pPage->iKey==iOld );
+  assert( pPage->pCache==pCache );
+
+  pcache1EnterMutex(pCache->pGroup);
+
+  h = iOld%pCache->nHash;
+  pp = &pCache->apHash[h];
+  while( (*pp)!=pPage ){
+    pp = &(*pp)->pNext;
+  }
+  *pp = pPage->pNext;
+
+  h = iNew%pCache->nHash;
+  pPage->iKey = iNew;
+  pPage->pNext = pCache->apHash[h];
+  pCache->apHash[h] = pPage;
+  if( iNew>pCache->iMaxKey ){
+    pCache->iMaxKey = iNew;
+  }
+
+  pcache1LeaveMutex(pCache->pGroup);
+}
+
+/*
+** Implementation of the sqlite3_pcache.xTruncate method. 
+**
+** Discard all unpinned pages in the cache with a page number equal to
+** or greater than parameter iLimit. Any pinned pages with a page number
+** equal to or greater than iLimit are implicitly unpinned.
+*/
+static void pcache1Truncate(sqlite3_pcache *p, unsigned int iLimit){
+  PCache1 *pCache = (PCache1 *)p;
+  pcache1EnterMutex(pCache->pGroup);
+  if( iLimit<=pCache->iMaxKey ){
+    pcache1TruncateUnsafe(pCache, iLimit);
+    pCache->iMaxKey = iLimit-1;
+  }
+  pcache1LeaveMutex(pCache->pGroup);
+}
+
+/*
+** Implementation of the sqlite3_pcache.xDestroy method. 
+**
+** Destroy a cache allocated using pcache1Create().
+*/
+static void pcache1Destroy(sqlite3_pcache *p){
+  PCache1 *pCache = (PCache1 *)p;
+  PGroup *pGroup = pCache->pGroup;
+  assert( pCache->bPurgeable || (pCache->nMax==0 && pCache->nMin==0) );
+  pcache1EnterMutex(pGroup);
+  pcache1TruncateUnsafe(pCache, 0);
+  pGroup->nMaxPage -= pCache->nMax;
+  pGroup->nMinPage -= pCache->nMin;
+  pGroup->mxPinned = pGroup->nMaxPage + 10 - pGroup->nMinPage;
+  pcache1EnforceMaxPage(pGroup);
+  pcache1LeaveMutex(pGroup);
+  sqlite3_free(pCache->apHash);
+  sqlite3_free(pCache);
+}
+
+/*
+** This function is called during initialization (sqlite3_initialize()) to
+** install the default pluggable cache module, assuming the user has not
+** already provided an alternative.
+*/
+SQLITE_PRIVATE void sqlite3PCacheSetDefault(void){
+  static const sqlite3_pcache_methods defaultMethods = {
+    0,                       /* pArg */
+    pcache1Init,             /* xInit */
+    pcache1Shutdown,         /* xShutdown */
+    pcache1Create,           /* xCreate */
+    pcache1Cachesize,        /* xCachesize */
+    pcache1Pagecount,        /* xPagecount */
+    pcache1Fetch,            /* xFetch */
+    pcache1Unpin,            /* xUnpin */
+    pcache1Rekey,            /* xRekey */
+    pcache1Truncate,         /* xTruncate */
+    pcache1Destroy           /* xDestroy */
+  };
+  sqlite3_config(SQLITE_CONFIG_PCACHE, &defaultMethods);
+}
+
+#ifdef SQLITE_ENABLE_MEMORY_MANAGEMENT
+/*
+** This function is called to free superfluous dynamically allocated memory
+** held by the pager system. Memory in use by any SQLite pager allocated
+** by the current thread may be sqlite3_free()ed.
+**
+** nReq is the number of bytes of memory required. Once this much has
+** been released, the function returns. The return value is the total number 
+** of bytes of memory released.
+*/
+SQLITE_PRIVATE int sqlite3PcacheReleaseMemory(int nReq){
+  int nFree = 0;
+  assert( sqlite3_mutex_notheld(pcache1.grp.mutex) );
+  assert( sqlite3_mutex_notheld(pcache1.mutex) );
+  if( pcache1.pStart==0 ){
+    PgHdr1 *p;
+    pcache1EnterMutex(&pcache1.grp);
+    while( (nReq<0 || nFree<nReq) && ((p=pcache1.grp.pLruTail)!=0) ){
+      nFree += pcache1MemSize(PGHDR1_TO_PAGE(p));
+      pcache1PinPage(p);
+      pcache1RemoveFromHash(p);
+      pcache1FreePage(p);
+    }
+    pcache1LeaveMutex(&pcache1.grp);
+  }
+  return nFree;
+}
+#endif /* SQLITE_ENABLE_MEMORY_MANAGEMENT */
+
+#ifdef SQLITE_TEST
+/*
+** This function is used by test procedures to inspect the internal state
+** of the global cache.
+*/
+SQLITE_PRIVATE void sqlite3PcacheStats(
+  int *pnCurrent,      /* OUT: Total number of pages cached */
+  int *pnMax,          /* OUT: Global maximum cache size */
+  int *pnMin,          /* OUT: Sum of PCache1.nMin for purgeable caches */
+  int *pnRecyclable    /* OUT: Total number of pages available for recycling */
+){
+  PgHdr1 *p;
+  int nRecyclable = 0;
+  for(p=pcache1.grp.pLruHead; p; p=p->pLruNext){
+    nRecyclable++;
+  }
+  *pnCurrent = pcache1.grp.nCurrentPage;
+  *pnMax = pcache1.grp.nMaxPage;
+  *pnMin = pcache1.grp.nMinPage;
+  *pnRecyclable = nRecyclable;
+}
+#endif
+
+/************** End of pcache1.c *********************************************/
+/************** Begin file rowset.c ******************************************/
+/*
+** 2008 December 3
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This module implements an object we call a "RowSet".
+**
+** The RowSet object is a collection of rowids.  Rowids
+** are inserted into the RowSet in an arbitrary order.  Inserts
+** can be intermixed with tests to see if a given rowid has been
+** previously inserted into the RowSet.
+**
+** After all inserts are finished, it is possible to extract the
+** elements of the RowSet in sorted order.  Once this extraction
+** process has started, no new elements may be inserted.
+**
+** Hence, the primitive operations for a RowSet are:
+**
+**    CREATE
+**    INSERT
+**    TEST
+**    SMALLEST
+**    DESTROY
+**
+** The CREATE and DESTROY primitives are the constructor and destructor,
+** obviously.  The INSERT primitive adds a new element to the RowSet.
+** TEST checks to see if an element is already in the RowSet.  SMALLEST
+** extracts the least value from the RowSet.
+**
+** The INSERT primitive might allocate additional memory.  Memory is
+** allocated in chunks so most INSERTs do no allocation.  There is an 
+** upper bound on the size of allocated memory.  No memory is freed
+** until DESTROY.
+**
+** The TEST primitive includes a "batch" number.  The TEST primitive
+** will only see elements that were inserted before the last change
+** in the batch number.  In other words, if an INSERT occurs between
+** two TESTs where the TESTs have the same batch nubmer, then the
+** value added by the INSERT will not be visible to the second TEST.
+** The initial batch number is zero, so if the very first TEST contains
+** a non-zero batch number, it will see all prior INSERTs.
+**
+** No INSERTs may occurs after a SMALLEST.  An assertion will fail if
+** that is attempted.
+**
+** The cost of an INSERT is roughly constant.  (Sometime new memory
+** has to be allocated on an INSERT.)  The cost of a TEST with a new
+** batch number is O(NlogN) where N is the number of elements in the RowSet.
+** The cost of a TEST using the same batch number is O(logN).  The cost
+** of the first SMALLEST is O(NlogN).  Second and subsequent SMALLEST
+** primitives are constant time.  The cost of DESTROY is O(N).
+**
+** There is an added cost of O(N) when switching between TEST and
+** SMALLEST primitives.
+*/
+
+
+/*
+** Target size for allocation chunks.
+*/
+#define ROWSET_ALLOCATION_SIZE 1024
+
+/*
+** The number of rowset entries per allocation chunk.
+*/
+#define ROWSET_ENTRY_PER_CHUNK  \
+                       ((ROWSET_ALLOCATION_SIZE-8)/sizeof(struct RowSetEntry))
+
+/*
+** Each entry in a RowSet is an instance of the following object.
+*/
+struct RowSetEntry {            
+  i64 v;                        /* ROWID value for this entry */
+  struct RowSetEntry *pRight;   /* Right subtree (larger entries) or list */
+  struct RowSetEntry *pLeft;    /* Left subtree (smaller entries) */
+};
+
+/*
+** RowSetEntry objects are allocated in large chunks (instances of the
+** following structure) to reduce memory allocation overhead.  The
+** chunks are kept on a linked list so that they can be deallocated
+** when the RowSet is destroyed.
+*/
+struct RowSetChunk {
+  struct RowSetChunk *pNextChunk;        /* Next chunk on list of them all */
+  struct RowSetEntry aEntry[ROWSET_ENTRY_PER_CHUNK]; /* Allocated entries */
+};
+
+/*
+** A RowSet in an instance of the following structure.
+**
+** A typedef of this structure if found in sqliteInt.h.
+*/
+struct RowSet {
+  struct RowSetChunk *pChunk;    /* List of all chunk allocations */
+  sqlite3 *db;                   /* The database connection */
+  struct RowSetEntry *pEntry;    /* List of entries using pRight */
+  struct RowSetEntry *pLast;     /* Last entry on the pEntry list */
+  struct RowSetEntry *pFresh;    /* Source of new entry objects */
+  struct RowSetEntry *pTree;     /* Binary tree of entries */
+  u16 nFresh;                    /* Number of objects on pFresh */
+  u8 isSorted;                   /* True if pEntry is sorted */
+  u8 iBatch;                     /* Current insert batch */
+};
+
+/*
+** Turn bulk memory into a RowSet object.  N bytes of memory
+** are available at pSpace.  The db pointer is used as a memory context
+** for any subsequent allocations that need to occur.
+** Return a pointer to the new RowSet object.
+**
+** It must be the case that N is sufficient to make a Rowset.  If not
+** an assertion fault occurs.
+** 
+** If N is larger than the minimum, use the surplus as an initial
+** allocation of entries available to be filled.
+*/
+SQLITE_PRIVATE RowSet *sqlite3RowSetInit(sqlite3 *db, void *pSpace, unsigned int N){
+  RowSet *p;
+  assert( N >= ROUND8(sizeof(*p)) );
+  p = pSpace;
+  p->pChunk = 0;
+  p->db = db;
+  p->pEntry = 0;
+  p->pLast = 0;
+  p->pTree = 0;
+  p->pFresh = (struct RowSetEntry*)(ROUND8(sizeof(*p)) + (char*)p);
+  p->nFresh = (u16)((N - ROUND8(sizeof(*p)))/sizeof(struct RowSetEntry));
+  p->isSorted = 1;
+  p->iBatch = 0;
+  return p;
+}
+
+/*
+** Deallocate all chunks from a RowSet.  This frees all memory that
+** the RowSet has allocated over its lifetime.  This routine is
+** the destructor for the RowSet.
+*/
+SQLITE_PRIVATE void sqlite3RowSetClear(RowSet *p){
+  struct RowSetChunk *pChunk, *pNextChunk;
+  for(pChunk=p->pChunk; pChunk; pChunk = pNextChunk){
+    pNextChunk = pChunk->pNextChunk;
+    sqlite3DbFree(p->db, pChunk);
+  }
+  p->pChunk = 0;
+  p->nFresh = 0;
+  p->pEntry = 0;
+  p->pLast = 0;
+  p->pTree = 0;
+  p->isSorted = 1;
+}
+
+/*
+** Insert a new value into a RowSet.
+**
+** The mallocFailed flag of the database connection is set if a
+** memory allocation fails.
+*/
+SQLITE_PRIVATE void sqlite3RowSetInsert(RowSet *p, i64 rowid){
+  struct RowSetEntry *pEntry;  /* The new entry */
+  struct RowSetEntry *pLast;   /* The last prior entry */
+  assert( p!=0 );
+  if( p->nFresh==0 ){
+    struct RowSetChunk *pNew;
+    pNew = sqlite3DbMallocRaw(p->db, sizeof(*pNew));
+    if( pNew==0 ){
+      return;
+    }
+    pNew->pNextChunk = p->pChunk;
+    p->pChunk = pNew;
+    p->pFresh = pNew->aEntry;
+    p->nFresh = ROWSET_ENTRY_PER_CHUNK;
+  }
+  pEntry = p->pFresh++;
+  p->nFresh--;
+  pEntry->v = rowid;
+  pEntry->pRight = 0;
+  pLast = p->pLast;
+  if( pLast ){
+    if( p->isSorted && rowid<=pLast->v ){
+      p->isSorted = 0;
+    }
+    pLast->pRight = pEntry;
+  }else{
+    assert( p->pEntry==0 ); /* Fires if INSERT after SMALLEST */
+    p->pEntry = pEntry;
+  }
+  p->pLast = pEntry;
+}
+
+/*
+** Merge two lists of RowSetEntry objects.  Remove duplicates.
+**
+** The input lists are connected via pRight pointers and are 
+** assumed to each already be in sorted order.
+*/
+static struct RowSetEntry *rowSetMerge(
+  struct RowSetEntry *pA,    /* First sorted list to be merged */
+  struct RowSetEntry *pB     /* Second sorted list to be merged */
+){
+  struct RowSetEntry head;
+  struct RowSetEntry *pTail;
+
+  pTail = &head;
+  while( pA && pB ){
+    assert( pA->pRight==0 || pA->v<=pA->pRight->v );
+    assert( pB->pRight==0 || pB->v<=pB->pRight->v );
+    if( pA->v<pB->v ){
+      pTail->pRight = pA;
+      pA = pA->pRight;
+      pTail = pTail->pRight;
+    }else if( pB->v<pA->v ){
+      pTail->pRight = pB;
+      pB = pB->pRight;
+      pTail = pTail->pRight;
+    }else{
+      pA = pA->pRight;
+    }
+  }
+  if( pA ){
+    assert( pA->pRight==0 || pA->v<=pA->pRight->v );
+    pTail->pRight = pA;
+  }else{
+    assert( pB==0 || pB->pRight==0 || pB->v<=pB->pRight->v );
+    pTail->pRight = pB;
+  }
+  return head.pRight;
+}
+
+/*
+** Sort all elements on the pEntry list of the RowSet into ascending order.
+*/ 
+static void rowSetSort(RowSet *p){
+  unsigned int i;
+  struct RowSetEntry *pEntry;
+  struct RowSetEntry *aBucket[40];
+
+  assert( p->isSorted==0 );
+  memset(aBucket, 0, sizeof(aBucket));
+  while( p->pEntry ){
+    pEntry = p->pEntry;
+    p->pEntry = pEntry->pRight;
+    pEntry->pRight = 0;
+    for(i=0; aBucket[i]; i++){
+      pEntry = rowSetMerge(aBucket[i], pEntry);
+      aBucket[i] = 0;
+    }
+    aBucket[i] = pEntry;
+  }
+  pEntry = 0;
+  for(i=0; i<sizeof(aBucket)/sizeof(aBucket[0]); i++){
+    pEntry = rowSetMerge(pEntry, aBucket[i]);
+  }
+  p->pEntry = pEntry;
+  p->pLast = 0;
+  p->isSorted = 1;
+}
+
+
+/*
+** The input, pIn, is a binary tree (or subtree) of RowSetEntry objects.
+** Convert this tree into a linked list connected by the pRight pointers
+** and return pointers to the first and last elements of the new list.
+*/
+static void rowSetTreeToList(
+  struct RowSetEntry *pIn,         /* Root of the input tree */
+  struct RowSetEntry **ppFirst,    /* Write head of the output list here */
+  struct RowSetEntry **ppLast      /* Write tail of the output list here */
+){
+  assert( pIn!=0 );
+  if( pIn->pLeft ){
+    struct RowSetEntry *p;
+    rowSetTreeToList(pIn->pLeft, ppFirst, &p);
+    p->pRight = pIn;
+  }else{
+    *ppFirst = pIn;
+  }
+  if( pIn->pRight ){
+    rowSetTreeToList(pIn->pRight, &pIn->pRight, ppLast);
+  }else{
+    *ppLast = pIn;
+  }
+  assert( (*ppLast)->pRight==0 );
+}
+
+
+/*
+** Convert a sorted list of elements (connected by pRight) into a binary
+** tree with depth of iDepth.  A depth of 1 means the tree contains a single
+** node taken from the head of *ppList.  A depth of 2 means a tree with
+** three nodes.  And so forth.
+**
+** Use as many entries from the input list as required and update the
+** *ppList to point to the unused elements of the list.  If the input
+** list contains too few elements, then construct an incomplete tree
+** and leave *ppList set to NULL.
+**
+** Return a pointer to the root of the constructed binary tree.
+*/
+static struct RowSetEntry *rowSetNDeepTree(
+  struct RowSetEntry **ppList,
+  int iDepth
+){
+  struct RowSetEntry *p;         /* Root of the new tree */
+  struct RowSetEntry *pLeft;     /* Left subtree */
+  if( *ppList==0 ){
+    return 0;
+  }
+  if( iDepth==1 ){
+    p = *ppList;
+    *ppList = p->pRight;
+    p->pLeft = p->pRight = 0;
+    return p;
+  }
+  pLeft = rowSetNDeepTree(ppList, iDepth-1);
+  p = *ppList;
+  if( p==0 ){
+    return pLeft;
+  }
+  p->pLeft = pLeft;
+  *ppList = p->pRight;
+  p->pRight = rowSetNDeepTree(ppList, iDepth-1);
+  return p;
+}
+
+/*
+** Convert a sorted list of elements into a binary tree. Make the tree
+** as deep as it needs to be in order to contain the entire list.
+*/
+static struct RowSetEntry *rowSetListToTree(struct RowSetEntry *pList){
+  int iDepth;           /* Depth of the tree so far */
+  struct RowSetEntry *p;       /* Current tree root */
+  struct RowSetEntry *pLeft;   /* Left subtree */
+
+  assert( pList!=0 );
+  p = pList;
+  pList = p->pRight;
+  p->pLeft = p->pRight = 0;
+  for(iDepth=1; pList; iDepth++){
+    pLeft = p;
+    p = pList;
+    pList = p->pRight;
+    p->pLeft = pLeft;
+    p->pRight = rowSetNDeepTree(&pList, iDepth);
+  }
+  return p;
+}
+
+/*
+** Convert the list in p->pEntry into a sorted list if it is not
+** sorted already.  If there is a binary tree on p->pTree, then
+** convert it into a list too and merge it into the p->pEntry list.
+*/
+static void rowSetToList(RowSet *p){
+  if( !p->isSorted ){
+    rowSetSort(p);
+  }
+  if( p->pTree ){
+    struct RowSetEntry *pHead, *pTail;
+    rowSetTreeToList(p->pTree, &pHead, &pTail);
+    p->pTree = 0;
+    p->pEntry = rowSetMerge(p->pEntry, pHead);
+  }
+}
+
+/*
+** Extract the smallest element from the RowSet.
+** Write the element into *pRowid.  Return 1 on success.  Return
+** 0 if the RowSet is already empty.
+**
+** After this routine has been called, the sqlite3RowSetInsert()
+** routine may not be called again.  
+*/
+SQLITE_PRIVATE int sqlite3RowSetNext(RowSet *p, i64 *pRowid){
+  rowSetToList(p);
+  if( p->pEntry ){
+    *pRowid = p->pEntry->v;
+    p->pEntry = p->pEntry->pRight;
+    if( p->pEntry==0 ){
+      sqlite3RowSetClear(p);
+    }
+    return 1;
+  }else{
+    return 0;
+  }
+}
+
+/*
+** Check to see if element iRowid was inserted into the the rowset as
+** part of any insert batch prior to iBatch.  Return 1 or 0.
+*/
+SQLITE_PRIVATE int sqlite3RowSetTest(RowSet *pRowSet, u8 iBatch, sqlite3_int64 iRowid){
+  struct RowSetEntry *p;
+  if( iBatch!=pRowSet->iBatch ){
+    if( pRowSet->pEntry ){
+      rowSetToList(pRowSet);
+      pRowSet->pTree = rowSetListToTree(pRowSet->pEntry);
+      pRowSet->pEntry = 0;
+      pRowSet->pLast = 0;
+    }
+    pRowSet->iBatch = iBatch;
+  }
+  p = pRowSet->pTree;
+  while( p ){
+    if( p->v<iRowid ){
+      p = p->pRight;
+    }else if( p->v>iRowid ){
+      p = p->pLeft;
+    }else{
+      return 1;
+    }
+  }
+  return 0;
+}
+
+/************** End of rowset.c **********************************************/
+/************** Begin file pager.c *******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This is the implementation of the page cache subsystem or "pager".
+** 
+** The pager is used to access a database disk file.  It implements
+** atomic commit and rollback through the use of a journal file that
+** is separate from the database file.  The pager also implements file
+** locking to prevent two processes from writing the same database
+** file simultaneously, or one process from reading the database while
+** another is writing.
+*/
+#ifndef SQLITE_OMIT_DISKIO
+/************** Include wal.h in the middle of pager.c ***********************/
+/************** Begin file wal.h *********************************************/
+/*
+** 2010 February 1
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This header file defines the interface to the write-ahead logging 
+** system. Refer to the comments below and the header comment attached to 
+** the implementation of each function in log.c for further details.
+*/
+
+#ifndef _WAL_H_
+#define _WAL_H_
+
+
+#ifdef SQLITE_OMIT_WAL
+# define sqlite3WalOpen(x,y,z)                   0
+# define sqlite3WalClose(w,x,y,z)                0
+# define sqlite3WalBeginReadTransaction(y,z)     0
+# define sqlite3WalEndReadTransaction(z)
+# define sqlite3WalRead(v,w,x,y,z)               0
+# define sqlite3WalDbsize(y)                     0
+# define sqlite3WalBeginWriteTransaction(y)      0
+# define sqlite3WalEndWriteTransaction(x)        0
+# define sqlite3WalUndo(x,y,z)                   0
+# define sqlite3WalSavepoint(y,z)
+# define sqlite3WalSavepointUndo(y,z)            0
+# define sqlite3WalFrames(u,v,w,x,y,z)           0
+# define sqlite3WalCheckpoint(r,s,t,u,v,w,x,y,z) 0
+# define sqlite3WalCallback(z)                   0
+# define sqlite3WalExclusiveMode(y,z)            0
+# define sqlite3WalHeapMemory(z)                 0
+#else
+
+#define WAL_SAVEPOINT_NDATA 4
+
+/* Connection to a write-ahead log (WAL) file. 
+** There is one object of this type for each pager. 
+*/
+typedef struct Wal Wal;
+
+/* Open and close a connection to a write-ahead log. */
+SQLITE_PRIVATE int sqlite3WalOpen(sqlite3_vfs*, sqlite3_file*, const char *zName, int, Wal**);
+SQLITE_PRIVATE int sqlite3WalClose(Wal *pWal, int sync_flags, int, u8 *);
+
+/* Used by readers to open (lock) and close (unlock) a snapshot.  A 
+** snapshot is like a read-transaction.  It is the state of the database
+** at an instant in time.  sqlite3WalOpenSnapshot gets a read lock and
+** preserves the current state even if the other threads or processes
+** write to or checkpoint the WAL.  sqlite3WalCloseSnapshot() closes the
+** transaction and releases the lock.
+*/
+SQLITE_PRIVATE int sqlite3WalBeginReadTransaction(Wal *pWal, int *);
+SQLITE_PRIVATE void sqlite3WalEndReadTransaction(Wal *pWal);
+
+/* Read a page from the write-ahead log, if it is present. */
+SQLITE_PRIVATE int sqlite3WalRead(Wal *pWal, Pgno pgno, int *pInWal, int nOut, u8 *pOut);
+
+/* If the WAL is not empty, return the size of the database. */
+SQLITE_PRIVATE Pgno sqlite3WalDbsize(Wal *pWal);
+
+/* Obtain or release the WRITER lock. */
+SQLITE_PRIVATE int sqlite3WalBeginWriteTransaction(Wal *pWal);
+SQLITE_PRIVATE int sqlite3WalEndWriteTransaction(Wal *pWal);
+
+/* Undo any frames written (but not committed) to the log */
+SQLITE_PRIVATE int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *pUndoCtx);
+
+/* Return an integer that records the current (uncommitted) write
+** position in the WAL */
+SQLITE_PRIVATE void sqlite3WalSavepoint(Wal *pWal, u32 *aWalData);
+
+/* Move the write position of the WAL back to iFrame.  Called in
+** response to a ROLLBACK TO command. */
+SQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData);
+
+/* Write a frame or frames to the log. */
+SQLITE_PRIVATE int sqlite3WalFrames(Wal *pWal, int, PgHdr *, Pgno, int, int);
+
+/* Copy pages from the log to the database file */ 
+SQLITE_PRIVATE int sqlite3WalCheckpoint(
+  Wal *pWal,                      /* Write-ahead log connection */
+  int eMode,                      /* One of PASSIVE, FULL and RESTART */
+  int (*xBusy)(void*),            /* Function to call when busy */
+  void *pBusyArg,                 /* Context argument for xBusyHandler */
+  int sync_flags,                 /* Flags to sync db file with (or 0) */
+  int nBuf,                       /* Size of buffer nBuf */
+  u8 *zBuf,                       /* Temporary buffer to use */
+  int *pnLog,                     /* OUT: Number of frames in WAL */
+  int *pnCkpt                     /* OUT: Number of backfilled frames in WAL */
+);
+
+/* Return the value to pass to a sqlite3_wal_hook callback, the
+** number of frames in the WAL at the point of the last commit since
+** sqlite3WalCallback() was called.  If no commits have occurred since
+** the last call, then return 0.
+*/
+SQLITE_PRIVATE int sqlite3WalCallback(Wal *pWal);
+
+/* Tell the wal layer that an EXCLUSIVE lock has been obtained (or released)
+** by the pager layer on the database file.
+*/
+SQLITE_PRIVATE int sqlite3WalExclusiveMode(Wal *pWal, int op);
+
+/* Return true if the argument is non-NULL and the WAL module is using
+** heap-memory for the wal-index. Otherwise, if the argument is NULL or the
+** WAL module is using shared-memory, return false. 
+*/
+SQLITE_PRIVATE int sqlite3WalHeapMemory(Wal *pWal);
+
+#endif /* ifndef SQLITE_OMIT_WAL */
+#endif /* _WAL_H_ */
+
+/************** End of wal.h *************************************************/
+/************** Continuing where we left off in pager.c **********************/
+
+
+/******************* NOTES ON THE DESIGN OF THE PAGER ************************
+**
+** This comment block describes invariants that hold when using a rollback
+** journal.  These invariants do not apply for journal_mode=WAL,
+** journal_mode=MEMORY, or journal_mode=OFF.
+**
+** Within this comment block, a page is deemed to have been synced
+** automatically as soon as it is written when PRAGMA synchronous=OFF.
+** Otherwise, the page is not synced until the xSync method of the VFS
+** is called successfully on the file containing the page.
+**
+** Definition:  A page of the database file is said to be "overwriteable" if
+** one or more of the following are true about the page:
+** 
+**     (a)  The original content of the page as it was at the beginning of
+**          the transaction has been written into the rollback journal and
+**          synced.
+** 
+**     (b)  The page was a freelist leaf page at the start of the transaction.
+** 
+**     (c)  The page number is greater than the largest page that existed in
+**          the database file at the start of the transaction.
+** 
+** (1) A page of the database file is never overwritten unless one of the
+**     following are true:
+** 
+**     (a) The page and all other pages on the same sector are overwriteable.
+** 
+**     (b) The atomic page write optimization is enabled, and the entire
+**         transaction other than the update of the transaction sequence
+**         number consists of a single page change.
+** 
+** (2) The content of a page written into the rollback journal exactly matches
+**     both the content in the database when the rollback journal was written
+**     and the content in the database at the beginning of the current
+**     transaction.
+** 
+** (3) Writes to the database file are an integer multiple of the page size
+**     in length and are aligned on a page boundary.
+** 
+** (4) Reads from the database file are either aligned on a page boundary and
+**     an integer multiple of the page size in length or are taken from the
+**     first 100 bytes of the database file.
+** 
+** (5) All writes to the database file are synced prior to the rollback journal
+**     being deleted, truncated, or zeroed.
+** 
+** (6) If a master journal file is used, then all writes to the database file
+**     are synced prior to the master journal being deleted.
+** 
+** Definition: Two databases (or the same database at two points it time)
+** are said to be "logically equivalent" if they give the same answer to
+** all queries.  Note in particular the the content of freelist leaf
+** pages can be changed arbitarily without effecting the logical equivalence
+** of the database.
+** 
+** (7) At any time, if any subset, including the empty set and the total set,
+**     of the unsynced changes to a rollback journal are removed and the 
+**     journal is rolled back, the resulting database file will be logical
+**     equivalent to the database file at the beginning of the transaction.
+** 
+** (8) When a transaction is rolled back, the xTruncate method of the VFS
+**     is called to restore the database file to the same size it was at
+**     the beginning of the transaction.  (In some VFSes, the xTruncate
+**     method is a no-op, but that does not change the fact the SQLite will
+**     invoke it.)
+** 
+** (9) Whenever the database file is modified, at least one bit in the range
+**     of bytes from 24 through 39 inclusive will be changed prior to releasing
+**     the EXCLUSIVE lock, thus signaling other connections on the same
+**     database to flush their caches.
+**
+** (10) The pattern of bits in bytes 24 through 39 shall not repeat in less
+**      than one billion transactions.
+**
+** (11) A database file is well-formed at the beginning and at the conclusion
+**      of every transaction.
+**
+** (12) An EXCLUSIVE lock is held on the database file when writing to
+**      the database file.
+**
+** (13) A SHARED lock is held on the database file while reading any
+**      content out of the database file.
+**
+******************************************************************************/
+
+/*
+** Macros for troubleshooting.  Normally turned off
+*/
+#if 0
+int sqlite3PagerTrace=1;  /* True to enable tracing */
+#define sqlite3DebugPrintf printf
+#define PAGERTRACE(X)     if( sqlite3PagerTrace ){ sqlite3DebugPrintf X; }
+#else
+#define PAGERTRACE(X)
+#endif
+
+/*
+** The following two macros are used within the PAGERTRACE() macros above
+** to print out file-descriptors. 
+**
+** PAGERID() takes a pointer to a Pager struct as its argument. The
+** associated file-descriptor is returned. FILEHANDLEID() takes an sqlite3_file
+** struct as its argument.
+*/
+#define PAGERID(p) ((int)(p->fd))
+#define FILEHANDLEID(fd) ((int)fd)
+
+/*
+** The Pager.eState variable stores the current 'state' of a pager. A
+** pager may be in any one of the seven states shown in the following
+** state diagram.
+**
+**                            OPEN <------+------+
+**                              |         |      |
+**                              V         |      |
+**               +---------> READER-------+      |
+**               |              |                |
+**               |              V                |
+**               |<-------WRITER_LOCKED------> ERROR
+**               |              |                ^  
+**               |              V                |
+**               |<------WRITER_CACHEMOD-------->|
+**               |              |                |
+**               |              V                |
+**               |<-------WRITER_DBMOD---------->|
+**               |              |                |
+**               |              V                |
+**               +<------WRITER_FINISHED-------->+
+**
+**
+** List of state transitions and the C [function] that performs each:
+** 
+**   OPEN              -> READER              [sqlite3PagerSharedLock]
+**   READER            -> OPEN                [pager_unlock]
+**
+**   READER            -> WRITER_LOCKED       [sqlite3PagerBegin]
+**   WRITER_LOCKED     -> WRITER_CACHEMOD     [pager_open_journal]
+**   WRITER_CACHEMOD   -> WRITER_DBMOD        [syncJournal]
+**   WRITER_DBMOD      -> WRITER_FINISHED     [sqlite3PagerCommitPhaseOne]
+**   WRITER_***        -> READER              [pager_end_transaction]
+**
+**   WRITER_***        -> ERROR               [pager_error]
+**   ERROR             -> OPEN                [pager_unlock]
+** 
+**
+**  OPEN:
+**
+**    The pager starts up in this state. Nothing is guaranteed in this
+**    state - the file may or may not be locked and the database size is
+**    unknown. The database may not be read or written.
+**
+**    * No read or write transaction is active.
+**    * Any lock, or no lock at all, may be held on the database file.
+**    * The dbSize, dbOrigSize and dbFileSize variables may not be trusted.
+**
+**  READER:
+**
+**    In this state all the requirements for reading the database in 
+**    rollback (non-WAL) mode are met. Unless the pager is (or recently
+**    was) in exclusive-locking mode, a user-level read transaction is 
+**    open. The database size is known in this state.
+**
+**    A connection running with locking_mode=normal enters this state when
+**    it opens a read-transaction on the database and returns to state
+**    OPEN after the read-transaction is completed. However a connection
+**    running in locking_mode=exclusive (including temp databases) remains in
+**    this state even after the read-transaction is closed. The only way
+**    a locking_mode=exclusive connection can transition from READER to OPEN
+**    is via the ERROR state (see below).
+** 
+**    * A read transaction may be active (but a write-transaction cannot).
+**    * A SHARED or greater lock is held on the database file.
+**    * The dbSize variable may be trusted (even if a user-level read 
+**      transaction is not active). The dbOrigSize and dbFileSize variables
+**      may not be trusted at this point.
+**    * If the database is a WAL database, then the WAL connection is open.
+**    * Even if a read-transaction is not open, it is guaranteed that 
+**      there is no hot-journal in the file-system.
+**
+**  WRITER_LOCKED:
+**
+**    The pager moves to this state from READER when a write-transaction
+**    is first opened on the database. In WRITER_LOCKED state, all locks 
+**    required to start a write-transaction are held, but no actual 
+**    modifications to the cache or database have taken place.
+**
+**    In rollback mode, a RESERVED or (if the transaction was opened with 
+**    BEGIN EXCLUSIVE) EXCLUSIVE lock is obtained on the database file when
+**    moving to this state, but the journal file is not written to or opened 
+**    to in this state. If the transaction is committed or rolled back while 
+**    in WRITER_LOCKED state, all that is required is to unlock the database 
+**    file.
+**
+**    IN WAL mode, WalBeginWriteTransaction() is called to lock the log file.
+**    If the connection is running with locking_mode=exclusive, an attempt
+**    is made to obtain an EXCLUSIVE lock on the database file.
+**
+**    * A write transaction is active.
+**    * If the connection is open in rollback-mode, a RESERVED or greater 
+**      lock is held on the database file.
+**    * If the connection is open in WAL-mode, a WAL write transaction
+**      is open (i.e. sqlite3WalBeginWriteTransaction() has been successfully
+**      called).
+**    * The dbSize, dbOrigSize and dbFileSize variables are all valid.
+**    * The contents of the pager cache have not been modified.
+**    * The journal file may or may not be open.
+**    * Nothing (not even the first header) has been written to the journal.
+**
+**  WRITER_CACHEMOD:
+**
+**    A pager moves from WRITER_LOCKED state to this state when a page is
+**    first modified by the upper layer. In rollback mode the journal file
+**    is opened (if it is not already open) and a header written to the
+**    start of it. The database file on disk has not been modified.
+**
+**    * A write transaction is active.
+**    * A RESERVED or greater lock is held on the database file.
+**    * The journal file is open and the first header has been written 
+**      to it, but the header has not been synced to disk.
+**    * The contents of the page cache have been modified.
+**
+**  WRITER_DBMOD:
+**
+**    The pager transitions from WRITER_CACHEMOD into WRITER_DBMOD state
+**    when it modifies the contents of the database file. WAL connections
+**    never enter this state (since they do not modify the database file,
+**    just the log file).
+**
+**    * A write transaction is active.
+**    * An EXCLUSIVE or greater lock is held on the database file.
+**    * The journal file is open and the first header has been written 
+**      and synced to disk.
+**    * The contents of the page cache have been modified (and possibly
+**      written to disk).
+**
+**  WRITER_FINISHED:
+**
+**    It is not possible for a WAL connection to enter this state.
+**
+**    A rollback-mode pager changes to WRITER_FINISHED state from WRITER_DBMOD
+**    state after the entire transaction has been successfully written into the
+**    database file. In this state the transaction may be committed simply
+**    by finalizing the journal file. Once in WRITER_FINISHED state, it is 
+**    not possible to modify the database further. At this point, the upper 
+**    layer must either commit or rollback the transaction.
+**
+**    * A write transaction is active.
+**    * An EXCLUSIVE or greater lock is held on the database file.
+**    * All writing and syncing of journal and database data has finished.
+**      If no error occured, all that remains is to finalize the journal to
+**      commit the transaction. If an error did occur, the caller will need
+**      to rollback the transaction. 
+**
+**  ERROR:
+**
+**    The ERROR state is entered when an IO or disk-full error (including
+**    SQLITE_IOERR_NOMEM) occurs at a point in the code that makes it 
+**    difficult to be sure that the in-memory pager state (cache contents, 
+**    db size etc.) are consistent with the contents of the file-system.
+**
+**    Temporary pager files may enter the ERROR state, but in-memory pagers
+**    cannot.
+**
+**    For example, if an IO error occurs while performing a rollback, 
+**    the contents of the page-cache may be left in an inconsistent state.
+**    At this point it would be dangerous to change back to READER state
+**    (as usually happens after a rollback). Any subsequent readers might
+**    report database corruption (due to the inconsistent cache), and if
+**    they upgrade to writers, they may inadvertently corrupt the database
+**    file. To avoid this hazard, the pager switches into the ERROR state
+**    instead of READER following such an error.
+**
+**    Once it has entered the ERROR state, any attempt to use the pager
+**    to read or write data returns an error. Eventually, once all 
+**    outstanding transactions have been abandoned, the pager is able to
+**    transition back to OPEN state, discarding the contents of the 
+**    page-cache and any other in-memory state at the same time. Everything
+**    is reloaded from disk (and, if necessary, hot-journal rollback peformed)
+**    when a read-transaction is next opened on the pager (transitioning
+**    the pager into READER state). At that point the system has recovered 
+**    from the error.
+**
+**    Specifically, the pager jumps into the ERROR state if:
+**
+**      1. An error occurs while attempting a rollback. This happens in
+**         function sqlite3PagerRollback().
+**
+**      2. An error occurs while attempting to finalize a journal file
+**         following a commit in function sqlite3PagerCommitPhaseTwo().
+**
+**      3. An error occurs while attempting to write to the journal or
+**         database file in function pagerStress() in order to free up
+**         memory.
+**
+**    In other cases, the error is returned to the b-tree layer. The b-tree
+**    layer then attempts a rollback operation. If the error condition 
+**    persists, the pager enters the ERROR state via condition (1) above.
+**
+**    Condition (3) is necessary because it can be triggered by a read-only
+**    statement executed within a transaction. In this case, if the error
+**    code were simply returned to the user, the b-tree layer would not
+**    automatically attempt a rollback, as it assumes that an error in a
+**    read-only statement cannot leave the pager in an internally inconsistent 
+**    state.
+**
+**    * The Pager.errCode variable is set to something other than SQLITE_OK.
+**    * There are one or more outstanding references to pages (after the
+**      last reference is dropped the pager should move back to OPEN state).
+**    * The pager is not an in-memory pager.
+**    
+**
+** Notes:
+**
+**   * A pager is never in WRITER_DBMOD or WRITER_FINISHED state if the
+**     connection is open in WAL mode. A WAL connection is always in one
+**     of the first four states.
+**
+**   * Normally, a connection open in exclusive mode is never in PAGER_OPEN
+**     state. There are two exceptions: immediately after exclusive-mode has
+**     been turned on (and before any read or write transactions are 
+**     executed), and when the pager is leaving the "error state".
+**
+**   * See also: assert_pager_state().
+*/
+#define PAGER_OPEN                  0
+#define PAGER_READER                1
+#define PAGER_WRITER_LOCKED         2
+#define PAGER_WRITER_CACHEMOD       3
+#define PAGER_WRITER_DBMOD          4
+#define PAGER_WRITER_FINISHED       5
+#define PAGER_ERROR                 6
+
+/*
+** The Pager.eLock variable is almost always set to one of the 
+** following locking-states, according to the lock currently held on
+** the database file: NO_LOCK, SHARED_LOCK, RESERVED_LOCK or EXCLUSIVE_LOCK.
+** This variable is kept up to date as locks are taken and released by
+** the pagerLockDb() and pagerUnlockDb() wrappers.
+**
+** If the VFS xLock() or xUnlock() returns an error other than SQLITE_BUSY
+** (i.e. one of the SQLITE_IOERR subtypes), it is not clear whether or not
+** the operation was successful. In these circumstances pagerLockDb() and
+** pagerUnlockDb() take a conservative approach - eLock is always updated
+** when unlocking the file, and only updated when locking the file if the
+** VFS call is successful. This way, the Pager.eLock variable may be set
+** to a less exclusive (lower) value than the lock that is actually held
+** at the system level, but it is never set to a more exclusive value.
+**
+** This is usually safe. If an xUnlock fails or appears to fail, there may 
+** be a few redundant xLock() calls or a lock may be held for longer than
+** required, but nothing really goes wrong.
+**
+** The exception is when the database file is unlocked as the pager moves
+** from ERROR to OPEN state. At this point there may be a hot-journal file 
+** in the file-system that needs to be rolled back (as part of a OPEN->SHARED
+** transition, by the same pager or any other). If the call to xUnlock()
+** fails at this point and the pager is left holding an EXCLUSIVE lock, this
+** can confuse the call to xCheckReservedLock() call made later as part
+** of hot-journal detection.
+**
+** xCheckReservedLock() is defined as returning true "if there is a RESERVED 
+** lock held by this process or any others". So xCheckReservedLock may 
+** return true because the caller itself is holding an EXCLUSIVE lock (but
+** doesn't know it because of a previous error in xUnlock). If this happens
+** a hot-journal may be mistaken for a journal being created by an active
+** transaction in another process, causing SQLite to read from the database
+** without rolling it back.
+**
+** To work around this, if a call to xUnlock() fails when unlocking the
+** database in the ERROR state, Pager.eLock is set to UNKNOWN_LOCK. It
+** is only changed back to a real locking state after a successful call
+** to xLock(EXCLUSIVE). Also, the code to do the OPEN->SHARED state transition
+** omits the check for a hot-journal if Pager.eLock is set to UNKNOWN_LOCK 
+** lock. Instead, it assumes a hot-journal exists and obtains an EXCLUSIVE
+** lock on the database file before attempting to roll it back. See function
+** PagerSharedLock() for more detail.
+**
+** Pager.eLock may only be set to UNKNOWN_LOCK when the pager is in 
+** PAGER_OPEN state.
+*/
+#define UNKNOWN_LOCK                (EXCLUSIVE_LOCK+1)
+
+/*
+** A macro used for invoking the codec if there is one
+*/
+#ifdef SQLITE_HAS_CODEC
+# define CODEC1(P,D,N,X,E) \
+    if( P->xCodec && P->xCodec(P->pCodec,D,N,X)==0 ){ E; }
+# define CODEC2(P,D,N,X,E,O) \
+    if( P->xCodec==0 ){ O=(char*)D; }else \
+    if( (O=(char*)(P->xCodec(P->pCodec,D,N,X)))==0 ){ E; }
+#else
+# define CODEC1(P,D,N,X,E)   /* NO-OP */
+# define CODEC2(P,D,N,X,E,O) O=(char*)D
+#endif
+
+/*
+** The maximum allowed sector size. 64KiB. If the xSectorsize() method 
+** returns a value larger than this, then MAX_SECTOR_SIZE is used instead.
+** This could conceivably cause corruption following a power failure on
+** such a system. This is currently an undocumented limit.
+*/
+#define MAX_SECTOR_SIZE 0x10000
+
+/*
+** An instance of the following structure is allocated for each active
+** savepoint and statement transaction in the system. All such structures
+** are stored in the Pager.aSavepoint[] array, which is allocated and
+** resized using sqlite3Realloc().
+**
+** When a savepoint is created, the PagerSavepoint.iHdrOffset field is
+** set to 0. If a journal-header is written into the main journal while
+** the savepoint is active, then iHdrOffset is set to the byte offset 
+** immediately following the last journal record written into the main
+** journal before the journal-header. This is required during savepoint
+** rollback (see pagerPlaybackSavepoint()).
+*/
+typedef struct PagerSavepoint PagerSavepoint;
+struct PagerSavepoint {
+  i64 iOffset;                 /* Starting offset in main journal */
+  i64 iHdrOffset;              /* See above */
+  Bitvec *pInSavepoint;        /* Set of pages in this savepoint */
+  Pgno nOrig;                  /* Original number of pages in file */
+  Pgno iSubRec;                /* Index of first record in sub-journal */
+#ifndef SQLITE_OMIT_WAL
+  u32 aWalData[WAL_SAVEPOINT_NDATA];        /* WAL savepoint context */
+#endif
+};
+
+/*
+** A open page cache is an instance of struct Pager. A description of
+** some of the more important member variables follows:
+**
+** eState
+**
+**   The current 'state' of the pager object. See the comment and state
+**   diagram above for a description of the pager state.
+**
+** eLock
+**
+**   For a real on-disk database, the current lock held on the database file -
+**   NO_LOCK, SHARED_LOCK, RESERVED_LOCK or EXCLUSIVE_LOCK.
+**
+**   For a temporary or in-memory database (neither of which require any
+**   locks), this variable is always set to EXCLUSIVE_LOCK. Since such
+**   databases always have Pager.exclusiveMode==1, this tricks the pager
+**   logic into thinking that it already has all the locks it will ever
+**   need (and no reason to release them).
+**
+**   In some (obscure) circumstances, this variable may also be set to
+**   UNKNOWN_LOCK. See the comment above the #define of UNKNOWN_LOCK for
+**   details.
+**
+** changeCountDone
+**
+**   This boolean variable is used to make sure that the change-counter 
+**   (the 4-byte header field at byte offset 24 of the database file) is 
+**   not updated more often than necessary. 
+**
+**   It is set to true when the change-counter field is updated, which 
+**   can only happen if an exclusive lock is held on the database file.
+**   It is cleared (set to false) whenever an exclusive lock is 
+**   relinquished on the database file. Each time a transaction is committed,
+**   The changeCountDone flag is inspected. If it is true, the work of
+**   updating the change-counter is omitted for the current transaction.
+**
+**   This mechanism means that when running in exclusive mode, a connection 
+**   need only update the change-counter once, for the first transaction
+**   committed.
+**
+** setMaster
+**
+**   When PagerCommitPhaseOne() is called to commit a transaction, it may
+**   (or may not) specify a master-journal name to be written into the 
+**   journal file before it is synced to disk.
+**
+**   Whether or not a journal file contains a master-journal pointer affects 
+**   the way in which the journal file is finalized after the transaction is 
+**   committed or rolled back when running in "journal_mode=PERSIST" mode.
+**   If a journal file does not contain a master-journal pointer, it is
+**   finalized by overwriting the first journal header with zeroes. If
+**   it does contain a master-journal pointer the journal file is finalized 
+**   by truncating it to zero bytes, just as if the connection were 
+**   running in "journal_mode=truncate" mode.
+**
+**   Journal files that contain master journal pointers cannot be finalized
+**   simply by overwriting the first journal-header with zeroes, as the
+**   master journal pointer could interfere with hot-journal rollback of any
+**   subsequently interrupted transaction that reuses the journal file.
+**
+**   The flag is cleared as soon as the journal file is finalized (either
+**   by PagerCommitPhaseTwo or PagerRollback). If an IO error prevents the
+**   journal file from being successfully finalized, the setMaster flag
+**   is cleared anyway (and the pager will move to ERROR state).
+**
+** doNotSpill, doNotSyncSpill
+**
+**   These two boolean variables control the behaviour of cache-spills
+**   (calls made by the pcache module to the pagerStress() routine to
+**   write cached data to the file-system in order to free up memory).
+**
+**   When doNotSpill is non-zero, writing to the database from pagerStress()
+**   is disabled altogether. This is done in a very obscure case that
+**   comes up during savepoint rollback that requires the pcache module
+**   to allocate a new page to prevent the journal file from being written
+**   while it is being traversed by code in pager_playback().
+** 
+**   If doNotSyncSpill is non-zero, writing to the database from pagerStress()
+**   is permitted, but syncing the journal file is not. This flag is set
+**   by sqlite3PagerWrite() when the file-system sector-size is larger than
+**   the database page-size in order to prevent a journal sync from happening 
+**   in between the journalling of two pages on the same sector. 
+**
+** subjInMemory
+**
+**   This is a boolean variable. If true, then any required sub-journal
+**   is opened as an in-memory journal file. If false, then in-memory
+**   sub-journals are only used for in-memory pager files.
+**
+**   This variable is updated by the upper layer each time a new 
+**   write-transaction is opened.
+**
+** dbSize, dbOrigSize, dbFileSize
+**
+**   Variable dbSize is set to the number of pages in the database file.
+**   It is valid in PAGER_READER and higher states (all states except for
+**   OPEN and ERROR). 
+**
+**   dbSize is set based on the size of the database file, which may be 
+**   larger than the size of the database (the value stored at offset
+**   28 of the database header by the btree). If the size of the file
+**   is not an integer multiple of the page-size, the value stored in
+**   dbSize is rounded down (i.e. a 5KB file with 2K page-size has dbSize==2).
+**   Except, any file that is greater than 0 bytes in size is considered
+**   to have at least one page. (i.e. a 1KB file with 2K page-size leads
+**   to dbSize==1).
+**
+**   During a write-transaction, if pages with page-numbers greater than
+**   dbSize are modified in the cache, dbSize is updated accordingly.
+**   Similarly, if the database is truncated using PagerTruncateImage(), 
+**   dbSize is updated.
+**
+**   Variables dbOrigSize and dbFileSize are valid in states 
+**   PAGER_WRITER_LOCKED and higher. dbOrigSize is a copy of the dbSize
+**   variable at the start of the transaction. It is used during rollback,
+**   and to determine whether or not pages need to be journalled before
+**   being modified.
+**
+**   Throughout a write-transaction, dbFileSize contains the size of
+**   the file on disk in pages. It is set to a copy of dbSize when the
+**   write-transaction is first opened, and updated when VFS calls are made
+**   to write or truncate the database file on disk. 
+**
+**   The only reason the dbFileSize variable is required is to suppress 
+**   unnecessary calls to xTruncate() after committing a transaction. If, 
+**   when a transaction is committed, the dbFileSize variable indicates 
+**   that the database file is larger than the database image (Pager.dbSize), 
+**   pager_truncate() is called. The pager_truncate() call uses xFilesize()
+**   to measure the database file on disk, and then truncates it if required.
+**   dbFileSize is not used when rolling back a transaction. In this case
+**   pager_truncate() is called unconditionally (which means there may be
+**   a call to xFilesize() that is not strictly required). In either case,
+**   pager_truncate() may cause the file to become smaller or larger.
+**
+** dbHintSize
+**
+**   The dbHintSize variable is used to limit the number of calls made to
+**   the VFS xFileControl(FCNTL_SIZE_HINT) method. 
+**
+**   dbHintSize is set to a copy of the dbSize variable when a
+**   write-transaction is opened (at the same time as dbFileSize and
+**   dbOrigSize). If the xFileControl(FCNTL_SIZE_HINT) method is called,
+**   dbHintSize is increased to the number of pages that correspond to the
+**   size-hint passed to the method call. See pager_write_pagelist() for 
+**   details.
+**
+** errCode
+**
+**   The Pager.errCode variable is only ever used in PAGER_ERROR state. It
+**   is set to zero in all other states. In PAGER_ERROR state, Pager.errCode 
+**   is always set to SQLITE_FULL, SQLITE_IOERR or one of the SQLITE_IOERR_XXX 
+**   sub-codes.
+*/
+struct Pager {
+  sqlite3_vfs *pVfs;          /* OS functions to use for IO */
+  u8 exclusiveMode;           /* Boolean. True if locking_mode==EXCLUSIVE */
+  u8 journalMode;             /* One of the PAGER_JOURNALMODE_* values */
+  u8 useJournal;              /* Use a rollback journal on this file */
+  u8 noReadlock;              /* Do not bother to obtain readlocks */
+  u8 noSync;                  /* Do not sync the journal if true */
+  u8 fullSync;                /* Do extra syncs of the journal for robustness */
+  u8 ckptSyncFlags;           /* SYNC_NORMAL or SYNC_FULL for checkpoint */
+  u8 syncFlags;               /* SYNC_NORMAL or SYNC_FULL otherwise */
+  u8 tempFile;                /* zFilename is a temporary file */
+  u8 readOnly;                /* True for a read-only database */
+  u8 memDb;                   /* True to inhibit all file I/O */
+
+  /**************************************************************************
+  ** The following block contains those class members that change during
+  ** routine opertion.  Class members not in this block are either fixed
+  ** when the pager is first created or else only change when there is a
+  ** significant mode change (such as changing the page_size, locking_mode,
+  ** or the journal_mode).  From another view, these class members describe
+  ** the "state" of the pager, while other class members describe the
+  ** "configuration" of the pager.
+  */
+  u8 eState;                  /* Pager state (OPEN, READER, WRITER_LOCKED..) */
+  u8 eLock;                   /* Current lock held on database file */
+  u8 changeCountDone;         /* Set after incrementing the change-counter */
+  u8 setMaster;               /* True if a m-j name has been written to jrnl */
+  u8 doNotSpill;              /* Do not spill the cache when non-zero */
+  u8 doNotSyncSpill;          /* Do not do a spill that requires jrnl sync */
+  u8 subjInMemory;            /* True to use in-memory sub-journals */
+  Pgno dbSize;                /* Number of pages in the database */
+  Pgno dbOrigSize;            /* dbSize before the current transaction */
+  Pgno dbFileSize;            /* Number of pages in the database file */
+  Pgno dbHintSize;            /* Value passed to FCNTL_SIZE_HINT call */
+  int errCode;                /* One of several kinds of errors */
+  int nRec;                   /* Pages journalled since last j-header written */
+  u32 cksumInit;              /* Quasi-random value added to every checksum */
+  u32 nSubRec;                /* Number of records written to sub-journal */
+  Bitvec *pInJournal;         /* One bit for each page in the database file */
+  sqlite3_file *fd;           /* File descriptor for database */
+  sqlite3_file *jfd;          /* File descriptor for main journal */
+  sqlite3_file *sjfd;         /* File descriptor for sub-journal */
+  i64 journalOff;             /* Current write offset in the journal file */
+  i64 journalHdr;             /* Byte offset to previous journal header */
+  sqlite3_backup *pBackup;    /* Pointer to list of ongoing backup processes */
+  PagerSavepoint *aSavepoint; /* Array of active savepoints */
+  int nSavepoint;             /* Number of elements in aSavepoint[] */
+  char dbFileVers[16];        /* Changes whenever database file changes */
+  /*
+  ** End of the routinely-changing class members
+  ***************************************************************************/
+
+  u16 nExtra;                 /* Add this many bytes to each in-memory page */
+  i16 nReserve;               /* Number of unused bytes at end of each page */
+  u32 vfsFlags;               /* Flags for sqlite3_vfs.xOpen() */
+  u32 sectorSize;             /* Assumed sector size during rollback */
+  int pageSize;               /* Number of bytes in a page */
+  Pgno mxPgno;                /* Maximum allowed size of the database */
+  i64 journalSizeLimit;       /* Size limit for persistent journal files */
+  char *zFilename;            /* Name of the database file */
+  char *zJournal;             /* Name of the journal file */
+  int (*xBusyHandler)(void*); /* Function to call when busy */
+  void *pBusyHandlerArg;      /* Context argument for xBusyHandler */
+#ifdef SQLITE_TEST
+  int nHit, nMiss;            /* Cache hits and missing */
+  int nRead, nWrite;          /* Database pages read/written */
+#endif
+  void (*xReiniter)(DbPage*); /* Call this routine when reloading pages */
+#ifdef SQLITE_HAS_CODEC
+  void *(*xCodec)(void*,void*,Pgno,int); /* Routine for en/decoding data */
+  void (*xCodecSizeChng)(void*,int,int); /* Notify of page size changes */
+  void (*xCodecFree)(void*);             /* Destructor for the codec */
+  void *pCodec;               /* First argument to xCodec... methods */
+#endif
+  char *pTmpSpace;            /* Pager.pageSize bytes of space for tmp use */
+  PCache *pPCache;            /* Pointer to page cache object */
+#ifndef SQLITE_OMIT_WAL
+  Wal *pWal;                  /* Write-ahead log used by "journal_mode=wal" */
+  char *zWal;                 /* File name for write-ahead log */
+#endif
+};
+
+/*
+** The following global variables hold counters used for
+** testing purposes only.  These variables do not exist in
+** a non-testing build.  These variables are not thread-safe.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_pager_readdb_count = 0;    /* Number of full pages read from DB */
+SQLITE_API int sqlite3_pager_writedb_count = 0;   /* Number of full pages written to DB */
+SQLITE_API int sqlite3_pager_writej_count = 0;    /* Number of pages written to journal */
+# define PAGER_INCR(v)  v++
+#else
+# define PAGER_INCR(v)
+#endif
+
+
+
+/*
+** Journal files begin with the following magic string.  The data
+** was obtained from /dev/random.  It is used only as a sanity check.
+**
+** Since version 2.8.0, the journal format contains additional sanity
+** checking information.  If the power fails while the journal is being
+** written, semi-random garbage data might appear in the journal
+** file after power is restored.  If an attempt is then made
+** to roll the journal back, the database could be corrupted.  The additional
+** sanity checking data is an attempt to discover the garbage in the
+** journal and ignore it.
+**
+** The sanity checking information for the new journal format consists
+** of a 32-bit checksum on each page of data.  The checksum covers both
+** the page number and the pPager->pageSize bytes of data for the page.
+** This cksum is initialized to a 32-bit random value that appears in the
+** journal file right after the header.  The random initializer is important,
+** because garbage data that appears at the end of a journal is likely
+** data that was once in other files that have now been deleted.  If the
+** garbage data came from an obsolete journal file, the checksums might
+** be correct.  But by initializing the checksum to random value which
+** is different for every journal, we minimize that risk.
+*/
+static const unsigned char aJournalMagic[] = {
+  0xd9, 0xd5, 0x05, 0xf9, 0x20, 0xa1, 0x63, 0xd7,
+};
+
+/*
+** The size of the of each page record in the journal is given by
+** the following macro.
+*/
+#define JOURNAL_PG_SZ(pPager)  ((pPager->pageSize) + 8)
+
+/*
+** The journal header size for this pager. This is usually the same 
+** size as a single disk sector. See also setSectorSize().
+*/
+#define JOURNAL_HDR_SZ(pPager) (pPager->sectorSize)
+
+/*
+** The macro MEMDB is true if we are dealing with an in-memory database.
+** We do this as a macro so that if the SQLITE_OMIT_MEMORYDB macro is set,
+** the value of MEMDB will be a constant and the compiler will optimize
+** out code that would never execute.
+*/
+#ifdef SQLITE_OMIT_MEMORYDB
+# define MEMDB 0
+#else
+# define MEMDB pPager->memDb
+#endif
+
+/*
+** The maximum legal page number is (2^31 - 1).
+*/
+#define PAGER_MAX_PGNO 2147483647
+
+/*
+** The argument to this macro is a file descriptor (type sqlite3_file*).
+** Return 0 if it is not open, or non-zero (but not 1) if it is.
+**
+** This is so that expressions can be written as:
+**
+**   if( isOpen(pPager->jfd) ){ ...
+**
+** instead of
+**
+**   if( pPager->jfd->pMethods ){ ...
+*/
+#define isOpen(pFd) ((pFd)->pMethods)
+
+/*
+** Return true if this pager uses a write-ahead log instead of the usual
+** rollback journal. Otherwise false.
+*/
+#ifndef SQLITE_OMIT_WAL
+static int pagerUseWal(Pager *pPager){
+  return (pPager->pWal!=0);
+}
+#else
+# define pagerUseWal(x) 0
+# define pagerRollbackWal(x) 0
+# define pagerWalFrames(v,w,x,y,z) 0
+# define pagerOpenWalIfPresent(z) SQLITE_OK
+# define pagerBeginReadTransaction(z) SQLITE_OK
+#endif
+
+#ifndef NDEBUG 
+/*
+** Usage:
+**
+**   assert( assert_pager_state(pPager) );
+**
+** This function runs many asserts to try to find inconsistencies in
+** the internal state of the Pager object.
+*/
+static int assert_pager_state(Pager *p){
+  Pager *pPager = p;
+
+  /* State must be valid. */
+  assert( p->eState==PAGER_OPEN
+       || p->eState==PAGER_READER
+       || p->eState==PAGER_WRITER_LOCKED
+       || p->eState==PAGER_WRITER_CACHEMOD
+       || p->eState==PAGER_WRITER_DBMOD
+       || p->eState==PAGER_WRITER_FINISHED
+       || p->eState==PAGER_ERROR
+  );
+
+  /* Regardless of the current state, a temp-file connection always behaves
+  ** as if it has an exclusive lock on the database file. It never updates
+  ** the change-counter field, so the changeCountDone flag is always set.
+  */
+  assert( p->tempFile==0 || p->eLock==EXCLUSIVE_LOCK );
+  assert( p->tempFile==0 || pPager->changeCountDone );
+
+  /* If the useJournal flag is clear, the journal-mode must be "OFF". 
+  ** And if the journal-mode is "OFF", the journal file must not be open.
+  */
+  assert( p->journalMode==PAGER_JOURNALMODE_OFF || p->useJournal );
+  assert( p->journalMode!=PAGER_JOURNALMODE_OFF || !isOpen(p->jfd) );
+
+  /* Check that MEMDB implies noSync. And an in-memory journal. Since 
+  ** this means an in-memory pager performs no IO at all, it cannot encounter 
+  ** either SQLITE_IOERR or SQLITE_FULL during rollback or while finalizing 
+  ** a journal file. (although the in-memory journal implementation may 
+  ** return SQLITE_IOERR_NOMEM while the journal file is being written). It 
+  ** is therefore not possible for an in-memory pager to enter the ERROR 
+  ** state.
+  */
+  if( MEMDB ){
+    assert( p->noSync );
+    assert( p->journalMode==PAGER_JOURNALMODE_OFF 
+         || p->journalMode==PAGER_JOURNALMODE_MEMORY 
+    );
+    assert( p->eState!=PAGER_ERROR && p->eState!=PAGER_OPEN );
+    assert( pagerUseWal(p)==0 );
+  }
+
+  /* If changeCountDone is set, a RESERVED lock or greater must be held
+  ** on the file.
+  */
+  assert( pPager->changeCountDone==0 || pPager->eLock>=RESERVED_LOCK );
+  assert( p->eLock!=PENDING_LOCK );
+
+  switch( p->eState ){
+    case PAGER_OPEN:
+      assert( !MEMDB );
+      assert( pPager->errCode==SQLITE_OK );
+      assert( sqlite3PcacheRefCount(pPager->pPCache)==0 || pPager->tempFile );
+      break;
+
+    case PAGER_READER:
+      assert( pPager->errCode==SQLITE_OK );
+      assert( p->eLock!=UNKNOWN_LOCK );
+      assert( p->eLock>=SHARED_LOCK || p->noReadlock );
+      break;
+
+    case PAGER_WRITER_LOCKED:
+      assert( p->eLock!=UNKNOWN_LOCK );
+      assert( pPager->errCode==SQLITE_OK );
+      if( !pagerUseWal(pPager) ){
+        assert( p->eLock>=RESERVED_LOCK );
+      }
+      assert( pPager->dbSize==pPager->dbOrigSize );
+      assert( pPager->dbOrigSize==pPager->dbFileSize );
+      assert( pPager->dbOrigSize==pPager->dbHintSize );
+      assert( pPager->setMaster==0 );
+      break;
+
+    case PAGER_WRITER_CACHEMOD:
+      assert( p->eLock!=UNKNOWN_LOCK );
+      assert( pPager->errCode==SQLITE_OK );
+      if( !pagerUseWal(pPager) ){
+        /* It is possible that if journal_mode=wal here that neither the
+        ** journal file nor the WAL file are open. This happens during
+        ** a rollback transaction that switches from journal_mode=off
+        ** to journal_mode=wal.
+        */
+        assert( p->eLock>=RESERVED_LOCK );
+        assert( isOpen(p->jfd) 
+             || p->journalMode==PAGER_JOURNALMODE_OFF 
+             || p->journalMode==PAGER_JOURNALMODE_WAL 
+        );
+      }
+      assert( pPager->dbOrigSize==pPager->dbFileSize );
+      assert( pPager->dbOrigSize==pPager->dbHintSize );
+      break;
+
+    case PAGER_WRITER_DBMOD:
+      assert( p->eLock==EXCLUSIVE_LOCK );
+      assert( pPager->errCode==SQLITE_OK );
+      assert( !pagerUseWal(pPager) );
+      assert( p->eLock>=EXCLUSIVE_LOCK );
+      assert( isOpen(p->jfd) 
+           || p->journalMode==PAGER_JOURNALMODE_OFF 
+           || p->journalMode==PAGER_JOURNALMODE_WAL 
+      );
+      assert( pPager->dbOrigSize<=pPager->dbHintSize );
+      break;
+
+    case PAGER_WRITER_FINISHED:
+      assert( p->eLock==EXCLUSIVE_LOCK );
+      assert( pPager->errCode==SQLITE_OK );
+      assert( !pagerUseWal(pPager) );
+      assert( isOpen(p->jfd) 
+           || p->journalMode==PAGER_JOURNALMODE_OFF 
+           || p->journalMode==PAGER_JOURNALMODE_WAL 
+      );
+      break;
+
+    case PAGER_ERROR:
+      /* There must be at least one outstanding reference to the pager if
+      ** in ERROR state. Otherwise the pager should have already dropped
+      ** back to OPEN state.
+      */
+      assert( pPager->errCode!=SQLITE_OK );
+      assert( sqlite3PcacheRefCount(pPager->pPCache)>0 );
+      break;
+  }
+
+  return 1;
+}
+#endif /* ifndef NDEBUG */
+
+#ifdef SQLITE_DEBUG 
+/*
+** Return a pointer to a human readable string in a static buffer
+** containing the state of the Pager object passed as an argument. This
+** is intended to be used within debuggers. For example, as an alternative
+** to "print *pPager" in gdb:
+**
+** (gdb) printf "%s", print_pager_state(pPager)
+*/
+static char *print_pager_state(Pager *p){
+  static char zRet[1024];
+
+  sqlite3_snprintf(1024, zRet,
+      "Filename:      %s\n"
+      "State:         %s errCode=%d\n"
+      "Lock:          %s\n"
+      "Locking mode:  locking_mode=%s\n"
+      "Journal mode:  journal_mode=%s\n"
+      "Backing store: tempFile=%d memDb=%d useJournal=%d\n"
+      "Journal:       journalOff=%lld journalHdr=%lld\n"
+      "Size:          dbsize=%d dbOrigSize=%d dbFileSize=%d\n"
+      , p->zFilename
+      , p->eState==PAGER_OPEN            ? "OPEN" :
+        p->eState==PAGER_READER          ? "READER" :
+        p->eState==PAGER_WRITER_LOCKED   ? "WRITER_LOCKED" :
+        p->eState==PAGER_WRITER_CACHEMOD ? "WRITER_CACHEMOD" :
+        p->eState==PAGER_WRITER_DBMOD    ? "WRITER_DBMOD" :
+        p->eState==PAGER_WRITER_FINISHED ? "WRITER_FINISHED" :
+        p->eState==PAGER_ERROR           ? "ERROR" : "?error?"
+      , (int)p->errCode
+      , p->eLock==NO_LOCK         ? "NO_LOCK" :
+        p->eLock==RESERVED_LOCK   ? "RESERVED" :
+        p->eLock==EXCLUSIVE_LOCK  ? "EXCLUSIVE" :
+        p->eLock==SHARED_LOCK     ? "SHARED" :
+        p->eLock==UNKNOWN_LOCK    ? "UNKNOWN" : "?error?"
+      , p->exclusiveMode ? "exclusive" : "normal"
+      , p->journalMode==PAGER_JOURNALMODE_MEMORY   ? "memory" :
+        p->journalMode==PAGER_JOURNALMODE_OFF      ? "off" :
+        p->journalMode==PAGER_JOURNALMODE_DELETE   ? "delete" :
+        p->journalMode==PAGER_JOURNALMODE_PERSIST  ? "persist" :
+        p->journalMode==PAGER_JOURNALMODE_TRUNCATE ? "truncate" :
+        p->journalMode==PAGER_JOURNALMODE_WAL      ? "wal" : "?error?"
+      , (int)p->tempFile, (int)p->memDb, (int)p->useJournal
+      , p->journalOff, p->journalHdr
+      , (int)p->dbSize, (int)p->dbOrigSize, (int)p->dbFileSize
+  );
+
+  return zRet;
+}
+#endif
+
+/*
+** Return true if it is necessary to write page *pPg into the sub-journal.
+** A page needs to be written into the sub-journal if there exists one
+** or more open savepoints for which:
+**
+**   * The page-number is less than or equal to PagerSavepoint.nOrig, and
+**   * The bit corresponding to the page-number is not set in
+**     PagerSavepoint.pInSavepoint.
+*/
+static int subjRequiresPage(PgHdr *pPg){
+  Pgno pgno = pPg->pgno;
+  Pager *pPager = pPg->pPager;
+  int i;
+  for(i=0; i<pPager->nSavepoint; i++){
+    PagerSavepoint *p = &pPager->aSavepoint[i];
+    if( p->nOrig>=pgno && 0==sqlite3BitvecTest(p->pInSavepoint, pgno) ){
+      return 1;
+    }
+  }
+  return 0;
+}
+
+/*
+** Return true if the page is already in the journal file.
+*/
+static int pageInJournal(PgHdr *pPg){
+  return sqlite3BitvecTest(pPg->pPager->pInJournal, pPg->pgno);
+}
+
+/*
+** Read a 32-bit integer from the given file descriptor.  Store the integer
+** that is read in *pRes.  Return SQLITE_OK if everything worked, or an
+** error code is something goes wrong.
+**
+** All values are stored on disk as big-endian.
+*/
+static int read32bits(sqlite3_file *fd, i64 offset, u32 *pRes){
+  unsigned char ac[4];
+  int rc = sqlite3OsRead(fd, ac, sizeof(ac), offset);
+  if( rc==SQLITE_OK ){
+    *pRes = sqlite3Get4byte(ac);
+  }
+  return rc;
+}
+
+/*
+** Write a 32-bit integer into a string buffer in big-endian byte order.
+*/
+#define put32bits(A,B)  sqlite3Put4byte((u8*)A,B)
+
+
+/*
+** Write a 32-bit integer into the given file descriptor.  Return SQLITE_OK
+** on success or an error code is something goes wrong.
+*/
+static int write32bits(sqlite3_file *fd, i64 offset, u32 val){
+  char ac[4];
+  put32bits(ac, val);
+  return sqlite3OsWrite(fd, ac, 4, offset);
+}
+
+/*
+** Unlock the database file to level eLock, which must be either NO_LOCK
+** or SHARED_LOCK. Regardless of whether or not the call to xUnlock()
+** succeeds, set the Pager.eLock variable to match the (attempted) new lock.
+**
+** Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is
+** called, do not modify it. See the comment above the #define of 
+** UNKNOWN_LOCK for an explanation of this.
+*/
+static int pagerUnlockDb(Pager *pPager, int eLock){
+  int rc = SQLITE_OK;
+
+  assert( !pPager->exclusiveMode || pPager->eLock==eLock );
+  assert( eLock==NO_LOCK || eLock==SHARED_LOCK );
+  assert( eLock!=NO_LOCK || pagerUseWal(pPager)==0 );
+  if( isOpen(pPager->fd) ){
+    assert( pPager->eLock>=eLock );
+    rc = sqlite3OsUnlock(pPager->fd, eLock);
+    if( pPager->eLock!=UNKNOWN_LOCK ){
+      pPager->eLock = (u8)eLock;
+    }
+    IOTRACE(("UNLOCK %p %d\n", pPager, eLock))
+  }
+  return rc;
+}
+
+/*
+** Lock the database file to level eLock, which must be either SHARED_LOCK,
+** RESERVED_LOCK or EXCLUSIVE_LOCK. If the caller is successful, set the
+** Pager.eLock variable to the new locking state. 
+**
+** Except, if Pager.eLock is set to UNKNOWN_LOCK when this function is 
+** called, do not modify it unless the new locking state is EXCLUSIVE_LOCK. 
+** See the comment above the #define of UNKNOWN_LOCK for an explanation 
+** of this.
+*/
+static int pagerLockDb(Pager *pPager, int eLock){
+  int rc = SQLITE_OK;
+
+  assert( eLock==SHARED_LOCK || eLock==RESERVED_LOCK || eLock==EXCLUSIVE_LOCK );
+  if( pPager->eLock<eLock || pPager->eLock==UNKNOWN_LOCK ){
+    rc = sqlite3OsLock(pPager->fd, eLock);
+    if( rc==SQLITE_OK && (pPager->eLock!=UNKNOWN_LOCK||eLock==EXCLUSIVE_LOCK) ){
+      pPager->eLock = (u8)eLock;
+      IOTRACE(("LOCK %p %d\n", pPager, eLock))
+    }
+  }
+  return rc;
+}
+
+/*
+** This function determines whether or not the atomic-write optimization
+** can be used with this pager. The optimization can be used if:
+**
+**  (a) the value returned by OsDeviceCharacteristics() indicates that
+**      a database page may be written atomically, and
+**  (b) the value returned by OsSectorSize() is less than or equal
+**      to the page size.
+**
+** The optimization is also always enabled for temporary files. It is
+** an error to call this function if pPager is opened on an in-memory
+** database.
+**
+** If the optimization cannot be used, 0 is returned. If it can be used,
+** then the value returned is the size of the journal file when it
+** contains rollback data for exactly one page.
+*/
+#ifdef SQLITE_ENABLE_ATOMIC_WRITE
+static int jrnlBufferSize(Pager *pPager){
+  assert( !MEMDB );
+  if( !pPager->tempFile ){
+    int dc;                           /* Device characteristics */
+    int nSector;                      /* Sector size */
+    int szPage;                       /* Page size */
+
+    assert( isOpen(pPager->fd) );
+    dc = sqlite3OsDeviceCharacteristics(pPager->fd);
+    nSector = pPager->sectorSize;
+    szPage = pPager->pageSize;
+
+    assert(SQLITE_IOCAP_ATOMIC512==(512>>8));
+    assert(SQLITE_IOCAP_ATOMIC64K==(65536>>8));
+    if( 0==(dc&(SQLITE_IOCAP_ATOMIC|(szPage>>8)) || nSector>szPage) ){
+      return 0;
+    }
+  }
+
+  return JOURNAL_HDR_SZ(pPager) + JOURNAL_PG_SZ(pPager);
+}
+#endif
+
+/*
+** If SQLITE_CHECK_PAGES is defined then we do some sanity checking
+** on the cache using a hash function.  This is used for testing
+** and debugging only.
+*/
+#ifdef SQLITE_CHECK_PAGES
+/*
+** Return a 32-bit hash of the page data for pPage.
+*/
+static u32 pager_datahash(int nByte, unsigned char *pData){
+  u32 hash = 0;
+  int i;
+  for(i=0; i<nByte; i++){
+    hash = (hash*1039) + pData[i];
+  }
+  return hash;
+}
+static u32 pager_pagehash(PgHdr *pPage){
+  return pager_datahash(pPage->pPager->pageSize, (unsigned char *)pPage->pData);
+}
+static void pager_set_pagehash(PgHdr *pPage){
+  pPage->pageHash = pager_pagehash(pPage);
+}
+
+/*
+** The CHECK_PAGE macro takes a PgHdr* as an argument. If SQLITE_CHECK_PAGES
+** is defined, and NDEBUG is not defined, an assert() statement checks
+** that the page is either dirty or still matches the calculated page-hash.
+*/
+#define CHECK_PAGE(x) checkPage(x)
+static void checkPage(PgHdr *pPg){
+  Pager *pPager = pPg->pPager;
+  assert( pPager->eState!=PAGER_ERROR );
+  assert( (pPg->flags&PGHDR_DIRTY) || pPg->pageHash==pager_pagehash(pPg) );
+}
+
+#else
+#define pager_datahash(X,Y)  0
+#define pager_pagehash(X)  0
+#define pager_set_pagehash(X)
+#define CHECK_PAGE(x)
+#endif  /* SQLITE_CHECK_PAGES */
+
+/*
+** When this is called the journal file for pager pPager must be open.
+** This function attempts to read a master journal file name from the 
+** end of the file and, if successful, copies it into memory supplied 
+** by the caller. See comments above writeMasterJournal() for the format
+** used to store a master journal file name at the end of a journal file.
+**
+** zMaster must point to a buffer of at least nMaster bytes allocated by
+** the caller. This should be sqlite3_vfs.mxPathname+1 (to ensure there is
+** enough space to write the master journal name). If the master journal
+** name in the journal is longer than nMaster bytes (including a
+** nul-terminator), then this is handled as if no master journal name
+** were present in the journal.
+**
+** If a master journal file name is present at the end of the journal
+** file, then it is copied into the buffer pointed to by zMaster. A
+** nul-terminator byte is appended to the buffer following the master
+** journal file name.
+**
+** If it is determined that no master journal file name is present 
+** zMaster[0] is set to 0 and SQLITE_OK returned.
+**
+** If an error occurs while reading from the journal file, an SQLite
+** error code is returned.
+*/
+static int readMasterJournal(sqlite3_file *pJrnl, char *zMaster, u32 nMaster){
+  int rc;                    /* Return code */
+  u32 len;                   /* Length in bytes of master journal name */
+  i64 szJ;                   /* Total size in bytes of journal file pJrnl */
+  u32 cksum;                 /* MJ checksum value read from journal */
+  u32 u;                     /* Unsigned loop counter */
+  unsigned char aMagic[8];   /* A buffer to hold the magic header */
+  zMaster[0] = '\0';
+
+  if( SQLITE_OK!=(rc = sqlite3OsFileSize(pJrnl, &szJ))
+   || szJ<16
+   || SQLITE_OK!=(rc = read32bits(pJrnl, szJ-16, &len))
+   || len>=nMaster 
+   || SQLITE_OK!=(rc = read32bits(pJrnl, szJ-12, &cksum))
+   || SQLITE_OK!=(rc = sqlite3OsRead(pJrnl, aMagic, 8, szJ-8))
+   || memcmp(aMagic, aJournalMagic, 8)
+   || SQLITE_OK!=(rc = sqlite3OsRead(pJrnl, zMaster, len, szJ-16-len))
+  ){
+    return rc;
+  }
+
+  /* See if the checksum matches the master journal name */
+  for(u=0; u<len; u++){
+    cksum -= zMaster[u];
+  }
+  if( cksum ){
+    /* If the checksum doesn't add up, then one or more of the disk sectors
+    ** containing the master journal filename is corrupted. This means
+    ** definitely roll back, so just return SQLITE_OK and report a (nul)
+    ** master-journal filename.
+    */
+    len = 0;
+  }
+  zMaster[len] = '\0';
+   
+  return SQLITE_OK;
+}
+
+/*
+** Return the offset of the sector boundary at or immediately 
+** following the value in pPager->journalOff, assuming a sector 
+** size of pPager->sectorSize bytes.
+**
+** i.e for a sector size of 512:
+**
+**   Pager.journalOff          Return value
+**   ---------------------------------------
+**   0                         0
+**   512                       512
+**   100                       512
+**   2000                      2048
+** 
+*/
+static i64 journalHdrOffset(Pager *pPager){
+  i64 offset = 0;
+  i64 c = pPager->journalOff;
+  if( c ){
+    offset = ((c-1)/JOURNAL_HDR_SZ(pPager) + 1) * JOURNAL_HDR_SZ(pPager);
+  }
+  assert( offset%JOURNAL_HDR_SZ(pPager)==0 );
+  assert( offset>=c );
+  assert( (offset-c)<JOURNAL_HDR_SZ(pPager) );
+  return offset;
+}
+
+/*
+** The journal file must be open when this function is called.
+**
+** This function is a no-op if the journal file has not been written to
+** within the current transaction (i.e. if Pager.journalOff==0).
+**
+** If doTruncate is non-zero or the Pager.journalSizeLimit variable is
+** set to 0, then truncate the journal file to zero bytes in size. Otherwise,
+** zero the 28-byte header at the start of the journal file. In either case, 
+** if the pager is not in no-sync mode, sync the journal file immediately 
+** after writing or truncating it.
+**
+** If Pager.journalSizeLimit is set to a positive, non-zero value, and
+** following the truncation or zeroing described above the size of the 
+** journal file in bytes is larger than this value, then truncate the
+** journal file to Pager.journalSizeLimit bytes. The journal file does
+** not need to be synced following this operation.
+**
+** If an IO error occurs, abandon processing and return the IO error code.
+** Otherwise, return SQLITE_OK.
+*/
+static int zeroJournalHdr(Pager *pPager, int doTruncate){
+  int rc = SQLITE_OK;                               /* Return code */
+  assert( isOpen(pPager->jfd) );
+  if( pPager->journalOff ){
+    const i64 iLimit = pPager->journalSizeLimit;    /* Local cache of jsl */
+
+    IOTRACE(("JZEROHDR %p\n", pPager))
+    if( doTruncate || iLimit==0 ){
+      rc = sqlite3OsTruncate(pPager->jfd, 0);
+    }else{
+      static const char zeroHdr[28] = {0};
+      rc = sqlite3OsWrite(pPager->jfd, zeroHdr, sizeof(zeroHdr), 0);
+    }
+    if( rc==SQLITE_OK && !pPager->noSync ){
+      rc = sqlite3OsSync(pPager->jfd, SQLITE_SYNC_DATAONLY|pPager->syncFlags);
+    }
+
+    /* At this point the transaction is committed but the write lock 
+    ** is still held on the file. If there is a size limit configured for 
+    ** the persistent journal and the journal file currently consumes more
+    ** space than that limit allows for, truncate it now. There is no need
+    ** to sync the file following this operation.
+    */
+    if( rc==SQLITE_OK && iLimit>0 ){
+      i64 sz;
+      rc = sqlite3OsFileSize(pPager->jfd, &sz);
+      if( rc==SQLITE_OK && sz>iLimit ){
+        rc = sqlite3OsTruncate(pPager->jfd, iLimit);
+      }
+    }
+  }
+  return rc;
+}
+
+/*
+** The journal file must be open when this routine is called. A journal
+** header (JOURNAL_HDR_SZ bytes) is written into the journal file at the
+** current location.
+**
+** The format for the journal header is as follows:
+** - 8 bytes: Magic identifying journal format.
+** - 4 bytes: Number of records in journal, or -1 no-sync mode is on.
+** - 4 bytes: Random number used for page hash.
+** - 4 bytes: Initial database page count.
+** - 4 bytes: Sector size used by the process that wrote this journal.
+** - 4 bytes: Database page size.
+** 
+** Followed by (JOURNAL_HDR_SZ - 28) bytes of unused space.
+*/
+static int writeJournalHdr(Pager *pPager){
+  int rc = SQLITE_OK;                 /* Return code */
+  char *zHeader = pPager->pTmpSpace;  /* Temporary space used to build header */
+  u32 nHeader = (u32)pPager->pageSize;/* Size of buffer pointed to by zHeader */
+  u32 nWrite;                         /* Bytes of header sector written */
+  int ii;                             /* Loop counter */
+
+  assert( isOpen(pPager->jfd) );      /* Journal file must be open. */
+
+  if( nHeader>JOURNAL_HDR_SZ(pPager) ){
+    nHeader = JOURNAL_HDR_SZ(pPager);
+  }
+
+  /* If there are active savepoints and any of them were created 
+  ** since the most recent journal header was written, update the 
+  ** PagerSavepoint.iHdrOffset fields now.
+  */
+  for(ii=0; ii<pPager->nSavepoint; ii++){
+    if( pPager->aSavepoint[ii].iHdrOffset==0 ){
+      pPager->aSavepoint[ii].iHdrOffset = pPager->journalOff;
+    }
+  }
+
+  pPager->journalHdr = pPager->journalOff = journalHdrOffset(pPager);
+
+  /* 
+  ** Write the nRec Field - the number of page records that follow this
+  ** journal header. Normally, zero is written to this value at this time.
+  ** After the records are added to the journal (and the journal synced, 
+  ** if in full-sync mode), the zero is overwritten with the true number
+  ** of records (see syncJournal()).
+  **
+  ** A faster alternative is to write 0xFFFFFFFF to the nRec field. When
+  ** reading the journal this value tells SQLite to assume that the
+  ** rest of the journal file contains valid page records. This assumption
+  ** is dangerous, as if a failure occurred whilst writing to the journal
+  ** file it may contain some garbage data. There are two scenarios
+  ** where this risk can be ignored:
+  **
+  **   * When the pager is in no-sync mode. Corruption can follow a
+  **     power failure in this case anyway.
+  **
+  **   * When the SQLITE_IOCAP_SAFE_APPEND flag is set. This guarantees
+  **     that garbage data is never appended to the journal file.
+  */
+  assert( isOpen(pPager->fd) || pPager->noSync );
+  if( pPager->noSync || (pPager->journalMode==PAGER_JOURNALMODE_MEMORY)
+   || (sqlite3OsDeviceCharacteristics(pPager->fd)&SQLITE_IOCAP_SAFE_APPEND) 
+  ){
+    memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));
+    put32bits(&zHeader[sizeof(aJournalMagic)], 0xffffffff);
+  }else{
+    memset(zHeader, 0, sizeof(aJournalMagic)+4);
+  }
+
+  /* The random check-hash initialiser */ 
+  sqlite3_randomness(sizeof(pPager->cksumInit), &pPager->cksumInit);
+  put32bits(&zHeader[sizeof(aJournalMagic)+4], pPager->cksumInit);
+  /* The initial database size */
+  put32bits(&zHeader[sizeof(aJournalMagic)+8], pPager->dbOrigSize);
+  /* The assumed sector size for this process */
+  put32bits(&zHeader[sizeof(aJournalMagic)+12], pPager->sectorSize);
+
+  /* The page size */
+  put32bits(&zHeader[sizeof(aJournalMagic)+16], pPager->pageSize);
+
+  /* Initializing the tail of the buffer is not necessary.  Everything
+  ** works find if the following memset() is omitted.  But initializing
+  ** the memory prevents valgrind from complaining, so we are willing to
+  ** take the performance hit.
+  */
+  memset(&zHeader[sizeof(aJournalMagic)+20], 0,
+         nHeader-(sizeof(aJournalMagic)+20));
+
+  /* In theory, it is only necessary to write the 28 bytes that the 
+  ** journal header consumes to the journal file here. Then increment the 
+  ** Pager.journalOff variable by JOURNAL_HDR_SZ so that the next 
+  ** record is written to the following sector (leaving a gap in the file
+  ** that will be implicitly filled in by the OS).
+  **
+  ** However it has been discovered that on some systems this pattern can 
+  ** be significantly slower than contiguously writing data to the file,
+  ** even if that means explicitly writing data to the block of 
+  ** (JOURNAL_HDR_SZ - 28) bytes that will not be used. So that is what
+  ** is done. 
+  **
+  ** The loop is required here in case the sector-size is larger than the 
+  ** database page size. Since the zHeader buffer is only Pager.pageSize
+  ** bytes in size, more than one call to sqlite3OsWrite() may be required
+  ** to populate the entire journal header sector.
+  */ 
+  for(nWrite=0; rc==SQLITE_OK&&nWrite<JOURNAL_HDR_SZ(pPager); nWrite+=nHeader){
+    IOTRACE(("JHDR %p %lld %d\n", pPager, pPager->journalHdr, nHeader))
+    rc = sqlite3OsWrite(pPager->jfd, zHeader, nHeader, pPager->journalOff);
+    assert( pPager->journalHdr <= pPager->journalOff );
+    pPager->journalOff += nHeader;
+  }
+
+  return rc;
+}
+
+/*
+** The journal file must be open when this is called. A journal header file
+** (JOURNAL_HDR_SZ bytes) is read from the current location in the journal
+** file. The current location in the journal file is given by
+** pPager->journalOff. See comments above function writeJournalHdr() for
+** a description of the journal header format.
+**
+** If the header is read successfully, *pNRec is set to the number of
+** page records following this header and *pDbSize is set to the size of the
+** database before the transaction began, in pages. Also, pPager->cksumInit
+** is set to the value read from the journal header. SQLITE_OK is returned
+** in this case.
+**
+** If the journal header file appears to be corrupted, SQLITE_DONE is
+** returned and *pNRec and *PDbSize are undefined.  If JOURNAL_HDR_SZ bytes
+** cannot be read from the journal file an error code is returned.
+*/
+static int readJournalHdr(
+  Pager *pPager,               /* Pager object */
+  int isHot,
+  i64 journalSize,             /* Size of the open journal file in bytes */
+  u32 *pNRec,                  /* OUT: Value read from the nRec field */
+  u32 *pDbSize                 /* OUT: Value of original database size field */
+){
+  int rc;                      /* Return code */
+  unsigned char aMagic[8];     /* A buffer to hold the magic header */
+  i64 iHdrOff;                 /* Offset of journal header being read */
+
+  assert( isOpen(pPager->jfd) );      /* Journal file must be open. */
+
+  /* Advance Pager.journalOff to the start of the next sector. If the
+  ** journal file is too small for there to be a header stored at this
+  ** point, return SQLITE_DONE.
+  */
+  pPager->journalOff = journalHdrOffset(pPager);
+  if( pPager->journalOff+JOURNAL_HDR_SZ(pPager) > journalSize ){
+    return SQLITE_DONE;
+  }
+  iHdrOff = pPager->journalOff;
+
+  /* Read in the first 8 bytes of the journal header. If they do not match
+  ** the  magic string found at the start of each journal header, return
+  ** SQLITE_DONE. If an IO error occurs, return an error code. Otherwise,
+  ** proceed.
+  */
+  if( isHot || iHdrOff!=pPager->journalHdr ){
+    rc = sqlite3OsRead(pPager->jfd, aMagic, sizeof(aMagic), iHdrOff);
+    if( rc ){
+      return rc;
+    }
+    if( memcmp(aMagic, aJournalMagic, sizeof(aMagic))!=0 ){
+      return SQLITE_DONE;
+    }
+  }
+
+  /* Read the first three 32-bit fields of the journal header: The nRec
+  ** field, the checksum-initializer and the database size at the start
+  ** of the transaction. Return an error code if anything goes wrong.
+  */
+  if( SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+8, pNRec))
+   || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+12, &pPager->cksumInit))
+   || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+16, pDbSize))
+  ){
+    return rc;
+  }
+
+  if( pPager->journalOff==0 ){
+    u32 iPageSize;               /* Page-size field of journal header */
+    u32 iSectorSize;             /* Sector-size field of journal header */
+
+    /* Read the page-size and sector-size journal header fields. */
+    if( SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+20, &iSectorSize))
+     || SQLITE_OK!=(rc = read32bits(pPager->jfd, iHdrOff+24, &iPageSize))
+    ){
+      return rc;
+    }
+
+    /* Versions of SQLite prior to 3.5.8 set the page-size field of the
+    ** journal header to zero. In this case, assume that the Pager.pageSize
+    ** variable is already set to the correct page size.
+    */
+    if( iPageSize==0 ){
+      iPageSize = pPager->pageSize;
+    }
+
+    /* Check that the values read from the page-size and sector-size fields
+    ** are within range. To be 'in range', both values need to be a power
+    ** of two greater than or equal to 512 or 32, and not greater than their 
+    ** respective compile time maximum limits.
+    */
+    if( iPageSize<512                  || iSectorSize<32
+     || iPageSize>SQLITE_MAX_PAGE_SIZE || iSectorSize>MAX_SECTOR_SIZE
+     || ((iPageSize-1)&iPageSize)!=0   || ((iSectorSize-1)&iSectorSize)!=0 
+    ){
+      /* If the either the page-size or sector-size in the journal-header is 
+      ** invalid, then the process that wrote the journal-header must have 
+      ** crashed before the header was synced. In this case stop reading 
+      ** the journal file here.
+      */
+      return SQLITE_DONE;
+    }
+
+    /* Update the page-size to match the value read from the journal. 
+    ** Use a testcase() macro to make sure that malloc failure within 
+    ** PagerSetPagesize() is tested.
+    */
+    rc = sqlite3PagerSetPagesize(pPager, &iPageSize, -1);
+    testcase( rc!=SQLITE_OK );
+
+    /* Update the assumed sector-size to match the value used by 
+    ** the process that created this journal. If this journal was
+    ** created by a process other than this one, then this routine
+    ** is being called from within pager_playback(). The local value
+    ** of Pager.sectorSize is restored at the end of that routine.
+    */
+    pPager->sectorSize = iSectorSize;
+  }
+
+  pPager->journalOff += JOURNAL_HDR_SZ(pPager);
+  return rc;
+}
+
+
+/*
+** Write the supplied master journal name into the journal file for pager
+** pPager at the current location. The master journal name must be the last
+** thing written to a journal file. If the pager is in full-sync mode, the
+** journal file descriptor is advanced to the next sector boundary before
+** anything is written. The format is:
+**
+**   + 4 bytes: PAGER_MJ_PGNO.
+**   + N bytes: Master journal filename in utf-8.
+**   + 4 bytes: N (length of master journal name in bytes, no nul-terminator).
+**   + 4 bytes: Master journal name checksum.
+**   + 8 bytes: aJournalMagic[].
+**
+** The master journal page checksum is the sum of the bytes in the master
+** journal name, where each byte is interpreted as a signed 8-bit integer.
+**
+** If zMaster is a NULL pointer (occurs for a single database transaction), 
+** this call is a no-op.
+*/
+static int writeMasterJournal(Pager *pPager, const char *zMaster){
+  int rc;                          /* Return code */
+  int nMaster;                     /* Length of string zMaster */
+  i64 iHdrOff;                     /* Offset of header in journal file */
+  i64 jrnlSize;                    /* Size of journal file on disk */
+  u32 cksum = 0;                   /* Checksum of string zMaster */
+
+  assert( pPager->setMaster==0 );
+  assert( !pagerUseWal(pPager) );
+
+  if( !zMaster 
+   || pPager->journalMode==PAGER_JOURNALMODE_MEMORY 
+   || pPager->journalMode==PAGER_JOURNALMODE_OFF 
+  ){
+    return SQLITE_OK;
+  }
+  pPager->setMaster = 1;
+  assert( isOpen(pPager->jfd) );
+  assert( pPager->journalHdr <= pPager->journalOff );
+
+  /* Calculate the length in bytes and the checksum of zMaster */
+  for(nMaster=0; zMaster[nMaster]; nMaster++){
+    cksum += zMaster[nMaster];
+  }
+
+  /* If in full-sync mode, advance to the next disk sector before writing
+  ** the master journal name. This is in case the previous page written to
+  ** the journal has already been synced.
+  */
+  if( pPager->fullSync ){
+    pPager->journalOff = journalHdrOffset(pPager);
+  }
+  iHdrOff = pPager->journalOff;
+
+  /* Write the master journal data to the end of the journal file. If
+  ** an error occurs, return the error code to the caller.
+  */
+  if( (0 != (rc = write32bits(pPager->jfd, iHdrOff, PAGER_MJ_PGNO(pPager))))
+   || (0 != (rc = sqlite3OsWrite(pPager->jfd, zMaster, nMaster, iHdrOff+4)))
+   || (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nMaster, nMaster)))
+   || (0 != (rc = write32bits(pPager->jfd, iHdrOff+4+nMaster+4, cksum)))
+   || (0 != (rc = sqlite3OsWrite(pPager->jfd, aJournalMagic, 8, iHdrOff+4+nMaster+8)))
+  ){
+    return rc;
+  }
+  pPager->journalOff += (nMaster+20);
+
+  /* If the pager is in peristent-journal mode, then the physical 
+  ** journal-file may extend past the end of the master-journal name
+  ** and 8 bytes of magic data just written to the file. This is 
+  ** dangerous because the code to rollback a hot-journal file
+  ** will not be able to find the master-journal name to determine 
+  ** whether or not the journal is hot. 
+  **
+  ** Easiest thing to do in this scenario is to truncate the journal 
+  ** file to the required size.
+  */ 
+  if( SQLITE_OK==(rc = sqlite3OsFileSize(pPager->jfd, &jrnlSize))
+   && jrnlSize>pPager->journalOff
+  ){
+    rc = sqlite3OsTruncate(pPager->jfd, pPager->journalOff);
+  }
+  return rc;
+}
+
+/*
+** Find a page in the hash table given its page number. Return
+** a pointer to the page or NULL if the requested page is not 
+** already in memory.
+*/
+static PgHdr *pager_lookup(Pager *pPager, Pgno pgno){
+  PgHdr *p;                         /* Return value */
+
+  /* It is not possible for a call to PcacheFetch() with createFlag==0 to
+  ** fail, since no attempt to allocate dynamic memory will be made.
+  */
+  (void)sqlite3PcacheFetch(pPager->pPCache, pgno, 0, &p);
+  return p;
+}
+
+/*
+** Discard the entire contents of the in-memory page-cache.
+*/
+static void pager_reset(Pager *pPager){
+  sqlite3BackupRestart(pPager->pBackup);
+  sqlite3PcacheClear(pPager->pPCache);
+}
+
+/*
+** Free all structures in the Pager.aSavepoint[] array and set both
+** Pager.aSavepoint and Pager.nSavepoint to zero. Close the sub-journal
+** if it is open and the pager is not in exclusive mode.
+*/
+static void releaseAllSavepoints(Pager *pPager){
+  int ii;               /* Iterator for looping through Pager.aSavepoint */
+  for(ii=0; ii<pPager->nSavepoint; ii++){
+    sqlite3BitvecDestroy(pPager->aSavepoint[ii].pInSavepoint);
+  }
+  if( !pPager->exclusiveMode || sqlite3IsMemJournal(pPager->sjfd) ){
+    sqlite3OsClose(pPager->sjfd);
+  }
+  sqlite3_free(pPager->aSavepoint);
+  pPager->aSavepoint = 0;
+  pPager->nSavepoint = 0;
+  pPager->nSubRec = 0;
+}
+
+/*
+** Set the bit number pgno in the PagerSavepoint.pInSavepoint 
+** bitvecs of all open savepoints. Return SQLITE_OK if successful
+** or SQLITE_NOMEM if a malloc failure occurs.
+*/
+static int addToSavepointBitvecs(Pager *pPager, Pgno pgno){
+  int ii;                   /* Loop counter */
+  int rc = SQLITE_OK;       /* Result code */
+
+  for(ii=0; ii<pPager->nSavepoint; ii++){
+    PagerSavepoint *p = &pPager->aSavepoint[ii];
+    if( pgno<=p->nOrig ){
+      rc |= sqlite3BitvecSet(p->pInSavepoint, pgno);
+      testcase( rc==SQLITE_NOMEM );
+      assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
+    }
+  }
+  return rc;
+}
+
+/*
+** This function is a no-op if the pager is in exclusive mode and not
+** in the ERROR state. Otherwise, it switches the pager to PAGER_OPEN
+** state.
+**
+** If the pager is not in exclusive-access mode, the database file is
+** completely unlocked. If the file is unlocked and the file-system does
+** not exhibit the UNDELETABLE_WHEN_OPEN property, the journal file is
+** closed (if it is open).
+**
+** If the pager is in ERROR state when this function is called, the 
+** contents of the pager cache are discarded before switching back to 
+** the OPEN state. Regardless of whether the pager is in exclusive-mode
+** or not, any journal file left in the file-system will be treated
+** as a hot-journal and rolled back the next time a read-transaction
+** is opened (by this or by any other connection).
+*/
+static void pager_unlock(Pager *pPager){
+
+  assert( pPager->eState==PAGER_READER 
+       || pPager->eState==PAGER_OPEN 
+       || pPager->eState==PAGER_ERROR 
+  );
+
+  sqlite3BitvecDestroy(pPager->pInJournal);
+  pPager->pInJournal = 0;
+  releaseAllSavepoints(pPager);
+
+  if( pagerUseWal(pPager) ){
+    assert( !isOpen(pPager->jfd) );
+    sqlite3WalEndReadTransaction(pPager->pWal);
+    pPager->eState = PAGER_OPEN;
+  }else if( !pPager->exclusiveMode ){
+    int rc;                       /* Error code returned by pagerUnlockDb() */
+    int iDc = isOpen(pPager->fd)?sqlite3OsDeviceCharacteristics(pPager->fd):0;
+
+    /* If the operating system support deletion of open files, then
+    ** close the journal file when dropping the database lock.  Otherwise
+    ** another connection with journal_mode=delete might delete the file
+    ** out from under us.
+    */
+    assert( (PAGER_JOURNALMODE_MEMORY   & 5)!=1 );
+    assert( (PAGER_JOURNALMODE_OFF      & 5)!=1 );
+    assert( (PAGER_JOURNALMODE_WAL      & 5)!=1 );
+    assert( (PAGER_JOURNALMODE_DELETE   & 5)!=1 );
+    assert( (PAGER_JOURNALMODE_TRUNCATE & 5)==1 );
+    assert( (PAGER_JOURNALMODE_PERSIST  & 5)==1 );
+    if( 0==(iDc & SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN)
+     || 1!=(pPager->journalMode & 5)
+    ){
+      sqlite3OsClose(pPager->jfd);
+    }
+
+    /* If the pager is in the ERROR state and the call to unlock the database
+    ** file fails, set the current lock to UNKNOWN_LOCK. See the comment
+    ** above the #define for UNKNOWN_LOCK for an explanation of why this
+    ** is necessary.
+    */
+    rc = pagerUnlockDb(pPager, NO_LOCK);
+    if( rc!=SQLITE_OK && pPager->eState==PAGER_ERROR ){
+      pPager->eLock = UNKNOWN_LOCK;
+    }
+
+    /* The pager state may be changed from PAGER_ERROR to PAGER_OPEN here
+    ** without clearing the error code. This is intentional - the error
+    ** code is cleared and the cache reset in the block below.
+    */
+    assert( pPager->errCode || pPager->eState!=PAGER_ERROR );
+    pPager->changeCountDone = 0;
+    pPager->eState = PAGER_OPEN;
+  }
+
+  /* If Pager.errCode is set, the contents of the pager cache cannot be
+  ** trusted. Now that there are no outstanding references to the pager,
+  ** it can safely move back to PAGER_OPEN state. This happens in both
+  ** normal and exclusive-locking mode.
+  */
+  if( pPager->errCode ){
+    assert( !MEMDB );
+    pager_reset(pPager);
+    pPager->changeCountDone = pPager->tempFile;
+    pPager->eState = PAGER_OPEN;
+    pPager->errCode = SQLITE_OK;
+  }
+
+  pPager->journalOff = 0;
+  pPager->journalHdr = 0;
+  pPager->setMaster = 0;
+}
+
+/*
+** This function is called whenever an IOERR or FULL error that requires
+** the pager to transition into the ERROR state may ahve occurred.
+** The first argument is a pointer to the pager structure, the second 
+** the error-code about to be returned by a pager API function. The 
+** value returned is a copy of the second argument to this function. 
+**
+** If the second argument is SQLITE_FULL, SQLITE_IOERR or one of the
+** IOERR sub-codes, the pager enters the ERROR state and the error code
+** is stored in Pager.errCode. While the pager remains in the ERROR state,
+** all major API calls on the Pager will immediately return Pager.errCode.
+**
+** The ERROR state indicates that the contents of the pager-cache 
+** cannot be trusted. This state can be cleared by completely discarding 
+** the contents of the pager-cache. If a transaction was active when
+** the persistent error occurred, then the rollback journal may need
+** to be replayed to restore the contents of the database file (as if
+** it were a hot-journal).
+*/
+static int pager_error(Pager *pPager, int rc){
+  int rc2 = rc & 0xff;
+  assert( rc==SQLITE_OK || !MEMDB );
+  assert(
+       pPager->errCode==SQLITE_FULL ||
+       pPager->errCode==SQLITE_OK ||
+       (pPager->errCode & 0xff)==SQLITE_IOERR
+  );
+  if( rc2==SQLITE_FULL || rc2==SQLITE_IOERR ){
+    pPager->errCode = rc;
+    pPager->eState = PAGER_ERROR;
+  }
+  return rc;
+}
+
+/*
+** This routine ends a transaction. A transaction is usually ended by 
+** either a COMMIT or a ROLLBACK operation. This routine may be called 
+** after rollback of a hot-journal, or if an error occurs while opening
+** the journal file or writing the very first journal-header of a
+** database transaction.
+** 
+** This routine is never called in PAGER_ERROR state. If it is called
+** in PAGER_NONE or PAGER_SHARED state and the lock held is less
+** exclusive than a RESERVED lock, it is a no-op.
+**
+** Otherwise, any active savepoints are released.
+**
+** If the journal file is open, then it is "finalized". Once a journal 
+** file has been finalized it is not possible to use it to roll back a 
+** transaction. Nor will it be considered to be a hot-journal by this
+** or any other database connection. Exactly how a journal is finalized
+** depends on whether or not the pager is running in exclusive mode and
+** the current journal-mode (Pager.journalMode value), as follows:
+**
+**   journalMode==MEMORY
+**     Journal file descriptor is simply closed. This destroys an 
+**     in-memory journal.
+**
+**   journalMode==TRUNCATE
+**     Journal file is truncated to zero bytes in size.
+**
+**   journalMode==PERSIST
+**     The first 28 bytes of the journal file are zeroed. This invalidates
+**     the first journal header in the file, and hence the entire journal
+**     file. An invalid journal file cannot be rolled back.
+**
+**   journalMode==DELETE
+**     The journal file is closed and deleted using sqlite3OsDelete().
+**
+**     If the pager is running in exclusive mode, this method of finalizing
+**     the journal file is never used. Instead, if the journalMode is
+**     DELETE and the pager is in exclusive mode, the method described under
+**     journalMode==PERSIST is used instead.
+**
+** After the journal is finalized, the pager moves to PAGER_READER state.
+** If running in non-exclusive rollback mode, the lock on the file is 
+** downgraded to a SHARED_LOCK.
+**
+** SQLITE_OK is returned if no error occurs. If an error occurs during
+** any of the IO operations to finalize the journal file or unlock the
+** database then the IO error code is returned to the user. If the 
+** operation to finalize the journal file fails, then the code still
+** tries to unlock the database file if not in exclusive mode. If the
+** unlock operation fails as well, then the first error code related
+** to the first error encountered (the journal finalization one) is
+** returned.
+*/
+static int pager_end_transaction(Pager *pPager, int hasMaster){
+  int rc = SQLITE_OK;      /* Error code from journal finalization operation */
+  int rc2 = SQLITE_OK;     /* Error code from db file unlock operation */
+
+  /* Do nothing if the pager does not have an open write transaction
+  ** or at least a RESERVED lock. This function may be called when there
+  ** is no write-transaction active but a RESERVED or greater lock is
+  ** held under two circumstances:
+  **
+  **   1. After a successful hot-journal rollback, it is called with
+  **      eState==PAGER_NONE and eLock==EXCLUSIVE_LOCK.
+  **
+  **   2. If a connection with locking_mode=exclusive holding an EXCLUSIVE 
+  **      lock switches back to locking_mode=normal and then executes a
+  **      read-transaction, this function is called with eState==PAGER_READER 
+  **      and eLock==EXCLUSIVE_LOCK when the read-transaction is closed.
+  */
+  assert( assert_pager_state(pPager) );
+  assert( pPager->eState!=PAGER_ERROR );
+  if( pPager->eState<PAGER_WRITER_LOCKED && pPager->eLock<RESERVED_LOCK ){
+    return SQLITE_OK;
+  }
+
+  releaseAllSavepoints(pPager);
+  assert( isOpen(pPager->jfd) || pPager->pInJournal==0 );
+  if( isOpen(pPager->jfd) ){
+    assert( !pagerUseWal(pPager) );
+
+    /* Finalize the journal file. */
+    if( sqlite3IsMemJournal(pPager->jfd) ){
+      assert( pPager->journalMode==PAGER_JOURNALMODE_MEMORY );
+      sqlite3OsClose(pPager->jfd);
+    }else if( pPager->journalMode==PAGER_JOURNALMODE_TRUNCATE ){
+      if( pPager->journalOff==0 ){
+        rc = SQLITE_OK;
+      }else{
+        rc = sqlite3OsTruncate(pPager->jfd, 0);
+      }
+      pPager->journalOff = 0;
+    }else if( pPager->journalMode==PAGER_JOURNALMODE_PERSIST
+      || (pPager->exclusiveMode && pPager->journalMode!=PAGER_JOURNALMODE_WAL)
+    ){
+      rc = zeroJournalHdr(pPager, hasMaster);
+      pPager->journalOff = 0;
+    }else{
+      /* This branch may be executed with Pager.journalMode==MEMORY if
+      ** a hot-journal was just rolled back. In this case the journal
+      ** file should be closed and deleted. If this connection writes to
+      ** the database file, it will do so using an in-memory journal. 
+      */
+      assert( pPager->journalMode==PAGER_JOURNALMODE_DELETE 
+           || pPager->journalMode==PAGER_JOURNALMODE_MEMORY 
+           || pPager->journalMode==PAGER_JOURNALMODE_WAL 
+      );
+      sqlite3OsClose(pPager->jfd);
+      if( !pPager->tempFile ){
+        rc = sqlite3OsDelete(pPager->pVfs, pPager->zJournal, 0);
+      }
+    }
+  }
+
+#ifdef SQLITE_CHECK_PAGES
+  sqlite3PcacheIterateDirty(pPager->pPCache, pager_set_pagehash);
+  if( pPager->dbSize==0 && sqlite3PcacheRefCount(pPager->pPCache)>0 ){
+    PgHdr *p = pager_lookup(pPager, 1);
+    if( p ){
+      p->pageHash = 0;
+      sqlite3PagerUnref(p);
+    }
+  }
+#endif
+
+  sqlite3BitvecDestroy(pPager->pInJournal);
+  pPager->pInJournal = 0;
+  pPager->nRec = 0;
+  sqlite3PcacheCleanAll(pPager->pPCache);
+  sqlite3PcacheTruncate(pPager->pPCache, pPager->dbSize);
+
+  if( pagerUseWal(pPager) ){
+    /* Drop the WAL write-lock, if any. Also, if the connection was in 
+    ** locking_mode=exclusive mode but is no longer, drop the EXCLUSIVE 
+    ** lock held on the database file.
+    */
+    rc2 = sqlite3WalEndWriteTransaction(pPager->pWal);
+    assert( rc2==SQLITE_OK );
+  }
+  if( !pPager->exclusiveMode 
+   && (!pagerUseWal(pPager) || sqlite3WalExclusiveMode(pPager->pWal, 0))
+  ){
+    rc2 = pagerUnlockDb(pPager, SHARED_LOCK);
+    pPager->changeCountDone = 0;
+  }
+  pPager->eState = PAGER_READER;
+  pPager->setMaster = 0;
+
+  return (rc==SQLITE_OK?rc2:rc);
+}
+
+/*
+** Execute a rollback if a transaction is active and unlock the 
+** database file. 
+**
+** If the pager has already entered the ERROR state, do not attempt 
+** the rollback at this time. Instead, pager_unlock() is called. The
+** call to pager_unlock() will discard all in-memory pages, unlock
+** the database file and move the pager back to OPEN state. If this 
+** means that there is a hot-journal left in the file-system, the next 
+** connection to obtain a shared lock on the pager (which may be this one) 
+** will roll it back.
+**
+** If the pager has not already entered the ERROR state, but an IO or
+** malloc error occurs during a rollback, then this will itself cause 
+** the pager to enter the ERROR state. Which will be cleared by the
+** call to pager_unlock(), as described above.
+*/
+static void pagerUnlockAndRollback(Pager *pPager){
+  if( pPager->eState!=PAGER_ERROR && pPager->eState!=PAGER_OPEN ){
+    assert( assert_pager_state(pPager) );
+    if( pPager->eState>=PAGER_WRITER_LOCKED ){
+      sqlite3BeginBenignMalloc();
+      sqlite3PagerRollback(pPager);
+      sqlite3EndBenignMalloc();
+    }else if( !pPager->exclusiveMode ){
+      assert( pPager->eState==PAGER_READER );
+      pager_end_transaction(pPager, 0);
+    }
+  }
+  pager_unlock(pPager);
+}
+
+/*
+** Parameter aData must point to a buffer of pPager->pageSize bytes
+** of data. Compute and return a checksum based ont the contents of the 
+** page of data and the current value of pPager->cksumInit.
+**
+** This is not a real checksum. It is really just the sum of the 
+** random initial value (pPager->cksumInit) and every 200th byte
+** of the page data, starting with byte offset (pPager->pageSize%200).
+** Each byte is interpreted as an 8-bit unsigned integer.
+**
+** Changing the formula used to compute this checksum results in an
+** incompatible journal file format.
+**
+** If journal corruption occurs due to a power failure, the most likely 
+** scenario is that one end or the other of the record will be changed. 
+** It is much less likely that the two ends of the journal record will be
+** correct and the middle be corrupt.  Thus, this "checksum" scheme,
+** though fast and simple, catches the mostly likely kind of corruption.
+*/
+static u32 pager_cksum(Pager *pPager, const u8 *aData){
+  u32 cksum = pPager->cksumInit;         /* Checksum value to return */
+  int i = pPager->pageSize-200;          /* Loop counter */
+  while( i>0 ){
+    cksum += aData[i];
+    i -= 200;
+  }
+  return cksum;
+}
+
+/*
+** Report the current page size and number of reserved bytes back
+** to the codec.
+*/
+#ifdef SQLITE_HAS_CODEC
+static void pagerReportSize(Pager *pPager){
+  if( pPager->xCodecSizeChng ){
+    pPager->xCodecSizeChng(pPager->pCodec, pPager->pageSize,
+                           (int)pPager->nReserve);
+  }
+}
+#else
+# define pagerReportSize(X)     /* No-op if we do not support a codec */
+#endif
+
+/*
+** Read a single page from either the journal file (if isMainJrnl==1) or
+** from the sub-journal (if isMainJrnl==0) and playback that page.
+** The page begins at offset *pOffset into the file. The *pOffset
+** value is increased to the start of the next page in the journal.
+**
+** The main rollback journal uses checksums - the statement journal does 
+** not.
+**
+** If the page number of the page record read from the (sub-)journal file
+** is greater than the current value of Pager.dbSize, then playback is
+** skipped and SQLITE_OK is returned.
+**
+** If pDone is not NULL, then it is a record of pages that have already
+** been played back.  If the page at *pOffset has already been played back
+** (if the corresponding pDone bit is set) then skip the playback.
+** Make sure the pDone bit corresponding to the *pOffset page is set
+** prior to returning.
+**
+** If the page record is successfully read from the (sub-)journal file
+** and played back, then SQLITE_OK is returned. If an IO error occurs
+** while reading the record from the (sub-)journal file or while writing
+** to the database file, then the IO error code is returned. If data
+** is successfully read from the (sub-)journal file but appears to be
+** corrupted, SQLITE_DONE is returned. Data is considered corrupted in
+** two circumstances:
+** 
+**   * If the record page-number is illegal (0 or PAGER_MJ_PGNO), or
+**   * If the record is being rolled back from the main journal file
+**     and the checksum field does not match the record content.
+**
+** Neither of these two scenarios are possible during a savepoint rollback.
+**
+** If this is a savepoint rollback, then memory may have to be dynamically
+** allocated by this function. If this is the case and an allocation fails,
+** SQLITE_NOMEM is returned.
+*/
+static int pager_playback_one_page(
+  Pager *pPager,                /* The pager being played back */
+  i64 *pOffset,                 /* Offset of record to playback */
+  Bitvec *pDone,                /* Bitvec of pages already played back */
+  int isMainJrnl,               /* 1 -> main journal. 0 -> sub-journal. */
+  int isSavepnt                 /* True for a savepoint rollback */
+){
+  int rc;
+  PgHdr *pPg;                   /* An existing page in the cache */
+  Pgno pgno;                    /* The page number of a page in journal */
+  u32 cksum;                    /* Checksum used for sanity checking */
+  char *aData;                  /* Temporary storage for the page */
+  sqlite3_file *jfd;            /* The file descriptor for the journal file */
+  int isSynced;                 /* True if journal page is synced */
+
+  assert( (isMainJrnl&~1)==0 );      /* isMainJrnl is 0 or 1 */
+  assert( (isSavepnt&~1)==0 );       /* isSavepnt is 0 or 1 */
+  assert( isMainJrnl || pDone );     /* pDone always used on sub-journals */
+  assert( isSavepnt || pDone==0 );   /* pDone never used on non-savepoint */
+
+  aData = pPager->pTmpSpace;
+  assert( aData );         /* Temp storage must have already been allocated */
+  assert( pagerUseWal(pPager)==0 || (!isMainJrnl && isSavepnt) );
+
+  /* Either the state is greater than PAGER_WRITER_CACHEMOD (a transaction 
+  ** or savepoint rollback done at the request of the caller) or this is
+  ** a hot-journal rollback. If it is a hot-journal rollback, the pager
+  ** is in state OPEN and holds an EXCLUSIVE lock. Hot-journal rollback
+  ** only reads from the main journal, not the sub-journal.
+  */
+  assert( pPager->eState>=PAGER_WRITER_CACHEMOD
+       || (pPager->eState==PAGER_OPEN && pPager->eLock==EXCLUSIVE_LOCK)
+  );
+  assert( pPager->eState>=PAGER_WRITER_CACHEMOD || isMainJrnl );
+
+  /* Read the page number and page data from the journal or sub-journal
+  ** file. Return an error code to the caller if an IO error occurs.
+  */
+  jfd = isMainJrnl ? pPager->jfd : pPager->sjfd;
+  rc = read32bits(jfd, *pOffset, &pgno);
+  if( rc!=SQLITE_OK ) return rc;
+  rc = sqlite3OsRead(jfd, (u8*)aData, pPager->pageSize, (*pOffset)+4);
+  if( rc!=SQLITE_OK ) return rc;
+  *pOffset += pPager->pageSize + 4 + isMainJrnl*4;
+
+  /* Sanity checking on the page.  This is more important that I originally
+  ** thought.  If a power failure occurs while the journal is being written,
+  ** it could cause invalid data to be written into the journal.  We need to
+  ** detect this invalid data (with high probability) and ignore it.
+  */
+  if( pgno==0 || pgno==PAGER_MJ_PGNO(pPager) ){
+    assert( !isSavepnt );
+    return SQLITE_DONE;
+  }
+  if( pgno>(Pgno)pPager->dbSize || sqlite3BitvecTest(pDone, pgno) ){
+    return SQLITE_OK;
+  }
+  if( isMainJrnl ){
+    rc = read32bits(jfd, (*pOffset)-4, &cksum);
+    if( rc ) return rc;
+    if( !isSavepnt && pager_cksum(pPager, (u8*)aData)!=cksum ){
+      return SQLITE_DONE;
+    }
+  }
+
+  /* If this page has already been played by before during the current
+  ** rollback, then don't bother to play it back again.
+  */
+  if( pDone && (rc = sqlite3BitvecSet(pDone, pgno))!=SQLITE_OK ){
+    return rc;
+  }
+
+  /* When playing back page 1, restore the nReserve setting
+  */
+  if( pgno==1 && pPager->nReserve!=((u8*)aData)[20] ){
+    pPager->nReserve = ((u8*)aData)[20];
+    pagerReportSize(pPager);
+  }
+
+  /* If the pager is in CACHEMOD state, then there must be a copy of this
+  ** page in the pager cache. In this case just update the pager cache,
+  ** not the database file. The page is left marked dirty in this case.
+  **
+  ** An exception to the above rule: If the database is in no-sync mode
+  ** and a page is moved during an incremental vacuum then the page may
+  ** not be in the pager cache. Later: if a malloc() or IO error occurs
+  ** during a Movepage() call, then the page may not be in the cache
+  ** either. So the condition described in the above paragraph is not
+  ** assert()able.
+  **
+  ** If in WRITER_DBMOD, WRITER_FINISHED or OPEN state, then we update the
+  ** pager cache if it exists and the main file. The page is then marked 
+  ** not dirty. Since this code is only executed in PAGER_OPEN state for
+  ** a hot-journal rollback, it is guaranteed that the page-cache is empty
+  ** if the pager is in OPEN state.
+  **
+  ** Ticket #1171:  The statement journal might contain page content that is
+  ** different from the page content at the start of the transaction.
+  ** This occurs when a page is changed prior to the start of a statement
+  ** then changed again within the statement.  When rolling back such a
+  ** statement we must not write to the original database unless we know
+  ** for certain that original page contents are synced into the main rollback
+  ** journal.  Otherwise, a power loss might leave modified data in the
+  ** database file without an entry in the rollback journal that can
+  ** restore the database to its original form.  Two conditions must be
+  ** met before writing to the database files. (1) the database must be
+  ** locked.  (2) we know that the original page content is fully synced
+  ** in the main journal either because the page is not in cache or else
+  ** the page is marked as needSync==0.
+  **
+  ** 2008-04-14:  When attempting to vacuum a corrupt database file, it
+  ** is possible to fail a statement on a database that does not yet exist.
+  ** Do not attempt to write if database file has never been opened.
+  */
+  if( pagerUseWal(pPager) ){
+    pPg = 0;
+  }else{
+    pPg = pager_lookup(pPager, pgno);
+  }
+  assert( pPg || !MEMDB );
+  assert( pPager->eState!=PAGER_OPEN || pPg==0 );
+  PAGERTRACE(("PLAYBACK %d page %d hash(%08x) %s\n",
+           PAGERID(pPager), pgno, pager_datahash(pPager->pageSize, (u8*)aData),
+           (isMainJrnl?"main-journal":"sub-journal")
+  ));
+  if( isMainJrnl ){
+    isSynced = pPager->noSync || (*pOffset <= pPager->journalHdr);
+  }else{
+    isSynced = (pPg==0 || 0==(pPg->flags & PGHDR_NEED_SYNC));
+  }
+  if( isOpen(pPager->fd)
+   && (pPager->eState>=PAGER_WRITER_DBMOD || pPager->eState==PAGER_OPEN)
+   && isSynced
+  ){
+    i64 ofst = (pgno-1)*(i64)pPager->pageSize;
+    testcase( !isSavepnt && pPg!=0 && (pPg->flags&PGHDR_NEED_SYNC)!=0 );
+    assert( !pagerUseWal(pPager) );
+    rc = sqlite3OsWrite(pPager->fd, (u8*)aData, pPager->pageSize, ofst);
+    if( pgno>pPager->dbFileSize ){
+      pPager->dbFileSize = pgno;
+    }
+    if( pPager->pBackup ){
+      CODEC1(pPager, aData, pgno, 3, rc=SQLITE_NOMEM);
+      sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)aData);
+      CODEC2(pPager, aData, pgno, 7, rc=SQLITE_NOMEM, aData);
+    }
+  }else if( !isMainJrnl && pPg==0 ){
+    /* If this is a rollback of a savepoint and data was not written to
+    ** the database and the page is not in-memory, there is a potential
+    ** problem. When the page is next fetched by the b-tree layer, it 
+    ** will be read from the database file, which may or may not be 
+    ** current. 
+    **
+    ** There are a couple of different ways this can happen. All are quite
+    ** obscure. When running in synchronous mode, this can only happen 
+    ** if the page is on the free-list at the start of the transaction, then
+    ** populated, then moved using sqlite3PagerMovepage().
+    **
+    ** The solution is to add an in-memory page to the cache containing
+    ** the data just read from the sub-journal. Mark the page as dirty 
+    ** and if the pager requires a journal-sync, then mark the page as 
+    ** requiring a journal-sync before it is written.
+    */
+    assert( isSavepnt );
+    assert( pPager->doNotSpill==0 );
+    pPager->doNotSpill++;
+    rc = sqlite3PagerAcquire(pPager, pgno, &pPg, 1);
+    assert( pPager->doNotSpill==1 );
+    pPager->doNotSpill--;
+    if( rc!=SQLITE_OK ) return rc;
+    pPg->flags &= ~PGHDR_NEED_READ;
+    sqlite3PcacheMakeDirty(pPg);
+  }
+  if( pPg ){
+    /* No page should ever be explicitly rolled back that is in use, except
+    ** for page 1 which is held in use in order to keep the lock on the
+    ** database active. However such a page may be rolled back as a result
+    ** of an internal error resulting in an automatic call to
+    ** sqlite3PagerRollback().
+    */
+    void *pData;
+    pData = pPg->pData;
+    memcpy(pData, (u8*)aData, pPager->pageSize);
+    pPager->xReiniter(pPg);
+    if( isMainJrnl && (!isSavepnt || *pOffset<=pPager->journalHdr) ){
+      /* If the contents of this page were just restored from the main 
+      ** journal file, then its content must be as they were when the 
+      ** transaction was first opened. In this case we can mark the page
+      ** as clean, since there will be no need to write it out to the
+      ** database.
+      **
+      ** There is one exception to this rule. If the page is being rolled
+      ** back as part of a savepoint (or statement) rollback from an 
+      ** unsynced portion of the main journal file, then it is not safe
+      ** to mark the page as clean. This is because marking the page as
+      ** clean will clear the PGHDR_NEED_SYNC flag. Since the page is
+      ** already in the journal file (recorded in Pager.pInJournal) and
+      ** the PGHDR_NEED_SYNC flag is cleared, if the page is written to
+      ** again within this transaction, it will be marked as dirty but
+      ** the PGHDR_NEED_SYNC flag will not be set. It could then potentially
+      ** be written out into the database file before its journal file
+      ** segment is synced. If a crash occurs during or following this,
+      ** database corruption may ensue.
+      */
+      assert( !pagerUseWal(pPager) );
+      sqlite3PcacheMakeClean(pPg);
+    }
+    pager_set_pagehash(pPg);
+
+    /* If this was page 1, then restore the value of Pager.dbFileVers.
+    ** Do this before any decoding. */
+    if( pgno==1 ){
+      memcpy(&pPager->dbFileVers, &((u8*)pData)[24],sizeof(pPager->dbFileVers));
+    }
+
+    /* Decode the page just read from disk */
+    CODEC1(pPager, pData, pPg->pgno, 3, rc=SQLITE_NOMEM);
+    sqlite3PcacheRelease(pPg);
+  }
+  return rc;
+}
+
+/*
+** Parameter zMaster is the name of a master journal file. A single journal
+** file that referred to the master journal file has just been rolled back.
+** This routine checks if it is possible to delete the master journal file,
+** and does so if it is.
+**
+** Argument zMaster may point to Pager.pTmpSpace. So that buffer is not 
+** available for use within this function.
+**
+** When a master journal file is created, it is populated with the names 
+** of all of its child journals, one after another, formatted as utf-8 
+** encoded text. The end of each child journal file is marked with a 
+** nul-terminator byte (0x00). i.e. the entire contents of a master journal
+** file for a transaction involving two databases might be:
+**
+**   "/home/bill/a.db-journal\x00/home/bill/b.db-journal\x00"
+**
+** A master journal file may only be deleted once all of its child 
+** journals have been rolled back.
+**
+** This function reads the contents of the master-journal file into 
+** memory and loops through each of the child journal names. For
+** each child journal, it checks if:
+**
+**   * if the child journal exists, and if so
+**   * if the child journal contains a reference to master journal 
+**     file zMaster
+**
+** If a child journal can be found that matches both of the criteria
+** above, this function returns without doing anything. Otherwise, if
+** no such child journal can be found, file zMaster is deleted from
+** the file-system using sqlite3OsDelete().
+**
+** If an IO error within this function, an error code is returned. This
+** function allocates memory by calling sqlite3Malloc(). If an allocation
+** fails, SQLITE_NOMEM is returned. Otherwise, if no IO or malloc errors 
+** occur, SQLITE_OK is returned.
+**
+** TODO: This function allocates a single block of memory to load
+** the entire contents of the master journal file. This could be
+** a couple of kilobytes or so - potentially larger than the page 
+** size.
+*/
+static int pager_delmaster(Pager *pPager, const char *zMaster){
+  sqlite3_vfs *pVfs = pPager->pVfs;
+  int rc;                   /* Return code */
+  sqlite3_file *pMaster;    /* Malloc'd master-journal file descriptor */
+  sqlite3_file *pJournal;   /* Malloc'd child-journal file descriptor */
+  char *zMasterJournal = 0; /* Contents of master journal file */
+  i64 nMasterJournal;       /* Size of master journal file */
+  char *zJournal;           /* Pointer to one journal within MJ file */
+  char *zMasterPtr;         /* Space to hold MJ filename from a journal file */
+  int nMasterPtr;           /* Amount of space allocated to zMasterPtr[] */
+
+  /* Allocate space for both the pJournal and pMaster file descriptors.
+  ** If successful, open the master journal file for reading.
+  */
+  pMaster = (sqlite3_file *)sqlite3MallocZero(pVfs->szOsFile * 2);
+  pJournal = (sqlite3_file *)(((u8 *)pMaster) + pVfs->szOsFile);
+  if( !pMaster ){
+    rc = SQLITE_NOMEM;
+  }else{
+    const int flags = (SQLITE_OPEN_READONLY|SQLITE_OPEN_MASTER_JOURNAL);
+    rc = sqlite3OsOpen(pVfs, zMaster, pMaster, flags, 0);
+  }
+  if( rc!=SQLITE_OK ) goto delmaster_out;
+
+  /* Load the entire master journal file into space obtained from
+  ** sqlite3_malloc() and pointed to by zMasterJournal.   Also obtain
+  ** sufficient space (in zMasterPtr) to hold the names of master
+  ** journal files extracted from regular rollback-journals.
+  */
+  rc = sqlite3OsFileSize(pMaster, &nMasterJournal);
+  if( rc!=SQLITE_OK ) goto delmaster_out;
+  nMasterPtr = pVfs->mxPathname+1;
+  zMasterJournal = sqlite3Malloc((int)nMasterJournal + nMasterPtr + 1);
+  if( !zMasterJournal ){
+    rc = SQLITE_NOMEM;
+    goto delmaster_out;
+  }
+  zMasterPtr = &zMasterJournal[nMasterJournal+1];
+  rc = sqlite3OsRead(pMaster, zMasterJournal, (int)nMasterJournal, 0);
+  if( rc!=SQLITE_OK ) goto delmaster_out;
+  zMasterJournal[nMasterJournal] = 0;
+
+  zJournal = zMasterJournal;
+  while( (zJournal-zMasterJournal)<nMasterJournal ){
+    int exists;
+    rc = sqlite3OsAccess(pVfs, zJournal, SQLITE_ACCESS_EXISTS, &exists);
+    if( rc!=SQLITE_OK ){
+      goto delmaster_out;
+    }
+    if( exists ){
+      /* One of the journals pointed to by the master journal exists.
+      ** Open it and check if it points at the master journal. If
+      ** so, return without deleting the master journal file.
+      */
+      int c;
+      int flags = (SQLITE_OPEN_READONLY|SQLITE_OPEN_MAIN_JOURNAL);
+      rc = sqlite3OsOpen(pVfs, zJournal, pJournal, flags, 0);
+      if( rc!=SQLITE_OK ){
+        goto delmaster_out;
+      }
+
+      rc = readMasterJournal(pJournal, zMasterPtr, nMasterPtr);
+      sqlite3OsClose(pJournal);
+      if( rc!=SQLITE_OK ){
+        goto delmaster_out;
+      }
+
+      c = zMasterPtr[0]!=0 && strcmp(zMasterPtr, zMaster)==0;
+      if( c ){
+        /* We have a match. Do not delete the master journal file. */
+        goto delmaster_out;
+      }
+    }
+    zJournal += (sqlite3Strlen30(zJournal)+1);
+  }
+ 
+  sqlite3OsClose(pMaster);
+  rc = sqlite3OsDelete(pVfs, zMaster, 0);
+
+delmaster_out:
+  sqlite3_free(zMasterJournal);
+  if( pMaster ){
+    sqlite3OsClose(pMaster);
+    assert( !isOpen(pJournal) );
+    sqlite3_free(pMaster);
+  }
+  return rc;
+}
+
+
+/*
+** This function is used to change the actual size of the database 
+** file in the file-system. This only happens when committing a transaction,
+** or rolling back a transaction (including rolling back a hot-journal).
+**
+** If the main database file is not open, or the pager is not in either
+** DBMOD or OPEN state, this function is a no-op. Otherwise, the size 
+** of the file is changed to nPage pages (nPage*pPager->pageSize bytes). 
+** If the file on disk is currently larger than nPage pages, then use the VFS
+** xTruncate() method to truncate it.
+**
+** Or, it might might be the case that the file on disk is smaller than 
+** nPage pages. Some operating system implementations can get confused if 
+** you try to truncate a file to some size that is larger than it 
+** currently is, so detect this case and write a single zero byte to 
+** the end of the new file instead.
+**
+** If successful, return SQLITE_OK. If an IO error occurs while modifying
+** the database file, return the error code to the caller.
+*/
+static int pager_truncate(Pager *pPager, Pgno nPage){
+  int rc = SQLITE_OK;
+  assert( pPager->eState!=PAGER_ERROR );
+  assert( pPager->eState!=PAGER_READER );
+  
+  if( isOpen(pPager->fd) 
+   && (pPager->eState>=PAGER_WRITER_DBMOD || pPager->eState==PAGER_OPEN) 
+  ){
+    i64 currentSize, newSize;
+    int szPage = pPager->pageSize;
+    assert( pPager->eLock==EXCLUSIVE_LOCK );
+    /* TODO: Is it safe to use Pager.dbFileSize here? */
+    rc = sqlite3OsFileSize(pPager->fd, &currentSize);
+    newSize = szPage*(i64)nPage;
+    if( rc==SQLITE_OK && currentSize!=newSize ){
+      if( currentSize>newSize ){
+        rc = sqlite3OsTruncate(pPager->fd, newSize);
+      }else{
+        char *pTmp = pPager->pTmpSpace;
+        memset(pTmp, 0, szPage);
+        testcase( (newSize-szPage) <  currentSize );
+        testcase( (newSize-szPage) == currentSize );
+        testcase( (newSize-szPage) >  currentSize );
+        rc = sqlite3OsWrite(pPager->fd, pTmp, szPage, newSize-szPage);
+      }
+      if( rc==SQLITE_OK ){
+        pPager->dbFileSize = nPage;
+      }
+    }
+  }
+  return rc;
+}
+
+/*
+** Set the value of the Pager.sectorSize variable for the given
+** pager based on the value returned by the xSectorSize method
+** of the open database file. The sector size will be used used 
+** to determine the size and alignment of journal header and 
+** master journal pointers within created journal files.
+**
+** For temporary files the effective sector size is always 512 bytes.
+**
+** Otherwise, for non-temporary files, the effective sector size is
+** the value returned by the xSectorSize() method rounded up to 32 if
+** it is less than 32, or rounded down to MAX_SECTOR_SIZE if it
+** is greater than MAX_SECTOR_SIZE.
+*/
+static void setSectorSize(Pager *pPager){
+  assert( isOpen(pPager->fd) || pPager->tempFile );
+
+  if( !pPager->tempFile ){
+    /* Sector size doesn't matter for temporary files. Also, the file
+    ** may not have been opened yet, in which case the OsSectorSize()
+    ** call will segfault.
+    */
+    pPager->sectorSize = sqlite3OsSectorSize(pPager->fd);
+  }
+  if( pPager->sectorSize<32 ){
+    pPager->sectorSize = 512;
+  }
+  if( pPager->sectorSize>MAX_SECTOR_SIZE ){
+    assert( MAX_SECTOR_SIZE>=512 );
+    pPager->sectorSize = MAX_SECTOR_SIZE;
+  }
+}
+
+/*
+** Playback the journal and thus restore the database file to
+** the state it was in before we started making changes.  
+**
+** The journal file format is as follows: 
+**
+**  (1)  8 byte prefix.  A copy of aJournalMagic[].
+**  (2)  4 byte big-endian integer which is the number of valid page records
+**       in the journal.  If this value is 0xffffffff, then compute the
+**       number of page records from the journal size.
+**  (3)  4 byte big-endian integer which is the initial value for the 
+**       sanity checksum.
+**  (4)  4 byte integer which is the number of pages to truncate the
+**       database to during a rollback.
+**  (5)  4 byte big-endian integer which is the sector size.  The header
+**       is this many bytes in size.
+**  (6)  4 byte big-endian integer which is the page size.
+**  (7)  zero padding out to the next sector size.
+**  (8)  Zero or more pages instances, each as follows:
+**        +  4 byte page number.
+**        +  pPager->pageSize bytes of data.
+**        +  4 byte checksum
+**
+** When we speak of the journal header, we mean the first 7 items above.
+** Each entry in the journal is an instance of the 8th item.
+**
+** Call the value from the second bullet "nRec".  nRec is the number of
+** valid page entries in the journal.  In most cases, you can compute the
+** value of nRec from the size of the journal file.  But if a power
+** failure occurred while the journal was being written, it could be the
+** case that the size of the journal file had already been increased but
+** the extra entries had not yet made it safely to disk.  In such a case,
+** the value of nRec computed from the file size would be too large.  For
+** that reason, we always use the nRec value in the header.
+**
+** If the nRec value is 0xffffffff it means that nRec should be computed
+** from the file size.  This value is used when the user selects the
+** no-sync option for the journal.  A power failure could lead to corruption
+** in this case.  But for things like temporary table (which will be
+** deleted when the power is restored) we don't care.  
+**
+** If the file opened as the journal file is not a well-formed
+** journal file then all pages up to the first corrupted page are rolled
+** back (or no pages if the journal header is corrupted). The journal file
+** is then deleted and SQLITE_OK returned, just as if no corruption had
+** been encountered.
+**
+** If an I/O or malloc() error occurs, the journal-file is not deleted
+** and an error code is returned.
+**
+** The isHot parameter indicates that we are trying to rollback a journal
+** that might be a hot journal.  Or, it could be that the journal is 
+** preserved because of JOURNALMODE_PERSIST or JOURNALMODE_TRUNCATE.
+** If the journal really is hot, reset the pager cache prior rolling
+** back any content.  If the journal is merely persistent, no reset is
+** needed.
+*/
+static int pager_playback(Pager *pPager, int isHot){
+  sqlite3_vfs *pVfs = pPager->pVfs;
+  i64 szJ;                 /* Size of the journal file in bytes */
+  u32 nRec;                /* Number of Records in the journal */
+  u32 u;                   /* Unsigned loop counter */
+  Pgno mxPg = 0;           /* Size of the original file in pages */
+  int rc;                  /* Result code of a subroutine */
+  int res = 1;             /* Value returned by sqlite3OsAccess() */
+  char *zMaster = 0;       /* Name of master journal file if any */
+  int needPagerReset;      /* True to reset page prior to first page rollback */
+
+  /* Figure out how many records are in the journal.  Abort early if
+  ** the journal is empty.
+  */
+  assert( isOpen(pPager->jfd) );
+  rc = sqlite3OsFileSize(pPager->jfd, &szJ);
+  if( rc!=SQLITE_OK ){
+    goto end_playback;
+  }
+
+  /* Read the master journal name from the journal, if it is present.
+  ** If a master journal file name is specified, but the file is not
+  ** present on disk, then the journal is not hot and does not need to be
+  ** played back.
+  **
+  ** TODO: Technically the following is an error because it assumes that
+  ** buffer Pager.pTmpSpace is (mxPathname+1) bytes or larger. i.e. that
+  ** (pPager->pageSize >= pPager->pVfs->mxPathname+1). Using os_unix.c,
+  **  mxPathname is 512, which is the same as the minimum allowable value
+  ** for pageSize.
+  */
+  zMaster = pPager->pTmpSpace;
+  rc = readMasterJournal(pPager->jfd, zMaster, pPager->pVfs->mxPathname+1);
+  if( rc==SQLITE_OK && zMaster[0] ){
+    rc = sqlite3OsAccess(pVfs, zMaster, SQLITE_ACCESS_EXISTS, &res);
+  }
+  zMaster = 0;
+  if( rc!=SQLITE_OK || !res ){
+    goto end_playback;
+  }
+  pPager->journalOff = 0;
+  needPagerReset = isHot;
+
+  /* This loop terminates either when a readJournalHdr() or 
+  ** pager_playback_one_page() call returns SQLITE_DONE or an IO error 
+  ** occurs. 
+  */
+  for(;;) {
+    /* Read the next journal header from the journal file.  If there are
+    ** not enough bytes left in the journal file for a complete header, or
+    ** it is corrupted, then a process must have failed while writing it.
+    ** This indicates nothing more needs to be rolled back.
+    */
+    rc = readJournalHdr(pPager, isHot, szJ, &nRec, &mxPg);
+    if( rc!=SQLITE_OK ){ 
+      if( rc==SQLITE_DONE ){
+        rc = SQLITE_OK;
+      }
+      goto end_playback;
+    }
+
+    /* If nRec is 0xffffffff, then this journal was created by a process
+    ** working in no-sync mode. This means that the rest of the journal
+    ** file consists of pages, there are no more journal headers. Compute
+    ** the value of nRec based on this assumption.
+    */
+    if( nRec==0xffffffff ){
+      assert( pPager->journalOff==JOURNAL_HDR_SZ(pPager) );
+      nRec = (int)((szJ - JOURNAL_HDR_SZ(pPager))/JOURNAL_PG_SZ(pPager));
+    }
+
+    /* If nRec is 0 and this rollback is of a transaction created by this
+    ** process and if this is the final header in the journal, then it means
+    ** that this part of the journal was being filled but has not yet been
+    ** synced to disk.  Compute the number of pages based on the remaining
+    ** size of the file.
+    **
+    ** The third term of the test was added to fix ticket #2565.
+    ** When rolling back a hot journal, nRec==0 always means that the next
+    ** chunk of the journal contains zero pages to be rolled back.  But
+    ** when doing a ROLLBACK and the nRec==0 chunk is the last chunk in
+    ** the journal, it means that the journal might contain additional
+    ** pages that need to be rolled back and that the number of pages 
+    ** should be computed based on the journal file size.
+    */
+    if( nRec==0 && !isHot &&
+        pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff ){
+      nRec = (int)((szJ - pPager->journalOff) / JOURNAL_PG_SZ(pPager));
+    }
+
+    /* If this is the first header read from the journal, truncate the
+    ** database file back to its original size.
+    */
+    if( pPager->journalOff==JOURNAL_HDR_SZ(pPager) ){
+      rc = pager_truncate(pPager, mxPg);
+      if( rc!=SQLITE_OK ){
+        goto end_playback;
+      }
+      pPager->dbSize = mxPg;
+    }
+
+    /* Copy original pages out of the journal and back into the 
+    ** database file and/or page cache.
+    */
+    for(u=0; u<nRec; u++){
+      if( needPagerReset ){
+        pager_reset(pPager);
+        needPagerReset = 0;
+      }
+      rc = pager_playback_one_page(pPager,&pPager->journalOff,0,1,0);
+      if( rc!=SQLITE_OK ){
+        if( rc==SQLITE_DONE ){
+          rc = SQLITE_OK;
+          pPager->journalOff = szJ;
+          break;
+        }else if( rc==SQLITE_IOERR_SHORT_READ ){
+          /* If the journal has been truncated, simply stop reading and
+          ** processing the journal. This might happen if the journal was
+          ** not completely written and synced prior to a crash.  In that
+          ** case, the database should have never been written in the
+          ** first place so it is OK to simply abandon the rollback. */
+          rc = SQLITE_OK;
+          goto end_playback;
+        }else{
+          /* If we are unable to rollback, quit and return the error
+          ** code.  This will cause the pager to enter the error state
+          ** so that no further harm will be done.  Perhaps the next
+          ** process to come along will be able to rollback the database.
+          */
+          goto end_playback;
+        }
+      }
+    }
+  }
+  /*NOTREACHED*/
+  assert( 0 );
+
+end_playback:
+  /* Following a rollback, the database file should be back in its original
+  ** state prior to the start of the transaction, so invoke the
+  ** SQLITE_FCNTL_DB_UNCHANGED file-control method to disable the
+  ** assertion that the transaction counter was modified.
+  */
+  assert(
+    pPager->fd->pMethods==0 ||
+    sqlite3OsFileControl(pPager->fd,SQLITE_FCNTL_DB_UNCHANGED,0)>=SQLITE_OK
+  );
+
+  /* If this playback is happening automatically as a result of an IO or 
+  ** malloc error that occurred after the change-counter was updated but 
+  ** before the transaction was committed, then the change-counter 
+  ** modification may just have been reverted. If this happens in exclusive 
+  ** mode, then subsequent transactions performed by the connection will not
+  ** update the change-counter at all. This may lead to cache inconsistency
+  ** problems for other processes at some point in the future. So, just
+  ** in case this has happened, clear the changeCountDone flag now.
+  */
+  pPager->changeCountDone = pPager->tempFile;
+
+  if( rc==SQLITE_OK ){
+    zMaster = pPager->pTmpSpace;
+    rc = readMasterJournal(pPager->jfd, zMaster, pPager->pVfs->mxPathname+1);
+    testcase( rc!=SQLITE_OK );
+  }
+  if( rc==SQLITE_OK
+   && (pPager->eState>=PAGER_WRITER_DBMOD || pPager->eState==PAGER_OPEN)
+  ){
+    rc = sqlite3PagerSync(pPager);
+  }
+  if( rc==SQLITE_OK ){
+    rc = pager_end_transaction(pPager, zMaster[0]!='\0');
+    testcase( rc!=SQLITE_OK );
+  }
+  if( rc==SQLITE_OK && zMaster[0] && res ){
+    /* If there was a master journal and this routine will return success,
+    ** see if it is possible to delete the master journal.
+    */
+    rc = pager_delmaster(pPager, zMaster);
+    testcase( rc!=SQLITE_OK );
+  }
+
+  /* The Pager.sectorSize variable may have been updated while rolling
+  ** back a journal created by a process with a different sector size
+  ** value. Reset it to the correct value for this process.
+  */
+  setSectorSize(pPager);
+  return rc;
+}
+
+
+/*
+** Read the content for page pPg out of the database file and into 
+** pPg->pData. A shared lock or greater must be held on the database
+** file before this function is called.
+**
+** If page 1 is read, then the value of Pager.dbFileVers[] is set to
+** the value read from the database file.
+**
+** If an IO error occurs, then the IO error is returned to the caller.
+** Otherwise, SQLITE_OK is returned.
+*/
+static int readDbPage(PgHdr *pPg){
+  Pager *pPager = pPg->pPager; /* Pager object associated with page pPg */
+  Pgno pgno = pPg->pgno;       /* Page number to read */
+  int rc = SQLITE_OK;          /* Return code */
+  int isInWal = 0;             /* True if page is in log file */
+  int pgsz = pPager->pageSize; /* Number of bytes to read */
+
+  assert( pPager->eState>=PAGER_READER && !MEMDB );
+  assert( isOpen(pPager->fd) );
+
+  if( NEVER(!isOpen(pPager->fd)) ){
+    assert( pPager->tempFile );
+    memset(pPg->pData, 0, pPager->pageSize);
+    return SQLITE_OK;
+  }
+
+  if( pagerUseWal(pPager) ){
+    /* Try to pull the page from the write-ahead log. */
+    rc = sqlite3WalRead(pPager->pWal, pgno, &isInWal, pgsz, pPg->pData);
+  }
+  if( rc==SQLITE_OK && !isInWal ){
+    i64 iOffset = (pgno-1)*(i64)pPager->pageSize;
+    rc = sqlite3OsRead(pPager->fd, pPg->pData, pgsz, iOffset);
+    if( rc==SQLITE_IOERR_SHORT_READ ){
+      rc = SQLITE_OK;
+    }
+  }
+
+  if( pgno==1 ){
+    if( rc ){
+      /* If the read is unsuccessful, set the dbFileVers[] to something
+      ** that will never be a valid file version.  dbFileVers[] is a copy
+      ** of bytes 24..39 of the database.  Bytes 28..31 should always be
+      ** zero or the size of the database in page. Bytes 32..35 and 35..39
+      ** should be page numbers which are never 0xffffffff.  So filling
+      ** pPager->dbFileVers[] with all 0xff bytes should suffice.
+      **
+      ** For an encrypted database, the situation is more complex:  bytes
+      ** 24..39 of the database are white noise.  But the probability of
+      ** white noising equaling 16 bytes of 0xff is vanishingly small so
+      ** we should still be ok.
+      */
+      memset(pPager->dbFileVers, 0xff, sizeof(pPager->dbFileVers));
+    }else{
+      u8 *dbFileVers = &((u8*)pPg->pData)[24];
+      memcpy(&pPager->dbFileVers, dbFileVers, sizeof(pPager->dbFileVers));
+    }
+  }
+  CODEC1(pPager, pPg->pData, pgno, 3, rc = SQLITE_NOMEM);
+
+  PAGER_INCR(sqlite3_pager_readdb_count);
+  PAGER_INCR(pPager->nRead);
+  IOTRACE(("PGIN %p %d\n", pPager, pgno));
+  PAGERTRACE(("FETCH %d page %d hash(%08x)\n",
+               PAGERID(pPager), pgno, pager_pagehash(pPg)));
+
+  return rc;
+}
+
+/*
+** Update the value of the change-counter at offsets 24 and 92 in
+** the header and the sqlite version number at offset 96.
+**
+** This is an unconditional update.  See also the pager_incr_changecounter()
+** routine which only updates the change-counter if the update is actually
+** needed, as determined by the pPager->changeCountDone state variable.
+*/
+static void pager_write_changecounter(PgHdr *pPg){
+  u32 change_counter;
+
+  /* Increment the value just read and write it back to byte 24. */
+  change_counter = sqlite3Get4byte((u8*)pPg->pPager->dbFileVers)+1;
+  put32bits(((char*)pPg->pData)+24, change_counter);
+
+  /* Also store the SQLite version number in bytes 96..99 and in
+  ** bytes 92..95 store the change counter for which the version number
+  ** is valid. */
+  put32bits(((char*)pPg->pData)+92, change_counter);
+  put32bits(((char*)pPg->pData)+96, SQLITE_VERSION_NUMBER);
+}
+
+#ifndef SQLITE_OMIT_WAL
+/*
+** This function is invoked once for each page that has already been 
+** written into the log file when a WAL transaction is rolled back.
+** Parameter iPg is the page number of said page. The pCtx argument 
+** is actually a pointer to the Pager structure.
+**
+** If page iPg is present in the cache, and has no outstanding references,
+** it is discarded. Otherwise, if there are one or more outstanding
+** references, the page content is reloaded from the database. If the
+** attempt to reload content from the database is required and fails, 
+** return an SQLite error code. Otherwise, SQLITE_OK.
+*/
+static int pagerUndoCallback(void *pCtx, Pgno iPg){
+  int rc = SQLITE_OK;
+  Pager *pPager = (Pager *)pCtx;
+  PgHdr *pPg;
+
+  pPg = sqlite3PagerLookup(pPager, iPg);
+  if( pPg ){
+    if( sqlite3PcachePageRefcount(pPg)==1 ){
+      sqlite3PcacheDrop(pPg);
+    }else{
+      rc = readDbPage(pPg);
+      if( rc==SQLITE_OK ){
+        pPager->xReiniter(pPg);
+      }
+      sqlite3PagerUnref(pPg);
+    }
+  }
+
+  /* Normally, if a transaction is rolled back, any backup processes are
+  ** updated as data is copied out of the rollback journal and into the
+  ** database. This is not generally possible with a WAL database, as
+  ** rollback involves simply truncating the log file. Therefore, if one
+  ** or more frames have already been written to the log (and therefore 
+  ** also copied into the backup databases) as part of this transaction,
+  ** the backups must be restarted.
+  */
+  sqlite3BackupRestart(pPager->pBackup);
+
+  return rc;
+}
+
+/*
+** This function is called to rollback a transaction on a WAL database.
+*/
+static int pagerRollbackWal(Pager *pPager){
+  int rc;                         /* Return Code */
+  PgHdr *pList;                   /* List of dirty pages to revert */
+
+  /* For all pages in the cache that are currently dirty or have already
+  ** been written (but not committed) to the log file, do one of the 
+  ** following:
+  **
+  **   + Discard the cached page (if refcount==0), or
+  **   + Reload page content from the database (if refcount>0).
+  */
+  pPager->dbSize = pPager->dbOrigSize;
+  rc = sqlite3WalUndo(pPager->pWal, pagerUndoCallback, (void *)pPager);
+  pList = sqlite3PcacheDirtyList(pPager->pPCache);
+  while( pList && rc==SQLITE_OK ){
+    PgHdr *pNext = pList->pDirty;
+    rc = pagerUndoCallback((void *)pPager, pList->pgno);
+    pList = pNext;
+  }
+
+  return rc;
+}
+
+/*
+** This function is a wrapper around sqlite3WalFrames(). As well as logging
+** the contents of the list of pages headed by pList (connected by pDirty),
+** this function notifies any active backup processes that the pages have
+** changed. 
+**
+** The list of pages passed into this routine is always sorted by page number.
+** Hence, if page 1 appears anywhere on the list, it will be the first page.
+*/ 
+static int pagerWalFrames(
+  Pager *pPager,                  /* Pager object */
+  PgHdr *pList,                   /* List of frames to log */
+  Pgno nTruncate,                 /* Database size after this commit */
+  int isCommit,                   /* True if this is a commit */
+  int syncFlags                   /* Flags to pass to OsSync() (or 0) */
+){
+  int rc;                         /* Return code */
+#if defined(SQLITE_DEBUG) || defined(SQLITE_CHECK_PAGES)
+  PgHdr *p;                       /* For looping over pages */
+#endif
+
+  assert( pPager->pWal );
+#ifdef SQLITE_DEBUG
+  /* Verify that the page list is in accending order */
+  for(p=pList; p && p->pDirty; p=p->pDirty){
+    assert( p->pgno < p->pDirty->pgno );
+  }
+#endif
+
+  if( isCommit ){
+    /* If a WAL transaction is being committed, there is no point in writing
+    ** any pages with page numbers greater than nTruncate into the WAL file.
+    ** They will never be read by any client. So remove them from the pDirty
+    ** list here. */
+    PgHdr *p;
+    PgHdr **ppNext = &pList;
+    for(p=pList; (*ppNext = p) != NULL; p=p->pDirty){
+      if( p->pgno<=nTruncate ) ppNext = &p->pDirty;
+    }
+    assert( pList );
+  }
+
+  if( pList->pgno==1 ) pager_write_changecounter(pList);
+  rc = sqlite3WalFrames(pPager->pWal, 
+      pPager->pageSize, pList, nTruncate, isCommit, syncFlags
+  );
+  if( rc==SQLITE_OK && pPager->pBackup ){
+    PgHdr *p;
+    for(p=pList; p; p=p->pDirty){
+      sqlite3BackupUpdate(pPager->pBackup, p->pgno, (u8 *)p->pData);
+    }
+  }
+
+#ifdef SQLITE_CHECK_PAGES
+  pList = sqlite3PcacheDirtyList(pPager->pPCache);
+  for(p=pList; p; p=p->pDirty){
+    pager_set_pagehash(p);
+  }
+#endif
+
+  return rc;
+}
+
+/*
+** Begin a read transaction on the WAL.
+**
+** This routine used to be called "pagerOpenSnapshot()" because it essentially
+** makes a snapshot of the database at the current point in time and preserves
+** that snapshot for use by the reader in spite of concurrently changes by
+** other writers or checkpointers.
+*/
+static int pagerBeginReadTransaction(Pager *pPager){
+  int rc;                         /* Return code */
+  int changed = 0;                /* True if cache must be reset */
+
+  assert( pagerUseWal(pPager) );
+  assert( pPager->eState==PAGER_OPEN || pPager->eState==PAGER_READER );
+
+  /* sqlite3WalEndReadTransaction() was not called for the previous
+  ** transaction in locking_mode=EXCLUSIVE.  So call it now.  If we
+  ** are in locking_mode=NORMAL and EndRead() was previously called,
+  ** the duplicate call is harmless.
+  */
+  sqlite3WalEndReadTransaction(pPager->pWal);
+
+  rc = sqlite3WalBeginReadTransaction(pPager->pWal, &changed);
+  if( rc!=SQLITE_OK || changed ){
+    pager_reset(pPager);
+  }
+
+  return rc;
+}
+#endif
+
+/*
+** This function is called as part of the transition from PAGER_OPEN
+** to PAGER_READER state to determine the size of the database file
+** in pages (assuming the page size currently stored in Pager.pageSize).
+**
+** If no error occurs, SQLITE_OK is returned and the size of the database
+** in pages is stored in *pnPage. Otherwise, an error code (perhaps
+** SQLITE_IOERR_FSTAT) is returned and *pnPage is left unmodified.
+*/
+static int pagerPagecount(Pager *pPager, Pgno *pnPage){
+  Pgno nPage;                     /* Value to return via *pnPage */
+
+  /* Query the WAL sub-system for the database size. The WalDbsize()
+  ** function returns zero if the WAL is not open (i.e. Pager.pWal==0), or
+  ** if the database size is not available. The database size is not
+  ** available from the WAL sub-system if the log file is empty or
+  ** contains no valid committed transactions.
+  */
+  assert( pPager->eState==PAGER_OPEN );
+  assert( pPager->eLock>=SHARED_LOCK || pPager->noReadlock );
+  nPage = sqlite3WalDbsize(pPager->pWal);
+
+  /* If the database size was not available from the WAL sub-system,
+  ** determine it based on the size of the database file. If the size
+  ** of the database file is not an integer multiple of the page-size,
+  ** round down to the nearest page. Except, any file larger than 0
+  ** bytes in size is considered to contain at least one page.
+  */
+  if( nPage==0 ){
+    i64 n = 0;                    /* Size of db file in bytes */
+    assert( isOpen(pPager->fd) || pPager->tempFile );
+    if( isOpen(pPager->fd) ){
+      int rc = sqlite3OsFileSize(pPager->fd, &n);
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+    }
+    nPage = (Pgno)(n / pPager->pageSize);
+    if( nPage==0 && n>0 ){
+      nPage = 1;
+    }
+  }
+
+  /* If the current number of pages in the file is greater than the
+  ** configured maximum pager number, increase the allowed limit so
+  ** that the file can be read.
+  */
+  if( nPage>pPager->mxPgno ){
+    pPager->mxPgno = (Pgno)nPage;
+  }
+
+  *pnPage = nPage;
+  return SQLITE_OK;
+}
+
+#ifndef SQLITE_OMIT_WAL
+/*
+** Check if the *-wal file that corresponds to the database opened by pPager
+** exists if the database is not empy, or verify that the *-wal file does
+** not exist (by deleting it) if the database file is empty.
+**
+** If the database is not empty and the *-wal file exists, open the pager
+** in WAL mode.  If the database is empty or if no *-wal file exists and
+** if no error occurs, make sure Pager.journalMode is not set to
+** PAGER_JOURNALMODE_WAL.
+**
+** Return SQLITE_OK or an error code.
+**
+** The caller must hold a SHARED lock on the database file to call this
+** function. Because an EXCLUSIVE lock on the db file is required to delete 
+** a WAL on a none-empty database, this ensures there is no race condition 
+** between the xAccess() below and an xDelete() being executed by some 
+** other connection.
+*/
+static int pagerOpenWalIfPresent(Pager *pPager){
+  int rc = SQLITE_OK;
+  assert( pPager->eState==PAGER_OPEN );
+  assert( pPager->eLock>=SHARED_LOCK || pPager->noReadlock );
+
+  if( !pPager->tempFile ){
+    int isWal;                    /* True if WAL file exists */
+    Pgno nPage;                   /* Size of the database file */
+
+    rc = pagerPagecount(pPager, &nPage);
+    if( rc ) return rc;
+    if( nPage==0 ){
+      rc = sqlite3OsDelete(pPager->pVfs, pPager->zWal, 0);
+      isWal = 0;
+    }else{
+      rc = sqlite3OsAccess(
+          pPager->pVfs, pPager->zWal, SQLITE_ACCESS_EXISTS, &isWal
+      );
+    }
+    if( rc==SQLITE_OK ){
+      if( isWal ){
+        testcase( sqlite3PcachePagecount(pPager->pPCache)==0 );
+        rc = sqlite3PagerOpenWal(pPager, 0);
+      }else if( pPager->journalMode==PAGER_JOURNALMODE_WAL ){
+        pPager->journalMode = PAGER_JOURNALMODE_DELETE;
+      }
+    }
+  }
+  return rc;
+}
+#endif
+
+/*
+** Playback savepoint pSavepoint. Or, if pSavepoint==NULL, then playback
+** the entire master journal file. The case pSavepoint==NULL occurs when 
+** a ROLLBACK TO command is invoked on a SAVEPOINT that is a transaction 
+** savepoint.
+**
+** When pSavepoint is not NULL (meaning a non-transaction savepoint is 
+** being rolled back), then the rollback consists of up to three stages,
+** performed in the order specified:
+**
+**   * Pages are played back from the main journal starting at byte
+**     offset PagerSavepoint.iOffset and continuing to 
+**     PagerSavepoint.iHdrOffset, or to the end of the main journal
+**     file if PagerSavepoint.iHdrOffset is zero.
+**
+**   * If PagerSavepoint.iHdrOffset is not zero, then pages are played
+**     back starting from the journal header immediately following 
+**     PagerSavepoint.iHdrOffset to the end of the main journal file.
+**
+**   * Pages are then played back from the sub-journal file, starting
+**     with the PagerSavepoint.iSubRec and continuing to the end of
+**     the journal file.
+**
+** Throughout the rollback process, each time a page is rolled back, the
+** corresponding bit is set in a bitvec structure (variable pDone in the
+** implementation below). This is used to ensure that a page is only
+** rolled back the first time it is encountered in either journal.
+**
+** If pSavepoint is NULL, then pages are only played back from the main
+** journal file. There is no need for a bitvec in this case.
+**
+** In either case, before playback commences the Pager.dbSize variable
+** is reset to the value that it held at the start of the savepoint 
+** (or transaction). No page with a page-number greater than this value
+** is played back. If one is encountered it is simply skipped.
+*/
+static int pagerPlaybackSavepoint(Pager *pPager, PagerSavepoint *pSavepoint){
+  i64 szJ;                 /* Effective size of the main journal */
+  i64 iHdrOff;             /* End of first segment of main-journal records */
+  int rc = SQLITE_OK;      /* Return code */
+  Bitvec *pDone = 0;       /* Bitvec to ensure pages played back only once */
+
+  assert( pPager->eState!=PAGER_ERROR );
+  assert( pPager->eState>=PAGER_WRITER_LOCKED );
+
+  /* Allocate a bitvec to use to store the set of pages rolled back */
+  if( pSavepoint ){
+    pDone = sqlite3BitvecCreate(pSavepoint->nOrig);
+    if( !pDone ){
+      return SQLITE_NOMEM;
+    }
+  }
+
+  /* Set the database size back to the value it was before the savepoint 
+  ** being reverted was opened.
+  */
+  pPager->dbSize = pSavepoint ? pSavepoint->nOrig : pPager->dbOrigSize;
+  pPager->changeCountDone = pPager->tempFile;
+
+  if( !pSavepoint && pagerUseWal(pPager) ){
+    return pagerRollbackWal(pPager);
+  }
+
+  /* Use pPager->journalOff as the effective size of the main rollback
+  ** journal.  The actual file might be larger than this in
+  ** PAGER_JOURNALMODE_TRUNCATE or PAGER_JOURNALMODE_PERSIST.  But anything
+  ** past pPager->journalOff is off-limits to us.
+  */
+  szJ = pPager->journalOff;
+  assert( pagerUseWal(pPager)==0 || szJ==0 );
+
+  /* Begin by rolling back records from the main journal starting at
+  ** PagerSavepoint.iOffset and continuing to the next journal header.
+  ** There might be records in the main journal that have a page number
+  ** greater than the current database size (pPager->dbSize) but those
+  ** will be skipped automatically.  Pages are added to pDone as they
+  ** are played back.
+  */
+  if( pSavepoint && !pagerUseWal(pPager) ){
+    iHdrOff = pSavepoint->iHdrOffset ? pSavepoint->iHdrOffset : szJ;
+    pPager->journalOff = pSavepoint->iOffset;
+    while( rc==SQLITE_OK && pPager->journalOff<iHdrOff ){
+      rc = pager_playback_one_page(pPager, &pPager->journalOff, pDone, 1, 1);
+    }
+    assert( rc!=SQLITE_DONE );
+  }else{
+    pPager->journalOff = 0;
+  }
+
+  /* Continue rolling back records out of the main journal starting at
+  ** the first journal header seen and continuing until the effective end
+  ** of the main journal file.  Continue to skip out-of-range pages and
+  ** continue adding pages rolled back to pDone.
+  */
+  while( rc==SQLITE_OK && pPager->journalOff<szJ ){
+    u32 ii;            /* Loop counter */
+    u32 nJRec = 0;     /* Number of Journal Records */
+    u32 dummy;
+    rc = readJournalHdr(pPager, 0, szJ, &nJRec, &dummy);
+    assert( rc!=SQLITE_DONE );
+
+    /*
+    ** The "pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff"
+    ** test is related to ticket #2565.  See the discussion in the
+    ** pager_playback() function for additional information.
+    */
+    if( nJRec==0 
+     && pPager->journalHdr+JOURNAL_HDR_SZ(pPager)==pPager->journalOff
+    ){
+      nJRec = (u32)((szJ - pPager->journalOff)/JOURNAL_PG_SZ(pPager));
+    }
+    for(ii=0; rc==SQLITE_OK && ii<nJRec && pPager->journalOff<szJ; ii++){
+      rc = pager_playback_one_page(pPager, &pPager->journalOff, pDone, 1, 1);
+    }
+    assert( rc!=SQLITE_DONE );
+  }
+  assert( rc!=SQLITE_OK || pPager->journalOff>=szJ );
+
+  /* Finally,  rollback pages from the sub-journal.  Page that were
+  ** previously rolled back out of the main journal (and are hence in pDone)
+  ** will be skipped.  Out-of-range pages are also skipped.
+  */
+  if( pSavepoint ){
+    u32 ii;            /* Loop counter */
+    i64 offset = pSavepoint->iSubRec*(4+pPager->pageSize);
+
+    if( pagerUseWal(pPager) ){
+      rc = sqlite3WalSavepointUndo(pPager->pWal, pSavepoint->aWalData);
+    }
+    for(ii=pSavepoint->iSubRec; rc==SQLITE_OK && ii<pPager->nSubRec; ii++){
+      assert( offset==ii*(4+pPager->pageSize) );
+      rc = pager_playback_one_page(pPager, &offset, pDone, 0, 1);
+    }
+    assert( rc!=SQLITE_DONE );
+  }
+
+  sqlite3BitvecDestroy(pDone);
+  if( rc==SQLITE_OK ){
+    pPager->journalOff = szJ;
+  }
+
+  return rc;
+}
+
+/*
+** Change the maximum number of in-memory pages that are allowed.
+*/
+SQLITE_PRIVATE void sqlite3PagerSetCachesize(Pager *pPager, int mxPage){
+  sqlite3PcacheSetCachesize(pPager->pPCache, mxPage);
+}
+
+/*
+** Adjust the robustness of the database to damage due to OS crashes
+** or power failures by changing the number of syncs()s when writing
+** the rollback journal.  There are three levels:
+**
+**    OFF       sqlite3OsSync() is never called.  This is the default
+**              for temporary and transient files.
+**
+**    NORMAL    The journal is synced once before writes begin on the
+**              database.  This is normally adequate protection, but
+**              it is theoretically possible, though very unlikely,
+**              that an inopertune power failure could leave the journal
+**              in a state which would cause damage to the database
+**              when it is rolled back.
+**
+**    FULL      The journal is synced twice before writes begin on the
+**              database (with some additional information - the nRec field
+**              of the journal header - being written in between the two
+**              syncs).  If we assume that writing a
+**              single disk sector is atomic, then this mode provides
+**              assurance that the journal will not be corrupted to the
+**              point of causing damage to the database during rollback.
+**
+** The above is for a rollback-journal mode.  For WAL mode, OFF continues
+** to mean that no syncs ever occur.  NORMAL means that the WAL is synced
+** prior to the start of checkpoint and that the database file is synced
+** at the conclusion of the checkpoint if the entire content of the WAL
+** was written back into the database.  But no sync operations occur for
+** an ordinary commit in NORMAL mode with WAL.  FULL means that the WAL
+** file is synced following each commit operation, in addition to the
+** syncs associated with NORMAL.
+**
+** Do not confuse synchronous=FULL with SQLITE_SYNC_FULL.  The
+** SQLITE_SYNC_FULL macro means to use the MacOSX-style full-fsync
+** using fcntl(F_FULLFSYNC).  SQLITE_SYNC_NORMAL means to do an
+** ordinary fsync() call.  There is no difference between SQLITE_SYNC_FULL
+** and SQLITE_SYNC_NORMAL on platforms other than MacOSX.  But the
+** synchronous=FULL versus synchronous=NORMAL setting determines when
+** the xSync primitive is called and is relevant to all platforms.
+**
+** Numeric values associated with these states are OFF==1, NORMAL=2,
+** and FULL=3.
+*/
+#ifndef SQLITE_OMIT_PAGER_PRAGMAS
+SQLITE_PRIVATE void sqlite3PagerSetSafetyLevel(
+  Pager *pPager,        /* The pager to set safety level for */
+  int level,            /* PRAGMA synchronous.  1=OFF, 2=NORMAL, 3=FULL */  
+  int bFullFsync,       /* PRAGMA fullfsync */
+  int bCkptFullFsync    /* PRAGMA checkpoint_fullfsync */
+){
+  assert( level>=1 && level<=3 );
+  pPager->noSync =  (level==1 || pPager->tempFile) ?1:0;
+  pPager->fullSync = (level==3 && !pPager->tempFile) ?1:0;
+  if( pPager->noSync ){
+    pPager->syncFlags = 0;
+    pPager->ckptSyncFlags = 0;
+  }else if( bFullFsync ){
+    pPager->syncFlags = SQLITE_SYNC_FULL;
+    pPager->ckptSyncFlags = SQLITE_SYNC_FULL;
+  }else if( bCkptFullFsync ){
+    pPager->syncFlags = SQLITE_SYNC_NORMAL;
+    pPager->ckptSyncFlags = SQLITE_SYNC_FULL;
+  }else{
+    pPager->syncFlags = SQLITE_SYNC_NORMAL;
+    pPager->ckptSyncFlags = SQLITE_SYNC_NORMAL;
+  }
+}
+#endif
+
+/*
+** The following global variable is incremented whenever the library
+** attempts to open a temporary file.  This information is used for
+** testing and analysis only.  
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_opentemp_count = 0;
+#endif
+
+/*
+** Open a temporary file.
+**
+** Write the file descriptor into *pFile. Return SQLITE_OK on success 
+** or some other error code if we fail. The OS will automatically 
+** delete the temporary file when it is closed.
+**
+** The flags passed to the VFS layer xOpen() call are those specified
+** by parameter vfsFlags ORed with the following:
+**
+**     SQLITE_OPEN_READWRITE
+**     SQLITE_OPEN_CREATE
+**     SQLITE_OPEN_EXCLUSIVE
+**     SQLITE_OPEN_DELETEONCLOSE
+*/
+static int pagerOpentemp(
+  Pager *pPager,        /* The pager object */
+  sqlite3_file *pFile,  /* Write the file descriptor here */
+  int vfsFlags          /* Flags passed through to the VFS */
+){
+  int rc;               /* Return code */
+
+#ifdef SQLITE_TEST
+  sqlite3_opentemp_count++;  /* Used for testing and analysis only */
+#endif
+
+  vfsFlags |=  SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE |
+            SQLITE_OPEN_EXCLUSIVE | SQLITE_OPEN_DELETEONCLOSE;
+  rc = sqlite3OsOpen(pPager->pVfs, 0, pFile, vfsFlags, 0);
+  assert( rc!=SQLITE_OK || isOpen(pFile) );
+  return rc;
+}
+
+/*
+** Set the busy handler function.
+**
+** The pager invokes the busy-handler if sqlite3OsLock() returns 
+** SQLITE_BUSY when trying to upgrade from no-lock to a SHARED lock,
+** or when trying to upgrade from a RESERVED lock to an EXCLUSIVE 
+** lock. It does *not* invoke the busy handler when upgrading from
+** SHARED to RESERVED, or when upgrading from SHARED to EXCLUSIVE
+** (which occurs during hot-journal rollback). Summary:
+**
+**   Transition                        | Invokes xBusyHandler
+**   --------------------------------------------------------
+**   NO_LOCK       -> SHARED_LOCK      | Yes
+**   SHARED_LOCK   -> RESERVED_LOCK    | No
+**   SHARED_LOCK   -> EXCLUSIVE_LOCK   | No
+**   RESERVED_LOCK -> EXCLUSIVE_LOCK   | Yes
+**
+** If the busy-handler callback returns non-zero, the lock is 
+** retried. If it returns zero, then the SQLITE_BUSY error is
+** returned to the caller of the pager API function.
+*/
+SQLITE_PRIVATE void sqlite3PagerSetBusyhandler(
+  Pager *pPager,                       /* Pager object */
+  int (*xBusyHandler)(void *),         /* Pointer to busy-handler function */
+  void *pBusyHandlerArg                /* Argument to pass to xBusyHandler */
+){  
+  pPager->xBusyHandler = xBusyHandler;
+  pPager->pBusyHandlerArg = pBusyHandlerArg;
+}
+
+/*
+** Change the page size used by the Pager object. The new page size 
+** is passed in *pPageSize.
+**
+** If the pager is in the error state when this function is called, it
+** is a no-op. The value returned is the error state error code (i.e. 
+** one of SQLITE_IOERR, an SQLITE_IOERR_xxx sub-code or SQLITE_FULL).
+**
+** Otherwise, if all of the following are true:
+**
+**   * the new page size (value of *pPageSize) is valid (a power 
+**     of two between 512 and SQLITE_MAX_PAGE_SIZE, inclusive), and
+**
+**   * there are no outstanding page references, and
+**
+**   * the database is either not an in-memory database or it is
+**     an in-memory database that currently consists of zero pages.
+**
+** then the pager object page size is set to *pPageSize.
+**
+** If the page size is changed, then this function uses sqlite3PagerMalloc() 
+** to obtain a new Pager.pTmpSpace buffer. If this allocation attempt 
+** fails, SQLITE_NOMEM is returned and the page size remains unchanged. 
+** In all other cases, SQLITE_OK is returned.
+**
+** If the page size is not changed, either because one of the enumerated
+** conditions above is not true, the pager was in error state when this
+** function was called, or because the memory allocation attempt failed, 
+** then *pPageSize is set to the old, retained page size before returning.
+*/
+SQLITE_PRIVATE int sqlite3PagerSetPagesize(Pager *pPager, u32 *pPageSize, int nReserve){
+  int rc = SQLITE_OK;
+
+  /* It is not possible to do a full assert_pager_state() here, as this
+  ** function may be called from within PagerOpen(), before the state
+  ** of the Pager object is internally consistent.
+  **
+  ** At one point this function returned an error if the pager was in 
+  ** PAGER_ERROR state. But since PAGER_ERROR state guarantees that
+  ** there is at least one outstanding page reference, this function
+  ** is a no-op for that case anyhow.
+  */
+
+  u32 pageSize = *pPageSize;
+  assert( pageSize==0 || (pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE) );
+  if( (pPager->memDb==0 || pPager->dbSize==0)
+   && sqlite3PcacheRefCount(pPager->pPCache)==0 
+   && pageSize && pageSize!=(u32)pPager->pageSize 
+  ){
+    char *pNew = NULL;             /* New temp space */
+    i64 nByte = 0;
+
+    if( pPager->eState>PAGER_OPEN && isOpen(pPager->fd) ){
+      rc = sqlite3OsFileSize(pPager->fd, &nByte);
+    }
+    if( rc==SQLITE_OK ){
+      pNew = (char *)sqlite3PageMalloc(pageSize);
+      if( !pNew ) rc = SQLITE_NOMEM;
+    }
+
+    if( rc==SQLITE_OK ){
+      pager_reset(pPager);
+      pPager->dbSize = (Pgno)(nByte/pageSize);
+      pPager->pageSize = pageSize;
+      sqlite3PageFree(pPager->pTmpSpace);
+      pPager->pTmpSpace = pNew;
+      sqlite3PcacheSetPageSize(pPager->pPCache, pageSize);
+    }
+  }
+
+  *pPageSize = pPager->pageSize;
+  if( rc==SQLITE_OK ){
+    if( nReserve<0 ) nReserve = pPager->nReserve;
+    assert( nReserve>=0 && nReserve<1000 );
+    pPager->nReserve = (i16)nReserve;
+    pagerReportSize(pPager);
+  }
+  return rc;
+}
+
+/*
+** Return a pointer to the "temporary page" buffer held internally
+** by the pager.  This is a buffer that is big enough to hold the
+** entire content of a database page.  This buffer is used internally
+** during rollback and will be overwritten whenever a rollback
+** occurs.  But other modules are free to use it too, as long as
+** no rollbacks are happening.
+*/
+SQLITE_PRIVATE void *sqlite3PagerTempSpace(Pager *pPager){
+  return pPager->pTmpSpace;
+}
+
+/*
+** Attempt to set the maximum database page count if mxPage is positive. 
+** Make no changes if mxPage is zero or negative.  And never reduce the
+** maximum page count below the current size of the database.
+**
+** Regardless of mxPage, return the current maximum page count.
+*/
+SQLITE_PRIVATE int sqlite3PagerMaxPageCount(Pager *pPager, int mxPage){
+  if( mxPage>0 ){
+    pPager->mxPgno = mxPage;
+  }
+  assert( pPager->eState!=PAGER_OPEN );      /* Called only by OP_MaxPgcnt */
+  assert( pPager->mxPgno>=pPager->dbSize );  /* OP_MaxPgcnt enforces this */
+  return pPager->mxPgno;
+}
+
+/*
+** The following set of routines are used to disable the simulated
+** I/O error mechanism.  These routines are used to avoid simulated
+** errors in places where we do not care about errors.
+**
+** Unless -DSQLITE_TEST=1 is used, these routines are all no-ops
+** and generate no code.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API extern int sqlite3_io_error_pending;
+SQLITE_API extern int sqlite3_io_error_hit;
+static int saved_cnt;
+void disable_simulated_io_errors(void){
+  saved_cnt = sqlite3_io_error_pending;
+  sqlite3_io_error_pending = -1;
+}
+void enable_simulated_io_errors(void){
+  sqlite3_io_error_pending = saved_cnt;
+}
+#else
+# define disable_simulated_io_errors()
+# define enable_simulated_io_errors()
+#endif
+
+/*
+** Read the first N bytes from the beginning of the file into memory
+** that pDest points to. 
+**
+** If the pager was opened on a transient file (zFilename==""), or
+** opened on a file less than N bytes in size, the output buffer is
+** zeroed and SQLITE_OK returned. The rationale for this is that this 
+** function is used to read database headers, and a new transient or
+** zero sized database has a header than consists entirely of zeroes.
+**
+** If any IO error apart from SQLITE_IOERR_SHORT_READ is encountered,
+** the error code is returned to the caller and the contents of the
+** output buffer undefined.
+*/
+SQLITE_PRIVATE int sqlite3PagerReadFileheader(Pager *pPager, int N, unsigned char *pDest){
+  int rc = SQLITE_OK;
+  memset(pDest, 0, N);
+  assert( isOpen(pPager->fd) || pPager->tempFile );
+
+  /* This routine is only called by btree immediately after creating
+  ** the Pager object.  There has not been an opportunity to transition
+  ** to WAL mode yet.
+  */
+  assert( !pagerUseWal(pPager) );
+
+  if( isOpen(pPager->fd) ){
+    IOTRACE(("DBHDR %p 0 %d\n", pPager, N))
+    rc = sqlite3OsRead(pPager->fd, pDest, N, 0);
+    if( rc==SQLITE_IOERR_SHORT_READ ){
+      rc = SQLITE_OK;
+    }
+  }
+  return rc;
+}
+
+/*
+** This function may only be called when a read-transaction is open on
+** the pager. It returns the total number of pages in the database.
+**
+** However, if the file is between 1 and <page-size> bytes in size, then 
+** this is considered a 1 page file.
+*/
+SQLITE_PRIVATE void sqlite3PagerPagecount(Pager *pPager, int *pnPage){
+  assert( pPager->eState>=PAGER_READER );
+  assert( pPager->eState!=PAGER_WRITER_FINISHED );
+  *pnPage = (int)pPager->dbSize;
+}
+
+
+/*
+** Try to obtain a lock of type locktype on the database file. If
+** a similar or greater lock is already held, this function is a no-op
+** (returning SQLITE_OK immediately).
+**
+** Otherwise, attempt to obtain the lock using sqlite3OsLock(). Invoke 
+** the busy callback if the lock is currently not available. Repeat 
+** until the busy callback returns false or until the attempt to 
+** obtain the lock succeeds.
+**
+** Return SQLITE_OK on success and an error code if we cannot obtain
+** the lock. If the lock is obtained successfully, set the Pager.state 
+** variable to locktype before returning.
+*/
+static int pager_wait_on_lock(Pager *pPager, int locktype){
+  int rc;                              /* Return code */
+
+  /* Check that this is either a no-op (because the requested lock is 
+  ** already held, or one of the transistions that the busy-handler
+  ** may be invoked during, according to the comment above
+  ** sqlite3PagerSetBusyhandler().
+  */
+  assert( (pPager->eLock>=locktype)
+       || (pPager->eLock==NO_LOCK && locktype==SHARED_LOCK)
+       || (pPager->eLock==RESERVED_LOCK && locktype==EXCLUSIVE_LOCK)
+  );
+
+  do {
+    rc = pagerLockDb(pPager, locktype);
+  }while( rc==SQLITE_BUSY && pPager->xBusyHandler(pPager->pBusyHandlerArg) );
+  return rc;
+}
+
+/*
+** Function assertTruncateConstraint(pPager) checks that one of the 
+** following is true for all dirty pages currently in the page-cache:
+**
+**   a) The page number is less than or equal to the size of the 
+**      current database image, in pages, OR
+**
+**   b) if the page content were written at this time, it would not
+**      be necessary to write the current content out to the sub-journal
+**      (as determined by function subjRequiresPage()).
+**
+** If the condition asserted by this function were not true, and the
+** dirty page were to be discarded from the cache via the pagerStress()
+** routine, pagerStress() would not write the current page content to
+** the database file. If a savepoint transaction were rolled back after
+** this happened, the correct behaviour would be to restore the current
+** content of the page. However, since this content is not present in either
+** the database file or the portion of the rollback journal and 
+** sub-journal rolled back the content could not be restored and the
+** database image would become corrupt. It is therefore fortunate that 
+** this circumstance cannot arise.
+*/
+#if defined(SQLITE_DEBUG)
+static void assertTruncateConstraintCb(PgHdr *pPg){
+  assert( pPg->flags&PGHDR_DIRTY );
+  assert( !subjRequiresPage(pPg) || pPg->pgno<=pPg->pPager->dbSize );
+}
+static void assertTruncateConstraint(Pager *pPager){
+  sqlite3PcacheIterateDirty(pPager->pPCache, assertTruncateConstraintCb);
+}
+#else
+# define assertTruncateConstraint(pPager)
+#endif
+
+/*
+** Truncate the in-memory database file image to nPage pages. This 
+** function does not actually modify the database file on disk. It 
+** just sets the internal state of the pager object so that the 
+** truncation will be done when the current transaction is committed.
+*/
+SQLITE_PRIVATE void sqlite3PagerTruncateImage(Pager *pPager, Pgno nPage){
+  assert( pPager->dbSize>=nPage );
+  assert( pPager->eState>=PAGER_WRITER_CACHEMOD );
+  pPager->dbSize = nPage;
+  assertTruncateConstraint(pPager);
+}
+
+
+/*
+** This function is called before attempting a hot-journal rollback. It
+** syncs the journal file to disk, then sets pPager->journalHdr to the
+** size of the journal file so that the pager_playback() routine knows
+** that the entire journal file has been synced.
+**
+** Syncing a hot-journal to disk before attempting to roll it back ensures 
+** that if a power-failure occurs during the rollback, the process that
+** attempts rollback following system recovery sees the same journal
+** content as this process.
+**
+** If everything goes as planned, SQLITE_OK is returned. Otherwise, 
+** an SQLite error code.
+*/
+static int pagerSyncHotJournal(Pager *pPager){
+  int rc = SQLITE_OK;
+  if( !pPager->noSync ){
+    rc = sqlite3OsSync(pPager->jfd, SQLITE_SYNC_NORMAL);
+  }
+  if( rc==SQLITE_OK ){
+    rc = sqlite3OsFileSize(pPager->jfd, &pPager->journalHdr);
+  }
+  return rc;
+}
+
+/*
+** Shutdown the page cache.  Free all memory and close all files.
+**
+** If a transaction was in progress when this routine is called, that
+** transaction is rolled back.  All outstanding pages are invalidated
+** and their memory is freed.  Any attempt to use a page associated
+** with this page cache after this function returns will likely
+** result in a coredump.
+**
+** This function always succeeds. If a transaction is active an attempt
+** is made to roll it back. If an error occurs during the rollback 
+** a hot journal may be left in the filesystem but no error is returned
+** to the caller.
+*/
+SQLITE_PRIVATE int sqlite3PagerClose(Pager *pPager){
+  u8 *pTmp = (u8 *)pPager->pTmpSpace;
+
+  disable_simulated_io_errors();
+  sqlite3BeginBenignMalloc();
+  /* pPager->errCode = 0; */
+  pPager->exclusiveMode = 0;
+#ifndef SQLITE_OMIT_WAL
+  sqlite3WalClose(pPager->pWal, pPager->ckptSyncFlags, pPager->pageSize, pTmp);
+  pPager->pWal = 0;
+#endif
+  pager_reset(pPager);
+  if( MEMDB ){
+    pager_unlock(pPager);
+  }else{
+    /* If it is open, sync the journal file before calling UnlockAndRollback.
+    ** If this is not done, then an unsynced portion of the open journal 
+    ** file may be played back into the database. If a power failure occurs 
+    ** while this is happening, the database could become corrupt.
+    **
+    ** If an error occurs while trying to sync the journal, shift the pager
+    ** into the ERROR state. This causes UnlockAndRollback to unlock the
+    ** database and close the journal file without attempting to roll it
+    ** back or finalize it. The next database user will have to do hot-journal
+    ** rollback before accessing the database file.
+    */
+    if( isOpen(pPager->jfd) ){
+      pager_error(pPager, pagerSyncHotJournal(pPager));
+    }
+    pagerUnlockAndRollback(pPager);
+  }
+  sqlite3EndBenignMalloc();
+  enable_simulated_io_errors();
+  PAGERTRACE(("CLOSE %d\n", PAGERID(pPager)));
+  IOTRACE(("CLOSE %p\n", pPager))
+  sqlite3OsClose(pPager->jfd);
+  sqlite3OsClose(pPager->fd);
+  sqlite3PageFree(pTmp);
+  sqlite3PcacheClose(pPager->pPCache);
+
+#ifdef SQLITE_HAS_CODEC
+  if( pPager->xCodecFree ) pPager->xCodecFree(pPager->pCodec);
+#endif
+
+  assert( !pPager->aSavepoint && !pPager->pInJournal );
+  assert( !isOpen(pPager->jfd) && !isOpen(pPager->sjfd) );
+
+  sqlite3_free(pPager);
+  return SQLITE_OK;
+}
+
+#if !defined(NDEBUG) || defined(SQLITE_TEST)
+/*
+** Return the page number for page pPg.
+*/
+SQLITE_PRIVATE Pgno sqlite3PagerPagenumber(DbPage *pPg){
+  return pPg->pgno;
+}
+#endif
+
+/*
+** Increment the reference count for page pPg.
+*/
+SQLITE_PRIVATE void sqlite3PagerRef(DbPage *pPg){
+  sqlite3PcacheRef(pPg);
+}
+
+/*
+** Sync the journal. In other words, make sure all the pages that have
+** been written to the journal have actually reached the surface of the
+** disk and can be restored in the event of a hot-journal rollback.
+**
+** If the Pager.noSync flag is set, then this function is a no-op.
+** Otherwise, the actions required depend on the journal-mode and the 
+** device characteristics of the the file-system, as follows:
+**
+**   * If the journal file is an in-memory journal file, no action need
+**     be taken.
+**
+**   * Otherwise, if the device does not support the SAFE_APPEND property,
+**     then the nRec field of the most recently written journal header
+**     is updated to contain the number of journal records that have
+**     been written following it. If the pager is operating in full-sync
+**     mode, then the journal file is synced before this field is updated.
+**
+**   * If the device does not support the SEQUENTIAL property, then 
+**     journal file is synced.
+**
+** Or, in pseudo-code:
+**
+**   if( NOT <in-memory journal> ){
+**     if( NOT SAFE_APPEND ){
+**       if( <full-sync mode> ) xSync(<journal file>);
+**       <update nRec field>
+**     } 
+**     if( NOT SEQUENTIAL ) xSync(<journal file>);
+**   }
+**
+** If successful, this routine clears the PGHDR_NEED_SYNC flag of every 
+** page currently held in memory before returning SQLITE_OK. If an IO
+** error is encountered, then the IO error code is returned to the caller.
+*/
+static int syncJournal(Pager *pPager, int newHdr){
+  int rc;                         /* Return code */
+
+  assert( pPager->eState==PAGER_WRITER_CACHEMOD
+       || pPager->eState==PAGER_WRITER_DBMOD
+  );
+  assert( assert_pager_state(pPager) );
+  assert( !pagerUseWal(pPager) );
+
+  rc = sqlite3PagerExclusiveLock(pPager);
+  if( rc!=SQLITE_OK ) return rc;
+
+  if( !pPager->noSync ){
+    assert( !pPager->tempFile );
+    if( isOpen(pPager->jfd) && pPager->journalMode!=PAGER_JOURNALMODE_MEMORY ){
+      const int iDc = sqlite3OsDeviceCharacteristics(pPager->fd);
+      assert( isOpen(pPager->jfd) );
+
+      if( 0==(iDc&SQLITE_IOCAP_SAFE_APPEND) ){
+        /* This block deals with an obscure problem. If the last connection
+        ** that wrote to this database was operating in persistent-journal
+        ** mode, then the journal file may at this point actually be larger
+        ** than Pager.journalOff bytes. If the next thing in the journal
+        ** file happens to be a journal-header (written as part of the
+        ** previous connection's transaction), and a crash or power-failure 
+        ** occurs after nRec is updated but before this connection writes 
+        ** anything else to the journal file (or commits/rolls back its 
+        ** transaction), then SQLite may become confused when doing the 
+        ** hot-journal rollback following recovery. It may roll back all
+        ** of this connections data, then proceed to rolling back the old,
+        ** out-of-date data that follows it. Database corruption.
+        **
+        ** To work around this, if the journal file does appear to contain
+        ** a valid header following Pager.journalOff, then write a 0x00
+        ** byte to the start of it to prevent it from being recognized.
+        **
+        ** Variable iNextHdrOffset is set to the offset at which this
+        ** problematic header will occur, if it exists. aMagic is used 
+        ** as a temporary buffer to inspect the first couple of bytes of
+        ** the potential journal header.
+        */
+        i64 iNextHdrOffset;
+        u8 aMagic[8];
+        u8 zHeader[sizeof(aJournalMagic)+4];
+
+        memcpy(zHeader, aJournalMagic, sizeof(aJournalMagic));
+        put32bits(&zHeader[sizeof(aJournalMagic)], pPager->nRec);
+
+        iNextHdrOffset = journalHdrOffset(pPager);
+        rc = sqlite3OsRead(pPager->jfd, aMagic, 8, iNextHdrOffset);
+        if( rc==SQLITE_OK && 0==memcmp(aMagic, aJournalMagic, 8) ){
+          static const u8 zerobyte = 0;
+          rc = sqlite3OsWrite(pPager->jfd, &zerobyte, 1, iNextHdrOffset);
+        }
+        if( rc!=SQLITE_OK && rc!=SQLITE_IOERR_SHORT_READ ){
+          return rc;
+        }
+
+        /* Write the nRec value into the journal file header. If in
+        ** full-synchronous mode, sync the journal first. This ensures that
+        ** all data has really hit the disk before nRec is updated to mark
+        ** it as a candidate for rollback.
+        **
+        ** This is not required if the persistent media supports the
+        ** SAFE_APPEND property. Because in this case it is not possible 
+        ** for garbage data to be appended to the file, the nRec field
+        ** is populated with 0xFFFFFFFF when the journal header is written
+        ** and never needs to be updated.
+        */
+        if( pPager->fullSync && 0==(iDc&SQLITE_IOCAP_SEQUENTIAL) ){
+          PAGERTRACE(("SYNC journal of %d\n", PAGERID(pPager)));
+          IOTRACE(("JSYNC %p\n", pPager))
+          rc = sqlite3OsSync(pPager->jfd, pPager->syncFlags);
+          if( rc!=SQLITE_OK ) return rc;
+        }
+        IOTRACE(("JHDR %p %lld\n", pPager, pPager->journalHdr));
+        rc = sqlite3OsWrite(
+            pPager->jfd, zHeader, sizeof(zHeader), pPager->journalHdr
+        );
+        if( rc!=SQLITE_OK ) return rc;
+      }
+      if( 0==(iDc&SQLITE_IOCAP_SEQUENTIAL) ){
+        PAGERTRACE(("SYNC journal of %d\n", PAGERID(pPager)));
+        IOTRACE(("JSYNC %p\n", pPager))
+        rc = sqlite3OsSync(pPager->jfd, pPager->syncFlags| 
+          (pPager->syncFlags==SQLITE_SYNC_FULL?SQLITE_SYNC_DATAONLY:0)
+        );
+        if( rc!=SQLITE_OK ) return rc;
+      }
+
+      pPager->journalHdr = pPager->journalOff;
+      if( newHdr && 0==(iDc&SQLITE_IOCAP_SAFE_APPEND) ){
+        pPager->nRec = 0;
+        rc = writeJournalHdr(pPager);
+        if( rc!=SQLITE_OK ) return rc;
+      }
+    }else{
+      pPager->journalHdr = pPager->journalOff;
+    }
+  }
+
+  /* Unless the pager is in noSync mode, the journal file was just 
+  ** successfully synced. Either way, clear the PGHDR_NEED_SYNC flag on 
+  ** all pages.
+  */
+  sqlite3PcacheClearSyncFlags(pPager->pPCache);
+  pPager->eState = PAGER_WRITER_DBMOD;
+  assert( assert_pager_state(pPager) );
+  return SQLITE_OK;
+}
+
+/*
+** The argument is the first in a linked list of dirty pages connected
+** by the PgHdr.pDirty pointer. This function writes each one of the
+** in-memory pages in the list to the database file. The argument may
+** be NULL, representing an empty list. In this case this function is
+** a no-op.
+**
+** The pager must hold at least a RESERVED lock when this function
+** is called. Before writing anything to the database file, this lock
+** is upgraded to an EXCLUSIVE lock. If the lock cannot be obtained,
+** SQLITE_BUSY is returned and no data is written to the database file.
+** 
+** If the pager is a temp-file pager and the actual file-system file
+** is not yet open, it is created and opened before any data is 
+** written out.
+**
+** Once the lock has been upgraded and, if necessary, the file opened,
+** the pages are written out to the database file in list order. Writing
+** a page is skipped if it meets either of the following criteria:
+**
+**   * The page number is greater than Pager.dbSize, or
+**   * The PGHDR_DONT_WRITE flag is set on the page.
+**
+** If writing out a page causes the database file to grow, Pager.dbFileSize
+** is updated accordingly. If page 1 is written out, then the value cached
+** in Pager.dbFileVers[] is updated to match the new value stored in
+** the database file.
+**
+** If everything is successful, SQLITE_OK is returned. If an IO error 
+** occurs, an IO error code is returned. Or, if the EXCLUSIVE lock cannot
+** be obtained, SQLITE_BUSY is returned.
+*/
+static int pager_write_pagelist(Pager *pPager, PgHdr *pList){
+  int rc = SQLITE_OK;                  /* Return code */
+
+  /* This function is only called for rollback pagers in WRITER_DBMOD state. */
+  assert( !pagerUseWal(pPager) );
+  assert( pPager->eState==PAGER_WRITER_DBMOD );
+  assert( pPager->eLock==EXCLUSIVE_LOCK );
+
+  /* If the file is a temp-file has not yet been opened, open it now. It
+  ** is not possible for rc to be other than SQLITE_OK if this branch
+  ** is taken, as pager_wait_on_lock() is a no-op for temp-files.
+  */
+  if( !isOpen(pPager->fd) ){
+    assert( pPager->tempFile && rc==SQLITE_OK );
+    rc = pagerOpentemp(pPager, pPager->fd, pPager->vfsFlags);
+  }
+
+  /* Before the first write, give the VFS a hint of what the final
+  ** file size will be.
+  */
+  assert( rc!=SQLITE_OK || isOpen(pPager->fd) );
+  if( rc==SQLITE_OK && pPager->dbSize>pPager->dbHintSize ){
+    sqlite3_int64 szFile = pPager->pageSize * (sqlite3_int64)pPager->dbSize;
+    sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SIZE_HINT, &szFile);
+    pPager->dbHintSize = pPager->dbSize;
+  }
+
+  while( rc==SQLITE_OK && pList ){
+    Pgno pgno = pList->pgno;
+
+    /* If there are dirty pages in the page cache with page numbers greater
+    ** than Pager.dbSize, this means sqlite3PagerTruncateImage() was called to
+    ** make the file smaller (presumably by auto-vacuum code). Do not write
+    ** any such pages to the file.
+    **
+    ** Also, do not write out any page that has the PGHDR_DONT_WRITE flag
+    ** set (set by sqlite3PagerDontWrite()).
+    */
+    if( pgno<=pPager->dbSize && 0==(pList->flags&PGHDR_DONT_WRITE) ){
+      i64 offset = (pgno-1)*(i64)pPager->pageSize;   /* Offset to write */
+      char *pData;                                   /* Data to write */    
+
+      assert( (pList->flags&PGHDR_NEED_SYNC)==0 );
+      if( pList->pgno==1 ) pager_write_changecounter(pList);
+
+      /* Encode the database */
+      CODEC2(pPager, pList->pData, pgno, 6, return SQLITE_NOMEM, pData);
+
+      /* Write out the page data. */
+      rc = sqlite3OsWrite(pPager->fd, pData, pPager->pageSize, offset);
+
+      /* If page 1 was just written, update Pager.dbFileVers to match
+      ** the value now stored in the database file. If writing this 
+      ** page caused the database file to grow, update dbFileSize. 
+      */
+      if( pgno==1 ){
+        memcpy(&pPager->dbFileVers, &pData[24], sizeof(pPager->dbFileVers));
+      }
+      if( pgno>pPager->dbFileSize ){
+        pPager->dbFileSize = pgno;
+      }
+
+      /* Update any backup objects copying the contents of this pager. */
+      sqlite3BackupUpdate(pPager->pBackup, pgno, (u8*)pList->pData);
+
+      PAGERTRACE(("STORE %d page %d hash(%08x)\n",
+                   PAGERID(pPager), pgno, pager_pagehash(pList)));
+      IOTRACE(("PGOUT %p %d\n", pPager, pgno));
+      PAGER_INCR(sqlite3_pager_writedb_count);
+      PAGER_INCR(pPager->nWrite);
+    }else{
+      PAGERTRACE(("NOSTORE %d page %d\n", PAGERID(pPager), pgno));
+    }
+    pager_set_pagehash(pList);
+    pList = pList->pDirty;
+  }
+
+  return rc;
+}
+
+/*
+** Ensure that the sub-journal file is open. If it is already open, this 
+** function is a no-op.
+**
+** SQLITE_OK is returned if everything goes according to plan. An 
+** SQLITE_IOERR_XXX error code is returned if a call to sqlite3OsOpen() 
+** fails.
+*/
+static int openSubJournal(Pager *pPager){
+  int rc = SQLITE_OK;
+  if( !isOpen(pPager->sjfd) ){
+    if( pPager->journalMode==PAGER_JOURNALMODE_MEMORY || pPager->subjInMemory ){
+      sqlite3MemJournalOpen(pPager->sjfd);
+    }else{
+      rc = pagerOpentemp(pPager, pPager->sjfd, SQLITE_OPEN_SUBJOURNAL);
+    }
+  }
+  return rc;
+}
+
+/*
+** Append a record of the current state of page pPg to the sub-journal. 
+** It is the callers responsibility to use subjRequiresPage() to check 
+** that it is really required before calling this function.
+**
+** If successful, set the bit corresponding to pPg->pgno in the bitvecs
+** for all open savepoints before returning.
+**
+** This function returns SQLITE_OK if everything is successful, an IO
+** error code if the attempt to write to the sub-journal fails, or 
+** SQLITE_NOMEM if a malloc fails while setting a bit in a savepoint
+** bitvec.
+*/
+static int subjournalPage(PgHdr *pPg){
+  int rc = SQLITE_OK;
+  Pager *pPager = pPg->pPager;
+  if( pPager->journalMode!=PAGER_JOURNALMODE_OFF ){
+
+    /* Open the sub-journal, if it has not already been opened */
+    assert( pPager->useJournal );
+    assert( isOpen(pPager->jfd) || pagerUseWal(pPager) );
+    assert( isOpen(pPager->sjfd) || pPager->nSubRec==0 );
+    assert( pagerUseWal(pPager) 
+         || pageInJournal(pPg) 
+         || pPg->pgno>pPager->dbOrigSize 
+    );
+    rc = openSubJournal(pPager);
+
+    /* If the sub-journal was opened successfully (or was already open),
+    ** write the journal record into the file.  */
+    if( rc==SQLITE_OK ){
+      void *pData = pPg->pData;
+      i64 offset = pPager->nSubRec*(4+pPager->pageSize);
+      char *pData2;
+  
+      CODEC2(pPager, pData, pPg->pgno, 7, return SQLITE_NOMEM, pData2);
+      PAGERTRACE(("STMT-JOURNAL %d page %d\n", PAGERID(pPager), pPg->pgno));
+      rc = write32bits(pPager->sjfd, offset, pPg->pgno);
+      if( rc==SQLITE_OK ){
+        rc = sqlite3OsWrite(pPager->sjfd, pData2, pPager->pageSize, offset+4);
+      }
+    }
+  }
+  if( rc==SQLITE_OK ){
+    pPager->nSubRec++;
+    assert( pPager->nSavepoint>0 );
+    rc = addToSavepointBitvecs(pPager, pPg->pgno);
+  }
+  return rc;
+}
+
+/*
+** This function is called by the pcache layer when it has reached some
+** soft memory limit. The first argument is a pointer to a Pager object
+** (cast as a void*). The pager is always 'purgeable' (not an in-memory
+** database). The second argument is a reference to a page that is 
+** currently dirty but has no outstanding references. The page
+** is always associated with the Pager object passed as the first 
+** argument.
+**
+** The job of this function is to make pPg clean by writing its contents
+** out to the database file, if possible. This may involve syncing the
+** journal file. 
+**
+** If successful, sqlite3PcacheMakeClean() is called on the page and
+** SQLITE_OK returned. If an IO error occurs while trying to make the
+** page clean, the IO error code is returned. If the page cannot be
+** made clean for some other reason, but no error occurs, then SQLITE_OK
+** is returned by sqlite3PcacheMakeClean() is not called.
+*/
+static int pagerStress(void *p, PgHdr *pPg){
+  Pager *pPager = (Pager *)p;
+  int rc = SQLITE_OK;
+
+  assert( pPg->pPager==pPager );
+  assert( pPg->flags&PGHDR_DIRTY );
+
+  /* The doNotSyncSpill flag is set during times when doing a sync of
+  ** journal (and adding a new header) is not allowed.  This occurs
+  ** during calls to sqlite3PagerWrite() while trying to journal multiple
+  ** pages belonging to the same sector.
+  **
+  ** The doNotSpill flag inhibits all cache spilling regardless of whether
+  ** or not a sync is required.  This is set during a rollback.
+  **
+  ** Spilling is also prohibited when in an error state since that could
+  ** lead to database corruption.   In the current implementaton it 
+  ** is impossible for sqlite3PCacheFetch() to be called with createFlag==1
+  ** while in the error state, hence it is impossible for this routine to
+  ** be called in the error state.  Nevertheless, we include a NEVER()
+  ** test for the error state as a safeguard against future changes.
+  */
+  if( NEVER(pPager->errCode) ) return SQLITE_OK;
+  if( pPager->doNotSpill ) return SQLITE_OK;
+  if( pPager->doNotSyncSpill && (pPg->flags & PGHDR_NEED_SYNC)!=0 ){
+    return SQLITE_OK;
+  }
+
+  pPg->pDirty = 0;
+  if( pagerUseWal(pPager) ){
+    /* Write a single frame for this page to the log. */
+    if( subjRequiresPage(pPg) ){ 
+      rc = subjournalPage(pPg); 
+    }
+    if( rc==SQLITE_OK ){
+      rc = pagerWalFrames(pPager, pPg, 0, 0, 0);
+    }
+  }else{
+  
+    /* Sync the journal file if required. */
+    if( pPg->flags&PGHDR_NEED_SYNC 
+     || pPager->eState==PAGER_WRITER_CACHEMOD
+    ){
+      rc = syncJournal(pPager, 1);
+    }
+  
+    /* If the page number of this page is larger than the current size of
+    ** the database image, it may need to be written to the sub-journal.
+    ** This is because the call to pager_write_pagelist() below will not
+    ** actually write data to the file in this case.
+    **
+    ** Consider the following sequence of events:
+    **
+    **   BEGIN;
+    **     <journal page X>
+    **     <modify page X>
+    **     SAVEPOINT sp;
+    **       <shrink database file to Y pages>
+    **       pagerStress(page X)
+    **     ROLLBACK TO sp;
+    **
+    ** If (X>Y), then when pagerStress is called page X will not be written
+    ** out to the database file, but will be dropped from the cache. Then,
+    ** following the "ROLLBACK TO sp" statement, reading page X will read
+    ** data from the database file. This will be the copy of page X as it
+    ** was when the transaction started, not as it was when "SAVEPOINT sp"
+    ** was executed.
+    **
+    ** The solution is to write the current data for page X into the 
+    ** sub-journal file now (if it is not already there), so that it will
+    ** be restored to its current value when the "ROLLBACK TO sp" is 
+    ** executed.
+    */
+    if( NEVER(
+        rc==SQLITE_OK && pPg->pgno>pPager->dbSize && subjRequiresPage(pPg)
+    ) ){
+      rc = subjournalPage(pPg);
+    }
+  
+    /* Write the contents of the page out to the database file. */
+    if( rc==SQLITE_OK ){
+      assert( (pPg->flags&PGHDR_NEED_SYNC)==0 );
+      rc = pager_write_pagelist(pPager, pPg);
+    }
+  }
+
+  /* Mark the page as clean. */
+  if( rc==SQLITE_OK ){
+    PAGERTRACE(("STRESS %d page %d\n", PAGERID(pPager), pPg->pgno));
+    sqlite3PcacheMakeClean(pPg);
+  }
+
+  return pager_error(pPager, rc); 
+}
+
+
+/*
+** Allocate and initialize a new Pager object and put a pointer to it
+** in *ppPager. The pager should eventually be freed by passing it
+** to sqlite3PagerClose().
+**
+** The zFilename argument is the path to the database file to open.
+** If zFilename is NULL then a randomly-named temporary file is created
+** and used as the file to be cached. Temporary files are be deleted
+** automatically when they are closed. If zFilename is ":memory:" then 
+** all information is held in cache. It is never written to disk. 
+** This can be used to implement an in-memory database.
+**
+** The nExtra parameter specifies the number of bytes of space allocated
+** along with each page reference. This space is available to the user
+** via the sqlite3PagerGetExtra() API.
+**
+** The flags argument is used to specify properties that affect the
+** operation of the pager. It should be passed some bitwise combination
+** of the PAGER_OMIT_JOURNAL and PAGER_NO_READLOCK flags.
+**
+** The vfsFlags parameter is a bitmask to pass to the flags parameter
+** of the xOpen() method of the supplied VFS when opening files. 
+**
+** If the pager object is allocated and the specified file opened 
+** successfully, SQLITE_OK is returned and *ppPager set to point to
+** the new pager object. If an error occurs, *ppPager is set to NULL
+** and error code returned. This function may return SQLITE_NOMEM
+** (sqlite3Malloc() is used to allocate memory), SQLITE_CANTOPEN or 
+** various SQLITE_IO_XXX errors.
+*/
+SQLITE_PRIVATE int sqlite3PagerOpen(
+  sqlite3_vfs *pVfs,       /* The virtual file system to use */
+  Pager **ppPager,         /* OUT: Return the Pager structure here */
+  const char *zFilename,   /* Name of the database file to open */
+  int nExtra,              /* Extra bytes append to each in-memory page */
+  int flags,               /* flags controlling this file */
+  int vfsFlags,            /* flags passed through to sqlite3_vfs.xOpen() */
+  void (*xReinit)(DbPage*) /* Function to reinitialize pages */
+){
+  u8 *pPtr;
+  Pager *pPager = 0;       /* Pager object to allocate and return */
+  int rc = SQLITE_OK;      /* Return code */
+  int tempFile = 0;        /* True for temp files (incl. in-memory files) */
+  int memDb = 0;           /* True if this is an in-memory file */
+  int readOnly = 0;        /* True if this is a read-only file */
+  int journalFileSize;     /* Bytes to allocate for each journal fd */
+  char *zPathname = 0;     /* Full path to database file */
+  int nPathname = 0;       /* Number of bytes in zPathname */
+  int useJournal = (flags & PAGER_OMIT_JOURNAL)==0; /* False to omit journal */
+  int noReadlock = (flags & PAGER_NO_READLOCK)!=0;  /* True to omit read-lock */
+  int pcacheSize = sqlite3PcacheSize();       /* Bytes to allocate for PCache */
+  u32 szPageDflt = SQLITE_DEFAULT_PAGE_SIZE;  /* Default page size */
+
+  /* Figure out how much space is required for each journal file-handle
+  ** (there are two of them, the main journal and the sub-journal). This
+  ** is the maximum space required for an in-memory journal file handle 
+  ** and a regular journal file-handle. Note that a "regular journal-handle"
+  ** may be a wrapper capable of caching the first portion of the journal
+  ** file in memory to implement the atomic-write optimization (see 
+  ** source file journal.c).
+  */
+  if( sqlite3JournalSize(pVfs)>sqlite3MemJournalSize() ){
+    journalFileSize = ROUND8(sqlite3JournalSize(pVfs));
+  }else{
+    journalFileSize = ROUND8(sqlite3MemJournalSize());
+  }
+
+  /* Set the output variable to NULL in case an error occurs. */
+  *ppPager = 0;
+
+#ifndef SQLITE_OMIT_MEMORYDB
+  if( flags & PAGER_MEMORY ){
+    memDb = 1;
+    zFilename = 0;
+  }
+#endif
+
+  /* Compute and store the full pathname in an allocated buffer pointed
+  ** to by zPathname, length nPathname. Or, if this is a temporary file,
+  ** leave both nPathname and zPathname set to 0.
+  */
+  if( zFilename && zFilename[0] ){
+    nPathname = pVfs->mxPathname+1;
+    zPathname = sqlite3Malloc(nPathname*2);
+    if( zPathname==0 ){
+      return SQLITE_NOMEM;
+    }
+    zPathname[0] = 0; /* Make sure initialized even if FullPathname() fails */
+    rc = sqlite3OsFullPathname(pVfs, zFilename, nPathname, zPathname);
+    nPathname = sqlite3Strlen30(zPathname);
+    if( rc==SQLITE_OK && nPathname+8>pVfs->mxPathname ){
+      /* This branch is taken when the journal path required by
+      ** the database being opened will be more than pVfs->mxPathname
+      ** bytes in length. This means the database cannot be opened,
+      ** as it will not be possible to open the journal file or even
+      ** check for a hot-journal before reading.
+      */
+      rc = SQLITE_CANTOPEN_BKPT;
+    }
+    if( rc!=SQLITE_OK ){
+      sqlite3_free(zPathname);
+      return rc;
+    }
+  }
+
+  /* Allocate memory for the Pager structure, PCache object, the
+  ** three file descriptors, the database file name and the journal 
+  ** file name. The layout in memory is as follows:
+  **
+  **     Pager object                    (sizeof(Pager) bytes)
+  **     PCache object                   (sqlite3PcacheSize() bytes)
+  **     Database file handle            (pVfs->szOsFile bytes)
+  **     Sub-journal file handle         (journalFileSize bytes)
+  **     Main journal file handle        (journalFileSize bytes)
+  **     Database file name              (nPathname+1 bytes)
+  **     Journal file name               (nPathname+8+1 bytes)
+  */
+  pPtr = (u8 *)sqlite3MallocZero(
+    ROUND8(sizeof(*pPager)) +      /* Pager structure */
+    ROUND8(pcacheSize) +           /* PCache object */
+    ROUND8(pVfs->szOsFile) +       /* The main db file */
+    journalFileSize * 2 +          /* The two journal files */ 
+    nPathname + 1 +                /* zFilename */
+    nPathname + 8 + 1              /* zJournal */
+#ifndef SQLITE_OMIT_WAL
+    + nPathname + 4 + 1              /* zWal */
+#endif
+  );
+  assert( EIGHT_BYTE_ALIGNMENT(SQLITE_INT_TO_PTR(journalFileSize)) );
+  if( !pPtr ){
+    sqlite3_free(zPathname);
+    return SQLITE_NOMEM;
+  }
+  pPager =              (Pager*)(pPtr);
+  pPager->pPCache =    (PCache*)(pPtr += ROUND8(sizeof(*pPager)));
+  pPager->fd =   (sqlite3_file*)(pPtr += ROUND8(pcacheSize));
+  pPager->sjfd = (sqlite3_file*)(pPtr += ROUND8(pVfs->szOsFile));
+  pPager->jfd =  (sqlite3_file*)(pPtr += journalFileSize);
+  pPager->zFilename =    (char*)(pPtr += journalFileSize);
+  assert( EIGHT_BYTE_ALIGNMENT(pPager->jfd) );
+
+  /* Fill in the Pager.zFilename and Pager.zJournal buffers, if required. */
+  if( zPathname ){
+    assert( nPathname>0 );
+    pPager->zJournal =   (char*)(pPtr += nPathname + 1);
+    memcpy(pPager->zFilename, zPathname, nPathname);
+    memcpy(pPager->zJournal, zPathname, nPathname);
+    memcpy(&pPager->zJournal[nPathname], "-journal", 8);
+#ifndef SQLITE_OMIT_WAL
+    pPager->zWal = &pPager->zJournal[nPathname+8+1];
+    memcpy(pPager->zWal, zPathname, nPathname);
+    memcpy(&pPager->zWal[nPathname], "-wal", 4);
+#endif
+    sqlite3_free(zPathname);
+  }
+  pPager->pVfs = pVfs;
+  pPager->vfsFlags = vfsFlags;
+
+  /* Open the pager file.
+  */
+  if( zFilename && zFilename[0] ){
+    int fout = 0;                    /* VFS flags returned by xOpen() */
+    rc = sqlite3OsOpen(pVfs, pPager->zFilename, pPager->fd, vfsFlags, &fout);
+    assert( !memDb );
+    readOnly = (fout&SQLITE_OPEN_READONLY);
+
+    /* If the file was successfully opened for read/write access,
+    ** choose a default page size in case we have to create the
+    ** database file. The default page size is the maximum of:
+    **
+    **    + SQLITE_DEFAULT_PAGE_SIZE,
+    **    + The value returned by sqlite3OsSectorSize()
+    **    + The largest page size that can be written atomically.
+    */
+    if( rc==SQLITE_OK && !readOnly ){
+      setSectorSize(pPager);
+      assert(SQLITE_DEFAULT_PAGE_SIZE<=SQLITE_MAX_DEFAULT_PAGE_SIZE);
+      if( szPageDflt<pPager->sectorSize ){
+        if( pPager->sectorSize>SQLITE_MAX_DEFAULT_PAGE_SIZE ){
+          szPageDflt = SQLITE_MAX_DEFAULT_PAGE_SIZE;
+        }else{
+          szPageDflt = (u32)pPager->sectorSize;
+        }
+      }
+#ifdef SQLITE_ENABLE_ATOMIC_WRITE
+      {
+        int iDc = sqlite3OsDeviceCharacteristics(pPager->fd);
+        int ii;
+        assert(SQLITE_IOCAP_ATOMIC512==(512>>8));
+        assert(SQLITE_IOCAP_ATOMIC64K==(65536>>8));
+        assert(SQLITE_MAX_DEFAULT_PAGE_SIZE<=65536);
+        for(ii=szPageDflt; ii<=SQLITE_MAX_DEFAULT_PAGE_SIZE; ii=ii*2){
+          if( iDc&(SQLITE_IOCAP_ATOMIC|(ii>>8)) ){
+            szPageDflt = ii;
+          }
+        }
+      }
+#endif
+    }
+  }else{
+    /* If a temporary file is requested, it is not opened immediately.
+    ** In this case we accept the default page size and delay actually
+    ** opening the file until the first call to OsWrite().
+    **
+    ** This branch is also run for an in-memory database. An in-memory
+    ** database is the same as a temp-file that is never written out to
+    ** disk and uses an in-memory rollback journal.
+    */ 
+    tempFile = 1;
+    pPager->eState = PAGER_READER;
+    pPager->eLock = EXCLUSIVE_LOCK;
+    readOnly = (vfsFlags&SQLITE_OPEN_READONLY);
+  }
+
+  /* The following call to PagerSetPagesize() serves to set the value of 
+  ** Pager.pageSize and to allocate the Pager.pTmpSpace buffer.
+  */
+  if( rc==SQLITE_OK ){
+    assert( pPager->memDb==0 );
+    rc = sqlite3PagerSetPagesize(pPager, &szPageDflt, -1);
+    testcase( rc!=SQLITE_OK );
+  }
+
+  /* If an error occurred in either of the blocks above, free the 
+  ** Pager structure and close the file.
+  */
+  if( rc!=SQLITE_OK ){
+    assert( !pPager->pTmpSpace );
+    sqlite3OsClose(pPager->fd);
+    sqlite3_free(pPager);
+    return rc;
+  }
+
+  /* Initialize the PCache object. */
+  assert( nExtra<1000 );
+  nExtra = ROUND8(nExtra);
+  sqlite3PcacheOpen(szPageDflt, nExtra, !memDb,
+                    !memDb?pagerStress:0, (void *)pPager, pPager->pPCache);
+
+  PAGERTRACE(("OPEN %d %s\n", FILEHANDLEID(pPager->fd), pPager->zFilename));
+  IOTRACE(("OPEN %p %s\n", pPager, pPager->zFilename))
+
+  pPager->useJournal = (u8)useJournal;
+  pPager->noReadlock = (noReadlock && readOnly) ?1:0;
+  /* pPager->stmtOpen = 0; */
+  /* pPager->stmtInUse = 0; */
+  /* pPager->nRef = 0; */
+  /* pPager->stmtSize = 0; */
+  /* pPager->stmtJSize = 0; */
+  /* pPager->nPage = 0; */
+  pPager->mxPgno = SQLITE_MAX_PAGE_COUNT;
+  /* pPager->state = PAGER_UNLOCK; */
+#if 0
+  assert( pPager->state == (tempFile ? PAGER_EXCLUSIVE : PAGER_UNLOCK) );
+#endif
+  /* pPager->errMask = 0; */
+  pPager->tempFile = (u8)tempFile;
+  assert( tempFile==PAGER_LOCKINGMODE_NORMAL 
+          || tempFile==PAGER_LOCKINGMODE_EXCLUSIVE );
+  assert( PAGER_LOCKINGMODE_EXCLUSIVE==1 );
+  pPager->exclusiveMode = (u8)tempFile; 
+  pPager->changeCountDone = pPager->tempFile;
+  pPager->memDb = (u8)memDb;
+  pPager->readOnly = (u8)readOnly;
+  assert( useJournal || pPager->tempFile );
+  pPager->noSync = pPager->tempFile;
+  pPager->fullSync = pPager->noSync ?0:1;
+  pPager->syncFlags = pPager->noSync ? 0 : SQLITE_SYNC_NORMAL;
+  pPager->ckptSyncFlags = pPager->syncFlags;
+  /* pPager->pFirst = 0; */
+  /* pPager->pFirstSynced = 0; */
+  /* pPager->pLast = 0; */
+  pPager->nExtra = (u16)nExtra;
+  pPager->journalSizeLimit = SQLITE_DEFAULT_JOURNAL_SIZE_LIMIT;
+  assert( isOpen(pPager->fd) || tempFile );
+  setSectorSize(pPager);
+  if( !useJournal ){
+    pPager->journalMode = PAGER_JOURNALMODE_OFF;
+  }else if( memDb ){
+    pPager->journalMode = PAGER_JOURNALMODE_MEMORY;
+  }
+  /* pPager->xBusyHandler = 0; */
+  /* pPager->pBusyHandlerArg = 0; */
+  pPager->xReiniter = xReinit;
+  /* memset(pPager->aHash, 0, sizeof(pPager->aHash)); */
+
+  *ppPager = pPager;
+  return SQLITE_OK;
+}
+
+
+
+/*
+** This function is called after transitioning from PAGER_UNLOCK to
+** PAGER_SHARED state. It tests if there is a hot journal present in
+** the file-system for the given pager. A hot journal is one that 
+** needs to be played back. According to this function, a hot-journal
+** file exists if the following criteria are met:
+**
+**   * The journal file exists in the file system, and
+**   * No process holds a RESERVED or greater lock on the database file, and
+**   * The database file itself is greater than 0 bytes in size, and
+**   * The first byte of the journal file exists and is not 0x00.
+**
+** If the current size of the database file is 0 but a journal file
+** exists, that is probably an old journal left over from a prior
+** database with the same name. In this case the journal file is
+** just deleted using OsDelete, *pExists is set to 0 and SQLITE_OK
+** is returned.
+**
+** This routine does not check if there is a master journal filename
+** at the end of the file. If there is, and that master journal file
+** does not exist, then the journal file is not really hot. In this
+** case this routine will return a false-positive. The pager_playback()
+** routine will discover that the journal file is not really hot and 
+** will not roll it back. 
+**
+** If a hot-journal file is found to exist, *pExists is set to 1 and 
+** SQLITE_OK returned. If no hot-journal file is present, *pExists is
+** set to 0 and SQLITE_OK returned. If an IO error occurs while trying
+** to determine whether or not a hot-journal file exists, the IO error
+** code is returned and the value of *pExists is undefined.
+*/
+static int hasHotJournal(Pager *pPager, int *pExists){
+  sqlite3_vfs * const pVfs = pPager->pVfs;
+  int rc = SQLITE_OK;           /* Return code */
+  int exists = 1;               /* True if a journal file is present */
+  int jrnlOpen = !!isOpen(pPager->jfd);
+
+  assert( pPager->useJournal );
+  assert( isOpen(pPager->fd) );
+  assert( pPager->eState==PAGER_OPEN );
+
+  assert( jrnlOpen==0 || ( sqlite3OsDeviceCharacteristics(pPager->jfd) &
+    SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN
+  ));
+
+  *pExists = 0;
+  if( !jrnlOpen ){
+    rc = sqlite3OsAccess(pVfs, pPager->zJournal, SQLITE_ACCESS_EXISTS, &exists);
+  }
+  if( rc==SQLITE_OK && exists ){
+    int locked = 0;             /* True if some process holds a RESERVED lock */
+
+    /* Race condition here:  Another process might have been holding the
+    ** the RESERVED lock and have a journal open at the sqlite3OsAccess() 
+    ** call above, but then delete the journal and drop the lock before
+    ** we get to the following sqlite3OsCheckReservedLock() call.  If that
+    ** is the case, this routine might think there is a hot journal when
+    ** in fact there is none.  This results in a false-positive which will
+    ** be dealt with by the playback routine.  Ticket #3883.
+    */
+    rc = sqlite3OsCheckReservedLock(pPager->fd, &locked);
+    if( rc==SQLITE_OK && !locked ){
+      Pgno nPage;                 /* Number of pages in database file */
+
+      /* Check the size of the database file. If it consists of 0 pages,
+      ** then delete the journal file. See the header comment above for 
+      ** the reasoning here.  Delete the obsolete journal file under
+      ** a RESERVED lock to avoid race conditions and to avoid violating
+      ** [H33020].
+      */
+      rc = pagerPagecount(pPager, &nPage);
+      if( rc==SQLITE_OK ){
+        if( nPage==0 ){
+          sqlite3BeginBenignMalloc();
+          if( pagerLockDb(pPager, RESERVED_LOCK)==SQLITE_OK ){
+            sqlite3OsDelete(pVfs, pPager->zJournal, 0);
+            if( !pPager->exclusiveMode ) pagerUnlockDb(pPager, SHARED_LOCK);
+          }
+          sqlite3EndBenignMalloc();
+        }else{
+          /* The journal file exists and no other connection has a reserved
+          ** or greater lock on the database file. Now check that there is
+          ** at least one non-zero bytes at the start of the journal file.
+          ** If there is, then we consider this journal to be hot. If not, 
+          ** it can be ignored.
+          */
+          if( !jrnlOpen ){
+            int f = SQLITE_OPEN_READONLY|SQLITE_OPEN_MAIN_JOURNAL;
+            rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, f, &f);
+          }
+          if( rc==SQLITE_OK ){
+            u8 first = 0;
+            rc = sqlite3OsRead(pPager->jfd, (void *)&first, 1, 0);
+            if( rc==SQLITE_IOERR_SHORT_READ ){
+              rc = SQLITE_OK;
+            }
+            if( !jrnlOpen ){
+              sqlite3OsClose(pPager->jfd);
+            }
+            *pExists = (first!=0);
+          }else if( rc==SQLITE_CANTOPEN ){
+            /* If we cannot open the rollback journal file in order to see if
+            ** its has a zero header, that might be due to an I/O error, or
+            ** it might be due to the race condition described above and in
+            ** ticket #3883.  Either way, assume that the journal is hot.
+            ** This might be a false positive.  But if it is, then the
+            ** automatic journal playback and recovery mechanism will deal
+            ** with it under an EXCLUSIVE lock where we do not need to
+            ** worry so much with race conditions.
+            */
+            *pExists = 1;
+            rc = SQLITE_OK;
+          }
+        }
+      }
+    }
+  }
+
+  return rc;
+}
+
+/*
+** This function is called to obtain a shared lock on the database file.
+** It is illegal to call sqlite3PagerAcquire() until after this function
+** has been successfully called. If a shared-lock is already held when
+** this function is called, it is a no-op.
+**
+** The following operations are also performed by this function.
+**
+**   1) If the pager is currently in PAGER_OPEN state (no lock held
+**      on the database file), then an attempt is made to obtain a
+**      SHARED lock on the database file. Immediately after obtaining
+**      the SHARED lock, the file-system is checked for a hot-journal,
+**      which is played back if present. Following any hot-journal 
+**      rollback, the contents of the cache are validated by checking
+**      the 'change-counter' field of the database file header and
+**      discarded if they are found to be invalid.
+**
+**   2) If the pager is running in exclusive-mode, and there are currently
+**      no outstanding references to any pages, and is in the error state,
+**      then an attempt is made to clear the error state by discarding
+**      the contents of the page cache and rolling back any open journal
+**      file.
+**
+** If everything is successful, SQLITE_OK is returned. If an IO error 
+** occurs while locking the database, checking for a hot-journal file or 
+** rolling back a journal file, the IO error code is returned.
+*/
+SQLITE_PRIVATE int sqlite3PagerSharedLock(Pager *pPager){
+  int rc = SQLITE_OK;                /* Return code */
+
+  /* This routine is only called from b-tree and only when there are no
+  ** outstanding pages. This implies that the pager state should either
+  ** be OPEN or READER. READER is only possible if the pager is or was in 
+  ** exclusive access mode.
+  */
+  assert( sqlite3PcacheRefCount(pPager->pPCache)==0 );
+  assert( assert_pager_state(pPager) );
+  assert( pPager->eState==PAGER_OPEN || pPager->eState==PAGER_READER );
+  if( NEVER(MEMDB && pPager->errCode) ){ return pPager->errCode; }
+
+  if( !pagerUseWal(pPager) && pPager->eState==PAGER_OPEN ){
+    int bHotJournal = 1;          /* True if there exists a hot journal-file */
+
+    assert( !MEMDB );
+    assert( pPager->noReadlock==0 || pPager->readOnly );
+
+    if( pPager->noReadlock==0 ){
+      rc = pager_wait_on_lock(pPager, SHARED_LOCK);
+      if( rc!=SQLITE_OK ){
+        assert( pPager->eLock==NO_LOCK || pPager->eLock==UNKNOWN_LOCK );
+        goto failed;
+      }
+    }
+
+    /* If a journal file exists, and there is no RESERVED lock on the
+    ** database file, then it either needs to be played back or deleted.
+    */
+    if( pPager->eLock<=SHARED_LOCK ){
+      rc = hasHotJournal(pPager, &bHotJournal);
+    }
+    if( rc!=SQLITE_OK ){
+      goto failed;
+    }
+    if( bHotJournal ){
+      /* Get an EXCLUSIVE lock on the database file. At this point it is
+      ** important that a RESERVED lock is not obtained on the way to the
+      ** EXCLUSIVE lock. If it were, another process might open the
+      ** database file, detect the RESERVED lock, and conclude that the
+      ** database is safe to read while this process is still rolling the 
+      ** hot-journal back.
+      ** 
+      ** Because the intermediate RESERVED lock is not requested, any
+      ** other process attempting to access the database file will get to 
+      ** this point in the code and fail to obtain its own EXCLUSIVE lock 
+      ** on the database file.
+      **
+      ** Unless the pager is in locking_mode=exclusive mode, the lock is
+      ** downgraded to SHARED_LOCK before this function returns.
+      */
+      rc = pagerLockDb(pPager, EXCLUSIVE_LOCK);
+      if( rc!=SQLITE_OK ){
+        goto failed;
+      }
+ 
+      /* If it is not already open and the file exists on disk, open the 
+      ** journal for read/write access. Write access is required because 
+      ** in exclusive-access mode the file descriptor will be kept open 
+      ** and possibly used for a transaction later on. Also, write-access 
+      ** is usually required to finalize the journal in journal_mode=persist 
+      ** mode (and also for journal_mode=truncate on some systems).
+      **
+      ** If the journal does not exist, it usually means that some 
+      ** other connection managed to get in and roll it back before 
+      ** this connection obtained the exclusive lock above. Or, it 
+      ** may mean that the pager was in the error-state when this
+      ** function was called and the journal file does not exist.
+      */
+      if( !isOpen(pPager->jfd) ){
+        sqlite3_vfs * const pVfs = pPager->pVfs;
+        int bExists;              /* True if journal file exists */
+        rc = sqlite3OsAccess(
+            pVfs, pPager->zJournal, SQLITE_ACCESS_EXISTS, &bExists);
+        if( rc==SQLITE_OK && bExists ){
+          int fout = 0;
+          int f = SQLITE_OPEN_READWRITE|SQLITE_OPEN_MAIN_JOURNAL;
+          assert( !pPager->tempFile );
+          rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, f, &fout);
+          assert( rc!=SQLITE_OK || isOpen(pPager->jfd) );
+          if( rc==SQLITE_OK && fout&SQLITE_OPEN_READONLY ){
+            rc = SQLITE_CANTOPEN_BKPT;
+            sqlite3OsClose(pPager->jfd);
+          }
+        }
+      }
+ 
+      /* Playback and delete the journal.  Drop the database write
+      ** lock and reacquire the read lock. Purge the cache before
+      ** playing back the hot-journal so that we don't end up with
+      ** an inconsistent cache.  Sync the hot journal before playing
+      ** it back since the process that crashed and left the hot journal
+      ** probably did not sync it and we are required to always sync
+      ** the journal before playing it back.
+      */
+      if( isOpen(pPager->jfd) ){
+        assert( rc==SQLITE_OK );
+        rc = pagerSyncHotJournal(pPager);
+        if( rc==SQLITE_OK ){
+          rc = pager_playback(pPager, 1);
+          pPager->eState = PAGER_OPEN;
+        }
+      }else if( !pPager->exclusiveMode ){
+        pagerUnlockDb(pPager, SHARED_LOCK);
+      }
+
+      if( rc!=SQLITE_OK ){
+        /* This branch is taken if an error occurs while trying to open
+        ** or roll back a hot-journal while holding an EXCLUSIVE lock. The
+        ** pager_unlock() routine will be called before returning to unlock
+        ** the file. If the unlock attempt fails, then Pager.eLock must be
+        ** set to UNKNOWN_LOCK (see the comment above the #define for 
+        ** UNKNOWN_LOCK above for an explanation). 
+        **
+        ** In order to get pager_unlock() to do this, set Pager.eState to
+        ** PAGER_ERROR now. This is not actually counted as a transition
+        ** to ERROR state in the state diagram at the top of this file,
+        ** since we know that the same call to pager_unlock() will very
+        ** shortly transition the pager object to the OPEN state. Calling
+        ** assert_pager_state() would fail now, as it should not be possible
+        ** to be in ERROR state when there are zero outstanding page 
+        ** references.
+        */
+        pager_error(pPager, rc);
+        goto failed;
+      }
+
+      assert( pPager->eState==PAGER_OPEN );
+      assert( (pPager->eLock==SHARED_LOCK)
+           || (pPager->exclusiveMode && pPager->eLock>SHARED_LOCK)
+      );
+    }
+
+    if( !pPager->tempFile 
+     && (pPager->pBackup || sqlite3PcachePagecount(pPager->pPCache)>0) 
+    ){
+      /* The shared-lock has just been acquired on the database file
+      ** and there are already pages in the cache (from a previous
+      ** read or write transaction).  Check to see if the database
+      ** has been modified.  If the database has changed, flush the
+      ** cache.
+      **
+      ** Database changes is detected by looking at 15 bytes beginning
+      ** at offset 24 into the file.  The first 4 of these 16 bytes are
+      ** a 32-bit counter that is incremented with each change.  The
+      ** other bytes change randomly with each file change when
+      ** a codec is in use.
+      ** 
+      ** There is a vanishingly small chance that a change will not be 
+      ** detected.  The chance of an undetected change is so small that
+      ** it can be neglected.
+      */
+      Pgno nPage = 0;
+      char dbFileVers[sizeof(pPager->dbFileVers)];
+
+      rc = pagerPagecount(pPager, &nPage);
+      if( rc ) goto failed;
+
+      if( nPage>0 ){
+        IOTRACE(("CKVERS %p %d\n", pPager, sizeof(dbFileVers)));
+        rc = sqlite3OsRead(pPager->fd, &dbFileVers, sizeof(dbFileVers), 24);
+        if( rc!=SQLITE_OK ){
+          goto failed;
+        }
+      }else{
+        memset(dbFileVers, 0, sizeof(dbFileVers));
+      }
+
+      if( memcmp(pPager->dbFileVers, dbFileVers, sizeof(dbFileVers))!=0 ){
+        pager_reset(pPager);
+      }
+    }
+
+    /* If there is a WAL file in the file-system, open this database in WAL
+    ** mode. Otherwise, the following function call is a no-op.
+    */
+    rc = pagerOpenWalIfPresent(pPager);
+#ifndef SQLITE_OMIT_WAL
+    assert( pPager->pWal==0 || rc==SQLITE_OK );
+#endif
+  }
+
+  if( pagerUseWal(pPager) ){
+    assert( rc==SQLITE_OK );
+    rc = pagerBeginReadTransaction(pPager);
+  }
+
+  if( pPager->eState==PAGER_OPEN && rc==SQLITE_OK ){
+    rc = pagerPagecount(pPager, &pPager->dbSize);
+  }
+
+ failed:
+  if( rc!=SQLITE_OK ){
+    assert( !MEMDB );
+    pager_unlock(pPager);
+    assert( pPager->eState==PAGER_OPEN );
+  }else{
+    pPager->eState = PAGER_READER;
+  }
+  return rc;
+}
+
+/*
+** If the reference count has reached zero, rollback any active
+** transaction and unlock the pager.
+**
+** Except, in locking_mode=EXCLUSIVE when there is nothing to in
+** the rollback journal, the unlock is not performed and there is
+** nothing to rollback, so this routine is a no-op.
+*/ 
+static void pagerUnlockIfUnused(Pager *pPager){
+  if( (sqlite3PcacheRefCount(pPager->pPCache)==0) ){
+    pagerUnlockAndRollback(pPager);
+  }
+}
+
+/*
+** Acquire a reference to page number pgno in pager pPager (a page
+** reference has type DbPage*). If the requested reference is 
+** successfully obtained, it is copied to *ppPage and SQLITE_OK returned.
+**
+** If the requested page is already in the cache, it is returned. 
+** Otherwise, a new page object is allocated and populated with data
+** read from the database file. In some cases, the pcache module may
+** choose not to allocate a new page object and may reuse an existing
+** object with no outstanding references.
+**
+** The extra data appended to a page is always initialized to zeros the 
+** first time a page is loaded into memory. If the page requested is 
+** already in the cache when this function is called, then the extra
+** data is left as it was when the page object was last used.
+**
+** If the database image is smaller than the requested page or if a 
+** non-zero value is passed as the noContent parameter and the 
+** requested page is not already stored in the cache, then no 
+** actual disk read occurs. In this case the memory image of the 
+** page is initialized to all zeros. 
+**
+** If noContent is true, it means that we do not care about the contents
+** of the page. This occurs in two seperate scenarios:
+**
+**   a) When reading a free-list leaf page from the database, and
+**
+**   b) When a savepoint is being rolled back and we need to load
+**      a new page into the cache to be filled with the data read
+**      from the savepoint journal.
+**
+** If noContent is true, then the data returned is zeroed instead of
+** being read from the database. Additionally, the bits corresponding
+** to pgno in Pager.pInJournal (bitvec of pages already written to the
+** journal file) and the PagerSavepoint.pInSavepoint bitvecs of any open
+** savepoints are set. This means if the page is made writable at any
+** point in the future, using a call to sqlite3PagerWrite(), its contents
+** will not be journaled. This saves IO.
+**
+** The acquisition might fail for several reasons.  In all cases,
+** an appropriate error code is returned and *ppPage is set to NULL.
+**
+** See also sqlite3PagerLookup().  Both this routine and Lookup() attempt
+** to find a page in the in-memory cache first.  If the page is not already
+** in memory, this routine goes to disk to read it in whereas Lookup()
+** just returns 0.  This routine acquires a read-lock the first time it
+** has to go to disk, and could also playback an old journal if necessary.
+** Since Lookup() never goes to disk, it never has to deal with locks
+** or journal files.
+*/
+SQLITE_PRIVATE int sqlite3PagerAcquire(
+  Pager *pPager,      /* The pager open on the database file */
+  Pgno pgno,          /* Page number to fetch */
+  DbPage **ppPage,    /* Write a pointer to the page here */
+  int noContent       /* Do not bother reading content from disk if true */
+){
+  int rc;
+  PgHdr *pPg;
+
+  assert( pPager->eState>=PAGER_READER );
+  assert( assert_pager_state(pPager) );
+
+  if( pgno==0 ){
+    return SQLITE_CORRUPT_BKPT;
+  }
+
+  /* If the pager is in the error state, return an error immediately. 
+  ** Otherwise, request the page from the PCache layer. */
+  if( pPager->errCode!=SQLITE_OK ){
+    rc = pPager->errCode;
+  }else{
+    rc = sqlite3PcacheFetch(pPager->pPCache, pgno, 1, ppPage);
+  }
+
+  if( rc!=SQLITE_OK ){
+    /* Either the call to sqlite3PcacheFetch() returned an error or the
+    ** pager was already in the error-state when this function was called.
+    ** Set pPg to 0 and jump to the exception handler.  */
+    pPg = 0;
+    goto pager_acquire_err;
+  }
+  assert( (*ppPage)->pgno==pgno );
+  assert( (*ppPage)->pPager==pPager || (*ppPage)->pPager==0 );
+
+  if( (*ppPage)->pPager && !noContent ){
+    /* In this case the pcache already contains an initialized copy of
+    ** the page. Return without further ado.  */
+    assert( pgno<=PAGER_MAX_PGNO && pgno!=PAGER_MJ_PGNO(pPager) );
+    PAGER_INCR(pPager->nHit);
+    return SQLITE_OK;
+
+  }else{
+    /* The pager cache has created a new page. Its content needs to 
+    ** be initialized.  */
+
+    PAGER_INCR(pPager->nMiss);
+    pPg = *ppPage;
+    pPg->pPager = pPager;
+
+    /* The maximum page number is 2^31. Return SQLITE_CORRUPT if a page
+    ** number greater than this, or the unused locking-page, is requested. */
+    if( pgno>PAGER_MAX_PGNO || pgno==PAGER_MJ_PGNO(pPager) ){
+      rc = SQLITE_CORRUPT_BKPT;
+      goto pager_acquire_err;
+    }
+
+    if( MEMDB || pPager->dbSize<pgno || noContent || !isOpen(pPager->fd) ){
+      if( pgno>pPager->mxPgno ){
+        rc = SQLITE_FULL;
+        goto pager_acquire_err;
+      }
+      if( noContent ){
+        /* Failure to set the bits in the InJournal bit-vectors is benign.
+        ** It merely means that we might do some extra work to journal a 
+        ** page that does not need to be journaled.  Nevertheless, be sure 
+        ** to test the case where a malloc error occurs while trying to set 
+        ** a bit in a bit vector.
+        */
+        sqlite3BeginBenignMalloc();
+        if( pgno<=pPager->dbOrigSize ){
+          TESTONLY( rc = ) sqlite3BitvecSet(pPager->pInJournal, pgno);
+          testcase( rc==SQLITE_NOMEM );
+        }
+        TESTONLY( rc = ) addToSavepointBitvecs(pPager, pgno);
+        testcase( rc==SQLITE_NOMEM );
+        sqlite3EndBenignMalloc();
+      }
+      memset(pPg->pData, 0, pPager->pageSize);
+      IOTRACE(("ZERO %p %d\n", pPager, pgno));
+    }else{
+      assert( pPg->pPager==pPager );
+      rc = readDbPage(pPg);
+      if( rc!=SQLITE_OK ){
+        goto pager_acquire_err;
+      }
+    }
+    pager_set_pagehash(pPg);
+  }
+
+  return SQLITE_OK;
+
+pager_acquire_err:
+  assert( rc!=SQLITE_OK );
+  if( pPg ){
+    sqlite3PcacheDrop(pPg);
+  }
+  pagerUnlockIfUnused(pPager);
+
+  *ppPage = 0;
+  return rc;
+}
+
+/*
+** Acquire a page if it is already in the in-memory cache.  Do
+** not read the page from disk.  Return a pointer to the page,
+** or 0 if the page is not in cache. 
+**
+** See also sqlite3PagerGet().  The difference between this routine
+** and sqlite3PagerGet() is that _get() will go to the disk and read
+** in the page if the page is not already in cache.  This routine
+** returns NULL if the page is not in cache or if a disk I/O error 
+** has ever happened.
+*/
+SQLITE_PRIVATE DbPage *sqlite3PagerLookup(Pager *pPager, Pgno pgno){
+  PgHdr *pPg = 0;
+  assert( pPager!=0 );
+  assert( pgno!=0 );
+  assert( pPager->pPCache!=0 );
+  assert( pPager->eState>=PAGER_READER && pPager->eState!=PAGER_ERROR );
+  sqlite3PcacheFetch(pPager->pPCache, pgno, 0, &pPg);
+  return pPg;
+}
+
+/*
+** Release a page reference.
+**
+** If the number of references to the page drop to zero, then the
+** page is added to the LRU list.  When all references to all pages
+** are released, a rollback occurs and the lock on the database is
+** removed.
+*/
+SQLITE_PRIVATE void sqlite3PagerUnref(DbPage *pPg){
+  if( pPg ){
+    Pager *pPager = pPg->pPager;
+    sqlite3PcacheRelease(pPg);
+    pagerUnlockIfUnused(pPager);
+  }
+}
+
+/*
+** This function is called at the start of every write transaction.
+** There must already be a RESERVED or EXCLUSIVE lock on the database 
+** file when this routine is called.
+**
+** Open the journal file for pager pPager and write a journal header
+** to the start of it. If there are active savepoints, open the sub-journal
+** as well. This function is only used when the journal file is being 
+** opened to write a rollback log for a transaction. It is not used 
+** when opening a hot journal file to roll it back.
+**
+** If the journal file is already open (as it may be in exclusive mode),
+** then this function just writes a journal header to the start of the
+** already open file. 
+**
+** Whether or not the journal file is opened by this function, the
+** Pager.pInJournal bitvec structure is allocated.
+**
+** Return SQLITE_OK if everything is successful. Otherwise, return 
+** SQLITE_NOMEM if the attempt to allocate Pager.pInJournal fails, or 
+** an IO error code if opening or writing the journal file fails.
+*/
+static int pager_open_journal(Pager *pPager){
+  int rc = SQLITE_OK;                        /* Return code */
+  sqlite3_vfs * const pVfs = pPager->pVfs;   /* Local cache of vfs pointer */
+
+  assert( pPager->eState==PAGER_WRITER_LOCKED );
+  assert( assert_pager_state(pPager) );
+  assert( pPager->pInJournal==0 );
+  
+  /* If already in the error state, this function is a no-op.  But on
+  ** the other hand, this routine is never called if we are already in
+  ** an error state. */
+  if( NEVER(pPager->errCode) ) return pPager->errCode;
+
+  if( !pagerUseWal(pPager) && pPager->journalMode!=PAGER_JOURNALMODE_OFF ){
+    pPager->pInJournal = sqlite3BitvecCreate(pPager->dbSize);
+    if( pPager->pInJournal==0 ){
+      return SQLITE_NOMEM;
+    }
+  
+    /* Open the journal file if it is not already open. */
+    if( !isOpen(pPager->jfd) ){
+      if( pPager->journalMode==PAGER_JOURNALMODE_MEMORY ){
+        sqlite3MemJournalOpen(pPager->jfd);
+      }else{
+        const int flags =                   /* VFS flags to open journal file */
+          SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|
+          (pPager->tempFile ? 
+            (SQLITE_OPEN_DELETEONCLOSE|SQLITE_OPEN_TEMP_JOURNAL):
+            (SQLITE_OPEN_MAIN_JOURNAL)
+          );
+  #ifdef SQLITE_ENABLE_ATOMIC_WRITE
+        rc = sqlite3JournalOpen(
+            pVfs, pPager->zJournal, pPager->jfd, flags, jrnlBufferSize(pPager)
+        );
+  #else
+        rc = sqlite3OsOpen(pVfs, pPager->zJournal, pPager->jfd, flags, 0);
+  #endif
+      }
+      assert( rc!=SQLITE_OK || isOpen(pPager->jfd) );
+    }
+  
+  
+    /* Write the first journal header to the journal file and open 
+    ** the sub-journal if necessary.
+    */
+    if( rc==SQLITE_OK ){
+      /* TODO: Check if all of these are really required. */
+      pPager->nRec = 0;
+      pPager->journalOff = 0;
+      pPager->setMaster = 0;
+      pPager->journalHdr = 0;
+      rc = writeJournalHdr(pPager);
+    }
+  }
+
+  if( rc!=SQLITE_OK ){
+    sqlite3BitvecDestroy(pPager->pInJournal);
+    pPager->pInJournal = 0;
+  }else{
+    assert( pPager->eState==PAGER_WRITER_LOCKED );
+    pPager->eState = PAGER_WRITER_CACHEMOD;
+  }
+
+  return rc;
+}
+
+/*
+** Begin a write-transaction on the specified pager object. If a 
+** write-transaction has already been opened, this function is a no-op.
+**
+** If the exFlag argument is false, then acquire at least a RESERVED
+** lock on the database file. If exFlag is true, then acquire at least
+** an EXCLUSIVE lock. If such a lock is already held, no locking 
+** functions need be called.
+**
+** If the subjInMemory argument is non-zero, then any sub-journal opened
+** within this transaction will be opened as an in-memory file. This
+** has no effect if the sub-journal is already opened (as it may be when
+** running in exclusive mode) or if the transaction does not require a
+** sub-journal. If the subjInMemory argument is zero, then any required
+** sub-journal is implemented in-memory if pPager is an in-memory database, 
+** or using a temporary file otherwise.
+*/
+SQLITE_PRIVATE int sqlite3PagerBegin(Pager *pPager, int exFlag, int subjInMemory){
+  int rc = SQLITE_OK;
+
+  if( pPager->errCode ) return pPager->errCode;
+  assert( pPager->eState>=PAGER_READER && pPager->eState<PAGER_ERROR );
+  pPager->subjInMemory = (u8)subjInMemory;
+
+  if( ALWAYS(pPager->eState==PAGER_READER) ){
+    assert( pPager->pInJournal==0 );
+
+    if( pagerUseWal(pPager) ){
+      /* If the pager is configured to use locking_mode=exclusive, and an
+      ** exclusive lock on the database is not already held, obtain it now.
+      */
+      if( pPager->exclusiveMode && sqlite3WalExclusiveMode(pPager->pWal, -1) ){
+        rc = pagerLockDb(pPager, EXCLUSIVE_LOCK);
+        if( rc!=SQLITE_OK ){
+          return rc;
+        }
+        sqlite3WalExclusiveMode(pPager->pWal, 1);
+      }
+
+      /* Grab the write lock on the log file. If successful, upgrade to
+      ** PAGER_RESERVED state. Otherwise, return an error code to the caller.
+      ** The busy-handler is not invoked if another connection already
+      ** holds the write-lock. If possible, the upper layer will call it.
+      */
+      rc = sqlite3WalBeginWriteTransaction(pPager->pWal);
+    }else{
+      /* Obtain a RESERVED lock on the database file. If the exFlag parameter
+      ** is true, then immediately upgrade this to an EXCLUSIVE lock. The
+      ** busy-handler callback can be used when upgrading to the EXCLUSIVE
+      ** lock, but not when obtaining the RESERVED lock.
+      */
+      rc = pagerLockDb(pPager, RESERVED_LOCK);
+      if( rc==SQLITE_OK && exFlag ){
+        rc = pager_wait_on_lock(pPager, EXCLUSIVE_LOCK);
+      }
+    }
+
+    if( rc==SQLITE_OK ){
+      /* Change to WRITER_LOCKED state.
+      **
+      ** WAL mode sets Pager.eState to PAGER_WRITER_LOCKED or CACHEMOD
+      ** when it has an open transaction, but never to DBMOD or FINISHED.
+      ** This is because in those states the code to roll back savepoint 
+      ** transactions may copy data from the sub-journal into the database 
+      ** file as well as into the page cache. Which would be incorrect in 
+      ** WAL mode.
+      */
+      pPager->eState = PAGER_WRITER_LOCKED;
+      pPager->dbHintSize = pPager->dbSize;
+      pPager->dbFileSize = pPager->dbSize;
+      pPager->dbOrigSize = pPager->dbSize;
+      pPager->journalOff = 0;
+    }
+
+    assert( rc==SQLITE_OK || pPager->eState==PAGER_READER );
+    assert( rc!=SQLITE_OK || pPager->eState==PAGER_WRITER_LOCKED );
+    assert( assert_pager_state(pPager) );
+  }
+
+  PAGERTRACE(("TRANSACTION %d\n", PAGERID(pPager)));
+  return rc;
+}
+
+/*
+** Mark a single data page as writeable. The page is written into the 
+** main journal or sub-journal as required. If the page is written into
+** one of the journals, the corresponding bit is set in the 
+** Pager.pInJournal bitvec and the PagerSavepoint.pInSavepoint bitvecs
+** of any open savepoints as appropriate.
+*/
+static int pager_write(PgHdr *pPg){
+  void *pData = pPg->pData;
+  Pager *pPager = pPg->pPager;
+  int rc = SQLITE_OK;
+
+  /* This routine is not called unless a write-transaction has already 
+  ** been started. The journal file may or may not be open at this point.
+  ** It is never called in the ERROR state.
+  */
+  assert( pPager->eState==PAGER_WRITER_LOCKED
+       || pPager->eState==PAGER_WRITER_CACHEMOD
+       || pPager->eState==PAGER_WRITER_DBMOD
+  );
+  assert( assert_pager_state(pPager) );
+
+  /* If an error has been previously detected, report the same error
+  ** again. This should not happen, but the check provides robustness. */
+  if( NEVER(pPager->errCode) )  return pPager->errCode;
+
+  /* Higher-level routines never call this function if database is not
+  ** writable.  But check anyway, just for robustness. */
+  if( NEVER(pPager->readOnly) ) return SQLITE_PERM;
+
+  CHECK_PAGE(pPg);
+
+  /* The journal file needs to be opened. Higher level routines have already
+  ** obtained the necessary locks to begin the write-transaction, but the
+  ** rollback journal might not yet be open. Open it now if this is the case.
+  **
+  ** This is done before calling sqlite3PcacheMakeDirty() on the page. 
+  ** Otherwise, if it were done after calling sqlite3PcacheMakeDirty(), then
+  ** an error might occur and the pager would end up in WRITER_LOCKED state
+  ** with pages marked as dirty in the cache.
+  */
+  if( pPager->eState==PAGER_WRITER_LOCKED ){
+    rc = pager_open_journal(pPager);
+    if( rc!=SQLITE_OK ) return rc;
+  }
+  assert( pPager->eState>=PAGER_WRITER_CACHEMOD );
+  assert( assert_pager_state(pPager) );
+
+  /* Mark the page as dirty.  If the page has already been written
+  ** to the journal then we can return right away.
+  */
+  sqlite3PcacheMakeDirty(pPg);
+  if( pageInJournal(pPg) && !subjRequiresPage(pPg) ){
+    assert( !pagerUseWal(pPager) );
+  }else{
+  
+    /* The transaction journal now exists and we have a RESERVED or an
+    ** EXCLUSIVE lock on the main database file.  Write the current page to
+    ** the transaction journal if it is not there already.
+    */
+    if( !pageInJournal(pPg) && !pagerUseWal(pPager) ){
+      assert( pagerUseWal(pPager)==0 );
+      if( pPg->pgno<=pPager->dbOrigSize && isOpen(pPager->jfd) ){
+        u32 cksum;
+        char *pData2;
+        i64 iOff = pPager->journalOff;
+
+        /* We should never write to the journal file the page that
+        ** contains the database locks.  The following assert verifies
+        ** that we do not. */
+        assert( pPg->pgno!=PAGER_MJ_PGNO(pPager) );
+
+        assert( pPager->journalHdr<=pPager->journalOff );
+        CODEC2(pPager, pData, pPg->pgno, 7, return SQLITE_NOMEM, pData2);
+        cksum = pager_cksum(pPager, (u8*)pData2);
+
+        /* Even if an IO or diskfull error occurs while journalling the
+        ** page in the block above, set the need-sync flag for the page.
+        ** Otherwise, when the transaction is rolled back, the logic in
+        ** playback_one_page() will think that the page needs to be restored
+        ** in the database file. And if an IO error occurs while doing so,
+        ** then corruption may follow.
+        */
+        pPg->flags |= PGHDR_NEED_SYNC;
+
+        rc = write32bits(pPager->jfd, iOff, pPg->pgno);
+        if( rc!=SQLITE_OK ) return rc;
+        rc = sqlite3OsWrite(pPager->jfd, pData2, pPager->pageSize, iOff+4);
+        if( rc!=SQLITE_OK ) return rc;
+        rc = write32bits(pPager->jfd, iOff+pPager->pageSize+4, cksum);
+        if( rc!=SQLITE_OK ) return rc;
+
+        IOTRACE(("JOUT %p %d %lld %d\n", pPager, pPg->pgno, 
+                 pPager->journalOff, pPager->pageSize));
+        PAGER_INCR(sqlite3_pager_writej_count);
+        PAGERTRACE(("JOURNAL %d page %d needSync=%d hash(%08x)\n",
+             PAGERID(pPager), pPg->pgno, 
+             ((pPg->flags&PGHDR_NEED_SYNC)?1:0), pager_pagehash(pPg)));
+
+        pPager->journalOff += 8 + pPager->pageSize;
+        pPager->nRec++;
+        assert( pPager->pInJournal!=0 );
+        rc = sqlite3BitvecSet(pPager->pInJournal, pPg->pgno);
+        testcase( rc==SQLITE_NOMEM );
+        assert( rc==SQLITE_OK || rc==SQLITE_NOMEM );
+        rc |= addToSavepointBitvecs(pPager, pPg->pgno);
+        if( rc!=SQLITE_OK ){
+          assert( rc==SQLITE_NOMEM );
+          return rc;
+        }
+      }else{
+        if( pPager->eState!=PAGER_WRITER_DBMOD ){
+          pPg->flags |= PGHDR_NEED_SYNC;
+        }
+        PAGERTRACE(("APPEND %d page %d needSync=%d\n",
+                PAGERID(pPager), pPg->pgno,
+               ((pPg->flags&PGHDR_NEED_SYNC)?1:0)));
+      }
+    }
+  
+    /* If the statement journal is open and the page is not in it,
+    ** then write the current page to the statement journal.  Note that
+    ** the statement journal format differs from the standard journal format
+    ** in that it omits the checksums and the header.
+    */
+    if( subjRequiresPage(pPg) ){
+      rc = subjournalPage(pPg);
+    }
+  }
+
+  /* Update the database size and return.
+  */
+  if( pPager->dbSize<pPg->pgno ){
+    pPager->dbSize = pPg->pgno;
+  }
+  return rc;
+}
+
+/*
+** Mark a data page as writeable. This routine must be called before 
+** making changes to a page. The caller must check the return value 
+** of this function and be careful not to change any page data unless 
+** this routine returns SQLITE_OK.
+**
+** The difference between this function and pager_write() is that this
+** function also deals with the special case where 2 or more pages
+** fit on a single disk sector. In this case all co-resident pages
+** must have been written to the journal file before returning.
+**
+** If an error occurs, SQLITE_NOMEM or an IO error code is returned
+** as appropriate. Otherwise, SQLITE_OK.
+*/
+SQLITE_PRIVATE int sqlite3PagerWrite(DbPage *pDbPage){
+  int rc = SQLITE_OK;
+
+  PgHdr *pPg = pDbPage;
+  Pager *pPager = pPg->pPager;
+  Pgno nPagePerSector = (pPager->sectorSize/pPager->pageSize);
+
+  assert( pPager->eState>=PAGER_WRITER_LOCKED );
+  assert( pPager->eState!=PAGER_ERROR );
+  assert( assert_pager_state(pPager) );
+
+  if( nPagePerSector>1 ){
+    Pgno nPageCount;          /* Total number of pages in database file */
+    Pgno pg1;                 /* First page of the sector pPg is located on. */
+    int nPage = 0;            /* Number of pages starting at pg1 to journal */
+    int ii;                   /* Loop counter */
+    int needSync = 0;         /* True if any page has PGHDR_NEED_SYNC */
+
+    /* Set the doNotSyncSpill flag to 1. This is because we cannot allow
+    ** a journal header to be written between the pages journaled by
+    ** this function.
+    */
+    assert( !MEMDB );
+    assert( pPager->doNotSyncSpill==0 );
+    pPager->doNotSyncSpill++;
+
+    /* This trick assumes that both the page-size and sector-size are
+    ** an integer power of 2. It sets variable pg1 to the identifier
+    ** of the first page of the sector pPg is located on.
+    */
+    pg1 = ((pPg->pgno-1) & ~(nPagePerSector-1)) + 1;
+
+    nPageCount = pPager->dbSize;
+    if( pPg->pgno>nPageCount ){
+      nPage = (pPg->pgno - pg1)+1;
+    }else if( (pg1+nPagePerSector-1)>nPageCount ){
+      nPage = nPageCount+1-pg1;
+    }else{
+      nPage = nPagePerSector;
+    }
+    assert(nPage>0);
+    assert(pg1<=pPg->pgno);
+    assert((pg1+nPage)>pPg->pgno);
+
+    for(ii=0; ii<nPage && rc==SQLITE_OK; ii++){
+      Pgno pg = pg1+ii;
+      PgHdr *pPage;
+      if( pg==pPg->pgno || !sqlite3BitvecTest(pPager->pInJournal, pg) ){
+        if( pg!=PAGER_MJ_PGNO(pPager) ){
+          rc = sqlite3PagerGet(pPager, pg, &pPage);
+          if( rc==SQLITE_OK ){
+            rc = pager_write(pPage);
+            if( pPage->flags&PGHDR_NEED_SYNC ){
+              needSync = 1;
+            }
+            sqlite3PagerUnref(pPage);
+          }
+        }
+      }else if( (pPage = pager_lookup(pPager, pg))!=0 ){
+        if( pPage->flags&PGHDR_NEED_SYNC ){
+          needSync = 1;
+        }
+        sqlite3PagerUnref(pPage);
+      }
+    }
+
+    /* If the PGHDR_NEED_SYNC flag is set for any of the nPage pages 
+    ** starting at pg1, then it needs to be set for all of them. Because
+    ** writing to any of these nPage pages may damage the others, the
+    ** journal file must contain sync()ed copies of all of them
+    ** before any of them can be written out to the database file.
+    */
+    if( rc==SQLITE_OK && needSync ){
+      assert( !MEMDB );
+      for(ii=0; ii<nPage; ii++){
+        PgHdr *pPage = pager_lookup(pPager, pg1+ii);
+        if( pPage ){
+          pPage->flags |= PGHDR_NEED_SYNC;
+          sqlite3PagerUnref(pPage);
+        }
+      }
+    }
+
+    assert( pPager->doNotSyncSpill==1 );
+    pPager->doNotSyncSpill--;
+  }else{
+    rc = pager_write(pDbPage);
+  }
+  return rc;
+}
+
+/*
+** Return TRUE if the page given in the argument was previously passed
+** to sqlite3PagerWrite().  In other words, return TRUE if it is ok
+** to change the content of the page.
+*/
+#ifndef NDEBUG
+SQLITE_PRIVATE int sqlite3PagerIswriteable(DbPage *pPg){
+  return pPg->flags&PGHDR_DIRTY;
+}
+#endif
+
+/*
+** A call to this routine tells the pager that it is not necessary to
+** write the information on page pPg back to the disk, even though
+** that page might be marked as dirty.  This happens, for example, when
+** the page has been added as a leaf of the freelist and so its
+** content no longer matters.
+**
+** The overlying software layer calls this routine when all of the data
+** on the given page is unused. The pager marks the page as clean so
+** that it does not get written to disk.
+**
+** Tests show that this optimization can quadruple the speed of large 
+** DELETE operations.
+*/
+SQLITE_PRIVATE void sqlite3PagerDontWrite(PgHdr *pPg){
+  Pager *pPager = pPg->pPager;
+  if( (pPg->flags&PGHDR_DIRTY) && pPager->nSavepoint==0 ){
+    PAGERTRACE(("DONT_WRITE page %d of %d\n", pPg->pgno, PAGERID(pPager)));
+    IOTRACE(("CLEAN %p %d\n", pPager, pPg->pgno))
+    pPg->flags |= PGHDR_DONT_WRITE;
+    pager_set_pagehash(pPg);
+  }
+}
+
+/*
+** This routine is called to increment the value of the database file 
+** change-counter, stored as a 4-byte big-endian integer starting at 
+** byte offset 24 of the pager file.  The secondary change counter at
+** 92 is also updated, as is the SQLite version number at offset 96.
+**
+** But this only happens if the pPager->changeCountDone flag is false.
+** To avoid excess churning of page 1, the update only happens once.
+** See also the pager_write_changecounter() routine that does an 
+** unconditional update of the change counters.
+**
+** If the isDirectMode flag is zero, then this is done by calling 
+** sqlite3PagerWrite() on page 1, then modifying the contents of the
+** page data. In this case the file will be updated when the current
+** transaction is committed.
+**
+** The isDirectMode flag may only be non-zero if the library was compiled
+** with the SQLITE_ENABLE_ATOMIC_WRITE macro defined. In this case,
+** if isDirect is non-zero, then the database file is updated directly
+** by writing an updated version of page 1 using a call to the 
+** sqlite3OsWrite() function.
+*/
+static int pager_incr_changecounter(Pager *pPager, int isDirectMode){
+  int rc = SQLITE_OK;
+
+  assert( pPager->eState==PAGER_WRITER_CACHEMOD
+       || pPager->eState==PAGER_WRITER_DBMOD
+  );
+  assert( assert_pager_state(pPager) );
+
+  /* Declare and initialize constant integer 'isDirect'. If the
+  ** atomic-write optimization is enabled in this build, then isDirect
+  ** is initialized to the value passed as the isDirectMode parameter
+  ** to this function. Otherwise, it is always set to zero.
+  **
+  ** The idea is that if the atomic-write optimization is not
+  ** enabled at compile time, the compiler can omit the tests of
+  ** 'isDirect' below, as well as the block enclosed in the
+  ** "if( isDirect )" condition.
+  */
+#ifndef SQLITE_ENABLE_ATOMIC_WRITE
+# define DIRECT_MODE 0
+  assert( isDirectMode==0 );
+  UNUSED_PARAMETER(isDirectMode);
+#else
+# define DIRECT_MODE isDirectMode
+#endif
+
+  if( !pPager->changeCountDone && pPager->dbSize>0 ){
+    PgHdr *pPgHdr;                /* Reference to page 1 */
+
+    assert( !pPager->tempFile && isOpen(pPager->fd) );
+
+    /* Open page 1 of the file for writing. */
+    rc = sqlite3PagerGet(pPager, 1, &pPgHdr);
+    assert( pPgHdr==0 || rc==SQLITE_OK );
+
+    /* If page one was fetched successfully, and this function is not
+    ** operating in direct-mode, make page 1 writable.  When not in 
+    ** direct mode, page 1 is always held in cache and hence the PagerGet()
+    ** above is always successful - hence the ALWAYS on rc==SQLITE_OK.
+    */
+#if( !DIRECT_MODE)
+	 if(ALWAYS(rc==SQLITE_OK) ){
+      rc = sqlite3PagerWrite(pPgHdr);
+    }
+#endif
+
+    if( rc==SQLITE_OK ){
+      /* Actually do the update of the change counter */
+      pager_write_changecounter(pPgHdr);
+
+      /* If running in direct mode, write the contents of page 1 to the file. */
+		#if( DIRECT_MODE )
+        const void *zBuf;
+        assert( pPager->dbFileSize>0 );
+        CODEC2(pPager, pPgHdr->pData, 1, 6, rc=SQLITE_NOMEM, zBuf);
+        if( rc==SQLITE_OK ){
+          rc = sqlite3OsWrite(pPager->fd, zBuf, pPager->pageSize, 0);
+        }
+        if( rc==SQLITE_OK ){
+          pPager->changeCountDone = 1;
+        }
+		#else
+        pPager->changeCountDone = 1;
+		#endif
+    }
+
+    /* Release the page reference. */
+    sqlite3PagerUnref(pPgHdr);
+  }
+  return rc;
+}
+
+/*
+** Sync the database file to disk. This is a no-op for in-memory databases
+** or pages with the Pager.noSync flag set.
+**
+** If successful, or if called on a pager for which it is a no-op, this
+** function returns SQLITE_OK. Otherwise, an IO error code is returned.
+*/
+SQLITE_PRIVATE int sqlite3PagerSync(Pager *pPager){
+  int rc = SQLITE_OK;
+  if( !pPager->noSync ){
+    assert( !MEMDB );
+    rc = sqlite3OsSync(pPager->fd, pPager->syncFlags);
+  }else if( isOpen(pPager->fd) ){
+    assert( !MEMDB );
+    sqlite3OsFileControl(pPager->fd, SQLITE_FCNTL_SYNC_OMITTED, (void *)&rc);
+  }
+  return rc;
+}
+
+/*
+** This function may only be called while a write-transaction is active in
+** rollback. If the connection is in WAL mode, this call is a no-op. 
+** Otherwise, if the connection does not already have an EXCLUSIVE lock on 
+** the database file, an attempt is made to obtain one.
+**
+** If the EXCLUSIVE lock is already held or the attempt to obtain it is
+** successful, or the connection is in WAL mode, SQLITE_OK is returned.
+** Otherwise, either SQLITE_BUSY or an SQLITE_IOERR_XXX error code is 
+** returned.
+*/
+SQLITE_PRIVATE int sqlite3PagerExclusiveLock(Pager *pPager){
+  int rc = SQLITE_OK;
+  assert( pPager->eState==PAGER_WRITER_CACHEMOD 
+       || pPager->eState==PAGER_WRITER_DBMOD 
+       || pPager->eState==PAGER_WRITER_LOCKED 
+  );
+  assert( assert_pager_state(pPager) );
+  if( 0==pagerUseWal(pPager) ){
+    rc = pager_wait_on_lock(pPager, EXCLUSIVE_LOCK);
+  }
+  return rc;
+}
+
+/*
+** Sync the database file for the pager pPager. zMaster points to the name
+** of a master journal file that should be written into the individual
+** journal file. zMaster may be NULL, which is interpreted as no master
+** journal (a single database transaction).
+**
+** This routine ensures that:
+**
+**   * The database file change-counter is updated,
+**   * the journal is synced (unless the atomic-write optimization is used),
+**   * all dirty pages are written to the database file, 
+**   * the database file is truncated (if required), and
+**   * the database file synced. 
+**
+** The only thing that remains to commit the transaction is to finalize 
+** (delete, truncate or zero the first part of) the journal file (or 
+** delete the master journal file if specified).
+**
+** Note that if zMaster==NULL, this does not overwrite a previous value
+** passed to an sqlite3PagerCommitPhaseOne() call.
+**
+** If the final parameter - noSync - is true, then the database file itself
+** is not synced. The caller must call sqlite3PagerSync() directly to
+** sync the database file before calling CommitPhaseTwo() to delete the
+** journal file in this case.
+*/
+SQLITE_PRIVATE int sqlite3PagerCommitPhaseOne(
+  Pager *pPager,                  /* Pager object */
+  const char *zMaster,            /* If not NULL, the master journal name */
+  int noSync                      /* True to omit the xSync on the db file */
+){
+  int rc = SQLITE_OK;             /* Return code */
+
+  assert( pPager->eState==PAGER_WRITER_LOCKED
+       || pPager->eState==PAGER_WRITER_CACHEMOD
+       || pPager->eState==PAGER_WRITER_DBMOD
+       || pPager->eState==PAGER_ERROR
+  );
+  assert( assert_pager_state(pPager) );
+
+  /* If a prior error occurred, report that error again. */
+  if( NEVER(pPager->errCode) ) return pPager->errCode;
+
+  PAGERTRACE(("DATABASE SYNC: File=%s zMaster=%s nSize=%d\n", 
+      pPager->zFilename, zMaster, pPager->dbSize));
+
+  /* If no database changes have been made, return early. */
+  if( pPager->eState<PAGER_WRITER_CACHEMOD ) return SQLITE_OK;
+
+  if( MEMDB ){
+    /* If this is an in-memory db, or no pages have been written to, or this
+    ** function has already been called, it is mostly a no-op.  However, any
+    ** backup in progress needs to be restarted.
+    */
+    sqlite3BackupRestart(pPager->pBackup);
+  }else{
+    if( pagerUseWal(pPager) ){
+      PgHdr *pList = sqlite3PcacheDirtyList(pPager->pPCache);
+      if( pList ){
+        rc = pagerWalFrames(pPager, pList, pPager->dbSize, 1, 
+            (pPager->fullSync ? pPager->syncFlags : 0)
+        );
+      }
+      if( rc==SQLITE_OK ){
+        sqlite3PcacheCleanAll(pPager->pPCache);
+      }
+    }else{
+      /* The following block updates the change-counter. Exactly how it
+      ** does this depends on whether or not the atomic-update optimization
+      ** was enabled at compile time, and if this transaction meets the 
+      ** runtime criteria to use the operation: 
+      **
+      **    * The file-system supports the atomic-write property for
+      **      blocks of size page-size, and 
+      **    * This commit is not part of a multi-file transaction, and
+      **    * Exactly one page has been modified and store in the journal file.
+      **
+      ** If the optimization was not enabled at compile time, then the
+      ** pager_incr_changecounter() function is called to update the change
+      ** counter in 'indirect-mode'. If the optimization is compiled in but
+      ** is not applicable to this transaction, call sqlite3JournalCreate()
+      ** to make sure the journal file has actually been created, then call
+      ** pager_incr_changecounter() to update the change-counter in indirect
+      ** mode. 
+      **
+      ** Otherwise, if the optimization is both enabled and applicable,
+      ** then call pager_incr_changecounter() to update the change-counter
+      ** in 'direct' mode. In this case the journal file will never be
+      ** created for this transaction.
+      */
+  #ifdef SQLITE_ENABLE_ATOMIC_WRITE
+      PgHdr *pPg;
+      assert( isOpen(pPager->jfd) 
+           || pPager->journalMode==PAGER_JOURNALMODE_OFF 
+           || pPager->journalMode==PAGER_JOURNALMODE_WAL 
+      );
+      if( !zMaster && isOpen(pPager->jfd) 
+       && pPager->journalOff==jrnlBufferSize(pPager) 
+       && pPager->dbSize>=pPager->dbOrigSize
+       && (0==(pPg = sqlite3PcacheDirtyList(pPager->pPCache)) || 0==pPg->pDirty)
+      ){
+        /* Update the db file change counter via the direct-write method. The 
+        ** following call will modify the in-memory representation of page 1 
+        ** to include the updated change counter and then write page 1 
+        ** directly to the database file. Because of the atomic-write 
+        ** property of the host file-system, this is safe.
+        */
+        rc = pager_incr_changecounter(pPager, 1);
+      }else{
+        rc = sqlite3JournalCreate(pPager->jfd);
+        if( rc==SQLITE_OK ){
+          rc = pager_incr_changecounter(pPager, 0);
+        }
+      }
+  #else
+      rc = pager_incr_changecounter(pPager, 0);
+  #endif
+      if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
+  
+      /* If this transaction has made the database smaller, then all pages
+      ** being discarded by the truncation must be written to the journal
+      ** file. This can only happen in auto-vacuum mode.
+      **
+      ** Before reading the pages with page numbers larger than the 
+      ** current value of Pager.dbSize, set dbSize back to the value
+      ** that it took at the start of the transaction. Otherwise, the
+      ** calls to sqlite3PagerGet() return zeroed pages instead of 
+      ** reading data from the database file.
+      */
+  #ifndef SQLITE_OMIT_AUTOVACUUM
+      if( pPager->dbSize<pPager->dbOrigSize 
+       && pPager->journalMode!=PAGER_JOURNALMODE_OFF
+      ){
+        Pgno i;                                   /* Iterator variable */
+        const Pgno iSkip = PAGER_MJ_PGNO(pPager); /* Pending lock page */
+        const Pgno dbSize = pPager->dbSize;       /* Database image size */ 
+        pPager->dbSize = pPager->dbOrigSize;
+        for( i=dbSize+1; i<=pPager->dbOrigSize; i++ ){
+          if( !sqlite3BitvecTest(pPager->pInJournal, i) && i!=iSkip ){
+            PgHdr *pPage;             /* Page to journal */
+            rc = sqlite3PagerGet(pPager, i, &pPage);
+            if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
+            rc = sqlite3PagerWrite(pPage);
+            sqlite3PagerUnref(pPage);
+            if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
+          }
+        }
+        pPager->dbSize = dbSize;
+      } 
+  #endif
+  
+      /* Write the master journal name into the journal file. If a master 
+      ** journal file name has already been written to the journal file, 
+      ** or if zMaster is NULL (no master journal), then this call is a no-op.
+      */
+      rc = writeMasterJournal(pPager, zMaster);
+      if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
+  
+      /* Sync the journal file and write all dirty pages to the database.
+      ** If the atomic-update optimization is being used, this sync will not 
+      ** create the journal file or perform any real IO.
+      **
+      ** Because the change-counter page was just modified, unless the
+      ** atomic-update optimization is used it is almost certain that the
+      ** journal requires a sync here. However, in locking_mode=exclusive
+      ** on a system under memory pressure it is just possible that this is 
+      ** not the case. In this case it is likely enough that the redundant
+      ** xSync() call will be changed to a no-op by the OS anyhow. 
+      */
+      rc = syncJournal(pPager, 0);
+      if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
+  
+      rc = pager_write_pagelist(pPager,sqlite3PcacheDirtyList(pPager->pPCache));
+      if( rc!=SQLITE_OK ){
+        assert( rc!=SQLITE_IOERR_BLOCKED );
+        goto commit_phase_one_exit;
+      }
+      sqlite3PcacheCleanAll(pPager->pPCache);
+  
+      /* If the file on disk is not the same size as the database image,
+      ** then use pager_truncate to grow or shrink the file here.
+      */
+      if( pPager->dbSize!=pPager->dbFileSize ){
+        Pgno nNew = pPager->dbSize - (pPager->dbSize==PAGER_MJ_PGNO(pPager));
+        assert( pPager->eState==PAGER_WRITER_DBMOD );
+        rc = pager_truncate(pPager, nNew);
+        if( rc!=SQLITE_OK ) goto commit_phase_one_exit;
+      }
+  
+      /* Finally, sync the database file. */
+      if( !noSync ){
+        rc = sqlite3PagerSync(pPager);
+      }
+      IOTRACE(("DBSYNC %p\n", pPager))
+    }
+  }
+
+commit_phase_one_exit:
+  if( rc==SQLITE_OK && !pagerUseWal(pPager) ){
+    pPager->eState = PAGER_WRITER_FINISHED;
+  }
+  return rc;
+}
+
+
+/*
+** When this function is called, the database file has been completely
+** updated to reflect the changes made by the current transaction and
+** synced to disk. The journal file still exists in the file-system 
+** though, and if a failure occurs at this point it will eventually
+** be used as a hot-journal and the current transaction rolled back.
+**
+** This function finalizes the journal file, either by deleting, 
+** truncating or partially zeroing it, so that it cannot be used 
+** for hot-journal rollback. Once this is done the transaction is
+** irrevocably committed.
+**
+** If an error occurs, an IO error code is returned and the pager
+** moves into the error state. Otherwise, SQLITE_OK is returned.
+*/
+SQLITE_PRIVATE int sqlite3PagerCommitPhaseTwo(Pager *pPager){
+  int rc = SQLITE_OK;                  /* Return code */
+
+  /* This routine should not be called if a prior error has occurred.
+  ** But if (due to a coding error elsewhere in the system) it does get
+  ** called, just return the same error code without doing anything. */
+  if( NEVER(pPager->errCode) ) return pPager->errCode;
+
+  assert( pPager->eState==PAGER_WRITER_LOCKED
+       || pPager->eState==PAGER_WRITER_FINISHED
+       || (pagerUseWal(pPager) && pPager->eState==PAGER_WRITER_CACHEMOD)
+  );
+  assert( assert_pager_state(pPager) );
+
+  /* An optimization. If the database was not actually modified during
+  ** this transaction, the pager is running in exclusive-mode and is
+  ** using persistent journals, then this function is a no-op.
+  **
+  ** The start of the journal file currently contains a single journal 
+  ** header with the nRec field set to 0. If such a journal is used as
+  ** a hot-journal during hot-journal rollback, 0 changes will be made
+  ** to the database file. So there is no need to zero the journal 
+  ** header. Since the pager is in exclusive mode, there is no need
+  ** to drop any locks either.
+  */
+  if( pPager->eState==PAGER_WRITER_LOCKED 
+   && pPager->exclusiveMode 
+   && pPager->journalMode==PAGER_JOURNALMODE_PERSIST
+  ){
+    assert( pPager->journalOff==JOURNAL_HDR_SZ(pPager) || !pPager->journalOff );
+    pPager->eState = PAGER_READER;
+    return SQLITE_OK;
+  }
+
+  PAGERTRACE(("COMMIT %d\n", PAGERID(pPager)));
+  rc = pager_end_transaction(pPager, pPager->setMaster);
+  return pager_error(pPager, rc);
+}
+
+/*
+** If a write transaction is open, then all changes made within the 
+** transaction are reverted and the current write-transaction is closed.
+** The pager falls back to PAGER_READER state if successful, or PAGER_ERROR
+** state if an error occurs.
+**
+** If the pager is already in PAGER_ERROR state when this function is called,
+** it returns Pager.errCode immediately. No work is performed in this case.
+**
+** Otherwise, in rollback mode, this function performs two functions:
+**
+**   1) It rolls back the journal file, restoring all database file and 
+**      in-memory cache pages to the state they were in when the transaction
+**      was opened, and
+**
+**   2) It finalizes the journal file, so that it is not used for hot
+**      rollback at any point in the future.
+**
+** Finalization of the journal file (task 2) is only performed if the 
+** rollback is successful.
+**
+** In WAL mode, all cache-entries containing data modified within the
+** current transaction are either expelled from the cache or reverted to
+** their pre-transaction state by re-reading data from the database or
+** WAL files. The WAL transaction is then closed.
+*/
+SQLITE_PRIVATE int sqlite3PagerRollback(Pager *pPager){
+  int rc = SQLITE_OK;                  /* Return code */
+  PAGERTRACE(("ROLLBACK %d\n", PAGERID(pPager)));
+
+  /* PagerRollback() is a no-op if called in READER or OPEN state. If
+  ** the pager is already in the ERROR state, the rollback is not 
+  ** attempted here. Instead, the error code is returned to the caller.
+  */
+  assert( assert_pager_state(pPager) );
+  if( pPager->eState==PAGER_ERROR ) return pPager->errCode;
+  if( pPager->eState<=PAGER_READER ) return SQLITE_OK;
+
+  if( pagerUseWal(pPager) ){
+    int rc2;
+    rc = sqlite3PagerSavepoint(pPager, SAVEPOINT_ROLLBACK, -1);
+    rc2 = pager_end_transaction(pPager, pPager->setMaster);
+    if( rc==SQLITE_OK ) rc = rc2;
+  }else if( !isOpen(pPager->jfd) || pPager->eState==PAGER_WRITER_LOCKED ){
+    int eState = pPager->eState;
+    rc = pager_end_transaction(pPager, 0);
+    if( !MEMDB && eState>PAGER_WRITER_LOCKED ){
+      /* This can happen using journal_mode=off. Move the pager to the error 
+      ** state to indicate that the contents of the cache may not be trusted.
+      ** Any active readers will get SQLITE_ABORT.
+      */
+      pPager->errCode = SQLITE_ABORT;
+      pPager->eState = PAGER_ERROR;
+      return rc;
+    }
+  }else{
+    rc = pager_playback(pPager, 0);
+  }
+
+  assert( pPager->eState==PAGER_READER || rc!=SQLITE_OK );
+  assert( rc==SQLITE_OK || rc==SQLITE_FULL || (rc&0xFF)==SQLITE_IOERR );
+
+  /* If an error occurs during a ROLLBACK, we can no longer trust the pager
+  ** cache. So call pager_error() on the way out to make any error persistent.
+  */
+  return pager_error(pPager, rc);
+}
+
+/*
+** Return TRUE if the database file is opened read-only.  Return FALSE
+** if the database is (in theory) writable.
+*/
+SQLITE_PRIVATE u8 sqlite3PagerIsreadonly(Pager *pPager){
+  return pPager->readOnly;
+}
+
+/*
+** Return the number of references to the pager.
+*/
+SQLITE_PRIVATE int sqlite3PagerRefcount(Pager *pPager){
+  return sqlite3PcacheRefCount(pPager->pPCache);
+}
+
+/*
+** Return the approximate number of bytes of memory currently
+** used by the pager and its associated cache.
+*/
+SQLITE_PRIVATE int sqlite3PagerMemUsed(Pager *pPager){
+  int perPageSize = pPager->pageSize + pPager->nExtra + sizeof(PgHdr)
+                                     + 5*sizeof(void*);
+  return perPageSize*sqlite3PcachePagecount(pPager->pPCache)
+           + sqlite3MallocSize(pPager)
+           + pPager->pageSize;
+}
+
+/*
+** Return the number of references to the specified page.
+*/
+SQLITE_PRIVATE int sqlite3PagerPageRefcount(DbPage *pPage){
+  return sqlite3PcachePageRefcount(pPage);
+}
+
+#ifdef SQLITE_TEST
+/*
+** This routine is used for testing and analysis only.
+*/
+SQLITE_PRIVATE int *sqlite3PagerStats(Pager *pPager){
+  static int a[11];
+  a[0] = sqlite3PcacheRefCount(pPager->pPCache);
+  a[1] = sqlite3PcachePagecount(pPager->pPCache);
+  a[2] = sqlite3PcacheGetCachesize(pPager->pPCache);
+  a[3] = pPager->eState==PAGER_OPEN ? -1 : (int) pPager->dbSize;
+  a[4] = pPager->eState;
+  a[5] = pPager->errCode;
+  a[6] = pPager->nHit;
+  a[7] = pPager->nMiss;
+  a[8] = 0;  /* Used to be pPager->nOvfl */
+  a[9] = pPager->nRead;
+  a[10] = pPager->nWrite;
+  return a;
+}
+#endif
+
+/*
+** Return true if this is an in-memory pager.
+*/
+SQLITE_PRIVATE int sqlite3PagerIsMemdb(Pager *pPager){
+  return MEMDB;
+}
+
+/*
+** Check that there are at least nSavepoint savepoints open. If there are
+** currently less than nSavepoints open, then open one or more savepoints
+** to make up the difference. If the number of savepoints is already
+** equal to nSavepoint, then this function is a no-op.
+**
+** If a memory allocation fails, SQLITE_NOMEM is returned. If an error 
+** occurs while opening the sub-journal file, then an IO error code is
+** returned. Otherwise, SQLITE_OK.
+*/
+SQLITE_PRIVATE int sqlite3PagerOpenSavepoint(Pager *pPager, int nSavepoint){
+  int rc = SQLITE_OK;                       /* Return code */
+  int nCurrent = pPager->nSavepoint;        /* Current number of savepoints */
+
+  assert( pPager->eState>=PAGER_WRITER_LOCKED );
+  assert( assert_pager_state(pPager) );
+
+  if( nSavepoint>nCurrent && pPager->useJournal ){
+    int ii;                                 /* Iterator variable */
+    PagerSavepoint *aNew;                   /* New Pager.aSavepoint array */
+
+    /* Grow the Pager.aSavepoint array using realloc(). Return SQLITE_NOMEM
+    ** if the allocation fails. Otherwise, zero the new portion in case a 
+    ** malloc failure occurs while populating it in the for(...) loop below.
+    */
+    aNew = (PagerSavepoint *)sqlite3Realloc(
+        pPager->aSavepoint, sizeof(PagerSavepoint)*nSavepoint
+    );
+    if( !aNew ){
+      return SQLITE_NOMEM;
+    }
+    memset(&aNew[nCurrent], 0, (nSavepoint-nCurrent) * sizeof(PagerSavepoint));
+    pPager->aSavepoint = aNew;
+
+    /* Populate the PagerSavepoint structures just allocated. */
+    for(ii=nCurrent; ii<nSavepoint; ii++){
+      aNew[ii].nOrig = pPager->dbSize;
+      if( isOpen(pPager->jfd) && pPager->journalOff>0 ){
+        aNew[ii].iOffset = pPager->journalOff;
+      }else{
+        aNew[ii].iOffset = JOURNAL_HDR_SZ(pPager);
+      }
+      aNew[ii].iSubRec = pPager->nSubRec;
+      aNew[ii].pInSavepoint = sqlite3BitvecCreate(pPager->dbSize);
+      if( !aNew[ii].pInSavepoint ){
+        return SQLITE_NOMEM;
+      }
+      if( pagerUseWal(pPager) ){
+        sqlite3WalSavepoint(pPager->pWal, aNew[ii].aWalData);
+      }
+      pPager->nSavepoint = ii+1;
+    }
+    assert( pPager->nSavepoint==nSavepoint );
+    assertTruncateConstraint(pPager);
+  }
+
+  return rc;
+}
+
+/*
+** This function is called to rollback or release (commit) a savepoint.
+** The savepoint to release or rollback need not be the most recently 
+** created savepoint.
+**
+** Parameter op is always either SAVEPOINT_ROLLBACK or SAVEPOINT_RELEASE.
+** If it is SAVEPOINT_RELEASE, then release and destroy the savepoint with
+** index iSavepoint. If it is SAVEPOINT_ROLLBACK, then rollback all changes
+** that have occurred since the specified savepoint was created.
+**
+** The savepoint to rollback or release is identified by parameter 
+** iSavepoint. A value of 0 means to operate on the outermost savepoint
+** (the first created). A value of (Pager.nSavepoint-1) means operate
+** on the most recently created savepoint. If iSavepoint is greater than
+** (Pager.nSavepoint-1), then this function is a no-op.
+**
+** If a negative value is passed to this function, then the current
+** transaction is rolled back. This is different to calling 
+** sqlite3PagerRollback() because this function does not terminate
+** the transaction or unlock the database, it just restores the 
+** contents of the database to its original state. 
+**
+** In any case, all savepoints with an index greater than iSavepoint 
+** are destroyed. If this is a release operation (op==SAVEPOINT_RELEASE),
+** then savepoint iSavepoint is also destroyed.
+**
+** This function may return SQLITE_NOMEM if a memory allocation fails,
+** or an IO error code if an IO error occurs while rolling back a 
+** savepoint. If no errors occur, SQLITE_OK is returned.
+*/ 
+SQLITE_PRIVATE int sqlite3PagerSavepoint(Pager *pPager, int op, int iSavepoint){
+  int rc = pPager->errCode;       /* Return code */
+
+  assert( op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK );
+  assert( iSavepoint>=0 || op==SAVEPOINT_ROLLBACK );
+
+  if( rc==SQLITE_OK && iSavepoint<pPager->nSavepoint ){
+    int ii;            /* Iterator variable */
+    int nNew;          /* Number of remaining savepoints after this op. */
+
+    /* Figure out how many savepoints will still be active after this
+    ** operation. Store this value in nNew. Then free resources associated 
+    ** with any savepoints that are destroyed by this operation.
+    */
+    nNew = iSavepoint + (( op==SAVEPOINT_RELEASE ) ? 0 : 1);
+    for(ii=nNew; ii<pPager->nSavepoint; ii++){
+      sqlite3BitvecDestroy(pPager->aSavepoint[ii].pInSavepoint);
+    }
+    pPager->nSavepoint = nNew;
+
+    /* If this is a release of the outermost savepoint, truncate 
+    ** the sub-journal to zero bytes in size. */
+    if( op==SAVEPOINT_RELEASE ){
+      if( nNew==0 && isOpen(pPager->sjfd) ){
+        /* Only truncate if it is an in-memory sub-journal. */
+        if( sqlite3IsMemJournal(pPager->sjfd) ){
+          rc = sqlite3OsTruncate(pPager->sjfd, 0);
+          assert( rc==SQLITE_OK );
+        }
+        pPager->nSubRec = 0;
+      }
+    }
+    /* Else this is a rollback operation, playback the specified savepoint.
+    ** If this is a temp-file, it is possible that the journal file has
+    ** not yet been opened. In this case there have been no changes to
+    ** the database file, so the playback operation can be skipped.
+    */
+    else if( pagerUseWal(pPager) || isOpen(pPager->jfd) ){
+      PagerSavepoint *pSavepoint = (nNew==0)?0:&pPager->aSavepoint[nNew-1];
+      rc = pagerPlaybackSavepoint(pPager, pSavepoint);
+      assert(rc!=SQLITE_DONE);
+    }
+  }
+
+  return rc;
+}
+
+/*
+** Return the full pathname of the database file.
+*/
+SQLITE_PRIVATE const char *sqlite3PagerFilename(Pager *pPager){
+  return pPager->zFilename;
+}
+
+/*
+** Return the VFS structure for the pager.
+*/
+SQLITE_PRIVATE const sqlite3_vfs *sqlite3PagerVfs(Pager *pPager){
+  return pPager->pVfs;
+}
+
+/*
+** Return the file handle for the database file associated
+** with the pager.  This might return NULL if the file has
+** not yet been opened.
+*/
+SQLITE_PRIVATE sqlite3_file *sqlite3PagerFile(Pager *pPager){
+  return pPager->fd;
+}
+
+/*
+** Return the full pathname of the journal file.
+*/
+SQLITE_PRIVATE const char *sqlite3PagerJournalname(Pager *pPager){
+  return pPager->zJournal;
+}
+
+/*
+** Return true if fsync() calls are disabled for this pager.  Return FALSE
+** if fsync()s are executed normally.
+*/
+SQLITE_PRIVATE int sqlite3PagerNosync(Pager *pPager){
+  return pPager->noSync;
+}
+
+#ifdef SQLITE_HAS_CODEC
+/*
+** Set or retrieve the codec for this pager
+*/
+SQLITE_PRIVATE void sqlite3PagerSetCodec(
+  Pager *pPager,
+  void *(*xCodec)(void*,void*,Pgno,int),
+  void (*xCodecSizeChng)(void*,int,int),
+  void (*xCodecFree)(void*),
+  void *pCodec
+){
+  if( pPager->xCodecFree ) pPager->xCodecFree(pPager->pCodec);
+  pPager->xCodec = pPager->memDb ? 0 : xCodec;
+  pPager->xCodecSizeChng = xCodecSizeChng;
+  pPager->xCodecFree = xCodecFree;
+  pPager->pCodec = pCodec;
+  pagerReportSize(pPager);
+}
+SQLITE_PRIVATE void *sqlite3PagerGetCodec(Pager *pPager){
+  return pPager->pCodec;
+}
+#endif
+
+#ifndef SQLITE_OMIT_AUTOVACUUM
+/*
+** Move the page pPg to location pgno in the file.
+**
+** There must be no references to the page previously located at
+** pgno (which we call pPgOld) though that page is allowed to be
+** in cache.  If the page previously located at pgno is not already
+** in the rollback journal, it is not put there by by this routine.
+**
+** References to the page pPg remain valid. Updating any
+** meta-data associated with pPg (i.e. data stored in the nExtra bytes
+** allocated along with the page) is the responsibility of the caller.
+**
+** A transaction must be active when this routine is called. It used to be
+** required that a statement transaction was not active, but this restriction
+** has been removed (CREATE INDEX needs to move a page when a statement
+** transaction is active).
+**
+** If the fourth argument, isCommit, is non-zero, then this page is being
+** moved as part of a database reorganization just before the transaction 
+** is being committed. In this case, it is guaranteed that the database page 
+** pPg refers to will not be written to again within this transaction.
+**
+** This function may return SQLITE_NOMEM or an IO error code if an error
+** occurs. Otherwise, it returns SQLITE_OK.
+*/
+SQLITE_PRIVATE int sqlite3PagerMovepage(Pager *pPager, DbPage *pPg, Pgno pgno, int isCommit){
+  PgHdr *pPgOld;               /* The page being overwritten. */
+  Pgno needSyncPgno = 0;       /* Old value of pPg->pgno, if sync is required */
+  int rc;                      /* Return code */
+  Pgno origPgno;               /* The original page number */
+
+  assert( pPg->nRef>0 );
+  assert( pPager->eState==PAGER_WRITER_CACHEMOD
+       || pPager->eState==PAGER_WRITER_DBMOD
+  );
+  assert( assert_pager_state(pPager) );
+
+  /* In order to be able to rollback, an in-memory database must journal
+  ** the page we are moving from.
+  */
+  if( MEMDB ){
+    rc = sqlite3PagerWrite(pPg);
+    if( rc ) return rc;
+  }
+
+  /* If the page being moved is dirty and has not been saved by the latest
+  ** savepoint, then save the current contents of the page into the 
+  ** sub-journal now. This is required to handle the following scenario:
+  **
+  **   BEGIN;
+  **     <journal page X, then modify it in memory>
+  **     SAVEPOINT one;
+  **       <Move page X to location Y>
+  **     ROLLBACK TO one;
+  **
+  ** If page X were not written to the sub-journal here, it would not
+  ** be possible to restore its contents when the "ROLLBACK TO one"
+  ** statement were is processed.
+  **
+  ** subjournalPage() may need to allocate space to store pPg->pgno into
+  ** one or more savepoint bitvecs. This is the reason this function
+  ** may return SQLITE_NOMEM.
+  */
+  if( pPg->flags&PGHDR_DIRTY
+   && subjRequiresPage(pPg)
+   && SQLITE_OK!=(rc = subjournalPage(pPg))
+  ){
+    return rc;
+  }
+
+  PAGERTRACE(("MOVE %d page %d (needSync=%d) moves to %d\n", 
+      PAGERID(pPager), pPg->pgno, (pPg->flags&PGHDR_NEED_SYNC)?1:0, pgno));
+  IOTRACE(("MOVE %p %d %d\n", pPager, pPg->pgno, pgno))
+
+  /* If the journal needs to be sync()ed before page pPg->pgno can
+  ** be written to, store pPg->pgno in local variable needSyncPgno.
+  **
+  ** If the isCommit flag is set, there is no need to remember that
+  ** the journal needs to be sync()ed before database page pPg->pgno 
+  ** can be written to. The caller has already promised not to write to it.
+  */
+  if( (pPg->flags&PGHDR_NEED_SYNC) && !isCommit ){
+    needSyncPgno = pPg->pgno;
+    assert( pageInJournal(pPg) || pPg->pgno>pPager->dbOrigSize );
+    assert( pPg->flags&PGHDR_DIRTY );
+  }
+
+  /* If the cache contains a page with page-number pgno, remove it
+  ** from its hash chain. Also, if the PGHDR_NEED_SYNC flag was set for 
+  ** page pgno before the 'move' operation, it needs to be retained 
+  ** for the page moved there.
+  */
+  pPg->flags &= ~PGHDR_NEED_SYNC;
+  pPgOld = pager_lookup(pPager, pgno);
+  assert( !pPgOld || pPgOld->nRef==1 );
+  if( pPgOld ){
+    pPg->flags |= (pPgOld->flags&PGHDR_NEED_SYNC);
+    if( MEMDB ){
+      /* Do not discard pages from an in-memory database since we might
+      ** need to rollback later.  Just move the page out of the way. */
+      sqlite3PcacheMove(pPgOld, pPager->dbSize+1);
+    }else{
+      sqlite3PcacheDrop(pPgOld);
+    }
+  }
+
+  origPgno = pPg->pgno;
+  sqlite3PcacheMove(pPg, pgno);
+  sqlite3PcacheMakeDirty(pPg);
+
+  /* For an in-memory database, make sure the original page continues
+  ** to exist, in case the transaction needs to roll back.  Use pPgOld
+  ** as the original page since it has already been allocated.
+  */
+  if( MEMDB ){
+    assert( pPgOld );
+    sqlite3PcacheMove(pPgOld, origPgno);
+    sqlite3PagerUnref(pPgOld);
+  }
+
+  if( needSyncPgno ){
+    /* If needSyncPgno is non-zero, then the journal file needs to be 
+    ** sync()ed before any data is written to database file page needSyncPgno.
+    ** Currently, no such page exists in the page-cache and the 
+    ** "is journaled" bitvec flag has been set. This needs to be remedied by
+    ** loading the page into the pager-cache and setting the PGHDR_NEED_SYNC
+    ** flag.
+    **
+    ** If the attempt to load the page into the page-cache fails, (due
+    ** to a malloc() or IO failure), clear the bit in the pInJournal[]
+    ** array. Otherwise, if the page is loaded and written again in
+    ** this transaction, it may be written to the database file before
+    ** it is synced into the journal file. This way, it may end up in
+    ** the journal file twice, but that is not a problem.
+    */
+    PgHdr *pPgHdr;
+    rc = sqlite3PagerGet(pPager, needSyncPgno, &pPgHdr);
+    if( rc!=SQLITE_OK ){
+      if( needSyncPgno<=pPager->dbOrigSize ){
+        assert( pPager->pTmpSpace!=0 );
+        sqlite3BitvecClear(pPager->pInJournal, needSyncPgno, pPager->pTmpSpace);
+      }
+      return rc;
+    }
+    pPgHdr->flags |= PGHDR_NEED_SYNC;
+    sqlite3PcacheMakeDirty(pPgHdr);
+    sqlite3PagerUnref(pPgHdr);
+  }
+
+  return SQLITE_OK;
+}
+#endif
+
+/*
+** Return a pointer to the data for the specified page.
+*/
+SQLITE_PRIVATE void *sqlite3PagerGetData(DbPage *pPg){
+  assert( pPg->nRef>0 || pPg->pPager->memDb );
+  return pPg->pData;
+}
+
+/*
+** Return a pointer to the Pager.nExtra bytes of "extra" space 
+** allocated along with the specified page.
+*/
+SQLITE_PRIVATE void *sqlite3PagerGetExtra(DbPage *pPg){
+  return pPg->pExtra;
+}
+
+/*
+** Get/set the locking-mode for this pager. Parameter eMode must be one
+** of PAGER_LOCKINGMODE_QUERY, PAGER_LOCKINGMODE_NORMAL or 
+** PAGER_LOCKINGMODE_EXCLUSIVE. If the parameter is not _QUERY, then
+** the locking-mode is set to the value specified.
+**
+** The returned value is either PAGER_LOCKINGMODE_NORMAL or
+** PAGER_LOCKINGMODE_EXCLUSIVE, indicating the current (possibly updated)
+** locking-mode.
+*/
+SQLITE_PRIVATE int sqlite3PagerLockingMode(Pager *pPager, int eMode){
+  assert( eMode==PAGER_LOCKINGMODE_QUERY
+            || eMode==PAGER_LOCKINGMODE_NORMAL
+            || eMode==PAGER_LOCKINGMODE_EXCLUSIVE );
+  assert( PAGER_LOCKINGMODE_QUERY<0 );
+  assert( PAGER_LOCKINGMODE_NORMAL>=0 && PAGER_LOCKINGMODE_EXCLUSIVE>=0 );
+  assert( pPager->exclusiveMode || 0==sqlite3WalHeapMemory(pPager->pWal) );
+  if( eMode>=0 && !pPager->tempFile && !sqlite3WalHeapMemory(pPager->pWal) ){
+    pPager->exclusiveMode = (u8)eMode;
+  }
+  return (int)pPager->exclusiveMode;
+}
+
+/*
+** Set the journal-mode for this pager. Parameter eMode must be one of:
+**
+**    PAGER_JOURNALMODE_DELETE
+**    PAGER_JOURNALMODE_TRUNCATE
+**    PAGER_JOURNALMODE_PERSIST
+**    PAGER_JOURNALMODE_OFF
+**    PAGER_JOURNALMODE_MEMORY
+**    PAGER_JOURNALMODE_WAL
+**
+** The journalmode is set to the value specified if the change is allowed.
+** The change may be disallowed for the following reasons:
+**
+**   *  An in-memory database can only have its journal_mode set to _OFF
+**      or _MEMORY.
+**
+**   *  Temporary databases cannot have _WAL journalmode.
+**
+** The returned indicate the current (possibly updated) journal-mode.
+*/
+SQLITE_PRIVATE int sqlite3PagerSetJournalMode(Pager *pPager, int eMode){
+  u8 eOld = pPager->journalMode;    /* Prior journalmode */
+
+#ifdef SQLITE_DEBUG
+  /* The print_pager_state() routine is intended to be used by the debugger
+  ** only.  We invoke it once here to suppress a compiler warning. */
+  print_pager_state(pPager);
+#endif
+
+
+  /* The eMode parameter is always valid */
+  assert(      eMode==PAGER_JOURNALMODE_DELETE
+            || eMode==PAGER_JOURNALMODE_TRUNCATE
+            || eMode==PAGER_JOURNALMODE_PERSIST
+            || eMode==PAGER_JOURNALMODE_OFF 
+            || eMode==PAGER_JOURNALMODE_WAL 
+            || eMode==PAGER_JOURNALMODE_MEMORY );
+
+  /* This routine is only called from the OP_JournalMode opcode, and
+  ** the logic there will never allow a temporary file to be changed
+  ** to WAL mode.
+  */
+  assert( pPager->tempFile==0 || eMode!=PAGER_JOURNALMODE_WAL );
+
+  /* Do allow the journalmode of an in-memory database to be set to
+  ** anything other than MEMORY or OFF
+  */
+  if( MEMDB ){
+    assert( eOld==PAGER_JOURNALMODE_MEMORY || eOld==PAGER_JOURNALMODE_OFF );
+    if( eMode!=PAGER_JOURNALMODE_MEMORY && eMode!=PAGER_JOURNALMODE_OFF ){
+      eMode = eOld;
+    }
+  }
+
+  if( eMode!=eOld ){
+
+    /* Change the journal mode. */
+    assert( pPager->eState!=PAGER_ERROR );
+    pPager->journalMode = (u8)eMode;
+
+    /* When transistioning from TRUNCATE or PERSIST to any other journal
+    ** mode except WAL, unless the pager is in locking_mode=exclusive mode,
+    ** delete the journal file.
+    */
+    assert( (PAGER_JOURNALMODE_TRUNCATE & 5)==1 );
+    assert( (PAGER_JOURNALMODE_PERSIST & 5)==1 );
+    assert( (PAGER_JOURNALMODE_DELETE & 5)==0 );
+    assert( (PAGER_JOURNALMODE_MEMORY & 5)==4 );
+    assert( (PAGER_JOURNALMODE_OFF & 5)==0 );
+    assert( (PAGER_JOURNALMODE_WAL & 5)==5 );
+
+    assert( isOpen(pPager->fd) || pPager->exclusiveMode );
+    if( !pPager->exclusiveMode && (eOld & 5)==1 && (eMode & 1)==0 ){
+
+      /* In this case we would like to delete the journal file. If it is
+      ** not possible, then that is not a problem. Deleting the journal file
+      ** here is an optimization only.
+      **
+      ** Before deleting the journal file, obtain a RESERVED lock on the
+      ** database file. This ensures that the journal file is not deleted
+      ** while it is in use by some other client.
+      */
+      sqlite3OsClose(pPager->jfd);
+      if( pPager->eLock>=RESERVED_LOCK ){
+        sqlite3OsDelete(pPager->pVfs, pPager->zJournal, 0);
+      }else{
+        int rc = SQLITE_OK;
+        int state = pPager->eState;
+        assert( state==PAGER_OPEN || state==PAGER_READER );
+        if( state==PAGER_OPEN ){
+          rc = sqlite3PagerSharedLock(pPager);
+        }
+        if( pPager->eState==PAGER_READER ){
+          assert( rc==SQLITE_OK );
+          rc = pagerLockDb(pPager, RESERVED_LOCK);
+        }
+        if( rc==SQLITE_OK ){
+          sqlite3OsDelete(pPager->pVfs, pPager->zJournal, 0);
+        }
+        if( rc==SQLITE_OK && state==PAGER_READER ){
+          pagerUnlockDb(pPager, SHARED_LOCK);
+        }else if( state==PAGER_OPEN ){
+          pager_unlock(pPager);
+        }
+        assert( state==pPager->eState );
+      }
+    }
+  }
+
+  /* Return the new journal mode */
+  return (int)pPager->journalMode;
+}
+
+/*
+** Return the current journal mode.
+*/
+SQLITE_PRIVATE int sqlite3PagerGetJournalMode(Pager *pPager){
+  return (int)pPager->journalMode;
+}
+
+/*
+** Return TRUE if the pager is in a state where it is OK to change the
+** journalmode.  Journalmode changes can only happen when the database
+** is unmodified.
+*/
+SQLITE_PRIVATE int sqlite3PagerOkToChangeJournalMode(Pager *pPager){
+  assert( assert_pager_state(pPager) );
+  if( pPager->eState>=PAGER_WRITER_CACHEMOD ) return 0;
+  if( NEVER(isOpen(pPager->jfd) && pPager->journalOff>0) ) return 0;
+  return 1;
+}
+
+/*
+** Get/set the size-limit used for persistent journal files.
+**
+** Setting the size limit to -1 means no limit is enforced.
+** An attempt to set a limit smaller than -1 is a no-op.
+*/
+SQLITE_PRIVATE i64 sqlite3PagerJournalSizeLimit(Pager *pPager, i64 iLimit){
+  if( iLimit>=-1 ){
+    pPager->journalSizeLimit = iLimit;
+  }
+  return pPager->journalSizeLimit;
+}
+
+/*
+** Return a pointer to the pPager->pBackup variable. The backup module
+** in backup.c maintains the content of this variable. This module
+** uses it opaquely as an argument to sqlite3BackupRestart() and
+** sqlite3BackupUpdate() only.
+*/
+SQLITE_PRIVATE sqlite3_backup **sqlite3PagerBackupPtr(Pager *pPager){
+  return &pPager->pBackup;
+}
+
+#ifndef SQLITE_OMIT_WAL
+/*
+** This function is called when the user invokes "PRAGMA wal_checkpoint",
+** "PRAGMA wal_blocking_checkpoint" or calls the sqlite3_wal_checkpoint()
+** or wal_blocking_checkpoint() API functions.
+**
+** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
+*/
+SQLITE_PRIVATE int sqlite3PagerCheckpoint(Pager *pPager, int eMode, int *pnLog, int *pnCkpt){
+  int rc = SQLITE_OK;
+  if( pPager->pWal ){
+    rc = sqlite3WalCheckpoint(pPager->pWal, eMode,
+        pPager->xBusyHandler, pPager->pBusyHandlerArg,
+        pPager->ckptSyncFlags, pPager->pageSize, (u8 *)pPager->pTmpSpace,
+        pnLog, pnCkpt
+    );
+  }
+  return rc;
+}
+
+SQLITE_PRIVATE int sqlite3PagerWalCallback(Pager *pPager){
+  return sqlite3WalCallback(pPager->pWal);
+}
+
+/*
+** Return true if the underlying VFS for the given pager supports the
+** primitives necessary for write-ahead logging.
+*/
+SQLITE_PRIVATE int sqlite3PagerWalSupported(Pager *pPager){
+  const sqlite3_io_methods *pMethods = pPager->fd->pMethods;
+  return pPager->exclusiveMode || (pMethods->iVersion>=2 && pMethods->xShmMap);
+}
+
+/*
+** Attempt to take an exclusive lock on the database file. If a PENDING lock
+** is obtained instead, immediately release it.
+*/
+static int pagerExclusiveLock(Pager *pPager){
+  int rc;                         /* Return code */
+
+  assert( pPager->eLock==SHARED_LOCK || pPager->eLock==EXCLUSIVE_LOCK );
+  rc = pagerLockDb(pPager, EXCLUSIVE_LOCK);
+  if( rc!=SQLITE_OK ){
+    /* If the attempt to grab the exclusive lock failed, release the 
+    ** pending lock that may have been obtained instead.  */
+    pagerUnlockDb(pPager, SHARED_LOCK);
+  }
+
+  return rc;
+}
+
+/*
+** Call sqlite3WalOpen() to open the WAL handle. If the pager is in 
+** exclusive-locking mode when this function is called, take an EXCLUSIVE
+** lock on the database file and use heap-memory to store the wal-index
+** in. Otherwise, use the normal shared-memory.
+*/
+static int pagerOpenWal(Pager *pPager){
+  int rc = SQLITE_OK;
+
+  assert( pPager->pWal==0 && pPager->tempFile==0 );
+  assert( pPager->eLock==SHARED_LOCK || pPager->eLock==EXCLUSIVE_LOCK || pPager->noReadlock);
+
+  /* If the pager is already in exclusive-mode, the WAL module will use 
+  ** heap-memory for the wal-index instead of the VFS shared-memory 
+  ** implementation. Take the exclusive lock now, before opening the WAL
+  ** file, to make sure this is safe.
+  */
+  if( pPager->exclusiveMode ){
+    rc = pagerExclusiveLock(pPager);
+  }
+
+  /* Open the connection to the log file. If this operation fails, 
+  ** (e.g. due to malloc() failure), return an error code.
+  */
+  if( rc==SQLITE_OK ){
+    rc = sqlite3WalOpen(pPager->pVfs, 
+        pPager->fd, pPager->zWal, pPager->exclusiveMode, &pPager->pWal
+    );
+  }
+
+  return rc;
+}
+
+
+/*
+** The caller must be holding a SHARED lock on the database file to call
+** this function.
+**
+** If the pager passed as the first argument is open on a real database
+** file (not a temp file or an in-memory database), and the WAL file
+** is not already open, make an attempt to open it now. If successful,
+** return SQLITE_OK. If an error occurs or the VFS used by the pager does 
+** not support the xShmXXX() methods, return an error code. *pbOpen is
+** not modified in either case.
+**
+** If the pager is open on a temp-file (or in-memory database), or if
+** the WAL file is already open, set *pbOpen to 1 and return SQLITE_OK
+** without doing anything.
+*/
+SQLITE_PRIVATE int sqlite3PagerOpenWal(
+  Pager *pPager,                  /* Pager object */
+  int *pbOpen                     /* OUT: Set to true if call is a no-op */
+){
+  int rc = SQLITE_OK;             /* Return code */
+
+  assert( assert_pager_state(pPager) );
+  assert( pPager->eState==PAGER_OPEN   || pbOpen );
+  assert( pPager->eState==PAGER_READER || !pbOpen );
+  assert( pbOpen==0 || *pbOpen==0 );
+  assert( pbOpen!=0 || (!pPager->tempFile && !pPager->pWal) );
+
+  if( !pPager->tempFile && !pPager->pWal ){
+    if( !sqlite3PagerWalSupported(pPager) ) return SQLITE_CANTOPEN;
+
+    /* Close any rollback journal previously open */
+    sqlite3OsClose(pPager->jfd);
+
+    rc = pagerOpenWal(pPager);
+    if( rc==SQLITE_OK ){
+      pPager->journalMode = PAGER_JOURNALMODE_WAL;
+      pPager->eState = PAGER_OPEN;
+    }
+  }else{
+    *pbOpen = 1;
+  }
+
+  return rc;
+}
+
+/*
+** This function is called to close the connection to the log file prior
+** to switching from WAL to rollback mode.
+**
+** Before closing the log file, this function attempts to take an 
+** EXCLUSIVE lock on the database file. If this cannot be obtained, an
+** error (SQLITE_BUSY) is returned and the log connection is not closed.
+** If successful, the EXCLUSIVE lock is not released before returning.
+*/
+SQLITE_PRIVATE int sqlite3PagerCloseWal(Pager *pPager){
+  int rc = SQLITE_OK;
+
+  assert( pPager->journalMode==PAGER_JOURNALMODE_WAL );
+
+  /* If the log file is not already open, but does exist in the file-system,
+  ** it may need to be checkpointed before the connection can switch to
+  ** rollback mode. Open it now so this can happen.
+  */
+  if( !pPager->pWal ){
+    int logexists = 0;
+    rc = pagerLockDb(pPager, SHARED_LOCK);
+    if( rc==SQLITE_OK ){
+      rc = sqlite3OsAccess(
+          pPager->pVfs, pPager->zWal, SQLITE_ACCESS_EXISTS, &logexists
+      );
+    }
+    if( rc==SQLITE_OK && logexists ){
+      rc = pagerOpenWal(pPager);
+    }
+  }
+    
+  /* Checkpoint and close the log. Because an EXCLUSIVE lock is held on
+  ** the database file, the log and log-summary files will be deleted.
+  */
+  if( rc==SQLITE_OK && pPager->pWal ){
+    rc = pagerExclusiveLock(pPager);
+    if( rc==SQLITE_OK ){
+      rc = sqlite3WalClose(pPager->pWal, pPager->ckptSyncFlags,
+                           pPager->pageSize, (u8*)pPager->pTmpSpace);
+      pPager->pWal = 0;
+    }
+  }
+  return rc;
+}
+
+#ifdef SQLITE_HAS_CODEC
+/*
+** This function is called by the wal module when writing page content
+** into the log file.
+**
+** This function returns a pointer to a buffer containing the encrypted
+** page content. If a malloc fails, this function may return NULL.
+*/
+SQLITE_PRIVATE void *sqlite3PagerCodec(PgHdr *pPg){
+  void *aData = 0;
+  CODEC2(pPg->pPager, pPg->pData, pPg->pgno, 6, return 0, aData);
+  return aData;
+}
+#endif /* SQLITE_HAS_CODEC */
+
+#endif /* !SQLITE_OMIT_WAL */
+
+#endif /* SQLITE_OMIT_DISKIO */
+
+/************** End of pager.c ***********************************************/
+/************** Begin file wal.c *********************************************/
+/*
+** 2010 February 1
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains the implementation of a write-ahead log (WAL) used in 
+** "journal_mode=WAL" mode.
+**
+** WRITE-AHEAD LOG (WAL) FILE FORMAT
+**
+** A WAL file consists of a header followed by zero or more "frames".
+** Each frame records the revised content of a single page from the
+** database file.  All changes to the database are recorded by writing
+** frames into the WAL.  Transactions commit when a frame is written that
+** contains a commit marker.  A single WAL can and usually does record 
+** multiple transactions.  Periodically, the content of the WAL is
+** transferred back into the database file in an operation called a
+** "checkpoint".
+**
+** A single WAL file can be used multiple times.  In other words, the
+** WAL can fill up with frames and then be checkpointed and then new
+** frames can overwrite the old ones.  A WAL always grows from beginning
+** toward the end.  Checksums and counters attached to each frame are
+** used to determine which frames within the WAL are valid and which
+** are leftovers from prior checkpoints.
+**
+** The WAL header is 32 bytes in size and consists of the following eight
+** big-endian 32-bit unsigned integer values:
+**
+**     0: Magic number.  0x377f0682 or 0x377f0683
+**     4: File format version.  Currently 3007000
+**     8: Database page size.  Example: 1024
+**    12: Checkpoint sequence number
+**    16: Salt-1, random integer incremented with each checkpoint
+**    20: Salt-2, a different random integer changing with each ckpt
+**    24: Checksum-1 (first part of checksum for first 24 bytes of header).
+**    28: Checksum-2 (second part of checksum for first 24 bytes of header).
+**
+** Immediately following the wal-header are zero or more frames. Each
+** frame consists of a 24-byte frame-header followed by a <page-size> bytes
+** of page data. The frame-header is six big-endian 32-bit unsigned 
+** integer values, as follows:
+**
+**     0: Page number.
+**     4: For commit records, the size of the database image in pages 
+**        after the commit. For all other records, zero.
+**     8: Salt-1 (copied from the header)
+**    12: Salt-2 (copied from the header)
+**    16: Checksum-1.
+**    20: Checksum-2.
+**
+** A frame is considered valid if and only if the following conditions are
+** true:
+**
+**    (1) The salt-1 and salt-2 values in the frame-header match
+**        salt values in the wal-header
+**
+**    (2) The checksum values in the final 8 bytes of the frame-header
+**        exactly match the checksum computed consecutively on the
+**        WAL header and the first 8 bytes and the content of all frames
+**        up to and including the current frame.
+**
+** The checksum is computed using 32-bit big-endian integers if the
+** magic number in the first 4 bytes of the WAL is 0x377f0683 and it
+** is computed using little-endian if the magic number is 0x377f0682.
+** The checksum values are always stored in the frame header in a
+** big-endian format regardless of which byte order is used to compute
+** the checksum.  The checksum is computed by interpreting the input as
+** an even number of unsigned 32-bit integers: x[0] through x[N].  The
+** algorithm used for the checksum is as follows:
+** 
+**   for i from 0 to n-1 step 2:
+**     s0 += x[i] + s1;
+**     s1 += x[i+1] + s0;
+**   endfor
+**
+** Note that s0 and s1 are both weighted checksums using fibonacci weights
+** in reverse order (the largest fibonacci weight occurs on the first element
+** of the sequence being summed.)  The s1 value spans all 32-bit 
+** terms of the sequence whereas s0 omits the final term.
+**
+** On a checkpoint, the WAL is first VFS.xSync-ed, then valid content of the
+** WAL is transferred into the database, then the database is VFS.xSync-ed.
+** The VFS.xSync operations serve as write barriers - all writes launched
+** before the xSync must complete before any write that launches after the
+** xSync begins.
+**
+** After each checkpoint, the salt-1 value is incremented and the salt-2
+** value is randomized.  This prevents old and new frames in the WAL from
+** being considered valid at the same time and being checkpointing together
+** following a crash.
+**
+** READER ALGORITHM
+**
+** To read a page from the database (call it page number P), a reader
+** first checks the WAL to see if it contains page P.  If so, then the
+** last valid instance of page P that is a followed by a commit frame
+** or is a commit frame itself becomes the value read.  If the WAL
+** contains no copies of page P that are valid and which are a commit
+** frame or are followed by a commit frame, then page P is read from
+** the database file.
+**
+** To start a read transaction, the reader records the index of the last
+** valid frame in the WAL.  The reader uses this recorded "mxFrame" value
+** for all subsequent read operations.  New transactions can be appended
+** to the WAL, but as long as the reader uses its original mxFrame value
+** and ignores the newly appended content, it will see a consistent snapshot
+** of the database from a single point in time.  This technique allows
+** multiple concurrent readers to view different versions of the database
+** content simultaneously.
+**
+** The reader algorithm in the previous paragraphs works correctly, but 
+** because frames for page P can appear anywhere within the WAL, the
+** reader has to scan the entire WAL looking for page P frames.  If the
+** WAL is large (multiple megabytes is typical) that scan can be slow,
+** and read performance suffers.  To overcome this problem, a separate
+** data structure called the wal-index is maintained to expedite the
+** search for frames of a particular page.
+** 
+** WAL-INDEX FORMAT
+**
+** Conceptually, the wal-index is shared memory, though VFS implementations
+** might choose to implement the wal-index using a mmapped file.  Because
+** the wal-index is shared memory, SQLite does not support journal_mode=WAL 
+** on a network filesystem.  All users of the database must be able to
+** share memory.
+**
+** The wal-index is transient.  After a crash, the wal-index can (and should
+** be) reconstructed from the original WAL file.  In fact, the VFS is required
+** to either truncate or zero the header of the wal-index when the last
+** connection to it closes.  Because the wal-index is transient, it can
+** use an architecture-specific format; it does not have to be cross-platform.
+** Hence, unlike the database and WAL file formats which store all values
+** as big endian, the wal-index can store multi-byte values in the native
+** byte order of the host computer.
+**
+** The purpose of the wal-index is to answer this question quickly:  Given
+** a page number P, return the index of the last frame for page P in the WAL,
+** or return NULL if there are no frames for page P in the WAL.
+**
+** The wal-index consists of a header region, followed by an one or
+** more index blocks.  
+**
+** The wal-index header contains the total number of frames within the WAL
+** in the the mxFrame field.  
+**
+** Each index block except for the first contains information on 
+** HASHTABLE_NPAGE frames. The first index block contains information on
+** HASHTABLE_NPAGE_ONE frames. The values of HASHTABLE_NPAGE_ONE and 
+** HASHTABLE_NPAGE are selected so that together the wal-index header and
+** first index block are the same size as all other index blocks in the
+** wal-index.
+**
+** Each index block contains two sections, a page-mapping that contains the
+** database page number associated with each wal frame, and a hash-table 
+** that allows readers to query an index block for a specific page number.
+** The page-mapping is an array of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE
+** for the first index block) 32-bit page numbers. The first entry in the 
+** first index-block contains the database page number corresponding to the
+** first frame in the WAL file. The first entry in the second index block
+** in the WAL file corresponds to the (HASHTABLE_NPAGE_ONE+1)th frame in
+** the log, and so on.
+**
+** The last index block in a wal-index usually contains less than the full
+** complement of HASHTABLE_NPAGE (or HASHTABLE_NPAGE_ONE) page-numbers,
+** depending on the contents of the WAL file. This does not change the
+** allocated size of the page-mapping array - the page-mapping array merely
+** contains unused entries.
+**
+** Even without using the hash table, the last frame for page P
+** can be found by scanning the page-mapping sections of each index block
+** starting with the last index block and moving toward the first, and
+** within each index block, starting at the end and moving toward the
+** beginning.  The first entry that equals P corresponds to the frame
+** holding the content for that page.
+**
+** The hash table consists of HASHTABLE_NSLOT 16-bit unsigned integers.
+** HASHTABLE_NSLOT = 2*HASHTABLE_NPAGE, and there is one entry in the
+** hash table for each page number in the mapping section, so the hash 
+** table is never more than half full.  The expected number of collisions 
+** prior to finding a match is 1.  Each entry of the hash table is an
+** 1-based index of an entry in the mapping section of the same
+** index block.   Let K be the 1-based index of the largest entry in
+** the mapping section.  (For index blocks other than the last, K will
+** always be exactly HASHTABLE_NPAGE (4096) and for the last index block
+** K will be (mxFrame%HASHTABLE_NPAGE).)  Unused slots of the hash table
+** contain a value of 0.
+**
+** To look for page P in the hash table, first compute a hash iKey on
+** P as follows:
+**
+**      iKey = (P * 383) % HASHTABLE_NSLOT
+**
+** Then start scanning entries of the hash table, starting with iKey
+** (wrapping around to the beginning when the end of the hash table is
+** reached) until an unused hash slot is found. Let the first unused slot
+** be at index iUnused.  (iUnused might be less than iKey if there was
+** wrap-around.) Because the hash table is never more than half full,
+** the search is guaranteed to eventually hit an unused entry.  Let 
+** iMax be the value between iKey and iUnused, closest to iUnused,
+** where aHash[iMax]==P.  If there is no iMax entry (if there exists
+** no hash slot such that aHash[i]==p) then page P is not in the
+** current index block.  Otherwise the iMax-th mapping entry of the
+** current index block corresponds to the last entry that references 
+** page P.
+**
+** A hash search begins with the last index block and moves toward the
+** first index block, looking for entries corresponding to page P.  On
+** average, only two or three slots in each index block need to be
+** examined in order to either find the last entry for page P, or to
+** establish that no such entry exists in the block.  Each index block
+** holds over 4000 entries.  So two or three index blocks are sufficient
+** to cover a typical 10 megabyte WAL file, assuming 1K pages.  8 or 10
+** comparisons (on average) suffice to either locate a frame in the
+** WAL or to establish that the frame does not exist in the WAL.  This
+** is much faster than scanning the entire 10MB WAL.
+**
+** Note that entries are added in order of increasing K.  Hence, one
+** reader might be using some value K0 and a second reader that started
+** at a later time (after additional transactions were added to the WAL
+** and to the wal-index) might be using a different value K1, where K1>K0.
+** Both readers can use the same hash table and mapping section to get
+** the correct result.  There may be entries in the hash table with
+** K>K0 but to the first reader, those entries will appear to be unused
+** slots in the hash table and so the first reader will get an answer as
+** if no values greater than K0 had ever been inserted into the hash table
+** in the first place - which is what reader one wants.  Meanwhile, the
+** second reader using K1 will see additional values that were inserted
+** later, which is exactly what reader two wants.  
+**
+** When a rollback occurs, the value of K is decreased. Hash table entries
+** that correspond to frames greater than the new K value are removed
+** from the hash table at this point.
+*/
+#ifndef SQLITE_OMIT_WAL
+
+
+/*
+** Trace output macros
+*/
+#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)
+SQLITE_PRIVATE int sqlite3WalTrace = 0;
+# define WALTRACE(X)  if(sqlite3WalTrace) sqlite3DebugPrintf X
+#else
+# define WALTRACE(X)
+#endif
+
+/*
+** The maximum (and only) versions of the wal and wal-index formats
+** that may be interpreted by this version of SQLite.
+**
+** If a client begins recovering a WAL file and finds that (a) the checksum
+** values in the wal-header are correct and (b) the version field is not
+** WAL_MAX_VERSION, recovery fails and SQLite returns SQLITE_CANTOPEN.
+**
+** Similarly, if a client successfully reads a wal-index header (i.e. the 
+** checksum test is successful) and finds that the version field is not
+** WALINDEX_MAX_VERSION, then no read-transaction is opened and SQLite
+** returns SQLITE_CANTOPEN.
+*/
+#define WAL_MAX_VERSION      3007000
+#define WALINDEX_MAX_VERSION 3007000
+
+/*
+** Indices of various locking bytes.   WAL_NREADER is the number
+** of available reader locks and should be at least 3.
+*/
+#define WAL_WRITE_LOCK         0
+#define WAL_ALL_BUT_WRITE      1
+#define WAL_CKPT_LOCK          1
+#define WAL_RECOVER_LOCK       2
+#define WAL_READ_LOCK(I)       (3+(I))
+#define WAL_NREADER            (SQLITE_SHM_NLOCK-3)
+
+
+/* Object declarations */
+typedef struct WalIndexHdr WalIndexHdr;
+typedef struct WalIterator WalIterator;
+typedef struct WalCkptInfo WalCkptInfo;
+
+
+/*
+** The following object holds a copy of the wal-index header content.
+**
+** The actual header in the wal-index consists of two copies of this
+** object.
+**
+** The szPage value can be any power of 2 between 512 and 32768, inclusive.
+** Or it can be 1 to represent a 65536-byte page.  The latter case was
+** added in 3.7.1 when support for 64K pages was added.  
+*/
+struct WalIndexHdr {
+  u32 iVersion;                   /* Wal-index version */
+  u32 unused;                     /* Unused (padding) field */
+  u32 iChange;                    /* Counter incremented each transaction */
+  u8 isInit;                      /* 1 when initialized */
+  u8 bigEndCksum;                 /* True if checksums in WAL are big-endian */
+  u16 szPage;                     /* Database page size in bytes. 1==64K */
+  u32 mxFrame;                    /* Index of last valid frame in the WAL */
+  u32 nPage;                      /* Size of database in pages */
+  u32 aFrameCksum[2];             /* Checksum of last frame in log */
+  u32 aSalt[2];                   /* Two salt values copied from WAL header */
+  u32 aCksum[2];                  /* Checksum over all prior fields */
+};
+
+/*
+** A copy of the following object occurs in the wal-index immediately
+** following the second copy of the WalIndexHdr.  This object stores
+** information used by checkpoint.
+**
+** nBackfill is the number of frames in the WAL that have been written
+** back into the database. (We call the act of moving content from WAL to
+** database "backfilling".)  The nBackfill number is never greater than
+** WalIndexHdr.mxFrame.  nBackfill can only be increased by threads
+** holding the WAL_CKPT_LOCK lock (which includes a recovery thread).
+** However, a WAL_WRITE_LOCK thread can move the value of nBackfill from
+** mxFrame back to zero when the WAL is reset.
+**
+** There is one entry in aReadMark[] for each reader lock.  If a reader
+** holds read-lock K, then the value in aReadMark[K] is no greater than
+** the mxFrame for that reader.  The value READMARK_NOT_USED (0xffffffff)
+** for any aReadMark[] means that entry is unused.  aReadMark[0] is 
+** a special case; its value is never used and it exists as a place-holder
+** to avoid having to offset aReadMark[] indexs by one.  Readers holding
+** WAL_READ_LOCK(0) always ignore the entire WAL and read all content
+** directly from the database.
+**
+** The value of aReadMark[K] may only be changed by a thread that
+** is holding an exclusive lock on WAL_READ_LOCK(K).  Thus, the value of
+** aReadMark[K] cannot changed while there is a reader is using that mark
+** since the reader will be holding a shared lock on WAL_READ_LOCK(K).
+**
+** The checkpointer may only transfer frames from WAL to database where
+** the frame numbers are less than or equal to every aReadMark[] that is
+** in use (that is, every aReadMark[j] for which there is a corresponding
+** WAL_READ_LOCK(j)).  New readers (usually) pick the aReadMark[] with the
+** largest value and will increase an unused aReadMark[] to mxFrame if there
+** is not already an aReadMark[] equal to mxFrame.  The exception to the
+** previous sentence is when nBackfill equals mxFrame (meaning that everything
+** in the WAL has been backfilled into the database) then new readers
+** will choose aReadMark[0] which has value 0 and hence such reader will
+** get all their all content directly from the database file and ignore 
+** the WAL.
+**
+** Writers normally append new frames to the end of the WAL.  However,
+** if nBackfill equals mxFrame (meaning that all WAL content has been
+** written back into the database) and if no readers are using the WAL
+** (in other words, if there are no WAL_READ_LOCK(i) where i>0) then
+** the writer will first "reset" the WAL back to the beginning and start
+** writing new content beginning at frame 1.
+**
+** We assume that 32-bit loads are atomic and so no locks are needed in
+** order to read from any aReadMark[] entries.
+*/
+struct WalCkptInfo {
+  u32 nBackfill;                  /* Number of WAL frames backfilled into DB */
+  u32 aReadMark[WAL_NREADER];     /* Reader marks */
+};
+#define READMARK_NOT_USED  0xffffffff
+
+
+/* A block of WALINDEX_LOCK_RESERVED bytes beginning at
+** WALINDEX_LOCK_OFFSET is reserved for locks. Since some systems
+** only support mandatory file-locks, we do not read or write data
+** from the region of the file on which locks are applied.
+*/
+#define WALINDEX_LOCK_OFFSET   (sizeof(WalIndexHdr)*2 + sizeof(WalCkptInfo))
+#define WALINDEX_LOCK_RESERVED 16
+#define WALINDEX_HDR_SIZE      (WALINDEX_LOCK_OFFSET+WALINDEX_LOCK_RESERVED)
+
+/* Size of header before each frame in wal */
+#define WAL_FRAME_HDRSIZE 24
+
+/* Size of write ahead log header, including checksum. */
+/* #define WAL_HDRSIZE 24 */
+#define WAL_HDRSIZE 32
+
+/* WAL magic value. Either this value, or the same value with the least
+** significant bit also set (WAL_MAGIC | 0x00000001) is stored in 32-bit
+** big-endian format in the first 4 bytes of a WAL file.
+**
+** If the LSB is set, then the checksums for each frame within the WAL
+** file are calculated by treating all data as an array of 32-bit 
+** big-endian words. Otherwise, they are calculated by interpreting 
+** all data as 32-bit little-endian words.
+*/
+#define WAL_MAGIC 0x377f0682
+
+/*
+** Return the offset of frame iFrame in the write-ahead log file, 
+** assuming a database page size of szPage bytes. The offset returned
+** is to the start of the write-ahead log frame-header.
+*/
+#define walFrameOffset(iFrame, szPage) (                               \
+  WAL_HDRSIZE + ((iFrame)-1)*(i64)((szPage)+WAL_FRAME_HDRSIZE)         \
+)
+
+/*
+** An open write-ahead log file is represented by an instance of the
+** following object.
+*/
+struct Wal {
+  sqlite3_vfs *pVfs;         /* The VFS used to create pDbFd */
+  sqlite3_file *pDbFd;       /* File handle for the database file */
+  sqlite3_file *pWalFd;      /* File handle for WAL file */
+  u32 iCallback;             /* Value to pass to log callback (or 0) */
+  int nWiData;               /* Size of array apWiData */
+  volatile u32 **apWiData;   /* Pointer to wal-index content in memory */
+  u32 szPage;                /* Database page size */
+  i16 readLock;              /* Which read lock is being held.  -1 for none */
+  u8 exclusiveMode;          /* Non-zero if connection is in exclusive mode */
+  u8 writeLock;              /* True if in a write transaction */
+  u8 ckptLock;               /* True if holding a checkpoint lock */
+  u8 readOnly;               /* True if the WAL file is open read-only */
+  WalIndexHdr hdr;           /* Wal-index header for current transaction */
+  const char *zWalName;      /* Name of WAL file */
+  u32 nCkpt;                 /* Checkpoint sequence counter in the wal-header */
+#ifdef SQLITE_DEBUG
+  u8 lockError;              /* True if a locking error has occurred */
+#endif
+};
+
+/*
+** Candidate values for Wal.exclusiveMode.
+*/
+#define WAL_NORMAL_MODE     0
+#define WAL_EXCLUSIVE_MODE  1     
+#define WAL_HEAPMEMORY_MODE 2
+
+/*
+** Each page of the wal-index mapping contains a hash-table made up of
+** an array of HASHTABLE_NSLOT elements of the following type.
+*/
+typedef u16 ht_slot;
+
+/*
+** This structure is used to implement an iterator that loops through
+** all frames in the WAL in database page order. Where two or more frames
+** correspond to the same database page, the iterator visits only the 
+** frame most recently written to the WAL (in other words, the frame with
+** the largest index).
+**
+** The internals of this structure are only accessed by:
+**
+**   walIteratorInit() - Create a new iterator,
+**   walIteratorNext() - Step an iterator,
+**   walIteratorFree() - Free an iterator.
+**
+** This functionality is used by the checkpoint code (see walCheckpoint()).
+*/
+struct WalIterator {
+  int iPrior;                     /* Last result returned from the iterator */
+  int nSegment;                   /* Number of entries in aSegment[] */
+  struct WalSegment {
+    int iNext;                    /* Next slot in aIndex[] not yet returned */
+    ht_slot *aIndex;              /* i0, i1, i2... such that aPgno[iN] ascend */
+    u32 *aPgno;                   /* Array of page numbers. */
+    int nEntry;                   /* Nr. of entries in aPgno[] and aIndex[] */
+    int iZero;                    /* Frame number associated with aPgno[0] */
+  } aSegment[1];                  /* One for every 32KB page in the wal-index */
+};
+
+/*
+** Define the parameters of the hash tables in the wal-index file. There
+** is a hash-table following every HASHTABLE_NPAGE page numbers in the
+** wal-index.
+**
+** Changing any of these constants will alter the wal-index format and
+** create incompatibilities.
+*/
+#define HASHTABLE_NPAGE      4096                 /* Must be power of 2 */
+#define HASHTABLE_HASH_1     383                  /* Should be prime */
+#define HASHTABLE_NSLOT      (HASHTABLE_NPAGE*2)  /* Must be a power of 2 */
+
+/* 
+** The block of page numbers associated with the first hash-table in a
+** wal-index is smaller than usual. This is so that there is a complete
+** hash-table on each aligned 32KB page of the wal-index.
+*/
+#define HASHTABLE_NPAGE_ONE  (HASHTABLE_NPAGE - (WALINDEX_HDR_SIZE/sizeof(u32)))
+
+/* The wal-index is divided into pages of WALINDEX_PGSZ bytes each. */
+#define WALINDEX_PGSZ   (                                         \
+    sizeof(ht_slot)*HASHTABLE_NSLOT + HASHTABLE_NPAGE*sizeof(u32) \
+)
+
+/*
+** Obtain a pointer to the iPage'th page of the wal-index. The wal-index
+** is broken into pages of WALINDEX_PGSZ bytes. Wal-index pages are
+** numbered from zero.
+**
+** If this call is successful, *ppPage is set to point to the wal-index
+** page and SQLITE_OK is returned. If an error (an OOM or VFS error) occurs,
+** then an SQLite error code is returned and *ppPage is set to 0.
+*/
+static int walIndexPage(Wal *pWal, int iPage, volatile u32 **ppPage){
+  int rc = SQLITE_OK;
+
+  /* Enlarge the pWal->apWiData[] array if required */
+  if( pWal->nWiData<=iPage ){
+    int nByte = sizeof(u32*)*(iPage+1);
+    volatile u32 **apNew;
+    apNew = (volatile u32 **)sqlite3_realloc((void *)pWal->apWiData, nByte);
+    if( !apNew ){
+      *ppPage = 0;
+      return SQLITE_NOMEM;
+    }
+    memset((void*)&apNew[pWal->nWiData], 0,
+           sizeof(u32*)*(iPage+1-pWal->nWiData));
+    pWal->apWiData = apNew;
+    pWal->nWiData = iPage+1;
+  }
+
+  /* Request a pointer to the required page from the VFS */
+  if( pWal->apWiData[iPage]==0 ){
+    if( pWal->exclusiveMode==WAL_HEAPMEMORY_MODE ){
+      pWal->apWiData[iPage] = (u32 volatile *)sqlite3MallocZero(WALINDEX_PGSZ);
+      if( !pWal->apWiData[iPage] ) rc = SQLITE_NOMEM;
+    }else{
+      rc = sqlite3OsShmMap(pWal->pDbFd, iPage, WALINDEX_PGSZ, 
+          pWal->writeLock, (void volatile **)&pWal->apWiData[iPage]
+      );
+    }
+  }
+
+  *ppPage = pWal->apWiData[iPage];
+  assert( iPage==0 || *ppPage || rc!=SQLITE_OK );
+  return rc;
+}
+
+/*
+** Return a pointer to the WalCkptInfo structure in the wal-index.
+*/
+static volatile WalCkptInfo *walCkptInfo(Wal *pWal){
+  assert( pWal->nWiData>0 && pWal->apWiData[0] );
+  return (volatile WalCkptInfo*)&(pWal->apWiData[0][sizeof(WalIndexHdr)/2]);
+}
+
+/*
+** Return a pointer to the WalIndexHdr structure in the wal-index.
+*/
+static volatile WalIndexHdr *walIndexHdr(Wal *pWal){
+  assert( pWal->nWiData>0 && pWal->apWiData[0] );
+  return (volatile WalIndexHdr*)pWal->apWiData[0];
+}
+
+/*
+** The argument to this macro must be of type u32. On a little-endian
+** architecture, it returns the u32 value that results from interpreting
+** the 4 bytes as a big-endian value. On a big-endian architecture, it
+** returns the value that would be produced by intepreting the 4 bytes
+** of the input value as a little-endian integer.
+*/
+#define BYTESWAP32(x) ( \
+    (((x)&0x000000FF)<<24) + (((x)&0x0000FF00)<<8)  \
+  + (((x)&0x00FF0000)>>8)  + (((x)&0xFF000000)>>24) \
+)
+
+/*
+** Generate or extend an 8 byte checksum based on the data in 
+** array aByte[] and the initial values of aIn[0] and aIn[1] (or
+** initial values of 0 and 0 if aIn==NULL).
+**
+** The checksum is written back into aOut[] before returning.
+**
+** nByte must be a positive multiple of 8.
+*/
+static void walChecksumBytes(
+  int nativeCksum, /* True for native byte-order, false for non-native */
+  u8 *a,           /* Content to be checksummed */
+  int nByte,       /* Bytes of content in a[].  Must be a multiple of 8. */
+  const u32 *aIn,  /* Initial checksum value input */
+  u32 *aOut        /* OUT: Final checksum value output */
+){
+  u32 s1, s2;
+  u32 *aData = (u32 *)a;
+  u32 *aEnd = (u32 *)&a[nByte];
+
+  if( aIn ){
+    s1 = aIn[0];
+    s2 = aIn[1];
+  }else{
+    s1 = s2 = 0;
+  }
+
+  assert( nByte>=8 );
+  assert( (nByte&0x00000007)==0 );
+
+  if( nativeCksum ){
+    do {
+      s1 += *aData++ + s2;
+      s2 += *aData++ + s1;
+    }while( aData<aEnd );
+  }else{
+    do {
+      s1 += BYTESWAP32(aData[0]) + s2;
+      s2 += BYTESWAP32(aData[1]) + s1;
+      aData += 2;
+    }while( aData<aEnd );
+  }
+
+  aOut[0] = s1;
+  aOut[1] = s2;
+}
+
+static void walShmBarrier(Wal *pWal){
+  if( pWal->exclusiveMode!=WAL_HEAPMEMORY_MODE ){
+    sqlite3OsShmBarrier(pWal->pDbFd);
+  }
+}
+
+/*
+** Write the header information in pWal->hdr into the wal-index.
+**
+** The checksum on pWal->hdr is updated before it is written.
+*/
+static void walIndexWriteHdr(Wal *pWal){
+  volatile WalIndexHdr *aHdr = walIndexHdr(pWal);
+  const int nCksum = offsetof(WalIndexHdr, aCksum);
+
+  assert( pWal->writeLock );
+  pWal->hdr.isInit = 1;
+  pWal->hdr.iVersion = WALINDEX_MAX_VERSION;
+  walChecksumBytes(1, (u8*)&pWal->hdr, nCksum, 0, pWal->hdr.aCksum);
+  memcpy((void *)&aHdr[1], (void *)&pWal->hdr, sizeof(WalIndexHdr));
+  walShmBarrier(pWal);
+  memcpy((void *)&aHdr[0], (void *)&pWal->hdr, sizeof(WalIndexHdr));
+}
+
+/*
+** This function encodes a single frame header and writes it to a buffer
+** supplied by the caller. A frame-header is made up of a series of 
+** 4-byte big-endian integers, as follows:
+**
+**     0: Page number.
+**     4: For commit records, the size of the database image in pages 
+**        after the commit. For all other records, zero.
+**     8: Salt-1 (copied from the wal-header)
+**    12: Salt-2 (copied from the wal-header)
+**    16: Checksum-1.
+**    20: Checksum-2.
+*/
+static void walEncodeFrame(
+  Wal *pWal,                      /* The write-ahead log */
+  u32 iPage,                      /* Database page number for frame */
+  u32 nTruncate,                  /* New db size (or 0 for non-commit frames) */
+  u8 *aData,                      /* Pointer to page data */
+  u8 *aFrame                      /* OUT: Write encoded frame here */
+){
+  int nativeCksum;                /* True for native byte-order checksums */
+  u32 *aCksum = pWal->hdr.aFrameCksum;
+  assert( WAL_FRAME_HDRSIZE==24 );
+  sqlite3Put4byte(&aFrame[0], iPage);
+  sqlite3Put4byte(&aFrame[4], nTruncate);
+  memcpy(&aFrame[8], pWal->hdr.aSalt, 8);
+
+  nativeCksum = (pWal->hdr.bigEndCksum==SQLITE_BIGENDIAN);
+  walChecksumBytes(nativeCksum, aFrame, 8, aCksum, aCksum);
+  walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
+
+  sqlite3Put4byte(&aFrame[16], aCksum[0]);
+  sqlite3Put4byte(&aFrame[20], aCksum[1]);
+}
+
+/*
+** Check to see if the frame with header in aFrame[] and content
+** in aData[] is valid.  If it is a valid frame, fill *piPage and
+** *pnTruncate and return true.  Return if the frame is not valid.
+*/
+static int walDecodeFrame(
+  Wal *pWal,                      /* The write-ahead log */
+  u32 *piPage,                    /* OUT: Database page number for frame */
+  u32 *pnTruncate,                /* OUT: New db size (or 0 if not commit) */
+  u8 *aData,                      /* Pointer to page data (for checksum) */
+  u8 *aFrame                      /* Frame data */
+){
+  int nativeCksum;                /* True for native byte-order checksums */
+  u32 *aCksum = pWal->hdr.aFrameCksum;
+  u32 pgno;                       /* Page number of the frame */
+  assert( WAL_FRAME_HDRSIZE==24 );
+
+  /* A frame is only valid if the salt values in the frame-header
+  ** match the salt values in the wal-header. 
+  */
+  if( memcmp(&pWal->hdr.aSalt, &aFrame[8], 8)!=0 ){
+    return 0;
+  }
+
+  /* A frame is only valid if the page number is creater than zero.
+  */
+  pgno = sqlite3Get4byte(&aFrame[0]);
+  if( pgno==0 ){
+    return 0;
+  }
+
+  /* A frame is only valid if a checksum of the WAL header,
+  ** all prior frams, the first 16 bytes of this frame-header, 
+  ** and the frame-data matches the checksum in the last 8 
+  ** bytes of this frame-header.
+  */
+  nativeCksum = (pWal->hdr.bigEndCksum==SQLITE_BIGENDIAN);
+  walChecksumBytes(nativeCksum, aFrame, 8, aCksum, aCksum);
+  walChecksumBytes(nativeCksum, aData, pWal->szPage, aCksum, aCksum);
+  if( aCksum[0]!=sqlite3Get4byte(&aFrame[16]) 
+   || aCksum[1]!=sqlite3Get4byte(&aFrame[20]) 
+  ){
+    /* Checksum failed. */
+    return 0;
+  }
+
+  /* If we reach this point, the frame is valid.  Return the page number
+  ** and the new database size.
+  */
+  *piPage = pgno;
+  *pnTruncate = sqlite3Get4byte(&aFrame[4]);
+  return 1;
+}
+
+
+#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)
+/*
+** Names of locks.  This routine is used to provide debugging output and is not
+** a part of an ordinary build.
+*/
+static const char *walLockName(int lockIdx){
+  if( lockIdx==WAL_WRITE_LOCK ){
+    return "WRITE-LOCK";
+  }else if( lockIdx==WAL_CKPT_LOCK ){
+    return "CKPT-LOCK";
+  }else if( lockIdx==WAL_RECOVER_LOCK ){
+    return "RECOVER-LOCK";
+  }else{
+    static char zName[15];
+    sqlite3_snprintf(sizeof(zName), zName, "READ-LOCK[%d]",
+                     lockIdx-WAL_READ_LOCK(0));
+    return zName;
+  }
+}
+#endif /*defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */
+    
+
+/*
+** Set or release locks on the WAL.  Locks are either shared or exclusive.
+** A lock cannot be moved directly between shared and exclusive - it must go
+** through the unlocked state first.
+**
+** In locking_mode=EXCLUSIVE, all of these routines become no-ops.
+*/
+static int walLockShared(Wal *pWal, int lockIdx){
+  int rc;
+  if( pWal->exclusiveMode ) return SQLITE_OK;
+  rc = sqlite3OsShmLock(pWal->pDbFd, lockIdx, 1,
+                        SQLITE_SHM_LOCK | SQLITE_SHM_SHARED);
+  WALTRACE(("WAL%p: acquire SHARED-%s %s\n", pWal,
+            walLockName(lockIdx), rc ? "failed" : "ok"));
+  VVA_ONLY( pWal->lockError = (u8)(rc!=SQLITE_OK && rc!=SQLITE_BUSY); )
+  return rc;
+}
+static void walUnlockShared(Wal *pWal, int lockIdx){
+  if( pWal->exclusiveMode ) return;
+  (void)sqlite3OsShmLock(pWal->pDbFd, lockIdx, 1,
+                         SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED);
+  WALTRACE(("WAL%p: release SHARED-%s\n", pWal, walLockName(lockIdx)));
+}
+static int walLockExclusive(Wal *pWal, int lockIdx, int n){
+  int rc;
+  if( pWal->exclusiveMode ) return SQLITE_OK;
+  rc = sqlite3OsShmLock(pWal->pDbFd, lockIdx, n,
+                        SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE);
+  WALTRACE(("WAL%p: acquire EXCLUSIVE-%s cnt=%d %s\n", pWal,
+            walLockName(lockIdx), n, rc ? "failed" : "ok"));
+  VVA_ONLY( pWal->lockError = (u8)(rc!=SQLITE_OK && rc!=SQLITE_BUSY); )
+  return rc;
+}
+static void walUnlockExclusive(Wal *pWal, int lockIdx, int n){
+  if( pWal->exclusiveMode ) return;
+  (void)sqlite3OsShmLock(pWal->pDbFd, lockIdx, n,
+                         SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE);
+  WALTRACE(("WAL%p: release EXCLUSIVE-%s cnt=%d\n", pWal,
+             walLockName(lockIdx), n));
+}
+
+/*
+** Compute a hash on a page number.  The resulting hash value must land
+** between 0 and (HASHTABLE_NSLOT-1).  The walHashNext() function advances
+** the hash to the next value in the event of a collision.
+*/
+static int walHash(u32 iPage){
+  assert( iPage>0 );
+  assert( (HASHTABLE_NSLOT & (HASHTABLE_NSLOT-1))==0 );
+  return (iPage*HASHTABLE_HASH_1) & (HASHTABLE_NSLOT-1);
+}
+static int walNextHash(int iPriorHash){
+  return (iPriorHash+1)&(HASHTABLE_NSLOT-1);
+}
+
+/* 
+** Return pointers to the hash table and page number array stored on
+** page iHash of the wal-index. The wal-index is broken into 32KB pages
+** numbered starting from 0.
+**
+** Set output variable *paHash to point to the start of the hash table
+** in the wal-index file. Set *piZero to one less than the frame 
+** number of the first frame indexed by this hash table. If a
+** slot in the hash table is set to N, it refers to frame number 
+** (*piZero+N) in the log.
+**
+** Finally, set *paPgno so that *paPgno[1] is the page number of the
+** first frame indexed by the hash table, frame (*piZero+1).
+*/
+static int walHashGet(
+  Wal *pWal,                      /* WAL handle */
+  int iHash,                      /* Find the iHash'th table */
+  volatile ht_slot **paHash,      /* OUT: Pointer to hash index */
+  volatile u32 **paPgno,          /* OUT: Pointer to page number array */
+  u32 *piZero                     /* OUT: Frame associated with *paPgno[0] */
+){
+  int rc;                         /* Return code */
+  volatile u32 *aPgno;
+
+  rc = walIndexPage(pWal, iHash, &aPgno);
+  assert( rc==SQLITE_OK || iHash>0 );
+
+  if( rc==SQLITE_OK ){
+    u32 iZero;
+    volatile ht_slot *aHash;
+
+    aHash = (volatile ht_slot *)&aPgno[HASHTABLE_NPAGE];
+    if( iHash==0 ){
+      aPgno = &aPgno[WALINDEX_HDR_SIZE/sizeof(u32)];
+      iZero = 0;
+    }else{
+      iZero = HASHTABLE_NPAGE_ONE + (iHash-1)*HASHTABLE_NPAGE;
+    }
+  
+    *paPgno = &aPgno[-1];
+    *paHash = aHash;
+    *piZero = iZero;
+  }
+  return rc;
+}
+
+/*
+** Return the number of the wal-index page that contains the hash-table
+** and page-number array that contain entries corresponding to WAL frame
+** iFrame. The wal-index is broken up into 32KB pages. Wal-index pages 
+** are numbered starting from 0.
+*/
+static int walFramePage(u32 iFrame){
+  int iHash = (iFrame+HASHTABLE_NPAGE-HASHTABLE_NPAGE_ONE-1) / HASHTABLE_NPAGE;
+  assert( (iHash==0 || iFrame>HASHTABLE_NPAGE_ONE)
+       && (iHash>=1 || iFrame<=HASHTABLE_NPAGE_ONE)
+       && (iHash<=1 || iFrame>(HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE))
+       && (iHash>=2 || iFrame<=HASHTABLE_NPAGE_ONE+HASHTABLE_NPAGE)
+       && (iHash<=2 || iFrame>(HASHTABLE_NPAGE_ONE+2*HASHTABLE_NPAGE))
+  );
+  return iHash;
+}
+
+/*
+** Return the page number associated with frame iFrame in this WAL.
+*/
+static u32 walFramePgno(Wal *pWal, u32 iFrame){
+  int iHash = walFramePage(iFrame);
+  if( iHash==0 ){
+    return pWal->apWiData[0][WALINDEX_HDR_SIZE/sizeof(u32) + iFrame - 1];
+  }
+  return pWal->apWiData[iHash][(iFrame-1-HASHTABLE_NPAGE_ONE)%HASHTABLE_NPAGE];
+}
+
+/*
+** Remove entries from the hash table that point to WAL slots greater
+** than pWal->hdr.mxFrame.
+**
+** This function is called whenever pWal->hdr.mxFrame is decreased due
+** to a rollback or savepoint.
+**
+** At most only the hash table containing pWal->hdr.mxFrame needs to be
+** updated.  Any later hash tables will be automatically cleared when
+** pWal->hdr.mxFrame advances to the point where those hash tables are
+** actually needed.
+*/
+static void walCleanupHash(Wal *pWal){
+  volatile ht_slot *aHash = 0;    /* Pointer to hash table to clear */
+  volatile u32 *aPgno = 0;        /* Page number array for hash table */
+  u32 iZero = 0;                  /* frame == (aHash[x]+iZero) */
+  int iLimit = 0;                 /* Zero values greater than this */
+  int nByte;                      /* Number of bytes to zero in aPgno[] */
+  int i;                          /* Used to iterate through aHash[] */
+
+  assert( pWal->writeLock );
+  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE_ONE-1 );
+  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE_ONE );
+  testcase( pWal->hdr.mxFrame==HASHTABLE_NPAGE_ONE+1 );
+
+  if( pWal->hdr.mxFrame==0 ) return;
+
+  /* Obtain pointers to the hash-table and page-number array containing 
+  ** the entry that corresponds to frame pWal->hdr.mxFrame. It is guaranteed
+  ** that the page said hash-table and array reside on is already mapped.
+  */
+  assert( pWal->nWiData>walFramePage(pWal->hdr.mxFrame) );
+  assert( pWal->apWiData[walFramePage(pWal->hdr.mxFrame)] );
+  walHashGet(pWal, walFramePage(pWal->hdr.mxFrame), &aHash, &aPgno, &iZero);
+
+  /* Zero all hash-table entries that correspond to frame numbers greater
+  ** than pWal->hdr.mxFrame.
+  */
+  iLimit = pWal->hdr.mxFrame - iZero;
+  assert( iLimit>0 );
+  for(i=0; i<HASHTABLE_NSLOT; i++){
+    if( aHash[i]>iLimit ){
+      aHash[i] = 0;
+    }
+  }
+  
+  /* Zero the entries in the aPgno array that correspond to frames with
+  ** frame numbers greater than pWal->hdr.mxFrame. 
+  */
+  nByte = (int)((char *)aHash - (char *)&aPgno[iLimit+1]);
+  memset((void *)&aPgno[iLimit+1], 0, nByte);
+
+#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
+  /* Verify that the every entry in the mapping region is still reachable
+  ** via the hash table even after the cleanup.
+  */
+  if( iLimit ){
+    int i;           /* Loop counter */
+    int iKey;        /* Hash key */
+    for(i=1; i<=iLimit; i++){
+      for(iKey=walHash(aPgno[i]); aHash[iKey]; iKey=walNextHash(iKey)){
+        if( aHash[iKey]==i ) break;
+      }
+      assert( aHash[iKey]==i );
+    }
+  }
+#endif /* SQLITE_ENABLE_EXPENSIVE_ASSERT */
+}
+
+
+/*
+** Set an entry in the wal-index that will map database page number
+** pPage into WAL frame iFrame.
+*/
+static int walIndexAppend(Wal *pWal, u32 iFrame, u32 iPage){
+  int rc;                         /* Return code */
+  u32 iZero = 0;                  /* One less than frame number of aPgno[1] */
+  volatile u32 *aPgno = 0;        /* Page number array */
+  volatile ht_slot *aHash = 0;    /* Hash table */
+
+  rc = walHashGet(pWal, walFramePage(iFrame), &aHash, &aPgno, &iZero);
+
+  /* Assuming the wal-index file was successfully mapped, populate the
+  ** page number array and hash table entry.
+  */
+  if( rc==SQLITE_OK ){
+    int iKey;                     /* Hash table key */
+    int idx;                      /* Value to write to hash-table slot */
+    int nCollide;                 /* Number of hash collisions */
+
+    idx = iFrame - iZero;
+    assert( idx <= HASHTABLE_NSLOT/2 + 1 );
+    
+    /* If this is the first entry to be added to this hash-table, zero the
+    ** entire hash table and aPgno[] array before proceding. 
+    */
+    if( idx==1 ){
+      int nByte = (int)((u8 *)&aHash[HASHTABLE_NSLOT] - (u8 *)&aPgno[1]);
+      memset((void*)&aPgno[1], 0, nByte);
+    }
+
+    /* If the entry in aPgno[] is already set, then the previous writer
+    ** must have exited unexpectedly in the middle of a transaction (after
+    ** writing one or more dirty pages to the WAL to free up memory). 
+    ** Remove the remnants of that writers uncommitted transaction from 
+    ** the hash-table before writing any new entries.
+    */
+    if( aPgno[idx] ){
+      walCleanupHash(pWal);
+      assert( !aPgno[idx] );
+    }
+
+    /* Write the aPgno[] array entry and the hash-table slot. */
+    nCollide = idx;
+    for(iKey=walHash(iPage); aHash[iKey]; iKey=walNextHash(iKey)){
+      if( (nCollide--)==0 ) return SQLITE_CORRUPT_BKPT;
+    }
+    aPgno[idx] = iPage;
+    aHash[iKey] = (ht_slot)idx;
+
+#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
+    /* Verify that the number of entries in the hash table exactly equals
+    ** the number of entries in the mapping region.
+    */
+    {
+      int i;           /* Loop counter */
+      int nEntry = 0;  /* Number of entries in the hash table */
+      for(i=0; i<HASHTABLE_NSLOT; i++){ if( aHash[i] ) nEntry++; }
+      assert( nEntry==idx );
+    }
+
+    /* Verify that the every entry in the mapping region is reachable
+    ** via the hash table.  This turns out to be a really, really expensive
+    ** thing to check, so only do this occasionally - not on every
+    ** iteration.
+    */
+    if( (idx&0x3ff)==0 ){
+      int i;           /* Loop counter */
+      for(i=1; i<=idx; i++){
+        for(iKey=walHash(aPgno[i]); aHash[iKey]; iKey=walNextHash(iKey)){
+          if( aHash[iKey]==i ) break;
+        }
+        assert( aHash[iKey]==i );
+      }
+    }
+#endif /* SQLITE_ENABLE_EXPENSIVE_ASSERT */
+  }
+
+
+  return rc;
+}
+
+
+/*
+** Recover the wal-index by reading the write-ahead log file. 
+**
+** This routine first tries to establish an exclusive lock on the
+** wal-index to prevent other threads/processes from doing anything
+** with the WAL or wal-index while recovery is running.  The
+** WAL_RECOVER_LOCK is also held so that other threads will know
+** that this thread is running recovery.  If unable to establish
+** the necessary locks, this routine returns SQLITE_BUSY.
+*/
+static int walIndexRecover(Wal *pWal){
+  int rc;                         /* Return Code */
+  i64 nSize;                      /* Size of log file */
+  u32 aFrameCksum[2] = {0, 0};
+  int iLock;                      /* Lock offset to lock for checkpoint */
+  int nLock;                      /* Number of locks to hold */
+
+  /* Obtain an exclusive lock on all byte in the locking range not already
+  ** locked by the caller. The caller is guaranteed to have locked the
+  ** WAL_WRITE_LOCK byte, and may have also locked the WAL_CKPT_LOCK byte.
+  ** If successful, the same bytes that are locked here are unlocked before
+  ** this function returns.
+  */
+  assert( pWal->ckptLock==1 || pWal->ckptLock==0 );
+  assert( WAL_ALL_BUT_WRITE==WAL_WRITE_LOCK+1 );
+  assert( WAL_CKPT_LOCK==WAL_ALL_BUT_WRITE );
+  assert( pWal->writeLock );
+  iLock = WAL_ALL_BUT_WRITE + pWal->ckptLock;
+  nLock = SQLITE_SHM_NLOCK - iLock;
+  rc = walLockExclusive(pWal, iLock, nLock);
+  if( rc ){
+    return rc;
+  }
+  WALTRACE(("WAL%p: recovery begin...\n", pWal));
+
+  memset(&pWal->hdr, 0, sizeof(WalIndexHdr));
+
+  rc = sqlite3OsFileSize(pWal->pWalFd, &nSize);
+  if( rc!=SQLITE_OK ){
+    goto recovery_error;
+  }
+
+  if( nSize>WAL_HDRSIZE ){
+    u8 aBuf[WAL_HDRSIZE];         /* Buffer to load WAL header into */
+    u8 *aFrame = 0;               /* Malloc'd buffer to load entire frame */
+    int szFrame;                  /* Number of bytes in buffer aFrame[] */
+    u8 *aData;                    /* Pointer to data part of aFrame buffer */
+    int iFrame;                   /* Index of last frame read */
+    i64 iOffset;                  /* Next offset to read from log file */
+    int szPage;                   /* Page size according to the log */
+    u32 magic;                    /* Magic value read from WAL header */
+    u32 version;                  /* Magic value read from WAL header */
+
+    /* Read in the WAL header. */
+    rc = sqlite3OsRead(pWal->pWalFd, aBuf, WAL_HDRSIZE, 0);
+    if( rc!=SQLITE_OK ){
+      goto recovery_error;
+    }
+
+    /* If the database page size is not a power of two, or is greater than
+    ** SQLITE_MAX_PAGE_SIZE, conclude that the WAL file contains no valid 
+    ** data. Similarly, if the 'magic' value is invalid, ignore the whole
+    ** WAL file.
+    */
+    magic = sqlite3Get4byte(&aBuf[0]);
+    szPage = sqlite3Get4byte(&aBuf[8]);
+    if( (magic&0xFFFFFFFE)!=WAL_MAGIC 
+     || szPage&(szPage-1) 
+     || szPage>SQLITE_MAX_PAGE_SIZE 
+     || szPage<512 
+    ){
+      goto finished;
+    }
+    pWal->hdr.bigEndCksum = (u8)(magic&0x00000001);
+    pWal->szPage = szPage;
+    pWal->nCkpt = sqlite3Get4byte(&aBuf[12]);
+    memcpy(&pWal->hdr.aSalt, &aBuf[16], 8);
+
+    /* Verify that the WAL header checksum is correct */
+    walChecksumBytes(pWal->hdr.bigEndCksum==SQLITE_BIGENDIAN, 
+        aBuf, WAL_HDRSIZE-2*4, 0, pWal->hdr.aFrameCksum
+    );
+    if( pWal->hdr.aFrameCksum[0]!=sqlite3Get4byte(&aBuf[24])
+     || pWal->hdr.aFrameCksum[1]!=sqlite3Get4byte(&aBuf[28])
+    ){
+      goto finished;
+    }
+
+    /* Verify that the version number on the WAL format is one that
+    ** are able to understand */
+    version = sqlite3Get4byte(&aBuf[4]);
+    if( version!=WAL_MAX_VERSION ){
+      rc = SQLITE_CANTOPEN_BKPT;
+      goto finished;
+    }
+
+    /* Malloc a buffer to read frames into. */
+    szFrame = szPage + WAL_FRAME_HDRSIZE;
+    aFrame = (u8 *)sqlite3_malloc(szFrame);
+    if( !aFrame ){
+      rc = SQLITE_NOMEM;
+      goto recovery_error;
+    }
+    aData = &aFrame[WAL_FRAME_HDRSIZE];
+
+    /* Read all frames from the log file. */
+    iFrame = 0;
+    for(iOffset=WAL_HDRSIZE; (iOffset+szFrame)<=nSize; iOffset+=szFrame){
+      u32 pgno;                   /* Database page number for frame */
+      u32 nTruncate;              /* dbsize field from frame header */
+      int isValid;                /* True if this frame is valid */
+
+      /* Read and decode the next log frame. */
+      rc = sqlite3OsRead(pWal->pWalFd, aFrame, szFrame, iOffset);
+      if( rc!=SQLITE_OK ) break;
+      isValid = walDecodeFrame(pWal, &pgno, &nTruncate, aData, aFrame);
+      if( !isValid ) break;
+      rc = walIndexAppend(pWal, ++iFrame, pgno);
+      if( rc!=SQLITE_OK ) break;
+
+      /* If nTruncate is non-zero, this is a commit record. */
+      if( nTruncate ){
+        pWal->hdr.mxFrame = iFrame;
+        pWal->hdr.nPage = nTruncate;
+        pWal->hdr.szPage = (u16)((szPage&0xff00) | (szPage>>16));
+        testcase( szPage<=32768 );
+        testcase( szPage>=65536 );
+        aFrameCksum[0] = pWal->hdr.aFrameCksum[0];
+        aFrameCksum[1] = pWal->hdr.aFrameCksum[1];
+      }
+    }
+
+    sqlite3_free(aFrame);
+  }
+
+finished:
+  if( rc==SQLITE_OK ){
+    volatile WalCkptInfo *pInfo;
+    int i;
+    pWal->hdr.aFrameCksum[0] = aFrameCksum[0];
+    pWal->hdr.aFrameCksum[1] = aFrameCksum[1];
+    walIndexWriteHdr(pWal);
+
+    /* Reset the checkpoint-header. This is safe because this thread is 
+    ** currently holding locks that exclude all other readers, writers and
+    ** checkpointers.
+    */
+    pInfo = walCkptInfo(pWal);
+    pInfo->nBackfill = 0;
+    pInfo->aReadMark[0] = 0;
+    for(i=1; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
+
+    /* If more than one frame was recovered from the log file, report an
+    ** event via sqlite3_log(). This is to help with identifying performance
+    ** problems caused by applications routinely shutting down without
+    ** checkpointing the log file.
+    */
+    if( pWal->hdr.nPage ){
+      sqlite3_log(SQLITE_OK, "Recovered %d frames from WAL file %s",
+          pWal->hdr.nPage, pWal->zWalName
+      );
+    }
+  }
+
+recovery_error:
+  WALTRACE(("WAL%p: recovery %s\n", pWal, rc ? "failed" : "ok"));
+  walUnlockExclusive(pWal, iLock, nLock);
+  return rc;
+}
+
+/*
+** Close an open wal-index.
+*/
+static void walIndexClose(Wal *pWal, int isDelete){
+  if( pWal->exclusiveMode==WAL_HEAPMEMORY_MODE ){
+    int i;
+    for(i=0; i<pWal->nWiData; i++){
+      sqlite3_free((void *)pWal->apWiData[i]);
+      pWal->apWiData[i] = 0;
+    }
+  }else{
+    sqlite3OsShmUnmap(pWal->pDbFd, isDelete);
+  }
+}
+
+/* 
+** Open a connection to the WAL file zWalName. The database file must 
+** already be opened on connection pDbFd. The buffer that zWalName points
+** to must remain valid for the lifetime of the returned Wal* handle.
+**
+** A SHARED lock should be held on the database file when this function
+** is called. The purpose of this SHARED lock is to prevent any other
+** client from unlinking the WAL or wal-index file. If another process
+** were to do this just after this client opened one of these files, the
+** system would be badly broken.
+**
+** If the log file is successfully opened, SQLITE_OK is returned and 
+** *ppWal is set to point to a new WAL handle. If an error occurs,
+** an SQLite error code is returned and *ppWal is left unmodified.
+*/
+SQLITE_PRIVATE int sqlite3WalOpen(
+  sqlite3_vfs *pVfs,              /* vfs module to open wal and wal-index */
+  sqlite3_file *pDbFd,            /* The open database file */
+  const char *zWalName,           /* Name of the WAL file */
+  int bNoShm,                     /* True to run in heap-memory mode */
+  Wal **ppWal                     /* OUT: Allocated Wal handle */
+){
+  int rc;                         /* Return Code */
+  Wal *pRet;                      /* Object to allocate and return */
+  int flags;                      /* Flags passed to OsOpen() */
+
+  assert( zWalName && zWalName[0] );
+  assert( pDbFd );
+
+  /* In the amalgamation, the os_unix.c and os_win.c source files come before
+  ** this source file.  Verify that the #defines of the locking byte offsets
+  ** in os_unix.c and os_win.c agree with the WALINDEX_LOCK_OFFSET value.
+  */
+#ifdef WIN_SHM_BASE
+  assert( WIN_SHM_BASE==WALINDEX_LOCK_OFFSET );
+#endif
+#ifdef UNIX_SHM_BASE
+  assert( UNIX_SHM_BASE==WALINDEX_LOCK_OFFSET );
+#endif
+
+
+  /* Allocate an instance of struct Wal to return. */
+  *ppWal = 0;
+  pRet = (Wal*)sqlite3MallocZero(sizeof(Wal) + pVfs->szOsFile);
+  if( !pRet ){
+    return SQLITE_NOMEM;
+  }
+
+  pRet->pVfs = pVfs;
+  pRet->pWalFd = (sqlite3_file *)&pRet[1];
+  pRet->pDbFd = pDbFd;
+  pRet->readLock = -1;
+  pRet->zWalName = zWalName;
+  pRet->exclusiveMode = (bNoShm ? WAL_HEAPMEMORY_MODE: WAL_NORMAL_MODE);
+
+  /* Open file handle on the write-ahead log file. */
+  flags = (SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|SQLITE_OPEN_WAL);
+  rc = sqlite3OsOpen(pVfs, zWalName, pRet->pWalFd, flags, &flags);
+  if( rc==SQLITE_OK && flags&SQLITE_OPEN_READONLY ){
+    pRet->readOnly = 1;
+  }
+
+  if( rc!=SQLITE_OK ){
+    walIndexClose(pRet, 0);
+    sqlite3OsClose(pRet->pWalFd);
+    sqlite3_free(pRet);
+  }else{
+    *ppWal = pRet;
+    WALTRACE(("WAL%d: opened\n", pRet));
+  }
+  return rc;
+}
+
+/*
+** Find the smallest page number out of all pages held in the WAL that
+** has not been returned by any prior invocation of this method on the
+** same WalIterator object.   Write into *piFrame the frame index where
+** that page was last written into the WAL.  Write into *piPage the page
+** number.
+**
+** Return 0 on success.  If there are no pages in the WAL with a page
+** number larger than *piPage, then return 1.
+*/
+static int walIteratorNext(
+  WalIterator *p,               /* Iterator */
+  u32 *piPage,                  /* OUT: The page number of the next page */
+  u32 *piFrame                  /* OUT: Wal frame index of next page */
+){
+  u32 iMin;                     /* Result pgno must be greater than iMin */
+  u32 iRet = 0xFFFFFFFF;        /* 0xffffffff is never a valid page number */
+  int i;                        /* For looping through segments */
+
+  iMin = p->iPrior;
+  assert( iMin<0xffffffff );
+  for(i=p->nSegment-1; i>=0; i--){
+    struct WalSegment *pSegment = &p->aSegment[i];
+    while( pSegment->iNext<pSegment->nEntry ){
+      u32 iPg = pSegment->aPgno[pSegment->aIndex[pSegment->iNext]];
+      if( iPg>iMin ){
+        if( iPg<iRet ){
+          iRet = iPg;
+          *piFrame = pSegment->iZero + pSegment->aIndex[pSegment->iNext];
+        }
+        break;
+      }
+      pSegment->iNext++;
+    }
+  }
+
+  *piPage = p->iPrior = iRet;
+  return (iRet==0xFFFFFFFF);
+}
+
+/*
+** This function merges two sorted lists into a single sorted list.
+**
+** aLeft[] and aRight[] are arrays of indices.  The sort key is
+** aContent[aLeft[]] and aContent[aRight[]].  Upon entry, the following
+** is guaranteed for all J<K:
+**
+**        aContent[aLeft[J]] < aContent[aLeft[K]]
+**        aContent[aRight[J]] < aContent[aRight[K]]
+**
+** This routine overwrites aRight[] with a new (probably longer) sequence
+** of indices such that the aRight[] contains every index that appears in
+** either aLeft[] or the old aRight[] and such that the second condition
+** above is still met.
+**
+** The aContent[aLeft[X]] values will be unique for all X.  And the
+** aContent[aRight[X]] values will be unique too.  But there might be
+** one or more combinations of X and Y such that
+**
+**      aLeft[X]!=aRight[Y]  &&  aContent[aLeft[X]] == aContent[aRight[Y]]
+**
+** When that happens, omit the aLeft[X] and use the aRight[Y] index.
+*/
+static void walMerge(
+  const u32 *aContent,            /* Pages in wal - keys for the sort */
+  ht_slot *aLeft,                 /* IN: Left hand input list */
+  int nLeft,                      /* IN: Elements in array *paLeft */
+  ht_slot **paRight,              /* IN/OUT: Right hand input list */
+  int *pnRight,                   /* IN/OUT: Elements in *paRight */
+  ht_slot *aTmp                   /* Temporary buffer */
+){
+  int iLeft = 0;                  /* Current index in aLeft */
+  int iRight = 0;                 /* Current index in aRight */
+  int iOut = 0;                   /* Current index in output buffer */
+  int nRight = *pnRight;
+  ht_slot *aRight = *paRight;
+
+  assert( nLeft>0 && nRight>0 );
+  while( iRight<nRight || iLeft<nLeft ){
+    ht_slot logpage;
+    Pgno dbpage;
+
+    if( (iLeft<nLeft) 
+     && (iRight>=nRight || aContent[aLeft[iLeft]]<aContent[aRight[iRight]])
+    ){
+      logpage = aLeft[iLeft++];
+    }else{
+      logpage = aRight[iRight++];
+    }
+    dbpage = aContent[logpage];
+
+    aTmp[iOut++] = logpage;
+    if( iLeft<nLeft && aContent[aLeft[iLeft]]==dbpage ) iLeft++;
+
+    assert( iLeft>=nLeft || aContent[aLeft[iLeft]]>dbpage );
+    assert( iRight>=nRight || aContent[aRight[iRight]]>dbpage );
+  }
+
+  *paRight = aLeft;
+  *pnRight = iOut;
+  memcpy(aLeft, aTmp, sizeof(aTmp[0])*iOut);
+}
+
+/*
+** Sort the elements in list aList using aContent[] as the sort key.
+** Remove elements with duplicate keys, preferring to keep the
+** larger aList[] values.
+**
+** The aList[] entries are indices into aContent[].  The values in
+** aList[] are to be sorted so that for all J<K:
+**
+**      aContent[aList[J]] < aContent[aList[K]]
+**
+** For any X and Y such that
+**
+**      aContent[aList[X]] == aContent[aList[Y]]
+**
+** Keep the larger of the two values aList[X] and aList[Y] and discard
+** the smaller.
+*/
+static void walMergesort(
+  const u32 *aContent,            /* Pages in wal */
+  ht_slot *aBuffer,               /* Buffer of at least *pnList items to use */
+  ht_slot *aList,                 /* IN/OUT: List to sort */
+  int *pnList                     /* IN/OUT: Number of elements in aList[] */
+){
+  struct Sublist {
+    int nList;                    /* Number of elements in aList */
+    ht_slot *aList;               /* Pointer to sub-list content */
+  };
+
+  const int nList = *pnList;      /* Size of input list */
+  int nMerge = 0;                 /* Number of elements in list aMerge */
+  ht_slot *aMerge = 0;            /* List to be merged */
+  int iList;                      /* Index into input list */
+  int iSub = 0;                   /* Index into aSub array */
+  struct Sublist aSub[13];        /* Array of sub-lists */
+
+  memset(aSub, 0, sizeof(aSub));
+  assert( nList<=HASHTABLE_NPAGE && nList>0 );
+  assert( HASHTABLE_NPAGE==(1<<(ArraySize(aSub)-1)) );
+
+  for(iList=0; iList<nList; iList++){
+    nMerge = 1;
+    aMerge = &aList[iList];
+    for(iSub=0; iList & (1<<iSub); iSub++){
+      struct Sublist *p = &aSub[iSub];
+      assert( p->aList && p->nList<=(1<<iSub) );
+      assert( p->aList==&aList[iList&~((2<<iSub)-1)] );
+      walMerge(aContent, p->aList, p->nList, &aMerge, &nMerge, aBuffer);
+    }
+    aSub[iSub].aList = aMerge;
+    aSub[iSub].nList = nMerge;
+  }
+
+  for(iSub++; iSub<ArraySize(aSub); iSub++){
+    if( nList & (1<<iSub) ){
+      struct Sublist *p = &aSub[iSub];
+      assert( p->nList<=(1<<iSub) );
+      assert( p->aList==&aList[nList&~((2<<iSub)-1)] );
+      walMerge(aContent, p->aList, p->nList, &aMerge, &nMerge, aBuffer);
+    }
+  }
+  assert( aMerge==aList );
+  *pnList = nMerge;
+
+#ifdef SQLITE_DEBUG
+  {
+    int i;
+    for(i=1; i<*pnList; i++){
+      assert( aContent[aList[i]] > aContent[aList[i-1]] );
+    }
+  }
+#endif
+}
+
+/* 
+** Free an iterator allocated by walIteratorInit().
+*/
+static void walIteratorFree(WalIterator *p){
+  sqlite3ScratchFree(p);
+}
+
+/*
+** Construct a WalInterator object that can be used to loop over all 
+** pages in the WAL in ascending order. The caller must hold the checkpoint
+** lock.
+**
+** On success, make *pp point to the newly allocated WalInterator object
+** return SQLITE_OK. Otherwise, return an error code. If this routine
+** returns an error, the value of *pp is undefined.
+**
+** The calling routine should invoke walIteratorFree() to destroy the
+** WalIterator object when it has finished with it.
+*/
+static int walIteratorInit(Wal *pWal, WalIterator **pp){
+  WalIterator *p;                 /* Return value */
+  int nSegment;                   /* Number of segments to merge */
+  u32 iLast;                      /* Last frame in log */
+  int nByte;                      /* Number of bytes to allocate */
+  int i;                          /* Iterator variable */
+  ht_slot *aTmp;                  /* Temp space used by merge-sort */
+  int rc = SQLITE_OK;             /* Return Code */
+
+  /* This routine only runs while holding the checkpoint lock. And
+  ** it only runs if there is actually content in the log (mxFrame>0).
+  */
+  assert( pWal->ckptLock && pWal->hdr.mxFrame>0 );
+  iLast = pWal->hdr.mxFrame;
+
+  /* Allocate space for the WalIterator object. */
+  nSegment = walFramePage(iLast) + 1;
+  nByte = sizeof(WalIterator) 
+        + (nSegment-1)*sizeof(struct WalSegment)
+        + iLast*sizeof(ht_slot);
+  p = (WalIterator *)sqlite3ScratchMalloc(nByte);
+  if( !p ){
+    return SQLITE_NOMEM;
+  }
+  memset(p, 0, nByte);
+  p->nSegment = nSegment;
+
+  /* Allocate temporary space used by the merge-sort routine. This block
+  ** of memory will be freed before this function returns.
+  */
+  aTmp = (ht_slot *)sqlite3ScratchMalloc(
+      sizeof(ht_slot) * (iLast>HASHTABLE_NPAGE?HASHTABLE_NPAGE:iLast)
+  );
+  if( !aTmp ){
+    rc = SQLITE_NOMEM;
+  }
+
+  for(i=0; rc==SQLITE_OK && i<nSegment; i++){
+    volatile ht_slot *aHash;
+    u32 iZero;
+    volatile u32 *aPgno;
+
+    rc = walHashGet(pWal, i, &aHash, &aPgno, &iZero);
+    if( rc==SQLITE_OK ){
+      int j;                      /* Counter variable */
+      int nEntry;                 /* Number of entries in this segment */
+      ht_slot *aIndex;            /* Sorted index for this segment */
+
+      aPgno++;
+      if( (i+1)==nSegment ){
+        nEntry = (int)(iLast - iZero);
+      }else{
+        nEntry = (int)((u32*)aHash - (u32*)aPgno);
+      }
+      aIndex = &((ht_slot *)&p->aSegment[p->nSegment])[iZero];
+      iZero++;
+  
+      for(j=0; j<nEntry; j++){
+        aIndex[j] = (ht_slot)j;
+      }
+      walMergesort((u32 *)aPgno, aTmp, aIndex, &nEntry);
+      p->aSegment[i].iZero = iZero;
+      p->aSegment[i].nEntry = nEntry;
+      p->aSegment[i].aIndex = aIndex;
+      p->aSegment[i].aPgno = (u32 *)aPgno;
+    }
+  }
+  sqlite3ScratchFree(aTmp);
+
+  if( rc!=SQLITE_OK ){
+    walIteratorFree(p);
+  }
+  *pp = p;
+  return rc;
+}
+
+/*
+** Attempt to obtain the exclusive WAL lock defined by parameters lockIdx and
+** n. If the attempt fails and parameter xBusy is not NULL, then it is a
+** busy-handler function. Invoke it and retry the lock until either the
+** lock is successfully obtained or the busy-handler returns 0.
+*/
+static int walBusyLock(
+  Wal *pWal,                      /* WAL connection */
+  int (*xBusy)(void*),            /* Function to call when busy */
+  void *pBusyArg,                 /* Context argument for xBusyHandler */
+  int lockIdx,                    /* Offset of first byte to lock */
+  int n                           /* Number of bytes to lock */
+){
+  int rc;
+  do {
+    rc = walLockExclusive(pWal, lockIdx, n);
+  }while( xBusy && rc==SQLITE_BUSY && xBusy(pBusyArg) );
+  return rc;
+}
+
+/*
+** The cache of the wal-index header must be valid to call this function.
+** Return the page-size in bytes used by the database.
+*/
+static int walPagesize(Wal *pWal){
+  return (pWal->hdr.szPage&0xfe00) + ((pWal->hdr.szPage&0x0001)<<16);
+}
+
+/*
+** Copy as much content as we can from the WAL back into the database file
+** in response to an sqlite3_wal_checkpoint() request or the equivalent.
+**
+** The amount of information copies from WAL to database might be limited
+** by active readers.  This routine will never overwrite a database page
+** that a concurrent reader might be using.
+**
+** All I/O barrier operations (a.k.a fsyncs) occur in this routine when
+** SQLite is in WAL-mode in synchronous=NORMAL.  That means that if 
+** checkpoints are always run by a background thread or background 
+** process, foreground threads will never block on a lengthy fsync call.
+**
+** Fsync is called on the WAL before writing content out of the WAL and
+** into the database.  This ensures that if the new content is persistent
+** in the WAL and can be recovered following a power-loss or hard reset.
+**
+** Fsync is also called on the database file if (and only if) the entire
+** WAL content is copied into the database file.  This second fsync makes
+** it safe to delete the WAL since the new content will persist in the
+** database file.
+**
+** This routine uses and updates the nBackfill field of the wal-index header.
+** This is the only routine tha will increase the value of nBackfill.  
+** (A WAL reset or recovery will revert nBackfill to zero, but not increase
+** its value.)
+**
+** The caller must be holding sufficient locks to ensure that no other
+** checkpoint is running (in any other thread or process) at the same
+** time.
+*/
+static int walCheckpoint(
+  Wal *pWal,                      /* Wal connection */
+  int eMode,                      /* One of PASSIVE, FULL or RESTART */
+  int (*xBusyCall)(void*),        /* Function to call when busy */
+  void *pBusyArg,                 /* Context argument for xBusyHandler */
+  int sync_flags,                 /* Flags for OsSync() (or 0) */
+  u8 *zBuf                        /* Temporary buffer to use */
+){
+  int rc;                         /* Return code */
+  int szPage;                     /* Database page-size */
+  WalIterator *pIter = 0;         /* Wal iterator context */
+  u32 iDbpage = 0;                /* Next database page to write */
+  u32 iFrame = 0;                 /* Wal frame containing data for iDbpage */
+  u32 mxSafeFrame;                /* Max frame that can be backfilled */
+  u32 mxPage;                     /* Max database page to write */
+  int i;                          /* Loop counter */
+  volatile WalCkptInfo *pInfo;    /* The checkpoint status information */
+  int (*xBusy)(void*) = 0;        /* Function to call when waiting for locks */
+
+  szPage = walPagesize(pWal);
+  testcase( szPage<=32768 );
+  testcase( szPage>=65536 );
+  pInfo = walCkptInfo(pWal);
+  if( pInfo->nBackfill>=pWal->hdr.mxFrame ) return SQLITE_OK;
+
+  /* Allocate the iterator */
+  rc = walIteratorInit(pWal, &pIter);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+  assert( pIter );
+
+  if( eMode!=SQLITE_CHECKPOINT_PASSIVE ) xBusy = xBusyCall;
+
+  /* Compute in mxSafeFrame the index of the last frame of the WAL that is
+  ** safe to write into the database.  Frames beyond mxSafeFrame might
+  ** overwrite database pages that are in use by active readers and thus
+  ** cannot be backfilled from the WAL.
+  */
+  mxSafeFrame = pWal->hdr.mxFrame;
+  mxPage = pWal->hdr.nPage;
+  for(i=1; i<WAL_NREADER; i++){
+    u32 y = pInfo->aReadMark[i];
+    if( mxSafeFrame>y ){
+      assert( y<=pWal->hdr.mxFrame );
+      rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(i), 1);
+      if( rc==SQLITE_OK ){
+        pInfo->aReadMark[i] = READMARK_NOT_USED;
+        walUnlockExclusive(pWal, WAL_READ_LOCK(i), 1);
+      }else if( rc==SQLITE_BUSY ){
+        mxSafeFrame = y;
+        xBusy = 0;
+      }else{
+        goto walcheckpoint_out;
+      }
+    }
+  }
+
+  if( pInfo->nBackfill<mxSafeFrame
+   && (rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(0), 1))==SQLITE_OK
+  ){
+    i64 nSize;                    /* Current size of database file */
+    u32 nBackfill = pInfo->nBackfill;
+
+    /* Sync the WAL to disk */
+    if( sync_flags ){
+      rc = sqlite3OsSync(pWal->pWalFd, sync_flags);
+    }
+
+    /* If the database file may grow as a result of this checkpoint, hint
+    ** about the eventual size of the db file to the VFS layer. 
+    */
+    if( rc==SQLITE_OK ){
+      i64 nReq = ((i64)mxPage * szPage);
+      rc = sqlite3OsFileSize(pWal->pDbFd, &nSize);
+      if( rc==SQLITE_OK && nSize<nReq ){
+        sqlite3OsFileControl(pWal->pDbFd, SQLITE_FCNTL_SIZE_HINT, &nReq);
+      }
+    }
+
+    /* Iterate through the contents of the WAL, copying data to the db file. */
+    while( rc==SQLITE_OK && 0==walIteratorNext(pIter, &iDbpage, &iFrame) ){
+      i64 iOffset;
+      assert( walFramePgno(pWal, iFrame)==iDbpage );
+      if( iFrame<=nBackfill || iFrame>mxSafeFrame || iDbpage>mxPage ) continue;
+      iOffset = walFrameOffset(iFrame, szPage) + WAL_FRAME_HDRSIZE;
+      /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL file */
+      rc = sqlite3OsRead(pWal->pWalFd, zBuf, szPage, iOffset);
+      if( rc!=SQLITE_OK ) break;
+      iOffset = (iDbpage-1)*(i64)szPage;
+      testcase( IS_BIG_INT(iOffset) );
+      rc = sqlite3OsWrite(pWal->pDbFd, zBuf, szPage, iOffset);
+      if( rc!=SQLITE_OK ) break;
+    }
+
+    /* If work was actually accomplished... */
+    if( rc==SQLITE_OK ){
+      if( mxSafeFrame==walIndexHdr(pWal)->mxFrame ){
+        i64 szDb = pWal->hdr.nPage*(i64)szPage;
+        testcase( IS_BIG_INT(szDb) );
+        rc = sqlite3OsTruncate(pWal->pDbFd, szDb);
+        if( rc==SQLITE_OK && sync_flags ){
+          rc = sqlite3OsSync(pWal->pDbFd, sync_flags);
+        }
+      }
+      if( rc==SQLITE_OK ){
+        pInfo->nBackfill = mxSafeFrame;
+      }
+    }
+
+    /* Release the reader lock held while backfilling */
+    walUnlockExclusive(pWal, WAL_READ_LOCK(0), 1);
+  }
+
+  if( rc==SQLITE_BUSY ){
+    /* Reset the return code so as not to report a checkpoint failure
+    ** just because there are active readers.  */
+    rc = SQLITE_OK;
+  }
+
+  /* If this is an SQLITE_CHECKPOINT_RESTART operation, and the entire wal
+  ** file has been copied into the database file, then block until all
+  ** readers have finished using the wal file. This ensures that the next
+  ** process to write to the database restarts the wal file.
+  */
+  if( rc==SQLITE_OK && eMode!=SQLITE_CHECKPOINT_PASSIVE ){
+    assert( pWal->writeLock );
+    if( pInfo->nBackfill<pWal->hdr.mxFrame ){
+      rc = SQLITE_BUSY;
+    }else if( eMode==SQLITE_CHECKPOINT_RESTART ){
+      assert( mxSafeFrame==pWal->hdr.mxFrame );
+      rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_READ_LOCK(1), WAL_NREADER-1);
+      if( rc==SQLITE_OK ){
+        walUnlockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
+      }
+    }
+  }
+
+ walcheckpoint_out:
+  walIteratorFree(pIter);
+  return rc;
+}
+
+/*
+** Close a connection to a log file.
+*/
+SQLITE_PRIVATE int sqlite3WalClose(
+  Wal *pWal,                      /* Wal to close */
+  int sync_flags,                 /* Flags to pass to OsSync() (or 0) */
+  int nBuf,
+  u8 *zBuf                        /* Buffer of at least nBuf bytes */
+){
+  int rc = SQLITE_OK;
+  if( pWal ){
+    int isDelete = 0;             /* True to unlink wal and wal-index files */
+
+    /* If an EXCLUSIVE lock can be obtained on the database file (using the
+    ** ordinary, rollback-mode locking methods, this guarantees that the
+    ** connection associated with this log file is the only connection to
+    ** the database. In this case checkpoint the database and unlink both
+    ** the wal and wal-index files.
+    **
+    ** The EXCLUSIVE lock is not released before returning.
+    */
+    rc = sqlite3OsLock(pWal->pDbFd, SQLITE_LOCK_EXCLUSIVE);
+    if( rc==SQLITE_OK ){
+      if( pWal->exclusiveMode==WAL_NORMAL_MODE ){
+        pWal->exclusiveMode = WAL_EXCLUSIVE_MODE;
+      }
+      rc = sqlite3WalCheckpoint(
+          pWal, SQLITE_CHECKPOINT_PASSIVE, 0, 0, sync_flags, nBuf, zBuf, 0, 0
+      );
+      if( rc==SQLITE_OK ){
+        isDelete = 1;
+      }
+    }
+
+    walIndexClose(pWal, isDelete);
+    sqlite3OsClose(pWal->pWalFd);
+    if( isDelete ){
+      sqlite3OsDelete(pWal->pVfs, pWal->zWalName, 0);
+    }
+    WALTRACE(("WAL%p: closed\n", pWal));
+    sqlite3_free((void *)pWal->apWiData);
+    sqlite3_free(pWal);
+  }
+  return rc;
+}
+
+/*
+** Try to read the wal-index header.  Return 0 on success and 1 if
+** there is a problem.
+**
+** The wal-index is in shared memory.  Another thread or process might
+** be writing the header at the same time this procedure is trying to
+** read it, which might result in inconsistency.  A dirty read is detected
+** by verifying that both copies of the header are the same and also by
+** a checksum on the header.
+**
+** If and only if the read is consistent and the header is different from
+** pWal->hdr, then pWal->hdr is updated to the content of the new header
+** and *pChanged is set to 1.
+**
+** If the checksum cannot be verified return non-zero. If the header
+** is read successfully and the checksum verified, return zero.
+*/
+static int walIndexTryHdr(Wal *pWal, int *pChanged){
+  u32 aCksum[2];                  /* Checksum on the header content */
+  WalIndexHdr h1, h2;             /* Two copies of the header content */
+  WalIndexHdr volatile *aHdr;     /* Header in shared memory */
+
+  /* The first page of the wal-index must be mapped at this point. */
+  assert( pWal->nWiData>0 && pWal->apWiData[0] );
+
+  /* Read the header. This might happen concurrently with a write to the
+  ** same area of shared memory on a different CPU in a SMP,
+  ** meaning it is possible that an inconsistent snapshot is read
+  ** from the file. If this happens, return non-zero.
+  **
+  ** There are two copies of the header at the beginning of the wal-index.
+  ** When reading, read [0] first then [1].  Writes are in the reverse order.
+  ** Memory barriers are used to prevent the compiler or the hardware from
+  ** reordering the reads and writes.
+  */
+  aHdr = walIndexHdr(pWal);
+  memcpy(&h1, (void *)&aHdr[0], sizeof(h1));
+  walShmBarrier(pWal);
+  memcpy(&h2, (void *)&aHdr[1], sizeof(h2));
+
+  if( memcmp(&h1, &h2, sizeof(h1))!=0 ){
+    return 1;   /* Dirty read */
+  }  
+  if( h1.isInit==0 ){
+    return 1;   /* Malformed header - probably all zeros */
+  }
+  walChecksumBytes(1, (u8*)&h1, sizeof(h1)-sizeof(h1.aCksum), 0, aCksum);
+  if( aCksum[0]!=h1.aCksum[0] || aCksum[1]!=h1.aCksum[1] ){
+    return 1;   /* Checksum does not match */
+  }
+
+  if( memcmp(&pWal->hdr, &h1, sizeof(WalIndexHdr)) ){
+    *pChanged = 1;
+    memcpy(&pWal->hdr, &h1, sizeof(WalIndexHdr));
+    pWal->szPage = (pWal->hdr.szPage&0xfe00) + ((pWal->hdr.szPage&0x0001)<<16);
+    testcase( pWal->szPage<=32768 );
+    testcase( pWal->szPage>=65536 );
+  }
+
+  /* The header was successfully read. Return zero. */
+  return 0;
+}
+
+/*
+** Read the wal-index header from the wal-index and into pWal->hdr.
+** If the wal-header appears to be corrupt, try to reconstruct the
+** wal-index from the WAL before returning.
+**
+** Set *pChanged to 1 if the wal-index header value in pWal->hdr is
+** changed by this opertion.  If pWal->hdr is unchanged, set *pChanged
+** to 0.
+**
+** If the wal-index header is successfully read, return SQLITE_OK. 
+** Otherwise an SQLite error code.
+*/
+static int walIndexReadHdr(Wal *pWal, int *pChanged){
+  int rc;                         /* Return code */
+  int badHdr;                     /* True if a header read failed */
+  volatile u32 *page0;            /* Chunk of wal-index containing header */
+
+  /* Ensure that page 0 of the wal-index (the page that contains the 
+  ** wal-index header) is mapped. Return early if an error occurs here.
+  */
+  assert( pChanged );
+  rc = walIndexPage(pWal, 0, &page0);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  };
+  assert( page0 || pWal->writeLock==0 );
+
+  /* If the first page of the wal-index has been mapped, try to read the
+  ** wal-index header immediately, without holding any lock. This usually
+  ** works, but may fail if the wal-index header is corrupt or currently 
+  ** being modified by another thread or process.
+  */
+  badHdr = (page0 ? walIndexTryHdr(pWal, pChanged) : 1);
+
+  /* If the first attempt failed, it might have been due to a race
+  ** with a writer.  So get a WRITE lock and try again.
+  */
+  assert( badHdr==0 || pWal->writeLock==0 );
+  if( badHdr && SQLITE_OK==(rc = walLockExclusive(pWal, WAL_WRITE_LOCK, 1)) ){
+    pWal->writeLock = 1;
+    if( SQLITE_OK==(rc = walIndexPage(pWal, 0, &page0)) ){
+      badHdr = walIndexTryHdr(pWal, pChanged);
+      if( badHdr ){
+        /* If the wal-index header is still malformed even while holding
+        ** a WRITE lock, it can only mean that the header is corrupted and
+        ** needs to be reconstructed.  So run recovery to do exactly that.
+        */
+        rc = walIndexRecover(pWal);
+        *pChanged = 1;
+      }
+    }
+    pWal->writeLock = 0;
+    walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
+  }
+
+  /* If the header is read successfully, check the version number to make
+  ** sure the wal-index was not constructed with some future format that
+  ** this version of SQLite cannot understand.
+  */
+  if( badHdr==0 && pWal->hdr.iVersion!=WALINDEX_MAX_VERSION ){
+    rc = SQLITE_CANTOPEN_BKPT;
+  }
+
+  return rc;
+}
+
+/*
+** This is the value that walTryBeginRead returns when it needs to
+** be retried.
+*/
+#define WAL_RETRY  (-1)
+
+/*
+** Attempt to start a read transaction.  This might fail due to a race or
+** other transient condition.  When that happens, it returns WAL_RETRY to
+** indicate to the caller that it is safe to retry immediately.
+**
+** On success return SQLITE_OK.  On a permanent failure (such an
+** I/O error or an SQLITE_BUSY because another process is running
+** recovery) return a positive error code.
+**
+** The useWal parameter is true to force the use of the WAL and disable
+** the case where the WAL is bypassed because it has been completely
+** checkpointed.  If useWal==0 then this routine calls walIndexReadHdr() 
+** to make a copy of the wal-index header into pWal->hdr.  If the 
+** wal-index header has changed, *pChanged is set to 1 (as an indication 
+** to the caller that the local paget cache is obsolete and needs to be 
+** flushed.)  When useWal==1, the wal-index header is assumed to already
+** be loaded and the pChanged parameter is unused.
+**
+** The caller must set the cnt parameter to the number of prior calls to
+** this routine during the current read attempt that returned WAL_RETRY.
+** This routine will start taking more aggressive measures to clear the
+** race conditions after multiple WAL_RETRY returns, and after an excessive
+** number of errors will ultimately return SQLITE_PROTOCOL.  The
+** SQLITE_PROTOCOL return indicates that some other process has gone rogue
+** and is not honoring the locking protocol.  There is a vanishingly small
+** chance that SQLITE_PROTOCOL could be returned because of a run of really
+** bad luck when there is lots of contention for the wal-index, but that
+** possibility is so small that it can be safely neglected, we believe.
+**
+** On success, this routine obtains a read lock on 
+** WAL_READ_LOCK(pWal->readLock).  The pWal->readLock integer is
+** in the range 0 <= pWal->readLock < WAL_NREADER.  If pWal->readLock==(-1)
+** that means the Wal does not hold any read lock.  The reader must not
+** access any database page that is modified by a WAL frame up to and
+** including frame number aReadMark[pWal->readLock].  The reader will
+** use WAL frames up to and including pWal->hdr.mxFrame if pWal->readLock>0
+** Or if pWal->readLock==0, then the reader will ignore the WAL
+** completely and get all content directly from the database file.
+** If the useWal parameter is 1 then the WAL will never be ignored and
+** this routine will always set pWal->readLock>0 on success.
+** When the read transaction is completed, the caller must release the
+** lock on WAL_READ_LOCK(pWal->readLock) and set pWal->readLock to -1.
+**
+** This routine uses the nBackfill and aReadMark[] fields of the header
+** to select a particular WAL_READ_LOCK() that strives to let the
+** checkpoint process do as much work as possible.  This routine might
+** update values of the aReadMark[] array in the header, but if it does
+** so it takes care to hold an exclusive lock on the corresponding
+** WAL_READ_LOCK() while changing values.
+*/
+static int walTryBeginRead(Wal *pWal, int *pChanged, int useWal, int cnt){
+  volatile WalCkptInfo *pInfo;    /* Checkpoint information in wal-index */
+  u32 mxReadMark;                 /* Largest aReadMark[] value */
+  int mxI;                        /* Index of largest aReadMark[] value */
+  int i;                          /* Loop counter */
+  int rc = SQLITE_OK;             /* Return code  */
+
+  assert( pWal->readLock<0 );     /* Not currently locked */
+
+  /* Take steps to avoid spinning forever if there is a protocol error.
+  **
+  ** Circumstances that cause a RETRY should only last for the briefest
+  ** instances of time.  No I/O or other system calls are done while the
+  ** locks are held, so the locks should not be held for very long. But 
+  ** if we are unlucky, another process that is holding a lock might get
+  ** paged out or take a page-fault that is time-consuming to resolve, 
+  ** during the few nanoseconds that it is holding the lock.  In that case,
+  ** it might take longer than normal for the lock to free.
+  **
+  ** After 5 RETRYs, we begin calling sqlite3OsSleep().  The first few
+  ** calls to sqlite3OsSleep() have a delay of 1 microsecond.  Really this
+  ** is more of a scheduler yield than an actual delay.  But on the 10th
+  ** an subsequent retries, the delays start becoming longer and longer, 
+  ** so that on the 100th (and last) RETRY we delay for 21 milliseconds.
+  ** The total delay time before giving up is less than 1 second.
+  */
+  if( cnt>5 ){
+    int nDelay = 1;                      /* Pause time in microseconds */
+    if( cnt>100 ){
+      VVA_ONLY( pWal->lockError = 1; )
+      return SQLITE_PROTOCOL;
+    }
+    if( cnt>=10 ) nDelay = (cnt-9)*238;  /* Max delay 21ms. Total delay 996ms */
+    sqlite3OsSleep(pWal->pVfs, nDelay);
+  }
+
+  if( !useWal ){
+    rc = walIndexReadHdr(pWal, pChanged);
+    if( rc==SQLITE_BUSY ){
+      /* If there is not a recovery running in another thread or process
+      ** then convert BUSY errors to WAL_RETRY.  If recovery is known to
+      ** be running, convert BUSY to BUSY_RECOVERY.  There is a race here
+      ** which might cause WAL_RETRY to be returned even if BUSY_RECOVERY
+      ** would be technically correct.  But the race is benign since with
+      ** WAL_RETRY this routine will be called again and will probably be
+      ** right on the second iteration.
+      */
+      if( pWal->apWiData[0]==0 ){
+        /* This branch is taken when the xShmMap() method returns SQLITE_BUSY.
+        ** We assume this is a transient condition, so return WAL_RETRY. The
+        ** xShmMap() implementation used by the default unix and win32 VFS 
+        ** modules may return SQLITE_BUSY due to a race condition in the 
+        ** code that determines whether or not the shared-memory region 
+        ** must be zeroed before the requested page is returned.
+        */
+        rc = WAL_RETRY;
+      }else if( SQLITE_OK==(rc = walLockShared(pWal, WAL_RECOVER_LOCK)) ){
+        walUnlockShared(pWal, WAL_RECOVER_LOCK);
+        rc = WAL_RETRY;
+      }else if( rc==SQLITE_BUSY ){
+        rc = SQLITE_BUSY_RECOVERY;
+      }
+    }
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+  }
+
+  pInfo = walCkptInfo(pWal);
+  if( !useWal && pInfo->nBackfill==pWal->hdr.mxFrame ){
+    /* The WAL has been completely backfilled (or it is empty).
+    ** and can be safely ignored.
+    */
+    rc = walLockShared(pWal, WAL_READ_LOCK(0));
+    walShmBarrier(pWal);
+    if( rc==SQLITE_OK ){
+      if( memcmp((void *)walIndexHdr(pWal), &pWal->hdr, sizeof(WalIndexHdr)) ){
+        /* It is not safe to allow the reader to continue here if frames
+        ** may have been appended to the log before READ_LOCK(0) was obtained.
+        ** When holding READ_LOCK(0), the reader ignores the entire log file,
+        ** which implies that the database file contains a trustworthy
+        ** snapshoT. Since holding READ_LOCK(0) prevents a checkpoint from
+        ** happening, this is usually correct.
+        **
+        ** However, if frames have been appended to the log (or if the log 
+        ** is wrapped and written for that matter) before the READ_LOCK(0)
+        ** is obtained, that is not necessarily true. A checkpointer may
+        ** have started to backfill the appended frames but crashed before
+        ** it finished. Leaving a corrupt image in the database file.
+        */
+        walUnlockShared(pWal, WAL_READ_LOCK(0));
+        return WAL_RETRY;
+      }
+      pWal->readLock = 0;
+      return SQLITE_OK;
+    }else if( rc!=SQLITE_BUSY ){
+      return rc;
+    }
+  }
+
+  /* If we get this far, it means that the reader will want to use
+  ** the WAL to get at content from recent commits.  The job now is
+  ** to select one of the aReadMark[] entries that is closest to
+  ** but not exceeding pWal->hdr.mxFrame and lock that entry.
+  */
+  mxReadMark = 0;
+  mxI = 0;
+  for(i=1; i<WAL_NREADER; i++){
+    u32 thisMark = pInfo->aReadMark[i];
+    if( mxReadMark<=thisMark && thisMark<=pWal->hdr.mxFrame ){
+      assert( thisMark!=READMARK_NOT_USED );
+      mxReadMark = thisMark;
+      mxI = i;
+    }
+  }
+  /* There was once an "if" here. The extra "{" is to preserve indentation. */
+  {
+    if( mxReadMark < pWal->hdr.mxFrame || mxI==0 ){
+      for(i=1; i<WAL_NREADER; i++){
+        rc = walLockExclusive(pWal, WAL_READ_LOCK(i), 1);
+        if( rc==SQLITE_OK ){
+          mxReadMark = pInfo->aReadMark[i] = pWal->hdr.mxFrame;
+          mxI = i;
+          walUnlockExclusive(pWal, WAL_READ_LOCK(i), 1);
+          break;
+        }else if( rc!=SQLITE_BUSY ){
+          return rc;
+        }
+      }
+    }
+    if( mxI==0 ){
+      assert( rc==SQLITE_BUSY );
+      return WAL_RETRY;
+    }
+
+    rc = walLockShared(pWal, WAL_READ_LOCK(mxI));
+    if( rc ){
+      return rc==SQLITE_BUSY ? WAL_RETRY : rc;
+    }
+    /* Now that the read-lock has been obtained, check that neither the
+    ** value in the aReadMark[] array or the contents of the wal-index
+    ** header have changed.
+    **
+    ** It is necessary to check that the wal-index header did not change
+    ** between the time it was read and when the shared-lock was obtained
+    ** on WAL_READ_LOCK(mxI) was obtained to account for the possibility
+    ** that the log file may have been wrapped by a writer, or that frames
+    ** that occur later in the log than pWal->hdr.mxFrame may have been
+    ** copied into the database by a checkpointer. If either of these things
+    ** happened, then reading the database with the current value of
+    ** pWal->hdr.mxFrame risks reading a corrupted snapshot. So, retry
+    ** instead.
+    **
+    ** This does not guarantee that the copy of the wal-index header is up to
+    ** date before proceeding. That would not be possible without somehow
+    ** blocking writers. It only guarantees that a dangerous checkpoint or 
+    ** log-wrap (either of which would require an exclusive lock on
+    ** WAL_READ_LOCK(mxI)) has not occurred since the snapshot was valid.
+    */
+    walShmBarrier(pWal);
+    if( pInfo->aReadMark[mxI]!=mxReadMark
+     || memcmp((void *)walIndexHdr(pWal), &pWal->hdr, sizeof(WalIndexHdr))
+    ){
+      walUnlockShared(pWal, WAL_READ_LOCK(mxI));
+      return WAL_RETRY;
+    }else{
+      assert( mxReadMark<=pWal->hdr.mxFrame );
+      pWal->readLock = (i16)mxI;
+    }
+  }
+  return rc;
+}
+
+/*
+** Begin a read transaction on the database.
+**
+** This routine used to be called sqlite3OpenSnapshot() and with good reason:
+** it takes a snapshot of the state of the WAL and wal-index for the current
+** instant in time.  The current thread will continue to use this snapshot.
+** Other threads might append new content to the WAL and wal-index but
+** that extra content is ignored by the current thread.
+**
+** If the database contents have changes since the previous read
+** transaction, then *pChanged is set to 1 before returning.  The
+** Pager layer will use this to know that is cache is stale and
+** needs to be flushed.
+*/
+SQLITE_PRIVATE int sqlite3WalBeginReadTransaction(Wal *pWal, int *pChanged){
+  int rc;                         /* Return code */
+  int cnt = 0;                    /* Number of TryBeginRead attempts */
+
+  do{
+    rc = walTryBeginRead(pWal, pChanged, 0, ++cnt);
+  }while( rc==WAL_RETRY );
+  testcase( (rc&0xff)==SQLITE_BUSY );
+  testcase( (rc&0xff)==SQLITE_IOERR );
+  testcase( rc==SQLITE_PROTOCOL );
+  testcase( rc==SQLITE_OK );
+  return rc;
+}
+
+/*
+** Finish with a read transaction.  All this does is release the
+** read-lock.
+*/
+SQLITE_PRIVATE void sqlite3WalEndReadTransaction(Wal *pWal){
+  sqlite3WalEndWriteTransaction(pWal);
+  if( pWal->readLock>=0 ){
+    walUnlockShared(pWal, WAL_READ_LOCK(pWal->readLock));
+    pWal->readLock = -1;
+  }
+}
+
+/*
+** Read a page from the WAL, if it is present in the WAL and if the 
+** current read transaction is configured to use the WAL.  
+**
+** The *pInWal is set to 1 if the requested page is in the WAL and
+** has been loaded.  Or *pInWal is set to 0 if the page was not in 
+** the WAL and needs to be read out of the database.
+*/
+SQLITE_PRIVATE int sqlite3WalRead(
+  Wal *pWal,                      /* WAL handle */
+  Pgno pgno,                      /* Database page number to read data for */
+  int *pInWal,                    /* OUT: True if data is read from WAL */
+  int nOut,                       /* Size of buffer pOut in bytes */
+  u8 *pOut                        /* Buffer to write page data to */
+){
+  u32 iRead = 0;                  /* If !=0, WAL frame to return data from */
+  u32 iLast = pWal->hdr.mxFrame;  /* Last page in WAL for this reader */
+  int iHash;                      /* Used to loop through N hash tables */
+
+  /* This routine is only be called from within a read transaction. */
+  assert( pWal->readLock>=0 || pWal->lockError );
+
+  /* If the "last page" field of the wal-index header snapshot is 0, then
+  ** no data will be read from the wal under any circumstances. Return early
+  ** in this case as an optimization.  Likewise, if pWal->readLock==0, 
+  ** then the WAL is ignored by the reader so return early, as if the 
+  ** WAL were empty.
+  */
+  if( iLast==0 || pWal->readLock==0 ){
+    *pInWal = 0;
+    return SQLITE_OK;
+  }
+
+  /* Search the hash table or tables for an entry matching page number
+  ** pgno. Each iteration of the following for() loop searches one
+  ** hash table (each hash table indexes up to HASHTABLE_NPAGE frames).
+  **
+  ** This code might run concurrently to the code in walIndexAppend()
+  ** that adds entries to the wal-index (and possibly to this hash 
+  ** table). This means the value just read from the hash 
+  ** slot (aHash[iKey]) may have been added before or after the 
+  ** current read transaction was opened. Values added after the
+  ** read transaction was opened may have been written incorrectly -
+  ** i.e. these slots may contain garbage data. However, we assume
+  ** that any slots written before the current read transaction was
+  ** opened remain unmodified.
+  **
+  ** For the reasons above, the if(...) condition featured in the inner
+  ** loop of the following block is more stringent that would be required 
+  ** if we had exclusive access to the hash-table:
+  **
+  **   (aPgno[iFrame]==pgno): 
+  **     This condition filters out normal hash-table collisions.
+  **
+  **   (iFrame<=iLast): 
+  **     This condition filters out entries that were added to the hash
+  **     table after the current read-transaction had started.
+  */
+  for(iHash=walFramePage(iLast); iHash>=0 && iRead==0; iHash--){
+    volatile ht_slot *aHash;      /* Pointer to hash table */
+    volatile u32 *aPgno;          /* Pointer to array of page numbers */
+    u32 iZero;                    /* Frame number corresponding to aPgno[0] */
+    int iKey;                     /* Hash slot index */
+    int nCollide;                 /* Number of hash collisions remaining */
+    int rc;                       /* Error code */
+
+    rc = walHashGet(pWal, iHash, &aHash, &aPgno, &iZero);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+    nCollide = HASHTABLE_NSLOT;
+    for(iKey=walHash(pgno); aHash[iKey]; iKey=walNextHash(iKey)){
+      u32 iFrame = aHash[iKey] + iZero;
+      if( iFrame<=iLast && aPgno[aHash[iKey]]==pgno ){
+        assert( iFrame>iRead );
+        iRead = iFrame;
+      }
+      if( (nCollide--)==0 ){
+        return SQLITE_CORRUPT_BKPT;
+      }
+    }
+  }
+
+#ifdef SQLITE_ENABLE_EXPENSIVE_ASSERT
+  /* If expensive assert() statements are available, do a linear search
+  ** of the wal-index file content. Make sure the results agree with the
+  ** result obtained using the hash indexes above.  */
+  {
+    u32 iRead2 = 0;
+    u32 iTest;
+    for(iTest=iLast; iTest>0; iTest--){
+      if( walFramePgno(pWal, iTest)==pgno ){
+        iRead2 = iTest;
+        break;
+      }
+    }
+    assert( iRead==iRead2 );
+  }
+#endif
+
+  /* If iRead is non-zero, then it is the log frame number that contains the
+  ** required page. Read and return data from the log file.
+  */
+  if( iRead ){
+    int sz;
+    i64 iOffset;
+    sz = pWal->hdr.szPage;
+    sz = (pWal->hdr.szPage&0xfe00) + ((pWal->hdr.szPage&0x0001)<<16);
+    testcase( sz<=32768 );
+    testcase( sz>=65536 );
+    iOffset = walFrameOffset(iRead, sz) + WAL_FRAME_HDRSIZE;
+    *pInWal = 1;
+    /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL */
+    return sqlite3OsRead(pWal->pWalFd, pOut, nOut, iOffset);
+  }
+
+  *pInWal = 0;
+  return SQLITE_OK;
+}
+
+
+/* 
+** Return the size of the database in pages (or zero, if unknown).
+*/
+SQLITE_PRIVATE Pgno sqlite3WalDbsize(Wal *pWal){
+  if( pWal && ALWAYS(pWal->readLock>=0) ){
+    return pWal->hdr.nPage;
+  }
+  return 0;
+}
+
+
+/* 
+** This function starts a write transaction on the WAL.
+**
+** A read transaction must have already been started by a prior call
+** to sqlite3WalBeginReadTransaction().
+**
+** If another thread or process has written into the database since
+** the read transaction was started, then it is not possible for this
+** thread to write as doing so would cause a fork.  So this routine
+** returns SQLITE_BUSY in that case and no write transaction is started.
+**
+** There can only be a single writer active at a time.
+*/
+SQLITE_PRIVATE int sqlite3WalBeginWriteTransaction(Wal *pWal){
+  int rc;
+
+  /* Cannot start a write transaction without first holding a read
+  ** transaction. */
+  assert( pWal->readLock>=0 );
+
+  if( pWal->readOnly ){
+    return SQLITE_READONLY;
+  }
+
+  /* Only one writer allowed at a time.  Get the write lock.  Return
+  ** SQLITE_BUSY if unable.
+  */
+  rc = walLockExclusive(pWal, WAL_WRITE_LOCK, 1);
+  if( rc ){
+    return rc;
+  }
+  pWal->writeLock = 1;
+
+  /* If another connection has written to the database file since the
+  ** time the read transaction on this connection was started, then
+  ** the write is disallowed.
+  */
+  if( memcmp(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr))!=0 ){
+    walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
+    pWal->writeLock = 0;
+    rc = SQLITE_BUSY;
+  }
+
+  return rc;
+}
+
+/*
+** End a write transaction.  The commit has already been done.  This
+** routine merely releases the lock.
+*/
+SQLITE_PRIVATE int sqlite3WalEndWriteTransaction(Wal *pWal){
+  if( pWal->writeLock ){
+    walUnlockExclusive(pWal, WAL_WRITE_LOCK, 1);
+    pWal->writeLock = 0;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** If any data has been written (but not committed) to the log file, this
+** function moves the write-pointer back to the start of the transaction.
+**
+** Additionally, the callback function is invoked for each frame written
+** to the WAL since the start of the transaction. If the callback returns
+** other than SQLITE_OK, it is not invoked again and the error code is
+** returned to the caller.
+**
+** Otherwise, if the callback function does not return an error, this
+** function returns SQLITE_OK.
+*/
+SQLITE_PRIVATE int sqlite3WalUndo(Wal *pWal, int (*xUndo)(void *, Pgno), void *pUndoCtx){
+  int rc = SQLITE_OK;
+  if( ALWAYS(pWal->writeLock) ){
+    Pgno iMax = pWal->hdr.mxFrame;
+    Pgno iFrame;
+  
+    /* Restore the clients cache of the wal-index header to the state it
+    ** was in before the client began writing to the database. 
+    */
+    memcpy(&pWal->hdr, (void *)walIndexHdr(pWal), sizeof(WalIndexHdr));
+
+    for(iFrame=pWal->hdr.mxFrame+1; 
+        ALWAYS(rc==SQLITE_OK) && iFrame<=iMax; 
+        iFrame++
+    ){
+      /* This call cannot fail. Unless the page for which the page number
+      ** is passed as the second argument is (a) in the cache and 
+      ** (b) has an outstanding reference, then xUndo is either a no-op
+      ** (if (a) is false) or simply expels the page from the cache (if (b)
+      ** is false).
+      **
+      ** If the upper layer is doing a rollback, it is guaranteed that there
+      ** are no outstanding references to any page other than page 1. And
+      ** page 1 is never written to the log until the transaction is
+      ** committed. As a result, the call to xUndo may not fail.
+      */
+      assert( walFramePgno(pWal, iFrame)!=1 );
+      rc = xUndo(pUndoCtx, walFramePgno(pWal, iFrame));
+    }
+    walCleanupHash(pWal);
+  }
+  assert( rc==SQLITE_OK );
+  return rc;
+}
+
+/* 
+** Argument aWalData must point to an array of WAL_SAVEPOINT_NDATA u32 
+** values. This function populates the array with values required to 
+** "rollback" the write position of the WAL handle back to the current 
+** point in the event of a savepoint rollback (via WalSavepointUndo()).
+*/
+SQLITE_PRIVATE void sqlite3WalSavepoint(Wal *pWal, u32 *aWalData){
+  assert( pWal->writeLock );
+  aWalData[0] = pWal->hdr.mxFrame;
+  aWalData[1] = pWal->hdr.aFrameCksum[0];
+  aWalData[2] = pWal->hdr.aFrameCksum[1];
+  aWalData[3] = pWal->nCkpt;
+}
+
+/* 
+** Move the write position of the WAL back to the point identified by
+** the values in the aWalData[] array. aWalData must point to an array
+** of WAL_SAVEPOINT_NDATA u32 values that has been previously populated
+** by a call to WalSavepoint().
+*/
+SQLITE_PRIVATE int sqlite3WalSavepointUndo(Wal *pWal, u32 *aWalData){
+  int rc = SQLITE_OK;
+
+  assert( pWal->writeLock );
+  assert( aWalData[3]!=pWal->nCkpt || aWalData[0]<=pWal->hdr.mxFrame );
+
+  if( aWalData[3]!=pWal->nCkpt ){
+    /* This savepoint was opened immediately after the write-transaction
+    ** was started. Right after that, the writer decided to wrap around
+    ** to the start of the log. Update the savepoint values to match.
+    */
+    aWalData[0] = 0;
+    aWalData[3] = pWal->nCkpt;
+  }
+
+  if( aWalData[0]<pWal->hdr.mxFrame ){
+    pWal->hdr.mxFrame = aWalData[0];
+    pWal->hdr.aFrameCksum[0] = aWalData[1];
+    pWal->hdr.aFrameCksum[1] = aWalData[2];
+    walCleanupHash(pWal);
+  }
+
+  return rc;
+}
+
+/*
+** This function is called just before writing a set of frames to the log
+** file (see sqlite3WalFrames()). It checks to see if, instead of appending
+** to the current log file, it is possible to overwrite the start of the
+** existing log file with the new frames (i.e. "reset" the log). If so,
+** it sets pWal->hdr.mxFrame to 0. Otherwise, pWal->hdr.mxFrame is left
+** unchanged.
+**
+** SQLITE_OK is returned if no error is encountered (regardless of whether
+** or not pWal->hdr.mxFrame is modified). An SQLite error code is returned
+** if an error occurs.
+*/
+static int walRestartLog(Wal *pWal){
+  int rc = SQLITE_OK;
+  int cnt;
+
+  if( pWal->readLock==0 ){
+    volatile WalCkptInfo *pInfo = walCkptInfo(pWal);
+    assert( pInfo->nBackfill==pWal->hdr.mxFrame );
+    if( pInfo->nBackfill>0 ){
+      u32 salt1;
+      sqlite3_randomness(4, &salt1);
+      rc = walLockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
+      if( rc==SQLITE_OK ){
+        /* If all readers are using WAL_READ_LOCK(0) (in other words if no
+        ** readers are currently using the WAL), then the transactions
+        ** frames will overwrite the start of the existing log. Update the
+        ** wal-index header to reflect this.
+        **
+        ** In theory it would be Ok to update the cache of the header only
+        ** at this point. But updating the actual wal-index header is also
+        ** safe and means there is no special case for sqlite3WalUndo()
+        ** to handle if this transaction is rolled back.
+        */
+        int i;                    /* Loop counter */
+        u32 *aSalt = pWal->hdr.aSalt;       /* Big-endian salt values */
+        pWal->nCkpt++;
+        pWal->hdr.mxFrame = 0;
+        sqlite3Put4byte((u8*)&aSalt[0], 1 + sqlite3Get4byte((u8*)&aSalt[0]));
+        aSalt[1] = salt1;
+        walIndexWriteHdr(pWal);
+        pInfo->nBackfill = 0;
+        for(i=1; i<WAL_NREADER; i++) pInfo->aReadMark[i] = READMARK_NOT_USED;
+        assert( pInfo->aReadMark[0]==0 );
+        walUnlockExclusive(pWal, WAL_READ_LOCK(1), WAL_NREADER-1);
+      }else if( rc!=SQLITE_BUSY ){
+        return rc;
+      }
+    }
+    walUnlockShared(pWal, WAL_READ_LOCK(0));
+    pWal->readLock = -1;
+    cnt = 0;
+    do{
+      int notUsed;
+      rc = walTryBeginRead(pWal, &notUsed, 1, ++cnt);
+    }while( rc==WAL_RETRY );
+    assert( (rc&0xff)!=SQLITE_BUSY ); /* BUSY not possible when useWal==1 */
+    testcase( (rc&0xff)==SQLITE_IOERR );
+    testcase( rc==SQLITE_PROTOCOL );
+    testcase( rc==SQLITE_OK );
+  }
+  return rc;
+}
+
+/* 
+** Write a set of frames to the log. The caller must hold the write-lock
+** on the log file (obtained using sqlite3WalBeginWriteTransaction()).
+*/
+SQLITE_PRIVATE int sqlite3WalFrames(
+  Wal *pWal,                      /* Wal handle to write to */
+  int szPage,                     /* Database page-size in bytes */
+  PgHdr *pList,                   /* List of dirty pages to write */
+  Pgno nTruncate,                 /* Database size after this commit */
+  int isCommit,                   /* True if this is a commit */
+  int sync_flags                  /* Flags to pass to OsSync() (or 0) */
+){
+  int rc;                         /* Used to catch return codes */
+  u32 iFrame;                     /* Next frame address */
+  u8 aFrame[WAL_FRAME_HDRSIZE];   /* Buffer to assemble frame-header in */
+  PgHdr *p;                       /* Iterator to run through pList with. */
+  PgHdr *pLast = 0;               /* Last frame in list */
+  int nLast = 0;                  /* Number of extra copies of last page */
+
+  assert( pList );
+  assert( pWal->writeLock );
+
+#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)
+  { int cnt; for(cnt=0, p=pList; p; p=p->pDirty, cnt++){}
+    WALTRACE(("WAL%p: frame write begin. %d frames. mxFrame=%d. %s\n",
+              pWal, cnt, pWal->hdr.mxFrame, isCommit ? "Commit" : "Spill"));
+  }
+#endif
+
+  /* See if it is possible to write these frames into the start of the
+  ** log file, instead of appending to it at pWal->hdr.mxFrame.
+  */
+  if( SQLITE_OK!=(rc = walRestartLog(pWal)) ){
+    return rc;
+  }
+
+  /* If this is the first frame written into the log, write the WAL
+  ** header to the start of the WAL file. See comments at the top of
+  ** this source file for a description of the WAL header format.
+  */
+  iFrame = pWal->hdr.mxFrame;
+  if( iFrame==0 ){
+    u8 aWalHdr[WAL_HDRSIZE];      /* Buffer to assemble wal-header in */
+    u32 aCksum[2];                /* Checksum for wal-header */
+
+    sqlite3Put4byte(&aWalHdr[0], (WAL_MAGIC | SQLITE_BIGENDIAN));
+    sqlite3Put4byte(&aWalHdr[4], WAL_MAX_VERSION);
+    sqlite3Put4byte(&aWalHdr[8], szPage);
+    sqlite3Put4byte(&aWalHdr[12], pWal->nCkpt);
+    sqlite3_randomness(8, pWal->hdr.aSalt);
+    memcpy(&aWalHdr[16], pWal->hdr.aSalt, 8);
+    walChecksumBytes(1, aWalHdr, WAL_HDRSIZE-2*4, 0, aCksum);
+    sqlite3Put4byte(&aWalHdr[24], aCksum[0]);
+    sqlite3Put4byte(&aWalHdr[28], aCksum[1]);
+    
+    pWal->szPage = szPage;
+    pWal->hdr.bigEndCksum = SQLITE_BIGENDIAN;
+    pWal->hdr.aFrameCksum[0] = aCksum[0];
+    pWal->hdr.aFrameCksum[1] = aCksum[1];
+
+    rc = sqlite3OsWrite(pWal->pWalFd, aWalHdr, sizeof(aWalHdr), 0);
+    WALTRACE(("WAL%p: wal-header write %s\n", pWal, rc ? "failed" : "ok"));
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+  }
+  assert( (int)pWal->szPage==szPage );
+
+  /* Write the log file. */
+  for(p=pList; p; p=p->pDirty){
+    u32 nDbsize;                  /* Db-size field for frame header */
+    i64 iOffset;                  /* Write offset in log file */
+    void *pData;
+   
+    iOffset = walFrameOffset(++iFrame, szPage);
+    /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL */
+    
+    /* Populate and write the frame header */
+    nDbsize = (isCommit && p->pDirty==0) ? nTruncate : 0;
+#if defined(SQLITE_HAS_CODEC)
+    if( (pData = sqlite3PagerCodec(p))==0 ) return SQLITE_NOMEM;
+#else
+    pData = p->pData;
+#endif
+    walEncodeFrame(pWal, p->pgno, nDbsize, pData, aFrame);
+    rc = sqlite3OsWrite(pWal->pWalFd, aFrame, sizeof(aFrame), iOffset);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+
+    /* Write the page data */
+    rc = sqlite3OsWrite(pWal->pWalFd, pData, szPage, iOffset+sizeof(aFrame));
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+    pLast = p;
+  }
+
+  /* Sync the log file if the 'isSync' flag was specified. */
+  if( sync_flags ){
+    i64 iSegment = sqlite3OsSectorSize(pWal->pWalFd);
+    i64 iOffset = walFrameOffset(iFrame+1, szPage);
+
+    assert( isCommit );
+    assert( iSegment>0 );
+
+    iSegment = (((iOffset+iSegment-1)/iSegment) * iSegment);
+    while( iOffset<iSegment ){
+      void *pData;
+#if defined(SQLITE_HAS_CODEC)
+      if( (pData = sqlite3PagerCodec(pLast))==0 ) return SQLITE_NOMEM;
+#else
+      pData = pLast->pData;
+#endif
+      walEncodeFrame(pWal, pLast->pgno, nTruncate, pData, aFrame);
+      /* testcase( IS_BIG_INT(iOffset) ); // requires a 4GiB WAL */
+      rc = sqlite3OsWrite(pWal->pWalFd, aFrame, sizeof(aFrame), iOffset);
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+      iOffset += WAL_FRAME_HDRSIZE;
+      rc = sqlite3OsWrite(pWal->pWalFd, pData, szPage, iOffset); 
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+      nLast++;
+      iOffset += szPage;
+    }
+
+    rc = sqlite3OsSync(pWal->pWalFd, sync_flags);
+  }
+
+  /* Append data to the wal-index. It is not necessary to lock the 
+  ** wal-index to do this as the SQLITE_SHM_WRITE lock held on the wal-index
+  ** guarantees that there are no other writers, and no data that may
+  ** be in use by existing readers is being overwritten.
+  */
+  iFrame = pWal->hdr.mxFrame;
+  for(p=pList; p && rc==SQLITE_OK; p=p->pDirty){
+    iFrame++;
+    rc = walIndexAppend(pWal, iFrame, p->pgno);
+  }
+  while( nLast>0 && rc==SQLITE_OK ){
+    iFrame++;
+    nLast--;
+    rc = walIndexAppend(pWal, iFrame, pLast->pgno);
+  }
+
+  if( rc==SQLITE_OK ){
+    /* Update the private copy of the header. */
+    pWal->hdr.szPage = (u16)((szPage&0xff00) | (szPage>>16));
+    testcase( szPage<=32768 );
+    testcase( szPage>=65536 );
+    pWal->hdr.mxFrame = iFrame;
+    if( isCommit ){
+      pWal->hdr.iChange++;
+      pWal->hdr.nPage = nTruncate;
+    }
+    /* If this is a commit, update the wal-index header too. */
+    if( isCommit ){
+      walIndexWriteHdr(pWal);
+      pWal->iCallback = iFrame;
+    }
+  }
+
+  WALTRACE(("WAL%p: frame write %s\n", pWal, rc ? "failed" : "ok"));
+  return rc;
+}
+
+/* 
+** This routine is called to implement sqlite3_wal_checkpoint() and
+** related interfaces.
+**
+** Obtain a CHECKPOINT lock and then backfill as much information as
+** we can from WAL into the database.
+**
+** If parameter xBusy is not NULL, it is a pointer to a busy-handler
+** callback. In this case this function runs a blocking checkpoint.
+*/
+SQLITE_PRIVATE int sqlite3WalCheckpoint(
+  Wal *pWal,                      /* Wal connection */
+  int eMode,                      /* PASSIVE, FULL or RESTART */
+  int (*xBusy)(void*),            /* Function to call when busy */
+  void *pBusyArg,                 /* Context argument for xBusyHandler */
+  int sync_flags,                 /* Flags to sync db file with (or 0) */
+  int nBuf,                       /* Size of temporary buffer */
+  u8 *zBuf,                       /* Temporary buffer to use */
+  int *pnLog,                     /* OUT: Number of frames in WAL */
+  int *pnCkpt                     /* OUT: Number of backfilled frames in WAL */
+){
+  int rc;                         /* Return code */
+  int isChanged = 0;              /* True if a new wal-index header is loaded */
+  int eMode2 = eMode;             /* Mode to pass to walCheckpoint() */
+
+  assert( pWal->ckptLock==0 );
+  assert( pWal->writeLock==0 );
+
+  WALTRACE(("WAL%p: checkpoint begins\n", pWal));
+  rc = walLockExclusive(pWal, WAL_CKPT_LOCK, 1);
+  if( rc ){
+    /* Usually this is SQLITE_BUSY meaning that another thread or process
+    ** is already running a checkpoint, or maybe a recovery.  But it might
+    ** also be SQLITE_IOERR. */
+    return rc;
+  }
+  pWal->ckptLock = 1;
+
+  /* If this is a blocking-checkpoint, then obtain the write-lock as well
+  ** to prevent any writers from running while the checkpoint is underway.
+  ** This has to be done before the call to walIndexReadHdr() below.
+  **
+  ** If the writer lock cannot be obtained, then a passive checkpoint is
+  ** run instead. Since the checkpointer is not holding the writer lock,
+  ** there is no point in blocking waiting for any readers. Assuming no 
+  ** other error occurs, this function will return SQLITE_BUSY to the caller.
+  */
+  if( eMode!=SQLITE_CHECKPOINT_PASSIVE ){
+    rc = walBusyLock(pWal, xBusy, pBusyArg, WAL_WRITE_LOCK, 1);
+    if( rc==SQLITE_OK ){
+      pWal->writeLock = 1;
+    }else if( rc==SQLITE_BUSY ){
+      eMode2 = SQLITE_CHECKPOINT_PASSIVE;
+      rc = SQLITE_OK;
+    }
+  }
+
+  /* Read the wal-index header. */
+  if( rc==SQLITE_OK ){
+    rc = walIndexReadHdr(pWal, &isChanged);
+  }
+
+  /* Copy data from the log to the database file. */
+  if( rc==SQLITE_OK ){
+    if( pWal->hdr.mxFrame && walPagesize(pWal)!=nBuf ){
+      rc = SQLITE_CORRUPT_BKPT;
+    }else{
+      rc = walCheckpoint(pWal, eMode2, xBusy, pBusyArg, sync_flags, zBuf);
+    }
+
+    /* If no error occurred, set the output variables. */
+    if( rc==SQLITE_OK || rc==SQLITE_BUSY ){
+      if( pnLog ) *pnLog = (int)pWal->hdr.mxFrame;
+      if( pnCkpt ) *pnCkpt = (int)(walCkptInfo(pWal)->nBackfill);
+    }
+  }
+
+  if( isChanged ){
+    /* If a new wal-index header was loaded before the checkpoint was 
+    ** performed, then the pager-cache associated with pWal is now
+    ** out of date. So zero the cached wal-index header to ensure that
+    ** next time the pager opens a snapshot on this database it knows that
+    ** the cache needs to be reset.
+    */
+    memset(&pWal->hdr, 0, sizeof(WalIndexHdr));
+  }
+
+  /* Release the locks. */
+  sqlite3WalEndWriteTransaction(pWal);
+  walUnlockExclusive(pWal, WAL_CKPT_LOCK, 1);
+  pWal->ckptLock = 0;
+  WALTRACE(("WAL%p: checkpoint %s\n", pWal, rc ? "failed" : "ok"));
+  return (rc==SQLITE_OK && eMode!=eMode2 ? SQLITE_BUSY : rc);
+}
+
+/* Return the value to pass to a sqlite3_wal_hook callback, the
+** number of frames in the WAL at the point of the last commit since
+** sqlite3WalCallback() was called.  If no commits have occurred since
+** the last call, then return 0.
+*/
+SQLITE_PRIVATE int sqlite3WalCallback(Wal *pWal){
+  u32 ret = 0;
+  if( pWal ){
+    ret = pWal->iCallback;
+    pWal->iCallback = 0;
+  }
+  return (int)ret;
+}
+
+/*
+** This function is called to change the WAL subsystem into or out
+** of locking_mode=EXCLUSIVE.
+**
+** If op is zero, then attempt to change from locking_mode=EXCLUSIVE
+** into locking_mode=NORMAL.  This means that we must acquire a lock
+** on the pWal->readLock byte.  If the WAL is already in locking_mode=NORMAL
+** or if the acquisition of the lock fails, then return 0.  If the
+** transition out of exclusive-mode is successful, return 1.  This
+** operation must occur while the pager is still holding the exclusive
+** lock on the main database file.
+**
+** If op is one, then change from locking_mode=NORMAL into 
+** locking_mode=EXCLUSIVE.  This means that the pWal->readLock must
+** be released.  Return 1 if the transition is made and 0 if the
+** WAL is already in exclusive-locking mode - meaning that this
+** routine is a no-op.  The pager must already hold the exclusive lock
+** on the main database file before invoking this operation.
+**
+** If op is negative, then do a dry-run of the op==1 case but do
+** not actually change anything. The pager uses this to see if it
+** should acquire the database exclusive lock prior to invoking
+** the op==1 case.
+*/
+SQLITE_PRIVATE int sqlite3WalExclusiveMode(Wal *pWal, int op){
+  int rc;
+  assert( pWal->writeLock==0 );
+  assert( pWal->exclusiveMode!=WAL_HEAPMEMORY_MODE || op==-1 );
+
+  /* pWal->readLock is usually set, but might be -1 if there was a 
+  ** prior error while attempting to acquire are read-lock. This cannot 
+  ** happen if the connection is actually in exclusive mode (as no xShmLock
+  ** locks are taken in this case). Nor should the pager attempt to
+  ** upgrade to exclusive-mode following such an error.
+  */
+  assert( pWal->readLock>=0 || pWal->lockError );
+  assert( pWal->readLock>=0 || (op<=0 && pWal->exclusiveMode==0) );
+
+  if( op==0 ){
+    if( pWal->exclusiveMode ){
+      pWal->exclusiveMode = 0;
+      if( walLockShared(pWal, WAL_READ_LOCK(pWal->readLock))!=SQLITE_OK ){
+        pWal->exclusiveMode = 1;
+      }
+      rc = pWal->exclusiveMode==0;
+    }else{
+      /* Already in locking_mode=NORMAL */
+      rc = 0;
+    }
+  }else if( op>0 ){
+    assert( pWal->exclusiveMode==0 );
+    assert( pWal->readLock>=0 );
+    walUnlockShared(pWal, WAL_READ_LOCK(pWal->readLock));
+    pWal->exclusiveMode = 1;
+    rc = 1;
+  }else{
+    rc = pWal->exclusiveMode==0;
+  }
+  return rc;
+}
+
+/* 
+** Return true if the argument is non-NULL and the WAL module is using
+** heap-memory for the wal-index. Otherwise, if the argument is NULL or the
+** WAL module is using shared-memory, return false. 
+*/
+SQLITE_PRIVATE int sqlite3WalHeapMemory(Wal *pWal){
+  return (pWal && pWal->exclusiveMode==WAL_HEAPMEMORY_MODE );
+}
+
+#endif /* #ifndef SQLITE_OMIT_WAL */
+
+/************** End of wal.c *************************************************/
+/************** Begin file btmutex.c *****************************************/
+/*
+** 2007 August 27
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains code used to implement mutexes on Btree objects.
+** This code really belongs in btree.c.  But btree.c is getting too
+** big and we want to break it down some.  This packaged seemed like
+** a good breakout.
+*/
+/************** Include btreeInt.h in the middle of btmutex.c ****************/
+/************** Begin file btreeInt.h ****************************************/
+/*
+** 2004 April 6
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file implements a external (disk-based) database using BTrees.
+** For a detailed discussion of BTrees, refer to
+**
+**     Donald E. Knuth, THE ART OF COMPUTER PROGRAMMING, Volume 3:
+**     "Sorting And Searching", pages 473-480. Addison-Wesley
+**     Publishing Company, Reading, Massachusetts.
+**
+** The basic idea is that each page of the file contains N database
+** entries and N+1 pointers to subpages.
+**
+**   ----------------------------------------------------------------
+**   |  Ptr(0) | Key(0) | Ptr(1) | Key(1) | ... | Key(N-1) | Ptr(N) |
+**   ----------------------------------------------------------------
+**
+** All of the keys on the page that Ptr(0) points to have values less
+** than Key(0).  All of the keys on page Ptr(1) and its subpages have
+** values greater than Key(0) and less than Key(1).  All of the keys
+** on Ptr(N) and its subpages have values greater than Key(N-1).  And
+** so forth.
+**
+** Finding a particular key requires reading O(log(M)) pages from the 
+** disk where M is the number of entries in the tree.
+**
+** In this implementation, a single file can hold one or more separate 
+** BTrees.  Each BTree is identified by the index of its root page.  The
+** key and data for any entry are combined to form the "payload".  A
+** fixed amount of payload can be carried directly on the database
+** page.  If the payload is larger than the preset amount then surplus
+** bytes are stored on overflow pages.  The payload for an entry
+** and the preceding pointer are combined to form a "Cell".  Each 
+** page has a small header which contains the Ptr(N) pointer and other
+** information such as the size of key and data.
+**
+** FORMAT DETAILS
+**
+** The file is divided into pages.  The first page is called page 1,
+** the second is page 2, and so forth.  A page number of zero indicates
+** "no such page".  The page size can be any power of 2 between 512 and 65536.
+** Each page can be either a btree page, a freelist page, an overflow
+** page, or a pointer-map page.
+**
+** The first page is always a btree page.  The first 100 bytes of the first
+** page contain a special header (the "file header") that describes the file.
+** The format of the file header is as follows:
+**
+**   OFFSET   SIZE    DESCRIPTION
+**      0      16     Header string: "SQLite format 3\000"
+**     16       2     Page size in bytes.  
+**     18       1     File format write version
+**     19       1     File format read version
+**     20       1     Bytes of unused space at the end of each page
+**     21       1     Max embedded payload fraction
+**     22       1     Min embedded payload fraction
+**     23       1     Min leaf payload fraction
+**     24       4     File change counter
+**     28       4     Reserved for future use
+**     32       4     First freelist page
+**     36       4     Number of freelist pages in the file
+**     40      60     15 4-byte meta values passed to higher layers
+**
+**     40       4     Schema cookie
+**     44       4     File format of schema layer
+**     48       4     Size of page cache
+**     52       4     Largest root-page (auto/incr_vacuum)
+**     56       4     1=UTF-8 2=UTF16le 3=UTF16be
+**     60       4     User version
+**     64       4     Incremental vacuum mode
+**     68       4     unused
+**     72       4     unused
+**     76       4     unused
+**
+** All of the integer values are big-endian (most significant byte first).
+**
+** The file change counter is incremented when the database is changed
+** This counter allows other processes to know when the file has changed
+** and thus when they need to flush their cache.
+**
+** The max embedded payload fraction is the amount of the total usable
+** space in a page that can be consumed by a single cell for standard
+** B-tree (non-LEAFDATA) tables.  A value of 255 means 100%.  The default
+** is to limit the maximum cell size so that at least 4 cells will fit
+** on one page.  Thus the default max embedded payload fraction is 64.
+**
+** If the payload for a cell is larger than the max payload, then extra
+** payload is spilled to overflow pages.  Once an overflow page is allocated,
+** as many bytes as possible are moved into the overflow pages without letting
+** the cell size drop below the min embedded payload fraction.
+**
+** The min leaf payload fraction is like the min embedded payload fraction
+** except that it applies to leaf nodes in a LEAFDATA tree.  The maximum
+** payload fraction for a LEAFDATA tree is always 100% (or 255) and it
+** not specified in the header.
+**
+** Each btree pages is divided into three sections:  The header, the
+** cell pointer array, and the cell content area.  Page 1 also has a 100-byte
+** file header that occurs before the page header.
+**
+**      |----------------|
+**      | file header    |   100 bytes.  Page 1 only.
+**      |----------------|
+**      | page header    |   8 bytes for leaves.  12 bytes for interior nodes
+**      |----------------|
+**      | cell pointer   |   |  2 bytes per cell.  Sorted order.
+**      | array          |   |  Grows downward
+**      |                |   v
+**      |----------------|
+**      | unallocated    |
+**      | space          |
+**      |----------------|   ^  Grows upwards
+**      | cell content   |   |  Arbitrary order interspersed with freeblocks.
+**      | area           |   |  and free space fragments.
+**      |----------------|
+**
+** The page headers looks like this:
+**
+**   OFFSET   SIZE     DESCRIPTION
+**      0       1      Flags. 1: intkey, 2: zerodata, 4: leafdata, 8: leaf
+**      1       2      byte offset to the first freeblock
+**      3       2      number of cells on this page
+**      5       2      first byte of the cell content area
+**      7       1      number of fragmented free bytes
+**      8       4      Right child (the Ptr(N) value).  Omitted on leaves.
+**
+** The flags define the format of this btree page.  The leaf flag means that
+** this page has no children.  The zerodata flag means that this page carries
+** only keys and no data.  The intkey flag means that the key is a integer
+** which is stored in the key size entry of the cell header rather than in
+** the payload area.
+**
+** The cell pointer array begins on the first byte after the page header.
+** The cell pointer array contains zero or more 2-byte numbers which are
+** offsets from the beginning of the page to the cell content in the cell
+** content area.  The cell pointers occur in sorted order.  The system strives
+** to keep free space after the last cell pointer so that new cells can
+** be easily added without having to defragment the page.
+**
+** Cell content is stored at the very end of the page and grows toward the
+** beginning of the page.
+**
+** Unused space within the cell content area is collected into a linked list of
+** freeblocks.  Each freeblock is at least 4 bytes in size.  The byte offset
+** to the first freeblock is given in the header.  Freeblocks occur in
+** increasing order.  Because a freeblock must be at least 4 bytes in size,
+** any group of 3 or fewer unused bytes in the cell content area cannot
+** exist on the freeblock chain.  A group of 3 or fewer free bytes is called
+** a fragment.  The total number of bytes in all fragments is recorded.
+** in the page header at offset 7.
+**
+**    SIZE    DESCRIPTION
+**      2     Byte offset of the next freeblock
+**      2     Bytes in this freeblock
+**
+** Cells are of variable length.  Cells are stored in the cell content area at
+** the end of the page.  Pointers to the cells are in the cell pointer array
+** that immediately follows the page header.  Cells is not necessarily
+** contiguous or in order, but cell pointers are contiguous and in order.
+**
+** Cell content makes use of variable length integers.  A variable
+** length integer is 1 to 9 bytes where the lower 7 bits of each 
+** byte are used.  The integer consists of all bytes that have bit 8 set and
+** the first byte with bit 8 clear.  The most significant byte of the integer
+** appears first.  A variable-length integer may not be more than 9 bytes long.
+** As a special case, all 8 bytes of the 9th byte are used as data.  This
+** allows a 64-bit integer to be encoded in 9 bytes.
+**
+**    0x00                      becomes  0x00000000
+**    0x7f                      becomes  0x0000007f
+**    0x81 0x00                 becomes  0x00000080
+**    0x82 0x00                 becomes  0x00000100
+**    0x80 0x7f                 becomes  0x0000007f
+**    0x8a 0x91 0xd1 0xac 0x78  becomes  0x12345678
+**    0x81 0x81 0x81 0x81 0x01  becomes  0x10204081
+**
+** Variable length integers are used for rowids and to hold the number of
+** bytes of key and data in a btree cell.
+**
+** The content of a cell looks like this:
+**
+**    SIZE    DESCRIPTION
+**      4     Page number of the left child. Omitted if leaf flag is set.
+**     var    Number of bytes of data. Omitted if the zerodata flag is set.
+**     var    Number of bytes of key. Or the key itself if intkey flag is set.
+**      *     Payload
+**      4     First page of the overflow chain.  Omitted if no overflow
+**
+** Overflow pages form a linked list.  Each page except the last is completely
+** filled with data (pagesize - 4 bytes).  The last page can have as little
+** as 1 byte of data.
+**
+**    SIZE    DESCRIPTION
+**      4     Page number of next overflow page
+**      *     Data
+**
+** Freelist pages come in two subtypes: trunk pages and leaf pages.  The
+** file header points to the first in a linked list of trunk page.  Each trunk
+** page points to multiple leaf pages.  The content of a leaf page is
+** unspecified.  A trunk page looks like this:
+**
+**    SIZE    DESCRIPTION
+**      4     Page number of next trunk page
+**      4     Number of leaf pointers on this page
+**      *     zero or more pages numbers of leaves
+*/
+
+
+/* The following value is the maximum cell size assuming a maximum page
+** size give above.
+*/
+#define MX_CELL_SIZE(pBt)  ((int)(pBt->pageSize-8))
+
+/* The maximum number of cells on a single page of the database.  This
+** assumes a minimum cell size of 6 bytes  (4 bytes for the cell itself
+** plus 2 bytes for the index to the cell in the page header).  Such
+** small cells will be rare, but they are possible.
+*/
+#define MX_CELL(pBt) ((pBt->pageSize-8)/6)
+
+/* Forward declarations */
+typedef struct MemPage MemPage;
+typedef struct BtLock BtLock;
+
+/*
+** This is a magic string that appears at the beginning of every
+** SQLite database in order to identify the file as a real database.
+**
+** You can change this value at compile-time by specifying a
+** -DSQLITE_FILE_HEADER="..." on the compiler command-line.  The
+** header must be exactly 16 bytes including the zero-terminator so
+** the string itself should be 15 characters long.  If you change
+** the header, then your custom library will not be able to read 
+** databases generated by the standard tools and the standard tools
+** will not be able to read databases created by your custom library.
+*/
+#ifndef SQLITE_FILE_HEADER /* 123456789 123456 */
+#  define SQLITE_FILE_HEADER "SQLite format 3"
+#endif
+
+/*
+** Page type flags.  An ORed combination of these flags appear as the
+** first byte of on-disk image of every BTree page.
+*/
+#define PTF_INTKEY    0x01
+#define PTF_ZERODATA  0x02
+#define PTF_LEAFDATA  0x04
+#define PTF_LEAF      0x08
+
+/*
+** As each page of the file is loaded into memory, an instance of the following
+** structure is appended and initialized to zero.  This structure stores
+** information about the page that is decoded from the raw file page.
+**
+** The pParent field points back to the parent page.  This allows us to
+** walk up the BTree from any leaf to the root.  Care must be taken to
+** unref() the parent page pointer when this page is no longer referenced.
+** The pageDestructor() routine handles that chore.
+**
+** Access to all fields of this structure is controlled by the mutex
+** stored in MemPage.pBt->mutex.
+*/
+struct MemPage {
+  u8 isInit;           /* True if previously initialized. MUST BE FIRST! */
+  u8 nOverflow;        /* Number of overflow cell bodies in aCell[] */
+  u8 intKey;           /* True if intkey flag is set */
+  u8 leaf;             /* True if leaf flag is set */
+  u8 hasData;          /* True if this page stores data */
+  u8 hdrOffset;        /* 100 for page 1.  0 otherwise */
+  u8 childPtrSize;     /* 0 if leaf==1.  4 if leaf==0 */
+  u16 maxLocal;        /* Copy of BtShared.maxLocal or BtShared.maxLeaf */
+  u16 minLocal;        /* Copy of BtShared.minLocal or BtShared.minLeaf */
+  u16 cellOffset;      /* Index in aData of first cell pointer */
+  u16 nFree;           /* Number of free bytes on the page */
+  u16 nCell;           /* Number of cells on this page, local and ovfl */
+  u16 maskPage;        /* Mask for page offset */
+  struct _OvflCell {   /* Cells that will not fit on aData[] */
+    u8 *pCell;          /* Pointers to the body of the overflow cell */
+    u16 idx;            /* Insert this cell before idx-th non-overflow cell */
+  } aOvfl[5];
+  BtShared *pBt;       /* Pointer to BtShared that this page is part of */
+  u8 *aData;           /* Pointer to disk image of the page data */
+  DbPage *pDbPage;     /* Pager page handle */
+  Pgno pgno;           /* Page number for this page */
+};
+
+/*
+** The in-memory image of a disk page has the auxiliary information appended
+** to the end.  EXTRA_SIZE is the number of bytes of space needed to hold
+** that extra information.
+*/
+#define EXTRA_SIZE sizeof(MemPage)
+
+/*
+** A linked list of the following structures is stored at BtShared.pLock.
+** Locks are added (or upgraded from READ_LOCK to WRITE_LOCK) when a cursor 
+** is opened on the table with root page BtShared.iTable. Locks are removed
+** from this list when a transaction is committed or rolled back, or when
+** a btree handle is closed.
+*/
+struct BtLock {
+  Btree *pBtree;        /* Btree handle holding this lock */
+  Pgno iTable;          /* Root page of table */
+  u8 eLock;             /* READ_LOCK or WRITE_LOCK */
+  BtLock *pNext;        /* Next in BtShared.pLock list */
+};
+
+/* Candidate values for BtLock.eLock */
+#define READ_LOCK     1
+#define WRITE_LOCK    2
+
+/* A Btree handle
+**
+** A database connection contains a pointer to an instance of
+** this object for every database file that it has open.  This structure
+** is opaque to the database connection.  The database connection cannot
+** see the internals of this structure and only deals with pointers to
+** this structure.
+**
+** For some database files, the same underlying database cache might be 
+** shared between multiple connections.  In that case, each connection
+** has it own instance of this object.  But each instance of this object
+** points to the same BtShared object.  The database cache and the
+** schema associated with the database file are all contained within
+** the BtShared object.
+**
+** All fields in this structure are accessed under sqlite3.mutex.
+** The pBt pointer itself may not be changed while there exists cursors 
+** in the referenced BtShared that point back to this Btree since those
+** cursors have to go through this Btree to find their BtShared and
+** they often do so without holding sqlite3.mutex.
+*/
+struct Btree {
+  sqlite3 *db;       /* The database connection holding this btree */
+  BtShared *pBt;     /* Sharable content of this btree */
+  u8 inTrans;        /* TRANS_NONE, TRANS_READ or TRANS_WRITE */
+  u8 sharable;       /* True if we can share pBt with another db */
+  u8 locked;         /* True if db currently has pBt locked */
+  int wantToLock;    /* Number of nested calls to sqlite3BtreeEnter() */
+  int nBackup;       /* Number of backup operations reading this btree */
+  Btree *pNext;      /* List of other sharable Btrees from the same db */
+  Btree *pPrev;      /* Back pointer of the same list */
+#ifndef SQLITE_OMIT_SHARED_CACHE
+  BtLock lock;       /* Object used to lock page 1 */
+#endif
+};
+
+/*
+** Btree.inTrans may take one of the following values.
+**
+** If the shared-data extension is enabled, there may be multiple users
+** of the Btree structure. At most one of these may open a write transaction,
+** but any number may have active read transactions.
+*/
+#define TRANS_NONE  0
+#define TRANS_READ  1
+#define TRANS_WRITE 2
+
+/*
+** An instance of this object represents a single database file.
+** 
+** A single database file can be in use as the same time by two
+** or more database connections.  When two or more connections are
+** sharing the same database file, each connection has it own
+** private Btree object for the file and each of those Btrees points
+** to this one BtShared object.  BtShared.nRef is the number of
+** connections currently sharing this database file.
+**
+** Fields in this structure are accessed under the BtShared.mutex
+** mutex, except for nRef and pNext which are accessed under the
+** global SQLITE_MUTEX_STATIC_MASTER mutex.  The pPager field
+** may not be modified once it is initially set as long as nRef>0.
+** The pSchema field may be set once under BtShared.mutex and
+** thereafter is unchanged as long as nRef>0.
+**
+** isPending:
+**
+**   If a BtShared client fails to obtain a write-lock on a database
+**   table (because there exists one or more read-locks on the table),
+**   the shared-cache enters 'pending-lock' state and isPending is
+**   set to true.
+**
+**   The shared-cache leaves the 'pending lock' state when either of
+**   the following occur:
+**
+**     1) The current writer (BtShared.pWriter) concludes its transaction, OR
+**     2) The number of locks held by other connections drops to zero.
+**
+**   while in the 'pending-lock' state, no connection may start a new
+**   transaction.
+**
+**   This feature is included to help prevent writer-starvation.
+*/
+struct BtShared {
+  Pager *pPager;        /* The page cache */
+  sqlite3 *db;          /* Database connection currently using this Btree */
+  BtCursor *pCursor;    /* A list of all open cursors */
+  MemPage *pPage1;      /* First page of the database */
+  u8 readOnly;          /* True if the underlying file is readonly */
+  u8 pageSizeFixed;     /* True if the page size can no longer be changed */
+  u8 secureDelete;      /* True if secure_delete is enabled */
+  u8 initiallyEmpty;    /* Database is empty at start of transaction */
+  u8 openFlags;         /* Flags to sqlite3BtreeOpen() */
+#ifndef SQLITE_OMIT_AUTOVACUUM
+  u8 autoVacuum;        /* True if auto-vacuum is enabled */
+  u8 incrVacuum;        /* True if incr-vacuum is enabled */
+#endif
+  u8 inTransaction;     /* Transaction state */
+  u8 doNotUseWAL;       /* If true, do not open write-ahead-log file */
+  u16 maxLocal;         /* Maximum local payload in non-LEAFDATA tables */
+  u16 minLocal;         /* Minimum local payload in non-LEAFDATA tables */
+  u16 maxLeaf;          /* Maximum local payload in a LEAFDATA table */
+  u16 minLeaf;          /* Minimum local payload in a LEAFDATA table */
+  u32 pageSize;         /* Total number of bytes on a page */
+  u32 usableSize;       /* Number of usable bytes on each page */
+  int nTransaction;     /* Number of open transactions (read + write) */
+  u32 nPage;            /* Number of pages in the database */
+  void *pSchema;        /* Pointer to space allocated by sqlite3BtreeSchema() */
+  void (*xFreeSchema)(void*);  /* Destructor for BtShared.pSchema */
+  sqlite3_mutex *mutex; /* Non-recursive mutex required to access this object */
+  Bitvec *pHasContent;  /* Set of pages moved to free-list this transaction */
+#ifndef SQLITE_OMIT_SHARED_CACHE
+  int nRef;             /* Number of references to this structure */
+  BtShared *pNext;      /* Next on a list of sharable BtShared structs */
+  BtLock *pLock;        /* List of locks held on this shared-btree struct */
+  Btree *pWriter;       /* Btree with currently open write transaction */
+  u8 isExclusive;       /* True if pWriter has an EXCLUSIVE lock on the db */
+  u8 isPending;         /* If waiting for read-locks to clear */
+#endif
+  u8 *pTmpSpace;        /* BtShared.pageSize bytes of space for tmp use */
+};
+
+/*
+** An instance of the following structure is used to hold information
+** about a cell.  The parseCellPtr() function fills in this structure
+** based on information extract from the raw disk page.
+*/
+typedef struct CellInfo CellInfo;
+struct CellInfo {
+  i64 nKey;      /* The key for INTKEY tables, or number of bytes in key */
+  u8 *pCell;     /* Pointer to the start of cell content */
+  u32 nData;     /* Number of bytes of data */
+  u32 nPayload;  /* Total amount of payload */
+  u16 nHeader;   /* Size of the cell content header in bytes */
+  u16 nLocal;    /* Amount of payload held locally */
+  u16 iOverflow; /* Offset to overflow page number.  Zero if no overflow */
+  u16 nSize;     /* Size of the cell content on the main b-tree page */
+};
+
+/*
+** Maximum depth of an SQLite B-Tree structure. Any B-Tree deeper than
+** this will be declared corrupt. This value is calculated based on a
+** maximum database size of 2^31 pages a minimum fanout of 2 for a
+** root-node and 3 for all other internal nodes.
+**
+** If a tree that appears to be taller than this is encountered, it is
+** assumed that the database is corrupt.
+*/
+#define BTCURSOR_MAX_DEPTH 20
+
+/*
+** A cursor is a pointer to a particular entry within a particular
+** b-tree within a database file.
+**
+** The entry is identified by its MemPage and the index in
+** MemPage.aCell[] of the entry.
+**
+** A single database file can shared by two more database connections,
+** but cursors cannot be shared.  Each cursor is associated with a
+** particular database connection identified BtCursor.pBtree.db.
+**
+** Fields in this structure are accessed under the BtShared.mutex
+** found at self->pBt->mutex. 
+*/
+struct BtCursor {
+  Btree *pBtree;            /* The Btree to which this cursor belongs */
+  BtShared *pBt;            /* The BtShared this cursor points to */
+  BtCursor *pNext, *pPrev;  /* Forms a linked list of all cursors */
+  struct KeyInfo *pKeyInfo; /* Argument passed to comparison function */
+  Pgno pgnoRoot;            /* The root page of this tree */
+  sqlite3_int64 cachedRowid; /* Next rowid cache.  0 means not valid */
+  CellInfo info;            /* A parse of the cell we are pointing at */
+  i64 nKey;        /* Size of pKey, or last integer key */
+  void *pKey;      /* Saved key that was cursor's last known position */
+  int skipNext;    /* Prev() is noop if negative. Next() is noop if positive */
+  u8 wrFlag;                /* True if writable */
+  u8 atLast;                /* Cursor pointing to the last entry */
+  u8 validNKey;             /* True if info.nKey is valid */
+  u8 eState;                /* One of the CURSOR_XXX constants (see below) */
+#ifndef SQLITE_OMIT_INCRBLOB
+  Pgno *aOverflow;          /* Cache of overflow page locations */
+  u8 isIncrblobHandle;      /* True if this cursor is an incr. io handle */
+#endif
+  i16 iPage;                            /* Index of current page in apPage */
+  u16 aiIdx[BTCURSOR_MAX_DEPTH];        /* Current index in apPage[i] */
+  MemPage *apPage[BTCURSOR_MAX_DEPTH];  /* Pages from root to current page */
+};
+
+/*
+** Potential values for BtCursor.eState.
+**
+** CURSOR_VALID:
+**   Cursor points to a valid entry. getPayload() etc. may be called.
+**
+** CURSOR_INVALID:
+**   Cursor does not point to a valid entry. This can happen (for example) 
+**   because the table is empty or because BtreeCursorFirst() has not been
+**   called.
+**
+** CURSOR_REQUIRESEEK:
+**   The table that this cursor was opened on still exists, but has been 
+**   modified since the cursor was last used. The cursor position is saved
+**   in variables BtCursor.pKey and BtCursor.nKey. When a cursor is in 
+**   this state, restoreCursorPosition() can be called to attempt to
+**   seek the cursor to the saved position.
+**
+** CURSOR_FAULT:
+**   A unrecoverable error (an I/O error or a malloc failure) has occurred
+**   on a different connection that shares the BtShared cache with this
+**   cursor.  The error has left the cache in an inconsistent state.
+**   Do nothing else with this cursor.  Any attempt to use the cursor
+**   should return the error code stored in BtCursor.skip
+*/
+#define CURSOR_INVALID           0
+#define CURSOR_VALID             1
+#define CURSOR_REQUIRESEEK       2
+#define CURSOR_FAULT             3
+
+/* 
+** The database page the PENDING_BYTE occupies. This page is never used.
+*/
+# define PENDING_BYTE_PAGE(pBt) PAGER_MJ_PGNO(pBt)
+
+/*
+** These macros define the location of the pointer-map entry for a 
+** database page. The first argument to each is the number of usable
+** bytes on each page of the database (often 1024). The second is the
+** page number to look up in the pointer map.
+**
+** PTRMAP_PAGENO returns the database page number of the pointer-map
+** page that stores the required pointer. PTRMAP_PTROFFSET returns
+** the offset of the requested map entry.
+**
+** If the pgno argument passed to PTRMAP_PAGENO is a pointer-map page,
+** then pgno is returned. So (pgno==PTRMAP_PAGENO(pgsz, pgno)) can be
+** used to test if pgno is a pointer-map page. PTRMAP_ISPAGE implements
+** this test.
+*/
+#define PTRMAP_PAGENO(pBt, pgno) ptrmapPageno(pBt, pgno)
+#define PTRMAP_PTROFFSET(pgptrmap, pgno) (5*(pgno-pgptrmap-1))
+#define PTRMAP_ISPAGE(pBt, pgno) (PTRMAP_PAGENO((pBt),(pgno))==(pgno))
+
+/*
+** The pointer map is a lookup table that identifies the parent page for
+** each child page in the database file.  The parent page is the page that
+** contains a pointer to the child.  Every page in the database contains
+** 0 or 1 parent pages.  (In this context 'database page' refers
+** to any page that is not part of the pointer map itself.)  Each pointer map
+** entry consists of a single byte 'type' and a 4 byte parent page number.
+** The PTRMAP_XXX identifiers below are the valid types.
+**
+** The purpose of the pointer map is to facility moving pages from one
+** position in the file to another as part of autovacuum.  When a page
+** is moved, the pointer in its parent must be updated to point to the
+** new location.  The pointer map is used to locate the parent page quickly.
+**
+** PTRMAP_ROOTPAGE: The database page is a root-page. The page-number is not
+**                  used in this case.
+**
+** PTRMAP_FREEPAGE: The database page is an unused (free) page. The page-number 
+**                  is not used in this case.
+**
+** PTRMAP_OVERFLOW1: The database page is the first page in a list of 
+**                   overflow pages. The page number identifies the page that
+**                   contains the cell with a pointer to this overflow page.
+**
+** PTRMAP_OVERFLOW2: The database page is the second or later page in a list of
+**                   overflow pages. The page-number identifies the previous
+**                   page in the overflow page list.
+**
+** PTRMAP_BTREE: The database page is a non-root btree page. The page number
+**               identifies the parent page in the btree.
+*/
+#define PTRMAP_ROOTPAGE 1
+#define PTRMAP_FREEPAGE 2
+#define PTRMAP_OVERFLOW1 3
+#define PTRMAP_OVERFLOW2 4
+#define PTRMAP_BTREE 5
+
+/* A bunch of assert() statements to check the transaction state variables
+** of handle p (type Btree*) are internally consistent.
+*/
+#define btreeIntegrity(p) \
+  assert( p->pBt->inTransaction!=TRANS_NONE || p->pBt->nTransaction==0 ); \
+  assert( p->pBt->inTransaction>=p->inTrans ); 
+
+
+/*
+** The ISAUTOVACUUM macro is used within balance_nonroot() to determine
+** if the database supports auto-vacuum or not. Because it is used
+** within an expression that is an argument to another macro 
+** (sqliteMallocRaw), it is not possible to use conditional compilation.
+** So, this macro is defined instead.
+*/
+#ifndef SQLITE_OMIT_AUTOVACUUM
+#define ISAUTOVACUUM (pBt->autoVacuum)
+#else
+#define ISAUTOVACUUM 0
+#endif
+
+
+/*
+** This structure is passed around through all the sanity checking routines
+** in order to keep track of some global state information.
+*/
+typedef struct IntegrityCk IntegrityCk;
+struct IntegrityCk {
+  BtShared *pBt;    /* The tree being checked out */
+  Pager *pPager;    /* The associated pager.  Also accessible by pBt->pPager */
+  Pgno nPage;       /* Number of pages in the database */
+  int *anRef;       /* Number of times each page is referenced */
+  int mxErr;        /* Stop accumulating errors when this reaches zero */
+  int nErr;         /* Number of messages written to zErrMsg so far */
+  int mallocFailed; /* A memory allocation error has occurred */
+  StrAccum errMsg;  /* Accumulate the error message text here */
+};
+
+/*
+** Read or write a two- and four-byte big-endian integer values.
+*/
+#define get2byte(x)   ((x)[0]<<8 | (x)[1])
+#define put2byte(p,v) ((p)[0] = (u8)((v)>>8), (p)[1] = (u8)(v))
+#define get4byte sqlite3Get4byte
+#define put4byte sqlite3Put4byte
+
+/************** End of btreeInt.h ********************************************/
+/************** Continuing where we left off in btmutex.c ********************/
+#ifndef SQLITE_OMIT_SHARED_CACHE
+#if SQLITE_THREADSAFE
+
+/*
+** Obtain the BtShared mutex associated with B-Tree handle p. Also,
+** set BtShared.db to the database handle associated with p and the
+** p->locked boolean to true.
+*/
+static void lockBtreeMutex(Btree *p){
+  assert( p->locked==0 );
+  assert( sqlite3_mutex_notheld(p->pBt->mutex) );
+  assert( sqlite3_mutex_held(p->db->mutex) );
+
+  sqlite3_mutex_enter(p->pBt->mutex);
+  p->pBt->db = p->db;
+  p->locked = 1;
+}
+
+/*
+** Release the BtShared mutex associated with B-Tree handle p and
+** clear the p->locked boolean.
+*/
+static void unlockBtreeMutex(Btree *p){
+  BtShared *pBt = p->pBt;
+  assert( p->locked==1 );
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  assert( sqlite3_mutex_held(p->db->mutex) );
+  assert( p->db==pBt->db );
+
+  sqlite3_mutex_leave(pBt->mutex);
+  p->locked = 0;
+}
+
+/*
+** Enter a mutex on the given BTree object.
+**
+** If the object is not sharable, then no mutex is ever required
+** and this routine is a no-op.  The underlying mutex is non-recursive.
+** But we keep a reference count in Btree.wantToLock so the behavior
+** of this interface is recursive.
+**
+** To avoid deadlocks, multiple Btrees are locked in the same order
+** by all database connections.  The p->pNext is a list of other
+** Btrees belonging to the same database connection as the p Btree
+** which need to be locked after p.  If we cannot get a lock on
+** p, then first unlock all of the others on p->pNext, then wait
+** for the lock to become available on p, then relock all of the
+** subsequent Btrees that desire a lock.
+*/
+SQLITE_PRIVATE void sqlite3BtreeEnter(Btree *p){
+  Btree *pLater;
+
+  /* Some basic sanity checking on the Btree.  The list of Btrees
+  ** connected by pNext and pPrev should be in sorted order by
+  ** Btree.pBt value. All elements of the list should belong to
+  ** the same connection. Only shared Btrees are on the list. */
+  assert( p->pNext==0 || p->pNext->pBt>p->pBt );
+  assert( p->pPrev==0 || p->pPrev->pBt<p->pBt );
+  assert( p->pNext==0 || p->pNext->db==p->db );
+  assert( p->pPrev==0 || p->pPrev->db==p->db );
+  assert( p->sharable || (p->pNext==0 && p->pPrev==0) );
+
+  /* Check for locking consistency */
+  assert( !p->locked || p->wantToLock>0 );
+  assert( p->sharable || p->wantToLock==0 );
+
+  /* We should already hold a lock on the database connection */
+  assert( sqlite3_mutex_held(p->db->mutex) );
+
+  /* Unless the database is sharable and unlocked, then BtShared.db
+  ** should already be set correctly. */
+  assert( (p->locked==0 && p->sharable) || p->pBt->db==p->db );
+
+  if( !p->sharable ) return;
+  p->wantToLock++;
+  if( p->locked ) return;
+
+  /* In most cases, we should be able to acquire the lock we
+  ** want without having to go throught the ascending lock
+  ** procedure that follows.  Just be sure not to block.
+  */
+  if( sqlite3_mutex_try(p->pBt->mutex)==SQLITE_OK ){
+    p->pBt->db = p->db;
+    p->locked = 1;
+    return;
+  }
+
+  /* To avoid deadlock, first release all locks with a larger
+  ** BtShared address.  Then acquire our lock.  Then reacquire
+  ** the other BtShared locks that we used to hold in ascending
+  ** order.
+  */
+  for(pLater=p->pNext; pLater; pLater=pLater->pNext){
+    assert( pLater->sharable );
+    assert( pLater->pNext==0 || pLater->pNext->pBt>pLater->pBt );
+    assert( !pLater->locked || pLater->wantToLock>0 );
+    if( pLater->locked ){
+      unlockBtreeMutex(pLater);
+    }
+  }
+  lockBtreeMutex(p);
+  for(pLater=p->pNext; pLater; pLater=pLater->pNext){
+    if( pLater->wantToLock ){
+      lockBtreeMutex(pLater);
+    }
+  }
+}
+
+/*
+** Exit the recursive mutex on a Btree.
+*/
+SQLITE_PRIVATE void sqlite3BtreeLeave(Btree *p){
+  if( p->sharable ){
+    assert( p->wantToLock>0 );
+    p->wantToLock--;
+    if( p->wantToLock==0 ){
+      unlockBtreeMutex(p);
+    }
+  }
+}
+
+#ifndef NDEBUG
+/*
+** Return true if the BtShared mutex is held on the btree, or if the
+** B-Tree is not marked as sharable.
+**
+** This routine is used only from within assert() statements.
+*/
+SQLITE_PRIVATE int sqlite3BtreeHoldsMutex(Btree *p){
+  assert( p->sharable==0 || p->locked==0 || p->wantToLock>0 );
+  assert( p->sharable==0 || p->locked==0 || p->db==p->pBt->db );
+  assert( p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->pBt->mutex) );
+  assert( p->sharable==0 || p->locked==0 || sqlite3_mutex_held(p->db->mutex) );
+
+  return (p->sharable==0 || p->locked);
+}
+#endif
+
+
+#ifndef SQLITE_OMIT_INCRBLOB
+/*
+** Enter and leave a mutex on a Btree given a cursor owned by that
+** Btree.  These entry points are used by incremental I/O and can be
+** omitted if that module is not used.
+*/
+SQLITE_PRIVATE void sqlite3BtreeEnterCursor(BtCursor *pCur){
+  sqlite3BtreeEnter(pCur->pBtree);
+}
+SQLITE_PRIVATE void sqlite3BtreeLeaveCursor(BtCursor *pCur){
+  sqlite3BtreeLeave(pCur->pBtree);
+}
+#endif /* SQLITE_OMIT_INCRBLOB */
+
+
+/*
+** Enter the mutex on every Btree associated with a database
+** connection.  This is needed (for example) prior to parsing
+** a statement since we will be comparing table and column names
+** against all schemas and we do not want those schemas being
+** reset out from under us.
+**
+** There is a corresponding leave-all procedures.
+**
+** Enter the mutexes in accending order by BtShared pointer address
+** to avoid the possibility of deadlock when two threads with
+** two or more btrees in common both try to lock all their btrees
+** at the same instant.
+*/
+SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
+  int i;
+  Btree *p;
+  assert( sqlite3_mutex_held(db->mutex) );
+  for(i=0; i<db->nDb; i++){
+    p = db->aDb[i].pBt;
+    if( p ) sqlite3BtreeEnter(p);
+  }
+}
+SQLITE_PRIVATE void sqlite3BtreeLeaveAll(sqlite3 *db){
+  int i;
+  Btree *p;
+  assert( sqlite3_mutex_held(db->mutex) );
+  for(i=0; i<db->nDb; i++){
+    p = db->aDb[i].pBt;
+    if( p ) sqlite3BtreeLeave(p);
+  }
+}
+
+/*
+** Return true if a particular Btree requires a lock.  Return FALSE if
+** no lock is ever required since it is not sharable.
+*/
+SQLITE_PRIVATE int sqlite3BtreeSharable(Btree *p){
+  return p->sharable;
+}
+
+#ifndef NDEBUG
+/*
+** Return true if the current thread holds the database connection
+** mutex and all required BtShared mutexes.
+**
+** This routine is used inside assert() statements only.
+*/
+SQLITE_PRIVATE int sqlite3BtreeHoldsAllMutexes(sqlite3 *db){
+  int i;
+  if( !sqlite3_mutex_held(db->mutex) ){
+    return 0;
+  }
+  for(i=0; i<db->nDb; i++){
+    Btree *p;
+    p = db->aDb[i].pBt;
+    if( p && p->sharable &&
+         (p->wantToLock==0 || !sqlite3_mutex_held(p->pBt->mutex)) ){
+      return 0;
+    }
+  }
+  return 1;
+}
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/*
+** Return true if the correct mutexes are held for accessing the
+** db->aDb[iDb].pSchema structure.  The mutexes required for schema
+** access are:
+**
+**   (1) The mutex on db
+**   (2) if iDb!=1, then the mutex on db->aDb[iDb].pBt.
+**
+** If pSchema is not NULL, then iDb is computed from pSchema and
+** db using sqlite3SchemaToIndex().
+*/
+SQLITE_PRIVATE int sqlite3SchemaMutexHeld(sqlite3 *db, int iDb, Schema *pSchema){
+  Btree *p;
+  assert( db!=0 );
+  if( pSchema ) iDb = sqlite3SchemaToIndex(db, pSchema);
+  assert( iDb>=0 && iDb<db->nDb );
+  if( !sqlite3_mutex_held(db->mutex) ) return 0;
+  if( iDb==1 ) return 1;
+  p = db->aDb[iDb].pBt;
+  assert( p!=0 );
+  return p->sharable==0 || p->locked==1;
+}
+#endif /* NDEBUG */
+
+#else /* SQLITE_THREADSAFE>0 above.  SQLITE_THREADSAFE==0 below */
+/*
+** The following are special cases for mutex enter routines for use
+** in single threaded applications that use shared cache.  Except for
+** these two routines, all mutex operations are no-ops in that case and
+** are null #defines in btree.h.
+**
+** If shared cache is disabled, then all btree mutex routines, including
+** the ones below, are no-ops and are null #defines in btree.h.
+*/
+
+SQLITE_PRIVATE void sqlite3BtreeEnter(Btree *p){
+  p->pBt->db = p->db;
+}
+SQLITE_PRIVATE void sqlite3BtreeEnterAll(sqlite3 *db){
+  int i;
+  for(i=0; i<db->nDb; i++){
+    Btree *p = db->aDb[i].pBt;
+    if( p ){
+      p->pBt->db = p->db;
+    }
+  }
+}
+#endif /* if SQLITE_THREADSAFE */
+#endif /* ifndef SQLITE_OMIT_SHARED_CACHE */
+
+/************** End of btmutex.c *********************************************/
+/************** Begin file btree.c *******************************************/
+/*
+** 2004 April 6
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file implements a external (disk-based) database using BTrees.
+** See the header comment on "btreeInt.h" for additional information.
+** Including a description of file format and an overview of operation.
+*/
+
+/*
+** The header string that appears at the beginning of every
+** SQLite database.
+*/
+static const char zMagicHeader[] = SQLITE_FILE_HEADER;
+
+/*
+** Set this global variable to 1 to enable tracing using the TRACE
+** macro.
+*/
+#if 0
+int sqlite3BtreeTrace=1;  /* True to enable tracing */
+# define TRACE(X)  if(sqlite3BtreeTrace){printf X;fflush(stdout);}
+#else
+# define TRACE(X)
+#endif
+
+/*
+** Extract a 2-byte big-endian integer from an array of unsigned bytes.
+** But if the value is zero, make it 65536.
+**
+** This routine is used to extract the "offset to cell content area" value
+** from the header of a btree page.  If the page size is 65536 and the page
+** is empty, the offset should be 65536, but the 2-byte value stores zero.
+** This routine makes the necessary adjustment to 65536.
+*/
+#define get2byteNotZero(X)  (((((int)get2byte(X))-1)&0xffff)+1)
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+/*
+** A list of BtShared objects that are eligible for participation
+** in shared cache.  This variable has file scope during normal builds,
+** but the test harness needs to access it so we make it global for 
+** test builds.
+**
+** Access to this variable is protected by SQLITE_MUTEX_STATIC_MASTER.
+*/
+#ifdef SQLITE_TEST
+SQLITE_PRIVATE BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
+#else
+static BtShared *SQLITE_WSD sqlite3SharedCacheList = 0;
+#endif
+#endif /* SQLITE_OMIT_SHARED_CACHE */
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+/*
+** Enable or disable the shared pager and schema features.
+**
+** This routine has no effect on existing database connections.
+** The shared cache setting effects only future calls to
+** sqlite3_open(), sqlite3_open16(), or sqlite3_open_v2().
+*/
+SQLITE_API int sqlite3_enable_shared_cache(int enable){
+  sqlite3GlobalConfig.sharedCacheEnabled = enable;
+  return SQLITE_OK;
+}
+#endif
+
+
+
+#ifdef SQLITE_OMIT_SHARED_CACHE
+  /*
+  ** The functions querySharedCacheTableLock(), setSharedCacheTableLock(),
+  ** and clearAllSharedCacheTableLocks()
+  ** manipulate entries in the BtShared.pLock linked list used to store
+  ** shared-cache table level locks. If the library is compiled with the
+  ** shared-cache feature disabled, then there is only ever one user
+  ** of each BtShared structure and so this locking is not necessary. 
+  ** So define the lock related functions as no-ops.
+  */
+  #define querySharedCacheTableLock(a,b,c) SQLITE_OK
+  #define setSharedCacheTableLock(a,b,c) SQLITE_OK
+  #define clearAllSharedCacheTableLocks(a)
+  #define downgradeAllSharedCacheTableLocks(a)
+  #define hasSharedCacheTableLock(a,b,c,d) 1
+  #define hasReadConflicts(a, b) 0
+#endif
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+
+#ifdef SQLITE_DEBUG
+/*
+**** This function is only used as part of an assert() statement. ***
+**
+** Check to see if pBtree holds the required locks to read or write to the 
+** table with root page iRoot.   Return 1 if it does and 0 if not.
+**
+** For example, when writing to a table with root-page iRoot via 
+** Btree connection pBtree:
+**
+**    assert( hasSharedCacheTableLock(pBtree, iRoot, 0, WRITE_LOCK) );
+**
+** When writing to an index that resides in a sharable database, the 
+** caller should have first obtained a lock specifying the root page of
+** the corresponding table. This makes things a bit more complicated,
+** as this module treats each table as a separate structure. To determine
+** the table corresponding to the index being written, this
+** function has to search through the database schema.
+**
+** Instead of a lock on the table/index rooted at page iRoot, the caller may
+** hold a write-lock on the schema table (root page 1). This is also
+** acceptable.
+*/
+static int hasSharedCacheTableLock(
+  Btree *pBtree,         /* Handle that must hold lock */
+  Pgno iRoot,            /* Root page of b-tree */
+  int isIndex,           /* True if iRoot is the root of an index b-tree */
+  int eLockType          /* Required lock type (READ_LOCK or WRITE_LOCK) */
+){
+  Schema *pSchema = (Schema *)pBtree->pBt->pSchema;
+  Pgno iTab = 0;
+  BtLock *pLock;
+
+  /* If this database is not shareable, or if the client is reading
+  ** and has the read-uncommitted flag set, then no lock is required. 
+  ** Return true immediately.
+  */
+  if( (pBtree->sharable==0)
+   || (eLockType==READ_LOCK && (pBtree->db->flags & SQLITE_ReadUncommitted))
+  ){
+    return 1;
+  }
+
+  /* If the client is reading  or writing an index and the schema is
+  ** not loaded, then it is too difficult to actually check to see if
+  ** the correct locks are held.  So do not bother - just return true.
+  ** This case does not come up very often anyhow.
+  */
+  if( isIndex && (!pSchema || (pSchema->flags&DB_SchemaLoaded)==0) ){
+    return 1;
+  }
+
+  /* Figure out the root-page that the lock should be held on. For table
+  ** b-trees, this is just the root page of the b-tree being read or
+  ** written. For index b-trees, it is the root page of the associated
+  ** table.  */
+  if( isIndex ){
+    HashElem *p;
+    for(p=sqliteHashFirst(&pSchema->idxHash); p; p=sqliteHashNext(p)){
+      Index *pIdx = (Index *)sqliteHashData(p);
+      if( pIdx->tnum==(int)iRoot ){
+        iTab = pIdx->pTable->tnum;
+      }
+    }
+  }else{
+    iTab = iRoot;
+  }
+
+  /* Search for the required lock. Either a write-lock on root-page iTab, a 
+  ** write-lock on the schema table, or (if the client is reading) a
+  ** read-lock on iTab will suffice. Return 1 if any of these are found.  */
+  for(pLock=pBtree->pBt->pLock; pLock; pLock=pLock->pNext){
+    if( pLock->pBtree==pBtree 
+     && (pLock->iTable==iTab || (pLock->eLock==WRITE_LOCK && pLock->iTable==1))
+     && pLock->eLock>=eLockType 
+    ){
+      return 1;
+    }
+  }
+
+  /* Failed to find the required lock. */
+  return 0;
+}
+#endif /* SQLITE_DEBUG */
+
+#ifdef SQLITE_DEBUG
+/*
+**** This function may be used as part of assert() statements only. ****
+**
+** Return true if it would be illegal for pBtree to write into the
+** table or index rooted at iRoot because other shared connections are
+** simultaneously reading that same table or index.
+**
+** It is illegal for pBtree to write if some other Btree object that
+** shares the same BtShared object is currently reading or writing
+** the iRoot table.  Except, if the other Btree object has the
+** read-uncommitted flag set, then it is OK for the other object to
+** have a read cursor.
+**
+** For example, before writing to any part of the table or index
+** rooted at page iRoot, one should call:
+**
+**    assert( !hasReadConflicts(pBtree, iRoot) );
+*/
+static int hasReadConflicts(Btree *pBtree, Pgno iRoot){
+  BtCursor *p;
+  for(p=pBtree->pBt->pCursor; p; p=p->pNext){
+    if( p->pgnoRoot==iRoot 
+     && p->pBtree!=pBtree
+     && 0==(p->pBtree->db->flags & SQLITE_ReadUncommitted)
+    ){
+      return 1;
+    }
+  }
+  return 0;
+}
+#endif    /* #ifdef SQLITE_DEBUG */
+
+/*
+** Query to see if Btree handle p may obtain a lock of type eLock 
+** (READ_LOCK or WRITE_LOCK) on the table with root-page iTab. Return
+** SQLITE_OK if the lock may be obtained (by calling
+** setSharedCacheTableLock()), or SQLITE_LOCKED if not.
+*/
+static int querySharedCacheTableLock(Btree *p, Pgno iTab, u8 eLock){
+  BtShared *pBt = p->pBt;
+  BtLock *pIter;
+
+  assert( sqlite3BtreeHoldsMutex(p) );
+  assert( eLock==READ_LOCK || eLock==WRITE_LOCK );
+  assert( p->db!=0 );
+  assert( !(p->db->flags&SQLITE_ReadUncommitted)||eLock==WRITE_LOCK||iTab==1 );
+  
+  /* If requesting a write-lock, then the Btree must have an open write
+  ** transaction on this file. And, obviously, for this to be so there 
+  ** must be an open write transaction on the file itself.
+  */
+  assert( eLock==READ_LOCK || (p==pBt->pWriter && p->inTrans==TRANS_WRITE) );
+  assert( eLock==READ_LOCK || pBt->inTransaction==TRANS_WRITE );
+  
+  /* This routine is a no-op if the shared-cache is not enabled */
+  if( !p->sharable ){
+    return SQLITE_OK;
+  }
+
+  /* If some other connection is holding an exclusive lock, the
+  ** requested lock may not be obtained.
+  */
+  if( pBt->pWriter!=p && pBt->isExclusive ){
+    sqlite3ConnectionBlocked(p->db, pBt->pWriter->db);
+    return SQLITE_LOCKED_SHAREDCACHE;
+  }
+
+  for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
+    /* The condition (pIter->eLock!=eLock) in the following if(...) 
+    ** statement is a simplification of:
+    **
+    **   (eLock==WRITE_LOCK || pIter->eLock==WRITE_LOCK)
+    **
+    ** since we know that if eLock==WRITE_LOCK, then no other connection
+    ** may hold a WRITE_LOCK on any table in this file (since there can
+    ** only be a single writer).
+    */
+    assert( pIter->eLock==READ_LOCK || pIter->eLock==WRITE_LOCK );
+    assert( eLock==READ_LOCK || pIter->pBtree==p || pIter->eLock==READ_LOCK);
+    if( pIter->pBtree!=p && pIter->iTable==iTab && pIter->eLock!=eLock ){
+      sqlite3ConnectionBlocked(p->db, pIter->pBtree->db);
+      if( eLock==WRITE_LOCK ){
+        assert( p==pBt->pWriter );
+        pBt->isPending = 1;
+      }
+      return SQLITE_LOCKED_SHAREDCACHE;
+    }
+  }
+  return SQLITE_OK;
+}
+#endif /* !SQLITE_OMIT_SHARED_CACHE */
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+/*
+** Add a lock on the table with root-page iTable to the shared-btree used
+** by Btree handle p. Parameter eLock must be either READ_LOCK or 
+** WRITE_LOCK.
+**
+** This function assumes the following:
+**
+**   (a) The specified Btree object p is connected to a sharable
+**       database (one with the BtShared.sharable flag set), and
+**
+**   (b) No other Btree objects hold a lock that conflicts
+**       with the requested lock (i.e. querySharedCacheTableLock() has
+**       already been called and returned SQLITE_OK).
+**
+** SQLITE_OK is returned if the lock is added successfully. SQLITE_NOMEM 
+** is returned if a malloc attempt fails.
+*/
+static int setSharedCacheTableLock(Btree *p, Pgno iTable, u8 eLock){
+  BtShared *pBt = p->pBt;
+  BtLock *pLock = 0;
+  BtLock *pIter;
+
+  assert( sqlite3BtreeHoldsMutex(p) );
+  assert( eLock==READ_LOCK || eLock==WRITE_LOCK );
+  assert( p->db!=0 );
+
+  /* A connection with the read-uncommitted flag set will never try to
+  ** obtain a read-lock using this function. The only read-lock obtained
+  ** by a connection in read-uncommitted mode is on the sqlite_master 
+  ** table, and that lock is obtained in BtreeBeginTrans().  */
+  assert( 0==(p->db->flags&SQLITE_ReadUncommitted) || eLock==WRITE_LOCK );
+
+  /* This function should only be called on a sharable b-tree after it 
+  ** has been determined that no other b-tree holds a conflicting lock.  */
+  assert( p->sharable );
+  assert( SQLITE_OK==querySharedCacheTableLock(p, iTable, eLock) );
+
+  /* First search the list for an existing lock on this table. */
+  for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
+    if( pIter->iTable==iTable && pIter->pBtree==p ){
+      pLock = pIter;
+      break;
+    }
+  }
+
+  /* If the above search did not find a BtLock struct associating Btree p
+  ** with table iTable, allocate one and link it into the list.
+  */
+  if( !pLock ){
+    pLock = (BtLock *)sqlite3MallocZero(sizeof(BtLock));
+    if( !pLock ){
+      return SQLITE_NOMEM;
+    }
+    pLock->iTable = iTable;
+    pLock->pBtree = p;
+    pLock->pNext = pBt->pLock;
+    pBt->pLock = pLock;
+  }
+
+  /* Set the BtLock.eLock variable to the maximum of the current lock
+  ** and the requested lock. This means if a write-lock was already held
+  ** and a read-lock requested, we don't incorrectly downgrade the lock.
+  */
+  assert( WRITE_LOCK>READ_LOCK );
+  if( eLock>pLock->eLock ){
+    pLock->eLock = eLock;
+  }
+
+  return SQLITE_OK;
+}
+#endif /* !SQLITE_OMIT_SHARED_CACHE */
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+/*
+** Release all the table locks (locks obtained via calls to
+** the setSharedCacheTableLock() procedure) held by Btree object p.
+**
+** This function assumes that Btree p has an open read or write 
+** transaction. If it does not, then the BtShared.isPending variable
+** may be incorrectly cleared.
+*/
+static void clearAllSharedCacheTableLocks(Btree *p){
+  BtShared *pBt = p->pBt;
+  BtLock **ppIter = &pBt->pLock;
+
+  assert( sqlite3BtreeHoldsMutex(p) );
+  assert( p->sharable || 0==*ppIter );
+  assert( p->inTrans>0 );
+
+  while( *ppIter ){
+    BtLock *pLock = *ppIter;
+    assert( pBt->isExclusive==0 || pBt->pWriter==pLock->pBtree );
+    assert( pLock->pBtree->inTrans>=pLock->eLock );
+    if( pLock->pBtree==p ){
+      *ppIter = pLock->pNext;
+      assert( pLock->iTable!=1 || pLock==&p->lock );
+      if( pLock->iTable!=1 ){
+        sqlite3_free(pLock);
+      }
+    }else{
+      ppIter = &pLock->pNext;
+    }
+  }
+
+  assert( pBt->isPending==0 || pBt->pWriter );
+  if( pBt->pWriter==p ){
+    pBt->pWriter = 0;
+    pBt->isExclusive = 0;
+    pBt->isPending = 0;
+  }else if( pBt->nTransaction==2 ){
+    /* This function is called when Btree p is concluding its 
+    ** transaction. If there currently exists a writer, and p is not
+    ** that writer, then the number of locks held by connections other
+    ** than the writer must be about to drop to zero. In this case
+    ** set the isPending flag to 0.
+    **
+    ** If there is not currently a writer, then BtShared.isPending must
+    ** be zero already. So this next line is harmless in that case.
+    */
+    pBt->isPending = 0;
+  }
+}
+
+/*
+** This function changes all write-locks held by Btree p into read-locks.
+*/
+static void downgradeAllSharedCacheTableLocks(Btree *p){
+  BtShared *pBt = p->pBt;
+  if( pBt->pWriter==p ){
+    BtLock *pLock;
+    pBt->pWriter = 0;
+    pBt->isExclusive = 0;
+    pBt->isPending = 0;
+    for(pLock=pBt->pLock; pLock; pLock=pLock->pNext){
+      assert( pLock->eLock==READ_LOCK || pLock->pBtree==p );
+      pLock->eLock = READ_LOCK;
+    }
+  }
+}
+
+#endif /* SQLITE_OMIT_SHARED_CACHE */
+
+static void releasePage(MemPage *pPage);  /* Forward reference */
+
+/*
+***** This routine is used inside of assert() only ****
+**
+** Verify that the cursor holds the mutex on its BtShared
+*/
+#ifdef SQLITE_DEBUG
+static int cursorHoldsMutex(BtCursor *p){
+  return sqlite3_mutex_held(p->pBt->mutex);
+}
+#endif
+
+
+#ifndef SQLITE_OMIT_INCRBLOB
+/*
+** Invalidate the overflow page-list cache for cursor pCur, if any.
+*/
+static void invalidateOverflowCache(BtCursor *pCur){
+  assert( cursorHoldsMutex(pCur) );
+  sqlite3_free(pCur->aOverflow);
+  pCur->aOverflow = 0;
+}
+
+/*
+** Invalidate the overflow page-list cache for all cursors opened
+** on the shared btree structure pBt.
+*/
+static void invalidateAllOverflowCache(BtShared *pBt){
+  BtCursor *p;
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  for(p=pBt->pCursor; p; p=p->pNext){
+    invalidateOverflowCache(p);
+  }
+}
+
+/*
+** This function is called before modifying the contents of a table
+** to invalidate any incrblob cursors that are open on the
+** row or one of the rows being modified.
+**
+** If argument isClearTable is true, then the entire contents of the
+** table is about to be deleted. In this case invalidate all incrblob
+** cursors open on any row within the table with root-page pgnoRoot.
+**
+** Otherwise, if argument isClearTable is false, then the row with
+** rowid iRow is being replaced or deleted. In this case invalidate
+** only those incrblob cursors open on that specific row.
+*/
+static void invalidateIncrblobCursors(
+  Btree *pBtree,          /* The database file to check */
+  i64 iRow,               /* The rowid that might be changing */
+  int isClearTable        /* True if all rows are being deleted */
+){
+  BtCursor *p;
+  BtShared *pBt = pBtree->pBt;
+  assert( sqlite3BtreeHoldsMutex(pBtree) );
+  for(p=pBt->pCursor; p; p=p->pNext){
+    if( p->isIncrblobHandle && (isClearTable || p->info.nKey==iRow) ){
+      p->eState = CURSOR_INVALID;
+    }
+  }
+}
+
+#else
+  /* Stub functions when INCRBLOB is omitted */
+  #define invalidateOverflowCache(x)
+  #define invalidateAllOverflowCache(x)
+  #define invalidateIncrblobCursors(x,y,z)
+#endif /* SQLITE_OMIT_INCRBLOB */
+
+/*
+** Set bit pgno of the BtShared.pHasContent bitvec. This is called 
+** when a page that previously contained data becomes a free-list leaf 
+** page.
+**
+** The BtShared.pHasContent bitvec exists to work around an obscure
+** bug caused by the interaction of two useful IO optimizations surrounding
+** free-list leaf pages:
+**
+**   1) When all data is deleted from a page and the page becomes
+**      a free-list leaf page, the page is not written to the database
+**      (as free-list leaf pages contain no meaningful data). Sometimes
+**      such a page is not even journalled (as it will not be modified,
+**      why bother journalling it?).
+**
+**   2) When a free-list leaf page is reused, its content is not read
+**      from the database or written to the journal file (why should it
+**      be, if it is not at all meaningful?).
+**
+** By themselves, these optimizations work fine and provide a handy
+** performance boost to bulk delete or insert operations. However, if
+** a page is moved to the free-list and then reused within the same
+** transaction, a problem comes up. If the page is not journalled when
+** it is moved to the free-list and it is also not journalled when it
+** is extracted from the free-list and reused, then the original data
+** may be lost. In the event of a rollback, it may not be possible
+** to restore the database to its original configuration.
+**
+** The solution is the BtShared.pHasContent bitvec. Whenever a page is 
+** moved to become a free-list leaf page, the corresponding bit is
+** set in the bitvec. Whenever a leaf page is extracted from the free-list,
+** optimization 2 above is omitted if the corresponding bit is already
+** set in BtShared.pHasContent. The contents of the bitvec are cleared
+** at the end of every transaction.
+*/
+static int btreeSetHasContent(BtShared *pBt, Pgno pgno){
+  int rc = SQLITE_OK;
+  if( !pBt->pHasContent ){
+    assert( pgno<=pBt->nPage );
+    pBt->pHasContent = sqlite3BitvecCreate(pBt->nPage);
+    if( !pBt->pHasContent ){
+      rc = SQLITE_NOMEM;
+    }
+  }
+  if( rc==SQLITE_OK && pgno<=sqlite3BitvecSize(pBt->pHasContent) ){
+    rc = sqlite3BitvecSet(pBt->pHasContent, pgno);
+  }
+  return rc;
+}
+
+/*
+** Query the BtShared.pHasContent vector.
+**
+** This function is called when a free-list leaf page is removed from the
+** free-list for reuse. It returns false if it is safe to retrieve the
+** page from the pager layer with the 'no-content' flag set. True otherwise.
+*/
+static int btreeGetHasContent(BtShared *pBt, Pgno pgno){
+  Bitvec *p = pBt->pHasContent;
+  return (p && (pgno>sqlite3BitvecSize(p) || sqlite3BitvecTest(p, pgno)));
+}
+
+/*
+** Clear (destroy) the BtShared.pHasContent bitvec. This should be
+** invoked at the conclusion of each write-transaction.
+*/
+static void btreeClearHasContent(BtShared *pBt){
+  sqlite3BitvecDestroy(pBt->pHasContent);
+  pBt->pHasContent = 0;
+}
+
+/*
+** Save the current cursor position in the variables BtCursor.nKey 
+** and BtCursor.pKey. The cursor's state is set to CURSOR_REQUIRESEEK.
+**
+** The caller must ensure that the cursor is valid (has eState==CURSOR_VALID)
+** prior to calling this routine.  
+*/
+static int saveCursorPosition(BtCursor *pCur){
+  int rc;
+
+  assert( CURSOR_VALID==pCur->eState );
+  assert( 0==pCur->pKey );
+  assert( cursorHoldsMutex(pCur) );
+
+  rc = sqlite3BtreeKeySize(pCur, &pCur->nKey);
+  assert( rc==SQLITE_OK );  /* KeySize() cannot fail */
+
+  /* If this is an intKey table, then the above call to BtreeKeySize()
+  ** stores the integer key in pCur->nKey. In this case this value is
+  ** all that is required. Otherwise, if pCur is not open on an intKey
+  ** table, then malloc space for and store the pCur->nKey bytes of key 
+  ** data.
+  */
+  if( 0==pCur->apPage[0]->intKey ){
+    void *pKey = sqlite3Malloc( (int)pCur->nKey );
+    if( pKey ){
+      rc = sqlite3BtreeKey(pCur, 0, (int)pCur->nKey, pKey);
+      if( rc==SQLITE_OK ){
+        pCur->pKey = pKey;
+      }else{
+        sqlite3_free(pKey);
+      }
+    }else{
+      rc = SQLITE_NOMEM;
+    }
+  }
+  assert( !pCur->apPage[0]->intKey || !pCur->pKey );
+
+  if( rc==SQLITE_OK ){
+    int i;
+    for(i=0; i<=pCur->iPage; i++){
+      releasePage(pCur->apPage[i]);
+      pCur->apPage[i] = 0;
+    }
+    pCur->iPage = -1;
+    pCur->eState = CURSOR_REQUIRESEEK;
+  }
+
+  invalidateOverflowCache(pCur);
+  return rc;
+}
+
+/*
+** Save the positions of all cursors (except pExcept) that are open on
+** the table  with root-page iRoot. Usually, this is called just before cursor
+** pExcept is used to modify the table (BtreeDelete() or BtreeInsert()).
+*/
+static int saveAllCursors(BtShared *pBt, Pgno iRoot, BtCursor *pExcept){
+  BtCursor *p;
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  assert( pExcept==0 || pExcept->pBt==pBt );
+  for(p=pBt->pCursor; p; p=p->pNext){
+    if( p!=pExcept && (0==iRoot || p->pgnoRoot==iRoot) && 
+        p->eState==CURSOR_VALID ){
+      int rc = saveCursorPosition(p);
+      if( SQLITE_OK!=rc ){
+        return rc;
+      }
+    }
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Clear the current cursor position.
+*/
+SQLITE_PRIVATE void sqlite3BtreeClearCursor(BtCursor *pCur){
+  assert( cursorHoldsMutex(pCur) );
+  sqlite3_free(pCur->pKey);
+  pCur->pKey = 0;
+  pCur->eState = CURSOR_INVALID;
+}
+
+/*
+** In this version of BtreeMoveto, pKey is a packed index record
+** such as is generated by the OP_MakeRecord opcode.  Unpack the
+** record and then call BtreeMovetoUnpacked() to do the work.
+*/
+static int btreeMoveto(
+  BtCursor *pCur,     /* Cursor open on the btree to be searched */
+  const void *pKey,   /* Packed key if the btree is an index */
+  i64 nKey,           /* Integer key for tables.  Size of pKey for indices */
+  int bias,           /* Bias search to the high end */
+  int *pRes           /* Write search results here */
+){
+  int rc;                    /* Status code */
+  UnpackedRecord *pIdxKey;   /* Unpacked index key */
+  char aSpace[150];          /* Temp space for pIdxKey - to avoid a malloc */
+
+  if( pKey ){
+    assert( nKey==(i64)(int)nKey );
+    pIdxKey = sqlite3VdbeRecordUnpack(pCur->pKeyInfo, (int)nKey, pKey,
+                                      aSpace, sizeof(aSpace));
+    if( pIdxKey==0 ) return SQLITE_NOMEM;
+  }else{
+    pIdxKey = 0;
+  }
+  rc = sqlite3BtreeMovetoUnpacked(pCur, pIdxKey, nKey, bias, pRes);
+  if( pKey ){
+    sqlite3VdbeDeleteUnpackedRecord(pIdxKey);
+  }
+  return rc;
+}
+
+/*
+** Restore the cursor to the position it was in (or as close to as possible)
+** when saveCursorPosition() was called. Note that this call deletes the 
+** saved position info stored by saveCursorPosition(), so there can be
+** at most one effective restoreCursorPosition() call after each 
+** saveCursorPosition().
+*/
+static int btreeRestoreCursorPosition(BtCursor *pCur){
+  int rc;
+  assert( cursorHoldsMutex(pCur) );
+  assert( pCur->eState>=CURSOR_REQUIRESEEK );
+  if( pCur->eState==CURSOR_FAULT ){
+    return pCur->skipNext;
+  }
+  pCur->eState = CURSOR_INVALID;
+  rc = btreeMoveto(pCur, pCur->pKey, pCur->nKey, 0, &pCur->skipNext);
+  if( rc==SQLITE_OK ){
+    sqlite3_free(pCur->pKey);
+    pCur->pKey = 0;
+    assert( pCur->eState==CURSOR_VALID || pCur->eState==CURSOR_INVALID );
+  }
+  return rc;
+}
+
+#define restoreCursorPosition(p) \
+  (p->eState>=CURSOR_REQUIRESEEK ? \
+         btreeRestoreCursorPosition(p) : \
+         SQLITE_OK)
+
+/*
+** Determine whether or not a cursor has moved from the position it
+** was last placed at.  Cursors can move when the row they are pointing
+** at is deleted out from under them.
+**
+** This routine returns an error code if something goes wrong.  The
+** integer *pHasMoved is set to one if the cursor has moved and 0 if not.
+*/
+SQLITE_PRIVATE int sqlite3BtreeCursorHasMoved(BtCursor *pCur, int *pHasMoved){
+  int rc;
+
+  rc = restoreCursorPosition(pCur);
+  if( rc ){
+    *pHasMoved = 1;
+    return rc;
+  }
+  if( pCur->eState!=CURSOR_VALID || pCur->skipNext!=0 ){
+    *pHasMoved = 1;
+  }else{
+    *pHasMoved = 0;
+  }
+  return SQLITE_OK;
+}
+
+#ifndef SQLITE_OMIT_AUTOVACUUM
+/*
+** Given a page number of a regular database page, return the page
+** number for the pointer-map page that contains the entry for the
+** input page number.
+**
+** Return 0 (not a valid page) for pgno==1 since there is
+** no pointer map associated with page 1.  The integrity_check logic
+** requires that ptrmapPageno(*,1)!=1.
+*/
+static Pgno ptrmapPageno(BtShared *pBt, Pgno pgno){
+  int nPagesPerMapPage;
+  Pgno iPtrMap, ret;
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  if( pgno<2 ) return 0;
+  nPagesPerMapPage = (pBt->usableSize/5)+1;
+  iPtrMap = (pgno-2)/nPagesPerMapPage;
+  ret = (iPtrMap*nPagesPerMapPage) + 2; 
+  if( ret==PENDING_BYTE_PAGE(pBt) ){
+    ret++;
+  }
+  return ret;
+}
+
+/*
+** Write an entry into the pointer map.
+**
+** This routine updates the pointer map entry for page number 'key'
+** so that it maps to type 'eType' and parent page number 'pgno'.
+**
+** If *pRC is initially non-zero (non-SQLITE_OK) then this routine is
+** a no-op.  If an error occurs, the appropriate error code is written
+** into *pRC.
+*/
+static void ptrmapPut(BtShared *pBt, Pgno key, u8 eType, Pgno parent, int *pRC){
+  DbPage *pDbPage;  /* The pointer map page */
+  u8 *pPtrmap;      /* The pointer map data */
+  Pgno iPtrmap;     /* The pointer map page number */
+  int offset;       /* Offset in pointer map page */
+  int rc;           /* Return code from subfunctions */
+
+  if( *pRC ) return;
+
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  /* The master-journal page number must never be used as a pointer map page */
+  assert( 0==PTRMAP_ISPAGE(pBt, PENDING_BYTE_PAGE(pBt)) );
+
+  assert( pBt->autoVacuum );
+  if( key==0 ){
+    *pRC = SQLITE_CORRUPT_BKPT;
+    return;
+  }
+  iPtrmap = PTRMAP_PAGENO(pBt, key);
+  rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage);
+  if( rc!=SQLITE_OK ){
+    *pRC = rc;
+    return;
+  }
+  offset = PTRMAP_PTROFFSET(iPtrmap, key);
+  if( offset<0 ){
+    *pRC = SQLITE_CORRUPT_BKPT;
+    goto ptrmap_exit;
+  }
+  pPtrmap = (u8 *)sqlite3PagerGetData(pDbPage);
+
+  if( eType!=pPtrmap[offset] || get4byte(&pPtrmap[offset+1])!=parent ){
+    TRACE(("PTRMAP_UPDATE: %d->(%d,%d)\n", key, eType, parent));
+    *pRC= rc = sqlite3PagerWrite(pDbPage);
+    if( rc==SQLITE_OK ){
+      pPtrmap[offset] = eType;
+      put4byte(&pPtrmap[offset+1], parent);
+    }
+  }
+
+ptrmap_exit:
+  sqlite3PagerUnref(pDbPage);
+}
+
+/*
+** Read an entry from the pointer map.
+**
+** This routine retrieves the pointer map entry for page 'key', writing
+** the type and parent page number to *pEType and *pPgno respectively.
+** An error code is returned if something goes wrong, otherwise SQLITE_OK.
+*/
+static int ptrmapGet(BtShared *pBt, Pgno key, u8 *pEType, Pgno *pPgno){
+  DbPage *pDbPage;   /* The pointer map page */
+  int iPtrmap;       /* Pointer map page index */
+  u8 *pPtrmap;       /* Pointer map page data */
+  int offset;        /* Offset of entry in pointer map */
+  int rc;
+
+  assert( sqlite3_mutex_held(pBt->mutex) );
+
+  iPtrmap = PTRMAP_PAGENO(pBt, key);
+  rc = sqlite3PagerGet(pBt->pPager, iPtrmap, &pDbPage);
+  if( rc!=0 ){
+    return rc;
+  }
+  pPtrmap = (u8 *)sqlite3PagerGetData(pDbPage);
+
+  offset = PTRMAP_PTROFFSET(iPtrmap, key);
+  assert( pEType!=0 );
+  *pEType = pPtrmap[offset];
+  if( pPgno ) *pPgno = get4byte(&pPtrmap[offset+1]);
+
+  sqlite3PagerUnref(pDbPage);
+  if( *pEType<1 || *pEType>5 ) return SQLITE_CORRUPT_BKPT;
+  return SQLITE_OK;
+}
+
+#else /* if defined SQLITE_OMIT_AUTOVACUUM */
+  #define ptrmapPut(w,x,y,z,rc)
+  #define ptrmapGet(w,x,y,z) SQLITE_OK
+  #define ptrmapPutOvflPtr(x, y, rc)
+#endif
+
+/*
+** Given a btree page and a cell index (0 means the first cell on
+** the page, 1 means the second cell, and so forth) return a pointer
+** to the cell content.
+**
+** This routine works only for pages that do not contain overflow cells.
+*/
+#define findCell(P,I) \
+  ((P)->aData + ((P)->maskPage & get2byte(&(P)->aData[(P)->cellOffset+2*(I)])))
+
+/*
+** This a more complex version of findCell() that works for
+** pages that do contain overflow cells.
+*/
+static u8 *findOverflowCell(MemPage *pPage, int iCell){
+  int i;
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  for(i=pPage->nOverflow-1; i>=0; i--){
+    int k;
+    struct _OvflCell *pOvfl;
+    pOvfl = &pPage->aOvfl[i];
+    k = pOvfl->idx;
+    if( k<=iCell ){
+      if( k==iCell ){
+        return pOvfl->pCell;
+      }
+      iCell--;
+    }
+  }
+  return findCell(pPage, iCell);
+}
+
+/*
+** Parse a cell content block and fill in the CellInfo structure.  There
+** are two versions of this function.  btreeParseCell() takes a 
+** cell index as the second argument and btreeParseCellPtr() 
+** takes a pointer to the body of the cell as its second argument.
+**
+** Within this file, the parseCell() macro can be called instead of
+** btreeParseCellPtr(). Using some compilers, this will be faster.
+*/
+static void btreeParseCellPtr(
+  MemPage *pPage,         /* Page containing the cell */
+  u8 *pCell,              /* Pointer to the cell text. */
+  CellInfo *pInfo         /* Fill in this structure */
+){
+  u16 n;                  /* Number bytes in cell content header */
+  u32 nPayload;           /* Number of bytes of cell payload */
+
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+
+  pInfo->pCell = pCell;
+  assert( pPage->leaf==0 || pPage->leaf==1 );
+  n = pPage->childPtrSize;
+  assert( n==4-4*pPage->leaf );
+  if( pPage->intKey ){
+    if( pPage->hasData ){
+      n += getVarint32(&pCell[n], nPayload);
+    }else{
+      nPayload = 0;
+    }
+    n += getVarint(&pCell[n], (u64*)&pInfo->nKey);
+    pInfo->nData = nPayload;
+  }else{
+    pInfo->nData = 0;
+    n += getVarint32(&pCell[n], nPayload);
+    pInfo->nKey = nPayload;
+  }
+  pInfo->nPayload = nPayload;
+  pInfo->nHeader = n;
+  testcase( nPayload==pPage->maxLocal );
+  testcase( nPayload==pPage->maxLocal+1 );
+  if( likely(nPayload<=pPage->maxLocal) ){
+    /* This is the (easy) common case where the entire payload fits
+    ** on the local page.  No overflow is required.
+    */
+    if( (pInfo->nSize = (u16)(n+nPayload))<4 ) pInfo->nSize = 4;
+    pInfo->nLocal = (u16)nPayload;
+    pInfo->iOverflow = 0;
+  }else{
+    /* If the payload will not fit completely on the local page, we have
+    ** to decide how much to store locally and how much to spill onto
+    ** overflow pages.  The strategy is to minimize the amount of unused
+    ** space on overflow pages while keeping the amount of local storage
+    ** in between minLocal and maxLocal.
+    **
+    ** Warning:  changing the way overflow payload is distributed in any
+    ** way will result in an incompatible file format.
+    */
+    int minLocal;  /* Minimum amount of payload held locally */
+    int maxLocal;  /* Maximum amount of payload held locally */
+    int surplus;   /* Overflow payload available for local storage */
+
+    minLocal = pPage->minLocal;
+    maxLocal = pPage->maxLocal;
+    surplus = minLocal + (nPayload - minLocal)%(pPage->pBt->usableSize - 4);
+    testcase( surplus==maxLocal );
+    testcase( surplus==maxLocal+1 );
+    if( surplus <= maxLocal ){
+      pInfo->nLocal = (u16)surplus;
+    }else{
+      pInfo->nLocal = (u16)minLocal;
+    }
+    pInfo->iOverflow = (u16)(pInfo->nLocal + n);
+    pInfo->nSize = pInfo->iOverflow + 4;
+  }
+}
+#define parseCell(pPage, iCell, pInfo) \
+  btreeParseCellPtr((pPage), findCell((pPage), (iCell)), (pInfo))
+static void btreeParseCell(
+  MemPage *pPage,         /* Page containing the cell */
+  int iCell,              /* The cell index.  First cell is 0 */
+  CellInfo *pInfo         /* Fill in this structure */
+){
+  parseCell(pPage, iCell, pInfo);
+}
+
+/*
+** Compute the total number of bytes that a Cell needs in the cell
+** data area of the btree-page.  The return number includes the cell
+** data header and the local payload, but not any overflow page or
+** the space used by the cell pointer.
+*/
+static u16 cellSizePtr(MemPage *pPage, u8 *pCell){
+  u8 *pIter = &pCell[pPage->childPtrSize];
+  u32 nSize;
+
+#ifdef SQLITE_DEBUG
+  /* The value returned by this function should always be the same as
+  ** the (CellInfo.nSize) value found by doing a full parse of the
+  ** cell. If SQLITE_DEBUG is defined, an assert() at the bottom of
+  ** this function verifies that this invariant is not violated. */
+  CellInfo debuginfo;
+  btreeParseCellPtr(pPage, pCell, &debuginfo);
+#endif
+
+  if( pPage->intKey ){
+    u8 *pEnd;
+    if( pPage->hasData ){
+      pIter += getVarint32(pIter, nSize);
+    }else{
+      nSize = 0;
+    }
+
+    /* pIter now points at the 64-bit integer key value, a variable length 
+    ** integer. The following block moves pIter to point at the first byte
+    ** past the end of the key value. */
+    pEnd = &pIter[9];
+    while( (*pIter++)&0x80 && pIter<pEnd );
+  }else{
+    pIter += getVarint32(pIter, nSize);
+  }
+
+  testcase( nSize==pPage->maxLocal );
+  testcase( nSize==pPage->maxLocal+1 );
+  if( nSize>pPage->maxLocal ){
+    int minLocal = pPage->minLocal;
+    nSize = minLocal + (nSize - minLocal) % (pPage->pBt->usableSize - 4);
+    testcase( nSize==pPage->maxLocal );
+    testcase( nSize==pPage->maxLocal+1 );
+    if( nSize>pPage->maxLocal ){
+      nSize = minLocal;
+    }
+    nSize += 4;
+  }
+  nSize += (u32)(pIter - pCell);
+
+  /* The minimum size of any cell is 4 bytes. */
+  if( nSize<4 ){
+    nSize = 4;
+  }
+
+  assert( nSize==debuginfo.nSize );
+  return (u16)nSize;
+}
+
+#ifdef SQLITE_DEBUG
+/* This variation on cellSizePtr() is used inside of assert() statements
+** only. */
+static u16 cellSize(MemPage *pPage, int iCell){
+  return cellSizePtr(pPage, findCell(pPage, iCell));
+}
+#endif
+
+#ifndef SQLITE_OMIT_AUTOVACUUM
+/*
+** If the cell pCell, part of page pPage contains a pointer
+** to an overflow page, insert an entry into the pointer-map
+** for the overflow page.
+*/
+static void ptrmapPutOvflPtr(MemPage *pPage, u8 *pCell, int *pRC){
+  CellInfo info;
+  if( *pRC ) return;
+  assert( pCell!=0 );
+  btreeParseCellPtr(pPage, pCell, &info);
+  assert( (info.nData+(pPage->intKey?0:info.nKey))==info.nPayload );
+  if( info.iOverflow ){
+    Pgno ovfl = get4byte(&pCell[info.iOverflow]);
+    ptrmapPut(pPage->pBt, ovfl, PTRMAP_OVERFLOW1, pPage->pgno, pRC);
+  }
+}
+#endif
+
+
+/*
+** Defragment the page given.  All Cells are moved to the
+** end of the page and all free space is collected into one
+** big FreeBlk that occurs in between the header and cell
+** pointer array and the cell content area.
+*/
+static int defragmentPage(MemPage *pPage){
+  int i;                     /* Loop counter */
+  int pc;                    /* Address of a i-th cell */
+  int hdr;                   /* Offset to the page header */
+  int size;                  /* Size of a cell */
+  int usableSize;            /* Number of usable bytes on a page */
+  int cellOffset;            /* Offset to the cell pointer array */
+  int cbrk;                  /* Offset to the cell content area */
+  int nCell;                 /* Number of cells on the page */
+  unsigned char *data;       /* The page data */
+  unsigned char *temp;       /* Temp area for cell content */
+  int iCellFirst;            /* First allowable cell index */
+  int iCellLast;             /* Last possible cell index */
+
+
+  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
+  assert( pPage->pBt!=0 );
+  assert( pPage->pBt->usableSize <= SQLITE_MAX_PAGE_SIZE );
+  assert( pPage->nOverflow==0 );
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  temp = sqlite3PagerTempSpace(pPage->pBt->pPager);
+  data = pPage->aData;
+  hdr = pPage->hdrOffset;
+  cellOffset = pPage->cellOffset;
+  nCell = pPage->nCell;
+  assert( nCell==get2byte(&data[hdr+3]) );
+  usableSize = pPage->pBt->usableSize;
+  cbrk = get2byte(&data[hdr+5]);
+  memcpy(&temp[cbrk], &data[cbrk], usableSize - cbrk);
+  cbrk = usableSize;
+  iCellFirst = cellOffset + 2*nCell;
+  iCellLast = usableSize - 4;
+  for(i=0; i<nCell; i++){
+    u8 *pAddr;     /* The i-th cell pointer */
+    pAddr = &data[cellOffset + i*2];
+    pc = get2byte(pAddr);
+    testcase( pc==iCellFirst );
+    testcase( pc==iCellLast );
+#if !defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
+    /* These conditions have already been verified in btreeInitPage()
+    ** if SQLITE_ENABLE_OVERSIZE_CELL_CHECK is defined 
+    */
+    if( pc<iCellFirst || pc>iCellLast ){
+      return SQLITE_CORRUPT_BKPT;
+    }
+#endif
+    assert( pc>=iCellFirst && pc<=iCellLast );
+    size = cellSizePtr(pPage, &temp[pc]);
+    cbrk -= size;
+#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
+    if( cbrk<iCellFirst ){
+      return SQLITE_CORRUPT_BKPT;
+    }
+#else
+    if( cbrk<iCellFirst || pc+size>usableSize ){
+      return SQLITE_CORRUPT_BKPT;
+    }
+#endif
+    assert( cbrk+size<=usableSize && cbrk>=iCellFirst );
+    testcase( cbrk+size==usableSize );
+    testcase( pc+size==usableSize );
+    memcpy(&data[cbrk], &temp[pc], size);
+    put2byte(pAddr, cbrk);
+  }
+  assert( cbrk>=iCellFirst );
+  put2byte(&data[hdr+5], cbrk);
+  data[hdr+1] = 0;
+  data[hdr+2] = 0;
+  data[hdr+7] = 0;
+  memset(&data[iCellFirst], 0, cbrk-iCellFirst);
+  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
+  if( cbrk-iCellFirst!=pPage->nFree ){
+    return SQLITE_CORRUPT_BKPT;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Allocate nByte bytes of space from within the B-Tree page passed
+** as the first argument. Write into *pIdx the index into pPage->aData[]
+** of the first byte of allocated space. Return either SQLITE_OK or
+** an error code (usually SQLITE_CORRUPT).
+**
+** The caller guarantees that there is sufficient space to make the
+** allocation.  This routine might need to defragment in order to bring
+** all the space together, however.  This routine will avoid using
+** the first two bytes past the cell pointer area since presumably this
+** allocation is being made in order to insert a new cell, so we will
+** also end up needing a new cell pointer.
+*/
+static int allocateSpace(MemPage *pPage, int nByte, int *pIdx){
+  const int hdr = pPage->hdrOffset;    /* Local cache of pPage->hdrOffset */
+  u8 * const data = pPage->aData;      /* Local cache of pPage->aData */
+  int nFrag;                           /* Number of fragmented bytes on pPage */
+  int top;                             /* First byte of cell content area */
+  int gap;        /* First byte of gap between cell pointers and cell content */
+  int rc;         /* Integer return code */
+  int usableSize; /* Usable size of the page */
+  
+  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
+  assert( pPage->pBt );
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  assert( nByte>=0 );  /* Minimum cell size is 4 */
+  assert( pPage->nFree>=nByte );
+  assert( pPage->nOverflow==0 );
+  usableSize = pPage->pBt->usableSize;
+  assert( nByte < usableSize-8 );
+
+  nFrag = data[hdr+7];
+  assert( pPage->cellOffset == hdr + 12 - 4*pPage->leaf );
+  gap = pPage->cellOffset + 2*pPage->nCell;
+  top = get2byteNotZero(&data[hdr+5]);
+  if( gap>top ) return SQLITE_CORRUPT_BKPT;
+  testcase( gap+2==top );
+  testcase( gap+1==top );
+  testcase( gap==top );
+
+  if( nFrag>=60 ){
+    /* Always defragment highly fragmented pages */
+    rc = defragmentPage(pPage);
+    if( rc ) return rc;
+    top = get2byteNotZero(&data[hdr+5]);
+  }else if( gap+2<=top ){
+    /* Search the freelist looking for a free slot big enough to satisfy 
+    ** the request. The allocation is made from the first free slot in 
+    ** the list that is large enough to accomadate it.
+    */
+    int pc, addr;
+    for(addr=hdr+1; (pc = get2byte(&data[addr]))>0; addr=pc){
+      int size;            /* Size of the free slot */
+      if( pc>usableSize-4 || pc<addr+4 ){
+        return SQLITE_CORRUPT_BKPT;
+      }
+      size = get2byte(&data[pc+2]);
+      if( size>=nByte ){
+        int x = size - nByte;
+        testcase( x==4 );
+        testcase( x==3 );
+        if( x<4 ){
+          /* Remove the slot from the free-list. Update the number of
+          ** fragmented bytes within the page. */
+          memcpy(&data[addr], &data[pc], 2);
+          data[hdr+7] = (u8)(nFrag + x);
+        }else if( size+pc > usableSize ){
+          return SQLITE_CORRUPT_BKPT;
+        }else{
+          /* The slot remains on the free-list. Reduce its size to account
+          ** for the portion used by the new allocation. */
+          put2byte(&data[pc+2], x);
+        }
+        *pIdx = pc + x;
+        return SQLITE_OK;
+      }
+    }
+  }
+
+  /* Check to make sure there is enough space in the gap to satisfy
+  ** the allocation.  If not, defragment.
+  */
+  testcase( gap+2+nByte==top );
+  if( gap+2+nByte>top ){
+    rc = defragmentPage(pPage);
+    if( rc ) return rc;
+    top = get2byteNotZero(&data[hdr+5]);
+    assert( gap+nByte<=top );
+  }
+
+
+  /* Allocate memory from the gap in between the cell pointer array
+  ** and the cell content area.  The btreeInitPage() call has already
+  ** validated the freelist.  Given that the freelist is valid, there
+  ** is no way that the allocation can extend off the end of the page.
+  ** The assert() below verifies the previous sentence.
+  */
+  top -= nByte;
+  put2byte(&data[hdr+5], top);
+  assert( top+nByte <= (int)pPage->pBt->usableSize );
+  *pIdx = top;
+  return SQLITE_OK;
+}
+
+/*
+** Return a section of the pPage->aData to the freelist.
+** The first byte of the new free block is pPage->aDisk[start]
+** and the size of the block is "size" bytes.
+**
+** Most of the effort here is involved in coalesing adjacent
+** free blocks into a single big free block.
+*/
+static int freeSpace(MemPage *pPage, int start, int size){
+  int addr, pbegin, hdr;
+  int iLast;                        /* Largest possible freeblock offset */
+  unsigned char *data = pPage->aData;
+
+  assert( pPage->pBt!=0 );
+  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
+  assert( start>=pPage->hdrOffset+6+pPage->childPtrSize );
+  assert( (start + size) <= (int)pPage->pBt->usableSize );
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  assert( size>=0 );   /* Minimum cell size is 4 */
+
+  if( pPage->pBt->secureDelete ){
+    /* Overwrite deleted information with zeros when the secure_delete
+    ** option is enabled */
+    memset(&data[start], 0, size);
+  }
+
+  /* Add the space back into the linked list of freeblocks.  Note that
+  ** even though the freeblock list was checked by btreeInitPage(),
+  ** btreeInitPage() did not detect overlapping cells or
+  ** freeblocks that overlapped cells.   Nor does it detect when the
+  ** cell content area exceeds the value in the page header.  If these
+  ** situations arise, then subsequent insert operations might corrupt
+  ** the freelist.  So we do need to check for corruption while scanning
+  ** the freelist.
+  */
+  hdr = pPage->hdrOffset;
+  addr = hdr + 1;
+  iLast = pPage->pBt->usableSize - 4;
+  assert( start<=iLast );
+  while( (pbegin = get2byte(&data[addr]))<start && pbegin>0 ){
+    if( pbegin<addr+4 ){
+      return SQLITE_CORRUPT_BKPT;
+    }
+    addr = pbegin;
+  }
+  if( pbegin>iLast ){
+    return SQLITE_CORRUPT_BKPT;
+  }
+  assert( pbegin>addr || pbegin==0 );
+  put2byte(&data[addr], start);
+  put2byte(&data[start], pbegin);
+  put2byte(&data[start+2], size);
+  pPage->nFree = pPage->nFree + (u16)size;
+
+  /* Coalesce adjacent free blocks */
+  addr = hdr + 1;
+  while( (pbegin = get2byte(&data[addr]))>0 ){
+    int pnext, psize, x;
+    assert( pbegin>addr );
+    assert( pbegin <= (int)pPage->pBt->usableSize-4 );
+    pnext = get2byte(&data[pbegin]);
+    psize = get2byte(&data[pbegin+2]);
+    if( pbegin + psize + 3 >= pnext && pnext>0 ){
+      int frag = pnext - (pbegin+psize);
+      if( (frag<0) || (frag>(int)data[hdr+7]) ){
+        return SQLITE_CORRUPT_BKPT;
+      }
+      data[hdr+7] -= (u8)frag;
+      x = get2byte(&data[pnext]);
+      put2byte(&data[pbegin], x);
+      x = pnext + get2byte(&data[pnext+2]) - pbegin;
+      put2byte(&data[pbegin+2], x);
+    }else{
+      addr = pbegin;
+    }
+  }
+
+  /* If the cell content area begins with a freeblock, remove it. */
+  if( data[hdr+1]==data[hdr+5] && data[hdr+2]==data[hdr+6] ){
+    int top;
+    pbegin = get2byte(&data[hdr+1]);
+    memcpy(&data[hdr+1], &data[pbegin], 2);
+    top = get2byte(&data[hdr+5]) + get2byte(&data[pbegin+2]);
+    put2byte(&data[hdr+5], top);
+  }
+  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
+  return SQLITE_OK;
+}
+
+/*
+** Decode the flags byte (the first byte of the header) for a page
+** and initialize fields of the MemPage structure accordingly.
+**
+** Only the following combinations are supported.  Anything different
+** indicates a corrupt database files:
+**
+**         PTF_ZERODATA
+**         PTF_ZERODATA | PTF_LEAF
+**         PTF_LEAFDATA | PTF_INTKEY
+**         PTF_LEAFDATA | PTF_INTKEY | PTF_LEAF
+*/
+static int decodeFlags(MemPage *pPage, int flagByte){
+  BtShared *pBt;     /* A copy of pPage->pBt */
+
+  assert( pPage->hdrOffset==(pPage->pgno==1 ? 100 : 0) );
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  pPage->leaf = (u8)(flagByte>>3);  assert( PTF_LEAF == 1<<3 );
+  flagByte &= ~PTF_LEAF;
+  pPage->childPtrSize = 4-4*pPage->leaf;
+  pBt = pPage->pBt;
+  if( flagByte==(PTF_LEAFDATA | PTF_INTKEY) ){
+    pPage->intKey = 1;
+    pPage->hasData = pPage->leaf;
+    pPage->maxLocal = pBt->maxLeaf;
+    pPage->minLocal = pBt->minLeaf;
+  }else if( flagByte==PTF_ZERODATA ){
+    pPage->intKey = 0;
+    pPage->hasData = 0;
+    pPage->maxLocal = pBt->maxLocal;
+    pPage->minLocal = pBt->minLocal;
+  }else{
+    return SQLITE_CORRUPT_BKPT;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Initialize the auxiliary information for a disk block.
+**
+** Return SQLITE_OK on success.  If we see that the page does
+** not contain a well-formed database page, then return 
+** SQLITE_CORRUPT.  Note that a return of SQLITE_OK does not
+** guarantee that the page is well-formed.  It only shows that
+** we failed to detect any corruption.
+*/
+static int btreeInitPage(MemPage *pPage){
+
+  assert( pPage->pBt!=0 );
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  assert( pPage->pgno==sqlite3PagerPagenumber(pPage->pDbPage) );
+  assert( pPage == sqlite3PagerGetExtra(pPage->pDbPage) );
+  assert( pPage->aData == sqlite3PagerGetData(pPage->pDbPage) );
+
+  if( !pPage->isInit ){
+    u16 pc;            /* Address of a freeblock within pPage->aData[] */
+    u8 hdr;            /* Offset to beginning of page header */
+    u8 *data;          /* Equal to pPage->aData */
+    BtShared *pBt;        /* The main btree structure */
+    int usableSize;    /* Amount of usable space on each page */
+    u16 cellOffset;    /* Offset from start of page to first cell pointer */
+    int nFree;         /* Number of unused bytes on the page */
+    int top;           /* First byte of the cell content area */
+    int iCellFirst;    /* First allowable cell or freeblock offset */
+    int iCellLast;     /* Last possible cell or freeblock offset */
+
+    pBt = pPage->pBt;
+
+    hdr = pPage->hdrOffset;
+    data = pPage->aData;
+    if( decodeFlags(pPage, data[hdr]) ) return SQLITE_CORRUPT_BKPT;
+    assert( pBt->pageSize>=512 && pBt->pageSize<=65536 );
+    pPage->maskPage = (u16)(pBt->pageSize - 1);
+    pPage->nOverflow = 0;
+    usableSize = pBt->usableSize;
+    pPage->cellOffset = cellOffset = hdr + 12 - 4*pPage->leaf;
+    top = get2byteNotZero(&data[hdr+5]);
+    pPage->nCell = get2byte(&data[hdr+3]);
+    if( pPage->nCell>MX_CELL(pBt) ){
+      /* To many cells for a single page.  The page must be corrupt */
+      return SQLITE_CORRUPT_BKPT;
+    }
+    testcase( pPage->nCell==MX_CELL(pBt) );
+
+    /* A malformed database page might cause us to read past the end
+    ** of page when parsing a cell.  
+    **
+    ** The following block of code checks early to see if a cell extends
+    ** past the end of a page boundary and causes SQLITE_CORRUPT to be 
+    ** returned if it does.
+    */
+    iCellFirst = cellOffset + 2*pPage->nCell;
+    iCellLast = usableSize - 4;
+#if defined(SQLITE_ENABLE_OVERSIZE_CELL_CHECK)
+    {
+      int i;            /* Index into the cell pointer array */
+      int sz;           /* Size of a cell */
+
+      if( !pPage->leaf ) iCellLast--;
+      for(i=0; i<pPage->nCell; i++){
+        pc = get2byte(&data[cellOffset+i*2]);
+        testcase( pc==iCellFirst );
+        testcase( pc==iCellLast );
+        if( pc<iCellFirst || pc>iCellLast ){
+          return SQLITE_CORRUPT_BKPT;
+        }
+        sz = cellSizePtr(pPage, &data[pc]);
+        testcase( pc+sz==usableSize );
+        if( pc+sz>usableSize ){
+          return SQLITE_CORRUPT_BKPT;
+        }
+      }
+      if( !pPage->leaf ) iCellLast++;
+    }  
+#endif
+
+    /* Compute the total free space on the page */
+    pc = get2byte(&data[hdr+1]);
+    nFree = data[hdr+7] + top;
+    while( pc>0 ){
+      u16 next, size;
+      if( pc<iCellFirst || pc>iCellLast ){
+        /* Start of free block is off the page */
+        return SQLITE_CORRUPT_BKPT; 
+      }
+      next = get2byte(&data[pc]);
+      size = get2byte(&data[pc+2]);
+      if( (next>0 && next<=pc+size+3) || pc+size>usableSize ){
+        /* Free blocks must be in ascending order. And the last byte of
+	** the free-block must lie on the database page.  */
+        return SQLITE_CORRUPT_BKPT; 
+      }
+      nFree = nFree + size;
+      pc = next;
+    }
+
+    /* At this point, nFree contains the sum of the offset to the start
+    ** of the cell-content area plus the number of free bytes within
+    ** the cell-content area. If this is greater than the usable-size
+    ** of the page, then the page must be corrupted. This check also
+    ** serves to verify that the offset to the start of the cell-content
+    ** area, according to the page header, lies within the page.
+    */
+    if( nFree>usableSize ){
+      return SQLITE_CORRUPT_BKPT; 
+    }
+    pPage->nFree = (u16)(nFree - iCellFirst);
+    pPage->isInit = 1;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Set up a raw page so that it looks like a database page holding
+** no entries.
+*/
+static void zeroPage(MemPage *pPage, int flags){
+  unsigned char *data = pPage->aData;
+  BtShared *pBt = pPage->pBt;
+  u8 hdr = pPage->hdrOffset;
+  u16 first;
+
+  assert( sqlite3PagerPagenumber(pPage->pDbPage)==pPage->pgno );
+  assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
+  assert( sqlite3PagerGetData(pPage->pDbPage) == data );
+  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  if( pBt->secureDelete ){
+    memset(&data[hdr], 0, pBt->usableSize - hdr);
+  }
+  data[hdr] = (char)flags;
+  first = hdr + 8 + 4*((flags&PTF_LEAF)==0 ?1:0);
+  memset(&data[hdr+1], 0, 4);
+  data[hdr+7] = 0;
+  put2byte(&data[hdr+5], pBt->usableSize);
+  pPage->nFree = (u16)(pBt->usableSize - first);
+  decodeFlags(pPage, flags);
+  pPage->hdrOffset = hdr;
+  pPage->cellOffset = first;
+  pPage->nOverflow = 0;
+  assert( pBt->pageSize>=512 && pBt->pageSize<=65536 );
+  pPage->maskPage = (u16)(pBt->pageSize - 1);
+  pPage->nCell = 0;
+  pPage->isInit = 1;
+}
+
+
+/*
+** Convert a DbPage obtained from the pager into a MemPage used by
+** the btree layer.
+*/
+static MemPage *btreePageFromDbPage(DbPage *pDbPage, Pgno pgno, BtShared *pBt){
+  MemPage *pPage = (MemPage*)sqlite3PagerGetExtra(pDbPage);
+  pPage->aData = sqlite3PagerGetData(pDbPage);
+  pPage->pDbPage = pDbPage;
+  pPage->pBt = pBt;
+  pPage->pgno = pgno;
+  pPage->hdrOffset = pPage->pgno==1 ? 100 : 0;
+  return pPage; 
+}
+
+/*
+** Get a page from the pager.  Initialize the MemPage.pBt and
+** MemPage.aData elements if needed.
+**
+** If the noContent flag is set, it means that we do not care about
+** the content of the page at this time.  So do not go to the disk
+** to fetch the content.  Just fill in the content with zeros for now.
+** If in the future we call sqlite3PagerWrite() on this page, that
+** means we have started to be concerned about content and the disk
+** read should occur at that point.
+*/
+static int btreeGetPage(
+  BtShared *pBt,       /* The btree */
+  Pgno pgno,           /* Number of the page to fetch */
+  MemPage **ppPage,    /* Return the page in this parameter */
+  int noContent        /* Do not load page content if true */
+){
+  int rc;
+  DbPage *pDbPage;
+
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  rc = sqlite3PagerAcquire(pBt->pPager, pgno, (DbPage**)&pDbPage, noContent);
+  if( rc ) return rc;
+  *ppPage = btreePageFromDbPage(pDbPage, pgno, pBt);
+  return SQLITE_OK;
+}
+
+/*
+** Retrieve a page from the pager cache. If the requested page is not
+** already in the pager cache return NULL. Initialize the MemPage.pBt and
+** MemPage.aData elements if needed.
+*/
+static MemPage *btreePageLookup(BtShared *pBt, Pgno pgno){
+  DbPage *pDbPage;
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  pDbPage = sqlite3PagerLookup(pBt->pPager, pgno);
+  if( pDbPage ){
+    return btreePageFromDbPage(pDbPage, pgno, pBt);
+  }
+  return 0;
+}
+
+/*
+** Return the size of the database file in pages. If there is any kind of
+** error, return ((unsigned int)-1).
+*/
+static Pgno btreePagecount(BtShared *pBt){
+  return pBt->nPage;
+}
+SQLITE_PRIVATE u32 sqlite3BtreeLastPage(Btree *p){
+  assert( sqlite3BtreeHoldsMutex(p) );
+  assert( ((p->pBt->nPage)&0x8000000)==0 );
+  return (int)btreePagecount(p->pBt);
+}
+
+/*
+** Get a page from the pager and initialize it.  This routine is just a
+** convenience wrapper around separate calls to btreeGetPage() and 
+** btreeInitPage().
+**
+** If an error occurs, then the value *ppPage is set to is undefined. It
+** may remain unchanged, or it may be set to an invalid value.
+*/
+static int getAndInitPage(
+  BtShared *pBt,          /* The database file */
+  Pgno pgno,           /* Number of the page to get */
+  MemPage **ppPage     /* Write the page pointer here */
+){
+  int rc;
+  assert( sqlite3_mutex_held(pBt->mutex) );
+
+  if( pgno>btreePagecount(pBt) ){
+    rc = SQLITE_CORRUPT_BKPT;
+  }else{
+    rc = btreeGetPage(pBt, pgno, ppPage, 0);
+    if( rc==SQLITE_OK ){
+      rc = btreeInitPage(*ppPage);
+      if( rc!=SQLITE_OK ){
+        releasePage(*ppPage);
+      }
+    }
+  }
+
+  testcase( pgno==0 );
+  assert( pgno!=0 || rc==SQLITE_CORRUPT );
+  return rc;
+}
+
+/*
+** Release a MemPage.  This should be called once for each prior
+** call to btreeGetPage.
+*/
+static void releasePage(MemPage *pPage){
+  if( pPage ){
+    assert( pPage->aData );
+    assert( pPage->pBt );
+    assert( sqlite3PagerGetExtra(pPage->pDbPage) == (void*)pPage );
+    assert( sqlite3PagerGetData(pPage->pDbPage)==pPage->aData );
+    assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+    sqlite3PagerUnref(pPage->pDbPage);
+  }
+}
+
+/*
+** During a rollback, when the pager reloads information into the cache
+** so that the cache is restored to its original state at the start of
+** the transaction, for each page restored this routine is called.
+**
+** This routine needs to reset the extra data section at the end of the
+** page to agree with the restored data.
+*/
+static void pageReinit(DbPage *pData){
+  MemPage *pPage;
+  pPage = (MemPage *)sqlite3PagerGetExtra(pData);
+  assert( sqlite3PagerPageRefcount(pData)>0 );
+  if( pPage->isInit ){
+    assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+    pPage->isInit = 0;
+    if( sqlite3PagerPageRefcount(pData)>1 ){
+      /* pPage might not be a btree page;  it might be an overflow page
+      ** or ptrmap page or a free page.  In those cases, the following
+      ** call to btreeInitPage() will likely return SQLITE_CORRUPT.
+      ** But no harm is done by this.  And it is very important that
+      ** btreeInitPage() be called on every btree page so we make
+      ** the call for every page that comes in for re-initing. */
+      btreeInitPage(pPage);
+    }
+  }
+}
+
+/*
+** Invoke the busy handler for a btree.
+*/
+static int btreeInvokeBusyHandler(void *pArg){
+  BtShared *pBt = (BtShared*)pArg;
+  assert( pBt->db );
+  assert( sqlite3_mutex_held(pBt->db->mutex) );
+  return sqlite3InvokeBusyHandler(&pBt->db->busyHandler);
+}
+
+/*
+** Open a database file.
+** 
+** zFilename is the name of the database file.  If zFilename is NULL
+** then an ephemeral database is created.  The ephemeral database might
+** be exclusively in memory, or it might use a disk-based memory cache.
+** Either way, the ephemeral database will be automatically deleted 
+** when sqlite3BtreeClose() is called.
+**
+** If zFilename is ":memory:" then an in-memory database is created
+** that is automatically destroyed when it is closed.
+**
+** The "flags" parameter is a bitmask that might contain bits
+** BTREE_OMIT_JOURNAL and/or BTREE_NO_READLOCK.  The BTREE_NO_READLOCK
+** bit is also set if the SQLITE_NoReadlock flags is set in db->flags.
+** These flags are passed through into sqlite3PagerOpen() and must
+** be the same values as PAGER_OMIT_JOURNAL and PAGER_NO_READLOCK.
+**
+** If the database is already opened in the same database connection
+** and we are in shared cache mode, then the open will fail with an
+** SQLITE_CONSTRAINT error.  We cannot allow two or more BtShared
+** objects in the same database connection since doing so will lead
+** to problems with locking.
+*/
+SQLITE_PRIVATE int sqlite3BtreeOpen(
+  const char *zFilename,  /* Name of the file containing the BTree database */
+  sqlite3 *db,            /* Associated database handle */
+  Btree **ppBtree,        /* Pointer to new Btree object written here */
+  int flags,              /* Options */
+  int vfsFlags            /* Flags passed through to sqlite3_vfs.xOpen() */
+){
+  sqlite3_vfs *pVfs;             /* The VFS to use for this btree */
+  BtShared *pBt = 0;             /* Shared part of btree structure */
+  Btree *p;                      /* Handle to return */
+  sqlite3_mutex *mutexOpen = 0;  /* Prevents a race condition. Ticket #3537 */
+  int rc = SQLITE_OK;            /* Result code from this function */
+  u8 nReserve;                   /* Byte of unused space on each page */
+  unsigned char zDbHeader[100];  /* Database header content */
+
+  /* True if opening an ephemeral, temporary database */
+  const int isTempDb = zFilename==0 || zFilename[0]==0;
+
+  /* Set the variable isMemdb to true for an in-memory database, or 
+  ** false for a file-based database.
+  */
+#ifdef SQLITE_OMIT_MEMORYDB
+  const int isMemdb = 0;
+#else
+  const int isMemdb = (zFilename && strcmp(zFilename, ":memory:")==0)
+                       || (isTempDb && sqlite3TempInMemory(db));
+#endif
+
+  assert( db!=0 );
+  assert( sqlite3_mutex_held(db->mutex) );
+  assert( (flags&0xff)==flags );   /* flags fit in 8 bits */
+
+  /* Only a BTREE_SINGLE database can be BTREE_UNORDERED */
+  assert( (flags & BTREE_UNORDERED)==0 || (flags & BTREE_SINGLE)!=0 );
+
+  /* A BTREE_SINGLE database is always a temporary and/or ephemeral */
+  assert( (flags & BTREE_SINGLE)==0 || isTempDb );
+
+  if( db->flags & SQLITE_NoReadlock ){
+    flags |= BTREE_NO_READLOCK;
+  }
+  if( isMemdb ){
+    flags |= BTREE_MEMORY;
+  }
+  if( (vfsFlags & SQLITE_OPEN_MAIN_DB)!=0 && (isMemdb || isTempDb) ){
+    vfsFlags = (vfsFlags & ~SQLITE_OPEN_MAIN_DB) | SQLITE_OPEN_TEMP_DB;
+  }
+  pVfs = db->pVfs;
+  p = sqlite3MallocZero(sizeof(Btree));
+  if( !p ){
+    return SQLITE_NOMEM;
+  }
+  p->inTrans = TRANS_NONE;
+  p->db = db;
+#ifndef SQLITE_OMIT_SHARED_CACHE
+  p->lock.pBtree = p;
+  p->lock.iTable = 1;
+#endif
+
+#if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO)
+  /*
+  ** If this Btree is a candidate for shared cache, try to find an
+  ** existing BtShared object that we can share with
+  */
+  if( isMemdb==0 && isTempDb==0 ){
+    if( vfsFlags & SQLITE_OPEN_SHAREDCACHE ){
+      int nFullPathname = pVfs->mxPathname+1;
+      char *zFullPathname = sqlite3Malloc(nFullPathname);
+      sqlite3_mutex *mutexShared;
+      p->sharable = 1;
+      if( !zFullPathname ){
+        sqlite3_free(p);
+        return SQLITE_NOMEM;
+      }
+      sqlite3OsFullPathname(pVfs, zFilename, nFullPathname, zFullPathname);
+      mutexOpen = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_OPEN);
+      sqlite3_mutex_enter(mutexOpen);
+      mutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
+      sqlite3_mutex_enter(mutexShared);
+      for(pBt=GLOBAL(BtShared*,sqlite3SharedCacheList); pBt; pBt=pBt->pNext){
+        assert( pBt->nRef>0 );
+        if( 0==strcmp(zFullPathname, sqlite3PagerFilename(pBt->pPager))
+                 && sqlite3PagerVfs(pBt->pPager)==pVfs ){
+          int iDb;
+          for(iDb=db->nDb-1; iDb>=0; iDb--){
+            Btree *pExisting = db->aDb[iDb].pBt;
+            if( pExisting && pExisting->pBt==pBt ){
+              sqlite3_mutex_leave(mutexShared);
+              sqlite3_mutex_leave(mutexOpen);
+              sqlite3_free(zFullPathname);
+              sqlite3_free(p);
+              return SQLITE_CONSTRAINT;
+            }
+          }
+          p->pBt = pBt;
+          pBt->nRef++;
+          break;
+        }
+      }
+      sqlite3_mutex_leave(mutexShared);
+      sqlite3_free(zFullPathname);
+    }
+#ifdef SQLITE_DEBUG
+    else{
+      /* In debug mode, we mark all persistent databases as sharable
+      ** even when they are not.  This exercises the locking code and
+      ** gives more opportunity for asserts(sqlite3_mutex_held())
+      ** statements to find locking problems.
+      */
+      p->sharable = 1;
+    }
+#endif
+  }
+#endif
+  if( pBt==0 ){
+    /*
+    ** The following asserts make sure that structures used by the btree are
+    ** the right size.  This is to guard against size changes that result
+    ** when compiling on a different architecture.
+    */
+    assert( sizeof(i64)==8 || sizeof(i64)==4 );
+    assert( sizeof(u64)==8 || sizeof(u64)==4 );
+    assert( sizeof(u32)==4 );
+    assert( sizeof(u16)==2 );
+    assert( sizeof(Pgno)==4 );
+  
+    pBt = sqlite3MallocZero( sizeof(*pBt) );
+    if( pBt==0 ){
+      rc = SQLITE_NOMEM;
+      goto btree_open_out;
+    }
+    rc = sqlite3PagerOpen(pVfs, &pBt->pPager, zFilename,
+                          EXTRA_SIZE, flags, vfsFlags, pageReinit);
+    if( rc==SQLITE_OK ){
+      rc = sqlite3PagerReadFileheader(pBt->pPager,sizeof(zDbHeader),zDbHeader);
+    }
+    if( rc!=SQLITE_OK ){
+      goto btree_open_out;
+    }
+    pBt->openFlags = (u8)flags;
+    pBt->db = db;
+    sqlite3PagerSetBusyhandler(pBt->pPager, btreeInvokeBusyHandler, pBt);
+    p->pBt = pBt;
+  
+    pBt->pCursor = 0;
+    pBt->pPage1 = 0;
+    pBt->readOnly = sqlite3PagerIsreadonly(pBt->pPager);
+#ifdef SQLITE_SECURE_DELETE
+    pBt->secureDelete = 1;
+#endif
+    pBt->pageSize = (zDbHeader[16]<<8) | (zDbHeader[17]<<16);
+    if( pBt->pageSize<512 || pBt->pageSize>SQLITE_MAX_PAGE_SIZE
+         || ((pBt->pageSize-1)&pBt->pageSize)!=0 ){
+      pBt->pageSize = 0;
+#ifndef SQLITE_OMIT_AUTOVACUUM
+      /* If the magic name ":memory:" will create an in-memory database, then
+      ** leave the autoVacuum mode at 0 (do not auto-vacuum), even if
+      ** SQLITE_DEFAULT_AUTOVACUUM is true. On the other hand, if
+      ** SQLITE_OMIT_MEMORYDB has been defined, then ":memory:" is just a
+      ** regular file-name. In this case the auto-vacuum applies as per normal.
+      */
+      if( zFilename && !isMemdb ){
+        pBt->autoVacuum = (SQLITE_DEFAULT_AUTOVACUUM ? 1 : 0);
+        pBt->incrVacuum = (SQLITE_DEFAULT_AUTOVACUUM==2 ? 1 : 0);
+      }
+#endif
+      nReserve = 0;
+    }else{
+      nReserve = zDbHeader[20];
+      pBt->pageSizeFixed = 1;
+#ifndef SQLITE_OMIT_AUTOVACUUM
+      pBt->autoVacuum = (get4byte(&zDbHeader[36 + 4*4])?1:0);
+      pBt->incrVacuum = (get4byte(&zDbHeader[36 + 7*4])?1:0);
+#endif
+    }
+    rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve);
+    if( rc ) goto btree_open_out;
+    pBt->usableSize = pBt->pageSize - nReserve;
+    assert( (pBt->pageSize & 7)==0 );  /* 8-byte alignment of pageSize */
+   
+#if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO)
+    /* Add the new BtShared object to the linked list sharable BtShareds.
+    */
+    if( p->sharable ){
+      sqlite3_mutex *mutexShared;
+      pBt->nRef = 1;
+      mutexShared = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
+	   #if (SQLITE_THREADSAFE)
+		if (sqlite3GlobalConfig.bCoreMutex ){
+        pBt->mutex = sqlite3MutexAlloc(SQLITE_MUTEX_FAST);
+        if( pBt->mutex==0 ){
+          rc = SQLITE_NOMEM;
+          db->mallocFailed = 0;
+          goto btree_open_out;
+        }
+      }
+		#endif
+      sqlite3_mutex_enter(mutexShared);
+      pBt->pNext = GLOBAL(BtShared*,sqlite3SharedCacheList);
+      GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt;
+      sqlite3_mutex_leave(mutexShared);
+    }
+#endif
+  }
+
+#if !defined(SQLITE_OMIT_SHARED_CACHE) && !defined(SQLITE_OMIT_DISKIO)
+  /* If the new Btree uses a sharable pBtShared, then link the new
+  ** Btree into the list of all sharable Btrees for the same connection.
+  ** The list is kept in ascending order by pBt address.
+  */
+  if( p->sharable ){
+    int i;
+    Btree *pSib;
+    for(i=0; i<db->nDb; i++){
+      if( (pSib = db->aDb[i].pBt)!=0 && pSib->sharable ){
+        while( pSib->pPrev ){ pSib = pSib->pPrev; }
+        if( p->pBt<pSib->pBt ){
+          p->pNext = pSib;
+          p->pPrev = 0;
+          pSib->pPrev = p;
+        }else{
+          while( pSib->pNext && pSib->pNext->pBt<p->pBt ){
+            pSib = pSib->pNext;
+          }
+          p->pNext = pSib->pNext;
+          p->pPrev = pSib;
+          if( p->pNext ){
+            p->pNext->pPrev = p;
+          }
+          pSib->pNext = p;
+        }
+        break;
+      }
+    }
+  }
+#endif
+  *ppBtree = p;
+
+btree_open_out:
+  if( rc!=SQLITE_OK ){
+    if( pBt && pBt->pPager ){
+      sqlite3PagerClose(pBt->pPager);
+    }
+    sqlite3_free(pBt);
+    sqlite3_free(p);
+    *ppBtree = 0;
+  }else{
+    /* If the B-Tree was successfully opened, set the pager-cache size to the
+    ** default value. Except, when opening on an existing shared pager-cache,
+    ** do not change the pager-cache size.
+    */
+    if( sqlite3BtreeSchema(p, 0, 0)==0 ){
+      sqlite3PagerSetCachesize(p->pBt->pPager, SQLITE_DEFAULT_CACHE_SIZE);
+    }
+  }
+  if( mutexOpen ){
+    assert( sqlite3_mutex_held(mutexOpen) );
+    sqlite3_mutex_leave(mutexOpen);
+  }
+  return rc;
+}
+
+/*
+** Decrement the BtShared.nRef counter.  When it reaches zero,
+** remove the BtShared structure from the sharing list.  Return
+** true if the BtShared.nRef counter reaches zero and return
+** false if it is still positive.
+*/
+static int removeFromSharingList(BtShared *pBt){
+#ifndef SQLITE_OMIT_SHARED_CACHE
+  sqlite3_mutex *pMaster;
+  BtShared *pList;
+  int removed = 0;
+
+  assert( sqlite3_mutex_notheld(pBt->mutex) );
+  pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
+  sqlite3_mutex_enter(pMaster);
+  pBt->nRef--;
+  if( pBt->nRef<=0 ){
+    if( GLOBAL(BtShared*,sqlite3SharedCacheList)==pBt ){
+      GLOBAL(BtShared*,sqlite3SharedCacheList) = pBt->pNext;
+    }else{
+      pList = GLOBAL(BtShared*,sqlite3SharedCacheList);
+      while( ALWAYS(pList) && pList->pNext!=pBt ){
+        pList=pList->pNext;
+      }
+      if( ALWAYS(pList) ){
+        pList->pNext = pBt->pNext;
+      }
+    }
+	 #if( SQLITE_THREADSAFE )
+      sqlite3_mutex_free(pBt->mutex);
+	 #endif
+    removed = 1;
+  }
+  sqlite3_mutex_leave(pMaster);
+  return removed;
+#else
+  return 1;
+#endif
+}
+
+/*
+** Make sure pBt->pTmpSpace points to an allocation of 
+** MX_CELL_SIZE(pBt) bytes.
+*/
+static void allocateTempSpace(BtShared *pBt){
+  if( !pBt->pTmpSpace ){
+    pBt->pTmpSpace = sqlite3PageMalloc( pBt->pageSize );
+  }
+}
+
+/*
+** Free the pBt->pTmpSpace allocation
+*/
+static void freeTempSpace(BtShared *pBt){
+  sqlite3PageFree( pBt->pTmpSpace);
+  pBt->pTmpSpace = 0;
+}
+
+/*
+** Close an open database and invalidate all cursors.
+*/
+SQLITE_PRIVATE int sqlite3BtreeClose(Btree *p){
+  BtShared *pBt = p->pBt;
+  BtCursor *pCur;
+
+  /* Close all cursors opened via this handle.  */
+  assert( sqlite3_mutex_held(p->db->mutex) );
+  sqlite3BtreeEnter(p);
+  pCur = pBt->pCursor;
+  while( pCur ){
+    BtCursor *pTmp = pCur;
+    pCur = pCur->pNext;
+    if( pTmp->pBtree==p ){
+      sqlite3BtreeCloseCursor(pTmp);
+    }
+  }
+
+  /* Rollback any active transaction and free the handle structure.
+  ** The call to sqlite3BtreeRollback() drops any table-locks held by
+  ** this handle.
+  */
+  sqlite3BtreeRollback(p);
+  sqlite3BtreeLeave(p);
+
+  /* If there are still other outstanding references to the shared-btree
+  ** structure, return now. The remainder of this procedure cleans 
+  ** up the shared-btree.
+  */
+  assert( p->wantToLock==0 && p->locked==0 );
+  if( !p->sharable || removeFromSharingList(pBt) ){
+    /* The pBt is no longer on the sharing list, so we can access
+    ** it without having to hold the mutex.
+    **
+    ** Clean out and delete the BtShared object.
+    */
+    assert( !pBt->pCursor );
+    sqlite3PagerClose(pBt->pPager);
+    if( pBt->xFreeSchema && pBt->pSchema ){
+      pBt->xFreeSchema(pBt->pSchema);
+    }
+    sqlite3DbFree(0, pBt->pSchema);
+    freeTempSpace(pBt);
+    sqlite3_free(pBt);
+  }
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+  assert( p->wantToLock==0 );
+  assert( p->locked==0 );
+  if( p->pPrev ) p->pPrev->pNext = p->pNext;
+  if( p->pNext ) p->pNext->pPrev = p->pPrev;
+#endif
+
+  sqlite3_free(p);
+  return SQLITE_OK;
+}
+
+/*
+** Change the limit on the number of pages allowed in the cache.
+**
+** The maximum number of cache pages is set to the absolute
+** value of mxPage.  If mxPage is negative, the pager will
+** operate asynchronously - it will not stop to do fsync()s
+** to insure data is written to the disk surface before
+** continuing.  Transactions still work if synchronous is off,
+** and the database cannot be corrupted if this program
+** crashes.  But if the operating system crashes or there is
+** an abrupt power failure when synchronous is off, the database
+** could be left in an inconsistent and unrecoverable state.
+** Synchronous is on by default so database corruption is not
+** normally a worry.
+*/
+SQLITE_PRIVATE int sqlite3BtreeSetCacheSize(Btree *p, int mxPage){
+  BtShared *pBt = p->pBt;
+  assert( sqlite3_mutex_held(p->db->mutex) );
+  sqlite3BtreeEnter(p);
+  sqlite3PagerSetCachesize(pBt->pPager, mxPage);
+  sqlite3BtreeLeave(p);
+  return SQLITE_OK;
+}
+
+/*
+** Change the way data is synced to disk in order to increase or decrease
+** how well the database resists damage due to OS crashes and power
+** failures.  Level 1 is the same as asynchronous (no syncs() occur and
+** there is a high probability of damage)  Level 2 is the default.  There
+** is a very low but non-zero probability of damage.  Level 3 reduces the
+** probability of damage to near zero but with a write performance reduction.
+*/
+#ifndef SQLITE_OMIT_PAGER_PRAGMAS
+SQLITE_PRIVATE int sqlite3BtreeSetSafetyLevel(
+  Btree *p,              /* The btree to set the safety level on */
+  int level,             /* PRAGMA synchronous.  1=OFF, 2=NORMAL, 3=FULL */
+  int fullSync,          /* PRAGMA fullfsync. */
+  int ckptFullSync       /* PRAGMA checkpoint_fullfync */
+){
+  BtShared *pBt = p->pBt;
+  assert( sqlite3_mutex_held(p->db->mutex) );
+  assert( level>=1 && level<=3 );
+  sqlite3BtreeEnter(p);
+  sqlite3PagerSetSafetyLevel(pBt->pPager, level, fullSync, ckptFullSync);
+  sqlite3BtreeLeave(p);
+  return SQLITE_OK;
+}
+#endif
+
+/*
+** Return TRUE if the given btree is set to safety level 1.  In other
+** words, return TRUE if no sync() occurs on the disk files.
+*/
+SQLITE_PRIVATE int sqlite3BtreeSyncDisabled(Btree *p){
+  BtShared *pBt = p->pBt;
+  int rc;
+  assert( sqlite3_mutex_held(p->db->mutex) );  
+  sqlite3BtreeEnter(p);
+  assert( pBt && pBt->pPager );
+  rc = sqlite3PagerNosync(pBt->pPager);
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+/*
+** Change the default pages size and the number of reserved bytes per page.
+** Or, if the page size has already been fixed, return SQLITE_READONLY 
+** without changing anything.
+**
+** The page size must be a power of 2 between 512 and 65536.  If the page
+** size supplied does not meet this constraint then the page size is not
+** changed.
+**
+** Page sizes are constrained to be a power of two so that the region
+** of the database file used for locking (beginning at PENDING_BYTE,
+** the first byte past the 1GB boundary, 0x40000000) needs to occur
+** at the beginning of a page.
+**
+** If parameter nReserve is less than zero, then the number of reserved
+** bytes per page is left unchanged.
+**
+** If the iFix!=0 then the pageSizeFixed flag is set so that the page size
+** and autovacuum mode can no longer be changed.
+*/
+SQLITE_PRIVATE int sqlite3BtreeSetPageSize(Btree *p, int pageSize, int nReserve, int iFix){
+  int rc = SQLITE_OK;
+  BtShared *pBt = p->pBt;
+  assert( nReserve>=-1 && nReserve<=255 );
+  sqlite3BtreeEnter(p);
+  if( pBt->pageSizeFixed ){
+    sqlite3BtreeLeave(p);
+    return SQLITE_READONLY;
+  }
+  if( nReserve<0 ){
+    nReserve = pBt->pageSize - pBt->usableSize;
+  }
+  assert( nReserve>=0 && nReserve<=255 );
+  if( pageSize>=512 && pageSize<=SQLITE_MAX_PAGE_SIZE &&
+        ((pageSize-1)&pageSize)==0 ){
+    assert( (pageSize & 7)==0 );
+    assert( !pBt->pPage1 && !pBt->pCursor );
+    pBt->pageSize = (u32)pageSize;
+    freeTempSpace(pBt);
+  }
+  rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize, nReserve);
+  pBt->usableSize = pBt->pageSize - (u16)nReserve;
+  if( iFix ) pBt->pageSizeFixed = 1;
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+/*
+** Return the currently defined page size
+*/
+SQLITE_PRIVATE int sqlite3BtreeGetPageSize(Btree *p){
+  return p->pBt->pageSize;
+}
+
+#if !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM)
+/*
+** Return the number of bytes of space at the end of every page that
+** are intentually left unused.  This is the "reserved" space that is
+** sometimes used by extensions.
+*/
+SQLITE_PRIVATE int sqlite3BtreeGetReserve(Btree *p){
+  int n;
+  sqlite3BtreeEnter(p);
+  n = p->pBt->pageSize - p->pBt->usableSize;
+  sqlite3BtreeLeave(p);
+  return n;
+}
+
+/*
+** Set the maximum page count for a database if mxPage is positive.
+** No changes are made if mxPage is 0 or negative.
+** Regardless of the value of mxPage, return the maximum page count.
+*/
+SQLITE_PRIVATE int sqlite3BtreeMaxPageCount(Btree *p, int mxPage){
+  int n;
+  sqlite3BtreeEnter(p);
+  n = sqlite3PagerMaxPageCount(p->pBt->pPager, mxPage);
+  sqlite3BtreeLeave(p);
+  return n;
+}
+
+/*
+** Set the secureDelete flag if newFlag is 0 or 1.  If newFlag is -1,
+** then make no changes.  Always return the value of the secureDelete
+** setting after the change.
+*/
+SQLITE_PRIVATE int sqlite3BtreeSecureDelete(Btree *p, int newFlag){
+  int b;
+  if( p==0 ) return 0;
+  sqlite3BtreeEnter(p);
+  if( newFlag>=0 ){
+    p->pBt->secureDelete = (newFlag!=0) ? 1 : 0;
+  } 
+  b = p->pBt->secureDelete;
+  sqlite3BtreeLeave(p);
+  return b;
+}
+#endif /* !defined(SQLITE_OMIT_PAGER_PRAGMAS) || !defined(SQLITE_OMIT_VACUUM) */
+
+/*
+** Change the 'auto-vacuum' property of the database. If the 'autoVacuum'
+** parameter is non-zero, then auto-vacuum mode is enabled. If zero, it
+** is disabled. The default value for the auto-vacuum property is 
+** determined by the SQLITE_DEFAULT_AUTOVACUUM macro.
+*/
+SQLITE_PRIVATE int sqlite3BtreeSetAutoVacuum(Btree *p, int autoVacuum){
+#ifdef SQLITE_OMIT_AUTOVACUUM
+  return SQLITE_READONLY;
+#else
+  BtShared *pBt = p->pBt;
+  int rc = SQLITE_OK;
+  u8 av = (u8)autoVacuum;
+
+  sqlite3BtreeEnter(p);
+  if( pBt->pageSizeFixed && (av ?1:0)!=pBt->autoVacuum ){
+    rc = SQLITE_READONLY;
+  }else{
+    pBt->autoVacuum = av ?1:0;
+    pBt->incrVacuum = av==2 ?1:0;
+  }
+  sqlite3BtreeLeave(p);
+  return rc;
+#endif
+}
+
+/*
+** Return the value of the 'auto-vacuum' property. If auto-vacuum is 
+** enabled 1 is returned. Otherwise 0.
+*/
+SQLITE_PRIVATE int sqlite3BtreeGetAutoVacuum(Btree *p){
+#ifdef SQLITE_OMIT_AUTOVACUUM
+  return BTREE_AUTOVACUUM_NONE;
+#else
+  int rc;
+  sqlite3BtreeEnter(p);
+  rc = (
+    (!p->pBt->autoVacuum)?BTREE_AUTOVACUUM_NONE:
+    (!p->pBt->incrVacuum)?BTREE_AUTOVACUUM_FULL:
+    BTREE_AUTOVACUUM_INCR
+  );
+  sqlite3BtreeLeave(p);
+  return rc;
+#endif
+}
+
+
+/*
+** Get a reference to pPage1 of the database file.  This will
+** also acquire a readlock on that file.
+**
+** SQLITE_OK is returned on success.  If the file is not a
+** well-formed database file, then SQLITE_CORRUPT is returned.
+** SQLITE_BUSY is returned if the database is locked.  SQLITE_NOMEM
+** is returned if we run out of memory. 
+*/
+static int lockBtree(BtShared *pBt){
+  int rc;              /* Result code from subfunctions */
+  MemPage *pPage1;     /* Page 1 of the database file */
+  int nPage;           /* Number of pages in the database */
+  int nPageFile = 0;   /* Number of pages in the database file */
+  int nPageHeader;     /* Number of pages in the database according to hdr */
+
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  assert( pBt->pPage1==0 );
+  rc = sqlite3PagerSharedLock(pBt->pPager);
+  if( rc!=SQLITE_OK ) return rc;
+  rc = btreeGetPage(pBt, 1, &pPage1, 0);
+  if( rc!=SQLITE_OK ) return rc;
+
+  /* Do some checking to help insure the file we opened really is
+  ** a valid database file. 
+  */
+  nPage = nPageHeader = get4byte(28+(u8*)pPage1->aData);
+  sqlite3PagerPagecount(pBt->pPager, &nPageFile);
+  if( nPage==0 || memcmp(24+(u8*)pPage1->aData, 92+(u8*)pPage1->aData,4)!=0 ){
+    nPage = nPageFile;
+  }
+  if( nPage>0 ){
+    u32 pageSize;
+    u32 usableSize;
+    u8 *page1 = pPage1->aData;
+    rc = SQLITE_NOTADB;
+    if( memcmp(page1, zMagicHeader, 16)!=0 ){
+      goto page1_init_failed;
+    }
+
+#ifdef SQLITE_OMIT_WAL
+    if( page1[18]>1 ){
+      pBt->readOnly = 1;
+    }
+    if( page1[19]>1 ){
+      goto page1_init_failed;
+    }
+#else
+    if( page1[18]>2 ){
+      pBt->readOnly = 1;
+    }
+    if( page1[19]>2 ){
+      goto page1_init_failed;
+    }
+
+    /* If the write version is set to 2, this database should be accessed
+    ** in WAL mode. If the log is not already open, open it now. Then 
+    ** return SQLITE_OK and return without populating BtShared.pPage1.
+    ** The caller detects this and calls this function again. This is
+    ** required as the version of page 1 currently in the page1 buffer
+    ** may not be the latest version - there may be a newer one in the log
+    ** file.
+    */
+    if( page1[19]==2 && pBt->doNotUseWAL==0 ){
+      int isOpen = 0;
+      rc = sqlite3PagerOpenWal(pBt->pPager, &isOpen);
+      if( rc!=SQLITE_OK ){
+        goto page1_init_failed;
+      }else if( isOpen==0 ){
+        releasePage(pPage1);
+        return SQLITE_OK;
+      }
+      rc = SQLITE_NOTADB;
+    }
+#endif
+
+    /* The maximum embedded fraction must be exactly 25%.  And the minimum
+    ** embedded fraction must be 12.5% for both leaf-data and non-leaf-data.
+    ** The original design allowed these amounts to vary, but as of
+    ** version 3.6.0, we require them to be fixed.
+    */
+    if( memcmp(&page1[21], "\100\040\040",3)!=0 ){
+      goto page1_init_failed;
+    }
+    pageSize = (page1[16]<<8) | (page1[17]<<16);
+    if( ((pageSize-1)&pageSize)!=0
+     || pageSize>SQLITE_MAX_PAGE_SIZE 
+     || pageSize<=256 
+    ){
+      goto page1_init_failed;
+    }
+    assert( (pageSize & 7)==0 );
+    usableSize = pageSize - page1[20];
+    if( (u32)pageSize!=pBt->pageSize ){
+      /* After reading the first page of the database assuming a page size
+      ** of BtShared.pageSize, we have discovered that the page-size is
+      ** actually pageSize. Unlock the database, leave pBt->pPage1 at
+      ** zero and return SQLITE_OK. The caller will call this function
+      ** again with the correct page-size.
+      */
+      releasePage(pPage1);
+      pBt->usableSize = usableSize;
+      pBt->pageSize = pageSize;
+      freeTempSpace(pBt);
+      rc = sqlite3PagerSetPagesize(pBt->pPager, &pBt->pageSize,
+                                   pageSize-usableSize);
+      return rc;
+    }
+    if( (pBt->db->flags & SQLITE_RecoveryMode)==0 && nPage>nPageFile ){
+      rc = SQLITE_CORRUPT_BKPT;
+      goto page1_init_failed;
+    }
+    if( usableSize<480 ){
+      goto page1_init_failed;
+    }
+    pBt->pageSize = pageSize;
+    pBt->usableSize = usableSize;
+#ifndef SQLITE_OMIT_AUTOVACUUM
+    pBt->autoVacuum = (get4byte(&page1[36 + 4*4])?1:0);
+    pBt->incrVacuum = (get4byte(&page1[36 + 7*4])?1:0);
+#endif
+  }
+
+  /* maxLocal is the maximum amount of payload to store locally for
+  ** a cell.  Make sure it is small enough so that at least minFanout
+  ** cells can will fit on one page.  We assume a 10-byte page header.
+  ** Besides the payload, the cell must store:
+  **     2-byte pointer to the cell
+  **     4-byte child pointer
+  **     9-byte nKey value
+  **     4-byte nData value
+  **     4-byte overflow page pointer
+  ** So a cell consists of a 2-byte pointer, a header which is as much as
+  ** 17 bytes long, 0 to N bytes of payload, and an optional 4 byte overflow
+  ** page pointer.
+  */
+  pBt->maxLocal = (u16)((pBt->usableSize-12)*64/255 - 23);
+  pBt->minLocal = (u16)((pBt->usableSize-12)*32/255 - 23);
+  pBt->maxLeaf = (u16)(pBt->usableSize - 35);
+  pBt->minLeaf = (u16)((pBt->usableSize-12)*32/255 - 23);
+  assert( pBt->maxLeaf + 23 <= MX_CELL_SIZE(pBt) );
+  pBt->pPage1 = pPage1;
+  pBt->nPage = nPage;
+  return SQLITE_OK;
+
+page1_init_failed:
+  releasePage(pPage1);
+  pBt->pPage1 = 0;
+  return rc;
+}
+
+/*
+** If there are no outstanding cursors and we are not in the middle
+** of a transaction but there is a read lock on the database, then
+** this routine unrefs the first page of the database file which 
+** has the effect of releasing the read lock.
+**
+** If there is a transaction in progress, this routine is a no-op.
+*/
+static void unlockBtreeIfUnused(BtShared *pBt){
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  assert( pBt->pCursor==0 || pBt->inTransaction>TRANS_NONE );
+  if( pBt->inTransaction==TRANS_NONE && pBt->pPage1!=0 ){
+    assert( pBt->pPage1->aData );
+    assert( sqlite3PagerRefcount(pBt->pPager)==1 );
+    assert( pBt->pPage1->aData );
+    releasePage(pBt->pPage1);
+    pBt->pPage1 = 0;
+  }
+}
+
+/*
+** If pBt points to an empty file then convert that empty file
+** into a new empty database by initializing the first page of
+** the database.
+*/
+static int newDatabase(BtShared *pBt){
+  MemPage *pP1;
+  unsigned char *data;
+  int rc;
+
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  if( pBt->nPage>0 ){
+    return SQLITE_OK;
+  }
+  pP1 = pBt->pPage1;
+  assert( pP1!=0 );
+  data = pP1->aData;
+  rc = sqlite3PagerWrite(pP1->pDbPage);
+  if( rc ) return rc;
+  memcpy(data, zMagicHeader, sizeof(zMagicHeader));
+  assert( sizeof(zMagicHeader)==16 );
+  data[16] = (u8)((pBt->pageSize>>8)&0xff);
+  data[17] = (u8)((pBt->pageSize>>16)&0xff);
+  data[18] = 1;
+  data[19] = 1;
+  assert( pBt->usableSize<=pBt->pageSize && pBt->usableSize+255>=pBt->pageSize);
+  data[20] = (u8)(pBt->pageSize - pBt->usableSize);
+  data[21] = 64;
+  data[22] = 32;
+  data[23] = 32;
+  memset(&data[24], 0, 100-24);
+  zeroPage(pP1, PTF_INTKEY|PTF_LEAF|PTF_LEAFDATA );
+  pBt->pageSizeFixed = 1;
+#ifndef SQLITE_OMIT_AUTOVACUUM
+  assert( pBt->autoVacuum==1 || pBt->autoVacuum==0 );
+  assert( pBt->incrVacuum==1 || pBt->incrVacuum==0 );
+  put4byte(&data[36 + 4*4], pBt->autoVacuum);
+  put4byte(&data[36 + 7*4], pBt->incrVacuum);
+#endif
+  pBt->nPage = 1;
+  data[31] = 1;
+  return SQLITE_OK;
+}
+
+/*
+** Attempt to start a new transaction. A write-transaction
+** is started if the second argument is nonzero, otherwise a read-
+** transaction.  If the second argument is 2 or more and exclusive
+** transaction is started, meaning that no other process is allowed
+** to access the database.  A preexisting transaction may not be
+** upgraded to exclusive by calling this routine a second time - the
+** exclusivity flag only works for a new transaction.
+**
+** A write-transaction must be started before attempting any 
+** changes to the database.  None of the following routines 
+** will work unless a transaction is started first:
+**
+**      sqlite3BtreeCreateTable()
+**      sqlite3BtreeCreateIndex()
+**      sqlite3BtreeClearTable()
+**      sqlite3BtreeDropTable()
+**      sqlite3BtreeInsert()
+**      sqlite3BtreeDelete()
+**      sqlite3BtreeUpdateMeta()
+**
+** If an initial attempt to acquire the lock fails because of lock contention
+** and the database was previously unlocked, then invoke the busy handler
+** if there is one.  But if there was previously a read-lock, do not
+** invoke the busy handler - just return SQLITE_BUSY.  SQLITE_BUSY is 
+** returned when there is already a read-lock in order to avoid a deadlock.
+**
+** Suppose there are two processes A and B.  A has a read lock and B has
+** a reserved lock.  B tries to promote to exclusive but is blocked because
+** of A's read lock.  A tries to promote to reserved but is blocked by B.
+** One or the other of the two processes must give way or there can be
+** no progress.  By returning SQLITE_BUSY and not invoking the busy callback
+** when A already has a read lock, we encourage A to give up and let B
+** proceed.
+*/
+SQLITE_PRIVATE int sqlite3BtreeBeginTrans(Btree *p, int wrflag){
+  sqlite3 *pBlock = 0;
+  BtShared *pBt = p->pBt;
+  int rc = SQLITE_OK;
+
+  sqlite3BtreeEnter(p);
+  btreeIntegrity(p);
+
+  /* If the btree is already in a write-transaction, or it
+  ** is already in a read-transaction and a read-transaction
+  ** is requested, this is a no-op.
+  */
+  if( p->inTrans==TRANS_WRITE || (p->inTrans==TRANS_READ && !wrflag) ){
+    goto trans_begun;
+  }
+
+  /* Write transactions are not possible on a read-only database */
+  if( pBt->readOnly && wrflag ){
+    rc = SQLITE_READONLY;
+    goto trans_begun;
+  }
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+  /* If another database handle has already opened a write transaction 
+  ** on this shared-btree structure and a second write transaction is
+  ** requested, return SQLITE_LOCKED.
+  */
+  if( (wrflag && pBt->inTransaction==TRANS_WRITE) || pBt->isPending ){
+    pBlock = pBt->pWriter->db;
+  }else if( wrflag>1 ){
+    BtLock *pIter;
+    for(pIter=pBt->pLock; pIter; pIter=pIter->pNext){
+      if( pIter->pBtree!=p ){
+        pBlock = pIter->pBtree->db;
+        break;
+      }
+    }
+  }
+  if( pBlock ){
+    sqlite3ConnectionBlocked(p->db, pBlock);
+    rc = SQLITE_LOCKED_SHAREDCACHE;
+    goto trans_begun;
+  }
+#endif
+
+  /* Any read-only or read-write transaction implies a read-lock on 
+  ** page 1. So if some other shared-cache client already has a write-lock 
+  ** on page 1, the transaction cannot be opened. */
+  rc = querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK);
+  if( SQLITE_OK!=rc ) goto trans_begun;
+
+  pBt->initiallyEmpty = (u8)(pBt->nPage==0);
+  do {
+    /* Call lockBtree() until either pBt->pPage1 is populated or
+    ** lockBtree() returns something other than SQLITE_OK. lockBtree()
+    ** may return SQLITE_OK but leave pBt->pPage1 set to 0 if after
+    ** reading page 1 it discovers that the page-size of the database 
+    ** file is not pBt->pageSize. In this case lockBtree() will update
+    ** pBt->pageSize to the page-size of the file on disk.
+    */
+    while( pBt->pPage1==0 && SQLITE_OK==(rc = lockBtree(pBt)) );
+
+    if( rc==SQLITE_OK && wrflag ){
+      if( pBt->readOnly ){
+        rc = SQLITE_READONLY;
+      }else{
+        rc = sqlite3PagerBegin(pBt->pPager,wrflag>1,sqlite3TempInMemory(p->db));
+        if( rc==SQLITE_OK ){
+          rc = newDatabase(pBt);
+        }
+      }
+    }
+  
+    if( rc!=SQLITE_OK ){
+      unlockBtreeIfUnused(pBt);
+    }
+  }while( (rc&0xFF)==SQLITE_BUSY && pBt->inTransaction==TRANS_NONE &&
+          btreeInvokeBusyHandler(pBt) );
+
+  if( rc==SQLITE_OK ){
+    if( p->inTrans==TRANS_NONE ){
+      pBt->nTransaction++;
+#ifndef SQLITE_OMIT_SHARED_CACHE
+      if( p->sharable ){
+	assert( p->lock.pBtree==p && p->lock.iTable==1 );
+        p->lock.eLock = READ_LOCK;
+        p->lock.pNext = pBt->pLock;
+        pBt->pLock = &p->lock;
+      }
+#endif
+    }
+    p->inTrans = (wrflag?TRANS_WRITE:TRANS_READ);
+    if( p->inTrans>pBt->inTransaction ){
+      pBt->inTransaction = p->inTrans;
+    }
+    if( wrflag ){
+      MemPage *pPage1 = pBt->pPage1;
+#ifndef SQLITE_OMIT_SHARED_CACHE
+      assert( !pBt->pWriter );
+      pBt->pWriter = p;
+      pBt->isExclusive = (u8)(wrflag>1);
+#endif
+
+      /* If the db-size header field is incorrect (as it may be if an old
+      ** client has been writing the database file), update it now. Doing
+      ** this sooner rather than later means the database size can safely 
+      ** re-read the database size from page 1 if a savepoint or transaction
+      ** rollback occurs within the transaction.
+      */
+      if( pBt->nPage!=get4byte(&pPage1->aData[28]) ){
+        rc = sqlite3PagerWrite(pPage1->pDbPage);
+        if( rc==SQLITE_OK ){
+          put4byte(&pPage1->aData[28], pBt->nPage);
+        }
+      }
+    }
+  }
+
+
+trans_begun:
+  if( rc==SQLITE_OK && wrflag ){
+    /* This call makes sure that the pager has the correct number of
+    ** open savepoints. If the second parameter is greater than 0 and
+    ** the sub-journal is not already open, then it will be opened here.
+    */
+    rc = sqlite3PagerOpenSavepoint(pBt->pPager, p->db->nSavepoint);
+  }
+
+  btreeIntegrity(p);
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+#ifndef SQLITE_OMIT_AUTOVACUUM
+
+/*
+** Set the pointer-map entries for all children of page pPage. Also, if
+** pPage contains cells that point to overflow pages, set the pointer
+** map entries for the overflow pages as well.
+*/
+static int setChildPtrmaps(MemPage *pPage){
+  int i;                             /* Counter variable */
+  int nCell;                         /* Number of cells in page pPage */
+  int rc;                            /* Return code */
+  BtShared *pBt = pPage->pBt;
+  u8 isInitOrig = pPage->isInit;
+  Pgno pgno = pPage->pgno;
+
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  rc = btreeInitPage(pPage);
+  if( rc!=SQLITE_OK ){
+    goto set_child_ptrmaps_out;
+  }
+  nCell = pPage->nCell;
+
+  for(i=0; i<nCell; i++){
+    u8 *pCell = findCell(pPage, i);
+
+    ptrmapPutOvflPtr(pPage, pCell, &rc);
+
+    if( !pPage->leaf ){
+      Pgno childPgno = get4byte(pCell);
+      ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, &rc);
+    }
+  }
+
+  if( !pPage->leaf ){
+    Pgno childPgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
+    ptrmapPut(pBt, childPgno, PTRMAP_BTREE, pgno, &rc);
+  }
+
+set_child_ptrmaps_out:
+  pPage->isInit = isInitOrig;
+  return rc;
+}
+
+/*
+** Somewhere on pPage is a pointer to page iFrom.  Modify this pointer so
+** that it points to iTo. Parameter eType describes the type of pointer to
+** be modified, as  follows:
+**
+** PTRMAP_BTREE:     pPage is a btree-page. The pointer points at a child 
+**                   page of pPage.
+**
+** PTRMAP_OVERFLOW1: pPage is a btree-page. The pointer points at an overflow
+**                   page pointed to by one of the cells on pPage.
+**
+** PTRMAP_OVERFLOW2: pPage is an overflow-page. The pointer points at the next
+**                   overflow page in the list.
+*/
+static int modifyPagePointer(MemPage *pPage, Pgno iFrom, Pgno iTo, u8 eType){
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
+  if( eType==PTRMAP_OVERFLOW2 ){
+    /* The pointer is always the first 4 bytes of the page in this case.  */
+    if( get4byte(pPage->aData)!=iFrom ){
+      return SQLITE_CORRUPT_BKPT;
+    }
+    put4byte(pPage->aData, iTo);
+  }else{
+    u8 isInitOrig = pPage->isInit;
+    int i;
+    int nCell;
+
+    btreeInitPage(pPage);
+    nCell = pPage->nCell;
+
+    for(i=0; i<nCell; i++){
+      u8 *pCell = findCell(pPage, i);
+      if( eType==PTRMAP_OVERFLOW1 ){
+        CellInfo info;
+        btreeParseCellPtr(pPage, pCell, &info);
+        if( info.iOverflow ){
+          if( iFrom==get4byte(&pCell[info.iOverflow]) ){
+            put4byte(&pCell[info.iOverflow], iTo);
+            break;
+          }
+        }
+      }else{
+        if( get4byte(pCell)==iFrom ){
+          put4byte(pCell, iTo);
+          break;
+        }
+      }
+    }
+  
+    if( i==nCell ){
+      if( eType!=PTRMAP_BTREE || 
+          get4byte(&pPage->aData[pPage->hdrOffset+8])!=iFrom ){
+        return SQLITE_CORRUPT_BKPT;
+      }
+      put4byte(&pPage->aData[pPage->hdrOffset+8], iTo);
+    }
+
+    pPage->isInit = isInitOrig;
+  }
+  return SQLITE_OK;
+}
+
+
+/*
+** Move the open database page pDbPage to location iFreePage in the 
+** database. The pDbPage reference remains valid.
+**
+** The isCommit flag indicates that there is no need to remember that
+** the journal needs to be sync()ed before database page pDbPage->pgno 
+** can be written to. The caller has already promised not to write to that
+** page.
+*/
+static int relocatePage(
+  BtShared *pBt,           /* Btree */
+  MemPage *pDbPage,        /* Open page to move */
+  u8 eType,                /* Pointer map 'type' entry for pDbPage */
+  Pgno iPtrPage,           /* Pointer map 'page-no' entry for pDbPage */
+  Pgno iFreePage,          /* The location to move pDbPage to */
+  int isCommit             /* isCommit flag passed to sqlite3PagerMovepage */
+){
+  MemPage *pPtrPage;   /* The page that contains a pointer to pDbPage */
+  Pgno iDbPage = pDbPage->pgno;
+  Pager *pPager = pBt->pPager;
+  int rc;
+
+  assert( eType==PTRMAP_OVERFLOW2 || eType==PTRMAP_OVERFLOW1 || 
+      eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE );
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  assert( pDbPage->pBt==pBt );
+
+  /* Move page iDbPage from its current location to page number iFreePage */
+  TRACE(("AUTOVACUUM: Moving %d to free page %d (ptr page %d type %d)\n", 
+      iDbPage, iFreePage, iPtrPage, eType));
+  rc = sqlite3PagerMovepage(pPager, pDbPage->pDbPage, iFreePage, isCommit);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+  pDbPage->pgno = iFreePage;
+
+  /* If pDbPage was a btree-page, then it may have child pages and/or cells
+  ** that point to overflow pages. The pointer map entries for all these
+  ** pages need to be changed.
+  **
+  ** If pDbPage is an overflow page, then the first 4 bytes may store a
+  ** pointer to a subsequent overflow page. If this is the case, then
+  ** the pointer map needs to be updated for the subsequent overflow page.
+  */
+  if( eType==PTRMAP_BTREE || eType==PTRMAP_ROOTPAGE ){
+    rc = setChildPtrmaps(pDbPage);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+  }else{
+    Pgno nextOvfl = get4byte(pDbPage->aData);
+    if( nextOvfl!=0 ){
+      ptrmapPut(pBt, nextOvfl, PTRMAP_OVERFLOW2, iFreePage, &rc);
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+    }
+  }
+
+  /* Fix the database pointer on page iPtrPage that pointed at iDbPage so
+  ** that it points at iFreePage. Also fix the pointer map entry for
+  ** iPtrPage.
+  */
+  if( eType!=PTRMAP_ROOTPAGE ){
+    rc = btreeGetPage(pBt, iPtrPage, &pPtrPage, 0);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+    rc = sqlite3PagerWrite(pPtrPage->pDbPage);
+    if( rc!=SQLITE_OK ){
+      releasePage(pPtrPage);
+      return rc;
+    }
+    rc = modifyPagePointer(pPtrPage, iDbPage, iFreePage, eType);
+    releasePage(pPtrPage);
+    if( rc==SQLITE_OK ){
+      ptrmapPut(pBt, iFreePage, eType, iPtrPage, &rc);
+    }
+  }
+  return rc;
+}
+
+/* Forward declaration required by incrVacuumStep(). */
+static int allocateBtreePage(BtShared *, MemPage **, Pgno *, Pgno, u8);
+
+/*
+** Perform a single step of an incremental-vacuum. If successful,
+** return SQLITE_OK. If there is no work to do (and therefore no
+** point in calling this function again), return SQLITE_DONE.
+**
+** More specificly, this function attempts to re-organize the 
+** database so that the last page of the file currently in use
+** is no longer in use.
+**
+** If the nFin parameter is non-zero, this function assumes
+** that the caller will keep calling incrVacuumStep() until
+** it returns SQLITE_DONE or an error, and that nFin is the
+** number of pages the database file will contain after this 
+** process is complete.  If nFin is zero, it is assumed that
+** incrVacuumStep() will be called a finite amount of times
+** which may or may not empty the freelist.  A full autovacuum
+** has nFin>0.  A "PRAGMA incremental_vacuum" has nFin==0.
+*/
+static int incrVacuumStep(BtShared *pBt, Pgno nFin, Pgno iLastPg){
+  Pgno nFreeList;           /* Number of pages still on the free-list */
+  int rc;
+
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  assert( iLastPg>nFin );
+
+  if( !PTRMAP_ISPAGE(pBt, iLastPg) && iLastPg!=PENDING_BYTE_PAGE(pBt) ){
+    u8 eType;
+    Pgno iPtrPage;
+
+    nFreeList = get4byte(&pBt->pPage1->aData[36]);
+    if( nFreeList==0 ){
+      return SQLITE_DONE;
+    }
+
+    rc = ptrmapGet(pBt, iLastPg, &eType, &iPtrPage);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+    if( eType==PTRMAP_ROOTPAGE ){
+      return SQLITE_CORRUPT_BKPT;
+    }
+
+    if( eType==PTRMAP_FREEPAGE ){
+      if( nFin==0 ){
+        /* Remove the page from the files free-list. This is not required
+        ** if nFin is non-zero. In that case, the free-list will be
+        ** truncated to zero after this function returns, so it doesn't 
+        ** matter if it still contains some garbage entries.
+        */
+        Pgno iFreePg;
+        MemPage *pFreePg;
+        rc = allocateBtreePage(pBt, &pFreePg, &iFreePg, iLastPg, 1);
+        if( rc!=SQLITE_OK ){
+          return rc;
+        }
+        assert( iFreePg==iLastPg );
+        releasePage(pFreePg);
+      }
+    } else {
+      Pgno iFreePg;             /* Index of free page to move pLastPg to */
+      MemPage *pLastPg;
+
+      rc = btreeGetPage(pBt, iLastPg, &pLastPg, 0);
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+
+      /* If nFin is zero, this loop runs exactly once and page pLastPg
+      ** is swapped with the first free page pulled off the free list.
+      **
+      ** On the other hand, if nFin is greater than zero, then keep
+      ** looping until a free-page located within the first nFin pages
+      ** of the file is found.
+      */
+      do {
+        MemPage *pFreePg;
+        rc = allocateBtreePage(pBt, &pFreePg, &iFreePg, 0, 0);
+        if( rc!=SQLITE_OK ){
+          releasePage(pLastPg);
+          return rc;
+        }
+        releasePage(pFreePg);
+      }while( nFin!=0 && iFreePg>nFin );
+      assert( iFreePg<iLastPg );
+      
+      rc = sqlite3PagerWrite(pLastPg->pDbPage);
+      if( rc==SQLITE_OK ){
+        rc = relocatePage(pBt, pLastPg, eType, iPtrPage, iFreePg, nFin!=0);
+      }
+      releasePage(pLastPg);
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+    }
+  }
+
+  if( nFin==0 ){
+    iLastPg--;
+    while( iLastPg==PENDING_BYTE_PAGE(pBt)||PTRMAP_ISPAGE(pBt, iLastPg) ){
+      if( PTRMAP_ISPAGE(pBt, iLastPg) ){
+        MemPage *pPg;
+        rc = btreeGetPage(pBt, iLastPg, &pPg, 0);
+        if( rc!=SQLITE_OK ){
+          return rc;
+        }
+        rc = sqlite3PagerWrite(pPg->pDbPage);
+        releasePage(pPg);
+        if( rc!=SQLITE_OK ){
+          return rc;
+        }
+      }
+      iLastPg--;
+    }
+    sqlite3PagerTruncateImage(pBt->pPager, iLastPg);
+    pBt->nPage = iLastPg;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** A write-transaction must be opened before calling this function.
+** It performs a single unit of work towards an incremental vacuum.
+**
+** If the incremental vacuum is finished after this function has run,
+** SQLITE_DONE is returned. If it is not finished, but no error occurred,
+** SQLITE_OK is returned. Otherwise an SQLite error code. 
+*/
+SQLITE_PRIVATE int sqlite3BtreeIncrVacuum(Btree *p){
+  int rc;
+  BtShared *pBt = p->pBt;
+
+  sqlite3BtreeEnter(p);
+  assert( pBt->inTransaction==TRANS_WRITE && p->inTrans==TRANS_WRITE );
+  if( !pBt->autoVacuum ){
+    rc = SQLITE_DONE;
+  }else{
+    invalidateAllOverflowCache(pBt);
+    rc = incrVacuumStep(pBt, 0, btreePagecount(pBt));
+    if( rc==SQLITE_OK ){
+      rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
+      put4byte(&pBt->pPage1->aData[28], pBt->nPage);
+    }
+  }
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+/*
+** This routine is called prior to sqlite3PagerCommit when a transaction
+** is commited for an auto-vacuum database.
+**
+** If SQLITE_OK is returned, then *pnTrunc is set to the number of pages
+** the database file should be truncated to during the commit process. 
+** i.e. the database has been reorganized so that only the first *pnTrunc
+** pages are in use.
+*/
+static int autoVacuumCommit(BtShared *pBt){
+  int rc = SQLITE_OK;
+  Pager *pPager = pBt->pPager;
+  VVA_ONLY( int nRef = sqlite3PagerRefcount(pPager) );
+
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  invalidateAllOverflowCache(pBt);
+  assert(pBt->autoVacuum);
+  if( !pBt->incrVacuum ){
+    Pgno nFin;         /* Number of pages in database after autovacuuming */
+    Pgno nFree;        /* Number of pages on the freelist initially */
+    Pgno nPtrmap;      /* Number of PtrMap pages to be freed */
+    Pgno iFree;        /* The next page to be freed */
+    int nEntry;        /* Number of entries on one ptrmap page */
+    Pgno nOrig;        /* Database size before freeing */
+
+    nOrig = btreePagecount(pBt);
+    if( PTRMAP_ISPAGE(pBt, nOrig) || nOrig==PENDING_BYTE_PAGE(pBt) ){
+      /* It is not possible to create a database for which the final page
+      ** is either a pointer-map page or the pending-byte page. If one
+      ** is encountered, this indicates corruption.
+      */
+      return SQLITE_CORRUPT_BKPT;
+    }
+
+    nFree = get4byte(&pBt->pPage1->aData[36]);
+    nEntry = pBt->usableSize/5;
+    nPtrmap = (nFree-nOrig+PTRMAP_PAGENO(pBt, nOrig)+nEntry)/nEntry;
+    nFin = nOrig - nFree - nPtrmap;
+    if( nOrig>PENDING_BYTE_PAGE(pBt) && nFin<PENDING_BYTE_PAGE(pBt) ){
+      nFin--;
+    }
+    while( PTRMAP_ISPAGE(pBt, nFin) || nFin==PENDING_BYTE_PAGE(pBt) ){
+      nFin--;
+    }
+    if( nFin>nOrig ) return SQLITE_CORRUPT_BKPT;
+
+    for(iFree=nOrig; iFree>nFin && rc==SQLITE_OK; iFree--){
+      rc = incrVacuumStep(pBt, nFin, iFree);
+    }
+    if( (rc==SQLITE_DONE || rc==SQLITE_OK) && nFree>0 ){
+      rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
+      put4byte(&pBt->pPage1->aData[32], 0);
+      put4byte(&pBt->pPage1->aData[36], 0);
+      put4byte(&pBt->pPage1->aData[28], nFin);
+      sqlite3PagerTruncateImage(pBt->pPager, nFin);
+      pBt->nPage = nFin;
+    }
+    if( rc!=SQLITE_OK ){
+      sqlite3PagerRollback(pPager);
+    }
+  }
+
+  assert( nRef==sqlite3PagerRefcount(pPager) );
+  return rc;
+}
+
+#else /* ifndef SQLITE_OMIT_AUTOVACUUM */
+# define setChildPtrmaps(x) SQLITE_OK
+#endif
+
+/*
+** This routine does the first phase of a two-phase commit.  This routine
+** causes a rollback journal to be created (if it does not already exist)
+** and populated with enough information so that if a power loss occurs
+** the database can be restored to its original state by playing back
+** the journal.  Then the contents of the journal are flushed out to
+** the disk.  After the journal is safely on oxide, the changes to the
+** database are written into the database file and flushed to oxide.
+** At the end of this call, the rollback journal still exists on the
+** disk and we are still holding all locks, so the transaction has not
+** committed.  See sqlite3BtreeCommitPhaseTwo() for the second phase of the
+** commit process.
+**
+** This call is a no-op if no write-transaction is currently active on pBt.
+**
+** Otherwise, sync the database file for the btree pBt. zMaster points to
+** the name of a master journal file that should be written into the
+** individual journal file, or is NULL, indicating no master journal file 
+** (single database transaction).
+**
+** When this is called, the master journal should already have been
+** created, populated with this journal pointer and synced to disk.
+**
+** Once this is routine has returned, the only thing required to commit
+** the write-transaction for this database file is to delete the journal.
+*/
+SQLITE_PRIVATE int sqlite3BtreeCommitPhaseOne(Btree *p, const char *zMaster){
+  int rc = SQLITE_OK;
+  if( p->inTrans==TRANS_WRITE ){
+    BtShared *pBt = p->pBt;
+    sqlite3BtreeEnter(p);
+#ifndef SQLITE_OMIT_AUTOVACUUM
+    if( pBt->autoVacuum ){
+      rc = autoVacuumCommit(pBt);
+      if( rc!=SQLITE_OK ){
+        sqlite3BtreeLeave(p);
+        return rc;
+      }
+    }
+#endif
+    rc = sqlite3PagerCommitPhaseOne(pBt->pPager, zMaster, 0);
+    sqlite3BtreeLeave(p);
+  }
+  return rc;
+}
+
+/*
+** This function is called from both BtreeCommitPhaseTwo() and BtreeRollback()
+** at the conclusion of a transaction.
+*/
+static void btreeEndTransaction(Btree *p){
+  BtShared *pBt = p->pBt;
+  assert( sqlite3BtreeHoldsMutex(p) );
+
+  btreeClearHasContent(pBt);
+  if( p->inTrans>TRANS_NONE && p->db->activeVdbeCnt>1 ){
+    /* If there are other active statements that belong to this database
+    ** handle, downgrade to a read-only transaction. The other statements
+    ** may still be reading from the database.  */
+    downgradeAllSharedCacheTableLocks(p);
+    p->inTrans = TRANS_READ;
+  }else{
+    /* If the handle had any kind of transaction open, decrement the 
+    ** transaction count of the shared btree. If the transaction count 
+    ** reaches 0, set the shared state to TRANS_NONE. The unlockBtreeIfUnused()
+    ** call below will unlock the pager.  */
+    if( p->inTrans!=TRANS_NONE ){
+      clearAllSharedCacheTableLocks(p);
+      pBt->nTransaction--;
+      if( 0==pBt->nTransaction ){
+        pBt->inTransaction = TRANS_NONE;
+      }
+    }
+
+    /* Set the current transaction state to TRANS_NONE and unlock the 
+    ** pager if this call closed the only read or write transaction.  */
+    p->inTrans = TRANS_NONE;
+    unlockBtreeIfUnused(pBt);
+  }
+
+  btreeIntegrity(p);
+}
+
+/*
+** Commit the transaction currently in progress.
+**
+** This routine implements the second phase of a 2-phase commit.  The
+** sqlite3BtreeCommitPhaseOne() routine does the first phase and should
+** be invoked prior to calling this routine.  The sqlite3BtreeCommitPhaseOne()
+** routine did all the work of writing information out to disk and flushing the
+** contents so that they are written onto the disk platter.  All this
+** routine has to do is delete or truncate or zero the header in the
+** the rollback journal (which causes the transaction to commit) and
+** drop locks.
+**
+** Normally, if an error occurs while the pager layer is attempting to 
+** finalize the underlying journal file, this function returns an error and
+** the upper layer will attempt a rollback. However, if the second argument
+** is non-zero then this b-tree transaction is part of a multi-file 
+** transaction. In this case, the transaction has already been committed 
+** (by deleting a master journal file) and the caller will ignore this 
+** functions return code. So, even if an error occurs in the pager layer,
+** reset the b-tree objects internal state to indicate that the write
+** transaction has been closed. This is quite safe, as the pager will have
+** transitioned to the error state.
+**
+** This will release the write lock on the database file.  If there
+** are no active cursors, it also releases the read lock.
+*/
+SQLITE_PRIVATE int sqlite3BtreeCommitPhaseTwo(Btree *p, int bCleanup){
+
+  if( p->inTrans==TRANS_NONE ) return SQLITE_OK;
+  sqlite3BtreeEnter(p);
+  btreeIntegrity(p);
+
+  /* If the handle has a write-transaction open, commit the shared-btrees 
+  ** transaction and set the shared state to TRANS_READ.
+  */
+  if( p->inTrans==TRANS_WRITE ){
+    int rc;
+    BtShared *pBt = p->pBt;
+    assert( pBt->inTransaction==TRANS_WRITE );
+    assert( pBt->nTransaction>0 );
+    rc = sqlite3PagerCommitPhaseTwo(pBt->pPager);
+    if( rc!=SQLITE_OK && bCleanup==0 ){
+      sqlite3BtreeLeave(p);
+      return rc;
+    }
+    pBt->inTransaction = TRANS_READ;
+  }
+
+  btreeEndTransaction(p);
+  sqlite3BtreeLeave(p);
+  return SQLITE_OK;
+}
+
+/*
+** Do both phases of a commit.
+*/
+SQLITE_PRIVATE int sqlite3BtreeCommit(Btree *p){
+  int rc;
+  sqlite3BtreeEnter(p);
+  rc = sqlite3BtreeCommitPhaseOne(p, 0);
+  if( rc==SQLITE_OK ){
+    rc = sqlite3BtreeCommitPhaseTwo(p, 0);
+  }
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+#ifndef NDEBUG
+/*
+** Return the number of write-cursors open on this handle. This is for use
+** in assert() expressions, so it is only compiled if NDEBUG is not
+** defined.
+**
+** For the purposes of this routine, a write-cursor is any cursor that
+** is capable of writing to the databse.  That means the cursor was
+** originally opened for writing and the cursor has not be disabled
+** by having its state changed to CURSOR_FAULT.
+*/
+static int countWriteCursors(BtShared *pBt){
+  BtCursor *pCur;
+  int r = 0;
+  for(pCur=pBt->pCursor; pCur; pCur=pCur->pNext){
+    if( pCur->wrFlag && pCur->eState!=CURSOR_FAULT ) r++; 
+  }
+  return r;
+}
+#endif
+
+/*
+** This routine sets the state to CURSOR_FAULT and the error
+** code to errCode for every cursor on BtShared that pBtree
+** references.
+**
+** Every cursor is tripped, including cursors that belong
+** to other database connections that happen to be sharing
+** the cache with pBtree.
+**
+** This routine gets called when a rollback occurs.
+** All cursors using the same cache must be tripped
+** to prevent them from trying to use the btree after
+** the rollback.  The rollback may have deleted tables
+** or moved root pages, so it is not sufficient to
+** save the state of the cursor.  The cursor must be
+** invalidated.
+*/
+SQLITE_PRIVATE void sqlite3BtreeTripAllCursors(Btree *pBtree, int errCode){
+  BtCursor *p;
+  sqlite3BtreeEnter(pBtree);
+  for(p=pBtree->pBt->pCursor; p; p=p->pNext){
+    int i;
+    sqlite3BtreeClearCursor(p);
+    p->eState = CURSOR_FAULT;
+    p->skipNext = errCode;
+    for(i=0; i<=p->iPage; i++){
+      releasePage(p->apPage[i]);
+      p->apPage[i] = 0;
+    }
+  }
+  sqlite3BtreeLeave(pBtree);
+}
+
+/*
+** Rollback the transaction in progress.  All cursors will be
+** invalided by this operation.  Any attempt to use a cursor
+** that was open at the beginning of this operation will result
+** in an error.
+**
+** This will release the write lock on the database file.  If there
+** are no active cursors, it also releases the read lock.
+*/
+SQLITE_PRIVATE int sqlite3BtreeRollback(Btree *p){
+  int rc;
+  BtShared *pBt = p->pBt;
+  MemPage *pPage1;
+
+  sqlite3BtreeEnter(p);
+  rc = saveAllCursors(pBt, 0, 0);
+#ifndef SQLITE_OMIT_SHARED_CACHE
+  if( rc!=SQLITE_OK ){
+    /* This is a horrible situation. An IO or malloc() error occurred whilst
+    ** trying to save cursor positions. If this is an automatic rollback (as
+    ** the result of a constraint, malloc() failure or IO error) then 
+    ** the cache may be internally inconsistent (not contain valid trees) so
+    ** we cannot simply return the error to the caller. Instead, abort 
+    ** all queries that may be using any of the cursors that failed to save.
+    */
+    sqlite3BtreeTripAllCursors(p, rc);
+  }
+#endif
+  btreeIntegrity(p);
+
+  if( p->inTrans==TRANS_WRITE ){
+    int rc2;
+
+    assert( TRANS_WRITE==pBt->inTransaction );
+    rc2 = sqlite3PagerRollback(pBt->pPager);
+    if( rc2!=SQLITE_OK ){
+      rc = rc2;
+    }
+
+    /* The rollback may have destroyed the pPage1->aData value.  So
+    ** call btreeGetPage() on page 1 again to make
+    ** sure pPage1->aData is set correctly. */
+    if( btreeGetPage(pBt, 1, &pPage1, 0)==SQLITE_OK ){
+      int nPage = get4byte(28+(u8*)pPage1->aData);
+      testcase( nPage==0 );
+      if( nPage==0 ) sqlite3PagerPagecount(pBt->pPager, &nPage);
+      testcase( pBt->nPage!=nPage );
+      pBt->nPage = nPage;
+      releasePage(pPage1);
+    }
+    assert( countWriteCursors(pBt)==0 );
+    pBt->inTransaction = TRANS_READ;
+  }
+
+  btreeEndTransaction(p);
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+/*
+** Start a statement subtransaction. The subtransaction can can be rolled
+** back independently of the main transaction. You must start a transaction 
+** before starting a subtransaction. The subtransaction is ended automatically 
+** if the main transaction commits or rolls back.
+**
+** Statement subtransactions are used around individual SQL statements
+** that are contained within a BEGIN...COMMIT block.  If a constraint
+** error occurs within the statement, the effect of that one statement
+** can be rolled back without having to rollback the entire transaction.
+**
+** A statement sub-transaction is implemented as an anonymous savepoint. The
+** value passed as the second parameter is the total number of savepoints,
+** including the new anonymous savepoint, open on the B-Tree. i.e. if there
+** are no active savepoints and no other statement-transactions open,
+** iStatement is 1. This anonymous savepoint can be released or rolled back
+** using the sqlite3BtreeSavepoint() function.
+*/
+SQLITE_PRIVATE int sqlite3BtreeBeginStmt(Btree *p, int iStatement){
+  int rc;
+  BtShared *pBt = p->pBt;
+  sqlite3BtreeEnter(p);
+  assert( p->inTrans==TRANS_WRITE );
+  assert( pBt->readOnly==0 );
+  assert( iStatement>0 );
+  assert( iStatement>p->db->nSavepoint );
+  assert( pBt->inTransaction==TRANS_WRITE );
+  /* At the pager level, a statement transaction is a savepoint with
+  ** an index greater than all savepoints created explicitly using
+  ** SQL statements. It is illegal to open, release or rollback any
+  ** such savepoints while the statement transaction savepoint is active.
+  */
+  rc = sqlite3PagerOpenSavepoint(pBt->pPager, iStatement);
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+/*
+** The second argument to this function, op, is always SAVEPOINT_ROLLBACK
+** or SAVEPOINT_RELEASE. This function either releases or rolls back the
+** savepoint identified by parameter iSavepoint, depending on the value 
+** of op.
+**
+** Normally, iSavepoint is greater than or equal to zero. However, if op is
+** SAVEPOINT_ROLLBACK, then iSavepoint may also be -1. In this case the 
+** contents of the entire transaction are rolled back. This is different
+** from a normal transaction rollback, as no locks are released and the
+** transaction remains open.
+*/
+SQLITE_PRIVATE int sqlite3BtreeSavepoint(Btree *p, int op, int iSavepoint){
+  int rc = SQLITE_OK;
+  if( p && p->inTrans==TRANS_WRITE ){
+    BtShared *pBt = p->pBt;
+    assert( op==SAVEPOINT_RELEASE || op==SAVEPOINT_ROLLBACK );
+    assert( iSavepoint>=0 || (iSavepoint==-1 && op==SAVEPOINT_ROLLBACK) );
+    sqlite3BtreeEnter(p);
+    rc = sqlite3PagerSavepoint(pBt->pPager, op, iSavepoint);
+    if( rc==SQLITE_OK ){
+      if( iSavepoint<0 && pBt->initiallyEmpty ) pBt->nPage = 0;
+      rc = newDatabase(pBt);
+      pBt->nPage = get4byte(28 + pBt->pPage1->aData);
+
+      /* The database size was written into the offset 28 of the header
+      ** when the transaction started, so we know that the value at offset
+      ** 28 is nonzero. */
+      assert( pBt->nPage>0 );
+    }
+    sqlite3BtreeLeave(p);
+  }
+  return rc;
+}
+
+/*
+** Create a new cursor for the BTree whose root is on the page
+** iTable. If a read-only cursor is requested, it is assumed that
+** the caller already has at least a read-only transaction open
+** on the database already. If a write-cursor is requested, then
+** the caller is assumed to have an open write transaction.
+**
+** If wrFlag==0, then the cursor can only be used for reading.
+** If wrFlag==1, then the cursor can be used for reading or for
+** writing if other conditions for writing are also met.  These
+** are the conditions that must be met in order for writing to
+** be allowed:
+**
+** 1:  The cursor must have been opened with wrFlag==1
+**
+** 2:  Other database connections that share the same pager cache
+**     but which are not in the READ_UNCOMMITTED state may not have
+**     cursors open with wrFlag==0 on the same table.  Otherwise
+**     the changes made by this write cursor would be visible to
+**     the read cursors in the other database connection.
+**
+** 3:  The database must be writable (not on read-only media)
+**
+** 4:  There must be an active transaction.
+**
+** No checking is done to make sure that page iTable really is the
+** root page of a b-tree.  If it is not, then the cursor acquired
+** will not work correctly.
+**
+** It is assumed that the sqlite3BtreeCursorZero() has been called
+** on pCur to initialize the memory space prior to invoking this routine.
+*/
+static int btreeCursor(
+  Btree *p,                              /* The btree */
+  int iTable,                            /* Root page of table to open */
+  int wrFlag,                            /* 1 to write. 0 read-only */
+  struct KeyInfo *pKeyInfo,              /* First arg to comparison function */
+  BtCursor *pCur                         /* Space for new cursor */
+){
+  BtShared *pBt = p->pBt;                /* Shared b-tree handle */
+
+  assert( sqlite3BtreeHoldsMutex(p) );
+  assert( wrFlag==0 || wrFlag==1 );
+
+  /* The following assert statements verify that if this is a sharable 
+  ** b-tree database, the connection is holding the required table locks, 
+  ** and that no other connection has any open cursor that conflicts with 
+  ** this lock.  */
+  assert( hasSharedCacheTableLock(p, iTable, pKeyInfo!=0, wrFlag+1) );
+  assert( wrFlag==0 || !hasReadConflicts(p, iTable) );
+
+  /* Assert that the caller has opened the required transaction. */
+  assert( p->inTrans>TRANS_NONE );
+  assert( wrFlag==0 || p->inTrans==TRANS_WRITE );
+  assert( pBt->pPage1 && pBt->pPage1->aData );
+
+  if( NEVER(wrFlag && pBt->readOnly) ){
+    return SQLITE_READONLY;
+  }
+  if( iTable==1 && btreePagecount(pBt)==0 ){
+    return SQLITE_EMPTY;
+  }
+
+  /* Now that no other errors can occur, finish filling in the BtCursor
+  ** variables and link the cursor into the BtShared list.  */
+  pCur->pgnoRoot = (Pgno)iTable;
+  pCur->iPage = -1;
+  pCur->pKeyInfo = pKeyInfo;
+  pCur->pBtree = p;
+  pCur->pBt = pBt;
+  pCur->wrFlag = (u8)wrFlag;
+  pCur->pNext = pBt->pCursor;
+  if( pCur->pNext ){
+    pCur->pNext->pPrev = pCur;
+  }
+  pBt->pCursor = pCur;
+  pCur->eState = CURSOR_INVALID;
+  pCur->cachedRowid = 0;
+  return SQLITE_OK;
+}
+SQLITE_PRIVATE int sqlite3BtreeCursor(
+  Btree *p,                                   /* The btree */
+  int iTable,                                 /* Root page of table to open */
+  int wrFlag,                                 /* 1 to write. 0 read-only */
+  struct KeyInfo *pKeyInfo,                   /* First arg to xCompare() */
+  BtCursor *pCur                              /* Write new cursor here */
+){
+  int rc;
+  sqlite3BtreeEnter(p);
+  rc = btreeCursor(p, iTable, wrFlag, pKeyInfo, pCur);
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+/*
+** Return the size of a BtCursor object in bytes.
+**
+** This interfaces is needed so that users of cursors can preallocate
+** sufficient storage to hold a cursor.  The BtCursor object is opaque
+** to users so they cannot do the sizeof() themselves - they must call
+** this routine.
+*/
+SQLITE_PRIVATE int sqlite3BtreeCursorSize(void){
+  return ROUND8(sizeof(BtCursor));
+}
+
+/*
+** Initialize memory that will be converted into a BtCursor object.
+**
+** The simple approach here would be to memset() the entire object
+** to zero.  But it turns out that the apPage[] and aiIdx[] arrays
+** do not need to be zeroed and they are large, so we can save a lot
+** of run-time by skipping the initialization of those elements.
+*/
+SQLITE_PRIVATE void sqlite3BtreeCursorZero(BtCursor *p){
+  memset(p, 0, offsetof(BtCursor, iPage));
+}
+
+/*
+** Set the cached rowid value of every cursor in the same database file
+** as pCur and having the same root page number as pCur.  The value is
+** set to iRowid.
+**
+** Only positive rowid values are considered valid for this cache.
+** The cache is initialized to zero, indicating an invalid cache.
+** A btree will work fine with zero or negative rowids.  We just cannot
+** cache zero or negative rowids, which means tables that use zero or
+** negative rowids might run a little slower.  But in practice, zero
+** or negative rowids are very uncommon so this should not be a problem.
+*/
+SQLITE_PRIVATE void sqlite3BtreeSetCachedRowid(BtCursor *pCur, sqlite3_int64 iRowid){
+  BtCursor *p;
+  for(p=pCur->pBt->pCursor; p; p=p->pNext){
+    if( p->pgnoRoot==pCur->pgnoRoot ) p->cachedRowid = iRowid;
+  }
+  assert( pCur->cachedRowid==iRowid );
+}
+
+/*
+** Return the cached rowid for the given cursor.  A negative or zero
+** return value indicates that the rowid cache is invalid and should be
+** ignored.  If the rowid cache has never before been set, then a
+** zero is returned.
+*/
+SQLITE_PRIVATE sqlite3_int64 sqlite3BtreeGetCachedRowid(BtCursor *pCur){
+  return pCur->cachedRowid;
+}
+
+/*
+** Close a cursor.  The read lock on the database file is released
+** when the last cursor is closed.
+*/
+SQLITE_PRIVATE int sqlite3BtreeCloseCursor(BtCursor *pCur){
+  Btree *pBtree = pCur->pBtree;
+  if( pBtree ){
+    int i;
+    BtShared *pBt = pCur->pBt;
+    sqlite3BtreeEnter(pBtree);
+    sqlite3BtreeClearCursor(pCur);
+    if( pCur->pPrev ){
+      pCur->pPrev->pNext = pCur->pNext;
+    }else{
+      pBt->pCursor = pCur->pNext;
+    }
+    if( pCur->pNext ){
+      pCur->pNext->pPrev = pCur->pPrev;
+    }
+    for(i=0; i<=pCur->iPage; i++){
+      releasePage(pCur->apPage[i]);
+    }
+    unlockBtreeIfUnused(pBt);
+    invalidateOverflowCache(pCur);
+    /* sqlite3_free(pCur); */
+    sqlite3BtreeLeave(pBtree);
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Make sure the BtCursor* given in the argument has a valid
+** BtCursor.info structure.  If it is not already valid, call
+** btreeParseCell() to fill it in.
+**
+** BtCursor.info is a cache of the information in the current cell.
+** Using this cache reduces the number of calls to btreeParseCell().
+**
+** 2007-06-25:  There is a bug in some versions of MSVC that cause the
+** compiler to crash when getCellInfo() is implemented as a macro.
+** But there is a measureable speed advantage to using the macro on gcc
+** (when less compiler optimizations like -Os or -O0 are used and the
+** compiler is not doing agressive inlining.)  So we use a real function
+** for MSVC and a macro for everything else.  Ticket #2457.
+*/
+#ifndef NDEBUG
+  static void assertCellInfo(BtCursor *pCur){
+    CellInfo info;
+    int iPage = pCur->iPage;
+    memset(&info, 0, sizeof(info));
+    btreeParseCell(pCur->apPage[iPage], pCur->aiIdx[iPage], &info);
+    assert( memcmp(&info, &pCur->info, sizeof(info))==0 );
+  }
+#else
+  #define assertCellInfo(x)
+#endif
+#ifdef _MSC_VER
+  /* Use a real function in MSVC to work around bugs in that compiler. */
+  static void getCellInfo(BtCursor *pCur){
+    if( pCur->info.nSize==0 ){
+      int iPage = pCur->iPage;
+      btreeParseCell(pCur->apPage[iPage],pCur->aiIdx[iPage],&pCur->info);
+      pCur->validNKey = 1;
+    }else{
+      assertCellInfo(pCur);
+    }
+  }
+#else /* if not _MSC_VER */
+  /* Use a macro in all other compilers so that the function is inlined */
+#define getCellInfo(pCur)                                                      \
+  if( pCur->info.nSize==0 ){                                                   \
+    int iPage = pCur->iPage;                                                   \
+    btreeParseCell(pCur->apPage[iPage],pCur->aiIdx[iPage],&pCur->info); \
+    pCur->validNKey = 1;                                                       \
+  }else{                                                                       \
+    assertCellInfo(pCur);                                                      \
+  }
+#endif /* _MSC_VER */
+
+#ifndef NDEBUG  /* The next routine used only within assert() statements */
+/*
+** Return true if the given BtCursor is valid.  A valid cursor is one
+** that is currently pointing to a row in a (non-empty) table.
+** This is a verification routine is used only within assert() statements.
+*/
+SQLITE_PRIVATE int sqlite3BtreeCursorIsValid(BtCursor *pCur){
+  return pCur && pCur->eState==CURSOR_VALID;
+}
+#endif /* NDEBUG */
+
+/*
+** Set *pSize to the size of the buffer needed to hold the value of
+** the key for the current entry.  If the cursor is not pointing
+** to a valid entry, *pSize is set to 0. 
+**
+** For a table with the INTKEY flag set, this routine returns the key
+** itself, not the number of bytes in the key.
+**
+** The caller must position the cursor prior to invoking this routine.
+** 
+** This routine cannot fail.  It always returns SQLITE_OK.  
+*/
+SQLITE_PRIVATE int sqlite3BtreeKeySize(BtCursor *pCur, i64 *pSize){
+  assert( cursorHoldsMutex(pCur) );
+  assert( pCur->eState==CURSOR_INVALID || pCur->eState==CURSOR_VALID );
+  if( pCur->eState!=CURSOR_VALID ){
+    *pSize = 0;
+  }else{
+    getCellInfo(pCur);
+    *pSize = pCur->info.nKey;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Set *pSize to the number of bytes of data in the entry the
+** cursor currently points to.
+**
+** The caller must guarantee that the cursor is pointing to a non-NULL
+** valid entry.  In other words, the calling procedure must guarantee
+** that the cursor has Cursor.eState==CURSOR_VALID.
+**
+** Failure is not possible.  This function always returns SQLITE_OK.
+** It might just as well be a procedure (returning void) but we continue
+** to return an integer result code for historical reasons.
+*/
+SQLITE_PRIVATE int sqlite3BtreeDataSize(BtCursor *pCur, u32 *pSize){
+  assert( cursorHoldsMutex(pCur) );
+  assert( pCur->eState==CURSOR_VALID );
+  getCellInfo(pCur);
+  *pSize = pCur->info.nData;
+  return SQLITE_OK;
+}
+
+/*
+** Given the page number of an overflow page in the database (parameter
+** ovfl), this function finds the page number of the next page in the 
+** linked list of overflow pages. If possible, it uses the auto-vacuum
+** pointer-map data instead of reading the content of page ovfl to do so. 
+**
+** If an error occurs an SQLite error code is returned. Otherwise:
+**
+** The page number of the next overflow page in the linked list is 
+** written to *pPgnoNext. If page ovfl is the last page in its linked 
+** list, *pPgnoNext is set to zero. 
+**
+** If ppPage is not NULL, and a reference to the MemPage object corresponding
+** to page number pOvfl was obtained, then *ppPage is set to point to that
+** reference. It is the responsibility of the caller to call releasePage()
+** on *ppPage to free the reference. In no reference was obtained (because
+** the pointer-map was used to obtain the value for *pPgnoNext), then
+** *ppPage is set to zero.
+*/
+static int getOverflowPage(
+  BtShared *pBt,               /* The database file */
+  Pgno ovfl,                   /* Current overflow page number */
+  MemPage **ppPage,            /* OUT: MemPage handle (may be NULL) */
+  Pgno *pPgnoNext              /* OUT: Next overflow page number */
+){
+  Pgno next = 0;
+  MemPage *pPage = 0;
+  int rc = SQLITE_OK;
+
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  assert(pPgnoNext);
+
+#ifndef SQLITE_OMIT_AUTOVACUUM
+  /* Try to find the next page in the overflow list using the
+  ** autovacuum pointer-map pages. Guess that the next page in 
+  ** the overflow list is page number (ovfl+1). If that guess turns 
+  ** out to be wrong, fall back to loading the data of page 
+  ** number ovfl to determine the next page number.
+  */
+  if( pBt->autoVacuum ){
+    Pgno pgno;
+    Pgno iGuess = ovfl+1;
+    u8 eType;
+
+    while( PTRMAP_ISPAGE(pBt, iGuess) || iGuess==PENDING_BYTE_PAGE(pBt) ){
+      iGuess++;
+    }
+
+    if( iGuess<=btreePagecount(pBt) ){
+      rc = ptrmapGet(pBt, iGuess, &eType, &pgno);
+      if( rc==SQLITE_OK && eType==PTRMAP_OVERFLOW2 && pgno==ovfl ){
+        next = iGuess;
+        rc = SQLITE_DONE;
+      }
+    }
+  }
+#endif
+
+  assert( next==0 || rc==SQLITE_DONE );
+  if( rc==SQLITE_OK ){
+    rc = btreeGetPage(pBt, ovfl, &pPage, 0);
+    assert( rc==SQLITE_OK || pPage==0 );
+    if( rc==SQLITE_OK ){
+      next = get4byte(pPage->aData);
+    }
+  }
+
+  *pPgnoNext = next;
+  if( ppPage ){
+    *ppPage = pPage;
+  }else{
+    releasePage(pPage);
+  }
+  return (rc==SQLITE_DONE ? SQLITE_OK : rc);
+}
+
+/*
+** Copy data from a buffer to a page, or from a page to a buffer.
+**
+** pPayload is a pointer to data stored on database page pDbPage.
+** If argument eOp is false, then nByte bytes of data are copied
+** from pPayload to the buffer pointed at by pBuf. If eOp is true,
+** then sqlite3PagerWrite() is called on pDbPage and nByte bytes
+** of data are copied from the buffer pBuf to pPayload.
+**
+** SQLITE_OK is returned on success, otherwise an error code.
+*/
+static int copyPayload(
+  void *pPayload,           /* Pointer to page data */
+  void *pBuf,               /* Pointer to buffer */
+  int nByte,                /* Number of bytes to copy */
+  int eOp,                  /* 0 -> copy from page, 1 -> copy to page */
+  DbPage *pDbPage           /* Page containing pPayload */
+){
+  if( eOp ){
+    /* Copy data from buffer to page (a write operation) */
+    int rc = sqlite3PagerWrite(pDbPage);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+    memcpy(pPayload, pBuf, nByte);
+  }else{
+    /* Copy data from page to buffer (a read operation) */
+    memcpy(pBuf, pPayload, nByte);
+  }
+  return SQLITE_OK;
+}
+
+/*
+** This function is used to read or overwrite payload information
+** for the entry that the pCur cursor is pointing to. If the eOp
+** parameter is 0, this is a read operation (data copied into
+** buffer pBuf). If it is non-zero, a write (data copied from
+** buffer pBuf).
+**
+** A total of "amt" bytes are read or written beginning at "offset".
+** Data is read to or from the buffer pBuf.
+**
+** The content being read or written might appear on the main page
+** or be scattered out on multiple overflow pages.
+**
+** If the BtCursor.isIncrblobHandle flag is set, and the current
+** cursor entry uses one or more overflow pages, this function
+** allocates space for and lazily popluates the overflow page-list 
+** cache array (BtCursor.aOverflow). Subsequent calls use this
+** cache to make seeking to the supplied offset more efficient.
+**
+** Once an overflow page-list cache has been allocated, it may be
+** invalidated if some other cursor writes to the same table, or if
+** the cursor is moved to a different row. Additionally, in auto-vacuum
+** mode, the following events may invalidate an overflow page-list cache.
+**
+**   * An incremental vacuum,
+**   * A commit in auto_vacuum="full" mode,
+**   * Creating a table (may require moving an overflow page).
+*/
+static int accessPayload(
+  BtCursor *pCur,      /* Cursor pointing to entry to read from */
+  u32 offset,          /* Begin reading this far into payload */
+  u32 amt,             /* Read this many bytes */
+  unsigned char *pBuf, /* Write the bytes into this buffer */ 
+  int eOp              /* zero to read. non-zero to write. */
+){
+  unsigned char *aPayload;
+  int rc = SQLITE_OK;
+  u32 nKey;
+  int iIdx = 0;
+  MemPage *pPage = pCur->apPage[pCur->iPage]; /* Btree page of current entry */
+  BtShared *pBt = pCur->pBt;                  /* Btree this cursor belongs to */
+
+  assert( pPage );
+  assert( pCur->eState==CURSOR_VALID );
+  assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
+  assert( cursorHoldsMutex(pCur) );
+
+  getCellInfo(pCur);
+  aPayload = pCur->info.pCell + pCur->info.nHeader;
+  nKey = (pPage->intKey ? 0 : (int)pCur->info.nKey);
+
+  if( NEVER(offset+amt > nKey+pCur->info.nData) 
+   || &aPayload[pCur->info.nLocal] > &pPage->aData[pBt->usableSize]
+  ){
+    /* Trying to read or write past the end of the data is an error */
+    return SQLITE_CORRUPT_BKPT;
+  }
+
+  /* Check if data must be read/written to/from the btree page itself. */
+  if( offset<pCur->info.nLocal ){
+    int a = amt;
+    if( a+offset>pCur->info.nLocal ){
+      a = pCur->info.nLocal - offset;
+    }
+    rc = copyPayload(&aPayload[offset], pBuf, a, eOp, pPage->pDbPage);
+    offset = 0;
+    pBuf += a;
+    amt -= a;
+  }else{
+    offset -= pCur->info.nLocal;
+  }
+
+  if( rc==SQLITE_OK && amt>0 ){
+    const u32 ovflSize = pBt->usableSize - 4;  /* Bytes content per ovfl page */
+    Pgno nextPage;
+
+    nextPage = get4byte(&aPayload[pCur->info.nLocal]);
+
+#ifndef SQLITE_OMIT_INCRBLOB
+    /* If the isIncrblobHandle flag is set and the BtCursor.aOverflow[]
+    ** has not been allocated, allocate it now. The array is sized at
+    ** one entry for each overflow page in the overflow chain. The
+    ** page number of the first overflow page is stored in aOverflow[0],
+    ** etc. A value of 0 in the aOverflow[] array means "not yet known"
+    ** (the cache is lazily populated).
+    */
+    if( pCur->isIncrblobHandle && !pCur->aOverflow ){
+      int nOvfl = (pCur->info.nPayload-pCur->info.nLocal+ovflSize-1)/ovflSize;
+      pCur->aOverflow = (Pgno *)sqlite3MallocZero(sizeof(Pgno)*nOvfl);
+      /* nOvfl is always positive.  If it were zero, fetchPayload would have
+      ** been used instead of this routine. */
+      if( ALWAYS(nOvfl) && !pCur->aOverflow ){
+        rc = SQLITE_NOMEM;
+      }
+    }
+
+    /* If the overflow page-list cache has been allocated and the
+    ** entry for the first required overflow page is valid, skip
+    ** directly to it.
+    */
+    if( pCur->aOverflow && pCur->aOverflow[offset/ovflSize] ){
+      iIdx = (offset/ovflSize);
+      nextPage = pCur->aOverflow[iIdx];
+      offset = (offset%ovflSize);
+    }
+#endif
+
+    for( ; rc==SQLITE_OK && amt>0 && nextPage; iIdx++){
+
+#ifndef SQLITE_OMIT_INCRBLOB
+      /* If required, populate the overflow page-list cache. */
+      if( pCur->aOverflow ){
+        assert(!pCur->aOverflow[iIdx] || pCur->aOverflow[iIdx]==nextPage);
+        pCur->aOverflow[iIdx] = nextPage;
+      }
+#endif
+
+      if( offset>=ovflSize ){
+        /* The only reason to read this page is to obtain the page
+        ** number for the next page in the overflow chain. The page
+        ** data is not required. So first try to lookup the overflow
+        ** page-list cache, if any, then fall back to the getOverflowPage()
+        ** function.
+        */
+#ifndef SQLITE_OMIT_INCRBLOB
+        if( pCur->aOverflow && pCur->aOverflow[iIdx+1] ){
+          nextPage = pCur->aOverflow[iIdx+1];
+        } else 
+#endif
+          rc = getOverflowPage(pBt, nextPage, 0, &nextPage);
+        offset -= ovflSize;
+      }else{
+        /* Need to read this page properly. It contains some of the
+        ** range of data that is being read (eOp==0) or written (eOp!=0).
+        */
+        DbPage *pDbPage;
+        int a = amt;
+        rc = sqlite3PagerGet(pBt->pPager, nextPage, &pDbPage);
+        if( rc==SQLITE_OK ){
+          aPayload = sqlite3PagerGetData(pDbPage);
+          nextPage = get4byte(aPayload);
+          if( a + offset > ovflSize ){
+            a = ovflSize - offset;
+          }
+          rc = copyPayload(&aPayload[offset+4], pBuf, a, eOp, pDbPage);
+          sqlite3PagerUnref(pDbPage);
+          offset = 0;
+          amt -= a;
+          pBuf += a;
+        }
+      }
+    }
+  }
+
+  if( rc==SQLITE_OK && amt>0 ){
+    return SQLITE_CORRUPT_BKPT;
+  }
+  return rc;
+}
+
+/*
+** Read part of the key associated with cursor pCur.  Exactly
+** "amt" bytes will be transfered into pBuf[].  The transfer
+** begins at "offset".
+**
+** The caller must ensure that pCur is pointing to a valid row
+** in the table.
+**
+** Return SQLITE_OK on success or an error code if anything goes
+** wrong.  An error is returned if "offset+amt" is larger than
+** the available payload.
+*/
+SQLITE_PRIVATE int sqlite3BtreeKey(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
+  assert( cursorHoldsMutex(pCur) );
+  assert( pCur->eState==CURSOR_VALID );
+  assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
+  assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
+  return accessPayload(pCur, offset, amt, (unsigned char*)pBuf, 0);
+}
+
+/*
+** Read part of the data associated with cursor pCur.  Exactly
+** "amt" bytes will be transfered into pBuf[].  The transfer
+** begins at "offset".
+**
+** Return SQLITE_OK on success or an error code if anything goes
+** wrong.  An error is returned if "offset+amt" is larger than
+** the available payload.
+*/
+SQLITE_PRIVATE int sqlite3BtreeData(BtCursor *pCur, u32 offset, u32 amt, void *pBuf){
+  int rc;
+
+#ifndef SQLITE_OMIT_INCRBLOB
+  if ( pCur->eState==CURSOR_INVALID ){
+    return SQLITE_ABORT;
+  }
+#endif
+
+  assert( cursorHoldsMutex(pCur) );
+  rc = restoreCursorPosition(pCur);
+  if( rc==SQLITE_OK ){
+    assert( pCur->eState==CURSOR_VALID );
+    assert( pCur->iPage>=0 && pCur->apPage[pCur->iPage] );
+    assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
+    rc = accessPayload(pCur, offset, amt, pBuf, 0);
+  }
+  return rc;
+}
+
+/*
+** Return a pointer to payload information from the entry that the 
+** pCur cursor is pointing to.  The pointer is to the beginning of
+** the key if skipKey==0 and it points to the beginning of data if
+** skipKey==1.  The number of bytes of available key/data is written
+** into *pAmt.  If *pAmt==0, then the value returned will not be
+** a valid pointer.
+**
+** This routine is an optimization.  It is common for the entire key
+** and data to fit on the local page and for there to be no overflow
+** pages.  When that is so, this routine can be used to access the
+** key and data without making a copy.  If the key and/or data spills
+** onto overflow pages, then accessPayload() must be used to reassemble
+** the key/data and copy it into a preallocated buffer.
+**
+** The pointer returned by this routine looks directly into the cached
+** page of the database.  The data might change or move the next time
+** any btree routine is called.
+*/
+static const unsigned char *fetchPayload(
+  BtCursor *pCur,      /* Cursor pointing to entry to read from */
+  int *pAmt,           /* Write the number of available bytes here */
+  int skipKey          /* read beginning at data if this is true */
+){
+  unsigned char *aPayload;
+  MemPage *pPage;
+  u32 nKey;
+  u32 nLocal;
+
+  assert( pCur!=0 && pCur->iPage>=0 && pCur->apPage[pCur->iPage]);
+  assert( pCur->eState==CURSOR_VALID );
+  assert( cursorHoldsMutex(pCur) );
+  pPage = pCur->apPage[pCur->iPage];
+  assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
+  if( NEVER(pCur->info.nSize==0) ){
+    btreeParseCell(pCur->apPage[pCur->iPage], pCur->aiIdx[pCur->iPage],
+                   &pCur->info);
+  }
+  aPayload = pCur->info.pCell;
+  aPayload += pCur->info.nHeader;
+  if( pPage->intKey ){
+    nKey = 0;
+  }else{
+    nKey = (int)pCur->info.nKey;
+  }
+  if( skipKey ){
+    aPayload += nKey;
+    nLocal = pCur->info.nLocal - nKey;
+  }else{
+    nLocal = pCur->info.nLocal;
+    assert( nLocal<=nKey );
+  }
+  *pAmt = nLocal;
+  return aPayload;
+}
+
+
+/*
+** For the entry that cursor pCur is point to, return as
+** many bytes of the key or data as are available on the local
+** b-tree page.  Write the number of available bytes into *pAmt.
+**
+** The pointer returned is ephemeral.  The key/data may move
+** or be destroyed on the next call to any Btree routine,
+** including calls from other threads against the same cache.
+** Hence, a mutex on the BtShared should be held prior to calling
+** this routine.
+**
+** These routines is used to get quick access to key and data
+** in the common case where no overflow pages are used.
+*/
+SQLITE_PRIVATE const void *sqlite3BtreeKeyFetch(BtCursor *pCur, int *pAmt){
+  const void *p = 0;
+  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+  assert( cursorHoldsMutex(pCur) );
+  if( ALWAYS(pCur->eState==CURSOR_VALID) ){
+    p = (const void*)fetchPayload(pCur, pAmt, 0);
+  }
+  return p;
+}
+SQLITE_PRIVATE const void *sqlite3BtreeDataFetch(BtCursor *pCur, int *pAmt){
+  const void *p = 0;
+  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+  assert( cursorHoldsMutex(pCur) );
+  if( ALWAYS(pCur->eState==CURSOR_VALID) ){
+    p = (const void*)fetchPayload(pCur, pAmt, 1);
+  }
+  return p;
+}
+
+
+/*
+** Move the cursor down to a new child page.  The newPgno argument is the
+** page number of the child page to move to.
+**
+** This function returns SQLITE_CORRUPT if the page-header flags field of
+** the new child page does not match the flags field of the parent (i.e.
+** if an intkey page appears to be the parent of a non-intkey page, or
+** vice-versa).
+*/
+static int moveToChild(BtCursor *pCur, u32 newPgno){
+  int rc;
+  int i = pCur->iPage;
+  MemPage *pNewPage;
+  BtShared *pBt = pCur->pBt;
+
+  assert( cursorHoldsMutex(pCur) );
+  assert( pCur->eState==CURSOR_VALID );
+  assert( pCur->iPage<BTCURSOR_MAX_DEPTH );
+  if( pCur->iPage>=(BTCURSOR_MAX_DEPTH-1) ){
+    return SQLITE_CORRUPT_BKPT;
+  }
+  rc = getAndInitPage(pBt, newPgno, &pNewPage);
+  if( rc ) return rc;
+  pCur->apPage[i+1] = pNewPage;
+  pCur->aiIdx[i+1] = 0;
+  pCur->iPage++;
+
+  pCur->info.nSize = 0;
+  pCur->validNKey = 0;
+  if( pNewPage->nCell<1 || pNewPage->intKey!=pCur->apPage[i]->intKey ){
+    return SQLITE_CORRUPT_BKPT;
+  }
+  return SQLITE_OK;
+}
+
+#ifndef NDEBUG
+/*
+** Page pParent is an internal (non-leaf) tree page. This function 
+** asserts that page number iChild is the left-child if the iIdx'th
+** cell in page pParent. Or, if iIdx is equal to the total number of
+** cells in pParent, that page number iChild is the right-child of
+** the page.
+*/
+static void assertParentIndex(MemPage *pParent, int iIdx, Pgno iChild){
+  assert( iIdx<=pParent->nCell );
+  if( iIdx==pParent->nCell ){
+    assert( get4byte(&pParent->aData[pParent->hdrOffset+8])==iChild );
+  }else{
+    assert( get4byte(findCell(pParent, iIdx))==iChild );
+  }
+}
+#else
+#  define assertParentIndex(x,y,z) 
+#endif
+
+/*
+** Move the cursor up to the parent page.
+**
+** pCur->idx is set to the cell index that contains the pointer
+** to the page we are coming from.  If we are coming from the
+** right-most child page then pCur->idx is set to one more than
+** the largest cell index.
+*/
+static void moveToParent(BtCursor *pCur){
+  assert( cursorHoldsMutex(pCur) );
+  assert( pCur->eState==CURSOR_VALID );
+  assert( pCur->iPage>0 );
+  assert( pCur->apPage[pCur->iPage] );
+  assertParentIndex(
+    pCur->apPage[pCur->iPage-1], 
+    pCur->aiIdx[pCur->iPage-1], 
+    pCur->apPage[pCur->iPage]->pgno
+  );
+  releasePage(pCur->apPage[pCur->iPage]);
+  pCur->iPage--;
+  pCur->info.nSize = 0;
+  pCur->validNKey = 0;
+}
+
+/*
+** Move the cursor to point to the root page of its b-tree structure.
+**
+** If the table has a virtual root page, then the cursor is moved to point
+** to the virtual root page instead of the actual root page. A table has a
+** virtual root page when the actual root page contains no cells and a 
+** single child page. This can only happen with the table rooted at page 1.
+**
+** If the b-tree structure is empty, the cursor state is set to 
+** CURSOR_INVALID. Otherwise, the cursor is set to point to the first
+** cell located on the root (or virtual root) page and the cursor state
+** is set to CURSOR_VALID.
+**
+** If this function returns successfully, it may be assumed that the
+** page-header flags indicate that the [virtual] root-page is the expected 
+** kind of b-tree page (i.e. if when opening the cursor the caller did not
+** specify a KeyInfo structure the flags byte is set to 0x05 or 0x0D,
+** indicating a table b-tree, or if the caller did specify a KeyInfo 
+** structure the flags byte is set to 0x02 or 0x0A, indicating an index
+** b-tree).
+*/
+static int moveToRoot(BtCursor *pCur){
+  MemPage *pRoot;
+  int rc = SQLITE_OK;
+  Btree *p = pCur->pBtree;
+  BtShared *pBt = p->pBt;
+
+  assert( cursorHoldsMutex(pCur) );
+  assert( CURSOR_INVALID < CURSOR_REQUIRESEEK );
+  assert( CURSOR_VALID   < CURSOR_REQUIRESEEK );
+  assert( CURSOR_FAULT   > CURSOR_REQUIRESEEK );
+  if( pCur->eState>=CURSOR_REQUIRESEEK ){
+    if( pCur->eState==CURSOR_FAULT ){
+      assert( pCur->skipNext!=SQLITE_OK );
+      return pCur->skipNext;
+    }
+    sqlite3BtreeClearCursor(pCur);
+  }
+
+  if( pCur->iPage>=0 ){
+    int i;
+    for(i=1; i<=pCur->iPage; i++){
+      releasePage(pCur->apPage[i]);
+    }
+    pCur->iPage = 0;
+  }else{
+    rc = getAndInitPage(pBt, pCur->pgnoRoot, &pCur->apPage[0]);
+    if( rc!=SQLITE_OK ){
+      pCur->eState = CURSOR_INVALID;
+      return rc;
+    }
+    pCur->iPage = 0;
+
+    /* If pCur->pKeyInfo is not NULL, then the caller that opened this cursor
+    ** expected to open it on an index b-tree. Otherwise, if pKeyInfo is
+    ** NULL, the caller expects a table b-tree. If this is not the case,
+    ** return an SQLITE_CORRUPT error.  */
+    assert( pCur->apPage[0]->intKey==1 || pCur->apPage[0]->intKey==0 );
+    if( (pCur->pKeyInfo==0)!=pCur->apPage[0]->intKey ){
+      return SQLITE_CORRUPT_BKPT;
+    }
+  }
+
+  /* Assert that the root page is of the correct type. This must be the
+  ** case as the call to this function that loaded the root-page (either
+  ** this call or a previous invocation) would have detected corruption 
+  ** if the assumption were not true, and it is not possible for the flags 
+  ** byte to have been modified while this cursor is holding a reference
+  ** to the page.  */
+  pRoot = pCur->apPage[0];
+  assert( pRoot->pgno==pCur->pgnoRoot );
+  assert( pRoot->isInit && (pCur->pKeyInfo==0)==pRoot->intKey );
+
+  pCur->aiIdx[0] = 0;
+  pCur->info.nSize = 0;
+  pCur->atLast = 0;
+  pCur->validNKey = 0;
+
+  if( pRoot->nCell==0 && !pRoot->leaf ){
+    Pgno subpage;
+    if( pRoot->pgno!=1 ) return SQLITE_CORRUPT_BKPT;
+    subpage = get4byte(&pRoot->aData[pRoot->hdrOffset+8]);
+    pCur->eState = CURSOR_VALID;
+    rc = moveToChild(pCur, subpage);
+  }else{
+    pCur->eState = ((pRoot->nCell>0)?CURSOR_VALID:CURSOR_INVALID);
+  }
+  return rc;
+}
+
+/*
+** Move the cursor down to the left-most leaf entry beneath the
+** entry to which it is currently pointing.
+**
+** The left-most leaf is the one with the smallest key - the first
+** in ascending order.
+*/
+static int moveToLeftmost(BtCursor *pCur){
+  Pgno pgno;
+  int rc = SQLITE_OK;
+  MemPage *pPage;
+
+  assert( cursorHoldsMutex(pCur) );
+  assert( pCur->eState==CURSOR_VALID );
+  while( rc==SQLITE_OK && !(pPage = pCur->apPage[pCur->iPage])->leaf ){
+    assert( pCur->aiIdx[pCur->iPage]<pPage->nCell );
+    pgno = get4byte(findCell(pPage, pCur->aiIdx[pCur->iPage]));
+    rc = moveToChild(pCur, pgno);
+  }
+  return rc;
+}
+
+/*
+** Move the cursor down to the right-most leaf entry beneath the
+** page to which it is currently pointing.  Notice the difference
+** between moveToLeftmost() and moveToRightmost().  moveToLeftmost()
+** finds the left-most entry beneath the *entry* whereas moveToRightmost()
+** finds the right-most entry beneath the *page*.
+**
+** The right-most entry is the one with the largest key - the last
+** key in ascending order.
+*/
+static int moveToRightmost(BtCursor *pCur){
+  Pgno pgno;
+  int rc = SQLITE_OK;
+  MemPage *pPage = 0;
+
+  assert( cursorHoldsMutex(pCur) );
+  assert( pCur->eState==CURSOR_VALID );
+  while( rc==SQLITE_OK && !(pPage = pCur->apPage[pCur->iPage])->leaf ){
+    pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
+    pCur->aiIdx[pCur->iPage] = pPage->nCell;
+    rc = moveToChild(pCur, pgno);
+  }
+  if( rc==SQLITE_OK ){
+    pCur->aiIdx[pCur->iPage] = pPage->nCell-1;
+    pCur->info.nSize = 0;
+    pCur->validNKey = 0;
+  }
+  return rc;
+}
+
+/* Move the cursor to the first entry in the table.  Return SQLITE_OK
+** on success.  Set *pRes to 0 if the cursor actually points to something
+** or set *pRes to 1 if the table is empty.
+*/
+SQLITE_PRIVATE int sqlite3BtreeFirst(BtCursor *pCur, int *pRes){
+  int rc;
+
+  assert( cursorHoldsMutex(pCur) );
+  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+  rc = moveToRoot(pCur);
+  if( rc==SQLITE_OK ){
+    if( pCur->eState==CURSOR_INVALID ){
+      assert( pCur->apPage[pCur->iPage]->nCell==0 );
+      *pRes = 1;
+    }else{
+      assert( pCur->apPage[pCur->iPage]->nCell>0 );
+      *pRes = 0;
+      rc = moveToLeftmost(pCur);
+    }
+  }
+  return rc;
+}
+
+/* Move the cursor to the last entry in the table.  Return SQLITE_OK
+** on success.  Set *pRes to 0 if the cursor actually points to something
+** or set *pRes to 1 if the table is empty.
+*/
+SQLITE_PRIVATE int sqlite3BtreeLast(BtCursor *pCur, int *pRes){
+  int rc;
+ 
+  assert( cursorHoldsMutex(pCur) );
+  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+
+  /* If the cursor already points to the last entry, this is a no-op. */
+  if( CURSOR_VALID==pCur->eState && pCur->atLast ){
+#ifdef SQLITE_DEBUG
+    /* This block serves to assert() that the cursor really does point 
+    ** to the last entry in the b-tree. */
+    int ii;
+    for(ii=0; ii<pCur->iPage; ii++){
+      assert( pCur->aiIdx[ii]==pCur->apPage[ii]->nCell );
+    }
+    assert( pCur->aiIdx[pCur->iPage]==pCur->apPage[pCur->iPage]->nCell-1 );
+    assert( pCur->apPage[pCur->iPage]->leaf );
+#endif
+    return SQLITE_OK;
+  }
+
+  rc = moveToRoot(pCur);
+  if( rc==SQLITE_OK ){
+    if( CURSOR_INVALID==pCur->eState ){
+      assert( pCur->apPage[pCur->iPage]->nCell==0 );
+      *pRes = 1;
+    }else{
+      assert( pCur->eState==CURSOR_VALID );
+      *pRes = 0;
+      rc = moveToRightmost(pCur);
+      pCur->atLast = rc==SQLITE_OK ?1:0;
+    }
+  }
+  return rc;
+}
+
+/* Move the cursor so that it points to an entry near the key 
+** specified by pIdxKey or intKey.   Return a success code.
+**
+** For INTKEY tables, the intKey parameter is used.  pIdxKey 
+** must be NULL.  For index tables, pIdxKey is used and intKey
+** is ignored.
+**
+** If an exact match is not found, then the cursor is always
+** left pointing at a leaf page which would hold the entry if it
+** were present.  The cursor might point to an entry that comes
+** before or after the key.
+**
+** An integer is written into *pRes which is the result of
+** comparing the key with the entry to which the cursor is 
+** pointing.  The meaning of the integer written into
+** *pRes is as follows:
+**
+**     *pRes<0      The cursor is left pointing at an entry that
+**                  is smaller than intKey/pIdxKey or if the table is empty
+**                  and the cursor is therefore left point to nothing.
+**
+**     *pRes==0     The cursor is left pointing at an entry that
+**                  exactly matches intKey/pIdxKey.
+**
+**     *pRes>0      The cursor is left pointing at an entry that
+**                  is larger than intKey/pIdxKey.
+**
+*/
+SQLITE_PRIVATE int sqlite3BtreeMovetoUnpacked(
+  BtCursor *pCur,          /* The cursor to be moved */
+  UnpackedRecord *pIdxKey, /* Unpacked index key */
+  i64 intKey,              /* The table key */
+  int biasRight,           /* If true, bias the search to the high end */
+  int *pRes                /* Write search results here */
+){
+  int rc;
+
+  assert( cursorHoldsMutex(pCur) );
+  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+  assert( pRes );
+  assert( (pIdxKey==0)==(pCur->pKeyInfo==0) );
+
+  /* If the cursor is already positioned at the point we are trying
+  ** to move to, then just return without doing any work */
+  if( pCur->eState==CURSOR_VALID && pCur->validNKey 
+   && pCur->apPage[0]->intKey 
+  ){
+    if( pCur->info.nKey==intKey ){
+      *pRes = 0;
+      return SQLITE_OK;
+    }
+    if( pCur->atLast && pCur->info.nKey<intKey ){
+      *pRes = -1;
+      return SQLITE_OK;
+    }
+  }
+
+  rc = moveToRoot(pCur);
+  if( rc ){
+    return rc;
+  }
+  assert( pCur->apPage[pCur->iPage] );
+  assert( pCur->apPage[pCur->iPage]->isInit );
+  assert( pCur->apPage[pCur->iPage]->nCell>0 || pCur->eState==CURSOR_INVALID );
+  if( pCur->eState==CURSOR_INVALID ){
+    *pRes = -1;
+    assert( pCur->apPage[pCur->iPage]->nCell==0 );
+    return SQLITE_OK;
+  }
+  assert( pCur->apPage[0]->intKey || pIdxKey );
+  for(;;){
+    int lwr, upr;
+    Pgno chldPg;
+    MemPage *pPage = pCur->apPage[pCur->iPage];
+    int c;
+
+    /* pPage->nCell must be greater than zero. If this is the root-page
+    ** the cursor would have been INVALID above and this for(;;) loop
+    ** not run. If this is not the root-page, then the moveToChild() routine
+    ** would have already detected db corruption. Similarly, pPage must
+    ** be the right kind (index or table) of b-tree page. Otherwise
+    ** a moveToChild() or moveToRoot() call would have detected corruption.  */
+    assert( pPage->nCell>0 );
+    assert( pPage->intKey==(pIdxKey==0) );
+    lwr = 0;
+    upr = pPage->nCell-1;
+    if( biasRight ){
+      pCur->aiIdx[pCur->iPage] = (u16)upr;
+    }else{
+      pCur->aiIdx[pCur->iPage] = (u16)((upr+lwr)/2);
+    }
+    for(;;){
+      int idx = pCur->aiIdx[pCur->iPage]; /* Index of current cell in pPage */
+      u8 *pCell;                          /* Pointer to current cell in pPage */
+
+      pCur->info.nSize = 0;
+      pCell = findCell(pPage, idx) + pPage->childPtrSize;
+      if( pPage->intKey ){
+        i64 nCellKey;
+        if( pPage->hasData ){
+          u32 dummy;
+          pCell += getVarint32(pCell, dummy);
+        }
+        getVarint(pCell, (u64*)&nCellKey);
+        if( nCellKey==intKey ){
+          c = 0;
+        }else if( nCellKey<intKey ){
+          c = -1;
+        }else{
+          assert( nCellKey>intKey );
+          c = +1;
+        }
+        pCur->validNKey = 1;
+        pCur->info.nKey = nCellKey;
+      }else{
+        /* The maximum supported page-size is 65536 bytes. This means that
+        ** the maximum number of record bytes stored on an index B-Tree
+        ** page is less than 16384 bytes and may be stored as a 2-byte
+        ** varint. This information is used to attempt to avoid parsing 
+        ** the entire cell by checking for the cases where the record is 
+        ** stored entirely within the b-tree page by inspecting the first 
+        ** 2 bytes of the cell.
+        */
+        int nCell = pCell[0];
+        if( !(nCell & 0x80) && nCell<=pPage->maxLocal ){
+          /* This branch runs if the record-size field of the cell is a
+          ** single byte varint and the record fits entirely on the main
+          ** b-tree page.  */
+          c = sqlite3VdbeRecordCompare(nCell, (void*)&pCell[1], pIdxKey);
+        }else if( !(pCell[1] & 0x80) 
+          && (nCell = ((nCell&0x7f)<<7) + pCell[1])<=pPage->maxLocal
+        ){
+          /* The record-size field is a 2 byte varint and the record 
+          ** fits entirely on the main b-tree page.  */
+          c = sqlite3VdbeRecordCompare(nCell, (void*)&pCell[2], pIdxKey);
+        }else{
+          /* The record flows over onto one or more overflow pages. In
+          ** this case the whole cell needs to be parsed, a buffer allocated
+          ** and accessPayload() used to retrieve the record into the
+          ** buffer before VdbeRecordCompare() can be called. */
+          void *pCellKey;
+          u8 * const pCellBody = pCell - pPage->childPtrSize;
+          btreeParseCellPtr(pPage, pCellBody, &pCur->info);
+          nCell = (int)pCur->info.nKey;
+          pCellKey = sqlite3Malloc( nCell );
+          if( pCellKey==0 ){
+            rc = SQLITE_NOMEM;
+            goto moveto_finish;
+          }
+          rc = accessPayload(pCur, 0, nCell, (unsigned char*)pCellKey, 0);
+          if( rc ){
+            sqlite3_free(pCellKey);
+            goto moveto_finish;
+          }
+          c = sqlite3VdbeRecordCompare(nCell, pCellKey, pIdxKey);
+          sqlite3_free(pCellKey);
+        }
+      }
+      if( c==0 ){
+        if( pPage->intKey && !pPage->leaf ){
+          lwr = idx;
+          upr = lwr - 1;
+          break;
+        }else{
+          *pRes = 0;
+          rc = SQLITE_OK;
+          goto moveto_finish;
+        }
+      }
+      if( c<0 ){
+        lwr = idx+1;
+      }else{
+        upr = idx-1;
+      }
+      if( lwr>upr ){
+        break;
+      }
+      pCur->aiIdx[pCur->iPage] = (u16)((lwr+upr)/2);
+    }
+    assert( lwr==upr+1 );
+    assert( pPage->isInit );
+    if( pPage->leaf ){
+      chldPg = 0;
+    }else if( lwr>=pPage->nCell ){
+      chldPg = get4byte(&pPage->aData[pPage->hdrOffset+8]);
+    }else{
+      chldPg = get4byte(findCell(pPage, lwr));
+    }
+    if( chldPg==0 ){
+      assert( pCur->aiIdx[pCur->iPage]<pCur->apPage[pCur->iPage]->nCell );
+      *pRes = c;
+      rc = SQLITE_OK;
+      goto moveto_finish;
+    }
+    pCur->aiIdx[pCur->iPage] = (u16)lwr;
+    pCur->info.nSize = 0;
+    pCur->validNKey = 0;
+    rc = moveToChild(pCur, chldPg);
+    if( rc ) goto moveto_finish;
+  }
+moveto_finish:
+  return rc;
+}
+
+
+/*
+** Return TRUE if the cursor is not pointing at an entry of the table.
+**
+** TRUE will be returned after a call to sqlite3BtreeNext() moves
+** past the last entry in the table or sqlite3BtreePrev() moves past
+** the first entry.  TRUE is also returned if the table is empty.
+*/
+SQLITE_PRIVATE int sqlite3BtreeEof(BtCursor *pCur){
+  /* TODO: What if the cursor is in CURSOR_REQUIRESEEK but all table entries
+  ** have been deleted? This API will need to change to return an error code
+  ** as well as the boolean result value.
+  */
+  return (CURSOR_VALID!=pCur->eState);
+}
+
+/*
+** Advance the cursor to the next entry in the database.  If
+** successful then set *pRes=0.  If the cursor
+** was already pointing to the last entry in the database before
+** this routine was called, then set *pRes=1.
+*/
+SQLITE_PRIVATE int sqlite3BtreeNext(BtCursor *pCur, int *pRes){
+  int rc;
+  int idx;
+  MemPage *pPage;
+
+  assert( cursorHoldsMutex(pCur) );
+  rc = restoreCursorPosition(pCur);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+  assert( pRes!=0 );
+  if( CURSOR_INVALID==pCur->eState ){
+    *pRes = 1;
+    return SQLITE_OK;
+  }
+  if( pCur->skipNext>0 ){
+    pCur->skipNext = 0;
+    *pRes = 0;
+    return SQLITE_OK;
+  }
+  pCur->skipNext = 0;
+
+  pPage = pCur->apPage[pCur->iPage];
+  idx = ++pCur->aiIdx[pCur->iPage];
+  assert( pPage->isInit );
+  assert( idx<=pPage->nCell );
+
+  pCur->info.nSize = 0;
+  pCur->validNKey = 0;
+  if( idx>=pPage->nCell ){
+    if( !pPage->leaf ){
+      rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
+      if( rc ) return rc;
+      rc = moveToLeftmost(pCur);
+      *pRes = 0;
+      return rc;
+    }
+    do{
+      if( pCur->iPage==0 ){
+        *pRes = 1;
+        pCur->eState = CURSOR_INVALID;
+        return SQLITE_OK;
+      }
+      moveToParent(pCur);
+      pPage = pCur->apPage[pCur->iPage];
+    }while( pCur->aiIdx[pCur->iPage]>=pPage->nCell );
+    *pRes = 0;
+    if( pPage->intKey ){
+      rc = sqlite3BtreeNext(pCur, pRes);
+    }else{
+      rc = SQLITE_OK;
+    }
+    return rc;
+  }
+  *pRes = 0;
+  if( pPage->leaf ){
+    return SQLITE_OK;
+  }
+  rc = moveToLeftmost(pCur);
+  return rc;
+}
+
+
+/*
+** Step the cursor to the back to the previous entry in the database.  If
+** successful then set *pRes=0.  If the cursor
+** was already pointing to the first entry in the database before
+** this routine was called, then set *pRes=1.
+*/
+SQLITE_PRIVATE int sqlite3BtreePrevious(BtCursor *pCur, int *pRes){
+  int rc;
+  MemPage *pPage;
+
+  assert( cursorHoldsMutex(pCur) );
+  rc = restoreCursorPosition(pCur);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+  pCur->atLast = 0;
+  if( CURSOR_INVALID==pCur->eState ){
+    *pRes = 1;
+    return SQLITE_OK;
+  }
+  if( pCur->skipNext<0 ){
+    pCur->skipNext = 0;
+    *pRes = 0;
+    return SQLITE_OK;
+  }
+  pCur->skipNext = 0;
+
+  pPage = pCur->apPage[pCur->iPage];
+  assert( pPage->isInit );
+  if( !pPage->leaf ){
+    int idx = pCur->aiIdx[pCur->iPage];
+    rc = moveToChild(pCur, get4byte(findCell(pPage, idx)));
+    if( rc ){
+      return rc;
+    }
+    rc = moveToRightmost(pCur);
+  }else{
+    while( pCur->aiIdx[pCur->iPage]==0 ){
+      if( pCur->iPage==0 ){
+        pCur->eState = CURSOR_INVALID;
+        *pRes = 1;
+        return SQLITE_OK;
+      }
+      moveToParent(pCur);
+    }
+    pCur->info.nSize = 0;
+    pCur->validNKey = 0;
+
+    pCur->aiIdx[pCur->iPage]--;
+    pPage = pCur->apPage[pCur->iPage];
+    if( pPage->intKey && !pPage->leaf ){
+      rc = sqlite3BtreePrevious(pCur, pRes);
+    }else{
+      rc = SQLITE_OK;
+    }
+  }
+  *pRes = 0;
+  return rc;
+}
+
+/*
+** Allocate a new page from the database file.
+**
+** The new page is marked as dirty.  (In other words, sqlite3PagerWrite()
+** has already been called on the new page.)  The new page has also
+** been referenced and the calling routine is responsible for calling
+** sqlite3PagerUnref() on the new page when it is done.
+**
+** SQLITE_OK is returned on success.  Any other return value indicates
+** an error.  *ppPage and *pPgno are undefined in the event of an error.
+** Do not invoke sqlite3PagerUnref() on *ppPage if an error is returned.
+**
+** If the "nearby" parameter is not 0, then a (feeble) effort is made to 
+** locate a page close to the page number "nearby".  This can be used in an
+** attempt to keep related pages close to each other in the database file,
+** which in turn can make database access faster.
+**
+** If the "exact" parameter is not 0, and the page-number nearby exists 
+** anywhere on the free-list, then it is guarenteed to be returned. This
+** is only used by auto-vacuum databases when allocating a new table.
+*/
+static int allocateBtreePage(
+  BtShared *pBt, 
+  MemPage **ppPage, 
+  Pgno *pPgno, 
+  Pgno nearby,
+  u8 exact
+){
+  MemPage *pPage1;
+  int rc;
+  u32 n;     /* Number of pages on the freelist */
+  u32 k;     /* Number of leaves on the trunk of the freelist */
+  MemPage *pTrunk = 0;
+  MemPage *pPrevTrunk = 0;
+  Pgno mxPage;     /* Total size of the database file */
+
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  pPage1 = pBt->pPage1;
+  mxPage = btreePagecount(pBt);
+  n = get4byte(&pPage1->aData[36]);
+  testcase( n==mxPage-1 );
+  if( n>=mxPage ){
+    return SQLITE_CORRUPT_BKPT;
+  }
+  if( n>0 ){
+    /* There are pages on the freelist.  Reuse one of those pages. */
+    Pgno iTrunk;
+    u8 searchList = 0; /* If the free-list must be searched for 'nearby' */
+    
+    /* If the 'exact' parameter was true and a query of the pointer-map
+    ** shows that the page 'nearby' is somewhere on the free-list, then
+    ** the entire-list will be searched for that page.
+    */
+#ifndef SQLITE_OMIT_AUTOVACUUM
+    if( exact && nearby<=mxPage ){
+      u8 eType;
+      assert( nearby>0 );
+      assert( pBt->autoVacuum );
+      rc = ptrmapGet(pBt, nearby, &eType, 0);
+      if( rc ) return rc;
+      if( eType==PTRMAP_FREEPAGE ){
+        searchList = 1;
+      }
+      *pPgno = nearby;
+    }
+#endif
+
+    /* Decrement the free-list count by 1. Set iTrunk to the index of the
+    ** first free-list trunk page. iPrevTrunk is initially 1.
+    */
+    rc = sqlite3PagerWrite(pPage1->pDbPage);
+    if( rc ) return rc;
+    put4byte(&pPage1->aData[36], n-1);
+
+    /* The code within this loop is run only once if the 'searchList' variable
+    ** is not true. Otherwise, it runs once for each trunk-page on the
+    ** free-list until the page 'nearby' is located.
+    */
+    do {
+      pPrevTrunk = pTrunk;
+      if( pPrevTrunk ){
+        iTrunk = get4byte(&pPrevTrunk->aData[0]);
+      }else{
+        iTrunk = get4byte(&pPage1->aData[32]);
+      }
+      testcase( iTrunk==mxPage );
+      if( iTrunk>mxPage ){
+        rc = SQLITE_CORRUPT_BKPT;
+      }else{
+        rc = btreeGetPage(pBt, iTrunk, &pTrunk, 0);
+      }
+      if( rc ){
+        pTrunk = 0;
+        goto end_allocate_page;
+      }
+
+      k = get4byte(&pTrunk->aData[4]); /* # of leaves on this trunk page */
+      if( k==0 && !searchList ){
+        /* The trunk has no leaves and the list is not being searched. 
+        ** So extract the trunk page itself and use it as the newly 
+        ** allocated page */
+        assert( pPrevTrunk==0 );
+        rc = sqlite3PagerWrite(pTrunk->pDbPage);
+        if( rc ){
+          goto end_allocate_page;
+        }
+        *pPgno = iTrunk;
+        memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
+        *ppPage = pTrunk;
+        pTrunk = 0;
+        TRACE(("ALLOCATE: %d trunk - %d free pages left\n", *pPgno, n-1));
+      }else if( k>(u32)(pBt->usableSize/4 - 2) ){
+        /* Value of k is out of range.  Database corruption */
+        rc = SQLITE_CORRUPT_BKPT;
+        goto end_allocate_page;
+#ifndef SQLITE_OMIT_AUTOVACUUM
+      }else if( searchList && nearby==iTrunk ){
+        /* The list is being searched and this trunk page is the page
+        ** to allocate, regardless of whether it has leaves.
+        */
+        assert( *pPgno==iTrunk );
+        *ppPage = pTrunk;
+        searchList = 0;
+        rc = sqlite3PagerWrite(pTrunk->pDbPage);
+        if( rc ){
+          goto end_allocate_page;
+        }
+        if( k==0 ){
+          if( !pPrevTrunk ){
+            memcpy(&pPage1->aData[32], &pTrunk->aData[0], 4);
+          }else{
+            rc = sqlite3PagerWrite(pPrevTrunk->pDbPage);
+            if( rc!=SQLITE_OK ){
+              goto end_allocate_page;
+            }
+            memcpy(&pPrevTrunk->aData[0], &pTrunk->aData[0], 4);
+          }
+        }else{
+          /* The trunk page is required by the caller but it contains 
+          ** pointers to free-list leaves. The first leaf becomes a trunk
+          ** page in this case.
+          */
+          MemPage *pNewTrunk;
+          Pgno iNewTrunk = get4byte(&pTrunk->aData[8]);
+          if( iNewTrunk>mxPage ){ 
+            rc = SQLITE_CORRUPT_BKPT;
+            goto end_allocate_page;
+          }
+          testcase( iNewTrunk==mxPage );
+          rc = btreeGetPage(pBt, iNewTrunk, &pNewTrunk, 0);
+          if( rc!=SQLITE_OK ){
+            goto end_allocate_page;
+          }
+          rc = sqlite3PagerWrite(pNewTrunk->pDbPage);
+          if( rc!=SQLITE_OK ){
+            releasePage(pNewTrunk);
+            goto end_allocate_page;
+          }
+          memcpy(&pNewTrunk->aData[0], &pTrunk->aData[0], 4);
+          put4byte(&pNewTrunk->aData[4], k-1);
+          memcpy(&pNewTrunk->aData[8], &pTrunk->aData[12], (k-1)*4);
+          releasePage(pNewTrunk);
+          if( !pPrevTrunk ){
+            assert( sqlite3PagerIswriteable(pPage1->pDbPage) );
+            put4byte(&pPage1->aData[32], iNewTrunk);
+          }else{
+            rc = sqlite3PagerWrite(pPrevTrunk->pDbPage);
+            if( rc ){
+              goto end_allocate_page;
+            }
+            put4byte(&pPrevTrunk->aData[0], iNewTrunk);
+          }
+        }
+        pTrunk = 0;
+        TRACE(("ALLOCATE: %d trunk - %d free pages left\n", *pPgno, n-1));
+#endif
+      }else if( k>0 ){
+        /* Extract a leaf from the trunk */
+        u32 closest;
+        Pgno iPage;
+        unsigned char *aData = pTrunk->aData;
+        if( nearby>0 ){
+          u32 i;
+          int dist;
+          closest = 0;
+          dist = sqlite3AbsInt32(get4byte(&aData[8]) - nearby);
+          for(i=1; i<k; i++){
+            int d2 = sqlite3AbsInt32(get4byte(&aData[8+i*4]) - nearby);
+            if( d2<dist ){
+              closest = i;
+              dist = d2;
+            }
+          }
+        }else{
+          closest = 0;
+        }
+
+        iPage = get4byte(&aData[8+closest*4]);
+        testcase( iPage==mxPage );
+        if( iPage>mxPage ){
+          rc = SQLITE_CORRUPT_BKPT;
+          goto end_allocate_page;
+        }
+        testcase( iPage==mxPage );
+        if( !searchList || iPage==nearby ){
+          int noContent;
+          *pPgno = iPage;
+          TRACE(("ALLOCATE: %d was leaf %d of %d on trunk %d"
+                 ": %d more free pages\n",
+                 *pPgno, closest+1, k, pTrunk->pgno, n-1));
+          rc = sqlite3PagerWrite(pTrunk->pDbPage);
+          if( rc ) goto end_allocate_page;
+          if( closest<k-1 ){
+            memcpy(&aData[8+closest*4], &aData[4+k*4], 4);
+          }
+          put4byte(&aData[4], k-1);
+          noContent = !btreeGetHasContent(pBt, *pPgno);
+          rc = btreeGetPage(pBt, *pPgno, ppPage, noContent);
+          if( rc==SQLITE_OK ){
+            rc = sqlite3PagerWrite((*ppPage)->pDbPage);
+            if( rc!=SQLITE_OK ){
+              releasePage(*ppPage);
+            }
+          }
+          searchList = 0;
+        }
+      }
+      releasePage(pPrevTrunk);
+      pPrevTrunk = 0;
+    }while( searchList );
+  }else{
+    /* There are no pages on the freelist, so create a new page at the
+    ** end of the file */
+    rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
+    if( rc ) return rc;
+    pBt->nPage++;
+    if( pBt->nPage==PENDING_BYTE_PAGE(pBt) ) pBt->nPage++;
+
+#ifndef SQLITE_OMIT_AUTOVACUUM
+    if( pBt->autoVacuum && PTRMAP_ISPAGE(pBt, pBt->nPage) ){
+      /* If *pPgno refers to a pointer-map page, allocate two new pages
+      ** at the end of the file instead of one. The first allocated page
+      ** becomes a new pointer-map page, the second is used by the caller.
+      */
+      MemPage *pPg = 0;
+      TRACE(("ALLOCATE: %d from end of file (pointer-map page)\n", pBt->nPage));
+      assert( pBt->nPage!=PENDING_BYTE_PAGE(pBt) );
+      rc = btreeGetPage(pBt, pBt->nPage, &pPg, 1);
+      if( rc==SQLITE_OK ){
+        rc = sqlite3PagerWrite(pPg->pDbPage);
+        releasePage(pPg);
+      }
+      if( rc ) return rc;
+      pBt->nPage++;
+      if( pBt->nPage==PENDING_BYTE_PAGE(pBt) ){ pBt->nPage++; }
+    }
+#endif
+    put4byte(28 + (u8*)pBt->pPage1->aData, pBt->nPage);
+    *pPgno = pBt->nPage;
+
+    assert( *pPgno!=PENDING_BYTE_PAGE(pBt) );
+    rc = btreeGetPage(pBt, *pPgno, ppPage, 1);
+    if( rc ) return rc;
+    rc = sqlite3PagerWrite((*ppPage)->pDbPage);
+    if( rc!=SQLITE_OK ){
+      releasePage(*ppPage);
+    }
+    TRACE(("ALLOCATE: %d from end of file\n", *pPgno));
+  }
+
+  assert( *pPgno!=PENDING_BYTE_PAGE(pBt) );
+
+end_allocate_page:
+  releasePage(pTrunk);
+  releasePage(pPrevTrunk);
+  if( rc==SQLITE_OK ){
+    if( sqlite3PagerPageRefcount((*ppPage)->pDbPage)>1 ){
+      releasePage(*ppPage);
+      return SQLITE_CORRUPT_BKPT;
+    }
+    (*ppPage)->isInit = 0;
+  }else{
+    *ppPage = 0;
+  }
+  assert( rc!=SQLITE_OK || sqlite3PagerIswriteable((*ppPage)->pDbPage) );
+  return rc;
+}
+
+/*
+** This function is used to add page iPage to the database file free-list. 
+** It is assumed that the page is not already a part of the free-list.
+**
+** The value passed as the second argument to this function is optional.
+** If the caller happens to have a pointer to the MemPage object 
+** corresponding to page iPage handy, it may pass it as the second value. 
+** Otherwise, it may pass NULL.
+**
+** If a pointer to a MemPage object is passed as the second argument,
+** its reference count is not altered by this function.
+*/
+static int freePage2(BtShared *pBt, MemPage *pMemPage, Pgno iPage){
+  MemPage *pTrunk = 0;                /* Free-list trunk page */
+  Pgno iTrunk = 0;                    /* Page number of free-list trunk page */ 
+  MemPage *pPage1 = pBt->pPage1;      /* Local reference to page 1 */
+  MemPage *pPage;                     /* Page being freed. May be NULL. */
+  int rc;                             /* Return Code */
+  int nFree;                          /* Initial number of pages on free-list */
+
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  assert( iPage>1 );
+  assert( !pMemPage || pMemPage->pgno==iPage );
+
+  if( pMemPage ){
+    pPage = pMemPage;
+    sqlite3PagerRef(pPage->pDbPage);
+  }else{
+    pPage = btreePageLookup(pBt, iPage);
+  }
+
+  /* Increment the free page count on pPage1 */
+  rc = sqlite3PagerWrite(pPage1->pDbPage);
+  if( rc ) goto freepage_out;
+  nFree = get4byte(&pPage1->aData[36]);
+  put4byte(&pPage1->aData[36], nFree+1);
+
+  if( pBt->secureDelete ){
+    /* If the secure_delete option is enabled, then
+    ** always fully overwrite deleted information with zeros.
+    */
+    if( (!pPage && ((rc = btreeGetPage(pBt, iPage, &pPage, 0))!=0) )
+     ||            ((rc = sqlite3PagerWrite(pPage->pDbPage))!=0)
+    ){
+      goto freepage_out;
+    }
+    memset(pPage->aData, 0, pPage->pBt->pageSize);
+  }
+
+  /* If the database supports auto-vacuum, write an entry in the pointer-map
+  ** to indicate that the page is free.
+  */
+  if( ISAUTOVACUUM ){
+    ptrmapPut(pBt, iPage, PTRMAP_FREEPAGE, 0, &rc);
+    if( rc ) goto freepage_out;
+  }
+
+  /* Now manipulate the actual database free-list structure. There are two
+  ** possibilities. If the free-list is currently empty, or if the first
+  ** trunk page in the free-list is full, then this page will become a
+  ** new free-list trunk page. Otherwise, it will become a leaf of the
+  ** first trunk page in the current free-list. This block tests if it
+  ** is possible to add the page as a new free-list leaf.
+  */
+  if( nFree!=0 ){
+    u32 nLeaf;                /* Initial number of leaf cells on trunk page */
+
+    iTrunk = get4byte(&pPage1->aData[32]);
+    rc = btreeGetPage(pBt, iTrunk, &pTrunk, 0);
+    if( rc!=SQLITE_OK ){
+      goto freepage_out;
+    }
+
+    nLeaf = get4byte(&pTrunk->aData[4]);
+    assert( pBt->usableSize>32 );
+    if( nLeaf > (u32)pBt->usableSize/4 - 2 ){
+      rc = SQLITE_CORRUPT_BKPT;
+      goto freepage_out;
+    }
+    if( nLeaf < (u32)pBt->usableSize/4 - 8 ){
+      /* In this case there is room on the trunk page to insert the page
+      ** being freed as a new leaf.
+      **
+      ** Note that the trunk page is not really full until it contains
+      ** usableSize/4 - 2 entries, not usableSize/4 - 8 entries as we have
+      ** coded.  But due to a coding error in versions of SQLite prior to
+      ** 3.6.0, databases with freelist trunk pages holding more than
+      ** usableSize/4 - 8 entries will be reported as corrupt.  In order
+      ** to maintain backwards compatibility with older versions of SQLite,
+      ** we will continue to restrict the number of entries to usableSize/4 - 8
+      ** for now.  At some point in the future (once everyone has upgraded
+      ** to 3.6.0 or later) we should consider fixing the conditional above
+      ** to read "usableSize/4-2" instead of "usableSize/4-8".
+      */
+      rc = sqlite3PagerWrite(pTrunk->pDbPage);
+      if( rc==SQLITE_OK ){
+        put4byte(&pTrunk->aData[4], nLeaf+1);
+        put4byte(&pTrunk->aData[8+nLeaf*4], iPage);
+        if( pPage && !pBt->secureDelete ){
+          sqlite3PagerDontWrite(pPage->pDbPage);
+        }
+        rc = btreeSetHasContent(pBt, iPage);
+      }
+      TRACE(("FREE-PAGE: %d leaf on trunk page %d\n",pPage->pgno,pTrunk->pgno));
+      goto freepage_out;
+    }
+  }
+
+  /* If control flows to this point, then it was not possible to add the
+  ** the page being freed as a leaf page of the first trunk in the free-list.
+  ** Possibly because the free-list is empty, or possibly because the 
+  ** first trunk in the free-list is full. Either way, the page being freed
+  ** will become the new first trunk page in the free-list.
+  */
+  if( pPage==0 && SQLITE_OK!=(rc = btreeGetPage(pBt, iPage, &pPage, 0)) ){
+    goto freepage_out;
+  }
+  rc = sqlite3PagerWrite(pPage->pDbPage);
+  if( rc!=SQLITE_OK ){
+    goto freepage_out;
+  }
+  put4byte(pPage->aData, iTrunk);
+  put4byte(&pPage->aData[4], 0);
+  put4byte(&pPage1->aData[32], iPage);
+  TRACE(("FREE-PAGE: %d new trunk page replacing %d\n", pPage->pgno, iTrunk));
+
+freepage_out:
+  if( pPage ){
+    pPage->isInit = 0;
+  }
+  releasePage(pPage);
+  releasePage(pTrunk);
+  return rc;
+}
+static void freePage(MemPage *pPage, int *pRC){
+  if( (*pRC)==SQLITE_OK ){
+    *pRC = freePage2(pPage->pBt, pPage, pPage->pgno);
+  }
+}
+
+/*
+** Free any overflow pages associated with the given Cell.
+*/
+static int clearCell(MemPage *pPage, unsigned char *pCell){
+  BtShared *pBt = pPage->pBt;
+  CellInfo info;
+  Pgno ovflPgno;
+  int rc;
+  int nOvfl;
+  u32 ovflPageSize;
+
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  btreeParseCellPtr(pPage, pCell, &info);
+  if( info.iOverflow==0 ){
+    return SQLITE_OK;  /* No overflow pages. Return without doing anything */
+  }
+  ovflPgno = get4byte(&pCell[info.iOverflow]);
+  assert( pBt->usableSize > 4 );
+  ovflPageSize = pBt->usableSize - 4;
+  nOvfl = (info.nPayload - info.nLocal + ovflPageSize - 1)/ovflPageSize;
+  assert( ovflPgno==0 || nOvfl>0 );
+  while( nOvfl-- ){
+    Pgno iNext = 0;
+    MemPage *pOvfl = 0;
+    if( ovflPgno<2 || ovflPgno>btreePagecount(pBt) ){
+      /* 0 is not a legal page number and page 1 cannot be an 
+      ** overflow page. Therefore if ovflPgno<2 or past the end of the 
+      ** file the database must be corrupt. */
+      return SQLITE_CORRUPT_BKPT;
+    }
+    if( nOvfl ){
+      rc = getOverflowPage(pBt, ovflPgno, &pOvfl, &iNext);
+      if( rc ) return rc;
+    }
+
+    if( ( pOvfl || ((pOvfl = btreePageLookup(pBt, ovflPgno))!=0) )
+     && sqlite3PagerPageRefcount(pOvfl->pDbPage)!=1
+    ){
+      /* There is no reason any cursor should have an outstanding reference 
+      ** to an overflow page belonging to a cell that is being deleted/updated.
+      ** So if there exists more than one reference to this page, then it 
+      ** must not really be an overflow page and the database must be corrupt. 
+      ** It is helpful to detect this before calling freePage2(), as 
+      ** freePage2() may zero the page contents if secure-delete mode is
+      ** enabled. If this 'overflow' page happens to be a page that the
+      ** caller is iterating through or using in some other way, this
+      ** can be problematic.
+      */
+      rc = SQLITE_CORRUPT_BKPT;
+    }else{
+      rc = freePage2(pBt, pOvfl, ovflPgno);
+    }
+
+    if( pOvfl ){
+      sqlite3PagerUnref(pOvfl->pDbPage);
+    }
+    if( rc ) return rc;
+    ovflPgno = iNext;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Create the byte sequence used to represent a cell on page pPage
+** and write that byte sequence into pCell[].  Overflow pages are
+** allocated and filled in as necessary.  The calling procedure
+** is responsible for making sure sufficient space has been allocated
+** for pCell[].
+**
+** Note that pCell does not necessary need to point to the pPage->aData
+** area.  pCell might point to some temporary storage.  The cell will
+** be constructed in this temporary area then copied into pPage->aData
+** later.
+*/
+static int fillInCell(
+  MemPage *pPage,                /* The page that contains the cell */
+  unsigned char *pCell,          /* Complete text of the cell */
+  const void *pKey, i64 nKey,    /* The key */
+  const void *pData,int nData,   /* The data */
+  int nZero,                     /* Extra zero bytes to append to pData */
+  int *pnSize                    /* Write cell size here */
+){
+  int nPayload;
+  const u8 *pSrc;
+  int nSrc, n, rc;
+  int spaceLeft;
+  MemPage *pOvfl = 0;
+  MemPage *pToRelease = 0;
+  unsigned char *pPrior;
+  unsigned char *pPayload;
+  BtShared *pBt = pPage->pBt;
+  Pgno pgnoOvfl = 0;
+  int nHeader;
+  CellInfo info;
+
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+
+  /* pPage is not necessarily writeable since pCell might be auxiliary
+  ** buffer space that is separate from the pPage buffer area */
+  assert( pCell<pPage->aData || pCell>=&pPage->aData[pBt->pageSize]
+            || sqlite3PagerIswriteable(pPage->pDbPage) );
+
+  /* Fill in the header. */
+  nHeader = 0;
+  if( !pPage->leaf ){
+    nHeader += 4;
+  }
+  if( pPage->hasData ){
+    nHeader += putVarint(&pCell[nHeader], nData+nZero);
+  }else{
+    nData = nZero = 0;
+  }
+  nHeader += putVarint(&pCell[nHeader], *(u64*)&nKey);
+  btreeParseCellPtr(pPage, pCell, &info);
+  assert( info.nHeader==nHeader );
+  assert( info.nKey==nKey );
+  assert( info.nData==(u32)(nData+nZero) );
+  
+  /* Fill in the payload */
+  nPayload = nData + nZero;
+  if( pPage->intKey ){
+    pSrc = pData;
+    nSrc = nData;
+    nData = 0;
+  }else{ 
+    if( NEVER(nKey>0x7fffffff || pKey==0) ){
+      return SQLITE_CORRUPT_BKPT;
+    }
+    nPayload += (int)nKey;
+    pSrc = pKey;
+    nSrc = (int)nKey;
+  }
+  *pnSize = info.nSize;
+  spaceLeft = info.nLocal;
+  pPayload = &pCell[nHeader];
+  pPrior = &pCell[info.iOverflow];
+
+  while( nPayload>0 ){
+    if( spaceLeft==0 ){
+#ifndef SQLITE_OMIT_AUTOVACUUM
+      Pgno pgnoPtrmap = pgnoOvfl; /* Overflow page pointer-map entry page */
+      if( pBt->autoVacuum ){
+        do{
+          pgnoOvfl++;
+        } while( 
+          PTRMAP_ISPAGE(pBt, pgnoOvfl) || pgnoOvfl==PENDING_BYTE_PAGE(pBt) 
+        );
+      }
+#endif
+      rc = allocateBtreePage(pBt, &pOvfl, &pgnoOvfl, pgnoOvfl, 0);
+#ifndef SQLITE_OMIT_AUTOVACUUM
+      /* If the database supports auto-vacuum, and the second or subsequent
+      ** overflow page is being allocated, add an entry to the pointer-map
+      ** for that page now. 
+      **
+      ** If this is the first overflow page, then write a partial entry 
+      ** to the pointer-map. If we write nothing to this pointer-map slot,
+      ** then the optimistic overflow chain processing in clearCell()
+      ** may misinterpret the uninitialised values and delete the
+      ** wrong pages from the database.
+      */
+      if( pBt->autoVacuum && rc==SQLITE_OK ){
+        u8 eType = (pgnoPtrmap?PTRMAP_OVERFLOW2:PTRMAP_OVERFLOW1);
+        ptrmapPut(pBt, pgnoOvfl, eType, pgnoPtrmap, &rc);
+        if( rc ){
+          releasePage(pOvfl);
+        }
+      }
+#endif
+      if( rc ){
+        releasePage(pToRelease);
+        return rc;
+      }
+
+      /* If pToRelease is not zero than pPrior points into the data area
+      ** of pToRelease.  Make sure pToRelease is still writeable. */
+      assert( pToRelease==0 || sqlite3PagerIswriteable(pToRelease->pDbPage) );
+
+      /* If pPrior is part of the data area of pPage, then make sure pPage
+      ** is still writeable */
+      assert( pPrior<pPage->aData || pPrior>=&pPage->aData[pBt->pageSize]
+            || sqlite3PagerIswriteable(pPage->pDbPage) );
+
+      put4byte(pPrior, pgnoOvfl);
+      releasePage(pToRelease);
+      pToRelease = pOvfl;
+      pPrior = pOvfl->aData;
+      put4byte(pPrior, 0);
+      pPayload = &pOvfl->aData[4];
+      spaceLeft = pBt->usableSize - 4;
+    }
+    n = nPayload;
+    if( n>spaceLeft ) n = spaceLeft;
+
+    /* If pToRelease is not zero than pPayload points into the data area
+    ** of pToRelease.  Make sure pToRelease is still writeable. */
+    assert( pToRelease==0 || sqlite3PagerIswriteable(pToRelease->pDbPage) );
+
+    /* If pPayload is part of the data area of pPage, then make sure pPage
+    ** is still writeable */
+    assert( pPayload<pPage->aData || pPayload>=&pPage->aData[pBt->pageSize]
+            || sqlite3PagerIswriteable(pPage->pDbPage) );
+
+    if( nSrc>0 ){
+      if( n>nSrc ) n = nSrc;
+      assert( pSrc );
+      memcpy(pPayload, pSrc, n);
+    }else{
+      memset(pPayload, 0, n);
+    }
+    nPayload -= n;
+    pPayload += n;
+    pSrc += n;
+    nSrc -= n;
+    spaceLeft -= n;
+    if( nSrc==0 ){
+      nSrc = nData;
+      pSrc = pData;
+    }
+  }
+  releasePage(pToRelease);
+  return SQLITE_OK;
+}
+
+/*
+** Remove the i-th cell from pPage.  This routine effects pPage only.
+** The cell content is not freed or deallocated.  It is assumed that
+** the cell content has been copied someplace else.  This routine just
+** removes the reference to the cell from pPage.
+**
+** "sz" must be the number of bytes in the cell.
+*/
+static void dropCell(MemPage *pPage, int idx, int sz, int *pRC){
+  int i;          /* Loop counter */
+  u32 pc;         /* Offset to cell content of cell being deleted */
+  u8 *data;       /* pPage->aData */
+  u8 *ptr;        /* Used to move bytes around within data[] */
+  int rc;         /* The return code */
+  int hdr;        /* Beginning of the header.  0 most pages.  100 page 1 */
+
+  if( *pRC ) return;
+
+  assert( idx>=0 && idx<pPage->nCell );
+  assert( sz==cellSize(pPage, idx) );
+  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  data = pPage->aData;
+  ptr = &data[pPage->cellOffset + 2*idx];
+  pc = get2byte(ptr);
+  hdr = pPage->hdrOffset;
+  testcase( pc==get2byte(&data[hdr+5]) );
+  testcase( pc+sz==pPage->pBt->usableSize );
+  if( pc < (u32)get2byte(&data[hdr+5]) || pc+sz > pPage->pBt->usableSize ){
+    *pRC = SQLITE_CORRUPT_BKPT;
+    return;
+  }
+  rc = freeSpace(pPage, pc, sz);
+  if( rc ){
+    *pRC = rc;
+    return;
+  }
+  for(i=idx+1; i<pPage->nCell; i++, ptr+=2){
+    ptr[0] = ptr[2];
+    ptr[1] = ptr[3];
+  }
+  pPage->nCell--;
+  put2byte(&data[hdr+3], pPage->nCell);
+  pPage->nFree += 2;
+}
+
+/*
+** Insert a new cell on pPage at cell index "i".  pCell points to the
+** content of the cell.
+**
+** If the cell content will fit on the page, then put it there.  If it
+** will not fit, then make a copy of the cell content into pTemp if
+** pTemp is not null.  Regardless of pTemp, allocate a new entry
+** in pPage->aOvfl[] and make it point to the cell content (either
+** in pTemp or the original pCell) and also record its index. 
+** Allocating a new entry in pPage->aCell[] implies that 
+** pPage->nOverflow is incremented.
+**
+** If nSkip is non-zero, then do not copy the first nSkip bytes of the
+** cell. The caller will overwrite them after this function returns. If
+** nSkip is non-zero, then pCell may not point to an invalid memory location 
+** (but pCell+nSkip is always valid).
+*/
+static void insertCell(
+  MemPage *pPage,   /* Page into which we are copying */
+  int i,            /* New cell becomes the i-th cell of the page */
+  u8 *pCell,        /* Content of the new cell */
+  int sz,           /* Bytes of content in pCell */
+  u8 *pTemp,        /* Temp storage space for pCell, if needed */
+  Pgno iChild,      /* If non-zero, replace first 4 bytes with this value */
+  int *pRC          /* Read and write return code from here */
+){
+  int idx = 0;      /* Where to write new cell content in data[] */
+  int j;            /* Loop counter */
+  int end;          /* First byte past the last cell pointer in data[] */
+  int ins;          /* Index in data[] where new cell pointer is inserted */
+  int cellOffset;   /* Address of first cell pointer in data[] */
+  u8 *data;         /* The content of the whole page */
+  u8 *ptr;          /* Used for moving information around in data[] */
+
+  int nSkip = (iChild ? 4 : 0);
+
+  if( *pRC ) return;
+
+  assert( i>=0 && i<=pPage->nCell+pPage->nOverflow );
+  assert( pPage->nCell<=MX_CELL(pPage->pBt) && MX_CELL(pPage->pBt)<=10921 );
+  assert( pPage->nOverflow<=ArraySize(pPage->aOvfl) );
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  /* The cell should normally be sized correctly.  However, when moving a
+  ** malformed cell from a leaf page to an interior page, if the cell size
+  ** wanted to be less than 4 but got rounded up to 4 on the leaf, then size
+  ** might be less than 8 (leaf-size + pointer) on the interior node.  Hence
+  ** the term after the || in the following assert(). */
+  assert( sz==cellSizePtr(pPage, pCell) || (sz==8 && iChild>0) );
+  if( pPage->nOverflow || sz+2>pPage->nFree ){
+    if( pTemp ){
+      memcpy(pTemp+nSkip, pCell+nSkip, sz-nSkip);
+      pCell = pTemp;
+    }
+    if( iChild ){
+      put4byte(pCell, iChild);
+    }
+    j = pPage->nOverflow++;
+    assert( j<(int)(sizeof(pPage->aOvfl)/sizeof(pPage->aOvfl[0])) );
+    pPage->aOvfl[j].pCell = pCell;
+    pPage->aOvfl[j].idx = (u16)i;
+  }else{
+    int rc = sqlite3PagerWrite(pPage->pDbPage);
+    if( rc!=SQLITE_OK ){
+      *pRC = rc;
+      return;
+    }
+    assert( sqlite3PagerIswriteable(pPage->pDbPage) );
+    data = pPage->aData;
+    cellOffset = pPage->cellOffset;
+    end = cellOffset + 2*pPage->nCell;
+    ins = cellOffset + 2*i;
+    rc = allocateSpace(pPage, sz, &idx);
+    if( rc ){ *pRC = rc; return; }
+    /* The allocateSpace() routine guarantees the following two properties
+    ** if it returns success */
+    assert( idx >= end+2 );
+    assert( idx+sz <= (int)pPage->pBt->usableSize );
+    pPage->nCell++;
+    pPage->nFree -= (u16)(2 + sz);
+    memcpy(&data[idx+nSkip], pCell+nSkip, sz-nSkip);
+    if( iChild ){
+      put4byte(&data[idx], iChild);
+    }
+    for(j=end, ptr=&data[j]; j>ins; j-=2, ptr-=2){
+      ptr[0] = ptr[-2];
+      ptr[1] = ptr[-1];
+    }
+    put2byte(&data[ins], idx);
+    put2byte(&data[pPage->hdrOffset+3], pPage->nCell);
+#ifndef SQLITE_OMIT_AUTOVACUUM
+    if( pPage->pBt->autoVacuum ){
+      /* The cell may contain a pointer to an overflow page. If so, write
+      ** the entry for the overflow page into the pointer map.
+      */
+      ptrmapPutOvflPtr(pPage, pCell, pRC);
+    }
+#endif
+  }
+}
+
+/*
+** Add a list of cells to a page.  The page should be initially empty.
+** The cells are guaranteed to fit on the page.
+*/
+static void assemblePage(
+  MemPage *pPage,   /* The page to be assemblied */
+  int nCell,        /* The number of cells to add to this page */
+  u8 **apCell,      /* Pointers to cell bodies */
+  u16 *aSize        /* Sizes of the cells */
+){
+  int i;            /* Loop counter */
+  u8 *pCellptr;     /* Address of next cell pointer */
+  int cellbody;     /* Address of next cell body */
+  u8 * const data = pPage->aData;             /* Pointer to data for pPage */
+  const int hdr = pPage->hdrOffset;           /* Offset of header on pPage */
+  const int nUsable = pPage->pBt->usableSize; /* Usable size of page */
+
+  assert( pPage->nOverflow==0 );
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  assert( nCell>=0 && nCell<=(int)MX_CELL(pPage->pBt)
+            && (int)MX_CELL(pPage->pBt)<=10921);
+  assert( sqlite3PagerIswriteable(pPage->pDbPage) );
+
+  /* Check that the page has just been zeroed by zeroPage() */
+  assert( pPage->nCell==0 );
+  assert( get2byteNotZero(&data[hdr+5])==nUsable );
+
+  pCellptr = &data[pPage->cellOffset + nCell*2];
+  cellbody = nUsable;
+  for(i=nCell-1; i>=0; i--){
+    pCellptr -= 2;
+    cellbody -= aSize[i];
+    put2byte(pCellptr, cellbody);
+    memcpy(&data[cellbody], apCell[i], aSize[i]);
+  }
+  put2byte(&data[hdr+3], nCell);
+  put2byte(&data[hdr+5], cellbody);
+  pPage->nFree -= (u16)(nCell*2 + nUsable - cellbody);
+  pPage->nCell = (u16)nCell;
+}
+
+/*
+** The following parameters determine how many adjacent pages get involved
+** in a balancing operation.  NN is the number of neighbors on either side
+** of the page that participate in the balancing operation.  NB is the
+** total number of pages that participate, including the target page and
+** NN neighbors on either side.
+**
+** The minimum value of NN is 1 (of course).  Increasing NN above 1
+** (to 2 or 3) gives a modest improvement in SELECT and DELETE performance
+** in exchange for a larger degradation in INSERT and UPDATE performance.
+** The value of NN appears to give the best results overall.
+*/
+#define NN 1             /* Number of neighbors on either side of pPage */
+#define NB (NN*2+1)      /* Total pages involved in the balance */
+
+
+#ifndef SQLITE_OMIT_QUICKBALANCE
+/*
+** This version of balance() handles the common special case where
+** a new entry is being inserted on the extreme right-end of the
+** tree, in other words, when the new entry will become the largest
+** entry in the tree.
+**
+** Instead of trying to balance the 3 right-most leaf pages, just add
+** a new page to the right-hand side and put the one new entry in
+** that page.  This leaves the right side of the tree somewhat
+** unbalanced.  But odds are that we will be inserting new entries
+** at the end soon afterwards so the nearly empty page will quickly
+** fill up.  On average.
+**
+** pPage is the leaf page which is the right-most page in the tree.
+** pParent is its parent.  pPage must have a single overflow entry
+** which is also the right-most entry on the page.
+**
+** The pSpace buffer is used to store a temporary copy of the divider
+** cell that will be inserted into pParent. Such a cell consists of a 4
+** byte page number followed by a variable length integer. In other
+** words, at most 13 bytes. Hence the pSpace buffer must be at
+** least 13 bytes in size.
+*/
+static int balance_quick(MemPage *pParent, MemPage *pPage, u8 *pSpace){
+  BtShared *const pBt = pPage->pBt;    /* B-Tree Database */
+  MemPage *pNew;                       /* Newly allocated page */
+  int rc;                              /* Return Code */
+  Pgno pgnoNew;                        /* Page number of pNew */
+
+  assert( sqlite3_mutex_held(pPage->pBt->mutex) );
+  assert( sqlite3PagerIswriteable(pParent->pDbPage) );
+  assert( pPage->nOverflow==1 );
+
+  /* This error condition is now caught prior to reaching this function */
+  if( pPage->nCell<=0 ) return SQLITE_CORRUPT_BKPT;
+
+  /* Allocate a new page. This page will become the right-sibling of 
+  ** pPage. Make the parent page writable, so that the new divider cell
+  ** may be inserted. If both these operations are successful, proceed.
+  */
+  rc = allocateBtreePage(pBt, &pNew, &pgnoNew, 0, 0);
+
+  if( rc==SQLITE_OK ){
+
+    u8 *pOut = &pSpace[4];
+    u8 *pCell = pPage->aOvfl[0].pCell;
+    u16 szCell = cellSizePtr(pPage, pCell);
+    u8 *pStop;
+
+    assert( sqlite3PagerIswriteable(pNew->pDbPage) );
+    assert( pPage->aData[0]==(PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF) );
+    zeroPage(pNew, PTF_INTKEY|PTF_LEAFDATA|PTF_LEAF);
+    assemblePage(pNew, 1, &pCell, &szCell);
+
+    /* If this is an auto-vacuum database, update the pointer map
+    ** with entries for the new page, and any pointer from the 
+    ** cell on the page to an overflow page. If either of these
+    ** operations fails, the return code is set, but the contents
+    ** of the parent page are still manipulated by thh code below.
+    ** That is Ok, at this point the parent page is guaranteed to
+    ** be marked as dirty. Returning an error code will cause a
+    ** rollback, undoing any changes made to the parent page.
+    */
+    if( ISAUTOVACUUM ){
+      ptrmapPut(pBt, pgnoNew, PTRMAP_BTREE, pParent->pgno, &rc);
+      if( szCell>pNew->minLocal ){
+        ptrmapPutOvflPtr(pNew, pCell, &rc);
+      }
+    }
+  
+    /* Create a divider cell to insert into pParent. The divider cell
+    ** consists of a 4-byte page number (the page number of pPage) and
+    ** a variable length key value (which must be the same value as the
+    ** largest key on pPage).
+    **
+    ** To find the largest key value on pPage, first find the right-most 
+    ** cell on pPage. The first two fields of this cell are the 
+    ** record-length (a variable length integer at most 32-bits in size)
+    ** and the key value (a variable length integer, may have any value).
+    ** The first of the while(...) loops below skips over the record-length
+    ** field. The second while(...) loop copies the key value from the
+    ** cell on pPage into the pSpace buffer.
+    */
+    pCell = findCell(pPage, pPage->nCell-1);
+    pStop = &pCell[9];
+    while( (*(pCell++)&0x80) && pCell<pStop );
+    pStop = &pCell[9];
+    while( ((*(pOut++) = *(pCell++))&0x80) && pCell<pStop );
+
+    /* Insert the new divider cell into pParent. */
+    insertCell(pParent, pParent->nCell, pSpace, (int)(pOut-pSpace),
+               0, pPage->pgno, &rc);
+
+    /* Set the right-child pointer of pParent to point to the new page. */
+    put4byte(&pParent->aData[pParent->hdrOffset+8], pgnoNew);
+  
+    /* Release the reference to the new page. */
+    releasePage(pNew);
+  }
+
+  return rc;
+}
+#endif /* SQLITE_OMIT_QUICKBALANCE */
+
+#if 0
+/*
+** This function does not contribute anything to the operation of SQLite.
+** it is sometimes activated temporarily while debugging code responsible 
+** for setting pointer-map entries.
+*/
+static int ptrmapCheckPages(MemPage **apPage, int nPage){
+  int i, j;
+  for(i=0; i<nPage; i++){
+    Pgno n;
+    u8 e;
+    MemPage *pPage = apPage[i];
+    BtShared *pBt = pPage->pBt;
+    assert( pPage->isInit );
+
+    for(j=0; j<pPage->nCell; j++){
+      CellInfo info;
+      u8 *z;
+     
+      z = findCell(pPage, j);
+      btreeParseCellPtr(pPage, z, &info);
+      if( info.iOverflow ){
+        Pgno ovfl = get4byte(&z[info.iOverflow]);
+        ptrmapGet(pBt, ovfl, &e, &n);
+        assert( n==pPage->pgno && e==PTRMAP_OVERFLOW1 );
+      }
+      if( !pPage->leaf ){
+        Pgno child = get4byte(z);
+        ptrmapGet(pBt, child, &e, &n);
+        assert( n==pPage->pgno && e==PTRMAP_BTREE );
+      }
+    }
+    if( !pPage->leaf ){
+      Pgno child = get4byte(&pPage->aData[pPage->hdrOffset+8]);
+      ptrmapGet(pBt, child, &e, &n);
+      assert( n==pPage->pgno && e==PTRMAP_BTREE );
+    }
+  }
+  return 1;
+}
+#endif
+
+/*
+** This function is used to copy the contents of the b-tree node stored 
+** on page pFrom to page pTo. If page pFrom was not a leaf page, then
+** the pointer-map entries for each child page are updated so that the
+** parent page stored in the pointer map is page pTo. If pFrom contained
+** any cells with overflow page pointers, then the corresponding pointer
+** map entries are also updated so that the parent page is page pTo.
+**
+** If pFrom is currently carrying any overflow cells (entries in the
+** MemPage.aOvfl[] array), they are not copied to pTo. 
+**
+** Before returning, page pTo is reinitialized using btreeInitPage().
+**
+** The performance of this function is not critical. It is only used by 
+** the balance_shallower() and balance_deeper() procedures, neither of
+** which are called often under normal circumstances.
+*/
+static void copyNodeContent(MemPage *pFrom, MemPage *pTo, int *pRC){
+  if( (*pRC)==SQLITE_OK ){
+    BtShared * const pBt = pFrom->pBt;
+    u8 * const aFrom = pFrom->aData;
+    u8 * const aTo = pTo->aData;
+    int const iFromHdr = pFrom->hdrOffset;
+    int const iToHdr = ((pTo->pgno==1) ? 100 : 0);
+    int rc;
+    int iData;
+  
+  
+    assert( pFrom->isInit );
+    assert( pFrom->nFree>=iToHdr );
+    assert( get2byte(&aFrom[iFromHdr+5]) <= (int)pBt->usableSize );
+  
+    /* Copy the b-tree node content from page pFrom to page pTo. */
+    iData = get2byte(&aFrom[iFromHdr+5]);
+    memcpy(&aTo[iData], &aFrom[iData], pBt->usableSize-iData);
+    memcpy(&aTo[iToHdr], &aFrom[iFromHdr], pFrom->cellOffset + 2*pFrom->nCell);
+  
+    /* Reinitialize page pTo so that the contents of the MemPage structure
+    ** match the new data. The initialization of pTo can actually fail under
+    ** fairly obscure circumstances, even though it is a copy of initialized 
+    ** page pFrom.
+    */
+    pTo->isInit = 0;
+    rc = btreeInitPage(pTo);
+    if( rc!=SQLITE_OK ){
+      *pRC = rc;
+      return;
+    }
+  
+    /* If this is an auto-vacuum database, update the pointer-map entries
+    ** for any b-tree or overflow pages that pTo now contains the pointers to.
+    */
+    if( ISAUTOVACUUM ){
+      *pRC = setChildPtrmaps(pTo);
+    }
+  }
+}
+
+/*
+** This routine redistributes cells on the iParentIdx'th child of pParent
+** (hereafter "the page") and up to 2 siblings so that all pages have about the
+** same amount of free space. Usually a single sibling on either side of the
+** page are used in the balancing, though both siblings might come from one
+** side if the page is the first or last child of its parent. If the page 
+** has fewer than 2 siblings (something which can only happen if the page
+** is a root page or a child of a root page) then all available siblings
+** participate in the balancing.
+**
+** The number of siblings of the page might be increased or decreased by 
+** one or two in an effort to keep pages nearly full but not over full. 
+**
+** Note that when this routine is called, some of the cells on the page
+** might not actually be stored in MemPage.aData[]. This can happen
+** if the page is overfull. This routine ensures that all cells allocated
+** to the page and its siblings fit into MemPage.aData[] before returning.
+**
+** In the course of balancing the page and its siblings, cells may be
+** inserted into or removed from the parent page (pParent). Doing so
+** may cause the parent page to become overfull or underfull. If this
+** happens, it is the responsibility of the caller to invoke the correct
+** balancing routine to fix this problem (see the balance() routine). 
+**
+** If this routine fails for any reason, it might leave the database
+** in a corrupted state. So if this routine fails, the database should
+** be rolled back.
+**
+** The third argument to this function, aOvflSpace, is a pointer to a
+** buffer big enough to hold one page. If while inserting cells into the parent
+** page (pParent) the parent page becomes overfull, this buffer is
+** used to store the parent's overflow cells. Because this function inserts
+** a maximum of four divider cells into the parent page, and the maximum
+** size of a cell stored within an internal node is always less than 1/4
+** of the page-size, the aOvflSpace[] buffer is guaranteed to be large
+** enough for all overflow cells.
+**
+** If aOvflSpace is set to a null pointer, this function returns 
+** SQLITE_NOMEM.
+*/
+static int balance_nonroot(
+  MemPage *pParent,               /* Parent page of siblings being balanced */
+  int iParentIdx,                 /* Index of "the page" in pParent */
+  u8 *aOvflSpace,                 /* page-size bytes of space for parent ovfl */
+  int isRoot                      /* True if pParent is a root-page */
+){
+  BtShared *pBt;               /* The whole database */
+  int nCell = 0;               /* Number of cells in apCell[] */
+  int nMaxCells = 0;           /* Allocated size of apCell, szCell, aFrom. */
+  int nNew = 0;                /* Number of pages in apNew[] */
+  int nOld;                    /* Number of pages in apOld[] */
+  int i, j, k;                 /* Loop counters */
+  int nxDiv;                   /* Next divider slot in pParent->aCell[] */
+  int rc = SQLITE_OK;          /* The return code */
+  u16 leafCorrection;          /* 4 if pPage is a leaf.  0 if not */
+  int leafData;                /* True if pPage is a leaf of a LEAFDATA tree */
+  int usableSpace;             /* Bytes in pPage beyond the header */
+  int pageFlags;               /* Value of pPage->aData[0] */
+  int subtotal;                /* Subtotal of bytes in cells on one page */
+  int iSpace1 = 0;             /* First unused byte of aSpace1[] */
+  int iOvflSpace = 0;          /* First unused byte of aOvflSpace[] */
+  int szScratch;               /* Size of scratch memory requested */
+  MemPage *apOld[NB];          /* pPage and up to two siblings */
+  MemPage *apCopy[NB];         /* Private copies of apOld[] pages */
+  MemPage *apNew[NB+2];        /* pPage and up to NB siblings after balancing */
+  u8 *pRight;                  /* Location in parent of right-sibling pointer */
+  u8 *apDiv[NB-1];             /* Divider cells in pParent */
+  int cntNew[NB+2];            /* Index in aCell[] of cell after i-th page */
+  int szNew[NB+2];             /* Combined size of cells place on i-th page */
+  u8 **apCell = 0;             /* All cells begin balanced */
+  u16 *szCell;                 /* Local size of all cells in apCell[] */
+  u8 *aSpace1;                 /* Space for copies of dividers cells */
+  Pgno pgno;                   /* Temp var to store a page number in */
+
+  pBt = pParent->pBt;
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  assert( sqlite3PagerIswriteable(pParent->pDbPage) );
+
+#if 0
+  TRACE(("BALANCE: begin page %d child of %d\n", pPage->pgno, pParent->pgno));
+#endif
+
+  /* At this point pParent may have at most one overflow cell. And if
+  ** this overflow cell is present, it must be the cell with 
+  ** index iParentIdx. This scenario comes about when this function
+  ** is called (indirectly) from sqlite3BtreeDelete().
+  */
+  assert( pParent->nOverflow==0 || pParent->nOverflow==1 );
+  assert( pParent->nOverflow==0 || pParent->aOvfl[0].idx==iParentIdx );
+
+  if( !aOvflSpace ){
+    return SQLITE_NOMEM;
+  }
+
+  /* Find the sibling pages to balance. Also locate the cells in pParent 
+  ** that divide the siblings. An attempt is made to find NN siblings on 
+  ** either side of pPage. More siblings are taken from one side, however, 
+  ** if there are fewer than NN siblings on the other side. If pParent
+  ** has NB or fewer children then all children of pParent are taken.  
+  **
+  ** This loop also drops the divider cells from the parent page. This
+  ** way, the remainder of the function does not have to deal with any
+  ** overflow cells in the parent page, since if any existed they will
+  ** have already been removed.
+  */
+  i = pParent->nOverflow + pParent->nCell;
+  if( i<2 ){
+    nxDiv = 0;
+    nOld = i+1;
+  }else{
+    nOld = 3;
+    if( iParentIdx==0 ){                 
+      nxDiv = 0;
+    }else if( iParentIdx==i ){
+      nxDiv = i-2;
+    }else{
+      nxDiv = iParentIdx-1;
+    }
+    i = 2;
+  }
+  if( (i+nxDiv-pParent->nOverflow)==pParent->nCell ){
+    pRight = &pParent->aData[pParent->hdrOffset+8];
+  }else{
+    pRight = findCell(pParent, i+nxDiv-pParent->nOverflow);
+  }
+  pgno = get4byte(pRight);
+  for(;;) {
+    rc = getAndInitPage(pBt, pgno, &apOld[i]);
+    if( rc ){
+      memset(apOld, 0, (i+1)*sizeof(MemPage*));
+      goto balance_cleanup;
+    }
+    nMaxCells += 1+apOld[i]->nCell+apOld[i]->nOverflow;
+    if( (i--)==0 ) break;
+
+    if( i+nxDiv==pParent->aOvfl[0].idx && pParent->nOverflow ){
+      apDiv[i] = pParent->aOvfl[0].pCell;
+      pgno = get4byte(apDiv[i]);
+      szNew[i] = cellSizePtr(pParent, apDiv[i]);
+      pParent->nOverflow = 0;
+    }else{
+      apDiv[i] = findCell(pParent, i+nxDiv-pParent->nOverflow);
+      pgno = get4byte(apDiv[i]);
+      szNew[i] = cellSizePtr(pParent, apDiv[i]);
+
+      /* Drop the cell from the parent page. apDiv[i] still points to
+      ** the cell within the parent, even though it has been dropped.
+      ** This is safe because dropping a cell only overwrites the first
+      ** four bytes of it, and this function does not need the first
+      ** four bytes of the divider cell. So the pointer is safe to use
+      ** later on.  
+      **
+      ** Unless SQLite is compiled in secure-delete mode. In this case,
+      ** the dropCell() routine will overwrite the entire cell with zeroes.
+      ** In this case, temporarily copy the cell into the aOvflSpace[]
+      ** buffer. It will be copied out again as soon as the aSpace[] buffer
+      ** is allocated.  */
+      if( pBt->secureDelete ){
+        int iOff = SQLITE_PTR_TO_INT(apDiv[i]) - SQLITE_PTR_TO_INT(pParent->aData);
+        if( (iOff+szNew[i])>(int)pBt->usableSize ){
+          rc = SQLITE_CORRUPT_BKPT;
+          memset(apOld, 0, (i+1)*sizeof(MemPage*));
+          goto balance_cleanup;
+        }else{
+          memcpy(&aOvflSpace[iOff], apDiv[i], szNew[i]);
+          apDiv[i] = &aOvflSpace[apDiv[i]-pParent->aData];
+        }
+      }
+      dropCell(pParent, i+nxDiv-pParent->nOverflow, szNew[i], &rc);
+    }
+  }
+
+  /* Make nMaxCells a multiple of 4 in order to preserve 8-byte
+  ** alignment */
+  nMaxCells = (nMaxCells + 3)&~3;
+
+  /*
+  ** Allocate space for memory structures
+  */
+  k = pBt->pageSize + ROUND8(sizeof(MemPage));
+  szScratch =
+       nMaxCells*sizeof(u8*)                       /* apCell */
+     + nMaxCells*sizeof(u16)                       /* szCell */
+     + pBt->pageSize                               /* aSpace1 */
+     + k*nOld;                                     /* Page copies (apCopy) */
+  apCell = sqlite3ScratchMalloc( szScratch ); 
+  if( apCell==0 ){
+    rc = SQLITE_NOMEM;
+    goto balance_cleanup;
+  }
+  szCell = (u16*)&apCell[nMaxCells];
+  aSpace1 = (u8*)&szCell[nMaxCells];
+  assert( EIGHT_BYTE_ALIGNMENT(aSpace1) );
+
+  /*
+  ** Load pointers to all cells on sibling pages and the divider cells
+  ** into the local apCell[] array.  Make copies of the divider cells
+  ** into space obtained from aSpace1[] and remove the the divider Cells
+  ** from pParent.
+  **
+  ** If the siblings are on leaf pages, then the child pointers of the
+  ** divider cells are stripped from the cells before they are copied
+  ** into aSpace1[].  In this way, all cells in apCell[] are without
+  ** child pointers.  If siblings are not leaves, then all cell in
+  ** apCell[] include child pointers.  Either way, all cells in apCell[]
+  ** are alike.
+  **
+  ** leafCorrection:  4 if pPage is a leaf.  0 if pPage is not a leaf.
+  **       leafData:  1 if pPage holds key+data and pParent holds only keys.
+  */
+  leafCorrection = apOld[0]->leaf*4;
+  leafData = apOld[0]->hasData;
+  for(i=0; i<nOld; i++){
+    int limit;
+    
+    /* Before doing anything else, take a copy of the i'th original sibling
+    ** The rest of this function will use data from the copies rather
+    ** that the original pages since the original pages will be in the
+    ** process of being overwritten.  */
+    MemPage *pOld = apCopy[i] = (MemPage*)&aSpace1[pBt->pageSize + k*i];
+    memcpy(pOld, apOld[i], sizeof(MemPage));
+    pOld->aData = (void*)&pOld[1];
+    memcpy(pOld->aData, apOld[i]->aData, pBt->pageSize);
+
+    limit = pOld->nCell+pOld->nOverflow;
+    for(j=0; j<limit; j++){
+      assert( nCell<nMaxCells );
+      apCell[nCell] = findOverflowCell(pOld, j);
+      szCell[nCell] = cellSizePtr(pOld, apCell[nCell]);
+      nCell++;
+    }
+    if( i<nOld-1 && !leafData){
+      u16 sz = (u16)szNew[i];
+      u8 *pTemp;
+      assert( nCell<nMaxCells );
+      szCell[nCell] = sz;
+      pTemp = &aSpace1[iSpace1];
+      iSpace1 += sz;
+      assert( sz<=pBt->maxLocal+23 );
+      assert( iSpace1 <= (int)pBt->pageSize );
+      memcpy(pTemp, apDiv[i], sz);
+      apCell[nCell] = pTemp+leafCorrection;
+      assert( leafCorrection==0 || leafCorrection==4 );
+      szCell[nCell] = szCell[nCell] - leafCorrection;
+      if( !pOld->leaf ){
+        assert( leafCorrection==0 );
+        assert( pOld->hdrOffset==0 );
+        /* The right pointer of the child page pOld becomes the left
+        ** pointer of the divider cell */
+        memcpy(apCell[nCell], &pOld->aData[8], 4);
+      }else{
+        assert( leafCorrection==4 );
+        if( szCell[nCell]<4 ){
+          /* Do not allow any cells smaller than 4 bytes. */
+          szCell[nCell] = 4;
+        }
+      }
+      nCell++;
+    }
+  }
+
+  /*
+  ** Figure out the number of pages needed to hold all nCell cells.
+  ** Store this number in "k".  Also compute szNew[] which is the total
+  ** size of all cells on the i-th page and cntNew[] which is the index
+  ** in apCell[] of the cell that divides page i from page i+1.  
+  ** cntNew[k] should equal nCell.
+  **
+  ** Values computed by this block:
+  **
+  **           k: The total number of sibling pages
+  **    szNew[i]: Spaced used on the i-th sibling page.
+  **   cntNew[i]: Index in apCell[] and szCell[] for the first cell to
+  **              the right of the i-th sibling page.
+  ** usableSpace: Number of bytes of space available on each sibling.
+  ** 
+  */
+  usableSpace = pBt->usableSize - 12 + leafCorrection;
+  for(subtotal=k=i=0; i<nCell; i++){
+    assert( i<nMaxCells );
+    subtotal += szCell[i] + 2;
+    if( subtotal > usableSpace ){
+      szNew[k] = subtotal - szCell[i];
+      cntNew[k] = i;
+      if( leafData ){ i--; }
+      subtotal = 0;
+      k++;
+      if( k>NB+1 ){ rc = SQLITE_CORRUPT_BKPT; goto balance_cleanup; }
+    }
+  }
+  szNew[k] = subtotal;
+  cntNew[k] = nCell;
+  k++;
+
+  /*
+  ** The packing computed by the previous block is biased toward the siblings
+  ** on the left side.  The left siblings are always nearly full, while the
+  ** right-most sibling might be nearly empty.  This block of code attempts
+  ** to adjust the packing of siblings to get a better balance.
+  **
+  ** This adjustment is more than an optimization.  The packing above might
+  ** be so out of balance as to be illegal.  For example, the right-most
+  ** sibling might be completely empty.  This adjustment is not optional.
+  */
+  for(i=k-1; i>0; i--){
+    int szRight = szNew[i];  /* Size of sibling on the right */
+    int szLeft = szNew[i-1]; /* Size of sibling on the left */
+    int r;              /* Index of right-most cell in left sibling */
+    int d;              /* Index of first cell to the left of right sibling */
+
+    r = cntNew[i-1] - 1;
+    d = r + 1 - leafData;
+    assert( d<nMaxCells );
+    assert( r<nMaxCells );
+    while( szRight==0 || szRight+szCell[d]+2<=szLeft-(szCell[r]+2) ){
+      szRight += szCell[d] + 2;
+      szLeft -= szCell[r] + 2;
+      cntNew[i-1]--;
+      r = cntNew[i-1] - 1;
+      d = r + 1 - leafData;
+    }
+    szNew[i] = szRight;
+    szNew[i-1] = szLeft;
+  }
+
+  /* Either we found one or more cells (cntnew[0])>0) or pPage is
+  ** a virtual root page.  A virtual root page is when the real root
+  ** page is page 1 and we are the only child of that page.
+  */
+  assert( cntNew[0]>0 || (pParent->pgno==1 && pParent->nCell==0) );
+
+  TRACE(("BALANCE: old: %d %d %d  ",
+    apOld[0]->pgno, 
+    nOld>=2 ? apOld[1]->pgno : 0,
+    nOld>=3 ? apOld[2]->pgno : 0
+  ));
+
+  /*
+  ** Allocate k new pages.  Reuse old pages where possible.
+  */
+  if( apOld[0]->pgno<=1 ){
+    rc = SQLITE_CORRUPT_BKPT;
+    goto balance_cleanup;
+  }
+  pageFlags = apOld[0]->aData[0];
+  for(i=0; i<k; i++){
+    MemPage *pNew;
+    if( i<nOld ){
+      pNew = apNew[i] = apOld[i];
+      apOld[i] = 0;
+      rc = sqlite3PagerWrite(pNew->pDbPage);
+      nNew++;
+      if( rc ) goto balance_cleanup;
+    }else{
+      assert( i>0 );
+      rc = allocateBtreePage(pBt, &pNew, &pgno, pgno, 0);
+      if( rc ) goto balance_cleanup;
+      apNew[i] = pNew;
+      nNew++;
+
+      /* Set the pointer-map entry for the new sibling page. */
+      if( ISAUTOVACUUM ){
+        ptrmapPut(pBt, pNew->pgno, PTRMAP_BTREE, pParent->pgno, &rc);
+        if( rc!=SQLITE_OK ){
+          goto balance_cleanup;
+        }
+      }
+    }
+  }
+
+  /* Free any old pages that were not reused as new pages.
+  */
+  while( i<nOld ){
+    freePage(apOld[i], &rc);
+    if( rc ) goto balance_cleanup;
+    releasePage(apOld[i]);
+    apOld[i] = 0;
+    i++;
+  }
+
+  /*
+  ** Put the new pages in accending order.  This helps to
+  ** keep entries in the disk file in order so that a scan
+  ** of the table is a linear scan through the file.  That
+  ** in turn helps the operating system to deliver pages
+  ** from the disk more rapidly.
+  **
+  ** An O(n^2) insertion sort algorithm is used, but since
+  ** n is never more than NB (a small constant), that should
+  ** not be a problem.
+  **
+  ** When NB==3, this one optimization makes the database
+  ** about 25% faster for large insertions and deletions.
+  */
+  for(i=0; i<k-1; i++){
+    int minV = apNew[i]->pgno;
+    int minI = i;
+    for(j=i+1; j<k; j++){
+      if( apNew[j]->pgno<(unsigned)minV ){
+        minI = j;
+        minV = apNew[j]->pgno;
+      }
+    }
+    if( minI>i ){
+      MemPage *pT;
+      pT = apNew[i];
+      apNew[i] = apNew[minI];
+      apNew[minI] = pT;
+    }
+  }
+  TRACE(("new: %d(%d) %d(%d) %d(%d) %d(%d) %d(%d)\n",
+    apNew[0]->pgno, szNew[0],
+    nNew>=2 ? apNew[1]->pgno : 0, nNew>=2 ? szNew[1] : 0,
+    nNew>=3 ? apNew[2]->pgno : 0, nNew>=3 ? szNew[2] : 0,
+    nNew>=4 ? apNew[3]->pgno : 0, nNew>=4 ? szNew[3] : 0,
+    nNew>=5 ? apNew[4]->pgno : 0, nNew>=5 ? szNew[4] : 0));
+
+  assert( sqlite3PagerIswriteable(pParent->pDbPage) );
+  put4byte(pRight, apNew[nNew-1]->pgno);
+
+  /*
+  ** Evenly distribute the data in apCell[] across the new pages.
+  ** Insert divider cells into pParent as necessary.
+  */
+  j = 0;
+  for(i=0; i<nNew; i++){
+    /* Assemble the new sibling page. */
+    MemPage *pNew = apNew[i];
+    assert( j<nMaxCells );
+    zeroPage(pNew, pageFlags);
+    assemblePage(pNew, cntNew[i]-j, &apCell[j], &szCell[j]);
+    assert( pNew->nCell>0 || (nNew==1 && cntNew[0]==0) );
+    assert( pNew->nOverflow==0 );
+
+    j = cntNew[i];
+
+    /* If the sibling page assembled above was not the right-most sibling,
+    ** insert a divider cell into the parent page.
+    */
+    assert( i<nNew-1 || j==nCell );
+    if( j<nCell ){
+      u8 *pCell;
+      u8 *pTemp;
+      int sz;
+
+      assert( j<nMaxCells );
+      pCell = apCell[j];
+      sz = szCell[j] + leafCorrection;
+      pTemp = &aOvflSpace[iOvflSpace];
+      if( !pNew->leaf ){
+        memcpy(&pNew->aData[8], pCell, 4);
+      }else if( leafData ){
+        /* If the tree is a leaf-data tree, and the siblings are leaves, 
+        ** then there is no divider cell in apCell[]. Instead, the divider 
+        ** cell consists of the integer key for the right-most cell of 
+        ** the sibling-page assembled above only.
+        */
+        CellInfo info;
+        j--;
+        btreeParseCellPtr(pNew, apCell[j], &info);
+        pCell = pTemp;
+        sz = 4 + putVarint(&pCell[4], info.nKey);
+        pTemp = 0;
+      }else{
+        pCell -= 4;
+        /* Obscure case for non-leaf-data trees: If the cell at pCell was
+        ** previously stored on a leaf node, and its reported size was 4
+        ** bytes, then it may actually be smaller than this 
+        ** (see btreeParseCellPtr(), 4 bytes is the minimum size of
+        ** any cell). But it is important to pass the correct size to 
+        ** insertCell(), so reparse the cell now.
+        **
+        ** Note that this can never happen in an SQLite data file, as all
+        ** cells are at least 4 bytes. It only happens in b-trees used
+        ** to evaluate "IN (SELECT ...)" and similar clauses.
+        */
+        if( szCell[j]==4 ){
+          assert(leafCorrection==4);
+          sz = cellSizePtr(pParent, pCell);
+        }
+      }
+      iOvflSpace += sz;
+      assert( sz<=pBt->maxLocal+23 );
+      assert( iOvflSpace <= (int)pBt->pageSize );
+      insertCell(pParent, nxDiv, pCell, sz, pTemp, pNew->pgno, &rc);
+      if( rc!=SQLITE_OK ) goto balance_cleanup;
+      assert( sqlite3PagerIswriteable(pParent->pDbPage) );
+
+      j++;
+      nxDiv++;
+    }
+  }
+  assert( j==nCell );
+  assert( nOld>0 );
+  assert( nNew>0 );
+  if( (pageFlags & PTF_LEAF)==0 ){
+    u8 *zChild = &apCopy[nOld-1]->aData[8];
+    memcpy(&apNew[nNew-1]->aData[8], zChild, 4);
+  }
+
+  if( isRoot && pParent->nCell==0 && pParent->hdrOffset<=apNew[0]->nFree ){
+    /* The root page of the b-tree now contains no cells. The only sibling
+    ** page is the right-child of the parent. Copy the contents of the
+    ** child page into the parent, decreasing the overall height of the
+    ** b-tree structure by one. This is described as the "balance-shallower"
+    ** sub-algorithm in some documentation.
+    **
+    ** If this is an auto-vacuum database, the call to copyNodeContent() 
+    ** sets all pointer-map entries corresponding to database image pages 
+    ** for which the pointer is stored within the content being copied.
+    **
+    ** The second assert below verifies that the child page is defragmented
+    ** (it must be, as it was just reconstructed using assemblePage()). This
+    ** is important if the parent page happens to be page 1 of the database
+    ** image.  */
+    assert( nNew==1 );
+    assert( apNew[0]->nFree == 
+        (get2byte(&apNew[0]->aData[5])-apNew[0]->cellOffset-apNew[0]->nCell*2) 
+    );
+    copyNodeContent(apNew[0], pParent, &rc);
+    freePage(apNew[0], &rc);
+  }else if( ISAUTOVACUUM ){
+    /* Fix the pointer-map entries for all the cells that were shifted around. 
+    ** There are several different types of pointer-map entries that need to
+    ** be dealt with by this routine. Some of these have been set already, but
+    ** many have not. The following is a summary:
+    **
+    **   1) The entries associated with new sibling pages that were not
+    **      siblings when this function was called. These have already
+    **      been set. We don't need to worry about old siblings that were
+    **      moved to the free-list - the freePage() code has taken care
+    **      of those.
+    **
+    **   2) The pointer-map entries associated with the first overflow
+    **      page in any overflow chains used by new divider cells. These 
+    **      have also already been taken care of by the insertCell() code.
+    **
+    **   3) If the sibling pages are not leaves, then the child pages of
+    **      cells stored on the sibling pages may need to be updated.
+    **
+    **   4) If the sibling pages are not internal intkey nodes, then any
+    **      overflow pages used by these cells may need to be updated
+    **      (internal intkey nodes never contain pointers to overflow pages).
+    **
+    **   5) If the sibling pages are not leaves, then the pointer-map
+    **      entries for the right-child pages of each sibling may need
+    **      to be updated.
+    **
+    ** Cases 1 and 2 are dealt with above by other code. The next
+    ** block deals with cases 3 and 4 and the one after that, case 5. Since
+    ** setting a pointer map entry is a relatively expensive operation, this
+    ** code only sets pointer map entries for child or overflow pages that have
+    ** actually moved between pages.  */
+    MemPage *pNew = apNew[0];
+    MemPage *pOld = apCopy[0];
+    int nOverflow = pOld->nOverflow;
+    int iNextOld = pOld->nCell + nOverflow;
+    int iOverflow = (nOverflow ? pOld->aOvfl[0].idx : -1);
+    j = 0;                             /* Current 'old' sibling page */
+    k = 0;                             /* Current 'new' sibling page */
+    for(i=0; i<nCell; i++){
+      int isDivider = 0;
+      while( i==iNextOld ){
+        /* Cell i is the cell immediately following the last cell on old
+        ** sibling page j. If the siblings are not leaf pages of an
+        ** intkey b-tree, then cell i was a divider cell. */
+        pOld = apCopy[++j];
+        iNextOld = i + !leafData + pOld->nCell + pOld->nOverflow;
+        if( pOld->nOverflow ){
+          nOverflow = pOld->nOverflow;
+          iOverflow = i + !leafData + pOld->aOvfl[0].idx;
+        }
+        isDivider = !leafData;  
+      }
+
+      assert(nOverflow>0 || iOverflow<i );
+      assert(nOverflow<2 || pOld->aOvfl[0].idx==pOld->aOvfl[1].idx-1);
+      assert(nOverflow<3 || pOld->aOvfl[1].idx==pOld->aOvfl[2].idx-1);
+      if( i==iOverflow ){
+        isDivider = 1;
+        if( (--nOverflow)>0 ){
+          iOverflow++;
+        }
+      }
+
+      if( i==cntNew[k] ){
+        /* Cell i is the cell immediately following the last cell on new
+        ** sibling page k. If the siblings are not leaf pages of an
+        ** intkey b-tree, then cell i is a divider cell.  */
+        pNew = apNew[++k];
+        if( !leafData ) continue;
+      }
+      assert( j<nOld );
+      assert( k<nNew );
+
+      /* If the cell was originally divider cell (and is not now) or
+      ** an overflow cell, or if the cell was located on a different sibling
+      ** page before the balancing, then the pointer map entries associated
+      ** with any child or overflow pages need to be updated.  */
+      if( isDivider || pOld->pgno!=pNew->pgno ){
+        if( !leafCorrection ){
+          ptrmapPut(pBt, get4byte(apCell[i]), PTRMAP_BTREE, pNew->pgno, &rc);
+        }
+        if( szCell[i]>pNew->minLocal ){
+          ptrmapPutOvflPtr(pNew, apCell[i], &rc);
+        }
+      }
+    }
+
+    if( !leafCorrection ){
+      for(i=0; i<nNew; i++){
+        u32 key = get4byte(&apNew[i]->aData[8]);
+        ptrmapPut(pBt, key, PTRMAP_BTREE, apNew[i]->pgno, &rc);
+      }
+    }
+
+#if 0
+    /* The ptrmapCheckPages() contains assert() statements that verify that
+    ** all pointer map pages are set correctly. This is helpful while 
+    ** debugging. This is usually disabled because a corrupt database may
+    ** cause an assert() statement to fail.  */
+    ptrmapCheckPages(apNew, nNew);
+    ptrmapCheckPages(&pParent, 1);
+#endif
+  }
+
+  assert( pParent->isInit );
+  TRACE(("BALANCE: finished: old=%d new=%d cells=%d\n",
+          nOld, nNew, nCell));
+
+  /*
+  ** Cleanup before returning.
+  */
+balance_cleanup:
+  sqlite3ScratchFree(apCell);
+  for(i=0; i<nOld; i++){
+    releasePage(apOld[i]);
+  }
+  for(i=0; i<nNew; i++){
+    releasePage(apNew[i]);
+  }
+
+  return rc;
+}
+
+
+/*
+** This function is called when the root page of a b-tree structure is
+** overfull (has one or more overflow pages).
+**
+** A new child page is allocated and the contents of the current root
+** page, including overflow cells, are copied into the child. The root
+** page is then overwritten to make it an empty page with the right-child 
+** pointer pointing to the new page.
+**
+** Before returning, all pointer-map entries corresponding to pages 
+** that the new child-page now contains pointers to are updated. The
+** entry corresponding to the new right-child pointer of the root
+** page is also updated.
+**
+** If successful, *ppChild is set to contain a reference to the child 
+** page and SQLITE_OK is returned. In this case the caller is required
+** to call releasePage() on *ppChild exactly once. If an error occurs,
+** an error code is returned and *ppChild is set to 0.
+*/
+static int balance_deeper(MemPage *pRoot, MemPage **ppChild){
+  int rc;                        /* Return value from subprocedures */
+  MemPage *pChild = 0;           /* Pointer to a new child page */
+  Pgno pgnoChild = 0;            /* Page number of the new child page */
+  BtShared *pBt = pRoot->pBt;    /* The BTree */
+
+  assert( pRoot->nOverflow>0 );
+  assert( sqlite3_mutex_held(pBt->mutex) );
+
+  /* Make pRoot, the root page of the b-tree, writable. Allocate a new 
+  ** page that will become the new right-child of pPage. Copy the contents
+  ** of the node stored on pRoot into the new child page.
+  */
+  rc = sqlite3PagerWrite(pRoot->pDbPage);
+  if( rc==SQLITE_OK ){
+    rc = allocateBtreePage(pBt,&pChild,&pgnoChild,pRoot->pgno,0);
+    copyNodeContent(pRoot, pChild, &rc);
+    if( ISAUTOVACUUM ){
+      ptrmapPut(pBt, pgnoChild, PTRMAP_BTREE, pRoot->pgno, &rc);
+    }
+  }
+  if( rc ){
+    *ppChild = 0;
+    releasePage(pChild);
+    return rc;
+  }
+  assert( sqlite3PagerIswriteable(pChild->pDbPage) );
+  assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
+  assert( pChild->nCell==pRoot->nCell );
+
+  TRACE(("BALANCE: copy root %d into %d\n", pRoot->pgno, pChild->pgno));
+
+  /* Copy the overflow cells from pRoot to pChild */
+  memcpy(pChild->aOvfl, pRoot->aOvfl, pRoot->nOverflow*sizeof(pRoot->aOvfl[0]));
+  pChild->nOverflow = pRoot->nOverflow;
+
+  /* Zero the contents of pRoot. Then install pChild as the right-child. */
+  zeroPage(pRoot, pChild->aData[0] & ~PTF_LEAF);
+  put4byte(&pRoot->aData[pRoot->hdrOffset+8], pgnoChild);
+
+  *ppChild = pChild;
+  return SQLITE_OK;
+}
+
+/*
+** The page that pCur currently points to has just been modified in
+** some way. This function figures out if this modification means the
+** tree needs to be balanced, and if so calls the appropriate balancing 
+** routine. Balancing routines are:
+**
+**   balance_quick()
+**   balance_deeper()
+**   balance_nonroot()
+*/
+static int balance(BtCursor *pCur){
+  int rc = SQLITE_OK;
+  const int nMin = pCur->pBt->usableSize * 2 / 3;
+  u8 aBalanceQuickSpace[13];
+  u8 *pFree = 0;
+
+  TESTONLY( int balance_quick_called = 0 );
+  TESTONLY( int balance_deeper_called = 0 );
+
+  do {
+    int iPage = pCur->iPage;
+    MemPage *pPage = pCur->apPage[iPage];
+
+    if( iPage==0 ){
+      if( pPage->nOverflow ){
+        /* The root page of the b-tree is overfull. In this case call the
+        ** balance_deeper() function to create a new child for the root-page
+        ** and copy the current contents of the root-page to it. The
+        ** next iteration of the do-loop will balance the child page.
+        */ 
+        assert( (balance_deeper_called++)==0 );
+        rc = balance_deeper(pPage, &pCur->apPage[1]);
+        if( rc==SQLITE_OK ){
+          pCur->iPage = 1;
+          pCur->aiIdx[0] = 0;
+          pCur->aiIdx[1] = 0;
+          assert( pCur->apPage[1]->nOverflow );
+        }
+      }else{
+        break;
+      }
+    }else if( pPage->nOverflow==0 && pPage->nFree<=nMin ){
+      break;
+    }else{
+      MemPage * const pParent = pCur->apPage[iPage-1];
+      int const iIdx = pCur->aiIdx[iPage-1];
+
+      rc = sqlite3PagerWrite(pParent->pDbPage);
+      if( rc==SQLITE_OK ){
+#ifndef SQLITE_OMIT_QUICKBALANCE
+        if( pPage->hasData
+         && pPage->nOverflow==1
+         && pPage->aOvfl[0].idx==pPage->nCell
+         && pParent->pgno!=1
+         && pParent->nCell==iIdx
+        ){
+          /* Call balance_quick() to create a new sibling of pPage on which
+          ** to store the overflow cell. balance_quick() inserts a new cell
+          ** into pParent, which may cause pParent overflow. If this
+          ** happens, the next interation of the do-loop will balance pParent 
+          ** use either balance_nonroot() or balance_deeper(). Until this
+          ** happens, the overflow cell is stored in the aBalanceQuickSpace[]
+          ** buffer. 
+          **
+          ** The purpose of the following assert() is to check that only a
+          ** single call to balance_quick() is made for each call to this
+          ** function. If this were not verified, a subtle bug involving reuse
+          ** of the aBalanceQuickSpace[] might sneak in.
+          */
+          assert( (balance_quick_called++)==0 );
+          rc = balance_quick(pParent, pPage, aBalanceQuickSpace);
+        }else
+#endif
+        {
+          /* In this case, call balance_nonroot() to redistribute cells
+          ** between pPage and up to 2 of its sibling pages. This involves
+          ** modifying the contents of pParent, which may cause pParent to
+          ** become overfull or underfull. The next iteration of the do-loop
+          ** will balance the parent page to correct this.
+          ** 
+          ** If the parent page becomes overfull, the overflow cell or cells
+          ** are stored in the pSpace buffer allocated immediately below. 
+          ** A subsequent iteration of the do-loop will deal with this by
+          ** calling balance_nonroot() (balance_deeper() may be called first,
+          ** but it doesn't deal with overflow cells - just moves them to a
+          ** different page). Once this subsequent call to balance_nonroot() 
+          ** has completed, it is safe to release the pSpace buffer used by
+          ** the previous call, as the overflow cell data will have been 
+          ** copied either into the body of a database page or into the new
+          ** pSpace buffer passed to the latter call to balance_nonroot().
+          */
+          u8 *pSpace = sqlite3PageMalloc(pCur->pBt->pageSize);
+          rc = balance_nonroot(pParent, iIdx, pSpace, iPage==1);
+          if( pFree ){
+            /* If pFree is not NULL, it points to the pSpace buffer used 
+            ** by a previous call to balance_nonroot(). Its contents are
+            ** now stored either on real database pages or within the 
+            ** new pSpace buffer, so it may be safely freed here. */
+            sqlite3PageFree(pFree);
+          }
+
+          /* The pSpace buffer will be freed after the next call to
+          ** balance_nonroot(), or just before this function returns, whichever
+          ** comes first. */
+          pFree = pSpace;
+        }
+      }
+
+      pPage->nOverflow = 0;
+
+      /* The next iteration of the do-loop balances the parent page. */
+      releasePage(pPage);
+      pCur->iPage--;
+    }
+  }while( rc==SQLITE_OK );
+
+  if( pFree ){
+    sqlite3PageFree(pFree);
+  }
+  return rc;
+}
+
+
+/*
+** Insert a new record into the BTree.  The key is given by (pKey,nKey)
+** and the data is given by (pData,nData).  The cursor is used only to
+** define what table the record should be inserted into.  The cursor
+** is left pointing at a random location.
+**
+** For an INTKEY table, only the nKey value of the key is used.  pKey is
+** ignored.  For a ZERODATA table, the pData and nData are both ignored.
+**
+** If the seekResult parameter is non-zero, then a successful call to
+** MovetoUnpacked() to seek cursor pCur to (pKey, nKey) has already
+** been performed. seekResult is the search result returned (a negative
+** number if pCur points at an entry that is smaller than (pKey, nKey), or
+** a positive value if pCur points at an etry that is larger than 
+** (pKey, nKey)). 
+**
+** If the seekResult parameter is non-zero, then the caller guarantees that
+** cursor pCur is pointing at the existing copy of a row that is to be
+** overwritten.  If the seekResult parameter is 0, then cursor pCur may
+** point to any entry or to no entry at all and so this function has to seek
+** the cursor before the new key can be inserted.
+*/
+SQLITE_PRIVATE int sqlite3BtreeInsert(
+  BtCursor *pCur,                /* Insert data into the table of this cursor */
+  const void *pKey, i64 nKey,    /* The key of the new record */
+  const void *pData, int nData,  /* The data of the new record */
+  int nZero,                     /* Number of extra 0 bytes to append to data */
+  int appendBias,                /* True if this is likely an append */
+  int seekResult                 /* Result of prior MovetoUnpacked() call */
+){
+  int rc;
+  int loc = seekResult;          /* -1: before desired location  +1: after */
+  int szNew = 0;
+  int idx;
+  MemPage *pPage;
+  Btree *p = pCur->pBtree;
+  BtShared *pBt = p->pBt;
+  unsigned char *oldCell;
+  unsigned char *newCell = 0;
+
+  if( pCur->eState==CURSOR_FAULT ){
+    assert( pCur->skipNext!=SQLITE_OK );
+    return pCur->skipNext;
+  }
+
+  assert( cursorHoldsMutex(pCur) );
+  assert( pCur->wrFlag && pBt->inTransaction==TRANS_WRITE && !pBt->readOnly );
+  assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) );
+
+  /* Assert that the caller has been consistent. If this cursor was opened
+  ** expecting an index b-tree, then the caller should be inserting blob
+  ** keys with no associated data. If the cursor was opened expecting an
+  ** intkey table, the caller should be inserting integer keys with a
+  ** blob of associated data.  */
+  assert( (pKey==0)==(pCur->pKeyInfo==0) );
+
+  /* If this is an insert into a table b-tree, invalidate any incrblob 
+  ** cursors open on the row being replaced (assuming this is a replace
+  ** operation - if it is not, the following is a no-op).  */
+  if( pCur->pKeyInfo==0 ){
+    invalidateIncrblobCursors(p, nKey, 0);
+  }
+
+  /* Save the positions of any other cursors open on this table.
+  **
+  ** In some cases, the call to btreeMoveto() below is a no-op. For
+  ** example, when inserting data into a table with auto-generated integer
+  ** keys, the VDBE layer invokes sqlite3BtreeLast() to figure out the 
+  ** integer key to use. It then calls this function to actually insert the 
+  ** data into the intkey B-Tree. In this case btreeMoveto() recognizes
+  ** that the cursor is already where it needs to be and returns without
+  ** doing any work. To avoid thwarting these optimizations, it is important
+  ** not to clear the cursor here.
+  */
+  rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
+  if( rc ) return rc;
+  if( !loc ){
+    rc = btreeMoveto(pCur, pKey, nKey, appendBias, &loc);
+    if( rc ) return rc;
+  }
+  assert( pCur->eState==CURSOR_VALID || (pCur->eState==CURSOR_INVALID && loc) );
+
+  pPage = pCur->apPage[pCur->iPage];
+  assert( pPage->intKey || nKey>=0 );
+  assert( pPage->leaf || !pPage->intKey );
+
+  TRACE(("INSERT: table=%d nkey=%lld ndata=%d page=%d %s\n",
+          pCur->pgnoRoot, nKey, nData, pPage->pgno,
+          loc==0 ? "overwrite" : "new entry"));
+  assert( pPage->isInit );
+  allocateTempSpace(pBt);
+  newCell = pBt->pTmpSpace;
+  if( newCell==0 ) return SQLITE_NOMEM;
+  rc = fillInCell(pPage, newCell, pKey, nKey, pData, nData, nZero, &szNew);
+  if( rc ) goto end_insert;
+  assert( szNew==cellSizePtr(pPage, newCell) );
+  assert( szNew <= MX_CELL_SIZE(pBt) );
+  idx = pCur->aiIdx[pCur->iPage];
+  if( loc==0 ){
+    u16 szOld;
+    assert( idx<pPage->nCell );
+    rc = sqlite3PagerWrite(pPage->pDbPage);
+    if( rc ){
+      goto end_insert;
+    }
+    oldCell = findCell(pPage, idx);
+    if( !pPage->leaf ){
+      memcpy(newCell, oldCell, 4);
+    }
+    szOld = cellSizePtr(pPage, oldCell);
+    rc = clearCell(pPage, oldCell);
+    dropCell(pPage, idx, szOld, &rc);
+    if( rc ) goto end_insert;
+  }else if( loc<0 && pPage->nCell>0 ){
+    assert( pPage->leaf );
+    idx = ++pCur->aiIdx[pCur->iPage];
+  }else{
+    assert( pPage->leaf );
+  }
+  insertCell(pPage, idx, newCell, szNew, 0, 0, &rc);
+  assert( rc!=SQLITE_OK || pPage->nCell>0 || pPage->nOverflow>0 );
+
+  /* If no error has occured and pPage has an overflow cell, call balance() 
+  ** to redistribute the cells within the tree. Since balance() may move
+  ** the cursor, zero the BtCursor.info.nSize and BtCursor.validNKey
+  ** variables.
+  **
+  ** Previous versions of SQLite called moveToRoot() to move the cursor
+  ** back to the root page as balance() used to invalidate the contents
+  ** of BtCursor.apPage[] and BtCursor.aiIdx[]. Instead of doing that,
+  ** set the cursor state to "invalid". This makes common insert operations
+  ** slightly faster.
+  **
+  ** There is a subtle but important optimization here too. When inserting
+  ** multiple records into an intkey b-tree using a single cursor (as can
+  ** happen while processing an "INSERT INTO ... SELECT" statement), it
+  ** is advantageous to leave the cursor pointing to the last entry in
+  ** the b-tree if possible. If the cursor is left pointing to the last
+  ** entry in the table, and the next row inserted has an integer key
+  ** larger than the largest existing key, it is possible to insert the
+  ** row without seeking the cursor. This can be a big performance boost.
+  */
+  pCur->info.nSize = 0;
+  pCur->validNKey = 0;
+  if( rc==SQLITE_OK && pPage->nOverflow ){
+    rc = balance(pCur);
+
+    /* Must make sure nOverflow is reset to zero even if the balance()
+    ** fails. Internal data structure corruption will result otherwise. 
+    ** Also, set the cursor state to invalid. This stops saveCursorPosition()
+    ** from trying to save the current position of the cursor.  */
+    pCur->apPage[pCur->iPage]->nOverflow = 0;
+    pCur->eState = CURSOR_INVALID;
+  }
+  assert( pCur->apPage[pCur->iPage]->nOverflow==0 );
+
+end_insert:
+  return rc;
+}
+
+/*
+** Delete the entry that the cursor is pointing to.  The cursor
+** is left pointing at a arbitrary location.
+*/
+SQLITE_PRIVATE int sqlite3BtreeDelete(BtCursor *pCur){
+  Btree *p = pCur->pBtree;
+  BtShared *pBt = p->pBt;              
+  int rc;                              /* Return code */
+  MemPage *pPage;                      /* Page to delete cell from */
+  unsigned char *pCell;                /* Pointer to cell to delete */
+  int iCellIdx;                        /* Index of cell to delete */
+  int iCellDepth;                      /* Depth of node containing pCell */ 
+
+  assert( cursorHoldsMutex(pCur) );
+  assert( pBt->inTransaction==TRANS_WRITE );
+  assert( !pBt->readOnly );
+  assert( pCur->wrFlag );
+  assert( hasSharedCacheTableLock(p, pCur->pgnoRoot, pCur->pKeyInfo!=0, 2) );
+  assert( !hasReadConflicts(p, pCur->pgnoRoot) );
+
+  if( NEVER(pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell) 
+   || NEVER(pCur->eState!=CURSOR_VALID)
+  ){
+    return SQLITE_ERROR;  /* Something has gone awry. */
+  }
+
+  /* If this is a delete operation to remove a row from a table b-tree,
+  ** invalidate any incrblob cursors open on the row being deleted.  */
+  if( pCur->pKeyInfo==0 ){
+    invalidateIncrblobCursors(p, pCur->info.nKey, 0);
+  }
+
+  iCellDepth = pCur->iPage;
+  iCellIdx = pCur->aiIdx[iCellDepth];
+  pPage = pCur->apPage[iCellDepth];
+  pCell = findCell(pPage, iCellIdx);
+
+  /* If the page containing the entry to delete is not a leaf page, move
+  ** the cursor to the largest entry in the tree that is smaller than
+  ** the entry being deleted. This cell will replace the cell being deleted
+  ** from the internal node. The 'previous' entry is used for this instead
+  ** of the 'next' entry, as the previous entry is always a part of the
+  ** sub-tree headed by the child page of the cell being deleted. This makes
+  ** balancing the tree following the delete operation easier.  */
+  if( !pPage->leaf ){
+    int notUsed;
+    rc = sqlite3BtreePrevious(pCur, &notUsed);
+    if( rc ) return rc;
+  }
+
+  /* Save the positions of any other cursors open on this table before
+  ** making any modifications. Make the page containing the entry to be 
+  ** deleted writable. Then free any overflow pages associated with the 
+  ** entry and finally remove the cell itself from within the page.  
+  */
+  rc = saveAllCursors(pBt, pCur->pgnoRoot, pCur);
+  if( rc ) return rc;
+  rc = sqlite3PagerWrite(pPage->pDbPage);
+  if( rc ) return rc;
+  rc = clearCell(pPage, pCell);
+  dropCell(pPage, iCellIdx, cellSizePtr(pPage, pCell), &rc);
+  if( rc ) return rc;
+
+  /* If the cell deleted was not located on a leaf page, then the cursor
+  ** is currently pointing to the largest entry in the sub-tree headed
+  ** by the child-page of the cell that was just deleted from an internal
+  ** node. The cell from the leaf node needs to be moved to the internal
+  ** node to replace the deleted cell.  */
+  if( !pPage->leaf ){
+    MemPage *pLeaf = pCur->apPage[pCur->iPage];
+    int nCell;
+    Pgno n = pCur->apPage[iCellDepth+1]->pgno;
+    unsigned char *pTmp;
+
+    pCell = findCell(pLeaf, pLeaf->nCell-1);
+    nCell = cellSizePtr(pLeaf, pCell);
+    assert( MX_CELL_SIZE(pBt) >= nCell );
+
+    allocateTempSpace(pBt);
+    pTmp = pBt->pTmpSpace;
+
+    rc = sqlite3PagerWrite(pLeaf->pDbPage);
+    insertCell(pPage, iCellIdx, pCell-4, nCell+4, pTmp, n, &rc);
+    dropCell(pLeaf, pLeaf->nCell-1, nCell, &rc);
+    if( rc ) return rc;
+  }
+
+  /* Balance the tree. If the entry deleted was located on a leaf page,
+  ** then the cursor still points to that page. In this case the first
+  ** call to balance() repairs the tree, and the if(...) condition is
+  ** never true.
+  **
+  ** Otherwise, if the entry deleted was on an internal node page, then
+  ** pCur is pointing to the leaf page from which a cell was removed to
+  ** replace the cell deleted from the internal node. This is slightly
+  ** tricky as the leaf node may be underfull, and the internal node may
+  ** be either under or overfull. In this case run the balancing algorithm
+  ** on the leaf node first. If the balance proceeds far enough up the
+  ** tree that we can be sure that any problem in the internal node has
+  ** been corrected, so be it. Otherwise, after balancing the leaf node,
+  ** walk the cursor up the tree to the internal node and balance it as 
+  ** well.  */
+  rc = balance(pCur);
+  if( rc==SQLITE_OK && pCur->iPage>iCellDepth ){
+    while( pCur->iPage>iCellDepth ){
+      releasePage(pCur->apPage[pCur->iPage--]);
+    }
+    rc = balance(pCur);
+  }
+
+  if( rc==SQLITE_OK ){
+    moveToRoot(pCur);
+  }
+  return rc;
+}
+
+/*
+** Create a new BTree table.  Write into *piTable the page
+** number for the root page of the new table.
+**
+** The type of type is determined by the flags parameter.  Only the
+** following values of flags are currently in use.  Other values for
+** flags might not work:
+**
+**     BTREE_INTKEY|BTREE_LEAFDATA     Used for SQL tables with rowid keys
+**     BTREE_ZERODATA                  Used for SQL indices
+*/
+static int btreeCreateTable(Btree *p, int *piTable, int createTabFlags){
+  BtShared *pBt = p->pBt;
+  MemPage *pRoot;
+  Pgno pgnoRoot;
+  int rc;
+  int ptfFlags;          /* Page-type flage for the root page of new table */
+
+  assert( sqlite3BtreeHoldsMutex(p) );
+  assert( pBt->inTransaction==TRANS_WRITE );
+  assert( !pBt->readOnly );
+
+#ifdef SQLITE_OMIT_AUTOVACUUM
+  rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);
+  if( rc ){
+    return rc;
+  }
+#else
+  if( pBt->autoVacuum ){
+    Pgno pgnoMove;      /* Move a page here to make room for the root-page */
+    MemPage *pPageMove; /* The page to move to. */
+
+    /* Creating a new table may probably require moving an existing database
+    ** to make room for the new tables root page. In case this page turns
+    ** out to be an overflow page, delete all overflow page-map caches
+    ** held by open cursors.
+    */
+    invalidateAllOverflowCache(pBt);
+
+    /* Read the value of meta[3] from the database to determine where the
+    ** root page of the new table should go. meta[3] is the largest root-page
+    ** created so far, so the new root-page is (meta[3]+1).
+    */
+    sqlite3BtreeGetMeta(p, BTREE_LARGEST_ROOT_PAGE, &pgnoRoot);
+    pgnoRoot++;
+
+    /* The new root-page may not be allocated on a pointer-map page, or the
+    ** PENDING_BYTE page.
+    */
+    while( pgnoRoot==PTRMAP_PAGENO(pBt, pgnoRoot) ||
+        pgnoRoot==PENDING_BYTE_PAGE(pBt) ){
+      pgnoRoot++;
+    }
+    assert( pgnoRoot>=3 );
+
+    /* Allocate a page. The page that currently resides at pgnoRoot will
+    ** be moved to the allocated page (unless the allocated page happens
+    ** to reside at pgnoRoot).
+    */
+    rc = allocateBtreePage(pBt, &pPageMove, &pgnoMove, pgnoRoot, 1);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+
+    if( pgnoMove!=pgnoRoot ){
+      /* pgnoRoot is the page that will be used for the root-page of
+      ** the new table (assuming an error did not occur). But we were
+      ** allocated pgnoMove. If required (i.e. if it was not allocated
+      ** by extending the file), the current page at position pgnoMove
+      ** is already journaled.
+      */
+      u8 eType = 0;
+      Pgno iPtrPage = 0;
+
+      releasePage(pPageMove);
+
+      /* Move the page currently at pgnoRoot to pgnoMove. */
+      rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+      rc = ptrmapGet(pBt, pgnoRoot, &eType, &iPtrPage);
+      if( eType==PTRMAP_ROOTPAGE || eType==PTRMAP_FREEPAGE ){
+        rc = SQLITE_CORRUPT_BKPT;
+      }
+      if( rc!=SQLITE_OK ){
+        releasePage(pRoot);
+        return rc;
+      }
+      assert( eType!=PTRMAP_ROOTPAGE );
+      assert( eType!=PTRMAP_FREEPAGE );
+      rc = relocatePage(pBt, pRoot, eType, iPtrPage, pgnoMove, 0);
+      releasePage(pRoot);
+
+      /* Obtain the page at pgnoRoot */
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+      rc = btreeGetPage(pBt, pgnoRoot, &pRoot, 0);
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+      rc = sqlite3PagerWrite(pRoot->pDbPage);
+      if( rc!=SQLITE_OK ){
+        releasePage(pRoot);
+        return rc;
+      }
+    }else{
+      pRoot = pPageMove;
+    } 
+
+    /* Update the pointer-map and meta-data with the new root-page number. */
+    ptrmapPut(pBt, pgnoRoot, PTRMAP_ROOTPAGE, 0, &rc);
+    if( rc ){
+      releasePage(pRoot);
+      return rc;
+    }
+
+    /* When the new root page was allocated, page 1 was made writable in
+    ** order either to increase the database filesize, or to decrement the
+    ** freelist count.  Hence, the sqlite3BtreeUpdateMeta() call cannot fail.
+    */
+    assert( sqlite3PagerIswriteable(pBt->pPage1->pDbPage) );
+    rc = sqlite3BtreeUpdateMeta(p, 4, pgnoRoot);
+    if( NEVER(rc) ){
+      releasePage(pRoot);
+      return rc;
+    }
+
+  }else{
+    rc = allocateBtreePage(pBt, &pRoot, &pgnoRoot, 1, 0);
+    if( rc ) return rc;
+  }
+#endif
+  assert( sqlite3PagerIswriteable(pRoot->pDbPage) );
+  if( createTabFlags & BTREE_INTKEY ){
+    ptfFlags = PTF_INTKEY | PTF_LEAFDATA | PTF_LEAF;
+  }else{
+    ptfFlags = PTF_ZERODATA | PTF_LEAF;
+  }
+  zeroPage(pRoot, ptfFlags);
+  sqlite3PagerUnref(pRoot->pDbPage);
+  assert( (pBt->openFlags & BTREE_SINGLE)==0 || pgnoRoot==2 );
+  *piTable = (int)pgnoRoot;
+  return SQLITE_OK;
+}
+SQLITE_PRIVATE int sqlite3BtreeCreateTable(Btree *p, int *piTable, int flags){
+  int rc;
+  sqlite3BtreeEnter(p);
+  rc = btreeCreateTable(p, piTable, flags);
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+/*
+** Erase the given database page and all its children.  Return
+** the page to the freelist.
+*/
+static int clearDatabasePage(
+  BtShared *pBt,           /* The BTree that contains the table */
+  Pgno pgno,               /* Page number to clear */
+  int freePageFlag,        /* Deallocate page if true */
+  int *pnChange            /* Add number of Cells freed to this counter */
+){
+  MemPage *pPage;
+  int rc;
+  unsigned char *pCell;
+  int i;
+
+  assert( sqlite3_mutex_held(pBt->mutex) );
+  if( pgno>btreePagecount(pBt) ){
+    return SQLITE_CORRUPT_BKPT;
+  }
+
+  rc = getAndInitPage(pBt, pgno, &pPage);
+  if( rc ) return rc;
+  for(i=0; i<pPage->nCell; i++){
+    pCell = findCell(pPage, i);
+    if( !pPage->leaf ){
+      rc = clearDatabasePage(pBt, get4byte(pCell), 1, pnChange);
+      if( rc ) goto cleardatabasepage_out;
+    }
+    rc = clearCell(pPage, pCell);
+    if( rc ) goto cleardatabasepage_out;
+  }
+  if( !pPage->leaf ){
+    rc = clearDatabasePage(pBt, get4byte(&pPage->aData[8]), 1, pnChange);
+    if( rc ) goto cleardatabasepage_out;
+  }else if( pnChange ){
+    assert( pPage->intKey );
+    *pnChange += pPage->nCell;
+  }
+  if( freePageFlag ){
+    freePage(pPage, &rc);
+  }else if( (rc = sqlite3PagerWrite(pPage->pDbPage))==0 ){
+    zeroPage(pPage, pPage->aData[0] | PTF_LEAF);
+  }
+
+cleardatabasepage_out:
+  releasePage(pPage);
+  return rc;
+}
+
+/*
+** Delete all information from a single table in the database.  iTable is
+** the page number of the root of the table.  After this routine returns,
+** the root page is empty, but still exists.
+**
+** This routine will fail with SQLITE_LOCKED if there are any open
+** read cursors on the table.  Open write cursors are moved to the
+** root of the table.
+**
+** If pnChange is not NULL, then table iTable must be an intkey table. The
+** integer value pointed to by pnChange is incremented by the number of
+** entries in the table.
+*/
+SQLITE_PRIVATE int sqlite3BtreeClearTable(Btree *p, int iTable, int *pnChange){
+  int rc;
+  BtShared *pBt = p->pBt;
+  sqlite3BtreeEnter(p);
+  assert( p->inTrans==TRANS_WRITE );
+
+  /* Invalidate all incrblob cursors open on table iTable (assuming iTable
+  ** is the root of a table b-tree - if it is not, the following call is
+  ** a no-op).  */
+  invalidateIncrblobCursors(p, 0, 1);
+
+  rc = saveAllCursors(pBt, (Pgno)iTable, 0);
+  if( SQLITE_OK==rc ){
+    rc = clearDatabasePage(pBt, (Pgno)iTable, 0, pnChange);
+  }
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+/*
+** Erase all information in a table and add the root of the table to
+** the freelist.  Except, the root of the principle table (the one on
+** page 1) is never added to the freelist.
+**
+** This routine will fail with SQLITE_LOCKED if there are any open
+** cursors on the table.
+**
+** If AUTOVACUUM is enabled and the page at iTable is not the last
+** root page in the database file, then the last root page 
+** in the database file is moved into the slot formerly occupied by
+** iTable and that last slot formerly occupied by the last root page
+** is added to the freelist instead of iTable.  In this say, all
+** root pages are kept at the beginning of the database file, which
+** is necessary for AUTOVACUUM to work right.  *piMoved is set to the 
+** page number that used to be the last root page in the file before
+** the move.  If no page gets moved, *piMoved is set to 0.
+** The last root page is recorded in meta[3] and the value of
+** meta[3] is updated by this procedure.
+*/
+static int btreeDropTable(Btree *p, Pgno iTable, int *piMoved){
+  int rc;
+  MemPage *pPage = 0;
+  BtShared *pBt = p->pBt;
+
+  assert( sqlite3BtreeHoldsMutex(p) );
+  assert( p->inTrans==TRANS_WRITE );
+
+  /* It is illegal to drop a table if any cursors are open on the
+  ** database. This is because in auto-vacuum mode the backend may
+  ** need to move another root-page to fill a gap left by the deleted
+  ** root page. If an open cursor was using this page a problem would 
+  ** occur.
+  **
+  ** This error is caught long before control reaches this point.
+  */
+  if( NEVER(pBt->pCursor) ){
+    sqlite3ConnectionBlocked(p->db, pBt->pCursor->pBtree->db);
+    return SQLITE_LOCKED_SHAREDCACHE;
+  }
+
+  rc = btreeGetPage(pBt, (Pgno)iTable, &pPage, 0);
+  if( rc ) return rc;
+  rc = sqlite3BtreeClearTable(p, iTable, 0);
+  if( rc ){
+    releasePage(pPage);
+    return rc;
+  }
+
+  *piMoved = 0;
+
+  if( iTable>1 ){
+#ifdef SQLITE_OMIT_AUTOVACUUM
+    freePage(pPage, &rc);
+    releasePage(pPage);
+#else
+    if( pBt->autoVacuum ){
+      Pgno maxRootPgno;
+      sqlite3BtreeGetMeta(p, BTREE_LARGEST_ROOT_PAGE, &maxRootPgno);
+
+      if( iTable==maxRootPgno ){
+        /* If the table being dropped is the table with the largest root-page
+        ** number in the database, put the root page on the free list. 
+        */
+        freePage(pPage, &rc);
+        releasePage(pPage);
+        if( rc!=SQLITE_OK ){
+          return rc;
+        }
+      }else{
+        /* The table being dropped does not have the largest root-page
+        ** number in the database. So move the page that does into the 
+        ** gap left by the deleted root-page.
+        */
+        MemPage *pMove;
+        releasePage(pPage);
+        rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);
+        if( rc!=SQLITE_OK ){
+          return rc;
+        }
+        rc = relocatePage(pBt, pMove, PTRMAP_ROOTPAGE, 0, iTable, 0);
+        releasePage(pMove);
+        if( rc!=SQLITE_OK ){
+          return rc;
+        }
+        pMove = 0;
+        rc = btreeGetPage(pBt, maxRootPgno, &pMove, 0);
+        freePage(pMove, &rc);
+        releasePage(pMove);
+        if( rc!=SQLITE_OK ){
+          return rc;
+        }
+        *piMoved = maxRootPgno;
+      }
+
+      /* Set the new 'max-root-page' value in the database header. This
+      ** is the old value less one, less one more if that happens to
+      ** be a root-page number, less one again if that is the
+      ** PENDING_BYTE_PAGE.
+      */
+      maxRootPgno--;
+      while( maxRootPgno==PENDING_BYTE_PAGE(pBt)
+             || PTRMAP_ISPAGE(pBt, maxRootPgno) ){
+        maxRootPgno--;
+      }
+      assert( maxRootPgno!=PENDING_BYTE_PAGE(pBt) );
+
+      rc = sqlite3BtreeUpdateMeta(p, 4, maxRootPgno);
+    }else{
+      freePage(pPage, &rc);
+      releasePage(pPage);
+    }
+#endif
+  }else{
+    /* If sqlite3BtreeDropTable was called on page 1.
+    ** This really never should happen except in a corrupt
+    ** database. 
+    */
+    zeroPage(pPage, PTF_INTKEY|PTF_LEAF );
+    releasePage(pPage);
+  }
+  return rc;  
+}
+SQLITE_PRIVATE int sqlite3BtreeDropTable(Btree *p, int iTable, int *piMoved){
+  int rc;
+  sqlite3BtreeEnter(p);
+  rc = btreeDropTable(p, iTable, piMoved);
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+
+/*
+** This function may only be called if the b-tree connection already
+** has a read or write transaction open on the database.
+**
+** Read the meta-information out of a database file.  Meta[0]
+** is the number of free pages currently in the database.  Meta[1]
+** through meta[15] are available for use by higher layers.  Meta[0]
+** is read-only, the others are read/write.
+** 
+** The schema layer numbers meta values differently.  At the schema
+** layer (and the SetCookie and ReadCookie opcodes) the number of
+** free pages is not visible.  So Cookie[0] is the same as Meta[1].
+*/
+SQLITE_PRIVATE void sqlite3BtreeGetMeta(Btree *p, int idx, u32 *pMeta){
+  BtShared *pBt = p->pBt;
+
+  sqlite3BtreeEnter(p);
+  assert( p->inTrans>TRANS_NONE );
+  assert( SQLITE_OK==querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK) );
+  assert( pBt->pPage1 );
+  assert( idx>=0 && idx<=15 );
+
+  *pMeta = get4byte(&pBt->pPage1->aData[36 + idx*4]);
+
+  /* If auto-vacuum is disabled in this build and this is an auto-vacuum
+  ** database, mark the database as read-only.  */
+#ifdef SQLITE_OMIT_AUTOVACUUM
+  if( idx==BTREE_LARGEST_ROOT_PAGE && *pMeta>0 ) pBt->readOnly = 1;
+#endif
+
+  sqlite3BtreeLeave(p);
+}
+
+/*
+** Write meta-information back into the database.  Meta[0] is
+** read-only and may not be written.
+*/
+SQLITE_PRIVATE int sqlite3BtreeUpdateMeta(Btree *p, int idx, u32 iMeta){
+  BtShared *pBt = p->pBt;
+  unsigned char *pP1;
+  int rc;
+  assert( idx>=1 && idx<=15 );
+  sqlite3BtreeEnter(p);
+  assert( p->inTrans==TRANS_WRITE );
+  assert( pBt->pPage1!=0 );
+  pP1 = pBt->pPage1->aData;
+  rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
+  if( rc==SQLITE_OK ){
+    put4byte(&pP1[36 + idx*4], iMeta);
+#ifndef SQLITE_OMIT_AUTOVACUUM
+    if( idx==BTREE_INCR_VACUUM ){
+      assert( pBt->autoVacuum || iMeta==0 );
+      assert( iMeta==0 || iMeta==1 );
+      pBt->incrVacuum = (u8)iMeta;
+    }
+#endif
+  }
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+#ifndef SQLITE_OMIT_BTREECOUNT
+/*
+** The first argument, pCur, is a cursor opened on some b-tree. Count the
+** number of entries in the b-tree and write the result to *pnEntry.
+**
+** SQLITE_OK is returned if the operation is successfully executed. 
+** Otherwise, if an error is encountered (i.e. an IO error or database
+** corruption) an SQLite error code is returned.
+*/
+SQLITE_PRIVATE int sqlite3BtreeCount(BtCursor *pCur, i64 *pnEntry){
+  i64 nEntry = 0;                      /* Value to return in *pnEntry */
+  int rc;                              /* Return code */
+  rc = moveToRoot(pCur);
+
+  /* Unless an error occurs, the following loop runs one iteration for each
+  ** page in the B-Tree structure (not including overflow pages). 
+  */
+  while( rc==SQLITE_OK ){
+    int iIdx;                          /* Index of child node in parent */
+    MemPage *pPage;                    /* Current page of the b-tree */
+
+    /* If this is a leaf page or the tree is not an int-key tree, then 
+    ** this page contains countable entries. Increment the entry counter
+    ** accordingly.
+    */
+    pPage = pCur->apPage[pCur->iPage];
+    if( pPage->leaf || !pPage->intKey ){
+      nEntry += pPage->nCell;
+    }
+
+    /* pPage is a leaf node. This loop navigates the cursor so that it 
+    ** points to the first interior cell that it points to the parent of
+    ** the next page in the tree that has not yet been visited. The
+    ** pCur->aiIdx[pCur->iPage] value is set to the index of the parent cell
+    ** of the page, or to the number of cells in the page if the next page
+    ** to visit is the right-child of its parent.
+    **
+    ** If all pages in the tree have been visited, return SQLITE_OK to the
+    ** caller.
+    */
+    if( pPage->leaf ){
+      do {
+        if( pCur->iPage==0 ){
+          /* All pages of the b-tree have been visited. Return successfully. */
+          *pnEntry = nEntry;
+          return SQLITE_OK;
+        }
+        moveToParent(pCur);
+      }while ( pCur->aiIdx[pCur->iPage]>=pCur->apPage[pCur->iPage]->nCell );
+
+      pCur->aiIdx[pCur->iPage]++;
+      pPage = pCur->apPage[pCur->iPage];
+    }
+
+    /* Descend to the child node of the cell that the cursor currently 
+    ** points at. This is the right-child if (iIdx==pPage->nCell).
+    */
+    iIdx = pCur->aiIdx[pCur->iPage];
+    if( iIdx==pPage->nCell ){
+      rc = moveToChild(pCur, get4byte(&pPage->aData[pPage->hdrOffset+8]));
+    }else{
+      rc = moveToChild(pCur, get4byte(findCell(pPage, iIdx)));
+    }
+  }
+
+  /* An error has occurred. Return an error code. */
+  return rc;
+}
+#endif
+
+/*
+** Return the pager associated with a BTree.  This routine is used for
+** testing and debugging only.
+*/
+SQLITE_PRIVATE Pager *sqlite3BtreePager(Btree *p){
+  return p->pBt->pPager;
+}
+
+#ifndef SQLITE_OMIT_INTEGRITY_CHECK
+/*
+** Append a message to the error message string.
+*/
+static void checkAppendMsg(
+  IntegrityCk *pCheck,
+  char *zMsg1,
+  const char *zFormat,
+  ...
+){
+  va_list ap;
+  if( !pCheck->mxErr ) return;
+  pCheck->mxErr--;
+  pCheck->nErr++;
+  va_start(ap, zFormat);
+  if( pCheck->errMsg.nChar ){
+    sqlite3StrAccumAppend(&pCheck->errMsg, "\n", 1);
+  }
+  if( zMsg1 ){
+    sqlite3StrAccumAppend(&pCheck->errMsg, zMsg1, -1);
+  }
+  sqlite3VXPrintf(&pCheck->errMsg, 1, zFormat, ap);
+  va_end(ap);
+  if( pCheck->errMsg.mallocFailed ){
+    pCheck->mallocFailed = 1;
+  }
+}
+#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
+
+#ifndef SQLITE_OMIT_INTEGRITY_CHECK
+/*
+** Add 1 to the reference count for page iPage.  If this is the second
+** reference to the page, add an error message to pCheck->zErrMsg.
+** Return 1 if there are 2 ore more references to the page and 0 if
+** if this is the first reference to the page.
+**
+** Also check that the page number is in bounds.
+*/
+static int checkRef(IntegrityCk *pCheck, Pgno iPage, char *zContext){
+  if( iPage==0 ) return 1;
+  if( iPage>pCheck->nPage ){
+    checkAppendMsg(pCheck, zContext, "invalid page number %d", iPage);
+    return 1;
+  }
+  if( pCheck->anRef[iPage]==1 ){
+    checkAppendMsg(pCheck, zContext, "2nd reference to page %d", iPage);
+    return 1;
+  }
+  return  (pCheck->anRef[iPage]++)>1;
+}
+
+#ifndef SQLITE_OMIT_AUTOVACUUM
+/*
+** Check that the entry in the pointer-map for page iChild maps to 
+** page iParent, pointer type ptrType. If not, append an error message
+** to pCheck.
+*/
+static void checkPtrmap(
+  IntegrityCk *pCheck,   /* Integrity check context */
+  Pgno iChild,           /* Child page number */
+  u8 eType,              /* Expected pointer map type */
+  Pgno iParent,          /* Expected pointer map parent page number */
+  char *zContext         /* Context description (used for error msg) */
+){
+  int rc;
+  u8 ePtrmapType;
+  Pgno iPtrmapParent;
+
+  rc = ptrmapGet(pCheck->pBt, iChild, &ePtrmapType, &iPtrmapParent);
+  if( rc!=SQLITE_OK ){
+    if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ) pCheck->mallocFailed = 1;
+    checkAppendMsg(pCheck, zContext, "Failed to read ptrmap key=%d", iChild);
+    return;
+  }
+
+  if( ePtrmapType!=eType || iPtrmapParent!=iParent ){
+    checkAppendMsg(pCheck, zContext, 
+      "Bad ptr map entry key=%d expected=(%d,%d) got=(%d,%d)", 
+      iChild, eType, iParent, ePtrmapType, iPtrmapParent);
+  }
+}
+#endif
+
+/*
+** Check the integrity of the freelist or of an overflow page list.
+** Verify that the number of pages on the list is N.
+*/
+static void checkList(
+  IntegrityCk *pCheck,  /* Integrity checking context */
+  int isFreeList,       /* True for a freelist.  False for overflow page list */
+  int iPage,            /* Page number for first page in the list */
+  int N,                /* Expected number of pages in the list */
+  char *zContext        /* Context for error messages */
+){
+  int i;
+  int expected = N;
+  int iFirst = iPage;
+  while( N-- > 0 && pCheck->mxErr ){
+    DbPage *pOvflPage;
+    unsigned char *pOvflData;
+    if( iPage<1 ){
+      checkAppendMsg(pCheck, zContext,
+         "%d of %d pages missing from overflow list starting at %d",
+          N+1, expected, iFirst);
+      break;
+    }
+    if( checkRef(pCheck, iPage, zContext) ) break;
+    if( sqlite3PagerGet(pCheck->pPager, (Pgno)iPage, &pOvflPage) ){
+      checkAppendMsg(pCheck, zContext, "failed to get page %d", iPage);
+      break;
+    }
+    pOvflData = (unsigned char *)sqlite3PagerGetData(pOvflPage);
+    if( isFreeList ){
+      int n = get4byte(&pOvflData[4]);
+#ifndef SQLITE_OMIT_AUTOVACUUM
+      if( pCheck->pBt->autoVacuum ){
+        checkPtrmap(pCheck, iPage, PTRMAP_FREEPAGE, 0, zContext);
+      }
+#endif
+      if( n>(int)pCheck->pBt->usableSize/4-2 ){
+        checkAppendMsg(pCheck, zContext,
+           "freelist leaf count too big on page %d", iPage);
+        N--;
+      }else{
+        for(i=0; i<n; i++){
+          Pgno iFreePage = get4byte(&pOvflData[8+i*4]);
+#ifndef SQLITE_OMIT_AUTOVACUUM
+          if( pCheck->pBt->autoVacuum ){
+            checkPtrmap(pCheck, iFreePage, PTRMAP_FREEPAGE, 0, zContext);
+          }
+#endif
+          checkRef(pCheck, iFreePage, zContext);
+        }
+        N -= n;
+      }
+    }
+#ifndef SQLITE_OMIT_AUTOVACUUM
+    else{
+      /* If this database supports auto-vacuum and iPage is not the last
+      ** page in this overflow list, check that the pointer-map entry for
+      ** the following page matches iPage.
+      */
+      if( pCheck->pBt->autoVacuum && N>0 ){
+        i = get4byte(pOvflData);
+        checkPtrmap(pCheck, i, PTRMAP_OVERFLOW2, iPage, zContext);
+      }
+    }
+#endif
+    iPage = get4byte(pOvflData);
+    sqlite3PagerUnref(pOvflPage);
+  }
+}
+#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
+
+#ifndef SQLITE_OMIT_INTEGRITY_CHECK
+/*
+** Do various sanity checks on a single page of a tree.  Return
+** the tree depth.  Root pages return 0.  Parents of root pages
+** return 1, and so forth.
+** 
+** These checks are done:
+**
+**      1.  Make sure that cells and freeblocks do not overlap
+**          but combine to completely cover the page.
+**  NO  2.  Make sure cell keys are in order.
+**  NO  3.  Make sure no key is less than or equal to zLowerBound.
+**  NO  4.  Make sure no key is greater than or equal to zUpperBound.
+**      5.  Check the integrity of overflow pages.
+**      6.  Recursively call checkTreePage on all children.
+**      7.  Verify that the depth of all children is the same.
+**      8.  Make sure this page is at least 33% full or else it is
+**          the root of the tree.
+*/
+static int checkTreePage(
+  IntegrityCk *pCheck,  /* Context for the sanity check */
+  int iPage,            /* Page number of the page to check */
+  char *zParentContext, /* Parent context */
+  i64 *pnParentMinKey, 
+  i64 *pnParentMaxKey
+){
+  MemPage *pPage;
+  int i, rc, depth, d2, pgno, cnt;
+  int hdr, cellStart;
+  int nCell;
+  u8 *data;
+  BtShared *pBt;
+  int usableSize;
+  char zContext[100];
+  char *hit = 0;
+  i64 nMinKey = 0;
+  i64 nMaxKey = 0;
+
+  sqlite3_snprintf(sizeof(zContext), zContext, "Page %d: ", iPage);
+
+  /* Check that the page exists
+  */
+  pBt = pCheck->pBt;
+  usableSize = pBt->usableSize;
+  if( iPage==0 ) return 0;
+  if( checkRef(pCheck, iPage, zParentContext) ) return 0;
+  if( (rc = btreeGetPage(pBt, (Pgno)iPage, &pPage, 0))!=0 ){
+    checkAppendMsg(pCheck, zContext,
+       "unable to get the page. error code=%d", rc);
+    return 0;
+  }
+
+  /* Clear MemPage.isInit to make sure the corruption detection code in
+  ** btreeInitPage() is executed.  */
+  pPage->isInit = 0;
+  if( (rc = btreeInitPage(pPage))!=0 ){
+    assert( rc==SQLITE_CORRUPT );  /* The only possible error from InitPage */
+    checkAppendMsg(pCheck, zContext, 
+                   "btreeInitPage() returns error code %d", rc);
+    releasePage(pPage);
+    return 0;
+  }
+
+  /* Check out all the cells.
+  */
+  depth = 0;
+  for(i=0; i<pPage->nCell && pCheck->mxErr; i++){
+    u8 *pCell;
+    u32 sz;
+    CellInfo info;
+
+    /* Check payload overflow pages
+    */
+    sqlite3_snprintf(sizeof(zContext), zContext,
+             "On tree page %d cell %d: ", iPage, i);
+    pCell = findCell(pPage,i);
+    btreeParseCellPtr(pPage, pCell, &info);
+    sz = info.nData;
+    if( !pPage->intKey ) sz += (int)info.nKey;
+    /* For intKey pages, check that the keys are in order.
+    */
+    else if( i==0 ) nMinKey = nMaxKey = info.nKey;
+    else{
+      if( info.nKey <= nMaxKey ){
+        checkAppendMsg(pCheck, zContext, 
+            "Rowid %lld out of order (previous was %lld)", info.nKey, nMaxKey);
+      }
+      nMaxKey = info.nKey;
+    }
+    assert( sz==info.nPayload );
+    if( (sz>info.nLocal) 
+     && (&pCell[info.iOverflow]<=&pPage->aData[pBt->usableSize])
+    ){
+      int nPage = (sz - info.nLocal + usableSize - 5)/(usableSize - 4);
+      Pgno pgnoOvfl = get4byte(&pCell[info.iOverflow]);
+#ifndef SQLITE_OMIT_AUTOVACUUM
+      if( pBt->autoVacuum ){
+        checkPtrmap(pCheck, pgnoOvfl, PTRMAP_OVERFLOW1, iPage, zContext);
+      }
+#endif
+      checkList(pCheck, 0, pgnoOvfl, nPage, zContext);
+    }
+
+    /* Check sanity of left child page.
+    */
+    if( !pPage->leaf ){
+      pgno = get4byte(pCell);
+#ifndef SQLITE_OMIT_AUTOVACUUM
+      if( pBt->autoVacuum ){
+        checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, zContext);
+      }
+#endif
+      d2 = checkTreePage(pCheck, pgno, zContext, &nMinKey, i==0 ? NULL : &nMaxKey);
+      if( i>0 && d2!=depth ){
+        checkAppendMsg(pCheck, zContext, "Child page depth differs");
+      }
+      depth = d2;
+    }
+  }
+
+  if( !pPage->leaf ){
+    pgno = get4byte(&pPage->aData[pPage->hdrOffset+8]);
+    sqlite3_snprintf(sizeof(zContext), zContext, 
+                     "On page %d at right child: ", iPage);
+#ifndef SQLITE_OMIT_AUTOVACUUM
+    if( pBt->autoVacuum ){
+      checkPtrmap(pCheck, pgno, PTRMAP_BTREE, iPage, zContext);
+    }
+#endif
+    checkTreePage(pCheck, pgno, zContext, NULL, !pPage->nCell ? NULL : &nMaxKey);
+  }
+ 
+  /* For intKey leaf pages, check that the min/max keys are in order
+  ** with any left/parent/right pages.
+  */
+  if( pPage->leaf && pPage->intKey ){
+    /* if we are a left child page */
+    if( pnParentMinKey ){
+      /* if we are the left most child page */
+      if( !pnParentMaxKey ){
+        if( nMaxKey > *pnParentMinKey ){
+          checkAppendMsg(pCheck, zContext, 
+              "Rowid %lld out of order (max larger than parent min of %lld)",
+              nMaxKey, *pnParentMinKey);
+        }
+      }else{
+        if( nMinKey <= *pnParentMinKey ){
+          checkAppendMsg(pCheck, zContext, 
+              "Rowid %lld out of order (min less than parent min of %lld)",
+              nMinKey, *pnParentMinKey);
+        }
+        if( nMaxKey > *pnParentMaxKey ){
+          checkAppendMsg(pCheck, zContext, 
+              "Rowid %lld out of order (max larger than parent max of %lld)",
+              nMaxKey, *pnParentMaxKey);
+        }
+        *pnParentMinKey = nMaxKey;
+      }
+    /* else if we're a right child page */
+    } else if( pnParentMaxKey ){
+      if( nMinKey <= *pnParentMaxKey ){
+        checkAppendMsg(pCheck, zContext, 
+            "Rowid %lld out of order (min less than parent max of %lld)",
+            nMinKey, *pnParentMaxKey);
+      }
+    }
+  }
+
+  /* Check for complete coverage of the page
+  */
+  data = pPage->aData;
+  hdr = pPage->hdrOffset;
+  hit = sqlite3PageMalloc( pBt->pageSize );
+  if( hit==0 ){
+    pCheck->mallocFailed = 1;
+  }else{
+    int contentOffset = get2byteNotZero(&data[hdr+5]);
+    assert( contentOffset<=usableSize );  /* Enforced by btreeInitPage() */
+    memset(hit+contentOffset, 0, usableSize-contentOffset);
+    memset(hit, 1, contentOffset);
+    nCell = get2byte(&data[hdr+3]);
+    cellStart = hdr + 12 - 4*pPage->leaf;
+    for(i=0; i<nCell; i++){
+      int pc = get2byte(&data[cellStart+i*2]);
+      u32 size = 65536;
+      int j;
+      if( pc<=usableSize-4 ){
+        size = cellSizePtr(pPage, &data[pc]);
+      }
+      if( (int)(pc+size-1)>=usableSize ){
+        checkAppendMsg(pCheck, 0, 
+            "Corruption detected in cell %d on page %d",i,iPage);
+      }else{
+        for(j=pc+size-1; j>=pc; j--) hit[j]++;
+      }
+    }
+    i = get2byte(&data[hdr+1]);
+    while( i>0 ){
+      int size, j;
+      assert( i<=usableSize-4 );     /* Enforced by btreeInitPage() */
+      size = get2byte(&data[i+2]);
+      assert( i+size<=usableSize );  /* Enforced by btreeInitPage() */
+      for(j=i+size-1; j>=i; j--) hit[j]++;
+      j = get2byte(&data[i]);
+      assert( j==0 || j>i+size );  /* Enforced by btreeInitPage() */
+      assert( j<=usableSize-4 );   /* Enforced by btreeInitPage() */
+      i = j;
+    }
+    for(i=cnt=0; i<usableSize; i++){
+      if( hit[i]==0 ){
+        cnt++;
+      }else if( hit[i]>1 ){
+        checkAppendMsg(pCheck, 0,
+          "Multiple uses for byte %d of page %d", i, iPage);
+        break;
+      }
+    }
+    if( cnt!=data[hdr+7] ){
+      checkAppendMsg(pCheck, 0, 
+          "Fragmentation of %d bytes reported as %d on page %d",
+          cnt, data[hdr+7], iPage);
+    }
+  }
+  sqlite3PageFree(hit);
+  releasePage(pPage);
+  return depth+1;
+}
+#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
+
+#ifndef SQLITE_OMIT_INTEGRITY_CHECK
+/*
+** This routine does a complete check of the given BTree file.  aRoot[] is
+** an array of pages numbers were each page number is the root page of
+** a table.  nRoot is the number of entries in aRoot.
+**
+** A read-only or read-write transaction must be opened before calling
+** this function.
+**
+** Write the number of error seen in *pnErr.  Except for some memory
+** allocation errors,  an error message held in memory obtained from
+** malloc is returned if *pnErr is non-zero.  If *pnErr==0 then NULL is
+** returned.  If a memory allocation error occurs, NULL is returned.
+*/
+SQLITE_PRIVATE char *sqlite3BtreeIntegrityCheck(
+  Btree *p,     /* The btree to be checked */
+  int *aRoot,   /* An array of root pages numbers for individual trees */
+  int nRoot,    /* Number of entries in aRoot[] */
+  int mxErr,    /* Stop reporting errors after this many */
+  int *pnErr    /* Write number of errors seen to this variable */
+){
+  Pgno i;
+  int nRef;
+  IntegrityCk sCheck;
+  BtShared *pBt = p->pBt;
+  char zErr[100];
+
+  sqlite3BtreeEnter(p);
+  assert( p->inTrans>TRANS_NONE && pBt->inTransaction>TRANS_NONE );
+  nRef = sqlite3PagerRefcount(pBt->pPager);
+  sCheck.pBt = pBt;
+  sCheck.pPager = pBt->pPager;
+  sCheck.nPage = btreePagecount(sCheck.pBt);
+  sCheck.mxErr = mxErr;
+  sCheck.nErr = 0;
+  sCheck.mallocFailed = 0;
+  *pnErr = 0;
+  if( sCheck.nPage==0 ){
+    sqlite3BtreeLeave(p);
+    return 0;
+  }
+  sCheck.anRef = sqlite3Malloc( (sCheck.nPage+1)*sizeof(sCheck.anRef[0]) );
+  if( !sCheck.anRef ){
+    *pnErr = 1;
+    sqlite3BtreeLeave(p);
+    return 0;
+  }
+  for(i=0; i<=sCheck.nPage; i++){ sCheck.anRef[i] = 0; }
+  i = PENDING_BYTE_PAGE(pBt);
+  if( i<=sCheck.nPage ){
+    sCheck.anRef[i] = 1;
+  }
+  sqlite3StrAccumInit(&sCheck.errMsg, zErr, sizeof(zErr), 20000);
+  sCheck.errMsg.useMalloc = 2;
+
+  /* Check the integrity of the freelist
+  */
+  checkList(&sCheck, 1, get4byte(&pBt->pPage1->aData[32]),
+            get4byte(&pBt->pPage1->aData[36]), "Main freelist: ");
+
+  /* Check all the tables.
+  */
+  for(i=0; (int)i<nRoot && sCheck.mxErr; i++){
+    if( aRoot[i]==0 ) continue;
+#ifndef SQLITE_OMIT_AUTOVACUUM
+    if( pBt->autoVacuum && aRoot[i]>1 ){
+      checkPtrmap(&sCheck, aRoot[i], PTRMAP_ROOTPAGE, 0, 0);
+    }
+#endif
+    checkTreePage(&sCheck, aRoot[i], "List of tree roots: ", NULL, NULL);
+  }
+
+  /* Make sure every page in the file is referenced
+  */
+  for(i=1; i<=sCheck.nPage && sCheck.mxErr; i++){
+#ifdef SQLITE_OMIT_AUTOVACUUM
+    if( sCheck.anRef[i]==0 ){
+      checkAppendMsg(&sCheck, 0, "Page %d is never used", i);
+    }
+#else
+    /* If the database supports auto-vacuum, make sure no tables contain
+    ** references to pointer-map pages.
+    */
+    if( sCheck.anRef[i]==0 && 
+       (PTRMAP_PAGENO(pBt, i)!=i || !pBt->autoVacuum) ){
+      checkAppendMsg(&sCheck, 0, "Page %d is never used", i);
+    }
+    if( sCheck.anRef[i]!=0 && 
+       (PTRMAP_PAGENO(pBt, i)==i && pBt->autoVacuum) ){
+      checkAppendMsg(&sCheck, 0, "Pointer map page %d is referenced", i);
+    }
+#endif
+  }
+
+  /* Make sure this analysis did not leave any unref() pages.
+  ** This is an internal consistency check; an integrity check
+  ** of the integrity check.
+  */
+  if( NEVER(nRef != sqlite3PagerRefcount(pBt->pPager)) ){
+    checkAppendMsg(&sCheck, 0, 
+      "Outstanding page count goes from %d to %d during this analysis",
+      nRef, sqlite3PagerRefcount(pBt->pPager)
+    );
+  }
+
+  /* Clean  up and report errors.
+  */
+  sqlite3BtreeLeave(p);
+  sqlite3_free(sCheck.anRef);
+  if( sCheck.mallocFailed ){
+    sqlite3StrAccumReset(&sCheck.errMsg);
+    *pnErr = sCheck.nErr+1;
+    return 0;
+  }
+  *pnErr = sCheck.nErr;
+  if( sCheck.nErr==0 ) sqlite3StrAccumReset(&sCheck.errMsg);
+  return sqlite3StrAccumFinish(&sCheck.errMsg);
+}
+#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
+
+/*
+** Return the full pathname of the underlying database file.
+**
+** The pager filename is invariant as long as the pager is
+** open so it is safe to access without the BtShared mutex.
+*/
+SQLITE_PRIVATE const char *sqlite3BtreeGetFilename(Btree *p){
+  assert( p->pBt->pPager!=0 );
+  return sqlite3PagerFilename(p->pBt->pPager);
+}
+
+/*
+** Return the pathname of the journal file for this database. The return
+** value of this routine is the same regardless of whether the journal file
+** has been created or not.
+**
+** The pager journal filename is invariant as long as the pager is
+** open so it is safe to access without the BtShared mutex.
+*/
+SQLITE_PRIVATE const char *sqlite3BtreeGetJournalname(Btree *p){
+  assert( p->pBt->pPager!=0 );
+  return sqlite3PagerJournalname(p->pBt->pPager);
+}
+
+/*
+** Return non-zero if a transaction is active.
+*/
+SQLITE_PRIVATE int sqlite3BtreeIsInTrans(Btree *p){
+  assert( p==0 || sqlite3_mutex_held(p->db->mutex) );
+  return (p && (p->inTrans==TRANS_WRITE));
+}
+
+#ifndef SQLITE_OMIT_WAL
+/*
+** Run a checkpoint on the Btree passed as the first argument.
+**
+** Return SQLITE_LOCKED if this or any other connection has an open 
+** transaction on the shared-cache the argument Btree is connected to.
+**
+** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
+*/
+SQLITE_PRIVATE int sqlite3BtreeCheckpoint(Btree *p, int eMode, int *pnLog, int *pnCkpt){
+  int rc = SQLITE_OK;
+  if( p ){
+    BtShared *pBt = p->pBt;
+    sqlite3BtreeEnter(p);
+    if( pBt->inTransaction!=TRANS_NONE ){
+      rc = SQLITE_LOCKED;
+    }else{
+      rc = sqlite3PagerCheckpoint(pBt->pPager, eMode, pnLog, pnCkpt);
+    }
+    sqlite3BtreeLeave(p);
+  }
+  return rc;
+}
+#endif
+
+/*
+** Return non-zero if a read (or write) transaction is active.
+*/
+SQLITE_PRIVATE int sqlite3BtreeIsInReadTrans(Btree *p){
+  assert( p );
+  assert( sqlite3_mutex_held(p->db->mutex) );
+  return p->inTrans!=TRANS_NONE;
+}
+
+SQLITE_PRIVATE int sqlite3BtreeIsInBackup(Btree *p){
+  assert( p );
+  assert( sqlite3_mutex_held(p->db->mutex) );
+  return p->nBackup!=0;
+}
+
+/*
+** This function returns a pointer to a blob of memory associated with
+** a single shared-btree. The memory is used by client code for its own
+** purposes (for example, to store a high-level schema associated with 
+** the shared-btree). The btree layer manages reference counting issues.
+**
+** The first time this is called on a shared-btree, nBytes bytes of memory
+** are allocated, zeroed, and returned to the caller. For each subsequent 
+** call the nBytes parameter is ignored and a pointer to the same blob
+** of memory returned. 
+**
+** If the nBytes parameter is 0 and the blob of memory has not yet been
+** allocated, a null pointer is returned. If the blob has already been
+** allocated, it is returned as normal.
+**
+** Just before the shared-btree is closed, the function passed as the 
+** xFree argument when the memory allocation was made is invoked on the 
+** blob of allocated memory. The xFree function should not call sqlite3_free()
+** on the memory, the btree layer does that.
+*/
+SQLITE_PRIVATE void *sqlite3BtreeSchema(Btree *p, int nBytes, void(*xFree)(void *)){
+  BtShared *pBt = p->pBt;
+  sqlite3BtreeEnter(p);
+  if( !pBt->pSchema && nBytes ){
+    pBt->pSchema = sqlite3DbMallocZero(0, nBytes);
+    pBt->xFreeSchema = xFree;
+  }
+  sqlite3BtreeLeave(p);
+  return pBt->pSchema;
+}
+
+/*
+** Return SQLITE_LOCKED_SHAREDCACHE if another user of the same shared 
+** btree as the argument handle holds an exclusive lock on the 
+** sqlite_master table. Otherwise SQLITE_OK.
+*/
+SQLITE_PRIVATE int sqlite3BtreeSchemaLocked(Btree *p){
+  int rc;
+  assert( sqlite3_mutex_held(p->db->mutex) );
+  sqlite3BtreeEnter(p);
+  rc = querySharedCacheTableLock(p, MASTER_ROOT, READ_LOCK);
+  assert( rc==SQLITE_OK || rc==SQLITE_LOCKED_SHAREDCACHE );
+  sqlite3BtreeLeave(p);
+  return rc;
+}
+
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+/*
+** Obtain a lock on the table whose root page is iTab.  The
+** lock is a write lock if isWritelock is true or a read lock
+** if it is false.
+*/
+SQLITE_PRIVATE int sqlite3BtreeLockTable(Btree *p, int iTab, u8 isWriteLock){
+  int rc = SQLITE_OK;
+  assert( p->inTrans!=TRANS_NONE );
+  if( p->sharable ){
+    u8 lockType = READ_LOCK + isWriteLock;
+    assert( READ_LOCK+1==WRITE_LOCK );
+    assert( isWriteLock==0 || isWriteLock==1 );
+
+    sqlite3BtreeEnter(p);
+    rc = querySharedCacheTableLock(p, iTab, lockType);
+    if( rc==SQLITE_OK ){
+      rc = setSharedCacheTableLock(p, iTab, lockType);
+    }
+    sqlite3BtreeLeave(p);
+  }
+  return rc;
+}
+#endif
+
+#ifndef SQLITE_OMIT_INCRBLOB
+/*
+** Argument pCsr must be a cursor opened for writing on an 
+** INTKEY table currently pointing at a valid table entry. 
+** This function modifies the data stored as part of that entry.
+**
+** Only the data content may only be modified, it is not possible to 
+** change the length of the data stored. If this function is called with
+** parameters that attempt to write past the end of the existing data,
+** no modifications are made and SQLITE_CORRUPT is returned.
+*/
+SQLITE_PRIVATE int sqlite3BtreePutData(BtCursor *pCsr, u32 offset, u32 amt, void *z){
+  int rc;
+  assert( cursorHoldsMutex(pCsr) );
+  assert( sqlite3_mutex_held(pCsr->pBtree->db->mutex) );
+  assert( pCsr->isIncrblobHandle );
+
+  rc = restoreCursorPosition(pCsr);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+  assert( pCsr->eState!=CURSOR_REQUIRESEEK );
+  if( pCsr->eState!=CURSOR_VALID ){
+    return SQLITE_ABORT;
+  }
+
+  /* Check some assumptions: 
+  **   (a) the cursor is open for writing,
+  **   (b) there is a read/write transaction open,
+  **   (c) the connection holds a write-lock on the table (if required),
+  **   (d) there are no conflicting read-locks, and
+  **   (e) the cursor points at a valid row of an intKey table.
+  */
+  if( !pCsr->wrFlag ){
+    return SQLITE_READONLY;
+  }
+  assert( !pCsr->pBt->readOnly && pCsr->pBt->inTransaction==TRANS_WRITE );
+  assert( hasSharedCacheTableLock(pCsr->pBtree, pCsr->pgnoRoot, 0, 2) );
+  assert( !hasReadConflicts(pCsr->pBtree, pCsr->pgnoRoot) );
+  assert( pCsr->apPage[pCsr->iPage]->intKey );
+
+  return accessPayload(pCsr, offset, amt, (unsigned char *)z, 1);
+}
+
+/* 
+** Set a flag on this cursor to cache the locations of pages from the 
+** overflow list for the current row. This is used by cursors opened
+** for incremental blob IO only.
+**
+** This function sets a flag only. The actual page location cache
+** (stored in BtCursor.aOverflow[]) is allocated and used by function
+** accessPayload() (the worker function for sqlite3BtreeData() and
+** sqlite3BtreePutData()).
+*/
+SQLITE_PRIVATE void sqlite3BtreeCacheOverflow(BtCursor *pCur){
+  assert( cursorHoldsMutex(pCur) );
+  assert( sqlite3_mutex_held(pCur->pBtree->db->mutex) );
+  invalidateOverflowCache(pCur);
+  pCur->isIncrblobHandle = 1;
+}
+#endif
+
+/*
+** Set both the "read version" (single byte at byte offset 18) and 
+** "write version" (single byte at byte offset 19) fields in the database
+** header to iVersion.
+*/
+SQLITE_PRIVATE int sqlite3BtreeSetVersion(Btree *pBtree, int iVersion){
+  BtShared *pBt = pBtree->pBt;
+  int rc;                         /* Return code */
+ 
+  assert( pBtree->inTrans==TRANS_NONE );
+  assert( iVersion==1 || iVersion==2 );
+
+  /* If setting the version fields to 1, do not automatically open the
+  ** WAL connection, even if the version fields are currently set to 2.
+  */
+  pBt->doNotUseWAL = (u8)(iVersion==1);
+
+  rc = sqlite3BtreeBeginTrans(pBtree, 0);
+  if( rc==SQLITE_OK ){
+    u8 *aData = pBt->pPage1->aData;
+    if( aData[18]!=(u8)iVersion || aData[19]!=(u8)iVersion ){
+      rc = sqlite3BtreeBeginTrans(pBtree, 2);
+      if( rc==SQLITE_OK ){
+        rc = sqlite3PagerWrite(pBt->pPage1->pDbPage);
+        if( rc==SQLITE_OK ){
+          aData[18] = (u8)iVersion;
+          aData[19] = (u8)iVersion;
+        }
+      }
+    }
+  }
+
+  pBt->doNotUseWAL = 0;
+  return rc;
+}
+
+/************** End of btree.c ***********************************************/
+/************** Begin file backup.c ******************************************/
+/*
+** 2009 January 28
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the implementation of the sqlite3_backup_XXX() 
+** API functions and the related features.
+*/
+
+/* Macro to find the minimum of two numeric values.
+*/
+#ifndef MIN
+# define MIN(x,y) ((x)<(y)?(x):(y))
+#endif
+
+/*
+** Structure allocated for each backup operation.
+*/
+struct sqlite3_backup {
+  sqlite3* pDestDb;        /* Destination database handle */
+  Btree *pDest;            /* Destination b-tree file */
+  u32 iDestSchema;         /* Original schema cookie in destination */
+  int bDestLocked;         /* True once a write-transaction is open on pDest */
+
+  Pgno iNext;              /* Page number of the next source page to copy */
+  sqlite3* pSrcDb;         /* Source database handle */
+  Btree *pSrc;             /* Source b-tree file */
+
+  int rc;                  /* Backup process error code */
+
+  /* These two variables are set by every call to backup_step(). They are
+  ** read by calls to backup_remaining() and backup_pagecount().
+  */
+  Pgno nRemaining;         /* Number of pages left to copy */
+  Pgno nPagecount;         /* Total number of pages to copy */
+
+  int isAttached;          /* True once backup has been registered with pager */
+  sqlite3_backup *pNext;   /* Next backup associated with source pager */
+};
+
+/*
+** THREAD SAFETY NOTES:
+**
+**   Once it has been created using backup_init(), a single sqlite3_backup
+**   structure may be accessed via two groups of thread-safe entry points:
+**
+**     * Via the sqlite3_backup_XXX() API function backup_step() and 
+**       backup_finish(). Both these functions obtain the source database
+**       handle mutex and the mutex associated with the source BtShared 
+**       structure, in that order.
+**
+**     * Via the BackupUpdate() and BackupRestart() functions, which are
+**       invoked by the pager layer to report various state changes in
+**       the page cache associated with the source database. The mutex
+**       associated with the source database BtShared structure will always 
+**       be held when either of these functions are invoked.
+**
+**   The other sqlite3_backup_XXX() API functions, backup_remaining() and
+**   backup_pagecount() are not thread-safe functions. If they are called
+**   while some other thread is calling backup_step() or backup_finish(),
+**   the values returned may be invalid. There is no way for a call to
+**   BackupUpdate() or BackupRestart() to interfere with backup_remaining()
+**   or backup_pagecount().
+**
+**   Depending on the SQLite configuration, the database handles and/or
+**   the Btree objects may have their own mutexes that require locking.
+**   Non-sharable Btrees (in-memory databases for example), do not have
+**   associated mutexes.
+*/
+
+/*
+** Return a pointer corresponding to database zDb (i.e. "main", "temp")
+** in connection handle pDb. If such a database cannot be found, return
+** a NULL pointer and write an error message to pErrorDb.
+**
+** If the "temp" database is requested, it may need to be opened by this 
+** function. If an error occurs while doing so, return 0 and write an 
+** error message to pErrorDb.
+*/
+static Btree *findBtree(sqlite3 *pErrorDb, sqlite3 *pDb, const char *zDb){
+  int i = sqlite3FindDbName(pDb, zDb);
+
+  if( i==1 ){
+    Parse *pParse;
+    int rc = 0;
+    pParse = sqlite3StackAllocZero(pErrorDb, sizeof(*pParse));
+    if( pParse==0 ){
+      sqlite3Error(pErrorDb, SQLITE_NOMEM, "out of memory");
+      rc = SQLITE_NOMEM;
+    }else{
+      pParse->db = pDb;
+      if( sqlite3OpenTempDatabase(pParse) ){
+        sqlite3Error(pErrorDb, pParse->rc, "%s", pParse->zErrMsg);
+        rc = SQLITE_ERROR;
+      }
+      sqlite3DbFree(pErrorDb, pParse->zErrMsg);
+      sqlite3StackFree(pErrorDb, pParse);
+    }
+    if( rc ){
+      return 0;
+    }
+  }
+
+  if( i<0 ){
+    sqlite3Error(pErrorDb, SQLITE_ERROR, "unknown database %s", zDb);
+    return 0;
+  }
+
+  return pDb->aDb[i].pBt;
+}
+
+/*
+** Attempt to set the page size of the destination to match the page size
+** of the source.
+*/
+static int setDestPgsz(sqlite3_backup *p){
+  int rc;
+  rc = sqlite3BtreeSetPageSize(p->pDest,sqlite3BtreeGetPageSize(p->pSrc),-1,0);
+  return rc;
+}
+
+/*
+** Create an sqlite3_backup process to copy the contents of zSrcDb from
+** connection handle pSrcDb to zDestDb in pDestDb. If successful, return
+** a pointer to the new sqlite3_backup object.
+**
+** If an error occurs, NULL is returned and an error code and error message
+** stored in database handle pDestDb.
+*/
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
+  sqlite3* pDestDb,                     /* Database to write to */
+  const char *zDestDb,                  /* Name of database within pDestDb */
+  sqlite3* pSrcDb,                      /* Database connection to read from */
+  const char *zSrcDb                    /* Name of database within pSrcDb */
+){
+  sqlite3_backup *p;                    /* Value to return */
+
+  /* Lock the source database handle. The destination database
+  ** handle is not locked in this routine, but it is locked in
+  ** sqlite3_backup_step(). The user is required to ensure that no
+  ** other thread accesses the destination handle for the duration
+  ** of the backup operation.  Any attempt to use the destination
+  ** database connection while a backup is in progress may cause
+  ** a malfunction or a deadlock.
+  */
+  sqlite3_mutex_enter(pSrcDb->mutex);
+  sqlite3_mutex_enter(pDestDb->mutex);
+
+  if( pSrcDb==pDestDb ){
+    sqlite3Error(
+        pDestDb, SQLITE_ERROR, "source and destination must be distinct"
+    );
+    p = 0;
+  }else {
+    /* Allocate space for a new sqlite3_backup object...
+    ** EVIDENCE-OF: R-64852-21591 The sqlite3_backup object is created by a
+    ** call to sqlite3_backup_init() and is destroyed by a call to
+    ** sqlite3_backup_finish(). */
+    p = (sqlite3_backup *)sqlite3_malloc(sizeof(sqlite3_backup));
+    if( !p ){
+      sqlite3Error(pDestDb, SQLITE_NOMEM, 0);
+    }
+  }
+
+  /* If the allocation succeeded, populate the new object. */
+  if( p ){
+    memset(p, 0, sizeof(sqlite3_backup));
+    p->pSrc = findBtree(pDestDb, pSrcDb, zSrcDb);
+    p->pDest = findBtree(pDestDb, pDestDb, zDestDb);
+    p->pDestDb = pDestDb;
+    p->pSrcDb = pSrcDb;
+    p->iNext = 1;
+    p->isAttached = 0;
+
+    if( 0==p->pSrc || 0==p->pDest || setDestPgsz(p)==SQLITE_NOMEM ){
+      /* One (or both) of the named databases did not exist or an OOM
+      ** error was hit.  The error has already been written into the
+      ** pDestDb handle.  All that is left to do here is free the
+      ** sqlite3_backup structure.
+      */
+      sqlite3_free(p);
+      p = 0;
+    }
+  }
+  if( p ){
+    p->pSrc->nBackup++;
+  }
+
+  sqlite3_mutex_leave(pDestDb->mutex);
+  sqlite3_mutex_leave(pSrcDb->mutex);
+  return p;
+}
+
+/*
+** Argument rc is an SQLite error code. Return true if this error is 
+** considered fatal if encountered during a backup operation. All errors
+** are considered fatal except for SQLITE_BUSY and SQLITE_LOCKED.
+*/
+static int isFatalError(int rc){
+  return (rc!=SQLITE_OK && rc!=SQLITE_BUSY && ALWAYS(rc!=SQLITE_LOCKED));
+}
+
+/*
+** Parameter zSrcData points to a buffer containing the data for 
+** page iSrcPg from the source database. Copy this data into the 
+** destination database.
+*/
+static int backupOnePage(sqlite3_backup *p, Pgno iSrcPg, const u8 *zSrcData){
+  Pager * const pDestPager = sqlite3BtreePager(p->pDest);
+  const int nSrcPgsz = sqlite3BtreeGetPageSize(p->pSrc);
+  int nDestPgsz = sqlite3BtreeGetPageSize(p->pDest);
+  const int nCopy = MIN(nSrcPgsz, nDestPgsz);
+  const i64 iEnd = (i64)iSrcPg*(i64)nSrcPgsz;
+#ifdef SQLITE_HAS_CODEC
+  int nSrcReserve = sqlite3BtreeGetReserve(p->pSrc);
+  int nDestReserve = sqlite3BtreeGetReserve(p->pDest);
+#endif
+
+  int rc = SQLITE_OK;
+  i64 iOff;
+
+  assert( p->bDestLocked );
+  assert( !isFatalError(p->rc) );
+  assert( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) );
+  assert( zSrcData );
+
+  /* Catch the case where the destination is an in-memory database and the
+  ** page sizes of the source and destination differ. 
+  */
+  if( nSrcPgsz!=nDestPgsz && sqlite3PagerIsMemdb(pDestPager) ){
+    rc = SQLITE_READONLY;
+  }
+
+#ifdef SQLITE_HAS_CODEC
+  /* Backup is not possible if the page size of the destination is changing
+  ** and a codec is in use.
+  */
+  if( nSrcPgsz!=nDestPgsz && sqlite3PagerGetCodec(pDestPager)!=0 ){
+    rc = SQLITE_READONLY;
+  }
+
+  /* Backup is not possible if the number of bytes of reserve space differ
+  ** between source and destination.  If there is a difference, try to
+  ** fix the destination to agree with the source.  If that is not possible,
+  ** then the backup cannot proceed.
+  */
+  if( nSrcReserve!=nDestReserve ){
+    u32 newPgsz = nSrcPgsz;
+    rc = sqlite3PagerSetPagesize(pDestPager, &newPgsz, nSrcReserve);
+    if( rc==SQLITE_OK && newPgsz!=nSrcPgsz ) rc = SQLITE_READONLY;
+  }
+#endif
+
+  /* This loop runs once for each destination page spanned by the source 
+  ** page. For each iteration, variable iOff is set to the byte offset
+  ** of the destination page.
+  */
+  for(iOff=iEnd-(i64)nSrcPgsz; rc==SQLITE_OK && iOff<iEnd; iOff+=nDestPgsz){
+    DbPage *pDestPg = 0;
+    Pgno iDest = (Pgno)(iOff/nDestPgsz)+1;
+    if( iDest==PENDING_BYTE_PAGE(p->pDest->pBt) ) continue;
+    if( SQLITE_OK==(rc = sqlite3PagerGet(pDestPager, iDest, &pDestPg))
+     && SQLITE_OK==(rc = sqlite3PagerWrite(pDestPg))
+    ){
+      const u8 *zIn = &zSrcData[iOff%nSrcPgsz];
+      u8 *zDestData = sqlite3PagerGetData(pDestPg);
+      u8 *zOut = &zDestData[iOff%nDestPgsz];
+
+      /* Copy the data from the source page into the destination page.
+      ** Then clear the Btree layer MemPage.isInit flag. Both this module
+      ** and the pager code use this trick (clearing the first byte
+      ** of the page 'extra' space to invalidate the Btree layers
+      ** cached parse of the page). MemPage.isInit is marked 
+      ** "MUST BE FIRST" for this purpose.
+      */
+      memcpy(zOut, zIn, nCopy);
+      ((u8 *)sqlite3PagerGetExtra(pDestPg))[0] = 0;
+    }
+    sqlite3PagerUnref(pDestPg);
+  }
+
+  return rc;
+}
+
+/*
+** If pFile is currently larger than iSize bytes, then truncate it to
+** exactly iSize bytes. If pFile is not larger than iSize bytes, then
+** this function is a no-op.
+**
+** Return SQLITE_OK if everything is successful, or an SQLite error 
+** code if an error occurs.
+*/
+static int backupTruncateFile(sqlite3_file *pFile, i64 iSize){
+  i64 iCurrent;
+  int rc = sqlite3OsFileSize(pFile, &iCurrent);
+  if( rc==SQLITE_OK && iCurrent>iSize ){
+    rc = sqlite3OsTruncate(pFile, iSize);
+  }
+  return rc;
+}
+
+/*
+** Register this backup object with the associated source pager for
+** callbacks when pages are changed or the cache invalidated.
+*/
+static void attachBackupObject(sqlite3_backup *p){
+  sqlite3_backup **pp;
+  assert( sqlite3BtreeHoldsMutex(p->pSrc) );
+  pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));
+  p->pNext = *pp;
+  *pp = p;
+  p->isAttached = 1;
+}
+
+/*
+** Copy nPage pages from the source b-tree to the destination.
+*/
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage){
+  int rc;
+  int destMode;       /* Destination journal mode */
+  int pgszSrc = 0;    /* Source page size */
+  int pgszDest = 0;   /* Destination page size */
+
+  sqlite3_mutex_enter(p->pSrcDb->mutex);
+  sqlite3BtreeEnter(p->pSrc);
+  if( p->pDestDb ){
+    sqlite3_mutex_enter(p->pDestDb->mutex);
+  }
+
+  rc = p->rc;
+  if( !isFatalError(rc) ){
+    Pager * const pSrcPager = sqlite3BtreePager(p->pSrc);     /* Source pager */
+    Pager * const pDestPager = sqlite3BtreePager(p->pDest);   /* Dest pager */
+    int ii;                            /* Iterator variable */
+    int nSrcPage = -1;                 /* Size of source db in pages */
+    int bCloseTrans = 0;               /* True if src db requires unlocking */
+
+    /* If the source pager is currently in a write-transaction, return
+    ** SQLITE_BUSY immediately.
+    */
+    if( p->pDestDb && p->pSrc->pBt->inTransaction==TRANS_WRITE ){
+      rc = SQLITE_BUSY;
+    }else{
+      rc = SQLITE_OK;
+    }
+
+    /* Lock the destination database, if it is not locked already. */
+    if( SQLITE_OK==rc && p->bDestLocked==0
+     && SQLITE_OK==(rc = sqlite3BtreeBeginTrans(p->pDest, 2)) 
+    ){
+      p->bDestLocked = 1;
+      sqlite3BtreeGetMeta(p->pDest, BTREE_SCHEMA_VERSION, &p->iDestSchema);
+    }
+
+    /* If there is no open read-transaction on the source database, open
+    ** one now. If a transaction is opened here, then it will be closed
+    ** before this function exits.
+    */
+    if( rc==SQLITE_OK && 0==sqlite3BtreeIsInReadTrans(p->pSrc) ){
+      rc = sqlite3BtreeBeginTrans(p->pSrc, 0);
+      bCloseTrans = 1;
+    }
+
+    /* Do not allow backup if the destination database is in WAL mode
+    ** and the page sizes are different between source and destination */
+    pgszSrc = sqlite3BtreeGetPageSize(p->pSrc);
+    pgszDest = sqlite3BtreeGetPageSize(p->pDest);
+    destMode = sqlite3PagerGetJournalMode(sqlite3BtreePager(p->pDest));
+    if( SQLITE_OK==rc && destMode==PAGER_JOURNALMODE_WAL && pgszSrc!=pgszDest ){
+      rc = SQLITE_READONLY;
+    }
+  
+    /* Now that there is a read-lock on the source database, query the
+    ** source pager for the number of pages in the database.
+    */
+    nSrcPage = (int)sqlite3BtreeLastPage(p->pSrc);
+    assert( nSrcPage>=0 );
+    for(ii=0; (nPage<0 || ii<nPage) && p->iNext<=(Pgno)nSrcPage && !rc; ii++){
+      const Pgno iSrcPg = p->iNext;                 /* Source page number */
+      if( iSrcPg!=PENDING_BYTE_PAGE(p->pSrc->pBt) ){
+        DbPage *pSrcPg;                             /* Source page object */
+        rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg);
+        if( rc==SQLITE_OK ){
+          rc = backupOnePage(p, iSrcPg, sqlite3PagerGetData(pSrcPg));
+          sqlite3PagerUnref(pSrcPg);
+        }
+      }
+      p->iNext++;
+    }
+    if( rc==SQLITE_OK ){
+      p->nPagecount = nSrcPage;
+      p->nRemaining = nSrcPage+1-p->iNext;
+      if( p->iNext>(Pgno)nSrcPage ){
+        rc = SQLITE_DONE;
+      }else if( !p->isAttached ){
+        attachBackupObject(p);
+      }
+    }
+  
+    /* Update the schema version field in the destination database. This
+    ** is to make sure that the schema-version really does change in
+    ** the case where the source and destination databases have the
+    ** same schema version.
+    */
+    if( rc==SQLITE_DONE 
+     && (rc = sqlite3BtreeUpdateMeta(p->pDest,1,p->iDestSchema+1))==SQLITE_OK
+    ){
+      int nDestTruncate;
+  
+      if( p->pDestDb ){
+        sqlite3ResetInternalSchema(p->pDestDb, -1);
+      }
+
+      /* Set nDestTruncate to the final number of pages in the destination
+      ** database. The complication here is that the destination page
+      ** size may be different to the source page size. 
+      **
+      ** If the source page size is smaller than the destination page size, 
+      ** round up. In this case the call to sqlite3OsTruncate() below will
+      ** fix the size of the file. However it is important to call
+      ** sqlite3PagerTruncateImage() here so that any pages in the 
+      ** destination file that lie beyond the nDestTruncate page mark are
+      ** journalled by PagerCommitPhaseOne() before they are destroyed
+      ** by the file truncation.
+      */
+      assert( pgszSrc==sqlite3BtreeGetPageSize(p->pSrc) );
+      assert( pgszDest==sqlite3BtreeGetPageSize(p->pDest) );
+      if( pgszSrc<pgszDest ){
+        int ratio = pgszDest/pgszSrc;
+        nDestTruncate = (nSrcPage+ratio-1)/ratio;
+        if( nDestTruncate==(int)PENDING_BYTE_PAGE(p->pDest->pBt) ){
+          nDestTruncate--;
+        }
+      }else{
+        nDestTruncate = nSrcPage * (pgszSrc/pgszDest);
+      }
+      sqlite3PagerTruncateImage(pDestPager, nDestTruncate);
+
+      if( pgszSrc<pgszDest ){
+        /* If the source page-size is smaller than the destination page-size,
+        ** two extra things may need to happen:
+        **
+        **   * The destination may need to be truncated, and
+        **
+        **   * Data stored on the pages immediately following the 
+        **     pending-byte page in the source database may need to be
+        **     copied into the destination database.
+        */
+        const i64 iSize = (i64)pgszSrc * (i64)nSrcPage;
+        sqlite3_file * const pFile = sqlite3PagerFile(pDestPager);
+        i64 iOff;
+        i64 iEnd;
+
+        assert( pFile );
+        assert( (i64)nDestTruncate*(i64)pgszDest >= iSize || (
+              nDestTruncate==(int)(PENDING_BYTE_PAGE(p->pDest->pBt)-1)
+           && iSize>=PENDING_BYTE && iSize<=PENDING_BYTE+pgszDest
+        ));
+
+        /* This call ensures that all data required to recreate the original
+        ** database has been stored in the journal for pDestPager and the
+        ** journal synced to disk. So at this point we may safely modify
+        ** the database file in any way, knowing that if a power failure
+        ** occurs, the original database will be reconstructed from the 
+        ** journal file.  */
+        rc = sqlite3PagerCommitPhaseOne(pDestPager, 0, 1);
+
+        /* Write the extra pages and truncate the database file as required. */
+        iEnd = MIN(PENDING_BYTE + pgszDest, iSize);
+        for(
+          iOff=PENDING_BYTE+pgszSrc; 
+          rc==SQLITE_OK && iOff<iEnd; 
+          iOff+=pgszSrc
+        ){
+          PgHdr *pSrcPg = 0;
+          const Pgno iSrcPg = (Pgno)((iOff/pgszSrc)+1);
+          rc = sqlite3PagerGet(pSrcPager, iSrcPg, &pSrcPg);
+          if( rc==SQLITE_OK ){
+            u8 *zData = sqlite3PagerGetData(pSrcPg);
+            rc = sqlite3OsWrite(pFile, zData, pgszSrc, iOff);
+          }
+          sqlite3PagerUnref(pSrcPg);
+        }
+        if( rc==SQLITE_OK ){
+          rc = backupTruncateFile(pFile, iSize);
+        }
+
+        /* Sync the database file to disk. */
+        if( rc==SQLITE_OK ){
+          rc = sqlite3PagerSync(pDestPager);
+        }
+      }else{
+        rc = sqlite3PagerCommitPhaseOne(pDestPager, 0, 0);
+      }
+  
+      /* Finish committing the transaction to the destination database. */
+      if( SQLITE_OK==rc
+       && SQLITE_OK==(rc = sqlite3BtreeCommitPhaseTwo(p->pDest, 0))
+      ){
+        rc = SQLITE_DONE;
+      }
+    }
+  
+    /* If bCloseTrans is true, then this function opened a read transaction
+    ** on the source database. Close the read transaction here. There is
+    ** no need to check the return values of the btree methods here, as
+    ** "committing" a read-only transaction cannot fail.
+    */
+    if( bCloseTrans ){
+      TESTONLY( int rc2 );
+      TESTONLY( rc2  = ) sqlite3BtreeCommitPhaseOne(p->pSrc, 0);
+      TESTONLY( rc2 |= ) sqlite3BtreeCommitPhaseTwo(p->pSrc, 0);
+      assert( rc2==SQLITE_OK );
+    }
+  
+    if( rc==SQLITE_IOERR_NOMEM ){
+      rc = SQLITE_NOMEM;
+    }
+    p->rc = rc;
+  }
+  if( p->pDestDb ){
+    sqlite3_mutex_leave(p->pDestDb->mutex);
+  }
+  sqlite3BtreeLeave(p->pSrc);
+  sqlite3_mutex_leave(p->pSrcDb->mutex);
+  return rc;
+}
+
+/*
+** Release all resources associated with an sqlite3_backup* handle.
+*/
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p){
+  sqlite3_backup **pp;                 /* Ptr to head of pagers backup list */
+  sqlite3_mutex *mutex;                /* Mutex to protect source database */
+  int rc;                              /* Value to return */
+
+  /* Enter the mutexes */
+  if( p==0 ) return SQLITE_OK;
+  sqlite3_mutex_enter(p->pSrcDb->mutex);
+  sqlite3BtreeEnter(p->pSrc);
+  mutex = p->pSrcDb->mutex;
+  if( p->pDestDb ){
+    sqlite3_mutex_enter(p->pDestDb->mutex);
+  }
+
+  /* Detach this backup from the source pager. */
+  if( p->pDestDb ){
+    p->pSrc->nBackup--;
+  }
+  if( p->isAttached ){
+    pp = sqlite3PagerBackupPtr(sqlite3BtreePager(p->pSrc));
+    while( *pp!=p ){
+      pp = &(*pp)->pNext;
+    }
+    *pp = p->pNext;
+  }
+
+  /* If a transaction is still open on the Btree, roll it back. */
+  sqlite3BtreeRollback(p->pDest);
+
+  /* Set the error code of the destination database handle. */
+  rc = (p->rc==SQLITE_DONE) ? SQLITE_OK : p->rc;
+  sqlite3Error(p->pDestDb, rc, 0);
+
+  /* Exit the mutexes and free the backup context structure. */
+  if( p->pDestDb ){
+    sqlite3_mutex_leave(p->pDestDb->mutex);
+  }
+  sqlite3BtreeLeave(p->pSrc);
+  if( p->pDestDb ){
+    /* EVIDENCE-OF: R-64852-21591 The sqlite3_backup object is created by a
+    ** call to sqlite3_backup_init() and is destroyed by a call to
+    ** sqlite3_backup_finish(). */
+    sqlite3_free(p);
+  }
+  sqlite3_mutex_leave(mutex);
+  return rc;
+}
+
+/*
+** Return the number of pages still to be backed up as of the most recent
+** call to sqlite3_backup_step().
+*/
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p){
+  return p->nRemaining;
+}
+
+/*
+** Return the total number of pages in the source database as of the most 
+** recent call to sqlite3_backup_step().
+*/
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p){
+  return p->nPagecount;
+}
+
+/*
+** This function is called after the contents of page iPage of the
+** source database have been modified. If page iPage has already been 
+** copied into the destination database, then the data written to the
+** destination is now invalidated. The destination copy of iPage needs
+** to be updated with the new data before the backup operation is
+** complete.
+**
+** It is assumed that the mutex associated with the BtShared object
+** corresponding to the source database is held when this function is
+** called.
+*/
+SQLITE_PRIVATE void sqlite3BackupUpdate(sqlite3_backup *pBackup, Pgno iPage, const u8 *aData){
+  sqlite3_backup *p;                   /* Iterator variable */
+  for(p=pBackup; p; p=p->pNext){
+    assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );
+    if( !isFatalError(p->rc) && iPage<p->iNext ){
+      /* The backup process p has already copied page iPage. But now it
+      ** has been modified by a transaction on the source pager. Copy
+      ** the new data into the backup.
+      */
+      int rc;
+      assert( p->pDestDb );
+      sqlite3_mutex_enter(p->pDestDb->mutex);
+      rc = backupOnePage(p, iPage, aData);
+      sqlite3_mutex_leave(p->pDestDb->mutex);
+      assert( rc!=SQLITE_BUSY && rc!=SQLITE_LOCKED );
+      if( rc!=SQLITE_OK ){
+        p->rc = rc;
+      }
+    }
+  }
+}
+
+/*
+** Restart the backup process. This is called when the pager layer
+** detects that the database has been modified by an external database
+** connection. In this case there is no way of knowing which of the
+** pages that have been copied into the destination database are still 
+** valid and which are not, so the entire process needs to be restarted.
+**
+** It is assumed that the mutex associated with the BtShared object
+** corresponding to the source database is held when this function is
+** called.
+*/
+SQLITE_PRIVATE void sqlite3BackupRestart(sqlite3_backup *pBackup){
+  sqlite3_backup *p;                   /* Iterator variable */
+  for(p=pBackup; p; p=p->pNext){
+    assert( sqlite3_mutex_held(p->pSrc->pBt->mutex) );
+    p->iNext = 1;
+  }
+}
+
+#ifndef SQLITE_OMIT_VACUUM
+/*
+** Copy the complete content of pBtFrom into pBtTo.  A transaction
+** must be active for both files.
+**
+** The size of file pTo may be reduced by this operation. If anything 
+** goes wrong, the transaction on pTo is rolled back. If successful, the 
+** transaction is committed before returning.
+*/
+SQLITE_PRIVATE int sqlite3BtreeCopyFile(Btree *pTo, Btree *pFrom){
+  int rc;
+  sqlite3_backup b;
+  sqlite3BtreeEnter(pTo);
+  sqlite3BtreeEnter(pFrom);
+
+  /* Set up an sqlite3_backup object. sqlite3_backup.pDestDb must be set
+  ** to 0. This is used by the implementations of sqlite3_backup_step()
+  ** and sqlite3_backup_finish() to detect that they are being called
+  ** from this function, not directly by the user.
+  */
+  memset(&b, 0, sizeof(b));
+  b.pSrcDb = pFrom->db;
+  b.pSrc = pFrom;
+  b.pDest = pTo;
+  b.iNext = 1;
+
+  /* 0x7FFFFFFF is the hard limit for the number of pages in a database
+  ** file. By passing this as the number of pages to copy to
+  ** sqlite3_backup_step(), we can guarantee that the copy finishes 
+  ** within a single call (unless an error occurs). The assert() statement
+  ** checks this assumption - (p->rc) should be set to either SQLITE_DONE 
+  ** or an error code.
+  */
+  sqlite3_backup_step(&b, 0x7FFFFFFF);
+  assert( b.rc!=SQLITE_OK );
+  rc = sqlite3_backup_finish(&b);
+  if( rc==SQLITE_OK ){
+    pTo->pBt->pageSizeFixed = 0;
+  }
+
+  sqlite3BtreeLeave(pFrom);
+  sqlite3BtreeLeave(pTo);
+  return rc;
+}
+#endif /* SQLITE_OMIT_VACUUM */
+
+/************** End of backup.c **********************************************/
+/************** Begin file vdbemem.c *****************************************/
+/*
+** 2004 May 26
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains code use to manipulate "Mem" structure.  A "Mem"
+** stores a single value in the VDBE.  Mem is an opaque structure visible
+** only within the VDBE.  Interface routines refer to a Mem using the
+** name sqlite_value
+*/
+
+/*
+** Call sqlite3VdbeMemExpandBlob() on the supplied value (type Mem*)
+** P if required.
+*/
+#define expandBlob(P) (((P)->flags&MEM_Zero)?sqlite3VdbeMemExpandBlob(P):0)
+
+/*
+** If pMem is an object with a valid string representation, this routine
+** ensures the internal encoding for the string representation is
+** 'desiredEnc', one of SQLITE_UTF8, SQLITE_UTF16LE or SQLITE_UTF16BE.
+**
+** If pMem is not a string object, or the encoding of the string
+** representation is already stored using the requested encoding, then this
+** routine is a no-op.
+**
+** SQLITE_OK is returned if the conversion is successful (or not required).
+** SQLITE_NOMEM may be returned if a malloc() fails during conversion
+** between formats.
+*/
+SQLITE_PRIVATE int sqlite3VdbeChangeEncoding(Mem *pMem, int desiredEnc){
+  int rc;
+  assert( (pMem->flags&MEM_RowSet)==0 );
+  assert( desiredEnc==SQLITE_UTF8 || desiredEnc==SQLITE_UTF16LE
+           || desiredEnc==SQLITE_UTF16BE );
+  if( !(pMem->flags&MEM_Str) || pMem->enc==desiredEnc ){
+    return SQLITE_OK;
+  }
+  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+#ifdef SQLITE_OMIT_UTF16
+  return SQLITE_ERROR;
+#else
+
+  /* MemTranslate() may return SQLITE_OK or SQLITE_NOMEM. If NOMEM is returned,
+  ** then the encoding of the value may not have changed.
+  */
+  rc = sqlite3VdbeMemTranslate(pMem, (u8)desiredEnc);
+  assert(rc==SQLITE_OK    || rc==SQLITE_NOMEM);
+  assert(rc==SQLITE_OK    || pMem->enc!=desiredEnc);
+  assert(rc==SQLITE_NOMEM || pMem->enc==desiredEnc);
+  return rc;
+#endif
+}
+
+/*
+** Make sure pMem->z points to a writable allocation of at least 
+** n bytes.
+**
+** If the memory cell currently contains string or blob data
+** and the third argument passed to this function is true, the 
+** current content of the cell is preserved. Otherwise, it may
+** be discarded.  
+**
+** This function sets the MEM_Dyn flag and clears any xDel callback.
+** It also clears MEM_Ephem and MEM_Static. If the preserve flag is 
+** not set, Mem.n is zeroed.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemGrow(Mem *pMem, int n, int preserve){
+  assert( 1 >=
+    ((pMem->zMalloc && pMem->zMalloc==pMem->z) ? 1 : 0) +
+    (((pMem->flags&MEM_Dyn)&&pMem->xDel) ? 1 : 0) + 
+    ((pMem->flags&MEM_Ephem) ? 1 : 0) + 
+    ((pMem->flags&MEM_Static) ? 1 : 0)
+  );
+  assert( (pMem->flags&MEM_RowSet)==0 );
+
+  if( n<32 ) n = 32;
+  if( sqlite3DbMallocSize(pMem->db, pMem->zMalloc)<n ){
+    if( preserve && pMem->z==pMem->zMalloc ){
+      pMem->z = pMem->zMalloc = sqlite3DbReallocOrFree(pMem->db, pMem->z, n);
+      preserve = 0;
+    }else{
+      sqlite3DbFree(pMem->db, pMem->zMalloc);
+      pMem->zMalloc = sqlite3DbMallocRaw(pMem->db, n);
+    }
+  }
+
+  if( pMem->z && preserve && pMem->zMalloc && pMem->z!=pMem->zMalloc ){
+    memcpy(pMem->zMalloc, pMem->z, pMem->n);
+  }
+  if( pMem->flags&MEM_Dyn && pMem->xDel ){
+    pMem->xDel((void *)(pMem->z));
+  }
+
+  pMem->z = pMem->zMalloc;
+  if( pMem->z==0 ){
+    pMem->flags = MEM_Null;
+  }else{
+    pMem->flags &= ~(MEM_Ephem|MEM_Static);
+  }
+  pMem->xDel = 0;
+  return (pMem->z ? SQLITE_OK : SQLITE_NOMEM);
+}
+
+/*
+** Make the given Mem object MEM_Dyn.  In other words, make it so
+** that any TEXT or BLOB content is stored in memory obtained from
+** malloc().  In this way, we know that the memory is safe to be
+** overwritten or altered.
+**
+** Return SQLITE_OK on success or SQLITE_NOMEM if malloc fails.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemMakeWriteable(Mem *pMem){
+  int f;
+  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+  assert( (pMem->flags&MEM_RowSet)==0 );
+  expandBlob(pMem);
+  f = pMem->flags;
+  if( (f&(MEM_Str|MEM_Blob)) && pMem->z!=pMem->zMalloc ){
+    if( sqlite3VdbeMemGrow(pMem, pMem->n + 2, 1) ){
+      return SQLITE_NOMEM;
+    }
+    pMem->z[pMem->n] = 0;
+    pMem->z[pMem->n+1] = 0;
+    pMem->flags |= MEM_Term;
+#ifdef SQLITE_DEBUG
+    pMem->pScopyFrom = 0;
+#endif
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** If the given Mem* has a zero-filled tail, turn it into an ordinary
+** blob stored in dynamically allocated space.
+*/
+#ifndef SQLITE_OMIT_INCRBLOB
+SQLITE_PRIVATE int sqlite3VdbeMemExpandBlob(Mem *pMem){
+  if( pMem->flags & MEM_Zero ){
+    int nByte;
+    assert( pMem->flags&MEM_Blob );
+    assert( (pMem->flags&MEM_RowSet)==0 );
+    assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+
+    /* Set nByte to the number of bytes required to store the expanded blob. */
+    nByte = pMem->n + pMem->u.nZero;
+    if( nByte<=0 ){
+      nByte = 1;
+    }
+    if( sqlite3VdbeMemGrow(pMem, nByte, 1) ){
+      return SQLITE_NOMEM;
+    }
+
+    memset(&pMem->z[pMem->n], 0, pMem->u.nZero);
+    pMem->n += pMem->u.nZero;
+    pMem->flags &= ~(MEM_Zero|MEM_Term);
+  }
+  return SQLITE_OK;
+}
+#endif
+
+
+/*
+** Make sure the given Mem is \u0000 terminated.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemNulTerminate(Mem *pMem){
+  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+  if( (pMem->flags & MEM_Term)!=0 || (pMem->flags & MEM_Str)==0 ){
+    return SQLITE_OK;   /* Nothing to do */
+  }
+  if( sqlite3VdbeMemGrow(pMem, pMem->n+2, 1) ){
+    return SQLITE_NOMEM;
+  }
+  pMem->z[pMem->n] = 0;
+  pMem->z[pMem->n+1] = 0;
+  pMem->flags |= MEM_Term;
+  return SQLITE_OK;
+}
+
+/*
+** Add MEM_Str to the set of representations for the given Mem.  Numbers
+** are converted using sqlite3_snprintf().  Converting a BLOB to a string
+** is a no-op.
+**
+** Existing representations MEM_Int and MEM_Real are *not* invalidated.
+**
+** A MEM_Null value will never be passed to this function. This function is
+** used for converting values to text for returning to the user (i.e. via
+** sqlite3_value_text()), or for ensuring that values to be used as btree
+** keys are strings. In the former case a NULL pointer is returned the
+** user and the later is an internal programming error.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemStringify(Mem *pMem, int enc){
+  int rc = SQLITE_OK;
+  int fg = pMem->flags;
+  const int nByte = 32;
+
+  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+  assert( !(fg&MEM_Zero) );
+  assert( !(fg&(MEM_Str|MEM_Blob)) );
+  assert( fg&(MEM_Int|MEM_Real) );
+  assert( (pMem->flags&MEM_RowSet)==0 );
+  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
+
+
+  if( sqlite3VdbeMemGrow(pMem, nByte, 0) ){
+    return SQLITE_NOMEM;
+  }
+
+  /* For a Real or Integer, use sqlite3_mprintf() to produce the UTF-8
+  ** string representation of the value. Then, if the required encoding
+  ** is UTF-16le or UTF-16be do a translation.
+  ** 
+  ** FIX ME: It would be better if sqlite3_snprintf() could do UTF-16.
+  */
+  if( fg & MEM_Int ){
+    sqlite3_snprintf(nByte, pMem->z, "%lld", pMem->u.i);
+  }else{
+    assert( fg & MEM_Real );
+    sqlite3_snprintf(nByte, pMem->z, "%!.15g", pMem->r);
+  }
+  pMem->n = sqlite3Strlen30(pMem->z);
+  pMem->enc = SQLITE_UTF8;
+  pMem->flags |= MEM_Str|MEM_Term;
+  sqlite3VdbeChangeEncoding(pMem, enc);
+  return rc;
+}
+
+/*
+** Memory cell pMem contains the context of an aggregate function.
+** This routine calls the finalize method for that function.  The
+** result of the aggregate is stored back into pMem.
+**
+** Return SQLITE_ERROR if the finalizer reports an error.  SQLITE_OK
+** otherwise.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemFinalize(Mem *pMem, FuncDef *pFunc){
+  int rc = SQLITE_OK;
+  if( ALWAYS(pFunc && pFunc->xFinalize) ){
+    sqlite3_context ctx;
+    assert( (pMem->flags & MEM_Null)!=0 || pFunc==pMem->u.pDef );
+    assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+    memset(&ctx, 0, sizeof(ctx));
+    ctx.s.flags = MEM_Null;
+    ctx.s.db = pMem->db;
+    ctx.pMem = pMem;
+    ctx.pFunc = pFunc;
+    pFunc->xFinalize(&ctx); /* IMP: R-24505-23230 */
+    assert( 0==(pMem->flags&MEM_Dyn) && !pMem->xDel );
+    sqlite3DbFree(pMem->db, pMem->zMalloc);
+    memcpy(pMem, &ctx.s, sizeof(ctx.s));
+    rc = ctx.isError;
+  }
+  return rc;
+}
+
+/*
+** If the memory cell contains a string value that must be freed by
+** invoking an external callback, free it now. Calling this function
+** does not free any Mem.zMalloc buffer.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemReleaseExternal(Mem *p){
+  assert( p->db==0 || sqlite3_mutex_held(p->db->mutex) );
+  testcase( p->flags & MEM_Agg );
+  testcase( p->flags & MEM_Dyn );
+  testcase( p->flags & MEM_RowSet );
+  testcase( p->flags & MEM_Frame );
+  if( p->flags&(MEM_Agg|MEM_Dyn|MEM_RowSet|MEM_Frame) ){
+    if( p->flags&MEM_Agg ){
+      sqlite3VdbeMemFinalize(p, p->u.pDef);
+      assert( (p->flags & MEM_Agg)==0 );
+      sqlite3VdbeMemRelease(p);
+    }else if( p->flags&MEM_Dyn && p->xDel ){
+      assert( (p->flags&MEM_RowSet)==0 );
+      p->xDel((void *)p->z);
+      p->xDel = 0;
+    }else if( p->flags&MEM_RowSet ){
+      sqlite3RowSetClear(p->u.pRowSet);
+    }else if( p->flags&MEM_Frame ){
+      sqlite3VdbeMemSetNull(p);
+    }
+  }
+}
+
+/*
+** Release any memory held by the Mem. This may leave the Mem in an
+** inconsistent state, for example with (Mem.z==0) and
+** (Mem.type==SQLITE_TEXT).
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemRelease(Mem *p){
+  sqlite3VdbeMemReleaseExternal(p);
+  sqlite3DbFree(p->db, p->zMalloc);
+  p->z = 0;
+  p->zMalloc = 0;
+  p->xDel = 0;
+}
+
+/*
+** Convert a 64-bit IEEE double into a 64-bit signed integer.
+** If the double is too large, return 0x8000000000000000.
+**
+** Most systems appear to do this simply by assigning
+** variables and without the extra range tests.  But
+** there are reports that windows throws an expection
+** if the floating point value is out of range. (See ticket #2880.)
+** Because we do not completely understand the problem, we will
+** take the conservative approach and always do range tests
+** before attempting the conversion.
+*/
+static i64 doubleToInt64(double r){
+#ifdef SQLITE_OMIT_FLOATING_POINT
+  /* When floating-point is omitted, double and int64 are the same thing */
+  return r;
+#else
+  /*
+  ** Many compilers we encounter do not define constants for the
+  ** minimum and maximum 64-bit integers, or they define them
+  ** inconsistently.  And many do not understand the "LL" notation.
+  ** So we define our own static constants here using nothing
+  ** larger than a 32-bit integer constant.
+  */
+  static const i64 maxInt = LARGEST_INT64;
+  static const i64 minInt = SMALLEST_INT64;
+
+  if( r<(double)minInt ){
+    return minInt;
+  }else if( r>(double)maxInt ){
+    /* minInt is correct here - not maxInt.  It turns out that assigning
+    ** a very large positive number to an integer results in a very large
+    ** negative integer.  This makes no sense, but it is what x86 hardware
+    ** does so for compatibility we will do the same in software. */
+    return minInt;
+  }else{
+    return (i64)r;
+  }
+#endif
+}
+
+/*
+** Return some kind of integer value which is the best we can do
+** at representing the value that *pMem describes as an integer.
+** If pMem is an integer, then the value is exact.  If pMem is
+** a floating-point then the value returned is the integer part.
+** If pMem is a string or blob, then we make an attempt to convert
+** it into a integer and return that.  If pMem represents an
+** an SQL-NULL value, return 0.
+**
+** If pMem represents a string value, its encoding might be changed.
+*/
+SQLITE_PRIVATE i64 sqlite3VdbeIntValue(Mem *pMem){
+  int flags;
+  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
+  flags = pMem->flags;
+  if( flags & MEM_Int ){
+    return pMem->u.i;
+  }else if( flags & MEM_Real ){
+    return doubleToInt64(pMem->r);
+  }else if( flags & (MEM_Str|MEM_Blob) ){
+    i64 value = 0;
+    assert( pMem->z || pMem->n==0 );
+    testcase( pMem->z==0 );
+    sqlite3Atoi64(pMem->z, &value, pMem->n, pMem->enc);
+    return value;
+  }else{
+    return 0;
+  }
+}
+
+/*
+** Return the best representation of pMem that we can get into a
+** double.  If pMem is already a double or an integer, return its
+** value.  If it is a string or blob, try to convert it to a double.
+** If it is a NULL, return 0.0.
+*/
+SQLITE_PRIVATE double sqlite3VdbeRealValue(Mem *pMem){
+  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
+  if( pMem->flags & MEM_Real ){
+    return pMem->r;
+  }else if( pMem->flags & MEM_Int ){
+    return (double)pMem->u.i;
+  }else if( pMem->flags & (MEM_Str|MEM_Blob) ){
+    /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
+    double val = (double)0;
+    sqlite3AtoF(pMem->z, &val, pMem->n, pMem->enc);
+    return val;
+  }else{
+    /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
+    return (double)0;
+  }
+}
+
+/*
+** The MEM structure is already a MEM_Real.  Try to also make it a
+** MEM_Int if we can.
+*/
+SQLITE_PRIVATE void sqlite3VdbeIntegerAffinity(Mem *pMem){
+  assert( pMem->flags & MEM_Real );
+  assert( (pMem->flags & MEM_RowSet)==0 );
+  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
+
+  pMem->u.i = doubleToInt64(pMem->r);
+
+  /* Only mark the value as an integer if
+  **
+  **    (1) the round-trip conversion real->int->real is a no-op, and
+  **    (2) The integer is neither the largest nor the smallest
+  **        possible integer (ticket #3922)
+  **
+  ** The second and third terms in the following conditional enforces
+  ** the second condition under the assumption that addition overflow causes
+  ** values to wrap around.  On x86 hardware, the third term is always
+  ** true and could be omitted.  But we leave it in because other
+  ** architectures might behave differently.
+  */
+  if( pMem->r==(double)pMem->u.i && pMem->u.i>SMALLEST_INT64
+      && ALWAYS(pMem->u.i<LARGEST_INT64) ){
+    pMem->flags |= MEM_Int;
+  }
+}
+
+/*
+** Convert pMem to type integer.  Invalidate any prior representations.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemIntegerify(Mem *pMem){
+  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+  assert( (pMem->flags & MEM_RowSet)==0 );
+  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
+
+  pMem->u.i = sqlite3VdbeIntValue(pMem);
+  MemSetTypeFlag(pMem, MEM_Int);
+  return SQLITE_OK;
+}
+
+/*
+** Convert pMem so that it is of type MEM_Real.
+** Invalidate any prior representations.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemRealify(Mem *pMem){
+  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
+
+  pMem->r = sqlite3VdbeRealValue(pMem);
+  MemSetTypeFlag(pMem, MEM_Real);
+  return SQLITE_OK;
+}
+
+/*
+** Convert pMem so that it has types MEM_Real or MEM_Int or both.
+** Invalidate any prior representations.
+**
+** Every effort is made to force the conversion, even if the input
+** is a string that does not look completely like a number.  Convert
+** as much of the string as we can and ignore the rest.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemNumerify(Mem *pMem){
+  if( (pMem->flags & (MEM_Int|MEM_Real|MEM_Null))==0 ){
+    assert( (pMem->flags & (MEM_Blob|MEM_Str))!=0 );
+    assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+    if( 0==sqlite3Atoi64(pMem->z, &pMem->u.i, pMem->n, pMem->enc) ){
+      MemSetTypeFlag(pMem, MEM_Int);
+    }else{
+      pMem->r = sqlite3VdbeRealValue(pMem);
+      MemSetTypeFlag(pMem, MEM_Real);
+      sqlite3VdbeIntegerAffinity(pMem);
+    }
+  }
+  assert( (pMem->flags & (MEM_Int|MEM_Real|MEM_Null))!=0 );
+  pMem->flags &= ~(MEM_Str|MEM_Blob);
+  return SQLITE_OK;
+}
+
+/*
+** Delete any previous value and set the value stored in *pMem to NULL.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemSetNull(Mem *pMem){
+  if( pMem->flags & MEM_Frame ){
+    VdbeFrame *pFrame = pMem->u.pFrame;
+    pFrame->pParent = pFrame->v->pDelFrame;
+    pFrame->v->pDelFrame = pFrame;
+  }
+  if( pMem->flags & MEM_RowSet ){
+    sqlite3RowSetClear(pMem->u.pRowSet);
+  }
+  MemSetTypeFlag(pMem, MEM_Null);
+  pMem->type = SQLITE_NULL;
+}
+
+/*
+** Delete any previous value and set the value to be a BLOB of length
+** n containing all zeros.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemSetZeroBlob(Mem *pMem, int n){
+  sqlite3VdbeMemRelease(pMem);
+  pMem->flags = MEM_Blob|MEM_Zero;
+  pMem->type = SQLITE_BLOB;
+  pMem->n = 0;
+  if( n<0 ) n = 0;
+  pMem->u.nZero = n;
+  pMem->enc = SQLITE_UTF8;
+
+#ifdef SQLITE_OMIT_INCRBLOB
+  sqlite3VdbeMemGrow(pMem, n, 0);
+  if( pMem->z ){
+    pMem->n = n;
+    memset(pMem->z, 0, n);
+  }
+#endif
+}
+
+/*
+** Delete any previous value and set the value stored in *pMem to val,
+** manifest type INTEGER.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemSetInt64(Mem *pMem, i64 val){
+  sqlite3VdbeMemRelease(pMem);
+  pMem->u.i = val;
+  pMem->flags = MEM_Int;
+  pMem->type = SQLITE_INTEGER;
+}
+
+#ifndef SQLITE_OMIT_FLOATING_POINT
+/*
+** Delete any previous value and set the value stored in *pMem to val,
+** manifest type REAL.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemSetDouble(Mem *pMem, double val){
+  if( sqlite3IsNaN(val) ){
+    sqlite3VdbeMemSetNull(pMem);
+  }else{
+    sqlite3VdbeMemRelease(pMem);
+    pMem->r = val;
+    pMem->flags = MEM_Real;
+    pMem->type = SQLITE_FLOAT;
+  }
+}
+#endif
+
+/*
+** Delete any previous value and set the value of pMem to be an
+** empty boolean index.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemSetRowSet(Mem *pMem){
+  sqlite3 *db = pMem->db;
+  assert( db!=0 );
+  assert( (pMem->flags & MEM_RowSet)==0 );
+  sqlite3VdbeMemRelease(pMem);
+  pMem->zMalloc = sqlite3DbMallocRaw(db, 64);
+  if( db->mallocFailed ){
+    pMem->flags = MEM_Null;
+  }else{
+    assert( pMem->zMalloc );
+    pMem->u.pRowSet = sqlite3RowSetInit(db, pMem->zMalloc, 
+                                       sqlite3DbMallocSize(db, pMem->zMalloc));
+    assert( pMem->u.pRowSet!=0 );
+    pMem->flags = MEM_RowSet;
+  }
+}
+
+/*
+** Return true if the Mem object contains a TEXT or BLOB that is
+** too large - whose size exceeds SQLITE_MAX_LENGTH.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemTooBig(Mem *p){
+  assert( p->db!=0 );
+  if( p->flags & (MEM_Str|MEM_Blob) ){
+    int n = p->n;
+    if( p->flags & MEM_Zero ){
+      n += p->u.nZero;
+    }
+    return n>p->db->aLimit[SQLITE_LIMIT_LENGTH];
+  }
+  return 0; 
+}
+
+#ifdef SQLITE_DEBUG
+/*
+** This routine prepares a memory cell for modication by breaking
+** its link to a shallow copy and by marking any current shallow
+** copies of this cell as invalid.
+**
+** This is used for testing and debugging only - to make sure shallow
+** copies are not misused.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemPrepareToChange(Vdbe *pVdbe, Mem *pMem){
+  int i;
+  Mem *pX;
+  for(i=1, pX=&pVdbe->aMem[1]; i<=pVdbe->nMem; i++, pX++){
+    if( pX->pScopyFrom==pMem ){
+      pX->flags |= MEM_Invalid;
+      pX->pScopyFrom = 0;
+    }
+  }
+  pMem->pScopyFrom = 0;
+}
+#endif /* SQLITE_DEBUG */
+
+/*
+** Size of struct Mem not including the Mem.zMalloc member.
+*/
+#define MEMCELLSIZE (size_t)(&(((Mem *)0)->zMalloc))
+
+/*
+** Make an shallow copy of pFrom into pTo.  Prior contents of
+** pTo are freed.  The pFrom->z field is not duplicated.  If
+** pFrom->z is used, then pTo->z points to the same thing as pFrom->z
+** and flags gets srcType (either MEM_Ephem or MEM_Static).
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemShallowCopy(Mem *pTo, const Mem *pFrom, int srcType){
+  assert( (pFrom->flags & MEM_RowSet)==0 );
+  sqlite3VdbeMemReleaseExternal(pTo);
+  memcpy(pTo, pFrom, MEMCELLSIZE);
+  pTo->xDel = 0;
+  if( (pFrom->flags&MEM_Static)==0 ){
+    pTo->flags &= ~(MEM_Dyn|MEM_Static|MEM_Ephem);
+    assert( srcType==MEM_Ephem || srcType==MEM_Static );
+    pTo->flags |= srcType;
+  }
+}
+
+/*
+** Make a full copy of pFrom into pTo.  Prior contents of pTo are
+** freed before the copy is made.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemCopy(Mem *pTo, const Mem *pFrom){
+  int rc = SQLITE_OK;
+
+  assert( (pFrom->flags & MEM_RowSet)==0 );
+  sqlite3VdbeMemReleaseExternal(pTo);
+  memcpy(pTo, pFrom, MEMCELLSIZE);
+  pTo->flags &= ~MEM_Dyn;
+
+  if( pTo->flags&(MEM_Str|MEM_Blob) ){
+    if( 0==(pFrom->flags&MEM_Static) ){
+      pTo->flags |= MEM_Ephem;
+      rc = sqlite3VdbeMemMakeWriteable(pTo);
+    }
+  }
+
+  return rc;
+}
+
+/*
+** Transfer the contents of pFrom to pTo. Any existing value in pTo is
+** freed. If pFrom contains ephemeral data, a copy is made.
+**
+** pFrom contains an SQL NULL when this routine returns.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemMove(Mem *pTo, Mem *pFrom){
+  assert( pFrom->db==0 || sqlite3_mutex_held(pFrom->db->mutex) );
+  assert( pTo->db==0 || sqlite3_mutex_held(pTo->db->mutex) );
+  assert( pFrom->db==0 || pTo->db==0 || pFrom->db==pTo->db );
+
+  sqlite3VdbeMemRelease(pTo);
+  memcpy(pTo, pFrom, sizeof(Mem));
+  pFrom->flags = MEM_Null;
+  pFrom->xDel = 0;
+  pFrom->zMalloc = 0;
+}
+
+/*
+** Change the value of a Mem to be a string or a BLOB.
+**
+** The memory management strategy depends on the value of the xDel
+** parameter. If the value passed is SQLITE_TRANSIENT, then the 
+** string is copied into a (possibly existing) buffer managed by the 
+** Mem structure. Otherwise, any existing buffer is freed and the
+** pointer copied.
+**
+** If the string is too large (if it exceeds the SQLITE_LIMIT_LENGTH
+** size limit) then no memory allocation occurs.  If the string can be
+** stored without allocating memory, then it is.  If a memory allocation
+** is required to store the string, then value of pMem is unchanged.  In
+** either case, SQLITE_TOOBIG is returned.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemSetStr(
+  Mem *pMem,          /* Memory cell to set to string value */
+  const char *z,      /* String pointer */
+  int n,              /* Bytes in string, or negative */
+  u8 enc,             /* Encoding of z.  0 for BLOBs */
+  void (*xDel)(void*) /* Destructor function */
+){
+  int nByte = n;      /* New value for pMem->n */
+  int iLimit;         /* Maximum allowed string or blob size */
+  u16 flags = 0;      /* New value for pMem->flags */
+
+  assert( pMem->db==0 || sqlite3_mutex_held(pMem->db->mutex) );
+  assert( (pMem->flags & MEM_RowSet)==0 );
+
+  /* If z is a NULL pointer, set pMem to contain an SQL NULL. */
+  if( !z ){
+    sqlite3VdbeMemSetNull(pMem);
+    return SQLITE_OK;
+  }
+
+  if( pMem->db ){
+    iLimit = pMem->db->aLimit[SQLITE_LIMIT_LENGTH];
+  }else{
+    iLimit = SQLITE_MAX_LENGTH;
+  }
+  flags = (enc==0?MEM_Blob:MEM_Str);
+  if( nByte<0 ){
+    assert( enc!=0 );
+    if( enc==SQLITE_UTF8 ){
+      for(nByte=0; nByte<=iLimit && z[nByte]; nByte++){}
+    }else{
+      for(nByte=0; nByte<=iLimit && (z[nByte] | z[nByte+1]); nByte+=2){}
+    }
+    flags |= MEM_Term;
+  }
+
+  /* The following block sets the new values of Mem.z and Mem.xDel. It
+  ** also sets a flag in local variable "flags" to indicate the memory
+  ** management (one of MEM_Dyn or MEM_Static).
+  */
+  if( xDel==SQLITE_TRANSIENT ){
+    int nAlloc = nByte;
+    if( flags&MEM_Term ){
+      nAlloc += (enc==SQLITE_UTF8?1:2);
+    }
+    if( nByte>iLimit ){
+      return SQLITE_TOOBIG;
+    }
+    if( sqlite3VdbeMemGrow(pMem, nAlloc, 0) ){
+      return SQLITE_NOMEM;
+    }
+    memcpy(pMem->z, z, nAlloc);
+  }else if( xDel==SQLITE_DYNAMIC ){
+    sqlite3VdbeMemRelease(pMem);
+    pMem->zMalloc = pMem->z = (char *)z;
+    pMem->xDel = 0;
+  }else{
+    sqlite3VdbeMemRelease(pMem);
+    pMem->z = (char *)z;
+    pMem->xDel = xDel;
+    flags |= ((xDel==SQLITE_STATIC)?MEM_Static:MEM_Dyn);
+  }
+
+  pMem->n = nByte;
+  pMem->flags = flags;
+  pMem->enc = (enc==0 ? SQLITE_UTF8 : enc);
+  pMem->type = (enc==0 ? SQLITE_BLOB : SQLITE_TEXT);
+
+#ifndef SQLITE_OMIT_UTF16
+  if( pMem->enc!=SQLITE_UTF8 && sqlite3VdbeMemHandleBom(pMem) ){
+    return SQLITE_NOMEM;
+  }
+#endif
+
+  if( nByte>iLimit ){
+    return SQLITE_TOOBIG;
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** Compare the values contained by the two memory cells, returning
+** negative, zero or positive if pMem1 is less than, equal to, or greater
+** than pMem2. Sorting order is NULL's first, followed by numbers (integers
+** and reals) sorted numerically, followed by text ordered by the collating
+** sequence pColl and finally blob's ordered by memcmp().
+**
+** Two NULL values are considered equal by this function.
+*/
+SQLITE_PRIVATE int sqlite3MemCompare(const Mem *pMem1, const Mem *pMem2, const CollSeq *pColl){
+  int rc;
+  int f1, f2;
+  int combined_flags;
+
+  f1 = pMem1->flags;
+  f2 = pMem2->flags;
+  combined_flags = f1|f2;
+  assert( (combined_flags & MEM_RowSet)==0 );
+ 
+  /* If one value is NULL, it is less than the other. If both values
+  ** are NULL, return 0.
+  */
+  if( combined_flags&MEM_Null ){
+    return (f2&MEM_Null) - (f1&MEM_Null);
+  }
+
+  /* If one value is a number and the other is not, the number is less.
+  ** If both are numbers, compare as reals if one is a real, or as integers
+  ** if both values are integers.
+  */
+  if( combined_flags&(MEM_Int|MEM_Real) ){
+    if( !(f1&(MEM_Int|MEM_Real)) ){
+      return 1;
+    }
+    if( !(f2&(MEM_Int|MEM_Real)) ){
+      return -1;
+    }
+    if( (f1 & f2 & MEM_Int)==0 ){
+      double r1, r2;
+      if( (f1&MEM_Real)==0 ){
+        r1 = (double)pMem1->u.i;
+      }else{
+        r1 = pMem1->r;
+      }
+      if( (f2&MEM_Real)==0 ){
+        r2 = (double)pMem2->u.i;
+      }else{
+        r2 = pMem2->r;
+      }
+      if( r1<r2 ) return -1;
+      if( r1>r2 ) return 1;
+      return 0;
+    }else{
+      assert( f1&MEM_Int );
+      assert( f2&MEM_Int );
+      if( pMem1->u.i < pMem2->u.i ) return -1;
+      if( pMem1->u.i > pMem2->u.i ) return 1;
+      return 0;
+    }
+  }
+
+  /* If one value is a string and the other is a blob, the string is less.
+  ** If both are strings, compare using the collating functions.
+  */
+  if( combined_flags&MEM_Str ){
+    if( (f1 & MEM_Str)==0 ){
+      return 1;
+    }
+    if( (f2 & MEM_Str)==0 ){
+      return -1;
+    }
+
+    assert( pMem1->enc==pMem2->enc );
+    assert( pMem1->enc==SQLITE_UTF8 || 
+            pMem1->enc==SQLITE_UTF16LE || pMem1->enc==SQLITE_UTF16BE );
+
+    /* The collation sequence must be defined at this point, even if
+    ** the user deletes the collation sequence after the vdbe program is
+    ** compiled (this was not always the case).
+    */
+    assert( !pColl || pColl->xCmp );
+
+    if( pColl ){
+      if( pMem1->enc==pColl->enc ){
+        /* The strings are already in the correct encoding.  Call the
+        ** comparison function directly */
+        return pColl->xCmp(pColl->pUser,pMem1->n,pMem1->z,pMem2->n,pMem2->z);
+      }else{
+        const void *v1, *v2;
+        int n1, n2;
+        Mem c1;
+        Mem c2;
+        memset(&c1, 0, sizeof(c1));
+        memset(&c2, 0, sizeof(c2));
+        sqlite3VdbeMemShallowCopy(&c1, pMem1, MEM_Ephem);
+        sqlite3VdbeMemShallowCopy(&c2, pMem2, MEM_Ephem);
+        v1 = sqlite3ValueText((sqlite3_value*)&c1, pColl->enc);
+        n1 = v1==0 ? 0 : c1.n;
+        v2 = sqlite3ValueText((sqlite3_value*)&c2, pColl->enc);
+        n2 = v2==0 ? 0 : c2.n;
+        rc = pColl->xCmp(pColl->pUser, n1, v1, n2, v2);
+        sqlite3VdbeMemRelease(&c1);
+        sqlite3VdbeMemRelease(&c2);
+        return rc;
+      }
+    }
+    /* If a NULL pointer was passed as the collate function, fall through
+    ** to the blob case and use memcmp().  */
+  }
+ 
+  /* Both values must be blobs.  Compare using memcmp().  */
+  rc = memcmp(pMem1->z, pMem2->z, (pMem1->n>pMem2->n)?pMem2->n:pMem1->n);
+  if( rc==0 ){
+    rc = pMem1->n - pMem2->n;
+  }
+  return rc;
+}
+
+/*
+** Move data out of a btree key or data field and into a Mem structure.
+** The data or key is taken from the entry that pCur is currently pointing
+** to.  offset and amt determine what portion of the data or key to retrieve.
+** key is true to get the key or false to get data.  The result is written
+** into the pMem element.
+**
+** The pMem structure is assumed to be uninitialized.  Any prior content
+** is overwritten without being freed.
+**
+** If this routine fails for any reason (malloc returns NULL or unable
+** to read from the disk) then the pMem is left in an inconsistent state.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMemFromBtree(
+  BtCursor *pCur,   /* Cursor pointing at record to retrieve. */
+  int offset,       /* Offset from the start of data to return bytes from. */
+  int amt,          /* Number of bytes to return. */
+  int key,          /* If true, retrieve from the btree key, not data. */
+  Mem *pMem         /* OUT: Return data in this Mem structure. */
+){
+  char *zData;        /* Data from the btree layer */
+  int available = 0;  /* Number of bytes available on the local btree page */
+  int rc = SQLITE_OK; /* Return code */
+
+  assert( sqlite3BtreeCursorIsValid(pCur) );
+
+  /* Note: the calls to BtreeKeyFetch() and DataFetch() below assert() 
+  ** that both the BtShared and database handle mutexes are held. */
+  assert( (pMem->flags & MEM_RowSet)==0 );
+  if( key ){
+    zData = (char *)sqlite3BtreeKeyFetch(pCur, &available);
+  }else{
+    zData = (char *)sqlite3BtreeDataFetch(pCur, &available);
+  }
+  assert( zData!=0 );
+
+  if( offset+amt<=available && (pMem->flags&MEM_Dyn)==0 ){
+    sqlite3VdbeMemRelease(pMem);
+    pMem->z = &zData[offset];
+    pMem->flags = MEM_Blob|MEM_Ephem;
+  }else if( SQLITE_OK==(rc = sqlite3VdbeMemGrow(pMem, amt+2, 0)) ){
+    pMem->flags = MEM_Blob|MEM_Dyn|MEM_Term;
+    pMem->enc = 0;
+    pMem->type = SQLITE_BLOB;
+    if( key ){
+      rc = sqlite3BtreeKey(pCur, offset, amt, pMem->z);
+    }else{
+      rc = sqlite3BtreeData(pCur, offset, amt, pMem->z);
+    }
+    pMem->z[amt] = 0;
+    pMem->z[amt+1] = 0;
+    if( rc!=SQLITE_OK ){
+      sqlite3VdbeMemRelease(pMem);
+    }
+  }
+  pMem->n = amt;
+
+  return rc;
+}
+
+/* This function is only available internally, it is not part of the
+** external API. It works in a similar way to sqlite3_value_text(),
+** except the data returned is in the encoding specified by the second
+** parameter, which must be one of SQLITE_UTF16BE, SQLITE_UTF16LE or
+** SQLITE_UTF8.
+**
+** (2006-02-16:)  The enc value can be or-ed with SQLITE_UTF16_ALIGNED.
+** If that is the case, then the result must be aligned on an even byte
+** boundary.
+*/
+SQLITE_PRIVATE const void *sqlite3ValueText(sqlite3_value* pVal, u8 enc){
+  if( !pVal ) return 0;
+
+  assert( pVal->db==0 || sqlite3_mutex_held(pVal->db->mutex) );
+  assert( (enc&3)==(enc&~SQLITE_UTF16_ALIGNED) );
+  assert( (pVal->flags & MEM_RowSet)==0 );
+
+  if( pVal->flags&MEM_Null ){
+    return 0;
+  }
+  assert( (MEM_Blob>>3) == MEM_Str );
+  pVal->flags |= (pVal->flags & MEM_Blob)>>3;
+  expandBlob(pVal);
+  if( pVal->flags&MEM_Str ){
+    sqlite3VdbeChangeEncoding(pVal, enc & ~SQLITE_UTF16_ALIGNED);
+    if( (enc & SQLITE_UTF16_ALIGNED)!=0 && 1==(1&SQLITE_PTR_TO_INT(pVal->z)) ){
+      assert( (pVal->flags & (MEM_Ephem|MEM_Static))!=0 );
+      if( sqlite3VdbeMemMakeWriteable(pVal)!=SQLITE_OK ){
+        return 0;
+      }
+    }
+    sqlite3VdbeMemNulTerminate(pVal); /* IMP: R-59893-45467 */
+  }else{
+    assert( (pVal->flags&MEM_Blob)==0 );
+    sqlite3VdbeMemStringify(pVal, enc);
+    assert( 0==(1&SQLITE_PTR_TO_INT(pVal->z)) );
+  }
+  assert(pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) || pVal->db==0
+              || pVal->db->mallocFailed );
+  if( pVal->enc==(enc & ~SQLITE_UTF16_ALIGNED) ){
+    return pVal->z;
+  }else{
+    return 0;
+  }
+}
+
+/*
+** Create a new sqlite3_value object.
+*/
+SQLITE_PRIVATE sqlite3_value *sqlite3ValueNew(sqlite3 *db){
+  Mem *p = sqlite3DbMallocZero(db, sizeof(*p));
+  if( p ){
+    p->flags = MEM_Null;
+    p->type = SQLITE_NULL;
+    p->db = db;
+  }
+  return p;
+}
+
+/*
+** Create a new sqlite3_value object, containing the value of pExpr.
+**
+** This only works for very simple expressions that consist of one constant
+** token (i.e. "5", "5.1", "'a string'"). If the expression can
+** be converted directly into a value, then the value is allocated and
+** a pointer written to *ppVal. The caller is responsible for deallocating
+** the value by passing it to sqlite3ValueFree() later on. If the expression
+** cannot be converted to a value, then *ppVal is set to NULL.
+*/
+SQLITE_PRIVATE int sqlite3ValueFromExpr(
+  sqlite3 *db,              /* The database connection */
+  Expr *pExpr,              /* The expression to evaluate */
+  u8 enc,                   /* Encoding to use */
+  u8 affinity,              /* Affinity to use */
+  sqlite3_value **ppVal     /* Write the new value here */
+){
+  int op;
+  char *zVal = 0;
+  sqlite3_value *pVal = 0;
+  int negInt = 1;
+  const char *zNeg = "";
+
+  if( !pExpr ){
+    *ppVal = 0;
+    return SQLITE_OK;
+  }
+  op = pExpr->op;
+
+  /* op can only be TK_REGISTER if we have compiled with SQLITE_ENABLE_STAT2.
+  ** The ifdef here is to enable us to achieve 100% branch test coverage even
+  ** when SQLITE_ENABLE_STAT2 is omitted.
+  */
+#ifdef SQLITE_ENABLE_STAT2
+  if( op==TK_REGISTER ) op = pExpr->op2;
+#else
+  if( NEVER(op==TK_REGISTER) ) op = pExpr->op2;
+#endif
+
+  /* Handle negative integers in a single step.  This is needed in the
+  ** case when the value is -9223372036854775808.
+  */
+  if( op==TK_UMINUS
+   && (pExpr->pLeft->op==TK_INTEGER || pExpr->pLeft->op==TK_FLOAT) ){
+    pExpr = pExpr->pLeft;
+    op = pExpr->op;
+    negInt = -1;
+    zNeg = "-";
+  }
+
+  if( op==TK_STRING || op==TK_FLOAT || op==TK_INTEGER ){
+    pVal = sqlite3ValueNew(db);
+    if( pVal==0 ) goto no_mem;
+    if( ExprHasProperty(pExpr, EP_IntValue) ){
+      sqlite3VdbeMemSetInt64(pVal, (i64)pExpr->u.iValue*negInt);
+    }else{
+      zVal = sqlite3MPrintf(db, "%s%s", zNeg, pExpr->u.zToken);
+      if( zVal==0 ) goto no_mem;
+      sqlite3ValueSetStr(pVal, -1, zVal, SQLITE_UTF8, SQLITE_DYNAMIC);
+      if( op==TK_FLOAT ) pVal->type = SQLITE_FLOAT;
+    }
+    if( (op==TK_INTEGER || op==TK_FLOAT ) && affinity==SQLITE_AFF_NONE ){
+      sqlite3ValueApplyAffinity(pVal, SQLITE_AFF_NUMERIC, SQLITE_UTF8);
+    }else{
+      sqlite3ValueApplyAffinity(pVal, affinity, SQLITE_UTF8);
+    }
+    if( pVal->flags & (MEM_Int|MEM_Real) ) pVal->flags &= ~MEM_Str;
+    if( enc!=SQLITE_UTF8 ){
+      sqlite3VdbeChangeEncoding(pVal, enc);
+    }
+  }else if( op==TK_UMINUS ) {
+    /* This branch happens for multiple negative signs.  Ex: -(-5) */
+    if( SQLITE_OK==sqlite3ValueFromExpr(db,pExpr->pLeft,enc,affinity,&pVal) ){
+      sqlite3VdbeMemNumerify(pVal);
+      if( pVal->u.i==SMALLEST_INT64 ){
+        pVal->flags &= MEM_Int;
+        pVal->flags |= MEM_Real;
+        pVal->r = (double)LARGEST_INT64;
+      }else{
+        pVal->u.i = -pVal->u.i;
+      }
+      pVal->r = -pVal->r;
+      sqlite3ValueApplyAffinity(pVal, affinity, enc);
+    }
+  }else if( op==TK_NULL ){
+    pVal = sqlite3ValueNew(db);
+    if( pVal==0 ) goto no_mem;
+  }
+#ifndef SQLITE_OMIT_BLOB_LITERAL
+  else if( op==TK_BLOB ){
+    int nVal;
+    assert( pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X' );
+    assert( pExpr->u.zToken[1]=='\'' );
+    pVal = sqlite3ValueNew(db);
+    if( !pVal ) goto no_mem;
+    zVal = &pExpr->u.zToken[2];
+    nVal = sqlite3Strlen30(zVal)-1;
+    assert( zVal[nVal]=='\'' );
+    sqlite3VdbeMemSetStr(pVal, sqlite3HexToBlob(db, zVal, nVal), nVal/2,
+                         0, SQLITE_DYNAMIC);
+  }
+#endif
+
+  if( pVal ){
+    sqlite3VdbeMemStoreType(pVal);
+  }
+  *ppVal = pVal;
+  return SQLITE_OK;
+
+no_mem:
+  db->mallocFailed = 1;
+  sqlite3DbFree(db, zVal);
+  sqlite3ValueFree(pVal);
+  *ppVal = 0;
+  return SQLITE_NOMEM;
+}
+
+/*
+** Change the string value of an sqlite3_value object
+*/
+SQLITE_PRIVATE void sqlite3ValueSetStr(
+  sqlite3_value *v,     /* Value to be set */
+  int n,                /* Length of string z */
+  const void *z,        /* Text of the new string */
+  u8 enc,               /* Encoding to use */
+  void (*xDel)(void*)   /* Destructor for the string */
+){
+  if( v ) sqlite3VdbeMemSetStr((Mem *)v, z, n, enc, xDel);
+}
+
+/*
+** Free an sqlite3_value object
+*/
+SQLITE_PRIVATE void sqlite3ValueFree(sqlite3_value *v){
+  if( !v ) return;
+  sqlite3VdbeMemRelease((Mem *)v);
+  sqlite3DbFree(((Mem*)v)->db, v);
+}
+
+/*
+** Return the number of bytes in the sqlite3_value object assuming
+** that it uses the encoding "enc"
+*/
+SQLITE_PRIVATE int sqlite3ValueBytes(sqlite3_value *pVal, u8 enc){
+  Mem *p = (Mem*)pVal;
+  if( (p->flags & MEM_Blob)!=0 || sqlite3ValueText(pVal, enc) ){
+    if( p->flags & MEM_Zero ){
+      return p->n + p->u.nZero;
+    }else{
+      return p->n;
+    }
+  }
+  return 0;
+}
+
+/************** End of vdbemem.c *********************************************/
+/************** Begin file vdbeaux.c *****************************************/
+/*
+** 2003 September 6
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains code used for creating, destroying, and populating
+** a VDBE (or an "sqlite3_stmt" as it is known to the outside world.)  Prior
+** to version 2.8.7, all this code was combined into the vdbe.c source file.
+** But that file was getting too big so this subroutines were split out.
+*/
+
+
+
+/*
+** When debugging the code generator in a symbolic debugger, one can
+** set the sqlite3VdbeAddopTrace to 1 and all opcodes will be printed
+** as they are added to the instruction stream.
+*/
+#ifdef SQLITE_DEBUG
+SQLITE_PRIVATE int sqlite3VdbeAddopTrace = 0;
+#endif
+
+
+/*
+** Create a new virtual database engine.
+*/
+SQLITE_PRIVATE Vdbe *sqlite3VdbeCreate(sqlite3 *db){
+  Vdbe *p;
+  p = sqlite3DbMallocZero(db, sizeof(Vdbe) );
+  if( p==0 ) return 0;
+  p->db = db;
+  if( db->pVdbe ){
+    db->pVdbe->pPrev = p;
+  }
+  p->pNext = db->pVdbe;
+  p->pPrev = 0;
+  db->pVdbe = p;
+  p->magic = VDBE_MAGIC_INIT;
+  return p;
+}
+
+/*
+** Remember the SQL string for a prepared statement.
+*/
+SQLITE_PRIVATE void sqlite3VdbeSetSql(Vdbe *p, const char *z, int n, int isPrepareV2){
+  assert( isPrepareV2==1 || isPrepareV2==0 );
+  if( p==0 ) return;
+#ifdef SQLITE_OMIT_TRACE
+  if( !isPrepareV2 ) return;
+#endif
+  assert( p->zSql==0 );
+  p->zSql = sqlite3DbStrNDup(p->db, z, n);
+  p->isPrepareV2 = (u8)isPrepareV2;
+}
+
+/*
+** Return the SQL associated with a prepared statement
+*/
+SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt){
+  Vdbe *p = (Vdbe *)pStmt;
+  return (p && p->isPrepareV2) ? p->zSql : 0;
+}
+
+/*
+** Swap all content between two VDBE structures.
+*/
+SQLITE_PRIVATE void sqlite3VdbeSwap(Vdbe *pA, Vdbe *pB){
+  Vdbe tmp, *pTmp;
+  char *zTmp;
+  tmp = *pA;
+  *pA = *pB;
+  *pB = tmp;
+  pTmp = pA->pNext;
+  pA->pNext = pB->pNext;
+  pB->pNext = pTmp;
+  pTmp = pA->pPrev;
+  pA->pPrev = pB->pPrev;
+  pB->pPrev = pTmp;
+  zTmp = pA->zSql;
+  pA->zSql = pB->zSql;
+  pB->zSql = zTmp;
+  pB->isPrepareV2 = pA->isPrepareV2;
+}
+
+#ifdef SQLITE_DEBUG
+/*
+** Turn tracing on or off
+*/
+SQLITE_PRIVATE void sqlite3VdbeTrace(Vdbe *p, FILE *trace){
+  p->trace = trace;
+}
+#endif
+
+/*
+** Resize the Vdbe.aOp array so that it is at least one op larger than 
+** it was.
+**
+** If an out-of-memory error occurs while resizing the array, return
+** SQLITE_NOMEM. In this case Vdbe.aOp and Vdbe.nOpAlloc remain 
+** unchanged (this is so that any opcodes already allocated can be 
+** correctly deallocated along with the rest of the Vdbe).
+*/
+static int growOpArray(Vdbe *p){
+  VdbeOp *pNew;
+  int nNew = (p->nOpAlloc ? p->nOpAlloc*2 : (int)(1024/sizeof(Op)));
+  pNew = sqlite3DbRealloc(p->db, p->aOp, nNew*sizeof(Op));
+  if( pNew ){
+    p->nOpAlloc = sqlite3DbMallocSize(p->db, pNew)/sizeof(Op);
+    p->aOp = pNew;
+  }
+  return (pNew ? SQLITE_OK : SQLITE_NOMEM);
+}
+
+/*
+** Add a new instruction to the list of instructions current in the
+** VDBE.  Return the address of the new instruction.
+**
+** Parameters:
+**
+**    p               Pointer to the VDBE
+**
+**    op              The opcode for this instruction
+**
+**    p1, p2, p3      Operands
+**
+** Use the sqlite3VdbeResolveLabel() function to fix an address and
+** the sqlite3VdbeChangeP4() function to change the value of the P4
+** operand.
+*/
+SQLITE_PRIVATE int sqlite3VdbeAddOp3(Vdbe *p, int op, int p1, int p2, int p3){
+  int i;
+  VdbeOp *pOp;
+
+  i = p->nOp;
+  assert( p->magic==VDBE_MAGIC_INIT );
+  assert( op>0 && op<0xff );
+  if( p->nOpAlloc<=i ){
+    if( growOpArray(p) ){
+      return 1;
+    }
+  }
+  p->nOp++;
+  pOp = &p->aOp[i];
+  pOp->opcode = (u8)op;
+  pOp->p5 = 0;
+  pOp->p1 = p1;
+  pOp->p2 = p2;
+  pOp->p3 = p3;
+  pOp->p4.p = 0;
+  pOp->p4type = P4_NOTUSED;
+  p->expired = 0;
+  if( op==OP_ParseSchema ){
+    /* Any program that uses the OP_ParseSchema opcode needs to lock
+    ** all btrees. */
+    int j;
+    for(j=0; j<p->db->nDb; j++) sqlite3VdbeUsesBtree(p, j);
+  }
+#ifdef SQLITE_DEBUG
+  pOp->zComment = 0;
+  if( sqlite3VdbeAddopTrace ) sqlite3VdbePrintOp(0, i, &p->aOp[i]);
+#endif
+#ifdef VDBE_PROFILE
+  pOp->cycles = 0;
+  pOp->cnt = 0;
+#endif
+  return i;
+}
+SQLITE_PRIVATE int sqlite3VdbeAddOp0(Vdbe *p, int op){
+  return sqlite3VdbeAddOp3(p, op, 0, 0, 0);
+}
+SQLITE_PRIVATE int sqlite3VdbeAddOp1(Vdbe *p, int op, int p1){
+  return sqlite3VdbeAddOp3(p, op, p1, 0, 0);
+}
+SQLITE_PRIVATE int sqlite3VdbeAddOp2(Vdbe *p, int op, int p1, int p2){
+  return sqlite3VdbeAddOp3(p, op, p1, p2, 0);
+}
+
+
+/*
+** Add an opcode that includes the p4 value as a pointer.
+*/
+SQLITE_PRIVATE int sqlite3VdbeAddOp4(
+  Vdbe *p,            /* Add the opcode to this VM */
+  int op,             /* The new opcode */
+  int p1,             /* The P1 operand */
+  int p2,             /* The P2 operand */
+  int p3,             /* The P3 operand */
+  const char *zP4,    /* The P4 operand */
+  int p4type          /* P4 operand type */
+){
+  int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3);
+  sqlite3VdbeChangeP4(p, addr, zP4, p4type);
+  return addr;
+}
+
+/*
+** Add an opcode that includes the p4 value as an integer.
+*/
+SQLITE_PRIVATE int sqlite3VdbeAddOp4Int(
+  Vdbe *p,            /* Add the opcode to this VM */
+  int op,             /* The new opcode */
+  int p1,             /* The P1 operand */
+  int p2,             /* The P2 operand */
+  int p3,             /* The P3 operand */
+  int p4              /* The P4 operand as an integer */
+){
+  int addr = sqlite3VdbeAddOp3(p, op, p1, p2, p3);
+  sqlite3VdbeChangeP4(p, addr, SQLITE_INT_TO_PTR(p4), P4_INT32);
+  return addr;
+}
+
+/*
+** Create a new symbolic label for an instruction that has yet to be
+** coded.  The symbolic label is really just a negative number.  The
+** label can be used as the P2 value of an operation.  Later, when
+** the label is resolved to a specific address, the VDBE will scan
+** through its operation list and change all values of P2 which match
+** the label into the resolved address.
+**
+** The VDBE knows that a P2 value is a label because labels are
+** always negative and P2 values are suppose to be non-negative.
+** Hence, a negative P2 value is a label that has yet to be resolved.
+**
+** Zero is returned if a malloc() fails.
+*/
+SQLITE_PRIVATE int sqlite3VdbeMakeLabel(Vdbe *p){
+  int i;
+  i = p->nLabel++;
+  assert( p->magic==VDBE_MAGIC_INIT );
+  if( i>=p->nLabelAlloc ){
+    int n = p->nLabelAlloc*2 + 5;
+    p->aLabel = sqlite3DbReallocOrFree(p->db, p->aLabel,
+                                       n*sizeof(p->aLabel[0]));
+    p->nLabelAlloc = sqlite3DbMallocSize(p->db, p->aLabel)/sizeof(p->aLabel[0]);
+  }
+  if( p->aLabel ){
+    p->aLabel[i] = -1;
+  }
+  return -1-i;
+}
+
+/*
+** Resolve label "x" to be the address of the next instruction to
+** be inserted.  The parameter "x" must have been obtained from
+** a prior call to sqlite3VdbeMakeLabel().
+*/
+SQLITE_PRIVATE void sqlite3VdbeResolveLabel(Vdbe *p, int x){
+  int j = -1-x;
+  assert( p->magic==VDBE_MAGIC_INIT );
+  assert( j>=0 && j<p->nLabel );
+  if( p->aLabel ){
+    p->aLabel[j] = p->nOp;
+  }
+}
+
+/*
+** Mark the VDBE as one that can only be run one time.
+*/
+SQLITE_PRIVATE void sqlite3VdbeRunOnlyOnce(Vdbe *p){
+  p->runOnlyOnce = 1;
+}
+
+#ifdef SQLITE_DEBUG /* sqlite3AssertMayAbort() logic */
+
+/*
+** The following type and function are used to iterate through all opcodes
+** in a Vdbe main program and each of the sub-programs (triggers) it may 
+** invoke directly or indirectly. It should be used as follows:
+**
+**   Op *pOp;
+**   VdbeOpIter sIter;
+**
+**   memset(&sIter, 0, sizeof(sIter));
+**   sIter.v = v;                            // v is of type Vdbe* 
+**   while( (pOp = opIterNext(&sIter)) ){
+**     // Do something with pOp
+**   }
+**   sqlite3DbFree(v->db, sIter.apSub);
+** 
+*/
+typedef struct VdbeOpIter VdbeOpIter;
+struct VdbeOpIter {
+  Vdbe *v;                   /* Vdbe to iterate through the opcodes of */
+  SubProgram **apSub;        /* Array of subprograms */
+  int nSub;                  /* Number of entries in apSub */
+  int iAddr;                 /* Address of next instruction to return */
+  int iSub;                  /* 0 = main program, 1 = first sub-program etc. */
+};
+static Op *opIterNext(VdbeOpIter *p){
+  Vdbe *v = p->v;
+  Op *pRet = 0;
+  Op *aOp;
+  int nOp;
+
+  if( p->iSub<=p->nSub ){
+
+    if( p->iSub==0 ){
+      aOp = v->aOp;
+      nOp = v->nOp;
+    }else{
+      aOp = p->apSub[p->iSub-1]->aOp;
+      nOp = p->apSub[p->iSub-1]->nOp;
+    }
+    assert( p->iAddr<nOp );
+
+    pRet = &aOp[p->iAddr];
+    p->iAddr++;
+    if( p->iAddr==nOp ){
+      p->iSub++;
+      p->iAddr = 0;
+    }
+  
+    if( pRet->p4type==P4_SUBPROGRAM ){
+      int nByte = (p->nSub+1)*sizeof(SubProgram*);
+      int j;
+      for(j=0; j<p->nSub; j++){
+        if( p->apSub[j]==pRet->p4.pProgram ) break;
+      }
+      if( j==p->nSub ){
+        p->apSub = sqlite3DbReallocOrFree(v->db, p->apSub, nByte);
+        if( !p->apSub ){
+          pRet = 0;
+        }else{
+          p->apSub[p->nSub++] = pRet->p4.pProgram;
+        }
+      }
+    }
+  }
+
+  return pRet;
+}
+
+/*
+** Check if the program stored in the VM associated with pParse may
+** throw an ABORT exception (causing the statement, but not entire transaction
+** to be rolled back). This condition is true if the main program or any
+** sub-programs contains any of the following:
+**
+**   *  OP_Halt with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
+**   *  OP_HaltIfNull with P1=SQLITE_CONSTRAINT and P2=OE_Abort.
+**   *  OP_Destroy
+**   *  OP_VUpdate
+**   *  OP_VRename
+**   *  OP_FkCounter with P2==0 (immediate foreign key constraint)
+**
+** Then check that the value of Parse.mayAbort is true if an
+** ABORT may be thrown, or false otherwise. Return true if it does
+** match, or false otherwise. This function is intended to be used as
+** part of an assert statement in the compiler. Similar to:
+**
+**   assert( sqlite3VdbeAssertMayAbort(pParse->pVdbe, pParse->mayAbort) );
+*/
+SQLITE_PRIVATE int sqlite3VdbeAssertMayAbort(Vdbe *v, int mayAbort){
+  int hasAbort = 0;
+  Op *pOp;
+  VdbeOpIter sIter;
+  memset(&sIter, 0, sizeof(sIter));
+  sIter.v = v;
+
+  while( (pOp = opIterNext(&sIter))!=0 ){
+    int opcode = pOp->opcode;
+    if( opcode==OP_Destroy || opcode==OP_VUpdate || opcode==OP_VRename 
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+     || (opcode==OP_FkCounter && pOp->p1==0 && pOp->p2==1) 
+#endif
+     || ((opcode==OP_Halt || opcode==OP_HaltIfNull) 
+      && (pOp->p1==SQLITE_CONSTRAINT && pOp->p2==OE_Abort))
+    ){
+      hasAbort = 1;
+      break;
+    }
+  }
+  sqlite3DbFree(v->db, sIter.apSub);
+
+  /* Return true if hasAbort==mayAbort. Or if a malloc failure occured.
+  ** If malloc failed, then the while() loop above may not have iterated
+  ** through all opcodes and hasAbort may be set incorrectly. Return
+  ** true for this case to prevent the assert() in the callers frame
+  ** from failing.  */
+  return ( v->db->mallocFailed || hasAbort==mayAbort );
+}
+#endif /* SQLITE_DEBUG - the sqlite3AssertMayAbort() function */
+
+/*
+** Loop through the program looking for P2 values that are negative
+** on jump instructions.  Each such value is a label.  Resolve the
+** label by setting the P2 value to its correct non-zero value.
+**
+** This routine is called once after all opcodes have been inserted.
+**
+** Variable *pMaxFuncArgs is set to the maximum value of any P2 argument 
+** to an OP_Function, OP_AggStep or OP_VFilter opcode. This is used by 
+** sqlite3VdbeMakeReady() to size the Vdbe.apArg[] array.
+**
+** The Op.opflags field is set on all opcodes.
+*/
+static void resolveP2Values(Vdbe *p, int *pMaxFuncArgs){
+  int i;
+  int nMaxArgs = *pMaxFuncArgs;
+  Op *pOp;
+  int *aLabel = p->aLabel;
+  p->readOnly = 1;
+  for(pOp=p->aOp, i=p->nOp-1; i>=0; i--, pOp++){
+    u8 opcode = pOp->opcode;
+
+    pOp->opflags = sqlite3OpcodeProperty[opcode];
+    if( opcode==OP_Function || opcode==OP_AggStep ){
+      if( pOp->p5>nMaxArgs ) nMaxArgs = pOp->p5;
+    }else if( (opcode==OP_Transaction && pOp->p2!=0) || opcode==OP_Vacuum ){
+      p->readOnly = 0;
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+    }else if( opcode==OP_VUpdate ){
+      if( pOp->p2>nMaxArgs ) nMaxArgs = pOp->p2;
+    }else if( opcode==OP_VFilter ){
+      int n;
+      assert( p->nOp - i >= 3 );
+      assert( pOp[-1].opcode==OP_Integer );
+      n = pOp[-1].p1;
+      if( n>nMaxArgs ) nMaxArgs = n;
+#endif
+    }
+
+    if( (pOp->opflags & OPFLG_JUMP)!=0 && pOp->p2<0 ){
+      assert( -1-pOp->p2<p->nLabel );
+      pOp->p2 = aLabel[-1-pOp->p2];
+    }
+  }
+  sqlite3DbFree(p->db, p->aLabel);
+  p->aLabel = 0;
+
+  *pMaxFuncArgs = nMaxArgs;
+}
+
+/*
+** Return the address of the next instruction to be inserted.
+*/
+SQLITE_PRIVATE int sqlite3VdbeCurrentAddr(Vdbe *p){
+  assert( p->magic==VDBE_MAGIC_INIT );
+  return p->nOp;
+}
+
+/*
+** This function returns a pointer to the array of opcodes associated with
+** the Vdbe passed as the first argument. It is the callers responsibility
+** to arrange for the returned array to be eventually freed using the 
+** vdbeFreeOpArray() function.
+**
+** Before returning, *pnOp is set to the number of entries in the returned
+** array. Also, *pnMaxArg is set to the larger of its current value and 
+** the number of entries in the Vdbe.apArg[] array required to execute the 
+** returned program.
+*/
+SQLITE_PRIVATE VdbeOp *sqlite3VdbeTakeOpArray(Vdbe *p, int *pnOp, int *pnMaxArg){
+  VdbeOp *aOp = p->aOp;
+  assert( aOp && !p->db->mallocFailed );
+
+  /* Check that sqlite3VdbeUsesBtree() was not called on this VM */
+  assert( p->btreeMask==0 );
+
+  resolveP2Values(p, pnMaxArg);
+  *pnOp = p->nOp;
+  p->aOp = 0;
+  return aOp;
+}
+
+/*
+** Add a whole list of operations to the operation stack.  Return the
+** address of the first operation added.
+*/
+SQLITE_PRIVATE int sqlite3VdbeAddOpList(Vdbe *p, int nOp, VdbeOpList const *aOp){
+  int addr;
+  assert( p->magic==VDBE_MAGIC_INIT );
+  if( p->nOp + nOp > p->nOpAlloc && growOpArray(p) ){
+    return 0;
+  }
+  addr = p->nOp;
+  if( ALWAYS(nOp>0) ){
+    int i;
+    VdbeOpList const *pIn = aOp;
+    for(i=0; i<nOp; i++, pIn++){
+      int p2 = pIn->p2;
+      VdbeOp *pOut = &p->aOp[i+addr];
+      pOut->opcode = pIn->opcode;
+      pOut->p1 = pIn->p1;
+      if( p2<0 && (sqlite3OpcodeProperty[pOut->opcode] & OPFLG_JUMP)!=0 ){
+        pOut->p2 = addr + ADDR(p2);
+      }else{
+        pOut->p2 = p2;
+      }
+      pOut->p3 = pIn->p3;
+      pOut->p4type = P4_NOTUSED;
+      pOut->p4.p = 0;
+      pOut->p5 = 0;
+#ifdef SQLITE_DEBUG
+      pOut->zComment = 0;
+      if( sqlite3VdbeAddopTrace ){
+        sqlite3VdbePrintOp(0, i+addr, &p->aOp[i+addr]);
+      }
+#endif
+    }
+    p->nOp += nOp;
+  }
+  return addr;
+}
+
+/*
+** Change the value of the P1 operand for a specific instruction.
+** This routine is useful when a large program is loaded from a
+** static array using sqlite3VdbeAddOpList but we want to make a
+** few minor changes to the program.
+*/
+SQLITE_PRIVATE void sqlite3VdbeChangeP1(Vdbe *p, int addr, int val){
+  assert( p!=0 );
+  assert( addr>=0 );
+  if( p->nOp>addr ){
+    p->aOp[addr].p1 = val;
+  }
+}
+
+/*
+** Change the value of the P2 operand for a specific instruction.
+** This routine is useful for setting a jump destination.
+*/
+SQLITE_PRIVATE void sqlite3VdbeChangeP2(Vdbe *p, int addr, int val){
+  assert( p!=0 );
+  assert( addr>=0 );
+  if( p->nOp>addr ){
+    p->aOp[addr].p2 = val;
+  }
+}
+
+/*
+** Change the value of the P3 operand for a specific instruction.
+*/
+SQLITE_PRIVATE void sqlite3VdbeChangeP3(Vdbe *p, int addr, int val){
+  assert( p!=0 );
+  assert( addr>=0 );
+  if( p->nOp>addr ){
+    p->aOp[addr].p3 = val;
+  }
+}
+
+/*
+** Change the value of the P5 operand for the most recently
+** added operation.
+*/
+SQLITE_PRIVATE void sqlite3VdbeChangeP5(Vdbe *p, u8 val){
+  assert( p!=0 );
+  if( p->aOp ){
+    assert( p->nOp>0 );
+    p->aOp[p->nOp-1].p5 = val;
+  }
+}
+
+/*
+** Change the P2 operand of instruction addr so that it points to
+** the address of the next instruction to be coded.
+*/
+SQLITE_PRIVATE void sqlite3VdbeJumpHere(Vdbe *p, int addr){
+  assert( addr>=0 );
+  sqlite3VdbeChangeP2(p, addr, p->nOp);
+}
+
+
+/*
+** If the input FuncDef structure is ephemeral, then free it.  If
+** the FuncDef is not ephermal, then do nothing.
+*/
+static void freeEphemeralFunction(sqlite3 *db, FuncDef *pDef){
+  if( ALWAYS(pDef) && (pDef->flags & SQLITE_FUNC_EPHEM)!=0 ){
+    sqlite3DbFree(db, pDef);
+  }
+}
+
+static void vdbeFreeOpArray(sqlite3 *, Op *, int);
+
+/*
+** Delete a P4 value if necessary.
+*/
+static void freeP4(sqlite3 *db, int p4type, void *p4){
+  if( p4 ){
+    assert( db );
+    switch( p4type ){
+      case P4_REAL:
+      case P4_INT64:
+      case P4_DYNAMIC:
+      case P4_KEYINFO:
+      case P4_INTARRAY:
+      case P4_KEYINFO_HANDOFF: {
+        sqlite3DbFree(db, p4);
+        break;
+      }
+      case P4_MPRINTF: {
+        if( db->pnBytesFreed==0 ) sqlite3_free(p4);
+        break;
+      }
+      case P4_VDBEFUNC: {
+        VdbeFunc *pVdbeFunc = (VdbeFunc *)p4;
+        freeEphemeralFunction(db, pVdbeFunc->pFunc);
+        if( db->pnBytesFreed==0 ) sqlite3VdbeDeleteAuxData(pVdbeFunc, 0);
+        sqlite3DbFree(db, pVdbeFunc);
+        break;
+      }
+      case P4_FUNCDEF: {
+        freeEphemeralFunction(db, (FuncDef*)p4);
+        break;
+      }
+      case P4_MEM: {
+        if( db->pnBytesFreed==0 ){
+          sqlite3ValueFree((sqlite3_value*)p4);
+        }else{
+          Mem *p = (Mem*)p4;
+          sqlite3DbFree(db, p->zMalloc);
+          sqlite3DbFree(db, p);
+        }
+        break;
+      }
+      case P4_VTAB : {
+        if( db->pnBytesFreed==0 ) sqlite3VtabUnlock((VTable *)p4);
+        break;
+      }
+    }
+  }
+}
+
+/*
+** Free the space allocated for aOp and any p4 values allocated for the
+** opcodes contained within. If aOp is not NULL it is assumed to contain 
+** nOp entries. 
+*/
+static void vdbeFreeOpArray(sqlite3 *db, Op *aOp, int nOp){
+  if( aOp ){
+    Op *pOp;
+    for(pOp=aOp; pOp<&aOp[nOp]; pOp++){
+      freeP4(db, pOp->p4type, pOp->p4.p);
+#ifdef SQLITE_DEBUG
+      sqlite3DbFree(db, pOp->zComment);
+#endif     
+    }
+  }
+  sqlite3DbFree(db, aOp);
+}
+
+/*
+** Link the SubProgram object passed as the second argument into the linked
+** list at Vdbe.pSubProgram. This list is used to delete all sub-program
+** objects when the VM is no longer required.
+*/
+SQLITE_PRIVATE void sqlite3VdbeLinkSubProgram(Vdbe *pVdbe, SubProgram *p){
+  p->pNext = pVdbe->pProgram;
+  pVdbe->pProgram = p;
+}
+
+/*
+** Change N opcodes starting at addr to No-ops.
+*/
+SQLITE_PRIVATE void sqlite3VdbeChangeToNoop(Vdbe *p, int addr, int N){
+  if( p->aOp ){
+    VdbeOp *pOp = &p->aOp[addr];
+    sqlite3 *db = p->db;
+    while( N-- ){
+      freeP4(db, pOp->p4type, pOp->p4.p);
+      memset(pOp, 0, sizeof(pOp[0]));
+      pOp->opcode = OP_Noop;
+      pOp++;
+    }
+  }
+}
+
+/*
+** Change the value of the P4 operand for a specific instruction.
+** This routine is useful when a large program is loaded from a
+** static array using sqlite3VdbeAddOpList but we want to make a
+** few minor changes to the program.
+**
+** If n>=0 then the P4 operand is dynamic, meaning that a copy of
+** the string is made into memory obtained from sqlite3_malloc().
+** A value of n==0 means copy bytes of zP4 up to and including the
+** first null byte.  If n>0 then copy n+1 bytes of zP4.
+**
+** If n==P4_KEYINFO it means that zP4 is a pointer to a KeyInfo structure.
+** A copy is made of the KeyInfo structure into memory obtained from
+** sqlite3_malloc, to be freed when the Vdbe is finalized.
+** n==P4_KEYINFO_HANDOFF indicates that zP4 points to a KeyInfo structure
+** stored in memory that the caller has obtained from sqlite3_malloc. The 
+** caller should not free the allocation, it will be freed when the Vdbe is
+** finalized.
+** 
+** Other values of n (P4_STATIC, P4_COLLSEQ etc.) indicate that zP4 points
+** to a string or structure that is guaranteed to exist for the lifetime of
+** the Vdbe. In these cases we can just copy the pointer.
+**
+** If addr<0 then change P4 on the most recently inserted instruction.
+*/
+SQLITE_PRIVATE void sqlite3VdbeChangeP4(Vdbe *p, int addr, const char *zP4, int n){
+  Op *pOp;
+  sqlite3 *db;
+  assert( p!=0 );
+  db = p->db;
+  assert( p->magic==VDBE_MAGIC_INIT );
+  if( p->aOp==0 || db->mallocFailed ){
+    if ( n!=P4_KEYINFO && n!=P4_VTAB ) {
+      freeP4(db, n, (void*)*(char**)&zP4);
+    }
+    return;
+  }
+  assert( p->nOp>0 );
+  assert( addr<p->nOp );
+  if( addr<0 ){
+    addr = p->nOp - 1;
+  }
+  pOp = &p->aOp[addr];
+  freeP4(db, pOp->p4type, pOp->p4.p);
+  pOp->p4.p = 0;
+  if( n==P4_INT32 ){
+    /* Note: this cast is safe, because the origin data point was an int
+    ** that was cast to a (const char *). */
+    pOp->p4.i = SQLITE_PTR_TO_INT(zP4);
+    pOp->p4type = P4_INT32;
+  }else if( zP4==0 ){
+    pOp->p4.p = 0;
+    pOp->p4type = P4_NOTUSED;
+  }else if( n==P4_KEYINFO ){
+    KeyInfo *pKeyInfo;
+    int nField, nByte;
+
+    nField = ((KeyInfo*)zP4)->nField;
+    nByte = sizeof(*pKeyInfo) + (nField-1)*sizeof(pKeyInfo->aColl[0]) + nField;
+    pKeyInfo = sqlite3DbMallocRaw(0, nByte);
+    pOp->p4.pKeyInfo = pKeyInfo;
+    if( pKeyInfo ){
+      u8 *aSortOrder;
+      memcpy((char*)pKeyInfo, zP4, nByte - nField);
+      aSortOrder = pKeyInfo->aSortOrder;
+      if( aSortOrder ){
+        pKeyInfo->aSortOrder = (unsigned char*)&pKeyInfo->aColl[nField];
+        memcpy(pKeyInfo->aSortOrder, aSortOrder, nField);
+      }
+      pOp->p4type = P4_KEYINFO;
+    }else{
+      p->db->mallocFailed = 1;
+      pOp->p4type = P4_NOTUSED;
+    }
+  }else if( n==P4_KEYINFO_HANDOFF ){
+    pOp->p4.p = (void*)zP4;
+    pOp->p4type = P4_KEYINFO;
+  }else if( n==P4_VTAB ){
+    pOp->p4.p = (void*)zP4;
+    pOp->p4type = P4_VTAB;
+    sqlite3VtabLock((VTable *)zP4);
+    assert( ((VTable *)zP4)->db==p->db );
+  }else if( n<0 ){
+    pOp->p4.p = (void*)zP4;
+    pOp->p4type = (signed char)n;
+  }else{
+    if( n==0 ) n = sqlite3Strlen30(zP4);
+    pOp->p4.z = sqlite3DbStrNDup(p->db, zP4, n);
+    pOp->p4type = P4_DYNAMIC;
+  }
+}
+
+#ifndef NDEBUG
+/*
+** Change the comment on the the most recently coded instruction.  Or
+** insert a No-op and add the comment to that new instruction.  This
+** makes the code easier to read during debugging.  None of this happens
+** in a production build.
+*/
+SQLITE_PRIVATE void sqlite3VdbeComment(Vdbe *p, const char *zFormat, ...){
+  va_list ap;
+  if( !p ) return;
+  assert( p->nOp>0 || p->aOp==0 );
+  assert( p->aOp==0 || p->aOp[p->nOp-1].zComment==0 || p->db->mallocFailed );
+  if( p->nOp ){
+    char **pz = &p->aOp[p->nOp-1].zComment;
+    va_start(ap, zFormat);
+    sqlite3DbFree(p->db, *pz);
+    *pz = sqlite3VMPrintf(p->db, zFormat, ap);
+    va_end(ap);
+  }
+}
+SQLITE_PRIVATE void sqlite3VdbeNoopComment(Vdbe *p, const char *zFormat, ...){
+  va_list ap;
+  if( !p ) return;
+  sqlite3VdbeAddOp0(p, OP_Noop);
+  assert( p->nOp>0 || p->aOp==0 );
+  assert( p->aOp==0 || p->aOp[p->nOp-1].zComment==0 || p->db->mallocFailed );
+  if( p->nOp ){
+    char **pz = &p->aOp[p->nOp-1].zComment;
+    va_start(ap, zFormat);
+    sqlite3DbFree(p->db, *pz);
+    *pz = sqlite3VMPrintf(p->db, zFormat, ap);
+    va_end(ap);
+  }
+}
+#endif  /* NDEBUG */
+
+/*
+** Return the opcode for a given address.  If the address is -1, then
+** return the most recently inserted opcode.
+**
+** If a memory allocation error has occurred prior to the calling of this
+** routine, then a pointer to a dummy VdbeOp will be returned.  That opcode
+** is readable but not writable, though it is cast to a writable value.
+** The return of a dummy opcode allows the call to continue functioning
+** after a OOM fault without having to check to see if the return from 
+** this routine is a valid pointer.  But because the dummy.opcode is 0,
+** dummy will never be written to.  This is verified by code inspection and
+** by running with Valgrind.
+**
+** About the #ifdef SQLITE_OMIT_TRACE:  Normally, this routine is never called
+** unless p->nOp>0.  This is because in the absense of SQLITE_OMIT_TRACE,
+** an OP_Trace instruction is always inserted by sqlite3VdbeGet() as soon as
+** a new VDBE is created.  So we are free to set addr to p->nOp-1 without
+** having to double-check to make sure that the result is non-negative. But
+** if SQLITE_OMIT_TRACE is defined, the OP_Trace is omitted and we do need to
+** check the value of p->nOp-1 before continuing.
+*/
+SQLITE_PRIVATE VdbeOp *sqlite3VdbeGetOp(Vdbe *p, int addr){
+  /* C89 specifies that the constant "dummy" will be initialized to all
+  ** zeros, which is correct.  MSVC generates a warning, nevertheless. */
+  static const VdbeOp dummy = {0, 0, 0, 0};
+  assert( p->magic==VDBE_MAGIC_INIT );
+  if( addr<0 ){
+#ifdef SQLITE_OMIT_TRACE
+    if( p->nOp==0 ) return (VdbeOp*)&dummy;
+#endif
+    addr = p->nOp - 1;
+  }
+  assert( (addr>=0 && addr<p->nOp) || p->db->mallocFailed );
+  if( p->db->mallocFailed ){
+    return (VdbeOp*)&dummy;
+  }else{
+    return &p->aOp[addr];
+  }
+}
+
+#if !defined(SQLITE_OMIT_EXPLAIN) || !defined(NDEBUG) \
+     || defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
+/*
+** Compute a string that describes the P4 parameter for an opcode.
+** Use zTemp for any required temporary buffer space.
+*/
+static char *displayP4(Op *pOp, char *zTemp, int nTemp){
+  char *zP4 = zTemp;
+  assert( nTemp>=20 );
+  switch( pOp->p4type ){
+    case P4_KEYINFO_STATIC:
+    case P4_KEYINFO: {
+      int i, j;
+      KeyInfo *pKeyInfo = pOp->p4.pKeyInfo;
+      sqlite3_snprintf(nTemp, zTemp, "keyinfo(%d", pKeyInfo->nField);
+      i = sqlite3Strlen30(zTemp);
+      for(j=0; j<pKeyInfo->nField; j++){
+        CollSeq *pColl = pKeyInfo->aColl[j];
+        if( pColl ){
+          int n = sqlite3Strlen30(pColl->zName);
+          if( i+n>nTemp-6 ){
+            memcpy(&zTemp[i],",...",4);
+            break;
+          }
+          zTemp[i++] = ',';
+          if( pKeyInfo->aSortOrder && pKeyInfo->aSortOrder[j] ){
+            zTemp[i++] = '-';
+          }
+          memcpy(&zTemp[i], pColl->zName,n+1);
+          i += n;
+        }else if( i+4<nTemp-6 ){
+          memcpy(&zTemp[i],",nil",4);
+          i += 4;
+        }
+      }
+      zTemp[i++] = ')';
+      zTemp[i] = 0;
+      assert( i<nTemp );
+      break;
+    }
+    case P4_COLLSEQ: {
+      CollSeq *pColl = pOp->p4.pColl;
+      sqlite3_snprintf(nTemp, zTemp, "collseq(%.20s)", pColl->zName);
+      break;
+    }
+    case P4_FUNCDEF: {
+      FuncDef *pDef = pOp->p4.pFunc;
+      sqlite3_snprintf(nTemp, zTemp, "%s(%d)", pDef->zName, pDef->nArg);
+      break;
+    }
+    case P4_INT64: {
+      sqlite3_snprintf(nTemp, zTemp, "%lld", *pOp->p4.pI64);
+      break;
+    }
+    case P4_INT32: {
+      sqlite3_snprintf(nTemp, zTemp, "%d", pOp->p4.i);
+      break;
+    }
+    case P4_REAL: {
+      sqlite3_snprintf(nTemp, zTemp, "%.16g", *pOp->p4.pReal);
+      break;
+    }
+    case P4_MEM: {
+      Mem *pMem = pOp->p4.pMem;
+      assert( (pMem->flags & MEM_Null)==0 );
+      if( pMem->flags & MEM_Str ){
+        zP4 = pMem->z;
+      }else if( pMem->flags & MEM_Int ){
+        sqlite3_snprintf(nTemp, zTemp, "%lld", pMem->u.i);
+      }else if( pMem->flags & MEM_Real ){
+        sqlite3_snprintf(nTemp, zTemp, "%.16g", pMem->r);
+      }else{
+        assert( pMem->flags & MEM_Blob );
+        zP4 = "(blob)";
+      }
+      break;
+    }
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+    case P4_VTAB: {
+      sqlite3_vtab *pVtab = pOp->p4.pVtab->pVtab;
+      sqlite3_snprintf(nTemp, zTemp, "vtab:%p:%p", pVtab, pVtab->pModule);
+      break;
+    }
+#endif
+    case P4_INTARRAY: {
+      sqlite3_snprintf(nTemp, zTemp, "intarray");
+      break;
+    }
+    case P4_SUBPROGRAM: {
+      sqlite3_snprintf(nTemp, zTemp, "program");
+      break;
+    }
+    default: {
+      zP4 = pOp->p4.z;
+      if( zP4==0 ){
+        zP4 = zTemp;
+        zTemp[0] = 0;
+      }
+    }
+  }
+  assert( zP4!=0 );
+  return zP4;
+}
+#endif
+
+/*
+** Declare to the Vdbe that the BTree object at db->aDb[i] is used.
+**
+** The prepared statements need to know in advance the complete set of
+** attached databases that they will be using.  A mask of these databases
+** is maintained in p->btreeMask and is used for locking and other purposes.
+*/
+SQLITE_PRIVATE void sqlite3VdbeUsesBtree(Vdbe *p, int i){
+  assert( i>=0 && i<p->db->nDb && i<(int)sizeof(yDbMask)*8 );
+  assert( i<(int)sizeof(p->btreeMask)*8 );
+  p->btreeMask |= ((yDbMask)1)<<i;
+  if( i!=1 && sqlite3BtreeSharable(p->db->aDb[i].pBt) ){
+    p->lockMask |= ((yDbMask)1)<<i;
+  }
+}
+
+#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE>0
+/*
+** If SQLite is compiled to support shared-cache mode and to be threadsafe,
+** this routine obtains the mutex associated with each BtShared structure
+** that may be accessed by the VM passed as an argument. In doing so it also
+** sets the BtShared.db member of each of the BtShared structures, ensuring
+** that the correct busy-handler callback is invoked if required.
+**
+** If SQLite is not threadsafe but does support shared-cache mode, then
+** sqlite3BtreeEnter() is invoked to set the BtShared.db variables
+** of all of BtShared structures accessible via the database handle 
+** associated with the VM.
+**
+** If SQLite is not threadsafe and does not support shared-cache mode, this
+** function is a no-op.
+**
+** The p->btreeMask field is a bitmask of all btrees that the prepared 
+** statement p will ever use.  Let N be the number of bits in p->btreeMask
+** corresponding to btrees that use shared cache.  Then the runtime of
+** this routine is N*N.  But as N is rarely more than 1, this should not
+** be a problem.
+*/
+SQLITE_PRIVATE void sqlite3VdbeEnter(Vdbe *p){
+  int i;
+  yDbMask mask;
+  sqlite3 *db;
+  Db *aDb;
+  int nDb;
+  if( p->lockMask==0 ) return;  /* The common case */
+  db = p->db;
+  aDb = db->aDb;
+  nDb = db->nDb;
+  for(i=0, mask=1; i<nDb; i++, mask += mask){
+    if( i!=1 && (mask & p->lockMask)!=0 && ALWAYS(aDb[i].pBt!=0) ){
+      sqlite3BtreeEnter(aDb[i].pBt);
+    }
+  }
+}
+#endif
+
+#if !defined(SQLITE_OMIT_SHARED_CACHE) && SQLITE_THREADSAFE>0
+/*
+** Unlock all of the btrees previously locked by a call to sqlite3VdbeEnter().
+*/
+SQLITE_PRIVATE void sqlite3VdbeLeave(Vdbe *p){
+  int i;
+  yDbMask mask;
+  sqlite3 *db;
+  Db *aDb;
+  int nDb;
+  if( p->lockMask==0 ) return;  /* The common case */
+  db = p->db;
+  aDb = db->aDb;
+  nDb = db->nDb;
+  for(i=0, mask=1; i<nDb; i++, mask += mask){
+    if( i!=1 && (mask & p->lockMask)!=0 && ALWAYS(aDb[i].pBt!=0) ){
+      sqlite3BtreeLeave(aDb[i].pBt);
+    }
+  }
+}
+#endif
+
+#if defined(VDBE_PROFILE) || defined(SQLITE_DEBUG)
+/*
+** Print a single opcode.  This routine is used for debugging only.
+*/
+SQLITE_PRIVATE void sqlite3VdbePrintOp(FILE *pOut, int pc, Op *pOp){
+  char *zP4;
+  char zPtr[50];
+  static const char *zFormat1 = "%4d %-13s %4d %4d %4d %-4s %.2X %s\n";
+  if( pOut==0 ) pOut = stdout;
+  zP4 = displayP4(pOp, zPtr, sizeof(zPtr));
+  fprintf(pOut, zFormat1, pc, 
+      sqlite3OpcodeName(pOp->opcode), pOp->p1, pOp->p2, pOp->p3, zP4, pOp->p5,
+#ifdef SQLITE_DEBUG
+      pOp->zComment ? pOp->zComment : ""
+#else
+      ""
+#endif
+  );
+  fflush(pOut);
+}
+#endif
+
+/*
+** Release an array of N Mem elements
+*/
+static void releaseMemArray(Mem *p, int N){
+  if( p && N ){
+    Mem *pEnd;
+    sqlite3 *db = p->db;
+    u8 malloc_failed = db->mallocFailed;
+    if( db->pnBytesFreed ){
+      for(pEnd=&p[N]; p<pEnd; p++){
+        sqlite3DbFree(db, p->zMalloc);
+      }
+      return;
+    }
+    for(pEnd=&p[N]; p<pEnd; p++){
+      assert( (&p[1])==pEnd || p[0].db==p[1].db );
+
+      /* This block is really an inlined version of sqlite3VdbeMemRelease()
+      ** that takes advantage of the fact that the memory cell value is 
+      ** being set to NULL after releasing any dynamic resources.
+      **
+      ** The justification for duplicating code is that according to 
+      ** callgrind, this causes a certain test case to hit the CPU 4.7 
+      ** percent less (x86 linux, gcc version 4.1.2, -O6) than if 
+      ** sqlite3MemRelease() were called from here. With -O2, this jumps
+      ** to 6.6 percent. The test case is inserting 1000 rows into a table 
+      ** with no indexes using a single prepared INSERT statement, bind() 
+      ** and reset(). Inserts are grouped into a transaction.
+      */
+      if( p->flags&(MEM_Agg|MEM_Dyn|MEM_Frame|MEM_RowSet) ){
+        sqlite3VdbeMemRelease(p);
+      }else if( p->zMalloc ){
+        sqlite3DbFree(db, p->zMalloc);
+        p->zMalloc = 0;
+      }
+
+      p->flags = MEM_Null;
+    }
+    db->mallocFailed = malloc_failed;
+  }
+}
+
+/*
+** Delete a VdbeFrame object and its contents. VdbeFrame objects are
+** allocated by the OP_Program opcode in sqlite3VdbeExec().
+*/
+SQLITE_PRIVATE void sqlite3VdbeFrameDelete(VdbeFrame *p){
+  int i;
+  Mem *aMem = VdbeFrameMem(p);
+  VdbeCursor **apCsr = (VdbeCursor **)&aMem[p->nChildMem];
+  for(i=0; i<p->nChildCsr; i++){
+    sqlite3VdbeFreeCursor(p->v, apCsr[i]);
+  }
+  releaseMemArray(aMem, p->nChildMem);
+  sqlite3DbFree(p->v->db, p);
+}
+
+#ifndef SQLITE_OMIT_EXPLAIN
+/*
+** Give a listing of the program in the virtual machine.
+**
+** The interface is the same as sqlite3VdbeExec().  But instead of
+** running the code, it invokes the callback once for each instruction.
+** This feature is used to implement "EXPLAIN".
+**
+** When p->explain==1, each instruction is listed.  When
+** p->explain==2, only OP_Explain instructions are listed and these
+** are shown in a different format.  p->explain==2 is used to implement
+** EXPLAIN QUERY PLAN.
+**
+** When p->explain==1, first the main program is listed, then each of
+** the trigger subprograms are listed one by one.
+*/
+SQLITE_PRIVATE int sqlite3VdbeList(
+  Vdbe *p                   /* The VDBE */
+){
+  int nRow;                            /* Stop when row count reaches this */
+  int nSub = 0;                        /* Number of sub-vdbes seen so far */
+  SubProgram **apSub = 0;              /* Array of sub-vdbes */
+  Mem *pSub = 0;                       /* Memory cell hold array of subprogs */
+  sqlite3 *db = p->db;                 /* The database connection */
+  int i;                               /* Loop counter */
+  int rc = SQLITE_OK;                  /* Return code */
+  Mem *pMem = p->pResultSet = &p->aMem[1];  /* First Mem of result set */
+
+  assert( p->explain );
+  assert( p->magic==VDBE_MAGIC_RUN );
+  assert( p->rc==SQLITE_OK || p->rc==SQLITE_BUSY || p->rc==SQLITE_NOMEM );
+
+  /* Even though this opcode does not use dynamic strings for
+  ** the result, result columns may become dynamic if the user calls
+  ** sqlite3_column_text16(), causing a translation to UTF-16 encoding.
+  */
+  releaseMemArray(pMem, 8);
+
+  if( p->rc==SQLITE_NOMEM ){
+    /* This happens if a malloc() inside a call to sqlite3_column_text() or
+    ** sqlite3_column_text16() failed.  */
+    db->mallocFailed = 1;
+    return SQLITE_ERROR;
+  }
+
+  /* When the number of output rows reaches nRow, that means the
+  ** listing has finished and sqlite3_step() should return SQLITE_DONE.
+  ** nRow is the sum of the number of rows in the main program, plus
+  ** the sum of the number of rows in all trigger subprograms encountered
+  ** so far.  The nRow value will increase as new trigger subprograms are
+  ** encountered, but p->pc will eventually catch up to nRow.
+  */
+  nRow = p->nOp;
+  if( p->explain==1 ){
+    /* The first 8 memory cells are used for the result set.  So we will
+    ** commandeer the 9th cell to use as storage for an array of pointers
+    ** to trigger subprograms.  The VDBE is guaranteed to have at least 9
+    ** cells.  */
+    assert( p->nMem>9 );
+    pSub = &p->aMem[9];
+    if( pSub->flags&MEM_Blob ){
+      /* On the first call to sqlite3_step(), pSub will hold a NULL.  It is
+      ** initialized to a BLOB by the P4_SUBPROGRAM processing logic below */
+      nSub = pSub->n/sizeof(Vdbe*);
+      apSub = (SubProgram **)pSub->z;
+    }
+    for(i=0; i<nSub; i++){
+      nRow += apSub[i]->nOp;
+    }
+  }
+
+  do{
+    i = p->pc++;
+  }while( i<nRow && p->explain==2 && p->aOp[i].opcode!=OP_Explain );
+  if( i>=nRow ){
+    p->rc = SQLITE_OK;
+    rc = SQLITE_DONE;
+  }else if( db->u1.isInterrupted ){
+    p->rc = SQLITE_INTERRUPT;
+    rc = SQLITE_ERROR;
+    sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3ErrStr(p->rc));
+  }else{
+    char *z;
+    Op *pOp;
+    if( i<p->nOp ){
+      /* The output line number is small enough that we are still in the
+      ** main program. */
+      pOp = &p->aOp[i];
+    }else{
+      /* We are currently listing subprograms.  Figure out which one and
+      ** pick up the appropriate opcode. */
+      int j;
+      i -= p->nOp;
+      for(j=0; i>=apSub[j]->nOp; j++){
+        i -= apSub[j]->nOp;
+      }
+      pOp = &apSub[j]->aOp[i];
+    }
+    if( p->explain==1 ){
+      pMem->flags = MEM_Int;
+      pMem->type = SQLITE_INTEGER;
+      pMem->u.i = i;                                /* Program counter */
+      pMem++;
+  
+      pMem->flags = MEM_Static|MEM_Str|MEM_Term;
+      pMem->z = (char*)sqlite3OpcodeName(pOp->opcode);  /* Opcode */
+      assert( pMem->z!=0 );
+      pMem->n = sqlite3Strlen30(pMem->z);
+      pMem->type = SQLITE_TEXT;
+      pMem->enc = SQLITE_UTF8;
+      pMem++;
+
+      /* When an OP_Program opcode is encounter (the only opcode that has
+      ** a P4_SUBPROGRAM argument), expand the size of the array of subprograms
+      ** kept in p->aMem[9].z to hold the new program - assuming this subprogram
+      ** has not already been seen.
+      */
+      if( pOp->p4type==P4_SUBPROGRAM ){
+        int nByte = (nSub+1)*sizeof(SubProgram*);
+        int j;
+        for(j=0; j<nSub; j++){
+          if( apSub[j]==pOp->p4.pProgram ) break;
+        }
+        if( j==nSub && SQLITE_OK==sqlite3VdbeMemGrow(pSub, nByte, 1) ){
+          apSub = (SubProgram **)pSub->z;
+          apSub[nSub++] = pOp->p4.pProgram;
+          pSub->flags |= MEM_Blob;
+          pSub->n = nSub*sizeof(SubProgram*);
+        }
+      }
+    }
+
+    pMem->flags = MEM_Int;
+    pMem->u.i = pOp->p1;                          /* P1 */
+    pMem->type = SQLITE_INTEGER;
+    pMem++;
+
+    pMem->flags = MEM_Int;
+    pMem->u.i = pOp->p2;                          /* P2 */
+    pMem->type = SQLITE_INTEGER;
+    pMem++;
+
+    pMem->flags = MEM_Int;
+    pMem->u.i = pOp->p3;                          /* P3 */
+    pMem->type = SQLITE_INTEGER;
+    pMem++;
+
+    if( sqlite3VdbeMemGrow(pMem, 32, 0) ){            /* P4 */
+      assert( p->db->mallocFailed );
+      return SQLITE_ERROR;
+    }
+    pMem->flags = MEM_Dyn|MEM_Str|MEM_Term;
+    z = displayP4(pOp, pMem->z, 32);
+    if( z!=pMem->z ){
+      sqlite3VdbeMemSetStr(pMem, z, -1, SQLITE_UTF8, 0);
+    }else{
+      assert( pMem->z!=0 );
+      pMem->n = sqlite3Strlen30(pMem->z);
+      pMem->enc = SQLITE_UTF8;
+    }
+    pMem->type = SQLITE_TEXT;
+    pMem++;
+
+    if( p->explain==1 ){
+      if( sqlite3VdbeMemGrow(pMem, 4, 0) ){
+        assert( p->db->mallocFailed );
+        return SQLITE_ERROR;
+      }
+      pMem->flags = MEM_Dyn|MEM_Str|MEM_Term;
+      pMem->n = 2;
+      sqlite3_snprintf(3, pMem->z, "%.2x", pOp->p5);   /* P5 */
+      pMem->type = SQLITE_TEXT;
+      pMem->enc = SQLITE_UTF8;
+      pMem++;
+  
+#ifdef SQLITE_DEBUG
+      if( pOp->zComment ){
+        pMem->flags = MEM_Str|MEM_Term;
+        pMem->z = pOp->zComment;
+        pMem->n = sqlite3Strlen30(pMem->z);
+        pMem->enc = SQLITE_UTF8;
+        pMem->type = SQLITE_TEXT;
+      }else
+#endif
+      {
+        pMem->flags = MEM_Null;                       /* Comment */
+        pMem->type = SQLITE_NULL;
+      }
+    }
+
+    p->nResColumn = 8 - 4*(p->explain-1);
+    p->rc = SQLITE_OK;
+    rc = SQLITE_ROW;
+  }
+  return rc;
+}
+#endif /* SQLITE_OMIT_EXPLAIN */
+
+#ifdef SQLITE_DEBUG
+/*
+** Print the SQL that was used to generate a VDBE program.
+*/
+SQLITE_PRIVATE void sqlite3VdbePrintSql(Vdbe *p){
+  int nOp = p->nOp;
+  VdbeOp *pOp;
+  if( nOp<1 ) return;
+  pOp = &p->aOp[0];
+  if( pOp->opcode==OP_Trace && pOp->p4.z!=0 ){
+    const char *z = pOp->p4.z;
+    while( sqlite3Isspace(*z) ) z++;
+    printf("SQL: [%s]\n", z);
+  }
+}
+#endif
+
+#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)
+/*
+** Print an IOTRACE message showing SQL content.
+*/
+SQLITE_PRIVATE void sqlite3VdbeIOTraceSql(Vdbe *p){
+  int nOp = p->nOp;
+  VdbeOp *pOp;
+  if( sqlite3IoTrace==0 ) return;
+  if( nOp<1 ) return;
+  pOp = &p->aOp[0];
+  if( pOp->opcode==OP_Trace && pOp->p4.z!=0 ){
+    int i, j;
+    char z[1000];
+    sqlite3_snprintf(sizeof(z), z, "%s", pOp->p4.z);
+    for(i=0; sqlite3Isspace(z[i]); i++){}
+    for(j=0; z[i]; i++){
+      if( sqlite3Isspace(z[i]) ){
+        if( z[i-1]!=' ' ){
+          z[j++] = ' ';
+        }
+      }else{
+        z[j++] = z[i];
+      }
+    }
+    z[j] = 0;
+    sqlite3IoTrace("SQL %s\n", z);
+  }
+}
+#endif /* !SQLITE_OMIT_TRACE && SQLITE_ENABLE_IOTRACE */
+
+/*
+** Allocate space from a fixed size buffer and return a pointer to
+** that space.  If insufficient space is available, return NULL.
+**
+** The pBuf parameter is the initial value of a pointer which will
+** receive the new memory.  pBuf is normally NULL.  If pBuf is not
+** NULL, it means that memory space has already been allocated and that
+** this routine should not allocate any new memory.  When pBuf is not
+** NULL simply return pBuf.  Only allocate new memory space when pBuf
+** is NULL.
+**
+** nByte is the number of bytes of space needed.
+**
+** *ppFrom points to available space and pEnd points to the end of the
+** available space.  When space is allocated, *ppFrom is advanced past
+** the end of the allocated space.
+**
+** *pnByte is a counter of the number of bytes of space that have failed
+** to allocate.  If there is insufficient space in *ppFrom to satisfy the
+** request, then increment *pnByte by the amount of the request.
+*/
+static void *allocSpace(
+  void *pBuf,          /* Where return pointer will be stored */
+  int nByte,           /* Number of bytes to allocate */
+  u8 **ppFrom,         /* IN/OUT: Allocate from *ppFrom */
+  u8 *pEnd,            /* Pointer to 1 byte past the end of *ppFrom buffer */
+  int *pnByte          /* If allocation cannot be made, increment *pnByte */
+){
+  assert( EIGHT_BYTE_ALIGNMENT(*ppFrom) );
+  if( pBuf ) return pBuf;
+  nByte = ROUND8(nByte);
+  if( &(*ppFrom)[nByte] <= pEnd ){
+    pBuf = (void*)*ppFrom;
+    *ppFrom += nByte;
+  }else{
+    *pnByte += nByte;
+  }
+  return pBuf;
+}
+
+/*
+** Prepare a virtual machine for execution.  This involves things such
+** as allocating stack space and initializing the program counter.
+** After the VDBE has be prepped, it can be executed by one or more
+** calls to sqlite3VdbeExec().  
+**
+** This is the only way to move a VDBE from VDBE_MAGIC_INIT to
+** VDBE_MAGIC_RUN.
+**
+** This function may be called more than once on a single virtual machine.
+** The first call is made while compiling the SQL statement. Subsequent
+** calls are made as part of the process of resetting a statement to be
+** re-executed (from a call to sqlite3_reset()). The nVar, nMem, nCursor 
+** and isExplain parameters are only passed correct values the first time
+** the function is called. On subsequent calls, from sqlite3_reset(), nVar
+** is passed -1 and nMem, nCursor and isExplain are all passed zero.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMakeReady(
+  Vdbe *p,                       /* The VDBE */
+  int nVar,                      /* Number of '?' see in the SQL statement */
+  int nMem,                      /* Number of memory cells to allocate */
+  int nCursor,                   /* Number of cursors to allocate */
+  int nArg,                      /* Maximum number of args in SubPrograms */
+  int isExplain,                 /* True if the EXPLAIN keywords is present */
+  int usesStmtJournal            /* True to set Vdbe.usesStmtJournal */
+){
+  int n;
+  sqlite3 *db = p->db;
+
+  assert( p!=0 );
+  assert( p->magic==VDBE_MAGIC_INIT );
+
+  /* There should be at least one opcode.
+  */
+  assert( p->nOp>0 );
+
+  /* Set the magic to VDBE_MAGIC_RUN sooner rather than later. */
+  p->magic = VDBE_MAGIC_RUN;
+
+  /* For each cursor required, also allocate a memory cell. Memory
+  ** cells (nMem+1-nCursor)..nMem, inclusive, will never be used by
+  ** the vdbe program. Instead they are used to allocate space for
+  ** VdbeCursor/BtCursor structures. The blob of memory associated with 
+  ** cursor 0 is stored in memory cell nMem. Memory cell (nMem-1)
+  ** stores the blob of memory associated with cursor 1, etc.
+  **
+  ** See also: allocateCursor().
+  */
+  nMem += nCursor;
+
+  /* Allocate space for memory registers, SQL variables, VDBE cursors and 
+  ** an array to marshal SQL function arguments in. This is only done the
+  ** first time this function is called for a given VDBE, not when it is
+  ** being called from sqlite3_reset() to reset the virtual machine.
+  */
+  if( nVar>=0 && ALWAYS(db->mallocFailed==0) ){
+    u8 *zCsr = (u8 *)&p->aOp[p->nOp];       /* Memory avaliable for alloation */
+    u8 *zEnd = (u8 *)&p->aOp[p->nOpAlloc];  /* First byte past available mem */
+    int nByte;                              /* How much extra memory needed */
+
+    resolveP2Values(p, &nArg);
+    p->usesStmtJournal = (u8)usesStmtJournal;
+    if( isExplain && nMem<10 ){
+      nMem = 10;
+    }
+    memset(zCsr, 0, zEnd-zCsr);
+    zCsr += (zCsr - (u8*)0)&7;
+    assert( EIGHT_BYTE_ALIGNMENT(zCsr) );
+
+    /* Memory for registers, parameters, cursor, etc, is allocated in two
+    ** passes.  On the first pass, we try to reuse unused space at the 
+    ** end of the opcode array.  If we are unable to satisfy all memory
+    ** requirements by reusing the opcode array tail, then the second
+    ** pass will fill in the rest using a fresh allocation.  
+    **
+    ** This two-pass approach that reuses as much memory as possible from
+    ** the leftover space at the end of the opcode array can significantly
+    ** reduce the amount of memory held by a prepared statement.
+    */
+    do {
+      nByte = 0;
+      p->aMem = allocSpace(p->aMem, nMem*sizeof(Mem), &zCsr, zEnd, &nByte);
+      p->aVar = allocSpace(p->aVar, nVar*sizeof(Mem), &zCsr, zEnd, &nByte);
+      p->apArg = allocSpace(p->apArg, nArg*sizeof(Mem*), &zCsr, zEnd, &nByte);
+      p->azVar = allocSpace(p->azVar, nVar*sizeof(char*), &zCsr, zEnd, &nByte);
+      p->apCsr = allocSpace(p->apCsr, nCursor*sizeof(VdbeCursor*),
+                            &zCsr, zEnd, &nByte);
+      if( nByte ){
+        p->pFree = sqlite3DbMallocZero(db, nByte);
+      }
+      zCsr = p->pFree;
+      zEnd = &zCsr[nByte];
+    }while( nByte && !db->mallocFailed );
+
+    p->nCursor = (u16)nCursor;
+    if( p->aVar ){
+      p->nVar = (ynVar)nVar;
+      for(n=0; n<nVar; n++){
+        p->aVar[n].flags = MEM_Null;
+        p->aVar[n].db = db;
+      }
+    }
+    if( p->aMem ){
+      p->aMem--;                      /* aMem[] goes from 1..nMem */
+      p->nMem = nMem;                 /*       not from 0..nMem-1 */
+      for(n=1; n<=nMem; n++){
+        p->aMem[n].flags = MEM_Null;
+        p->aMem[n].db = db;
+      }
+    }
+  }
+#ifdef SQLITE_DEBUG
+  for(n=1; n<p->nMem; n++){
+    assert( p->aMem[n].db==db );
+  }
+#endif
+
+  p->pc = -1;
+  p->rc = SQLITE_OK;
+  p->errorAction = OE_Abort;
+  p->explain |= isExplain;
+  p->magic = VDBE_MAGIC_RUN;
+  p->nChange = 0;
+  p->cacheCtr = 1;
+  p->minWriteFileFormat = 255;
+  p->iStatement = 0;
+  p->nFkConstraint = 0;
+#ifdef VDBE_PROFILE
+  {
+    int i;
+    for(i=0; i<p->nOp; i++){
+      p->aOp[i].cnt = 0;
+      p->aOp[i].cycles = 0;
+    }
+  }
+#endif
+}
+
+/*
+** Close a VDBE cursor and release all the resources that cursor 
+** happens to hold.
+*/
+SQLITE_PRIVATE void sqlite3VdbeFreeCursor(Vdbe *p, VdbeCursor *pCx){
+  if( pCx==0 ){
+    return;
+  }
+  if( pCx->pBt ){
+    sqlite3BtreeClose(pCx->pBt);
+    /* The pCx->pCursor will be close automatically, if it exists, by
+    ** the call above. */
+  }else if( pCx->pCursor ){
+    sqlite3BtreeCloseCursor(pCx->pCursor);
+  }
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  if( pCx->pVtabCursor ){
+    sqlite3_vtab_cursor *pVtabCursor = pCx->pVtabCursor;
+    const sqlite3_module *pModule = pCx->pModule;
+    p->inVtabMethod = 1;
+    pModule->xClose(pVtabCursor);
+    p->inVtabMethod = 0;
+  }
+#endif
+}
+
+/*
+** Copy the values stored in the VdbeFrame structure to its Vdbe. This
+** is used, for example, when a trigger sub-program is halted to restore
+** control to the main program.
+*/
+SQLITE_PRIVATE int sqlite3VdbeFrameRestore(VdbeFrame *pFrame){
+  Vdbe *v = pFrame->v;
+  v->aOp = pFrame->aOp;
+  v->nOp = pFrame->nOp;
+  v->aMem = pFrame->aMem;
+  v->nMem = pFrame->nMem;
+  v->apCsr = pFrame->apCsr;
+  v->nCursor = pFrame->nCursor;
+  v->db->lastRowid = pFrame->lastRowid;
+  v->nChange = pFrame->nChange;
+  return pFrame->pc;
+}
+
+/*
+** Close all cursors.
+**
+** Also release any dynamic memory held by the VM in the Vdbe.aMem memory 
+** cell array. This is necessary as the memory cell array may contain
+** pointers to VdbeFrame objects, which may in turn contain pointers to
+** open cursors.
+*/
+static void closeAllCursors(Vdbe *p){
+  if( p->pFrame ){
+    VdbeFrame *pFrame;
+    for(pFrame=p->pFrame; pFrame->pParent; pFrame=pFrame->pParent);
+    sqlite3VdbeFrameRestore(pFrame);
+  }
+  p->pFrame = 0;
+  p->nFrame = 0;
+
+  if( p->apCsr ){
+    int i;
+    for(i=0; i<p->nCursor; i++){
+      VdbeCursor *pC = p->apCsr[i];
+      if( pC ){
+        sqlite3VdbeFreeCursor(p, pC);
+        p->apCsr[i] = 0;
+      }
+    }
+  }
+  if( p->aMem ){
+    releaseMemArray(&p->aMem[1], p->nMem);
+  }
+  while( p->pDelFrame ){
+    VdbeFrame *pDel = p->pDelFrame;
+    p->pDelFrame = pDel->pParent;
+    sqlite3VdbeFrameDelete(pDel);
+  }
+}
+
+/*
+** Clean up the VM after execution.
+**
+** This routine will automatically close any cursors, lists, and/or
+** sorters that were left open.  It also deletes the values of
+** variables in the aVar[] array.
+*/
+static void Cleanup(Vdbe *p){
+  sqlite3 *db = p->db;
+
+#ifdef SQLITE_DEBUG
+  /* Execute assert() statements to ensure that the Vdbe.apCsr[] and 
+  ** Vdbe.aMem[] arrays have already been cleaned up.  */
+  int i;
+  for(i=0; i<p->nCursor; i++) assert( p->apCsr==0 || p->apCsr[i]==0 );
+  for(i=1; i<=p->nMem; i++) assert( p->aMem==0 || p->aMem[i].flags==MEM_Null );
+#endif
+
+  sqlite3DbFree(db, p->zErrMsg);
+  p->zErrMsg = 0;
+  p->pResultSet = 0;
+}
+
+/*
+** Set the number of result columns that will be returned by this SQL
+** statement. This is now set at compile time, rather than during
+** execution of the vdbe program so that sqlite3_column_count() can
+** be called on an SQL statement before sqlite3_step().
+*/
+SQLITE_PRIVATE void sqlite3VdbeSetNumCols(Vdbe *p, int nResColumn){
+  Mem *pColName;
+  int n;
+  sqlite3 *db = p->db;
+
+  releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
+  sqlite3DbFree(db, p->aColName);
+  n = nResColumn*COLNAME_N;
+  p->nResColumn = (u16)nResColumn;
+  p->aColName = pColName = (Mem*)sqlite3DbMallocZero(db, sizeof(Mem)*n );
+  if( p->aColName==0 ) return;
+  while( n-- > 0 ){
+    pColName->flags = MEM_Null;
+    pColName->db = p->db;
+    pColName++;
+  }
+}
+
+/*
+** Set the name of the idx'th column to be returned by the SQL statement.
+** zName must be a pointer to a nul terminated string.
+**
+** This call must be made after a call to sqlite3VdbeSetNumCols().
+**
+** The final parameter, xDel, must be one of SQLITE_DYNAMIC, SQLITE_STATIC
+** or SQLITE_TRANSIENT. If it is SQLITE_DYNAMIC, then the buffer pointed
+** to by zName will be freed by sqlite3DbFree() when the vdbe is destroyed.
+*/
+SQLITE_PRIVATE int sqlite3VdbeSetColName(
+  Vdbe *p,                         /* Vdbe being configured */
+  int idx,                         /* Index of column zName applies to */
+  int var,                         /* One of the COLNAME_* constants */
+  const char *zName,               /* Pointer to buffer containing name */
+  void (*xDel)(void*)              /* Memory management strategy for zName */
+){
+  int rc;
+  Mem *pColName;
+  assert( idx<p->nResColumn );
+  assert( var<COLNAME_N );
+  if( p->db->mallocFailed ){
+    assert( !zName || xDel!=SQLITE_DYNAMIC );
+    return SQLITE_NOMEM;
+  }
+  assert( p->aColName!=0 );
+  pColName = &(p->aColName[idx+var*p->nResColumn]);
+  rc = sqlite3VdbeMemSetStr(pColName, zName, -1, SQLITE_UTF8, xDel);
+  assert( rc!=0 || !zName || (pColName->flags&MEM_Term)!=0 );
+  return rc;
+}
+
+/*
+** A read or write transaction may or may not be active on database handle
+** db. If a transaction is active, commit it. If there is a
+** write-transaction spanning more than one database file, this routine
+** takes care of the master journal trickery.
+*/
+static int vdbeCommit(sqlite3 *db, Vdbe *p){
+  int i;
+  int nTrans = 0;  /* Number of databases with an active write-transaction */
+  int rc = SQLITE_OK;
+  int needXcommit = 0;
+
+#ifdef SQLITE_OMIT_VIRTUALTABLE
+  /* With this option, sqlite3VtabSync() is defined to be simply 
+  ** SQLITE_OK so p is not used. 
+  */
+  UNUSED_PARAMETER(p);
+#endif
+
+  /* Before doing anything else, call the xSync() callback for any
+  ** virtual module tables written in this transaction. This has to
+  ** be done before determining whether a master journal file is 
+  ** required, as an xSync() callback may add an attached database
+  ** to the transaction.
+  */
+  rc = sqlite3VtabSync(db, &p->zErrMsg);
+
+  /* This loop determines (a) if the commit hook should be invoked and
+  ** (b) how many database files have open write transactions, not 
+  ** including the temp database. (b) is important because if more than 
+  ** one database file has an open write transaction, a master journal
+  ** file is required for an atomic commit.
+  */ 
+  for(i=0; rc==SQLITE_OK && i<db->nDb; i++){ 
+    Btree *pBt = db->aDb[i].pBt;
+    if( sqlite3BtreeIsInTrans(pBt) ){
+      needXcommit = 1;
+      if( i!=1 ) nTrans++;
+      rc = sqlite3PagerExclusiveLock(sqlite3BtreePager(pBt));
+    }
+  }
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+
+  /* If there are any write-transactions at all, invoke the commit hook */
+  if( needXcommit && db->xCommitCallback ){
+    rc = db->xCommitCallback(db->pCommitArg);
+    if( rc ){
+      return SQLITE_CONSTRAINT;
+    }
+  }
+
+  /* The simple case - no more than one database file (not counting the
+  ** TEMP database) has a transaction active.   There is no need for the
+  ** master-journal.
+  **
+  ** If the return value of sqlite3BtreeGetFilename() is a zero length
+  ** string, it means the main database is :memory: or a temp file.  In 
+  ** that case we do not support atomic multi-file commits, so use the 
+  ** simple case then too.
+  */
+  if( 0==sqlite3Strlen30(sqlite3BtreeGetFilename(db->aDb[0].pBt))
+   || nTrans<=1
+  ){
+    for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
+      Btree *pBt = db->aDb[i].pBt;
+      if( pBt ){
+        rc = sqlite3BtreeCommitPhaseOne(pBt, 0);
+      }
+    }
+
+    /* Do the commit only if all databases successfully complete phase 1. 
+    ** If one of the BtreeCommitPhaseOne() calls fails, this indicates an
+    ** IO error while deleting or truncating a journal file. It is unlikely,
+    ** but could happen. In this case abandon processing and return the error.
+    */
+    for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
+      Btree *pBt = db->aDb[i].pBt;
+      if( pBt ){
+        rc = sqlite3BtreeCommitPhaseTwo(pBt, 0);
+      }
+    }
+    if( rc==SQLITE_OK ){
+      sqlite3VtabCommit(db);
+    }
+  }
+
+  /* The complex case - There is a multi-file write-transaction active.
+  ** This requires a master journal file to ensure the transaction is
+  ** committed atomicly.
+  */
+#ifndef SQLITE_OMIT_DISKIO
+  else{
+    sqlite3_vfs *pVfs = db->pVfs;
+    int needSync = 0;
+    char *zMaster = 0;   /* File-name for the master journal */
+    char const *zMainFile = sqlite3BtreeGetFilename(db->aDb[0].pBt);
+    sqlite3_file *pMaster = 0;
+    i64 offset = 0;
+    int res;
+
+    /* Select a master journal file name */
+    do {
+      u32 iRandom;
+      sqlite3DbFree(db, zMaster);
+      sqlite3_randomness(sizeof(iRandom), &iRandom);
+      zMaster = sqlite3MPrintf(db, "%s-mj%08X", zMainFile, iRandom&0x7fffffff);
+      if( !zMaster ){
+        return SQLITE_NOMEM;
+      }
+      rc = sqlite3OsAccess(pVfs, zMaster, SQLITE_ACCESS_EXISTS, &res);
+    }while( rc==SQLITE_OK && res );
+    if( rc==SQLITE_OK ){
+      /* Open the master journal. */
+      rc = sqlite3OsOpenMalloc(pVfs, zMaster, &pMaster, 
+          SQLITE_OPEN_READWRITE|SQLITE_OPEN_CREATE|
+          SQLITE_OPEN_EXCLUSIVE|SQLITE_OPEN_MASTER_JOURNAL, 0
+      );
+    }
+    if( rc!=SQLITE_OK ){
+      sqlite3DbFree(db, zMaster);
+      return rc;
+    }
+ 
+    /* Write the name of each database file in the transaction into the new
+    ** master journal file. If an error occurs at this point close
+    ** and delete the master journal file. All the individual journal files
+    ** still have 'null' as the master journal pointer, so they will roll
+    ** back independently if a failure occurs.
+    */
+    for(i=0; i<db->nDb; i++){
+      Btree *pBt = db->aDb[i].pBt;
+      if( sqlite3BtreeIsInTrans(pBt) ){
+        char const *zFile = sqlite3BtreeGetJournalname(pBt);
+        if( zFile==0 ){
+          continue;  /* Ignore TEMP and :memory: databases */
+        }
+        assert( zFile[0]!=0 );
+        if( !needSync && !sqlite3BtreeSyncDisabled(pBt) ){
+          needSync = 1;
+        }
+        rc = sqlite3OsWrite(pMaster, zFile, sqlite3Strlen30(zFile)+1, offset);
+        offset += sqlite3Strlen30(zFile)+1;
+        if( rc!=SQLITE_OK ){
+          sqlite3OsCloseFree(pMaster);
+          sqlite3OsDelete(pVfs, zMaster, 0);
+          sqlite3DbFree(db, zMaster);
+          return rc;
+        }
+      }
+    }
+
+    /* Sync the master journal file. If the IOCAP_SEQUENTIAL device
+    ** flag is set this is not required.
+    */
+    if( needSync 
+     && 0==(sqlite3OsDeviceCharacteristics(pMaster)&SQLITE_IOCAP_SEQUENTIAL)
+     && SQLITE_OK!=(rc = sqlite3OsSync(pMaster, SQLITE_SYNC_NORMAL))
+    ){
+      sqlite3OsCloseFree(pMaster);
+      sqlite3OsDelete(pVfs, zMaster, 0);
+      sqlite3DbFree(db, zMaster);
+      return rc;
+    }
+
+    /* Sync all the db files involved in the transaction. The same call
+    ** sets the master journal pointer in each individual journal. If
+    ** an error occurs here, do not delete the master journal file.
+    **
+    ** If the error occurs during the first call to
+    ** sqlite3BtreeCommitPhaseOne(), then there is a chance that the
+    ** master journal file will be orphaned. But we cannot delete it,
+    ** in case the master journal file name was written into the journal
+    ** file before the failure occurred.
+    */
+    for(i=0; rc==SQLITE_OK && i<db->nDb; i++){ 
+      Btree *pBt = db->aDb[i].pBt;
+      if( pBt ){
+        rc = sqlite3BtreeCommitPhaseOne(pBt, zMaster);
+      }
+    }
+    sqlite3OsCloseFree(pMaster);
+    assert( rc!=SQLITE_BUSY );
+    if( rc!=SQLITE_OK ){
+      sqlite3DbFree(db, zMaster);
+      return rc;
+    }
+
+    /* Delete the master journal file. This commits the transaction. After
+    ** doing this the directory is synced again before any individual
+    ** transaction files are deleted.
+    */
+    rc = sqlite3OsDelete(pVfs, zMaster, 1);
+    sqlite3DbFree(db, zMaster);
+    zMaster = 0;
+    if( rc ){
+      return rc;
+    }
+
+    /* All files and directories have already been synced, so the following
+    ** calls to sqlite3BtreeCommitPhaseTwo() are only closing files and
+    ** deleting or truncating journals. If something goes wrong while
+    ** this is happening we don't really care. The integrity of the
+    ** transaction is already guaranteed, but some stray 'cold' journals
+    ** may be lying around. Returning an error code won't help matters.
+    */
+    disable_simulated_io_errors();
+    sqlite3BeginBenignMalloc();
+    for(i=0; i<db->nDb; i++){ 
+      Btree *pBt = db->aDb[i].pBt;
+      if( pBt ){
+        sqlite3BtreeCommitPhaseTwo(pBt, 1);
+      }
+    }
+    sqlite3EndBenignMalloc();
+    enable_simulated_io_errors();
+
+    sqlite3VtabCommit(db);
+  }
+#endif
+
+  return rc;
+}
+
+/* 
+** This routine checks that the sqlite3.activeVdbeCnt count variable
+** matches the number of vdbe's in the list sqlite3.pVdbe that are
+** currently active. An assertion fails if the two counts do not match.
+** This is an internal self-check only - it is not an essential processing
+** step.
+**
+** This is a no-op if NDEBUG is defined.
+*/
+#ifndef NDEBUG
+static void checkActiveVdbeCnt(sqlite3 *db){
+  Vdbe *p;
+  int cnt = 0;
+  int nWrite = 0;
+  p = db->pVdbe;
+  while( p ){
+    if( p->magic==VDBE_MAGIC_RUN && p->pc>=0 ){
+      cnt++;
+      if( p->readOnly==0 ) nWrite++;
+    }
+    p = p->pNext;
+  }
+  assert( cnt==db->activeVdbeCnt );
+  assert( nWrite==db->writeVdbeCnt );
+}
+#else
+#define checkActiveVdbeCnt(x)
+#endif
+
+/*
+** For every Btree that in database connection db which 
+** has been modified, "trip" or invalidate each cursor in
+** that Btree might have been modified so that the cursor
+** can never be used again.  This happens when a rollback
+*** occurs.  We have to trip all the other cursors, even
+** cursor from other VMs in different database connections,
+** so that none of them try to use the data at which they
+** were pointing and which now may have been changed due
+** to the rollback.
+**
+** Remember that a rollback can delete tables complete and
+** reorder rootpages.  So it is not sufficient just to save
+** the state of the cursor.  We have to invalidate the cursor
+** so that it is never used again.
+*/
+static void invalidateCursorsOnModifiedBtrees(sqlite3 *db){
+  int i;
+  for(i=0; i<db->nDb; i++){
+    Btree *p = db->aDb[i].pBt;
+    if( p && sqlite3BtreeIsInTrans(p) ){
+      sqlite3BtreeTripAllCursors(p, SQLITE_ABORT);
+    }
+  }
+}
+
+/*
+** If the Vdbe passed as the first argument opened a statement-transaction,
+** close it now. Argument eOp must be either SAVEPOINT_ROLLBACK or
+** SAVEPOINT_RELEASE. If it is SAVEPOINT_ROLLBACK, then the statement
+** transaction is rolled back. If eOp is SAVEPOINT_RELEASE, then the 
+** statement transaction is commtted.
+**
+** If an IO error occurs, an SQLITE_IOERR_XXX error code is returned. 
+** Otherwise SQLITE_OK.
+*/
+SQLITE_PRIVATE int sqlite3VdbeCloseStatement(Vdbe *p, int eOp){
+  sqlite3 *const db = p->db;
+  int rc = SQLITE_OK;
+
+  /* If p->iStatement is greater than zero, then this Vdbe opened a 
+  ** statement transaction that should be closed here. The only exception
+  ** is that an IO error may have occured, causing an emergency rollback.
+  ** In this case (db->nStatement==0), and there is nothing to do.
+  */
+  if( db->nStatement && p->iStatement ){
+    int i;
+    const int iSavepoint = p->iStatement-1;
+
+    assert( eOp==SAVEPOINT_ROLLBACK || eOp==SAVEPOINT_RELEASE);
+    assert( db->nStatement>0 );
+    assert( p->iStatement==(db->nStatement+db->nSavepoint) );
+
+    for(i=0; i<db->nDb; i++){ 
+      int rc2 = SQLITE_OK;
+      Btree *pBt = db->aDb[i].pBt;
+      if( pBt ){
+        if( eOp==SAVEPOINT_ROLLBACK ){
+          rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_ROLLBACK, iSavepoint);
+        }
+        if( rc2==SQLITE_OK ){
+          rc2 = sqlite3BtreeSavepoint(pBt, SAVEPOINT_RELEASE, iSavepoint);
+        }
+        if( rc==SQLITE_OK ){
+          rc = rc2;
+        }
+      }
+    }
+    db->nStatement--;
+    p->iStatement = 0;
+
+    /* If the statement transaction is being rolled back, also restore the 
+    ** database handles deferred constraint counter to the value it had when 
+    ** the statement transaction was opened.  */
+    if( eOp==SAVEPOINT_ROLLBACK ){
+      db->nDeferredCons = p->nStmtDefCons;
+    }
+  }
+  return rc;
+}
+
+/*
+** This function is called when a transaction opened by the database 
+** handle associated with the VM passed as an argument is about to be 
+** committed. If there are outstanding deferred foreign key constraint
+** violations, return SQLITE_ERROR. Otherwise, SQLITE_OK.
+**
+** If there are outstanding FK violations and this function returns 
+** SQLITE_ERROR, set the result of the VM to SQLITE_CONSTRAINT and write
+** an error message to it. Then return SQLITE_ERROR.
+*/
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+SQLITE_PRIVATE int sqlite3VdbeCheckFk(Vdbe *p, int deferred){
+  sqlite3 *db = p->db;
+  if( (deferred && db->nDeferredCons>0) || (!deferred && p->nFkConstraint>0) ){
+    p->rc = SQLITE_CONSTRAINT;
+    p->errorAction = OE_Abort;
+    sqlite3SetString(&p->zErrMsg, db, "foreign key constraint failed");
+    return SQLITE_ERROR;
+  }
+  return SQLITE_OK;
+}
+#endif
+
+/*
+** This routine is called the when a VDBE tries to halt.  If the VDBE
+** has made changes and is in autocommit mode, then commit those
+** changes.  If a rollback is needed, then do the rollback.
+**
+** This routine is the only way to move the state of a VM from
+** SQLITE_MAGIC_RUN to SQLITE_MAGIC_HALT.  It is harmless to
+** call this on a VM that is in the SQLITE_MAGIC_HALT state.
+**
+** Return an error code.  If the commit could not complete because of
+** lock contention, return SQLITE_BUSY.  If SQLITE_BUSY is returned, it
+** means the close did not happen and needs to be repeated.
+*/
+SQLITE_PRIVATE int sqlite3VdbeHalt(Vdbe *p){
+  int rc;                         /* Used to store transient return codes */
+  sqlite3 *db = p->db;
+
+  /* This function contains the logic that determines if a statement or
+  ** transaction will be committed or rolled back as a result of the
+  ** execution of this virtual machine. 
+  **
+  ** If any of the following errors occur:
+  **
+  **     SQLITE_NOMEM
+  **     SQLITE_IOERR
+  **     SQLITE_FULL
+  **     SQLITE_INTERRUPT
+  **
+  ** Then the internal cache might have been left in an inconsistent
+  ** state.  We need to rollback the statement transaction, if there is
+  ** one, or the complete transaction if there is no statement transaction.
+  */
+
+  if( p->db->mallocFailed ){
+    p->rc = SQLITE_NOMEM;
+  }
+  closeAllCursors(p);
+  if( p->magic!=VDBE_MAGIC_RUN ){
+    return SQLITE_OK;
+  }
+  checkActiveVdbeCnt(db);
+
+  /* No commit or rollback needed if the program never started */
+  if( p->pc>=0 ){
+    int mrc;   /* Primary error code from p->rc */
+    int eStatementOp = 0;
+    int isSpecialError;            /* Set to true if a 'special' error */
+
+    /* Lock all btrees used by the statement */
+    sqlite3VdbeEnter(p);
+
+    /* Check for one of the special errors */
+    mrc = p->rc & 0xff;
+    assert( p->rc!=SQLITE_IOERR_BLOCKED );  /* This error no longer exists */
+    isSpecialError = mrc==SQLITE_NOMEM || mrc==SQLITE_IOERR
+                     || mrc==SQLITE_INTERRUPT || mrc==SQLITE_FULL;
+    if( isSpecialError ){
+      /* If the query was read-only and the error code is SQLITE_INTERRUPT, 
+      ** no rollback is necessary. Otherwise, at least a savepoint 
+      ** transaction must be rolled back to restore the database to a 
+      ** consistent state.
+      **
+      ** Even if the statement is read-only, it is important to perform
+      ** a statement or transaction rollback operation. If the error 
+      ** occured while writing to the journal, sub-journal or database
+      ** file as part of an effort to free up cache space (see function
+      ** pagerStress() in pager.c), the rollback is required to restore 
+      ** the pager to a consistent state.
+      */
+      if( !p->readOnly || mrc!=SQLITE_INTERRUPT ){
+        if( (mrc==SQLITE_NOMEM || mrc==SQLITE_FULL) && p->usesStmtJournal ){
+          eStatementOp = SAVEPOINT_ROLLBACK;
+        }else{
+          /* We are forced to roll back the active transaction. Before doing
+          ** so, abort any other statements this handle currently has active.
+          */
+          invalidateCursorsOnModifiedBtrees(db);
+          sqlite3RollbackAll(db);
+          sqlite3CloseSavepoints(db);
+          db->autoCommit = 1;
+        }
+      }
+    }
+
+    /* Check for immediate foreign key violations. */
+    if( p->rc==SQLITE_OK ){
+      sqlite3VdbeCheckFk(p, 0);
+    }
+  
+    /* If the auto-commit flag is set and this is the only active writer 
+    ** VM, then we do either a commit or rollback of the current transaction. 
+    **
+    ** Note: This block also runs if one of the special errors handled 
+    ** above has occurred. 
+    */
+    if( !sqlite3VtabInSync(db) 
+     && db->autoCommit 
+     && db->writeVdbeCnt==(p->readOnly==0) 
+    ){
+      if( p->rc==SQLITE_OK || (p->errorAction==OE_Fail && !isSpecialError) ){
+        rc = sqlite3VdbeCheckFk(p, 1);
+        if( rc!=SQLITE_OK ){
+          if( NEVER(p->readOnly) ){
+            sqlite3VdbeLeave(p);
+            return SQLITE_ERROR;
+          }
+          rc = SQLITE_CONSTRAINT;
+        }else{ 
+          /* The auto-commit flag is true, the vdbe program was successful 
+          ** or hit an 'OR FAIL' constraint and there are no deferred foreign
+          ** key constraints to hold up the transaction. This means a commit 
+          ** is required. */
+          rc = vdbeCommit(db, p);
+        }
+        if( rc==SQLITE_BUSY && p->readOnly ){
+          sqlite3VdbeLeave(p);
+          return SQLITE_BUSY;
+        }else if( rc!=SQLITE_OK ){
+          p->rc = rc;
+          sqlite3RollbackAll(db);
+        }else{
+          db->nDeferredCons = 0;
+          sqlite3CommitInternalChanges(db);
+        }
+      }else{
+        sqlite3RollbackAll(db);
+      }
+      db->nStatement = 0;
+    }else if( eStatementOp==0 ){
+      if( p->rc==SQLITE_OK || p->errorAction==OE_Fail ){
+        eStatementOp = SAVEPOINT_RELEASE;
+      }else if( p->errorAction==OE_Abort ){
+        eStatementOp = SAVEPOINT_ROLLBACK;
+      }else{
+        invalidateCursorsOnModifiedBtrees(db);
+        sqlite3RollbackAll(db);
+        sqlite3CloseSavepoints(db);
+        db->autoCommit = 1;
+      }
+    }
+  
+    /* If eStatementOp is non-zero, then a statement transaction needs to
+    ** be committed or rolled back. Call sqlite3VdbeCloseStatement() to
+    ** do so. If this operation returns an error, and the current statement
+    ** error code is SQLITE_OK or SQLITE_CONSTRAINT, then promote the
+    ** current statement error code.
+    **
+    ** Note that sqlite3VdbeCloseStatement() can only fail if eStatementOp
+    ** is SAVEPOINT_ROLLBACK.  But if p->rc==SQLITE_OK then eStatementOp
+    ** must be SAVEPOINT_RELEASE.  Hence the NEVER(p->rc==SQLITE_OK) in 
+    ** the following code.
+    */
+    if( eStatementOp ){
+      rc = sqlite3VdbeCloseStatement(p, eStatementOp);
+      if( rc ){
+        assert( eStatementOp==SAVEPOINT_ROLLBACK );
+        if( NEVER(p->rc==SQLITE_OK) || p->rc==SQLITE_CONSTRAINT ){
+          p->rc = rc;
+          sqlite3DbFree(db, p->zErrMsg);
+          p->zErrMsg = 0;
+        }
+        invalidateCursorsOnModifiedBtrees(db);
+        sqlite3RollbackAll(db);
+        sqlite3CloseSavepoints(db);
+        db->autoCommit = 1;
+      }
+    }
+  
+    /* If this was an INSERT, UPDATE or DELETE and no statement transaction
+    ** has been rolled back, update the database connection change-counter. 
+    */
+    if( p->changeCntOn ){
+      if( eStatementOp!=SAVEPOINT_ROLLBACK ){
+        sqlite3VdbeSetChanges(db, p->nChange);
+      }else{
+        sqlite3VdbeSetChanges(db, 0);
+      }
+      p->nChange = 0;
+    }
+  
+    /* Rollback or commit any schema changes that occurred. */
+    if( p->rc!=SQLITE_OK && db->flags&SQLITE_InternChanges ){
+      sqlite3ResetInternalSchema(db, -1);
+      db->flags = (db->flags | SQLITE_InternChanges);
+    }
+
+    /* Release the locks */
+    sqlite3VdbeLeave(p);
+  }
+
+  /* We have successfully halted and closed the VM.  Record this fact. */
+  if( p->pc>=0 ){
+    db->activeVdbeCnt--;
+    if( !p->readOnly ){
+      db->writeVdbeCnt--;
+    }
+    assert( db->activeVdbeCnt>=db->writeVdbeCnt );
+  }
+  p->magic = VDBE_MAGIC_HALT;
+  checkActiveVdbeCnt(db);
+  if( p->db->mallocFailed ){
+    p->rc = SQLITE_NOMEM;
+  }
+
+  /* If the auto-commit flag is set to true, then any locks that were held
+  ** by connection db have now been released. Call sqlite3ConnectionUnlocked() 
+  ** to invoke any required unlock-notify callbacks.
+  */
+  if( db->autoCommit ){
+    sqlite3ConnectionUnlocked(db);
+  }
+
+  assert( db->activeVdbeCnt>0 || db->autoCommit==0 || db->nStatement==0 );
+  return (p->rc==SQLITE_BUSY ? SQLITE_BUSY : SQLITE_OK);
+}
+
+
+/*
+** Each VDBE holds the result of the most recent sqlite3_step() call
+** in p->rc.  This routine sets that result back to SQLITE_OK.
+*/
+SQLITE_PRIVATE void sqlite3VdbeResetStepResult(Vdbe *p){
+  p->rc = SQLITE_OK;
+}
+
+/*
+** Clean up a VDBE after execution but do not delete the VDBE just yet.
+** Write any error messages into *pzErrMsg.  Return the result code.
+**
+** After this routine is run, the VDBE should be ready to be executed
+** again.
+**
+** To look at it another way, this routine resets the state of the
+** virtual machine from VDBE_MAGIC_RUN or VDBE_MAGIC_HALT back to
+** VDBE_MAGIC_INIT.
+*/
+SQLITE_PRIVATE int sqlite3VdbeReset(Vdbe *p){
+  sqlite3 *db;
+  db = p->db;
+
+  /* If the VM did not run to completion or if it encountered an
+  ** error, then it might not have been halted properly.  So halt
+  ** it now.
+  */
+  sqlite3VdbeHalt(p);
+
+  /* If the VDBE has be run even partially, then transfer the error code
+  ** and error message from the VDBE into the main database structure.  But
+  ** if the VDBE has just been set to run but has not actually executed any
+  ** instructions yet, leave the main database error information unchanged.
+  */
+  if( p->pc>=0 ){
+    if( p->zErrMsg ){
+      sqlite3BeginBenignMalloc();
+      sqlite3ValueSetStr(db->pErr,-1,p->zErrMsg,SQLITE_UTF8,SQLITE_TRANSIENT);
+      sqlite3EndBenignMalloc();
+      db->errCode = p->rc;
+      sqlite3DbFree(db, p->zErrMsg);
+      p->zErrMsg = 0;
+    }else if( p->rc ){
+      sqlite3Error(db, p->rc, 0);
+    }else{
+      sqlite3Error(db, SQLITE_OK, 0);
+    }
+    if( p->runOnlyOnce ) p->expired = 1;
+  }else if( p->rc && p->expired ){
+    /* The expired flag was set on the VDBE before the first call
+    ** to sqlite3_step(). For consistency (since sqlite3_step() was
+    ** called), set the database error in this case as well.
+    */
+    sqlite3Error(db, p->rc, 0);
+    sqlite3ValueSetStr(db->pErr, -1, p->zErrMsg, SQLITE_UTF8, SQLITE_TRANSIENT);
+    sqlite3DbFree(db, p->zErrMsg);
+    p->zErrMsg = 0;
+  }
+
+  /* Reclaim all memory used by the VDBE
+  */
+  Cleanup(p);
+
+  /* Save profiling information from this VDBE run.
+  */
+#ifdef VDBE_PROFILE
+  {
+    FILE *out = fopen("vdbe_profile.out", "a");
+    if( out ){
+      int i;
+      fprintf(out, "---- ");
+      for(i=0; i<p->nOp; i++){
+        fprintf(out, "%02x", p->aOp[i].opcode);
+      }
+      fprintf(out, "\n");
+      for(i=0; i<p->nOp; i++){
+        fprintf(out, "%6d %10lld %8lld ",
+           p->aOp[i].cnt,
+           p->aOp[i].cycles,
+           p->aOp[i].cnt>0 ? p->aOp[i].cycles/p->aOp[i].cnt : 0
+        );
+        sqlite3VdbePrintOp(out, i, &p->aOp[i]);
+      }
+      fclose(out);
+    }
+  }
+#endif
+  p->magic = VDBE_MAGIC_INIT;
+  return p->rc & db->errMask;
+}
+ 
+/*
+** Clean up and delete a VDBE after execution.  Return an integer which is
+** the result code.  Write any error message text into *pzErrMsg.
+*/
+SQLITE_PRIVATE int sqlite3VdbeFinalize(Vdbe *p){
+  int rc = SQLITE_OK;
+  if( p->magic==VDBE_MAGIC_RUN || p->magic==VDBE_MAGIC_HALT ){
+    rc = sqlite3VdbeReset(p);
+    assert( (rc & p->db->errMask)==rc );
+  }
+  sqlite3VdbeDelete(p);
+  return rc;
+}
+
+/*
+** Call the destructor for each auxdata entry in pVdbeFunc for which
+** the corresponding bit in mask is clear.  Auxdata entries beyond 31
+** are always destroyed.  To destroy all auxdata entries, call this
+** routine with mask==0.
+*/
+SQLITE_PRIVATE void sqlite3VdbeDeleteAuxData(VdbeFunc *pVdbeFunc, int mask){
+  int i;
+  for(i=0; i<pVdbeFunc->nAux; i++){
+    struct AuxData *pAux = &pVdbeFunc->apAux[i];
+    if( (i>31 || !(mask&(((u32)1)<<i))) && pAux->pAux ){
+      if( pAux->xDelete ){
+        pAux->xDelete(pAux->pAux);
+      }
+      pAux->pAux = 0;
+    }
+  }
+}
+
+/*
+** Free all memory associated with the Vdbe passed as the second argument.
+** The difference between this function and sqlite3VdbeDelete() is that
+** VdbeDelete() also unlinks the Vdbe from the list of VMs associated with
+** the database connection.
+*/
+SQLITE_PRIVATE void sqlite3VdbeDeleteObject(sqlite3 *db, Vdbe *p){
+  SubProgram *pSub, *pNext;
+  assert( p->db==0 || p->db==db );
+  releaseMemArray(p->aVar, p->nVar);
+  releaseMemArray(p->aColName, p->nResColumn*COLNAME_N);
+  for(pSub=p->pProgram; pSub; pSub=pNext){
+    pNext = pSub->pNext;
+    vdbeFreeOpArray(db, pSub->aOp, pSub->nOp);
+    sqlite3DbFree(db, pSub);
+  }
+  vdbeFreeOpArray(db, p->aOp, p->nOp);
+  sqlite3DbFree(db, p->aLabel);
+  sqlite3DbFree(db, p->aColName);
+  sqlite3DbFree(db, p->zSql);
+  sqlite3DbFree(db, p->pFree);
+  sqlite3DbFree(db, p);
+}
+
+/*
+** Delete an entire VDBE.
+*/
+SQLITE_PRIVATE void sqlite3VdbeDelete(Vdbe *p){
+  sqlite3 *db;
+
+  if( NEVER(p==0) ) return;
+  db = p->db;
+  if( p->pPrev ){
+    p->pPrev->pNext = p->pNext;
+  }else{
+    assert( db->pVdbe==p );
+    db->pVdbe = p->pNext;
+  }
+  if( p->pNext ){
+    p->pNext->pPrev = p->pPrev;
+  }
+  p->magic = VDBE_MAGIC_DEAD;
+  p->db = 0;
+  sqlite3VdbeDeleteObject(db, p);
+}
+
+/*
+** Make sure the cursor p is ready to read or write the row to which it
+** was last positioned.  Return an error code if an OOM fault or I/O error
+** prevents us from positioning the cursor to its correct position.
+**
+** If a MoveTo operation is pending on the given cursor, then do that
+** MoveTo now.  If no move is pending, check to see if the row has been
+** deleted out from under the cursor and if it has, mark the row as
+** a NULL row.
+**
+** If the cursor is already pointing to the correct row and that row has
+** not been deleted out from under the cursor, then this routine is a no-op.
+*/
+SQLITE_PRIVATE int sqlite3VdbeCursorMoveto(VdbeCursor *p){
+  if( p->deferredMoveto ){
+    int res, rc;
+#ifdef SQLITE_TEST
+    extern int sqlite3_search_count;
+#endif
+    assert( p->isTable );
+    rc = sqlite3BtreeMovetoUnpacked(p->pCursor, 0, p->movetoTarget, 0, &res);
+    if( rc ) return rc;
+    p->lastRowid = p->movetoTarget;
+    if( res!=0 ) return SQLITE_CORRUPT_BKPT;
+    p->rowidIsValid = 1;
+#ifdef SQLITE_TEST
+    sqlite3_search_count++;
+#endif
+    p->deferredMoveto = 0;
+    p->cacheStatus = CACHE_STALE;
+  }else if( ALWAYS(p->pCursor) ){
+    int hasMoved;
+    int rc = sqlite3BtreeCursorHasMoved(p->pCursor, &hasMoved);
+    if( rc ) return rc;
+    if( hasMoved ){
+      p->cacheStatus = CACHE_STALE;
+      p->nullRow = 1;
+    }
+  }
+  return SQLITE_OK;
+}
+
+/*
+** The following functions:
+**
+** sqlite3VdbeSerialType()
+** sqlite3VdbeSerialTypeLen()
+** sqlite3VdbeSerialLen()
+** sqlite3VdbeSerialPut()
+** sqlite3VdbeSerialGet()
+**
+** encapsulate the code that serializes values for storage in SQLite
+** data and index records. Each serialized value consists of a
+** 'serial-type' and a blob of data. The serial type is an 8-byte unsigned
+** integer, stored as a varint.
+**
+** In an SQLite index record, the serial type is stored directly before
+** the blob of data that it corresponds to. In a table record, all serial
+** types are stored at the start of the record, and the blobs of data at
+** the end. Hence these functions allow the caller to handle the
+** serial-type and data blob seperately.
+**
+** The following table describes the various storage classes for data:
+**
+**   serial type        bytes of data      type
+**   --------------     ---------------    ---------------
+**      0                     0            NULL
+**      1                     1            signed integer
+**      2                     2            signed integer
+**      3                     3            signed integer
+**      4                     4            signed integer
+**      5                     6            signed integer
+**      6                     8            signed integer
+**      7                     8            IEEE float
+**      8                     0            Integer constant 0
+**      9                     0            Integer constant 1
+**     10,11                               reserved for expansion
+**    N>=12 and even       (N-12)/2        BLOB
+**    N>=13 and odd        (N-13)/2        text
+**
+** The 8 and 9 types were added in 3.3.0, file format 4.  Prior versions
+** of SQLite will not understand those serial types.
+*/
+
+/*
+** Return the serial-type for the value stored in pMem.
+*/
+SQLITE_PRIVATE u32 sqlite3VdbeSerialType(Mem *pMem, int file_format){
+  int flags = pMem->flags;
+  int n;
+
+  if( flags&MEM_Null ){
+    return 0;
+  }
+  if( flags&MEM_Int ){
+    /* Figure out whether to use 1, 2, 4, 6 or 8 bytes. */
+#   define MAX_6BYTE ((((i64)0x00008000)<<32)-1)
+    i64 i = pMem->u.i;
+    u64 u;
+    if( file_format>=4 && (i&1)==i ){
+      return 8+(u32)i;
+    }
+    if( i<0 ){
+      if( i<(-MAX_6BYTE) ) return 6;
+      /* Previous test prevents:  u = -(-9223372036854775808) */
+      u = -i;
+    }else{
+      u = i;
+    }
+    if( u<=127 ) return 1;
+    if( u<=32767 ) return 2;
+    if( u<=8388607 ) return 3;
+    if( u<=2147483647 ) return 4;
+    if( u<=MAX_6BYTE ) return 5;
+    return 6;
+  }
+  if( flags&MEM_Real ){
+    return 7;
+  }
+  assert( pMem->db->mallocFailed || flags&(MEM_Str|MEM_Blob) );
+  n = pMem->n;
+  if( flags & MEM_Zero ){
+    n += pMem->u.nZero;
+  }
+  assert( n>=0 );
+  return ((n*2) + 12 + ((flags&MEM_Str)!=0));
+}
+
+/*
+** Return the length of the data corresponding to the supplied serial-type.
+*/
+SQLITE_PRIVATE u32 sqlite3VdbeSerialTypeLen(u32 serial_type){
+  if( serial_type>=12 ){
+    return (serial_type-12)/2;
+  }else{
+    static const u8 aSize[] = { 0, 1, 2, 3, 4, 6, 8, 8, 0, 0, 0, 0 };
+    return aSize[serial_type];
+  }
+}
+
+/*
+** If we are on an architecture with mixed-endian floating 
+** points (ex: ARM7) then swap the lower 4 bytes with the 
+** upper 4 bytes.  Return the result.
+**
+** For most architectures, this is a no-op.
+**
+** (later):  It is reported to me that the mixed-endian problem
+** on ARM7 is an issue with GCC, not with the ARM7 chip.  It seems
+** that early versions of GCC stored the two words of a 64-bit
+** float in the wrong order.  And that error has been propagated
+** ever since.  The blame is not necessarily with GCC, though.
+** GCC might have just copying the problem from a prior compiler.
+** I am also told that newer versions of GCC that follow a different
+** ABI get the byte order right.
+**
+** Developers using SQLite on an ARM7 should compile and run their
+** application using -DSQLITE_DEBUG=1 at least once.  With DEBUG
+** enabled, some asserts below will ensure that the byte order of
+** floating point values is correct.
+**
+** (2007-08-30)  Frank van Vugt has studied this problem closely
+** and has send his findings to the SQLite developers.  Frank
+** writes that some Linux kernels offer floating point hardware
+** emulation that uses only 32-bit mantissas instead of a full 
+** 48-bits as required by the IEEE standard.  (This is the
+** CONFIG_FPE_FASTFPE option.)  On such systems, floating point
+** byte swapping becomes very complicated.  To avoid problems,
+** the necessary byte swapping is carried out using a 64-bit integer
+** rather than a 64-bit float.  Frank assures us that the code here
+** works for him.  We, the developers, have no way to independently
+** verify this, but Frank seems to know what he is talking about
+** so we trust him.
+*/
+#ifdef SQLITE_MIXED_ENDIAN_64BIT_FLOAT
+static u64 floatSwap(u64 in){
+  union {
+    u64 r;
+    u32 i[2];
+  } u;
+  u32 t;
+
+  u.r = in;
+  t = u.i[0];
+  u.i[0] = u.i[1];
+  u.i[1] = t;
+  return u.r;
+}
+# define swapMixedEndianFloat(X)  X = floatSwap(X)
+#else
+# define swapMixedEndianFloat(X)
+#endif
+
+/*
+** Write the serialized data blob for the value stored in pMem into 
+** buf. It is assumed that the caller has allocated sufficient space.
+** Return the number of bytes written.
+**
+** nBuf is the amount of space left in buf[].  nBuf must always be
+** large enough to hold the entire field.  Except, if the field is
+** a blob with a zero-filled tail, then buf[] might be just the right
+** size to hold everything except for the zero-filled tail.  If buf[]
+** is only big enough to hold the non-zero prefix, then only write that
+** prefix into buf[].  But if buf[] is large enough to hold both the
+** prefix and the tail then write the prefix and set the tail to all
+** zeros.
+**
+** Return the number of bytes actually written into buf[].  The number
+** of bytes in the zero-filled tail is included in the return value only
+** if those bytes were zeroed in buf[].
+*/ 
+SQLITE_PRIVATE u32 sqlite3VdbeSerialPut(u8 *buf, int nBuf, Mem *pMem, int file_format){
+  u32 serial_type = sqlite3VdbeSerialType(pMem, file_format);
+  u32 len;
+
+  /* Integer and Real */
+  if( serial_type<=7 && serial_type>0 ){
+    u64 v;
+    u32 i;
+    if( serial_type==7 ){
+      assert( sizeof(v)==sizeof(pMem->r) );
+      memcpy(&v, &pMem->r, sizeof(v));
+      swapMixedEndianFloat(v);
+    }else{
+      v = pMem->u.i;
+    }
+    len = i = sqlite3VdbeSerialTypeLen(serial_type);
+    assert( len<=(u32)nBuf );
+    while( i-- ){
+      buf[i] = (u8)(v&0xFF);
+      v >>= 8;
+    }
+    return len;
+  }
+
+  /* String or blob */
+  if( serial_type>=12 ){
+    assert( pMem->n + ((pMem->flags & MEM_Zero)?pMem->u.nZero:0)
+             == (int)sqlite3VdbeSerialTypeLen(serial_type) );
+    assert( pMem->n<=nBuf );
+    len = pMem->n;
+    memcpy(buf, pMem->z, len);
+    if( pMem->flags & MEM_Zero ){
+      len += pMem->u.nZero;
+      assert( nBuf>=0 );
+      if( len > (u32)nBuf ){
+        len = (u32)nBuf;
+      }
+      memset(&buf[pMem->n], 0, len-pMem->n);
+    }
+    return len;
+  }
+
+  /* NULL or constants 0 or 1 */
+  return 0;
+}
+
+/*
+** Deserialize the data blob pointed to by buf as serial type serial_type
+** and store the result in pMem.  Return the number of bytes read.
+*/ 
+SQLITE_PRIVATE u32 sqlite3VdbeSerialGet(
+  const unsigned char *buf,     /* Buffer to deserialize from */
+  u32 serial_type,              /* Serial type to deserialize */
+  Mem *pMem                     /* Memory cell to write value into */
+){
+  switch( serial_type ){
+    case 10:   /* Reserved for future use */
+    case 11:   /* Reserved for future use */
+    case 0: {  /* NULL */
+      pMem->flags = MEM_Null;
+      break;
+    }
+    case 1: { /* 1-byte signed integer */
+      pMem->u.i = (signed char)buf[0];
+      pMem->flags = MEM_Int;
+      return 1;
+    }
+    case 2: { /* 2-byte signed integer */
+      pMem->u.i = (((signed char)buf[0])<<8) | buf[1];
+      pMem->flags = MEM_Int;
+      return 2;
+    }
+    case 3: { /* 3-byte signed integer */
+      pMem->u.i = (((signed char)buf[0])<<16) | (buf[1]<<8) | buf[2];
+      pMem->flags = MEM_Int;
+      return 3;
+    }
+    case 4: { /* 4-byte signed integer */
+      pMem->u.i = (buf[0]<<24) | (buf[1]<<16) | (buf[2]<<8) | buf[3];
+      pMem->flags = MEM_Int;
+      return 4;
+    }
+    case 5: { /* 6-byte signed integer */
+      u64 x = (((signed char)buf[0])<<8) | buf[1];
+      u32 y = (buf[2]<<24) | (buf[3]<<16) | (buf[4]<<8) | buf[5];
+      x = (x<<32) | y;
+      pMem->u.i = *(i64*)&x;
+      pMem->flags = MEM_Int;
+      return 6;
+    }
+    case 6:   /* 8-byte signed integer */
+    case 7: { /* IEEE floating point */
+      u64 x;
+      u32 y;
+#if !defined(NDEBUG) && !defined(SQLITE_OMIT_FLOATING_POINT)
+      /* Verify that integers and floating point values use the same
+      ** byte order.  Or, that if SQLITE_MIXED_ENDIAN_64BIT_FLOAT is
+      ** defined that 64-bit floating point values really are mixed
+      ** endian.
+      */
+      static const u64 t1 = ((u64)0x3ff00000)<<32;
+      static const double r1 = 1.0;
+      u64 t2 = t1;
+      swapMixedEndianFloat(t2);
+      assert( sizeof(r1)==sizeof(t2) && memcmp(&r1, &t2, sizeof(r1))==0 );
+#endif
+
+      x = (buf[0]<<24) | (buf[1]<<16) | (buf[2]<<8) | buf[3];
+      y = (buf[4]<<24) | (buf[5]<<16) | (buf[6]<<8) | buf[7];
+      x = (x<<32) | y;
+      if( serial_type==6 ){
+        pMem->u.i = *(i64*)&x;
+        pMem->flags = MEM_Int;
+      }else{
+        assert( sizeof(x)==8 && sizeof(pMem->r)==8 );
+        swapMixedEndianFloat(x);
+        memcpy(&pMem->r, &x, sizeof(x));
+        pMem->flags = sqlite3IsNaN(pMem->r) ? MEM_Null : MEM_Real;
+      }
+      return 8;
+    }
+    case 8:    /* Integer 0 */
+    case 9: {  /* Integer 1 */
+      pMem->u.i = serial_type-8;
+      pMem->flags = MEM_Int;
+      return 0;
+    }
+    default: {
+      u32 len = (serial_type-12)/2;
+      pMem->z = (char *)buf;
+      pMem->n = len;
+      pMem->xDel = 0;
+      if( serial_type&0x01 ){
+        pMem->flags = MEM_Str | MEM_Ephem;
+      }else{
+        pMem->flags = MEM_Blob | MEM_Ephem;
+      }
+      return len;
+    }
+  }
+  return 0;
+}
+
+
+/*
+** Given the nKey-byte encoding of a record in pKey[], parse the
+** record into a UnpackedRecord structure.  Return a pointer to
+** that structure.
+**
+** The calling function might provide szSpace bytes of memory
+** space at pSpace.  This space can be used to hold the returned
+** VDbeParsedRecord structure if it is large enough.  If it is
+** not big enough, space is obtained from sqlite3_malloc().
+**
+** The returned structure should be closed by a call to
+** sqlite3VdbeDeleteUnpackedRecord().
+*/ 
+SQLITE_PRIVATE UnpackedRecord *sqlite3VdbeRecordUnpack(
+  KeyInfo *pKeyInfo,     /* Information about the record format */
+  int nKey,              /* Size of the binary record */
+  const void *pKey,      /* The binary record */
+  char *pSpace,          /* Unaligned space available to hold the object */
+  int szSpace            /* Size of pSpace[] in bytes */
+){
+  const unsigned char *aKey = (const unsigned char *)pKey;
+  UnpackedRecord *p;  /* The unpacked record that we will return */
+  int nByte;          /* Memory space needed to hold p, in bytes */
+  int d;
+  u32 idx;
+  u16 u;              /* Unsigned loop counter */
+  u32 szHdr;
+  Mem *pMem;
+  int nOff;           /* Increase pSpace by this much to 8-byte align it */
+  
+  /*
+  ** We want to shift the pointer pSpace up such that it is 8-byte aligned.
+  ** Thus, we need to calculate a value, nOff, between 0 and 7, to shift 
+  ** it by.  If pSpace is already 8-byte aligned, nOff should be zero.
+  */
+  nOff = (8 - (SQLITE_PTR_TO_INT(pSpace) & 7)) & 7;
+  pSpace += nOff;
+  szSpace -= nOff;
+  nByte = ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*(pKeyInfo->nField+1);
+  if( nByte>szSpace ){
+    p = sqlite3DbMallocRaw(pKeyInfo->db, nByte);
+    if( p==0 ) return 0;
+    p->flags = UNPACKED_NEED_FREE | UNPACKED_NEED_DESTROY;
+  }else{
+    p = (UnpackedRecord*)pSpace;
+    p->flags = UNPACKED_NEED_DESTROY;
+  }
+  p->pKeyInfo = pKeyInfo;
+  p->nField = pKeyInfo->nField + 1;
+  p->aMem = pMem = (Mem*)&((char*)p)[ROUND8(sizeof(UnpackedRecord))];
+  assert( EIGHT_BYTE_ALIGNMENT(pMem) );
+  idx = getVarint32(aKey, szHdr);
+  d = szHdr;
+  u = 0;
+  while( idx<szHdr && u<p->nField && d<=nKey ){
+    u32 serial_type;
+
+    idx += getVarint32(&aKey[idx], serial_type);
+    pMem->enc = pKeyInfo->enc;
+    pMem->db = pKeyInfo->db;
+    pMem->flags = 0;
+    pMem->zMalloc = 0;
+    d += sqlite3VdbeSerialGet(&aKey[d], serial_type, pMem);
+    pMem++;
+    u++;
+  }
+  assert( u<=pKeyInfo->nField + 1 );
+  p->nField = u;
+  return (void*)p;
+}
+
+/*
+** This routine destroys a UnpackedRecord object.
+*/
+SQLITE_PRIVATE void sqlite3VdbeDeleteUnpackedRecord(UnpackedRecord *p){
+  int i;
+  Mem *pMem;
+
+  assert( p!=0 );
+  assert( p->flags & UNPACKED_NEED_DESTROY );
+  for(i=0, pMem=p->aMem; i<p->nField; i++, pMem++){
+    /* The unpacked record is always constructed by the
+    ** sqlite3VdbeUnpackRecord() function above, which makes all
+    ** strings and blobs static.  And none of the elements are
+    ** ever transformed, so there is never anything to delete.
+    */
+    if( NEVER(pMem->zMalloc) ) sqlite3VdbeMemRelease(pMem);
+  }
+  if( p->flags & UNPACKED_NEED_FREE ){
+    sqlite3DbFree(p->pKeyInfo->db, p);
+  }
+}
+
+/*
+** This function compares the two table rows or index records
+** specified by {nKey1, pKey1} and pPKey2.  It returns a negative, zero
+** or positive integer if key1 is less than, equal to or 
+** greater than key2.  The {nKey1, pKey1} key must be a blob
+** created by th OP_MakeRecord opcode of the VDBE.  The pPKey2
+** key must be a parsed key such as obtained from
+** sqlite3VdbeParseRecord.
+**
+** Key1 and Key2 do not have to contain the same number of fields.
+** The key with fewer fields is usually compares less than the 
+** longer key.  However if the UNPACKED_INCRKEY flags in pPKey2 is set
+** and the common prefixes are equal, then key1 is less than key2.
+** Or if the UNPACKED_MATCH_PREFIX flag is set and the prefixes are
+** equal, then the keys are considered to be equal and
+** the parts beyond the common prefix are ignored.
+**
+** If the UNPACKED_IGNORE_ROWID flag is set, then the last byte of
+** the header of pKey1 is ignored.  It is assumed that pKey1 is
+** an index key, and thus ends with a rowid value.  The last byte
+** of the header will therefore be the serial type of the rowid:
+** one of 1, 2, 3, 4, 5, 6, 8, or 9 - the integer serial types.
+** The serial type of the final rowid will always be a single byte.
+** By ignoring this last byte of the header, we force the comparison
+** to ignore the rowid at the end of key1.
+*/
+SQLITE_PRIVATE int sqlite3VdbeRecordCompare(
+  int nKey1, const void *pKey1, /* Left key */
+  UnpackedRecord *pPKey2        /* Right key */
+){
+  int d1;            /* Offset into aKey[] of next data element */
+  u32 idx1;          /* Offset into aKey[] of next header element */
+  u32 szHdr1;        /* Number of bytes in header */
+  int i = 0;
+  int nField;
+  int rc = 0;
+  const unsigned char *aKey1 = (const unsigned char *)pKey1;
+  KeyInfo *pKeyInfo;
+  Mem mem1;
+
+  pKeyInfo = pPKey2->pKeyInfo;
+  mem1.enc = pKeyInfo->enc;
+  mem1.db = pKeyInfo->db;
+  /* mem1.flags = 0;  // Will be initialized by sqlite3VdbeSerialGet() */
+  VVA_ONLY( mem1.zMalloc = 0; ) /* Only needed by assert() statements */
+
+  /* Compilers may complain that mem1.u.i is potentially uninitialized.
+  ** We could initialize it, as shown here, to silence those complaints.
+  ** But in fact, mem1.u.i will never actually be used initialized, and doing 
+  ** the unnecessary initialization has a measurable negative performance
+  ** impact, since this routine is a very high runner.  And so, we choose
+  ** to ignore the compiler warnings and leave this variable uninitialized.
+  */
+  /*  mem1.u.i = 0;  // not needed, here to silence compiler warning */
+  
+  idx1 = getVarint32(aKey1, szHdr1);
+  d1 = szHdr1;
+  if( pPKey2->flags & UNPACKED_IGNORE_ROWID ){
+    szHdr1--;
+  }
+  nField = pKeyInfo->nField;
+  while( idx1<szHdr1 && i<pPKey2->nField ){
+    u32 serial_type1;
+
+    /* Read the serial types for the next element in each key. */
+    idx1 += getVarint32( aKey1+idx1, serial_type1 );
+    if( d1>=nKey1 && sqlite3VdbeSerialTypeLen(serial_type1)>0 ) break;
+
+    /* Extract the values to be compared.
+    */
+    d1 += sqlite3VdbeSerialGet(&aKey1[d1], serial_type1, &mem1);
+
+    /* Do the comparison
+    */
+    rc = sqlite3MemCompare(&mem1, &pPKey2->aMem[i],
+                           i<nField ? pKeyInfo->aColl[i] : 0);
+    if( rc!=0 ){
+      assert( mem1.zMalloc==0 );  /* See comment below */
+
+      /* Invert the result if we are using DESC sort order. */
+      if( pKeyInfo->aSortOrder && i<nField && pKeyInfo->aSortOrder[i] ){
+        rc = -rc;
+      }
+    
+      /* If the PREFIX_SEARCH flag is set and all fields except the final
+      ** rowid field were equal, then clear the PREFIX_SEARCH flag and set 
+      ** pPKey2->rowid to the value of the rowid field in (pKey1, nKey1).
+      ** This is used by the OP_IsUnique opcode.
+      */
+      if( (pPKey2->flags & UNPACKED_PREFIX_SEARCH) && i==(pPKey2->nField-1) ){
+        assert( idx1==szHdr1 && rc );
+        assert( mem1.flags & MEM_Int );
+        pPKey2->flags &= ~UNPACKED_PREFIX_SEARCH;
+        pPKey2->rowid = mem1.u.i;
+      }
+    
+      return rc;
+    }
+    i++;
+  }
+
+  /* No memory allocation is ever used on mem1.  Prove this using
+  ** the following assert().  If the assert() fails, it indicates a
+  ** memory leak and a need to call sqlite3VdbeMemRelease(&mem1).
+  */
+  assert( mem1.zMalloc==0 );
+
+  /* rc==0 here means that one of the keys ran out of fields and
+  ** all the fields up to that point were equal. If the UNPACKED_INCRKEY
+  ** flag is set, then break the tie by treating key2 as larger.
+  ** If the UPACKED_PREFIX_MATCH flag is set, then keys with common prefixes
+  ** are considered to be equal.  Otherwise, the longer key is the 
+  ** larger.  As it happens, the pPKey2 will always be the longer
+  ** if there is a difference.
+  */
+  assert( rc==0 );
+  if( pPKey2->flags & UNPACKED_INCRKEY ){
+    rc = -1;
+  }else if( pPKey2->flags & UNPACKED_PREFIX_MATCH ){
+    /* Leave rc==0 */
+  }else if( idx1<szHdr1 ){
+    rc = 1;
+  }
+  return rc;
+}
+ 
+
+/*
+** pCur points at an index entry created using the OP_MakeRecord opcode.
+** Read the rowid (the last field in the record) and store it in *rowid.
+** Return SQLITE_OK if everything works, or an error code otherwise.
+**
+** pCur might be pointing to text obtained from a corrupt database file.
+** So the content cannot be trusted.  Do appropriate checks on the content.
+*/
+SQLITE_PRIVATE int sqlite3VdbeIdxRowid(sqlite3 *db, BtCursor *pCur, i64 *rowid){
+  i64 nCellKey = 0;
+  int rc;
+  u32 szHdr;        /* Size of the header */
+  u32 typeRowid;    /* Serial type of the rowid */
+  u32 lenRowid;     /* Size of the rowid */
+  Mem m, v;
+
+  UNUSED_PARAMETER(db);
+
+  /* Get the size of the index entry.  Only indices entries of less
+  ** than 2GiB are support - anything large must be database corruption.
+  ** Any corruption is detected in sqlite3BtreeParseCellPtr(), though, so
+  ** this code can safely assume that nCellKey is 32-bits  
+  */
+  assert( sqlite3BtreeCursorIsValid(pCur) );
+  rc = sqlite3BtreeKeySize(pCur, &nCellKey);
+  assert( rc==SQLITE_OK );     /* pCur is always valid so KeySize cannot fail */
+  assert( (nCellKey & SQLITE_MAX_U32)==(u64)nCellKey );
+
+  /* Read in the complete content of the index entry */
+  memset(&m, 0, sizeof(m));
+  rc = sqlite3VdbeMemFromBtree(pCur, 0, (int)nCellKey, 1, &m);
+  if( rc ){
+    return rc;
+  }
+
+  /* The index entry must begin with a header size */
+  (void)getVarint32((u8*)m.z, szHdr);
+  testcase( szHdr==3 );
+  testcase( szHdr==m.n );
+  if( unlikely(szHdr<3 || (int)szHdr>m.n) ){
+    goto idx_rowid_corruption;
+  }
+
+  /* The last field of the index should be an integer - the ROWID.
+  ** Verify that the last entry really is an integer. */
+  (void)getVarint32((u8*)&m.z[szHdr-1], typeRowid);
+  testcase( typeRowid==1 );
+  testcase( typeRowid==2 );
+  testcase( typeRowid==3 );
+  testcase( typeRowid==4 );
+  testcase( typeRowid==5 );
+  testcase( typeRowid==6 );
+  testcase( typeRowid==8 );
+  testcase( typeRowid==9 );
+  if( unlikely(typeRowid<1 || typeRowid>9 || typeRowid==7) ){
+    goto idx_rowid_corruption;
+  }
+  lenRowid = sqlite3VdbeSerialTypeLen(typeRowid);
+  testcase( (u32)m.n==szHdr+lenRowid );
+  if( unlikely((u32)m.n<szHdr+lenRowid) ){
+    goto idx_rowid_corruption;
+  }
+
+  /* Fetch the integer off the end of the index record */
+  sqlite3VdbeSerialGet((u8*)&m.z[m.n-lenRowid], typeRowid, &v);
+  *rowid = v.u.i;
+  sqlite3VdbeMemRelease(&m);
+  return SQLITE_OK;
+
+  /* Jump here if database corruption is detected after m has been
+  ** allocated.  Free the m object and return SQLITE_CORRUPT. */
+idx_rowid_corruption:
+  testcase( m.zMalloc!=0 );
+  sqlite3VdbeMemRelease(&m);
+  return SQLITE_CORRUPT_BKPT;
+}
+
+/*
+** Compare the key of the index entry that cursor pC is pointing to against
+** the key string in pUnpacked.  Write into *pRes a number
+** that is negative, zero, or positive if pC is less than, equal to,
+** or greater than pUnpacked.  Return SQLITE_OK on success.
+**
+** pUnpacked is either created without a rowid or is truncated so that it
+** omits the rowid at the end.  The rowid at the end of the index entry
+** is ignored as well.  Hence, this routine only compares the prefixes 
+** of the keys prior to the final rowid, not the entire key.
+*/
+SQLITE_PRIVATE int sqlite3VdbeIdxKeyCompare(
+  VdbeCursor *pC,             /* The cursor to compare against */
+  UnpackedRecord *pUnpacked,  /* Unpacked version of key to compare against */
+  int *res                    /* Write the comparison result here */
+){
+  i64 nCellKey = 0;
+  int rc;
+  BtCursor *pCur = pC->pCursor;
+  Mem m;
+
+  assert( sqlite3BtreeCursorIsValid(pCur) );
+  rc = sqlite3BtreeKeySize(pCur, &nCellKey);
+  assert( rc==SQLITE_OK );    /* pCur is always valid so KeySize cannot fail */
+  /* nCellKey will always be between 0 and 0xffffffff because of the say
+  ** that btreeParseCellPtr() and sqlite3GetVarint32() are implemented */
+  if( nCellKey<=0 || nCellKey>0x7fffffff ){
+    *res = 0;
+    return SQLITE_CORRUPT_BKPT;
+  }
+  memset(&m, 0, sizeof(m));
+  rc = sqlite3VdbeMemFromBtree(pC->pCursor, 0, (int)nCellKey, 1, &m);
+  if( rc ){
+    return rc;
+  }
+  assert( pUnpacked->flags & UNPACKED_IGNORE_ROWID );
+  *res = sqlite3VdbeRecordCompare(m.n, m.z, pUnpacked);
+  sqlite3VdbeMemRelease(&m);
+  return SQLITE_OK;
+}
+
+/*
+** This routine sets the value to be returned by subsequent calls to
+** sqlite3_changes() on the database handle 'db'. 
+*/
+SQLITE_PRIVATE void sqlite3VdbeSetChanges(sqlite3 *db, int nChange){
+  assert( sqlite3_mutex_held(db->mutex) );
+  db->nChange = nChange;
+  db->nTotalChange += nChange;
+}
+
+/*
+** Set a flag in the vdbe to update the change counter when it is finalised
+** or reset.
+*/
+SQLITE_PRIVATE void sqlite3VdbeCountChanges(Vdbe *v){
+  v->changeCntOn = 1;
+}
+
+/*
+** Mark every prepared statement associated with a database connection
+** as expired.
+**
+** An expired statement means that recompilation of the statement is
+** recommend.  Statements expire when things happen that make their
+** programs obsolete.  Removing user-defined functions or collating
+** sequences, or changing an authorization function are the types of
+** things that make prepared statements obsolete.
+*/
+SQLITE_PRIVATE void sqlite3ExpirePreparedStatements(sqlite3 *db){
+  Vdbe *p;
+  for(p = db->pVdbe; p; p=p->pNext){
+    p->expired = 1;
+  }
+}
+
+/*
+** Return the database associated with the Vdbe.
+*/
+SQLITE_PRIVATE sqlite3 *sqlite3VdbeDb(Vdbe *v){
+  return v->db;
+}
+
+/*
+** Return a pointer to an sqlite3_value structure containing the value bound
+** parameter iVar of VM v. Except, if the value is an SQL NULL, return 
+** 0 instead. Unless it is NULL, apply affinity aff (one of the SQLITE_AFF_*
+** constants) to the value before returning it.
+**
+** The returned value must be freed by the caller using sqlite3ValueFree().
+*/
+SQLITE_PRIVATE sqlite3_value *sqlite3VdbeGetValue(Vdbe *v, int iVar, u8 aff){
+  assert( iVar>0 );
+  if( v ){
+    Mem *pMem = &v->aVar[iVar-1];
+    if( 0==(pMem->flags & MEM_Null) ){
+      sqlite3_value *pRet = sqlite3ValueNew(v->db);
+      if( pRet ){
+        sqlite3VdbeMemCopy((Mem *)pRet, pMem);
+        sqlite3ValueApplyAffinity(pRet, aff, SQLITE_UTF8);
+        sqlite3VdbeMemStoreType((Mem *)pRet);
+      }
+      return pRet;
+    }
+  }
+  return 0;
+}
+
+/*
+** Configure SQL variable iVar so that binding a new value to it signals
+** to sqlite3_reoptimize() that re-preparing the statement may result
+** in a better query plan.
+*/
+SQLITE_PRIVATE void sqlite3VdbeSetVarmask(Vdbe *v, int iVar){
+  assert( iVar>0 );
+  if( iVar>32 ){
+    v->expmask = 0xffffffff;
+  }else{
+    v->expmask |= ((u32)1 << (iVar-1));
+  }
+}
+
+/************** End of vdbeaux.c *********************************************/
+/************** Begin file vdbeapi.c *****************************************/
+/*
+** 2004 May 26
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains code use to implement APIs that are part of the
+** VDBE.
+*/
+
+#ifndef SQLITE_OMIT_DEPRECATED
+/*
+** Return TRUE (non-zero) of the statement supplied as an argument needs
+** to be recompiled.  A statement needs to be recompiled whenever the
+** execution environment changes in a way that would alter the program
+** that sqlite3_prepare() generates.  For example, if new functions or
+** collating sequences are registered or if an authorizer function is
+** added or changed.
+*/
+SQLITE_API int sqlite3_expired(sqlite3_stmt *pStmt){
+  Vdbe *p = (Vdbe*)pStmt;
+  return p==0 || p->expired;
+}
+#endif
+
+/*
+** Check on a Vdbe to make sure it has not been finalized.  Log
+** an error and return true if it has been finalized (or is otherwise
+** invalid).  Return false if it is ok.
+*/
+static int vdbeSafety(Vdbe *p){
+  if( p->db==0 ){
+    sqlite3_log(SQLITE_MISUSE, "API called with finalized prepared statement");
+    return 1;
+  }else{
+    return 0;
+  }
+}
+static int vdbeSafetyNotNull(Vdbe *p){
+  if( p==0 ){
+    sqlite3_log(SQLITE_MISUSE, "API called with NULL prepared statement");
+    return 1;
+  }else{
+    return vdbeSafety(p);
+  }
+}
+
+/*
+** The following routine destroys a virtual machine that is created by
+** the sqlite3_compile() routine. The integer returned is an SQLITE_
+** success/failure code that describes the result of executing the virtual
+** machine.
+**
+** This routine sets the error code and string returned by
+** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
+*/
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt){
+  int rc;
+  if( pStmt==0 ){
+    /* IMPLEMENTATION-OF: R-57228-12904 Invoking sqlite3_finalize() on a NULL
+    ** pointer is a harmless no-op. */
+    rc = SQLITE_OK;
+  }else{
+    Vdbe *v = (Vdbe*)pStmt;
+    sqlite3 *db = v->db;
+#if SQLITE_THREADSAFE
+    sqlite3_mutex *mutex;
+#endif
+    if( vdbeSafety(v) ) return SQLITE_MISUSE_BKPT;
+#if SQLITE_THREADSAFE
+    mutex = v->db->mutex;
+#endif
+    sqlite3_mutex_enter(mutex);
+    rc = sqlite3VdbeFinalize(v);
+    rc = sqlite3ApiExit(db, rc);
+    sqlite3_mutex_leave(mutex);
+  }
+  return rc;
+}
+
+/*
+** Terminate the current execution of an SQL statement and reset it
+** back to its starting state so that it can be reused. A success code from
+** the prior execution is returned.
+**
+** This routine sets the error code and string returned by
+** sqlite3_errcode(), sqlite3_errmsg() and sqlite3_errmsg16().
+*/
+SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt){
+  int rc;
+  if( pStmt==0 ){
+    rc = SQLITE_OK;
+  }else{
+    Vdbe *v = (Vdbe*)pStmt;
+    sqlite3_mutex_enter(v->db->mutex);
+    rc = sqlite3VdbeReset(v);
+    sqlite3VdbeMakeReady(v, -1, 0, 0, 0, 0, 0);
+    assert( (rc & (v->db->errMask))==rc );
+    rc = sqlite3ApiExit(v->db, rc);
+    sqlite3_mutex_leave(v->db->mutex);
+  }
+  return rc;
+}
+
+/*
+** Set all the parameters in the compiled SQL statement to NULL.
+*/
+SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt *pStmt){
+  int i;
+  int rc = SQLITE_OK;
+  Vdbe *p = (Vdbe*)pStmt;
+#if SQLITE_THREADSAFE
+  sqlite3_mutex *mutex = ((Vdbe*)pStmt)->db->mutex;
+#endif
+  sqlite3_mutex_enter(mutex);
+  for(i=0; i<p->nVar; i++){
+    sqlite3VdbeMemRelease(&p->aVar[i]);
+    p->aVar[i].flags = MEM_Null;
+  }
+  if( p->isPrepareV2 && p->expmask ){
+    p->expired = 1;
+  }
+  sqlite3_mutex_leave(mutex);
+  return rc;
+}
+
+
+/**************************** sqlite3_value_  *******************************
+** The following routines extract information from a Mem or sqlite3_value
+** structure.
+*/
+SQLITE_API const void *sqlite3_value_blob(sqlite3_value *pVal){
+  Mem *p = (Mem*)pVal;
+  if( p->flags & (MEM_Blob|MEM_Str) ){
+    sqlite3VdbeMemExpandBlob(p);
+    p->flags &= ~MEM_Str;
+    p->flags |= MEM_Blob;
+    return p->n ? p->z : 0;
+  }else{
+    return sqlite3_value_text(pVal);
+  }
+}
+SQLITE_API int sqlite3_value_bytes(sqlite3_value *pVal){
+  return sqlite3ValueBytes(pVal, SQLITE_UTF8);
+}
+SQLITE_API int sqlite3_value_bytes16(sqlite3_value *pVal){
+  return sqlite3ValueBytes(pVal, SQLITE_UTF16NATIVE);
+}
+SQLITE_API double sqlite3_value_double(sqlite3_value *pVal){
+  return sqlite3VdbeRealValue((Mem*)pVal);
+}
+SQLITE_API int sqlite3_value_int(sqlite3_value *pVal){
+  return (int)sqlite3VdbeIntValue((Mem*)pVal);
+}
+SQLITE_API sqlite_int64 sqlite3_value_int64(sqlite3_value *pVal){
+  return sqlite3VdbeIntValue((Mem*)pVal);
+}
+SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value *pVal){
+  return (const unsigned char *)sqlite3ValueText(pVal, SQLITE_UTF8);
+}
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_API const void *sqlite3_value_text16(sqlite3_value* pVal){
+  return sqlite3ValueText(pVal, SQLITE_UTF16NATIVE);
+}
+SQLITE_API const void *sqlite3_value_text16be(sqlite3_value *pVal){
+  return sqlite3ValueText(pVal, SQLITE_UTF16BE);
+}
+SQLITE_API const void *sqlite3_value_text16le(sqlite3_value *pVal){
+  return sqlite3ValueText(pVal, SQLITE_UTF16LE);
+}
+#endif /* SQLITE_OMIT_UTF16 */
+SQLITE_API int sqlite3_value_type(sqlite3_value* pVal){
+  return pVal->type;
+}
+
+/**************************** sqlite3_result_  *******************************
+** The following routines are used by user-defined functions to specify
+** the function result.
+**
+** The setStrOrError() funtion calls sqlite3VdbeMemSetStr() to store the
+** result as a string or blob but if the string or blob is too large, it
+** then sets the error code to SQLITE_TOOBIG
+*/
+static void setResultStrOrError(
+  sqlite3_context *pCtx,  /* Function context */
+  const char *z,          /* String pointer */
+  int n,                  /* Bytes in string, or negative */
+  u8 enc,                 /* Encoding of z.  0 for BLOBs */
+  void (*xDel)(void*)     /* Destructor function */
+){
+  if( sqlite3VdbeMemSetStr(&pCtx->s, z, n, enc, xDel)==SQLITE_TOOBIG ){
+    sqlite3_result_error_toobig(pCtx);
+  }
+}
+SQLITE_API void sqlite3_result_blob(
+  sqlite3_context *pCtx, 
+  const void *z, 
+  int n, 
+  void (*xDel)(void *)
+){
+  assert( n>=0 );
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  setResultStrOrError(pCtx, z, n, 0, xDel);
+}
+SQLITE_API void sqlite3_result_double(sqlite3_context *pCtx, double rVal){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  sqlite3VdbeMemSetDouble(&pCtx->s, rVal);
+}
+SQLITE_API void sqlite3_result_error(sqlite3_context *pCtx, const char *z, int n){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  pCtx->isError = SQLITE_ERROR;
+  sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF8, SQLITE_TRANSIENT);
+}
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_API void sqlite3_result_error16(sqlite3_context *pCtx, const void *z, int n){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  pCtx->isError = SQLITE_ERROR;
+  sqlite3VdbeMemSetStr(&pCtx->s, z, n, SQLITE_UTF16NATIVE, SQLITE_TRANSIENT);
+}
+#endif
+SQLITE_API void sqlite3_result_int(sqlite3_context *pCtx, int iVal){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  sqlite3VdbeMemSetInt64(&pCtx->s, (i64)iVal);
+}
+SQLITE_API void sqlite3_result_int64(sqlite3_context *pCtx, i64 iVal){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  sqlite3VdbeMemSetInt64(&pCtx->s, iVal);
+}
+SQLITE_API void sqlite3_result_null(sqlite3_context *pCtx){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  sqlite3VdbeMemSetNull(&pCtx->s);
+}
+SQLITE_API void sqlite3_result_text(
+  sqlite3_context *pCtx, 
+  const char *z, 
+  int n,
+  void (*xDel)(void *)
+){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  setResultStrOrError(pCtx, z, n, SQLITE_UTF8, xDel);
+}
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_API void sqlite3_result_text16(
+  sqlite3_context *pCtx, 
+  const void *z, 
+  int n, 
+  void (*xDel)(void *)
+){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  setResultStrOrError(pCtx, z, n, SQLITE_UTF16NATIVE, xDel);
+}
+SQLITE_API void sqlite3_result_text16be(
+  sqlite3_context *pCtx, 
+  const void *z, 
+  int n, 
+  void (*xDel)(void *)
+){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  setResultStrOrError(pCtx, z, n, SQLITE_UTF16BE, xDel);
+}
+SQLITE_API void sqlite3_result_text16le(
+  sqlite3_context *pCtx, 
+  const void *z, 
+  int n, 
+  void (*xDel)(void *)
+){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  setResultStrOrError(pCtx, z, n, SQLITE_UTF16LE, xDel);
+}
+#endif /* SQLITE_OMIT_UTF16 */
+SQLITE_API void sqlite3_result_value(sqlite3_context *pCtx, sqlite3_value *pValue){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  sqlite3VdbeMemCopy(&pCtx->s, pValue);
+}
+SQLITE_API void sqlite3_result_zeroblob(sqlite3_context *pCtx, int n){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  sqlite3VdbeMemSetZeroBlob(&pCtx->s, n);
+}
+SQLITE_API void sqlite3_result_error_code(sqlite3_context *pCtx, int errCode){
+  pCtx->isError = errCode;
+  if( pCtx->s.flags & MEM_Null ){
+    sqlite3VdbeMemSetStr(&pCtx->s, sqlite3ErrStr(errCode), -1, 
+                         SQLITE_UTF8, SQLITE_STATIC);
+  }
+}
+
+/* Force an SQLITE_TOOBIG error. */
+SQLITE_API void sqlite3_result_error_toobig(sqlite3_context *pCtx){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  pCtx->isError = SQLITE_TOOBIG;
+  sqlite3VdbeMemSetStr(&pCtx->s, "string or blob too big", -1, 
+                       SQLITE_UTF8, SQLITE_STATIC);
+}
+
+/* An SQLITE_NOMEM error. */
+SQLITE_API void sqlite3_result_error_nomem(sqlite3_context *pCtx){
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  sqlite3VdbeMemSetNull(&pCtx->s);
+  pCtx->isError = SQLITE_NOMEM;
+  pCtx->s.db->mallocFailed = 1;
+}
+
+/*
+** This function is called after a transaction has been committed. It 
+** invokes callbacks registered with sqlite3_wal_hook() as required.
+*/
+static int doWalCallbacks(sqlite3 *db){
+  int rc = SQLITE_OK;
+#ifndef SQLITE_OMIT_WAL
+  int i;
+  for(i=0; i<db->nDb; i++){
+    Btree *pBt = db->aDb[i].pBt;
+    if( pBt ){
+      int nEntry = sqlite3PagerWalCallback(sqlite3BtreePager(pBt));
+      if( db->xWalCallback && nEntry>0 && rc==SQLITE_OK ){
+        rc = db->xWalCallback(db->pWalArg, db, db->aDb[i].zName, nEntry);
+      }
+    }
+  }
+#endif
+  return rc;
+}
+
+/*
+** Execute the statement pStmt, either until a row of data is ready, the
+** statement is completely executed or an error occurs.
+**
+** This routine implements the bulk of the logic behind the sqlite_step()
+** API.  The only thing omitted is the automatic recompile if a 
+** schema change has occurred.  That detail is handled by the
+** outer sqlite3_step() wrapper procedure.
+*/
+static int sqlite3Step(Vdbe *p){
+  sqlite3 *db;
+  int rc;
+
+  assert(p);
+  if( p->magic!=VDBE_MAGIC_RUN ){
+    /* We used to require that sqlite3_reset() be called before retrying
+    ** sqlite3_step() after any error or after SQLITE_DONE.  But beginning
+    ** with version 3.7.0, we changed this so that sqlite3_reset() would
+    ** be called automatically instead of throwing the SQLITE_MISUSE error.
+    ** This "automatic-reset" change is not technically an incompatibility, 
+    ** since any application that receives an SQLITE_MISUSE is broken by
+    ** definition.
+    **
+    ** Nevertheless, some published applications that were originally written
+    ** for version 3.6.23 or earlier do in fact depend on SQLITE_MISUSE 
+    ** returns, and the so were broken by the automatic-reset change.  As a
+    ** a work-around, the SQLITE_OMIT_AUTORESET compile-time restores the
+    ** legacy behavior of returning SQLITE_MISUSE for cases where the 
+    ** previous sqlite3_step() returned something other than a SQLITE_LOCKED
+    ** or SQLITE_BUSY error.
+    */
+#ifdef SQLITE_OMIT_AUTORESET
+    if( p->rc==SQLITE_BUSY || p->rc==SQLITE_LOCKED ){
+      sqlite3_reset((sqlite3_stmt*)p);
+    }else{
+      return SQLITE_MISUSE_BKPT;
+    }
+#else
+    sqlite3_reset((sqlite3_stmt*)p);
+#endif
+  }
+
+  /* Check that malloc() has not failed. If it has, return early. */
+  db = p->db;
+  if( db->mallocFailed ){
+    p->rc = SQLITE_NOMEM;
+    return SQLITE_NOMEM;
+  }
+
+  if( p->pc<=0 && p->expired ){
+    p->rc = SQLITE_SCHEMA;
+    rc = SQLITE_ERROR;
+    goto end_of_step;
+  }
+  if( p->pc<0 ){
+    /* If there are no other statements currently running, then
+    ** reset the interrupt flag.  This prevents a call to sqlite3_interrupt
+    ** from interrupting a statement that has not yet started.
+    */
+    if( db->activeVdbeCnt==0 ){
+      db->u1.isInterrupted = 0;
+    }
+
+    assert( db->writeVdbeCnt>0 || db->autoCommit==0 || db->nDeferredCons==0 );
+
+#ifndef SQLITE_OMIT_TRACE
+    if( db->xProfile && !db->init.busy ){
+      sqlite3OsCurrentTimeInt64(db->pVfs, &p->startTime);
+    }
+#endif
+
+    db->activeVdbeCnt++;
+    if( p->readOnly==0 ) db->writeVdbeCnt++;
+    p->pc = 0;
+  }
+#ifndef SQLITE_OMIT_EXPLAIN
+  if( p->explain ){
+    rc = sqlite3VdbeList(p);
+  }else
+#endif /* SQLITE_OMIT_EXPLAIN */
+  {
+    db->vdbeExecCnt++;
+    rc = sqlite3VdbeExec(p);
+    db->vdbeExecCnt--;
+  }
+
+#ifndef SQLITE_OMIT_TRACE
+  /* Invoke the profile callback if there is one
+  */
+  if( rc!=SQLITE_ROW && db->xProfile && !db->init.busy && p->zSql ){
+    sqlite3_int64 iNow;
+    sqlite3OsCurrentTimeInt64(db->pVfs, &iNow);
+    db->xProfile(db->pProfileArg, p->zSql, (iNow - p->startTime)*1000000);
+  }
+#endif
+
+  if( rc==SQLITE_DONE ){
+    assert( p->rc==SQLITE_OK );
+    p->rc = doWalCallbacks(db);
+    if( p->rc!=SQLITE_OK ){
+      rc = SQLITE_ERROR;
+    }
+  }
+
+  db->errCode = rc;
+  if( SQLITE_NOMEM==sqlite3ApiExit(p->db, p->rc) ){
+    p->rc = SQLITE_NOMEM;
+  }
+end_of_step:
+  /* At this point local variable rc holds the value that should be 
+  ** returned if this statement was compiled using the legacy 
+  ** sqlite3_prepare() interface. According to the docs, this can only
+  ** be one of the values in the first assert() below. Variable p->rc 
+  ** contains the value that would be returned if sqlite3_finalize() 
+  ** were called on statement p.
+  */
+  assert( rc==SQLITE_ROW  || rc==SQLITE_DONE   || rc==SQLITE_ERROR 
+       || rc==SQLITE_BUSY || rc==SQLITE_MISUSE
+  );
+  assert( p->rc!=SQLITE_ROW && p->rc!=SQLITE_DONE );
+  if( p->isPrepareV2 && rc!=SQLITE_ROW && rc!=SQLITE_DONE ){
+    /* If this statement was prepared using sqlite3_prepare_v2(), and an
+    ** error has occured, then return the error code in p->rc to the
+    ** caller. Set the error code in the database handle to the same value.
+    */ 
+    rc = db->errCode = p->rc;
+  }
+  return (rc&db->errMask);
+}
+
+/*
+** This is the top-level implementation of sqlite3_step().  Call
+** sqlite3Step() to do most of the work.  If a schema error occurs,
+** call sqlite3Reprepare() and try again.
+*/
+SQLITE_API int sqlite3_step(sqlite3_stmt *pStmt){
+  int rc = SQLITE_OK;      /* Result from sqlite3Step() */
+  int rc2 = SQLITE_OK;     /* Result from sqlite3Reprepare() */
+  Vdbe *v = (Vdbe*)pStmt;  /* the prepared statement */
+  int cnt = 0;             /* Counter to prevent infinite loop of reprepares */
+  sqlite3 *db;             /* The database connection */
+
+  if( vdbeSafetyNotNull(v) ){
+    return SQLITE_MISUSE_BKPT;
+  }
+  db = v->db;
+  sqlite3_mutex_enter(db->mutex);
+  while( (rc = sqlite3Step(v))==SQLITE_SCHEMA
+         && cnt++ < 5
+         && (rc2 = rc = sqlite3Reprepare(v))==SQLITE_OK ){
+    sqlite3_reset(pStmt);
+    v->expired = 0;
+  }
+  if( rc2!=SQLITE_OK && ALWAYS(v->isPrepareV2) && ALWAYS(db->pErr) ){
+    /* This case occurs after failing to recompile an sql statement. 
+    ** The error message from the SQL compiler has already been loaded 
+    ** into the database handle. This block copies the error message 
+    ** from the database handle into the statement and sets the statement
+    ** program counter to 0 to ensure that when the statement is 
+    ** finalized or reset the parser error message is available via
+    ** sqlite3_errmsg() and sqlite3_errcode().
+    */
+    const char *zErr = (const char *)sqlite3_value_text(db->pErr); 
+    sqlite3DbFree(db, v->zErrMsg);
+    if( !db->mallocFailed ){
+      v->zErrMsg = sqlite3DbStrDup(db, zErr);
+      v->rc = rc2;
+    } else {
+      v->zErrMsg = 0;
+      v->rc = rc = SQLITE_NOMEM;
+    }
+  }
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+/*
+** Extract the user data from a sqlite3_context structure and return a
+** pointer to it.
+*/
+SQLITE_API void *sqlite3_user_data(sqlite3_context *p){
+  assert( p && p->pFunc );
+  return p->pFunc->pUserData;
+}
+
+/*
+** Extract the user data from a sqlite3_context structure and return a
+** pointer to it.
+**
+** IMPLEMENTATION-OF: R-46798-50301 The sqlite3_context_db_handle() interface
+** returns a copy of the pointer to the database connection (the 1st
+** parameter) of the sqlite3_create_function() and
+** sqlite3_create_function16() routines that originally registered the
+** application defined function.
+*/
+SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context *p){
+  assert( p && p->pFunc );
+  return p->s.db;
+}
+
+/*
+** The following is the implementation of an SQL function that always
+** fails with an error message stating that the function is used in the
+** wrong context.  The sqlite3_overload_function() API might construct
+** SQL function that use this routine so that the functions will exist
+** for name resolution but are actually overloaded by the xFindFunction
+** method of virtual tables.
+*/
+SQLITE_PRIVATE void sqlite3InvalidFunction(
+  sqlite3_context *context,  /* The function calling context */
+  int NotUsed,               /* Number of arguments to the function */
+  sqlite3_value **NotUsed2   /* Value of each argument */
+){
+  const char *zName = context->pFunc->zName;
+  char *zErr;
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  zErr = sqlite3_mprintf(
+      "unable to use function %s in the requested context", zName);
+  sqlite3_result_error(context, zErr, -1);
+  sqlite3_free(zErr);
+}
+
+/*
+** Allocate or return the aggregate context for a user function.  A new
+** context is allocated on the first call.  Subsequent calls return the
+** same context that was returned on prior calls.
+*/
+SQLITE_API void *sqlite3_aggregate_context(sqlite3_context *p, int nByte){
+  Mem *pMem;
+  assert( p && p->pFunc && p->pFunc->xStep );
+  assert( sqlite3_mutex_held(p->s.db->mutex) );
+  pMem = p->pMem;
+  testcase( nByte<0 );
+  if( (pMem->flags & MEM_Agg)==0 ){
+    if( nByte<=0 ){
+      sqlite3VdbeMemReleaseExternal(pMem);
+      pMem->flags = MEM_Null;
+      pMem->z = 0;
+    }else{
+      sqlite3VdbeMemGrow(pMem, nByte, 0);
+      pMem->flags = MEM_Agg;
+      pMem->u.pDef = p->pFunc;
+      if( pMem->z ){
+        memset(pMem->z, 0, nByte);
+      }
+    }
+  }
+  return (void*)pMem->z;
+}
+
+/*
+** Return the auxilary data pointer, if any, for the iArg'th argument to
+** the user-function defined by pCtx.
+*/
+SQLITE_API void *sqlite3_get_auxdata(sqlite3_context *pCtx, int iArg){
+  VdbeFunc *pVdbeFunc;
+
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  pVdbeFunc = pCtx->pVdbeFunc;
+  if( !pVdbeFunc || iArg>=pVdbeFunc->nAux || iArg<0 ){
+    return 0;
+  }
+  return pVdbeFunc->apAux[iArg].pAux;
+}
+
+/*
+** Set the auxilary data pointer and delete function, for the iArg'th
+** argument to the user-function defined by pCtx. Any previous value is
+** deleted by calling the delete function specified when it was set.
+*/
+SQLITE_API void sqlite3_set_auxdata(
+  sqlite3_context *pCtx, 
+  int iArg, 
+  void *pAux, 
+  void (*xDelete)(void*)
+){
+  struct AuxData *pAuxData;
+  VdbeFunc *pVdbeFunc;
+  if( iArg<0 ) goto failed;
+
+  assert( sqlite3_mutex_held(pCtx->s.db->mutex) );
+  pVdbeFunc = pCtx->pVdbeFunc;
+  if( !pVdbeFunc || pVdbeFunc->nAux<=iArg ){
+    int nAux = (pVdbeFunc ? pVdbeFunc->nAux : 0);
+    int nMalloc = sizeof(VdbeFunc) + sizeof(struct AuxData)*iArg;
+    pVdbeFunc = sqlite3DbRealloc(pCtx->s.db, pVdbeFunc, nMalloc);
+    if( !pVdbeFunc ){
+      goto failed;
+    }
+    pCtx->pVdbeFunc = pVdbeFunc;
+    memset(&pVdbeFunc->apAux[nAux], 0, sizeof(struct AuxData)*(iArg+1-nAux));
+    pVdbeFunc->nAux = iArg+1;
+    pVdbeFunc->pFunc = pCtx->pFunc;
+  }
+
+  pAuxData = &pVdbeFunc->apAux[iArg];
+  if( pAuxData->pAux && pAuxData->xDelete ){
+    pAuxData->xDelete(pAuxData->pAux);
+  }
+  pAuxData->pAux = pAux;
+  pAuxData->xDelete = xDelete;
+  return;
+
+failed:
+  if( xDelete ){
+    xDelete(pAux);
+  }
+}
+
+#ifndef SQLITE_OMIT_DEPRECATED
+/*
+** Return the number of times the Step function of a aggregate has been 
+** called.
+**
+** This function is deprecated.  Do not use it for new code.  It is
+** provide only to avoid breaking legacy code.  New aggregate function
+** implementations should keep their own counts within their aggregate
+** context.
+*/
+SQLITE_API int sqlite3_aggregate_count(sqlite3_context *p){
+  assert( p && p->pMem && p->pFunc && p->pFunc->xStep );
+  return p->pMem->n;
+}
+#endif
+
+/*
+** Return the number of columns in the result set for the statement pStmt.
+*/
+SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt){
+  Vdbe *pVm = (Vdbe *)pStmt;
+  return pVm ? pVm->nResColumn : 0;
+}
+
+/*
+** Return the number of values available from the current row of the
+** currently executing statement pStmt.
+*/
+SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt){
+  Vdbe *pVm = (Vdbe *)pStmt;
+  if( pVm==0 || pVm->pResultSet==0 ) return 0;
+  return pVm->nResColumn;
+}
+
+
+/*
+** Check to see if column iCol of the given statement is valid.  If
+** it is, return a pointer to the Mem for the value of that column.
+** If iCol is not valid, return a pointer to a Mem which has a value
+** of NULL.
+*/
+static Mem *columnMem(sqlite3_stmt *pStmt, int i){
+  Vdbe *pVm;
+  Mem *pOut;
+
+  pVm = (Vdbe *)pStmt;
+  if( pVm && pVm->pResultSet!=0 && i<pVm->nResColumn && i>=0 ){
+    sqlite3_mutex_enter(pVm->db->mutex);
+    pOut = &pVm->pResultSet[i];
+  }else{
+    /* If the value passed as the second argument is out of range, return
+    ** a pointer to the following static Mem object which contains the
+    ** value SQL NULL. Even though the Mem structure contains an element
+    ** of type i64, on certain architecture (x86) with certain compiler
+    ** switches (-Os), gcc may align this Mem object on a 4-byte boundary
+    ** instead of an 8-byte one. This all works fine, except that when
+    ** running with SQLITE_DEBUG defined the SQLite code sometimes assert()s
+    ** that a Mem structure is located on an 8-byte boundary. To prevent
+    ** this assert() from failing, when building with SQLITE_DEBUG defined
+    ** using gcc, force nullMem to be 8-byte aligned using the magical
+    ** __attribute__((aligned(8))) macro.  */
+    static const Mem nullMem 
+#if defined(SQLITE_DEBUG) && defined(__GNUC__)
+      __attribute__((aligned(8))) 
+#endif
+      = {0, "", (double)0, {0}, 0, MEM_Null, SQLITE_NULL, 0,
+#ifdef SQLITE_DEBUG
+         0, 0,  /* pScopyFrom, pFiller */
+#endif
+         0, 0 };
+
+    if( pVm && ALWAYS(pVm->db) ){
+      sqlite3_mutex_enter(pVm->db->mutex);
+      sqlite3Error(pVm->db, SQLITE_RANGE, 0);
+    }
+    pOut = (Mem*)&nullMem;
+  }
+  return pOut;
+}
+
+/*
+** This function is called after invoking an sqlite3_value_XXX function on a 
+** column value (i.e. a value returned by evaluating an SQL expression in the
+** select list of a SELECT statement) that may cause a malloc() failure. If 
+** malloc() has failed, the threads mallocFailed flag is cleared and the result
+** code of statement pStmt set to SQLITE_NOMEM.
+**
+** Specifically, this is called from within:
+**
+**     sqlite3_column_int()
+**     sqlite3_column_int64()
+**     sqlite3_column_text()
+**     sqlite3_column_text16()
+**     sqlite3_column_real()
+**     sqlite3_column_bytes()
+**     sqlite3_column_bytes16()
+**     sqiite3_column_blob()
+*/
+static void columnMallocFailure(sqlite3_stmt *pStmt)
+{
+  /* If malloc() failed during an encoding conversion within an
+  ** sqlite3_column_XXX API, then set the return code of the statement to
+  ** SQLITE_NOMEM. The next call to _step() (if any) will return SQLITE_ERROR
+  ** and _finalize() will return NOMEM.
+  */
+  Vdbe *p = (Vdbe *)pStmt;
+  if( p ){
+    p->rc = sqlite3ApiExit(p->db, p->rc);
+    sqlite3_mutex_leave(p->db->mutex);
+  }
+}
+
+/**************************** sqlite3_column_  *******************************
+** The following routines are used to access elements of the current row
+** in the result set.
+*/
+SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt *pStmt, int i){
+  const void *val;
+  val = sqlite3_value_blob( columnMem(pStmt,i) );
+  /* Even though there is no encoding conversion, value_blob() might
+  ** need to call malloc() to expand the result of a zeroblob() 
+  ** expression. 
+  */
+  columnMallocFailure(pStmt);
+  return val;
+}
+SQLITE_API int sqlite3_column_bytes(sqlite3_stmt *pStmt, int i){
+  int val = sqlite3_value_bytes( columnMem(pStmt,i) );
+  columnMallocFailure(pStmt);
+  return val;
+}
+SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt *pStmt, int i){
+  int val = sqlite3_value_bytes16( columnMem(pStmt,i) );
+  columnMallocFailure(pStmt);
+  return val;
+}
+SQLITE_API double sqlite3_column_double(sqlite3_stmt *pStmt, int i){
+  double val = sqlite3_value_double( columnMem(pStmt,i) );
+  columnMallocFailure(pStmt);
+  return val;
+}
+SQLITE_API int sqlite3_column_int(sqlite3_stmt *pStmt, int i){
+  int val = sqlite3_value_int( columnMem(pStmt,i) );
+  columnMallocFailure(pStmt);
+  return val;
+}
+SQLITE_API sqlite_int64 sqlite3_column_int64(sqlite3_stmt *pStmt, int i){
+  sqlite_int64 val = sqlite3_value_int64( columnMem(pStmt,i) );
+  columnMallocFailure(pStmt);
+  return val;
+}
+SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt *pStmt, int i){
+  const unsigned char *val = sqlite3_value_text( columnMem(pStmt,i) );
+  columnMallocFailure(pStmt);
+  return val;
+}
+SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt *pStmt, int i){
+  Mem *pOut = columnMem(pStmt, i);
+  if( pOut->flags&MEM_Static ){
+    pOut->flags &= ~MEM_Static;
+    pOut->flags |= MEM_Ephem;
+  }
+  columnMallocFailure(pStmt);
+  return (sqlite3_value *)pOut;
+}
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt *pStmt, int i){
+  const void *val = sqlite3_value_text16( columnMem(pStmt,i) );
+  columnMallocFailure(pStmt);
+  return val;
+}
+#endif /* SQLITE_OMIT_UTF16 */
+SQLITE_API int sqlite3_column_type(sqlite3_stmt *pStmt, int i){
+  int iType = sqlite3_value_type( columnMem(pStmt,i) );
+  columnMallocFailure(pStmt);
+  return iType;
+}
+
+/* The following function is experimental and subject to change or
+** removal */
+/*int sqlite3_column_numeric_type(sqlite3_stmt *pStmt, int i){
+**  return sqlite3_value_numeric_type( columnMem(pStmt,i) );
+**}
+*/
+
+/*
+** Convert the N-th element of pStmt->pColName[] into a string using
+** xFunc() then return that string.  If N is out of range, return 0.
+**
+** There are up to 5 names for each column.  useType determines which
+** name is returned.  Here are the names:
+**
+**    0      The column name as it should be displayed for output
+**    1      The datatype name for the column
+**    2      The name of the database that the column derives from
+**    3      The name of the table that the column derives from
+**    4      The name of the table column that the result column derives from
+**
+** If the result is not a simple column reference (if it is an expression
+** or a constant) then useTypes 2, 3, and 4 return NULL.
+*/
+static const void *columnName(
+  sqlite3_stmt *pStmt,
+  int N,
+  const void *(*xFunc)(Mem*),
+  int useType
+){
+  const void *ret = 0;
+  Vdbe *p = (Vdbe *)pStmt;
+  int n;
+  sqlite3 *db = p->db;
+  
+  assert( db!=0 );
+  n = sqlite3_column_count(pStmt);
+  if( N<n && N>=0 ){
+    N += useType*n;
+    sqlite3_mutex_enter(db->mutex);
+    assert( db->mallocFailed==0 );
+    ret = xFunc(&p->aColName[N]);
+     /* A malloc may have failed inside of the xFunc() call. If this
+    ** is the case, clear the mallocFailed flag and return NULL.
+    */
+    if( db->mallocFailed ){
+      db->mallocFailed = 0;
+      ret = 0;
+    }
+    sqlite3_mutex_leave(db->mutex);
+  }
+  return ret;
+}
+
+/*
+** Return the name of the Nth column of the result set returned by SQL
+** statement pStmt.
+*/
+SQLITE_API const char *sqlite3_column_name(sqlite3_stmt *pStmt, int N){
+  return columnName(
+      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_NAME);
+}
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt *pStmt, int N){
+  return columnName(
+      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_NAME);
+}
+#endif
+
+/*
+** Constraint:  If you have ENABLE_COLUMN_METADATA then you must
+** not define OMIT_DECLTYPE.
+*/
+#if defined(SQLITE_OMIT_DECLTYPE) && defined(SQLITE_ENABLE_COLUMN_METADATA)
+# error "Must not define both SQLITE_OMIT_DECLTYPE \
+         and SQLITE_ENABLE_COLUMN_METADATA"
+#endif
+
+#ifndef SQLITE_OMIT_DECLTYPE
+/*
+** Return the column declaration type (if applicable) of the 'i'th column
+** of the result set of SQL statement pStmt.
+*/
+SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt *pStmt, int N){
+  return columnName(
+      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DECLTYPE);
+}
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt *pStmt, int N){
+  return columnName(
+      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DECLTYPE);
+}
+#endif /* SQLITE_OMIT_UTF16 */
+#endif /* SQLITE_OMIT_DECLTYPE */
+
+#ifdef SQLITE_ENABLE_COLUMN_METADATA
+/*
+** Return the name of the database from which a result column derives.
+** NULL is returned if the result column is an expression or constant or
+** anything else which is not an unabiguous reference to a database column.
+*/
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt *pStmt, int N){
+  return columnName(
+      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_DATABASE);
+}
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt *pStmt, int N){
+  return columnName(
+      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_DATABASE);
+}
+#endif /* SQLITE_OMIT_UTF16 */
+
+/*
+** Return the name of the table from which a result column derives.
+** NULL is returned if the result column is an expression or constant or
+** anything else which is not an unabiguous reference to a database column.
+*/
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt *pStmt, int N){
+  return columnName(
+      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_TABLE);
+}
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt *pStmt, int N){
+  return columnName(
+      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_TABLE);
+}
+#endif /* SQLITE_OMIT_UTF16 */
+
+/*
+** Return the name of the table column from which a result column derives.
+** NULL is returned if the result column is an expression or constant or
+** anything else which is not an unabiguous reference to a database column.
+*/
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt *pStmt, int N){
+  return columnName(
+      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text, COLNAME_COLUMN);
+}
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt *pStmt, int N){
+  return columnName(
+      pStmt, N, (const void*(*)(Mem*))sqlite3_value_text16, COLNAME_COLUMN);
+}
+#endif /* SQLITE_OMIT_UTF16 */
+#endif /* SQLITE_ENABLE_COLUMN_METADATA */
+
+
+/******************************* sqlite3_bind_  ***************************
+** 
+** Routines used to attach values to wildcards in a compiled SQL statement.
+*/
+/*
+** Unbind the value bound to variable i in virtual machine p. This is the 
+** the same as binding a NULL value to the column. If the "i" parameter is
+** out of range, then SQLITE_RANGE is returned. Othewise SQLITE_OK.
+**
+** A successful evaluation of this routine acquires the mutex on p.
+** the mutex is released if any kind of error occurs.
+**
+** The error code stored in database p->db is overwritten with the return
+** value in any case.
+*/
+static int vdbeUnbind(Vdbe *p, int i){
+  Mem *pVar;
+  if( vdbeSafetyNotNull(p) ){
+    return SQLITE_MISUSE_BKPT;
+  }
+  sqlite3_mutex_enter(p->db->mutex);
+  if( p->magic!=VDBE_MAGIC_RUN || p->pc>=0 ){
+    sqlite3Error(p->db, SQLITE_MISUSE, 0);
+    sqlite3_mutex_leave(p->db->mutex);
+    sqlite3_log(SQLITE_MISUSE, 
+        "bind on a busy prepared statement: [%s]", p->zSql);
+    return SQLITE_MISUSE_BKPT;
+  }
+  if( i<1 || i>p->nVar ){
+    sqlite3Error(p->db, SQLITE_RANGE, 0);
+    sqlite3_mutex_leave(p->db->mutex);
+    return SQLITE_RANGE;
+  }
+  i--;
+  pVar = &p->aVar[i];
+  sqlite3VdbeMemRelease(pVar);
+  pVar->flags = MEM_Null;
+  sqlite3Error(p->db, SQLITE_OK, 0);
+
+  /* If the bit corresponding to this variable in Vdbe.expmask is set, then 
+  ** binding a new value to this variable invalidates the current query plan.
+  **
+  ** IMPLEMENTATION-OF: R-48440-37595 If the specific value bound to host
+  ** parameter in the WHERE clause might influence the choice of query plan
+  ** for a statement, then the statement will be automatically recompiled,
+  ** as if there had been a schema change, on the first sqlite3_step() call
+  ** following any change to the bindings of that parameter.
+  */
+  if( p->isPrepareV2 &&
+     ((i<32 && p->expmask & ((u32)1 << i)) || p->expmask==0xffffffff)
+  ){
+    p->expired = 1;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Bind a text or BLOB value.
+*/
+static int bindText(
+  sqlite3_stmt *pStmt,   /* The statement to bind against */
+  int i,                 /* Index of the parameter to bind */
+  const void *zData,     /* Pointer to the data to be bound */
+  int nData,             /* Number of bytes of data to be bound */
+  void (*xDel)(void*),   /* Destructor for the data */
+  u8 encoding            /* Encoding for the data */
+){
+  Vdbe *p = (Vdbe *)pStmt;
+  Mem *pVar;
+  int rc;
+
+  rc = vdbeUnbind(p, i);
+  if( rc==SQLITE_OK ){
+    if( zData!=0 ){
+      pVar = &p->aVar[i-1];
+      rc = sqlite3VdbeMemSetStr(pVar, zData, nData, encoding, xDel);
+      if( rc==SQLITE_OK && encoding!=0 ){
+        rc = sqlite3VdbeChangeEncoding(pVar, ENC(p->db));
+      }
+      sqlite3Error(p->db, rc, 0);
+      rc = sqlite3ApiExit(p->db, rc);
+    }
+    sqlite3_mutex_leave(p->db->mutex);
+  }else if( xDel!=SQLITE_STATIC && xDel!=SQLITE_TRANSIENT ){
+    xDel((void*)zData);
+  }
+  return rc;
+}
+
+
+/*
+** Bind a blob value to an SQL statement variable.
+*/
+SQLITE_API int sqlite3_bind_blob(
+  sqlite3_stmt *pStmt, 
+  int i, 
+  const void *zData, 
+  int nData, 
+  void (*xDel)(void*)
+){
+  return bindText(pStmt, i, zData, nData, xDel, 0);
+}
+SQLITE_API int sqlite3_bind_double(sqlite3_stmt *pStmt, int i, double rValue){
+  int rc;
+  Vdbe *p = (Vdbe *)pStmt;
+  rc = vdbeUnbind(p, i);
+  if( rc==SQLITE_OK ){
+    sqlite3VdbeMemSetDouble(&p->aVar[i-1], rValue);
+    sqlite3_mutex_leave(p->db->mutex);
+  }
+  return rc;
+}
+SQLITE_API int sqlite3_bind_int(sqlite3_stmt *p, int i, int iValue){
+  return sqlite3_bind_int64(p, i, (i64)iValue);
+}
+SQLITE_API int sqlite3_bind_int64(sqlite3_stmt *pStmt, int i, sqlite_int64 iValue){
+  int rc;
+  Vdbe *p = (Vdbe *)pStmt;
+  rc = vdbeUnbind(p, i);
+  if( rc==SQLITE_OK ){
+    sqlite3VdbeMemSetInt64(&p->aVar[i-1], iValue);
+    sqlite3_mutex_leave(p->db->mutex);
+  }
+  return rc;
+}
+SQLITE_API int sqlite3_bind_null(sqlite3_stmt *pStmt, int i){
+  int rc;
+  Vdbe *p = (Vdbe*)pStmt;
+  rc = vdbeUnbind(p, i);
+  if( rc==SQLITE_OK ){
+    sqlite3_mutex_leave(p->db->mutex);
+  }
+  return rc;
+}
+SQLITE_API int sqlite3_bind_text( 
+  sqlite3_stmt *pStmt, 
+  int i, 
+  const char *zData, 
+  int nData, 
+  void (*xDel)(void*)
+){
+  return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF8);
+}
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_API int sqlite3_bind_text16(
+  sqlite3_stmt *pStmt, 
+  int i, 
+  const void *zData, 
+  int nData, 
+  void (*xDel)(void*)
+){
+  return bindText(pStmt, i, zData, nData, xDel, SQLITE_UTF16NATIVE);
+}
+#endif /* SQLITE_OMIT_UTF16 */
+SQLITE_API int sqlite3_bind_value(sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue){
+  int rc;
+  switch( pValue->type ){
+    case SQLITE_INTEGER: {
+      rc = sqlite3_bind_int64(pStmt, i, pValue->u.i);
+      break;
+    }
+    case SQLITE_FLOAT: {
+      rc = sqlite3_bind_double(pStmt, i, pValue->r);
+      break;
+    }
+    case SQLITE_BLOB: {
+      if( pValue->flags & MEM_Zero ){
+        rc = sqlite3_bind_zeroblob(pStmt, i, pValue->u.nZero);
+      }else{
+        rc = sqlite3_bind_blob(pStmt, i, pValue->z, pValue->n,SQLITE_TRANSIENT);
+      }
+      break;
+    }
+    case SQLITE_TEXT: {
+      rc = bindText(pStmt,i,  pValue->z, pValue->n, SQLITE_TRANSIENT,
+                              pValue->enc);
+      break;
+    }
+    default: {
+      rc = sqlite3_bind_null(pStmt, i);
+      break;
+    }
+  }
+  return rc;
+}
+SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt *pStmt, int i, int n){
+  int rc;
+  Vdbe *p = (Vdbe *)pStmt;
+  rc = vdbeUnbind(p, i);
+  if( rc==SQLITE_OK ){
+    sqlite3VdbeMemSetZeroBlob(&p->aVar[i-1], n);
+    sqlite3_mutex_leave(p->db->mutex);
+  }
+  return rc;
+}
+
+/*
+** Return the number of wildcards that can be potentially bound to.
+** This routine is added to support DBD::SQLite.  
+*/
+SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt *pStmt){
+  Vdbe *p = (Vdbe*)pStmt;
+  return p ? p->nVar : 0;
+}
+
+/*
+** Create a mapping from variable numbers to variable names
+** in the Vdbe.azVar[] array, if such a mapping does not already
+** exist.
+*/
+static void createVarMap(Vdbe *p){
+  if( !p->okVar ){
+    int j;
+    Op *pOp;
+    sqlite3_mutex_enter(p->db->mutex);
+    /* The race condition here is harmless.  If two threads call this
+    ** routine on the same Vdbe at the same time, they both might end
+    ** up initializing the Vdbe.azVar[] array.  That is a little extra
+    ** work but it results in the same answer.
+    */
+    for(j=0, pOp=p->aOp; j<p->nOp; j++, pOp++){
+      if( pOp->opcode==OP_Variable ){
+        assert( pOp->p1>0 && pOp->p1<=p->nVar );
+        p->azVar[pOp->p1-1] = pOp->p4.z;
+      }
+    }
+    p->okVar = 1;
+    sqlite3_mutex_leave(p->db->mutex);
+  }
+}
+
+/*
+** Return the name of a wildcard parameter.  Return NULL if the index
+** is out of range or if the wildcard is unnamed.
+**
+** The result is always UTF-8.
+*/
+SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt *pStmt, int i){
+  Vdbe *p = (Vdbe*)pStmt;
+  if( p==0 || i<1 || i>p->nVar ){
+    return 0;
+  }
+  createVarMap(p);
+  return p->azVar[i-1];
+}
+
+/*
+** Given a wildcard parameter name, return the index of the variable
+** with that name.  If there is no variable with the given name,
+** return 0.
+*/
+SQLITE_PRIVATE int sqlite3VdbeParameterIndex(Vdbe *p, const char *zName, int nName){
+  int i;
+  if( p==0 ){
+    return 0;
+  }
+  createVarMap(p); 
+  if( zName ){
+    for(i=0; i<p->nVar; i++){
+      const char *z = p->azVar[i];
+      if( z && memcmp(z,zName,nName)==0 && z[nName]==0 ){
+        return i+1;
+      }
+    }
+  }
+  return 0;
+}
+SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt *pStmt, const char *zName){
+  return sqlite3VdbeParameterIndex((Vdbe*)pStmt, zName, sqlite3Strlen30(zName));
+}
+
+/*
+** Transfer all bindings from the first statement over to the second.
+*/
+SQLITE_PRIVATE int sqlite3TransferBindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
+  Vdbe *pFrom = (Vdbe*)pFromStmt;
+  Vdbe *pTo = (Vdbe*)pToStmt;
+  int i;
+  assert( pTo->db==pFrom->db );
+  assert( pTo->nVar==pFrom->nVar );
+  sqlite3_mutex_enter(pTo->db->mutex);
+  for(i=0; i<pFrom->nVar; i++){
+    sqlite3VdbeMemMove(&pTo->aVar[i], &pFrom->aVar[i]);
+  }
+  sqlite3_mutex_leave(pTo->db->mutex);
+  return SQLITE_OK;
+}
+
+#ifndef SQLITE_OMIT_DEPRECATED
+/*
+** Deprecated external interface.  Internal/core SQLite code
+** should call sqlite3TransferBindings.
+**
+** Is is misuse to call this routine with statements from different
+** database connections.  But as this is a deprecated interface, we
+** will not bother to check for that condition.
+**
+** If the two statements contain a different number of bindings, then
+** an SQLITE_ERROR is returned.  Nothing else can go wrong, so otherwise
+** SQLITE_OK is returned.
+*/
+SQLITE_API int sqlite3_transfer_bindings(sqlite3_stmt *pFromStmt, sqlite3_stmt *pToStmt){
+  Vdbe *pFrom = (Vdbe*)pFromStmt;
+  Vdbe *pTo = (Vdbe*)pToStmt;
+  if( pFrom->nVar!=pTo->nVar ){
+    return SQLITE_ERROR;
+  }
+  if( pTo->isPrepareV2 && pTo->expmask ){
+    pTo->expired = 1;
+  }
+  if( pFrom->isPrepareV2 && pFrom->expmask ){
+    pFrom->expired = 1;
+  }
+  return sqlite3TransferBindings(pFromStmt, pToStmt);
+}
+#endif
+
+/*
+** Return the sqlite3* database handle to which the prepared statement given
+** in the argument belongs.  This is the same database handle that was
+** the first argument to the sqlite3_prepare() that was used to create
+** the statement in the first place.
+*/
+SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt *pStmt){
+  return pStmt ? ((Vdbe*)pStmt)->db : 0;
+}
+
+/*
+** Return true if the prepared statement is guaranteed to not modify the
+** database.
+*/
+SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt){
+  return pStmt ? ((Vdbe*)pStmt)->readOnly : 1;
+}
+
+/*
+** Return a pointer to the next prepared statement after pStmt associated
+** with database connection pDb.  If pStmt is NULL, return the first
+** prepared statement for the database connection.  Return NULL if there
+** are no more.
+*/
+SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt){
+  sqlite3_stmt *pNext;
+  sqlite3_mutex_enter(pDb->mutex);
+  if( pStmt==0 ){
+    pNext = (sqlite3_stmt*)pDb->pVdbe;
+  }else{
+    pNext = (sqlite3_stmt*)((Vdbe*)pStmt)->pNext;
+  }
+  sqlite3_mutex_leave(pDb->mutex);
+  return pNext;
+}
+
+/*
+** Return the value of a status counter for a prepared statement
+*/
+SQLITE_API int sqlite3_stmt_status(sqlite3_stmt *pStmt, int op, int resetFlag){
+  Vdbe *pVdbe = (Vdbe*)pStmt;
+  int v = pVdbe->aCounter[op-1];
+  if( resetFlag ) pVdbe->aCounter[op-1] = 0;
+  return v;
+}
+
+/************** End of vdbeapi.c *********************************************/
+/************** Begin file vdbetrace.c ***************************************/
+/*
+** 2009 November 25
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains code used to insert the values of host parameters
+** (aka "wildcards") into the SQL text output by sqlite3_trace().
+*/
+
+#ifndef SQLITE_OMIT_TRACE
+
+/*
+** zSql is a zero-terminated string of UTF-8 SQL text.  Return the number of
+** bytes in this text up to but excluding the first character in
+** a host parameter.  If the text contains no host parameters, return
+** the total number of bytes in the text.
+*/
+static int findNextHostParameter(const char *zSql, int *pnToken){
+  int tokenType;
+  int nTotal = 0;
+  int n;
+
+  *pnToken = 0;
+  while( zSql[0] ){
+    n = sqlite3GetToken((u8*)zSql, &tokenType);
+    assert( n>0 && tokenType!=TK_ILLEGAL );
+    if( tokenType==TK_VARIABLE ){
+      *pnToken = n;
+      break;
+    }
+    nTotal += n;
+    zSql += n;
+  }
+  return nTotal;
+}
+
+/*
+** This function returns a pointer to a nul-terminated string in memory
+** obtained from sqlite3DbMalloc(). If sqlite3.vdbeExecCnt is 1, then the
+** string contains a copy of zRawSql but with host parameters expanded to 
+** their current bindings. Or, if sqlite3.vdbeExecCnt is greater than 1, 
+** then the returned string holds a copy of zRawSql with "-- " prepended
+** to each line of text.
+**
+** The calling function is responsible for making sure the memory returned
+** is eventually freed.
+**
+** ALGORITHM:  Scan the input string looking for host parameters in any of
+** these forms:  ?, ?N, $A, @A, :A.  Take care to avoid text within
+** string literals, quoted identifier names, and comments.  For text forms,
+** the host parameter index is found by scanning the perpared
+** statement for the corresponding OP_Variable opcode.  Once the host
+** parameter index is known, locate the value in p->aVar[].  Then render
+** the value as a literal in place of the host parameter name.
+*/
+SQLITE_PRIVATE char *sqlite3VdbeExpandSql(
+  Vdbe *p,                 /* The prepared statement being evaluated */
+  const char *zRawSql      /* Raw text of the SQL statement */
+){
+  sqlite3 *db;             /* The database connection */
+  int idx = 0;             /* Index of a host parameter */
+  int nextIndex = 1;       /* Index of next ? host parameter */
+  int n;                   /* Length of a token prefix */
+  int nToken;              /* Length of the parameter token */
+  int i;                   /* Loop counter */
+  Mem *pVar;               /* Value of a host parameter */
+  StrAccum out;            /* Accumulate the output here */
+  char zBase[100];         /* Initial working space */
+
+  db = p->db;
+  sqlite3StrAccumInit(&out, zBase, sizeof(zBase), 
+                      db->aLimit[SQLITE_LIMIT_LENGTH]);
+  out.db = db;
+  if( db->vdbeExecCnt>1 ){
+    while( *zRawSql ){
+      const char *zStart = zRawSql;
+      while( *(zRawSql++)!='\n' && *zRawSql );
+      sqlite3StrAccumAppend(&out, "-- ", 3);
+      sqlite3StrAccumAppend(&out, zStart, (int)(zRawSql-zStart));
+    }
+  }else{
+    while( zRawSql[0] ){
+      n = findNextHostParameter(zRawSql, &nToken);
+      assert( n>0 );
+      sqlite3StrAccumAppend(&out, zRawSql, n);
+      zRawSql += n;
+      assert( zRawSql[0] || nToken==0 );
+      if( nToken==0 ) break;
+      if( zRawSql[0]=='?' ){
+        if( nToken>1 ){
+          assert( sqlite3Isdigit(zRawSql[1]) );
+          sqlite3GetInt32(&zRawSql[1], &idx);
+        }else{
+          idx = nextIndex;
+        }
+      }else{
+        assert( zRawSql[0]==':' || zRawSql[0]=='$' || zRawSql[0]=='@' );
+        testcase( zRawSql[0]==':' );
+        testcase( zRawSql[0]=='$' );
+        testcase( zRawSql[0]=='@' );
+        idx = sqlite3VdbeParameterIndex(p, zRawSql, nToken);
+        assert( idx>0 );
+      }
+      zRawSql += nToken;
+      nextIndex = idx + 1;
+      assert( idx>0 && idx<=p->nVar );
+      pVar = &p->aVar[idx-1];
+      if( pVar->flags & MEM_Null ){
+        sqlite3StrAccumAppend(&out, "NULL", 4);
+      }else if( pVar->flags & MEM_Int ){
+        sqlite3XPrintf(&out, "%lld", pVar->u.i);
+      }else if( pVar->flags & MEM_Real ){
+        sqlite3XPrintf(&out, "%!.15g", pVar->r);
+      }else if( pVar->flags & MEM_Str ){
+#ifndef SQLITE_OMIT_UTF16
+        u8 enc = ENC(db);
+        if( enc!=SQLITE_UTF8 ){
+          Mem utf8;
+          memset(&utf8, 0, sizeof(utf8));
+          utf8.db = db;
+          sqlite3VdbeMemSetStr(&utf8, pVar->z, pVar->n, enc, SQLITE_STATIC);
+          sqlite3VdbeChangeEncoding(&utf8, SQLITE_UTF8);
+          sqlite3XPrintf(&out, "'%.*q'", utf8.n, utf8.z);
+          sqlite3VdbeMemRelease(&utf8);
+        }else
+#endif
+        {
+          sqlite3XPrintf(&out, "'%.*q'", pVar->n, pVar->z);
+        }
+      }else if( pVar->flags & MEM_Zero ){
+        sqlite3XPrintf(&out, "zeroblob(%d)", pVar->u.nZero);
+      }else{
+        assert( pVar->flags & MEM_Blob );
+        sqlite3StrAccumAppend(&out, "x'", 2);
+        for(i=0; i<pVar->n; i++){
+          sqlite3XPrintf(&out, "%02x", pVar->z[i]&0xff);
+        }
+        sqlite3StrAccumAppend(&out, "'", 1);
+      }
+    }
+  }
+  return sqlite3StrAccumFinish(&out);
+}
+
+#endif /* #ifndef SQLITE_OMIT_TRACE */
+
+/************** End of vdbetrace.c *******************************************/
+/************** Begin file vdbe.c ********************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** The code in this file implements execution method of the 
+** Virtual Database Engine (VDBE).  A separate file ("vdbeaux.c")
+** handles housekeeping details such as creating and deleting
+** VDBE instances.  This file is solely interested in executing
+** the VDBE program.
+**
+** In the external interface, an "sqlite3_stmt*" is an opaque pointer
+** to a VDBE.
+**
+** The SQL parser generates a program which is then executed by
+** the VDBE to do the work of the SQL statement.  VDBE programs are 
+** similar in form to assembly language.  The program consists of
+** a linear sequence of operations.  Each operation has an opcode 
+** and 5 operands.  Operands P1, P2, and P3 are integers.  Operand P4 
+** is a null-terminated string.  Operand P5 is an unsigned character.
+** Few opcodes use all 5 operands.
+**
+** Computation results are stored on a set of registers numbered beginning
+** with 1 and going up to Vdbe.nMem.  Each register can store
+** either an integer, a null-terminated string, a floating point
+** number, or the SQL "NULL" value.  An implicit conversion from one
+** type to the other occurs as necessary.
+** 
+** Most of the code in this file is taken up by the sqlite3VdbeExec()
+** function which does the work of interpreting a VDBE program.
+** But other routines are also provided to help in building up
+** a program instruction by instruction.
+**
+** Various scripts scan this source file in order to generate HTML
+** documentation, headers files, or other derived files.  The formatting
+** of the code in this file is, therefore, important.  See other comments
+** in this file for details.  If in doubt, do not deviate from existing
+** commenting and indentation practices when changing or adding code.
+*/
+
+/*
+** Invoke this macro on memory cells just prior to changing the
+** value of the cell.  This macro verifies that shallow copies are
+** not misused.
+*/
+#ifdef SQLITE_DEBUG
+# define memAboutToChange(P,M) sqlite3VdbeMemPrepareToChange(P,M)
+#else
+# define memAboutToChange(P,M)
+#endif
+
+/*
+** The following global variable is incremented every time a cursor
+** moves, either by the OP_SeekXX, OP_Next, or OP_Prev opcodes.  The test
+** procedures use this information to make sure that indices are
+** working correctly.  This variable has no function other than to
+** help verify the correct operation of the library.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_search_count = 0;
+#endif
+
+/*
+** When this global variable is positive, it gets decremented once before
+** each instruction in the VDBE.  When reaches zero, the u1.isInterrupted
+** field of the sqlite3 structure is set in order to simulate and interrupt.
+**
+** This facility is used for testing purposes only.  It does not function
+** in an ordinary build.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_interrupt_count = 0;
+#endif
+
+/*
+** The next global variable is incremented each type the OP_Sort opcode
+** is executed.  The test procedures use this information to make sure that
+** sorting is occurring or not occurring at appropriate times.   This variable
+** has no function other than to help verify the correct operation of the
+** library.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_sort_count = 0;
+#endif
+
+/*
+** The next global variable records the size of the largest MEM_Blob
+** or MEM_Str that has been used by a VDBE opcode.  The test procedures
+** use this information to make sure that the zero-blob functionality
+** is working correctly.   This variable has no function other than to
+** help verify the correct operation of the library.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_max_blobsize = 0;
+static void updateMaxBlobsize(Mem *p){
+  if( (p->flags & (MEM_Str|MEM_Blob))!=0 && p->n>sqlite3_max_blobsize ){
+    sqlite3_max_blobsize = p->n;
+  }
+}
+#endif
+
+/*
+** The next global variable is incremented each type the OP_Found opcode
+** is executed. This is used to test whether or not the foreign key
+** operation implemented using OP_FkIsZero is working. This variable
+** has no function other than to help verify the correct operation of the
+** library.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_found_count = 0;
+#endif
+
+/*
+** Test a register to see if it exceeds the current maximum blob size.
+** If it does, record the new maximum blob size.
+*/
+#if defined(SQLITE_TEST) && !defined(SQLITE_OMIT_BUILTIN_TEST)
+# define UPDATE_MAX_BLOBSIZE(P)  updateMaxBlobsize(P)
+#else
+# define UPDATE_MAX_BLOBSIZE(P)
+#endif
+
+/*
+** Convert the given register into a string if it isn't one
+** already. Return non-zero if a malloc() fails.
+*/
+#define Stringify(P, enc) \
+   if(((P)->flags&(MEM_Str|MEM_Blob))==0 && sqlite3VdbeMemStringify(P,enc)) \
+     { goto no_mem; }
+
+/*
+** An ephemeral string value (signified by the MEM_Ephem flag) contains
+** a pointer to a dynamically allocated string where some other entity
+** is responsible for deallocating that string.  Because the register
+** does not control the string, it might be deleted without the register
+** knowing it.
+**
+** This routine converts an ephemeral string into a dynamically allocated
+** string that the register itself controls.  In other words, it
+** converts an MEM_Ephem string into an MEM_Dyn string.
+*/
+#define Deephemeralize(P) \
+   if( ((P)->flags&MEM_Ephem)!=0 \
+       && sqlite3VdbeMemMakeWriteable(P) ){ goto no_mem;}
+
+/*
+** Call sqlite3VdbeMemExpandBlob() on the supplied value (type Mem*)
+** P if required.
+*/
+#define ExpandBlob(P) (((P)->flags&MEM_Zero)?sqlite3VdbeMemExpandBlob(P):0)
+
+/*
+** Argument pMem points at a register that will be passed to a
+** user-defined function or returned to the user as the result of a query.
+** This routine sets the pMem->type variable used by the sqlite3_value_*() 
+** routines.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemStoreType(Mem *pMem){
+  int flags = pMem->flags;
+  if( flags & MEM_Null ){
+    pMem->type = SQLITE_NULL;
+  }
+  else if( flags & MEM_Int ){
+    pMem->type = SQLITE_INTEGER;
+  }
+  else if( flags & MEM_Real ){
+    pMem->type = SQLITE_FLOAT;
+  }
+  else if( flags & MEM_Str ){
+    pMem->type = SQLITE_TEXT;
+  }else{
+    pMem->type = SQLITE_BLOB;
+  }
+}
+
+/*
+** Allocate VdbeCursor number iCur.  Return a pointer to it.  Return NULL
+** if we run out of memory.
+*/
+static VdbeCursor *allocateCursor(
+  Vdbe *p,              /* The virtual machine */
+  int iCur,             /* Index of the new VdbeCursor */
+  int nField,           /* Number of fields in the table or index */
+  int iDb,              /* When database the cursor belongs to, or -1 */
+  int isBtreeCursor     /* True for B-Tree.  False for pseudo-table or vtab */
+){
+  /* Find the memory cell that will be used to store the blob of memory
+  ** required for this VdbeCursor structure. It is convenient to use a 
+  ** vdbe memory cell to manage the memory allocation required for a
+  ** VdbeCursor structure for the following reasons:
+  **
+  **   * Sometimes cursor numbers are used for a couple of different
+  **     purposes in a vdbe program. The different uses might require
+  **     different sized allocations. Memory cells provide growable
+  **     allocations.
+  **
+  **   * When using ENABLE_MEMORY_MANAGEMENT, memory cell buffers can
+  **     be freed lazily via the sqlite3_release_memory() API. This
+  **     minimizes the number of malloc calls made by the system.
+  **
+  ** Memory cells for cursors are allocated at the top of the address
+  ** space. Memory cell (p->nMem) corresponds to cursor 0. Space for
+  ** cursor 1 is managed by memory cell (p->nMem-1), etc.
+  */
+  Mem *pMem = &p->aMem[p->nMem-iCur];
+
+  int nByte;
+  VdbeCursor *pCx = 0;
+  nByte = 
+      ROUND8(sizeof(VdbeCursor)) + 
+      (isBtreeCursor?sqlite3BtreeCursorSize():0) + 
+      2*nField*sizeof(u32);
+
+  assert( iCur<p->nCursor );
+  if( p->apCsr[iCur] ){
+    sqlite3VdbeFreeCursor(p, p->apCsr[iCur]);
+    p->apCsr[iCur] = 0;
+  }
+  if( SQLITE_OK==sqlite3VdbeMemGrow(pMem, nByte, 0) ){
+    p->apCsr[iCur] = pCx = (VdbeCursor*)pMem->z;
+    memset(pCx, 0, sizeof(VdbeCursor));
+    pCx->iDb = iDb;
+    pCx->nField = nField;
+    if( nField ){
+      pCx->aType = (u32 *)&pMem->z[ROUND8(sizeof(VdbeCursor))];
+    }
+    if( isBtreeCursor ){
+      pCx->pCursor = (BtCursor*)
+          &pMem->z[ROUND8(sizeof(VdbeCursor))+2*nField*sizeof(u32)];
+      sqlite3BtreeCursorZero(pCx->pCursor);
+    }
+  }
+  return pCx;
+}
+
+/*
+** Try to convert a value into a numeric representation if we can
+** do so without loss of information.  In other words, if the string
+** looks like a number, convert it into a number.  If it does not
+** look like a number, leave it alone.
+*/
+static void applyNumericAffinity(Mem *pRec){
+  if( (pRec->flags & (MEM_Real|MEM_Int))==0 ){
+    double rValue;
+    i64 iValue;
+    u8 enc = pRec->enc;
+    if( (pRec->flags&MEM_Str)==0 ) return;
+    if( sqlite3AtoF(pRec->z, &rValue, pRec->n, enc)==0 ) return;
+    if( 0==sqlite3Atoi64(pRec->z, &iValue, pRec->n, enc) ){
+      pRec->u.i = iValue;
+      pRec->flags |= MEM_Int;
+    }else{
+      pRec->r = rValue;
+      pRec->flags |= MEM_Real;
+    }
+  }
+}
+
+/*
+** Processing is determine by the affinity parameter:
+**
+** SQLITE_AFF_INTEGER:
+** SQLITE_AFF_REAL:
+** SQLITE_AFF_NUMERIC:
+**    Try to convert pRec to an integer representation or a 
+**    floating-point representation if an integer representation
+**    is not possible.  Note that the integer representation is
+**    always preferred, even if the affinity is REAL, because
+**    an integer representation is more space efficient on disk.
+**
+** SQLITE_AFF_TEXT:
+**    Convert pRec to a text representation.
+**
+** SQLITE_AFF_NONE:
+**    No-op.  pRec is unchanged.
+*/
+static void applyAffinity(
+  Mem *pRec,          /* The value to apply affinity to */
+  char affinity,      /* The affinity to be applied */
+  u8 enc              /* Use this text encoding */
+){
+  if( affinity==SQLITE_AFF_TEXT ){
+    /* Only attempt the conversion to TEXT if there is an integer or real
+    ** representation (blob and NULL do not get converted) but no string
+    ** representation.
+    */
+    if( 0==(pRec->flags&MEM_Str) && (pRec->flags&(MEM_Real|MEM_Int)) ){
+      sqlite3VdbeMemStringify(pRec, enc);
+    }
+    pRec->flags &= ~(MEM_Real|MEM_Int);
+  }else if( affinity!=SQLITE_AFF_NONE ){
+    assert( affinity==SQLITE_AFF_INTEGER || affinity==SQLITE_AFF_REAL
+             || affinity==SQLITE_AFF_NUMERIC );
+    applyNumericAffinity(pRec);
+    if( pRec->flags & MEM_Real ){
+      sqlite3VdbeIntegerAffinity(pRec);
+    }
+  }
+}
+
+/*
+** Try to convert the type of a function argument or a result column
+** into a numeric representation.  Use either INTEGER or REAL whichever
+** is appropriate.  But only do the conversion if it is possible without
+** loss of information and return the revised type of the argument.
+*/
+SQLITE_API int sqlite3_value_numeric_type(sqlite3_value *pVal){
+  Mem *pMem = (Mem*)pVal;
+  if( pMem->type==SQLITE_TEXT ){
+    applyNumericAffinity(pMem);
+    sqlite3VdbeMemStoreType(pMem);
+  }
+  return pMem->type;
+}
+
+/*
+** Exported version of applyAffinity(). This one works on sqlite3_value*, 
+** not the internal Mem* type.
+*/
+SQLITE_PRIVATE void sqlite3ValueApplyAffinity(
+  sqlite3_value *pVal, 
+  u8 affinity, 
+  u8 enc
+){
+  applyAffinity((Mem *)pVal, affinity, enc);
+}
+
+#ifdef SQLITE_DEBUG
+/*
+** Write a nice string representation of the contents of cell pMem
+** into buffer zBuf, length nBuf.
+*/
+SQLITE_PRIVATE void sqlite3VdbeMemPrettyPrint(Mem *pMem, char *zBuf){
+  char *zCsr = zBuf;
+  int f = pMem->flags;
+
+  static const char *const encnames[] = {"(X)", "(8)", "(16LE)", "(16BE)"};
+
+  if( f&MEM_Blob ){
+    int i;
+    char c;
+    if( f & MEM_Dyn ){
+      c = 'z';
+      assert( (f & (MEM_Static|MEM_Ephem))==0 );
+    }else if( f & MEM_Static ){
+      c = 't';
+      assert( (f & (MEM_Dyn|MEM_Ephem))==0 );
+    }else if( f & MEM_Ephem ){
+      c = 'e';
+      assert( (f & (MEM_Static|MEM_Dyn))==0 );
+    }else{
+      c = 's';
+    }
+
+    sqlite3_snprintf(100, zCsr, "%c", c);
+    zCsr += sqlite3Strlen30(zCsr);
+    sqlite3_snprintf(100, zCsr, "%d[", pMem->n);
+    zCsr += sqlite3Strlen30(zCsr);
+    for(i=0; i<16 && i<pMem->n; i++){
+      sqlite3_snprintf(100, zCsr, "%02X", ((int)pMem->z[i] & 0xFF));
+      zCsr += sqlite3Strlen30(zCsr);
+    }
+    for(i=0; i<16 && i<pMem->n; i++){
+      char z = pMem->z[i];
+      if( z<32 || z>126 ) *zCsr++ = '.';
+      else *zCsr++ = z;
+    }
+
+    sqlite3_snprintf(100, zCsr, "]%s", encnames[pMem->enc]);
+    zCsr += sqlite3Strlen30(zCsr);
+    if( f & MEM_Zero ){
+      sqlite3_snprintf(100, zCsr,"+%dz",pMem->u.nZero);
+      zCsr += sqlite3Strlen30(zCsr);
+    }
+    *zCsr = '\0';
+  }else if( f & MEM_Str ){
+    int j, k;
+    zBuf[0] = ' ';
+    if( f & MEM_Dyn ){
+      zBuf[1] = 'z';
+      assert( (f & (MEM_Static|MEM_Ephem))==0 );
+    }else if( f & MEM_Static ){
+      zBuf[1] = 't';
+      assert( (f & (MEM_Dyn|MEM_Ephem))==0 );
+    }else if( f & MEM_Ephem ){
+      zBuf[1] = 'e';
+      assert( (f & (MEM_Static|MEM_Dyn))==0 );
+    }else{
+      zBuf[1] = 's';
+    }
+    k = 2;
+    sqlite3_snprintf(100, &zBuf[k], "%d", pMem->n);
+    k += sqlite3Strlen30(&zBuf[k]);
+    zBuf[k++] = '[';
+    for(j=0; j<15 && j<pMem->n; j++){
+      u8 c = pMem->z[j];
+      if( c>=0x20 && c<0x7f ){
+        zBuf[k++] = c;
+      }else{
+        zBuf[k++] = '.';
+      }
+    }
+    zBuf[k++] = ']';
+    sqlite3_snprintf(100,&zBuf[k], encnames[pMem->enc]);
+    k += sqlite3Strlen30(&zBuf[k]);
+    zBuf[k++] = 0;
+  }
+}
+#endif
+
+#ifdef SQLITE_DEBUG
+/*
+** Print the value of a register for tracing purposes:
+*/
+static void memTracePrint(FILE *out, Mem *p){
+  if( p->flags & MEM_Null ){
+    fprintf(out, " NULL");
+  }else if( (p->flags & (MEM_Int|MEM_Str))==(MEM_Int|MEM_Str) ){
+    fprintf(out, " si:%lld", p->u.i);
+  }else if( p->flags & MEM_Int ){
+    fprintf(out, " i:%lld", p->u.i);
+#ifndef SQLITE_OMIT_FLOATING_POINT
+  }else if( p->flags & MEM_Real ){
+    fprintf(out, " r:%g", p->r);
+#endif
+  }else if( p->flags & MEM_RowSet ){
+    fprintf(out, " (rowset)");
+  }else{
+    char zBuf[200];
+    sqlite3VdbeMemPrettyPrint(p, zBuf);
+    fprintf(out, " ");
+    fprintf(out, "%s", zBuf);
+  }
+}
+static void registerTrace(FILE *out, int iReg, Mem *p){
+  fprintf(out, "REG[%d] = ", iReg);
+  memTracePrint(out, p);
+  fprintf(out, "\n");
+}
+#endif
+
+#ifdef SQLITE_DEBUG
+#  define REGISTER_TRACE(R,M) if(p->trace)registerTrace(p->trace,R,M)
+#else
+#  define REGISTER_TRACE(R,M)
+#endif
+
+
+#ifdef VDBE_PROFILE
+
+/* 
+** hwtime.h contains inline assembler code for implementing 
+** high-performance timing routines.
+*/
+/************** Include hwtime.h in the middle of vdbe.c *********************/
+/************** Begin file hwtime.h ******************************************/
+/*
+** 2008 May 27
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file contains inline asm code for retrieving "high-performance"
+** counters for x86 class CPUs.
+*/
+#ifndef _HWTIME_H_
+#define _HWTIME_H_
+
+/*
+** The following routine only works on pentium-class (or newer) processors.
+** It uses the RDTSC opcode to read the cycle count value out of the
+** processor and returns that value.  This can be used for high-res
+** profiling.
+*/
+#if (defined(__GNUC__) || defined(_MSC_VER)) && \
+      (defined(i386) || defined(__i386__) || defined(_M_IX86))
+
+  #if defined(__GNUC__)
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+     unsigned int lo, hi;
+     __asm__ __volatile__ ("rdtsc" : "=a" (lo), "=d" (hi));
+     return (sqlite_uint64)hi << 32 | lo;
+  }
+
+  #elif defined(_MSC_VER)
+
+  __declspec(naked) __inline sqlite_uint64 __cdecl sqlite3Hwtime(void){
+     __asm {
+        rdtsc
+        ret       ; return value at EDX:EAX
+     }
+  }
+
+  #endif
+
+#elif (defined(__GNUC__) && defined(__x86_64__))
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+      unsigned long val;
+      __asm__ __volatile__ ("rdtsc" : "=A" (val));
+      return val;
+  }
+ 
+#elif (defined(__GNUC__) && defined(__ppc__))
+
+  __inline__ sqlite_uint64 sqlite3Hwtime(void){
+      unsigned long long retval;
+      unsigned long junk;
+      __asm__ __volatile__ ("\n\
+          1:      mftbu   %1\n\
+                  mftb    %L0\n\
+                  mftbu   %0\n\
+                  cmpw    %0,%1\n\
+                  bne     1b"
+                  : "=r" (retval), "=r" (junk));
+      return retval;
+  }
+
+#else
+
+  #error Need implementation of sqlite3Hwtime() for your platform.
+
+  /*
+  ** To compile without implementing sqlite3Hwtime() for your platform,
+  ** you can remove the above #error and use the following
+  ** stub function.  You will lose timing support for many
+  ** of the debugging and testing utilities, but it should at
+  ** least compile and run.
+  */
+SQLITE_PRIVATE   sqlite_uint64 sqlite3Hwtime(void){ return ((sqlite_uint64)0); }
+
+#endif
+
+#endif /* !defined(_HWTIME_H_) */
+
+/************** End of hwtime.h **********************************************/
+/************** Continuing where we left off in vdbe.c ***********************/
+
+#endif
+
+/*
+** The CHECK_FOR_INTERRUPT macro defined here looks to see if the
+** sqlite3_interrupt() routine has been called.  If it has been, then
+** processing of the VDBE program is interrupted.
+**
+** This macro added to every instruction that does a jump in order to
+** implement a loop.  This test used to be on every single instruction,
+** but that meant we more testing that we needed.  By only testing the
+** flag on jump instructions, we get a (small) speed improvement.
+*/
+#define CHECK_FOR_INTERRUPT \
+   if( db->u1.isInterrupted ) goto abort_due_to_interrupt;
+
+
+#ifndef NDEBUG
+/*
+** This function is only called from within an assert() expression. It
+** checks that the sqlite3.nTransaction variable is correctly set to
+** the number of non-transaction savepoints currently in the 
+** linked list starting at sqlite3.pSavepoint.
+** 
+** Usage:
+**
+**     assert( checkSavepointCount(db) );
+*/
+static int checkSavepointCount(sqlite3 *db){
+  int n = 0;
+  Savepoint *p;
+  for(p=db->pSavepoint; p; p=p->pNext) n++;
+  assert( n==(db->nSavepoint + db->isTransactionSavepoint) );
+  return 1;
+}
+#endif
+
+/*
+** Transfer error message text from an sqlite3_vtab.zErrMsg (text stored
+** in memory obtained from sqlite3_malloc) into a Vdbe.zErrMsg (text stored
+** in memory obtained from sqlite3DbMalloc).
+*/
+static void importVtabErrMsg(Vdbe *p, sqlite3_vtab *pVtab){
+  sqlite3 *db = p->db;
+  sqlite3DbFree(db, p->zErrMsg);
+  p->zErrMsg = sqlite3DbStrDup(db, pVtab->zErrMsg);
+  sqlite3_free(pVtab->zErrMsg);
+  pVtab->zErrMsg = 0;
+}
+
+
+/*
+** Execute as much of a VDBE program as we can then return.
+**
+** sqlite3VdbeMakeReady() must be called before this routine in order to
+** close the program with a final OP_Halt and to set up the callbacks
+** and the error message pointer.
+**
+** Whenever a row or result data is available, this routine will either
+** invoke the result callback (if there is one) or return with
+** SQLITE_ROW.
+**
+** If an attempt is made to open a locked database, then this routine
+** will either invoke the busy callback (if there is one) or it will
+** return SQLITE_BUSY.
+**
+** If an error occurs, an error message is written to memory obtained
+** from sqlite3_malloc() and p->zErrMsg is made to point to that memory.
+** The error code is stored in p->rc and this routine returns SQLITE_ERROR.
+**
+** If the callback ever returns non-zero, then the program exits
+** immediately.  There will be no error message but the p->rc field is
+** set to SQLITE_ABORT and this routine will return SQLITE_ERROR.
+**
+** A memory allocation error causes p->rc to be set to SQLITE_NOMEM and this
+** routine to return SQLITE_ERROR.
+**
+** Other fatal errors return SQLITE_ERROR.
+**
+** After this routine has finished, sqlite3VdbeFinalize() should be
+** used to clean up the mess that was left behind.
+*/
+SQLITE_PRIVATE int sqlite3VdbeExec(
+  Vdbe *p                    /* The VDBE */
+){
+  int pc=0;                  /* The program counter */
+  Op *aOp = p->aOp;          /* Copy of p->aOp */
+  Op *pOp;                   /* Current operation */
+  int rc = SQLITE_OK;        /* Value to return */
+  sqlite3 *db = p->db;       /* The database */
+  u8 resetSchemaOnFault = 0; /* Reset schema after an error if positive */
+  u8 encoding = ENC(db);     /* The database encoding */
+#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
+  int checkProgress;         /* True if progress callbacks are enabled */
+  int nProgressOps = 0;      /* Opcodes executed since progress callback. */
+#endif
+  Mem *aMem = p->aMem;       /* Copy of p->aMem */
+  Mem *pIn1 = 0;             /* 1st input operand */
+  Mem *pIn2 = 0;             /* 2nd input operand */
+  Mem *pIn3 = 0;             /* 3rd input operand */
+  Mem *pOut = 0;             /* Output operand */
+  int iCompare = 0;          /* Result of last OP_Compare operation */
+  int *aPermute = 0;         /* Permutation of columns for OP_Compare */
+#ifdef VDBE_PROFILE
+  u64 start;                 /* CPU clock count at start of opcode */
+  int origPc;                /* Program counter at start of opcode */
+#endif
+  /********************************************************************
+  ** Automatically generated code
+  **
+  ** The following union is automatically generated by the
+  ** vdbe-compress.tcl script.  The purpose of this union is to
+  ** reduce the amount of stack space required by this function.
+  ** See comments in the vdbe-compress.tcl script for details.
+  */
+  union vdbeExecUnion {
+    struct OP_Yield_stack_vars {
+      int pcDest;
+    } aa;
+    struct OP_Variable_stack_vars {
+      Mem *pVar;       /* Value being transferred */
+    } ab;
+    struct OP_Move_stack_vars {
+      char *zMalloc;   /* Holding variable for allocated memory */
+      int n;           /* Number of registers left to copy */
+      int p1;          /* Register to copy from */
+      int p2;          /* Register to copy to */
+    } ac;
+    struct OP_ResultRow_stack_vars {
+      Mem *pMem;
+      int i;
+    } ad;
+    struct OP_Concat_stack_vars {
+      i64 nByte;
+    } ae;
+    struct OP_Remainder_stack_vars {
+      int flags;      /* Combined MEM_* flags from both inputs */
+      i64 iA;         /* Integer value of left operand */
+      i64 iB;         /* Integer value of right operand */
+      double rA;      /* Real value of left operand */
+      double rB;      /* Real value of right operand */
+    } af;
+    struct OP_Function_stack_vars {
+      int i;
+      Mem *pArg;
+      sqlite3_context ctx;
+      sqlite3_value **apVal;
+      int n;
+    } ag;
+    struct OP_ShiftRight_stack_vars {
+      i64 iA;
+      u64 uA;
+      i64 iB;
+      u8 op;
+    } ah;
+    struct OP_Ge_stack_vars {
+      int res;            /* Result of the comparison of pIn1 against pIn3 */
+      char affinity;      /* Affinity to use for comparison */
+      u16 flags1;         /* Copy of initial value of pIn1->flags */
+      u16 flags3;         /* Copy of initial value of pIn3->flags */
+    } ai;
+    struct OP_Compare_stack_vars {
+      int n;
+      int i;
+      int p1;
+      int p2;
+      const KeyInfo *pKeyInfo;
+      int idx;
+      CollSeq *pColl;    /* Collating sequence to use on this term */
+      int bRev;          /* True for DESCENDING sort order */
+    } aj;
+    struct OP_Or_stack_vars {
+      int v1;    /* Left operand:  0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */
+      int v2;    /* Right operand: 0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */
+    } ak;
+    struct OP_IfNot_stack_vars {
+      int c;
+    } al;
+    struct OP_Column_stack_vars {
+      u32 payloadSize;   /* Number of bytes in the record */
+      i64 payloadSize64; /* Number of bytes in the record */
+      int p1;            /* P1 value of the opcode */
+      int p2;            /* column number to retrieve */
+      VdbeCursor *pC;    /* The VDBE cursor */
+      char *zRec;        /* Pointer to complete record-data */
+      BtCursor *pCrsr;   /* The BTree cursor */
+      u32 *aType;        /* aType[i] holds the numeric type of the i-th column */
+      u32 *aOffset;      /* aOffset[i] is offset to start of data for i-th column */
+      int nField;        /* number of fields in the record */
+      int len;           /* The length of the serialized data for the column */
+      int i;             /* Loop counter */
+      char *zData;       /* Part of the record being decoded */
+      Mem *pDest;        /* Where to write the extracted value */
+      Mem sMem;          /* For storing the record being decoded */
+      u8 *zIdx;          /* Index into header */
+      u8 *zEndHdr;       /* Pointer to first byte after the header */
+      u32 offset;        /* Offset into the data */
+      u32 szField;       /* Number of bytes in the content of a field */
+      int szHdr;         /* Size of the header size field at start of record */
+      int avail;         /* Number of bytes of available data */
+      Mem *pReg;         /* PseudoTable input register */
+    } am;
+    struct OP_Affinity_stack_vars {
+      const char *zAffinity;   /* The affinity to be applied */
+      char cAff;               /* A single character of affinity */
+    } an;
+    struct OP_MakeRecord_stack_vars {
+      u8 *zNewRecord;        /* A buffer to hold the data for the new record */
+      Mem *pRec;             /* The new record */
+      u64 nData;             /* Number of bytes of data space */
+      int nHdr;              /* Number of bytes of header space */
+      i64 nByte;             /* Data space required for this record */
+      int nZero;             /* Number of zero bytes at the end of the record */
+      int nVarint;           /* Number of bytes in a varint */
+      u32 serial_type;       /* Type field */
+      Mem *pData0;           /* First field to be combined into the record */
+      Mem *pLast;            /* Last field of the record */
+      int nField;            /* Number of fields in the record */
+      char *zAffinity;       /* The affinity string for the record */
+      int file_format;       /* File format to use for encoding */
+      int i;                 /* Space used in zNewRecord[] */
+      int len;               /* Length of a field */
+    } ao;
+    struct OP_Count_stack_vars {
+      i64 nEntry;
+      BtCursor *pCrsr;
+    } ap;
+    struct OP_Savepoint_stack_vars {
+      int p1;                         /* Value of P1 operand */
+      char *zName;                    /* Name of savepoint */
+      int nName;
+      Savepoint *pNew;
+      Savepoint *pSavepoint;
+      Savepoint *pTmp;
+      int iSavepoint;
+      int ii;
+    } aq;
+    struct OP_AutoCommit_stack_vars {
+      int desiredAutoCommit;
+      int iRollback;
+      int turnOnAC;
+    } ar;
+    struct OP_Transaction_stack_vars {
+      Btree *pBt;
+    } as;
+    struct OP_ReadCookie_stack_vars {
+      int iMeta;
+      int iDb;
+      int iCookie;
+    } at;
+    struct OP_SetCookie_stack_vars {
+      Db *pDb;
+    } au;
+    struct OP_VerifyCookie_stack_vars {
+      int iMeta;
+      int iGen;
+      Btree *pBt;
+    } av;
+    struct OP_OpenWrite_stack_vars {
+      int nField;
+      KeyInfo *pKeyInfo;
+      int p2;
+      int iDb;
+      int wrFlag;
+      Btree *pX;
+      VdbeCursor *pCur;
+      Db *pDb;
+    } aw;
+    struct OP_OpenEphemeral_stack_vars {
+      VdbeCursor *pCx;
+    } ax;
+    struct OP_OpenPseudo_stack_vars {
+      VdbeCursor *pCx;
+    } ay;
+    struct OP_SeekGt_stack_vars {
+      int res;
+      int oc;
+      VdbeCursor *pC;
+      UnpackedRecord r;
+      int nField;
+      i64 iKey;      /* The rowid we are to seek to */
+    } az;
+    struct OP_Seek_stack_vars {
+      VdbeCursor *pC;
+    } ba;
+    struct OP_Found_stack_vars {
+      int alreadyExists;
+      VdbeCursor *pC;
+      int res;
+      UnpackedRecord *pIdxKey;
+      UnpackedRecord r;
+      char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
+    } bb;
+    struct OP_IsUnique_stack_vars {
+      u16 ii;
+      VdbeCursor *pCx;
+      BtCursor *pCrsr;
+      u16 nField;
+      Mem *aMx;
+      UnpackedRecord r;                  /* B-Tree index search key */
+      i64 R;                             /* Rowid stored in register P3 */
+    } bc;
+    struct OP_NotExists_stack_vars {
+      VdbeCursor *pC;
+      BtCursor *pCrsr;
+      int res;
+      u64 iKey;
+    } bd;
+    struct OP_NewRowid_stack_vars {
+      i64 v;                 /* The new rowid */
+      VdbeCursor *pC;        /* Cursor of table to get the new rowid */
+      int res;               /* Result of an sqlite3BtreeLast() */
+      int cnt;               /* Counter to limit the number of searches */
+      Mem *pMem;             /* Register holding largest rowid for AUTOINCREMENT */
+      VdbeFrame *pFrame;     /* Root frame of VDBE */
+    } be;
+    struct OP_InsertInt_stack_vars {
+      Mem *pData;       /* MEM cell holding data for the record to be inserted */
+      Mem *pKey;        /* MEM cell holding key  for the record */
+      i64 iKey;         /* The integer ROWID or key for the record to be inserted */
+      VdbeCursor *pC;   /* Cursor to table into which insert is written */
+      int nZero;        /* Number of zero-bytes to append */
+      int seekResult;   /* Result of prior seek or 0 if no USESEEKRESULT flag */
+      const char *zDb;  /* database name - used by the update hook */
+      const char *zTbl; /* Table name - used by the opdate hook */
+      int op;           /* Opcode for update hook: SQLITE_UPDATE or SQLITE_INSERT */
+    } bf;
+    struct OP_Delete_stack_vars {
+      i64 iKey;
+      VdbeCursor *pC;
+    } bg;
+    struct OP_RowData_stack_vars {
+      VdbeCursor *pC;
+      BtCursor *pCrsr;
+      u32 n;
+      i64 n64;
+    } bh;
+    struct OP_Rowid_stack_vars {
+      VdbeCursor *pC;
+      i64 v;
+      sqlite3_vtab *pVtab;
+      const sqlite3_module *pModule;
+    } bi;
+    struct OP_NullRow_stack_vars {
+      VdbeCursor *pC;
+    } bj;
+    struct OP_Last_stack_vars {
+      VdbeCursor *pC;
+      BtCursor *pCrsr;
+      int res;
+    } bk;
+    struct OP_Rewind_stack_vars {
+      VdbeCursor *pC;
+      BtCursor *pCrsr;
+      int res;
+    } bl;
+    struct OP_Next_stack_vars {
+      VdbeCursor *pC;
+      BtCursor *pCrsr;
+      int res;
+    } bm;
+    struct OP_IdxInsert_stack_vars {
+      VdbeCursor *pC;
+      BtCursor *pCrsr;
+      int nKey;
+      const char *zKey;
+    } bn;
+    struct OP_IdxDelete_stack_vars {
+      VdbeCursor *pC;
+      BtCursor *pCrsr;
+      int res;
+      UnpackedRecord r;
+    } bo;
+    struct OP_IdxRowid_stack_vars {
+      BtCursor *pCrsr;
+      VdbeCursor *pC;
+      i64 rowid;
+    } bp;
+    struct OP_IdxGE_stack_vars {
+      VdbeCursor *pC;
+      int res;
+      UnpackedRecord r;
+    } bq;
+    struct OP_Destroy_stack_vars {
+      int iMoved;
+      int iCnt;
+      Vdbe *pVdbe;
+      int iDb;
+    } br;
+    struct OP_Clear_stack_vars {
+      int nChange;
+    } bs;
+    struct OP_CreateTable_stack_vars {
+      int pgno;
+      int flags;
+      Db *pDb;
+    } bt;
+    struct OP_ParseSchema_stack_vars {
+      int iDb;
+      const char *zMaster;
+      char *zSql;
+      InitData initData;
+    } bu;
+    struct OP_IntegrityCk_stack_vars {
+      int nRoot;      /* Number of tables to check.  (Number of root pages.) */
+      int *aRoot;     /* Array of rootpage numbers for tables to be checked */
+      int j;          /* Loop counter */
+      int nErr;       /* Number of errors reported */
+      char *z;        /* Text of the error report */
+      Mem *pnErr;     /* Register keeping track of errors remaining */
+    } bv;
+    struct OP_RowSetRead_stack_vars {
+      i64 val;
+    } bw;
+    struct OP_RowSetTest_stack_vars {
+      int iSet;
+      int exists;
+    } bx;
+    struct OP_Program_stack_vars {
+      int nMem;               /* Number of memory registers for sub-program */
+      int nByte;              /* Bytes of runtime space required for sub-program */
+      Mem *pRt;               /* Register to allocate runtime space */
+      Mem *pMem;              /* Used to iterate through memory cells */
+      Mem *pEnd;              /* Last memory cell in new array */
+      VdbeFrame *pFrame;      /* New vdbe frame to execute in */
+      SubProgram *pProgram;   /* Sub-program to execute */
+      void *t;                /* Token identifying trigger */
+    } by;
+    struct OP_Param_stack_vars {
+      VdbeFrame *pFrame;
+      Mem *pIn;
+    } bz;
+    struct OP_MemMax_stack_vars {
+      Mem *pIn1;
+      VdbeFrame *pFrame;
+    } ca;
+    struct OP_AggStep_stack_vars {
+      int n;
+      int i;
+      Mem *pMem;
+      Mem *pRec;
+      sqlite3_context ctx;
+      sqlite3_value **apVal;
+    } cb;
+    struct OP_AggFinal_stack_vars {
+      Mem *pMem;
+    } cc;
+    struct OP_Checkpoint_stack_vars {
+      int i;                          /* Loop counter */
+      int aRes[3];                    /* Results */
+      Mem *pMem;                      /* Write results here */
+    } cd;
+    struct OP_JournalMode_stack_vars {
+      Btree *pBt;                     /* Btree to change journal mode of */
+      Pager *pPager;                  /* Pager associated with pBt */
+      int eNew;                       /* New journal mode */
+      int eOld;                       /* The old journal mode */
+      const char *zFilename;          /* Name of database file for pPager */
+    } ce;
+    struct OP_IncrVacuum_stack_vars {
+      Btree *pBt;
+    } cf;
+    struct OP_VBegin_stack_vars {
+      VTable *pVTab;
+    } cg;
+    struct OP_VOpen_stack_vars {
+      VdbeCursor *pCur;
+      sqlite3_vtab_cursor *pVtabCursor;
+      sqlite3_vtab *pVtab;
+      sqlite3_module *pModule;
+    } ch;
+    struct OP_VFilter_stack_vars {
+      int nArg;
+      int iQuery;
+      const sqlite3_module *pModule;
+      Mem *pQuery;
+      Mem *pArgc;
+      sqlite3_vtab_cursor *pVtabCursor;
+      sqlite3_vtab *pVtab;
+      VdbeCursor *pCur;
+      int res;
+      int i;
+      Mem **apArg;
+    } ci;
+    struct OP_VColumn_stack_vars {
+      sqlite3_vtab *pVtab;
+      const sqlite3_module *pModule;
+      Mem *pDest;
+      sqlite3_context sContext;
+    } cj;
+    struct OP_VNext_stack_vars {
+      sqlite3_vtab *pVtab;
+      const sqlite3_module *pModule;
+      int res;
+      VdbeCursor *pCur;
+    } ck;
+    struct OP_VRename_stack_vars {
+      sqlite3_vtab *pVtab;
+      Mem *pName;
+    } cl;
+    struct OP_VUpdate_stack_vars {
+      sqlite3_vtab *pVtab;
+      sqlite3_module *pModule;
+      int nArg;
+      int i;
+      sqlite_int64 rowid;
+      Mem **apArg;
+      Mem *pX;
+    } cm;
+    struct OP_Trace_stack_vars {
+      char *zTrace;
+    } cn;
+  } u;
+  /* End automatically generated code
+  ********************************************************************/
+
+  assert( p->magic==VDBE_MAGIC_RUN );  /* sqlite3_step() verifies this */
+  sqlite3VdbeEnter(p);
+  if( p->rc==SQLITE_NOMEM ){
+    /* This happens if a malloc() inside a call to sqlite3_column_text() or
+    ** sqlite3_column_text16() failed.  */
+    goto no_mem;
+  }
+  assert( p->rc==SQLITE_OK || p->rc==SQLITE_BUSY );
+  p->rc = SQLITE_OK;
+  assert( p->explain==0 );
+  p->pResultSet = 0;
+  db->busyHandler.nBusy = 0;
+  CHECK_FOR_INTERRUPT;
+  sqlite3VdbeIOTraceSql(p);
+#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
+  checkProgress = db->xProgress!=0;
+#endif
+#ifdef SQLITE_DEBUG
+  sqlite3BeginBenignMalloc();
+  if( p->pc==0  && (p->db->flags & SQLITE_VdbeListing)!=0 ){
+    int i;
+    printf("VDBE Program Listing:\n");
+    sqlite3VdbePrintSql(p);
+    for(i=0; i<p->nOp; i++){
+      sqlite3VdbePrintOp(stdout, i, &aOp[i]);
+    }
+  }
+  sqlite3EndBenignMalloc();
+#endif
+  for(pc=p->pc; rc==SQLITE_OK; pc++){
+    assert( pc>=0 && pc<p->nOp );
+    if( db->mallocFailed ) goto no_mem;
+#ifdef VDBE_PROFILE
+    origPc = pc;
+    start = sqlite3Hwtime();
+#endif
+    pOp = &aOp[pc];
+
+    /* Only allow tracing if SQLITE_DEBUG is defined.
+    */
+#ifdef SQLITE_DEBUG
+    if( p->trace ){
+      if( pc==0 ){
+        printf("VDBE Execution Trace:\n");
+        sqlite3VdbePrintSql(p);
+      }
+      sqlite3VdbePrintOp(p->trace, pc, pOp);
+    }
+#endif
+      
+
+    /* Check to see if we need to simulate an interrupt.  This only happens
+    ** if we have a special test build.
+    */
+#ifdef SQLITE_TEST
+    if( sqlite3_interrupt_count>0 ){
+      sqlite3_interrupt_count--;
+      if( sqlite3_interrupt_count==0 ){
+        sqlite3_interrupt(db);
+      }
+    }
+#endif
+
+#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
+    /* Call the progress callback if it is configured and the required number
+    ** of VDBE ops have been executed (either since this invocation of
+    ** sqlite3VdbeExec() or since last time the progress callback was called).
+    ** If the progress callback returns non-zero, exit the virtual machine with
+    ** a return code SQLITE_ABORT.
+    */
+    if( checkProgress ){
+      if( db->nProgressOps==nProgressOps ){
+        int prc;
+        prc = db->xProgress(db->pProgressArg);
+        if( prc!=0 ){
+          rc = SQLITE_INTERRUPT;
+          goto vdbe_error_halt;
+        }
+        nProgressOps = 0;
+      }
+      nProgressOps++;
+    }
+#endif
+
+    /* On any opcode with the "out2-prerelase" tag, free any
+    ** external allocations out of mem[p2] and set mem[p2] to be
+    ** an undefined integer.  Opcodes will either fill in the integer
+    ** value or convert mem[p2] to a different type.
+    */
+    assert( pOp->opflags==sqlite3OpcodeProperty[pOp->opcode] );
+    if( pOp->opflags & OPFLG_OUT2_PRERELEASE ){
+      assert( pOp->p2>0 );
+      assert( pOp->p2<=p->nMem );
+      pOut = &aMem[pOp->p2];
+      memAboutToChange(p, pOut);
+      sqlite3VdbeMemReleaseExternal(pOut);
+      pOut->flags = MEM_Int;
+    }
+
+    /* Sanity checking on other operands */
+#ifdef SQLITE_DEBUG
+    if( (pOp->opflags & OPFLG_IN1)!=0 ){
+      assert( pOp->p1>0 );
+      assert( pOp->p1<=p->nMem );
+      assert( memIsValid(&aMem[pOp->p1]) );
+      REGISTER_TRACE(pOp->p1, &aMem[pOp->p1]);
+    }
+    if( (pOp->opflags & OPFLG_IN2)!=0 ){
+      assert( pOp->p2>0 );
+      assert( pOp->p2<=p->nMem );
+      assert( memIsValid(&aMem[pOp->p2]) );
+      REGISTER_TRACE(pOp->p2, &aMem[pOp->p2]);
+    }
+    if( (pOp->opflags & OPFLG_IN3)!=0 ){
+      assert( pOp->p3>0 );
+      assert( pOp->p3<=p->nMem );
+      assert( memIsValid(&aMem[pOp->p3]) );
+      REGISTER_TRACE(pOp->p3, &aMem[pOp->p3]);
+    }
+    if( (pOp->opflags & OPFLG_OUT2)!=0 ){
+      assert( pOp->p2>0 );
+      assert( pOp->p2<=p->nMem );
+      memAboutToChange(p, &aMem[pOp->p2]);
+    }
+    if( (pOp->opflags & OPFLG_OUT3)!=0 ){
+      assert( pOp->p3>0 );
+      assert( pOp->p3<=p->nMem );
+      memAboutToChange(p, &aMem[pOp->p3]);
+    }
+#endif
+  
+    switch( pOp->opcode ){
+
+/*****************************************************************************
+** What follows is a massive switch statement where each case implements a
+** separate instruction in the virtual machine.  If we follow the usual
+** indentation conventions, each case should be indented by 6 spaces.  But
+** that is a lot of wasted space on the left margin.  So the code within
+** the switch statement will break with convention and be flush-left. Another
+** big comment (similar to this one) will mark the point in the code where
+** we transition back to normal indentation.
+**
+** The formatting of each case is important.  The makefile for SQLite
+** generates two C files "opcodes.h" and "opcodes.c" by scanning this
+** file looking for lines that begin with "case OP_".  The opcodes.h files
+** will be filled with #defines that give unique integer values to each
+** opcode and the opcodes.c file is filled with an array of strings where
+** each string is the symbolic name for the corresponding opcode.  If the
+** case statement is followed by a comment of the form "/# same as ... #/"
+** that comment is used to determine the particular value of the opcode.
+**
+** Other keywords in the comment that follows each case are used to
+** construct the OPFLG_INITIALIZER value that initializes opcodeProperty[].
+** Keywords include: in1, in2, in3, out2_prerelease, out2, out3.  See
+** the mkopcodeh.awk script for additional information.
+**
+** Documentation about VDBE opcodes is generated by scanning this file
+** for lines of that contain "Opcode:".  That line and all subsequent
+** comment lines are used in the generation of the opcode.html documentation
+** file.
+**
+** SUMMARY:
+**
+**     Formatting is important to scripts that scan this file.
+**     Do not deviate from the formatting style currently in use.
+**
+*****************************************************************************/
+
+/* Opcode:  Goto * P2 * * *
+**
+** An unconditional jump to address P2.
+** The next instruction executed will be 
+** the one at index P2 from the beginning of
+** the program.
+*/
+case OP_Goto: {             /* jump */
+  CHECK_FOR_INTERRUPT;
+  pc = pOp->p2 - 1;
+  break;
+}
+
+/* Opcode:  Gosub P1 P2 * * *
+**
+** Write the current address onto register P1
+** and then jump to address P2.
+*/
+case OP_Gosub: {            /* jump, in1 */
+  pIn1 = &aMem[pOp->p1];
+  assert( (pIn1->flags & MEM_Dyn)==0 );
+  memAboutToChange(p, pIn1);
+  pIn1->flags = MEM_Int;
+  pIn1->u.i = pc;
+  REGISTER_TRACE(pOp->p1, pIn1);
+  pc = pOp->p2 - 1;
+  break;
+}
+
+/* Opcode:  Return P1 * * * *
+**
+** Jump to the next instruction after the address in register P1.
+*/
+case OP_Return: {           /* in1 */
+  pIn1 = &aMem[pOp->p1];
+  assert( pIn1->flags & MEM_Int );
+  pc = (int)pIn1->u.i;
+  break;
+}
+
+/* Opcode:  Yield P1 * * * *
+**
+** Swap the program counter with the value in register P1.
+*/
+case OP_Yield: {            /* in1 */
+#if 0  /* local variables moved into u.aa */
+  int pcDest;
+#endif /* local variables moved into u.aa */
+  pIn1 = &aMem[pOp->p1];
+  assert( (pIn1->flags & MEM_Dyn)==0 );
+  pIn1->flags = MEM_Int;
+  u.aa.pcDest = (int)pIn1->u.i;
+  pIn1->u.i = pc;
+  REGISTER_TRACE(pOp->p1, pIn1);
+  pc = u.aa.pcDest;
+  break;
+}
+
+/* Opcode:  HaltIfNull  P1 P2 P3 P4 *
+**
+** Check the value in register P3.  If is is NULL then Halt using
+** parameter P1, P2, and P4 as if this were a Halt instruction.  If the
+** value in register P3 is not NULL, then this routine is a no-op.
+*/
+case OP_HaltIfNull: {      /* in3 */
+  pIn3 = &aMem[pOp->p3];
+  if( (pIn3->flags & MEM_Null)==0 ) break;
+  /* Fall through into OP_Halt */
+}
+
+/* Opcode:  Halt P1 P2 * P4 *
+**
+** Exit immediately.  All open cursors, etc are closed
+** automatically.
+**
+** P1 is the result code returned by sqlite3_exec(), sqlite3_reset(),
+** or sqlite3_finalize().  For a normal halt, this should be SQLITE_OK (0).
+** For errors, it can be some other value.  If P1!=0 then P2 will determine
+** whether or not to rollback the current transaction.  Do not rollback
+** if P2==OE_Fail. Do the rollback if P2==OE_Rollback.  If P2==OE_Abort,
+** then back out all changes that have occurred during this execution of the
+** VDBE, but do not rollback the transaction. 
+**
+** If P4 is not null then it is an error message string.
+**
+** There is an implied "Halt 0 0 0" instruction inserted at the very end of
+** every program.  So a jump past the last instruction of the program
+** is the same as executing Halt.
+*/
+case OP_Halt: {
+  if( pOp->p1==SQLITE_OK && p->pFrame ){
+    /* Halt the sub-program. Return control to the parent frame. */
+    VdbeFrame *pFrame = p->pFrame;
+    p->pFrame = pFrame->pParent;
+    p->nFrame--;
+    sqlite3VdbeSetChanges(db, p->nChange);
+    pc = sqlite3VdbeFrameRestore(pFrame);
+    if( pOp->p2==OE_Ignore ){
+      /* Instruction pc is the OP_Program that invoked the sub-program 
+      ** currently being halted. If the p2 instruction of this OP_Halt
+      ** instruction is set to OE_Ignore, then the sub-program is throwing
+      ** an IGNORE exception. In this case jump to the address specified
+      ** as the p2 of the calling OP_Program.  */
+      pc = p->aOp[pc].p2-1;
+    }
+    aOp = p->aOp;
+    aMem = p->aMem;
+    break;
+  }
+
+  p->rc = pOp->p1;
+  p->errorAction = (u8)pOp->p2;
+  p->pc = pc;
+  if( pOp->p4.z ){
+    assert( p->rc!=SQLITE_OK );
+    sqlite3SetString(&p->zErrMsg, db, "%s", pOp->p4.z);
+    testcase( sqlite3GlobalConfig.xLog!=0 );
+    sqlite3_log(pOp->p1, "abort at %d in [%s]: %s", pc, p->zSql, pOp->p4.z);
+  }else if( p->rc ){
+    testcase( sqlite3GlobalConfig.xLog!=0 );
+    sqlite3_log(pOp->p1, "constraint failed at %d in [%s]", pc, p->zSql);
+  }
+  rc = sqlite3VdbeHalt(p);
+  assert( rc==SQLITE_BUSY || rc==SQLITE_OK || rc==SQLITE_ERROR );
+  if( rc==SQLITE_BUSY ){
+    p->rc = rc = SQLITE_BUSY;
+  }else{
+    assert( rc==SQLITE_OK || p->rc==SQLITE_CONSTRAINT );
+    assert( rc==SQLITE_OK || db->nDeferredCons>0 );
+    rc = p->rc ? SQLITE_ERROR : SQLITE_DONE;
+  }
+  goto vdbe_return;
+}
+
+/* Opcode: Integer P1 P2 * * *
+**
+** The 32-bit integer value P1 is written into register P2.
+*/
+case OP_Integer: {         /* out2-prerelease */
+  pOut->u.i = pOp->p1;
+  break;
+}
+
+/* Opcode: Int64 * P2 * P4 *
+**
+** P4 is a pointer to a 64-bit integer value.
+** Write that value into register P2.
+*/
+case OP_Int64: {           /* out2-prerelease */
+  assert( pOp->p4.pI64!=0 );
+  pOut->u.i = *pOp->p4.pI64;
+  break;
+}
+
+#ifndef SQLITE_OMIT_FLOATING_POINT
+/* Opcode: Real * P2 * P4 *
+**
+** P4 is a pointer to a 64-bit floating point value.
+** Write that value into register P2.
+*/
+case OP_Real: {            /* same as TK_FLOAT, out2-prerelease */
+  pOut->flags = MEM_Real;
+  assert( !sqlite3IsNaN(*pOp->p4.pReal) );
+  pOut->r = *pOp->p4.pReal;
+  break;
+}
+#endif
+
+/* Opcode: String8 * P2 * P4 *
+**
+** P4 points to a nul terminated UTF-8 string. This opcode is transformed 
+** into an OP_String before it is executed for the first time.
+*/
+case OP_String8: {         /* same as TK_STRING, out2-prerelease */
+  assert( pOp->p4.z!=0 );
+  pOp->opcode = OP_String;
+  pOp->p1 = sqlite3Strlen30(pOp->p4.z);
+
+#ifndef SQLITE_OMIT_UTF16
+  if( encoding!=SQLITE_UTF8 ){
+    rc = sqlite3VdbeMemSetStr(pOut, pOp->p4.z, -1, SQLITE_UTF8, SQLITE_STATIC);
+    if( rc==SQLITE_TOOBIG ) goto too_big;
+    if( SQLITE_OK!=sqlite3VdbeChangeEncoding(pOut, encoding) ) goto no_mem;
+    assert( pOut->zMalloc==pOut->z );
+    assert( pOut->flags & MEM_Dyn );
+    pOut->zMalloc = 0;
+    pOut->flags |= MEM_Static;
+    pOut->flags &= ~MEM_Dyn;
+    if( pOp->p4type==P4_DYNAMIC ){
+      sqlite3DbFree(db, pOp->p4.z);
+    }
+    pOp->p4type = P4_DYNAMIC;
+    pOp->p4.z = pOut->z;
+    pOp->p1 = pOut->n;
+  }
+#endif
+  if( pOp->p1>db->aLimit[SQLITE_LIMIT_LENGTH] ){
+    goto too_big;
+  }
+  /* Fall through to the next case, OP_String */
+}
+  
+/* Opcode: String P1 P2 * P4 *
+**
+** The string value P4 of length P1 (bytes) is stored in register P2.
+*/
+case OP_String: {          /* out2-prerelease */
+  assert( pOp->p4.z!=0 );
+  pOut->flags = MEM_Str|MEM_Static|MEM_Term;
+  pOut->z = pOp->p4.z;
+  pOut->n = pOp->p1;
+  pOut->enc = encoding;
+  UPDATE_MAX_BLOBSIZE(pOut);
+  break;
+}
+
+/* Opcode: Null * P2 * * *
+**
+** Write a NULL into register P2.
+*/
+case OP_Null: {           /* out2-prerelease */
+  pOut->flags = MEM_Null;
+  break;
+}
+
+
+/* Opcode: Blob P1 P2 * P4
+**
+** P4 points to a blob of data P1 bytes long.  Store this
+** blob in register P2.
+*/
+case OP_Blob: {                /* out2-prerelease */
+  assert( pOp->p1 <= SQLITE_MAX_LENGTH );
+  sqlite3VdbeMemSetStr(pOut, pOp->p4.z, pOp->p1, 0, 0);
+  pOut->enc = encoding;
+  UPDATE_MAX_BLOBSIZE(pOut);
+  break;
+}
+
+/* Opcode: Variable P1 P2 * P4 *
+**
+** Transfer the values of bound parameter P1 into register P2
+**
+** If the parameter is named, then its name appears in P4 and P3==1.
+** The P4 value is used by sqlite3_bind_parameter_name().
+*/
+case OP_Variable: {            /* out2-prerelease */
+#if 0  /* local variables moved into u.ab */
+  Mem *pVar;       /* Value being transferred */
+#endif /* local variables moved into u.ab */
+
+  assert( pOp->p1>0 && pOp->p1<=p->nVar );
+  u.ab.pVar = &p->aVar[pOp->p1 - 1];
+  if( sqlite3VdbeMemTooBig(u.ab.pVar) ){
+    goto too_big;
+  }
+  sqlite3VdbeMemShallowCopy(pOut, u.ab.pVar, MEM_Static);
+  UPDATE_MAX_BLOBSIZE(pOut);
+  break;
+}
+
+/* Opcode: Move P1 P2 P3 * *
+**
+** Move the values in register P1..P1+P3-1 over into
+** registers P2..P2+P3-1.  Registers P1..P1+P1-1 are
+** left holding a NULL.  It is an error for register ranges
+** P1..P1+P3-1 and P2..P2+P3-1 to overlap.
+*/
+case OP_Move: {
+#if 0  /* local variables moved into u.ac */
+  char *zMalloc;   /* Holding variable for allocated memory */
+  int n;           /* Number of registers left to copy */
+  int p1;          /* Register to copy from */
+  int p2;          /* Register to copy to */
+#endif /* local variables moved into u.ac */
+
+  u.ac.n = pOp->p3;
+  u.ac.p1 = pOp->p1;
+  u.ac.p2 = pOp->p2;
+  assert( u.ac.n>0 && u.ac.p1>0 && u.ac.p2>0 );
+  assert( u.ac.p1+u.ac.n<=u.ac.p2 || u.ac.p2+u.ac.n<=u.ac.p1 );
+
+  pIn1 = &aMem[u.ac.p1];
+  pOut = &aMem[u.ac.p2];
+  while( u.ac.n-- ){
+    assert( pOut<=&aMem[p->nMem] );
+    assert( pIn1<=&aMem[p->nMem] );
+    assert( memIsValid(pIn1) );
+    memAboutToChange(p, pOut);
+    u.ac.zMalloc = pOut->zMalloc;
+    pOut->zMalloc = 0;
+    sqlite3VdbeMemMove(pOut, pIn1);
+    pIn1->zMalloc = u.ac.zMalloc;
+    REGISTER_TRACE(u.ac.p2++, pOut);
+    pIn1++;
+    pOut++;
+  }
+  break;
+}
+
+/* Opcode: Copy P1 P2 * * *
+**
+** Make a copy of register P1 into register P2.
+**
+** This instruction makes a deep copy of the value.  A duplicate
+** is made of any string or blob constant.  See also OP_SCopy.
+*/
+case OP_Copy: {             /* in1, out2 */
+  pIn1 = &aMem[pOp->p1];
+  pOut = &aMem[pOp->p2];
+  assert( pOut!=pIn1 );
+  sqlite3VdbeMemShallowCopy(pOut, pIn1, MEM_Ephem);
+  Deephemeralize(pOut);
+  REGISTER_TRACE(pOp->p2, pOut);
+  break;
+}
+
+/* Opcode: SCopy P1 P2 * * *
+**
+** Make a shallow copy of register P1 into register P2.
+**
+** This instruction makes a shallow copy of the value.  If the value
+** is a string or blob, then the copy is only a pointer to the
+** original and hence if the original changes so will the copy.
+** Worse, if the original is deallocated, the copy becomes invalid.
+** Thus the program must guarantee that the original will not change
+** during the lifetime of the copy.  Use OP_Copy to make a complete
+** copy.
+*/
+case OP_SCopy: {            /* in1, out2 */
+  pIn1 = &aMem[pOp->p1];
+  pOut = &aMem[pOp->p2];
+  assert( pOut!=pIn1 );
+  sqlite3VdbeMemShallowCopy(pOut, pIn1, MEM_Ephem);
+#ifdef SQLITE_DEBUG
+  if( pOut->pScopyFrom==0 ) pOut->pScopyFrom = pIn1;
+#endif
+  REGISTER_TRACE(pOp->p2, pOut);
+  break;
+}
+
+/* Opcode: ResultRow P1 P2 * * *
+**
+** The registers P1 through P1+P2-1 contain a single row of
+** results. This opcode causes the sqlite3_step() call to terminate
+** with an SQLITE_ROW return code and it sets up the sqlite3_stmt
+** structure to provide access to the top P1 values as the result
+** row.
+*/
+case OP_ResultRow: {
+#if 0  /* local variables moved into u.ad */
+  Mem *pMem;
+  int i;
+#endif /* local variables moved into u.ad */
+  assert( p->nResColumn==pOp->p2 );
+  assert( pOp->p1>0 );
+  assert( pOp->p1+pOp->p2<=p->nMem+1 );
+
+  /* If this statement has violated immediate foreign key constraints, do
+  ** not return the number of rows modified. And do not RELEASE the statement
+  ** transaction. It needs to be rolled back.  */
+  if( SQLITE_OK!=(rc = sqlite3VdbeCheckFk(p, 0)) ){
+    assert( db->flags&SQLITE_CountRows );
+    assert( p->usesStmtJournal );
+    break;
+  }
+
+  /* If the SQLITE_CountRows flag is set in sqlite3.flags mask, then
+  ** DML statements invoke this opcode to return the number of rows
+  ** modified to the user. This is the only way that a VM that
+  ** opens a statement transaction may invoke this opcode.
+  **
+  ** In case this is such a statement, close any statement transaction
+  ** opened by this VM before returning control to the user. This is to
+  ** ensure that statement-transactions are always nested, not overlapping.
+  ** If the open statement-transaction is not closed here, then the user
+  ** may step another VM that opens its own statement transaction. This
+  ** may lead to overlapping statement transactions.
+  **
+  ** The statement transaction is never a top-level transaction.  Hence
+  ** the RELEASE call below can never fail.
+  */
+  assert( p->iStatement==0 || db->flags&SQLITE_CountRows );
+  rc = sqlite3VdbeCloseStatement(p, SAVEPOINT_RELEASE);
+  if( NEVER(rc!=SQLITE_OK) ){
+    break;
+  }
+
+  /* Invalidate all ephemeral cursor row caches */
+  p->cacheCtr = (p->cacheCtr + 2)|1;
+
+  /* Make sure the results of the current row are \000 terminated
+  ** and have an assigned type.  The results are de-ephemeralized as
+  ** as side effect.
+  */
+  u.ad.pMem = p->pResultSet = &aMem[pOp->p1];
+  for(u.ad.i=0; u.ad.i<pOp->p2; u.ad.i++){
+    assert( memIsValid(&u.ad.pMem[u.ad.i]) );
+    Deephemeralize(&u.ad.pMem[u.ad.i]);
+    assert( (u.ad.pMem[u.ad.i].flags & MEM_Ephem)==0
+            || (u.ad.pMem[u.ad.i].flags & (MEM_Str|MEM_Blob))==0 );
+    sqlite3VdbeMemNulTerminate(&u.ad.pMem[u.ad.i]);
+    sqlite3VdbeMemStoreType(&u.ad.pMem[u.ad.i]);
+    REGISTER_TRACE(pOp->p1+u.ad.i, &u.ad.pMem[u.ad.i]);
+  }
+  if( db->mallocFailed ) goto no_mem;
+
+  /* Return SQLITE_ROW
+  */
+  p->pc = pc + 1;
+  rc = SQLITE_ROW;
+  goto vdbe_return;
+}
+
+/* Opcode: Concat P1 P2 P3 * *
+**
+** Add the text in register P1 onto the end of the text in
+** register P2 and store the result in register P3.
+** If either the P1 or P2 text are NULL then store NULL in P3.
+**
+**   P3 = P2 || P1
+**
+** It is illegal for P1 and P3 to be the same register. Sometimes,
+** if P3 is the same register as P2, the implementation is able
+** to avoid a memcpy().
+*/
+case OP_Concat: {           /* same as TK_CONCAT, in1, in2, out3 */
+#if 0  /* local variables moved into u.ae */
+  i64 nByte;
+#endif /* local variables moved into u.ae */
+
+  pIn1 = &aMem[pOp->p1];
+  pIn2 = &aMem[pOp->p2];
+  pOut = &aMem[pOp->p3];
+  assert( pIn1!=pOut );
+  if( (pIn1->flags | pIn2->flags) & MEM_Null ){
+    sqlite3VdbeMemSetNull(pOut);
+    break;
+  }
+  if( ExpandBlob(pIn1) || ExpandBlob(pIn2) ) goto no_mem;
+  Stringify(pIn1, encoding);
+  Stringify(pIn2, encoding);
+  u.ae.nByte = pIn1->n + pIn2->n;
+  if( u.ae.nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
+    goto too_big;
+  }
+  MemSetTypeFlag(pOut, MEM_Str);
+  if( sqlite3VdbeMemGrow(pOut, (int)u.ae.nByte+2, pOut==pIn2) ){
+    goto no_mem;
+  }
+  if( pOut!=pIn2 ){
+    memcpy(pOut->z, pIn2->z, pIn2->n);
+  }
+  memcpy(&pOut->z[pIn2->n], pIn1->z, pIn1->n);
+  pOut->z[u.ae.nByte] = 0;
+  pOut->z[u.ae.nByte+1] = 0;
+  pOut->flags |= MEM_Term;
+  pOut->n = (int)u.ae.nByte;
+  pOut->enc = encoding;
+  UPDATE_MAX_BLOBSIZE(pOut);
+  break;
+}
+
+/* Opcode: Add P1 P2 P3 * *
+**
+** Add the value in register P1 to the value in register P2
+** and store the result in register P3.
+** If either input is NULL, the result is NULL.
+*/
+/* Opcode: Multiply P1 P2 P3 * *
+**
+**
+** Multiply the value in register P1 by the value in register P2
+** and store the result in register P3.
+** If either input is NULL, the result is NULL.
+*/
+/* Opcode: Subtract P1 P2 P3 * *
+**
+** Subtract the value in register P1 from the value in register P2
+** and store the result in register P3.
+** If either input is NULL, the result is NULL.
+*/
+/* Opcode: Divide P1 P2 P3 * *
+**
+** Divide the value in register P1 by the value in register P2
+** and store the result in register P3 (P3=P2/P1). If the value in 
+** register P1 is zero, then the result is NULL. If either input is 
+** NULL, the result is NULL.
+*/
+/* Opcode: Remainder P1 P2 P3 * *
+**
+** Compute the remainder after integer division of the value in
+** register P1 by the value in register P2 and store the result in P3. 
+** If the value in register P2 is zero the result is NULL.
+** If either operand is NULL, the result is NULL.
+*/
+case OP_Add:                   /* same as TK_PLUS, in1, in2, out3 */
+case OP_Subtract:              /* same as TK_MINUS, in1, in2, out3 */
+case OP_Multiply:              /* same as TK_STAR, in1, in2, out3 */
+case OP_Divide:                /* same as TK_SLASH, in1, in2, out3 */
+case OP_Remainder: {           /* same as TK_REM, in1, in2, out3 */
+#if 0  /* local variables moved into u.af */
+  int flags;      /* Combined MEM_* flags from both inputs */
+  i64 iA;         /* Integer value of left operand */
+  i64 iB;         /* Integer value of right operand */
+  double rA;      /* Real value of left operand */
+  double rB;      /* Real value of right operand */
+#endif /* local variables moved into u.af */
+
+  pIn1 = &aMem[pOp->p1];
+  applyNumericAffinity(pIn1);
+  pIn2 = &aMem[pOp->p2];
+  applyNumericAffinity(pIn2);
+  pOut = &aMem[pOp->p3];
+  u.af.flags = pIn1->flags | pIn2->flags;
+  if( (u.af.flags & MEM_Null)!=0 ) goto arithmetic_result_is_null;
+  if( (pIn1->flags & pIn2->flags & MEM_Int)==MEM_Int ){
+    u.af.iA = pIn1->u.i;
+    u.af.iB = pIn2->u.i;
+    switch( pOp->opcode ){
+      case OP_Add:       if( sqlite3AddInt64(&u.af.iB,u.af.iA) ) goto fp_math;  break;
+      case OP_Subtract:  if( sqlite3SubInt64(&u.af.iB,u.af.iA) ) goto fp_math;  break;
+      case OP_Multiply:  if( sqlite3MulInt64(&u.af.iB,u.af.iA) ) goto fp_math;  break;
+      case OP_Divide: {
+        if( u.af.iA==0 ) goto arithmetic_result_is_null;
+        if( u.af.iA==-1 && u.af.iB==SMALLEST_INT64 ) goto fp_math;
+        u.af.iB /= u.af.iA;
+        break;
+      }
+      default: {
+        if( u.af.iA==0 ) goto arithmetic_result_is_null;
+        if( u.af.iA==-1 ) u.af.iA = 1;
+        u.af.iB %= u.af.iA;
+        break;
+      }
+    }
+    pOut->u.i = u.af.iB;
+    MemSetTypeFlag(pOut, MEM_Int);
+  }else{
+fp_math:
+    u.af.rA = sqlite3VdbeRealValue(pIn1);
+    u.af.rB = sqlite3VdbeRealValue(pIn2);
+    switch( pOp->opcode ){
+      case OP_Add:         u.af.rB += u.af.rA;       break;
+      case OP_Subtract:    u.af.rB -= u.af.rA;       break;
+      case OP_Multiply:    u.af.rB *= u.af.rA;       break;
+      case OP_Divide: {
+        /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
+        if( u.af.rA==(double)0 ) goto arithmetic_result_is_null;
+        u.af.rB /= u.af.rA;
+        break;
+      }
+      default: {
+        u.af.iA = (i64)u.af.rA;
+        u.af.iB = (i64)u.af.rB;
+        if( u.af.iA==0 ) goto arithmetic_result_is_null;
+        if( u.af.iA==-1 ) u.af.iA = 1;
+        u.af.rB = (double)(u.af.iB % u.af.iA);
+        break;
+      }
+    }
+#ifdef SQLITE_OMIT_FLOATING_POINT
+    pOut->u.i = u.af.rB;
+    MemSetTypeFlag(pOut, MEM_Int);
+#else
+    if( sqlite3IsNaN(u.af.rB) ){
+      goto arithmetic_result_is_null;
+    }
+    pOut->r = u.af.rB;
+    MemSetTypeFlag(pOut, MEM_Real);
+    if( (u.af.flags & MEM_Real)==0 ){
+      sqlite3VdbeIntegerAffinity(pOut);
+    }
+#endif
+  }
+  break;
+
+arithmetic_result_is_null:
+  sqlite3VdbeMemSetNull(pOut);
+  break;
+}
+
+/* Opcode: CollSeq * * P4
+**
+** P4 is a pointer to a CollSeq struct. If the next call to a user function
+** or aggregate calls sqlite3GetFuncCollSeq(), this collation sequence will
+** be returned. This is used by the built-in min(), max() and nullif()
+** functions.
+**
+** The interface used by the implementation of the aforementioned functions
+** to retrieve the collation sequence set by this opcode is not available
+** publicly, only to user functions defined in func.c.
+*/
+case OP_CollSeq: {
+  assert( pOp->p4type==P4_COLLSEQ );
+  break;
+}
+
+/* Opcode: Function P1 P2 P3 P4 P5
+**
+** Invoke a user function (P4 is a pointer to a Function structure that
+** defines the function) with P5 arguments taken from register P2 and
+** successors.  The result of the function is stored in register P3.
+** Register P3 must not be one of the function inputs.
+**
+** P1 is a 32-bit bitmask indicating whether or not each argument to the 
+** function was determined to be constant at compile time. If the first
+** argument was constant then bit 0 of P1 is set. This is used to determine
+** whether meta data associated with a user function argument using the
+** sqlite3_set_auxdata() API may be safely retained until the next
+** invocation of this opcode.
+**
+** See also: AggStep and AggFinal
+*/
+case OP_Function: {
+#if 0  /* local variables moved into u.ag */
+  int i;
+  Mem *pArg;
+  sqlite3_context ctx;
+  sqlite3_value **apVal;
+  int n;
+#endif /* local variables moved into u.ag */
+
+  u.ag.n = pOp->p5;
+  u.ag.apVal = p->apArg;
+  assert( u.ag.apVal || u.ag.n==0 );
+  assert( pOp->p3>0 && pOp->p3<=p->nMem );
+  pOut = &aMem[pOp->p3];
+  memAboutToChange(p, pOut);
+
+  assert( u.ag.n==0 || (pOp->p2>0 && pOp->p2+u.ag.n<=p->nMem+1) );
+  assert( pOp->p3<pOp->p2 || pOp->p3>=pOp->p2+u.ag.n );
+  u.ag.pArg = &aMem[pOp->p2];
+  for(u.ag.i=0; u.ag.i<u.ag.n; u.ag.i++, u.ag.pArg++){
+    assert( memIsValid(u.ag.pArg) );
+    u.ag.apVal[u.ag.i] = u.ag.pArg;
+    Deephemeralize(u.ag.pArg);
+    sqlite3VdbeMemStoreType(u.ag.pArg);
+    REGISTER_TRACE(pOp->p2+u.ag.i, u.ag.pArg);
+  }
+
+  assert( pOp->p4type==P4_FUNCDEF || pOp->p4type==P4_VDBEFUNC );
+  if( pOp->p4type==P4_FUNCDEF ){
+    u.ag.ctx.pFunc = pOp->p4.pFunc;
+    u.ag.ctx.pVdbeFunc = 0;
+  }else{
+    u.ag.ctx.pVdbeFunc = (VdbeFunc*)pOp->p4.pVdbeFunc;
+    u.ag.ctx.pFunc = u.ag.ctx.pVdbeFunc->pFunc;
+  }
+
+  u.ag.ctx.s.flags = MEM_Null;
+  u.ag.ctx.s.db = db;
+  u.ag.ctx.s.xDel = 0;
+  u.ag.ctx.s.zMalloc = 0;
+
+  /* The output cell may already have a buffer allocated. Move
+  ** the pointer to u.ag.ctx.s so in case the user-function can use
+  ** the already allocated buffer instead of allocating a new one.
+  */
+  sqlite3VdbeMemMove(&u.ag.ctx.s, pOut);
+  MemSetTypeFlag(&u.ag.ctx.s, MEM_Null);
+
+  u.ag.ctx.isError = 0;
+  if( u.ag.ctx.pFunc->flags & SQLITE_FUNC_NEEDCOLL ){
+    assert( pOp>aOp );
+    assert( pOp[-1].p4type==P4_COLLSEQ );
+    assert( pOp[-1].opcode==OP_CollSeq );
+    u.ag.ctx.pColl = pOp[-1].p4.pColl;
+  }
+  (*u.ag.ctx.pFunc->xFunc)(&u.ag.ctx, u.ag.n, u.ag.apVal); /* IMP: R-24505-23230 */
+  if( db->mallocFailed ){
+    /* Even though a malloc() has failed, the implementation of the
+    ** user function may have called an sqlite3_result_XXX() function
+    ** to return a value. The following call releases any resources
+    ** associated with such a value.
+    */
+    sqlite3VdbeMemRelease(&u.ag.ctx.s);
+    goto no_mem;
+  }
+
+  /* If any auxiliary data functions have been called by this user function,
+  ** immediately call the destructor for any non-static values.
+  */
+  if( u.ag.ctx.pVdbeFunc ){
+    sqlite3VdbeDeleteAuxData(u.ag.ctx.pVdbeFunc, pOp->p1);
+    pOp->p4.pVdbeFunc = u.ag.ctx.pVdbeFunc;
+    pOp->p4type = P4_VDBEFUNC;
+  }
+
+  /* If the function returned an error, throw an exception */
+  if( u.ag.ctx.isError ){
+    sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(&u.ag.ctx.s));
+    rc = u.ag.ctx.isError;
+  }
+
+  /* Copy the result of the function into register P3 */
+  sqlite3VdbeChangeEncoding(&u.ag.ctx.s, encoding);
+  sqlite3VdbeMemMove(pOut, &u.ag.ctx.s);
+  if( sqlite3VdbeMemTooBig(pOut) ){
+    goto too_big;
+  }
+
+#if 0
+  /* The app-defined function has done something that as caused this
+  ** statement to expire.  (Perhaps the function called sqlite3_exec()
+  ** with a CREATE TABLE statement.)
+  */
+  if( p->expired ) rc = SQLITE_ABORT;
+#endif
+
+  REGISTER_TRACE(pOp->p3, pOut);
+  UPDATE_MAX_BLOBSIZE(pOut);
+  break;
+}
+
+/* Opcode: BitAnd P1 P2 P3 * *
+**
+** Take the bit-wise AND of the values in register P1 and P2 and
+** store the result in register P3.
+** If either input is NULL, the result is NULL.
+*/
+/* Opcode: BitOr P1 P2 P3 * *
+**
+** Take the bit-wise OR of the values in register P1 and P2 and
+** store the result in register P3.
+** If either input is NULL, the result is NULL.
+*/
+/* Opcode: ShiftLeft P1 P2 P3 * *
+**
+** Shift the integer value in register P2 to the left by the
+** number of bits specified by the integer in register P1.
+** Store the result in register P3.
+** If either input is NULL, the result is NULL.
+*/
+/* Opcode: ShiftRight P1 P2 P3 * *
+**
+** Shift the integer value in register P2 to the right by the
+** number of bits specified by the integer in register P1.
+** Store the result in register P3.
+** If either input is NULL, the result is NULL.
+*/
+case OP_BitAnd:                 /* same as TK_BITAND, in1, in2, out3 */
+case OP_BitOr:                  /* same as TK_BITOR, in1, in2, out3 */
+case OP_ShiftLeft:              /* same as TK_LSHIFT, in1, in2, out3 */
+case OP_ShiftRight: {           /* same as TK_RSHIFT, in1, in2, out3 */
+#if 0  /* local variables moved into u.ah */
+  i64 iA;
+  u64 uA;
+  i64 iB;
+  u8 op;
+#endif /* local variables moved into u.ah */
+
+  pIn1 = &aMem[pOp->p1];
+  pIn2 = &aMem[pOp->p2];
+  pOut = &aMem[pOp->p3];
+  if( (pIn1->flags | pIn2->flags) & MEM_Null ){
+    sqlite3VdbeMemSetNull(pOut);
+    break;
+  }
+  u.ah.iA = sqlite3VdbeIntValue(pIn2);
+  u.ah.iB = sqlite3VdbeIntValue(pIn1);
+  u.ah.op = pOp->opcode;
+  if( u.ah.op==OP_BitAnd ){
+    u.ah.iA &= u.ah.iB;
+  }else if( u.ah.op==OP_BitOr ){
+    u.ah.iA |= u.ah.iB;
+  }else if( u.ah.iB!=0 ){
+    assert( u.ah.op==OP_ShiftRight || u.ah.op==OP_ShiftLeft );
+
+    /* If shifting by a negative amount, shift in the other direction */
+    if( u.ah.iB<0 ){
+      assert( OP_ShiftRight==OP_ShiftLeft+1 );
+      u.ah.op = 2*OP_ShiftLeft + 1 - u.ah.op;
+      u.ah.iB = u.ah.iB>(-64) ? -u.ah.iB : 64;
+    }
+
+    if( u.ah.iB>=64 ){
+      u.ah.iA = (u.ah.iA>=0 || u.ah.op==OP_ShiftLeft) ? 0 : -1;
+    }else{
+      memcpy(&u.ah.uA, &u.ah.iA, sizeof(u.ah.uA));
+      if( u.ah.op==OP_ShiftLeft ){
+        u.ah.uA <<= u.ah.iB;
+      }else{
+        u.ah.uA >>= u.ah.iB;
+        /* Sign-extend on a right shift of a negative number */
+        if( u.ah.iA<0 ) u.ah.uA |= ((((u64)0xffffffff)<<32)|0xffffffff) << (64-u.ah.iB);
+      }
+      memcpy(&u.ah.iA, &u.ah.uA, sizeof(u.ah.iA));
+    }
+  }
+  pOut->u.i = u.ah.iA;
+  MemSetTypeFlag(pOut, MEM_Int);
+  break;
+}
+
+/* Opcode: AddImm  P1 P2 * * *
+** 
+** Add the constant P2 to the value in register P1.
+** The result is always an integer.
+**
+** To force any register to be an integer, just add 0.
+*/
+case OP_AddImm: {            /* in1 */
+  pIn1 = &aMem[pOp->p1];
+  memAboutToChange(p, pIn1);
+  sqlite3VdbeMemIntegerify(pIn1);
+  pIn1->u.i += pOp->p2;
+  break;
+}
+
+/* Opcode: MustBeInt P1 P2 * * *
+** 
+** Force the value in register P1 to be an integer.  If the value
+** in P1 is not an integer and cannot be converted into an integer
+** without data loss, then jump immediately to P2, or if P2==0
+** raise an SQLITE_MISMATCH exception.
+*/
+case OP_MustBeInt: {            /* jump, in1 */
+  pIn1 = &aMem[pOp->p1];
+  applyAffinity(pIn1, SQLITE_AFF_NUMERIC, encoding);
+  if( (pIn1->flags & MEM_Int)==0 ){
+    if( pOp->p2==0 ){
+      rc = SQLITE_MISMATCH;
+      goto abort_due_to_error;
+    }else{
+      pc = pOp->p2 - 1;
+    }
+  }else{
+    MemSetTypeFlag(pIn1, MEM_Int);
+  }
+  break;
+}
+
+#ifndef SQLITE_OMIT_FLOATING_POINT
+/* Opcode: RealAffinity P1 * * * *
+**
+** If register P1 holds an integer convert it to a real value.
+**
+** This opcode is used when extracting information from a column that
+** has REAL affinity.  Such column values may still be stored as
+** integers, for space efficiency, but after extraction we want them
+** to have only a real value.
+*/
+case OP_RealAffinity: {                  /* in1 */
+  pIn1 = &aMem[pOp->p1];
+  if( pIn1->flags & MEM_Int ){
+    sqlite3VdbeMemRealify(pIn1);
+  }
+  break;
+}
+#endif
+
+#ifndef SQLITE_OMIT_CAST
+/* Opcode: ToText P1 * * * *
+**
+** Force the value in register P1 to be text.
+** If the value is numeric, convert it to a string using the
+** equivalent of printf().  Blob values are unchanged and
+** are afterwards simply interpreted as text.
+**
+** A NULL value is not changed by this routine.  It remains NULL.
+*/
+case OP_ToText: {                  /* same as TK_TO_TEXT, in1 */
+  pIn1 = &aMem[pOp->p1];
+  memAboutToChange(p, pIn1);
+  if( pIn1->flags & MEM_Null ) break;
+  assert( MEM_Str==(MEM_Blob>>3) );
+  pIn1->flags |= (pIn1->flags&MEM_Blob)>>3;
+  applyAffinity(pIn1, SQLITE_AFF_TEXT, encoding);
+  rc = ExpandBlob(pIn1);
+  assert( pIn1->flags & MEM_Str || db->mallocFailed );
+  pIn1->flags &= ~(MEM_Int|MEM_Real|MEM_Blob|MEM_Zero);
+  UPDATE_MAX_BLOBSIZE(pIn1);
+  break;
+}
+
+/* Opcode: ToBlob P1 * * * *
+**
+** Force the value in register P1 to be a BLOB.
+** If the value is numeric, convert it to a string first.
+** Strings are simply reinterpreted as blobs with no change
+** to the underlying data.
+**
+** A NULL value is not changed by this routine.  It remains NULL.
+*/
+case OP_ToBlob: {                  /* same as TK_TO_BLOB, in1 */
+  pIn1 = &aMem[pOp->p1];
+  if( pIn1->flags & MEM_Null ) break;
+  if( (pIn1->flags & MEM_Blob)==0 ){
+    applyAffinity(pIn1, SQLITE_AFF_TEXT, encoding);
+    assert( pIn1->flags & MEM_Str || db->mallocFailed );
+    MemSetTypeFlag(pIn1, MEM_Blob);
+  }else{
+    pIn1->flags &= ~(MEM_TypeMask&~MEM_Blob);
+  }
+  UPDATE_MAX_BLOBSIZE(pIn1);
+  break;
+}
+
+/* Opcode: ToNumeric P1 * * * *
+**
+** Force the value in register P1 to be numeric (either an
+** integer or a floating-point number.)
+** If the value is text or blob, try to convert it to an using the
+** equivalent of atoi() or atof() and store 0 if no such conversion 
+** is possible.
+**
+** A NULL value is not changed by this routine.  It remains NULL.
+*/
+case OP_ToNumeric: {                  /* same as TK_TO_NUMERIC, in1 */
+  pIn1 = &aMem[pOp->p1];
+  sqlite3VdbeMemNumerify(pIn1);
+  break;
+}
+#endif /* SQLITE_OMIT_CAST */
+
+/* Opcode: ToInt P1 * * * *
+**
+** Force the value in register P1 to be an integer.  If
+** The value is currently a real number, drop its fractional part.
+** If the value is text or blob, try to convert it to an integer using the
+** equivalent of atoi() and store 0 if no such conversion is possible.
+**
+** A NULL value is not changed by this routine.  It remains NULL.
+*/
+case OP_ToInt: {                  /* same as TK_TO_INT, in1 */
+  pIn1 = &aMem[pOp->p1];
+  if( (pIn1->flags & MEM_Null)==0 ){
+    sqlite3VdbeMemIntegerify(pIn1);
+  }
+  break;
+}
+
+#if !defined(SQLITE_OMIT_CAST) && !defined(SQLITE_OMIT_FLOATING_POINT)
+/* Opcode: ToReal P1 * * * *
+**
+** Force the value in register P1 to be a floating point number.
+** If The value is currently an integer, convert it.
+** If the value is text or blob, try to convert it to an integer using the
+** equivalent of atoi() and store 0.0 if no such conversion is possible.
+**
+** A NULL value is not changed by this routine.  It remains NULL.
+*/
+case OP_ToReal: {                  /* same as TK_TO_REAL, in1 */
+  pIn1 = &aMem[pOp->p1];
+  memAboutToChange(p, pIn1);
+  if( (pIn1->flags & MEM_Null)==0 ){
+    sqlite3VdbeMemRealify(pIn1);
+  }
+  break;
+}
+#endif /* !defined(SQLITE_OMIT_CAST) && !defined(SQLITE_OMIT_FLOATING_POINT) */
+
+/* Opcode: Lt P1 P2 P3 P4 P5
+**
+** Compare the values in register P1 and P3.  If reg(P3)<reg(P1) then
+** jump to address P2.  
+**
+** If the SQLITE_JUMPIFNULL bit of P5 is set and either reg(P1) or
+** reg(P3) is NULL then take the jump.  If the SQLITE_JUMPIFNULL 
+** bit is clear then fall through if either operand is NULL.
+**
+** The SQLITE_AFF_MASK portion of P5 must be an affinity character -
+** SQLITE_AFF_TEXT, SQLITE_AFF_INTEGER, and so forth. An attempt is made 
+** to coerce both inputs according to this affinity before the
+** comparison is made. If the SQLITE_AFF_MASK is 0x00, then numeric
+** affinity is used. Note that the affinity conversions are stored
+** back into the input registers P1 and P3.  So this opcode can cause
+** persistent changes to registers P1 and P3.
+**
+** Once any conversions have taken place, and neither value is NULL, 
+** the values are compared. If both values are blobs then memcmp() is
+** used to determine the results of the comparison.  If both values
+** are text, then the appropriate collating function specified in
+** P4 is  used to do the comparison.  If P4 is not specified then
+** memcmp() is used to compare text string.  If both values are
+** numeric, then a numeric comparison is used. If the two values
+** are of different types, then numbers are considered less than
+** strings and strings are considered less than blobs.
+**
+** If the SQLITE_STOREP2 bit of P5 is set, then do not jump.  Instead,
+** store a boolean result (either 0, or 1, or NULL) in register P2.
+*/
+/* Opcode: Ne P1 P2 P3 P4 P5
+**
+** This works just like the Lt opcode except that the jump is taken if
+** the operands in registers P1 and P3 are not equal.  See the Lt opcode for
+** additional information.
+**
+** If SQLITE_NULLEQ is set in P5 then the result of comparison is always either
+** true or false and is never NULL.  If both operands are NULL then the result
+** of comparison is false.  If either operand is NULL then the result is true.
+** If neither operand is NULL the the result is the same as it would be if
+** the SQLITE_NULLEQ flag were omitted from P5.
+*/
+/* Opcode: Eq P1 P2 P3 P4 P5
+**
+** This works just like the Lt opcode except that the jump is taken if
+** the operands in registers P1 and P3 are equal.
+** See the Lt opcode for additional information.
+**
+** If SQLITE_NULLEQ is set in P5 then the result of comparison is always either
+** true or false and is never NULL.  If both operands are NULL then the result
+** of comparison is true.  If either operand is NULL then the result is false.
+** If neither operand is NULL the the result is the same as it would be if
+** the SQLITE_NULLEQ flag were omitted from P5.
+*/
+/* Opcode: Le P1 P2 P3 P4 P5
+**
+** This works just like the Lt opcode except that the jump is taken if
+** the content of register P3 is less than or equal to the content of
+** register P1.  See the Lt opcode for additional information.
+*/
+/* Opcode: Gt P1 P2 P3 P4 P5
+**
+** This works just like the Lt opcode except that the jump is taken if
+** the content of register P3 is greater than the content of
+** register P1.  See the Lt opcode for additional information.
+*/
+/* Opcode: Ge P1 P2 P3 P4 P5
+**
+** This works just like the Lt opcode except that the jump is taken if
+** the content of register P3 is greater than or equal to the content of
+** register P1.  See the Lt opcode for additional information.
+*/
+case OP_Eq:               /* same as TK_EQ, jump, in1, in3 */
+case OP_Ne:               /* same as TK_NE, jump, in1, in3 */
+case OP_Lt:               /* same as TK_LT, jump, in1, in3 */
+case OP_Le:               /* same as TK_LE, jump, in1, in3 */
+case OP_Gt:               /* same as TK_GT, jump, in1, in3 */
+case OP_Ge: {             /* same as TK_GE, jump, in1, in3 */
+#if 0  /* local variables moved into u.ai */
+  int res;            /* Result of the comparison of pIn1 against pIn3 */
+  char affinity;      /* Affinity to use for comparison */
+  u16 flags1;         /* Copy of initial value of pIn1->flags */
+  u16 flags3;         /* Copy of initial value of pIn3->flags */
+#endif /* local variables moved into u.ai */
+
+  pIn1 = &aMem[pOp->p1];
+  pIn3 = &aMem[pOp->p3];
+  u.ai.flags1 = pIn1->flags;
+  u.ai.flags3 = pIn3->flags;
+  if( (pIn1->flags | pIn3->flags)&MEM_Null ){
+    /* One or both operands are NULL */
+    if( pOp->p5 & SQLITE_NULLEQ ){
+      /* If SQLITE_NULLEQ is set (which will only happen if the operator is
+      ** OP_Eq or OP_Ne) then take the jump or not depending on whether
+      ** or not both operands are null.
+      */
+      assert( pOp->opcode==OP_Eq || pOp->opcode==OP_Ne );
+      u.ai.res = (pIn1->flags & pIn3->flags & MEM_Null)==0;
+    }else{
+      /* SQLITE_NULLEQ is clear and at least one operand is NULL,
+      ** then the result is always NULL.
+      ** The jump is taken if the SQLITE_JUMPIFNULL bit is set.
+      */
+      if( pOp->p5 & SQLITE_STOREP2 ){
+        pOut = &aMem[pOp->p2];
+        MemSetTypeFlag(pOut, MEM_Null);
+        REGISTER_TRACE(pOp->p2, pOut);
+      }else if( pOp->p5 & SQLITE_JUMPIFNULL ){
+        pc = pOp->p2-1;
+      }
+      break;
+    }
+  }else{
+    /* Neither operand is NULL.  Do a comparison. */
+    u.ai.affinity = pOp->p5 & SQLITE_AFF_MASK;
+    if( u.ai.affinity ){
+      applyAffinity(pIn1, u.ai.affinity, encoding);
+      applyAffinity(pIn3, u.ai.affinity, encoding);
+      if( db->mallocFailed ) goto no_mem;
+    }
+
+    assert( pOp->p4type==P4_COLLSEQ || pOp->p4.pColl==0 );
+    ExpandBlob(pIn1);
+    ExpandBlob(pIn3);
+    u.ai.res = sqlite3MemCompare(pIn3, pIn1, pOp->p4.pColl);
+  }
+  switch( pOp->opcode ){
+    case OP_Eq:    u.ai.res = u.ai.res==0;     break;
+    case OP_Ne:    u.ai.res = u.ai.res!=0;     break;
+    case OP_Lt:    u.ai.res = u.ai.res<0;      break;
+    case OP_Le:    u.ai.res = u.ai.res<=0;     break;
+    case OP_Gt:    u.ai.res = u.ai.res>0;      break;
+    default:       u.ai.res = u.ai.res>=0;     break;
+  }
+
+  if( pOp->p5 & SQLITE_STOREP2 ){
+    pOut = &aMem[pOp->p2];
+    memAboutToChange(p, pOut);
+    MemSetTypeFlag(pOut, MEM_Int);
+    pOut->u.i = u.ai.res;
+    REGISTER_TRACE(pOp->p2, pOut);
+  }else if( u.ai.res ){
+    pc = pOp->p2-1;
+  }
+
+  /* Undo any changes made by applyAffinity() to the input registers. */
+  pIn1->flags = (pIn1->flags&~MEM_TypeMask) | (u.ai.flags1&MEM_TypeMask);
+  pIn3->flags = (pIn3->flags&~MEM_TypeMask) | (u.ai.flags3&MEM_TypeMask);
+  break;
+}
+
+/* Opcode: Permutation * * * P4 *
+**
+** Set the permutation used by the OP_Compare operator to be the array
+** of integers in P4.
+**
+** The permutation is only valid until the next OP_Permutation, OP_Compare,
+** OP_Halt, or OP_ResultRow.  Typically the OP_Permutation should occur
+** immediately prior to the OP_Compare.
+*/
+case OP_Permutation: {
+  assert( pOp->p4type==P4_INTARRAY );
+  assert( pOp->p4.ai );
+  aPermute = pOp->p4.ai;
+  break;
+}
+
+/* Opcode: Compare P1 P2 P3 P4 *
+**
+** Compare two vectors of registers in reg(P1)..reg(P1+P3-1) (call this
+** vector "A") and in reg(P2)..reg(P2+P3-1) ("B").  Save the result of
+** the comparison for use by the next OP_Jump instruct.
+**
+** P4 is a KeyInfo structure that defines collating sequences and sort
+** orders for the comparison.  The permutation applies to registers
+** only.  The KeyInfo elements are used sequentially.
+**
+** The comparison is a sort comparison, so NULLs compare equal,
+** NULLs are less than numbers, numbers are less than strings,
+** and strings are less than blobs.
+*/
+case OP_Compare: {
+#if 0  /* local variables moved into u.aj */
+  int n;
+  int i;
+  int p1;
+  int p2;
+  const KeyInfo *pKeyInfo;
+  int idx;
+  CollSeq *pColl;    /* Collating sequence to use on this term */
+  int bRev;          /* True for DESCENDING sort order */
+#endif /* local variables moved into u.aj */
+
+  u.aj.n = pOp->p3;
+  u.aj.pKeyInfo = pOp->p4.pKeyInfo;
+  assert( u.aj.n>0 );
+  assert( u.aj.pKeyInfo!=0 );
+  u.aj.p1 = pOp->p1;
+  u.aj.p2 = pOp->p2;
+#if SQLITE_DEBUG
+  if( aPermute ){
+    int k, mx = 0;
+    for(k=0; k<u.aj.n; k++) if( aPermute[k]>mx ) mx = aPermute[k];
+    assert( u.aj.p1>0 && u.aj.p1+mx<=p->nMem+1 );
+    assert( u.aj.p2>0 && u.aj.p2+mx<=p->nMem+1 );
+  }else{
+    assert( u.aj.p1>0 && u.aj.p1+u.aj.n<=p->nMem+1 );
+    assert( u.aj.p2>0 && u.aj.p2+u.aj.n<=p->nMem+1 );
+  }
+#endif /* SQLITE_DEBUG */
+  for(u.aj.i=0; u.aj.i<u.aj.n; u.aj.i++){
+    u.aj.idx = aPermute ? aPermute[u.aj.i] : u.aj.i;
+    assert( memIsValid(&aMem[u.aj.p1+u.aj.idx]) );
+    assert( memIsValid(&aMem[u.aj.p2+u.aj.idx]) );
+    REGISTER_TRACE(u.aj.p1+u.aj.idx, &aMem[u.aj.p1+u.aj.idx]);
+    REGISTER_TRACE(u.aj.p2+u.aj.idx, &aMem[u.aj.p2+u.aj.idx]);
+    assert( u.aj.i<u.aj.pKeyInfo->nField );
+    u.aj.pColl = u.aj.pKeyInfo->aColl[u.aj.i];
+    u.aj.bRev = u.aj.pKeyInfo->aSortOrder[u.aj.i];
+    iCompare = sqlite3MemCompare(&aMem[u.aj.p1+u.aj.idx], &aMem[u.aj.p2+u.aj.idx], u.aj.pColl);
+    if( iCompare ){
+      if( u.aj.bRev ) iCompare = -iCompare;
+      break;
+    }
+  }
+  aPermute = 0;
+  break;
+}
+
+/* Opcode: Jump P1 P2 P3 * *
+**
+** Jump to the instruction at address P1, P2, or P3 depending on whether
+** in the most recent OP_Compare instruction the P1 vector was less than
+** equal to, or greater than the P2 vector, respectively.
+*/
+case OP_Jump: {             /* jump */
+  if( iCompare<0 ){
+    pc = pOp->p1 - 1;
+  }else if( iCompare==0 ){
+    pc = pOp->p2 - 1;
+  }else{
+    pc = pOp->p3 - 1;
+  }
+  break;
+}
+
+/* Opcode: And P1 P2 P3 * *
+**
+** Take the logical AND of the values in registers P1 and P2 and
+** write the result into register P3.
+**
+** If either P1 or P2 is 0 (false) then the result is 0 even if
+** the other input is NULL.  A NULL and true or two NULLs give
+** a NULL output.
+*/
+/* Opcode: Or P1 P2 P3 * *
+**
+** Take the logical OR of the values in register P1 and P2 and
+** store the answer in register P3.
+**
+** If either P1 or P2 is nonzero (true) then the result is 1 (true)
+** even if the other input is NULL.  A NULL and false or two NULLs
+** give a NULL output.
+*/
+case OP_And:              /* same as TK_AND, in1, in2, out3 */
+case OP_Or: {             /* same as TK_OR, in1, in2, out3 */
+#if 0  /* local variables moved into u.ak */
+  int v1;    /* Left operand:  0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */
+  int v2;    /* Right operand: 0==FALSE, 1==TRUE, 2==UNKNOWN or NULL */
+#endif /* local variables moved into u.ak */
+
+  pIn1 = &aMem[pOp->p1];
+  if( pIn1->flags & MEM_Null ){
+    u.ak.v1 = 2;
+  }else{
+    u.ak.v1 = sqlite3VdbeIntValue(pIn1)!=0;
+  }
+  pIn2 = &aMem[pOp->p2];
+  if( pIn2->flags & MEM_Null ){
+    u.ak.v2 = 2;
+  }else{
+    u.ak.v2 = sqlite3VdbeIntValue(pIn2)!=0;
+  }
+  if( pOp->opcode==OP_And ){
+    static const unsigned char and_logic[] = { 0, 0, 0, 0, 1, 2, 0, 2, 2 };
+    u.ak.v1 = and_logic[u.ak.v1*3+u.ak.v2];
+  }else{
+    static const unsigned char or_logic[] = { 0, 1, 2, 1, 1, 1, 2, 1, 2 };
+    u.ak.v1 = or_logic[u.ak.v1*3+u.ak.v2];
+  }
+  pOut = &aMem[pOp->p3];
+  if( u.ak.v1==2 ){
+    MemSetTypeFlag(pOut, MEM_Null);
+  }else{
+    pOut->u.i = u.ak.v1;
+    MemSetTypeFlag(pOut, MEM_Int);
+  }
+  break;
+}
+
+/* Opcode: Not P1 P2 * * *
+**
+** Interpret the value in register P1 as a boolean value.  Store the
+** boolean complement in register P2.  If the value in register P1 is 
+** NULL, then a NULL is stored in P2.
+*/
+case OP_Not: {                /* same as TK_NOT, in1, out2 */
+  pIn1 = &aMem[pOp->p1];
+  pOut = &aMem[pOp->p2];
+  if( pIn1->flags & MEM_Null ){
+    sqlite3VdbeMemSetNull(pOut);
+  }else{
+    sqlite3VdbeMemSetInt64(pOut, !sqlite3VdbeIntValue(pIn1));
+  }
+  break;
+}
+
+/* Opcode: BitNot P1 P2 * * *
+**
+** Interpret the content of register P1 as an integer.  Store the
+** ones-complement of the P1 value into register P2.  If P1 holds
+** a NULL then store a NULL in P2.
+*/
+case OP_BitNot: {             /* same as TK_BITNOT, in1, out2 */
+  pIn1 = &aMem[pOp->p1];
+  pOut = &aMem[pOp->p2];
+  if( pIn1->flags & MEM_Null ){
+    sqlite3VdbeMemSetNull(pOut);
+  }else{
+    sqlite3VdbeMemSetInt64(pOut, ~sqlite3VdbeIntValue(pIn1));
+  }
+  break;
+}
+
+/* Opcode: If P1 P2 P3 * *
+**
+** Jump to P2 if the value in register P1 is true.  The value is
+** is considered true if it is numeric and non-zero.  If the value
+** in P1 is NULL then take the jump if P3 is true.
+*/
+/* Opcode: IfNot P1 P2 P3 * *
+**
+** Jump to P2 if the value in register P1 is False.  The value is
+** is considered true if it has a numeric value of zero.  If the value
+** in P1 is NULL then take the jump if P3 is true.
+*/
+case OP_If:                 /* jump, in1 */
+case OP_IfNot: {            /* jump, in1 */
+#if 0  /* local variables moved into u.al */
+  int c;
+#endif /* local variables moved into u.al */
+  pIn1 = &aMem[pOp->p1];
+  if( pIn1->flags & MEM_Null ){
+    u.al.c = pOp->p3;
+  }else{
+#ifdef SQLITE_OMIT_FLOATING_POINT
+    u.al.c = sqlite3VdbeIntValue(pIn1)!=0;
+#else
+    u.al.c = sqlite3VdbeRealValue(pIn1)!=0.0;
+#endif
+    if( pOp->opcode==OP_IfNot ) u.al.c = !u.al.c;
+  }
+  if( u.al.c ){
+    pc = pOp->p2-1;
+  }
+  break;
+}
+
+/* Opcode: IsNull P1 P2 * * *
+**
+** Jump to P2 if the value in register P1 is NULL.
+*/
+case OP_IsNull: {            /* same as TK_ISNULL, jump, in1 */
+  pIn1 = &aMem[pOp->p1];
+  if( (pIn1->flags & MEM_Null)!=0 ){
+    pc = pOp->p2 - 1;
+  }
+  break;
+}
+
+/* Opcode: NotNull P1 P2 * * *
+**
+** Jump to P2 if the value in register P1 is not NULL.  
+*/
+case OP_NotNull: {            /* same as TK_NOTNULL, jump, in1 */
+  pIn1 = &aMem[pOp->p1];
+  if( (pIn1->flags & MEM_Null)==0 ){
+    pc = pOp->p2 - 1;
+  }
+  break;
+}
+
+/* Opcode: Column P1 P2 P3 P4 P5
+**
+** Interpret the data that cursor P1 points to as a structure built using
+** the MakeRecord instruction.  (See the MakeRecord opcode for additional
+** information about the format of the data.)  Extract the P2-th column
+** from this record.  If there are less that (P2+1) 
+** values in the record, extract a NULL.
+**
+** The value extracted is stored in register P3.
+**
+** If the column contains fewer than P2 fields, then extract a NULL.  Or,
+** if the P4 argument is a P4_MEM use the value of the P4 argument as
+** the result.
+**
+** If the OPFLAG_CLEARCACHE bit is set on P5 and P1 is a pseudo-table cursor,
+** then the cache of the cursor is reset prior to extracting the column.
+** The first OP_Column against a pseudo-table after the value of the content
+** register has changed should have this bit set.
+*/
+case OP_Column: {
+#if 0  /* local variables moved into u.am */
+  u32 payloadSize;   /* Number of bytes in the record */
+  i64 payloadSize64; /* Number of bytes in the record */
+  int p1;            /* P1 value of the opcode */
+  int p2;            /* column number to retrieve */
+  VdbeCursor *pC;    /* The VDBE cursor */
+  char *zRec;        /* Pointer to complete record-data */
+  BtCursor *pCrsr;   /* The BTree cursor */
+  u32 *aType;        /* aType[i] holds the numeric type of the i-th column */
+  u32 *aOffset;      /* aOffset[i] is offset to start of data for i-th column */
+  int nField;        /* number of fields in the record */
+  int len;           /* The length of the serialized data for the column */
+  int i;             /* Loop counter */
+  char *zData;       /* Part of the record being decoded */
+  Mem *pDest;        /* Where to write the extracted value */
+  Mem sMem;          /* For storing the record being decoded */
+  u8 *zIdx;          /* Index into header */
+  u8 *zEndHdr;       /* Pointer to first byte after the header */
+  u32 offset;        /* Offset into the data */
+  u32 szField;       /* Number of bytes in the content of a field */
+  int szHdr;         /* Size of the header size field at start of record */
+  int avail;         /* Number of bytes of available data */
+  Mem *pReg;         /* PseudoTable input register */
+#endif /* local variables moved into u.am */
+
+
+  u.am.p1 = pOp->p1;
+  u.am.p2 = pOp->p2;
+  u.am.pC = 0;
+  memset(&u.am.sMem, 0, sizeof(u.am.sMem));
+  assert( u.am.p1<p->nCursor );
+  assert( pOp->p3>0 && pOp->p3<=p->nMem );
+  u.am.pDest = &aMem[pOp->p3];
+  memAboutToChange(p, u.am.pDest);
+  MemSetTypeFlag(u.am.pDest, MEM_Null);
+  u.am.zRec = 0;
+
+  /* This block sets the variable u.am.payloadSize to be the total number of
+  ** bytes in the record.
+  **
+  ** u.am.zRec is set to be the complete text of the record if it is available.
+  ** The complete record text is always available for pseudo-tables
+  ** If the record is stored in a cursor, the complete record text
+  ** might be available in the  u.am.pC->aRow cache.  Or it might not be.
+  ** If the data is unavailable,  u.am.zRec is set to NULL.
+  **
+  ** We also compute the number of columns in the record.  For cursors,
+  ** the number of columns is stored in the VdbeCursor.nField element.
+  */
+  u.am.pC = p->apCsr[u.am.p1];
+  assert( u.am.pC!=0 );
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  assert( u.am.pC->pVtabCursor==0 );
+#endif
+  u.am.pCrsr = u.am.pC->pCursor;
+  if( u.am.pCrsr!=0 ){
+    /* The record is stored in a B-Tree */
+    rc = sqlite3VdbeCursorMoveto(u.am.pC);
+    if( rc ) goto abort_due_to_error;
+    if( u.am.pC->nullRow ){
+      u.am.payloadSize = 0;
+    }else if( u.am.pC->cacheStatus==p->cacheCtr ){
+      u.am.payloadSize = u.am.pC->payloadSize;
+      u.am.zRec = (char*)u.am.pC->aRow;
+    }else if( u.am.pC->isIndex ){
+      assert( sqlite3BtreeCursorIsValid(u.am.pCrsr) );
+      rc = sqlite3BtreeKeySize(u.am.pCrsr, &u.am.payloadSize64);
+      assert( rc==SQLITE_OK );   /* True because of CursorMoveto() call above */
+      /* sqlite3BtreeParseCellPtr() uses getVarint32() to extract the
+      ** payload size, so it is impossible for u.am.payloadSize64 to be
+      ** larger than 32 bits. */
+      assert( (u.am.payloadSize64 & SQLITE_MAX_U32)==(u64)u.am.payloadSize64 );
+      u.am.payloadSize = (u32)u.am.payloadSize64;
+    }else{
+      assert( sqlite3BtreeCursorIsValid(u.am.pCrsr) );
+      rc = sqlite3BtreeDataSize(u.am.pCrsr, &u.am.payloadSize);
+      assert( rc==SQLITE_OK );   /* DataSize() cannot fail */
+    }
+  }else if( u.am.pC->pseudoTableReg>0 ){
+    u.am.pReg = &aMem[u.am.pC->pseudoTableReg];
+    assert( u.am.pReg->flags & MEM_Blob );
+    assert( memIsValid(u.am.pReg) );
+    u.am.payloadSize = u.am.pReg->n;
+    u.am.zRec = u.am.pReg->z;
+    u.am.pC->cacheStatus = (pOp->p5&OPFLAG_CLEARCACHE) ? CACHE_STALE : p->cacheCtr;
+    assert( u.am.payloadSize==0 || u.am.zRec!=0 );
+  }else{
+    /* Consider the row to be NULL */
+    u.am.payloadSize = 0;
+  }
+
+  /* If u.am.payloadSize is 0, then just store a NULL */
+  if( u.am.payloadSize==0 ){
+    assert( u.am.pDest->flags&MEM_Null );
+    goto op_column_out;
+  }
+  assert( db->aLimit[SQLITE_LIMIT_LENGTH]>=0 );
+  if( u.am.payloadSize > (u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
+    goto too_big;
+  }
+
+  u.am.nField = u.am.pC->nField;
+  assert( u.am.p2<u.am.nField );
+
+  /* Read and parse the table header.  Store the results of the parse
+  ** into the record header cache fields of the cursor.
+  */
+  u.am.aType = u.am.pC->aType;
+  if( u.am.pC->cacheStatus==p->cacheCtr ){
+    u.am.aOffset = u.am.pC->aOffset;
+  }else{
+    assert(u.am.aType);
+    u.am.avail = 0;
+    u.am.pC->aOffset = u.am.aOffset = &u.am.aType[u.am.nField];
+    u.am.pC->payloadSize = u.am.payloadSize;
+    u.am.pC->cacheStatus = p->cacheCtr;
+
+    /* Figure out how many bytes are in the header */
+    if( u.am.zRec ){
+      u.am.zData = u.am.zRec;
+    }else{
+      if( u.am.pC->isIndex ){
+        u.am.zData = (char*)sqlite3BtreeKeyFetch(u.am.pCrsr, &u.am.avail);
+      }else{
+        u.am.zData = (char*)sqlite3BtreeDataFetch(u.am.pCrsr, &u.am.avail);
+      }
+      /* If KeyFetch()/DataFetch() managed to get the entire payload,
+      ** save the payload in the u.am.pC->aRow cache.  That will save us from
+      ** having to make additional calls to fetch the content portion of
+      ** the record.
+      */
+      assert( u.am.avail>=0 );
+      if( u.am.payloadSize <= (u32)u.am.avail ){
+        u.am.zRec = u.am.zData;
+        u.am.pC->aRow = (u8*)u.am.zData;
+      }else{
+        u.am.pC->aRow = 0;
+      }
+    }
+    /* The following assert is true in all cases accept when
+    ** the database file has been corrupted externally.
+    **    assert( u.am.zRec!=0 || u.am.avail>=u.am.payloadSize || u.am.avail>=9 ); */
+    u.am.szHdr = getVarint32((u8*)u.am.zData, u.am.offset);
+
+    /* Make sure a corrupt database has not given us an oversize header.
+    ** Do this now to avoid an oversize memory allocation.
+    **
+    ** Type entries can be between 1 and 5 bytes each.  But 4 and 5 byte
+    ** types use so much data space that there can only be 4096 and 32 of
+    ** them, respectively.  So the maximum header length results from a
+    ** 3-byte type for each of the maximum of 32768 columns plus three
+    ** extra bytes for the header length itself.  32768*3 + 3 = 98307.
+    */
+    if( u.am.offset > 98307 ){
+      rc = SQLITE_CORRUPT_BKPT;
+      goto op_column_out;
+    }
+
+    /* Compute in u.am.len the number of bytes of data we need to read in order
+    ** to get u.am.nField type values.  u.am.offset is an upper bound on this.  But
+    ** u.am.nField might be significantly less than the true number of columns
+    ** in the table, and in that case, 5*u.am.nField+3 might be smaller than u.am.offset.
+    ** We want to minimize u.am.len in order to limit the size of the memory
+    ** allocation, especially if a corrupt database file has caused u.am.offset
+    ** to be oversized. Offset is limited to 98307 above.  But 98307 might
+    ** still exceed Robson memory allocation limits on some configurations.
+    ** On systems that cannot tolerate large memory allocations, u.am.nField*5+3
+    ** will likely be much smaller since u.am.nField will likely be less than
+    ** 20 or so.  This insures that Robson memory allocation limits are
+    ** not exceeded even for corrupt database files.
+    */
+    u.am.len = u.am.nField*5 + 3;
+    if( u.am.len > (int)u.am.offset ) u.am.len = (int)u.am.offset;
+
+    /* The KeyFetch() or DataFetch() above are fast and will get the entire
+    ** record header in most cases.  But they will fail to get the complete
+    ** record header if the record header does not fit on a single page
+    ** in the B-Tree.  When that happens, use sqlite3VdbeMemFromBtree() to
+    ** acquire the complete header text.
+    */
+    if( !u.am.zRec && u.am.avail<u.am.len ){
+      u.am.sMem.flags = 0;
+      u.am.sMem.db = 0;
+      rc = sqlite3VdbeMemFromBtree(u.am.pCrsr, 0, u.am.len, u.am.pC->isIndex, &u.am.sMem);
+      if( rc!=SQLITE_OK ){
+        goto op_column_out;
+      }
+      u.am.zData = u.am.sMem.z;
+    }
+    u.am.zEndHdr = (u8 *)&u.am.zData[u.am.len];
+    u.am.zIdx = (u8 *)&u.am.zData[u.am.szHdr];
+
+    /* Scan the header and use it to fill in the u.am.aType[] and u.am.aOffset[]
+    ** arrays.  u.am.aType[u.am.i] will contain the type integer for the u.am.i-th
+    ** column and u.am.aOffset[u.am.i] will contain the u.am.offset from the beginning
+    ** of the record to the start of the data for the u.am.i-th column
+    */
+    for(u.am.i=0; u.am.i<u.am.nField; u.am.i++){
+      if( u.am.zIdx<u.am.zEndHdr ){
+        u.am.aOffset[u.am.i] = u.am.offset;
+        u.am.zIdx += getVarint32(u.am.zIdx, u.am.aType[u.am.i]);
+        u.am.szField = sqlite3VdbeSerialTypeLen(u.am.aType[u.am.i]);
+        u.am.offset += u.am.szField;
+        if( u.am.offset<u.am.szField ){  /* True if u.am.offset overflows */
+          u.am.zIdx = &u.am.zEndHdr[1];  /* Forces SQLITE_CORRUPT return below */
+          break;
+        }
+      }else{
+        /* If u.am.i is less that u.am.nField, then there are less fields in this
+        ** record than SetNumColumns indicated there are columns in the
+        ** table. Set the u.am.offset for any extra columns not present in
+        ** the record to 0. This tells code below to store a NULL
+        ** instead of deserializing a value from the record.
+        */
+        u.am.aOffset[u.am.i] = 0;
+      }
+    }
+    sqlite3VdbeMemRelease(&u.am.sMem);
+    u.am.sMem.flags = MEM_Null;
+
+    /* If we have read more header data than was contained in the header,
+    ** or if the end of the last field appears to be past the end of the
+    ** record, or if the end of the last field appears to be before the end
+    ** of the record (when all fields present), then we must be dealing
+    ** with a corrupt database.
+    */
+    if( (u.am.zIdx > u.am.zEndHdr) || (u.am.offset > u.am.payloadSize)
+         || (u.am.zIdx==u.am.zEndHdr && u.am.offset!=u.am.payloadSize) ){
+      rc = SQLITE_CORRUPT_BKPT;
+      goto op_column_out;
+    }
+  }
+
+  /* Get the column information. If u.am.aOffset[u.am.p2] is non-zero, then
+  ** deserialize the value from the record. If u.am.aOffset[u.am.p2] is zero,
+  ** then there are not enough fields in the record to satisfy the
+  ** request.  In this case, set the value NULL or to P4 if P4 is
+  ** a pointer to a Mem object.
+  */
+  if( u.am.aOffset[u.am.p2] ){
+    assert( rc==SQLITE_OK );
+    if( u.am.zRec ){
+      sqlite3VdbeMemReleaseExternal(u.am.pDest);
+      sqlite3VdbeSerialGet((u8 *)&u.am.zRec[u.am.aOffset[u.am.p2]], u.am.aType[u.am.p2], u.am.pDest);
+    }else{
+      u.am.len = sqlite3VdbeSerialTypeLen(u.am.aType[u.am.p2]);
+      sqlite3VdbeMemMove(&u.am.sMem, u.am.pDest);
+      rc = sqlite3VdbeMemFromBtree(u.am.pCrsr, u.am.aOffset[u.am.p2], u.am.len, u.am.pC->isIndex, &u.am.sMem);
+      if( rc!=SQLITE_OK ){
+        goto op_column_out;
+      }
+      u.am.zData = u.am.sMem.z;
+      sqlite3VdbeSerialGet((u8*)u.am.zData, u.am.aType[u.am.p2], u.am.pDest);
+    }
+    u.am.pDest->enc = encoding;
+  }else{
+    if( pOp->p4type==P4_MEM ){
+      sqlite3VdbeMemShallowCopy(u.am.pDest, pOp->p4.pMem, MEM_Static);
+    }else{
+      assert( u.am.pDest->flags&MEM_Null );
+    }
+  }
+
+  /* If we dynamically allocated space to hold the data (in the
+  ** sqlite3VdbeMemFromBtree() call above) then transfer control of that
+  ** dynamically allocated space over to the u.am.pDest structure.
+  ** This prevents a memory copy.
+  */
+  if( u.am.sMem.zMalloc ){
+    assert( u.am.sMem.z==u.am.sMem.zMalloc );
+    assert( !(u.am.pDest->flags & MEM_Dyn) );
+    assert( !(u.am.pDest->flags & (MEM_Blob|MEM_Str)) || u.am.pDest->z==u.am.sMem.z );
+    u.am.pDest->flags &= ~(MEM_Ephem|MEM_Static);
+    u.am.pDest->flags |= MEM_Term;
+    u.am.pDest->z = u.am.sMem.z;
+    u.am.pDest->zMalloc = u.am.sMem.zMalloc;
+  }
+
+  rc = sqlite3VdbeMemMakeWriteable(u.am.pDest);
+
+op_column_out:
+  UPDATE_MAX_BLOBSIZE(u.am.pDest);
+  REGISTER_TRACE(pOp->p3, u.am.pDest);
+  break;
+}
+
+/* Opcode: Affinity P1 P2 * P4 *
+**
+** Apply affinities to a range of P2 registers starting with P1.
+**
+** P4 is a string that is P2 characters long. The nth character of the
+** string indicates the column affinity that should be used for the nth
+** memory cell in the range.
+*/
+case OP_Affinity: {
+#if 0  /* local variables moved into u.an */
+  const char *zAffinity;   /* The affinity to be applied */
+  char cAff;               /* A single character of affinity */
+#endif /* local variables moved into u.an */
+
+  u.an.zAffinity = pOp->p4.z;
+  assert( u.an.zAffinity!=0 );
+  assert( u.an.zAffinity[pOp->p2]==0 );
+  pIn1 = &aMem[pOp->p1];
+  while( (u.an.cAff = *(u.an.zAffinity++))!=0 ){
+    assert( pIn1 <= &p->aMem[p->nMem] );
+    assert( memIsValid(pIn1) );
+    ExpandBlob(pIn1);
+    applyAffinity(pIn1, u.an.cAff, encoding);
+    pIn1++;
+  }
+  break;
+}
+
+/* Opcode: MakeRecord P1 P2 P3 P4 *
+**
+** Convert P2 registers beginning with P1 into the [record format]
+** use as a data record in a database table or as a key
+** in an index.  The OP_Column opcode can decode the record later.
+**
+** P4 may be a string that is P2 characters long.  The nth character of the
+** string indicates the column affinity that should be used for the nth
+** field of the index key.
+**
+** The mapping from character to affinity is given by the SQLITE_AFF_
+** macros defined in sqliteInt.h.
+**
+** If P4 is NULL then all index fields have the affinity NONE.
+*/
+case OP_MakeRecord: {
+#if 0  /* local variables moved into u.ao */
+  u8 *zNewRecord;        /* A buffer to hold the data for the new record */
+  Mem *pRec;             /* The new record */
+  u64 nData;             /* Number of bytes of data space */
+  int nHdr;              /* Number of bytes of header space */
+  i64 nByte;             /* Data space required for this record */
+  int nZero;             /* Number of zero bytes at the end of the record */
+  int nVarint;           /* Number of bytes in a varint */
+  u32 serial_type;       /* Type field */
+  Mem *pData0;           /* First field to be combined into the record */
+  Mem *pLast;            /* Last field of the record */
+  int nField;            /* Number of fields in the record */
+  char *zAffinity;       /* The affinity string for the record */
+  int file_format;       /* File format to use for encoding */
+  int i;                 /* Space used in zNewRecord[] */
+  int len;               /* Length of a field */
+#endif /* local variables moved into u.ao */
+
+  /* Assuming the record contains N fields, the record format looks
+  ** like this:
+  **
+  ** ------------------------------------------------------------------------
+  ** | hdr-size | type 0 | type 1 | ... | type N-1 | data0 | ... | data N-1 |
+  ** ------------------------------------------------------------------------
+  **
+  ** Data(0) is taken from register P1.  Data(1) comes from register P1+1
+  ** and so froth.
+  **
+  ** Each type field is a varint representing the serial type of the
+  ** corresponding data element (see sqlite3VdbeSerialType()). The
+  ** hdr-size field is also a varint which is the offset from the beginning
+  ** of the record to data0.
+  */
+  u.ao.nData = 0;         /* Number of bytes of data space */
+  u.ao.nHdr = 0;          /* Number of bytes of header space */
+  u.ao.nZero = 0;         /* Number of zero bytes at the end of the record */
+  u.ao.nField = pOp->p1;
+  u.ao.zAffinity = pOp->p4.z;
+  assert( u.ao.nField>0 && pOp->p2>0 && pOp->p2+u.ao.nField<=p->nMem+1 );
+  u.ao.pData0 = &aMem[u.ao.nField];
+  u.ao.nField = pOp->p2;
+  u.ao.pLast = &u.ao.pData0[u.ao.nField-1];
+  u.ao.file_format = p->minWriteFileFormat;
+
+  /* Identify the output register */
+  assert( pOp->p3<pOp->p1 || pOp->p3>=pOp->p1+pOp->p2 );
+  pOut = &aMem[pOp->p3];
+  memAboutToChange(p, pOut);
+
+  /* Loop through the elements that will make up the record to figure
+  ** out how much space is required for the new record.
+  */
+  for(u.ao.pRec=u.ao.pData0; u.ao.pRec<=u.ao.pLast; u.ao.pRec++){
+    assert( memIsValid(u.ao.pRec) );
+    if( u.ao.zAffinity ){
+      applyAffinity(u.ao.pRec, u.ao.zAffinity[u.ao.pRec-u.ao.pData0], encoding);
+    }
+    if( u.ao.pRec->flags&MEM_Zero && u.ao.pRec->n>0 ){
+      sqlite3VdbeMemExpandBlob(u.ao.pRec);
+    }
+    u.ao.serial_type = sqlite3VdbeSerialType(u.ao.pRec, u.ao.file_format);
+    u.ao.len = sqlite3VdbeSerialTypeLen(u.ao.serial_type);
+    u.ao.nData += u.ao.len;
+    u.ao.nHdr += sqlite3VarintLen(u.ao.serial_type);
+    if( u.ao.pRec->flags & MEM_Zero ){
+      /* Only pure zero-filled BLOBs can be input to this Opcode.
+      ** We do not allow blobs with a prefix and a zero-filled tail. */
+      u.ao.nZero += u.ao.pRec->u.nZero;
+    }else if( u.ao.len ){
+      u.ao.nZero = 0;
+    }
+  }
+
+  /* Add the initial header varint and total the size */
+  u.ao.nHdr += u.ao.nVarint = sqlite3VarintLen(u.ao.nHdr);
+  if( u.ao.nVarint<sqlite3VarintLen(u.ao.nHdr) ){
+    u.ao.nHdr++;
+  }
+  u.ao.nByte = u.ao.nHdr+u.ao.nData-u.ao.nZero;
+  if( u.ao.nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
+    goto too_big;
+  }
+
+  /* Make sure the output register has a buffer large enough to store
+  ** the new record. The output register (pOp->p3) is not allowed to
+  ** be one of the input registers (because the following call to
+  ** sqlite3VdbeMemGrow() could clobber the value before it is used).
+  */
+  if( sqlite3VdbeMemGrow(pOut, (int)u.ao.nByte, 0) ){
+    goto no_mem;
+  }
+  u.ao.zNewRecord = (u8 *)pOut->z;
+
+  /* Write the record */
+  u.ao.i = putVarint32(u.ao.zNewRecord, u.ao.nHdr);
+  for(u.ao.pRec=u.ao.pData0; u.ao.pRec<=u.ao.pLast; u.ao.pRec++){
+    u.ao.serial_type = sqlite3VdbeSerialType(u.ao.pRec, u.ao.file_format);
+    u.ao.i += putVarint32(&u.ao.zNewRecord[u.ao.i], u.ao.serial_type);      /* serial type */
+  }
+  for(u.ao.pRec=u.ao.pData0; u.ao.pRec<=u.ao.pLast; u.ao.pRec++){  /* serial data */
+    u.ao.i += sqlite3VdbeSerialPut(&u.ao.zNewRecord[u.ao.i], (int)(u.ao.nByte-u.ao.i), u.ao.pRec,u.ao.file_format);
+  }
+  assert( u.ao.i==u.ao.nByte );
+
+  assert( pOp->p3>0 && pOp->p3<=p->nMem );
+  pOut->n = (int)u.ao.nByte;
+  pOut->flags = MEM_Blob | MEM_Dyn;
+  pOut->xDel = 0;
+  if( u.ao.nZero ){
+    pOut->u.nZero = u.ao.nZero;
+    pOut->flags |= MEM_Zero;
+  }
+  pOut->enc = SQLITE_UTF8;  /* In case the blob is ever converted to text */
+  REGISTER_TRACE(pOp->p3, pOut);
+  UPDATE_MAX_BLOBSIZE(pOut);
+  break;
+}
+
+/* Opcode: Count P1 P2 * * *
+**
+** Store the number of entries (an integer value) in the table or index 
+** opened by cursor P1 in register P2
+*/
+#ifndef SQLITE_OMIT_BTREECOUNT
+case OP_Count: {         /* out2-prerelease */
+#if 0  /* local variables moved into u.ap */
+  i64 nEntry;
+  BtCursor *pCrsr;
+#endif /* local variables moved into u.ap */
+
+  u.ap.pCrsr = p->apCsr[pOp->p1]->pCursor;
+  if( u.ap.pCrsr ){
+    rc = sqlite3BtreeCount(u.ap.pCrsr, &u.ap.nEntry);
+  }else{
+    u.ap.nEntry = 0;
+  }
+  pOut->u.i = u.ap.nEntry;
+  break;
+}
+#endif
+
+/* Opcode: Savepoint P1 * * P4 *
+**
+** Open, release or rollback the savepoint named by parameter P4, depending
+** on the value of P1. To open a new savepoint, P1==0. To release (commit) an
+** existing savepoint, P1==1, or to rollback an existing savepoint P1==2.
+*/
+case OP_Savepoint: {
+#if 0  /* local variables moved into u.aq */
+  int p1;                         /* Value of P1 operand */
+  char *zName;                    /* Name of savepoint */
+  int nName;
+  Savepoint *pNew;
+  Savepoint *pSavepoint;
+  Savepoint *pTmp;
+  int iSavepoint;
+  int ii;
+#endif /* local variables moved into u.aq */
+
+  u.aq.p1 = pOp->p1;
+  u.aq.zName = pOp->p4.z;
+
+  /* Assert that the u.aq.p1 parameter is valid. Also that if there is no open
+  ** transaction, then there cannot be any savepoints.
+  */
+  assert( db->pSavepoint==0 || db->autoCommit==0 );
+  assert( u.aq.p1==SAVEPOINT_BEGIN||u.aq.p1==SAVEPOINT_RELEASE||u.aq.p1==SAVEPOINT_ROLLBACK );
+  assert( db->pSavepoint || db->isTransactionSavepoint==0 );
+  assert( checkSavepointCount(db) );
+
+  if( u.aq.p1==SAVEPOINT_BEGIN ){
+    if( db->writeVdbeCnt>0 ){
+      /* A new savepoint cannot be created if there are active write
+      ** statements (i.e. open read/write incremental blob handles).
+      */
+      sqlite3SetString(&p->zErrMsg, db, "cannot open savepoint - "
+        "SQL statements in progress");
+      rc = SQLITE_BUSY;
+    }else{
+      u.aq.nName = sqlite3Strlen30(u.aq.zName);
+
+      /* Create a new savepoint structure. */
+      u.aq.pNew = sqlite3DbMallocRaw(db, sizeof(Savepoint)+u.aq.nName+1);
+      if( u.aq.pNew ){
+        u.aq.pNew->zName = (char *)&u.aq.pNew[1];
+        memcpy(u.aq.pNew->zName, u.aq.zName, u.aq.nName+1);
+
+        /* If there is no open transaction, then mark this as a special
+        ** "transaction savepoint". */
+        if( db->autoCommit ){
+          db->autoCommit = 0;
+          db->isTransactionSavepoint = 1;
+        }else{
+          db->nSavepoint++;
+        }
+
+        /* Link the new savepoint into the database handle's list. */
+        u.aq.pNew->pNext = db->pSavepoint;
+        db->pSavepoint = u.aq.pNew;
+        u.aq.pNew->nDeferredCons = db->nDeferredCons;
+      }
+    }
+  }else{
+    u.aq.iSavepoint = 0;
+
+    /* Find the named savepoint. If there is no such savepoint, then an
+    ** an error is returned to the user.  */
+    for(
+      u.aq.pSavepoint = db->pSavepoint;
+      u.aq.pSavepoint && sqlite3StrICmp(u.aq.pSavepoint->zName, u.aq.zName);
+      u.aq.pSavepoint = u.aq.pSavepoint->pNext
+    ){
+      u.aq.iSavepoint++;
+    }
+    if( !u.aq.pSavepoint ){
+      sqlite3SetString(&p->zErrMsg, db, "no such savepoint: %s", u.aq.zName);
+      rc = SQLITE_ERROR;
+    }else if(
+        db->writeVdbeCnt>0 || (u.aq.p1==SAVEPOINT_ROLLBACK && db->activeVdbeCnt>1)
+    ){
+      /* It is not possible to release (commit) a savepoint if there are
+      ** active write statements. It is not possible to rollback a savepoint
+      ** if there are any active statements at all.
+      */
+      sqlite3SetString(&p->zErrMsg, db,
+        "cannot %s savepoint - SQL statements in progress",
+        (u.aq.p1==SAVEPOINT_ROLLBACK ? "rollback": "release")
+      );
+      rc = SQLITE_BUSY;
+    }else{
+
+      /* Determine whether or not this is a transaction savepoint. If so,
+      ** and this is a RELEASE command, then the current transaction
+      ** is committed.
+      */
+      int isTransaction = u.aq.pSavepoint->pNext==0 && db->isTransactionSavepoint;
+      if( isTransaction && u.aq.p1==SAVEPOINT_RELEASE ){
+        if( (rc = sqlite3VdbeCheckFk(p, 1))!=SQLITE_OK ){
+          goto vdbe_return;
+        }
+        db->autoCommit = 1;
+        if( sqlite3VdbeHalt(p)==SQLITE_BUSY ){
+          p->pc = pc;
+          db->autoCommit = 0;
+          p->rc = rc = SQLITE_BUSY;
+          goto vdbe_return;
+        }
+        db->isTransactionSavepoint = 0;
+        rc = p->rc;
+      }else{
+        u.aq.iSavepoint = db->nSavepoint - u.aq.iSavepoint - 1;
+        for(u.aq.ii=0; u.aq.ii<db->nDb; u.aq.ii++){
+          rc = sqlite3BtreeSavepoint(db->aDb[u.aq.ii].pBt, u.aq.p1, u.aq.iSavepoint);
+          if( rc!=SQLITE_OK ){
+            goto abort_due_to_error;
+          }
+        }
+        if( u.aq.p1==SAVEPOINT_ROLLBACK && (db->flags&SQLITE_InternChanges)!=0 ){
+          sqlite3ExpirePreparedStatements(db);
+          sqlite3ResetInternalSchema(db, -1);
+          db->flags = (db->flags | SQLITE_InternChanges);
+        }
+      }
+
+      /* Regardless of whether this is a RELEASE or ROLLBACK, destroy all
+      ** savepoints nested inside of the savepoint being operated on. */
+      while( db->pSavepoint!=u.aq.pSavepoint ){
+        u.aq.pTmp = db->pSavepoint;
+        db->pSavepoint = u.aq.pTmp->pNext;
+        sqlite3DbFree(db, u.aq.pTmp);
+        db->nSavepoint--;
+      }
+
+      /* If it is a RELEASE, then destroy the savepoint being operated on
+      ** too. If it is a ROLLBACK TO, then set the number of deferred
+      ** constraint violations present in the database to the value stored
+      ** when the savepoint was created.  */
+      if( u.aq.p1==SAVEPOINT_RELEASE ){
+        assert( u.aq.pSavepoint==db->pSavepoint );
+        db->pSavepoint = u.aq.pSavepoint->pNext;
+        sqlite3DbFree(db, u.aq.pSavepoint);
+        if( !isTransaction ){
+          db->nSavepoint--;
+        }
+      }else{
+        db->nDeferredCons = u.aq.pSavepoint->nDeferredCons;
+      }
+    }
+  }
+
+  break;
+}
+
+/* Opcode: AutoCommit P1 P2 * * *
+**
+** Set the database auto-commit flag to P1 (1 or 0). If P2 is true, roll
+** back any currently active btree transactions. If there are any active
+** VMs (apart from this one), then a ROLLBACK fails.  A COMMIT fails if
+** there are active writing VMs or active VMs that use shared cache.
+**
+** This instruction causes the VM to halt.
+*/
+case OP_AutoCommit: {
+#if 0  /* local variables moved into u.ar */
+  int desiredAutoCommit;
+  int iRollback;
+  int turnOnAC;
+#endif /* local variables moved into u.ar */
+
+  u.ar.desiredAutoCommit = pOp->p1;
+  u.ar.iRollback = pOp->p2;
+  u.ar.turnOnAC = u.ar.desiredAutoCommit && !db->autoCommit;
+  assert( u.ar.desiredAutoCommit==1 || u.ar.desiredAutoCommit==0 );
+  assert( u.ar.desiredAutoCommit==1 || u.ar.iRollback==0 );
+  assert( db->activeVdbeCnt>0 );  /* At least this one VM is active */
+
+  if( u.ar.turnOnAC && u.ar.iRollback && db->activeVdbeCnt>1 ){
+    /* If this instruction implements a ROLLBACK and other VMs are
+    ** still running, and a transaction is active, return an error indicating
+    ** that the other VMs must complete first.
+    */
+    sqlite3SetString(&p->zErrMsg, db, "cannot rollback transaction - "
+        "SQL statements in progress");
+    rc = SQLITE_BUSY;
+  }else if( u.ar.turnOnAC && !u.ar.iRollback && db->writeVdbeCnt>0 ){
+    /* If this instruction implements a COMMIT and other VMs are writing
+    ** return an error indicating that the other VMs must complete first.
+    */
+    sqlite3SetString(&p->zErrMsg, db, "cannot commit transaction - "
+        "SQL statements in progress");
+    rc = SQLITE_BUSY;
+  }else if( u.ar.desiredAutoCommit!=db->autoCommit ){
+    if( u.ar.iRollback ){
+      assert( u.ar.desiredAutoCommit==1 );
+      sqlite3RollbackAll(db);
+      db->autoCommit = 1;
+    }else if( (rc = sqlite3VdbeCheckFk(p, 1))!=SQLITE_OK ){
+      goto vdbe_return;
+    }else{
+      db->autoCommit = (u8)u.ar.desiredAutoCommit;
+      if( sqlite3VdbeHalt(p)==SQLITE_BUSY ){
+        p->pc = pc;
+        db->autoCommit = (u8)(1-u.ar.desiredAutoCommit);
+        p->rc = rc = SQLITE_BUSY;
+        goto vdbe_return;
+      }
+    }
+    assert( db->nStatement==0 );
+    sqlite3CloseSavepoints(db);
+    if( p->rc==SQLITE_OK ){
+      rc = SQLITE_DONE;
+    }else{
+      rc = SQLITE_ERROR;
+    }
+    goto vdbe_return;
+  }else{
+    sqlite3SetString(&p->zErrMsg, db,
+        (!u.ar.desiredAutoCommit)?"cannot start a transaction within a transaction":(
+        (u.ar.iRollback)?"cannot rollback - no transaction is active":
+                   "cannot commit - no transaction is active"));
+
+    rc = SQLITE_ERROR;
+  }
+  break;
+}
+
+/* Opcode: Transaction P1 P2 * * *
+**
+** Begin a transaction.  The transaction ends when a Commit or Rollback
+** opcode is encountered.  Depending on the ON CONFLICT setting, the
+** transaction might also be rolled back if an error is encountered.
+**
+** P1 is the index of the database file on which the transaction is
+** started.  Index 0 is the main database file and index 1 is the
+** file used for temporary tables.  Indices of 2 or more are used for
+** attached databases.
+**
+** If P2 is non-zero, then a write-transaction is started.  A RESERVED lock is
+** obtained on the database file when a write-transaction is started.  No
+** other process can start another write transaction while this transaction is
+** underway.  Starting a write transaction also creates a rollback journal. A
+** write transaction must be started before any changes can be made to the
+** database.  If P2 is 2 or greater then an EXCLUSIVE lock is also obtained
+** on the file.
+**
+** If a write-transaction is started and the Vdbe.usesStmtJournal flag is
+** true (this flag is set if the Vdbe may modify more than one row and may
+** throw an ABORT exception), a statement transaction may also be opened.
+** More specifically, a statement transaction is opened iff the database
+** connection is currently not in autocommit mode, or if there are other
+** active statements. A statement transaction allows the affects of this
+** VDBE to be rolled back after an error without having to roll back the
+** entire transaction. If no error is encountered, the statement transaction
+** will automatically commit when the VDBE halts.
+**
+** If P2 is zero, then a read-lock is obtained on the database file.
+*/
+case OP_Transaction: {
+#if 0  /* local variables moved into u.as */
+  Btree *pBt;
+#endif /* local variables moved into u.as */
+
+  assert( pOp->p1>=0 && pOp->p1<db->nDb );
+  assert( (p->btreeMask & (((yDbMask)1)<<pOp->p1))!=0 );
+  u.as.pBt = db->aDb[pOp->p1].pBt;
+
+  if( u.as.pBt ){
+    rc = sqlite3BtreeBeginTrans(u.as.pBt, pOp->p2);
+    if( rc==SQLITE_BUSY ){
+      p->pc = pc;
+      p->rc = rc = SQLITE_BUSY;
+      goto vdbe_return;
+    }
+    if( rc!=SQLITE_OK ){
+      goto abort_due_to_error;
+    }
+
+    if( pOp->p2 && p->usesStmtJournal
+     && (db->autoCommit==0 || db->activeVdbeCnt>1)
+    ){
+      assert( sqlite3BtreeIsInTrans(u.as.pBt) );
+      if( p->iStatement==0 ){
+        assert( db->nStatement>=0 && db->nSavepoint>=0 );
+        db->nStatement++;
+        p->iStatement = db->nSavepoint + db->nStatement;
+      }
+      rc = sqlite3BtreeBeginStmt(u.as.pBt, p->iStatement);
+
+      /* Store the current value of the database handles deferred constraint
+      ** counter. If the statement transaction needs to be rolled back,
+      ** the value of this counter needs to be restored too.  */
+      p->nStmtDefCons = db->nDeferredCons;
+    }
+  }
+  break;
+}
+
+/* Opcode: ReadCookie P1 P2 P3 * *
+**
+** Read cookie number P3 from database P1 and write it into register P2.
+** P3==1 is the schema version.  P3==2 is the database format.
+** P3==3 is the recommended pager cache size, and so forth.  P1==0 is
+** the main database file and P1==1 is the database file used to store
+** temporary tables.
+**
+** There must be a read-lock on the database (either a transaction
+** must be started or there must be an open cursor) before
+** executing this instruction.
+*/
+case OP_ReadCookie: {               /* out2-prerelease */
+#if 0  /* local variables moved into u.at */
+  int iMeta;
+  int iDb;
+  int iCookie;
+#endif /* local variables moved into u.at */
+
+  u.at.iDb = pOp->p1;
+  u.at.iCookie = pOp->p3;
+  assert( pOp->p3<SQLITE_N_BTREE_META );
+  assert( u.at.iDb>=0 && u.at.iDb<db->nDb );
+  assert( db->aDb[u.at.iDb].pBt!=0 );
+  assert( (p->btreeMask & (((yDbMask)1)<<u.at.iDb))!=0 );
+
+  sqlite3BtreeGetMeta(db->aDb[u.at.iDb].pBt, u.at.iCookie, (u32 *)&u.at.iMeta);
+  pOut->u.i = u.at.iMeta;
+  break;
+}
+
+/* Opcode: SetCookie P1 P2 P3 * *
+**
+** Write the content of register P3 (interpreted as an integer)
+** into cookie number P2 of database P1.  P2==1 is the schema version.  
+** P2==2 is the database format. P2==3 is the recommended pager cache 
+** size, and so forth.  P1==0 is the main database file and P1==1 is the 
+** database file used to store temporary tables.
+**
+** A transaction must be started before executing this opcode.
+*/
+case OP_SetCookie: {       /* in3 */
+#if 0  /* local variables moved into u.au */
+  Db *pDb;
+#endif /* local variables moved into u.au */
+  assert( pOp->p2<SQLITE_N_BTREE_META );
+  assert( pOp->p1>=0 && pOp->p1<db->nDb );
+  assert( (p->btreeMask & (((yDbMask)1)<<pOp->p1))!=0 );
+  u.au.pDb = &db->aDb[pOp->p1];
+  assert( u.au.pDb->pBt!=0 );
+  assert( sqlite3SchemaMutexHeld(db, pOp->p1, 0) );
+  pIn3 = &aMem[pOp->p3];
+  sqlite3VdbeMemIntegerify(pIn3);
+  /* See note about index shifting on OP_ReadCookie */
+  rc = sqlite3BtreeUpdateMeta(u.au.pDb->pBt, pOp->p2, (int)pIn3->u.i);
+  if( pOp->p2==BTREE_SCHEMA_VERSION ){
+    /* When the schema cookie changes, record the new cookie internally */
+    u.au.pDb->pSchema->schema_cookie = (int)pIn3->u.i;
+    db->flags |= SQLITE_InternChanges;
+  }else if( pOp->p2==BTREE_FILE_FORMAT ){
+    /* Record changes in the file format */
+    u.au.pDb->pSchema->file_format = (u8)pIn3->u.i;
+  }
+  if( pOp->p1==1 ){
+    /* Invalidate all prepared statements whenever the TEMP database
+    ** schema is changed.  Ticket #1644 */
+    sqlite3ExpirePreparedStatements(db);
+    p->expired = 0;
+  }
+  break;
+}
+
+/* Opcode: VerifyCookie P1 P2 P3 * *
+**
+** Check the value of global database parameter number 0 (the
+** schema version) and make sure it is equal to P2 and that the
+** generation counter on the local schema parse equals P3.
+**
+** P1 is the database number which is 0 for the main database file
+** and 1 for the file holding temporary tables and some higher number
+** for auxiliary databases.
+**
+** The cookie changes its value whenever the database schema changes.
+** This operation is used to detect when that the cookie has changed
+** and that the current process needs to reread the schema.
+**
+** Either a transaction needs to have been started or an OP_Open needs
+** to be executed (to establish a read lock) before this opcode is
+** invoked.
+*/
+case OP_VerifyCookie: {
+#if 0  /* local variables moved into u.av */
+  int iMeta;
+  int iGen;
+  Btree *pBt;
+#endif /* local variables moved into u.av */
+
+  assert( pOp->p1>=0 && pOp->p1<db->nDb );
+  assert( (p->btreeMask & (((yDbMask)1)<<pOp->p1))!=0 );
+  assert( sqlite3SchemaMutexHeld(db, pOp->p1, 0) );
+  u.av.pBt = db->aDb[pOp->p1].pBt;
+  if( u.av.pBt ){
+    sqlite3BtreeGetMeta(u.av.pBt, BTREE_SCHEMA_VERSION, (u32 *)&u.av.iMeta);
+    u.av.iGen = db->aDb[pOp->p1].pSchema->iGeneration;
+  }else{
+    u.av.iGen = u.av.iMeta = 0;
+  }
+  if( u.av.iMeta!=pOp->p2 || u.av.iGen!=pOp->p3 ){
+    sqlite3DbFree(db, p->zErrMsg);
+    p->zErrMsg = sqlite3DbStrDup(db, "database schema has changed");
+    /* If the schema-cookie from the database file matches the cookie
+    ** stored with the in-memory representation of the schema, do
+    ** not reload the schema from the database file.
+    **
+    ** If virtual-tables are in use, this is not just an optimization.
+    ** Often, v-tables store their data in other SQLite tables, which
+    ** are queried from within xNext() and other v-table methods using
+    ** prepared queries. If such a query is out-of-date, we do not want to
+    ** discard the database schema, as the user code implementing the
+    ** v-table would have to be ready for the sqlite3_vtab structure itself
+    ** to be invalidated whenever sqlite3_step() is called from within
+    ** a v-table method.
+    */
+    if( db->aDb[pOp->p1].pSchema->schema_cookie!=u.av.iMeta ){
+      sqlite3ResetInternalSchema(db, pOp->p1);
+    }
+
+    p->expired = 1;
+    rc = SQLITE_SCHEMA;
+  }
+  break;
+}
+
+/* Opcode: OpenRead P1 P2 P3 P4 P5
+**
+** Open a read-only cursor for the database table whose root page is
+** P2 in a database file.  The database file is determined by P3. 
+** P3==0 means the main database, P3==1 means the database used for 
+** temporary tables, and P3>1 means used the corresponding attached
+** database.  Give the new cursor an identifier of P1.  The P1
+** values need not be contiguous but all P1 values should be small integers.
+** It is an error for P1 to be negative.
+**
+** If P5!=0 then use the content of register P2 as the root page, not
+** the value of P2 itself.
+**
+** There will be a read lock on the database whenever there is an
+** open cursor.  If the database was unlocked prior to this instruction
+** then a read lock is acquired as part of this instruction.  A read
+** lock allows other processes to read the database but prohibits
+** any other process from modifying the database.  The read lock is
+** released when all cursors are closed.  If this instruction attempts
+** to get a read lock but fails, the script terminates with an
+** SQLITE_BUSY error code.
+**
+** The P4 value may be either an integer (P4_INT32) or a pointer to
+** a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo 
+** structure, then said structure defines the content and collating 
+** sequence of the index being opened. Otherwise, if P4 is an integer 
+** value, it is set to the number of columns in the table.
+**
+** See also OpenWrite.
+*/
+/* Opcode: OpenWrite P1 P2 P3 P4 P5
+**
+** Open a read/write cursor named P1 on the table or index whose root
+** page is P2.  Or if P5!=0 use the content of register P2 to find the
+** root page.
+**
+** The P4 value may be either an integer (P4_INT32) or a pointer to
+** a KeyInfo structure (P4_KEYINFO). If it is a pointer to a KeyInfo 
+** structure, then said structure defines the content and collating 
+** sequence of the index being opened. Otherwise, if P4 is an integer 
+** value, it is set to the number of columns in the table, or to the
+** largest index of any column of the table that is actually used.
+**
+** This instruction works just like OpenRead except that it opens the cursor
+** in read/write mode.  For a given table, there can be one or more read-only
+** cursors or a single read/write cursor but not both.
+**
+** See also OpenRead.
+*/
+case OP_OpenRead:
+case OP_OpenWrite: {
+#if 0  /* local variables moved into u.aw */
+  int nField;
+  KeyInfo *pKeyInfo;
+  int p2;
+  int iDb;
+  int wrFlag;
+  Btree *pX;
+  VdbeCursor *pCur;
+  Db *pDb;
+#endif /* local variables moved into u.aw */
+
+  if( p->expired ){
+    rc = SQLITE_ABORT;
+    break;
+  }
+
+  u.aw.nField = 0;
+  u.aw.pKeyInfo = 0;
+  u.aw.p2 = pOp->p2;
+  u.aw.iDb = pOp->p3;
+  assert( u.aw.iDb>=0 && u.aw.iDb<db->nDb );
+  assert( (p->btreeMask & (((yDbMask)1)<<u.aw.iDb))!=0 );
+  u.aw.pDb = &db->aDb[u.aw.iDb];
+  u.aw.pX = u.aw.pDb->pBt;
+  assert( u.aw.pX!=0 );
+  if( pOp->opcode==OP_OpenWrite ){
+    u.aw.wrFlag = 1;
+    assert( sqlite3SchemaMutexHeld(db, u.aw.iDb, 0) );
+    if( u.aw.pDb->pSchema->file_format < p->minWriteFileFormat ){
+      p->minWriteFileFormat = u.aw.pDb->pSchema->file_format;
+    }
+  }else{
+    u.aw.wrFlag = 0;
+  }
+  if( pOp->p5 ){
+    assert( u.aw.p2>0 );
+    assert( u.aw.p2<=p->nMem );
+    pIn2 = &aMem[u.aw.p2];
+    assert( memIsValid(pIn2) );
+    assert( (pIn2->flags & MEM_Int)!=0 );
+    sqlite3VdbeMemIntegerify(pIn2);
+    u.aw.p2 = (int)pIn2->u.i;
+    /* The u.aw.p2 value always comes from a prior OP_CreateTable opcode and
+    ** that opcode will always set the u.aw.p2 value to 2 or more or else fail.
+    ** If there were a failure, the prepared statement would have halted
+    ** before reaching this instruction. */
+    if( NEVER(u.aw.p2<2) ) {
+      rc = SQLITE_CORRUPT_BKPT;
+      goto abort_due_to_error;
+    }
+  }
+  if( pOp->p4type==P4_KEYINFO ){
+    u.aw.pKeyInfo = pOp->p4.pKeyInfo;
+    u.aw.pKeyInfo->enc = ENC(p->db);
+    u.aw.nField = u.aw.pKeyInfo->nField+1;
+  }else if( pOp->p4type==P4_INT32 ){
+    u.aw.nField = pOp->p4.i;
+  }
+  assert( pOp->p1>=0 );
+  u.aw.pCur = allocateCursor(p, pOp->p1, u.aw.nField, u.aw.iDb, 1);
+  if( u.aw.pCur==0 ) goto no_mem;
+  u.aw.pCur->nullRow = 1;
+  u.aw.pCur->isOrdered = 1;
+  rc = sqlite3BtreeCursor(u.aw.pX, u.aw.p2, u.aw.wrFlag, u.aw.pKeyInfo, u.aw.pCur->pCursor);
+  u.aw.pCur->pKeyInfo = u.aw.pKeyInfo;
+
+  /* Since it performs no memory allocation or IO, the only values that
+  ** sqlite3BtreeCursor() may return are SQLITE_EMPTY and SQLITE_OK.
+  ** SQLITE_EMPTY is only returned when attempting to open the table
+  ** rooted at page 1 of a zero-byte database.  */
+  assert( rc==SQLITE_EMPTY || rc==SQLITE_OK );
+  if( rc==SQLITE_EMPTY ){
+    u.aw.pCur->pCursor = 0;
+    rc = SQLITE_OK;
+  }
+
+  /* Set the VdbeCursor.isTable and isIndex variables. Previous versions of
+  ** SQLite used to check if the root-page flags were sane at this point
+  ** and report database corruption if they were not, but this check has
+  ** since moved into the btree layer.  */
+  u.aw.pCur->isTable = pOp->p4type!=P4_KEYINFO;
+  u.aw.pCur->isIndex = !u.aw.pCur->isTable;
+  break;
+}
+
+/* Opcode: OpenEphemeral P1 P2 * P4 *
+**
+** Open a new cursor P1 to a transient table.
+** The cursor is always opened read/write even if 
+** the main database is read-only.  The ephemeral
+** table is deleted automatically when the cursor is closed.
+**
+** P2 is the number of columns in the ephemeral table.
+** The cursor points to a BTree table if P4==0 and to a BTree index
+** if P4 is not 0.  If P4 is not NULL, it points to a KeyInfo structure
+** that defines the format of keys in the index.
+**
+** This opcode was once called OpenTemp.  But that created
+** confusion because the term "temp table", might refer either
+** to a TEMP table at the SQL level, or to a table opened by
+** this opcode.  Then this opcode was call OpenVirtual.  But
+** that created confusion with the whole virtual-table idea.
+*/
+/* Opcode: OpenAutoindex P1 P2 * P4 *
+**
+** This opcode works the same as OP_OpenEphemeral.  It has a
+** different name to distinguish its use.  Tables created using
+** by this opcode will be used for automatically created transient
+** indices in joins.
+*/
+case OP_OpenAutoindex: 
+case OP_OpenEphemeral: {
+#if 0  /* local variables moved into u.ax */
+  VdbeCursor *pCx;
+#endif /* local variables moved into u.ax */
+  static const int vfsFlags =
+      SQLITE_OPEN_READWRITE |
+      SQLITE_OPEN_CREATE |
+      SQLITE_OPEN_EXCLUSIVE |
+      SQLITE_OPEN_DELETEONCLOSE |
+      SQLITE_OPEN_TRANSIENT_DB;
+
+  assert( pOp->p1>=0 );
+  u.ax.pCx = allocateCursor(p, pOp->p1, pOp->p2, -1, 1);
+  if( u.ax.pCx==0 ) goto no_mem;
+  u.ax.pCx->nullRow = 1;
+  rc = sqlite3BtreeOpen(0, db, &u.ax.pCx->pBt,
+                        BTREE_OMIT_JOURNAL | BTREE_SINGLE | pOp->p5, vfsFlags);
+  if( rc==SQLITE_OK ){
+    rc = sqlite3BtreeBeginTrans(u.ax.pCx->pBt, 1);
+  }
+  if( rc==SQLITE_OK ){
+    /* If a transient index is required, create it by calling
+    ** sqlite3BtreeCreateTable() with the BTREE_BLOBKEY flag before
+    ** opening it. If a transient table is required, just use the
+    ** automatically created table with root-page 1 (an BLOB_INTKEY table).
+    */
+    if( pOp->p4.pKeyInfo ){
+      int pgno;
+      assert( pOp->p4type==P4_KEYINFO );
+      rc = sqlite3BtreeCreateTable(u.ax.pCx->pBt, &pgno, BTREE_BLOBKEY);
+      if( rc==SQLITE_OK ){
+        assert( pgno==MASTER_ROOT+1 );
+        rc = sqlite3BtreeCursor(u.ax.pCx->pBt, pgno, 1,
+                                (KeyInfo*)pOp->p4.z, u.ax.pCx->pCursor);
+        u.ax.pCx->pKeyInfo = pOp->p4.pKeyInfo;
+        u.ax.pCx->pKeyInfo->enc = ENC(p->db);
+      }
+      u.ax.pCx->isTable = 0;
+    }else{
+      rc = sqlite3BtreeCursor(u.ax.pCx->pBt, MASTER_ROOT, 1, 0, u.ax.pCx->pCursor);
+      u.ax.pCx->isTable = 1;
+    }
+  }
+  u.ax.pCx->isOrdered = (pOp->p5!=BTREE_UNORDERED);
+  u.ax.pCx->isIndex = !u.ax.pCx->isTable;
+  break;
+}
+
+/* Opcode: OpenPseudo P1 P2 P3 * *
+**
+** Open a new cursor that points to a fake table that contains a single
+** row of data.  The content of that one row in the content of memory
+** register P2.  In other words, cursor P1 becomes an alias for the 
+** MEM_Blob content contained in register P2.
+**
+** A pseudo-table created by this opcode is used to hold a single
+** row output from the sorter so that the row can be decomposed into
+** individual columns using the OP_Column opcode.  The OP_Column opcode
+** is the only cursor opcode that works with a pseudo-table.
+**
+** P3 is the number of fields in the records that will be stored by
+** the pseudo-table.
+*/
+case OP_OpenPseudo: {
+#if 0  /* local variables moved into u.ay */
+  VdbeCursor *pCx;
+#endif /* local variables moved into u.ay */
+
+  assert( pOp->p1>=0 );
+  u.ay.pCx = allocateCursor(p, pOp->p1, pOp->p3, -1, 0);
+  if( u.ay.pCx==0 ) goto no_mem;
+  u.ay.pCx->nullRow = 1;
+  u.ay.pCx->pseudoTableReg = pOp->p2;
+  u.ay.pCx->isTable = 1;
+  u.ay.pCx->isIndex = 0;
+  break;
+}
+
+/* Opcode: Close P1 * * * *
+**
+** Close a cursor previously opened as P1.  If P1 is not
+** currently open, this instruction is a no-op.
+*/
+case OP_Close: {
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  sqlite3VdbeFreeCursor(p, p->apCsr[pOp->p1]);
+  p->apCsr[pOp->p1] = 0;
+  break;
+}
+
+/* Opcode: SeekGe P1 P2 P3 P4 *
+**
+** If cursor P1 refers to an SQL table (B-Tree that uses integer keys), 
+** use the value in register P3 as the key.  If cursor P1 refers 
+** to an SQL index, then P3 is the first in an array of P4 registers 
+** that are used as an unpacked index key. 
+**
+** Reposition cursor P1 so that  it points to the smallest entry that 
+** is greater than or equal to the key value. If there are no records 
+** greater than or equal to the key and P2 is not zero, then jump to P2.
+**
+** See also: Found, NotFound, Distinct, SeekLt, SeekGt, SeekLe
+*/
+/* Opcode: SeekGt P1 P2 P3 P4 *
+**
+** If cursor P1 refers to an SQL table (B-Tree that uses integer keys), 
+** use the value in register P3 as a key. If cursor P1 refers 
+** to an SQL index, then P3 is the first in an array of P4 registers 
+** that are used as an unpacked index key. 
+**
+** Reposition cursor P1 so that  it points to the smallest entry that 
+** is greater than the key value. If there are no records greater than 
+** the key and P2 is not zero, then jump to P2.
+**
+** See also: Found, NotFound, Distinct, SeekLt, SeekGe, SeekLe
+*/
+/* Opcode: SeekLt P1 P2 P3 P4 * 
+**
+** If cursor P1 refers to an SQL table (B-Tree that uses integer keys), 
+** use the value in register P3 as a key. If cursor P1 refers 
+** to an SQL index, then P3 is the first in an array of P4 registers 
+** that are used as an unpacked index key. 
+**
+** Reposition cursor P1 so that  it points to the largest entry that 
+** is less than the key value. If there are no records less than 
+** the key and P2 is not zero, then jump to P2.
+**
+** See also: Found, NotFound, Distinct, SeekGt, SeekGe, SeekLe
+*/
+/* Opcode: SeekLe P1 P2 P3 P4 *
+**
+** If cursor P1 refers to an SQL table (B-Tree that uses integer keys), 
+** use the value in register P3 as a key. If cursor P1 refers 
+** to an SQL index, then P3 is the first in an array of P4 registers 
+** that are used as an unpacked index key. 
+**
+** Reposition cursor P1 so that it points to the largest entry that 
+** is less than or equal to the key value. If there are no records 
+** less than or equal to the key and P2 is not zero, then jump to P2.
+**
+** See also: Found, NotFound, Distinct, SeekGt, SeekGe, SeekLt
+*/
+case OP_SeekLt:         /* jump, in3 */
+case OP_SeekLe:         /* jump, in3 */
+case OP_SeekGe:         /* jump, in3 */
+case OP_SeekGt: {       /* jump, in3 */
+#if 0  /* local variables moved into u.az */
+  int res;
+  int oc;
+  VdbeCursor *pC;
+  UnpackedRecord r;
+  int nField;
+  i64 iKey;      /* The rowid we are to seek to */
+#endif /* local variables moved into u.az */
+
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  assert( pOp->p2!=0 );
+  u.az.pC = p->apCsr[pOp->p1];
+  assert( u.az.pC!=0 );
+  assert( u.az.pC->pseudoTableReg==0 );
+  assert( OP_SeekLe == OP_SeekLt+1 );
+  assert( OP_SeekGe == OP_SeekLt+2 );
+  assert( OP_SeekGt == OP_SeekLt+3 );
+  assert( u.az.pC->isOrdered );
+  if( u.az.pC->pCursor!=0 ){
+    u.az.oc = pOp->opcode;
+    u.az.pC->nullRow = 0;
+    if( u.az.pC->isTable ){
+      /* The input value in P3 might be of any type: integer, real, string,
+      ** blob, or NULL.  But it needs to be an integer before we can do
+      ** the seek, so covert it. */
+      pIn3 = &aMem[pOp->p3];
+      applyNumericAffinity(pIn3);
+      u.az.iKey = sqlite3VdbeIntValue(pIn3);
+      u.az.pC->rowidIsValid = 0;
+
+      /* If the P3 value could not be converted into an integer without
+      ** loss of information, then special processing is required... */
+      if( (pIn3->flags & MEM_Int)==0 ){
+        if( (pIn3->flags & MEM_Real)==0 ){
+          /* If the P3 value cannot be converted into any kind of a number,
+          ** then the seek is not possible, so jump to P2 */
+          pc = pOp->p2 - 1;
+          break;
+        }
+        /* If we reach this point, then the P3 value must be a floating
+        ** point number. */
+        assert( (pIn3->flags & MEM_Real)!=0 );
+
+        if( u.az.iKey==SMALLEST_INT64 && (pIn3->r<(double)u.az.iKey || pIn3->r>0) ){
+          /* The P3 value is too large in magnitude to be expressed as an
+          ** integer. */
+          u.az.res = 1;
+          if( pIn3->r<0 ){
+            if( u.az.oc>=OP_SeekGe ){  assert( u.az.oc==OP_SeekGe || u.az.oc==OP_SeekGt );
+              rc = sqlite3BtreeFirst(u.az.pC->pCursor, &u.az.res);
+              if( rc!=SQLITE_OK ) goto abort_due_to_error;
+            }
+          }else{
+            if( u.az.oc<=OP_SeekLe ){  assert( u.az.oc==OP_SeekLt || u.az.oc==OP_SeekLe );
+              rc = sqlite3BtreeLast(u.az.pC->pCursor, &u.az.res);
+              if( rc!=SQLITE_OK ) goto abort_due_to_error;
+            }
+          }
+          if( u.az.res ){
+            pc = pOp->p2 - 1;
+          }
+          break;
+        }else if( u.az.oc==OP_SeekLt || u.az.oc==OP_SeekGe ){
+          /* Use the ceiling() function to convert real->int */
+          if( pIn3->r > (double)u.az.iKey ) u.az.iKey++;
+        }else{
+          /* Use the floor() function to convert real->int */
+          assert( u.az.oc==OP_SeekLe || u.az.oc==OP_SeekGt );
+          if( pIn3->r < (double)u.az.iKey ) u.az.iKey--;
+        }
+      }
+      rc = sqlite3BtreeMovetoUnpacked(u.az.pC->pCursor, 0, (u64)u.az.iKey, 0, &u.az.res);
+      if( rc!=SQLITE_OK ){
+        goto abort_due_to_error;
+      }
+      if( u.az.res==0 ){
+        u.az.pC->rowidIsValid = 1;
+        u.az.pC->lastRowid = u.az.iKey;
+      }
+    }else{
+      u.az.nField = pOp->p4.i;
+      assert( pOp->p4type==P4_INT32 );
+      assert( u.az.nField>0 );
+      u.az.r.pKeyInfo = u.az.pC->pKeyInfo;
+      u.az.r.nField = (u16)u.az.nField;
+
+      /* The next line of code computes as follows, only faster:
+      **   if( u.az.oc==OP_SeekGt || u.az.oc==OP_SeekLe ){
+      **     u.az.r.flags = UNPACKED_INCRKEY;
+      **   }else{
+      **     u.az.r.flags = 0;
+      **   }
+      */
+      u.az.r.flags = (u16)(UNPACKED_INCRKEY * (1 & (u.az.oc - OP_SeekLt)));
+      assert( u.az.oc!=OP_SeekGt || u.az.r.flags==UNPACKED_INCRKEY );
+      assert( u.az.oc!=OP_SeekLe || u.az.r.flags==UNPACKED_INCRKEY );
+      assert( u.az.oc!=OP_SeekGe || u.az.r.flags==0 );
+      assert( u.az.oc!=OP_SeekLt || u.az.r.flags==0 );
+
+      u.az.r.aMem = &aMem[pOp->p3];
+#ifdef SQLITE_DEBUG
+      { int i; for(i=0; i<u.az.r.nField; i++) assert( memIsValid(&u.az.r.aMem[i]) ); }
+#endif
+      ExpandBlob(u.az.r.aMem);
+      rc = sqlite3BtreeMovetoUnpacked(u.az.pC->pCursor, &u.az.r, 0, 0, &u.az.res);
+      if( rc!=SQLITE_OK ){
+        goto abort_due_to_error;
+      }
+      u.az.pC->rowidIsValid = 0;
+    }
+    u.az.pC->deferredMoveto = 0;
+    u.az.pC->cacheStatus = CACHE_STALE;
+#ifdef SQLITE_TEST
+    sqlite3_search_count++;
+#endif
+    if( u.az.oc>=OP_SeekGe ){  assert( u.az.oc==OP_SeekGe || u.az.oc==OP_SeekGt );
+      if( u.az.res<0 || (u.az.res==0 && u.az.oc==OP_SeekGt) ){
+        rc = sqlite3BtreeNext(u.az.pC->pCursor, &u.az.res);
+        if( rc!=SQLITE_OK ) goto abort_due_to_error;
+        u.az.pC->rowidIsValid = 0;
+      }else{
+        u.az.res = 0;
+      }
+    }else{
+      assert( u.az.oc==OP_SeekLt || u.az.oc==OP_SeekLe );
+      if( u.az.res>0 || (u.az.res==0 && u.az.oc==OP_SeekLt) ){
+        rc = sqlite3BtreePrevious(u.az.pC->pCursor, &u.az.res);
+        if( rc!=SQLITE_OK ) goto abort_due_to_error;
+        u.az.pC->rowidIsValid = 0;
+      }else{
+        /* u.az.res might be negative because the table is empty.  Check to
+        ** see if this is the case.
+        */
+        u.az.res = sqlite3BtreeEof(u.az.pC->pCursor);
+      }
+    }
+    assert( pOp->p2>0 );
+    if( u.az.res ){
+      pc = pOp->p2 - 1;
+    }
+  }else{
+    /* This happens when attempting to open the sqlite3_master table
+    ** for read access returns SQLITE_EMPTY. In this case always
+    ** take the jump (since there are no records in the table).
+    */
+    pc = pOp->p2 - 1;
+  }
+  break;
+}
+
+/* Opcode: Seek P1 P2 * * *
+**
+** P1 is an open table cursor and P2 is a rowid integer.  Arrange
+** for P1 to move so that it points to the rowid given by P2.
+**
+** This is actually a deferred seek.  Nothing actually happens until
+** the cursor is used to read a record.  That way, if no reads
+** occur, no unnecessary I/O happens.
+*/
+case OP_Seek: {    /* in2 */
+#if 0  /* local variables moved into u.ba */
+  VdbeCursor *pC;
+#endif /* local variables moved into u.ba */
+
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.ba.pC = p->apCsr[pOp->p1];
+  assert( u.ba.pC!=0 );
+  if( ALWAYS(u.ba.pC->pCursor!=0) ){
+    assert( u.ba.pC->isTable );
+    u.ba.pC->nullRow = 0;
+    pIn2 = &aMem[pOp->p2];
+    u.ba.pC->movetoTarget = sqlite3VdbeIntValue(pIn2);
+    u.ba.pC->rowidIsValid = 0;
+    u.ba.pC->deferredMoveto = 1;
+  }
+  break;
+}
+  
+
+/* Opcode: Found P1 P2 P3 P4 *
+**
+** If P4==0 then register P3 holds a blob constructed by MakeRecord.  If
+** P4>0 then register P3 is the first of P4 registers that form an unpacked
+** record.
+**
+** Cursor P1 is on an index btree.  If the record identified by P3 and P4
+** is a prefix of any entry in P1 then a jump is made to P2 and
+** P1 is left pointing at the matching entry.
+*/
+/* Opcode: NotFound P1 P2 P3 P4 *
+**
+** If P4==0 then register P3 holds a blob constructed by MakeRecord.  If
+** P4>0 then register P3 is the first of P4 registers that form an unpacked
+** record.
+** 
+** Cursor P1 is on an index btree.  If the record identified by P3 and P4
+** is not the prefix of any entry in P1 then a jump is made to P2.  If P1 
+** does contain an entry whose prefix matches the P3/P4 record then control
+** falls through to the next instruction and P1 is left pointing at the
+** matching entry.
+**
+** See also: Found, NotExists, IsUnique
+*/
+case OP_NotFound:       /* jump, in3 */
+case OP_Found: {        /* jump, in3 */
+#if 0  /* local variables moved into u.bb */
+  int alreadyExists;
+  VdbeCursor *pC;
+  int res;
+  UnpackedRecord *pIdxKey;
+  UnpackedRecord r;
+  char aTempRec[ROUND8(sizeof(UnpackedRecord)) + sizeof(Mem)*3 + 7];
+#endif /* local variables moved into u.bb */
+
+#ifdef SQLITE_TEST
+  sqlite3_found_count++;
+#endif
+
+  u.bb.alreadyExists = 0;
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  assert( pOp->p4type==P4_INT32 );
+  u.bb.pC = p->apCsr[pOp->p1];
+  assert( u.bb.pC!=0 );
+  pIn3 = &aMem[pOp->p3];
+  if( ALWAYS(u.bb.pC->pCursor!=0) ){
+
+    assert( u.bb.pC->isTable==0 );
+    if( pOp->p4.i>0 ){
+      u.bb.r.pKeyInfo = u.bb.pC->pKeyInfo;
+      u.bb.r.nField = (u16)pOp->p4.i;
+      u.bb.r.aMem = pIn3;
+#ifdef SQLITE_DEBUG
+      { int i; for(i=0; i<u.bb.r.nField; i++) assert( memIsValid(&u.bb.r.aMem[i]) ); }
+#endif
+      u.bb.r.flags = UNPACKED_PREFIX_MATCH;
+      u.bb.pIdxKey = &u.bb.r;
+    }else{
+      assert( pIn3->flags & MEM_Blob );
+      assert( (pIn3->flags & MEM_Zero)==0 );  /* zeroblobs already expanded */
+      u.bb.pIdxKey = sqlite3VdbeRecordUnpack(u.bb.pC->pKeyInfo, pIn3->n, pIn3->z,
+                                        u.bb.aTempRec, sizeof(u.bb.aTempRec));
+      if( u.bb.pIdxKey==0 ){
+        goto no_mem;
+      }
+      u.bb.pIdxKey->flags |= UNPACKED_PREFIX_MATCH;
+    }
+    rc = sqlite3BtreeMovetoUnpacked(u.bb.pC->pCursor, u.bb.pIdxKey, 0, 0, &u.bb.res);
+    if( pOp->p4.i==0 ){
+      sqlite3VdbeDeleteUnpackedRecord(u.bb.pIdxKey);
+    }
+    if( rc!=SQLITE_OK ){
+      break;
+    }
+    u.bb.alreadyExists = (u.bb.res==0);
+    u.bb.pC->deferredMoveto = 0;
+    u.bb.pC->cacheStatus = CACHE_STALE;
+  }
+  if( pOp->opcode==OP_Found ){
+    if( u.bb.alreadyExists ) pc = pOp->p2 - 1;
+  }else{
+    if( !u.bb.alreadyExists ) pc = pOp->p2 - 1;
+  }
+  break;
+}
+
+/* Opcode: IsUnique P1 P2 P3 P4 *
+**
+** Cursor P1 is open on an index b-tree - that is to say, a btree which
+** no data and where the key are records generated by OP_MakeRecord with
+** the list field being the integer ROWID of the entry that the index
+** entry refers to.
+**
+** The P3 register contains an integer record number. Call this record 
+** number R. Register P4 is the first in a set of N contiguous registers
+** that make up an unpacked index key that can be used with cursor P1.
+** The value of N can be inferred from the cursor. N includes the rowid
+** value appended to the end of the index record. This rowid value may
+** or may not be the same as R.
+**
+** If any of the N registers beginning with register P4 contains a NULL
+** value, jump immediately to P2.
+**
+** Otherwise, this instruction checks if cursor P1 contains an entry
+** where the first (N-1) fields match but the rowid value at the end
+** of the index entry is not R. If there is no such entry, control jumps
+** to instruction P2. Otherwise, the rowid of the conflicting index
+** entry is copied to register P3 and control falls through to the next
+** instruction.
+**
+** See also: NotFound, NotExists, Found
+*/
+case OP_IsUnique: {        /* jump, in3 */
+#if 0  /* local variables moved into u.bc */
+  u16 ii;
+  VdbeCursor *pCx;
+  BtCursor *pCrsr;
+  u16 nField;
+  Mem *aMx;
+  UnpackedRecord r;                  /* B-Tree index search key */
+  i64 R;                             /* Rowid stored in register P3 */
+#endif /* local variables moved into u.bc */
+
+  pIn3 = &aMem[pOp->p3];
+  u.bc.aMx = &aMem[pOp->p4.i];
+  /* Assert that the values of parameters P1 and P4 are in range. */
+  assert( pOp->p4type==P4_INT32 );
+  assert( pOp->p4.i>0 && pOp->p4.i<=p->nMem );
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+
+  /* Find the index cursor. */
+  u.bc.pCx = p->apCsr[pOp->p1];
+  assert( u.bc.pCx->deferredMoveto==0 );
+  u.bc.pCx->seekResult = 0;
+  u.bc.pCx->cacheStatus = CACHE_STALE;
+  u.bc.pCrsr = u.bc.pCx->pCursor;
+
+  /* If any of the values are NULL, take the jump. */
+  u.bc.nField = u.bc.pCx->pKeyInfo->nField;
+  for(u.bc.ii=0; u.bc.ii<u.bc.nField; u.bc.ii++){
+    if( u.bc.aMx[u.bc.ii].flags & MEM_Null ){
+      pc = pOp->p2 - 1;
+      u.bc.pCrsr = 0;
+      break;
+    }
+  }
+  assert( (u.bc.aMx[u.bc.nField].flags & MEM_Null)==0 );
+
+  if( u.bc.pCrsr!=0 ){
+    /* Populate the index search key. */
+    u.bc.r.pKeyInfo = u.bc.pCx->pKeyInfo;
+    u.bc.r.nField = u.bc.nField + 1;
+    u.bc.r.flags = UNPACKED_PREFIX_SEARCH;
+    u.bc.r.aMem = u.bc.aMx;
+#ifdef SQLITE_DEBUG
+    { int i; for(i=0; i<u.bc.r.nField; i++) assert( memIsValid(&u.bc.r.aMem[i]) ); }
+#endif
+
+    /* Extract the value of u.bc.R from register P3. */
+    sqlite3VdbeMemIntegerify(pIn3);
+    u.bc.R = pIn3->u.i;
+
+    /* Search the B-Tree index. If no conflicting record is found, jump
+    ** to P2. Otherwise, copy the rowid of the conflicting record to
+    ** register P3 and fall through to the next instruction.  */
+    rc = sqlite3BtreeMovetoUnpacked(u.bc.pCrsr, &u.bc.r, 0, 0, &u.bc.pCx->seekResult);
+    if( (u.bc.r.flags & UNPACKED_PREFIX_SEARCH) || u.bc.r.rowid==u.bc.R ){
+      pc = pOp->p2 - 1;
+    }else{
+      pIn3->u.i = u.bc.r.rowid;
+    }
+  }
+  break;
+}
+
+/* Opcode: NotExists P1 P2 P3 * *
+**
+** Use the content of register P3 as a integer key.  If a record 
+** with that key does not exist in table of P1, then jump to P2. 
+** If the record does exist, then fall through.  The cursor is left 
+** pointing to the record if it exists.
+**
+** The difference between this operation and NotFound is that this
+** operation assumes the key is an integer and that P1 is a table whereas
+** NotFound assumes key is a blob constructed from MakeRecord and
+** P1 is an index.
+**
+** See also: Found, NotFound, IsUnique
+*/
+case OP_NotExists: {        /* jump, in3 */
+#if 0  /* local variables moved into u.bd */
+  VdbeCursor *pC;
+  BtCursor *pCrsr;
+  int res;
+  u64 iKey;
+#endif /* local variables moved into u.bd */
+
+  pIn3 = &aMem[pOp->p3];
+  assert( pIn3->flags & MEM_Int );
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.bd.pC = p->apCsr[pOp->p1];
+  assert( u.bd.pC!=0 );
+  assert( u.bd.pC->isTable );
+  assert( u.bd.pC->pseudoTableReg==0 );
+  u.bd.pCrsr = u.bd.pC->pCursor;
+  if( u.bd.pCrsr!=0 ){
+    u.bd.res = 0;
+    u.bd.iKey = pIn3->u.i;
+    rc = sqlite3BtreeMovetoUnpacked(u.bd.pCrsr, 0, u.bd.iKey, 0, &u.bd.res);
+    u.bd.pC->lastRowid = pIn3->u.i;
+    u.bd.pC->rowidIsValid = u.bd.res==0 ?1:0;
+    u.bd.pC->nullRow = 0;
+    u.bd.pC->cacheStatus = CACHE_STALE;
+    u.bd.pC->deferredMoveto = 0;
+    if( u.bd.res!=0 ){
+      pc = pOp->p2 - 1;
+      assert( u.bd.pC->rowidIsValid==0 );
+    }
+    u.bd.pC->seekResult = u.bd.res;
+  }else{
+    /* This happens when an attempt to open a read cursor on the
+    ** sqlite_master table returns SQLITE_EMPTY.
+    */
+    pc = pOp->p2 - 1;
+    assert( u.bd.pC->rowidIsValid==0 );
+    u.bd.pC->seekResult = 0;
+  }
+  break;
+}
+
+/* Opcode: Sequence P1 P2 * * *
+**
+** Find the next available sequence number for cursor P1.
+** Write the sequence number into register P2.
+** The sequence number on the cursor is incremented after this
+** instruction.  
+*/
+case OP_Sequence: {           /* out2-prerelease */
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  assert( p->apCsr[pOp->p1]!=0 );
+  pOut->u.i = p->apCsr[pOp->p1]->seqCount++;
+  break;
+}
+
+
+/* Opcode: NewRowid P1 P2 P3 * *
+**
+** Get a new integer record number (a.k.a "rowid") used as the key to a table.
+** The record number is not previously used as a key in the database
+** table that cursor P1 points to.  The new record number is written
+** written to register P2.
+**
+** If P3>0 then P3 is a register in the root frame of this VDBE that holds 
+** the largest previously generated record number. No new record numbers are
+** allowed to be less than this value. When this value reaches its maximum, 
+** a SQLITE_FULL error is generated. The P3 register is updated with the '
+** generated record number. This P3 mechanism is used to help implement the
+** AUTOINCREMENT feature.
+*/
+case OP_NewRowid: {           /* out2-prerelease */
+#if 0  /* local variables moved into u.be */
+  i64 v;                 /* The new rowid */
+  VdbeCursor *pC;        /* Cursor of table to get the new rowid */
+  int res;               /* Result of an sqlite3BtreeLast() */
+  int cnt;               /* Counter to limit the number of searches */
+  Mem *pMem;             /* Register holding largest rowid for AUTOINCREMENT */
+  VdbeFrame *pFrame;     /* Root frame of VDBE */
+#endif /* local variables moved into u.be */
+
+  u.be.v = 0;
+  u.be.res = 0;
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.be.pC = p->apCsr[pOp->p1];
+  assert( u.be.pC!=0 );
+  if( NEVER(u.be.pC->pCursor==0) ){
+    /* The zero initialization above is all that is needed */
+  }else{
+    /* The next rowid or record number (different terms for the same
+    ** thing) is obtained in a two-step algorithm.
+    **
+    ** First we attempt to find the largest existing rowid and add one
+    ** to that.  But if the largest existing rowid is already the maximum
+    ** positive integer, we have to fall through to the second
+    ** probabilistic algorithm
+    **
+    ** The second algorithm is to select a rowid at random and see if
+    ** it already exists in the table.  If it does not exist, we have
+    ** succeeded.  If the random rowid does exist, we select a new one
+    ** and try again, up to 100 times.
+    */
+    assert( u.be.pC->isTable );
+
+#ifdef SQLITE_32BIT_ROWID
+#   define MAX_ROWID 0x7fffffff
+#else
+    /* Some compilers complain about constants of the form 0x7fffffffffffffff.
+    ** Others complain about 0x7ffffffffffffffffLL.  The following macro seems
+    ** to provide the constant while making all compilers happy.
+    */
+#   define MAX_ROWID  (i64)( (((u64)0x7fffffff)<<32) | (u64)0xffffffff )
+#endif
+
+    if( !u.be.pC->useRandomRowid ){
+      u.be.v = sqlite3BtreeGetCachedRowid(u.be.pC->pCursor);
+      if( u.be.v==0 ){
+        rc = sqlite3BtreeLast(u.be.pC->pCursor, &u.be.res);
+        if( rc!=SQLITE_OK ){
+          goto abort_due_to_error;
+        }
+        if( u.be.res ){
+          u.be.v = 1;   /* IMP: R-61914-48074 */
+        }else{
+          assert( sqlite3BtreeCursorIsValid(u.be.pC->pCursor) );
+          rc = sqlite3BtreeKeySize(u.be.pC->pCursor, &u.be.v);
+          assert( rc==SQLITE_OK );   /* Cannot fail following BtreeLast() */
+          if( u.be.v==MAX_ROWID ){
+            u.be.pC->useRandomRowid = 1;
+          }else{
+            u.be.v++;   /* IMP: R-29538-34987 */
+          }
+        }
+      }
+
+#ifndef SQLITE_OMIT_AUTOINCREMENT
+      if( pOp->p3 ){
+        /* Assert that P3 is a valid memory cell. */
+        assert( pOp->p3>0 );
+        if( p->pFrame ){
+          for(u.be.pFrame=p->pFrame; u.be.pFrame->pParent; u.be.pFrame=u.be.pFrame->pParent);
+          /* Assert that P3 is a valid memory cell. */
+          assert( pOp->p3<=u.be.pFrame->nMem );
+          u.be.pMem = &u.be.pFrame->aMem[pOp->p3];
+        }else{
+          /* Assert that P3 is a valid memory cell. */
+          assert( pOp->p3<=p->nMem );
+          u.be.pMem = &aMem[pOp->p3];
+          memAboutToChange(p, u.be.pMem);
+        }
+        assert( memIsValid(u.be.pMem) );
+
+        REGISTER_TRACE(pOp->p3, u.be.pMem);
+        sqlite3VdbeMemIntegerify(u.be.pMem);
+        assert( (u.be.pMem->flags & MEM_Int)!=0 );  /* mem(P3) holds an integer */
+        if( u.be.pMem->u.i==MAX_ROWID || u.be.pC->useRandomRowid ){
+          rc = SQLITE_FULL;   /* IMP: R-12275-61338 */
+          goto abort_due_to_error;
+        }
+        if( u.be.v<u.be.pMem->u.i+1 ){
+          u.be.v = u.be.pMem->u.i + 1;
+        }
+        u.be.pMem->u.i = u.be.v;
+      }
+#endif
+
+      sqlite3BtreeSetCachedRowid(u.be.pC->pCursor, u.be.v<MAX_ROWID ? u.be.v+1 : 0);
+    }
+    if( u.be.pC->useRandomRowid ){
+      /* IMPLEMENTATION-OF: R-07677-41881 If the largest ROWID is equal to the
+      ** largest possible integer (9223372036854775807) then the database
+      ** engine starts picking positive candidate ROWIDs at random until
+      ** it finds one that is not previously used. */
+      assert( pOp->p3==0 );  /* We cannot be in random rowid mode if this is
+                             ** an AUTOINCREMENT table. */
+      /* on the first attempt, simply do one more than previous */
+      u.be.v = db->lastRowid;
+      u.be.v &= (MAX_ROWID>>1); /* ensure doesn't go negative */
+      u.be.v++; /* ensure non-zero */
+      u.be.cnt = 0;
+      while(   ((rc = sqlite3BtreeMovetoUnpacked(u.be.pC->pCursor, 0, (u64)u.be.v,
+                                                 0, &u.be.res))==SQLITE_OK)
+            && (u.be.res==0)
+            && (++u.be.cnt<100)){
+        /* collision - try another random rowid */
+        sqlite3_randomness(sizeof(u.be.v), &u.be.v);
+        if( u.be.cnt<5 ){
+          /* try "small" random rowids for the initial attempts */
+          u.be.v &= 0xffffff;
+        }else{
+          u.be.v &= (MAX_ROWID>>1); /* ensure doesn't go negative */
+        }
+        u.be.v++; /* ensure non-zero */
+      }
+      if( rc==SQLITE_OK && u.be.res==0 ){
+        rc = SQLITE_FULL;   /* IMP: R-38219-53002 */
+        goto abort_due_to_error;
+      }
+      assert( u.be.v>0 );  /* EV: R-40812-03570 */
+    }
+    u.be.pC->rowidIsValid = 0;
+    u.be.pC->deferredMoveto = 0;
+    u.be.pC->cacheStatus = CACHE_STALE;
+  }
+  pOut->u.i = u.be.v;
+  break;
+}
+
+/* Opcode: Insert P1 P2 P3 P4 P5
+**
+** Write an entry into the table of cursor P1.  A new entry is
+** created if it doesn't already exist or the data for an existing
+** entry is overwritten.  The data is the value MEM_Blob stored in register
+** number P2. The key is stored in register P3. The key must
+** be a MEM_Int.
+**
+** If the OPFLAG_NCHANGE flag of P5 is set, then the row change count is
+** incremented (otherwise not).  If the OPFLAG_LASTROWID flag of P5 is set,
+** then rowid is stored for subsequent return by the
+** sqlite3_last_insert_rowid() function (otherwise it is unmodified).
+**
+** If the OPFLAG_USESEEKRESULT flag of P5 is set and if the result of
+** the last seek operation (OP_NotExists) was a success, then this
+** operation will not attempt to find the appropriate row before doing
+** the insert but will instead overwrite the row that the cursor is
+** currently pointing to.  Presumably, the prior OP_NotExists opcode
+** has already positioned the cursor correctly.  This is an optimization
+** that boosts performance by avoiding redundant seeks.
+**
+** If the OPFLAG_ISUPDATE flag is set, then this opcode is part of an
+** UPDATE operation.  Otherwise (if the flag is clear) then this opcode
+** is part of an INSERT operation.  The difference is only important to
+** the update hook.
+**
+** Parameter P4 may point to a string containing the table-name, or
+** may be NULL. If it is not NULL, then the update-hook 
+** (sqlite3.xUpdateCallback) is invoked following a successful insert.
+**
+** (WARNING/TODO: If P1 is a pseudo-cursor and P2 is dynamically
+** allocated, then ownership of P2 is transferred to the pseudo-cursor
+** and register P2 becomes ephemeral.  If the cursor is changed, the
+** value of register P2 will then change.  Make sure this does not
+** cause any problems.)
+**
+** This instruction only works on tables.  The equivalent instruction
+** for indices is OP_IdxInsert.
+*/
+/* Opcode: InsertInt P1 P2 P3 P4 P5
+**
+** This works exactly like OP_Insert except that the key is the
+** integer value P3, not the value of the integer stored in register P3.
+*/
+case OP_Insert: 
+case OP_InsertInt: {
+#if 0  /* local variables moved into u.bf */
+  Mem *pData;       /* MEM cell holding data for the record to be inserted */
+  Mem *pKey;        /* MEM cell holding key  for the record */
+  i64 iKey;         /* The integer ROWID or key for the record to be inserted */
+  VdbeCursor *pC;   /* Cursor to table into which insert is written */
+  int nZero;        /* Number of zero-bytes to append */
+  int seekResult;   /* Result of prior seek or 0 if no USESEEKRESULT flag */
+  const char *zDb;  /* database name - used by the update hook */
+  const char *zTbl; /* Table name - used by the opdate hook */
+  int op;           /* Opcode for update hook: SQLITE_UPDATE or SQLITE_INSERT */
+#endif /* local variables moved into u.bf */
+
+  u.bf.pData = &aMem[pOp->p2];
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  assert( memIsValid(u.bf.pData) );
+  u.bf.pC = p->apCsr[pOp->p1];
+  assert( u.bf.pC!=0 );
+  assert( u.bf.pC->pCursor!=0 );
+  assert( u.bf.pC->pseudoTableReg==0 );
+  assert( u.bf.pC->isTable );
+  REGISTER_TRACE(pOp->p2, u.bf.pData);
+
+  if( pOp->opcode==OP_Insert ){
+    u.bf.pKey = &aMem[pOp->p3];
+    assert( u.bf.pKey->flags & MEM_Int );
+    assert( memIsValid(u.bf.pKey) );
+    REGISTER_TRACE(pOp->p3, u.bf.pKey);
+    u.bf.iKey = u.bf.pKey->u.i;
+  }else{
+    assert( pOp->opcode==OP_InsertInt );
+    u.bf.iKey = pOp->p3;
+  }
+
+  if( pOp->p5 & OPFLAG_NCHANGE ) p->nChange++;
+  if( pOp->p5 & OPFLAG_LASTROWID ) db->lastRowid = u.bf.iKey;
+  if( u.bf.pData->flags & MEM_Null ){
+    u.bf.pData->z = 0;
+    u.bf.pData->n = 0;
+  }else{
+    assert( u.bf.pData->flags & (MEM_Blob|MEM_Str) );
+  }
+  u.bf.seekResult = ((pOp->p5 & OPFLAG_USESEEKRESULT) ? u.bf.pC->seekResult : 0);
+  if( u.bf.pData->flags & MEM_Zero ){
+    u.bf.nZero = u.bf.pData->u.nZero;
+  }else{
+    u.bf.nZero = 0;
+  }
+  sqlite3BtreeSetCachedRowid(u.bf.pC->pCursor, 0);
+  rc = sqlite3BtreeInsert(u.bf.pC->pCursor, 0, u.bf.iKey,
+                          u.bf.pData->z, u.bf.pData->n, u.bf.nZero,
+                          pOp->p5 & OPFLAG_APPEND, u.bf.seekResult
+  );
+  u.bf.pC->rowidIsValid = 0;
+  u.bf.pC->deferredMoveto = 0;
+  u.bf.pC->cacheStatus = CACHE_STALE;
+
+  /* Invoke the update-hook if required. */
+  if( rc==SQLITE_OK && db->xUpdateCallback && pOp->p4.z ){
+    u.bf.zDb = db->aDb[u.bf.pC->iDb].zName;
+    u.bf.zTbl = pOp->p4.z;
+    u.bf.op = ((pOp->p5 & OPFLAG_ISUPDATE) ? SQLITE_UPDATE : SQLITE_INSERT);
+    assert( u.bf.pC->isTable );
+    db->xUpdateCallback(db->pUpdateArg, u.bf.op, u.bf.zDb, u.bf.zTbl, u.bf.iKey);
+    assert( u.bf.pC->iDb>=0 );
+  }
+  break;
+}
+
+/* Opcode: Delete P1 P2 * P4 *
+**
+** Delete the record at which the P1 cursor is currently pointing.
+**
+** The cursor will be left pointing at either the next or the previous
+** record in the table. If it is left pointing at the next record, then
+** the next Next instruction will be a no-op.  Hence it is OK to delete
+** a record from within an Next loop.
+**
+** If the OPFLAG_NCHANGE flag of P2 is set, then the row change count is
+** incremented (otherwise not).
+**
+** P1 must not be pseudo-table.  It has to be a real table with
+** multiple rows.
+**
+** If P4 is not NULL, then it is the name of the table that P1 is
+** pointing to.  The update hook will be invoked, if it exists.
+** If P4 is not NULL then the P1 cursor must have been positioned
+** using OP_NotFound prior to invoking this opcode.
+*/
+case OP_Delete: {
+#if 0  /* local variables moved into u.bg */
+  i64 iKey;
+  VdbeCursor *pC;
+#endif /* local variables moved into u.bg */
+
+  u.bg.iKey = 0;
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.bg.pC = p->apCsr[pOp->p1];
+  assert( u.bg.pC!=0 );
+  assert( u.bg.pC->pCursor!=0 );  /* Only valid for real tables, no pseudotables */
+
+  /* If the update-hook will be invoked, set u.bg.iKey to the rowid of the
+  ** row being deleted.
+  */
+  if( db->xUpdateCallback && pOp->p4.z ){
+    assert( u.bg.pC->isTable );
+    assert( u.bg.pC->rowidIsValid );  /* lastRowid set by previous OP_NotFound */
+    u.bg.iKey = u.bg.pC->lastRowid;
+  }
+
+  /* The OP_Delete opcode always follows an OP_NotExists or OP_Last or
+  ** OP_Column on the same table without any intervening operations that
+  ** might move or invalidate the cursor.  Hence cursor u.bg.pC is always pointing
+  ** to the row to be deleted and the sqlite3VdbeCursorMoveto() operation
+  ** below is always a no-op and cannot fail.  We will run it anyhow, though,
+  ** to guard against future changes to the code generator.
+  **/
+  assert( u.bg.pC->deferredMoveto==0 );
+  rc = sqlite3VdbeCursorMoveto(u.bg.pC);
+  if( NEVER(rc!=SQLITE_OK) ) goto abort_due_to_error;
+
+  sqlite3BtreeSetCachedRowid(u.bg.pC->pCursor, 0);
+  rc = sqlite3BtreeDelete(u.bg.pC->pCursor);
+  u.bg.pC->cacheStatus = CACHE_STALE;
+
+  /* Invoke the update-hook if required. */
+  if( rc==SQLITE_OK && db->xUpdateCallback && pOp->p4.z ){
+    const char *zDb = db->aDb[u.bg.pC->iDb].zName;
+    const char *zTbl = pOp->p4.z;
+    db->xUpdateCallback(db->pUpdateArg, SQLITE_DELETE, zDb, zTbl, u.bg.iKey);
+    assert( u.bg.pC->iDb>=0 );
+  }
+  if( pOp->p2 & OPFLAG_NCHANGE ) p->nChange++;
+  break;
+}
+/* Opcode: ResetCount * * * * *
+**
+** The value of the change counter is copied to the database handle
+** change counter (returned by subsequent calls to sqlite3_changes()).
+** Then the VMs internal change counter resets to 0.
+** This is used by trigger programs.
+*/
+case OP_ResetCount: {
+  sqlite3VdbeSetChanges(db, p->nChange);
+  p->nChange = 0;
+  break;
+}
+
+/* Opcode: RowData P1 P2 * * *
+**
+** Write into register P2 the complete row data for cursor P1.
+** There is no interpretation of the data.  
+** It is just copied onto the P2 register exactly as 
+** it is found in the database file.
+**
+** If the P1 cursor must be pointing to a valid row (not a NULL row)
+** of a real table, not a pseudo-table.
+*/
+/* Opcode: RowKey P1 P2 * * *
+**
+** Write into register P2 the complete row key for cursor P1.
+** There is no interpretation of the data.  
+** The key is copied onto the P3 register exactly as 
+** it is found in the database file.
+**
+** If the P1 cursor must be pointing to a valid row (not a NULL row)
+** of a real table, not a pseudo-table.
+*/
+case OP_RowKey:
+case OP_RowData: {
+#if 0  /* local variables moved into u.bh */
+  VdbeCursor *pC;
+  BtCursor *pCrsr;
+  u32 n;
+  i64 n64;
+#endif /* local variables moved into u.bh */
+
+  pOut = &aMem[pOp->p2];
+  memAboutToChange(p, pOut);
+
+  /* Note that RowKey and RowData are really exactly the same instruction */
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.bh.pC = p->apCsr[pOp->p1];
+  assert( u.bh.pC->isTable || pOp->opcode==OP_RowKey );
+  assert( u.bh.pC->isIndex || pOp->opcode==OP_RowData );
+  assert( u.bh.pC!=0 );
+  assert( u.bh.pC->nullRow==0 );
+  assert( u.bh.pC->pseudoTableReg==0 );
+  assert( u.bh.pC->pCursor!=0 );
+  u.bh.pCrsr = u.bh.pC->pCursor;
+  assert( sqlite3BtreeCursorIsValid(u.bh.pCrsr) );
+
+  /* The OP_RowKey and OP_RowData opcodes always follow OP_NotExists or
+  ** OP_Rewind/Op_Next with no intervening instructions that might invalidate
+  ** the cursor.  Hence the following sqlite3VdbeCursorMoveto() call is always
+  ** a no-op and can never fail.  But we leave it in place as a safety.
+  */
+  assert( u.bh.pC->deferredMoveto==0 );
+  rc = sqlite3VdbeCursorMoveto(u.bh.pC);
+  if( NEVER(rc!=SQLITE_OK) ) goto abort_due_to_error;
+
+  if( u.bh.pC->isIndex ){
+    assert( !u.bh.pC->isTable );
+    rc = sqlite3BtreeKeySize(u.bh.pCrsr, &u.bh.n64);
+    assert( rc==SQLITE_OK );    /* True because of CursorMoveto() call above */
+    if( u.bh.n64>db->aLimit[SQLITE_LIMIT_LENGTH] ){
+      goto too_big;
+    }
+    u.bh.n = (u32)u.bh.n64;
+  }else{
+    rc = sqlite3BtreeDataSize(u.bh.pCrsr, &u.bh.n);
+    assert( rc==SQLITE_OK );    /* DataSize() cannot fail */
+    if( u.bh.n>(u32)db->aLimit[SQLITE_LIMIT_LENGTH] ){
+      goto too_big;
+    }
+  }
+  if( sqlite3VdbeMemGrow(pOut, u.bh.n, 0) ){
+    goto no_mem;
+  }
+  pOut->n = u.bh.n;
+  MemSetTypeFlag(pOut, MEM_Blob);
+  if( u.bh.pC->isIndex ){
+    rc = sqlite3BtreeKey(u.bh.pCrsr, 0, u.bh.n, pOut->z);
+  }else{
+    rc = sqlite3BtreeData(u.bh.pCrsr, 0, u.bh.n, pOut->z);
+  }
+  pOut->enc = SQLITE_UTF8;  /* In case the blob is ever cast to text */
+  UPDATE_MAX_BLOBSIZE(pOut);
+  break;
+}
+
+/* Opcode: Rowid P1 P2 * * *
+**
+** Store in register P2 an integer which is the key of the table entry that
+** P1 is currently point to.
+**
+** P1 can be either an ordinary table or a virtual table.  There used to
+** be a separate OP_VRowid opcode for use with virtual tables, but this
+** one opcode now works for both table types.
+*/
+case OP_Rowid: {                 /* out2-prerelease */
+#if 0  /* local variables moved into u.bi */
+  VdbeCursor *pC;
+  i64 v;
+  sqlite3_vtab *pVtab;
+  const sqlite3_module *pModule;
+#endif /* local variables moved into u.bi */
+
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.bi.pC = p->apCsr[pOp->p1];
+  assert( u.bi.pC!=0 );
+  assert( u.bi.pC->pseudoTableReg==0 );
+  if( u.bi.pC->nullRow ){
+    pOut->flags = MEM_Null;
+    break;
+  }else if( u.bi.pC->deferredMoveto ){
+    u.bi.v = u.bi.pC->movetoTarget;
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  }else if( u.bi.pC->pVtabCursor ){
+    u.bi.pVtab = u.bi.pC->pVtabCursor->pVtab;
+    u.bi.pModule = u.bi.pVtab->pModule;
+    assert( u.bi.pModule->xRowid );
+    rc = u.bi.pModule->xRowid(u.bi.pC->pVtabCursor, &u.bi.v);
+    importVtabErrMsg(p, u.bi.pVtab);
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+  }else{
+    assert( u.bi.pC->pCursor!=0 );
+    rc = sqlite3VdbeCursorMoveto(u.bi.pC);
+    if( rc ) goto abort_due_to_error;
+    if( u.bi.pC->rowidIsValid ){
+      u.bi.v = u.bi.pC->lastRowid;
+    }else{
+      rc = sqlite3BtreeKeySize(u.bi.pC->pCursor, &u.bi.v);
+      assert( rc==SQLITE_OK );  /* Always so because of CursorMoveto() above */
+    }
+  }
+  pOut->u.i = u.bi.v;
+  break;
+}
+
+/* Opcode: NullRow P1 * * * *
+**
+** Move the cursor P1 to a null row.  Any OP_Column operations
+** that occur while the cursor is on the null row will always
+** write a NULL.
+*/
+case OP_NullRow: {
+#if 0  /* local variables moved into u.bj */
+  VdbeCursor *pC;
+#endif /* local variables moved into u.bj */
+
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.bj.pC = p->apCsr[pOp->p1];
+  assert( u.bj.pC!=0 );
+  u.bj.pC->nullRow = 1;
+  u.bj.pC->rowidIsValid = 0;
+  if( u.bj.pC->pCursor ){
+    sqlite3BtreeClearCursor(u.bj.pC->pCursor);
+  }
+  break;
+}
+
+/* Opcode: Last P1 P2 * * *
+**
+** The next use of the Rowid or Column or Next instruction for P1 
+** will refer to the last entry in the database table or index.
+** If the table or index is empty and P2>0, then jump immediately to P2.
+** If P2 is 0 or if the table or index is not empty, fall through
+** to the following instruction.
+*/
+case OP_Last: {        /* jump */
+#if 0  /* local variables moved into u.bk */
+  VdbeCursor *pC;
+  BtCursor *pCrsr;
+  int res;
+#endif /* local variables moved into u.bk */
+
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.bk.pC = p->apCsr[pOp->p1];
+  assert( u.bk.pC!=0 );
+  u.bk.pCrsr = u.bk.pC->pCursor;
+  if( u.bk.pCrsr==0 ){
+    u.bk.res = 1;
+  }else{
+    rc = sqlite3BtreeLast(u.bk.pCrsr, &u.bk.res);
+  }
+  u.bk.pC->nullRow = (u8)u.bk.res;
+  u.bk.pC->deferredMoveto = 0;
+  u.bk.pC->rowidIsValid = 0;
+  u.bk.pC->cacheStatus = CACHE_STALE;
+  if( pOp->p2>0 && u.bk.res ){
+    pc = pOp->p2 - 1;
+  }
+  break;
+}
+
+
+/* Opcode: Sort P1 P2 * * *
+**
+** This opcode does exactly the same thing as OP_Rewind except that
+** it increments an undocumented global variable used for testing.
+**
+** Sorting is accomplished by writing records into a sorting index,
+** then rewinding that index and playing it back from beginning to
+** end.  We use the OP_Sort opcode instead of OP_Rewind to do the
+** rewinding so that the global variable will be incremented and
+** regression tests can determine whether or not the optimizer is
+** correctly optimizing out sorts.
+*/
+case OP_Sort: {        /* jump */
+#ifdef SQLITE_TEST
+  sqlite3_sort_count++;
+  sqlite3_search_count--;
+#endif
+  p->aCounter[SQLITE_STMTSTATUS_SORT-1]++;
+  /* Fall through into OP_Rewind */
+}
+/* Opcode: Rewind P1 P2 * * *
+**
+** The next use of the Rowid or Column or Next instruction for P1 
+** will refer to the first entry in the database table or index.
+** If the table or index is empty and P2>0, then jump immediately to P2.
+** If P2 is 0 or if the table or index is not empty, fall through
+** to the following instruction.
+*/
+case OP_Rewind: {        /* jump */
+#if 0  /* local variables moved into u.bl */
+  VdbeCursor *pC;
+  BtCursor *pCrsr;
+  int res;
+#endif /* local variables moved into u.bl */
+
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.bl.pC = p->apCsr[pOp->p1];
+  assert( u.bl.pC!=0 );
+  u.bl.res = 1;
+  if( (u.bl.pCrsr = u.bl.pC->pCursor)!=0 ){
+    rc = sqlite3BtreeFirst(u.bl.pCrsr, &u.bl.res);
+    u.bl.pC->atFirst = u.bl.res==0 ?1:0;
+    u.bl.pC->deferredMoveto = 0;
+    u.bl.pC->cacheStatus = CACHE_STALE;
+    u.bl.pC->rowidIsValid = 0;
+  }
+  u.bl.pC->nullRow = (u8)u.bl.res;
+  assert( pOp->p2>0 && pOp->p2<p->nOp );
+  if( u.bl.res ){
+    pc = pOp->p2 - 1;
+  }
+  break;
+}
+
+/* Opcode: Next P1 P2 * * P5
+**
+** Advance cursor P1 so that it points to the next key/data pair in its
+** table or index.  If there are no more key/value pairs then fall through
+** to the following instruction.  But if the cursor advance was successful,
+** jump immediately to P2.
+**
+** The P1 cursor must be for a real table, not a pseudo-table.
+**
+** If P5 is positive and the jump is taken, then event counter
+** number P5-1 in the prepared statement is incremented.
+**
+** See also: Prev
+*/
+/* Opcode: Prev P1 P2 * * P5
+**
+** Back up cursor P1 so that it points to the previous key/data pair in its
+** table or index.  If there is no previous key/value pairs then fall through
+** to the following instruction.  But if the cursor backup was successful,
+** jump immediately to P2.
+**
+** The P1 cursor must be for a real table, not a pseudo-table.
+**
+** If P5 is positive and the jump is taken, then event counter
+** number P5-1 in the prepared statement is incremented.
+*/
+case OP_Prev:          /* jump */
+case OP_Next: {        /* jump */
+#if 0  /* local variables moved into u.bm */
+  VdbeCursor *pC;
+  BtCursor *pCrsr;
+  int res;
+#endif /* local variables moved into u.bm */
+
+  CHECK_FOR_INTERRUPT;
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  assert( pOp->p5<=ArraySize(p->aCounter) );
+  u.bm.pC = p->apCsr[pOp->p1];
+  if( u.bm.pC==0 ){
+    break;  /* See ticket #2273 */
+  }
+  u.bm.pCrsr = u.bm.pC->pCursor;
+  if( u.bm.pCrsr==0 ){
+    u.bm.pC->nullRow = 1;
+    break;
+  }
+  u.bm.res = 1;
+  assert( u.bm.pC->deferredMoveto==0 );
+  rc = pOp->opcode==OP_Next ? sqlite3BtreeNext(u.bm.pCrsr, &u.bm.res) :
+                              sqlite3BtreePrevious(u.bm.pCrsr, &u.bm.res);
+  u.bm.pC->nullRow = (u8)u.bm.res;
+  u.bm.pC->cacheStatus = CACHE_STALE;
+  if( u.bm.res==0 ){
+    pc = pOp->p2 - 1;
+    if( pOp->p5 ) p->aCounter[pOp->p5-1]++;
+#ifdef SQLITE_TEST
+    sqlite3_search_count++;
+#endif
+  }
+  u.bm.pC->rowidIsValid = 0;
+  break;
+}
+
+/* Opcode: IdxInsert P1 P2 P3 * P5
+**
+** Register P2 holds a SQL index key made using the
+** MakeRecord instructions.  This opcode writes that key
+** into the index P1.  Data for the entry is nil.
+**
+** P3 is a flag that provides a hint to the b-tree layer that this
+** insert is likely to be an append.
+**
+** This instruction only works for indices.  The equivalent instruction
+** for tables is OP_Insert.
+*/
+case OP_IdxInsert: {        /* in2 */
+#if 0  /* local variables moved into u.bn */
+  VdbeCursor *pC;
+  BtCursor *pCrsr;
+  int nKey;
+  const char *zKey;
+#endif /* local variables moved into u.bn */
+
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.bn.pC = p->apCsr[pOp->p1];
+  assert( u.bn.pC!=0 );
+  pIn2 = &aMem[pOp->p2];
+  assert( pIn2->flags & MEM_Blob );
+  u.bn.pCrsr = u.bn.pC->pCursor;
+  if( ALWAYS(u.bn.pCrsr!=0) ){
+    assert( u.bn.pC->isTable==0 );
+    rc = ExpandBlob(pIn2);
+    if( rc==SQLITE_OK ){
+      u.bn.nKey = pIn2->n;
+      u.bn.zKey = pIn2->z;
+      rc = sqlite3BtreeInsert(u.bn.pCrsr, u.bn.zKey, u.bn.nKey, "", 0, 0, pOp->p3,
+          ((pOp->p5 & OPFLAG_USESEEKRESULT) ? u.bn.pC->seekResult : 0)
+      );
+      assert( u.bn.pC->deferredMoveto==0 );
+      u.bn.pC->cacheStatus = CACHE_STALE;
+    }
+  }
+  break;
+}
+
+/* Opcode: IdxDelete P1 P2 P3 * *
+**
+** The content of P3 registers starting at register P2 form
+** an unpacked index key. This opcode removes that entry from the 
+** index opened by cursor P1.
+*/
+case OP_IdxDelete: {
+#if 0  /* local variables moved into u.bo */
+  VdbeCursor *pC;
+  BtCursor *pCrsr;
+  int res;
+  UnpackedRecord r;
+#endif /* local variables moved into u.bo */
+
+  assert( pOp->p3>0 );
+  assert( pOp->p2>0 && pOp->p2+pOp->p3<=p->nMem+1 );
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.bo.pC = p->apCsr[pOp->p1];
+  assert( u.bo.pC!=0 );
+  u.bo.pCrsr = u.bo.pC->pCursor;
+  if( ALWAYS(u.bo.pCrsr!=0) ){
+    u.bo.r.pKeyInfo = u.bo.pC->pKeyInfo;
+    u.bo.r.nField = (u16)pOp->p3;
+    u.bo.r.flags = 0;
+    u.bo.r.aMem = &aMem[pOp->p2];
+#ifdef SQLITE_DEBUG
+    { int i; for(i=0; i<u.bo.r.nField; i++) assert( memIsValid(&u.bo.r.aMem[i]) ); }
+#endif
+    rc = sqlite3BtreeMovetoUnpacked(u.bo.pCrsr, &u.bo.r, 0, 0, &u.bo.res);
+    if( rc==SQLITE_OK && u.bo.res==0 ){
+      rc = sqlite3BtreeDelete(u.bo.pCrsr);
+    }
+    assert( u.bo.pC->deferredMoveto==0 );
+    u.bo.pC->cacheStatus = CACHE_STALE;
+  }
+  break;
+}
+
+/* Opcode: IdxRowid P1 P2 * * *
+**
+** Write into register P2 an integer which is the last entry in the record at
+** the end of the index key pointed to by cursor P1.  This integer should be
+** the rowid of the table entry to which this index entry points.
+**
+** See also: Rowid, MakeRecord.
+*/
+case OP_IdxRowid: {              /* out2-prerelease */
+#if 0  /* local variables moved into u.bp */
+  BtCursor *pCrsr;
+  VdbeCursor *pC;
+  i64 rowid;
+#endif /* local variables moved into u.bp */
+
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.bp.pC = p->apCsr[pOp->p1];
+  assert( u.bp.pC!=0 );
+  u.bp.pCrsr = u.bp.pC->pCursor;
+  pOut->flags = MEM_Null;
+  if( ALWAYS(u.bp.pCrsr!=0) ){
+    rc = sqlite3VdbeCursorMoveto(u.bp.pC);
+    if( NEVER(rc) ) goto abort_due_to_error;
+    assert( u.bp.pC->deferredMoveto==0 );
+    assert( u.bp.pC->isTable==0 );
+    if( !u.bp.pC->nullRow ){
+      rc = sqlite3VdbeIdxRowid(db, u.bp.pCrsr, &u.bp.rowid);
+      if( rc!=SQLITE_OK ){
+        goto abort_due_to_error;
+      }
+      pOut->u.i = u.bp.rowid;
+      pOut->flags = MEM_Int;
+    }
+  }
+  break;
+}
+
+/* Opcode: IdxGE P1 P2 P3 P4 P5
+**
+** The P4 register values beginning with P3 form an unpacked index 
+** key that omits the ROWID.  Compare this key value against the index 
+** that P1 is currently pointing to, ignoring the ROWID on the P1 index.
+**
+** If the P1 index entry is greater than or equal to the key value
+** then jump to P2.  Otherwise fall through to the next instruction.
+**
+** If P5 is non-zero then the key value is increased by an epsilon 
+** prior to the comparison.  This make the opcode work like IdxGT except
+** that if the key from register P3 is a prefix of the key in the cursor,
+** the result is false whereas it would be true with IdxGT.
+*/
+/* Opcode: IdxLT P1 P2 P3 P4 P5
+**
+** The P4 register values beginning with P3 form an unpacked index 
+** key that omits the ROWID.  Compare this key value against the index 
+** that P1 is currently pointing to, ignoring the ROWID on the P1 index.
+**
+** If the P1 index entry is less than the key value then jump to P2.
+** Otherwise fall through to the next instruction.
+**
+** If P5 is non-zero then the key value is increased by an epsilon prior 
+** to the comparison.  This makes the opcode work like IdxLE.
+*/
+case OP_IdxLT:          /* jump */
+case OP_IdxGE: {        /* jump */
+#if 0  /* local variables moved into u.bq */
+  VdbeCursor *pC;
+  int res;
+  UnpackedRecord r;
+#endif /* local variables moved into u.bq */
+
+  assert( pOp->p1>=0 && pOp->p1<p->nCursor );
+  u.bq.pC = p->apCsr[pOp->p1];
+  assert( u.bq.pC!=0 );
+  assert( u.bq.pC->isOrdered );
+  if( ALWAYS(u.bq.pC->pCursor!=0) ){
+    assert( u.bq.pC->deferredMoveto==0 );
+    assert( pOp->p5==0 || pOp->p5==1 );
+    assert( pOp->p4type==P4_INT32 );
+    u.bq.r.pKeyInfo = u.bq.pC->pKeyInfo;
+    u.bq.r.nField = (u16)pOp->p4.i;
+    if( pOp->p5 ){
+      u.bq.r.flags = UNPACKED_INCRKEY | UNPACKED_IGNORE_ROWID;
+    }else{
+      u.bq.r.flags = UNPACKED_IGNORE_ROWID;
+    }
+    u.bq.r.aMem = &aMem[pOp->p3];
+#ifdef SQLITE_DEBUG
+    { int i; for(i=0; i<u.bq.r.nField; i++) assert( memIsValid(&u.bq.r.aMem[i]) ); }
+#endif
+    rc = sqlite3VdbeIdxKeyCompare(u.bq.pC, &u.bq.r, &u.bq.res);
+    if( pOp->opcode==OP_IdxLT ){
+      u.bq.res = -u.bq.res;
+    }else{
+      assert( pOp->opcode==OP_IdxGE );
+      u.bq.res++;
+    }
+    if( u.bq.res>0 ){
+      pc = pOp->p2 - 1 ;
+    }
+  }
+  break;
+}
+
+/* Opcode: Destroy P1 P2 P3 * *
+**
+** Delete an entire database table or index whose root page in the database
+** file is given by P1.
+**
+** The table being destroyed is in the main database file if P3==0.  If
+** P3==1 then the table to be clear is in the auxiliary database file
+** that is used to store tables create using CREATE TEMPORARY TABLE.
+**
+** If AUTOVACUUM is enabled then it is possible that another root page
+** might be moved into the newly deleted root page in order to keep all
+** root pages contiguous at the beginning of the database.  The former
+** value of the root page that moved - its value before the move occurred -
+** is stored in register P2.  If no page 
+** movement was required (because the table being dropped was already 
+** the last one in the database) then a zero is stored in register P2.
+** If AUTOVACUUM is disabled then a zero is stored in register P2.
+**
+** See also: Clear
+*/
+case OP_Destroy: {     /* out2-prerelease */
+#if 0  /* local variables moved into u.br */
+  int iMoved;
+  int iCnt;
+  Vdbe *pVdbe;
+  int iDb;
+#endif /* local variables moved into u.br */
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  u.br.iCnt = 0;
+  for(u.br.pVdbe=db->pVdbe; u.br.pVdbe; u.br.pVdbe = u.br.pVdbe->pNext){
+    if( u.br.pVdbe->magic==VDBE_MAGIC_RUN && u.br.pVdbe->inVtabMethod<2 && u.br.pVdbe->pc>=0 ){
+      u.br.iCnt++;
+    }
+  }
+#else
+  u.br.iCnt = db->activeVdbeCnt;
+#endif
+  pOut->flags = MEM_Null;
+  if( u.br.iCnt>1 ){
+    rc = SQLITE_LOCKED;
+    p->errorAction = OE_Abort;
+  }else{
+    u.br.iDb = pOp->p3;
+    assert( u.br.iCnt==1 );
+    assert( (p->btreeMask & (((yDbMask)1)<<u.br.iDb))!=0 );
+    rc = sqlite3BtreeDropTable(db->aDb[u.br.iDb].pBt, pOp->p1, &u.br.iMoved);
+    pOut->flags = MEM_Int;
+    pOut->u.i = u.br.iMoved;
+#ifndef SQLITE_OMIT_AUTOVACUUM
+    if( rc==SQLITE_OK && u.br.iMoved!=0 ){
+      sqlite3RootPageMoved(db, u.br.iDb, u.br.iMoved, pOp->p1);
+      /* All OP_Destroy operations occur on the same btree */
+      assert( resetSchemaOnFault==0 || resetSchemaOnFault==u.br.iDb+1 );
+      resetSchemaOnFault = (u8)u.br.iDb+1;
+    }
+#endif
+  }
+  break;
+}
+
+/* Opcode: Clear P1 P2 P3
+**
+** Delete all contents of the database table or index whose root page
+** in the database file is given by P1.  But, unlike Destroy, do not
+** remove the table or index from the database file.
+**
+** The table being clear is in the main database file if P2==0.  If
+** P2==1 then the table to be clear is in the auxiliary database file
+** that is used to store tables create using CREATE TEMPORARY TABLE.
+**
+** If the P3 value is non-zero, then the table referred to must be an
+** intkey table (an SQL table, not an index). In this case the row change 
+** count is incremented by the number of rows in the table being cleared. 
+** If P3 is greater than zero, then the value stored in register P3 is
+** also incremented by the number of rows in the table being cleared.
+**
+** See also: Destroy
+*/
+case OP_Clear: {
+#if 0  /* local variables moved into u.bs */
+  int nChange;
+#endif /* local variables moved into u.bs */
+
+  u.bs.nChange = 0;
+  assert( (p->btreeMask & (((yDbMask)1)<<pOp->p2))!=0 );
+  rc = sqlite3BtreeClearTable(
+      db->aDb[pOp->p2].pBt, pOp->p1, (pOp->p3 ? &u.bs.nChange : 0)
+  );
+  if( pOp->p3 ){
+    p->nChange += u.bs.nChange;
+    if( pOp->p3>0 ){
+      assert( memIsValid(&aMem[pOp->p3]) );
+      memAboutToChange(p, &aMem[pOp->p3]);
+      aMem[pOp->p3].u.i += u.bs.nChange;
+    }
+  }
+  break;
+}
+
+/* Opcode: CreateTable P1 P2 * * *
+**
+** Allocate a new table in the main database file if P1==0 or in the
+** auxiliary database file if P1==1 or in an attached database if
+** P1>1.  Write the root page number of the new table into
+** register P2
+**
+** The difference between a table and an index is this:  A table must
+** have a 4-byte integer key and can have arbitrary data.  An index
+** has an arbitrary key but no data.
+**
+** See also: CreateIndex
+*/
+/* Opcode: CreateIndex P1 P2 * * *
+**
+** Allocate a new index in the main database file if P1==0 or in the
+** auxiliary database file if P1==1 or in an attached database if
+** P1>1.  Write the root page number of the new table into
+** register P2.
+**
+** See documentation on OP_CreateTable for additional information.
+*/
+case OP_CreateIndex:            /* out2-prerelease */
+case OP_CreateTable: {          /* out2-prerelease */
+#if 0  /* local variables moved into u.bt */
+  int pgno;
+  int flags;
+  Db *pDb;
+#endif /* local variables moved into u.bt */
+
+  u.bt.pgno = 0;
+  assert( pOp->p1>=0 && pOp->p1<db->nDb );
+  assert( (p->btreeMask & (((yDbMask)1)<<pOp->p1))!=0 );
+  u.bt.pDb = &db->aDb[pOp->p1];
+  assert( u.bt.pDb->pBt!=0 );
+  if( pOp->opcode==OP_CreateTable ){
+    /* u.bt.flags = BTREE_INTKEY; */
+    u.bt.flags = BTREE_INTKEY;
+  }else{
+    u.bt.flags = BTREE_BLOBKEY;
+  }
+  rc = sqlite3BtreeCreateTable(u.bt.pDb->pBt, &u.bt.pgno, u.bt.flags);
+  pOut->u.i = u.bt.pgno;
+  break;
+}
+
+/* Opcode: ParseSchema P1 * * P4 *
+**
+** Read and parse all entries from the SQLITE_MASTER table of database P1
+** that match the WHERE clause P4. 
+**
+** This opcode invokes the parser to create a new virtual machine,
+** then runs the new virtual machine.  It is thus a re-entrant opcode.
+*/
+case OP_ParseSchema: {
+#if 0  /* local variables moved into u.bu */
+  int iDb;
+  const char *zMaster;
+  char *zSql;
+  InitData initData;
+#endif /* local variables moved into u.bu */
+
+  /* Any prepared statement that invokes this opcode will hold mutexes
+  ** on every btree.  This is a prerequisite for invoking
+  ** sqlite3InitCallback().
+  */
+#ifdef SQLITE_DEBUG
+  for(u.bu.iDb=0; u.bu.iDb<db->nDb; u.bu.iDb++){
+    assert( u.bu.iDb==1 || sqlite3BtreeHoldsMutex(db->aDb[u.bu.iDb].pBt) );
+  }
+#endif
+
+  u.bu.iDb = pOp->p1;
+  assert( u.bu.iDb>=0 && u.bu.iDb<db->nDb );
+  assert( DbHasProperty(db, u.bu.iDb, DB_SchemaLoaded) );
+  /* Used to be a conditional */ {
+    u.bu.zMaster = SCHEMA_TABLE(u.bu.iDb);
+    u.bu.initData.db = db;
+    u.bu.initData.iDb = pOp->p1;
+    u.bu.initData.pzErrMsg = &p->zErrMsg;
+    u.bu.zSql = sqlite3MPrintf(db,
+       "SELECT name, rootpage, sql FROM '%q'.%s WHERE %s ORDER BY rowid",
+       db->aDb[u.bu.iDb].zName, u.bu.zMaster, pOp->p4.z);
+    if( u.bu.zSql==0 ){
+      rc = SQLITE_NOMEM;
+    }else{
+      assert( db->init.busy==0 );
+      db->init.busy = 1;
+      u.bu.initData.rc = SQLITE_OK;
+      assert( !db->mallocFailed );
+      rc = sqlite3_exec(db, u.bu.zSql, sqlite3InitCallback, &u.bu.initData, 0);
+      if( rc==SQLITE_OK ) rc = u.bu.initData.rc;
+      sqlite3DbFree(db, u.bu.zSql);
+      db->init.busy = 0;
+    }
+  }
+  if( rc==SQLITE_NOMEM ){
+    goto no_mem;
+  }
+  break;
+}
+
+#if !defined(SQLITE_OMIT_ANALYZE)
+/* Opcode: LoadAnalysis P1 * * * *
+**
+** Read the sqlite_stat1 table for database P1 and load the content
+** of that table into the internal index hash table.  This will cause
+** the analysis to be used when preparing all subsequent queries.
+*/
+case OP_LoadAnalysis: {
+  assert( pOp->p1>=0 && pOp->p1<db->nDb );
+  rc = sqlite3AnalysisLoad(db, pOp->p1);
+  break;  
+}
+#endif /* !defined(SQLITE_OMIT_ANALYZE) */
+
+/* Opcode: DropTable P1 * * P4 *
+**
+** Remove the internal (in-memory) data structures that describe
+** the table named P4 in database P1.  This is called after a table
+** is dropped in order to keep the internal representation of the
+** schema consistent with what is on disk.
+*/
+case OP_DropTable: {
+  sqlite3UnlinkAndDeleteTable(db, pOp->p1, pOp->p4.z);
+  break;
+}
+
+/* Opcode: DropIndex P1 * * P4 *
+**
+** Remove the internal (in-memory) data structures that describe
+** the index named P4 in database P1.  This is called after an index
+** is dropped in order to keep the internal representation of the
+** schema consistent with what is on disk.
+*/
+case OP_DropIndex: {
+  sqlite3UnlinkAndDeleteIndex(db, pOp->p1, pOp->p4.z);
+  break;
+}
+
+/* Opcode: DropTrigger P1 * * P4 *
+**
+** Remove the internal (in-memory) data structures that describe
+** the trigger named P4 in database P1.  This is called after a trigger
+** is dropped in order to keep the internal representation of the
+** schema consistent with what is on disk.
+*/
+case OP_DropTrigger: {
+  sqlite3UnlinkAndDeleteTrigger(db, pOp->p1, pOp->p4.z);
+  break;
+}
+
+
+#ifndef SQLITE_OMIT_INTEGRITY_CHECK
+/* Opcode: IntegrityCk P1 P2 P3 * P5
+**
+** Do an analysis of the currently open database.  Store in
+** register P1 the text of an error message describing any problems.
+** If no problems are found, store a NULL in register P1.
+**
+** The register P3 contains the maximum number of allowed errors.
+** At most reg(P3) errors will be reported.
+** In other words, the analysis stops as soon as reg(P1) errors are 
+** seen.  Reg(P1) is updated with the number of errors remaining.
+**
+** The root page numbers of all tables in the database are integer
+** stored in reg(P1), reg(P1+1), reg(P1+2), ....  There are P2 tables
+** total.
+**
+** If P5 is not zero, the check is done on the auxiliary database
+** file, not the main database file.
+**
+** This opcode is used to implement the integrity_check pragma.
+*/
+case OP_IntegrityCk: {
+#if 0  /* local variables moved into u.bv */
+  int nRoot;      /* Number of tables to check.  (Number of root pages.) */
+  int *aRoot;     /* Array of rootpage numbers for tables to be checked */
+  int j;          /* Loop counter */
+  int nErr;       /* Number of errors reported */
+  char *z;        /* Text of the error report */
+  Mem *pnErr;     /* Register keeping track of errors remaining */
+#endif /* local variables moved into u.bv */
+
+  u.bv.nRoot = pOp->p2;
+  assert( u.bv.nRoot>0 );
+  u.bv.aRoot = sqlite3DbMallocRaw(db, sizeof(int)*(u.bv.nRoot+1) );
+  if( u.bv.aRoot==0 ) goto no_mem;
+  assert( pOp->p3>0 && pOp->p3<=p->nMem );
+  u.bv.pnErr = &aMem[pOp->p3];
+  assert( (u.bv.pnErr->flags & MEM_Int)!=0 );
+  assert( (u.bv.pnErr->flags & (MEM_Str|MEM_Blob))==0 );
+  pIn1 = &aMem[pOp->p1];
+  for(u.bv.j=0; u.bv.j<u.bv.nRoot; u.bv.j++){
+    u.bv.aRoot[u.bv.j] = (int)sqlite3VdbeIntValue(&pIn1[u.bv.j]);
+  }
+  u.bv.aRoot[u.bv.j] = 0;
+  assert( pOp->p5<db->nDb );
+  assert( (p->btreeMask & (((yDbMask)1)<<pOp->p5))!=0 );
+  u.bv.z = sqlite3BtreeIntegrityCheck(db->aDb[pOp->p5].pBt, u.bv.aRoot, u.bv.nRoot,
+                                 (int)u.bv.pnErr->u.i, &u.bv.nErr);
+  sqlite3DbFree(db, u.bv.aRoot);
+  u.bv.pnErr->u.i -= u.bv.nErr;
+  sqlite3VdbeMemSetNull(pIn1);
+  if( u.bv.nErr==0 ){
+    assert( u.bv.z==0 );
+  }else if( u.bv.z==0 ){
+    goto no_mem;
+  }else{
+    sqlite3VdbeMemSetStr(pIn1, u.bv.z, -1, SQLITE_UTF8, sqlite3_free);
+  }
+  UPDATE_MAX_BLOBSIZE(pIn1);
+  sqlite3VdbeChangeEncoding(pIn1, encoding);
+  break;
+}
+#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
+
+/* Opcode: RowSetAdd P1 P2 * * *
+**
+** Insert the integer value held by register P2 into a boolean index
+** held in register P1.
+**
+** An assertion fails if P2 is not an integer.
+*/
+case OP_RowSetAdd: {       /* in1, in2 */
+  pIn1 = &aMem[pOp->p1];
+  pIn2 = &aMem[pOp->p2];
+  assert( (pIn2->flags & MEM_Int)!=0 );
+  if( (pIn1->flags & MEM_RowSet)==0 ){
+    sqlite3VdbeMemSetRowSet(pIn1);
+    if( (pIn1->flags & MEM_RowSet)==0 ) goto no_mem;
+  }
+  sqlite3RowSetInsert(pIn1->u.pRowSet, pIn2->u.i);
+  break;
+}
+
+/* Opcode: RowSetRead P1 P2 P3 * *
+**
+** Extract the smallest value from boolean index P1 and put that value into
+** register P3.  Or, if boolean index P1 is initially empty, leave P3
+** unchanged and jump to instruction P2.
+*/
+case OP_RowSetRead: {       /* jump, in1, out3 */
+#if 0  /* local variables moved into u.bw */
+  i64 val;
+#endif /* local variables moved into u.bw */
+  CHECK_FOR_INTERRUPT;
+  pIn1 = &aMem[pOp->p1];
+  if( (pIn1->flags & MEM_RowSet)==0
+   || sqlite3RowSetNext(pIn1->u.pRowSet, &u.bw.val)==0
+  ){
+    /* The boolean index is empty */
+    sqlite3VdbeMemSetNull(pIn1);
+    pc = pOp->p2 - 1;
+  }else{
+    /* A value was pulled from the index */
+    sqlite3VdbeMemSetInt64(&aMem[pOp->p3], u.bw.val);
+  }
+  break;
+}
+
+/* Opcode: RowSetTest P1 P2 P3 P4
+**
+** Register P3 is assumed to hold a 64-bit integer value. If register P1
+** contains a RowSet object and that RowSet object contains
+** the value held in P3, jump to register P2. Otherwise, insert the
+** integer in P3 into the RowSet and continue on to the
+** next opcode.
+**
+** The RowSet object is optimized for the case where successive sets
+** of integers, where each set contains no duplicates. Each set
+** of values is identified by a unique P4 value. The first set
+** must have P4==0, the final set P4=-1.  P4 must be either -1 or
+** non-negative.  For non-negative values of P4 only the lower 4
+** bits are significant.
+**
+** This allows optimizations: (a) when P4==0 there is no need to test
+** the rowset object for P3, as it is guaranteed not to contain it,
+** (b) when P4==-1 there is no need to insert the value, as it will
+** never be tested for, and (c) when a value that is part of set X is
+** inserted, there is no need to search to see if the same value was
+** previously inserted as part of set X (only if it was previously
+** inserted as part of some other set).
+*/
+case OP_RowSetTest: {                     /* jump, in1, in3 */
+#if 0  /* local variables moved into u.bx */
+  int iSet;
+  int exists;
+#endif /* local variables moved into u.bx */
+
+  pIn1 = &aMem[pOp->p1];
+  pIn3 = &aMem[pOp->p3];
+  u.bx.iSet = pOp->p4.i;
+  assert( pIn3->flags&MEM_Int );
+
+  /* If there is anything other than a rowset object in memory cell P1,
+  ** delete it now and initialize P1 with an empty rowset
+  */
+  if( (pIn1->flags & MEM_RowSet)==0 ){
+    sqlite3VdbeMemSetRowSet(pIn1);
+    if( (pIn1->flags & MEM_RowSet)==0 ) goto no_mem;
+  }
+
+  assert( pOp->p4type==P4_INT32 );
+  assert( u.bx.iSet==-1 || u.bx.iSet>=0 );
+  if( u.bx.iSet ){
+    u.bx.exists = sqlite3RowSetTest(pIn1->u.pRowSet,
+                               (u8)(u.bx.iSet>=0 ? u.bx.iSet & 0xf : 0xff),
+                               pIn3->u.i);
+    if( u.bx.exists ){
+      pc = pOp->p2 - 1;
+      break;
+    }
+  }
+  if( u.bx.iSet>=0 ){
+    sqlite3RowSetInsert(pIn1->u.pRowSet, pIn3->u.i);
+  }
+  break;
+}
+
+
+#ifndef SQLITE_OMIT_TRIGGER
+
+/* Opcode: Program P1 P2 P3 P4 *
+**
+** Execute the trigger program passed as P4 (type P4_SUBPROGRAM). 
+**
+** P1 contains the address of the memory cell that contains the first memory 
+** cell in an array of values used as arguments to the sub-program. P2 
+** contains the address to jump to if the sub-program throws an IGNORE 
+** exception using the RAISE() function. Register P3 contains the address 
+** of a memory cell in this (the parent) VM that is used to allocate the 
+** memory required by the sub-vdbe at runtime.
+**
+** P4 is a pointer to the VM containing the trigger program.
+*/
+case OP_Program: {        /* jump */
+#if 0  /* local variables moved into u.by */
+  int nMem;               /* Number of memory registers for sub-program */
+  int nByte;              /* Bytes of runtime space required for sub-program */
+  Mem *pRt;               /* Register to allocate runtime space */
+  Mem *pMem;              /* Used to iterate through memory cells */
+  Mem *pEnd;              /* Last memory cell in new array */
+  VdbeFrame *pFrame;      /* New vdbe frame to execute in */
+  SubProgram *pProgram;   /* Sub-program to execute */
+  void *t;                /* Token identifying trigger */
+#endif /* local variables moved into u.by */
+
+  u.by.pProgram = pOp->p4.pProgram;
+  u.by.pRt = &aMem[pOp->p3];
+  assert( memIsValid(u.by.pRt) );
+  assert( u.by.pProgram->nOp>0 );
+
+  /* If the p5 flag is clear, then recursive invocation of triggers is
+  ** disabled for backwards compatibility (p5 is set if this sub-program
+  ** is really a trigger, not a foreign key action, and the flag set
+  ** and cleared by the "PRAGMA recursive_triggers" command is clear).
+  **
+  ** It is recursive invocation of triggers, at the SQL level, that is
+  ** disabled. In some cases a single trigger may generate more than one
+  ** SubProgram (if the trigger may be executed with more than one different
+  ** ON CONFLICT algorithm). SubProgram structures associated with a
+  ** single trigger all have the same value for the SubProgram.token
+  ** variable.  */
+  if( pOp->p5 ){
+    u.by.t = u.by.pProgram->token;
+    for(u.by.pFrame=p->pFrame; u.by.pFrame && u.by.pFrame->token!=u.by.t; u.by.pFrame=u.by.pFrame->pParent);
+    if( u.by.pFrame ) break;
+  }
+
+  if( p->nFrame>=db->aLimit[SQLITE_LIMIT_TRIGGER_DEPTH] ){
+    rc = SQLITE_ERROR;
+    sqlite3SetString(&p->zErrMsg, db, "too many levels of trigger recursion");
+    break;
+  }
+
+  /* Register u.by.pRt is used to store the memory required to save the state
+  ** of the current program, and the memory required at runtime to execute
+  ** the trigger program. If this trigger has been fired before, then u.by.pRt
+  ** is already allocated. Otherwise, it must be initialized.  */
+  if( (u.by.pRt->flags&MEM_Frame)==0 ){
+    /* SubProgram.nMem is set to the number of memory cells used by the
+    ** program stored in SubProgram.aOp. As well as these, one memory
+    ** cell is required for each cursor used by the program. Set local
+    ** variable u.by.nMem (and later, VdbeFrame.nChildMem) to this value.
+    */
+    u.by.nMem = u.by.pProgram->nMem + u.by.pProgram->nCsr;
+    u.by.nByte = ROUND8(sizeof(VdbeFrame))
+              + u.by.nMem * sizeof(Mem)
+              + u.by.pProgram->nCsr * sizeof(VdbeCursor *);
+    u.by.pFrame = sqlite3DbMallocZero(db, u.by.nByte);
+    if( !u.by.pFrame ){
+      goto no_mem;
+    }
+    sqlite3VdbeMemRelease(u.by.pRt);
+    u.by.pRt->flags = MEM_Frame;
+    u.by.pRt->u.pFrame = u.by.pFrame;
+
+    u.by.pFrame->v = p;
+    u.by.pFrame->nChildMem = u.by.nMem;
+    u.by.pFrame->nChildCsr = u.by.pProgram->nCsr;
+    u.by.pFrame->pc = pc;
+    u.by.pFrame->aMem = p->aMem;
+    u.by.pFrame->nMem = p->nMem;
+    u.by.pFrame->apCsr = p->apCsr;
+    u.by.pFrame->nCursor = p->nCursor;
+    u.by.pFrame->aOp = p->aOp;
+    u.by.pFrame->nOp = p->nOp;
+    u.by.pFrame->token = u.by.pProgram->token;
+
+    u.by.pEnd = &VdbeFrameMem(u.by.pFrame)[u.by.pFrame->nChildMem];
+    for(u.by.pMem=VdbeFrameMem(u.by.pFrame); u.by.pMem!=u.by.pEnd; u.by.pMem++){
+      u.by.pMem->flags = MEM_Null;
+      u.by.pMem->db = db;
+    }
+  }else{
+    u.by.pFrame = u.by.pRt->u.pFrame;
+    assert( u.by.pProgram->nMem+u.by.pProgram->nCsr==u.by.pFrame->nChildMem );
+    assert( u.by.pProgram->nCsr==u.by.pFrame->nChildCsr );
+    assert( pc==u.by.pFrame->pc );
+  }
+
+  p->nFrame++;
+  u.by.pFrame->pParent = p->pFrame;
+  u.by.pFrame->lastRowid = db->lastRowid;
+  u.by.pFrame->nChange = p->nChange;
+  p->nChange = 0;
+  p->pFrame = u.by.pFrame;
+  p->aMem = aMem = &VdbeFrameMem(u.by.pFrame)[-1];
+  p->nMem = u.by.pFrame->nChildMem;
+  p->nCursor = (u16)u.by.pFrame->nChildCsr;
+  p->apCsr = (VdbeCursor **)&aMem[p->nMem+1];
+  p->aOp = aOp = u.by.pProgram->aOp;
+  p->nOp = u.by.pProgram->nOp;
+  pc = -1;
+
+  break;
+}
+
+/* Opcode: Param P1 P2 * * *
+**
+** This opcode is only ever present in sub-programs called via the 
+** OP_Program instruction. Copy a value currently stored in a memory 
+** cell of the calling (parent) frame to cell P2 in the current frames 
+** address space. This is used by trigger programs to access the new.* 
+** and old.* values.
+**
+** The address of the cell in the parent frame is determined by adding
+** the value of the P1 argument to the value of the P1 argument to the
+** calling OP_Program instruction.
+*/
+case OP_Param: {           /* out2-prerelease */
+#if 0  /* local variables moved into u.bz */
+  VdbeFrame *pFrame;
+  Mem *pIn;
+#endif /* local variables moved into u.bz */
+  u.bz.pFrame = p->pFrame;
+  u.bz.pIn = &u.bz.pFrame->aMem[pOp->p1 + u.bz.pFrame->aOp[u.bz.pFrame->pc].p1];
+  sqlite3VdbeMemShallowCopy(pOut, u.bz.pIn, MEM_Ephem);
+  break;
+}
+
+#endif /* #ifndef SQLITE_OMIT_TRIGGER */
+
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+/* Opcode: FkCounter P1 P2 * * *
+**
+** Increment a "constraint counter" by P2 (P2 may be negative or positive).
+** If P1 is non-zero, the database constraint counter is incremented 
+** (deferred foreign key constraints). Otherwise, if P1 is zero, the 
+** statement counter is incremented (immediate foreign key constraints).
+*/
+case OP_FkCounter: {
+  if( pOp->p1 ){
+    db->nDeferredCons += pOp->p2;
+  }else{
+    p->nFkConstraint += pOp->p2;
+  }
+  break;
+}
+
+/* Opcode: FkIfZero P1 P2 * * *
+**
+** This opcode tests if a foreign key constraint-counter is currently zero.
+** If so, jump to instruction P2. Otherwise, fall through to the next 
+** instruction.
+**
+** If P1 is non-zero, then the jump is taken if the database constraint-counter
+** is zero (the one that counts deferred constraint violations). If P1 is
+** zero, the jump is taken if the statement constraint-counter is zero
+** (immediate foreign key constraint violations).
+*/
+case OP_FkIfZero: {         /* jump */
+  if( pOp->p1 ){
+    if( db->nDeferredCons==0 ) pc = pOp->p2-1;
+  }else{
+    if( p->nFkConstraint==0 ) pc = pOp->p2-1;
+  }
+  break;
+}
+#endif /* #ifndef SQLITE_OMIT_FOREIGN_KEY */
+
+#ifndef SQLITE_OMIT_AUTOINCREMENT
+/* Opcode: MemMax P1 P2 * * *
+**
+** P1 is a register in the root frame of this VM (the root frame is
+** different from the current frame if this instruction is being executed
+** within a sub-program). Set the value of register P1 to the maximum of 
+** its current value and the value in register P2.
+**
+** This instruction throws an error if the memory cell is not initially
+** an integer.
+*/
+case OP_MemMax: {        /* in2 */
+#if 0  /* local variables moved into u.ca */
+  Mem *pIn1;
+  VdbeFrame *pFrame;
+#endif /* local variables moved into u.ca */
+  if( p->pFrame ){
+    for(u.ca.pFrame=p->pFrame; u.ca.pFrame->pParent; u.ca.pFrame=u.ca.pFrame->pParent);
+    u.ca.pIn1 = &u.ca.pFrame->aMem[pOp->p1];
+  }else{
+    u.ca.pIn1 = &aMem[pOp->p1];
+  }
+  assert( memIsValid(u.ca.pIn1) );
+  sqlite3VdbeMemIntegerify(u.ca.pIn1);
+  pIn2 = &aMem[pOp->p2];
+  sqlite3VdbeMemIntegerify(pIn2);
+  if( u.ca.pIn1->u.i<pIn2->u.i){
+    u.ca.pIn1->u.i = pIn2->u.i;
+  }
+  break;
+}
+#endif /* SQLITE_OMIT_AUTOINCREMENT */
+
+/* Opcode: IfPos P1 P2 * * *
+**
+** If the value of register P1 is 1 or greater, jump to P2.
+**
+** It is illegal to use this instruction on a register that does
+** not contain an integer.  An assertion fault will result if you try.
+*/
+case OP_IfPos: {        /* jump, in1 */
+  pIn1 = &aMem[pOp->p1];
+  assert( pIn1->flags&MEM_Int );
+  if( pIn1->u.i>0 ){
+     pc = pOp->p2 - 1;
+  }
+  break;
+}
+
+/* Opcode: IfNeg P1 P2 * * *
+**
+** If the value of register P1 is less than zero, jump to P2. 
+**
+** It is illegal to use this instruction on a register that does
+** not contain an integer.  An assertion fault will result if you try.
+*/
+case OP_IfNeg: {        /* jump, in1 */
+  pIn1 = &aMem[pOp->p1];
+  assert( pIn1->flags&MEM_Int );
+  if( pIn1->u.i<0 ){
+     pc = pOp->p2 - 1;
+  }
+  break;
+}
+
+/* Opcode: IfZero P1 P2 P3 * *
+**
+** The register P1 must contain an integer.  Add literal P3 to the
+** value in register P1.  If the result is exactly 0, jump to P2. 
+**
+** It is illegal to use this instruction on a register that does
+** not contain an integer.  An assertion fault will result if you try.
+*/
+case OP_IfZero: {        /* jump, in1 */
+  pIn1 = &aMem[pOp->p1];
+  assert( pIn1->flags&MEM_Int );
+  pIn1->u.i += pOp->p3;
+  if( pIn1->u.i==0 ){
+     pc = pOp->p2 - 1;
+  }
+  break;
+}
+
+/* Opcode: AggStep * P2 P3 P4 P5
+**
+** Execute the step function for an aggregate.  The
+** function has P5 arguments.   P4 is a pointer to the FuncDef
+** structure that specifies the function.  Use register
+** P3 as the accumulator.
+**
+** The P5 arguments are taken from register P2 and its
+** successors.
+*/
+case OP_AggStep: {
+#if 0  /* local variables moved into u.cb */
+  int n;
+  int i;
+  Mem *pMem;
+  Mem *pRec;
+  sqlite3_context ctx;
+  sqlite3_value **apVal;
+#endif /* local variables moved into u.cb */
+
+  u.cb.n = pOp->p5;
+  assert( u.cb.n>=0 );
+  u.cb.pRec = &aMem[pOp->p2];
+  u.cb.apVal = p->apArg;
+  assert( u.cb.apVal || u.cb.n==0 );
+  for(u.cb.i=0; u.cb.i<u.cb.n; u.cb.i++, u.cb.pRec++){
+    assert( memIsValid(u.cb.pRec) );
+    u.cb.apVal[u.cb.i] = u.cb.pRec;
+    memAboutToChange(p, u.cb.pRec);
+    sqlite3VdbeMemStoreType(u.cb.pRec);
+  }
+  u.cb.ctx.pFunc = pOp->p4.pFunc;
+  assert( pOp->p3>0 && pOp->p3<=p->nMem );
+  u.cb.ctx.pMem = u.cb.pMem = &aMem[pOp->p3];
+  u.cb.pMem->n++;
+  u.cb.ctx.s.flags = MEM_Null;
+  u.cb.ctx.s.z = 0;
+  u.cb.ctx.s.zMalloc = 0;
+  u.cb.ctx.s.xDel = 0;
+  u.cb.ctx.s.db = db;
+  u.cb.ctx.isError = 0;
+  u.cb.ctx.pColl = 0;
+  if( u.cb.ctx.pFunc->flags & SQLITE_FUNC_NEEDCOLL ){
+    assert( pOp>p->aOp );
+    assert( pOp[-1].p4type==P4_COLLSEQ );
+    assert( pOp[-1].opcode==OP_CollSeq );
+    u.cb.ctx.pColl = pOp[-1].p4.pColl;
+  }
+  (u.cb.ctx.pFunc->xStep)(&u.cb.ctx, u.cb.n, u.cb.apVal); /* IMP: R-24505-23230 */
+  if( u.cb.ctx.isError ){
+    sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(&u.cb.ctx.s));
+    rc = u.cb.ctx.isError;
+  }
+
+  sqlite3VdbeMemRelease(&u.cb.ctx.s);
+
+  break;
+}
+
+/* Opcode: AggFinal P1 P2 * P4 *
+**
+** Execute the finalizer function for an aggregate.  P1 is
+** the memory location that is the accumulator for the aggregate.
+**
+** P2 is the number of arguments that the step function takes and
+** P4 is a pointer to the FuncDef for this function.  The P2
+** argument is not used by this opcode.  It is only there to disambiguate
+** functions that can take varying numbers of arguments.  The
+** P4 argument is only needed for the degenerate case where
+** the step function was not previously called.
+*/
+case OP_AggFinal: {
+#if 0  /* local variables moved into u.cc */
+  Mem *pMem;
+#endif /* local variables moved into u.cc */
+  assert( pOp->p1>0 && pOp->p1<=p->nMem );
+  u.cc.pMem = &aMem[pOp->p1];
+  assert( (u.cc.pMem->flags & ~(MEM_Null|MEM_Agg))==0 );
+  rc = sqlite3VdbeMemFinalize(u.cc.pMem, pOp->p4.pFunc);
+  if( rc ){
+    sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3_value_text(u.cc.pMem));
+  }
+  sqlite3VdbeChangeEncoding(u.cc.pMem, encoding);
+  UPDATE_MAX_BLOBSIZE(u.cc.pMem);
+  if( sqlite3VdbeMemTooBig(u.cc.pMem) ){
+    goto too_big;
+  }
+  break;
+}
+
+#ifndef SQLITE_OMIT_WAL
+/* Opcode: Checkpoint P1 P2 P3 * *
+**
+** Checkpoint database P1. This is a no-op if P1 is not currently in
+** WAL mode. Parameter P2 is one of SQLITE_CHECKPOINT_PASSIVE, FULL
+** or RESTART.  Write 1 or 0 into mem[P3] if the checkpoint returns
+** SQLITE_BUSY or not, respectively.  Write the number of pages in the
+** WAL after the checkpoint into mem[P3+1] and the number of pages
+** in the WAL that have been checkpointed after the checkpoint
+** completes into mem[P3+2].  However on an error, mem[P3+1] and
+** mem[P3+2] are initialized to -1.
+*/
+case OP_Checkpoint: {
+#if 0  /* local variables moved into u.cd */
+  int i;                          /* Loop counter */
+  int aRes[3];                    /* Results */
+  Mem *pMem;                      /* Write results here */
+#endif /* local variables moved into u.cd */
+
+  u.cd.aRes[0] = 0;
+  u.cd.aRes[1] = u.cd.aRes[2] = -1;
+  assert( pOp->p2==SQLITE_CHECKPOINT_PASSIVE
+       || pOp->p2==SQLITE_CHECKPOINT_FULL
+       || pOp->p2==SQLITE_CHECKPOINT_RESTART
+  );
+  rc = sqlite3Checkpoint(db, pOp->p1, pOp->p2, &u.cd.aRes[1], &u.cd.aRes[2]);
+  if( rc==SQLITE_BUSY ){
+    rc = SQLITE_OK;
+    u.cd.aRes[0] = 1;
+  }
+  for(u.cd.i=0, u.cd.pMem = &aMem[pOp->p3]; u.cd.i<3; u.cd.i++, u.cd.pMem++){
+    sqlite3VdbeMemSetInt64(u.cd.pMem, (i64)u.cd.aRes[u.cd.i]);
+  }
+  break;
+};  
+#endif
+
+#ifndef SQLITE_OMIT_PRAGMA
+/* Opcode: JournalMode P1 P2 P3 * P5
+**
+** Change the journal mode of database P1 to P3. P3 must be one of the
+** PAGER_JOURNALMODE_XXX values. If changing between the various rollback
+** modes (delete, truncate, persist, off and memory), this is a simple
+** operation. No IO is required.
+**
+** If changing into or out of WAL mode the procedure is more complicated.
+**
+** Write a string containing the final journal-mode to register P2.
+*/
+case OP_JournalMode: {    /* out2-prerelease */
+#if 0  /* local variables moved into u.ce */
+  Btree *pBt;                     /* Btree to change journal mode of */
+  Pager *pPager;                  /* Pager associated with pBt */
+  int eNew;                       /* New journal mode */
+  int eOld;                       /* The old journal mode */
+  const char *zFilename;          /* Name of database file for pPager */
+#endif /* local variables moved into u.ce */
+
+  u.ce.eNew = pOp->p3;
+  assert( u.ce.eNew==PAGER_JOURNALMODE_DELETE
+       || u.ce.eNew==PAGER_JOURNALMODE_TRUNCATE
+       || u.ce.eNew==PAGER_JOURNALMODE_PERSIST
+       || u.ce.eNew==PAGER_JOURNALMODE_OFF
+       || u.ce.eNew==PAGER_JOURNALMODE_MEMORY
+       || u.ce.eNew==PAGER_JOURNALMODE_WAL
+       || u.ce.eNew==PAGER_JOURNALMODE_QUERY
+  );
+  assert( pOp->p1>=0 && pOp->p1<db->nDb );
+
+  u.ce.pBt = db->aDb[pOp->p1].pBt;
+  u.ce.pPager = sqlite3BtreePager(u.ce.pBt);
+  u.ce.eOld = sqlite3PagerGetJournalMode(u.ce.pPager);
+  if( u.ce.eNew==PAGER_JOURNALMODE_QUERY ) u.ce.eNew = u.ce.eOld;
+  if( !sqlite3PagerOkToChangeJournalMode(u.ce.pPager) ) u.ce.eNew = u.ce.eOld;
+
+#ifndef SQLITE_OMIT_WAL
+  u.ce.zFilename = sqlite3PagerFilename(u.ce.pPager);
+
+  /* Do not allow a transition to journal_mode=WAL for a database
+  ** in temporary storage or if the VFS does not support shared memory
+  */
+  if( u.ce.eNew==PAGER_JOURNALMODE_WAL
+   && (u.ce.zFilename[0]==0                         /* Temp file */
+       || !sqlite3PagerWalSupported(u.ce.pPager))   /* No shared-memory support */
+  ){
+    u.ce.eNew = u.ce.eOld;
+  }
+
+  if( (u.ce.eNew!=u.ce.eOld)
+   && (u.ce.eOld==PAGER_JOURNALMODE_WAL || u.ce.eNew==PAGER_JOURNALMODE_WAL)
+  ){
+    if( !db->autoCommit || db->activeVdbeCnt>1 ){
+      rc = SQLITE_ERROR;
+      sqlite3SetString(&p->zErrMsg, db,
+          "cannot change %s wal mode from within a transaction",
+          (u.ce.eNew==PAGER_JOURNALMODE_WAL ? "into" : "out of")
+      );
+      break;
+    }else{
+
+      if( u.ce.eOld==PAGER_JOURNALMODE_WAL ){
+        /* If leaving WAL mode, close the log file. If successful, the call
+        ** to PagerCloseWal() checkpoints and deletes the write-ahead-log
+        ** file. An EXCLUSIVE lock may still be held on the database file
+        ** after a successful return.
+        */
+        rc = sqlite3PagerCloseWal(u.ce.pPager);
+        if( rc==SQLITE_OK ){
+          sqlite3PagerSetJournalMode(u.ce.pPager, u.ce.eNew);
+        }
+      }else if( u.ce.eOld==PAGER_JOURNALMODE_MEMORY ){
+        /* Cannot transition directly from MEMORY to WAL.  Use mode OFF
+        ** as an intermediate */
+        sqlite3PagerSetJournalMode(u.ce.pPager, PAGER_JOURNALMODE_OFF);
+      }
+
+      /* Open a transaction on the database file. Regardless of the journal
+      ** mode, this transaction always uses a rollback journal.
+      */
+      assert( sqlite3BtreeIsInTrans(u.ce.pBt)==0 );
+      if( rc==SQLITE_OK ){
+        rc = sqlite3BtreeSetVersion(u.ce.pBt, (u.ce.eNew==PAGER_JOURNALMODE_WAL ? 2 : 1));
+      }
+    }
+  }
+#endif /* ifndef SQLITE_OMIT_WAL */
+
+  if( rc ){
+    u.ce.eNew = u.ce.eOld;
+  }
+  u.ce.eNew = sqlite3PagerSetJournalMode(u.ce.pPager, u.ce.eNew);
+
+  pOut = &aMem[pOp->p2];
+  pOut->flags = MEM_Str|MEM_Static|MEM_Term;
+  pOut->z = (char *)sqlite3JournalModename(u.ce.eNew);
+  pOut->n = sqlite3Strlen30(pOut->z);
+  pOut->enc = SQLITE_UTF8;
+  sqlite3VdbeChangeEncoding(pOut, encoding);
+  break;
+};
+#endif /* SQLITE_OMIT_PRAGMA */
+
+#if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)
+/* Opcode: Vacuum * * * * *
+**
+** Vacuum the entire database.  This opcode will cause other virtual
+** machines to be created and run.  It may not be called from within
+** a transaction.
+*/
+case OP_Vacuum: {
+  rc = sqlite3RunVacuum(&p->zErrMsg, db);
+  break;
+}
+#endif
+
+#if !defined(SQLITE_OMIT_AUTOVACUUM)
+/* Opcode: IncrVacuum P1 P2 * * *
+**
+** Perform a single step of the incremental vacuum procedure on
+** the P1 database. If the vacuum has finished, jump to instruction
+** P2. Otherwise, fall through to the next instruction.
+*/
+case OP_IncrVacuum: {        /* jump */
+#if 0  /* local variables moved into u.cf */
+  Btree *pBt;
+#endif /* local variables moved into u.cf */
+
+  assert( pOp->p1>=0 && pOp->p1<db->nDb );
+  assert( (p->btreeMask & (((yDbMask)1)<<pOp->p1))!=0 );
+  u.cf.pBt = db->aDb[pOp->p1].pBt;
+  rc = sqlite3BtreeIncrVacuum(u.cf.pBt);
+  if( rc==SQLITE_DONE ){
+    pc = pOp->p2 - 1;
+    rc = SQLITE_OK;
+  }
+  break;
+}
+#endif
+
+/* Opcode: Expire P1 * * * *
+**
+** Cause precompiled statements to become expired. An expired statement
+** fails with an error code of SQLITE_SCHEMA if it is ever executed 
+** (via sqlite3_step()).
+** 
+** If P1 is 0, then all SQL statements become expired. If P1 is non-zero,
+** then only the currently executing statement is affected. 
+*/
+case OP_Expire: {
+  if( !pOp->p1 ){
+    sqlite3ExpirePreparedStatements(db);
+  }else{
+    p->expired = 1;
+  }
+  break;
+}
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+/* Opcode: TableLock P1 P2 P3 P4 *
+**
+** Obtain a lock on a particular table. This instruction is only used when
+** the shared-cache feature is enabled. 
+**
+** P1 is the index of the database in sqlite3.aDb[] of the database
+** on which the lock is acquired.  A readlock is obtained if P3==0 or
+** a write lock if P3==1.
+**
+** P2 contains the root-page of the table to lock.
+**
+** P4 contains a pointer to the name of the table being locked. This is only
+** used to generate an error message if the lock cannot be obtained.
+*/
+case OP_TableLock: {
+  u8 isWriteLock = (u8)pOp->p3;
+  if( isWriteLock || 0==(db->flags&SQLITE_ReadUncommitted) ){
+    int p1 = pOp->p1; 
+    assert( p1>=0 && p1<db->nDb );
+    assert( (p->btreeMask & (((yDbMask)1)<<p1))!=0 );
+    assert( isWriteLock==0 || isWriteLock==1 );
+    rc = sqlite3BtreeLockTable(db->aDb[p1].pBt, pOp->p2, isWriteLock);
+    if( (rc&0xFF)==SQLITE_LOCKED ){
+      const char *z = pOp->p4.z;
+      sqlite3SetString(&p->zErrMsg, db, "database table is locked: %s", z);
+    }
+  }
+  break;
+}
+#endif /* SQLITE_OMIT_SHARED_CACHE */
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* Opcode: VBegin * * * P4 *
+**
+** P4 may be a pointer to an sqlite3_vtab structure. If so, call the 
+** xBegin method for that table.
+**
+** Also, whether or not P4 is set, check that this is not being called from
+** within a callback to a virtual table xSync() method. If it is, the error
+** code will be set to SQLITE_LOCKED.
+*/
+case OP_VBegin: {
+#if 0  /* local variables moved into u.cg */
+  VTable *pVTab;
+#endif /* local variables moved into u.cg */
+  u.cg.pVTab = pOp->p4.pVtab;
+  rc = sqlite3VtabBegin(db, u.cg.pVTab);
+  if( u.cg.pVTab ) importVtabErrMsg(p, u.cg.pVTab->pVtab);
+  break;
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* Opcode: VCreate P1 * * P4 *
+**
+** P4 is the name of a virtual table in database P1. Call the xCreate method
+** for that table.
+*/
+case OP_VCreate: {
+  rc = sqlite3VtabCallCreate(db, pOp->p1, pOp->p4.z, &p->zErrMsg);
+  break;
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* Opcode: VDestroy P1 * * P4 *
+**
+** P4 is the name of a virtual table in database P1.  Call the xDestroy method
+** of that table.
+*/
+case OP_VDestroy: {
+  p->inVtabMethod = 2;
+  rc = sqlite3VtabCallDestroy(db, pOp->p1, pOp->p4.z);
+  p->inVtabMethod = 0;
+  break;
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* Opcode: VOpen P1 * * P4 *
+**
+** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
+** P1 is a cursor number.  This opcode opens a cursor to the virtual
+** table and stores that cursor in P1.
+*/
+case OP_VOpen: {
+#if 0  /* local variables moved into u.ch */
+  VdbeCursor *pCur;
+  sqlite3_vtab_cursor *pVtabCursor;
+  sqlite3_vtab *pVtab;
+  sqlite3_module *pModule;
+#endif /* local variables moved into u.ch */
+
+  u.ch.pCur = 0;
+  u.ch.pVtabCursor = 0;
+  u.ch.pVtab = pOp->p4.pVtab->pVtab;
+  u.ch.pModule = (sqlite3_module *)u.ch.pVtab->pModule;
+  assert(u.ch.pVtab && u.ch.pModule);
+  rc = u.ch.pModule->xOpen(u.ch.pVtab, &u.ch.pVtabCursor);
+  importVtabErrMsg(p, u.ch.pVtab);
+  if( SQLITE_OK==rc ){
+    /* Initialize sqlite3_vtab_cursor base class */
+    u.ch.pVtabCursor->pVtab = u.ch.pVtab;
+
+    /* Initialise vdbe cursor object */
+    u.ch.pCur = allocateCursor(p, pOp->p1, 0, -1, 0);
+    if( u.ch.pCur ){
+      u.ch.pCur->pVtabCursor = u.ch.pVtabCursor;
+      u.ch.pCur->pModule = u.ch.pVtabCursor->pVtab->pModule;
+    }else{
+      db->mallocFailed = 1;
+      u.ch.pModule->xClose(u.ch.pVtabCursor);
+    }
+  }
+  break;
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* Opcode: VFilter P1 P2 P3 P4 *
+**
+** P1 is a cursor opened using VOpen.  P2 is an address to jump to if
+** the filtered result set is empty.
+**
+** P4 is either NULL or a string that was generated by the xBestIndex
+** method of the module.  The interpretation of the P4 string is left
+** to the module implementation.
+**
+** This opcode invokes the xFilter method on the virtual table specified
+** by P1.  The integer query plan parameter to xFilter is stored in register
+** P3. Register P3+1 stores the argc parameter to be passed to the
+** xFilter method. Registers P3+2..P3+1+argc are the argc
+** additional parameters which are passed to
+** xFilter as argv. Register P3+2 becomes argv[0] when passed to xFilter.
+**
+** A jump is made to P2 if the result set after filtering would be empty.
+*/
+case OP_VFilter: {   /* jump */
+#if 0  /* local variables moved into u.ci */
+  int nArg;
+  int iQuery;
+  const sqlite3_module *pModule;
+  Mem *pQuery;
+  Mem *pArgc;
+  sqlite3_vtab_cursor *pVtabCursor;
+  sqlite3_vtab *pVtab;
+  VdbeCursor *pCur;
+  int res;
+  int i;
+  Mem **apArg;
+#endif /* local variables moved into u.ci */
+
+  u.ci.pQuery = &aMem[pOp->p3];
+  u.ci.pArgc = &u.ci.pQuery[1];
+  u.ci.pCur = p->apCsr[pOp->p1];
+  assert( memIsValid(u.ci.pQuery) );
+  REGISTER_TRACE(pOp->p3, u.ci.pQuery);
+  assert( u.ci.pCur->pVtabCursor );
+  u.ci.pVtabCursor = u.ci.pCur->pVtabCursor;
+  u.ci.pVtab = u.ci.pVtabCursor->pVtab;
+  u.ci.pModule = u.ci.pVtab->pModule;
+
+  /* Grab the index number and argc parameters */
+  assert( (u.ci.pQuery->flags&MEM_Int)!=0 && u.ci.pArgc->flags==MEM_Int );
+  u.ci.nArg = (int)u.ci.pArgc->u.i;
+  u.ci.iQuery = (int)u.ci.pQuery->u.i;
+
+  /* Invoke the xFilter method */
+  {
+    u.ci.res = 0;
+    u.ci.apArg = p->apArg;
+    for(u.ci.i = 0; u.ci.i<u.ci.nArg; u.ci.i++){
+      u.ci.apArg[u.ci.i] = &u.ci.pArgc[u.ci.i+1];
+      sqlite3VdbeMemStoreType(u.ci.apArg[u.ci.i]);
+    }
+
+    p->inVtabMethod = 1;
+    rc = u.ci.pModule->xFilter(u.ci.pVtabCursor, u.ci.iQuery, pOp->p4.z, u.ci.nArg, u.ci.apArg);
+    p->inVtabMethod = 0;
+    importVtabErrMsg(p, u.ci.pVtab);
+    if( rc==SQLITE_OK ){
+      u.ci.res = u.ci.pModule->xEof(u.ci.pVtabCursor);
+    }
+
+    if( u.ci.res ){
+      pc = pOp->p2 - 1;
+    }
+  }
+  u.ci.pCur->nullRow = 0;
+
+  break;
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* Opcode: VColumn P1 P2 P3 * *
+**
+** Store the value of the P2-th column of
+** the row of the virtual-table that the 
+** P1 cursor is pointing to into register P3.
+*/
+case OP_VColumn: {
+#if 0  /* local variables moved into u.cj */
+  sqlite3_vtab *pVtab;
+  const sqlite3_module *pModule;
+  Mem *pDest;
+  sqlite3_context sContext;
+#endif /* local variables moved into u.cj */
+
+  VdbeCursor *pCur = p->apCsr[pOp->p1];
+  assert( pCur->pVtabCursor );
+  assert( pOp->p3>0 && pOp->p3<=p->nMem );
+  u.cj.pDest = &aMem[pOp->p3];
+  memAboutToChange(p, u.cj.pDest);
+  if( pCur->nullRow ){
+    sqlite3VdbeMemSetNull(u.cj.pDest);
+    break;
+  }
+  u.cj.pVtab = pCur->pVtabCursor->pVtab;
+  u.cj.pModule = u.cj.pVtab->pModule;
+  assert( u.cj.pModule->xColumn );
+  memset(&u.cj.sContext, 0, sizeof(u.cj.sContext));
+
+  /* The output cell may already have a buffer allocated. Move
+  ** the current contents to u.cj.sContext.s so in case the user-function
+  ** can use the already allocated buffer instead of allocating a
+  ** new one.
+  */
+  sqlite3VdbeMemMove(&u.cj.sContext.s, u.cj.pDest);
+  MemSetTypeFlag(&u.cj.sContext.s, MEM_Null);
+
+  rc = u.cj.pModule->xColumn(pCur->pVtabCursor, &u.cj.sContext, pOp->p2);
+  importVtabErrMsg(p, u.cj.pVtab);
+  if( u.cj.sContext.isError ){
+    rc = u.cj.sContext.isError;
+  }
+
+  /* Copy the result of the function to the P3 register. We
+  ** do this regardless of whether or not an error occurred to ensure any
+  ** dynamic allocation in u.cj.sContext.s (a Mem struct) is  released.
+  */
+  sqlite3VdbeChangeEncoding(&u.cj.sContext.s, encoding);
+  sqlite3VdbeMemMove(u.cj.pDest, &u.cj.sContext.s);
+  REGISTER_TRACE(pOp->p3, u.cj.pDest);
+  UPDATE_MAX_BLOBSIZE(u.cj.pDest);
+
+  if( sqlite3VdbeMemTooBig(u.cj.pDest) ){
+    goto too_big;
+  }
+  break;
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* Opcode: VNext P1 P2 * * *
+**
+** Advance virtual table P1 to the next row in its result set and
+** jump to instruction P2.  Or, if the virtual table has reached
+** the end of its result set, then fall through to the next instruction.
+*/
+case OP_VNext: {   /* jump */
+#if 0  /* local variables moved into u.ck */
+  sqlite3_vtab *pVtab;
+  const sqlite3_module *pModule;
+  int res;
+  VdbeCursor *pCur;
+#endif /* local variables moved into u.ck */
+
+  u.ck.res = 0;
+  u.ck.pCur = p->apCsr[pOp->p1];
+  assert( u.ck.pCur->pVtabCursor );
+  if( u.ck.pCur->nullRow ){
+    break;
+  }
+  u.ck.pVtab = u.ck.pCur->pVtabCursor->pVtab;
+  u.ck.pModule = u.ck.pVtab->pModule;
+  assert( u.ck.pModule->xNext );
+
+  /* Invoke the xNext() method of the module. There is no way for the
+  ** underlying implementation to return an error if one occurs during
+  ** xNext(). Instead, if an error occurs, true is returned (indicating that
+  ** data is available) and the error code returned when xColumn or
+  ** some other method is next invoked on the save virtual table cursor.
+  */
+  p->inVtabMethod = 1;
+  rc = u.ck.pModule->xNext(u.ck.pCur->pVtabCursor);
+  p->inVtabMethod = 0;
+  importVtabErrMsg(p, u.ck.pVtab);
+  if( rc==SQLITE_OK ){
+    u.ck.res = u.ck.pModule->xEof(u.ck.pCur->pVtabCursor);
+  }
+
+  if( !u.ck.res ){
+    /* If there is data, jump to P2 */
+    pc = pOp->p2 - 1;
+  }
+  break;
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* Opcode: VRename P1 * * P4 *
+**
+** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
+** This opcode invokes the corresponding xRename method. The value
+** in register P1 is passed as the zName argument to the xRename method.
+*/
+case OP_VRename: {
+#if 0  /* local variables moved into u.cl */
+  sqlite3_vtab *pVtab;
+  Mem *pName;
+#endif /* local variables moved into u.cl */
+
+  u.cl.pVtab = pOp->p4.pVtab->pVtab;
+  u.cl.pName = &aMem[pOp->p1];
+  assert( u.cl.pVtab->pModule->xRename );
+  assert( memIsValid(u.cl.pName) );
+  REGISTER_TRACE(pOp->p1, u.cl.pName);
+  assert( u.cl.pName->flags & MEM_Str );
+  rc = u.cl.pVtab->pModule->xRename(u.cl.pVtab, u.cl.pName->z);
+  importVtabErrMsg(p, u.cl.pVtab);
+  p->expired = 0;
+
+  break;
+}
+#endif
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* Opcode: VUpdate P1 P2 P3 P4 *
+**
+** P4 is a pointer to a virtual table object, an sqlite3_vtab structure.
+** This opcode invokes the corresponding xUpdate method. P2 values
+** are contiguous memory cells starting at P3 to pass to the xUpdate 
+** invocation. The value in register (P3+P2-1) corresponds to the 
+** p2th element of the argv array passed to xUpdate.
+**
+** The xUpdate method will do a DELETE or an INSERT or both.
+** The argv[0] element (which corresponds to memory cell P3)
+** is the rowid of a row to delete.  If argv[0] is NULL then no 
+** deletion occurs.  The argv[1] element is the rowid of the new 
+** row.  This can be NULL to have the virtual table select the new 
+** rowid for itself.  The subsequent elements in the array are 
+** the values of columns in the new row.
+**
+** If P2==1 then no insert is performed.  argv[0] is the rowid of
+** a row to delete.
+**
+** P1 is a boolean flag. If it is set to true and the xUpdate call
+** is successful, then the value returned by sqlite3_last_insert_rowid() 
+** is set to the value of the rowid for the row just inserted.
+*/
+case OP_VUpdate: {
+#if 0  /* local variables moved into u.cm */
+  sqlite3_vtab *pVtab;
+  sqlite3_module *pModule;
+  int nArg;
+  int i;
+  sqlite_int64 rowid;
+  Mem **apArg;
+  Mem *pX;
+#endif /* local variables moved into u.cm */
+
+  u.cm.pVtab = pOp->p4.pVtab->pVtab;
+  u.cm.pModule = (sqlite3_module *)u.cm.pVtab->pModule;
+  u.cm.nArg = pOp->p2;
+  assert( pOp->p4type==P4_VTAB );
+  if( ALWAYS(u.cm.pModule->xUpdate) ){
+    u.cm.apArg = p->apArg;
+    u.cm.pX = &aMem[pOp->p3];
+    for(u.cm.i=0; u.cm.i<u.cm.nArg; u.cm.i++){
+      assert( memIsValid(u.cm.pX) );
+      memAboutToChange(p, u.cm.pX);
+      sqlite3VdbeMemStoreType(u.cm.pX);
+      u.cm.apArg[u.cm.i] = u.cm.pX;
+      u.cm.pX++;
+    }
+    rc = u.cm.pModule->xUpdate(u.cm.pVtab, u.cm.nArg, u.cm.apArg, &u.cm.rowid);
+    importVtabErrMsg(p, u.cm.pVtab);
+    if( rc==SQLITE_OK && pOp->p1 ){
+      assert( u.cm.nArg>1 && u.cm.apArg[0] && (u.cm.apArg[0]->flags&MEM_Null) );
+      db->lastRowid = u.cm.rowid;
+    }
+    p->nChange++;
+  }
+  break;
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+#ifndef  SQLITE_OMIT_PAGER_PRAGMAS
+/* Opcode: Pagecount P1 P2 * * *
+**
+** Write the current number of pages in database P1 to memory cell P2.
+*/
+case OP_Pagecount: {            /* out2-prerelease */
+  pOut->u.i = sqlite3BtreeLastPage(db->aDb[pOp->p1].pBt);
+  break;
+}
+#endif
+
+
+#ifndef  SQLITE_OMIT_PAGER_PRAGMAS
+/* Opcode: MaxPgcnt P1 P2 P3 * *
+**
+** Try to set the maximum page count for database P1 to the value in P3.
+** Do not let the maximum page count fall below the current page count and
+** do not change the maximum page count value if P3==0.
+**
+** Store the maximum page count after the change in register P2.
+*/
+case OP_MaxPgcnt: {            /* out2-prerelease */
+  unsigned int newMax;
+  Btree *pBt;
+
+  pBt = db->aDb[pOp->p1].pBt;
+  newMax = 0;
+  if( pOp->p3 ){
+    newMax = sqlite3BtreeLastPage(pBt);
+    if( newMax < (unsigned)pOp->p3 ) newMax = (unsigned)pOp->p3;
+  }
+  pOut->u.i = sqlite3BtreeMaxPageCount(pBt, newMax);
+  break;
+}
+#endif
+
+
+#ifndef SQLITE_OMIT_TRACE
+/* Opcode: Trace * * * P4 *
+**
+** If tracing is enabled (by the sqlite3_trace()) interface, then
+** the UTF-8 string contained in P4 is emitted on the trace callback.
+*/
+case OP_Trace: {
+#if 0  /* local variables moved into u.cn */
+  char *zTrace;
+#endif /* local variables moved into u.cn */
+
+  u.cn.zTrace = (pOp->p4.z ? pOp->p4.z : p->zSql);
+  if( u.cn.zTrace ){
+    if( db->xTrace ){
+      char *z = sqlite3VdbeExpandSql(p, u.cn.zTrace);
+      db->xTrace(db->pTraceArg, z);
+      sqlite3DbFree(db, z);
+    }
+#ifdef SQLITE_DEBUG
+    if( (db->flags & SQLITE_SqlTrace)!=0 ){
+      sqlite3DebugPrintf("SQL-trace: %s\n", u.cn.zTrace);
+    }
+#endif /* SQLITE_DEBUG */
+  }
+  break;
+}
+#endif
+
+
+/* Opcode: Noop * * * * *
+**
+** Do nothing.  This instruction is often useful as a jump
+** destination.
+*/
+/*
+** The magic Explain opcode are only inserted when explain==2 (which
+** is to say when the EXPLAIN QUERY PLAN syntax is used.)
+** This opcode records information from the optimizer.  It is the
+** the same as a no-op.  This opcodesnever appears in a real VM program.
+*/
+default: {          /* This is really OP_Noop and OP_Explain */
+  assert( pOp->opcode==OP_Noop || pOp->opcode==OP_Explain );
+  break;
+}
+
+/*****************************************************************************
+** The cases of the switch statement above this line should all be indented
+** by 6 spaces.  But the left-most 6 spaces have been removed to improve the
+** readability.  From this point on down, the normal indentation rules are
+** restored.
+*****************************************************************************/
+    }
+
+#ifdef VDBE_PROFILE
+    {
+      u64 elapsed = sqlite3Hwtime() - start;
+      pOp->cycles += elapsed;
+      pOp->cnt++;
+#if 0
+        fprintf(stdout, "%10llu ", elapsed);
+        sqlite3VdbePrintOp(stdout, origPc, &aOp[origPc]);
+#endif
+    }
+#endif
+
+    /* The following code adds nothing to the actual functionality
+    ** of the program.  It is only here for testing and debugging.
+    ** On the other hand, it does burn CPU cycles every time through
+    ** the evaluator loop.  So we can leave it out when NDEBUG is defined.
+    */
+#ifndef NDEBUG
+    assert( pc>=-1 && pc<p->nOp );
+
+#ifdef SQLITE_DEBUG
+    if( p->trace ){
+      if( rc!=0 ) fprintf(p->trace,"rc=%d\n",rc);
+      if( pOp->opflags & (OPFLG_OUT2_PRERELEASE|OPFLG_OUT2) ){
+        registerTrace(p->trace, pOp->p2, &aMem[pOp->p2]);
+      }
+      if( pOp->opflags & OPFLG_OUT3 ){
+        registerTrace(p->trace, pOp->p3, &aMem[pOp->p3]);
+      }
+    }
+#endif  /* SQLITE_DEBUG */
+#endif  /* NDEBUG */
+  }  /* The end of the for(;;) loop the loops through opcodes */
+
+  /* If we reach this point, it means that execution is finished with
+  ** an error of some kind.
+  */
+vdbe_error_halt:
+  assert( rc );
+  p->rc = rc;
+  testcase( sqlite3GlobalConfig.xLog!=0 );
+  sqlite3_log(rc, "statement aborts at %d: [%s] %s", 
+                   pc, p->zSql, p->zErrMsg);
+  sqlite3VdbeHalt(p);
+  if( rc==SQLITE_IOERR_NOMEM ) db->mallocFailed = 1;
+  rc = SQLITE_ERROR;
+  if( resetSchemaOnFault>0 ){
+    sqlite3ResetInternalSchema(db, resetSchemaOnFault-1);
+  }
+
+  /* This is the only way out of this procedure.  We have to
+  ** release the mutexes on btrees that were acquired at the
+  ** top. */
+vdbe_return:
+  sqlite3VdbeLeave(p);
+  return rc;
+
+  /* Jump to here if a string or blob larger than SQLITE_MAX_LENGTH
+  ** is encountered.
+  */
+too_big:
+  sqlite3SetString(&p->zErrMsg, db, "string or blob too big");
+  rc = SQLITE_TOOBIG;
+  goto vdbe_error_halt;
+
+  /* Jump to here if a malloc() fails.
+  */
+no_mem:
+  db->mallocFailed = 1;
+  sqlite3SetString(&p->zErrMsg, db, "out of memory");
+  rc = SQLITE_NOMEM;
+  goto vdbe_error_halt;
+
+  /* Jump to here for any other kind of fatal error.  The "rc" variable
+  ** should hold the error number.
+  */
+abort_due_to_error:
+  assert( p->zErrMsg==0 );
+  if( db->mallocFailed ) rc = SQLITE_NOMEM;
+  if( rc!=SQLITE_IOERR_NOMEM ){
+    sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3ErrStr(rc));
+  }
+  goto vdbe_error_halt;
+
+  /* Jump to here if the sqlite3_interrupt() API sets the interrupt
+  ** flag.
+  */
+abort_due_to_interrupt:
+  assert( db->u1.isInterrupted );
+  rc = SQLITE_INTERRUPT;
+  p->rc = rc;
+  sqlite3SetString(&p->zErrMsg, db, "%s", sqlite3ErrStr(rc));
+  goto vdbe_error_halt;
+}
+
+/************** End of vdbe.c ************************************************/
+/************** Begin file vdbeblob.c ****************************************/
+/*
+** 2007 May 1
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains code used to implement incremental BLOB I/O.
+*/
+
+
+#ifndef SQLITE_OMIT_INCRBLOB
+
+/*
+** Valid sqlite3_blob* handles point to Incrblob structures.
+*/
+typedef struct Incrblob Incrblob;
+struct Incrblob {
+  int flags;              /* Copy of "flags" passed to sqlite3_blob_open() */
+  int nByte;              /* Size of open blob, in bytes */
+  int iOffset;            /* Byte offset of blob in cursor data */
+  int iCol;               /* Table column this handle is open on */
+  BtCursor *pCsr;         /* Cursor pointing at blob row */
+  sqlite3_stmt *pStmt;    /* Statement holding cursor open */
+  sqlite3 *db;            /* The associated database */
+};
+
+
+/*
+** This function is used by both blob_open() and blob_reopen(). It seeks
+** the b-tree cursor associated with blob handle p to point to row iRow.
+** If successful, SQLITE_OK is returned and subsequent calls to
+** sqlite3_blob_read() or sqlite3_blob_write() access the specified row.
+**
+** If an error occurs, or if the specified row does not exist or does not
+** contain a value of type TEXT or BLOB in the column nominated when the
+** blob handle was opened, then an error code is returned and *pzErr may
+** be set to point to a buffer containing an error message. It is the
+** responsibility of the caller to free the error message buffer using
+** sqlite3DbFree().
+**
+** If an error does occur, then the b-tree cursor is closed. All subsequent
+** calls to sqlite3_blob_read(), blob_write() or blob_reopen() will 
+** immediately return SQLITE_ABORT.
+*/
+static int blobSeekToRow(Incrblob *p, sqlite3_int64 iRow, char **pzErr){
+  int rc;                         /* Error code */
+  char *zErr = 0;                 /* Error message */
+  Vdbe *v = (Vdbe *)p->pStmt;
+
+  /* Set the value of the SQL statements only variable to integer iRow. 
+  ** This is done directly instead of using sqlite3_bind_int64() to avoid 
+  ** triggering asserts related to mutexes.
+  */
+  assert( v->aVar[0].flags&MEM_Int );
+  v->aVar[0].u.i = iRow;
+
+  rc = sqlite3_step(p->pStmt);
+  if( rc==SQLITE_ROW ){
+    u32 type = v->apCsr[0]->aType[p->iCol];
+    if( type<12 ){
+      zErr = sqlite3MPrintf(p->db, "cannot open value of type %s",
+          type==0?"null": type==7?"real": "integer"
+      );
+      rc = SQLITE_ERROR;
+      sqlite3_finalize(p->pStmt);
+      p->pStmt = 0;
+    }else{
+      p->iOffset = v->apCsr[0]->aOffset[p->iCol];
+      p->nByte = sqlite3VdbeSerialTypeLen(type);
+      p->pCsr =  v->apCsr[0]->pCursor;
+      sqlite3BtreeEnterCursor(p->pCsr);
+      sqlite3BtreeCacheOverflow(p->pCsr);
+      sqlite3BtreeLeaveCursor(p->pCsr);
+    }
+  }
+
+  if( rc==SQLITE_ROW ){
+    rc = SQLITE_OK;
+  }else if( p->pStmt ){
+    rc = sqlite3_finalize(p->pStmt);
+    p->pStmt = 0;
+    if( rc==SQLITE_OK ){
+      zErr = sqlite3MPrintf(p->db, "no such rowid: %lld", iRow);
+      rc = SQLITE_ERROR;
+    }else{
+      zErr = sqlite3MPrintf(p->db, "%s", sqlite3_errmsg(p->db));
+    }
+  }
+
+  assert( rc!=SQLITE_OK || zErr==0 );
+  assert( rc!=SQLITE_ROW && rc!=SQLITE_DONE );
+
+  *pzErr = zErr;
+  return rc;
+}
+
+/*
+** Open a blob handle.
+*/
+SQLITE_API int sqlite3_blob_open(
+  sqlite3* db,            /* The database connection */
+  const char *zDb,        /* The attached database containing the blob */
+  const char *zTable,     /* The table containing the blob */
+  const char *zColumn,    /* The column containing the blob */
+  sqlite_int64 iRow,      /* The row containing the glob */
+  int flags,              /* True -> read/write access, false -> read-only */
+  sqlite3_blob **ppBlob   /* Handle for accessing the blob returned here */
+){
+  int nAttempt = 0;
+  int iCol;               /* Index of zColumn in row-record */
+
+  /* This VDBE program seeks a btree cursor to the identified 
+  ** db/table/row entry. The reason for using a vdbe program instead
+  ** of writing code to use the b-tree layer directly is that the
+  ** vdbe program will take advantage of the various transaction,
+  ** locking and error handling infrastructure built into the vdbe.
+  **
+  ** After seeking the cursor, the vdbe executes an OP_ResultRow.
+  ** Code external to the Vdbe then "borrows" the b-tree cursor and
+  ** uses it to implement the blob_read(), blob_write() and 
+  ** blob_bytes() functions.
+  **
+  ** The sqlite3_blob_close() function finalizes the vdbe program,
+  ** which closes the b-tree cursor and (possibly) commits the 
+  ** transaction.
+  */
+  static const VdbeOpList openBlob[] = {
+    {OP_Transaction, 0, 0, 0},     /* 0: Start a transaction */
+    {OP_VerifyCookie, 0, 0, 0},    /* 1: Check the schema cookie */
+    {OP_TableLock, 0, 0, 0},       /* 2: Acquire a read or write lock */
+
+    /* One of the following two instructions is replaced by an OP_Noop. */
+    {OP_OpenRead, 0, 0, 0},        /* 3: Open cursor 0 for reading */
+    {OP_OpenWrite, 0, 0, 0},       /* 4: Open cursor 0 for read/write */
+
+    {OP_Variable, 1, 1, 1},        /* 5: Push the rowid to the stack */
+    {OP_NotExists, 0, 10, 1},      /* 6: Seek the cursor */
+    {OP_Column, 0, 0, 1},          /* 7  */
+    {OP_ResultRow, 1, 0, 0},       /* 8  */
+    {OP_Goto, 0, 5, 0},            /* 9  */
+    {OP_Close, 0, 0, 0},           /* 10 */
+    {OP_Halt, 0, 0, 0},            /* 11 */
+  };
+
+  int rc = SQLITE_OK;
+  char *zErr = 0;
+  Table *pTab;
+  Parse *pParse = 0;
+  Incrblob *pBlob = 0;
+
+  flags = !!flags;                /* flags = (flags ? 1 : 0); */
+  *ppBlob = 0;
+
+  sqlite3_mutex_enter(db->mutex);
+
+  pBlob = (Incrblob *)sqlite3DbMallocZero(db, sizeof(Incrblob));
+  if( !pBlob ) goto blob_open_out;
+  pParse = sqlite3StackAllocRaw(db, sizeof(*pParse));
+  if( !pParse ) goto blob_open_out;
+
+  do {
+    memset(pParse, 0, sizeof(Parse));
+    pParse->db = db;
+    sqlite3DbFree(db, zErr);
+    zErr = 0;
+
+    sqlite3BtreeEnterAll(db);
+    pTab = sqlite3LocateTable(pParse, 0, zTable, zDb);
+    if( pTab && IsVirtual(pTab) ){
+      pTab = 0;
+      sqlite3ErrorMsg(pParse, "cannot open virtual table: %s", zTable);
+    }
+#ifndef SQLITE_OMIT_VIEW
+    if( pTab && pTab->pSelect ){
+      pTab = 0;
+      sqlite3ErrorMsg(pParse, "cannot open view: %s", zTable);
+    }
+#endif
+    if( !pTab ){
+      if( pParse->zErrMsg ){
+        sqlite3DbFree(db, zErr);
+        zErr = pParse->zErrMsg;
+        pParse->zErrMsg = 0;
+      }
+      rc = SQLITE_ERROR;
+      sqlite3BtreeLeaveAll(db);
+      goto blob_open_out;
+    }
+
+    /* Now search pTab for the exact column. */
+    for(iCol=0; iCol<pTab->nCol; iCol++) {
+      if( sqlite3StrICmp(pTab->aCol[iCol].zName, zColumn)==0 ){
+        break;
+      }
+    }
+    if( iCol==pTab->nCol ){
+      sqlite3DbFree(db, zErr);
+      zErr = sqlite3MPrintf(db, "no such column: \"%s\"", zColumn);
+      rc = SQLITE_ERROR;
+      sqlite3BtreeLeaveAll(db);
+      goto blob_open_out;
+    }
+
+    /* If the value is being opened for writing, check that the
+    ** column is not indexed, and that it is not part of a foreign key. 
+    ** It is against the rules to open a column to which either of these
+    ** descriptions applies for writing.  */
+    if( flags ){
+      const char *zFault = 0;
+      Index *pIdx;
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+      if( db->flags&SQLITE_ForeignKeys ){
+        /* Check that the column is not part of an FK child key definition. It
+        ** is not necessary to check if it is part of a parent key, as parent
+        ** key columns must be indexed. The check below will pick up this 
+        ** case.  */
+        FKey *pFKey;
+        for(pFKey=pTab->pFKey; pFKey; pFKey=pFKey->pNextFrom){
+          int j;
+          for(j=0; j<pFKey->nCol; j++){
+            if( pFKey->aCol[j].iFrom==iCol ){
+              zFault = "foreign key";
+            }
+          }
+        }
+      }
+#endif
+      for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+        int j;
+        for(j=0; j<pIdx->nColumn; j++){
+          if( pIdx->aiColumn[j]==iCol ){
+            zFault = "indexed";
+          }
+        }
+      }
+      if( zFault ){
+        sqlite3DbFree(db, zErr);
+        zErr = sqlite3MPrintf(db, "cannot open %s column for writing", zFault);
+        rc = SQLITE_ERROR;
+        sqlite3BtreeLeaveAll(db);
+        goto blob_open_out;
+      }
+    }
+
+    pBlob->pStmt = (sqlite3_stmt *)sqlite3VdbeCreate(db);
+    assert( pBlob->pStmt || db->mallocFailed );
+    if( pBlob->pStmt ){
+      Vdbe *v = (Vdbe *)pBlob->pStmt;
+      int iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+
+      sqlite3VdbeAddOpList(v, sizeof(openBlob)/sizeof(VdbeOpList), openBlob);
+
+
+      /* Configure the OP_Transaction */
+      sqlite3VdbeChangeP1(v, 0, iDb);
+      sqlite3VdbeChangeP2(v, 0, flags);
+
+      /* Configure the OP_VerifyCookie */
+      sqlite3VdbeChangeP1(v, 1, iDb);
+      sqlite3VdbeChangeP2(v, 1, pTab->pSchema->schema_cookie);
+      sqlite3VdbeChangeP3(v, 1, pTab->pSchema->iGeneration);
+
+      /* Make sure a mutex is held on the table to be accessed */
+      sqlite3VdbeUsesBtree(v, iDb); 
+
+      /* Configure the OP_TableLock instruction */
+#ifdef SQLITE_OMIT_SHARED_CACHE
+      sqlite3VdbeChangeToNoop(v, 2, 1);
+#else
+      sqlite3VdbeChangeP1(v, 2, iDb);
+      sqlite3VdbeChangeP2(v, 2, pTab->tnum);
+      sqlite3VdbeChangeP3(v, 2, flags);
+      sqlite3VdbeChangeP4(v, 2, pTab->zName, P4_TRANSIENT);
+#endif
+
+      /* Remove either the OP_OpenWrite or OpenRead. Set the P2 
+      ** parameter of the other to pTab->tnum.  */
+      sqlite3VdbeChangeToNoop(v, 4 - flags, 1);
+      sqlite3VdbeChangeP2(v, 3 + flags, pTab->tnum);
+      sqlite3VdbeChangeP3(v, 3 + flags, iDb);
+
+      /* Configure the number of columns. Configure the cursor to
+      ** think that the table has one more column than it really
+      ** does. An OP_Column to retrieve this imaginary column will
+      ** always return an SQL NULL. This is useful because it means
+      ** we can invoke OP_Column to fill in the vdbe cursors type 
+      ** and offset cache without causing any IO.
+      */
+      sqlite3VdbeChangeP4(v, 3+flags, SQLITE_INT_TO_PTR(pTab->nCol+1),P4_INT32);
+      sqlite3VdbeChangeP2(v, 7, pTab->nCol);
+      if( !db->mallocFailed ){
+        sqlite3VdbeMakeReady(v, 1, 1, 1, 0, 0, 0);
+      }
+    }
+   
+    pBlob->flags = flags;
+    pBlob->iCol = iCol;
+    pBlob->db = db;
+    sqlite3BtreeLeaveAll(db);
+    if( db->mallocFailed ){
+      goto blob_open_out;
+    }
+    sqlite3_bind_int64(pBlob->pStmt, 1, iRow);
+    rc = blobSeekToRow(pBlob, iRow, &zErr);
+  } while( (++nAttempt)<5 && rc==SQLITE_SCHEMA );
+
+blob_open_out:
+  if( rc==SQLITE_OK && db->mallocFailed==0 ){
+    *ppBlob = (sqlite3_blob *)pBlob;
+  }else{
+    if( pBlob && pBlob->pStmt ) sqlite3VdbeFinalize((Vdbe *)pBlob->pStmt);
+    sqlite3DbFree(db, pBlob);
+  }
+  sqlite3Error(db, rc, (zErr ? "%s" : 0), zErr);
+  sqlite3DbFree(db, zErr);
+  sqlite3StackFree(db, pParse);
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+/*
+** Close a blob handle that was previously created using
+** sqlite3_blob_open().
+*/
+SQLITE_API int sqlite3_blob_close(sqlite3_blob *pBlob){
+  Incrblob *p = (Incrblob *)pBlob;
+  int rc;
+  sqlite3 *db;
+
+  if( p ){
+    db = p->db;
+    sqlite3_mutex_enter(db->mutex);
+    rc = sqlite3_finalize(p->pStmt);
+    sqlite3DbFree(db, p);
+    sqlite3_mutex_leave(db->mutex);
+  }else{
+    rc = SQLITE_OK;
+  }
+  return rc;
+}
+
+/*
+** Perform a read or write operation on a blob
+*/
+static int blobReadWrite(
+  sqlite3_blob *pBlob, 
+  void *z, 
+  int n, 
+  int iOffset, 
+  int (*xCall)(BtCursor*, u32, u32, void*)
+){
+  int rc;
+  Incrblob *p = (Incrblob *)pBlob;
+  Vdbe *v;
+  sqlite3 *db;
+
+  if( p==0 ) return SQLITE_MISUSE_BKPT;
+  db = p->db;
+  sqlite3_mutex_enter(db->mutex);
+  v = (Vdbe*)p->pStmt;
+
+  if( n<0 || iOffset<0 || (iOffset+n)>p->nByte ){
+    /* Request is out of range. Return a transient error. */
+    rc = SQLITE_ERROR;
+    sqlite3Error(db, SQLITE_ERROR, 0);
+  }else if( v==0 ){
+    /* If there is no statement handle, then the blob-handle has
+    ** already been invalidated. Return SQLITE_ABORT in this case.
+    */
+    rc = SQLITE_ABORT;
+  }else{
+    /* Call either BtreeData() or BtreePutData(). If SQLITE_ABORT is
+    ** returned, clean-up the statement handle.
+    */
+    assert( db == v->db );
+    sqlite3BtreeEnterCursor(p->pCsr);
+    rc = xCall(p->pCsr, iOffset+p->iOffset, n, z);
+    sqlite3BtreeLeaveCursor(p->pCsr);
+    if( rc==SQLITE_ABORT ){
+      sqlite3VdbeFinalize(v);
+      p->pStmt = 0;
+    }else{
+      db->errCode = rc;
+      v->rc = rc;
+    }
+  }
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+/*
+** Read data from a blob handle.
+*/
+SQLITE_API int sqlite3_blob_read(sqlite3_blob *pBlob, void *z, int n, int iOffset){
+  return blobReadWrite(pBlob, z, n, iOffset, sqlite3BtreeData);
+}
+
+/*
+** Write data to a blob handle.
+*/
+SQLITE_API int sqlite3_blob_write(sqlite3_blob *pBlob, const void *z, int n, int iOffset){
+  return blobReadWrite(pBlob, (void *)z, n, iOffset, sqlite3BtreePutData);
+}
+
+/*
+** Query a blob handle for the size of the data.
+**
+** The Incrblob.nByte field is fixed for the lifetime of the Incrblob
+** so no mutex is required for access.
+*/
+SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *pBlob){
+  Incrblob *p = (Incrblob *)pBlob;
+  return (p && p->pStmt) ? p->nByte : 0;
+}
+
+/*
+** Move an existing blob handle to point to a different row of the same
+** database table.
+**
+** If an error occurs, or if the specified row does not exist or does not
+** contain a blob or text value, then an error code is returned and the
+** database handle error code and message set. If this happens, then all 
+** subsequent calls to sqlite3_blob_xxx() functions (except blob_close()) 
+** immediately return SQLITE_ABORT.
+*/
+SQLITE_API int sqlite3_blob_reopen(sqlite3_blob *pBlob, sqlite3_int64 iRow){
+  int rc;
+  Incrblob *p = (Incrblob *)pBlob;
+  sqlite3 *db;
+
+  if( p==0 ) return SQLITE_MISUSE_BKPT;
+  db = p->db;
+  sqlite3_mutex_enter(db->mutex);
+
+  if( p->pStmt==0 ){
+    /* If there is no statement handle, then the blob-handle has
+    ** already been invalidated. Return SQLITE_ABORT in this case.
+    */
+    rc = SQLITE_ABORT;
+  }else{
+    char *zErr;
+    rc = blobSeekToRow(p, iRow, &zErr);
+    if( rc!=SQLITE_OK ){
+      sqlite3Error(db, rc, (zErr ? "%s" : 0), zErr);
+      sqlite3DbFree(db, zErr);
+    }
+    assert( rc!=SQLITE_SCHEMA );
+  }
+
+  rc = sqlite3ApiExit(db, rc);
+  assert( rc==SQLITE_OK || p->pStmt==0 );
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+#endif /* #ifndef SQLITE_OMIT_INCRBLOB */
+
+/************** End of vdbeblob.c ********************************************/
+/************** Begin file journal.c *****************************************/
+/*
+** 2007 August 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file implements a special kind of sqlite3_file object used
+** by SQLite to create journal files if the atomic-write optimization
+** is enabled.
+**
+** The distinctive characteristic of this sqlite3_file is that the
+** actual on disk file is created lazily. When the file is created,
+** the caller specifies a buffer size for an in-memory buffer to
+** be used to service read() and write() requests. The actual file
+** on disk is not created or populated until either:
+**
+**   1) The in-memory representation grows too large for the allocated 
+**      buffer, or
+**   2) The sqlite3JournalCreate() function is called.
+*/
+#ifdef SQLITE_ENABLE_ATOMIC_WRITE
+
+
+/*
+** A JournalFile object is a subclass of sqlite3_file used by
+** as an open file handle for journal files.
+*/
+struct JournalFile {
+  sqlite3_io_methods *pMethod;    /* I/O methods on journal files */
+  int nBuf;                       /* Size of zBuf[] in bytes */
+  char *zBuf;                     /* Space to buffer journal writes */
+  int iSize;                      /* Amount of zBuf[] currently used */
+  int flags;                      /* xOpen flags */
+  sqlite3_vfs *pVfs;              /* The "real" underlying VFS */
+  sqlite3_file *pReal;            /* The "real" underlying file descriptor */
+  const char *zJournal;           /* Name of the journal file */
+};
+typedef struct JournalFile JournalFile;
+
+/*
+** If it does not already exists, create and populate the on-disk file 
+** for JournalFile p.
+*/
+static int createFile(JournalFile *p){
+  int rc = SQLITE_OK;
+  if( !p->pReal ){
+    sqlite3_file *pReal = (sqlite3_file *)&p[1];
+    rc = sqlite3OsOpen(p->pVfs, p->zJournal, pReal, p->flags, 0);
+    if( rc==SQLITE_OK ){
+      p->pReal = pReal;
+      if( p->iSize>0 ){
+        assert(p->iSize<=p->nBuf);
+        rc = sqlite3OsWrite(p->pReal, p->zBuf, p->iSize, 0);
+      }
+    }
+  }
+  return rc;
+}
+
+/*
+** Close the file.
+*/
+static int jrnlClose(sqlite3_file *pJfd){
+  JournalFile *p = (JournalFile *)pJfd;
+  if( p->pReal ){
+    sqlite3OsClose(p->pReal);
+  }
+  sqlite3_free(p->zBuf);
+  return SQLITE_OK;
+}
+
+/*
+** Read data from the file.
+*/
+static int jrnlRead(
+  sqlite3_file *pJfd,    /* The journal file from which to read */
+  void *zBuf,            /* Put the results here */
+  int iAmt,              /* Number of bytes to read */
+  sqlite_int64 iOfst     /* Begin reading at this offset */
+){
+  int rc = SQLITE_OK;
+  JournalFile *p = (JournalFile *)pJfd;
+  if( p->pReal ){
+    rc = sqlite3OsRead(p->pReal, zBuf, iAmt, iOfst);
+  }else if( (iAmt+iOfst)>p->iSize ){
+    rc = SQLITE_IOERR_SHORT_READ;
+  }else{
+    memcpy(zBuf, &p->zBuf[iOfst], iAmt);
+  }
+  return rc;
+}
+
+/*
+** Write data to the file.
+*/
+static int jrnlWrite(
+  sqlite3_file *pJfd,    /* The journal file into which to write */
+  const void *zBuf,      /* Take data to be written from here */
+  int iAmt,              /* Number of bytes to write */
+  sqlite_int64 iOfst     /* Begin writing at this offset into the file */
+){
+  int rc = SQLITE_OK;
+  JournalFile *p = (JournalFile *)pJfd;
+  if( !p->pReal && (iOfst+iAmt)>p->nBuf ){
+    rc = createFile(p);
+  }
+  if( rc==SQLITE_OK ){
+    if( p->pReal ){
+      rc = sqlite3OsWrite(p->pReal, zBuf, iAmt, iOfst);
+    }else{
+      memcpy(&p->zBuf[iOfst], zBuf, iAmt);
+      if( p->iSize<(iOfst+iAmt) ){
+        p->iSize = (iOfst+iAmt);
+      }
+    }
+  }
+  return rc;
+}
+
+/*
+** Truncate the file.
+*/
+static int jrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
+  int rc = SQLITE_OK;
+  JournalFile *p = (JournalFile *)pJfd;
+  if( p->pReal ){
+    rc = sqlite3OsTruncate(p->pReal, size);
+  }else if( size<p->iSize ){
+    p->iSize = size;
+  }
+  return rc;
+}
+
+/*
+** Sync the file.
+*/
+static int jrnlSync(sqlite3_file *pJfd, int flags){
+  int rc;
+  JournalFile *p = (JournalFile *)pJfd;
+  if( p->pReal ){
+    rc = sqlite3OsSync(p->pReal, flags);
+  }else{
+    rc = SQLITE_OK;
+  }
+  return rc;
+}
+
+/*
+** Query the size of the file in bytes.
+*/
+static int jrnlFileSize(sqlite3_file *pJfd, sqlite_int64 *pSize){
+  int rc = SQLITE_OK;
+  JournalFile *p = (JournalFile *)pJfd;
+  if( p->pReal ){
+    rc = sqlite3OsFileSize(p->pReal, pSize);
+  }else{
+    *pSize = (sqlite_int64) p->iSize;
+  }
+  return rc;
+}
+
+/*
+** Table of methods for JournalFile sqlite3_file object.
+*/
+static struct sqlite3_io_methods JournalFileMethods = {
+  1,             /* iVersion */
+  jrnlClose,     /* xClose */
+  jrnlRead,      /* xRead */
+  jrnlWrite,     /* xWrite */
+  jrnlTruncate,  /* xTruncate */
+  jrnlSync,      /* xSync */
+  jrnlFileSize,  /* xFileSize */
+  0,             /* xLock */
+  0,             /* xUnlock */
+  0,             /* xCheckReservedLock */
+  0,             /* xFileControl */
+  0,             /* xSectorSize */
+  0,             /* xDeviceCharacteristics */
+  0,             /* xShmMap */
+  0,             /* xShmLock */
+  0,             /* xShmBarrier */
+  0              /* xShmUnmap */
+};
+
+/* 
+** Open a journal file.
+*/
+SQLITE_PRIVATE int sqlite3JournalOpen(
+  sqlite3_vfs *pVfs,         /* The VFS to use for actual file I/O */
+  const char *zName,         /* Name of the journal file */
+  sqlite3_file *pJfd,        /* Preallocated, blank file handle */
+  int flags,                 /* Opening flags */
+  int nBuf                   /* Bytes buffered before opening the file */
+){
+  JournalFile *p = (JournalFile *)pJfd;
+  memset(p, 0, sqlite3JournalSize(pVfs));
+  if( nBuf>0 ){
+    p->zBuf = sqlite3MallocZero(nBuf);
+    if( !p->zBuf ){
+      return SQLITE_NOMEM;
+    }
+  }else{
+    return sqlite3OsOpen(pVfs, zName, pJfd, flags, 0);
+  }
+  p->pMethod = &JournalFileMethods;
+  p->nBuf = nBuf;
+  p->flags = flags;
+  p->zJournal = zName;
+  p->pVfs = pVfs;
+  return SQLITE_OK;
+}
+
+/*
+** If the argument p points to a JournalFile structure, and the underlying
+** file has not yet been created, create it now.
+*/
+SQLITE_PRIVATE int sqlite3JournalCreate(sqlite3_file *p){
+  if( p->pMethods!=&JournalFileMethods ){
+    return SQLITE_OK;
+  }
+  return createFile((JournalFile *)p);
+}
+
+/* 
+** Return the number of bytes required to store a JournalFile that uses vfs
+** pVfs to create the underlying on-disk files.
+*/
+SQLITE_PRIVATE int sqlite3JournalSize(sqlite3_vfs *pVfs){
+  return (pVfs->szOsFile+sizeof(JournalFile));
+}
+#endif
+
+/************** End of journal.c *********************************************/
+/************** Begin file memjournal.c **************************************/
+/*
+** 2008 October 7
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains code use to implement an in-memory rollback journal.
+** The in-memory rollback journal is used to journal transactions for
+** ":memory:" databases and when the journal_mode=MEMORY pragma is used.
+*/
+
+/* Forward references to internal structures */
+typedef struct MemJournal MemJournal;
+typedef struct FilePoint FilePoint;
+typedef struct FileChunk FileChunk;
+
+/* Space to hold the rollback journal is allocated in increments of
+** this many bytes.
+**
+** The size chosen is a little less than a power of two.  That way,
+** the FileChunk object will have a size that almost exactly fills
+** a power-of-two allocation.  This mimimizes wasted space in power-of-two
+** memory allocators.
+*/
+#define JOURNAL_CHUNKSIZE ((int)(1024-sizeof(FileChunk*)))
+
+/* Macro to find the minimum of two numeric values.
+*/
+#ifndef MIN
+# define MIN(x,y) ((x)<(y)?(x):(y))
+#endif
+
+/*
+** The rollback journal is composed of a linked list of these structures.
+*/
+struct FileChunk {
+  FileChunk *pNext;               /* Next chunk in the journal */
+  u8 zChunk[JOURNAL_CHUNKSIZE];   /* Content of this chunk */
+};
+
+/*
+** An instance of this object serves as a cursor into the rollback journal.
+** The cursor can be either for reading or writing.
+*/
+struct FilePoint {
+  sqlite3_int64 iOffset;          /* Offset from the beginning of the file */
+  FileChunk *pChunk;              /* Specific chunk into which cursor points */
+};
+
+/*
+** This subclass is a subclass of sqlite3_file.  Each open memory-journal
+** is an instance of this class.
+*/
+struct MemJournal {
+  sqlite3_io_methods *pMethod;    /* Parent class. MUST BE FIRST */
+  FileChunk *pFirst;              /* Head of in-memory chunk-list */
+  FilePoint endpoint;             /* Pointer to the end of the file */
+  FilePoint readpoint;            /* Pointer to the end of the last xRead() */
+};
+
+/*
+** Read data from the in-memory journal file.  This is the implementation
+** of the sqlite3_vfs.xRead method.
+*/
+static int memjrnlRead(
+  sqlite3_file *pJfd,    /* The journal file from which to read */
+  void *zBuf,            /* Put the results here */
+  int iAmt,              /* Number of bytes to read */
+  sqlite_int64 iOfst     /* Begin reading at this offset */
+){
+  MemJournal *p = (MemJournal *)pJfd;
+  u8 *zOut = zBuf;
+  int nRead = iAmt;
+  int iChunkOffset;
+  FileChunk *pChunk;
+
+  /* SQLite never tries to read past the end of a rollback journal file */
+  assert( iOfst+iAmt<=p->endpoint.iOffset );
+
+  if( p->readpoint.iOffset!=iOfst || iOfst==0 ){
+    sqlite3_int64 iOff = 0;
+    for(pChunk=p->pFirst; 
+        ALWAYS(pChunk) && (iOff+JOURNAL_CHUNKSIZE)<=iOfst;
+        pChunk=pChunk->pNext
+    ){
+      iOff += JOURNAL_CHUNKSIZE;
+    }
+  }else{
+    pChunk = p->readpoint.pChunk;
+  }
+
+  iChunkOffset = (int)(iOfst%JOURNAL_CHUNKSIZE);
+  do {
+    int iSpace = JOURNAL_CHUNKSIZE - iChunkOffset;
+    int nCopy = MIN(nRead, (JOURNAL_CHUNKSIZE - iChunkOffset));
+    memcpy(zOut, &pChunk->zChunk[iChunkOffset], nCopy);
+    zOut += nCopy;
+    nRead -= iSpace;
+    iChunkOffset = 0;
+  } while( nRead>=0 && (pChunk=pChunk->pNext)!=0 && nRead>0 );
+  p->readpoint.iOffset = iOfst+iAmt;
+  p->readpoint.pChunk = pChunk;
+
+  return SQLITE_OK;
+}
+
+/*
+** Write data to the file.
+*/
+static int memjrnlWrite(
+  sqlite3_file *pJfd,    /* The journal file into which to write */
+  const void *zBuf,      /* Take data to be written from here */
+  int iAmt,              /* Number of bytes to write */
+  sqlite_int64 iOfst     /* Begin writing at this offset into the file */
+){
+  MemJournal *p = (MemJournal *)pJfd;
+  int nWrite = iAmt;
+  u8 *zWrite = (u8 *)zBuf;
+
+  /* An in-memory journal file should only ever be appended to. Random
+  ** access writes are not required by sqlite.
+  */
+  assert( iOfst==p->endpoint.iOffset );
+  UNUSED_PARAMETER(iOfst);
+
+  while( nWrite>0 ){
+    FileChunk *pChunk = p->endpoint.pChunk;
+    int iChunkOffset = (int)(p->endpoint.iOffset%JOURNAL_CHUNKSIZE);
+    int iSpace = MIN(nWrite, JOURNAL_CHUNKSIZE - iChunkOffset);
+
+    if( iChunkOffset==0 ){
+      /* New chunk is required to extend the file. */
+      FileChunk *pNew = sqlite3_malloc(sizeof(FileChunk));
+      if( !pNew ){
+        return SQLITE_IOERR_NOMEM;
+      }
+      pNew->pNext = 0;
+      if( pChunk ){
+        assert( p->pFirst );
+        pChunk->pNext = pNew;
+      }else{
+        assert( !p->pFirst );
+        p->pFirst = pNew;
+      }
+      p->endpoint.pChunk = pNew;
+    }
+
+    memcpy(&p->endpoint.pChunk->zChunk[iChunkOffset], zWrite, iSpace);
+    zWrite += iSpace;
+    nWrite -= iSpace;
+    p->endpoint.iOffset += iSpace;
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** Truncate the file.
+*/
+static int memjrnlTruncate(sqlite3_file *pJfd, sqlite_int64 size){
+  MemJournal *p = (MemJournal *)pJfd;
+  FileChunk *pChunk;
+  assert(size==0);
+  UNUSED_PARAMETER(size);
+  pChunk = p->pFirst;
+  while( pChunk ){
+    FileChunk *pTmp = pChunk;
+    pChunk = pChunk->pNext;
+    sqlite3_free(pTmp);
+  }
+  sqlite3MemJournalOpen(pJfd);
+  return SQLITE_OK;
+}
+
+/*
+** Close the file.
+*/
+static int memjrnlClose(sqlite3_file *pJfd){
+  memjrnlTruncate(pJfd, 0);
+  return SQLITE_OK;
+}
+
+
+/*
+** Sync the file.
+**
+** Syncing an in-memory journal is a no-op.  And, in fact, this routine
+** is never called in a working implementation.  This implementation
+** exists purely as a contingency, in case some malfunction in some other
+** part of SQLite causes Sync to be called by mistake.
+*/
+static int memjrnlSync(sqlite3_file *NotUsed, int NotUsed2){
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  return SQLITE_OK;
+}
+
+/*
+** Query the size of the file in bytes.
+*/
+static int memjrnlFileSize(sqlite3_file *pJfd, sqlite_int64 *pSize){
+  MemJournal *p = (MemJournal *)pJfd;
+  *pSize = (sqlite_int64) p->endpoint.iOffset;
+  return SQLITE_OK;
+}
+
+/*
+** Table of methods for MemJournal sqlite3_file object.
+*/
+static const struct sqlite3_io_methods MemJournalMethods = {
+  1,                /* iVersion */
+  memjrnlClose,     /* xClose */
+  memjrnlRead,      /* xRead */
+  memjrnlWrite,     /* xWrite */
+  memjrnlTruncate,  /* xTruncate */
+  memjrnlSync,      /* xSync */
+  memjrnlFileSize,  /* xFileSize */
+  0,                /* xLock */
+  0,                /* xUnlock */
+  0,                /* xCheckReservedLock */
+  0,                /* xFileControl */
+  0,                /* xSectorSize */
+  0,                /* xDeviceCharacteristics */
+  0,                /* xShmMap */
+  0,                /* xShmLock */
+  0,                /* xShmBarrier */
+  0                 /* xShmUnlock */
+};
+
+/* 
+** Open a journal file.
+*/
+SQLITE_PRIVATE void sqlite3MemJournalOpen(sqlite3_file *pJfd){
+  MemJournal *p = (MemJournal *)pJfd;
+  assert( EIGHT_BYTE_ALIGNMENT(p) );
+  memset(p, 0, sqlite3MemJournalSize());
+  p->pMethod = (sqlite3_io_methods*)&MemJournalMethods;
+}
+
+/*
+** Return true if the file-handle passed as an argument is 
+** an in-memory journal 
+*/
+SQLITE_PRIVATE int sqlite3IsMemJournal(sqlite3_file *pJfd){
+  return pJfd->pMethods==&MemJournalMethods;
+}
+
+/* 
+** Return the number of bytes required to store a MemJournal file descriptor.
+*/
+SQLITE_PRIVATE int sqlite3MemJournalSize(void){
+  return sizeof(MemJournal);
+}
+
+/************** End of memjournal.c ******************************************/
+/************** Begin file walker.c ******************************************/
+/*
+** 2008 August 16
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains routines used for walking the parser tree for
+** an SQL statement.
+*/
+
+
+/*
+** Walk an expression tree.  Invoke the callback once for each node
+** of the expression, while decending.  (In other words, the callback
+** is invoked before visiting children.)
+**
+** The return value from the callback should be one of the WRC_*
+** constants to specify how to proceed with the walk.
+**
+**    WRC_Continue      Continue descending down the tree.
+**
+**    WRC_Prune         Do not descend into child nodes.  But allow
+**                      the walk to continue with sibling nodes.
+**
+**    WRC_Abort         Do no more callbacks.  Unwind the stack and
+**                      return the top-level walk call.
+**
+** The return value from this routine is WRC_Abort to abandon the tree walk
+** and WRC_Continue to continue.
+*/
+SQLITE_PRIVATE int sqlite3WalkExpr(Walker *pWalker, Expr *pExpr){
+  int rc;
+  if( pExpr==0 ) return WRC_Continue;
+  testcase( ExprHasProperty(pExpr, EP_TokenOnly) );
+  testcase( ExprHasProperty(pExpr, EP_Reduced) );
+  rc = pWalker->xExprCallback(pWalker, pExpr);
+  if( rc==WRC_Continue
+              && !ExprHasAnyProperty(pExpr,EP_TokenOnly) ){
+    if( sqlite3WalkExpr(pWalker, pExpr->pLeft) ) return WRC_Abort;
+    if( sqlite3WalkExpr(pWalker, pExpr->pRight) ) return WRC_Abort;
+    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
+      if( sqlite3WalkSelect(pWalker, pExpr->x.pSelect) ) return WRC_Abort;
+    }else{
+      if( sqlite3WalkExprList(pWalker, pExpr->x.pList) ) return WRC_Abort;
+    }
+  }
+  return rc & WRC_Abort;
+}
+
+/*
+** Call sqlite3WalkExpr() for every expression in list p or until
+** an abort request is seen.
+*/
+SQLITE_PRIVATE int sqlite3WalkExprList(Walker *pWalker, ExprList *p){
+  int i;
+  struct ExprList_item *pItem;
+  if( p ){
+    for(i=p->nExpr, pItem=p->a; i>0; i--, pItem++){
+      if( sqlite3WalkExpr(pWalker, pItem->pExpr) ) return WRC_Abort;
+    }
+  }
+  return WRC_Continue;
+}
+
+/*
+** Walk all expressions associated with SELECT statement p.  Do
+** not invoke the SELECT callback on p, but do (of course) invoke
+** any expr callbacks and SELECT callbacks that come from subqueries.
+** Return WRC_Abort or WRC_Continue.
+*/
+SQLITE_PRIVATE int sqlite3WalkSelectExpr(Walker *pWalker, Select *p){
+  if( sqlite3WalkExprList(pWalker, p->pEList) ) return WRC_Abort;
+  if( sqlite3WalkExpr(pWalker, p->pWhere) ) return WRC_Abort;
+  if( sqlite3WalkExprList(pWalker, p->pGroupBy) ) return WRC_Abort;
+  if( sqlite3WalkExpr(pWalker, p->pHaving) ) return WRC_Abort;
+  if( sqlite3WalkExprList(pWalker, p->pOrderBy) ) return WRC_Abort;
+  if( sqlite3WalkExpr(pWalker, p->pLimit) ) return WRC_Abort;
+  if( sqlite3WalkExpr(pWalker, p->pOffset) ) return WRC_Abort;
+  return WRC_Continue;
+}
+
+/*
+** Walk the parse trees associated with all subqueries in the
+** FROM clause of SELECT statement p.  Do not invoke the select
+** callback on p, but do invoke it on each FROM clause subquery
+** and on any subqueries further down in the tree.  Return 
+** WRC_Abort or WRC_Continue;
+*/
+SQLITE_PRIVATE int sqlite3WalkSelectFrom(Walker *pWalker, Select *p){
+  SrcList *pSrc;
+  int i;
+  struct SrcList_item *pItem;
+
+  pSrc = p->pSrc;
+  if( ALWAYS(pSrc) ){
+    for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
+      if( sqlite3WalkSelect(pWalker, pItem->pSelect) ){
+        return WRC_Abort;
+      }
+    }
+  }
+  return WRC_Continue;
+} 
+
+/*
+** Call sqlite3WalkExpr() for every expression in Select statement p.
+** Invoke sqlite3WalkSelect() for subqueries in the FROM clause and
+** on the compound select chain, p->pPrior.
+**
+** Return WRC_Continue under normal conditions.  Return WRC_Abort if
+** there is an abort request.
+**
+** If the Walker does not have an xSelectCallback() then this routine
+** is a no-op returning WRC_Continue.
+*/
+SQLITE_PRIVATE int sqlite3WalkSelect(Walker *pWalker, Select *p){
+  int rc;
+  if( p==0 || pWalker->xSelectCallback==0 ) return WRC_Continue;
+  rc = WRC_Continue;
+  while( p  ){
+    rc = pWalker->xSelectCallback(pWalker, p);
+    if( rc ) break;
+    if( sqlite3WalkSelectExpr(pWalker, p) ) return WRC_Abort;
+    if( sqlite3WalkSelectFrom(pWalker, p) ) return WRC_Abort;
+    p = p->pPrior;
+  }
+  return rc & WRC_Abort;
+}
+
+/************** End of walker.c **********************************************/
+/************** Begin file resolve.c *****************************************/
+/*
+** 2008 August 18
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains routines used for walking the parser tree and
+** resolve all identifiers by associating them with a particular
+** table and column.
+*/
+
+/*
+** Turn the pExpr expression into an alias for the iCol-th column of the
+** result set in pEList.
+**
+** If the result set column is a simple column reference, then this routine
+** makes an exact copy.  But for any other kind of expression, this
+** routine make a copy of the result set column as the argument to the
+** TK_AS operator.  The TK_AS operator causes the expression to be
+** evaluated just once and then reused for each alias.
+**
+** The reason for suppressing the TK_AS term when the expression is a simple
+** column reference is so that the column reference will be recognized as
+** usable by indices within the WHERE clause processing logic. 
+**
+** Hack:  The TK_AS operator is inhibited if zType[0]=='G'.  This means
+** that in a GROUP BY clause, the expression is evaluated twice.  Hence:
+**
+**     SELECT random()%5 AS x, count(*) FROM tab GROUP BY x
+**
+** Is equivalent to:
+**
+**     SELECT random()%5 AS x, count(*) FROM tab GROUP BY random()%5
+**
+** The result of random()%5 in the GROUP BY clause is probably different
+** from the result in the result-set.  We might fix this someday.  Or
+** then again, we might not...
+*/
+static void resolveAlias(
+  Parse *pParse,         /* Parsing context */
+  ExprList *pEList,      /* A result set */
+  int iCol,              /* A column in the result set.  0..pEList->nExpr-1 */
+  Expr *pExpr,           /* Transform this into an alias to the result set */
+  const char *zType      /* "GROUP" or "ORDER" or "" */
+){
+  Expr *pOrig;           /* The iCol-th column of the result set */
+  Expr *pDup;            /* Copy of pOrig */
+  sqlite3 *db;           /* The database connection */
+
+  assert( iCol>=0 && iCol<pEList->nExpr );
+  pOrig = pEList->a[iCol].pExpr;
+  assert( pOrig!=0 );
+  assert( pOrig->flags & EP_Resolved );
+  db = pParse->db;
+  if( pOrig->op!=TK_COLUMN && zType[0]!='G' ){
+    pDup = sqlite3ExprDup(db, pOrig, 0);
+    pDup = sqlite3PExpr(pParse, TK_AS, pDup, 0, 0);
+    if( pDup==0 ) return;
+    if( pEList->a[iCol].iAlias==0 ){
+      pEList->a[iCol].iAlias = (u16)(++pParse->nAlias);
+    }
+    pDup->iTable = pEList->a[iCol].iAlias;
+  }else if( ExprHasProperty(pOrig, EP_IntValue) || pOrig->u.zToken==0 ){
+    pDup = sqlite3ExprDup(db, pOrig, 0);
+    if( pDup==0 ) return;
+  }else{
+    char *zToken = pOrig->u.zToken;
+    assert( zToken!=0 );
+    pOrig->u.zToken = 0;
+    pDup = sqlite3ExprDup(db, pOrig, 0);
+    pOrig->u.zToken = zToken;
+    if( pDup==0 ) return;
+    assert( (pDup->flags & (EP_Reduced|EP_TokenOnly))==0 );
+    pDup->flags2 |= EP2_MallocedToken;
+    pDup->u.zToken = sqlite3DbStrDup(db, zToken);
+  }
+  if( pExpr->flags & EP_ExpCollate ){
+    pDup->pColl = pExpr->pColl;
+    pDup->flags |= EP_ExpCollate;
+  }
+
+  /* Before calling sqlite3ExprDelete(), set the EP_Static flag. This 
+  ** prevents ExprDelete() from deleting the Expr structure itself,
+  ** allowing it to be repopulated by the memcpy() on the following line.
+  */
+  ExprSetProperty(pExpr, EP_Static);
+  sqlite3ExprDelete(db, pExpr);
+  memcpy(pExpr, pDup, sizeof(*pExpr));
+  sqlite3DbFree(db, pDup);
+}
+
+/*
+** Given the name of a column of the form X.Y.Z or Y.Z or just Z, look up
+** that name in the set of source tables in pSrcList and make the pExpr 
+** expression node refer back to that source column.  The following changes
+** are made to pExpr:
+**
+**    pExpr->iDb           Set the index in db->aDb[] of the database X
+**                         (even if X is implied).
+**    pExpr->iTable        Set to the cursor number for the table obtained
+**                         from pSrcList.
+**    pExpr->pTab          Points to the Table structure of X.Y (even if
+**                         X and/or Y are implied.)
+**    pExpr->iColumn       Set to the column number within the table.
+**    pExpr->op            Set to TK_COLUMN.
+**    pExpr->pLeft         Any expression this points to is deleted
+**    pExpr->pRight        Any expression this points to is deleted.
+**
+** The zDb variable is the name of the database (the "X").  This value may be
+** NULL meaning that name is of the form Y.Z or Z.  Any available database
+** can be used.  The zTable variable is the name of the table (the "Y").  This
+** value can be NULL if zDb is also NULL.  If zTable is NULL it
+** means that the form of the name is Z and that columns from any table
+** can be used.
+**
+** If the name cannot be resolved unambiguously, leave an error message
+** in pParse and return WRC_Abort.  Return WRC_Prune on success.
+*/
+static int lookupName(
+  Parse *pParse,       /* The parsing context */
+  const char *zDb,     /* Name of the database containing table, or NULL */
+  const char *zTab,    /* Name of table containing column, or NULL */
+  const char *zCol,    /* Name of the column. */
+  NameContext *pNC,    /* The name context used to resolve the name */
+  Expr *pExpr          /* Make this EXPR node point to the selected column */
+){
+  int i, j;            /* Loop counters */
+  int cnt = 0;                      /* Number of matching column names */
+  int cntTab = 0;                   /* Number of matching table names */
+  sqlite3 *db = pParse->db;         /* The database connection */
+  struct SrcList_item *pItem;       /* Use for looping over pSrcList items */
+  struct SrcList_item *pMatch = 0;  /* The matching pSrcList item */
+  NameContext *pTopNC = pNC;        /* First namecontext in the list */
+  Schema *pSchema = 0;              /* Schema of the expression */
+  int isTrigger = 0;
+
+  assert( pNC );     /* the name context cannot be NULL. */
+  assert( zCol );    /* The Z in X.Y.Z cannot be NULL */
+  assert( ~ExprHasAnyProperty(pExpr, EP_TokenOnly|EP_Reduced) );
+
+  /* Initialize the node to no-match */
+  pExpr->iTable = -1;
+  pExpr->pTab = 0;
+  ExprSetIrreducible(pExpr);
+
+  /* Start at the inner-most context and move outward until a match is found */
+  while( pNC && cnt==0 ){
+    ExprList *pEList;
+    SrcList *pSrcList = pNC->pSrcList;
+
+    if( pSrcList ){
+      for(i=0, pItem=pSrcList->a; i<pSrcList->nSrc; i++, pItem++){
+        Table *pTab;
+        int iDb;
+        Column *pCol;
+  
+        pTab = pItem->pTab;
+        assert( pTab!=0 && pTab->zName!=0 );
+        iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+        assert( pTab->nCol>0 );
+        if( zTab ){
+          if( pItem->zAlias ){
+            char *zTabName = pItem->zAlias;
+            if( sqlite3StrICmp(zTabName, zTab)!=0 ) continue;
+          }else{
+            char *zTabName = pTab->zName;
+            if( NEVER(zTabName==0) || sqlite3StrICmp(zTabName, zTab)!=0 ){
+              continue;
+            }
+            if( zDb!=0 && sqlite3StrICmp(db->aDb[iDb].zName, zDb)!=0 ){
+              continue;
+            }
+          }
+        }
+        if( 0==(cntTab++) ){
+          pExpr->iTable = pItem->iCursor;
+          pExpr->pTab = pTab;
+          pSchema = pTab->pSchema;
+          pMatch = pItem;
+        }
+        for(j=0, pCol=pTab->aCol; j<pTab->nCol; j++, pCol++){
+          if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
+            IdList *pUsing;
+            cnt++;
+            pExpr->iTable = pItem->iCursor;
+            pExpr->pTab = pTab;
+            pMatch = pItem;
+            pSchema = pTab->pSchema;
+            /* Substitute the rowid (column -1) for the INTEGER PRIMARY KEY */
+            pExpr->iColumn = j==pTab->iPKey ? -1 : (i16)j;
+            if( i<pSrcList->nSrc-1 ){
+              if( pItem[1].jointype & JT_NATURAL ){
+                /* If this match occurred in the left table of a natural join,
+                ** then skip the right table to avoid a duplicate match */
+                pItem++;
+                i++;
+              }else if( (pUsing = pItem[1].pUsing)!=0 ){
+                /* If this match occurs on a column that is in the USING clause
+                ** of a join, skip the search of the right table of the join
+                ** to avoid a duplicate match there. */
+                int k;
+                for(k=0; k<pUsing->nId; k++){
+                  if( sqlite3StrICmp(pUsing->a[k].zName, zCol)==0 ){
+                    pItem++;
+                    i++;
+                    break;
+                  }
+                }
+              }
+            }
+            break;
+          }
+        }
+      }
+    }
+
+#ifndef SQLITE_OMIT_TRIGGER
+    /* If we have not already resolved the name, then maybe 
+    ** it is a new.* or old.* trigger argument reference
+    */
+    if( zDb==0 && zTab!=0 && cnt==0 && pParse->pTriggerTab!=0 ){
+      int op = pParse->eTriggerOp;
+      Table *pTab = 0;
+      assert( op==TK_DELETE || op==TK_UPDATE || op==TK_INSERT );
+      if( op!=TK_DELETE && sqlite3StrICmp("new",zTab) == 0 ){
+        pExpr->iTable = 1;
+        pTab = pParse->pTriggerTab;
+      }else if( op!=TK_INSERT && sqlite3StrICmp("old",zTab)==0 ){
+        pExpr->iTable = 0;
+        pTab = pParse->pTriggerTab;
+      }
+
+      if( pTab ){ 
+        int iCol;
+        pSchema = pTab->pSchema;
+        cntTab++;
+        for(iCol=0; iCol<pTab->nCol; iCol++){
+          Column *pCol = &pTab->aCol[iCol];
+          if( sqlite3StrICmp(pCol->zName, zCol)==0 ){
+            if( iCol==pTab->iPKey ){
+              iCol = -1;
+            }
+            break;
+          }
+        }
+        if( iCol>=pTab->nCol && sqlite3IsRowid(zCol) ){
+          iCol = -1;        /* IMP: R-44911-55124 */
+        }
+        if( iCol<pTab->nCol ){
+          cnt++;
+          if( iCol<0 ){
+            pExpr->affinity = SQLITE_AFF_INTEGER;
+          }else if( pExpr->iTable==0 ){
+            testcase( iCol==31 );
+            testcase( iCol==32 );
+            pParse->oldmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
+          }else{
+            testcase( iCol==31 );
+            testcase( iCol==32 );
+            pParse->newmask |= (iCol>=32 ? 0xffffffff : (((u32)1)<<iCol));
+          }
+          pExpr->iColumn = (i16)iCol;
+          pExpr->pTab = pTab;
+          isTrigger = 1;
+        }
+      }
+    }
+#endif /* !defined(SQLITE_OMIT_TRIGGER) */
+
+    /*
+    ** Perhaps the name is a reference to the ROWID
+    */
+    if( cnt==0 && cntTab==1 && sqlite3IsRowid(zCol) ){
+      cnt = 1;
+      pExpr->iColumn = -1;     /* IMP: R-44911-55124 */
+      pExpr->affinity = SQLITE_AFF_INTEGER;
+    }
+
+    /*
+    ** If the input is of the form Z (not Y.Z or X.Y.Z) then the name Z
+    ** might refer to an result-set alias.  This happens, for example, when
+    ** we are resolving names in the WHERE clause of the following command:
+    **
+    **     SELECT a+b AS x FROM table WHERE x<10;
+    **
+    ** In cases like this, replace pExpr with a copy of the expression that
+    ** forms the result set entry ("a+b" in the example) and return immediately.
+    ** Note that the expression in the result set should have already been
+    ** resolved by the time the WHERE clause is resolved.
+    */
+    if( cnt==0 && (pEList = pNC->pEList)!=0 && zTab==0 ){
+      for(j=0; j<pEList->nExpr; j++){
+        char *zAs = pEList->a[j].zName;
+        if( zAs!=0 && sqlite3StrICmp(zAs, zCol)==0 ){
+          Expr *pOrig;
+          assert( pExpr->pLeft==0 && pExpr->pRight==0 );
+          assert( pExpr->x.pList==0 );
+          assert( pExpr->x.pSelect==0 );
+          pOrig = pEList->a[j].pExpr;
+          if( !pNC->allowAgg && ExprHasProperty(pOrig, EP_Agg) ){
+            sqlite3ErrorMsg(pParse, "misuse of aliased aggregate %s", zAs);
+            return WRC_Abort;
+          }
+          resolveAlias(pParse, pEList, j, pExpr, "");
+          cnt = 1;
+          pMatch = 0;
+          assert( zTab==0 && zDb==0 );
+          goto lookupname_end;
+        }
+      } 
+    }
+
+    /* Advance to the next name context.  The loop will exit when either
+    ** we have a match (cnt>0) or when we run out of name contexts.
+    */
+    if( cnt==0 ){
+      pNC = pNC->pNext;
+    }
+  }
+
+  /*
+  ** If X and Y are NULL (in other words if only the column name Z is
+  ** supplied) and the value of Z is enclosed in double-quotes, then
+  ** Z is a string literal if it doesn't match any column names.  In that
+  ** case, we need to return right away and not make any changes to
+  ** pExpr.
+  **
+  ** Because no reference was made to outer contexts, the pNC->nRef
+  ** fields are not changed in any context.
+  */
+  if( cnt==0 && zTab==0 && ExprHasProperty(pExpr,EP_DblQuoted) ){
+    pExpr->op = TK_STRING;
+    pExpr->pTab = 0;
+    return WRC_Prune;
+  }
+
+  /*
+  ** cnt==0 means there was not match.  cnt>1 means there were two or
+  ** more matches.  Either way, we have an error.
+  */
+  if( cnt!=1 ){
+    const char *zErr;
+    zErr = cnt==0 ? "no such column" : "ambiguous column name";
+    if( zDb ){
+      sqlite3ErrorMsg(pParse, "%s: %s.%s.%s", zErr, zDb, zTab, zCol);
+    }else if( zTab ){
+      sqlite3ErrorMsg(pParse, "%s: %s.%s", zErr, zTab, zCol);
+    }else{
+      sqlite3ErrorMsg(pParse, "%s: %s", zErr, zCol);
+    }
+    pParse->checkSchema = 1;
+    pTopNC->nErr++;
+  }
+
+  /* If a column from a table in pSrcList is referenced, then record
+  ** this fact in the pSrcList.a[].colUsed bitmask.  Column 0 causes
+  ** bit 0 to be set.  Column 1 sets bit 1.  And so forth.  If the
+  ** column number is greater than the number of bits in the bitmask
+  ** then set the high-order bit of the bitmask.
+  */
+  if( pExpr->iColumn>=0 && pMatch!=0 ){
+    int n = pExpr->iColumn;
+    testcase( n==BMS-1 );
+    if( n>=BMS ){
+      n = BMS-1;
+    }
+    assert( pMatch->iCursor==pExpr->iTable );
+    pMatch->colUsed |= ((Bitmask)1)<<n;
+  }
+
+  /* Clean up and return
+  */
+  sqlite3ExprDelete(db, pExpr->pLeft);
+  pExpr->pLeft = 0;
+  sqlite3ExprDelete(db, pExpr->pRight);
+  pExpr->pRight = 0;
+  pExpr->op = (isTrigger ? TK_TRIGGER : TK_COLUMN);
+lookupname_end:
+  if( cnt==1 ){
+    assert( pNC!=0 );
+    sqlite3AuthRead(pParse, pExpr, pSchema, pNC->pSrcList);
+    /* Increment the nRef value on all name contexts from TopNC up to
+    ** the point where the name matched. */
+    for(;;){
+      assert( pTopNC!=0 );
+      pTopNC->nRef++;
+      if( pTopNC==pNC ) break;
+      pTopNC = pTopNC->pNext;
+    }
+    return WRC_Prune;
+  } else {
+    return WRC_Abort;
+  }
+}
+
+/*
+** Allocate and return a pointer to an expression to load the column iCol
+** from datasource iSrc in SrcList pSrc.
+*/
+SQLITE_PRIVATE Expr *sqlite3CreateColumnExpr(sqlite3 *db, SrcList *pSrc, int iSrc, int iCol){
+  Expr *p = sqlite3ExprAlloc(db, TK_COLUMN, 0, 0);
+  if( p ){
+    struct SrcList_item *pItem = &pSrc->a[iSrc];
+    p->pTab = pItem->pTab;
+    p->iTable = pItem->iCursor;
+    if( p->pTab->iPKey==iCol ){
+      p->iColumn = -1;
+    }else{
+      p->iColumn = (ynVar)iCol;
+      testcase( iCol==BMS );
+      testcase( iCol==BMS-1 );
+      pItem->colUsed |= ((Bitmask)1)<<(iCol>=BMS ? BMS-1 : iCol);
+    }
+    ExprSetProperty(p, EP_Resolved);
+  }
+  return p;
+}
+
+/*
+** This routine is callback for sqlite3WalkExpr().
+**
+** Resolve symbolic names into TK_COLUMN operators for the current
+** node in the expression tree.  Return 0 to continue the search down
+** the tree or 2 to abort the tree walk.
+**
+** This routine also does error checking and name resolution for
+** function names.  The operator for aggregate functions is changed
+** to TK_AGG_FUNCTION.
+*/
+static int resolveExprStep(Walker *pWalker, Expr *pExpr){
+  NameContext *pNC;
+  Parse *pParse;
+
+  pNC = pWalker->u.pNC;
+  assert( pNC!=0 );
+  pParse = pNC->pParse;
+  assert( pParse==pWalker->pParse );
+
+  if( ExprHasAnyProperty(pExpr, EP_Resolved) ) return WRC_Prune;
+  ExprSetProperty(pExpr, EP_Resolved);
+#ifndef NDEBUG
+  if( pNC->pSrcList && pNC->pSrcList->nAlloc>0 ){
+    SrcList *pSrcList = pNC->pSrcList;
+    int i;
+    for(i=0; i<pNC->pSrcList->nSrc; i++){
+      assert( pSrcList->a[i].iCursor>=0 && pSrcList->a[i].iCursor<pParse->nTab);
+    }
+  }
+#endif
+  switch( pExpr->op ){
+
+#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)
+    /* The special operator TK_ROW means use the rowid for the first
+    ** column in the FROM clause.  This is used by the LIMIT and ORDER BY
+    ** clause processing on UPDATE and DELETE statements.
+    */
+    case TK_ROW: {
+      SrcList *pSrcList = pNC->pSrcList;
+      struct SrcList_item *pItem;
+      assert( pSrcList && pSrcList->nSrc==1 );
+      pItem = pSrcList->a; 
+      pExpr->op = TK_COLUMN;
+      pExpr->pTab = pItem->pTab;
+      pExpr->iTable = pItem->iCursor;
+      pExpr->iColumn = -1;
+      pExpr->affinity = SQLITE_AFF_INTEGER;
+      break;
+    }
+#endif /* defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY) */
+
+    /* A lone identifier is the name of a column.
+    */
+    case TK_ID: {
+      return lookupName(pParse, 0, 0, pExpr->u.zToken, pNC, pExpr);
+    }
+  
+    /* A table name and column name:     ID.ID
+    ** Or a database, table and column:  ID.ID.ID
+    */
+    case TK_DOT: {
+      const char *zColumn;
+      const char *zTable;
+      const char *zDb;
+      Expr *pRight;
+
+      /* if( pSrcList==0 ) break; */
+      pRight = pExpr->pRight;
+      if( pRight->op==TK_ID ){
+        zDb = 0;
+        zTable = pExpr->pLeft->u.zToken;
+        zColumn = pRight->u.zToken;
+      }else{
+        assert( pRight->op==TK_DOT );
+        zDb = pExpr->pLeft->u.zToken;
+        zTable = pRight->pLeft->u.zToken;
+        zColumn = pRight->pRight->u.zToken;
+      }
+      return lookupName(pParse, zDb, zTable, zColumn, pNC, pExpr);
+    }
+
+    /* Resolve function names
+    */
+    case TK_CONST_FUNC:
+    case TK_FUNCTION: {
+      ExprList *pList = pExpr->x.pList;    /* The argument list */
+      int n = pList ? pList->nExpr : 0;    /* Number of arguments */
+      int no_such_func = 0;       /* True if no such function exists */
+      int wrong_num_args = 0;     /* True if wrong number of arguments */
+      int is_agg = 0;             /* True if is an aggregate function */
+      int auth;                   /* Authorization to use the function */
+      int nId;                    /* Number of characters in function name */
+      const char *zId;            /* The function name. */
+      FuncDef *pDef;              /* Information about the function */
+      u8 enc = ENC(pParse->db);   /* The database encoding */
+
+      testcase( pExpr->op==TK_CONST_FUNC );
+      assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
+      zId = pExpr->u.zToken;
+      nId = sqlite3Strlen30(zId);
+      pDef = sqlite3FindFunction(pParse->db, zId, nId, n, enc, 0);
+      if( pDef==0 ){
+        pDef = sqlite3FindFunction(pParse->db, zId, nId, -1, enc, 0);
+        if( pDef==0 ){
+          no_such_func = 1;
+        }else{
+          wrong_num_args = 1;
+        }
+      }else{
+        is_agg = pDef->xFunc==0;
+      }
+#ifndef SQLITE_OMIT_AUTHORIZATION
+      if( pDef ){
+        auth = sqlite3AuthCheck(pParse, SQLITE_FUNCTION, 0, pDef->zName, 0);
+        if( auth!=SQLITE_OK ){
+          if( auth==SQLITE_DENY ){
+            sqlite3ErrorMsg(pParse, "not authorized to use function: %s",
+                                    pDef->zName);
+            pNC->nErr++;
+          }
+          pExpr->op = TK_NULL;
+          return WRC_Prune;
+        }
+      }
+#endif
+      if( is_agg && !pNC->allowAgg ){
+        sqlite3ErrorMsg(pParse, "misuse of aggregate function %.*s()", nId,zId);
+        pNC->nErr++;
+        is_agg = 0;
+      }else if( no_such_func ){
+        sqlite3ErrorMsg(pParse, "no such function: %.*s", nId, zId);
+        pNC->nErr++;
+      }else if( wrong_num_args ){
+        sqlite3ErrorMsg(pParse,"wrong number of arguments to function %.*s()",
+             nId, zId);
+        pNC->nErr++;
+      }
+      if( is_agg ){
+        pExpr->op = TK_AGG_FUNCTION;
+        pNC->hasAgg = 1;
+      }
+      if( is_agg ) pNC->allowAgg = 0;
+      sqlite3WalkExprList(pWalker, pList);
+      if( is_agg ) pNC->allowAgg = 1;
+      /* FIX ME:  Compute pExpr->affinity based on the expected return
+      ** type of the function 
+      */
+      return WRC_Prune;
+    }
+#ifndef SQLITE_OMIT_SUBQUERY
+    case TK_SELECT:
+    case TK_EXISTS:  testcase( pExpr->op==TK_EXISTS );
+#endif
+    case TK_IN: {
+      testcase( pExpr->op==TK_IN );
+      if( ExprHasProperty(pExpr, EP_xIsSelect) ){
+        int nRef = pNC->nRef;
+#ifndef SQLITE_OMIT_CHECK
+        if( pNC->isCheck ){
+          sqlite3ErrorMsg(pParse,"subqueries prohibited in CHECK constraints");
+        }
+#endif
+        sqlite3WalkSelect(pWalker, pExpr->x.pSelect);
+        assert( pNC->nRef>=nRef );
+        if( nRef!=pNC->nRef ){
+          ExprSetProperty(pExpr, EP_VarSelect);
+        }
+      }
+      break;
+    }
+#ifndef SQLITE_OMIT_CHECK
+    case TK_VARIABLE: {
+      if( pNC->isCheck ){
+        sqlite3ErrorMsg(pParse,"parameters prohibited in CHECK constraints");
+      }
+      break;
+    }
+#endif
+  }
+  return (pParse->nErr || pParse->db->mallocFailed) ? WRC_Abort : WRC_Continue;
+}
+
+/*
+** pEList is a list of expressions which are really the result set of the
+** a SELECT statement.  pE is a term in an ORDER BY or GROUP BY clause.
+** This routine checks to see if pE is a simple identifier which corresponds
+** to the AS-name of one of the terms of the expression list.  If it is,
+** this routine return an integer between 1 and N where N is the number of
+** elements in pEList, corresponding to the matching entry.  If there is
+** no match, or if pE is not a simple identifier, then this routine
+** return 0.
+**
+** pEList has been resolved.  pE has not.
+*/
+static int resolveAsName(
+  Parse *pParse,     /* Parsing context for error messages */
+  ExprList *pEList,  /* List of expressions to scan */
+  Expr *pE           /* Expression we are trying to match */
+){
+  int i;             /* Loop counter */
+
+  UNUSED_PARAMETER(pParse);
+
+  if( pE->op==TK_ID ){
+    char *zCol = pE->u.zToken;
+    for(i=0; i<pEList->nExpr; i++){
+      char *zAs = pEList->a[i].zName;
+      if( zAs!=0 && sqlite3StrICmp(zAs, zCol)==0 ){
+        return i+1;
+      }
+    }
+  }
+  return 0;
+}
+
+/*
+** pE is a pointer to an expression which is a single term in the
+** ORDER BY of a compound SELECT.  The expression has not been
+** name resolved.
+**
+** At the point this routine is called, we already know that the
+** ORDER BY term is not an integer index into the result set.  That
+** case is handled by the calling routine.
+**
+** Attempt to match pE against result set columns in the left-most
+** SELECT statement.  Return the index i of the matching column,
+** as an indication to the caller that it should sort by the i-th column.
+** The left-most column is 1.  In other words, the value returned is the
+** same integer value that would be used in the SQL statement to indicate
+** the column.
+**
+** If there is no match, return 0.  Return -1 if an error occurs.
+*/
+static int resolveOrderByTermToExprList(
+  Parse *pParse,     /* Parsing context for error messages */
+  Select *pSelect,   /* The SELECT statement with the ORDER BY clause */
+  Expr *pE           /* The specific ORDER BY term */
+){
+  int i;             /* Loop counter */
+  ExprList *pEList;  /* The columns of the result set */
+  NameContext nc;    /* Name context for resolving pE */
+  sqlite3 *db;       /* Database connection */
+  int rc;            /* Return code from subprocedures */
+  u8 savedSuppErr;   /* Saved value of db->suppressErr */
+
+  assert( sqlite3ExprIsInteger(pE, &i)==0 );
+  pEList = pSelect->pEList;
+
+  /* Resolve all names in the ORDER BY term expression
+  */
+  memset(&nc, 0, sizeof(nc));
+  nc.pParse = pParse;
+  nc.pSrcList = pSelect->pSrc;
+  nc.pEList = pEList;
+  nc.allowAgg = 1;
+  nc.nErr = 0;
+  db = pParse->db;
+  savedSuppErr = db->suppressErr;
+  db->suppressErr = 1;
+  rc = sqlite3ResolveExprNames(&nc, pE);
+  db->suppressErr = savedSuppErr;
+  if( rc ) return 0;
+
+  /* Try to match the ORDER BY expression against an expression
+  ** in the result set.  Return an 1-based index of the matching
+  ** result-set entry.
+  */
+  for(i=0; i<pEList->nExpr; i++){
+    if( sqlite3ExprCompare(pEList->a[i].pExpr, pE)<2 ){
+      return i+1;
+    }
+  }
+
+  /* If no match, return 0. */
+  return 0;
+}
+
+/*
+** Generate an ORDER BY or GROUP BY term out-of-range error.
+*/
+static void resolveOutOfRangeError(
+  Parse *pParse,         /* The error context into which to write the error */
+  const char *zType,     /* "ORDER" or "GROUP" */
+  int i,                 /* The index (1-based) of the term out of range */
+  int mx                 /* Largest permissible value of i */
+){
+  sqlite3ErrorMsg(pParse, 
+    "%r %s BY term out of range - should be "
+    "between 1 and %d", i, zType, mx);
+}
+
+/*
+** Analyze the ORDER BY clause in a compound SELECT statement.   Modify
+** each term of the ORDER BY clause is a constant integer between 1
+** and N where N is the number of columns in the compound SELECT.
+**
+** ORDER BY terms that are already an integer between 1 and N are
+** unmodified.  ORDER BY terms that are integers outside the range of
+** 1 through N generate an error.  ORDER BY terms that are expressions
+** are matched against result set expressions of compound SELECT
+** beginning with the left-most SELECT and working toward the right.
+** At the first match, the ORDER BY expression is transformed into
+** the integer column number.
+**
+** Return the number of errors seen.
+*/
+static int resolveCompoundOrderBy(
+  Parse *pParse,        /* Parsing context.  Leave error messages here */
+  Select *pSelect       /* The SELECT statement containing the ORDER BY */
+){
+  int i;
+  ExprList *pOrderBy;
+  ExprList *pEList;
+  sqlite3 *db;
+  int moreToDo = 1;
+
+  pOrderBy = pSelect->pOrderBy;
+  if( pOrderBy==0 ) return 0;
+  db = pParse->db;
+#if SQLITE_MAX_COLUMN
+  if( pOrderBy->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){
+    sqlite3ErrorMsg(pParse, "too many terms in ORDER BY clause");
+    return 1;
+  }
+#endif
+  for(i=0; i<pOrderBy->nExpr; i++){
+    pOrderBy->a[i].done = 0;
+  }
+  pSelect->pNext = 0;
+  while( pSelect->pPrior ){
+    pSelect->pPrior->pNext = pSelect;
+    pSelect = pSelect->pPrior;
+  }
+  while( pSelect && moreToDo ){
+    struct ExprList_item *pItem;
+    moreToDo = 0;
+    pEList = pSelect->pEList;
+    assert( pEList!=0 );
+    for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
+      int iCol = -1;
+      Expr *pE, *pDup;
+      if( pItem->done ) continue;
+      pE = pItem->pExpr;
+      if( sqlite3ExprIsInteger(pE, &iCol) ){
+        if( iCol<=0 || iCol>pEList->nExpr ){
+          resolveOutOfRangeError(pParse, "ORDER", i+1, pEList->nExpr);
+          return 1;
+        }
+      }else{
+        iCol = resolveAsName(pParse, pEList, pE);
+        if( iCol==0 ){
+          pDup = sqlite3ExprDup(db, pE, 0);
+          if( !db->mallocFailed ){
+            assert(pDup);
+            iCol = resolveOrderByTermToExprList(pParse, pSelect, pDup);
+          }
+          sqlite3ExprDelete(db, pDup);
+        }
+      }
+      if( iCol>0 ){
+        CollSeq *pColl = pE->pColl;
+        int flags = pE->flags & EP_ExpCollate;
+        sqlite3ExprDelete(db, pE);
+        pItem->pExpr = pE = sqlite3Expr(db, TK_INTEGER, 0);
+        if( pE==0 ) return 1;
+        pE->pColl = pColl;
+        pE->flags |= EP_IntValue | flags;
+        pE->u.iValue = iCol;
+        pItem->iCol = (u16)iCol;
+        pItem->done = 1;
+      }else{
+        moreToDo = 1;
+      }
+    }
+    pSelect = pSelect->pNext;
+  }
+  for(i=0; i<pOrderBy->nExpr; i++){
+    if( pOrderBy->a[i].done==0 ){
+      sqlite3ErrorMsg(pParse, "%r ORDER BY term does not match any "
+            "column in the result set", i+1);
+      return 1;
+    }
+  }
+  return 0;
+}
+
+/*
+** Check every term in the ORDER BY or GROUP BY clause pOrderBy of
+** the SELECT statement pSelect.  If any term is reference to a
+** result set expression (as determined by the ExprList.a.iCol field)
+** then convert that term into a copy of the corresponding result set
+** column.
+**
+** If any errors are detected, add an error message to pParse and
+** return non-zero.  Return zero if no errors are seen.
+*/
+SQLITE_PRIVATE int sqlite3ResolveOrderGroupBy(
+  Parse *pParse,        /* Parsing context.  Leave error messages here */
+  Select *pSelect,      /* The SELECT statement containing the clause */
+  ExprList *pOrderBy,   /* The ORDER BY or GROUP BY clause to be processed */
+  const char *zType     /* "ORDER" or "GROUP" */
+){
+  int i;
+  sqlite3 *db = pParse->db;
+  ExprList *pEList;
+  struct ExprList_item *pItem;
+
+  if( pOrderBy==0 || pParse->db->mallocFailed ) return 0;
+#if SQLITE_MAX_COLUMN
+  if( pOrderBy->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){
+    sqlite3ErrorMsg(pParse, "too many terms in %s BY clause", zType);
+    return 1;
+  }
+#endif
+  pEList = pSelect->pEList;
+  assert( pEList!=0 );  /* sqlite3SelectNew() guarantees this */
+  for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
+    if( pItem->iCol ){
+      if( pItem->iCol>pEList->nExpr ){
+        resolveOutOfRangeError(pParse, zType, i+1, pEList->nExpr);
+        return 1;
+      }
+      resolveAlias(pParse, pEList, pItem->iCol-1, pItem->pExpr, zType);
+    }
+  }
+  return 0;
+}
+
+/*
+** pOrderBy is an ORDER BY or GROUP BY clause in SELECT statement pSelect.
+** The Name context of the SELECT statement is pNC.  zType is either
+** "ORDER" or "GROUP" depending on which type of clause pOrderBy is.
+**
+** This routine resolves each term of the clause into an expression.
+** If the order-by term is an integer I between 1 and N (where N is the
+** number of columns in the result set of the SELECT) then the expression
+** in the resolution is a copy of the I-th result-set expression.  If
+** the order-by term is an identify that corresponds to the AS-name of
+** a result-set expression, then the term resolves to a copy of the
+** result-set expression.  Otherwise, the expression is resolved in
+** the usual way - using sqlite3ResolveExprNames().
+**
+** This routine returns the number of errors.  If errors occur, then
+** an appropriate error message might be left in pParse.  (OOM errors
+** excepted.)
+*/
+static int resolveOrderGroupBy(
+  NameContext *pNC,     /* The name context of the SELECT statement */
+  Select *pSelect,      /* The SELECT statement holding pOrderBy */
+  ExprList *pOrderBy,   /* An ORDER BY or GROUP BY clause to resolve */
+  const char *zType     /* Either "ORDER" or "GROUP", as appropriate */
+){
+  int i;                         /* Loop counter */
+  int iCol;                      /* Column number */
+  struct ExprList_item *pItem;   /* A term of the ORDER BY clause */
+  Parse *pParse;                 /* Parsing context */
+  int nResult;                   /* Number of terms in the result set */
+
+  if( pOrderBy==0 ) return 0;
+  nResult = pSelect->pEList->nExpr;
+  pParse = pNC->pParse;
+  for(i=0, pItem=pOrderBy->a; i<pOrderBy->nExpr; i++, pItem++){
+    Expr *pE = pItem->pExpr;
+    iCol = resolveAsName(pParse, pSelect->pEList, pE);
+    if( iCol>0 ){
+      /* If an AS-name match is found, mark this ORDER BY column as being
+      ** a copy of the iCol-th result-set column.  The subsequent call to
+      ** sqlite3ResolveOrderGroupBy() will convert the expression to a
+      ** copy of the iCol-th result-set expression. */
+      pItem->iCol = (u16)iCol;
+      continue;
+    }
+    if( sqlite3ExprIsInteger(pE, &iCol) ){
+      /* The ORDER BY term is an integer constant.  Again, set the column
+      ** number so that sqlite3ResolveOrderGroupBy() will convert the
+      ** order-by term to a copy of the result-set expression */
+      if( iCol<1 ){
+        resolveOutOfRangeError(pParse, zType, i+1, nResult);
+        return 1;
+      }
+      pItem->iCol = (u16)iCol;
+      continue;
+    }
+
+    /* Otherwise, treat the ORDER BY term as an ordinary expression */
+    pItem->iCol = 0;
+    if( sqlite3ResolveExprNames(pNC, pE) ){
+      return 1;
+    }
+  }
+  return sqlite3ResolveOrderGroupBy(pParse, pSelect, pOrderBy, zType);
+}
+
+/*
+** Resolve names in the SELECT statement p and all of its descendents.
+*/
+static int resolveSelectStep(Walker *pWalker, Select *p){
+  NameContext *pOuterNC;  /* Context that contains this SELECT */
+  NameContext sNC;        /* Name context of this SELECT */
+  int isCompound;         /* True if p is a compound select */
+  int nCompound;          /* Number of compound terms processed so far */
+  Parse *pParse;          /* Parsing context */
+  ExprList *pEList;       /* Result set expression list */
+  int i;                  /* Loop counter */
+  ExprList *pGroupBy;     /* The GROUP BY clause */
+  Select *pLeftmost;      /* Left-most of SELECT of a compound */
+  sqlite3 *db;            /* Database connection */
+  
+
+  assert( p!=0 );
+  if( p->selFlags & SF_Resolved ){
+    return WRC_Prune;
+  }
+  pOuterNC = pWalker->u.pNC;
+  pParse = pWalker->pParse;
+  db = pParse->db;
+
+  /* Normally sqlite3SelectExpand() will be called first and will have
+  ** already expanded this SELECT.  However, if this is a subquery within
+  ** an expression, sqlite3ResolveExprNames() will be called without a
+  ** prior call to sqlite3SelectExpand().  When that happens, let
+  ** sqlite3SelectPrep() do all of the processing for this SELECT.
+  ** sqlite3SelectPrep() will invoke both sqlite3SelectExpand() and
+  ** this routine in the correct order.
+  */
+  if( (p->selFlags & SF_Expanded)==0 ){
+    sqlite3SelectPrep(pParse, p, pOuterNC);
+    return (pParse->nErr || db->mallocFailed) ? WRC_Abort : WRC_Prune;
+  }
+
+  isCompound = p->pPrior!=0;
+  nCompound = 0;
+  pLeftmost = p;
+  while( p ){
+    assert( (p->selFlags & SF_Expanded)!=0 );
+    assert( (p->selFlags & SF_Resolved)==0 );
+    p->selFlags |= SF_Resolved;
+
+    /* Resolve the expressions in the LIMIT and OFFSET clauses. These
+    ** are not allowed to refer to any names, so pass an empty NameContext.
+    */
+    memset(&sNC, 0, sizeof(sNC));
+    sNC.pParse = pParse;
+    if( sqlite3ResolveExprNames(&sNC, p->pLimit) ||
+        sqlite3ResolveExprNames(&sNC, p->pOffset) ){
+      return WRC_Abort;
+    }
+  
+    /* Set up the local name-context to pass to sqlite3ResolveExprNames() to
+    ** resolve the result-set expression list.
+    */
+    sNC.allowAgg = 1;
+    sNC.pSrcList = p->pSrc;
+    sNC.pNext = pOuterNC;
+  
+    /* Resolve names in the result set. */
+    pEList = p->pEList;
+    assert( pEList!=0 );
+    for(i=0; i<pEList->nExpr; i++){
+      Expr *pX = pEList->a[i].pExpr;
+      if( sqlite3ResolveExprNames(&sNC, pX) ){
+        return WRC_Abort;
+      }
+    }
+  
+    /* Recursively resolve names in all subqueries
+    */
+    for(i=0; i<p->pSrc->nSrc; i++){
+      struct SrcList_item *pItem = &p->pSrc->a[i];
+      if( pItem->pSelect ){
+        const char *zSavedContext = pParse->zAuthContext;
+        if( pItem->zName ) pParse->zAuthContext = pItem->zName;
+        sqlite3ResolveSelectNames(pParse, pItem->pSelect, pOuterNC);
+        pParse->zAuthContext = zSavedContext;
+        if( pParse->nErr || db->mallocFailed ) return WRC_Abort;
+      }
+    }
+  
+    /* If there are no aggregate functions in the result-set, and no GROUP BY 
+    ** expression, do not allow aggregates in any of the other expressions.
+    */
+    assert( (p->selFlags & SF_Aggregate)==0 );
+    pGroupBy = p->pGroupBy;
+    if( pGroupBy || sNC.hasAgg ){
+      p->selFlags |= SF_Aggregate;
+    }else{
+      sNC.allowAgg = 0;
+    }
+  
+    /* If a HAVING clause is present, then there must be a GROUP BY clause.
+    */
+    if( p->pHaving && !pGroupBy ){
+      sqlite3ErrorMsg(pParse, "a GROUP BY clause is required before HAVING");
+      return WRC_Abort;
+    }
+  
+    /* Add the expression list to the name-context before parsing the
+    ** other expressions in the SELECT statement. This is so that
+    ** expressions in the WHERE clause (etc.) can refer to expressions by
+    ** aliases in the result set.
+    **
+    ** Minor point: If this is the case, then the expression will be
+    ** re-evaluated for each reference to it.
+    */
+    sNC.pEList = p->pEList;
+    if( sqlite3ResolveExprNames(&sNC, p->pWhere) ||
+       sqlite3ResolveExprNames(&sNC, p->pHaving)
+    ){
+      return WRC_Abort;
+    }
+
+    /* The ORDER BY and GROUP BY clauses may not refer to terms in
+    ** outer queries 
+    */
+    sNC.pNext = 0;
+    sNC.allowAgg = 1;
+
+    /* Process the ORDER BY clause for singleton SELECT statements.
+    ** The ORDER BY clause for compounds SELECT statements is handled
+    ** below, after all of the result-sets for all of the elements of
+    ** the compound have been resolved.
+    */
+    if( !isCompound && resolveOrderGroupBy(&sNC, p, p->pOrderBy, "ORDER") ){
+      return WRC_Abort;
+    }
+    if( db->mallocFailed ){
+      return WRC_Abort;
+    }
+  
+    /* Resolve the GROUP BY clause.  At the same time, make sure 
+    ** the GROUP BY clause does not contain aggregate functions.
+    */
+    if( pGroupBy ){
+      struct ExprList_item *pItem;
+    
+      if( resolveOrderGroupBy(&sNC, p, pGroupBy, "GROUP") || db->mallocFailed ){
+        return WRC_Abort;
+      }
+      for(i=0, pItem=pGroupBy->a; i<pGroupBy->nExpr; i++, pItem++){
+        if( ExprHasProperty(pItem->pExpr, EP_Agg) ){
+          sqlite3ErrorMsg(pParse, "aggregate functions are not allowed in "
+              "the GROUP BY clause");
+          return WRC_Abort;
+        }
+      }
+    }
+
+    /* Advance to the next term of the compound
+    */
+    p = p->pPrior;
+    nCompound++;
+  }
+
+  /* Resolve the ORDER BY on a compound SELECT after all terms of
+  ** the compound have been resolved.
+  */
+  if( isCompound && resolveCompoundOrderBy(pParse, pLeftmost) ){
+    return WRC_Abort;
+  }
+
+  return WRC_Prune;
+}
+
+/*
+** This routine walks an expression tree and resolves references to
+** table columns and result-set columns.  At the same time, do error
+** checking on function usage and set a flag if any aggregate functions
+** are seen.
+**
+** To resolve table columns references we look for nodes (or subtrees) of the 
+** form X.Y.Z or Y.Z or just Z where
+**
+**      X:   The name of a database.  Ex:  "main" or "temp" or
+**           the symbolic name assigned to an ATTACH-ed database.
+**
+**      Y:   The name of a table in a FROM clause.  Or in a trigger
+**           one of the special names "old" or "new".
+**
+**      Z:   The name of a column in table Y.
+**
+** The node at the root of the subtree is modified as follows:
+**
+**    Expr.op        Changed to TK_COLUMN
+**    Expr.pTab      Points to the Table object for X.Y
+**    Expr.iColumn   The column index in X.Y.  -1 for the rowid.
+**    Expr.iTable    The VDBE cursor number for X.Y
+**
+**
+** To resolve result-set references, look for expression nodes of the
+** form Z (with no X and Y prefix) where the Z matches the right-hand
+** size of an AS clause in the result-set of a SELECT.  The Z expression
+** is replaced by a copy of the left-hand side of the result-set expression.
+** Table-name and function resolution occurs on the substituted expression
+** tree.  For example, in:
+**
+**      SELECT a+b AS x, c+d AS y FROM t1 ORDER BY x;
+**
+** The "x" term of the order by is replaced by "a+b" to render:
+**
+**      SELECT a+b AS x, c+d AS y FROM t1 ORDER BY a+b;
+**
+** Function calls are checked to make sure that the function is 
+** defined and that the correct number of arguments are specified.
+** If the function is an aggregate function, then the pNC->hasAgg is
+** set and the opcode is changed from TK_FUNCTION to TK_AGG_FUNCTION.
+** If an expression contains aggregate functions then the EP_Agg
+** property on the expression is set.
+**
+** An error message is left in pParse if anything is amiss.  The number
+** if errors is returned.
+*/
+SQLITE_PRIVATE int sqlite3ResolveExprNames( 
+  NameContext *pNC,       /* Namespace to resolve expressions in. */
+  Expr *pExpr             /* The expression to be analyzed. */
+){
+  int savedHasAgg;
+  Walker w;
+
+  if( pExpr==0 ) return 0;
+#if SQLITE_MAX_EXPR_DEPTH>0
+  {
+    Parse *pParse = pNC->pParse;
+    if( sqlite3ExprCheckHeight(pParse, pExpr->nHeight+pNC->pParse->nHeight) ){
+      return 1;
+    }
+    pParse->nHeight += pExpr->nHeight;
+  }
+#endif
+  savedHasAgg = pNC->hasAgg;
+  pNC->hasAgg = 0;
+  w.xExprCallback = resolveExprStep;
+  w.xSelectCallback = resolveSelectStep;
+  w.pParse = pNC->pParse;
+  w.u.pNC = pNC;
+  sqlite3WalkExpr(&w, pExpr);
+#if SQLITE_MAX_EXPR_DEPTH>0
+  pNC->pParse->nHeight -= pExpr->nHeight;
+#endif
+  if( pNC->nErr>0 || w.pParse->nErr>0 ){
+    ExprSetProperty(pExpr, EP_Error);
+  }
+  if( pNC->hasAgg ){
+    ExprSetProperty(pExpr, EP_Agg);
+  }else if( savedHasAgg ){
+    pNC->hasAgg = 1;
+  }
+  return ExprHasProperty(pExpr, EP_Error);
+}
+
+
+/*
+** Resolve all names in all expressions of a SELECT and in all
+** decendents of the SELECT, including compounds off of p->pPrior,
+** subqueries in expressions, and subqueries used as FROM clause
+** terms.
+**
+** See sqlite3ResolveExprNames() for a description of the kinds of
+** transformations that occur.
+**
+** All SELECT statements should have been expanded using
+** sqlite3SelectExpand() prior to invoking this routine.
+*/
+SQLITE_PRIVATE void sqlite3ResolveSelectNames(
+  Parse *pParse,         /* The parser context */
+  Select *p,             /* The SELECT statement being coded. */
+  NameContext *pOuterNC  /* Name context for parent SELECT statement */
+){
+  Walker w;
+
+  assert( p!=0 );
+  w.xExprCallback = resolveExprStep;
+  w.xSelectCallback = resolveSelectStep;
+  w.pParse = pParse;
+  w.u.pNC = pOuterNC;
+  sqlite3WalkSelect(&w, p);
+}
+
+/************** End of resolve.c *********************************************/
+/************** Begin file expr.c ********************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains routines used for analyzing expressions and
+** for generating VDBE code that evaluates expressions in SQLite.
+*/
+
+/*
+** Return the 'affinity' of the expression pExpr if any.
+**
+** If pExpr is a column, a reference to a column via an 'AS' alias,
+** or a sub-select with a column as the return value, then the 
+** affinity of that column is returned. Otherwise, 0x00 is returned,
+** indicating no affinity for the expression.
+**
+** i.e. the WHERE clause expresssions in the following statements all
+** have an affinity:
+**
+** CREATE TABLE t1(a);
+** SELECT * FROM t1 WHERE a;
+** SELECT a AS b FROM t1 WHERE b;
+** SELECT * FROM t1 WHERE (select a from t1);
+*/
+SQLITE_PRIVATE char sqlite3ExprAffinity(Expr *pExpr){
+  int op = pExpr->op;
+  if( op==TK_SELECT ){
+    assert( pExpr->flags&EP_xIsSelect );
+    return sqlite3ExprAffinity(pExpr->x.pSelect->pEList->a[0].pExpr);
+  }
+#ifndef SQLITE_OMIT_CAST
+  if( op==TK_CAST ){
+    assert( !ExprHasProperty(pExpr, EP_IntValue) );
+    return sqlite3AffinityType(pExpr->u.zToken);
+  }
+#endif
+  if( (op==TK_AGG_COLUMN || op==TK_COLUMN || op==TK_REGISTER) 
+   && pExpr->pTab!=0
+  ){
+    /* op==TK_REGISTER && pExpr->pTab!=0 happens when pExpr was originally
+    ** a TK_COLUMN but was previously evaluated and cached in a register */
+    int j = pExpr->iColumn;
+    if( j<0 ) return SQLITE_AFF_INTEGER;
+    assert( pExpr->pTab && j<pExpr->pTab->nCol );
+    return pExpr->pTab->aCol[j].affinity;
+  }
+  return pExpr->affinity;
+}
+
+/*
+** Set the explicit collating sequence for an expression to the
+** collating sequence supplied in the second argument.
+*/
+SQLITE_PRIVATE Expr *sqlite3ExprSetColl(Expr *pExpr, CollSeq *pColl){
+  if( pExpr && pColl ){
+    pExpr->pColl = pColl;
+    pExpr->flags |= EP_ExpCollate;
+  }
+  return pExpr;
+}
+
+/*
+** Set the collating sequence for expression pExpr to be the collating
+** sequence named by pToken.   Return a pointer to the revised expression.
+** The collating sequence is marked as "explicit" using the EP_ExpCollate
+** flag.  An explicit collating sequence will override implicit
+** collating sequences.
+*/
+SQLITE_PRIVATE Expr *sqlite3ExprSetCollByToken(Parse *pParse, Expr *pExpr, Token *pCollName){
+  char *zColl = 0;            /* Dequoted name of collation sequence */
+  CollSeq *pColl;
+  sqlite3 *db = pParse->db;
+  zColl = sqlite3NameFromToken(db, pCollName);
+  pColl = sqlite3LocateCollSeq(pParse, zColl);
+  sqlite3ExprSetColl(pExpr, pColl);
+  sqlite3DbFree(db, zColl);
+  return pExpr;
+}
+
+/*
+** Return the default collation sequence for the expression pExpr. If
+** there is no default collation type, return 0.
+*/
+SQLITE_PRIVATE CollSeq *sqlite3ExprCollSeq(Parse *pParse, Expr *pExpr){
+  CollSeq *pColl = 0;
+  Expr *p = pExpr;
+  while( p ){
+    int op;
+    pColl = p->pColl;
+    if( pColl ) break;
+    op = p->op;
+    if( p->pTab!=0 && (
+        op==TK_AGG_COLUMN || op==TK_COLUMN || op==TK_REGISTER || op==TK_TRIGGER
+    )){
+      /* op==TK_REGISTER && p->pTab!=0 happens when pExpr was originally
+      ** a TK_COLUMN but was previously evaluated and cached in a register */
+      const char *zColl;
+      int j = p->iColumn;
+      if( j>=0 ){
+        sqlite3 *db = pParse->db;
+        zColl = p->pTab->aCol[j].zColl;
+        pColl = sqlite3FindCollSeq(db, ENC(db), zColl, 0);
+        pExpr->pColl = pColl;
+      }
+      break;
+    }
+    if( op!=TK_CAST && op!=TK_UPLUS ){
+      break;
+    }
+    p = p->pLeft;
+  }
+  if( sqlite3CheckCollSeq(pParse, pColl) ){ 
+    pColl = 0;
+  }
+  return pColl;
+}
+
+/*
+** pExpr is an operand of a comparison operator.  aff2 is the
+** type affinity of the other operand.  This routine returns the
+** type affinity that should be used for the comparison operator.
+*/
+SQLITE_PRIVATE char sqlite3CompareAffinity(Expr *pExpr, char aff2){
+  char aff1 = sqlite3ExprAffinity(pExpr);
+  if( aff1 && aff2 ){
+    /* Both sides of the comparison are columns. If one has numeric
+    ** affinity, use that. Otherwise use no affinity.
+    */
+    if( sqlite3IsNumericAffinity(aff1) || sqlite3IsNumericAffinity(aff2) ){
+      return SQLITE_AFF_NUMERIC;
+    }else{
+      return SQLITE_AFF_NONE;
+    }
+  }else if( !aff1 && !aff2 ){
+    /* Neither side of the comparison is a column.  Compare the
+    ** results directly.
+    */
+    return SQLITE_AFF_NONE;
+  }else{
+    /* One side is a column, the other is not. Use the columns affinity. */
+    assert( aff1==0 || aff2==0 );
+    return (aff1 + aff2);
+  }
+}
+
+/*
+** pExpr is a comparison operator.  Return the type affinity that should
+** be applied to both operands prior to doing the comparison.
+*/
+static char comparisonAffinity(Expr *pExpr){
+  char aff;
+  assert( pExpr->op==TK_EQ || pExpr->op==TK_IN || pExpr->op==TK_LT ||
+          pExpr->op==TK_GT || pExpr->op==TK_GE || pExpr->op==TK_LE ||
+          pExpr->op==TK_NE || pExpr->op==TK_IS || pExpr->op==TK_ISNOT );
+  assert( pExpr->pLeft );
+  aff = sqlite3ExprAffinity(pExpr->pLeft);
+  if( pExpr->pRight ){
+    aff = sqlite3CompareAffinity(pExpr->pRight, aff);
+  }else if( ExprHasProperty(pExpr, EP_xIsSelect) ){
+    aff = sqlite3CompareAffinity(pExpr->x.pSelect->pEList->a[0].pExpr, aff);
+  }else if( !aff ){
+    aff = SQLITE_AFF_NONE;
+  }
+  return aff;
+}
+
+/*
+** pExpr is a comparison expression, eg. '=', '<', IN(...) etc.
+** idx_affinity is the affinity of an indexed column. Return true
+** if the index with affinity idx_affinity may be used to implement
+** the comparison in pExpr.
+*/
+SQLITE_PRIVATE int sqlite3IndexAffinityOk(Expr *pExpr, char idx_affinity){
+  char aff = comparisonAffinity(pExpr);
+  switch( aff ){
+    case SQLITE_AFF_NONE:
+      return 1;
+    case SQLITE_AFF_TEXT:
+      return idx_affinity==SQLITE_AFF_TEXT;
+    default:
+      return sqlite3IsNumericAffinity(idx_affinity);
+  }
+}
+
+/*
+** Return the P5 value that should be used for a binary comparison
+** opcode (OP_Eq, OP_Ge etc.) used to compare pExpr1 and pExpr2.
+*/
+static u8 binaryCompareP5(Expr *pExpr1, Expr *pExpr2, int jumpIfNull){
+  u8 aff = (char)sqlite3ExprAffinity(pExpr2);
+  aff = (u8)sqlite3CompareAffinity(pExpr1, aff) | (u8)jumpIfNull;
+  return aff;
+}
+
+/*
+** Return a pointer to the collation sequence that should be used by
+** a binary comparison operator comparing pLeft and pRight.
+**
+** If the left hand expression has a collating sequence type, then it is
+** used. Otherwise the collation sequence for the right hand expression
+** is used, or the default (BINARY) if neither expression has a collating
+** type.
+**
+** Argument pRight (but not pLeft) may be a null pointer. In this case,
+** it is not considered.
+*/
+SQLITE_PRIVATE CollSeq *sqlite3BinaryCompareCollSeq(
+  Parse *pParse, 
+  Expr *pLeft, 
+  Expr *pRight
+){
+  CollSeq *pColl;
+  assert( pLeft );
+  if( pLeft->flags & EP_ExpCollate ){
+    assert( pLeft->pColl );
+    pColl = pLeft->pColl;
+  }else if( pRight && pRight->flags & EP_ExpCollate ){
+    assert( pRight->pColl );
+    pColl = pRight->pColl;
+  }else{
+    pColl = sqlite3ExprCollSeq(pParse, pLeft);
+    if( !pColl ){
+      pColl = sqlite3ExprCollSeq(pParse, pRight);
+    }
+  }
+  return pColl;
+}
+
+/*
+** Generate code for a comparison operator.
+*/
+static int codeCompare(
+  Parse *pParse,    /* The parsing (and code generating) context */
+  Expr *pLeft,      /* The left operand */
+  Expr *pRight,     /* The right operand */
+  int opcode,       /* The comparison opcode */
+  int in1, int in2, /* Register holding operands */
+  int dest,         /* Jump here if true.  */
+  int jumpIfNull    /* If true, jump if either operand is NULL */
+){
+  int p5;
+  int addr;
+  CollSeq *p4;
+
+  p4 = sqlite3BinaryCompareCollSeq(pParse, pLeft, pRight);
+  p5 = binaryCompareP5(pLeft, pRight, jumpIfNull);
+  addr = sqlite3VdbeAddOp4(pParse->pVdbe, opcode, in2, dest, in1,
+                           (void*)p4, P4_COLLSEQ);
+  sqlite3VdbeChangeP5(pParse->pVdbe, (u8)p5);
+  return addr;
+}
+
+#if SQLITE_MAX_EXPR_DEPTH>0
+/*
+** Check that argument nHeight is less than or equal to the maximum
+** expression depth allowed. If it is not, leave an error message in
+** pParse.
+*/
+SQLITE_PRIVATE int sqlite3ExprCheckHeight(Parse *pParse, int nHeight){
+  int rc = SQLITE_OK;
+  int mxHeight = pParse->db->aLimit[SQLITE_LIMIT_EXPR_DEPTH];
+  if( nHeight>mxHeight ){
+    sqlite3ErrorMsg(pParse, 
+       "Expression tree is too large (maximum depth %d)", mxHeight
+    );
+    rc = SQLITE_ERROR;
+  }
+  return rc;
+}
+
+/* The following three functions, heightOfExpr(), heightOfExprList()
+** and heightOfSelect(), are used to determine the maximum height
+** of any expression tree referenced by the structure passed as the
+** first argument.
+**
+** If this maximum height is greater than the current value pointed
+** to by pnHeight, the second parameter, then set *pnHeight to that
+** value.
+*/
+static void heightOfExpr(Expr *p, int *pnHeight){
+  if( p ){
+    if( p->nHeight>*pnHeight ){
+      *pnHeight = p->nHeight;
+    }
+  }
+}
+static void heightOfExprList(ExprList *p, int *pnHeight){
+  if( p ){
+    int i;
+    for(i=0; i<p->nExpr; i++){
+      heightOfExpr(p->a[i].pExpr, pnHeight);
+    }
+  }
+}
+static void heightOfSelect(Select *p, int *pnHeight){
+  if( p ){
+    heightOfExpr(p->pWhere, pnHeight);
+    heightOfExpr(p->pHaving, pnHeight);
+    heightOfExpr(p->pLimit, pnHeight);
+    heightOfExpr(p->pOffset, pnHeight);
+    heightOfExprList(p->pEList, pnHeight);
+    heightOfExprList(p->pGroupBy, pnHeight);
+    heightOfExprList(p->pOrderBy, pnHeight);
+    heightOfSelect(p->pPrior, pnHeight);
+  }
+}
+
+/*
+** Set the Expr.nHeight variable in the structure passed as an 
+** argument. An expression with no children, Expr.pList or 
+** Expr.pSelect member has a height of 1. Any other expression
+** has a height equal to the maximum height of any other 
+** referenced Expr plus one.
+*/
+static void exprSetHeight(Expr *p){
+  int nHeight = 0;
+  heightOfExpr(p->pLeft, &nHeight);
+  heightOfExpr(p->pRight, &nHeight);
+  if( ExprHasProperty(p, EP_xIsSelect) ){
+    heightOfSelect(p->x.pSelect, &nHeight);
+  }else{
+    heightOfExprList(p->x.pList, &nHeight);
+  }
+  p->nHeight = nHeight + 1;
+}
+
+/*
+** Set the Expr.nHeight variable using the exprSetHeight() function. If
+** the height is greater than the maximum allowed expression depth,
+** leave an error in pParse.
+*/
+SQLITE_PRIVATE void sqlite3ExprSetHeight(Parse *pParse, Expr *p){
+  exprSetHeight(p);
+  sqlite3ExprCheckHeight(pParse, p->nHeight);
+}
+
+/*
+** Return the maximum height of any expression tree referenced
+** by the select statement passed as an argument.
+*/
+SQLITE_PRIVATE int sqlite3SelectExprHeight(Select *p){
+  int nHeight = 0;
+  heightOfSelect(p, &nHeight);
+  return nHeight;
+}
+#else
+  #define exprSetHeight(y)
+#endif /* SQLITE_MAX_EXPR_DEPTH>0 */
+
+/*
+** This routine is the core allocator for Expr nodes.
+**
+** Construct a new expression node and return a pointer to it.  Memory
+** for this node and for the pToken argument is a single allocation
+** obtained from sqlite3DbMalloc().  The calling function
+** is responsible for making sure the node eventually gets freed.
+**
+** If dequote is true, then the token (if it exists) is dequoted.
+** If dequote is false, no dequoting is performance.  The deQuote
+** parameter is ignored if pToken is NULL or if the token does not
+** appear to be quoted.  If the quotes were of the form "..." (double-quotes)
+** then the EP_DblQuoted flag is set on the expression node.
+**
+** Special case:  If op==TK_INTEGER and pToken points to a string that
+** can be translated into a 32-bit integer, then the token is not
+** stored in u.zToken.  Instead, the integer values is written
+** into u.iValue and the EP_IntValue flag is set.  No extra storage
+** is allocated to hold the integer text and the dequote flag is ignored.
+*/
+SQLITE_PRIVATE Expr *sqlite3ExprAlloc(
+  sqlite3 *db,            /* Handle for sqlite3DbMallocZero() (may be null) */
+  int op,                 /* Expression opcode */
+  const Token *pToken,    /* Token argument.  Might be NULL */
+  int dequote             /* True to dequote */
+){
+  Expr *pNew;
+  int nExtra = 0;
+  int iValue = 0;
+
+  if( pToken ){
+    if( op!=TK_INTEGER || pToken->z==0
+          || sqlite3GetInt32(pToken->z, &iValue)==0 ){
+      nExtra = pToken->n+1;
+      assert( iValue>=0 );
+    }
+  }
+  pNew = sqlite3DbMallocZero(db, sizeof(Expr)+nExtra);
+  if( pNew ){
+    pNew->op = (u8)op;
+    pNew->iAgg = -1;
+    if( pToken ){
+      if( nExtra==0 ){
+        pNew->flags |= EP_IntValue;
+        pNew->u.iValue = iValue;
+      }else{
+        int c;
+        pNew->u.zToken = (char*)&pNew[1];
+        memcpy(pNew->u.zToken, pToken->z, pToken->n);
+        pNew->u.zToken[pToken->n] = 0;
+        if( dequote && nExtra>=3 
+             && ((c = pToken->z[0])=='\'' || c=='"' || c=='[' || c=='`') ){
+          sqlite3Dequote(pNew->u.zToken);
+          if( c=='"' ) pNew->flags |= EP_DblQuoted;
+        }
+      }
+    }
+#if SQLITE_MAX_EXPR_DEPTH>0
+    pNew->nHeight = 1;
+#endif  
+  }
+  return pNew;
+}
+
+/*
+** Allocate a new expression node from a zero-terminated token that has
+** already been dequoted.
+*/
+SQLITE_PRIVATE Expr *sqlite3Expr(
+  sqlite3 *db,            /* Handle for sqlite3DbMallocZero() (may be null) */
+  int op,                 /* Expression opcode */
+  const char *zToken      /* Token argument.  Might be NULL */
+){
+  Token x;
+  x.z = zToken;
+  x.n = zToken ? sqlite3Strlen30(zToken) : 0;
+  return sqlite3ExprAlloc(db, op, &x, 0);
+}
+
+/*
+** Attach subtrees pLeft and pRight to the Expr node pRoot.
+**
+** If pRoot==NULL that means that a memory allocation error has occurred.
+** In that case, delete the subtrees pLeft and pRight.
+*/
+SQLITE_PRIVATE void sqlite3ExprAttachSubtrees(
+  sqlite3 *db,
+  Expr *pRoot,
+  Expr *pLeft,
+  Expr *pRight
+){
+  if( pRoot==0 ){
+    assert( db->mallocFailed );
+    sqlite3ExprDelete(db, pLeft);
+    sqlite3ExprDelete(db, pRight);
+  }else{
+    if( pRight ){
+      pRoot->pRight = pRight;
+      if( pRight->flags & EP_ExpCollate ){
+        pRoot->flags |= EP_ExpCollate;
+        pRoot->pColl = pRight->pColl;
+      }
+    }
+    if( pLeft ){
+      pRoot->pLeft = pLeft;
+      if( pLeft->flags & EP_ExpCollate ){
+        pRoot->flags |= EP_ExpCollate;
+        pRoot->pColl = pLeft->pColl;
+      }
+    }
+    exprSetHeight(pRoot);
+  }
+}
+
+/*
+** Allocate a Expr node which joins as many as two subtrees.
+**
+** One or both of the subtrees can be NULL.  Return a pointer to the new
+** Expr node.  Or, if an OOM error occurs, set pParse->db->mallocFailed,
+** free the subtrees and return NULL.
+*/
+SQLITE_PRIVATE Expr *sqlite3PExpr(
+  Parse *pParse,          /* Parsing context */
+  int op,                 /* Expression opcode */
+  Expr *pLeft,            /* Left operand */
+  Expr *pRight,           /* Right operand */
+  const Token *pToken     /* Argument token */
+){
+  Expr *p = sqlite3ExprAlloc(pParse->db, op, pToken, 1);
+  sqlite3ExprAttachSubtrees(pParse->db, p, pLeft, pRight);
+  if( p ) {
+    sqlite3ExprCheckHeight(pParse, p->nHeight);
+  }
+  return p;
+}
+
+/*
+** Join two expressions using an AND operator.  If either expression is
+** NULL, then just return the other expression.
+*/
+SQLITE_PRIVATE Expr *sqlite3ExprAnd(sqlite3 *db, Expr *pLeft, Expr *pRight){
+  if( pLeft==0 ){
+    return pRight;
+  }else if( pRight==0 ){
+    return pLeft;
+  }else{
+    Expr *pNew = sqlite3ExprAlloc(db, TK_AND, 0, 0);
+    sqlite3ExprAttachSubtrees(db, pNew, pLeft, pRight);
+    return pNew;
+  }
+}
+
+/*
+** Construct a new expression node for a function with multiple
+** arguments.
+*/
+SQLITE_PRIVATE Expr *sqlite3ExprFunction(Parse *pParse, ExprList *pList, Token *pToken){
+  Expr *pNew;
+  sqlite3 *db = pParse->db;
+  assert( pToken );
+  pNew = sqlite3ExprAlloc(db, TK_FUNCTION, pToken, 1);
+  if( pNew==0 ){
+    sqlite3ExprListDelete(db, pList); /* Avoid memory leak when malloc fails */
+    return 0;
+  }
+  pNew->x.pList = pList;
+  assert( !ExprHasProperty(pNew, EP_xIsSelect) );
+  sqlite3ExprSetHeight(pParse, pNew);
+  return pNew;
+}
+
+/*
+** Assign a variable number to an expression that encodes a wildcard
+** in the original SQL statement.  
+**
+** Wildcards consisting of a single "?" are assigned the next sequential
+** variable number.
+**
+** Wildcards of the form "?nnn" are assigned the number "nnn".  We make
+** sure "nnn" is not too be to avoid a denial of service attack when
+** the SQL statement comes from an external source.
+**
+** Wildcards of the form ":aaa", "@aaa", or "$aaa" are assigned the same number
+** as the previous instance of the same wildcard.  Or if this is the first
+** instance of the wildcard, the next sequenial variable number is
+** assigned.
+*/
+SQLITE_PRIVATE void sqlite3ExprAssignVarNumber(Parse *pParse, Expr *pExpr){
+  sqlite3 *db = pParse->db;
+  const char *z;
+
+  if( pExpr==0 ) return;
+  assert( !ExprHasAnyProperty(pExpr, EP_IntValue|EP_Reduced|EP_TokenOnly) );
+  z = pExpr->u.zToken;
+  assert( z!=0 );
+  assert( z[0]!=0 );
+  if( z[1]==0 ){
+    /* Wildcard of the form "?".  Assign the next variable number */
+    assert( z[0]=='?' );
+    pExpr->iColumn = (ynVar)(++pParse->nVar);
+  }else if( z[0]=='?' ){
+    /* Wildcard of the form "?nnn".  Convert "nnn" to an integer and
+    ** use it as the variable number */
+    i64 i;
+    int bOk = 0==sqlite3Atoi64(&z[1], &i, sqlite3Strlen30(&z[1]), SQLITE_UTF8);
+    pExpr->iColumn = (ynVar)i;
+    testcase( i==0 );
+    testcase( i==1 );
+    testcase( i==db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER]-1 );
+    testcase( i==db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] );
+    if( bOk==0 || i<1 || i>db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] ){
+      sqlite3ErrorMsg(pParse, "variable number must be between ?1 and ?%d",
+          db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER]);
+    }
+    if( i>pParse->nVar ){
+      pParse->nVar = (int)i;
+    }
+  }else{
+    /* Wildcards like ":aaa", "$aaa" or "@aaa".  Reuse the same variable
+    ** number as the prior appearance of the same name, or if the name
+    ** has never appeared before, reuse the same variable number
+    */
+    int i;
+    u32 n;
+    n = sqlite3Strlen30(z);
+    for(i=0; i<pParse->nVarExpr; i++){
+      Expr *pE = pParse->apVarExpr[i];
+      assert( pE!=0 );
+      if( memcmp(pE->u.zToken, z, n)==0 && pE->u.zToken[n]==0 ){
+        pExpr->iColumn = pE->iColumn;
+        break;
+      }
+    }
+    if( i>=pParse->nVarExpr ){
+      pExpr->iColumn = (ynVar)(++pParse->nVar);
+      if( pParse->nVarExpr>=pParse->nVarExprAlloc-1 ){
+        pParse->nVarExprAlloc += pParse->nVarExprAlloc + 10;
+        pParse->apVarExpr =
+            sqlite3DbReallocOrFree(
+              db,
+              pParse->apVarExpr,
+              pParse->nVarExprAlloc*sizeof(pParse->apVarExpr[0])
+            );
+      }
+      if( !db->mallocFailed ){
+        assert( pParse->apVarExpr!=0 );
+        pParse->apVarExpr[pParse->nVarExpr++] = pExpr;
+      }
+    }
+  } 
+  if( !pParse->nErr && pParse->nVar>db->aLimit[SQLITE_LIMIT_VARIABLE_NUMBER] ){
+    sqlite3ErrorMsg(pParse, "too many SQL variables");
+  }
+}
+
+/*
+** Recursively delete an expression tree.
+*/
+SQLITE_PRIVATE void sqlite3ExprDelete(sqlite3 *db, Expr *p){
+  if( p==0 ) return;
+  /* Sanity check: Assert that the IntValue is non-negative if it exists */
+  assert( !ExprHasProperty(p, EP_IntValue) || p->u.iValue>=0 );
+  if( !ExprHasAnyProperty(p, EP_TokenOnly) ){
+    sqlite3ExprDelete(db, p->pLeft);
+    sqlite3ExprDelete(db, p->pRight);
+    if( !ExprHasProperty(p, EP_Reduced) && (p->flags2 & EP2_MallocedToken)!=0 ){
+      sqlite3DbFree(db, p->u.zToken);
+    }
+    if( ExprHasProperty(p, EP_xIsSelect) ){
+      sqlite3SelectDelete(db, p->x.pSelect);
+    }else{
+      sqlite3ExprListDelete(db, p->x.pList);
+    }
+  }
+  if( !ExprHasProperty(p, EP_Static) ){
+    sqlite3DbFree(db, p);
+  }
+}
+
+/*
+** Return the number of bytes allocated for the expression structure 
+** passed as the first argument. This is always one of EXPR_FULLSIZE,
+** EXPR_REDUCEDSIZE or EXPR_TOKENONLYSIZE.
+*/
+static int exprStructSize(Expr *p){
+  if( ExprHasProperty(p, EP_TokenOnly) ) return EXPR_TOKENONLYSIZE;
+  if( ExprHasProperty(p, EP_Reduced) ) return EXPR_REDUCEDSIZE;
+  return EXPR_FULLSIZE;
+}
+
+/*
+** The dupedExpr*Size() routines each return the number of bytes required
+** to store a copy of an expression or expression tree.  They differ in
+** how much of the tree is measured.
+**
+**     dupedExprStructSize()     Size of only the Expr structure 
+**     dupedExprNodeSize()       Size of Expr + space for token
+**     dupedExprSize()           Expr + token + subtree components
+**
+***************************************************************************
+**
+** The dupedExprStructSize() function returns two values OR-ed together:  
+** (1) the space required for a copy of the Expr structure only and 
+** (2) the EP_xxx flags that indicate what the structure size should be.
+** The return values is always one of:
+**
+**      EXPR_FULLSIZE
+**      EXPR_REDUCEDSIZE   | EP_Reduced
+**      EXPR_TOKENONLYSIZE | EP_TokenOnly
+**
+** The size of the structure can be found by masking the return value
+** of this routine with 0xfff.  The flags can be found by masking the
+** return value with EP_Reduced|EP_TokenOnly.
+**
+** Note that with flags==EXPRDUP_REDUCE, this routines works on full-size
+** (unreduced) Expr objects as they or originally constructed by the parser.
+** During expression analysis, extra information is computed and moved into
+** later parts of teh Expr object and that extra information might get chopped
+** off if the expression is reduced.  Note also that it does not work to
+** make a EXPRDUP_REDUCE copy of a reduced expression.  It is only legal
+** to reduce a pristine expression tree from the parser.  The implementation
+** of dupedExprStructSize() contain multiple assert() statements that attempt
+** to enforce this constraint.
+*/
+static int dupedExprStructSize(Expr *p, int flags){
+  int nSize;
+  assert( flags==EXPRDUP_REDUCE || flags==0 ); /* Only one flag value allowed */
+  if( 0==(flags&EXPRDUP_REDUCE) ){
+    nSize = EXPR_FULLSIZE;
+  }else{
+    assert( !ExprHasAnyProperty(p, EP_TokenOnly|EP_Reduced) );
+    assert( !ExprHasProperty(p, EP_FromJoin) ); 
+    assert( (p->flags2 & EP2_MallocedToken)==0 );
+    assert( (p->flags2 & EP2_Irreducible)==0 );
+    if( p->pLeft || p->pRight || p->pColl || p->x.pList ){
+      nSize = EXPR_REDUCEDSIZE | EP_Reduced;
+    }else{
+      nSize = EXPR_TOKENONLYSIZE | EP_TokenOnly;
+    }
+  }
+  return nSize;
+}
+
+/*
+** This function returns the space in bytes required to store the copy 
+** of the Expr structure and a copy of the Expr.u.zToken string (if that
+** string is defined.)
+*/
+static int dupedExprNodeSize(Expr *p, int flags){
+  int nByte = dupedExprStructSize(p, flags) & 0xfff;
+  if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){
+    nByte += sqlite3Strlen30(p->u.zToken)+1;
+  }
+  return ROUND8(nByte);
+}
+
+/*
+** Return the number of bytes required to create a duplicate of the 
+** expression passed as the first argument. The second argument is a
+** mask containing EXPRDUP_XXX flags.
+**
+** The value returned includes space to create a copy of the Expr struct
+** itself and the buffer referred to by Expr.u.zToken, if any.
+**
+** If the EXPRDUP_REDUCE flag is set, then the return value includes 
+** space to duplicate all Expr nodes in the tree formed by Expr.pLeft 
+** and Expr.pRight variables (but not for any structures pointed to or 
+** descended from the Expr.x.pList or Expr.x.pSelect variables).
+*/
+static int dupedExprSize(Expr *p, int flags){
+  int nByte = 0;
+  if( p ){
+    nByte = dupedExprNodeSize(p, flags);
+    if( flags&EXPRDUP_REDUCE ){
+      nByte += dupedExprSize(p->pLeft, flags) + dupedExprSize(p->pRight, flags);
+    }
+  }
+  return nByte;
+}
+
+/*
+** This function is similar to sqlite3ExprDup(), except that if pzBuffer 
+** is not NULL then *pzBuffer is assumed to point to a buffer large enough 
+** to store the copy of expression p, the copies of p->u.zToken
+** (if applicable), and the copies of the p->pLeft and p->pRight expressions,
+** if any. Before returning, *pzBuffer is set to the first byte passed the
+** portion of the buffer copied into by this function.
+*/
+static Expr *exprDup(sqlite3 *db, Expr *p, int flags, u8 **pzBuffer){
+  Expr *pNew = 0;                      /* Value to return */
+  if( p ){
+    const int isReduced = (flags&EXPRDUP_REDUCE);
+    u8 *zAlloc;
+    u32 staticFlag = 0;
+
+    assert( pzBuffer==0 || isReduced );
+
+    /* Figure out where to write the new Expr structure. */
+    if( pzBuffer ){
+      zAlloc = *pzBuffer;
+      staticFlag = EP_Static;
+    }else{
+      zAlloc = sqlite3DbMallocRaw(db, dupedExprSize(p, flags));
+    }
+    pNew = (Expr *)zAlloc;
+
+    if( pNew ){
+      /* Set nNewSize to the size allocated for the structure pointed to
+      ** by pNew. This is either EXPR_FULLSIZE, EXPR_REDUCEDSIZE or
+      ** EXPR_TOKENONLYSIZE. nToken is set to the number of bytes consumed
+      ** by the copy of the p->u.zToken string (if any).
+      */
+      const unsigned nStructSize = dupedExprStructSize(p, flags);
+      const int nNewSize = nStructSize & 0xfff;
+      int nToken;
+      if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){
+        nToken = sqlite3Strlen30(p->u.zToken) + 1;
+      }else{
+        nToken = 0;
+      }
+      if( isReduced ){
+        assert( ExprHasProperty(p, EP_Reduced)==0 );
+        memcpy(zAlloc, p, nNewSize);
+      }else{
+        int nSize = exprStructSize(p);
+        memcpy(zAlloc, p, nSize);
+        memset(&zAlloc[nSize], 0, EXPR_FULLSIZE-nSize);
+      }
+
+      /* Set the EP_Reduced, EP_TokenOnly, and EP_Static flags appropriately. */
+      pNew->flags &= ~(EP_Reduced|EP_TokenOnly|EP_Static);
+      pNew->flags |= nStructSize & (EP_Reduced|EP_TokenOnly);
+      pNew->flags |= staticFlag;
+
+      /* Copy the p->u.zToken string, if any. */
+      if( nToken ){
+        char *zToken = pNew->u.zToken = (char*)&zAlloc[nNewSize];
+        memcpy(zToken, p->u.zToken, nToken);
+      }
+
+      if( 0==((p->flags|pNew->flags) & EP_TokenOnly) ){
+        /* Fill in the pNew->x.pSelect or pNew->x.pList member. */
+        if( ExprHasProperty(p, EP_xIsSelect) ){
+          pNew->x.pSelect = sqlite3SelectDup(db, p->x.pSelect, isReduced);
+        }else{
+          pNew->x.pList = sqlite3ExprListDup(db, p->x.pList, isReduced);
+        }
+      }
+
+      /* Fill in pNew->pLeft and pNew->pRight. */
+      if( ExprHasAnyProperty(pNew, EP_Reduced|EP_TokenOnly) ){
+        zAlloc += dupedExprNodeSize(p, flags);
+        if( ExprHasProperty(pNew, EP_Reduced) ){
+          pNew->pLeft = exprDup(db, p->pLeft, EXPRDUP_REDUCE, &zAlloc);
+          pNew->pRight = exprDup(db, p->pRight, EXPRDUP_REDUCE, &zAlloc);
+        }
+        if( pzBuffer ){
+          *pzBuffer = zAlloc;
+        }
+      }else{
+        pNew->flags2 = 0;
+        if( !ExprHasAnyProperty(p, EP_TokenOnly) ){
+          pNew->pLeft = sqlite3ExprDup(db, p->pLeft, 0);
+          pNew->pRight = sqlite3ExprDup(db, p->pRight, 0);
+        }
+      }
+
+    }
+  }
+  return pNew;
+}
+
+/*
+** The following group of routines make deep copies of expressions,
+** expression lists, ID lists, and select statements.  The copies can
+** be deleted (by being passed to their respective ...Delete() routines)
+** without effecting the originals.
+**
+** The expression list, ID, and source lists return by sqlite3ExprListDup(),
+** sqlite3IdListDup(), and sqlite3SrcListDup() can not be further expanded 
+** by subsequent calls to sqlite*ListAppend() routines.
+**
+** Any tables that the SrcList might point to are not duplicated.
+**
+** The flags parameter contains a combination of the EXPRDUP_XXX flags.
+** If the EXPRDUP_REDUCE flag is set, then the structure returned is a
+** truncated version of the usual Expr structure that will be stored as
+** part of the in-memory representation of the database schema.
+*/
+SQLITE_PRIVATE Expr *sqlite3ExprDup(sqlite3 *db, Expr *p, int flags){
+  return exprDup(db, p, flags, 0);
+}
+SQLITE_PRIVATE ExprList *sqlite3ExprListDup(sqlite3 *db, ExprList *p, int flags){
+  ExprList *pNew;
+  struct ExprList_item *pItem, *pOldItem;
+  int i;
+  if( p==0 ) return 0;
+  pNew = sqlite3DbMallocRaw(db, sizeof(*pNew) );
+  if( pNew==0 ) return 0;
+  pNew->iECursor = 0;
+  pNew->nExpr = pNew->nAlloc = p->nExpr;
+  pNew->a = pItem = sqlite3DbMallocRaw(db,  p->nExpr*sizeof(p->a[0]) );
+  if( pItem==0 ){
+    sqlite3DbFree(db, pNew);
+    return 0;
+  } 
+  pOldItem = p->a;
+  for(i=0; i<p->nExpr; i++, pItem++, pOldItem++){
+    Expr *pOldExpr = pOldItem->pExpr;
+    pItem->pExpr = sqlite3ExprDup(db, pOldExpr, flags);
+    pItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
+    pItem->zSpan = sqlite3DbStrDup(db, pOldItem->zSpan);
+    pItem->sortOrder = pOldItem->sortOrder;
+    pItem->done = 0;
+    pItem->iCol = pOldItem->iCol;
+    pItem->iAlias = pOldItem->iAlias;
+  }
+  return pNew;
+}
+
+/*
+** If cursors, triggers, views and subqueries are all omitted from
+** the build, then none of the following routines, except for 
+** sqlite3SelectDup(), can be called. sqlite3SelectDup() is sometimes
+** called with a NULL argument.
+*/
+#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER) \
+ || !defined(SQLITE_OMIT_SUBQUERY)
+SQLITE_PRIVATE SrcList *sqlite3SrcListDup(sqlite3 *db, SrcList *p, int flags){
+  SrcList *pNew;
+  int i;
+  int nByte;
+  if( p==0 ) return 0;
+  nByte = sizeof(*p) + (p->nSrc>0 ? sizeof(p->a[0]) * (p->nSrc-1) : 0);
+  pNew = sqlite3DbMallocRaw(db, nByte );
+  if( pNew==0 ) return 0;
+  pNew->nSrc = pNew->nAlloc = p->nSrc;
+  for(i=0; i<p->nSrc; i++){
+    struct SrcList_item *pNewItem = &pNew->a[i];
+    struct SrcList_item *pOldItem = &p->a[i];
+    Table *pTab;
+    pNewItem->zDatabase = sqlite3DbStrDup(db, pOldItem->zDatabase);
+    pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
+    pNewItem->zAlias = sqlite3DbStrDup(db, pOldItem->zAlias);
+    pNewItem->jointype = pOldItem->jointype;
+    pNewItem->iCursor = pOldItem->iCursor;
+    pNewItem->isPopulated = pOldItem->isPopulated;
+    pNewItem->zIndex = sqlite3DbStrDup(db, pOldItem->zIndex);
+    pNewItem->notIndexed = pOldItem->notIndexed;
+    pNewItem->pIndex = pOldItem->pIndex;
+    pTab = pNewItem->pTab = pOldItem->pTab;
+    if( pTab ){
+      pTab->nRef++;
+    }
+    pNewItem->pSelect = sqlite3SelectDup(db, pOldItem->pSelect, flags);
+    pNewItem->pOn = sqlite3ExprDup(db, pOldItem->pOn, flags);
+    pNewItem->pUsing = sqlite3IdListDup(db, pOldItem->pUsing);
+    pNewItem->colUsed = pOldItem->colUsed;
+  }
+  return pNew;
+}
+SQLITE_PRIVATE IdList *sqlite3IdListDup(sqlite3 *db, IdList *p){
+  IdList *pNew;
+  int i;
+  if( p==0 ) return 0;
+  pNew = sqlite3DbMallocRaw(db, sizeof(*pNew) );
+  if( pNew==0 ) return 0;
+  pNew->nId = pNew->nAlloc = p->nId;
+  pNew->a = sqlite3DbMallocRaw(db, p->nId*sizeof(p->a[0]) );
+  if( pNew->a==0 ){
+    sqlite3DbFree(db, pNew);
+    return 0;
+  }
+  for(i=0; i<p->nId; i++){
+    struct IdList_item *pNewItem = &pNew->a[i];
+    struct IdList_item *pOldItem = &p->a[i];
+    pNewItem->zName = sqlite3DbStrDup(db, pOldItem->zName);
+    pNewItem->idx = pOldItem->idx;
+  }
+  return pNew;
+}
+SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
+  Select *pNew;
+  if( p==0 ) return 0;
+  pNew = sqlite3DbMallocRaw(db, sizeof(*p) );
+  if( pNew==0 ) return 0;
+  pNew->pEList = sqlite3ExprListDup(db, p->pEList, flags);
+  pNew->pSrc = sqlite3SrcListDup(db, p->pSrc, flags);
+  pNew->pWhere = sqlite3ExprDup(db, p->pWhere, flags);
+  pNew->pGroupBy = sqlite3ExprListDup(db, p->pGroupBy, flags);
+  pNew->pHaving = sqlite3ExprDup(db, p->pHaving, flags);
+  pNew->pOrderBy = sqlite3ExprListDup(db, p->pOrderBy, flags);
+  pNew->op = p->op;
+  pNew->pPrior = sqlite3SelectDup(db, p->pPrior, flags);
+  pNew->pLimit = sqlite3ExprDup(db, p->pLimit, flags);
+  pNew->pOffset = sqlite3ExprDup(db, p->pOffset, flags);
+  pNew->iLimit = 0;
+  pNew->iOffset = 0;
+  pNew->selFlags = p->selFlags & ~SF_UsesEphemeral;
+  pNew->pRightmost = 0;
+  pNew->addrOpenEphm[0] = -1;
+  pNew->addrOpenEphm[1] = -1;
+  pNew->addrOpenEphm[2] = -1;
+  return pNew;
+}
+#else
+SQLITE_PRIVATE Select *sqlite3SelectDup(sqlite3 *db, Select *p, int flags){
+  assert( p==0 );
+  return 0;
+}
+#endif
+
+
+/*
+** Add a new element to the end of an expression list.  If pList is
+** initially NULL, then create a new expression list.
+**
+** If a memory allocation error occurs, the entire list is freed and
+** NULL is returned.  If non-NULL is returned, then it is guaranteed
+** that the new entry was successfully appended.
+*/
+SQLITE_PRIVATE ExprList *sqlite3ExprListAppend(
+  Parse *pParse,          /* Parsing context */
+  ExprList *pList,        /* List to which to append. Might be NULL */
+  Expr *pExpr             /* Expression to be appended. Might be NULL */
+){
+  sqlite3 *db = pParse->db;
+  if( pList==0 ){
+    pList = sqlite3DbMallocZero(db, sizeof(ExprList) );
+    if( pList==0 ){
+      goto no_mem;
+    }
+    assert( pList->nAlloc==0 );
+  }
+  if( pList->nAlloc<=pList->nExpr ){
+    struct ExprList_item *a;
+    int n = pList->nAlloc*2 + 4;
+    a = sqlite3DbRealloc(db, pList->a, n*sizeof(pList->a[0]));
+    if( a==0 ){
+      goto no_mem;
+    }
+    pList->a = a;
+    pList->nAlloc = sqlite3DbMallocSize(db, a)/sizeof(a[0]);
+  }
+  assert( pList->a!=0 );
+  #if 1
+  {
+    struct ExprList_item *pItem = &pList->a[pList->nExpr++];
+    memset(pItem, 0, sizeof(*pItem));
+    pItem->pExpr = pExpr;
+  }
+  #endif
+  return pList;
+
+no_mem:     
+  /* Avoid leaking memory if malloc has failed. */
+  sqlite3ExprDelete(db, pExpr);
+  sqlite3ExprListDelete(db, pList);
+  return 0;
+}
+
+/*
+** Set the ExprList.a[].zName element of the most recently added item
+** on the expression list.
+**
+** pList might be NULL following an OOM error.  But pName should never be
+** NULL.  If a memory allocation fails, the pParse->db->mallocFailed flag
+** is set.
+*/
+SQLITE_PRIVATE void sqlite3ExprListSetName(
+  Parse *pParse,          /* Parsing context */
+  ExprList *pList,        /* List to which to add the span. */
+  Token *pName,           /* Name to be added */
+  int dequote             /* True to cause the name to be dequoted */
+){
+  assert( pList!=0 || pParse->db->mallocFailed!=0 );
+  if( pList ){
+    struct ExprList_item *pItem;
+    assert( pList->nExpr>0 );
+    pItem = &pList->a[pList->nExpr-1];
+    assert( pItem->zName==0 );
+    pItem->zName = sqlite3DbStrNDup(pParse->db, pName->z, pName->n);
+    if( dequote && pItem->zName ) sqlite3Dequote(pItem->zName);
+  }
+}
+
+/*
+** Set the ExprList.a[].zSpan element of the most recently added item
+** on the expression list.
+**
+** pList might be NULL following an OOM error.  But pSpan should never be
+** NULL.  If a memory allocation fails, the pParse->db->mallocFailed flag
+** is set.
+*/
+SQLITE_PRIVATE void sqlite3ExprListSetSpan(
+  Parse *pParse,          /* Parsing context */
+  ExprList *pList,        /* List to which to add the span. */
+  ExprSpan *pSpan         /* The span to be added */
+){
+  sqlite3 *db = pParse->db;
+  assert( pList!=0 || db->mallocFailed!=0 );
+  if( pList ){
+    struct ExprList_item *pItem = &pList->a[pList->nExpr-1];
+    assert( pList->nExpr>0 );
+    assert( db->mallocFailed || pItem->pExpr==pSpan->pExpr );
+    sqlite3DbFree(db, pItem->zSpan);
+    pItem->zSpan = sqlite3DbStrNDup(db, (char*)pSpan->zStart,
+                                    (int)(pSpan->zEnd - pSpan->zStart));
+  }
+}
+
+/*
+** If the expression list pEList contains more than iLimit elements,
+** leave an error message in pParse.
+*/
+SQLITE_PRIVATE void sqlite3ExprListCheckLength(
+  Parse *pParse,
+  ExprList *pEList,
+  const char *zObject
+){
+  int mx = pParse->db->aLimit[SQLITE_LIMIT_COLUMN];
+  testcase( pEList && pEList->nExpr==mx );
+  testcase( pEList && pEList->nExpr==mx+1 );
+  if( pEList && pEList->nExpr>mx ){
+    sqlite3ErrorMsg(pParse, "too many columns in %s", zObject);
+  }
+}
+
+/*
+** Delete an entire expression list.
+*/
+SQLITE_PRIVATE void sqlite3ExprListDelete(sqlite3 *db, ExprList *pList){
+  int i;
+  struct ExprList_item *pItem;
+  if( pList==0 ) return;
+  assert( pList->a!=0 || (pList->nExpr==0 && pList->nAlloc==0) );
+  assert( pList->nExpr<=pList->nAlloc );
+  for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
+    sqlite3ExprDelete(db, pItem->pExpr);
+    sqlite3DbFree(db, pItem->zName);
+    sqlite3DbFree(db, pItem->zSpan);
+  }
+  sqlite3DbFree(db, pList->a);
+  sqlite3DbFree(db, pList);
+}
+
+/*
+** These routines are Walker callbacks.  Walker.u.pi is a pointer
+** to an integer.  These routines are checking an expression to see
+** if it is a constant.  Set *Walker.u.pi to 0 if the expression is
+** not constant.
+**
+** These callback routines are used to implement the following:
+**
+**     sqlite3ExprIsConstant()
+**     sqlite3ExprIsConstantNotJoin()
+**     sqlite3ExprIsConstantOrFunction()
+**
+*/
+static int exprNodeIsConstant(Walker *pWalker, Expr *pExpr){
+
+  /* If pWalker->u.i is 3 then any term of the expression that comes from
+  ** the ON or USING clauses of a join disqualifies the expression
+  ** from being considered constant. */
+  if( pWalker->u.i==3 && ExprHasAnyProperty(pExpr, EP_FromJoin) ){
+    pWalker->u.i = 0;
+    return WRC_Abort;
+  }
+
+  switch( pExpr->op ){
+    /* Consider functions to be constant if all their arguments are constant
+    ** and pWalker->u.i==2 */
+    case TK_FUNCTION:
+      if( pWalker->u.i==2 ) return 0;
+      /* Fall through */
+    case TK_ID:
+    case TK_COLUMN:
+    case TK_AGG_FUNCTION:
+    case TK_AGG_COLUMN:
+      testcase( pExpr->op==TK_ID );
+      testcase( pExpr->op==TK_COLUMN );
+      testcase( pExpr->op==TK_AGG_FUNCTION );
+      testcase( pExpr->op==TK_AGG_COLUMN );
+      pWalker->u.i = 0;
+      return WRC_Abort;
+    default:
+      testcase( pExpr->op==TK_SELECT ); /* selectNodeIsConstant will disallow */
+      testcase( pExpr->op==TK_EXISTS ); /* selectNodeIsConstant will disallow */
+      return WRC_Continue;
+  }
+}
+static int selectNodeIsConstant(Walker *pWalker, Select *NotUsed){
+  UNUSED_PARAMETER(NotUsed);
+  pWalker->u.i = 0;
+  return WRC_Abort;
+}
+static int exprIsConst(Expr *p, int initFlag){
+  Walker w;
+  w.u.i = initFlag;
+  w.xExprCallback = exprNodeIsConstant;
+  w.xSelectCallback = selectNodeIsConstant;
+  sqlite3WalkExpr(&w, p);
+  return w.u.i;
+}
+
+/*
+** Walk an expression tree.  Return 1 if the expression is constant
+** and 0 if it involves variables or function calls.
+**
+** For the purposes of this function, a double-quoted string (ex: "abc")
+** is considered a variable but a single-quoted string (ex: 'abc') is
+** a constant.
+*/
+SQLITE_PRIVATE int sqlite3ExprIsConstant(Expr *p){
+  return exprIsConst(p, 1);
+}
+
+/*
+** Walk an expression tree.  Return 1 if the expression is constant
+** that does no originate from the ON or USING clauses of a join.
+** Return 0 if it involves variables or function calls or terms from
+** an ON or USING clause.
+*/
+SQLITE_PRIVATE int sqlite3ExprIsConstantNotJoin(Expr *p){
+  return exprIsConst(p, 3);
+}
+
+/*
+** Walk an expression tree.  Return 1 if the expression is constant
+** or a function call with constant arguments.  Return and 0 if there
+** are any variables.
+**
+** For the purposes of this function, a double-quoted string (ex: "abc")
+** is considered a variable but a single-quoted string (ex: 'abc') is
+** a constant.
+*/
+SQLITE_PRIVATE int sqlite3ExprIsConstantOrFunction(Expr *p){
+  return exprIsConst(p, 2);
+}
+
+/*
+** If the expression p codes a constant integer that is small enough
+** to fit in a 32-bit integer, return 1 and put the value of the integer
+** in *pValue.  If the expression is not an integer or if it is too big
+** to fit in a signed 32-bit integer, return 0 and leave *pValue unchanged.
+*/
+SQLITE_PRIVATE int sqlite3ExprIsInteger(Expr *p, int *pValue){
+  int rc = 0;
+
+  /* If an expression is an integer literal that fits in a signed 32-bit
+  ** integer, then the EP_IntValue flag will have already been set */
+  assert( p->op!=TK_INTEGER || (p->flags & EP_IntValue)!=0
+           || sqlite3GetInt32(p->u.zToken, &rc)==0 );
+
+  if( p->flags & EP_IntValue ){
+    *pValue = p->u.iValue;
+    return 1;
+  }
+  switch( p->op ){
+    case TK_UPLUS: {
+      rc = sqlite3ExprIsInteger(p->pLeft, pValue);
+      break;
+    }
+    case TK_UMINUS: {
+      int v;
+      if( sqlite3ExprIsInteger(p->pLeft, &v) ){
+        *pValue = -v;
+        rc = 1;
+      }
+      break;
+    }
+    default: break;
+  }
+  return rc;
+}
+
+/*
+** Return FALSE if there is no chance that the expression can be NULL.
+**
+** If the expression might be NULL or if the expression is too complex
+** to tell return TRUE.  
+**
+** This routine is used as an optimization, to skip OP_IsNull opcodes
+** when we know that a value cannot be NULL.  Hence, a false positive
+** (returning TRUE when in fact the expression can never be NULL) might
+** be a small performance hit but is otherwise harmless.  On the other
+** hand, a false negative (returning FALSE when the result could be NULL)
+** will likely result in an incorrect answer.  So when in doubt, return
+** TRUE.
+*/
+SQLITE_PRIVATE int sqlite3ExprCanBeNull(const Expr *p){
+  u8 op;
+  while( p->op==TK_UPLUS || p->op==TK_UMINUS ){ p = p->pLeft; }
+  op = p->op;
+  if( op==TK_REGISTER ) op = p->op2;
+  switch( op ){
+    case TK_INTEGER:
+    case TK_STRING:
+    case TK_FLOAT:
+    case TK_BLOB:
+      return 0;
+    default:
+      return 1;
+  }
+}
+
+/*
+** Generate an OP_IsNull instruction that tests register iReg and jumps
+** to location iDest if the value in iReg is NULL.  The value in iReg 
+** was computed by pExpr.  If we can look at pExpr at compile-time and
+** determine that it can never generate a NULL, then the OP_IsNull operation
+** can be omitted.
+*/
+SQLITE_PRIVATE void sqlite3ExprCodeIsNullJump(
+  Vdbe *v,            /* The VDBE under construction */
+  const Expr *pExpr,  /* Only generate OP_IsNull if this expr can be NULL */
+  int iReg,           /* Test the value in this register for NULL */
+  int iDest           /* Jump here if the value is null */
+){
+  if( sqlite3ExprCanBeNull(pExpr) ){
+    sqlite3VdbeAddOp2(v, OP_IsNull, iReg, iDest);
+  }
+}
+
+/*
+** Return TRUE if the given expression is a constant which would be
+** unchanged by OP_Affinity with the affinity given in the second
+** argument.
+**
+** This routine is used to determine if the OP_Affinity operation
+** can be omitted.  When in doubt return FALSE.  A false negative
+** is harmless.  A false positive, however, can result in the wrong
+** answer.
+*/
+SQLITE_PRIVATE int sqlite3ExprNeedsNoAffinityChange(const Expr *p, char aff){
+  u8 op;
+  if( aff==SQLITE_AFF_NONE ) return 1;
+  while( p->op==TK_UPLUS || p->op==TK_UMINUS ){ p = p->pLeft; }
+  op = p->op;
+  if( op==TK_REGISTER ) op = p->op2;
+  switch( op ){
+    case TK_INTEGER: {
+      return aff==SQLITE_AFF_INTEGER || aff==SQLITE_AFF_NUMERIC;
+    }
+    case TK_FLOAT: {
+      return aff==SQLITE_AFF_REAL || aff==SQLITE_AFF_NUMERIC;
+    }
+    case TK_STRING: {
+      return aff==SQLITE_AFF_TEXT;
+    }
+    case TK_BLOB: {
+      return 1;
+    }
+    case TK_COLUMN: {
+      assert( p->iTable>=0 );  /* p cannot be part of a CHECK constraint */
+      return p->iColumn<0
+          && (aff==SQLITE_AFF_INTEGER || aff==SQLITE_AFF_NUMERIC);
+    }
+    default: {
+      return 0;
+    }
+  }
+}
+
+/*
+** Return TRUE if the given string is a row-id column name.
+*/
+SQLITE_PRIVATE int sqlite3IsRowid(const char *z){
+  if( sqlite3StrICmp(z, "_ROWID_")==0 ) return 1;
+  if( sqlite3StrICmp(z, "ROWID")==0 ) return 1;
+  if( sqlite3StrICmp(z, "OID")==0 ) return 1;
+  return 0;
+}
+
+/*
+** Return true if we are able to the IN operator optimization on a
+** query of the form
+**
+**       x IN (SELECT ...)
+**
+** Where the SELECT... clause is as specified by the parameter to this
+** routine.
+**
+** The Select object passed in has already been preprocessed and no
+** errors have been found.
+*/
+#ifndef SQLITE_OMIT_SUBQUERY
+static int isCandidateForInOpt(Select *p){
+  SrcList *pSrc;
+  ExprList *pEList;
+  Table *pTab;
+  if( p==0 ) return 0;                   /* right-hand side of IN is SELECT */
+  if( p->pPrior ) return 0;              /* Not a compound SELECT */
+  if( p->selFlags & (SF_Distinct|SF_Aggregate) ){
+    testcase( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct );
+    testcase( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );
+    return 0; /* No DISTINCT keyword and no aggregate functions */
+  }
+  assert( p->pGroupBy==0 );              /* Has no GROUP BY clause */
+  if( p->pLimit ) return 0;              /* Has no LIMIT clause */
+  assert( p->pOffset==0 );               /* No LIMIT means no OFFSET */
+  if( p->pWhere ) return 0;              /* Has no WHERE clause */
+  pSrc = p->pSrc;
+  assert( pSrc!=0 );
+  if( pSrc->nSrc!=1 ) return 0;          /* Single term in FROM clause */
+  if( pSrc->a[0].pSelect ) return 0;     /* FROM is not a subquery or view */
+  pTab = pSrc->a[0].pTab;
+  if( NEVER(pTab==0) ) return 0;
+  assert( pTab->pSelect==0 );            /* FROM clause is not a view */
+  if( IsVirtual(pTab) ) return 0;        /* FROM clause not a virtual table */
+  pEList = p->pEList;
+  if( pEList->nExpr!=1 ) return 0;       /* One column in the result set */
+  if( pEList->a[0].pExpr->op!=TK_COLUMN ) return 0; /* Result is a column */
+  return 1;
+}
+#endif /* SQLITE_OMIT_SUBQUERY */
+
+/*
+** This function is used by the implementation of the IN (...) operator.
+** It's job is to find or create a b-tree structure that may be used
+** either to test for membership of the (...) set or to iterate through
+** its members, skipping duplicates.
+**
+** The index of the cursor opened on the b-tree (database table, database index 
+** or ephermal table) is stored in pX->iTable before this function returns.
+** The returned value of this function indicates the b-tree type, as follows:
+**
+**   IN_INDEX_ROWID - The cursor was opened on a database table.
+**   IN_INDEX_INDEX - The cursor was opened on a database index.
+**   IN_INDEX_EPH -   The cursor was opened on a specially created and
+**                    populated epheremal table.
+**
+** An existing b-tree may only be used if the SELECT is of the simple
+** form:
+**
+**     SELECT <column> FROM <table>
+**
+** If the prNotFound parameter is 0, then the b-tree will be used to iterate
+** through the set members, skipping any duplicates. In this case an
+** epheremal table must be used unless the selected <column> is guaranteed
+** to be unique - either because it is an INTEGER PRIMARY KEY or it
+** has a UNIQUE constraint or UNIQUE index.
+**
+** If the prNotFound parameter is not 0, then the b-tree will be used 
+** for fast set membership tests. In this case an epheremal table must 
+** be used unless <column> is an INTEGER PRIMARY KEY or an index can 
+** be found with <column> as its left-most column.
+**
+** When the b-tree is being used for membership tests, the calling function
+** needs to know whether or not the structure contains an SQL NULL 
+** value in order to correctly evaluate expressions like "X IN (Y, Z)".
+** If there is any chance that the (...) might contain a NULL value at
+** runtime, then a register is allocated and the register number written
+** to *prNotFound. If there is no chance that the (...) contains a
+** NULL value, then *prNotFound is left unchanged.
+**
+** If a register is allocated and its location stored in *prNotFound, then
+** its initial value is NULL.  If the (...) does not remain constant
+** for the duration of the query (i.e. the SELECT within the (...)
+** is a correlated subquery) then the value of the allocated register is
+** reset to NULL each time the subquery is rerun. This allows the
+** caller to use vdbe code equivalent to the following:
+**
+**   if( register==NULL ){
+**     has_null = <test if data structure contains null>
+**     register = 1
+**   }
+**
+** in order to avoid running the <test if data structure contains null>
+** test more often than is necessary.
+*/
+#ifndef SQLITE_OMIT_SUBQUERY
+SQLITE_PRIVATE int sqlite3FindInIndex(Parse *pParse, Expr *pX, int *prNotFound){
+  Select *p;                            /* SELECT to the right of IN operator */
+  int eType = 0;                        /* Type of RHS table. IN_INDEX_* */
+  int iTab = pParse->nTab++;            /* Cursor of the RHS table */
+  int mustBeUnique = (prNotFound==0);   /* True if RHS must be unique */
+
+  assert( pX->op==TK_IN );
+
+  /* Check to see if an existing table or index can be used to
+  ** satisfy the query.  This is preferable to generating a new 
+  ** ephemeral table.
+  */
+  p = (ExprHasProperty(pX, EP_xIsSelect) ? pX->x.pSelect : 0);
+  if( ALWAYS(pParse->nErr==0) && isCandidateForInOpt(p) ){
+    sqlite3 *db = pParse->db;              /* Database connection */
+    Expr *pExpr = p->pEList->a[0].pExpr;   /* Expression <column> */
+    int iCol = pExpr->iColumn;             /* Index of column <column> */
+    Vdbe *v = sqlite3GetVdbe(pParse);      /* Virtual machine being coded */
+    Table *pTab = p->pSrc->a[0].pTab;      /* Table <table>. */
+    int iDb;                               /* Database idx for pTab */
+   
+    /* Code an OP_VerifyCookie and OP_TableLock for <table>. */
+    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+    sqlite3CodeVerifySchema(pParse, iDb);
+    sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
+
+    /* This function is only called from two places. In both cases the vdbe
+    ** has already been allocated. So assume sqlite3GetVdbe() is always
+    ** successful here.
+    */
+    assert(v);
+    if( iCol<0 ){
+      int iMem = ++pParse->nMem;
+      int iAddr;
+
+      iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem);
+      sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem);
+
+      sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);
+      eType = IN_INDEX_ROWID;
+
+      sqlite3VdbeJumpHere(v, iAddr);
+    }else{
+      Index *pIdx;                         /* Iterator variable */
+
+      /* The collation sequence used by the comparison. If an index is to
+      ** be used in place of a temp-table, it must be ordered according
+      ** to this collation sequence.  */
+      CollSeq *pReq = sqlite3BinaryCompareCollSeq(pParse, pX->pLeft, pExpr);
+
+      /* Check that the affinity that will be used to perform the 
+      ** comparison is the same as the affinity of the column. If
+      ** it is not, it is not possible to use any index.
+      */
+      char aff = comparisonAffinity(pX);
+      int affinity_ok = (pTab->aCol[iCol].affinity==aff||aff==SQLITE_AFF_NONE);
+
+      for(pIdx=pTab->pIndex; pIdx && eType==0 && affinity_ok; pIdx=pIdx->pNext){
+        if( (pIdx->aiColumn[0]==iCol)
+         && sqlite3FindCollSeq(db, ENC(db), pIdx->azColl[0], 0)==pReq
+         && (!mustBeUnique || (pIdx->nColumn==1 && pIdx->onError!=OE_None))
+        ){
+          int iMem = ++pParse->nMem;
+          int iAddr;
+          char *pKey;
+  
+          pKey = (char *)sqlite3IndexKeyinfo(pParse, pIdx);
+          iAddr = sqlite3VdbeAddOp1(v, OP_If, iMem);
+          sqlite3VdbeAddOp2(v, OP_Integer, 1, iMem);
+  
+          sqlite3VdbeAddOp4(v, OP_OpenRead, iTab, pIdx->tnum, iDb,
+                               pKey,P4_KEYINFO_HANDOFF);
+          VdbeComment((v, "%s", pIdx->zName));
+          eType = IN_INDEX_INDEX;
+
+          sqlite3VdbeJumpHere(v, iAddr);
+          if( prNotFound && !pTab->aCol[iCol].notNull ){
+            *prNotFound = ++pParse->nMem;
+          }
+        }
+      }
+    }
+  }
+
+  if( eType==0 ){
+    /* Could not found an existing table or index to use as the RHS b-tree.
+    ** We will have to generate an ephemeral table to do the job.
+    */
+    double savedNQueryLoop = pParse->nQueryLoop;
+    int rMayHaveNull = 0;
+    eType = IN_INDEX_EPH;
+    if( prNotFound ){
+      *prNotFound = rMayHaveNull = ++pParse->nMem;
+    }else{
+      testcase( pParse->nQueryLoop>(double)1 );
+      pParse->nQueryLoop = (double)1;
+      if( pX->pLeft->iColumn<0 && !ExprHasAnyProperty(pX, EP_xIsSelect) ){
+        eType = IN_INDEX_ROWID;
+      }
+    }
+    sqlite3CodeSubselect(pParse, pX, rMayHaveNull, eType==IN_INDEX_ROWID);
+    pParse->nQueryLoop = savedNQueryLoop;
+  }else{
+    pX->iTable = iTab;
+  }
+  return eType;
+}
+#endif
+
+/*
+** Generate code for scalar subqueries used as a subquery expression, EXISTS,
+** or IN operators.  Examples:
+**
+**     (SELECT a FROM b)          -- subquery
+**     EXISTS (SELECT a FROM b)   -- EXISTS subquery
+**     x IN (4,5,11)              -- IN operator with list on right-hand side
+**     x IN (SELECT a FROM b)     -- IN operator with subquery on the right
+**
+** The pExpr parameter describes the expression that contains the IN
+** operator or subquery.
+**
+** If parameter isRowid is non-zero, then expression pExpr is guaranteed
+** to be of the form "<rowid> IN (?, ?, ?)", where <rowid> is a reference
+** to some integer key column of a table B-Tree. In this case, use an
+** intkey B-Tree to store the set of IN(...) values instead of the usual
+** (slower) variable length keys B-Tree.
+**
+** If rMayHaveNull is non-zero, that means that the operation is an IN
+** (not a SELECT or EXISTS) and that the RHS might contains NULLs.
+** Furthermore, the IN is in a WHERE clause and that we really want
+** to iterate over the RHS of the IN operator in order to quickly locate
+** all corresponding LHS elements.  All this routine does is initialize
+** the register given by rMayHaveNull to NULL.  Calling routines will take
+** care of changing this register value to non-NULL if the RHS is NULL-free.
+**
+** If rMayHaveNull is zero, that means that the subquery is being used
+** for membership testing only.  There is no need to initialize any
+** registers to indicate the presense or absence of NULLs on the RHS.
+**
+** For a SELECT or EXISTS operator, return the register that holds the
+** result.  For IN operators or if an error occurs, the return value is 0.
+*/
+#ifndef SQLITE_OMIT_SUBQUERY
+SQLITE_PRIVATE int sqlite3CodeSubselect(
+  Parse *pParse,          /* Parsing context */
+  Expr *pExpr,            /* The IN, SELECT, or EXISTS operator */
+  int rMayHaveNull,       /* Register that records whether NULLs exist in RHS */
+  int isRowid             /* If true, LHS of IN operator is a rowid */
+){
+  int testAddr = 0;                       /* One-time test address */
+  int rReg = 0;                           /* Register storing resulting */
+  Vdbe *v = sqlite3GetVdbe(pParse);
+  if( NEVER(v==0) ) return 0;
+  sqlite3ExprCachePush(pParse);
+
+  /* This code must be run in its entirety every time it is encountered
+  ** if any of the following is true:
+  **
+  **    *  The right-hand side is a correlated subquery
+  **    *  The right-hand side is an expression list containing variables
+  **    *  We are inside a trigger
+  **
+  ** If all of the above are false, then we can run this code just once
+  ** save the results, and reuse the same result on subsequent invocations.
+  */
+  if( !ExprHasAnyProperty(pExpr, EP_VarSelect) && !pParse->pTriggerTab ){
+    int mem = ++pParse->nMem;
+    sqlite3VdbeAddOp1(v, OP_If, mem);
+    testAddr = sqlite3VdbeAddOp2(v, OP_Integer, 1, mem);
+    assert( testAddr>0 || pParse->db->mallocFailed );
+  }
+
+#ifndef SQLITE_OMIT_EXPLAIN
+  if( pParse->explain==2 ){
+    char *zMsg = sqlite3MPrintf(
+        pParse->db, "EXECUTE %s%s SUBQUERY %d", testAddr?"":"CORRELATED ",
+        pExpr->op==TK_IN?"LIST":"SCALAR", pParse->iNextSelectId
+    );
+    sqlite3VdbeAddOp4(v, OP_Explain, pParse->iSelectId, 0, 0, zMsg, P4_DYNAMIC);
+  }
+#endif
+
+  switch( pExpr->op ){
+    case TK_IN: {
+      char affinity;              /* Affinity of the LHS of the IN */
+      KeyInfo keyInfo;            /* Keyinfo for the generated table */
+      int addr;                   /* Address of OP_OpenEphemeral instruction */
+      Expr *pLeft = pExpr->pLeft; /* the LHS of the IN operator */
+
+      if( rMayHaveNull ){
+        sqlite3VdbeAddOp2(v, OP_Null, 0, rMayHaveNull);
+      }
+
+      affinity = sqlite3ExprAffinity(pLeft);
+
+      /* Whether this is an 'x IN(SELECT...)' or an 'x IN(<exprlist>)'
+      ** expression it is handled the same way.  An ephemeral table is 
+      ** filled with single-field index keys representing the results
+      ** from the SELECT or the <exprlist>.
+      **
+      ** If the 'x' expression is a column value, or the SELECT...
+      ** statement returns a column value, then the affinity of that
+      ** column is used to build the index keys. If both 'x' and the
+      ** SELECT... statement are columns, then numeric affinity is used
+      ** if either column has NUMERIC or INTEGER affinity. If neither
+      ** 'x' nor the SELECT... statement are columns, then numeric affinity
+      ** is used.
+      */
+      pExpr->iTable = pParse->nTab++;
+      addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pExpr->iTable, !isRowid);
+      if( rMayHaveNull==0 ) sqlite3VdbeChangeP5(v, BTREE_UNORDERED);
+      memset(&keyInfo, 0, sizeof(keyInfo));
+      keyInfo.nField = 1;
+
+      if( ExprHasProperty(pExpr, EP_xIsSelect) ){
+        /* Case 1:     expr IN (SELECT ...)
+        **
+        ** Generate code to write the results of the select into the temporary
+        ** table allocated and opened above.
+        */
+        SelectDest dest;
+        ExprList *pEList;
+
+        assert( !isRowid );
+        sqlite3SelectDestInit(&dest, SRT_Set, pExpr->iTable);
+        dest.affinity = (u8)affinity;
+        assert( (pExpr->iTable&0x0000FFFF)==pExpr->iTable );
+        pExpr->x.pSelect->iLimit = 0;
+        if( sqlite3Select(pParse, pExpr->x.pSelect, &dest) ){
+          return 0;
+        }
+        pEList = pExpr->x.pSelect->pEList;
+        if( ALWAYS(pEList!=0 && pEList->nExpr>0) ){ 
+          keyInfo.aColl[0] = sqlite3BinaryCompareCollSeq(pParse, pExpr->pLeft,
+              pEList->a[0].pExpr);
+        }
+      }else if( ALWAYS(pExpr->x.pList!=0) ){
+        /* Case 2:     expr IN (exprlist)
+        **
+        ** For each expression, build an index key from the evaluation and
+        ** store it in the temporary table. If <expr> is a column, then use
+        ** that columns affinity when building index keys. If <expr> is not
+        ** a column, use numeric affinity.
+        */
+        int i;
+        ExprList *pList = pExpr->x.pList;
+        struct ExprList_item *pItem;
+        int r1, r2, r3;
+
+        if( !affinity ){
+          affinity = SQLITE_AFF_NONE;
+        }
+        keyInfo.aColl[0] = sqlite3ExprCollSeq(pParse, pExpr->pLeft);
+
+        /* Loop through each expression in <exprlist>. */
+        r1 = sqlite3GetTempReg(pParse);
+        r2 = sqlite3GetTempReg(pParse);
+        sqlite3VdbeAddOp2(v, OP_Null, 0, r2);
+        for(i=pList->nExpr, pItem=pList->a; i>0; i--, pItem++){
+          Expr *pE2 = pItem->pExpr;
+          int iValToIns;
+
+          /* If the expression is not constant then we will need to
+          ** disable the test that was generated above that makes sure
+          ** this code only executes once.  Because for a non-constant
+          ** expression we need to rerun this code each time.
+          */
+          if( testAddr && !sqlite3ExprIsConstant(pE2) ){
+            sqlite3VdbeChangeToNoop(v, testAddr-1, 2);
+            testAddr = 0;
+          }
+
+          /* Evaluate the expression and insert it into the temp table */
+          if( isRowid && sqlite3ExprIsInteger(pE2, &iValToIns) ){
+            sqlite3VdbeAddOp3(v, OP_InsertInt, pExpr->iTable, r2, iValToIns);
+          }else{
+            r3 = sqlite3ExprCodeTarget(pParse, pE2, r1);
+            if( isRowid ){
+              sqlite3VdbeAddOp2(v, OP_MustBeInt, r3,
+                                sqlite3VdbeCurrentAddr(v)+2);
+              sqlite3VdbeAddOp3(v, OP_Insert, pExpr->iTable, r2, r3);
+            }else{
+              sqlite3VdbeAddOp4(v, OP_MakeRecord, r3, 1, r2, &affinity, 1);
+              sqlite3ExprCacheAffinityChange(pParse, r3, 1);
+              sqlite3VdbeAddOp2(v, OP_IdxInsert, pExpr->iTable, r2);
+            }
+          }
+        }
+        sqlite3ReleaseTempReg(pParse, r1);
+        sqlite3ReleaseTempReg(pParse, r2);
+      }
+      if( !isRowid ){
+        sqlite3VdbeChangeP4(v, addr, (void *)&keyInfo, P4_KEYINFO);
+      }
+      break;
+    }
+
+    case TK_EXISTS:
+    case TK_SELECT:
+    default: {
+      /* If this has to be a scalar SELECT.  Generate code to put the
+      ** value of this select in a memory cell and record the number
+      ** of the memory cell in iColumn.  If this is an EXISTS, write
+      ** an integer 0 (not exists) or 1 (exists) into a memory cell
+      ** and record that memory cell in iColumn.
+      */
+      Select *pSel;                         /* SELECT statement to encode */
+      SelectDest dest;                      /* How to deal with SELECt result */
+
+      testcase( pExpr->op==TK_EXISTS );
+      testcase( pExpr->op==TK_SELECT );
+      assert( pExpr->op==TK_EXISTS || pExpr->op==TK_SELECT );
+
+      assert( ExprHasProperty(pExpr, EP_xIsSelect) );
+      pSel = pExpr->x.pSelect;
+      sqlite3SelectDestInit(&dest, 0, ++pParse->nMem);
+      if( pExpr->op==TK_SELECT ){
+        dest.eDest = SRT_Mem;
+        sqlite3VdbeAddOp2(v, OP_Null, 0, dest.iParm);
+        VdbeComment((v, "Init subquery result"));
+      }else{
+        dest.eDest = SRT_Exists;
+        sqlite3VdbeAddOp2(v, OP_Integer, 0, dest.iParm);
+        VdbeComment((v, "Init EXISTS result"));
+      }
+      sqlite3ExprDelete(pParse->db, pSel->pLimit);
+      pSel->pLimit = sqlite3PExpr(pParse, TK_INTEGER, 0, 0,
+                                  &sqlite3IntTokens[1]);
+      pSel->iLimit = 0;
+      if( sqlite3Select(pParse, pSel, &dest) ){
+        return 0;
+      }
+      rReg = dest.iParm;
+      ExprSetIrreducible(pExpr);
+      break;
+    }
+  }
+
+  if( testAddr ){
+    sqlite3VdbeJumpHere(v, testAddr-1);
+  }
+  sqlite3ExprCachePop(pParse, 1);
+
+  return rReg;
+}
+#endif /* SQLITE_OMIT_SUBQUERY */
+
+#ifndef SQLITE_OMIT_SUBQUERY
+/*
+** Generate code for an IN expression.
+**
+**      x IN (SELECT ...)
+**      x IN (value, value, ...)
+**
+** The left-hand side (LHS) is a scalar expression.  The right-hand side (RHS)
+** is an array of zero or more values.  The expression is true if the LHS is
+** contained within the RHS.  The value of the expression is unknown (NULL)
+** if the LHS is NULL or if the LHS is not contained within the RHS and the
+** RHS contains one or more NULL values.
+**
+** This routine generates code will jump to destIfFalse if the LHS is not 
+** contained within the RHS.  If due to NULLs we cannot determine if the LHS
+** is contained in the RHS then jump to destIfNull.  If the LHS is contained
+** within the RHS then fall through.
+*/
+static void sqlite3ExprCodeIN(
+  Parse *pParse,        /* Parsing and code generating context */
+  Expr *pExpr,          /* The IN expression */
+  int destIfFalse,      /* Jump here if LHS is not contained in the RHS */
+  int destIfNull        /* Jump here if the results are unknown due to NULLs */
+){
+  int rRhsHasNull = 0;  /* Register that is true if RHS contains NULL values */
+  char affinity;        /* Comparison affinity to use */
+  int eType;            /* Type of the RHS */
+  int r1;               /* Temporary use register */
+  Vdbe *v;              /* Statement under construction */
+
+  /* Compute the RHS.   After this step, the table with cursor
+  ** pExpr->iTable will contains the values that make up the RHS.
+  */
+  v = pParse->pVdbe;
+  assert( v!=0 );       /* OOM detected prior to this routine */
+  VdbeNoopComment((v, "begin IN expr"));
+  eType = sqlite3FindInIndex(pParse, pExpr, &rRhsHasNull);
+
+  /* Figure out the affinity to use to create a key from the results
+  ** of the expression. affinityStr stores a static string suitable for
+  ** P4 of OP_MakeRecord.
+  */
+  affinity = comparisonAffinity(pExpr);
+
+  /* Code the LHS, the <expr> from "<expr> IN (...)".
+  */
+  sqlite3ExprCachePush(pParse);
+  r1 = sqlite3GetTempReg(pParse);
+  sqlite3ExprCode(pParse, pExpr->pLeft, r1);
+
+  /* If the LHS is NULL, then the result is either false or NULL depending
+  ** on whether the RHS is empty or not, respectively.
+  */
+  if( destIfNull==destIfFalse ){
+    /* Shortcut for the common case where the false and NULL outcomes are
+    ** the same. */
+    sqlite3VdbeAddOp2(v, OP_IsNull, r1, destIfNull);
+  }else{
+    int addr1 = sqlite3VdbeAddOp1(v, OP_NotNull, r1);
+    sqlite3VdbeAddOp2(v, OP_Rewind, pExpr->iTable, destIfFalse);
+    sqlite3VdbeAddOp2(v, OP_Goto, 0, destIfNull);
+    sqlite3VdbeJumpHere(v, addr1);
+  }
+
+  if( eType==IN_INDEX_ROWID ){
+    /* In this case, the RHS is the ROWID of table b-tree
+    */
+    sqlite3VdbeAddOp2(v, OP_MustBeInt, r1, destIfFalse);
+    sqlite3VdbeAddOp3(v, OP_NotExists, pExpr->iTable, destIfFalse, r1);
+  }else{
+    /* In this case, the RHS is an index b-tree.
+    */
+    sqlite3VdbeAddOp4(v, OP_Affinity, r1, 1, 0, &affinity, 1);
+
+    /* If the set membership test fails, then the result of the 
+    ** "x IN (...)" expression must be either 0 or NULL. If the set
+    ** contains no NULL values, then the result is 0. If the set 
+    ** contains one or more NULL values, then the result of the
+    ** expression is also NULL.
+    */
+    if( rRhsHasNull==0 || destIfFalse==destIfNull ){
+      /* This branch runs if it is known at compile time that the RHS
+      ** cannot contain NULL values. This happens as the result
+      ** of a "NOT NULL" constraint in the database schema.
+      **
+      ** Also run this branch if NULL is equivalent to FALSE
+      ** for this particular IN operator.
+      */
+      sqlite3VdbeAddOp4Int(v, OP_NotFound, pExpr->iTable, destIfFalse, r1, 1);
+
+    }else{
+      /* In this branch, the RHS of the IN might contain a NULL and
+      ** the presence of a NULL on the RHS makes a difference in the
+      ** outcome.
+      */
+      int j1, j2, j3;
+
+      /* First check to see if the LHS is contained in the RHS.  If so,
+      ** then the presence of NULLs in the RHS does not matter, so jump
+      ** over all of the code that follows.
+      */
+      j1 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, r1, 1);
+
+      /* Here we begin generating code that runs if the LHS is not
+      ** contained within the RHS.  Generate additional code that
+      ** tests the RHS for NULLs.  If the RHS contains a NULL then
+      ** jump to destIfNull.  If there are no NULLs in the RHS then
+      ** jump to destIfFalse.
+      */
+      j2 = sqlite3VdbeAddOp1(v, OP_NotNull, rRhsHasNull);
+      j3 = sqlite3VdbeAddOp4Int(v, OP_Found, pExpr->iTable, 0, rRhsHasNull, 1);
+      sqlite3VdbeAddOp2(v, OP_Integer, -1, rRhsHasNull);
+      sqlite3VdbeJumpHere(v, j3);
+      sqlite3VdbeAddOp2(v, OP_AddImm, rRhsHasNull, 1);
+      sqlite3VdbeJumpHere(v, j2);
+
+      /* Jump to the appropriate target depending on whether or not
+      ** the RHS contains a NULL
+      */
+      sqlite3VdbeAddOp2(v, OP_If, rRhsHasNull, destIfNull);
+      sqlite3VdbeAddOp2(v, OP_Goto, 0, destIfFalse);
+
+      /* The OP_Found at the top of this branch jumps here when true, 
+      ** causing the overall IN expression evaluation to fall through.
+      */
+      sqlite3VdbeJumpHere(v, j1);
+    }
+  }
+  sqlite3ReleaseTempReg(pParse, r1);
+  sqlite3ExprCachePop(pParse, 1);
+  VdbeComment((v, "end IN expr"));
+}
+#endif /* SQLITE_OMIT_SUBQUERY */
+
+/*
+** Duplicate an 8-byte value
+*/
+static char *dup8bytes(Vdbe *v, const char *in){
+  char *out = sqlite3DbMallocRaw(sqlite3VdbeDb(v), 8);
+  if( out ){
+    memcpy(out, in, 8);
+  }
+  return out;
+}
+
+#ifndef SQLITE_OMIT_FLOATING_POINT
+/*
+** Generate an instruction that will put the floating point
+** value described by z[0..n-1] into register iMem.
+**
+** The z[] string will probably not be zero-terminated.  But the 
+** z[n] character is guaranteed to be something that does not look
+** like the continuation of the number.
+*/
+static void codeReal(Vdbe *v, const char *z, int negateFlag, int iMem){
+  if( ALWAYS(z!=0) ){
+    double value;
+    char *zV;
+    sqlite3AtoF(z, &value, sqlite3Strlen30(z), SQLITE_UTF8);
+    assert( !sqlite3IsNaN(value) ); /* The new AtoF never returns NaN */
+    if( negateFlag ) value = -value;
+    zV = dup8bytes(v, (char*)&value);
+    sqlite3VdbeAddOp4(v, OP_Real, 0, iMem, 0, zV, P4_REAL);
+  }
+}
+#endif
+
+
+/*
+** Generate an instruction that will put the integer describe by
+** text z[0..n-1] into register iMem.
+**
+** Expr.u.zToken is always UTF8 and zero-terminated.
+*/
+static void codeInteger(Parse *pParse, Expr *pExpr, int negFlag, int iMem){
+  Vdbe *v = pParse->pVdbe;
+  if( pExpr->flags & EP_IntValue ){
+    int i = pExpr->u.iValue;
+    assert( i>=0 );
+    if( negFlag ) i = -i;
+    sqlite3VdbeAddOp2(v, OP_Integer, i, iMem);
+  }else{
+    int c;
+    i64 value;
+    const char *z = pExpr->u.zToken;
+    assert( z!=0 );
+    c = sqlite3Atoi64(z, &value, sqlite3Strlen30(z), SQLITE_UTF8);
+    if( c==0 || (c==2 && negFlag) ){
+      char *zV;
+      if( negFlag ){ value = c==2 ? SMALLEST_INT64 : -value; }
+      zV = dup8bytes(v, (char*)&value);
+      sqlite3VdbeAddOp4(v, OP_Int64, 0, iMem, 0, zV, P4_INT64);
+    }else{
+#ifdef SQLITE_OMIT_FLOATING_POINT
+      sqlite3ErrorMsg(pParse, "oversized integer: %s%s", negFlag ? "-" : "", z);
+#else
+      codeReal(v, z, negFlag, iMem);
+#endif
+    }
+  }
+}
+
+/*
+** Clear a cache entry.
+*/
+static void cacheEntryClear(Parse *pParse, struct yColCache *p){
+  if( p->tempReg ){
+    if( pParse->nTempReg<ArraySize(pParse->aTempReg) ){
+      pParse->aTempReg[pParse->nTempReg++] = p->iReg;
+    }
+    p->tempReg = 0;
+  }
+}
+
+
+/*
+** Record in the column cache that a particular column from a
+** particular table is stored in a particular register.
+*/
+SQLITE_PRIVATE void sqlite3ExprCacheStore(Parse *pParse, int iTab, int iCol, int iReg){
+  int i;
+  int minLru;
+  int idxLru;
+  struct yColCache *p;
+
+  assert( iReg>0 );  /* Register numbers are always positive */
+  assert( iCol>=-1 && iCol<32768 );  /* Finite column numbers */
+
+  /* The SQLITE_ColumnCache flag disables the column cache.  This is used
+  ** for testing only - to verify that SQLite always gets the same answer
+  ** with and without the column cache.
+  */
+  if( pParse->db->flags & SQLITE_ColumnCache ) return;
+
+  /* First replace any existing entry.
+  **
+  ** Actually, the way the column cache is currently used, we are guaranteed
+  ** that the object will never already be in cache.  Verify this guarantee.
+  */
+#ifndef NDEBUG
+  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
+#if 0 /* This code wold remove the entry from the cache if it existed */
+    if( p->iReg && p->iTable==iTab && p->iColumn==iCol ){
+      cacheEntryClear(pParse, p);
+      p->iLevel = pParse->iCacheLevel;
+      p->iReg = iReg;
+      p->lru = pParse->iCacheCnt++;
+      return;
+    }
+#endif
+    assert( p->iReg==0 || p->iTable!=iTab || p->iColumn!=iCol );
+  }
+#endif
+
+  /* Find an empty slot and replace it */
+  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
+    if( p->iReg==0 ){
+      p->iLevel = pParse->iCacheLevel;
+      p->iTable = iTab;
+      p->iColumn = iCol;
+      p->iReg = iReg;
+      p->tempReg = 0;
+      p->lru = pParse->iCacheCnt++;
+      return;
+    }
+  }
+
+  /* Replace the last recently used */
+  minLru = 0x7fffffff;
+  idxLru = -1;
+  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
+    if( p->lru<minLru ){
+      idxLru = i;
+      minLru = p->lru;
+    }
+  }
+  if( ALWAYS(idxLru>=0) ){
+    p = &pParse->aColCache[idxLru];
+    p->iLevel = pParse->iCacheLevel;
+    p->iTable = iTab;
+    p->iColumn = iCol;
+    p->iReg = iReg;
+    p->tempReg = 0;
+    p->lru = pParse->iCacheCnt++;
+    return;
+  }
+}
+
+/*
+** Indicate that registers between iReg..iReg+nReg-1 are being overwritten.
+** Purge the range of registers from the column cache.
+*/
+SQLITE_PRIVATE void sqlite3ExprCacheRemove(Parse *pParse, int iReg, int nReg){
+  int i;
+  int iLast = iReg + nReg - 1;
+  struct yColCache *p;
+  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
+    int r = p->iReg;
+    if( r>=iReg && r<=iLast ){
+      cacheEntryClear(pParse, p);
+      p->iReg = 0;
+    }
+  }
+}
+
+/*
+** Remember the current column cache context.  Any new entries added
+** added to the column cache after this call are removed when the
+** corresponding pop occurs.
+*/
+SQLITE_PRIVATE void sqlite3ExprCachePush(Parse *pParse){
+  pParse->iCacheLevel++;
+}
+
+/*
+** Remove from the column cache any entries that were added since the
+** the previous N Push operations.  In other words, restore the cache
+** to the state it was in N Pushes ago.
+*/
+SQLITE_PRIVATE void sqlite3ExprCachePop(Parse *pParse, int N){
+  int i;
+  struct yColCache *p;
+  assert( N>0 );
+  assert( pParse->iCacheLevel>=N );
+  pParse->iCacheLevel -= N;
+  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
+    if( p->iReg && p->iLevel>pParse->iCacheLevel ){
+      cacheEntryClear(pParse, p);
+      p->iReg = 0;
+    }
+  }
+}
+
+/*
+** When a cached column is reused, make sure that its register is
+** no longer available as a temp register.  ticket #3879:  that same
+** register might be in the cache in multiple places, so be sure to
+** get them all.
+*/
+static void sqlite3ExprCachePinRegister(Parse *pParse, int iReg){
+  int i;
+  struct yColCache *p;
+  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
+    if( p->iReg==iReg ){
+      p->tempReg = 0;
+    }
+  }
+}
+
+/*
+** Generate code to extract the value of the iCol-th column of a table.
+*/
+SQLITE_PRIVATE void sqlite3ExprCodeGetColumnOfTable(
+  Vdbe *v,        /* The VDBE under construction */
+  Table *pTab,    /* The table containing the value */
+  int iTabCur,    /* The cursor for this table */
+  int iCol,       /* Index of the column to extract */
+  int regOut      /* Extract the valud into this register */
+){
+  if( iCol<0 || iCol==pTab->iPKey ){
+    sqlite3VdbeAddOp2(v, OP_Rowid, iTabCur, regOut);
+  }else{
+    int op = IsVirtual(pTab) ? OP_VColumn : OP_Column;
+    sqlite3VdbeAddOp3(v, op, iTabCur, iCol, regOut);
+  }
+  if( iCol>=0 ){
+    sqlite3ColumnDefault(v, pTab, iCol, regOut);
+  }
+}
+
+/*
+** Generate code that will extract the iColumn-th column from
+** table pTab and store the column value in a register.  An effort
+** is made to store the column value in register iReg, but this is
+** not guaranteed.  The location of the column value is returned.
+**
+** There must be an open cursor to pTab in iTable when this routine
+** is called.  If iColumn<0 then code is generated that extracts the rowid.
+*/
+SQLITE_PRIVATE int sqlite3ExprCodeGetColumn(
+  Parse *pParse,   /* Parsing and code generating context */
+  Table *pTab,     /* Description of the table we are reading from */
+  int iColumn,     /* Index of the table column */
+  int iTable,      /* The cursor pointing to the table */
+  int iReg         /* Store results here */
+){
+  Vdbe *v = pParse->pVdbe;
+  int i;
+  struct yColCache *p;
+
+  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
+    if( p->iReg>0 && p->iTable==iTable && p->iColumn==iColumn ){
+      p->lru = pParse->iCacheCnt++;
+      sqlite3ExprCachePinRegister(pParse, p->iReg);
+      return p->iReg;
+    }
+  }  
+  assert( v!=0 );
+  sqlite3ExprCodeGetColumnOfTable(v, pTab, iTable, iColumn, iReg);
+  sqlite3ExprCacheStore(pParse, iTable, iColumn, iReg);
+  return iReg;
+}
+
+/*
+** Clear all column cache entries.
+*/
+SQLITE_PRIVATE void sqlite3ExprCacheClear(Parse *pParse){
+  int i;
+  struct yColCache *p;
+
+  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
+    if( p->iReg ){
+      cacheEntryClear(pParse, p);
+      p->iReg = 0;
+    }
+  }
+}
+
+/*
+** Record the fact that an affinity change has occurred on iCount
+** registers starting with iStart.
+*/
+SQLITE_PRIVATE void sqlite3ExprCacheAffinityChange(Parse *pParse, int iStart, int iCount){
+  sqlite3ExprCacheRemove(pParse, iStart, iCount);
+}
+
+/*
+** Generate code to move content from registers iFrom...iFrom+nReg-1
+** over to iTo..iTo+nReg-1. Keep the column cache up-to-date.
+*/
+SQLITE_PRIVATE void sqlite3ExprCodeMove(Parse *pParse, int iFrom, int iTo, int nReg){
+  int i;
+  struct yColCache *p;
+  if( NEVER(iFrom==iTo) ) return;
+  sqlite3VdbeAddOp3(pParse->pVdbe, OP_Move, iFrom, iTo, nReg);
+  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
+    int x = p->iReg;
+    if( x>=iFrom && x<iFrom+nReg ){
+      p->iReg += iTo-iFrom;
+    }
+  }
+}
+
+/*
+** Generate code to copy content from registers iFrom...iFrom+nReg-1
+** over to iTo..iTo+nReg-1.
+*/
+SQLITE_PRIVATE void sqlite3ExprCodeCopy(Parse *pParse, int iFrom, int iTo, int nReg){
+  int i;
+  if( NEVER(iFrom==iTo) ) return;
+  for(i=0; i<nReg; i++){
+    sqlite3VdbeAddOp2(pParse->pVdbe, OP_Copy, iFrom+i, iTo+i);
+  }
+}
+
+#if defined(SQLITE_DEBUG) || defined(SQLITE_COVERAGE_TEST)
+/*
+** Return true if any register in the range iFrom..iTo (inclusive)
+** is used as part of the column cache.
+**
+** This routine is used within assert() and testcase() macros only
+** and does not appear in a normal build.
+*/
+static int usedAsColumnCache(Parse *pParse, int iFrom, int iTo){
+  int i;
+  struct yColCache *p;
+  for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
+    int r = p->iReg;
+    if( r>=iFrom && r<=iTo ) return 1;    /*NO_TEST*/
+  }
+  return 0;
+}
+#endif /* SQLITE_DEBUG || SQLITE_COVERAGE_TEST */
+
+/*
+** Generate code into the current Vdbe to evaluate the given
+** expression.  Attempt to store the results in register "target".
+** Return the register where results are stored.
+**
+** With this routine, there is no guarantee that results will
+** be stored in target.  The result might be stored in some other
+** register if it is convenient to do so.  The calling function
+** must check the return code and move the results to the desired
+** register.
+*/
+SQLITE_PRIVATE int sqlite3ExprCodeTarget(Parse *pParse, Expr *pExpr, int target){
+  Vdbe *v = pParse->pVdbe;  /* The VM under construction */
+  int op;                   /* The opcode being coded */
+  int inReg = target;       /* Results stored in register inReg */
+  int regFree1 = 0;         /* If non-zero free this temporary register */
+  int regFree2 = 0;         /* If non-zero free this temporary register */
+  int r1, r2, r3, r4;       /* Various register numbers */
+  sqlite3 *db = pParse->db; /* The database connection */
+
+  assert( target>0 && target<=pParse->nMem );
+  if( v==0 ){
+    assert( pParse->db->mallocFailed );
+    return 0;
+  }
+
+  if( pExpr==0 ){
+    op = TK_NULL;
+  }else{
+    op = pExpr->op;
+  }
+  switch( op ){
+    case TK_AGG_COLUMN: {
+      AggInfo *pAggInfo = pExpr->pAggInfo;
+      struct AggInfo_col *pCol = &pAggInfo->aCol[pExpr->iAgg];
+      if( !pAggInfo->directMode ){
+        assert( pCol->iMem>0 );
+        inReg = pCol->iMem;
+        break;
+      }else if( pAggInfo->useSortingIdx ){
+        sqlite3VdbeAddOp3(v, OP_Column, pAggInfo->sortingIdx,
+                              pCol->iSorterColumn, target);
+        break;
+      }
+      /* Otherwise, fall thru into the TK_COLUMN case */
+    }
+    case TK_COLUMN: {
+      if( pExpr->iTable<0 ){
+        /* This only happens when coding check constraints */
+        assert( pParse->ckBase>0 );
+        inReg = pExpr->iColumn + pParse->ckBase;
+      }else{
+        inReg = sqlite3ExprCodeGetColumn(pParse, pExpr->pTab,
+                                 pExpr->iColumn, pExpr->iTable, target);
+      }
+      break;
+    }
+    case TK_INTEGER: {
+      codeInteger(pParse, pExpr, 0, target);
+      break;
+    }
+#ifndef SQLITE_OMIT_FLOATING_POINT
+    case TK_FLOAT: {
+      assert( !ExprHasProperty(pExpr, EP_IntValue) );
+      codeReal(v, pExpr->u.zToken, 0, target);
+      break;
+    }
+#endif
+    case TK_STRING: {
+      assert( !ExprHasProperty(pExpr, EP_IntValue) );
+      sqlite3VdbeAddOp4(v, OP_String8, 0, target, 0, pExpr->u.zToken, 0);
+      break;
+    }
+    case TK_NULL: {
+      sqlite3VdbeAddOp2(v, OP_Null, 0, target);
+      break;
+    }
+#ifndef SQLITE_OMIT_BLOB_LITERAL
+    case TK_BLOB: {
+      int n;
+      const char *z;
+      char *zBlob;
+      assert( !ExprHasProperty(pExpr, EP_IntValue) );
+      assert( pExpr->u.zToken[0]=='x' || pExpr->u.zToken[0]=='X' );
+      assert( pExpr->u.zToken[1]=='\'' );
+      z = &pExpr->u.zToken[2];
+      n = sqlite3Strlen30(z) - 1;
+      assert( z[n]=='\'' );
+      zBlob = sqlite3HexToBlob(sqlite3VdbeDb(v), z, n);
+      sqlite3VdbeAddOp4(v, OP_Blob, n/2, target, 0, zBlob, P4_DYNAMIC);
+      break;
+    }
+#endif
+    case TK_VARIABLE: {
+      assert( !ExprHasProperty(pExpr, EP_IntValue) );
+      assert( pExpr->u.zToken!=0 );
+      assert( pExpr->u.zToken[0]!=0 );
+      sqlite3VdbeAddOp2(v, OP_Variable, pExpr->iColumn, target);
+      if( pExpr->u.zToken[1]!=0 ){
+        sqlite3VdbeChangeP4(v, -1, pExpr->u.zToken, P4_TRANSIENT);
+      }
+      break;
+    }
+    case TK_REGISTER: {
+      inReg = pExpr->iTable;
+      break;
+    }
+    case TK_AS: {
+      inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target);
+      break;
+    }
+#ifndef SQLITE_OMIT_CAST
+    case TK_CAST: {
+      /* Expressions of the form:   CAST(pLeft AS token) */
+      int aff, to_op;
+      inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target);
+      assert( !ExprHasProperty(pExpr, EP_IntValue) );
+      aff = sqlite3AffinityType(pExpr->u.zToken);
+      to_op = aff - SQLITE_AFF_TEXT + OP_ToText;
+      assert( to_op==OP_ToText    || aff!=SQLITE_AFF_TEXT    );
+      assert( to_op==OP_ToBlob    || aff!=SQLITE_AFF_NONE    );
+      assert( to_op==OP_ToNumeric || aff!=SQLITE_AFF_NUMERIC );
+      assert( to_op==OP_ToInt     || aff!=SQLITE_AFF_INTEGER );
+      assert( to_op==OP_ToReal    || aff!=SQLITE_AFF_REAL    );
+      testcase( to_op==OP_ToText );
+      testcase( to_op==OP_ToBlob );
+      testcase( to_op==OP_ToNumeric );
+      testcase( to_op==OP_ToInt );
+      testcase( to_op==OP_ToReal );
+      if( inReg!=target ){
+        sqlite3VdbeAddOp2(v, OP_SCopy, inReg, target);
+        inReg = target;
+      }
+      sqlite3VdbeAddOp1(v, to_op, inReg);
+      testcase( usedAsColumnCache(pParse, inReg, inReg) );
+      sqlite3ExprCacheAffinityChange(pParse, inReg, 1);
+      break;
+    }
+#endif /* SQLITE_OMIT_CAST */
+    case TK_LT:
+    case TK_LE:
+    case TK_GT:
+    case TK_GE:
+    case TK_NE:
+    case TK_EQ: {
+      assert( TK_LT==OP_Lt );
+      assert( TK_LE==OP_Le );
+      assert( TK_GT==OP_Gt );
+      assert( TK_GE==OP_Ge );
+      assert( TK_EQ==OP_Eq );
+      assert( TK_NE==OP_Ne );
+      testcase( op==TK_LT );
+      testcase( op==TK_LE );
+      testcase( op==TK_GT );
+      testcase( op==TK_GE );
+      testcase( op==TK_EQ );
+      testcase( op==TK_NE );
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
+      r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
+      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
+                  r1, r2, inReg, SQLITE_STOREP2);
+      testcase( regFree1==0 );
+      testcase( regFree2==0 );
+      break;
+    }
+    case TK_IS:
+    case TK_ISNOT: {
+      testcase( op==TK_IS );
+      testcase( op==TK_ISNOT );
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
+      r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
+      op = (op==TK_IS) ? TK_EQ : TK_NE;
+      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
+                  r1, r2, inReg, SQLITE_STOREP2 | SQLITE_NULLEQ);
+      testcase( regFree1==0 );
+      testcase( regFree2==0 );
+      break;
+    }
+    case TK_AND:
+    case TK_OR:
+    case TK_PLUS:
+    case TK_STAR:
+    case TK_MINUS:
+    case TK_REM:
+    case TK_BITAND:
+    case TK_BITOR:
+    case TK_SLASH:
+    case TK_LSHIFT:
+    case TK_RSHIFT: 
+    case TK_CONCAT: {
+      assert( TK_AND==OP_And );
+      assert( TK_OR==OP_Or );
+      assert( TK_PLUS==OP_Add );
+      assert( TK_MINUS==OP_Subtract );
+      assert( TK_REM==OP_Remainder );
+      assert( TK_BITAND==OP_BitAnd );
+      assert( TK_BITOR==OP_BitOr );
+      assert( TK_SLASH==OP_Divide );
+      assert( TK_LSHIFT==OP_ShiftLeft );
+      assert( TK_RSHIFT==OP_ShiftRight );
+      assert( TK_CONCAT==OP_Concat );
+      testcase( op==TK_AND );
+      testcase( op==TK_OR );
+      testcase( op==TK_PLUS );
+      testcase( op==TK_MINUS );
+      testcase( op==TK_REM );
+      testcase( op==TK_BITAND );
+      testcase( op==TK_BITOR );
+      testcase( op==TK_SLASH );
+      testcase( op==TK_LSHIFT );
+      testcase( op==TK_RSHIFT );
+      testcase( op==TK_CONCAT );
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
+      r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
+      sqlite3VdbeAddOp3(v, op, r2, r1, target);
+      testcase( regFree1==0 );
+      testcase( regFree2==0 );
+      break;
+    }
+    case TK_UMINUS: {
+      Expr *pLeft = pExpr->pLeft;
+      assert( pLeft );
+      if( pLeft->op==TK_INTEGER ){
+        codeInteger(pParse, pLeft, 1, target);
+#ifndef SQLITE_OMIT_FLOATING_POINT
+      }else if( pLeft->op==TK_FLOAT ){
+        assert( !ExprHasProperty(pExpr, EP_IntValue) );
+        codeReal(v, pLeft->u.zToken, 1, target);
+#endif
+      }else{
+        regFree1 = r1 = sqlite3GetTempReg(pParse);
+        sqlite3VdbeAddOp2(v, OP_Integer, 0, r1);
+        r2 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree2);
+        sqlite3VdbeAddOp3(v, OP_Subtract, r2, r1, target);
+        testcase( regFree2==0 );
+      }
+      inReg = target;
+      break;
+    }
+    case TK_BITNOT:
+    case TK_NOT: {
+      assert( TK_BITNOT==OP_BitNot );
+      assert( TK_NOT==OP_Not );
+      testcase( op==TK_BITNOT );
+      testcase( op==TK_NOT );
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
+      testcase( regFree1==0 );
+      inReg = target;
+      sqlite3VdbeAddOp2(v, op, r1, inReg);
+      break;
+    }
+    case TK_ISNULL:
+    case TK_NOTNULL: {
+      int addr;
+      assert( TK_ISNULL==OP_IsNull );
+      assert( TK_NOTNULL==OP_NotNull );
+      testcase( op==TK_ISNULL );
+      testcase( op==TK_NOTNULL );
+      sqlite3VdbeAddOp2(v, OP_Integer, 1, target);
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
+      testcase( regFree1==0 );
+      addr = sqlite3VdbeAddOp1(v, op, r1);
+      sqlite3VdbeAddOp2(v, OP_AddImm, target, -1);
+      sqlite3VdbeJumpHere(v, addr);
+      break;
+    }
+    case TK_AGG_FUNCTION: {
+      AggInfo *pInfo = pExpr->pAggInfo;
+      if( pInfo==0 ){
+        assert( !ExprHasProperty(pExpr, EP_IntValue) );
+        sqlite3ErrorMsg(pParse, "misuse of aggregate: %s()", pExpr->u.zToken);
+      }else{
+        inReg = pInfo->aFunc[pExpr->iAgg].iMem;
+      }
+      break;
+    }
+    case TK_CONST_FUNC:
+    case TK_FUNCTION: {
+      ExprList *pFarg;       /* List of function arguments */
+      int nFarg;             /* Number of function arguments */
+      FuncDef *pDef;         /* The function definition object */
+      int nId;               /* Length of the function name in bytes */
+      const char *zId;       /* The function name */
+      int constMask = 0;     /* Mask of function arguments that are constant */
+      int i;                 /* Loop counter */
+      u8 enc = ENC(db);      /* The text encoding used by this database */
+      CollSeq *pColl = 0;    /* A collating sequence */
+
+      assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
+      testcase( op==TK_CONST_FUNC );
+      testcase( op==TK_FUNCTION );
+      if( ExprHasAnyProperty(pExpr, EP_TokenOnly) ){
+        pFarg = 0;
+      }else{
+        pFarg = pExpr->x.pList;
+      }
+      nFarg = pFarg ? pFarg->nExpr : 0;
+      assert( !ExprHasProperty(pExpr, EP_IntValue) );
+      zId = pExpr->u.zToken;
+      nId = sqlite3Strlen30(zId);
+      pDef = sqlite3FindFunction(db, zId, nId, nFarg, enc, 0);
+      if( pDef==0 ){
+        sqlite3ErrorMsg(pParse, "unknown function: %.*s()", nId, zId);
+        break;
+      }
+
+      /* Attempt a direct implementation of the built-in COALESCE() and
+      ** IFNULL() functions.  This avoids unnecessary evalation of
+      ** arguments past the first non-NULL argument.
+      */
+      if( pDef->flags & SQLITE_FUNC_COALESCE ){
+        int endCoalesce = sqlite3VdbeMakeLabel(v);
+        assert( nFarg>=2 );
+        sqlite3ExprCode(pParse, pFarg->a[0].pExpr, target);
+        for(i=1; i<nFarg; i++){
+          sqlite3VdbeAddOp2(v, OP_NotNull, target, endCoalesce);
+          sqlite3ExprCacheRemove(pParse, target, 1);
+          sqlite3ExprCachePush(pParse);
+          sqlite3ExprCode(pParse, pFarg->a[i].pExpr, target);
+          sqlite3ExprCachePop(pParse, 1);
+        }
+        sqlite3VdbeResolveLabel(v, endCoalesce);
+        break;
+      }
+
+
+      if( pFarg ){
+        r1 = sqlite3GetTempRange(pParse, nFarg);
+        sqlite3ExprCachePush(pParse);     /* Ticket 2ea2425d34be */
+        sqlite3ExprCodeExprList(pParse, pFarg, r1, 1);
+        sqlite3ExprCachePop(pParse, 1);   /* Ticket 2ea2425d34be */
+      }else{
+        r1 = 0;
+      }
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+      /* Possibly overload the function if the first argument is
+      ** a virtual table column.
+      **
+      ** For infix functions (LIKE, GLOB, REGEXP, and MATCH) use the
+      ** second argument, not the first, as the argument to test to
+      ** see if it is a column in a virtual table.  This is done because
+      ** the left operand of infix functions (the operand we want to
+      ** control overloading) ends up as the second argument to the
+      ** function.  The expression "A glob B" is equivalent to 
+      ** "glob(B,A).  We want to use the A in "A glob B" to test
+      ** for function overloading.  But we use the B term in "glob(B,A)".
+      */
+      if( nFarg>=2 && (pExpr->flags & EP_InfixFunc) ){
+        pDef = sqlite3VtabOverloadFunction(db, pDef, nFarg, pFarg->a[1].pExpr);
+      }else if( nFarg>0 ){
+        pDef = sqlite3VtabOverloadFunction(db, pDef, nFarg, pFarg->a[0].pExpr);
+      }
+#endif
+      for(i=0; i<nFarg; i++){
+        if( i<32 && sqlite3ExprIsConstant(pFarg->a[i].pExpr) ){
+          constMask |= (1<<i);
+        }
+        if( (pDef->flags & SQLITE_FUNC_NEEDCOLL)!=0 && !pColl ){
+          pColl = sqlite3ExprCollSeq(pParse, pFarg->a[i].pExpr);
+        }
+      }
+      if( pDef->flags & SQLITE_FUNC_NEEDCOLL ){
+        if( !pColl ) pColl = db->pDfltColl; 
+        sqlite3VdbeAddOp4(v, OP_CollSeq, 0, 0, 0, (char *)pColl, P4_COLLSEQ);
+      }
+      sqlite3VdbeAddOp4(v, OP_Function, constMask, r1, target,
+                        (char*)pDef, P4_FUNCDEF);
+      sqlite3VdbeChangeP5(v, (u8)nFarg);
+      if( nFarg ){
+        sqlite3ReleaseTempRange(pParse, r1, nFarg);
+      }
+      break;
+    }
+#ifndef SQLITE_OMIT_SUBQUERY
+    case TK_EXISTS:
+    case TK_SELECT: {
+      testcase( op==TK_EXISTS );
+      testcase( op==TK_SELECT );
+      inReg = sqlite3CodeSubselect(pParse, pExpr, 0, 0);
+      break;
+    }
+    case TK_IN: {
+      int destIfFalse = sqlite3VdbeMakeLabel(v);
+      int destIfNull = sqlite3VdbeMakeLabel(v);
+      sqlite3VdbeAddOp2(v, OP_Null, 0, target);
+      sqlite3ExprCodeIN(pParse, pExpr, destIfFalse, destIfNull);
+      sqlite3VdbeAddOp2(v, OP_Integer, 1, target);
+      sqlite3VdbeResolveLabel(v, destIfFalse);
+      sqlite3VdbeAddOp2(v, OP_AddImm, target, 0);
+      sqlite3VdbeResolveLabel(v, destIfNull);
+      break;
+    }
+#endif /* SQLITE_OMIT_SUBQUERY */
+
+
+    /*
+    **    x BETWEEN y AND z
+    **
+    ** This is equivalent to
+    **
+    **    x>=y AND x<=z
+    **
+    ** X is stored in pExpr->pLeft.
+    ** Y is stored in pExpr->pList->a[0].pExpr.
+    ** Z is stored in pExpr->pList->a[1].pExpr.
+    */
+    case TK_BETWEEN: {
+      Expr *pLeft = pExpr->pLeft;
+      struct ExprList_item *pLItem = pExpr->x.pList->a;
+      Expr *pRight = pLItem->pExpr;
+
+      r1 = sqlite3ExprCodeTemp(pParse, pLeft, &regFree1);
+      r2 = sqlite3ExprCodeTemp(pParse, pRight, &regFree2);
+      testcase( regFree1==0 );
+      testcase( regFree2==0 );
+      r3 = sqlite3GetTempReg(pParse);
+      r4 = sqlite3GetTempReg(pParse);
+      codeCompare(pParse, pLeft, pRight, OP_Ge,
+                  r1, r2, r3, SQLITE_STOREP2);
+      pLItem++;
+      pRight = pLItem->pExpr;
+      sqlite3ReleaseTempReg(pParse, regFree2);
+      r2 = sqlite3ExprCodeTemp(pParse, pRight, &regFree2);
+      testcase( regFree2==0 );
+      codeCompare(pParse, pLeft, pRight, OP_Le, r1, r2, r4, SQLITE_STOREP2);
+      sqlite3VdbeAddOp3(v, OP_And, r3, r4, target);
+      sqlite3ReleaseTempReg(pParse, r3);
+      sqlite3ReleaseTempReg(pParse, r4);
+      break;
+    }
+    case TK_UPLUS: {
+      inReg = sqlite3ExprCodeTarget(pParse, pExpr->pLeft, target);
+      break;
+    }
+
+    case TK_TRIGGER: {
+      /* If the opcode is TK_TRIGGER, then the expression is a reference
+      ** to a column in the new.* or old.* pseudo-tables available to
+      ** trigger programs. In this case Expr.iTable is set to 1 for the
+      ** new.* pseudo-table, or 0 for the old.* pseudo-table. Expr.iColumn
+      ** is set to the column of the pseudo-table to read, or to -1 to
+      ** read the rowid field.
+      **
+      ** The expression is implemented using an OP_Param opcode. The p1
+      ** parameter is set to 0 for an old.rowid reference, or to (i+1)
+      ** to reference another column of the old.* pseudo-table, where 
+      ** i is the index of the column. For a new.rowid reference, p1 is
+      ** set to (n+1), where n is the number of columns in each pseudo-table.
+      ** For a reference to any other column in the new.* pseudo-table, p1
+      ** is set to (n+2+i), where n and i are as defined previously. For
+      ** example, if the table on which triggers are being fired is
+      ** declared as:
+      **
+      **   CREATE TABLE t1(a, b);
+      **
+      ** Then p1 is interpreted as follows:
+      **
+      **   p1==0   ->    old.rowid     p1==3   ->    new.rowid
+      **   p1==1   ->    old.a         p1==4   ->    new.a
+      **   p1==2   ->    old.b         p1==5   ->    new.b       
+      */
+      Table *pTab = pExpr->pTab;
+      int p1 = pExpr->iTable * (pTab->nCol+1) + 1 + pExpr->iColumn;
+
+      assert( pExpr->iTable==0 || pExpr->iTable==1 );
+      assert( pExpr->iColumn>=-1 && pExpr->iColumn<pTab->nCol );
+      assert( pTab->iPKey<0 || pExpr->iColumn!=pTab->iPKey );
+      assert( p1>=0 && p1<(pTab->nCol*2+2) );
+
+      sqlite3VdbeAddOp2(v, OP_Param, p1, target);
+      VdbeComment((v, "%s.%s -> $%d",
+        (pExpr->iTable ? "new" : "old"),
+        (pExpr->iColumn<0 ? "rowid" : pExpr->pTab->aCol[pExpr->iColumn].zName),
+        target
+      ));
+
+#ifndef SQLITE_OMIT_FLOATING_POINT
+      /* If the column has REAL affinity, it may currently be stored as an
+      ** integer. Use OP_RealAffinity to make sure it is really real.  */
+      if( pExpr->iColumn>=0 
+       && pTab->aCol[pExpr->iColumn].affinity==SQLITE_AFF_REAL
+      ){
+        sqlite3VdbeAddOp1(v, OP_RealAffinity, target);
+      }
+#endif
+      break;
+    }
+
+
+    /*
+    ** Form A:
+    **   CASE x WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END
+    **
+    ** Form B:
+    **   CASE WHEN e1 THEN r1 WHEN e2 THEN r2 ... WHEN eN THEN rN ELSE y END
+    **
+    ** Form A is can be transformed into the equivalent form B as follows:
+    **   CASE WHEN x=e1 THEN r1 WHEN x=e2 THEN r2 ...
+    **        WHEN x=eN THEN rN ELSE y END
+    **
+    ** X (if it exists) is in pExpr->pLeft.
+    ** Y is in pExpr->pRight.  The Y is also optional.  If there is no
+    ** ELSE clause and no other term matches, then the result of the
+    ** exprssion is NULL.
+    ** Ei is in pExpr->pList->a[i*2] and Ri is pExpr->pList->a[i*2+1].
+    **
+    ** The result of the expression is the Ri for the first matching Ei,
+    ** or if there is no matching Ei, the ELSE term Y, or if there is
+    ** no ELSE term, NULL.
+    */
+    default: assert( op==TK_CASE ); {
+      int endLabel;                     /* GOTO label for end of CASE stmt */
+      int nextCase;                     /* GOTO label for next WHEN clause */
+      int nExpr;                        /* 2x number of WHEN terms */
+      int i;                            /* Loop counter */
+      ExprList *pEList;                 /* List of WHEN terms */
+      struct ExprList_item *aListelem;  /* Array of WHEN terms */
+      Expr opCompare;                   /* The X==Ei expression */
+      Expr cacheX;                      /* Cached expression X */
+      Expr *pX;                         /* The X expression */
+      Expr *pTest = 0;                  /* X==Ei (form A) or just Ei (form B) */
+      VVA_ONLY( int iCacheLevel = pParse->iCacheLevel; )
+
+      assert( !ExprHasProperty(pExpr, EP_xIsSelect) && pExpr->x.pList );
+      assert((pExpr->x.pList->nExpr % 2) == 0);
+      assert(pExpr->x.pList->nExpr > 0);
+      pEList = pExpr->x.pList;
+      aListelem = pEList->a;
+      nExpr = pEList->nExpr;
+      endLabel = sqlite3VdbeMakeLabel(v);
+      if( (pX = pExpr->pLeft)!=0 ){
+        cacheX = *pX;
+        testcase( pX->op==TK_COLUMN );
+        testcase( pX->op==TK_REGISTER );
+        cacheX.iTable = sqlite3ExprCodeTemp(pParse, pX, &regFree1);
+        testcase( regFree1==0 );
+        cacheX.op = TK_REGISTER;
+        opCompare.op = TK_EQ;
+        opCompare.pLeft = &cacheX;
+        pTest = &opCompare;
+        /* Ticket b351d95f9cd5ef17e9d9dbae18f5ca8611190001:
+        ** The value in regFree1 might get SCopy-ed into the file result.
+        ** So make sure that the regFree1 register is not reused for other
+        ** purposes and possibly overwritten.  */
+        regFree1 = 0;
+      }
+      for(i=0; i<nExpr; i=i+2){
+        sqlite3ExprCachePush(pParse);
+        if( pX ){
+          assert( pTest!=0 );
+          opCompare.pRight = aListelem[i].pExpr;
+        }else{
+          pTest = aListelem[i].pExpr;
+        }
+        nextCase = sqlite3VdbeMakeLabel(v);
+        testcase( pTest->op==TK_COLUMN );
+        sqlite3ExprIfFalse(pParse, pTest, nextCase, SQLITE_JUMPIFNULL);
+        testcase( aListelem[i+1].pExpr->op==TK_COLUMN );
+        testcase( aListelem[i+1].pExpr->op==TK_REGISTER );
+        sqlite3ExprCode(pParse, aListelem[i+1].pExpr, target);
+        sqlite3VdbeAddOp2(v, OP_Goto, 0, endLabel);
+        sqlite3ExprCachePop(pParse, 1);
+        sqlite3VdbeResolveLabel(v, nextCase);
+      }
+      if( pExpr->pRight ){
+        sqlite3ExprCachePush(pParse);
+        sqlite3ExprCode(pParse, pExpr->pRight, target);
+        sqlite3ExprCachePop(pParse, 1);
+      }else{
+        sqlite3VdbeAddOp2(v, OP_Null, 0, target);
+      }
+      assert( db->mallocFailed || pParse->nErr>0 
+           || pParse->iCacheLevel==iCacheLevel );
+      sqlite3VdbeResolveLabel(v, endLabel);
+      break;
+    }
+#ifndef SQLITE_OMIT_TRIGGER
+    case TK_RAISE: {
+      assert( pExpr->affinity==OE_Rollback 
+           || pExpr->affinity==OE_Abort
+           || pExpr->affinity==OE_Fail
+           || pExpr->affinity==OE_Ignore
+      );
+      if( !pParse->pTriggerTab ){
+        sqlite3ErrorMsg(pParse,
+                       "RAISE() may only be used within a trigger-program");
+        return 0;
+      }
+      if( pExpr->affinity==OE_Abort ){
+        sqlite3MayAbort(pParse);
+      }
+      assert( !ExprHasProperty(pExpr, EP_IntValue) );
+      if( pExpr->affinity==OE_Ignore ){
+        sqlite3VdbeAddOp4(
+            v, OP_Halt, SQLITE_OK, OE_Ignore, 0, pExpr->u.zToken,0);
+      }else{
+        sqlite3HaltConstraint(pParse, pExpr->affinity, pExpr->u.zToken, 0);
+      }
+
+      break;
+    }
+#endif
+  }
+  sqlite3ReleaseTempReg(pParse, regFree1);
+  sqlite3ReleaseTempReg(pParse, regFree2);
+  return inReg;
+}
+
+/*
+** Generate code to evaluate an expression and store the results
+** into a register.  Return the register number where the results
+** are stored.
+**
+** If the register is a temporary register that can be deallocated,
+** then write its number into *pReg.  If the result register is not
+** a temporary, then set *pReg to zero.
+*/
+SQLITE_PRIVATE int sqlite3ExprCodeTemp(Parse *pParse, Expr *pExpr, int *pReg){
+  int r1 = sqlite3GetTempReg(pParse);
+  int r2 = sqlite3ExprCodeTarget(pParse, pExpr, r1);
+  if( r2==r1 ){
+    *pReg = r1;
+  }else{
+    sqlite3ReleaseTempReg(pParse, r1);
+    *pReg = 0;
+  }
+  return r2;
+}
+
+/*
+** Generate code that will evaluate expression pExpr and store the
+** results in register target.  The results are guaranteed to appear
+** in register target.
+*/
+SQLITE_PRIVATE int sqlite3ExprCode(Parse *pParse, Expr *pExpr, int target){
+  int inReg;
+
+  assert( target>0 && target<=pParse->nMem );
+  if( pExpr && pExpr->op==TK_REGISTER ){
+    sqlite3VdbeAddOp2(pParse->pVdbe, OP_Copy, pExpr->iTable, target);
+  }else{
+    inReg = sqlite3ExprCodeTarget(pParse, pExpr, target);
+    assert( pParse->pVdbe || pParse->db->mallocFailed );
+    if( inReg!=target && pParse->pVdbe ){
+      sqlite3VdbeAddOp2(pParse->pVdbe, OP_SCopy, inReg, target);
+    }
+  }
+  return target;
+}
+
+/*
+** Generate code that evalutes the given expression and puts the result
+** in register target.
+**
+** Also make a copy of the expression results into another "cache" register
+** and modify the expression so that the next time it is evaluated,
+** the result is a copy of the cache register.
+**
+** This routine is used for expressions that are used multiple 
+** times.  They are evaluated once and the results of the expression
+** are reused.
+*/
+SQLITE_PRIVATE int sqlite3ExprCodeAndCache(Parse *pParse, Expr *pExpr, int target){
+  Vdbe *v = pParse->pVdbe;
+  int inReg;
+  inReg = sqlite3ExprCode(pParse, pExpr, target);
+  assert( target>0 );
+  /* This routine is called for terms to INSERT or UPDATE.  And the only
+  ** other place where expressions can be converted into TK_REGISTER is
+  ** in WHERE clause processing.  So as currently implemented, there is
+  ** no way for a TK_REGISTER to exist here.  But it seems prudent to
+  ** keep the ALWAYS() in case the conditions above change with future
+  ** modifications or enhancements. */
+  if( ALWAYS(pExpr->op!=TK_REGISTER) ){  
+    int iMem;
+    iMem = ++pParse->nMem;
+    sqlite3VdbeAddOp2(v, OP_Copy, inReg, iMem);
+    pExpr->iTable = iMem;
+    pExpr->op2 = pExpr->op;
+    pExpr->op = TK_REGISTER;
+  }
+  return inReg;
+}
+
+/*
+** Return TRUE if pExpr is an constant expression that is appropriate
+** for factoring out of a loop.  Appropriate expressions are:
+**
+**    *  Any expression that evaluates to two or more opcodes.
+**
+**    *  Any OP_Integer, OP_Real, OP_String, OP_Blob, OP_Null, 
+**       or OP_Variable that does not need to be placed in a 
+**       specific register.
+**
+** There is no point in factoring out single-instruction constant
+** expressions that need to be placed in a particular register.  
+** We could factor them out, but then we would end up adding an
+** OP_SCopy instruction to move the value into the correct register
+** later.  We might as well just use the original instruction and
+** avoid the OP_SCopy.
+*/
+static int isAppropriateForFactoring(Expr *p){
+  if( !sqlite3ExprIsConstantNotJoin(p) ){
+    return 0;  /* Only constant expressions are appropriate for factoring */
+  }
+  if( (p->flags & EP_FixedDest)==0 ){
+    return 1;  /* Any constant without a fixed destination is appropriate */
+  }
+  while( p->op==TK_UPLUS ) p = p->pLeft;
+  switch( p->op ){
+#ifndef SQLITE_OMIT_BLOB_LITERAL
+    case TK_BLOB:
+#endif
+    case TK_VARIABLE:
+    case TK_INTEGER:
+    case TK_FLOAT:
+    case TK_NULL:
+    case TK_STRING: {
+      testcase( p->op==TK_BLOB );
+      testcase( p->op==TK_VARIABLE );
+      testcase( p->op==TK_INTEGER );
+      testcase( p->op==TK_FLOAT );
+      testcase( p->op==TK_NULL );
+      testcase( p->op==TK_STRING );
+      /* Single-instruction constants with a fixed destination are
+      ** better done in-line.  If we factor them, they will just end
+      ** up generating an OP_SCopy to move the value to the destination
+      ** register. */
+      return 0;
+    }
+    case TK_UMINUS: {
+      if( p->pLeft->op==TK_FLOAT || p->pLeft->op==TK_INTEGER ){
+        return 0;
+      }
+      break;
+    }
+    default: {
+      break;
+    }
+  }
+  return 1;
+}
+
+/*
+** If pExpr is a constant expression that is appropriate for
+** factoring out of a loop, then evaluate the expression
+** into a register and convert the expression into a TK_REGISTER
+** expression.
+*/
+static int evalConstExpr(Walker *pWalker, Expr *pExpr){
+  Parse *pParse = pWalker->pParse;
+  switch( pExpr->op ){
+    case TK_IN:
+    case TK_REGISTER: {
+      return WRC_Prune;
+    }
+    case TK_FUNCTION:
+    case TK_AGG_FUNCTION:
+    case TK_CONST_FUNC: {
+      /* The arguments to a function have a fixed destination.
+      ** Mark them this way to avoid generated unneeded OP_SCopy
+      ** instructions. 
+      */
+      ExprList *pList = pExpr->x.pList;
+      assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
+      if( pList ){
+        int i = pList->nExpr;
+        struct ExprList_item *pItem = pList->a;
+        for(; i>0; i--, pItem++){
+          if( ALWAYS(pItem->pExpr) ) pItem->pExpr->flags |= EP_FixedDest;
+        }
+      }
+      break;
+    }
+  }
+  if( isAppropriateForFactoring(pExpr) ){
+    int r1 = ++pParse->nMem;
+    int r2;
+    r2 = sqlite3ExprCodeTarget(pParse, pExpr, r1);
+    if( NEVER(r1!=r2) ) sqlite3ReleaseTempReg(pParse, r1);
+    pExpr->op2 = pExpr->op;
+    pExpr->op = TK_REGISTER;
+    pExpr->iTable = r2;
+    return WRC_Prune;
+  }
+  return WRC_Continue;
+}
+
+/*
+** Preevaluate constant subexpressions within pExpr and store the
+** results in registers.  Modify pExpr so that the constant subexpresions
+** are TK_REGISTER opcodes that refer to the precomputed values.
+**
+** This routine is a no-op if the jump to the cookie-check code has
+** already occur.  Since the cookie-check jump is generated prior to
+** any other serious processing, this check ensures that there is no
+** way to accidently bypass the constant initializations.
+**
+** This routine is also a no-op if the SQLITE_FactorOutConst optimization
+** is disabled via the sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS)
+** interface.  This allows test logic to verify that the same answer is
+** obtained for queries regardless of whether or not constants are
+** precomputed into registers or if they are inserted in-line.
+*/
+SQLITE_PRIVATE void sqlite3ExprCodeConstants(Parse *pParse, Expr *pExpr){
+  Walker w;
+  if( pParse->cookieGoto ) return;
+  if( (pParse->db->flags & SQLITE_FactorOutConst)!=0 ) return;
+  w.xExprCallback = evalConstExpr;
+  w.xSelectCallback = 0;
+  w.pParse = pParse;
+  sqlite3WalkExpr(&w, pExpr);
+}
+
+
+/*
+** Generate code that pushes the value of every element of the given
+** expression list into a sequence of registers beginning at target.
+**
+** Return the number of elements evaluated.
+*/
+SQLITE_PRIVATE int sqlite3ExprCodeExprList(
+  Parse *pParse,     /* Parsing context */
+  ExprList *pList,   /* The expression list to be coded */
+  int target,        /* Where to write results */
+  int doHardCopy     /* Make a hard copy of every element */
+){
+  struct ExprList_item *pItem;
+  int i, n;
+  assert( pList!=0 );
+  assert( target>0 );
+  assert( pParse->pVdbe!=0 );  /* Never gets this far otherwise */
+  n = pList->nExpr;
+  for(pItem=pList->a, i=0; i<n; i++, pItem++){
+    Expr *pExpr = pItem->pExpr;
+    int inReg = sqlite3ExprCodeTarget(pParse, pExpr, target+i);
+    if( inReg!=target+i ){
+      sqlite3VdbeAddOp2(pParse->pVdbe, doHardCopy ? OP_Copy : OP_SCopy,
+                        inReg, target+i);
+    }
+  }
+  return n;
+}
+
+/*
+** Generate code for a BETWEEN operator.
+**
+**    x BETWEEN y AND z
+**
+** The above is equivalent to 
+**
+**    x>=y AND x<=z
+**
+** Code it as such, taking care to do the common subexpression
+** elementation of x.
+*/
+static void exprCodeBetween(
+  Parse *pParse,    /* Parsing and code generating context */
+  Expr *pExpr,      /* The BETWEEN expression */
+  int dest,         /* Jump here if the jump is taken */
+  int jumpIfTrue,   /* Take the jump if the BETWEEN is true */
+  int jumpIfNull    /* Take the jump if the BETWEEN is NULL */
+){
+  Expr exprAnd;     /* The AND operator in  x>=y AND x<=z  */
+  Expr compLeft;    /* The  x>=y  term */
+  Expr compRight;   /* The  x<=z  term */
+  Expr exprX;       /* The  x  subexpression */
+  int regFree1 = 0; /* Temporary use register */
+
+  assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
+  exprX = *pExpr->pLeft;
+  exprAnd.op = TK_AND;
+  exprAnd.pLeft = &compLeft;
+  exprAnd.pRight = &compRight;
+  compLeft.op = TK_GE;
+  compLeft.pLeft = &exprX;
+  compLeft.pRight = pExpr->x.pList->a[0].pExpr;
+  compRight.op = TK_LE;
+  compRight.pLeft = &exprX;
+  compRight.pRight = pExpr->x.pList->a[1].pExpr;
+  exprX.iTable = sqlite3ExprCodeTemp(pParse, &exprX, &regFree1);
+  exprX.op = TK_REGISTER;
+  if( jumpIfTrue ){
+    sqlite3ExprIfTrue(pParse, &exprAnd, dest, jumpIfNull);
+  }else{
+    sqlite3ExprIfFalse(pParse, &exprAnd, dest, jumpIfNull);
+  }
+  sqlite3ReleaseTempReg(pParse, regFree1);
+
+  /* Ensure adequate test coverage */
+  testcase( jumpIfTrue==0 && jumpIfNull==0 && regFree1==0 );
+  testcase( jumpIfTrue==0 && jumpIfNull==0 && regFree1!=0 );
+  testcase( jumpIfTrue==0 && jumpIfNull!=0 && regFree1==0 );
+  testcase( jumpIfTrue==0 && jumpIfNull!=0 && regFree1!=0 );
+  testcase( jumpIfTrue!=0 && jumpIfNull==0 && regFree1==0 );
+  testcase( jumpIfTrue!=0 && jumpIfNull==0 && regFree1!=0 );
+  testcase( jumpIfTrue!=0 && jumpIfNull!=0 && regFree1==0 );
+  testcase( jumpIfTrue!=0 && jumpIfNull!=0 && regFree1!=0 );
+}
+
+/*
+** Generate code for a boolean expression such that a jump is made
+** to the label "dest" if the expression is true but execution
+** continues straight thru if the expression is false.
+**
+** If the expression evaluates to NULL (neither true nor false), then
+** take the jump if the jumpIfNull flag is SQLITE_JUMPIFNULL.
+**
+** This code depends on the fact that certain token values (ex: TK_EQ)
+** are the same as opcode values (ex: OP_Eq) that implement the corresponding
+** operation.  Special comments in vdbe.c and the mkopcodeh.awk script in
+** the make process cause these values to align.  Assert()s in the code
+** below verify that the numbers are aligned correctly.
+*/
+SQLITE_PRIVATE void sqlite3ExprIfTrue(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
+  Vdbe *v = pParse->pVdbe;
+  int op = 0;
+  int regFree1 = 0;
+  int regFree2 = 0;
+  int r1, r2;
+
+  assert( jumpIfNull==SQLITE_JUMPIFNULL || jumpIfNull==0 );
+  if( NEVER(v==0) )     return;  /* Existance of VDBE checked by caller */
+  if( NEVER(pExpr==0) ) return;  /* No way this can happen */
+  op = pExpr->op;
+  switch( op ){
+    case TK_AND: {
+      int d2 = sqlite3VdbeMakeLabel(v);
+      testcase( jumpIfNull==0 );
+      sqlite3ExprCachePush(pParse);
+      sqlite3ExprIfFalse(pParse, pExpr->pLeft, d2,jumpIfNull^SQLITE_JUMPIFNULL);
+      sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
+      sqlite3VdbeResolveLabel(v, d2);
+      sqlite3ExprCachePop(pParse, 1);
+      break;
+    }
+    case TK_OR: {
+      testcase( jumpIfNull==0 );
+      sqlite3ExprIfTrue(pParse, pExpr->pLeft, dest, jumpIfNull);
+      sqlite3ExprIfTrue(pParse, pExpr->pRight, dest, jumpIfNull);
+      break;
+    }
+    case TK_NOT: {
+      testcase( jumpIfNull==0 );
+      sqlite3ExprIfFalse(pParse, pExpr->pLeft, dest, jumpIfNull);
+      break;
+    }
+    case TK_LT:
+    case TK_LE:
+    case TK_GT:
+    case TK_GE:
+    case TK_NE:
+    case TK_EQ: {
+      assert( TK_LT==OP_Lt );
+      assert( TK_LE==OP_Le );
+      assert( TK_GT==OP_Gt );
+      assert( TK_GE==OP_Ge );
+      assert( TK_EQ==OP_Eq );
+      assert( TK_NE==OP_Ne );
+      testcase( op==TK_LT );
+      testcase( op==TK_LE );
+      testcase( op==TK_GT );
+      testcase( op==TK_GE );
+      testcase( op==TK_EQ );
+      testcase( op==TK_NE );
+      testcase( jumpIfNull==0 );
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
+      r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
+      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
+                  r1, r2, dest, jumpIfNull);
+      testcase( regFree1==0 );
+      testcase( regFree2==0 );
+      break;
+    }
+    case TK_IS:
+    case TK_ISNOT: {
+      testcase( op==TK_IS );
+      testcase( op==TK_ISNOT );
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
+      r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
+      op = (op==TK_IS) ? TK_EQ : TK_NE;
+      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
+                  r1, r2, dest, SQLITE_NULLEQ);
+      testcase( regFree1==0 );
+      testcase( regFree2==0 );
+      break;
+    }
+    case TK_ISNULL:
+    case TK_NOTNULL: {
+      assert( TK_ISNULL==OP_IsNull );
+      assert( TK_NOTNULL==OP_NotNull );
+      testcase( op==TK_ISNULL );
+      testcase( op==TK_NOTNULL );
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
+      sqlite3VdbeAddOp2(v, op, r1, dest);
+      testcase( regFree1==0 );
+      break;
+    }
+    case TK_BETWEEN: {
+      testcase( jumpIfNull==0 );
+      exprCodeBetween(pParse, pExpr, dest, 1, jumpIfNull);
+      break;
+    }
+#ifndef SQLITE_OMIT_SUBQUERY
+    case TK_IN: {
+      int destIfFalse = sqlite3VdbeMakeLabel(v);
+      int destIfNull = jumpIfNull ? dest : destIfFalse;
+      sqlite3ExprCodeIN(pParse, pExpr, destIfFalse, destIfNull);
+      sqlite3VdbeAddOp2(v, OP_Goto, 0, dest);
+      sqlite3VdbeResolveLabel(v, destIfFalse);
+      break;
+    }
+#endif
+    default: {
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr, &regFree1);
+      sqlite3VdbeAddOp3(v, OP_If, r1, dest, jumpIfNull!=0);
+      testcase( regFree1==0 );
+      testcase( jumpIfNull==0 );
+      break;
+    }
+  }
+  sqlite3ReleaseTempReg(pParse, regFree1);
+  sqlite3ReleaseTempReg(pParse, regFree2);  
+}
+
+/*
+** Generate code for a boolean expression such that a jump is made
+** to the label "dest" if the expression is false but execution
+** continues straight thru if the expression is true.
+**
+** If the expression evaluates to NULL (neither true nor false) then
+** jump if jumpIfNull is SQLITE_JUMPIFNULL or fall through if jumpIfNull
+** is 0.
+*/
+SQLITE_PRIVATE void sqlite3ExprIfFalse(Parse *pParse, Expr *pExpr, int dest, int jumpIfNull){
+  Vdbe *v = pParse->pVdbe;
+  int op = 0;
+  int regFree1 = 0;
+  int regFree2 = 0;
+  int r1, r2;
+
+  assert( jumpIfNull==SQLITE_JUMPIFNULL || jumpIfNull==0 );
+  if( NEVER(v==0) ) return; /* Existance of VDBE checked by caller */
+  if( pExpr==0 )    return;
+
+  /* The value of pExpr->op and op are related as follows:
+  **
+  **       pExpr->op            op
+  **       ---------          ----------
+  **       TK_ISNULL          OP_NotNull
+  **       TK_NOTNULL         OP_IsNull
+  **       TK_NE              OP_Eq
+  **       TK_EQ              OP_Ne
+  **       TK_GT              OP_Le
+  **       TK_LE              OP_Gt
+  **       TK_GE              OP_Lt
+  **       TK_LT              OP_Ge
+  **
+  ** For other values of pExpr->op, op is undefined and unused.
+  ** The value of TK_ and OP_ constants are arranged such that we
+  ** can compute the mapping above using the following expression.
+  ** Assert()s verify that the computation is correct.
+  */
+  op = ((pExpr->op+(TK_ISNULL&1))^1)-(TK_ISNULL&1);
+
+  /* Verify correct alignment of TK_ and OP_ constants
+  */
+  assert( pExpr->op!=TK_ISNULL || op==OP_NotNull );
+  assert( pExpr->op!=TK_NOTNULL || op==OP_IsNull );
+  assert( pExpr->op!=TK_NE || op==OP_Eq );
+  assert( pExpr->op!=TK_EQ || op==OP_Ne );
+  assert( pExpr->op!=TK_LT || op==OP_Ge );
+  assert( pExpr->op!=TK_LE || op==OP_Gt );
+  assert( pExpr->op!=TK_GT || op==OP_Le );
+  assert( pExpr->op!=TK_GE || op==OP_Lt );
+
+  switch( pExpr->op ){
+    case TK_AND: {
+      testcase( jumpIfNull==0 );
+      sqlite3ExprIfFalse(pParse, pExpr->pLeft, dest, jumpIfNull);
+      sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
+      break;
+    }
+    case TK_OR: {
+      int d2 = sqlite3VdbeMakeLabel(v);
+      testcase( jumpIfNull==0 );
+      sqlite3ExprCachePush(pParse);
+      sqlite3ExprIfTrue(pParse, pExpr->pLeft, d2, jumpIfNull^SQLITE_JUMPIFNULL);
+      sqlite3ExprIfFalse(pParse, pExpr->pRight, dest, jumpIfNull);
+      sqlite3VdbeResolveLabel(v, d2);
+      sqlite3ExprCachePop(pParse, 1);
+      break;
+    }
+    case TK_NOT: {
+      testcase( jumpIfNull==0 );
+      sqlite3ExprIfTrue(pParse, pExpr->pLeft, dest, jumpIfNull);
+      break;
+    }
+    case TK_LT:
+    case TK_LE:
+    case TK_GT:
+    case TK_GE:
+    case TK_NE:
+    case TK_EQ: {
+      testcase( op==TK_LT );
+      testcase( op==TK_LE );
+      testcase( op==TK_GT );
+      testcase( op==TK_GE );
+      testcase( op==TK_EQ );
+      testcase( op==TK_NE );
+      testcase( jumpIfNull==0 );
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
+      r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
+      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
+                  r1, r2, dest, jumpIfNull);
+      testcase( regFree1==0 );
+      testcase( regFree2==0 );
+      break;
+    }
+    case TK_IS:
+    case TK_ISNOT: {
+      testcase( pExpr->op==TK_IS );
+      testcase( pExpr->op==TK_ISNOT );
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
+      r2 = sqlite3ExprCodeTemp(pParse, pExpr->pRight, &regFree2);
+      op = (pExpr->op==TK_IS) ? TK_NE : TK_EQ;
+      codeCompare(pParse, pExpr->pLeft, pExpr->pRight, op,
+                  r1, r2, dest, SQLITE_NULLEQ);
+      testcase( regFree1==0 );
+      testcase( regFree2==0 );
+      break;
+    }
+    case TK_ISNULL:
+    case TK_NOTNULL: {
+      testcase( op==TK_ISNULL );
+      testcase( op==TK_NOTNULL );
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr->pLeft, &regFree1);
+      sqlite3VdbeAddOp2(v, op, r1, dest);
+      testcase( regFree1==0 );
+      break;
+    }
+    case TK_BETWEEN: {
+      testcase( jumpIfNull==0 );
+      exprCodeBetween(pParse, pExpr, dest, 0, jumpIfNull);
+      break;
+    }
+#ifndef SQLITE_OMIT_SUBQUERY
+    case TK_IN: {
+      if( jumpIfNull ){
+        sqlite3ExprCodeIN(pParse, pExpr, dest, dest);
+      }else{
+        int destIfNull = sqlite3VdbeMakeLabel(v);
+        sqlite3ExprCodeIN(pParse, pExpr, dest, destIfNull);
+        sqlite3VdbeResolveLabel(v, destIfNull);
+      }
+      break;
+    }
+#endif
+    default: {
+      r1 = sqlite3ExprCodeTemp(pParse, pExpr, &regFree1);
+      sqlite3VdbeAddOp3(v, OP_IfNot, r1, dest, jumpIfNull!=0);
+      testcase( regFree1==0 );
+      testcase( jumpIfNull==0 );
+      break;
+    }
+  }
+  sqlite3ReleaseTempReg(pParse, regFree1);
+  sqlite3ReleaseTempReg(pParse, regFree2);
+}
+
+/*
+** Do a deep comparison of two expression trees.  Return 0 if the two
+** expressions are completely identical.  Return 1 if they differ only
+** by a COLLATE operator at the top level.  Return 2 if there are differences
+** other than the top-level COLLATE operator.
+**
+** Sometimes this routine will return 2 even if the two expressions
+** really are equivalent.  If we cannot prove that the expressions are
+** identical, we return 2 just to be safe.  So if this routine
+** returns 2, then you do not really know for certain if the two
+** expressions are the same.  But if you get a 0 or 1 return, then you
+** can be sure the expressions are the same.  In the places where
+** this routine is used, it does not hurt to get an extra 2 - that
+** just might result in some slightly slower code.  But returning
+** an incorrect 0 or 1 could lead to a malfunction.
+*/
+SQLITE_PRIVATE int sqlite3ExprCompare(Expr *pA, Expr *pB){
+  if( pA==0||pB==0 ){
+    return pB==pA ? 0 : 2;
+  }
+  assert( !ExprHasAnyProperty(pA, EP_TokenOnly|EP_Reduced) );
+  assert( !ExprHasAnyProperty(pB, EP_TokenOnly|EP_Reduced) );
+  if( ExprHasProperty(pA, EP_xIsSelect) || ExprHasProperty(pB, EP_xIsSelect) ){
+    return 2;
+  }
+  if( (pA->flags & EP_Distinct)!=(pB->flags & EP_Distinct) ) return 2;
+  if( pA->op!=pB->op ) return 2;
+  if( sqlite3ExprCompare(pA->pLeft, pB->pLeft) ) return 2;
+  if( sqlite3ExprCompare(pA->pRight, pB->pRight) ) return 2;
+  if( sqlite3ExprListCompare(pA->x.pList, pB->x.pList) ) return 2;
+  if( pA->iTable!=pB->iTable || pA->iColumn!=pB->iColumn ) return 2;
+  if( ExprHasProperty(pA, EP_IntValue) ){
+    if( !ExprHasProperty(pB, EP_IntValue) || pA->u.iValue!=pB->u.iValue ){
+      return 2;
+    }
+  }else if( pA->op!=TK_COLUMN && pA->u.zToken ){
+    if( ExprHasProperty(pB, EP_IntValue) || NEVER(pB->u.zToken==0) ) return 2;
+    if( sqlite3StrICmp(pA->u.zToken,pB->u.zToken)!=0 ){
+      return 2;
+    }
+  }
+  if( (pA->flags & EP_ExpCollate)!=(pB->flags & EP_ExpCollate) ) return 1;
+  if( (pA->flags & EP_ExpCollate)!=0 && pA->pColl!=pB->pColl ) return 2;
+  return 0;
+}
+
+/*
+** Compare two ExprList objects.  Return 0 if they are identical and 
+** non-zero if they differ in any way.
+**
+** This routine might return non-zero for equivalent ExprLists.  The
+** only consequence will be disabled optimizations.  But this routine
+** must never return 0 if the two ExprList objects are different, or
+** a malfunction will result.
+**
+** Two NULL pointers are considered to be the same.  But a NULL pointer
+** always differs from a non-NULL pointer.
+*/
+SQLITE_PRIVATE int sqlite3ExprListCompare(ExprList *pA, ExprList *pB){
+  int i;
+  if( pA==0 && pB==0 ) return 0;
+  if( pA==0 || pB==0 ) return 1;
+  if( pA->nExpr!=pB->nExpr ) return 1;
+  for(i=0; i<pA->nExpr; i++){
+    Expr *pExprA = pA->a[i].pExpr;
+    Expr *pExprB = pB->a[i].pExpr;
+    if( pA->a[i].sortOrder!=pB->a[i].sortOrder ) return 1;
+    if( sqlite3ExprCompare(pExprA, pExprB) ) return 1;
+  }
+  return 0;
+}
+
+/*
+** Add a new element to the pAggInfo->aCol[] array.  Return the index of
+** the new element.  Return a negative number if malloc fails.
+*/
+static int addAggInfoColumn(sqlite3 *db, AggInfo *pInfo){
+  int i;
+  pInfo->aCol = sqlite3ArrayAllocate(
+       db,
+       pInfo->aCol,
+       sizeof(pInfo->aCol[0]),
+       3,
+       &pInfo->nColumn,
+       &pInfo->nColumnAlloc,
+       &i
+  );
+  return i;
+}    
+
+/*
+** Add a new element to the pAggInfo->aFunc[] array.  Return the index of
+** the new element.  Return a negative number if malloc fails.
+*/
+static int addAggInfoFunc(sqlite3 *db, AggInfo *pInfo){
+  int i;
+  pInfo->aFunc = sqlite3ArrayAllocate(
+       db, 
+       pInfo->aFunc,
+       sizeof(pInfo->aFunc[0]),
+       3,
+       &pInfo->nFunc,
+       &pInfo->nFuncAlloc,
+       &i
+  );
+  return i;
+}    
+
+/*
+** This is the xExprCallback for a tree walker.  It is used to
+** implement sqlite3ExprAnalyzeAggregates().  See sqlite3ExprAnalyzeAggregates
+** for additional information.
+*/
+static int analyzeAggregate(Walker *pWalker, Expr *pExpr){
+  int i;
+  NameContext *pNC = pWalker->u.pNC;
+  Parse *pParse = pNC->pParse;
+  SrcList *pSrcList = pNC->pSrcList;
+  AggInfo *pAggInfo = pNC->pAggInfo;
+
+  switch( pExpr->op ){
+    case TK_AGG_COLUMN:
+    case TK_COLUMN: {
+      testcase( pExpr->op==TK_AGG_COLUMN );
+      testcase( pExpr->op==TK_COLUMN );
+      /* Check to see if the column is in one of the tables in the FROM
+      ** clause of the aggregate query */
+      if( ALWAYS(pSrcList!=0) ){
+        struct SrcList_item *pItem = pSrcList->a;
+        for(i=0; i<pSrcList->nSrc; i++, pItem++){
+          struct AggInfo_col *pCol;
+          assert( !ExprHasAnyProperty(pExpr, EP_TokenOnly|EP_Reduced) );
+          if( pExpr->iTable==pItem->iCursor ){
+            /* If we reach this point, it means that pExpr refers to a table
+            ** that is in the FROM clause of the aggregate query.  
+            **
+            ** Make an entry for the column in pAggInfo->aCol[] if there
+            ** is not an entry there already.
+            */
+            int k;
+            pCol = pAggInfo->aCol;
+            for(k=0; k<pAggInfo->nColumn; k++, pCol++){
+              if( pCol->iTable==pExpr->iTable &&
+                  pCol->iColumn==pExpr->iColumn ){
+                break;
+              }
+            }
+            if( (k>=pAggInfo->nColumn)
+             && (k = addAggInfoColumn(pParse->db, pAggInfo))>=0 
+            ){
+              pCol = &pAggInfo->aCol[k];
+              pCol->pTab = pExpr->pTab;
+              pCol->iTable = pExpr->iTable;
+              pCol->iColumn = pExpr->iColumn;
+              pCol->iMem = ++pParse->nMem;
+              pCol->iSorterColumn = -1;
+              pCol->pExpr = pExpr;
+              if( pAggInfo->pGroupBy ){
+                int j, n;
+                ExprList *pGB = pAggInfo->pGroupBy;
+                struct ExprList_item *pTerm = pGB->a;
+                n = pGB->nExpr;
+                for(j=0; j<n; j++, pTerm++){
+                  Expr *pE = pTerm->pExpr;
+                  if( pE->op==TK_COLUMN && pE->iTable==pExpr->iTable &&
+                      pE->iColumn==pExpr->iColumn ){
+                    pCol->iSorterColumn = j;
+                    break;
+                  }
+                }
+              }
+              if( pCol->iSorterColumn<0 ){
+                pCol->iSorterColumn = pAggInfo->nSortingColumn++;
+              }
+            }
+            /* There is now an entry for pExpr in pAggInfo->aCol[] (either
+            ** because it was there before or because we just created it).
+            ** Convert the pExpr to be a TK_AGG_COLUMN referring to that
+            ** pAggInfo->aCol[] entry.
+            */
+            ExprSetIrreducible(pExpr);
+            pExpr->pAggInfo = pAggInfo;
+            pExpr->op = TK_AGG_COLUMN;
+            pExpr->iAgg = (i16)k;
+            break;
+          } /* endif pExpr->iTable==pItem->iCursor */
+        } /* end loop over pSrcList */
+      }
+      return WRC_Prune;
+    }
+    case TK_AGG_FUNCTION: {
+      /* The pNC->nDepth==0 test causes aggregate functions in subqueries
+      ** to be ignored */
+      if( pNC->nDepth==0 ){
+        /* Check to see if pExpr is a duplicate of another aggregate 
+        ** function that is already in the pAggInfo structure
+        */
+        struct AggInfo_func *pItem = pAggInfo->aFunc;
+        for(i=0; i<pAggInfo->nFunc; i++, pItem++){
+          if( sqlite3ExprCompare(pItem->pExpr, pExpr)==0 ){
+            break;
+          }
+        }
+        if( i>=pAggInfo->nFunc ){
+          /* pExpr is original.  Make a new entry in pAggInfo->aFunc[]
+          */
+          u8 enc = ENC(pParse->db);
+          i = addAggInfoFunc(pParse->db, pAggInfo);
+          if( i>=0 ){
+            assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
+            pItem = &pAggInfo->aFunc[i];
+            pItem->pExpr = pExpr;
+            pItem->iMem = ++pParse->nMem;
+            assert( !ExprHasProperty(pExpr, EP_IntValue) );
+            pItem->pFunc = sqlite3FindFunction(pParse->db,
+                   pExpr->u.zToken, sqlite3Strlen30(pExpr->u.zToken),
+                   pExpr->x.pList ? pExpr->x.pList->nExpr : 0, enc, 0);
+            if( pExpr->flags & EP_Distinct ){
+              pItem->iDistinct = pParse->nTab++;
+            }else{
+              pItem->iDistinct = -1;
+            }
+          }
+        }
+        /* Make pExpr point to the appropriate pAggInfo->aFunc[] entry
+        */
+        assert( !ExprHasAnyProperty(pExpr, EP_TokenOnly|EP_Reduced) );
+        ExprSetIrreducible(pExpr);
+        pExpr->iAgg = (i16)i;
+        pExpr->pAggInfo = pAggInfo;
+        return WRC_Prune;
+      }
+    }
+  }
+  return WRC_Continue;
+}
+static int analyzeAggregatesInSelect(Walker *pWalker, Select *pSelect){
+  NameContext *pNC = pWalker->u.pNC;
+  if( pNC->nDepth==0 ){
+    pNC->nDepth++;
+    sqlite3WalkSelect(pWalker, pSelect);
+    pNC->nDepth--;
+    return WRC_Prune;
+  }else{
+    return WRC_Continue;
+  }
+}
+
+/*
+** Analyze the given expression looking for aggregate functions and
+** for variables that need to be added to the pParse->aAgg[] array.
+** Make additional entries to the pParse->aAgg[] array as necessary.
+**
+** This routine should only be called after the expression has been
+** analyzed by sqlite3ResolveExprNames().
+*/
+SQLITE_PRIVATE void sqlite3ExprAnalyzeAggregates(NameContext *pNC, Expr *pExpr){
+  Walker w;
+  w.xExprCallback = analyzeAggregate;
+  w.xSelectCallback = analyzeAggregatesInSelect;
+  w.u.pNC = pNC;
+  assert( pNC->pSrcList!=0 );
+  sqlite3WalkExpr(&w, pExpr);
+}
+
+/*
+** Call sqlite3ExprAnalyzeAggregates() for every expression in an
+** expression list.  Return the number of errors.
+**
+** If an error is found, the analysis is cut short.
+*/
+SQLITE_PRIVATE void sqlite3ExprAnalyzeAggList(NameContext *pNC, ExprList *pList){
+  struct ExprList_item *pItem;
+  int i;
+  if( pList ){
+    for(pItem=pList->a, i=0; i<pList->nExpr; i++, pItem++){
+      sqlite3ExprAnalyzeAggregates(pNC, pItem->pExpr);
+    }
+  }
+}
+
+/*
+** Allocate a single new register for use to hold some intermediate result.
+*/
+SQLITE_PRIVATE int sqlite3GetTempReg(Parse *pParse){
+  if( pParse->nTempReg==0 ){
+    return ++pParse->nMem;
+  }
+  return pParse->aTempReg[--pParse->nTempReg];
+}
+
+/*
+** Deallocate a register, making available for reuse for some other
+** purpose.
+**
+** If a register is currently being used by the column cache, then
+** the dallocation is deferred until the column cache line that uses
+** the register becomes stale.
+*/
+SQLITE_PRIVATE void sqlite3ReleaseTempReg(Parse *pParse, int iReg){
+  if( iReg && pParse->nTempReg<ArraySize(pParse->aTempReg) ){
+    int i;
+    struct yColCache *p;
+    for(i=0, p=pParse->aColCache; i<SQLITE_N_COLCACHE; i++, p++){
+      if( p->iReg==iReg ){
+        p->tempReg = 1;
+        return;
+      }
+    }
+    pParse->aTempReg[pParse->nTempReg++] = iReg;
+  }
+}
+
+/*
+** Allocate or deallocate a block of nReg consecutive registers
+*/
+SQLITE_PRIVATE int sqlite3GetTempRange(Parse *pParse, int nReg){
+  int i, n;
+  i = pParse->iRangeReg;
+  n = pParse->nRangeReg;
+  if( nReg<=n ){
+    assert( !usedAsColumnCache(pParse, i, i+n-1) );
+    pParse->iRangeReg += nReg;
+    pParse->nRangeReg -= nReg;
+  }else{
+    i = pParse->nMem+1;
+    pParse->nMem += nReg;
+  }
+  return i;
+}
+SQLITE_PRIVATE void sqlite3ReleaseTempRange(Parse *pParse, int iReg, int nReg){
+  sqlite3ExprCacheRemove(pParse, iReg, nReg);
+  if( nReg>pParse->nRangeReg ){
+    pParse->nRangeReg = nReg;
+    pParse->iRangeReg = iReg;
+  }
+}
+
+/************** End of expr.c ************************************************/
+/************** Begin file alter.c *******************************************/
+/*
+** 2005 February 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains C code routines that used to generate VDBE code
+** that implements the ALTER TABLE command.
+*/
+
+/*
+** The code in this file only exists if we are not omitting the
+** ALTER TABLE logic from the build.
+*/
+#ifndef SQLITE_OMIT_ALTERTABLE
+
+
+/*
+** This function is used by SQL generated to implement the 
+** ALTER TABLE command. The first argument is the text of a CREATE TABLE or
+** CREATE INDEX command. The second is a table name. The table name in 
+** the CREATE TABLE or CREATE INDEX statement is replaced with the third
+** argument and the result returned. Examples:
+**
+** sqlite_rename_table('CREATE TABLE abc(a, b, c)', 'def')
+**     -> 'CREATE TABLE def(a, b, c)'
+**
+** sqlite_rename_table('CREATE INDEX i ON abc(a)', 'def')
+**     -> 'CREATE INDEX i ON def(a, b, c)'
+*/
+static void renameTableFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **argv
+){
+  unsigned char const *zSql = sqlite3_value_text(argv[0]);
+  unsigned char const *zTableName = sqlite3_value_text(argv[1]);
+
+  int token;
+  Token tname;
+  unsigned char const *zCsr = zSql;
+  int len = 0;
+  char *zRet;
+
+  sqlite3 *db = sqlite3_context_db_handle(context);
+
+  UNUSED_PARAMETER(NotUsed);
+
+  /* The principle used to locate the table name in the CREATE TABLE 
+  ** statement is that the table name is the first non-space token that
+  ** is immediately followed by a TK_LP or TK_USING token.
+  */
+  if( zSql ){
+    do {
+      if( !*zCsr ){
+        /* Ran out of input before finding an opening bracket. Return NULL. */
+        return;
+      }
+
+      /* Store the token that zCsr points to in tname. */
+      tname.z = (char*)zCsr;
+      tname.n = len;
+
+      /* Advance zCsr to the next token. Store that token type in 'token',
+      ** and its length in 'len' (to be used next iteration of this loop).
+      */
+      do {
+        zCsr += len;
+        len = sqlite3GetToken(zCsr, &token);
+      } while( token==TK_SPACE );
+      assert( len>0 );
+    } while( token!=TK_LP && token!=TK_USING );
+
+    zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", ((u8*)tname.z) - zSql, zSql, 
+       zTableName, tname.z+tname.n);
+    sqlite3_result_text(context, zRet, -1, SQLITE_DYNAMIC);
+  }
+}
+
+/*
+** This C function implements an SQL user function that is used by SQL code
+** generated by the ALTER TABLE ... RENAME command to modify the definition
+** of any foreign key constraints that use the table being renamed as the 
+** parent table. It is passed three arguments:
+**
+**   1) The complete text of the CREATE TABLE statement being modified,
+**   2) The old name of the table being renamed, and
+**   3) The new name of the table being renamed.
+**
+** It returns the new CREATE TABLE statement. For example:
+**
+**   sqlite_rename_parent('CREATE TABLE t1(a REFERENCES t2)', 't2', 't3')
+**       -> 'CREATE TABLE t1(a REFERENCES t3)'
+*/
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+static void renameParentFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **argv
+){
+  sqlite3 *db = sqlite3_context_db_handle(context);
+  char *zOutput = 0;
+  char *zResult;
+  unsigned char const *zInput = sqlite3_value_text(argv[0]);
+  unsigned char const *zOld = sqlite3_value_text(argv[1]);
+  unsigned char const *zNew = sqlite3_value_text(argv[2]);
+
+  unsigned const char *z;         /* Pointer to token */
+  int n;                          /* Length of token z */
+  int token;                      /* Type of token */
+
+  UNUSED_PARAMETER(NotUsed);
+  for(z=zInput; *z; z=z+n){
+    n = sqlite3GetToken(z, &token);
+    if( token==TK_REFERENCES ){
+      char *zParent;
+      do {
+        z += n;
+        n = sqlite3GetToken(z, &token);
+      }while( token==TK_SPACE );
+
+      zParent = sqlite3DbStrNDup(db, (const char *)z, n);
+      if( zParent==0 ) break;
+      sqlite3Dequote(zParent);
+      if( 0==sqlite3StrICmp((const char *)zOld, zParent) ){
+        char *zOut = sqlite3MPrintf(db, "%s%.*s\"%w\"", 
+            (zOutput?zOutput:""), z-zInput, zInput, (const char *)zNew
+        );
+        sqlite3DbFree(db, zOutput);
+        zOutput = zOut;
+        zInput = &z[n];
+      }
+      sqlite3DbFree(db, zParent);
+    }
+  }
+
+  zResult = sqlite3MPrintf(db, "%s%s", (zOutput?zOutput:""), zInput), 
+  sqlite3_result_text(context, zResult, -1, SQLITE_DYNAMIC);
+  sqlite3DbFree(db, zOutput);
+}
+#endif
+
+#ifndef SQLITE_OMIT_TRIGGER
+/* This function is used by SQL generated to implement the
+** ALTER TABLE command. The first argument is the text of a CREATE TRIGGER 
+** statement. The second is a table name. The table name in the CREATE 
+** TRIGGER statement is replaced with the third argument and the result 
+** returned. This is analagous to renameTableFunc() above, except for CREATE
+** TRIGGER, not CREATE INDEX and CREATE TABLE.
+*/
+static void renameTriggerFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **argv
+){
+  unsigned char const *zSql = sqlite3_value_text(argv[0]);
+  unsigned char const *zTableName = sqlite3_value_text(argv[1]);
+
+  int token;
+  Token tname;
+  int dist = 3;
+  unsigned char const *zCsr = zSql;
+  int len = 0;
+  char *zRet;
+  sqlite3 *db = sqlite3_context_db_handle(context);
+
+  UNUSED_PARAMETER(NotUsed);
+
+  /* The principle used to locate the table name in the CREATE TRIGGER 
+  ** statement is that the table name is the first token that is immediatedly
+  ** preceded by either TK_ON or TK_DOT and immediatedly followed by one
+  ** of TK_WHEN, TK_BEGIN or TK_FOR.
+  */
+  if( zSql ){
+    do {
+
+      if( !*zCsr ){
+        /* Ran out of input before finding the table name. Return NULL. */
+        return;
+      }
+
+      /* Store the token that zCsr points to in tname. */
+      tname.z = (char*)zCsr;
+      tname.n = len;
+
+      /* Advance zCsr to the next token. Store that token type in 'token',
+      ** and its length in 'len' (to be used next iteration of this loop).
+      */
+      do {
+        zCsr += len;
+        len = sqlite3GetToken(zCsr, &token);
+      }while( token==TK_SPACE );
+      assert( len>0 );
+
+      /* Variable 'dist' stores the number of tokens read since the most
+      ** recent TK_DOT or TK_ON. This means that when a WHEN, FOR or BEGIN 
+      ** token is read and 'dist' equals 2, the condition stated above
+      ** to be met.
+      **
+      ** Note that ON cannot be a database, table or column name, so
+      ** there is no need to worry about syntax like 
+      ** "CREATE TRIGGER ... ON ON.ON BEGIN ..." etc.
+      */
+      dist++;
+      if( token==TK_DOT || token==TK_ON ){
+        dist = 0;
+      }
+    } while( dist!=2 || (token!=TK_WHEN && token!=TK_FOR && token!=TK_BEGIN) );
+
+    /* Variable tname now contains the token that is the old table-name
+    ** in the CREATE TRIGGER statement.
+    */
+    zRet = sqlite3MPrintf(db, "%.*s\"%w\"%s", ((u8*)tname.z) - zSql, zSql, 
+       zTableName, tname.z+tname.n);
+    sqlite3_result_text(context, zRet, -1, SQLITE_DYNAMIC);
+  }
+}
+#endif   /* !SQLITE_OMIT_TRIGGER */
+
+/*
+** Register built-in functions used to help implement ALTER TABLE
+*/
+SQLITE_PRIVATE void sqlite3AlterFunctions(void){
+  static SQLITE_WSD FuncDef aAlterTableFuncs[] = {
+    FUNCTION(sqlite_rename_table,   2, 0, 0, renameTableFunc),
+#ifndef SQLITE_OMIT_TRIGGER
+    FUNCTION(sqlite_rename_trigger, 2, 0, 0, renameTriggerFunc),
+#endif
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+    FUNCTION(sqlite_rename_parent,  3, 0, 0, renameParentFunc),
+#endif
+  };
+  int i;
+  FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
+  FuncDef *aFunc = (FuncDef*)&GLOBAL(FuncDef, aAlterTableFuncs);
+
+  for(i=0; i<ArraySize(aAlterTableFuncs); i++){
+    sqlite3FuncDefInsert(pHash, &aFunc[i]);
+  }
+}
+
+/*
+** This function is used to create the text of expressions of the form:
+**
+**   name=<constant1> OR name=<constant2> OR ...
+**
+** If argument zWhere is NULL, then a pointer string containing the text 
+** "name=<constant>" is returned, where <constant> is the quoted version
+** of the string passed as argument zConstant. The returned buffer is
+** allocated using sqlite3DbMalloc(). It is the responsibility of the
+** caller to ensure that it is eventually freed.
+**
+** If argument zWhere is not NULL, then the string returned is 
+** "<where> OR name=<constant>", where <where> is the contents of zWhere.
+** In this case zWhere is passed to sqlite3DbFree() before returning.
+** 
+*/
+static char *whereOrName(sqlite3 *db, char *zWhere, char *zConstant){
+  char *zNew;
+  if( !zWhere ){
+    zNew = sqlite3MPrintf(db, "name=%Q", zConstant);
+  }else{
+    zNew = sqlite3MPrintf(db, "%s OR name=%Q", zWhere, zConstant);
+    sqlite3DbFree(db, zWhere);
+  }
+  return zNew;
+}
+
+#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
+/*
+** Generate the text of a WHERE expression which can be used to select all
+** tables that have foreign key constraints that refer to table pTab (i.e.
+** constraints for which pTab is the parent table) from the sqlite_master
+** table.
+*/
+static char *whereForeignKeys(Parse *pParse, Table *pTab){
+  FKey *p;
+  char *zWhere = 0;
+  for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
+    zWhere = whereOrName(pParse->db, zWhere, p->pFrom->zName);
+  }
+  return zWhere;
+}
+#endif
+
+/*
+** Generate the text of a WHERE expression which can be used to select all
+** temporary triggers on table pTab from the sqlite_temp_master table. If
+** table pTab has no temporary triggers, or is itself stored in the 
+** temporary database, NULL is returned.
+*/
+static char *whereTempTriggers(Parse *pParse, Table *pTab){
+  Trigger *pTrig;
+  char *zWhere = 0;
+  const Schema *pTempSchema = pParse->db->aDb[1].pSchema; /* Temp db schema */
+
+  /* If the table is not located in the temp-db (in which case NULL is 
+  ** returned, loop through the tables list of triggers. For each trigger
+  ** that is not part of the temp-db schema, add a clause to the WHERE 
+  ** expression being built up in zWhere.
+  */
+  if( pTab->pSchema!=pTempSchema ){
+    sqlite3 *db = pParse->db;
+    for(pTrig=sqlite3TriggerList(pParse, pTab); pTrig; pTrig=pTrig->pNext){
+      if( pTrig->pSchema==pTempSchema ){
+        zWhere = whereOrName(db, zWhere, pTrig->zName);
+      }
+    }
+  }
+  if( zWhere ){
+    char *zNew = sqlite3MPrintf(pParse->db, "type='trigger' AND (%s)", zWhere);
+    sqlite3DbFree(pParse->db, zWhere);
+    zWhere = zNew;
+  }
+  return zWhere;
+}
+
+/*
+** Generate code to drop and reload the internal representation of table
+** pTab from the database, including triggers and temporary triggers.
+** Argument zName is the name of the table in the database schema at
+** the time the generated code is executed. This can be different from
+** pTab->zName if this function is being called to code part of an 
+** "ALTER TABLE RENAME TO" statement.
+*/
+static void reloadTableSchema(Parse *pParse, Table *pTab, const char *zName){
+  Vdbe *v;
+  char *zWhere;
+  int iDb;                   /* Index of database containing pTab */
+#ifndef SQLITE_OMIT_TRIGGER
+  Trigger *pTrig;
+#endif
+
+  v = sqlite3GetVdbe(pParse);
+  if( NEVER(v==0) ) return;
+  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
+  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
+  assert( iDb>=0 );
+
+#ifndef SQLITE_OMIT_TRIGGER
+  /* Drop any table triggers from the internal schema. */
+  for(pTrig=sqlite3TriggerList(pParse, pTab); pTrig; pTrig=pTrig->pNext){
+    int iTrigDb = sqlite3SchemaToIndex(pParse->db, pTrig->pSchema);
+    assert( iTrigDb==iDb || iTrigDb==1 );
+    sqlite3VdbeAddOp4(v, OP_DropTrigger, iTrigDb, 0, 0, pTrig->zName, 0);
+  }
+#endif
+
+  /* Drop the table and index from the internal schema.  */
+  sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);
+
+  /* Reload the table, index and permanent trigger schemas. */
+  zWhere = sqlite3MPrintf(pParse->db, "tbl_name=%Q", zName);
+  if( !zWhere ) return;
+  sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 0, 0, zWhere, P4_DYNAMIC);
+
+#ifndef SQLITE_OMIT_TRIGGER
+  /* Now, if the table is not stored in the temp database, reload any temp 
+  ** triggers. Don't use IN(...) in case SQLITE_OMIT_SUBQUERY is defined. 
+  */
+  if( (zWhere=whereTempTriggers(pParse, pTab))!=0 ){
+    sqlite3VdbeAddOp4(v, OP_ParseSchema, 1, 0, 0, zWhere, P4_DYNAMIC);
+  }
+#endif
+}
+
+/*
+** Parameter zName is the name of a table that is about to be altered
+** (either with ALTER TABLE ... RENAME TO or ALTER TABLE ... ADD COLUMN).
+** If the table is a system table, this function leaves an error message
+** in pParse->zErr (system tables may not be altered) and returns non-zero.
+**
+** Or, if zName is not a system table, zero is returned.
+*/
+static int isSystemTable(Parse *pParse, const char *zName){
+  if( sqlite3Strlen30(zName)>6 && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
+    sqlite3ErrorMsg(pParse, "table %s may not be altered", zName);
+    return 1;
+  }
+  return 0;
+}
+
+/*
+** Generate code to implement the "ALTER TABLE xxx RENAME TO yyy" 
+** command. 
+*/
+SQLITE_PRIVATE void sqlite3AlterRenameTable(
+  Parse *pParse,            /* Parser context. */
+  SrcList *pSrc,            /* The table to rename. */
+  Token *pName              /* The new table name. */
+){
+  int iDb;                  /* Database that contains the table */
+  char *zDb;                /* Name of database iDb */
+  Table *pTab;              /* Table being renamed */
+  char *zName = 0;          /* NULL-terminated version of pName */ 
+  sqlite3 *db = pParse->db; /* Database connection */
+  int nTabName;             /* Number of UTF-8 characters in zTabName */
+  const char *zTabName;     /* Original name of the table */
+  Vdbe *v;
+#ifndef SQLITE_OMIT_TRIGGER
+  char *zWhere = 0;         /* Where clause to locate temp triggers */
+#endif
+  VTable *pVTab = 0;        /* Non-zero if this is a v-tab with an xRename() */
+  int savedDbFlags;         /* Saved value of db->flags */
+
+  savedDbFlags = db->flags;  
+  if( NEVER(db->mallocFailed) ) goto exit_rename_table;
+  assert( pSrc->nSrc==1 );
+  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
+
+  pTab = sqlite3LocateTable(pParse, 0, pSrc->a[0].zName, pSrc->a[0].zDatabase);
+  if( !pTab ) goto exit_rename_table;
+  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
+  zDb = db->aDb[iDb].zName;
+  db->flags |= SQLITE_PreferBuiltin;
+
+  /* Get a NULL terminated version of the new table name. */
+  zName = sqlite3NameFromToken(db, pName);
+  if( !zName ) goto exit_rename_table;
+
+  /* Check that a table or index named 'zName' does not already exist
+  ** in database iDb. If so, this is an error.
+  */
+  if( sqlite3FindTable(db, zName, zDb) || sqlite3FindIndex(db, zName, zDb) ){
+    sqlite3ErrorMsg(pParse, 
+        "there is already another table or index with this name: %s", zName);
+    goto exit_rename_table;
+  }
+
+  /* Make sure it is not a system table being altered, or a reserved name
+  ** that the table is being renamed to.
+  */
+  if( SQLITE_OK!=isSystemTable(pParse, pTab->zName) ){
+    goto exit_rename_table;
+  }
+  if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){ goto
+    exit_rename_table;
+  }
+
+#ifndef SQLITE_OMIT_VIEW
+  if( pTab->pSelect ){
+    sqlite3ErrorMsg(pParse, "view %s may not be altered", pTab->zName);
+    goto exit_rename_table;
+  }
+#endif
+
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  /* Invoke the authorization callback. */
+  if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){
+    goto exit_rename_table;
+  }
+#endif
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  if( sqlite3ViewGetColumnNames(pParse, pTab) ){
+    goto exit_rename_table;
+  }
+  if( IsVirtual(pTab) ){
+    pVTab = sqlite3GetVTable(db, pTab);
+    if( pVTab->pVtab->pModule->xRename==0 ){
+      pVTab = 0;
+    }
+  }
+#endif
+
+  /* Begin a transaction and code the VerifyCookie for database iDb. 
+  ** Then modify the schema cookie (since the ALTER TABLE modifies the
+  ** schema). Open a statement transaction if the table is a virtual
+  ** table.
+  */
+  v = sqlite3GetVdbe(pParse);
+  if( v==0 ){
+    goto exit_rename_table;
+  }
+  sqlite3BeginWriteOperation(pParse, pVTab!=0, iDb);
+  sqlite3ChangeCookie(pParse, iDb);
+
+  /* If this is a virtual table, invoke the xRename() function if
+  ** one is defined. The xRename() callback will modify the names
+  ** of any resources used by the v-table implementation (including other
+  ** SQLite tables) that are identified by the name of the virtual table.
+  */
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  if( pVTab ){
+    int i = ++pParse->nMem;
+    sqlite3VdbeAddOp4(v, OP_String8, 0, i, 0, zName, 0);
+    sqlite3VdbeAddOp4(v, OP_VRename, i, 0, 0,(const char*)pVTab, P4_VTAB);
+    sqlite3MayAbort(pParse);
+  }
+#endif
+
+  /* figure out how many UTF-8 characters are in zName */
+  zTabName = pTab->zName;
+  nTabName = sqlite3Utf8CharLen(zTabName, -1);
+
+#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
+  if( db->flags&SQLITE_ForeignKeys ){
+    /* If foreign-key support is enabled, rewrite the CREATE TABLE 
+    ** statements corresponding to all child tables of foreign key constraints
+    ** for which the renamed table is the parent table.  */
+    if( (zWhere=whereForeignKeys(pParse, pTab))!=0 ){
+      sqlite3NestedParse(pParse, 
+          "UPDATE \"%w\".%s SET "
+              "sql = sqlite_rename_parent(sql, %Q, %Q) "
+              "WHERE %s;", zDb, SCHEMA_TABLE(iDb), zTabName, zName, zWhere);
+      sqlite3DbFree(db, zWhere);
+    }
+  }
+#endif
+
+  /* Modify the sqlite_master table to use the new table name. */
+  sqlite3NestedParse(pParse,
+      "UPDATE %Q.%s SET "
+#ifdef SQLITE_OMIT_TRIGGER
+          "sql = sqlite_rename_table(sql, %Q), "
+#else
+          "sql = CASE "
+            "WHEN type = 'trigger' THEN sqlite_rename_trigger(sql, %Q)"
+            "ELSE sqlite_rename_table(sql, %Q) END, "
+#endif
+          "tbl_name = %Q, "
+          "name = CASE "
+            "WHEN type='table' THEN %Q "
+            "WHEN name LIKE 'sqlite_autoindex%%' AND type='index' THEN "
+             "'sqlite_autoindex_' || %Q || substr(name,%d+18) "
+            "ELSE name END "
+      "WHERE tbl_name=%Q AND "
+          "(type='table' OR type='index' OR type='trigger');", 
+      zDb, SCHEMA_TABLE(iDb), zName, zName, zName, 
+#ifndef SQLITE_OMIT_TRIGGER
+      zName,
+#endif
+      zName, nTabName, zTabName
+  );
+
+#ifndef SQLITE_OMIT_AUTOINCREMENT
+  /* If the sqlite_sequence table exists in this database, then update 
+  ** it with the new table name.
+  */
+  if( sqlite3FindTable(db, "sqlite_sequence", zDb) ){
+    sqlite3NestedParse(pParse,
+        "UPDATE \"%w\".sqlite_sequence set name = %Q WHERE name = %Q",
+        zDb, zName, pTab->zName);
+  }
+#endif
+
+#ifndef SQLITE_OMIT_TRIGGER
+  /* If there are TEMP triggers on this table, modify the sqlite_temp_master
+  ** table. Don't do this if the table being ALTERed is itself located in
+  ** the temp database.
+  */
+  if( (zWhere=whereTempTriggers(pParse, pTab))!=0 ){
+    sqlite3NestedParse(pParse, 
+        "UPDATE sqlite_temp_master SET "
+            "sql = sqlite_rename_trigger(sql, %Q), "
+            "tbl_name = %Q "
+            "WHERE %s;", zName, zName, zWhere);
+    sqlite3DbFree(db, zWhere);
+  }
+#endif
+
+#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
+  if( db->flags&SQLITE_ForeignKeys ){
+    FKey *p;
+    for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
+      Table *pFrom = p->pFrom;
+      if( pFrom!=pTab ){
+        reloadTableSchema(pParse, p->pFrom, pFrom->zName);
+      }
+    }
+  }
+#endif
+
+  /* Drop and reload the internal table schema. */
+  reloadTableSchema(pParse, pTab, zName);
+
+exit_rename_table:
+  sqlite3SrcListDelete(db, pSrc);
+  sqlite3DbFree(db, zName);
+  db->flags = savedDbFlags;
+}
+
+
+/*
+** Generate code to make sure the file format number is at least minFormat.
+** The generated code will increase the file format number if necessary.
+*/
+SQLITE_PRIVATE void sqlite3MinimumFileFormat(Parse *pParse, int iDb, int minFormat){
+  Vdbe *v;
+  v = sqlite3GetVdbe(pParse);
+  /* The VDBE should have been allocated before this routine is called.
+  ** If that allocation failed, we would have quit before reaching this
+  ** point */
+  if( ALWAYS(v) ){
+    int r1 = sqlite3GetTempReg(pParse);
+    int r2 = sqlite3GetTempReg(pParse);
+    int j1;
+    sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, r1, BTREE_FILE_FORMAT);
+    sqlite3VdbeUsesBtree(v, iDb);
+    sqlite3VdbeAddOp2(v, OP_Integer, minFormat, r2);
+    j1 = sqlite3VdbeAddOp3(v, OP_Ge, r2, 0, r1);
+    sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, r2);
+    sqlite3VdbeJumpHere(v, j1);
+    sqlite3ReleaseTempReg(pParse, r1);
+    sqlite3ReleaseTempReg(pParse, r2);
+  }
+}
+
+/*
+** This function is called after an "ALTER TABLE ... ADD" statement
+** has been parsed. Argument pColDef contains the text of the new
+** column definition.
+**
+** The Table structure pParse->pNewTable was extended to include
+** the new column during parsing.
+*/
+SQLITE_PRIVATE void sqlite3AlterFinishAddColumn(Parse *pParse, Token *pColDef){
+  Table *pNew;              /* Copy of pParse->pNewTable */
+  Table *pTab;              /* Table being altered */
+  int iDb;                  /* Database number */
+  const char *zDb;          /* Database name */
+  const char *zTab;         /* Table name */
+  char *zCol;               /* Null-terminated column definition */
+  Column *pCol;             /* The new column */
+  Expr *pDflt;              /* Default value for the new column */
+  sqlite3 *db;              /* The database connection; */
+
+  db = pParse->db;
+  if( pParse->nErr || db->mallocFailed ) return;
+  pNew = pParse->pNewTable;
+  assert( pNew );
+
+  assert( sqlite3BtreeHoldsAllMutexes(db) );
+  iDb = sqlite3SchemaToIndex(db, pNew->pSchema);
+  zDb = db->aDb[iDb].zName;
+  zTab = &pNew->zName[16];  /* Skip the "sqlite_altertab_" prefix on the name */
+  pCol = &pNew->aCol[pNew->nCol-1];
+  pDflt = pCol->pDflt;
+  pTab = sqlite3FindTable(db, zTab, zDb);
+  assert( pTab );
+
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  /* Invoke the authorization callback. */
+  if( sqlite3AuthCheck(pParse, SQLITE_ALTER_TABLE, zDb, pTab->zName, 0) ){
+    return;
+  }
+#endif
+
+  /* If the default value for the new column was specified with a 
+  ** literal NULL, then set pDflt to 0. This simplifies checking
+  ** for an SQL NULL default below.
+  */
+  if( pDflt && pDflt->op==TK_NULL ){
+    pDflt = 0;
+  }
+
+  /* Check that the new column is not specified as PRIMARY KEY or UNIQUE.
+  ** If there is a NOT NULL constraint, then the default value for the
+  ** column must not be NULL.
+  */
+  if( pCol->isPrimKey ){
+    sqlite3ErrorMsg(pParse, "Cannot add a PRIMARY KEY column");
+    return;
+  }
+  if( pNew->pIndex ){
+    sqlite3ErrorMsg(pParse, "Cannot add a UNIQUE column");
+    return;
+  }
+  if( (db->flags&SQLITE_ForeignKeys) && pNew->pFKey && pDflt ){
+    sqlite3ErrorMsg(pParse, 
+        "Cannot add a REFERENCES column with non-NULL default value");
+    return;
+  }
+  if( pCol->notNull && !pDflt ){
+    sqlite3ErrorMsg(pParse, 
+        "Cannot add a NOT NULL column with default value NULL");
+    return;
+  }
+
+  /* Ensure the default expression is something that sqlite3ValueFromExpr()
+  ** can handle (i.e. not CURRENT_TIME etc.)
+  */
+  if( pDflt ){
+    sqlite3_value *pVal;
+    if( sqlite3ValueFromExpr(db, pDflt, SQLITE_UTF8, SQLITE_AFF_NONE, &pVal) ){
+      db->mallocFailed = 1;
+      return;
+    }
+    if( !pVal ){
+      sqlite3ErrorMsg(pParse, "Cannot add a column with non-constant default");
+      return;
+    }
+    sqlite3ValueFree(pVal);
+  }
+
+  /* Modify the CREATE TABLE statement. */
+  zCol = sqlite3DbStrNDup(db, (char*)pColDef->z, pColDef->n);
+  if( zCol ){
+    char *zEnd = &zCol[pColDef->n-1];
+    int savedDbFlags = db->flags;
+    while( zEnd>zCol && (*zEnd==';' || sqlite3Isspace(*zEnd)) ){
+      *zEnd-- = '\0';
+    }
+    db->flags |= SQLITE_PreferBuiltin;
+    sqlite3NestedParse(pParse, 
+        "UPDATE \"%w\".%s SET "
+          "sql = substr(sql,1,%d) || ', ' || %Q || substr(sql,%d) "
+        "WHERE type = 'table' AND name = %Q", 
+      zDb, SCHEMA_TABLE(iDb), pNew->addColOffset, zCol, pNew->addColOffset+1,
+      zTab
+    );
+    sqlite3DbFree(db, zCol);
+    db->flags = savedDbFlags;
+  }
+
+  /* If the default value of the new column is NULL, then set the file
+  ** format to 2. If the default value of the new column is not NULL,
+  ** the file format becomes 3.
+  */
+  sqlite3MinimumFileFormat(pParse, iDb, pDflt ? 3 : 2);
+
+  /* Reload the schema of the modified table. */
+  reloadTableSchema(pParse, pTab, pTab->zName);
+}
+
+/*
+** This function is called by the parser after the table-name in
+** an "ALTER TABLE <table-name> ADD" statement is parsed. Argument 
+** pSrc is the full-name of the table being altered.
+**
+** This routine makes a (partial) copy of the Table structure
+** for the table being altered and sets Parse.pNewTable to point
+** to it. Routines called by the parser as the column definition
+** is parsed (i.e. sqlite3AddColumn()) add the new Column data to 
+** the copy. The copy of the Table structure is deleted by tokenize.c 
+** after parsing is finished.
+**
+** Routine sqlite3AlterFinishAddColumn() will be called to complete
+** coding the "ALTER TABLE ... ADD" statement.
+*/
+SQLITE_PRIVATE void sqlite3AlterBeginAddColumn(Parse *pParse, SrcList *pSrc){
+  Table *pNew;
+  Table *pTab;
+  Vdbe *v;
+  int iDb;
+  int i;
+  int nAlloc;
+  sqlite3 *db = pParse->db;
+
+  /* Look up the table being altered. */
+  assert( pParse->pNewTable==0 );
+  assert( sqlite3BtreeHoldsAllMutexes(db) );
+  if( db->mallocFailed ) goto exit_begin_add_column;
+  pTab = sqlite3LocateTable(pParse, 0, pSrc->a[0].zName, pSrc->a[0].zDatabase);
+  if( !pTab ) goto exit_begin_add_column;
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  if( IsVirtual(pTab) ){
+    sqlite3ErrorMsg(pParse, "virtual tables may not be altered");
+    goto exit_begin_add_column;
+  }
+#endif
+
+  /* Make sure this is not an attempt to ALTER a view. */
+  if( pTab->pSelect ){
+    sqlite3ErrorMsg(pParse, "Cannot add a column to a view");
+    goto exit_begin_add_column;
+  }
+  if( SQLITE_OK!=isSystemTable(pParse, pTab->zName) ){
+    goto exit_begin_add_column;
+  }
+
+  assert( pTab->addColOffset>0 );
+  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+
+  /* Put a copy of the Table struct in Parse.pNewTable for the
+  ** sqlite3AddColumn() function and friends to modify.  But modify
+  ** the name by adding an "sqlite_altertab_" prefix.  By adding this
+  ** prefix, we insure that the name will not collide with an existing
+  ** table because user table are not allowed to have the "sqlite_"
+  ** prefix on their name.
+  */
+  pNew = (Table*)sqlite3DbMallocZero(db, sizeof(Table));
+  if( !pNew ) goto exit_begin_add_column;
+  pParse->pNewTable = pNew;
+  pNew->nRef = 1;
+  pNew->nCol = pTab->nCol;
+  assert( pNew->nCol>0 );
+  nAlloc = (((pNew->nCol-1)/8)*8)+8;
+  assert( nAlloc>=pNew->nCol && nAlloc%8==0 && nAlloc-pNew->nCol<8 );
+  pNew->aCol = (Column*)sqlite3DbMallocZero(db, sizeof(Column)*nAlloc);
+  pNew->zName = sqlite3MPrintf(db, "sqlite_altertab_%s", pTab->zName);
+  if( !pNew->aCol || !pNew->zName ){
+    db->mallocFailed = 1;
+    goto exit_begin_add_column;
+  }
+  memcpy(pNew->aCol, pTab->aCol, sizeof(Column)*pNew->nCol);
+  for(i=0; i<pNew->nCol; i++){
+    Column *pCol = &pNew->aCol[i];
+    pCol->zName = sqlite3DbStrDup(db, pCol->zName);
+    pCol->zColl = 0;
+    pCol->zType = 0;
+    pCol->pDflt = 0;
+    pCol->zDflt = 0;
+  }
+  pNew->pSchema = db->aDb[iDb].pSchema;
+  pNew->addColOffset = pTab->addColOffset;
+  pNew->nRef = 1;
+
+  /* Begin a transaction and increment the schema cookie.  */
+  sqlite3BeginWriteOperation(pParse, 0, iDb);
+  v = sqlite3GetVdbe(pParse);
+  if( !v ) goto exit_begin_add_column;
+  sqlite3ChangeCookie(pParse, iDb);
+
+exit_begin_add_column:
+  sqlite3SrcListDelete(db, pSrc);
+  return;
+}
+#endif  /* SQLITE_ALTER_TABLE */
+
+/************** End of alter.c ***********************************************/
+/************** Begin file analyze.c *****************************************/
+/*
+** 2005 July 8
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains code associated with the ANALYZE command.
+*/
+#ifndef SQLITE_OMIT_ANALYZE
+
+/*
+** This routine generates code that opens the sqlite_stat1 table for
+** writing with cursor iStatCur. If the library was built with the
+** SQLITE_ENABLE_STAT2 macro defined, then the sqlite_stat2 table is
+** opened for writing using cursor (iStatCur+1)
+**
+** If the sqlite_stat1 tables does not previously exist, it is created.
+** Similarly, if the sqlite_stat2 table does not exist and the library
+** is compiled with SQLITE_ENABLE_STAT2 defined, it is created. 
+**
+** Argument zWhere may be a pointer to a buffer containing a table name,
+** or it may be a NULL pointer. If it is not NULL, then all entries in
+** the sqlite_stat1 and (if applicable) sqlite_stat2 tables associated
+** with the named table are deleted. If zWhere==0, then code is generated
+** to delete all stat table entries.
+*/
+static void openStatTable(
+  Parse *pParse,          /* Parsing context */
+  int iDb,                /* The database we are looking in */
+  int iStatCur,           /* Open the sqlite_stat1 table on this cursor */
+  const char *zWhere,     /* Delete entries for this table or index */
+  const char *zWhereType  /* Either "tbl" or "idx" */
+){
+  static const struct {
+    const char *zName;
+    const char *zCols;
+  } aTable[] = {
+    { "sqlite_stat1", "tbl,idx,stat" },
+#ifdef SQLITE_ENABLE_STAT2
+    { "sqlite_stat2", "tbl,idx,sampleno,sample" },
+#endif
+  };
+
+  int aRoot[] = {0, 0};
+  u8 aCreateTbl[] = {0, 0};
+
+  int i;
+  sqlite3 *db = pParse->db;
+  Db *pDb;
+  Vdbe *v = sqlite3GetVdbe(pParse);
+  if( v==0 ) return;
+  assert( sqlite3BtreeHoldsAllMutexes(db) );
+  assert( sqlite3VdbeDb(v)==db );
+  pDb = &db->aDb[iDb];
+
+  for(i=0; i<ArraySize(aTable); i++){
+    const char *zTab = aTable[i].zName;
+    Table *pStat;
+    if( (pStat = sqlite3FindTable(db, zTab, pDb->zName))==0 ){
+      /* The sqlite_stat[12] table does not exist. Create it. Note that a 
+      ** side-effect of the CREATE TABLE statement is to leave the rootpage 
+      ** of the new table in register pParse->regRoot. This is important 
+      ** because the OpenWrite opcode below will be needing it. */
+      sqlite3NestedParse(pParse,
+          "CREATE TABLE %Q.%s(%s)", pDb->zName, zTab, aTable[i].zCols
+      );
+      aRoot[i] = pParse->regRoot;
+      aCreateTbl[i] = 1;
+    }else{
+      /* The table already exists. If zWhere is not NULL, delete all entries 
+      ** associated with the table zWhere. If zWhere is NULL, delete the
+      ** entire contents of the table. */
+      aRoot[i] = pStat->tnum;
+      sqlite3TableLock(pParse, iDb, aRoot[i], 1, zTab);
+      if( zWhere ){
+        sqlite3NestedParse(pParse,
+           "DELETE FROM %Q.%s WHERE %s=%Q", pDb->zName, zTab, zWhereType, zWhere
+        );
+      }else{
+        /* The sqlite_stat[12] table already exists.  Delete all rows. */
+        sqlite3VdbeAddOp2(v, OP_Clear, aRoot[i], iDb);
+      }
+    }
+  }
+
+  /* Open the sqlite_stat[12] tables for writing. */
+  for(i=0; i<ArraySize(aTable); i++){
+    sqlite3VdbeAddOp3(v, OP_OpenWrite, iStatCur+i, aRoot[i], iDb);
+    sqlite3VdbeChangeP4(v, -1, (char *)3, P4_INT32);
+    sqlite3VdbeChangeP5(v, aCreateTbl[i]);
+  }
+}
+
+/*
+** Generate code to do an analysis of all indices associated with
+** a single table.
+*/
+static void analyzeOneTable(
+  Parse *pParse,   /* Parser context */
+  Table *pTab,     /* Table whose indices are to be analyzed */
+  Index *pOnlyIdx, /* If not NULL, only analyze this one index */
+  int iStatCur,    /* Index of VdbeCursor that writes the sqlite_stat1 table */
+  int iMem         /* Available memory locations begin here */
+){
+  sqlite3 *db = pParse->db;    /* Database handle */
+  Index *pIdx;                 /* An index to being analyzed */
+  int iIdxCur;                 /* Cursor open on index being analyzed */
+  Vdbe *v;                     /* The virtual machine being built up */
+  int i;                       /* Loop counter */
+  int topOfLoop;               /* The top of the loop */
+  int endOfLoop;               /* The end of the loop */
+  int jZeroRows = -1;          /* Jump from here if number of rows is zero */
+  int iDb;                     /* Index of database containing pTab */
+  int regTabname = iMem++;     /* Register containing table name */
+  int regIdxname = iMem++;     /* Register containing index name */
+  int regSampleno = iMem++;    /* Register containing next sample number */
+  int regCol = iMem++;         /* Content of a column analyzed table */
+  int regRec = iMem++;         /* Register holding completed record */
+  int regTemp = iMem++;        /* Temporary use register */
+  int regRowid = iMem++;       /* Rowid for the inserted record */
+
+#ifdef SQLITE_ENABLE_STAT2
+  int addr = 0;                /* Instruction address */
+  int regTemp2 = iMem++;       /* Temporary use register */
+  int regSamplerecno = iMem++; /* Index of next sample to record */
+  int regRecno = iMem++;       /* Current sample index */
+  int regLast = iMem++;        /* Index of last sample to record */
+  int regFirst = iMem++;       /* Index of first sample to record */
+#endif
+
+  v = sqlite3GetVdbe(pParse);
+  if( v==0 || NEVER(pTab==0) ){
+    return;
+  }
+  if( pTab->tnum==0 ){
+    /* Do not gather statistics on views or virtual tables */
+    return;
+  }
+  if( memcmp(pTab->zName, "sqlite_", 7)==0 ){
+    /* Do not gather statistics on system tables */
+    return;
+  }
+  assert( sqlite3BtreeHoldsAllMutexes(db) );
+  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+  assert( iDb>=0 );
+  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  if( sqlite3AuthCheck(pParse, SQLITE_ANALYZE, pTab->zName, 0,
+      db->aDb[iDb].zName ) ){
+    return;
+  }
+#endif
+
+  /* Establish a read-lock on the table at the shared-cache level. */
+  sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
+
+  iIdxCur = pParse->nTab++;
+  sqlite3VdbeAddOp4(v, OP_String8, 0, regTabname, 0, pTab->zName, 0);
+  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+    int nCol;
+    KeyInfo *pKey;
+
+    if( pOnlyIdx && pOnlyIdx!=pIdx ) continue;
+    nCol = pIdx->nColumn;
+    pKey = sqlite3IndexKeyinfo(pParse, pIdx);
+    if( iMem+1+(nCol*2)>pParse->nMem ){
+      pParse->nMem = iMem+1+(nCol*2);
+    }
+
+    /* Open a cursor to the index to be analyzed. */
+    assert( iDb==sqlite3SchemaToIndex(db, pIdx->pSchema) );
+    sqlite3VdbeAddOp4(v, OP_OpenRead, iIdxCur, pIdx->tnum, iDb,
+        (char *)pKey, P4_KEYINFO_HANDOFF);
+    VdbeComment((v, "%s", pIdx->zName));
+
+    /* Populate the register containing the index name. */
+    sqlite3VdbeAddOp4(v, OP_String8, 0, regIdxname, 0, pIdx->zName, 0);
+
+#ifdef SQLITE_ENABLE_STAT2
+
+    /* If this iteration of the loop is generating code to analyze the
+    ** first index in the pTab->pIndex list, then register regLast has
+    ** not been populated. In this case populate it now.  */
+    if( pTab->pIndex==pIdx ){
+      sqlite3VdbeAddOp2(v, OP_Integer, SQLITE_INDEX_SAMPLES, regSamplerecno);
+      sqlite3VdbeAddOp2(v, OP_Integer, SQLITE_INDEX_SAMPLES*2-1, regTemp);
+      sqlite3VdbeAddOp2(v, OP_Integer, SQLITE_INDEX_SAMPLES*2, regTemp2);
+
+      sqlite3VdbeAddOp2(v, OP_Count, iIdxCur, regLast);
+      sqlite3VdbeAddOp2(v, OP_Null, 0, regFirst);
+      addr = sqlite3VdbeAddOp3(v, OP_Lt, regSamplerecno, 0, regLast);
+      sqlite3VdbeAddOp3(v, OP_Divide, regTemp2, regLast, regFirst);
+      sqlite3VdbeAddOp3(v, OP_Multiply, regLast, regTemp, regLast);
+      sqlite3VdbeAddOp2(v, OP_AddImm, regLast, SQLITE_INDEX_SAMPLES*2-2);
+      sqlite3VdbeAddOp3(v, OP_Divide,  regTemp2, regLast, regLast);
+      sqlite3VdbeJumpHere(v, addr);
+    }
+
+    /* Zero the regSampleno and regRecno registers. */
+    sqlite3VdbeAddOp2(v, OP_Integer, 0, regSampleno);
+    sqlite3VdbeAddOp2(v, OP_Integer, 0, regRecno);
+    sqlite3VdbeAddOp2(v, OP_Copy, regFirst, regSamplerecno);
+#endif
+
+    /* The block of memory cells initialized here is used as follows.
+    **
+    **    iMem:                
+    **        The total number of rows in the table.
+    **
+    **    iMem+1 .. iMem+nCol: 
+    **        Number of distinct entries in index considering the 
+    **        left-most N columns only, where N is between 1 and nCol, 
+    **        inclusive.
+    **
+    **    iMem+nCol+1 .. Mem+2*nCol:  
+    **        Previous value of indexed columns, from left to right.
+    **
+    ** Cells iMem through iMem+nCol are initialized to 0. The others are 
+    ** initialized to contain an SQL NULL.
+    */
+    for(i=0; i<=nCol; i++){
+      sqlite3VdbeAddOp2(v, OP_Integer, 0, iMem+i);
+    }
+    for(i=0; i<nCol; i++){
+      sqlite3VdbeAddOp2(v, OP_Null, 0, iMem+nCol+i+1);
+    }
+
+    /* Start the analysis loop. This loop runs through all the entries in
+    ** the index b-tree.  */
+    endOfLoop = sqlite3VdbeMakeLabel(v);
+    sqlite3VdbeAddOp2(v, OP_Rewind, iIdxCur, endOfLoop);
+    topOfLoop = sqlite3VdbeCurrentAddr(v);
+    sqlite3VdbeAddOp2(v, OP_AddImm, iMem, 1);
+
+    for(i=0; i<nCol; i++){
+      CollSeq *pColl;
+      sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, i, regCol);
+      if( i==0 ){
+#ifdef SQLITE_ENABLE_STAT2
+        /* Check if the record that cursor iIdxCur points to contains a
+        ** value that should be stored in the sqlite_stat2 table. If so,
+        ** store it.  */
+        int ne = sqlite3VdbeAddOp3(v, OP_Ne, regRecno, 0, regSamplerecno);
+        assert( regTabname+1==regIdxname 
+             && regTabname+2==regSampleno
+             && regTabname+3==regCol
+        );
+        sqlite3VdbeChangeP5(v, SQLITE_JUMPIFNULL);
+        sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 4, regRec, "aaab", 0);
+        sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur+1, regRowid);
+        sqlite3VdbeAddOp3(v, OP_Insert, iStatCur+1, regRec, regRowid);
+
+        /* Calculate new values for regSamplerecno and regSampleno.
+        **
+        **   sampleno = sampleno + 1
+        **   samplerecno = samplerecno+(remaining records)/(remaining samples)
+        */
+        sqlite3VdbeAddOp2(v, OP_AddImm, regSampleno, 1);
+        sqlite3VdbeAddOp3(v, OP_Subtract, regRecno, regLast, regTemp);
+        sqlite3VdbeAddOp2(v, OP_AddImm, regTemp, -1);
+        sqlite3VdbeAddOp2(v, OP_Integer, SQLITE_INDEX_SAMPLES, regTemp2);
+        sqlite3VdbeAddOp3(v, OP_Subtract, regSampleno, regTemp2, regTemp2);
+        sqlite3VdbeAddOp3(v, OP_Divide, regTemp2, regTemp, regTemp);
+        sqlite3VdbeAddOp3(v, OP_Add, regSamplerecno, regTemp, regSamplerecno);
+
+        sqlite3VdbeJumpHere(v, ne);
+        sqlite3VdbeAddOp2(v, OP_AddImm, regRecno, 1);
+#endif
+
+        /* Always record the very first row */
+        sqlite3VdbeAddOp1(v, OP_IfNot, iMem+1);
+      }
+      assert( pIdx->azColl!=0 );
+      assert( pIdx->azColl[i]!=0 );
+      pColl = sqlite3LocateCollSeq(pParse, pIdx->azColl[i]);
+      sqlite3VdbeAddOp4(v, OP_Ne, regCol, 0, iMem+nCol+i+1,
+                       (char*)pColl, P4_COLLSEQ);
+      sqlite3VdbeChangeP5(v, SQLITE_NULLEQ);
+    }
+    if( db->mallocFailed ){
+      /* If a malloc failure has occurred, then the result of the expression 
+      ** passed as the second argument to the call to sqlite3VdbeJumpHere() 
+      ** below may be negative. Which causes an assert() to fail (or an
+      ** out-of-bounds write if SQLITE_DEBUG is not defined).  */
+      return;
+    }
+    sqlite3VdbeAddOp2(v, OP_Goto, 0, endOfLoop);
+    for(i=0; i<nCol; i++){
+      int addr2 = sqlite3VdbeCurrentAddr(v) - (nCol*2);
+      if( i==0 ){
+        sqlite3VdbeJumpHere(v, addr2-1);  /* Set jump dest for the OP_IfNot */
+      }
+      sqlite3VdbeJumpHere(v, addr2);      /* Set jump dest for the OP_Ne */
+      sqlite3VdbeAddOp2(v, OP_AddImm, iMem+i+1, 1);
+      sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, i, iMem+nCol+i+1);
+    }
+
+    /* End of the analysis loop. */
+    sqlite3VdbeResolveLabel(v, endOfLoop);
+    sqlite3VdbeAddOp2(v, OP_Next, iIdxCur, topOfLoop);
+    sqlite3VdbeAddOp1(v, OP_Close, iIdxCur);
+
+    /* Store the results in sqlite_stat1.
+    **
+    ** The result is a single row of the sqlite_stat1 table.  The first
+    ** two columns are the names of the table and index.  The third column
+    ** is a string composed of a list of integer statistics about the
+    ** index.  The first integer in the list is the total number of entries
+    ** in the index.  There is one additional integer in the list for each
+    ** column of the table.  This additional integer is a guess of how many
+    ** rows of the table the index will select.  If D is the count of distinct
+    ** values and K is the total number of rows, then the integer is computed
+    ** as:
+    **
+    **        I = (K+D-1)/D
+    **
+    ** If K==0 then no entry is made into the sqlite_stat1 table.  
+    ** If K>0 then it is always the case the D>0 so division by zero
+    ** is never possible.
+    */
+    sqlite3VdbeAddOp2(v, OP_SCopy, iMem, regSampleno);
+    if( jZeroRows<0 ){
+      jZeroRows = sqlite3VdbeAddOp1(v, OP_IfNot, iMem);
+    }
+    for(i=0; i<nCol; i++){
+      sqlite3VdbeAddOp4(v, OP_String8, 0, regTemp, 0, " ", 0);
+      sqlite3VdbeAddOp3(v, OP_Concat, regTemp, regSampleno, regSampleno);
+      sqlite3VdbeAddOp3(v, OP_Add, iMem, iMem+i+1, regTemp);
+      sqlite3VdbeAddOp2(v, OP_AddImm, regTemp, -1);
+      sqlite3VdbeAddOp3(v, OP_Divide, iMem+i+1, regTemp, regTemp);
+      sqlite3VdbeAddOp1(v, OP_ToInt, regTemp);
+      sqlite3VdbeAddOp3(v, OP_Concat, regTemp, regSampleno, regSampleno);
+    }
+    sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 3, regRec, "aaa", 0);
+    sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regRowid);
+    sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regRec, regRowid);
+    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
+  }
+
+  /* If the table has no indices, create a single sqlite_stat1 entry
+  ** containing NULL as the index name and the row count as the content.
+  */
+  if( pTab->pIndex==0 ){
+    sqlite3VdbeAddOp3(v, OP_OpenRead, iIdxCur, pTab->tnum, iDb);
+    VdbeComment((v, "%s", pTab->zName));
+    sqlite3VdbeAddOp2(v, OP_Count, iIdxCur, regSampleno);
+    sqlite3VdbeAddOp1(v, OP_Close, iIdxCur);
+    jZeroRows = sqlite3VdbeAddOp1(v, OP_IfNot, regSampleno);
+  }else{
+    sqlite3VdbeJumpHere(v, jZeroRows);
+    jZeroRows = sqlite3VdbeAddOp0(v, OP_Goto);
+  }
+  sqlite3VdbeAddOp2(v, OP_Null, 0, regIdxname);
+  sqlite3VdbeAddOp4(v, OP_MakeRecord, regTabname, 3, regRec, "aaa", 0);
+  sqlite3VdbeAddOp2(v, OP_NewRowid, iStatCur, regRowid);
+  sqlite3VdbeAddOp3(v, OP_Insert, iStatCur, regRec, regRowid);
+  sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
+  if( pParse->nMem<regRec ) pParse->nMem = regRec;
+  sqlite3VdbeJumpHere(v, jZeroRows);
+}
+
+/*
+** Generate code that will cause the most recent index analysis to
+** be loaded into internal hash tables where is can be used.
+*/
+static void loadAnalysis(Parse *pParse, int iDb){
+  Vdbe *v = sqlite3GetVdbe(pParse);
+  if( v ){
+    sqlite3VdbeAddOp1(v, OP_LoadAnalysis, iDb);
+  }
+}
+
+/*
+** Generate code that will do an analysis of an entire database
+*/
+static void analyzeDatabase(Parse *pParse, int iDb){
+  sqlite3 *db = pParse->db;
+  Schema *pSchema = db->aDb[iDb].pSchema;    /* Schema of database iDb */
+  HashElem *k;
+  int iStatCur;
+  int iMem;
+
+  sqlite3BeginWriteOperation(pParse, 0, iDb);
+  iStatCur = pParse->nTab;
+  pParse->nTab += 2;
+  openStatTable(pParse, iDb, iStatCur, 0, 0);
+  iMem = pParse->nMem+1;
+  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+  for(k=sqliteHashFirst(&pSchema->tblHash); k; k=sqliteHashNext(k)){
+    Table *pTab = (Table*)sqliteHashData(k);
+    analyzeOneTable(pParse, pTab, 0, iStatCur, iMem);
+  }
+  loadAnalysis(pParse, iDb);
+}
+
+/*
+** Generate code that will do an analysis of a single table in
+** a database.  If pOnlyIdx is not NULL then it is a single index
+** in pTab that should be analyzed.
+*/
+static void analyzeTable(Parse *pParse, Table *pTab, Index *pOnlyIdx){
+  int iDb;
+  int iStatCur;
+
+  assert( pTab!=0 );
+  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
+  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
+  sqlite3BeginWriteOperation(pParse, 0, iDb);
+  iStatCur = pParse->nTab;
+  pParse->nTab += 2;
+  if( pOnlyIdx ){
+    openStatTable(pParse, iDb, iStatCur, pOnlyIdx->zName, "idx");
+  }else{
+    openStatTable(pParse, iDb, iStatCur, pTab->zName, "tbl");
+  }
+  analyzeOneTable(pParse, pTab, pOnlyIdx, iStatCur, pParse->nMem+1);
+  loadAnalysis(pParse, iDb);
+}
+
+/*
+** Generate code for the ANALYZE command.  The parser calls this routine
+** when it recognizes an ANALYZE command.
+**
+**        ANALYZE                            -- 1
+**        ANALYZE  <database>                -- 2
+**        ANALYZE  ?<database>.?<tablename>  -- 3
+**
+** Form 1 causes all indices in all attached databases to be analyzed.
+** Form 2 analyzes all indices the single database named.
+** Form 3 analyzes all indices associated with the named table.
+*/
+SQLITE_PRIVATE void sqlite3Analyze(Parse *pParse, Token *pName1, Token *pName2){
+  sqlite3 *db = pParse->db;
+  int iDb;
+  int i;
+  char *z, *zDb;
+  Table *pTab;
+  Index *pIdx;
+  Token *pTableName;
+
+  /* Read the database schema. If an error occurs, leave an error message
+  ** and code in pParse and return NULL. */
+  assert( sqlite3BtreeHoldsAllMutexes(pParse->db) );
+  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
+    return;
+  }
+
+  assert( pName2!=0 || pName1==0 );
+  if( pName1==0 ){
+    /* Form 1:  Analyze everything */
+    for(i=0; i<db->nDb; i++){
+      if( i==1 ) continue;  /* Do not analyze the TEMP database */
+      analyzeDatabase(pParse, i);
+    }
+  }else if( pName2->n==0 ){
+    /* Form 2:  Analyze the database or table named */
+    iDb = sqlite3FindDb(db, pName1);
+    if( iDb>=0 ){
+      analyzeDatabase(pParse, iDb);
+    }else{
+      z = sqlite3NameFromToken(db, pName1);
+      if( z ){
+        if( (pIdx = sqlite3FindIndex(db, z, 0))!=0 ){
+          analyzeTable(pParse, pIdx->pTable, pIdx);
+        }else if( (pTab = sqlite3LocateTable(pParse, 0, z, 0))!=0 ){
+          analyzeTable(pParse, pTab, 0);
+        }
+        sqlite3DbFree(db, z);
+      }
+    }
+  }else{
+    /* Form 3: Analyze the fully qualified table name */
+    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pTableName);
+    if( iDb>=0 ){
+      zDb = db->aDb[iDb].zName;
+      z = sqlite3NameFromToken(db, pTableName);
+      if( z ){
+        if( (pIdx = sqlite3FindIndex(db, z, zDb))!=0 ){
+          analyzeTable(pParse, pIdx->pTable, pIdx);
+        }else if( (pTab = sqlite3LocateTable(pParse, 0, z, zDb))!=0 ){
+          analyzeTable(pParse, pTab, 0);
+        }
+        sqlite3DbFree(db, z);
+      }
+    }   
+  }
+}
+
+/*
+** Used to pass information from the analyzer reader through to the
+** callback routine.
+*/
+typedef struct analysisInfo analysisInfo;
+struct analysisInfo {
+  sqlite3 *db;
+  const char *zDatabase;
+};
+
+/*
+** This callback is invoked once for each index when reading the
+** sqlite_stat1 table.  
+**
+**     argv[0] = name of the table
+**     argv[1] = name of the index (might be NULL)
+**     argv[2] = results of analysis - on integer for each column
+**
+** Entries for which argv[1]==NULL simply record the number of rows in
+** the table.
+*/
+static int analysisLoader(void *pData, int argc, char **argv, char **NotUsed){
+  analysisInfo *pInfo = (analysisInfo*)pData;
+  Index *pIndex;
+  Table *pTable;
+  int i, c, n;
+  unsigned int v;
+  const char *z;
+
+  assert( argc==3 );
+  UNUSED_PARAMETER2(NotUsed, argc);
+
+  if( argv==0 || argv[0]==0 || argv[2]==0 ){
+    return 0;
+  }
+  pTable = sqlite3FindTable(pInfo->db, argv[0], pInfo->zDatabase);
+  if( pTable==0 ){
+    return 0;
+  }
+  if( argv[1] ){
+    pIndex = sqlite3FindIndex(pInfo->db, argv[1], pInfo->zDatabase);
+  }else{
+    pIndex = 0;
+  }
+  n = pIndex ? pIndex->nColumn : 0;
+  z = argv[2];
+  for(i=0; *z && i<=n; i++){
+    v = 0;
+    while( (c=z[0])>='0' && c<='9' ){
+      v = v*10 + c - '0';
+      z++;
+    }
+    if( i==0 ) pTable->nRowEst = v;
+    if( pIndex==0 ) break;
+    pIndex->aiRowEst[i] = v;
+    if( *z==' ' ) z++;
+    if( memcmp(z, "unordered", 10)==0 ){
+      pIndex->bUnordered = 1;
+      break;
+    }
+  }
+  return 0;
+}
+
+/*
+** If the Index.aSample variable is not NULL, delete the aSample[] array
+** and its contents.
+*/
+SQLITE_PRIVATE void sqlite3DeleteIndexSamples(sqlite3 *db, Index *pIdx){
+#ifdef SQLITE_ENABLE_STAT2
+  if( pIdx->aSample ){
+    int j;
+    for(j=0; j<SQLITE_INDEX_SAMPLES; j++){
+      IndexSample *p = &pIdx->aSample[j];
+      if( p->eType==SQLITE_TEXT || p->eType==SQLITE_BLOB ){
+        sqlite3DbFree(db, p->u.z);
+      }
+    }
+    sqlite3DbFree(db, pIdx->aSample);
+  }
+#else
+  UNUSED_PARAMETER(db);
+  UNUSED_PARAMETER(pIdx);
+#endif
+}
+
+/*
+** Load the content of the sqlite_stat1 and sqlite_stat2 tables. The
+** contents of sqlite_stat1 are used to populate the Index.aiRowEst[]
+** arrays. The contents of sqlite_stat2 are used to populate the
+** Index.aSample[] arrays.
+**
+** If the sqlite_stat1 table is not present in the database, SQLITE_ERROR
+** is returned. In this case, even if SQLITE_ENABLE_STAT2 was defined 
+** during compilation and the sqlite_stat2 table is present, no data is 
+** read from it.
+**
+** If SQLITE_ENABLE_STAT2 was defined during compilation and the 
+** sqlite_stat2 table is not present in the database, SQLITE_ERROR is
+** returned. However, in this case, data is read from the sqlite_stat1
+** table (if it is present) before returning.
+**
+** If an OOM error occurs, this function always sets db->mallocFailed.
+** This means if the caller does not care about other errors, the return
+** code may be ignored.
+*/
+SQLITE_PRIVATE int sqlite3AnalysisLoad(sqlite3 *db, int iDb){
+  analysisInfo sInfo;
+  HashElem *i;
+  char *zSql;
+  int rc;
+
+  assert( iDb>=0 && iDb<db->nDb );
+  assert( db->aDb[iDb].pBt!=0 );
+
+  /* Clear any prior statistics */
+  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+  for(i=sqliteHashFirst(&db->aDb[iDb].pSchema->idxHash);i;i=sqliteHashNext(i)){
+    Index *pIdx = sqliteHashData(i);
+    sqlite3DefaultRowEst(pIdx);
+    sqlite3DeleteIndexSamples(db, pIdx);
+    pIdx->aSample = 0;
+  }
+
+  /* Check to make sure the sqlite_stat1 table exists */
+  sInfo.db = db;
+  sInfo.zDatabase = db->aDb[iDb].zName;
+  if( sqlite3FindTable(db, "sqlite_stat1", sInfo.zDatabase)==0 ){
+    return SQLITE_ERROR;
+  }
+
+  /* Load new statistics out of the sqlite_stat1 table */
+  zSql = sqlite3MPrintf(db, 
+      "SELECT tbl, idx, stat FROM %Q.sqlite_stat1", sInfo.zDatabase);
+  if( zSql==0 ){
+    rc = SQLITE_NOMEM;
+  }else{
+    rc = sqlite3_exec(db, zSql, analysisLoader, &sInfo, 0);
+    sqlite3DbFree(db, zSql);
+  }
+
+
+  /* Load the statistics from the sqlite_stat2 table. */
+#ifdef SQLITE_ENABLE_STAT2
+  if( rc==SQLITE_OK && !sqlite3FindTable(db, "sqlite_stat2", sInfo.zDatabase) ){
+    rc = SQLITE_ERROR;
+  }
+  if( rc==SQLITE_OK ){
+    sqlite3_stmt *pStmt = 0;
+
+    zSql = sqlite3MPrintf(db, 
+        "SELECT idx,sampleno,sample FROM %Q.sqlite_stat2", sInfo.zDatabase);
+    if( !zSql ){
+      rc = SQLITE_NOMEM;
+    }else{
+      rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);
+      sqlite3DbFree(db, zSql);
+    }
+
+    if( rc==SQLITE_OK ){
+      while( sqlite3_step(pStmt)==SQLITE_ROW ){
+        char *zIndex;   /* Index name */
+        Index *pIdx;    /* Pointer to the index object */
+
+        zIndex = (char *)sqlite3_column_text(pStmt, 0);
+        pIdx = zIndex ? sqlite3FindIndex(db, zIndex, sInfo.zDatabase) : 0;
+        if( pIdx ){
+          int iSample = sqlite3_column_int(pStmt, 1);
+          if( iSample<SQLITE_INDEX_SAMPLES && iSample>=0 ){
+            int eType = sqlite3_column_type(pStmt, 2);
+
+            if( pIdx->aSample==0 ){
+              static const int sz = sizeof(IndexSample)*SQLITE_INDEX_SAMPLES;
+              pIdx->aSample = (IndexSample *)sqlite3DbMallocRaw(0, sz);
+              if( pIdx->aSample==0 ){
+                db->mallocFailed = 1;
+                break;
+              }
+	      memset(pIdx->aSample, 0, sz);
+            }
+
+            assert( pIdx->aSample );
+            {
+              IndexSample *pSample = &pIdx->aSample[iSample];
+              pSample->eType = (u8)eType;
+              if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
+                pSample->u.r = sqlite3_column_double(pStmt, 2);
+              }else if( eType==SQLITE_TEXT || eType==SQLITE_BLOB ){
+                const char *z = (const char *)(
+                    (eType==SQLITE_BLOB) ?
+                    sqlite3_column_blob(pStmt, 2):
+                    sqlite3_column_text(pStmt, 2)
+                );
+                int n = sqlite3_column_bytes(pStmt, 2);
+                if( n>24 ){
+                  n = 24;
+                }
+                pSample->nByte = (u8)n;
+                if( n < 1){
+                  pSample->u.z = 0;
+                }else{
+                  pSample->u.z = sqlite3DbStrNDup(0, z, n);
+                  if( pSample->u.z==0 ){
+                    db->mallocFailed = 1;
+                    break;
+                  }
+                }
+              }
+            }
+          }
+        }
+      }
+      rc = sqlite3_finalize(pStmt);
+    }
+  }
+#endif
+
+  if( rc==SQLITE_NOMEM ){
+    db->mallocFailed = 1;
+  }
+  return rc;
+}
+
+
+#endif /* SQLITE_OMIT_ANALYZE */
+
+/************** End of analyze.c *********************************************/
+/************** Begin file attach.c ******************************************/
+/*
+** 2003 April 6
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains code used to implement the ATTACH and DETACH commands.
+*/
+
+#ifndef SQLITE_OMIT_ATTACH
+/*
+** Resolve an expression that was part of an ATTACH or DETACH statement. This
+** is slightly different from resolving a normal SQL expression, because simple
+** identifiers are treated as strings, not possible column names or aliases.
+**
+** i.e. if the parser sees:
+**
+**     ATTACH DATABASE abc AS def
+**
+** it treats the two expressions as literal strings 'abc' and 'def' instead of
+** looking for columns of the same name.
+**
+** This only applies to the root node of pExpr, so the statement:
+**
+**     ATTACH DATABASE abc||def AS 'db2'
+**
+** will fail because neither abc or def can be resolved.
+*/
+static int resolveAttachExpr(NameContext *pName, Expr *pExpr)
+{
+  int rc = SQLITE_OK;
+  if( pExpr ){
+    if( pExpr->op!=TK_ID ){
+      rc = sqlite3ResolveExprNames(pName, pExpr);
+      if( rc==SQLITE_OK && !sqlite3ExprIsConstant(pExpr) ){
+        sqlite3ErrorMsg(pName->pParse, "invalid name: \"%s\"", pExpr->u.zToken);
+        return SQLITE_ERROR;
+      }
+    }else{
+      pExpr->op = TK_STRING;
+    }
+  }
+  return rc;
+}
+
+/*
+** An SQL user-function registered to do the work of an ATTACH statement. The
+** three arguments to the function come directly from an attach statement:
+**
+**     ATTACH DATABASE x AS y KEY z
+**
+**     SELECT sqlite_attach(x, y, z)
+**
+** If the optional "KEY z" syntax is omitted, an SQL NULL is passed as the
+** third argument.
+*/
+static void attachFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **argv
+){
+  int i;
+  int rc = 0;
+  sqlite3 *db = sqlite3_context_db_handle(context);
+  const char *zName;
+  const char *zFile;
+  Db *aNew;
+  char *zErrDyn = 0;
+
+  UNUSED_PARAMETER(NotUsed);
+
+  zFile = (const char *)sqlite3_value_text(argv[0]);
+  zName = (const char *)sqlite3_value_text(argv[1]);
+  if( zFile==0 ) zFile = "";
+  if( zName==0 ) zName = "";
+
+  /* Check for the following errors:
+  **
+  **     * Too many attached databases,
+  **     * Transaction currently open
+  **     * Specified database name already being used.
+  */
+  if( db->nDb>=db->aLimit[SQLITE_LIMIT_ATTACHED]+2 ){
+    zErrDyn = sqlite3MPrintf(db, "too many attached databases - max %d", 
+      db->aLimit[SQLITE_LIMIT_ATTACHED]
+    );
+    goto attach_error;
+  }
+  if( !db->autoCommit ){
+    zErrDyn = sqlite3MPrintf(db, "cannot ATTACH database within transaction");
+    goto attach_error;
+  }
+  for(i=0; i<db->nDb; i++){
+    char *z = db->aDb[i].zName;
+    assert( z && zName );
+    if( sqlite3StrICmp(z, zName)==0 ){
+      zErrDyn = sqlite3MPrintf(db, "database %s is already in use", zName);
+      goto attach_error;
+    }
+  }
+
+  /* Allocate the new entry in the db->aDb[] array and initialise the schema
+  ** hash tables.
+  */
+  if( db->aDb==db->aDbStatic ){
+    aNew = sqlite3DbMallocRaw(db, sizeof(db->aDb[0])*3 );
+    if( aNew==0 ) return;
+    memcpy(aNew, db->aDb, sizeof(db->aDb[0])*2);
+  }else{
+    aNew = sqlite3DbRealloc(db, db->aDb, sizeof(db->aDb[0])*(db->nDb+1) );
+    if( aNew==0 ) return;
+  }
+  db->aDb = aNew;
+  aNew = &db->aDb[db->nDb];
+  memset(aNew, 0, sizeof(*aNew));
+
+  /* Open the database file. If the btree is successfully opened, use
+  ** it to obtain the database schema. At this point the schema may
+  ** or may not be initialised.
+  */
+  rc = sqlite3BtreeOpen(zFile, db, &aNew->pBt, 0,
+                        db->openFlags | SQLITE_OPEN_MAIN_DB);
+  db->nDb++;
+  if( rc==SQLITE_CONSTRAINT ){
+    rc = SQLITE_ERROR;
+    zErrDyn = sqlite3MPrintf(db, "database is already attached");
+  }else if( rc==SQLITE_OK ){
+    Pager *pPager;
+    aNew->pSchema = sqlite3SchemaGet(db, aNew->pBt);
+    if( !aNew->pSchema ){
+      rc = SQLITE_NOMEM;
+    }else if( aNew->pSchema->file_format && aNew->pSchema->enc!=ENC(db) ){
+      zErrDyn = sqlite3MPrintf(db, 
+        "attached databases must use the same text encoding as main database");
+      rc = SQLITE_ERROR;
+    }
+    pPager = sqlite3BtreePager(aNew->pBt);
+    sqlite3PagerLockingMode(pPager, db->dfltLockMode);
+    sqlite3BtreeSecureDelete(aNew->pBt,
+                             sqlite3BtreeSecureDelete(db->aDb[0].pBt,-1) );
+  }
+  aNew->safety_level = 3;
+  aNew->zName = sqlite3DbStrDup(db, zName);
+  if( rc==SQLITE_OK && aNew->zName==0 ){
+    rc = SQLITE_NOMEM;
+  }
+
+
+#ifdef SQLITE_HAS_CODEC
+  if( rc==SQLITE_OK ){
+    extern int sqlite3CodecAttach(sqlite3*, int, const void*, int);
+    extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
+    int nKey;
+    char *zKey;
+    int t = sqlite3_value_type(argv[2]);
+    switch( t ){
+      case SQLITE_INTEGER:
+      case SQLITE_FLOAT:
+        zErrDyn = sqlite3DbStrDup(db, "Invalid key value");
+        rc = SQLITE_ERROR;
+        break;
+        
+      case SQLITE_TEXT:
+      case SQLITE_BLOB:
+        nKey = sqlite3_value_bytes(argv[2]);
+        zKey = (char *)sqlite3_value_blob(argv[2]);
+        rc = sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
+        break;
+
+      case SQLITE_NULL:
+        /* No key specified.  Use the key from the main database */
+        sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey);
+        if( nKey>0 || sqlite3BtreeGetReserve(db->aDb[0].pBt)>0 ){
+          rc = sqlite3CodecAttach(db, db->nDb-1, zKey, nKey);
+        }
+        break;
+    }
+  }
+#endif
+
+  /* If the file was opened successfully, read the schema for the new database.
+  ** If this fails, or if opening the file failed, then close the file and 
+  ** remove the entry from the db->aDb[] array. i.e. put everything back the way
+  ** we found it.
+  */
+  if( rc==SQLITE_OK ){
+    sqlite3BtreeEnterAll(db);
+    rc = sqlite3Init(db, &zErrDyn);
+    sqlite3BtreeLeaveAll(db);
+  }
+  if( rc ){
+    int iDb = db->nDb - 1;
+    assert( iDb>=2 );
+    if( db->aDb[iDb].pBt ){
+      sqlite3BtreeClose(db->aDb[iDb].pBt);
+      db->aDb[iDb].pBt = 0;
+      db->aDb[iDb].pSchema = 0;
+    }
+    sqlite3ResetInternalSchema(db, -1);
+    db->nDb = iDb;
+    if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){
+      db->mallocFailed = 1;
+      sqlite3DbFree(db, zErrDyn);
+      zErrDyn = sqlite3MPrintf(db, "out of memory");
+    }else if( zErrDyn==0 ){
+      zErrDyn = sqlite3MPrintf(db, "unable to open database: %s", zFile);
+    }
+    goto attach_error;
+  }
+  
+  return;
+
+attach_error:
+  /* Return an error if we get here */
+  if( zErrDyn ){
+    sqlite3_result_error(context, zErrDyn, -1);
+    sqlite3DbFree(db, zErrDyn);
+  }
+  if( rc ) sqlite3_result_error_code(context, rc);
+}
+
+/*
+** An SQL user-function registered to do the work of an DETACH statement. The
+** three arguments to the function come directly from a detach statement:
+**
+**     DETACH DATABASE x
+**
+**     SELECT sqlite_detach(x)
+*/
+static void detachFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **argv
+){
+  const char *zName = (const char *)sqlite3_value_text(argv[0]);
+  sqlite3 *db = sqlite3_context_db_handle(context);
+  int i;
+  Db *pDb = 0;
+  char zErr[128];
+
+  UNUSED_PARAMETER(NotUsed);
+
+  if( zName==0 ) zName = "";
+  for(i=0; i<db->nDb; i++){
+    pDb = &db->aDb[i];
+    if( pDb->pBt==0 ) continue;
+    if( sqlite3StrICmp(pDb->zName, zName)==0 ) break;
+  }
+
+  if( i>=db->nDb ){
+    sqlite3_snprintf(sizeof(zErr),zErr, "no such database: %s", zName);
+    goto detach_error;
+  }
+  if( i<2 ){
+    sqlite3_snprintf(sizeof(zErr),zErr, "cannot detach database %s", zName);
+    goto detach_error;
+  }
+  if( !db->autoCommit ){
+    sqlite3_snprintf(sizeof(zErr), zErr,
+                     "cannot DETACH database within transaction");
+    goto detach_error;
+  }
+  if( sqlite3BtreeIsInReadTrans(pDb->pBt) || sqlite3BtreeIsInBackup(pDb->pBt) ){
+    sqlite3_snprintf(sizeof(zErr),zErr, "database %s is locked", zName);
+    goto detach_error;
+  }
+
+  sqlite3BtreeClose(pDb->pBt);
+  pDb->pBt = 0;
+  pDb->pSchema = 0;
+  sqlite3ResetInternalSchema(db, -1);
+  return;
+
+detach_error:
+  sqlite3_result_error(context, zErr, -1);
+}
+
+/*
+** This procedure generates VDBE code for a single invocation of either the
+** sqlite_detach() or sqlite_attach() SQL user functions.
+*/
+static void codeAttach(
+  Parse *pParse,       /* The parser context */
+  int type,            /* Either SQLITE_ATTACH or SQLITE_DETACH */
+  FuncDef const *pFunc,/* FuncDef wrapper for detachFunc() or attachFunc() */
+  Expr *pAuthArg,      /* Expression to pass to authorization callback */
+  Expr *pFilename,     /* Name of database file */
+  Expr *pDbname,       /* Name of the database to use internally */
+  Expr *pKey           /* Database key for encryption extension */
+){
+  int rc;
+  NameContext sName;
+  Vdbe *v;
+  sqlite3* db = pParse->db;
+  int regArgs;
+
+  memset(&sName, 0, sizeof(NameContext));
+  sName.pParse = pParse;
+
+  if( 
+      SQLITE_OK!=(rc = resolveAttachExpr(&sName, pFilename)) ||
+      SQLITE_OK!=(rc = resolveAttachExpr(&sName, pDbname)) ||
+      SQLITE_OK!=(rc = resolveAttachExpr(&sName, pKey))
+  ){
+    pParse->nErr++;
+    goto attach_end;
+  }
+
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  if( pAuthArg ){
+    char *zAuthArg;
+    if( pAuthArg->op==TK_STRING ){
+      zAuthArg = pAuthArg->u.zToken;
+    }else{
+      zAuthArg = 0;
+    }
+    rc = sqlite3AuthCheck(pParse, type, zAuthArg, 0, 0);
+    if(rc!=SQLITE_OK ){
+      goto attach_end;
+    }
+  }
+#endif /* SQLITE_OMIT_AUTHORIZATION */
+
+
+  v = sqlite3GetVdbe(pParse);
+  regArgs = sqlite3GetTempRange(pParse, 4);
+  sqlite3ExprCode(pParse, pFilename, regArgs);
+  sqlite3ExprCode(pParse, pDbname, regArgs+1);
+  sqlite3ExprCode(pParse, pKey, regArgs+2);
+
+  assert( v || db->mallocFailed );
+  if( v ){
+    sqlite3VdbeAddOp3(v, OP_Function, 0, regArgs+3-pFunc->nArg, regArgs+3);
+    assert( pFunc->nArg==-1 || (pFunc->nArg&0xff)==pFunc->nArg );
+    sqlite3VdbeChangeP5(v, (u8)(pFunc->nArg));
+    sqlite3VdbeChangeP4(v, -1, (char *)pFunc, P4_FUNCDEF);
+
+    /* Code an OP_Expire. For an ATTACH statement, set P1 to true (expire this
+    ** statement only). For DETACH, set it to false (expire all existing
+    ** statements).
+    */
+    sqlite3VdbeAddOp1(v, OP_Expire, (type==SQLITE_ATTACH));
+  }
+  
+attach_end:
+  sqlite3ExprDelete(db, pFilename);
+  sqlite3ExprDelete(db, pDbname);
+  sqlite3ExprDelete(db, pKey);
+}
+
+/*
+** Called by the parser to compile a DETACH statement.
+**
+**     DETACH pDbname
+*/
+SQLITE_PRIVATE void sqlite3Detach(Parse *pParse, Expr *pDbname){
+  static const FuncDef detach_func = {
+    1,                /* nArg */
+    SQLITE_UTF8,      /* iPrefEnc */
+    0,                /* flags */
+    0,                /* pUserData */
+    0,                /* pNext */
+    detachFunc,       /* xFunc */
+    0,                /* xStep */
+    0,                /* xFinalize */
+    "sqlite_detach",  /* zName */
+    0,                /* pHash */
+    0                 /* pDestructor */
+  };
+  codeAttach(pParse, SQLITE_DETACH, &detach_func, pDbname, 0, 0, pDbname);
+}
+
+/*
+** Called by the parser to compile an ATTACH statement.
+**
+**     ATTACH p AS pDbname KEY pKey
+*/
+SQLITE_PRIVATE void sqlite3Attach(Parse *pParse, Expr *p, Expr *pDbname, Expr *pKey){
+  static const FuncDef attach_func = {
+    3,                /* nArg */
+    SQLITE_UTF8,      /* iPrefEnc */
+    0,                /* flags */
+    0,                /* pUserData */
+    0,                /* pNext */
+    attachFunc,       /* xFunc */
+    0,                /* xStep */
+    0,                /* xFinalize */
+    "sqlite_attach",  /* zName */
+    0,                /* pHash */
+    0                 /* pDestructor */
+  };
+  codeAttach(pParse, SQLITE_ATTACH, &attach_func, p, p, pDbname, pKey);
+}
+#endif /* SQLITE_OMIT_ATTACH */
+
+/*
+** Initialize a DbFixer structure.  This routine must be called prior
+** to passing the structure to one of the sqliteFixAAAA() routines below.
+**
+** The return value indicates whether or not fixation is required.  TRUE
+** means we do need to fix the database references, FALSE means we do not.
+*/
+SQLITE_PRIVATE int sqlite3FixInit(
+  DbFixer *pFix,      /* The fixer to be initialized */
+  Parse *pParse,      /* Error messages will be written here */
+  int iDb,            /* This is the database that must be used */
+  const char *zType,  /* "view", "trigger", or "index" */
+  const Token *pName  /* Name of the view, trigger, or index */
+){
+  sqlite3 *db;
+
+  if( NEVER(iDb<0) || iDb==1 ) return 0;
+  db = pParse->db;
+  assert( db->nDb>iDb );
+  pFix->pParse = pParse;
+  pFix->zDb = db->aDb[iDb].zName;
+  pFix->zType = zType;
+  pFix->pName = pName;
+  return 1;
+}
+
+/*
+** The following set of routines walk through the parse tree and assign
+** a specific database to all table references where the database name
+** was left unspecified in the original SQL statement.  The pFix structure
+** must have been initialized by a prior call to sqlite3FixInit().
+**
+** These routines are used to make sure that an index, trigger, or
+** view in one database does not refer to objects in a different database.
+** (Exception: indices, triggers, and views in the TEMP database are
+** allowed to refer to anything.)  If a reference is explicitly made
+** to an object in a different database, an error message is added to
+** pParse->zErrMsg and these routines return non-zero.  If everything
+** checks out, these routines return 0.
+*/
+SQLITE_PRIVATE int sqlite3FixSrcList(
+  DbFixer *pFix,       /* Context of the fixation */
+  SrcList *pList       /* The Source list to check and modify */
+){
+  int i;
+  const char *zDb;
+  struct SrcList_item *pItem;
+
+  if( NEVER(pList==0) ) return 0;
+  zDb = pFix->zDb;
+  for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
+    if( pItem->zDatabase==0 ){
+      pItem->zDatabase = sqlite3DbStrDup(pFix->pParse->db, zDb);
+    }else if( sqlite3StrICmp(pItem->zDatabase,zDb)!=0 ){
+      sqlite3ErrorMsg(pFix->pParse,
+         "%s %T cannot reference objects in database %s",
+         pFix->zType, pFix->pName, pItem->zDatabase);
+      return 1;
+    }
+#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)
+    if( sqlite3FixSelect(pFix, pItem->pSelect) ) return 1;
+    if( sqlite3FixExpr(pFix, pItem->pOn) ) return 1;
+#endif
+  }
+  return 0;
+}
+#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_TRIGGER)
+SQLITE_PRIVATE int sqlite3FixSelect(
+  DbFixer *pFix,       /* Context of the fixation */
+  Select *pSelect      /* The SELECT statement to be fixed to one database */
+){
+  while( pSelect ){
+    if( sqlite3FixExprList(pFix, pSelect->pEList) ){
+      return 1;
+    }
+    if( sqlite3FixSrcList(pFix, pSelect->pSrc) ){
+      return 1;
+    }
+    if( sqlite3FixExpr(pFix, pSelect->pWhere) ){
+      return 1;
+    }
+    if( sqlite3FixExpr(pFix, pSelect->pHaving) ){
+      return 1;
+    }
+    pSelect = pSelect->pPrior;
+  }
+  return 0;
+}
+SQLITE_PRIVATE int sqlite3FixExpr(
+  DbFixer *pFix,     /* Context of the fixation */
+  Expr *pExpr        /* The expression to be fixed to one database */
+){
+  while( pExpr ){
+    if( ExprHasAnyProperty(pExpr, EP_TokenOnly) ) break;
+    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
+      if( sqlite3FixSelect(pFix, pExpr->x.pSelect) ) return 1;
+    }else{
+      if( sqlite3FixExprList(pFix, pExpr->x.pList) ) return 1;
+    }
+    if( sqlite3FixExpr(pFix, pExpr->pRight) ){
+      return 1;
+    }
+    pExpr = pExpr->pLeft;
+  }
+  return 0;
+}
+SQLITE_PRIVATE int sqlite3FixExprList(
+  DbFixer *pFix,     /* Context of the fixation */
+  ExprList *pList    /* The expression to be fixed to one database */
+){
+  int i;
+  struct ExprList_item *pItem;
+  if( pList==0 ) return 0;
+  for(i=0, pItem=pList->a; i<pList->nExpr; i++, pItem++){
+    if( sqlite3FixExpr(pFix, pItem->pExpr) ){
+      return 1;
+    }
+  }
+  return 0;
+}
+#endif
+
+#ifndef SQLITE_OMIT_TRIGGER
+SQLITE_PRIVATE int sqlite3FixTriggerStep(
+  DbFixer *pFix,     /* Context of the fixation */
+  TriggerStep *pStep /* The trigger step be fixed to one database */
+){
+  while( pStep ){
+    if( sqlite3FixSelect(pFix, pStep->pSelect) ){
+      return 1;
+    }
+    if( sqlite3FixExpr(pFix, pStep->pWhere) ){
+      return 1;
+    }
+    if( sqlite3FixExprList(pFix, pStep->pExprList) ){
+      return 1;
+    }
+    pStep = pStep->pNext;
+  }
+  return 0;
+}
+#endif
+
+/************** End of attach.c **********************************************/
+/************** Begin file auth.c ********************************************/
+/*
+** 2003 January 11
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains code used to implement the sqlite3_set_authorizer()
+** API.  This facility is an optional feature of the library.  Embedded
+** systems that do not need this facility may omit it by recompiling
+** the library with -DSQLITE_OMIT_AUTHORIZATION=1
+*/
+
+/*
+** All of the code in this file may be omitted by defining a single
+** macro.
+*/
+#ifndef SQLITE_OMIT_AUTHORIZATION
+
+/*
+** Set or clear the access authorization function.
+**
+** The access authorization function is be called during the compilation
+** phase to verify that the user has read and/or write access permission on
+** various fields of the database.  The first argument to the auth function
+** is a copy of the 3rd argument to this routine.  The second argument
+** to the auth function is one of these constants:
+**
+**       SQLITE_CREATE_INDEX
+**       SQLITE_CREATE_TABLE
+**       SQLITE_CREATE_TEMP_INDEX
+**       SQLITE_CREATE_TEMP_TABLE
+**       SQLITE_CREATE_TEMP_TRIGGER
+**       SQLITE_CREATE_TEMP_VIEW
+**       SQLITE_CREATE_TRIGGER
+**       SQLITE_CREATE_VIEW
+**       SQLITE_DELETE
+**       SQLITE_DROP_INDEX
+**       SQLITE_DROP_TABLE
+**       SQLITE_DROP_TEMP_INDEX
+**       SQLITE_DROP_TEMP_TABLE
+**       SQLITE_DROP_TEMP_TRIGGER
+**       SQLITE_DROP_TEMP_VIEW
+**       SQLITE_DROP_TRIGGER
+**       SQLITE_DROP_VIEW
+**       SQLITE_INSERT
+**       SQLITE_PRAGMA
+**       SQLITE_READ
+**       SQLITE_SELECT
+**       SQLITE_TRANSACTION
+**       SQLITE_UPDATE
+**
+** The third and fourth arguments to the auth function are the name of
+** the table and the column that are being accessed.  The auth function
+** should return either SQLITE_OK, SQLITE_DENY, or SQLITE_IGNORE.  If
+** SQLITE_OK is returned, it means that access is allowed.  SQLITE_DENY
+** means that the SQL statement will never-run - the sqlite3_exec() call
+** will return with an error.  SQLITE_IGNORE means that the SQL statement
+** should run but attempts to read the specified column will return NULL
+** and attempts to write the column will be ignored.
+**
+** Setting the auth function to NULL disables this hook.  The default
+** setting of the auth function is NULL.
+*/
+SQLITE_API int sqlite3_set_authorizer(
+  sqlite3 *db,
+  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
+  void *pArg
+){
+  sqlite3_mutex_enter(db->mutex);
+  db->xAuth = xAuth;
+  db->pAuthArg = pArg;
+  sqlite3ExpirePreparedStatements(db);
+  sqlite3_mutex_leave(db->mutex);
+  return SQLITE_OK;
+}
+
+/*
+** Write an error message into pParse->zErrMsg that explains that the
+** user-supplied authorization function returned an illegal value.
+*/
+static void sqliteAuthBadReturnCode(Parse *pParse){
+  sqlite3ErrorMsg(pParse, "authorizer malfunction");
+  pParse->rc = SQLITE_ERROR;
+}
+
+/*
+** Invoke the authorization callback for permission to read column zCol from
+** table zTab in database zDb. This function assumes that an authorization
+** callback has been registered (i.e. that sqlite3.xAuth is not NULL).
+**
+** If SQLITE_IGNORE is returned and pExpr is not NULL, then pExpr is changed
+** to an SQL NULL expression. Otherwise, if pExpr is NULL, then SQLITE_IGNORE
+** is treated as SQLITE_DENY. In this case an error is left in pParse.
+*/
+SQLITE_PRIVATE int sqlite3AuthReadCol(
+  Parse *pParse,                  /* The parser context */
+  const char *zTab,               /* Table name */
+  const char *zCol,               /* Column name */
+  int iDb                         /* Index of containing database. */
+){
+  sqlite3 *db = pParse->db;       /* Database handle */
+  char *zDb = db->aDb[iDb].zName; /* Name of attached database */
+  int rc;                         /* Auth callback return code */
+
+  rc = db->xAuth(db->pAuthArg, SQLITE_READ, zTab,zCol,zDb,pParse->zAuthContext);
+  if( rc==SQLITE_DENY ){
+    if( db->nDb>2 || iDb!=0 ){
+      sqlite3ErrorMsg(pParse, "access to %s.%s.%s is prohibited",zDb,zTab,zCol);
+    }else{
+      sqlite3ErrorMsg(pParse, "access to %s.%s is prohibited", zTab, zCol);
+    }
+    pParse->rc = SQLITE_AUTH;
+  }else if( rc!=SQLITE_IGNORE && rc!=SQLITE_OK ){
+    sqliteAuthBadReturnCode(pParse);
+  }
+  return rc;
+}
+
+/*
+** The pExpr should be a TK_COLUMN expression.  The table referred to
+** is in pTabList or else it is the NEW or OLD table of a trigger.  
+** Check to see if it is OK to read this particular column.
+**
+** If the auth function returns SQLITE_IGNORE, change the TK_COLUMN 
+** instruction into a TK_NULL.  If the auth function returns SQLITE_DENY,
+** then generate an error.
+*/
+SQLITE_PRIVATE void sqlite3AuthRead(
+  Parse *pParse,        /* The parser context */
+  Expr *pExpr,          /* The expression to check authorization on */
+  Schema *pSchema,      /* The schema of the expression */
+  SrcList *pTabList     /* All table that pExpr might refer to */
+){
+  sqlite3 *db = pParse->db;
+  Table *pTab = 0;      /* The table being read */
+  const char *zCol;     /* Name of the column of the table */
+  int iSrc;             /* Index in pTabList->a[] of table being read */
+  int iDb;              /* The index of the database the expression refers to */
+  int iCol;             /* Index of column in table */
+
+  if( db->xAuth==0 ) return;
+  iDb = sqlite3SchemaToIndex(pParse->db, pSchema);
+  if( iDb<0 ){
+    /* An attempt to read a column out of a subquery or other
+    ** temporary table. */
+    return;
+  }
+
+  assert( pExpr->op==TK_COLUMN || pExpr->op==TK_TRIGGER );
+  if( pExpr->op==TK_TRIGGER ){
+    pTab = pParse->pTriggerTab;
+  }else{
+    assert( pTabList );
+    for(iSrc=0; ALWAYS(iSrc<pTabList->nSrc); iSrc++){
+      if( pExpr->iTable==pTabList->a[iSrc].iCursor ){
+        pTab = pTabList->a[iSrc].pTab;
+        break;
+      }
+    }
+  }
+  iCol = pExpr->iColumn;
+  if( NEVER(pTab==0) ) return;
+
+  if( iCol>=0 ){
+    assert( iCol<pTab->nCol );
+    zCol = pTab->aCol[iCol].zName;
+  }else if( pTab->iPKey>=0 ){
+    assert( pTab->iPKey<pTab->nCol );
+    zCol = pTab->aCol[pTab->iPKey].zName;
+  }else{
+    zCol = "ROWID";
+  }
+  assert( iDb>=0 && iDb<db->nDb );
+  if( SQLITE_IGNORE==sqlite3AuthReadCol(pParse, pTab->zName, zCol, iDb) ){
+    pExpr->op = TK_NULL;
+  }
+}
+
+/*
+** Do an authorization check using the code and arguments given.  Return
+** either SQLITE_OK (zero) or SQLITE_IGNORE or SQLITE_DENY.  If SQLITE_DENY
+** is returned, then the error count and error message in pParse are
+** modified appropriately.
+*/
+SQLITE_PRIVATE int sqlite3AuthCheck(
+  Parse *pParse,
+  int code,
+  const char *zArg1,
+  const char *zArg2,
+  const char *zArg3
+){
+  sqlite3 *db = pParse->db;
+  int rc;
+
+  /* Don't do any authorization checks if the database is initialising
+  ** or if the parser is being invoked from within sqlite3_declare_vtab.
+  */
+  if( db->init.busy || IN_DECLARE_VTAB ){
+    return SQLITE_OK;
+  }
+
+  if( db->xAuth==0 ){
+    return SQLITE_OK;
+  }
+  rc = db->xAuth(db->pAuthArg, code, zArg1, zArg2, zArg3, pParse->zAuthContext);
+  if( rc==SQLITE_DENY ){
+    sqlite3ErrorMsg(pParse, "not authorized");
+    pParse->rc = SQLITE_AUTH;
+  }else if( rc!=SQLITE_OK && rc!=SQLITE_IGNORE ){
+    rc = SQLITE_DENY;
+    sqliteAuthBadReturnCode(pParse);
+  }
+  return rc;
+}
+
+/*
+** Push an authorization context.  After this routine is called, the
+** zArg3 argument to authorization callbacks will be zContext until
+** popped.  Or if pParse==0, this routine is a no-op.
+*/
+SQLITE_PRIVATE void sqlite3AuthContextPush(
+  Parse *pParse,
+  AuthContext *pContext, 
+  const char *zContext
+){
+  assert( pParse );
+  pContext->pParse = pParse;
+  pContext->zAuthContext = pParse->zAuthContext;
+  pParse->zAuthContext = zContext;
+}
+
+/*
+** Pop an authorization context that was previously pushed
+** by sqlite3AuthContextPush
+*/
+SQLITE_PRIVATE void sqlite3AuthContextPop(AuthContext *pContext){
+  if( pContext->pParse ){
+    pContext->pParse->zAuthContext = pContext->zAuthContext;
+    pContext->pParse = 0;
+  }
+}
+
+#endif /* SQLITE_OMIT_AUTHORIZATION */
+
+/************** End of auth.c ************************************************/
+/************** Begin file build.c *******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains C code routines that are called by the SQLite parser
+** when syntax rules are reduced.  The routines in this file handle the
+** following kinds of SQL syntax:
+**
+**     CREATE TABLE
+**     DROP TABLE
+**     CREATE INDEX
+**     DROP INDEX
+**     creating ID lists
+**     BEGIN TRANSACTION
+**     COMMIT
+**     ROLLBACK
+*/
+
+/*
+** This routine is called when a new SQL statement is beginning to
+** be parsed.  Initialize the pParse structure as needed.
+*/
+SQLITE_PRIVATE void sqlite3BeginParse(Parse *pParse, int explainFlag){
+  pParse->explain = (u8)explainFlag;
+  pParse->nVar = 0;
+}
+
+#ifndef SQLITE_OMIT_SHARED_CACHE
+/*
+** The TableLock structure is only used by the sqlite3TableLock() and
+** codeTableLocks() functions.
+*/
+struct TableLock {
+  int iDb;             /* The database containing the table to be locked */
+  int iTab;            /* The root page of the table to be locked */
+  u8 isWriteLock;      /* True for write lock.  False for a read lock */
+  const char *zName;   /* Name of the table */
+};
+
+/*
+** Record the fact that we want to lock a table at run-time.  
+**
+** The table to be locked has root page iTab and is found in database iDb.
+** A read or a write lock can be taken depending on isWritelock.
+**
+** This routine just records the fact that the lock is desired.  The
+** code to make the lock occur is generated by a later call to
+** codeTableLocks() which occurs during sqlite3FinishCoding().
+*/
+SQLITE_PRIVATE void sqlite3TableLock(
+  Parse *pParse,     /* Parsing context */
+  int iDb,           /* Index of the database containing the table to lock */
+  int iTab,          /* Root page number of the table to be locked */
+  u8 isWriteLock,    /* True for a write lock */
+  const char *zName  /* Name of the table to be locked */
+){
+  Parse *pToplevel = sqlite3ParseToplevel(pParse);
+  int i;
+  int nBytes;
+  TableLock *p;
+  assert( iDb>=0 );
+
+  for(i=0; i<pToplevel->nTableLock; i++){
+    p = &pToplevel->aTableLock[i];
+    if( p->iDb==iDb && p->iTab==iTab ){
+      p->isWriteLock = (p->isWriteLock || isWriteLock);
+      return;
+    }
+  }
+
+  nBytes = sizeof(TableLock) * (pToplevel->nTableLock+1);
+  pToplevel->aTableLock =
+      sqlite3DbReallocOrFree(pToplevel->db, pToplevel->aTableLock, nBytes);
+  if( pToplevel->aTableLock ){
+    p = &pToplevel->aTableLock[pToplevel->nTableLock++];
+    p->iDb = iDb;
+    p->iTab = iTab;
+    p->isWriteLock = isWriteLock;
+    p->zName = zName;
+  }else{
+    pToplevel->nTableLock = 0;
+    pToplevel->db->mallocFailed = 1;
+  }
+}
+
+/*
+** Code an OP_TableLock instruction for each table locked by the
+** statement (configured by calls to sqlite3TableLock()).
+*/
+static void codeTableLocks(Parse *pParse){
+  int i;
+  Vdbe *pVdbe; 
+
+  pVdbe = sqlite3GetVdbe(pParse);
+  assert( pVdbe!=0 ); /* sqlite3GetVdbe cannot fail: VDBE already allocated */
+
+  for(i=0; i<pParse->nTableLock; i++){
+    TableLock *p = &pParse->aTableLock[i];
+    int p1 = p->iDb;
+    sqlite3VdbeAddOp4(pVdbe, OP_TableLock, p1, p->iTab, p->isWriteLock,
+                      p->zName, P4_STATIC);
+  }
+}
+#else
+  #define codeTableLocks(x)
+#endif
+
+/*
+** This routine is called after a single SQL statement has been
+** parsed and a VDBE program to execute that statement has been
+** prepared.  This routine puts the finishing touches on the
+** VDBE program and resets the pParse structure for the next
+** parse.
+**
+** Note that if an error occurred, it might be the case that
+** no VDBE code was generated.
+*/
+SQLITE_PRIVATE void sqlite3FinishCoding(Parse *pParse){
+  sqlite3 *db;
+  Vdbe *v;
+
+  db = pParse->db;
+  if( db->mallocFailed ) return;
+  if( pParse->nested ) return;
+  if( pParse->nErr ) return;
+
+  /* Begin by generating some termination code at the end of the
+  ** vdbe program
+  */
+  v = sqlite3GetVdbe(pParse);
+  assert( !pParse->isMultiWrite 
+       || sqlite3VdbeAssertMayAbort(v, pParse->mayAbort));
+  if( v ){
+    sqlite3VdbeAddOp0(v, OP_Halt);
+
+    /* The cookie mask contains one bit for each database file open.
+    ** (Bit 0 is for main, bit 1 is for temp, and so forth.)  Bits are
+    ** set for each database that is used.  Generate code to start a
+    ** transaction on each used database and to verify the schema cookie
+    ** on each used database.
+    */
+    if( pParse->cookieGoto>0 ){
+      yDbMask mask;
+      int iDb;
+      sqlite3VdbeJumpHere(v, pParse->cookieGoto-1);
+      for(iDb=0, mask=1; iDb<db->nDb; mask<<=1, iDb++){
+        if( (mask & pParse->cookieMask)==0 ) continue;
+        sqlite3VdbeUsesBtree(v, iDb);
+        sqlite3VdbeAddOp2(v,OP_Transaction, iDb, (mask & pParse->writeMask)!=0);
+        if( db->init.busy==0 ){
+          assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+          sqlite3VdbeAddOp3(v, OP_VerifyCookie,
+                            iDb, pParse->cookieValue[iDb],
+                            db->aDb[iDb].pSchema->iGeneration);
+        }
+      }
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+      {
+        int i;
+        for(i=0; i<pParse->nVtabLock; i++){
+          char *vtab = (char *)sqlite3GetVTable(db, pParse->apVtabLock[i]);
+          sqlite3VdbeAddOp4(v, OP_VBegin, 0, 0, 0, vtab, P4_VTAB);
+        }
+        pParse->nVtabLock = 0;
+      }
+#endif
+
+      /* Once all the cookies have been verified and transactions opened, 
+      ** obtain the required table-locks. This is a no-op unless the 
+      ** shared-cache feature is enabled.
+      */
+      codeTableLocks(pParse);
+
+      /* Initialize any AUTOINCREMENT data structures required.
+      */
+      sqlite3AutoincrementBegin(pParse);
+
+      /* Finally, jump back to the beginning of the executable code. */
+      sqlite3VdbeAddOp2(v, OP_Goto, 0, pParse->cookieGoto);
+    }
+  }
+
+
+  /* Get the VDBE program ready for execution
+  */
+  if( v && ALWAYS(pParse->nErr==0) && !db->mallocFailed ){
+#ifdef SQLITE_DEBUG
+    FILE *trace = (db->flags & SQLITE_VdbeTrace)!=0 ? stdout : 0;
+    sqlite3VdbeTrace(v, trace);
+#endif
+    assert( pParse->iCacheLevel==0 );  /* Disables and re-enables match */
+    /* A minimum of one cursor is required if autoincrement is used
+    *  See ticket [a696379c1f08866] */
+    if( pParse->pAinc!=0 && pParse->nTab==0 ) pParse->nTab = 1;
+    sqlite3VdbeMakeReady(v, pParse->nVar, pParse->nMem,
+                         pParse->nTab, pParse->nMaxArg, pParse->explain,
+                         pParse->isMultiWrite && pParse->mayAbort);
+    pParse->rc = SQLITE_DONE;
+    pParse->colNamesSet = 0;
+  }else{
+    pParse->rc = SQLITE_ERROR;
+  }
+  pParse->nTab = 0;
+  pParse->nMem = 0;
+  pParse->nSet = 0;
+  pParse->nVar = 0;
+  pParse->cookieMask = 0;
+  pParse->cookieGoto = 0;
+}
+
+/*
+** Run the parser and code generator recursively in order to generate
+** code for the SQL statement given onto the end of the pParse context
+** currently under construction.  When the parser is run recursively
+** this way, the final OP_Halt is not appended and other initialization
+** and finalization steps are omitted because those are handling by the
+** outermost parser.
+**
+** Not everything is nestable.  This facility is designed to permit
+** INSERT, UPDATE, and DELETE operations against SQLITE_MASTER.  Use
+** care if you decide to try to use this routine for some other purposes.
+*/
+SQLITE_PRIVATE void sqlite3NestedParse(Parse *pParse, const char *zFormat, ...){
+  va_list ap;
+  char *zSql;
+  char *zErrMsg = 0;
+  sqlite3 *db = pParse->db;
+# define SAVE_SZ  (sizeof(Parse) - offsetof(Parse,nVar))
+  char saveBuf[SAVE_SZ];
+
+  if( pParse->nErr ) return;
+  assert( pParse->nested<10 );  /* Nesting should only be of limited depth */
+  va_start(ap, zFormat);
+  zSql = sqlite3VMPrintf(db, zFormat, ap);
+  va_end(ap);
+  if( zSql==0 ){
+    return;   /* A malloc must have failed */
+  }
+  pParse->nested++;
+  memcpy(saveBuf, &pParse->nVar, SAVE_SZ);
+  memset(&pParse->nVar, 0, SAVE_SZ);
+  sqlite3RunParser(pParse, zSql, &zErrMsg);
+  sqlite3DbFree(db, zErrMsg);
+  sqlite3DbFree(db, zSql);
+  memcpy(&pParse->nVar, saveBuf, SAVE_SZ);
+  pParse->nested--;
+}
+
+/*
+** Locate the in-memory structure that describes a particular database
+** table given the name of that table and (optionally) the name of the
+** database containing the table.  Return NULL if not found.
+**
+** If zDatabase is 0, all databases are searched for the table and the
+** first matching table is returned.  (No checking for duplicate table
+** names is done.)  The search order is TEMP first, then MAIN, then any
+** auxiliary databases added using the ATTACH command.
+**
+** See also sqlite3LocateTable().
+*/
+SQLITE_PRIVATE Table *sqlite3FindTable(sqlite3 *db, const char *zName, const char *zDatabase){
+  Table *p = 0;
+  int i;
+  int nName;
+  assert( zName!=0 );
+  nName = sqlite3Strlen30(zName);
+  /* All mutexes are required for schema access.  Make sure we hold them. */
+  assert( zDatabase!=0 || sqlite3BtreeHoldsAllMutexes(db) );
+  for(i=OMIT_TEMPDB; i<db->nDb; i++){
+    int j = (i<2) ? i^1 : i;   /* Search TEMP before MAIN */
+    if( zDatabase!=0 && sqlite3StrICmp(zDatabase, db->aDb[j].zName) ) continue;
+    assert( sqlite3SchemaMutexHeld(db, j, 0) );
+    p = sqlite3HashFind(&db->aDb[j].pSchema->tblHash, zName, nName);
+    if( p ) break;
+  }
+  return p;
+}
+
+/*
+** Locate the in-memory structure that describes a particular database
+** table given the name of that table and (optionally) the name of the
+** database containing the table.  Return NULL if not found.  Also leave an
+** error message in pParse->zErrMsg.
+**
+** The difference between this routine and sqlite3FindTable() is that this
+** routine leaves an error message in pParse->zErrMsg where
+** sqlite3FindTable() does not.
+*/
+SQLITE_PRIVATE Table *sqlite3LocateTable(
+  Parse *pParse,         /* context in which to report errors */
+  int isView,            /* True if looking for a VIEW rather than a TABLE */
+  const char *zName,     /* Name of the table we are looking for */
+  const char *zDbase     /* Name of the database.  Might be NULL */
+){
+  Table *p;
+
+  /* Read the database schema. If an error occurs, leave an error message
+  ** and code in pParse and return NULL. */
+  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
+    return 0;
+  }
+
+  p = sqlite3FindTable(pParse->db, zName, zDbase);
+  if( p==0 ){
+    const char *zMsg = isView ? "no such view" : "no such table";
+    if( zDbase ){
+      sqlite3ErrorMsg(pParse, "%s: %s.%s", zMsg, zDbase, zName);
+    }else{
+      sqlite3ErrorMsg(pParse, "%s: %s", zMsg, zName);
+    }
+    pParse->checkSchema = 1;
+  }
+  return p;
+}
+
+/*
+** Locate the in-memory structure that describes 
+** a particular index given the name of that index
+** and the name of the database that contains the index.
+** Return NULL if not found.
+**
+** If zDatabase is 0, all databases are searched for the
+** table and the first matching index is returned.  (No checking
+** for duplicate index names is done.)  The search order is
+** TEMP first, then MAIN, then any auxiliary databases added
+** using the ATTACH command.
+*/
+SQLITE_PRIVATE Index *sqlite3FindIndex(sqlite3 *db, const char *zName, const char *zDb){
+  Index *p = 0;
+  int i;
+  int nName = sqlite3Strlen30(zName);
+  /* All mutexes are required for schema access.  Make sure we hold them. */
+  assert( zDb!=0 || sqlite3BtreeHoldsAllMutexes(db) );
+  for(i=OMIT_TEMPDB; i<db->nDb; i++){
+    int j = (i<2) ? i^1 : i;  /* Search TEMP before MAIN */
+    Schema *pSchema = db->aDb[j].pSchema;
+    assert( pSchema );
+    if( zDb && sqlite3StrICmp(zDb, db->aDb[j].zName) ) continue;
+    assert( sqlite3SchemaMutexHeld(db, j, 0) );
+    p = sqlite3HashFind(&pSchema->idxHash, zName, nName);
+    if( p ) break;
+  }
+  return p;
+}
+
+/*
+** Reclaim the memory used by an index
+*/
+static void freeIndex(sqlite3 *db, Index *p){
+#ifndef SQLITE_OMIT_ANALYZE
+  sqlite3DeleteIndexSamples(db, p);
+#endif
+  sqlite3DbFree(db, p->zColAff);
+  sqlite3DbFree(db, p);
+}
+
+/*
+** For the index called zIdxName which is found in the database iDb,
+** unlike that index from its Table then remove the index from
+** the index hash table and free all memory structures associated
+** with the index.
+*/
+SQLITE_PRIVATE void sqlite3UnlinkAndDeleteIndex(sqlite3 *db, int iDb, const char *zIdxName){
+  Index *pIndex;
+  int len;
+  Hash *pHash;
+
+  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+  pHash = &db->aDb[iDb].pSchema->idxHash;
+  len = sqlite3Strlen30(zIdxName);
+  pIndex = sqlite3HashInsert(pHash, zIdxName, len, 0);
+  if( ALWAYS(pIndex) ){
+    if( pIndex->pTable->pIndex==pIndex ){
+      pIndex->pTable->pIndex = pIndex->pNext;
+    }else{
+      Index *p;
+      /* Justification of ALWAYS();  The index must be on the list of
+      ** indices. */
+      p = pIndex->pTable->pIndex;
+      while( ALWAYS(p) && p->pNext!=pIndex ){ p = p->pNext; }
+      if( ALWAYS(p && p->pNext==pIndex) ){
+        p->pNext = pIndex->pNext;
+      }
+    }
+    freeIndex(db, pIndex);
+  }
+  db->flags |= SQLITE_InternChanges;
+}
+
+/*
+** Erase all schema information from the in-memory hash tables of
+** a single database.  This routine is called to reclaim memory
+** before the database closes.  It is also called during a rollback
+** if there were schema changes during the transaction or if a
+** schema-cookie mismatch occurs.
+**
+** If iDb<0 then reset the internal schema tables for all database
+** files.  If iDb>=0 then reset the internal schema for only the
+** single file indicated.
+*/
+SQLITE_PRIVATE void sqlite3ResetInternalSchema(sqlite3 *db, int iDb){
+  int i, j;
+  assert( iDb<db->nDb );
+
+  if( iDb>=0 ){
+    /* Case 1:  Reset the single schema identified by iDb */
+    Db *pDb = &db->aDb[iDb];
+    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+    assert( pDb->pSchema!=0 );
+    sqlite3SchemaClear(pDb->pSchema);
+
+    /* If any database other than TEMP is reset, then also reset TEMP
+    ** since TEMP might be holding triggers that reference tables in the
+    ** other database.
+    */
+    if( iDb!=1 ){
+      pDb = &db->aDb[1];
+      assert( pDb->pSchema!=0 );
+      sqlite3SchemaClear(pDb->pSchema);
+    }
+    return;
+  }
+  /* Case 2 (from here to the end): Reset all schemas for all attached
+  ** databases. */
+  assert( iDb<0 );
+  sqlite3BtreeEnterAll(db);
+  for(i=0; i<db->nDb; i++){
+    Db *pDb = &db->aDb[i];
+    if( pDb->pSchema ){
+      sqlite3SchemaClear(pDb->pSchema);
+    }
+  }
+  db->flags &= ~SQLITE_InternChanges;
+  sqlite3VtabUnlockList(db);
+  sqlite3BtreeLeaveAll(db);
+
+  /* If one or more of the auxiliary database files has been closed,
+  ** then remove them from the auxiliary database list.  We take the
+  ** opportunity to do this here since we have just deleted all of the
+  ** schema hash tables and therefore do not have to make any changes
+  ** to any of those tables.
+  */
+  for(i=j=2; i<db->nDb; i++){
+    struct Db *pDb = &db->aDb[i];
+    if( pDb->pBt==0 ){
+      sqlite3DbFree(db, pDb->zName);
+      pDb->zName = 0;
+      continue;
+    }
+    if( j<i ){
+      db->aDb[j] = db->aDb[i];
+    }
+    j++;
+  }
+  memset(&db->aDb[j], 0, (db->nDb-j)*sizeof(db->aDb[j]));
+  db->nDb = j;
+  if( db->nDb<=2 && db->aDb!=db->aDbStatic ){
+    memcpy(db->aDbStatic, db->aDb, 2*sizeof(db->aDb[0]));
+    sqlite3DbFree(db, db->aDb);
+    db->aDb = db->aDbStatic;
+  }
+}
+
+/*
+** This routine is called when a commit occurs.
+*/
+SQLITE_PRIVATE void sqlite3CommitInternalChanges(sqlite3 *db){
+  db->flags &= ~SQLITE_InternChanges;
+}
+
+/*
+** Delete memory allocated for the column names of a table or view (the
+** Table.aCol[] array).
+*/
+static void sqliteDeleteColumnNames(sqlite3 *db, Table *pTable){
+  int i;
+  Column *pCol;
+  assert( pTable!=0 );
+  if( (pCol = pTable->aCol)!=0 ){
+    for(i=0; i<pTable->nCol; i++, pCol++){
+      sqlite3DbFree(db, pCol->zName);
+      sqlite3ExprDelete(db, pCol->pDflt);
+      sqlite3DbFree(db, pCol->zDflt);
+      sqlite3DbFree(db, pCol->zType);
+      sqlite3DbFree(db, pCol->zColl);
+    }
+    sqlite3DbFree(db, pTable->aCol);
+  }
+}
+
+/*
+** Remove the memory data structures associated with the given
+** Table.  No changes are made to disk by this routine.
+**
+** This routine just deletes the data structure.  It does not unlink
+** the table data structure from the hash table.  But it does destroy
+** memory structures of the indices and foreign keys associated with 
+** the table.
+*/
+SQLITE_PRIVATE void sqlite3DeleteTable(sqlite3 *db, Table *pTable){
+  Index *pIndex, *pNext;
+
+  assert( !pTable || pTable->nRef>0 );
+
+  /* Do not delete the table until the reference count reaches zero. */
+  if( !pTable ) return;
+  if( ((!db || db->pnBytesFreed==0) && (--pTable->nRef)>0) ) return;
+
+  /* Delete all indices associated with this table. */
+  for(pIndex = pTable->pIndex; pIndex; pIndex=pNext){
+    pNext = pIndex->pNext;
+    assert( pIndex->pSchema==pTable->pSchema );
+    if( !db || db->pnBytesFreed==0 ){
+      char *zName = pIndex->zName; 
+      TESTONLY ( Index *pOld = ) sqlite3HashInsert(
+	  &pIndex->pSchema->idxHash, zName, sqlite3Strlen30(zName), 0
+      );
+      assert( db==0 || sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema) );
+      assert( pOld==pIndex || pOld==0 );
+    }
+    freeIndex(db, pIndex);
+  }
+
+  /* Delete any foreign keys attached to this table. */
+  sqlite3FkDelete(db, pTable);
+
+  /* Delete the Table structure itself.
+  */
+  sqliteDeleteColumnNames(db, pTable);
+  sqlite3DbFree(db, pTable->zName);
+  sqlite3DbFree(db, pTable->zColAff);
+  sqlite3SelectDelete(db, pTable->pSelect);
+#ifndef SQLITE_OMIT_CHECK
+  sqlite3ExprDelete(db, pTable->pCheck);
+#endif
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  sqlite3VtabClear(db, pTable);
+#endif
+  sqlite3DbFree(db, pTable);
+}
+
+/*
+** Unlink the given table from the hash tables and the delete the
+** table structure with all its indices and foreign keys.
+*/
+SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTable(sqlite3 *db, int iDb, const char *zTabName){
+  Table *p;
+  Db *pDb;
+
+  assert( db!=0 );
+  assert( iDb>=0 && iDb<db->nDb );
+  assert( zTabName );
+  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+  testcase( zTabName[0]==0 );  /* Zero-length table names are allowed */
+  pDb = &db->aDb[iDb];
+  p = sqlite3HashInsert(&pDb->pSchema->tblHash, zTabName,
+                        sqlite3Strlen30(zTabName),0);
+  sqlite3DeleteTable(db, p);
+  db->flags |= SQLITE_InternChanges;
+}
+
+/*
+** Given a token, return a string that consists of the text of that
+** token.  Space to hold the returned string
+** is obtained from sqliteMalloc() and must be freed by the calling
+** function.
+**
+** Any quotation marks (ex:  "name", 'name', [name], or `name`) that
+** surround the body of the token are removed.
+**
+** Tokens are often just pointers into the original SQL text and so
+** are not \000 terminated and are not persistent.  The returned string
+** is \000 terminated and is persistent.
+*/
+SQLITE_PRIVATE char *sqlite3NameFromToken(sqlite3 *db, Token *pName){
+  char *zName;
+  if( pName ){
+    zName = sqlite3DbStrNDup(db, (char*)pName->z, pName->n);
+    sqlite3Dequote(zName);
+  }else{
+    zName = 0;
+  }
+  return zName;
+}
+
+/*
+** Open the sqlite_master table stored in database number iDb for
+** writing. The table is opened using cursor 0.
+*/
+SQLITE_PRIVATE void sqlite3OpenMasterTable(Parse *p, int iDb){
+  Vdbe *v = sqlite3GetVdbe(p);
+  sqlite3TableLock(p, iDb, MASTER_ROOT, 1, SCHEMA_TABLE(iDb));
+  sqlite3VdbeAddOp3(v, OP_OpenWrite, 0, MASTER_ROOT, iDb);
+  sqlite3VdbeChangeP4(v, -1, (char *)5, P4_INT32);  /* 5 column table */
+  if( p->nTab==0 ){
+    p->nTab = 1;
+  }
+}
+
+/*
+** Parameter zName points to a nul-terminated buffer containing the name
+** of a database ("main", "temp" or the name of an attached db). This
+** function returns the index of the named database in db->aDb[], or
+** -1 if the named db cannot be found.
+*/
+SQLITE_PRIVATE int sqlite3FindDbName(sqlite3 *db, const char *zName){
+  int i = -1;         /* Database number */
+  if( zName ){
+    Db *pDb;
+    int n = sqlite3Strlen30(zName);
+    for(i=(db->nDb-1), pDb=&db->aDb[i]; i>=0; i--, pDb--){
+      #if (!OMIT_TEMPDB)
+        if( n==sqlite3Strlen30(pDb->zName) && 0==sqlite3StrICmp(pDb->zName, zName) ){
+          break;
+		   }
+      #else
+		if( i!=1 && n==sqlite3Strlen30(pDb->zName) && 0==sqlite3StrICmp(pDb->zName, zName) ){
+			break;
+		}
+      #endif
+    }
+  }
+  return i;
+}
+
+/*
+** The token *pName contains the name of a database (either "main" or
+** "temp" or the name of an attached db). This routine returns the
+** index of the named database in db->aDb[], or -1 if the named db 
+** does not exist.
+*/
+SQLITE_PRIVATE int sqlite3FindDb(sqlite3 *db, Token *pName){
+  int i;                               /* Database number */
+  char *zName;                         /* Name we are searching for */
+  zName = sqlite3NameFromToken(db, pName);
+  i = sqlite3FindDbName(db, zName);
+  sqlite3DbFree(db, zName);
+  return i;
+}
+
+/* The table or view or trigger name is passed to this routine via tokens
+** pName1 and pName2. If the table name was fully qualified, for example:
+**
+** CREATE TABLE xxx.yyy (...);
+** 
+** Then pName1 is set to "xxx" and pName2 "yyy". On the other hand if
+** the table name is not fully qualified, i.e.:
+**
+** CREATE TABLE yyy(...);
+**
+** Then pName1 is set to "yyy" and pName2 is "".
+**
+** This routine sets the *ppUnqual pointer to point at the token (pName1 or
+** pName2) that stores the unqualified table name.  The index of the
+** database "xxx" is returned.
+*/
+SQLITE_PRIVATE int sqlite3TwoPartName(
+  Parse *pParse,      /* Parsing and code generating context */
+  Token *pName1,      /* The "xxx" in the name "xxx.yyy" or "xxx" */
+  Token *pName2,      /* The "yyy" in the name "xxx.yyy" */
+  Token **pUnqual     /* Write the unqualified object name here */
+){
+  int iDb;                    /* Database holding the object */
+  sqlite3 *db = pParse->db;
+
+  if( ALWAYS(pName2!=0) && pName2->n>0 ){
+    if( db->init.busy ) {
+      sqlite3ErrorMsg(pParse, "corrupt database");
+      pParse->nErr++;
+      return -1;
+    }
+    *pUnqual = pName2;
+    iDb = sqlite3FindDb(db, pName1);
+    if( iDb<0 ){
+      sqlite3ErrorMsg(pParse, "unknown database %T", pName1);
+      pParse->nErr++;
+      return -1;
+    }
+  }else{
+    assert( db->init.iDb==0 || db->init.busy );
+    iDb = db->init.iDb;
+    *pUnqual = pName1;
+  }
+  return iDb;
+}
+
+/*
+** This routine is used to check if the UTF-8 string zName is a legal
+** unqualified name for a new schema object (table, index, view or
+** trigger). All names are legal except those that begin with the string
+** "sqlite_" (in upper, lower or mixed case). This portion of the namespace
+** is reserved for internal use.
+*/
+SQLITE_PRIVATE int sqlite3CheckObjectName(Parse *pParse, const char *zName){
+  if( !pParse->db->init.busy && pParse->nested==0 
+          && (pParse->db->flags & SQLITE_WriteSchema)==0
+          && 0==sqlite3StrNICmp(zName, "sqlite_", 7) ){
+    sqlite3ErrorMsg(pParse, "object name reserved for internal use: %s", zName);
+    return SQLITE_ERROR;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Begin constructing a new table representation in memory.  This is
+** the first of several action routines that get called in response
+** to a CREATE TABLE statement.  In particular, this routine is called
+** after seeing tokens "CREATE" and "TABLE" and the table name. The isTemp
+** flag is true if the table should be stored in the auxiliary database
+** file instead of in the main database file.  This is normally the case
+** when the "TEMP" or "TEMPORARY" keyword occurs in between
+** CREATE and TABLE.
+**
+** The new table record is initialized and put in pParse->pNewTable.
+** As more of the CREATE TABLE statement is parsed, additional action
+** routines will be called to add more information to this record.
+** At the end of the CREATE TABLE statement, the sqlite3EndTable() routine
+** is called to complete the construction of the new table record.
+*/
+SQLITE_PRIVATE void sqlite3StartTable(
+  Parse *pParse,   /* Parser context */
+  Token *pName1,   /* First part of the name of the table or view */
+  Token *pName2,   /* Second part of the name of the table or view */
+  int isTemp,      /* True if this is a TEMP table */
+  int isView,      /* True if this is a VIEW */
+  int isVirtual,   /* True if this is a VIRTUAL table */
+  int noErr        /* Do nothing if table already exists */
+){
+  Table *pTable;
+  char *zName = 0; /* The name of the new table */
+  sqlite3 *db = pParse->db;
+  Vdbe *v;
+  int iDb;         /* Database number to create the table in */
+  Token *pName;    /* Unqualified name of the table to create */
+
+  /* The table or view name to create is passed to this routine via tokens
+  ** pName1 and pName2. If the table name was fully qualified, for example:
+  **
+  ** CREATE TABLE xxx.yyy (...);
+  ** 
+  ** Then pName1 is set to "xxx" and pName2 "yyy". On the other hand if
+  ** the table name is not fully qualified, i.e.:
+  **
+  ** CREATE TABLE yyy(...);
+  **
+  ** Then pName1 is set to "yyy" and pName2 is "".
+  **
+  ** The call below sets the pName pointer to point at the token (pName1 or
+  ** pName2) that stores the unqualified table name. The variable iDb is
+  ** set to the index of the database that the table or view is to be
+  ** created in.
+  */
+  iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
+  if( iDb<0 ) return;
+  #if (!OMIT_TEMPDB)
+  if(isTemp && pName2->n>0 && iDb!=1 ){
+    /* If creating a temp table, the name may not be qualified. Unless 
+    ** the database name is "temp" anyway.  */
+    sqlite3ErrorMsg(pParse, "temporary table name must be unqualified");
+    return;
+  }
+  #endif
+  #if (!OMIT_TEMPDB)
+  if( isTemp ) iDb = 1;
+  #endif
+
+  pParse->sNameToken = *pName;
+  zName = sqlite3NameFromToken(db, pName);
+  if( zName==0 ) return;
+  if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
+    goto begin_table_error;
+  }
+  if( db->init.iDb==1 ) isTemp = 1;
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  assert( (isTemp & 1)==isTemp );
+  {
+    int code;
+    char *zDb = db->aDb[iDb].zName;
+    if( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(isTemp), 0, zDb) ){
+      goto begin_table_error;
+    }
+    if( isView ){
+      #if(!OMIT_TEMPDB)
+      if( isTemp ){
+        code = SQLITE_CREATE_TEMP_VIEW;
+      }else{
+        code = SQLITE_CREATE_VIEW;
+      }
+		#else
+		 code = SQLITE_CREATE_VIEW;
+		#endif
+    }else{
+		#if(!OMIT_TEMPDB)
+      if( isTemp ){
+        code = SQLITE_CREATE_TEMP_TABLE;
+      }else{
+        code = SQLITE_CREATE_TABLE;
+      }
+		#else
+		 code = SQLITE_CREATE_TABLE;
+		#endif
+    }
+    if( !isVirtual && sqlite3AuthCheck(pParse, code, zName, 0, zDb) ){
+      goto begin_table_error;
+    }
+  }
+#endif
+
+  /* Make sure the new table name does not collide with an existing
+  ** index or table name in the same database.  Issue an error message if
+  ** it does. The exception is if the statement being parsed was passed
+  ** to an sqlite3_declare_vtab() call. In that case only the column names
+  ** and types will be used, so there is no need to test for namespace
+  ** collisions.
+  */
+  if( !IN_DECLARE_VTAB ){
+    char *zDb = db->aDb[iDb].zName;
+    if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
+      goto begin_table_error;
+    }
+    pTable = sqlite3FindTable(db, zName, zDb);
+    if( pTable ){
+      if( !noErr ){
+        sqlite3ErrorMsg(pParse, "table %T already exists", pName);
+      }else{
+        assert( !db->init.busy );
+        sqlite3CodeVerifySchema(pParse, iDb);
+      }
+      goto begin_table_error;
+    }
+    if( sqlite3FindIndex(db, zName, zDb)!=0 ){
+      sqlite3ErrorMsg(pParse, "there is already an index named %s", zName);
+      goto begin_table_error;
+    }
+  }
+
+  pTable = sqlite3DbMallocZero(db, sizeof(Table));
+  if( pTable==0 ){
+    db->mallocFailed = 1;
+    pParse->rc = SQLITE_NOMEM;
+    pParse->nErr++;
+    goto begin_table_error;
+  }
+  pTable->zName = zName;
+  pTable->iPKey = -1;
+  pTable->pSchema = db->aDb[iDb].pSchema;
+  pTable->nRef = 1;
+  pTable->nRowEst = 1000000;
+  assert( pParse->pNewTable==0 );
+  pParse->pNewTable = pTable;
+
+  /* If this is the magic sqlite_sequence table used by autoincrement,
+  ** then record a pointer to this table in the main database structure
+  ** so that INSERT can find the table easily.
+  */
+#ifndef SQLITE_OMIT_AUTOINCREMENT
+  if( !pParse->nested && strcmp(zName, "sqlite_sequence")==0 ){
+    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+    pTable->pSchema->pSeqTab = pTable;
+  }
+#endif
+
+  /* Begin generating the code that will insert the table record into
+  ** the SQLITE_MASTER table.  Note in particular that we must go ahead
+  ** and allocate the record number for the table entry now.  Before any
+  ** PRIMARY KEY or UNIQUE keywords are parsed.  Those keywords will cause
+  ** indices to be created and the table record must come before the 
+  ** indices.  Hence, the record number for the table must be allocated
+  ** now.
+  */
+  if( !db->init.busy && (v = sqlite3GetVdbe(pParse))!=0 ){
+    int j1;
+    int fileFormat;
+    int reg1, reg2, reg3;
+    sqlite3BeginWriteOperation(pParse, 0, iDb);
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+    if( isVirtual ){
+      sqlite3VdbeAddOp0(v, OP_VBegin);
+    }
+#endif
+
+    /* If the file format and encoding in the database have not been set, 
+    ** set them now.
+    */
+    reg1 = pParse->regRowid = ++pParse->nMem;
+    reg2 = pParse->regRoot = ++pParse->nMem;
+    reg3 = ++pParse->nMem;
+    sqlite3VdbeAddOp3(v, OP_ReadCookie, iDb, reg3, BTREE_FILE_FORMAT);
+    sqlite3VdbeUsesBtree(v, iDb);
+    j1 = sqlite3VdbeAddOp1(v, OP_If, reg3);
+    fileFormat = (db->flags & SQLITE_LegacyFileFmt)!=0 ?
+                  1 : SQLITE_MAX_FILE_FORMAT;
+    sqlite3VdbeAddOp2(v, OP_Integer, fileFormat, reg3);
+    sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_FILE_FORMAT, reg3);
+    sqlite3VdbeAddOp2(v, OP_Integer, ENC(db), reg3);
+    sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_TEXT_ENCODING, reg3);
+    sqlite3VdbeJumpHere(v, j1);
+
+    /* This just creates a place-holder record in the sqlite_master table.
+    ** The record created does not contain anything yet.  It will be replaced
+    ** by the real entry in code generated at sqlite3EndTable().
+    **
+    ** The rowid for the new entry is left in register pParse->regRowid.
+    ** The root page number of the new table is left in reg pParse->regRoot.
+    ** The rowid and root page number values are needed by the code that
+    ** sqlite3EndTable will generate.
+    */
+#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
+    if( isView || isVirtual ){
+      sqlite3VdbeAddOp2(v, OP_Integer, 0, reg2);
+    }else
+#endif
+    {
+      sqlite3VdbeAddOp2(v, OP_CreateTable, iDb, reg2);
+    }
+    sqlite3OpenMasterTable(pParse, iDb);
+    sqlite3VdbeAddOp2(v, OP_NewRowid, 0, reg1);
+    sqlite3VdbeAddOp2(v, OP_Null, 0, reg3);
+    sqlite3VdbeAddOp3(v, OP_Insert, 0, reg3, reg1);
+    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
+    sqlite3VdbeAddOp0(v, OP_Close);
+  }
+
+  /* Normal (non-error) return. */
+  return;
+
+  /* If an error occurs, we jump here */
+begin_table_error:
+  sqlite3DbFree(db, zName);
+  return;
+}
+
+/*
+** This macro is used to compare two strings in a case-insensitive manner.
+** It is slightly faster than calling sqlite3StrICmp() directly, but
+** produces larger code.
+**
+** WARNING: This macro is not compatible with the strcmp() family. It
+** returns true if the two strings are equal, otherwise false.
+*/
+#define STRICMP(x, y) (\
+sqlite3UpperToLower[*(unsigned char *)(x)]==   \
+sqlite3UpperToLower[*(unsigned char *)(y)]     \
+&& sqlite3StrICmp((x)+1,(y)+1)==0 )
+
+/*
+** Add a new column to the table currently being constructed.
+**
+** The parser calls this routine once for each column declaration
+** in a CREATE TABLE statement.  sqlite3StartTable() gets called
+** first to get things going.  Then this routine is called for each
+** column.
+*/
+SQLITE_PRIVATE void sqlite3AddColumn(Parse *pParse, Token *pName){
+  Table *p;
+  int i;
+  char *z;
+  Column *pCol;
+  sqlite3 *db = pParse->db;
+  if( (p = pParse->pNewTable)==0 ) return;
+#if SQLITE_MAX_COLUMN
+  if( p->nCol+1>db->aLimit[SQLITE_LIMIT_COLUMN] ){
+    sqlite3ErrorMsg(pParse, "too many columns on %s", p->zName);
+    return;
+  }
+#endif
+  z = sqlite3NameFromToken(db, pName);
+  if( z==0 ) return;
+  for(i=0; i<p->nCol; i++){
+    if( STRICMP(z, p->aCol[i].zName) ){
+      sqlite3ErrorMsg(pParse, "duplicate column name: %s", z);
+      sqlite3DbFree(db, z);
+      return;
+    }
+  }
+  if( (p->nCol & 0x7)==0 ){
+    Column *aNew;
+    aNew = sqlite3DbRealloc(db,p->aCol,(p->nCol+8)*sizeof(p->aCol[0]));
+    if( aNew==0 ){
+      sqlite3DbFree(db, z);
+      return;
+    }
+    p->aCol = aNew;
+  }
+  pCol = &p->aCol[p->nCol];
+  memset(pCol, 0, sizeof(p->aCol[0]));
+  pCol->zName = z;
+ 
+  /* If there is no type specified, columns have the default affinity
+  ** 'NONE'. If there is a type specified, then sqlite3AddColumnType() will
+  ** be called next to set pCol->affinity correctly.
+  */
+  pCol->affinity = SQLITE_AFF_NONE;
+  p->nCol++;
+}
+
+/*
+** This routine is called by the parser while in the middle of
+** parsing a CREATE TABLE statement.  A "NOT NULL" constraint has
+** been seen on a column.  This routine sets the notNull flag on
+** the column currently under construction.
+*/
+SQLITE_PRIVATE void sqlite3AddNotNull(Parse *pParse, int onError){
+  Table *p;
+  p = pParse->pNewTable;
+  if( p==0 || NEVER(p->nCol<1) ) return;
+  p->aCol[p->nCol-1].notNull = (u8)onError;
+}
+
+/*
+** Scan the column type name zType (length nType) and return the
+** associated affinity type.
+**
+** This routine does a case-independent search of zType for the 
+** substrings in the following table. If one of the substrings is
+** found, the corresponding affinity is returned. If zType contains
+** more than one of the substrings, entries toward the top of 
+** the table take priority. For example, if zType is 'BLOBINT', 
+** SQLITE_AFF_INTEGER is returned.
+**
+** Substring     | Affinity
+** --------------------------------
+** 'INT'         | SQLITE_AFF_INTEGER
+** 'CHAR'        | SQLITE_AFF_TEXT
+** 'CLOB'        | SQLITE_AFF_TEXT
+** 'TEXT'        | SQLITE_AFF_TEXT
+** 'BLOB'        | SQLITE_AFF_NONE
+** 'REAL'        | SQLITE_AFF_REAL
+** 'FLOA'        | SQLITE_AFF_REAL
+** 'DOUB'        | SQLITE_AFF_REAL
+**
+** If none of the substrings in the above table are found,
+** SQLITE_AFF_NUMERIC is returned.
+*/
+SQLITE_PRIVATE char sqlite3AffinityType(const char *zIn){
+  u32 h = 0;
+  char aff = SQLITE_AFF_NUMERIC;
+
+  if( zIn ) while( zIn[0] ){
+    h = (h<<8) + sqlite3UpperToLower[(*zIn)&0xff];
+    zIn++;
+    if( h==(('c'<<24)+('h'<<16)+('a'<<8)+'r') ){             /* CHAR */
+      aff = SQLITE_AFF_TEXT; 
+    }else if( h==(('c'<<24)+('l'<<16)+('o'<<8)+'b') ){       /* CLOB */
+      aff = SQLITE_AFF_TEXT;
+    }else if( h==(('t'<<24)+('e'<<16)+('x'<<8)+'t') ){       /* TEXT */
+      aff = SQLITE_AFF_TEXT;
+    }else if( h==(('b'<<24)+('l'<<16)+('o'<<8)+'b')          /* BLOB */
+        && (aff==SQLITE_AFF_NUMERIC || aff==SQLITE_AFF_REAL) ){
+      aff = SQLITE_AFF_NONE;
+#ifndef SQLITE_OMIT_FLOATING_POINT
+    }else if( h==(('r'<<24)+('e'<<16)+('a'<<8)+'l')          /* REAL */
+        && aff==SQLITE_AFF_NUMERIC ){
+      aff = SQLITE_AFF_REAL;
+    }else if( h==(('f'<<24)+('l'<<16)+('o'<<8)+'a')          /* FLOA */
+        && aff==SQLITE_AFF_NUMERIC ){
+      aff = SQLITE_AFF_REAL;
+    }else if( h==(('d'<<24)+('o'<<16)+('u'<<8)+'b')          /* DOUB */
+        && aff==SQLITE_AFF_NUMERIC ){
+      aff = SQLITE_AFF_REAL;
+#endif
+    }else if( (h&0x00FFFFFF)==(('i'<<16)+('n'<<8)+'t') ){    /* INT */
+      aff = SQLITE_AFF_INTEGER;
+      break;
+    }
+  }
+
+  return aff;
+}
+
+/*
+** This routine is called by the parser while in the middle of
+** parsing a CREATE TABLE statement.  The pFirst token is the first
+** token in the sequence of tokens that describe the type of the
+** column currently under construction.   pLast is the last token
+** in the sequence.  Use this information to construct a string
+** that contains the typename of the column and store that string
+** in zType.
+*/ 
+SQLITE_PRIVATE void sqlite3AddColumnType(Parse *pParse, Token *pType){
+  Table *p;
+  Column *pCol;
+
+  p = pParse->pNewTable;
+  if( p==0 || NEVER(p->nCol<1) ) return;
+  pCol = &p->aCol[p->nCol-1];
+  assert( pCol->zType==0 );
+  pCol->zType = sqlite3NameFromToken(pParse->db, pType);
+  pCol->affinity = sqlite3AffinityType(pCol->zType);
+}
+
+/*
+** The expression is the default value for the most recently added column
+** of the table currently under construction.
+**
+** Default value expressions must be constant.  Raise an exception if this
+** is not the case.
+**
+** This routine is called by the parser while in the middle of
+** parsing a CREATE TABLE statement.
+*/
+SQLITE_PRIVATE void sqlite3AddDefaultValue(Parse *pParse, ExprSpan *pSpan){
+  Table *p;
+  Column *pCol;
+  sqlite3 *db = pParse->db;
+  p = pParse->pNewTable;
+  if( p!=0 ){
+    pCol = &(p->aCol[p->nCol-1]);
+    if( !sqlite3ExprIsConstantOrFunction(pSpan->pExpr) ){
+      sqlite3ErrorMsg(pParse, "default value of column [%s] is not constant",
+          pCol->zName);
+    }else{
+      /* A copy of pExpr is used instead of the original, as pExpr contains
+      ** tokens that point to volatile memory. The 'span' of the expression
+      ** is required by pragma table_info.
+      */
+      sqlite3ExprDelete(db, pCol->pDflt);
+      pCol->pDflt = sqlite3ExprDup(db, pSpan->pExpr, EXPRDUP_REDUCE);
+      sqlite3DbFree(db, pCol->zDflt);
+      pCol->zDflt = sqlite3DbStrNDup(db, (char*)pSpan->zStart,
+                                     (int)(pSpan->zEnd - pSpan->zStart));
+    }
+  }
+  sqlite3ExprDelete(db, pSpan->pExpr);
+}
+
+/*
+** Designate the PRIMARY KEY for the table.  pList is a list of names 
+** of columns that form the primary key.  If pList is NULL, then the
+** most recently added column of the table is the primary key.
+**
+** A table can have at most one primary key.  If the table already has
+** a primary key (and this is the second primary key) then create an
+** error.
+**
+** If the PRIMARY KEY is on a single column whose datatype is INTEGER,
+** then we will try to use that column as the rowid.  Set the Table.iPKey
+** field of the table under construction to be the index of the
+** INTEGER PRIMARY KEY column.  Table.iPKey is set to -1 if there is
+** no INTEGER PRIMARY KEY.
+**
+** If the key is not an INTEGER PRIMARY KEY, then create a unique
+** index for the key.  No index is created for INTEGER PRIMARY KEYs.
+*/
+SQLITE_PRIVATE void sqlite3AddPrimaryKey(
+  Parse *pParse,    /* Parsing context */
+  ExprList *pList,  /* List of field names to be indexed */
+  int onError,      /* What to do with a uniqueness conflict */
+  int autoInc,      /* True if the AUTOINCREMENT keyword is present */
+  int sortOrder     /* SQLITE_SO_ASC or SQLITE_SO_DESC */
+){
+  Table *pTab = pParse->pNewTable;
+  char *zType = 0;
+  int iCol = -1, i;
+  if( pTab==0 || IN_DECLARE_VTAB ) goto primary_key_exit;
+  if( pTab->tabFlags & TF_HasPrimaryKey ){
+    sqlite3ErrorMsg(pParse, 
+      "table \"%s\" has more than one primary key", pTab->zName);
+    goto primary_key_exit;
+  }
+  pTab->tabFlags |= TF_HasPrimaryKey;
+  if( pList==0 ){
+    iCol = pTab->nCol - 1;
+    pTab->aCol[iCol].isPrimKey = 1;
+  }else{
+    for(i=0; i<pList->nExpr; i++){
+      for(iCol=0; iCol<pTab->nCol; iCol++){
+        if( sqlite3StrICmp(pList->a[i].zName, pTab->aCol[iCol].zName)==0 ){
+          break;
+        }
+      }
+      if( iCol<pTab->nCol ){
+        pTab->aCol[iCol].isPrimKey = 1;
+      }
+    }
+    if( pList->nExpr>1 ) iCol = -1;
+  }
+  if( iCol>=0 && iCol<pTab->nCol ){
+    zType = pTab->aCol[iCol].zType;
+  }
+  if( zType && sqlite3StrICmp(zType, "INTEGER")==0
+        && sortOrder==SQLITE_SO_ASC ){
+    pTab->iPKey = iCol;
+    pTab->keyConf = (u8)onError;
+    assert( autoInc==0 || autoInc==1 );
+    pTab->tabFlags |= autoInc*TF_Autoincrement;
+  }else if( autoInc ){
+#ifndef SQLITE_OMIT_AUTOINCREMENT
+    sqlite3ErrorMsg(pParse, "AUTOINCREMENT is only allowed on an "
+       "INTEGER PRIMARY KEY");
+#endif
+  }else{
+    Index *p;
+    p = sqlite3CreateIndex(pParse, 0, 0, 0, pList, onError, 0, 0, sortOrder, 0);
+    if( p ){
+      p->autoIndex = 2;
+    }
+    pList = 0;
+  }
+
+primary_key_exit:
+  sqlite3ExprListDelete(pParse->db, pList);
+  return;
+}
+
+/*
+** Add a new CHECK constraint to the table currently under construction.
+*/
+SQLITE_PRIVATE void sqlite3AddCheckConstraint(
+  Parse *pParse,    /* Parsing context */
+  Expr *pCheckExpr  /* The check expression */
+){
+  sqlite3 *db = pParse->db;
+#ifndef SQLITE_OMIT_CHECK
+  Table *pTab = pParse->pNewTable;
+  if( pTab && !IN_DECLARE_VTAB ){
+    pTab->pCheck = sqlite3ExprAnd(db, pTab->pCheck, pCheckExpr);
+  }else
+#endif
+  {
+    sqlite3ExprDelete(db, pCheckExpr);
+  }
+}
+
+/*
+** Set the collation function of the most recently parsed table column
+** to the CollSeq given.
+*/
+SQLITE_PRIVATE void sqlite3AddCollateType(Parse *pParse, Token *pToken){
+  Table *p;
+  int i;
+  char *zColl;              /* Dequoted name of collation sequence */
+  sqlite3 *db;
+
+  if( (p = pParse->pNewTable)==0 ) return;
+  i = p->nCol-1;
+  db = pParse->db;
+  zColl = sqlite3NameFromToken(db, pToken);
+  if( !zColl ) return;
+
+  if( sqlite3LocateCollSeq(pParse, zColl) ){
+    Index *pIdx;
+    p->aCol[i].zColl = zColl;
+  
+    /* If the column is declared as "<name> PRIMARY KEY COLLATE <type>",
+    ** then an index may have been created on this column before the
+    ** collation type was added. Correct this if it is the case.
+    */
+    for(pIdx=p->pIndex; pIdx; pIdx=pIdx->pNext){
+      assert( pIdx->nColumn==1 );
+      if( pIdx->aiColumn[0]==i ){
+        pIdx->azColl[0] = p->aCol[i].zColl;
+      }
+    }
+  }else{
+    sqlite3DbFree(db, zColl);
+  }
+}
+
+/*
+** This function returns the collation sequence for database native text
+** encoding identified by the string zName, length nName.
+**
+** If the requested collation sequence is not available, or not available
+** in the database native encoding, the collation factory is invoked to
+** request it. If the collation factory does not supply such a sequence,
+** and the sequence is available in another text encoding, then that is
+** returned instead.
+**
+** If no versions of the requested collations sequence are available, or
+** another error occurs, NULL is returned and an error message written into
+** pParse.
+**
+** This routine is a wrapper around sqlite3FindCollSeq().  This routine
+** invokes the collation factory if the named collation cannot be found
+** and generates an error message.
+**
+** See also: sqlite3FindCollSeq(), sqlite3GetCollSeq()
+*/
+SQLITE_PRIVATE CollSeq *sqlite3LocateCollSeq(Parse *pParse, const char *zName){
+  sqlite3 *db = pParse->db;
+  u8 enc = ENC(db);
+  u8 initbusy = db->init.busy;
+  CollSeq *pColl;
+
+  pColl = sqlite3FindCollSeq(db, enc, zName, initbusy);
+  if( !initbusy && (!pColl || !pColl->xCmp) ){
+    pColl = sqlite3GetCollSeq(db, enc, pColl, zName);
+    if( !pColl ){
+      sqlite3ErrorMsg(pParse, "no such collation sequence: %s", zName);
+    }
+  }
+
+  return pColl;
+}
+
+
+/*
+** Generate code that will increment the schema cookie.
+**
+** The schema cookie is used to determine when the schema for the
+** database changes.  After each schema change, the cookie value
+** changes.  When a process first reads the schema it records the
+** cookie.  Thereafter, whenever it goes to access the database,
+** it checks the cookie to make sure the schema has not changed
+** since it was last read.
+**
+** This plan is not completely bullet-proof.  It is possible for
+** the schema to change multiple times and for the cookie to be
+** set back to prior value.  But schema changes are infrequent
+** and the probability of hitting the same cookie value is only
+** 1 chance in 2^32.  So we're safe enough.
+*/
+SQLITE_PRIVATE void sqlite3ChangeCookie(Parse *pParse, int iDb){
+  int r1 = sqlite3GetTempReg(pParse);
+  sqlite3 *db = pParse->db;
+  Vdbe *v = pParse->pVdbe;
+  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+  sqlite3VdbeAddOp2(v, OP_Integer, db->aDb[iDb].pSchema->schema_cookie+1, r1);
+  sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_SCHEMA_VERSION, r1);
+  sqlite3ReleaseTempReg(pParse, r1);
+}
+
+/*
+** Measure the number of characters needed to output the given
+** identifier.  The number returned includes any quotes used
+** but does not include the null terminator.
+**
+** The estimate is conservative.  It might be larger that what is
+** really needed.
+*/
+static int identLength(const char *z){
+  int n;
+  for(n=0; *z; n++, z++){
+    if( *z=='"' ){ n++; }
+  }
+  return n + 2;
+}
+
+/*
+** The first parameter is a pointer to an output buffer. The second 
+** parameter is a pointer to an integer that contains the offset at
+** which to write into the output buffer. This function copies the
+** nul-terminated string pointed to by the third parameter, zSignedIdent,
+** to the specified offset in the buffer and updates *pIdx to refer
+** to the first byte after the last byte written before returning.
+** 
+** If the string zSignedIdent consists entirely of alpha-numeric
+** characters, does not begin with a digit and is not an SQL keyword,
+** then it is copied to the output buffer exactly as it is. Otherwise,
+** it is quoted using double-quotes.
+*/
+static void identPut(char *z, int *pIdx, char *zSignedIdent){
+  unsigned char *zIdent = (unsigned char*)zSignedIdent;
+  int i, j, needQuote;
+  i = *pIdx;
+
+  for(j=0; zIdent[j]; j++){
+    if( !sqlite3Isalnum(zIdent[j]) && zIdent[j]!='_' ) break;
+  }
+  needQuote = sqlite3Isdigit(zIdent[0]) || sqlite3KeywordCode(zIdent, j)!=TK_ID;
+  if( !needQuote ){
+    needQuote = zIdent[j];
+  }
+
+  if( needQuote ) z[i++] = '"';
+  for(j=0; zIdent[j]; j++){
+    z[i++] = zIdent[j];
+    if( zIdent[j]=='"' ) z[i++] = '"';
+  }
+  if( needQuote ) z[i++] = '"';
+  z[i] = 0;
+  *pIdx = i;
+}
+
+/*
+** Generate a CREATE TABLE statement appropriate for the given
+** table.  Memory to hold the text of the statement is obtained
+** from sqliteMalloc() and must be freed by the calling function.
+*/
+static char *createTableStmt(sqlite3 *db, Table *p){
+  int i, k, n;
+  char *zStmt;
+  char *zSep, *zSep2, *zEnd;
+  Column *pCol;
+  n = 0;
+  for(pCol = p->aCol, i=0; i<p->nCol; i++, pCol++){
+    n += identLength(pCol->zName) + 5;
+  }
+  n += identLength(p->zName);
+  if( n<50 ){ 
+    zSep = "";
+    zSep2 = ",";
+    zEnd = ")";
+  }else{
+    zSep = "\n  ";
+    zSep2 = ",\n  ";
+    zEnd = "\n)";
+  }
+  n += 35 + 6*p->nCol;
+  zStmt = sqlite3DbMallocRaw(0, n);
+  if( zStmt==0 ){
+    db->mallocFailed = 1;
+    return 0;
+  }
+  sqlite3_snprintf(n, zStmt, "CREATE TABLE ");
+  k = sqlite3Strlen30(zStmt);
+  identPut(zStmt, &k, p->zName);
+  zStmt[k++] = '(';
+  for(pCol=p->aCol, i=0; i<p->nCol; i++, pCol++){
+    static const char * const azType[] = {
+        /* SQLITE_AFF_TEXT    */ " TEXT",
+        /* SQLITE_AFF_NONE    */ "",
+        /* SQLITE_AFF_NUMERIC */ " NUM",
+        /* SQLITE_AFF_INTEGER */ " INT",
+        /* SQLITE_AFF_REAL    */ " REAL"
+    };
+    int len;
+    const char *zType;
+
+    sqlite3_snprintf(n-k, &zStmt[k], zSep);
+    k += sqlite3Strlen30(&zStmt[k]);
+    zSep = zSep2;
+    identPut(zStmt, &k, pCol->zName);
+    assert( pCol->affinity-SQLITE_AFF_TEXT >= 0 );
+    assert( pCol->affinity-SQLITE_AFF_TEXT < ArraySize(azType) );
+    testcase( pCol->affinity==SQLITE_AFF_TEXT );
+    testcase( pCol->affinity==SQLITE_AFF_NONE );
+    testcase( pCol->affinity==SQLITE_AFF_NUMERIC );
+    testcase( pCol->affinity==SQLITE_AFF_INTEGER );
+    testcase( pCol->affinity==SQLITE_AFF_REAL );
+    
+    zType = azType[pCol->affinity - SQLITE_AFF_TEXT];
+    len = sqlite3Strlen30(zType);
+    assert( pCol->affinity==SQLITE_AFF_NONE 
+            || pCol->affinity==sqlite3AffinityType(zType) );
+    memcpy(&zStmt[k], zType, len);
+    k += len;
+    assert( k<=n );
+  }
+  sqlite3_snprintf(n-k, &zStmt[k], "%s", zEnd);
+  return zStmt;
+}
+
+/*
+** This routine is called to report the final ")" that terminates
+** a CREATE TABLE statement.
+**
+** The table structure that other action routines have been building
+** is added to the internal hash tables, assuming no errors have
+** occurred.
+**
+** An entry for the table is made in the master table on disk, unless
+** this is a temporary table or db->init.busy==1.  When db->init.busy==1
+** it means we are reading the sqlite_master table because we just
+** connected to the database or because the sqlite_master table has
+** recently changed, so the entry for this table already exists in
+** the sqlite_master table.  We do not want to create it again.
+**
+** If the pSelect argument is not NULL, it means that this routine
+** was called to create a table generated from a 
+** "CREATE TABLE ... AS SELECT ..." statement.  The column names of
+** the new table will match the result set of the SELECT.
+*/
+SQLITE_PRIVATE void sqlite3EndTable(
+  Parse *pParse,          /* Parse context */
+  Token *pCons,           /* The ',' token after the last column defn. */
+  Token *pEnd,            /* The final ')' token in the CREATE TABLE */
+  Select *pSelect         /* Select from a "CREATE ... AS SELECT" */
+){
+  Table *p;
+  sqlite3 *db = pParse->db;
+  int iDb;
+
+  if( (pEnd==0 && pSelect==0) || db->mallocFailed ){
+    return;
+  }
+  p = pParse->pNewTable;
+  if( p==0 ) return;
+
+  assert( !db->init.busy || !pSelect );
+
+  iDb = sqlite3SchemaToIndex(db, p->pSchema);
+
+#ifndef SQLITE_OMIT_CHECK
+  /* Resolve names in all CHECK constraint expressions.
+  */
+  if( p->pCheck ){
+    SrcList sSrc;                   /* Fake SrcList for pParse->pNewTable */
+    NameContext sNC;                /* Name context for pParse->pNewTable */
+
+    memset(&sNC, 0, sizeof(sNC));
+    memset(&sSrc, 0, sizeof(sSrc));
+    sSrc.nSrc = 1;
+    sSrc.a[0].zName = p->zName;
+    sSrc.a[0].pTab = p;
+    sSrc.a[0].iCursor = -1;
+    sNC.pParse = pParse;
+    sNC.pSrcList = &sSrc;
+    sNC.isCheck = 1;
+    if( sqlite3ResolveExprNames(&sNC, p->pCheck) ){
+      return;
+    }
+  }
+#endif /* !defined(SQLITE_OMIT_CHECK) */
+
+  /* If the db->init.busy is 1 it means we are reading the SQL off the
+  ** "sqlite_master" or "sqlite_temp_master" table on the disk.
+  ** So do not write to the disk again.  Extract the root page number
+  ** for the table from the db->init.newTnum field.  (The page number
+  ** should have been put there by the sqliteOpenCb routine.)
+  */
+  if( db->init.busy ){
+    p->tnum = db->init.newTnum;
+  }
+
+  /* If not initializing, then create a record for the new table
+  ** in the SQLITE_MASTER table of the database.
+  **
+  ** If this is a TEMPORARY table, write the entry into the auxiliary
+  ** file instead of into the main database file.
+  */
+  if( !db->init.busy ){
+    int n;
+    Vdbe *v;
+    char *zType;    /* "view" or "table" */
+    char *zType2;   /* "VIEW" or "TABLE" */
+    char *zStmt;    /* Text of the CREATE TABLE or CREATE VIEW statement */
+
+    v = sqlite3GetVdbe(pParse);
+    if( NEVER(v==0) ) return;
+
+    sqlite3VdbeAddOp1(v, OP_Close, 0);
+
+    /* 
+    ** Initialize zType for the new view or table.
+    */
+    if( p->pSelect==0 ){
+      /* A regular table */
+      zType = "table";
+      zType2 = "TABLE";
+#ifndef SQLITE_OMIT_VIEW
+    }else{
+      /* A view */
+      zType = "view";
+      zType2 = "VIEW";
+#endif
+    }
+
+    /* If this is a CREATE TABLE xx AS SELECT ..., execute the SELECT
+    ** statement to populate the new table. The root-page number for the
+    ** new table is in register pParse->regRoot.
+    **
+    ** Once the SELECT has been coded by sqlite3Select(), it is in a
+    ** suitable state to query for the column names and types to be used
+    ** by the new table.
+    **
+    ** A shared-cache write-lock is not required to write to the new table,
+    ** as a schema-lock must have already been obtained to create it. Since
+    ** a schema-lock excludes all other database users, the write-lock would
+    ** be redundant.
+    */
+    if( pSelect ){
+      SelectDest dest;
+      Table *pSelTab;
+
+      assert(pParse->nTab==1);
+      sqlite3VdbeAddOp3(v, OP_OpenWrite, 1, pParse->regRoot, iDb);
+      sqlite3VdbeChangeP5(v, 1);
+      pParse->nTab = 2;
+      sqlite3SelectDestInit(&dest, SRT_Table, 1);
+      sqlite3Select(pParse, pSelect, &dest);
+      sqlite3VdbeAddOp1(v, OP_Close, 1);
+      if( pParse->nErr==0 ){
+        pSelTab = sqlite3ResultSetOfSelect(pParse, pSelect);
+        if( pSelTab==0 ) return;
+        assert( p->aCol==0 );
+        p->nCol = pSelTab->nCol;
+        p->aCol = pSelTab->aCol;
+        pSelTab->nCol = 0;
+        pSelTab->aCol = 0;
+        sqlite3DeleteTable(db, pSelTab);
+      }
+    }
+
+    /* Compute the complete text of the CREATE statement */
+    if( pSelect ){
+      zStmt = createTableStmt(db, p);
+    }else{
+      n = (int)(pEnd->z - pParse->sNameToken.z) + 1;
+      zStmt = sqlite3MPrintf(db, 
+          "CREATE %s %.*s", zType2, n, pParse->sNameToken.z
+      );
+    }
+
+    /* A slot for the record has already been allocated in the 
+    ** SQLITE_MASTER table.  We just need to update that slot with all
+    ** the information we've collected.
+    */
+    sqlite3NestedParse(pParse,
+      "UPDATE %Q.%s "
+         "SET type='%s', name=%Q, tbl_name=%Q, rootpage=#%d, sql=%Q "
+       "WHERE rowid=#%d",
+      db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
+      zType,
+      p->zName,
+      p->zName,
+      pParse->regRoot,
+      zStmt,
+      pParse->regRowid
+    );
+    sqlite3DbFree(db, zStmt);
+    sqlite3ChangeCookie(pParse, iDb);
+
+#ifndef SQLITE_OMIT_AUTOINCREMENT
+    /* Check to see if we need to create an sqlite_sequence table for
+    ** keeping track of autoincrement keys.
+    */
+    if( p->tabFlags & TF_Autoincrement ){
+      Db *pDb = &db->aDb[iDb];
+      assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+      if( pDb->pSchema->pSeqTab==0 ){
+        sqlite3NestedParse(pParse,
+          "CREATE TABLE %Q.sqlite_sequence(name,seq)",
+          pDb->zName
+        );
+      }
+    }
+#endif
+
+    /* Reparse everything to update our internal data structures */
+    sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 0, 0,
+        sqlite3MPrintf(db, "tbl_name='%q'",p->zName), P4_DYNAMIC);
+  }
+
+
+  /* Add the table to the in-memory representation of the database.
+  */
+  if( db->init.busy ){
+    Table *pOld;
+    Schema *pSchema = p->pSchema;
+    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+    pOld = sqlite3HashInsert(&pSchema->tblHash, p->zName,
+                             sqlite3Strlen30(p->zName),p);
+    if( pOld ){
+      assert( p==pOld );  /* Malloc must have failed inside HashInsert() */
+      db->mallocFailed = 1;
+      return;
+    }
+    pParse->pNewTable = 0;
+    db->nTable++;
+    db->flags |= SQLITE_InternChanges;
+
+#ifndef SQLITE_OMIT_ALTERTABLE
+    if( !p->pSelect ){
+      const char *zName = (const char *)pParse->sNameToken.z;
+      int nName;
+      assert( !pSelect && pCons && pEnd );
+      if( pCons->z==0 ){
+        pCons = pEnd;
+      }
+      nName = (int)((const char *)pCons->z - zName);
+      p->addColOffset = 13 + sqlite3Utf8CharLen(zName, nName);
+    }
+#endif
+  }
+}
+
+#ifndef SQLITE_OMIT_VIEW
+/*
+** The parser calls this routine in order to create a new VIEW
+*/
+SQLITE_PRIVATE void sqlite3CreateView(
+  Parse *pParse,     /* The parsing context */
+  Token *pBegin,     /* The CREATE token that begins the statement */
+  Token *pName1,     /* The token that holds the name of the view */
+  Token *pName2,     /* The token that holds the name of the view */
+  Select *pSelect,   /* A SELECT statement that will become the new view */
+  int isTemp,        /* TRUE for a TEMPORARY view */
+  int noErr          /* Suppress error messages if VIEW already exists */
+){
+  Table *p;
+  int n;
+  const char *z;
+  Token sEnd;
+  DbFixer sFix;
+  Token *pName;
+  int iDb;
+  sqlite3 *db = pParse->db;
+
+  if( pParse->nVar>0 ){
+    sqlite3ErrorMsg(pParse, "parameters are not allowed in views");
+    sqlite3SelectDelete(db, pSelect);
+    return;
+  }
+  sqlite3StartTable(pParse, pName1, pName2, isTemp, 1, 0, noErr);
+  p = pParse->pNewTable;
+  if( p==0 || pParse->nErr ){
+    sqlite3SelectDelete(db, pSelect);
+    return;
+  }
+  sqlite3TwoPartName(pParse, pName1, pName2, &pName);
+  iDb = sqlite3SchemaToIndex(db, p->pSchema);
+  if( sqlite3FixInit(&sFix, pParse, iDb, "view", pName)
+    && sqlite3FixSelect(&sFix, pSelect)
+  ){
+    sqlite3SelectDelete(db, pSelect);
+    return;
+  }
+
+  /* Make a copy of the entire SELECT statement that defines the view.
+  ** This will force all the Expr.token.z values to be dynamically
+  ** allocated rather than point to the input string - which means that
+  ** they will persist after the current sqlite3_exec() call returns.
+  */
+  p->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
+  sqlite3SelectDelete(db, pSelect);
+  if( db->mallocFailed ){
+    return;
+  }
+  if( !db->init.busy ){
+    sqlite3ViewGetColumnNames(pParse, p);
+  }
+
+  /* Locate the end of the CREATE VIEW statement.  Make sEnd point to
+  ** the end.
+  */
+  sEnd = pParse->sLastToken;
+  if( ALWAYS(sEnd.z[0]!=0) && sEnd.z[0]!=';' ){
+    sEnd.z += sEnd.n;
+  }
+  sEnd.n = 0;
+  n = (int)(sEnd.z - pBegin->z);
+  z = pBegin->z;
+  while( ALWAYS(n>0) && sqlite3Isspace(z[n-1]) ){ n--; }
+  sEnd.z = &z[n-1];
+  sEnd.n = 1;
+
+  /* Use sqlite3EndTable() to add the view to the SQLITE_MASTER table */
+  sqlite3EndTable(pParse, 0, &sEnd, 0);
+  return;
+}
+#endif /* SQLITE_OMIT_VIEW */
+
+#if !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE)
+/*
+** The Table structure pTable is really a VIEW.  Fill in the names of
+** the columns of the view in the pTable structure.  Return the number
+** of errors.  If an error is seen leave an error message in pParse->zErrMsg.
+*/
+SQLITE_PRIVATE int sqlite3ViewGetColumnNames(Parse *pParse, Table *pTable){
+  Table *pSelTab;   /* A fake table from which we get the result set */
+  Select *pSel;     /* Copy of the SELECT that implements the view */
+  int nErr = 0;     /* Number of errors encountered */
+  int n;            /* Temporarily holds the number of cursors assigned */
+  sqlite3 *db = pParse->db;  /* Database connection for malloc errors */
+  int (*xAuth)(void*,int,const char*,const char*,const char*,const char*);
+
+  assert( pTable );
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  if( sqlite3VtabCallConnect(pParse, pTable) ){
+    return SQLITE_ERROR;
+  }
+  if( IsVirtual(pTable) ) return 0;
+#endif
+
+#ifndef SQLITE_OMIT_VIEW
+  /* A positive nCol means the columns names for this view are
+  ** already known.
+  */
+  if( pTable->nCol>0 ) return 0;
+
+  /* A negative nCol is a special marker meaning that we are currently
+  ** trying to compute the column names.  If we enter this routine with
+  ** a negative nCol, it means two or more views form a loop, like this:
+  **
+  **     CREATE VIEW one AS SELECT * FROM two;
+  **     CREATE VIEW two AS SELECT * FROM one;
+  **
+  ** Actually, the error above is now caught prior to reaching this point.
+  ** But the following test is still important as it does come up
+  ** in the following:
+  ** 
+  **     CREATE TABLE main.ex1(a);
+  **     CREATE TEMP VIEW ex1 AS SELECT a FROM ex1;
+  **     SELECT * FROM temp.ex1;
+  */
+  if( pTable->nCol<0 ){
+    sqlite3ErrorMsg(pParse, "view %s is circularly defined", pTable->zName);
+    return 1;
+  }
+  assert( pTable->nCol>=0 );
+
+  /* If we get this far, it means we need to compute the table names.
+  ** Note that the call to sqlite3ResultSetOfSelect() will expand any
+  ** "*" elements in the results set of the view and will assign cursors
+  ** to the elements of the FROM clause.  But we do not want these changes
+  ** to be permanent.  So the computation is done on a copy of the SELECT
+  ** statement that defines the view.
+  */
+  assert( pTable->pSelect );
+  pSel = sqlite3SelectDup(db, pTable->pSelect, 0);
+  if( pSel ){
+    u8 enableLookaside = db->lookaside.bEnabled;
+    n = pParse->nTab;
+    sqlite3SrcListAssignCursors(pParse, pSel->pSrc);
+    pTable->nCol = -1;
+    db->lookaside.bEnabled = 0;
+#ifndef SQLITE_OMIT_AUTHORIZATION
+    xAuth = db->xAuth;
+    db->xAuth = 0;
+    pSelTab = sqlite3ResultSetOfSelect(pParse, pSel);
+    db->xAuth = xAuth;
+#else
+    pSelTab = sqlite3ResultSetOfSelect(pParse, pSel);
+#endif
+    db->lookaside.bEnabled = enableLookaside;
+    pParse->nTab = n;
+    if( pSelTab ){
+      assert( pTable->aCol==0 );
+      pTable->nCol = pSelTab->nCol;
+      pTable->aCol = pSelTab->aCol;
+      pSelTab->nCol = 0;
+      pSelTab->aCol = 0;
+      sqlite3DeleteTable(db, pSelTab);
+      assert( sqlite3SchemaMutexHeld(db, 0, pTable->pSchema) );
+      pTable->pSchema->flags |= DB_UnresetViews;
+    }else{
+      pTable->nCol = 0;
+      nErr++;
+    }
+    sqlite3SelectDelete(db, pSel);
+  } else {
+    nErr++;
+  }
+#endif /* SQLITE_OMIT_VIEW */
+  return nErr;  
+}
+#endif /* !defined(SQLITE_OMIT_VIEW) || !defined(SQLITE_OMIT_VIRTUALTABLE) */
+
+#ifndef SQLITE_OMIT_VIEW
+/*
+** Clear the column names from every VIEW in database idx.
+*/
+static void sqliteViewResetAll(sqlite3 *db, int idx){
+  HashElem *i;
+  assert( sqlite3SchemaMutexHeld(db, idx, 0) );
+  if( !DbHasProperty(db, idx, DB_UnresetViews) ) return;
+  for(i=sqliteHashFirst(&db->aDb[idx].pSchema->tblHash); i;i=sqliteHashNext(i)){
+    Table *pTab = sqliteHashData(i);
+    if( pTab->pSelect ){
+      sqliteDeleteColumnNames(db, pTab);
+      pTab->aCol = 0;
+      pTab->nCol = 0;
+    }
+  }
+  DbClearProperty(db, idx, DB_UnresetViews);
+}
+#else
+# define sqliteViewResetAll(A,B)
+#endif /* SQLITE_OMIT_VIEW */
+
+/*
+** This function is called by the VDBE to adjust the internal schema
+** used by SQLite when the btree layer moves a table root page. The
+** root-page of a table or index in database iDb has changed from iFrom
+** to iTo.
+**
+** Ticket #1728:  The symbol table might still contain information
+** on tables and/or indices that are the process of being deleted.
+** If you are unlucky, one of those deleted indices or tables might
+** have the same rootpage number as the real table or index that is
+** being moved.  So we cannot stop searching after the first match 
+** because the first match might be for one of the deleted indices
+** or tables and not the table/index that is actually being moved.
+** We must continue looping until all tables and indices with
+** rootpage==iFrom have been converted to have a rootpage of iTo
+** in order to be certain that we got the right one.
+*/
+#ifndef SQLITE_OMIT_AUTOVACUUM
+SQLITE_PRIVATE void sqlite3RootPageMoved(sqlite3 *db, int iDb, int iFrom, int iTo){
+  HashElem *pElem;
+  Hash *pHash;
+  Db *pDb;
+
+  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+  pDb = &db->aDb[iDb];
+  pHash = &pDb->pSchema->tblHash;
+  for(pElem=sqliteHashFirst(pHash); pElem; pElem=sqliteHashNext(pElem)){
+    Table *pTab = sqliteHashData(pElem);
+    if( pTab->tnum==iFrom ){
+      pTab->tnum = iTo;
+    }
+  }
+  pHash = &pDb->pSchema->idxHash;
+  for(pElem=sqliteHashFirst(pHash); pElem; pElem=sqliteHashNext(pElem)){
+    Index *pIdx = sqliteHashData(pElem);
+    if( pIdx->tnum==iFrom ){
+      pIdx->tnum = iTo;
+    }
+  }
+}
+#endif
+
+/*
+** Write code to erase the table with root-page iTable from database iDb.
+** Also write code to modify the sqlite_master table and internal schema
+** if a root-page of another table is moved by the btree-layer whilst
+** erasing iTable (this can happen with an auto-vacuum database).
+*/ 
+static void destroyRootPage(Parse *pParse, int iTable, int iDb){
+  Vdbe *v = sqlite3GetVdbe(pParse);
+  int r1 = sqlite3GetTempReg(pParse);
+  sqlite3VdbeAddOp3(v, OP_Destroy, iTable, r1, iDb);
+  sqlite3MayAbort(pParse);
+#ifndef SQLITE_OMIT_AUTOVACUUM
+  /* OP_Destroy stores an in integer r1. If this integer
+  ** is non-zero, then it is the root page number of a table moved to
+  ** location iTable. The following code modifies the sqlite_master table to
+  ** reflect this.
+  **
+  ** The "#NNN" in the SQL is a special constant that means whatever value
+  ** is in register NNN.  See grammar rules associated with the TK_REGISTER
+  ** token for additional information.
+  */
+  sqlite3NestedParse(pParse, 
+     "UPDATE %Q.%s SET rootpage=%d WHERE #%d AND rootpage=#%d",
+     pParse->db->aDb[iDb].zName, SCHEMA_TABLE(iDb), iTable, r1, r1);
+#endif
+  sqlite3ReleaseTempReg(pParse, r1);
+}
+
+/*
+** Write VDBE code to erase table pTab and all associated indices on disk.
+** Code to update the sqlite_master tables and internal schema definitions
+** in case a root-page belonging to another table is moved by the btree layer
+** is also added (this can happen with an auto-vacuum database).
+*/
+static void destroyTable(Parse *pParse, Table *pTab){
+#ifdef SQLITE_OMIT_AUTOVACUUM
+  Index *pIdx;
+  int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
+  destroyRootPage(pParse, pTab->tnum, iDb);
+  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+    destroyRootPage(pParse, pIdx->tnum, iDb);
+  }
+#else
+  /* If the database may be auto-vacuum capable (if SQLITE_OMIT_AUTOVACUUM
+  ** is not defined), then it is important to call OP_Destroy on the
+  ** table and index root-pages in order, starting with the numerically 
+  ** largest root-page number. This guarantees that none of the root-pages
+  ** to be destroyed is relocated by an earlier OP_Destroy. i.e. if the
+  ** following were coded:
+  **
+  ** OP_Destroy 4 0
+  ** ...
+  ** OP_Destroy 5 0
+  **
+  ** and root page 5 happened to be the largest root-page number in the
+  ** database, then root page 5 would be moved to page 4 by the 
+  ** "OP_Destroy 4 0" opcode. The subsequent "OP_Destroy 5 0" would hit
+  ** a free-list page.
+  */
+  int iTab = pTab->tnum;
+  int iDestroyed = 0;
+
+  for(;;) {
+    Index *pIdx;
+    int iLargest = 0;
+
+    if( iDestroyed==0 || iTab<iDestroyed ){
+      iLargest = iTab;
+    }
+    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+      int iIdx = pIdx->tnum;
+      assert( pIdx->pSchema==pTab->pSchema );
+      if( (iDestroyed==0 || (iIdx<iDestroyed)) && iIdx>iLargest ){
+        iLargest = iIdx;
+      }
+    }
+    if( iLargest==0 ){
+      return;
+    }else{
+      int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
+      destroyRootPage(pParse, iLargest, iDb);
+      iDestroyed = iLargest;
+    }
+  }
+#endif
+}
+
+/*
+** This routine is called to do the work of a DROP TABLE statement.
+** pName is the name of the table to be dropped.
+*/
+SQLITE_PRIVATE void sqlite3DropTable(Parse *pParse, SrcList *pName, int isView, int noErr){
+  Table *pTab;
+  Vdbe *v;
+  sqlite3 *db = pParse->db;
+  int iDb;
+
+  if( db->mallocFailed ){
+    goto exit_drop_table;
+  }
+  assert( pParse->nErr==0 );
+  assert( pName->nSrc==1 );
+  if( noErr ) db->suppressErr++;
+  pTab = sqlite3LocateTable(pParse, isView, 
+                            pName->a[0].zName, pName->a[0].zDatabase);
+  if( noErr ) db->suppressErr--;
+
+  if( pTab==0 ){
+    if( noErr ) sqlite3CodeVerifyNamedSchema(pParse, pName->a[0].zDatabase);
+    goto exit_drop_table;
+  }
+  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+  assert( iDb>=0 && iDb<db->nDb );
+
+  /* If pTab is a virtual table, call ViewGetColumnNames() to ensure
+  ** it is initialized.
+  */
+  if( IsVirtual(pTab) && sqlite3ViewGetColumnNames(pParse, pTab) ){
+    goto exit_drop_table;
+  }
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  {
+    int code;
+    const char *zTab = SCHEMA_TABLE(iDb);
+    const char *zDb = db->aDb[iDb].zName;
+    const char *zArg2 = 0;
+    if( sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb)){
+      goto exit_drop_table;
+    }
+    if( isView ){
+		#if (!OMIT_TEMPDB)
+      if( iDb==1 ){
+        code = SQLITE_DROP_TEMP_VIEW;
+      }else{
+        code = SQLITE_DROP_VIEW;
+      }
+		#else
+		 code = SQLITE_DROP_VIEW;
+		#endif
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+    }else if( IsVirtual(pTab) ){
+      code = SQLITE_DROP_VTABLE;
+      zArg2 = sqlite3GetVTable(db, pTab)->pMod->zName;
+#endif
+    }else{
+		#if (!OMIT_TEMPDB)
+      if( iDb==1 ){
+        code = SQLITE_DROP_TEMP_TABLE;
+      }else{
+        code = SQLITE_DROP_TABLE;
+      }
+		#else
+		 code = SQLITE_DROP_TABLE;
+		#endif
+    }
+    if( sqlite3AuthCheck(pParse, code, pTab->zName, zArg2, zDb) ){
+      goto exit_drop_table;
+    }
+    if( sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb) ){
+      goto exit_drop_table;
+    }
+  }
+#endif
+  if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 ){
+    sqlite3ErrorMsg(pParse, "table %s may not be dropped", pTab->zName);
+    goto exit_drop_table;
+  }
+
+#ifndef SQLITE_OMIT_VIEW
+  /* Ensure DROP TABLE is not used on a view, and DROP VIEW is not used
+  ** on a table.
+  */
+  if( isView && pTab->pSelect==0 ){
+    sqlite3ErrorMsg(pParse, "use DROP TABLE to delete table %s", pTab->zName);
+    goto exit_drop_table;
+  }
+  if( !isView && pTab->pSelect ){
+    sqlite3ErrorMsg(pParse, "use DROP VIEW to delete view %s", pTab->zName);
+    goto exit_drop_table;
+  }
+#endif
+
+  /* Generate code to remove the table from the master table
+  ** on disk.
+  */
+  v = sqlite3GetVdbe(pParse);
+  if( v ){
+    Trigger *pTrigger;
+    Db *pDb = &db->aDb[iDb];
+    sqlite3BeginWriteOperation(pParse, 1, iDb);
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+    if( IsVirtual(pTab) ){
+      sqlite3VdbeAddOp0(v, OP_VBegin);
+    }
+#endif
+    sqlite3FkDropTable(pParse, pName, pTab);
+
+    /* Drop all triggers associated with the table being dropped. Code
+    ** is generated to remove entries from sqlite_master and/or
+    ** sqlite_temp_master if required.
+    */
+    pTrigger = sqlite3TriggerList(pParse, pTab);
+    while( pTrigger ){
+      assert( pTrigger->pSchema==pTab->pSchema || 
+          pTrigger->pSchema==db->aDb[1].pSchema );
+      sqlite3DropTriggerPtr(pParse, pTrigger);
+      pTrigger = pTrigger->pNext;
+    }
+
+#ifndef SQLITE_OMIT_AUTOINCREMENT
+    /* Remove any entries of the sqlite_sequence table associated with
+    ** the table being dropped. This is done before the table is dropped
+    ** at the btree level, in case the sqlite_sequence table needs to
+    ** move as a result of the drop (can happen in auto-vacuum mode).
+    */
+    if( pTab->tabFlags & TF_Autoincrement ){
+      sqlite3NestedParse(pParse,
+        "DELETE FROM %s.sqlite_sequence WHERE name=%Q",
+        pDb->zName, pTab->zName
+      );
+    }
+#endif
+
+    /* Drop all SQLITE_MASTER table and index entries that refer to the
+    ** table. The program name loops through the master table and deletes
+    ** every row that refers to a table of the same name as the one being
+    ** dropped. Triggers are handled seperately because a trigger can be
+    ** created in the temp database that refers to a table in another
+    ** database.
+    */
+    sqlite3NestedParse(pParse, 
+        "DELETE FROM %Q.%s WHERE tbl_name=%Q and type!='trigger'",
+        pDb->zName, SCHEMA_TABLE(iDb), pTab->zName);
+
+    /* Drop any statistics from the sqlite_stat1 table, if it exists */
+    if( sqlite3FindTable(db, "sqlite_stat1", db->aDb[iDb].zName) ){
+      sqlite3NestedParse(pParse,
+        "DELETE FROM %Q.sqlite_stat1 WHERE tbl=%Q", pDb->zName, pTab->zName
+      );
+    }
+
+    if( !isView && !IsVirtual(pTab) ){
+      destroyTable(pParse, pTab);
+    }
+
+    /* Remove the table entry from SQLite's internal schema and modify
+    ** the schema cookie.
+    */
+    if( IsVirtual(pTab) ){
+      sqlite3VdbeAddOp4(v, OP_VDestroy, iDb, 0, 0, pTab->zName, 0);
+    }
+    sqlite3VdbeAddOp4(v, OP_DropTable, iDb, 0, 0, pTab->zName, 0);
+    sqlite3ChangeCookie(pParse, iDb);
+  }
+  sqliteViewResetAll(db, iDb);
+
+exit_drop_table:
+  sqlite3SrcListDelete(db, pName);
+}
+
+/*
+** This routine is called to create a new foreign key on the table
+** currently under construction.  pFromCol determines which columns
+** in the current table point to the foreign key.  If pFromCol==0 then
+** connect the key to the last column inserted.  pTo is the name of
+** the table referred to.  pToCol is a list of tables in the other
+** pTo table that the foreign key points to.  flags contains all
+** information about the conflict resolution algorithms specified
+** in the ON DELETE, ON UPDATE and ON INSERT clauses.
+**
+** An FKey structure is created and added to the table currently
+** under construction in the pParse->pNewTable field.
+**
+** The foreign key is set for IMMEDIATE processing.  A subsequent call
+** to sqlite3DeferForeignKey() might change this to DEFERRED.
+*/
+SQLITE_PRIVATE void sqlite3CreateForeignKey(
+  Parse *pParse,       /* Parsing context */
+  ExprList *pFromCol,  /* Columns in this table that point to other table */
+  Token *pTo,          /* Name of the other table */
+  ExprList *pToCol,    /* Columns in the other table */
+  int flags            /* Conflict resolution algorithms. */
+){
+  sqlite3 *db = pParse->db;
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+  FKey *pFKey = 0;
+  FKey *pNextTo;
+  Table *p = pParse->pNewTable;
+  int nByte;
+  int i;
+  int nCol;
+  char *z;
+
+  assert( pTo!=0 );
+  if( p==0 || IN_DECLARE_VTAB ) goto fk_end;
+  if( pFromCol==0 ){
+    int iCol = p->nCol-1;
+    if( NEVER(iCol<0) ) goto fk_end;
+    if( pToCol && pToCol->nExpr!=1 ){
+      sqlite3ErrorMsg(pParse, "foreign key on %s"
+         " should reference only one column of table %T",
+         p->aCol[iCol].zName, pTo);
+      goto fk_end;
+    }
+    nCol = 1;
+  }else if( pToCol && pToCol->nExpr!=pFromCol->nExpr ){
+    sqlite3ErrorMsg(pParse,
+        "number of columns in foreign key does not match the number of "
+        "columns in the referenced table");
+    goto fk_end;
+  }else{
+    nCol = pFromCol->nExpr;
+  }
+  nByte = sizeof(*pFKey) + (nCol-1)*sizeof(pFKey->aCol[0]) + pTo->n + 1;
+  if( pToCol ){
+    for(i=0; i<pToCol->nExpr; i++){
+      nByte += sqlite3Strlen30(pToCol->a[i].zName) + 1;
+    }
+  }
+  pFKey = sqlite3DbMallocZero(db, nByte );
+  if( pFKey==0 ){
+    goto fk_end;
+  }
+  pFKey->pFrom = p;
+  pFKey->pNextFrom = p->pFKey;
+  z = (char*)&pFKey->aCol[nCol];
+  pFKey->zTo = z;
+  memcpy(z, pTo->z, pTo->n);
+  z[pTo->n] = 0;
+  sqlite3Dequote(z);
+  z += pTo->n+1;
+  pFKey->nCol = nCol;
+  if( pFromCol==0 ){
+    pFKey->aCol[0].iFrom = p->nCol-1;
+  }else{
+    for(i=0; i<nCol; i++){
+      int j;
+      for(j=0; j<p->nCol; j++){
+        if( sqlite3StrICmp(p->aCol[j].zName, pFromCol->a[i].zName)==0 ){
+          pFKey->aCol[i].iFrom = j;
+          break;
+        }
+      }
+      if( j>=p->nCol ){
+        sqlite3ErrorMsg(pParse, 
+          "unknown column \"%s\" in foreign key definition", 
+          pFromCol->a[i].zName);
+        goto fk_end;
+      }
+    }
+  }
+  if( pToCol ){
+    for(i=0; i<nCol; i++){
+      int n = sqlite3Strlen30(pToCol->a[i].zName);
+      pFKey->aCol[i].zCol = z;
+      memcpy(z, pToCol->a[i].zName, n);
+      z[n] = 0;
+      z += n+1;
+    }
+  }
+  pFKey->isDeferred = 0;
+  pFKey->aAction[0] = (u8)(flags & 0xff);            /* ON DELETE action */
+  pFKey->aAction[1] = (u8)((flags >> 8 ) & 0xff);    /* ON UPDATE action */
+
+  assert( sqlite3SchemaMutexHeld(db, 0, p->pSchema) );
+  pNextTo = (FKey *)sqlite3HashInsert(&p->pSchema->fkeyHash, 
+      pFKey->zTo, sqlite3Strlen30(pFKey->zTo), (void *)pFKey
+  );
+  if( pNextTo==pFKey ){
+    db->mallocFailed = 1;
+    goto fk_end;
+  }
+  if( pNextTo ){
+    assert( pNextTo->pPrevTo==0 );
+    pFKey->pNextTo = pNextTo;
+    pNextTo->pPrevTo = pFKey;
+  }
+
+  /* Link the foreign key to the table as the last step.
+  */
+  p->pFKey = pFKey;
+  pFKey = 0;
+
+fk_end:
+  sqlite3DbFree(db, pFKey);
+#endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */
+  sqlite3ExprListDelete(db, pFromCol);
+  sqlite3ExprListDelete(db, pToCol);
+}
+
+/*
+** This routine is called when an INITIALLY IMMEDIATE or INITIALLY DEFERRED
+** clause is seen as part of a foreign key definition.  The isDeferred
+** parameter is 1 for INITIALLY DEFERRED and 0 for INITIALLY IMMEDIATE.
+** The behavior of the most recently created foreign key is adjusted
+** accordingly.
+*/
+SQLITE_PRIVATE void sqlite3DeferForeignKey(Parse *pParse, int isDeferred){
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+  Table *pTab;
+  FKey *pFKey;
+  if( (pTab = pParse->pNewTable)==0 || (pFKey = pTab->pFKey)==0 ) return;
+  assert( isDeferred==0 || isDeferred==1 ); /* EV: R-30323-21917 */
+  pFKey->isDeferred = (u8)isDeferred;
+#endif
+}
+
+/*
+** Generate code that will erase and refill index *pIdx.  This is
+** used to initialize a newly created index or to recompute the
+** content of an index in response to a REINDEX command.
+**
+** if memRootPage is not negative, it means that the index is newly
+** created.  The register specified by memRootPage contains the
+** root page number of the index.  If memRootPage is negative, then
+** the index already exists and must be cleared before being refilled and
+** the root page number of the index is taken from pIndex->tnum.
+*/
+static void sqlite3RefillIndex(Parse *pParse, Index *pIndex, int memRootPage){
+  Table *pTab = pIndex->pTable;  /* The table that is indexed */
+  int iTab = pParse->nTab++;     /* Btree cursor used for pTab */
+  int iIdx = pParse->nTab++;     /* Btree cursor used for pIndex */
+  int addr1;                     /* Address of top of loop */
+  int tnum;                      /* Root page of index */
+  Vdbe *v;                       /* Generate code into this virtual machine */
+  KeyInfo *pKey;                 /* KeyInfo for index */
+  int regIdxKey;                 /* Registers containing the index key */
+  int regRecord;                 /* Register holding assemblied index record */
+  sqlite3 *db = pParse->db;      /* The database connection */
+  int iDb = sqlite3SchemaToIndex(db, pIndex->pSchema);
+
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  if( sqlite3AuthCheck(pParse, SQLITE_REINDEX, pIndex->zName, 0,
+      db->aDb[iDb].zName ) ){
+    return;
+  }
+#endif
+
+  /* Require a write-lock on the table to perform this operation */
+  sqlite3TableLock(pParse, iDb, pTab->tnum, 1, pTab->zName);
+
+  v = sqlite3GetVdbe(pParse);
+  if( v==0 ) return;
+  if( memRootPage>=0 ){
+    tnum = memRootPage;
+  }else{
+    tnum = pIndex->tnum;
+    sqlite3VdbeAddOp2(v, OP_Clear, tnum, iDb);
+  }
+  pKey = sqlite3IndexKeyinfo(pParse, pIndex);
+  sqlite3VdbeAddOp4(v, OP_OpenWrite, iIdx, tnum, iDb, 
+                    (char *)pKey, P4_KEYINFO_HANDOFF);
+  if( memRootPage>=0 ){
+    sqlite3VdbeChangeP5(v, 1);
+  }
+  sqlite3OpenTable(pParse, iTab, iDb, pTab, OP_OpenRead);
+  addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iTab, 0);
+  regRecord = sqlite3GetTempReg(pParse);
+  regIdxKey = sqlite3GenerateIndexKey(pParse, pIndex, iTab, regRecord, 1);
+  if( pIndex->onError!=OE_None ){
+    const int regRowid = regIdxKey + pIndex->nColumn;
+    const int j2 = sqlite3VdbeCurrentAddr(v) + 2;
+    void * const pRegKey = SQLITE_INT_TO_PTR(regIdxKey);
+
+    /* The registers accessed by the OP_IsUnique opcode were allocated
+    ** using sqlite3GetTempRange() inside of the sqlite3GenerateIndexKey()
+    ** call above. Just before that function was freed they were released
+    ** (made available to the compiler for reuse) using 
+    ** sqlite3ReleaseTempRange(). So in some ways having the OP_IsUnique
+    ** opcode use the values stored within seems dangerous. However, since
+    ** we can be sure that no other temp registers have been allocated
+    ** since sqlite3ReleaseTempRange() was called, it is safe to do so.
+    */
+    sqlite3VdbeAddOp4(v, OP_IsUnique, iIdx, j2, regRowid, pRegKey, P4_INT32);
+    sqlite3HaltConstraint(
+        pParse, OE_Abort, "indexed columns are not unique", P4_STATIC);
+  }
+  sqlite3VdbeAddOp2(v, OP_IdxInsert, iIdx, regRecord);
+  sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
+  sqlite3ReleaseTempReg(pParse, regRecord);
+  sqlite3VdbeAddOp2(v, OP_Next, iTab, addr1+1);
+  sqlite3VdbeJumpHere(v, addr1);
+  sqlite3VdbeAddOp1(v, OP_Close, iTab);
+  sqlite3VdbeAddOp1(v, OP_Close, iIdx);
+}
+
+/*
+** Create a new index for an SQL table.  pName1.pName2 is the name of the index 
+** and pTblList is the name of the table that is to be indexed.  Both will 
+** be NULL for a primary key or an index that is created to satisfy a
+** UNIQUE constraint.  If pTable and pIndex are NULL, use pParse->pNewTable
+** as the table to be indexed.  pParse->pNewTable is a table that is
+** currently being constructed by a CREATE TABLE statement.
+**
+** pList is a list of columns to be indexed.  pList will be NULL if this
+** is a primary key or unique-constraint on the most recent column added
+** to the table currently under construction.  
+**
+** If the index is created successfully, return a pointer to the new Index
+** structure. This is used by sqlite3AddPrimaryKey() to mark the index
+** as the tables primary key (Index.autoIndex==2).
+*/
+SQLITE_PRIVATE Index *sqlite3CreateIndex(
+  Parse *pParse,     /* All information about this parse */
+  Token *pName1,     /* First part of index name. May be NULL */
+  Token *pName2,     /* Second part of index name. May be NULL */
+  SrcList *pTblName, /* Table to index. Use pParse->pNewTable if 0 */
+  ExprList *pList,   /* A list of columns to be indexed */
+  int onError,       /* OE_Abort, OE_Ignore, OE_Replace, or OE_None */
+  Token *pStart,     /* The CREATE token that begins this statement */
+  Token *pEnd,       /* The ")" that closes the CREATE INDEX statement */
+  int sortOrder,     /* Sort order of primary key when pList==NULL */
+  int ifNotExist     /* Omit error if index already exists */
+){
+  Index *pRet = 0;     /* Pointer to return */
+  Table *pTab = 0;     /* Table to be indexed */
+  Index *pIndex = 0;   /* The index to be created */
+  char *zName = 0;     /* Name of the index */
+  int nName;           /* Number of characters in zName */
+  int i, j;
+  Token nullId;        /* Fake token for an empty ID list */
+  DbFixer sFix;        /* For assigning database names to pTable */
+  int sortOrderMask;   /* 1 to honor DESC in index.  0 to ignore. */
+  sqlite3 *db = pParse->db;
+  Db *pDb;             /* The specific table containing the indexed database */
+  int iDb;             /* Index of the database that is being written */
+  Token *pName = 0;    /* Unqualified name of the index to create */
+  struct ExprList_item *pListItem; /* For looping over pList */
+  int nCol;
+  int nExtra = 0;
+  char *zExtra;
+
+  assert( pStart==0 || pEnd!=0 ); /* pEnd must be non-NULL if pStart is */
+  assert( pParse->nErr==0 );      /* Never called with prior errors */
+  if( db->mallocFailed || IN_DECLARE_VTAB ){
+    goto exit_create_index;
+  }
+  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
+    goto exit_create_index;
+  }
+
+  /*
+  ** Find the table that is to be indexed.  Return early if not found.
+  */
+  if( pTblName!=0 ){
+
+    /* Use the two-part index name to determine the database 
+    ** to search for the table. 'Fix' the table name to this db
+    ** before looking up the table.
+    */
+    assert( pName1 && pName2 );
+    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
+    if( iDb<0 ) goto exit_create_index;
+
+#ifndef SQLITE_OMIT_TEMPDB
+    /* If the index name was unqualified, check if the the table
+    ** is a temp table. If so, set the database to 1. Do not do this
+    ** if initialising a database schema.
+    */
+    if( !db->init.busy ){
+      pTab = sqlite3SrcListLookup(pParse, pTblName);
+      if( pName2->n==0 && pTab && pTab->pSchema==db->aDb[1].pSchema ){
+        iDb = 1;
+      }
+    }
+#endif
+
+    if( sqlite3FixInit(&sFix, pParse, iDb, "index", pName) &&
+        sqlite3FixSrcList(&sFix, pTblName)
+    ){
+      /* Because the parser constructs pTblName from a single identifier,
+      ** sqlite3FixSrcList can never fail. */
+      assert(0);
+    }
+    pTab = sqlite3LocateTable(pParse, 0, pTblName->a[0].zName, 
+        pTblName->a[0].zDatabase);
+    if( !pTab || db->mallocFailed ) goto exit_create_index;
+    assert( db->aDb[iDb].pSchema==pTab->pSchema );
+  }else{
+    assert( pName==0 );
+    pTab = pParse->pNewTable;
+    if( !pTab ) goto exit_create_index;
+    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+  }
+  pDb = &db->aDb[iDb];
+
+  assert( pTab!=0 );
+  assert( pParse->nErr==0 );
+  if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 
+       && memcmp(&pTab->zName[7],"altertab_",9)!=0 ){
+    sqlite3ErrorMsg(pParse, "table %s may not be indexed", pTab->zName);
+    goto exit_create_index;
+  }
+#ifndef SQLITE_OMIT_VIEW
+  if( pTab->pSelect ){
+    sqlite3ErrorMsg(pParse, "views may not be indexed");
+    goto exit_create_index;
+  }
+#endif
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  if( IsVirtual(pTab) ){
+    sqlite3ErrorMsg(pParse, "virtual tables may not be indexed");
+    goto exit_create_index;
+  }
+#endif
+
+  /*
+  ** Find the name of the index.  Make sure there is not already another
+  ** index or table with the same name.  
+  **
+  ** Exception:  If we are reading the names of permanent indices from the
+  ** sqlite_master table (because some other process changed the schema) and
+  ** one of the index names collides with the name of a temporary table or
+  ** index, then we will continue to process this index.
+  **
+  ** If pName==0 it means that we are
+  ** dealing with a primary key or UNIQUE constraint.  We have to invent our
+  ** own name.
+  */
+  if( pName ){
+    zName = sqlite3NameFromToken(db, pName);
+    if( zName==0 ) goto exit_create_index;
+    if( SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
+      goto exit_create_index;
+    }
+    if( !db->init.busy ){
+      if( sqlite3FindTable(db, zName, 0)!=0 ){
+        sqlite3ErrorMsg(pParse, "there is already a table named %s", zName);
+        goto exit_create_index;
+      }
+    }
+    if( sqlite3FindIndex(db, zName, pDb->zName)!=0 ){
+      if( !ifNotExist ){
+        sqlite3ErrorMsg(pParse, "index %s already exists", zName);
+      }else{
+        assert( !db->init.busy );
+        sqlite3CodeVerifySchema(pParse, iDb);
+      }
+      goto exit_create_index;
+    }
+  }else{
+    int n;
+    Index *pLoop;
+    for(pLoop=pTab->pIndex, n=1; pLoop; pLoop=pLoop->pNext, n++){}
+    zName = sqlite3MPrintf(db, "sqlite_autoindex_%s_%d", pTab->zName, n);
+    if( zName==0 ){
+      goto exit_create_index;
+    }
+  }
+
+  /* Check for authorization to create an index.
+  */
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  {
+    const char *zDb = pDb->zName;
+    if( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(iDb), 0, zDb) ){
+      goto exit_create_index;
+    }
+    i = SQLITE_CREATE_INDEX;
+	 #if (!OMIT_TEMPDB )
+    if(  iDb==1 ) i = SQLITE_CREATE_TEMP_INDEX;
+	 #endif
+    if( sqlite3AuthCheck(pParse, i, zName, pTab->zName, zDb) ){
+      goto exit_create_index;
+    }
+  }
+#endif
+
+  /* If pList==0, it means this routine was called to make a primary
+  ** key out of the last column added to the table under construction.
+  ** So create a fake list to simulate this.
+  */
+  if( pList==0 ){
+    nullId.z = pTab->aCol[pTab->nCol-1].zName;
+    nullId.n = sqlite3Strlen30((char*)nullId.z);
+    pList = sqlite3ExprListAppend(pParse, 0, 0);
+    if( pList==0 ) goto exit_create_index;
+    sqlite3ExprListSetName(pParse, pList, &nullId, 0);
+    pList->a[0].sortOrder = (u8)sortOrder;
+  }
+
+  /* Figure out how many bytes of space are required to store explicitly
+  ** specified collation sequence names.
+  */
+  for(i=0; i<pList->nExpr; i++){
+    Expr *pExpr = pList->a[i].pExpr;
+    if( pExpr ){
+      CollSeq *pColl = pExpr->pColl;
+      /* Either pColl!=0 or there was an OOM failure.  But if an OOM
+      ** failure we have quit before reaching this point. */
+      if( ALWAYS(pColl) ){
+        nExtra += (1 + sqlite3Strlen30(pColl->zName));
+      }
+    }
+  }
+
+  /* 
+  ** Allocate the index structure. 
+  */
+  nName = sqlite3Strlen30(zName);
+  nCol = pList->nExpr;
+  pIndex = sqlite3DbMallocZero(db, 
+      sizeof(Index) +              /* Index structure  */
+      sizeof(int)*nCol +           /* Index.aiColumn   */
+      sizeof(int)*(nCol+1) +       /* Index.aiRowEst   */
+      sizeof(char *)*nCol +        /* Index.azColl     */
+      sizeof(u8)*nCol +            /* Index.aSortOrder */
+      nName + 1 +                  /* Index.zName      */
+      nExtra                       /* Collation sequence names */
+  );
+  if( db->mallocFailed ){
+    goto exit_create_index;
+  }
+  pIndex->azColl = (char**)(&pIndex[1]);
+  pIndex->aiColumn = (int *)(&pIndex->azColl[nCol]);
+  pIndex->aiRowEst = (unsigned *)(&pIndex->aiColumn[nCol]);
+  pIndex->aSortOrder = (u8 *)(&pIndex->aiRowEst[nCol+1]);
+  pIndex->zName = (char *)(&pIndex->aSortOrder[nCol]);
+  zExtra = (char *)(&pIndex->zName[nName+1]);
+  memcpy(pIndex->zName, zName, nName+1);
+  pIndex->pTable = pTab;
+  pIndex->nColumn = pList->nExpr;
+  pIndex->onError = (u8)onError;
+  pIndex->autoIndex = (u8)(pName==0);
+  pIndex->pSchema = db->aDb[iDb].pSchema;
+  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+
+  /* Check to see if we should honor DESC requests on index columns
+  */
+  if( pDb->pSchema->file_format>=4 ){
+    sortOrderMask = -1;   /* Honor DESC */
+  }else{
+    sortOrderMask = 0;    /* Ignore DESC */
+  }
+
+  /* Scan the names of the columns of the table to be indexed and
+  ** load the column indices into the Index structure.  Report an error
+  ** if any column is not found.
+  **
+  ** TODO:  Add a test to make sure that the same column is not named
+  ** more than once within the same index.  Only the first instance of
+  ** the column will ever be used by the optimizer.  Note that using the
+  ** same column more than once cannot be an error because that would 
+  ** break backwards compatibility - it needs to be a warning.
+  */
+  for(i=0, pListItem=pList->a; i<pList->nExpr; i++, pListItem++){
+    const char *zColName = pListItem->zName;
+    Column *pTabCol;
+    int requestedSortOrder;
+    char *zColl;                   /* Collation sequence name */
+
+    for(j=0, pTabCol=pTab->aCol; j<pTab->nCol; j++, pTabCol++){
+      if( sqlite3StrICmp(zColName, pTabCol->zName)==0 ) break;
+    }
+    if( j>=pTab->nCol ){
+      sqlite3ErrorMsg(pParse, "table %s has no column named %s",
+        pTab->zName, zColName);
+      pParse->checkSchema = 1;
+      goto exit_create_index;
+    }
+    pIndex->aiColumn[i] = j;
+    /* Justification of the ALWAYS(pListItem->pExpr->pColl):  Because of
+    ** the way the "idxlist" non-terminal is constructed by the parser,
+    ** if pListItem->pExpr is not null then either pListItem->pExpr->pColl
+    ** must exist or else there must have been an OOM error.  But if there
+    ** was an OOM error, we would never reach this point. */
+    if( pListItem->pExpr && ALWAYS(pListItem->pExpr->pColl) ){
+      int nColl;
+      zColl = pListItem->pExpr->pColl->zName;
+      nColl = sqlite3Strlen30(zColl) + 1;
+      assert( nExtra>=nColl );
+      memcpy(zExtra, zColl, nColl);
+      zColl = zExtra;
+      zExtra += nColl;
+      nExtra -= nColl;
+    }else{
+      zColl = pTab->aCol[j].zColl;
+      if( !zColl ){
+        zColl = db->pDfltColl->zName;
+      }
+    }
+    if( !db->init.busy && !sqlite3LocateCollSeq(pParse, zColl) ){
+      goto exit_create_index;
+    }
+    pIndex->azColl[i] = zColl;
+    requestedSortOrder = pListItem->sortOrder & sortOrderMask;
+    pIndex->aSortOrder[i] = (u8)requestedSortOrder;
+  }
+  sqlite3DefaultRowEst(pIndex);
+
+  if( pTab==pParse->pNewTable ){
+    /* This routine has been called to create an automatic index as a
+    ** result of a PRIMARY KEY or UNIQUE clause on a column definition, or
+    ** a PRIMARY KEY or UNIQUE clause following the column definitions.
+    ** i.e. one of:
+    **
+    ** CREATE TABLE t(x PRIMARY KEY, y);
+    ** CREATE TABLE t(x, y, UNIQUE(x, y));
+    **
+    ** Either way, check to see if the table already has such an index. If
+    ** so, don't bother creating this one. This only applies to
+    ** automatically created indices. Users can do as they wish with
+    ** explicit indices.
+    **
+    ** Two UNIQUE or PRIMARY KEY constraints are considered equivalent
+    ** (and thus suppressing the second one) even if they have different
+    ** sort orders.
+    **
+    ** If there are different collating sequences or if the columns of
+    ** the constraint occur in different orders, then the constraints are
+    ** considered distinct and both result in separate indices.
+    */
+    Index *pIdx;
+    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+      int k;
+      assert( pIdx->onError!=OE_None );
+      assert( pIdx->autoIndex );
+      assert( pIndex->onError!=OE_None );
+
+      if( pIdx->nColumn!=pIndex->nColumn ) continue;
+      for(k=0; k<pIdx->nColumn; k++){
+        const char *z1;
+        const char *z2;
+        if( pIdx->aiColumn[k]!=pIndex->aiColumn[k] ) break;
+        z1 = pIdx->azColl[k];
+        z2 = pIndex->azColl[k];
+        if( z1!=z2 && sqlite3StrICmp(z1, z2) ) break;
+      }
+      if( k==pIdx->nColumn ){
+        if( pIdx->onError!=pIndex->onError ){
+          /* This constraint creates the same index as a previous
+          ** constraint specified somewhere in the CREATE TABLE statement.
+          ** However the ON CONFLICT clauses are different. If both this 
+          ** constraint and the previous equivalent constraint have explicit
+          ** ON CONFLICT clauses this is an error. Otherwise, use the
+          ** explicitly specified behaviour for the index.
+          */
+          if( !(pIdx->onError==OE_Default || pIndex->onError==OE_Default) ){
+            sqlite3ErrorMsg(pParse, 
+                "conflicting ON CONFLICT clauses specified", 0);
+          }
+          if( pIdx->onError==OE_Default ){
+            pIdx->onError = pIndex->onError;
+          }
+        }
+        goto exit_create_index;
+      }
+    }
+  }
+
+  /* Link the new Index structure to its table and to the other
+  ** in-memory database structures. 
+  */
+  if( db->init.busy ){
+    Index *p;
+    assert( sqlite3SchemaMutexHeld(db, 0, pIndex->pSchema) );
+    p = sqlite3HashInsert(&pIndex->pSchema->idxHash, 
+                          pIndex->zName, sqlite3Strlen30(pIndex->zName),
+                          pIndex);
+    if( p ){
+      assert( p==pIndex );  /* Malloc must have failed */
+      db->mallocFailed = 1;
+      goto exit_create_index;
+    }
+    db->flags |= SQLITE_InternChanges;
+    if( pTblName!=0 ){
+      pIndex->tnum = db->init.newTnum;
+    }
+  }
+
+  /* If the db->init.busy is 0 then create the index on disk.  This
+  ** involves writing the index into the master table and filling in the
+  ** index with the current table contents.
+  **
+  ** The db->init.busy is 0 when the user first enters a CREATE INDEX 
+  ** command.  db->init.busy is 1 when a database is opened and 
+  ** CREATE INDEX statements are read out of the master table.  In
+  ** the latter case the index already exists on disk, which is why
+  ** we don't want to recreate it.
+  **
+  ** If pTblName==0 it means this index is generated as a primary key
+  ** or UNIQUE constraint of a CREATE TABLE statement.  Since the table
+  ** has just been created, it contains no data and the index initialization
+  ** step can be skipped.
+  */
+  else{ /* if( db->init.busy==0 ) */
+    Vdbe *v;
+    char *zStmt;
+    int iMem = ++pParse->nMem;
+
+    v = sqlite3GetVdbe(pParse);
+    if( v==0 ) goto exit_create_index;
+
+
+    /* Create the rootpage for the index
+    */
+    sqlite3BeginWriteOperation(pParse, 1, iDb);
+    sqlite3VdbeAddOp2(v, OP_CreateIndex, iDb, iMem);
+
+    /* Gather the complete text of the CREATE INDEX statement into
+    ** the zStmt variable
+    */
+    if( pStart ){
+      assert( pEnd!=0 );
+      /* A named index with an explicit CREATE INDEX statement */
+      zStmt = sqlite3MPrintf(db, "CREATE%s INDEX %.*s",
+        onError==OE_None ? "" : " UNIQUE",
+        pEnd->z - pName->z + 1,
+        pName->z);
+    }else{
+      /* An automatic index created by a PRIMARY KEY or UNIQUE constraint */
+      /* zStmt = sqlite3MPrintf(""); */
+      zStmt = 0;
+    }
+
+    /* Add an entry in sqlite_master for this index
+    */
+    sqlite3NestedParse(pParse, 
+        "INSERT INTO %Q.%s VALUES('index',%Q,%Q,#%d,%Q);",
+        db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
+        pIndex->zName,
+        pTab->zName,
+        iMem,
+        zStmt
+    );
+    sqlite3DbFree(db, zStmt);
+
+    /* Fill the index with data and reparse the schema. Code an OP_Expire
+    ** to invalidate all pre-compiled statements.
+    */
+    if( pTblName ){
+      sqlite3RefillIndex(pParse, pIndex, iMem);
+      sqlite3ChangeCookie(pParse, iDb);
+      sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 0, 0,
+         sqlite3MPrintf(db, "name='%q' AND type='index'", pIndex->zName), 
+         P4_DYNAMIC);
+      sqlite3VdbeAddOp1(v, OP_Expire, 0);
+    }
+  }
+
+  /* When adding an index to the list of indices for a table, make
+  ** sure all indices labeled OE_Replace come after all those labeled
+  ** OE_Ignore.  This is necessary for the correct constraint check
+  ** processing (in sqlite3GenerateConstraintChecks()) as part of
+  ** UPDATE and INSERT statements.  
+  */
+  if( db->init.busy || pTblName==0 ){
+    if( onError!=OE_Replace || pTab->pIndex==0
+         || pTab->pIndex->onError==OE_Replace){
+      pIndex->pNext = pTab->pIndex;
+      pTab->pIndex = pIndex;
+    }else{
+      Index *pOther = pTab->pIndex;
+      while( pOther->pNext && pOther->pNext->onError!=OE_Replace ){
+        pOther = pOther->pNext;
+      }
+      pIndex->pNext = pOther->pNext;
+      pOther->pNext = pIndex;
+    }
+    pRet = pIndex;
+    pIndex = 0;
+  }
+
+  /* Clean up before exiting */
+exit_create_index:
+  if( pIndex ){
+    sqlite3DbFree(db, pIndex->zColAff);
+    sqlite3DbFree(db, pIndex);
+  }
+  sqlite3ExprListDelete(db, pList);
+  sqlite3SrcListDelete(db, pTblName);
+  sqlite3DbFree(db, zName);
+  return pRet;
+}
+
+/*
+** Fill the Index.aiRowEst[] array with default information - information
+** to be used when we have not run the ANALYZE command.
+**
+** aiRowEst[0] is suppose to contain the number of elements in the index.
+** Since we do not know, guess 1 million.  aiRowEst[1] is an estimate of the
+** number of rows in the table that match any particular value of the
+** first column of the index.  aiRowEst[2] is an estimate of the number
+** of rows that match any particular combiniation of the first 2 columns
+** of the index.  And so forth.  It must always be the case that
+*
+**           aiRowEst[N]<=aiRowEst[N-1]
+**           aiRowEst[N]>=1
+**
+** Apart from that, we have little to go on besides intuition as to
+** how aiRowEst[] should be initialized.  The numbers generated here
+** are based on typical values found in actual indices.
+*/
+SQLITE_PRIVATE void sqlite3DefaultRowEst(Index *pIdx){
+  unsigned *a = pIdx->aiRowEst;
+  int i;
+  unsigned n;
+  assert( a!=0 );
+  a[0] = pIdx->pTable->nRowEst;
+  if( a[0]<10 ) a[0] = 10;
+  n = 10;
+  for(i=1; i<=pIdx->nColumn; i++){
+    a[i] = n;
+    if( n>5 ) n--;
+  }
+  if( pIdx->onError!=OE_None ){
+    a[pIdx->nColumn] = 1;
+  }
+}
+
+/*
+** This routine will drop an existing named index.  This routine
+** implements the DROP INDEX statement.
+*/
+SQLITE_PRIVATE void sqlite3DropIndex(Parse *pParse, SrcList *pName, int ifExists){
+  Index *pIndex;
+  Vdbe *v;
+  sqlite3 *db = pParse->db;
+  int iDb;
+
+  assert( pParse->nErr==0 );   /* Never called with prior errors */
+  if( db->mallocFailed ){
+    goto exit_drop_index;
+  }
+  assert( pName->nSrc==1 );
+  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
+    goto exit_drop_index;
+  }
+  pIndex = sqlite3FindIndex(db, pName->a[0].zName, pName->a[0].zDatabase);
+  if( pIndex==0 ){
+    if( !ifExists ){
+      sqlite3ErrorMsg(pParse, "no such index: %S", pName, 0);
+    }else{
+      sqlite3CodeVerifyNamedSchema(pParse, pName->a[0].zDatabase);
+    }
+    pParse->checkSchema = 1;
+    goto exit_drop_index;
+  }
+  if( pIndex->autoIndex ){
+    sqlite3ErrorMsg(pParse, "index associated with UNIQUE "
+      "or PRIMARY KEY constraint cannot be dropped", 0);
+    goto exit_drop_index;
+  }
+  iDb = sqlite3SchemaToIndex(db, pIndex->pSchema);
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  {
+    int code = SQLITE_DROP_INDEX;
+    Table *pTab = pIndex->pTable;
+    const char *zDb = db->aDb[iDb].zName;
+    const char *zTab = SCHEMA_TABLE(iDb);
+    if( sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb) ){
+      goto exit_drop_index;
+    }
+	 #if (!OMIT_TEMPDB)
+    if( iDb ) code = SQLITE_DROP_TEMP_INDEX;
+	 #endif
+    if( sqlite3AuthCheck(pParse, code, pIndex->zName, pTab->zName, zDb) ){
+      goto exit_drop_index;
+    }
+  }
+#endif
+
+  /* Generate code to remove the index and from the master table */
+  v = sqlite3GetVdbe(pParse);
+  if( v ){
+    sqlite3BeginWriteOperation(pParse, 1, iDb);
+    sqlite3NestedParse(pParse,
+       "DELETE FROM %Q.%s WHERE name=%Q AND type='index'",
+       db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
+       pIndex->zName
+    );
+    if( sqlite3FindTable(db, "sqlite_stat1", db->aDb[iDb].zName) ){
+      sqlite3NestedParse(pParse,
+        "DELETE FROM %Q.sqlite_stat1 WHERE idx=%Q",
+        db->aDb[iDb].zName, pIndex->zName
+      );
+    }
+    sqlite3ChangeCookie(pParse, iDb);
+    destroyRootPage(pParse, pIndex->tnum, iDb);
+    sqlite3VdbeAddOp4(v, OP_DropIndex, iDb, 0, 0, pIndex->zName, 0);
+  }
+
+exit_drop_index:
+  sqlite3SrcListDelete(db, pName);
+}
+
+/*
+** pArray is a pointer to an array of objects.  Each object in the
+** array is szEntry bytes in size.  This routine allocates a new
+** object on the end of the array.
+**
+** *pnEntry is the number of entries already in use.  *pnAlloc is
+** the previously allocated size of the array.  initSize is the
+** suggested initial array size allocation.
+**
+** The index of the new entry is returned in *pIdx.
+**
+** This routine returns a pointer to the array of objects.  This
+** might be the same as the pArray parameter or it might be a different
+** pointer if the array was resized.
+*/
+SQLITE_PRIVATE void *sqlite3ArrayAllocate(
+  sqlite3 *db,      /* Connection to notify of malloc failures */
+  void *pArray,     /* Array of objects.  Might be reallocated */
+  int szEntry,      /* Size of each object in the array */
+  int initSize,     /* Suggested initial allocation, in elements */
+  int *pnEntry,     /* Number of objects currently in use */
+  int *pnAlloc,     /* Current size of the allocation, in elements */
+  int *pIdx         /* Write the index of a new slot here */
+){
+  char *z;
+  if( *pnEntry >= *pnAlloc ){
+    void *pNew;
+    int newSize;
+    newSize = (*pnAlloc)*2 + initSize;
+    pNew = sqlite3DbRealloc(db, pArray, newSize*szEntry);
+    if( pNew==0 ){
+      *pIdx = -1;
+      return pArray;
+    }
+    *pnAlloc = sqlite3DbMallocSize(db, pNew)/szEntry;
+    pArray = pNew;
+  }
+  z = (char*)pArray;
+  memset(&z[*pnEntry * szEntry], 0, szEntry);
+  *pIdx = *pnEntry;
+  ++*pnEntry;
+  return pArray;
+}
+
+/*
+** Append a new element to the given IdList.  Create a new IdList if
+** need be.
+**
+** A new IdList is returned, or NULL if malloc() fails.
+*/
+SQLITE_PRIVATE IdList *sqlite3IdListAppend(sqlite3 *db, IdList *pList, Token *pToken){
+  int i;
+  if( pList==0 ){
+    pList = sqlite3DbMallocZero(db, sizeof(IdList) );
+    if( pList==0 ) return 0;
+    pList->nAlloc = 0;
+  }
+  pList->a = sqlite3ArrayAllocate(
+      db,
+      pList->a,
+      sizeof(pList->a[0]),
+      5,
+      &pList->nId,
+      &pList->nAlloc,
+      &i
+  );
+  if( i<0 ){
+    sqlite3IdListDelete(db, pList);
+    return 0;
+  }
+  pList->a[i].zName = sqlite3NameFromToken(db, pToken);
+  return pList;
+}
+
+/*
+** Delete an IdList.
+*/
+SQLITE_PRIVATE void sqlite3IdListDelete(sqlite3 *db, IdList *pList){
+  int i;
+  if( pList==0 ) return;
+  for(i=0; i<pList->nId; i++){
+    sqlite3DbFree(db, pList->a[i].zName);
+  }
+  sqlite3DbFree(db, pList->a);
+  sqlite3DbFree(db, pList);
+}
+
+/*
+** Return the index in pList of the identifier named zId.  Return -1
+** if not found.
+*/
+SQLITE_PRIVATE int sqlite3IdListIndex(IdList *pList, const char *zName){
+  int i;
+  if( pList==0 ) return -1;
+  for(i=0; i<pList->nId; i++){
+    if( sqlite3StrICmp(pList->a[i].zName, zName)==0 ) return i;
+  }
+  return -1;
+}
+
+/*
+** Expand the space allocated for the given SrcList object by
+** creating nExtra new slots beginning at iStart.  iStart is zero based.
+** New slots are zeroed.
+**
+** For example, suppose a SrcList initially contains two entries: A,B.
+** To append 3 new entries onto the end, do this:
+**
+**    sqlite3SrcListEnlarge(db, pSrclist, 3, 2);
+**
+** After the call above it would contain:  A, B, nil, nil, nil.
+** If the iStart argument had been 1 instead of 2, then the result
+** would have been:  A, nil, nil, nil, B.  To prepend the new slots,
+** the iStart value would be 0.  The result then would
+** be: nil, nil, nil, A, B.
+**
+** If a memory allocation fails the SrcList is unchanged.  The
+** db->mallocFailed flag will be set to true.
+*/
+SQLITE_PRIVATE SrcList *sqlite3SrcListEnlarge(
+  sqlite3 *db,       /* Database connection to notify of OOM errors */
+  SrcList *pSrc,     /* The SrcList to be enlarged */
+  int nExtra,        /* Number of new slots to add to pSrc->a[] */
+  int iStart         /* Index in pSrc->a[] of first new slot */
+){
+  int i;
+
+  /* Sanity checking on calling parameters */
+  assert( iStart>=0 );
+  assert( nExtra>=1 );
+  assert( pSrc!=0 );
+  assert( iStart<=pSrc->nSrc );
+
+  /* Allocate additional space if needed */
+  if( pSrc->nSrc+nExtra>pSrc->nAlloc ){
+    SrcList *pNew;
+    int nAlloc = pSrc->nSrc+nExtra;
+    int nGot;
+    pNew = sqlite3DbRealloc(db, pSrc,
+               sizeof(*pSrc) + (nAlloc-1)*sizeof(pSrc->a[0]) );
+    if( pNew==0 ){
+      assert( db->mallocFailed );
+      return pSrc;
+    }
+    pSrc = pNew;
+    nGot = (sqlite3DbMallocSize(db, pNew) - sizeof(*pSrc))/sizeof(pSrc->a[0])+1;
+    pSrc->nAlloc = (u16)nGot;
+  }
+
+  /* Move existing slots that come after the newly inserted slots
+  ** out of the way */
+  for(i=pSrc->nSrc-1; i>=iStart; i--){
+    pSrc->a[i+nExtra] = pSrc->a[i];
+  }
+  pSrc->nSrc += (i16)nExtra;
+
+  /* Zero the newly allocated slots */
+  memset(&pSrc->a[iStart], 0, sizeof(pSrc->a[0])*nExtra);
+  for(i=iStart; i<iStart+nExtra; i++){
+    pSrc->a[i].iCursor = -1;
+  }
+
+  /* Return a pointer to the enlarged SrcList */
+  return pSrc;
+}
+
+
+/*
+** Append a new table name to the given SrcList.  Create a new SrcList if
+** need be.  A new entry is created in the SrcList even if pTable is NULL.
+**
+** A SrcList is returned, or NULL if there is an OOM error.  The returned
+** SrcList might be the same as the SrcList that was input or it might be
+** a new one.  If an OOM error does occurs, then the prior value of pList
+** that is input to this routine is automatically freed.
+**
+** If pDatabase is not null, it means that the table has an optional
+** database name prefix.  Like this:  "database.table".  The pDatabase
+** points to the table name and the pTable points to the database name.
+** The SrcList.a[].zName field is filled with the table name which might
+** come from pTable (if pDatabase is NULL) or from pDatabase.  
+** SrcList.a[].zDatabase is filled with the database name from pTable,
+** or with NULL if no database is specified.
+**
+** In other words, if call like this:
+**
+**         sqlite3SrcListAppend(D,A,B,0);
+**
+** Then B is a table name and the database name is unspecified.  If called
+** like this:
+**
+**         sqlite3SrcListAppend(D,A,B,C);
+**
+** Then C is the table name and B is the database name.  If C is defined
+** then so is B.  In other words, we never have a case where:
+**
+**         sqlite3SrcListAppend(D,A,0,C);
+**
+** Both pTable and pDatabase are assumed to be quoted.  They are dequoted
+** before being added to the SrcList.
+*/
+SQLITE_PRIVATE SrcList *sqlite3SrcListAppend(
+  sqlite3 *db,        /* Connection to notify of malloc failures */
+  SrcList *pList,     /* Append to this SrcList. NULL creates a new SrcList */
+  Token *pTable,      /* Table to append */
+  Token *pDatabase    /* Database of the table */
+){
+  struct SrcList_item *pItem;
+  assert( pDatabase==0 || pTable!=0 );  /* Cannot have C without B */
+  if( pList==0 ){
+    pList = sqlite3DbMallocZero(db, sizeof(SrcList) );
+    if( pList==0 ) return 0;
+    pList->nAlloc = 1;
+  }
+  pList = sqlite3SrcListEnlarge(db, pList, 1, pList->nSrc);
+  if( db->mallocFailed ){
+    sqlite3SrcListDelete(db, pList);
+    return 0;
+  }
+  pItem = &pList->a[pList->nSrc-1];
+  if( pDatabase && pDatabase->z==0 ){
+    pDatabase = 0;
+  }
+  if( pDatabase ){
+    Token *pTemp = pDatabase;
+    pDatabase = pTable;
+    pTable = pTemp;
+  }
+  pItem->zName = sqlite3NameFromToken(db, pTable);
+  pItem->zDatabase = sqlite3NameFromToken(db, pDatabase);
+  return pList;
+}
+
+/*
+** Assign VdbeCursor index numbers to all tables in a SrcList
+*/
+SQLITE_PRIVATE void sqlite3SrcListAssignCursors(Parse *pParse, SrcList *pList){
+  int i;
+  struct SrcList_item *pItem;
+  assert(pList || pParse->db->mallocFailed );
+  if( pList ){
+    for(i=0, pItem=pList->a; i<pList->nSrc; i++, pItem++){
+      if( pItem->iCursor>=0 ) break;
+      pItem->iCursor = pParse->nTab++;
+      if( pItem->pSelect ){
+        sqlite3SrcListAssignCursors(pParse, pItem->pSelect->pSrc);
+      }
+    }
+  }
+}
+
+/*
+** Delete an entire SrcList including all its substructure.
+*/
+SQLITE_PRIVATE void sqlite3SrcListDelete(sqlite3 *db, SrcList *pList){
+  int i;
+  struct SrcList_item *pItem;
+  if( pList==0 ) return;
+  for(pItem=pList->a, i=0; i<pList->nSrc; i++, pItem++){
+    sqlite3DbFree(db, pItem->zDatabase);
+    sqlite3DbFree(db, pItem->zName);
+    sqlite3DbFree(db, pItem->zAlias);
+    sqlite3DbFree(db, pItem->zIndex);
+    sqlite3DeleteTable(db, pItem->pTab);
+    sqlite3SelectDelete(db, pItem->pSelect);
+    sqlite3ExprDelete(db, pItem->pOn);
+    sqlite3IdListDelete(db, pItem->pUsing);
+  }
+  sqlite3DbFree(db, pList);
+}
+
+/*
+** This routine is called by the parser to add a new term to the
+** end of a growing FROM clause.  The "p" parameter is the part of
+** the FROM clause that has already been constructed.  "p" is NULL
+** if this is the first term of the FROM clause.  pTable and pDatabase
+** are the name of the table and database named in the FROM clause term.
+** pDatabase is NULL if the database name qualifier is missing - the
+** usual case.  If the term has a alias, then pAlias points to the
+** alias token.  If the term is a subquery, then pSubquery is the
+** SELECT statement that the subquery encodes.  The pTable and
+** pDatabase parameters are NULL for subqueries.  The pOn and pUsing
+** parameters are the content of the ON and USING clauses.
+**
+** Return a new SrcList which encodes is the FROM with the new
+** term added.
+*/
+SQLITE_PRIVATE SrcList *sqlite3SrcListAppendFromTerm(
+  Parse *pParse,          /* Parsing context */
+  SrcList *p,             /* The left part of the FROM clause already seen */
+  Token *pTable,          /* Name of the table to add to the FROM clause */
+  Token *pDatabase,       /* Name of the database containing pTable */
+  Token *pAlias,          /* The right-hand side of the AS subexpression */
+  Select *pSubquery,      /* A subquery used in place of a table name */
+  Expr *pOn,              /* The ON clause of a join */
+  IdList *pUsing          /* The USING clause of a join */
+){
+  struct SrcList_item *pItem;
+  sqlite3 *db = pParse->db;
+  if( !p && (pOn || pUsing) ){
+    sqlite3ErrorMsg(pParse, "a JOIN clause is required before %s", 
+      (pOn ? "ON" : "USING")
+    );
+    goto append_from_error;
+  }
+  p = sqlite3SrcListAppend(db, p, pTable, pDatabase);
+  if( p==0 || NEVER(p->nSrc==0) ){
+    goto append_from_error;
+  }
+  pItem = &p->a[p->nSrc-1];
+  assert( pAlias!=0 );
+  if( pAlias->n ){
+    pItem->zAlias = sqlite3NameFromToken(db, pAlias);
+  }
+  pItem->pSelect = pSubquery;
+  pItem->pOn = pOn;
+  pItem->pUsing = pUsing;
+  return p;
+
+ append_from_error:
+  assert( p==0 );
+  sqlite3ExprDelete(db, pOn);
+  sqlite3IdListDelete(db, pUsing);
+  sqlite3SelectDelete(db, pSubquery);
+  return 0;
+}
+
+/*
+** Add an INDEXED BY or NOT INDEXED clause to the most recently added 
+** element of the source-list passed as the second argument.
+*/
+SQLITE_PRIVATE void sqlite3SrcListIndexedBy(Parse *pParse, SrcList *p, Token *pIndexedBy){
+  assert( pIndexedBy!=0 );
+  if( p && ALWAYS(p->nSrc>0) ){
+    struct SrcList_item *pItem = &p->a[p->nSrc-1];
+    assert( pItem->notIndexed==0 && pItem->zIndex==0 );
+    if( pIndexedBy->n==1 && !pIndexedBy->z ){
+      /* A "NOT INDEXED" clause was supplied. See parse.y 
+      ** construct "indexed_opt" for details. */
+      pItem->notIndexed = 1;
+    }else{
+      pItem->zIndex = sqlite3NameFromToken(pParse->db, pIndexedBy);
+    }
+  }
+}
+
+/*
+** When building up a FROM clause in the parser, the join operator
+** is initially attached to the left operand.  But the code generator
+** expects the join operator to be on the right operand.  This routine
+** Shifts all join operators from left to right for an entire FROM
+** clause.
+**
+** Example: Suppose the join is like this:
+**
+**           A natural cross join B
+**
+** The operator is "natural cross join".  The A and B operands are stored
+** in p->a[0] and p->a[1], respectively.  The parser initially stores the
+** operator with A.  This routine shifts that operator over to B.
+*/
+SQLITE_PRIVATE void sqlite3SrcListShiftJoinType(SrcList *p){
+  if( p && p->a ){
+    int i;
+    for(i=p->nSrc-1; i>0; i--){
+      p->a[i].jointype = p->a[i-1].jointype;
+    }
+    p->a[0].jointype = 0;
+  }
+}
+
+/*
+** Begin a transaction
+*/
+SQLITE_PRIVATE void sqlite3BeginTransaction(Parse *pParse, int type){
+  sqlite3 *db;
+  Vdbe *v;
+  int i;
+
+  assert( pParse!=0 );
+  db = pParse->db;
+  assert( db!=0 );
+/*  if( db->aDb[0].pBt==0 ) return; */
+  if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "BEGIN", 0, 0) ){
+    return;
+  }
+  v = sqlite3GetVdbe(pParse);
+  if( !v ) return;
+  if( type!=TK_DEFERRED ){
+    for(i=0; i<db->nDb; i++){
+      sqlite3VdbeAddOp2(v, OP_Transaction, i, (type==TK_EXCLUSIVE)+1);
+      sqlite3VdbeUsesBtree(v, i);
+    }
+  }
+  sqlite3VdbeAddOp2(v, OP_AutoCommit, 0, 0);
+}
+
+/*
+** Commit a transaction
+*/
+SQLITE_PRIVATE void sqlite3CommitTransaction(Parse *pParse){
+  sqlite3 *db;
+  Vdbe *v;
+
+  assert( pParse!=0 );
+  db = pParse->db;
+  assert( db!=0 );
+/*  if( db->aDb[0].pBt==0 ) return; */
+  if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "COMMIT", 0, 0) ){
+    return;
+  }
+  v = sqlite3GetVdbe(pParse);
+  if( v ){
+    sqlite3VdbeAddOp2(v, OP_AutoCommit, 1, 0);
+  }
+}
+
+/*
+** Rollback a transaction
+*/
+SQLITE_PRIVATE void sqlite3RollbackTransaction(Parse *pParse){
+  sqlite3 *db;
+  Vdbe *v;
+
+  assert( pParse!=0 );
+  db = pParse->db;
+  assert( db!=0 );
+/*  if( db->aDb[0].pBt==0 ) return; */
+  if( sqlite3AuthCheck(pParse, SQLITE_TRANSACTION, "ROLLBACK", 0, 0) ){
+    return;
+  }
+  v = sqlite3GetVdbe(pParse);
+  if( v ){
+    sqlite3VdbeAddOp2(v, OP_AutoCommit, 1, 1);
+  }
+}
+
+/*
+** This function is called by the parser when it parses a command to create,
+** release or rollback an SQL savepoint. 
+*/
+SQLITE_PRIVATE void sqlite3Savepoint(Parse *pParse, int op, Token *pName){
+  char *zName = sqlite3NameFromToken(pParse->db, pName);
+  if( zName ){
+    Vdbe *v = sqlite3GetVdbe(pParse);
+#ifndef SQLITE_OMIT_AUTHORIZATION
+    static const char * const az[] = { "BEGIN", "RELEASE", "ROLLBACK" };
+    assert( !SAVEPOINT_BEGIN && SAVEPOINT_RELEASE==1 && SAVEPOINT_ROLLBACK==2 );
+#endif
+    if( !v || sqlite3AuthCheck(pParse, SQLITE_SAVEPOINT, az[op], zName, 0) ){
+      sqlite3DbFree(pParse->db, zName);
+      return;
+    }
+    sqlite3VdbeAddOp4(v, OP_Savepoint, op, 0, 0, zName, P4_DYNAMIC);
+  }
+}
+
+/*
+** Make sure the TEMP database is open and available for use.  Return
+** the number of errors.  Leave any error messages in the pParse structure.
+*/
+SQLITE_PRIVATE int sqlite3OpenTempDatabase(Parse *pParse){
+  sqlite3 *db = pParse->db;
+  if( db->aDb[1].pBt==0 && !pParse->explain ){
+    int rc;
+    Btree *pBt;
+    static const int flags = 
+          SQLITE_OPEN_READWRITE |
+          SQLITE_OPEN_CREATE |
+          SQLITE_OPEN_EXCLUSIVE |
+          SQLITE_OPEN_DELETEONCLOSE |
+          SQLITE_OPEN_TEMP_DB;
+
+    rc = sqlite3BtreeOpen(0, db, &pBt, 0, flags);
+    if( rc!=SQLITE_OK ){
+      sqlite3ErrorMsg(pParse, "unable to open a temporary database "
+        "file for storing temporary tables");
+      pParse->rc = rc;
+      return 1;
+    }
+    db->aDb[1].pBt = pBt;
+    assert( db->aDb[1].pSchema );
+    if( SQLITE_NOMEM==sqlite3BtreeSetPageSize(pBt, db->nextPagesize, -1, 0) ){
+      db->mallocFailed = 1;
+      return 1;
+    }
+  }
+  return 0;
+}
+
+/*
+** Generate VDBE code that will verify the schema cookie and start
+** a read-transaction for all named database files.
+**
+** It is important that all schema cookies be verified and all
+** read transactions be started before anything else happens in
+** the VDBE program.  But this routine can be called after much other
+** code has been generated.  So here is what we do:
+**
+** The first time this routine is called, we code an OP_Goto that
+** will jump to a subroutine at the end of the program.  Then we
+** record every database that needs its schema verified in the
+** pParse->cookieMask field.  Later, after all other code has been
+** generated, the subroutine that does the cookie verifications and
+** starts the transactions will be coded and the OP_Goto P2 value
+** will be made to point to that subroutine.  The generation of the
+** cookie verification subroutine code happens in sqlite3FinishCoding().
+**
+** If iDb<0 then code the OP_Goto only - don't set flag to verify the
+** schema on any databases.  This can be used to position the OP_Goto
+** early in the code, before we know if any database tables will be used.
+*/
+SQLITE_PRIVATE void sqlite3CodeVerifySchema(Parse *pParse, int iDb){
+  Parse *pToplevel = sqlite3ParseToplevel(pParse);
+
+  if( pToplevel->cookieGoto==0 ){
+    Vdbe *v = sqlite3GetVdbe(pToplevel);
+    if( v==0 ) return;  /* This only happens if there was a prior error */
+    pToplevel->cookieGoto = sqlite3VdbeAddOp2(v, OP_Goto, 0, 0)+1;
+  }
+  if( iDb>=0 ){
+    sqlite3 *db = pToplevel->db;
+    yDbMask mask;
+
+    assert( iDb<db->nDb );
+    assert( db->aDb[iDb].pBt!=0 || iDb==1 );
+    assert( iDb<SQLITE_MAX_ATTACHED+2 );
+    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+    mask = ((yDbMask)1)<<iDb;
+    if( (pToplevel->cookieMask & mask)==0 ){
+      pToplevel->cookieMask |= mask;
+      pToplevel->cookieValue[iDb] = db->aDb[iDb].pSchema->schema_cookie;
+      #if (!OMIT_TEMPDB)
+      if( iDb==1 ){
+        sqlite3OpenTempDatabase(pToplevel);
+      }
+		#endif
+    }
+  }
+}
+
+/*
+** If argument zDb is NULL, then call sqlite3CodeVerifySchema() for each 
+** attached database. Otherwise, invoke it for the database named zDb only.
+*/
+SQLITE_PRIVATE void sqlite3CodeVerifyNamedSchema(Parse *pParse, const char *zDb){
+  sqlite3 *db = pParse->db;
+  int i;
+  for(i=0; i<db->nDb; i++){
+    Db *pDb = &db->aDb[i];
+    if( pDb->pBt && (!zDb || 0==sqlite3StrICmp(zDb, pDb->zName)) ){
+      sqlite3CodeVerifySchema(pParse, i);
+    }
+  }
+}
+
+/*
+** Generate VDBE code that prepares for doing an operation that
+** might change the database.
+**
+** This routine starts a new transaction if we are not already within
+** a transaction.  If we are already within a transaction, then a checkpoint
+** is set if the setStatement parameter is true.  A checkpoint should
+** be set for operations that might fail (due to a constraint) part of
+** the way through and which will need to undo some writes without having to
+** rollback the whole transaction.  For operations where all constraints
+** can be checked before any changes are made to the database, it is never
+** necessary to undo a write and the checkpoint should not be set.
+*/
+SQLITE_PRIVATE void sqlite3BeginWriteOperation(Parse *pParse, int setStatement, int iDb){
+  Parse *pToplevel = sqlite3ParseToplevel(pParse);
+  sqlite3CodeVerifySchema(pParse, iDb);
+  pToplevel->writeMask |= ((yDbMask)1)<<iDb;
+  pToplevel->isMultiWrite |= setStatement;
+}
+
+/*
+** Indicate that the statement currently under construction might write
+** more than one entry (example: deleting one row then inserting another,
+** inserting multiple rows in a table, or inserting a row and index entries.)
+** If an abort occurs after some of these writes have completed, then it will
+** be necessary to undo the completed writes.
+*/
+SQLITE_PRIVATE void sqlite3MultiWrite(Parse *pParse){
+  Parse *pToplevel = sqlite3ParseToplevel(pParse);
+  pToplevel->isMultiWrite = 1;
+}
+
+/* 
+** The code generator calls this routine if is discovers that it is
+** possible to abort a statement prior to completion.  In order to 
+** perform this abort without corrupting the database, we need to make
+** sure that the statement is protected by a statement transaction.
+**
+** Technically, we only need to set the mayAbort flag if the
+** isMultiWrite flag was previously set.  There is a time dependency
+** such that the abort must occur after the multiwrite.  This makes
+** some statements involving the REPLACE conflict resolution algorithm
+** go a little faster.  But taking advantage of this time dependency
+** makes it more difficult to prove that the code is correct (in 
+** particular, it prevents us from writing an effective
+** implementation of sqlite3AssertMayAbort()) and so we have chosen
+** to take the safe route and skip the optimization.
+*/
+SQLITE_PRIVATE void sqlite3MayAbort(Parse *pParse){
+  Parse *pToplevel = sqlite3ParseToplevel(pParse);
+  pToplevel->mayAbort = 1;
+}
+
+/*
+** Code an OP_Halt that causes the vdbe to return an SQLITE_CONSTRAINT
+** error. The onError parameter determines which (if any) of the statement
+** and/or current transaction is rolled back.
+*/
+SQLITE_PRIVATE void sqlite3HaltConstraint(Parse *pParse, int onError, char *p4, int p4type){
+  Vdbe *v = sqlite3GetVdbe(pParse);
+  if( onError==OE_Abort ){
+    sqlite3MayAbort(pParse);
+  }
+  sqlite3VdbeAddOp4(v, OP_Halt, SQLITE_CONSTRAINT, onError, 0, p4, p4type);
+}
+
+/*
+** Check to see if pIndex uses the collating sequence pColl.  Return
+** true if it does and false if it does not.
+*/
+#ifndef SQLITE_OMIT_REINDEX
+static int collationMatch(const char *zColl, Index *pIndex){
+  int i;
+  assert( zColl!=0 );
+  for(i=0; i<pIndex->nColumn; i++){
+    const char *z = pIndex->azColl[i];
+    assert( z!=0 );
+    if( 0==sqlite3StrICmp(z, zColl) ){
+      return 1;
+    }
+  }
+  return 0;
+}
+#endif
+
+/*
+** Recompute all indices of pTab that use the collating sequence pColl.
+** If pColl==0 then recompute all indices of pTab.
+*/
+#ifndef SQLITE_OMIT_REINDEX
+static void reindexTable(Parse *pParse, Table *pTab, char const *zColl){
+  Index *pIndex;              /* An index associated with pTab */
+
+  for(pIndex=pTab->pIndex; pIndex; pIndex=pIndex->pNext){
+    if( zColl==0 || collationMatch(zColl, pIndex) ){
+      int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
+      sqlite3BeginWriteOperation(pParse, 0, iDb);
+      sqlite3RefillIndex(pParse, pIndex, -1);
+    }
+  }
+}
+#endif
+
+/*
+** Recompute all indices of all tables in all databases where the
+** indices use the collating sequence pColl.  If pColl==0 then recompute
+** all indices everywhere.
+*/
+#ifndef SQLITE_OMIT_REINDEX
+static void reindexDatabases(Parse *pParse, char const *zColl){
+  Db *pDb;                    /* A single database */
+  int iDb;                    /* The database index number */
+  sqlite3 *db = pParse->db;   /* The database connection */
+  HashElem *k;                /* For looping over tables in pDb */
+  Table *pTab;                /* A table in the database */
+
+  assert( sqlite3BtreeHoldsAllMutexes(db) );  /* Needed for schema access */
+  for(iDb=0, pDb=db->aDb; iDb<db->nDb; iDb++, pDb++){
+    assert( pDb!=0 );
+    for(k=sqliteHashFirst(&pDb->pSchema->tblHash);  k; k=sqliteHashNext(k)){
+      pTab = (Table*)sqliteHashData(k);
+      reindexTable(pParse, pTab, zColl);
+    }
+  }
+}
+#endif
+
+/*
+** Generate code for the REINDEX command.
+**
+**        REINDEX                            -- 1
+**        REINDEX  <collation>               -- 2
+**        REINDEX  ?<database>.?<tablename>  -- 3
+**        REINDEX  ?<database>.?<indexname>  -- 4
+**
+** Form 1 causes all indices in all attached databases to be rebuilt.
+** Form 2 rebuilds all indices in all databases that use the named
+** collating function.  Forms 3 and 4 rebuild the named index or all
+** indices associated with the named table.
+*/
+#ifndef SQLITE_OMIT_REINDEX
+SQLITE_PRIVATE void sqlite3Reindex(Parse *pParse, Token *pName1, Token *pName2){
+  CollSeq *pColl;             /* Collating sequence to be reindexed, or NULL */
+  char *z;                    /* Name of a table or index */
+  const char *zDb;            /* Name of the database */
+  Table *pTab;                /* A table in the database */
+  Index *pIndex;              /* An index associated with pTab */
+  int iDb;                    /* The database index number */
+  sqlite3 *db = pParse->db;   /* The database connection */
+  Token *pObjName;            /* Name of the table or index to be reindexed */
+
+  /* Read the database schema. If an error occurs, leave an error message
+  ** and code in pParse and return NULL. */
+  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
+    return;
+  }
+
+  if( pName1==0 ){
+    reindexDatabases(pParse, 0);
+    return;
+  }else if( NEVER(pName2==0) || pName2->z==0 ){
+    char *zColl;
+    assert( pName1->z );
+    zColl = sqlite3NameFromToken(pParse->db, pName1);
+    if( !zColl ) return;
+    pColl = sqlite3FindCollSeq(db, ENC(db), zColl, 0);
+    if( pColl ){
+      reindexDatabases(pParse, zColl);
+      sqlite3DbFree(db, zColl);
+      return;
+    }
+    sqlite3DbFree(db, zColl);
+  }
+  iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pObjName);
+  if( iDb<0 ) return;
+  z = sqlite3NameFromToken(db, pObjName);
+  if( z==0 ) return;
+  zDb = db->aDb[iDb].zName;
+  pTab = sqlite3FindTable(db, z, zDb);
+  if( pTab ){
+    reindexTable(pParse, pTab, 0);
+    sqlite3DbFree(db, z);
+    return;
+  }
+  pIndex = sqlite3FindIndex(db, z, zDb);
+  sqlite3DbFree(db, z);
+  if( pIndex ){
+    sqlite3BeginWriteOperation(pParse, 0, iDb);
+    sqlite3RefillIndex(pParse, pIndex, -1);
+    return;
+  }
+  sqlite3ErrorMsg(pParse, "unable to identify the object to be reindexed");
+}
+#endif
+
+/*
+** Return a dynamicly allocated KeyInfo structure that can be used
+** with OP_OpenRead or OP_OpenWrite to access database index pIdx.
+**
+** If successful, a pointer to the new structure is returned. In this case
+** the caller is responsible for calling sqlite3DbFree(db, ) on the returned 
+** pointer. If an error occurs (out of memory or missing collation 
+** sequence), NULL is returned and the state of pParse updated to reflect
+** the error.
+*/
+SQLITE_PRIVATE KeyInfo *sqlite3IndexKeyinfo(Parse *pParse, Index *pIdx){
+  int i;
+  int nCol = pIdx->nColumn;
+  int nBytes = sizeof(KeyInfo) + (nCol-1)*sizeof(CollSeq*) + nCol;
+  sqlite3 *db = pParse->db;
+  KeyInfo *pKey = (KeyInfo *)sqlite3DbMallocZero(db, nBytes);
+
+  if( pKey ){
+    pKey->db = pParse->db;
+    pKey->aSortOrder = (u8 *)&(pKey->aColl[nCol]);
+    assert( &pKey->aSortOrder[nCol]==&(((u8 *)pKey)[nBytes]) );
+    for(i=0; i<nCol; i++){
+      char *zColl = pIdx->azColl[i];
+      assert( zColl );
+      pKey->aColl[i] = sqlite3LocateCollSeq(pParse, zColl);
+      pKey->aSortOrder[i] = pIdx->aSortOrder[i];
+    }
+    pKey->nField = (u16)nCol;
+  }
+
+  if( pParse->nErr ){
+    sqlite3DbFree(db, pKey);
+    pKey = 0;
+  }
+  return pKey;
+}
+
+/************** End of build.c ***********************************************/
+/************** Begin file callback.c ****************************************/
+/*
+** 2005 May 23 
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains functions used to access the internal hash tables
+** of user defined functions and collation sequences.
+*/
+
+
+/*
+** Invoke the 'collation needed' callback to request a collation sequence
+** in the encoding enc of name zName, length nName.
+*/
+static void callCollNeeded(sqlite3 *db, int enc, const char *zName){
+  assert( !db->xCollNeeded || !db->xCollNeeded16 );
+  if( db->xCollNeeded ){
+    char *zExternal = sqlite3DbStrDup(db, zName);
+    if( !zExternal ) return;
+    db->xCollNeeded(db->pCollNeededArg, db, enc, zExternal);
+    sqlite3DbFree(db, zExternal);
+  }
+#ifndef SQLITE_OMIT_UTF16
+  if( db->xCollNeeded16 ){
+    char const *zExternal;
+    sqlite3_value *pTmp = sqlite3ValueNew(db);
+    sqlite3ValueSetStr(pTmp, -1, zName, SQLITE_UTF8, SQLITE_STATIC);
+    zExternal = sqlite3ValueText(pTmp, SQLITE_UTF16NATIVE);
+    if( zExternal ){
+      db->xCollNeeded16(db->pCollNeededArg, db, (int)ENC(db), zExternal);
+    }
+    sqlite3ValueFree(pTmp);
+  }
+#endif
+}
+
+/*
+** This routine is called if the collation factory fails to deliver a
+** collation function in the best encoding but there may be other versions
+** of this collation function (for other text encodings) available. Use one
+** of these instead if they exist. Avoid a UTF-8 <-> UTF-16 conversion if
+** possible.
+*/
+static int synthCollSeq(sqlite3 *db, CollSeq *pColl){
+  CollSeq *pColl2;
+  char *z = pColl->zName;
+  int i;
+  static const u8 aEnc[] = { SQLITE_UTF16BE, SQLITE_UTF16LE, SQLITE_UTF8 };
+  for(i=0; i<3; i++){
+    pColl2 = sqlite3FindCollSeq(db, aEnc[i], z, 0);
+    if( pColl2->xCmp!=0 ){
+      memcpy(pColl, pColl2, sizeof(CollSeq));
+      pColl->xDel = 0;         /* Do not copy the destructor */
+      return SQLITE_OK;
+    }
+  }
+  return SQLITE_ERROR;
+}
+
+/*
+** This function is responsible for invoking the collation factory callback
+** or substituting a collation sequence of a different encoding when the
+** requested collation sequence is not available in the desired encoding.
+** 
+** If it is not NULL, then pColl must point to the database native encoding 
+** collation sequence with name zName, length nName.
+**
+** The return value is either the collation sequence to be used in database
+** db for collation type name zName, length nName, or NULL, if no collation
+** sequence can be found.
+**
+** See also: sqlite3LocateCollSeq(), sqlite3FindCollSeq()
+*/
+SQLITE_PRIVATE CollSeq *sqlite3GetCollSeq(
+  sqlite3* db,          /* The database connection */
+  u8 enc,               /* The desired encoding for the collating sequence */
+  CollSeq *pColl,       /* Collating sequence with native encoding, or NULL */
+  const char *zName     /* Collating sequence name */
+){
+  CollSeq *p;
+
+  p = pColl;
+  if( !p ){
+    p = sqlite3FindCollSeq(db, enc, zName, 0);
+  }
+  if( !p || !p->xCmp ){
+    /* No collation sequence of this type for this encoding is registered.
+    ** Call the collation factory to see if it can supply us with one.
+    */
+    callCollNeeded(db, enc, zName);
+    p = sqlite3FindCollSeq(db, enc, zName, 0);
+  }
+  if( p && !p->xCmp && synthCollSeq(db, p) ){
+    p = 0;
+  }
+  assert( !p || p->xCmp );
+  return p;
+}
+
+/*
+** This routine is called on a collation sequence before it is used to
+** check that it is defined. An undefined collation sequence exists when
+** a database is loaded that contains references to collation sequences
+** that have not been defined by sqlite3_create_collation() etc.
+**
+** If required, this routine calls the 'collation needed' callback to
+** request a definition of the collating sequence. If this doesn't work, 
+** an equivalent collating sequence that uses a text encoding different
+** from the main database is substituted, if one is available.
+*/
+SQLITE_PRIVATE int sqlite3CheckCollSeq(Parse *pParse, CollSeq *pColl){
+  if( pColl ){
+    const char *zName = pColl->zName;
+    sqlite3 *db = pParse->db;
+    CollSeq *p = sqlite3GetCollSeq(db, ENC(db), pColl, zName);
+    if( !p ){
+      sqlite3ErrorMsg(pParse, "no such collation sequence: %s", zName);
+      pParse->nErr++;
+      return SQLITE_ERROR;
+    }
+    assert( p==pColl );
+  }
+  return SQLITE_OK;
+}
+
+
+
+/*
+** Locate and return an entry from the db.aCollSeq hash table. If the entry
+** specified by zName and nName is not found and parameter 'create' is
+** true, then create a new entry. Otherwise return NULL.
+**
+** Each pointer stored in the sqlite3.aCollSeq hash table contains an
+** array of three CollSeq structures. The first is the collation sequence
+** prefferred for UTF-8, the second UTF-16le, and the third UTF-16be.
+**
+** Stored immediately after the three collation sequences is a copy of
+** the collation sequence name. A pointer to this string is stored in
+** each collation sequence structure.
+*/
+static CollSeq *findCollSeqEntry(
+  sqlite3 *db,          /* Database connection */
+  const char *zName,    /* Name of the collating sequence */
+  int create            /* Create a new entry if true */
+){
+  CollSeq *pColl;
+  int nName = sqlite3Strlen30(zName);
+  pColl = sqlite3HashFind(&db->aCollSeq, zName, nName);
+
+  if( 0==pColl && create ){
+    pColl = sqlite3DbMallocZero(db, 3*sizeof(*pColl) + nName + 1 );
+    if( pColl ){
+      CollSeq *pDel = 0;
+      pColl[0].zName = (char*)&pColl[3];
+      pColl[0].enc = SQLITE_UTF8;
+      pColl[1].zName = (char*)&pColl[3];
+      pColl[1].enc = SQLITE_UTF16LE;
+      pColl[2].zName = (char*)&pColl[3];
+      pColl[2].enc = SQLITE_UTF16BE;
+      memcpy(pColl[0].zName, zName, nName);
+      pColl[0].zName[nName] = 0;
+      pDel = sqlite3HashInsert(&db->aCollSeq, pColl[0].zName, nName, pColl);
+
+      /* If a malloc() failure occurred in sqlite3HashInsert(), it will 
+      ** return the pColl pointer to be deleted (because it wasn't added
+      ** to the hash table).
+      */
+      assert( pDel==0 || pDel==pColl );
+      if( pDel!=0 ){
+        db->mallocFailed = 1;
+        sqlite3DbFree(db, pDel);
+        pColl = 0;
+      }
+    }
+  }
+  return pColl;
+}
+
+/*
+** Parameter zName points to a UTF-8 encoded string nName bytes long.
+** Return the CollSeq* pointer for the collation sequence named zName
+** for the encoding 'enc' from the database 'db'.
+**
+** If the entry specified is not found and 'create' is true, then create a
+** new entry.  Otherwise return NULL.
+**
+** A separate function sqlite3LocateCollSeq() is a wrapper around
+** this routine.  sqlite3LocateCollSeq() invokes the collation factory
+** if necessary and generates an error message if the collating sequence
+** cannot be found.
+**
+** See also: sqlite3LocateCollSeq(), sqlite3GetCollSeq()
+*/
+SQLITE_PRIVATE CollSeq *sqlite3FindCollSeq(
+  sqlite3 *db,
+  u8 enc,
+  const char *zName,
+  int create
+){
+  CollSeq *pColl;
+  if( zName ){
+    pColl = findCollSeqEntry(db, zName, create);
+  }else{
+    pColl = db->pDfltColl;
+  }
+  assert( SQLITE_UTF8==1 && SQLITE_UTF16LE==2 && SQLITE_UTF16BE==3 );
+  assert( enc>=SQLITE_UTF8 && enc<=SQLITE_UTF16BE );
+  if( pColl ) pColl += enc-1;
+  return pColl;
+}
+
+/* During the search for the best function definition, this procedure
+** is called to test how well the function passed as the first argument
+** matches the request for a function with nArg arguments in a system
+** that uses encoding enc. The value returned indicates how well the
+** request is matched. A higher value indicates a better match.
+**
+** The returned value is always between 0 and 6, as follows:
+**
+** 0: Not a match, or if nArg<0 and the function is has no implementation.
+** 1: A variable arguments function that prefers UTF-8 when a UTF-16
+**    encoding is requested, or vice versa.
+** 2: A variable arguments function that uses UTF-16BE when UTF-16LE is
+**    requested, or vice versa.
+** 3: A variable arguments function using the same text encoding.
+** 4: A function with the exact number of arguments requested that
+**    prefers UTF-8 when a UTF-16 encoding is requested, or vice versa.
+** 5: A function with the exact number of arguments requested that
+**    prefers UTF-16LE when UTF-16BE is requested, or vice versa.
+** 6: An exact match.
+**
+*/
+static int matchQuality(FuncDef *p, int nArg, u8 enc){
+  int match = 0;
+  if( p->nArg==-1 || p->nArg==nArg 
+   || (nArg==-1 && (p->xFunc!=0 || p->xStep!=0))
+  ){
+    match = 1;
+    if( p->nArg==nArg || nArg==-1 ){
+      match = 4;
+    }
+    if( enc==p->iPrefEnc ){
+      match += 2;
+    }
+    else if( (enc==SQLITE_UTF16LE && p->iPrefEnc==SQLITE_UTF16BE) ||
+             (enc==SQLITE_UTF16BE && p->iPrefEnc==SQLITE_UTF16LE) ){
+      match += 1;
+    }
+  }
+  return match;
+}
+
+/*
+** Search a FuncDefHash for a function with the given name.  Return
+** a pointer to the matching FuncDef if found, or 0 if there is no match.
+*/
+static FuncDef *functionSearch(
+  FuncDefHash *pHash,  /* Hash table to search */
+  int h,               /* Hash of the name */
+  const char *zFunc,   /* Name of function */
+  int nFunc            /* Number of bytes in zFunc */
+){
+  FuncDef *p;
+  for(p=pHash->a[h]; p; p=p->pHash){
+    if( sqlite3StrNICmp(p->zName, zFunc, nFunc)==0 && p->zName[nFunc]==0 ){
+      return p;
+    }
+  }
+  return 0;
+}
+
+/*
+** Insert a new FuncDef into a FuncDefHash hash table.
+*/
+SQLITE_PRIVATE void sqlite3FuncDefInsert(
+  FuncDefHash *pHash,  /* The hash table into which to insert */
+  FuncDef *pDef        /* The function definition to insert */
+){
+  FuncDef *pOther;
+  int nName = sqlite3Strlen30(pDef->zName);
+  u8 c1 = (u8)pDef->zName[0];
+  int h = (sqlite3UpperToLower[c1] + nName) % ArraySize(pHash->a);
+  pOther = functionSearch(pHash, h, pDef->zName, nName);
+  if( pOther ){
+    assert( pOther!=pDef && pOther->pNext!=pDef );
+    pDef->pNext = pOther->pNext;
+    pOther->pNext = pDef;
+  }else{
+    pDef->pNext = 0;
+    pDef->pHash = pHash->a[h];
+    pHash->a[h] = pDef;
+  }
+}
+  
+  
+
+/*
+** Locate a user function given a name, a number of arguments and a flag
+** indicating whether the function prefers UTF-16 over UTF-8.  Return a
+** pointer to the FuncDef structure that defines that function, or return
+** NULL if the function does not exist.
+**
+** If the createFlag argument is true, then a new (blank) FuncDef
+** structure is created and liked into the "db" structure if a
+** no matching function previously existed.  When createFlag is true
+** and the nArg parameter is -1, then only a function that accepts
+** any number of arguments will be returned.
+**
+** If createFlag is false and nArg is -1, then the first valid
+** function found is returned.  A function is valid if either xFunc
+** or xStep is non-zero.
+**
+** If createFlag is false, then a function with the required name and
+** number of arguments may be returned even if the eTextRep flag does not
+** match that requested.
+*/
+SQLITE_PRIVATE FuncDef *sqlite3FindFunction(
+  sqlite3 *db,       /* An open database */
+  const char *zName, /* Name of the function.  Not null-terminated */
+  int nName,         /* Number of characters in the name */
+  int nArg,          /* Number of arguments.  -1 means any number */
+  u8 enc,            /* Preferred text encoding */
+  int createFlag     /* Create new entry if true and does not otherwise exist */
+){
+  FuncDef *p;         /* Iterator variable */
+  FuncDef *pBest = 0; /* Best match found so far */
+  int bestScore = 0;  /* Score of best match */
+  int h;              /* Hash value */
+
+
+  assert( enc==SQLITE_UTF8 || enc==SQLITE_UTF16LE || enc==SQLITE_UTF16BE );
+  h = (sqlite3UpperToLower[(u8)zName[0]] + nName) % ArraySize(db->aFunc.a);
+
+  /* First search for a match amongst the application-defined functions.
+  */
+  p = functionSearch(&db->aFunc, h, zName, nName);
+  while( p ){
+    int score = matchQuality(p, nArg, enc);
+    if( score>bestScore ){
+      pBest = p;
+      bestScore = score;
+    }
+    p = p->pNext;
+  }
+
+  /* If no match is found, search the built-in functions.
+  **
+  ** If the SQLITE_PreferBuiltin flag is set, then search the built-in
+  ** functions even if a prior app-defined function was found.  And give
+  ** priority to built-in functions.
+  **
+  ** Except, if createFlag is true, that means that we are trying to
+  ** install a new function.  Whatever FuncDef structure is returned it will
+  ** have fields overwritten with new information appropriate for the
+  ** new function.  But the FuncDefs for built-in functions are read-only.
+  ** So we must not search for built-ins when creating a new function.
+  */ 
+  if( !createFlag && (pBest==0 || (db->flags & SQLITE_PreferBuiltin)!=0) ){
+    FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
+    bestScore = 0;
+    p = functionSearch(pHash, h, zName, nName);
+    while( p ){
+      int score = matchQuality(p, nArg, enc);
+      if( score>bestScore ){
+        pBest = p;
+        bestScore = score;
+      }
+      p = p->pNext;
+    }
+  }
+
+  /* If the createFlag parameter is true and the search did not reveal an
+  ** exact match for the name, number of arguments and encoding, then add a
+  ** new entry to the hash table and return it.
+  */
+  if( createFlag && (bestScore<6 || pBest->nArg!=nArg) && 
+      (pBest = sqlite3DbMallocZero(db, sizeof(*pBest)+nName+1))!=0 ){
+    pBest->zName = (char *)&pBest[1];
+    pBest->nArg = (u16)nArg;
+    pBest->iPrefEnc = enc;
+    memcpy(pBest->zName, zName, nName);
+    pBest->zName[nName] = 0;
+    sqlite3FuncDefInsert(&db->aFunc, pBest);
+  }
+
+  if( pBest && (pBest->xStep || pBest->xFunc || createFlag) ){
+    return pBest;
+  }
+  return 0;
+}
+
+/*
+** Free all resources held by the schema structure. The void* argument points
+** at a Schema struct. This function does not call sqlite3DbFree(db, ) on the 
+** pointer itself, it just cleans up subsidiary resources (i.e. the contents
+** of the schema hash tables).
+**
+** The Schema.cache_size variable is not cleared.
+*/
+SQLITE_PRIVATE void sqlite3SchemaClear(void *p){
+  Hash temp1;
+  Hash temp2;
+  HashElem *pElem;
+  Schema *pSchema = (Schema *)p;
+
+  temp1 = pSchema->tblHash;
+  temp2 = pSchema->trigHash;
+  sqlite3HashInit(&pSchema->trigHash);
+  sqlite3HashClear(&pSchema->idxHash);
+  for(pElem=sqliteHashFirst(&temp2); pElem; pElem=sqliteHashNext(pElem)){
+    sqlite3DeleteTrigger(0, (Trigger*)sqliteHashData(pElem));
+  }
+  sqlite3HashClear(&temp2);
+  sqlite3HashInit(&pSchema->tblHash);
+  for(pElem=sqliteHashFirst(&temp1); pElem; pElem=sqliteHashNext(pElem)){
+    Table *pTab = sqliteHashData(pElem);
+    sqlite3DeleteTable(0, pTab);
+  }
+  sqlite3HashClear(&temp1);
+  sqlite3HashClear(&pSchema->fkeyHash);
+  pSchema->pSeqTab = 0;
+  if( pSchema->flags & DB_SchemaLoaded ){
+    pSchema->iGeneration++;
+    pSchema->flags &= ~DB_SchemaLoaded;
+  }
+}
+
+/*
+** Find and return the schema associated with a BTree.  Create
+** a new one if necessary.
+*/
+SQLITE_PRIVATE Schema *sqlite3SchemaGet(sqlite3 *db, Btree *pBt){
+  Schema * p;
+  if( pBt ){
+    p = (Schema *)sqlite3BtreeSchema(pBt, sizeof(Schema), sqlite3SchemaClear);
+  }else{
+    p = (Schema *)sqlite3DbMallocZero(0, sizeof(Schema));
+  }
+  if( !p ){
+    db->mallocFailed = 1;
+  }else if ( 0==p->file_format ){
+    sqlite3HashInit(&p->tblHash);
+    sqlite3HashInit(&p->idxHash);
+    sqlite3HashInit(&p->trigHash);
+    sqlite3HashInit(&p->fkeyHash);
+    p->enc = SQLITE_UTF8;
+  }
+  return p;
+}
+
+/************** End of callback.c ********************************************/
+/************** Begin file delete.c ******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains C code routines that are called by the parser
+** in order to generate code for DELETE FROM statements.
+*/
+
+/*
+** While a SrcList can in general represent multiple tables and subqueries
+** (as in the FROM clause of a SELECT statement) in this case it contains
+** the name of a single table, as one might find in an INSERT, DELETE,
+** or UPDATE statement.  Look up that table in the symbol table and
+** return a pointer.  Set an error message and return NULL if the table 
+** name is not found or if any other error occurs.
+**
+** The following fields are initialized appropriate in pSrc:
+**
+**    pSrc->a[0].pTab       Pointer to the Table object
+**    pSrc->a[0].pIndex     Pointer to the INDEXED BY index, if there is one
+**
+*/
+SQLITE_PRIVATE Table *sqlite3SrcListLookup(Parse *pParse, SrcList *pSrc){
+  struct SrcList_item *pItem = pSrc->a;
+  Table *pTab;
+  assert( pItem && pSrc->nSrc==1 );
+  pTab = sqlite3LocateTable(pParse, 0, pItem->zName, pItem->zDatabase);
+  sqlite3DeleteTable(pParse->db, pItem->pTab);
+  pItem->pTab = pTab;
+  if( pTab ){
+    pTab->nRef++;
+  }
+  if( sqlite3IndexedByLookup(pParse, pItem) ){
+    pTab = 0;
+  }
+  return pTab;
+}
+
+/*
+** Check to make sure the given table is writable.  If it is not
+** writable, generate an error message and return 1.  If it is
+** writable return 0;
+*/
+SQLITE_PRIVATE int sqlite3IsReadOnly(Parse *pParse, Table *pTab, int viewOk){
+  /* A table is not writable under the following circumstances:
+  **
+  **   1) It is a virtual table and no implementation of the xUpdate method
+  **      has been provided, or
+  **   2) It is a system table (i.e. sqlite_master), this call is not
+  **      part of a nested parse and writable_schema pragma has not 
+  **      been specified.
+  **
+  ** In either case leave an error message in pParse and return non-zero.
+  */
+  if( ( IsVirtual(pTab) 
+     && sqlite3GetVTable(pParse->db, pTab)->pMod->pModule->xUpdate==0 )
+   || ( (pTab->tabFlags & TF_Readonly)!=0
+     && (pParse->db->flags & SQLITE_WriteSchema)==0
+     && pParse->nested==0 )
+  ){
+    sqlite3ErrorMsg(pParse, "table %s may not be modified", pTab->zName);
+    return 1;
+  }
+
+#ifndef SQLITE_OMIT_VIEW
+  if( !viewOk && pTab->pSelect ){
+    sqlite3ErrorMsg(pParse,"cannot modify %s because it is a view",pTab->zName);
+    return 1;
+  }
+#endif
+  return 0;
+}
+
+
+#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)
+/*
+** Evaluate a view and store its result in an ephemeral table.  The
+** pWhere argument is an optional WHERE clause that restricts the
+** set of rows in the view that are to be added to the ephemeral table.
+*/
+SQLITE_PRIVATE void sqlite3MaterializeView(
+  Parse *pParse,       /* Parsing context */
+  Table *pView,        /* View definition */
+  Expr *pWhere,        /* Optional WHERE clause to be added */
+  int iCur             /* Cursor number for ephemerial table */
+){
+  SelectDest dest;
+  Select *pDup;
+  sqlite3 *db = pParse->db;
+
+  pDup = sqlite3SelectDup(db, pView->pSelect, 0);
+  if( pWhere ){
+    SrcList *pFrom;
+    
+    pWhere = sqlite3ExprDup(db, pWhere, 0);
+    pFrom = sqlite3SrcListAppend(db, 0, 0, 0);
+    if( pFrom ){
+      assert( pFrom->nSrc==1 );
+      pFrom->a[0].zAlias = sqlite3DbStrDup(db, pView->zName);
+      pFrom->a[0].pSelect = pDup;
+      assert( pFrom->a[0].pOn==0 );
+      assert( pFrom->a[0].pUsing==0 );
+    }else{
+      sqlite3SelectDelete(db, pDup);
+    }
+    pDup = sqlite3SelectNew(pParse, 0, pFrom, pWhere, 0, 0, 0, 0, 0, 0);
+  }
+  sqlite3SelectDestInit(&dest, SRT_EphemTab, iCur);
+  sqlite3Select(pParse, pDup, &dest);
+  sqlite3SelectDelete(db, pDup);
+}
+#endif /* !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER) */
+
+#if defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY)
+/*
+** Generate an expression tree to implement the WHERE, ORDER BY,
+** and LIMIT/OFFSET portion of DELETE and UPDATE statements.
+**
+**     DELETE FROM table_wxyz WHERE a<5 ORDER BY a LIMIT 1;
+**                            \__________________________/
+**                               pLimitWhere (pInClause)
+*/
+SQLITE_PRIVATE Expr *sqlite3LimitWhere(
+  Parse *pParse,               /* The parser context */
+  SrcList *pSrc,               /* the FROM clause -- which tables to scan */
+  Expr *pWhere,                /* The WHERE clause.  May be null */
+  ExprList *pOrderBy,          /* The ORDER BY clause.  May be null */
+  Expr *pLimit,                /* The LIMIT clause.  May be null */
+  Expr *pOffset,               /* The OFFSET clause.  May be null */
+  char *zStmtType              /* Either DELETE or UPDATE.  For error messages. */
+){
+  Expr *pWhereRowid = NULL;    /* WHERE rowid .. */
+  Expr *pInClause = NULL;      /* WHERE rowid IN ( select ) */
+  Expr *pSelectRowid = NULL;   /* SELECT rowid ... */
+  ExprList *pEList = NULL;     /* Expression list contaning only pSelectRowid */
+  SrcList *pSelectSrc = NULL;  /* SELECT rowid FROM x ... (dup of pSrc) */
+  Select *pSelect = NULL;      /* Complete SELECT tree */
+
+  /* Check that there isn't an ORDER BY without a LIMIT clause.
+  */
+  if( pOrderBy && (pLimit == 0) ) {
+    sqlite3ErrorMsg(pParse, "ORDER BY without LIMIT on %s", zStmtType);
+    pParse->parseError = 1;
+    goto limit_where_cleanup_2;
+  }
+
+  /* We only need to generate a select expression if there
+  ** is a limit/offset term to enforce.
+  */
+  if( pLimit == 0 ) {
+    /* if pLimit is null, pOffset will always be null as well. */
+    assert( pOffset == 0 );
+    return pWhere;
+  }
+
+  /* Generate a select expression tree to enforce the limit/offset 
+  ** term for the DELETE or UPDATE statement.  For example:
+  **   DELETE FROM table_a WHERE col1=1 ORDER BY col2 LIMIT 1 OFFSET 1
+  ** becomes:
+  **   DELETE FROM table_a WHERE rowid IN ( 
+  **     SELECT rowid FROM table_a WHERE col1=1 ORDER BY col2 LIMIT 1 OFFSET 1
+  **   );
+  */
+
+  pSelectRowid = sqlite3PExpr(pParse, TK_ROW, 0, 0, 0);
+  if( pSelectRowid == 0 ) goto limit_where_cleanup_2;
+  pEList = sqlite3ExprListAppend(pParse, 0, pSelectRowid);
+  if( pEList == 0 ) goto limit_where_cleanup_2;
+
+  /* duplicate the FROM clause as it is needed by both the DELETE/UPDATE tree
+  ** and the SELECT subtree. */
+  pSelectSrc = sqlite3SrcListDup(pParse->db, pSrc, 0);
+  if( pSelectSrc == 0 ) {
+    sqlite3ExprListDelete(pParse->db, pEList);
+    goto limit_where_cleanup_2;
+  }
+
+  /* generate the SELECT expression tree. */
+  pSelect = sqlite3SelectNew(pParse,pEList,pSelectSrc,pWhere,0,0,
+                             pOrderBy,0,pLimit,pOffset);
+  if( pSelect == 0 ) return 0;
+
+  /* now generate the new WHERE rowid IN clause for the DELETE/UDPATE */
+  pWhereRowid = sqlite3PExpr(pParse, TK_ROW, 0, 0, 0);
+  if( pWhereRowid == 0 ) goto limit_where_cleanup_1;
+  pInClause = sqlite3PExpr(pParse, TK_IN, pWhereRowid, 0, 0);
+  if( pInClause == 0 ) goto limit_where_cleanup_1;
+
+  pInClause->x.pSelect = pSelect;
+  pInClause->flags |= EP_xIsSelect;
+  sqlite3ExprSetHeight(pParse, pInClause);
+  return pInClause;
+
+  /* something went wrong. clean up anything allocated. */
+limit_where_cleanup_1:
+  sqlite3SelectDelete(pParse->db, pSelect);
+  return 0;
+
+limit_where_cleanup_2:
+  sqlite3ExprDelete(pParse->db, pWhere);
+  sqlite3ExprListDelete(pParse->db, pOrderBy);
+  sqlite3ExprDelete(pParse->db, pLimit);
+  sqlite3ExprDelete(pParse->db, pOffset);
+  return 0;
+}
+#endif /* defined(SQLITE_ENABLE_UPDATE_DELETE_LIMIT) && !defined(SQLITE_OMIT_SUBQUERY) */
+
+/*
+** Generate code for a DELETE FROM statement.
+**
+**     DELETE FROM table_wxyz WHERE a<5 AND b NOT NULL;
+**                 \________/       \________________/
+**                  pTabList              pWhere
+*/
+SQLITE_PRIVATE void sqlite3DeleteFrom(
+  Parse *pParse,         /* The parser context */
+  SrcList *pTabList,     /* The table from which we should delete things */
+  Expr *pWhere           /* The WHERE clause.  May be null */
+){
+  Vdbe *v;               /* The virtual database engine */
+  Table *pTab;           /* The table from which records will be deleted */
+  const char *zDb;       /* Name of database holding pTab */
+  int end, addr = 0;     /* A couple addresses of generated code */
+  int i;                 /* Loop counter */
+  WhereInfo *pWInfo;     /* Information about the WHERE clause */
+  Index *pIdx;           /* For looping over indices of the table */
+  int iCur;              /* VDBE Cursor number for pTab */
+  sqlite3 *db;           /* Main database structure */
+  AuthContext sContext;  /* Authorization context */
+  NameContext sNC;       /* Name context to resolve expressions in */
+  int iDb;               /* Database number */
+  int memCnt = -1;       /* Memory cell used for change counting */
+  int rcauth;            /* Value returned by authorization callback */
+
+#ifndef SQLITE_OMIT_TRIGGER
+  int isView;                  /* True if attempting to delete from a view */
+  Trigger *pTrigger;           /* List of table triggers, if required */
+#endif
+
+  memset(&sContext, 0, sizeof(sContext));
+  db = pParse->db;
+  if( pParse->nErr || db->mallocFailed ){
+    goto delete_from_cleanup;
+  }
+  assert( pTabList->nSrc==1 );
+
+  /* Locate the table which we want to delete.  This table has to be
+  ** put in an SrcList structure because some of the subroutines we
+  ** will be calling are designed to work with multiple tables and expect
+  ** an SrcList* parameter instead of just a Table* parameter.
+  */
+  pTab = sqlite3SrcListLookup(pParse, pTabList);
+  if( pTab==0 )  goto delete_from_cleanup;
+
+  /* Figure out if we have any triggers and if the table being
+  ** deleted from is a view
+  */
+#ifndef SQLITE_OMIT_TRIGGER
+  pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);
+  isView = pTab->pSelect!=0;
+#else
+# define pTrigger 0
+# define isView 0
+#endif
+#ifdef SQLITE_OMIT_VIEW
+# undef isView
+# define isView 0
+#endif
+
+  /* If pTab is really a view, make sure it has been initialized.
+  */
+  if( sqlite3ViewGetColumnNames(pParse, pTab) ){
+    goto delete_from_cleanup;
+  }
+
+  if( sqlite3IsReadOnly(pParse, pTab, (pTrigger?1:0)) ){
+    goto delete_from_cleanup;
+  }
+  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+  assert( iDb<db->nDb );
+  zDb = db->aDb[iDb].zName;
+  rcauth = sqlite3AuthCheck(pParse, SQLITE_DELETE, pTab->zName, 0, zDb);
+  assert( rcauth==SQLITE_OK || rcauth==SQLITE_DENY || rcauth==SQLITE_IGNORE );
+  if( rcauth==SQLITE_DENY ){
+    goto delete_from_cleanup;
+  }
+  assert(!isView || pTrigger);
+
+  /* Assign  cursor number to the table and all its indices.
+  */
+  assert( pTabList->nSrc==1 );
+  iCur = pTabList->a[0].iCursor = pParse->nTab++;
+  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+    pParse->nTab++;
+  }
+
+  /* Start the view context
+  */
+  if( isView ){
+    sqlite3AuthContextPush(pParse, &sContext, pTab->zName);
+  }
+
+  /* Begin generating code.
+  */
+  v = sqlite3GetVdbe(pParse);
+  if( v==0 ){
+    goto delete_from_cleanup;
+  }
+  if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);
+  sqlite3BeginWriteOperation(pParse, 1, iDb);
+
+  /* If we are trying to delete from a view, realize that view into
+  ** a ephemeral table.
+  */
+#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)
+  if( isView ){
+    sqlite3MaterializeView(pParse, pTab, pWhere, iCur);
+  }
+#endif
+
+  /* Resolve the column names in the WHERE clause.
+  */
+  memset(&sNC, 0, sizeof(sNC));
+  sNC.pParse = pParse;
+  sNC.pSrcList = pTabList;
+  if( sqlite3ResolveExprNames(&sNC, pWhere) ){
+    goto delete_from_cleanup;
+  }
+
+  /* Initialize the counter of the number of rows deleted, if
+  ** we are counting rows.
+  */
+  if( db->flags & SQLITE_CountRows ){
+    memCnt = ++pParse->nMem;
+    sqlite3VdbeAddOp2(v, OP_Integer, 0, memCnt);
+  }
+
+#ifndef SQLITE_OMIT_TRUNCATE_OPTIMIZATION
+  /* Special case: A DELETE without a WHERE clause deletes everything.
+  ** It is easier just to erase the whole table. Prior to version 3.6.5,
+  ** this optimization caused the row change count (the value returned by 
+  ** API function sqlite3_count_changes) to be set incorrectly.  */
+  if( rcauth==SQLITE_OK && pWhere==0 && !pTrigger && !IsVirtual(pTab) 
+   && 0==sqlite3FkRequired(pParse, pTab, 0, 0)
+  ){
+    assert( !isView );
+    sqlite3VdbeAddOp4(v, OP_Clear, pTab->tnum, iDb, memCnt,
+                      pTab->zName, P4_STATIC);
+    for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+      assert( pIdx->pSchema==pTab->pSchema );
+      sqlite3VdbeAddOp2(v, OP_Clear, pIdx->tnum, iDb);
+    }
+  }else
+#endif /* SQLITE_OMIT_TRUNCATE_OPTIMIZATION */
+  /* The usual case: There is a WHERE clause so we have to scan through
+  ** the table and pick which records to delete.
+  */
+  {
+    int iRowSet = ++pParse->nMem;   /* Register for rowset of rows to delete */
+    int iRowid = ++pParse->nMem;    /* Used for storing rowid values. */
+    int regRowid;                   /* Actual register containing rowids */
+
+    /* Collect rowids of every row to be deleted.
+    */
+    sqlite3VdbeAddOp2(v, OP_Null, 0, iRowSet);
+    pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere,0,WHERE_DUPLICATES_OK);
+    if( pWInfo==0 ) goto delete_from_cleanup;
+    regRowid = sqlite3ExprCodeGetColumn(pParse, pTab, -1, iCur, iRowid);
+    sqlite3VdbeAddOp2(v, OP_RowSetAdd, iRowSet, regRowid);
+    if( db->flags & SQLITE_CountRows ){
+      sqlite3VdbeAddOp2(v, OP_AddImm, memCnt, 1);
+    }
+    sqlite3WhereEnd(pWInfo);
+
+    /* Delete every item whose key was written to the list during the
+    ** database scan.  We have to delete items after the scan is complete
+    ** because deleting an item can change the scan order.  */
+    end = sqlite3VdbeMakeLabel(v);
+
+    /* Unless this is a view, open cursors for the table we are 
+    ** deleting from and all its indices. If this is a view, then the
+    ** only effect this statement has is to fire the INSTEAD OF 
+    ** triggers.  */
+    if( !isView ){
+      sqlite3OpenTableAndIndices(pParse, pTab, iCur, OP_OpenWrite);
+    }
+
+    addr = sqlite3VdbeAddOp3(v, OP_RowSetRead, iRowSet, end, iRowid);
+
+    /* Delete the row */
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+    if( IsVirtual(pTab) ){
+      const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
+      sqlite3VtabMakeWritable(pParse, pTab);
+      sqlite3VdbeAddOp4(v, OP_VUpdate, 0, 1, iRowid, pVTab, P4_VTAB);
+      sqlite3MayAbort(pParse);
+    }else
+#endif
+    {
+      int count = (pParse->nested==0);    /* True to count changes */
+      sqlite3GenerateRowDelete(pParse, pTab, iCur, iRowid, count, pTrigger, OE_Default);
+    }
+
+    /* End of the delete loop */
+    sqlite3VdbeAddOp2(v, OP_Goto, 0, addr);
+    sqlite3VdbeResolveLabel(v, end);
+
+    /* Close the cursors open on the table and its indexes. */
+    if( !isView && !IsVirtual(pTab) ){
+      for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
+        sqlite3VdbeAddOp2(v, OP_Close, iCur + i, pIdx->tnum);
+      }
+      sqlite3VdbeAddOp1(v, OP_Close, iCur);
+    }
+  }
+
+  /* Update the sqlite_sequence table by storing the content of the
+  ** maximum rowid counter values recorded while inserting into
+  ** autoincrement tables.
+  */
+  if( pParse->nested==0 && pParse->pTriggerTab==0 ){
+    sqlite3AutoincrementEnd(pParse);
+  }
+
+  /* Return the number of rows that were deleted. If this routine is 
+  ** generating code because of a call to sqlite3NestedParse(), do not
+  ** invoke the callback function.
+  */
+  if( (db->flags&SQLITE_CountRows) && !pParse->nested && !pParse->pTriggerTab ){
+    sqlite3VdbeAddOp2(v, OP_ResultRow, memCnt, 1);
+    sqlite3VdbeSetNumCols(v, 1);
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "rows deleted", SQLITE_STATIC);
+  }
+
+delete_from_cleanup:
+  sqlite3AuthContextPop(&sContext);
+  sqlite3SrcListDelete(db, pTabList);
+  sqlite3ExprDelete(db, pWhere);
+  return;
+}
+/* Make sure "isView" and other macros defined above are undefined. Otherwise
+** thely may interfere with compilation of other functions in this file
+** (or in another file, if this file becomes part of the amalgamation).  */
+#ifdef isView
+ #undef isView
+#endif
+#ifdef pTrigger
+ #undef pTrigger
+#endif
+
+/*
+** This routine generates VDBE code that causes a single row of a
+** single table to be deleted.
+**
+** The VDBE must be in a particular state when this routine is called.
+** These are the requirements:
+**
+**   1.  A read/write cursor pointing to pTab, the table containing the row
+**       to be deleted, must be opened as cursor number $iCur.
+**
+**   2.  Read/write cursors for all indices of pTab must be open as
+**       cursor number base+i for the i-th index.
+**
+**   3.  The record number of the row to be deleted must be stored in
+**       memory cell iRowid.
+**
+** This routine generates code to remove both the table record and all 
+** index entries that point to that record.
+*/
+SQLITE_PRIVATE void sqlite3GenerateRowDelete(
+  Parse *pParse,     /* Parsing context */
+  Table *pTab,       /* Table containing the row to be deleted */
+  int iCur,          /* Cursor number for the table */
+  int iRowid,        /* Memory cell that contains the rowid to delete */
+  int count,         /* If non-zero, increment the row change counter */
+  Trigger *pTrigger, /* List of triggers to (potentially) fire */
+  int onconf         /* Default ON CONFLICT policy for triggers */
+){
+  Vdbe *v = pParse->pVdbe;        /* Vdbe */
+  int iOld = 0;                   /* First register in OLD.* array */
+  int iLabel;                     /* Label resolved to end of generated code */
+
+  /* Vdbe is guaranteed to have been allocated by this stage. */
+  assert( v );
+
+  /* Seek cursor iCur to the row to delete. If this row no longer exists 
+  ** (this can happen if a trigger program has already deleted it), do
+  ** not attempt to delete it or fire any DELETE triggers.  */
+  iLabel = sqlite3VdbeMakeLabel(v);
+  sqlite3VdbeAddOp3(v, OP_NotExists, iCur, iLabel, iRowid);
+ 
+  /* If there are any triggers to fire, allocate a range of registers to
+  ** use for the old.* references in the triggers.  */
+  if( sqlite3FkRequired(pParse, pTab, 0, 0) || pTrigger ){
+    u32 mask;                     /* Mask of OLD.* columns in use */
+    int iCol;                     /* Iterator used while populating OLD.* */
+
+    /* TODO: Could use temporary registers here. Also could attempt to
+    ** avoid copying the contents of the rowid register.  */
+    mask = sqlite3TriggerColmask(
+        pParse, pTrigger, 0, 0, TRIGGER_BEFORE|TRIGGER_AFTER, pTab, onconf
+    );
+    mask |= sqlite3FkOldmask(pParse, pTab);
+    iOld = pParse->nMem+1;
+    pParse->nMem += (1 + pTab->nCol);
+
+    /* Populate the OLD.* pseudo-table register array. These values will be 
+    ** used by any BEFORE and AFTER triggers that exist.  */
+    sqlite3VdbeAddOp2(v, OP_Copy, iRowid, iOld);
+    for(iCol=0; iCol<pTab->nCol; iCol++){
+      if( mask==0xffffffff || mask&(1<<iCol) ){
+        sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, iCol, iOld+iCol+1);
+      }
+    }
+
+    /* Invoke BEFORE DELETE trigger programs. */
+    sqlite3CodeRowTrigger(pParse, pTrigger, 
+        TK_DELETE, 0, TRIGGER_BEFORE, pTab, iOld, onconf, iLabel
+    );
+
+    /* Seek the cursor to the row to be deleted again. It may be that
+    ** the BEFORE triggers coded above have already removed the row
+    ** being deleted. Do not attempt to delete the row a second time, and 
+    ** do not fire AFTER triggers.  */
+    sqlite3VdbeAddOp3(v, OP_NotExists, iCur, iLabel, iRowid);
+
+    /* Do FK processing. This call checks that any FK constraints that
+    ** refer to this table (i.e. constraints attached to other tables) 
+    ** are not violated by deleting this row.  */
+    sqlite3FkCheck(pParse, pTab, iOld, 0);
+  }
+
+  /* Delete the index and table entries. Skip this step if pTab is really
+  ** a view (in which case the only effect of the DELETE statement is to
+  ** fire the INSTEAD OF triggers).  */ 
+  if( pTab->pSelect==0 ){
+    sqlite3GenerateRowIndexDelete(pParse, pTab, iCur, 0);
+    sqlite3VdbeAddOp2(v, OP_Delete, iCur, (count?OPFLAG_NCHANGE:0));
+    if( count ){
+      sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_TRANSIENT);
+    }
+  }
+
+  /* Do any ON CASCADE, SET NULL or SET DEFAULT operations required to
+  ** handle rows (possibly in other tables) that refer via a foreign key
+  ** to the row just deleted. */ 
+  sqlite3FkActions(pParse, pTab, 0, iOld);
+
+  /* Invoke AFTER DELETE trigger programs. */
+  sqlite3CodeRowTrigger(pParse, pTrigger, 
+      TK_DELETE, 0, TRIGGER_AFTER, pTab, iOld, onconf, iLabel
+  );
+
+  /* Jump here if the row had already been deleted before any BEFORE
+  ** trigger programs were invoked. Or if a trigger program throws a 
+  ** RAISE(IGNORE) exception.  */
+  sqlite3VdbeResolveLabel(v, iLabel);
+}
+
+/*
+** This routine generates VDBE code that causes the deletion of all
+** index entries associated with a single row of a single table.
+**
+** The VDBE must be in a particular state when this routine is called.
+** These are the requirements:
+**
+**   1.  A read/write cursor pointing to pTab, the table containing the row
+**       to be deleted, must be opened as cursor number "iCur".
+**
+**   2.  Read/write cursors for all indices of pTab must be open as
+**       cursor number iCur+i for the i-th index.
+**
+**   3.  The "iCur" cursor must be pointing to the row that is to be
+**       deleted.
+*/
+SQLITE_PRIVATE void sqlite3GenerateRowIndexDelete(
+  Parse *pParse,     /* Parsing and code generating context */
+  Table *pTab,       /* Table containing the row to be deleted */
+  int iCur,          /* Cursor number for the table */
+  int *aRegIdx       /* Only delete if aRegIdx!=0 && aRegIdx[i]>0 */
+){
+  int i;
+  Index *pIdx;
+  int r1;
+
+  for(i=1, pIdx=pTab->pIndex; pIdx; i++, pIdx=pIdx->pNext){
+    if( aRegIdx!=0 && aRegIdx[i-1]==0 ) continue;
+    r1 = sqlite3GenerateIndexKey(pParse, pIdx, iCur, 0, 0);
+    sqlite3VdbeAddOp3(pParse->pVdbe, OP_IdxDelete, iCur+i, r1,pIdx->nColumn+1);
+  }
+}
+
+/*
+** Generate code that will assemble an index key and put it in register
+** regOut.  The key with be for index pIdx which is an index on pTab.
+** iCur is the index of a cursor open on the pTab table and pointing to
+** the entry that needs indexing.
+**
+** Return a register number which is the first in a block of
+** registers that holds the elements of the index key.  The
+** block of registers has already been deallocated by the time
+** this routine returns.
+*/
+SQLITE_PRIVATE int sqlite3GenerateIndexKey(
+  Parse *pParse,     /* Parsing context */
+  Index *pIdx,       /* The index for which to generate a key */
+  int iCur,          /* Cursor number for the pIdx->pTable table */
+  int regOut,        /* Write the new index key to this register */
+  int doMakeRec      /* Run the OP_MakeRecord instruction if true */
+){
+  Vdbe *v = pParse->pVdbe;
+  int j;
+  Table *pTab = pIdx->pTable;
+  int regBase;
+  int nCol;
+
+  nCol = pIdx->nColumn;
+  regBase = sqlite3GetTempRange(pParse, nCol+1);
+  sqlite3VdbeAddOp2(v, OP_Rowid, iCur, regBase+nCol);
+  for(j=0; j<nCol; j++){
+    int idx = pIdx->aiColumn[j];
+    if( idx==pTab->iPKey ){
+      sqlite3VdbeAddOp2(v, OP_SCopy, regBase+nCol, regBase+j);
+    }else{
+      sqlite3VdbeAddOp3(v, OP_Column, iCur, idx, regBase+j);
+      sqlite3ColumnDefault(v, pTab, idx, -1);
+    }
+  }
+  if( doMakeRec ){
+    sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol+1, regOut);
+    sqlite3VdbeChangeP4(v, -1, sqlite3IndexAffinityStr(v, pIdx), P4_TRANSIENT);
+  }
+  sqlite3ReleaseTempRange(pParse, regBase, nCol+1);
+  return regBase;
+}
+
+/************** End of delete.c **********************************************/
+/************** Begin file func.c ********************************************/
+/*
+** 2002 February 23
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the C functions that implement various SQL
+** functions of SQLite.  
+**
+** There is only one exported symbol in this file - the function
+** sqliteRegisterBuildinFunctions() found at the bottom of the file.
+** All other code has file scope.
+*/
+
+/*
+** Return the collating function associated with a function.
+*/
+static CollSeq *sqlite3GetFuncCollSeq(sqlite3_context *context){
+  return context->pColl;
+}
+
+/*
+** Implementation of the non-aggregate min() and max() functions
+*/
+static void minmaxFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  int i;
+  int mask;    /* 0 for min() or 0xffffffff for max() */
+  int iBest;
+  CollSeq *pColl;
+
+  assert( argc>1 );
+  mask = sqlite3_user_data(context)==0 ? 0 : -1;
+  pColl = sqlite3GetFuncCollSeq(context);
+  assert( pColl );
+  assert( mask==-1 || mask==0 );
+  iBest = 0;
+  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
+  for(i=1; i<argc; i++){
+    if( sqlite3_value_type(argv[i])==SQLITE_NULL ) return;
+    if( (sqlite3MemCompare(argv[iBest], argv[i], pColl)^mask)>=0 ){
+      testcase( mask==0 );
+      iBest = i;
+    }
+  }
+  sqlite3_result_value(context, argv[iBest]);
+}
+
+/*
+** Return the type of the argument.
+*/
+static void typeofFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **argv
+){
+  const char *z = 0;
+  UNUSED_PARAMETER(NotUsed);
+  switch( sqlite3_value_type(argv[0]) ){
+    case SQLITE_INTEGER: z = "integer"; break;
+    case SQLITE_TEXT:    z = "text";    break;
+    case SQLITE_FLOAT:   z = "real";    break;
+    case SQLITE_BLOB:    z = "blob";    break;
+    default:             z = "null";    break;
+  }
+  sqlite3_result_text(context, z, -1, SQLITE_STATIC);
+}
+
+
+/*
+** Implementation of the length() function
+*/
+static void lengthFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  int len;
+
+  assert( argc==1 );
+  UNUSED_PARAMETER(argc);
+  switch( sqlite3_value_type(argv[0]) ){
+    case SQLITE_BLOB:
+    case SQLITE_INTEGER:
+    case SQLITE_FLOAT: {
+      sqlite3_result_int(context, sqlite3_value_bytes(argv[0]));
+      break;
+    }
+    case SQLITE_TEXT: {
+      const unsigned char *z = sqlite3_value_text(argv[0]);
+      if( z==0 ) return;
+      len = 0;
+      while( *z ){
+        len++;
+        SQLITE_SKIP_UTF8(z);
+      }
+      sqlite3_result_int(context, len);
+      break;
+    }
+    default: {
+      sqlite3_result_null(context);
+      break;
+    }
+  }
+}
+
+/*
+** Implementation of the abs() function.
+**
+** IMP: R-23979-26855 The abs(X) function returns the absolute value of
+** the numeric argument X. 
+*/
+static void absFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
+  assert( argc==1 );
+  UNUSED_PARAMETER(argc);
+  switch( sqlite3_value_type(argv[0]) ){
+    case SQLITE_INTEGER: {
+      i64 iVal = sqlite3_value_int64(argv[0]);
+      if( iVal<0 ){
+        if( (iVal<<1)==0 ){
+          /* IMP: R-35460-15084 If X is the integer -9223372036854775807 then
+          ** abs(X) throws an integer overflow error since there is no
+          ** equivalent positive 64-bit two complement value. */
+          sqlite3_result_error(context, "integer overflow", -1);
+          return;
+        }
+        iVal = -iVal;
+      } 
+      sqlite3_result_int64(context, iVal);
+      break;
+    }
+    case SQLITE_NULL: {
+      /* IMP: R-37434-19929 Abs(X) returns NULL if X is NULL. */
+      sqlite3_result_null(context);
+      break;
+    }
+    default: {
+      /* Because sqlite3_value_double() returns 0.0 if the argument is not
+      ** something that can be converted into a number, we have:
+      ** IMP: R-57326-31541 Abs(X) return 0.0 if X is a string or blob that
+      ** cannot be converted to a numeric value. 
+      */
+      double rVal = sqlite3_value_double(argv[0]);
+      if( rVal<0 ) rVal = -rVal;
+      sqlite3_result_double(context, rVal);
+      break;
+    }
+  }
+}
+
+/*
+** Implementation of the substr() function.
+**
+** substr(x,p1,p2)  returns p2 characters of x[] beginning with p1.
+** p1 is 1-indexed.  So substr(x,1,1) returns the first character
+** of x.  If x is text, then we actually count UTF-8 characters.
+** If x is a blob, then we count bytes.
+**
+** If p1 is negative, then we begin abs(p1) from the end of x[].
+**
+** If p2 is negative, return the p2 characters preceeding p1.
+*/
+static void substrFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  const unsigned char *z;
+  const unsigned char *z2;
+  int len;
+  int p0type;
+  i64 p1, p2;
+  int negP2 = 0;
+
+  assert( argc==3 || argc==2 );
+  if( sqlite3_value_type(argv[1])==SQLITE_NULL
+   || (argc==3 && sqlite3_value_type(argv[2])==SQLITE_NULL)
+  ){
+    return;
+  }
+  p0type = sqlite3_value_type(argv[0]);
+  p1 = sqlite3_value_int(argv[1]);
+  if( p0type==SQLITE_BLOB ){
+    len = sqlite3_value_bytes(argv[0]);
+    z = sqlite3_value_blob(argv[0]);
+    if( z==0 ) return;
+    assert( len==sqlite3_value_bytes(argv[0]) );
+  }else{
+    z = sqlite3_value_text(argv[0]);
+    if( z==0 ) return;
+    len = 0;
+    if( p1<0 ){
+      for(z2=z; *z2; len++){
+        SQLITE_SKIP_UTF8(z2);
+      }
+    }
+  }
+  if( argc==3 ){
+    p2 = sqlite3_value_int(argv[2]);
+    if( p2<0 ){
+      p2 = -p2;
+      negP2 = 1;
+    }
+  }else{
+    p2 = sqlite3_context_db_handle(context)->aLimit[SQLITE_LIMIT_LENGTH];
+  }
+  if( p1<0 ){
+    p1 += len;
+    if( p1<0 ){
+      p2 += p1;
+      if( p2<0 ) p2 = 0;
+      p1 = 0;
+    }
+  }else if( p1>0 ){
+    p1--;
+  }else if( p2>0 ){
+    p2--;
+  }
+  if( negP2 ){
+    p1 -= p2;
+    if( p1<0 ){
+      p2 += p1;
+      p1 = 0;
+    }
+  }
+  assert( p1>=0 && p2>=0 );
+  if( p0type!=SQLITE_BLOB ){
+    while( *z && p1 ){
+      SQLITE_SKIP_UTF8(z);
+      p1--;
+    }
+    for(z2=z; *z2 && p2; p2--){
+      SQLITE_SKIP_UTF8(z2);
+    }
+    sqlite3_result_text(context, (char*)z, (int)(z2-z), SQLITE_TRANSIENT);
+  }else{
+    if( p1+p2>len ){
+      p2 = len-p1;
+      if( p2<0 ) p2 = 0;
+    }
+    sqlite3_result_blob(context, (char*)&z[p1], (int)p2, SQLITE_TRANSIENT);
+  }
+}
+
+/*
+** Implementation of the round() function
+*/
+#ifndef SQLITE_OMIT_FLOATING_POINT
+static void roundFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
+  int n = 0;
+  double r;
+  char *zBuf;
+  assert( argc==1 || argc==2 );
+  if( argc==2 ){
+    if( SQLITE_NULL==sqlite3_value_type(argv[1]) ) return;
+    n = sqlite3_value_int(argv[1]);
+    if( n>30 ) n = 30;
+    if( n<0 ) n = 0;
+  }
+  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
+  r = sqlite3_value_double(argv[0]);
+  /* If Y==0 and X will fit in a 64-bit int,
+  ** handle the rounding directly,
+  ** otherwise use printf.
+  */
+  if( n==0 && r>=0 && r<LARGEST_INT64-1 ){
+    r = (double)((sqlite_int64)(r+0.5));
+  }else if( n==0 && r<0 && (-r)<LARGEST_INT64-1 ){
+    r = -(double)((sqlite_int64)((-r)+0.5));
+  }else{
+    zBuf = sqlite3_mprintf("%.*f",n,r);
+    if( zBuf==0 ){
+      sqlite3_result_error_nomem(context);
+      return;
+    }
+    sqlite3AtoF(zBuf, &r, sqlite3Strlen30(zBuf), SQLITE_UTF8);
+    sqlite3_free(zBuf);
+  }
+  sqlite3_result_double(context, r);
+}
+#endif
+
+/*
+** Allocate nByte bytes of space using sqlite3_malloc(). If the
+** allocation fails, call sqlite3_result_error_nomem() to notify
+** the database handle that malloc() has failed and return NULL.
+** If nByte is larger than the maximum string or blob length, then
+** raise an SQLITE_TOOBIG exception and return NULL.
+*/
+static void *contextMalloc(sqlite3_context *context, i64 nByte){
+  char *z;
+  sqlite3 *db = sqlite3_context_db_handle(context);
+  assert( nByte>0 );
+  testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH] );
+  testcase( nByte==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
+  if( nByte>db->aLimit[SQLITE_LIMIT_LENGTH] ){
+    sqlite3_result_error_toobig(context);
+    z = 0;
+  }else{
+    z = sqlite3Malloc((int)nByte);
+    if( !z ){
+      sqlite3_result_error_nomem(context);
+    }
+  }
+  return z;
+}
+
+/*
+** Implementation of the upper() and lower() SQL functions.
+*/
+static void upperFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
+  char *z1;
+  const char *z2;
+  int i, n;
+  UNUSED_PARAMETER(argc);
+  z2 = (char*)sqlite3_value_text(argv[0]);
+  n = sqlite3_value_bytes(argv[0]);
+  /* Verify that the call to _bytes() does not invalidate the _text() pointer */
+  assert( z2==(char*)sqlite3_value_text(argv[0]) );
+  if( z2 ){
+    z1 = contextMalloc(context, ((i64)n)+1);
+    if( z1 ){
+      memcpy(z1, z2, n+1);
+      for(i=0; z1[i]; i++){
+        z1[i] = (char)sqlite3Toupper(z1[i]);
+      }
+      sqlite3_result_text(context, z1, -1, sqlite3_free);
+    }
+  }
+}
+static void lowerFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
+  u8 *z1;
+  const char *z2;
+  int i, n;
+  UNUSED_PARAMETER(argc);
+  z2 = (char*)sqlite3_value_text(argv[0]);
+  n = sqlite3_value_bytes(argv[0]);
+  /* Verify that the call to _bytes() does not invalidate the _text() pointer */
+  assert( z2==(char*)sqlite3_value_text(argv[0]) );
+  if( z2 ){
+    z1 = contextMalloc(context, ((i64)n)+1);
+    if( z1 ){
+      memcpy(z1, z2, n+1);
+      for(i=0; z1[i]; i++){
+        z1[i] = sqlite3Tolower(z1[i]);
+      }
+      sqlite3_result_text(context, (char *)z1, -1, sqlite3_free);
+    }
+  }
+}
+
+
+#if 0  /* This function is never used. */
+/*
+** The COALESCE() and IFNULL() functions used to be implemented as shown
+** here.  But now they are implemented as VDBE code so that unused arguments
+** do not have to be computed.  This legacy implementation is retained as
+** comment.
+*/
+/*
+** Implementation of the IFNULL(), NVL(), and COALESCE() functions.  
+** All three do the same thing.  They return the first non-NULL
+** argument.
+*/
+static void ifnullFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  int i;
+  for(i=0; i<argc; i++){
+    if( SQLITE_NULL!=sqlite3_value_type(argv[i]) ){
+      sqlite3_result_value(context, argv[i]);
+      break;
+    }
+  }
+}
+#endif /* NOT USED */
+#define ifnullFunc versionFunc   /* Substitute function - never called */
+
+/*
+** Implementation of random().  Return a random integer.  
+*/
+static void randomFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **NotUsed2
+){
+  sqlite_int64 r;
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  sqlite3_randomness(sizeof(r), &r);
+  if( r<0 ){
+    /* We need to prevent a random number of 0x8000000000000000 
+    ** (or -9223372036854775808) since when you do abs() of that
+    ** number of you get the same value back again.  To do this
+    ** in a way that is testable, mask the sign bit off of negative
+    ** values, resulting in a positive value.  Then take the 
+    ** 2s complement of that positive value.  The end result can
+    ** therefore be no less than -9223372036854775807.
+    */
+    r = -(r ^ (((sqlite3_int64)1)<<63));
+  }
+  sqlite3_result_int64(context, r);
+}
+
+/*
+** Implementation of randomblob(N).  Return a random blob
+** that is N bytes long.
+*/
+static void randomBlob(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  int n;
+  unsigned char *p;
+  assert( argc==1 );
+  UNUSED_PARAMETER(argc);
+  n = sqlite3_value_int(argv[0]);
+  if( n<1 ){
+    n = 1;
+  }
+  p = contextMalloc(context, n);
+  if( p ){
+    sqlite3_randomness(n, p);
+    sqlite3_result_blob(context, (char*)p, n, sqlite3_free);
+  }
+}
+
+/*
+** Implementation of the last_insert_rowid() SQL function.  The return
+** value is the same as the sqlite3_last_insert_rowid() API function.
+*/
+static void last_insert_rowid(
+  sqlite3_context *context, 
+  int NotUsed, 
+  sqlite3_value **NotUsed2
+){
+  sqlite3 *db = sqlite3_context_db_handle(context);
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  /* IMP: R-51513-12026 The last_insert_rowid() SQL function is a
+  ** wrapper around the sqlite3_last_insert_rowid() C/C++ interface
+  ** function. */
+  sqlite3_result_int64(context, sqlite3_last_insert_rowid(db));
+}
+
+/*
+** Implementation of the changes() SQL function.
+**
+** IMP: R-62073-11209 The changes() SQL function is a wrapper
+** around the sqlite3_changes() C/C++ function and hence follows the same
+** rules for counting changes.
+*/
+static void changes(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **NotUsed2
+){
+  sqlite3 *db = sqlite3_context_db_handle(context);
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  sqlite3_result_int(context, sqlite3_changes(db));
+}
+
+/*
+** Implementation of the total_changes() SQL function.  The return value is
+** the same as the sqlite3_total_changes() API function.
+*/
+static void total_changes(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **NotUsed2
+){
+  sqlite3 *db = sqlite3_context_db_handle(context);
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  /* IMP: R-52756-41993 This function is a wrapper around the
+  ** sqlite3_total_changes() C/C++ interface. */
+  sqlite3_result_int(context, sqlite3_total_changes(db));
+}
+
+/*
+** A structure defining how to do GLOB-style comparisons.
+*/
+struct compareInfo {
+  u8 matchAll;
+  u8 matchOne;
+  u8 matchSet;
+  u8 noCase;
+};
+
+/*
+** For LIKE and GLOB matching on EBCDIC machines, assume that every
+** character is exactly one byte in size.  Also, all characters are
+** able to participate in upper-case-to-lower-case mappings in EBCDIC
+** whereas only characters less than 0x80 do in ASCII.
+*/
+#if defined(SQLITE_EBCDIC)
+# define sqlite3Utf8Read(A,C)    (*(A++))
+# define GlogUpperToLower(A)     A = sqlite3UpperToLower[A]
+#else
+# define GlogUpperToLower(A)     if( A<0x80 ){ A = sqlite3UpperToLower[A]; }
+#endif
+
+static const struct compareInfo globInfo = { '*', '?', '[', 0 };
+/* The correct SQL-92 behavior is for the LIKE operator to ignore
+** case.  Thus  'a' LIKE 'A' would be true. */
+static const struct compareInfo likeInfoNorm = { '%', '_',   0, 1 };
+/* If SQLITE_CASE_SENSITIVE_LIKE is defined, then the LIKE operator
+** is case sensitive causing 'a' LIKE 'A' to be false */
+static const struct compareInfo likeInfoAlt = { '%', '_',   0, 0 };
+
+/*
+** Compare two UTF-8 strings for equality where the first string can
+** potentially be a "glob" expression.  Return true (1) if they
+** are the same and false (0) if they are different.
+**
+** Globbing rules:
+**
+**      '*'       Matches any sequence of zero or more characters.
+**
+**      '?'       Matches exactly one character.
+**
+**     [...]      Matches one character from the enclosed list of
+**                characters.
+**
+**     [^...]     Matches one character not in the enclosed list.
+**
+** With the [...] and [^...] matching, a ']' character can be included
+** in the list by making it the first character after '[' or '^'.  A
+** range of characters can be specified using '-'.  Example:
+** "[a-z]" matches any single lower-case letter.  To match a '-', make
+** it the last character in the list.
+**
+** This routine is usually quick, but can be N**2 in the worst case.
+**
+** Hints: to match '*' or '?', put them in "[]".  Like this:
+**
+**         abc[*]xyz        Matches "abc*xyz" only
+*/
+static int patternCompare(
+  const u8 *zPattern,              /* The glob pattern */
+  const u8 *zString,               /* The string to compare against the glob */
+  const struct compareInfo *pInfo, /* Information about how to do the compare */
+  const int esc                    /* The escape character */
+){
+  int c, c2;
+  int invert;
+  int seen;
+  u8 matchOne = pInfo->matchOne;
+  u8 matchAll = pInfo->matchAll;
+  u8 matchSet = pInfo->matchSet;
+  u8 noCase = pInfo->noCase; 
+  int prevEscape = 0;     /* True if the previous character was 'escape' */
+
+  while( (c = sqlite3Utf8Read(zPattern,&zPattern))!=0 ){
+    if( !prevEscape && c==matchAll ){
+      while( (c=sqlite3Utf8Read(zPattern,&zPattern)) == matchAll
+               || c == matchOne ){
+        if( c==matchOne && sqlite3Utf8Read(zString, &zString)==0 ){
+          return 0;
+        }
+      }
+      if( c==0 ){
+        return 1;
+      }else if( c==esc ){
+        c = sqlite3Utf8Read(zPattern, &zPattern);
+        if( c==0 ){
+          return 0;
+        }
+      }else if( c==matchSet ){
+        assert( esc==0 );         /* This is GLOB, not LIKE */
+        assert( matchSet<0x80 );  /* '[' is a single-byte character */
+        while( *zString && patternCompare(&zPattern[-1],zString,pInfo,esc)==0 ){
+          SQLITE_SKIP_UTF8(zString);
+        }
+        return *zString!=0;
+      }
+      while( (c2 = sqlite3Utf8Read(zString,&zString))!=0 ){
+        if( noCase ){
+          GlogUpperToLower(c2);
+          GlogUpperToLower(c);
+          while( c2 != 0 && c2 != c ){
+            c2 = sqlite3Utf8Read(zString, &zString);
+            GlogUpperToLower(c2);
+          }
+        }else{
+          while( c2 != 0 && c2 != c ){
+            c2 = sqlite3Utf8Read(zString, &zString);
+          }
+        }
+        if( c2==0 ) return 0;
+        if( patternCompare(zPattern,zString,pInfo,esc) ) return 1;
+      }
+      return 0;
+    }else if( !prevEscape && c==matchOne ){
+      if( sqlite3Utf8Read(zString, &zString)==0 ){
+        return 0;
+      }
+    }else if( c==matchSet ){
+      int prior_c = 0;
+      assert( esc==0 );    /* This only occurs for GLOB, not LIKE */
+      seen = 0;
+      invert = 0;
+      c = sqlite3Utf8Read(zString, &zString);
+      if( c==0 ) return 0;
+      c2 = sqlite3Utf8Read(zPattern, &zPattern);
+      if( c2=='^' ){
+        invert = 1;
+        c2 = sqlite3Utf8Read(zPattern, &zPattern);
+      }
+      if( c2==']' ){
+        if( c==']' ) seen = 1;
+        c2 = sqlite3Utf8Read(zPattern, &zPattern);
+      }
+      while( c2 && c2!=']' ){
+        if( c2=='-' && zPattern[0]!=']' && zPattern[0]!=0 && prior_c>0 ){
+          c2 = sqlite3Utf8Read(zPattern, &zPattern);
+          if( c>=prior_c && c<=c2 ) seen = 1;
+          prior_c = 0;
+        }else{
+          if( c==c2 ){
+            seen = 1;
+          }
+          prior_c = c2;
+        }
+        c2 = sqlite3Utf8Read(zPattern, &zPattern);
+      }
+      if( c2==0 || (seen ^ invert)==0 ){
+        return 0;
+      }
+    }else if( esc==c && !prevEscape ){
+      prevEscape = 1;
+    }else{
+      c2 = sqlite3Utf8Read(zString, &zString);
+      if( noCase ){
+        GlogUpperToLower(c);
+        GlogUpperToLower(c2);
+      }
+      if( c!=c2 ){
+        return 0;
+      }
+      prevEscape = 0;
+    }
+  }
+  return *zString==0;
+}
+
+/*
+** Count the number of times that the LIKE operator (or GLOB which is
+** just a variation of LIKE) gets called.  This is used for testing
+** only.
+*/
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_like_count = 0;
+#endif
+
+
+/*
+** Implementation of the like() SQL function.  This function implements
+** the build-in LIKE operator.  The first argument to the function is the
+** pattern and the second argument is the string.  So, the SQL statements:
+**
+**       A LIKE B
+**
+** is implemented as like(B,A).
+**
+** This same function (with a different compareInfo structure) computes
+** the GLOB operator.
+*/
+static void likeFunc(
+  sqlite3_context *context, 
+  int argc, 
+  sqlite3_value **argv
+){
+  const unsigned char *zA, *zB;
+  int escape = 0;
+  int nPat;
+  sqlite3 *db = sqlite3_context_db_handle(context);
+
+  zB = sqlite3_value_text(argv[0]);
+  zA = sqlite3_value_text(argv[1]);
+
+  /* Limit the length of the LIKE or GLOB pattern to avoid problems
+  ** of deep recursion and N*N behavior in patternCompare().
+  */
+  nPat = sqlite3_value_bytes(argv[0]);
+  testcase( nPat==db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH] );
+  testcase( nPat==db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]+1 );
+  if( nPat > db->aLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH] ){
+    sqlite3_result_error(context, "LIKE or GLOB pattern too complex", -1);
+    return;
+  }
+  assert( zB==sqlite3_value_text(argv[0]) );  /* Encoding did not change */
+
+  if( argc==3 ){
+    /* The escape character string must consist of a single UTF-8 character.
+    ** Otherwise, return an error.
+    */
+    const unsigned char *zEsc = sqlite3_value_text(argv[2]);
+    if( zEsc==0 ) return;
+    if( sqlite3Utf8CharLen((char*)zEsc, -1)!=1 ){
+      sqlite3_result_error(context, 
+          "ESCAPE expression must be a single character", -1);
+      return;
+    }
+    escape = sqlite3Utf8Read(zEsc, &zEsc);
+  }
+  if( zA && zB ){
+    struct compareInfo *pInfo = sqlite3_user_data(context);
+#ifdef SQLITE_TEST
+    sqlite3_like_count++;
+#endif
+    
+    sqlite3_result_int(context, patternCompare(zB, zA, pInfo, escape));
+  }
+}
+
+/*
+** Implementation of the NULLIF(x,y) function.  The result is the first
+** argument if the arguments are different.  The result is NULL if the
+** arguments are equal to each other.
+*/
+static void nullifFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **argv
+){
+  CollSeq *pColl = sqlite3GetFuncCollSeq(context);
+  UNUSED_PARAMETER(NotUsed);
+  if( sqlite3MemCompare(argv[0], argv[1], pColl)!=0 ){
+    sqlite3_result_value(context, argv[0]);
+  }
+}
+
+/*
+** Implementation of the sqlite_version() function.  The result is the version
+** of the SQLite library that is running.
+*/
+static void versionFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **NotUsed2
+){
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  /* IMP: R-48699-48617 This function is an SQL wrapper around the
+  ** sqlite3_libversion() C-interface. */
+  sqlite3_result_text(context, sqlite3_libversion(), -1, SQLITE_STATIC);
+}
+
+/*
+** Implementation of the sqlite_source_id() function. The result is a string
+** that identifies the particular version of the source code used to build
+** SQLite.
+*/
+static void sourceidFunc(
+  sqlite3_context *context,
+  int NotUsed,
+  sqlite3_value **NotUsed2
+){
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  /* IMP: R-24470-31136 This function is an SQL wrapper around the
+  ** sqlite3_sourceid() C interface. */
+  sqlite3_result_text(context, sqlite3_sourceid(), -1, SQLITE_STATIC);
+}
+
+/*
+** Implementation of the sqlite_compileoption_used() function.
+** The result is an integer that identifies if the compiler option
+** was used to build SQLite.
+*/
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+static void compileoptionusedFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  const char *zOptName;
+  assert( argc==1 );
+  UNUSED_PARAMETER(argc);
+  /* IMP: R-39564-36305 The sqlite_compileoption_used() SQL
+  ** function is a wrapper around the sqlite3_compileoption_used() C/C++
+  ** function.
+  */
+  if( (zOptName = (const char*)sqlite3_value_text(argv[0]))!=0 ){
+    sqlite3_result_int(context, sqlite3_compileoption_used(zOptName));
+  }
+}
+#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
+
+/*
+** Implementation of the sqlite_compileoption_get() function. 
+** The result is a string that identifies the compiler options 
+** used to build SQLite.
+*/
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+static void compileoptiongetFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  int n;
+  assert( argc==1 );
+  UNUSED_PARAMETER(argc);
+  /* IMP: R-04922-24076 The sqlite_compileoption_get() SQL function
+  ** is a wrapper around the sqlite3_compileoption_get() C/C++ function.
+  */
+  n = sqlite3_value_int(argv[0]);
+  sqlite3_result_text(context, sqlite3_compileoption_get(n), -1, SQLITE_STATIC);
+}
+#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
+
+/* Array for converting from half-bytes (nybbles) into ASCII hex
+** digits. */
+static const char hexdigits[] = {
+  '0', '1', '2', '3', '4', '5', '6', '7',
+  '8', '9', 'A', 'B', 'C', 'D', 'E', 'F' 
+};
+
+/*
+** EXPERIMENTAL - This is not an official function.  The interface may
+** change.  This function may disappear.  Do not write code that depends
+** on this function.
+**
+** Implementation of the QUOTE() function.  This function takes a single
+** argument.  If the argument is numeric, the return value is the same as
+** the argument.  If the argument is NULL, the return value is the string
+** "NULL".  Otherwise, the argument is enclosed in single quotes with
+** single-quote escapes.
+*/
+static void quoteFunc(sqlite3_context *context, int argc, sqlite3_value **argv){
+  assert( argc==1 );
+  UNUSED_PARAMETER(argc);
+  switch( sqlite3_value_type(argv[0]) ){
+    case SQLITE_INTEGER:
+    case SQLITE_FLOAT: {
+      sqlite3_result_value(context, argv[0]);
+      break;
+    }
+    case SQLITE_BLOB: {
+      char *zText = 0;
+      char const *zBlob = sqlite3_value_blob(argv[0]);
+      int nBlob = sqlite3_value_bytes(argv[0]);
+      assert( zBlob==sqlite3_value_blob(argv[0]) ); /* No encoding change */
+      zText = (char *)contextMalloc(context, (2*(i64)nBlob)+4); 
+      if( zText ){
+        int i;
+        for(i=0; i<nBlob; i++){
+          zText[(i*2)+2] = hexdigits[(zBlob[i]>>4)&0x0F];
+          zText[(i*2)+3] = hexdigits[(zBlob[i])&0x0F];
+        }
+        zText[(nBlob*2)+2] = '\'';
+        zText[(nBlob*2)+3] = '\0';
+        zText[0] = 'X';
+        zText[1] = '\'';
+        sqlite3_result_text(context, zText, -1, SQLITE_TRANSIENT);
+        sqlite3_free(zText);
+      }
+      break;
+    }
+    case SQLITE_TEXT: {
+      int i,j;
+      u64 n;
+      const unsigned char *zArg = sqlite3_value_text(argv[0]);
+      char *z;
+
+      if( zArg==0 ) return;
+      for(i=0, n=0; zArg[i]; i++){ if( zArg[i]=='\'' ) n++; }
+      z = contextMalloc(context, ((i64)i)+((i64)n)+3);
+      if( z ){
+        z[0] = '\'';
+        for(i=0, j=1; zArg[i]; i++){
+          z[j++] = zArg[i];
+          if( zArg[i]=='\'' ){
+            z[j++] = '\'';
+          }
+        }
+        z[j++] = '\'';
+        z[j] = 0;
+        sqlite3_result_text(context, z, j, sqlite3_free);
+      }
+      break;
+    }
+    default: {
+      assert( sqlite3_value_type(argv[0])==SQLITE_NULL );
+      sqlite3_result_text(context, "NULL", 4, SQLITE_STATIC);
+      break;
+    }
+  }
+}
+
+/*
+** The hex() function.  Interpret the argument as a blob.  Return
+** a hexadecimal rendering as text.
+*/
+static void hexFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  int i, n;
+  const unsigned char *pBlob;
+  char *zHex, *z;
+  assert( argc==1 );
+  UNUSED_PARAMETER(argc);
+  pBlob = sqlite3_value_blob(argv[0]);
+  n = sqlite3_value_bytes(argv[0]);
+  assert( pBlob==sqlite3_value_blob(argv[0]) );  /* No encoding change */
+  z = zHex = contextMalloc(context, ((i64)n)*2 + 1);
+  if( zHex ){
+    for(i=0; i<n; i++, pBlob++){
+      unsigned char c = *pBlob;
+      *(z++) = hexdigits[(c>>4)&0xf];
+      *(z++) = hexdigits[c&0xf];
+    }
+    *z = 0;
+    sqlite3_result_text(context, zHex, n*2, sqlite3_free);
+  }
+}
+
+/*
+** The zeroblob(N) function returns a zero-filled blob of size N bytes.
+*/
+static void zeroblobFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  i64 n;
+  sqlite3 *db = sqlite3_context_db_handle(context);
+  assert( argc==1 );
+  UNUSED_PARAMETER(argc);
+  n = sqlite3_value_int64(argv[0]);
+  testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH] );
+  testcase( n==db->aLimit[SQLITE_LIMIT_LENGTH]+1 );
+  if( n>db->aLimit[SQLITE_LIMIT_LENGTH] ){
+    sqlite3_result_error_toobig(context);
+  }else{
+    sqlite3_result_zeroblob(context, (int)n); /* IMP: R-00293-64994 */
+  }
+}
+
+/*
+** The replace() function.  Three arguments are all strings: call
+** them A, B, and C. The result is also a string which is derived
+** from A by replacing every occurance of B with C.  The match
+** must be exact.  Collating sequences are not used.
+*/
+static void replaceFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  const unsigned char *zStr;        /* The input string A */
+  const unsigned char *zPattern;    /* The pattern string B */
+  const unsigned char *zRep;        /* The replacement string C */
+  unsigned char *zOut;              /* The output */
+  int nStr;                /* Size of zStr */
+  int nPattern;            /* Size of zPattern */
+  int nRep;                /* Size of zRep */
+  i64 nOut;                /* Maximum size of zOut */
+  int loopLimit;           /* Last zStr[] that might match zPattern[] */
+  int i, j;                /* Loop counters */
+
+  assert( argc==3 );
+  UNUSED_PARAMETER(argc);
+  zStr = sqlite3_value_text(argv[0]);
+  if( zStr==0 ) return;
+  nStr = sqlite3_value_bytes(argv[0]);
+  assert( zStr==sqlite3_value_text(argv[0]) );  /* No encoding change */
+  zPattern = sqlite3_value_text(argv[1]);
+  if( zPattern==0 ){
+    assert( sqlite3_value_type(argv[1])==SQLITE_NULL
+            || sqlite3_context_db_handle(context)->mallocFailed );
+    return;
+  }
+  if( zPattern[0]==0 ){
+    assert( sqlite3_value_type(argv[1])!=SQLITE_NULL );
+    sqlite3_result_value(context, argv[0]);
+    return;
+  }
+  nPattern = sqlite3_value_bytes(argv[1]);
+  assert( zPattern==sqlite3_value_text(argv[1]) );  /* No encoding change */
+  zRep = sqlite3_value_text(argv[2]);
+  if( zRep==0 ) return;
+  nRep = sqlite3_value_bytes(argv[2]);
+  assert( zRep==sqlite3_value_text(argv[2]) );
+  nOut = nStr + 1;
+  assert( nOut<SQLITE_MAX_LENGTH );
+  zOut = contextMalloc(context, (i64)nOut);
+  if( zOut==0 ){
+    return;
+  }
+  loopLimit = nStr - nPattern;  
+  for(i=j=0; i<=loopLimit; i++){
+    if( zStr[i]!=zPattern[0] || memcmp(&zStr[i], zPattern, nPattern) ){
+      zOut[j++] = zStr[i];
+    }else{
+      u8 *zOld;
+      sqlite3 *db = sqlite3_context_db_handle(context);
+      nOut += nRep - nPattern;
+      testcase( nOut-1==db->aLimit[SQLITE_LIMIT_LENGTH] );
+      testcase( nOut-2==db->aLimit[SQLITE_LIMIT_LENGTH] );
+      if( nOut-1>db->aLimit[SQLITE_LIMIT_LENGTH] ){
+        sqlite3_result_error_toobig(context);
+        sqlite3_free(zOut);
+        return;
+      }
+      zOld = zOut;
+      zOut = sqlite3_realloc(zOut, (int)nOut);
+      if( zOut==0 ){
+        sqlite3_result_error_nomem(context);
+        sqlite3_free(zOld);
+        return;
+      }
+      memcpy(&zOut[j], zRep, nRep);
+      j += nRep;
+      i += nPattern-1;
+    }
+  }
+  assert( j+nStr-i+1==nOut );
+  memcpy(&zOut[j], &zStr[i], nStr-i);
+  j += nStr - i;
+  assert( j<=nOut );
+  zOut[j] = 0;
+  sqlite3_result_text(context, (char*)zOut, j, sqlite3_free);
+}
+
+/*
+** Implementation of the TRIM(), LTRIM(), and RTRIM() functions.
+** The userdata is 0x1 for left trim, 0x2 for right trim, 0x3 for both.
+*/
+static void trimFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  const unsigned char *zIn;         /* Input string */
+  const unsigned char *zCharSet;    /* Set of characters to trim */
+  int nIn;                          /* Number of bytes in input */
+  int flags;                        /* 1: trimleft  2: trimright  3: trim */
+  int i;                            /* Loop counter */
+  unsigned char *aLen = 0;          /* Length of each character in zCharSet */
+  unsigned char **azChar = 0;       /* Individual characters in zCharSet */
+  int nChar;                        /* Number of characters in zCharSet */
+
+  if( sqlite3_value_type(argv[0])==SQLITE_NULL ){
+    return;
+  }
+  zIn = sqlite3_value_text(argv[0]);
+  if( zIn==0 ) return;
+  nIn = sqlite3_value_bytes(argv[0]);
+  assert( zIn==sqlite3_value_text(argv[0]) );
+  if( argc==1 ){
+    static const unsigned char lenOne[] = { 1 };
+    static unsigned char * const azOne[] = { (u8*)" " };
+    nChar = 1;
+    aLen = (u8*)lenOne;
+    azChar = (unsigned char **)azOne;
+    zCharSet = 0;
+  }else if( (zCharSet = sqlite3_value_text(argv[1]))==0 ){
+    return;
+  }else{
+    const unsigned char *z;
+    for(z=zCharSet, nChar=0; *z; nChar++){
+      SQLITE_SKIP_UTF8(z);
+    }
+    if( nChar>0 ){
+      azChar = contextMalloc(context, ((i64)nChar)*(sizeof(char*)+1));
+      if( azChar==0 ){
+        return;
+      }
+      aLen = (unsigned char*)&azChar[nChar];
+      for(z=zCharSet, nChar=0; *z; nChar++){
+        azChar[nChar] = (unsigned char *)z;
+        SQLITE_SKIP_UTF8(z);
+        aLen[nChar] = (u8)(z - azChar[nChar]);
+      }
+    }
+  }
+  if( nChar>0 ){
+    flags = SQLITE_PTR_TO_INT(sqlite3_user_data(context));
+    if( flags & 1 ){
+      while( nIn>0 ){
+        int len = 0;
+        for(i=0; i<nChar; i++){
+          len = aLen[i];
+          if( len<=nIn && memcmp(zIn, azChar[i], len)==0 ) break;
+        }
+        if( i>=nChar ) break;
+        zIn += len;
+        nIn -= len;
+      }
+    }
+    if( flags & 2 ){
+      while( nIn>0 ){
+        int len = 0;
+        for(i=0; i<nChar; i++){
+          len = aLen[i];
+          if( len<=nIn && memcmp(&zIn[nIn-len],azChar[i],len)==0 ) break;
+        }
+        if( i>=nChar ) break;
+        nIn -= len;
+      }
+    }
+    if( zCharSet ){
+      sqlite3_free(azChar);
+    }
+  }
+  sqlite3_result_text(context, (char*)zIn, nIn, SQLITE_TRANSIENT);
+}
+
+
+/* IMP: R-25361-16150 This function is omitted from SQLite by default. It
+** is only available if the SQLITE_SOUNDEX compile-time option is used
+** when SQLite is built.
+*/
+#ifdef SQLITE_SOUNDEX
+/*
+** Compute the soundex encoding of a word.
+**
+** IMP: R-59782-00072 The soundex(X) function returns a string that is the
+** soundex encoding of the string X. 
+*/
+static void soundexFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  char zResult[8];
+  const u8 *zIn;
+  int i, j;
+  static const unsigned char iCode[] = {
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+    0, 0, 1, 2, 3, 0, 1, 2, 0, 0, 2, 2, 4, 5, 5, 0,
+    1, 2, 6, 2, 3, 0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0,
+    0, 0, 1, 2, 3, 0, 1, 2, 0, 0, 2, 2, 4, 5, 5, 0,
+    1, 2, 6, 2, 3, 0, 1, 0, 2, 0, 2, 0, 0, 0, 0, 0,
+  };
+  assert( argc==1 );
+  zIn = (u8*)sqlite3_value_text(argv[0]);
+  if( zIn==0 ) zIn = (u8*)"";
+  for(i=0; zIn[i] && !sqlite3Isalpha(zIn[i]); i++){}
+  if( zIn[i] ){
+    u8 prevcode = iCode[zIn[i]&0x7f];
+    zResult[0] = sqlite3Toupper(zIn[i]);
+    for(j=1; j<4 && zIn[i]; i++){
+      int code = iCode[zIn[i]&0x7f];
+      if( code>0 ){
+        if( code!=prevcode ){
+          prevcode = code;
+          zResult[j++] = code + '0';
+        }
+      }else{
+        prevcode = 0;
+      }
+    }
+    while( j<4 ){
+      zResult[j++] = '0';
+    }
+    zResult[j] = 0;
+    sqlite3_result_text(context, zResult, 4, SQLITE_TRANSIENT);
+  }else{
+    /* IMP: R-64894-50321 The string "?000" is returned if the argument
+    ** is NULL or contains no ASCII alphabetic characters. */
+    sqlite3_result_text(context, "?000", 4, SQLITE_STATIC);
+  }
+}
+#endif /* SQLITE_SOUNDEX */
+
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
+/*
+** A function that loads a shared-library extension then returns NULL.
+*/
+static void loadExt(sqlite3_context *context, int argc, sqlite3_value **argv){
+  const char *zFile = (const char *)sqlite3_value_text(argv[0]);
+  const char *zProc;
+  sqlite3 *db = sqlite3_context_db_handle(context);
+  char *zErrMsg = 0;
+
+  if( argc==2 ){
+    zProc = (const char *)sqlite3_value_text(argv[1]);
+  }else{
+    zProc = 0;
+  }
+  if( zFile && sqlite3_load_extension(db, zFile, zProc, &zErrMsg) ){
+    sqlite3_result_error(context, zErrMsg, -1);
+    sqlite3_free(zErrMsg);
+  }
+}
+#endif
+
+
+/*
+** An instance of the following structure holds the context of a
+** sum() or avg() aggregate computation.
+*/
+typedef struct SumCtx SumCtx;
+struct SumCtx {
+  double rSum;      /* Floating point sum */
+  i64 iSum;         /* Integer sum */   
+  i64 cnt;          /* Number of elements summed */
+  u8 overflow;      /* True if integer overflow seen */
+  u8 approx;        /* True if non-integer value was input to the sum */
+};
+
+/*
+** Routines used to compute the sum, average, and total.
+**
+** The SUM() function follows the (broken) SQL standard which means
+** that it returns NULL if it sums over no inputs.  TOTAL returns
+** 0.0 in that case.  In addition, TOTAL always returns a float where
+** SUM might return an integer if it never encounters a floating point
+** value.  TOTAL never fails, but SUM might through an exception if
+** it overflows an integer.
+*/
+static void sumStep(sqlite3_context *context, int argc, sqlite3_value **argv){
+  SumCtx *p;
+  int type;
+  assert( argc==1 );
+  UNUSED_PARAMETER(argc);
+  p = sqlite3_aggregate_context(context, sizeof(*p));
+  type = sqlite3_value_numeric_type(argv[0]);
+  if( p && type!=SQLITE_NULL ){
+    p->cnt++;
+    if( type==SQLITE_INTEGER ){
+      i64 v = sqlite3_value_int64(argv[0]);
+      p->rSum += v;
+      if( (p->approx|p->overflow)==0 && sqlite3AddInt64(&p->iSum, v) ){
+        p->overflow = 1;
+      }
+    }else{
+      p->rSum += sqlite3_value_double(argv[0]);
+      p->approx = 1;
+    }
+  }
+}
+static void sumFinalize(sqlite3_context *context){
+  SumCtx *p;
+  p = sqlite3_aggregate_context(context, 0);
+  if( p && p->cnt>0 ){
+    if( p->overflow ){
+      sqlite3_result_error(context,"integer overflow",-1);
+    }else if( p->approx ){
+      sqlite3_result_double(context, p->rSum);
+    }else{
+      sqlite3_result_int64(context, p->iSum);
+    }
+  }
+}
+static void avgFinalize(sqlite3_context *context){
+  SumCtx *p;
+  p = sqlite3_aggregate_context(context, 0);
+  if( p && p->cnt>0 ){
+    sqlite3_result_double(context, p->rSum/(double)p->cnt);
+  }
+}
+static void totalFinalize(sqlite3_context *context){
+  SumCtx *p;
+  p = sqlite3_aggregate_context(context, 0);
+  /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
+  sqlite3_result_double(context, p ? p->rSum : (double)0);
+}
+
+/*
+** The following structure keeps track of state information for the
+** count() aggregate function.
+*/
+typedef struct CountCtx CountCtx;
+struct CountCtx {
+  i64 n;
+};
+
+/*
+** Routines to implement the count() aggregate function.
+*/
+static void countStep(sqlite3_context *context, int argc, sqlite3_value **argv){
+  CountCtx *p;
+  p = sqlite3_aggregate_context(context, sizeof(*p));
+  if( (argc==0 || SQLITE_NULL!=sqlite3_value_type(argv[0])) && p ){
+    p->n++;
+  }
+
+#ifndef SQLITE_OMIT_DEPRECATED
+  /* The sqlite3_aggregate_count() function is deprecated.  But just to make
+  ** sure it still operates correctly, verify that its count agrees with our 
+  ** internal count when using count(*) and when the total count can be
+  ** expressed as a 32-bit integer. */
+  assert( argc==1 || p==0 || p->n>0x7fffffff
+          || p->n==sqlite3_aggregate_count(context) );
+#endif
+}   
+static void countFinalize(sqlite3_context *context){
+  CountCtx *p;
+  p = sqlite3_aggregate_context(context, 0);
+  sqlite3_result_int64(context, p ? p->n : 0);
+}
+
+/*
+** Routines to implement min() and max() aggregate functions.
+*/
+static void minmaxStep(
+  sqlite3_context *context, 
+  int NotUsed, 
+  sqlite3_value **argv
+){
+  Mem *pArg  = (Mem *)argv[0];
+  Mem *pBest;
+  UNUSED_PARAMETER(NotUsed);
+
+  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
+  pBest = (Mem *)sqlite3_aggregate_context(context, sizeof(*pBest));
+  if( !pBest ) return;
+
+  if( pBest->flags ){
+    int max;
+    int cmp;
+    CollSeq *pColl = sqlite3GetFuncCollSeq(context);
+    /* This step function is used for both the min() and max() aggregates,
+    ** the only difference between the two being that the sense of the
+    ** comparison is inverted. For the max() aggregate, the
+    ** sqlite3_user_data() function returns (void *)-1. For min() it
+    ** returns (void *)db, where db is the sqlite3* database pointer.
+    ** Therefore the next statement sets variable 'max' to 1 for the max()
+    ** aggregate, or 0 for min().
+    */
+    max = sqlite3_user_data(context)!=0;
+    cmp = sqlite3MemCompare(pBest, pArg, pColl);
+    if( (max && cmp<0) || (!max && cmp>0) ){
+      sqlite3VdbeMemCopy(pBest, pArg);
+    }
+  }else{
+    sqlite3VdbeMemCopy(pBest, pArg);
+  }
+}
+static void minMaxFinalize(sqlite3_context *context){
+  sqlite3_value *pRes;
+  pRes = (sqlite3_value *)sqlite3_aggregate_context(context, 0);
+  if( pRes ){
+    if( ALWAYS(pRes->flags) ){
+      sqlite3_result_value(context, pRes);
+    }
+    sqlite3VdbeMemRelease(pRes);
+  }
+}
+
+/*
+** group_concat(EXPR, ?SEPARATOR?)
+*/
+static void groupConcatStep(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  const char *zVal;
+  StrAccum *pAccum;
+  const char *zSep;
+  int nVal, nSep;
+  assert( argc==1 || argc==2 );
+  if( sqlite3_value_type(argv[0])==SQLITE_NULL ) return;
+  pAccum = (StrAccum*)sqlite3_aggregate_context(context, sizeof(*pAccum));
+
+  if( pAccum ){
+    sqlite3 *db = sqlite3_context_db_handle(context);
+    int firstTerm = pAccum->useMalloc==0;
+    pAccum->useMalloc = 2;
+    pAccum->mxAlloc = db->aLimit[SQLITE_LIMIT_LENGTH];
+    if( !firstTerm ){
+      if( argc==2 ){
+        zSep = (char*)sqlite3_value_text(argv[1]);
+        nSep = sqlite3_value_bytes(argv[1]);
+      }else{
+        zSep = ",";
+        nSep = 1;
+      }
+      sqlite3StrAccumAppend(pAccum, zSep, nSep);
+    }
+    zVal = (char*)sqlite3_value_text(argv[0]);
+    nVal = sqlite3_value_bytes(argv[0]);
+    sqlite3StrAccumAppend(pAccum, zVal, nVal);
+  }
+}
+static void groupConcatFinalize(sqlite3_context *context){
+  StrAccum *pAccum;
+  pAccum = sqlite3_aggregate_context(context, 0);
+  if( pAccum ){
+    if( pAccum->tooBig ){
+      sqlite3_result_error_toobig(context);
+    }else if( pAccum->mallocFailed ){
+      sqlite3_result_error_nomem(context);
+    }else{    
+      sqlite3_result_text(context, sqlite3StrAccumFinish(pAccum), -1, 
+                          sqlite3_free);
+    }
+  }
+}
+
+/*
+** This routine does per-connection function registration.  Most
+** of the built-in functions above are part of the global function set.
+** This routine only deals with those that are not global.
+*/
+SQLITE_PRIVATE void sqlite3RegisterBuiltinFunctions(sqlite3 *db){
+  int rc = sqlite3_overload_function(db, "MATCH", 2);
+  assert( rc==SQLITE_NOMEM || rc==SQLITE_OK );
+  if( rc==SQLITE_NOMEM ){
+    db->mallocFailed = 1;
+  }
+}
+
+/*
+** Set the LIKEOPT flag on the 2-argument function with the given name.
+*/
+static void setLikeOptFlag(sqlite3 *db, const char *zName, u8 flagVal){
+  FuncDef *pDef;
+  pDef = sqlite3FindFunction(db, zName, sqlite3Strlen30(zName),
+                             2, SQLITE_UTF8, 0);
+  if( ALWAYS(pDef) ){
+    pDef->flags = flagVal;
+  }
+}
+
+/*
+** Register the built-in LIKE and GLOB functions.  The caseSensitive
+** parameter determines whether or not the LIKE operator is case
+** sensitive.  GLOB is always case sensitive.
+*/
+SQLITE_PRIVATE void sqlite3RegisterLikeFunctions(sqlite3 *db, int caseSensitive){
+  struct compareInfo *pInfo;
+  if( caseSensitive ){
+    pInfo = (struct compareInfo*)&likeInfoAlt;
+  }else{
+    pInfo = (struct compareInfo*)&likeInfoNorm;
+  }
+  sqlite3CreateFunc(db, "like", 2, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0);
+  sqlite3CreateFunc(db, "like", 3, SQLITE_UTF8, pInfo, likeFunc, 0, 0, 0);
+  sqlite3CreateFunc(db, "glob", 2, SQLITE_UTF8, 
+      (struct compareInfo*)&globInfo, likeFunc, 0, 0, 0);
+  setLikeOptFlag(db, "glob", SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE);
+  setLikeOptFlag(db, "like", 
+      caseSensitive ? (SQLITE_FUNC_LIKE | SQLITE_FUNC_CASE) : SQLITE_FUNC_LIKE);
+}
+
+/*
+** pExpr points to an expression which implements a function.  If
+** it is appropriate to apply the LIKE optimization to that function
+** then set aWc[0] through aWc[2] to the wildcard characters and
+** return TRUE.  If the function is not a LIKE-style function then
+** return FALSE.
+*/
+SQLITE_PRIVATE int sqlite3IsLikeFunction(sqlite3 *db, Expr *pExpr, int *pIsNocase, char *aWc){
+  FuncDef *pDef;
+  if( pExpr->op!=TK_FUNCTION 
+   || !pExpr->x.pList 
+   || pExpr->x.pList->nExpr!=2
+  ){
+    return 0;
+  }
+  assert( !ExprHasProperty(pExpr, EP_xIsSelect) );
+  pDef = sqlite3FindFunction(db, pExpr->u.zToken, 
+                             sqlite3Strlen30(pExpr->u.zToken),
+                             2, SQLITE_UTF8, 0);
+  if( NEVER(pDef==0) || (pDef->flags & SQLITE_FUNC_LIKE)==0 ){
+    return 0;
+  }
+
+  /* The memcpy() statement assumes that the wildcard characters are
+  ** the first three statements in the compareInfo structure.  The
+  ** asserts() that follow verify that assumption
+  */
+  memcpy(aWc, pDef->pUserData, 3);
+  assert( (char*)&likeInfoAlt == (char*)&likeInfoAlt.matchAll );
+  assert( &((char*)&likeInfoAlt)[1] == (char*)&likeInfoAlt.matchOne );
+  assert( &((char*)&likeInfoAlt)[2] == (char*)&likeInfoAlt.matchSet );
+  *pIsNocase = (pDef->flags & SQLITE_FUNC_CASE)==0;
+  return 1;
+}
+
+/*
+** All all of the FuncDef structures in the aBuiltinFunc[] array above
+** to the global function hash table.  This occurs at start-time (as
+** a consequence of calling sqlite3_initialize()).
+**
+** After this routine runs
+*/
+SQLITE_PRIVATE void sqlite3RegisterGlobalFunctions(void){
+  /*
+  ** The following array holds FuncDef structures for all of the functions
+  ** defined in this file.
+  **
+  ** The array cannot be constant since changes are made to the
+  ** FuncDef.pHash elements at start-time.  The elements of this array
+  ** are read-only after initialization is complete.
+  */
+  static SQLITE_WSD FuncDef aBuiltinFunc[] = {
+    FUNCTION(ltrim,              1, 1, 0, trimFunc         ),
+    FUNCTION(ltrim,              2, 1, 0, trimFunc         ),
+    FUNCTION(rtrim,              1, 2, 0, trimFunc         ),
+    FUNCTION(rtrim,              2, 2, 0, trimFunc         ),
+    FUNCTION(trim,               1, 3, 0, trimFunc         ),
+    FUNCTION(trim,               2, 3, 0, trimFunc         ),
+    FUNCTION(min,               -1, 0, 1, minmaxFunc       ),
+    FUNCTION(min,                0, 0, 1, 0                ),
+    AGGREGATE(min,               1, 0, 1, minmaxStep,      minMaxFinalize ),
+    FUNCTION(max,               -1, 1, 1, minmaxFunc       ),
+    FUNCTION(max,                0, 1, 1, 0                ),
+    AGGREGATE(max,               1, 1, 1, minmaxStep,      minMaxFinalize ),
+    FUNCTION(typeof,             1, 0, 0, typeofFunc       ),
+    FUNCTION(length,             1, 0, 0, lengthFunc       ),
+    FUNCTION(substr,             2, 0, 0, substrFunc       ),
+    FUNCTION(substr,             3, 0, 0, substrFunc       ),
+    FUNCTION(abs,                1, 0, 0, absFunc          ),
+#ifndef SQLITE_OMIT_FLOATING_POINT
+    FUNCTION(round,              1, 0, 0, roundFunc        ),
+    FUNCTION(round,              2, 0, 0, roundFunc        ),
+#endif
+    FUNCTION(upper,              1, 0, 0, upperFunc        ),
+    FUNCTION(lower,              1, 0, 0, lowerFunc        ),
+    FUNCTION(coalesce,           1, 0, 0, 0                ),
+    FUNCTION(coalesce,           0, 0, 0, 0                ),
+/*  FUNCTION(coalesce,          -1, 0, 0, ifnullFunc       ), */
+    {-1,SQLITE_UTF8,SQLITE_FUNC_COALESCE,0,0,ifnullFunc,0,0,"coalesce",0,0},
+    FUNCTION(hex,                1, 0, 0, hexFunc          ),
+/*  FUNCTION(ifnull,             2, 0, 0, ifnullFunc       ), */
+    {2,SQLITE_UTF8,SQLITE_FUNC_COALESCE,0,0,ifnullFunc,0,0,"ifnull",0,0},
+    FUNCTION(random,             0, 0, 0, randomFunc       ),
+    FUNCTION(randomblob,         1, 0, 0, randomBlob       ),
+    FUNCTION(nullif,             2, 0, 1, nullifFunc       ),
+    FUNCTION(sqlite_version,     0, 0, 0, versionFunc      ),
+    FUNCTION(sqlite_source_id,   0, 0, 0, sourceidFunc     ),
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+    FUNCTION(sqlite_compileoption_used,1, 0, 0, compileoptionusedFunc  ),
+    FUNCTION(sqlite_compileoption_get, 1, 0, 0, compileoptiongetFunc  ),
+#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
+    FUNCTION(quote,              1, 0, 0, quoteFunc        ),
+    FUNCTION(last_insert_rowid,  0, 0, 0, last_insert_rowid),
+    FUNCTION(changes,            0, 0, 0, changes          ),
+    FUNCTION(total_changes,      0, 0, 0, total_changes    ),
+    FUNCTION(replace,            3, 0, 0, replaceFunc      ),
+    FUNCTION(zeroblob,           1, 0, 0, zeroblobFunc     ),
+  #ifdef SQLITE_SOUNDEX
+    FUNCTION(soundex,            1, 0, 0, soundexFunc      ),
+  #endif
+  #ifndef SQLITE_OMIT_LOAD_EXTENSION
+    FUNCTION(load_extension,     1, 0, 0, loadExt          ),
+    FUNCTION(load_extension,     2, 0, 0, loadExt          ),
+  #endif
+    AGGREGATE(sum,               1, 0, 0, sumStep,         sumFinalize    ),
+    AGGREGATE(total,             1, 0, 0, sumStep,         totalFinalize    ),
+    AGGREGATE(avg,               1, 0, 0, sumStep,         avgFinalize    ),
+ /* AGGREGATE(count,             0, 0, 0, countStep,       countFinalize  ), */
+    {0,SQLITE_UTF8,SQLITE_FUNC_COUNT,0,0,0,countStep,countFinalize,"count",0,0},
+    AGGREGATE(count,             1, 0, 0, countStep,       countFinalize  ),
+    AGGREGATE(group_concat,      1, 0, 0, groupConcatStep, groupConcatFinalize),
+    AGGREGATE(group_concat,      2, 0, 0, groupConcatStep, groupConcatFinalize),
+  
+    LIKEFUNC(glob, 2, &globInfo, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),
+  #ifdef SQLITE_CASE_SENSITIVE_LIKE
+    LIKEFUNC(like, 2, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),
+    LIKEFUNC(like, 3, &likeInfoAlt, SQLITE_FUNC_LIKE|SQLITE_FUNC_CASE),
+  #else
+    LIKEFUNC(like, 2, &likeInfoNorm, SQLITE_FUNC_LIKE),
+    LIKEFUNC(like, 3, &likeInfoNorm, SQLITE_FUNC_LIKE),
+  #endif
+  };
+
+  int i;
+  FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
+  FuncDef *aFunc = (FuncDef*)&GLOBAL(FuncDef, aBuiltinFunc);
+
+  for(i=0; i<ArraySize(aBuiltinFunc); i++){
+    sqlite3FuncDefInsert(pHash, &aFunc[i]);
+  }
+  sqlite3RegisterDateTimeFunctions();
+#ifndef SQLITE_OMIT_ALTERTABLE
+  sqlite3AlterFunctions();
+#endif
+}
+
+/************** End of func.c ************************************************/
+/************** Begin file fkey.c ********************************************/
+/*
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains code used by the compiler to add foreign key
+** support to compiled SQL statements.
+*/
+
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+#ifndef SQLITE_OMIT_TRIGGER
+
+/*
+** Deferred and Immediate FKs
+** --------------------------
+**
+** Foreign keys in SQLite come in two flavours: deferred and immediate.
+** If an immediate foreign key constraint is violated, SQLITE_CONSTRAINT
+** is returned and the current statement transaction rolled back. If a 
+** deferred foreign key constraint is violated, no action is taken 
+** immediately. However if the application attempts to commit the 
+** transaction before fixing the constraint violation, the attempt fails.
+**
+** Deferred constraints are implemented using a simple counter associated
+** with the database handle. The counter is set to zero each time a 
+** database transaction is opened. Each time a statement is executed 
+** that causes a foreign key violation, the counter is incremented. Each
+** time a statement is executed that removes an existing violation from
+** the database, the counter is decremented. When the transaction is
+** committed, the commit fails if the current value of the counter is
+** greater than zero. This scheme has two big drawbacks:
+**
+**   * When a commit fails due to a deferred foreign key constraint, 
+**     there is no way to tell which foreign constraint is not satisfied,
+**     or which row it is not satisfied for.
+**
+**   * If the database contains foreign key violations when the 
+**     transaction is opened, this may cause the mechanism to malfunction.
+**
+** Despite these problems, this approach is adopted as it seems simpler
+** than the alternatives.
+**
+** INSERT operations:
+**
+**   I.1) For each FK for which the table is the child table, search
+**        the parent table for a match. If none is found increment the
+**        constraint counter.
+**
+**   I.2) For each FK for which the table is the parent table, 
+**        search the child table for rows that correspond to the new
+**        row in the parent table. Decrement the counter for each row
+**        found (as the constraint is now satisfied).
+**
+** DELETE operations:
+**
+**   D.1) For each FK for which the table is the child table, 
+**        search the parent table for a row that corresponds to the 
+**        deleted row in the child table. If such a row is not found, 
+**        decrement the counter.
+**
+**   D.2) For each FK for which the table is the parent table, search 
+**        the child table for rows that correspond to the deleted row 
+**        in the parent table. For each found increment the counter.
+**
+** UPDATE operations:
+**
+**   An UPDATE command requires that all 4 steps above are taken, but only
+**   for FK constraints for which the affected columns are actually 
+**   modified (values must be compared at runtime).
+**
+** Note that I.1 and D.1 are very similar operations, as are I.2 and D.2.
+** This simplifies the implementation a bit.
+**
+** For the purposes of immediate FK constraints, the OR REPLACE conflict
+** resolution is considered to delete rows before the new row is inserted.
+** If a delete caused by OR REPLACE violates an FK constraint, an exception
+** is thrown, even if the FK constraint would be satisfied after the new 
+** row is inserted.
+**
+** Immediate constraints are usually handled similarly. The only difference 
+** is that the counter used is stored as part of each individual statement
+** object (struct Vdbe). If, after the statement has run, its immediate
+** constraint counter is greater than zero, it returns SQLITE_CONSTRAINT
+** and the statement transaction is rolled back. An exception is an INSERT
+** statement that inserts a single row only (no triggers). In this case,
+** instead of using a counter, an exception is thrown immediately if the
+** INSERT violates a foreign key constraint. This is necessary as such
+** an INSERT does not open a statement transaction.
+**
+** TODO: How should dropping a table be handled? How should renaming a 
+** table be handled?
+**
+**
+** Query API Notes
+** ---------------
+**
+** Before coding an UPDATE or DELETE row operation, the code-generator
+** for those two operations needs to know whether or not the operation
+** requires any FK processing and, if so, which columns of the original
+** row are required by the FK processing VDBE code (i.e. if FKs were
+** implemented using triggers, which of the old.* columns would be 
+** accessed). No information is required by the code-generator before
+** coding an INSERT operation. The functions used by the UPDATE/DELETE
+** generation code to query for this information are:
+**
+**   sqlite3FkRequired() - Test to see if FK processing is required.
+**   sqlite3FkOldmask()  - Query for the set of required old.* columns.
+**
+**
+** Externally accessible module functions
+** --------------------------------------
+**
+**   sqlite3FkCheck()    - Check for foreign key violations.
+**   sqlite3FkActions()  - Code triggers for ON UPDATE/ON DELETE actions.
+**   sqlite3FkDelete()   - Delete an FKey structure.
+*/
+
+/*
+** VDBE Calling Convention
+** -----------------------
+**
+** Example:
+**
+**   For the following INSERT statement:
+**
+**     CREATE TABLE t1(a, b INTEGER PRIMARY KEY, c);
+**     INSERT INTO t1 VALUES(1, 2, 3.1);
+**
+**   Register (x):        2    (type integer)
+**   Register (x+1):      1    (type integer)
+**   Register (x+2):      NULL (type NULL)
+**   Register (x+3):      3.1  (type real)
+*/
+
+/*
+** A foreign key constraint requires that the key columns in the parent
+** table are collectively subject to a UNIQUE or PRIMARY KEY constraint.
+** Given that pParent is the parent table for foreign key constraint pFKey, 
+** search the schema a unique index on the parent key columns. 
+**
+** If successful, zero is returned. If the parent key is an INTEGER PRIMARY 
+** KEY column, then output variable *ppIdx is set to NULL. Otherwise, *ppIdx 
+** is set to point to the unique index. 
+** 
+** If the parent key consists of a single column (the foreign key constraint
+** is not a composite foreign key), output variable *paiCol is set to NULL.
+** Otherwise, it is set to point to an allocated array of size N, where
+** N is the number of columns in the parent key. The first element of the
+** array is the index of the child table column that is mapped by the FK
+** constraint to the parent table column stored in the left-most column
+** of index *ppIdx. The second element of the array is the index of the
+** child table column that corresponds to the second left-most column of
+** *ppIdx, and so on.
+**
+** If the required index cannot be found, either because:
+**
+**   1) The named parent key columns do not exist, or
+**
+**   2) The named parent key columns do exist, but are not subject to a
+**      UNIQUE or PRIMARY KEY constraint, or
+**
+**   3) No parent key columns were provided explicitly as part of the
+**      foreign key definition, and the parent table does not have a
+**      PRIMARY KEY, or
+**
+**   4) No parent key columns were provided explicitly as part of the
+**      foreign key definition, and the PRIMARY KEY of the parent table 
+**      consists of a a different number of columns to the child key in 
+**      the child table.
+**
+** then non-zero is returned, and a "foreign key mismatch" error loaded
+** into pParse. If an OOM error occurs, non-zero is returned and the
+** pParse->db->mallocFailed flag is set.
+*/
+static int locateFkeyIndex(
+  Parse *pParse,                  /* Parse context to store any error in */
+  Table *pParent,                 /* Parent table of FK constraint pFKey */
+  FKey *pFKey,                    /* Foreign key to find index for */
+  Index **ppIdx,                  /* OUT: Unique index on parent table */
+  int **paiCol                    /* OUT: Map of index columns in pFKey */
+){
+  Index *pIdx = 0;                    /* Value to return via *ppIdx */
+  int *aiCol = 0;                     /* Value to return via *paiCol */
+  int nCol = pFKey->nCol;             /* Number of columns in parent key */
+  char *zKey = pFKey->aCol[0].zCol;   /* Name of left-most parent key column */
+
+  /* The caller is responsible for zeroing output parameters. */
+  assert( ppIdx && *ppIdx==0 );
+  assert( !paiCol || *paiCol==0 );
+  assert( pParse );
+
+  /* If this is a non-composite (single column) foreign key, check if it 
+  ** maps to the INTEGER PRIMARY KEY of table pParent. If so, leave *ppIdx 
+  ** and *paiCol set to zero and return early. 
+  **
+  ** Otherwise, for a composite foreign key (more than one column), allocate
+  ** space for the aiCol array (returned via output parameter *paiCol).
+  ** Non-composite foreign keys do not require the aiCol array.
+  */
+  if( nCol==1 ){
+    /* The FK maps to the IPK if any of the following are true:
+    **
+    **   1) There is an INTEGER PRIMARY KEY column and the FK is implicitly 
+    **      mapped to the primary key of table pParent, or
+    **   2) The FK is explicitly mapped to a column declared as INTEGER
+    **      PRIMARY KEY.
+    */
+    if( pParent->iPKey>=0 ){
+      if( !zKey ) return 0;
+      if( !sqlite3StrICmp(pParent->aCol[pParent->iPKey].zName, zKey) ) return 0;
+    }
+  }else if( paiCol ){
+    assert( nCol>1 );
+    aiCol = (int *)sqlite3DbMallocRaw(pParse->db, nCol*sizeof(int));
+    if( !aiCol ) return 1;
+    *paiCol = aiCol;
+  }
+
+  for(pIdx=pParent->pIndex; pIdx; pIdx=pIdx->pNext){
+    if( pIdx->nColumn==nCol && pIdx->onError!=OE_None ){ 
+      /* pIdx is a UNIQUE index (or a PRIMARY KEY) and has the right number
+      ** of columns. If each indexed column corresponds to a foreign key
+      ** column of pFKey, then this index is a winner.  */
+
+      if( zKey==0 ){
+        /* If zKey is NULL, then this foreign key is implicitly mapped to 
+        ** the PRIMARY KEY of table pParent. The PRIMARY KEY index may be 
+        ** identified by the test (Index.autoIndex==2).  */
+        if( pIdx->autoIndex==2 ){
+          if( aiCol ){
+            int i;
+            for(i=0; i<nCol; i++) aiCol[i] = pFKey->aCol[i].iFrom;
+          }
+          break;
+        }
+      }else{
+        /* If zKey is non-NULL, then this foreign key was declared to
+        ** map to an explicit list of columns in table pParent. Check if this
+        ** index matches those columns. Also, check that the index uses
+        ** the default collation sequences for each column. */
+        int i, j;
+        for(i=0; i<nCol; i++){
+          int iCol = pIdx->aiColumn[i];     /* Index of column in parent tbl */
+          char *zDfltColl;                  /* Def. collation for column */
+          char *zIdxCol;                    /* Name of indexed column */
+
+          /* If the index uses a collation sequence that is different from
+          ** the default collation sequence for the column, this index is
+          ** unusable. Bail out early in this case.  */
+          zDfltColl = pParent->aCol[iCol].zColl;
+          if( !zDfltColl ){
+            zDfltColl = "BINARY";
+          }
+          if( sqlite3StrICmp(pIdx->azColl[i], zDfltColl) ) break;
+
+          zIdxCol = pParent->aCol[iCol].zName;
+          for(j=0; j<nCol; j++){
+            if( sqlite3StrICmp(pFKey->aCol[j].zCol, zIdxCol)==0 ){
+              if( aiCol ) aiCol[i] = pFKey->aCol[j].iFrom;
+              break;
+            }
+          }
+          if( j==nCol ) break;
+        }
+        if( i==nCol ) break;      /* pIdx is usable */
+      }
+    }
+  }
+
+  if( !pIdx ){
+    if( !pParse->disableTriggers ){
+      sqlite3ErrorMsg(pParse, "foreign key mismatch");
+    }
+    sqlite3DbFree(pParse->db, aiCol);
+    return 1;
+  }
+
+  *ppIdx = pIdx;
+  return 0;
+}
+
+/*
+** This function is called when a row is inserted into or deleted from the 
+** child table of foreign key constraint pFKey. If an SQL UPDATE is executed 
+** on the child table of pFKey, this function is invoked twice for each row
+** affected - once to "delete" the old row, and then again to "insert" the
+** new row.
+**
+** Each time it is called, this function generates VDBE code to locate the
+** row in the parent table that corresponds to the row being inserted into 
+** or deleted from the child table. If the parent row can be found, no 
+** special action is taken. Otherwise, if the parent row can *not* be
+** found in the parent table:
+**
+**   Operation | FK type   | Action taken
+**   --------------------------------------------------------------------------
+**   INSERT      immediate   Increment the "immediate constraint counter".
+**
+**   DELETE      immediate   Decrement the "immediate constraint counter".
+**
+**   INSERT      deferred    Increment the "deferred constraint counter".
+**
+**   DELETE      deferred    Decrement the "deferred constraint counter".
+**
+** These operations are identified in the comment at the top of this file 
+** (fkey.c) as "I.1" and "D.1".
+*/
+static void fkLookupParent(
+  Parse *pParse,        /* Parse context */
+  int iDb,              /* Index of database housing pTab */
+  Table *pTab,          /* Parent table of FK pFKey */
+  Index *pIdx,          /* Unique index on parent key columns in pTab */
+  FKey *pFKey,          /* Foreign key constraint */
+  int *aiCol,           /* Map from parent key columns to child table columns */
+  int regData,          /* Address of array containing child table row */
+  int nIncr,            /* Increment constraint counter by this */
+  int isIgnore          /* If true, pretend pTab contains all NULL values */
+){
+  int i;                                    /* Iterator variable */
+  Vdbe *v = sqlite3GetVdbe(pParse);         /* Vdbe to add code to */
+  int iCur = pParse->nTab - 1;              /* Cursor number to use */
+  int iOk = sqlite3VdbeMakeLabel(v);        /* jump here if parent key found */
+
+  /* If nIncr is less than zero, then check at runtime if there are any
+  ** outstanding constraints to resolve. If there are not, there is no need
+  ** to check if deleting this row resolves any outstanding violations.
+  **
+  ** Check if any of the key columns in the child table row are NULL. If 
+  ** any are, then the constraint is considered satisfied. No need to 
+  ** search for a matching row in the parent table.  */
+  if( nIncr<0 ){
+    sqlite3VdbeAddOp2(v, OP_FkIfZero, pFKey->isDeferred, iOk);
+  }
+  for(i=0; i<pFKey->nCol; i++){
+    int iReg = aiCol[i] + regData + 1;
+    sqlite3VdbeAddOp2(v, OP_IsNull, iReg, iOk);
+  }
+
+  if( isIgnore==0 ){
+    if( pIdx==0 ){
+      /* If pIdx is NULL, then the parent key is the INTEGER PRIMARY KEY
+      ** column of the parent table (table pTab).  */
+      int iMustBeInt;               /* Address of MustBeInt instruction */
+      int regTemp = sqlite3GetTempReg(pParse);
+  
+      /* Invoke MustBeInt to coerce the child key value to an integer (i.e. 
+      ** apply the affinity of the parent key). If this fails, then there
+      ** is no matching parent key. Before using MustBeInt, make a copy of
+      ** the value. Otherwise, the value inserted into the child key column
+      ** will have INTEGER affinity applied to it, which may not be correct.  */
+      sqlite3VdbeAddOp2(v, OP_SCopy, aiCol[0]+1+regData, regTemp);
+      iMustBeInt = sqlite3VdbeAddOp2(v, OP_MustBeInt, regTemp, 0);
+  
+      /* If the parent table is the same as the child table, and we are about
+      ** to increment the constraint-counter (i.e. this is an INSERT operation),
+      ** then check if the row being inserted matches itself. If so, do not
+      ** increment the constraint-counter.  */
+      if( pTab==pFKey->pFrom && nIncr==1 ){
+        sqlite3VdbeAddOp3(v, OP_Eq, regData, iOk, regTemp);
+      }
+  
+      sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenRead);
+      sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, regTemp);
+      sqlite3VdbeAddOp2(v, OP_Goto, 0, iOk);
+      sqlite3VdbeJumpHere(v, sqlite3VdbeCurrentAddr(v)-2);
+      sqlite3VdbeJumpHere(v, iMustBeInt);
+      sqlite3ReleaseTempReg(pParse, regTemp);
+    }else{
+      int nCol = pFKey->nCol;
+      int regTemp = sqlite3GetTempRange(pParse, nCol);
+      int regRec = sqlite3GetTempReg(pParse);
+      KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
+  
+      sqlite3VdbeAddOp3(v, OP_OpenRead, iCur, pIdx->tnum, iDb);
+      sqlite3VdbeChangeP4(v, -1, (char*)pKey, P4_KEYINFO_HANDOFF);
+      for(i=0; i<nCol; i++){
+        sqlite3VdbeAddOp2(v, OP_Copy, aiCol[i]+1+regData, regTemp+i);
+      }
+  
+      /* If the parent table is the same as the child table, and we are about
+      ** to increment the constraint-counter (i.e. this is an INSERT operation),
+      ** then check if the row being inserted matches itself. If so, do not
+      ** increment the constraint-counter.  */
+      if( pTab==pFKey->pFrom && nIncr==1 ){
+        int iJump = sqlite3VdbeCurrentAddr(v) + nCol + 1;
+        for(i=0; i<nCol; i++){
+          int iChild = aiCol[i]+1+regData;
+          int iParent = pIdx->aiColumn[i]+1+regData;
+          sqlite3VdbeAddOp3(v, OP_Ne, iChild, iJump, iParent);
+        }
+        sqlite3VdbeAddOp2(v, OP_Goto, 0, iOk);
+      }
+  
+      sqlite3VdbeAddOp3(v, OP_MakeRecord, regTemp, nCol, regRec);
+      sqlite3VdbeChangeP4(v, -1, sqlite3IndexAffinityStr(v,pIdx), P4_TRANSIENT);
+      sqlite3VdbeAddOp4Int(v, OP_Found, iCur, iOk, regRec, 0);
+  
+      sqlite3ReleaseTempReg(pParse, regRec);
+      sqlite3ReleaseTempRange(pParse, regTemp, nCol);
+    }
+  }
+
+  if( !pFKey->isDeferred && !pParse->pToplevel && !pParse->isMultiWrite ){
+    /* Special case: If this is an INSERT statement that will insert exactly
+    ** one row into the table, raise a constraint immediately instead of
+    ** incrementing a counter. This is necessary as the VM code is being
+    ** generated for will not open a statement transaction.  */
+    assert( nIncr==1 );
+    sqlite3HaltConstraint(
+        pParse, OE_Abort, "foreign key constraint failed", P4_STATIC
+    );
+  }else{
+    if( nIncr>0 && pFKey->isDeferred==0 ){
+      sqlite3ParseToplevel(pParse)->mayAbort = 1;
+    }
+    sqlite3VdbeAddOp2(v, OP_FkCounter, pFKey->isDeferred, nIncr);
+  }
+
+  sqlite3VdbeResolveLabel(v, iOk);
+  sqlite3VdbeAddOp1(v, OP_Close, iCur);
+}
+
+/*
+** This function is called to generate code executed when a row is deleted
+** from the parent table of foreign key constraint pFKey and, if pFKey is 
+** deferred, when a row is inserted into the same table. When generating
+** code for an SQL UPDATE operation, this function may be called twice -
+** once to "delete" the old row and once to "insert" the new row.
+**
+** The code generated by this function scans through the rows in the child
+** table that correspond to the parent table row being deleted or inserted.
+** For each child row found, one of the following actions is taken:
+**
+**   Operation | FK type   | Action taken
+**   --------------------------------------------------------------------------
+**   DELETE      immediate   Increment the "immediate constraint counter".
+**                           Or, if the ON (UPDATE|DELETE) action is RESTRICT,
+**                           throw a "foreign key constraint failed" exception.
+**
+**   INSERT      immediate   Decrement the "immediate constraint counter".
+**
+**   DELETE      deferred    Increment the "deferred constraint counter".
+**                           Or, if the ON (UPDATE|DELETE) action is RESTRICT,
+**                           throw a "foreign key constraint failed" exception.
+**
+**   INSERT      deferred    Decrement the "deferred constraint counter".
+**
+** These operations are identified in the comment at the top of this file 
+** (fkey.c) as "I.2" and "D.2".
+*/
+static void fkScanChildren(
+  Parse *pParse,                  /* Parse context */
+  SrcList *pSrc,                  /* SrcList containing the table to scan */
+  Table *pTab,
+  Index *pIdx,                    /* Foreign key index */
+  FKey *pFKey,                    /* Foreign key relationship */
+  int *aiCol,                     /* Map from pIdx cols to child table cols */
+  int regData,                    /* Referenced table data starts here */
+  int nIncr                       /* Amount to increment deferred counter by */
+){
+  sqlite3 *db = pParse->db;       /* Database handle */
+  int i;                          /* Iterator variable */
+  Expr *pWhere = 0;               /* WHERE clause to scan with */
+  NameContext sNameContext;       /* Context used to resolve WHERE clause */
+  WhereInfo *pWInfo;              /* Context used by sqlite3WhereXXX() */
+  int iFkIfZero = 0;              /* Address of OP_FkIfZero */
+  Vdbe *v = sqlite3GetVdbe(pParse);
+
+  assert( !pIdx || pIdx->pTable==pTab );
+
+  if( nIncr<0 ){
+    iFkIfZero = sqlite3VdbeAddOp2(v, OP_FkIfZero, pFKey->isDeferred, 0);
+  }
+
+  /* Create an Expr object representing an SQL expression like:
+  **
+  **   <parent-key1> = <child-key1> AND <parent-key2> = <child-key2> ...
+  **
+  ** The collation sequence used for the comparison should be that of
+  ** the parent key columns. The affinity of the parent key column should
+  ** be applied to each child key value before the comparison takes place.
+  */
+  for(i=0; i<pFKey->nCol; i++){
+    Expr *pLeft;                  /* Value from parent table row */
+    Expr *pRight;                 /* Column ref to child table */
+    Expr *pEq;                    /* Expression (pLeft = pRight) */
+    int iCol;                     /* Index of column in child table */ 
+    const char *zCol;             /* Name of column in child table */
+
+    pLeft = sqlite3Expr(db, TK_REGISTER, 0);
+    if( pLeft ){
+      /* Set the collation sequence and affinity of the LHS of each TK_EQ
+      ** expression to the parent key column defaults.  */
+      if( pIdx ){
+        Column *pCol;
+        iCol = pIdx->aiColumn[i];
+        pCol = &pTab->aCol[iCol];
+        if( pTab->iPKey==iCol ) iCol = -1;
+        pLeft->iTable = regData+iCol+1;
+        pLeft->affinity = pCol->affinity;
+        pLeft->pColl = sqlite3LocateCollSeq(pParse, pCol->zColl);
+      }else{
+        pLeft->iTable = regData;
+        pLeft->affinity = SQLITE_AFF_INTEGER;
+      }
+    }
+    iCol = aiCol ? aiCol[i] : pFKey->aCol[0].iFrom;
+    assert( iCol>=0 );
+    zCol = pFKey->pFrom->aCol[iCol].zName;
+    pRight = sqlite3Expr(db, TK_ID, zCol);
+    pEq = sqlite3PExpr(pParse, TK_EQ, pLeft, pRight, 0);
+    pWhere = sqlite3ExprAnd(db, pWhere, pEq);
+  }
+
+  /* If the child table is the same as the parent table, and this scan
+  ** is taking place as part of a DELETE operation (operation D.2), omit the
+  ** row being deleted from the scan by adding ($rowid != rowid) to the WHERE 
+  ** clause, where $rowid is the rowid of the row being deleted.  */
+  if( pTab==pFKey->pFrom && nIncr>0 ){
+    Expr *pEq;                    /* Expression (pLeft = pRight) */
+    Expr *pLeft;                  /* Value from parent table row */
+    Expr *pRight;                 /* Column ref to child table */
+    pLeft = sqlite3Expr(db, TK_REGISTER, 0);
+    pRight = sqlite3Expr(db, TK_COLUMN, 0);
+    if( pLeft && pRight ){
+      pLeft->iTable = regData;
+      pLeft->affinity = SQLITE_AFF_INTEGER;
+      pRight->iTable = pSrc->a[0].iCursor;
+      pRight->iColumn = -1;
+    }
+    pEq = sqlite3PExpr(pParse, TK_NE, pLeft, pRight, 0);
+    pWhere = sqlite3ExprAnd(db, pWhere, pEq);
+  }
+
+  /* Resolve the references in the WHERE clause. */
+  memset(&sNameContext, 0, sizeof(NameContext));
+  sNameContext.pSrcList = pSrc;
+  sNameContext.pParse = pParse;
+  sqlite3ResolveExprNames(&sNameContext, pWhere);
+
+  /* Create VDBE to loop through the entries in pSrc that match the WHERE
+  ** clause. If the constraint is not deferred, throw an exception for
+  ** each row found. Otherwise, for deferred constraints, increment the
+  ** deferred constraint counter by nIncr for each row selected.  */
+  pWInfo = sqlite3WhereBegin(pParse, pSrc, pWhere, 0, 0);
+  if( nIncr>0 && pFKey->isDeferred==0 ){
+    sqlite3ParseToplevel(pParse)->mayAbort = 1;
+  }
+  sqlite3VdbeAddOp2(v, OP_FkCounter, pFKey->isDeferred, nIncr);
+  if( pWInfo ){
+    sqlite3WhereEnd(pWInfo);
+  }
+
+  /* Clean up the WHERE clause constructed above. */
+  sqlite3ExprDelete(db, pWhere);
+  if( iFkIfZero ){
+    sqlite3VdbeJumpHere(v, iFkIfZero);
+  }
+}
+
+/*
+** This function returns a pointer to the head of a linked list of FK
+** constraints for which table pTab is the parent table. For example,
+** given the following schema:
+**
+**   CREATE TABLE t1(a PRIMARY KEY);
+**   CREATE TABLE t2(b REFERENCES t1(a);
+**
+** Calling this function with table "t1" as an argument returns a pointer
+** to the FKey structure representing the foreign key constraint on table
+** "t2". Calling this function with "t2" as the argument would return a
+** NULL pointer (as there are no FK constraints for which t2 is the parent
+** table).
+*/
+SQLITE_PRIVATE FKey *sqlite3FkReferences(Table *pTab){
+  int nName = sqlite3Strlen30(pTab->zName);
+  return (FKey *)sqlite3HashFind(&pTab->pSchema->fkeyHash, pTab->zName, nName);
+}
+
+/*
+** The second argument is a Trigger structure allocated by the 
+** fkActionTrigger() routine. This function deletes the Trigger structure
+** and all of its sub-components.
+**
+** The Trigger structure or any of its sub-components may be allocated from
+** the lookaside buffer belonging to database handle dbMem.
+*/
+static void fkTriggerDelete(sqlite3 *dbMem, Trigger *p){
+  if( p ){
+    TriggerStep *pStep = p->step_list;
+    sqlite3ExprDelete(dbMem, pStep->pWhere);
+    sqlite3ExprListDelete(dbMem, pStep->pExprList);
+    sqlite3SelectDelete(dbMem, pStep->pSelect);
+    sqlite3ExprDelete(dbMem, p->pWhen);
+    sqlite3DbFree(dbMem, p);
+  }
+}
+
+/*
+** This function is called to generate code that runs when table pTab is
+** being dropped from the database. The SrcList passed as the second argument
+** to this function contains a single entry guaranteed to resolve to
+** table pTab.
+**
+** Normally, no code is required. However, if either
+**
+**   (a) The table is the parent table of a FK constraint, or
+**   (b) The table is the child table of a deferred FK constraint and it is
+**       determined at runtime that there are outstanding deferred FK 
+**       constraint violations in the database,
+**
+** then the equivalent of "DELETE FROM <tbl>" is executed before dropping
+** the table from the database. Triggers are disabled while running this
+** DELETE, but foreign key actions are not.
+*/
+SQLITE_PRIVATE void sqlite3FkDropTable(Parse *pParse, SrcList *pName, Table *pTab){
+  sqlite3 *db = pParse->db;
+  if( (db->flags&SQLITE_ForeignKeys) && !IsVirtual(pTab) && !pTab->pSelect ){
+    int iSkip = 0;
+    Vdbe *v = sqlite3GetVdbe(pParse);
+
+    assert( v );                  /* VDBE has already been allocated */
+    if( sqlite3FkReferences(pTab)==0 ){
+      /* Search for a deferred foreign key constraint for which this table
+      ** is the child table. If one cannot be found, return without 
+      ** generating any VDBE code. If one can be found, then jump over
+      ** the entire DELETE if there are no outstanding deferred constraints
+      ** when this statement is run.  */
+      FKey *p;
+      for(p=pTab->pFKey; p; p=p->pNextFrom){
+        if( p->isDeferred ) break;
+      }
+      if( !p ) return;
+      iSkip = sqlite3VdbeMakeLabel(v);
+      sqlite3VdbeAddOp2(v, OP_FkIfZero, 1, iSkip);
+    }
+
+    pParse->disableTriggers = 1;
+    sqlite3DeleteFrom(pParse, sqlite3SrcListDup(db, pName, 0), 0);
+    pParse->disableTriggers = 0;
+
+    /* If the DELETE has generated immediate foreign key constraint 
+    ** violations, halt the VDBE and return an error at this point, before
+    ** any modifications to the schema are made. This is because statement
+    ** transactions are not able to rollback schema changes.  */
+    sqlite3VdbeAddOp2(v, OP_FkIfZero, 0, sqlite3VdbeCurrentAddr(v)+2);
+    sqlite3HaltConstraint(
+        pParse, OE_Abort, "foreign key constraint failed", P4_STATIC
+    );
+
+    if( iSkip ){
+      sqlite3VdbeResolveLabel(v, iSkip);
+    }
+  }
+}
+
+/*
+** This function is called when inserting, deleting or updating a row of
+** table pTab to generate VDBE code to perform foreign key constraint 
+** processing for the operation.
+**
+** For a DELETE operation, parameter regOld is passed the index of the
+** first register in an array of (pTab->nCol+1) registers containing the
+** rowid of the row being deleted, followed by each of the column values
+** of the row being deleted, from left to right. Parameter regNew is passed
+** zero in this case.
+**
+** For an INSERT operation, regOld is passed zero and regNew is passed the
+** first register of an array of (pTab->nCol+1) registers containing the new
+** row data.
+**
+** For an UPDATE operation, this function is called twice. Once before
+** the original record is deleted from the table using the calling convention
+** described for DELETE. Then again after the original record is deleted
+** but before the new record is inserted using the INSERT convention. 
+*/
+SQLITE_PRIVATE void sqlite3FkCheck(
+  Parse *pParse,                  /* Parse context */
+  Table *pTab,                    /* Row is being deleted from this table */ 
+  int regOld,                     /* Previous row data is stored here */
+  int regNew                      /* New row data is stored here */
+){
+  sqlite3 *db = pParse->db;       /* Database handle */
+  FKey *pFKey;                    /* Used to iterate through FKs */
+  int iDb;                        /* Index of database containing pTab */
+  const char *zDb;                /* Name of database containing pTab */
+  int isIgnoreErrors = pParse->disableTriggers;
+
+  /* Exactly one of regOld and regNew should be non-zero. */
+  assert( (regOld==0)!=(regNew==0) );
+
+  /* If foreign-keys are disabled, this function is a no-op. */
+  if( (db->flags&SQLITE_ForeignKeys)==0 ) return;
+
+  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+  zDb = db->aDb[iDb].zName;
+
+  /* Loop through all the foreign key constraints for which pTab is the
+  ** child table (the table that the foreign key definition is part of).  */
+  for(pFKey=pTab->pFKey; pFKey; pFKey=pFKey->pNextFrom){
+    Table *pTo;                   /* Parent table of foreign key pFKey */
+    Index *pIdx = 0;              /* Index on key columns in pTo */
+    int *aiFree = 0;
+    int *aiCol;
+    int iCol;
+    int i;
+    int isIgnore = 0;
+
+    /* Find the parent table of this foreign key. Also find a unique index 
+    ** on the parent key columns in the parent table. If either of these 
+    ** schema items cannot be located, set an error in pParse and return 
+    ** early.  */
+    if( pParse->disableTriggers ){
+      pTo = sqlite3FindTable(db, pFKey->zTo, zDb);
+    }else{
+      pTo = sqlite3LocateTable(pParse, 0, pFKey->zTo, zDb);
+    }
+    if( !pTo || locateFkeyIndex(pParse, pTo, pFKey, &pIdx, &aiFree) ){
+      if( !isIgnoreErrors || db->mallocFailed ) return;
+      continue;
+    }
+    assert( pFKey->nCol==1 || (aiFree && pIdx) );
+
+    if( aiFree ){
+      aiCol = aiFree;
+    }else{
+      iCol = pFKey->aCol[0].iFrom;
+      aiCol = &iCol;
+    }
+    for(i=0; i<pFKey->nCol; i++){
+      if( aiCol[i]==pTab->iPKey ){
+        aiCol[i] = -1;
+      }
+#ifndef SQLITE_OMIT_AUTHORIZATION
+      /* Request permission to read the parent key columns. If the 
+      ** authorization callback returns SQLITE_IGNORE, behave as if any
+      ** values read from the parent table are NULL. */
+      if( db->xAuth ){
+        int rcauth;
+        char *zCol = pTo->aCol[pIdx ? pIdx->aiColumn[i] : pTo->iPKey].zName;
+        rcauth = sqlite3AuthReadCol(pParse, pTo->zName, zCol, iDb);
+        isIgnore = (rcauth==SQLITE_IGNORE);
+      }
+#endif
+    }
+
+    /* Take a shared-cache advisory read-lock on the parent table. Allocate 
+    ** a cursor to use to search the unique index on the parent key columns 
+    ** in the parent table.  */
+    sqlite3TableLock(pParse, iDb, pTo->tnum, 0, pTo->zName);
+    pParse->nTab++;
+
+    if( regOld!=0 ){
+      /* A row is being removed from the child table. Search for the parent.
+      ** If the parent does not exist, removing the child row resolves an 
+      ** outstanding foreign key constraint violation. */
+      fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regOld, -1,isIgnore);
+    }
+    if( regNew!=0 ){
+      /* A row is being added to the child table. If a parent row cannot
+      ** be found, adding the child row has violated the FK constraint. */ 
+      fkLookupParent(pParse, iDb, pTo, pIdx, pFKey, aiCol, regNew, +1,isIgnore);
+    }
+
+    sqlite3DbFree(db, aiFree);
+  }
+
+  /* Loop through all the foreign key constraints that refer to this table */
+  for(pFKey = sqlite3FkReferences(pTab); pFKey; pFKey=pFKey->pNextTo){
+    Index *pIdx = 0;              /* Foreign key index for pFKey */
+    SrcList *pSrc;
+    int *aiCol = 0;
+
+    if( !pFKey->isDeferred && !pParse->pToplevel && !pParse->isMultiWrite ){
+      assert( regOld==0 && regNew!=0 );
+      /* Inserting a single row into a parent table cannot cause an immediate
+      ** foreign key violation. So do nothing in this case.  */
+      continue;
+    }
+
+    if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ){
+      if( !isIgnoreErrors || db->mallocFailed ) return;
+      continue;
+    }
+    assert( aiCol || pFKey->nCol==1 );
+
+    /* Create a SrcList structure containing a single table (the table 
+    ** the foreign key that refers to this table is attached to). This
+    ** is required for the sqlite3WhereXXX() interface.  */
+    pSrc = sqlite3SrcListAppend(db, 0, 0, 0);
+    if( pSrc ){
+      struct SrcList_item *pItem = pSrc->a;
+      pItem->pTab = pFKey->pFrom;
+      pItem->zName = pFKey->pFrom->zName;
+      pItem->pTab->nRef++;
+      pItem->iCursor = pParse->nTab++;
+  
+      if( regNew!=0 ){
+        fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regNew, -1);
+      }
+      if( regOld!=0 ){
+        /* If there is a RESTRICT action configured for the current operation
+        ** on the parent table of this FK, then throw an exception 
+        ** immediately if the FK constraint is violated, even if this is a
+        ** deferred trigger. That's what RESTRICT means. To defer checking
+        ** the constraint, the FK should specify NO ACTION (represented
+        ** using OE_None). NO ACTION is the default.  */
+        fkScanChildren(pParse, pSrc, pTab, pIdx, pFKey, aiCol, regOld, 1);
+      }
+      pItem->zName = 0;
+      sqlite3SrcListDelete(db, pSrc);
+    }
+    sqlite3DbFree(db, aiCol);
+  }
+}
+
+#define COLUMN_MASK(x) (((x)>31) ? 0xffffffff : ((u32)1<<(x)))
+
+/*
+** This function is called before generating code to update or delete a 
+** row contained in table pTab.
+*/
+SQLITE_PRIVATE u32 sqlite3FkOldmask(
+  Parse *pParse,                  /* Parse context */
+  Table *pTab                     /* Table being modified */
+){
+  u32 mask = 0;
+  if( pParse->db->flags&SQLITE_ForeignKeys ){
+    FKey *p;
+    int i;
+    for(p=pTab->pFKey; p; p=p->pNextFrom){
+      for(i=0; i<p->nCol; i++) mask |= COLUMN_MASK(p->aCol[i].iFrom);
+    }
+    for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
+      Index *pIdx = 0;
+      locateFkeyIndex(pParse, pTab, p, &pIdx, 0);
+      if( pIdx ){
+        for(i=0; i<pIdx->nColumn; i++) mask |= COLUMN_MASK(pIdx->aiColumn[i]);
+      }
+    }
+  }
+  return mask;
+}
+
+/*
+** This function is called before generating code to update or delete a 
+** row contained in table pTab. If the operation is a DELETE, then
+** parameter aChange is passed a NULL value. For an UPDATE, aChange points
+** to an array of size N, where N is the number of columns in table pTab.
+** If the i'th column is not modified by the UPDATE, then the corresponding 
+** entry in the aChange[] array is set to -1. If the column is modified,
+** the value is 0 or greater. Parameter chngRowid is set to true if the
+** UPDATE statement modifies the rowid fields of the table.
+**
+** If any foreign key processing will be required, this function returns
+** true. If there is no foreign key related processing, this function 
+** returns false.
+*/
+SQLITE_PRIVATE int sqlite3FkRequired(
+  Parse *pParse,                  /* Parse context */
+  Table *pTab,                    /* Table being modified */
+  int *aChange,                   /* Non-NULL for UPDATE operations */
+  int chngRowid                   /* True for UPDATE that affects rowid */
+){
+  if( pParse->db->flags&SQLITE_ForeignKeys ){
+    if( !aChange ){
+      /* A DELETE operation. Foreign key processing is required if the 
+      ** table in question is either the child or parent table for any 
+      ** foreign key constraint.  */
+      return (sqlite3FkReferences(pTab) || pTab->pFKey);
+    }else{
+      /* This is an UPDATE. Foreign key processing is only required if the
+      ** operation modifies one or more child or parent key columns. */
+      int i;
+      FKey *p;
+
+      /* Check if any child key columns are being modified. */
+      for(p=pTab->pFKey; p; p=p->pNextFrom){
+        for(i=0; i<p->nCol; i++){
+          int iChildKey = p->aCol[i].iFrom;
+          if( aChange[iChildKey]>=0 ) return 1;
+          if( iChildKey==pTab->iPKey && chngRowid ) return 1;
+        }
+      }
+
+      /* Check if any parent key columns are being modified. */
+      for(p=sqlite3FkReferences(pTab); p; p=p->pNextTo){
+        for(i=0; i<p->nCol; i++){
+          char *zKey = p->aCol[i].zCol;
+          int iKey;
+          for(iKey=0; iKey<pTab->nCol; iKey++){
+            Column *pCol = &pTab->aCol[iKey];
+            if( (zKey ? !sqlite3StrICmp(pCol->zName, zKey) : pCol->isPrimKey) ){
+              if( aChange[iKey]>=0 ) return 1;
+              if( iKey==pTab->iPKey && chngRowid ) return 1;
+            }
+          }
+        }
+      }
+    }
+  }
+  return 0;
+}
+
+/*
+** This function is called when an UPDATE or DELETE operation is being 
+** compiled on table pTab, which is the parent table of foreign-key pFKey.
+** If the current operation is an UPDATE, then the pChanges parameter is
+** passed a pointer to the list of columns being modified. If it is a
+** DELETE, pChanges is passed a NULL pointer.
+**
+** It returns a pointer to a Trigger structure containing a trigger
+** equivalent to the ON UPDATE or ON DELETE action specified by pFKey.
+** If the action is "NO ACTION" or "RESTRICT", then a NULL pointer is
+** returned (these actions require no special handling by the triggers
+** sub-system, code for them is created by fkScanChildren()).
+**
+** For example, if pFKey is the foreign key and pTab is table "p" in 
+** the following schema:
+**
+**   CREATE TABLE p(pk PRIMARY KEY);
+**   CREATE TABLE c(ck REFERENCES p ON DELETE CASCADE);
+**
+** then the returned trigger structure is equivalent to:
+**
+**   CREATE TRIGGER ... DELETE ON p BEGIN
+**     DELETE FROM c WHERE ck = old.pk;
+**   END;
+**
+** The returned pointer is cached as part of the foreign key object. It
+** is eventually freed along with the rest of the foreign key object by 
+** sqlite3FkDelete().
+*/
+static Trigger *fkActionTrigger(
+  Parse *pParse,                  /* Parse context */
+  Table *pTab,                    /* Table being updated or deleted from */
+  FKey *pFKey,                    /* Foreign key to get action for */
+  ExprList *pChanges              /* Change-list for UPDATE, NULL for DELETE */
+){
+  sqlite3 *db = pParse->db;       /* Database handle */
+  int action;                     /* One of OE_None, OE_Cascade etc. */
+  Trigger *pTrigger;              /* Trigger definition to return */
+  int iAction = (pChanges!=0);    /* 1 for UPDATE, 0 for DELETE */
+
+  action = pFKey->aAction[iAction];
+  pTrigger = pFKey->apTrigger[iAction];
+
+  if( action!=OE_None && !pTrigger ){
+    u8 enableLookaside;           /* Copy of db->lookaside.bEnabled */
+    char const *zFrom;            /* Name of child table */
+    int nFrom;                    /* Length in bytes of zFrom */
+    Index *pIdx = 0;              /* Parent key index for this FK */
+    int *aiCol = 0;               /* child table cols -> parent key cols */
+    TriggerStep *pStep = 0;        /* First (only) step of trigger program */
+    Expr *pWhere = 0;             /* WHERE clause of trigger step */
+    ExprList *pList = 0;          /* Changes list if ON UPDATE CASCADE */
+    Select *pSelect = 0;          /* If RESTRICT, "SELECT RAISE(...)" */
+    int i;                        /* Iterator variable */
+    Expr *pWhen = 0;              /* WHEN clause for the trigger */
+
+    if( locateFkeyIndex(pParse, pTab, pFKey, &pIdx, &aiCol) ) return 0;
+    assert( aiCol || pFKey->nCol==1 );
+
+    for(i=0; i<pFKey->nCol; i++){
+      Token tOld = { "old", 3 };  /* Literal "old" token */
+      Token tNew = { "new", 3 };  /* Literal "new" token */
+      Token tFromCol;             /* Name of column in child table */
+      Token tToCol;               /* Name of column in parent table */
+      int iFromCol;               /* Idx of column in child table */
+      Expr *pEq;                  /* tFromCol = OLD.tToCol */
+
+      iFromCol = aiCol ? aiCol[i] : pFKey->aCol[0].iFrom;
+      assert( iFromCol>=0 );
+      tToCol.z = pIdx ? pTab->aCol[pIdx->aiColumn[i]].zName : "oid";
+      tFromCol.z = pFKey->pFrom->aCol[iFromCol].zName;
+
+      tToCol.n = sqlite3Strlen30(tToCol.z);
+      tFromCol.n = sqlite3Strlen30(tFromCol.z);
+
+      /* Create the expression "OLD.zToCol = zFromCol". It is important
+      ** that the "OLD.zToCol" term is on the LHS of the = operator, so
+      ** that the affinity and collation sequence associated with the
+      ** parent table are used for the comparison. */
+      pEq = sqlite3PExpr(pParse, TK_EQ,
+          sqlite3PExpr(pParse, TK_DOT, 
+            sqlite3PExpr(pParse, TK_ID, 0, 0, &tOld),
+            sqlite3PExpr(pParse, TK_ID, 0, 0, &tToCol)
+          , 0),
+          sqlite3PExpr(pParse, TK_ID, 0, 0, &tFromCol)
+      , 0);
+      pWhere = sqlite3ExprAnd(db, pWhere, pEq);
+
+      /* For ON UPDATE, construct the next term of the WHEN clause.
+      ** The final WHEN clause will be like this:
+      **
+      **    WHEN NOT(old.col1 IS new.col1 AND ... AND old.colN IS new.colN)
+      */
+      if( pChanges ){
+        pEq = sqlite3PExpr(pParse, TK_IS,
+            sqlite3PExpr(pParse, TK_DOT, 
+              sqlite3PExpr(pParse, TK_ID, 0, 0, &tOld),
+              sqlite3PExpr(pParse, TK_ID, 0, 0, &tToCol),
+              0),
+            sqlite3PExpr(pParse, TK_DOT, 
+              sqlite3PExpr(pParse, TK_ID, 0, 0, &tNew),
+              sqlite3PExpr(pParse, TK_ID, 0, 0, &tToCol),
+              0),
+            0);
+        pWhen = sqlite3ExprAnd(db, pWhen, pEq);
+      }
+  
+      if( action!=OE_Restrict && (action!=OE_Cascade || pChanges) ){
+        Expr *pNew;
+        if( action==OE_Cascade ){
+          pNew = sqlite3PExpr(pParse, TK_DOT, 
+            sqlite3PExpr(pParse, TK_ID, 0, 0, &tNew),
+            sqlite3PExpr(pParse, TK_ID, 0, 0, &tToCol)
+          , 0);
+        }else if( action==OE_SetDflt ){
+          Expr *pDflt = pFKey->pFrom->aCol[iFromCol].pDflt;
+          if( pDflt ){
+            pNew = sqlite3ExprDup(db, pDflt, 0);
+          }else{
+            pNew = sqlite3PExpr(pParse, TK_NULL, 0, 0, 0);
+          }
+        }else{
+          pNew = sqlite3PExpr(pParse, TK_NULL, 0, 0, 0);
+        }
+        pList = sqlite3ExprListAppend(pParse, pList, pNew);
+        sqlite3ExprListSetName(pParse, pList, &tFromCol, 0);
+      }
+    }
+    sqlite3DbFree(db, aiCol);
+
+    zFrom = pFKey->pFrom->zName;
+    nFrom = sqlite3Strlen30(zFrom);
+
+    if( action==OE_Restrict ){
+      Token tFrom;
+      Expr *pRaise; 
+
+      tFrom.z = zFrom;
+      tFrom.n = nFrom;
+      pRaise = sqlite3Expr(db, TK_RAISE, "foreign key constraint failed");
+      if( pRaise ){
+        pRaise->affinity = OE_Abort;
+      }
+      pSelect = sqlite3SelectNew(pParse, 
+          sqlite3ExprListAppend(pParse, 0, pRaise),
+          sqlite3SrcListAppend(db, 0, &tFrom, 0),
+          pWhere,
+          0, 0, 0, 0, 0, 0
+      );
+      pWhere = 0;
+    }
+
+    /* Disable lookaside memory allocation */
+    enableLookaside = db->lookaside.bEnabled;
+    db->lookaside.bEnabled = 0;
+
+    pTrigger = (Trigger *)sqlite3DbMallocZero(db, 
+        sizeof(Trigger) +         /* struct Trigger */
+        sizeof(TriggerStep) +     /* Single step in trigger program */
+        nFrom + 1                 /* Space for pStep->target.z */
+    );
+    if( pTrigger ){
+      pStep = pTrigger->step_list = (TriggerStep *)&pTrigger[1];
+      pStep->target.z = (char *)&pStep[1];
+      pStep->target.n = nFrom;
+      memcpy((char *)pStep->target.z, zFrom, nFrom);
+  
+      pStep->pWhere = sqlite3ExprDup(db, pWhere, EXPRDUP_REDUCE);
+      pStep->pExprList = sqlite3ExprListDup(db, pList, EXPRDUP_REDUCE);
+      pStep->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
+      if( pWhen ){
+        pWhen = sqlite3PExpr(pParse, TK_NOT, pWhen, 0, 0);
+        pTrigger->pWhen = sqlite3ExprDup(db, pWhen, EXPRDUP_REDUCE);
+      }
+    }
+
+    /* Re-enable the lookaside buffer, if it was disabled earlier. */
+    db->lookaside.bEnabled = enableLookaside;
+
+    sqlite3ExprDelete(db, pWhere);
+    sqlite3ExprDelete(db, pWhen);
+    sqlite3ExprListDelete(db, pList);
+    sqlite3SelectDelete(db, pSelect);
+    if( db->mallocFailed==1 ){
+      fkTriggerDelete(db, pTrigger);
+      return 0;
+    }
+
+    switch( action ){
+      case OE_Restrict:
+        pStep->op = TK_SELECT; 
+        break;
+      case OE_Cascade: 
+        if( !pChanges ){ 
+          pStep->op = TK_DELETE; 
+          break; 
+        }
+      default:
+        pStep->op = TK_UPDATE;
+    }
+    pStep->pTrig = pTrigger;
+    pTrigger->pSchema = pTab->pSchema;
+    pTrigger->pTabSchema = pTab->pSchema;
+    pFKey->apTrigger[iAction] = pTrigger;
+    pTrigger->op = (pChanges ? TK_UPDATE : TK_DELETE);
+  }
+
+  return pTrigger;
+}
+
+/*
+** This function is called when deleting or updating a row to implement
+** any required CASCADE, SET NULL or SET DEFAULT actions.
+*/
+SQLITE_PRIVATE void sqlite3FkActions(
+  Parse *pParse,                  /* Parse context */
+  Table *pTab,                    /* Table being updated or deleted from */
+  ExprList *pChanges,             /* Change-list for UPDATE, NULL for DELETE */
+  int regOld                      /* Address of array containing old row */
+){
+  /* If foreign-key support is enabled, iterate through all FKs that 
+  ** refer to table pTab. If there is an action associated with the FK 
+  ** for this operation (either update or delete), invoke the associated 
+  ** trigger sub-program.  */
+  if( pParse->db->flags&SQLITE_ForeignKeys ){
+    FKey *pFKey;                  /* Iterator variable */
+    for(pFKey = sqlite3FkReferences(pTab); pFKey; pFKey=pFKey->pNextTo){
+      Trigger *pAction = fkActionTrigger(pParse, pTab, pFKey, pChanges);
+      if( pAction ){
+        sqlite3CodeRowTriggerDirect(pParse, pAction, pTab, regOld, OE_Abort, 0);
+      }
+    }
+  }
+}
+
+#endif /* ifndef SQLITE_OMIT_TRIGGER */
+
+/*
+** Free all memory associated with foreign key definitions attached to
+** table pTab. Remove the deleted foreign keys from the Schema.fkeyHash
+** hash table.
+*/
+SQLITE_PRIVATE void sqlite3FkDelete(sqlite3 *db, Table *pTab){
+  FKey *pFKey;                    /* Iterator variable */
+  FKey *pNext;                    /* Copy of pFKey->pNextFrom */
+
+  assert( db==0 || sqlite3SchemaMutexHeld(db, 0, pTab->pSchema) );
+  for(pFKey=pTab->pFKey; pFKey; pFKey=pNext){
+
+    /* Remove the FK from the fkeyHash hash table. */
+    if( !db || db->pnBytesFreed==0 ){
+      if( pFKey->pPrevTo ){
+        pFKey->pPrevTo->pNextTo = pFKey->pNextTo;
+      }else{
+        void *p = (void *)pFKey->pNextTo;
+        const char *z = (p ? pFKey->pNextTo->zTo : pFKey->zTo);
+        sqlite3HashInsert(&pTab->pSchema->fkeyHash, z, sqlite3Strlen30(z), p);
+      }
+      if( pFKey->pNextTo ){
+        pFKey->pNextTo->pPrevTo = pFKey->pPrevTo;
+      }
+    }
+
+    /* EV: R-30323-21917 Each foreign key constraint in SQLite is
+    ** classified as either immediate or deferred.
+    */
+    assert( pFKey->isDeferred==0 || pFKey->isDeferred==1 );
+
+    /* Delete any triggers created to implement actions for this FK. */
+#ifndef SQLITE_OMIT_TRIGGER
+    fkTriggerDelete(db, pFKey->apTrigger[0]);
+    fkTriggerDelete(db, pFKey->apTrigger[1]);
+#endif
+
+    pNext = pFKey->pNextFrom;
+    sqlite3DbFree(db, pFKey);
+  }
+}
+#endif /* ifndef SQLITE_OMIT_FOREIGN_KEY */
+
+/************** End of fkey.c ************************************************/
+/************** Begin file insert.c ******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains C code routines that are called by the parser
+** to handle INSERT statements in SQLite.
+*/
+
+/*
+** Generate code that will open a table for reading.
+*/
+SQLITE_PRIVATE void sqlite3OpenTable(
+  Parse *p,       /* Generate code into this VDBE */
+  int iCur,       /* The cursor number of the table */
+  int iDb,        /* The database index in sqlite3.aDb[] */
+  Table *pTab,    /* The table to be opened */
+  int opcode      /* OP_OpenRead or OP_OpenWrite */
+){
+  Vdbe *v;
+  if( IsVirtual(pTab) ) return;
+  v = sqlite3GetVdbe(p);
+  assert( opcode==OP_OpenWrite || opcode==OP_OpenRead );
+  sqlite3TableLock(p, iDb, pTab->tnum, (opcode==OP_OpenWrite)?1:0, pTab->zName);
+  sqlite3VdbeAddOp3(v, opcode, iCur, pTab->tnum, iDb);
+  sqlite3VdbeChangeP4(v, -1, SQLITE_INT_TO_PTR(pTab->nCol), P4_INT32);
+  VdbeComment((v, "%s", pTab->zName));
+}
+
+/*
+** Return a pointer to the column affinity string associated with index
+** pIdx. A column affinity string has one character for each column in 
+** the table, according to the affinity of the column:
+**
+**  Character      Column affinity
+**  ------------------------------
+**  'a'            TEXT
+**  'b'            NONE
+**  'c'            NUMERIC
+**  'd'            INTEGER
+**  'e'            REAL
+**
+** An extra 'b' is appended to the end of the string to cover the
+** rowid that appears as the last column in every index.
+**
+** Memory for the buffer containing the column index affinity string
+** is managed along with the rest of the Index structure. It will be
+** released when sqlite3DeleteIndex() is called.
+*/
+SQLITE_PRIVATE const char *sqlite3IndexAffinityStr(Vdbe *v, Index *pIdx){
+  if( !pIdx->zColAff ){
+    /* The first time a column affinity string for a particular index is
+    ** required, it is allocated and populated here. It is then stored as
+    ** a member of the Index structure for subsequent use.
+    **
+    ** The column affinity string will eventually be deleted by
+    ** sqliteDeleteIndex() when the Index structure itself is cleaned
+    ** up.
+    */
+    int n;
+    Table *pTab = pIdx->pTable;
+    sqlite3 *db = sqlite3VdbeDb(v);
+    pIdx->zColAff = (char *)sqlite3DbMallocRaw(0, pIdx->nColumn+2);
+    if( !pIdx->zColAff ){
+      db->mallocFailed = 1;
+      return 0;
+    }
+    for(n=0; n<pIdx->nColumn; n++){
+      pIdx->zColAff[n] = pTab->aCol[pIdx->aiColumn[n]].affinity;
+    }
+    pIdx->zColAff[n++] = SQLITE_AFF_NONE;
+    pIdx->zColAff[n] = 0;
+  }
+ 
+  return pIdx->zColAff;
+}
+
+/*
+** Set P4 of the most recently inserted opcode to a column affinity
+** string for table pTab. A column affinity string has one character
+** for each column indexed by the index, according to the affinity of the
+** column:
+**
+**  Character      Column affinity
+**  ------------------------------
+**  'a'            TEXT
+**  'b'            NONE
+**  'c'            NUMERIC
+**  'd'            INTEGER
+**  'e'            REAL
+*/
+SQLITE_PRIVATE void sqlite3TableAffinityStr(Vdbe *v, Table *pTab){
+  /* The first time a column affinity string for a particular table
+  ** is required, it is allocated and populated here. It is then 
+  ** stored as a member of the Table structure for subsequent use.
+  **
+  ** The column affinity string will eventually be deleted by
+  ** sqlite3DeleteTable() when the Table structure itself is cleaned up.
+  */
+  if( !pTab->zColAff ){
+    char *zColAff;
+    int i;
+    sqlite3 *db = sqlite3VdbeDb(v);
+
+    zColAff = (char *)sqlite3DbMallocRaw(0, pTab->nCol+1);
+    if( !zColAff ){
+      db->mallocFailed = 1;
+      return;
+    }
+
+    for(i=0; i<pTab->nCol; i++){
+      zColAff[i] = pTab->aCol[i].affinity;
+    }
+    zColAff[pTab->nCol] = '\0';
+
+    pTab->zColAff = zColAff;
+  }
+
+  sqlite3VdbeChangeP4(v, -1, pTab->zColAff, P4_TRANSIENT);
+}
+
+/*
+** Return non-zero if the table pTab in database iDb or any of its indices
+** have been opened at any point in the VDBE program beginning at location
+** iStartAddr throught the end of the program.  This is used to see if 
+** a statement of the form  "INSERT INTO <iDb, pTab> SELECT ..." can 
+** run without using temporary table for the results of the SELECT. 
+*/
+static int readsTable(Parse *p, int iStartAddr, int iDb, Table *pTab){
+  Vdbe *v = sqlite3GetVdbe(p);
+  int i;
+  int iEnd = sqlite3VdbeCurrentAddr(v);
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  VTable *pVTab = IsVirtual(pTab) ? sqlite3GetVTable(p->db, pTab) : 0;
+#endif
+
+  for(i=iStartAddr; i<iEnd; i++){
+    VdbeOp *pOp = sqlite3VdbeGetOp(v, i);
+    assert( pOp!=0 );
+    if( pOp->opcode==OP_OpenRead && pOp->p3==iDb ){
+      Index *pIndex;
+      int tnum = pOp->p2;
+      if( tnum==pTab->tnum ){
+        return 1;
+      }
+      for(pIndex=pTab->pIndex; pIndex; pIndex=pIndex->pNext){
+        if( tnum==pIndex->tnum ){
+          return 1;
+        }
+      }
+    }
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+    if( pOp->opcode==OP_VOpen && pOp->p4.pVtab==pVTab ){
+      assert( pOp->p4.pVtab!=0 );
+      assert( pOp->p4type==P4_VTAB );
+      return 1;
+    }
+#endif
+  }
+  return 0;
+}
+
+#ifndef SQLITE_OMIT_AUTOINCREMENT
+/*
+** Locate or create an AutoincInfo structure associated with table pTab
+** which is in database iDb.  Return the register number for the register
+** that holds the maximum rowid.
+**
+** There is at most one AutoincInfo structure per table even if the
+** same table is autoincremented multiple times due to inserts within
+** triggers.  A new AutoincInfo structure is created if this is the
+** first use of table pTab.  On 2nd and subsequent uses, the original
+** AutoincInfo structure is used.
+**
+** Three memory locations are allocated:
+**
+**   (1)  Register to hold the name of the pTab table.
+**   (2)  Register to hold the maximum ROWID of pTab.
+**   (3)  Register to hold the rowid in sqlite_sequence of pTab
+**
+** The 2nd register is the one that is returned.  That is all the
+** insert routine needs to know about.
+*/
+static int autoIncBegin(
+  Parse *pParse,      /* Parsing context */
+  int iDb,            /* Index of the database holding pTab */
+  Table *pTab         /* The table we are writing to */
+){
+  int memId = 0;      /* Register holding maximum rowid */
+  if( pTab->tabFlags & TF_Autoincrement ){
+    Parse *pToplevel = sqlite3ParseToplevel(pParse);
+    AutoincInfo *pInfo;
+
+    pInfo = pToplevel->pAinc;
+    while( pInfo && pInfo->pTab!=pTab ){ pInfo = pInfo->pNext; }
+    if( pInfo==0 ){
+      pInfo = sqlite3DbMallocRaw(pParse->db, sizeof(*pInfo));
+      if( pInfo==0 ) return 0;
+      pInfo->pNext = pToplevel->pAinc;
+      pToplevel->pAinc = pInfo;
+      pInfo->pTab = pTab;
+      pInfo->iDb = iDb;
+      pToplevel->nMem++;                  /* Register to hold name of table */
+      pInfo->regCtr = ++pToplevel->nMem;  /* Max rowid register */
+      pToplevel->nMem++;                  /* Rowid in sqlite_sequence */
+    }
+    memId = pInfo->regCtr;
+  }
+  return memId;
+}
+
+/*
+** This routine generates code that will initialize all of the
+** register used by the autoincrement tracker.  
+*/
+SQLITE_PRIVATE void sqlite3AutoincrementBegin(Parse *pParse){
+  AutoincInfo *p;            /* Information about an AUTOINCREMENT */
+  sqlite3 *db = pParse->db;  /* The database connection */
+  Db *pDb;                   /* Database only autoinc table */
+  int memId;                 /* Register holding max rowid */
+  int addr;                  /* A VDBE address */
+  Vdbe *v = pParse->pVdbe;   /* VDBE under construction */
+
+  /* This routine is never called during trigger-generation.  It is
+  ** only called from the top-level */
+  assert( pParse->pTriggerTab==0 );
+  assert( pParse==sqlite3ParseToplevel(pParse) );
+
+  assert( v );   /* We failed long ago if this is not so */
+  for(p = pParse->pAinc; p; p = p->pNext){
+    pDb = &db->aDb[p->iDb];
+    memId = p->regCtr;
+    assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
+    sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenRead);
+    addr = sqlite3VdbeCurrentAddr(v);
+    sqlite3VdbeAddOp4(v, OP_String8, 0, memId-1, 0, p->pTab->zName, 0);
+    sqlite3VdbeAddOp2(v, OP_Rewind, 0, addr+9);
+    sqlite3VdbeAddOp3(v, OP_Column, 0, 0, memId);
+    sqlite3VdbeAddOp3(v, OP_Ne, memId-1, addr+7, memId);
+    sqlite3VdbeChangeP5(v, SQLITE_JUMPIFNULL);
+    sqlite3VdbeAddOp2(v, OP_Rowid, 0, memId+1);
+    sqlite3VdbeAddOp3(v, OP_Column, 0, 1, memId);
+    sqlite3VdbeAddOp2(v, OP_Goto, 0, addr+9);
+    sqlite3VdbeAddOp2(v, OP_Next, 0, addr+2);
+    sqlite3VdbeAddOp2(v, OP_Integer, 0, memId);
+    sqlite3VdbeAddOp0(v, OP_Close);
+  }
+}
+
+/*
+** Update the maximum rowid for an autoincrement calculation.
+**
+** This routine should be called when the top of the stack holds a
+** new rowid that is about to be inserted.  If that new rowid is
+** larger than the maximum rowid in the memId memory cell, then the
+** memory cell is updated.  The stack is unchanged.
+*/
+static void autoIncStep(Parse *pParse, int memId, int regRowid){
+  if( memId>0 ){
+    sqlite3VdbeAddOp2(pParse->pVdbe, OP_MemMax, memId, regRowid);
+  }
+}
+
+/*
+** This routine generates the code needed to write autoincrement
+** maximum rowid values back into the sqlite_sequence register.
+** Every statement that might do an INSERT into an autoincrement
+** table (either directly or through triggers) needs to call this
+** routine just before the "exit" code.
+*/
+SQLITE_PRIVATE void sqlite3AutoincrementEnd(Parse *pParse){
+  AutoincInfo *p;
+  Vdbe *v = pParse->pVdbe;
+  sqlite3 *db = pParse->db;
+
+  assert( v );
+  for(p = pParse->pAinc; p; p = p->pNext){
+    Db *pDb = &db->aDb[p->iDb];
+    int j1, j2, j3, j4, j5;
+    int iRec;
+    int memId = p->regCtr;
+
+    iRec = sqlite3GetTempReg(pParse);
+    assert( sqlite3SchemaMutexHeld(db, 0, pDb->pSchema) );
+    sqlite3OpenTable(pParse, 0, p->iDb, pDb->pSchema->pSeqTab, OP_OpenWrite);
+    j1 = sqlite3VdbeAddOp1(v, OP_NotNull, memId+1);
+    j2 = sqlite3VdbeAddOp0(v, OP_Rewind);
+    j3 = sqlite3VdbeAddOp3(v, OP_Column, 0, 0, iRec);
+    j4 = sqlite3VdbeAddOp3(v, OP_Eq, memId-1, 0, iRec);
+    sqlite3VdbeAddOp2(v, OP_Next, 0, j3);
+    sqlite3VdbeJumpHere(v, j2);
+    sqlite3VdbeAddOp2(v, OP_NewRowid, 0, memId+1);
+    j5 = sqlite3VdbeAddOp0(v, OP_Goto);
+    sqlite3VdbeJumpHere(v, j4);
+    sqlite3VdbeAddOp2(v, OP_Rowid, 0, memId+1);
+    sqlite3VdbeJumpHere(v, j1);
+    sqlite3VdbeJumpHere(v, j5);
+    sqlite3VdbeAddOp3(v, OP_MakeRecord, memId-1, 2, iRec);
+    sqlite3VdbeAddOp3(v, OP_Insert, 0, iRec, memId+1);
+    sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
+    sqlite3VdbeAddOp0(v, OP_Close);
+    sqlite3ReleaseTempReg(pParse, iRec);
+  }
+}
+#else
+/*
+** If SQLITE_OMIT_AUTOINCREMENT is defined, then the three routines
+** above are all no-ops
+*/
+# define autoIncBegin(A,B,C) (0)
+# define autoIncStep(A,B,C)
+#endif /* SQLITE_OMIT_AUTOINCREMENT */
+
+
+/* Forward declaration */
+static int xferOptimization(
+  Parse *pParse,        /* Parser context */
+  Table *pDest,         /* The table we are inserting into */
+  Select *pSelect,      /* A SELECT statement to use as the data source */
+  int onError,          /* How to handle constraint errors */
+  int iDbDest           /* The database of pDest */
+);
+
+/*
+** This routine is call to handle SQL of the following forms:
+**
+**    insert into TABLE (IDLIST) values(EXPRLIST)
+**    insert into TABLE (IDLIST) select
+**
+** The IDLIST following the table name is always optional.  If omitted,
+** then a list of all columns for the table is substituted.  The IDLIST
+** appears in the pColumn parameter.  pColumn is NULL if IDLIST is omitted.
+**
+** The pList parameter holds EXPRLIST in the first form of the INSERT
+** statement above, and pSelect is NULL.  For the second form, pList is
+** NULL and pSelect is a pointer to the select statement used to generate
+** data for the insert.
+**
+** The code generated follows one of four templates.  For a simple
+** select with data coming from a VALUES clause, the code executes
+** once straight down through.  Pseudo-code follows (we call this
+** the "1st template"):
+**
+**         open write cursor to <table> and its indices
+**         puts VALUES clause expressions onto the stack
+**         write the resulting record into <table>
+**         cleanup
+**
+** The three remaining templates assume the statement is of the form
+**
+**   INSERT INTO <table> SELECT ...
+**
+** If the SELECT clause is of the restricted form "SELECT * FROM <table2>" -
+** in other words if the SELECT pulls all columns from a single table
+** and there is no WHERE or LIMIT or GROUP BY or ORDER BY clauses, and
+** if <table2> and <table1> are distinct tables but have identical
+** schemas, including all the same indices, then a special optimization
+** is invoked that copies raw records from <table2> over to <table1>.
+** See the xferOptimization() function for the implementation of this
+** template.  This is the 2nd template.
+**
+**         open a write cursor to <table>
+**         open read cursor on <table2>
+**         transfer all records in <table2> over to <table>
+**         close cursors
+**         foreach index on <table>
+**           open a write cursor on the <table> index
+**           open a read cursor on the corresponding <table2> index
+**           transfer all records from the read to the write cursors
+**           close cursors
+**         end foreach
+**
+** The 3rd template is for when the second template does not apply
+** and the SELECT clause does not read from <table> at any time.
+** The generated code follows this template:
+**
+**         EOF <- 0
+**         X <- A
+**         goto B
+**      A: setup for the SELECT
+**         loop over the rows in the SELECT
+**           load values into registers R..R+n
+**           yield X
+**         end loop
+**         cleanup after the SELECT
+**         EOF <- 1
+**         yield X
+**         goto A
+**      B: open write cursor to <table> and its indices
+**      C: yield X
+**         if EOF goto D
+**         insert the select result into <table> from R..R+n
+**         goto C
+**      D: cleanup
+**
+** The 4th template is used if the insert statement takes its
+** values from a SELECT but the data is being inserted into a table
+** that is also read as part of the SELECT.  In the third form,
+** we have to use a intermediate table to store the results of
+** the select.  The template is like this:
+**
+**         EOF <- 0
+**         X <- A
+**         goto B
+**      A: setup for the SELECT
+**         loop over the tables in the SELECT
+**           load value into register R..R+n
+**           yield X
+**         end loop
+**         cleanup after the SELECT
+**         EOF <- 1
+**         yield X
+**         halt-error
+**      B: open temp table
+**      L: yield X
+**         if EOF goto M
+**         insert row from R..R+n into temp table
+**         goto L
+**      M: open write cursor to <table> and its indices
+**         rewind temp table
+**      C: loop over rows of intermediate table
+**           transfer values form intermediate table into <table>
+**         end loop
+**      D: cleanup
+*/
+SQLITE_PRIVATE void sqlite3Insert(
+  Parse *pParse,        /* Parser context */
+  SrcList *pTabList,    /* Name of table into which we are inserting */
+  ExprList *pList,      /* List of values to be inserted */
+  Select *pSelect,      /* A SELECT statement to use as the data source */
+  IdList *pColumn,      /* Column names corresponding to IDLIST. */
+  int onError           /* How to handle constraint errors */
+){
+  sqlite3 *db;          /* The main database structure */
+  Table *pTab;          /* The table to insert into.  aka TABLE */
+  char *zTab;           /* Name of the table into which we are inserting */
+  const char *zDb;      /* Name of the database holding this table */
+  int i, j, idx;        /* Loop counters */
+  Vdbe *v;              /* Generate code into this virtual machine */
+  Index *pIdx;          /* For looping over indices of the table */
+  int nColumn;          /* Number of columns in the data */
+  int nHidden = 0;      /* Number of hidden columns if TABLE is virtual */
+  int baseCur = 0;      /* VDBE Cursor number for pTab */
+  int keyColumn = -1;   /* Column that is the INTEGER PRIMARY KEY */
+  int endOfLoop;        /* Label for the end of the insertion loop */
+  int useTempTable = 0; /* Store SELECT results in intermediate table */
+  int srcTab = 0;       /* Data comes from this temporary cursor if >=0 */
+  int addrInsTop = 0;   /* Jump to label "D" */
+  int addrCont = 0;     /* Top of insert loop. Label "C" in templates 3 and 4 */
+  int addrSelect = 0;   /* Address of coroutine that implements the SELECT */
+  SelectDest dest;      /* Destination for SELECT on rhs of INSERT */
+  int iDb;              /* Index of database holding TABLE */
+  Db *pDb;              /* The database containing table being inserted into */
+  int appendFlag = 0;   /* True if the insert is likely to be an append */
+
+  /* Register allocations */
+  int regFromSelect = 0;/* Base register for data coming from SELECT */
+  int regAutoinc = 0;   /* Register holding the AUTOINCREMENT counter */
+  int regRowCount = 0;  /* Memory cell used for the row counter */
+  int regIns;           /* Block of regs holding rowid+data being inserted */
+  int regRowid;         /* registers holding insert rowid */
+  int regData;          /* register holding first column to insert */
+  int regEof = 0;       /* Register recording end of SELECT data */
+  int *aRegIdx = 0;     /* One register allocated to each index */
+
+#ifndef SQLITE_OMIT_TRIGGER
+  int isView;                 /* True if attempting to insert into a view */
+  Trigger *pTrigger;          /* List of triggers on pTab, if required */
+  int tmask;                  /* Mask of trigger times */
+#endif
+
+  db = pParse->db;
+  memset(&dest, 0, sizeof(dest));
+  if( pParse->nErr || db->mallocFailed ){
+    goto insert_cleanup;
+  }
+
+  /* Locate the table into which we will be inserting new information.
+  */
+  assert( pTabList->nSrc==1 );
+  zTab = pTabList->a[0].zName;
+  if( NEVER(zTab==0) ) goto insert_cleanup;
+  pTab = sqlite3SrcListLookup(pParse, pTabList);
+  if( pTab==0 ){
+    goto insert_cleanup;
+  }
+  iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+  assert( iDb<db->nDb );
+  pDb = &db->aDb[iDb];
+  zDb = pDb->zName;
+  if( sqlite3AuthCheck(pParse, SQLITE_INSERT, pTab->zName, 0, zDb) ){
+    goto insert_cleanup;
+  }
+
+  /* Figure out if we have any triggers and if the table being
+  ** inserted into is a view
+  */
+#ifndef SQLITE_OMIT_TRIGGER
+  pTrigger = sqlite3TriggersExist(pParse, pTab, TK_INSERT, 0, &tmask);
+  isView = pTab->pSelect!=0;
+#else
+# define pTrigger 0
+# define tmask 0
+# define isView 0
+#endif
+#ifdef SQLITE_OMIT_VIEW
+# undef isView
+# define isView 0
+#endif
+  assert( (pTrigger && tmask) || (pTrigger==0 && tmask==0) );
+
+  /* If pTab is really a view, make sure it has been initialized.
+  ** ViewGetColumnNames() is a no-op if pTab is not a view (or virtual 
+  ** module table).
+  */
+  if( sqlite3ViewGetColumnNames(pParse, pTab) ){
+    goto insert_cleanup;
+  }
+
+  /* Ensure that:
+  *  (a) the table is not read-only, 
+  *  (b) that if it is a view then ON INSERT triggers exist
+  */
+  if( sqlite3IsReadOnly(pParse, pTab, tmask) ){
+    goto insert_cleanup;
+  }
+
+  /* Allocate a VDBE
+  */
+  v = sqlite3GetVdbe(pParse);
+  if( v==0 ) goto insert_cleanup;
+  if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);
+  sqlite3BeginWriteOperation(pParse, pSelect || pTrigger, iDb);
+
+#ifndef SQLITE_OMIT_XFER_OPT
+  /* If the statement is of the form
+  **
+  **       INSERT INTO <table1> SELECT * FROM <table2>;
+  **
+  ** Then special optimizations can be applied that make the transfer
+  ** very fast and which reduce fragmentation of indices.
+  **
+  ** This is the 2nd template.
+  */
+  if( pColumn==0 && xferOptimization(pParse, pTab, pSelect, onError, iDb) ){
+    assert( !pTrigger );
+    assert( pList==0 );
+    goto insert_end;
+  }
+#endif /* SQLITE_OMIT_XFER_OPT */
+
+  /* If this is an AUTOINCREMENT table, look up the sequence number in the
+  ** sqlite_sequence table and store it in memory cell regAutoinc.
+  */
+  regAutoinc = autoIncBegin(pParse, iDb, pTab);
+
+  /* Figure out how many columns of data are supplied.  If the data
+  ** is coming from a SELECT statement, then generate a co-routine that
+  ** produces a single row of the SELECT on each invocation.  The
+  ** co-routine is the common header to the 3rd and 4th templates.
+  */
+  if( pSelect ){
+    /* Data is coming from a SELECT.  Generate code to implement that SELECT
+    ** as a co-routine.  The code is common to both the 3rd and 4th
+    ** templates:
+    **
+    **         EOF <- 0
+    **         X <- A
+    **         goto B
+    **      A: setup for the SELECT
+    **         loop over the tables in the SELECT
+    **           load value into register R..R+n
+    **           yield X
+    **         end loop
+    **         cleanup after the SELECT
+    **         EOF <- 1
+    **         yield X
+    **         halt-error
+    **
+    ** On each invocation of the co-routine, it puts a single row of the
+    ** SELECT result into registers dest.iMem...dest.iMem+dest.nMem-1.
+    ** (These output registers are allocated by sqlite3Select().)  When
+    ** the SELECT completes, it sets the EOF flag stored in regEof.
+    */
+    int rc, j1;
+
+    regEof = ++pParse->nMem;
+    sqlite3VdbeAddOp2(v, OP_Integer, 0, regEof);      /* EOF <- 0 */
+    VdbeComment((v, "SELECT eof flag"));
+    sqlite3SelectDestInit(&dest, SRT_Coroutine, ++pParse->nMem);
+    addrSelect = sqlite3VdbeCurrentAddr(v)+2;
+    sqlite3VdbeAddOp2(v, OP_Integer, addrSelect-1, dest.iParm);
+    j1 = sqlite3VdbeAddOp2(v, OP_Goto, 0, 0);
+    VdbeComment((v, "Jump over SELECT coroutine"));
+
+    /* Resolve the expressions in the SELECT statement and execute it. */
+    rc = sqlite3Select(pParse, pSelect, &dest);
+    assert( pParse->nErr==0 || rc );
+    if( rc || NEVER(pParse->nErr) || db->mallocFailed ){
+      goto insert_cleanup;
+    }
+    sqlite3VdbeAddOp2(v, OP_Integer, 1, regEof);         /* EOF <- 1 */
+    sqlite3VdbeAddOp1(v, OP_Yield, dest.iParm);   /* yield X */
+    sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_INTERNAL, OE_Abort);
+    VdbeComment((v, "End of SELECT coroutine"));
+    sqlite3VdbeJumpHere(v, j1);                          /* label B: */
+
+    regFromSelect = dest.iMem;
+    assert( pSelect->pEList );
+    nColumn = pSelect->pEList->nExpr;
+    assert( dest.nMem==nColumn );
+
+    /* Set useTempTable to TRUE if the result of the SELECT statement
+    ** should be written into a temporary table (template 4).  Set to
+    ** FALSE if each* row of the SELECT can be written directly into
+    ** the destination table (template 3).
+    **
+    ** A temp table must be used if the table being updated is also one
+    ** of the tables being read by the SELECT statement.  Also use a 
+    ** temp table in the case of row triggers.
+    */
+    if( pTrigger || readsTable(pParse, addrSelect, iDb, pTab) ){
+      useTempTable = 1;
+    }
+
+    if( useTempTable ){
+      /* Invoke the coroutine to extract information from the SELECT
+      ** and add it to a transient table srcTab.  The code generated
+      ** here is from the 4th template:
+      **
+      **      B: open temp table
+      **      L: yield X
+      **         if EOF goto M
+      **         insert row from R..R+n into temp table
+      **         goto L
+      **      M: ...
+      */
+      int regRec;          /* Register to hold packed record */
+      int regTempRowid;    /* Register to hold temp table ROWID */
+      int addrTop;         /* Label "L" */
+      int addrIf;          /* Address of jump to M */
+
+      srcTab = pParse->nTab++;
+      regRec = sqlite3GetTempReg(pParse);
+      regTempRowid = sqlite3GetTempReg(pParse);
+      sqlite3VdbeAddOp2(v, OP_OpenEphemeral, srcTab, nColumn);
+      addrTop = sqlite3VdbeAddOp1(v, OP_Yield, dest.iParm);
+      addrIf = sqlite3VdbeAddOp1(v, OP_If, regEof);
+      sqlite3VdbeAddOp3(v, OP_MakeRecord, regFromSelect, nColumn, regRec);
+      sqlite3VdbeAddOp2(v, OP_NewRowid, srcTab, regTempRowid);
+      sqlite3VdbeAddOp3(v, OP_Insert, srcTab, regRec, regTempRowid);
+      sqlite3VdbeAddOp2(v, OP_Goto, 0, addrTop);
+      sqlite3VdbeJumpHere(v, addrIf);
+      sqlite3ReleaseTempReg(pParse, regRec);
+      sqlite3ReleaseTempReg(pParse, regTempRowid);
+    }
+  }else{
+    /* This is the case if the data for the INSERT is coming from a VALUES
+    ** clause
+    */
+    NameContext sNC;
+    memset(&sNC, 0, sizeof(sNC));
+    sNC.pParse = pParse;
+    srcTab = -1;
+    assert( useTempTable==0 );
+    nColumn = pList ? pList->nExpr : 0;
+    for(i=0; i<nColumn; i++){
+      if( sqlite3ResolveExprNames(&sNC, pList->a[i].pExpr) ){
+        goto insert_cleanup;
+      }
+    }
+  }
+
+  /* Make sure the number of columns in the source data matches the number
+  ** of columns to be inserted into the table.
+  */
+  if( IsVirtual(pTab) ){
+    for(i=0; i<pTab->nCol; i++){
+      nHidden += (IsHiddenColumn(&pTab->aCol[i]) ? 1 : 0);
+    }
+  }
+  if( pColumn==0 && nColumn && nColumn!=(pTab->nCol-nHidden) ){
+    sqlite3ErrorMsg(pParse, 
+       "table %S has %d columns but %d values were supplied",
+       pTabList, 0, pTab->nCol-nHidden, nColumn);
+    goto insert_cleanup;
+  }
+  if( pColumn!=0 && nColumn!=pColumn->nId ){
+    sqlite3ErrorMsg(pParse, "%d values for %d columns", nColumn, pColumn->nId);
+    goto insert_cleanup;
+  }
+
+  /* If the INSERT statement included an IDLIST term, then make sure
+  ** all elements of the IDLIST really are columns of the table and 
+  ** remember the column indices.
+  **
+  ** If the table has an INTEGER PRIMARY KEY column and that column
+  ** is named in the IDLIST, then record in the keyColumn variable
+  ** the index into IDLIST of the primary key column.  keyColumn is
+  ** the index of the primary key as it appears in IDLIST, not as
+  ** is appears in the original table.  (The index of the primary
+  ** key in the original table is pTab->iPKey.)
+  */
+  if( pColumn ){
+    for(i=0; i<pColumn->nId; i++){
+      pColumn->a[i].idx = -1;
+    }
+    for(i=0; i<pColumn->nId; i++){
+      for(j=0; j<pTab->nCol; j++){
+        if( sqlite3StrICmp(pColumn->a[i].zName, pTab->aCol[j].zName)==0 ){
+          pColumn->a[i].idx = j;
+          if( j==pTab->iPKey ){
+            keyColumn = i;
+          }
+          break;
+        }
+      }
+      if( j>=pTab->nCol ){
+        if( sqlite3IsRowid(pColumn->a[i].zName) ){
+          keyColumn = i;
+        }else{
+          sqlite3ErrorMsg(pParse, "table %S has no column named %s",
+              pTabList, 0, pColumn->a[i].zName);
+          pParse->checkSchema = 1;
+          goto insert_cleanup;
+        }
+      }
+    }
+  }
+
+  /* If there is no IDLIST term but the table has an integer primary
+  ** key, the set the keyColumn variable to the primary key column index
+  ** in the original table definition.
+  */
+  if( pColumn==0 && nColumn>0 ){
+    keyColumn = pTab->iPKey;
+  }
+    
+  /* Initialize the count of rows to be inserted
+  */
+  if( db->flags & SQLITE_CountRows ){
+    regRowCount = ++pParse->nMem;
+    sqlite3VdbeAddOp2(v, OP_Integer, 0, regRowCount);
+  }
+
+  /* If this is not a view, open the table and and all indices */
+  if( !isView ){
+    int nIdx;
+
+    baseCur = pParse->nTab;
+    nIdx = sqlite3OpenTableAndIndices(pParse, pTab, baseCur, OP_OpenWrite);
+    aRegIdx = sqlite3DbMallocRaw(db, sizeof(int)*(nIdx+1));
+    if( aRegIdx==0 ){
+      goto insert_cleanup;
+    }
+    for(i=0; i<nIdx; i++){
+      aRegIdx[i] = ++pParse->nMem;
+    }
+  }
+
+  /* This is the top of the main insertion loop */
+  if( useTempTable ){
+    /* This block codes the top of loop only.  The complete loop is the
+    ** following pseudocode (template 4):
+    **
+    **         rewind temp table
+    **      C: loop over rows of intermediate table
+    **           transfer values form intermediate table into <table>
+    **         end loop
+    **      D: ...
+    */
+    addrInsTop = sqlite3VdbeAddOp1(v, OP_Rewind, srcTab);
+    addrCont = sqlite3VdbeCurrentAddr(v);
+  }else if( pSelect ){
+    /* This block codes the top of loop only.  The complete loop is the
+    ** following pseudocode (template 3):
+    **
+    **      C: yield X
+    **         if EOF goto D
+    **         insert the select result into <table> from R..R+n
+    **         goto C
+    **      D: ...
+    */
+    addrCont = sqlite3VdbeAddOp1(v, OP_Yield, dest.iParm);
+    addrInsTop = sqlite3VdbeAddOp1(v, OP_If, regEof);
+  }
+
+  /* Allocate registers for holding the rowid of the new row,
+  ** the content of the new row, and the assemblied row record.
+  */
+  regRowid = regIns = pParse->nMem+1;
+  pParse->nMem += pTab->nCol + 1;
+  if( IsVirtual(pTab) ){
+    regRowid++;
+    pParse->nMem++;
+  }
+  regData = regRowid+1;
+
+  /* Run the BEFORE and INSTEAD OF triggers, if there are any
+  */
+  endOfLoop = sqlite3VdbeMakeLabel(v);
+  if( tmask & TRIGGER_BEFORE ){
+    int regCols = sqlite3GetTempRange(pParse, pTab->nCol+1);
+
+    /* build the NEW.* reference row.  Note that if there is an INTEGER
+    ** PRIMARY KEY into which a NULL is being inserted, that NULL will be
+    ** translated into a unique ID for the row.  But on a BEFORE trigger,
+    ** we do not know what the unique ID will be (because the insert has
+    ** not happened yet) so we substitute a rowid of -1
+    */
+    if( keyColumn<0 ){
+      sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
+    }else{
+      int j1;
+      if( useTempTable ){
+        sqlite3VdbeAddOp3(v, OP_Column, srcTab, keyColumn, regCols);
+      }else{
+        assert( pSelect==0 );  /* Otherwise useTempTable is true */
+        sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr, regCols);
+      }
+      j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regCols);
+      sqlite3VdbeAddOp2(v, OP_Integer, -1, regCols);
+      sqlite3VdbeJumpHere(v, j1);
+      sqlite3VdbeAddOp1(v, OP_MustBeInt, regCols);
+    }
+
+    /* Cannot have triggers on a virtual table. If it were possible,
+    ** this block would have to account for hidden column.
+    */
+    assert( !IsVirtual(pTab) );
+
+    /* Create the new column data
+    */
+    for(i=0; i<pTab->nCol; i++){
+      if( pColumn==0 ){
+        j = i;
+      }else{
+        for(j=0; j<pColumn->nId; j++){
+          if( pColumn->a[j].idx==i ) break;
+        }
+      }
+      if( (!useTempTable && !pList) || (pColumn && j>=pColumn->nId) ){
+        sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regCols+i+1);
+      }else if( useTempTable ){
+        sqlite3VdbeAddOp3(v, OP_Column, srcTab, j, regCols+i+1); 
+      }else{
+        assert( pSelect==0 ); /* Otherwise useTempTable is true */
+        sqlite3ExprCodeAndCache(pParse, pList->a[j].pExpr, regCols+i+1);
+      }
+    }
+
+    /* If this is an INSERT on a view with an INSTEAD OF INSERT trigger,
+    ** do not attempt any conversions before assembling the record.
+    ** If this is a real table, attempt conversions as required by the
+    ** table column affinities.
+    */
+    if( !isView ){
+      sqlite3VdbeAddOp2(v, OP_Affinity, regCols+1, pTab->nCol);
+      sqlite3TableAffinityStr(v, pTab);
+    }
+
+    /* Fire BEFORE or INSTEAD OF triggers */
+    sqlite3CodeRowTrigger(pParse, pTrigger, TK_INSERT, 0, TRIGGER_BEFORE, 
+        pTab, regCols-pTab->nCol-1, onError, endOfLoop);
+
+    sqlite3ReleaseTempRange(pParse, regCols, pTab->nCol+1);
+  }
+
+  /* Push the record number for the new entry onto the stack.  The
+  ** record number is a randomly generate integer created by NewRowid
+  ** except when the table has an INTEGER PRIMARY KEY column, in which
+  ** case the record number is the same as that column. 
+  */
+  if( !isView ){
+    if( IsVirtual(pTab) ){
+      /* The row that the VUpdate opcode will delete: none */
+      sqlite3VdbeAddOp2(v, OP_Null, 0, regIns);
+    }
+    if( keyColumn>=0 ){
+      if( useTempTable ){
+        sqlite3VdbeAddOp3(v, OP_Column, srcTab, keyColumn, regRowid);
+      }else if( pSelect ){
+        sqlite3VdbeAddOp2(v, OP_SCopy, regFromSelect+keyColumn, regRowid);
+      }else{
+        VdbeOp *pOp;
+        sqlite3ExprCode(pParse, pList->a[keyColumn].pExpr, regRowid);
+        pOp = sqlite3VdbeGetOp(v, -1);
+        if( ALWAYS(pOp) && pOp->opcode==OP_Null && !IsVirtual(pTab) ){
+          appendFlag = 1;
+          pOp->opcode = OP_NewRowid;
+          pOp->p1 = baseCur;
+          pOp->p2 = regRowid;
+          pOp->p3 = regAutoinc;
+        }
+      }
+      /* If the PRIMARY KEY expression is NULL, then use OP_NewRowid
+      ** to generate a unique primary key value.
+      */
+      if( !appendFlag ){
+        int j1;
+        if( !IsVirtual(pTab) ){
+          j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regRowid);
+          sqlite3VdbeAddOp3(v, OP_NewRowid, baseCur, regRowid, regAutoinc);
+          sqlite3VdbeJumpHere(v, j1);
+        }else{
+          j1 = sqlite3VdbeCurrentAddr(v);
+          sqlite3VdbeAddOp2(v, OP_IsNull, regRowid, j1+2);
+        }
+        sqlite3VdbeAddOp1(v, OP_MustBeInt, regRowid);
+      }
+    }else if( IsVirtual(pTab) ){
+      sqlite3VdbeAddOp2(v, OP_Null, 0, regRowid);
+    }else{
+      sqlite3VdbeAddOp3(v, OP_NewRowid, baseCur, regRowid, regAutoinc);
+      appendFlag = 1;
+    }
+    autoIncStep(pParse, regAutoinc, regRowid);
+
+    /* Push onto the stack, data for all columns of the new entry, beginning
+    ** with the first column.
+    */
+    nHidden = 0;
+    for(i=0; i<pTab->nCol; i++){
+      int iRegStore = regRowid+1+i;
+      if( i==pTab->iPKey ){
+        /* The value of the INTEGER PRIMARY KEY column is always a NULL.
+        ** Whenever this column is read, the record number will be substituted
+        ** in its place.  So will fill this column with a NULL to avoid
+        ** taking up data space with information that will never be used. */
+        sqlite3VdbeAddOp2(v, OP_Null, 0, iRegStore);
+        continue;
+      }
+      if( pColumn==0 ){
+        if( IsHiddenColumn(&pTab->aCol[i]) ){
+          assert( IsVirtual(pTab) );
+          j = -1;
+          nHidden++;
+        }else{
+          j = i - nHidden;
+        }
+      }else{
+        for(j=0; j<pColumn->nId; j++){
+          if( pColumn->a[j].idx==i ) break;
+        }
+      }
+      if( j<0 || nColumn==0 || (pColumn && j>=pColumn->nId) ){
+        sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, iRegStore);
+      }else if( useTempTable ){
+        sqlite3VdbeAddOp3(v, OP_Column, srcTab, j, iRegStore); 
+      }else if( pSelect ){
+        sqlite3VdbeAddOp2(v, OP_SCopy, regFromSelect+j, iRegStore);
+      }else{
+        sqlite3ExprCode(pParse, pList->a[j].pExpr, iRegStore);
+      }
+    }
+
+    /* Generate code to check constraints and generate index keys and
+    ** do the insertion.
+    */
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+    if( IsVirtual(pTab) ){
+      const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
+      sqlite3VtabMakeWritable(pParse, pTab);
+      sqlite3VdbeAddOp4(v, OP_VUpdate, 1, pTab->nCol+2, regIns, pVTab, P4_VTAB);
+      sqlite3MayAbort(pParse);
+    }else
+#endif
+    {
+      int isReplace;    /* Set to true if constraints may cause a replace */
+      sqlite3GenerateConstraintChecks(pParse, pTab, baseCur, regIns, aRegIdx,
+          keyColumn>=0, 0, onError, endOfLoop, &isReplace
+      );
+      sqlite3FkCheck(pParse, pTab, 0, regIns);
+      sqlite3CompleteInsertion(
+          pParse, pTab, baseCur, regIns, aRegIdx, 0, appendFlag, isReplace==0
+      );
+    }
+  }
+
+  /* Update the count of rows that are inserted
+  */
+  if( (db->flags & SQLITE_CountRows)!=0 ){
+    sqlite3VdbeAddOp2(v, OP_AddImm, regRowCount, 1);
+  }
+
+  if( pTrigger ){
+    /* Code AFTER triggers */
+    sqlite3CodeRowTrigger(pParse, pTrigger, TK_INSERT, 0, TRIGGER_AFTER, 
+        pTab, regData-2-pTab->nCol, onError, endOfLoop);
+  }
+
+  /* The bottom of the main insertion loop, if the data source
+  ** is a SELECT statement.
+  */
+  sqlite3VdbeResolveLabel(v, endOfLoop);
+  if( useTempTable ){
+    sqlite3VdbeAddOp2(v, OP_Next, srcTab, addrCont);
+    sqlite3VdbeJumpHere(v, addrInsTop);
+    sqlite3VdbeAddOp1(v, OP_Close, srcTab);
+  }else if( pSelect ){
+    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrCont);
+    sqlite3VdbeJumpHere(v, addrInsTop);
+  }
+
+  if( !IsVirtual(pTab) && !isView ){
+    /* Close all tables opened */
+    sqlite3VdbeAddOp1(v, OP_Close, baseCur);
+    for(idx=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, idx++){
+      sqlite3VdbeAddOp1(v, OP_Close, idx+baseCur);
+    }
+  }
+
+insert_end:
+  /* Update the sqlite_sequence table by storing the content of the
+  ** maximum rowid counter values recorded while inserting into
+  ** autoincrement tables.
+  */
+  if( pParse->nested==0 && pParse->pTriggerTab==0 ){
+    sqlite3AutoincrementEnd(pParse);
+  }
+
+  /*
+  ** Return the number of rows inserted. If this routine is 
+  ** generating code because of a call to sqlite3NestedParse(), do not
+  ** invoke the callback function.
+  */
+  if( (db->flags&SQLITE_CountRows) && !pParse->nested && !pParse->pTriggerTab ){
+    sqlite3VdbeAddOp2(v, OP_ResultRow, regRowCount, 1);
+    sqlite3VdbeSetNumCols(v, 1);
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "rows inserted", SQLITE_STATIC);
+  }
+
+insert_cleanup:
+  sqlite3SrcListDelete(db, pTabList);
+  sqlite3ExprListDelete(db, pList);
+  sqlite3SelectDelete(db, pSelect);
+  sqlite3IdListDelete(db, pColumn);
+  sqlite3DbFree(db, aRegIdx);
+}
+
+/* Make sure "isView" and other macros defined above are undefined. Otherwise
+** thely may interfere with compilation of other functions in this file
+** (or in another file, if this file becomes part of the amalgamation).  */
+#ifdef isView
+ #undef isView
+#endif
+#ifdef pTrigger
+ #undef pTrigger
+#endif
+#ifdef tmask
+ #undef tmask
+#endif
+
+
+/*
+** Generate code to do constraint checks prior to an INSERT or an UPDATE.
+**
+** The input is a range of consecutive registers as follows:
+**
+**    1.  The rowid of the row after the update.
+**
+**    2.  The data in the first column of the entry after the update.
+**
+**    i.  Data from middle columns...
+**
+**    N.  The data in the last column of the entry after the update.
+**
+** The regRowid parameter is the index of the register containing (1).
+**
+** If isUpdate is true and rowidChng is non-zero, then rowidChng contains
+** the address of a register containing the rowid before the update takes
+** place. isUpdate is true for UPDATEs and false for INSERTs. If isUpdate
+** is false, indicating an INSERT statement, then a non-zero rowidChng 
+** indicates that the rowid was explicitly specified as part of the
+** INSERT statement. If rowidChng is false, it means that  the rowid is
+** computed automatically in an insert or that the rowid value is not 
+** modified by an update.
+**
+** The code generated by this routine store new index entries into
+** registers identified by aRegIdx[].  No index entry is created for
+** indices where aRegIdx[i]==0.  The order of indices in aRegIdx[] is
+** the same as the order of indices on the linked list of indices
+** attached to the table.
+**
+** This routine also generates code to check constraints.  NOT NULL,
+** CHECK, and UNIQUE constraints are all checked.  If a constraint fails,
+** then the appropriate action is performed.  There are five possible
+** actions: ROLLBACK, ABORT, FAIL, REPLACE, and IGNORE.
+**
+**  Constraint type  Action       What Happens
+**  ---------------  ----------   ----------------------------------------
+**  any              ROLLBACK     The current transaction is rolled back and
+**                                sqlite3_exec() returns immediately with a
+**                                return code of SQLITE_CONSTRAINT.
+**
+**  any              ABORT        Back out changes from the current command
+**                                only (do not do a complete rollback) then
+**                                cause sqlite3_exec() to return immediately
+**                                with SQLITE_CONSTRAINT.
+**
+**  any              FAIL         Sqlite_exec() returns immediately with a
+**                                return code of SQLITE_CONSTRAINT.  The
+**                                transaction is not rolled back and any
+**                                prior changes are retained.
+**
+**  any              IGNORE       The record number and data is popped from
+**                                the stack and there is an immediate jump
+**                                to label ignoreDest.
+**
+**  NOT NULL         REPLACE      The NULL value is replace by the default
+**                                value for that column.  If the default value
+**                                is NULL, the action is the same as ABORT.
+**
+**  UNIQUE           REPLACE      The other row that conflicts with the row
+**                                being inserted is removed.
+**
+**  CHECK            REPLACE      Illegal.  The results in an exception.
+**
+** Which action to take is determined by the overrideError parameter.
+** Or if overrideError==OE_Default, then the pParse->onError parameter
+** is used.  Or if pParse->onError==OE_Default then the onError value
+** for the constraint is used.
+**
+** The calling routine must open a read/write cursor for pTab with
+** cursor number "baseCur".  All indices of pTab must also have open
+** read/write cursors with cursor number baseCur+i for the i-th cursor.
+** Except, if there is no possibility of a REPLACE action then
+** cursors do not need to be open for indices where aRegIdx[i]==0.
+*/
+SQLITE_PRIVATE void sqlite3GenerateConstraintChecks(
+  Parse *pParse,      /* The parser context */
+  Table *pTab,        /* the table into which we are inserting */
+  int baseCur,        /* Index of a read/write cursor pointing at pTab */
+  int regRowid,       /* Index of the range of input registers */
+  int *aRegIdx,       /* Register used by each index.  0 for unused indices */
+  int rowidChng,      /* True if the rowid might collide with existing entry */
+  int isUpdate,       /* True for UPDATE, False for INSERT */
+  int overrideError,  /* Override onError to this if not OE_Default */
+  int ignoreDest,     /* Jump to this label on an OE_Ignore resolution */
+  int *pbMayReplace   /* OUT: Set to true if constraint may cause a replace */
+){
+  int i;              /* loop counter */
+  Vdbe *v;            /* VDBE under constrution */
+  int nCol;           /* Number of columns */
+  int onError;        /* Conflict resolution strategy */
+  int j1;             /* Addresss of jump instruction */
+  int j2 = 0, j3;     /* Addresses of jump instructions */
+  int regData;        /* Register containing first data column */
+  int iCur;           /* Table cursor number */
+  Index *pIdx;         /* Pointer to one of the indices */
+  int seenReplace = 0; /* True if REPLACE is used to resolve INT PK conflict */
+  int regOldRowid = (rowidChng && isUpdate) ? rowidChng : regRowid;
+
+  v = sqlite3GetVdbe(pParse);
+  assert( v!=0 );
+  assert( pTab->pSelect==0 );  /* This table is not a VIEW */
+  nCol = pTab->nCol;
+  regData = regRowid + 1;
+
+  /* Test all NOT NULL constraints.
+  */
+  for(i=0; i<nCol; i++){
+    if( i==pTab->iPKey ){
+      continue;
+    }
+    onError = pTab->aCol[i].notNull;
+    if( onError==OE_None ) continue;
+    if( overrideError!=OE_Default ){
+      onError = overrideError;
+    }else if( onError==OE_Default ){
+      onError = OE_Abort;
+    }
+    if( onError==OE_Replace && pTab->aCol[i].pDflt==0 ){
+      onError = OE_Abort;
+    }
+    assert( onError==OE_Rollback || onError==OE_Abort || onError==OE_Fail
+        || onError==OE_Ignore || onError==OE_Replace );
+    switch( onError ){
+      case OE_Abort:
+        sqlite3MayAbort(pParse);
+      case OE_Rollback:
+      case OE_Fail: {
+        char *zMsg;
+        sqlite3VdbeAddOp3(v, OP_HaltIfNull,
+                                  SQLITE_CONSTRAINT, onError, regData+i);
+        zMsg = sqlite3MPrintf(pParse->db, "%s.%s may not be NULL",
+                              pTab->zName, pTab->aCol[i].zName);
+        sqlite3VdbeChangeP4(v, -1, zMsg, P4_DYNAMIC);
+        break;
+      }
+      case OE_Ignore: {
+        sqlite3VdbeAddOp2(v, OP_IsNull, regData+i, ignoreDest);
+        break;
+      }
+      default: {
+        assert( onError==OE_Replace );
+        j1 = sqlite3VdbeAddOp1(v, OP_NotNull, regData+i);
+        sqlite3ExprCode(pParse, pTab->aCol[i].pDflt, regData+i);
+        sqlite3VdbeJumpHere(v, j1);
+        break;
+      }
+    }
+  }
+
+  /* Test all CHECK constraints
+  */
+#ifndef SQLITE_OMIT_CHECK
+  if( pTab->pCheck && (pParse->db->flags & SQLITE_IgnoreChecks)==0 ){
+    int allOk = sqlite3VdbeMakeLabel(v);
+    pParse->ckBase = regData;
+    sqlite3ExprIfTrue(pParse, pTab->pCheck, allOk, SQLITE_JUMPIFNULL);
+    onError = overrideError!=OE_Default ? overrideError : OE_Abort;
+    if( onError==OE_Ignore ){
+      sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
+    }else{
+      if( onError==OE_Replace ) onError = OE_Abort; /* IMP: R-15569-63625 */
+      sqlite3HaltConstraint(pParse, onError, 0, 0);
+    }
+    sqlite3VdbeResolveLabel(v, allOk);
+  }
+#endif /* !defined(SQLITE_OMIT_CHECK) */
+
+  /* If we have an INTEGER PRIMARY KEY, make sure the primary key
+  ** of the new record does not previously exist.  Except, if this
+  ** is an UPDATE and the primary key is not changing, that is OK.
+  */
+  if( rowidChng ){
+    onError = pTab->keyConf;
+    if( overrideError!=OE_Default ){
+      onError = overrideError;
+    }else if( onError==OE_Default ){
+      onError = OE_Abort;
+    }
+    
+    if( isUpdate ){
+      j2 = sqlite3VdbeAddOp3(v, OP_Eq, regRowid, 0, rowidChng);
+    }
+    j3 = sqlite3VdbeAddOp3(v, OP_NotExists, baseCur, 0, regRowid);
+    switch( onError ){
+      default: {
+        onError = OE_Abort;
+        /* Fall thru into the next case */
+      }
+      case OE_Rollback:
+      case OE_Abort:
+      case OE_Fail: {
+        sqlite3HaltConstraint(
+          pParse, onError, "PRIMARY KEY must be unique", P4_STATIC);
+        break;
+      }
+      case OE_Replace: {
+        /* If there are DELETE triggers on this table and the
+        ** recursive-triggers flag is set, call GenerateRowDelete() to
+        ** remove the conflicting row from the the table. This will fire
+        ** the triggers and remove both the table and index b-tree entries.
+        **
+        ** Otherwise, if there are no triggers or the recursive-triggers
+        ** flag is not set, but the table has one or more indexes, call 
+        ** GenerateRowIndexDelete(). This removes the index b-tree entries 
+        ** only. The table b-tree entry will be replaced by the new entry 
+        ** when it is inserted.  
+        **
+        ** If either GenerateRowDelete() or GenerateRowIndexDelete() is called,
+        ** also invoke MultiWrite() to indicate that this VDBE may require
+        ** statement rollback (if the statement is aborted after the delete
+        ** takes place). Earlier versions called sqlite3MultiWrite() regardless,
+        ** but being more selective here allows statements like:
+        **
+        **   REPLACE INTO t(rowid) VALUES($newrowid)
+        **
+        ** to run without a statement journal if there are no indexes on the
+        ** table.
+        */
+        Trigger *pTrigger = 0;
+        if( pParse->db->flags&SQLITE_RecTriggers ){
+          pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);
+        }
+        if( pTrigger || sqlite3FkRequired(pParse, pTab, 0, 0) ){
+          sqlite3MultiWrite(pParse);
+          sqlite3GenerateRowDelete(
+              pParse, pTab, baseCur, regRowid, 0, pTrigger, OE_Replace
+          );
+        }else if( pTab->pIndex ){
+          sqlite3MultiWrite(pParse);
+          sqlite3GenerateRowIndexDelete(pParse, pTab, baseCur, 0);
+        }
+        seenReplace = 1;
+        break;
+      }
+      case OE_Ignore: {
+        assert( seenReplace==0 );
+        sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
+        break;
+      }
+    }
+    sqlite3VdbeJumpHere(v, j3);
+    if( isUpdate ){
+      sqlite3VdbeJumpHere(v, j2);
+    }
+  }
+
+  /* Test all UNIQUE constraints by creating entries for each UNIQUE
+  ** index and making sure that duplicate entries do not already exist.
+  ** Add the new records to the indices as we go.
+  */
+  for(iCur=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, iCur++){
+    int regIdx;
+    int regR;
+
+    if( aRegIdx[iCur]==0 ) continue;  /* Skip unused indices */
+
+    /* Create a key for accessing the index entry */
+    regIdx = sqlite3GetTempRange(pParse, pIdx->nColumn+1);
+    for(i=0; i<pIdx->nColumn; i++){
+      int idx = pIdx->aiColumn[i];
+      if( idx==pTab->iPKey ){
+        sqlite3VdbeAddOp2(v, OP_SCopy, regRowid, regIdx+i);
+      }else{
+        sqlite3VdbeAddOp2(v, OP_SCopy, regData+idx, regIdx+i);
+      }
+    }
+    sqlite3VdbeAddOp2(v, OP_SCopy, regRowid, regIdx+i);
+    sqlite3VdbeAddOp3(v, OP_MakeRecord, regIdx, pIdx->nColumn+1, aRegIdx[iCur]);
+    sqlite3VdbeChangeP4(v, -1, sqlite3IndexAffinityStr(v, pIdx), P4_TRANSIENT);
+    sqlite3ExprCacheAffinityChange(pParse, regIdx, pIdx->nColumn+1);
+
+    /* Find out what action to take in case there is an indexing conflict */
+    onError = pIdx->onError;
+    if( onError==OE_None ){ 
+      sqlite3ReleaseTempRange(pParse, regIdx, pIdx->nColumn+1);
+      continue;  /* pIdx is not a UNIQUE index */
+    }
+    if( overrideError!=OE_Default ){
+      onError = overrideError;
+    }else if( onError==OE_Default ){
+      onError = OE_Abort;
+    }
+    if( seenReplace ){
+      if( onError==OE_Ignore ) onError = OE_Replace;
+      else if( onError==OE_Fail ) onError = OE_Abort;
+    }
+    
+    /* Check to see if the new index entry will be unique */
+    regR = sqlite3GetTempReg(pParse);
+    sqlite3VdbeAddOp2(v, OP_SCopy, regOldRowid, regR);
+    j3 = sqlite3VdbeAddOp4(v, OP_IsUnique, baseCur+iCur+1, 0,
+                           regR, SQLITE_INT_TO_PTR(regIdx),
+                           P4_INT32);
+    sqlite3ReleaseTempRange(pParse, regIdx, pIdx->nColumn+1);
+
+    /* Generate code that executes if the new index entry is not unique */
+    assert( onError==OE_Rollback || onError==OE_Abort || onError==OE_Fail
+        || onError==OE_Ignore || onError==OE_Replace );
+    switch( onError ){
+      case OE_Rollback:
+      case OE_Abort:
+      case OE_Fail: {
+        int j;
+        StrAccum errMsg;
+        const char *zSep;
+        char *zErr;
+
+        sqlite3StrAccumInit(&errMsg, 0, 0, 200);
+        errMsg.db = pParse->db;
+        zSep = pIdx->nColumn>1 ? "columns " : "column ";
+        for(j=0; j<pIdx->nColumn; j++){
+          char *zCol = pTab->aCol[pIdx->aiColumn[j]].zName;
+          sqlite3StrAccumAppend(&errMsg, zSep, -1);
+          zSep = ", ";
+          sqlite3StrAccumAppend(&errMsg, zCol, -1);
+        }
+        sqlite3StrAccumAppend(&errMsg,
+            pIdx->nColumn>1 ? " are not unique" : " is not unique", -1);
+        zErr = sqlite3StrAccumFinish(&errMsg);
+        sqlite3HaltConstraint(pParse, onError, zErr, 0);
+        sqlite3DbFree(errMsg.db, zErr);
+        break;
+      }
+      case OE_Ignore: {
+        assert( seenReplace==0 );
+        sqlite3VdbeAddOp2(v, OP_Goto, 0, ignoreDest);
+        break;
+      }
+      default: {
+        Trigger *pTrigger = 0;
+        assert( onError==OE_Replace );
+        sqlite3MultiWrite(pParse);
+        if( pParse->db->flags&SQLITE_RecTriggers ){
+          pTrigger = sqlite3TriggersExist(pParse, pTab, TK_DELETE, 0, 0);
+        }
+        sqlite3GenerateRowDelete(
+            pParse, pTab, baseCur, regR, 0, pTrigger, OE_Replace
+        );
+        seenReplace = 1;
+        break;
+      }
+    }
+    sqlite3VdbeJumpHere(v, j3);
+    sqlite3ReleaseTempReg(pParse, regR);
+  }
+  
+  if( pbMayReplace ){
+    *pbMayReplace = seenReplace;
+  }
+}
+
+/*
+** This routine generates code to finish the INSERT or UPDATE operation
+** that was started by a prior call to sqlite3GenerateConstraintChecks.
+** A consecutive range of registers starting at regRowid contains the
+** rowid and the content to be inserted.
+**
+** The arguments to this routine should be the same as the first six
+** arguments to sqlite3GenerateConstraintChecks.
+*/
+SQLITE_PRIVATE void sqlite3CompleteInsertion(
+  Parse *pParse,      /* The parser context */
+  Table *pTab,        /* the table into which we are inserting */
+  int baseCur,        /* Index of a read/write cursor pointing at pTab */
+  int regRowid,       /* Range of content */
+  int *aRegIdx,       /* Register used by each index.  0 for unused indices */
+  int isUpdate,       /* True for UPDATE, False for INSERT */
+  int appendBias,     /* True if this is likely to be an append */
+  int useSeekResult   /* True to set the USESEEKRESULT flag on OP_[Idx]Insert */
+){
+  int i;
+  Vdbe *v;
+  int nIdx;
+  Index *pIdx;
+  u8 pik_flags;
+  int regData;
+  int regRec;
+
+  v = sqlite3GetVdbe(pParse);
+  assert( v!=0 );
+  assert( pTab->pSelect==0 );  /* This table is not a VIEW */
+  for(nIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdx++){}
+  for(i=nIdx-1; i>=0; i--){
+    if( aRegIdx[i]==0 ) continue;
+    sqlite3VdbeAddOp2(v, OP_IdxInsert, baseCur+i+1, aRegIdx[i]);
+    if( useSeekResult ){
+      sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
+    }
+  }
+  regData = regRowid + 1;
+  regRec = sqlite3GetTempReg(pParse);
+  sqlite3VdbeAddOp3(v, OP_MakeRecord, regData, pTab->nCol, regRec);
+  sqlite3TableAffinityStr(v, pTab);
+  sqlite3ExprCacheAffinityChange(pParse, regData, pTab->nCol);
+  if( pParse->nested ){
+    pik_flags = 0;
+  }else{
+    pik_flags = OPFLAG_NCHANGE;
+    pik_flags |= (isUpdate?OPFLAG_ISUPDATE:OPFLAG_LASTROWID);
+  }
+  if( appendBias ){
+    pik_flags |= OPFLAG_APPEND;
+  }
+  if( useSeekResult ){
+    pik_flags |= OPFLAG_USESEEKRESULT;
+  }
+  sqlite3VdbeAddOp3(v, OP_Insert, baseCur, regRec, regRowid);
+  if( !pParse->nested ){
+    sqlite3VdbeChangeP4(v, -1, pTab->zName, P4_TRANSIENT);
+  }
+  sqlite3VdbeChangeP5(v, pik_flags);
+}
+
+/*
+** Generate code that will open cursors for a table and for all
+** indices of that table.  The "baseCur" parameter is the cursor number used
+** for the table.  Indices are opened on subsequent cursors.
+**
+** Return the number of indices on the table.
+*/
+SQLITE_PRIVATE int sqlite3OpenTableAndIndices(
+  Parse *pParse,   /* Parsing context */
+  Table *pTab,     /* Table to be opened */
+  int baseCur,     /* Cursor number assigned to the table */
+  int op           /* OP_OpenRead or OP_OpenWrite */
+){
+  int i;
+  int iDb;
+  Index *pIdx;
+  Vdbe *v;
+
+  if( IsVirtual(pTab) ) return 0;
+  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
+  v = sqlite3GetVdbe(pParse);
+  assert( v!=0 );
+  sqlite3OpenTable(pParse, baseCur, iDb, pTab, op);
+  for(i=1, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
+    KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
+    assert( pIdx->pSchema==pTab->pSchema );
+    sqlite3VdbeAddOp4(v, op, i+baseCur, pIdx->tnum, iDb,
+                      (char*)pKey, P4_KEYINFO_HANDOFF);
+    VdbeComment((v, "%s", pIdx->zName));
+  }
+  if( pParse->nTab<baseCur+i ){
+    pParse->nTab = baseCur+i;
+  }
+  return i-1;
+}
+
+
+#ifdef SQLITE_TEST
+/*
+** The following global variable is incremented whenever the
+** transfer optimization is used.  This is used for testing
+** purposes only - to make sure the transfer optimization really
+** is happening when it is suppose to.
+*/
+SQLITE_API int sqlite3_xferopt_count;
+#endif /* SQLITE_TEST */
+
+
+#ifndef SQLITE_OMIT_XFER_OPT
+/*
+** Check to collation names to see if they are compatible.
+*/
+static int xferCompatibleCollation(const char *z1, const char *z2){
+  if( z1==0 ){
+    return z2==0;
+  }
+  if( z2==0 ){
+    return 0;
+  }
+  return sqlite3StrICmp(z1, z2)==0;
+}
+
+
+/*
+** Check to see if index pSrc is compatible as a source of data
+** for index pDest in an insert transfer optimization.  The rules
+** for a compatible index:
+**
+**    *   The index is over the same set of columns
+**    *   The same DESC and ASC markings occurs on all columns
+**    *   The same onError processing (OE_Abort, OE_Ignore, etc)
+**    *   The same collating sequence on each column
+*/
+static int xferCompatibleIndex(Index *pDest, Index *pSrc){
+  int i;
+  assert( pDest && pSrc );
+  assert( pDest->pTable!=pSrc->pTable );
+  if( pDest->nColumn!=pSrc->nColumn ){
+    return 0;   /* Different number of columns */
+  }
+  if( pDest->onError!=pSrc->onError ){
+    return 0;   /* Different conflict resolution strategies */
+  }
+  for(i=0; i<pSrc->nColumn; i++){
+    if( pSrc->aiColumn[i]!=pDest->aiColumn[i] ){
+      return 0;   /* Different columns indexed */
+    }
+    if( pSrc->aSortOrder[i]!=pDest->aSortOrder[i] ){
+      return 0;   /* Different sort orders */
+    }
+    if( !xferCompatibleCollation(pSrc->azColl[i],pDest->azColl[i]) ){
+      return 0;   /* Different collating sequences */
+    }
+  }
+
+  /* If no test above fails then the indices must be compatible */
+  return 1;
+}
+
+/*
+** Attempt the transfer optimization on INSERTs of the form
+**
+**     INSERT INTO tab1 SELECT * FROM tab2;
+**
+** This optimization is only attempted if
+**
+**    (1)  tab1 and tab2 have identical schemas including all the
+**         same indices and constraints
+**
+**    (2)  tab1 and tab2 are different tables
+**
+**    (3)  There must be no triggers on tab1
+**
+**    (4)  The result set of the SELECT statement is "*"
+**
+**    (5)  The SELECT statement has no WHERE, HAVING, ORDER BY, GROUP BY,
+**         or LIMIT clause.
+**
+**    (6)  The SELECT statement is a simple (not a compound) select that
+**         contains only tab2 in its FROM clause
+**
+** This method for implementing the INSERT transfers raw records from
+** tab2 over to tab1.  The columns are not decoded.  Raw records from
+** the indices of tab2 are transfered to tab1 as well.  In so doing,
+** the resulting tab1 has much less fragmentation.
+**
+** This routine returns TRUE if the optimization is attempted.  If any
+** of the conditions above fail so that the optimization should not
+** be attempted, then this routine returns FALSE.
+*/
+static int xferOptimization(
+  Parse *pParse,        /* Parser context */
+  Table *pDest,         /* The table we are inserting into */
+  Select *pSelect,      /* A SELECT statement to use as the data source */
+  int onError,          /* How to handle constraint errors */
+  int iDbDest           /* The database of pDest */
+){
+  ExprList *pEList;                /* The result set of the SELECT */
+  Table *pSrc;                     /* The table in the FROM clause of SELECT */
+  Index *pSrcIdx, *pDestIdx;       /* Source and destination indices */
+  struct SrcList_item *pItem;      /* An element of pSelect->pSrc */
+  int i;                           /* Loop counter */
+  int iDbSrc;                      /* The database of pSrc */
+  int iSrc, iDest;                 /* Cursors from source and destination */
+  int addr1, addr2;                /* Loop addresses */
+  int emptyDestTest;               /* Address of test for empty pDest */
+  int emptySrcTest;                /* Address of test for empty pSrc */
+  Vdbe *v;                         /* The VDBE we are building */
+  KeyInfo *pKey;                   /* Key information for an index */
+  int regAutoinc;                  /* Memory register used by AUTOINC */
+  int destHasUniqueIdx = 0;        /* True if pDest has a UNIQUE index */
+  int regData, regRowid;           /* Registers holding data and rowid */
+
+  if( pSelect==0 ){
+    return 0;   /* Must be of the form  INSERT INTO ... SELECT ... */
+  }
+  if( sqlite3TriggerList(pParse, pDest) ){
+    return 0;   /* tab1 must not have triggers */
+  }
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  if( pDest->tabFlags & TF_Virtual ){
+    return 0;   /* tab1 must not be a virtual table */
+  }
+#endif
+  if( onError==OE_Default ){
+    onError = OE_Abort;
+  }
+  if( onError!=OE_Abort && onError!=OE_Rollback ){
+    return 0;   /* Cannot do OR REPLACE or OR IGNORE or OR FAIL */
+  }
+  assert(pSelect->pSrc);   /* allocated even if there is no FROM clause */
+  if( pSelect->pSrc->nSrc!=1 ){
+    return 0;   /* FROM clause must have exactly one term */
+  }
+  if( pSelect->pSrc->a[0].pSelect ){
+    return 0;   /* FROM clause cannot contain a subquery */
+  }
+  if( pSelect->pWhere ){
+    return 0;   /* SELECT may not have a WHERE clause */
+  }
+  if( pSelect->pOrderBy ){
+    return 0;   /* SELECT may not have an ORDER BY clause */
+  }
+  /* Do not need to test for a HAVING clause.  If HAVING is present but
+  ** there is no ORDER BY, we will get an error. */
+  if( pSelect->pGroupBy ){
+    return 0;   /* SELECT may not have a GROUP BY clause */
+  }
+  if( pSelect->pLimit ){
+    return 0;   /* SELECT may not have a LIMIT clause */
+  }
+  assert( pSelect->pOffset==0 );  /* Must be so if pLimit==0 */
+  if( pSelect->pPrior ){
+    return 0;   /* SELECT may not be a compound query */
+  }
+  if( pSelect->selFlags & SF_Distinct ){
+    return 0;   /* SELECT may not be DISTINCT */
+  }
+  pEList = pSelect->pEList;
+  assert( pEList!=0 );
+  if( pEList->nExpr!=1 ){
+    return 0;   /* The result set must have exactly one column */
+  }
+  assert( pEList->a[0].pExpr );
+  if( pEList->a[0].pExpr->op!=TK_ALL ){
+    return 0;   /* The result set must be the special operator "*" */
+  }
+
+  /* At this point we have established that the statement is of the
+  ** correct syntactic form to participate in this optimization.  Now
+  ** we have to check the semantics.
+  */
+  pItem = pSelect->pSrc->a;
+  pSrc = sqlite3LocateTable(pParse, 0, pItem->zName, pItem->zDatabase);
+  if( pSrc==0 ){
+    return 0;   /* FROM clause does not contain a real table */
+  }
+  if( pSrc==pDest ){
+    return 0;   /* tab1 and tab2 may not be the same table */
+  }
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  if( pSrc->tabFlags & TF_Virtual ){
+    return 0;   /* tab2 must not be a virtual table */
+  }
+#endif
+  if( pSrc->pSelect ){
+    return 0;   /* tab2 may not be a view */
+  }
+  if( pDest->nCol!=pSrc->nCol ){
+    return 0;   /* Number of columns must be the same in tab1 and tab2 */
+  }
+  if( pDest->iPKey!=pSrc->iPKey ){
+    return 0;   /* Both tables must have the same INTEGER PRIMARY KEY */
+  }
+  for(i=0; i<pDest->nCol; i++){
+    if( pDest->aCol[i].affinity!=pSrc->aCol[i].affinity ){
+      return 0;    /* Affinity must be the same on all columns */
+    }
+    if( !xferCompatibleCollation(pDest->aCol[i].zColl, pSrc->aCol[i].zColl) ){
+      return 0;    /* Collating sequence must be the same on all columns */
+    }
+    if( pDest->aCol[i].notNull && !pSrc->aCol[i].notNull ){
+      return 0;    /* tab2 must be NOT NULL if tab1 is */
+    }
+  }
+  for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
+    if( pDestIdx->onError!=OE_None ){
+      destHasUniqueIdx = 1;
+    }
+    for(pSrcIdx=pSrc->pIndex; pSrcIdx; pSrcIdx=pSrcIdx->pNext){
+      if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
+    }
+    if( pSrcIdx==0 ){
+      return 0;    /* pDestIdx has no corresponding index in pSrc */
+    }
+  }
+#ifndef SQLITE_OMIT_CHECK
+  if( pDest->pCheck && sqlite3ExprCompare(pSrc->pCheck, pDest->pCheck) ){
+    return 0;   /* Tables have different CHECK constraints.  Ticket #2252 */
+  }
+#endif
+
+  /* If we get this far, it means either:
+  **
+  **    *   We can always do the transfer if the table contains an
+  **        an integer primary key
+  **
+  **    *   We can conditionally do the transfer if the destination
+  **        table is empty.
+  */
+#ifdef SQLITE_TEST
+  sqlite3_xferopt_count++;
+#endif
+  iDbSrc = sqlite3SchemaToIndex(pParse->db, pSrc->pSchema);
+  v = sqlite3GetVdbe(pParse);
+  sqlite3CodeVerifySchema(pParse, iDbSrc);
+  iSrc = pParse->nTab++;
+  iDest = pParse->nTab++;
+  regAutoinc = autoIncBegin(pParse, iDbDest, pDest);
+  sqlite3OpenTable(pParse, iDest, iDbDest, pDest, OP_OpenWrite);
+  if( (pDest->iPKey<0 && pDest->pIndex!=0) || destHasUniqueIdx ){
+    /* If tables do not have an INTEGER PRIMARY KEY and there
+    ** are indices to be copied and the destination is not empty,
+    ** we have to disallow the transfer optimization because the
+    ** the rowids might change which will mess up indexing.
+    **
+    ** Or if the destination has a UNIQUE index and is not empty,
+    ** we also disallow the transfer optimization because we cannot
+    ** insure that all entries in the union of DEST and SRC will be
+    ** unique.
+    */
+    addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iDest, 0);
+    emptyDestTest = sqlite3VdbeAddOp2(v, OP_Goto, 0, 0);
+    sqlite3VdbeJumpHere(v, addr1);
+  }else{
+    emptyDestTest = 0;
+  }
+  sqlite3OpenTable(pParse, iSrc, iDbSrc, pSrc, OP_OpenRead);
+  emptySrcTest = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0);
+  regData = sqlite3GetTempReg(pParse);
+  regRowid = sqlite3GetTempReg(pParse);
+  if( pDest->iPKey>=0 ){
+    addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
+    addr2 = sqlite3VdbeAddOp3(v, OP_NotExists, iDest, 0, regRowid);
+    sqlite3HaltConstraint(
+        pParse, onError, "PRIMARY KEY must be unique", P4_STATIC);
+    sqlite3VdbeJumpHere(v, addr2);
+    autoIncStep(pParse, regAutoinc, regRowid);
+  }else if( pDest->pIndex==0 ){
+    addr1 = sqlite3VdbeAddOp2(v, OP_NewRowid, iDest, regRowid);
+  }else{
+    addr1 = sqlite3VdbeAddOp2(v, OP_Rowid, iSrc, regRowid);
+    assert( (pDest->tabFlags & TF_Autoincrement)==0 );
+  }
+  sqlite3VdbeAddOp2(v, OP_RowData, iSrc, regData);
+  sqlite3VdbeAddOp3(v, OP_Insert, iDest, regData, regRowid);
+  sqlite3VdbeChangeP5(v, OPFLAG_NCHANGE|OPFLAG_LASTROWID|OPFLAG_APPEND);
+  sqlite3VdbeChangeP4(v, -1, pDest->zName, 0);
+  sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1);
+  for(pDestIdx=pDest->pIndex; pDestIdx; pDestIdx=pDestIdx->pNext){
+    for(pSrcIdx=pSrc->pIndex; ALWAYS(pSrcIdx); pSrcIdx=pSrcIdx->pNext){
+      if( xferCompatibleIndex(pDestIdx, pSrcIdx) ) break;
+    }
+    assert( pSrcIdx );
+    sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
+    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
+    pKey = sqlite3IndexKeyinfo(pParse, pSrcIdx);
+    sqlite3VdbeAddOp4(v, OP_OpenRead, iSrc, pSrcIdx->tnum, iDbSrc,
+                      (char*)pKey, P4_KEYINFO_HANDOFF);
+    VdbeComment((v, "%s", pSrcIdx->zName));
+    pKey = sqlite3IndexKeyinfo(pParse, pDestIdx);
+    sqlite3VdbeAddOp4(v, OP_OpenWrite, iDest, pDestIdx->tnum, iDbDest,
+                      (char*)pKey, P4_KEYINFO_HANDOFF);
+    VdbeComment((v, "%s", pDestIdx->zName));
+    addr1 = sqlite3VdbeAddOp2(v, OP_Rewind, iSrc, 0);
+    sqlite3VdbeAddOp2(v, OP_RowKey, iSrc, regData);
+    sqlite3VdbeAddOp3(v, OP_IdxInsert, iDest, regData, 1);
+    sqlite3VdbeAddOp2(v, OP_Next, iSrc, addr1+1);
+    sqlite3VdbeJumpHere(v, addr1);
+  }
+  sqlite3VdbeJumpHere(v, emptySrcTest);
+  sqlite3ReleaseTempReg(pParse, regRowid);
+  sqlite3ReleaseTempReg(pParse, regData);
+  sqlite3VdbeAddOp2(v, OP_Close, iSrc, 0);
+  sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
+  if( emptyDestTest ){
+    sqlite3VdbeAddOp2(v, OP_Halt, SQLITE_OK, 0);
+    sqlite3VdbeJumpHere(v, emptyDestTest);
+    sqlite3VdbeAddOp2(v, OP_Close, iDest, 0);
+    return 0;
+  }else{
+    return 1;
+  }
+}
+#endif /* SQLITE_OMIT_XFER_OPT */
+
+/************** End of insert.c **********************************************/
+/************** Begin file legacy.c ******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** Main file for the SQLite library.  The routines in this file
+** implement the programmer interface to the library.  Routines in
+** other files are for internal use by SQLite and should not be
+** accessed by users of the library.
+*/
+
+
+/*
+** Execute SQL code.  Return one of the SQLITE_ success/failure
+** codes.  Also write an error message into memory obtained from
+** malloc() and make *pzErrMsg point to that message.
+**
+** If the SQL is a query, then for each row in the query result
+** the xCallback() function is called.  pArg becomes the first
+** argument to xCallback().  If xCallback=NULL then no callback
+** is invoked, even for queries.
+*/
+SQLITE_API int sqlite3_exec(
+  sqlite3 *db,                /* The database on which the SQL executes */
+  const char *zSql,           /* The SQL to be executed */
+  sqlite3_callback xCallback, /* Invoke this callback routine */
+  void *pArg,                 /* First argument to xCallback() */
+  char **pzErrMsg             /* Write error messages here */
+){
+  int rc = SQLITE_OK;         /* Return code */
+  const char *zLeftover;      /* Tail of unprocessed SQL */
+  sqlite3_stmt *pStmt = 0;    /* The current SQL statement */
+  char **azCols = 0;          /* Names of result columns */
+  int nRetry = 0;             /* Number of retry attempts */
+  int callbackIsInit;         /* True if callback data is initialized */
+
+  if( !sqlite3SafetyCheckOk(db) ) return SQLITE_MISUSE_BKPT;
+  if( zSql==0 ) zSql = "";
+
+  sqlite3_mutex_enter(db->mutex);
+  sqlite3Error(db, SQLITE_OK, 0);
+  while( (rc==SQLITE_OK || (rc==SQLITE_SCHEMA && (++nRetry)<2)) && zSql[0] ){
+    int nCol;
+    char **azVals = 0;
+
+    pStmt = 0;
+    rc = sqlite3_prepare(db, zSql, -1, &pStmt, &zLeftover);
+    assert( rc==SQLITE_OK || pStmt==0 );
+    if( rc!=SQLITE_OK ){
+      continue;
+    }
+    if( !pStmt ){
+      /* this happens for a comment or white-space */
+      zSql = zLeftover;
+      continue;
+    }
+
+    callbackIsInit = 0;
+    nCol = sqlite3_column_count(pStmt);
+
+    for(;;) {
+      int i;
+      rc = sqlite3_step(pStmt);
+
+      /* Invoke the callback function if required */
+      if( xCallback && (SQLITE_ROW==rc || 
+          (SQLITE_DONE==rc && !callbackIsInit
+                           && db->flags&SQLITE_NullCallback)) ){
+        if( !callbackIsInit ){
+          azCols = sqlite3DbMallocZero(db, 2*nCol*sizeof(const char*) + 1);
+          if( azCols==0 ){
+            goto exec_out;
+          }
+          for(i=0; i<nCol; i++){
+            azCols[i] = (char *)sqlite3_column_name(pStmt, i);
+            /* sqlite3VdbeSetColName() installs column names as UTF8
+            ** strings so there is no way for sqlite3_column_name() to fail. */
+            assert( azCols[i]!=0 );
+          }
+          callbackIsInit = 1;
+        }
+        if( rc==SQLITE_ROW ){
+          azVals = &azCols[nCol];
+          for(i=0; i<nCol; i++){
+            azVals[i] = (char *)sqlite3_column_text(pStmt, i);
+            if( !azVals[i] && sqlite3_column_type(pStmt, i)!=SQLITE_NULL ){
+              db->mallocFailed = 1;
+              goto exec_out;
+            }
+          }
+        }
+        if( xCallback(pArg, nCol, azVals, azCols) ){
+          rc = SQLITE_ABORT;
+          sqlite3VdbeFinalize((Vdbe *)pStmt);
+          pStmt = 0;
+          sqlite3Error(db, SQLITE_ABORT, 0);
+          goto exec_out;
+        }
+      }
+
+      if( rc!=SQLITE_ROW ){
+        rc = sqlite3VdbeFinalize((Vdbe *)pStmt);
+        pStmt = 0;
+        if( rc!=SQLITE_SCHEMA ){
+          nRetry = 0;
+          zSql = zLeftover;
+          while( sqlite3Isspace(zSql[0]) ) zSql++;
+        }
+        break;
+      }
+    }
+
+    sqlite3DbFree(db, azCols);
+    azCols = 0;
+  }
+
+exec_out:
+  if( pStmt ) sqlite3VdbeFinalize((Vdbe *)pStmt);
+  sqlite3DbFree(db, azCols);
+
+  rc = sqlite3ApiExit(db, rc);
+  if( rc!=SQLITE_OK && ALWAYS(rc==sqlite3_errcode(db)) && pzErrMsg ){
+    int nErrMsg = 1 + sqlite3Strlen30(sqlite3_errmsg(db));
+    *pzErrMsg = sqlite3Malloc(nErrMsg);
+    if( *pzErrMsg ){
+      memcpy(*pzErrMsg, sqlite3_errmsg(db), nErrMsg);
+    }else{
+      rc = SQLITE_NOMEM;
+      sqlite3Error(db, SQLITE_NOMEM, 0);
+    }
+  }else if( pzErrMsg ){
+    *pzErrMsg = 0;
+  }
+
+  assert( (rc&db->errMask)==rc );
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+/************** End of legacy.c **********************************************/
+/************** Begin file loadext.c *****************************************/
+/*
+** 2006 June 7
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains code used to dynamically load extensions into
+** the SQLite library.
+*/
+
+#ifndef SQLITE_CORE
+  #define SQLITE_CORE 1  /* Disable the API redefinition in sqlite3ext.h */
+#endif
+/************** Include sqlite3ext.h in the middle of loadext.c **************/
+/************** Begin file sqlite3ext.h **************************************/
+/*
+** 2006 June 7
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This header file defines the SQLite interface for use by
+** shared libraries that want to be imported as extensions into
+** an SQLite instance.  Shared libraries that intend to be loaded
+** as extensions by SQLite should #include this file instead of 
+** sqlite3.h.
+*/
+#ifndef _SQLITE3EXT_H_
+#define _SQLITE3EXT_H_
+
+typedef struct sqlite3_api_routines sqlite3_api_routines;
+
+/*
+** The following structure holds pointers to all of the SQLite API
+** routines.
+**
+** WARNING:  In order to maintain backwards compatibility, add new
+** interfaces to the end of this structure only.  If you insert new
+** interfaces in the middle of this structure, then older different
+** versions of SQLite will not be able to load each others' shared
+** libraries!
+*/
+struct sqlite3_api_routines {
+  void * (*aggregate_context)(sqlite3_context*,int nBytes);
+  int  (*aggregate_count)(sqlite3_context*);
+  int  (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
+  int  (*bind_double)(sqlite3_stmt*,int,double);
+  int  (*bind_int)(sqlite3_stmt*,int,int);
+  int  (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
+  int  (*bind_null)(sqlite3_stmt*,int);
+  int  (*bind_parameter_count)(sqlite3_stmt*);
+  int  (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
+  const char * (*bind_parameter_name)(sqlite3_stmt*,int);
+  int  (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
+  int  (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
+  int  (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
+  int  (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
+  int  (*busy_timeout)(sqlite3*,int ms);
+  int  (*changes)(sqlite3*);
+  int  (*close)(sqlite3*);
+  int  (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*));
+  int  (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*));
+  const void * (*column_blob)(sqlite3_stmt*,int iCol);
+  int  (*column_bytes)(sqlite3_stmt*,int iCol);
+  int  (*column_bytes16)(sqlite3_stmt*,int iCol);
+  int  (*column_count)(sqlite3_stmt*pStmt);
+  const char * (*column_database_name)(sqlite3_stmt*,int);
+  const void * (*column_database_name16)(sqlite3_stmt*,int);
+  const char * (*column_decltype)(sqlite3_stmt*,int i);
+  const void * (*column_decltype16)(sqlite3_stmt*,int);
+  double  (*column_double)(sqlite3_stmt*,int iCol);
+  int  (*column_int)(sqlite3_stmt*,int iCol);
+  sqlite_int64  (*column_int64)(sqlite3_stmt*,int iCol);
+  const char * (*column_name)(sqlite3_stmt*,int);
+  const void * (*column_name16)(sqlite3_stmt*,int);
+  const char * (*column_origin_name)(sqlite3_stmt*,int);
+  const void * (*column_origin_name16)(sqlite3_stmt*,int);
+  const char * (*column_table_name)(sqlite3_stmt*,int);
+  const void * (*column_table_name16)(sqlite3_stmt*,int);
+  const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
+  const void * (*column_text16)(sqlite3_stmt*,int iCol);
+  int  (*column_type)(sqlite3_stmt*,int iCol);
+  sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
+  void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
+  int  (*complete)(const char*sql);
+  int  (*complete16)(const void*sql);
+  int  (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*));
+  int  (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,int,const void*,int,const void*));
+  int  (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
+  int  (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
+  int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
+  int  (*data_count)(sqlite3_stmt*pStmt);
+  sqlite3 * (*db_handle)(sqlite3_stmt*);
+  int (*declare_vtab)(sqlite3*,const char*);
+  int  (*enable_shared_cache)(int);
+  int  (*errcode)(sqlite3*db);
+  const char * (*errmsg)(sqlite3*);
+  const void * (*errmsg16)(sqlite3*);
+  int  (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
+  int  (*expired)(sqlite3_stmt*);
+  int  (*finalize)(sqlite3_stmt*pStmt);
+  void  (*free)(void*);
+  void  (*free_table)(char**result);
+  int  (*get_autocommit)(sqlite3*);
+  void * (*get_auxdata)(sqlite3_context*,int);
+  int  (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
+  int  (*global_recover)(void);
+  void  (*interruptx)(sqlite3*);
+  sqlite_int64  (*last_insert_rowid)(sqlite3*);
+  const char * (*libversion)(void);
+  int  (*libversion_number)(void);
+  void *(*malloc)(int);
+  char * (*mprintf)(const char*,...);
+  int  (*open)(const char*,sqlite3**);
+  int  (*open16)(const void*,sqlite3**);
+  int  (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
+  int  (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
+  void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
+  void  (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
+  void *(*realloc)(void*,int);
+  int  (*reset)(sqlite3_stmt*pStmt);
+  void  (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
+  void  (*result_double)(sqlite3_context*,double);
+  void  (*result_error)(sqlite3_context*,const char*,int);
+  void  (*result_error16)(sqlite3_context*,const void*,int);
+  void  (*result_int)(sqlite3_context*,int);
+  void  (*result_int64)(sqlite3_context*,sqlite_int64);
+  void  (*result_null)(sqlite3_context*);
+  void  (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
+  void  (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
+  void  (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
+  void  (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
+  void  (*result_value)(sqlite3_context*,sqlite3_value*);
+  void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
+  int  (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,const char*,const char*),void*);
+  void  (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
+  char * (*snprintf)(int,char*,const char*,...);
+  int  (*step)(sqlite3_stmt*);
+  int  (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,char const**,char const**,int*,int*,int*);
+  void  (*thread_cleanup)(void);
+  int  (*total_changes)(sqlite3*);
+  void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
+  int  (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
+  void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,sqlite_int64),void*);
+  void * (*user_data)(sqlite3_context*);
+  const void * (*value_blob)(sqlite3_value*);
+  int  (*value_bytes)(sqlite3_value*);
+  int  (*value_bytes16)(sqlite3_value*);
+  double  (*value_double)(sqlite3_value*);
+  int  (*value_int)(sqlite3_value*);
+  sqlite_int64  (*value_int64)(sqlite3_value*);
+  int  (*value_numeric_type)(sqlite3_value*);
+  const unsigned char * (*value_text)(sqlite3_value*);
+  const void * (*value_text16)(sqlite3_value*);
+  const void * (*value_text16be)(sqlite3_value*);
+  const void * (*value_text16le)(sqlite3_value*);
+  int  (*value_type)(sqlite3_value*);
+  char *(*vmprintf)(const char*,va_list);
+  /* Added ??? */
+  int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
+  /* Added by 3.3.13 */
+  int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
+  int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
+  int (*clear_bindings)(sqlite3_stmt*);
+  /* Added by 3.4.1 */
+  int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,void (*xDestroy)(void *));
+  /* Added by 3.5.0 */
+  int (*bind_zeroblob)(sqlite3_stmt*,int,int);
+  int (*blob_bytes)(sqlite3_blob*);
+  int (*blob_close)(sqlite3_blob*);
+  int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,int,sqlite3_blob**);
+  int (*blob_read)(sqlite3_blob*,void*,int,int);
+  int (*blob_write)(sqlite3_blob*,const void*,int,int);
+  int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*),void(*)(void*));
+  int (*file_control)(sqlite3*,const char*,int,void*);
+  sqlite3_int64 (*memory_highwater)(int);
+  sqlite3_int64 (*memory_used)(void);
+  sqlite3_mutex *(*mutex_alloc)(int);
+  void (*mutex_enter)(sqlite3_mutex*);
+  void (*mutex_free)(sqlite3_mutex*);
+  void (*mutex_leave)(sqlite3_mutex*);
+  int (*mutex_try)(sqlite3_mutex*);
+  int (*open_v2)(const char*,sqlite3**,int,const char*);
+  int (*release_memory)(int);
+  void (*result_error_nomem)(sqlite3_context*);
+  void (*result_error_toobig)(sqlite3_context*);
+  int (*sleep)(int);
+  void (*soft_heap_limit)(int);
+  sqlite3_vfs *(*vfs_find)(const char*);
+  int (*vfs_register)(sqlite3_vfs*,int);
+  int (*vfs_unregister)(sqlite3_vfs*);
+  int (*xthreadsafe)(void);
+  void (*result_zeroblob)(sqlite3_context*,int);
+  void (*result_error_code)(sqlite3_context*,int);
+  int (*test_control)(int, ...);
+  void (*randomness)(int,void*);
+  sqlite3 *(*context_db_handle)(sqlite3_context*);
+  int (*extended_result_codes)(sqlite3*,int);
+  int (*limit)(sqlite3*,int,int);
+  sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
+  const char *(*sql)(sqlite3_stmt*);
+  int (*status)(int,int*,int*,int);
+  int (*backup_finish)(sqlite3_backup*);
+  sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
+  int (*backup_pagecount)(sqlite3_backup*);
+  int (*backup_remaining)(sqlite3_backup*);
+  int (*backup_step)(sqlite3_backup*,int);
+  const char *(*compileoption_get)(int);
+  int (*compileoption_used)(const char*);
+  int (*create_function_v2)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*),void(*xDestroy)(void*));
+  int (*db_config)(sqlite3*,int,...);
+  sqlite3_mutex *(*db_mutex)(sqlite3*);
+  int (*db_status)(sqlite3*,int,int*,int*,int);
+  int (*extended_errcode)(sqlite3*);
+  void (*log)(int,const char*,...);
+  sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);
+  const char *(*sourceid)(void);
+  int (*stmt_status)(sqlite3_stmt*,int,int);
+  int (*strnicmp)(const char*,const char*,int);
+  int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
+  int (*wal_autocheckpoint)(sqlite3*,int);
+  int (*wal_checkpoint)(sqlite3*,const char*);
+  void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
+};
+
+/*
+** The following macros redefine the API routines so that they are
+** redirected throught the global sqlite3_api structure.
+**
+** This header file is also used by the loadext.c source file
+** (part of the main SQLite library - not an extension) so that
+** it can get access to the sqlite3_api_routines structure
+** definition.  But the main library does not want to redefine
+** the API.  So the redefinition macros are only valid if the
+** SQLITE_CORE macros is undefined.
+*/
+#ifndef SQLITE_CORE
+#define sqlite3_aggregate_context      sqlite3_api->aggregate_context
+#ifndef SQLITE_OMIT_DEPRECATED
+#define sqlite3_aggregate_count        sqlite3_api->aggregate_count
+#endif
+#define sqlite3_bind_blob              sqlite3_api->bind_blob
+#define sqlite3_bind_double            sqlite3_api->bind_double
+#define sqlite3_bind_int               sqlite3_api->bind_int
+#define sqlite3_bind_int64             sqlite3_api->bind_int64
+#define sqlite3_bind_null              sqlite3_api->bind_null
+#define sqlite3_bind_parameter_count   sqlite3_api->bind_parameter_count
+#define sqlite3_bind_parameter_index   sqlite3_api->bind_parameter_index
+#define sqlite3_bind_parameter_name    sqlite3_api->bind_parameter_name
+#define sqlite3_bind_text              sqlite3_api->bind_text
+#define sqlite3_bind_text16            sqlite3_api->bind_text16
+#define sqlite3_bind_value             sqlite3_api->bind_value
+#define sqlite3_busy_handler           sqlite3_api->busy_handler
+#define sqlite3_busy_timeout           sqlite3_api->busy_timeout
+#define sqlite3_changes                sqlite3_api->changes
+#define sqlite3_close                  sqlite3_api->close
+#define sqlite3_collation_needed       sqlite3_api->collation_needed
+#define sqlite3_collation_needed16     sqlite3_api->collation_needed16
+#define sqlite3_column_blob            sqlite3_api->column_blob
+#define sqlite3_column_bytes           sqlite3_api->column_bytes
+#define sqlite3_column_bytes16         sqlite3_api->column_bytes16
+#define sqlite3_column_count           sqlite3_api->column_count
+#define sqlite3_column_database_name   sqlite3_api->column_database_name
+#define sqlite3_column_database_name16 sqlite3_api->column_database_name16
+#define sqlite3_column_decltype        sqlite3_api->column_decltype
+#define sqlite3_column_decltype16      sqlite3_api->column_decltype16
+#define sqlite3_column_double          sqlite3_api->column_double
+#define sqlite3_column_int             sqlite3_api->column_int
+#define sqlite3_column_int64           sqlite3_api->column_int64
+#define sqlite3_column_name            sqlite3_api->column_name
+#define sqlite3_column_name16          sqlite3_api->column_name16
+#define sqlite3_column_origin_name     sqlite3_api->column_origin_name
+#define sqlite3_column_origin_name16   sqlite3_api->column_origin_name16
+#define sqlite3_column_table_name      sqlite3_api->column_table_name
+#define sqlite3_column_table_name16    sqlite3_api->column_table_name16
+#define sqlite3_column_text            sqlite3_api->column_text
+#define sqlite3_column_text16          sqlite3_api->column_text16
+#define sqlite3_column_type            sqlite3_api->column_type
+#define sqlite3_column_value           sqlite3_api->column_value
+#define sqlite3_commit_hook            sqlite3_api->commit_hook
+#define sqlite3_complete               sqlite3_api->complete
+#define sqlite3_complete16             sqlite3_api->complete16
+#define sqlite3_create_collation       sqlite3_api->create_collation
+#define sqlite3_create_collation16     sqlite3_api->create_collation16
+#define sqlite3_create_function        sqlite3_api->create_function
+#define sqlite3_create_function16      sqlite3_api->create_function16
+#define sqlite3_create_module          sqlite3_api->create_module
+#define sqlite3_create_module_v2       sqlite3_api->create_module_v2
+#define sqlite3_data_count             sqlite3_api->data_count
+#define sqlite3_db_handle              sqlite3_api->db_handle
+#define sqlite3_declare_vtab           sqlite3_api->declare_vtab
+#define sqlite3_enable_shared_cache    sqlite3_api->enable_shared_cache
+#define sqlite3_errcode                sqlite3_api->errcode
+#define sqlite3_errmsg                 sqlite3_api->errmsg
+#define sqlite3_errmsg16               sqlite3_api->errmsg16
+#define sqlite3_exec                   sqlite3_api->exec
+#ifndef SQLITE_OMIT_DEPRECATED
+#define sqlite3_expired                sqlite3_api->expired
+#endif
+#define sqlite3_finalize               sqlite3_api->finalize
+#define sqlite3_free                   sqlite3_api->free
+#define sqlite3_free_table             sqlite3_api->free_table
+#define sqlite3_get_autocommit         sqlite3_api->get_autocommit
+#define sqlite3_get_auxdata            sqlite3_api->get_auxdata
+#define sqlite3_get_table              sqlite3_api->get_table
+#ifndef SQLITE_OMIT_DEPRECATED
+#define sqlite3_global_recover         sqlite3_api->global_recover
+#endif
+#define sqlite3_interrupt              sqlite3_api->interruptx
+#define sqlite3_last_insert_rowid      sqlite3_api->last_insert_rowid
+#define sqlite3_libversion             sqlite3_api->libversion
+#define sqlite3_libversion_number      sqlite3_api->libversion_number
+#define sqlite3_malloc                 sqlite3_api->malloc
+#define sqlite3_mprintf                sqlite3_api->mprintf
+#define sqlite3_open                   sqlite3_api->open
+#define sqlite3_open16                 sqlite3_api->open16
+#define sqlite3_prepare                sqlite3_api->prepare
+#define sqlite3_prepare16              sqlite3_api->prepare16
+#define sqlite3_prepare_v2             sqlite3_api->prepare_v2
+#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2
+#define sqlite3_profile                sqlite3_api->profile
+#define sqlite3_progress_handler       sqlite3_api->progress_handler
+#define sqlite3_realloc                sqlite3_api->realloc
+#define sqlite3_reset                  sqlite3_api->reset
+#define sqlite3_result_blob            sqlite3_api->result_blob
+#define sqlite3_result_double          sqlite3_api->result_double
+#define sqlite3_result_error           sqlite3_api->result_error
+#define sqlite3_result_error16         sqlite3_api->result_error16
+#define sqlite3_result_int             sqlite3_api->result_int
+#define sqlite3_result_int64           sqlite3_api->result_int64
+#define sqlite3_result_null            sqlite3_api->result_null
+#define sqlite3_result_text            sqlite3_api->result_text
+#define sqlite3_result_text16          sqlite3_api->result_text16
+#define sqlite3_result_text16be        sqlite3_api->result_text16be
+#define sqlite3_result_text16le        sqlite3_api->result_text16le
+#define sqlite3_result_value           sqlite3_api->result_value
+#define sqlite3_rollback_hook          sqlite3_api->rollback_hook
+#define sqlite3_set_authorizer         sqlite3_api->set_authorizer
+#define sqlite3_set_auxdata            sqlite3_api->set_auxdata
+#define sqlite3_snprintf               sqlite3_api->snprintf
+#define sqlite3_step                   sqlite3_api->step
+#define sqlite3_table_column_metadata  sqlite3_api->table_column_metadata
+#define sqlite3_thread_cleanup         sqlite3_api->thread_cleanup
+#define sqlite3_total_changes          sqlite3_api->total_changes
+#define sqlite3_trace                  sqlite3_api->trace
+#ifndef SQLITE_OMIT_DEPRECATED
+#define sqlite3_transfer_bindings      sqlite3_api->transfer_bindings
+#endif
+#define sqlite3_update_hook            sqlite3_api->update_hook
+#define sqlite3_user_data              sqlite3_api->user_data
+#define sqlite3_value_blob             sqlite3_api->value_blob
+#define sqlite3_value_bytes            sqlite3_api->value_bytes
+#define sqlite3_value_bytes16          sqlite3_api->value_bytes16
+#define sqlite3_value_double           sqlite3_api->value_double
+#define sqlite3_value_int              sqlite3_api->value_int
+#define sqlite3_value_int64            sqlite3_api->value_int64
+#define sqlite3_value_numeric_type     sqlite3_api->value_numeric_type
+#define sqlite3_value_text             sqlite3_api->value_text
+#define sqlite3_value_text16           sqlite3_api->value_text16
+#define sqlite3_value_text16be         sqlite3_api->value_text16be
+#define sqlite3_value_text16le         sqlite3_api->value_text16le
+#define sqlite3_value_type             sqlite3_api->value_type
+#define sqlite3_vmprintf               sqlite3_api->vmprintf
+#define sqlite3_overload_function      sqlite3_api->overload_function
+#define sqlite3_prepare_v2             sqlite3_api->prepare_v2
+#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2
+#define sqlite3_clear_bindings         sqlite3_api->clear_bindings
+#define sqlite3_bind_zeroblob          sqlite3_api->bind_zeroblob
+#define sqlite3_blob_bytes             sqlite3_api->blob_bytes
+#define sqlite3_blob_close             sqlite3_api->blob_close
+#define sqlite3_blob_open              sqlite3_api->blob_open
+#define sqlite3_blob_read              sqlite3_api->blob_read
+#define sqlite3_blob_write             sqlite3_api->blob_write
+#define sqlite3_create_collation_v2    sqlite3_api->create_collation_v2
+#define sqlite3_file_control           sqlite3_api->file_control
+#define sqlite3_memory_highwater       sqlite3_api->memory_highwater
+#define sqlite3_memory_used            sqlite3_api->memory_used
+#define sqlite3_mutex_alloc            sqlite3_api->mutex_alloc
+#define sqlite3_mutex_enter            sqlite3_api->mutex_enter
+#define sqlite3_mutex_free             sqlite3_api->mutex_free
+#define sqlite3_mutex_leave            sqlite3_api->mutex_leave
+#define sqlite3_mutex_try              sqlite3_api->mutex_try
+#define sqlite3_open_v2                sqlite3_api->open_v2
+#define sqlite3_release_memory         sqlite3_api->release_memory
+#define sqlite3_result_error_nomem     sqlite3_api->result_error_nomem
+#define sqlite3_result_error_toobig    sqlite3_api->result_error_toobig
+#define sqlite3_sleep                  sqlite3_api->sleep
+#define sqlite3_soft_heap_limit        sqlite3_api->soft_heap_limit
+#define sqlite3_vfs_find               sqlite3_api->vfs_find
+#define sqlite3_vfs_register           sqlite3_api->vfs_register
+#define sqlite3_vfs_unregister         sqlite3_api->vfs_unregister
+#define sqlite3_threadsafe             sqlite3_api->xthreadsafe
+#define sqlite3_result_zeroblob        sqlite3_api->result_zeroblob
+#define sqlite3_result_error_code      sqlite3_api->result_error_code
+#define sqlite3_test_control           sqlite3_api->test_control
+#define sqlite3_randomness             sqlite3_api->randomness
+#define sqlite3_context_db_handle      sqlite3_api->context_db_handle
+#define sqlite3_extended_result_codes  sqlite3_api->extended_result_codes
+#define sqlite3_limit                  sqlite3_api->limit
+#define sqlite3_next_stmt              sqlite3_api->next_stmt
+#define sqlite3_sql                    sqlite3_api->sql
+#define sqlite3_status                 sqlite3_api->status
+#define sqlite3_backup_finish          sqlite3_api->backup_finish
+#define sqlite3_backup_init            sqlite3_api->backup_init
+#define sqlite3_backup_pagecount       sqlite3_api->backup_pagecount
+#define sqlite3_backup_remaining       sqlite3_api->backup_remaining
+#define sqlite3_backup_step            sqlite3_api->backup_step
+#define sqlite3_compileoption_get      sqlite3_api->compileoption_get
+#define sqlite3_compileoption_used     sqlite3_api->compileoption_used
+#define sqlite3_create_function_v2     sqlite3_api->create_function_v2
+#define sqlite3_db_config              sqlite3_api->db_config
+#define sqlite3_db_mutex               sqlite3_api->db_mutex
+#define sqlite3_db_status              sqlite3_api->db_status
+#define sqlite3_extended_errcode       sqlite3_api->extended_errcode
+#define sqlite3_log                    sqlite3_api->log
+#define sqlite3_soft_heap_limit64      sqlite3_api->soft_heap_limit64
+#define sqlite3_sourceid               sqlite3_api->sourceid
+#define sqlite3_stmt_status            sqlite3_api->stmt_status
+#define sqlite3_strnicmp               sqlite3_api->strnicmp
+#define sqlite3_unlock_notify          sqlite3_api->unlock_notify
+#define sqlite3_wal_autocheckpoint     sqlite3_api->wal_autocheckpoint
+#define sqlite3_wal_checkpoint         sqlite3_api->wal_checkpoint
+#define sqlite3_wal_hook               sqlite3_api->wal_hook
+#endif /* SQLITE_CORE */
+
+#define SQLITE_EXTENSION_INIT1     const sqlite3_api_routines *sqlite3_api = 0;
+#define SQLITE_EXTENSION_INIT2(v)  sqlite3_api = v;
+
+#endif /* _SQLITE3EXT_H_ */
+
+/************** End of sqlite3ext.h ******************************************/
+/************** Continuing where we left off in loadext.c ********************/
+
+#ifndef SQLITE_OMIT_LOAD_EXTENSION
+
+/*
+** Some API routines are omitted when various features are
+** excluded from a build of SQLite.  Substitute a NULL pointer
+** for any missing APIs.
+*/
+#ifndef SQLITE_ENABLE_COLUMN_METADATA
+# define sqlite3_column_database_name   0
+# define sqlite3_column_database_name16 0
+# define sqlite3_column_table_name      0
+# define sqlite3_column_table_name16    0
+# define sqlite3_column_origin_name     0
+# define sqlite3_column_origin_name16   0
+# define sqlite3_table_column_metadata  0
+#endif
+
+#ifdef SQLITE_OMIT_AUTHORIZATION
+# define sqlite3_set_authorizer         0
+#endif
+
+#ifdef SQLITE_OMIT_UTF16
+# define sqlite3_bind_text16            0
+# define sqlite3_collation_needed16     0
+# define sqlite3_column_decltype16      0
+# define sqlite3_column_name16          0
+# define sqlite3_column_text16          0
+# define sqlite3_complete16             0
+# define sqlite3_create_collation16     0
+# define sqlite3_create_function16      0
+# define sqlite3_errmsg16               0
+# define sqlite3_open16                 0
+# define sqlite3_prepare16              0
+# define sqlite3_prepare16_v2           0
+# define sqlite3_result_error16         0
+# define sqlite3_result_text16          0
+# define sqlite3_result_text16be        0
+# define sqlite3_result_text16le        0
+# define sqlite3_value_text16           0
+# define sqlite3_value_text16be         0
+# define sqlite3_value_text16le         0
+# define sqlite3_column_database_name16 0
+# define sqlite3_column_table_name16    0
+# define sqlite3_column_origin_name16   0
+#endif
+
+#ifdef SQLITE_OMIT_COMPLETE
+# define sqlite3_complete 0
+# define sqlite3_complete16 0
+#endif
+
+#ifdef SQLITE_OMIT_DECLTYPE
+# define sqlite3_column_decltype16      0
+# define sqlite3_column_decltype        0
+#endif
+
+#ifdef SQLITE_OMIT_PROGRESS_CALLBACK
+# define sqlite3_progress_handler 0
+#endif
+
+#ifdef SQLITE_OMIT_VIRTUALTABLE
+# define sqlite3_create_module 0
+# define sqlite3_create_module_v2 0
+# define sqlite3_declare_vtab 0
+#endif
+
+#ifdef SQLITE_OMIT_SHARED_CACHE
+# define sqlite3_enable_shared_cache 0
+#endif
+
+#ifdef SQLITE_OMIT_TRACE
+# define sqlite3_profile       0
+# define sqlite3_trace         0
+#endif
+
+#ifdef SQLITE_OMIT_GET_TABLE
+# define sqlite3_free_table    0
+# define sqlite3_get_table     0
+#endif
+
+#ifdef SQLITE_OMIT_INCRBLOB
+#define sqlite3_bind_zeroblob  0
+#define sqlite3_blob_bytes     0
+#define sqlite3_blob_close     0
+#define sqlite3_blob_open      0
+#define sqlite3_blob_read      0
+#define sqlite3_blob_write     0
+#endif
+
+/*
+** The following structure contains pointers to all SQLite API routines.
+** A pointer to this structure is passed into extensions when they are
+** loaded so that the extension can make calls back into the SQLite
+** library.
+**
+** When adding new APIs, add them to the bottom of this structure
+** in order to preserve backwards compatibility.
+**
+** Extensions that use newer APIs should first call the
+** sqlite3_libversion_number() to make sure that the API they
+** intend to use is supported by the library.  Extensions should
+** also check to make sure that the pointer to the function is
+** not NULL before calling it.
+*/
+static const sqlite3_api_routines sqlite3Apis = {
+  sqlite3_aggregate_context,
+#ifndef SQLITE_OMIT_DEPRECATED
+  sqlite3_aggregate_count,
+#else
+  0,
+#endif
+  sqlite3_bind_blob,
+  sqlite3_bind_double,
+  sqlite3_bind_int,
+  sqlite3_bind_int64,
+  sqlite3_bind_null,
+  sqlite3_bind_parameter_count,
+  sqlite3_bind_parameter_index,
+  sqlite3_bind_parameter_name,
+  sqlite3_bind_text,
+  sqlite3_bind_text16,
+  sqlite3_bind_value,
+  sqlite3_busy_handler,
+  sqlite3_busy_timeout,
+  sqlite3_changes,
+  sqlite3_close,
+  sqlite3_collation_needed,
+  sqlite3_collation_needed16,
+  sqlite3_column_blob,
+  sqlite3_column_bytes,
+  sqlite3_column_bytes16,
+  sqlite3_column_count,
+  sqlite3_column_database_name,
+  sqlite3_column_database_name16,
+  sqlite3_column_decltype,
+  sqlite3_column_decltype16,
+  sqlite3_column_double,
+  sqlite3_column_int,
+  sqlite3_column_int64,
+  sqlite3_column_name,
+  sqlite3_column_name16,
+  sqlite3_column_origin_name,
+  sqlite3_column_origin_name16,
+  sqlite3_column_table_name,
+  sqlite3_column_table_name16,
+  sqlite3_column_text,
+  sqlite3_column_text16,
+  sqlite3_column_type,
+  sqlite3_column_value,
+  sqlite3_commit_hook,
+  sqlite3_complete,
+  sqlite3_complete16,
+  sqlite3_create_collation,
+  sqlite3_create_collation16,
+  sqlite3_create_function,
+  sqlite3_create_function16,
+  sqlite3_create_module,
+  sqlite3_data_count,
+  sqlite3_db_handle,
+  sqlite3_declare_vtab,
+  sqlite3_enable_shared_cache,
+  sqlite3_errcode,
+  sqlite3_errmsg,
+  sqlite3_errmsg16,
+  sqlite3_exec,
+#ifndef SQLITE_OMIT_DEPRECATED
+  sqlite3_expired,
+#else
+  0,
+#endif
+  sqlite3_finalize,
+  sqlite3_free,
+  sqlite3_free_table,
+  sqlite3_get_autocommit,
+  sqlite3_get_auxdata,
+  sqlite3_get_table,
+  0,     /* Was sqlite3_global_recover(), but that function is deprecated */
+  sqlite3_interrupt,
+  sqlite3_last_insert_rowid,
+  sqlite3_libversion,
+  sqlite3_libversion_number,
+  sqlite3_malloc,
+  sqlite3_mprintf,
+  sqlite3_open,
+  sqlite3_open16,
+  sqlite3_prepare,
+  sqlite3_prepare16,
+  sqlite3_profile,
+  sqlite3_progress_handler,
+  sqlite3_realloc,
+  sqlite3_reset,
+  sqlite3_result_blob,
+  sqlite3_result_double,
+  sqlite3_result_error,
+  sqlite3_result_error16,
+  sqlite3_result_int,
+  sqlite3_result_int64,
+  sqlite3_result_null,
+  sqlite3_result_text,
+  sqlite3_result_text16,
+  sqlite3_result_text16be,
+  sqlite3_result_text16le,
+  sqlite3_result_value,
+  sqlite3_rollback_hook,
+  sqlite3_set_authorizer,
+  sqlite3_set_auxdata,
+  sqlite3_snprintf,
+  sqlite3_step,
+  sqlite3_table_column_metadata,
+#ifndef SQLITE_OMIT_DEPRECATED
+  sqlite3_thread_cleanup,
+#else
+  0,
+#endif
+  sqlite3_total_changes,
+  sqlite3_trace,
+#ifndef SQLITE_OMIT_DEPRECATED
+  sqlite3_transfer_bindings,
+#else
+  0,
+#endif
+  sqlite3_update_hook,
+  sqlite3_user_data,
+  sqlite3_value_blob,
+  sqlite3_value_bytes,
+  sqlite3_value_bytes16,
+  sqlite3_value_double,
+  sqlite3_value_int,
+  sqlite3_value_int64,
+  sqlite3_value_numeric_type,
+  sqlite3_value_text,
+  sqlite3_value_text16,
+  sqlite3_value_text16be,
+  sqlite3_value_text16le,
+  sqlite3_value_type,
+  sqlite3_vmprintf,
+  /*
+  ** The original API set ends here.  All extensions can call any
+  ** of the APIs above provided that the pointer is not NULL.  But
+  ** before calling APIs that follow, extension should check the
+  ** sqlite3_libversion_number() to make sure they are dealing with
+  ** a library that is new enough to support that API.
+  *************************************************************************
+  */
+  sqlite3_overload_function,
+
+  /*
+  ** Added after 3.3.13
+  */
+  sqlite3_prepare_v2,
+  sqlite3_prepare16_v2,
+  sqlite3_clear_bindings,
+
+  /*
+  ** Added for 3.4.1
+  */
+  sqlite3_create_module_v2,
+
+  /*
+  ** Added for 3.5.0
+  */
+  sqlite3_bind_zeroblob,
+  sqlite3_blob_bytes,
+  sqlite3_blob_close,
+  sqlite3_blob_open,
+  sqlite3_blob_read,
+  sqlite3_blob_write,
+  sqlite3_create_collation_v2,
+  sqlite3_file_control,
+  sqlite3_memory_highwater,
+  sqlite3_memory_used,
+#ifdef SQLITE_MUTEX_OMIT
+  0, 
+  0, 
+  0,
+  0,
+  0,
+#else
+  sqlite3_mutex_alloc,
+  sqlite3_mutex_enter,
+  sqlite3_mutex_free,
+  sqlite3_mutex_leave,
+  sqlite3_mutex_try,
+#endif
+  sqlite3_open_v2,
+  sqlite3_release_memory,
+  sqlite3_result_error_nomem,
+  sqlite3_result_error_toobig,
+  sqlite3_sleep,
+  sqlite3_soft_heap_limit,
+  sqlite3_vfs_find,
+  sqlite3_vfs_register,
+  sqlite3_vfs_unregister,
+
+  /*
+  ** Added for 3.5.8
+  */
+  sqlite3_threadsafe,
+  sqlite3_result_zeroblob,
+  sqlite3_result_error_code,
+  sqlite3_test_control,
+  sqlite3_randomness,
+  sqlite3_context_db_handle,
+
+  /*
+  ** Added for 3.6.0
+  */
+  sqlite3_extended_result_codes,
+  sqlite3_limit,
+  sqlite3_next_stmt,
+  sqlite3_sql,
+  sqlite3_status,
+
+  /*
+  ** Added for 3.7.4
+  */
+  sqlite3_backup_finish,
+  sqlite3_backup_init,
+  sqlite3_backup_pagecount,
+  sqlite3_backup_remaining,
+  sqlite3_backup_step,
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+  sqlite3_compileoption_get,
+  sqlite3_compileoption_used,
+#else
+  0,
+  0,
+#endif
+  sqlite3_create_function_v2,
+  sqlite3_db_config,
+  sqlite3_db_mutex,
+  sqlite3_db_status,
+  sqlite3_extended_errcode,
+  sqlite3_log,
+  sqlite3_soft_heap_limit64,
+  sqlite3_sourceid,
+  sqlite3_stmt_status,
+  sqlite3_strnicmp,
+#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
+  sqlite3_unlock_notify,
+#else
+  0,
+#endif
+#ifndef SQLITE_OMIT_WAL
+  sqlite3_wal_autocheckpoint,
+  sqlite3_wal_checkpoint,
+  sqlite3_wal_hook,
+#else
+  0,
+  0,
+  0,
+#endif
+};
+
+/*
+** Attempt to load an SQLite extension library contained in the file
+** zFile.  The entry point is zProc.  zProc may be 0 in which case a
+** default entry point name (sqlite3_extension_init) is used.  Use
+** of the default name is recommended.
+**
+** Return SQLITE_OK on success and SQLITE_ERROR if something goes wrong.
+**
+** If an error occurs and pzErrMsg is not 0, then fill *pzErrMsg with 
+** error message text.  The calling function should free this memory
+** by calling sqlite3DbFree(db, ).
+*/
+static int sqlite3LoadExtension(
+  sqlite3 *db,          /* Load the extension into this database connection */
+  const char *zFile,    /* Name of the shared library containing extension */
+  const char *zProc,    /* Entry point.  Use "sqlite3_extension_init" if 0 */
+  char **pzErrMsg       /* Put error message here if not 0 */
+){
+  sqlite3_vfs *pVfs = db->pVfs;
+  void *handle;
+  int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
+  char *zErrmsg = 0;
+  void **aHandle;
+  const int nMsg = 300;
+
+  if( pzErrMsg ) *pzErrMsg = 0;
+
+  /* Ticket #1863.  To avoid a creating security problems for older
+  ** applications that relink against newer versions of SQLite, the
+  ** ability to run load_extension is turned off by default.  One
+  ** must call sqlite3_enable_load_extension() to turn on extension
+  ** loading.  Otherwise you get the following error.
+  */
+  if( (db->flags & SQLITE_LoadExtension)==0 ){
+    if( pzErrMsg ){
+      *pzErrMsg = sqlite3_mprintf("not authorized");
+    }
+    return SQLITE_ERROR;
+  }
+
+  if( zProc==0 ){
+    zProc = "sqlite3_extension_init";
+  }
+
+  handle = sqlite3OsDlOpen(pVfs, zFile);
+  if( handle==0 ){
+    if( pzErrMsg ){
+      *pzErrMsg = zErrmsg = sqlite3_malloc(nMsg);
+      if( zErrmsg ){
+        sqlite3_snprintf(nMsg, zErrmsg, 
+            "unable to open shared library [%s]", zFile);
+        sqlite3OsDlError(pVfs, nMsg-1, zErrmsg);
+      }
+    }
+    return SQLITE_ERROR;
+  }
+  xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
+                   sqlite3OsDlSym(pVfs, handle, zProc);
+  if( xInit==0 ){
+    if( pzErrMsg ){
+      *pzErrMsg = zErrmsg = sqlite3_malloc(nMsg);
+      if( zErrmsg ){
+        sqlite3_snprintf(nMsg, zErrmsg,
+            "no entry point [%s] in shared library [%s]", zProc,zFile);
+        sqlite3OsDlError(pVfs, nMsg-1, zErrmsg);
+      }
+      sqlite3OsDlClose(pVfs, handle);
+    }
+    return SQLITE_ERROR;
+  }else if( xInit(db, &zErrmsg, &sqlite3Apis) ){
+    if( pzErrMsg ){
+      *pzErrMsg = sqlite3_mprintf("error during initialization: %s", zErrmsg);
+    }
+    sqlite3_free(zErrmsg);
+    sqlite3OsDlClose(pVfs, handle);
+    return SQLITE_ERROR;
+  }
+
+  /* Append the new shared library handle to the db->aExtension array. */
+  aHandle = sqlite3DbMallocZero(db, sizeof(handle)*(db->nExtension+1));
+  if( aHandle==0 ){
+    return SQLITE_NOMEM;
+  }
+  if( db->nExtension>0 ){
+    memcpy(aHandle, db->aExtension, sizeof(handle)*db->nExtension);
+  }
+  sqlite3DbFree(db, db->aExtension);
+  db->aExtension = aHandle;
+
+  db->aExtension[db->nExtension++] = handle;
+  return SQLITE_OK;
+}
+SQLITE_API int sqlite3_load_extension(
+  sqlite3 *db,          /* Load the extension into this database connection */
+  const char *zFile,    /* Name of the shared library containing extension */
+  const char *zProc,    /* Entry point.  Use "sqlite3_extension_init" if 0 */
+  char **pzErrMsg       /* Put error message here if not 0 */
+){
+  int rc;
+  sqlite3_mutex_enter(db->mutex);
+  rc = sqlite3LoadExtension(db, zFile, zProc, pzErrMsg);
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+/*
+** Call this routine when the database connection is closing in order
+** to clean up loaded extensions
+*/
+SQLITE_PRIVATE void sqlite3CloseExtensions(sqlite3 *db){
+  int i;
+  assert( sqlite3_mutex_held(db->mutex) );
+  for(i=0; i<db->nExtension; i++){
+    sqlite3OsDlClose(db->pVfs, db->aExtension[i]);
+  }
+  sqlite3DbFree(db, db->aExtension);
+}
+
+/*
+** Enable or disable extension loading.  Extension loading is disabled by
+** default so as not to open security holes in older applications.
+*/
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff){
+  sqlite3_mutex_enter(db->mutex);
+  if( onoff ){
+    db->flags |= SQLITE_LoadExtension;
+  }else{
+    db->flags &= ~SQLITE_LoadExtension;
+  }
+  sqlite3_mutex_leave(db->mutex);
+  return SQLITE_OK;
+}
+
+#endif /* SQLITE_OMIT_LOAD_EXTENSION */
+
+/*
+** The auto-extension code added regardless of whether or not extension
+** loading is supported.  We need a dummy sqlite3Apis pointer for that
+** code if regular extension loading is not available.  This is that
+** dummy pointer.
+*/
+#ifdef SQLITE_OMIT_LOAD_EXTENSION
+static const sqlite3_api_routines sqlite3Apis = { 0 };
+#endif
+
+
+/*
+** The following object holds the list of automatically loaded
+** extensions.
+**
+** This list is shared across threads.  The SQLITE_MUTEX_STATIC_MASTER
+** mutex must be held while accessing this list.
+*/
+typedef struct sqlite3AutoExtList sqlite3AutoExtList;
+static SQLITE_WSD struct sqlite3AutoExtList {
+  int nExt;              /* Number of entries in aExt[] */          
+  void (**aExt)(void);   /* Pointers to the extension init functions */
+} sqlite3Autoext = { 0, 0 };
+
+/* The "wsdAutoext" macro will resolve to the autoextension
+** state vector.  If writable static data is unsupported on the target,
+** we have to locate the state vector at run-time.  In the more common
+** case where writable static data is supported, wsdStat can refer directly
+** to the "sqlite3Autoext" state vector declared above.
+*/
+#ifdef SQLITE_OMIT_WSD
+# define wsdAutoextInit \
+  sqlite3AutoExtList *x = &GLOBAL(sqlite3AutoExtList,sqlite3Autoext)
+# define wsdAutoext x[0]
+#else
+# define wsdAutoextInit
+# define wsdAutoext sqlite3Autoext
+#endif
+
+
+/*
+** Register a statically linked extension that is automatically
+** loaded by every new database connection.
+*/
+SQLITE_API int sqlite3_auto_extension(void (*xInit)(void)){
+  int rc = SQLITE_OK;
+#ifndef SQLITE_OMIT_AUTOINIT
+  rc = sqlite3_initialize();
+  if( rc ){
+    return rc;
+  }else
+#endif
+  {
+    int i;
+#if SQLITE_THREADSAFE
+    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
+#endif
+    wsdAutoextInit;
+    sqlite3_mutex_enter(mutex);
+    for(i=0; i<wsdAutoext.nExt; i++){
+      if( wsdAutoext.aExt[i]==xInit ) break;
+    }
+    if( i==wsdAutoext.nExt ){
+      int nByte = (wsdAutoext.nExt+1)*sizeof(wsdAutoext.aExt[0]);
+      void (**aNew)(void);
+      aNew = sqlite3_realloc(wsdAutoext.aExt, nByte);
+      if( aNew==0 ){
+        rc = SQLITE_NOMEM;
+      }else{
+        wsdAutoext.aExt = aNew;
+        wsdAutoext.aExt[wsdAutoext.nExt] = xInit;
+        wsdAutoext.nExt++;
+      }
+    }
+    sqlite3_mutex_leave(mutex);
+    assert( (rc&0xff)==rc );
+    return rc;
+  }
+}
+
+/*
+** Reset the automatic extension loading mechanism.
+*/
+SQLITE_API void sqlite3_reset_auto_extension(void){
+#ifndef SQLITE_OMIT_AUTOINIT
+  if( sqlite3_initialize()==SQLITE_OK )
+#endif
+  {
+#if SQLITE_THREADSAFE
+    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
+#endif
+    wsdAutoextInit;
+    sqlite3_mutex_enter(mutex);
+    sqlite3_free(wsdAutoext.aExt);
+    wsdAutoext.aExt = 0;
+    wsdAutoext.nExt = 0;
+    sqlite3_mutex_leave(mutex);
+  }
+}
+
+/*
+** Load all automatic extensions.
+**
+** If anything goes wrong, set an error in the database connection.
+*/
+SQLITE_PRIVATE void sqlite3AutoLoadExtensions(sqlite3 *db){
+  int i;
+  int go = 1;
+  int (*xInit)(sqlite3*,char**,const sqlite3_api_routines*);
+
+  wsdAutoextInit;
+  if( wsdAutoext.nExt==0 ){
+    /* Common case: early out without every having to acquire a mutex */
+    return;
+  }
+  for(i=0; go; i++){
+    char *zErrmsg;
+#if SQLITE_THREADSAFE
+    sqlite3_mutex *mutex = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
+#endif
+    sqlite3_mutex_enter(mutex);
+    if( i>=wsdAutoext.nExt ){
+      xInit = 0;
+      go = 0;
+    }else{
+      xInit = (int(*)(sqlite3*,char**,const sqlite3_api_routines*))
+              wsdAutoext.aExt[i];
+    }
+    sqlite3_mutex_leave(mutex);
+    zErrmsg = 0;
+    if( xInit && xInit(db, &zErrmsg, &sqlite3Apis) ){
+      sqlite3Error(db, SQLITE_ERROR,
+            "automatic extension loading failed: %s", zErrmsg);
+      go = 0;
+    }
+    sqlite3_free(zErrmsg);
+  }
+}
+
+/************** End of loadext.c *********************************************/
+/************** Begin file pragma.c ******************************************/
+/*
+** 2003 April 6
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains code used to implement the PRAGMA command.
+*/
+
+/* Ignore this whole file if pragmas are disabled
+*/
+#if !defined(SQLITE_OMIT_PRAGMA)
+
+/*
+** Interpret the given string as a safety level.  Return 0 for OFF,
+** 1 for ON or NORMAL and 2 for FULL.  Return 1 for an empty or 
+** unrecognized string argument.
+**
+** Note that the values returned are one less that the values that
+** should be passed into sqlite3BtreeSetSafetyLevel().  The is done
+** to support legacy SQL code.  The safety level used to be boolean
+** and older scripts may have used numbers 0 for OFF and 1 for ON.
+*/
+static u8 getSafetyLevel(const char *z){
+                             /* 123456789 123456789 */
+  static const char zText[] = "onoffalseyestruefull";
+  static const u8 iOffset[] = {0, 1, 2, 4, 9, 12, 16};
+  static const u8 iLength[] = {2, 2, 3, 5, 3, 4, 4};
+  static const u8 iValue[] =  {1, 0, 0, 0, 1, 1, 2};
+  int i, n;
+  if( sqlite3Isdigit(*z) ){
+    return (u8)sqlite3Atoi(z);
+  }
+  n = sqlite3Strlen30(z);
+  for(i=0; i<ArraySize(iLength); i++){
+    if( iLength[i]==n && sqlite3StrNICmp(&zText[iOffset[i]],z,n)==0 ){
+      return iValue[i];
+    }
+  }
+  return 1;
+}
+
+/*
+** Interpret the given string as a boolean value.
+*/
+static u8 getBoolean(const char *z){
+  return getSafetyLevel(z)&1;
+}
+
+/*
+** Interpret the given string as a locking mode value.
+*/
+static int getLockingMode(const char *z){
+  if( z ){
+    if( 0==sqlite3StrICmp(z, "exclusive") ) return PAGER_LOCKINGMODE_EXCLUSIVE;
+    if( 0==sqlite3StrICmp(z, "normal") ) return PAGER_LOCKINGMODE_NORMAL;
+  }
+  return PAGER_LOCKINGMODE_QUERY;
+}
+
+#ifndef SQLITE_OMIT_AUTOVACUUM
+/*
+** Interpret the given string as an auto-vacuum mode value.
+**
+** The following strings, "none", "full" and "incremental" are 
+** acceptable, as are their numeric equivalents: 0, 1 and 2 respectively.
+*/
+static int getAutoVacuum(const char *z){
+  int i;
+  if( 0==sqlite3StrICmp(z, "none") ) return BTREE_AUTOVACUUM_NONE;
+  if( 0==sqlite3StrICmp(z, "full") ) return BTREE_AUTOVACUUM_FULL;
+  if( 0==sqlite3StrICmp(z, "incremental") ) return BTREE_AUTOVACUUM_INCR;
+  i = sqlite3Atoi(z);
+  return (u8)((i>=0&&i<=2)?i:0);
+}
+#endif /* ifndef SQLITE_OMIT_AUTOVACUUM */
+
+#ifndef SQLITE_OMIT_PAGER_PRAGMAS
+/*
+** Interpret the given string as a temp db location. Return 1 for file
+** backed temporary databases, 2 for the Red-Black tree in memory database
+** and 0 to use the compile-time default.
+*/
+static int getTempStore(const char *z){
+  if( z[0]>='0' && z[0]<='2' ){
+    return z[0] - '0';
+  }else if( sqlite3StrICmp(z, "file")==0 ){
+    return 1;
+  }else if( sqlite3StrICmp(z, "memory")==0 ){
+    return 2;
+  }else{
+    return 0;
+  }
+}
+#endif /* SQLITE_PAGER_PRAGMAS */
+
+#ifndef SQLITE_OMIT_PAGER_PRAGMAS
+/*
+** Invalidate temp storage, either when the temp storage is changed
+** from default, or when 'file' and the temp_store_directory has changed
+*/
+static int invalidateTempStorage(Parse *pParse){
+  sqlite3 *db = pParse->db;
+  if( db->aDb[1].pBt!=0 ){
+    if( !db->autoCommit || sqlite3BtreeIsInReadTrans(db->aDb[1].pBt) ){
+      sqlite3ErrorMsg(pParse, "temporary storage cannot be changed "
+        "from within a transaction");
+      return SQLITE_ERROR;
+    }
+    sqlite3BtreeClose(db->aDb[1].pBt);
+    db->aDb[1].pBt = 0;
+    sqlite3ResetInternalSchema(db, -1);
+  }
+  return SQLITE_OK;
+}
+#endif /* SQLITE_PAGER_PRAGMAS */
+
+#ifndef SQLITE_OMIT_PAGER_PRAGMAS
+/*
+** If the TEMP database is open, close it and mark the database schema
+** as needing reloading.  This must be done when using the SQLITE_TEMP_STORE
+** or DEFAULT_TEMP_STORE pragmas.
+*/
+static int changeTempStorage(Parse *pParse, const char *zStorageType){
+  int ts = getTempStore(zStorageType);
+  sqlite3 *db = pParse->db;
+  if( db->temp_store==ts ) return SQLITE_OK;
+  if( invalidateTempStorage( pParse ) != SQLITE_OK ){
+    return SQLITE_ERROR;
+  }
+  db->temp_store = (u8)ts;
+  return SQLITE_OK;
+}
+#endif /* SQLITE_PAGER_PRAGMAS */
+
+/*
+** Generate code to return a single integer value.
+*/
+static void returnSingleInt(Parse *pParse, const char *zLabel, i64 value){
+  Vdbe *v = sqlite3GetVdbe(pParse);
+  int mem = ++pParse->nMem;
+  i64 *pI64 = sqlite3DbMallocRaw(pParse->db, sizeof(value));
+  if( pI64 ){
+    memcpy(pI64, &value, sizeof(value));
+  }
+  sqlite3VdbeAddOp4(v, OP_Int64, 0, mem, 0, (char*)pI64, P4_INT64);
+  sqlite3VdbeSetNumCols(v, 1);
+  sqlite3VdbeSetColName(v, 0, COLNAME_NAME, zLabel, SQLITE_STATIC);
+  sqlite3VdbeAddOp2(v, OP_ResultRow, mem, 1);
+}
+
+#ifndef SQLITE_OMIT_FLAG_PRAGMAS
+/*
+** Check to see if zRight and zLeft refer to a pragma that queries
+** or changes one of the flags in db->flags.  Return 1 if so and 0 if not.
+** Also, implement the pragma.
+*/
+static int flagPragma(Parse *pParse, const char *zLeft, const char *zRight){
+  static const struct sPragmaType {
+    const char *zName;  /* Name of the pragma */
+    int mask;           /* Mask for the db->flags value */
+  } aPragma[] = {
+    { "full_column_names",        SQLITE_FullColNames  },
+    { "short_column_names",       SQLITE_ShortColNames },
+    { "count_changes",            SQLITE_CountRows     },
+    { "empty_result_callbacks",   SQLITE_NullCallback  },
+    { "legacy_file_format",       SQLITE_LegacyFileFmt },
+    { "fullfsync",                SQLITE_FullFSync     },
+    { "checkpoint_fullfsync",     SQLITE_CkptFullFSync },
+    { "reverse_unordered_selects", SQLITE_ReverseOrder  },
+#ifndef SQLITE_OMIT_AUTOMATIC_INDEX
+    { "automatic_index",          SQLITE_AutoIndex     },
+#endif
+#ifdef SQLITE_DEBUG
+    { "sql_trace",                SQLITE_SqlTrace      },
+    { "vdbe_listing",             SQLITE_VdbeListing   },
+    { "vdbe_trace",               SQLITE_VdbeTrace     },
+#endif
+#ifndef SQLITE_OMIT_CHECK
+    { "ignore_check_constraints", SQLITE_IgnoreChecks  },
+#endif
+    /* The following is VERY experimental */
+    { "writable_schema",          SQLITE_WriteSchema|SQLITE_RecoveryMode },
+    { "omit_readlock",            SQLITE_NoReadlock    },
+
+    /* TODO: Maybe it shouldn't be possible to change the ReadUncommitted
+    ** flag if there are any active statements. */
+    { "read_uncommitted",         SQLITE_ReadUncommitted },
+    { "recursive_triggers",       SQLITE_RecTriggers },
+
+    /* This flag may only be set if both foreign-key and trigger support
+    ** are present in the build.  */
+#if !defined(SQLITE_OMIT_FOREIGN_KEY) && !defined(SQLITE_OMIT_TRIGGER)
+    { "foreign_keys",             SQLITE_ForeignKeys },
+#endif
+  };
+  int i;
+  const struct sPragmaType *p;
+  for(i=0, p=aPragma; i<ArraySize(aPragma); i++, p++){
+    if( sqlite3StrICmp(zLeft, p->zName)==0 ){
+      sqlite3 *db = pParse->db;
+      Vdbe *v;
+      v = sqlite3GetVdbe(pParse);
+      assert( v!=0 );  /* Already allocated by sqlite3Pragma() */
+      if( ALWAYS(v) ){
+        if( zRight==0 ){
+          returnSingleInt(pParse, p->zName, (db->flags & p->mask)!=0 );
+        }else{
+          int mask = p->mask;          /* Mask of bits to set or clear. */
+          if( db->autoCommit==0 ){
+            /* Foreign key support may not be enabled or disabled while not
+            ** in auto-commit mode.  */
+            mask &= ~(SQLITE_ForeignKeys);
+          }
+
+          if( getBoolean(zRight) ){
+            db->flags |= mask;
+          }else{
+            db->flags &= ~mask;
+          }
+
+          /* Many of the flag-pragmas modify the code generated by the SQL 
+          ** compiler (eg. count_changes). So add an opcode to expire all
+          ** compiled SQL statements after modifying a pragma value.
+          */
+          sqlite3VdbeAddOp2(v, OP_Expire, 0, 0);
+        }
+      }
+
+      return 1;
+    }
+  }
+  return 0;
+}
+#endif /* SQLITE_OMIT_FLAG_PRAGMAS */
+
+/*
+** Return a human-readable name for a constraint resolution action.
+*/
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+static const char *actionName(u8 action){
+  const char *zName;
+  switch( action ){
+    case OE_SetNull:  zName = "SET NULL";        break;
+    case OE_SetDflt:  zName = "SET DEFAULT";     break;
+    case OE_Cascade:  zName = "CASCADE";         break;
+    case OE_Restrict: zName = "RESTRICT";        break;
+    default:          zName = "NO ACTION";  
+                      assert( action==OE_None ); break;
+  }
+  return zName;
+}
+#endif
+
+
+/*
+** Parameter eMode must be one of the PAGER_JOURNALMODE_XXX constants
+** defined in pager.h. This function returns the associated lowercase
+** journal-mode name.
+*/
+SQLITE_PRIVATE const char *sqlite3JournalModename(int eMode){
+  static char * const azModeName[] = {
+    "delete", "persist", "off", "truncate", "memory"
+#ifndef SQLITE_OMIT_WAL
+     , "wal"
+#endif
+  };
+  assert( PAGER_JOURNALMODE_DELETE==0 );
+  assert( PAGER_JOURNALMODE_PERSIST==1 );
+  assert( PAGER_JOURNALMODE_OFF==2 );
+  assert( PAGER_JOURNALMODE_TRUNCATE==3 );
+  assert( PAGER_JOURNALMODE_MEMORY==4 );
+  assert( PAGER_JOURNALMODE_WAL==5 );
+  assert( eMode>=0 && eMode<=ArraySize(azModeName) );
+
+  if( eMode==ArraySize(azModeName) ) return 0;
+  return azModeName[eMode];
+}
+
+/*
+** Process a pragma statement.  
+**
+** Pragmas are of this form:
+**
+**      PRAGMA [database.]id [= value]
+**
+** The identifier might also be a string.  The value is a string, and
+** identifier, or a number.  If minusFlag is true, then the value is
+** a number that was preceded by a minus sign.
+**
+** If the left side is "database.id" then pId1 is the database name
+** and pId2 is the id.  If the left side is just "id" then pId1 is the
+** id and pId2 is any empty string.
+*/
+SQLITE_PRIVATE void sqlite3Pragma(
+  Parse *pParse, 
+  Token *pId1,        /* First part of [database.]id field */
+  Token *pId2,        /* Second part of [database.]id field, or NULL */
+  Token *pValue,      /* Token for <value>, or NULL */
+  int minusFlag       /* True if a '-' sign preceded <value> */
+){
+  char *zLeft = 0;       /* Nul-terminated UTF-8 string <id> */
+  char *zRight = 0;      /* Nul-terminated UTF-8 string <value>, or NULL */
+  const char *zDb = 0;   /* The database name */
+  Token *pId;            /* Pointer to <id> token */
+  int iDb;               /* Database index for <database> */
+  sqlite3 *db = pParse->db;
+  Db *pDb;
+  Vdbe *v = pParse->pVdbe = sqlite3VdbeCreate(db);
+  if( v==0 ) return;
+  sqlite3VdbeRunOnlyOnce(v);
+  pParse->nMem = 2;
+
+  /* Interpret the [database.] part of the pragma statement. iDb is the
+  ** index of the database this pragma is being applied to in db.aDb[]. */
+  iDb = sqlite3TwoPartName(pParse, pId1, pId2, &pId);
+  if( iDb<0 ) return;
+  pDb = &db->aDb[iDb];
+
+  /* If the temp database has been explicitly named as part of the 
+  ** pragma, make sure it is open. 
+  */
+  if( iDb==1 && sqlite3OpenTempDatabase(pParse) ){
+    return;
+  }
+
+  zLeft = sqlite3NameFromToken(db, pId);
+  if( !zLeft ) return;
+  if( minusFlag ){
+    zRight = sqlite3MPrintf(db, "-%T", pValue);
+  }else{
+    zRight = sqlite3NameFromToken(db, pValue);
+  }
+
+  assert( pId2 );
+  zDb = pId2->n>0 ? pDb->zName : 0;
+  if( sqlite3AuthCheck(pParse, SQLITE_PRAGMA, zLeft, zRight, zDb) ){
+    goto pragma_out;
+  }
+ 
+#ifndef SQLITE_OMIT_PAGER_PRAGMAS
+  /*
+  **  PRAGMA [database.]default_cache_size
+  **  PRAGMA [database.]default_cache_size=N
+  **
+  ** The first form reports the current persistent setting for the
+  ** page cache size.  The value returned is the maximum number of
+  ** pages in the page cache.  The second form sets both the current
+  ** page cache size value and the persistent page cache size value
+  ** stored in the database file.
+  **
+  ** Older versions of SQLite would set the default cache size to a
+  ** negative number to indicate synchronous=OFF.  These days, synchronous
+  ** is always on by default regardless of the sign of the default cache
+  ** size.  But continue to take the absolute value of the default cache
+  ** size of historical compatibility.
+  */
+  if( sqlite3StrICmp(zLeft,"default_cache_size")==0 ){
+    static const VdbeOpList getCacheSize[] = {
+      { OP_Transaction, 0, 0,        0},                         /* 0 */
+      { OP_ReadCookie,  0, 1,        BTREE_DEFAULT_CACHE_SIZE},  /* 1 */
+      { OP_IfPos,       1, 7,        0},
+      { OP_Integer,     0, 2,        0},
+      { OP_Subtract,    1, 2,        1},
+      { OP_IfPos,       1, 7,        0},
+      { OP_Integer,     0, 1,        0},                         /* 6 */
+      { OP_ResultRow,   1, 1,        0},
+    };
+    int addr;
+    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+    sqlite3VdbeUsesBtree(v, iDb);
+    if( !zRight ){
+      sqlite3VdbeSetNumCols(v, 1);
+      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "cache_size", SQLITE_STATIC);
+      pParse->nMem += 2;
+      addr = sqlite3VdbeAddOpList(v, ArraySize(getCacheSize), getCacheSize);
+      sqlite3VdbeChangeP1(v, addr, iDb);
+      sqlite3VdbeChangeP1(v, addr+1, iDb);
+      sqlite3VdbeChangeP1(v, addr+6, SQLITE_DEFAULT_CACHE_SIZE);
+    }else{
+      int size = sqlite3AbsInt32(sqlite3Atoi(zRight));
+      sqlite3BeginWriteOperation(pParse, 0, iDb);
+      sqlite3VdbeAddOp2(v, OP_Integer, size, 1);
+      sqlite3VdbeAddOp3(v, OP_SetCookie, iDb, BTREE_DEFAULT_CACHE_SIZE, 1);
+      assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+      pDb->pSchema->cache_size = size;
+      sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
+    }
+  }else
+
+  /*
+  **  PRAGMA [database.]page_size
+  **  PRAGMA [database.]page_size=N
+  **
+  ** The first form reports the current setting for the
+  ** database page size in bytes.  The second form sets the
+  ** database page size value.  The value can only be set if
+  ** the database has not yet been created.
+  */
+  if( sqlite3StrICmp(zLeft,"page_size")==0 ){
+    Btree *pBt = pDb->pBt;
+    assert( pBt!=0 );
+    if( !zRight ){
+      int size = ALWAYS(pBt) ? sqlite3BtreeGetPageSize(pBt) : 0;
+      returnSingleInt(pParse, "page_size", size);
+    }else{
+      /* Malloc may fail when setting the page-size, as there is an internal
+      ** buffer that the pager module resizes using sqlite3_realloc().
+      */
+      db->nextPagesize = sqlite3Atoi(zRight);
+      if( SQLITE_NOMEM==sqlite3BtreeSetPageSize(pBt, db->nextPagesize, -1, 0) ){
+        db->mallocFailed = 1;
+      }
+    }
+  }else
+
+  /*
+  **  PRAGMA [database.]secure_delete
+  **  PRAGMA [database.]secure_delete=ON/OFF
+  **
+  ** The first form reports the current setting for the
+  ** secure_delete flag.  The second form changes the secure_delete
+  ** flag setting and reports thenew value.
+  */
+  if( sqlite3StrICmp(zLeft,"secure_delete")==0 ){
+    Btree *pBt = pDb->pBt;
+    int b = -1;
+    assert( pBt!=0 );
+    if( zRight ){
+      b = getBoolean(zRight);
+    }
+    if( pId2->n==0 && b>=0 ){
+      int ii;
+      for(ii=0; ii<db->nDb; ii++){
+        sqlite3BtreeSecureDelete(db->aDb[ii].pBt, b);
+      }
+    }
+    b = sqlite3BtreeSecureDelete(pBt, b);
+    returnSingleInt(pParse, "secure_delete", b);
+  }else
+
+  /*
+  **  PRAGMA [database.]max_page_count
+  **  PRAGMA [database.]max_page_count=N
+  **
+  ** The first form reports the current setting for the
+  ** maximum number of pages in the database file.  The 
+  ** second form attempts to change this setting.  Both
+  ** forms return the current setting.
+  **
+  **  PRAGMA [database.]page_count
+  **
+  ** Return the number of pages in the specified database.
+  */
+  if( sqlite3StrICmp(zLeft,"page_count")==0
+   || sqlite3StrICmp(zLeft,"max_page_count")==0
+  ){
+    int iReg;
+    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+    sqlite3CodeVerifySchema(pParse, iDb);
+    iReg = ++pParse->nMem;
+    if( zLeft[0]=='p' ){
+      sqlite3VdbeAddOp2(v, OP_Pagecount, iDb, iReg);
+    }else{
+      sqlite3VdbeAddOp3(v, OP_MaxPgcnt, iDb, iReg, sqlite3Atoi(zRight));
+    }
+    sqlite3VdbeAddOp2(v, OP_ResultRow, iReg, 1);
+    sqlite3VdbeSetNumCols(v, 1);
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, zLeft, SQLITE_TRANSIENT);
+  }else
+
+  /*
+  **  PRAGMA [database.]locking_mode
+  **  PRAGMA [database.]locking_mode = (normal|exclusive)
+  */
+  if( sqlite3StrICmp(zLeft,"locking_mode")==0 ){
+    const char *zRet = "normal";
+    int eMode = getLockingMode(zRight);
+
+    if( pId2->n==0 && eMode==PAGER_LOCKINGMODE_QUERY ){
+      /* Simple "PRAGMA locking_mode;" statement. This is a query for
+      ** the current default locking mode (which may be different to
+      ** the locking-mode of the main database).
+      */
+      eMode = db->dfltLockMode;
+    }else{
+      Pager *pPager;
+      if( pId2->n==0 ){
+        /* This indicates that no database name was specified as part
+        ** of the PRAGMA command. In this case the locking-mode must be
+        ** set on all attached databases, as well as the main db file.
+        **
+        ** Also, the sqlite3.dfltLockMode variable is set so that
+        ** any subsequently attached databases also use the specified
+        ** locking mode.
+        */
+        int ii;
+        assert(pDb==&db->aDb[0]);
+        for(ii=2; ii<db->nDb; ii++){
+          pPager = sqlite3BtreePager(db->aDb[ii].pBt);
+          sqlite3PagerLockingMode(pPager, eMode);
+        }
+        db->dfltLockMode = (u8)eMode;
+      }
+      pPager = sqlite3BtreePager(pDb->pBt);
+      eMode = sqlite3PagerLockingMode(pPager, eMode);
+    }
+
+    assert(eMode==PAGER_LOCKINGMODE_NORMAL||eMode==PAGER_LOCKINGMODE_EXCLUSIVE);
+    if( eMode==PAGER_LOCKINGMODE_EXCLUSIVE ){
+      zRet = "exclusive";
+    }
+    sqlite3VdbeSetNumCols(v, 1);
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "locking_mode", SQLITE_STATIC);
+    sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, zRet, 0);
+    sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
+  }else
+
+  /*
+  **  PRAGMA [database.]journal_mode
+  **  PRAGMA [database.]journal_mode =
+  **                      (delete|persist|off|truncate|memory|wal|off)
+  */
+  if( sqlite3StrICmp(zLeft,"journal_mode")==0 ){
+    int eMode;        /* One of the PAGER_JOURNALMODE_XXX symbols */
+    int ii;           /* Loop counter */
+
+    /* Force the schema to be loaded on all databases.  This cases all
+    ** database files to be opened and the journal_modes set. */
+    if( sqlite3ReadSchema(pParse) ){
+      goto pragma_out;
+    }
+
+    sqlite3VdbeSetNumCols(v, 1);
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "journal_mode", SQLITE_STATIC);
+
+    if( zRight==0 ){
+      /* If there is no "=MODE" part of the pragma, do a query for the
+      ** current mode */
+      eMode = PAGER_JOURNALMODE_QUERY;
+    }else{
+      const char *zMode;
+      int n = sqlite3Strlen30(zRight);
+      for(eMode=0; (zMode = sqlite3JournalModename(eMode))!=0; eMode++){
+        if( sqlite3StrNICmp(zRight, zMode, n)==0 ) break;
+      }
+      if( !zMode ){
+        /* If the "=MODE" part does not match any known journal mode,
+        ** then do a query */
+        eMode = PAGER_JOURNALMODE_QUERY;
+      }
+    }
+    if( eMode==PAGER_JOURNALMODE_QUERY && pId2->n==0 ){
+      /* Convert "PRAGMA journal_mode" into "PRAGMA main.journal_mode" */
+      iDb = 0;
+      pId2->n = 1;
+    }
+    for(ii=db->nDb-1; ii>=0; ii--){
+      if( db->aDb[ii].pBt && (ii==iDb || pId2->n==0) ){
+        sqlite3VdbeUsesBtree(v, ii);
+        sqlite3VdbeAddOp3(v, OP_JournalMode, ii, 1, eMode);
+      }
+    }
+    sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
+  }else
+
+  /*
+  **  PRAGMA [database.]journal_size_limit
+  **  PRAGMA [database.]journal_size_limit=N
+  **
+  ** Get or set the size limit on rollback journal files.
+  */
+  if( sqlite3StrICmp(zLeft,"journal_size_limit")==0 ){
+    Pager *pPager = sqlite3BtreePager(pDb->pBt);
+    i64 iLimit = -2;
+    if( zRight ){
+      sqlite3Atoi64(zRight, &iLimit, 1000000, SQLITE_UTF8);
+      if( iLimit<-1 ) iLimit = -1;
+    }
+    iLimit = sqlite3PagerJournalSizeLimit(pPager, iLimit);
+    returnSingleInt(pParse, "journal_size_limit", iLimit);
+  }else
+
+#endif /* SQLITE_OMIT_PAGER_PRAGMAS */
+
+  /*
+  **  PRAGMA [database.]auto_vacuum
+  **  PRAGMA [database.]auto_vacuum=N
+  **
+  ** Get or set the value of the database 'auto-vacuum' parameter.
+  ** The value is one of:  0 NONE 1 FULL 2 INCREMENTAL
+  */
+#ifndef SQLITE_OMIT_AUTOVACUUM
+  if( sqlite3StrICmp(zLeft,"auto_vacuum")==0 ){
+    Btree *pBt = pDb->pBt;
+    assert( pBt!=0 );
+    if( sqlite3ReadSchema(pParse) ){
+      goto pragma_out;
+    }
+    if( !zRight ){
+      int auto_vacuum;
+      if( ALWAYS(pBt) ){
+         auto_vacuum = sqlite3BtreeGetAutoVacuum(pBt);
+      }else{
+         auto_vacuum = SQLITE_DEFAULT_AUTOVACUUM;
+      }
+      returnSingleInt(pParse, "auto_vacuum", auto_vacuum);
+    }else{
+      int eAuto = getAutoVacuum(zRight);
+      assert( eAuto>=0 && eAuto<=2 );
+      db->nextAutovac = (u8)eAuto;
+      if( ALWAYS(eAuto>=0) ){
+        /* Call SetAutoVacuum() to set initialize the internal auto and
+        ** incr-vacuum flags. This is required in case this connection
+        ** creates the database file. It is important that it is created
+        ** as an auto-vacuum capable db.
+        */
+        int rc = sqlite3BtreeSetAutoVacuum(pBt, eAuto);
+        if( rc==SQLITE_OK && (eAuto==1 || eAuto==2) ){
+          /* When setting the auto_vacuum mode to either "full" or 
+          ** "incremental", write the value of meta[6] in the database
+          ** file. Before writing to meta[6], check that meta[3] indicates
+          ** that this really is an auto-vacuum capable database.
+          */
+          static const VdbeOpList setMeta6[] = {
+            { OP_Transaction,    0,         1,                 0},    /* 0 */
+            { OP_ReadCookie,     0,         1,         BTREE_LARGEST_ROOT_PAGE},
+            { OP_If,             1,         0,                 0},    /* 2 */
+            { OP_Halt,           SQLITE_OK, OE_Abort,          0},    /* 3 */
+            { OP_Integer,        0,         1,                 0},    /* 4 */
+            { OP_SetCookie,      0,         BTREE_INCR_VACUUM, 1},    /* 5 */
+          };
+          int iAddr;
+          iAddr = sqlite3VdbeAddOpList(v, ArraySize(setMeta6), setMeta6);
+          sqlite3VdbeChangeP1(v, iAddr, iDb);
+          sqlite3VdbeChangeP1(v, iAddr+1, iDb);
+          sqlite3VdbeChangeP2(v, iAddr+2, iAddr+4);
+          sqlite3VdbeChangeP1(v, iAddr+4, eAuto-1);
+          sqlite3VdbeChangeP1(v, iAddr+5, iDb);
+          sqlite3VdbeUsesBtree(v, iDb);
+        }
+      }
+    }
+  }else
+#endif
+
+  /*
+  **  PRAGMA [database.]incremental_vacuum(N)
+  **
+  ** Do N steps of incremental vacuuming on a database.
+  */
+#ifndef SQLITE_OMIT_AUTOVACUUM
+  if( sqlite3StrICmp(zLeft,"incremental_vacuum")==0 ){
+    int iLimit, addr;
+    if( sqlite3ReadSchema(pParse) ){
+      goto pragma_out;
+    }
+    if( zRight==0 || !sqlite3GetInt32(zRight, &iLimit) || iLimit<=0 ){
+      iLimit = 0x7fffffff;
+    }
+    sqlite3BeginWriteOperation(pParse, 0, iDb);
+    sqlite3VdbeAddOp2(v, OP_Integer, iLimit, 1);
+    addr = sqlite3VdbeAddOp1(v, OP_IncrVacuum, iDb);
+    sqlite3VdbeAddOp1(v, OP_ResultRow, 1);
+    sqlite3VdbeAddOp2(v, OP_AddImm, 1, -1);
+    sqlite3VdbeAddOp2(v, OP_IfPos, 1, addr);
+    sqlite3VdbeJumpHere(v, addr);
+  }else
+#endif
+
+#ifndef SQLITE_OMIT_PAGER_PRAGMAS
+  /*
+  **  PRAGMA [database.]cache_size
+  **  PRAGMA [database.]cache_size=N
+  **
+  ** The first form reports the current local setting for the
+  ** page cache size.  The local setting can be different from
+  ** the persistent cache size value that is stored in the database
+  ** file itself.  The value returned is the maximum number of
+  ** pages in the page cache.  The second form sets the local
+  ** page cache size value.  It does not change the persistent
+  ** cache size stored on the disk so the cache size will revert
+  ** to its default value when the database is closed and reopened.
+  ** N should be a positive integer.
+  */
+  if( sqlite3StrICmp(zLeft,"cache_size")==0 ){
+    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+    if( !zRight ){
+      returnSingleInt(pParse, "cache_size", pDb->pSchema->cache_size);
+    }else{
+      int size = sqlite3AbsInt32(sqlite3Atoi(zRight));
+      pDb->pSchema->cache_size = size;
+      sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
+    }
+  }else
+
+  /*
+  **   PRAGMA temp_store
+  **   PRAGMA temp_store = "default"|"memory"|"file"
+  **
+  ** Return or set the local value of the temp_store flag.  Changing
+  ** the local value does not make changes to the disk file and the default
+  ** value will be restored the next time the database is opened.
+  **
+  ** Note that it is possible for the library compile-time options to
+  ** override this setting
+  */
+  if( sqlite3StrICmp(zLeft, "temp_store")==0 ){
+    if( !zRight ){
+      returnSingleInt(pParse, "temp_store", db->temp_store);
+    }else{
+      changeTempStorage(pParse, zRight);
+    }
+  }else
+
+  /*
+  **   PRAGMA temp_store_directory
+  **   PRAGMA temp_store_directory = ""|"directory_name"
+  **
+  ** Return or set the local value of the temp_store_directory flag.  Changing
+  ** the value sets a specific directory to be used for temporary files.
+  ** Setting to a null string reverts to the default temporary directory search.
+  ** If temporary directory is changed, then invalidateTempStorage.
+  **
+  */
+  if( sqlite3StrICmp(zLeft, "temp_store_directory")==0 ){
+    if( !zRight ){
+      if( sqlite3_temp_directory ){
+        sqlite3VdbeSetNumCols(v, 1);
+        sqlite3VdbeSetColName(v, 0, COLNAME_NAME, 
+            "temp_store_directory", SQLITE_STATIC);
+        sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, sqlite3_temp_directory, 0);
+        sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
+      }
+    }else{
+#ifndef SQLITE_OMIT_WSD
+      if( zRight[0] ){
+        int rc;
+        int res;
+        rc = sqlite3OsAccess(db->pVfs, zRight, SQLITE_ACCESS_READWRITE, &res);
+        if( rc!=SQLITE_OK || res==0 ){
+          sqlite3ErrorMsg(pParse, "not a writable directory");
+          goto pragma_out;
+        }
+      }
+		{
+			int cond = SQLITE_TEMP_STORE || (SQLITE_TEMP_STORE==1 && db->temp_store<=1) || (SQLITE_TEMP_STORE==2 && db->temp_store==1);
+			if(cond)
+			{
+			  invalidateTempStorage(pParse);
+			}
+		}
+      sqlite3_free(sqlite3_temp_directory);
+      if( zRight[0] ){
+        sqlite3_temp_directory = sqlite3_mprintf("%s", zRight);
+      }else{
+        sqlite3_temp_directory = 0;
+      }
+#endif /* SQLITE_OMIT_WSD */
+    }
+  }else
+
+#if !defined(SQLITE_ENABLE_LOCKING_STYLE)
+#  if defined(__APPLE__)
+#    define SQLITE_ENABLE_LOCKING_STYLE 1
+#  else
+#    define SQLITE_ENABLE_LOCKING_STYLE 0
+#  endif
+#endif
+#if SQLITE_ENABLE_LOCKING_STYLE
+  /*
+   **   PRAGMA [database.]lock_proxy_file
+   **   PRAGMA [database.]lock_proxy_file = ":auto:"|"lock_file_path"
+   **
+   ** Return or set the value of the lock_proxy_file flag.  Changing
+   ** the value sets a specific file to be used for database access locks.
+   **
+   */
+  if( sqlite3StrICmp(zLeft, "lock_proxy_file")==0 ){
+    if( !zRight ){
+      Pager *pPager = sqlite3BtreePager(pDb->pBt);
+      char *proxy_file_path = NULL;
+      sqlite3_file *pFile = sqlite3PagerFile(pPager);
+      sqlite3OsFileControl(pFile, SQLITE_GET_LOCKPROXYFILE, 
+                           &proxy_file_path);
+      
+      if( proxy_file_path ){
+        sqlite3VdbeSetNumCols(v, 1);
+        sqlite3VdbeSetColName(v, 0, COLNAME_NAME, 
+                              "lock_proxy_file", SQLITE_STATIC);
+        sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, proxy_file_path, 0);
+        sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
+      }
+    }else{
+      Pager *pPager = sqlite3BtreePager(pDb->pBt);
+      sqlite3_file *pFile = sqlite3PagerFile(pPager);
+      int res;
+      if( zRight[0] ){
+        res=sqlite3OsFileControl(pFile, SQLITE_SET_LOCKPROXYFILE, 
+                                     zRight);
+      } else {
+        res=sqlite3OsFileControl(pFile, SQLITE_SET_LOCKPROXYFILE, 
+                                     NULL);
+      }
+      if( res!=SQLITE_OK ){
+        sqlite3ErrorMsg(pParse, "failed to set lock proxy file");
+        goto pragma_out;
+      }
+    }
+  }else
+#endif /* SQLITE_ENABLE_LOCKING_STYLE */      
+    
+  /*
+  **   PRAGMA [database.]synchronous
+  **   PRAGMA [database.]synchronous=OFF|ON|NORMAL|FULL
+  **
+  ** Return or set the local value of the synchronous flag.  Changing
+  ** the local value does not make changes to the disk file and the
+  ** default value will be restored the next time the database is
+  ** opened.
+  */
+  if( sqlite3StrICmp(zLeft,"synchronous")==0 ){
+    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+    if( !zRight ){
+      returnSingleInt(pParse, "synchronous", pDb->safety_level-1);
+    }else{
+      if( !db->autoCommit ){
+        sqlite3ErrorMsg(pParse, 
+            "Safety level may not be changed inside a transaction");
+      }else{
+        pDb->safety_level = getSafetyLevel(zRight)+1;
+      }
+    }
+  }else
+#endif /* SQLITE_OMIT_PAGER_PRAGMAS */
+
+#ifndef SQLITE_OMIT_FLAG_PRAGMAS
+  if( flagPragma(pParse, zLeft, zRight) ){
+    /* The flagPragma() subroutine also generates any necessary code
+    ** there is nothing more to do here */
+  }else
+#endif /* SQLITE_OMIT_FLAG_PRAGMAS */
+
+#ifndef SQLITE_OMIT_SCHEMA_PRAGMAS
+  /*
+  **   PRAGMA table_info(<table>)
+  **
+  ** Return a single row for each column of the named table. The columns of
+  ** the returned data set are:
+  **
+  ** cid:        Column id (numbered from left to right, starting at 0)
+  ** name:       Column name
+  ** type:       Column declaration type.
+  ** notnull:    True if 'NOT NULL' is part of column declaration
+  ** dflt_value: The default value for the column, if any.
+  */
+  if( sqlite3StrICmp(zLeft, "table_info")==0 && zRight ){
+    Table *pTab;
+    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+    pTab = sqlite3FindTable(db, zRight, zDb);
+    if( pTab ){
+      int i;
+      int nHidden = 0;
+      Column *pCol;
+      sqlite3VdbeSetNumCols(v, 6);
+      pParse->nMem = 6;
+      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "cid", SQLITE_STATIC);
+      sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
+      sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "type", SQLITE_STATIC);
+      sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "notnull", SQLITE_STATIC);
+      sqlite3VdbeSetColName(v, 4, COLNAME_NAME, "dflt_value", SQLITE_STATIC);
+      sqlite3VdbeSetColName(v, 5, COLNAME_NAME, "pk", SQLITE_STATIC);
+      sqlite3ViewGetColumnNames(pParse, pTab);
+      for(i=0, pCol=pTab->aCol; i<pTab->nCol; i++, pCol++){
+        if( IsHiddenColumn(pCol) ){
+          nHidden++;
+          continue;
+        }
+        sqlite3VdbeAddOp2(v, OP_Integer, i-nHidden, 1);
+        sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pCol->zName, 0);
+        sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0,
+           pCol->zType ? pCol->zType : "", 0);
+        sqlite3VdbeAddOp2(v, OP_Integer, (pCol->notNull ? 1 : 0), 4);
+        if( pCol->zDflt ){
+          sqlite3VdbeAddOp4(v, OP_String8, 0, 5, 0, (char*)pCol->zDflt, 0);
+        }else{
+          sqlite3VdbeAddOp2(v, OP_Null, 0, 5);
+        }
+        sqlite3VdbeAddOp2(v, OP_Integer, pCol->isPrimKey, 6);
+        sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 6);
+      }
+    }
+  }else
+
+  if( sqlite3StrICmp(zLeft, "index_info")==0 && zRight ){
+    Index *pIdx;
+    Table *pTab;
+    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+    pIdx = sqlite3FindIndex(db, zRight, zDb);
+    if( pIdx ){
+      int i;
+      pTab = pIdx->pTable;
+      sqlite3VdbeSetNumCols(v, 3);
+      pParse->nMem = 3;
+      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seqno", SQLITE_STATIC);
+      sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "cid", SQLITE_STATIC);
+      sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "name", SQLITE_STATIC);
+      for(i=0; i<pIdx->nColumn; i++){
+        int cnum = pIdx->aiColumn[i];
+        sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
+        sqlite3VdbeAddOp2(v, OP_Integer, cnum, 2);
+        assert( pTab->nCol>cnum );
+        sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, pTab->aCol[cnum].zName, 0);
+        sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 3);
+      }
+    }
+  }else
+
+  if( sqlite3StrICmp(zLeft, "index_list")==0 && zRight ){
+    Index *pIdx;
+    Table *pTab;
+    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+    pTab = sqlite3FindTable(db, zRight, zDb);
+    if( pTab ){
+      v = sqlite3GetVdbe(pParse);
+      pIdx = pTab->pIndex;
+      if( pIdx ){
+        int i = 0; 
+        sqlite3VdbeSetNumCols(v, 3);
+        pParse->nMem = 3;
+        sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seq", SQLITE_STATIC);
+        sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
+        sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "unique", SQLITE_STATIC);
+        while(pIdx){
+          sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
+          sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pIdx->zName, 0);
+          sqlite3VdbeAddOp2(v, OP_Integer, pIdx->onError!=OE_None, 3);
+          sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 3);
+          ++i;
+          pIdx = pIdx->pNext;
+        }
+      }
+    }
+  }else
+
+  if( sqlite3StrICmp(zLeft, "database_list")==0 ){
+    int i;
+    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+    sqlite3VdbeSetNumCols(v, 3);
+    pParse->nMem = 3;
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seq", SQLITE_STATIC);
+    sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
+    sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "file", SQLITE_STATIC);
+    for(i=0; i<db->nDb; i++){
+      if( db->aDb[i].pBt==0 ) continue;
+      assert( db->aDb[i].zName!=0 );
+      sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
+      sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, db->aDb[i].zName, 0);
+      sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0,
+           sqlite3BtreeGetFilename(db->aDb[i].pBt), 0);
+      sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 3);
+    }
+  }else
+
+  if( sqlite3StrICmp(zLeft, "collation_list")==0 ){
+    int i = 0;
+    HashElem *p;
+    sqlite3VdbeSetNumCols(v, 2);
+    pParse->nMem = 2;
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "seq", SQLITE_STATIC);
+    sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "name", SQLITE_STATIC);
+    for(p=sqliteHashFirst(&db->aCollSeq); p; p=sqliteHashNext(p)){
+      CollSeq *pColl = (CollSeq *)sqliteHashData(p);
+      sqlite3VdbeAddOp2(v, OP_Integer, i++, 1);
+      sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, pColl->zName, 0);
+      sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 2);
+    }
+  }else
+#endif /* SQLITE_OMIT_SCHEMA_PRAGMAS */
+
+#ifndef SQLITE_OMIT_FOREIGN_KEY
+  if( sqlite3StrICmp(zLeft, "foreign_key_list")==0 && zRight ){
+    FKey *pFK;
+    Table *pTab;
+    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+    pTab = sqlite3FindTable(db, zRight, zDb);
+    if( pTab ){
+      v = sqlite3GetVdbe(pParse);
+      pFK = pTab->pFKey;
+      if( pFK ){
+        int i = 0; 
+        sqlite3VdbeSetNumCols(v, 8);
+        pParse->nMem = 8;
+        sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "id", SQLITE_STATIC);
+        sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "seq", SQLITE_STATIC);
+        sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "table", SQLITE_STATIC);
+        sqlite3VdbeSetColName(v, 3, COLNAME_NAME, "from", SQLITE_STATIC);
+        sqlite3VdbeSetColName(v, 4, COLNAME_NAME, "to", SQLITE_STATIC);
+        sqlite3VdbeSetColName(v, 5, COLNAME_NAME, "on_update", SQLITE_STATIC);
+        sqlite3VdbeSetColName(v, 6, COLNAME_NAME, "on_delete", SQLITE_STATIC);
+        sqlite3VdbeSetColName(v, 7, COLNAME_NAME, "match", SQLITE_STATIC);
+        while(pFK){
+          int j;
+          for(j=0; j<pFK->nCol; j++){
+            char *zCol = pFK->aCol[j].zCol;
+            char *zOnDelete = (char *)actionName(pFK->aAction[0]);
+            char *zOnUpdate = (char *)actionName(pFK->aAction[1]);
+            sqlite3VdbeAddOp2(v, OP_Integer, i, 1);
+            sqlite3VdbeAddOp2(v, OP_Integer, j, 2);
+            sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0, pFK->zTo, 0);
+            sqlite3VdbeAddOp4(v, OP_String8, 0, 4, 0,
+                              pTab->aCol[pFK->aCol[j].iFrom].zName, 0);
+            sqlite3VdbeAddOp4(v, zCol ? OP_String8 : OP_Null, 0, 5, 0, zCol, 0);
+            sqlite3VdbeAddOp4(v, OP_String8, 0, 6, 0, zOnUpdate, 0);
+            sqlite3VdbeAddOp4(v, OP_String8, 0, 7, 0, zOnDelete, 0);
+            sqlite3VdbeAddOp4(v, OP_String8, 0, 8, 0, "NONE", 0);
+            sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 8);
+          }
+          ++i;
+          pFK = pFK->pNextFrom;
+        }
+      }
+    }
+  }else
+#endif /* !defined(SQLITE_OMIT_FOREIGN_KEY) */
+
+#ifndef NDEBUG
+  if( sqlite3StrICmp(zLeft, "parser_trace")==0 ){
+    if( zRight ){
+      if( getBoolean(zRight) ){
+        sqlite3ParserTrace(stderr, "parser: ");
+      }else{
+        sqlite3ParserTrace(0, 0);
+      }
+    }
+  }else
+#endif
+
+  /* Reinstall the LIKE and GLOB functions.  The variant of LIKE
+  ** used will be case sensitive or not depending on the RHS.
+  */
+  if( sqlite3StrICmp(zLeft, "case_sensitive_like")==0 ){
+    if( zRight ){
+      sqlite3RegisterLikeFunctions(db, getBoolean(zRight));
+    }
+  }else
+
+#ifndef SQLITE_INTEGRITY_CHECK_ERROR_MAX
+# define SQLITE_INTEGRITY_CHECK_ERROR_MAX 100
+#endif
+
+#ifndef SQLITE_OMIT_INTEGRITY_CHECK
+  /* Pragma "quick_check" is an experimental reduced version of 
+  ** integrity_check designed to detect most database corruption
+  ** without most of the overhead of a full integrity-check.
+  */
+  if( sqlite3StrICmp(zLeft, "integrity_check")==0
+   || sqlite3StrICmp(zLeft, "quick_check")==0 
+  ){
+    int i, j, addr, mxErr;
+
+    /* Code that appears at the end of the integrity check.  If no error
+    ** messages have been generated, output OK.  Otherwise output the
+    ** error message
+    */
+    static const VdbeOpList endCode[] = {
+      { OP_AddImm,      1, 0,        0},    /* 0 */
+      { OP_IfNeg,       1, 0,        0},    /* 1 */
+      { OP_String8,     0, 3,        0},    /* 2 */
+      { OP_ResultRow,   3, 1,        0},
+    };
+
+    int isQuick = (zLeft[0]=='q');
+
+    /* Initialize the VDBE program */
+    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+    pParse->nMem = 6;
+    sqlite3VdbeSetNumCols(v, 1);
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "integrity_check", SQLITE_STATIC);
+
+    /* Set the maximum error count */
+    mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX;
+    if( zRight ){
+      sqlite3GetInt32(zRight, &mxErr);
+      if( mxErr<=0 ){
+        mxErr = SQLITE_INTEGRITY_CHECK_ERROR_MAX;
+      }
+    }
+    sqlite3VdbeAddOp2(v, OP_Integer, mxErr, 1);  /* reg[1] holds errors left */
+
+    /* Do an integrity check on each database file */
+    for(i=0; i<db->nDb; i++){
+      HashElem *x;
+      Hash *pTbls;
+      int cnt = 0;
+
+#if (OMIT_TEMPDB)
+      if( i==1 ) continue;
+#endif
+
+      sqlite3CodeVerifySchema(pParse, i);
+      addr = sqlite3VdbeAddOp1(v, OP_IfPos, 1); /* Halt if out of errors */
+      sqlite3VdbeAddOp2(v, OP_Halt, 0, 0);
+      sqlite3VdbeJumpHere(v, addr);
+
+      /* Do an integrity check of the B-Tree
+      **
+      ** Begin by filling registers 2, 3, ... with the root pages numbers
+      ** for all tables and indices in the database.
+      */
+      assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+      pTbls = &db->aDb[i].pSchema->tblHash;
+      for(x=sqliteHashFirst(pTbls); x; x=sqliteHashNext(x)){
+        Table *pTab = sqliteHashData(x);
+        Index *pIdx;
+        sqlite3VdbeAddOp2(v, OP_Integer, pTab->tnum, 2+cnt);
+        cnt++;
+        for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+          sqlite3VdbeAddOp2(v, OP_Integer, pIdx->tnum, 2+cnt);
+          cnt++;
+        }
+      }
+
+      /* Make sure sufficient number of registers have been allocated */
+      if( pParse->nMem < cnt+4 ){
+        pParse->nMem = cnt+4;
+      }
+
+      /* Do the b-tree integrity checks */
+      sqlite3VdbeAddOp3(v, OP_IntegrityCk, 2, cnt, 1);
+      sqlite3VdbeChangeP5(v, (u8)i);
+      addr = sqlite3VdbeAddOp1(v, OP_IsNull, 2);
+      sqlite3VdbeAddOp4(v, OP_String8, 0, 3, 0,
+         sqlite3MPrintf(db, "*** in database %s ***\n", db->aDb[i].zName),
+         P4_DYNAMIC);
+      sqlite3VdbeAddOp3(v, OP_Move, 2, 4, 1);
+      sqlite3VdbeAddOp3(v, OP_Concat, 4, 3, 2);
+      sqlite3VdbeAddOp2(v, OP_ResultRow, 2, 1);
+      sqlite3VdbeJumpHere(v, addr);
+
+      /* Make sure all the indices are constructed correctly.
+      */
+      for(x=sqliteHashFirst(pTbls); x && !isQuick; x=sqliteHashNext(x)){
+        Table *pTab = sqliteHashData(x);
+        Index *pIdx;
+        int loopTop;
+
+        if( pTab->pIndex==0 ) continue;
+        addr = sqlite3VdbeAddOp1(v, OP_IfPos, 1);  /* Stop if out of errors */
+        sqlite3VdbeAddOp2(v, OP_Halt, 0, 0);
+        sqlite3VdbeJumpHere(v, addr);
+        sqlite3OpenTableAndIndices(pParse, pTab, 1, OP_OpenRead);
+        sqlite3VdbeAddOp2(v, OP_Integer, 0, 2);  /* reg(2) will count entries */
+        loopTop = sqlite3VdbeAddOp2(v, OP_Rewind, 1, 0);
+        sqlite3VdbeAddOp2(v, OP_AddImm, 2, 1);   /* increment entry count */
+        for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
+          int jmp2;
+          int r1;
+          static const VdbeOpList idxErr[] = {
+            { OP_AddImm,      1, -1,  0},
+            { OP_String8,     0,  3,  0},    /* 1 */
+            { OP_Rowid,       1,  4,  0},
+            { OP_String8,     0,  5,  0},    /* 3 */
+            { OP_String8,     0,  6,  0},    /* 4 */
+            { OP_Concat,      4,  3,  3},
+            { OP_Concat,      5,  3,  3},
+            { OP_Concat,      6,  3,  3},
+            { OP_ResultRow,   3,  1,  0},
+            { OP_IfPos,       1,  0,  0},    /* 9 */
+            { OP_Halt,        0,  0,  0},
+          };
+          r1 = sqlite3GenerateIndexKey(pParse, pIdx, 1, 3, 0);
+          jmp2 = sqlite3VdbeAddOp4Int(v, OP_Found, j+2, 0, r1, pIdx->nColumn+1);
+          addr = sqlite3VdbeAddOpList(v, ArraySize(idxErr), idxErr);
+          sqlite3VdbeChangeP4(v, addr+1, "rowid ", P4_STATIC);
+          sqlite3VdbeChangeP4(v, addr+3, " missing from index ", P4_STATIC);
+          sqlite3VdbeChangeP4(v, addr+4, pIdx->zName, P4_TRANSIENT);
+          sqlite3VdbeJumpHere(v, addr+9);
+          sqlite3VdbeJumpHere(v, jmp2);
+        }
+        sqlite3VdbeAddOp2(v, OP_Next, 1, loopTop+1);
+        sqlite3VdbeJumpHere(v, loopTop);
+        for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
+          static const VdbeOpList cntIdx[] = {
+             { OP_Integer,      0,  3,  0},
+             { OP_Rewind,       0,  0,  0},  /* 1 */
+             { OP_AddImm,       3,  1,  0},
+             { OP_Next,         0,  0,  0},  /* 3 */
+             { OP_Eq,           2,  0,  3},  /* 4 */
+             { OP_AddImm,       1, -1,  0},
+             { OP_String8,      0,  2,  0},  /* 6 */
+             { OP_String8,      0,  3,  0},  /* 7 */
+             { OP_Concat,       3,  2,  2},
+             { OP_ResultRow,    2,  1,  0},
+          };
+          addr = sqlite3VdbeAddOp1(v, OP_IfPos, 1);
+          sqlite3VdbeAddOp2(v, OP_Halt, 0, 0);
+          sqlite3VdbeJumpHere(v, addr);
+          addr = sqlite3VdbeAddOpList(v, ArraySize(cntIdx), cntIdx);
+          sqlite3VdbeChangeP1(v, addr+1, j+2);
+          sqlite3VdbeChangeP2(v, addr+1, addr+4);
+          sqlite3VdbeChangeP1(v, addr+3, j+2);
+          sqlite3VdbeChangeP2(v, addr+3, addr+2);
+          sqlite3VdbeJumpHere(v, addr+4);
+          sqlite3VdbeChangeP4(v, addr+6, 
+                     "wrong # of entries in index ", P4_STATIC);
+          sqlite3VdbeChangeP4(v, addr+7, pIdx->zName, P4_TRANSIENT);
+        }
+      } 
+    }
+    addr = sqlite3VdbeAddOpList(v, ArraySize(endCode), endCode);
+    sqlite3VdbeChangeP2(v, addr, -mxErr);
+    sqlite3VdbeJumpHere(v, addr+1);
+    sqlite3VdbeChangeP4(v, addr+2, "ok", P4_STATIC);
+  }else
+#endif /* SQLITE_OMIT_INTEGRITY_CHECK */
+
+#ifndef SQLITE_OMIT_UTF16
+  /*
+  **   PRAGMA encoding
+  **   PRAGMA encoding = "utf-8"|"utf-16"|"utf-16le"|"utf-16be"
+  **
+  ** In its first form, this pragma returns the encoding of the main
+  ** database. If the database is not initialized, it is initialized now.
+  **
+  ** The second form of this pragma is a no-op if the main database file
+  ** has not already been initialized. In this case it sets the default
+  ** encoding that will be used for the main database file if a new file
+  ** is created. If an existing main database file is opened, then the
+  ** default text encoding for the existing database is used.
+  ** 
+  ** In all cases new databases created using the ATTACH command are
+  ** created to use the same default text encoding as the main database. If
+  ** the main database has not been initialized and/or created when ATTACH
+  ** is executed, this is done before the ATTACH operation.
+  **
+  ** In the second form this pragma sets the text encoding to be used in
+  ** new database files created using this database handle. It is only
+  ** useful if invoked immediately after the main database i
+  */
+  if( sqlite3StrICmp(zLeft, "encoding")==0 ){
+    static const struct EncName {
+      char *zName;
+      u8 enc;
+    } encnames[] = {
+      { "UTF8",     SQLITE_UTF8        },
+      { "UTF-8",    SQLITE_UTF8        },  /* Must be element [1] */
+      { "UTF-16le", SQLITE_UTF16LE     },  /* Must be element [2] */
+      { "UTF-16be", SQLITE_UTF16BE     },  /* Must be element [3] */
+      { "UTF16le",  SQLITE_UTF16LE     },
+      { "UTF16be",  SQLITE_UTF16BE     },
+      { "UTF-16",   0                  }, /* SQLITE_UTF16NATIVE */
+      { "UTF16",    0                  }, /* SQLITE_UTF16NATIVE */
+      { 0, 0 }
+    };
+    const struct EncName *pEnc;
+    if( !zRight ){    /* "PRAGMA encoding" */
+      if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+      sqlite3VdbeSetNumCols(v, 1);
+      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "encoding", SQLITE_STATIC);
+      sqlite3VdbeAddOp2(v, OP_String8, 0, 1);
+      assert( encnames[SQLITE_UTF8].enc==SQLITE_UTF8 );
+      assert( encnames[SQLITE_UTF16LE].enc==SQLITE_UTF16LE );
+      assert( encnames[SQLITE_UTF16BE].enc==SQLITE_UTF16BE );
+      sqlite3VdbeChangeP4(v, -1, encnames[ENC(pParse->db)].zName, P4_STATIC);
+      sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
+    }else{                        /* "PRAGMA encoding = XXX" */
+      /* Only change the value of sqlite.enc if the database handle is not
+      ** initialized. If the main database exists, the new sqlite.enc value
+      ** will be overwritten when the schema is next loaded. If it does not
+      ** already exists, it will be created to use the new encoding value.
+      */
+      if( 
+        !(DbHasProperty(db, 0, DB_SchemaLoaded)) || 
+        DbHasProperty(db, 0, DB_Empty) 
+      ){
+        for(pEnc=&encnames[0]; pEnc->zName; pEnc++){
+          if( 0==sqlite3StrICmp(zRight, pEnc->zName) ){
+            ENC(pParse->db) = pEnc->enc ? pEnc->enc : SQLITE_UTF16NATIVE;
+            break;
+          }
+        }
+        if( !pEnc->zName ){
+          sqlite3ErrorMsg(pParse, "unsupported encoding: %s", zRight);
+        }
+      }
+    }
+  }else
+#endif /* SQLITE_OMIT_UTF16 */
+
+#ifndef SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS
+  /*
+  **   PRAGMA [database.]schema_version
+  **   PRAGMA [database.]schema_version = <integer>
+  **
+  **   PRAGMA [database.]user_version
+  **   PRAGMA [database.]user_version = <integer>
+  **
+  ** The pragma's schema_version and user_version are used to set or get
+  ** the value of the schema-version and user-version, respectively. Both
+  ** the schema-version and the user-version are 32-bit signed integers
+  ** stored in the database header.
+  **
+  ** The schema-cookie is usually only manipulated internally by SQLite. It
+  ** is incremented by SQLite whenever the database schema is modified (by
+  ** creating or dropping a table or index). The schema version is used by
+  ** SQLite each time a query is executed to ensure that the internal cache
+  ** of the schema used when compiling the SQL query matches the schema of
+  ** the database against which the compiled query is actually executed.
+  ** Subverting this mechanism by using "PRAGMA schema_version" to modify
+  ** the schema-version is potentially dangerous and may lead to program
+  ** crashes or database corruption. Use with caution!
+  **
+  ** The user-version is not used internally by SQLite. It may be used by
+  ** applications for any purpose.
+  */
+  if( sqlite3StrICmp(zLeft, "schema_version")==0 
+   || sqlite3StrICmp(zLeft, "user_version")==0 
+   || sqlite3StrICmp(zLeft, "freelist_count")==0 
+  ){
+    int iCookie;   /* Cookie index. 1 for schema-cookie, 6 for user-cookie. */
+    sqlite3VdbeUsesBtree(v, iDb);
+    switch( zLeft[0] ){
+      case 'f': case 'F':
+        iCookie = BTREE_FREE_PAGE_COUNT;
+        break;
+      case 's': case 'S':
+        iCookie = BTREE_SCHEMA_VERSION;
+        break;
+      default:
+        iCookie = BTREE_USER_VERSION;
+        break;
+    }
+
+    if( zRight && iCookie!=BTREE_FREE_PAGE_COUNT ){
+      /* Write the specified cookie value */
+      static const VdbeOpList setCookie[] = {
+        { OP_Transaction,    0,  1,  0},    /* 0 */
+        { OP_Integer,        0,  1,  0},    /* 1 */
+        { OP_SetCookie,      0,  0,  1},    /* 2 */
+      };
+      int addr = sqlite3VdbeAddOpList(v, ArraySize(setCookie), setCookie);
+      sqlite3VdbeChangeP1(v, addr, iDb);
+      sqlite3VdbeChangeP1(v, addr+1, sqlite3Atoi(zRight));
+      sqlite3VdbeChangeP1(v, addr+2, iDb);
+      sqlite3VdbeChangeP2(v, addr+2, iCookie);
+    }else{
+      /* Read the specified cookie value */
+      static const VdbeOpList readCookie[] = {
+        { OP_Transaction,     0,  0,  0},    /* 0 */
+        { OP_ReadCookie,      0,  1,  0},    /* 1 */
+        { OP_ResultRow,       1,  1,  0}
+      };
+      int addr = sqlite3VdbeAddOpList(v, ArraySize(readCookie), readCookie);
+      sqlite3VdbeChangeP1(v, addr, iDb);
+      sqlite3VdbeChangeP1(v, addr+1, iDb);
+      sqlite3VdbeChangeP3(v, addr+1, iCookie);
+      sqlite3VdbeSetNumCols(v, 1);
+      sqlite3VdbeSetColName(v, 0, COLNAME_NAME, zLeft, SQLITE_TRANSIENT);
+    }
+  }else
+#endif /* SQLITE_OMIT_SCHEMA_VERSION_PRAGMAS */
+
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+  /*
+  **   PRAGMA compile_options
+  **
+  ** Return the names of all compile-time options used in this build,
+  ** one option per row.
+  */
+  if( sqlite3StrICmp(zLeft, "compile_options")==0 ){
+    int i = 0;
+    const char *zOpt;
+    sqlite3VdbeSetNumCols(v, 1);
+    pParse->nMem = 1;
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "compile_option", SQLITE_STATIC);
+    while( (zOpt = sqlite3_compileoption_get(i++))!=0 ){
+      sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, zOpt, 0);
+      sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 1);
+    }
+  }else
+#endif /* SQLITE_OMIT_COMPILEOPTION_DIAGS */
+
+#ifndef SQLITE_OMIT_WAL
+  /*
+  **   PRAGMA [database.]wal_checkpoint = passive|full|restart
+  **
+  ** Checkpoint the database.
+  */
+  if( sqlite3StrICmp(zLeft, "wal_checkpoint")==0 ){
+    int iBt = (pId2->z?iDb:SQLITE_MAX_ATTACHED);
+    int eMode = SQLITE_CHECKPOINT_PASSIVE;
+    if( zRight ){
+      if( sqlite3StrICmp(zRight, "full")==0 ){
+        eMode = SQLITE_CHECKPOINT_FULL;
+      }else if( sqlite3StrICmp(zRight, "restart")==0 ){
+        eMode = SQLITE_CHECKPOINT_RESTART;
+      }
+    }
+    if( sqlite3ReadSchema(pParse) ) goto pragma_out;
+    sqlite3VdbeSetNumCols(v, 3);
+    pParse->nMem = 3;
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "busy", SQLITE_STATIC);
+    sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "log", SQLITE_STATIC);
+    sqlite3VdbeSetColName(v, 2, COLNAME_NAME, "checkpointed", SQLITE_STATIC);
+
+    sqlite3VdbeAddOp3(v, OP_Checkpoint, iBt, eMode, 1);
+    sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 3);
+  }else
+
+  /*
+  **   PRAGMA wal_autocheckpoint
+  **   PRAGMA wal_autocheckpoint = N
+  **
+  ** Configure a database connection to automatically checkpoint a database
+  ** after accumulating N frames in the log. Or query for the current value
+  ** of N.
+  */
+  if( sqlite3StrICmp(zLeft, "wal_autocheckpoint")==0 ){
+    if( zRight ){
+      sqlite3_wal_autocheckpoint(db, sqlite3Atoi(zRight));
+    }
+    returnSingleInt(pParse, "wal_autocheckpoint", 
+       db->xWalCallback==sqlite3WalDefaultHook ? 
+           SQLITE_PTR_TO_INT(db->pWalArg) : 0);
+  }else
+#endif
+
+#if defined(SQLITE_DEBUG) || defined(SQLITE_TEST)
+  /*
+  ** Report the current state of file logs for all databases
+  */
+  if( sqlite3StrICmp(zLeft, "lock_status")==0 ){
+    static const char *const azLockName[] = {
+      "unlocked", "shared", "reserved", "pending", "exclusive"
+    };
+    int i;
+    sqlite3VdbeSetNumCols(v, 2);
+    pParse->nMem = 2;
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "database", SQLITE_STATIC);
+    sqlite3VdbeSetColName(v, 1, COLNAME_NAME, "status", SQLITE_STATIC);
+    for(i=0; i<db->nDb; i++){
+      Btree *pBt;
+      Pager *pPager;
+      const char *zState = "unknown";
+      int j;
+      if( db->aDb[i].zName==0 ) continue;
+      sqlite3VdbeAddOp4(v, OP_String8, 0, 1, 0, db->aDb[i].zName, P4_STATIC);
+      pBt = db->aDb[i].pBt;
+      if( pBt==0 || (pPager = sqlite3BtreePager(pBt))==0 ){
+        zState = "closed";
+      }else if( sqlite3_file_control(db, i ? db->aDb[i].zName : 0, 
+                                     SQLITE_FCNTL_LOCKSTATE, &j)==SQLITE_OK ){
+         zState = azLockName[j];
+      }
+      sqlite3VdbeAddOp4(v, OP_String8, 0, 2, 0, zState, P4_STATIC);
+      sqlite3VdbeAddOp2(v, OP_ResultRow, 1, 2);
+    }
+
+  }else
+#endif
+
+#ifdef SQLITE_HAS_CODEC
+  if( sqlite3StrICmp(zLeft, "key")==0 && zRight ){
+    sqlite3_key(db, zRight, sqlite3Strlen30(zRight));
+  }else
+  if( sqlite3StrICmp(zLeft, "rekey")==0 && zRight ){
+    sqlite3_rekey(db, zRight, sqlite3Strlen30(zRight));
+  }else
+  if( zRight && (sqlite3StrICmp(zLeft, "hexkey")==0 ||
+                 sqlite3StrICmp(zLeft, "hexrekey")==0) ){
+    int i, h1, h2;
+    char zKey[40];
+    for(i=0; (h1 = zRight[i])!=0 && (h2 = zRight[i+1])!=0; i+=2){
+      h1 += 9*(1&(h1>>6));
+      h2 += 9*(1&(h2>>6));
+      zKey[i/2] = (h2 & 0x0f) | ((h1 & 0xf)<<4);
+    }
+    if( (zLeft[3] & 0xf)==0xb ){
+      sqlite3_key(db, zKey, i/2);
+    }else{
+      sqlite3_rekey(db, zKey, i/2);
+    }
+  }else
+#endif
+#if defined(SQLITE_HAS_CODEC) || defined(SQLITE_ENABLE_CEROD)
+  if( sqlite3StrICmp(zLeft, "activate_extensions")==0 ){
+#ifdef SQLITE_HAS_CODEC
+    if( sqlite3StrNICmp(zRight, "see-", 4)==0 ){
+      sqlite3_activate_see(&zRight[4]);
+    }
+#endif
+#ifdef SQLITE_ENABLE_CEROD
+    if( sqlite3StrNICmp(zRight, "cerod-", 6)==0 ){
+      sqlite3_activate_cerod(&zRight[6]);
+    }
+#endif
+  }else
+#endif
+
+ 
+  {/* Empty ELSE clause */}
+
+  /*
+  ** Reset the safety level, in case the fullfsync flag or synchronous
+  ** setting changed.
+  */
+#ifndef SQLITE_OMIT_PAGER_PRAGMAS
+  if( db->autoCommit ){
+    sqlite3BtreeSetSafetyLevel(pDb->pBt, pDb->safety_level,
+               (db->flags&SQLITE_FullFSync)!=0,
+               (db->flags&SQLITE_CkptFullFSync)!=0);
+  }
+#endif
+pragma_out:
+  sqlite3DbFree(db, zLeft);
+  sqlite3DbFree(db, zRight);
+}
+
+#endif /* SQLITE_OMIT_PRAGMA */
+
+/************** End of pragma.c **********************************************/
+/************** Begin file prepare.c *****************************************/
+/*
+** 2005 May 25
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the implementation of the sqlite3_prepare()
+** interface, and routines that contribute to loading the database schema
+** from disk.
+*/
+
+/*
+** Fill the InitData structure with an error message that indicates
+** that the database is corrupt.
+*/
+static void corruptSchema(
+  InitData *pData,     /* Initialization context */
+  const char *zObj,    /* Object being parsed at the point of error */
+  const char *zExtra   /* Error information */
+){
+  sqlite3 *db = pData->db;
+  if( !db->mallocFailed && (db->flags & SQLITE_RecoveryMode)==0 ){
+    if( zObj==0 ) zObj = "?";
+    sqlite3SetString(pData->pzErrMsg, db,
+      "malformed database schema (%s)", zObj);
+    if( zExtra ){
+      *pData->pzErrMsg = sqlite3MAppendf(db, *pData->pzErrMsg, 
+                                 "%s - %s", *pData->pzErrMsg, zExtra);
+    }
+  }
+  pData->rc = db->mallocFailed ? SQLITE_NOMEM : SQLITE_CORRUPT_BKPT;
+}
+
+/*
+** This is the callback routine for the code that initializes the
+** database.  See sqlite3Init() below for additional information.
+** This routine is also called from the OP_ParseSchema opcode of the VDBE.
+**
+** Each callback contains the following information:
+**
+**     argv[0] = name of thing being created
+**     argv[1] = root page number for table or index. 0 for trigger or view.
+**     argv[2] = SQL text for the CREATE statement.
+**
+*/
+SQLITE_PRIVATE int sqlite3InitCallback(void *pInit, int argc, char **argv, char **NotUsed){
+  InitData *pData = (InitData*)pInit;
+  sqlite3 *db = pData->db;
+  int iDb = pData->iDb;
+
+  assert( argc==3 );
+  UNUSED_PARAMETER2(NotUsed, argc);
+  assert( sqlite3_mutex_held(db->mutex) );
+  DbClearProperty(db, iDb, DB_Empty);
+  if( db->mallocFailed ){
+    corruptSchema(pData, argv[0], 0);
+    return 1;
+  }
+
+  assert( iDb>=0 && iDb<db->nDb );
+  if( argv==0 ) return 0;   /* Might happen if EMPTY_RESULT_CALLBACKS are on */
+  if( argv[1]==0 ){
+    corruptSchema(pData, argv[0], 0);
+  }else if( argv[2] && argv[2][0] ){
+    /* Call the parser to process a CREATE TABLE, INDEX or VIEW.
+    ** But because db->init.busy is set to 1, no VDBE code is generated
+    ** or executed.  All the parser does is build the internal data
+    ** structures that describe the table, index, or view.
+    */
+    int rc;
+    sqlite3_stmt *pStmt;
+    TESTONLY(int rcp);            /* Return code from sqlite3_prepare() */
+
+    assert( db->init.busy );
+    db->init.iDb = iDb;
+    db->init.newTnum = sqlite3Atoi(argv[1]);
+    db->init.orphanTrigger = 0;
+    TESTONLY(rcp = ) sqlite3_prepare(db, argv[2], -1, &pStmt, 0);
+    rc = db->errCode;
+    assert( (rc&0xFF)==(rcp&0xFF) );
+    db->init.iDb = 0;
+    if( SQLITE_OK!=rc ){
+      if( db->init.orphanTrigger ){
+        assert( iDb==1 );
+      }else{
+        pData->rc = rc;
+        if( rc==SQLITE_NOMEM ){
+          db->mallocFailed = 1;
+        }else if( rc!=SQLITE_INTERRUPT && (rc&0xFF)!=SQLITE_LOCKED ){
+          corruptSchema(pData, argv[0], sqlite3_errmsg(db));
+        }
+      }
+    }
+    sqlite3_finalize(pStmt);
+  }else if( argv[0]==0 ){
+    corruptSchema(pData, 0, 0);
+  }else{
+    /* If the SQL column is blank it means this is an index that
+    ** was created to be the PRIMARY KEY or to fulfill a UNIQUE
+    ** constraint for a CREATE TABLE.  The index should have already
+    ** been created when we processed the CREATE TABLE.  All we have
+    ** to do here is record the root page number for that index.
+    */
+    Index *pIndex;
+    pIndex = sqlite3FindIndex(db, argv[0], db->aDb[iDb].zName);
+    if( pIndex==0 ){
+      /* This can occur if there exists an index on a TEMP table which
+      ** has the same name as another index on a permanent index.  Since
+      ** the permanent table is hidden by the TEMP table, we can also
+      ** safely ignore the index on the permanent table.
+      */
+      /* Do Nothing */;
+    }else if( sqlite3GetInt32(argv[1], &pIndex->tnum)==0 ){
+      corruptSchema(pData, argv[0], "invalid rootpage");
+    }
+  }
+  return 0;
+}
+
+/*
+** Attempt to read the database schema and initialize internal
+** data structures for a single database file.  The index of the
+** database file is given by iDb.  iDb==0 is used for the main
+** database.  iDb==1 should never be used.  iDb>=2 is used for
+** auxiliary databases.  Return one of the SQLITE_ error codes to
+** indicate success or failure.
+*/
+static int sqlite3InitOne(sqlite3 *db, int iDb, char **pzErrMsg){
+  int rc;
+  int i;
+  int size;
+  Table *pTab;
+  Db *pDb;
+  char const *azArg[4];
+  int meta[5];
+  InitData initData;
+  char const *zMasterSchema;
+  char const *zMasterName;
+  int openedTransaction = 0;
+
+  /*
+  ** The master database table has a structure like this
+  */
+  static const char master_schema[] = 
+     "CREATE TABLE sqlite_master(\n"
+     "  type text,\n"
+     "  name text,\n"
+     "  tbl_name text,\n"
+     "  rootpage integer,\n"
+     "  sql text\n"
+     ")"
+  ;
+#ifndef SQLITE_OMIT_TEMPDB
+  static const char temp_master_schema[] = 
+     "CREATE TEMP TABLE sqlite_temp_master(\n"
+     "  type text,\n"
+     "  name text,\n"
+     "  tbl_name text,\n"
+     "  rootpage integer,\n"
+     "  sql text\n"
+     ")"
+  ;
+#else
+  #define temp_master_schema 0
+#endif
+
+  assert( iDb>=0 && iDb<db->nDb );
+  assert( db->aDb[iDb].pSchema );
+  assert( sqlite3_mutex_held(db->mutex) );
+  assert( iDb==1 || sqlite3BtreeHoldsMutex(db->aDb[iDb].pBt) );
+
+  /* zMasterSchema and zInitScript are set to point at the master schema
+  ** and initialisation script appropriate for the database being
+  ** initialised. zMasterName is the name of the master table.
+  */
+  #if (!OMIT_TEMPDB)
+  if( iDb==1 ){
+    zMasterSchema = temp_master_schema;
+  }else{
+    zMasterSchema = master_schema;
+  }
+  #else
+	zMasterSchema = master_schema;
+  #endif
+  zMasterName = SCHEMA_TABLE(iDb);
+
+  /* Construct the schema tables.  */
+  azArg[0] = zMasterName;
+  azArg[1] = "1";
+  azArg[2] = zMasterSchema;
+  azArg[3] = 0;
+  initData.db = db;
+  initData.iDb = iDb;
+  initData.rc = SQLITE_OK;
+  initData.pzErrMsg = pzErrMsg;
+  sqlite3InitCallback(&initData, 3, (char **)azArg, 0);
+  if( initData.rc ){
+    rc = initData.rc;
+    goto error_out;
+  }
+  pTab = sqlite3FindTable(db, zMasterName, db->aDb[iDb].zName);
+  if( ALWAYS(pTab) ){
+    pTab->tabFlags |= TF_Readonly;
+  }
+
+  /* Create a cursor to hold the database open
+  */
+  pDb = &db->aDb[iDb];
+  if( pDb->pBt==0 ){
+	 #if (!OMIT_TEMPDB)
+    if( ALWAYS(iDb==1) ){
+      DbSetProperty(db, 1, DB_SchemaLoaded);
+    }
+	 #endif
+    return SQLITE_OK;
+  }
+
+  /* If there is not already a read-only (or read-write) transaction opened
+  ** on the b-tree database, open one now. If a transaction is opened, it 
+  ** will be closed before this function returns.  */
+  sqlite3BtreeEnter(pDb->pBt);
+  if( !sqlite3BtreeIsInReadTrans(pDb->pBt) ){
+    rc = sqlite3BtreeBeginTrans(pDb->pBt, 0);
+    if( rc!=SQLITE_OK ){
+      sqlite3SetString(pzErrMsg, db, "%s", sqlite3ErrStr(rc));
+      goto initone_error_out;
+    }
+    openedTransaction = 1;
+  }
+
+  /* Get the database meta information.
+  **
+  ** Meta values are as follows:
+  **    meta[0]   Schema cookie.  Changes with each schema change.
+  **    meta[1]   File format of schema layer.
+  **    meta[2]   Size of the page cache.
+  **    meta[3]   Largest rootpage (auto/incr_vacuum mode)
+  **    meta[4]   Db text encoding. 1:UTF-8 2:UTF-16LE 3:UTF-16BE
+  **    meta[5]   User version
+  **    meta[6]   Incremental vacuum mode
+  **    meta[7]   unused
+  **    meta[8]   unused
+  **    meta[9]   unused
+  **
+  ** Note: The #defined SQLITE_UTF* symbols in sqliteInt.h correspond to
+  ** the possible values of meta[4].
+  */
+  for(i=0; i<ArraySize(meta); i++){
+    sqlite3BtreeGetMeta(pDb->pBt, i+1, (u32 *)&meta[i]);
+  }
+  pDb->pSchema->schema_cookie = meta[BTREE_SCHEMA_VERSION-1];
+
+  /* If opening a non-empty database, check the text encoding. For the
+  ** main database, set sqlite3.enc to the encoding of the main database.
+  ** For an attached db, it is an error if the encoding is not the same
+  ** as sqlite3.enc.
+  */
+  if( meta[BTREE_TEXT_ENCODING-1] ){  /* text encoding */
+    if( iDb==0 ){
+      u8 encoding;
+      /* If opening the main database, set ENC(db). */
+      encoding = (u8)meta[BTREE_TEXT_ENCODING-1] & 3;
+      if( encoding==0 ) encoding = SQLITE_UTF8;
+      ENC(db) = encoding;
+      db->pDfltColl = sqlite3FindCollSeq(db, SQLITE_UTF8, "BINARY", 0);
+    }else{
+      /* If opening an attached database, the encoding much match ENC(db) */
+      if( meta[BTREE_TEXT_ENCODING-1]!=ENC(db) ){
+        sqlite3SetString(pzErrMsg, db, "attached databases must use the same"
+            " text encoding as main database");
+        rc = SQLITE_ERROR;
+        goto initone_error_out;
+      }
+    }
+  }else{
+    DbSetProperty(db, iDb, DB_Empty);
+  }
+  pDb->pSchema->enc = ENC(db);
+
+  if( pDb->pSchema->cache_size==0 ){
+    size = sqlite3AbsInt32(meta[BTREE_DEFAULT_CACHE_SIZE-1]);
+    if( size==0 ){ size = SQLITE_DEFAULT_CACHE_SIZE; }
+    pDb->pSchema->cache_size = size;
+    sqlite3BtreeSetCacheSize(pDb->pBt, pDb->pSchema->cache_size);
+  }
+
+  /*
+  ** file_format==1    Version 3.0.0.
+  ** file_format==2    Version 3.1.3.  // ALTER TABLE ADD COLUMN
+  ** file_format==3    Version 3.1.4.  // ditto but with non-NULL defaults
+  ** file_format==4    Version 3.3.0.  // DESC indices.  Boolean constants
+  */
+  pDb->pSchema->file_format = (u8)meta[BTREE_FILE_FORMAT-1];
+  if( pDb->pSchema->file_format==0 ){
+    pDb->pSchema->file_format = 1;
+  }
+  if( pDb->pSchema->file_format>SQLITE_MAX_FILE_FORMAT ){
+    sqlite3SetString(pzErrMsg, db, "unsupported file format");
+    rc = SQLITE_ERROR;
+    goto initone_error_out;
+  }
+
+  /* Ticket #2804:  When we open a database in the newer file format,
+  ** clear the legacy_file_format pragma flag so that a VACUUM will
+  ** not downgrade the database and thus invalidate any descending
+  ** indices that the user might have created.
+  */
+  if( iDb==0 && meta[BTREE_FILE_FORMAT-1]>=4 ){
+    db->flags &= ~SQLITE_LegacyFileFmt;
+  }
+
+  /* Read the schema information out of the schema tables
+  */
+  assert( db->init.busy );
+  {
+    char *zSql;
+    zSql = sqlite3MPrintf(db, 
+        "SELECT name, rootpage, sql FROM '%q'.%s ORDER BY rowid",
+        db->aDb[iDb].zName, zMasterName);
+#ifndef SQLITE_OMIT_AUTHORIZATION
+    {
+      int (*xAuth)(void*,int,const char*,const char*,const char*,const char*);
+      xAuth = db->xAuth;
+      db->xAuth = 0;
+#endif
+      rc = sqlite3_exec(db, zSql, sqlite3InitCallback, &initData, 0);
+#ifndef SQLITE_OMIT_AUTHORIZATION
+      db->xAuth = xAuth;
+    }
+#endif
+    if( rc==SQLITE_OK ) rc = initData.rc;
+    sqlite3DbFree(db, zSql);
+#ifndef SQLITE_OMIT_ANALYZE
+    if( rc==SQLITE_OK ){
+      sqlite3AnalysisLoad(db, iDb);
+    }
+#endif
+  }
+  if( db->mallocFailed ){
+    rc = SQLITE_NOMEM;
+    sqlite3ResetInternalSchema(db, -1);
+  }
+  if( rc==SQLITE_OK || (db->flags&SQLITE_RecoveryMode)){
+    /* Black magic: If the SQLITE_RecoveryMode flag is set, then consider
+    ** the schema loaded, even if errors occurred. In this situation the 
+    ** current sqlite3_prepare() operation will fail, but the following one
+    ** will attempt to compile the supplied statement against whatever subset
+    ** of the schema was loaded before the error occurred. The primary
+    ** purpose of this is to allow access to the sqlite_master table
+    ** even when its contents have been corrupted.
+    */
+    DbSetProperty(db, iDb, DB_SchemaLoaded);
+    rc = SQLITE_OK;
+  }
+
+  /* Jump here for an error that occurs after successfully allocating
+  ** curMain and calling sqlite3BtreeEnter(). For an error that occurs
+  ** before that point, jump to error_out.
+  */
+initone_error_out:
+  if( openedTransaction ){
+    sqlite3BtreeCommit(pDb->pBt);
+  }
+  sqlite3BtreeLeave(pDb->pBt);
+
+error_out:
+  if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){
+    db->mallocFailed = 1;
+  }
+  return rc;
+}
+
+/*
+** Initialize all database files - the main database file, the file
+** used to store temporary tables, and any additional database files
+** created using ATTACH statements.  Return a success code.  If an
+** error occurs, write an error message into *pzErrMsg.
+**
+** After a database is initialized, the DB_SchemaLoaded bit is set
+** bit is set in the flags field of the Db structure. If the database
+** file was of zero-length, then the DB_Empty flag is also set.
+*/
+SQLITE_PRIVATE int sqlite3Init(sqlite3 *db, char **pzErrMsg){
+  int i, rc;
+  int commit_internal = !(db->flags&SQLITE_InternChanges);
+  
+  assert( sqlite3_mutex_held(db->mutex) );
+  rc = SQLITE_OK;
+  db->init.busy = 1;
+  for(i=0; rc==SQLITE_OK && i<db->nDb; i++){
+    if( DbHasProperty(db, i, DB_SchemaLoaded) || i==1 ) continue;
+    rc = sqlite3InitOne(db, i, pzErrMsg);
+    if( rc ){
+      sqlite3ResetInternalSchema(db, i);
+    }
+  }
+
+  /* Once all the other databases have been initialised, load the schema
+  ** for the TEMP database. This is loaded last, as the TEMP database
+  ** schema may contain references to objects in other databases.
+  */
+#ifndef SQLITE_OMIT_TEMPDB
+  if( rc==SQLITE_OK && ALWAYS(db->nDb>1)
+                    && !DbHasProperty(db, 1, DB_SchemaLoaded) ){
+    rc = sqlite3InitOne(db, 1, pzErrMsg);
+    if( rc ){
+      sqlite3ResetInternalSchema(db, 1);
+    }
+  }
+#endif
+
+  db->init.busy = 0;
+  if( rc==SQLITE_OK && commit_internal ){
+    sqlite3CommitInternalChanges(db);
+  }
+
+  return rc; 
+}
+
+/*
+** This routine is a no-op if the database schema is already initialised.
+** Otherwise, the schema is loaded. An error code is returned.
+*/
+SQLITE_PRIVATE int sqlite3ReadSchema(Parse *pParse){
+  int rc = SQLITE_OK;
+  sqlite3 *db = pParse->db;
+  assert( sqlite3_mutex_held(db->mutex) );
+  if( !db->init.busy ){
+    rc = sqlite3Init(db, &pParse->zErrMsg);
+  }
+  if( rc!=SQLITE_OK ){
+    pParse->rc = rc;
+    pParse->nErr++;
+  }
+  return rc;
+}
+
+
+/*
+** Check schema cookies in all databases.  If any cookie is out
+** of date set pParse->rc to SQLITE_SCHEMA.  If all schema cookies
+** make no changes to pParse->rc.
+*/
+static void schemaIsValid(Parse *pParse){
+  sqlite3 *db = pParse->db;
+  int iDb;
+  int rc;
+  int cookie;
+
+  assert( pParse->checkSchema );
+  assert( sqlite3_mutex_held(db->mutex) );
+  for(iDb=0; iDb<db->nDb; iDb++){
+    int openedTransaction = 0;         /* True if a transaction is opened */
+    Btree *pBt = db->aDb[iDb].pBt;     /* Btree database to read cookie from */
+    if( pBt==0 ) continue;
+
+    /* If there is not already a read-only (or read-write) transaction opened
+    ** on the b-tree database, open one now. If a transaction is opened, it 
+    ** will be closed immediately after reading the meta-value. */
+    if( !sqlite3BtreeIsInReadTrans(pBt) ){
+      rc = sqlite3BtreeBeginTrans(pBt, 0);
+      if( rc==SQLITE_NOMEM || rc==SQLITE_IOERR_NOMEM ){
+        db->mallocFailed = 1;
+      }
+      if( rc!=SQLITE_OK ) return;
+      openedTransaction = 1;
+    }
+
+    /* Read the schema cookie from the database. If it does not match the 
+    ** value stored as part of the in-memory schema representation,
+    ** set Parse.rc to SQLITE_SCHEMA. */
+    sqlite3BtreeGetMeta(pBt, BTREE_SCHEMA_VERSION, (u32 *)&cookie);
+    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+    if( cookie!=db->aDb[iDb].pSchema->schema_cookie ){
+      sqlite3ResetInternalSchema(db, iDb);
+      pParse->rc = SQLITE_SCHEMA;
+    }
+
+    /* Close the transaction, if one was opened. */
+    if( openedTransaction ){
+      sqlite3BtreeCommit(pBt);
+    }
+  }
+}
+
+/*
+** Convert a schema pointer into the iDb index that indicates
+** which database file in db->aDb[] the schema refers to.
+**
+** If the same database is attached more than once, the first
+** attached database is returned.
+*/
+SQLITE_PRIVATE int sqlite3SchemaToIndex(sqlite3 *db, Schema *pSchema){
+  int i = -1000000;
+
+  /* If pSchema is NULL, then return -1000000. This happens when code in 
+  ** expr.c is trying to resolve a reference to a transient table (i.e. one
+  ** created by a sub-select). In this case the return value of this 
+  ** function should never be used.
+  **
+  ** We return -1000000 instead of the more usual -1 simply because using
+  ** -1000000 as the incorrect index into db->aDb[] is much 
+  ** more likely to cause a segfault than -1 (of course there are assert()
+  ** statements too, but it never hurts to play the odds).
+  */
+  assert( sqlite3_mutex_held(db->mutex) );
+  if( pSchema ){
+    for(i=0; ALWAYS(i<db->nDb); i++){
+      if( db->aDb[i].pSchema==pSchema ){
+        break;
+      }
+    }
+    assert( i>=0 && i<db->nDb );
+  }
+  return i;
+}
+
+/*
+** Compile the UTF-8 encoded SQL statement zSql into a statement handle.
+*/
+static int sqlite3Prepare(
+  sqlite3 *db,              /* Database handle. */
+  const char *zSql,         /* UTF-8 encoded SQL statement. */
+  int nBytes,               /* Length of zSql in bytes. */
+  int saveSqlFlag,          /* True to copy SQL text into the sqlite3_stmt */
+  Vdbe *pReprepare,         /* VM being reprepared */
+  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
+  const char **pzTail       /* OUT: End of parsed string */
+){
+  Parse *pParse;            /* Parsing context */
+  char *zErrMsg = 0;        /* Error message */
+  int rc = SQLITE_OK;       /* Result code */
+  int i;                    /* Loop counter */
+
+  /* Allocate the parsing context */
+  pParse = sqlite3StackAllocZero(db, sizeof(*pParse));
+  if( pParse==0 ){
+    rc = SQLITE_NOMEM;
+    goto end_prepare;
+  }
+  pParse->pReprepare = pReprepare;
+  assert( ppStmt && *ppStmt==0 );
+  assert( !db->mallocFailed );
+  assert( sqlite3_mutex_held(db->mutex) );
+
+  /* Check to verify that it is possible to get a read lock on all
+  ** database schemas.  The inability to get a read lock indicates that
+  ** some other database connection is holding a write-lock, which in
+  ** turn means that the other connection has made uncommitted changes
+  ** to the schema.
+  **
+  ** Were we to proceed and prepare the statement against the uncommitted
+  ** schema changes and if those schema changes are subsequently rolled
+  ** back and different changes are made in their place, then when this
+  ** prepared statement goes to run the schema cookie would fail to detect
+  ** the schema change.  Disaster would follow.
+  **
+  ** This thread is currently holding mutexes on all Btrees (because
+  ** of the sqlite3BtreeEnterAll() in sqlite3LockAndPrepare()) so it
+  ** is not possible for another thread to start a new schema change
+  ** while this routine is running.  Hence, we do not need to hold 
+  ** locks on the schema, we just need to make sure nobody else is 
+  ** holding them.
+  **
+  ** Note that setting READ_UNCOMMITTED overrides most lock detection,
+  ** but it does *not* override schema lock detection, so this all still
+  ** works even if READ_UNCOMMITTED is set.
+  */
+  for(i=0; i<db->nDb; i++) {
+    Btree *pBt = db->aDb[i].pBt;
+    if( pBt ){
+      assert( sqlite3BtreeHoldsMutex(pBt) );
+      rc = sqlite3BtreeSchemaLocked(pBt);
+      if( rc ){
+        const char *zDb = db->aDb[i].zName;
+        sqlite3Error(db, rc, "database schema is locked: %s", zDb);
+        testcase( db->flags & SQLITE_ReadUncommitted );
+        goto end_prepare;
+      }
+    }
+  }
+
+  sqlite3VtabUnlockList(db);
+
+  pParse->db = db;
+  pParse->nQueryLoop = (double)1;
+  if( nBytes>=0 && (nBytes==0 || zSql[nBytes-1]!=0) ){
+    char *zSqlCopy;
+    int mxLen = db->aLimit[SQLITE_LIMIT_SQL_LENGTH];
+    testcase( nBytes==mxLen );
+    testcase( nBytes==mxLen+1 );
+    if( nBytes>mxLen ){
+      sqlite3Error(db, SQLITE_TOOBIG, "statement too long");
+      rc = sqlite3ApiExit(db, SQLITE_TOOBIG);
+      goto end_prepare;
+    }
+    zSqlCopy = sqlite3DbStrNDup(db, zSql, nBytes);
+    if( zSqlCopy ){
+      sqlite3RunParser(pParse, zSqlCopy, &zErrMsg);
+      sqlite3DbFree(db, zSqlCopy);
+      pParse->zTail = &zSql[pParse->zTail-zSqlCopy];
+    }else{
+      pParse->zTail = &zSql[nBytes];
+    }
+  }else{
+    sqlite3RunParser(pParse, zSql, &zErrMsg);
+  }
+  assert( 1==(int)pParse->nQueryLoop );
+
+  if( db->mallocFailed ){
+    pParse->rc = SQLITE_NOMEM;
+  }
+  if( pParse->rc==SQLITE_DONE ) pParse->rc = SQLITE_OK;
+  if( pParse->checkSchema ){
+    schemaIsValid(pParse);
+  }
+  if( db->mallocFailed ){
+    pParse->rc = SQLITE_NOMEM;
+  }
+  if( pzTail ){
+    *pzTail = pParse->zTail;
+  }
+  rc = pParse->rc;
+
+#ifndef SQLITE_OMIT_EXPLAIN
+  if( rc==SQLITE_OK && pParse->pVdbe && pParse->explain ){
+    static const char * const azColName[] = {
+       "addr", "opcode", "p1", "p2", "p3", "p4", "p5", "comment",
+       "selectid", "order", "from", "detail"
+    };
+    int iFirst, mx;
+    if( pParse->explain==2 ){
+      sqlite3VdbeSetNumCols(pParse->pVdbe, 4);
+      iFirst = 8;
+      mx = 12;
+    }else{
+      sqlite3VdbeSetNumCols(pParse->pVdbe, 8);
+      iFirst = 0;
+      mx = 8;
+    }
+    for(i=iFirst; i<mx; i++){
+      sqlite3VdbeSetColName(pParse->pVdbe, i-iFirst, COLNAME_NAME,
+                            azColName[i], SQLITE_STATIC);
+    }
+  }
+#endif
+
+  assert( db->init.busy==0 || saveSqlFlag==0 );
+  if( db->init.busy==0 ){
+    Vdbe *pVdbe = pParse->pVdbe;
+    sqlite3VdbeSetSql(pVdbe, zSql, (int)(pParse->zTail-zSql), saveSqlFlag);
+  }
+  if( pParse->pVdbe && (rc!=SQLITE_OK || db->mallocFailed) ){
+    sqlite3VdbeFinalize(pParse->pVdbe);
+    assert(!(*ppStmt));
+  }else{
+    *ppStmt = (sqlite3_stmt*)pParse->pVdbe;
+  }
+
+  if( zErrMsg ){
+    sqlite3Error(db, rc, "%s", zErrMsg);
+    sqlite3DbFree(db, zErrMsg);
+  }else{
+    sqlite3Error(db, rc, 0);
+  }
+
+  /* Delete any TriggerPrg structures allocated while parsing this statement. */
+  while( pParse->pTriggerPrg ){
+    TriggerPrg *pT = pParse->pTriggerPrg;
+    pParse->pTriggerPrg = pT->pNext;
+    sqlite3DbFree(db, pT);
+  }
+
+end_prepare:
+
+  sqlite3StackFree(db, pParse);
+  rc = sqlite3ApiExit(db, rc);
+  assert( (rc&db->errMask)==rc );
+  return rc;
+}
+static int sqlite3LockAndPrepare(
+  sqlite3 *db,              /* Database handle. */
+  const char *zSql,         /* UTF-8 encoded SQL statement. */
+  int nBytes,               /* Length of zSql in bytes. */
+  int saveSqlFlag,          /* True to copy SQL text into the sqlite3_stmt */
+  Vdbe *pOld,               /* VM being reprepared */
+  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
+  const char **pzTail       /* OUT: End of parsed string */
+){
+  int rc;
+  assert( ppStmt!=0 );
+  *ppStmt = 0;
+  if( !sqlite3SafetyCheckOk(db) ){
+    return SQLITE_MISUSE_BKPT;
+  }
+  sqlite3_mutex_enter(db->mutex);
+  sqlite3BtreeEnterAll(db);
+  rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
+  if( rc==SQLITE_SCHEMA ){
+    sqlite3_finalize(*ppStmt);
+    rc = sqlite3Prepare(db, zSql, nBytes, saveSqlFlag, pOld, ppStmt, pzTail);
+  }
+  sqlite3BtreeLeaveAll(db);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+/*
+** Rerun the compilation of a statement after a schema change.
+**
+** If the statement is successfully recompiled, return SQLITE_OK. Otherwise,
+** if the statement cannot be recompiled because another connection has
+** locked the sqlite3_master table, return SQLITE_LOCKED. If any other error
+** occurs, return SQLITE_SCHEMA.
+*/
+SQLITE_PRIVATE int sqlite3Reprepare(Vdbe *p){
+  int rc;
+  sqlite3_stmt *pNew;
+  const char *zSql;
+  sqlite3 *db;
+
+  assert( sqlite3_mutex_held(sqlite3VdbeDb(p)->mutex) );
+  zSql = sqlite3_sql((sqlite3_stmt *)p);
+  assert( zSql!=0 );  /* Reprepare only called for prepare_v2() statements */
+  db = sqlite3VdbeDb(p);
+  assert( sqlite3_mutex_held(db->mutex) );
+  rc = sqlite3LockAndPrepare(db, zSql, -1, 0, p, &pNew, 0);
+  if( rc ){
+    if( rc==SQLITE_NOMEM ){
+      db->mallocFailed = 1;
+    }
+    assert( pNew==0 );
+    return rc;
+  }else{
+    assert( pNew!=0 );
+  }
+  sqlite3VdbeSwap((Vdbe*)pNew, p);
+  sqlite3TransferBindings(pNew, (sqlite3_stmt*)p);
+  sqlite3VdbeResetStepResult((Vdbe*)pNew);
+  sqlite3VdbeFinalize((Vdbe*)pNew);
+  return SQLITE_OK;
+}
+
+
+/*
+** Two versions of the official API.  Legacy and new use.  In the legacy
+** version, the original SQL text is not saved in the prepared statement
+** and so if a schema change occurs, SQLITE_SCHEMA is returned by
+** sqlite3_step().  In the new version, the original SQL text is retained
+** and the statement is automatically recompiled if an schema change
+** occurs.
+*/
+SQLITE_API int sqlite3_prepare(
+  sqlite3 *db,              /* Database handle. */
+  const char *zSql,         /* UTF-8 encoded SQL statement. */
+  int nBytes,               /* Length of zSql in bytes. */
+  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
+  const char **pzTail       /* OUT: End of parsed string */
+){
+  int rc;
+  rc = sqlite3LockAndPrepare(db,zSql,nBytes,0,0,ppStmt,pzTail);
+  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */
+  return rc;
+}
+SQLITE_API int sqlite3_prepare_v2(
+  sqlite3 *db,              /* Database handle. */
+  const char *zSql,         /* UTF-8 encoded SQL statement. */
+  int nBytes,               /* Length of zSql in bytes. */
+  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
+  const char **pzTail       /* OUT: End of parsed string */
+){
+  int rc;
+  rc = sqlite3LockAndPrepare(db,zSql,nBytes,1,0,ppStmt,pzTail);
+  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */
+  return rc;
+}
+
+
+#ifndef SQLITE_OMIT_UTF16
+/*
+** Compile the UTF-16 encoded SQL statement zSql into a statement handle.
+*/
+static int sqlite3Prepare16(
+  sqlite3 *db,              /* Database handle. */ 
+  const void *zSql,         /* UTF-16 encoded SQL statement. */
+  int nBytes,               /* Length of zSql in bytes. */
+  int saveSqlFlag,          /* True to save SQL text into the sqlite3_stmt */
+  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
+  const void **pzTail       /* OUT: End of parsed string */
+){
+  /* This function currently works by first transforming the UTF-16
+  ** encoded string to UTF-8, then invoking sqlite3_prepare(). The
+  ** tricky bit is figuring out the pointer to return in *pzTail.
+  */
+  char *zSql8;
+  const char *zTail8 = 0;
+  int rc = SQLITE_OK;
+
+  assert( ppStmt );
+  *ppStmt = 0;
+  if( !sqlite3SafetyCheckOk(db) ){
+    return SQLITE_MISUSE_BKPT;
+  }
+  sqlite3_mutex_enter(db->mutex);
+  zSql8 = sqlite3Utf16to8(db, zSql, nBytes, SQLITE_UTF16NATIVE);
+  if( zSql8 ){
+    rc = sqlite3LockAndPrepare(db, zSql8, -1, saveSqlFlag, 0, ppStmt, &zTail8);
+  }
+
+  if( zTail8 && pzTail ){
+    /* If sqlite3_prepare returns a tail pointer, we calculate the
+    ** equivalent pointer into the UTF-16 string by counting the unicode
+    ** characters between zSql8 and zTail8, and then returning a pointer
+    ** the same number of characters into the UTF-16 string.
+    */
+    int chars_parsed = sqlite3Utf8CharLen(zSql8, (int)(zTail8-zSql8));
+    *pzTail = (u8 *)zSql + sqlite3Utf16ByteLen(zSql, chars_parsed);
+  }
+  sqlite3DbFree(db, zSql8); 
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+/*
+** Two versions of the official API.  Legacy and new use.  In the legacy
+** version, the original SQL text is not saved in the prepared statement
+** and so if a schema change occurs, SQLITE_SCHEMA is returned by
+** sqlite3_step().  In the new version, the original SQL text is retained
+** and the statement is automatically recompiled if an schema change
+** occurs.
+*/
+SQLITE_API int sqlite3_prepare16(
+  sqlite3 *db,              /* Database handle. */ 
+  const void *zSql,         /* UTF-16 encoded SQL statement. */
+  int nBytes,               /* Length of zSql in bytes. */
+  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
+  const void **pzTail       /* OUT: End of parsed string */
+){
+  int rc;
+  rc = sqlite3Prepare16(db,zSql,nBytes,0,ppStmt,pzTail);
+  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */
+  return rc;
+}
+SQLITE_API int sqlite3_prepare16_v2(
+  sqlite3 *db,              /* Database handle. */ 
+  const void *zSql,         /* UTF-16 encoded SQL statement. */
+  int nBytes,               /* Length of zSql in bytes. */
+  sqlite3_stmt **ppStmt,    /* OUT: A pointer to the prepared statement */
+  const void **pzTail       /* OUT: End of parsed string */
+){
+  int rc;
+  rc = sqlite3Prepare16(db,zSql,nBytes,1,ppStmt,pzTail);
+  assert( rc==SQLITE_OK || ppStmt==0 || *ppStmt==0 );  /* VERIFY: F13021 */
+  return rc;
+}
+
+#endif /* SQLITE_OMIT_UTF16 */
+
+/************** End of prepare.c *********************************************/
+/************** Begin file select.c ******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains C code routines that are called by the parser
+** to handle SELECT statements in SQLite.
+*/
+
+
+/*
+** Delete all the content of a Select structure but do not deallocate
+** the select structure itself.
+*/
+static void clearSelect(sqlite3 *db, Select *p){
+  sqlite3ExprListDelete(db, p->pEList);
+  sqlite3SrcListDelete(db, p->pSrc);
+  sqlite3ExprDelete(db, p->pWhere);
+  sqlite3ExprListDelete(db, p->pGroupBy);
+  sqlite3ExprDelete(db, p->pHaving);
+  sqlite3ExprListDelete(db, p->pOrderBy);
+  sqlite3SelectDelete(db, p->pPrior);
+  sqlite3ExprDelete(db, p->pLimit);
+  sqlite3ExprDelete(db, p->pOffset);
+}
+
+/*
+** Initialize a SelectDest structure.
+*/
+SQLITE_PRIVATE void sqlite3SelectDestInit(SelectDest *pDest, int eDest, int iParm){
+  pDest->eDest = (u8)eDest;
+  pDest->iParm = iParm;
+  pDest->affinity = 0;
+  pDest->iMem = 0;
+  pDest->nMem = 0;
+}
+
+
+/*
+** Allocate a new Select structure and return a pointer to that
+** structure.
+*/
+SQLITE_PRIVATE Select *sqlite3SelectNew(
+  Parse *pParse,        /* Parsing context */
+  ExprList *pEList,     /* which columns to include in the result */
+  SrcList *pSrc,        /* the FROM clause -- which tables to scan */
+  Expr *pWhere,         /* the WHERE clause */
+  ExprList *pGroupBy,   /* the GROUP BY clause */
+  Expr *pHaving,        /* the HAVING clause */
+  ExprList *pOrderBy,   /* the ORDER BY clause */
+  int isDistinct,       /* true if the DISTINCT keyword is present */
+  Expr *pLimit,         /* LIMIT value.  NULL means not used */
+  Expr *pOffset         /* OFFSET value.  NULL means no offset */
+){
+  Select *pNew;
+  Select standin;
+  sqlite3 *db = pParse->db;
+  pNew = sqlite3DbMallocZero(db, sizeof(*pNew) );
+  assert( db->mallocFailed || !pOffset || pLimit ); /* OFFSET implies LIMIT */
+  if( pNew==0 ){
+    pNew = &standin;
+    memset(pNew, 0, sizeof(*pNew));
+  }
+  if( pEList==0 ){
+    pEList = sqlite3ExprListAppend(pParse, 0, sqlite3Expr(db,TK_ALL,0));
+  }
+  pNew->pEList = pEList;
+  pNew->pSrc = pSrc;
+  pNew->pWhere = pWhere;
+  pNew->pGroupBy = pGroupBy;
+  pNew->pHaving = pHaving;
+  pNew->pOrderBy = pOrderBy;
+  pNew->selFlags = isDistinct ? SF_Distinct : 0;
+  pNew->op = TK_SELECT;
+  pNew->pLimit = pLimit;
+  pNew->pOffset = pOffset;
+  assert( pOffset==0 || pLimit!=0 );
+  pNew->addrOpenEphm[0] = -1;
+  pNew->addrOpenEphm[1] = -1;
+  pNew->addrOpenEphm[2] = -1;
+  if( db->mallocFailed ) {
+    clearSelect(db, pNew);
+    if( pNew!=&standin ) sqlite3DbFree(db, pNew);
+    pNew = 0;
+  }
+  return pNew;
+}
+
+/*
+** Delete the given Select structure and all of its substructures.
+*/
+SQLITE_PRIVATE void sqlite3SelectDelete(sqlite3 *db, Select *p){
+  if( p ){
+    clearSelect(db, p);
+    sqlite3DbFree(db, p);
+  }
+}
+
+/*
+** Given 1 to 3 identifiers preceeding the JOIN keyword, determine the
+** type of join.  Return an integer constant that expresses that type
+** in terms of the following bit values:
+**
+**     JT_INNER
+**     JT_CROSS
+**     JT_OUTER
+**     JT_NATURAL
+**     JT_LEFT
+**     JT_RIGHT
+**
+** A full outer join is the combination of JT_LEFT and JT_RIGHT.
+**
+** If an illegal or unsupported join type is seen, then still return
+** a join type, but put an error in the pParse structure.
+*/
+SQLITE_PRIVATE int sqlite3JoinType(Parse *pParse, Token *pA, Token *pB, Token *pC){
+  int jointype = 0;
+  Token *apAll[3];
+  Token *p;
+                             /*   0123456789 123456789 123456789 123 */
+  static const char zKeyText[] = "naturaleftouterightfullinnercross";
+  static const struct {
+    u8 i;        /* Beginning of keyword text in zKeyText[] */
+    u8 nChar;    /* Length of the keyword in characters */
+    u8 code;     /* Join type mask */
+  } aKeyword[] = {
+    /* natural */ { 0,  7, JT_NATURAL                },
+    /* left    */ { 6,  4, JT_LEFT|JT_OUTER          },
+    /* outer   */ { 10, 5, JT_OUTER                  },
+    /* right   */ { 14, 5, JT_RIGHT|JT_OUTER         },
+    /* full    */ { 19, 4, JT_LEFT|JT_RIGHT|JT_OUTER },
+    /* inner   */ { 23, 5, JT_INNER                  },
+    /* cross   */ { 28, 5, JT_INNER|JT_CROSS         },
+  };
+  int i, j;
+  apAll[0] = pA;
+  apAll[1] = pB;
+  apAll[2] = pC;
+  for(i=0; i<3 && apAll[i]; i++){
+    p = apAll[i];
+    for(j=0; j<ArraySize(aKeyword); j++){
+      if( p->n==aKeyword[j].nChar 
+          && sqlite3StrNICmp((char*)p->z, &zKeyText[aKeyword[j].i], p->n)==0 ){
+        jointype |= aKeyword[j].code;
+        break;
+      }
+    }
+    testcase( j==0 || j==1 || j==2 || j==3 || j==4 || j==5 || j==6 );
+    if( j>=ArraySize(aKeyword) ){
+      jointype |= JT_ERROR;
+      break;
+    }
+  }
+  if(
+     (jointype & (JT_INNER|JT_OUTER))==(JT_INNER|JT_OUTER) ||
+     (jointype & JT_ERROR)!=0
+  ){
+    const char *zSp = " ";
+    assert( pB!=0 );
+    if( pC==0 ){ zSp++; }
+    sqlite3ErrorMsg(pParse, "unknown or unsupported join type: "
+       "%T %T%s%T", pA, pB, zSp, pC);
+    jointype = JT_INNER;
+  }else if( (jointype & JT_OUTER)!=0 
+         && (jointype & (JT_LEFT|JT_RIGHT))!=JT_LEFT ){
+    sqlite3ErrorMsg(pParse, 
+      "RIGHT and FULL OUTER JOINs are not currently supported");
+    jointype = JT_INNER;
+  }
+  return jointype;
+}
+
+/*
+** Return the index of a column in a table.  Return -1 if the column
+** is not contained in the table.
+*/
+static int columnIndex(Table *pTab, const char *zCol){
+  int i;
+  for(i=0; i<pTab->nCol; i++){
+    if( sqlite3StrICmp(pTab->aCol[i].zName, zCol)==0 ) return i;
+  }
+  return -1;
+}
+
+/*
+** Search the first N tables in pSrc, from left to right, looking for a
+** table that has a column named zCol.  
+**
+** When found, set *piTab and *piCol to the table index and column index
+** of the matching column and return TRUE.
+**
+** If not found, return FALSE.
+*/
+static int tableAndColumnIndex(
+  SrcList *pSrc,       /* Array of tables to search */
+  int N,               /* Number of tables in pSrc->a[] to search */
+  const char *zCol,    /* Name of the column we are looking for */
+  int *piTab,          /* Write index of pSrc->a[] here */
+  int *piCol           /* Write index of pSrc->a[*piTab].pTab->aCol[] here */
+){
+  int i;               /* For looping over tables in pSrc */
+  int iCol;            /* Index of column matching zCol */
+
+  assert( (piTab==0)==(piCol==0) );  /* Both or neither are NULL */
+  for(i=0; i<N; i++){
+    iCol = columnIndex(pSrc->a[i].pTab, zCol);
+    if( iCol>=0 ){
+      if( piTab ){
+        *piTab = i;
+        *piCol = iCol;
+      }
+      return 1;
+    }
+  }
+  return 0;
+}
+
+/*
+** This function is used to add terms implied by JOIN syntax to the
+** WHERE clause expression of a SELECT statement. The new term, which
+** is ANDed with the existing WHERE clause, is of the form:
+**
+**    (tab1.col1 = tab2.col2)
+**
+** where tab1 is the iSrc'th table in SrcList pSrc and tab2 is the 
+** (iSrc+1)'th. Column col1 is column iColLeft of tab1, and col2 is
+** column iColRight of tab2.
+*/
+static void addWhereTerm(
+  Parse *pParse,                  /* Parsing context */
+  SrcList *pSrc,                  /* List of tables in FROM clause */
+  int iLeft,                      /* Index of first table to join in pSrc */
+  int iColLeft,                   /* Index of column in first table */
+  int iRight,                     /* Index of second table in pSrc */
+  int iColRight,                  /* Index of column in second table */
+  int isOuterJoin,                /* True if this is an OUTER join */
+  Expr **ppWhere                  /* IN/OUT: The WHERE clause to add to */
+){
+  sqlite3 *db = pParse->db;
+  Expr *pE1;
+  Expr *pE2;
+  Expr *pEq;
+
+  assert( iLeft<iRight );
+  assert( pSrc->nSrc>iRight );
+  assert( pSrc->a[iLeft].pTab );
+  assert( pSrc->a[iRight].pTab );
+
+  pE1 = sqlite3CreateColumnExpr(db, pSrc, iLeft, iColLeft);
+  pE2 = sqlite3CreateColumnExpr(db, pSrc, iRight, iColRight);
+
+  pEq = sqlite3PExpr(pParse, TK_EQ, pE1, pE2, 0);
+  if( pEq && isOuterJoin ){
+    ExprSetProperty(pEq, EP_FromJoin);
+    assert( !ExprHasAnyProperty(pEq, EP_TokenOnly|EP_Reduced) );
+    ExprSetIrreducible(pEq);
+    pEq->iRightJoinTable = (i16)pE2->iTable;
+  }
+  *ppWhere = sqlite3ExprAnd(db, *ppWhere, pEq);
+}
+
+/*
+** Set the EP_FromJoin property on all terms of the given expression.
+** And set the Expr.iRightJoinTable to iTable for every term in the
+** expression.
+**
+** The EP_FromJoin property is used on terms of an expression to tell
+** the LEFT OUTER JOIN processing logic that this term is part of the
+** join restriction specified in the ON or USING clause and not a part
+** of the more general WHERE clause.  These terms are moved over to the
+** WHERE clause during join processing but we need to remember that they
+** originated in the ON or USING clause.
+**
+** The Expr.iRightJoinTable tells the WHERE clause processing that the
+** expression depends on table iRightJoinTable even if that table is not
+** explicitly mentioned in the expression.  That information is needed
+** for cases like this:
+**
+**    SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.b AND t1.x=5
+**
+** The where clause needs to defer the handling of the t1.x=5
+** term until after the t2 loop of the join.  In that way, a
+** NULL t2 row will be inserted whenever t1.x!=5.  If we do not
+** defer the handling of t1.x=5, it will be processed immediately
+** after the t1 loop and rows with t1.x!=5 will never appear in
+** the output, which is incorrect.
+*/
+static void setJoinExpr(Expr *p, int iTable){
+  while( p ){
+    ExprSetProperty(p, EP_FromJoin);
+    assert( !ExprHasAnyProperty(p, EP_TokenOnly|EP_Reduced) );
+    ExprSetIrreducible(p);
+    p->iRightJoinTable = (i16)iTable;
+    setJoinExpr(p->pLeft, iTable);
+    p = p->pRight;
+  } 
+}
+
+/*
+** This routine processes the join information for a SELECT statement.
+** ON and USING clauses are converted into extra terms of the WHERE clause.
+** NATURAL joins also create extra WHERE clause terms.
+**
+** The terms of a FROM clause are contained in the Select.pSrc structure.
+** The left most table is the first entry in Select.pSrc.  The right-most
+** table is the last entry.  The join operator is held in the entry to
+** the left.  Thus entry 0 contains the join operator for the join between
+** entries 0 and 1.  Any ON or USING clauses associated with the join are
+** also attached to the left entry.
+**
+** This routine returns the number of errors encountered.
+*/
+static int sqliteProcessJoin(Parse *pParse, Select *p){
+  SrcList *pSrc;                  /* All tables in the FROM clause */
+  int i, j;                       /* Loop counters */
+  struct SrcList_item *pLeft;     /* Left table being joined */
+  struct SrcList_item *pRight;    /* Right table being joined */
+
+  pSrc = p->pSrc;
+  pLeft = &pSrc->a[0];
+  pRight = &pLeft[1];
+  for(i=0; i<pSrc->nSrc-1; i++, pRight++, pLeft++){
+    Table *pLeftTab = pLeft->pTab;
+    Table *pRightTab = pRight->pTab;
+    int isOuter;
+
+    if( NEVER(pLeftTab==0 || pRightTab==0) ) continue;
+    isOuter = (pRight->jointype & JT_OUTER)!=0;
+
+    /* When the NATURAL keyword is present, add WHERE clause terms for
+    ** every column that the two tables have in common.
+    */
+    if( pRight->jointype & JT_NATURAL ){
+      if( pRight->pOn || pRight->pUsing ){
+        sqlite3ErrorMsg(pParse, "a NATURAL join may not have "
+           "an ON or USING clause", 0);
+        return 1;
+      }
+      for(j=0; j<pRightTab->nCol; j++){
+        char *zName;   /* Name of column in the right table */
+        int iLeft;     /* Matching left table */
+        int iLeftCol;  /* Matching column in the left table */
+
+        zName = pRightTab->aCol[j].zName;
+        if( tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol) ){
+          addWhereTerm(pParse, pSrc, iLeft, iLeftCol, i+1, j,
+                       isOuter, &p->pWhere);
+        }
+      }
+    }
+
+    /* Disallow both ON and USING clauses in the same join
+    */
+    if( pRight->pOn && pRight->pUsing ){
+      sqlite3ErrorMsg(pParse, "cannot have both ON and USING "
+        "clauses in the same join");
+      return 1;
+    }
+
+    /* Add the ON clause to the end of the WHERE clause, connected by
+    ** an AND operator.
+    */
+    if( pRight->pOn ){
+      if( isOuter ) setJoinExpr(pRight->pOn, pRight->iCursor);
+      p->pWhere = sqlite3ExprAnd(pParse->db, p->pWhere, pRight->pOn);
+      pRight->pOn = 0;
+    }
+
+    /* Create extra terms on the WHERE clause for each column named
+    ** in the USING clause.  Example: If the two tables to be joined are 
+    ** A and B and the USING clause names X, Y, and Z, then add this
+    ** to the WHERE clause:    A.X=B.X AND A.Y=B.Y AND A.Z=B.Z
+    ** Report an error if any column mentioned in the USING clause is
+    ** not contained in both tables to be joined.
+    */
+    if( pRight->pUsing ){
+      IdList *pList = pRight->pUsing;
+      for(j=0; j<pList->nId; j++){
+        char *zName;     /* Name of the term in the USING clause */
+        int iLeft;       /* Table on the left with matching column name */
+        int iLeftCol;    /* Column number of matching column on the left */
+        int iRightCol;   /* Column number of matching column on the right */
+
+        zName = pList->a[j].zName;
+        iRightCol = columnIndex(pRightTab, zName);
+        if( iRightCol<0
+         || !tableAndColumnIndex(pSrc, i+1, zName, &iLeft, &iLeftCol)
+        ){
+          sqlite3ErrorMsg(pParse, "cannot join using column %s - column "
+            "not present in both tables", zName);
+          return 1;
+        }
+        addWhereTerm(pParse, pSrc, iLeft, iLeftCol, i+1, iRightCol,
+                     isOuter, &p->pWhere);
+      }
+    }
+  }
+  return 0;
+}
+
+/*
+** Insert code into "v" that will push the record on the top of the
+** stack into the sorter.
+*/
+static void pushOntoSorter(
+  Parse *pParse,         /* Parser context */
+  ExprList *pOrderBy,    /* The ORDER BY clause */
+  Select *pSelect,       /* The whole SELECT statement */
+  int regData            /* Register holding data to be sorted */
+){
+  Vdbe *v = pParse->pVdbe;
+  int nExpr = pOrderBy->nExpr;
+  int regBase = sqlite3GetTempRange(pParse, nExpr+2);
+  int regRecord = sqlite3GetTempReg(pParse);
+  sqlite3ExprCacheClear(pParse);
+  sqlite3ExprCodeExprList(pParse, pOrderBy, regBase, 0);
+  sqlite3VdbeAddOp2(v, OP_Sequence, pOrderBy->iECursor, regBase+nExpr);
+  sqlite3ExprCodeMove(pParse, regData, regBase+nExpr+1, 1);
+  sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nExpr + 2, regRecord);
+  sqlite3VdbeAddOp2(v, OP_IdxInsert, pOrderBy->iECursor, regRecord);
+  sqlite3ReleaseTempReg(pParse, regRecord);
+  sqlite3ReleaseTempRange(pParse, regBase, nExpr+2);
+  if( pSelect->iLimit ){
+    int addr1, addr2;
+    int iLimit;
+    if( pSelect->iOffset ){
+      iLimit = pSelect->iOffset+1;
+    }else{
+      iLimit = pSelect->iLimit;
+    }
+    addr1 = sqlite3VdbeAddOp1(v, OP_IfZero, iLimit);
+    sqlite3VdbeAddOp2(v, OP_AddImm, iLimit, -1);
+    addr2 = sqlite3VdbeAddOp0(v, OP_Goto);
+    sqlite3VdbeJumpHere(v, addr1);
+    sqlite3VdbeAddOp1(v, OP_Last, pOrderBy->iECursor);
+    sqlite3VdbeAddOp1(v, OP_Delete, pOrderBy->iECursor);
+    sqlite3VdbeJumpHere(v, addr2);
+  }
+}
+
+/*
+** Add code to implement the OFFSET
+*/
+static void codeOffset(
+  Vdbe *v,          /* Generate code into this VM */
+  Select *p,        /* The SELECT statement being coded */
+  int iContinue     /* Jump here to skip the current record */
+){
+  if( p->iOffset && iContinue!=0 ){
+    int addr;
+    sqlite3VdbeAddOp2(v, OP_AddImm, p->iOffset, -1);
+    addr = sqlite3VdbeAddOp1(v, OP_IfNeg, p->iOffset);
+    sqlite3VdbeAddOp2(v, OP_Goto, 0, iContinue);
+    VdbeComment((v, "skip OFFSET records"));
+    sqlite3VdbeJumpHere(v, addr);
+  }
+}
+
+/*
+** Add code that will check to make sure the N registers starting at iMem
+** form a distinct entry.  iTab is a sorting index that holds previously
+** seen combinations of the N values.  A new entry is made in iTab
+** if the current N values are new.
+**
+** A jump to addrRepeat is made and the N+1 values are popped from the
+** stack if the top N elements are not distinct.
+*/
+static void codeDistinct(
+  Parse *pParse,     /* Parsing and code generating context */
+  int iTab,          /* A sorting index used to test for distinctness */
+  int addrRepeat,    /* Jump to here if not distinct */
+  int N,             /* Number of elements */
+  int iMem           /* First element */
+){
+  Vdbe *v;
+  int r1;
+
+  v = pParse->pVdbe;
+  r1 = sqlite3GetTempReg(pParse);
+  sqlite3VdbeAddOp4Int(v, OP_Found, iTab, addrRepeat, iMem, N);
+  sqlite3VdbeAddOp3(v, OP_MakeRecord, iMem, N, r1);
+  sqlite3VdbeAddOp2(v, OP_IdxInsert, iTab, r1);
+  sqlite3ReleaseTempReg(pParse, r1);
+}
+
+#ifndef SQLITE_OMIT_SUBQUERY
+/*
+** Generate an error message when a SELECT is used within a subexpression
+** (example:  "a IN (SELECT * FROM table)") but it has more than 1 result
+** column.  We do this in a subroutine because the error used to occur
+** in multiple places.  (The error only occurs in one place now, but we
+** retain the subroutine to minimize code disruption.)
+*/
+static int checkForMultiColumnSelectError(
+  Parse *pParse,       /* Parse context. */
+  SelectDest *pDest,   /* Destination of SELECT results */
+  int nExpr            /* Number of result columns returned by SELECT */
+){
+  int eDest = pDest->eDest;
+  if( nExpr>1 && (eDest==SRT_Mem || eDest==SRT_Set) ){
+    sqlite3ErrorMsg(pParse, "only a single result allowed for "
+       "a SELECT that is part of an expression");
+    return 1;
+  }else{
+    return 0;
+  }
+}
+#endif
+
+/*
+** This routine generates the code for the inside of the inner loop
+** of a SELECT.
+**
+** If srcTab and nColumn are both zero, then the pEList expressions
+** are evaluated in order to get the data for this row.  If nColumn>0
+** then data is pulled from srcTab and pEList is used only to get the
+** datatypes for each column.
+*/
+static void selectInnerLoop(
+  Parse *pParse,          /* The parser context */
+  Select *p,              /* The complete select statement being coded */
+  ExprList *pEList,       /* List of values being extracted */
+  int srcTab,             /* Pull data from this table */
+  int nColumn,            /* Number of columns in the source table */
+  ExprList *pOrderBy,     /* If not NULL, sort results using this key */
+  int distinct,           /* If >=0, make sure results are distinct */
+  SelectDest *pDest,      /* How to dispose of the results */
+  int iContinue,          /* Jump here to continue with next row */
+  int iBreak              /* Jump here to break out of the inner loop */
+){
+  Vdbe *v = pParse->pVdbe;
+  int i;
+  int hasDistinct;        /* True if the DISTINCT keyword is present */
+  int regResult;              /* Start of memory holding result set */
+  int eDest = pDest->eDest;   /* How to dispose of results */
+  int iParm = pDest->iParm;   /* First argument to disposal method */
+  int nResultCol;             /* Number of result columns */
+
+  assert( v );
+  if( NEVER(v==0) ) return;
+  assert( pEList!=0 );
+  hasDistinct = distinct>=0;
+  if( pOrderBy==0 && !hasDistinct ){
+    codeOffset(v, p, iContinue);
+  }
+
+  /* Pull the requested columns.
+  */
+  if( nColumn>0 ){
+    nResultCol = nColumn;
+  }else{
+    nResultCol = pEList->nExpr;
+  }
+  if( pDest->iMem==0 ){
+    pDest->iMem = pParse->nMem+1;
+    pDest->nMem = nResultCol;
+    pParse->nMem += nResultCol;
+  }else{ 
+    assert( pDest->nMem==nResultCol );
+  }
+  regResult = pDest->iMem;
+  if( nColumn>0 ){
+    for(i=0; i<nColumn; i++){
+      sqlite3VdbeAddOp3(v, OP_Column, srcTab, i, regResult+i);
+    }
+  }else if( eDest!=SRT_Exists ){
+    /* If the destination is an EXISTS(...) expression, the actual
+    ** values returned by the SELECT are not required.
+    */
+    sqlite3ExprCacheClear(pParse);
+    sqlite3ExprCodeExprList(pParse, pEList, regResult, eDest==SRT_Output);
+  }
+  nColumn = nResultCol;
+
+  /* If the DISTINCT keyword was present on the SELECT statement
+  ** and this row has been seen before, then do not make this row
+  ** part of the result.
+  */
+  if( hasDistinct ){
+    assert( pEList!=0 );
+    assert( pEList->nExpr==nColumn );
+    codeDistinct(pParse, distinct, iContinue, nColumn, regResult);
+    if( pOrderBy==0 ){
+      codeOffset(v, p, iContinue);
+    }
+  }
+
+  switch( eDest ){
+    /* In this mode, write each query result to the key of the temporary
+    ** table iParm.
+    */
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
+    case SRT_Union: {
+      int r1;
+      r1 = sqlite3GetTempReg(pParse);
+      sqlite3VdbeAddOp3(v, OP_MakeRecord, regResult, nColumn, r1);
+      sqlite3VdbeAddOp2(v, OP_IdxInsert, iParm, r1);
+      sqlite3ReleaseTempReg(pParse, r1);
+      break;
+    }
+
+    /* Construct a record from the query result, but instead of
+    ** saving that record, use it as a key to delete elements from
+    ** the temporary table iParm.
+    */
+    case SRT_Except: {
+      sqlite3VdbeAddOp3(v, OP_IdxDelete, iParm, regResult, nColumn);
+      break;
+    }
+#endif
+
+    /* Store the result as data using a unique key.
+    */
+    case SRT_Table:
+    case SRT_EphemTab: {
+      int r1 = sqlite3GetTempReg(pParse);
+      testcase( eDest==SRT_Table );
+      testcase( eDest==SRT_EphemTab );
+      sqlite3VdbeAddOp3(v, OP_MakeRecord, regResult, nColumn, r1);
+      if( pOrderBy ){
+        pushOntoSorter(pParse, pOrderBy, p, r1);
+      }else{
+        int r2 = sqlite3GetTempReg(pParse);
+        sqlite3VdbeAddOp2(v, OP_NewRowid, iParm, r2);
+        sqlite3VdbeAddOp3(v, OP_Insert, iParm, r1, r2);
+        sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
+        sqlite3ReleaseTempReg(pParse, r2);
+      }
+      sqlite3ReleaseTempReg(pParse, r1);
+      break;
+    }
+
+#ifndef SQLITE_OMIT_SUBQUERY
+    /* If we are creating a set for an "expr IN (SELECT ...)" construct,
+    ** then there should be a single item on the stack.  Write this
+    ** item into the set table with bogus data.
+    */
+    case SRT_Set: {
+      assert( nColumn==1 );
+      p->affinity = sqlite3CompareAffinity(pEList->a[0].pExpr, pDest->affinity);
+      if( pOrderBy ){
+        /* At first glance you would think we could optimize out the
+        ** ORDER BY in this case since the order of entries in the set
+        ** does not matter.  But there might be a LIMIT clause, in which
+        ** case the order does matter */
+        pushOntoSorter(pParse, pOrderBy, p, regResult);
+      }else{
+        int r1 = sqlite3GetTempReg(pParse);
+        sqlite3VdbeAddOp4(v, OP_MakeRecord, regResult, 1, r1, &p->affinity, 1);
+        sqlite3ExprCacheAffinityChange(pParse, regResult, 1);
+        sqlite3VdbeAddOp2(v, OP_IdxInsert, iParm, r1);
+        sqlite3ReleaseTempReg(pParse, r1);
+      }
+      break;
+    }
+
+    /* If any row exist in the result set, record that fact and abort.
+    */
+    case SRT_Exists: {
+      sqlite3VdbeAddOp2(v, OP_Integer, 1, iParm);
+      /* The LIMIT clause will terminate the loop for us */
+      break;
+    }
+
+    /* If this is a scalar select that is part of an expression, then
+    ** store the results in the appropriate memory cell and break out
+    ** of the scan loop.
+    */
+    case SRT_Mem: {
+      assert( nColumn==1 );
+      if( pOrderBy ){
+        pushOntoSorter(pParse, pOrderBy, p, regResult);
+      }else{
+        sqlite3ExprCodeMove(pParse, regResult, iParm, 1);
+        /* The LIMIT clause will jump out of the loop for us */
+      }
+      break;
+    }
+#endif /* #ifndef SQLITE_OMIT_SUBQUERY */
+
+    /* Send the data to the callback function or to a subroutine.  In the
+    ** case of a subroutine, the subroutine itself is responsible for
+    ** popping the data from the stack.
+    */
+    case SRT_Coroutine:
+    case SRT_Output: {
+      testcase( eDest==SRT_Coroutine );
+      testcase( eDest==SRT_Output );
+      if( pOrderBy ){
+        int r1 = sqlite3GetTempReg(pParse);
+        sqlite3VdbeAddOp3(v, OP_MakeRecord, regResult, nColumn, r1);
+        pushOntoSorter(pParse, pOrderBy, p, r1);
+        sqlite3ReleaseTempReg(pParse, r1);
+      }else if( eDest==SRT_Coroutine ){
+        sqlite3VdbeAddOp1(v, OP_Yield, pDest->iParm);
+      }else{
+        sqlite3VdbeAddOp2(v, OP_ResultRow, regResult, nColumn);
+        sqlite3ExprCacheAffinityChange(pParse, regResult, nColumn);
+      }
+      break;
+    }
+
+#if !defined(SQLITE_OMIT_TRIGGER)
+    /* Discard the results.  This is used for SELECT statements inside
+    ** the body of a TRIGGER.  The purpose of such selects is to call
+    ** user-defined functions that have side effects.  We do not care
+    ** about the actual results of the select.
+    */
+    default: {
+      assert( eDest==SRT_Discard );
+      break;
+    }
+#endif
+  }
+
+  /* Jump to the end of the loop if the LIMIT is reached.  Except, if
+  ** there is a sorter, in which case the sorter has already limited
+  ** the output for us.
+  */
+  if( pOrderBy==0 && p->iLimit ){
+    sqlite3VdbeAddOp3(v, OP_IfZero, p->iLimit, iBreak, -1);
+  }
+}
+
+/*
+** Given an expression list, generate a KeyInfo structure that records
+** the collating sequence for each expression in that expression list.
+**
+** If the ExprList is an ORDER BY or GROUP BY clause then the resulting
+** KeyInfo structure is appropriate for initializing a virtual index to
+** implement that clause.  If the ExprList is the result set of a SELECT
+** then the KeyInfo structure is appropriate for initializing a virtual
+** index to implement a DISTINCT test.
+**
+** Space to hold the KeyInfo structure is obtain from malloc.  The calling
+** function is responsible for seeing that this structure is eventually
+** freed.  Add the KeyInfo structure to the P4 field of an opcode using
+** P4_KEYINFO_HANDOFF is the usual way of dealing with this.
+*/
+static KeyInfo *keyInfoFromExprList(Parse *pParse, ExprList *pList){
+  sqlite3 *db = pParse->db;
+  int nExpr;
+  KeyInfo *pInfo;
+  struct ExprList_item *pItem;
+  int i;
+
+  nExpr = pList->nExpr;
+  pInfo = sqlite3DbMallocZero(db, sizeof(*pInfo) + nExpr*(sizeof(CollSeq*)+1) );
+  if( pInfo ){
+    pInfo->aSortOrder = (u8*)&pInfo->aColl[nExpr];
+    pInfo->nField = (u16)nExpr;
+    pInfo->enc = ENC(db);
+    pInfo->db = db;
+    for(i=0, pItem=pList->a; i<nExpr; i++, pItem++){
+      CollSeq *pColl;
+      pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
+      if( !pColl ){
+        pColl = db->pDfltColl;
+      }
+      pInfo->aColl[i] = pColl;
+      pInfo->aSortOrder[i] = pItem->sortOrder;
+    }
+  }
+  return pInfo;
+}
+
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
+/*
+** Name of the connection operator, used for error messages.
+*/
+static const char *selectOpName(int id){
+  char *z;
+  switch( id ){
+    case TK_ALL:       z = "UNION ALL";   break;
+    case TK_INTERSECT: z = "INTERSECT";   break;
+    case TK_EXCEPT:    z = "EXCEPT";      break;
+    default:           z = "UNION";       break;
+  }
+  return z;
+}
+#endif /* SQLITE_OMIT_COMPOUND_SELECT */
+
+#ifndef SQLITE_OMIT_EXPLAIN
+/*
+** Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
+** is a no-op. Otherwise, it adds a single row of output to the EQP result,
+** where the caption is of the form:
+**
+**   "USE TEMP B-TREE FOR xxx"
+**
+** where xxx is one of "DISTINCT", "ORDER BY" or "GROUP BY". Exactly which
+** is determined by the zUsage argument.
+*/
+static void explainTempTable(Parse *pParse, const char *zUsage){
+  if( pParse->explain==2 ){
+    Vdbe *v = pParse->pVdbe;
+    char *zMsg = sqlite3MPrintf(pParse->db, "USE TEMP B-TREE FOR %s", zUsage);
+    sqlite3VdbeAddOp4(v, OP_Explain, pParse->iSelectId, 0, 0, zMsg, P4_DYNAMIC);
+  }
+}
+
+/*
+** Assign expression b to lvalue a. A second, no-op, version of this macro
+** is provided when SQLITE_OMIT_EXPLAIN is defined. This allows the code
+** in sqlite3Select() to assign values to structure member variables that
+** only exist if SQLITE_OMIT_EXPLAIN is not defined without polluting the
+** code with #ifndef directives.
+*/
+# define explainSetInteger(a, b) a = b
+
+#else
+/* No-op versions of the explainXXX() functions and macros. */
+# define explainTempTable(y,z)
+# define explainSetInteger(y,z)
+#endif
+
+#if !defined(SQLITE_OMIT_EXPLAIN) && !defined(SQLITE_OMIT_COMPOUND_SELECT)
+/*
+** Unless an "EXPLAIN QUERY PLAN" command is being processed, this function
+** is a no-op. Otherwise, it adds a single row of output to the EQP result,
+** where the caption is of one of the two forms:
+**
+**   "COMPOSITE SUBQUERIES iSub1 and iSub2 (op)"
+**   "COMPOSITE SUBQUERIES iSub1 and iSub2 USING TEMP B-TREE (op)"
+**
+** where iSub1 and iSub2 are the integers passed as the corresponding
+** function parameters, and op is the text representation of the parameter
+** of the same name. The parameter "op" must be one of TK_UNION, TK_EXCEPT,
+** TK_INTERSECT or TK_ALL. The first form is used if argument bUseTmp is 
+** false, or the second form if it is true.
+*/
+static void explainComposite(
+  Parse *pParse,                  /* Parse context */
+  int op,                         /* One of TK_UNION, TK_EXCEPT etc. */
+  int iSub1,                      /* Subquery id 1 */
+  int iSub2,                      /* Subquery id 2 */
+  int bUseTmp                     /* True if a temp table was used */
+){
+  assert( op==TK_UNION || op==TK_EXCEPT || op==TK_INTERSECT || op==TK_ALL );
+  if( pParse->explain==2 ){
+    Vdbe *v = pParse->pVdbe;
+    char *zMsg = sqlite3MPrintf(
+        pParse->db, "COMPOUND SUBQUERIES %d AND %d %s(%s)", iSub1, iSub2,
+        bUseTmp?"USING TEMP B-TREE ":"", selectOpName(op)
+    );
+    sqlite3VdbeAddOp4(v, OP_Explain, pParse->iSelectId, 0, 0, zMsg, P4_DYNAMIC);
+  }
+}
+#else
+/* No-op versions of the explainXXX() functions and macros. */
+# define explainComposite(v,w,x,y,z)
+#endif
+
+/*
+** If the inner loop was generated using a non-null pOrderBy argument,
+** then the results were placed in a sorter.  After the loop is terminated
+** we need to run the sorter and output the results.  The following
+** routine generates the code needed to do that.
+*/
+static void generateSortTail(
+  Parse *pParse,    /* Parsing context */
+  Select *p,        /* The SELECT statement */
+  Vdbe *v,          /* Generate code into this VDBE */
+  int nColumn,      /* Number of columns of data */
+  SelectDest *pDest /* Write the sorted results here */
+){
+  int addrBreak = sqlite3VdbeMakeLabel(v);     /* Jump here to exit loop */
+  int addrContinue = sqlite3VdbeMakeLabel(v);  /* Jump here for next cycle */
+  int addr;
+  int iTab;
+  int pseudoTab = 0;
+  ExprList *pOrderBy = p->pOrderBy;
+
+  int eDest = pDest->eDest;
+  int iParm = pDest->iParm;
+
+  int regRow;
+  int regRowid;
+
+  iTab = pOrderBy->iECursor;
+  regRow = sqlite3GetTempReg(pParse);
+  if( eDest==SRT_Output || eDest==SRT_Coroutine ){
+    pseudoTab = pParse->nTab++;
+    sqlite3VdbeAddOp3(v, OP_OpenPseudo, pseudoTab, regRow, nColumn);
+    regRowid = 0;
+  }else{
+    regRowid = sqlite3GetTempReg(pParse);
+  }
+  addr = 1 + sqlite3VdbeAddOp2(v, OP_Sort, iTab, addrBreak);
+  codeOffset(v, p, addrContinue);
+  sqlite3VdbeAddOp3(v, OP_Column, iTab, pOrderBy->nExpr + 1, regRow);
+  switch( eDest ){
+    case SRT_Table:
+    case SRT_EphemTab: {
+      testcase( eDest==SRT_Table );
+      testcase( eDest==SRT_EphemTab );
+      sqlite3VdbeAddOp2(v, OP_NewRowid, iParm, regRowid);
+      sqlite3VdbeAddOp3(v, OP_Insert, iParm, regRow, regRowid);
+      sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
+      break;
+    }
+#ifndef SQLITE_OMIT_SUBQUERY
+    case SRT_Set: {
+      assert( nColumn==1 );
+      sqlite3VdbeAddOp4(v, OP_MakeRecord, regRow, 1, regRowid, &p->affinity, 1);
+      sqlite3ExprCacheAffinityChange(pParse, regRow, 1);
+      sqlite3VdbeAddOp2(v, OP_IdxInsert, iParm, regRowid);
+      break;
+    }
+    case SRT_Mem: {
+      assert( nColumn==1 );
+      sqlite3ExprCodeMove(pParse, regRow, iParm, 1);
+      /* The LIMIT clause will terminate the loop for us */
+      break;
+    }
+#endif
+    default: {
+      int i;
+      assert( eDest==SRT_Output || eDest==SRT_Coroutine ); 
+      testcase( eDest==SRT_Output );
+      testcase( eDest==SRT_Coroutine );
+      for(i=0; i<nColumn; i++){
+        assert( regRow!=pDest->iMem+i );
+        sqlite3VdbeAddOp3(v, OP_Column, pseudoTab, i, pDest->iMem+i);
+        if( i==0 ){
+          sqlite3VdbeChangeP5(v, OPFLAG_CLEARCACHE);
+        }
+      }
+      if( eDest==SRT_Output ){
+        sqlite3VdbeAddOp2(v, OP_ResultRow, pDest->iMem, nColumn);
+        sqlite3ExprCacheAffinityChange(pParse, pDest->iMem, nColumn);
+      }else{
+        sqlite3VdbeAddOp1(v, OP_Yield, pDest->iParm);
+      }
+      break;
+    }
+  }
+  sqlite3ReleaseTempReg(pParse, regRow);
+  sqlite3ReleaseTempReg(pParse, regRowid);
+
+  /* The bottom of the loop
+  */
+  sqlite3VdbeResolveLabel(v, addrContinue);
+  sqlite3VdbeAddOp2(v, OP_Next, iTab, addr);
+  sqlite3VdbeResolveLabel(v, addrBreak);
+  if( eDest==SRT_Output || eDest==SRT_Coroutine ){
+    sqlite3VdbeAddOp2(v, OP_Close, pseudoTab, 0);
+  }
+}
+
+/*
+** Return a pointer to a string containing the 'declaration type' of the
+** expression pExpr. The string may be treated as static by the caller.
+**
+** The declaration type is the exact datatype definition extracted from the
+** original CREATE TABLE statement if the expression is a column. The
+** declaration type for a ROWID field is INTEGER. Exactly when an expression
+** is considered a column can be complex in the presence of subqueries. The
+** result-set expression in all of the following SELECT statements is 
+** considered a column by this function.
+**
+**   SELECT col FROM tbl;
+**   SELECT (SELECT col FROM tbl;
+**   SELECT (SELECT col FROM tbl);
+**   SELECT abc FROM (SELECT col AS abc FROM tbl);
+** 
+** The declaration type for any expression other than a column is NULL.
+*/
+static const char *columnType(
+  NameContext *pNC, 
+  Expr *pExpr,
+  const char **pzOriginDb,
+  const char **pzOriginTab,
+  const char **pzOriginCol
+){
+  char const *zType = 0;
+  char const *zOriginDb = 0;
+  char const *zOriginTab = 0;
+  char const *zOriginCol = 0;
+  int j;
+  if( NEVER(pExpr==0) || pNC->pSrcList==0 ) return 0;
+
+  switch( pExpr->op ){
+    case TK_AGG_COLUMN:
+    case TK_COLUMN: {
+      /* The expression is a column. Locate the table the column is being
+      ** extracted from in NameContext.pSrcList. This table may be real
+      ** database table or a subquery.
+      */
+      Table *pTab = 0;            /* Table structure column is extracted from */
+      Select *pS = 0;             /* Select the column is extracted from */
+      int iCol = pExpr->iColumn;  /* Index of column in pTab */
+      testcase( pExpr->op==TK_AGG_COLUMN );
+      testcase( pExpr->op==TK_COLUMN );
+      while( pNC && !pTab ){
+        SrcList *pTabList = pNC->pSrcList;
+        for(j=0;j<pTabList->nSrc && pTabList->a[j].iCursor!=pExpr->iTable;j++);
+        if( j<pTabList->nSrc ){
+          pTab = pTabList->a[j].pTab;
+          pS = pTabList->a[j].pSelect;
+        }else{
+          pNC = pNC->pNext;
+        }
+      }
+
+      if( pTab==0 ){
+        /* At one time, code such as "SELECT new.x" within a trigger would
+        ** cause this condition to run.  Since then, we have restructured how
+        ** trigger code is generated and so this condition is no longer 
+        ** possible. However, it can still be true for statements like
+        ** the following:
+        **
+        **   CREATE TABLE t1(col INTEGER);
+        **   SELECT (SELECT t1.col) FROM FROM t1;
+        **
+        ** when columnType() is called on the expression "t1.col" in the 
+        ** sub-select. In this case, set the column type to NULL, even
+        ** though it should really be "INTEGER".
+        **
+        ** This is not a problem, as the column type of "t1.col" is never
+        ** used. When columnType() is called on the expression 
+        ** "(SELECT t1.col)", the correct type is returned (see the TK_SELECT
+        ** branch below.  */
+        break;
+      }
+
+      assert( pTab && pExpr->pTab==pTab );
+      if( pS ){
+        /* The "table" is actually a sub-select or a view in the FROM clause
+        ** of the SELECT statement. Return the declaration type and origin
+        ** data for the result-set column of the sub-select.
+        */
+        if( iCol>=0 && ALWAYS(iCol<pS->pEList->nExpr) ){
+          /* If iCol is less than zero, then the expression requests the
+          ** rowid of the sub-select or view. This expression is legal (see 
+          ** test case misc2.2.2) - it always evaluates to NULL.
+          */
+          NameContext sNC;
+          Expr *p = pS->pEList->a[iCol].pExpr;
+          sNC.pSrcList = pS->pSrc;
+          sNC.pNext = pNC;
+          sNC.pParse = pNC->pParse;
+          zType = columnType(&sNC, p, &zOriginDb, &zOriginTab, &zOriginCol); 
+        }
+      }else if( ALWAYS(pTab->pSchema) ){
+        /* A real table */
+        assert( !pS );
+        if( iCol<0 ) iCol = pTab->iPKey;
+        assert( iCol==-1 || (iCol>=0 && iCol<pTab->nCol) );
+        if( iCol<0 ){
+          zType = "INTEGER";
+          zOriginCol = "rowid";
+        }else{
+          zType = pTab->aCol[iCol].zType;
+          zOriginCol = pTab->aCol[iCol].zName;
+        }
+        zOriginTab = pTab->zName;
+        if( pNC->pParse ){
+          int iDb = sqlite3SchemaToIndex(pNC->pParse->db, pTab->pSchema);
+          zOriginDb = pNC->pParse->db->aDb[iDb].zName;
+        }
+      }
+      break;
+    }
+#ifndef SQLITE_OMIT_SUBQUERY
+    case TK_SELECT: {
+      /* The expression is a sub-select. Return the declaration type and
+      ** origin info for the single column in the result set of the SELECT
+      ** statement.
+      */
+      NameContext sNC;
+      Select *pS = pExpr->x.pSelect;
+      Expr *p = pS->pEList->a[0].pExpr;
+      assert( ExprHasProperty(pExpr, EP_xIsSelect) );
+      sNC.pSrcList = pS->pSrc;
+      sNC.pNext = pNC;
+      sNC.pParse = pNC->pParse;
+      zType = columnType(&sNC, p, &zOriginDb, &zOriginTab, &zOriginCol); 
+      break;
+    }
+#endif
+  }
+  
+  if( pzOriginDb ){
+    assert( pzOriginTab && pzOriginCol );
+    *pzOriginDb = zOriginDb;
+    *pzOriginTab = zOriginTab;
+    *pzOriginCol = zOriginCol;
+  }
+  return zType;
+}
+
+/*
+** Generate code that will tell the VDBE the declaration types of columns
+** in the result set.
+*/
+static void generateColumnTypes(
+  Parse *pParse,      /* Parser context */
+  SrcList *pTabList,  /* List of tables */
+  ExprList *pEList    /* Expressions defining the result set */
+){
+#ifndef SQLITE_OMIT_DECLTYPE
+  Vdbe *v = pParse->pVdbe;
+  int i;
+  NameContext sNC;
+  sNC.pSrcList = pTabList;
+  sNC.pParse = pParse;
+  for(i=0; i<pEList->nExpr; i++){
+    Expr *p = pEList->a[i].pExpr;
+    const char *zType;
+#ifdef SQLITE_ENABLE_COLUMN_METADATA
+    const char *zOrigDb = 0;
+    const char *zOrigTab = 0;
+    const char *zOrigCol = 0;
+    zType = columnType(&sNC, p, &zOrigDb, &zOrigTab, &zOrigCol);
+
+    /* The vdbe must make its own copy of the column-type and other 
+    ** column specific strings, in case the schema is reset before this
+    ** virtual machine is deleted.
+    */
+    sqlite3VdbeSetColName(v, i, COLNAME_DATABASE, zOrigDb, SQLITE_TRANSIENT);
+    sqlite3VdbeSetColName(v, i, COLNAME_TABLE, zOrigTab, SQLITE_TRANSIENT);
+    sqlite3VdbeSetColName(v, i, COLNAME_COLUMN, zOrigCol, SQLITE_TRANSIENT);
+#else
+    zType = columnType(&sNC, p, 0, 0, 0);
+#endif
+    sqlite3VdbeSetColName(v, i, COLNAME_DECLTYPE, zType, SQLITE_TRANSIENT);
+  }
+#endif /* SQLITE_OMIT_DECLTYPE */
+}
+
+/*
+** Generate code that will tell the VDBE the names of columns
+** in the result set.  This information is used to provide the
+** azCol[] values in the callback.
+*/
+static void generateColumnNames(
+  Parse *pParse,      /* Parser context */
+  SrcList *pTabList,  /* List of tables */
+  ExprList *pEList    /* Expressions defining the result set */
+){
+  Vdbe *v = pParse->pVdbe;
+  int i, j;
+  sqlite3 *db = pParse->db;
+  int fullNames, shortNames;
+
+#ifndef SQLITE_OMIT_EXPLAIN
+  /* If this is an EXPLAIN, skip this step */
+  if( pParse->explain ){
+    return;
+  }
+#endif
+
+  if( pParse->colNamesSet || NEVER(v==0) || db->mallocFailed ) return;
+  pParse->colNamesSet = 1;
+  fullNames = (db->flags & SQLITE_FullColNames)!=0;
+  shortNames = (db->flags & SQLITE_ShortColNames)!=0;
+  sqlite3VdbeSetNumCols(v, pEList->nExpr);
+  for(i=0; i<pEList->nExpr; i++){
+    Expr *p;
+    p = pEList->a[i].pExpr;
+    if( NEVER(p==0) ) continue;
+    if( pEList->a[i].zName ){
+      char *zName = pEList->a[i].zName;
+      sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_TRANSIENT);
+    }else if( (p->op==TK_COLUMN || p->op==TK_AGG_COLUMN) && pTabList ){
+      Table *pTab;
+      char *zCol;
+      int iCol = p->iColumn;
+      for(j=0; ALWAYS(j<pTabList->nSrc); j++){
+        if( pTabList->a[j].iCursor==p->iTable ) break;
+      }
+      assert( j<pTabList->nSrc );
+      pTab = pTabList->a[j].pTab;
+      if( iCol<0 ) iCol = pTab->iPKey;
+      assert( iCol==-1 || (iCol>=0 && iCol<pTab->nCol) );
+      if( iCol<0 ){
+        zCol = "rowid";
+      }else{
+        zCol = pTab->aCol[iCol].zName;
+      }
+      if( !shortNames && !fullNames ){
+        sqlite3VdbeSetColName(v, i, COLNAME_NAME, 
+            sqlite3DbStrDup(db, pEList->a[i].zSpan), SQLITE_DYNAMIC);
+      }else if( fullNames ){
+        char *zName = 0;
+        zName = sqlite3MPrintf(db, "%s.%s", pTab->zName, zCol);
+        sqlite3VdbeSetColName(v, i, COLNAME_NAME, zName, SQLITE_DYNAMIC);
+      }else{
+        sqlite3VdbeSetColName(v, i, COLNAME_NAME, zCol, SQLITE_TRANSIENT);
+      }
+    }else{
+      sqlite3VdbeSetColName(v, i, COLNAME_NAME, 
+          sqlite3DbStrDup(db, pEList->a[i].zSpan), SQLITE_DYNAMIC);
+    }
+  }
+  generateColumnTypes(pParse, pTabList, pEList);
+}
+
+/*
+** Given a an expression list (which is really the list of expressions
+** that form the result set of a SELECT statement) compute appropriate
+** column names for a table that would hold the expression list.
+**
+** All column names will be unique.
+**
+** Only the column names are computed.  Column.zType, Column.zColl,
+** and other fields of Column are zeroed.
+**
+** Return SQLITE_OK on success.  If a memory allocation error occurs,
+** store NULL in *paCol and 0 in *pnCol and return SQLITE_NOMEM.
+*/
+static int selectColumnsFromExprList(
+  Parse *pParse,          /* Parsing context */
+  ExprList *pEList,       /* Expr list from which to derive column names */
+  int *pnCol,             /* Write the number of columns here */
+  Column **paCol          /* Write the new column list here */
+){
+  sqlite3 *db = pParse->db;   /* Database connection */
+  int i, j;                   /* Loop counters */
+  int cnt;                    /* Index added to make the name unique */
+  Column *aCol, *pCol;        /* For looping over result columns */
+  int nCol;                   /* Number of columns in the result set */
+  Expr *p;                    /* Expression for a single result column */
+  char *zName;                /* Column name */
+  int nName;                  /* Size of name in zName[] */
+
+  *pnCol = nCol = pEList->nExpr;
+  aCol = *paCol = sqlite3DbMallocZero(db, sizeof(aCol[0])*nCol);
+  if( aCol==0 ) return SQLITE_NOMEM;
+  for(i=0, pCol=aCol; i<nCol; i++, pCol++){
+    /* Get an appropriate name for the column
+    */
+    p = pEList->a[i].pExpr;
+    assert( p->pRight==0 || ExprHasProperty(p->pRight, EP_IntValue)
+               || p->pRight->u.zToken==0 || p->pRight->u.zToken[0]!=0 );
+    if( (zName = pEList->a[i].zName)!=0 ){
+      /* If the column contains an "AS <name>" phrase, use <name> as the name */
+      zName = sqlite3DbStrDup(db, zName);
+    }else{
+      Expr *pColExpr = p;  /* The expression that is the result column name */
+      Table *pTab;         /* Table associated with this expression */
+      while( pColExpr->op==TK_DOT ) pColExpr = pColExpr->pRight;
+      if( pColExpr->op==TK_COLUMN && ALWAYS(pColExpr->pTab!=0) ){
+        /* For columns use the column name name */
+        int iCol = pColExpr->iColumn;
+        pTab = pColExpr->pTab;
+        if( iCol<0 ) iCol = pTab->iPKey;
+        zName = sqlite3MPrintf(db, "%s",
+                 iCol>=0 ? pTab->aCol[iCol].zName : "rowid");
+      }else if( pColExpr->op==TK_ID ){
+        assert( !ExprHasProperty(pColExpr, EP_IntValue) );
+        zName = sqlite3MPrintf(db, "%s", pColExpr->u.zToken);
+      }else{
+        /* Use the original text of the column expression as its name */
+        zName = sqlite3MPrintf(db, "%s", pEList->a[i].zSpan);
+      }
+    }
+    if( db->mallocFailed ){
+      sqlite3DbFree(db, zName);
+      break;
+    }
+
+    /* Make sure the column name is unique.  If the name is not unique,
+    ** append a integer to the name so that it becomes unique.
+    */
+    nName = sqlite3Strlen30(zName);
+    for(j=cnt=0; j<i; j++){
+      if( sqlite3StrICmp(aCol[j].zName, zName)==0 ){
+        char *zNewName;
+        zName[nName] = 0;
+        zNewName = sqlite3MPrintf(db, "%s:%d", zName, ++cnt);
+        sqlite3DbFree(db, zName);
+        zName = zNewName;
+        j = -1;
+        if( zName==0 ) break;
+      }
+    }
+    pCol->zName = zName;
+  }
+  if( db->mallocFailed ){
+    for(j=0; j<i; j++){
+      sqlite3DbFree(db, aCol[j].zName);
+    }
+    sqlite3DbFree(db, aCol);
+    *paCol = 0;
+    *pnCol = 0;
+    return SQLITE_NOMEM;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Add type and collation information to a column list based on
+** a SELECT statement.
+** 
+** The column list presumably came from selectColumnNamesFromExprList().
+** The column list has only names, not types or collations.  This
+** routine goes through and adds the types and collations.
+**
+** This routine requires that all identifiers in the SELECT
+** statement be resolved.
+*/
+static void selectAddColumnTypeAndCollation(
+  Parse *pParse,        /* Parsing contexts */
+  int nCol,             /* Number of columns */
+  Column *aCol,         /* List of columns */
+  Select *pSelect       /* SELECT used to determine types and collations */
+){
+  sqlite3 *db = pParse->db;
+  NameContext sNC;
+  Column *pCol;
+  CollSeq *pColl;
+  int i;
+  Expr *p;
+  struct ExprList_item *a;
+
+  assert( pSelect!=0 );
+  assert( (pSelect->selFlags & SF_Resolved)!=0 );
+  assert( nCol==pSelect->pEList->nExpr || db->mallocFailed );
+  if( db->mallocFailed ) return;
+  memset(&sNC, 0, sizeof(sNC));
+  sNC.pSrcList = pSelect->pSrc;
+  a = pSelect->pEList->a;
+  for(i=0, pCol=aCol; i<nCol; i++, pCol++){
+    p = a[i].pExpr;
+    pCol->zType = sqlite3DbStrDup(db, columnType(&sNC, p, 0, 0, 0));
+    pCol->affinity = sqlite3ExprAffinity(p);
+    if( pCol->affinity==0 ) pCol->affinity = SQLITE_AFF_NONE;
+    pColl = sqlite3ExprCollSeq(pParse, p);
+    if( pColl ){
+      pCol->zColl = sqlite3DbStrDup(db, pColl->zName);
+    }
+  }
+}
+
+/*
+** Given a SELECT statement, generate a Table structure that describes
+** the result set of that SELECT.
+*/
+SQLITE_PRIVATE Table *sqlite3ResultSetOfSelect(Parse *pParse, Select *pSelect){
+  Table *pTab;
+  sqlite3 *db = pParse->db;
+  int savedFlags;
+
+  savedFlags = db->flags;
+  db->flags &= ~SQLITE_FullColNames;
+  db->flags |= SQLITE_ShortColNames;
+  sqlite3SelectPrep(pParse, pSelect, 0);
+  if( pParse->nErr ) return 0;
+  while( pSelect->pPrior ) pSelect = pSelect->pPrior;
+  db->flags = savedFlags;
+  pTab = sqlite3DbMallocZero(db, sizeof(Table) );
+  if( pTab==0 ){
+    return 0;
+  }
+  /* The sqlite3ResultSetOfSelect() is only used n contexts where lookaside
+  ** is disabled */
+  assert( db->lookaside.bEnabled==0 );
+  pTab->nRef = 1;
+  pTab->zName = 0;
+  pTab->nRowEst = 1000000;
+  selectColumnsFromExprList(pParse, pSelect->pEList, &pTab->nCol, &pTab->aCol);
+  selectAddColumnTypeAndCollation(pParse, pTab->nCol, pTab->aCol, pSelect);
+  pTab->iPKey = -1;
+  if( db->mallocFailed ){
+    sqlite3DeleteTable(db, pTab);
+    return 0;
+  }
+  return pTab;
+}
+
+/*
+** Get a VDBE for the given parser context.  Create a new one if necessary.
+** If an error occurs, return NULL and leave a message in pParse.
+*/
+SQLITE_PRIVATE Vdbe *sqlite3GetVdbe(Parse *pParse){
+  Vdbe *v = pParse->pVdbe;
+  if( v==0 ){
+    v = pParse->pVdbe = sqlite3VdbeCreate(pParse->db);
+#ifndef SQLITE_OMIT_TRACE
+    if( v ){
+      sqlite3VdbeAddOp0(v, OP_Trace);
+    }
+#endif
+  }
+  return v;
+}
+
+
+/*
+** Compute the iLimit and iOffset fields of the SELECT based on the
+** pLimit and pOffset expressions.  pLimit and pOffset hold the expressions
+** that appear in the original SQL statement after the LIMIT and OFFSET
+** keywords.  Or NULL if those keywords are omitted. iLimit and iOffset 
+** are the integer memory register numbers for counters used to compute 
+** the limit and offset.  If there is no limit and/or offset, then 
+** iLimit and iOffset are negative.
+**
+** This routine changes the values of iLimit and iOffset only if
+** a limit or offset is defined by pLimit and pOffset.  iLimit and
+** iOffset should have been preset to appropriate default values
+** (usually but not always -1) prior to calling this routine.
+** Only if pLimit!=0 or pOffset!=0 do the limit registers get
+** redefined.  The UNION ALL operator uses this property to force
+** the reuse of the same limit and offset registers across multiple
+** SELECT statements.
+*/
+static void computeLimitRegisters(Parse *pParse, Select *p, int iBreak){
+  Vdbe *v = 0;
+  int iLimit = 0;
+  int iOffset;
+  int addr1, n;
+  if( p->iLimit ) return;
+
+  /* 
+  ** "LIMIT -1" always shows all rows.  There is some
+  ** contraversy about what the correct behavior should be.
+  ** The current implementation interprets "LIMIT 0" to mean
+  ** no rows.
+  */
+  sqlite3ExprCacheClear(pParse);
+  assert( p->pOffset==0 || p->pLimit!=0 );
+  if( p->pLimit ){
+    p->iLimit = iLimit = ++pParse->nMem;
+    v = sqlite3GetVdbe(pParse);
+    if( NEVER(v==0) ) return;  /* VDBE should have already been allocated */
+    if( sqlite3ExprIsInteger(p->pLimit, &n) ){
+      sqlite3VdbeAddOp2(v, OP_Integer, n, iLimit);
+      VdbeComment((v, "LIMIT counter"));
+      if( n==0 ){
+        sqlite3VdbeAddOp2(v, OP_Goto, 0, iBreak);
+      }else{
+        if( p->nSelectRow > (double)n ) p->nSelectRow = (double)n;
+      }
+    }else{
+      sqlite3ExprCode(pParse, p->pLimit, iLimit);
+      sqlite3VdbeAddOp1(v, OP_MustBeInt, iLimit);
+      VdbeComment((v, "LIMIT counter"));
+      sqlite3VdbeAddOp2(v, OP_IfZero, iLimit, iBreak);
+    }
+    if( p->pOffset ){
+      p->iOffset = iOffset = ++pParse->nMem;
+      pParse->nMem++;   /* Allocate an extra register for limit+offset */
+      sqlite3ExprCode(pParse, p->pOffset, iOffset);
+      sqlite3VdbeAddOp1(v, OP_MustBeInt, iOffset);
+      VdbeComment((v, "OFFSET counter"));
+      addr1 = sqlite3VdbeAddOp1(v, OP_IfPos, iOffset);
+      sqlite3VdbeAddOp2(v, OP_Integer, 0, iOffset);
+      sqlite3VdbeJumpHere(v, addr1);
+      sqlite3VdbeAddOp3(v, OP_Add, iLimit, iOffset, iOffset+1);
+      VdbeComment((v, "LIMIT+OFFSET"));
+      addr1 = sqlite3VdbeAddOp1(v, OP_IfPos, iLimit);
+      sqlite3VdbeAddOp2(v, OP_Integer, -1, iOffset+1);
+      sqlite3VdbeJumpHere(v, addr1);
+    }
+  }
+}
+
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
+/*
+** Return the appropriate collating sequence for the iCol-th column of
+** the result set for the compound-select statement "p".  Return NULL if
+** the column has no default collating sequence.
+**
+** The collating sequence for the compound select is taken from the
+** left-most term of the select that has a collating sequence.
+*/
+static CollSeq *multiSelectCollSeq(Parse *pParse, Select *p, int iCol){
+  CollSeq *pRet;
+  if( p->pPrior ){
+    pRet = multiSelectCollSeq(pParse, p->pPrior, iCol);
+  }else{
+    pRet = 0;
+  }
+  assert( iCol>=0 );
+  if( pRet==0 && iCol<p->pEList->nExpr ){
+    pRet = sqlite3ExprCollSeq(pParse, p->pEList->a[iCol].pExpr);
+  }
+  return pRet;
+}
+#endif /* SQLITE_OMIT_COMPOUND_SELECT */
+
+/* Forward reference */
+static int multiSelectOrderBy(
+  Parse *pParse,        /* Parsing context */
+  Select *p,            /* The right-most of SELECTs to be coded */
+  SelectDest *pDest     /* What to do with query results */
+);
+
+
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
+/*
+** This routine is called to process a compound query form from
+** two or more separate queries using UNION, UNION ALL, EXCEPT, or
+** INTERSECT
+**
+** "p" points to the right-most of the two queries.  the query on the
+** left is p->pPrior.  The left query could also be a compound query
+** in which case this routine will be called recursively. 
+**
+** The results of the total query are to be written into a destination
+** of type eDest with parameter iParm.
+**
+** Example 1:  Consider a three-way compound SQL statement.
+**
+**     SELECT a FROM t1 UNION SELECT b FROM t2 UNION SELECT c FROM t3
+**
+** This statement is parsed up as follows:
+**
+**     SELECT c FROM t3
+**      |
+**      `----->  SELECT b FROM t2
+**                |
+**                `------>  SELECT a FROM t1
+**
+** The arrows in the diagram above represent the Select.pPrior pointer.
+** So if this routine is called with p equal to the t3 query, then
+** pPrior will be the t2 query.  p->op will be TK_UNION in this case.
+**
+** Notice that because of the way SQLite parses compound SELECTs, the
+** individual selects always group from left to right.
+*/
+static int multiSelect(
+  Parse *pParse,        /* Parsing context */
+  Select *p,            /* The right-most of SELECTs to be coded */
+  SelectDest *pDest     /* What to do with query results */
+){
+  int rc = SQLITE_OK;   /* Success code from a subroutine */
+  Select *pPrior;       /* Another SELECT immediately to our left */
+  Vdbe *v;              /* Generate code to this VDBE */
+  SelectDest dest;      /* Alternative data destination */
+  Select *pDelete = 0;  /* Chain of simple selects to delete */
+  sqlite3 *db;          /* Database connection */
+#ifndef SQLITE_OMIT_EXPLAIN
+  int iSub1;            /* EQP id of left-hand query */
+  int iSub2;            /* EQP id of right-hand query */
+#endif
+
+  /* Make sure there is no ORDER BY or LIMIT clause on prior SELECTs.  Only
+  ** the last (right-most) SELECT in the series may have an ORDER BY or LIMIT.
+  */
+  assert( p && p->pPrior );  /* Calling function guarantees this much */
+  db = pParse->db;
+  pPrior = p->pPrior;
+  assert( pPrior->pRightmost!=pPrior );
+  assert( pPrior->pRightmost==p->pRightmost );
+  dest = *pDest;
+  if( pPrior->pOrderBy ){
+    sqlite3ErrorMsg(pParse,"ORDER BY clause should come after %s not before",
+      selectOpName(p->op));
+    rc = 1;
+    goto multi_select_end;
+  }
+  if( pPrior->pLimit ){
+    sqlite3ErrorMsg(pParse,"LIMIT clause should come after %s not before",
+      selectOpName(p->op));
+    rc = 1;
+    goto multi_select_end;
+  }
+
+  v = sqlite3GetVdbe(pParse);
+  assert( v!=0 );  /* The VDBE already created by calling function */
+
+  /* Create the destination temporary table if necessary
+  */
+  if( dest.eDest==SRT_EphemTab ){
+    assert( p->pEList );
+    sqlite3VdbeAddOp2(v, OP_OpenEphemeral, dest.iParm, p->pEList->nExpr);
+    sqlite3VdbeChangeP5(v, BTREE_UNORDERED);
+    dest.eDest = SRT_Table;
+  }
+
+  /* Make sure all SELECTs in the statement have the same number of elements
+  ** in their result sets.
+  */
+  assert( p->pEList && pPrior->pEList );
+  if( p->pEList->nExpr!=pPrior->pEList->nExpr ){
+    sqlite3ErrorMsg(pParse, "SELECTs to the left and right of %s"
+      " do not have the same number of result columns", selectOpName(p->op));
+    rc = 1;
+    goto multi_select_end;
+  }
+
+  /* Compound SELECTs that have an ORDER BY clause are handled separately.
+  */
+  if( p->pOrderBy ){
+    return multiSelectOrderBy(pParse, p, pDest);
+  }
+
+  /* Generate code for the left and right SELECT statements.
+  */
+  switch( p->op ){
+    case TK_ALL: {
+      int addr = 0;
+      int nLimit;
+      assert( !pPrior->pLimit );
+      pPrior->pLimit = p->pLimit;
+      pPrior->pOffset = p->pOffset;
+      explainSetInteger(iSub1, pParse->iNextSelectId);
+      rc = sqlite3Select(pParse, pPrior, &dest);
+      p->pLimit = 0;
+      p->pOffset = 0;
+      if( rc ){
+        goto multi_select_end;
+      }
+      p->pPrior = 0;
+      p->iLimit = pPrior->iLimit;
+      p->iOffset = pPrior->iOffset;
+      if( p->iLimit ){
+        addr = sqlite3VdbeAddOp1(v, OP_IfZero, p->iLimit);
+        VdbeComment((v, "Jump ahead if LIMIT reached"));
+      }
+      explainSetInteger(iSub2, pParse->iNextSelectId);
+      rc = sqlite3Select(pParse, p, &dest);
+      testcase( rc!=SQLITE_OK );
+      pDelete = p->pPrior;
+      p->pPrior = pPrior;
+      p->nSelectRow += pPrior->nSelectRow;
+      if( pPrior->pLimit
+       && sqlite3ExprIsInteger(pPrior->pLimit, &nLimit)
+       && p->nSelectRow > (double)nLimit 
+      ){
+        p->nSelectRow = (double)nLimit;
+      }
+      if( addr ){
+        sqlite3VdbeJumpHere(v, addr);
+      }
+      break;
+    }
+    case TK_EXCEPT:
+    case TK_UNION: {
+      int unionTab;    /* Cursor number of the temporary table holding result */
+      u8 op = 0;       /* One of the SRT_ operations to apply to self */
+      int priorOp;     /* The SRT_ operation to apply to prior selects */
+      Expr *pLimit, *pOffset; /* Saved values of p->nLimit and p->nOffset */
+      int addr;
+      SelectDest uniondest;
+
+      testcase( p->op==TK_EXCEPT );
+      testcase( p->op==TK_UNION );
+      priorOp = SRT_Union;
+      if( dest.eDest==priorOp && ALWAYS(!p->pLimit &&!p->pOffset) ){
+        /* We can reuse a temporary table generated by a SELECT to our
+        ** right.
+        */
+        assert( p->pRightmost!=p );  /* Can only happen for leftward elements
+                                     ** of a 3-way or more compound */
+        assert( p->pLimit==0 );      /* Not allowed on leftward elements */
+        assert( p->pOffset==0 );     /* Not allowed on leftward elements */
+        unionTab = dest.iParm;
+      }else{
+        /* We will need to create our own temporary table to hold the
+        ** intermediate results.
+        */
+        unionTab = pParse->nTab++;
+        assert( p->pOrderBy==0 );
+        addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, unionTab, 0);
+        assert( p->addrOpenEphm[0] == -1 );
+        p->addrOpenEphm[0] = addr;
+        p->pRightmost->selFlags |= SF_UsesEphemeral;
+        assert( p->pEList );
+      }
+
+      /* Code the SELECT statements to our left
+      */
+      assert( !pPrior->pOrderBy );
+      sqlite3SelectDestInit(&uniondest, priorOp, unionTab);
+      explainSetInteger(iSub1, pParse->iNextSelectId);
+      rc = sqlite3Select(pParse, pPrior, &uniondest);
+      if( rc ){
+        goto multi_select_end;
+      }
+
+      /* Code the current SELECT statement
+      */
+      if( p->op==TK_EXCEPT ){
+        op = SRT_Except;
+      }else{
+        assert( p->op==TK_UNION );
+        op = SRT_Union;
+      }
+      p->pPrior = 0;
+      pLimit = p->pLimit;
+      p->pLimit = 0;
+      pOffset = p->pOffset;
+      p->pOffset = 0;
+      uniondest.eDest = op;
+      explainSetInteger(iSub2, pParse->iNextSelectId);
+      rc = sqlite3Select(pParse, p, &uniondest);
+      testcase( rc!=SQLITE_OK );
+      /* Query flattening in sqlite3Select() might refill p->pOrderBy.
+      ** Be sure to delete p->pOrderBy, therefore, to avoid a memory leak. */
+      sqlite3ExprListDelete(db, p->pOrderBy);
+      pDelete = p->pPrior;
+      p->pPrior = pPrior;
+      p->pOrderBy = 0;
+      if( p->op==TK_UNION ) p->nSelectRow += pPrior->nSelectRow;
+      sqlite3ExprDelete(db, p->pLimit);
+      p->pLimit = pLimit;
+      p->pOffset = pOffset;
+      p->iLimit = 0;
+      p->iOffset = 0;
+
+      /* Convert the data in the temporary table into whatever form
+      ** it is that we currently need.
+      */
+      assert( unionTab==dest.iParm || dest.eDest!=priorOp );
+      if( dest.eDest!=priorOp ){
+        int iCont, iBreak, iStart;
+        assert( p->pEList );
+        if( dest.eDest==SRT_Output ){
+          Select *pFirst = p;
+          while( pFirst->pPrior ) pFirst = pFirst->pPrior;
+          generateColumnNames(pParse, 0, pFirst->pEList);
+        }
+        iBreak = sqlite3VdbeMakeLabel(v);
+        iCont = sqlite3VdbeMakeLabel(v);
+        computeLimitRegisters(pParse, p, iBreak);
+        sqlite3VdbeAddOp2(v, OP_Rewind, unionTab, iBreak);
+        iStart = sqlite3VdbeCurrentAddr(v);
+        selectInnerLoop(pParse, p, p->pEList, unionTab, p->pEList->nExpr,
+                        0, -1, &dest, iCont, iBreak);
+        sqlite3VdbeResolveLabel(v, iCont);
+        sqlite3VdbeAddOp2(v, OP_Next, unionTab, iStart);
+        sqlite3VdbeResolveLabel(v, iBreak);
+        sqlite3VdbeAddOp2(v, OP_Close, unionTab, 0);
+      }
+      break;
+    }
+    default: assert( p->op==TK_INTERSECT ); {
+      int tab1, tab2;
+      int iCont, iBreak, iStart;
+      Expr *pLimit, *pOffset;
+      int addr;
+      SelectDest intersectdest;
+      int r1;
+
+      /* INTERSECT is different from the others since it requires
+      ** two temporary tables.  Hence it has its own case.  Begin
+      ** by allocating the tables we will need.
+      */
+      tab1 = pParse->nTab++;
+      tab2 = pParse->nTab++;
+      assert( p->pOrderBy==0 );
+
+      addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, tab1, 0);
+      assert( p->addrOpenEphm[0] == -1 );
+      p->addrOpenEphm[0] = addr;
+      p->pRightmost->selFlags |= SF_UsesEphemeral;
+      assert( p->pEList );
+
+      /* Code the SELECTs to our left into temporary table "tab1".
+      */
+      sqlite3SelectDestInit(&intersectdest, SRT_Union, tab1);
+      explainSetInteger(iSub1, pParse->iNextSelectId);
+      rc = sqlite3Select(pParse, pPrior, &intersectdest);
+      if( rc ){
+        goto multi_select_end;
+      }
+
+      /* Code the current SELECT into temporary table "tab2"
+      */
+      addr = sqlite3VdbeAddOp2(v, OP_OpenEphemeral, tab2, 0);
+      assert( p->addrOpenEphm[1] == -1 );
+      p->addrOpenEphm[1] = addr;
+      p->pPrior = 0;
+      pLimit = p->pLimit;
+      p->pLimit = 0;
+      pOffset = p->pOffset;
+      p->pOffset = 0;
+      intersectdest.iParm = tab2;
+      explainSetInteger(iSub2, pParse->iNextSelectId);
+      rc = sqlite3Select(pParse, p, &intersectdest);
+      testcase( rc!=SQLITE_OK );
+      pDelete = p->pPrior;
+      p->pPrior = pPrior;
+      if( p->nSelectRow>pPrior->nSelectRow ) p->nSelectRow = pPrior->nSelectRow;
+      sqlite3ExprDelete(db, p->pLimit);
+      p->pLimit = pLimit;
+      p->pOffset = pOffset;
+
+      /* Generate code to take the intersection of the two temporary
+      ** tables.
+      */
+      assert( p->pEList );
+      if( dest.eDest==SRT_Output ){
+        Select *pFirst = p;
+        while( pFirst->pPrior ) pFirst = pFirst->pPrior;
+        generateColumnNames(pParse, 0, pFirst->pEList);
+      }
+      iBreak = sqlite3VdbeMakeLabel(v);
+      iCont = sqlite3VdbeMakeLabel(v);
+      computeLimitRegisters(pParse, p, iBreak);
+      sqlite3VdbeAddOp2(v, OP_Rewind, tab1, iBreak);
+      r1 = sqlite3GetTempReg(pParse);
+      iStart = sqlite3VdbeAddOp2(v, OP_RowKey, tab1, r1);
+      sqlite3VdbeAddOp4Int(v, OP_NotFound, tab2, iCont, r1, 0);
+      sqlite3ReleaseTempReg(pParse, r1);
+      selectInnerLoop(pParse, p, p->pEList, tab1, p->pEList->nExpr,
+                      0, -1, &dest, iCont, iBreak);
+      sqlite3VdbeResolveLabel(v, iCont);
+      sqlite3VdbeAddOp2(v, OP_Next, tab1, iStart);
+      sqlite3VdbeResolveLabel(v, iBreak);
+      sqlite3VdbeAddOp2(v, OP_Close, tab2, 0);
+      sqlite3VdbeAddOp2(v, OP_Close, tab1, 0);
+      break;
+    }
+  }
+
+  explainComposite(pParse, p->op, iSub1, iSub2, p->op!=TK_ALL);
+
+  /* Compute collating sequences used by 
+  ** temporary tables needed to implement the compound select.
+  ** Attach the KeyInfo structure to all temporary tables.
+  **
+  ** This section is run by the right-most SELECT statement only.
+  ** SELECT statements to the left always skip this part.  The right-most
+  ** SELECT might also skip this part if it has no ORDER BY clause and
+  ** no temp tables are required.
+  */
+  if( p->selFlags & SF_UsesEphemeral ){
+    int i;                        /* Loop counter */
+    KeyInfo *pKeyInfo;            /* Collating sequence for the result set */
+    Select *pLoop;                /* For looping through SELECT statements */
+    CollSeq **apColl;             /* For looping through pKeyInfo->aColl[] */
+    int nCol;                     /* Number of columns in result set */
+
+    assert( p->pRightmost==p );
+    nCol = p->pEList->nExpr;
+    pKeyInfo = sqlite3DbMallocZero(db,
+                       sizeof(*pKeyInfo)+nCol*(sizeof(CollSeq*) + 1));
+    if( !pKeyInfo ){
+      rc = SQLITE_NOMEM;
+      goto multi_select_end;
+    }
+
+    pKeyInfo->enc = ENC(db);
+    pKeyInfo->nField = (u16)nCol;
+
+    for(i=0, apColl=pKeyInfo->aColl; i<nCol; i++, apColl++){
+      *apColl = multiSelectCollSeq(pParse, p, i);
+      if( 0==*apColl ){
+        *apColl = db->pDfltColl;
+      }
+    }
+
+    for(pLoop=p; pLoop; pLoop=pLoop->pPrior){
+      for(i=0; i<2; i++){
+        int addr = pLoop->addrOpenEphm[i];
+        if( addr<0 ){
+          /* If [0] is unused then [1] is also unused.  So we can
+          ** always safely abort as soon as the first unused slot is found */
+          assert( pLoop->addrOpenEphm[1]<0 );
+          break;
+        }
+        sqlite3VdbeChangeP2(v, addr, nCol);
+        sqlite3VdbeChangeP4(v, addr, (char*)pKeyInfo, P4_KEYINFO);
+        pLoop->addrOpenEphm[i] = -1;
+      }
+    }
+    sqlite3DbFree(db, pKeyInfo);
+  }
+
+multi_select_end:
+  pDest->iMem = dest.iMem;
+  pDest->nMem = dest.nMem;
+  sqlite3SelectDelete(db, pDelete);
+  return rc;
+}
+#endif /* SQLITE_OMIT_COMPOUND_SELECT */
+
+/*
+** Code an output subroutine for a coroutine implementation of a
+** SELECT statment.
+**
+** The data to be output is contained in pIn->iMem.  There are
+** pIn->nMem columns to be output.  pDest is where the output should
+** be sent.
+**
+** regReturn is the number of the register holding the subroutine
+** return address.
+**
+** If regPrev>0 then it is the first register in a vector that
+** records the previous output.  mem[regPrev] is a flag that is false
+** if there has been no previous output.  If regPrev>0 then code is
+** generated to suppress duplicates.  pKeyInfo is used for comparing
+** keys.
+**
+** If the LIMIT found in p->iLimit is reached, jump immediately to
+** iBreak.
+*/
+static int generateOutputSubroutine(
+  Parse *pParse,          /* Parsing context */
+  Select *p,              /* The SELECT statement */
+  SelectDest *pIn,        /* Coroutine supplying data */
+  SelectDest *pDest,      /* Where to send the data */
+  int regReturn,          /* The return address register */
+  int regPrev,            /* Previous result register.  No uniqueness if 0 */
+  KeyInfo *pKeyInfo,      /* For comparing with previous entry */
+  int p4type,             /* The p4 type for pKeyInfo */
+  int iBreak              /* Jump here if we hit the LIMIT */
+){
+  Vdbe *v = pParse->pVdbe;
+  int iContinue;
+  int addr;
+
+  addr = sqlite3VdbeCurrentAddr(v);
+  iContinue = sqlite3VdbeMakeLabel(v);
+
+  /* Suppress duplicates for UNION, EXCEPT, and INTERSECT 
+  */
+  if( regPrev ){
+    int j1, j2;
+    j1 = sqlite3VdbeAddOp1(v, OP_IfNot, regPrev);
+    j2 = sqlite3VdbeAddOp4(v, OP_Compare, pIn->iMem, regPrev+1, pIn->nMem,
+                              (char*)pKeyInfo, p4type);
+    sqlite3VdbeAddOp3(v, OP_Jump, j2+2, iContinue, j2+2);
+    sqlite3VdbeJumpHere(v, j1);
+    sqlite3ExprCodeCopy(pParse, pIn->iMem, regPrev+1, pIn->nMem);
+    sqlite3VdbeAddOp2(v, OP_Integer, 1, regPrev);
+  }
+  if( pParse->db->mallocFailed ) return 0;
+
+  /* Suppress the the first OFFSET entries if there is an OFFSET clause
+  */
+  codeOffset(v, p, iContinue);
+
+  switch( pDest->eDest ){
+    /* Store the result as data using a unique key.
+    */
+    case SRT_Table:
+    case SRT_EphemTab: {
+      int r1 = sqlite3GetTempReg(pParse);
+      int r2 = sqlite3GetTempReg(pParse);
+      testcase( pDest->eDest==SRT_Table );
+      testcase( pDest->eDest==SRT_EphemTab );
+      sqlite3VdbeAddOp3(v, OP_MakeRecord, pIn->iMem, pIn->nMem, r1);
+      sqlite3VdbeAddOp2(v, OP_NewRowid, pDest->iParm, r2);
+      sqlite3VdbeAddOp3(v, OP_Insert, pDest->iParm, r1, r2);
+      sqlite3VdbeChangeP5(v, OPFLAG_APPEND);
+      sqlite3ReleaseTempReg(pParse, r2);
+      sqlite3ReleaseTempReg(pParse, r1);
+      break;
+    }
+
+#ifndef SQLITE_OMIT_SUBQUERY
+    /* If we are creating a set for an "expr IN (SELECT ...)" construct,
+    ** then there should be a single item on the stack.  Write this
+    ** item into the set table with bogus data.
+    */
+    case SRT_Set: {
+      int r1;
+      assert( pIn->nMem==1 );
+      p->affinity = 
+         sqlite3CompareAffinity(p->pEList->a[0].pExpr, pDest->affinity);
+      r1 = sqlite3GetTempReg(pParse);
+      sqlite3VdbeAddOp4(v, OP_MakeRecord, pIn->iMem, 1, r1, &p->affinity, 1);
+      sqlite3ExprCacheAffinityChange(pParse, pIn->iMem, 1);
+      sqlite3VdbeAddOp2(v, OP_IdxInsert, pDest->iParm, r1);
+      sqlite3ReleaseTempReg(pParse, r1);
+      break;
+    }
+
+#if 0  /* Never occurs on an ORDER BY query */
+    /* If any row exist in the result set, record that fact and abort.
+    */
+    case SRT_Exists: {
+      sqlite3VdbeAddOp2(v, OP_Integer, 1, pDest->iParm);
+      /* The LIMIT clause will terminate the loop for us */
+      break;
+    }
+#endif
+
+    /* If this is a scalar select that is part of an expression, then
+    ** store the results in the appropriate memory cell and break out
+    ** of the scan loop.
+    */
+    case SRT_Mem: {
+      assert( pIn->nMem==1 );
+      sqlite3ExprCodeMove(pParse, pIn->iMem, pDest->iParm, 1);
+      /* The LIMIT clause will jump out of the loop for us */
+      break;
+    }
+#endif /* #ifndef SQLITE_OMIT_SUBQUERY */
+
+    /* The results are stored in a sequence of registers
+    ** starting at pDest->iMem.  Then the co-routine yields.
+    */
+    case SRT_Coroutine: {
+      if( pDest->iMem==0 ){
+        pDest->iMem = sqlite3GetTempRange(pParse, pIn->nMem);
+        pDest->nMem = pIn->nMem;
+      }
+      sqlite3ExprCodeMove(pParse, pIn->iMem, pDest->iMem, pDest->nMem);
+      sqlite3VdbeAddOp1(v, OP_Yield, pDest->iParm);
+      break;
+    }
+
+    /* If none of the above, then the result destination must be
+    ** SRT_Output.  This routine is never called with any other
+    ** destination other than the ones handled above or SRT_Output.
+    **
+    ** For SRT_Output, results are stored in a sequence of registers.  
+    ** Then the OP_ResultRow opcode is used to cause sqlite3_step() to
+    ** return the next row of result.
+    */
+    default: {
+      assert( pDest->eDest==SRT_Output );
+      sqlite3VdbeAddOp2(v, OP_ResultRow, pIn->iMem, pIn->nMem);
+      sqlite3ExprCacheAffinityChange(pParse, pIn->iMem, pIn->nMem);
+      break;
+    }
+  }
+
+  /* Jump to the end of the loop if the LIMIT is reached.
+  */
+  if( p->iLimit ){
+    sqlite3VdbeAddOp3(v, OP_IfZero, p->iLimit, iBreak, -1);
+  }
+
+  /* Generate the subroutine return
+  */
+  sqlite3VdbeResolveLabel(v, iContinue);
+  sqlite3VdbeAddOp1(v, OP_Return, regReturn);
+
+  return addr;
+}
+
+/*
+** Alternative compound select code generator for cases when there
+** is an ORDER BY clause.
+**
+** We assume a query of the following form:
+**
+**      <selectA>  <operator>  <selectB>  ORDER BY <orderbylist>
+**
+** <operator> is one of UNION ALL, UNION, EXCEPT, or INTERSECT.  The idea
+** is to code both <selectA> and <selectB> with the ORDER BY clause as
+** co-routines.  Then run the co-routines in parallel and merge the results
+** into the output.  In addition to the two coroutines (called selectA and
+** selectB) there are 7 subroutines:
+**
+**    outA:    Move the output of the selectA coroutine into the output
+**             of the compound query.
+**
+**    outB:    Move the output of the selectB coroutine into the output
+**             of the compound query.  (Only generated for UNION and
+**             UNION ALL.  EXCEPT and INSERTSECT never output a row that
+**             appears only in B.)
+**
+**    AltB:    Called when there is data from both coroutines and A<B.
+**
+**    AeqB:    Called when there is data from both coroutines and A==B.
+**
+**    AgtB:    Called when there is data from both coroutines and A>B.
+**
+**    EofA:    Called when data is exhausted from selectA.
+**
+**    EofB:    Called when data is exhausted from selectB.
+**
+** The implementation of the latter five subroutines depend on which 
+** <operator> is used:
+**
+**
+**             UNION ALL         UNION            EXCEPT          INTERSECT
+**          -------------  -----------------  --------------  -----------------
+**   AltB:   outA, nextA      outA, nextA       outA, nextA         nextA
+**
+**   AeqB:   outA, nextA         nextA             nextA         outA, nextA
+**
+**   AgtB:   outB, nextB      outB, nextB          nextB            nextB
+**
+**   EofA:   outB, nextB      outB, nextB          halt             halt
+**
+**   EofB:   outA, nextA      outA, nextA       outA, nextA         halt
+**
+** In the AltB, AeqB, and AgtB subroutines, an EOF on A following nextA
+** causes an immediate jump to EofA and an EOF on B following nextB causes
+** an immediate jump to EofB.  Within EofA and EofB, and EOF on entry or
+** following nextX causes a jump to the end of the select processing.
+**
+** Duplicate removal in the UNION, EXCEPT, and INTERSECT cases is handled
+** within the output subroutine.  The regPrev register set holds the previously
+** output value.  A comparison is made against this value and the output
+** is skipped if the next results would be the same as the previous.
+**
+** The implementation plan is to implement the two coroutines and seven
+** subroutines first, then put the control logic at the bottom.  Like this:
+**
+**          goto Init
+**     coA: coroutine for left query (A)
+**     coB: coroutine for right query (B)
+**    outA: output one row of A
+**    outB: output one row of B (UNION and UNION ALL only)
+**    EofA: ...
+**    EofB: ...
+**    AltB: ...
+**    AeqB: ...
+**    AgtB: ...
+**    Init: initialize coroutine registers
+**          yield coA
+**          if eof(A) goto EofA
+**          yield coB
+**          if eof(B) goto EofB
+**    Cmpr: Compare A, B
+**          Jump AltB, AeqB, AgtB
+**     End: ...
+**
+** We call AltB, AeqB, AgtB, EofA, and EofB "subroutines" but they are not
+** actually called using Gosub and they do not Return.  EofA and EofB loop
+** until all data is exhausted then jump to the "end" labe.  AltB, AeqB,
+** and AgtB jump to either L2 or to one of EofA or EofB.
+*/
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
+static int multiSelectOrderBy(
+  Parse *pParse,        /* Parsing context */
+  Select *p,            /* The right-most of SELECTs to be coded */
+  SelectDest *pDest     /* What to do with query results */
+){
+  int i, j;             /* Loop counters */
+  Select *pPrior;       /* Another SELECT immediately to our left */
+  Vdbe *v;              /* Generate code to this VDBE */
+  SelectDest destA;     /* Destination for coroutine A */
+  SelectDest destB;     /* Destination for coroutine B */
+  int regAddrA;         /* Address register for select-A coroutine */
+  int regEofA;          /* Flag to indicate when select-A is complete */
+  int regAddrB;         /* Address register for select-B coroutine */
+  int regEofB;          /* Flag to indicate when select-B is complete */
+  int addrSelectA;      /* Address of the select-A coroutine */
+  int addrSelectB;      /* Address of the select-B coroutine */
+  int regOutA;          /* Address register for the output-A subroutine */
+  int regOutB;          /* Address register for the output-B subroutine */
+  int addrOutA;         /* Address of the output-A subroutine */
+  int addrOutB = 0;     /* Address of the output-B subroutine */
+  int addrEofA;         /* Address of the select-A-exhausted subroutine */
+  int addrEofB;         /* Address of the select-B-exhausted subroutine */
+  int addrAltB;         /* Address of the A<B subroutine */
+  int addrAeqB;         /* Address of the A==B subroutine */
+  int addrAgtB;         /* Address of the A>B subroutine */
+  int regLimitA;        /* Limit register for select-A */
+  int regLimitB;        /* Limit register for select-A */
+  int regPrev;          /* A range of registers to hold previous output */
+  int savedLimit;       /* Saved value of p->iLimit */
+  int savedOffset;      /* Saved value of p->iOffset */
+  int labelCmpr;        /* Label for the start of the merge algorithm */
+  int labelEnd;         /* Label for the end of the overall SELECT stmt */
+  int j1;               /* Jump instructions that get retargetted */
+  int op;               /* One of TK_ALL, TK_UNION, TK_EXCEPT, TK_INTERSECT */
+  KeyInfo *pKeyDup = 0; /* Comparison information for duplicate removal */
+  KeyInfo *pKeyMerge;   /* Comparison information for merging rows */
+  sqlite3 *db;          /* Database connection */
+  ExprList *pOrderBy;   /* The ORDER BY clause */
+  int nOrderBy;         /* Number of terms in the ORDER BY clause */
+  int *aPermute;        /* Mapping from ORDER BY terms to result set columns */
+#ifndef SQLITE_OMIT_EXPLAIN
+  int iSub1;            /* EQP id of left-hand query */
+  int iSub2;            /* EQP id of right-hand query */
+#endif
+
+  assert( p->pOrderBy!=0 );
+  assert( pKeyDup==0 ); /* "Managed" code needs this.  Ticket #3382. */
+  db = pParse->db;
+  v = pParse->pVdbe;
+  assert( v!=0 );       /* Already thrown the error if VDBE alloc failed */
+  labelEnd = sqlite3VdbeMakeLabel(v);
+  labelCmpr = sqlite3VdbeMakeLabel(v);
+
+
+  /* Patch up the ORDER BY clause
+  */
+  op = p->op;  
+  pPrior = p->pPrior;
+  assert( pPrior->pOrderBy==0 );
+  pOrderBy = p->pOrderBy;
+  assert( pOrderBy );
+  nOrderBy = pOrderBy->nExpr;
+
+  /* For operators other than UNION ALL we have to make sure that
+  ** the ORDER BY clause covers every term of the result set.  Add
+  ** terms to the ORDER BY clause as necessary.
+  */
+  if( op!=TK_ALL ){
+    for(i=1; db->mallocFailed==0 && i<=p->pEList->nExpr; i++){
+      struct ExprList_item *pItem;
+      for(j=0, pItem=pOrderBy->a; j<nOrderBy; j++, pItem++){
+        assert( pItem->iCol>0 );
+        if( pItem->iCol==i ) break;
+      }
+      if( j==nOrderBy ){
+        Expr *pNew = sqlite3Expr(db, TK_INTEGER, 0);
+        if( pNew==0 ) return SQLITE_NOMEM;
+        pNew->flags |= EP_IntValue;
+        pNew->u.iValue = i;
+        pOrderBy = sqlite3ExprListAppend(pParse, pOrderBy, pNew);
+        pOrderBy->a[nOrderBy++].iCol = (u16)i;
+      }
+    }
+  }
+
+  /* Compute the comparison permutation and keyinfo that is used with
+  ** the permutation used to determine if the next
+  ** row of results comes from selectA or selectB.  Also add explicit
+  ** collations to the ORDER BY clause terms so that when the subqueries
+  ** to the right and the left are evaluated, they use the correct
+  ** collation.
+  */
+  aPermute = sqlite3DbMallocRaw(db, sizeof(int)*nOrderBy);
+  if( aPermute ){
+    struct ExprList_item *pItem;
+    for(i=0, pItem=pOrderBy->a; i<nOrderBy; i++, pItem++){
+      assert( pItem->iCol>0  && pItem->iCol<=p->pEList->nExpr );
+      aPermute[i] = pItem->iCol - 1;
+    }
+    pKeyMerge =
+      sqlite3DbMallocRaw(db, sizeof(*pKeyMerge)+nOrderBy*(sizeof(CollSeq*)+1));
+    if( pKeyMerge ){
+      pKeyMerge->aSortOrder = (u8*)&pKeyMerge->aColl[nOrderBy];
+      pKeyMerge->nField = (u16)nOrderBy;
+      pKeyMerge->enc = ENC(db);
+      for(i=0; i<nOrderBy; i++){
+        CollSeq *pColl;
+        Expr *pTerm = pOrderBy->a[i].pExpr;
+        if( pTerm->flags & EP_ExpCollate ){
+          pColl = pTerm->pColl;
+        }else{
+          pColl = multiSelectCollSeq(pParse, p, aPermute[i]);
+          pTerm->flags |= EP_ExpCollate;
+          pTerm->pColl = pColl;
+        }
+        pKeyMerge->aColl[i] = pColl;
+        pKeyMerge->aSortOrder[i] = pOrderBy->a[i].sortOrder;
+      }
+    }
+  }else{
+    pKeyMerge = 0;
+  }
+
+  /* Reattach the ORDER BY clause to the query.
+  */
+  p->pOrderBy = pOrderBy;
+  pPrior->pOrderBy = sqlite3ExprListDup(pParse->db, pOrderBy, 0);
+
+  /* Allocate a range of temporary registers and the KeyInfo needed
+  ** for the logic that removes duplicate result rows when the
+  ** operator is UNION, EXCEPT, or INTERSECT (but not UNION ALL).
+  */
+  if( op==TK_ALL ){
+    regPrev = 0;
+  }else{
+    int nExpr = p->pEList->nExpr;
+    assert( nOrderBy>=nExpr || db->mallocFailed );
+    regPrev = sqlite3GetTempRange(pParse, nExpr+1);
+    sqlite3VdbeAddOp2(v, OP_Integer, 0, regPrev);
+    pKeyDup = sqlite3DbMallocZero(db,
+                  sizeof(*pKeyDup) + nExpr*(sizeof(CollSeq*)+1) );
+    if( pKeyDup ){
+      pKeyDup->aSortOrder = (u8*)&pKeyDup->aColl[nExpr];
+      pKeyDup->nField = (u16)nExpr;
+      pKeyDup->enc = ENC(db);
+      for(i=0; i<nExpr; i++){
+        pKeyDup->aColl[i] = multiSelectCollSeq(pParse, p, i);
+        pKeyDup->aSortOrder[i] = 0;
+      }
+    }
+  }
+ 
+  /* Separate the left and the right query from one another
+  */
+  p->pPrior = 0;
+  sqlite3ResolveOrderGroupBy(pParse, p, p->pOrderBy, "ORDER");
+  if( pPrior->pPrior==0 ){
+    sqlite3ResolveOrderGroupBy(pParse, pPrior, pPrior->pOrderBy, "ORDER");
+  }
+
+  /* Compute the limit registers */
+  computeLimitRegisters(pParse, p, labelEnd);
+  if( p->iLimit && op==TK_ALL ){
+    regLimitA = ++pParse->nMem;
+    regLimitB = ++pParse->nMem;
+    sqlite3VdbeAddOp2(v, OP_Copy, p->iOffset ? p->iOffset+1 : p->iLimit,
+                                  regLimitA);
+    sqlite3VdbeAddOp2(v, OP_Copy, regLimitA, regLimitB);
+  }else{
+    regLimitA = regLimitB = 0;
+  }
+  sqlite3ExprDelete(db, p->pLimit);
+  p->pLimit = 0;
+  sqlite3ExprDelete(db, p->pOffset);
+  p->pOffset = 0;
+
+  regAddrA = ++pParse->nMem;
+  regEofA = ++pParse->nMem;
+  regAddrB = ++pParse->nMem;
+  regEofB = ++pParse->nMem;
+  regOutA = ++pParse->nMem;
+  regOutB = ++pParse->nMem;
+  sqlite3SelectDestInit(&destA, SRT_Coroutine, regAddrA);
+  sqlite3SelectDestInit(&destB, SRT_Coroutine, regAddrB);
+
+  /* Jump past the various subroutines and coroutines to the main
+  ** merge loop
+  */
+  j1 = sqlite3VdbeAddOp0(v, OP_Goto);
+  addrSelectA = sqlite3VdbeCurrentAddr(v);
+
+
+  /* Generate a coroutine to evaluate the SELECT statement to the
+  ** left of the compound operator - the "A" select.
+  */
+  VdbeNoopComment((v, "Begin coroutine for left SELECT"));
+  pPrior->iLimit = regLimitA;
+  explainSetInteger(iSub1, pParse->iNextSelectId);
+  sqlite3Select(pParse, pPrior, &destA);
+  sqlite3VdbeAddOp2(v, OP_Integer, 1, regEofA);
+  sqlite3VdbeAddOp1(v, OP_Yield, regAddrA);
+  VdbeNoopComment((v, "End coroutine for left SELECT"));
+
+  /* Generate a coroutine to evaluate the SELECT statement on 
+  ** the right - the "B" select
+  */
+  addrSelectB = sqlite3VdbeCurrentAddr(v);
+  VdbeNoopComment((v, "Begin coroutine for right SELECT"));
+  savedLimit = p->iLimit;
+  savedOffset = p->iOffset;
+  p->iLimit = regLimitB;
+  p->iOffset = 0;  
+  explainSetInteger(iSub2, pParse->iNextSelectId);
+  sqlite3Select(pParse, p, &destB);
+  p->iLimit = savedLimit;
+  p->iOffset = savedOffset;
+  sqlite3VdbeAddOp2(v, OP_Integer, 1, regEofB);
+  sqlite3VdbeAddOp1(v, OP_Yield, regAddrB);
+  VdbeNoopComment((v, "End coroutine for right SELECT"));
+
+  /* Generate a subroutine that outputs the current row of the A
+  ** select as the next output row of the compound select.
+  */
+  VdbeNoopComment((v, "Output routine for A"));
+  addrOutA = generateOutputSubroutine(pParse,
+                 p, &destA, pDest, regOutA,
+                 regPrev, pKeyDup, P4_KEYINFO_HANDOFF, labelEnd);
+  
+  /* Generate a subroutine that outputs the current row of the B
+  ** select as the next output row of the compound select.
+  */
+  if( op==TK_ALL || op==TK_UNION ){
+    VdbeNoopComment((v, "Output routine for B"));
+    addrOutB = generateOutputSubroutine(pParse,
+                 p, &destB, pDest, regOutB,
+                 regPrev, pKeyDup, P4_KEYINFO_STATIC, labelEnd);
+  }
+
+  /* Generate a subroutine to run when the results from select A
+  ** are exhausted and only data in select B remains.
+  */
+  VdbeNoopComment((v, "eof-A subroutine"));
+  if( op==TK_EXCEPT || op==TK_INTERSECT ){
+    addrEofA = sqlite3VdbeAddOp2(v, OP_Goto, 0, labelEnd);
+  }else{  
+    addrEofA = sqlite3VdbeAddOp2(v, OP_If, regEofB, labelEnd);
+    sqlite3VdbeAddOp2(v, OP_Gosub, regOutB, addrOutB);
+    sqlite3VdbeAddOp1(v, OP_Yield, regAddrB);
+    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrEofA);
+    p->nSelectRow += pPrior->nSelectRow;
+  }
+
+  /* Generate a subroutine to run when the results from select B
+  ** are exhausted and only data in select A remains.
+  */
+  if( op==TK_INTERSECT ){
+    addrEofB = addrEofA;
+    if( p->nSelectRow > pPrior->nSelectRow ) p->nSelectRow = pPrior->nSelectRow;
+  }else{  
+    VdbeNoopComment((v, "eof-B subroutine"));
+    addrEofB = sqlite3VdbeAddOp2(v, OP_If, regEofA, labelEnd);
+    sqlite3VdbeAddOp2(v, OP_Gosub, regOutA, addrOutA);
+    sqlite3VdbeAddOp1(v, OP_Yield, regAddrA);
+    sqlite3VdbeAddOp2(v, OP_Goto, 0, addrEofB);
+  }
+
+  /* Generate code to handle the case of A<B
+  */
+  VdbeNoopComment((v, "A-lt-B subroutine"));
+  addrAltB = sqlite3VdbeAddOp2(v, OP_Gosub, regOutA, addrOutA);
+  sqlite3VdbeAddOp1(v, OP_Yield, regAddrA);
+  sqlite3VdbeAddOp2(v, OP_If, regEofA, addrEofA);
+  sqlite3VdbeAddOp2(v, OP_Goto, 0, labelCmpr);
+
+  /* Generate code to handle the case of A==B
+  */
+  if( op==TK_ALL ){
+    addrAeqB = addrAltB;
+  }else if( op==TK_INTERSECT ){
+    addrAeqB = addrAltB;
+    addrAltB++;
+  }else{
+    VdbeNoopComment((v, "A-eq-B subroutine"));
+    addrAeqB =
+    sqlite3VdbeAddOp1(v, OP_Yield, regAddrA);
+    sqlite3VdbeAddOp2(v, OP_If, regEofA, addrEofA);
+    sqlite3VdbeAddOp2(v, OP_Goto, 0, labelCmpr);
+  }
+
+  /* Generate code to handle the case of A>B
+  */
+  VdbeNoopComment((v, "A-gt-B subroutine"));
+  addrAgtB = sqlite3VdbeCurrentAddr(v);
+  if( op==TK_ALL || op==TK_UNION ){
+    sqlite3VdbeAddOp2(v, OP_Gosub, regOutB, addrOutB);
+  }
+  sqlite3VdbeAddOp1(v, OP_Yield, regAddrB);
+  sqlite3VdbeAddOp2(v, OP_If, regEofB, addrEofB);
+  sqlite3VdbeAddOp2(v, OP_Goto, 0, labelCmpr);
+
+  /* This code runs once to initialize everything.
+  */
+  sqlite3VdbeJumpHere(v, j1);
+  sqlite3VdbeAddOp2(v, OP_Integer, 0, regEofA);
+  sqlite3VdbeAddOp2(v, OP_Integer, 0, regEofB);
+  sqlite3VdbeAddOp2(v, OP_Gosub, regAddrA, addrSelectA);
+  sqlite3VdbeAddOp2(v, OP_Gosub, regAddrB, addrSelectB);
+  sqlite3VdbeAddOp2(v, OP_If, regEofA, addrEofA);
+  sqlite3VdbeAddOp2(v, OP_If, regEofB, addrEofB);
+
+  /* Implement the main merge loop
+  */
+  sqlite3VdbeResolveLabel(v, labelCmpr);
+  sqlite3VdbeAddOp4(v, OP_Permutation, 0, 0, 0, (char*)aPermute, P4_INTARRAY);
+  sqlite3VdbeAddOp4(v, OP_Compare, destA.iMem, destB.iMem, nOrderBy,
+                         (char*)pKeyMerge, P4_KEYINFO_HANDOFF);
+  sqlite3VdbeAddOp3(v, OP_Jump, addrAltB, addrAeqB, addrAgtB);
+
+  /* Release temporary registers
+  */
+  if( regPrev ){
+    sqlite3ReleaseTempRange(pParse, regPrev, nOrderBy+1);
+  }
+
+  /* Jump to the this point in order to terminate the query.
+  */
+  sqlite3VdbeResolveLabel(v, labelEnd);
+
+  /* Set the number of output columns
+  */
+  if( pDest->eDest==SRT_Output ){
+    Select *pFirst = pPrior;
+    while( pFirst->pPrior ) pFirst = pFirst->pPrior;
+    generateColumnNames(pParse, 0, pFirst->pEList);
+  }
+
+  /* Reassembly the compound query so that it will be freed correctly
+  ** by the calling function */
+  if( p->pPrior ){
+    sqlite3SelectDelete(db, p->pPrior);
+  }
+  p->pPrior = pPrior;
+
+  /*** TBD:  Insert subroutine calls to close cursors on incomplete
+  **** subqueries ****/
+  explainComposite(pParse, p->op, iSub1, iSub2, 0);
+  return SQLITE_OK;
+}
+#endif
+
+#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
+/* Forward Declarations */
+static void substExprList(sqlite3*, ExprList*, int, ExprList*);
+static void substSelect(sqlite3*, Select *, int, ExprList *);
+
+/*
+** Scan through the expression pExpr.  Replace every reference to
+** a column in table number iTable with a copy of the iColumn-th
+** entry in pEList.  (But leave references to the ROWID column 
+** unchanged.)
+**
+** This routine is part of the flattening procedure.  A subquery
+** whose result set is defined by pEList appears as entry in the
+** FROM clause of a SELECT such that the VDBE cursor assigned to that
+** FORM clause entry is iTable.  This routine make the necessary 
+** changes to pExpr so that it refers directly to the source table
+** of the subquery rather the result set of the subquery.
+*/
+static Expr *substExpr(
+  sqlite3 *db,        /* Report malloc errors to this connection */
+  Expr *pExpr,        /* Expr in which substitution occurs */
+  int iTable,         /* Table to be substituted */
+  ExprList *pEList    /* Substitute expressions */
+){
+  if( pExpr==0 ) return 0;
+  if( pExpr->op==TK_COLUMN && pExpr->iTable==iTable ){
+    if( pExpr->iColumn<0 ){
+      pExpr->op = TK_NULL;
+    }else{
+      Expr *pNew;
+      assert( pEList!=0 && pExpr->iColumn<pEList->nExpr );
+      assert( pExpr->pLeft==0 && pExpr->pRight==0 );
+      pNew = sqlite3ExprDup(db, pEList->a[pExpr->iColumn].pExpr, 0);
+      if( pNew && pExpr->pColl ){
+        pNew->pColl = pExpr->pColl;
+      }
+      sqlite3ExprDelete(db, pExpr);
+      pExpr = pNew;
+    }
+  }else{
+    pExpr->pLeft = substExpr(db, pExpr->pLeft, iTable, pEList);
+    pExpr->pRight = substExpr(db, pExpr->pRight, iTable, pEList);
+    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
+      substSelect(db, pExpr->x.pSelect, iTable, pEList);
+    }else{
+      substExprList(db, pExpr->x.pList, iTable, pEList);
+    }
+  }
+  return pExpr;
+}
+static void substExprList(
+  sqlite3 *db,         /* Report malloc errors here */
+  ExprList *pList,     /* List to scan and in which to make substitutes */
+  int iTable,          /* Table to be substituted */
+  ExprList *pEList     /* Substitute values */
+){
+  int i;
+  if( pList==0 ) return;
+  for(i=0; i<pList->nExpr; i++){
+    pList->a[i].pExpr = substExpr(db, pList->a[i].pExpr, iTable, pEList);
+  }
+}
+static void substSelect(
+  sqlite3 *db,         /* Report malloc errors here */
+  Select *p,           /* SELECT statement in which to make substitutions */
+  int iTable,          /* Table to be replaced */
+  ExprList *pEList     /* Substitute values */
+){
+  SrcList *pSrc;
+  struct SrcList_item *pItem;
+  int i;
+  if( !p ) return;
+  substExprList(db, p->pEList, iTable, pEList);
+  substExprList(db, p->pGroupBy, iTable, pEList);
+  substExprList(db, p->pOrderBy, iTable, pEList);
+  p->pHaving = substExpr(db, p->pHaving, iTable, pEList);
+  p->pWhere = substExpr(db, p->pWhere, iTable, pEList);
+  substSelect(db, p->pPrior, iTable, pEList);
+  pSrc = p->pSrc;
+  assert( pSrc );  /* Even for (SELECT 1) we have: pSrc!=0 but pSrc->nSrc==0 */
+  if( ALWAYS(pSrc) ){
+    for(i=pSrc->nSrc, pItem=pSrc->a; i>0; i--, pItem++){
+      substSelect(db, pItem->pSelect, iTable, pEList);
+    }
+  }
+}
+#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */
+
+#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
+/*
+** This routine attempts to flatten subqueries in order to speed
+** execution.  It returns 1 if it makes changes and 0 if no flattening
+** occurs.
+**
+** To understand the concept of flattening, consider the following
+** query:
+**
+**     SELECT a FROM (SELECT x+y AS a FROM t1 WHERE z<100) WHERE a>5
+**
+** The default way of implementing this query is to execute the
+** subquery first and store the results in a temporary table, then
+** run the outer query on that temporary table.  This requires two
+** passes over the data.  Furthermore, because the temporary table
+** has no indices, the WHERE clause on the outer query cannot be
+** optimized.
+**
+** This routine attempts to rewrite queries such as the above into
+** a single flat select, like this:
+**
+**     SELECT x+y AS a FROM t1 WHERE z<100 AND a>5
+**
+** The code generated for this simpification gives the same result
+** but only has to scan the data once.  And because indices might 
+** exist on the table t1, a complete scan of the data might be
+** avoided.
+**
+** Flattening is only attempted if all of the following are true:
+**
+**   (1)  The subquery and the outer query do not both use aggregates.
+**
+**   (2)  The subquery is not an aggregate or the outer query is not a join.
+**
+**   (3)  The subquery is not the right operand of a left outer join
+**        (Originally ticket #306.  Strengthened by ticket #3300)
+**
+**   (4)  The subquery is not DISTINCT.
+**
+**  (**)  At one point restrictions (4) and (5) defined a subset of DISTINCT
+**        sub-queries that were excluded from this optimization. Restriction 
+**        (4) has since been expanded to exclude all DISTINCT subqueries.
+**
+**   (6)  The subquery does not use aggregates or the outer query is not
+**        DISTINCT.
+**
+**   (7)  The subquery has a FROM clause.
+**
+**   (8)  The subquery does not use LIMIT or the outer query is not a join.
+**
+**   (9)  The subquery does not use LIMIT or the outer query does not use
+**        aggregates.
+**
+**  (10)  The subquery does not use aggregates or the outer query does not
+**        use LIMIT.
+**
+**  (11)  The subquery and the outer query do not both have ORDER BY clauses.
+**
+**  (**)  Not implemented.  Subsumed into restriction (3).  Was previously
+**        a separate restriction deriving from ticket #350.
+**
+**  (13)  The subquery and outer query do not both use LIMIT.
+**
+**  (14)  The subquery does not use OFFSET.
+**
+**  (15)  The outer query is not part of a compound select or the
+**        subquery does not have a LIMIT clause.
+**        (See ticket #2339 and ticket [02a8e81d44]).
+**
+**  (16)  The outer query is not an aggregate or the subquery does
+**        not contain ORDER BY.  (Ticket #2942)  This used to not matter
+**        until we introduced the group_concat() function.  
+**
+**  (17)  The sub-query is not a compound select, or it is a UNION ALL 
+**        compound clause made up entirely of non-aggregate queries, and 
+**        the parent query:
+**
+**          * is not itself part of a compound select,
+**          * is not an aggregate or DISTINCT query, and
+**          * has no other tables or sub-selects in the FROM clause.
+**
+**        The parent and sub-query may contain WHERE clauses. Subject to
+**        rules (11), (13) and (14), they may also contain ORDER BY,
+**        LIMIT and OFFSET clauses.
+**
+**  (18)  If the sub-query is a compound select, then all terms of the
+**        ORDER by clause of the parent must be simple references to 
+**        columns of the sub-query.
+**
+**  (19)  The subquery does not use LIMIT or the outer query does not
+**        have a WHERE clause.
+**
+**  (20)  If the sub-query is a compound select, then it must not use
+**        an ORDER BY clause.  Ticket #3773.  We could relax this constraint
+**        somewhat by saying that the terms of the ORDER BY clause must
+**        appear as unmodified result columns in the outer query.  But
+**        have other optimizations in mind to deal with that case.
+**
+**  (21)  The subquery does not use LIMIT or the outer query is not
+**        DISTINCT.  (See ticket [752e1646fc]).
+**
+** In this routine, the "p" parameter is a pointer to the outer query.
+** The subquery is p->pSrc->a[iFrom].  isAgg is true if the outer query
+** uses aggregates and subqueryIsAgg is true if the subquery uses aggregates.
+**
+** If flattening is not attempted, this routine is a no-op and returns 0.
+** If flattening is attempted this routine returns 1.
+**
+** All of the expression analysis must occur on both the outer query and
+** the subquery before this routine runs.
+*/
+static int flattenSubquery(
+  Parse *pParse,       /* Parsing context */
+  Select *p,           /* The parent or outer SELECT statement */
+  int iFrom,           /* Index in p->pSrc->a[] of the inner subquery */
+  int isAgg,           /* True if outer SELECT uses aggregate functions */
+  int subqueryIsAgg    /* True if the subquery uses aggregate functions */
+){
+  const char *zSavedAuthContext = pParse->zAuthContext;
+  Select *pParent;
+  Select *pSub;       /* The inner query or "subquery" */
+  Select *pSub1;      /* Pointer to the rightmost select in sub-query */
+  SrcList *pSrc;      /* The FROM clause of the outer query */
+  SrcList *pSubSrc;   /* The FROM clause of the subquery */
+  ExprList *pList;    /* The result set of the outer query */
+  int iParent;        /* VDBE cursor number of the pSub result set temp table */
+  int i;              /* Loop counter */
+  Expr *pWhere;                    /* The WHERE clause */
+  struct SrcList_item *pSubitem;   /* The subquery */
+  sqlite3 *db = pParse->db;
+
+  /* Check to see if flattening is permitted.  Return 0 if not.
+  */
+  assert( p!=0 );
+  assert( p->pPrior==0 );  /* Unable to flatten compound queries */
+  if( db->flags & SQLITE_QueryFlattener ) return 0;
+  pSrc = p->pSrc;
+  assert( pSrc && iFrom>=0 && iFrom<pSrc->nSrc );
+  pSubitem = &pSrc->a[iFrom];
+  iParent = pSubitem->iCursor;
+  pSub = pSubitem->pSelect;
+  assert( pSub!=0 );
+  if( isAgg && subqueryIsAgg ) return 0;                 /* Restriction (1)  */
+  if( subqueryIsAgg && pSrc->nSrc>1 ) return 0;          /* Restriction (2)  */
+  pSubSrc = pSub->pSrc;
+  assert( pSubSrc );
+  /* Prior to version 3.1.2, when LIMIT and OFFSET had to be simple constants,
+  ** not arbitrary expresssions, we allowed some combining of LIMIT and OFFSET
+  ** because they could be computed at compile-time.  But when LIMIT and OFFSET
+  ** became arbitrary expressions, we were forced to add restrictions (13)
+  ** and (14). */
+  if( pSub->pLimit && p->pLimit ) return 0;              /* Restriction (13) */
+  if( pSub->pOffset ) return 0;                          /* Restriction (14) */
+  if( p->pRightmost && pSub->pLimit ){
+    return 0;                                            /* Restriction (15) */
+  }
+  if( pSubSrc->nSrc==0 ) return 0;                       /* Restriction (7)  */
+  if( pSub->selFlags & SF_Distinct ) return 0;           /* Restriction (5)  */
+  if( pSub->pLimit && (pSrc->nSrc>1 || isAgg) ){
+     return 0;         /* Restrictions (8)(9) */
+  }
+  if( (p->selFlags & SF_Distinct)!=0 && subqueryIsAgg ){
+     return 0;         /* Restriction (6)  */
+  }
+  if( p->pOrderBy && pSub->pOrderBy ){
+     return 0;                                           /* Restriction (11) */
+  }
+  if( isAgg && pSub->pOrderBy ) return 0;                /* Restriction (16) */
+  if( pSub->pLimit && p->pWhere ) return 0;              /* Restriction (19) */
+  if( pSub->pLimit && (p->selFlags & SF_Distinct)!=0 ){
+     return 0;         /* Restriction (21) */
+  }
+
+  /* OBSOLETE COMMENT 1:
+  ** Restriction 3:  If the subquery is a join, make sure the subquery is 
+  ** not used as the right operand of an outer join.  Examples of why this
+  ** is not allowed:
+  **
+  **         t1 LEFT OUTER JOIN (t2 JOIN t3)
+  **
+  ** If we flatten the above, we would get
+  **
+  **         (t1 LEFT OUTER JOIN t2) JOIN t3
+  **
+  ** which is not at all the same thing.
+  **
+  ** OBSOLETE COMMENT 2:
+  ** Restriction 12:  If the subquery is the right operand of a left outer
+  ** join, make sure the subquery has no WHERE clause.
+  ** An examples of why this is not allowed:
+  **
+  **         t1 LEFT OUTER JOIN (SELECT * FROM t2 WHERE t2.x>0)
+  **
+  ** If we flatten the above, we would get
+  **
+  **         (t1 LEFT OUTER JOIN t2) WHERE t2.x>0
+  **
+  ** But the t2.x>0 test will always fail on a NULL row of t2, which
+  ** effectively converts the OUTER JOIN into an INNER JOIN.
+  **
+  ** THIS OVERRIDES OBSOLETE COMMENTS 1 AND 2 ABOVE:
+  ** Ticket #3300 shows that flattening the right term of a LEFT JOIN
+  ** is fraught with danger.  Best to avoid the whole thing.  If the
+  ** subquery is the right term of a LEFT JOIN, then do not flatten.
+  */
+  if( (pSubitem->jointype & JT_OUTER)!=0 ){
+    return 0;
+  }
+
+  /* Restriction 17: If the sub-query is a compound SELECT, then it must
+  ** use only the UNION ALL operator. And none of the simple select queries
+  ** that make up the compound SELECT are allowed to be aggregate or distinct
+  ** queries.
+  */
+  if( pSub->pPrior ){
+    if( pSub->pOrderBy ){
+      return 0;  /* Restriction 20 */
+    }
+    if( isAgg || (p->selFlags & SF_Distinct)!=0 || pSrc->nSrc!=1 ){
+      return 0;
+    }
+    for(pSub1=pSub; pSub1; pSub1=pSub1->pPrior){
+      testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct );
+      testcase( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))==SF_Aggregate );
+      if( (pSub1->selFlags & (SF_Distinct|SF_Aggregate))!=0
+       || (pSub1->pPrior && pSub1->op!=TK_ALL) 
+       || NEVER(pSub1->pSrc==0) || pSub1->pSrc->nSrc!=1
+      ){
+        return 0;
+      }
+    }
+
+    /* Restriction 18. */
+    if( p->pOrderBy ){
+      int ii;
+      for(ii=0; ii<p->pOrderBy->nExpr; ii++){
+        if( p->pOrderBy->a[ii].iCol==0 ) return 0;
+      }
+    }
+  }
+
+  /***** If we reach this point, flattening is permitted. *****/
+
+  /* Authorize the subquery */
+  pParse->zAuthContext = pSubitem->zName;
+  sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0);
+  pParse->zAuthContext = zSavedAuthContext;
+
+  /* If the sub-query is a compound SELECT statement, then (by restrictions
+  ** 17 and 18 above) it must be a UNION ALL and the parent query must 
+  ** be of the form:
+  **
+  **     SELECT <expr-list> FROM (<sub-query>) <where-clause> 
+  **
+  ** followed by any ORDER BY, LIMIT and/or OFFSET clauses. This block
+  ** creates N-1 copies of the parent query without any ORDER BY, LIMIT or 
+  ** OFFSET clauses and joins them to the left-hand-side of the original
+  ** using UNION ALL operators. In this case N is the number of simple
+  ** select statements in the compound sub-query.
+  **
+  ** Example:
+  **
+  **     SELECT a+1 FROM (
+  **        SELECT x FROM tab
+  **        UNION ALL
+  **        SELECT y FROM tab
+  **        UNION ALL
+  **        SELECT abs(z*2) FROM tab2
+  **     ) WHERE a!=5 ORDER BY 1
+  **
+  ** Transformed into:
+  **
+  **     SELECT x+1 FROM tab WHERE x+1!=5
+  **     UNION ALL
+  **     SELECT y+1 FROM tab WHERE y+1!=5
+  **     UNION ALL
+  **     SELECT abs(z*2)+1 FROM tab2 WHERE abs(z*2)+1!=5
+  **     ORDER BY 1
+  **
+  ** We call this the "compound-subquery flattening".
+  */
+  for(pSub=pSub->pPrior; pSub; pSub=pSub->pPrior){
+    Select *pNew;
+    ExprList *pOrderBy = p->pOrderBy;
+    Expr *pLimit = p->pLimit;
+    Select *pPrior = p->pPrior;
+    p->pOrderBy = 0;
+    p->pSrc = 0;
+    p->pPrior = 0;
+    p->pLimit = 0;
+    pNew = sqlite3SelectDup(db, p, 0);
+    p->pLimit = pLimit;
+    p->pOrderBy = pOrderBy;
+    p->pSrc = pSrc;
+    p->op = TK_ALL;
+    p->pRightmost = 0;
+    if( pNew==0 ){
+      pNew = pPrior;
+    }else{
+      pNew->pPrior = pPrior;
+      pNew->pRightmost = 0;
+    }
+    p->pPrior = pNew;
+    if( db->mallocFailed ) return 1;
+  }
+
+  /* Begin flattening the iFrom-th entry of the FROM clause 
+  ** in the outer query.
+  */
+  pSub = pSub1 = pSubitem->pSelect;
+
+  /* Delete the transient table structure associated with the
+  ** subquery
+  */
+  sqlite3DbFree(db, pSubitem->zDatabase);
+  sqlite3DbFree(db, pSubitem->zName);
+  sqlite3DbFree(db, pSubitem->zAlias);
+  pSubitem->zDatabase = 0;
+  pSubitem->zName = 0;
+  pSubitem->zAlias = 0;
+  pSubitem->pSelect = 0;
+
+  /* Defer deleting the Table object associated with the
+  ** subquery until code generation is
+  ** complete, since there may still exist Expr.pTab entries that
+  ** refer to the subquery even after flattening.  Ticket #3346.
+  **
+  ** pSubitem->pTab is always non-NULL by test restrictions and tests above.
+  */
+  if( ALWAYS(pSubitem->pTab!=0) ){
+    Table *pTabToDel = pSubitem->pTab;
+    if( pTabToDel->nRef==1 ){
+      Parse *pToplevel = sqlite3ParseToplevel(pParse);
+      pTabToDel->pNextZombie = pToplevel->pZombieTab;
+      pToplevel->pZombieTab = pTabToDel;
+    }else{
+      pTabToDel->nRef--;
+    }
+    pSubitem->pTab = 0;
+  }
+
+  /* The following loop runs once for each term in a compound-subquery
+  ** flattening (as described above).  If we are doing a different kind
+  ** of flattening - a flattening other than a compound-subquery flattening -
+  ** then this loop only runs once.
+  **
+  ** This loop moves all of the FROM elements of the subquery into the
+  ** the FROM clause of the outer query.  Before doing this, remember
+  ** the cursor number for the original outer query FROM element in
+  ** iParent.  The iParent cursor will never be used.  Subsequent code
+  ** will scan expressions looking for iParent references and replace
+  ** those references with expressions that resolve to the subquery FROM
+  ** elements we are now copying in.
+  */
+  for(pParent=p; pParent; pParent=pParent->pPrior, pSub=pSub->pPrior){
+    int nSubSrc;
+    u8 jointype = 0;
+    pSubSrc = pSub->pSrc;     /* FROM clause of subquery */
+    nSubSrc = pSubSrc->nSrc;  /* Number of terms in subquery FROM clause */
+    pSrc = pParent->pSrc;     /* FROM clause of the outer query */
+
+    if( pSrc ){
+      assert( pParent==p );  /* First time through the loop */
+      jointype = pSubitem->jointype;
+    }else{
+      assert( pParent!=p );  /* 2nd and subsequent times through the loop */
+      pSrc = pParent->pSrc = sqlite3SrcListAppend(db, 0, 0, 0);
+      if( pSrc==0 ){
+        assert( db->mallocFailed );
+        break;
+      }
+    }
+
+    /* The subquery uses a single slot of the FROM clause of the outer
+    ** query.  If the subquery has more than one element in its FROM clause,
+    ** then expand the outer query to make space for it to hold all elements
+    ** of the subquery.
+    **
+    ** Example:
+    **
+    **    SELECT * FROM tabA, (SELECT * FROM sub1, sub2), tabB;
+    **
+    ** The outer query has 3 slots in its FROM clause.  One slot of the
+    ** outer query (the middle slot) is used by the subquery.  The next
+    ** block of code will expand the out query to 4 slots.  The middle
+    ** slot is expanded to two slots in order to make space for the
+    ** two elements in the FROM clause of the subquery.
+    */
+    if( nSubSrc>1 ){
+      pParent->pSrc = pSrc = sqlite3SrcListEnlarge(db, pSrc, nSubSrc-1,iFrom+1);
+      if( db->mallocFailed ){
+        break;
+      }
+    }
+
+    /* Transfer the FROM clause terms from the subquery into the
+    ** outer query.
+    */
+    for(i=0; i<nSubSrc; i++){
+      sqlite3IdListDelete(db, pSrc->a[i+iFrom].pUsing);
+      pSrc->a[i+iFrom] = pSubSrc->a[i];
+      memset(&pSubSrc->a[i], 0, sizeof(pSubSrc->a[i]));
+    }
+    pSrc->a[iFrom].jointype = jointype;
+  
+    /* Now begin substituting subquery result set expressions for 
+    ** references to the iParent in the outer query.
+    ** 
+    ** Example:
+    **
+    **   SELECT a+5, b*10 FROM (SELECT x*3 AS a, y+10 AS b FROM t1) WHERE a>b;
+    **   \                     \_____________ subquery __________/          /
+    **    \_____________________ outer query ______________________________/
+    **
+    ** We look at every expression in the outer query and every place we see
+    ** "a" we substitute "x*3" and every place we see "b" we substitute "y+10".
+    */
+    pList = pParent->pEList;
+    for(i=0; i<pList->nExpr; i++){
+      if( pList->a[i].zName==0 ){
+        const char *zSpan = pList->a[i].zSpan;
+        if( ALWAYS(zSpan) ){
+          pList->a[i].zName = sqlite3DbStrDup(db, zSpan);
+        }
+      }
+    }
+    substExprList(db, pParent->pEList, iParent, pSub->pEList);
+    if( isAgg ){
+      substExprList(db, pParent->pGroupBy, iParent, pSub->pEList);
+      pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
+    }
+    if( pSub->pOrderBy ){
+      assert( pParent->pOrderBy==0 );
+      pParent->pOrderBy = pSub->pOrderBy;
+      pSub->pOrderBy = 0;
+    }else if( pParent->pOrderBy ){
+      substExprList(db, pParent->pOrderBy, iParent, pSub->pEList);
+    }
+    if( pSub->pWhere ){
+      pWhere = sqlite3ExprDup(db, pSub->pWhere, 0);
+    }else{
+      pWhere = 0;
+    }
+    if( subqueryIsAgg ){
+      assert( pParent->pHaving==0 );
+      pParent->pHaving = pParent->pWhere;
+      pParent->pWhere = pWhere;
+      pParent->pHaving = substExpr(db, pParent->pHaving, iParent, pSub->pEList);
+      pParent->pHaving = sqlite3ExprAnd(db, pParent->pHaving, 
+                                  sqlite3ExprDup(db, pSub->pHaving, 0));
+      assert( pParent->pGroupBy==0 );
+      pParent->pGroupBy = sqlite3ExprListDup(db, pSub->pGroupBy, 0);
+    }else{
+      pParent->pWhere = substExpr(db, pParent->pWhere, iParent, pSub->pEList);
+      pParent->pWhere = sqlite3ExprAnd(db, pParent->pWhere, pWhere);
+    }
+  
+    /* The flattened query is distinct if either the inner or the
+    ** outer query is distinct. 
+    */
+    pParent->selFlags |= pSub->selFlags & SF_Distinct;
+  
+    /*
+    ** SELECT ... FROM (SELECT ... LIMIT a OFFSET b) LIMIT x OFFSET y;
+    **
+    ** One is tempted to try to add a and b to combine the limits.  But this
+    ** does not work if either limit is negative.
+    */
+    if( pSub->pLimit ){
+      pParent->pLimit = pSub->pLimit;
+      pSub->pLimit = 0;
+    }
+  }
+
+  /* Finially, delete what is left of the subquery and return
+  ** success.
+  */
+  sqlite3SelectDelete(db, pSub1);
+
+  return 1;
+}
+#endif /* !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW) */
+
+/*
+** Analyze the SELECT statement passed as an argument to see if it
+** is a min() or max() query. Return WHERE_ORDERBY_MIN or WHERE_ORDERBY_MAX if 
+** it is, or 0 otherwise. At present, a query is considered to be
+** a min()/max() query if:
+**
+**   1. There is a single object in the FROM clause.
+**
+**   2. There is a single expression in the result set, and it is
+**      either min(x) or max(x), where x is a column reference.
+*/
+static u8 minMaxQuery(Select *p){
+  Expr *pExpr;
+  ExprList *pEList = p->pEList;
+
+  if( pEList->nExpr!=1 ) return WHERE_ORDERBY_NORMAL;
+  pExpr = pEList->a[0].pExpr;
+  if( pExpr->op!=TK_AGG_FUNCTION ) return 0;
+  if( NEVER(ExprHasProperty(pExpr, EP_xIsSelect)) ) return 0;
+  pEList = pExpr->x.pList;
+  if( pEList==0 || pEList->nExpr!=1 ) return 0;
+  if( pEList->a[0].pExpr->op!=TK_AGG_COLUMN ) return WHERE_ORDERBY_NORMAL;
+  assert( !ExprHasProperty(pExpr, EP_IntValue) );
+  if( sqlite3StrICmp(pExpr->u.zToken,"min")==0 ){
+    return WHERE_ORDERBY_MIN;
+  }else if( sqlite3StrICmp(pExpr->u.zToken,"max")==0 ){
+    return WHERE_ORDERBY_MAX;
+  }
+  return WHERE_ORDERBY_NORMAL;
+}
+
+/*
+** The select statement passed as the first argument is an aggregate query.
+** The second argment is the associated aggregate-info object. This 
+** function tests if the SELECT is of the form:
+**
+**   SELECT count(*) FROM <tbl>
+**
+** where table is a database table, not a sub-select or view. If the query
+** does match this pattern, then a pointer to the Table object representing
+** <tbl> is returned. Otherwise, 0 is returned.
+*/
+static Table *isSimpleCount(Select *p, AggInfo *pAggInfo){
+  Table *pTab;
+  Expr *pExpr;
+
+  assert( !p->pGroupBy );
+
+  if( p->pWhere || p->pEList->nExpr!=1 
+   || p->pSrc->nSrc!=1 || p->pSrc->a[0].pSelect
+  ){
+    return 0;
+  }
+  pTab = p->pSrc->a[0].pTab;
+  pExpr = p->pEList->a[0].pExpr;
+  assert( pTab && !pTab->pSelect && pExpr );
+
+  if( IsVirtual(pTab) ) return 0;
+  if( pExpr->op!=TK_AGG_FUNCTION ) return 0;
+  if( (pAggInfo->aFunc[0].pFunc->flags&SQLITE_FUNC_COUNT)==0 ) return 0;
+  if( pExpr->flags&EP_Distinct ) return 0;
+
+  return pTab;
+}
+
+/*
+** If the source-list item passed as an argument was augmented with an
+** INDEXED BY clause, then try to locate the specified index. If there
+** was such a clause and the named index cannot be found, return 
+** SQLITE_ERROR and leave an error in pParse. Otherwise, populate 
+** pFrom->pIndex and return SQLITE_OK.
+*/
+SQLITE_PRIVATE int sqlite3IndexedByLookup(Parse *pParse, struct SrcList_item *pFrom){
+  if( pFrom->pTab && pFrom->zIndex ){
+    Table *pTab = pFrom->pTab;
+    char *zIndex = pFrom->zIndex;
+    Index *pIdx;
+    for(pIdx=pTab->pIndex; 
+        pIdx && sqlite3StrICmp(pIdx->zName, zIndex); 
+        pIdx=pIdx->pNext
+    );
+    if( !pIdx ){
+      sqlite3ErrorMsg(pParse, "no such index: %s", zIndex, 0);
+      pParse->checkSchema = 1;
+      return SQLITE_ERROR;
+    }
+    pFrom->pIndex = pIdx;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** This routine is a Walker callback for "expanding" a SELECT statement.
+** "Expanding" means to do the following:
+**
+**    (1)  Make sure VDBE cursor numbers have been assigned to every
+**         element of the FROM clause.
+**
+**    (2)  Fill in the pTabList->a[].pTab fields in the SrcList that 
+**         defines FROM clause.  When views appear in the FROM clause,
+**         fill pTabList->a[].pSelect with a copy of the SELECT statement
+**         that implements the view.  A copy is made of the view's SELECT
+**         statement so that we can freely modify or delete that statement
+**         without worrying about messing up the presistent representation
+**         of the view.
+**
+**    (3)  Add terms to the WHERE clause to accomodate the NATURAL keyword
+**         on joins and the ON and USING clause of joins.
+**
+**    (4)  Scan the list of columns in the result set (pEList) looking
+**         for instances of the "*" operator or the TABLE.* operator.
+**         If found, expand each "*" to be every column in every table
+**         and TABLE.* to be every column in TABLE.
+**
+*/
+static int selectExpander(Walker *pWalker, Select *p){
+  Parse *pParse = pWalker->pParse;
+  int i, j, k;
+  SrcList *pTabList;
+  ExprList *pEList;
+  struct SrcList_item *pFrom;
+  sqlite3 *db = pParse->db;
+
+  if( db->mallocFailed  ){
+    return WRC_Abort;
+  }
+  if( NEVER(p->pSrc==0) || (p->selFlags & SF_Expanded)!=0 ){
+    return WRC_Prune;
+  }
+  p->selFlags |= SF_Expanded;
+  pTabList = p->pSrc;
+  pEList = p->pEList;
+
+  /* Make sure cursor numbers have been assigned to all entries in
+  ** the FROM clause of the SELECT statement.
+  */
+  sqlite3SrcListAssignCursors(pParse, pTabList);
+
+  /* Look up every table named in the FROM clause of the select.  If
+  ** an entry of the FROM clause is a subquery instead of a table or view,
+  ** then create a transient table structure to describe the subquery.
+  */
+  for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
+    Table *pTab;
+    if( pFrom->pTab!=0 ){
+      /* This statement has already been prepared.  There is no need
+      ** to go further. */
+      assert( i==0 );
+      return WRC_Prune;
+    }
+    if( pFrom->zName==0 ){
+#ifndef SQLITE_OMIT_SUBQUERY
+      Select *pSel = pFrom->pSelect;
+      /* A sub-query in the FROM clause of a SELECT */
+      assert( pSel!=0 );
+      assert( pFrom->pTab==0 );
+      sqlite3WalkSelect(pWalker, pSel);
+      pFrom->pTab = pTab = sqlite3DbMallocZero(db, sizeof(Table));
+      if( pTab==0 ) return WRC_Abort;
+      pTab->nRef = 1;
+      pTab->zName = sqlite3MPrintf(db, "sqlite_subquery_%p_", (void*)pTab);
+      while( pSel->pPrior ){ pSel = pSel->pPrior; }
+      selectColumnsFromExprList(pParse, pSel->pEList, &pTab->nCol, &pTab->aCol);
+      pTab->iPKey = -1;
+      pTab->nRowEst = 1000000;
+      pTab->tabFlags |= TF_Ephemeral;
+#endif
+    }else{
+      /* An ordinary table or view name in the FROM clause */
+      assert( pFrom->pTab==0 );
+      pFrom->pTab = pTab = 
+        sqlite3LocateTable(pParse,0,pFrom->zName,pFrom->zDatabase);
+      if( pTab==0 ) return WRC_Abort;
+      pTab->nRef++;
+#if !defined(SQLITE_OMIT_VIEW) || !defined (SQLITE_OMIT_VIRTUALTABLE)
+      if( pTab->pSelect || IsVirtual(pTab) ){
+        /* We reach here if the named table is a really a view */
+        if( sqlite3ViewGetColumnNames(pParse, pTab) ) return WRC_Abort;
+        assert( pFrom->pSelect==0 );
+        pFrom->pSelect = sqlite3SelectDup(db, pTab->pSelect, 0);
+        sqlite3WalkSelect(pWalker, pFrom->pSelect);
+      }
+#endif
+    }
+
+    /* Locate the index named by the INDEXED BY clause, if any. */
+    if( sqlite3IndexedByLookup(pParse, pFrom) ){
+      return WRC_Abort;
+    }
+  }
+
+  /* Process NATURAL keywords, and ON and USING clauses of joins.
+  */
+  if( db->mallocFailed || sqliteProcessJoin(pParse, p) ){
+    return WRC_Abort;
+  }
+
+  /* For every "*" that occurs in the column list, insert the names of
+  ** all columns in all tables.  And for every TABLE.* insert the names
+  ** of all columns in TABLE.  The parser inserted a special expression
+  ** with the TK_ALL operator for each "*" that it found in the column list.
+  ** The following code just has to locate the TK_ALL expressions and expand
+  ** each one to the list of all columns in all tables.
+  **
+  ** The first loop just checks to see if there are any "*" operators
+  ** that need expanding.
+  */
+  for(k=0; k<pEList->nExpr; k++){
+    Expr *pE = pEList->a[k].pExpr;
+    if( pE->op==TK_ALL ) break;
+    assert( pE->op!=TK_DOT || pE->pRight!=0 );
+    assert( pE->op!=TK_DOT || (pE->pLeft!=0 && pE->pLeft->op==TK_ID) );
+    if( pE->op==TK_DOT && pE->pRight->op==TK_ALL ) break;
+  }
+  if( k<pEList->nExpr ){
+    /*
+    ** If we get here it means the result set contains one or more "*"
+    ** operators that need to be expanded.  Loop through each expression
+    ** in the result set and expand them one by one.
+    */
+    struct ExprList_item *a = pEList->a;
+    ExprList *pNew = 0;
+    int flags = pParse->db->flags;
+    int longNames = (flags & SQLITE_FullColNames)!=0
+                      && (flags & SQLITE_ShortColNames)==0;
+
+    for(k=0; k<pEList->nExpr; k++){
+      Expr *pE = a[k].pExpr;
+      assert( pE->op!=TK_DOT || pE->pRight!=0 );
+      if( pE->op!=TK_ALL && (pE->op!=TK_DOT || pE->pRight->op!=TK_ALL) ){
+        /* This particular expression does not need to be expanded.
+        */
+        pNew = sqlite3ExprListAppend(pParse, pNew, a[k].pExpr);
+        if( pNew ){
+          pNew->a[pNew->nExpr-1].zName = a[k].zName;
+          pNew->a[pNew->nExpr-1].zSpan = a[k].zSpan;
+          a[k].zName = 0;
+          a[k].zSpan = 0;
+        }
+        a[k].pExpr = 0;
+      }else{
+        /* This expression is a "*" or a "TABLE.*" and needs to be
+        ** expanded. */
+        int tableSeen = 0;      /* Set to 1 when TABLE matches */
+        char *zTName;            /* text of name of TABLE */
+        if( pE->op==TK_DOT ){
+          assert( pE->pLeft!=0 );
+          assert( !ExprHasProperty(pE->pLeft, EP_IntValue) );
+          zTName = pE->pLeft->u.zToken;
+        }else{
+          zTName = 0;
+        }
+        for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
+          Table *pTab = pFrom->pTab;
+          char *zTabName = pFrom->zAlias;
+          if( zTabName==0 ){
+            zTabName = pTab->zName;
+          }
+          if( db->mallocFailed ) break;
+          if( zTName && sqlite3StrICmp(zTName, zTabName)!=0 ){
+            continue;
+          }
+          tableSeen = 1;
+          for(j=0; j<pTab->nCol; j++){
+            Expr *pExpr, *pRight;
+            char *zName = pTab->aCol[j].zName;
+            char *zColname;  /* The computed column name */
+            char *zToFree;   /* Malloced string that needs to be freed */
+            Token sColname;  /* Computed column name as a token */
+
+            /* If a column is marked as 'hidden' (currently only possible
+            ** for virtual tables), do not include it in the expanded
+            ** result-set list.
+            */
+            if( IsHiddenColumn(&pTab->aCol[j]) ){
+              assert(IsVirtual(pTab));
+              continue;
+            }
+
+            if( i>0 && zTName==0 ){
+              if( (pFrom->jointype & JT_NATURAL)!=0
+                && tableAndColumnIndex(pTabList, i, zName, 0, 0)
+              ){
+                /* In a NATURAL join, omit the join columns from the 
+                ** table to the right of the join */
+                continue;
+              }
+              if( sqlite3IdListIndex(pFrom->pUsing, zName)>=0 ){
+                /* In a join with a USING clause, omit columns in the
+                ** using clause from the table on the right. */
+                continue;
+              }
+            }
+            pRight = sqlite3Expr(db, TK_ID, zName);
+            zColname = zName;
+            zToFree = 0;
+            if( longNames || pTabList->nSrc>1 ){
+              Expr *pLeft;
+              pLeft = sqlite3Expr(db, TK_ID, zTabName);
+              pExpr = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
+              if( longNames ){
+                zColname = sqlite3MPrintf(db, "%s.%s", zTabName, zName);
+                zToFree = zColname;
+              }
+            }else{
+              pExpr = pRight;
+            }
+            pNew = sqlite3ExprListAppend(pParse, pNew, pExpr);
+            sColname.z = zColname;
+            sColname.n = sqlite3Strlen30(zColname);
+            sqlite3ExprListSetName(pParse, pNew, &sColname, 0);
+            sqlite3DbFree(db, zToFree);
+          }
+        }
+        if( !tableSeen ){
+          if( zTName ){
+            sqlite3ErrorMsg(pParse, "no such table: %s", zTName);
+          }else{
+            sqlite3ErrorMsg(pParse, "no tables specified");
+          }
+        }
+      }
+    }
+    sqlite3ExprListDelete(db, pEList);
+    p->pEList = pNew;
+  }
+#if SQLITE_MAX_COLUMN
+  if( p->pEList && p->pEList->nExpr>db->aLimit[SQLITE_LIMIT_COLUMN] ){
+    sqlite3ErrorMsg(pParse, "too many columns in result set");
+  }
+#endif
+  return WRC_Continue;
+}
+
+/*
+** No-op routine for the parse-tree walker.
+**
+** When this routine is the Walker.xExprCallback then expression trees
+** are walked without any actions being taken at each node.  Presumably,
+** when this routine is used for Walker.xExprCallback then 
+** Walker.xSelectCallback is set to do something useful for every 
+** subquery in the parser tree.
+*/
+static int exprWalkNoop(Walker *NotUsed, Expr *NotUsed2){
+  UNUSED_PARAMETER2(NotUsed, NotUsed2);
+  return WRC_Continue;
+}
+
+/*
+** This routine "expands" a SELECT statement and all of its subqueries.
+** For additional information on what it means to "expand" a SELECT
+** statement, see the comment on the selectExpand worker callback above.
+**
+** Expanding a SELECT statement is the first step in processing a
+** SELECT statement.  The SELECT statement must be expanded before
+** name resolution is performed.
+**
+** If anything goes wrong, an error message is written into pParse.
+** The calling function can detect the problem by looking at pParse->nErr
+** and/or pParse->db->mallocFailed.
+*/
+static void sqlite3SelectExpand(Parse *pParse, Select *pSelect){
+  Walker w;
+  w.xSelectCallback = selectExpander;
+  w.xExprCallback = exprWalkNoop;
+  w.pParse = pParse;
+  sqlite3WalkSelect(&w, pSelect);
+}
+
+
+#ifndef SQLITE_OMIT_SUBQUERY
+/*
+** This is a Walker.xSelectCallback callback for the sqlite3SelectTypeInfo()
+** interface.
+**
+** For each FROM-clause subquery, add Column.zType and Column.zColl
+** information to the Table structure that represents the result set
+** of that subquery.
+**
+** The Table structure that represents the result set was constructed
+** by selectExpander() but the type and collation information was omitted
+** at that point because identifiers had not yet been resolved.  This
+** routine is called after identifier resolution.
+*/
+static int selectAddSubqueryTypeInfo(Walker *pWalker, Select *p){
+  Parse *pParse;
+  int i;
+  SrcList *pTabList;
+  struct SrcList_item *pFrom;
+
+  assert( p->selFlags & SF_Resolved );
+  if( (p->selFlags & SF_HasTypeInfo)==0 ){
+    p->selFlags |= SF_HasTypeInfo;
+    pParse = pWalker->pParse;
+    pTabList = p->pSrc;
+    for(i=0, pFrom=pTabList->a; i<pTabList->nSrc; i++, pFrom++){
+      Table *pTab = pFrom->pTab;
+      if( ALWAYS(pTab!=0) && (pTab->tabFlags & TF_Ephemeral)!=0 ){
+        /* A sub-query in the FROM clause of a SELECT */
+        Select *pSel = pFrom->pSelect;
+        assert( pSel );
+        while( pSel->pPrior ) pSel = pSel->pPrior;
+        selectAddColumnTypeAndCollation(pParse, pTab->nCol, pTab->aCol, pSel);
+      }
+    }
+  }
+  return WRC_Continue;
+}
+#endif
+
+
+/*
+** This routine adds datatype and collating sequence information to
+** the Table structures of all FROM-clause subqueries in a
+** SELECT statement.
+**
+** Use this routine after name resolution.
+*/
+static void sqlite3SelectAddTypeInfo(Parse *pParse, Select *pSelect){
+#ifndef SQLITE_OMIT_SUBQUERY
+  Walker w;
+  w.xSelectCallback = selectAddSubqueryTypeInfo;
+  w.xExprCallback = exprWalkNoop;
+  w.pParse = pParse;
+  sqlite3WalkSelect(&w, pSelect);
+#endif
+}
+
+
+/*
+** This routine sets of a SELECT statement for processing.  The
+** following is accomplished:
+**
+**     *  VDBE Cursor numbers are assigned to all FROM-clause terms.
+**     *  Ephemeral Table objects are created for all FROM-clause subqueries.
+**     *  ON and USING clauses are shifted into WHERE statements
+**     *  Wildcards "*" and "TABLE.*" in result sets are expanded.
+**     *  Identifiers in expression are matched to tables.
+**
+** This routine acts recursively on all subqueries within the SELECT.
+*/
+SQLITE_PRIVATE void sqlite3SelectPrep(
+  Parse *pParse,         /* The parser context */
+  Select *p,             /* The SELECT statement being coded. */
+  NameContext *pOuterNC  /* Name context for container */
+){
+  sqlite3 *db;
+  if( NEVER(p==0) ) return;
+  db = pParse->db;
+  if( p->selFlags & SF_HasTypeInfo ) return;
+  sqlite3SelectExpand(pParse, p);
+  if( pParse->nErr || db->mallocFailed ) return;
+  sqlite3ResolveSelectNames(pParse, p, pOuterNC);
+  if( pParse->nErr || db->mallocFailed ) return;
+  sqlite3SelectAddTypeInfo(pParse, p);
+}
+
+/*
+** Reset the aggregate accumulator.
+**
+** The aggregate accumulator is a set of memory cells that hold
+** intermediate results while calculating an aggregate.  This
+** routine simply stores NULLs in all of those memory cells.
+*/
+static void resetAccumulator(Parse *pParse, AggInfo *pAggInfo){
+  Vdbe *v = pParse->pVdbe;
+  int i;
+  struct AggInfo_func *pFunc;
+  if( pAggInfo->nFunc+pAggInfo->nColumn==0 ){
+    return;
+  }
+  for(i=0; i<pAggInfo->nColumn; i++){
+    sqlite3VdbeAddOp2(v, OP_Null, 0, pAggInfo->aCol[i].iMem);
+  }
+  for(pFunc=pAggInfo->aFunc, i=0; i<pAggInfo->nFunc; i++, pFunc++){
+    sqlite3VdbeAddOp2(v, OP_Null, 0, pFunc->iMem);
+    if( pFunc->iDistinct>=0 ){
+      Expr *pE = pFunc->pExpr;
+      assert( !ExprHasProperty(pE, EP_xIsSelect) );
+      if( pE->x.pList==0 || pE->x.pList->nExpr!=1 ){
+        sqlite3ErrorMsg(pParse, "DISTINCT aggregates must have exactly one "
+           "argument");
+        pFunc->iDistinct = -1;
+      }else{
+        KeyInfo *pKeyInfo = keyInfoFromExprList(pParse, pE->x.pList);
+        sqlite3VdbeAddOp4(v, OP_OpenEphemeral, pFunc->iDistinct, 0, 0,
+                          (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
+      }
+    }
+  }
+}
+
+/*
+** Invoke the OP_AggFinalize opcode for every aggregate function
+** in the AggInfo structure.
+*/
+static void finalizeAggFunctions(Parse *pParse, AggInfo *pAggInfo){
+  Vdbe *v = pParse->pVdbe;
+  int i;
+  struct AggInfo_func *pF;
+  for(i=0, pF=pAggInfo->aFunc; i<pAggInfo->nFunc; i++, pF++){
+    ExprList *pList = pF->pExpr->x.pList;
+    assert( !ExprHasProperty(pF->pExpr, EP_xIsSelect) );
+    sqlite3VdbeAddOp4(v, OP_AggFinal, pF->iMem, pList ? pList->nExpr : 0, 0,
+                      (void*)pF->pFunc, P4_FUNCDEF);
+  }
+}
+
+/*
+** Update the accumulator memory cells for an aggregate based on
+** the current cursor position.
+*/
+static void updateAccumulator(Parse *pParse, AggInfo *pAggInfo){
+  Vdbe *v = pParse->pVdbe;
+  int i;
+  struct AggInfo_func *pF;
+  struct AggInfo_col *pC;
+
+  pAggInfo->directMode = 1;
+  sqlite3ExprCacheClear(pParse);
+  for(i=0, pF=pAggInfo->aFunc; i<pAggInfo->nFunc; i++, pF++){
+    int nArg;
+    int addrNext = 0;
+    int regAgg;
+    ExprList *pList = pF->pExpr->x.pList;
+    assert( !ExprHasProperty(pF->pExpr, EP_xIsSelect) );
+    if( pList ){
+      nArg = pList->nExpr;
+      regAgg = sqlite3GetTempRange(pParse, nArg);
+      sqlite3ExprCodeExprList(pParse, pList, regAgg, 1);
+    }else{
+      nArg = 0;
+      regAgg = 0;
+    }
+    if( pF->iDistinct>=0 ){
+      addrNext = sqlite3VdbeMakeLabel(v);
+      assert( nArg==1 );
+      codeDistinct(pParse, pF->iDistinct, addrNext, 1, regAgg);
+    }
+    if( pF->pFunc->flags & SQLITE_FUNC_NEEDCOLL ){
+      CollSeq *pColl = 0;
+      struct ExprList_item *pItem;
+      int j;
+      assert( pList!=0 );  /* pList!=0 if pF->pFunc has NEEDCOLL */
+      for(j=0, pItem=pList->a; !pColl && j<nArg; j++, pItem++){
+        pColl = sqlite3ExprCollSeq(pParse, pItem->pExpr);
+      }
+      if( !pColl ){
+        pColl = pParse->db->pDfltColl;
+      }
+      sqlite3VdbeAddOp4(v, OP_CollSeq, 0, 0, 0, (char *)pColl, P4_COLLSEQ);
+    }
+    sqlite3VdbeAddOp4(v, OP_AggStep, 0, regAgg, pF->iMem,
+                      (void*)pF->pFunc, P4_FUNCDEF);
+    sqlite3VdbeChangeP5(v, (u8)nArg);
+    sqlite3ExprCacheAffinityChange(pParse, regAgg, nArg);
+    sqlite3ReleaseTempRange(pParse, regAgg, nArg);
+    if( addrNext ){
+      sqlite3VdbeResolveLabel(v, addrNext);
+      sqlite3ExprCacheClear(pParse);
+    }
+  }
+
+  /* Before populating the accumulator registers, clear the column cache.
+  ** Otherwise, if any of the required column values are already present 
+  ** in registers, sqlite3ExprCode() may use OP_SCopy to copy the value
+  ** to pC->iMem. But by the time the value is used, the original register
+  ** may have been used, invalidating the underlying buffer holding the
+  ** text or blob value. See ticket [883034dcb5].
+  **
+  ** Another solution would be to change the OP_SCopy used to copy cached
+  ** values to an OP_Copy.
+  */
+  sqlite3ExprCacheClear(pParse);
+  for(i=0, pC=pAggInfo->aCol; i<pAggInfo->nAccumulator; i++, pC++){
+    sqlite3ExprCode(pParse, pC->pExpr, pC->iMem);
+  }
+  pAggInfo->directMode = 0;
+  sqlite3ExprCacheClear(pParse);
+}
+
+/*
+** Add a single OP_Explain instruction to the VDBE to explain a simple
+** count(*) query ("SELECT count(*) FROM pTab").
+*/
+#ifndef SQLITE_OMIT_EXPLAIN
+static void explainSimpleCount(
+  Parse *pParse,                  /* Parse context */
+  Table *pTab,                    /* Table being queried */
+  Index *pIdx                     /* Index used to optimize scan, or NULL */
+){
+  if( pParse->explain==2 ){
+    char *zEqp = sqlite3MPrintf(pParse->db, "SCAN TABLE %s %s%s(~%d rows)",
+        pTab->zName, 
+        pIdx ? "USING COVERING INDEX " : "",
+        pIdx ? pIdx->zName : "",
+        pTab->nRowEst
+    );
+    sqlite3VdbeAddOp4(
+        pParse->pVdbe, OP_Explain, pParse->iSelectId, 0, 0, zEqp, P4_DYNAMIC
+    );
+  }
+}
+#else
+# define explainSimpleCount(a,b,c)
+#endif
+
+/*
+** Generate code for the SELECT statement given in the p argument.  
+**
+** The results are distributed in various ways depending on the
+** contents of the SelectDest structure pointed to by argument pDest
+** as follows:
+**
+**     pDest->eDest    Result
+**     ------------    -------------------------------------------
+**     SRT_Output      Generate a row of output (using the OP_ResultRow
+**                     opcode) for each row in the result set.
+**
+**     SRT_Mem         Only valid if the result is a single column.
+**                     Store the first column of the first result row
+**                     in register pDest->iParm then abandon the rest
+**                     of the query.  This destination implies "LIMIT 1".
+**
+**     SRT_Set         The result must be a single column.  Store each
+**                     row of result as the key in table pDest->iParm. 
+**                     Apply the affinity pDest->affinity before storing
+**                     results.  Used to implement "IN (SELECT ...)".
+**
+**     SRT_Union       Store results as a key in a temporary table pDest->iParm.
+**
+**     SRT_Except      Remove results from the temporary table pDest->iParm.
+**
+**     SRT_Table       Store results in temporary table pDest->iParm.
+**                     This is like SRT_EphemTab except that the table
+**                     is assumed to already be open.
+**
+**     SRT_EphemTab    Create an temporary table pDest->iParm and store
+**                     the result there. The cursor is left open after
+**                     returning.  This is like SRT_Table except that
+**                     this destination uses OP_OpenEphemeral to create
+**                     the table first.
+**
+**     SRT_Coroutine   Generate a co-routine that returns a new row of
+**                     results each time it is invoked.  The entry point
+**                     of the co-routine is stored in register pDest->iParm.
+**
+**     SRT_Exists      Store a 1 in memory cell pDest->iParm if the result
+**                     set is not empty.
+**
+**     SRT_Discard     Throw the results away.  This is used by SELECT
+**                     statements within triggers whose only purpose is
+**                     the side-effects of functions.
+**
+** This routine returns the number of errors.  If any errors are
+** encountered, then an appropriate error message is left in
+** pParse->zErrMsg.
+**
+** This routine does NOT free the Select structure passed in.  The
+** calling function needs to do that.
+*/
+SQLITE_PRIVATE int sqlite3Select(
+  Parse *pParse,         /* The parser context */
+  Select *p,             /* The SELECT statement being coded. */
+  SelectDest *pDest      /* What to do with the query results */
+){
+  int i, j;              /* Loop counters */
+  WhereInfo *pWInfo;     /* Return from sqlite3WhereBegin() */
+  Vdbe *v;               /* The virtual machine under construction */
+  int isAgg;             /* True for select lists like "count(*)" */
+  ExprList *pEList;      /* List of columns to extract. */
+  SrcList *pTabList;     /* List of tables to select from */
+  Expr *pWhere;          /* The WHERE clause.  May be NULL */
+  ExprList *pOrderBy;    /* The ORDER BY clause.  May be NULL */
+  ExprList *pGroupBy;    /* The GROUP BY clause.  May be NULL */
+  Expr *pHaving;         /* The HAVING clause.  May be NULL */
+  int isDistinct;        /* True if the DISTINCT keyword is present */
+  int distinct;          /* Table to use for the distinct set */
+  int rc = 1;            /* Value to return from this function */
+  int addrSortIndex;     /* Address of an OP_OpenEphemeral instruction */
+  AggInfo sAggInfo;      /* Information used by aggregate queries */
+  int iEnd;              /* Address of the end of the query */
+  sqlite3 *db;           /* The database connection */
+
+#ifndef SQLITE_OMIT_EXPLAIN
+  int iRestoreSelectId = pParse->iSelectId;
+  pParse->iSelectId = pParse->iNextSelectId++;
+#endif
+
+  db = pParse->db;
+  if( p==0 || db->mallocFailed || pParse->nErr ){
+    return 1;
+  }
+  if( sqlite3AuthCheck(pParse, SQLITE_SELECT, 0, 0, 0) ) return 1;
+  memset(&sAggInfo, 0, sizeof(sAggInfo));
+
+  if( IgnorableOrderby(pDest) ){
+    assert(pDest->eDest==SRT_Exists || pDest->eDest==SRT_Union || 
+           pDest->eDest==SRT_Except || pDest->eDest==SRT_Discard);
+    /* If ORDER BY makes no difference in the output then neither does
+    ** DISTINCT so it can be removed too. */
+    sqlite3ExprListDelete(db, p->pOrderBy);
+    p->pOrderBy = 0;
+    p->selFlags &= ~SF_Distinct;
+  }
+  sqlite3SelectPrep(pParse, p, 0);
+  pOrderBy = p->pOrderBy;
+  pTabList = p->pSrc;
+  pEList = p->pEList;
+  if( pParse->nErr || db->mallocFailed ){
+    goto select_end;
+  }
+  isAgg = (p->selFlags & SF_Aggregate)!=0;
+  assert( pEList!=0 );
+
+  /* Begin generating code.
+  */
+  v = sqlite3GetVdbe(pParse);
+  if( v==0 ) goto select_end;
+
+  /* If writing to memory or generating a set
+  ** only a single column may be output.
+  */
+#ifndef SQLITE_OMIT_SUBQUERY
+  if( checkForMultiColumnSelectError(pParse, pDest, pEList->nExpr) ){
+    goto select_end;
+  }
+#endif
+
+  /* Generate code for all sub-queries in the FROM clause
+  */
+#if !defined(SQLITE_OMIT_SUBQUERY) || !defined(SQLITE_OMIT_VIEW)
+  for(i=0; !p->pPrior && i<pTabList->nSrc; i++){
+    struct SrcList_item *pItem = &pTabList->a[i];
+    SelectDest dest;
+    Select *pSub = pItem->pSelect;
+    int isAggSub;
+
+    if( pSub==0 || pItem->isPopulated ) continue;
+
+    /* Increment Parse.nHeight by the height of the largest expression
+    ** tree refered to by this, the parent select. The child select
+    ** may contain expression trees of at most
+    ** (SQLITE_MAX_EXPR_DEPTH-Parse.nHeight) height. This is a bit
+    ** more conservative than necessary, but much easier than enforcing
+    ** an exact limit.
+    */
+    pParse->nHeight += sqlite3SelectExprHeight(p);
+
+    /* Check to see if the subquery can be absorbed into the parent. */
+    isAggSub = (pSub->selFlags & SF_Aggregate)!=0;
+    if( flattenSubquery(pParse, p, i, isAgg, isAggSub) ){
+      if( isAggSub ){
+        isAgg = 1;
+        p->selFlags |= SF_Aggregate;
+      }
+      i = -1;
+    }else{
+      sqlite3SelectDestInit(&dest, SRT_EphemTab, pItem->iCursor);
+      assert( pItem->isPopulated==0 );
+      explainSetInteger(pItem->iSelectId, (u8)pParse->iNextSelectId);
+      sqlite3Select(pParse, pSub, &dest);
+      pItem->isPopulated = 1;
+      pItem->pTab->nRowEst = (unsigned)pSub->nSelectRow;
+    }
+    if( /*pParse->nErr ||*/ db->mallocFailed ){
+      goto select_end;
+    }
+    pParse->nHeight -= sqlite3SelectExprHeight(p);
+    pTabList = p->pSrc;
+    if( !IgnorableOrderby(pDest) ){
+      pOrderBy = p->pOrderBy;
+    }
+  }
+  pEList = p->pEList;
+#endif
+  pWhere = p->pWhere;
+  pGroupBy = p->pGroupBy;
+  pHaving = p->pHaving;
+  isDistinct = (p->selFlags & SF_Distinct)!=0;
+
+#ifndef SQLITE_OMIT_COMPOUND_SELECT
+  /* If there is are a sequence of queries, do the earlier ones first.
+  */
+  if( p->pPrior ){
+    if( p->pRightmost==0 ){
+      Select *pLoop, *pRight = 0;
+      int cnt = 0;
+      int mxSelect;
+      for(pLoop=p; pLoop; pLoop=pLoop->pPrior, cnt++){
+        pLoop->pRightmost = p;
+        pLoop->pNext = pRight;
+        pRight = pLoop;
+      }
+      mxSelect = db->aLimit[SQLITE_LIMIT_COMPOUND_SELECT];
+      if( mxSelect && cnt>mxSelect ){
+        sqlite3ErrorMsg(pParse, "too many terms in compound SELECT");
+        goto select_end;
+      }
+    }
+    rc = multiSelect(pParse, p, pDest);
+    explainSetInteger(pParse->iSelectId, iRestoreSelectId);
+    return rc;
+  }
+#endif
+
+  /* If possible, rewrite the query to use GROUP BY instead of DISTINCT.
+  ** GROUP BY might use an index, DISTINCT never does.
+  */
+  assert( p->pGroupBy==0 || (p->selFlags & SF_Aggregate)!=0 );
+  if( (p->selFlags & (SF_Distinct|SF_Aggregate))==SF_Distinct ){
+    p->pGroupBy = sqlite3ExprListDup(db, p->pEList, 0);
+    pGroupBy = p->pGroupBy;
+    p->selFlags &= ~SF_Distinct;
+  }
+
+  /* If there is both a GROUP BY and an ORDER BY clause and they are
+  ** identical, then disable the ORDER BY clause since the GROUP BY
+  ** will cause elements to come out in the correct order.  This is
+  ** an optimization - the correct answer should result regardless.
+  ** Use the SQLITE_GroupByOrder flag with SQLITE_TESTCTRL_OPTIMIZER
+  ** to disable this optimization for testing purposes.
+  */
+  if( sqlite3ExprListCompare(p->pGroupBy, pOrderBy)==0
+         && (db->flags & SQLITE_GroupByOrder)==0 ){
+    pOrderBy = 0;
+  }
+
+  /* If there is an ORDER BY clause, then this sorting
+  ** index might end up being unused if the data can be 
+  ** extracted in pre-sorted order.  If that is the case, then the
+  ** OP_OpenEphemeral instruction will be changed to an OP_Noop once
+  ** we figure out that the sorting index is not needed.  The addrSortIndex
+  ** variable is used to facilitate that change.
+  */
+  if( pOrderBy ){
+    KeyInfo *pKeyInfo;
+    pKeyInfo = keyInfoFromExprList(pParse, pOrderBy);
+    pOrderBy->iECursor = pParse->nTab++;
+    p->addrOpenEphm[2] = addrSortIndex =
+      sqlite3VdbeAddOp4(v, OP_OpenEphemeral,
+                           pOrderBy->iECursor, pOrderBy->nExpr+2, 0,
+                           (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
+  }else{
+    addrSortIndex = -1;
+  }
+
+  /* If the output is destined for a temporary table, open that table.
+  */
+  if( pDest->eDest==SRT_EphemTab ){
+    sqlite3VdbeAddOp2(v, OP_OpenEphemeral, pDest->iParm, pEList->nExpr);
+  }
+
+  /* Set the limiter.
+  */
+  iEnd = sqlite3VdbeMakeLabel(v);
+  p->nSelectRow = (double)LARGEST_INT64;
+  computeLimitRegisters(pParse, p, iEnd);
+
+  /* Open a virtual index to use for the distinct set.
+  */
+  if( p->selFlags & SF_Distinct ){
+    KeyInfo *pKeyInfo;
+    assert( isAgg || pGroupBy );
+    distinct = pParse->nTab++;
+    pKeyInfo = keyInfoFromExprList(pParse, p->pEList);
+    sqlite3VdbeAddOp4(v, OP_OpenEphemeral, distinct, 0, 0,
+                        (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
+    sqlite3VdbeChangeP5(v, BTREE_UNORDERED);
+  }else{
+    distinct = -1;
+  }
+
+  /* Aggregate and non-aggregate queries are handled differently */
+  if( !isAgg && pGroupBy==0 ){
+    /* This case is for non-aggregate queries
+    ** Begin the database scan
+    */
+    pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, &pOrderBy, 0);
+    if( pWInfo==0 ) goto select_end;
+    if( pWInfo->nRowOut < p->nSelectRow ) p->nSelectRow = pWInfo->nRowOut;
+
+    /* If sorting index that was created by a prior OP_OpenEphemeral 
+    ** instruction ended up not being needed, then change the OP_OpenEphemeral
+    ** into an OP_Noop.
+    */
+    if( addrSortIndex>=0 && pOrderBy==0 ){
+      sqlite3VdbeChangeToNoop(v, addrSortIndex, 1);
+      p->addrOpenEphm[2] = -1;
+    }
+
+    /* Use the standard inner loop
+    */
+    assert(!isDistinct);
+    selectInnerLoop(pParse, p, pEList, 0, 0, pOrderBy, -1, pDest,
+                    pWInfo->iContinue, pWInfo->iBreak);
+
+    /* End the database scan loop.
+    */
+    sqlite3WhereEnd(pWInfo);
+  }else{
+    /* This is the processing for aggregate queries */
+    NameContext sNC;    /* Name context for processing aggregate information */
+    int iAMem;          /* First Mem address for storing current GROUP BY */
+    int iBMem;          /* First Mem address for previous GROUP BY */
+    int iUseFlag;       /* Mem address holding flag indicating that at least
+                        ** one row of the input to the aggregator has been
+                        ** processed */
+    int iAbortFlag;     /* Mem address which causes query abort if positive */
+    int groupBySort;    /* Rows come from source in GROUP BY order */
+    int addrEnd;        /* End of processing for this SELECT */
+
+    /* Remove any and all aliases between the result set and the
+    ** GROUP BY clause.
+    */
+    if( pGroupBy ){
+      int k;                        /* Loop counter */
+      struct ExprList_item *pItem;  /* For looping over expression in a list */
+
+      for(k=p->pEList->nExpr, pItem=p->pEList->a; k>0; k--, pItem++){
+        pItem->iAlias = 0;
+      }
+      for(k=pGroupBy->nExpr, pItem=pGroupBy->a; k>0; k--, pItem++){
+        pItem->iAlias = 0;
+      }
+      if( p->nSelectRow>(double)100 ) p->nSelectRow = (double)100;
+    }else{
+      p->nSelectRow = (double)1;
+    }
+
+ 
+    /* Create a label to jump to when we want to abort the query */
+    addrEnd = sqlite3VdbeMakeLabel(v);
+
+    /* Convert TK_COLUMN nodes into TK_AGG_COLUMN and make entries in
+    ** sAggInfo for all TK_AGG_FUNCTION nodes in expressions of the
+    ** SELECT statement.
+    */
+    memset(&sNC, 0, sizeof(sNC));
+    sNC.pParse = pParse;
+    sNC.pSrcList = pTabList;
+    sNC.pAggInfo = &sAggInfo;
+    sAggInfo.nSortingColumn = pGroupBy ? pGroupBy->nExpr+1 : 0;
+    sAggInfo.pGroupBy = pGroupBy;
+    sqlite3ExprAnalyzeAggList(&sNC, pEList);
+    sqlite3ExprAnalyzeAggList(&sNC, pOrderBy);
+    if( pHaving ){
+      sqlite3ExprAnalyzeAggregates(&sNC, pHaving);
+    }
+    sAggInfo.nAccumulator = sAggInfo.nColumn;
+    for(i=0; i<sAggInfo.nFunc; i++){
+      assert( !ExprHasProperty(sAggInfo.aFunc[i].pExpr, EP_xIsSelect) );
+      sqlite3ExprAnalyzeAggList(&sNC, sAggInfo.aFunc[i].pExpr->x.pList);
+    }
+    if( db->mallocFailed ) goto select_end;
+
+    /* Processing for aggregates with GROUP BY is very different and
+    ** much more complex than aggregates without a GROUP BY.
+    */
+    if( pGroupBy ){
+      KeyInfo *pKeyInfo;  /* Keying information for the group by clause */
+      int j1;             /* A-vs-B comparision jump */
+      int addrOutputRow;  /* Start of subroutine that outputs a result row */
+      int regOutputRow;   /* Return address register for output subroutine */
+      int addrSetAbort;   /* Set the abort flag and return */
+      int addrTopOfLoop;  /* Top of the input loop */
+      int addrSortingIdx; /* The OP_OpenEphemeral for the sorting index */
+      int addrReset;      /* Subroutine for resetting the accumulator */
+      int regReset;       /* Return address register for reset subroutine */
+
+      /* If there is a GROUP BY clause we might need a sorting index to
+      ** implement it.  Allocate that sorting index now.  If it turns out
+      ** that we do not need it after all, the OpenEphemeral instruction
+      ** will be converted into a Noop.  
+      */
+      sAggInfo.sortingIdx = pParse->nTab++;
+      pKeyInfo = keyInfoFromExprList(pParse, pGroupBy);
+      addrSortingIdx = sqlite3VdbeAddOp4(v, OP_OpenEphemeral, 
+          sAggInfo.sortingIdx, sAggInfo.nSortingColumn, 
+          0, (char*)pKeyInfo, P4_KEYINFO_HANDOFF);
+
+      /* Initialize memory locations used by GROUP BY aggregate processing
+      */
+      iUseFlag = ++pParse->nMem;
+      iAbortFlag = ++pParse->nMem;
+      regOutputRow = ++pParse->nMem;
+      addrOutputRow = sqlite3VdbeMakeLabel(v);
+      regReset = ++pParse->nMem;
+      addrReset = sqlite3VdbeMakeLabel(v);
+      iAMem = pParse->nMem + 1;
+      pParse->nMem += pGroupBy->nExpr;
+      iBMem = pParse->nMem + 1;
+      pParse->nMem += pGroupBy->nExpr;
+      sqlite3VdbeAddOp2(v, OP_Integer, 0, iAbortFlag);
+      VdbeComment((v, "clear abort flag"));
+      sqlite3VdbeAddOp2(v, OP_Integer, 0, iUseFlag);
+      VdbeComment((v, "indicate accumulator empty"));
+
+      /* Begin a loop that will extract all source rows in GROUP BY order.
+      ** This might involve two separate loops with an OP_Sort in between, or
+      ** it might be a single loop that uses an index to extract information
+      ** in the right order to begin with.
+      */
+      sqlite3VdbeAddOp2(v, OP_Gosub, regReset, addrReset);
+      pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, &pGroupBy, 0);
+      if( pWInfo==0 ) goto select_end;
+      if( pGroupBy==0 ){
+        /* The optimizer is able to deliver rows in group by order so
+        ** we do not have to sort.  The OP_OpenEphemeral table will be
+        ** cancelled later because we still need to use the pKeyInfo
+        */
+        pGroupBy = p->pGroupBy;
+        groupBySort = 0;
+      }else{
+        /* Rows are coming out in undetermined order.  We have to push
+        ** each row into a sorting index, terminate the first loop,
+        ** then loop over the sorting index in order to get the output
+        ** in sorted order
+        */
+        int regBase;
+        int regRecord;
+        int nCol;
+        int nGroupBy;
+
+        explainTempTable(pParse, 
+            isDistinct && !(p->selFlags&SF_Distinct)?"DISTINCT":"GROUP BY");
+
+        groupBySort = 1;
+        nGroupBy = pGroupBy->nExpr;
+        nCol = nGroupBy + 1;
+        j = nGroupBy+1;
+        for(i=0; i<sAggInfo.nColumn; i++){
+          if( sAggInfo.aCol[i].iSorterColumn>=j ){
+            nCol++;
+            j++;
+          }
+        }
+        regBase = sqlite3GetTempRange(pParse, nCol);
+        sqlite3ExprCacheClear(pParse);
+        sqlite3ExprCodeExprList(pParse, pGroupBy, regBase, 0);
+        sqlite3VdbeAddOp2(v, OP_Sequence, sAggInfo.sortingIdx,regBase+nGroupBy);
+        j = nGroupBy+1;
+        for(i=0; i<sAggInfo.nColumn; i++){
+          struct AggInfo_col *pCol = &sAggInfo.aCol[i];
+          if( pCol->iSorterColumn>=j ){
+            int r1 = j + regBase;
+            int r2;
+
+            r2 = sqlite3ExprCodeGetColumn(pParse, 
+                               pCol->pTab, pCol->iColumn, pCol->iTable, r1);
+            if( r1!=r2 ){
+              sqlite3VdbeAddOp2(v, OP_SCopy, r2, r1);
+            }
+            j++;
+          }
+        }
+        regRecord = sqlite3GetTempReg(pParse);
+        sqlite3VdbeAddOp3(v, OP_MakeRecord, regBase, nCol, regRecord);
+        sqlite3VdbeAddOp2(v, OP_IdxInsert, sAggInfo.sortingIdx, regRecord);
+        sqlite3ReleaseTempReg(pParse, regRecord);
+        sqlite3ReleaseTempRange(pParse, regBase, nCol);
+        sqlite3WhereEnd(pWInfo);
+        sqlite3VdbeAddOp2(v, OP_Sort, sAggInfo.sortingIdx, addrEnd);
+        VdbeComment((v, "GROUP BY sort"));
+        sAggInfo.useSortingIdx = 1;
+        sqlite3ExprCacheClear(pParse);
+      }
+
+      /* Evaluate the current GROUP BY terms and store in b0, b1, b2...
+      ** (b0 is memory location iBMem+0, b1 is iBMem+1, and so forth)
+      ** Then compare the current GROUP BY terms against the GROUP BY terms
+      ** from the previous row currently stored in a0, a1, a2...
+      */
+      addrTopOfLoop = sqlite3VdbeCurrentAddr(v);
+      sqlite3ExprCacheClear(pParse);
+      for(j=0; j<pGroupBy->nExpr; j++){
+        if( groupBySort ){
+          sqlite3VdbeAddOp3(v, OP_Column, sAggInfo.sortingIdx, j, iBMem+j);
+        }else{
+          sAggInfo.directMode = 1;
+          sqlite3ExprCode(pParse, pGroupBy->a[j].pExpr, iBMem+j);
+        }
+      }
+      sqlite3VdbeAddOp4(v, OP_Compare, iAMem, iBMem, pGroupBy->nExpr,
+                          (char*)pKeyInfo, P4_KEYINFO);
+      j1 = sqlite3VdbeCurrentAddr(v);
+      sqlite3VdbeAddOp3(v, OP_Jump, j1+1, 0, j1+1);
+
+      /* Generate code that runs whenever the GROUP BY changes.
+      ** Changes in the GROUP BY are detected by the previous code
+      ** block.  If there were no changes, this block is skipped.
+      **
+      ** This code copies current group by terms in b0,b1,b2,...
+      ** over to a0,a1,a2.  It then calls the output subroutine
+      ** and resets the aggregate accumulator registers in preparation
+      ** for the next GROUP BY batch.
+      */
+      sqlite3ExprCodeMove(pParse, iBMem, iAMem, pGroupBy->nExpr);
+      sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow);
+      VdbeComment((v, "output one row"));
+      sqlite3VdbeAddOp2(v, OP_IfPos, iAbortFlag, addrEnd);
+      VdbeComment((v, "check abort flag"));
+      sqlite3VdbeAddOp2(v, OP_Gosub, regReset, addrReset);
+      VdbeComment((v, "reset accumulator"));
+
+      /* Update the aggregate accumulators based on the content of
+      ** the current row
+      */
+      sqlite3VdbeJumpHere(v, j1);
+      updateAccumulator(pParse, &sAggInfo);
+      sqlite3VdbeAddOp2(v, OP_Integer, 1, iUseFlag);
+      VdbeComment((v, "indicate data in accumulator"));
+
+      /* End of the loop
+      */
+      if( groupBySort ){
+        sqlite3VdbeAddOp2(v, OP_Next, sAggInfo.sortingIdx, addrTopOfLoop);
+      }else{
+        sqlite3WhereEnd(pWInfo);
+        sqlite3VdbeChangeToNoop(v, addrSortingIdx, 1);
+      }
+
+      /* Output the final row of result
+      */
+      sqlite3VdbeAddOp2(v, OP_Gosub, regOutputRow, addrOutputRow);
+      VdbeComment((v, "output final row"));
+
+      /* Jump over the subroutines
+      */
+      sqlite3VdbeAddOp2(v, OP_Goto, 0, addrEnd);
+
+      /* Generate a subroutine that outputs a single row of the result
+      ** set.  This subroutine first looks at the iUseFlag.  If iUseFlag
+      ** is less than or equal to zero, the subroutine is a no-op.  If
+      ** the processing calls for the query to abort, this subroutine
+      ** increments the iAbortFlag memory location before returning in
+      ** order to signal the caller to abort.
+      */
+      addrSetAbort = sqlite3VdbeCurrentAddr(v);
+      sqlite3VdbeAddOp2(v, OP_Integer, 1, iAbortFlag);
+      VdbeComment((v, "set abort flag"));
+      sqlite3VdbeAddOp1(v, OP_Return, regOutputRow);
+      sqlite3VdbeResolveLabel(v, addrOutputRow);
+      addrOutputRow = sqlite3VdbeCurrentAddr(v);
+      sqlite3VdbeAddOp2(v, OP_IfPos, iUseFlag, addrOutputRow+2);
+      VdbeComment((v, "Groupby result generator entry point"));
+      sqlite3VdbeAddOp1(v, OP_Return, regOutputRow);
+      finalizeAggFunctions(pParse, &sAggInfo);
+      sqlite3ExprIfFalse(pParse, pHaving, addrOutputRow+1, SQLITE_JUMPIFNULL);
+      selectInnerLoop(pParse, p, p->pEList, 0, 0, pOrderBy,
+                      distinct, pDest,
+                      addrOutputRow+1, addrSetAbort);
+      sqlite3VdbeAddOp1(v, OP_Return, regOutputRow);
+      VdbeComment((v, "end groupby result generator"));
+
+      /* Generate a subroutine that will reset the group-by accumulator
+      */
+      sqlite3VdbeResolveLabel(v, addrReset);
+      resetAccumulator(pParse, &sAggInfo);
+      sqlite3VdbeAddOp1(v, OP_Return, regReset);
+     
+    } /* endif pGroupBy.  Begin aggregate queries without GROUP BY: */
+    else {
+      ExprList *pDel = 0;
+#ifndef SQLITE_OMIT_BTREECOUNT
+      Table *pTab;
+      if( (pTab = isSimpleCount(p, &sAggInfo))!=0 ){
+        /* If isSimpleCount() returns a pointer to a Table structure, then
+        ** the SQL statement is of the form:
+        **
+        **   SELECT count(*) FROM <tbl>
+        **
+        ** where the Table structure returned represents table <tbl>.
+        **
+        ** This statement is so common that it is optimized specially. The
+        ** OP_Count instruction is executed either on the intkey table that
+        ** contains the data for table <tbl> or on one of its indexes. It
+        ** is better to execute the op on an index, as indexes are almost
+        ** always spread across less pages than their corresponding tables.
+        */
+        const int iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
+        const int iCsr = pParse->nTab++;     /* Cursor to scan b-tree */
+        Index *pIdx;                         /* Iterator variable */
+        KeyInfo *pKeyInfo = 0;               /* Keyinfo for scanned index */
+        Index *pBest = 0;                    /* Best index found so far */
+        int iRoot = pTab->tnum;              /* Root page of scanned b-tree */
+
+        sqlite3CodeVerifySchema(pParse, iDb);
+        sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
+
+        /* Search for the index that has the least amount of columns. If
+        ** there is such an index, and it has less columns than the table
+        ** does, then we can assume that it consumes less space on disk and
+        ** will therefore be cheaper to scan to determine the query result.
+        ** In this case set iRoot to the root page number of the index b-tree
+        ** and pKeyInfo to the KeyInfo structure required to navigate the
+        ** index.
+        **
+        ** In practice the KeyInfo structure will not be used. It is only 
+        ** passed to keep OP_OpenRead happy.
+        */
+        for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+          if( !pBest || pIdx->nColumn<pBest->nColumn ){
+            pBest = pIdx;
+          }
+        }
+        if( pBest && pBest->nColumn<pTab->nCol ){
+          iRoot = pBest->tnum;
+          pKeyInfo = sqlite3IndexKeyinfo(pParse, pBest);
+        }
+
+        /* Open a read-only cursor, execute the OP_Count, close the cursor. */
+        sqlite3VdbeAddOp3(v, OP_OpenRead, iCsr, iRoot, iDb);
+        if( pKeyInfo ){
+          sqlite3VdbeChangeP4(v, -1, (char *)pKeyInfo, P4_KEYINFO_HANDOFF);
+        }
+        sqlite3VdbeAddOp2(v, OP_Count, iCsr, sAggInfo.aFunc[0].iMem);
+        sqlite3VdbeAddOp1(v, OP_Close, iCsr);
+        explainSimpleCount(pParse, pTab, pBest);
+      }else
+#endif /* SQLITE_OMIT_BTREECOUNT */
+      {
+        /* Check if the query is of one of the following forms:
+        **
+        **   SELECT min(x) FROM ...
+        **   SELECT max(x) FROM ...
+        **
+        ** If it is, then ask the code in where.c to attempt to sort results
+        ** as if there was an "ORDER ON x" or "ORDER ON x DESC" clause. 
+        ** If where.c is able to produce results sorted in this order, then
+        ** add vdbe code to break out of the processing loop after the 
+        ** first iteration (since the first iteration of the loop is 
+        ** guaranteed to operate on the row with the minimum or maximum 
+        ** value of x, the only row required).
+        **
+        ** A special flag must be passed to sqlite3WhereBegin() to slightly
+        ** modify behaviour as follows:
+        **
+        **   + If the query is a "SELECT min(x)", then the loop coded by
+        **     where.c should not iterate over any values with a NULL value
+        **     for x.
+        **
+        **   + The optimizer code in where.c (the thing that decides which
+        **     index or indices to use) should place a different priority on 
+        **     satisfying the 'ORDER BY' clause than it does in other cases.
+        **     Refer to code and comments in where.c for details.
+        */
+        ExprList *pMinMax = 0;
+        u8 flag = minMaxQuery(p);
+        if( flag ){
+          assert( !ExprHasProperty(p->pEList->a[0].pExpr, EP_xIsSelect) );
+          pMinMax = sqlite3ExprListDup(db, p->pEList->a[0].pExpr->x.pList,0);
+          pDel = pMinMax;
+          if( pMinMax && !db->mallocFailed ){
+            pMinMax->a[0].sortOrder = flag!=WHERE_ORDERBY_MIN ?1:0;
+            pMinMax->a[0].pExpr->op = TK_COLUMN;
+          }
+        }
+  
+        /* This case runs if the aggregate has no GROUP BY clause.  The
+        ** processing is much simpler since there is only a single row
+        ** of output.
+        */
+        resetAccumulator(pParse, &sAggInfo);
+        pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere, &pMinMax, flag);
+        if( pWInfo==0 ){
+          sqlite3ExprListDelete(db, pDel);
+          goto select_end;
+        }
+        updateAccumulator(pParse, &sAggInfo);
+        if( !pMinMax && flag ){
+          sqlite3VdbeAddOp2(v, OP_Goto, 0, pWInfo->iBreak);
+          VdbeComment((v, "%s() by index",
+                (flag==WHERE_ORDERBY_MIN?"min":"max")));
+        }
+        sqlite3WhereEnd(pWInfo);
+        finalizeAggFunctions(pParse, &sAggInfo);
+      }
+
+      pOrderBy = 0;
+      sqlite3ExprIfFalse(pParse, pHaving, addrEnd, SQLITE_JUMPIFNULL);
+      selectInnerLoop(pParse, p, p->pEList, 0, 0, 0, -1, 
+                      pDest, addrEnd, addrEnd);
+      sqlite3ExprListDelete(db, pDel);
+    }
+    sqlite3VdbeResolveLabel(v, addrEnd);
+    
+  } /* endif aggregate query */
+
+  if( distinct>=0 ){
+    explainTempTable(pParse, "DISTINCT");
+  }
+
+  /* If there is an ORDER BY clause, then we need to sort the results
+  ** and send them to the callback one by one.
+  */
+  if( pOrderBy ){
+    explainTempTable(pParse, "ORDER BY");
+    generateSortTail(pParse, p, v, pEList->nExpr, pDest);
+  }
+
+  /* Jump here to skip this query
+  */
+  sqlite3VdbeResolveLabel(v, iEnd);
+
+  /* The SELECT was successfully coded.   Set the return code to 0
+  ** to indicate no errors.
+  */
+  rc = 0;
+
+  /* Control jumps to here if an error is encountered above, or upon
+  ** successful coding of the SELECT.
+  */
+select_end:
+  explainSetInteger(pParse->iSelectId, iRestoreSelectId);
+
+  /* Identify column names if results of the SELECT are to be output.
+  */
+  if( rc==SQLITE_OK && pDest->eDest==SRT_Output ){
+    generateColumnNames(pParse, pTabList, pEList);
+  }
+
+  sqlite3DbFree(db, sAggInfo.aCol);
+  sqlite3DbFree(db, sAggInfo.aFunc);
+  return rc;
+}
+
+#if defined(SQLITE_DEBUG)
+/*
+*******************************************************************************
+** The following code is used for testing and debugging only.  The code
+** that follows does not appear in normal builds.
+**
+** These routines are used to print out the content of all or part of a 
+** parse structures such as Select or Expr.  Such printouts are useful
+** for helping to understand what is happening inside the code generator
+** during the execution of complex SELECT statements.
+**
+** These routine are not called anywhere from within the normal
+** code base.  Then are intended to be called from within the debugger
+** or from temporary "printf" statements inserted for debugging.
+*/
+SQLITE_PRIVATE void sqlite3PrintExpr(Expr *p){
+  if( !ExprHasProperty(p, EP_IntValue) && p->u.zToken ){
+    sqlite3DebugPrintf("(%s", p->u.zToken);
+  }else{
+    sqlite3DebugPrintf("(%d", p->op);
+  }
+  if( p->pLeft ){
+    sqlite3DebugPrintf(" ");
+    sqlite3PrintExpr(p->pLeft);
+  }
+  if( p->pRight ){
+    sqlite3DebugPrintf(" ");
+    sqlite3PrintExpr(p->pRight);
+  }
+  sqlite3DebugPrintf(")");
+}
+SQLITE_PRIVATE void sqlite3PrintExprList(ExprList *pList){
+  int i;
+  for(i=0; i<pList->nExpr; i++){
+    sqlite3PrintExpr(pList->a[i].pExpr);
+    if( i<pList->nExpr-1 ){
+      sqlite3DebugPrintf(", ");
+    }
+  }
+}
+SQLITE_PRIVATE void sqlite3PrintSelect(Select *p, int indent){
+  sqlite3DebugPrintf("%*sSELECT(%p) ", indent, "", p);
+  sqlite3PrintExprList(p->pEList);
+  sqlite3DebugPrintf("\n");
+  if( p->pSrc ){
+    char *zPrefix;
+    int i;
+    zPrefix = "FROM";
+    for(i=0; i<p->pSrc->nSrc; i++){
+      struct SrcList_item *pItem = &p->pSrc->a[i];
+      sqlite3DebugPrintf("%*s ", indent+6, zPrefix);
+      zPrefix = "";
+      if( pItem->pSelect ){
+        sqlite3DebugPrintf("(\n");
+        sqlite3PrintSelect(pItem->pSelect, indent+10);
+        sqlite3DebugPrintf("%*s)", indent+8, "");
+      }else if( pItem->zName ){
+        sqlite3DebugPrintf("%s", pItem->zName);
+      }
+      if( pItem->pTab ){
+        sqlite3DebugPrintf("(table: %s)", pItem->pTab->zName);
+      }
+      if( pItem->zAlias ){
+        sqlite3DebugPrintf(" AS %s", pItem->zAlias);
+      }
+      if( i<p->pSrc->nSrc-1 ){
+        sqlite3DebugPrintf(",");
+      }
+      sqlite3DebugPrintf("\n");
+    }
+  }
+  if( p->pWhere ){
+    sqlite3DebugPrintf("%*s WHERE ", indent, "");
+    sqlite3PrintExpr(p->pWhere);
+    sqlite3DebugPrintf("\n");
+  }
+  if( p->pGroupBy ){
+    sqlite3DebugPrintf("%*s GROUP BY ", indent, "");
+    sqlite3PrintExprList(p->pGroupBy);
+    sqlite3DebugPrintf("\n");
+  }
+  if( p->pHaving ){
+    sqlite3DebugPrintf("%*s HAVING ", indent, "");
+    sqlite3PrintExpr(p->pHaving);
+    sqlite3DebugPrintf("\n");
+  }
+  if( p->pOrderBy ){
+    sqlite3DebugPrintf("%*s ORDER BY ", indent, "");
+    sqlite3PrintExprList(p->pOrderBy);
+    sqlite3DebugPrintf("\n");
+  }
+}
+/* End of the structure debug printing code
+*****************************************************************************/
+#endif /* defined(SQLITE_TEST) || defined(SQLITE_DEBUG) */
+
+/************** End of select.c **********************************************/
+/************** Begin file table.c *******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the sqlite3_get_table() and sqlite3_free_table()
+** interface routines.  These are just wrappers around the main
+** interface routine of sqlite3_exec().
+**
+** These routines are in a separate files so that they will not be linked
+** if they are not used.
+*/
+
+#ifndef SQLITE_OMIT_GET_TABLE
+
+/*
+** This structure is used to pass data from sqlite3_get_table() through
+** to the callback function is uses to build the result.
+*/
+typedef struct TabResult {
+  char **azResult;   /* Accumulated output */
+  char *zErrMsg;     /* Error message text, if an error occurs */
+  int nAlloc;        /* Slots allocated for azResult[] */
+  int nRow;          /* Number of rows in the result */
+  int nColumn;       /* Number of columns in the result */
+  int nData;         /* Slots used in azResult[].  (nRow+1)*nColumn */
+  int rc;            /* Return code from sqlite3_exec() */
+} TabResult;
+
+/*
+** This routine is called once for each row in the result table.  Its job
+** is to fill in the TabResult structure appropriately, allocating new
+** memory as necessary.
+*/
+static int sqlite3_get_table_cb(void *pArg, int nCol, char **argv, char **colv){
+  TabResult *p = (TabResult*)pArg;  /* Result accumulator */
+  int need;                         /* Slots needed in p->azResult[] */
+  int i;                            /* Loop counter */
+  char *z;                          /* A single column of result */
+
+  /* Make sure there is enough space in p->azResult to hold everything
+  ** we need to remember from this invocation of the callback.
+  */
+  if( p->nRow==0 && argv!=0 ){
+    need = nCol*2;
+  }else{
+    need = nCol;
+  }
+  if( p->nData + need > p->nAlloc ){
+    char **azNew;
+    p->nAlloc = p->nAlloc*2 + need;
+    azNew = sqlite3_realloc( p->azResult, sizeof(char*)*p->nAlloc );
+    if( azNew==0 ) goto malloc_failed;
+    p->azResult = azNew;
+  }
+
+  /* If this is the first row, then generate an extra row containing
+  ** the names of all columns.
+  */
+  if( p->nRow==0 ){
+    p->nColumn = nCol;
+    for(i=0; i<nCol; i++){
+      z = sqlite3_mprintf("%s", colv[i]);
+      if( z==0 ) goto malloc_failed;
+      p->azResult[p->nData++] = z;
+    }
+  }else if( p->nColumn!=nCol ){
+    sqlite3_free(p->zErrMsg);
+    p->zErrMsg = sqlite3_mprintf(
+       "sqlite3_get_table() called with two or more incompatible queries"
+    );
+    p->rc = SQLITE_ERROR;
+    return 1;
+  }
+
+  /* Copy over the row data
+  */
+  if( argv!=0 ){
+    for(i=0; i<nCol; i++){
+      if( argv[i]==0 ){
+        z = 0;
+      }else{
+        int n = sqlite3Strlen30(argv[i])+1;
+        z = sqlite3_malloc( n );
+        if( z==0 ) goto malloc_failed;
+        memcpy(z, argv[i], n);
+      }
+      p->azResult[p->nData++] = z;
+    }
+    p->nRow++;
+  }
+  return 0;
+
+malloc_failed:
+  p->rc = SQLITE_NOMEM;
+  return 1;
+}
+
+/*
+** Query the database.  But instead of invoking a callback for each row,
+** malloc() for space to hold the result and return the entire results
+** at the conclusion of the call.
+**
+** The result that is written to ***pazResult is held in memory obtained
+** from malloc().  But the caller cannot free this memory directly.  
+** Instead, the entire table should be passed to sqlite3_free_table() when
+** the calling procedure is finished using it.
+*/
+SQLITE_API int sqlite3_get_table(
+  sqlite3 *db,                /* The database on which the SQL executes */
+  const char *zSql,           /* The SQL to be executed */
+  char ***pazResult,          /* Write the result table here */
+  int *pnRow,                 /* Write the number of rows in the result here */
+  int *pnColumn,              /* Write the number of columns of result here */
+  char **pzErrMsg             /* Write error messages here */
+){
+  int rc;
+  TabResult res;
+
+  *pazResult = 0;
+  if( pnColumn ) *pnColumn = 0;
+  if( pnRow ) *pnRow = 0;
+  if( pzErrMsg ) *pzErrMsg = 0;
+  res.zErrMsg = 0;
+  res.nRow = 0;
+  res.nColumn = 0;
+  res.nData = 1;
+  res.nAlloc = 20;
+  res.rc = SQLITE_OK;
+  res.azResult = sqlite3_malloc(sizeof(char*)*res.nAlloc );
+  if( res.azResult==0 ){
+     db->errCode = SQLITE_NOMEM;
+     return SQLITE_NOMEM;
+  }
+  res.azResult[0] = 0;
+  rc = sqlite3_exec(db, zSql, sqlite3_get_table_cb, &res, pzErrMsg);
+  assert( sizeof(res.azResult[0])>= sizeof(res.nData) );
+  res.azResult[0] = SQLITE_INT_TO_PTR(res.nData);
+  if( (rc&0xff)==SQLITE_ABORT ){
+    sqlite3_free_table(&res.azResult[1]);
+    if( res.zErrMsg ){
+      if( pzErrMsg ){
+        sqlite3_free(*pzErrMsg);
+        *pzErrMsg = sqlite3_mprintf("%s",res.zErrMsg);
+      }
+      sqlite3_free(res.zErrMsg);
+    }
+    db->errCode = res.rc;  /* Assume 32-bit assignment is atomic */
+    return res.rc;
+  }
+  sqlite3_free(res.zErrMsg);
+  if( rc!=SQLITE_OK ){
+    sqlite3_free_table(&res.azResult[1]);
+    return rc;
+  }
+  if( res.nAlloc>res.nData ){
+    char **azNew;
+    azNew = sqlite3_realloc( res.azResult, sizeof(char*)*res.nData );
+    if( azNew==0 ){
+      sqlite3_free_table(&res.azResult[1]);
+      db->errCode = SQLITE_NOMEM;
+      return SQLITE_NOMEM;
+    }
+    res.azResult = azNew;
+  }
+  *pazResult = &res.azResult[1];
+  if( pnColumn ) *pnColumn = res.nColumn;
+  if( pnRow ) *pnRow = res.nRow;
+  return rc;
+}
+
+/*
+** This routine frees the space the sqlite3_get_table() malloced.
+*/
+SQLITE_API void sqlite3_free_table(
+  char **azResult            /* Result returned from from sqlite3_get_table() */
+){
+  if( azResult ){
+    int i, n;
+    azResult--;
+    assert( azResult!=0 );
+    n = SQLITE_PTR_TO_INT(azResult[0]);
+    for(i=1; i<n; i++){ if( azResult[i] ) sqlite3_free(azResult[i]); }
+    sqlite3_free(azResult);
+  }
+}
+
+#endif /* SQLITE_OMIT_GET_TABLE */
+
+/************** End of table.c ***********************************************/
+/************** Begin file trigger.c *****************************************/
+/*
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains the implementation for TRIGGERs
+*/
+
+#ifndef SQLITE_OMIT_TRIGGER
+/*
+** Delete a linked list of TriggerStep structures.
+*/
+SQLITE_PRIVATE void sqlite3DeleteTriggerStep(sqlite3 *db, TriggerStep *pTriggerStep){
+  while( pTriggerStep ){
+    TriggerStep * pTmp = pTriggerStep;
+    pTriggerStep = pTriggerStep->pNext;
+
+    sqlite3ExprDelete(db, pTmp->pWhere);
+    sqlite3ExprListDelete(db, pTmp->pExprList);
+    sqlite3SelectDelete(db, pTmp->pSelect);
+    sqlite3IdListDelete(db, pTmp->pIdList);
+
+    sqlite3DbFree(db, pTmp);
+  }
+}
+
+/*
+** Given table pTab, return a list of all the triggers attached to 
+** the table. The list is connected by Trigger.pNext pointers.
+**
+** All of the triggers on pTab that are in the same database as pTab
+** are already attached to pTab->pTrigger.  But there might be additional
+** triggers on pTab in the TEMP schema.  This routine prepends all
+** TEMP triggers on pTab to the beginning of the pTab->pTrigger list
+** and returns the combined list.
+**
+** To state it another way:  This routine returns a list of all triggers
+** that fire off of pTab.  The list will include any TEMP triggers on
+** pTab as well as the triggers lised in pTab->pTrigger.
+*/
+SQLITE_PRIVATE Trigger *sqlite3TriggerList(Parse *pParse, Table *pTab){
+  Schema * const pTmpSchema = pParse->db->aDb[1].pSchema;
+  Trigger *pList = 0;                  /* List of triggers to return */
+
+  if( pParse->disableTriggers ){
+    return 0;
+  }
+
+  if( pTmpSchema!=pTab->pSchema ){
+    HashElem *p;
+    assert( sqlite3SchemaMutexHeld(pParse->db, 0, pTmpSchema) );
+    for(p=sqliteHashFirst(&pTmpSchema->trigHash); p; p=sqliteHashNext(p)){
+      Trigger *pTrig = (Trigger *)sqliteHashData(p);
+      if( pTrig->pTabSchema==pTab->pSchema
+       && 0==sqlite3StrICmp(pTrig->table, pTab->zName) 
+      ){
+        pTrig->pNext = (pList ? pList : pTab->pTrigger);
+        pList = pTrig;
+      }
+    }
+  }
+
+  return (pList ? pList : pTab->pTrigger);
+}
+
+/*
+** This is called by the parser when it sees a CREATE TRIGGER statement
+** up to the point of the BEGIN before the trigger actions.  A Trigger
+** structure is generated based on the information available and stored
+** in pParse->pNewTrigger.  After the trigger actions have been parsed, the
+** sqlite3FinishTrigger() function is called to complete the trigger
+** construction process.
+*/
+SQLITE_PRIVATE void sqlite3BeginTrigger(
+  Parse *pParse,      /* The parse context of the CREATE TRIGGER statement */
+  Token *pName1,      /* The name of the trigger */
+  Token *pName2,      /* The name of the trigger */
+  int tr_tm,          /* One of TK_BEFORE, TK_AFTER, TK_INSTEAD */
+  int op,             /* One of TK_INSERT, TK_UPDATE, TK_DELETE */
+  IdList *pColumns,   /* column list if this is an UPDATE OF trigger */
+  SrcList *pTableName,/* The name of the table/view the trigger applies to */
+  Expr *pWhen,        /* WHEN clause */
+  int isTemp,         /* True if the TEMPORARY keyword is present */
+  int noErr           /* Suppress errors if the trigger already exists */
+){
+  Trigger *pTrigger = 0;  /* The new trigger */
+  Table *pTab;            /* Table that the trigger fires off of */
+  char *zName = 0;        /* Name of the trigger */
+  sqlite3 *db = pParse->db;  /* The database connection */
+  int iDb;                /* The database to store the trigger in */
+  Token *pName;           /* The unqualified db name */
+  DbFixer sFix;           /* State vector for the DB fixer */
+  int iTabDb;             /* Index of the database holding pTab */
+
+  assert( pName1!=0 );   /* pName1->z might be NULL, but not pName1 itself */
+  assert( pName2!=0 );
+  assert( op==TK_INSERT || op==TK_UPDATE || op==TK_DELETE );
+  assert( op>0 && op<0xff );
+  if( isTemp ){
+    /* If TEMP was specified, then the trigger name may not be qualified. */
+    if( pName2->n>0 ){
+      sqlite3ErrorMsg(pParse, "temporary trigger may not have qualified name");
+      goto trigger_cleanup;
+    }
+    iDb = 1;
+    pName = pName1;
+  }else{
+    /* Figure out the db that the the trigger will be created in */
+    iDb = sqlite3TwoPartName(pParse, pName1, pName2, &pName);
+    if( iDb<0 ){
+      goto trigger_cleanup;
+    }
+  }
+
+  /* If the trigger name was unqualified, and the table is a temp table,
+  ** then set iDb to 1 to create the trigger in the temporary database.
+  ** If sqlite3SrcListLookup() returns 0, indicating the table does not
+  ** exist, the error is caught by the block below.
+  */
+  if( !pTableName || db->mallocFailed ){
+    goto trigger_cleanup;
+  }
+  pTab = sqlite3SrcListLookup(pParse, pTableName);
+  if( db->init.busy==0 && pName2->n==0 && pTab
+        && pTab->pSchema==db->aDb[1].pSchema ){
+    iDb = 1;
+  }
+
+  /* Ensure the table name matches database name and that the table exists */
+  if( db->mallocFailed ) goto trigger_cleanup;
+  assert( pTableName->nSrc==1 );
+  if( sqlite3FixInit(&sFix, pParse, iDb, "trigger", pName) && 
+      sqlite3FixSrcList(&sFix, pTableName) ){
+    goto trigger_cleanup;
+  }
+  pTab = sqlite3SrcListLookup(pParse, pTableName);
+  if( !pTab ){
+    /* The table does not exist. */
+    if( db->init.iDb==1 ){
+      /* Ticket #3810.
+      ** Normally, whenever a table is dropped, all associated triggers are
+      ** dropped too.  But if a TEMP trigger is created on a non-TEMP table
+      ** and the table is dropped by a different database connection, the
+      ** trigger is not visible to the database connection that does the
+      ** drop so the trigger cannot be dropped.  This results in an
+      ** "orphaned trigger" - a trigger whose associated table is missing.
+      */
+      db->init.orphanTrigger = 1;
+    }
+    goto trigger_cleanup;
+  }
+  if( IsVirtual(pTab) ){
+    sqlite3ErrorMsg(pParse, "cannot create triggers on virtual tables");
+    goto trigger_cleanup;
+  }
+
+  /* Check that the trigger name is not reserved and that no trigger of the
+  ** specified name exists */
+  zName = sqlite3NameFromToken(db, pName);
+  if( !zName || SQLITE_OK!=sqlite3CheckObjectName(pParse, zName) ){
+    goto trigger_cleanup;
+  }
+  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+  if( sqlite3HashFind(&(db->aDb[iDb].pSchema->trigHash),
+                      zName, sqlite3Strlen30(zName)) ){
+    if( !noErr ){
+      sqlite3ErrorMsg(pParse, "trigger %T already exists", pName);
+    }else{
+      assert( !db->init.busy );
+      sqlite3CodeVerifySchema(pParse, iDb);
+    }
+    goto trigger_cleanup;
+  }
+
+  /* Do not create a trigger on a system table */
+  if( sqlite3StrNICmp(pTab->zName, "sqlite_", 7)==0 ){
+    sqlite3ErrorMsg(pParse, "cannot create trigger on system table");
+    pParse->nErr++;
+    goto trigger_cleanup;
+  }
+
+  /* INSTEAD of triggers are only for views and views only support INSTEAD
+  ** of triggers.
+  */
+  if( pTab->pSelect && tr_tm!=TK_INSTEAD ){
+    sqlite3ErrorMsg(pParse, "cannot create %s trigger on view: %S", 
+        (tr_tm == TK_BEFORE)?"BEFORE":"AFTER", pTableName, 0);
+    goto trigger_cleanup;
+  }
+  if( !pTab->pSelect && tr_tm==TK_INSTEAD ){
+    sqlite3ErrorMsg(pParse, "cannot create INSTEAD OF"
+        " trigger on table: %S", pTableName, 0);
+    goto trigger_cleanup;
+  }
+  iTabDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  {
+    int code = SQLITE_CREATE_TRIGGER;
+    const char *zDb = db->aDb[iTabDb].zName;
+    const char *zDbTrig = isTemp ? db->aDb[1].zName : zDb;
+    if( iTabDb==1 || isTemp ) code = SQLITE_CREATE_TEMP_TRIGGER;
+    if( sqlite3AuthCheck(pParse, code, zName, pTab->zName, zDbTrig) ){
+      goto trigger_cleanup;
+    }
+    if( sqlite3AuthCheck(pParse, SQLITE_INSERT, SCHEMA_TABLE(iTabDb),0,zDb)){
+      goto trigger_cleanup;
+    }
+  }
+#endif
+
+  /* INSTEAD OF triggers can only appear on views and BEFORE triggers
+  ** cannot appear on views.  So we might as well translate every
+  ** INSTEAD OF trigger into a BEFORE trigger.  It simplifies code
+  ** elsewhere.
+  */
+  if (tr_tm == TK_INSTEAD){
+    tr_tm = TK_BEFORE;
+  }
+
+  /* Build the Trigger object */
+  pTrigger = (Trigger*)sqlite3DbMallocZero(db, sizeof(Trigger));
+  if( pTrigger==0 ) goto trigger_cleanup;
+  pTrigger->zName = zName;
+  zName = 0;
+  pTrigger->table = sqlite3DbStrDup(db, pTableName->a[0].zName);
+  pTrigger->pSchema = db->aDb[iDb].pSchema;
+  pTrigger->pTabSchema = pTab->pSchema;
+  pTrigger->op = (u8)op;
+  pTrigger->tr_tm = tr_tm==TK_BEFORE ? TRIGGER_BEFORE : TRIGGER_AFTER;
+  pTrigger->pWhen = sqlite3ExprDup(db, pWhen, EXPRDUP_REDUCE);
+  pTrigger->pColumns = sqlite3IdListDup(db, pColumns);
+  assert( pParse->pNewTrigger==0 );
+  pParse->pNewTrigger = pTrigger;
+
+trigger_cleanup:
+  sqlite3DbFree(db, zName);
+  sqlite3SrcListDelete(db, pTableName);
+  sqlite3IdListDelete(db, pColumns);
+  sqlite3ExprDelete(db, pWhen);
+  if( !pParse->pNewTrigger ){
+    sqlite3DeleteTrigger(db, pTrigger);
+  }else{
+    assert( pParse->pNewTrigger==pTrigger );
+  }
+}
+
+/*
+** This routine is called after all of the trigger actions have been parsed
+** in order to complete the process of building the trigger.
+*/
+SQLITE_PRIVATE void sqlite3FinishTrigger(
+  Parse *pParse,          /* Parser context */
+  TriggerStep *pStepList, /* The triggered program */
+  Token *pAll             /* Token that describes the complete CREATE TRIGGER */
+){
+  Trigger *pTrig = pParse->pNewTrigger;   /* Trigger being finished */
+  char *zName;                            /* Name of trigger */
+  sqlite3 *db = pParse->db;               /* The database */
+  DbFixer sFix;                           /* Fixer object */
+  int iDb;                                /* Database containing the trigger */
+  Token nameToken;                        /* Trigger name for error reporting */
+
+  pParse->pNewTrigger = 0;
+  if( NEVER(pParse->nErr) || !pTrig ) goto triggerfinish_cleanup;
+  zName = pTrig->zName;
+  iDb = sqlite3SchemaToIndex(pParse->db, pTrig->pSchema);
+  pTrig->step_list = pStepList;
+  while( pStepList ){
+    pStepList->pTrig = pTrig;
+    pStepList = pStepList->pNext;
+  }
+  nameToken.z = pTrig->zName;
+  nameToken.n = sqlite3Strlen30(nameToken.z);
+  if( sqlite3FixInit(&sFix, pParse, iDb, "trigger", &nameToken) 
+          && sqlite3FixTriggerStep(&sFix, pTrig->step_list) ){
+    goto triggerfinish_cleanup;
+  }
+
+  /* if we are not initializing,
+  ** build the sqlite_master entry
+  */
+  if( !db->init.busy ){
+    Vdbe *v;
+    char *z;
+
+    /* Make an entry in the sqlite_master table */
+    v = sqlite3GetVdbe(pParse);
+    if( v==0 ) goto triggerfinish_cleanup;
+    sqlite3BeginWriteOperation(pParse, 0, iDb);
+    z = sqlite3DbStrNDup(db, (char*)pAll->z, pAll->n);
+    sqlite3NestedParse(pParse,
+       "INSERT INTO %Q.%s VALUES('trigger',%Q,%Q,0,'CREATE TRIGGER %q')",
+       db->aDb[iDb].zName, SCHEMA_TABLE(iDb), zName,
+       pTrig->table, z);
+    sqlite3DbFree(db, z);
+    sqlite3ChangeCookie(pParse, iDb);
+    sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 0, 0, sqlite3MPrintf(
+        db, "type='trigger' AND name='%q'", zName), P4_DYNAMIC
+    );
+  }
+
+  if( db->init.busy ){
+    Trigger *pLink = pTrig;
+    Hash *pHash = &db->aDb[iDb].pSchema->trigHash;
+    assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+    pTrig = sqlite3HashInsert(pHash, zName, sqlite3Strlen30(zName), pTrig);
+    if( pTrig ){
+      db->mallocFailed = 1;
+    }else if( pLink->pSchema==pLink->pTabSchema ){
+      Table *pTab;
+      int n = sqlite3Strlen30(pLink->table);
+      pTab = sqlite3HashFind(&pLink->pTabSchema->tblHash, pLink->table, n);
+      assert( pTab!=0 );
+      pLink->pNext = pTab->pTrigger;
+      pTab->pTrigger = pLink;
+    }
+  }
+
+triggerfinish_cleanup:
+  sqlite3DeleteTrigger(db, pTrig);
+  assert( !pParse->pNewTrigger );
+  sqlite3DeleteTriggerStep(db, pStepList);
+}
+
+/*
+** Turn a SELECT statement (that the pSelect parameter points to) into
+** a trigger step.  Return a pointer to a TriggerStep structure.
+**
+** The parser calls this routine when it finds a SELECT statement in
+** body of a TRIGGER.  
+*/
+SQLITE_PRIVATE TriggerStep *sqlite3TriggerSelectStep(sqlite3 *db, Select *pSelect){
+  TriggerStep *pTriggerStep = sqlite3DbMallocZero(db, sizeof(TriggerStep));
+  if( pTriggerStep==0 ) {
+    sqlite3SelectDelete(db, pSelect);
+    return 0;
+  }
+  pTriggerStep->op = TK_SELECT;
+  pTriggerStep->pSelect = pSelect;
+  pTriggerStep->orconf = OE_Default;
+  return pTriggerStep;
+}
+
+/*
+** Allocate space to hold a new trigger step.  The allocated space
+** holds both the TriggerStep object and the TriggerStep.target.z string.
+**
+** If an OOM error occurs, NULL is returned and db->mallocFailed is set.
+*/
+static TriggerStep *triggerStepAllocate(
+  sqlite3 *db,                /* Database connection */
+  u8 op,                      /* Trigger opcode */
+  Token *pName                /* The target name */
+){
+  TriggerStep *pTriggerStep;
+
+  pTriggerStep = sqlite3DbMallocZero(db, sizeof(TriggerStep) + pName->n);
+  if( pTriggerStep ){
+    char *z = (char*)&pTriggerStep[1];
+    memcpy(z, pName->z, pName->n);
+    pTriggerStep->target.z = z;
+    pTriggerStep->target.n = pName->n;
+    pTriggerStep->op = op;
+  }
+  return pTriggerStep;
+}
+
+/*
+** Build a trigger step out of an INSERT statement.  Return a pointer
+** to the new trigger step.
+**
+** The parser calls this routine when it sees an INSERT inside the
+** body of a trigger.
+*/
+SQLITE_PRIVATE TriggerStep *sqlite3TriggerInsertStep(
+  sqlite3 *db,        /* The database connection */
+  Token *pTableName,  /* Name of the table into which we insert */
+  IdList *pColumn,    /* List of columns in pTableName to insert into */
+  ExprList *pEList,   /* The VALUE clause: a list of values to be inserted */
+  Select *pSelect,    /* A SELECT statement that supplies values */
+  u8 orconf           /* The conflict algorithm (OE_Abort, OE_Replace, etc.) */
+){
+  TriggerStep *pTriggerStep;
+
+  assert(pEList == 0 || pSelect == 0);
+  assert(pEList != 0 || pSelect != 0 || db->mallocFailed);
+
+  pTriggerStep = triggerStepAllocate(db, TK_INSERT, pTableName);
+  if( pTriggerStep ){
+    pTriggerStep->pSelect = sqlite3SelectDup(db, pSelect, EXPRDUP_REDUCE);
+    pTriggerStep->pIdList = pColumn;
+    pTriggerStep->pExprList = sqlite3ExprListDup(db, pEList, EXPRDUP_REDUCE);
+    pTriggerStep->orconf = orconf;
+  }else{
+    sqlite3IdListDelete(db, pColumn);
+  }
+  sqlite3ExprListDelete(db, pEList);
+  sqlite3SelectDelete(db, pSelect);
+
+  return pTriggerStep;
+}
+
+/*
+** Construct a trigger step that implements an UPDATE statement and return
+** a pointer to that trigger step.  The parser calls this routine when it
+** sees an UPDATE statement inside the body of a CREATE TRIGGER.
+*/
+SQLITE_PRIVATE TriggerStep *sqlite3TriggerUpdateStep(
+  sqlite3 *db,         /* The database connection */
+  Token *pTableName,   /* Name of the table to be updated */
+  ExprList *pEList,    /* The SET clause: list of column and new values */
+  Expr *pWhere,        /* The WHERE clause */
+  u8 orconf            /* The conflict algorithm. (OE_Abort, OE_Ignore, etc) */
+){
+  TriggerStep *pTriggerStep;
+
+  pTriggerStep = triggerStepAllocate(db, TK_UPDATE, pTableName);
+  if( pTriggerStep ){
+    pTriggerStep->pExprList = sqlite3ExprListDup(db, pEList, EXPRDUP_REDUCE);
+    pTriggerStep->pWhere = sqlite3ExprDup(db, pWhere, EXPRDUP_REDUCE);
+    pTriggerStep->orconf = orconf;
+  }
+  sqlite3ExprListDelete(db, pEList);
+  sqlite3ExprDelete(db, pWhere);
+  return pTriggerStep;
+}
+
+/*
+** Construct a trigger step that implements a DELETE statement and return
+** a pointer to that trigger step.  The parser calls this routine when it
+** sees a DELETE statement inside the body of a CREATE TRIGGER.
+*/
+SQLITE_PRIVATE TriggerStep *sqlite3TriggerDeleteStep(
+  sqlite3 *db,            /* Database connection */
+  Token *pTableName,      /* The table from which rows are deleted */
+  Expr *pWhere            /* The WHERE clause */
+){
+  TriggerStep *pTriggerStep;
+
+  pTriggerStep = triggerStepAllocate(db, TK_DELETE, pTableName);
+  if( pTriggerStep ){
+    pTriggerStep->pWhere = sqlite3ExprDup(db, pWhere, EXPRDUP_REDUCE);
+    pTriggerStep->orconf = OE_Default;
+  }
+  sqlite3ExprDelete(db, pWhere);
+  return pTriggerStep;
+}
+
+/* 
+** Recursively delete a Trigger structure
+*/
+SQLITE_PRIVATE void sqlite3DeleteTrigger(sqlite3 *db, Trigger *pTrigger){
+  if( pTrigger==0 ) return;
+  sqlite3DeleteTriggerStep(db, pTrigger->step_list);
+  sqlite3DbFree(db, pTrigger->zName);
+  sqlite3DbFree(db, pTrigger->table);
+  sqlite3ExprDelete(db, pTrigger->pWhen);
+  sqlite3IdListDelete(db, pTrigger->pColumns);
+  sqlite3DbFree(db, pTrigger);
+}
+
+/*
+** This function is called to drop a trigger from the database schema. 
+**
+** This may be called directly from the parser and therefore identifies
+** the trigger by name.  The sqlite3DropTriggerPtr() routine does the
+** same job as this routine except it takes a pointer to the trigger
+** instead of the trigger name.
+**/
+SQLITE_PRIVATE void sqlite3DropTrigger(Parse *pParse, SrcList *pName, int noErr){
+  Trigger *pTrigger = 0;
+  int i;
+  const char *zDb;
+  const char *zName;
+  int nName;
+  sqlite3 *db = pParse->db;
+
+  if( db->mallocFailed ) goto drop_trigger_cleanup;
+  if( SQLITE_OK!=sqlite3ReadSchema(pParse) ){
+    goto drop_trigger_cleanup;
+  }
+
+  assert( pName->nSrc==1 );
+  zDb = pName->a[0].zDatabase;
+  zName = pName->a[0].zName;
+  nName = sqlite3Strlen30(zName);
+  assert( zDb!=0 || sqlite3BtreeHoldsAllMutexes(db) );
+  for(i=OMIT_TEMPDB; i<db->nDb; i++){
+    int j = (i<2) ? i^1 : i;  /* Search TEMP before MAIN */
+    if( zDb && sqlite3StrICmp(db->aDb[j].zName, zDb) ) continue;
+    assert( sqlite3SchemaMutexHeld(db, j, 0) );
+    pTrigger = sqlite3HashFind(&(db->aDb[j].pSchema->trigHash), zName, nName);
+    if( pTrigger ) break;
+  }
+  if( !pTrigger ){
+    if( !noErr ){
+      sqlite3ErrorMsg(pParse, "no such trigger: %S", pName, 0);
+    }else{
+      sqlite3CodeVerifyNamedSchema(pParse, zDb);
+    }
+    pParse->checkSchema = 1;
+    goto drop_trigger_cleanup;
+  }
+  sqlite3DropTriggerPtr(pParse, pTrigger);
+
+drop_trigger_cleanup:
+  sqlite3SrcListDelete(db, pName);
+}
+
+/*
+** Return a pointer to the Table structure for the table that a trigger
+** is set on.
+*/
+static Table *tableOfTrigger(Trigger *pTrigger){
+  int n = sqlite3Strlen30(pTrigger->table);
+  return sqlite3HashFind(&pTrigger->pTabSchema->tblHash, pTrigger->table, n);
+}
+
+
+/*
+** Drop a trigger given a pointer to that trigger. 
+*/
+SQLITE_PRIVATE void sqlite3DropTriggerPtr(Parse *pParse, Trigger *pTrigger){
+  Table   *pTable;
+  Vdbe *v;
+  sqlite3 *db = pParse->db;
+  int iDb;
+
+  iDb = sqlite3SchemaToIndex(pParse->db, pTrigger->pSchema);
+  assert( iDb>=0 && iDb<db->nDb );
+  pTable = tableOfTrigger(pTrigger);
+  assert( pTable );
+  assert( pTable->pSchema==pTrigger->pSchema || iDb==1 );
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  {
+    int code = SQLITE_DROP_TRIGGER;
+    const char *zDb = db->aDb[iDb].zName;
+    const char *zTab = SCHEMA_TABLE(iDb);
+    if( iDb==1 ) code = SQLITE_DROP_TEMP_TRIGGER;
+    if( sqlite3AuthCheck(pParse, code, pTrigger->zName, pTable->zName, zDb) ||
+      sqlite3AuthCheck(pParse, SQLITE_DELETE, zTab, 0, zDb) ){
+      return;
+    }
+  }
+#endif
+
+  /* Generate code to destroy the database record of the trigger.
+  */
+  assert( pTable!=0 );
+  if( (v = sqlite3GetVdbe(pParse))!=0 ){
+    int base;
+    static const VdbeOpList dropTrigger[] = {
+      { OP_Rewind,     0, ADDR(9),  0},
+      { OP_String8,    0, 1,        0}, /* 1 */
+      { OP_Column,     0, 1,        2},
+      { OP_Ne,         2, ADDR(8),  1},
+      { OP_String8,    0, 1,        0}, /* 4: "trigger" */
+      { OP_Column,     0, 0,        2},
+      { OP_Ne,         2, ADDR(8),  1},
+      { OP_Delete,     0, 0,        0},
+      { OP_Next,       0, ADDR(1),  0}, /* 8 */
+    };
+
+    sqlite3BeginWriteOperation(pParse, 0, iDb);
+    sqlite3OpenMasterTable(pParse, iDb);
+    base = sqlite3VdbeAddOpList(v,  ArraySize(dropTrigger), dropTrigger);
+    sqlite3VdbeChangeP4(v, base+1, pTrigger->zName, P4_TRANSIENT);
+    sqlite3VdbeChangeP4(v, base+4, "trigger", P4_STATIC);
+    sqlite3ChangeCookie(pParse, iDb);
+    sqlite3VdbeAddOp2(v, OP_Close, 0, 0);
+    sqlite3VdbeAddOp4(v, OP_DropTrigger, iDb, 0, 0, pTrigger->zName, 0);
+    if( pParse->nMem<3 ){
+      pParse->nMem = 3;
+    }
+  }
+}
+
+/*
+** Remove a trigger from the hash tables of the sqlite* pointer.
+*/
+SQLITE_PRIVATE void sqlite3UnlinkAndDeleteTrigger(sqlite3 *db, int iDb, const char *zName){
+  Trigger *pTrigger;
+  Hash *pHash;
+
+  assert( sqlite3SchemaMutexHeld(db, iDb, 0) );
+  pHash = &(db->aDb[iDb].pSchema->trigHash);
+  pTrigger = sqlite3HashInsert(pHash, zName, sqlite3Strlen30(zName), 0);
+  if( ALWAYS(pTrigger) ){
+    if( pTrigger->pSchema==pTrigger->pTabSchema ){
+      Table *pTab = tableOfTrigger(pTrigger);
+      Trigger **pp;
+      for(pp=&pTab->pTrigger; *pp!=pTrigger; pp=&((*pp)->pNext));
+      *pp = (*pp)->pNext;
+    }
+    sqlite3DeleteTrigger(db, pTrigger);
+    db->flags |= SQLITE_InternChanges;
+  }
+}
+
+/*
+** pEList is the SET clause of an UPDATE statement.  Each entry
+** in pEList is of the format <id>=<expr>.  If any of the entries
+** in pEList have an <id> which matches an identifier in pIdList,
+** then return TRUE.  If pIdList==NULL, then it is considered a
+** wildcard that matches anything.  Likewise if pEList==NULL then
+** it matches anything so always return true.  Return false only
+** if there is no match.
+*/
+static int checkColumnOverlap(IdList *pIdList, ExprList *pEList){
+  int e;
+  if( pIdList==0 || NEVER(pEList==0) ) return 1;
+  for(e=0; e<pEList->nExpr; e++){
+    if( sqlite3IdListIndex(pIdList, pEList->a[e].zName)>=0 ) return 1;
+  }
+  return 0; 
+}
+
+/*
+** Return a list of all triggers on table pTab if there exists at least
+** one trigger that must be fired when an operation of type 'op' is 
+** performed on the table, and, if that operation is an UPDATE, if at
+** least one of the columns in pChanges is being modified.
+*/
+SQLITE_PRIVATE Trigger *sqlite3TriggersExist(
+  Parse *pParse,          /* Parse context */
+  Table *pTab,            /* The table the contains the triggers */
+  int op,                 /* one of TK_DELETE, TK_INSERT, TK_UPDATE */
+  ExprList *pChanges,     /* Columns that change in an UPDATE statement */
+  int *pMask              /* OUT: Mask of TRIGGER_BEFORE|TRIGGER_AFTER */
+){
+  int mask = 0;
+  Trigger *pList = 0;
+  Trigger *p;
+
+  if( (pParse->db->flags & SQLITE_EnableTrigger)!=0 ){
+    pList = sqlite3TriggerList(pParse, pTab);
+  }
+  assert( pList==0 || IsVirtual(pTab)==0 );
+  for(p=pList; p; p=p->pNext){
+    if( p->op==op && checkColumnOverlap(p->pColumns, pChanges) ){
+      mask |= p->tr_tm;
+    }
+  }
+  if( pMask ){
+    *pMask = mask;
+  }
+  return (mask ? pList : 0);
+}
+
+/*
+** Convert the pStep->target token into a SrcList and return a pointer
+** to that SrcList.
+**
+** This routine adds a specific database name, if needed, to the target when
+** forming the SrcList.  This prevents a trigger in one database from
+** referring to a target in another database.  An exception is when the
+** trigger is in TEMP in which case it can refer to any other database it
+** wants.
+*/
+static SrcList *targetSrcList(
+  Parse *pParse,       /* The parsing context */
+  TriggerStep *pStep   /* The trigger containing the target token */
+){
+  int iDb;             /* Index of the database to use */
+  SrcList *pSrc;       /* SrcList to be returned */
+
+  pSrc = sqlite3SrcListAppend(pParse->db, 0, &pStep->target, 0);
+  if( pSrc ){
+    assert( pSrc->nSrc>0 );
+    assert( pSrc->a!=0 );
+    iDb = sqlite3SchemaToIndex(pParse->db, pStep->pTrig->pSchema);
+    if( iDb==0 || iDb>=2 ){
+      sqlite3 *db = pParse->db;
+      assert( iDb<pParse->db->nDb );
+      pSrc->a[pSrc->nSrc-1].zDatabase = sqlite3DbStrDup(db, db->aDb[iDb].zName);
+    }
+  }
+  return pSrc;
+}
+
+/*
+** Generate VDBE code for the statements inside the body of a single 
+** trigger.
+*/
+static int codeTriggerProgram(
+  Parse *pParse,            /* The parser context */
+  TriggerStep *pStepList,   /* List of statements inside the trigger body */
+  int orconf                /* Conflict algorithm. (OE_Abort, etc) */  
+){
+  TriggerStep *pStep;
+  Vdbe *v = pParse->pVdbe;
+  sqlite3 *db = pParse->db;
+
+  assert( pParse->pTriggerTab && pParse->pToplevel );
+  assert( pStepList );
+  assert( v!=0 );
+  for(pStep=pStepList; pStep; pStep=pStep->pNext){
+    /* Figure out the ON CONFLICT policy that will be used for this step
+    ** of the trigger program. If the statement that caused this trigger
+    ** to fire had an explicit ON CONFLICT, then use it. Otherwise, use
+    ** the ON CONFLICT policy that was specified as part of the trigger
+    ** step statement. Example:
+    **
+    **   CREATE TRIGGER AFTER INSERT ON t1 BEGIN;
+    **     INSERT OR REPLACE INTO t2 VALUES(new.a, new.b);
+    **   END;
+    **
+    **   INSERT INTO t1 ... ;            -- insert into t2 uses REPLACE policy
+    **   INSERT OR IGNORE INTO t1 ... ;  -- insert into t2 uses IGNORE policy
+    */
+    pParse->eOrconf = (orconf==OE_Default)?pStep->orconf:(u8)orconf;
+
+    switch( pStep->op ){
+      case TK_UPDATE: {
+        sqlite3Update(pParse, 
+          targetSrcList(pParse, pStep),
+          sqlite3ExprListDup(db, pStep->pExprList, 0), 
+          sqlite3ExprDup(db, pStep->pWhere, 0), 
+          pParse->eOrconf
+        );
+        break;
+      }
+      case TK_INSERT: {
+        sqlite3Insert(pParse, 
+          targetSrcList(pParse, pStep),
+          sqlite3ExprListDup(db, pStep->pExprList, 0), 
+          sqlite3SelectDup(db, pStep->pSelect, 0), 
+          sqlite3IdListDup(db, pStep->pIdList), 
+          pParse->eOrconf
+        );
+        break;
+      }
+      case TK_DELETE: {
+        sqlite3DeleteFrom(pParse, 
+          targetSrcList(pParse, pStep),
+          sqlite3ExprDup(db, pStep->pWhere, 0)
+        );
+        break;
+      }
+      default: assert( pStep->op==TK_SELECT ); {
+        SelectDest sDest;
+        Select *pSelect = sqlite3SelectDup(db, pStep->pSelect, 0);
+        sqlite3SelectDestInit(&sDest, SRT_Discard, 0);
+        sqlite3Select(pParse, pSelect, &sDest);
+        sqlite3SelectDelete(db, pSelect);
+        break;
+      }
+    } 
+    if( pStep->op!=TK_SELECT ){
+      sqlite3VdbeAddOp0(v, OP_ResetCount);
+    }
+  }
+
+  return 0;
+}
+
+#ifdef SQLITE_DEBUG
+/*
+** This function is used to add VdbeComment() annotations to a VDBE
+** program. It is not used in production code, only for debugging.
+*/
+static const char *onErrorText(int onError){
+  switch( onError ){
+    case OE_Abort:    return "abort";
+    case OE_Rollback: return "rollback";
+    case OE_Fail:     return "fail";
+    case OE_Replace:  return "replace";
+    case OE_Ignore:   return "ignore";
+    case OE_Default:  return "default";
+  }
+  return "n/a";
+}
+#endif
+
+/*
+** Parse context structure pFrom has just been used to create a sub-vdbe
+** (trigger program). If an error has occurred, transfer error information
+** from pFrom to pTo.
+*/
+static void transferParseError(Parse *pTo, Parse *pFrom){
+  assert( pFrom->zErrMsg==0 || pFrom->nErr );
+  assert( pTo->zErrMsg==0 || pTo->nErr );
+  if( pTo->nErr==0 ){
+    pTo->zErrMsg = pFrom->zErrMsg;
+    pTo->nErr = pFrom->nErr;
+  }else{
+    sqlite3DbFree(pFrom->db, pFrom->zErrMsg);
+  }
+}
+
+/*
+** Create and populate a new TriggerPrg object with a sub-program 
+** implementing trigger pTrigger with ON CONFLICT policy orconf.
+*/
+static TriggerPrg *codeRowTrigger(
+  Parse *pParse,       /* Current parse context */
+  Trigger *pTrigger,   /* Trigger to code */
+  Table *pTab,         /* The table pTrigger is attached to */
+  int orconf           /* ON CONFLICT policy to code trigger program with */
+){
+  Parse *pTop = sqlite3ParseToplevel(pParse);
+  sqlite3 *db = pParse->db;   /* Database handle */
+  TriggerPrg *pPrg;           /* Value to return */
+  Expr *pWhen = 0;            /* Duplicate of trigger WHEN expression */
+  Vdbe *v;                    /* Temporary VM */
+  NameContext sNC;            /* Name context for sub-vdbe */
+  SubProgram *pProgram = 0;   /* Sub-vdbe for trigger program */
+  Parse *pSubParse;           /* Parse context for sub-vdbe */
+  int iEndTrigger = 0;        /* Label to jump to if WHEN is false */
+
+  assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
+  assert( pTop->pVdbe );
+
+  /* Allocate the TriggerPrg and SubProgram objects. To ensure that they
+  ** are freed if an error occurs, link them into the Parse.pTriggerPrg 
+  ** list of the top-level Parse object sooner rather than later.  */
+  pPrg = sqlite3DbMallocZero(db, sizeof(TriggerPrg));
+  if( !pPrg ) return 0;
+  pPrg->pNext = pTop->pTriggerPrg;
+  pTop->pTriggerPrg = pPrg;
+  pPrg->pProgram = pProgram = sqlite3DbMallocZero(db, sizeof(SubProgram));
+  if( !pProgram ) return 0;
+  sqlite3VdbeLinkSubProgram(pTop->pVdbe, pProgram);
+  pPrg->pTrigger = pTrigger;
+  pPrg->orconf = orconf;
+  pPrg->aColmask[0] = 0xffffffff;
+  pPrg->aColmask[1] = 0xffffffff;
+
+  /* Allocate and populate a new Parse context to use for coding the 
+  ** trigger sub-program.  */
+  pSubParse = sqlite3StackAllocZero(db, sizeof(Parse));
+  if( !pSubParse ) return 0;
+  memset(&sNC, 0, sizeof(sNC));
+  sNC.pParse = pSubParse;
+  pSubParse->db = db;
+  pSubParse->pTriggerTab = pTab;
+  pSubParse->pToplevel = pTop;
+  pSubParse->zAuthContext = pTrigger->zName;
+  pSubParse->eTriggerOp = pTrigger->op;
+  pSubParse->nQueryLoop = pParse->nQueryLoop;
+
+  v = sqlite3GetVdbe(pSubParse);
+  if( v ){
+    VdbeComment((v, "Start: %s.%s (%s %s%s%s ON %s)", 
+      pTrigger->zName, onErrorText(orconf),
+      (pTrigger->tr_tm==TRIGGER_BEFORE ? "BEFORE" : "AFTER"),
+        (pTrigger->op==TK_UPDATE ? "UPDATE" : ""),
+        (pTrigger->op==TK_INSERT ? "INSERT" : ""),
+        (pTrigger->op==TK_DELETE ? "DELETE" : ""),
+      pTab->zName
+    ));
+#ifndef SQLITE_OMIT_TRACE
+    sqlite3VdbeChangeP4(v, -1, 
+      sqlite3MPrintf(db, "-- TRIGGER %s", pTrigger->zName), P4_DYNAMIC
+    );
+#endif
+
+    /* If one was specified, code the WHEN clause. If it evaluates to false
+    ** (or NULL) the sub-vdbe is immediately halted by jumping to the 
+    ** OP_Halt inserted at the end of the program.  */
+    if( pTrigger->pWhen ){
+      pWhen = sqlite3ExprDup(db, pTrigger->pWhen, 0);
+      if( SQLITE_OK==sqlite3ResolveExprNames(&sNC, pWhen) 
+       && db->mallocFailed==0 
+      ){
+        iEndTrigger = sqlite3VdbeMakeLabel(v);
+        sqlite3ExprIfFalse(pSubParse, pWhen, iEndTrigger, SQLITE_JUMPIFNULL);
+      }
+      sqlite3ExprDelete(db, pWhen);
+    }
+
+    /* Code the trigger program into the sub-vdbe. */
+    codeTriggerProgram(pSubParse, pTrigger->step_list, orconf);
+
+    /* Insert an OP_Halt at the end of the sub-program. */
+    if( iEndTrigger ){
+      sqlite3VdbeResolveLabel(v, iEndTrigger);
+    }
+    sqlite3VdbeAddOp0(v, OP_Halt);
+    VdbeComment((v, "End: %s.%s", pTrigger->zName, onErrorText(orconf)));
+
+    transferParseError(pParse, pSubParse);
+    if( db->mallocFailed==0 ){
+      pProgram->aOp = sqlite3VdbeTakeOpArray(v, &pProgram->nOp, &pTop->nMaxArg);
+    }
+    pProgram->nMem = pSubParse->nMem;
+    pProgram->nCsr = pSubParse->nTab;
+    pProgram->token = (void *)pTrigger;
+    pPrg->aColmask[0] = pSubParse->oldmask;
+    pPrg->aColmask[1] = pSubParse->newmask;
+    sqlite3VdbeDelete(v);
+  }
+
+  assert( !pSubParse->pAinc       && !pSubParse->pZombieTab );
+  assert( !pSubParse->pTriggerPrg && !pSubParse->nMaxArg );
+  sqlite3StackFree(db, pSubParse);
+
+  return pPrg;
+}
+    
+/*
+** Return a pointer to a TriggerPrg object containing the sub-program for
+** trigger pTrigger with default ON CONFLICT algorithm orconf. If no such
+** TriggerPrg object exists, a new object is allocated and populated before
+** being returned.
+*/
+static TriggerPrg *getRowTrigger(
+  Parse *pParse,       /* Current parse context */
+  Trigger *pTrigger,   /* Trigger to code */
+  Table *pTab,         /* The table trigger pTrigger is attached to */
+  int orconf           /* ON CONFLICT algorithm. */
+){
+  Parse *pRoot = sqlite3ParseToplevel(pParse);
+  TriggerPrg *pPrg;
+
+  assert( pTrigger->zName==0 || pTab==tableOfTrigger(pTrigger) );
+
+  /* It may be that this trigger has already been coded (or is in the
+  ** process of being coded). If this is the case, then an entry with
+  ** a matching TriggerPrg.pTrigger field will be present somewhere
+  ** in the Parse.pTriggerPrg list. Search for such an entry.  */
+  for(pPrg=pRoot->pTriggerPrg; 
+      pPrg && (pPrg->pTrigger!=pTrigger || pPrg->orconf!=orconf); 
+      pPrg=pPrg->pNext
+  );
+
+  /* If an existing TriggerPrg could not be located, create a new one. */
+  if( !pPrg ){
+    pPrg = codeRowTrigger(pParse, pTrigger, pTab, orconf);
+  }
+
+  return pPrg;
+}
+
+/*
+** Generate code for the trigger program associated with trigger p on 
+** table pTab. The reg, orconf and ignoreJump parameters passed to this
+** function are the same as those described in the header function for
+** sqlite3CodeRowTrigger()
+*/
+SQLITE_PRIVATE void sqlite3CodeRowTriggerDirect(
+  Parse *pParse,       /* Parse context */
+  Trigger *p,          /* Trigger to code */
+  Table *pTab,         /* The table to code triggers from */
+  int reg,             /* Reg array containing OLD.* and NEW.* values */
+  int orconf,          /* ON CONFLICT policy */
+  int ignoreJump       /* Instruction to jump to for RAISE(IGNORE) */
+){
+  Vdbe *v = sqlite3GetVdbe(pParse); /* Main VM */
+  TriggerPrg *pPrg;
+  pPrg = getRowTrigger(pParse, p, pTab, orconf);
+  assert( pPrg || pParse->nErr || pParse->db->mallocFailed );
+
+  /* Code the OP_Program opcode in the parent VDBE. P4 of the OP_Program 
+  ** is a pointer to the sub-vdbe containing the trigger program.  */
+  if( pPrg ){
+    int bRecursive = (p->zName && 0==(pParse->db->flags&SQLITE_RecTriggers));
+
+    sqlite3VdbeAddOp3(v, OP_Program, reg, ignoreJump, ++pParse->nMem);
+    sqlite3VdbeChangeP4(v, -1, (const char *)pPrg->pProgram, P4_SUBPROGRAM);
+    VdbeComment(
+        (v, "Call: %s.%s", (p->zName?p->zName:"fkey"), onErrorText(orconf)));
+
+    /* Set the P5 operand of the OP_Program instruction to non-zero if
+    ** recursive invocation of this trigger program is disallowed. Recursive
+    ** invocation is disallowed if (a) the sub-program is really a trigger,
+    ** not a foreign key action, and (b) the flag to enable recursive triggers
+    ** is clear.  */
+    sqlite3VdbeChangeP5(v, (u8)bRecursive);
+  }
+}
+
+/*
+** This is called to code the required FOR EACH ROW triggers for an operation
+** on table pTab. The operation to code triggers for (INSERT, UPDATE or DELETE)
+** is given by the op paramater. The tr_tm parameter determines whether the
+** BEFORE or AFTER triggers are coded. If the operation is an UPDATE, then
+** parameter pChanges is passed the list of columns being modified.
+**
+** If there are no triggers that fire at the specified time for the specified
+** operation on pTab, this function is a no-op.
+**
+** The reg argument is the address of the first in an array of registers 
+** that contain the values substituted for the new.* and old.* references
+** in the trigger program. If N is the number of columns in table pTab
+** (a copy of pTab->nCol), then registers are populated as follows:
+**
+**   Register       Contains
+**   ------------------------------------------------------
+**   reg+0          OLD.rowid
+**   reg+1          OLD.* value of left-most column of pTab
+**   ...            ...
+**   reg+N          OLD.* value of right-most column of pTab
+**   reg+N+1        NEW.rowid
+**   reg+N+2        OLD.* value of left-most column of pTab
+**   ...            ...
+**   reg+N+N+1      NEW.* value of right-most column of pTab
+**
+** For ON DELETE triggers, the registers containing the NEW.* values will
+** never be accessed by the trigger program, so they are not allocated or 
+** populated by the caller (there is no data to populate them with anyway). 
+** Similarly, for ON INSERT triggers the values stored in the OLD.* registers
+** are never accessed, and so are not allocated by the caller. So, for an
+** ON INSERT trigger, the value passed to this function as parameter reg
+** is not a readable register, although registers (reg+N) through 
+** (reg+N+N+1) are.
+**
+** Parameter orconf is the default conflict resolution algorithm for the
+** trigger program to use (REPLACE, IGNORE etc.). Parameter ignoreJump
+** is the instruction that control should jump to if a trigger program
+** raises an IGNORE exception.
+*/
+SQLITE_PRIVATE void sqlite3CodeRowTrigger(
+  Parse *pParse,       /* Parse context */
+  Trigger *pTrigger,   /* List of triggers on table pTab */
+  int op,              /* One of TK_UPDATE, TK_INSERT, TK_DELETE */
+  ExprList *pChanges,  /* Changes list for any UPDATE OF triggers */
+  int tr_tm,           /* One of TRIGGER_BEFORE, TRIGGER_AFTER */
+  Table *pTab,         /* The table to code triggers from */
+  int reg,             /* The first in an array of registers (see above) */
+  int orconf,          /* ON CONFLICT policy */
+  int ignoreJump       /* Instruction to jump to for RAISE(IGNORE) */
+){
+  Trigger *p;          /* Used to iterate through pTrigger list */
+
+  assert( op==TK_UPDATE || op==TK_INSERT || op==TK_DELETE );
+  assert( tr_tm==TRIGGER_BEFORE || tr_tm==TRIGGER_AFTER );
+  assert( (op==TK_UPDATE)==(pChanges!=0) );
+
+  for(p=pTrigger; p; p=p->pNext){
+
+    /* Sanity checking:  The schema for the trigger and for the table are
+    ** always defined.  The trigger must be in the same schema as the table
+    ** or else it must be a TEMP trigger. */
+    assert( p->pSchema!=0 );
+    assert( p->pTabSchema!=0 );
+    assert( p->pSchema==p->pTabSchema 
+         || p->pSchema==pParse->db->aDb[1].pSchema );
+
+    /* Determine whether we should code this trigger */
+    if( p->op==op 
+     && p->tr_tm==tr_tm 
+     && checkColumnOverlap(p->pColumns, pChanges)
+    ){
+      sqlite3CodeRowTriggerDirect(pParse, p, pTab, reg, orconf, ignoreJump);
+    }
+  }
+}
+
+/*
+** Triggers may access values stored in the old.* or new.* pseudo-table. 
+** This function returns a 32-bit bitmask indicating which columns of the 
+** old.* or new.* tables actually are used by triggers. This information 
+** may be used by the caller, for example, to avoid having to load the entire
+** old.* record into memory when executing an UPDATE or DELETE command.
+**
+** Bit 0 of the returned mask is set if the left-most column of the
+** table may be accessed using an [old|new].<col> reference. Bit 1 is set if
+** the second leftmost column value is required, and so on. If there
+** are more than 32 columns in the table, and at least one of the columns
+** with an index greater than 32 may be accessed, 0xffffffff is returned.
+**
+** It is not possible to determine if the old.rowid or new.rowid column is 
+** accessed by triggers. The caller must always assume that it is.
+**
+** Parameter isNew must be either 1 or 0. If it is 0, then the mask returned
+** applies to the old.* table. If 1, the new.* table.
+**
+** Parameter tr_tm must be a mask with one or both of the TRIGGER_BEFORE
+** and TRIGGER_AFTER bits set. Values accessed by BEFORE triggers are only
+** included in the returned mask if the TRIGGER_BEFORE bit is set in the
+** tr_tm parameter. Similarly, values accessed by AFTER triggers are only
+** included in the returned mask if the TRIGGER_AFTER bit is set in tr_tm.
+*/
+SQLITE_PRIVATE u32 sqlite3TriggerColmask(
+  Parse *pParse,       /* Parse context */
+  Trigger *pTrigger,   /* List of triggers on table pTab */
+  ExprList *pChanges,  /* Changes list for any UPDATE OF triggers */
+  int isNew,           /* 1 for new.* ref mask, 0 for old.* ref mask */
+  int tr_tm,           /* Mask of TRIGGER_BEFORE|TRIGGER_AFTER */
+  Table *pTab,         /* The table to code triggers from */
+  int orconf           /* Default ON CONFLICT policy for trigger steps */
+){
+  const int op = pChanges ? TK_UPDATE : TK_DELETE;
+  u32 mask = 0;
+  Trigger *p;
+
+  assert( isNew==1 || isNew==0 );
+  for(p=pTrigger; p; p=p->pNext){
+    if( p->op==op && (tr_tm&p->tr_tm)
+     && checkColumnOverlap(p->pColumns,pChanges)
+    ){
+      TriggerPrg *pPrg;
+      pPrg = getRowTrigger(pParse, p, pTab, orconf);
+      if( pPrg ){
+        mask |= pPrg->aColmask[isNew];
+      }
+    }
+  }
+
+  return mask;
+}
+
+#endif /* !defined(SQLITE_OMIT_TRIGGER) */
+
+/************** End of trigger.c *********************************************/
+/************** Begin file update.c ******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains C code routines that are called by the parser
+** to handle UPDATE statements.
+*/
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/* Forward declaration */
+static void updateVirtualTable(
+  Parse *pParse,       /* The parsing context */
+  SrcList *pSrc,       /* The virtual table to be modified */
+  Table *pTab,         /* The virtual table */
+  ExprList *pChanges,  /* The columns to change in the UPDATE statement */
+  Expr *pRowidExpr,    /* Expression used to recompute the rowid */
+  int *aXRef,          /* Mapping from columns of pTab to entries in pChanges */
+  Expr *pWhere         /* WHERE clause of the UPDATE statement */
+);
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+/*
+** The most recently coded instruction was an OP_Column to retrieve the
+** i-th column of table pTab. This routine sets the P4 parameter of the 
+** OP_Column to the default value, if any.
+**
+** The default value of a column is specified by a DEFAULT clause in the 
+** column definition. This was either supplied by the user when the table
+** was created, or added later to the table definition by an ALTER TABLE
+** command. If the latter, then the row-records in the table btree on disk
+** may not contain a value for the column and the default value, taken
+** from the P4 parameter of the OP_Column instruction, is returned instead.
+** If the former, then all row-records are guaranteed to include a value
+** for the column and the P4 value is not required.
+**
+** Column definitions created by an ALTER TABLE command may only have 
+** literal default values specified: a number, null or a string. (If a more
+** complicated default expression value was provided, it is evaluated 
+** when the ALTER TABLE is executed and one of the literal values written
+** into the sqlite_master table.)
+**
+** Therefore, the P4 parameter is only required if the default value for
+** the column is a literal number, string or null. The sqlite3ValueFromExpr()
+** function is capable of transforming these types of expressions into
+** sqlite3_value objects.
+**
+** If parameter iReg is not negative, code an OP_RealAffinity instruction
+** on register iReg. This is used when an equivalent integer value is 
+** stored in place of an 8-byte floating point value in order to save 
+** space.
+*/
+SQLITE_PRIVATE void sqlite3ColumnDefault(Vdbe *v, Table *pTab, int i, int iReg){
+  assert( pTab!=0 );
+  if( !pTab->pSelect ){
+    sqlite3_value *pValue;
+    u8 enc = ENC(sqlite3VdbeDb(v));
+    Column *pCol = &pTab->aCol[i];
+    VdbeComment((v, "%s.%s", pTab->zName, pCol->zName));
+    assert( i<pTab->nCol );
+    sqlite3ValueFromExpr(sqlite3VdbeDb(v), pCol->pDflt, enc, 
+                         pCol->affinity, &pValue);
+    if( pValue ){
+      sqlite3VdbeChangeP4(v, -1, (const char *)pValue, P4_MEM);
+    }
+#ifndef SQLITE_OMIT_FLOATING_POINT
+    if( iReg>=0 && pTab->aCol[i].affinity==SQLITE_AFF_REAL ){
+      sqlite3VdbeAddOp1(v, OP_RealAffinity, iReg);
+    }
+#endif
+  }
+}
+
+/*
+** Process an UPDATE statement.
+**
+**   UPDATE OR IGNORE table_wxyz SET a=b, c=d WHERE e<5 AND f NOT NULL;
+**          \_______/ \________/     \______/       \________________/
+*            onError   pTabList      pChanges             pWhere
+*/
+SQLITE_PRIVATE void sqlite3Update(
+  Parse *pParse,         /* The parser context */
+  SrcList *pTabList,     /* The table in which we should change things */
+  ExprList *pChanges,    /* Things to be changed */
+  Expr *pWhere,          /* The WHERE clause.  May be null */
+  int onError            /* How to handle constraint errors */
+){
+  int i, j;              /* Loop counters */
+  Table *pTab;           /* The table to be updated */
+  int addr = 0;          /* VDBE instruction address of the start of the loop */
+  WhereInfo *pWInfo;     /* Information about the WHERE clause */
+  Vdbe *v;               /* The virtual database engine */
+  Index *pIdx;           /* For looping over indices */
+  int nIdx;              /* Number of indices that need updating */
+  int iCur;              /* VDBE Cursor number of pTab */
+  sqlite3 *db;           /* The database structure */
+  int *aRegIdx = 0;      /* One register assigned to each index to be updated */
+  int *aXRef = 0;        /* aXRef[i] is the index in pChanges->a[] of the
+                         ** an expression for the i-th column of the table.
+                         ** aXRef[i]==-1 if the i-th column is not changed. */
+  int chngRowid;         /* True if the record number is being changed */
+  Expr *pRowidExpr = 0;  /* Expression defining the new record number */
+  int openAll = 0;       /* True if all indices need to be opened */
+  AuthContext sContext;  /* The authorization context */
+  NameContext sNC;       /* The name-context to resolve expressions in */
+  int iDb;               /* Database containing the table being updated */
+  int okOnePass;         /* True for one-pass algorithm without the FIFO */
+  int hasFK;             /* True if foreign key processing is required */
+
+#ifndef SQLITE_OMIT_TRIGGER
+  int isView;            /* True when updating a view (INSTEAD OF trigger) */
+  Trigger *pTrigger;     /* List of triggers on pTab, if required */
+  int tmask;             /* Mask of TRIGGER_BEFORE|TRIGGER_AFTER */
+#endif
+  int newmask;           /* Mask of NEW.* columns accessed by BEFORE triggers */
+
+  /* Register Allocations */
+  int regRowCount = 0;   /* A count of rows changed */
+  int regOldRowid;       /* The old rowid */
+  int regNewRowid;       /* The new rowid */
+  int regNew;
+  int regOld = 0;
+  int regRowSet = 0;     /* Rowset of rows to be updated */
+
+  memset(&sContext, 0, sizeof(sContext));
+  db = pParse->db;
+  if( pParse->nErr || db->mallocFailed ){
+    goto update_cleanup;
+  }
+  assert( pTabList->nSrc==1 );
+
+  /* Locate the table which we want to update. 
+  */
+  pTab = sqlite3SrcListLookup(pParse, pTabList);
+  if( pTab==0 ) goto update_cleanup;
+  iDb = sqlite3SchemaToIndex(pParse->db, pTab->pSchema);
+
+  /* Figure out if we have any triggers and if the table being
+  ** updated is a view.
+  */
+#ifndef SQLITE_OMIT_TRIGGER
+  pTrigger = sqlite3TriggersExist(pParse, pTab, TK_UPDATE, pChanges, &tmask);
+  isView = pTab->pSelect!=0;
+  assert( pTrigger || tmask==0 );
+#else
+# define pTrigger 0
+# define isView 0
+# define tmask 0
+#endif
+#ifdef SQLITE_OMIT_VIEW
+# undef isView
+# define isView 0
+#endif
+
+  if( sqlite3ViewGetColumnNames(pParse, pTab) ){
+    goto update_cleanup;
+  }
+  if( sqlite3IsReadOnly(pParse, pTab, tmask) ){
+    goto update_cleanup;
+  }
+  aXRef = sqlite3DbMallocRaw(db, sizeof(int) * pTab->nCol );
+  if( aXRef==0 ) goto update_cleanup;
+  for(i=0; i<pTab->nCol; i++) aXRef[i] = -1;
+
+  /* Allocate a cursors for the main database table and for all indices.
+  ** The index cursors might not be used, but if they are used they
+  ** need to occur right after the database cursor.  So go ahead and
+  ** allocate enough space, just in case.
+  */
+  pTabList->a[0].iCursor = iCur = pParse->nTab++;
+  for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+    pParse->nTab++;
+  }
+
+  /* Initialize the name-context */
+  memset(&sNC, 0, sizeof(sNC));
+  sNC.pParse = pParse;
+  sNC.pSrcList = pTabList;
+
+  /* Resolve the column names in all the expressions of the
+  ** of the UPDATE statement.  Also find the column index
+  ** for each column to be updated in the pChanges array.  For each
+  ** column to be updated, make sure we have authorization to change
+  ** that column.
+  */
+  chngRowid = 0;
+  for(i=0; i<pChanges->nExpr; i++){
+    if( sqlite3ResolveExprNames(&sNC, pChanges->a[i].pExpr) ){
+      goto update_cleanup;
+    }
+    for(j=0; j<pTab->nCol; j++){
+      if( sqlite3StrICmp(pTab->aCol[j].zName, pChanges->a[i].zName)==0 ){
+        if( j==pTab->iPKey ){
+          chngRowid = 1;
+          pRowidExpr = pChanges->a[i].pExpr;
+        }
+        aXRef[j] = i;
+        break;
+      }
+    }
+    if( j>=pTab->nCol ){
+      if( sqlite3IsRowid(pChanges->a[i].zName) ){
+        chngRowid = 1;
+        pRowidExpr = pChanges->a[i].pExpr;
+      }else{
+        sqlite3ErrorMsg(pParse, "no such column: %s", pChanges->a[i].zName);
+        pParse->checkSchema = 1;
+        goto update_cleanup;
+      }
+    }
+#ifndef SQLITE_OMIT_AUTHORIZATION
+    {
+      int rc;
+      rc = sqlite3AuthCheck(pParse, SQLITE_UPDATE, pTab->zName,
+                           pTab->aCol[j].zName, db->aDb[iDb].zName);
+      if( rc==SQLITE_DENY ){
+        goto update_cleanup;
+      }else if( rc==SQLITE_IGNORE ){
+        aXRef[j] = -1;
+      }
+    }
+#endif
+  }
+
+  hasFK = sqlite3FkRequired(pParse, pTab, aXRef, chngRowid);
+
+  /* Allocate memory for the array aRegIdx[].  There is one entry in the
+  ** array for each index associated with table being updated.  Fill in
+  ** the value with a register number for indices that are to be used
+  ** and with zero for unused indices.
+  */
+  for(nIdx=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, nIdx++){}
+  if( nIdx>0 ){
+    aRegIdx = sqlite3DbMallocRaw(db, sizeof(Index*) * nIdx );
+    if( aRegIdx==0 ) goto update_cleanup;
+  }
+  for(j=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, j++){
+    int reg;
+    if( chngRowid ){
+      reg = ++pParse->nMem;
+    }else{
+      reg = 0;
+      for(i=0; i<pIdx->nColumn; i++){
+        if( aXRef[pIdx->aiColumn[i]]>=0 ){
+          reg = ++pParse->nMem;
+          break;
+        }
+      }
+    }
+    aRegIdx[j] = reg;
+  }
+
+  /* Begin generating code. */
+  v = sqlite3GetVdbe(pParse);
+  if( v==0 ) goto update_cleanup;
+  if( pParse->nested==0 ) sqlite3VdbeCountChanges(v);
+  sqlite3BeginWriteOperation(pParse, 1, iDb);
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  /* Virtual tables must be handled separately */
+  if( IsVirtual(pTab) ){
+    updateVirtualTable(pParse, pTabList, pTab, pChanges, pRowidExpr, aXRef,
+                       pWhere);
+    pWhere = 0;
+    pTabList = 0;
+    goto update_cleanup;
+  }
+#endif
+
+  /* Allocate required registers. */
+  regOldRowid = regNewRowid = ++pParse->nMem;
+  if( pTrigger || hasFK ){
+    regOld = pParse->nMem + 1;
+    pParse->nMem += pTab->nCol;
+  }
+  if( chngRowid || pTrigger || hasFK ){
+    regNewRowid = ++pParse->nMem;
+  }
+  regNew = pParse->nMem + 1;
+  pParse->nMem += pTab->nCol;
+
+  /* Start the view context. */
+  if( isView ){
+    sqlite3AuthContextPush(pParse, &sContext, pTab->zName);
+  }
+
+  /* If we are trying to update a view, realize that view into
+  ** a ephemeral table.
+  */
+#if !defined(SQLITE_OMIT_VIEW) && !defined(SQLITE_OMIT_TRIGGER)
+  if( isView ){
+    sqlite3MaterializeView(pParse, pTab, pWhere, iCur);
+  }
+#endif
+
+  /* Resolve the column names in all the expressions in the
+  ** WHERE clause.
+  */
+  if( sqlite3ResolveExprNames(&sNC, pWhere) ){
+    goto update_cleanup;
+  }
+
+  /* Begin the database scan
+  */
+  sqlite3VdbeAddOp2(v, OP_Null, 0, regOldRowid);
+  pWInfo = sqlite3WhereBegin(pParse, pTabList, pWhere,0, WHERE_ONEPASS_DESIRED);
+  if( pWInfo==0 ) goto update_cleanup;
+  okOnePass = pWInfo->okOnePass;
+
+  /* Remember the rowid of every item to be updated.
+  */
+  sqlite3VdbeAddOp2(v, OP_Rowid, iCur, regOldRowid);
+  if( !okOnePass ){
+    regRowSet = ++pParse->nMem;
+    sqlite3VdbeAddOp2(v, OP_RowSetAdd, regRowSet, regOldRowid);
+  }
+
+  /* End the database scan loop.
+  */
+  sqlite3WhereEnd(pWInfo);
+
+  /* Initialize the count of updated rows
+  */
+  if( (db->flags & SQLITE_CountRows) && !pParse->pTriggerTab ){
+    regRowCount = ++pParse->nMem;
+    sqlite3VdbeAddOp2(v, OP_Integer, 0, regRowCount);
+  }
+
+  if( !isView ){
+    /* 
+    ** Open every index that needs updating.  Note that if any
+    ** index could potentially invoke a REPLACE conflict resolution 
+    ** action, then we need to open all indices because we might need
+    ** to be deleting some records.
+    */
+    if( !okOnePass ) sqlite3OpenTable(pParse, iCur, iDb, pTab, OP_OpenWrite); 
+    if( onError==OE_Replace ){
+      openAll = 1;
+    }else{
+      openAll = 0;
+      for(pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext){
+        if( pIdx->onError==OE_Replace ){
+          openAll = 1;
+          break;
+        }
+      }
+    }
+    for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
+      if( openAll || aRegIdx[i]>0 ){
+        KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIdx);
+        sqlite3VdbeAddOp4(v, OP_OpenWrite, iCur+i+1, pIdx->tnum, iDb,
+                       (char*)pKey, P4_KEYINFO_HANDOFF);
+        assert( pParse->nTab>iCur+i+1 );
+      }
+    }
+  }
+
+  /* Top of the update loop */
+  if( okOnePass ){
+    int a1 = sqlite3VdbeAddOp1(v, OP_NotNull, regOldRowid);
+    addr = sqlite3VdbeAddOp0(v, OP_Goto);
+    sqlite3VdbeJumpHere(v, a1);
+  }else{
+    addr = sqlite3VdbeAddOp3(v, OP_RowSetRead, regRowSet, 0, regOldRowid);
+  }
+
+  /* Make cursor iCur point to the record that is being updated. If
+  ** this record does not exist for some reason (deleted by a trigger,
+  ** for example, then jump to the next iteration of the RowSet loop.  */
+  sqlite3VdbeAddOp3(v, OP_NotExists, iCur, addr, regOldRowid);
+
+  /* If the record number will change, set register regNewRowid to
+  ** contain the new value. If the record number is not being modified,
+  ** then regNewRowid is the same register as regOldRowid, which is
+  ** already populated.  */
+  assert( chngRowid || pTrigger || hasFK || regOldRowid==regNewRowid );
+  if( chngRowid ){
+    sqlite3ExprCode(pParse, pRowidExpr, regNewRowid);
+    sqlite3VdbeAddOp1(v, OP_MustBeInt, regNewRowid);
+  }
+
+  /* If there are triggers on this table, populate an array of registers 
+  ** with the required old.* column data.  */
+  if( hasFK || pTrigger ){
+    u32 oldmask = (hasFK ? sqlite3FkOldmask(pParse, pTab) : 0);
+    oldmask |= sqlite3TriggerColmask(pParse, 
+        pTrigger, pChanges, 0, TRIGGER_BEFORE|TRIGGER_AFTER, pTab, onError
+    );
+    for(i=0; i<pTab->nCol; i++){
+      if( aXRef[i]<0 || oldmask==0xffffffff || (i<32 && (oldmask & (1<<i))) ){
+        sqlite3ExprCodeGetColumnOfTable(v, pTab, iCur, i, regOld+i);
+      }else{
+        sqlite3VdbeAddOp2(v, OP_Null, 0, regOld+i);
+      }
+    }
+    if( chngRowid==0 ){
+      sqlite3VdbeAddOp2(v, OP_Copy, regOldRowid, regNewRowid);
+    }
+  }
+
+  /* Populate the array of registers beginning at regNew with the new
+  ** row data. This array is used to check constaints, create the new
+  ** table and index records, and as the values for any new.* references
+  ** made by triggers.
+  **
+  ** If there are one or more BEFORE triggers, then do not populate the
+  ** registers associated with columns that are (a) not modified by
+  ** this UPDATE statement and (b) not accessed by new.* references. The
+  ** values for registers not modified by the UPDATE must be reloaded from 
+  ** the database after the BEFORE triggers are fired anyway (as the trigger 
+  ** may have modified them). So not loading those that are not going to
+  ** be used eliminates some redundant opcodes.
+  */
+  newmask = sqlite3TriggerColmask(
+      pParse, pTrigger, pChanges, 1, TRIGGER_BEFORE, pTab, onError
+  );
+  for(i=0; i<pTab->nCol; i++){
+    if( i==pTab->iPKey ){
+      sqlite3VdbeAddOp2(v, OP_Null, 0, regNew+i);
+    }else{
+      j = aXRef[i];
+      if( j>=0 ){
+        sqlite3ExprCode(pParse, pChanges->a[j].pExpr, regNew+i);
+      }else if( 0==(tmask&TRIGGER_BEFORE) || i>31 || (newmask&(1<<i)) ){
+        /* This branch loads the value of a column that will not be changed 
+        ** into a register. This is done if there are no BEFORE triggers, or
+        ** if there are one or more BEFORE triggers that use this value via
+        ** a new.* reference in a trigger program.
+        */
+        testcase( i==31 );
+        testcase( i==32 );
+        sqlite3VdbeAddOp3(v, OP_Column, iCur, i, regNew+i);
+        sqlite3ColumnDefault(v, pTab, i, regNew+i);
+      }
+    }
+  }
+
+  /* Fire any BEFORE UPDATE triggers. This happens before constraints are
+  ** verified. One could argue that this is wrong.
+  */
+  if( tmask&TRIGGER_BEFORE ){
+    sqlite3VdbeAddOp2(v, OP_Affinity, regNew, pTab->nCol);
+    sqlite3TableAffinityStr(v, pTab);
+    sqlite3CodeRowTrigger(pParse, pTrigger, TK_UPDATE, pChanges, 
+        TRIGGER_BEFORE, pTab, regOldRowid, onError, addr);
+
+    /* The row-trigger may have deleted the row being updated. In this
+    ** case, jump to the next row. No updates or AFTER triggers are 
+    ** required. This behaviour - what happens when the row being updated
+    ** is deleted or renamed by a BEFORE trigger - is left undefined in the
+    ** documentation.
+    */
+    sqlite3VdbeAddOp3(v, OP_NotExists, iCur, addr, regOldRowid);
+
+    /* If it did not delete it, the row-trigger may still have modified 
+    ** some of the columns of the row being updated. Load the values for 
+    ** all columns not modified by the update statement into their 
+    ** registers in case this has happened.
+    */
+    for(i=0; i<pTab->nCol; i++){
+      if( aXRef[i]<0 && i!=pTab->iPKey ){
+        sqlite3VdbeAddOp3(v, OP_Column, iCur, i, regNew+i);
+        sqlite3ColumnDefault(v, pTab, i, regNew+i);
+      }
+    }
+  }
+
+  if( !isView ){
+    int j1;                       /* Address of jump instruction */
+
+    /* Do constraint checks. */
+    sqlite3GenerateConstraintChecks(pParse, pTab, iCur, regNewRowid,
+        aRegIdx, (chngRowid?regOldRowid:0), 1, onError, addr, 0);
+
+    /* Do FK constraint checks. */
+    if( hasFK ){
+      sqlite3FkCheck(pParse, pTab, regOldRowid, 0);
+    }
+
+    /* Delete the index entries associated with the current record.  */
+    j1 = sqlite3VdbeAddOp3(v, OP_NotExists, iCur, 0, regOldRowid);
+    sqlite3GenerateRowIndexDelete(pParse, pTab, iCur, aRegIdx);
+  
+    /* If changing the record number, delete the old record.  */
+    if( hasFK || chngRowid ){
+      sqlite3VdbeAddOp2(v, OP_Delete, iCur, 0);
+    }
+    sqlite3VdbeJumpHere(v, j1);
+
+    if( hasFK ){
+      sqlite3FkCheck(pParse, pTab, 0, regNewRowid);
+    }
+  
+    /* Insert the new index entries and the new record. */
+    sqlite3CompleteInsertion(pParse, pTab, iCur, regNewRowid, aRegIdx, 1, 0, 0);
+
+    /* Do any ON CASCADE, SET NULL or SET DEFAULT operations required to
+    ** handle rows (possibly in other tables) that refer via a foreign key
+    ** to the row just updated. */ 
+    if( hasFK ){
+      sqlite3FkActions(pParse, pTab, pChanges, regOldRowid);
+    }
+  }
+
+  /* Increment the row counter 
+  */
+  if( (db->flags & SQLITE_CountRows) && !pParse->pTriggerTab){
+    sqlite3VdbeAddOp2(v, OP_AddImm, regRowCount, 1);
+  }
+
+  sqlite3CodeRowTrigger(pParse, pTrigger, TK_UPDATE, pChanges, 
+      TRIGGER_AFTER, pTab, regOldRowid, onError, addr);
+
+  /* Repeat the above with the next record to be updated, until
+  ** all record selected by the WHERE clause have been updated.
+  */
+  sqlite3VdbeAddOp2(v, OP_Goto, 0, addr);
+  sqlite3VdbeJumpHere(v, addr);
+
+  /* Close all tables */
+  for(i=0, pIdx=pTab->pIndex; pIdx; pIdx=pIdx->pNext, i++){
+    if( openAll || aRegIdx[i]>0 ){
+      sqlite3VdbeAddOp2(v, OP_Close, iCur+i+1, 0);
+    }
+  }
+  sqlite3VdbeAddOp2(v, OP_Close, iCur, 0);
+
+  /* Update the sqlite_sequence table by storing the content of the
+  ** maximum rowid counter values recorded while inserting into
+  ** autoincrement tables.
+  */
+  if( pParse->nested==0 && pParse->pTriggerTab==0 ){
+    sqlite3AutoincrementEnd(pParse);
+  }
+
+  /*
+  ** Return the number of rows that were changed. If this routine is 
+  ** generating code because of a call to sqlite3NestedParse(), do not
+  ** invoke the callback function.
+  */
+  if( (db->flags&SQLITE_CountRows) && !pParse->pTriggerTab && !pParse->nested ){
+    sqlite3VdbeAddOp2(v, OP_ResultRow, regRowCount, 1);
+    sqlite3VdbeSetNumCols(v, 1);
+    sqlite3VdbeSetColName(v, 0, COLNAME_NAME, "rows updated", SQLITE_STATIC);
+  }
+
+update_cleanup:
+  sqlite3AuthContextPop(&sContext);
+  sqlite3DbFree(db, aRegIdx);
+  sqlite3DbFree(db, aXRef);
+  sqlite3SrcListDelete(db, pTabList);
+  sqlite3ExprListDelete(db, pChanges);
+  sqlite3ExprDelete(db, pWhere);
+  return;
+}
+/* Make sure "isView" and other macros defined above are undefined. Otherwise
+** thely may interfere with compilation of other functions in this file
+** (or in another file, if this file becomes part of the amalgamation).  */
+#ifdef isView
+ #undef isView
+#endif
+#ifdef pTrigger
+ #undef pTrigger
+#endif
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/*
+** Generate code for an UPDATE of a virtual table.
+**
+** The strategy is that we create an ephemerial table that contains
+** for each row to be changed:
+**
+**   (A)  The original rowid of that row.
+**   (B)  The revised rowid for the row. (note1)
+**   (C)  The content of every column in the row.
+**
+** Then we loop over this ephemeral table and for each row in
+** the ephermeral table call VUpdate.
+**
+** When finished, drop the ephemeral table.
+**
+** (note1) Actually, if we know in advance that (A) is always the same
+** as (B) we only store (A), then duplicate (A) when pulling
+** it out of the ephemeral table before calling VUpdate.
+*/
+static void updateVirtualTable(
+  Parse *pParse,       /* The parsing context */
+  SrcList *pSrc,       /* The virtual table to be modified */
+  Table *pTab,         /* The virtual table */
+  ExprList *pChanges,  /* The columns to change in the UPDATE statement */
+  Expr *pRowid,        /* Expression used to recompute the rowid */
+  int *aXRef,          /* Mapping from columns of pTab to entries in pChanges */
+  Expr *pWhere         /* WHERE clause of the UPDATE statement */
+){
+  Vdbe *v = pParse->pVdbe;  /* Virtual machine under construction */
+  ExprList *pEList = 0;     /* The result set of the SELECT statement */
+  Select *pSelect = 0;      /* The SELECT statement */
+  Expr *pExpr;              /* Temporary expression */
+  int ephemTab;             /* Table holding the result of the SELECT */
+  int i;                    /* Loop counter */
+  int addr;                 /* Address of top of loop */
+  int iReg;                 /* First register in set passed to OP_VUpdate */
+  sqlite3 *db = pParse->db; /* Database connection */
+  const char *pVTab = (const char*)sqlite3GetVTable(db, pTab);
+  SelectDest dest;
+
+  /* Construct the SELECT statement that will find the new values for
+  ** all updated rows. 
+  */
+  pEList = sqlite3ExprListAppend(pParse, 0, sqlite3Expr(db, TK_ID, "_rowid_"));
+  if( pRowid ){
+    pEList = sqlite3ExprListAppend(pParse, pEList,
+                                   sqlite3ExprDup(db, pRowid, 0));
+  }
+  assert( pTab->iPKey<0 );
+  for(i=0; i<pTab->nCol; i++){
+    if( aXRef[i]>=0 ){
+      pExpr = sqlite3ExprDup(db, pChanges->a[aXRef[i]].pExpr, 0);
+    }else{
+      pExpr = sqlite3Expr(db, TK_ID, pTab->aCol[i].zName);
+    }
+    pEList = sqlite3ExprListAppend(pParse, pEList, pExpr);
+  }
+  pSelect = sqlite3SelectNew(pParse, pEList, pSrc, pWhere, 0, 0, 0, 0, 0, 0);
+  
+  /* Create the ephemeral table into which the update results will
+  ** be stored.
+  */
+  assert( v );
+  ephemTab = pParse->nTab++;
+  sqlite3VdbeAddOp2(v, OP_OpenEphemeral, ephemTab, pTab->nCol+1+(pRowid!=0));
+  sqlite3VdbeChangeP5(v, BTREE_UNORDERED);
+
+  /* fill the ephemeral table 
+  */
+  sqlite3SelectDestInit(&dest, SRT_Table, ephemTab);
+  sqlite3Select(pParse, pSelect, &dest);
+
+  /* Generate code to scan the ephemeral table and call VUpdate. */
+  iReg = ++pParse->nMem;
+  pParse->nMem += pTab->nCol+1;
+  addr = sqlite3VdbeAddOp2(v, OP_Rewind, ephemTab, 0);
+  sqlite3VdbeAddOp3(v, OP_Column,  ephemTab, 0, iReg);
+  sqlite3VdbeAddOp3(v, OP_Column, ephemTab, (pRowid?1:0), iReg+1);
+  for(i=0; i<pTab->nCol; i++){
+    sqlite3VdbeAddOp3(v, OP_Column, ephemTab, i+1+(pRowid!=0), iReg+2+i);
+  }
+  sqlite3VtabMakeWritable(pParse, pTab);
+  sqlite3VdbeAddOp4(v, OP_VUpdate, 0, pTab->nCol+2, iReg, pVTab, P4_VTAB);
+  sqlite3MayAbort(pParse);
+  sqlite3VdbeAddOp2(v, OP_Next, ephemTab, addr+1);
+  sqlite3VdbeJumpHere(v, addr);
+  sqlite3VdbeAddOp2(v, OP_Close, ephemTab, 0);
+
+  /* Cleanup */
+  sqlite3SelectDelete(db, pSelect);  
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+/************** End of update.c **********************************************/
+/************** Begin file vacuum.c ******************************************/
+/*
+** 2003 April 6
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains code used to implement the VACUUM command.
+**
+** Most of the code in this file may be omitted by defining the
+** SQLITE_OMIT_VACUUM macro.
+*/
+
+#if !defined(SQLITE_OMIT_VACUUM) && !defined(SQLITE_OMIT_ATTACH)
+/*
+** Finalize a prepared statement.  If there was an error, store the
+** text of the error message in *pzErrMsg.  Return the result code.
+*/
+static int vacuumFinalize(sqlite3 *db, sqlite3_stmt *pStmt, char **pzErrMsg){
+  int rc;
+  rc = sqlite3VdbeFinalize((Vdbe*)pStmt);
+  if( rc ){
+    sqlite3SetString(pzErrMsg, db, sqlite3_errmsg(db));
+  }
+  return rc;
+}
+
+/*
+** Execute zSql on database db. Return an error code.
+*/
+static int execSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
+  sqlite3_stmt *pStmt;
+  VVA_ONLY( int rc; )
+  if( !zSql ){
+    return SQLITE_NOMEM;
+  }
+  if( SQLITE_OK!=sqlite3_prepare(db, zSql, -1, &pStmt, 0) ){
+    sqlite3SetString(pzErrMsg, db, sqlite3_errmsg(db));
+    return sqlite3_errcode(db);
+  }
+  VVA_ONLY( rc = ) sqlite3_step(pStmt);
+  assert( rc!=SQLITE_ROW );
+  return vacuumFinalize(db, pStmt, pzErrMsg);
+}
+
+/*
+** Execute zSql on database db. The statement returns exactly
+** one column. Execute this as SQL on the same database.
+*/
+static int execExecSql(sqlite3 *db, char **pzErrMsg, const char *zSql){
+  sqlite3_stmt *pStmt;
+  int rc;
+
+  rc = sqlite3_prepare(db, zSql, -1, &pStmt, 0);
+  if( rc!=SQLITE_OK ) return rc;
+
+  while( SQLITE_ROW==sqlite3_step(pStmt) ){
+    rc = execSql(db, pzErrMsg, (char*)sqlite3_column_text(pStmt, 0));
+    if( rc!=SQLITE_OK ){
+      vacuumFinalize(db, pStmt, pzErrMsg);
+      return rc;
+    }
+  }
+
+  return vacuumFinalize(db, pStmt, pzErrMsg);
+}
+
+/*
+** The non-standard VACUUM command is used to clean up the database,
+** collapse free space, etc.  It is modelled after the VACUUM command
+** in PostgreSQL.
+**
+** In version 1.0.x of SQLite, the VACUUM command would call
+** gdbm_reorganize() on all the database tables.  But beginning
+** with 2.0.0, SQLite no longer uses GDBM so this command has
+** become a no-op.
+*/
+SQLITE_PRIVATE void sqlite3Vacuum(Parse *pParse){
+  Vdbe *v = sqlite3GetVdbe(pParse);
+  if( v ){
+    sqlite3VdbeAddOp2(v, OP_Vacuum, 0, 0);
+  }
+  return;
+}
+
+/*
+** This routine implements the OP_Vacuum opcode of the VDBE.
+*/
+SQLITE_PRIVATE int sqlite3RunVacuum(char **pzErrMsg, sqlite3 *db){
+  int rc = SQLITE_OK;     /* Return code from service routines */
+  Btree *pMain;           /* The database being vacuumed */
+  Btree *pTemp;           /* The temporary database we vacuum into */
+  char *zSql = 0;         /* SQL statements */
+  int saved_flags;        /* Saved value of the db->flags */
+  int saved_nChange;      /* Saved value of db->nChange */
+  int saved_nTotalChange; /* Saved value of db->nTotalChange */
+  void (*saved_xTrace)(void*,const char*);  /* Saved db->xTrace */
+  Db *pDb = 0;            /* Database to detach at end of vacuum */
+  int isMemDb;            /* True if vacuuming a :memory: database */
+  int nRes;               /* Bytes of reserved space at the end of each page */
+  int nDb;                /* Number of attached databases */
+
+  if( !db->autoCommit ){
+    sqlite3SetString(pzErrMsg, db, "cannot VACUUM from within a transaction");
+    return SQLITE_ERROR;
+  }
+  if( db->activeVdbeCnt>1 ){
+    sqlite3SetString(pzErrMsg, db,"cannot VACUUM - SQL statements in progress");
+    return SQLITE_ERROR;
+  }
+
+  /* Save the current value of the database flags so that it can be 
+  ** restored before returning. Then set the writable-schema flag, and
+  ** disable CHECK and foreign key constraints.  */
+  saved_flags = db->flags;
+  saved_nChange = db->nChange;
+  saved_nTotalChange = db->nTotalChange;
+  saved_xTrace = db->xTrace;
+  db->flags |= SQLITE_WriteSchema | SQLITE_IgnoreChecks | SQLITE_PreferBuiltin;
+  db->flags &= ~(SQLITE_ForeignKeys | SQLITE_ReverseOrder);
+  db->xTrace = 0;
+
+  pMain = db->aDb[0].pBt;
+  isMemDb = sqlite3PagerIsMemdb(sqlite3BtreePager(pMain));
+
+  /* Attach the temporary database as 'vacuum_db'. The synchronous pragma
+  ** can be set to 'off' for this file, as it is not recovered if a crash
+  ** occurs anyway. The integrity of the database is maintained by a
+  ** (possibly synchronous) transaction opened on the main database before
+  ** sqlite3BtreeCopyFile() is called.
+  **
+  ** An optimisation would be to use a non-journaled pager.
+  ** (Later:) I tried setting "PRAGMA vacuum_db.journal_mode=OFF" but
+  ** that actually made the VACUUM run slower.  Very little journalling
+  ** actually occurs when doing a vacuum since the vacuum_db is initially
+  ** empty.  Only the journal header is written.  Apparently it takes more
+  ** time to parse and run the PRAGMA to turn journalling off than it does
+  ** to write the journal header file.
+  */
+  nDb = db->nDb;
+  if( sqlite3TempInMemory(db) ){
+    zSql = "ATTACH ':memory:' AS vacuum_db;";
+  }else{
+    zSql = "ATTACH '' AS vacuum_db;";
+  }
+  rc = execSql(db, pzErrMsg, zSql);
+  if( db->nDb>nDb ){
+    pDb = &db->aDb[db->nDb-1];
+    assert( strcmp(pDb->zName,"vacuum_db")==0 );
+  }
+  if( rc!=SQLITE_OK ) goto end_of_vacuum;
+  pTemp = db->aDb[db->nDb-1].pBt;
+
+  /* The call to execSql() to attach the temp database has left the file
+  ** locked (as there was more than one active statement when the transaction
+  ** to read the schema was concluded. Unlock it here so that this doesn't
+  ** cause problems for the call to BtreeSetPageSize() below.  */
+  sqlite3BtreeCommit(pTemp);
+
+  nRes = sqlite3BtreeGetReserve(pMain);
+
+  /* A VACUUM cannot change the pagesize of an encrypted database. */
+#ifdef SQLITE_HAS_CODEC
+  if( db->nextPagesize ){
+    extern void sqlite3CodecGetKey(sqlite3*, int, void**, int*);
+    int nKey;
+    char *zKey;
+    sqlite3CodecGetKey(db, 0, (void**)&zKey, &nKey);
+    if( nKey ) db->nextPagesize = 0;
+  }
+#endif
+
+  /* Do not attempt to change the page size for a WAL database */
+  if( sqlite3PagerGetJournalMode(sqlite3BtreePager(pMain))
+                                               ==PAGER_JOURNALMODE_WAL ){
+    db->nextPagesize = 0;
+  }
+
+  if( sqlite3BtreeSetPageSize(pTemp, sqlite3BtreeGetPageSize(pMain), nRes, 0)
+   || (!isMemDb && sqlite3BtreeSetPageSize(pTemp, db->nextPagesize, nRes, 0))
+   || NEVER(db->mallocFailed)
+  ){
+    rc = SQLITE_NOMEM;
+    goto end_of_vacuum;
+  }
+  rc = execSql(db, pzErrMsg, "PRAGMA vacuum_db.synchronous=OFF");
+  if( rc!=SQLITE_OK ){
+    goto end_of_vacuum;
+  }
+
+#ifndef SQLITE_OMIT_AUTOVACUUM
+  sqlite3BtreeSetAutoVacuum(pTemp, db->nextAutovac>=0 ? db->nextAutovac :
+                                           sqlite3BtreeGetAutoVacuum(pMain));
+#endif
+
+  /* Begin a transaction */
+  rc = execSql(db, pzErrMsg, "BEGIN EXCLUSIVE;");
+  if( rc!=SQLITE_OK ) goto end_of_vacuum;
+
+  /* Query the schema of the main database. Create a mirror schema
+  ** in the temporary database.
+  */
+  rc = execExecSql(db, pzErrMsg,
+      "SELECT 'CREATE TABLE vacuum_db.' || substr(sql,14) "
+      "  FROM sqlite_master WHERE type='table' AND name!='sqlite_sequence'"
+      "   AND rootpage>0"
+  );
+  if( rc!=SQLITE_OK ) goto end_of_vacuum;
+  rc = execExecSql(db, pzErrMsg,
+      "SELECT 'CREATE INDEX vacuum_db.' || substr(sql,14)"
+      "  FROM sqlite_master WHERE sql LIKE 'CREATE INDEX %' ");
+  if( rc!=SQLITE_OK ) goto end_of_vacuum;
+  rc = execExecSql(db, pzErrMsg,
+      "SELECT 'CREATE UNIQUE INDEX vacuum_db.' || substr(sql,21) "
+      "  FROM sqlite_master WHERE sql LIKE 'CREATE UNIQUE INDEX %'");
+  if( rc!=SQLITE_OK ) goto end_of_vacuum;
+
+  /* Loop through the tables in the main database. For each, do
+  ** an "INSERT INTO vacuum_db.xxx SELECT * FROM main.xxx;" to copy
+  ** the contents to the temporary database.
+  */
+  rc = execExecSql(db, pzErrMsg,
+      "SELECT 'INSERT INTO vacuum_db.' || quote(name) "
+      "|| ' SELECT * FROM main.' || quote(name) || ';'"
+      "FROM main.sqlite_master "
+      "WHERE type = 'table' AND name!='sqlite_sequence' "
+      "  AND rootpage>0"
+  );
+  if( rc!=SQLITE_OK ) goto end_of_vacuum;
+
+  /* Copy over the sequence table
+  */
+  rc = execExecSql(db, pzErrMsg,
+      "SELECT 'DELETE FROM vacuum_db.' || quote(name) || ';' "
+      "FROM vacuum_db.sqlite_master WHERE name='sqlite_sequence' "
+  );
+  if( rc!=SQLITE_OK ) goto end_of_vacuum;
+  rc = execExecSql(db, pzErrMsg,
+      "SELECT 'INSERT INTO vacuum_db.' || quote(name) "
+      "|| ' SELECT * FROM main.' || quote(name) || ';' "
+      "FROM vacuum_db.sqlite_master WHERE name=='sqlite_sequence';"
+  );
+  if( rc!=SQLITE_OK ) goto end_of_vacuum;
+
+
+  /* Copy the triggers, views, and virtual tables from the main database
+  ** over to the temporary database.  None of these objects has any
+  ** associated storage, so all we have to do is copy their entries
+  ** from the SQLITE_MASTER table.
+  */
+  rc = execSql(db, pzErrMsg,
+      "INSERT INTO vacuum_db.sqlite_master "
+      "  SELECT type, name, tbl_name, rootpage, sql"
+      "    FROM main.sqlite_master"
+      "   WHERE type='view' OR type='trigger'"
+      "      OR (type='table' AND rootpage=0)"
+  );
+  if( rc ) goto end_of_vacuum;
+
+  /* At this point, unless the main db was completely empty, there is now a
+  ** transaction open on the vacuum database, but not on the main database.
+  ** Open a btree level transaction on the main database. This allows a
+  ** call to sqlite3BtreeCopyFile(). The main database btree level
+  ** transaction is then committed, so the SQL level never knows it was
+  ** opened for writing. This way, the SQL transaction used to create the
+  ** temporary database never needs to be committed.
+  */
+  {
+    u32 meta;
+    int i;
+
+    /* This array determines which meta meta values are preserved in the
+    ** vacuum.  Even entries are the meta value number and odd entries
+    ** are an increment to apply to the meta value after the vacuum.
+    ** The increment is used to increase the schema cookie so that other
+    ** connections to the same database will know to reread the schema.
+    */
+    static const unsigned char aCopy[] = {
+       BTREE_SCHEMA_VERSION,     1,  /* Add one to the old schema cookie */
+       BTREE_DEFAULT_CACHE_SIZE, 0,  /* Preserve the default page cache size */
+       BTREE_TEXT_ENCODING,      0,  /* Preserve the text encoding */
+       BTREE_USER_VERSION,       0,  /* Preserve the user version */
+    };
+
+    assert( 1==sqlite3BtreeIsInTrans(pTemp) );
+    assert( 1==sqlite3BtreeIsInTrans(pMain) );
+
+    /* Copy Btree meta values */
+    for(i=0; i<ArraySize(aCopy); i+=2){
+      /* GetMeta() and UpdateMeta() cannot fail in this context because
+      ** we already have page 1 loaded into cache and marked dirty. */
+      sqlite3BtreeGetMeta(pMain, aCopy[i], &meta);
+      rc = sqlite3BtreeUpdateMeta(pTemp, aCopy[i], meta+aCopy[i+1]);
+      if( NEVER(rc!=SQLITE_OK) ) goto end_of_vacuum;
+    }
+
+    rc = sqlite3BtreeCopyFile(pMain, pTemp);
+    if( rc!=SQLITE_OK ) goto end_of_vacuum;
+    rc = sqlite3BtreeCommit(pTemp);
+    if( rc!=SQLITE_OK ) goto end_of_vacuum;
+#ifndef SQLITE_OMIT_AUTOVACUUM
+    sqlite3BtreeSetAutoVacuum(pMain, sqlite3BtreeGetAutoVacuum(pTemp));
+#endif
+  }
+
+  assert( rc==SQLITE_OK );
+  rc = sqlite3BtreeSetPageSize(pMain, sqlite3BtreeGetPageSize(pTemp), nRes,1);
+
+end_of_vacuum:
+  /* Restore the original value of db->flags */
+  db->flags = saved_flags;
+  db->nChange = saved_nChange;
+  db->nTotalChange = saved_nTotalChange;
+  db->xTrace = saved_xTrace;
+  sqlite3BtreeSetPageSize(pMain, -1, -1, 1);
+
+  /* Currently there is an SQL level transaction open on the vacuum
+  ** database. No locks are held on any other files (since the main file
+  ** was committed at the btree level). So it safe to end the transaction
+  ** by manually setting the autoCommit flag to true and detaching the
+  ** vacuum database. The vacuum_db journal file is deleted when the pager
+  ** is closed by the DETACH.
+  */
+  db->autoCommit = 1;
+
+  if( pDb ){
+    sqlite3BtreeClose(pDb->pBt);
+    pDb->pBt = 0;
+    pDb->pSchema = 0;
+  }
+
+  /* This both clears the schemas and reduces the size of the db->aDb[]
+  ** array. */ 
+  sqlite3ResetInternalSchema(db, -1);
+
+  return rc;
+}
+
+#endif  /* SQLITE_OMIT_VACUUM && SQLITE_OMIT_ATTACH */
+
+/************** End of vacuum.c **********************************************/
+/************** Begin file vtab.c ********************************************/
+/*
+** 2006 June 10
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains code used to help implement virtual tables.
+*/
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+
+/*
+** The actual function that does the work of creating a new module.
+** This function implements the sqlite3_create_module() and
+** sqlite3_create_module_v2() interfaces.
+*/
+static int createModule(
+  sqlite3 *db,                    /* Database in which module is registered */
+  const char *zName,              /* Name assigned to this module */
+  const sqlite3_module *pModule,  /* The definition of the module */
+  void *pAux,                     /* Context pointer for xCreate/xConnect */
+  void (*xDestroy)(void *)        /* Module destructor function */
+){
+  int rc, nName;
+  Module *pMod;
+
+  sqlite3_mutex_enter(db->mutex);
+  nName = sqlite3Strlen30(zName);
+  pMod = (Module *)sqlite3DbMallocRaw(db, sizeof(Module) + nName + 1);
+  if( pMod ){
+    Module *pDel;
+    char *zCopy = (char *)(&pMod[1]);
+    memcpy(zCopy, zName, nName+1);
+    pMod->zName = zCopy;
+    pMod->pModule = pModule;
+    pMod->pAux = pAux;
+    pMod->xDestroy = xDestroy;
+    pDel = (Module *)sqlite3HashInsert(&db->aModule, zCopy, nName, (void*)pMod);
+    if( pDel && pDel->xDestroy ){
+      pDel->xDestroy(pDel->pAux);
+    }
+    sqlite3DbFree(db, pDel);
+    if( pDel==pMod ){
+      db->mallocFailed = 1;
+    }
+    sqlite3ResetInternalSchema(db, -1);
+  }else if( xDestroy ){
+    xDestroy(pAux);
+  }
+  rc = sqlite3ApiExit(db, SQLITE_OK);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+
+/*
+** External API function used to create a new virtual-table module.
+*/
+SQLITE_API int sqlite3_create_module(
+  sqlite3 *db,                    /* Database in which module is registered */
+  const char *zName,              /* Name assigned to this module */
+  const sqlite3_module *pModule,  /* The definition of the module */
+  void *pAux                      /* Context pointer for xCreate/xConnect */
+){
+  return createModule(db, zName, pModule, pAux, 0);
+}
+
+/*
+** External API function used to create a new virtual-table module.
+*/
+SQLITE_API int sqlite3_create_module_v2(
+  sqlite3 *db,                    /* Database in which module is registered */
+  const char *zName,              /* Name assigned to this module */
+  const sqlite3_module *pModule,  /* The definition of the module */
+  void *pAux,                     /* Context pointer for xCreate/xConnect */
+  void (*xDestroy)(void *)        /* Module destructor function */
+){
+  return createModule(db, zName, pModule, pAux, xDestroy);
+}
+
+/*
+** Lock the virtual table so that it cannot be disconnected.
+** Locks nest.  Every lock should have a corresponding unlock.
+** If an unlock is omitted, resources leaks will occur.  
+**
+** If a disconnect is attempted while a virtual table is locked,
+** the disconnect is deferred until all locks have been removed.
+*/
+SQLITE_PRIVATE void sqlite3VtabLock(VTable *pVTab){
+  pVTab->nRef++;
+}
+
+
+/*
+** pTab is a pointer to a Table structure representing a virtual-table.
+** Return a pointer to the VTable object used by connection db to access 
+** this virtual-table, if one has been created, or NULL otherwise.
+*/
+SQLITE_PRIVATE VTable *sqlite3GetVTable(sqlite3 *db, Table *pTab){
+  VTable *pVtab;
+  assert( IsVirtual(pTab) );
+  for(pVtab=pTab->pVTable; pVtab && pVtab->db!=db; pVtab=pVtab->pNext);
+  return pVtab;
+}
+
+/*
+** Decrement the ref-count on a virtual table object. When the ref-count
+** reaches zero, call the xDisconnect() method to delete the object.
+*/
+SQLITE_PRIVATE void sqlite3VtabUnlock(VTable *pVTab){
+  sqlite3 *db = pVTab->db;
+
+  assert( db );
+  assert( pVTab->nRef>0 );
+  assert( sqlite3SafetyCheckOk(db) );
+
+  pVTab->nRef--;
+  if( pVTab->nRef==0 ){
+    sqlite3_vtab *p = pVTab->pVtab;
+    if( p ){
+      p->pModule->xDisconnect(p);
+    }
+    sqlite3DbFree(db, pVTab);
+  }
+}
+
+/*
+** Table p is a virtual table. This function moves all elements in the
+** p->pVTable list to the sqlite3.pDisconnect lists of their associated
+** database connections to be disconnected at the next opportunity. 
+** Except, if argument db is not NULL, then the entry associated with
+** connection db is left in the p->pVTable list.
+*/
+static VTable *vtabDisconnectAll(sqlite3 *db, Table *p){
+  VTable *pRet = 0;
+  VTable *pVTable = p->pVTable;
+  p->pVTable = 0;
+
+  /* Assert that the mutex (if any) associated with the BtShared database 
+  ** that contains table p is held by the caller. See header comments 
+  ** above function sqlite3VtabUnlockList() for an explanation of why
+  ** this makes it safe to access the sqlite3.pDisconnect list of any
+  ** database connection that may have an entry in the p->pVTable list.
+  */
+  assert( db==0 || sqlite3SchemaMutexHeld(db, 0, p->pSchema) );
+
+  while( pVTable ){
+    sqlite3 *db2 = pVTable->db;
+    VTable *pNext = pVTable->pNext;
+    assert( db2 );
+    if( db2==db ){
+      pRet = pVTable;
+      p->pVTable = pRet;
+      pRet->pNext = 0;
+    }else{
+      pVTable->pNext = db2->pDisconnect;
+      db2->pDisconnect = pVTable;
+    }
+    pVTable = pNext;
+  }
+
+  assert( !db || pRet );
+  return pRet;
+}
+
+
+/*
+** Disconnect all the virtual table objects in the sqlite3.pDisconnect list.
+**
+** This function may only be called when the mutexes associated with all
+** shared b-tree databases opened using connection db are held by the 
+** caller. This is done to protect the sqlite3.pDisconnect list. The
+** sqlite3.pDisconnect list is accessed only as follows:
+**
+**   1) By this function. In this case, all BtShared mutexes and the mutex
+**      associated with the database handle itself must be held.
+**
+**   2) By function vtabDisconnectAll(), when it adds a VTable entry to
+**      the sqlite3.pDisconnect list. In this case either the BtShared mutex
+**      associated with the database the virtual table is stored in is held
+**      or, if the virtual table is stored in a non-sharable database, then
+**      the database handle mutex is held.
+**
+** As a result, a sqlite3.pDisconnect cannot be accessed simultaneously 
+** by multiple threads. It is thread-safe.
+*/
+SQLITE_PRIVATE void sqlite3VtabUnlockList(sqlite3 *db){
+  VTable *p = db->pDisconnect;
+  db->pDisconnect = 0;
+
+  assert( sqlite3BtreeHoldsAllMutexes(db) );
+  assert( sqlite3_mutex_held(db->mutex) );
+
+  if( p ){
+    sqlite3ExpirePreparedStatements(db);
+    do {
+      VTable *pNext = p->pNext;
+      sqlite3VtabUnlock(p);
+      p = pNext;
+    }while( p );
+  }
+}
+
+/*
+** Clear any and all virtual-table information from the Table record.
+** This routine is called, for example, just before deleting the Table
+** record.
+**
+** Since it is a virtual-table, the Table structure contains a pointer
+** to the head of a linked list of VTable structures. Each VTable 
+** structure is associated with a single sqlite3* user of the schema.
+** The reference count of the VTable structure associated with database 
+** connection db is decremented immediately (which may lead to the 
+** structure being xDisconnected and free). Any other VTable structures
+** in the list are moved to the sqlite3.pDisconnect list of the associated 
+** database connection.
+*/
+SQLITE_PRIVATE void sqlite3VtabClear(sqlite3 *db, Table *p){
+  if( !db || db->pnBytesFreed==0 ) vtabDisconnectAll(0, p);
+  if( p->azModuleArg ){
+    int i;
+    for(i=0; i<p->nModuleArg; i++){
+      sqlite3DbFree(db, p->azModuleArg[i]);
+    }
+    sqlite3DbFree(db, p->azModuleArg);
+  }
+}
+
+/*
+** Add a new module argument to pTable->azModuleArg[].
+** The string is not copied - the pointer is stored.  The
+** string will be freed automatically when the table is
+** deleted.
+*/
+static void addModuleArgument(sqlite3 *db, Table *pTable, char *zArg){
+  int i = pTable->nModuleArg++;
+  int nBytes = sizeof(char *)*(1+pTable->nModuleArg);
+  char **azModuleArg;
+  azModuleArg = sqlite3DbRealloc(db, pTable->azModuleArg, nBytes);
+  if( azModuleArg==0 ){
+    int j;
+    for(j=0; j<i; j++){
+      sqlite3DbFree(db, pTable->azModuleArg[j]);
+    }
+    sqlite3DbFree(db, zArg);
+    sqlite3DbFree(db, pTable->azModuleArg);
+    pTable->nModuleArg = 0;
+  }else{
+    azModuleArg[i] = zArg;
+    azModuleArg[i+1] = 0;
+  }
+  pTable->azModuleArg = azModuleArg;
+}
+
+/*
+** The parser calls this routine when it first sees a CREATE VIRTUAL TABLE
+** statement.  The module name has been parsed, but the optional list
+** of parameters that follow the module name are still pending.
+*/
+SQLITE_PRIVATE void sqlite3VtabBeginParse(
+  Parse *pParse,        /* Parsing context */
+  Token *pName1,        /* Name of new table, or database name */
+  Token *pName2,        /* Name of new table or NULL */
+  Token *pModuleName    /* Name of the module for the virtual table */
+){
+  int iDb;              /* The database the table is being created in */
+  Table *pTable;        /* The new virtual table */
+  sqlite3 *db;          /* Database connection */
+
+  sqlite3StartTable(pParse, pName1, pName2, 0, 0, 1, 0);
+  pTable = pParse->pNewTable;
+  if( pTable==0 ) return;
+  assert( 0==pTable->pIndex );
+
+  db = pParse->db;
+  iDb = sqlite3SchemaToIndex(db, pTable->pSchema);
+  assert( iDb>=0 );
+
+  pTable->tabFlags |= TF_Virtual;
+  pTable->nModuleArg = 0;
+  addModuleArgument(db, pTable, sqlite3NameFromToken(db, pModuleName));
+  addModuleArgument(db, pTable, sqlite3DbStrDup(db, db->aDb[iDb].zName));
+  addModuleArgument(db, pTable, sqlite3DbStrDup(db, pTable->zName));
+  pParse->sNameToken.n = (int)(&pModuleName->z[pModuleName->n] - pName1->z);
+
+#ifndef SQLITE_OMIT_AUTHORIZATION
+  /* Creating a virtual table invokes the authorization callback twice.
+  ** The first invocation, to obtain permission to INSERT a row into the
+  ** sqlite_master table, has already been made by sqlite3StartTable().
+  ** The second call, to obtain permission to create the table, is made now.
+  */
+  if( pTable->azModuleArg ){
+    sqlite3AuthCheck(pParse, SQLITE_CREATE_VTABLE, pTable->zName, 
+            pTable->azModuleArg[0], pParse->db->aDb[iDb].zName);
+  }
+#endif
+}
+
+/*
+** This routine takes the module argument that has been accumulating
+** in pParse->zArg[] and appends it to the list of arguments on the
+** virtual table currently under construction in pParse->pTable.
+*/
+static void addArgumentToVtab(Parse *pParse){
+  if( pParse->sArg.z && ALWAYS(pParse->pNewTable) ){
+    const char *z = (const char*)pParse->sArg.z;
+    int n = pParse->sArg.n;
+    sqlite3 *db = pParse->db;
+    addModuleArgument(db, pParse->pNewTable, sqlite3DbStrNDup(db, z, n));
+  }
+}
+
+/*
+** The parser calls this routine after the CREATE VIRTUAL TABLE statement
+** has been completely parsed.
+*/
+SQLITE_PRIVATE void sqlite3VtabFinishParse(Parse *pParse, Token *pEnd){
+  Table *pTab = pParse->pNewTable;  /* The table being constructed */
+  sqlite3 *db = pParse->db;         /* The database connection */
+
+  if( pTab==0 ) return;
+  addArgumentToVtab(pParse);
+  pParse->sArg.z = 0;
+  if( pTab->nModuleArg<1 ) return;
+  
+  /* If the CREATE VIRTUAL TABLE statement is being entered for the
+  ** first time (in other words if the virtual table is actually being
+  ** created now instead of just being read out of sqlite_master) then
+  ** do additional initialization work and store the statement text
+  ** in the sqlite_master table.
+  */
+  if( !db->init.busy ){
+    char *zStmt;
+    char *zWhere;
+    int iDb;
+    Vdbe *v;
+
+    /* Compute the complete text of the CREATE VIRTUAL TABLE statement */
+    if( pEnd ){
+      pParse->sNameToken.n = (int)(pEnd->z - pParse->sNameToken.z) + pEnd->n;
+    }
+    zStmt = sqlite3MPrintf(db, "CREATE VIRTUAL TABLE %T", &pParse->sNameToken);
+
+    /* A slot for the record has already been allocated in the 
+    ** SQLITE_MASTER table.  We just need to update that slot with all
+    ** the information we've collected.  
+    **
+    ** The VM register number pParse->regRowid holds the rowid of an
+    ** entry in the sqlite_master table tht was created for this vtab
+    ** by sqlite3StartTable().
+    */
+    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+    sqlite3NestedParse(pParse,
+      "UPDATE %Q.%s "
+         "SET type='table', name=%Q, tbl_name=%Q, rootpage=0, sql=%Q "
+       "WHERE rowid=#%d",
+      db->aDb[iDb].zName, SCHEMA_TABLE(iDb),
+      pTab->zName,
+      pTab->zName,
+      zStmt,
+      pParse->regRowid
+    );
+    sqlite3DbFree(db, zStmt);
+    v = sqlite3GetVdbe(pParse);
+    sqlite3ChangeCookie(pParse, iDb);
+
+    sqlite3VdbeAddOp2(v, OP_Expire, 0, 0);
+    zWhere = sqlite3MPrintf(db, "name='%q' AND type='table'", pTab->zName);
+    sqlite3VdbeAddOp4(v, OP_ParseSchema, iDb, 0, 0, zWhere, P4_DYNAMIC);
+    sqlite3VdbeAddOp4(v, OP_VCreate, iDb, 0, 0, 
+                         pTab->zName, sqlite3Strlen30(pTab->zName) + 1);
+  }
+
+  /* If we are rereading the sqlite_master table create the in-memory
+  ** record of the table. The xConnect() method is not called until
+  ** the first time the virtual table is used in an SQL statement. This
+  ** allows a schema that contains virtual tables to be loaded before
+  ** the required virtual table implementations are registered.  */
+  else {
+    Table *pOld;
+    Schema *pSchema = pTab->pSchema;
+    const char *zName = pTab->zName;
+    int nName = sqlite3Strlen30(zName);
+    assert( sqlite3SchemaMutexHeld(db, 0, pSchema) );
+    pOld = sqlite3HashInsert(&pSchema->tblHash, zName, nName, pTab);
+    if( pOld ){
+      db->mallocFailed = 1;
+      assert( pTab==pOld );  /* Malloc must have failed inside HashInsert() */
+      return;
+    }
+    pParse->pNewTable = 0;
+  }
+}
+
+/*
+** The parser calls this routine when it sees the first token
+** of an argument to the module name in a CREATE VIRTUAL TABLE statement.
+*/
+SQLITE_PRIVATE void sqlite3VtabArgInit(Parse *pParse){
+  addArgumentToVtab(pParse);
+  pParse->sArg.z = 0;
+  pParse->sArg.n = 0;
+}
+
+/*
+** The parser calls this routine for each token after the first token
+** in an argument to the module name in a CREATE VIRTUAL TABLE statement.
+*/
+SQLITE_PRIVATE void sqlite3VtabArgExtend(Parse *pParse, Token *p){
+  Token *pArg = &pParse->sArg;
+  if( pArg->z==0 ){
+    pArg->z = p->z;
+    pArg->n = p->n;
+  }else{
+    assert(pArg->z < p->z);
+    pArg->n = (int)(&p->z[p->n] - pArg->z);
+  }
+}
+
+/*
+** Invoke a virtual table constructor (either xCreate or xConnect). The
+** pointer to the function to invoke is passed as the fourth parameter
+** to this procedure.
+*/
+static int vtabCallConstructor(
+  sqlite3 *db, 
+  Table *pTab,
+  Module *pMod,
+  int (*xConstruct)(sqlite3*,void*,int,const char*const*,sqlite3_vtab**,char**),
+  char **pzErr
+){
+  VTable *pVTable;
+  int rc;
+  const char *const*azArg = (const char *const*)pTab->azModuleArg;
+  int nArg = pTab->nModuleArg;
+  char *zErr = 0;
+  char *zModuleName = sqlite3MPrintf(db, "%s", pTab->zName);
+
+  if( !zModuleName ){
+    return SQLITE_NOMEM;
+  }
+
+  pVTable = sqlite3DbMallocZero(db, sizeof(VTable));
+  if( !pVTable ){
+    sqlite3DbFree(db, zModuleName);
+    return SQLITE_NOMEM;
+  }
+  pVTable->db = db;
+  pVTable->pMod = pMod;
+
+  assert( !db->pVTab );
+  assert( xConstruct );
+  db->pVTab = pTab;
+
+  /* Invoke the virtual table constructor */
+  rc = xConstruct(db, pMod->pAux, nArg, azArg, &pVTable->pVtab, &zErr);
+  if( rc==SQLITE_NOMEM ) db->mallocFailed = 1;
+
+  if( SQLITE_OK!=rc ){
+    if( zErr==0 ){
+      *pzErr = sqlite3MPrintf(db, "vtable constructor failed: %s", zModuleName);
+    }else {
+      *pzErr = sqlite3MPrintf(db, "%s", zErr);
+      sqlite3_free(zErr);
+    }
+    sqlite3DbFree(db, pVTable);
+  }else if( ALWAYS(pVTable->pVtab) ){
+    /* Justification of ALWAYS():  A correct vtab constructor must allocate
+    ** the sqlite3_vtab object if successful.  */
+    pVTable->pVtab->pModule = pMod->pModule;
+    pVTable->nRef = 1;
+    if( db->pVTab ){
+      const char *zFormat = "vtable constructor did not declare schema: %s";
+      *pzErr = sqlite3MPrintf(db, zFormat, pTab->zName);
+      sqlite3VtabUnlock(pVTable);
+      rc = SQLITE_ERROR;
+    }else{
+      int iCol;
+      /* If everything went according to plan, link the new VTable structure
+      ** into the linked list headed by pTab->pVTable. Then loop through the 
+      ** columns of the table to see if any of them contain the token "hidden".
+      ** If so, set the Column.isHidden flag and remove the token from
+      ** the type string.  */
+      pVTable->pNext = pTab->pVTable;
+      pTab->pVTable = pVTable;
+
+      for(iCol=0; iCol<pTab->nCol; iCol++){
+        char *zType = pTab->aCol[iCol].zType;
+        int nType;
+        int i = 0;
+        if( !zType ) continue;
+        nType = sqlite3Strlen30(zType);
+        if( sqlite3StrNICmp("hidden", zType, 6)||(zType[6] && zType[6]!=' ') ){
+          for(i=0; i<nType; i++){
+            if( (0==sqlite3StrNICmp(" hidden", &zType[i], 7))
+             && (zType[i+7]=='\0' || zType[i+7]==' ')
+            ){
+              i++;
+              break;
+            }
+          }
+        }
+        if( i<nType ){
+          int j;
+          int nDel = 6 + (zType[i+6] ? 1 : 0);
+          for(j=i; (j+nDel)<=nType; j++){
+            zType[j] = zType[j+nDel];
+          }
+          if( zType[i]=='\0' && i>0 ){
+            assert(zType[i-1]==' ');
+            zType[i-1] = '\0';
+          }
+          pTab->aCol[iCol].isHidden = 1;
+        }
+      }
+    }
+  }
+
+  sqlite3DbFree(db, zModuleName);
+  db->pVTab = 0;
+  return rc;
+}
+
+/*
+** This function is invoked by the parser to call the xConnect() method
+** of the virtual table pTab. If an error occurs, an error code is returned 
+** and an error left in pParse.
+**
+** This call is a no-op if table pTab is not a virtual table.
+*/
+SQLITE_PRIVATE int sqlite3VtabCallConnect(Parse *pParse, Table *pTab){
+  sqlite3 *db = pParse->db;
+  const char *zMod;
+  Module *pMod;
+  int rc;
+
+  assert( pTab );
+  if( (pTab->tabFlags & TF_Virtual)==0 || sqlite3GetVTable(db, pTab) ){
+    return SQLITE_OK;
+  }
+
+  /* Locate the required virtual table module */
+  zMod = pTab->azModuleArg[0];
+  pMod = (Module*)sqlite3HashFind(&db->aModule, zMod, sqlite3Strlen30(zMod));
+
+  if( !pMod ){
+    const char *zModule = pTab->azModuleArg[0];
+    sqlite3ErrorMsg(pParse, "no such module: %s", zModule);
+    rc = SQLITE_ERROR;
+  }else{
+    char *zErr = 0;
+    rc = vtabCallConstructor(db, pTab, pMod, pMod->pModule->xConnect, &zErr);
+    if( rc!=SQLITE_OK ){
+      sqlite3ErrorMsg(pParse, "%s", zErr);
+    }
+    sqlite3DbFree(db, zErr);
+  }
+
+  return rc;
+}
+
+/*
+** Add the virtual table pVTab to the array sqlite3.aVTrans[].
+*/
+static int addToVTrans(sqlite3 *db, VTable *pVTab){
+  const int ARRAY_INCR = 5;
+
+  /* Grow the sqlite3.aVTrans array if required */
+  if( (db->nVTrans%ARRAY_INCR)==0 ){
+    VTable **aVTrans;
+    int nBytes = sizeof(sqlite3_vtab *) * (db->nVTrans + ARRAY_INCR);
+    aVTrans = sqlite3DbRealloc(db, (void *)db->aVTrans, nBytes);
+    if( !aVTrans ){
+      return SQLITE_NOMEM;
+    }
+    memset(&aVTrans[db->nVTrans], 0, sizeof(sqlite3_vtab *)*ARRAY_INCR);
+    db->aVTrans = aVTrans;
+  }
+
+  /* Add pVtab to the end of sqlite3.aVTrans */
+  db->aVTrans[db->nVTrans++] = pVTab;
+  sqlite3VtabLock(pVTab);
+  return SQLITE_OK;
+}
+
+/*
+** This function is invoked by the vdbe to call the xCreate method
+** of the virtual table named zTab in database iDb. 
+**
+** If an error occurs, *pzErr is set to point an an English language
+** description of the error and an SQLITE_XXX error code is returned.
+** In this case the caller must call sqlite3DbFree(db, ) on *pzErr.
+*/
+SQLITE_PRIVATE int sqlite3VtabCallCreate(sqlite3 *db, int iDb, const char *zTab, char **pzErr){
+  int rc = SQLITE_OK;
+  Table *pTab;
+  Module *pMod;
+  const char *zMod;
+
+  pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
+  assert( pTab && (pTab->tabFlags & TF_Virtual)!=0 && !pTab->pVTable );
+
+  /* Locate the required virtual table module */
+  zMod = pTab->azModuleArg[0];
+  pMod = (Module*)sqlite3HashFind(&db->aModule, zMod, sqlite3Strlen30(zMod));
+
+  /* If the module has been registered and includes a Create method, 
+  ** invoke it now. If the module has not been registered, return an 
+  ** error. Otherwise, do nothing.
+  */
+  if( !pMod ){
+    *pzErr = sqlite3MPrintf(db, "no such module: %s", zMod);
+    rc = SQLITE_ERROR;
+  }else{
+    rc = vtabCallConstructor(db, pTab, pMod, pMod->pModule->xCreate, pzErr);
+  }
+
+  /* Justification of ALWAYS():  The xConstructor method is required to
+  ** create a valid sqlite3_vtab if it returns SQLITE_OK. */
+  if( rc==SQLITE_OK && ALWAYS(sqlite3GetVTable(db, pTab)) ){
+      rc = addToVTrans(db, sqlite3GetVTable(db, pTab));
+  }
+
+  return rc;
+}
+
+/*
+** This function is used to set the schema of a virtual table.  It is only
+** valid to call this function from within the xCreate() or xConnect() of a
+** virtual table module.
+*/
+SQLITE_API int sqlite3_declare_vtab(sqlite3 *db, const char *zCreateTable){
+  Parse *pParse;
+
+  int rc = SQLITE_OK;
+  Table *pTab;
+  char *zErr = 0;
+
+  sqlite3_mutex_enter(db->mutex);
+  pTab = db->pVTab;
+  if( !pTab ){
+    sqlite3Error(db, SQLITE_MISUSE, 0);
+    sqlite3_mutex_leave(db->mutex);
+    return SQLITE_MISUSE_BKPT;
+  }
+  assert( (pTab->tabFlags & TF_Virtual)!=0 );
+
+  pParse = sqlite3StackAllocZero(db, sizeof(*pParse));
+  if( pParse==0 ){
+    rc = SQLITE_NOMEM;
+  }else{
+    pParse->declareVtab = 1;
+    pParse->db = db;
+    pParse->nQueryLoop = 1;
+  
+    if( SQLITE_OK==sqlite3RunParser(pParse, zCreateTable, &zErr) 
+     && pParse->pNewTable
+     && !db->mallocFailed
+     && !pParse->pNewTable->pSelect
+     && (pParse->pNewTable->tabFlags & TF_Virtual)==0
+    ){
+      if( !pTab->aCol ){
+        pTab->aCol = pParse->pNewTable->aCol;
+        pTab->nCol = pParse->pNewTable->nCol;
+        pParse->pNewTable->nCol = 0;
+        pParse->pNewTable->aCol = 0;
+      }
+      db->pVTab = 0;
+    }else{
+      sqlite3Error(db, SQLITE_ERROR, (zErr ? "%s" : 0), zErr);
+      sqlite3DbFree(db, zErr);
+      rc = SQLITE_ERROR;
+    }
+    pParse->declareVtab = 0;
+  
+    if( pParse->pVdbe ){
+      sqlite3VdbeFinalize(pParse->pVdbe);
+    }
+    sqlite3DeleteTable(db, pParse->pNewTable);
+    sqlite3StackFree(db, pParse);
+  }
+
+  assert( (rc&0xff)==rc );
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+/*
+** This function is invoked by the vdbe to call the xDestroy method
+** of the virtual table named zTab in database iDb. This occurs
+** when a DROP TABLE is mentioned.
+**
+** This call is a no-op if zTab is not a virtual table.
+*/
+SQLITE_PRIVATE int sqlite3VtabCallDestroy(sqlite3 *db, int iDb, const char *zTab){
+  int rc = SQLITE_OK;
+  Table *pTab;
+
+  pTab = sqlite3FindTable(db, zTab, db->aDb[iDb].zName);
+  if( ALWAYS(pTab!=0 && pTab->pVTable!=0) ){
+    VTable *p = vtabDisconnectAll(db, pTab);
+
+    assert( rc==SQLITE_OK );
+    rc = p->pMod->pModule->xDestroy(p->pVtab);
+
+    /* Remove the sqlite3_vtab* from the aVTrans[] array, if applicable */
+    if( rc==SQLITE_OK ){
+      assert( pTab->pVTable==p && p->pNext==0 );
+      p->pVtab = 0;
+      pTab->pVTable = 0;
+      sqlite3VtabUnlock(p);
+    }
+  }
+
+  return rc;
+}
+
+/*
+** This function invokes either the xRollback or xCommit method
+** of each of the virtual tables in the sqlite3.aVTrans array. The method
+** called is identified by the second argument, "offset", which is
+** the offset of the method to call in the sqlite3_module structure.
+**
+** The array is cleared after invoking the callbacks. 
+*/
+static void callFinaliser(sqlite3 *db, int offset){
+  int i;
+  if( db->aVTrans ){
+    for(i=0; i<db->nVTrans; i++){
+      VTable *pVTab = db->aVTrans[i];
+      sqlite3_vtab *p = pVTab->pVtab;
+      if( p ){
+        int (*x)(sqlite3_vtab *);
+        x = *(int (**)(sqlite3_vtab *))((char *)p->pModule + offset);
+        if( x ) x(p);
+      }
+      sqlite3VtabUnlock(pVTab);
+    }
+    sqlite3DbFree(db, db->aVTrans);
+    db->nVTrans = 0;
+    db->aVTrans = 0;
+  }
+}
+
+/*
+** Invoke the xSync method of all virtual tables in the sqlite3.aVTrans
+** array. Return the error code for the first error that occurs, or
+** SQLITE_OK if all xSync operations are successful.
+**
+** Set *pzErrmsg to point to a buffer that should be released using 
+** sqlite3DbFree() containing an error message, if one is available.
+*/
+SQLITE_PRIVATE int sqlite3VtabSync(sqlite3 *db, char **pzErrmsg){
+  int i;
+  int rc = SQLITE_OK;
+  VTable **aVTrans = db->aVTrans;
+
+  db->aVTrans = 0;
+  for(i=0; rc==SQLITE_OK && i<db->nVTrans; i++){
+    int (*x)(sqlite3_vtab *);
+    sqlite3_vtab *pVtab = aVTrans[i]->pVtab;
+    if( pVtab && (x = pVtab->pModule->xSync)!=0 ){
+      rc = x(pVtab);
+      sqlite3DbFree(db, *pzErrmsg);
+      *pzErrmsg = sqlite3DbStrDup(db, pVtab->zErrMsg);
+      sqlite3_free(pVtab->zErrMsg);
+    }
+  }
+  db->aVTrans = aVTrans;
+  return rc;
+}
+
+/*
+** Invoke the xRollback method of all virtual tables in the 
+** sqlite3.aVTrans array. Then clear the array itself.
+*/
+SQLITE_PRIVATE int sqlite3VtabRollback(sqlite3 *db){
+  callFinaliser(db, offsetof(sqlite3_module,xRollback));
+  return SQLITE_OK;
+}
+
+/*
+** Invoke the xCommit method of all virtual tables in the 
+** sqlite3.aVTrans array. Then clear the array itself.
+*/
+SQLITE_PRIVATE int sqlite3VtabCommit(sqlite3 *db){
+  callFinaliser(db, offsetof(sqlite3_module,xCommit));
+  return SQLITE_OK;
+}
+
+/*
+** If the virtual table pVtab supports the transaction interface
+** (xBegin/xRollback/xCommit and optionally xSync) and a transaction is
+** not currently open, invoke the xBegin method now.
+**
+** If the xBegin call is successful, place the sqlite3_vtab pointer
+** in the sqlite3.aVTrans array.
+*/
+SQLITE_PRIVATE int sqlite3VtabBegin(sqlite3 *db, VTable *pVTab){
+  int rc = SQLITE_OK;
+  const sqlite3_module *pModule;
+
+  /* Special case: If db->aVTrans is NULL and db->nVTrans is greater
+  ** than zero, then this function is being called from within a
+  ** virtual module xSync() callback. It is illegal to write to 
+  ** virtual module tables in this case, so return SQLITE_LOCKED.
+  */
+  if( sqlite3VtabInSync(db) ){
+    return SQLITE_LOCKED;
+  }
+  if( !pVTab ){
+    return SQLITE_OK;
+  } 
+  pModule = pVTab->pVtab->pModule;
+
+  if( pModule->xBegin ){
+    int i;
+
+
+    /* If pVtab is already in the aVTrans array, return early */
+    for(i=0; i<db->nVTrans; i++){
+      if( db->aVTrans[i]==pVTab ){
+        return SQLITE_OK;
+      }
+    }
+
+    /* Invoke the xBegin method */
+    rc = pModule->xBegin(pVTab->pVtab);
+    if( rc==SQLITE_OK ){
+      rc = addToVTrans(db, pVTab);
+    }
+  }
+  return rc;
+}
+
+/*
+** The first parameter (pDef) is a function implementation.  The
+** second parameter (pExpr) is the first argument to this function.
+** If pExpr is a column in a virtual table, then let the virtual
+** table implementation have an opportunity to overload the function.
+**
+** This routine is used to allow virtual table implementations to
+** overload MATCH, LIKE, GLOB, and REGEXP operators.
+**
+** Return either the pDef argument (indicating no change) or a 
+** new FuncDef structure that is marked as ephemeral using the
+** SQLITE_FUNC_EPHEM flag.
+*/
+SQLITE_PRIVATE FuncDef *sqlite3VtabOverloadFunction(
+  sqlite3 *db,    /* Database connection for reporting malloc problems */
+  FuncDef *pDef,  /* Function to possibly overload */
+  int nArg,       /* Number of arguments to the function */
+  Expr *pExpr     /* First argument to the function */
+){
+  Table *pTab;
+  sqlite3_vtab *pVtab;
+  sqlite3_module *pMod;
+  void (*xFunc)(sqlite3_context*,int,sqlite3_value**) = 0;
+  void *pArg = 0;
+  FuncDef *pNew;
+  int rc = 0;
+  char *zLowerName;
+  unsigned char *z;
+
+
+  /* Check to see the left operand is a column in a virtual table */
+  if( NEVER(pExpr==0) ) return pDef;
+  if( pExpr->op!=TK_COLUMN ) return pDef;
+  pTab = pExpr->pTab;
+  if( NEVER(pTab==0) ) return pDef;
+  if( (pTab->tabFlags & TF_Virtual)==0 ) return pDef;
+  pVtab = sqlite3GetVTable(db, pTab)->pVtab;
+  assert( pVtab!=0 );
+  assert( pVtab->pModule!=0 );
+  pMod = (sqlite3_module *)pVtab->pModule;
+  if( pMod->xFindFunction==0 ) return pDef;
+ 
+  /* Call the xFindFunction method on the virtual table implementation
+  ** to see if the implementation wants to overload this function 
+  */
+  zLowerName = sqlite3DbStrDup(db, pDef->zName);
+  if( zLowerName ){
+    for(z=(unsigned char*)zLowerName; *z; z++){
+      *z = sqlite3UpperToLower[*z];
+    }
+    rc = pMod->xFindFunction(pVtab, nArg, zLowerName, &xFunc, &pArg);
+    sqlite3DbFree(db, zLowerName);
+  }
+  if( rc==0 ){
+    return pDef;
+  }
+
+  /* Create a new ephemeral function definition for the overloaded
+  ** function */
+  pNew = sqlite3DbMallocZero(db, sizeof(*pNew)
+                             + sqlite3Strlen30(pDef->zName) + 1);
+  if( pNew==0 ){
+    return pDef;
+  }
+  *pNew = *pDef;
+  pNew->zName = (char *)&pNew[1];
+  memcpy(pNew->zName, pDef->zName, sqlite3Strlen30(pDef->zName)+1);
+  pNew->xFunc = xFunc;
+  pNew->pUserData = pArg;
+  pNew->flags |= SQLITE_FUNC_EPHEM;
+  return pNew;
+}
+
+/*
+** Make sure virtual table pTab is contained in the pParse->apVirtualLock[]
+** array so that an OP_VBegin will get generated for it.  Add pTab to the
+** array if it is missing.  If pTab is already in the array, this routine
+** is a no-op.
+*/
+SQLITE_PRIVATE void sqlite3VtabMakeWritable(Parse *pParse, Table *pTab){
+  Parse *pToplevel = sqlite3ParseToplevel(pParse);
+  int i, n;
+  Table **apVtabLock;
+
+  assert( IsVirtual(pTab) );
+  for(i=0; i<pToplevel->nVtabLock; i++){
+    if( pTab==pToplevel->apVtabLock[i] ) return;
+  }
+  n = (pToplevel->nVtabLock+1)*sizeof(pToplevel->apVtabLock[0]);
+  apVtabLock = sqlite3_realloc(pToplevel->apVtabLock, n);
+  if( apVtabLock ){
+    pToplevel->apVtabLock = apVtabLock;
+    pToplevel->apVtabLock[pToplevel->nVtabLock++] = pTab;
+  }else{
+    pToplevel->db->mallocFailed = 1;
+  }
+}
+
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+/************** End of vtab.c ************************************************/
+/************** Begin file where.c *******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This module contains C code that generates VDBE code used to process
+** the WHERE clause of SQL statements.  This module is responsible for
+** generating the code that loops through a table looking for applicable
+** rows.  Indices are selected and used to speed the search when doing
+** so is applicable.  Because this module is responsible for selecting
+** indices, you might also think of this module as the "query optimizer".
+*/
+
+
+/*
+** Trace output macros
+*/
+#if defined(SQLITE_TEST) || defined(SQLITE_DEBUG)
+SQLITE_PRIVATE int sqlite3WhereTrace = 0;
+#endif
+#if defined(SQLITE_TEST) && defined(SQLITE_DEBUG)
+# define WHERETRACE(X)  if(sqlite3WhereTrace) sqlite3DebugPrintf X
+#else
+# define WHERETRACE(X)
+#endif
+
+/* Forward reference
+*/
+typedef struct WhereClause WhereClause;
+typedef struct WhereMaskSet WhereMaskSet;
+typedef struct WhereOrInfo WhereOrInfo;
+typedef struct WhereAndInfo WhereAndInfo;
+typedef struct WhereCost WhereCost;
+
+/*
+** The query generator uses an array of instances of this structure to
+** help it analyze the subexpressions of the WHERE clause.  Each WHERE
+** clause subexpression is separated from the others by AND operators,
+** usually, or sometimes subexpressions separated by OR.
+**
+** All WhereTerms are collected into a single WhereClause structure.  
+** The following identity holds:
+**
+**        WhereTerm.pWC->a[WhereTerm.idx] == WhereTerm
+**
+** When a term is of the form:
+**
+**              X <op> <expr>
+**
+** where X is a column name and <op> is one of certain operators,
+** then WhereTerm.leftCursor and WhereTerm.u.leftColumn record the
+** cursor number and column number for X.  WhereTerm.eOperator records
+** the <op> using a bitmask encoding defined by WO_xxx below.  The
+** use of a bitmask encoding for the operator allows us to search
+** quickly for terms that match any of several different operators.
+**
+** A WhereTerm might also be two or more subterms connected by OR:
+**
+**         (t1.X <op> <expr>) OR (t1.Y <op> <expr>) OR ....
+**
+** In this second case, wtFlag as the TERM_ORINFO set and eOperator==WO_OR
+** and the WhereTerm.u.pOrInfo field points to auxiliary information that
+** is collected about the
+**
+** If a term in the WHERE clause does not match either of the two previous
+** categories, then eOperator==0.  The WhereTerm.pExpr field is still set
+** to the original subexpression content and wtFlags is set up appropriately
+** but no other fields in the WhereTerm object are meaningful.
+**
+** When eOperator!=0, prereqRight and prereqAll record sets of cursor numbers,
+** but they do so indirectly.  A single WhereMaskSet structure translates
+** cursor number into bits and the translated bit is stored in the prereq
+** fields.  The translation is used in order to maximize the number of
+** bits that will fit in a Bitmask.  The VDBE cursor numbers might be
+** spread out over the non-negative integers.  For example, the cursor
+** numbers might be 3, 8, 9, 10, 20, 23, 41, and 45.  The WhereMaskSet
+** translates these sparse cursor numbers into consecutive integers
+** beginning with 0 in order to make the best possible use of the available
+** bits in the Bitmask.  So, in the example above, the cursor numbers
+** would be mapped into integers 0 through 7.
+**
+** The number of terms in a join is limited by the number of bits
+** in prereqRight and prereqAll.  The default is 64 bits, hence SQLite
+** is only able to process joins with 64 or fewer tables.
+*/
+typedef struct WhereTerm WhereTerm;
+struct WhereTerm {
+  Expr *pExpr;            /* Pointer to the subexpression that is this term */
+  int iParent;            /* Disable pWC->a[iParent] when this term disabled */
+  int leftCursor;         /* Cursor number of X in "X <op> <expr>" */
+  union {
+    int leftColumn;         /* Column number of X in "X <op> <expr>" */
+    WhereOrInfo *pOrInfo;   /* Extra information if eOperator==WO_OR */
+    WhereAndInfo *pAndInfo; /* Extra information if eOperator==WO_AND */
+  } u;
+  u16 eOperator;          /* A WO_xx value describing <op> */
+  u8 wtFlags;             /* TERM_xxx bit flags.  See below */
+  u8 nChild;              /* Number of children that must disable us */
+  WhereClause *pWC;       /* The clause this term is part of */
+  Bitmask prereqRight;    /* Bitmask of tables used by pExpr->pRight */
+  Bitmask prereqAll;      /* Bitmask of tables referenced by pExpr */
+};
+
+/*
+** Allowed values of WhereTerm.wtFlags
+*/
+#define TERM_DYNAMIC    0x01   /* Need to call sqlite3ExprDelete(db, pExpr) */
+#define TERM_VIRTUAL    0x02   /* Added by the optimizer.  Do not code */
+#define TERM_CODED      0x04   /* This term is already coded */
+#define TERM_COPIED     0x08   /* Has a child */
+#define TERM_ORINFO     0x10   /* Need to free the WhereTerm.u.pOrInfo object */
+#define TERM_ANDINFO    0x20   /* Need to free the WhereTerm.u.pAndInfo obj */
+#define TERM_OR_OK      0x40   /* Used during OR-clause processing */
+#ifdef SQLITE_ENABLE_STAT2
+#  define TERM_VNULL    0x80   /* Manufactured x>NULL or x<=NULL term */
+#else
+#  define TERM_VNULL    0x00   /* Disabled if not using stat2 */
+#endif
+
+/*
+** An instance of the following structure holds all information about a
+** WHERE clause.  Mostly this is a container for one or more WhereTerms.
+*/
+struct WhereClause {
+  Parse *pParse;           /* The parser context */
+  WhereMaskSet *pMaskSet;  /* Mapping of table cursor numbers to bitmasks */
+  Bitmask vmask;           /* Bitmask identifying virtual table cursors */
+  u8 op;                   /* Split operator.  TK_AND or TK_OR */
+  int nTerm;               /* Number of terms */
+  int nSlot;               /* Number of entries in a[] */
+  WhereTerm *a;            /* Each a[] describes a term of the WHERE cluase */
+#if defined(SQLITE_SMALL_STACK)
+  WhereTerm aStatic[1];    /* Initial static space for a[] */
+#else
+  WhereTerm aStatic[8];    /* Initial static space for a[] */
+#endif
+};
+
+/*
+** A WhereTerm with eOperator==WO_OR has its u.pOrInfo pointer set to
+** a dynamically allocated instance of the following structure.
+*/
+struct WhereOrInfo {
+  WhereClause wc;          /* Decomposition into subterms */
+  Bitmask indexable;       /* Bitmask of all indexable tables in the clause */
+};
+
+/*
+** A WhereTerm with eOperator==WO_AND has its u.pAndInfo pointer set to
+** a dynamically allocated instance of the following structure.
+*/
+struct WhereAndInfo {
+  WhereClause wc;          /* The subexpression broken out */
+};
+
+/*
+** An instance of the following structure keeps track of a mapping
+** between VDBE cursor numbers and bits of the bitmasks in WhereTerm.
+**
+** The VDBE cursor numbers are small integers contained in 
+** SrcList_item.iCursor and Expr.iTable fields.  For any given WHERE 
+** clause, the cursor numbers might not begin with 0 and they might
+** contain gaps in the numbering sequence.  But we want to make maximum
+** use of the bits in our bitmasks.  This structure provides a mapping
+** from the sparse cursor numbers into consecutive integers beginning
+** with 0.
+**
+** If WhereMaskSet.ix[A]==B it means that The A-th bit of a Bitmask
+** corresponds VDBE cursor number B.  The A-th bit of a bitmask is 1<<A.
+**
+** For example, if the WHERE clause expression used these VDBE
+** cursors:  4, 5, 8, 29, 57, 73.  Then the  WhereMaskSet structure
+** would map those cursor numbers into bits 0 through 5.
+**
+** Note that the mapping is not necessarily ordered.  In the example
+** above, the mapping might go like this:  4->3, 5->1, 8->2, 29->0,
+** 57->5, 73->4.  Or one of 719 other combinations might be used. It
+** does not really matter.  What is important is that sparse cursor
+** numbers all get mapped into bit numbers that begin with 0 and contain
+** no gaps.
+*/
+struct WhereMaskSet {
+  int n;                        /* Number of assigned cursor values */
+  int ix[BMS];                  /* Cursor assigned to each bit */
+};
+
+/*
+** A WhereCost object records a lookup strategy and the estimated
+** cost of pursuing that strategy.
+*/
+struct WhereCost {
+  WherePlan plan;    /* The lookup strategy */
+  double rCost;      /* Overall cost of pursuing this search strategy */
+  Bitmask used;      /* Bitmask of cursors used by this plan */
+};
+
+/*
+** Bitmasks for the operators that indices are able to exploit.  An
+** OR-ed combination of these values can be used when searching for
+** terms in the where clause.
+*/
+#define WO_IN     0x001
+#define WO_EQ     0x002
+#define WO_LT     (WO_EQ<<(TK_LT-TK_EQ))
+#define WO_LE     (WO_EQ<<(TK_LE-TK_EQ))
+#define WO_GT     (WO_EQ<<(TK_GT-TK_EQ))
+#define WO_GE     (WO_EQ<<(TK_GE-TK_EQ))
+#define WO_MATCH  0x040
+#define WO_ISNULL 0x080
+#define WO_OR     0x100       /* Two or more OR-connected terms */
+#define WO_AND    0x200       /* Two or more AND-connected terms */
+#define WO_NOOP   0x800       /* This term does not restrict search space */
+
+#define WO_ALL    0xfff       /* Mask of all possible WO_* values */
+#define WO_SINGLE 0x0ff       /* Mask of all non-compound WO_* values */
+
+/*
+** Value for wsFlags returned by bestIndex() and stored in
+** WhereLevel.wsFlags.  These flags determine which search
+** strategies are appropriate.
+**
+** The least significant 12 bits is reserved as a mask for WO_ values above.
+** The WhereLevel.wsFlags field is usually set to WO_IN|WO_EQ|WO_ISNULL.
+** But if the table is the right table of a left join, WhereLevel.wsFlags
+** is set to WO_IN|WO_EQ.  The WhereLevel.wsFlags field can then be used as
+** the "op" parameter to findTerm when we are resolving equality constraints.
+** ISNULL constraints will then not be used on the right table of a left
+** join.  Tickets #2177 and #2189.
+*/
+#define WHERE_ROWID_EQ     0x00001000  /* rowid=EXPR or rowid IN (...) */
+#define WHERE_ROWID_RANGE  0x00002000  /* rowid<EXPR and/or rowid>EXPR */
+#define WHERE_COLUMN_EQ    0x00010000  /* x=EXPR or x IN (...) or x IS NULL */
+#define WHERE_COLUMN_RANGE 0x00020000  /* x<EXPR and/or x>EXPR */
+#define WHERE_COLUMN_IN    0x00040000  /* x IN (...) */
+#define WHERE_COLUMN_NULL  0x00080000  /* x IS NULL */
+#define WHERE_INDEXED      0x000f0000  /* Anything that uses an index */
+#define WHERE_NOT_FULLSCAN 0x100f3000  /* Does not do a full table scan */
+#define WHERE_IN_ABLE      0x000f1000  /* Able to support an IN operator */
+#define WHERE_TOP_LIMIT    0x00100000  /* x<EXPR or x<=EXPR constraint */
+#define WHERE_BTM_LIMIT    0x00200000  /* x>EXPR or x>=EXPR constraint */
+#define WHERE_BOTH_LIMIT   0x00300000  /* Both x>EXPR and x<EXPR */
+#define WHERE_IDX_ONLY     0x00800000  /* Use index only - omit table */
+#define WHERE_ORDERBY      0x01000000  /* Output will appear in correct order */
+#define WHERE_REVERSE      0x02000000  /* Scan in reverse order */
+#define WHERE_UNIQUE       0x04000000  /* Selects no more than one row */
+#define WHERE_VIRTUALTABLE 0x08000000  /* Use virtual-table processing */
+#define WHERE_MULTI_OR     0x10000000  /* OR using multiple indices */
+#define WHERE_TEMP_INDEX   0x20000000  /* Uses an ephemeral index */
+
+/*
+** Initialize a preallocated WhereClause structure.
+*/
+static void whereClauseInit(
+  WhereClause *pWC,        /* The WhereClause to be initialized */
+  Parse *pParse,           /* The parsing context */
+  WhereMaskSet *pMaskSet   /* Mapping from table cursor numbers to bitmasks */
+){
+  pWC->pParse = pParse;
+  pWC->pMaskSet = pMaskSet;
+  pWC->nTerm = 0;
+  pWC->nSlot = ArraySize(pWC->aStatic);
+  pWC->a = pWC->aStatic;
+  pWC->vmask = 0;
+}
+
+/* Forward reference */
+static void whereClauseClear(WhereClause*);
+
+/*
+** Deallocate all memory associated with a WhereOrInfo object.
+*/
+static void whereOrInfoDelete(sqlite3 *db, WhereOrInfo *p){
+  whereClauseClear(&p->wc);
+  sqlite3DbFree(db, p);
+}
+
+/*
+** Deallocate all memory associated with a WhereAndInfo object.
+*/
+static void whereAndInfoDelete(sqlite3 *db, WhereAndInfo *p){
+  whereClauseClear(&p->wc);
+  sqlite3DbFree(db, p);
+}
+
+/*
+** Deallocate a WhereClause structure.  The WhereClause structure
+** itself is not freed.  This routine is the inverse of whereClauseInit().
+*/
+static void whereClauseClear(WhereClause *pWC){
+  int i;
+  WhereTerm *a;
+  sqlite3 *db = pWC->pParse->db;
+  for(i=pWC->nTerm-1, a=pWC->a; i>=0; i--, a++){
+    if( a->wtFlags & TERM_DYNAMIC ){
+      sqlite3ExprDelete(db, a->pExpr);
+    }
+    if( a->wtFlags & TERM_ORINFO ){
+      whereOrInfoDelete(db, a->u.pOrInfo);
+    }else if( a->wtFlags & TERM_ANDINFO ){
+      whereAndInfoDelete(db, a->u.pAndInfo);
+    }
+  }
+  if( pWC->a!=pWC->aStatic ){
+    sqlite3DbFree(db, pWC->a);
+  }
+}
+
+/*
+** Add a single new WhereTerm entry to the WhereClause object pWC.
+** The new WhereTerm object is constructed from Expr p and with wtFlags.
+** The index in pWC->a[] of the new WhereTerm is returned on success.
+** 0 is returned if the new WhereTerm could not be added due to a memory
+** allocation error.  The memory allocation failure will be recorded in
+** the db->mallocFailed flag so that higher-level functions can detect it.
+**
+** This routine will increase the size of the pWC->a[] array as necessary.
+**
+** If the wtFlags argument includes TERM_DYNAMIC, then responsibility
+** for freeing the expression p is assumed by the WhereClause object pWC.
+** This is true even if this routine fails to allocate a new WhereTerm.
+**
+** WARNING:  This routine might reallocate the space used to store
+** WhereTerms.  All pointers to WhereTerms should be invalidated after
+** calling this routine.  Such pointers may be reinitialized by referencing
+** the pWC->a[] array.
+*/
+static int whereClauseInsert(WhereClause *pWC, Expr *p, u8 wtFlags){
+  WhereTerm *pTerm;
+  int idx;
+  testcase( wtFlags & TERM_VIRTUAL );  /* EV: R-00211-15100 */
+  if( pWC->nTerm>=pWC->nSlot ){
+    WhereTerm *pOld = pWC->a;
+    sqlite3 *db = pWC->pParse->db;
+    pWC->a = sqlite3DbMallocRaw(db, sizeof(pWC->a[0])*pWC->nSlot*2 );
+    if( pWC->a==0 ){
+      if( wtFlags & TERM_DYNAMIC ){
+        sqlite3ExprDelete(db, p);
+      }
+      pWC->a = pOld;
+      return 0;
+    }
+    memcpy(pWC->a, pOld, sizeof(pWC->a[0])*pWC->nTerm);
+    if( pOld!=pWC->aStatic ){
+      sqlite3DbFree(db, pOld);
+    }
+    pWC->nSlot = sqlite3DbMallocSize(db, pWC->a)/sizeof(pWC->a[0]);
+  }
+  pTerm = &pWC->a[idx = pWC->nTerm++];
+  pTerm->pExpr = p;
+  pTerm->wtFlags = wtFlags;
+  pTerm->pWC = pWC;
+  pTerm->iParent = -1;
+  return idx;
+}
+
+/*
+** This routine identifies subexpressions in the WHERE clause where
+** each subexpression is separated by the AND operator or some other
+** operator specified in the op parameter.  The WhereClause structure
+** is filled with pointers to subexpressions.  For example:
+**
+**    WHERE  a=='hello' AND coalesce(b,11)<10 AND (c+12!=d OR c==22)
+**           \________/     \_______________/     \________________/
+**            slot[0]            slot[1]               slot[2]
+**
+** The original WHERE clause in pExpr is unaltered.  All this routine
+** does is make slot[] entries point to substructure within pExpr.
+**
+** In the previous sentence and in the diagram, "slot[]" refers to
+** the WhereClause.a[] array.  The slot[] array grows as needed to contain
+** all terms of the WHERE clause.
+*/
+static void whereSplit(WhereClause *pWC, Expr *pExpr, int op){
+  pWC->op = (u8)op;
+  if( pExpr==0 ) return;
+  if( pExpr->op!=op ){
+    whereClauseInsert(pWC, pExpr, 0);
+  }else{
+    whereSplit(pWC, pExpr->pLeft, op);
+    whereSplit(pWC, pExpr->pRight, op);
+  }
+}
+
+/*
+** Initialize an expression mask set (a WhereMaskSet object)
+*/
+#define initMaskSet(P)  memset(P, 0, sizeof(*P))
+
+/*
+** Return the bitmask for the given cursor number.  Return 0 if
+** iCursor is not in the set.
+*/
+static Bitmask getMask(WhereMaskSet *pMaskSet, int iCursor){
+  int i;
+  assert( pMaskSet->n<=(int)sizeof(Bitmask)*8 );
+  for(i=0; i<pMaskSet->n; i++){
+    if( pMaskSet->ix[i]==iCursor ){
+      return ((Bitmask)1)<<i;
+    }
+  }
+  return 0;
+}
+
+/*
+** Create a new mask for cursor iCursor.
+**
+** There is one cursor per table in the FROM clause.  The number of
+** tables in the FROM clause is limited by a test early in the
+** sqlite3WhereBegin() routine.  So we know that the pMaskSet->ix[]
+** array will never overflow.
+*/
+static void createMask(WhereMaskSet *pMaskSet, int iCursor){
+  assert( pMaskSet->n < ArraySize(pMaskSet->ix) );
+  pMaskSet->ix[pMaskSet->n++] = iCursor;
+}
+
+/*
+** This routine walks (recursively) an expression tree and generates
+** a bitmask indicating which tables are used in that expression
+** tree.
+**
+** In order for this routine to work, the calling function must have
+** previously invoked sqlite3ResolveExprNames() on the expression.  See
+** the header comment on that routine for additional information.
+** The sqlite3ResolveExprNames() routines looks for column names and
+** sets their opcodes to TK_COLUMN and their Expr.iTable fields to
+** the VDBE cursor number of the table.  This routine just has to
+** translate the cursor numbers into bitmask values and OR all
+** the bitmasks together.
+*/
+static Bitmask exprListTableUsage(WhereMaskSet*, ExprList*);
+static Bitmask exprSelectTableUsage(WhereMaskSet*, Select*);
+static Bitmask exprTableUsage(WhereMaskSet *pMaskSet, Expr *p){
+  Bitmask mask = 0;
+  if( p==0 ) return 0;
+  if( p->op==TK_COLUMN ){
+    mask = getMask(pMaskSet, p->iTable);
+    return mask;
+  }
+  mask = exprTableUsage(pMaskSet, p->pRight);
+  mask |= exprTableUsage(pMaskSet, p->pLeft);
+  if( ExprHasProperty(p, EP_xIsSelect) ){
+    mask |= exprSelectTableUsage(pMaskSet, p->x.pSelect);
+  }else{
+    mask |= exprListTableUsage(pMaskSet, p->x.pList);
+  }
+  return mask;
+}
+static Bitmask exprListTableUsage(WhereMaskSet *pMaskSet, ExprList *pList){
+  int i;
+  Bitmask mask = 0;
+  if( pList ){
+    for(i=0; i<pList->nExpr; i++){
+      mask |= exprTableUsage(pMaskSet, pList->a[i].pExpr);
+    }
+  }
+  return mask;
+}
+static Bitmask exprSelectTableUsage(WhereMaskSet *pMaskSet, Select *pS){
+  Bitmask mask = 0;
+  while( pS ){
+    mask |= exprListTableUsage(pMaskSet, pS->pEList);
+    mask |= exprListTableUsage(pMaskSet, pS->pGroupBy);
+    mask |= exprListTableUsage(pMaskSet, pS->pOrderBy);
+    mask |= exprTableUsage(pMaskSet, pS->pWhere);
+    mask |= exprTableUsage(pMaskSet, pS->pHaving);
+    pS = pS->pPrior;
+  }
+  return mask;
+}
+
+/*
+** Return TRUE if the given operator is one of the operators that is
+** allowed for an indexable WHERE clause term.  The allowed operators are
+** "=", "<", ">", "<=", ">=", and "IN".
+**
+** IMPLEMENTATION-OF: R-59926-26393 To be usable by an index a term must be
+** of one of the following forms: column = expression column > expression
+** column >= expression column < expression column <= expression
+** expression = column expression > column expression >= column
+** expression < column expression <= column column IN
+** (expression-list) column IN (subquery) column IS NULL
+*/
+static int allowedOp(int op){
+  assert( TK_GT>TK_EQ && TK_GT<TK_GE );
+  assert( TK_LT>TK_EQ && TK_LT<TK_GE );
+  assert( TK_LE>TK_EQ && TK_LE<TK_GE );
+  assert( TK_GE==TK_EQ+4 );
+  return op==TK_IN || (op>=TK_EQ && op<=TK_GE) || op==TK_ISNULL;
+}
+
+/*
+** Swap two objects of type TYPE.
+*/
+#define SWAP(TYPE,A,B) {TYPE t=A; A=B; B=t;}
+
+/*
+** Commute a comparison operator.  Expressions of the form "X op Y"
+** are converted into "Y op X".
+**
+** If a collation sequence is associated with either the left or right
+** side of the comparison, it remains associated with the same side after
+** the commutation. So "Y collate NOCASE op X" becomes 
+** "X collate NOCASE op Y". This is because any collation sequence on
+** the left hand side of a comparison overrides any collation sequence 
+** attached to the right. For the same reason the EP_ExpCollate flag
+** is not commuted.
+*/
+static void exprCommute(Parse *pParse, Expr *pExpr){
+  u16 expRight = (pExpr->pRight->flags & EP_ExpCollate);
+  u16 expLeft = (pExpr->pLeft->flags & EP_ExpCollate);
+  assert( allowedOp(pExpr->op) && pExpr->op!=TK_IN );
+  pExpr->pRight->pColl = sqlite3ExprCollSeq(pParse, pExpr->pRight);
+  pExpr->pLeft->pColl = sqlite3ExprCollSeq(pParse, pExpr->pLeft);
+  SWAP(CollSeq*,pExpr->pRight->pColl,pExpr->pLeft->pColl);
+  pExpr->pRight->flags = (pExpr->pRight->flags & ~EP_ExpCollate) | expLeft;
+  pExpr->pLeft->flags = (pExpr->pLeft->flags & ~EP_ExpCollate) | expRight;
+  SWAP(Expr*,pExpr->pRight,pExpr->pLeft);
+  if( pExpr->op>=TK_GT ){
+    assert( TK_LT==TK_GT+2 );
+    assert( TK_GE==TK_LE+2 );
+    assert( TK_GT>TK_EQ );
+    assert( TK_GT<TK_LE );
+    assert( pExpr->op>=TK_GT && pExpr->op<=TK_GE );
+    pExpr->op = ((pExpr->op-TK_GT)^2)+TK_GT;
+  }
+}
+
+/*
+** Translate from TK_xx operator to WO_xx bitmask.
+*/
+static u16 operatorMask(int op){
+  u16 c;
+  assert( allowedOp(op) );
+  if( op==TK_IN ){
+    c = WO_IN;
+  }else if( op==TK_ISNULL ){
+    c = WO_ISNULL;
+  }else{
+    assert( (WO_EQ<<(op-TK_EQ)) < 0x7fff );
+    c = (u16)(WO_EQ<<(op-TK_EQ));
+  }
+  assert( op!=TK_ISNULL || c==WO_ISNULL );
+  assert( op!=TK_IN || c==WO_IN );
+  assert( op!=TK_EQ || c==WO_EQ );
+  assert( op!=TK_LT || c==WO_LT );
+  assert( op!=TK_LE || c==WO_LE );
+  assert( op!=TK_GT || c==WO_GT );
+  assert( op!=TK_GE || c==WO_GE );
+  return c;
+}
+
+/*
+** Search for a term in the WHERE clause that is of the form "X <op> <expr>"
+** where X is a reference to the iColumn of table iCur and <op> is one of
+** the WO_xx operator codes specified by the op parameter.
+** Return a pointer to the term.  Return 0 if not found.
+*/
+static WhereTerm *findTerm(
+  WhereClause *pWC,     /* The WHERE clause to be searched */
+  int iCur,             /* Cursor number of LHS */
+  int iColumn,          /* Column number of LHS */
+  Bitmask notReady,     /* RHS must not overlap with this mask */
+  u32 op,               /* Mask of WO_xx values describing operator */
+  Index *pIdx           /* Must be compatible with this index, if not NULL */
+){
+  WhereTerm *pTerm;
+  int k;
+  assert( iCur>=0 );
+  op &= WO_ALL;
+  for(pTerm=pWC->a, k=pWC->nTerm; k; k--, pTerm++){
+    if( pTerm->leftCursor==iCur
+       && (pTerm->prereqRight & notReady)==0
+       && pTerm->u.leftColumn==iColumn
+       && (pTerm->eOperator & op)!=0
+    ){
+      if( pIdx && pTerm->eOperator!=WO_ISNULL ){
+        Expr *pX = pTerm->pExpr;
+        CollSeq *pColl;
+        char idxaff;
+        int j;
+        Parse *pParse = pWC->pParse;
+
+        idxaff = pIdx->pTable->aCol[iColumn].affinity;
+        if( !sqlite3IndexAffinityOk(pX, idxaff) ) continue;
+
+        /* Figure out the collation sequence required from an index for
+        ** it to be useful for optimising expression pX. Store this
+        ** value in variable pColl.
+        */
+        assert(pX->pLeft);
+        pColl = sqlite3BinaryCompareCollSeq(pParse, pX->pLeft, pX->pRight);
+        assert(pColl || pParse->nErr);
+
+        for(j=0; pIdx->aiColumn[j]!=iColumn; j++){
+          if( NEVER(j>=pIdx->nColumn) ) return 0;
+        }
+        if( pColl && sqlite3StrICmp(pColl->zName, pIdx->azColl[j]) ) continue;
+      }
+      return pTerm;
+    }
+  }
+  return 0;
+}
+
+/* Forward reference */
+static void exprAnalyze(SrcList*, WhereClause*, int);
+
+/*
+** Call exprAnalyze on all terms in a WHERE clause.  
+**
+**
+*/
+static void exprAnalyzeAll(
+  SrcList *pTabList,       /* the FROM clause */
+  WhereClause *pWC         /* the WHERE clause to be analyzed */
+){
+  int i;
+  for(i=pWC->nTerm-1; i>=0; i--){
+    exprAnalyze(pTabList, pWC, i);
+  }
+}
+
+#ifndef SQLITE_OMIT_LIKE_OPTIMIZATION
+/*
+** Check to see if the given expression is a LIKE or GLOB operator that
+** can be optimized using inequality constraints.  Return TRUE if it is
+** so and false if not.
+**
+** In order for the operator to be optimizible, the RHS must be a string
+** literal that does not begin with a wildcard.  
+*/
+static int isLikeOrGlob(
+  Parse *pParse,    /* Parsing and code generating context */
+  Expr *pExpr,      /* Test this expression */
+  Expr **ppPrefix,  /* Pointer to TK_STRING expression with pattern prefix */
+  int *pisComplete, /* True if the only wildcard is % in the last character */
+  int *pnoCase      /* True if uppercase is equivalent to lowercase */
+){
+  const char *z = 0;         /* String on RHS of LIKE operator */
+  Expr *pRight, *pLeft;      /* Right and left size of LIKE operator */
+  ExprList *pList;           /* List of operands to the LIKE operator */
+  int c;                     /* One character in z[] */
+  int cnt;                   /* Number of non-wildcard prefix characters */
+  char wc[3];                /* Wildcard characters */
+  sqlite3 *db = pParse->db;  /* Database connection */
+  sqlite3_value *pVal = 0;
+  int op;                    /* Opcode of pRight */
+
+  if( !sqlite3IsLikeFunction(db, pExpr, pnoCase, wc) ){
+    return 0;
+  }
+#ifdef SQLITE_EBCDIC
+  if( *pnoCase ) return 0;
+#endif
+  pList = pExpr->x.pList;
+  pLeft = pList->a[1].pExpr;
+  if( pLeft->op!=TK_COLUMN || sqlite3ExprAffinity(pLeft)!=SQLITE_AFF_TEXT ){
+    /* IMP: R-02065-49465 The left-hand side of the LIKE or GLOB operator must
+    ** be the name of an indexed column with TEXT affinity. */
+    return 0;
+  }
+  assert( pLeft->iColumn!=(-1) ); /* Because IPK never has AFF_TEXT */
+
+  pRight = pList->a[0].pExpr;
+  op = pRight->op;
+  if( op==TK_REGISTER ){
+    op = pRight->op2;
+  }
+  if( op==TK_VARIABLE ){
+    Vdbe *pReprepare = pParse->pReprepare;
+    int iCol = pRight->iColumn;
+    pVal = sqlite3VdbeGetValue(pReprepare, iCol, SQLITE_AFF_NONE);
+    if( pVal && sqlite3_value_type(pVal)==SQLITE_TEXT ){
+      z = (char *)sqlite3_value_text(pVal);
+    }
+    sqlite3VdbeSetVarmask(pParse->pVdbe, iCol); /* IMP: R-23257-02778 */
+    assert( pRight->op==TK_VARIABLE || pRight->op==TK_REGISTER );
+  }else if( op==TK_STRING ){
+    z = pRight->u.zToken;
+  }
+  if( z ){
+    cnt = 0;
+    while( (c=z[cnt])!=0 && c!=wc[0] && c!=wc[1] && c!=wc[2] ){
+      cnt++;
+    }
+    if( cnt!=0 && 255!=(u8)z[cnt-1] ){
+      Expr *pPrefix;
+      *pisComplete = c==wc[0] && z[cnt+1]==0;
+      pPrefix = sqlite3Expr(db, TK_STRING, z);
+      if( pPrefix ) pPrefix->u.zToken[cnt] = 0;
+      *ppPrefix = pPrefix;
+      if( op==TK_VARIABLE ){
+        Vdbe *v = pParse->pVdbe;
+        sqlite3VdbeSetVarmask(v, pRight->iColumn); /* IMP: R-23257-02778 */
+        if( *pisComplete && pRight->u.zToken[1] ){
+          /* If the rhs of the LIKE expression is a variable, and the current
+          ** value of the variable means there is no need to invoke the LIKE
+          ** function, then no OP_Variable will be added to the program.
+          ** This causes problems for the sqlite3_bind_parameter_name()
+          ** API. To workaround them, add a dummy OP_Variable here.
+          */ 
+          int r1 = sqlite3GetTempReg(pParse);
+          sqlite3ExprCodeTarget(pParse, pRight, r1);
+          sqlite3VdbeChangeP3(v, sqlite3VdbeCurrentAddr(v)-1, 0);
+          sqlite3ReleaseTempReg(pParse, r1);
+        }
+      }
+    }else{
+      z = 0;
+    }
+  }
+
+  sqlite3ValueFree(pVal);
+  return (z!=0);
+}
+#endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */
+
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/*
+** Check to see if the given expression is of the form
+**
+**         column MATCH expr
+**
+** If it is then return TRUE.  If not, return FALSE.
+*/
+static int isMatchOfColumn(
+  Expr *pExpr      /* Test this expression */
+){
+  ExprList *pList;
+
+  if( pExpr->op!=TK_FUNCTION ){
+    return 0;
+  }
+  if( sqlite3StrICmp(pExpr->u.zToken,"match")!=0 ){
+    return 0;
+  }
+  pList = pExpr->x.pList;
+  if( pList->nExpr!=2 ){
+    return 0;
+  }
+  if( pList->a[1].pExpr->op != TK_COLUMN ){
+    return 0;
+  }
+  return 1;
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+/*
+** If the pBase expression originated in the ON or USING clause of
+** a join, then transfer the appropriate markings over to derived.
+*/
+static void transferJoinMarkings(Expr *pDerived, Expr *pBase){
+  pDerived->flags |= pBase->flags & EP_FromJoin;
+  pDerived->iRightJoinTable = pBase->iRightJoinTable;
+}
+
+#if !defined(SQLITE_OMIT_OR_OPTIMIZATION) && !defined(SQLITE_OMIT_SUBQUERY)
+/*
+** Analyze a term that consists of two or more OR-connected
+** subterms.  So in:
+**
+**     ... WHERE  (a=5) AND (b=7 OR c=9 OR d=13) AND (d=13)
+**                          ^^^^^^^^^^^^^^^^^^^^
+**
+** This routine analyzes terms such as the middle term in the above example.
+** A WhereOrTerm object is computed and attached to the term under
+** analysis, regardless of the outcome of the analysis.  Hence:
+**
+**     WhereTerm.wtFlags   |=  TERM_ORINFO
+**     WhereTerm.u.pOrInfo  =  a dynamically allocated WhereOrTerm object
+**
+** The term being analyzed must have two or more of OR-connected subterms.
+** A single subterm might be a set of AND-connected sub-subterms.
+** Examples of terms under analysis:
+**
+**     (A)     t1.x=t2.y OR t1.x=t2.z OR t1.y=15 OR t1.z=t3.a+5
+**     (B)     x=expr1 OR expr2=x OR x=expr3
+**     (C)     t1.x=t2.y OR (t1.x=t2.z AND t1.y=15)
+**     (D)     x=expr1 OR (y>11 AND y<22 AND z LIKE '*hello*')
+**     (E)     (p.a=1 AND q.b=2 AND r.c=3) OR (p.x=4 AND q.y=5 AND r.z=6)
+**
+** CASE 1:
+**
+** If all subterms are of the form T.C=expr for some single column of C
+** a single table T (as shown in example B above) then create a new virtual
+** term that is an equivalent IN expression.  In other words, if the term
+** being analyzed is:
+**
+**      x = expr1  OR  expr2 = x  OR  x = expr3
+**
+** then create a new virtual term like this:
+**
+**      x IN (expr1,expr2,expr3)
+**
+** CASE 2:
+**
+** If all subterms are indexable by a single table T, then set
+**
+**     WhereTerm.eOperator              =  WO_OR
+**     WhereTerm.u.pOrInfo->indexable  |=  the cursor number for table T
+**
+** A subterm is "indexable" if it is of the form
+** "T.C <op> <expr>" where C is any column of table T and 
+** <op> is one of "=", "<", "<=", ">", ">=", "IS NULL", or "IN".
+** A subterm is also indexable if it is an AND of two or more
+** subsubterms at least one of which is indexable.  Indexable AND 
+** subterms have their eOperator set to WO_AND and they have
+** u.pAndInfo set to a dynamically allocated WhereAndTerm object.
+**
+** From another point of view, "indexable" means that the subterm could
+** potentially be used with an index if an appropriate index exists.
+** This analysis does not consider whether or not the index exists; that
+** is something the bestIndex() routine will determine.  This analysis
+** only looks at whether subterms appropriate for indexing exist.
+**
+** All examples A through E above all satisfy case 2.  But if a term
+** also statisfies case 1 (such as B) we know that the optimizer will
+** always prefer case 1, so in that case we pretend that case 2 is not
+** satisfied.
+**
+** It might be the case that multiple tables are indexable.  For example,
+** (E) above is indexable on tables P, Q, and R.
+**
+** Terms that satisfy case 2 are candidates for lookup by using
+** separate indices to find rowids for each subterm and composing
+** the union of all rowids using a RowSet object.  This is similar
+** to "bitmap indices" in other database engines.
+**
+** OTHERWISE:
+**
+** If neither case 1 nor case 2 apply, then leave the eOperator set to
+** zero.  This term is not useful for search.
+*/
+static void exprAnalyzeOrTerm(
+  SrcList *pSrc,            /* the FROM clause */
+  WhereClause *pWC,         /* the complete WHERE clause */
+  int idxTerm               /* Index of the OR-term to be analyzed */
+){
+  Parse *pParse = pWC->pParse;            /* Parser context */
+  sqlite3 *db = pParse->db;               /* Database connection */
+  WhereTerm *pTerm = &pWC->a[idxTerm];    /* The term to be analyzed */
+  Expr *pExpr = pTerm->pExpr;             /* The expression of the term */
+  WhereMaskSet *pMaskSet = pWC->pMaskSet; /* Table use masks */
+  int i;                                  /* Loop counters */
+  WhereClause *pOrWc;       /* Breakup of pTerm into subterms */
+  WhereTerm *pOrTerm;       /* A Sub-term within the pOrWc */
+  WhereOrInfo *pOrInfo;     /* Additional information associated with pTerm */
+  Bitmask chngToIN;         /* Tables that might satisfy case 1 */
+  Bitmask indexable;        /* Tables that are indexable, satisfying case 2 */
+
+  /*
+  ** Break the OR clause into its separate subterms.  The subterms are
+  ** stored in a WhereClause structure containing within the WhereOrInfo
+  ** object that is attached to the original OR clause term.
+  */
+  assert( (pTerm->wtFlags & (TERM_DYNAMIC|TERM_ORINFO|TERM_ANDINFO))==0 );
+  assert( pExpr->op==TK_OR );
+  pTerm->u.pOrInfo = pOrInfo = sqlite3DbMallocZero(db, sizeof(*pOrInfo));
+  if( pOrInfo==0 ) return;
+  pTerm->wtFlags |= TERM_ORINFO;
+  pOrWc = &pOrInfo->wc;
+  whereClauseInit(pOrWc, pWC->pParse, pMaskSet);
+  whereSplit(pOrWc, pExpr, TK_OR);
+  exprAnalyzeAll(pSrc, pOrWc);
+  if( db->mallocFailed ) return;
+  assert( pOrWc->nTerm>=2 );
+
+  /*
+  ** Compute the set of tables that might satisfy cases 1 or 2.
+  */
+  indexable = ~(Bitmask)0;
+  chngToIN = ~(pWC->vmask);
+  for(i=pOrWc->nTerm-1, pOrTerm=pOrWc->a; i>=0 && indexable; i--, pOrTerm++){
+    if( (pOrTerm->eOperator & WO_SINGLE)==0 ){
+      WhereAndInfo *pAndInfo;
+      assert( pOrTerm->eOperator==0 );
+      assert( (pOrTerm->wtFlags & (TERM_ANDINFO|TERM_ORINFO))==0 );
+      chngToIN = 0;
+      pAndInfo = sqlite3DbMallocRaw(db, sizeof(*pAndInfo));
+      if( pAndInfo ){
+        WhereClause *pAndWC;
+        WhereTerm *pAndTerm;
+        int j;
+        Bitmask b = 0;
+        pOrTerm->u.pAndInfo = pAndInfo;
+        pOrTerm->wtFlags |= TERM_ANDINFO;
+        pOrTerm->eOperator = WO_AND;
+        pAndWC = &pAndInfo->wc;
+        whereClauseInit(pAndWC, pWC->pParse, pMaskSet);
+        whereSplit(pAndWC, pOrTerm->pExpr, TK_AND);
+        exprAnalyzeAll(pSrc, pAndWC);
+        testcase( db->mallocFailed );
+        if( !db->mallocFailed ){
+          for(j=0, pAndTerm=pAndWC->a; j<pAndWC->nTerm; j++, pAndTerm++){
+            assert( pAndTerm->pExpr );
+            if( allowedOp(pAndTerm->pExpr->op) ){
+              b |= getMask(pMaskSet, pAndTerm->leftCursor);
+            }
+          }
+        }
+        indexable &= b;
+      }
+    }else if( pOrTerm->wtFlags & TERM_COPIED ){
+      /* Skip this term for now.  We revisit it when we process the
+      ** corresponding TERM_VIRTUAL term */
+    }else{
+      Bitmask b;
+      b = getMask(pMaskSet, pOrTerm->leftCursor);
+      if( pOrTerm->wtFlags & TERM_VIRTUAL ){
+        WhereTerm *pOther = &pOrWc->a[pOrTerm->iParent];
+        b |= getMask(pMaskSet, pOther->leftCursor);
+      }
+      indexable &= b;
+      if( pOrTerm->eOperator!=WO_EQ ){
+        chngToIN = 0;
+      }else{
+        chngToIN &= b;
+      }
+    }
+  }
+
+  /*
+  ** Record the set of tables that satisfy case 2.  The set might be
+  ** empty.
+  */
+  pOrInfo->indexable = indexable;
+  pTerm->eOperator = indexable==0 ? 0 : WO_OR;
+
+  /*
+  ** chngToIN holds a set of tables that *might* satisfy case 1.  But
+  ** we have to do some additional checking to see if case 1 really
+  ** is satisfied.
+  **
+  ** chngToIN will hold either 0, 1, or 2 bits.  The 0-bit case means
+  ** that there is no possibility of transforming the OR clause into an
+  ** IN operator because one or more terms in the OR clause contain
+  ** something other than == on a column in the single table.  The 1-bit
+  ** case means that every term of the OR clause is of the form
+  ** "table.column=expr" for some single table.  The one bit that is set
+  ** will correspond to the common table.  We still need to check to make
+  ** sure the same column is used on all terms.  The 2-bit case is when
+  ** the all terms are of the form "table1.column=table2.column".  It
+  ** might be possible to form an IN operator with either table1.column
+  ** or table2.column as the LHS if either is common to every term of
+  ** the OR clause.
+  **
+  ** Note that terms of the form "table.column1=table.column2" (the
+  ** same table on both sizes of the ==) cannot be optimized.
+  */
+  if( chngToIN ){
+    int okToChngToIN = 0;     /* True if the conversion to IN is valid */
+    int iColumn = -1;         /* Column index on lhs of IN operator */
+    int iCursor = -1;         /* Table cursor common to all terms */
+    int j = 0;                /* Loop counter */
+
+    /* Search for a table and column that appears on one side or the
+    ** other of the == operator in every subterm.  That table and column
+    ** will be recorded in iCursor and iColumn.  There might not be any
+    ** such table and column.  Set okToChngToIN if an appropriate table
+    ** and column is found but leave okToChngToIN false if not found.
+    */
+    for(j=0; j<2 && !okToChngToIN; j++){
+      pOrTerm = pOrWc->a;
+      for(i=pOrWc->nTerm-1; i>=0; i--, pOrTerm++){
+        assert( pOrTerm->eOperator==WO_EQ );
+        pOrTerm->wtFlags &= ~TERM_OR_OK;
+        if( pOrTerm->leftCursor==iCursor ){
+          /* This is the 2-bit case and we are on the second iteration and
+          ** current term is from the first iteration.  So skip this term. */
+          assert( j==1 );
+          continue;
+        }
+        if( (chngToIN & getMask(pMaskSet, pOrTerm->leftCursor))==0 ){
+          /* This term must be of the form t1.a==t2.b where t2 is in the
+          ** chngToIN set but t1 is not.  This term will be either preceeded
+          ** or follwed by an inverted copy (t2.b==t1.a).  Skip this term 
+          ** and use its inversion. */
+          testcase( pOrTerm->wtFlags & TERM_COPIED );
+          testcase( pOrTerm->wtFlags & TERM_VIRTUAL );
+          assert( pOrTerm->wtFlags & (TERM_COPIED|TERM_VIRTUAL) );
+          continue;
+        }
+        iColumn = pOrTerm->u.leftColumn;
+        iCursor = pOrTerm->leftCursor;
+        break;
+      }
+      if( i<0 ){
+        /* No candidate table+column was found.  This can only occur
+        ** on the second iteration */
+        assert( j==1 );
+        assert( (chngToIN&(chngToIN-1))==0 );
+        assert( chngToIN==getMask(pMaskSet, iCursor) );
+        break;
+      }
+      testcase( j==1 );
+
+      /* We have found a candidate table and column.  Check to see if that
+      ** table and column is common to every term in the OR clause */
+      okToChngToIN = 1;
+      for(; i>=0 && okToChngToIN; i--, pOrTerm++){
+        assert( pOrTerm->eOperator==WO_EQ );
+        if( pOrTerm->leftCursor!=iCursor ){
+          pOrTerm->wtFlags &= ~TERM_OR_OK;
+        }else if( pOrTerm->u.leftColumn!=iColumn ){
+          okToChngToIN = 0;
+        }else{
+          int affLeft, affRight;
+          /* If the right-hand side is also a column, then the affinities
+          ** of both right and left sides must be such that no type
+          ** conversions are required on the right.  (Ticket #2249)
+          */
+          affRight = sqlite3ExprAffinity(pOrTerm->pExpr->pRight);
+          affLeft = sqlite3ExprAffinity(pOrTerm->pExpr->pLeft);
+          if( affRight!=0 && affRight!=affLeft ){
+            okToChngToIN = 0;
+          }else{
+            pOrTerm->wtFlags |= TERM_OR_OK;
+          }
+        }
+      }
+    }
+
+    /* At this point, okToChngToIN is true if original pTerm satisfies
+    ** case 1.  In that case, construct a new virtual term that is 
+    ** pTerm converted into an IN operator.
+    **
+    ** EV: R-00211-15100
+    */
+    if( okToChngToIN ){
+      Expr *pDup;            /* A transient duplicate expression */
+      ExprList *pList = 0;   /* The RHS of the IN operator */
+      Expr *pLeft = 0;       /* The LHS of the IN operator */
+      Expr *pNew;            /* The complete IN operator */
+
+      for(i=pOrWc->nTerm-1, pOrTerm=pOrWc->a; i>=0; i--, pOrTerm++){
+        if( (pOrTerm->wtFlags & TERM_OR_OK)==0 ) continue;
+        assert( pOrTerm->eOperator==WO_EQ );
+        assert( pOrTerm->leftCursor==iCursor );
+        assert( pOrTerm->u.leftColumn==iColumn );
+        pDup = sqlite3ExprDup(db, pOrTerm->pExpr->pRight, 0);
+        pList = sqlite3ExprListAppend(pWC->pParse, pList, pDup);
+        pLeft = pOrTerm->pExpr->pLeft;
+      }
+      assert( pLeft!=0 );
+      pDup = sqlite3ExprDup(db, pLeft, 0);
+      pNew = sqlite3PExpr(pParse, TK_IN, pDup, 0, 0);
+      if( pNew ){
+        int idxNew;
+        transferJoinMarkings(pNew, pExpr);
+        assert( !ExprHasProperty(pNew, EP_xIsSelect) );
+        pNew->x.pList = pList;
+        idxNew = whereClauseInsert(pWC, pNew, TERM_VIRTUAL|TERM_DYNAMIC);
+        testcase( idxNew==0 );
+        exprAnalyze(pSrc, pWC, idxNew);
+        pTerm = &pWC->a[idxTerm];
+        pWC->a[idxNew].iParent = idxTerm;
+        pTerm->nChild = 1;
+      }else{
+        sqlite3ExprListDelete(db, pList);
+      }
+      pTerm->eOperator = WO_NOOP;  /* case 1 trumps case 2 */
+    }
+  }
+}
+#endif /* !SQLITE_OMIT_OR_OPTIMIZATION && !SQLITE_OMIT_SUBQUERY */
+
+
+/*
+** The input to this routine is an WhereTerm structure with only the
+** "pExpr" field filled in.  The job of this routine is to analyze the
+** subexpression and populate all the other fields of the WhereTerm
+** structure.
+**
+** If the expression is of the form "<expr> <op> X" it gets commuted
+** to the standard form of "X <op> <expr>".
+**
+** If the expression is of the form "X <op> Y" where both X and Y are
+** columns, then the original expression is unchanged and a new virtual
+** term of the form "Y <op> X" is added to the WHERE clause and
+** analyzed separately.  The original term is marked with TERM_COPIED
+** and the new term is marked with TERM_DYNAMIC (because it's pExpr
+** needs to be freed with the WhereClause) and TERM_VIRTUAL (because it
+** is a commuted copy of a prior term.)  The original term has nChild=1
+** and the copy has idxParent set to the index of the original term.
+*/
+static void exprAnalyze(
+  SrcList *pSrc,            /* the FROM clause */
+  WhereClause *pWC,         /* the WHERE clause */
+  int idxTerm               /* Index of the term to be analyzed */
+){
+  WhereTerm *pTerm;                /* The term to be analyzed */
+  WhereMaskSet *pMaskSet;          /* Set of table index masks */
+  Expr *pExpr;                     /* The expression to be analyzed */
+  Bitmask prereqLeft;              /* Prerequesites of the pExpr->pLeft */
+  Bitmask prereqAll;               /* Prerequesites of pExpr */
+  Bitmask extraRight = 0;          /* Extra dependencies on LEFT JOIN */
+  Expr *pStr1 = 0;                 /* RHS of LIKE/GLOB operator */
+  int isComplete = 0;              /* RHS of LIKE/GLOB ends with wildcard */
+  int noCase = 0;                  /* LIKE/GLOB distinguishes case */
+  int op;                          /* Top-level operator.  pExpr->op */
+  Parse *pParse = pWC->pParse;     /* Parsing context */
+  sqlite3 *db = pParse->db;        /* Database connection */
+
+  if( db->mallocFailed ){
+    return;
+  }
+  pTerm = &pWC->a[idxTerm];
+  pMaskSet = pWC->pMaskSet;
+  pExpr = pTerm->pExpr;
+  prereqLeft = exprTableUsage(pMaskSet, pExpr->pLeft);
+  op = pExpr->op;
+  if( op==TK_IN ){
+    assert( pExpr->pRight==0 );
+    if( ExprHasProperty(pExpr, EP_xIsSelect) ){
+      pTerm->prereqRight = exprSelectTableUsage(pMaskSet, pExpr->x.pSelect);
+    }else{
+      pTerm->prereqRight = exprListTableUsage(pMaskSet, pExpr->x.pList);
+    }
+  }else if( op==TK_ISNULL ){
+    pTerm->prereqRight = 0;
+  }else{
+    pTerm->prereqRight = exprTableUsage(pMaskSet, pExpr->pRight);
+  }
+  prereqAll = exprTableUsage(pMaskSet, pExpr);
+  if( ExprHasProperty(pExpr, EP_FromJoin) ){
+    Bitmask x = getMask(pMaskSet, pExpr->iRightJoinTable);
+    prereqAll |= x;
+    extraRight = x-1;  /* ON clause terms may not be used with an index
+                       ** on left table of a LEFT JOIN.  Ticket #3015 */
+  }
+  pTerm->prereqAll = prereqAll;
+  pTerm->leftCursor = -1;
+  pTerm->iParent = -1;
+  pTerm->eOperator = 0;
+  if( allowedOp(op) && (pTerm->prereqRight & prereqLeft)==0 ){
+    Expr *pLeft = pExpr->pLeft;
+    Expr *pRight = pExpr->pRight;
+    if( pLeft->op==TK_COLUMN ){
+      pTerm->leftCursor = pLeft->iTable;
+      pTerm->u.leftColumn = pLeft->iColumn;
+      pTerm->eOperator = operatorMask(op);
+    }
+    if( pRight && pRight->op==TK_COLUMN ){
+      WhereTerm *pNew;
+      Expr *pDup;
+      if( pTerm->leftCursor>=0 ){
+        int idxNew;
+        pDup = sqlite3ExprDup(db, pExpr, 0);
+        if( db->mallocFailed ){
+          sqlite3ExprDelete(db, pDup);
+          return;
+        }
+        idxNew = whereClauseInsert(pWC, pDup, TERM_VIRTUAL|TERM_DYNAMIC);
+        if( idxNew==0 ) return;
+        pNew = &pWC->a[idxNew];
+        pNew->iParent = idxTerm;
+        pTerm = &pWC->a[idxTerm];
+        pTerm->nChild = 1;
+        pTerm->wtFlags |= TERM_COPIED;
+      }else{
+        pDup = pExpr;
+        pNew = pTerm;
+      }
+      exprCommute(pParse, pDup);
+      pLeft = pDup->pLeft;
+      pNew->leftCursor = pLeft->iTable;
+      pNew->u.leftColumn = pLeft->iColumn;
+      testcase( (prereqLeft | extraRight) != prereqLeft );
+      pNew->prereqRight = prereqLeft | extraRight;
+      pNew->prereqAll = prereqAll;
+      pNew->eOperator = operatorMask(pDup->op);
+    }
+  }
+
+#ifndef SQLITE_OMIT_BETWEEN_OPTIMIZATION
+  /* If a term is the BETWEEN operator, create two new virtual terms
+  ** that define the range that the BETWEEN implements.  For example:
+  **
+  **      a BETWEEN b AND c
+  **
+  ** is converted into:
+  **
+  **      (a BETWEEN b AND c) AND (a>=b) AND (a<=c)
+  **
+  ** The two new terms are added onto the end of the WhereClause object.
+  ** The new terms are "dynamic" and are children of the original BETWEEN
+  ** term.  That means that if the BETWEEN term is coded, the children are
+  ** skipped.  Or, if the children are satisfied by an index, the original
+  ** BETWEEN term is skipped.
+  */
+  else if( pExpr->op==TK_BETWEEN && pWC->op==TK_AND ){
+    ExprList *pList = pExpr->x.pList;
+    int i;
+    static const u8 ops[] = {TK_GE, TK_LE};
+    assert( pList!=0 );
+    assert( pList->nExpr==2 );
+    for(i=0; i<2; i++){
+      Expr *pNewExpr;
+      int idxNew;
+      pNewExpr = sqlite3PExpr(pParse, ops[i], 
+                             sqlite3ExprDup(db, pExpr->pLeft, 0),
+                             sqlite3ExprDup(db, pList->a[i].pExpr, 0), 0);
+      idxNew = whereClauseInsert(pWC, pNewExpr, TERM_VIRTUAL|TERM_DYNAMIC);
+      testcase( idxNew==0 );
+      exprAnalyze(pSrc, pWC, idxNew);
+      pTerm = &pWC->a[idxTerm];
+      pWC->a[idxNew].iParent = idxTerm;
+    }
+    pTerm->nChild = 2;
+  }
+#endif /* SQLITE_OMIT_BETWEEN_OPTIMIZATION */
+
+#if !defined(SQLITE_OMIT_OR_OPTIMIZATION) && !defined(SQLITE_OMIT_SUBQUERY)
+  /* Analyze a term that is composed of two or more subterms connected by
+  ** an OR operator.
+  */
+  else if( pExpr->op==TK_OR ){
+    assert( pWC->op==TK_AND );
+    exprAnalyzeOrTerm(pSrc, pWC, idxTerm);
+    pTerm = &pWC->a[idxTerm];
+  }
+#endif /* SQLITE_OMIT_OR_OPTIMIZATION */
+
+#ifndef SQLITE_OMIT_LIKE_OPTIMIZATION
+  /* Add constraints to reduce the search space on a LIKE or GLOB
+  ** operator.
+  **
+  ** A like pattern of the form "x LIKE 'abc%'" is changed into constraints
+  **
+  **          x>='abc' AND x<'abd' AND x LIKE 'abc%'
+  **
+  ** The last character of the prefix "abc" is incremented to form the
+  ** termination condition "abd".
+  */
+  if( pWC->op==TK_AND 
+   && isLikeOrGlob(pParse, pExpr, &pStr1, &isComplete, &noCase)
+  ){
+    Expr *pLeft;       /* LHS of LIKE/GLOB operator */
+    Expr *pStr2;       /* Copy of pStr1 - RHS of LIKE/GLOB operator */
+    Expr *pNewExpr1;
+    Expr *pNewExpr2;
+    int idxNew1;
+    int idxNew2;
+    CollSeq *pColl;    /* Collating sequence to use */
+
+    pLeft = pExpr->x.pList->a[1].pExpr;
+    pStr2 = sqlite3ExprDup(db, pStr1, 0);
+    if( !db->mallocFailed ){
+      u8 c, *pC;       /* Last character before the first wildcard */
+      pC = (u8*)&pStr2->u.zToken[sqlite3Strlen30(pStr2->u.zToken)-1];
+      c = *pC;
+      if( noCase ){
+        /* The point is to increment the last character before the first
+        ** wildcard.  But if we increment '@', that will push it into the
+        ** alphabetic range where case conversions will mess up the 
+        ** inequality.  To avoid this, make sure to also run the full
+        ** LIKE on all candidate expressions by clearing the isComplete flag
+        */
+        if( c=='A'-1 ) isComplete = 0;   /* EV: R-64339-08207 */
+
+
+        c = sqlite3UpperToLower[c];
+      }
+      *pC = c + 1;
+    }
+    pColl = sqlite3FindCollSeq(db, SQLITE_UTF8, noCase ? "NOCASE" : "BINARY",0);
+    pNewExpr1 = sqlite3PExpr(pParse, TK_GE, 
+                     sqlite3ExprSetColl(sqlite3ExprDup(db,pLeft,0), pColl),
+                     pStr1, 0);
+    idxNew1 = whereClauseInsert(pWC, pNewExpr1, TERM_VIRTUAL|TERM_DYNAMIC);
+    testcase( idxNew1==0 );
+    exprAnalyze(pSrc, pWC, idxNew1);
+    pNewExpr2 = sqlite3PExpr(pParse, TK_LT,
+                     sqlite3ExprSetColl(sqlite3ExprDup(db,pLeft,0), pColl),
+                     pStr2, 0);
+    idxNew2 = whereClauseInsert(pWC, pNewExpr2, TERM_VIRTUAL|TERM_DYNAMIC);
+    testcase( idxNew2==0 );
+    exprAnalyze(pSrc, pWC, idxNew2);
+    pTerm = &pWC->a[idxTerm];
+    if( isComplete ){
+      pWC->a[idxNew1].iParent = idxTerm;
+      pWC->a[idxNew2].iParent = idxTerm;
+      pTerm->nChild = 2;
+    }
+  }
+#endif /* SQLITE_OMIT_LIKE_OPTIMIZATION */
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  /* Add a WO_MATCH auxiliary term to the constraint set if the
+  ** current expression is of the form:  column MATCH expr.
+  ** This information is used by the xBestIndex methods of
+  ** virtual tables.  The native query optimizer does not attempt
+  ** to do anything with MATCH functions.
+  */
+  if( isMatchOfColumn(pExpr) ){
+    int idxNew;
+    Expr *pRight, *pLeft;
+    WhereTerm *pNewTerm;
+    Bitmask prereqColumn, prereqExpr;
+
+    pRight = pExpr->x.pList->a[0].pExpr;
+    pLeft = pExpr->x.pList->a[1].pExpr;
+    prereqExpr = exprTableUsage(pMaskSet, pRight);
+    prereqColumn = exprTableUsage(pMaskSet, pLeft);
+    if( (prereqExpr & prereqColumn)==0 ){
+      Expr *pNewExpr;
+      pNewExpr = sqlite3PExpr(pParse, TK_MATCH, 
+                              0, sqlite3ExprDup(db, pRight, 0), 0);
+      idxNew = whereClauseInsert(pWC, pNewExpr, TERM_VIRTUAL|TERM_DYNAMIC);
+      testcase( idxNew==0 );
+      pNewTerm = &pWC->a[idxNew];
+      pNewTerm->prereqRight = prereqExpr;
+      pNewTerm->leftCursor = pLeft->iTable;
+      pNewTerm->u.leftColumn = pLeft->iColumn;
+      pNewTerm->eOperator = WO_MATCH;
+      pNewTerm->iParent = idxTerm;
+      pTerm = &pWC->a[idxTerm];
+      pTerm->nChild = 1;
+      pTerm->wtFlags |= TERM_COPIED;
+      pNewTerm->prereqAll = pTerm->prereqAll;
+    }
+  }
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+#ifdef SQLITE_ENABLE_STAT2
+  /* When sqlite_stat2 histogram data is available an operator of the
+  ** form "x IS NOT NULL" can sometimes be evaluated more efficiently
+  ** as "x>NULL" if x is not an INTEGER PRIMARY KEY.  So construct a
+  ** virtual term of that form.
+  **
+  ** Note that the virtual term must be tagged with TERM_VNULL.  This
+  ** TERM_VNULL tag will suppress the not-null check at the beginning
+  ** of the loop.  Without the TERM_VNULL flag, the not-null check at
+  ** the start of the loop will prevent any results from being returned.
+  */
+  if( pExpr->op==TK_NOTNULL
+   && pExpr->pLeft->op==TK_COLUMN
+   && pExpr->pLeft->iColumn>=0
+  ){
+    Expr *pNewExpr;
+    Expr *pLeft = pExpr->pLeft;
+    int idxNew;
+    WhereTerm *pNewTerm;
+
+    pNewExpr = sqlite3PExpr(pParse, TK_GT,
+                            sqlite3ExprDup(db, pLeft, 0),
+                            sqlite3PExpr(pParse, TK_NULL, 0, 0, 0), 0);
+
+    idxNew = whereClauseInsert(pWC, pNewExpr,
+                              TERM_VIRTUAL|TERM_DYNAMIC|TERM_VNULL);
+    if( idxNew ){
+      pNewTerm = &pWC->a[idxNew];
+      pNewTerm->prereqRight = 0;
+      pNewTerm->leftCursor = pLeft->iTable;
+      pNewTerm->u.leftColumn = pLeft->iColumn;
+      pNewTerm->eOperator = WO_GT;
+      pNewTerm->iParent = idxTerm;
+      pTerm = &pWC->a[idxTerm];
+      pTerm->nChild = 1;
+      pTerm->wtFlags |= TERM_COPIED;
+      pNewTerm->prereqAll = pTerm->prereqAll;
+    }
+  }
+#endif /* SQLITE_ENABLE_STAT2 */
+
+  /* Prevent ON clause terms of a LEFT JOIN from being used to drive
+  ** an index for tables to the left of the join.
+  */
+  pTerm->prereqRight |= extraRight;
+}
+
+/*
+** Return TRUE if any of the expressions in pList->a[iFirst...] contain
+** a reference to any table other than the iBase table.
+*/
+static int referencesOtherTables(
+  ExprList *pList,          /* Search expressions in ths list */
+  WhereMaskSet *pMaskSet,   /* Mapping from tables to bitmaps */
+  int iFirst,               /* Be searching with the iFirst-th expression */
+  int iBase                 /* Ignore references to this table */
+){
+  Bitmask allowed = ~getMask(pMaskSet, iBase);
+  while( iFirst<pList->nExpr ){
+    if( (exprTableUsage(pMaskSet, pList->a[iFirst++].pExpr)&allowed)!=0 ){
+      return 1;
+    }
+  }
+  return 0;
+}
+
+
+/*
+** This routine decides if pIdx can be used to satisfy the ORDER BY
+** clause.  If it can, it returns 1.  If pIdx cannot satisfy the
+** ORDER BY clause, this routine returns 0.
+**
+** pOrderBy is an ORDER BY clause from a SELECT statement.  pTab is the
+** left-most table in the FROM clause of that same SELECT statement and
+** the table has a cursor number of "base".  pIdx is an index on pTab.
+**
+** nEqCol is the number of columns of pIdx that are used as equality
+** constraints.  Any of these columns may be missing from the ORDER BY
+** clause and the match can still be a success.
+**
+** All terms of the ORDER BY that match against the index must be either
+** ASC or DESC.  (Terms of the ORDER BY clause past the end of a UNIQUE
+** index do not need to satisfy this constraint.)  The *pbRev value is
+** set to 1 if the ORDER BY clause is all DESC and it is set to 0 if
+** the ORDER BY clause is all ASC.
+*/
+static int isSortingIndex(
+  Parse *pParse,          /* Parsing context */
+  WhereMaskSet *pMaskSet, /* Mapping from table cursor numbers to bitmaps */
+  Index *pIdx,            /* The index we are testing */
+  int base,               /* Cursor number for the table to be sorted */
+  ExprList *pOrderBy,     /* The ORDER BY clause */
+  int nEqCol,             /* Number of index columns with == constraints */
+  int wsFlags,            /* Index usages flags */
+  int *pbRev              /* Set to 1 if ORDER BY is DESC */
+){
+  int i, j;                       /* Loop counters */
+  int sortOrder = 0;              /* XOR of index and ORDER BY sort direction */
+  int nTerm;                      /* Number of ORDER BY terms */
+  struct ExprList_item *pTerm;    /* A term of the ORDER BY clause */
+  sqlite3 *db = pParse->db;
+
+  assert( pOrderBy!=0 );
+  nTerm = pOrderBy->nExpr;
+  assert( nTerm>0 );
+
+  /* Argument pIdx must either point to a 'real' named index structure, 
+  ** or an index structure allocated on the stack by bestBtreeIndex() to
+  ** represent the rowid index that is part of every table.  */
+  assert( pIdx->zName || (pIdx->nColumn==1 && pIdx->aiColumn[0]==-1) );
+
+  /* Match terms of the ORDER BY clause against columns of
+  ** the index.
+  **
+  ** Note that indices have pIdx->nColumn regular columns plus
+  ** one additional column containing the rowid.  The rowid column
+  ** of the index is also allowed to match against the ORDER BY
+  ** clause.
+  */
+  for(i=j=0, pTerm=pOrderBy->a; j<nTerm && i<=pIdx->nColumn; i++){
+    Expr *pExpr;       /* The expression of the ORDER BY pTerm */
+    CollSeq *pColl;    /* The collating sequence of pExpr */
+    int termSortOrder; /* Sort order for this term */
+    int iColumn;       /* The i-th column of the index.  -1 for rowid */
+    int iSortOrder;    /* 1 for DESC, 0 for ASC on the i-th index term */
+    const char *zColl; /* Name of the collating sequence for i-th index term */
+
+    pExpr = pTerm->pExpr;
+    if( pExpr->op!=TK_COLUMN || pExpr->iTable!=base ){
+      /* Can not use an index sort on anything that is not a column in the
+      ** left-most table of the FROM clause */
+      break;
+    }
+    pColl = sqlite3ExprCollSeq(pParse, pExpr);
+    if( !pColl ){
+      pColl = db->pDfltColl;
+    }
+    if( pIdx->zName && i<pIdx->nColumn ){
+      iColumn = pIdx->aiColumn[i];
+      if( iColumn==pIdx->pTable->iPKey ){
+        iColumn = -1;
+      }
+      iSortOrder = pIdx->aSortOrder[i];
+      zColl = pIdx->azColl[i];
+    }else{
+      iColumn = -1;
+      iSortOrder = 0;
+      zColl = pColl->zName;
+    }
+    if( pExpr->iColumn!=iColumn || sqlite3StrICmp(pColl->zName, zColl) ){
+      /* Term j of the ORDER BY clause does not match column i of the index */
+      if( i<nEqCol ){
+        /* If an index column that is constrained by == fails to match an
+        ** ORDER BY term, that is OK.  Just ignore that column of the index
+        */
+        continue;
+      }else if( i==pIdx->nColumn ){
+        /* Index column i is the rowid.  All other terms match. */
+        break;
+      }else{
+        /* If an index column fails to match and is not constrained by ==
+        ** then the index cannot satisfy the ORDER BY constraint.
+        */
+        return 0;
+      }
+    }
+    assert( pIdx->aSortOrder!=0 || iColumn==-1 );
+    assert( pTerm->sortOrder==0 || pTerm->sortOrder==1 );
+    assert( iSortOrder==0 || iSortOrder==1 );
+    termSortOrder = iSortOrder ^ pTerm->sortOrder;
+    if( i>nEqCol ){
+      if( termSortOrder!=sortOrder ){
+        /* Indices can only be used if all ORDER BY terms past the
+        ** equality constraints are all either DESC or ASC. */
+        return 0;
+      }
+    }else{
+      sortOrder = termSortOrder;
+    }
+    j++;
+    pTerm++;
+    if( iColumn<0 && !referencesOtherTables(pOrderBy, pMaskSet, j, base) ){
+      /* If the indexed column is the primary key and everything matches
+      ** so far and none of the ORDER BY terms to the right reference other
+      ** tables in the join, then we are assured that the index can be used 
+      ** to sort because the primary key is unique and so none of the other
+      ** columns will make any difference
+      */
+      j = nTerm;
+    }
+  }
+
+  *pbRev = sortOrder!=0;
+  if( j>=nTerm ){
+    /* All terms of the ORDER BY clause are covered by this index so
+    ** this index can be used for sorting. */
+    return 1;
+  }
+  if( pIdx->onError!=OE_None && i==pIdx->nColumn
+      && (wsFlags & WHERE_COLUMN_NULL)==0
+      && !referencesOtherTables(pOrderBy, pMaskSet, j, base) ){
+    /* All terms of this index match some prefix of the ORDER BY clause
+    ** and the index is UNIQUE and no terms on the tail of the ORDER BY
+    ** clause reference other tables in a join.  If this is all true then
+    ** the order by clause is superfluous.  Not that if the matching
+    ** condition is IS NULL then the result is not necessarily unique
+    ** even on a UNIQUE index, so disallow those cases. */
+    return 1;
+  }
+  return 0;
+}
+
+/*
+** Prepare a crude estimate of the logarithm of the input value.
+** The results need not be exact.  This is only used for estimating
+** the total cost of performing operations with O(logN) or O(NlogN)
+** complexity.  Because N is just a guess, it is no great tragedy if
+** logN is a little off.
+*/
+static double estLog(double N){
+  double logN = 1;
+  double x = 10;
+  while( N>x ){
+    logN += 1;
+    x *= 10;
+  }
+  return logN;
+}
+
+/*
+** Two routines for printing the content of an sqlite3_index_info
+** structure.  Used for testing and debugging only.  If neither
+** SQLITE_TEST or SQLITE_DEBUG are defined, then these routines
+** are no-ops.
+*/
+#if !defined(SQLITE_OMIT_VIRTUALTABLE) && defined(SQLITE_DEBUG)
+static void TRACE_IDX_INPUTS(sqlite3_index_info *p){
+  int i;
+  if( !sqlite3WhereTrace ) return;
+  for(i=0; i<p->nConstraint; i++){
+    sqlite3DebugPrintf("  constraint[%d]: col=%d termid=%d op=%d usabled=%d\n",
+       i,
+       p->aConstraint[i].iColumn,
+       p->aConstraint[i].iTermOffset,
+       p->aConstraint[i].op,
+       p->aConstraint[i].usable);
+  }
+  for(i=0; i<p->nOrderBy; i++){
+    sqlite3DebugPrintf("  orderby[%d]: col=%d desc=%d\n",
+       i,
+       p->aOrderBy[i].iColumn,
+       p->aOrderBy[i].desc);
+  }
+}
+static void TRACE_IDX_OUTPUTS(sqlite3_index_info *p){
+  int i;
+  if( !sqlite3WhereTrace ) return;
+  for(i=0; i<p->nConstraint; i++){
+    sqlite3DebugPrintf("  usage[%d]: argvIdx=%d omit=%d\n",
+       i,
+       p->aConstraintUsage[i].argvIndex,
+       p->aConstraintUsage[i].omit);
+  }
+  sqlite3DebugPrintf("  idxNum=%d\n", p->idxNum);
+  sqlite3DebugPrintf("  idxStr=%s\n", p->idxStr);
+  sqlite3DebugPrintf("  orderByConsumed=%d\n", p->orderByConsumed);
+  sqlite3DebugPrintf("  estimatedCost=%g\n", p->estimatedCost);
+}
+#else
+#define TRACE_IDX_INPUTS(A)
+#define TRACE_IDX_OUTPUTS(A)
+#endif
+
+/* 
+** Required because bestIndex() is called by bestOrClauseIndex() 
+*/
+static void bestIndex(
+    Parse*, WhereClause*, struct SrcList_item*,
+    Bitmask, Bitmask, ExprList*, WhereCost*);
+
+/*
+** This routine attempts to find an scanning strategy that can be used 
+** to optimize an 'OR' expression that is part of a WHERE clause. 
+**
+** The table associated with FROM clause term pSrc may be either a
+** regular B-Tree table or a virtual table.
+*/
+static void bestOrClauseIndex(
+  Parse *pParse,              /* The parsing context */
+  WhereClause *pWC,           /* The WHERE clause */
+  struct SrcList_item *pSrc,  /* The FROM clause term to search */
+  Bitmask notReady,           /* Mask of cursors not available for indexing */
+  Bitmask notValid,           /* Cursors not available for any purpose */
+  ExprList *pOrderBy,         /* The ORDER BY clause */
+  WhereCost *pCost            /* Lowest cost query plan */
+){
+#ifndef SQLITE_OMIT_OR_OPTIMIZATION
+  const int iCur = pSrc->iCursor;   /* The cursor of the table to be accessed */
+  const Bitmask maskSrc = getMask(pWC->pMaskSet, iCur);  /* Bitmask for pSrc */
+  WhereTerm * const pWCEnd = &pWC->a[pWC->nTerm];        /* End of pWC->a[] */
+  WhereTerm *pTerm;                 /* A single term of the WHERE clause */
+
+  /* No OR-clause optimization allowed if the INDEXED BY or NOT INDEXED clauses
+  ** are used */
+  if( pSrc->notIndexed || pSrc->pIndex!=0 ){
+    return;
+  }
+
+  /* Search the WHERE clause terms for a usable WO_OR term. */
+  for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
+    if( pTerm->eOperator==WO_OR 
+     && ((pTerm->prereqAll & ~maskSrc) & notReady)==0
+     && (pTerm->u.pOrInfo->indexable & maskSrc)!=0 
+    ){
+      WhereClause * const pOrWC = &pTerm->u.pOrInfo->wc;
+      WhereTerm * const pOrWCEnd = &pOrWC->a[pOrWC->nTerm];
+      WhereTerm *pOrTerm;
+      int flags = WHERE_MULTI_OR;
+      double rTotal = 0;
+      double nRow = 0;
+      Bitmask used = 0;
+
+      for(pOrTerm=pOrWC->a; pOrTerm<pOrWCEnd; pOrTerm++){
+        WhereCost sTermCost;
+        WHERETRACE(("... Multi-index OR testing for term %d of %d....\n", 
+          (pOrTerm - pOrWC->a), (pTerm - pWC->a)
+        ));
+        if( pOrTerm->eOperator==WO_AND ){
+          WhereClause *pAndWC = &pOrTerm->u.pAndInfo->wc;
+          bestIndex(pParse, pAndWC, pSrc, notReady, notValid, 0, &sTermCost);
+        }else if( pOrTerm->leftCursor==iCur ){
+          WhereClause tempWC;
+          tempWC.pParse = pWC->pParse;
+          tempWC.pMaskSet = pWC->pMaskSet;
+          tempWC.op = TK_AND;
+          tempWC.a = pOrTerm;
+          tempWC.nTerm = 1;
+          bestIndex(pParse, &tempWC, pSrc, notReady, notValid, 0, &sTermCost);
+        }else{
+          continue;
+        }
+        rTotal += sTermCost.rCost;
+        nRow += sTermCost.plan.nRow;
+        used |= sTermCost.used;
+        if( rTotal>=pCost->rCost ) break;
+      }
+
+      /* If there is an ORDER BY clause, increase the scan cost to account 
+      ** for the cost of the sort. */
+      if( pOrderBy!=0 ){
+        WHERETRACE(("... sorting increases OR cost %.9g to %.9g\n",
+                    rTotal, rTotal+nRow*estLog(nRow)));
+        rTotal += nRow*estLog(nRow);
+      }
+
+      /* If the cost of scanning using this OR term for optimization is
+      ** less than the current cost stored in pCost, replace the contents
+      ** of pCost. */
+      WHERETRACE(("... multi-index OR cost=%.9g nrow=%.9g\n", rTotal, nRow));
+      if( rTotal<pCost->rCost ){
+        pCost->rCost = rTotal;
+        pCost->used = used;
+        pCost->plan.nRow = nRow;
+        pCost->plan.wsFlags = flags;
+        pCost->plan.u.pTerm = pTerm;
+      }
+    }
+  }
+#endif /* SQLITE_OMIT_OR_OPTIMIZATION */
+}
+
+#ifndef SQLITE_OMIT_AUTOMATIC_INDEX
+/*
+** Return TRUE if the WHERE clause term pTerm is of a form where it
+** could be used with an index to access pSrc, assuming an appropriate
+** index existed.
+*/
+static int termCanDriveIndex(
+  WhereTerm *pTerm,              /* WHERE clause term to check */
+  struct SrcList_item *pSrc,     /* Table we are trying to access */
+  Bitmask notReady               /* Tables in outer loops of the join */
+){
+  char aff;
+  if( pTerm->leftCursor!=pSrc->iCursor ) return 0;
+  if( pTerm->eOperator!=WO_EQ ) return 0;
+  if( (pTerm->prereqRight & notReady)!=0 ) return 0;
+  aff = pSrc->pTab->aCol[pTerm->u.leftColumn].affinity;
+  if( !sqlite3IndexAffinityOk(pTerm->pExpr, aff) ) return 0;
+  return 1;
+}
+#endif
+
+#ifndef SQLITE_OMIT_AUTOMATIC_INDEX
+/*
+** If the query plan for pSrc specified in pCost is a full table scan
+** and indexing is allows (if there is no NOT INDEXED clause) and it
+** possible to construct a transient index that would perform better
+** than a full table scan even when the cost of constructing the index
+** is taken into account, then alter the query plan to use the
+** transient index.
+*/
+static void bestAutomaticIndex(
+  Parse *pParse,              /* The parsing context */
+  WhereClause *pWC,           /* The WHERE clause */
+  struct SrcList_item *pSrc,  /* The FROM clause term to search */
+  Bitmask notReady,           /* Mask of cursors that are not available */
+  WhereCost *pCost            /* Lowest cost query plan */
+){
+  double nTableRow;           /* Rows in the input table */
+  double logN;                /* log(nTableRow) */
+  double costTempIdx;         /* per-query cost of the transient index */
+  WhereTerm *pTerm;           /* A single term of the WHERE clause */
+  WhereTerm *pWCEnd;          /* End of pWC->a[] */
+  Table *pTable;              /* Table tht might be indexed */
+
+  if( (pParse->db->flags & SQLITE_AutoIndex)==0 ){
+    /* Automatic indices are disabled at run-time */
+    return;
+  }
+  if( (pCost->plan.wsFlags & WHERE_NOT_FULLSCAN)!=0 ){
+    /* We already have some kind of index in use for this query. */
+    return;
+  }
+  if( pSrc->notIndexed ){
+    /* The NOT INDEXED clause appears in the SQL. */
+    return;
+  }
+
+  assert( pParse->nQueryLoop >= (double)1 );
+  pTable = pSrc->pTab;
+  nTableRow = pTable->nRowEst;
+  logN = estLog(nTableRow);
+  costTempIdx = 2*logN*(nTableRow/pParse->nQueryLoop + 1);
+  if( costTempIdx>=pCost->rCost ){
+    /* The cost of creating the transient table would be greater than
+    ** doing the full table scan */
+    return;
+  }
+
+  /* Search for any equality comparison term */
+  pWCEnd = &pWC->a[pWC->nTerm];
+  for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
+    if( termCanDriveIndex(pTerm, pSrc, notReady) ){
+      WHERETRACE(("auto-index reduces cost from %.1f to %.1f\n",
+                    pCost->rCost, costTempIdx));
+      pCost->rCost = costTempIdx;
+      pCost->plan.nRow = logN + 1;
+      pCost->plan.wsFlags = WHERE_TEMP_INDEX;
+      pCost->used = pTerm->prereqRight;
+      break;
+    }
+  }
+}
+#else
+# define bestAutomaticIndex(A,B,C,D,E)  /* no-op */
+#endif /* SQLITE_OMIT_AUTOMATIC_INDEX */
+
+
+#ifndef SQLITE_OMIT_AUTOMATIC_INDEX
+/*
+** Generate code to construct the Index object for an automatic index
+** and to set up the WhereLevel object pLevel so that the code generator
+** makes use of the automatic index.
+*/
+static void constructAutomaticIndex(
+  Parse *pParse,              /* The parsing context */
+  WhereClause *pWC,           /* The WHERE clause */
+  struct SrcList_item *pSrc,  /* The FROM clause term to get the next index */
+  Bitmask notReady,           /* Mask of cursors that are not available */
+  WhereLevel *pLevel          /* Write new index here */
+){
+  int nColumn;                /* Number of columns in the constructed index */
+  WhereTerm *pTerm;           /* A single term of the WHERE clause */
+  WhereTerm *pWCEnd;          /* End of pWC->a[] */
+  int nByte;                  /* Byte of memory needed for pIdx */
+  Index *pIdx;                /* Object describing the transient index */
+  Vdbe *v;                    /* Prepared statement under construction */
+  int regIsInit;              /* Register set by initialization */
+  int addrInit;               /* Address of the initialization bypass jump */
+  Table *pTable;              /* The table being indexed */
+  KeyInfo *pKeyinfo;          /* Key information for the index */   
+  int addrTop;                /* Top of the index fill loop */
+  int regRecord;              /* Register holding an index record */
+  int n;                      /* Column counter */
+  int i;                      /* Loop counter */
+  int mxBitCol;               /* Maximum column in pSrc->colUsed */
+  CollSeq *pColl;             /* Collating sequence to on a column */
+  Bitmask idxCols;            /* Bitmap of columns used for indexing */
+  Bitmask extraCols;          /* Bitmap of additional columns */
+
+  /* Generate code to skip over the creation and initialization of the
+  ** transient index on 2nd and subsequent iterations of the loop. */
+  v = pParse->pVdbe;
+  assert( v!=0 );
+  regIsInit = ++pParse->nMem;
+  addrInit = sqlite3VdbeAddOp1(v, OP_If, regIsInit);
+  sqlite3VdbeAddOp2(v, OP_Integer, 1, regIsInit);
+
+  /* Count the number of columns that will be added to the index
+  ** and used to match WHERE clause constraints */
+  nColumn = 0;
+  pTable = pSrc->pTab;
+  pWCEnd = &pWC->a[pWC->nTerm];
+  idxCols = 0;
+  for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
+    if( termCanDriveIndex(pTerm, pSrc, notReady) ){
+      int iCol = pTerm->u.leftColumn;
+      Bitmask cMask = iCol>=BMS ? ((Bitmask)1)<<(BMS-1) : ((Bitmask)1)<<iCol;
+      testcase( iCol==BMS );
+      testcase( iCol==BMS-1 );
+      if( (idxCols & cMask)==0 ){
+        nColumn++;
+        idxCols |= cMask;
+      }
+    }
+  }
+  assert( nColumn>0 );
+  pLevel->plan.nEq = nColumn;
+
+  /* Count the number of additional columns needed to create a
+  ** covering index.  A "covering index" is an index that contains all
+  ** columns that are needed by the query.  With a covering index, the
+  ** original table never needs to be accessed.  Automatic indices must
+  ** be a covering index because the index will not be updated if the
+  ** original table changes and the index and table cannot both be used
+  ** if they go out of sync.
+  */
+  extraCols = pSrc->colUsed & (~idxCols | (((Bitmask)1)<<(BMS-1)));
+  mxBitCol = (pTable->nCol >= BMS-1) ? BMS-1 : pTable->nCol;
+  testcase( pTable->nCol==BMS-1 );
+  testcase( pTable->nCol==BMS-2 );
+  for(i=0; i<mxBitCol; i++){
+    if( extraCols & (((Bitmask)1)<<i) ) nColumn++;
+  }
+  if( pSrc->colUsed & (((Bitmask)1)<<(BMS-1)) ){
+    nColumn += pTable->nCol - BMS + 1;
+  }
+  pLevel->plan.wsFlags |= WHERE_COLUMN_EQ | WHERE_IDX_ONLY | WO_EQ;
+
+  /* Construct the Index object to describe this index */
+  nByte = sizeof(Index);
+  nByte += nColumn*sizeof(int);     /* Index.aiColumn */
+  nByte += nColumn*sizeof(char*);   /* Index.azColl */
+  nByte += nColumn;                 /* Index.aSortOrder */
+  pIdx = sqlite3DbMallocZero(pParse->db, nByte);
+  if( pIdx==0 ) return;
+  pLevel->plan.u.pIdx = pIdx;
+  pIdx->azColl = (char**)&pIdx[1];
+  pIdx->aiColumn = (int*)&pIdx->azColl[nColumn];
+  pIdx->aSortOrder = (u8*)&pIdx->aiColumn[nColumn];
+  pIdx->zName = "auto-index";
+  pIdx->nColumn = nColumn;
+  pIdx->pTable = pTable;
+  n = 0;
+  idxCols = 0;
+  for(pTerm=pWC->a; pTerm<pWCEnd; pTerm++){
+    if( termCanDriveIndex(pTerm, pSrc, notReady) ){
+      int iCol = pTerm->u.leftColumn;
+      Bitmask cMask = iCol>=BMS ? ((Bitmask)1)<<(BMS-1) : ((Bitmask)1)<<iCol;
+      if( (idxCols & cMask)==0 ){
+        Expr *pX = pTerm->pExpr;
+        idxCols |= cMask;
+        pIdx->aiColumn[n] = pTerm->u.leftColumn;
+        pColl = sqlite3BinaryCompareCollSeq(pParse, pX->pLeft, pX->pRight);
+        pIdx->azColl[n] = ALWAYS(pColl) ? pColl->zName : "BINARY";
+        n++;
+      }
+    }
+  }
+  assert( (u32)n==pLevel->plan.nEq );
+
+  /* Add additional columns needed to make the automatic index into
+  ** a covering index */
+  for(i=0; i<mxBitCol; i++){
+    if( extraCols & (((Bitmask)1)<<i) ){
+      pIdx->aiColumn[n] = i;
+      pIdx->azColl[n] = "BINARY";
+      n++;
+    }
+  }
+  if( pSrc->colUsed & (((Bitmask)1)<<(BMS-1)) ){
+    for(i=BMS-1; i<pTable->nCol; i++){
+      pIdx->aiColumn[n] = i;
+      pIdx->azColl[n] = "BINARY";
+      n++;
+    }
+  }
+  assert( n==nColumn );
+
+  /* Create the automatic index */
+  pKeyinfo = sqlite3IndexKeyinfo(pParse, pIdx);
+  assert( pLevel->iIdxCur>=0 );
+  sqlite3VdbeAddOp4(v, OP_OpenAutoindex, pLevel->iIdxCur, nColumn+1, 0,
+                    (char*)pKeyinfo, P4_KEYINFO_HANDOFF);
+  VdbeComment((v, "for %s", pTable->zName));
+
+  /* Fill the automatic index with content */
+  addrTop = sqlite3VdbeAddOp1(v, OP_Rewind, pLevel->iTabCur);
+  regRecord = sqlite3GetTempReg(pParse);
+  sqlite3GenerateIndexKey(pParse, pIdx, pLevel->iTabCur, regRecord, 1);
+  sqlite3VdbeAddOp2(v, OP_IdxInsert, pLevel->iIdxCur, regRecord);
+  sqlite3VdbeChangeP5(v, OPFLAG_USESEEKRESULT);
+  sqlite3VdbeAddOp2(v, OP_Next, pLevel->iTabCur, addrTop+1);
+  sqlite3VdbeChangeP5(v, SQLITE_STMTSTATUS_AUTOINDEX);
+  sqlite3VdbeJumpHere(v, addrTop);
+  sqlite3ReleaseTempReg(pParse, regRecord);
+  
+  /* Jump here when skipping the initialization */
+  sqlite3VdbeJumpHere(v, addrInit);
+}
+#endif /* SQLITE_OMIT_AUTOMATIC_INDEX */
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+/*
+** Allocate and populate an sqlite3_index_info structure. It is the 
+** responsibility of the caller to eventually release the structure
+** by passing the pointer returned by this function to sqlite3_free().
+*/
+static sqlite3_index_info *allocateIndexInfo(
+  Parse *pParse, 
+  WhereClause *pWC,
+  struct SrcList_item *pSrc,
+  ExprList *pOrderBy
+){
+  int i, j;
+  int nTerm;
+  struct sqlite3_index_constraint *pIdxCons;
+  struct sqlite3_index_orderby *pIdxOrderBy;
+  struct sqlite3_index_constraint_usage *pUsage;
+  WhereTerm *pTerm;
+  int nOrderBy;
+  sqlite3_index_info *pIdxInfo;
+
+  WHERETRACE(("Recomputing index info for %s...\n", pSrc->pTab->zName));
+
+  /* Count the number of possible WHERE clause constraints referring
+  ** to this virtual table */
+  for(i=nTerm=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
+    if( pTerm->leftCursor != pSrc->iCursor ) continue;
+    assert( (pTerm->eOperator&(pTerm->eOperator-1))==0 );
+    testcase( pTerm->eOperator==WO_IN );
+    testcase( pTerm->eOperator==WO_ISNULL );
+    if( pTerm->eOperator & (WO_IN|WO_ISNULL) ) continue;
+    nTerm++;
+  }
+
+  /* If the ORDER BY clause contains only columns in the current 
+  ** virtual table then allocate space for the aOrderBy part of
+  ** the sqlite3_index_info structure.
+  */
+  nOrderBy = 0;
+  if( pOrderBy ){
+    for(i=0; i<pOrderBy->nExpr; i++){
+      Expr *pExpr = pOrderBy->a[i].pExpr;
+      if( pExpr->op!=TK_COLUMN || pExpr->iTable!=pSrc->iCursor ) break;
+    }
+    if( i==pOrderBy->nExpr ){
+      nOrderBy = pOrderBy->nExpr;
+    }
+  }
+
+  /* Allocate the sqlite3_index_info structure
+  */
+  pIdxInfo = sqlite3DbMallocZero(pParse->db, sizeof(*pIdxInfo)
+                           + (sizeof(*pIdxCons) + sizeof(*pUsage))*nTerm
+                           + sizeof(*pIdxOrderBy)*nOrderBy );
+  if( pIdxInfo==0 ){
+    sqlite3ErrorMsg(pParse, "out of memory");
+    /* (double)0 In case of SQLITE_OMIT_FLOATING_POINT... */
+    return 0;
+  }
+
+  /* Initialize the structure.  The sqlite3_index_info structure contains
+  ** many fields that are declared "const" to prevent xBestIndex from
+  ** changing them.  We have to do some funky casting in order to
+  ** initialize those fields.
+  */
+  pIdxCons = (struct sqlite3_index_constraint*)&pIdxInfo[1];
+  pIdxOrderBy = (struct sqlite3_index_orderby*)&pIdxCons[nTerm];
+  pUsage = (struct sqlite3_index_constraint_usage*)&pIdxOrderBy[nOrderBy];
+  *(int*)&pIdxInfo->nConstraint = nTerm;
+  *(int*)&pIdxInfo->nOrderBy = nOrderBy;
+  *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint = pIdxCons;
+  *(struct sqlite3_index_orderby**)&pIdxInfo->aOrderBy = pIdxOrderBy;
+  *(struct sqlite3_index_constraint_usage**)&pIdxInfo->aConstraintUsage =
+                                                                   pUsage;
+
+  for(i=j=0, pTerm=pWC->a; i<pWC->nTerm; i++, pTerm++){
+    if( pTerm->leftCursor != pSrc->iCursor ) continue;
+    assert( (pTerm->eOperator&(pTerm->eOperator-1))==0 );
+    testcase( pTerm->eOperator==WO_IN );
+    testcase( pTerm->eOperator==WO_ISNULL );
+    if( pTerm->eOperator & (WO_IN|WO_ISNULL) ) continue;
+    pIdxCons[j].iColumn = pTerm->u.leftColumn;
+    pIdxCons[j].iTermOffset = i;
+    pIdxCons[j].op = (u8)pTerm->eOperator;
+    /* The direct assignment in the previous line is possible only because
+    ** the WO_ and SQLITE_INDEX_CONSTRAINT_ codes are identical.  The
+    ** following asserts verify this fact. */
+    assert( WO_EQ==SQLITE_INDEX_CONSTRAINT_EQ );
+    assert( WO_LT==SQLITE_INDEX_CONSTRAINT_LT );
+    assert( WO_LE==SQLITE_INDEX_CONSTRAINT_LE );
+    assert( WO_GT==SQLITE_INDEX_CONSTRAINT_GT );
+    assert( WO_GE==SQLITE_INDEX_CONSTRAINT_GE );
+    assert( WO_MATCH==SQLITE_INDEX_CONSTRAINT_MATCH );
+    assert( pTerm->eOperator & (WO_EQ|WO_LT|WO_LE|WO_GT|WO_GE|WO_MATCH) );
+    j++;
+  }
+  for(i=0; i<nOrderBy; i++){
+    Expr *pExpr = pOrderBy->a[i].pExpr;
+    pIdxOrderBy[i].iColumn = pExpr->iColumn;
+    pIdxOrderBy[i].desc = pOrderBy->a[i].sortOrder;
+  }
+
+  return pIdxInfo;
+}
+
+/*
+** The table object reference passed as the second argument to this function
+** must represent a virtual table. This function invokes the xBestIndex()
+** method of the virtual table with the sqlite3_index_info pointer passed
+** as the argument.
+**
+** If an error occurs, pParse is populated with an error message and a
+** non-zero value is returned. Otherwise, 0 is returned and the output
+** part of the sqlite3_index_info structure is left populated.
+**
+** Whether or not an error is returned, it is the responsibility of the
+** caller to eventually free p->idxStr if p->needToFreeIdxStr indicates
+** that this is required.
+*/
+static int vtabBestIndex(Parse *pParse, Table *pTab, sqlite3_index_info *p){
+  sqlite3_vtab *pVtab = sqlite3GetVTable(pParse->db, pTab)->pVtab;
+  int i;
+  int rc;
+
+  WHERETRACE(("xBestIndex for %s\n", pTab->zName));
+  TRACE_IDX_INPUTS(p);
+  rc = pVtab->pModule->xBestIndex(pVtab, p);
+  TRACE_IDX_OUTPUTS(p);
+
+  if( rc!=SQLITE_OK ){
+    if( rc==SQLITE_NOMEM ){
+      pParse->db->mallocFailed = 1;
+    }else if( !pVtab->zErrMsg ){
+      sqlite3ErrorMsg(pParse, "%s", sqlite3ErrStr(rc));
+    }else{
+      sqlite3ErrorMsg(pParse, "%s", pVtab->zErrMsg);
+    }
+  }
+  sqlite3_free(pVtab->zErrMsg);
+  pVtab->zErrMsg = 0;
+
+  for(i=0; i<p->nConstraint; i++){
+    if( !p->aConstraint[i].usable && p->aConstraintUsage[i].argvIndex>0 ){
+      sqlite3ErrorMsg(pParse, 
+          "table %s: xBestIndex returned an invalid plan", pTab->zName);
+    }
+  }
+
+  return pParse->nErr;
+}
+
+
+/*
+** Compute the best index for a virtual table.
+**
+** The best index is computed by the xBestIndex method of the virtual
+** table module.  This routine is really just a wrapper that sets up
+** the sqlite3_index_info structure that is used to communicate with
+** xBestIndex.
+**
+** In a join, this routine might be called multiple times for the
+** same virtual table.  The sqlite3_index_info structure is created
+** and initialized on the first invocation and reused on all subsequent
+** invocations.  The sqlite3_index_info structure is also used when
+** code is generated to access the virtual table.  The whereInfoDelete() 
+** routine takes care of freeing the sqlite3_index_info structure after
+** everybody has finished with it.
+*/
+static void bestVirtualIndex(
+  Parse *pParse,                  /* The parsing context */
+  WhereClause *pWC,               /* The WHERE clause */
+  struct SrcList_item *pSrc,      /* The FROM clause term to search */
+  Bitmask notReady,               /* Mask of cursors not available for index */
+  Bitmask notValid,               /* Cursors not valid for any purpose */
+  ExprList *pOrderBy,             /* The order by clause */
+  WhereCost *pCost,               /* Lowest cost query plan */
+  sqlite3_index_info **ppIdxInfo  /* Index information passed to xBestIndex */
+){
+  Table *pTab = pSrc->pTab;
+  sqlite3_index_info *pIdxInfo;
+  struct sqlite3_index_constraint *pIdxCons;
+  struct sqlite3_index_constraint_usage *pUsage;
+  WhereTerm *pTerm;
+  int i, j;
+  int nOrderBy;
+  double rCost;
+
+  /* Make sure wsFlags is initialized to some sane value. Otherwise, if the 
+  ** malloc in allocateIndexInfo() fails and this function returns leaving
+  ** wsFlags in an uninitialized state, the caller may behave unpredictably.
+  */
+  memset(pCost, 0, sizeof(*pCost));
+  pCost->plan.wsFlags = WHERE_VIRTUALTABLE;
+
+  /* If the sqlite3_index_info structure has not been previously
+  ** allocated and initialized, then allocate and initialize it now.
+  */
+  pIdxInfo = *ppIdxInfo;
+  if( pIdxInfo==0 ){
+    *ppIdxInfo = pIdxInfo = allocateIndexInfo(pParse, pWC, pSrc, pOrderBy);
+  }
+  if( pIdxInfo==0 ){
+    return;
+  }
+
+  /* At this point, the sqlite3_index_info structure that pIdxInfo points
+  ** to will have been initialized, either during the current invocation or
+  ** during some prior invocation.  Now we just have to customize the
+  ** details of pIdxInfo for the current invocation and pass it to
+  ** xBestIndex.
+  */
+
+  /* The module name must be defined. Also, by this point there must
+  ** be a pointer to an sqlite3_vtab structure. Otherwise
+  ** sqlite3ViewGetColumnNames() would have picked up the error. 
+  */
+  assert( pTab->azModuleArg && pTab->azModuleArg[0] );
+  assert( sqlite3GetVTable(pParse->db, pTab) );
+
+  /* Set the aConstraint[].usable fields and initialize all 
+  ** output variables to zero.
+  **
+  ** aConstraint[].usable is true for constraints where the right-hand
+  ** side contains only references to tables to the left of the current
+  ** table.  In other words, if the constraint is of the form:
+  **
+  **           column = expr
+  **
+  ** and we are evaluating a join, then the constraint on column is 
+  ** only valid if all tables referenced in expr occur to the left
+  ** of the table containing column.
+  **
+  ** The aConstraints[] array contains entries for all constraints
+  ** on the current table.  That way we only have to compute it once
+  ** even though we might try to pick the best index multiple times.
+  ** For each attempt at picking an index, the order of tables in the
+  ** join might be different so we have to recompute the usable flag
+  ** each time.
+  */
+  pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
+  pUsage = pIdxInfo->aConstraintUsage;
+  for(i=0; i<pIdxInfo->nConstraint; i++, pIdxCons++){
+    j = pIdxCons->iTermOffset;
+    pTerm = &pWC->a[j];
+    pIdxCons->usable = (pTerm->prereqRight&notReady) ? 0 : 1;
+  }
+  memset(pUsage, 0, sizeof(pUsage[0])*pIdxInfo->nConstraint);
+  if( pIdxInfo->needToFreeIdxStr ){
+    sqlite3_free(pIdxInfo->idxStr);
+  }
+  pIdxInfo->idxStr = 0;
+  pIdxInfo->idxNum = 0;
+  pIdxInfo->needToFreeIdxStr = 0;
+  pIdxInfo->orderByConsumed = 0;
+  /* ((double)2) In case of SQLITE_OMIT_FLOATING_POINT... */
+  pIdxInfo->estimatedCost = SQLITE_BIG_DBL / ((double)2);
+  nOrderBy = pIdxInfo->nOrderBy;
+  if( !pOrderBy ){
+    pIdxInfo->nOrderBy = 0;
+  }
+
+  if( vtabBestIndex(pParse, pTab, pIdxInfo) ){
+    return;
+  }
+
+  pIdxCons = *(struct sqlite3_index_constraint**)&pIdxInfo->aConstraint;
+  for(i=0; i<pIdxInfo->nConstraint; i++){
+    if( pUsage[i].argvIndex>0 ){
+      pCost->used |= pWC->a[pIdxCons[i].iTermOffset].prereqRight;
+    }
+  }
+
+  /* If there is an ORDER BY clause, and the selected virtual table index
+  ** does not satisfy it, increase the cost of the scan accordingly. This
+  ** matches the processing for non-virtual tables in bestBtreeIndex().
+  */
+  rCost = pIdxInfo->estimatedCost;
+  if( pOrderBy && pIdxInfo->orderByConsumed==0 ){
+    rCost += estLog(rCost)*rCost;
+  }
+
+  /* The cost is not allowed to be larger than SQLITE_BIG_DBL (the
+  ** inital value of lowestCost in this loop. If it is, then the
+  ** (cost<lowestCost) test below will never be true.
+  ** 
+  ** Use "(double)2" instead of "2.0" in case OMIT_FLOATING_POINT 
+  ** is defined.
+  */
+  if( (SQLITE_BIG_DBL/((double)2))<rCost ){
+    pCost->rCost = (SQLITE_BIG_DBL/((double)2));
+  }else{
+    pCost->rCost = rCost;
+  }
+  pCost->plan.u.pVtabIdx = pIdxInfo;
+  if( pIdxInfo->orderByConsumed ){
+    pCost->plan.wsFlags |= WHERE_ORDERBY;
+  }
+  pCost->plan.nEq = 0;
+  pIdxInfo->nOrderBy = nOrderBy;
+
+  /* Try to find a more efficient access pattern by using multiple indexes
+  ** to optimize an OR expression within the WHERE clause. 
+  */
+  bestOrClauseIndex(pParse, pWC, pSrc, notReady, notValid, pOrderBy, pCost);
+}
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+/*
+** Argument pIdx is a pointer to an index structure that has an array of
+** SQLITE_INDEX_SAMPLES evenly spaced samples of the first indexed column
+** stored in Index.aSample. These samples divide the domain of values stored
+** the index into (SQLITE_INDEX_SAMPLES+1) regions.
+** Region 0 contains all values less than the first sample value. Region
+** 1 contains values between the first and second samples.  Region 2 contains
+** values between samples 2 and 3.  And so on.  Region SQLITE_INDEX_SAMPLES
+** contains values larger than the last sample.
+**
+** If the index contains many duplicates of a single value, then it is
+** possible that two or more adjacent samples can hold the same value.
+** When that is the case, the smallest possible region code is returned
+** when roundUp is false and the largest possible region code is returned
+** when roundUp is true.
+**
+** If successful, this function determines which of the regions value 
+** pVal lies in, sets *piRegion to the region index (a value between 0
+** and SQLITE_INDEX_SAMPLES+1, inclusive) and returns SQLITE_OK.
+** Or, if an OOM occurs while converting text values between encodings,
+** SQLITE_NOMEM is returned and *piRegion is undefined.
+*/
+#ifdef SQLITE_ENABLE_STAT2
+static int whereRangeRegion(
+  Parse *pParse,              /* Database connection */
+  Index *pIdx,                /* Index to consider domain of */
+  sqlite3_value *pVal,        /* Value to consider */
+  int roundUp,                /* Return largest valid region if true */
+  int *piRegion               /* OUT: Region of domain in which value lies */
+){
+  assert( roundUp==0 || roundUp==1 );
+  if( ALWAYS(pVal) ){
+    IndexSample *aSample = pIdx->aSample;
+    int i = 0;
+    int eType = sqlite3_value_type(pVal);
+
+    if( eType==SQLITE_INTEGER || eType==SQLITE_FLOAT ){
+      double r = sqlite3_value_double(pVal);
+      for(i=0; i<SQLITE_INDEX_SAMPLES; i++){
+        if( aSample[i].eType==SQLITE_NULL ) continue;
+        if( aSample[i].eType>=SQLITE_TEXT ) break;
+        if( roundUp ){
+          if( aSample[i].u.r>r ) break;
+        }else{
+          if( aSample[i].u.r>=r ) break;
+        }
+      }
+    }else if( eType==SQLITE_NULL ){
+      i = 0;
+      if( roundUp ){
+        while( i<SQLITE_INDEX_SAMPLES && aSample[i].eType==SQLITE_NULL ) i++;
+      }
+    }else{ 
+      sqlite3 *db = pParse->db;
+      CollSeq *pColl;
+      const u8 *z;
+      int n;
+
+      /* pVal comes from sqlite3ValueFromExpr() so the type cannot be NULL */
+      assert( eType==SQLITE_TEXT || eType==SQLITE_BLOB );
+
+      if( eType==SQLITE_BLOB ){
+        z = (const u8 *)sqlite3_value_blob(pVal);
+        pColl = db->pDfltColl;
+        assert( pColl->enc==SQLITE_UTF8 );
+      }else{
+        pColl = sqlite3GetCollSeq(db, SQLITE_UTF8, 0, *pIdx->azColl);
+        if( pColl==0 ){
+          sqlite3ErrorMsg(pParse, "no such collation sequence: %s",
+                          *pIdx->azColl);
+          return SQLITE_ERROR;
+        }
+        z = (const u8 *)sqlite3ValueText(pVal, pColl->enc);
+        if( !z ){
+          return SQLITE_NOMEM;
+        }
+        assert( z && pColl && pColl->xCmp );
+      }
+      n = sqlite3ValueBytes(pVal, pColl->enc);
+
+      for(i=0; i<SQLITE_INDEX_SAMPLES; i++){
+        int c;
+        int eSampletype = aSample[i].eType;
+        if( eSampletype==SQLITE_NULL || eSampletype<eType ) continue;
+        if( (eSampletype!=eType) ) break;
+#ifndef SQLITE_OMIT_UTF16
+        if( pColl->enc!=SQLITE_UTF8 ){
+          int nSample;
+          char *zSample = sqlite3Utf8to16(
+              db, pColl->enc, aSample[i].u.z, aSample[i].nByte, &nSample
+          );
+          if( !zSample ){
+            assert( db->mallocFailed );
+            return SQLITE_NOMEM;
+          }
+          c = pColl->xCmp(pColl->pUser, nSample, zSample, n, z);
+          sqlite3DbFree(db, zSample);
+        }else
+#endif
+        {
+          c = pColl->xCmp(pColl->pUser, aSample[i].nByte, aSample[i].u.z, n, z);
+        }
+        if( c-roundUp>=0 ) break;
+      }
+    }
+
+    assert( i>=0 && i<=SQLITE_INDEX_SAMPLES );
+    *piRegion = i;
+  }
+  return SQLITE_OK;
+}
+#endif   /* #ifdef SQLITE_ENABLE_STAT2 */
+
+/*
+** If expression pExpr represents a literal value, set *pp to point to
+** an sqlite3_value structure containing the same value, with affinity
+** aff applied to it, before returning. It is the responsibility of the 
+** caller to eventually release this structure by passing it to 
+** sqlite3ValueFree().
+**
+** If the current parse is a recompile (sqlite3Reprepare()) and pExpr
+** is an SQL variable that currently has a non-NULL value bound to it,
+** create an sqlite3_value structure containing this value, again with
+** affinity aff applied to it, instead.
+**
+** If neither of the above apply, set *pp to NULL.
+**
+** If an error occurs, return an error code. Otherwise, SQLITE_OK.
+*/
+#ifdef SQLITE_ENABLE_STAT2
+static int valueFromExpr(
+  Parse *pParse, 
+  Expr *pExpr, 
+  u8 aff, 
+  sqlite3_value **pp
+){
+  if( pExpr->op==TK_VARIABLE
+   || (pExpr->op==TK_REGISTER && pExpr->op2==TK_VARIABLE)
+  ){
+    int iVar = pExpr->iColumn;
+    sqlite3VdbeSetVarmask(pParse->pVdbe, iVar); /* IMP: R-23257-02778 */
+    *pp = sqlite3VdbeGetValue(pParse->pReprepare, iVar, aff);
+    return SQLITE_OK;
+  }
+  return sqlite3ValueFromExpr(pParse->db, pExpr, SQLITE_UTF8, aff, pp);
+}
+#endif
+
+/*
+** This function is used to estimate the number of rows that will be visited
+** by scanning an index for a range of values. The range may have an upper
+** bound, a lower bound, or both. The WHERE clause terms that set the upper
+** and lower bounds are represented by pLower and pUpper respectively. For
+** example, assuming that index p is on t1(a):
+**
+**   ... FROM t1 WHERE a > ? AND a < ? ...
+**                    |_____|   |_____|
+**                       |         |
+**                     pLower    pUpper
+**
+** If either of the upper or lower bound is not present, then NULL is passed in
+** place of the corresponding WhereTerm.
+**
+** The nEq parameter is passed the index of the index column subject to the
+** range constraint. Or, equivalently, the number of equality constraints
+** optimized by the proposed index scan. For example, assuming index p is
+** on t1(a, b), and the SQL query is:
+**
+**   ... FROM t1 WHERE a = ? AND b > ? AND b < ? ...
+**
+** then nEq should be passed the value 1 (as the range restricted column,
+** b, is the second left-most column of the index). Or, if the query is:
+**
+**   ... FROM t1 WHERE a > ? AND a < ? ...
+**
+** then nEq should be passed 0.
+**
+** The returned value is an integer between 1 and 100, inclusive. A return
+** value of 1 indicates that the proposed range scan is expected to visit
+** approximately 1/100th (1%) of the rows selected by the nEq equality
+** constraints (if any). A return value of 100 indicates that it is expected
+** that the range scan will visit every row (100%) selected by the equality
+** constraints.
+**
+** In the absence of sqlite_stat2 ANALYZE data, each range inequality
+** reduces the search space by 3/4ths.  Hence a single constraint (x>?)
+** results in a return of 25 and a range constraint (x>? AND x<?) results
+** in a return of 6.
+*/
+static int whereRangeScanEst(
+  Parse *pParse,       /* Parsing & code generating context */
+  Index *p,            /* The index containing the range-compared column; "x" */
+  int nEq,             /* index into p->aCol[] of the range-compared column */
+  WhereTerm *pLower,   /* Lower bound on the range. ex: "x>123" Might be NULL */
+  WhereTerm *pUpper,   /* Upper bound on the range. ex: "x<455" Might be NULL */
+  int *piEst           /* OUT: Return value */
+){
+  int rc = SQLITE_OK;
+
+#ifdef SQLITE_ENABLE_STAT2
+
+  if( nEq==0 && p->aSample ){
+    sqlite3_value *pLowerVal = 0;
+    sqlite3_value *pUpperVal = 0;
+    int iEst;
+    int iLower = 0;
+    int iUpper = SQLITE_INDEX_SAMPLES;
+    int roundUpUpper = 0;
+    int roundUpLower = 0;
+    u8 aff = p->pTable->aCol[p->aiColumn[0]].affinity;
+
+    if( pLower ){
+      Expr *pExpr = pLower->pExpr->pRight;
+      rc = valueFromExpr(pParse, pExpr, aff, &pLowerVal);
+      assert( pLower->eOperator==WO_GT || pLower->eOperator==WO_GE );
+      roundUpLower = (pLower->eOperator==WO_GT) ?1:0;
+    }
+    if( rc==SQLITE_OK && pUpper ){
+      Expr *pExpr = pUpper->pExpr->pRight;
+      rc = valueFromExpr(pParse, pExpr, aff, &pUpperVal);
+      assert( pUpper->eOperator==WO_LT || pUpper->eOperator==WO_LE );
+      roundUpUpper = (pUpper->eOperator==WO_LE) ?1:0;
+    }
+
+    if( rc!=SQLITE_OK || (pLowerVal==0 && pUpperVal==0) ){
+      sqlite3ValueFree(pLowerVal);
+      sqlite3ValueFree(pUpperVal);
+      goto range_est_fallback;
+    }else if( pLowerVal==0 ){
+      rc = whereRangeRegion(pParse, p, pUpperVal, roundUpUpper, &iUpper);
+      if( pLower ) iLower = iUpper/2;
+    }else if( pUpperVal==0 ){
+      rc = whereRangeRegion(pParse, p, pLowerVal, roundUpLower, &iLower);
+      if( pUpper ) iUpper = (iLower + SQLITE_INDEX_SAMPLES + 1)/2;
+    }else{
+      rc = whereRangeRegion(pParse, p, pUpperVal, roundUpUpper, &iUpper);
+      if( rc==SQLITE_OK ){
+        rc = whereRangeRegion(pParse, p, pLowerVal, roundUpLower, &iLower);
+      }
+    }
+    WHERETRACE(("range scan regions: %d..%d\n", iLower, iUpper));
+
+    iEst = iUpper - iLower;
+    testcase( iEst==SQLITE_INDEX_SAMPLES );
+    assert( iEst<=SQLITE_INDEX_SAMPLES );
+    if( iEst<1 ){
+      *piEst = 50/SQLITE_INDEX_SAMPLES;
+    }else{
+      *piEst = (iEst*100)/SQLITE_INDEX_SAMPLES;
+    }
+    sqlite3ValueFree(pLowerVal);
+    sqlite3ValueFree(pUpperVal);
+    return rc;
+  }
+range_est_fallback:
+#else
+  UNUSED_PARAMETER(pParse);
+  UNUSED_PARAMETER(p);
+  UNUSED_PARAMETER(nEq);
+#endif
+  assert( pLower || pUpper );
+  *piEst = 100;
+  if( pLower && (pLower->wtFlags & TERM_VNULL)==0 ) *piEst /= 4;
+  if( pUpper ) *piEst /= 4;
+  return rc;
+}
+
+#ifdef SQLITE_ENABLE_STAT2
+/*
+** Estimate the number of rows that will be returned based on
+** an equality constraint x=VALUE and where that VALUE occurs in
+** the histogram data.  This only works when x is the left-most
+** column of an index and sqlite_stat2 histogram data is available
+** for that index.  When pExpr==NULL that means the constraint is
+** "x IS NULL" instead of "x=VALUE".
+**
+** Write the estimated row count into *pnRow and return SQLITE_OK. 
+** If unable to make an estimate, leave *pnRow unchanged and return
+** non-zero.
+**
+** This routine can fail if it is unable to load a collating sequence
+** required for string comparison, or if unable to allocate memory
+** for a UTF conversion required for comparison.  The error is stored
+** in the pParse structure.
+*/
+static int whereEqualScanEst(
+  Parse *pParse,       /* Parsing & code generating context */
+  Index *p,            /* The index whose left-most column is pTerm */
+  Expr *pExpr,         /* Expression for VALUE in the x=VALUE constraint */
+  double *pnRow        /* Write the revised row estimate here */
+){
+  sqlite3_value *pRhs = 0;  /* VALUE on right-hand side of pTerm */
+  int iLower, iUpper;       /* Range of histogram regions containing pRhs */
+  u8 aff;                   /* Column affinity */
+  int rc;                   /* Subfunction return code */
+  double nRowEst;           /* New estimate of the number of rows */
+
+  assert( p->aSample!=0 );
+  aff = p->pTable->aCol[p->aiColumn[0]].affinity;
+  if( pExpr ){
+    rc = valueFromExpr(pParse, pExpr, aff, &pRhs);
+    if( rc ) goto whereEqualScanEst_cancel;
+  }else{
+    pRhs = sqlite3ValueNew(pParse->db);
+  }
+  if( pRhs==0 ) return SQLITE_NOTFOUND;
+  rc = whereRangeRegion(pParse, p, pRhs, 0, &iLower);
+  if( rc ) goto whereEqualScanEst_cancel;
+  rc = whereRangeRegion(pParse, p, pRhs, 1, &iUpper);
+  if( rc ) goto whereEqualScanEst_cancel;
+  WHERETRACE(("equality scan regions: %d..%d\n", iLower, iUpper));
+  if( iLower>=iUpper ){
+    nRowEst = p->aiRowEst[0]/(SQLITE_INDEX_SAMPLES*2);
+    if( nRowEst<*pnRow ) *pnRow = nRowEst;
+  }else{
+    nRowEst = (iUpper-iLower)*p->aiRowEst[0]/SQLITE_INDEX_SAMPLES;
+    *pnRow = nRowEst;
+  }
+
+whereEqualScanEst_cancel:
+  sqlite3ValueFree(pRhs);
+  return rc;
+}
+#endif /* defined(SQLITE_ENABLE_STAT2) */
+
+#ifdef SQLITE_ENABLE_STAT2
+/*
+** Estimate the number of rows that will be returned based on
+** an IN constraint where the right-hand side of the IN operator
+** is a list of values.  Example:
+**
+**        WHERE x IN (1,2,3,4)
+**
+** Write the estimated row count into *pnRow and return SQLITE_OK. 
+** If unable to make an estimate, leave *pnRow unchanged and return
+** non-zero.
+**
+** This routine can fail if it is unable to load a collating sequence
+** required for string comparison, or if unable to allocate memory
+** for a UTF conversion required for comparison.  The error is stored
+** in the pParse structure.
+*/
+static int whereInScanEst(
+  Parse *pParse,       /* Parsing & code generating context */
+  Index *p,            /* The index whose left-most column is pTerm */
+  ExprList *pList,     /* The value list on the RHS of "x IN (v1,v2,v3,...)" */
+  double *pnRow        /* Write the revised row estimate here */
+){
+  sqlite3_value *pVal = 0;  /* One value from list */
+  int iLower, iUpper;       /* Range of histogram regions containing pRhs */
+  u8 aff;                   /* Column affinity */
+  int rc = SQLITE_OK;       /* Subfunction return code */
+  double nRowEst;           /* New estimate of the number of rows */
+  int nSpan = 0;            /* Number of histogram regions spanned */
+  int nSingle = 0;          /* Histogram regions hit by a single value */
+  int nNotFound = 0;        /* Count of values that are not constants */
+  int i;                               /* Loop counter */
+  u8 aSpan[SQLITE_INDEX_SAMPLES+1];    /* Histogram regions that are spanned */
+  u8 aSingle[SQLITE_INDEX_SAMPLES+1];  /* Histogram regions hit once */
+
+  assert( p->aSample!=0 );
+  aff = p->pTable->aCol[p->aiColumn[0]].affinity;
+  memset(aSpan, 0, sizeof(aSpan));
+  memset(aSingle, 0, sizeof(aSingle));
+  for(i=0; i<pList->nExpr; i++){
+    sqlite3ValueFree(pVal);
+    rc = valueFromExpr(pParse, pList->a[i].pExpr, aff, &pVal);
+    if( rc ) break;
+    if( pVal==0 || sqlite3_value_type(pVal)==SQLITE_NULL ){
+      nNotFound++;
+      continue;
+    }
+    rc = whereRangeRegion(pParse, p, pVal, 0, &iLower);
+    if( rc ) break;
+    rc = whereRangeRegion(pParse, p, pVal, 1, &iUpper);
+    if( rc ) break;
+    if( iLower>=iUpper ){
+      aSingle[iLower] = 1;
+    }else{
+      assert( iLower>=0 && iUpper<=SQLITE_INDEX_SAMPLES );
+      while( iLower<iUpper ) aSpan[iLower++] = 1;
+    }
+  }
+  if( rc==SQLITE_OK ){
+    for(i=nSpan=0; i<=SQLITE_INDEX_SAMPLES; i++){
+      if( aSpan[i] ){
+        nSpan++;
+      }else if( aSingle[i] ){
+        nSingle++;
+      }
+    }
+    nRowEst = (nSpan*2+nSingle)*p->aiRowEst[0]/(2*SQLITE_INDEX_SAMPLES)
+               + nNotFound*p->aiRowEst[1];
+    if( nRowEst > p->aiRowEst[0] ) nRowEst = p->aiRowEst[0];
+    *pnRow = nRowEst;
+    WHERETRACE(("IN row estimate: nSpan=%d, nSingle=%d, nNotFound=%d, est=%g\n",
+                 nSpan, nSingle, nNotFound, nRowEst));
+  }
+  sqlite3ValueFree(pVal);
+  return rc;
+}
+#endif /* defined(SQLITE_ENABLE_STAT2) */
+
+
+/*
+** Find the best query plan for accessing a particular table.  Write the
+** best query plan and its cost into the WhereCost object supplied as the
+** last parameter.
+**
+** The lowest cost plan wins.  The cost is an estimate of the amount of
+** CPU and disk I/O needed to process the requested result.
+** Factors that influence cost include:
+**
+**    *  The estimated number of rows that will be retrieved.  (The
+**       fewer the better.)
+**
+**    *  Whether or not sorting must occur.
+**
+**    *  Whether or not there must be separate lookups in the
+**       index and in the main table.
+**
+** If there was an INDEXED BY clause (pSrc->pIndex) attached to the table in
+** the SQL statement, then this function only considers plans using the 
+** named index. If no such plan is found, then the returned cost is
+** SQLITE_BIG_DBL. If a plan is found that uses the named index, 
+** then the cost is calculated in the usual way.
+**
+** If a NOT INDEXED clause (pSrc->notIndexed!=0) was attached to the table 
+** in the SELECT statement, then no indexes are considered. However, the 
+** selected plan may still take advantage of the built-in rowid primary key
+** index.
+*/
+static void bestBtreeIndex(
+  Parse *pParse,              /* The parsing context */
+  WhereClause *pWC,           /* The WHERE clause */
+  struct SrcList_item *pSrc,  /* The FROM clause term to search */
+  Bitmask notReady,           /* Mask of cursors not available for indexing */
+  Bitmask notValid,           /* Cursors not available for any purpose */
+  ExprList *pOrderBy,         /* The ORDER BY clause */
+  WhereCost *pCost            /* Lowest cost query plan */
+){
+  int iCur = pSrc->iCursor;   /* The cursor of the table to be accessed */
+  Index *pProbe;              /* An index we are evaluating */
+  Index *pIdx;                /* Copy of pProbe, or zero for IPK index */
+  int eqTermMask;             /* Current mask of valid equality operators */
+  int idxEqTermMask;          /* Index mask of valid equality operators */
+  Index sPk;                  /* A fake index object for the primary key */
+  unsigned int aiRowEstPk[2]; /* The aiRowEst[] value for the sPk index */
+  int aiColumnPk = -1;        /* The aColumn[] value for the sPk index */
+  int wsFlagMask;             /* Allowed flags in pCost->plan.wsFlag */
+
+  /* Initialize the cost to a worst-case value */
+  memset(pCost, 0, sizeof(*pCost));
+  pCost->rCost = SQLITE_BIG_DBL;
+
+  /* If the pSrc table is the right table of a LEFT JOIN then we may not
+  ** use an index to satisfy IS NULL constraints on that table.  This is
+  ** because columns might end up being NULL if the table does not match -
+  ** a circumstance which the index cannot help us discover.  Ticket #2177.
+  */
+  if( pSrc->jointype & JT_LEFT ){
+    idxEqTermMask = WO_EQ|WO_IN;
+  }else{
+    idxEqTermMask = WO_EQ|WO_IN|WO_ISNULL;
+  }
+
+  if( pSrc->pIndex ){
+    /* An INDEXED BY clause specifies a particular index to use */
+    pIdx = pProbe = pSrc->pIndex;
+    wsFlagMask = ~(WHERE_ROWID_EQ|WHERE_ROWID_RANGE);
+    eqTermMask = idxEqTermMask;
+  }else{
+    /* There is no INDEXED BY clause.  Create a fake Index object in local
+    ** variable sPk to represent the rowid primary key index.  Make this
+    ** fake index the first in a chain of Index objects with all of the real
+    ** indices to follow */
+    Index *pFirst;                  /* First of real indices on the table */
+    memset(&sPk, 0, sizeof(Index));
+    sPk.nColumn = 1;
+    sPk.aiColumn = &aiColumnPk;
+    sPk.aiRowEst = aiRowEstPk;
+    sPk.onError = OE_Replace;
+    sPk.pTable = pSrc->pTab;
+    aiRowEstPk[0] = pSrc->pTab->nRowEst;
+    aiRowEstPk[1] = 1;
+    pFirst = pSrc->pTab->pIndex;
+    if( pSrc->notIndexed==0 ){
+      /* The real indices of the table are only considered if the
+      ** NOT INDEXED qualifier is omitted from the FROM clause */
+      sPk.pNext = pFirst;
+    }
+    pProbe = &sPk;
+    wsFlagMask = ~(
+        WHERE_COLUMN_IN|WHERE_COLUMN_EQ|WHERE_COLUMN_NULL|WHERE_COLUMN_RANGE
+    );
+    eqTermMask = WO_EQ|WO_IN;
+    pIdx = 0;
+  }
+
+  /* Loop over all indices looking for the best one to use
+  */
+  for(; pProbe; pIdx=pProbe=pProbe->pNext){
+    const unsigned int * const aiRowEst = pProbe->aiRowEst;
+    double cost;                /* Cost of using pProbe */
+    double nRow;                /* Estimated number of rows in result set */
+    double log10N;              /* base-10 logarithm of nRow (inexact) */
+    int rev;                    /* True to scan in reverse order */
+    int wsFlags = 0;
+    Bitmask used = 0;
+
+    /* The following variables are populated based on the properties of
+    ** index being evaluated. They are then used to determine the expected
+    ** cost and number of rows returned.
+    **
+    **  nEq: 
+    **    Number of equality terms that can be implemented using the index.
+    **    In other words, the number of initial fields in the index that
+    **    are used in == or IN or NOT NULL constraints of the WHERE clause.
+    **
+    **  nInMul:  
+    **    The "in-multiplier". This is an estimate of how many seek operations 
+    **    SQLite must perform on the index in question. For example, if the 
+    **    WHERE clause is:
+    **
+    **      WHERE a IN (1, 2, 3) AND b IN (4, 5, 6)
+    **
+    **    SQLite must perform 9 lookups on an index on (a, b), so nInMul is 
+    **    set to 9. Given the same schema and either of the following WHERE 
+    **    clauses:
+    **
+    **      WHERE a =  1
+    **      WHERE a >= 2
+    **
+    **    nInMul is set to 1.
+    **
+    **    If there exists a WHERE term of the form "x IN (SELECT ...)", then 
+    **    the sub-select is assumed to return 25 rows for the purposes of 
+    **    determining nInMul.
+    **
+    **  bInEst:  
+    **    Set to true if there was at least one "x IN (SELECT ...)" term used 
+    **    in determining the value of nInMul.  Note that the RHS of the
+    **    IN operator must be a SELECT, not a value list, for this variable
+    **    to be true.
+    **
+    **  estBound:
+    **    An estimate on the amount of the table that must be searched.  A
+    **    value of 100 means the entire table is searched.  Range constraints
+    **    might reduce this to a value less than 100 to indicate that only
+    **    a fraction of the table needs searching.  In the absence of
+    **    sqlite_stat2 ANALYZE data, a single inequality reduces the search
+    **    space to 1/4rd its original size.  So an x>? constraint reduces
+    **    estBound to 25.  Two constraints (x>? AND x<?) reduce estBound to 6.
+    **
+    **  bSort:   
+    **    Boolean. True if there is an ORDER BY clause that will require an 
+    **    external sort (i.e. scanning the index being evaluated will not 
+    **    correctly order records).
+    **
+    **  bLookup: 
+    **    Boolean. True if a table lookup is required for each index entry
+    **    visited.  In other words, true if this is not a covering index.
+    **    This is always false for the rowid primary key index of a table.
+    **    For other indexes, it is true unless all the columns of the table
+    **    used by the SELECT statement are present in the index (such an
+    **    index is sometimes described as a covering index).
+    **    For example, given the index on (a, b), the second of the following 
+    **    two queries requires table b-tree lookups in order to find the value
+    **    of column c, but the first does not because columns a and b are
+    **    both available in the index.
+    **
+    **             SELECT a, b    FROM tbl WHERE a = 1;
+    **             SELECT a, b, c FROM tbl WHERE a = 1;
+    */
+    int nEq;                      /* Number of == or IN terms matching index */
+    int bInEst = 0;               /* True if "x IN (SELECT...)" seen */
+    int nInMul = 1;               /* Number of distinct equalities to lookup */
+    int estBound = 100;           /* Estimated reduction in search space */
+    int nBound = 0;               /* Number of range constraints seen */
+    int bSort = 0;                /* True if external sort required */
+    int bLookup = 0;              /* True if not a covering index */
+    WhereTerm *pTerm;             /* A single term of the WHERE clause */
+#ifdef SQLITE_ENABLE_STAT2
+    WhereTerm *pFirstTerm = 0;    /* First term matching the index */
+#endif
+
+    /* Determine the values of nEq and nInMul */
+    for(nEq=0; nEq<pProbe->nColumn; nEq++){
+      int j = pProbe->aiColumn[nEq];
+      pTerm = findTerm(pWC, iCur, j, notReady, eqTermMask, pIdx);
+      if( pTerm==0 ) break;
+      wsFlags |= (WHERE_COLUMN_EQ|WHERE_ROWID_EQ);
+      if( pTerm->eOperator & WO_IN ){
+        Expr *pExpr = pTerm->pExpr;
+        wsFlags |= WHERE_COLUMN_IN;
+        if( ExprHasProperty(pExpr, EP_xIsSelect) ){
+          /* "x IN (SELECT ...)":  Assume the SELECT returns 25 rows */
+          nInMul *= 25;
+          bInEst = 1;
+        }else if( ALWAYS(pExpr->x.pList && pExpr->x.pList->nExpr) ){
+          /* "x IN (value, value, ...)" */
+          nInMul *= pExpr->x.pList->nExpr;
+        }
+      }else if( pTerm->eOperator & WO_ISNULL ){
+        wsFlags |= WHERE_COLUMN_NULL;
+      }
+#ifdef SQLITE_ENABLE_STAT2
+      if( nEq==0 && pProbe->aSample ) pFirstTerm = pTerm;
+#endif
+      used |= pTerm->prereqRight;
+    }
+
+    /* Determine the value of estBound. */
+    if( nEq<pProbe->nColumn && pProbe->bUnordered==0 ){
+      int j = pProbe->aiColumn[nEq];
+      if( findTerm(pWC, iCur, j, notReady, WO_LT|WO_LE|WO_GT|WO_GE, pIdx) ){
+        WhereTerm *pTop = findTerm(pWC, iCur, j, notReady, WO_LT|WO_LE, pIdx);
+        WhereTerm *pBtm = findTerm(pWC, iCur, j, notReady, WO_GT|WO_GE, pIdx);
+        whereRangeScanEst(pParse, pProbe, nEq, pBtm, pTop, &estBound);
+        if( pTop ){
+          nBound = 1;
+          wsFlags |= WHERE_TOP_LIMIT;
+          used |= pTop->prereqRight;
+        }
+        if( pBtm ){
+          nBound++;
+          wsFlags |= WHERE_BTM_LIMIT;
+          used |= pBtm->prereqRight;
+        }
+        wsFlags |= (WHERE_COLUMN_RANGE|WHERE_ROWID_RANGE);
+      }
+    }else if( pProbe->onError!=OE_None ){
+      testcase( wsFlags & WHERE_COLUMN_IN );
+      testcase( wsFlags & WHERE_COLUMN_NULL );
+      if( (wsFlags & (WHERE_COLUMN_IN|WHERE_COLUMN_NULL))==0 ){
+        wsFlags |= WHERE_UNIQUE;
+      }
+    }
+
+    /* If there is an ORDER BY clause and the index being considered will
+    ** naturally scan rows in the required order, set the appropriate flags
+    ** in wsFlags. Otherwise, if there is an ORDER BY clause but the index
+    ** will scan rows in a different order, set the bSort variable.  */
+    if( pOrderBy ){
+      if( (wsFlags & WHERE_COLUMN_IN)==0
+        && pProbe->bUnordered==0
+        && isSortingIndex(pParse, pWC->pMaskSet, pProbe, iCur, pOrderBy,
+                          nEq, wsFlags, &rev)
+      ){
+        wsFlags |= WHERE_ROWID_RANGE|WHERE_COLUMN_RANGE|WHERE_ORDERBY;
+        wsFlags |= (rev ? WHERE_REVERSE : 0);
+      }else{
+        bSort = 1;
+      }
+    }
+
+    /* If currently calculating the cost of using an index (not the IPK
+    ** index), determine if all required column data may be obtained without 
+    ** using the main table (i.e. if the index is a covering
+    ** index for this query). If it is, set the WHERE_IDX_ONLY flag in
+    ** wsFlags. Otherwise, set the bLookup variable to true.  */
+    if( pIdx && wsFlags ){
+      Bitmask m = pSrc->colUsed;
+      int j;
+      for(j=0; j<pIdx->nColumn; j++){
+        int x = pIdx->aiColumn[j];
+        if( x<BMS-1 ){
+          m &= ~(((Bitmask)1)<<x);
+        }
+      }
+      if( m==0 ){
+        wsFlags |= WHERE_IDX_ONLY;
+      }else{
+        bLookup = 1;
+      }
+    }
+
+    /*
+    ** Estimate the number of rows of output.  For an "x IN (SELECT...)"
+    ** constraint, do not let the estimate exceed half the rows in the table.
+    */
+    nRow = (double)(aiRowEst[nEq] * nInMul);
+    if( bInEst && nRow*2>aiRowEst[0] ){
+      nRow = aiRowEst[0]/2;
+      nInMul = (int)(nRow / aiRowEst[nEq]);
+    }
+
+#ifdef SQLITE_ENABLE_STAT2
+    /* If the constraint is of the form x=VALUE and histogram
+    ** data is available for column x, then it might be possible
+    ** to get a better estimate on the number of rows based on
+    ** VALUE and how common that value is according to the histogram.
+    */
+    if( nRow>(double)1 && nEq==1 && pFirstTerm!=0 ){
+      if( pFirstTerm->eOperator & (WO_EQ|WO_ISNULL) ){
+        testcase( pFirstTerm->eOperator==WO_EQ );
+        testcase( pFirstTerm->eOperator==WO_ISNULL );
+        whereEqualScanEst(pParse, pProbe, pFirstTerm->pExpr->pRight, &nRow);
+      }else if( pFirstTerm->eOperator==WO_IN && bInEst==0 ){
+        whereInScanEst(pParse, pProbe, pFirstTerm->pExpr->x.pList, &nRow);
+      }
+    }
+#endif /* SQLITE_ENABLE_STAT2 */
+
+    /* Adjust the number of output rows and downward to reflect rows
+    ** that are excluded by range constraints.
+    */
+    nRow = (nRow * (double)estBound) / (double)100;
+    if( nRow<1 ) nRow = 1;
+
+    /* Experiments run on real SQLite databases show that the time needed
+    ** to do a binary search to locate a row in a table or index is roughly
+    ** log10(N) times the time to move from one row to the next row within
+    ** a table or index.  The actual times can vary, with the size of
+    ** records being an important factor.  Both moves and searches are
+    ** slower with larger records, presumably because fewer records fit
+    ** on one page and hence more pages have to be fetched.
+    **
+    ** The ANALYZE command and the sqlite_stat1 and sqlite_stat2 tables do
+    ** not give us data on the relative sizes of table and index records.
+    ** So this computation assumes table records are about twice as big
+    ** as index records
+    */
+    if( (wsFlags & WHERE_NOT_FULLSCAN)==0 ){
+      /* The cost of a full table scan is a number of move operations equal
+      ** to the number of rows in the table.
+      **
+      ** We add an additional 4x penalty to full table scans.  This causes
+      ** the cost function to err on the side of choosing an index over
+      ** choosing a full scan.  This 4x full-scan penalty is an arguable
+      ** decision and one which we expect to revisit in the future.  But
+      ** it seems to be working well enough at the moment.
+      */
+      cost = aiRowEst[0]*4;
+    }else{
+      log10N = estLog(aiRowEst[0]);
+      cost = nRow;
+      if( pIdx ){
+        if( bLookup ){
+          /* For an index lookup followed by a table lookup:
+          **    nInMul index searches to find the start of each index range
+          **  + nRow steps through the index
+          **  + nRow table searches to lookup the table entry using the rowid
+          */
+          cost += (nInMul + nRow)*log10N;
+        }else{
+          /* For a covering index:
+          **     nInMul index searches to find the initial entry 
+          **   + nRow steps through the index
+          */
+          cost += nInMul*log10N;
+        }
+      }else{
+        /* For a rowid primary key lookup:
+        **    nInMult table searches to find the initial entry for each range
+        **  + nRow steps through the table
+        */
+        cost += nInMul*log10N;
+      }
+    }
+
+    /* Add in the estimated cost of sorting the result.  Actual experimental
+    ** measurements of sorting performance in SQLite show that sorting time
+    ** adds C*N*log10(N) to the cost, where N is the number of rows to be 
+    ** sorted and C is a factor between 1.95 and 4.3.  We will split the
+    ** difference and select C of 3.0.
+    */
+    if( bSort ){
+      cost += nRow*estLog(nRow)*3;
+    }
+
+    /**** Cost of using this index has now been computed ****/
+
+    /* If there are additional constraints on this table that cannot
+    ** be used with the current index, but which might lower the number
+    ** of output rows, adjust the nRow value accordingly.  This only 
+    ** matters if the current index is the least costly, so do not bother
+    ** with this step if we already know this index will not be chosen.
+    ** Also, never reduce the output row count below 2 using this step.
+    **
+    ** It is critical that the notValid mask be used here instead of
+    ** the notReady mask.  When computing an "optimal" index, the notReady
+    ** mask will only have one bit set - the bit for the current table.
+    ** The notValid mask, on the other hand, always has all bits set for
+    ** tables that are not in outer loops.  If notReady is used here instead
+    ** of notValid, then a optimal index that depends on inner joins loops
+    ** might be selected even when there exists an optimal index that has
+    ** no such dependency.
+    */
+    if( nRow>2 && cost<=pCost->rCost ){
+      int k;                       /* Loop counter */
+      int nSkipEq = nEq;           /* Number of == constraints to skip */
+      int nSkipRange = nBound;     /* Number of < constraints to skip */
+      Bitmask thisTab;             /* Bitmap for pSrc */
+
+      thisTab = getMask(pWC->pMaskSet, iCur);
+      for(pTerm=pWC->a, k=pWC->nTerm; nRow>2 && k; k--, pTerm++){
+        if( pTerm->wtFlags & TERM_VIRTUAL ) continue;
+        if( (pTerm->prereqAll & notValid)!=thisTab ) continue;
+        if( pTerm->eOperator & (WO_EQ|WO_IN|WO_ISNULL) ){
+          if( nSkipEq ){
+            /* Ignore the first nEq equality matches since the index
+            ** has already accounted for these */
+            nSkipEq--;
+          }else{
+            /* Assume each additional equality match reduces the result
+            ** set size by a factor of 10 */
+            nRow /= 10;
+          }
+        }else if( pTerm->eOperator & (WO_LT|WO_LE|WO_GT|WO_GE) ){
+          if( nSkipRange ){
+            /* Ignore the first nSkipRange range constraints since the index
+            ** has already accounted for these */
+            nSkipRange--;
+          }else{
+            /* Assume each additional range constraint reduces the result
+            ** set size by a factor of 3.  Indexed range constraints reduce
+            ** the search space by a larger factor: 4.  We make indexed range
+            ** more selective intentionally because of the subjective 
+            ** observation that indexed range constraints really are more
+            ** selective in practice, on average. */
+            nRow /= 3;
+          }
+        }else if( pTerm->eOperator!=WO_NOOP ){
+          /* Any other expression lowers the output row count by half */
+          nRow /= 2;
+        }
+      }
+      if( nRow<2 ) nRow = 2;
+    }
+
+
+    WHERETRACE((
+      "%s(%s): nEq=%d nInMul=%d estBound=%d bSort=%d bLookup=%d wsFlags=0x%x\n"
+      "         notReady=0x%llx log10N=%.1f nRow=%.1f cost=%.1f used=0x%llx\n",
+      pSrc->pTab->zName, (pIdx ? pIdx->zName : "ipk"), 
+      nEq, nInMul, estBound, bSort, bLookup, wsFlags,
+      notReady, log10N, nRow, cost, used
+    ));
+
+    /* If this index is the best we have seen so far, then record this
+    ** index and its cost in the pCost structure.
+    */
+    if( (!pIdx || wsFlags)
+     && (cost<pCost->rCost || (cost<=pCost->rCost && nRow<pCost->plan.nRow))
+    ){
+      pCost->rCost = cost;
+      pCost->used = used;
+      pCost->plan.nRow = nRow;
+      pCost->plan.wsFlags = (wsFlags&wsFlagMask);
+      pCost->plan.nEq = nEq;
+      pCost->plan.u.pIdx = pIdx;
+    }
+
+    /* If there was an INDEXED BY clause, then only that one index is
+    ** considered. */
+    if( pSrc->pIndex ) break;
+
+    /* Reset masks for the next index in the loop */
+    wsFlagMask = ~(WHERE_ROWID_EQ|WHERE_ROWID_RANGE);
+    eqTermMask = idxEqTermMask;
+  }
+
+  /* If there is no ORDER BY clause and the SQLITE_ReverseOrder flag
+  ** is set, then reverse the order that the index will be scanned
+  ** in. This is used for application testing, to help find cases
+  ** where application behaviour depends on the (undefined) order that
+  ** SQLite outputs rows in in the absence of an ORDER BY clause.  */
+  if( !pOrderBy && pParse->db->flags & SQLITE_ReverseOrder ){
+    pCost->plan.wsFlags |= WHERE_REVERSE;
+  }
+
+  assert( pOrderBy || (pCost->plan.wsFlags&WHERE_ORDERBY)==0 );
+  assert( pCost->plan.u.pIdx==0 || (pCost->plan.wsFlags&WHERE_ROWID_EQ)==0 );
+  assert( pSrc->pIndex==0 
+       || pCost->plan.u.pIdx==0 
+       || pCost->plan.u.pIdx==pSrc->pIndex 
+  );
+
+  WHERETRACE(("best index is: %s\n", 
+    ((pCost->plan.wsFlags & WHERE_NOT_FULLSCAN)==0 ? "none" : 
+         pCost->plan.u.pIdx ? pCost->plan.u.pIdx->zName : "ipk")
+  ));
+  
+  bestOrClauseIndex(pParse, pWC, pSrc, notReady, notValid, pOrderBy, pCost);
+  bestAutomaticIndex(pParse, pWC, pSrc, notReady, pCost);
+  pCost->plan.wsFlags |= eqTermMask;
+}
+
+/*
+** Find the query plan for accessing table pSrc->pTab. Write the
+** best query plan and its cost into the WhereCost object supplied 
+** as the last parameter. This function may calculate the cost of
+** both real and virtual table scans.
+*/
+static void bestIndex(
+  Parse *pParse,              /* The parsing context */
+  WhereClause *pWC,           /* The WHERE clause */
+  struct SrcList_item *pSrc,  /* The FROM clause term to search */
+  Bitmask notReady,           /* Mask of cursors not available for indexing */
+  Bitmask notValid,           /* Cursors not available for any purpose */
+  ExprList *pOrderBy,         /* The ORDER BY clause */
+  WhereCost *pCost            /* Lowest cost query plan */
+){
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  if( IsVirtual(pSrc->pTab) ){
+    sqlite3_index_info *p = 0;
+    bestVirtualIndex(pParse, pWC, pSrc, notReady, notValid, pOrderBy, pCost,&p);
+    if( p->needToFreeIdxStr ){
+      sqlite3_free(p->idxStr);
+    }
+    sqlite3DbFree(pParse->db, p);
+  }else
+#endif
+  {
+    bestBtreeIndex(pParse, pWC, pSrc, notReady, notValid, pOrderBy, pCost);
+  }
+}
+
+/*
+** Disable a term in the WHERE clause.  Except, do not disable the term
+** if it controls a LEFT OUTER JOIN and it did not originate in the ON
+** or USING clause of that join.
+**
+** Consider the term t2.z='ok' in the following queries:
+**
+**   (1)  SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x WHERE t2.z='ok'
+**   (2)  SELECT * FROM t1 LEFT JOIN t2 ON t1.a=t2.x AND t2.z='ok'
+**   (3)  SELECT * FROM t1, t2 WHERE t1.a=t2.x AND t2.z='ok'
+**
+** The t2.z='ok' is disabled in the in (2) because it originates
+** in the ON clause.  The term is disabled in (3) because it is not part
+** of a LEFT OUTER JOIN.  In (1), the term is not disabled.
+**
+** IMPLEMENTATION-OF: R-24597-58655 No tests are done for terms that are
+** completely satisfied by indices.
+**
+** Disabling a term causes that term to not be tested in the inner loop
+** of the join.  Disabling is an optimization.  When terms are satisfied
+** by indices, we disable them to prevent redundant tests in the inner
+** loop.  We would get the correct results if nothing were ever disabled,
+** but joins might run a little slower.  The trick is to disable as much
+** as we can without disabling too much.  If we disabled in (1), we'd get
+** the wrong answer.  See ticket #813.
+*/
+static void disableTerm(WhereLevel *pLevel, WhereTerm *pTerm){
+  if( pTerm
+      && (pTerm->wtFlags & TERM_CODED)==0
+      && (pLevel->iLeftJoin==0 || ExprHasProperty(pTerm->pExpr, EP_FromJoin))
+  ){
+    pTerm->wtFlags |= TERM_CODED;
+    if( pTerm->iParent>=0 ){
+      WhereTerm *pOther = &pTerm->pWC->a[pTerm->iParent];
+      if( (--pOther->nChild)==0 ){
+        disableTerm(pLevel, pOther);
+      }
+    }
+  }
+}
+
+/*
+** Code an OP_Affinity opcode to apply the column affinity string zAff
+** to the n registers starting at base. 
+**
+** As an optimization, SQLITE_AFF_NONE entries (which are no-ops) at the
+** beginning and end of zAff are ignored.  If all entries in zAff are
+** SQLITE_AFF_NONE, then no code gets generated.
+**
+** This routine makes its own copy of zAff so that the caller is free
+** to modify zAff after this routine returns.
+*/
+static void codeApplyAffinity(Parse *pParse, int base, int n, char *zAff){
+  Vdbe *v = pParse->pVdbe;
+  if( zAff==0 ){
+    assert( pParse->db->mallocFailed );
+    return;
+  }
+  assert( v!=0 );
+
+  /* Adjust base and n to skip over SQLITE_AFF_NONE entries at the beginning
+  ** and end of the affinity string.
+  */
+  while( n>0 && zAff[0]==SQLITE_AFF_NONE ){
+    n--;
+    base++;
+    zAff++;
+  }
+  while( n>1 && zAff[n-1]==SQLITE_AFF_NONE ){
+    n--;
+  }
+
+  /* Code the OP_Affinity opcode if there is anything left to do. */
+  if( n>0 ){
+    sqlite3VdbeAddOp2(v, OP_Affinity, base, n);
+    sqlite3VdbeChangeP4(v, -1, zAff, n);
+    sqlite3ExprCacheAffinityChange(pParse, base, n);
+  }
+}
+
+
+/*
+** Generate code for a single equality term of the WHERE clause.  An equality
+** term can be either X=expr or X IN (...).   pTerm is the term to be 
+** coded.
+**
+** The current value for the constraint is left in register iReg.
+**
+** For a constraint of the form X=expr, the expression is evaluated and its
+** result is left on the stack.  For constraints of the form X IN (...)
+** this routine sets up a loop that will iterate over all values of X.
+*/
+static int codeEqualityTerm(
+  Parse *pParse,      /* The parsing context */
+  WhereTerm *pTerm,   /* The term of the WHERE clause to be coded */
+  WhereLevel *pLevel, /* When level of the FROM clause we are working on */
+  int iTarget         /* Attempt to leave results in this register */
+){
+  Expr *pX = pTerm->pExpr;
+  Vdbe *v = pParse->pVdbe;
+  int iReg;                  /* Register holding results */
+
+  assert( iTarget>0 );
+  if( pX->op==TK_EQ ){
+    iReg = sqlite3ExprCodeTarget(pParse, pX->pRight, iTarget);
+  }else if( pX->op==TK_ISNULL ){
+    iReg = iTarget;
+    sqlite3VdbeAddOp2(v, OP_Null, 0, iReg);
+#ifndef SQLITE_OMIT_SUBQUERY
+  }else{
+    int eType;
+    int iTab;
+    struct InLoop *pIn;
+
+    assert( pX->op==TK_IN );
+    iReg = iTarget;
+    eType = sqlite3FindInIndex(pParse, pX, 0);
+    iTab = pX->iTable;
+    sqlite3VdbeAddOp2(v, OP_Rewind, iTab, 0);
+    assert( pLevel->plan.wsFlags & WHERE_IN_ABLE );
+    if( pLevel->u.in.nIn==0 ){
+      pLevel->addrNxt = sqlite3VdbeMakeLabel(v);
+    }
+    pLevel->u.in.nIn++;
+    pLevel->u.in.aInLoop =
+       sqlite3DbReallocOrFree(pParse->db, pLevel->u.in.aInLoop,
+                              sizeof(pLevel->u.in.aInLoop[0])*pLevel->u.in.nIn);
+    pIn = pLevel->u.in.aInLoop;
+    if( pIn ){
+      pIn += pLevel->u.in.nIn - 1;
+      pIn->iCur = iTab;
+      if( eType==IN_INDEX_ROWID ){
+        pIn->addrInTop = sqlite3VdbeAddOp2(v, OP_Rowid, iTab, iReg);
+      }else{
+        pIn->addrInTop = sqlite3VdbeAddOp3(v, OP_Column, iTab, 0, iReg);
+      }
+      sqlite3VdbeAddOp1(v, OP_IsNull, iReg);
+    }else{
+      pLevel->u.in.nIn = 0;
+    }
+#endif
+  }
+  disableTerm(pLevel, pTerm);
+  return iReg;
+}
+
+/*
+** Generate code that will evaluate all == and IN constraints for an
+** index.
+**
+** For example, consider table t1(a,b,c,d,e,f) with index i1(a,b,c).
+** Suppose the WHERE clause is this:  a==5 AND b IN (1,2,3) AND c>5 AND c<10
+** The index has as many as three equality constraints, but in this
+** example, the third "c" value is an inequality.  So only two 
+** constraints are coded.  This routine will generate code to evaluate
+** a==5 and b IN (1,2,3).  The current values for a and b will be stored
+** in consecutive registers and the index of the first register is returned.
+**
+** In the example above nEq==2.  But this subroutine works for any value
+** of nEq including 0.  If nEq==0, this routine is nearly a no-op.
+** The only thing it does is allocate the pLevel->iMem memory cell and
+** compute the affinity string.
+**
+** This routine always allocates at least one memory cell and returns
+** the index of that memory cell. The code that
+** calls this routine will use that memory cell to store the termination
+** key value of the loop.  If one or more IN operators appear, then
+** this routine allocates an additional nEq memory cells for internal
+** use.
+**
+** Before returning, *pzAff is set to point to a buffer containing a
+** copy of the column affinity string of the index allocated using
+** sqlite3DbMalloc(). Except, entries in the copy of the string associated
+** with equality constraints that use NONE affinity are set to
+** SQLITE_AFF_NONE. This is to deal with SQL such as the following:
+**
+**   CREATE TABLE t1(a TEXT PRIMARY KEY, b);
+**   SELECT ... FROM t1 AS t2, t1 WHERE t1.a = t2.b;
+**
+** In the example above, the index on t1(a) has TEXT affinity. But since
+** the right hand side of the equality constraint (t2.b) has NONE affinity,
+** no conversion should be attempted before using a t2.b value as part of
+** a key to search the index. Hence the first byte in the returned affinity
+** string in this example would be set to SQLITE_AFF_NONE.
+*/
+static int codeAllEqualityTerms(
+  Parse *pParse,        /* Parsing context */
+  WhereLevel *pLevel,   /* Which nested loop of the FROM we are coding */
+  WhereClause *pWC,     /* The WHERE clause */
+  Bitmask notReady,     /* Which parts of FROM have not yet been coded */
+  int nExtraReg,        /* Number of extra registers to allocate */
+  char **pzAff          /* OUT: Set to point to affinity string */
+){
+  int nEq = pLevel->plan.nEq;   /* The number of == or IN constraints to code */
+  Vdbe *v = pParse->pVdbe;      /* The vm under construction */
+  Index *pIdx;                  /* The index being used for this loop */
+  int iCur = pLevel->iTabCur;   /* The cursor of the table */
+  WhereTerm *pTerm;             /* A single constraint term */
+  int j;                        /* Loop counter */
+  int regBase;                  /* Base register */
+  int nReg;                     /* Number of registers to allocate */
+  char *zAff;                   /* Affinity string to return */
+
+  /* This module is only called on query plans that use an index. */
+  assert( pLevel->plan.wsFlags & WHERE_INDEXED );
+  pIdx = pLevel->plan.u.pIdx;
+
+  /* Figure out how many memory cells we will need then allocate them.
+  */
+  regBase = pParse->nMem + 1;
+  nReg = pLevel->plan.nEq + nExtraReg;
+  pParse->nMem += nReg;
+
+  zAff = sqlite3DbStrDup(pParse->db, sqlite3IndexAffinityStr(v, pIdx));
+  if( !zAff ){
+    pParse->db->mallocFailed = 1;
+  }
+
+  /* Evaluate the equality constraints
+  */
+  assert( pIdx->nColumn>=nEq );
+  for(j=0; j<nEq; j++){
+    int r1;
+    int k = pIdx->aiColumn[j];
+    pTerm = findTerm(pWC, iCur, k, notReady, pLevel->plan.wsFlags, pIdx);
+    if( NEVER(pTerm==0) ) break;
+    /* The following true for indices with redundant columns. 
+    ** Ex: CREATE INDEX i1 ON t1(a,b,a); SELECT * FROM t1 WHERE a=0 AND b=0; */
+    testcase( (pTerm->wtFlags & TERM_CODED)!=0 );
+    testcase( pTerm->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
+    r1 = codeEqualityTerm(pParse, pTerm, pLevel, regBase+j);
+    if( r1!=regBase+j ){
+      if( nReg==1 ){
+        sqlite3ReleaseTempReg(pParse, regBase);
+        regBase = r1;
+      }else{
+        sqlite3VdbeAddOp2(v, OP_SCopy, r1, regBase+j);
+      }
+    }
+    testcase( pTerm->eOperator & WO_ISNULL );
+    testcase( pTerm->eOperator & WO_IN );
+    if( (pTerm->eOperator & (WO_ISNULL|WO_IN))==0 ){
+      Expr *pRight = pTerm->pExpr->pRight;
+      sqlite3ExprCodeIsNullJump(v, pRight, regBase+j, pLevel->addrBrk);
+      if( zAff ){
+        if( sqlite3CompareAffinity(pRight, zAff[j])==SQLITE_AFF_NONE ){
+          zAff[j] = SQLITE_AFF_NONE;
+        }
+        if( sqlite3ExprNeedsNoAffinityChange(pRight, zAff[j]) ){
+          zAff[j] = SQLITE_AFF_NONE;
+        }
+      }
+    }
+  }
+  *pzAff = zAff;
+  return regBase;
+}
+
+#ifndef SQLITE_OMIT_EXPLAIN
+/*
+** This routine is a helper for explainIndexRange() below
+**
+** pStr holds the text of an expression that we are building up one term
+** at a time.  This routine adds a new term to the end of the expression.
+** Terms are separated by AND so add the "AND" text for second and subsequent
+** terms only.
+*/
+static void explainAppendTerm(
+  StrAccum *pStr,             /* The text expression being built */
+  int iTerm,                  /* Index of this term.  First is zero */
+  const char *zColumn,        /* Name of the column */
+  const char *zOp             /* Name of the operator */
+){
+  if( iTerm ) sqlite3StrAccumAppend(pStr, " AND ", 5);
+  sqlite3StrAccumAppend(pStr, zColumn, -1);
+  sqlite3StrAccumAppend(pStr, zOp, 1);
+  sqlite3StrAccumAppend(pStr, "?", 1);
+}
+
+/*
+** Argument pLevel describes a strategy for scanning table pTab. This 
+** function returns a pointer to a string buffer containing a description
+** of the subset of table rows scanned by the strategy in the form of an
+** SQL expression. Or, if all rows are scanned, NULL is returned.
+**
+** For example, if the query:
+**
+**   SELECT * FROM t1 WHERE a=1 AND b>2;
+**
+** is run and there is an index on (a, b), then this function returns a
+** string similar to:
+**
+**   "a=? AND b>?"
+**
+** The returned pointer points to memory obtained from sqlite3DbMalloc().
+** It is the responsibility of the caller to free the buffer when it is
+** no longer required.
+*/
+static char *explainIndexRange(sqlite3 *db, WhereLevel *pLevel, Table *pTab){
+  WherePlan *pPlan = &pLevel->plan;
+  Index *pIndex = pPlan->u.pIdx;
+  int nEq = pPlan->nEq;
+  int i, j;
+  Column *aCol = pTab->aCol;
+  int *aiColumn = pIndex->aiColumn;
+  StrAccum txt;
+
+  if( nEq==0 && (pPlan->wsFlags & (WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))==0 ){
+    return 0;
+  }
+  sqlite3StrAccumInit(&txt, 0, 0, SQLITE_MAX_LENGTH);
+  txt.db = db;
+  sqlite3StrAccumAppend(&txt, " (", 2);
+  for(i=0; i<nEq; i++){
+    explainAppendTerm(&txt, i, aCol[aiColumn[i]].zName, "=");
+  }
+
+  j = i;
+  if( pPlan->wsFlags&WHERE_BTM_LIMIT ){
+    explainAppendTerm(&txt, i++, aCol[aiColumn[j]].zName, ">");
+  }
+  if( pPlan->wsFlags&WHERE_TOP_LIMIT ){
+    explainAppendTerm(&txt, i, aCol[aiColumn[j]].zName, "<");
+  }
+  sqlite3StrAccumAppend(&txt, ")", 1);
+  return sqlite3StrAccumFinish(&txt);
+}
+
+/*
+** This function is a no-op unless currently processing an EXPLAIN QUERY PLAN
+** command. If the query being compiled is an EXPLAIN QUERY PLAN, a single
+** record is added to the output to describe the table scan strategy in 
+** pLevel.
+*/
+static void explainOneScan(
+  Parse *pParse,                  /* Parse context */
+  SrcList *pTabList,              /* Table list this loop refers to */
+  WhereLevel *pLevel,             /* Scan to write OP_Explain opcode for */
+  int iLevel,                     /* Value for "level" column of output */
+  int iFrom,                      /* Value for "from" column of output */
+  u16 wctrlFlags                  /* Flags passed to sqlite3WhereBegin() */
+){
+  if( pParse->explain==2 ){
+    u32 flags = pLevel->plan.wsFlags;
+    struct SrcList_item *pItem = &pTabList->a[pLevel->iFrom];
+    Vdbe *v = pParse->pVdbe;      /* VM being constructed */
+    sqlite3 *db = pParse->db;     /* Database handle */
+    char *zMsg;                   /* Text to add to EQP output */
+    sqlite3_int64 nRow;           /* Expected number of rows visited by scan */
+    int iId = pParse->iSelectId;  /* Select id (left-most output column) */
+    int isSearch;                 /* True for a SEARCH. False for SCAN. */
+
+    if( (flags&WHERE_MULTI_OR) || (wctrlFlags&WHERE_ONETABLE_ONLY) ) return;
+
+    isSearch = (pLevel->plan.nEq>0)
+             || (flags&(WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))!=0
+             || (wctrlFlags&(WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX));
+
+    zMsg = sqlite3MPrintf(db, "%s", isSearch?"SEARCH":"SCAN");
+    if( pItem->pSelect ){
+      zMsg = sqlite3MAppendf(db, zMsg, "%s SUBQUERY %d", zMsg,pItem->iSelectId);
+    }else{
+      zMsg = sqlite3MAppendf(db, zMsg, "%s TABLE %s", zMsg, pItem->zName);
+    }
+
+    if( pItem->zAlias ){
+      zMsg = sqlite3MAppendf(db, zMsg, "%s AS %s", zMsg, pItem->zAlias);
+    }
+    if( (flags & WHERE_INDEXED)!=0 ){
+      char *zWhere = explainIndexRange(db, pLevel, pItem->pTab);
+      zMsg = sqlite3MAppendf(db, zMsg, "%s USING %s%sINDEX%s%s%s", zMsg, 
+          ((flags & WHERE_TEMP_INDEX)?"AUTOMATIC ":""),
+          ((flags & WHERE_IDX_ONLY)?"COVERING ":""),
+          ((flags & WHERE_TEMP_INDEX)?"":" "),
+          ((flags & WHERE_TEMP_INDEX)?"": pLevel->plan.u.pIdx->zName),
+          zWhere
+      );
+      sqlite3DbFree(db, zWhere);
+    }else if( flags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){
+      zMsg = sqlite3MAppendf(db, zMsg, "%s USING INTEGER PRIMARY KEY", zMsg);
+
+      if( flags&WHERE_ROWID_EQ ){
+        zMsg = sqlite3MAppendf(db, zMsg, "%s (rowid=?)", zMsg);
+      }else if( (flags&WHERE_BOTH_LIMIT)==WHERE_BOTH_LIMIT ){
+        zMsg = sqlite3MAppendf(db, zMsg, "%s (rowid>? AND rowid<?)", zMsg);
+      }else if( flags&WHERE_BTM_LIMIT ){
+        zMsg = sqlite3MAppendf(db, zMsg, "%s (rowid>?)", zMsg);
+      }else if( flags&WHERE_TOP_LIMIT ){
+        zMsg = sqlite3MAppendf(db, zMsg, "%s (rowid<?)", zMsg);
+      }
+    }
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+    else if( (flags & WHERE_VIRTUALTABLE)!=0 ){
+      sqlite3_index_info *pVtabIdx = pLevel->plan.u.pVtabIdx;
+      zMsg = sqlite3MAppendf(db, zMsg, "%s VIRTUAL TABLE INDEX %d:%s", zMsg,
+                  pVtabIdx->idxNum, pVtabIdx->idxStr);
+    }
+#endif
+    if( wctrlFlags&(WHERE_ORDERBY_MIN|WHERE_ORDERBY_MAX) ){
+      testcase( wctrlFlags & WHERE_ORDERBY_MIN );
+      nRow = 1;
+    }else{
+      nRow = (sqlite3_int64)pLevel->plan.nRow;
+    }
+    zMsg = sqlite3MAppendf(db, zMsg, "%s (~%lld rows)", zMsg, nRow);
+    sqlite3VdbeAddOp4(v, OP_Explain, iId, iLevel, iFrom, zMsg, P4_DYNAMIC);
+  }
+}
+#else
+# define explainOneScan(u,v,w,x,y,z)
+#endif /* SQLITE_OMIT_EXPLAIN */
+
+
+/*
+** Generate code for the start of the iLevel-th loop in the WHERE clause
+** implementation described by pWInfo.
+*/
+static Bitmask codeOneLoopStart(
+  WhereInfo *pWInfo,   /* Complete information about the WHERE clause */
+  int iLevel,          /* Which level of pWInfo->a[] should be coded */
+  u16 wctrlFlags,      /* One of the WHERE_* flags defined in sqliteInt.h */
+  Bitmask notReady     /* Which tables are currently available */
+){
+  int j, k;            /* Loop counters */
+  int iCur;            /* The VDBE cursor for the table */
+  int addrNxt;         /* Where to jump to continue with the next IN case */
+  int omitTable;       /* True if we use the index only */
+  int bRev;            /* True if we need to scan in reverse order */
+  WhereLevel *pLevel;  /* The where level to be coded */
+  WhereClause *pWC;    /* Decomposition of the entire WHERE clause */
+  WhereTerm *pTerm;               /* A WHERE clause term */
+  Parse *pParse;                  /* Parsing context */
+  Vdbe *v;                        /* The prepared stmt under constructions */
+  struct SrcList_item *pTabItem;  /* FROM clause term being coded */
+  int addrBrk;                    /* Jump here to break out of the loop */
+  int addrCont;                   /* Jump here to continue with next cycle */
+  int iRowidReg = 0;        /* Rowid is stored in this register, if not zero */
+  int iReleaseReg = 0;      /* Temp register to free before returning */
+
+  pParse = pWInfo->pParse;
+  v = pParse->pVdbe;
+  pWC = pWInfo->pWC;
+  pLevel = &pWInfo->a[iLevel];
+  pTabItem = &pWInfo->pTabList->a[pLevel->iFrom];
+  iCur = pTabItem->iCursor;
+  bRev = (pLevel->plan.wsFlags & WHERE_REVERSE)!=0;
+  omitTable = (pLevel->plan.wsFlags & WHERE_IDX_ONLY)!=0 
+           && (wctrlFlags & WHERE_FORCE_TABLE)==0;
+
+  /* Create labels for the "break" and "continue" instructions
+  ** for the current loop.  Jump to addrBrk to break out of a loop.
+  ** Jump to cont to go immediately to the next iteration of the
+  ** loop.
+  **
+  ** When there is an IN operator, we also have a "addrNxt" label that
+  ** means to continue with the next IN value combination.  When
+  ** there are no IN operators in the constraints, the "addrNxt" label
+  ** is the same as "addrBrk".
+  */
+  addrBrk = pLevel->addrBrk = pLevel->addrNxt = sqlite3VdbeMakeLabel(v);
+  addrCont = pLevel->addrCont = sqlite3VdbeMakeLabel(v);
+
+  /* If this is the right table of a LEFT OUTER JOIN, allocate and
+  ** initialize a memory cell that records if this table matches any
+  ** row of the left table of the join.
+  */
+  if( pLevel->iFrom>0 && (pTabItem[0].jointype & JT_LEFT)!=0 ){
+    pLevel->iLeftJoin = ++pParse->nMem;
+    sqlite3VdbeAddOp2(v, OP_Integer, 0, pLevel->iLeftJoin);
+    VdbeComment((v, "init LEFT JOIN no-match flag"));
+  }
+
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  if(  (pLevel->plan.wsFlags & WHERE_VIRTUALTABLE)!=0 ){
+    /* Case 0:  The table is a virtual-table.  Use the VFilter and VNext
+    **          to access the data.
+    */
+    int iReg;   /* P3 Value for OP_VFilter */
+    sqlite3_index_info *pVtabIdx = pLevel->plan.u.pVtabIdx;
+    int nConstraint = pVtabIdx->nConstraint;
+    struct sqlite3_index_constraint_usage *aUsage =
+                                                pVtabIdx->aConstraintUsage;
+    const struct sqlite3_index_constraint *aConstraint =
+                                                pVtabIdx->aConstraint;
+
+    sqlite3ExprCachePush(pParse);
+    iReg = sqlite3GetTempRange(pParse, nConstraint+2);
+    for(j=1; j<=nConstraint; j++){
+      for(k=0; k<nConstraint; k++){
+        if( aUsage[k].argvIndex==j ){
+          int iTerm = aConstraint[k].iTermOffset;
+          sqlite3ExprCode(pParse, pWC->a[iTerm].pExpr->pRight, iReg+j+1);
+          break;
+        }
+      }
+      if( k==nConstraint ) break;
+    }
+    sqlite3VdbeAddOp2(v, OP_Integer, pVtabIdx->idxNum, iReg);
+    sqlite3VdbeAddOp2(v, OP_Integer, j-1, iReg+1);
+    sqlite3VdbeAddOp4(v, OP_VFilter, iCur, addrBrk, iReg, pVtabIdx->idxStr,
+                      pVtabIdx->needToFreeIdxStr ? P4_MPRINTF : P4_STATIC);
+    pVtabIdx->needToFreeIdxStr = 0;
+    for(j=0; j<nConstraint; j++){
+      if( aUsage[j].omit ){
+        int iTerm = aConstraint[j].iTermOffset;
+        disableTerm(pLevel, &pWC->a[iTerm]);
+      }
+    }
+    pLevel->op = OP_VNext;
+    pLevel->p1 = iCur;
+    pLevel->p2 = sqlite3VdbeCurrentAddr(v);
+    sqlite3ReleaseTempRange(pParse, iReg, nConstraint+2);
+    sqlite3ExprCachePop(pParse, 1);
+  }else
+#endif /* SQLITE_OMIT_VIRTUALTABLE */
+
+  if( pLevel->plan.wsFlags & WHERE_ROWID_EQ ){
+    /* Case 1:  We can directly reference a single row using an
+    **          equality comparison against the ROWID field.  Or
+    **          we reference multiple rows using a "rowid IN (...)"
+    **          construct.
+    */
+    iReleaseReg = sqlite3GetTempReg(pParse);
+    pTerm = findTerm(pWC, iCur, -1, notReady, WO_EQ|WO_IN, 0);
+    assert( pTerm!=0 );
+    assert( pTerm->pExpr!=0 );
+    assert( pTerm->leftCursor==iCur );
+    assert( omitTable==0 );
+    testcase( pTerm->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
+    iRowidReg = codeEqualityTerm(pParse, pTerm, pLevel, iReleaseReg);
+    addrNxt = pLevel->addrNxt;
+    sqlite3VdbeAddOp2(v, OP_MustBeInt, iRowidReg, addrNxt);
+    sqlite3VdbeAddOp3(v, OP_NotExists, iCur, addrNxt, iRowidReg);
+    sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
+    VdbeComment((v, "pk"));
+    pLevel->op = OP_Noop;
+  }else if( pLevel->plan.wsFlags & WHERE_ROWID_RANGE ){
+    /* Case 2:  We have an inequality comparison against the ROWID field.
+    */
+    int testOp = OP_Noop;
+    int start;
+    int memEndValue = 0;
+    WhereTerm *pStart, *pEnd;
+
+    assert( omitTable==0 );
+    pStart = findTerm(pWC, iCur, -1, notReady, WO_GT|WO_GE, 0);
+    pEnd = findTerm(pWC, iCur, -1, notReady, WO_LT|WO_LE, 0);
+    if( bRev ){
+      pTerm = pStart;
+      pStart = pEnd;
+      pEnd = pTerm;
+    }
+    if( pStart ){
+      Expr *pX;             /* The expression that defines the start bound */
+      int r1, rTemp;        /* Registers for holding the start boundary */
+
+      /* The following constant maps TK_xx codes into corresponding 
+      ** seek opcodes.  It depends on a particular ordering of TK_xx
+      */
+      const u8 aMoveOp[] = {
+           /* TK_GT */  OP_SeekGt,
+           /* TK_LE */  OP_SeekLe,
+           /* TK_LT */  OP_SeekLt,
+           /* TK_GE */  OP_SeekGe
+      };
+      assert( TK_LE==TK_GT+1 );      /* Make sure the ordering.. */
+      assert( TK_LT==TK_GT+2 );      /*  ... of the TK_xx values... */
+      assert( TK_GE==TK_GT+3 );      /*  ... is correcct. */
+
+      testcase( pStart->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
+      pX = pStart->pExpr;
+      assert( pX!=0 );
+      assert( pStart->leftCursor==iCur );
+      r1 = sqlite3ExprCodeTemp(pParse, pX->pRight, &rTemp);
+      sqlite3VdbeAddOp3(v, aMoveOp[pX->op-TK_GT], iCur, addrBrk, r1);
+      VdbeComment((v, "pk"));
+      sqlite3ExprCacheAffinityChange(pParse, r1, 1);
+      sqlite3ReleaseTempReg(pParse, rTemp);
+      disableTerm(pLevel, pStart);
+    }else{
+      sqlite3VdbeAddOp2(v, bRev ? OP_Last : OP_Rewind, iCur, addrBrk);
+    }
+    if( pEnd ){
+      Expr *pX;
+      pX = pEnd->pExpr;
+      assert( pX!=0 );
+      assert( pEnd->leftCursor==iCur );
+      testcase( pEnd->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
+      memEndValue = ++pParse->nMem;
+      sqlite3ExprCode(pParse, pX->pRight, memEndValue);
+      if( pX->op==TK_LT || pX->op==TK_GT ){
+        testOp = bRev ? OP_Le : OP_Ge;
+      }else{
+        testOp = bRev ? OP_Lt : OP_Gt;
+      }
+      disableTerm(pLevel, pEnd);
+    }
+    start = sqlite3VdbeCurrentAddr(v);
+    pLevel->op = bRev ? OP_Prev : OP_Next;
+    pLevel->p1 = iCur;
+    pLevel->p2 = start;
+    if( pStart==0 && pEnd==0 ){
+      pLevel->p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;
+    }else{
+      assert( pLevel->p5==0 );
+    }
+    if( testOp!=OP_Noop ){
+      iRowidReg = iReleaseReg = sqlite3GetTempReg(pParse);
+      sqlite3VdbeAddOp2(v, OP_Rowid, iCur, iRowidReg);
+      sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
+      sqlite3VdbeAddOp3(v, testOp, memEndValue, addrBrk, iRowidReg);
+      sqlite3VdbeChangeP5(v, SQLITE_AFF_NUMERIC | SQLITE_JUMPIFNULL);
+    }
+  }else if( pLevel->plan.wsFlags & (WHERE_COLUMN_RANGE|WHERE_COLUMN_EQ) ){
+    /* Case 3: A scan using an index.
+    **
+    **         The WHERE clause may contain zero or more equality 
+    **         terms ("==" or "IN" operators) that refer to the N
+    **         left-most columns of the index. It may also contain
+    **         inequality constraints (>, <, >= or <=) on the indexed
+    **         column that immediately follows the N equalities. Only 
+    **         the right-most column can be an inequality - the rest must
+    **         use the "==" and "IN" operators. For example, if the 
+    **         index is on (x,y,z), then the following clauses are all 
+    **         optimized:
+    **
+    **            x=5
+    **            x=5 AND y=10
+    **            x=5 AND y<10
+    **            x=5 AND y>5 AND y<10
+    **            x=5 AND y=5 AND z<=10
+    **
+    **         The z<10 term of the following cannot be used, only
+    **         the x=5 term:
+    **
+    **            x=5 AND z<10
+    **
+    **         N may be zero if there are inequality constraints.
+    **         If there are no inequality constraints, then N is at
+    **         least one.
+    **
+    **         This case is also used when there are no WHERE clause
+    **         constraints but an index is selected anyway, in order
+    **         to force the output order to conform to an ORDER BY.
+    */  
+    static const u8 aStartOp[] = {
+      0,
+      0,
+      OP_Rewind,           /* 2: (!start_constraints && startEq &&  !bRev) */
+      OP_Last,             /* 3: (!start_constraints && startEq &&   bRev) */
+      OP_SeekGt,           /* 4: (start_constraints  && !startEq && !bRev) */
+      OP_SeekLt,           /* 5: (start_constraints  && !startEq &&  bRev) */
+      OP_SeekGe,           /* 6: (start_constraints  &&  startEq && !bRev) */
+      OP_SeekLe            /* 7: (start_constraints  &&  startEq &&  bRev) */
+    };
+    static const u8 aEndOp[] = {
+      OP_Noop,             /* 0: (!end_constraints) */
+      OP_IdxGE,            /* 1: (end_constraints && !bRev) */
+      OP_IdxLT             /* 2: (end_constraints && bRev) */
+    };
+    int nEq = pLevel->plan.nEq;  /* Number of == or IN terms */
+    int isMinQuery = 0;          /* If this is an optimized SELECT min(x).. */
+    int regBase;                 /* Base register holding constraint values */
+    int r1;                      /* Temp register */
+    WhereTerm *pRangeStart = 0;  /* Inequality constraint at range start */
+    WhereTerm *pRangeEnd = 0;    /* Inequality constraint at range end */
+    int startEq;                 /* True if range start uses ==, >= or <= */
+    int endEq;                   /* True if range end uses ==, >= or <= */
+    int start_constraints;       /* Start of range is constrained */
+    int nConstraint;             /* Number of constraint terms */
+    Index *pIdx;                 /* The index we will be using */
+    int iIdxCur;                 /* The VDBE cursor for the index */
+    int nExtraReg = 0;           /* Number of extra registers needed */
+    int op;                      /* Instruction opcode */
+    char *zStartAff;             /* Affinity for start of range constraint */
+    char *zEndAff;               /* Affinity for end of range constraint */
+
+    pIdx = pLevel->plan.u.pIdx;
+    iIdxCur = pLevel->iIdxCur;
+    k = pIdx->aiColumn[nEq];     /* Column for inequality constraints */
+
+    /* If this loop satisfies a sort order (pOrderBy) request that 
+    ** was passed to this function to implement a "SELECT min(x) ..." 
+    ** query, then the caller will only allow the loop to run for
+    ** a single iteration. This means that the first row returned
+    ** should not have a NULL value stored in 'x'. If column 'x' is
+    ** the first one after the nEq equality constraints in the index,
+    ** this requires some special handling.
+    */
+    if( (wctrlFlags&WHERE_ORDERBY_MIN)!=0
+     && (pLevel->plan.wsFlags&WHERE_ORDERBY)
+     && (pIdx->nColumn>nEq)
+    ){
+      /* assert( pOrderBy->nExpr==1 ); */
+      /* assert( pOrderBy->a[0].pExpr->iColumn==pIdx->aiColumn[nEq] ); */
+      isMinQuery = 1;
+      nExtraReg = 1;
+    }
+
+    /* Find any inequality constraint terms for the start and end 
+    ** of the range. 
+    */
+    if( pLevel->plan.wsFlags & WHERE_TOP_LIMIT ){
+      pRangeEnd = findTerm(pWC, iCur, k, notReady, (WO_LT|WO_LE), pIdx);
+      nExtraReg = 1;
+    }
+    if( pLevel->plan.wsFlags & WHERE_BTM_LIMIT ){
+      pRangeStart = findTerm(pWC, iCur, k, notReady, (WO_GT|WO_GE), pIdx);
+      nExtraReg = 1;
+    }
+
+    /* Generate code to evaluate all constraint terms using == or IN
+    ** and store the values of those terms in an array of registers
+    ** starting at regBase.
+    */
+    regBase = codeAllEqualityTerms(
+        pParse, pLevel, pWC, notReady, nExtraReg, &zStartAff
+    );
+    zEndAff = sqlite3DbStrDup(pParse->db, zStartAff);
+    addrNxt = pLevel->addrNxt;
+
+    /* If we are doing a reverse order scan on an ascending index, or
+    ** a forward order scan on a descending index, interchange the 
+    ** start and end terms (pRangeStart and pRangeEnd).
+    */
+    if( nEq<pIdx->nColumn && bRev==(pIdx->aSortOrder[nEq]==SQLITE_SO_ASC) ){
+      SWAP(WhereTerm *, pRangeEnd, pRangeStart);
+    }
+
+    testcase( pRangeStart && pRangeStart->eOperator & WO_LE );
+    testcase( pRangeStart && pRangeStart->eOperator & WO_GE );
+    testcase( pRangeEnd && pRangeEnd->eOperator & WO_LE );
+    testcase( pRangeEnd && pRangeEnd->eOperator & WO_GE );
+    startEq = !pRangeStart || pRangeStart->eOperator & (WO_LE|WO_GE);
+    endEq =   !pRangeEnd || pRangeEnd->eOperator & (WO_LE|WO_GE);
+    start_constraints = pRangeStart || nEq>0;
+
+    /* Seek the index cursor to the start of the range. */
+    nConstraint = nEq;
+    if( pRangeStart ){
+      Expr *pRight = pRangeStart->pExpr->pRight;
+      sqlite3ExprCode(pParse, pRight, regBase+nEq);
+      if( (pRangeStart->wtFlags & TERM_VNULL)==0 ){
+        sqlite3ExprCodeIsNullJump(v, pRight, regBase+nEq, addrNxt);
+      }
+      if( zStartAff ){
+        if( sqlite3CompareAffinity(pRight, zStartAff[nEq])==SQLITE_AFF_NONE){
+          /* Since the comparison is to be performed with no conversions
+          ** applied to the operands, set the affinity to apply to pRight to 
+          ** SQLITE_AFF_NONE.  */
+          zStartAff[nEq] = SQLITE_AFF_NONE;
+        }
+        if( sqlite3ExprNeedsNoAffinityChange(pRight, zStartAff[nEq]) ){
+          zStartAff[nEq] = SQLITE_AFF_NONE;
+        }
+      }  
+      nConstraint++;
+      testcase( pRangeStart->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
+    }else if( isMinQuery ){
+      sqlite3VdbeAddOp2(v, OP_Null, 0, regBase+nEq);
+      nConstraint++;
+      startEq = 0;
+      start_constraints = 1;
+    }
+    codeApplyAffinity(pParse, regBase, nConstraint, zStartAff);
+    op = aStartOp[(start_constraints<<2) + (startEq<<1) + bRev];
+    assert( op!=0 );
+    testcase( op==OP_Rewind );
+    testcase( op==OP_Last );
+    testcase( op==OP_SeekGt );
+    testcase( op==OP_SeekGe );
+    testcase( op==OP_SeekLe );
+    testcase( op==OP_SeekLt );
+    sqlite3VdbeAddOp4Int(v, op, iIdxCur, addrNxt, regBase, nConstraint);
+
+    /* Load the value for the inequality constraint at the end of the
+    ** range (if any).
+    */
+    nConstraint = nEq;
+    if( pRangeEnd ){
+      Expr *pRight = pRangeEnd->pExpr->pRight;
+      sqlite3ExprCacheRemove(pParse, regBase+nEq, 1);
+      sqlite3ExprCode(pParse, pRight, regBase+nEq);
+      if( (pRangeEnd->wtFlags & TERM_VNULL)==0 ){
+        sqlite3ExprCodeIsNullJump(v, pRight, regBase+nEq, addrNxt);
+      }
+      if( zEndAff ){
+        if( sqlite3CompareAffinity(pRight, zEndAff[nEq])==SQLITE_AFF_NONE){
+          /* Since the comparison is to be performed with no conversions
+          ** applied to the operands, set the affinity to apply to pRight to 
+          ** SQLITE_AFF_NONE.  */
+          zEndAff[nEq] = SQLITE_AFF_NONE;
+        }
+        if( sqlite3ExprNeedsNoAffinityChange(pRight, zEndAff[nEq]) ){
+          zEndAff[nEq] = SQLITE_AFF_NONE;
+        }
+      }  
+      codeApplyAffinity(pParse, regBase, nEq+1, zEndAff);
+      nConstraint++;
+      testcase( pRangeEnd->wtFlags & TERM_VIRTUAL ); /* EV: R-30575-11662 */
+    }
+    sqlite3DbFree(pParse->db, zStartAff);
+    sqlite3DbFree(pParse->db, zEndAff);
+
+    /* Top of the loop body */
+    pLevel->p2 = sqlite3VdbeCurrentAddr(v);
+
+    /* Check if the index cursor is past the end of the range. */
+    op = aEndOp[(pRangeEnd || nEq) * (1 + bRev)];
+    testcase( op==OP_Noop );
+    testcase( op==OP_IdxGE );
+    testcase( op==OP_IdxLT );
+    if( op!=OP_Noop ){
+      sqlite3VdbeAddOp4Int(v, op, iIdxCur, addrNxt, regBase, nConstraint);
+      sqlite3VdbeChangeP5(v, endEq!=bRev ?1:0);
+    }
+
+    /* If there are inequality constraints, check that the value
+    ** of the table column that the inequality contrains is not NULL.
+    ** If it is, jump to the next iteration of the loop.
+    */
+    r1 = sqlite3GetTempReg(pParse);
+    testcase( pLevel->plan.wsFlags & WHERE_BTM_LIMIT );
+    testcase( pLevel->plan.wsFlags & WHERE_TOP_LIMIT );
+    if( (pLevel->plan.wsFlags & (WHERE_BTM_LIMIT|WHERE_TOP_LIMIT))!=0 ){
+      sqlite3VdbeAddOp3(v, OP_Column, iIdxCur, nEq, r1);
+      sqlite3VdbeAddOp2(v, OP_IsNull, r1, addrCont);
+    }
+    sqlite3ReleaseTempReg(pParse, r1);
+
+    /* Seek the table cursor, if required */
+    disableTerm(pLevel, pRangeStart);
+    disableTerm(pLevel, pRangeEnd);
+    if( !omitTable ){
+      iRowidReg = iReleaseReg = sqlite3GetTempReg(pParse);
+      sqlite3VdbeAddOp2(v, OP_IdxRowid, iIdxCur, iRowidReg);
+      sqlite3ExprCacheStore(pParse, iCur, -1, iRowidReg);
+      sqlite3VdbeAddOp2(v, OP_Seek, iCur, iRowidReg);  /* Deferred seek */
+    }
+
+    /* Record the instruction used to terminate the loop. Disable 
+    ** WHERE clause terms made redundant by the index range scan.
+    */
+    if( pLevel->plan.wsFlags & WHERE_UNIQUE ){
+      pLevel->op = OP_Noop;
+    }else if( bRev ){
+      pLevel->op = OP_Prev;
+    }else{
+      pLevel->op = OP_Next;
+    }
+    pLevel->p1 = iIdxCur;
+  }else
+
+#ifndef SQLITE_OMIT_OR_OPTIMIZATION
+  if( pLevel->plan.wsFlags & WHERE_MULTI_OR ){
+    /* Case 4:  Two or more separately indexed terms connected by OR
+    **
+    ** Example:
+    **
+    **   CREATE TABLE t1(a,b,c,d);
+    **   CREATE INDEX i1 ON t1(a);
+    **   CREATE INDEX i2 ON t1(b);
+    **   CREATE INDEX i3 ON t1(c);
+    **
+    **   SELECT * FROM t1 WHERE a=5 OR b=7 OR (c=11 AND d=13)
+    **
+    ** In the example, there are three indexed terms connected by OR.
+    ** The top of the loop looks like this:
+    **
+    **          Null       1                # Zero the rowset in reg 1
+    **
+    ** Then, for each indexed term, the following. The arguments to
+    ** RowSetTest are such that the rowid of the current row is inserted
+    ** into the RowSet. If it is already present, control skips the
+    ** Gosub opcode and jumps straight to the code generated by WhereEnd().
+    **
+    **        sqlite3WhereBegin(<term>)
+    **          RowSetTest                  # Insert rowid into rowset
+    **          Gosub      2 A
+    **        sqlite3WhereEnd()
+    **
+    ** Following the above, code to terminate the loop. Label A, the target
+    ** of the Gosub above, jumps to the instruction right after the Goto.
+    **
+    **          Null       1                # Zero the rowset in reg 1
+    **          Goto       B                # The loop is finished.
+    **
+    **       A: <loop body>                 # Return data, whatever.
+    **
+    **          Return     2                # Jump back to the Gosub
+    **
+    **       B: <after the loop>
+    **
+    */
+    WhereClause *pOrWc;    /* The OR-clause broken out into subterms */
+    SrcList *pOrTab;       /* Shortened table list or OR-clause generation */
+
+    int regReturn = ++pParse->nMem;           /* Register used with OP_Gosub */
+    int regRowset = 0;                        /* Register for RowSet object */
+    int regRowid = 0;                         /* Register holding rowid */
+    int iLoopBody = sqlite3VdbeMakeLabel(v);  /* Start of loop body */
+    int iRetInit;                             /* Address of regReturn init */
+    int untestedTerms = 0;             /* Some terms not completely tested */
+    int ii;
+   
+    pTerm = pLevel->plan.u.pTerm;
+    assert( pTerm!=0 );
+    assert( pTerm->eOperator==WO_OR );
+    assert( (pTerm->wtFlags & TERM_ORINFO)!=0 );
+    pOrWc = &pTerm->u.pOrInfo->wc;
+    pLevel->op = OP_Return;
+    pLevel->p1 = regReturn;
+
+    /* Set up a new SrcList ni pOrTab containing the table being scanned
+    ** by this loop in the a[0] slot and all notReady tables in a[1..] slots.
+    ** This becomes the SrcList in the recursive call to sqlite3WhereBegin().
+    */
+    if( pWInfo->nLevel>1 ){
+      int nNotReady;                 /* The number of notReady tables */
+      struct SrcList_item *origSrc;     /* Original list of tables */
+      nNotReady = pWInfo->nLevel - iLevel - 1;
+      pOrTab = sqlite3StackAllocRaw(pParse->db,
+                            sizeof(*pOrTab)+ nNotReady*sizeof(pOrTab->a[0]));
+      if( pOrTab==0 ) return notReady;
+      pOrTab->nAlloc = (i16)(nNotReady + 1);
+      pOrTab->nSrc = pOrTab->nAlloc;
+      memcpy(pOrTab->a, pTabItem, sizeof(*pTabItem));
+      origSrc = pWInfo->pTabList->a;
+      for(k=1; k<=nNotReady; k++){
+        memcpy(&pOrTab->a[k], &origSrc[pLevel[k].iFrom], sizeof(pOrTab->a[k]));
+      }
+    }else{
+      pOrTab = pWInfo->pTabList;
+    }
+
+    /* Initialize the rowset register to contain NULL. An SQL NULL is 
+    ** equivalent to an empty rowset.
+    **
+    ** Also initialize regReturn to contain the address of the instruction 
+    ** immediately following the OP_Return at the bottom of the loop. This
+    ** is required in a few obscure LEFT JOIN cases where control jumps
+    ** over the top of the loop into the body of it. In this case the 
+    ** correct response for the end-of-loop code (the OP_Return) is to 
+    ** fall through to the next instruction, just as an OP_Next does if
+    ** called on an uninitialized cursor.
+    */
+    if( (wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
+      regRowset = ++pParse->nMem;
+      regRowid = ++pParse->nMem;
+      sqlite3VdbeAddOp2(v, OP_Null, 0, regRowset);
+    }
+    iRetInit = sqlite3VdbeAddOp2(v, OP_Integer, 0, regReturn);
+
+    for(ii=0; ii<pOrWc->nTerm; ii++){
+      WhereTerm *pOrTerm = &pOrWc->a[ii];
+      if( pOrTerm->leftCursor==iCur || pOrTerm->eOperator==WO_AND ){
+        WhereInfo *pSubWInfo;          /* Info for single OR-term scan */
+        /* Loop through table entries that match term pOrTerm. */
+        pSubWInfo = sqlite3WhereBegin(pParse, pOrTab, pOrTerm->pExpr, 0,
+                        WHERE_OMIT_OPEN | WHERE_OMIT_CLOSE |
+                        WHERE_FORCE_TABLE | WHERE_ONETABLE_ONLY);
+        if( pSubWInfo ){
+          explainOneScan(
+              pParse, pOrTab, &pSubWInfo->a[0], iLevel, pLevel->iFrom, 0
+          );
+          if( (wctrlFlags & WHERE_DUPLICATES_OK)==0 ){
+            int iSet = ((ii==pOrWc->nTerm-1)?-1:ii);
+            int r;
+            r = sqlite3ExprCodeGetColumn(pParse, pTabItem->pTab, -1, iCur, 
+                                         regRowid);
+            sqlite3VdbeAddOp4Int(v, OP_RowSetTest, regRowset,
+                                 sqlite3VdbeCurrentAddr(v)+2, r, iSet);
+          }
+          sqlite3VdbeAddOp2(v, OP_Gosub, regReturn, iLoopBody);
+
+          /* The pSubWInfo->untestedTerms flag means that this OR term
+          ** contained one or more AND term from a notReady table.  The
+          ** terms from the notReady table could not be tested and will
+          ** need to be tested later.
+          */
+          if( pSubWInfo->untestedTerms ) untestedTerms = 1;
+
+          /* Finish the loop through table entries that match term pOrTerm. */
+          sqlite3WhereEnd(pSubWInfo);
+        }
+      }
+    }
+    sqlite3VdbeChangeP1(v, iRetInit, sqlite3VdbeCurrentAddr(v));
+    sqlite3VdbeAddOp2(v, OP_Goto, 0, pLevel->addrBrk);
+    sqlite3VdbeResolveLabel(v, iLoopBody);
+
+    if( pWInfo->nLevel>1 ) sqlite3StackFree(pParse->db, pOrTab);
+    if( !untestedTerms ) disableTerm(pLevel, pTerm);
+  }else
+#endif /* SQLITE_OMIT_OR_OPTIMIZATION */
+
+  {
+    /* Case 5:  There is no usable index.  We must do a complete
+    **          scan of the entire table.
+    */
+    static const u8 aStep[] = { OP_Next, OP_Prev };
+    static const u8 aStart[] = { OP_Rewind, OP_Last };
+    assert( bRev==0 || bRev==1 );
+    assert( omitTable==0 );
+    pLevel->op = aStep[bRev];
+    pLevel->p1 = iCur;
+    pLevel->p2 = 1 + sqlite3VdbeAddOp2(v, aStart[bRev], iCur, addrBrk);
+    pLevel->p5 = SQLITE_STMTSTATUS_FULLSCAN_STEP;
+  }
+  notReady &= ~getMask(pWC->pMaskSet, iCur);
+
+  /* Insert code to test every subexpression that can be completely
+  ** computed using the current set of tables.
+  **
+  ** IMPLEMENTATION-OF: R-49525-50935 Terms that cannot be satisfied through
+  ** the use of indices become tests that are evaluated against each row of
+  ** the relevant input tables.
+  */
+  for(pTerm=pWC->a, j=pWC->nTerm; j>0; j--, pTerm++){
+    Expr *pE;
+    testcase( pTerm->wtFlags & TERM_VIRTUAL ); /* IMP: R-30575-11662 */
+    testcase( pTerm->wtFlags & TERM_CODED );
+    if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
+    if( (pTerm->prereqAll & notReady)!=0 ){
+      testcase( pWInfo->untestedTerms==0
+               && (pWInfo->wctrlFlags & WHERE_ONETABLE_ONLY)!=0 );
+      pWInfo->untestedTerms = 1;
+      continue;
+    }
+    pE = pTerm->pExpr;
+    assert( pE!=0 );
+    if( pLevel->iLeftJoin && !ExprHasProperty(pE, EP_FromJoin) ){
+      continue;
+    }
+    sqlite3ExprIfFalse(pParse, pE, addrCont, SQLITE_JUMPIFNULL);
+    pTerm->wtFlags |= TERM_CODED;
+  }
+
+  /* For a LEFT OUTER JOIN, generate code that will record the fact that
+  ** at least one row of the right table has matched the left table.  
+  */
+  if( pLevel->iLeftJoin ){
+    pLevel->addrFirst = sqlite3VdbeCurrentAddr(v);
+    sqlite3VdbeAddOp2(v, OP_Integer, 1, pLevel->iLeftJoin);
+    VdbeComment((v, "record LEFT JOIN hit"));
+    sqlite3ExprCacheClear(pParse);
+    for(pTerm=pWC->a, j=0; j<pWC->nTerm; j++, pTerm++){
+      testcase( pTerm->wtFlags & TERM_VIRTUAL );  /* IMP: R-30575-11662 */
+      testcase( pTerm->wtFlags & TERM_CODED );
+      if( pTerm->wtFlags & (TERM_VIRTUAL|TERM_CODED) ) continue;
+      if( (pTerm->prereqAll & notReady)!=0 ){
+        assert( pWInfo->untestedTerms );
+        continue;
+      }
+      assert( pTerm->pExpr );
+      sqlite3ExprIfFalse(pParse, pTerm->pExpr, addrCont, SQLITE_JUMPIFNULL);
+      pTerm->wtFlags |= TERM_CODED;
+    }
+  }
+  sqlite3ReleaseTempReg(pParse, iReleaseReg);
+
+  return notReady;
+}
+
+#if defined(SQLITE_TEST)
+/*
+** The following variable holds a text description of query plan generated
+** by the most recent call to sqlite3WhereBegin().  Each call to WhereBegin
+** overwrites the previous.  This information is used for testing and
+** analysis only.
+*/
+SQLITE_API char sqlite3_query_plan[BMS*2*40];  /* Text of the join */
+static int nQPlan = 0;              /* Next free slow in _query_plan[] */
+
+#endif /* SQLITE_TEST */
+
+
+/*
+** Free a WhereInfo structure
+*/
+static void whereInfoFree(sqlite3 *db, WhereInfo *pWInfo){
+  if( ALWAYS(pWInfo) ){
+    int i;
+    for(i=0; i<pWInfo->nLevel; i++){
+      sqlite3_index_info *pInfo = pWInfo->a[i].pIdxInfo;
+      if( pInfo ){
+        /* assert( pInfo->needToFreeIdxStr==0 || db->mallocFailed ); */
+        if( pInfo->needToFreeIdxStr ){
+          sqlite3_free(pInfo->idxStr);
+        }
+        sqlite3DbFree(db, pInfo);
+      }
+      if( pWInfo->a[i].plan.wsFlags & WHERE_TEMP_INDEX ){
+        Index *pIdx = pWInfo->a[i].plan.u.pIdx;
+        if( pIdx ){
+          sqlite3DbFree(db, pIdx->zColAff);
+          sqlite3DbFree(db, pIdx);
+        }
+      }
+    }
+    whereClauseClear(pWInfo->pWC);
+    sqlite3DbFree(db, pWInfo);
+  }
+}
+
+
+/*
+** Generate the beginning of the loop used for WHERE clause processing.
+** The return value is a pointer to an opaque structure that contains
+** information needed to terminate the loop.  Later, the calling routine
+** should invoke sqlite3WhereEnd() with the return value of this function
+** in order to complete the WHERE clause processing.
+**
+** If an error occurs, this routine returns NULL.
+**
+** The basic idea is to do a nested loop, one loop for each table in
+** the FROM clause of a select.  (INSERT and UPDATE statements are the
+** same as a SELECT with only a single table in the FROM clause.)  For
+** example, if the SQL is this:
+**
+**       SELECT * FROM t1, t2, t3 WHERE ...;
+**
+** Then the code generated is conceptually like the following:
+**
+**      foreach row1 in t1 do       \    Code generated
+**        foreach row2 in t2 do      |-- by sqlite3WhereBegin()
+**          foreach row3 in t3 do   /
+**            ...
+**          end                     \    Code generated
+**        end                        |-- by sqlite3WhereEnd()
+**      end                         /
+**
+** Note that the loops might not be nested in the order in which they
+** appear in the FROM clause if a different order is better able to make
+** use of indices.  Note also that when the IN operator appears in
+** the WHERE clause, it might result in additional nested loops for
+** scanning through all values on the right-hand side of the IN.
+**
+** There are Btree cursors associated with each table.  t1 uses cursor
+** number pTabList->a[0].iCursor.  t2 uses the cursor pTabList->a[1].iCursor.
+** And so forth.  This routine generates code to open those VDBE cursors
+** and sqlite3WhereEnd() generates the code to close them.
+**
+** The code that sqlite3WhereBegin() generates leaves the cursors named
+** in pTabList pointing at their appropriate entries.  The [...] code
+** can use OP_Column and OP_Rowid opcodes on these cursors to extract
+** data from the various tables of the loop.
+**
+** If the WHERE clause is empty, the foreach loops must each scan their
+** entire tables.  Thus a three-way join is an O(N^3) operation.  But if
+** the tables have indices and there are terms in the WHERE clause that
+** refer to those indices, a complete table scan can be avoided and the
+** code will run much faster.  Most of the work of this routine is checking
+** to see if there are indices that can be used to speed up the loop.
+**
+** Terms of the WHERE clause are also used to limit which rows actually
+** make it to the "..." in the middle of the loop.  After each "foreach",
+** terms of the WHERE clause that use only terms in that loop and outer
+** loops are evaluated and if false a jump is made around all subsequent
+** inner loops (or around the "..." if the test occurs within the inner-
+** most loop)
+**
+** OUTER JOINS
+**
+** An outer join of tables t1 and t2 is conceptally coded as follows:
+**
+**    foreach row1 in t1 do
+**      flag = 0
+**      foreach row2 in t2 do
+**        start:
+**          ...
+**          flag = 1
+**      end
+**      if flag==0 then
+**        move the row2 cursor to a null row
+**        goto start
+**      fi
+**    end
+**
+** ORDER BY CLAUSE PROCESSING
+**
+** *ppOrderBy is a pointer to the ORDER BY clause of a SELECT statement,
+** if there is one.  If there is no ORDER BY clause or if this routine
+** is called from an UPDATE or DELETE statement, then ppOrderBy is NULL.
+**
+** If an index can be used so that the natural output order of the table
+** scan is correct for the ORDER BY clause, then that index is used and
+** *ppOrderBy is set to NULL.  This is an optimization that prevents an
+** unnecessary sort of the result set if an index appropriate for the
+** ORDER BY clause already exists.
+**
+** If the where clause loops cannot be arranged to provide the correct
+** output order, then the *ppOrderBy is unchanged.
+*/
+SQLITE_PRIVATE WhereInfo *sqlite3WhereBegin(
+  Parse *pParse,        /* The parser context */
+  SrcList *pTabList,    /* A list of all tables to be scanned */
+  Expr *pWhere,         /* The WHERE clause */
+  ExprList **ppOrderBy, /* An ORDER BY clause, or NULL */
+  u16 wctrlFlags        /* One of the WHERE_* flags defined in sqliteInt.h */
+){
+  int i;                     /* Loop counter */
+  int nByteWInfo;            /* Num. bytes allocated for WhereInfo struct */
+  int nTabList;              /* Number of elements in pTabList */
+  WhereInfo *pWInfo;         /* Will become the return value of this function */
+  Vdbe *v = pParse->pVdbe;   /* The virtual database engine */
+  Bitmask notReady;          /* Cursors that are not yet positioned */
+  WhereMaskSet *pMaskSet;    /* The expression mask set */
+  WhereClause *pWC;               /* Decomposition of the WHERE clause */
+  struct SrcList_item *pTabItem;  /* A single entry from pTabList */
+  WhereLevel *pLevel;             /* A single level in the pWInfo list */
+  int iFrom;                      /* First unused FROM clause element */
+  int andFlags;              /* AND-ed combination of all pWC->a[].wtFlags */
+  sqlite3 *db;               /* Database connection */
+
+  /* The number of tables in the FROM clause is limited by the number of
+  ** bits in a Bitmask 
+  */
+  testcase( pTabList->nSrc==BMS );
+  if( pTabList->nSrc>BMS ){
+    sqlite3ErrorMsg(pParse, "at most %d tables in a join", BMS);
+    return 0;
+  }
+
+  /* This function normally generates a nested loop for all tables in 
+  ** pTabList.  But if the WHERE_ONETABLE_ONLY flag is set, then we should
+  ** only generate code for the first table in pTabList and assume that
+  ** any cursors associated with subsequent tables are uninitialized.
+  */
+  nTabList = (wctrlFlags & WHERE_ONETABLE_ONLY) ? 1 : pTabList->nSrc;
+
+  /* Allocate and initialize the WhereInfo structure that will become the
+  ** return value. A single allocation is used to store the WhereInfo
+  ** struct, the contents of WhereInfo.a[], the WhereClause structure
+  ** and the WhereMaskSet structure. Since WhereClause contains an 8-byte
+  ** field (type Bitmask) it must be aligned on an 8-byte boundary on
+  ** some architectures. Hence the ROUND8() below.
+  */
+  db = pParse->db;
+  nByteWInfo = ROUND8(sizeof(WhereInfo)+(nTabList-1)*sizeof(WhereLevel));
+  pWInfo = sqlite3DbMallocZero(db, 
+      nByteWInfo + 
+      sizeof(WhereClause) +
+      sizeof(WhereMaskSet)
+  );
+  if( db->mallocFailed ){
+    sqlite3DbFree(db, pWInfo);
+    pWInfo = 0;
+    goto whereBeginError;
+  }
+  pWInfo->nLevel = nTabList;
+  pWInfo->pParse = pParse;
+  pWInfo->pTabList = pTabList;
+  pWInfo->iBreak = sqlite3VdbeMakeLabel(v);
+  pWInfo->pWC = pWC = (WhereClause *)&((u8 *)pWInfo)[nByteWInfo];
+  pWInfo->wctrlFlags = wctrlFlags;
+  pWInfo->savedNQueryLoop = pParse->nQueryLoop;
+  pMaskSet = (WhereMaskSet*)&pWC[1];
+
+  /* Split the WHERE clause into separate subexpressions where each
+  ** subexpression is separated by an AND operator.
+  */
+  initMaskSet(pMaskSet);
+  whereClauseInit(pWC, pParse, pMaskSet);
+  sqlite3ExprCodeConstants(pParse, pWhere);
+  whereSplit(pWC, pWhere, TK_AND);   /* IMP: R-15842-53296 */
+    
+  /* Special case: a WHERE clause that is constant.  Evaluate the
+  ** expression and either jump over all of the code or fall thru.
+  */
+  if( pWhere && (nTabList==0 || sqlite3ExprIsConstantNotJoin(pWhere)) ){
+    sqlite3ExprIfFalse(pParse, pWhere, pWInfo->iBreak, SQLITE_JUMPIFNULL);
+    pWhere = 0;
+  }
+
+  /* Assign a bit from the bitmask to every term in the FROM clause.
+  **
+  ** When assigning bitmask values to FROM clause cursors, it must be
+  ** the case that if X is the bitmask for the N-th FROM clause term then
+  ** the bitmask for all FROM clause terms to the left of the N-th term
+  ** is (X-1).   An expression from the ON clause of a LEFT JOIN can use
+  ** its Expr.iRightJoinTable value to find the bitmask of the right table
+  ** of the join.  Subtracting one from the right table bitmask gives a
+  ** bitmask for all tables to the left of the join.  Knowing the bitmask
+  ** for all tables to the left of a left join is important.  Ticket #3015.
+  **
+  ** Configure the WhereClause.vmask variable so that bits that correspond
+  ** to virtual table cursors are set. This is used to selectively disable 
+  ** the OR-to-IN transformation in exprAnalyzeOrTerm(). It is not helpful 
+  ** with virtual tables.
+  **
+  ** Note that bitmasks are created for all pTabList->nSrc tables in
+  ** pTabList, not just the first nTabList tables.  nTabList is normally
+  ** equal to pTabList->nSrc but might be shortened to 1 if the
+  ** WHERE_ONETABLE_ONLY flag is set.
+  */
+  assert( pWC->vmask==0 && pMaskSet->n==0 );
+  for(i=0; i<pTabList->nSrc; i++){
+    createMask(pMaskSet, pTabList->a[i].iCursor);
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+    if( ALWAYS(pTabList->a[i].pTab) && IsVirtual(pTabList->a[i].pTab) ){
+      pWC->vmask |= ((Bitmask)1 << i);
+    }
+#endif
+  }
+#ifndef NDEBUG
+  {
+    Bitmask toTheLeft = 0;
+    for(i=0; i<pTabList->nSrc; i++){
+      Bitmask m = getMask(pMaskSet, pTabList->a[i].iCursor);
+      assert( (m-1)==toTheLeft );
+      toTheLeft |= m;
+    }
+  }
+#endif
+
+  /* Analyze all of the subexpressions.  Note that exprAnalyze() might
+  ** add new virtual terms onto the end of the WHERE clause.  We do not
+  ** want to analyze these virtual terms, so start analyzing at the end
+  ** and work forward so that the added virtual terms are never processed.
+  */
+  exprAnalyzeAll(pTabList, pWC);
+  if( db->mallocFailed ){
+    goto whereBeginError;
+  }
+
+  /* Chose the best index to use for each table in the FROM clause.
+  **
+  ** This loop fills in the following fields:
+  **
+  **   pWInfo->a[].pIdx      The index to use for this level of the loop.
+  **   pWInfo->a[].wsFlags   WHERE_xxx flags associated with pIdx
+  **   pWInfo->a[].nEq       The number of == and IN constraints
+  **   pWInfo->a[].iFrom     Which term of the FROM clause is being coded
+  **   pWInfo->a[].iTabCur   The VDBE cursor for the database table
+  **   pWInfo->a[].iIdxCur   The VDBE cursor for the index
+  **   pWInfo->a[].pTerm     When wsFlags==WO_OR, the OR-clause term
+  **
+  ** This loop also figures out the nesting order of tables in the FROM
+  ** clause.
+  */
+  notReady = ~(Bitmask)0;
+  andFlags = ~0;
+  WHERETRACE(("*** Optimizer Start ***\n"));
+  for(i=iFrom=0, pLevel=pWInfo->a; i<nTabList; i++, pLevel++){
+    WhereCost bestPlan;         /* Most efficient plan seen so far */
+    Index *pIdx;                /* Index for FROM table at pTabItem */
+    int j;                      /* For looping over FROM tables */
+    int bestJ = -1;             /* The value of j */
+    Bitmask m;                  /* Bitmask value for j or bestJ */
+    int isOptimal;              /* Iterator for optimal/non-optimal search */
+    int nUnconstrained;         /* Number tables without INDEXED BY */
+    Bitmask notIndexed;         /* Mask of tables that cannot use an index */
+
+    memset(&bestPlan, 0, sizeof(bestPlan));
+    bestPlan.rCost = SQLITE_BIG_DBL;
+    WHERETRACE(("*** Begin search for loop %d ***\n", i));
+
+    /* Loop through the remaining entries in the FROM clause to find the
+    ** next nested loop. The loop tests all FROM clause entries
+    ** either once or twice. 
+    **
+    ** The first test is always performed if there are two or more entries
+    ** remaining and never performed if there is only one FROM clause entry
+    ** to choose from.  The first test looks for an "optimal" scan.  In
+    ** this context an optimal scan is one that uses the same strategy
+    ** for the given FROM clause entry as would be selected if the entry
+    ** were used as the innermost nested loop.  In other words, a table
+    ** is chosen such that the cost of running that table cannot be reduced
+    ** by waiting for other tables to run first.  This "optimal" test works
+    ** by first assuming that the FROM clause is on the inner loop and finding
+    ** its query plan, then checking to see if that query plan uses any
+    ** other FROM clause terms that are notReady.  If no notReady terms are
+    ** used then the "optimal" query plan works.
+    **
+    ** Note that the WhereCost.nRow parameter for an optimal scan might
+    ** not be as small as it would be if the table really were the innermost
+    ** join.  The nRow value can be reduced by WHERE clause constraints
+    ** that do not use indices.  But this nRow reduction only happens if the
+    ** table really is the innermost join.  
+    **
+    ** The second loop iteration is only performed if no optimal scan
+    ** strategies were found by the first iteration. This second iteration
+    ** is used to search for the lowest cost scan overall.
+    **
+    ** Previous versions of SQLite performed only the second iteration -
+    ** the next outermost loop was always that with the lowest overall
+    ** cost. However, this meant that SQLite could select the wrong plan
+    ** for scripts such as the following:
+    **   
+    **   CREATE TABLE t1(a, b); 
+    **   CREATE TABLE t2(c, d);
+    **   SELECT * FROM t2, t1 WHERE t2.rowid = t1.a;
+    **
+    ** The best strategy is to iterate through table t1 first. However it
+    ** is not possible to determine this with a simple greedy algorithm.
+    ** Since the cost of a linear scan through table t2 is the same 
+    ** as the cost of a linear scan through table t1, a simple greedy 
+    ** algorithm may choose to use t2 for the outer loop, which is a much
+    ** costlier approach.
+    */
+    nUnconstrained = 0;
+    notIndexed = 0;
+    for(isOptimal=(iFrom<nTabList-1); isOptimal>=0 && bestJ<0; isOptimal--){
+      Bitmask mask;             /* Mask of tables not yet ready */
+      for(j=iFrom, pTabItem=&pTabList->a[j]; j<nTabList; j++, pTabItem++){
+        int doNotReorder;    /* True if this table should not be reordered */
+        WhereCost sCost;     /* Cost information from best[Virtual]Index() */
+        ExprList *pOrderBy;  /* ORDER BY clause for index to optimize */
+  
+        doNotReorder =  (pTabItem->jointype & (JT_LEFT|JT_CROSS))!=0;
+        if( j!=iFrom && doNotReorder ) break;
+        m = getMask(pMaskSet, pTabItem->iCursor);
+        if( (m & notReady)==0 ){
+          if( j==iFrom ) iFrom++;
+          continue;
+        }
+        mask = (isOptimal ? m : notReady);
+        pOrderBy = ((i==0 && ppOrderBy )?*ppOrderBy:0);
+        if( pTabItem->pIndex==0 ) nUnconstrained++;
+  
+        WHERETRACE(("=== trying table %d with isOptimal=%d ===\n",
+                    j, isOptimal));
+        assert( pTabItem->pTab );
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+        if( IsVirtual(pTabItem->pTab) ){
+          sqlite3_index_info **pp = &pWInfo->a[j].pIdxInfo;
+          bestVirtualIndex(pParse, pWC, pTabItem, mask, notReady, pOrderBy,
+                           &sCost, pp);
+        }else 
+#endif
+        {
+          bestBtreeIndex(pParse, pWC, pTabItem, mask, notReady, pOrderBy,
+                         &sCost);
+        }
+        assert( isOptimal || (sCost.used&notReady)==0 );
+
+        /* If an INDEXED BY clause is present, then the plan must use that
+        ** index if it uses any index at all */
+        assert( pTabItem->pIndex==0 
+                  || (sCost.plan.wsFlags & WHERE_NOT_FULLSCAN)==0
+                  || sCost.plan.u.pIdx==pTabItem->pIndex );
+
+        if( isOptimal && (sCost.plan.wsFlags & WHERE_NOT_FULLSCAN)==0 ){
+          notIndexed |= m;
+        }
+
+        /* Conditions under which this table becomes the best so far:
+        **
+        **   (1) The table must not depend on other tables that have not
+        **       yet run.
+        **
+        **   (2) A full-table-scan plan cannot supercede indexed plan unless
+        **       the full-table-scan is an "optimal" plan as defined above.
+        **
+        **   (3) All tables have an INDEXED BY clause or this table lacks an
+        **       INDEXED BY clause or this table uses the specific
+        **       index specified by its INDEXED BY clause.  This rule ensures
+        **       that a best-so-far is always selected even if an impossible
+        **       combination of INDEXED BY clauses are given.  The error
+        **       will be detected and relayed back to the application later.
+        **       The NEVER() comes about because rule (2) above prevents
+        **       An indexable full-table-scan from reaching rule (3).
+        **
+        **   (4) The plan cost must be lower than prior plans or else the
+        **       cost must be the same and the number of rows must be lower.
+        */
+        if( (sCost.used&notReady)==0                       /* (1) */
+            && (bestJ<0 || (notIndexed&m)!=0               /* (2) */
+                || (bestPlan.plan.wsFlags & WHERE_NOT_FULLSCAN)==0
+                || (sCost.plan.wsFlags & WHERE_NOT_FULLSCAN)!=0)
+            && (nUnconstrained==0 || pTabItem->pIndex==0   /* (3) */
+                || NEVER((sCost.plan.wsFlags & WHERE_NOT_FULLSCAN)!=0))
+            && (bestJ<0 || sCost.rCost<bestPlan.rCost      /* (4) */
+                || (sCost.rCost<=bestPlan.rCost 
+                 && sCost.plan.nRow<bestPlan.plan.nRow))
+        ){
+          WHERETRACE(("=== table %d is best so far"
+                      " with cost=%g and nRow=%g\n",
+                      j, sCost.rCost, sCost.plan.nRow));
+          bestPlan = sCost;
+          bestJ = j;
+        }
+        if( doNotReorder ) break;
+      }
+    }
+    assert( bestJ>=0 );
+    assert( notReady & getMask(pMaskSet, pTabList->a[bestJ].iCursor) );
+    WHERETRACE(("*** Optimizer selects table %d for loop %d"
+                " with cost=%g and nRow=%g\n",
+                bestJ, pLevel-pWInfo->a, bestPlan.rCost, bestPlan.plan.nRow));
+    if( (bestPlan.plan.wsFlags & WHERE_ORDERBY)!=0 ){
+      *ppOrderBy = 0;
+    }
+    andFlags &= bestPlan.plan.wsFlags;
+    pLevel->plan = bestPlan.plan;
+    testcase( bestPlan.plan.wsFlags & WHERE_INDEXED );
+    testcase( bestPlan.plan.wsFlags & WHERE_TEMP_INDEX );
+    if( bestPlan.plan.wsFlags & (WHERE_INDEXED|WHERE_TEMP_INDEX) ){
+      pLevel->iIdxCur = pParse->nTab++;
+    }else{
+      pLevel->iIdxCur = -1;
+    }
+    notReady &= ~getMask(pMaskSet, pTabList->a[bestJ].iCursor);
+    pLevel->iFrom = (u8)bestJ;
+    if( bestPlan.plan.nRow>=(double)1 ){
+      pParse->nQueryLoop *= bestPlan.plan.nRow;
+    }
+
+    /* Check that if the table scanned by this loop iteration had an
+    ** INDEXED BY clause attached to it, that the named index is being
+    ** used for the scan. If not, then query compilation has failed.
+    ** Return an error.
+    */
+    pIdx = pTabList->a[bestJ].pIndex;
+    if( pIdx ){
+      if( (bestPlan.plan.wsFlags & WHERE_INDEXED)==0 ){
+        sqlite3ErrorMsg(pParse, "cannot use index: %s", pIdx->zName);
+        goto whereBeginError;
+      }else{
+        /* If an INDEXED BY clause is used, the bestIndex() function is
+        ** guaranteed to find the index specified in the INDEXED BY clause
+        ** if it find an index at all. */
+        assert( bestPlan.plan.u.pIdx==pIdx );
+      }
+    }
+  }
+  WHERETRACE(("*** Optimizer Finished ***\n"));
+  if( pParse->nErr || db->mallocFailed ){
+    goto whereBeginError;
+  }
+
+  /* If the total query only selects a single row, then the ORDER BY
+  ** clause is irrelevant.
+  */
+  if( (andFlags & WHERE_UNIQUE)!=0 && ppOrderBy ){
+    *ppOrderBy = 0;
+  }
+
+  /* If the caller is an UPDATE or DELETE statement that is requesting
+  ** to use a one-pass algorithm, determine if this is appropriate.
+  ** The one-pass algorithm only works if the WHERE clause constraints
+  ** the statement to update a single row.
+  */
+  assert( (wctrlFlags & WHERE_ONEPASS_DESIRED)==0 || pWInfo->nLevel==1 );
+  if( (wctrlFlags & WHERE_ONEPASS_DESIRED)!=0 && (andFlags & WHERE_UNIQUE)!=0 ){
+    pWInfo->okOnePass = 1;
+    pWInfo->a[0].plan.wsFlags &= ~WHERE_IDX_ONLY;
+  }
+
+  /* Open all tables in the pTabList and any indices selected for
+  ** searching those tables.
+  */
+  sqlite3CodeVerifySchema(pParse, -1); /* Insert the cookie verifier Goto */
+  notReady = ~(Bitmask)0;
+  pWInfo->nRowOut = (double)1;
+  for(i=0, pLevel=pWInfo->a; i<nTabList; i++, pLevel++){
+    Table *pTab;     /* Table to open */
+    int iDb;         /* Index of database containing table/index */
+
+    pTabItem = &pTabList->a[pLevel->iFrom];
+    pTab = pTabItem->pTab;
+    pLevel->iTabCur = pTabItem->iCursor;
+    pWInfo->nRowOut *= pLevel->plan.nRow;
+    iDb = sqlite3SchemaToIndex(db, pTab->pSchema);
+    if( (pTab->tabFlags & TF_Ephemeral)!=0 || pTab->pSelect ){
+      /* Do nothing */
+    }else
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+    if( (pLevel->plan.wsFlags & WHERE_VIRTUALTABLE)!=0 ){
+      const char *pVTab = (const char *)sqlite3GetVTable(db, pTab);
+      int iCur = pTabItem->iCursor;
+      sqlite3VdbeAddOp4(v, OP_VOpen, iCur, 0, 0, pVTab, P4_VTAB);
+    }else
+#endif
+    if( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0
+         && (wctrlFlags & WHERE_OMIT_OPEN)==0 ){
+      int op = pWInfo->okOnePass ? OP_OpenWrite : OP_OpenRead;
+      sqlite3OpenTable(pParse, pTabItem->iCursor, iDb, pTab, op);
+      testcase( pTab->nCol==BMS-1 );
+      testcase( pTab->nCol==BMS );
+      if( !pWInfo->okOnePass && pTab->nCol<BMS ){
+        Bitmask b = pTabItem->colUsed;
+        int n = 0;
+        for(; b; b=b>>1, n++){}
+        sqlite3VdbeChangeP4(v, sqlite3VdbeCurrentAddr(v)-1, 
+                            SQLITE_INT_TO_PTR(n), P4_INT32);
+        assert( n<=pTab->nCol );
+      }
+    }else{
+      sqlite3TableLock(pParse, iDb, pTab->tnum, 0, pTab->zName);
+    }
+#ifndef SQLITE_OMIT_AUTOMATIC_INDEX
+    if( (pLevel->plan.wsFlags & WHERE_TEMP_INDEX)!=0 ){
+      constructAutomaticIndex(pParse, pWC, pTabItem, notReady, pLevel);
+    }else
+#endif
+    if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
+      Index *pIx = pLevel->plan.u.pIdx;
+      KeyInfo *pKey = sqlite3IndexKeyinfo(pParse, pIx);
+      int iIdxCur = pLevel->iIdxCur;
+      assert( pIx->pSchema==pTab->pSchema );
+      assert( iIdxCur>=0 );
+      sqlite3VdbeAddOp4(v, OP_OpenRead, iIdxCur, pIx->tnum, iDb,
+                        (char*)pKey, P4_KEYINFO_HANDOFF);
+      VdbeComment((v, "%s", pIx->zName));
+    }
+    sqlite3CodeVerifySchema(pParse, iDb);
+    notReady &= ~getMask(pWC->pMaskSet, pTabItem->iCursor);
+  }
+  pWInfo->iTop = sqlite3VdbeCurrentAddr(v);
+  if( db->mallocFailed ) goto whereBeginError;
+
+  /* Generate the code to do the search.  Each iteration of the for
+  ** loop below generates code for a single nested loop of the VM
+  ** program.
+  */
+  notReady = ~(Bitmask)0;
+  for(i=0; i<nTabList; i++){
+    pLevel = &pWInfo->a[i];
+    explainOneScan(pParse, pTabList, pLevel, i, pLevel->iFrom, wctrlFlags);
+    notReady = codeOneLoopStart(pWInfo, i, wctrlFlags, notReady);
+    pWInfo->iContinue = pLevel->addrCont;
+  }
+
+#ifdef SQLITE_TEST  /* For testing and debugging use only */
+  /* Record in the query plan information about the current table
+  ** and the index used to access it (if any).  If the table itself
+  ** is not used, its name is just '{}'.  If no index is used
+  ** the index is listed as "{}".  If the primary key is used the
+  ** index name is '*'.
+  */
+  for(i=0; i<nTabList; i++){
+    char *z;
+    int n;
+    pLevel = &pWInfo->a[i];
+    pTabItem = &pTabList->a[pLevel->iFrom];
+    z = pTabItem->zAlias;
+    if( z==0 ) z = pTabItem->pTab->zName;
+    n = sqlite3Strlen30(z);
+    if( n+nQPlan < sizeof(sqlite3_query_plan)-10 ){
+      if( pLevel->plan.wsFlags & WHERE_IDX_ONLY ){
+        memcpy(&sqlite3_query_plan[nQPlan], "{}", 2);
+        nQPlan += 2;
+      }else{
+        memcpy(&sqlite3_query_plan[nQPlan], z, n);
+        nQPlan += n;
+      }
+      sqlite3_query_plan[nQPlan++] = ' ';
+    }
+    testcase( pLevel->plan.wsFlags & WHERE_ROWID_EQ );
+    testcase( pLevel->plan.wsFlags & WHERE_ROWID_RANGE );
+    if( pLevel->plan.wsFlags & (WHERE_ROWID_EQ|WHERE_ROWID_RANGE) ){
+      memcpy(&sqlite3_query_plan[nQPlan], "* ", 2);
+      nQPlan += 2;
+    }else if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 ){
+      n = sqlite3Strlen30(pLevel->plan.u.pIdx->zName);
+      if( n+nQPlan < sizeof(sqlite3_query_plan)-2 ){
+        memcpy(&sqlite3_query_plan[nQPlan], pLevel->plan.u.pIdx->zName, n);
+        nQPlan += n;
+        sqlite3_query_plan[nQPlan++] = ' ';
+      }
+    }else{
+      memcpy(&sqlite3_query_plan[nQPlan], "{} ", 3);
+      nQPlan += 3;
+    }
+  }
+  while( nQPlan>0 && sqlite3_query_plan[nQPlan-1]==' ' ){
+    sqlite3_query_plan[--nQPlan] = 0;
+  }
+  sqlite3_query_plan[nQPlan] = 0;
+  nQPlan = 0;
+#endif /* SQLITE_TEST // Testing and debugging use only */
+
+  /* Record the continuation address in the WhereInfo structure.  Then
+  ** clean up and return.
+  */
+  return pWInfo;
+
+  /* Jump here if malloc fails */
+whereBeginError:
+  if( pWInfo ){
+    pParse->nQueryLoop = pWInfo->savedNQueryLoop;
+    whereInfoFree(db, pWInfo);
+  }
+  return 0;
+}
+
+/*
+** Generate the end of the WHERE loop.  See comments on 
+** sqlite3WhereBegin() for additional information.
+*/
+SQLITE_PRIVATE void sqlite3WhereEnd(WhereInfo *pWInfo){
+  Parse *pParse = pWInfo->pParse;
+  Vdbe *v = pParse->pVdbe;
+  int i;
+  WhereLevel *pLevel;
+  SrcList *pTabList = pWInfo->pTabList;
+  sqlite3 *db = pParse->db;
+
+  /* Generate loop termination code.
+  */
+  sqlite3ExprCacheClear(pParse);
+  for(i=pWInfo->nLevel-1; i>=0; i--){
+    pLevel = &pWInfo->a[i];
+    sqlite3VdbeResolveLabel(v, pLevel->addrCont);
+    if( pLevel->op!=OP_Noop ){
+      sqlite3VdbeAddOp2(v, pLevel->op, pLevel->p1, pLevel->p2);
+      sqlite3VdbeChangeP5(v, pLevel->p5);
+    }
+    if( pLevel->plan.wsFlags & WHERE_IN_ABLE && pLevel->u.in.nIn>0 ){
+      struct InLoop *pIn;
+      int j;
+      sqlite3VdbeResolveLabel(v, pLevel->addrNxt);
+      for(j=pLevel->u.in.nIn, pIn=&pLevel->u.in.aInLoop[j-1]; j>0; j--, pIn--){
+        sqlite3VdbeJumpHere(v, pIn->addrInTop+1);
+        sqlite3VdbeAddOp2(v, OP_Next, pIn->iCur, pIn->addrInTop);
+        sqlite3VdbeJumpHere(v, pIn->addrInTop-1);
+      }
+      sqlite3DbFree(db, pLevel->u.in.aInLoop);
+    }
+    sqlite3VdbeResolveLabel(v, pLevel->addrBrk);
+    if( pLevel->iLeftJoin ){
+      int addr;
+      addr = sqlite3VdbeAddOp1(v, OP_IfPos, pLevel->iLeftJoin);
+      assert( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0
+           || (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 );
+      if( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0 ){
+        sqlite3VdbeAddOp1(v, OP_NullRow, pTabList->a[i].iCursor);
+      }
+      if( pLevel->iIdxCur>=0 ){
+        sqlite3VdbeAddOp1(v, OP_NullRow, pLevel->iIdxCur);
+      }
+      if( pLevel->op==OP_Return ){
+        sqlite3VdbeAddOp2(v, OP_Gosub, pLevel->p1, pLevel->addrFirst);
+      }else{
+        sqlite3VdbeAddOp2(v, OP_Goto, 0, pLevel->addrFirst);
+      }
+      sqlite3VdbeJumpHere(v, addr);
+    }
+  }
+
+  /* The "break" point is here, just past the end of the outer loop.
+  ** Set it.
+  */
+  sqlite3VdbeResolveLabel(v, pWInfo->iBreak);
+
+  /* Close all of the cursors that were opened by sqlite3WhereBegin.
+  */
+  assert( pWInfo->nLevel==1 || pWInfo->nLevel==pTabList->nSrc );
+  for(i=0, pLevel=pWInfo->a; i<pWInfo->nLevel; i++, pLevel++){
+    struct SrcList_item *pTabItem = &pTabList->a[pLevel->iFrom];
+    Table *pTab = pTabItem->pTab;
+    assert( pTab!=0 );
+    if( (pTab->tabFlags & TF_Ephemeral)==0
+     && pTab->pSelect==0
+     && (pWInfo->wctrlFlags & WHERE_OMIT_CLOSE)==0
+    ){
+      int ws = pLevel->plan.wsFlags;
+      if( !pWInfo->okOnePass && (ws & WHERE_IDX_ONLY)==0 ){
+        sqlite3VdbeAddOp1(v, OP_Close, pTabItem->iCursor);
+      }
+      if( (ws & WHERE_INDEXED)!=0 && (ws & WHERE_TEMP_INDEX)==0 ){
+        sqlite3VdbeAddOp1(v, OP_Close, pLevel->iIdxCur);
+      }
+    }
+
+    /* If this scan uses an index, make code substitutions to read data
+    ** from the index in preference to the table. Sometimes, this means
+    ** the table need never be read from. This is a performance boost,
+    ** as the vdbe level waits until the table is read before actually
+    ** seeking the table cursor to the record corresponding to the current
+    ** position in the index.
+    ** 
+    ** Calls to the code generator in between sqlite3WhereBegin and
+    ** sqlite3WhereEnd will have created code that references the table
+    ** directly.  This loop scans all that code looking for opcodes
+    ** that reference the table and converts them into opcodes that
+    ** reference the index.
+    */
+    if( (pLevel->plan.wsFlags & WHERE_INDEXED)!=0 && !db->mallocFailed){
+      int k, j, last;
+      VdbeOp *pOp;
+      Index *pIdx = pLevel->plan.u.pIdx;
+
+      assert( pIdx!=0 );
+      pOp = sqlite3VdbeGetOp(v, pWInfo->iTop);
+      last = sqlite3VdbeCurrentAddr(v);
+      for(k=pWInfo->iTop; k<last; k++, pOp++){
+        if( pOp->p1!=pLevel->iTabCur ) continue;
+        if( pOp->opcode==OP_Column ){
+          for(j=0; j<pIdx->nColumn; j++){
+            if( pOp->p2==pIdx->aiColumn[j] ){
+              pOp->p2 = j;
+              pOp->p1 = pLevel->iIdxCur;
+              break;
+            }
+          }
+          assert( (pLevel->plan.wsFlags & WHERE_IDX_ONLY)==0
+               || j<pIdx->nColumn );
+        }else if( pOp->opcode==OP_Rowid ){
+          pOp->p1 = pLevel->iIdxCur;
+          pOp->opcode = OP_IdxRowid;
+        }
+      }
+    }
+  }
+
+  /* Final cleanup
+  */
+  pParse->nQueryLoop = pWInfo->savedNQueryLoop;
+  whereInfoFree(db, pWInfo);
+  return;
+}
+
+/************** End of where.c ***********************************************/
+/************** Begin file parse.c *******************************************/
+/* Driver template for the LEMON parser generator.
+** The author disclaims copyright to this source code.
+**
+** This version of "lempar.c" is modified, slightly, for use by SQLite.
+** The only modifications are the addition of a couple of NEVER()
+** macros to disable tests that are needed in the case of a general
+** LALR(1) grammar but which are always false in the
+** specific grammar used by SQLite.
+*/
+/* First off, code is included that follows the "include" declaration
+** in the input grammar file. */
+
+
+/*
+** Disable all error recovery processing in the parser push-down
+** automaton.
+*/
+#define YYNOERRORRECOVERY 1
+
+/*
+** Make yytestcase() the same as testcase()
+*/
+#define yytestcase(X) testcase(X)
+
+/*
+** An instance of this structure holds information about the
+** LIMIT clause of a SELECT statement.
+*/
+struct LimitVal {
+  Expr *pLimit;    /* The LIMIT expression.  NULL if there is no limit */
+  Expr *pOffset;   /* The OFFSET expression.  NULL if there is none */
+};
+
+/*
+** An instance of this structure is used to store the LIKE,
+** GLOB, NOT LIKE, and NOT GLOB operators.
+*/
+struct LikeOp {
+  Token eOperator;  /* "like" or "glob" or "regexp" */
+  int not;         /* True if the NOT keyword is present */
+};
+
+/*
+** An instance of the following structure describes the event of a
+** TRIGGER.  "a" is the event type, one of TK_UPDATE, TK_INSERT,
+** TK_DELETE, or TK_INSTEAD.  If the event is of the form
+**
+**      UPDATE ON (a,b,c)
+**
+** Then the "b" IdList records the list "a,b,c".
+*/
+struct TrigEvent { int a; IdList * b; };
+
+/*
+** An instance of this structure holds the ATTACH key and the key type.
+*/
+struct AttachKey { int type;  Token key; };
+
+
+  /* This is a utility routine used to set the ExprSpan.zStart and
+  ** ExprSpan.zEnd values of pOut so that the span covers the complete
+  ** range of text beginning with pStart and going to the end of pEnd.
+  */
+  static void spanSet(ExprSpan *pOut, Token *pStart, Token *pEnd){
+    pOut->zStart = pStart->z;
+    pOut->zEnd = &pEnd->z[pEnd->n];
+  }
+
+  /* Construct a new Expr object from a single identifier.  Use the
+  ** new Expr to populate pOut.  Set the span of pOut to be the identifier
+  ** that created the expression.
+  */
+  static void spanExpr(ExprSpan *pOut, Parse *pParse, int op, Token *pValue){
+    pOut->pExpr = sqlite3PExpr(pParse, op, 0, 0, pValue);
+    pOut->zStart = pValue->z;
+    pOut->zEnd = &pValue->z[pValue->n];
+  }
+
+  /* This routine constructs a binary expression node out of two ExprSpan
+  ** objects and uses the result to populate a new ExprSpan object.
+  */
+  static void spanBinaryExpr(
+    ExprSpan *pOut,     /* Write the result here */
+    Parse *pParse,      /* The parsing context.  Errors accumulate here */
+    int op,             /* The binary operation */
+    ExprSpan *pLeft,    /* The left operand */
+    ExprSpan *pRight    /* The right operand */
+  ){
+    pOut->pExpr = sqlite3PExpr(pParse, op, pLeft->pExpr, pRight->pExpr, 0);
+    pOut->zStart = pLeft->zStart;
+    pOut->zEnd = pRight->zEnd;
+  }
+
+  /* Construct an expression node for a unary postfix operator
+  */
+  static void spanUnaryPostfix(
+    ExprSpan *pOut,        /* Write the new expression node here */
+    Parse *pParse,         /* Parsing context to record errors */
+    int op,                /* The operator */
+    ExprSpan *pOperand,    /* The operand */
+    Token *pPostOp         /* The operand token for setting the span */
+  ){
+    pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0);
+    pOut->zStart = pOperand->zStart;
+    pOut->zEnd = &pPostOp->z[pPostOp->n];
+  }                           
+
+  /* A routine to convert a binary TK_IS or TK_ISNOT expression into a
+  ** unary TK_ISNULL or TK_NOTNULL expression. */
+  static void binaryToUnaryIfNull(Parse *pParse, Expr *pY, Expr *pA, int op){
+    sqlite3 *db = pParse->db;
+    if( db->mallocFailed==0 && pY->op==TK_NULL ){
+      pA->op = (u8)op;
+      sqlite3ExprDelete(db, pA->pRight);
+      pA->pRight = 0;
+    }
+  }
+
+  /* Construct an expression node for a unary prefix operator
+  */
+  static void spanUnaryPrefix(
+    ExprSpan *pOut,        /* Write the new expression node here */
+    Parse *pParse,         /* Parsing context to record errors */
+    int op,                /* The operator */
+    ExprSpan *pOperand,    /* The operand */
+    Token *pPreOp         /* The operand token for setting the span */
+  ){
+    pOut->pExpr = sqlite3PExpr(pParse, op, pOperand->pExpr, 0, 0);
+    pOut->zStart = pPreOp->z;
+    pOut->zEnd = pOperand->zEnd;
+  }
+/* Next is all token values, in a form suitable for use by makeheaders.
+** This section will be null unless lemon is run with the -m switch.
+*/
+/* 
+** These constants (all generated automatically by the parser generator)
+** specify the various kinds of tokens (terminals) that the parser
+** understands. 
+**
+** Each symbol here is a terminal symbol in the grammar.
+*/
+/* Make sure the INTERFACE macro is defined.
+*/
+#ifndef INTERFACE
+# define INTERFACE 1
+#endif
+/* The next thing included is series of defines which control
+** various aspects of the generated parser.
+**    YYCODETYPE         is the data type used for storing terminal
+**                       and nonterminal numbers.  "unsigned char" is
+**                       used if there are fewer than 250 terminals
+**                       and nonterminals.  "int" is used otherwise.
+**    YYNOCODE           is a number of type YYCODETYPE which corresponds
+**                       to no legal terminal or nonterminal number.  This
+**                       number is used to fill in empty slots of the hash 
+**                       table.
+**    YYFALLBACK         If defined, this indicates that one or more tokens
+**                       have fall-back values which should be used if the
+**                       original value of the token will not parse.
+**    YYACTIONTYPE       is the data type used for storing terminal
+**                       and nonterminal numbers.  "unsigned char" is
+**                       used if there are fewer than 250 rules and
+**                       states combined.  "int" is used otherwise.
+**    sqlite3ParserTOKENTYPE     is the data type used for minor tokens given 
+**                       directly to the parser from the tokenizer.
+**    YYMINORTYPE        is the data type used for all minor tokens.
+**                       This is typically a union of many types, one of
+**                       which is sqlite3ParserTOKENTYPE.  The entry in the union
+**                       for base tokens is called "yy0".
+**    YYSTACKDEPTH       is the maximum depth of the parser's stack.  If
+**                       zero the stack is dynamically sized using realloc()
+**    sqlite3ParserARG_SDECL     A static variable declaration for the %extra_argument
+**    sqlite3ParserARG_PDECL     A parameter declaration for the %extra_argument
+**    sqlite3ParserARG_STORE     Code to store %extra_argument into yypParser
+**    sqlite3ParserARG_FETCH     Code to extract %extra_argument from yypParser
+**    YYNSTATE           the combined number of states.
+**    YYNRULE            the number of rules in the grammar
+**    YYERRORSYMBOL      is the code number of the error symbol.  If not
+**                       defined, then do no error processing.
+*/
+#define YYCODETYPE unsigned char
+#define YYNOCODE 253
+#define YYACTIONTYPE unsigned short int
+#define YYWILDCARD 67
+#define sqlite3ParserTOKENTYPE Token
+typedef union {
+  int yyinit;
+  sqlite3ParserTOKENTYPE yy0;
+  int yy4;
+  struct TrigEvent yy90;
+  ExprSpan yy118;
+  TriggerStep* yy203;
+  u8 yy210;
+  struct {int value; int mask;} yy215;
+  SrcList* yy259;
+  struct LimitVal yy292;
+  Expr* yy314;
+  ExprList* yy322;
+  struct LikeOp yy342;
+  IdList* yy384;
+  Select* yy387;
+} YYMINORTYPE;
+#ifndef YYSTACKDEPTH
+#define YYSTACKDEPTH 100
+#endif
+#define sqlite3ParserARG_SDECL Parse *pParse;
+#define sqlite3ParserARG_PDECL ,Parse *pParse
+#define sqlite3ParserARG_FETCH Parse *pParse = yypParser->pParse
+#define sqlite3ParserARG_STORE yypParser->pParse = pParse
+#define YYNSTATE 630
+#define YYNRULE 329
+#define YYFALLBACK 1
+#define YY_NO_ACTION      (YYNSTATE+YYNRULE+2)
+#define YY_ACCEPT_ACTION  (YYNSTATE+YYNRULE+1)
+#define YY_ERROR_ACTION   (YYNSTATE+YYNRULE)
+
+/* The yyzerominor constant is used to initialize instances of
+** YYMINORTYPE objects to zero. */
+static const YYMINORTYPE yyzerominor = { 0 };
+
+/* Define the yytestcase() macro to be a no-op if is not already defined
+** otherwise.
+**
+** Applications can choose to define yytestcase() in the %include section
+** to a macro that can assist in verifying code coverage.  For production
+** code the yytestcase() macro should be turned off.  But it is useful
+** for testing.
+*/
+#ifndef yytestcase
+# define yytestcase(X)
+#endif
+
+
+/* Next are the tables used to determine what action to take based on the
+** current state and lookahead token.  These tables are used to implement
+** functions that take a state number and lookahead value and return an
+** action integer.  
+**
+** Suppose the action integer is N.  Then the action is determined as
+** follows
+**
+**   0 <= N < YYNSTATE                  Shift N.  That is, push the lookahead
+**                                      token onto the stack and goto state N.
+**
+**   YYNSTATE <= N < YYNSTATE+YYNRULE   Reduce by rule N-YYNSTATE.
+**
+**   N == YYNSTATE+YYNRULE              A syntax error has occurred.
+**
+**   N == YYNSTATE+YYNRULE+1            The parser accepts its input.
+**
+**   N == YYNSTATE+YYNRULE+2            No such action.  Denotes unused
+**                                      slots in the yy_action[] table.
+**
+** The action table is constructed as a single large table named yy_action[].
+** Given state S and lookahead X, the action is computed as
+**
+**      yy_action[ yy_shift_ofst[S] + X ]
+**
+** If the index value yy_shift_ofst[S]+X is out of range or if the value
+** yy_lookahead[yy_shift_ofst[S]+X] is not equal to X or if yy_shift_ofst[S]
+** is equal to YY_SHIFT_USE_DFLT, it means that the action is not in the table
+** and that yy_default[S] should be used instead.  
+**
+** The formula above is for computing the action when the lookahead is
+** a terminal symbol.  If the lookahead is a non-terminal (as occurs after
+** a reduce action) then the yy_reduce_ofst[] array is used in place of
+** the yy_shift_ofst[] array and YY_REDUCE_USE_DFLT is used in place of
+** YY_SHIFT_USE_DFLT.
+**
+** The following are the tables generated in this section:
+**
+**  yy_action[]        A single table containing all actions.
+**  yy_lookahead[]     A table containing the lookahead for each entry in
+**                     yy_action.  Used to detect hash collisions.
+**  yy_shift_ofst[]    For each state, the offset into yy_action for
+**                     shifting terminals.
+**  yy_reduce_ofst[]   For each state, the offset into yy_action for
+**                     shifting non-terminals after a reduce.
+**  yy_default[]       Default action for each state.
+*/
+#define YY_ACTTAB_COUNT (1557)
+static const YYACTIONTYPE yy_action[] = {
+ /*     0 */   313,  960,  186,  419,    2,  172,  627,  597,   55,   55,
+ /*    10 */    55,   55,   48,   53,   53,   53,   53,   52,   52,   51,
+ /*    20 */    51,   51,   50,  238,  302,  283,  623,  622,  516,  515,
+ /*    30 */   590,  584,   55,   55,   55,   55,  282,   53,   53,   53,
+ /*    40 */    53,   52,   52,   51,   51,   51,   50,  238,    6,   56,
+ /*    50 */    57,   47,  582,  581,  583,  583,   54,   54,   55,   55,
+ /*    60 */    55,   55,  608,   53,   53,   53,   53,   52,   52,   51,
+ /*    70 */    51,   51,   50,  238,  313,  597,  409,  330,  579,  579,
+ /*    80 */    32,   53,   53,   53,   53,   52,   52,   51,   51,   51,
+ /*    90 */    50,  238,  330,  217,  620,  619,  166,  411,  624,  382,
+ /*   100 */   379,  378,    7,  491,  590,  584,  200,  199,  198,   58,
+ /*   110 */   377,  300,  414,  621,  481,   66,  623,  622,  621,  580,
+ /*   120 */   254,  601,   94,   56,   57,   47,  582,  581,  583,  583,
+ /*   130 */    54,   54,   55,   55,   55,   55,  671,   53,   53,   53,
+ /*   140 */    53,   52,   52,   51,   51,   51,   50,  238,  313,  532,
+ /*   150 */   226,  506,  507,  133,  177,  139,  284,  385,  279,  384,
+ /*   160 */   169,  197,  342,  398,  251,  226,  253,  275,  388,  167,
+ /*   170 */   139,  284,  385,  279,  384,  169,  570,  236,  590,  584,
+ /*   180 */   672,  240,  275,  157,  620,  619,  554,  437,   51,   51,
+ /*   190 */    51,   50,  238,  343,  439,  553,  438,   56,   57,   47,
+ /*   200 */   582,  581,  583,  583,   54,   54,   55,   55,   55,   55,
+ /*   210 */   465,   53,   53,   53,   53,   52,   52,   51,   51,   51,
+ /*   220 */    50,  238,  313,  390,   52,   52,   51,   51,   51,   50,
+ /*   230 */   238,  391,  166,  491,  566,  382,  379,  378,  409,  440,
+ /*   240 */   579,  579,  252,  440,  607,   66,  377,  513,  621,   49,
+ /*   250 */    46,  147,  590,  584,  621,   16,  466,  189,  621,  441,
+ /*   260 */   442,  673,  526,  441,  340,  577,  595,   64,  194,  482,
+ /*   270 */   434,   56,   57,   47,  582,  581,  583,  583,   54,   54,
+ /*   280 */    55,   55,   55,   55,   30,   53,   53,   53,   53,   52,
+ /*   290 */    52,   51,   51,   51,   50,  238,  313,  593,  593,  593,
+ /*   300 */   387,  578,  606,  493,  259,  351,  258,  411,    1,  623,
+ /*   310 */   622,  496,  623,  622,   65,  240,  623,  622,  597,  443,
+ /*   320 */   237,  239,  414,  341,  237,  602,  590,  584,   18,  603,
+ /*   330 */   166,  601,   87,  382,  379,  378,   67,  623,  622,   38,
+ /*   340 */   623,  622,  176,  270,  377,   56,   57,   47,  582,  581,
+ /*   350 */   583,  583,   54,   54,   55,   55,   55,   55,  175,   53,
+ /*   360 */    53,   53,   53,   52,   52,   51,   51,   51,   50,  238,
+ /*   370 */   313,  396,  233,  411,  531,  565,  317,  620,  619,   44,
+ /*   380 */   620,  619,  240,  206,  620,  619,  597,  266,  414,  268,
+ /*   390 */   409,  597,  579,  579,  352,  184,  505,  601,   73,  533,
+ /*   400 */   590,  584,  466,  548,  190,  620,  619,  576,  620,  619,
+ /*   410 */   547,  383,  551,   35,  332,  575,  574,  600,  504,   56,
+ /*   420 */    57,   47,  582,  581,  583,  583,   54,   54,   55,   55,
+ /*   430 */    55,   55,  567,   53,   53,   53,   53,   52,   52,   51,
+ /*   440 */    51,   51,   50,  238,  313,  411,  561,  561,  528,  364,
+ /*   450 */   259,  351,  258,  183,  361,  549,  524,  374,  411,  597,
+ /*   460 */   414,  240,  560,  560,  409,  604,  579,  579,  328,  601,
+ /*   470 */    93,  623,  622,  414,  590,  584,  237,  564,  559,  559,
+ /*   480 */   520,  402,  601,   87,  409,  210,  579,  579,  168,  421,
+ /*   490 */   950,  519,  950,   56,   57,   47,  582,  581,  583,  583,
+ /*   500 */    54,   54,   55,   55,   55,   55,  192,   53,   53,   53,
+ /*   510 */    53,   52,   52,   51,   51,   51,   50,  238,  313,  600,
+ /*   520 */   293,  563,  511,  234,  357,  146,  475,  475,  367,  411,
+ /*   530 */   562,  411,  358,  542,  425,  171,  411,  215,  144,  620,
+ /*   540 */   619,  544,  318,  353,  414,  203,  414,  275,  590,  584,
+ /*   550 */   549,  414,  174,  601,   94,  601,   79,  558,  471,   61,
+ /*   560 */   601,   79,  421,  949,  350,  949,   34,   56,   57,   47,
+ /*   570 */   582,  581,  583,  583,   54,   54,   55,   55,   55,   55,
+ /*   580 */   535,   53,   53,   53,   53,   52,   52,   51,   51,   51,
+ /*   590 */    50,  238,  313,  307,  424,  394,  272,   49,   46,  147,
+ /*   600 */   349,  322,    4,  411,  491,  312,  321,  425,  568,  492,
+ /*   610 */   216,  264,  407,  575,  574,  429,   66,  549,  414,  621,
+ /*   620 */   540,  602,  590,  584,   13,  603,  621,  601,   72,   12,
+ /*   630 */   618,  617,  616,  202,  210,  621,  546,  469,  422,  319,
+ /*   640 */   148,   56,   57,   47,  582,  581,  583,  583,   54,   54,
+ /*   650 */    55,   55,   55,   55,  338,   53,   53,   53,   53,   52,
+ /*   660 */    52,   51,   51,   51,   50,  238,  313,  600,  600,  411,
+ /*   670 */    39,   21,   37,  170,  237,  875,  411,  572,  572,  201,
+ /*   680 */   144,  473,  538,  331,  414,  474,  143,  146,  630,  628,
+ /*   690 */   334,  414,  353,  601,   68,  168,  590,  584,  132,  365,
+ /*   700 */   601,   96,  307,  423,  530,  336,   49,   46,  147,  568,
+ /*   710 */   406,  216,  549,  360,  529,   56,   57,   47,  582,  581,
+ /*   720 */   583,  583,   54,   54,   55,   55,   55,   55,  411,   53,
+ /*   730 */    53,   53,   53,   52,   52,   51,   51,   51,   50,  238,
+ /*   740 */   313,  411,  605,  414,  484,  510,  172,  422,  597,  318,
+ /*   750 */   496,  485,  601,   99,  411,  142,  414,  411,  231,  411,
+ /*   760 */   540,  411,  359,  629,    2,  601,   97,  426,  308,  414,
+ /*   770 */   590,  584,  414,   20,  414,  621,  414,  621,  601,  106,
+ /*   780 */   503,  601,  105,  601,  108,  601,  109,  204,   28,   56,
+ /*   790 */    57,   47,  582,  581,  583,  583,   54,   54,   55,   55,
+ /*   800 */    55,   55,  411,   53,   53,   53,   53,   52,   52,   51,
+ /*   810 */    51,   51,   50,  238,  313,  411,  597,  414,  411,  276,
+ /*   820 */   214,  600,  411,  366,  213,  381,  601,  134,  274,  500,
+ /*   830 */   414,  167,  130,  414,  621,  411,  354,  414,  376,  601,
+ /*   840 */   135,  129,  601,  100,  590,  584,  601,  104,  522,  521,
+ /*   850 */   414,  621,  224,  273,  600,  167,  327,  282,  600,  601,
+ /*   860 */   103,  468,  521,   56,   57,   47,  582,  581,  583,  583,
+ /*   870 */    54,   54,   55,   55,   55,   55,  411,   53,   53,   53,
+ /*   880 */    53,   52,   52,   51,   51,   51,   50,  238,  313,  411,
+ /*   890 */    27,  414,  411,  375,  276,  167,  359,  544,   50,  238,
+ /*   900 */   601,   95,  128,  223,  414,  411,  165,  414,  411,  621,
+ /*   910 */   411,  621,  612,  601,  102,  372,  601,   76,  590,  584,
+ /*   920 */   414,  570,  236,  414,  470,  414,  167,  621,  188,  601,
+ /*   930 */    98,  225,  601,  138,  601,  137,  232,   56,   45,   47,
+ /*   940 */   582,  581,  583,  583,   54,   54,   55,   55,   55,   55,
+ /*   950 */   411,   53,   53,   53,   53,   52,   52,   51,   51,   51,
+ /*   960 */    50,  238,  313,  276,  276,  414,  411,  276,  544,  459,
+ /*   970 */   359,  171,  209,  479,  601,  136,  628,  334,  621,  621,
+ /*   980 */   125,  414,  621,  368,  411,  621,  257,  540,  589,  588,
+ /*   990 */   601,   75,  590,  584,  458,  446,   23,   23,  124,  414,
+ /*  1000 */   326,  325,  621,  427,  324,  309,  600,  288,  601,   92,
+ /*  1010 */   586,  585,   57,   47,  582,  581,  583,  583,   54,   54,
+ /*  1020 */    55,   55,   55,   55,  411,   53,   53,   53,   53,   52,
+ /*  1030 */    52,   51,   51,   51,   50,  238,  313,  587,  411,  414,
+ /*  1040 */   411,  207,  611,  476,  171,  472,  160,  123,  601,   91,
+ /*  1050 */   323,  261,   15,  414,  464,  414,  411,  621,  411,  354,
+ /*  1060 */   222,  411,  601,   74,  601,   90,  590,  584,  159,  264,
+ /*  1070 */   158,  414,  461,  414,  621,  600,  414,  121,  120,   25,
+ /*  1080 */   601,   89,  601,  101,  621,  601,   88,   47,  582,  581,
+ /*  1090 */   583,  583,   54,   54,   55,   55,   55,   55,  544,   53,
+ /*  1100 */    53,   53,   53,   52,   52,   51,   51,   51,   50,  238,
+ /*  1110 */    43,  405,  263,    3,  610,  264,  140,  415,  622,   24,
+ /*  1120 */   410,   11,  456,  594,  118,  155,  219,  452,  408,  621,
+ /*  1130 */   621,  621,  156,   43,  405,  621,    3,  286,  621,  113,
+ /*  1140 */   415,  622,  111,  445,  411,  400,  557,  403,  545,   10,
+ /*  1150 */   411,  408,  264,  110,  205,  436,  541,  566,  453,  414,
+ /*  1160 */   621,  621,   63,  621,  435,  414,  411,  621,  601,   94,
+ /*  1170 */   403,  621,  411,  337,  601,   86,  150,   40,   41,  534,
+ /*  1180 */   566,  414,  242,  264,   42,  413,  412,  414,  600,  595,
+ /*  1190 */   601,   85,  191,  333,  107,  451,  601,   84,  621,  539,
+ /*  1200 */    40,   41,  420,  230,  411,  149,  316,   42,  413,  412,
+ /*  1210 */   398,  127,  595,  315,  621,  399,  278,  625,  181,  414,
+ /*  1220 */   593,  593,  593,  592,  591,   14,  450,  411,  601,   71,
+ /*  1230 */   240,  621,   43,  405,  264,    3,  615,  180,  264,  415,
+ /*  1240 */   622,  614,  414,  593,  593,  593,  592,  591,   14,  621,
+ /*  1250 */   408,  601,   70,  621,  417,   33,  405,  613,    3,  411,
+ /*  1260 */   264,  411,  415,  622,  418,  626,  178,  509,    8,  403,
+ /*  1270 */   241,  416,  126,  408,  414,  621,  414,  449,  208,  566,
+ /*  1280 */   240,  221,  621,  601,   83,  601,   82,  599,  297,  277,
+ /*  1290 */   296,   30,  403,   31,  395,  264,  295,  397,  489,   40,
+ /*  1300 */    41,  411,  566,  220,  621,  294,   42,  413,  412,  271,
+ /*  1310 */   621,  595,  600,  621,   59,   60,  414,  269,  267,  623,
+ /*  1320 */   622,   36,   40,   41,  621,  601,   81,  598,  235,   42,
+ /*  1330 */   413,  412,  621,  621,  595,  265,  344,  411,  248,  556,
+ /*  1340 */   173,  185,  593,  593,  593,  592,  591,   14,  218,   29,
+ /*  1350 */   621,  543,  414,  305,  304,  303,  179,  301,  411,  566,
+ /*  1360 */   454,  601,   80,  289,  335,  593,  593,  593,  592,  591,
+ /*  1370 */    14,  411,  287,  414,  151,  392,  246,  260,  411,  196,
+ /*  1380 */   195,  523,  601,   69,  411,  245,  414,  526,  537,  285,
+ /*  1390 */   389,  595,  621,  414,  536,  601,   17,  362,  153,  414,
+ /*  1400 */   466,  463,  601,   78,  154,  414,  462,  152,  601,   77,
+ /*  1410 */   355,  255,  621,  455,  601,    9,  621,  386,  444,  517,
+ /*  1420 */   247,  621,  593,  593,  593,  621,  621,  244,  621,  243,
+ /*  1430 */   430,  518,  292,  621,  329,  621,  145,  393,  280,  513,
+ /*  1440 */   291,  131,  621,  514,  621,  621,  311,  621,  259,  346,
+ /*  1450 */   249,  621,  621,  229,  314,  621,  228,  512,  227,  240,
+ /*  1460 */   494,  488,  310,  164,  487,  486,  373,  480,  163,  262,
+ /*  1470 */   369,  371,  162,   26,  212,  478,  477,  161,  141,  363,
+ /*  1480 */   467,  122,  339,  187,  119,  348,  347,  117,  116,  115,
+ /*  1490 */   114,  112,  182,  457,  320,   22,  433,  432,  448,   19,
+ /*  1500 */   609,  431,  428,   62,  193,  596,  573,  298,  555,  552,
+ /*  1510 */   571,  404,  290,  380,  498,  510,  495,  306,  281,  499,
+ /*  1520 */   250,    5,  497,  460,  345,  447,  569,  550,  238,  299,
+ /*  1530 */   527,  525,  508,  961,  502,  501,  961,  401,  961,  211,
+ /*  1540 */   490,  356,  256,  961,  483,  961,  961,  961,  961,  961,
+ /*  1550 */   961,  961,  961,  961,  961,  961,  370,
+};
+static const YYCODETYPE yy_lookahead[] = {
+ /*     0 */    19,  142,  143,  144,  145,   24,    1,   26,   77,   78,
+ /*    10 */    79,   80,   81,   82,   83,   84,   85,   86,   87,   88,
+ /*    20 */    89,   90,   91,   92,   15,   98,   26,   27,    7,    8,
+ /*    30 */    49,   50,   77,   78,   79,   80,  109,   82,   83,   84,
+ /*    40 */    85,   86,   87,   88,   89,   90,   91,   92,   22,   68,
+ /*    50 */    69,   70,   71,   72,   73,   74,   75,   76,   77,   78,
+ /*    60 */    79,   80,   23,   82,   83,   84,   85,   86,   87,   88,
+ /*    70 */    89,   90,   91,   92,   19,   94,  112,   19,  114,  115,
+ /*    80 */    25,   82,   83,   84,   85,   86,   87,   88,   89,   90,
+ /*    90 */    91,   92,   19,   22,   94,   95,   96,  150,  150,   99,
+ /*   100 */   100,  101,   76,  150,   49,   50,  105,  106,  107,   54,
+ /*   110 */   110,  158,  165,  165,  161,  162,   26,   27,  165,  113,
+ /*   120 */    16,  174,  175,   68,   69,   70,   71,   72,   73,   74,
+ /*   130 */    75,   76,   77,   78,   79,   80,  118,   82,   83,   84,
+ /*   140 */    85,   86,   87,   88,   89,   90,   91,   92,   19,   23,
+ /*   150 */    92,   97,   98,   24,   96,   97,   98,   99,  100,  101,
+ /*   160 */   102,   25,   97,  216,   60,   92,   62,  109,  221,   25,
+ /*   170 */    97,   98,   99,  100,  101,  102,   86,   87,   49,   50,
+ /*   180 */   118,  116,  109,   25,   94,   95,   32,   97,   88,   89,
+ /*   190 */    90,   91,   92,  128,  104,   41,  106,   68,   69,   70,
+ /*   200 */    71,   72,   73,   74,   75,   76,   77,   78,   79,   80,
+ /*   210 */    11,   82,   83,   84,   85,   86,   87,   88,   89,   90,
+ /*   220 */    91,   92,   19,   19,   86,   87,   88,   89,   90,   91,
+ /*   230 */    92,   27,   96,  150,   66,   99,  100,  101,  112,  150,
+ /*   240 */   114,  115,  138,  150,  161,  162,  110,  103,  165,  222,
+ /*   250 */   223,  224,   49,   50,  165,   22,   57,   24,  165,  170,
+ /*   260 */   171,  118,   94,  170,  171,   23,   98,   25,  185,  186,
+ /*   270 */   243,   68,   69,   70,   71,   72,   73,   74,   75,   76,
+ /*   280 */    77,   78,   79,   80,  126,   82,   83,   84,   85,   86,
+ /*   290 */    87,   88,   89,   90,   91,   92,   19,  129,  130,  131,
+ /*   300 */    88,   23,  172,  173,  105,  106,  107,  150,   22,   26,
+ /*   310 */    27,  181,   26,   27,   22,  116,   26,   27,   26,  230,
+ /*   320 */   231,  197,  165,  230,  231,  113,   49,   50,  204,  117,
+ /*   330 */    96,  174,  175,   99,  100,  101,   22,   26,   27,  136,
+ /*   340 */    26,   27,  118,   16,  110,   68,   69,   70,   71,   72,
+ /*   350 */    73,   74,   75,   76,   77,   78,   79,   80,  118,   82,
+ /*   360 */    83,   84,   85,   86,   87,   88,   89,   90,   91,   92,
+ /*   370 */    19,  214,  215,  150,   23,   23,  155,   94,   95,   22,
+ /*   380 */    94,   95,  116,  160,   94,   95,   94,   60,  165,   62,
+ /*   390 */   112,   26,  114,  115,  128,   23,   36,  174,  175,   88,
+ /*   400 */    49,   50,   57,  120,   22,   94,   95,   23,   94,   95,
+ /*   410 */   120,   51,   25,  136,  169,  170,  171,  194,   58,   68,
+ /*   420 */    69,   70,   71,   72,   73,   74,   75,   76,   77,   78,
+ /*   430 */    79,   80,   23,   82,   83,   84,   85,   86,   87,   88,
+ /*   440 */    89,   90,   91,   92,   19,  150,   12,   12,   23,  228,
+ /*   450 */   105,  106,  107,   23,  233,   25,  165,   19,  150,   94,
+ /*   460 */   165,  116,   28,   28,  112,  174,  114,  115,  108,  174,
+ /*   470 */   175,   26,   27,  165,   49,   50,  231,   11,   44,   44,
+ /*   480 */    46,   46,  174,  175,  112,  160,  114,  115,   50,   22,
+ /*   490 */    23,   57,   25,   68,   69,   70,   71,   72,   73,   74,
+ /*   500 */    75,   76,   77,   78,   79,   80,  119,   82,   83,   84,
+ /*   510 */    85,   86,   87,   88,   89,   90,   91,   92,   19,  194,
+ /*   520 */   225,   23,   23,  215,   19,   95,  105,  106,  107,  150,
+ /*   530 */    23,  150,   27,   23,   67,   25,  150,  206,  207,   94,
+ /*   540 */    95,  166,  104,  218,  165,   22,  165,  109,   49,   50,
+ /*   550 */   120,  165,   25,  174,  175,  174,  175,   23,   21,  234,
+ /*   560 */   174,  175,   22,   23,  239,   25,   25,   68,   69,   70,
+ /*   570 */    71,   72,   73,   74,   75,   76,   77,   78,   79,   80,
+ /*   580 */   205,   82,   83,   84,   85,   86,   87,   88,   89,   90,
+ /*   590 */    91,   92,   19,   22,   23,  216,   23,  222,  223,  224,
+ /*   600 */    63,  220,   35,  150,  150,  163,  220,   67,  166,  167,
+ /*   610 */   168,  150,  169,  170,  171,  161,  162,   25,  165,  165,
+ /*   620 */   150,  113,   49,   50,   25,  117,  165,  174,  175,   35,
+ /*   630 */     7,    8,    9,  160,  160,  165,  120,  100,   67,  247,
+ /*   640 */   248,   68,   69,   70,   71,   72,   73,   74,   75,   76,
+ /*   650 */    77,   78,   79,   80,  193,   82,   83,   84,   85,   86,
+ /*   660 */    87,   88,   89,   90,   91,   92,   19,  194,  194,  150,
+ /*   670 */   135,   24,  137,   35,  231,  138,  150,  129,  130,  206,
+ /*   680 */   207,   30,   27,  213,  165,   34,  118,   95,    0,    1,
+ /*   690 */     2,  165,  218,  174,  175,   50,   49,   50,   22,   48,
+ /*   700 */   174,  175,   22,   23,   23,  244,  222,  223,  224,  166,
+ /*   710 */   167,  168,  120,  239,   23,   68,   69,   70,   71,   72,
+ /*   720 */    73,   74,   75,   76,   77,   78,   79,   80,  150,   82,
+ /*   730 */    83,   84,   85,   86,   87,   88,   89,   90,   91,   92,
+ /*   740 */    19,  150,  173,  165,  181,  182,   24,   67,   26,  104,
+ /*   750 */   181,  188,  174,  175,  150,   39,  165,  150,   52,  150,
+ /*   760 */   150,  150,  150,  144,  145,  174,  175,  249,  250,  165,
+ /*   770 */    49,   50,  165,   52,  165,  165,  165,  165,  174,  175,
+ /*   780 */    29,  174,  175,  174,  175,  174,  175,  160,   22,   68,
+ /*   790 */    69,   70,   71,   72,   73,   74,   75,   76,   77,   78,
+ /*   800 */    79,   80,  150,   82,   83,   84,   85,   86,   87,   88,
+ /*   810 */    89,   90,   91,   92,   19,  150,   94,  165,  150,  150,
+ /*   820 */   160,  194,  150,  213,  160,   52,  174,  175,   23,   23,
+ /*   830 */   165,   25,   22,  165,  165,  150,  150,  165,   52,  174,
+ /*   840 */   175,   22,  174,  175,   49,   50,  174,  175,  190,  191,
+ /*   850 */   165,  165,  240,   23,  194,   25,  187,  109,  194,  174,
+ /*   860 */   175,  190,  191,   68,   69,   70,   71,   72,   73,   74,
+ /*   870 */    75,   76,   77,   78,   79,   80,  150,   82,   83,   84,
+ /*   880 */    85,   86,   87,   88,   89,   90,   91,   92,   19,  150,
+ /*   890 */    22,  165,  150,   23,  150,   25,  150,  166,   91,   92,
+ /*   900 */   174,  175,   22,  217,  165,  150,  102,  165,  150,  165,
+ /*   910 */   150,  165,  150,  174,  175,   19,  174,  175,   49,   50,
+ /*   920 */   165,   86,   87,  165,   23,  165,   25,  165,   24,  174,
+ /*   930 */   175,  187,  174,  175,  174,  175,  205,   68,   69,   70,
+ /*   940 */    71,   72,   73,   74,   75,   76,   77,   78,   79,   80,
+ /*   950 */   150,   82,   83,   84,   85,   86,   87,   88,   89,   90,
+ /*   960 */    91,   92,   19,  150,  150,  165,  150,  150,  166,   23,
+ /*   970 */   150,   25,  160,   20,  174,  175,    1,    2,  165,  165,
+ /*   980 */   104,  165,  165,   43,  150,  165,  240,  150,   49,   50,
+ /*   990 */   174,  175,   49,   50,   23,   23,   25,   25,   53,  165,
+ /*  1000 */   187,  187,  165,   23,  187,   25,  194,  205,  174,  175,
+ /*  1010 */    71,   72,   69,   70,   71,   72,   73,   74,   75,   76,
+ /*  1020 */    77,   78,   79,   80,  150,   82,   83,   84,   85,   86,
+ /*  1030 */    87,   88,   89,   90,   91,   92,   19,   98,  150,  165,
+ /*  1040 */   150,  160,  150,   59,   25,   53,  104,   22,  174,  175,
+ /*  1050 */   213,  138,    5,  165,    1,  165,  150,  165,  150,  150,
+ /*  1060 */   240,  150,  174,  175,  174,  175,   49,   50,  118,  150,
+ /*  1070 */    35,  165,   27,  165,  165,  194,  165,  108,  127,   76,
+ /*  1080 */   174,  175,  174,  175,  165,  174,  175,   70,   71,   72,
+ /*  1090 */    73,   74,   75,   76,   77,   78,   79,   80,  166,   82,
+ /*  1100 */    83,   84,   85,   86,   87,   88,   89,   90,   91,   92,
+ /*  1110 */    19,   20,  193,   22,  150,  150,  150,   26,   27,   76,
+ /*  1120 */   150,   22,    1,  150,  119,  121,  217,   20,   37,  165,
+ /*  1130 */   165,  165,   16,   19,   20,  165,   22,  205,  165,  119,
+ /*  1140 */    26,   27,  108,  128,  150,  150,  150,   56,  150,   22,
+ /*  1150 */   150,   37,  150,  127,  160,   23,  150,   66,  193,  165,
+ /*  1160 */   165,  165,   16,  165,   23,  165,  150,  165,  174,  175,
+ /*  1170 */    56,  165,  150,   65,  174,  175,   15,   86,   87,   88,
+ /*  1180 */    66,  165,  140,  150,   93,   94,   95,  165,  194,   98,
+ /*  1190 */   174,  175,   22,    3,  164,  193,  174,  175,  165,  150,
+ /*  1200 */    86,   87,    4,  180,  150,  248,  251,   93,   94,   95,
+ /*  1210 */   216,  180,   98,  251,  165,  221,  150,  149,    6,  165,
+ /*  1220 */   129,  130,  131,  132,  133,  134,  193,  150,  174,  175,
+ /*  1230 */   116,  165,   19,   20,  150,   22,  149,  151,  150,   26,
+ /*  1240 */    27,  149,  165,  129,  130,  131,  132,  133,  134,  165,
+ /*  1250 */    37,  174,  175,  165,  149,   19,   20,   13,   22,  150,
+ /*  1260 */   150,  150,   26,   27,  146,  147,  151,  150,   25,   56,
+ /*  1270 */   152,  159,  154,   37,  165,  165,  165,  193,  160,   66,
+ /*  1280 */   116,  193,  165,  174,  175,  174,  175,  194,  199,  150,
+ /*  1290 */   200,  126,   56,  124,  123,  150,  201,  122,  150,   86,
+ /*  1300 */    87,  150,   66,  193,  165,  202,   93,   94,   95,  150,
+ /*  1310 */   165,   98,  194,  165,  125,   22,  165,  150,  150,   26,
+ /*  1320 */    27,  135,   86,   87,  165,  174,  175,  203,  226,   93,
+ /*  1330 */    94,   95,  165,  165,   98,  150,  218,  150,  193,  157,
+ /*  1340 */   118,  157,  129,  130,  131,  132,  133,  134,    5,  104,
+ /*  1350 */   165,  211,  165,   10,   11,   12,   13,   14,  150,   66,
+ /*  1360 */    17,  174,  175,  210,  246,  129,  130,  131,  132,  133,
+ /*  1370 */   134,  150,  210,  165,   31,  121,   33,  150,  150,   86,
+ /*  1380 */    87,  176,  174,  175,  150,   42,  165,   94,  211,  210,
+ /*  1390 */   150,   98,  165,  165,  211,  174,  175,  150,   55,  165,
+ /*  1400 */    57,  150,  174,  175,   61,  165,  150,   64,  174,  175,
+ /*  1410 */   150,  150,  165,  150,  174,  175,  165,  104,  150,  184,
+ /*  1420 */   150,  165,  129,  130,  131,  165,  165,  150,  165,  150,
+ /*  1430 */   150,  176,  150,  165,   47,  165,  150,  150,  176,  103,
+ /*  1440 */   150,   22,  165,  178,  165,  165,  179,  165,  105,  106,
+ /*  1450 */   107,  165,  165,  229,  111,  165,   92,  176,  229,  116,
+ /*  1460 */   184,  176,  179,  156,  176,  176,   18,  157,  156,  237,
+ /*  1470 */    45,  157,  156,  135,  157,  157,  238,  156,   68,  157,
+ /*  1480 */   189,  189,  139,  219,   22,  157,   18,  192,  192,  192,
+ /*  1490 */   192,  189,  219,  199,  157,  242,   40,  157,  199,  242,
+ /*  1500 */   153,  157,   38,  245,  196,  166,  232,  198,  177,  177,
+ /*  1510 */   232,  227,  209,  178,  166,  182,  166,  148,  177,  177,
+ /*  1520 */   209,  196,  177,  199,  209,  199,  166,  208,   92,  195,
+ /*  1530 */   174,  174,  183,  252,  183,  183,  252,  191,  252,  235,
+ /*  1540 */   186,  241,  241,  252,  186,  252,  252,  252,  252,  252,
+ /*  1550 */   252,  252,  252,  252,  252,  252,  236,
+};
+#define YY_SHIFT_USE_DFLT (-74)
+#define YY_SHIFT_COUNT (418)
+#define YY_SHIFT_MIN   (-73)
+#define YY_SHIFT_MAX   (1468)
+static const short yy_shift_ofst[] = {
+ /*     0 */   975, 1114, 1343, 1114, 1213, 1213,   90,   90,    0,  -19,
+ /*    10 */  1213, 1213, 1213, 1213, 1213,  345,  445,  721, 1091, 1213,
+ /*    20 */  1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
+ /*    30 */  1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
+ /*    40 */  1213, 1213, 1213, 1213, 1213, 1213, 1213, 1236, 1213, 1213,
+ /*    50 */  1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213, 1213,
+ /*    60 */  1213,  199,  445,  445,  835,  835,  365, 1164,   55,  647,
+ /*    70 */   573,  499,  425,  351,  277,  203,  129,  795,  795,  795,
+ /*    80 */   795,  795,  795,  795,  795,  795,  795,  795,  795,  795,
+ /*    90 */   795,  795,  795,  795,  795,  869,  795,  943, 1017, 1017,
+ /*   100 */   -69,  -45,  -45,  -45,  -45,  -45,   -1,   58,  138,  100,
+ /*   110 */   445,  445,  445,  445,  445,  445,  445,  445,  445,  445,
+ /*   120 */   445,  445,  445,  445,  445,  445,  537,  438,  445,  445,
+ /*   130 */   445,  445,  445,  365,  807, 1436,  -74,  -74,  -74, 1293,
+ /*   140 */    73,  434,  434,  311,  314,  290,  283,  286,  540,  467,
+ /*   150 */   445,  445,  445,  445,  445,  445,  445,  445,  445,  445,
+ /*   160 */   445,  445,  445,  445,  445,  445,  445,  445,  445,  445,
+ /*   170 */   445,  445,  445,  445,  445,  445,  445,  445,  445,  445,
+ /*   180 */   445,  445,   65,  722,  722,  722,  688,  266, 1164, 1164,
+ /*   190 */  1164,  -74,  -74,  -74,  136,  168,  168,  234,  360,  360,
+ /*   200 */   360,  430,  372,  435,  352,  278,  126,  -36,  -36,  -36,
+ /*   210 */   -36,  421,  651,  -36,  -36,  592,  292,  212,  623,  158,
+ /*   220 */   204,  204,  505,  158,  505,  144,  365,  154,  365,  154,
+ /*   230 */   645,  154,  204,  154,  154,  535,  548,  548,  365,  387,
+ /*   240 */   508,  233, 1464, 1222, 1222, 1456, 1456, 1222, 1462, 1410,
+ /*   250 */  1165, 1468, 1468, 1468, 1468, 1222, 1165, 1462, 1410, 1410,
+ /*   260 */  1222, 1448, 1338, 1425, 1222, 1222, 1448, 1222, 1448, 1222,
+ /*   270 */  1448, 1419, 1313, 1313, 1313, 1387, 1364, 1364, 1419, 1313,
+ /*   280 */  1336, 1313, 1387, 1313, 1313, 1254, 1245, 1254, 1245, 1254,
+ /*   290 */  1245, 1222, 1222, 1186, 1189, 1175, 1169, 1171, 1165, 1164,
+ /*   300 */  1243, 1244, 1244, 1212, 1212, 1212, 1212,  -74,  -74,  -74,
+ /*   310 */   -74,  -74,  -74,  939,  104,  680,  571,  327,    1,  980,
+ /*   320 */    26,  972,  971,  946,  901,  870,  830,  806,   54,   21,
+ /*   330 */   -73,  510,  242, 1198, 1190, 1170, 1042, 1161, 1108, 1146,
+ /*   340 */  1141, 1132, 1015, 1127, 1026, 1034, 1020, 1107, 1004, 1116,
+ /*   350 */  1121, 1005, 1099,  951, 1043, 1003,  969, 1045, 1035,  950,
+ /*   360 */  1053, 1047, 1025,  942,  913,  992, 1019,  945,  984,  940,
+ /*   370 */   876,  904,  953,  896,  748,  804,  880,  786,  868,  819,
+ /*   380 */   805,  810,  773,  751,  766,  706,  716,  691,  681,  568,
+ /*   390 */   655,  638,  676,  516,  541,  594,  599,  567,  541,  534,
+ /*   400 */   507,  527,  498,  523,  466,  382,  409,  384,  357,    6,
+ /*   410 */   240,  224,  143,   62,   18,   71,   39,    9,    5,
+};
+#define YY_REDUCE_USE_DFLT (-142)
+#define YY_REDUCE_COUNT (312)
+#define YY_REDUCE_MIN   (-141)
+#define YY_REDUCE_MAX   (1369)
+static const short yy_reduce_ofst[] = {
+ /*     0 */  -141,  994, 1118,  223,  157,  -53,   93,   89,   83,  375,
+ /*    10 */   386,  381,  379,  308,  295,  325,  -47,   27, 1240, 1234,
+ /*    20 */  1228, 1221, 1208, 1187, 1151, 1111, 1109, 1077, 1054, 1022,
+ /*    30 */  1016, 1000,  911,  908,  906,  890,  888,  874,  834,  816,
+ /*    40 */   800,  760,  758,  755,  742,  739,  726,  685,  672,  668,
+ /*    50 */   665,  652,  611,  609,  607,  604,  591,  578,  526,  519,
+ /*    60 */   453,  474,  454,  461,  443,  245,  442,  473,  484,  484,
+ /*    70 */   484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
+ /*    80 */   484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
+ /*    90 */   484,  484,  484,  484,  484,  484,  484,  484,  484,  484,
+ /*   100 */   484,  484,  484,  484,  484,  484,  484,  130,  484,  484,
+ /*   110 */  1145,  909, 1110, 1088, 1084, 1033, 1002,  965,  820,  837,
+ /*   120 */   746,  686,  612,  817,  610,  919,  221,  563,  814,  813,
+ /*   130 */   744,  669,  470,  543,  484,  484,  484,  484,  484,  291,
+ /*   140 */   569,  671,  658,  970, 1290, 1287, 1286, 1282,  518,  518,
+ /*   150 */  1280, 1279, 1277, 1270, 1268, 1263, 1261, 1260, 1256, 1251,
+ /*   160 */  1247, 1227, 1185, 1168, 1167, 1159, 1148, 1139, 1117, 1066,
+ /*   170 */  1049, 1006,  998,  996,  995,  973,  970,  966,  964,  892,
+ /*   180 */   762,  -52,  881,  932,  802,  731,  619,  812,  664,  660,
+ /*   190 */   627,  392,  331,  124, 1358, 1357, 1356, 1354, 1352, 1351,
+ /*   200 */  1349, 1319, 1334, 1346, 1334, 1334, 1334, 1334, 1334, 1334,
+ /*   210 */  1334, 1320, 1304, 1334, 1334, 1319, 1360, 1325, 1369, 1326,
+ /*   220 */  1315, 1311, 1301, 1324, 1300, 1335, 1350, 1345, 1348, 1342,
+ /*   230 */  1333, 1341, 1303, 1332, 1331, 1284, 1278, 1274, 1339, 1309,
+ /*   240 */  1308, 1347, 1258, 1344, 1340, 1257, 1253, 1337, 1273, 1302,
+ /*   250 */  1299, 1298, 1297, 1296, 1295, 1328, 1294, 1264, 1292, 1291,
+ /*   260 */  1322, 1321, 1238, 1232, 1318, 1317, 1316, 1314, 1312, 1310,
+ /*   270 */  1307, 1283, 1289, 1288, 1285, 1276, 1229, 1224, 1267, 1281,
+ /*   280 */  1265, 1262, 1235, 1255, 1205, 1183, 1179, 1177, 1162, 1140,
+ /*   290 */  1153, 1184, 1182, 1102, 1124, 1103, 1095, 1090, 1089, 1093,
+ /*   300 */  1112, 1115, 1086, 1105, 1092, 1087, 1068,  962,  955,  957,
+ /*   310 */  1031, 1023, 1030,
+};
+static const YYACTIONTYPE yy_default[] = {
+ /*     0 */   635,  870,  959,  959,  959,  870,  899,  899,  959,  759,
+ /*    10 */   959,  959,  959,  959,  868,  959,  959,  933,  959,  959,
+ /*    20 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*    30 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*    40 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*    50 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*    60 */   959,  959,  959,  959,  899,  899,  674,  763,  794,  959,
+ /*    70 */   959,  959,  959,  959,  959,  959,  959,  932,  934,  809,
+ /*    80 */   808,  802,  801,  912,  774,  799,  792,  785,  796,  871,
+ /*    90 */   864,  865,  863,  867,  872,  959,  795,  831,  848,  830,
+ /*   100 */   842,  847,  854,  846,  843,  833,  832,  666,  834,  835,
+ /*   110 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*   120 */   959,  959,  959,  959,  959,  959,  661,  728,  959,  959,
+ /*   130 */   959,  959,  959,  959,  836,  837,  851,  850,  849,  959,
+ /*   140 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*   150 */   959,  939,  937,  959,  883,  959,  959,  959,  959,  959,
+ /*   160 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*   170 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*   180 */   959,  641,  959,  759,  759,  759,  635,  959,  959,  959,
+ /*   190 */   959,  951,  763,  753,  719,  959,  959,  959,  959,  959,
+ /*   200 */   959,  959,  959,  959,  959,  959,  959,  804,  742,  922,
+ /*   210 */   924,  959,  905,  740,  663,  761,  676,  751,  643,  798,
+ /*   220 */   776,  776,  917,  798,  917,  700,  959,  788,  959,  788,
+ /*   230 */   697,  788,  776,  788,  788,  866,  959,  959,  959,  760,
+ /*   240 */   751,  959,  944,  767,  767,  936,  936,  767,  810,  732,
+ /*   250 */   798,  739,  739,  739,  739,  767,  798,  810,  732,  732,
+ /*   260 */   767,  658,  911,  909,  767,  767,  658,  767,  658,  767,
+ /*   270 */   658,  876,  730,  730,  730,  715,  880,  880,  876,  730,
+ /*   280 */   700,  730,  715,  730,  730,  780,  775,  780,  775,  780,
+ /*   290 */   775,  767,  767,  959,  793,  781,  791,  789,  798,  959,
+ /*   300 */   718,  651,  651,  640,  640,  640,  640,  956,  956,  951,
+ /*   310 */   702,  702,  684,  959,  959,  959,  959,  959,  959,  959,
+ /*   320 */   885,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*   330 */   959,  959,  959,  959,  636,  946,  959,  959,  943,  959,
+ /*   340 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*   350 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  915,
+ /*   360 */   959,  959,  959,  959,  959,  959,  908,  907,  959,  959,
+ /*   370 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*   380 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  959,
+ /*   390 */   959,  959,  959,  959,  790,  959,  782,  959,  869,  959,
+ /*   400 */   959,  959,  959,  959,  959,  959,  959,  959,  959,  745,
+ /*   410 */   819,  959,  818,  822,  817,  668,  959,  649,  959,  632,
+ /*   420 */   637,  955,  958,  957,  954,  953,  952,  947,  945,  942,
+ /*   430 */   941,  940,  938,  935,  931,  889,  887,  894,  893,  892,
+ /*   440 */   891,  890,  888,  886,  884,  805,  803,  800,  797,  930,
+ /*   450 */   882,  741,  738,  737,  657,  948,  914,  923,  921,  811,
+ /*   460 */   920,  919,  918,  916,  913,  900,  807,  806,  733,  874,
+ /*   470 */   873,  660,  904,  903,  902,  906,  910,  901,  769,  659,
+ /*   480 */   656,  665,  722,  721,  729,  727,  726,  725,  724,  723,
+ /*   490 */   720,  667,  675,  686,  714,  699,  698,  879,  881,  878,
+ /*   500 */   877,  707,  706,  712,  711,  710,  709,  708,  705,  704,
+ /*   510 */   703,  696,  695,  701,  694,  717,  716,  713,  693,  736,
+ /*   520 */   735,  734,  731,  692,  691,  690,  822,  689,  688,  828,
+ /*   530 */   827,  815,  858,  756,  755,  754,  766,  765,  778,  777,
+ /*   540 */   813,  812,  779,  764,  758,  757,  773,  772,  771,  770,
+ /*   550 */   762,  752,  784,  787,  786,  783,  860,  768,  857,  929,
+ /*   560 */   928,  927,  926,  925,  862,  861,  829,  826,  679,  680,
+ /*   570 */   898,  896,  897,  895,  682,  681,  678,  677,  859,  747,
+ /*   580 */   746,  855,  852,  844,  840,  856,  853,  845,  841,  839,
+ /*   590 */   838,  824,  823,  821,  820,  816,  825,  670,  748,  744,
+ /*   600 */   743,  814,  750,  749,  687,  685,  683,  664,  662,  655,
+ /*   610 */   653,  652,  654,  650,  648,  647,  646,  645,  644,  673,
+ /*   620 */   672,  671,  669,  668,  642,  639,  638,  634,  633,  631,
+};
+
+/* The next table maps tokens into fallback tokens.  If a construct
+** like the following:
+** 
+**      %fallback ID X Y Z.
+**
+** appears in the grammar, then ID becomes a fallback token for X, Y,
+** and Z.  Whenever one of the tokens X, Y, or Z is input to the parser
+** but it does not parse, the type of the token is changed to ID and
+** the parse is retried before an error is thrown.
+*/
+#ifdef YYFALLBACK
+static const YYCODETYPE yyFallback[] = {
+    0,  /*          $ => nothing */
+    0,  /*       SEMI => nothing */
+   26,  /*    EXPLAIN => ID */
+   26,  /*      QUERY => ID */
+   26,  /*       PLAN => ID */
+   26,  /*      BEGIN => ID */
+    0,  /* TRANSACTION => nothing */
+   26,  /*   DEFERRED => ID */
+   26,  /*  IMMEDIATE => ID */
+   26,  /*  EXCLUSIVE => ID */
+    0,  /*     COMMIT => nothing */
+   26,  /*        END => ID */
+   26,  /*   ROLLBACK => ID */
+   26,  /*  SAVEPOINT => ID */
+   26,  /*    RELEASE => ID */
+    0,  /*         TO => nothing */
+    0,  /*      TABLE => nothing */
+    0,  /*     CREATE => nothing */
+   26,  /*         IF => ID */
+    0,  /*        NOT => nothing */
+    0,  /*     EXISTS => nothing */
+   26,  /*       TEMP => ID */
+    0,  /*         LP => nothing */
+    0,  /*         RP => nothing */
+    0,  /*         AS => nothing */
+    0,  /*      COMMA => nothing */
+    0,  /*         ID => nothing */
+    0,  /*    INDEXED => nothing */
+   26,  /*      ABORT => ID */
+   26,  /*     ACTION => ID */
+   26,  /*      AFTER => ID */
+   26,  /*    ANALYZE => ID */
+   26,  /*        ASC => ID */
+   26,  /*     ATTACH => ID */
+   26,  /*     BEFORE => ID */
+   26,  /*         BY => ID */
+   26,  /*    CASCADE => ID */
+   26,  /*       CAST => ID */
+   26,  /*   COLUMNKW => ID */
+   26,  /*   CONFLICT => ID */
+   26,  /*   DATABASE => ID */
+   26,  /*       DESC => ID */
+   26,  /*     DETACH => ID */
+   26,  /*       EACH => ID */
+   26,  /*       FAIL => ID */
+   26,  /*        FOR => ID */
+   26,  /*     IGNORE => ID */
+   26,  /*  INITIALLY => ID */
+   26,  /*    INSTEAD => ID */
+   26,  /*    LIKE_KW => ID */
+   26,  /*      MATCH => ID */
+   26,  /*         NO => ID */
+   26,  /*        KEY => ID */
+   26,  /*         OF => ID */
+   26,  /*     OFFSET => ID */
+   26,  /*     PRAGMA => ID */
+   26,  /*      RAISE => ID */
+   26,  /*    REPLACE => ID */
+   26,  /*   RESTRICT => ID */
+   26,  /*        ROW => ID */
+   26,  /*    TRIGGER => ID */
+   26,  /*     VACUUM => ID */
+   26,  /*       VIEW => ID */
+   26,  /*    VIRTUAL => ID */
+   26,  /*    REINDEX => ID */
+   26,  /*     RENAME => ID */
+   26,  /*   CTIME_KW => ID */
+};
+#endif /* YYFALLBACK */
+
+/* The following structure represents a single element of the
+** parser's stack.  Information stored includes:
+**
+**   +  The state number for the parser at this level of the stack.
+**
+**   +  The value of the token stored at this level of the stack.
+**      (In other words, the "major" token.)
+**
+**   +  The semantic value stored at this level of the stack.  This is
+**      the information used by the action routines in the grammar.
+**      It is sometimes called the "minor" token.
+*/
+struct yyStackEntry {
+  YYACTIONTYPE stateno;  /* The state-number */
+  YYCODETYPE major;      /* The major token value.  This is the code
+                         ** number for the token at this stack level */
+  YYMINORTYPE minor;     /* The user-supplied minor token value.  This
+                         ** is the value of the token  */
+};
+typedef struct yyStackEntry yyStackEntry;
+
+/* The state of the parser is completely contained in an instance of
+** the following structure */
+struct yyParser {
+  int yyidx;                    /* Index of top element in stack */
+#ifdef YYTRACKMAXSTACKDEPTH
+  int yyidxMax;                 /* Maximum value of yyidx */
+#endif
+  int yyerrcnt;                 /* Shifts left before out of the error */
+  sqlite3ParserARG_SDECL                /* A place to hold %extra_argument */
+#if YYSTACKDEPTH<=0
+  int yystksz;                  /* Current side of the stack */
+  yyStackEntry *yystack;        /* The parser's stack */
+#else
+  yyStackEntry yystack[YYSTACKDEPTH];  /* The parser's stack */
+#endif
+};
+typedef struct yyParser yyParser;
+
+#ifndef NDEBUG
+static FILE *yyTraceFILE = 0;
+static char *yyTracePrompt = 0;
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/* 
+** Turn parser tracing on by giving a stream to which to write the trace
+** and a prompt to preface each trace message.  Tracing is turned off
+** by making either argument NULL 
+**
+** Inputs:
+** <ul>
+** <li> A FILE* to which trace output should be written.
+**      If NULL, then tracing is turned off.
+** <li> A prefix string written at the beginning of every
+**      line of trace output.  If NULL, then tracing is
+**      turned off.
+** </ul>
+**
+** Outputs:
+** None.
+*/
+SQLITE_PRIVATE void sqlite3ParserTrace(FILE *TraceFILE, char *zTracePrompt){
+  yyTraceFILE = TraceFILE;
+  yyTracePrompt = zTracePrompt;
+  if( yyTraceFILE==0 ) yyTracePrompt = 0;
+  else if( yyTracePrompt==0 ) yyTraceFILE = 0;
+}
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/* For tracing shifts, the names of all terminals and nonterminals
+** are required.  The following table supplies these names */
+static const char *const yyTokenName[] = { 
+  "$",             "SEMI",          "EXPLAIN",       "QUERY",       
+  "PLAN",          "BEGIN",         "TRANSACTION",   "DEFERRED",    
+  "IMMEDIATE",     "EXCLUSIVE",     "COMMIT",        "END",         
+  "ROLLBACK",      "SAVEPOINT",     "RELEASE",       "TO",          
+  "TABLE",         "CREATE",        "IF",            "NOT",         
+  "EXISTS",        "TEMP",          "LP",            "RP",          
+  "AS",            "COMMA",         "ID",            "INDEXED",     
+  "ABORT",         "ACTION",        "AFTER",         "ANALYZE",     
+  "ASC",           "ATTACH",        "BEFORE",        "BY",          
+  "CASCADE",       "CAST",          "COLUMNKW",      "CONFLICT",    
+  "DATABASE",      "DESC",          "DETACH",        "EACH",        
+  "FAIL",          "FOR",           "IGNORE",        "INITIALLY",   
+  "INSTEAD",       "LIKE_KW",       "MATCH",         "NO",          
+  "KEY",           "OF",            "OFFSET",        "PRAGMA",      
+  "RAISE",         "REPLACE",       "RESTRICT",      "ROW",         
+  "TRIGGER",       "VACUUM",        "VIEW",          "VIRTUAL",     
+  "REINDEX",       "RENAME",        "CTIME_KW",      "ANY",         
+  "OR",            "AND",           "IS",            "BETWEEN",     
+  "IN",            "ISNULL",        "NOTNULL",       "NE",          
+  "EQ",            "GT",            "LE",            "LT",          
+  "GE",            "ESCAPE",        "BITAND",        "BITOR",       
+  "LSHIFT",        "RSHIFT",        "PLUS",          "MINUS",       
+  "STAR",          "SLASH",         "REM",           "CONCAT",      
+  "COLLATE",       "BITNOT",        "STRING",        "JOIN_KW",     
+  "CONSTRAINT",    "DEFAULT",       "NULL",          "PRIMARY",     
+  "UNIQUE",        "CHECK",         "REFERENCES",    "AUTOINCR",    
+  "ON",            "INSERT",        "DELETE",        "UPDATE",      
+  "SET",           "DEFERRABLE",    "FOREIGN",       "DROP",        
+  "UNION",         "ALL",           "EXCEPT",        "INTERSECT",   
+  "SELECT",        "DISTINCT",      "DOT",           "FROM",        
+  "JOIN",          "USING",         "ORDER",         "GROUP",       
+  "HAVING",        "LIMIT",         "WHERE",         "INTO",        
+  "VALUES",        "INTEGER",       "FLOAT",         "BLOB",        
+  "REGISTER",      "VARIABLE",      "CASE",          "WHEN",        
+  "THEN",          "ELSE",          "INDEX",         "ALTER",       
+  "ADD",           "error",         "input",         "cmdlist",     
+  "ecmd",          "explain",       "cmdx",          "cmd",         
+  "transtype",     "trans_opt",     "nm",            "savepoint_opt",
+  "create_table",  "create_table_args",  "createkw",      "temp",        
+  "ifnotexists",   "dbnm",          "columnlist",    "conslist_opt",
+  "select",        "column",        "columnid",      "type",        
+  "carglist",      "id",            "ids",           "typetoken",   
+  "typename",      "signed",        "plus_num",      "minus_num",   
+  "carg",          "ccons",         "term",          "expr",        
+  "onconf",        "sortorder",     "autoinc",       "idxlist_opt", 
+  "refargs",       "defer_subclause",  "refarg",        "refact",      
+  "init_deferred_pred_opt",  "conslist",      "tcons",         "idxlist",     
+  "defer_subclause_opt",  "orconf",        "resolvetype",   "raisetype",   
+  "ifexists",      "fullname",      "oneselect",     "multiselect_op",
+  "distinct",      "selcollist",    "from",          "where_opt",   
+  "groupby_opt",   "having_opt",    "orderby_opt",   "limit_opt",   
+  "sclp",          "as",            "seltablist",    "stl_prefix",  
+  "joinop",        "indexed_opt",   "on_opt",        "using_opt",   
+  "joinop2",       "inscollist",    "sortlist",      "sortitem",    
+  "nexprlist",     "setlist",       "insert_cmd",    "inscollist_opt",
+  "itemlist",      "exprlist",      "likeop",        "between_op",  
+  "in_op",         "case_operand",  "case_exprlist",  "case_else",   
+  "uniqueflag",    "collate",       "nmnum",         "plus_opt",    
+  "number",        "trigger_decl",  "trigger_cmd_list",  "trigger_time",
+  "trigger_event",  "foreach_clause",  "when_clause",   "trigger_cmd", 
+  "trnm",          "tridxby",       "database_kw_opt",  "key_opt",     
+  "add_column_fullname",  "kwcolumn_opt",  "create_vtab",   "vtabarglist", 
+  "vtabarg",       "vtabargtoken",  "lp",            "anylist",     
+};
+#endif /* NDEBUG */
+
+#ifndef NDEBUG
+/* For tracing reduce actions, the names of all rules are required.
+*/
+static const char *const yyRuleName[] = {
+ /*   0 */ "input ::= cmdlist",
+ /*   1 */ "cmdlist ::= cmdlist ecmd",
+ /*   2 */ "cmdlist ::= ecmd",
+ /*   3 */ "ecmd ::= SEMI",
+ /*   4 */ "ecmd ::= explain cmdx SEMI",
+ /*   5 */ "explain ::=",
+ /*   6 */ "explain ::= EXPLAIN",
+ /*   7 */ "explain ::= EXPLAIN QUERY PLAN",
+ /*   8 */ "cmdx ::= cmd",
+ /*   9 */ "cmd ::= BEGIN transtype trans_opt",
+ /*  10 */ "trans_opt ::=",
+ /*  11 */ "trans_opt ::= TRANSACTION",
+ /*  12 */ "trans_opt ::= TRANSACTION nm",
+ /*  13 */ "transtype ::=",
+ /*  14 */ "transtype ::= DEFERRED",
+ /*  15 */ "transtype ::= IMMEDIATE",
+ /*  16 */ "transtype ::= EXCLUSIVE",
+ /*  17 */ "cmd ::= COMMIT trans_opt",
+ /*  18 */ "cmd ::= END trans_opt",
+ /*  19 */ "cmd ::= ROLLBACK trans_opt",
+ /*  20 */ "savepoint_opt ::= SAVEPOINT",
+ /*  21 */ "savepoint_opt ::=",
+ /*  22 */ "cmd ::= SAVEPOINT nm",
+ /*  23 */ "cmd ::= RELEASE savepoint_opt nm",
+ /*  24 */ "cmd ::= ROLLBACK trans_opt TO savepoint_opt nm",
+ /*  25 */ "cmd ::= create_table create_table_args",
+ /*  26 */ "create_table ::= createkw temp TABLE ifnotexists nm dbnm",
+ /*  27 */ "createkw ::= CREATE",
+ /*  28 */ "ifnotexists ::=",
+ /*  29 */ "ifnotexists ::= IF NOT EXISTS",
+ /*  30 */ "temp ::= TEMP",
+ /*  31 */ "temp ::=",
+ /*  32 */ "create_table_args ::= LP columnlist conslist_opt RP",
+ /*  33 */ "create_table_args ::= AS select",
+ /*  34 */ "columnlist ::= columnlist COMMA column",
+ /*  35 */ "columnlist ::= column",
+ /*  36 */ "column ::= columnid type carglist",
+ /*  37 */ "columnid ::= nm",
+ /*  38 */ "id ::= ID",
+ /*  39 */ "id ::= INDEXED",
+ /*  40 */ "ids ::= ID|STRING",
+ /*  41 */ "nm ::= id",
+ /*  42 */ "nm ::= STRING",
+ /*  43 */ "nm ::= JOIN_KW",
+ /*  44 */ "type ::=",
+ /*  45 */ "type ::= typetoken",
+ /*  46 */ "typetoken ::= typename",
+ /*  47 */ "typetoken ::= typename LP signed RP",
+ /*  48 */ "typetoken ::= typename LP signed COMMA signed RP",
+ /*  49 */ "typename ::= ids",
+ /*  50 */ "typename ::= typename ids",
+ /*  51 */ "signed ::= plus_num",
+ /*  52 */ "signed ::= minus_num",
+ /*  53 */ "carglist ::= carglist carg",
+ /*  54 */ "carglist ::=",
+ /*  55 */ "carg ::= CONSTRAINT nm ccons",
+ /*  56 */ "carg ::= ccons",
+ /*  57 */ "ccons ::= DEFAULT term",
+ /*  58 */ "ccons ::= DEFAULT LP expr RP",
+ /*  59 */ "ccons ::= DEFAULT PLUS term",
+ /*  60 */ "ccons ::= DEFAULT MINUS term",
+ /*  61 */ "ccons ::= DEFAULT id",
+ /*  62 */ "ccons ::= NULL onconf",
+ /*  63 */ "ccons ::= NOT NULL onconf",
+ /*  64 */ "ccons ::= PRIMARY KEY sortorder onconf autoinc",
+ /*  65 */ "ccons ::= UNIQUE onconf",
+ /*  66 */ "ccons ::= CHECK LP expr RP",
+ /*  67 */ "ccons ::= REFERENCES nm idxlist_opt refargs",
+ /*  68 */ "ccons ::= defer_subclause",
+ /*  69 */ "ccons ::= COLLATE ids",
+ /*  70 */ "autoinc ::=",
+ /*  71 */ "autoinc ::= AUTOINCR",
+ /*  72 */ "refargs ::=",
+ /*  73 */ "refargs ::= refargs refarg",
+ /*  74 */ "refarg ::= MATCH nm",
+ /*  75 */ "refarg ::= ON INSERT refact",
+ /*  76 */ "refarg ::= ON DELETE refact",
+ /*  77 */ "refarg ::= ON UPDATE refact",
+ /*  78 */ "refact ::= SET NULL",
+ /*  79 */ "refact ::= SET DEFAULT",
+ /*  80 */ "refact ::= CASCADE",
+ /*  81 */ "refact ::= RESTRICT",
+ /*  82 */ "refact ::= NO ACTION",
+ /*  83 */ "defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt",
+ /*  84 */ "defer_subclause ::= DEFERRABLE init_deferred_pred_opt",
+ /*  85 */ "init_deferred_pred_opt ::=",
+ /*  86 */ "init_deferred_pred_opt ::= INITIALLY DEFERRED",
+ /*  87 */ "init_deferred_pred_opt ::= INITIALLY IMMEDIATE",
+ /*  88 */ "conslist_opt ::=",
+ /*  89 */ "conslist_opt ::= COMMA conslist",
+ /*  90 */ "conslist ::= conslist COMMA tcons",
+ /*  91 */ "conslist ::= conslist tcons",
+ /*  92 */ "conslist ::= tcons",
+ /*  93 */ "tcons ::= CONSTRAINT nm",
+ /*  94 */ "tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf",
+ /*  95 */ "tcons ::= UNIQUE LP idxlist RP onconf",
+ /*  96 */ "tcons ::= CHECK LP expr RP onconf",
+ /*  97 */ "tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt",
+ /*  98 */ "defer_subclause_opt ::=",
+ /*  99 */ "defer_subclause_opt ::= defer_subclause",
+ /* 100 */ "onconf ::=",
+ /* 101 */ "onconf ::= ON CONFLICT resolvetype",
+ /* 102 */ "orconf ::=",
+ /* 103 */ "orconf ::= OR resolvetype",
+ /* 104 */ "resolvetype ::= raisetype",
+ /* 105 */ "resolvetype ::= IGNORE",
+ /* 106 */ "resolvetype ::= REPLACE",
+ /* 107 */ "cmd ::= DROP TABLE ifexists fullname",
+ /* 108 */ "ifexists ::= IF EXISTS",
+ /* 109 */ "ifexists ::=",
+ /* 110 */ "cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select",
+ /* 111 */ "cmd ::= DROP VIEW ifexists fullname",
+ /* 112 */ "cmd ::= select",
+ /* 113 */ "select ::= oneselect",
+ /* 114 */ "select ::= select multiselect_op oneselect",
+ /* 115 */ "multiselect_op ::= UNION",
+ /* 116 */ "multiselect_op ::= UNION ALL",
+ /* 117 */ "multiselect_op ::= EXCEPT|INTERSECT",
+ /* 118 */ "oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt",
+ /* 119 */ "distinct ::= DISTINCT",
+ /* 120 */ "distinct ::= ALL",
+ /* 121 */ "distinct ::=",
+ /* 122 */ "sclp ::= selcollist COMMA",
+ /* 123 */ "sclp ::=",
+ /* 124 */ "selcollist ::= sclp expr as",
+ /* 125 */ "selcollist ::= sclp STAR",
+ /* 126 */ "selcollist ::= sclp nm DOT STAR",
+ /* 127 */ "as ::= AS nm",
+ /* 128 */ "as ::= ids",
+ /* 129 */ "as ::=",
+ /* 130 */ "from ::=",
+ /* 131 */ "from ::= FROM seltablist",
+ /* 132 */ "stl_prefix ::= seltablist joinop",
+ /* 133 */ "stl_prefix ::=",
+ /* 134 */ "seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt",
+ /* 135 */ "seltablist ::= stl_prefix LP select RP as on_opt using_opt",
+ /* 136 */ "seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt",
+ /* 137 */ "dbnm ::=",
+ /* 138 */ "dbnm ::= DOT nm",
+ /* 139 */ "fullname ::= nm dbnm",
+ /* 140 */ "joinop ::= COMMA|JOIN",
+ /* 141 */ "joinop ::= JOIN_KW JOIN",
+ /* 142 */ "joinop ::= JOIN_KW nm JOIN",
+ /* 143 */ "joinop ::= JOIN_KW nm nm JOIN",
+ /* 144 */ "on_opt ::= ON expr",
+ /* 145 */ "on_opt ::=",
+ /* 146 */ "indexed_opt ::=",
+ /* 147 */ "indexed_opt ::= INDEXED BY nm",
+ /* 148 */ "indexed_opt ::= NOT INDEXED",
+ /* 149 */ "using_opt ::= USING LP inscollist RP",
+ /* 150 */ "using_opt ::=",
+ /* 151 */ "orderby_opt ::=",
+ /* 152 */ "orderby_opt ::= ORDER BY sortlist",
+ /* 153 */ "sortlist ::= sortlist COMMA sortitem sortorder",
+ /* 154 */ "sortlist ::= sortitem sortorder",
+ /* 155 */ "sortitem ::= expr",
+ /* 156 */ "sortorder ::= ASC",
+ /* 157 */ "sortorder ::= DESC",
+ /* 158 */ "sortorder ::=",
+ /* 159 */ "groupby_opt ::=",
+ /* 160 */ "groupby_opt ::= GROUP BY nexprlist",
+ /* 161 */ "having_opt ::=",
+ /* 162 */ "having_opt ::= HAVING expr",
+ /* 163 */ "limit_opt ::=",
+ /* 164 */ "limit_opt ::= LIMIT expr",
+ /* 165 */ "limit_opt ::= LIMIT expr OFFSET expr",
+ /* 166 */ "limit_opt ::= LIMIT expr COMMA expr",
+ /* 167 */ "cmd ::= DELETE FROM fullname indexed_opt where_opt",
+ /* 168 */ "where_opt ::=",
+ /* 169 */ "where_opt ::= WHERE expr",
+ /* 170 */ "cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt",
+ /* 171 */ "setlist ::= setlist COMMA nm EQ expr",
+ /* 172 */ "setlist ::= nm EQ expr",
+ /* 173 */ "cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP",
+ /* 174 */ "cmd ::= insert_cmd INTO fullname inscollist_opt select",
+ /* 175 */ "cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES",
+ /* 176 */ "insert_cmd ::= INSERT orconf",
+ /* 177 */ "insert_cmd ::= REPLACE",
+ /* 178 */ "itemlist ::= itemlist COMMA expr",
+ /* 179 */ "itemlist ::= expr",
+ /* 180 */ "inscollist_opt ::=",
+ /* 181 */ "inscollist_opt ::= LP inscollist RP",
+ /* 182 */ "inscollist ::= inscollist COMMA nm",
+ /* 183 */ "inscollist ::= nm",
+ /* 184 */ "expr ::= term",
+ /* 185 */ "expr ::= LP expr RP",
+ /* 186 */ "term ::= NULL",
+ /* 187 */ "expr ::= id",
+ /* 188 */ "expr ::= JOIN_KW",
+ /* 189 */ "expr ::= nm DOT nm",
+ /* 190 */ "expr ::= nm DOT nm DOT nm",
+ /* 191 */ "term ::= INTEGER|FLOAT|BLOB",
+ /* 192 */ "term ::= STRING",
+ /* 193 */ "expr ::= REGISTER",
+ /* 194 */ "expr ::= VARIABLE",
+ /* 195 */ "expr ::= expr COLLATE ids",
+ /* 196 */ "expr ::= CAST LP expr AS typetoken RP",
+ /* 197 */ "expr ::= ID LP distinct exprlist RP",
+ /* 198 */ "expr ::= ID LP STAR RP",
+ /* 199 */ "term ::= CTIME_KW",
+ /* 200 */ "expr ::= expr AND expr",
+ /* 201 */ "expr ::= expr OR expr",
+ /* 202 */ "expr ::= expr LT|GT|GE|LE expr",
+ /* 203 */ "expr ::= expr EQ|NE expr",
+ /* 204 */ "expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr",
+ /* 205 */ "expr ::= expr PLUS|MINUS expr",
+ /* 206 */ "expr ::= expr STAR|SLASH|REM expr",
+ /* 207 */ "expr ::= expr CONCAT expr",
+ /* 208 */ "likeop ::= LIKE_KW",
+ /* 209 */ "likeop ::= NOT LIKE_KW",
+ /* 210 */ "likeop ::= MATCH",
+ /* 211 */ "likeop ::= NOT MATCH",
+ /* 212 */ "expr ::= expr likeop expr",
+ /* 213 */ "expr ::= expr likeop expr ESCAPE expr",
+ /* 214 */ "expr ::= expr ISNULL|NOTNULL",
+ /* 215 */ "expr ::= expr NOT NULL",
+ /* 216 */ "expr ::= expr IS expr",
+ /* 217 */ "expr ::= expr IS NOT expr",
+ /* 218 */ "expr ::= NOT expr",
+ /* 219 */ "expr ::= BITNOT expr",
+ /* 220 */ "expr ::= MINUS expr",
+ /* 221 */ "expr ::= PLUS expr",
+ /* 222 */ "between_op ::= BETWEEN",
+ /* 223 */ "between_op ::= NOT BETWEEN",
+ /* 224 */ "expr ::= expr between_op expr AND expr",
+ /* 225 */ "in_op ::= IN",
+ /* 226 */ "in_op ::= NOT IN",
+ /* 227 */ "expr ::= expr in_op LP exprlist RP",
+ /* 228 */ "expr ::= LP select RP",
+ /* 229 */ "expr ::= expr in_op LP select RP",
+ /* 230 */ "expr ::= expr in_op nm dbnm",
+ /* 231 */ "expr ::= EXISTS LP select RP",
+ /* 232 */ "expr ::= CASE case_operand case_exprlist case_else END",
+ /* 233 */ "case_exprlist ::= case_exprlist WHEN expr THEN expr",
+ /* 234 */ "case_exprlist ::= WHEN expr THEN expr",
+ /* 235 */ "case_else ::= ELSE expr",
+ /* 236 */ "case_else ::=",
+ /* 237 */ "case_operand ::= expr",
+ /* 238 */ "case_operand ::=",
+ /* 239 */ "exprlist ::= nexprlist",
+ /* 240 */ "exprlist ::=",
+ /* 241 */ "nexprlist ::= nexprlist COMMA expr",
+ /* 242 */ "nexprlist ::= expr",
+ /* 243 */ "cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP",
+ /* 244 */ "uniqueflag ::= UNIQUE",
+ /* 245 */ "uniqueflag ::=",
+ /* 246 */ "idxlist_opt ::=",
+ /* 247 */ "idxlist_opt ::= LP idxlist RP",
+ /* 248 */ "idxlist ::= idxlist COMMA nm collate sortorder",
+ /* 249 */ "idxlist ::= nm collate sortorder",
+ /* 250 */ "collate ::=",
+ /* 251 */ "collate ::= COLLATE ids",
+ /* 252 */ "cmd ::= DROP INDEX ifexists fullname",
+ /* 253 */ "cmd ::= VACUUM",
+ /* 254 */ "cmd ::= VACUUM nm",
+ /* 255 */ "cmd ::= PRAGMA nm dbnm",
+ /* 256 */ "cmd ::= PRAGMA nm dbnm EQ nmnum",
+ /* 257 */ "cmd ::= PRAGMA nm dbnm LP nmnum RP",
+ /* 258 */ "cmd ::= PRAGMA nm dbnm EQ minus_num",
+ /* 259 */ "cmd ::= PRAGMA nm dbnm LP minus_num RP",
+ /* 260 */ "nmnum ::= plus_num",
+ /* 261 */ "nmnum ::= nm",
+ /* 262 */ "nmnum ::= ON",
+ /* 263 */ "nmnum ::= DELETE",
+ /* 264 */ "nmnum ::= DEFAULT",
+ /* 265 */ "plus_num ::= plus_opt number",
+ /* 266 */ "minus_num ::= MINUS number",
+ /* 267 */ "number ::= INTEGER|FLOAT",
+ /* 268 */ "plus_opt ::= PLUS",
+ /* 269 */ "plus_opt ::=",
+ /* 270 */ "cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END",
+ /* 271 */ "trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause",
+ /* 272 */ "trigger_time ::= BEFORE",
+ /* 273 */ "trigger_time ::= AFTER",
+ /* 274 */ "trigger_time ::= INSTEAD OF",
+ /* 275 */ "trigger_time ::=",
+ /* 276 */ "trigger_event ::= DELETE|INSERT",
+ /* 277 */ "trigger_event ::= UPDATE",
+ /* 278 */ "trigger_event ::= UPDATE OF inscollist",
+ /* 279 */ "foreach_clause ::=",
+ /* 280 */ "foreach_clause ::= FOR EACH ROW",
+ /* 281 */ "when_clause ::=",
+ /* 282 */ "when_clause ::= WHEN expr",
+ /* 283 */ "trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI",
+ /* 284 */ "trigger_cmd_list ::= trigger_cmd SEMI",
+ /* 285 */ "trnm ::= nm",
+ /* 286 */ "trnm ::= nm DOT nm",
+ /* 287 */ "tridxby ::=",
+ /* 288 */ "tridxby ::= INDEXED BY nm",
+ /* 289 */ "tridxby ::= NOT INDEXED",
+ /* 290 */ "trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt",
+ /* 291 */ "trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP",
+ /* 292 */ "trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select",
+ /* 293 */ "trigger_cmd ::= DELETE FROM trnm tridxby where_opt",
+ /* 294 */ "trigger_cmd ::= select",
+ /* 295 */ "expr ::= RAISE LP IGNORE RP",
+ /* 296 */ "expr ::= RAISE LP raisetype COMMA nm RP",
+ /* 297 */ "raisetype ::= ROLLBACK",
+ /* 298 */ "raisetype ::= ABORT",
+ /* 299 */ "raisetype ::= FAIL",
+ /* 300 */ "cmd ::= DROP TRIGGER ifexists fullname",
+ /* 301 */ "cmd ::= ATTACH database_kw_opt expr AS expr key_opt",
+ /* 302 */ "cmd ::= DETACH database_kw_opt expr",
+ /* 303 */ "key_opt ::=",
+ /* 304 */ "key_opt ::= KEY expr",
+ /* 305 */ "database_kw_opt ::= DATABASE",
+ /* 306 */ "database_kw_opt ::=",
+ /* 307 */ "cmd ::= REINDEX",
+ /* 308 */ "cmd ::= REINDEX nm dbnm",
+ /* 309 */ "cmd ::= ANALYZE",
+ /* 310 */ "cmd ::= ANALYZE nm dbnm",
+ /* 311 */ "cmd ::= ALTER TABLE fullname RENAME TO nm",
+ /* 312 */ "cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column",
+ /* 313 */ "add_column_fullname ::= fullname",
+ /* 314 */ "kwcolumn_opt ::=",
+ /* 315 */ "kwcolumn_opt ::= COLUMNKW",
+ /* 316 */ "cmd ::= create_vtab",
+ /* 317 */ "cmd ::= create_vtab LP vtabarglist RP",
+ /* 318 */ "create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm",
+ /* 319 */ "vtabarglist ::= vtabarg",
+ /* 320 */ "vtabarglist ::= vtabarglist COMMA vtabarg",
+ /* 321 */ "vtabarg ::=",
+ /* 322 */ "vtabarg ::= vtabarg vtabargtoken",
+ /* 323 */ "vtabargtoken ::= ANY",
+ /* 324 */ "vtabargtoken ::= lp anylist RP",
+ /* 325 */ "lp ::= LP",
+ /* 326 */ "anylist ::=",
+ /* 327 */ "anylist ::= anylist LP anylist RP",
+ /* 328 */ "anylist ::= anylist ANY",
+};
+#endif /* NDEBUG */
+
+
+#if YYSTACKDEPTH<=0
+/*
+** Try to increase the size of the parser stack.
+*/
+static void yyGrowStack(yyParser *p){
+  int newSize;
+  yyStackEntry *pNew;
+
+  newSize = p->yystksz*2 + 100;
+  pNew = realloc(p->yystack, newSize*sizeof(pNew[0]));
+  if( pNew ){
+    p->yystack = pNew;
+    p->yystksz = newSize;
+#ifndef NDEBUG
+    if( yyTraceFILE ){
+      fprintf(yyTraceFILE,"%sStack grows to %d entries!\n",
+              yyTracePrompt, p->yystksz);
+    }
+#endif
+  }
+}
+#endif
+
+/* 
+** This function allocates a new parser.
+** The only argument is a pointer to a function which works like
+** malloc.
+**
+** Inputs:
+** A pointer to the function used to allocate memory.
+**
+** Outputs:
+** A pointer to a parser.  This pointer is used in subsequent calls
+** to sqlite3Parser and sqlite3ParserFree.
+*/
+SQLITE_PRIVATE void *sqlite3ParserAlloc(void *(*mallocProc)(size_t)){
+  yyParser *pParser;
+  pParser = (yyParser*)(*mallocProc)( (size_t)sizeof(yyParser) );
+  if( pParser ){
+    pParser->yyidx = -1;
+#ifdef YYTRACKMAXSTACKDEPTH
+    pParser->yyidxMax = 0;
+#endif
+#if YYSTACKDEPTH<=0
+    pParser->yystack = NULL;
+    pParser->yystksz = 0;
+    yyGrowStack(pParser);
+#endif
+  }
+  return pParser;
+}
+
+/* The following function deletes the value associated with a
+** symbol.  The symbol can be either a terminal or nonterminal.
+** "yymajor" is the symbol code, and "yypminor" is a pointer to
+** the value.
+*/
+static void yy_destructor(
+  yyParser *yypParser,    /* The parser */
+  YYCODETYPE yymajor,     /* Type code for object to destroy */
+  YYMINORTYPE *yypminor   /* The object to be destroyed */
+){
+  sqlite3ParserARG_FETCH;
+  switch( yymajor ){
+    /* Here is inserted the actions which take place when a
+    ** terminal or non-terminal is destroyed.  This can happen
+    ** when the symbol is popped from the stack during a
+    ** reduce or during error processing or when a parser is 
+    ** being destroyed before it is finished parsing.
+    **
+    ** Note: during a reduce, the only symbols destroyed are those
+    ** which appear on the RHS of the rule, but which are not used
+    ** inside the C code.
+    */
+    case 160: /* select */
+    case 194: /* oneselect */
+{
+sqlite3SelectDelete(pParse->db, (yypminor->yy387));
+}
+      break;
+    case 174: /* term */
+    case 175: /* expr */
+{
+sqlite3ExprDelete(pParse->db, (yypminor->yy118).pExpr);
+}
+      break;
+    case 179: /* idxlist_opt */
+    case 187: /* idxlist */
+    case 197: /* selcollist */
+    case 200: /* groupby_opt */
+    case 202: /* orderby_opt */
+    case 204: /* sclp */
+    case 214: /* sortlist */
+    case 216: /* nexprlist */
+    case 217: /* setlist */
+    case 220: /* itemlist */
+    case 221: /* exprlist */
+    case 226: /* case_exprlist */
+{
+sqlite3ExprListDelete(pParse->db, (yypminor->yy322));
+}
+      break;
+    case 193: /* fullname */
+    case 198: /* from */
+    case 206: /* seltablist */
+    case 207: /* stl_prefix */
+{
+sqlite3SrcListDelete(pParse->db, (yypminor->yy259));
+}
+      break;
+    case 199: /* where_opt */
+    case 201: /* having_opt */
+    case 210: /* on_opt */
+    case 215: /* sortitem */
+    case 225: /* case_operand */
+    case 227: /* case_else */
+    case 238: /* when_clause */
+    case 243: /* key_opt */
+{
+sqlite3ExprDelete(pParse->db, (yypminor->yy314));
+}
+      break;
+    case 211: /* using_opt */
+    case 213: /* inscollist */
+    case 219: /* inscollist_opt */
+{
+sqlite3IdListDelete(pParse->db, (yypminor->yy384));
+}
+      break;
+    case 234: /* trigger_cmd_list */
+    case 239: /* trigger_cmd */
+{
+sqlite3DeleteTriggerStep(pParse->db, (yypminor->yy203));
+}
+      break;
+    case 236: /* trigger_event */
+{
+sqlite3IdListDelete(pParse->db, (yypminor->yy90).b);
+}
+      break;
+    default:  break;   /* If no destructor action specified: do nothing */
+  }
+}
+
+/*
+** Pop the parser's stack once.
+**
+** If there is a destructor routine associated with the token which
+** is popped from the stack, then call it.
+**
+** Return the major token number for the symbol popped.
+*/
+static int yy_pop_parser_stack(yyParser *pParser){
+  YYCODETYPE yymajor;
+  yyStackEntry *yytos = &pParser->yystack[pParser->yyidx];
+
+  /* There is no mechanism by which the parser stack can be popped below
+  ** empty in SQLite.  */
+  if( NEVER(pParser->yyidx<0) ) return 0;
+#ifndef NDEBUG
+  if( yyTraceFILE && pParser->yyidx>=0 ){
+    fprintf(yyTraceFILE,"%sPopping %s\n",
+      yyTracePrompt,
+      yyTokenName[yytos->major]);
+  }
+#endif
+  yymajor = yytos->major;
+  yy_destructor(pParser, yymajor, &yytos->minor);
+  pParser->yyidx--;
+  return yymajor;
+}
+
+/* 
+** Deallocate and destroy a parser.  Destructors are all called for
+** all stack elements before shutting the parser down.
+**
+** Inputs:
+** <ul>
+** <li>  A pointer to the parser.  This should be a pointer
+**       obtained from sqlite3ParserAlloc.
+** <li>  A pointer to a function used to reclaim memory obtained
+**       from malloc.
+** </ul>
+*/
+SQLITE_PRIVATE void sqlite3ParserFree(
+  void *p,                    /* The parser to be deleted */
+  void (*freeProc)(void*)     /* Function used to reclaim memory */
+){
+  yyParser *pParser = (yyParser*)p;
+  /* In SQLite, we never try to destroy a parser that was not successfully
+  ** created in the first place. */
+  if( NEVER(pParser==0) ) return;
+  while( pParser->yyidx>=0 ) yy_pop_parser_stack(pParser);
+#if YYSTACKDEPTH<=0
+  free(pParser->yystack);
+#endif
+  (*freeProc)((void*)pParser);
+}
+
+/*
+** Return the peak depth of the stack for a parser.
+*/
+#ifdef YYTRACKMAXSTACKDEPTH
+SQLITE_PRIVATE int sqlite3ParserStackPeak(void *p){
+  yyParser *pParser = (yyParser*)p;
+  return pParser->yyidxMax;
+}
+#endif
+
+/*
+** Find the appropriate action for a parser given the terminal
+** look-ahead token iLookAhead.
+**
+** If the look-ahead token is YYNOCODE, then check to see if the action is
+** independent of the look-ahead.  If it is, return the action, otherwise
+** return YY_NO_ACTION.
+*/
+static int yy_find_shift_action(
+  yyParser *pParser,        /* The parser */
+  YYCODETYPE iLookAhead     /* The look-ahead token */
+){
+  int i;
+  int stateno = pParser->yystack[pParser->yyidx].stateno;
+ 
+  if( stateno>YY_SHIFT_COUNT
+   || (i = yy_shift_ofst[stateno])==YY_SHIFT_USE_DFLT ){
+    return yy_default[stateno];
+  }
+  assert( iLookAhead!=YYNOCODE );
+  i += iLookAhead;
+  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
+    if( iLookAhead>0 ){
+#ifdef YYFALLBACK
+      YYCODETYPE iFallback;            /* Fallback token */
+      if( iLookAhead<sizeof(yyFallback)/sizeof(yyFallback[0])
+             && (iFallback = yyFallback[iLookAhead])!=0 ){
+#ifndef NDEBUG
+        if( yyTraceFILE ){
+          fprintf(yyTraceFILE, "%sFALLBACK %s => %s\n",
+             yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[iFallback]);
+        }
+#endif
+        return yy_find_shift_action(pParser, iFallback);
+      }
+#endif
+#ifdef YYWILDCARD
+      {
+        int j = i - iLookAhead + YYWILDCARD;
+        if( 
+#if YY_SHIFT_MIN+YYWILDCARD<0
+          j>=0 &&
+#endif
+#if YY_SHIFT_MAX+YYWILDCARD>=YY_ACTTAB_COUNT
+          j<YY_ACTTAB_COUNT &&
+#endif
+          yy_lookahead[j]==YYWILDCARD
+        ){
+#ifndef NDEBUG
+          if( yyTraceFILE ){
+            fprintf(yyTraceFILE, "%sWILDCARD %s => %s\n",
+               yyTracePrompt, yyTokenName[iLookAhead], yyTokenName[YYWILDCARD]);
+          }
+#endif /* NDEBUG */
+          return yy_action[j];
+        }
+      }
+#endif /* YYWILDCARD */
+    }
+    return yy_default[stateno];
+  }else{
+    return yy_action[i];
+  }
+}
+
+/*
+** Find the appropriate action for a parser given the non-terminal
+** look-ahead token iLookAhead.
+**
+** If the look-ahead token is YYNOCODE, then check to see if the action is
+** independent of the look-ahead.  If it is, return the action, otherwise
+** return YY_NO_ACTION.
+*/
+static int yy_find_reduce_action(
+  int stateno,              /* Current state number */
+  YYCODETYPE iLookAhead     /* The look-ahead token */
+){
+  int i;
+#ifdef YYERRORSYMBOL
+  if( stateno>YY_REDUCE_COUNT ){
+    return yy_default[stateno];
+  }
+#else
+  assert( stateno<=YY_REDUCE_COUNT );
+#endif
+  i = yy_reduce_ofst[stateno];
+  assert( i!=YY_REDUCE_USE_DFLT );
+  assert( iLookAhead!=YYNOCODE );
+  i += iLookAhead;
+#ifdef YYERRORSYMBOL
+  if( i<0 || i>=YY_ACTTAB_COUNT || yy_lookahead[i]!=iLookAhead ){
+    return yy_default[stateno];
+  }
+#else
+  assert( i>=0 && i<YY_ACTTAB_COUNT );
+  assert( yy_lookahead[i]==iLookAhead );
+#endif
+  return yy_action[i];
+}
+
+/*
+** The following routine is called if the stack overflows.
+*/
+static void yyStackOverflow(yyParser *yypParser, YYMINORTYPE *yypMinor){
+   sqlite3ParserARG_FETCH;
+   yypParser->yyidx--;
+#ifndef NDEBUG
+   if( yyTraceFILE ){
+     fprintf(yyTraceFILE,"%sStack Overflow!\n",yyTracePrompt);
+   }
+#endif
+   while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
+   /* Here code is inserted which will execute if the parser
+   ** stack every overflows */
+
+  UNUSED_PARAMETER(yypMinor); /* Silence some compiler warnings */
+  sqlite3ErrorMsg(pParse, "parser stack overflow");
+  pParse->parseError = 1;
+   sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument var */
+}
+
+/*
+** Perform a shift action.
+*/
+static void yy_shift(
+  yyParser *yypParser,          /* The parser to be shifted */
+  int yyNewState,               /* The new state to shift in */
+  int yyMajor,                  /* The major token to shift in */
+  YYMINORTYPE *yypMinor         /* Pointer to the minor token to shift in */
+){
+  yyStackEntry *yytos;
+  yypParser->yyidx++;
+#ifdef YYTRACKMAXSTACKDEPTH
+  if( yypParser->yyidx>yypParser->yyidxMax ){
+    yypParser->yyidxMax = yypParser->yyidx;
+  }
+#endif
+#if YYSTACKDEPTH>0 
+  if( yypParser->yyidx>=YYSTACKDEPTH ){
+    yyStackOverflow(yypParser, yypMinor);
+    return;
+  }
+#else
+  if( yypParser->yyidx>=yypParser->yystksz ){
+    yyGrowStack(yypParser);
+    if( yypParser->yyidx>=yypParser->yystksz ){
+      yyStackOverflow(yypParser, yypMinor);
+      return;
+    }
+  }
+#endif
+  yytos = &yypParser->yystack[yypParser->yyidx];
+  yytos->stateno = (YYACTIONTYPE)yyNewState;
+  yytos->major = (YYCODETYPE)yyMajor;
+  yytos->minor = *yypMinor;
+#ifndef NDEBUG
+  if( yyTraceFILE && yypParser->yyidx>0 ){
+    int i;
+    fprintf(yyTraceFILE,"%sShift %d\n",yyTracePrompt,yyNewState);
+    fprintf(yyTraceFILE,"%sStack:",yyTracePrompt);
+    for(i=1; i<=yypParser->yyidx; i++)
+      fprintf(yyTraceFILE," %s",yyTokenName[yypParser->yystack[i].major]);
+    fprintf(yyTraceFILE,"\n");
+  }
+#endif
+}
+
+/* The following table contains information about every rule that
+** is used during the reduce.
+*/
+static const struct {
+  YYCODETYPE lhs;         /* Symbol on the left-hand side of the rule */
+  unsigned char nrhs;     /* Number of right-hand side symbols in the rule */
+} yyRuleInfo[] = {
+  { 142, 1 },
+  { 143, 2 },
+  { 143, 1 },
+  { 144, 1 },
+  { 144, 3 },
+  { 145, 0 },
+  { 145, 1 },
+  { 145, 3 },
+  { 146, 1 },
+  { 147, 3 },
+  { 149, 0 },
+  { 149, 1 },
+  { 149, 2 },
+  { 148, 0 },
+  { 148, 1 },
+  { 148, 1 },
+  { 148, 1 },
+  { 147, 2 },
+  { 147, 2 },
+  { 147, 2 },
+  { 151, 1 },
+  { 151, 0 },
+  { 147, 2 },
+  { 147, 3 },
+  { 147, 5 },
+  { 147, 2 },
+  { 152, 6 },
+  { 154, 1 },
+  { 156, 0 },
+  { 156, 3 },
+  { 155, 1 },
+  { 155, 0 },
+  { 153, 4 },
+  { 153, 2 },
+  { 158, 3 },
+  { 158, 1 },
+  { 161, 3 },
+  { 162, 1 },
+  { 165, 1 },
+  { 165, 1 },
+  { 166, 1 },
+  { 150, 1 },
+  { 150, 1 },
+  { 150, 1 },
+  { 163, 0 },
+  { 163, 1 },
+  { 167, 1 },
+  { 167, 4 },
+  { 167, 6 },
+  { 168, 1 },
+  { 168, 2 },
+  { 169, 1 },
+  { 169, 1 },
+  { 164, 2 },
+  { 164, 0 },
+  { 172, 3 },
+  { 172, 1 },
+  { 173, 2 },
+  { 173, 4 },
+  { 173, 3 },
+  { 173, 3 },
+  { 173, 2 },
+  { 173, 2 },
+  { 173, 3 },
+  { 173, 5 },
+  { 173, 2 },
+  { 173, 4 },
+  { 173, 4 },
+  { 173, 1 },
+  { 173, 2 },
+  { 178, 0 },
+  { 178, 1 },
+  { 180, 0 },
+  { 180, 2 },
+  { 182, 2 },
+  { 182, 3 },
+  { 182, 3 },
+  { 182, 3 },
+  { 183, 2 },
+  { 183, 2 },
+  { 183, 1 },
+  { 183, 1 },
+  { 183, 2 },
+  { 181, 3 },
+  { 181, 2 },
+  { 184, 0 },
+  { 184, 2 },
+  { 184, 2 },
+  { 159, 0 },
+  { 159, 2 },
+  { 185, 3 },
+  { 185, 2 },
+  { 185, 1 },
+  { 186, 2 },
+  { 186, 7 },
+  { 186, 5 },
+  { 186, 5 },
+  { 186, 10 },
+  { 188, 0 },
+  { 188, 1 },
+  { 176, 0 },
+  { 176, 3 },
+  { 189, 0 },
+  { 189, 2 },
+  { 190, 1 },
+  { 190, 1 },
+  { 190, 1 },
+  { 147, 4 },
+  { 192, 2 },
+  { 192, 0 },
+  { 147, 8 },
+  { 147, 4 },
+  { 147, 1 },
+  { 160, 1 },
+  { 160, 3 },
+  { 195, 1 },
+  { 195, 2 },
+  { 195, 1 },
+  { 194, 9 },
+  { 196, 1 },
+  { 196, 1 },
+  { 196, 0 },
+  { 204, 2 },
+  { 204, 0 },
+  { 197, 3 },
+  { 197, 2 },
+  { 197, 4 },
+  { 205, 2 },
+  { 205, 1 },
+  { 205, 0 },
+  { 198, 0 },
+  { 198, 2 },
+  { 207, 2 },
+  { 207, 0 },
+  { 206, 7 },
+  { 206, 7 },
+  { 206, 7 },
+  { 157, 0 },
+  { 157, 2 },
+  { 193, 2 },
+  { 208, 1 },
+  { 208, 2 },
+  { 208, 3 },
+  { 208, 4 },
+  { 210, 2 },
+  { 210, 0 },
+  { 209, 0 },
+  { 209, 3 },
+  { 209, 2 },
+  { 211, 4 },
+  { 211, 0 },
+  { 202, 0 },
+  { 202, 3 },
+  { 214, 4 },
+  { 214, 2 },
+  { 215, 1 },
+  { 177, 1 },
+  { 177, 1 },
+  { 177, 0 },
+  { 200, 0 },
+  { 200, 3 },
+  { 201, 0 },
+  { 201, 2 },
+  { 203, 0 },
+  { 203, 2 },
+  { 203, 4 },
+  { 203, 4 },
+  { 147, 5 },
+  { 199, 0 },
+  { 199, 2 },
+  { 147, 7 },
+  { 217, 5 },
+  { 217, 3 },
+  { 147, 8 },
+  { 147, 5 },
+  { 147, 6 },
+  { 218, 2 },
+  { 218, 1 },
+  { 220, 3 },
+  { 220, 1 },
+  { 219, 0 },
+  { 219, 3 },
+  { 213, 3 },
+  { 213, 1 },
+  { 175, 1 },
+  { 175, 3 },
+  { 174, 1 },
+  { 175, 1 },
+  { 175, 1 },
+  { 175, 3 },
+  { 175, 5 },
+  { 174, 1 },
+  { 174, 1 },
+  { 175, 1 },
+  { 175, 1 },
+  { 175, 3 },
+  { 175, 6 },
+  { 175, 5 },
+  { 175, 4 },
+  { 174, 1 },
+  { 175, 3 },
+  { 175, 3 },
+  { 175, 3 },
+  { 175, 3 },
+  { 175, 3 },
+  { 175, 3 },
+  { 175, 3 },
+  { 175, 3 },
+  { 222, 1 },
+  { 222, 2 },
+  { 222, 1 },
+  { 222, 2 },
+  { 175, 3 },
+  { 175, 5 },
+  { 175, 2 },
+  { 175, 3 },
+  { 175, 3 },
+  { 175, 4 },
+  { 175, 2 },
+  { 175, 2 },
+  { 175, 2 },
+  { 175, 2 },
+  { 223, 1 },
+  { 223, 2 },
+  { 175, 5 },
+  { 224, 1 },
+  { 224, 2 },
+  { 175, 5 },
+  { 175, 3 },
+  { 175, 5 },
+  { 175, 4 },
+  { 175, 4 },
+  { 175, 5 },
+  { 226, 5 },
+  { 226, 4 },
+  { 227, 2 },
+  { 227, 0 },
+  { 225, 1 },
+  { 225, 0 },
+  { 221, 1 },
+  { 221, 0 },
+  { 216, 3 },
+  { 216, 1 },
+  { 147, 11 },
+  { 228, 1 },
+  { 228, 0 },
+  { 179, 0 },
+  { 179, 3 },
+  { 187, 5 },
+  { 187, 3 },
+  { 229, 0 },
+  { 229, 2 },
+  { 147, 4 },
+  { 147, 1 },
+  { 147, 2 },
+  { 147, 3 },
+  { 147, 5 },
+  { 147, 6 },
+  { 147, 5 },
+  { 147, 6 },
+  { 230, 1 },
+  { 230, 1 },
+  { 230, 1 },
+  { 230, 1 },
+  { 230, 1 },
+  { 170, 2 },
+  { 171, 2 },
+  { 232, 1 },
+  { 231, 1 },
+  { 231, 0 },
+  { 147, 5 },
+  { 233, 11 },
+  { 235, 1 },
+  { 235, 1 },
+  { 235, 2 },
+  { 235, 0 },
+  { 236, 1 },
+  { 236, 1 },
+  { 236, 3 },
+  { 237, 0 },
+  { 237, 3 },
+  { 238, 0 },
+  { 238, 2 },
+  { 234, 3 },
+  { 234, 2 },
+  { 240, 1 },
+  { 240, 3 },
+  { 241, 0 },
+  { 241, 3 },
+  { 241, 2 },
+  { 239, 7 },
+  { 239, 8 },
+  { 239, 5 },
+  { 239, 5 },
+  { 239, 1 },
+  { 175, 4 },
+  { 175, 6 },
+  { 191, 1 },
+  { 191, 1 },
+  { 191, 1 },
+  { 147, 4 },
+  { 147, 6 },
+  { 147, 3 },
+  { 243, 0 },
+  { 243, 2 },
+  { 242, 1 },
+  { 242, 0 },
+  { 147, 1 },
+  { 147, 3 },
+  { 147, 1 },
+  { 147, 3 },
+  { 147, 6 },
+  { 147, 6 },
+  { 244, 1 },
+  { 245, 0 },
+  { 245, 1 },
+  { 147, 1 },
+  { 147, 4 },
+  { 246, 7 },
+  { 247, 1 },
+  { 247, 3 },
+  { 248, 0 },
+  { 248, 2 },
+  { 249, 1 },
+  { 249, 3 },
+  { 250, 1 },
+  { 251, 0 },
+  { 251, 4 },
+  { 251, 2 },
+};
+
+static void yy_accept(yyParser*);  /* Forward Declaration */
+
+/*
+** Perform a reduce action and the shift that must immediately
+** follow the reduce.
+*/
+static void yy_reduce(
+  yyParser *yypParser,         /* The parser */
+  int yyruleno                 /* Number of the rule by which to reduce */
+){
+  int yygoto;                     /* The next state */
+  int yyact;                      /* The next action */
+  YYMINORTYPE yygotominor;        /* The LHS of the rule reduced */
+  yyStackEntry *yymsp;            /* The top of the parser's stack */
+  int yysize;                     /* Amount to pop the stack */
+  sqlite3ParserARG_FETCH;
+  yymsp = &yypParser->yystack[yypParser->yyidx];
+#ifndef NDEBUG
+  if( yyTraceFILE && yyruleno>=0 
+        && yyruleno<(int)(sizeof(yyRuleName)/sizeof(yyRuleName[0])) ){
+    fprintf(yyTraceFILE, "%sReduce [%s].\n", yyTracePrompt,
+      yyRuleName[yyruleno]);
+  }
+#endif /* NDEBUG */
+
+  /* Silence complaints from purify about yygotominor being uninitialized
+  ** in some cases when it is copied into the stack after the following
+  ** switch.  yygotominor is uninitialized when a rule reduces that does
+  ** not set the value of its left-hand side nonterminal.  Leaving the
+  ** value of the nonterminal uninitialized is utterly harmless as long
+  ** as the value is never used.  So really the only thing this code
+  ** accomplishes is to quieten purify.  
+  **
+  ** 2007-01-16:  The wireshark project (www.wireshark.org) reports that
+  ** without this code, their parser segfaults.  I'm not sure what there
+  ** parser is doing to make this happen.  This is the second bug report
+  ** from wireshark this week.  Clearly they are stressing Lemon in ways
+  ** that it has not been previously stressed...  (SQLite ticket #2172)
+  */
+  /*memset(&yygotominor, 0, sizeof(yygotominor));*/
+  yygotominor = yyzerominor;
+
+
+  switch( yyruleno ){
+  /* Beginning here are the reduction cases.  A typical example
+  ** follows:
+  **   case 0:
+  **  #line <lineno> <grammarfile>
+  **     { ... }           // User supplied code
+  **  #line <lineno> <thisfile>
+  **     break;
+  */
+      case 5: /* explain ::= */
+{ sqlite3BeginParse(pParse, 0); }
+        break;
+      case 6: /* explain ::= EXPLAIN */
+{ sqlite3BeginParse(pParse, 1); }
+        break;
+      case 7: /* explain ::= EXPLAIN QUERY PLAN */
+{ sqlite3BeginParse(pParse, 2); }
+        break;
+      case 8: /* cmdx ::= cmd */
+{ sqlite3FinishCoding(pParse); }
+        break;
+      case 9: /* cmd ::= BEGIN transtype trans_opt */
+{sqlite3BeginTransaction(pParse, yymsp[-1].minor.yy4);}
+        break;
+      case 13: /* transtype ::= */
+{yygotominor.yy4 = TK_DEFERRED;}
+        break;
+      case 14: /* transtype ::= DEFERRED */
+      case 15: /* transtype ::= IMMEDIATE */ yytestcase(yyruleno==15);
+      case 16: /* transtype ::= EXCLUSIVE */ yytestcase(yyruleno==16);
+      case 115: /* multiselect_op ::= UNION */ yytestcase(yyruleno==115);
+      case 117: /* multiselect_op ::= EXCEPT|INTERSECT */ yytestcase(yyruleno==117);
+{yygotominor.yy4 = yymsp[0].major;}
+        break;
+      case 17: /* cmd ::= COMMIT trans_opt */
+      case 18: /* cmd ::= END trans_opt */ yytestcase(yyruleno==18);
+{sqlite3CommitTransaction(pParse);}
+        break;
+      case 19: /* cmd ::= ROLLBACK trans_opt */
+{sqlite3RollbackTransaction(pParse);}
+        break;
+      case 22: /* cmd ::= SAVEPOINT nm */
+{
+  sqlite3Savepoint(pParse, SAVEPOINT_BEGIN, &yymsp[0].minor.yy0);
+}
+        break;
+      case 23: /* cmd ::= RELEASE savepoint_opt nm */
+{
+  sqlite3Savepoint(pParse, SAVEPOINT_RELEASE, &yymsp[0].minor.yy0);
+}
+        break;
+      case 24: /* cmd ::= ROLLBACK trans_opt TO savepoint_opt nm */
+{
+  sqlite3Savepoint(pParse, SAVEPOINT_ROLLBACK, &yymsp[0].minor.yy0);
+}
+        break;
+      case 26: /* create_table ::= createkw temp TABLE ifnotexists nm dbnm */
+{
+   sqlite3StartTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,yymsp[-4].minor.yy4,0,0,yymsp[-2].minor.yy4);
+}
+        break;
+      case 27: /* createkw ::= CREATE */
+{
+  pParse->db->lookaside.bEnabled = 0;
+  yygotominor.yy0 = yymsp[0].minor.yy0;
+}
+        break;
+      case 28: /* ifnotexists ::= */
+      case 31: /* temp ::= */ yytestcase(yyruleno==31);
+      case 70: /* autoinc ::= */ yytestcase(yyruleno==70);
+      case 83: /* defer_subclause ::= NOT DEFERRABLE init_deferred_pred_opt */ yytestcase(yyruleno==83);
+      case 85: /* init_deferred_pred_opt ::= */ yytestcase(yyruleno==85);
+      case 87: /* init_deferred_pred_opt ::= INITIALLY IMMEDIATE */ yytestcase(yyruleno==87);
+      case 98: /* defer_subclause_opt ::= */ yytestcase(yyruleno==98);
+      case 109: /* ifexists ::= */ yytestcase(yyruleno==109);
+      case 120: /* distinct ::= ALL */ yytestcase(yyruleno==120);
+      case 121: /* distinct ::= */ yytestcase(yyruleno==121);
+      case 222: /* between_op ::= BETWEEN */ yytestcase(yyruleno==222);
+      case 225: /* in_op ::= IN */ yytestcase(yyruleno==225);
+{yygotominor.yy4 = 0;}
+        break;
+      case 29: /* ifnotexists ::= IF NOT EXISTS */
+      case 30: /* temp ::= TEMP */ yytestcase(yyruleno==30);
+      case 71: /* autoinc ::= AUTOINCR */ yytestcase(yyruleno==71);
+      case 86: /* init_deferred_pred_opt ::= INITIALLY DEFERRED */ yytestcase(yyruleno==86);
+      case 108: /* ifexists ::= IF EXISTS */ yytestcase(yyruleno==108);
+      case 119: /* distinct ::= DISTINCT */ yytestcase(yyruleno==119);
+      case 223: /* between_op ::= NOT BETWEEN */ yytestcase(yyruleno==223);
+      case 226: /* in_op ::= NOT IN */ yytestcase(yyruleno==226);
+{yygotominor.yy4 = 1;}
+        break;
+      case 32: /* create_table_args ::= LP columnlist conslist_opt RP */
+{
+  sqlite3EndTable(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0);
+}
+        break;
+      case 33: /* create_table_args ::= AS select */
+{
+  sqlite3EndTable(pParse,0,0,yymsp[0].minor.yy387);
+  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387);
+}
+        break;
+      case 36: /* column ::= columnid type carglist */
+{
+  yygotominor.yy0.z = yymsp[-2].minor.yy0.z;
+  yygotominor.yy0.n = (int)(pParse->sLastToken.z-yymsp[-2].minor.yy0.z) + pParse->sLastToken.n;
+}
+        break;
+      case 37: /* columnid ::= nm */
+{
+  sqlite3AddColumn(pParse,&yymsp[0].minor.yy0);
+  yygotominor.yy0 = yymsp[0].minor.yy0;
+}
+        break;
+      case 38: /* id ::= ID */
+      case 39: /* id ::= INDEXED */ yytestcase(yyruleno==39);
+      case 40: /* ids ::= ID|STRING */ yytestcase(yyruleno==40);
+      case 41: /* nm ::= id */ yytestcase(yyruleno==41);
+      case 42: /* nm ::= STRING */ yytestcase(yyruleno==42);
+      case 43: /* nm ::= JOIN_KW */ yytestcase(yyruleno==43);
+      case 46: /* typetoken ::= typename */ yytestcase(yyruleno==46);
+      case 49: /* typename ::= ids */ yytestcase(yyruleno==49);
+      case 127: /* as ::= AS nm */ yytestcase(yyruleno==127);
+      case 128: /* as ::= ids */ yytestcase(yyruleno==128);
+      case 138: /* dbnm ::= DOT nm */ yytestcase(yyruleno==138);
+      case 147: /* indexed_opt ::= INDEXED BY nm */ yytestcase(yyruleno==147);
+      case 251: /* collate ::= COLLATE ids */ yytestcase(yyruleno==251);
+      case 260: /* nmnum ::= plus_num */ yytestcase(yyruleno==260);
+      case 261: /* nmnum ::= nm */ yytestcase(yyruleno==261);
+      case 262: /* nmnum ::= ON */ yytestcase(yyruleno==262);
+      case 263: /* nmnum ::= DELETE */ yytestcase(yyruleno==263);
+      case 264: /* nmnum ::= DEFAULT */ yytestcase(yyruleno==264);
+      case 265: /* plus_num ::= plus_opt number */ yytestcase(yyruleno==265);
+      case 266: /* minus_num ::= MINUS number */ yytestcase(yyruleno==266);
+      case 267: /* number ::= INTEGER|FLOAT */ yytestcase(yyruleno==267);
+      case 285: /* trnm ::= nm */ yytestcase(yyruleno==285);
+{yygotominor.yy0 = yymsp[0].minor.yy0;}
+        break;
+      case 45: /* type ::= typetoken */
+{sqlite3AddColumnType(pParse,&yymsp[0].minor.yy0);}
+        break;
+      case 47: /* typetoken ::= typename LP signed RP */
+{
+  yygotominor.yy0.z = yymsp[-3].minor.yy0.z;
+  yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-3].minor.yy0.z);
+}
+        break;
+      case 48: /* typetoken ::= typename LP signed COMMA signed RP */
+{
+  yygotominor.yy0.z = yymsp[-5].minor.yy0.z;
+  yygotominor.yy0.n = (int)(&yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] - yymsp[-5].minor.yy0.z);
+}
+        break;
+      case 50: /* typename ::= typename ids */
+{yygotominor.yy0.z=yymsp[-1].minor.yy0.z; yygotominor.yy0.n=yymsp[0].minor.yy0.n+(int)(yymsp[0].minor.yy0.z-yymsp[-1].minor.yy0.z);}
+        break;
+      case 57: /* ccons ::= DEFAULT term */
+      case 59: /* ccons ::= DEFAULT PLUS term */ yytestcase(yyruleno==59);
+{sqlite3AddDefaultValue(pParse,&yymsp[0].minor.yy118);}
+        break;
+      case 58: /* ccons ::= DEFAULT LP expr RP */
+{sqlite3AddDefaultValue(pParse,&yymsp[-1].minor.yy118);}
+        break;
+      case 60: /* ccons ::= DEFAULT MINUS term */
+{
+  ExprSpan v;
+  v.pExpr = sqlite3PExpr(pParse, TK_UMINUS, yymsp[0].minor.yy118.pExpr, 0, 0);
+  v.zStart = yymsp[-1].minor.yy0.z;
+  v.zEnd = yymsp[0].minor.yy118.zEnd;
+  sqlite3AddDefaultValue(pParse,&v);
+}
+        break;
+      case 61: /* ccons ::= DEFAULT id */
+{
+  ExprSpan v;
+  spanExpr(&v, pParse, TK_STRING, &yymsp[0].minor.yy0);
+  sqlite3AddDefaultValue(pParse,&v);
+}
+        break;
+      case 63: /* ccons ::= NOT NULL onconf */
+{sqlite3AddNotNull(pParse, yymsp[0].minor.yy4);}
+        break;
+      case 64: /* ccons ::= PRIMARY KEY sortorder onconf autoinc */
+{sqlite3AddPrimaryKey(pParse,0,yymsp[-1].minor.yy4,yymsp[0].minor.yy4,yymsp[-2].minor.yy4);}
+        break;
+      case 65: /* ccons ::= UNIQUE onconf */
+{sqlite3CreateIndex(pParse,0,0,0,0,yymsp[0].minor.yy4,0,0,0,0);}
+        break;
+      case 66: /* ccons ::= CHECK LP expr RP */
+{sqlite3AddCheckConstraint(pParse,yymsp[-1].minor.yy118.pExpr);}
+        break;
+      case 67: /* ccons ::= REFERENCES nm idxlist_opt refargs */
+{sqlite3CreateForeignKey(pParse,0,&yymsp[-2].minor.yy0,yymsp[-1].minor.yy322,yymsp[0].minor.yy4);}
+        break;
+      case 68: /* ccons ::= defer_subclause */
+{sqlite3DeferForeignKey(pParse,yymsp[0].minor.yy4);}
+        break;
+      case 69: /* ccons ::= COLLATE ids */
+{sqlite3AddCollateType(pParse, &yymsp[0].minor.yy0);}
+        break;
+      case 72: /* refargs ::= */
+{ yygotominor.yy4 = OE_None*0x0101; /* EV: R-19803-45884 */}
+        break;
+      case 73: /* refargs ::= refargs refarg */
+{ yygotominor.yy4 = (yymsp[-1].minor.yy4 & ~yymsp[0].minor.yy215.mask) | yymsp[0].minor.yy215.value; }
+        break;
+      case 74: /* refarg ::= MATCH nm */
+      case 75: /* refarg ::= ON INSERT refact */ yytestcase(yyruleno==75);
+{ yygotominor.yy215.value = 0;     yygotominor.yy215.mask = 0x000000; }
+        break;
+      case 76: /* refarg ::= ON DELETE refact */
+{ yygotominor.yy215.value = yymsp[0].minor.yy4;     yygotominor.yy215.mask = 0x0000ff; }
+        break;
+      case 77: /* refarg ::= ON UPDATE refact */
+{ yygotominor.yy215.value = yymsp[0].minor.yy4<<8;  yygotominor.yy215.mask = 0x00ff00; }
+        break;
+      case 78: /* refact ::= SET NULL */
+{ yygotominor.yy4 = OE_SetNull;  /* EV: R-33326-45252 */}
+        break;
+      case 79: /* refact ::= SET DEFAULT */
+{ yygotominor.yy4 = OE_SetDflt;  /* EV: R-33326-45252 */}
+        break;
+      case 80: /* refact ::= CASCADE */
+{ yygotominor.yy4 = OE_Cascade;  /* EV: R-33326-45252 */}
+        break;
+      case 81: /* refact ::= RESTRICT */
+{ yygotominor.yy4 = OE_Restrict; /* EV: R-33326-45252 */}
+        break;
+      case 82: /* refact ::= NO ACTION */
+{ yygotominor.yy4 = OE_None;     /* EV: R-33326-45252 */}
+        break;
+      case 84: /* defer_subclause ::= DEFERRABLE init_deferred_pred_opt */
+      case 99: /* defer_subclause_opt ::= defer_subclause */ yytestcase(yyruleno==99);
+      case 101: /* onconf ::= ON CONFLICT resolvetype */ yytestcase(yyruleno==101);
+      case 104: /* resolvetype ::= raisetype */ yytestcase(yyruleno==104);
+{yygotominor.yy4 = yymsp[0].minor.yy4;}
+        break;
+      case 88: /* conslist_opt ::= */
+{yygotominor.yy0.n = 0; yygotominor.yy0.z = 0;}
+        break;
+      case 89: /* conslist_opt ::= COMMA conslist */
+{yygotominor.yy0 = yymsp[-1].minor.yy0;}
+        break;
+      case 94: /* tcons ::= PRIMARY KEY LP idxlist autoinc RP onconf */
+{sqlite3AddPrimaryKey(pParse,yymsp[-3].minor.yy322,yymsp[0].minor.yy4,yymsp[-2].minor.yy4,0);}
+        break;
+      case 95: /* tcons ::= UNIQUE LP idxlist RP onconf */
+{sqlite3CreateIndex(pParse,0,0,0,yymsp[-2].minor.yy322,yymsp[0].minor.yy4,0,0,0,0);}
+        break;
+      case 96: /* tcons ::= CHECK LP expr RP onconf */
+{sqlite3AddCheckConstraint(pParse,yymsp[-2].minor.yy118.pExpr);}
+        break;
+      case 97: /* tcons ::= FOREIGN KEY LP idxlist RP REFERENCES nm idxlist_opt refargs defer_subclause_opt */
+{
+    sqlite3CreateForeignKey(pParse, yymsp[-6].minor.yy322, &yymsp[-3].minor.yy0, yymsp[-2].minor.yy322, yymsp[-1].minor.yy4);
+    sqlite3DeferForeignKey(pParse, yymsp[0].minor.yy4);
+}
+        break;
+      case 100: /* onconf ::= */
+{yygotominor.yy4 = OE_Default;}
+        break;
+      case 102: /* orconf ::= */
+{yygotominor.yy210 = OE_Default;}
+        break;
+      case 103: /* orconf ::= OR resolvetype */
+{yygotominor.yy210 = (u8)yymsp[0].minor.yy4;}
+        break;
+      case 105: /* resolvetype ::= IGNORE */
+{yygotominor.yy4 = OE_Ignore;}
+        break;
+      case 106: /* resolvetype ::= REPLACE */
+{yygotominor.yy4 = OE_Replace;}
+        break;
+      case 107: /* cmd ::= DROP TABLE ifexists fullname */
+{
+  sqlite3DropTable(pParse, yymsp[0].minor.yy259, 0, yymsp[-1].minor.yy4);
+}
+        break;
+      case 110: /* cmd ::= createkw temp VIEW ifnotexists nm dbnm AS select */
+{
+  sqlite3CreateView(pParse, &yymsp[-7].minor.yy0, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, yymsp[0].minor.yy387, yymsp[-6].minor.yy4, yymsp[-4].minor.yy4);
+}
+        break;
+      case 111: /* cmd ::= DROP VIEW ifexists fullname */
+{
+  sqlite3DropTable(pParse, yymsp[0].minor.yy259, 1, yymsp[-1].minor.yy4);
+}
+        break;
+      case 112: /* cmd ::= select */
+{
+  SelectDest dest = {SRT_Output, 0, 0, 0, 0};
+  sqlite3Select(pParse, yymsp[0].minor.yy387, &dest);
+  sqlite3SelectDelete(pParse->db, yymsp[0].minor.yy387);
+}
+        break;
+      case 113: /* select ::= oneselect */
+{yygotominor.yy387 = yymsp[0].minor.yy387;}
+        break;
+      case 114: /* select ::= select multiselect_op oneselect */
+{
+  if( yymsp[0].minor.yy387 ){
+    yymsp[0].minor.yy387->op = (u8)yymsp[-1].minor.yy4;
+    yymsp[0].minor.yy387->pPrior = yymsp[-2].minor.yy387;
+  }else{
+    sqlite3SelectDelete(pParse->db, yymsp[-2].minor.yy387);
+  }
+  yygotominor.yy387 = yymsp[0].minor.yy387;
+}
+        break;
+      case 116: /* multiselect_op ::= UNION ALL */
+{yygotominor.yy4 = TK_ALL;}
+        break;
+      case 118: /* oneselect ::= SELECT distinct selcollist from where_opt groupby_opt having_opt orderby_opt limit_opt */
+{
+  yygotominor.yy387 = sqlite3SelectNew(pParse,yymsp[-6].minor.yy322,yymsp[-5].minor.yy259,yymsp[-4].minor.yy314,yymsp[-3].minor.yy322,yymsp[-2].minor.yy314,yymsp[-1].minor.yy322,yymsp[-7].minor.yy4,yymsp[0].minor.yy292.pLimit,yymsp[0].minor.yy292.pOffset);
+}
+        break;
+      case 122: /* sclp ::= selcollist COMMA */
+      case 247: /* idxlist_opt ::= LP idxlist RP */ yytestcase(yyruleno==247);
+{yygotominor.yy322 = yymsp[-1].minor.yy322;}
+        break;
+      case 123: /* sclp ::= */
+      case 151: /* orderby_opt ::= */ yytestcase(yyruleno==151);
+      case 159: /* groupby_opt ::= */ yytestcase(yyruleno==159);
+      case 240: /* exprlist ::= */ yytestcase(yyruleno==240);
+      case 246: /* idxlist_opt ::= */ yytestcase(yyruleno==246);
+{yygotominor.yy322 = 0;}
+        break;
+      case 124: /* selcollist ::= sclp expr as */
+{
+   yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-2].minor.yy322, yymsp[-1].minor.yy118.pExpr);
+   if( yymsp[0].minor.yy0.n>0 ) sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[0].minor.yy0, 1);
+   sqlite3ExprListSetSpan(pParse,yygotominor.yy322,&yymsp[-1].minor.yy118);
+}
+        break;
+      case 125: /* selcollist ::= sclp STAR */
+{
+  Expr *p = sqlite3Expr(pParse->db, TK_ALL, 0);
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-1].minor.yy322, p);
+}
+        break;
+      case 126: /* selcollist ::= sclp nm DOT STAR */
+{
+  Expr *pRight = sqlite3PExpr(pParse, TK_ALL, 0, 0, &yymsp[0].minor.yy0);
+  Expr *pLeft = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
+  Expr *pDot = sqlite3PExpr(pParse, TK_DOT, pLeft, pRight, 0);
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322, pDot);
+}
+        break;
+      case 129: /* as ::= */
+{yygotominor.yy0.n = 0;}
+        break;
+      case 130: /* from ::= */
+{yygotominor.yy259 = sqlite3DbMallocZero(pParse->db, sizeof(*yygotominor.yy259));}
+        break;
+      case 131: /* from ::= FROM seltablist */
+{
+  yygotominor.yy259 = yymsp[0].minor.yy259;
+  sqlite3SrcListShiftJoinType(yygotominor.yy259);
+}
+        break;
+      case 132: /* stl_prefix ::= seltablist joinop */
+{
+   yygotominor.yy259 = yymsp[-1].minor.yy259;
+   if( ALWAYS(yygotominor.yy259 && yygotominor.yy259->nSrc>0) ) yygotominor.yy259->a[yygotominor.yy259->nSrc-1].jointype = (u8)yymsp[0].minor.yy4;
+}
+        break;
+      case 133: /* stl_prefix ::= */
+{yygotominor.yy259 = 0;}
+        break;
+      case 134: /* seltablist ::= stl_prefix nm dbnm as indexed_opt on_opt using_opt */
+{
+  yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,&yymsp[-5].minor.yy0,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,0,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
+  sqlite3SrcListIndexedBy(pParse, yygotominor.yy259, &yymsp[-2].minor.yy0);
+}
+        break;
+      case 135: /* seltablist ::= stl_prefix LP select RP as on_opt using_opt */
+{
+    yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,yymsp[-4].minor.yy387,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
+  }
+        break;
+      case 136: /* seltablist ::= stl_prefix LP seltablist RP as on_opt using_opt */
+{
+    if( yymsp[-6].minor.yy259==0 && yymsp[-2].minor.yy0.n==0 && yymsp[-1].minor.yy314==0 && yymsp[0].minor.yy384==0 ){
+      yygotominor.yy259 = yymsp[-4].minor.yy259;
+    }else{
+      Select *pSubquery;
+      sqlite3SrcListShiftJoinType(yymsp[-4].minor.yy259);
+      pSubquery = sqlite3SelectNew(pParse,0,yymsp[-4].minor.yy259,0,0,0,0,0,0,0);
+      yygotominor.yy259 = sqlite3SrcListAppendFromTerm(pParse,yymsp[-6].minor.yy259,0,0,&yymsp[-2].minor.yy0,pSubquery,yymsp[-1].minor.yy314,yymsp[0].minor.yy384);
+    }
+  }
+        break;
+      case 137: /* dbnm ::= */
+      case 146: /* indexed_opt ::= */ yytestcase(yyruleno==146);
+{yygotominor.yy0.z=0; yygotominor.yy0.n=0;}
+        break;
+      case 139: /* fullname ::= nm dbnm */
+{yygotominor.yy259 = sqlite3SrcListAppend(pParse->db,0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);}
+        break;
+      case 140: /* joinop ::= COMMA|JOIN */
+{ yygotominor.yy4 = JT_INNER; }
+        break;
+      case 141: /* joinop ::= JOIN_KW JOIN */
+{ yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-1].minor.yy0,0,0); }
+        break;
+      case 142: /* joinop ::= JOIN_KW nm JOIN */
+{ yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0,0); }
+        break;
+      case 143: /* joinop ::= JOIN_KW nm nm JOIN */
+{ yygotominor.yy4 = sqlite3JoinType(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[-1].minor.yy0); }
+        break;
+      case 144: /* on_opt ::= ON expr */
+      case 155: /* sortitem ::= expr */ yytestcase(yyruleno==155);
+      case 162: /* having_opt ::= HAVING expr */ yytestcase(yyruleno==162);
+      case 169: /* where_opt ::= WHERE expr */ yytestcase(yyruleno==169);
+      case 235: /* case_else ::= ELSE expr */ yytestcase(yyruleno==235);
+      case 237: /* case_operand ::= expr */ yytestcase(yyruleno==237);
+{yygotominor.yy314 = yymsp[0].minor.yy118.pExpr;}
+        break;
+      case 145: /* on_opt ::= */
+      case 161: /* having_opt ::= */ yytestcase(yyruleno==161);
+      case 168: /* where_opt ::= */ yytestcase(yyruleno==168);
+      case 236: /* case_else ::= */ yytestcase(yyruleno==236);
+      case 238: /* case_operand ::= */ yytestcase(yyruleno==238);
+{yygotominor.yy314 = 0;}
+        break;
+      case 148: /* indexed_opt ::= NOT INDEXED */
+{yygotominor.yy0.z=0; yygotominor.yy0.n=1;}
+        break;
+      case 149: /* using_opt ::= USING LP inscollist RP */
+      case 181: /* inscollist_opt ::= LP inscollist RP */ yytestcase(yyruleno==181);
+{yygotominor.yy384 = yymsp[-1].minor.yy384;}
+        break;
+      case 150: /* using_opt ::= */
+      case 180: /* inscollist_opt ::= */ yytestcase(yyruleno==180);
+{yygotominor.yy384 = 0;}
+        break;
+      case 152: /* orderby_opt ::= ORDER BY sortlist */
+      case 160: /* groupby_opt ::= GROUP BY nexprlist */ yytestcase(yyruleno==160);
+      case 239: /* exprlist ::= nexprlist */ yytestcase(yyruleno==239);
+{yygotominor.yy322 = yymsp[0].minor.yy322;}
+        break;
+      case 153: /* sortlist ::= sortlist COMMA sortitem sortorder */
+{
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-3].minor.yy322,yymsp[-1].minor.yy314);
+  if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
+}
+        break;
+      case 154: /* sortlist ::= sortitem sortorder */
+{
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[-1].minor.yy314);
+  if( yygotominor.yy322 && ALWAYS(yygotominor.yy322->a) ) yygotominor.yy322->a[0].sortOrder = (u8)yymsp[0].minor.yy4;
+}
+        break;
+      case 156: /* sortorder ::= ASC */
+      case 158: /* sortorder ::= */ yytestcase(yyruleno==158);
+{yygotominor.yy4 = SQLITE_SO_ASC;}
+        break;
+      case 157: /* sortorder ::= DESC */
+{yygotominor.yy4 = SQLITE_SO_DESC;}
+        break;
+      case 163: /* limit_opt ::= */
+{yygotominor.yy292.pLimit = 0; yygotominor.yy292.pOffset = 0;}
+        break;
+      case 164: /* limit_opt ::= LIMIT expr */
+{yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr; yygotominor.yy292.pOffset = 0;}
+        break;
+      case 165: /* limit_opt ::= LIMIT expr OFFSET expr */
+{yygotominor.yy292.pLimit = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pOffset = yymsp[0].minor.yy118.pExpr;}
+        break;
+      case 166: /* limit_opt ::= LIMIT expr COMMA expr */
+{yygotominor.yy292.pOffset = yymsp[-2].minor.yy118.pExpr; yygotominor.yy292.pLimit = yymsp[0].minor.yy118.pExpr;}
+        break;
+      case 167: /* cmd ::= DELETE FROM fullname indexed_opt where_opt */
+{
+  sqlite3SrcListIndexedBy(pParse, yymsp[-2].minor.yy259, &yymsp[-1].minor.yy0);
+  sqlite3DeleteFrom(pParse,yymsp[-2].minor.yy259,yymsp[0].minor.yy314);
+}
+        break;
+      case 170: /* cmd ::= UPDATE orconf fullname indexed_opt SET setlist where_opt */
+{
+  sqlite3SrcListIndexedBy(pParse, yymsp[-4].minor.yy259, &yymsp[-3].minor.yy0);
+  sqlite3ExprListCheckLength(pParse,yymsp[-1].minor.yy322,"set list"); 
+  sqlite3Update(pParse,yymsp[-4].minor.yy259,yymsp[-1].minor.yy322,yymsp[0].minor.yy314,yymsp[-5].minor.yy210);
+}
+        break;
+      case 171: /* setlist ::= setlist COMMA nm EQ expr */
+{
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse, yymsp[-4].minor.yy322, yymsp[0].minor.yy118.pExpr);
+  sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
+}
+        break;
+      case 172: /* setlist ::= nm EQ expr */
+{
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse, 0, yymsp[0].minor.yy118.pExpr);
+  sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
+}
+        break;
+      case 173: /* cmd ::= insert_cmd INTO fullname inscollist_opt VALUES LP itemlist RP */
+{sqlite3Insert(pParse, yymsp[-5].minor.yy259, yymsp[-1].minor.yy322, 0, yymsp[-4].minor.yy384, yymsp[-7].minor.yy210);}
+        break;
+      case 174: /* cmd ::= insert_cmd INTO fullname inscollist_opt select */
+{sqlite3Insert(pParse, yymsp[-2].minor.yy259, 0, yymsp[0].minor.yy387, yymsp[-1].minor.yy384, yymsp[-4].minor.yy210);}
+        break;
+      case 175: /* cmd ::= insert_cmd INTO fullname inscollist_opt DEFAULT VALUES */
+{sqlite3Insert(pParse, yymsp[-3].minor.yy259, 0, 0, yymsp[-2].minor.yy384, yymsp[-5].minor.yy210);}
+        break;
+      case 176: /* insert_cmd ::= INSERT orconf */
+{yygotominor.yy210 = yymsp[0].minor.yy210;}
+        break;
+      case 177: /* insert_cmd ::= REPLACE */
+{yygotominor.yy210 = OE_Replace;}
+        break;
+      case 178: /* itemlist ::= itemlist COMMA expr */
+      case 241: /* nexprlist ::= nexprlist COMMA expr */ yytestcase(yyruleno==241);
+{yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-2].minor.yy322,yymsp[0].minor.yy118.pExpr);}
+        break;
+      case 179: /* itemlist ::= expr */
+      case 242: /* nexprlist ::= expr */ yytestcase(yyruleno==242);
+{yygotominor.yy322 = sqlite3ExprListAppend(pParse,0,yymsp[0].minor.yy118.pExpr);}
+        break;
+      case 182: /* inscollist ::= inscollist COMMA nm */
+{yygotominor.yy384 = sqlite3IdListAppend(pParse->db,yymsp[-2].minor.yy384,&yymsp[0].minor.yy0);}
+        break;
+      case 183: /* inscollist ::= nm */
+{yygotominor.yy384 = sqlite3IdListAppend(pParse->db,0,&yymsp[0].minor.yy0);}
+        break;
+      case 184: /* expr ::= term */
+{yygotominor.yy118 = yymsp[0].minor.yy118;}
+        break;
+      case 185: /* expr ::= LP expr RP */
+{yygotominor.yy118.pExpr = yymsp[-1].minor.yy118.pExpr; spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);}
+        break;
+      case 186: /* term ::= NULL */
+      case 191: /* term ::= INTEGER|FLOAT|BLOB */ yytestcase(yyruleno==191);
+      case 192: /* term ::= STRING */ yytestcase(yyruleno==192);
+{spanExpr(&yygotominor.yy118, pParse, yymsp[0].major, &yymsp[0].minor.yy0);}
+        break;
+      case 187: /* expr ::= id */
+      case 188: /* expr ::= JOIN_KW */ yytestcase(yyruleno==188);
+{spanExpr(&yygotominor.yy118, pParse, TK_ID, &yymsp[0].minor.yy0);}
+        break;
+      case 189: /* expr ::= nm DOT nm */
+{
+  Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
+  Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
+  yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp2, 0);
+  spanSet(&yygotominor.yy118,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0);
+}
+        break;
+      case 190: /* expr ::= nm DOT nm DOT nm */
+{
+  Expr *temp1 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-4].minor.yy0);
+  Expr *temp2 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[-2].minor.yy0);
+  Expr *temp3 = sqlite3PExpr(pParse, TK_ID, 0, 0, &yymsp[0].minor.yy0);
+  Expr *temp4 = sqlite3PExpr(pParse, TK_DOT, temp2, temp3, 0);
+  yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_DOT, temp1, temp4, 0);
+  spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
+}
+        break;
+      case 193: /* expr ::= REGISTER */
+{
+  /* When doing a nested parse, one can include terms in an expression
+  ** that look like this:   #1 #2 ...  These terms refer to registers
+  ** in the virtual machine.  #N is the N-th register. */
+  if( pParse->nested==0 ){
+    sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &yymsp[0].minor.yy0);
+    yygotominor.yy118.pExpr = 0;
+  }else{
+    yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_REGISTER, 0, 0, &yymsp[0].minor.yy0);
+    if( yygotominor.yy118.pExpr ) sqlite3GetInt32(&yymsp[0].minor.yy0.z[1], &yygotominor.yy118.pExpr->iTable);
+  }
+  spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
+}
+        break;
+      case 194: /* expr ::= VARIABLE */
+{
+  spanExpr(&yygotominor.yy118, pParse, TK_VARIABLE, &yymsp[0].minor.yy0);
+  sqlite3ExprAssignVarNumber(pParse, yygotominor.yy118.pExpr);
+  spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
+}
+        break;
+      case 195: /* expr ::= expr COLLATE ids */
+{
+  yygotominor.yy118.pExpr = sqlite3ExprSetCollByToken(pParse, yymsp[-2].minor.yy118.pExpr, &yymsp[0].minor.yy0);
+  yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart;
+  yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
+}
+        break;
+      case 196: /* expr ::= CAST LP expr AS typetoken RP */
+{
+  yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CAST, yymsp[-3].minor.yy118.pExpr, 0, &yymsp[-1].minor.yy0);
+  spanSet(&yygotominor.yy118,&yymsp[-5].minor.yy0,&yymsp[0].minor.yy0);
+}
+        break;
+      case 197: /* expr ::= ID LP distinct exprlist RP */
+{
+  if( yymsp[-1].minor.yy322 && yymsp[-1].minor.yy322->nExpr>pParse->db->aLimit[SQLITE_LIMIT_FUNCTION_ARG] ){
+    sqlite3ErrorMsg(pParse, "too many arguments on function %T", &yymsp[-4].minor.yy0);
+  }
+  yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, yymsp[-1].minor.yy322, &yymsp[-4].minor.yy0);
+  spanSet(&yygotominor.yy118,&yymsp[-4].minor.yy0,&yymsp[0].minor.yy0);
+  if( yymsp[-2].minor.yy4 && yygotominor.yy118.pExpr ){
+    yygotominor.yy118.pExpr->flags |= EP_Distinct;
+  }
+}
+        break;
+      case 198: /* expr ::= ID LP STAR RP */
+{
+  yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0, &yymsp[-3].minor.yy0);
+  spanSet(&yygotominor.yy118,&yymsp[-3].minor.yy0,&yymsp[0].minor.yy0);
+}
+        break;
+      case 199: /* term ::= CTIME_KW */
+{
+  /* The CURRENT_TIME, CURRENT_DATE, and CURRENT_TIMESTAMP values are
+  ** treated as functions that return constants */
+  yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, 0,&yymsp[0].minor.yy0);
+  if( yygotominor.yy118.pExpr ){
+    yygotominor.yy118.pExpr->op = TK_CONST_FUNC;  
+  }
+  spanSet(&yygotominor.yy118, &yymsp[0].minor.yy0, &yymsp[0].minor.yy0);
+}
+        break;
+      case 200: /* expr ::= expr AND expr */
+      case 201: /* expr ::= expr OR expr */ yytestcase(yyruleno==201);
+      case 202: /* expr ::= expr LT|GT|GE|LE expr */ yytestcase(yyruleno==202);
+      case 203: /* expr ::= expr EQ|NE expr */ yytestcase(yyruleno==203);
+      case 204: /* expr ::= expr BITAND|BITOR|LSHIFT|RSHIFT expr */ yytestcase(yyruleno==204);
+      case 205: /* expr ::= expr PLUS|MINUS expr */ yytestcase(yyruleno==205);
+      case 206: /* expr ::= expr STAR|SLASH|REM expr */ yytestcase(yyruleno==206);
+      case 207: /* expr ::= expr CONCAT expr */ yytestcase(yyruleno==207);
+{spanBinaryExpr(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);}
+        break;
+      case 208: /* likeop ::= LIKE_KW */
+      case 210: /* likeop ::= MATCH */ yytestcase(yyruleno==210);
+{yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 0;}
+        break;
+      case 209: /* likeop ::= NOT LIKE_KW */
+      case 211: /* likeop ::= NOT MATCH */ yytestcase(yyruleno==211);
+{yygotominor.yy342.eOperator = yymsp[0].minor.yy0; yygotominor.yy342.not = 1;}
+        break;
+      case 212: /* expr ::= expr likeop expr */
+{
+  ExprList *pList;
+  pList = sqlite3ExprListAppend(pParse,0, yymsp[0].minor.yy118.pExpr);
+  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-2].minor.yy118.pExpr);
+  yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-1].minor.yy342.eOperator);
+  if( yymsp[-1].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
+  yygotominor.yy118.zStart = yymsp[-2].minor.yy118.zStart;
+  yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
+  if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc;
+}
+        break;
+      case 213: /* expr ::= expr likeop expr ESCAPE expr */
+{
+  ExprList *pList;
+  pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
+  pList = sqlite3ExprListAppend(pParse,pList, yymsp[-4].minor.yy118.pExpr);
+  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr);
+  yygotominor.yy118.pExpr = sqlite3ExprFunction(pParse, pList, &yymsp[-3].minor.yy342.eOperator);
+  if( yymsp[-3].minor.yy342.not ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
+  yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
+  yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
+  if( yygotominor.yy118.pExpr ) yygotominor.yy118.pExpr->flags |= EP_InfixFunc;
+}
+        break;
+      case 214: /* expr ::= expr ISNULL|NOTNULL */
+{spanUnaryPostfix(&yygotominor.yy118,pParse,yymsp[0].major,&yymsp[-1].minor.yy118,&yymsp[0].minor.yy0);}
+        break;
+      case 215: /* expr ::= expr NOT NULL */
+{spanUnaryPostfix(&yygotominor.yy118,pParse,TK_NOTNULL,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy0);}
+        break;
+      case 216: /* expr ::= expr IS expr */
+{
+  spanBinaryExpr(&yygotominor.yy118,pParse,TK_IS,&yymsp[-2].minor.yy118,&yymsp[0].minor.yy118);
+  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_ISNULL);
+}
+        break;
+      case 217: /* expr ::= expr IS NOT expr */
+{
+  spanBinaryExpr(&yygotominor.yy118,pParse,TK_ISNOT,&yymsp[-3].minor.yy118,&yymsp[0].minor.yy118);
+  binaryToUnaryIfNull(pParse, yymsp[0].minor.yy118.pExpr, yygotominor.yy118.pExpr, TK_NOTNULL);
+}
+        break;
+      case 218: /* expr ::= NOT expr */
+      case 219: /* expr ::= BITNOT expr */ yytestcase(yyruleno==219);
+{spanUnaryPrefix(&yygotominor.yy118,pParse,yymsp[-1].major,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
+        break;
+      case 220: /* expr ::= MINUS expr */
+{spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UMINUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
+        break;
+      case 221: /* expr ::= PLUS expr */
+{spanUnaryPrefix(&yygotominor.yy118,pParse,TK_UPLUS,&yymsp[0].minor.yy118,&yymsp[-1].minor.yy0);}
+        break;
+      case 224: /* expr ::= expr between_op expr AND expr */
+{
+  ExprList *pList = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
+  pList = sqlite3ExprListAppend(pParse,pList, yymsp[0].minor.yy118.pExpr);
+  yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_BETWEEN, yymsp[-4].minor.yy118.pExpr, 0, 0);
+  if( yygotominor.yy118.pExpr ){
+    yygotominor.yy118.pExpr->x.pList = pList;
+  }else{
+    sqlite3ExprListDelete(pParse->db, pList);
+  } 
+  if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
+  yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
+  yygotominor.yy118.zEnd = yymsp[0].minor.yy118.zEnd;
+}
+        break;
+      case 227: /* expr ::= expr in_op LP exprlist RP */
+{
+    if( yymsp[-1].minor.yy322==0 ){
+      /* Expressions of the form
+      **
+      **      expr1 IN ()
+      **      expr1 NOT IN ()
+      **
+      ** simplify to constants 0 (false) and 1 (true), respectively,
+      ** regardless of the value of expr1.
+      */
+      yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_INTEGER, 0, 0, &sqlite3IntTokens[yymsp[-3].minor.yy4]);
+      sqlite3ExprDelete(pParse->db, yymsp[-4].minor.yy118.pExpr);
+    }else{
+      yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy118.pExpr, 0, 0);
+      if( yygotominor.yy118.pExpr ){
+        yygotominor.yy118.pExpr->x.pList = yymsp[-1].minor.yy322;
+        sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr);
+      }else{
+        sqlite3ExprListDelete(pParse->db, yymsp[-1].minor.yy322);
+      }
+      if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
+    }
+    yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
+    yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
+  }
+        break;
+      case 228: /* expr ::= LP select RP */
+{
+    yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_SELECT, 0, 0, 0);
+    if( yygotominor.yy118.pExpr ){
+      yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387;
+      ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect);
+      sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr);
+    }else{
+      sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387);
+    }
+    yygotominor.yy118.zStart = yymsp[-2].minor.yy0.z;
+    yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
+  }
+        break;
+      case 229: /* expr ::= expr in_op LP select RP */
+{
+    yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-4].minor.yy118.pExpr, 0, 0);
+    if( yygotominor.yy118.pExpr ){
+      yygotominor.yy118.pExpr->x.pSelect = yymsp[-1].minor.yy387;
+      ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect);
+      sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr);
+    }else{
+      sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387);
+    }
+    if( yymsp[-3].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
+    yygotominor.yy118.zStart = yymsp[-4].minor.yy118.zStart;
+    yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
+  }
+        break;
+      case 230: /* expr ::= expr in_op nm dbnm */
+{
+    SrcList *pSrc = sqlite3SrcListAppend(pParse->db, 0,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0);
+    yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_IN, yymsp[-3].minor.yy118.pExpr, 0, 0);
+    if( yygotominor.yy118.pExpr ){
+      yygotominor.yy118.pExpr->x.pSelect = sqlite3SelectNew(pParse, 0,pSrc,0,0,0,0,0,0,0);
+      ExprSetProperty(yygotominor.yy118.pExpr, EP_xIsSelect);
+      sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr);
+    }else{
+      sqlite3SrcListDelete(pParse->db, pSrc);
+    }
+    if( yymsp[-2].minor.yy4 ) yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_NOT, yygotominor.yy118.pExpr, 0, 0);
+    yygotominor.yy118.zStart = yymsp[-3].minor.yy118.zStart;
+    yygotominor.yy118.zEnd = yymsp[0].minor.yy0.z ? &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n] : &yymsp[-1].minor.yy0.z[yymsp[-1].minor.yy0.n];
+  }
+        break;
+      case 231: /* expr ::= EXISTS LP select RP */
+{
+    Expr *p = yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_EXISTS, 0, 0, 0);
+    if( p ){
+      p->x.pSelect = yymsp[-1].minor.yy387;
+      ExprSetProperty(p, EP_xIsSelect);
+      sqlite3ExprSetHeight(pParse, p);
+    }else{
+      sqlite3SelectDelete(pParse->db, yymsp[-1].minor.yy387);
+    }
+    yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z;
+    yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
+  }
+        break;
+      case 232: /* expr ::= CASE case_operand case_exprlist case_else END */
+{
+  yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_CASE, yymsp[-3].minor.yy314, yymsp[-1].minor.yy314, 0);
+  if( yygotominor.yy118.pExpr ){
+    yygotominor.yy118.pExpr->x.pList = yymsp[-2].minor.yy322;
+    sqlite3ExprSetHeight(pParse, yygotominor.yy118.pExpr);
+  }else{
+    sqlite3ExprListDelete(pParse->db, yymsp[-2].minor.yy322);
+  }
+  yygotominor.yy118.zStart = yymsp[-4].minor.yy0.z;
+  yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
+}
+        break;
+      case 233: /* case_exprlist ::= case_exprlist WHEN expr THEN expr */
+{
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, yymsp[-2].minor.yy118.pExpr);
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr);
+}
+        break;
+      case 234: /* case_exprlist ::= WHEN expr THEN expr */
+{
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, yymsp[-2].minor.yy118.pExpr);
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse,yygotominor.yy322, yymsp[0].minor.yy118.pExpr);
+}
+        break;
+      case 243: /* cmd ::= createkw uniqueflag INDEX ifnotexists nm dbnm ON nm LP idxlist RP */
+{
+  sqlite3CreateIndex(pParse, &yymsp[-6].minor.yy0, &yymsp[-5].minor.yy0, 
+                     sqlite3SrcListAppend(pParse->db,0,&yymsp[-3].minor.yy0,0), yymsp[-1].minor.yy322, yymsp[-9].minor.yy4,
+                      &yymsp[-10].minor.yy0, &yymsp[0].minor.yy0, SQLITE_SO_ASC, yymsp[-7].minor.yy4);
+}
+        break;
+      case 244: /* uniqueflag ::= UNIQUE */
+      case 298: /* raisetype ::= ABORT */ yytestcase(yyruleno==298);
+{yygotominor.yy4 = OE_Abort;}
+        break;
+      case 245: /* uniqueflag ::= */
+{yygotominor.yy4 = OE_None;}
+        break;
+      case 248: /* idxlist ::= idxlist COMMA nm collate sortorder */
+{
+  Expr *p = 0;
+  if( yymsp[-1].minor.yy0.n>0 ){
+    p = sqlite3Expr(pParse->db, TK_COLUMN, 0);
+    sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0);
+  }
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse,yymsp[-4].minor.yy322, p);
+  sqlite3ExprListSetName(pParse,yygotominor.yy322,&yymsp[-2].minor.yy0,1);
+  sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index");
+  if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
+}
+        break;
+      case 249: /* idxlist ::= nm collate sortorder */
+{
+  Expr *p = 0;
+  if( yymsp[-1].minor.yy0.n>0 ){
+    p = sqlite3PExpr(pParse, TK_COLUMN, 0, 0, 0);
+    sqlite3ExprSetCollByToken(pParse, p, &yymsp[-1].minor.yy0);
+  }
+  yygotominor.yy322 = sqlite3ExprListAppend(pParse,0, p);
+  sqlite3ExprListSetName(pParse, yygotominor.yy322, &yymsp[-2].minor.yy0, 1);
+  sqlite3ExprListCheckLength(pParse, yygotominor.yy322, "index");
+  if( yygotominor.yy322 ) yygotominor.yy322->a[yygotominor.yy322->nExpr-1].sortOrder = (u8)yymsp[0].minor.yy4;
+}
+        break;
+      case 250: /* collate ::= */
+{yygotominor.yy0.z = 0; yygotominor.yy0.n = 0;}
+        break;
+      case 252: /* cmd ::= DROP INDEX ifexists fullname */
+{sqlite3DropIndex(pParse, yymsp[0].minor.yy259, yymsp[-1].minor.yy4);}
+        break;
+      case 253: /* cmd ::= VACUUM */
+      case 254: /* cmd ::= VACUUM nm */ yytestcase(yyruleno==254);
+{sqlite3Vacuum(pParse);}
+        break;
+      case 255: /* cmd ::= PRAGMA nm dbnm */
+{sqlite3Pragma(pParse,&yymsp[-1].minor.yy0,&yymsp[0].minor.yy0,0,0);}
+        break;
+      case 256: /* cmd ::= PRAGMA nm dbnm EQ nmnum */
+{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,0);}
+        break;
+      case 257: /* cmd ::= PRAGMA nm dbnm LP nmnum RP */
+{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,0);}
+        break;
+      case 258: /* cmd ::= PRAGMA nm dbnm EQ minus_num */
+{sqlite3Pragma(pParse,&yymsp[-3].minor.yy0,&yymsp[-2].minor.yy0,&yymsp[0].minor.yy0,1);}
+        break;
+      case 259: /* cmd ::= PRAGMA nm dbnm LP minus_num RP */
+{sqlite3Pragma(pParse,&yymsp[-4].minor.yy0,&yymsp[-3].minor.yy0,&yymsp[-1].minor.yy0,1);}
+        break;
+      case 270: /* cmd ::= createkw trigger_decl BEGIN trigger_cmd_list END */
+{
+  Token all;
+  all.z = yymsp[-3].minor.yy0.z;
+  all.n = (int)(yymsp[0].minor.yy0.z - yymsp[-3].minor.yy0.z) + yymsp[0].minor.yy0.n;
+  sqlite3FinishTrigger(pParse, yymsp[-1].minor.yy203, &all);
+}
+        break;
+      case 271: /* trigger_decl ::= temp TRIGGER ifnotexists nm dbnm trigger_time trigger_event ON fullname foreach_clause when_clause */
+{
+  sqlite3BeginTrigger(pParse, &yymsp[-7].minor.yy0, &yymsp[-6].minor.yy0, yymsp[-5].minor.yy4, yymsp[-4].minor.yy90.a, yymsp[-4].minor.yy90.b, yymsp[-2].minor.yy259, yymsp[0].minor.yy314, yymsp[-10].minor.yy4, yymsp[-8].minor.yy4);
+  yygotominor.yy0 = (yymsp[-6].minor.yy0.n==0?yymsp[-7].minor.yy0:yymsp[-6].minor.yy0);
+}
+        break;
+      case 272: /* trigger_time ::= BEFORE */
+      case 275: /* trigger_time ::= */ yytestcase(yyruleno==275);
+{ yygotominor.yy4 = TK_BEFORE; }
+        break;
+      case 273: /* trigger_time ::= AFTER */
+{ yygotominor.yy4 = TK_AFTER;  }
+        break;
+      case 274: /* trigger_time ::= INSTEAD OF */
+{ yygotominor.yy4 = TK_INSTEAD;}
+        break;
+      case 276: /* trigger_event ::= DELETE|INSERT */
+      case 277: /* trigger_event ::= UPDATE */ yytestcase(yyruleno==277);
+{yygotominor.yy90.a = yymsp[0].major; yygotominor.yy90.b = 0;}
+        break;
+      case 278: /* trigger_event ::= UPDATE OF inscollist */
+{yygotominor.yy90.a = TK_UPDATE; yygotominor.yy90.b = yymsp[0].minor.yy384;}
+        break;
+      case 281: /* when_clause ::= */
+      case 303: /* key_opt ::= */ yytestcase(yyruleno==303);
+{ yygotominor.yy314 = 0; }
+        break;
+      case 282: /* when_clause ::= WHEN expr */
+      case 304: /* key_opt ::= KEY expr */ yytestcase(yyruleno==304);
+{ yygotominor.yy314 = yymsp[0].minor.yy118.pExpr; }
+        break;
+      case 283: /* trigger_cmd_list ::= trigger_cmd_list trigger_cmd SEMI */
+{
+  assert( yymsp[-2].minor.yy203!=0 );
+  yymsp[-2].minor.yy203->pLast->pNext = yymsp[-1].minor.yy203;
+  yymsp[-2].minor.yy203->pLast = yymsp[-1].minor.yy203;
+  yygotominor.yy203 = yymsp[-2].minor.yy203;
+}
+        break;
+      case 284: /* trigger_cmd_list ::= trigger_cmd SEMI */
+{ 
+  assert( yymsp[-1].minor.yy203!=0 );
+  yymsp[-1].minor.yy203->pLast = yymsp[-1].minor.yy203;
+  yygotominor.yy203 = yymsp[-1].minor.yy203;
+}
+        break;
+      case 286: /* trnm ::= nm DOT nm */
+{
+  yygotominor.yy0 = yymsp[0].minor.yy0;
+  sqlite3ErrorMsg(pParse, 
+        "qualified table names are not allowed on INSERT, UPDATE, and DELETE "
+        "statements within triggers");
+}
+        break;
+      case 288: /* tridxby ::= INDEXED BY nm */
+{
+  sqlite3ErrorMsg(pParse,
+        "the INDEXED BY clause is not allowed on UPDATE or DELETE statements "
+        "within triggers");
+}
+        break;
+      case 289: /* tridxby ::= NOT INDEXED */
+{
+  sqlite3ErrorMsg(pParse,
+        "the NOT INDEXED clause is not allowed on UPDATE or DELETE statements "
+        "within triggers");
+}
+        break;
+      case 290: /* trigger_cmd ::= UPDATE orconf trnm tridxby SET setlist where_opt */
+{ yygotominor.yy203 = sqlite3TriggerUpdateStep(pParse->db, &yymsp[-4].minor.yy0, yymsp[-1].minor.yy322, yymsp[0].minor.yy314, yymsp[-5].minor.yy210); }
+        break;
+      case 291: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt VALUES LP itemlist RP */
+{yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-5].minor.yy0, yymsp[-4].minor.yy384, yymsp[-1].minor.yy322, 0, yymsp[-7].minor.yy210);}
+        break;
+      case 292: /* trigger_cmd ::= insert_cmd INTO trnm inscollist_opt select */
+{yygotominor.yy203 = sqlite3TriggerInsertStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[-1].minor.yy384, 0, yymsp[0].minor.yy387, yymsp[-4].minor.yy210);}
+        break;
+      case 293: /* trigger_cmd ::= DELETE FROM trnm tridxby where_opt */
+{yygotominor.yy203 = sqlite3TriggerDeleteStep(pParse->db, &yymsp[-2].minor.yy0, yymsp[0].minor.yy314);}
+        break;
+      case 294: /* trigger_cmd ::= select */
+{yygotominor.yy203 = sqlite3TriggerSelectStep(pParse->db, yymsp[0].minor.yy387); }
+        break;
+      case 295: /* expr ::= RAISE LP IGNORE RP */
+{
+  yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, 0); 
+  if( yygotominor.yy118.pExpr ){
+    yygotominor.yy118.pExpr->affinity = OE_Ignore;
+  }
+  yygotominor.yy118.zStart = yymsp[-3].minor.yy0.z;
+  yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
+}
+        break;
+      case 296: /* expr ::= RAISE LP raisetype COMMA nm RP */
+{
+  yygotominor.yy118.pExpr = sqlite3PExpr(pParse, TK_RAISE, 0, 0, &yymsp[-1].minor.yy0); 
+  if( yygotominor.yy118.pExpr ) {
+    yygotominor.yy118.pExpr->affinity = (char)yymsp[-3].minor.yy4;
+  }
+  yygotominor.yy118.zStart = yymsp[-5].minor.yy0.z;
+  yygotominor.yy118.zEnd = &yymsp[0].minor.yy0.z[yymsp[0].minor.yy0.n];
+}
+        break;
+      case 297: /* raisetype ::= ROLLBACK */
+{yygotominor.yy4 = OE_Rollback;}
+        break;
+      case 299: /* raisetype ::= FAIL */
+{yygotominor.yy4 = OE_Fail;}
+        break;
+      case 300: /* cmd ::= DROP TRIGGER ifexists fullname */
+{
+  sqlite3DropTrigger(pParse,yymsp[0].minor.yy259,yymsp[-1].minor.yy4);
+}
+        break;
+      case 301: /* cmd ::= ATTACH database_kw_opt expr AS expr key_opt */
+{
+  sqlite3Attach(pParse, yymsp[-3].minor.yy118.pExpr, yymsp[-1].minor.yy118.pExpr, yymsp[0].minor.yy314);
+}
+        break;
+      case 302: /* cmd ::= DETACH database_kw_opt expr */
+{
+  sqlite3Detach(pParse, yymsp[0].minor.yy118.pExpr);
+}
+        break;
+      case 307: /* cmd ::= REINDEX */
+{sqlite3Reindex(pParse, 0, 0);}
+        break;
+      case 308: /* cmd ::= REINDEX nm dbnm */
+{sqlite3Reindex(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
+        break;
+      case 309: /* cmd ::= ANALYZE */
+{sqlite3Analyze(pParse, 0, 0);}
+        break;
+      case 310: /* cmd ::= ANALYZE nm dbnm */
+{sqlite3Analyze(pParse, &yymsp[-1].minor.yy0, &yymsp[0].minor.yy0);}
+        break;
+      case 311: /* cmd ::= ALTER TABLE fullname RENAME TO nm */
+{
+  sqlite3AlterRenameTable(pParse,yymsp[-3].minor.yy259,&yymsp[0].minor.yy0);
+}
+        break;
+      case 312: /* cmd ::= ALTER TABLE add_column_fullname ADD kwcolumn_opt column */
+{
+  sqlite3AlterFinishAddColumn(pParse, &yymsp[0].minor.yy0);
+}
+        break;
+      case 313: /* add_column_fullname ::= fullname */
+{
+  pParse->db->lookaside.bEnabled = 0;
+  sqlite3AlterBeginAddColumn(pParse, yymsp[0].minor.yy259);
+}
+        break;
+      case 316: /* cmd ::= create_vtab */
+{sqlite3VtabFinishParse(pParse,0);}
+        break;
+      case 317: /* cmd ::= create_vtab LP vtabarglist RP */
+{sqlite3VtabFinishParse(pParse,&yymsp[0].minor.yy0);}
+        break;
+      case 318: /* create_vtab ::= createkw VIRTUAL TABLE nm dbnm USING nm */
+{
+    sqlite3VtabBeginParse(pParse, &yymsp[-3].minor.yy0, &yymsp[-2].minor.yy0, &yymsp[0].minor.yy0);
+}
+        break;
+      case 321: /* vtabarg ::= */
+{sqlite3VtabArgInit(pParse);}
+        break;
+      case 323: /* vtabargtoken ::= ANY */
+      case 324: /* vtabargtoken ::= lp anylist RP */ yytestcase(yyruleno==324);
+      case 325: /* lp ::= LP */ yytestcase(yyruleno==325);
+{sqlite3VtabArgExtend(pParse,&yymsp[0].minor.yy0);}
+        break;
+      default:
+      /* (0) input ::= cmdlist */ yytestcase(yyruleno==0);
+      /* (1) cmdlist ::= cmdlist ecmd */ yytestcase(yyruleno==1);
+      /* (2) cmdlist ::= ecmd */ yytestcase(yyruleno==2);
+      /* (3) ecmd ::= SEMI */ yytestcase(yyruleno==3);
+      /* (4) ecmd ::= explain cmdx SEMI */ yytestcase(yyruleno==4);
+      /* (10) trans_opt ::= */ yytestcase(yyruleno==10);
+      /* (11) trans_opt ::= TRANSACTION */ yytestcase(yyruleno==11);
+      /* (12) trans_opt ::= TRANSACTION nm */ yytestcase(yyruleno==12);
+      /* (20) savepoint_opt ::= SAVEPOINT */ yytestcase(yyruleno==20);
+      /* (21) savepoint_opt ::= */ yytestcase(yyruleno==21);
+      /* (25) cmd ::= create_table create_table_args */ yytestcase(yyruleno==25);
+      /* (34) columnlist ::= columnlist COMMA column */ yytestcase(yyruleno==34);
+      /* (35) columnlist ::= column */ yytestcase(yyruleno==35);
+      /* (44) type ::= */ yytestcase(yyruleno==44);
+      /* (51) signed ::= plus_num */ yytestcase(yyruleno==51);
+      /* (52) signed ::= minus_num */ yytestcase(yyruleno==52);
+      /* (53) carglist ::= carglist carg */ yytestcase(yyruleno==53);
+      /* (54) carglist ::= */ yytestcase(yyruleno==54);
+      /* (55) carg ::= CONSTRAINT nm ccons */ yytestcase(yyruleno==55);
+      /* (56) carg ::= ccons */ yytestcase(yyruleno==56);
+      /* (62) ccons ::= NULL onconf */ yytestcase(yyruleno==62);
+      /* (90) conslist ::= conslist COMMA tcons */ yytestcase(yyruleno==90);
+      /* (91) conslist ::= conslist tcons */ yytestcase(yyruleno==91);
+      /* (92) conslist ::= tcons */ yytestcase(yyruleno==92);
+      /* (93) tcons ::= CONSTRAINT nm */ yytestcase(yyruleno==93);
+      /* (268) plus_opt ::= PLUS */ yytestcase(yyruleno==268);
+      /* (269) plus_opt ::= */ yytestcase(yyruleno==269);
+      /* (279) foreach_clause ::= */ yytestcase(yyruleno==279);
+      /* (280) foreach_clause ::= FOR EACH ROW */ yytestcase(yyruleno==280);
+      /* (287) tridxby ::= */ yytestcase(yyruleno==287);
+      /* (305) database_kw_opt ::= DATABASE */ yytestcase(yyruleno==305);
+      /* (306) database_kw_opt ::= */ yytestcase(yyruleno==306);
+      /* (314) kwcolumn_opt ::= */ yytestcase(yyruleno==314);
+      /* (315) kwcolumn_opt ::= COLUMNKW */ yytestcase(yyruleno==315);
+      /* (319) vtabarglist ::= vtabarg */ yytestcase(yyruleno==319);
+      /* (320) vtabarglist ::= vtabarglist COMMA vtabarg */ yytestcase(yyruleno==320);
+      /* (322) vtabarg ::= vtabarg vtabargtoken */ yytestcase(yyruleno==322);
+      /* (326) anylist ::= */ yytestcase(yyruleno==326);
+      /* (327) anylist ::= anylist LP anylist RP */ yytestcase(yyruleno==327);
+      /* (328) anylist ::= anylist ANY */ yytestcase(yyruleno==328);
+        break;
+  };
+  yygoto = yyRuleInfo[yyruleno].lhs;
+  yysize = yyRuleInfo[yyruleno].nrhs;
+  yypParser->yyidx -= yysize;
+  yyact = yy_find_reduce_action(yymsp[-yysize].stateno,(YYCODETYPE)yygoto);
+  if( yyact < YYNSTATE ){
+#ifdef NDEBUG
+    /* If we are not debugging and the reduce action popped at least
+    ** one element off the stack, then we can push the new element back
+    ** onto the stack here, and skip the stack overflow test in yy_shift().
+    ** That gives a significant speed improvement. */
+    if( yysize ){
+      yypParser->yyidx++;
+      yymsp -= yysize-1;
+      yymsp->stateno = (YYACTIONTYPE)yyact;
+      yymsp->major = (YYCODETYPE)yygoto;
+      yymsp->minor = yygotominor;
+    }else
+#endif
+    {
+      yy_shift(yypParser,yyact,yygoto,&yygotominor);
+    }
+  }else{
+    assert( yyact == YYNSTATE + YYNRULE + 1 );
+    yy_accept(yypParser);
+  }
+}
+
+/*
+** The following code executes when the parse fails
+*/
+#ifndef YYNOERRORRECOVERY
+static void yy_parse_failed(
+  yyParser *yypParser           /* The parser */
+){
+  sqlite3ParserARG_FETCH;
+#ifndef NDEBUG
+  if( yyTraceFILE ){
+    fprintf(yyTraceFILE,"%sFail!\n",yyTracePrompt);
+  }
+#endif
+  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
+  /* Here code is inserted which will be executed whenever the
+  ** parser fails */
+  sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+#endif /* YYNOERRORRECOVERY */
+
+/*
+** The following code executes when a syntax error first occurs.
+*/
+static void yy_syntax_error(
+  yyParser *yypParser,           /* The parser */
+  int yymajor,                   /* The major type of the error token */
+  YYMINORTYPE yyminor            /* The minor type of the error token */
+){
+  sqlite3ParserARG_FETCH;
+#define TOKEN (yyminor.yy0)
+
+  UNUSED_PARAMETER(yymajor);  /* Silence some compiler warnings */
+  assert( TOKEN.z[0] );  /* The tokenizer always gives us a token */
+  sqlite3ErrorMsg(pParse, "near \"%T\": syntax error", &TOKEN);
+  pParse->parseError = 1;
+  sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+
+/*
+** The following is executed when the parser accepts
+*/
+static void yy_accept(
+  yyParser *yypParser           /* The parser */
+){
+  sqlite3ParserARG_FETCH;
+#ifndef NDEBUG
+  if( yyTraceFILE ){
+    fprintf(yyTraceFILE,"%sAccept!\n",yyTracePrompt);
+  }
+#endif
+  while( yypParser->yyidx>=0 ) yy_pop_parser_stack(yypParser);
+  /* Here code is inserted which will be executed whenever the
+  ** parser accepts */
+  sqlite3ParserARG_STORE; /* Suppress warning about unused %extra_argument variable */
+}
+
+/* The main parser program.
+** The first argument is a pointer to a structure obtained from
+** "sqlite3ParserAlloc" which describes the current state of the parser.
+** The second argument is the major token number.  The third is
+** the minor token.  The fourth optional argument is whatever the
+** user wants (and specified in the grammar) and is available for
+** use by the action routines.
+**
+** Inputs:
+** <ul>
+** <li> A pointer to the parser (an opaque structure.)
+** <li> The major token number.
+** <li> The minor token number.
+** <li> An option argument of a grammar-specified type.
+** </ul>
+**
+** Outputs:
+** None.
+*/
+SQLITE_PRIVATE void sqlite3Parser(
+  void *yyp,                   /* The parser */
+  int yymajor,                 /* The major token code number */
+  sqlite3ParserTOKENTYPE yyminor       /* The value for the token */
+  sqlite3ParserARG_PDECL               /* Optional %extra_argument parameter */
+){
+  YYMINORTYPE yyminorunion;
+  int yyact;            /* The parser action. */
+  int yyendofinput;     /* True if we are at the end of input */
+#ifdef YYERRORSYMBOL
+  int yyerrorhit = 0;   /* True if yymajor has invoked an error */
+#endif
+  yyParser *yypParser;  /* The parser */
+
+  /* (re)initialize the parser, if necessary */
+  yypParser = (yyParser*)yyp;
+  if( yypParser->yyidx<0 ){
+#if YYSTACKDEPTH<=0
+    if( yypParser->yystksz <=0 ){
+      /*memset(&yyminorunion, 0, sizeof(yyminorunion));*/
+      yyminorunion = yyzerominor;
+      yyStackOverflow(yypParser, &yyminorunion);
+      return;
+    }
+#endif
+    yypParser->yyidx = 0;
+    yypParser->yyerrcnt = -1;
+    yypParser->yystack[0].stateno = 0;
+    yypParser->yystack[0].major = 0;
+  }
+  yyminorunion.yy0 = yyminor;
+  yyendofinput = (yymajor==0);
+  sqlite3ParserARG_STORE;
+
+#ifndef NDEBUG
+  if( yyTraceFILE ){
+    fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
+  }
+#endif
+
+  do{
+    yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
+    if( yyact<YYNSTATE ){
+      assert( !yyendofinput );  /* Impossible to shift the $ token */
+      yy_shift(yypParser,yyact,yymajor,&yyminorunion);
+      yypParser->yyerrcnt--;
+      yymajor = YYNOCODE;
+    }else if( yyact < YYNSTATE + YYNRULE ){
+      yy_reduce(yypParser,yyact-YYNSTATE);
+    }else{
+      assert( yyact == YY_ERROR_ACTION );
+#ifdef YYERRORSYMBOL
+      int yymx;
+#endif
+#ifndef NDEBUG
+      if( yyTraceFILE ){
+        fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
+      }
+#endif
+#ifdef YYERRORSYMBOL
+      /* A syntax error has occurred.
+      ** The response to an error depends upon whether or not the
+      ** grammar defines an error token "ERROR".  
+      **
+      ** This is what we do if the grammar does define ERROR:
+      **
+      **  * Call the %syntax_error function.
+      **
+      **  * Begin popping the stack until we enter a state where
+      **    it is legal to shift the error symbol, then shift
+      **    the error symbol.
+      **
+      **  * Set the error count to three.
+      **
+      **  * Begin accepting and shifting new tokens.  No new error
+      **    processing will occur until three tokens have been
+      **    shifted successfully.
+      **
+      */
+      if( yypParser->yyerrcnt<0 ){
+        yy_syntax_error(yypParser,yymajor,yyminorunion);
+      }
+      yymx = yypParser->yystack[yypParser->yyidx].major;
+      if( yymx==YYERRORSYMBOL || yyerrorhit ){
+#ifndef NDEBUG
+        if( yyTraceFILE ){
+          fprintf(yyTraceFILE,"%sDiscard input token %s\n",
+             yyTracePrompt,yyTokenName[yymajor]);
+        }
+#endif
+        yy_destructor(yypParser, (YYCODETYPE)yymajor,&yyminorunion);
+        yymajor = YYNOCODE;
+      }else{
+         while(
+          yypParser->yyidx >= 0 &&
+          yymx != YYERRORSYMBOL &&
+          (yyact = yy_find_reduce_action(
+                        yypParser->yystack[yypParser->yyidx].stateno,
+                        YYERRORSYMBOL)) >= YYNSTATE
+        ){
+          yy_pop_parser_stack(yypParser);
+        }
+        if( yypParser->yyidx < 0 || yymajor==0 ){
+          yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
+          yy_parse_failed(yypParser);
+          yymajor = YYNOCODE;
+        }else if( yymx!=YYERRORSYMBOL ){
+          YYMINORTYPE u2;
+          u2.YYERRSYMDT = 0;
+          yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
+        }
+      }
+      yypParser->yyerrcnt = 3;
+      yyerrorhit = 1;
+#elif defined(YYNOERRORRECOVERY)
+      /* If the YYNOERRORRECOVERY macro is defined, then do not attempt to
+      ** do any kind of error recovery.  Instead, simply invoke the syntax
+      ** error routine and continue going as if nothing had happened.
+      **
+      ** Applications can set this macro (for example inside %include) if
+      ** they intend to abandon the parse upon the first syntax error seen.
+      */
+      yy_syntax_error(yypParser,yymajor,yyminorunion);
+      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
+      yymajor = YYNOCODE;
+      
+#else  /* YYERRORSYMBOL is not defined */
+      /* This is what we do if the grammar does not define ERROR:
+      **
+      **  * Report an error message, and throw away the input token.
+      **
+      **  * If the input token is $, then fail the parse.
+      **
+      ** As before, subsequent error messages are suppressed until
+      ** three input tokens have been successfully shifted.
+      */
+      if( yypParser->yyerrcnt<=0 ){
+        yy_syntax_error(yypParser,yymajor,yyminorunion);
+      }
+      yypParser->yyerrcnt = 3;
+      yy_destructor(yypParser,(YYCODETYPE)yymajor,&yyminorunion);
+      if( yyendofinput ){
+        yy_parse_failed(yypParser);
+      }
+      yymajor = YYNOCODE;
+#endif
+    }
+  }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
+  return;
+}
+
+/************** End of parse.c ***********************************************/
+/************** Begin file tokenize.c ****************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** An tokenizer for SQL
+**
+** This file contains C code that splits an SQL input string up into
+** individual tokens and sends those tokens one-by-one over to the
+** parser for analysis.
+*/
+
+/*
+** The charMap() macro maps alphabetic characters into their
+** lower-case ASCII equivalent.  On ASCII machines, this is just
+** an upper-to-lower case map.  On EBCDIC machines we also need
+** to adjust the encoding.  Only alphabetic characters and underscores
+** need to be translated.
+*/
+#ifdef SQLITE_ASCII
+# define charMap(X) sqlite3UpperToLower[(unsigned char)X]
+#endif
+#ifdef SQLITE_EBCDIC
+# define charMap(X) ebcdicToAscii[(unsigned char)X]
+const unsigned char ebcdicToAscii[] = {
+/* 0   1   2   3   4   5   6   7   8   9   A   B   C   D   E   F */
+   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 0x */
+   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 1x */
+   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 2x */
+   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 3x */
+   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 4x */
+   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 5x */
+   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 95,  0,  0,  /* 6x */
+   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* 7x */
+   0, 97, 98, 99,100,101,102,103,104,105,  0,  0,  0,  0,  0,  0,  /* 8x */
+   0,106,107,108,109,110,111,112,113,114,  0,  0,  0,  0,  0,  0,  /* 9x */
+   0,  0,115,116,117,118,119,120,121,122,  0,  0,  0,  0,  0,  0,  /* Ax */
+   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* Bx */
+   0, 97, 98, 99,100,101,102,103,104,105,  0,  0,  0,  0,  0,  0,  /* Cx */
+   0,106,107,108,109,110,111,112,113,114,  0,  0,  0,  0,  0,  0,  /* Dx */
+   0,  0,115,116,117,118,119,120,121,122,  0,  0,  0,  0,  0,  0,  /* Ex */
+   0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  /* Fx */
+};
+#endif
+
+/*
+** The sqlite3KeywordCode function looks up an identifier to determine if
+** it is a keyword.  If it is a keyword, the token code of that keyword is 
+** returned.  If the input is not a keyword, TK_ID is returned.
+**
+** The implementation of this routine was generated by a program,
+** mkkeywordhash.h, located in the tool subdirectory of the distribution.
+** The output of the mkkeywordhash.c program is written into a file
+** named keywordhash.h and then included into this source file by
+** the #include below.
+*/
+/************** Include keywordhash.h in the middle of tokenize.c ************/
+/************** Begin file keywordhash.h *************************************/
+/***** This file contains automatically generated code ******
+**
+** The code in this file has been automatically generated by
+**
+**   sqlite/tool/mkkeywordhash.c
+**
+** The code in this file implements a function that determines whether
+** or not a given identifier is really an SQL keyword.  The same thing
+** might be implemented more directly using a hand-written hash table.
+** But by using this automatically generated code, the size of the code
+** is substantially reduced.  This is important for embedded applications
+** on platforms with limited memory.
+*/
+/* Hash score: 175 */
+static int keywordCode(const char *z, int n){
+  /* zText[] encodes 811 bytes of keywords in 541 bytes */
+  /*   REINDEXEDESCAPEACHECKEYBEFOREIGNOREGEXPLAINSTEADDATABASELECT       */
+  /*   ABLEFTHENDEFERRABLELSEXCEPTRANSACTIONATURALTERAISEXCLUSIVE         */
+  /*   XISTSAVEPOINTERSECTRIGGEREFERENCESCONSTRAINTOFFSETEMPORARY         */
+  /*   UNIQUERYATTACHAVINGROUPDATEBEGINNERELEASEBETWEENOTNULLIKE          */
+  /*   CASCADELETECASECOLLATECREATECURRENT_DATEDETACHIMMEDIATEJOIN        */
+  /*   SERTMATCHPLANALYZEPRAGMABORTVALUESVIRTUALIMITWHENWHERENAME         */
+  /*   AFTEREPLACEANDEFAULTAUTOINCREMENTCASTCOLUMNCOMMITCONFLICTCROSS     */
+  /*   CURRENT_TIMESTAMPRIMARYDEFERREDISTINCTDROPFAILFROMFULLGLOBYIF      */
+  /*   ISNULLORDERESTRICTOUTERIGHTROLLBACKROWUNIONUSINGVACUUMVIEW         */
+  /*   INITIALLY                                                          */
+  static const char zText[540] = {
+    'R','E','I','N','D','E','X','E','D','E','S','C','A','P','E','A','C','H',
+    'E','C','K','E','Y','B','E','F','O','R','E','I','G','N','O','R','E','G',
+    'E','X','P','L','A','I','N','S','T','E','A','D','D','A','T','A','B','A',
+    'S','E','L','E','C','T','A','B','L','E','F','T','H','E','N','D','E','F',
+    'E','R','R','A','B','L','E','L','S','E','X','C','E','P','T','R','A','N',
+    'S','A','C','T','I','O','N','A','T','U','R','A','L','T','E','R','A','I',
+    'S','E','X','C','L','U','S','I','V','E','X','I','S','T','S','A','V','E',
+    'P','O','I','N','T','E','R','S','E','C','T','R','I','G','G','E','R','E',
+    'F','E','R','E','N','C','E','S','C','O','N','S','T','R','A','I','N','T',
+    'O','F','F','S','E','T','E','M','P','O','R','A','R','Y','U','N','I','Q',
+    'U','E','R','Y','A','T','T','A','C','H','A','V','I','N','G','R','O','U',
+    'P','D','A','T','E','B','E','G','I','N','N','E','R','E','L','E','A','S',
+    'E','B','E','T','W','E','E','N','O','T','N','U','L','L','I','K','E','C',
+    'A','S','C','A','D','E','L','E','T','E','C','A','S','E','C','O','L','L',
+    'A','T','E','C','R','E','A','T','E','C','U','R','R','E','N','T','_','D',
+    'A','T','E','D','E','T','A','C','H','I','M','M','E','D','I','A','T','E',
+    'J','O','I','N','S','E','R','T','M','A','T','C','H','P','L','A','N','A',
+    'L','Y','Z','E','P','R','A','G','M','A','B','O','R','T','V','A','L','U',
+    'E','S','V','I','R','T','U','A','L','I','M','I','T','W','H','E','N','W',
+    'H','E','R','E','N','A','M','E','A','F','T','E','R','E','P','L','A','C',
+    'E','A','N','D','E','F','A','U','L','T','A','U','T','O','I','N','C','R',
+    'E','M','E','N','T','C','A','S','T','C','O','L','U','M','N','C','O','M',
+    'M','I','T','C','O','N','F','L','I','C','T','C','R','O','S','S','C','U',
+    'R','R','E','N','T','_','T','I','M','E','S','T','A','M','P','R','I','M',
+    'A','R','Y','D','E','F','E','R','R','E','D','I','S','T','I','N','C','T',
+    'D','R','O','P','F','A','I','L','F','R','O','M','F','U','L','L','G','L',
+    'O','B','Y','I','F','I','S','N','U','L','L','O','R','D','E','R','E','S',
+    'T','R','I','C','T','O','U','T','E','R','I','G','H','T','R','O','L','L',
+    'B','A','C','K','R','O','W','U','N','I','O','N','U','S','I','N','G','V',
+    'A','C','U','U','M','V','I','E','W','I','N','I','T','I','A','L','L','Y',
+  };
+  static const unsigned char aHash[127] = {
+      72, 101, 114,  70,   0,  45,   0,   0,  78,   0,  73,   0,   0,
+      42,  12,  74,  15,   0, 113,  81,  50, 108,   0,  19,   0,   0,
+     118,   0, 116, 111,   0,  22,  89,   0,   9,   0,   0,  66,  67,
+       0,  65,   6,   0,  48,  86,  98,   0, 115,  97,   0,   0,  44,
+       0,  99,  24,   0,  17,   0, 119,  49,  23,   0,   5, 106,  25,
+      92,   0,   0, 121, 102,  56, 120,  53,  28,  51,   0,  87,   0,
+      96,  26,   0,  95,   0,   0,   0,  91,  88,  93,  84, 105,  14,
+      39, 104,   0,  77,   0,  18,  85, 107,  32,   0, 117,  76, 109,
+      58,  46,  80,   0,   0,  90,  40,   0, 112,   0,  36,   0,   0,
+      29,   0,  82,  59,  60,   0,  20,  57,   0,  52,
+  };
+  static const unsigned char aNext[121] = {
+       0,   0,   0,   0,   4,   0,   0,   0,   0,   0,   0,   0,   0,
+       0,   2,   0,   0,   0,   0,   0,   0,  13,   0,   0,   0,   0,
+       0,   7,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,   0,
+       0,   0,   0,   0,  33,   0,  21,   0,   0,   0,  43,   3,  47,
+       0,   0,   0,   0,  30,   0,  54,   0,  38,   0,   0,   0,   1,
+      62,   0,   0,  63,   0,  41,   0,   0,   0,   0,   0,   0,   0,
+      61,   0,   0,   0,   0,  31,  55,  16,  34,  10,   0,   0,   0,
+       0,   0,   0,   0,  11,  68,  75,   0,   8,   0, 100,  94,   0,
+     103,   0,  83,   0,  71,   0,   0, 110,  27,  37,  69,  79,   0,
+      35,  64,   0,   0,
+  };
+  static const unsigned char aLen[121] = {
+       7,   7,   5,   4,   6,   4,   5,   3,   6,   7,   3,   6,   6,
+       7,   7,   3,   8,   2,   6,   5,   4,   4,   3,  10,   4,   6,
+      11,   6,   2,   7,   5,   5,   9,   6,   9,   9,   7,  10,  10,
+       4,   6,   2,   3,   9,   4,   2,   6,   5,   6,   6,   5,   6,
+       5,   5,   7,   7,   7,   3,   2,   4,   4,   7,   3,   6,   4,
+       7,   6,  12,   6,   9,   4,   6,   5,   4,   7,   6,   5,   6,
+       7,   5,   4,   5,   6,   5,   7,   3,   7,  13,   2,   2,   4,
+       6,   6,   8,   5,  17,  12,   7,   8,   8,   2,   4,   4,   4,
+       4,   4,   2,   2,   6,   5,   8,   5,   5,   8,   3,   5,   5,
+       6,   4,   9,   3,
+  };
+  static const unsigned short int aOffset[121] = {
+       0,   2,   2,   8,   9,  14,  16,  20,  23,  25,  25,  29,  33,
+      36,  41,  46,  48,  53,  54,  59,  62,  65,  67,  69,  78,  81,
+      86,  91,  95,  96, 101, 105, 109, 117, 122, 128, 136, 142, 152,
+     159, 162, 162, 165, 167, 167, 171, 176, 179, 184, 189, 194, 197,
+     203, 206, 210, 217, 223, 223, 223, 226, 229, 233, 234, 238, 244,
+     248, 255, 261, 273, 279, 288, 290, 296, 301, 303, 310, 315, 320,
+     326, 332, 337, 341, 344, 350, 354, 361, 363, 370, 372, 374, 383,
+     387, 393, 399, 407, 412, 412, 428, 435, 442, 443, 450, 454, 458,
+     462, 466, 469, 471, 473, 479, 483, 491, 495, 500, 508, 511, 516,
+     521, 527, 531, 536,
+  };
+  static const unsigned char aCode[121] = {
+    TK_REINDEX,    TK_INDEXED,    TK_INDEX,      TK_DESC,       TK_ESCAPE,     
+    TK_EACH,       TK_CHECK,      TK_KEY,        TK_BEFORE,     TK_FOREIGN,    
+    TK_FOR,        TK_IGNORE,     TK_LIKE_KW,    TK_EXPLAIN,    TK_INSTEAD,    
+    TK_ADD,        TK_DATABASE,   TK_AS,         TK_SELECT,     TK_TABLE,      
+    TK_JOIN_KW,    TK_THEN,       TK_END,        TK_DEFERRABLE, TK_ELSE,       
+    TK_EXCEPT,     TK_TRANSACTION,TK_ACTION,     TK_ON,         TK_JOIN_KW,    
+    TK_ALTER,      TK_RAISE,      TK_EXCLUSIVE,  TK_EXISTS,     TK_SAVEPOINT,  
+    TK_INTERSECT,  TK_TRIGGER,    TK_REFERENCES, TK_CONSTRAINT, TK_INTO,       
+    TK_OFFSET,     TK_OF,         TK_SET,        TK_TEMP,       TK_TEMP,       
+    TK_OR,         TK_UNIQUE,     TK_QUERY,      TK_ATTACH,     TK_HAVING,     
+    TK_GROUP,      TK_UPDATE,     TK_BEGIN,      TK_JOIN_KW,    TK_RELEASE,    
+    TK_BETWEEN,    TK_NOTNULL,    TK_NOT,        TK_NO,         TK_NULL,       
+    TK_LIKE_KW,    TK_CASCADE,    TK_ASC,        TK_DELETE,     TK_CASE,       
+    TK_COLLATE,    TK_CREATE,     TK_CTIME_KW,   TK_DETACH,     TK_IMMEDIATE,  
+    TK_JOIN,       TK_INSERT,     TK_MATCH,      TK_PLAN,       TK_ANALYZE,    
+    TK_PRAGMA,     TK_ABORT,      TK_VALUES,     TK_VIRTUAL,    TK_LIMIT,      
+    TK_WHEN,       TK_WHERE,      TK_RENAME,     TK_AFTER,      TK_REPLACE,    
+    TK_AND,        TK_DEFAULT,    TK_AUTOINCR,   TK_TO,         TK_IN,         
+    TK_CAST,       TK_COLUMNKW,   TK_COMMIT,     TK_CONFLICT,   TK_JOIN_KW,    
+    TK_CTIME_KW,   TK_CTIME_KW,   TK_PRIMARY,    TK_DEFERRED,   TK_DISTINCT,   
+    TK_IS,         TK_DROP,       TK_FAIL,       TK_FROM,       TK_JOIN_KW,    
+    TK_LIKE_KW,    TK_BY,         TK_IF,         TK_ISNULL,     TK_ORDER,      
+    TK_RESTRICT,   TK_JOIN_KW,    TK_JOIN_KW,    TK_ROLLBACK,   TK_ROW,        
+    TK_UNION,      TK_USING,      TK_VACUUM,     TK_VIEW,       TK_INITIALLY,  
+    TK_ALL,        
+  };
+  int h, i;
+  if( n<2 ) return TK_ID;
+  h = ((charMap(z[0])*4) ^
+      (charMap(z[n-1])*3) ^
+      n) % 127;
+  for(i=((int)aHash[h])-1; i>=0; i=((int)aNext[i])-1){
+    if( aLen[i]==n && sqlite3StrNICmp(&zText[aOffset[i]],z,n)==0 ){
+      testcase( i==0 ); /* REINDEX */
+      testcase( i==1 ); /* INDEXED */
+      testcase( i==2 ); /* INDEX */
+      testcase( i==3 ); /* DESC */
+      testcase( i==4 ); /* ESCAPE */
+      testcase( i==5 ); /* EACH */
+      testcase( i==6 ); /* CHECK */
+      testcase( i==7 ); /* KEY */
+      testcase( i==8 ); /* BEFORE */
+      testcase( i==9 ); /* FOREIGN */
+      testcase( i==10 ); /* FOR */
+      testcase( i==11 ); /* IGNORE */
+      testcase( i==12 ); /* REGEXP */
+      testcase( i==13 ); /* EXPLAIN */
+      testcase( i==14 ); /* INSTEAD */
+      testcase( i==15 ); /* ADD */
+      testcase( i==16 ); /* DATABASE */
+      testcase( i==17 ); /* AS */
+      testcase( i==18 ); /* SELECT */
+      testcase( i==19 ); /* TABLE */
+      testcase( i==20 ); /* LEFT */
+      testcase( i==21 ); /* THEN */
+      testcase( i==22 ); /* END */
+      testcase( i==23 ); /* DEFERRABLE */
+      testcase( i==24 ); /* ELSE */
+      testcase( i==25 ); /* EXCEPT */
+      testcase( i==26 ); /* TRANSACTION */
+      testcase( i==27 ); /* ACTION */
+      testcase( i==28 ); /* ON */
+      testcase( i==29 ); /* NATURAL */
+      testcase( i==30 ); /* ALTER */
+      testcase( i==31 ); /* RAISE */
+      testcase( i==32 ); /* EXCLUSIVE */
+      testcase( i==33 ); /* EXISTS */
+      testcase( i==34 ); /* SAVEPOINT */
+      testcase( i==35 ); /* INTERSECT */
+      testcase( i==36 ); /* TRIGGER */
+      testcase( i==37 ); /* REFERENCES */
+      testcase( i==38 ); /* CONSTRAINT */
+      testcase( i==39 ); /* INTO */
+      testcase( i==40 ); /* OFFSET */
+      testcase( i==41 ); /* OF */
+      testcase( i==42 ); /* SET */
+      testcase( i==43 ); /* TEMPORARY */
+      testcase( i==44 ); /* TEMP */
+      testcase( i==45 ); /* OR */
+      testcase( i==46 ); /* UNIQUE */
+      testcase( i==47 ); /* QUERY */
+      testcase( i==48 ); /* ATTACH */
+      testcase( i==49 ); /* HAVING */
+      testcase( i==50 ); /* GROUP */
+      testcase( i==51 ); /* UPDATE */
+      testcase( i==52 ); /* BEGIN */
+      testcase( i==53 ); /* INNER */
+      testcase( i==54 ); /* RELEASE */
+      testcase( i==55 ); /* BETWEEN */
+      testcase( i==56 ); /* NOTNULL */
+      testcase( i==57 ); /* NOT */
+      testcase( i==58 ); /* NO */
+      testcase( i==59 ); /* NULL */
+      testcase( i==60 ); /* LIKE */
+      testcase( i==61 ); /* CASCADE */
+      testcase( i==62 ); /* ASC */
+      testcase( i==63 ); /* DELETE */
+      testcase( i==64 ); /* CASE */
+      testcase( i==65 ); /* COLLATE */
+      testcase( i==66 ); /* CREATE */
+      testcase( i==67 ); /* CURRENT_DATE */
+      testcase( i==68 ); /* DETACH */
+      testcase( i==69 ); /* IMMEDIATE */
+      testcase( i==70 ); /* JOIN */
+      testcase( i==71 ); /* INSERT */
+      testcase( i==72 ); /* MATCH */
+      testcase( i==73 ); /* PLAN */
+      testcase( i==74 ); /* ANALYZE */
+      testcase( i==75 ); /* PRAGMA */
+      testcase( i==76 ); /* ABORT */
+      testcase( i==77 ); /* VALUES */
+      testcase( i==78 ); /* VIRTUAL */
+      testcase( i==79 ); /* LIMIT */
+      testcase( i==80 ); /* WHEN */
+      testcase( i==81 ); /* WHERE */
+      testcase( i==82 ); /* RENAME */
+      testcase( i==83 ); /* AFTER */
+      testcase( i==84 ); /* REPLACE */
+      testcase( i==85 ); /* AND */
+      testcase( i==86 ); /* DEFAULT */
+      testcase( i==87 ); /* AUTOINCREMENT */
+      testcase( i==88 ); /* TO */
+      testcase( i==89 ); /* IN */
+      testcase( i==90 ); /* CAST */
+      testcase( i==91 ); /* COLUMN */
+      testcase( i==92 ); /* COMMIT */
+      testcase( i==93 ); /* CONFLICT */
+      testcase( i==94 ); /* CROSS */
+      testcase( i==95 ); /* CURRENT_TIMESTAMP */
+      testcase( i==96 ); /* CURRENT_TIME */
+      testcase( i==97 ); /* PRIMARY */
+      testcase( i==98 ); /* DEFERRED */
+      testcase( i==99 ); /* DISTINCT */
+      testcase( i==100 ); /* IS */
+      testcase( i==101 ); /* DROP */
+      testcase( i==102 ); /* FAIL */
+      testcase( i==103 ); /* FROM */
+      testcase( i==104 ); /* FULL */
+      testcase( i==105 ); /* GLOB */
+      testcase( i==106 ); /* BY */
+      testcase( i==107 ); /* IF */
+      testcase( i==108 ); /* ISNULL */
+      testcase( i==109 ); /* ORDER */
+      testcase( i==110 ); /* RESTRICT */
+      testcase( i==111 ); /* OUTER */
+      testcase( i==112 ); /* RIGHT */
+      testcase( i==113 ); /* ROLLBACK */
+      testcase( i==114 ); /* ROW */
+      testcase( i==115 ); /* UNION */
+      testcase( i==116 ); /* USING */
+      testcase( i==117 ); /* VACUUM */
+      testcase( i==118 ); /* VIEW */
+      testcase( i==119 ); /* INITIALLY */
+      testcase( i==120 ); /* ALL */
+      return aCode[i];
+    }
+  }
+  return TK_ID;
+}
+SQLITE_PRIVATE int sqlite3KeywordCode(const unsigned char *z, int n){
+  return keywordCode((char*)z, n);
+}
+#define SQLITE_N_KEYWORD 121
+
+/************** End of keywordhash.h *****************************************/
+/************** Continuing where we left off in tokenize.c *******************/
+
+
+/*
+** If X is a character that can be used in an identifier then
+** IdChar(X) will be true.  Otherwise it is false.
+**
+** For ASCII, any character with the high-order bit set is
+** allowed in an identifier.  For 7-bit characters, 
+** sqlite3IsIdChar[X] must be 1.
+**
+** For EBCDIC, the rules are more complex but have the same
+** end result.
+**
+** Ticket #1066.  the SQL standard does not allow '$' in the
+** middle of identfiers.  But many SQL implementations do. 
+** SQLite will allow '$' in identifiers for compatibility.
+** But the feature is undocumented.
+*/
+#ifdef SQLITE_ASCII
+#define IdChar(C)  ((sqlite3CtypeMap[(unsigned char)C]&0x46)!=0)
+#endif
+#ifdef SQLITE_EBCDIC
+SQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[] = {
+/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
+    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,  /* 4x */
+    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 0, 0, 0, 0,  /* 5x */
+    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 0, 0,  /* 6x */
+    0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0,  /* 7x */
+    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 1, 1, 0,  /* 8x */
+    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 1, 0, 1, 0,  /* 9x */
+    1, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 0,  /* Ax */
+    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* Bx */
+    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Cx */
+    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Dx */
+    0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1,  /* Ex */
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 0,  /* Fx */
+};
+#define IdChar(C)  (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))
+#endif
+
+
+/*
+** Return the length of the token that begins at z[0]. 
+** Store the token type in *tokenType before returning.
+*/
+SQLITE_PRIVATE int sqlite3GetToken(const unsigned char *z, int *tokenType){
+  int i, c;
+  switch( *z ){
+    case ' ': case '\t': case '\n': case '\f': case '\r': {
+      testcase( z[0]==' ' );
+      testcase( z[0]=='\t' );
+      testcase( z[0]=='\n' );
+      testcase( z[0]=='\f' );
+      testcase( z[0]=='\r' );
+      for(i=1; sqlite3Isspace(z[i]); i++){}
+      *tokenType = TK_SPACE;
+      return i;
+    }
+    case '-': {
+      if( z[1]=='-' ){
+        /* IMP: R-15891-05542 -- syntax diagram for comments */
+        for(i=2; (c=z[i])!=0 && c!='\n'; i++){}
+        *tokenType = TK_SPACE;   /* IMP: R-22934-25134 */
+        return i;
+      }
+      *tokenType = TK_MINUS;
+      return 1;
+    }
+    case '(': {
+      *tokenType = TK_LP;
+      return 1;
+    }
+    case ')': {
+      *tokenType = TK_RP;
+      return 1;
+    }
+    case ';': {
+      *tokenType = TK_SEMI;
+      return 1;
+    }
+    case '+': {
+      *tokenType = TK_PLUS;
+      return 1;
+    }
+    case '*': {
+      *tokenType = TK_STAR;
+      return 1;
+    }
+    case '/': {
+      if( z[1]!='*' || z[2]==0 ){
+        *tokenType = TK_SLASH;
+        return 1;
+      }
+      /* IMP: R-15891-05542 -- syntax diagram for comments */
+      for(i=3, c=z[2]; (c!='*' || z[i]!='/') && (c=z[i])!=0; i++){}
+      if( c ) i++;
+      *tokenType = TK_SPACE;   /* IMP: R-22934-25134 */
+      return i;
+    }
+    case '%': {
+      *tokenType = TK_REM;
+      return 1;
+    }
+    case '=': {
+      *tokenType = TK_EQ;
+      return 1 + (z[1]=='=');
+    }
+    case '<': {
+      if( (c=z[1])=='=' ){
+        *tokenType = TK_LE;
+        return 2;
+      }else if( c=='>' ){
+        *tokenType = TK_NE;
+        return 2;
+      }else if( c=='<' ){
+        *tokenType = TK_LSHIFT;
+        return 2;
+      }else{
+        *tokenType = TK_LT;
+        return 1;
+      }
+    }
+    case '>': {
+      if( (c=z[1])=='=' ){
+        *tokenType = TK_GE;
+        return 2;
+      }else if( c=='>' ){
+        *tokenType = TK_RSHIFT;
+        return 2;
+      }else{
+        *tokenType = TK_GT;
+        return 1;
+      }
+    }
+    case '!': {
+      if( z[1]!='=' ){
+        *tokenType = TK_ILLEGAL;
+        return 2;
+      }else{
+        *tokenType = TK_NE;
+        return 2;
+      }
+    }
+    case '|': {
+      if( z[1]!='|' ){
+        *tokenType = TK_BITOR;
+        return 1;
+      }else{
+        *tokenType = TK_CONCAT;
+        return 2;
+      }
+    }
+    case ',': {
+      *tokenType = TK_COMMA;
+      return 1;
+    }
+    case '&': {
+      *tokenType = TK_BITAND;
+      return 1;
+    }
+    case '~': {
+      *tokenType = TK_BITNOT;
+      return 1;
+    }
+    case '`':
+    case '\'':
+    case '"': {
+      int delim = z[0];
+      testcase( delim=='`' );
+      testcase( delim=='\'' );
+      testcase( delim=='"' );
+      for(i=1; (c=z[i])!=0; i++){
+        if( c==delim ){
+          if( z[i+1]==delim ){
+            i++;
+          }else{
+            break;
+          }
+        }
+      }
+      if( c=='\'' ){
+        *tokenType = TK_STRING;
+        return i+1;
+      }else if( c!=0 ){
+        *tokenType = TK_ID;
+        return i+1;
+      }else{
+        *tokenType = TK_ILLEGAL;
+        return i;
+      }
+    }
+    case '.': {
+#ifndef SQLITE_OMIT_FLOATING_POINT
+      if( !sqlite3Isdigit(z[1]) )
+#endif
+      {
+        *tokenType = TK_DOT;
+        return 1;
+      }
+      /* If the next character is a digit, this is a floating point
+      ** number that begins with ".".  Fall thru into the next case */
+    }
+    case '0': case '1': case '2': case '3': case '4':
+    case '5': case '6': case '7': case '8': case '9': {
+      testcase( z[0]=='0' );  testcase( z[0]=='1' );  testcase( z[0]=='2' );
+      testcase( z[0]=='3' );  testcase( z[0]=='4' );  testcase( z[0]=='5' );
+      testcase( z[0]=='6' );  testcase( z[0]=='7' );  testcase( z[0]=='8' );
+      testcase( z[0]=='9' );
+      *tokenType = TK_INTEGER;
+      for(i=0; sqlite3Isdigit(z[i]); i++){}
+#ifndef SQLITE_OMIT_FLOATING_POINT
+      if( z[i]=='.' ){
+        i++;
+        while( sqlite3Isdigit(z[i]) ){ i++; }
+        *tokenType = TK_FLOAT;
+      }
+      if( (z[i]=='e' || z[i]=='E') &&
+           ( sqlite3Isdigit(z[i+1]) 
+            || ((z[i+1]=='+' || z[i+1]=='-') && sqlite3Isdigit(z[i+2]))
+           )
+      ){
+        i += 2;
+        while( sqlite3Isdigit(z[i]) ){ i++; }
+        *tokenType = TK_FLOAT;
+      }
+#endif
+      while( IdChar(z[i]) ){
+        *tokenType = TK_ILLEGAL;
+        i++;
+      }
+      return i;
+    }
+    case '[': {
+      for(i=1, c=z[0]; c!=']' && (c=z[i])!=0; i++){}
+      *tokenType = c==']' ? TK_ID : TK_ILLEGAL;
+      return i;
+    }
+    case '?': {
+      *tokenType = TK_VARIABLE;
+      for(i=1; sqlite3Isdigit(z[i]); i++){}
+      return i;
+    }
+    case '#': {
+      for(i=1; sqlite3Isdigit(z[i]); i++){}
+      if( i>1 ){
+        /* Parameters of the form #NNN (where NNN is a number) are used
+        ** internally by sqlite3NestedParse.  */
+        *tokenType = TK_REGISTER;
+        return i;
+      }
+      /* Fall through into the next case if the '#' is not followed by
+      ** a digit. Try to match #AAAA where AAAA is a parameter name. */
+    }
+#ifndef SQLITE_OMIT_TCL_VARIABLE
+    case '$':
+#endif
+    case '@':  /* For compatibility with MS SQL Server */
+    case ':': {
+      int n = 0;
+      testcase( z[0]=='$' );  testcase( z[0]=='@' );  testcase( z[0]==':' );
+      *tokenType = TK_VARIABLE;
+      for(i=1; (c=z[i])!=0; i++){
+        if( IdChar(c) ){
+          n++;
+#ifndef SQLITE_OMIT_TCL_VARIABLE
+        }else if( c=='(' && n>0 ){
+          do{
+            i++;
+          }while( (c=z[i])!=0 && !sqlite3Isspace(c) && c!=')' );
+          if( c==')' ){
+            i++;
+          }else{
+            *tokenType = TK_ILLEGAL;
+          }
+          break;
+        }else if( c==':' && z[i+1]==':' ){
+          i++;
+#endif
+        }else{
+          break;
+        }
+      }
+      if( n==0 ) *tokenType = TK_ILLEGAL;
+      return i;
+    }
+#ifndef SQLITE_OMIT_BLOB_LITERAL
+    case 'x': case 'X': {
+      testcase( z[0]=='x' ); testcase( z[0]=='X' );
+      if( z[1]=='\'' ){
+        *tokenType = TK_BLOB;
+        for(i=2; (c=z[i])!=0 && c!='\''; i++){
+          if( !sqlite3Isxdigit(c) ){
+            *tokenType = TK_ILLEGAL;
+          }
+        }
+        if( i%2 || !c ) *tokenType = TK_ILLEGAL;
+        if( c ) i++;
+        return i;
+      }
+      /* Otherwise fall through to the next case */
+    }
+#endif
+    default: {
+      if( !IdChar(*z) ){
+        break;
+      }
+      for(i=1; IdChar(z[i]); i++){}
+      *tokenType = keywordCode((char*)z, i);
+      return i;
+    }
+  }
+  *tokenType = TK_ILLEGAL;
+  return 1;
+}
+
+/*
+** Run the parser on the given SQL string.  The parser structure is
+** passed in.  An SQLITE_ status code is returned.  If an error occurs
+** then an and attempt is made to write an error message into 
+** memory obtained from sqlite3_malloc() and to make *pzErrMsg point to that
+** error message.
+*/
+SQLITE_PRIVATE int sqlite3RunParser(Parse *pParse, const char *zSql, char **pzErrMsg){
+  int nErr = 0;                   /* Number of errors encountered */
+  int i;                          /* Loop counter */
+  void *pEngine;                  /* The LEMON-generated LALR(1) parser */
+  int tokenType;                  /* type of the next token */
+  int lastTokenParsed = -1;       /* type of the previous token */
+  u8 enableLookaside;             /* Saved value of db->lookaside.bEnabled */
+  sqlite3 *db = pParse->db;       /* The database connection */
+  int mxSqlLen;                   /* Max length of an SQL string */
+
+
+  mxSqlLen = db->aLimit[SQLITE_LIMIT_SQL_LENGTH];
+  if( db->activeVdbeCnt==0 ){
+    db->u1.isInterrupted = 0;
+  }
+  pParse->rc = SQLITE_OK;
+  pParse->zTail = zSql;
+  i = 0;
+  assert( pzErrMsg!=0 );
+  pEngine = sqlite3ParserAlloc((void*(*)(size_t))sqlite3Malloc);
+  if( pEngine==0 ){
+    db->mallocFailed = 1;
+    return SQLITE_NOMEM;
+  }
+  assert( pParse->pNewTable==0 );
+  assert( pParse->pNewTrigger==0 );
+  assert( pParse->nVar==0 );
+  assert( pParse->nVarExpr==0 );
+  assert( pParse->nVarExprAlloc==0 );
+  assert( pParse->apVarExpr==0 );
+  enableLookaside = db->lookaside.bEnabled;
+  if( db->lookaside.pStart ) db->lookaside.bEnabled = 1;
+  while( !db->mallocFailed && zSql[i]!=0 ){
+    assert( i>=0 );
+    pParse->sLastToken.z = &zSql[i];
+    pParse->sLastToken.n = sqlite3GetToken((unsigned char*)&zSql[i],&tokenType);
+    i += pParse->sLastToken.n;
+    if( i>mxSqlLen ){
+      pParse->rc = SQLITE_TOOBIG;
+      break;
+    }
+    switch( tokenType ){
+      case TK_SPACE: {
+        if( db->u1.isInterrupted ){
+          sqlite3ErrorMsg(pParse, "interrupt");
+          pParse->rc = SQLITE_INTERRUPT;
+          goto abort_parse;
+        }
+        break;
+      }
+      case TK_ILLEGAL: {
+        sqlite3DbFree(db, *pzErrMsg);
+        *pzErrMsg = sqlite3MPrintf(db, "unrecognized token: \"%T\"",
+                        &pParse->sLastToken);
+        nErr++;
+        goto abort_parse;
+      }
+      case TK_SEMI: {
+        pParse->zTail = &zSql[i];
+        /* Fall thru into the default case */
+      }
+      default: {
+        sqlite3Parser(pEngine, tokenType, pParse->sLastToken, pParse);
+        lastTokenParsed = tokenType;
+        if( pParse->rc!=SQLITE_OK ){
+          goto abort_parse;
+        }
+        break;
+      }
+    }
+  }
+abort_parse:
+  if( zSql[i]==0 && nErr==0 && pParse->rc==SQLITE_OK ){
+    if( lastTokenParsed!=TK_SEMI ){
+      sqlite3Parser(pEngine, TK_SEMI, pParse->sLastToken, pParse);
+      pParse->zTail = &zSql[i];
+    }
+    sqlite3Parser(pEngine, 0, pParse->sLastToken, pParse);
+  }
+#ifdef YYTRACKMAXSTACKDEPTH
+  sqlite3StatusSet(SQLITE_STATUS_PARSER_STACK,
+      sqlite3ParserStackPeak(pEngine)
+  );
+#endif /* YYDEBUG */
+  sqlite3ParserFree(pEngine, sqlite3_free);
+  db->lookaside.bEnabled = enableLookaside;
+  if( db->mallocFailed ){
+    pParse->rc = SQLITE_NOMEM;
+  }
+  if( pParse->rc!=SQLITE_OK && pParse->rc!=SQLITE_DONE && pParse->zErrMsg==0 ){
+    sqlite3SetString(&pParse->zErrMsg, db, "%s", sqlite3ErrStr(pParse->rc));
+  }
+  assert( pzErrMsg!=0 );
+  if( pParse->zErrMsg ){
+    *pzErrMsg = pParse->zErrMsg;
+    sqlite3_log(pParse->rc, "%s", *pzErrMsg);
+    pParse->zErrMsg = 0;
+    nErr++;
+  }
+  if( pParse->pVdbe && pParse->nErr>0 && pParse->nested==0 ){
+    sqlite3VdbeDelete(pParse->pVdbe);
+    pParse->pVdbe = 0;
+  }
+#ifndef SQLITE_OMIT_SHARED_CACHE
+  if( pParse->nested==0 ){
+    sqlite3DbFree(db, pParse->aTableLock);
+    pParse->aTableLock = 0;
+    pParse->nTableLock = 0;
+  }
+#endif
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  sqlite3_free(pParse->apVtabLock);
+#endif
+
+  if( !IN_DECLARE_VTAB ){
+    /* If the pParse->declareVtab flag is set, do not delete any table 
+    ** structure built up in pParse->pNewTable. The calling code (see vtab.c)
+    ** will take responsibility for freeing the Table structure.
+    */
+    sqlite3DeleteTable(db, pParse->pNewTable);
+  }
+
+  sqlite3DeleteTrigger(db, pParse->pNewTrigger);
+  sqlite3DbFree(db, pParse->apVarExpr);
+  sqlite3DbFree(db, pParse->aAlias);
+  while( pParse->pAinc ){
+    AutoincInfo *p = pParse->pAinc;
+    pParse->pAinc = p->pNext;
+    sqlite3DbFree(db, p);
+  }
+  while( pParse->pZombieTab ){
+    Table *p = pParse->pZombieTab;
+    pParse->pZombieTab = p->pNextZombie;
+    sqlite3DeleteTable(db, p);
+  }
+  if( nErr>0 && pParse->rc==SQLITE_OK ){
+    pParse->rc = SQLITE_ERROR;
+  }
+  return nErr;
+}
+
+/************** End of tokenize.c ********************************************/
+/************** Begin file complete.c ****************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** An tokenizer for SQL
+**
+** This file contains C code that implements the sqlite3_complete() API.
+** This code used to be part of the tokenizer.c source file.  But by
+** separating it out, the code will be automatically omitted from
+** static links that do not use it.
+*/
+#ifndef SQLITE_OMIT_COMPLETE
+
+/*
+** This is defined in tokenize.c.  We just have to import the definition.
+*/
+#ifndef SQLITE_AMALGAMATION
+#ifdef SQLITE_ASCII
+#define IdChar(C)  ((sqlite3CtypeMap[(unsigned char)C]&0x46)!=0)
+#endif
+#ifdef SQLITE_EBCDIC
+SQLITE_PRIVATE const char sqlite3IsEbcdicIdChar[];
+#define IdChar(C)  (((c=C)>=0x42 && sqlite3IsEbcdicIdChar[c-0x40]))
+#endif
+#endif /* SQLITE_AMALGAMATION */
+
+
+/*
+** Token types used by the sqlite3_complete() routine.  See the header
+** comments on that procedure for additional information.
+*/
+#define tkSEMI    0
+#define tkWS      1
+#define tkOTHER   2
+#ifndef SQLITE_OMIT_TRIGGER
+#define tkEXPLAIN 3
+#define tkCREATE  4
+#define tkTEMP    5
+#define tkTRIGGER 6
+#define tkEND     7
+#endif
+
+/*
+** Return TRUE if the given SQL string ends in a semicolon.
+**
+** Special handling is require for CREATE TRIGGER statements.
+** Whenever the CREATE TRIGGER keywords are seen, the statement
+** must end with ";END;".
+**
+** This implementation uses a state machine with 8 states:
+**
+**   (0) INVALID   We have not yet seen a non-whitespace character.
+**
+**   (1) START     At the beginning or end of an SQL statement.  This routine
+**                 returns 1 if it ends in the START state and 0 if it ends
+**                 in any other state.
+**
+**   (2) NORMAL    We are in the middle of statement which ends with a single
+**                 semicolon.
+**
+**   (3) EXPLAIN   The keyword EXPLAIN has been seen at the beginning of 
+**                 a statement.
+**
+**   (4) CREATE    The keyword CREATE has been seen at the beginning of a
+**                 statement, possibly preceeded by EXPLAIN and/or followed by
+**                 TEMP or TEMPORARY
+**
+**   (5) TRIGGER   We are in the middle of a trigger definition that must be
+**                 ended by a semicolon, the keyword END, and another semicolon.
+**
+**   (6) SEMI      We've seen the first semicolon in the ";END;" that occurs at
+**                 the end of a trigger definition.
+**
+**   (7) END       We've seen the ";END" of the ";END;" that occurs at the end
+**                 of a trigger difinition.
+**
+** Transitions between states above are determined by tokens extracted
+** from the input.  The following tokens are significant:
+**
+**   (0) tkSEMI      A semicolon.
+**   (1) tkWS        Whitespace.
+**   (2) tkOTHER     Any other SQL token.
+**   (3) tkEXPLAIN   The "explain" keyword.
+**   (4) tkCREATE    The "create" keyword.
+**   (5) tkTEMP      The "temp" or "temporary" keyword.
+**   (6) tkTRIGGER   The "trigger" keyword.
+**   (7) tkEND       The "end" keyword.
+**
+** Whitespace never causes a state transition and is always ignored.
+** This means that a SQL string of all whitespace is invalid.
+**
+** If we compile with SQLITE_OMIT_TRIGGER, all of the computation needed
+** to recognize the end of a trigger can be omitted.  All we have to do
+** is look for a semicolon that is not part of an string or comment.
+*/
+SQLITE_API int sqlite3_complete(const char *zSql){
+  u8 state = 0;   /* Current state, using numbers defined in header comment */
+  u8 token;       /* Value of the next token */
+
+#ifndef SQLITE_OMIT_TRIGGER
+  /* A complex statement machine used to detect the end of a CREATE TRIGGER
+  ** statement.  This is the normal case.
+  */
+  static const u8 trans[8][8] = {
+                     /* Token:                                                */
+     /* State:       **  SEMI  WS  OTHER  EXPLAIN  CREATE  TEMP  TRIGGER  END */
+     /* 0 INVALID: */ {    1,  0,     2,       3,      4,    2,       2,   2, },
+     /* 1   START: */ {    1,  1,     2,       3,      4,    2,       2,   2, },
+     /* 2  NORMAL: */ {    1,  2,     2,       2,      2,    2,       2,   2, },
+     /* 3 EXPLAIN: */ {    1,  3,     3,       2,      4,    2,       2,   2, },
+     /* 4  CREATE: */ {    1,  4,     2,       2,      2,    4,       5,   2, },
+     /* 5 TRIGGER: */ {    6,  5,     5,       5,      5,    5,       5,   5, },
+     /* 6    SEMI: */ {    6,  6,     5,       5,      5,    5,       5,   7, },
+     /* 7     END: */ {    1,  7,     5,       5,      5,    5,       5,   5, },
+  };
+#else
+  /* If triggers are not supported by this compile then the statement machine
+  ** used to detect the end of a statement is much simplier
+  */
+  static const u8 trans[3][3] = {
+                     /* Token:           */
+     /* State:       **  SEMI  WS  OTHER */
+     /* 0 INVALID: */ {    1,  0,     2, },
+     /* 1   START: */ {    1,  1,     2, },
+     /* 2  NORMAL: */ {    1,  2,     2, },
+  };
+#endif /* SQLITE_OMIT_TRIGGER */
+
+  while( *zSql ){
+    switch( *zSql ){
+      case ';': {  /* A semicolon */
+        token = tkSEMI;
+        break;
+      }
+      case ' ':
+      case '\r':
+      case '\t':
+      case '\n':
+      case '\f': {  /* White space is ignored */
+        token = tkWS;
+        break;
+      }
+      case '/': {   /* C-style comments */
+        if( zSql[1]!='*' ){
+          token = tkOTHER;
+          break;
+        }
+        zSql += 2;
+        while( zSql[0] && (zSql[0]!='*' || zSql[1]!='/') ){ zSql++; }
+        if( zSql[0]==0 ) return 0;
+        zSql++;
+        token = tkWS;
+        break;
+      }
+      case '-': {   /* SQL-style comments from "--" to end of line */
+        if( zSql[1]!='-' ){
+          token = tkOTHER;
+          break;
+        }
+        while( *zSql && *zSql!='\n' ){ zSql++; }
+        if( *zSql==0 ) return state==1;
+        token = tkWS;
+        break;
+      }
+      case '[': {   /* Microsoft-style identifiers in [...] */
+        zSql++;
+        while( *zSql && *zSql!=']' ){ zSql++; }
+        if( *zSql==0 ) return 0;
+        token = tkOTHER;
+        break;
+      }
+      case '`':     /* Grave-accent quoted symbols used by MySQL */
+      case '"':     /* single- and double-quoted strings */
+      case '\'': {
+        int c = *zSql;
+        zSql++;
+        while( *zSql && *zSql!=c ){ zSql++; }
+        if( *zSql==0 ) return 0;
+        token = tkOTHER;
+        break;
+      }
+      default: {
+#ifdef SQLITE_EBCDIC
+        unsigned char c;
+#endif
+        if( IdChar((u8)*zSql) ){
+          /* Keywords and unquoted identifiers */
+          int nId;
+          for(nId=1; IdChar(zSql[nId]); nId++){}
+#ifdef SQLITE_OMIT_TRIGGER
+          token = tkOTHER;
+#else
+          switch( *zSql ){
+            case 'c': case 'C': {
+              if( nId==6 && sqlite3StrNICmp(zSql, "create", 6)==0 ){
+                token = tkCREATE;
+              }else{
+                token = tkOTHER;
+              }
+              break;
+            }
+            case 't': case 'T': {
+              if( nId==7 && sqlite3StrNICmp(zSql, "trigger", 7)==0 ){
+                token = tkTRIGGER;
+              }else if( nId==4 && sqlite3StrNICmp(zSql, "temp", 4)==0 ){
+                token = tkTEMP;
+              }else if( nId==9 && sqlite3StrNICmp(zSql, "temporary", 9)==0 ){
+                token = tkTEMP;
+              }else{
+                token = tkOTHER;
+              }
+              break;
+            }
+            case 'e':  case 'E': {
+              if( nId==3 && sqlite3StrNICmp(zSql, "end", 3)==0 ){
+                token = tkEND;
+              }else
+#ifndef SQLITE_OMIT_EXPLAIN
+              if( nId==7 && sqlite3StrNICmp(zSql, "explain", 7)==0 ){
+                token = tkEXPLAIN;
+              }else
+#endif
+              {
+                token = tkOTHER;
+              }
+              break;
+            }
+            default: {
+              token = tkOTHER;
+              break;
+            }
+          }
+#endif /* SQLITE_OMIT_TRIGGER */
+          zSql += nId-1;
+        }else{
+          /* Operators and special symbols */
+          token = tkOTHER;
+        }
+        break;
+      }
+    }
+    state = trans[state][token];
+    zSql++;
+  }
+  return state==1;
+}
+
+#ifndef SQLITE_OMIT_UTF16
+/*
+** This routine is the same as the sqlite3_complete() routine described
+** above, except that the parameter is required to be UTF-16 encoded, not
+** UTF-8.
+*/
+SQLITE_API int sqlite3_complete16(const void *zSql){
+  sqlite3_value *pVal;
+  char const *zSql8;
+  int rc = SQLITE_NOMEM;
+
+#ifndef SQLITE_OMIT_AUTOINIT
+  rc = sqlite3_initialize();
+  if( rc ) return rc;
+#endif
+  pVal = sqlite3ValueNew(0);
+  sqlite3ValueSetStr(pVal, -1, zSql, SQLITE_UTF16NATIVE, SQLITE_STATIC);
+  zSql8 = sqlite3ValueText(pVal, SQLITE_UTF8);
+  if( zSql8 ){
+    rc = sqlite3_complete(zSql8);
+  }else{
+    rc = SQLITE_NOMEM;
+  }
+  sqlite3ValueFree(pVal);
+  return sqlite3ApiExit(0, rc);
+}
+#endif /* SQLITE_OMIT_UTF16 */
+#endif /* SQLITE_OMIT_COMPLETE */
+
+/************** End of complete.c ********************************************/
+/************** Begin file main.c ********************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** Main file for the SQLite library.  The routines in this file
+** implement the programmer interface to the library.  Routines in
+** other files are for internal use by SQLite and should not be
+** accessed by users of the library.
+*/
+
+#ifdef SQLITE_ENABLE_FTS3
+/************** Include fts3.h in the middle of main.c ***********************/
+/************** Begin file fts3.h ********************************************/
+/*
+** 2006 Oct 10
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This header file is used by programs that want to link against the
+** FTS3 library.  All it does is declare the sqlite3Fts3Init() interface.
+*/
+
+#if 0
+extern "C" {
+#endif  /* __cplusplus */
+
+SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db);
+
+#if 0
+}  /* extern "C" */
+#endif  /* __cplusplus */
+
+/************** End of fts3.h ************************************************/
+/************** Continuing where we left off in main.c ***********************/
+#endif
+#ifdef SQLITE_ENABLE_RTREE
+/************** Include rtree.h in the middle of main.c **********************/
+/************** Begin file rtree.h *******************************************/
+/*
+** 2008 May 26
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This header file is used by programs that want to link against the
+** RTREE library.  All it does is declare the sqlite3RtreeInit() interface.
+*/
+
+#if 0
+extern "C" {
+#endif  /* __cplusplus */
+
+SQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db);
+
+#if 0
+}  /* extern "C" */
+#endif  /* __cplusplus */
+
+/************** End of rtree.h ***********************************************/
+/************** Continuing where we left off in main.c ***********************/
+#endif
+#ifdef SQLITE_ENABLE_ICU
+/************** Include sqliteicu.h in the middle of main.c ******************/
+/************** Begin file sqliteicu.h ***************************************/
+/*
+** 2008 May 26
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This header file is used by programs that want to link against the
+** ICU extension.  All it does is declare the sqlite3IcuInit() interface.
+*/
+
+#if 0
+extern "C" {
+#endif  /* __cplusplus */
+
+SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db);
+
+#if 0
+}  /* extern "C" */
+#endif  /* __cplusplus */
+
+
+/************** End of sqliteicu.h *******************************************/
+/************** Continuing where we left off in main.c ***********************/
+#endif
+
+#ifndef SQLITE_AMALGAMATION
+/* IMPLEMENTATION-OF: R-46656-45156 The sqlite3_version[] string constant
+** contains the text of SQLITE_VERSION macro. 
+*/
+SQLITE_API const char sqlite3_version[] = SQLITE_VERSION;
+#endif
+
+/* IMPLEMENTATION-OF: R-53536-42575 The sqlite3_libversion() function returns
+** a pointer to the to the sqlite3_version[] string constant. 
+*/
+SQLITE_API const char *sqlite3_libversion(void){ return sqlite3_version; }
+
+/* IMPLEMENTATION-OF: R-63124-39300 The sqlite3_sourceid() function returns a
+** pointer to a string constant whose value is the same as the
+** SQLITE_SOURCE_ID C preprocessor macro. 
+*/
+SQLITE_API const char *sqlite3_sourceid(void){ return SQLITE_SOURCE_ID; }
+
+/* IMPLEMENTATION-OF: R-35210-63508 The sqlite3_libversion_number() function
+** returns an integer equal to SQLITE_VERSION_NUMBER.
+*/
+SQLITE_API int sqlite3_libversion_number(void){ return SQLITE_VERSION_NUMBER; }
+
+/* IMPLEMENTATION-OF: R-54823-41343 The sqlite3_threadsafe() function returns
+** zero if and only if SQLite was compiled mutexing code omitted due to
+** the SQLITE_THREADSAFE compile-time option being set to 0.
+*/
+SQLITE_API int sqlite3_threadsafe(void){ return SQLITE_THREADSAFE; }
+
+#if !defined(SQLITE_OMIT_TRACE) && defined(SQLITE_ENABLE_IOTRACE)
+/*
+** If the following function pointer is not NULL and if
+** SQLITE_ENABLE_IOTRACE is enabled, then messages describing
+** I/O active are written using this function.  These messages
+** are intended for debugging activity only.
+*/
+SQLITE_PRIVATE void (*sqlite3IoTrace)(const char*, ...) = 0;
+#endif
+
+/*
+** If the following global variable points to a string which is the
+** name of a directory, then that directory will be used to store
+** temporary files.
+**
+** See also the "PRAGMA temp_store_directory" SQL command.
+*/
+SQLITE_API char *sqlite3_temp_directory = 0;
+
+/*
+** Initialize SQLite.  
+**
+** This routine must be called to initialize the memory allocation,
+** VFS, and mutex subsystems prior to doing any serious work with
+** SQLite.  But as long as you do not compile with SQLITE_OMIT_AUTOINIT
+** this routine will be called automatically by key routines such as
+** sqlite3_open().  
+**
+** This routine is a no-op except on its very first call for the process,
+** or for the first call after a call to sqlite3_shutdown.
+**
+** The first thread to call this routine runs the initialization to
+** completion.  If subsequent threads call this routine before the first
+** thread has finished the initialization process, then the subsequent
+** threads must block until the first thread finishes with the initialization.
+**
+** The first thread might call this routine recursively.  Recursive
+** calls to this routine should not block, of course.  Otherwise the
+** initialization process would never complete.
+**
+** Let X be the first thread to enter this routine.  Let Y be some other
+** thread.  Then while the initial invocation of this routine by X is
+** incomplete, it is required that:
+**
+**    *  Calls to this routine from Y must block until the outer-most
+**       call by X completes.
+**
+**    *  Recursive calls to this routine from thread X return immediately
+**       without blocking.
+*/
+SQLITE_API int sqlite3_initialize(void){
+  sqlite3_mutex *pMaster;                      /* The main static mutex */
+  int rc;                                      /* Result code */
+
+#ifdef SQLITE_OMIT_WSD
+  rc = sqlite3_wsd_init(4096, 24);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+#endif
+
+  /* If SQLite is already completely initialized, then this call
+  ** to sqlite3_initialize() should be a no-op.  But the initialization
+  ** must be complete.  So isInit must not be set until the very end
+  ** of this routine.
+  */
+  if( sqlite3GlobalConfig.isInit ) return SQLITE_OK;
+
+  /* Make sure the mutex subsystem is initialized.  If unable to 
+  ** initialize the mutex subsystem, return early with the error.
+  ** If the system is so sick that we are unable to allocate a mutex,
+  ** there is not much SQLite is going to be able to do.
+  **
+  ** The mutex subsystem must take care of serializing its own
+  ** initialization.
+  */
+  rc = sqlite3MutexInit();
+  if( rc ) return rc;
+
+  /* Initialize the malloc() system and the recursive pInitMutex mutex.
+  ** This operation is protected by the STATIC_MASTER mutex.  Note that
+  ** MutexAlloc() is called for a static mutex prior to initializing the
+  ** malloc subsystem - this implies that the allocation of a static
+  ** mutex must not require support from the malloc subsystem.
+  */
+  pMaster = sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER);
+  sqlite3_mutex_enter(pMaster);
+  sqlite3GlobalConfig.isMutexInit = 1;
+  if( !sqlite3GlobalConfig.isMallocInit ){
+    rc = sqlite3MallocInit();
+  }
+  if( rc==SQLITE_OK ){
+    sqlite3GlobalConfig.isMallocInit = 1;
+    if( !sqlite3GlobalConfig.pInitMutex ){
+      sqlite3GlobalConfig.pInitMutex =
+           sqlite3MutexAlloc(SQLITE_MUTEX_RECURSIVE);
+      if( sqlite3GlobalConfig.bCoreMutex && !sqlite3GlobalConfig.pInitMutex ){
+        rc = SQLITE_NOMEM;
+      }
+    }
+  }
+  if( rc==SQLITE_OK ){
+    sqlite3GlobalConfig.nRefInitMutex++;
+  }
+  sqlite3_mutex_leave(pMaster);
+
+  /* If rc is not SQLITE_OK at this point, then either the malloc
+  ** subsystem could not be initialized or the system failed to allocate
+  ** the pInitMutex mutex. Return an error in either case.  */
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+
+  /* Do the rest of the initialization under the recursive mutex so
+  ** that we will be able to handle recursive calls into
+  ** sqlite3_initialize().  The recursive calls normally come through
+  ** sqlite3_os_init() when it invokes sqlite3_vfs_register(), but other
+  ** recursive calls might also be possible.
+  **
+  ** IMPLEMENTATION-OF: R-00140-37445 SQLite automatically serializes calls
+  ** to the xInit method, so the xInit method need not be threadsafe.
+  **
+  ** The following mutex is what serializes access to the appdef pcache xInit
+  ** methods.  The sqlite3_pcache_methods.xInit() all is embedded in the
+  ** call to sqlite3PcacheInitialize().
+  */
+  sqlite3_mutex_enter(sqlite3GlobalConfig.pInitMutex);
+  if( sqlite3GlobalConfig.isInit==0 && sqlite3GlobalConfig.inProgress==0 ){
+    FuncDefHash *pHash = &GLOBAL(FuncDefHash, sqlite3GlobalFunctions);
+    sqlite3GlobalConfig.inProgress = 1;
+    memset(pHash, 0, sizeof(sqlite3GlobalFunctions));
+    sqlite3RegisterGlobalFunctions();
+    if( sqlite3GlobalConfig.isPCacheInit==0 ){
+      rc = sqlite3PcacheInitialize();
+    }
+    if( rc==SQLITE_OK ){
+      sqlite3GlobalConfig.isPCacheInit = 1;
+      rc = sqlite3OsInit();
+    }
+    if( rc==SQLITE_OK ){
+      sqlite3PCacheBufferSetup( sqlite3GlobalConfig.pPage, 
+          sqlite3GlobalConfig.szPage, sqlite3GlobalConfig.nPage);
+      sqlite3GlobalConfig.isInit = 1;
+    }
+    sqlite3GlobalConfig.inProgress = 0;
+  }
+  sqlite3_mutex_leave(sqlite3GlobalConfig.pInitMutex);
+
+  /* Go back under the static mutex and clean up the recursive
+  ** mutex to prevent a resource leak.
+  */
+  sqlite3_mutex_enter(pMaster);
+  sqlite3GlobalConfig.nRefInitMutex--;
+  if( sqlite3GlobalConfig.nRefInitMutex<=0 ){
+    assert( sqlite3GlobalConfig.nRefInitMutex==0 );
+    sqlite3_mutex_free(sqlite3GlobalConfig.pInitMutex);
+    sqlite3GlobalConfig.pInitMutex = 0;
+  }
+  sqlite3_mutex_leave(pMaster);
+
+  /* The following is just a sanity check to make sure SQLite has
+  ** been compiled correctly.  It is important to run this code, but
+  ** we don't want to run it too often and soak up CPU cycles for no
+  ** reason.  So we run it once during initialization.
+  */
+#ifndef NDEBUG
+#ifndef SQLITE_OMIT_FLOATING_POINT
+  /* This section of code's only "output" is via assert() statements. */
+  if ( rc==SQLITE_OK ){
+    u64 x = (((u64)1)<<63)-1;
+    double y;
+    assert(sizeof(x)==8);
+    assert(sizeof(x)==sizeof(y));
+    memcpy(&y, &x, 8);
+    assert( sqlite3IsNaN(y) );
+  }
+#endif
+#endif
+
+  return rc;
+}
+
+/*
+** Undo the effects of sqlite3_initialize().  Must not be called while
+** there are outstanding database connections or memory allocations or
+** while any part of SQLite is otherwise in use in any thread.  This
+** routine is not threadsafe.  But it is safe to invoke this routine
+** on when SQLite is already shut down.  If SQLite is already shut down
+** when this routine is invoked, then this routine is a harmless no-op.
+*/
+SQLITE_API int sqlite3_shutdown(void){
+  if( sqlite3GlobalConfig.isInit ){
+    sqlite3_os_end();
+    sqlite3_reset_auto_extension();
+    sqlite3GlobalConfig.isInit = 0;
+  }
+  if( sqlite3GlobalConfig.isPCacheInit ){
+    sqlite3PcacheShutdown();
+    sqlite3GlobalConfig.isPCacheInit = 0;
+  }
+  if( sqlite3GlobalConfig.isMallocInit ){
+    sqlite3MallocEnd();
+    sqlite3GlobalConfig.isMallocInit = 0;
+  }
+  if( sqlite3GlobalConfig.isMutexInit ){
+    sqlite3MutexEnd();
+    sqlite3GlobalConfig.isMutexInit = 0;
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** This API allows applications to modify the global configuration of
+** the SQLite library at run-time.
+**
+** This routine should only be called when there are no outstanding
+** database connections or memory allocations.  This routine is not
+** threadsafe.  Failure to heed these warnings can lead to unpredictable
+** behavior.
+*/
+SQLITE_API int sqlite3_config(int op, ...){
+  va_list ap;
+  int rc = SQLITE_OK;
+
+  /* sqlite3_config() shall return SQLITE_MISUSE if it is invoked while
+  ** the SQLite library is in use. */
+  if( sqlite3GlobalConfig.isInit ) return SQLITE_MISUSE_BKPT;
+
+  va_start(ap, op);
+  switch( op ){
+
+    /* Mutex configuration options are only available in a threadsafe
+    ** compile. 
+    */
+#if defined(SQLITE_THREADSAFE) && SQLITE_THREADSAFE>0
+    case SQLITE_CONFIG_SINGLETHREAD: {
+      /* Disable all mutexing */
+      sqlite3GlobalConfig.bCoreMutex = 0;
+      sqlite3GlobalConfig.bFullMutex = 0;
+      break;
+    }
+    case SQLITE_CONFIG_MULTITHREAD: {
+      /* Disable mutexing of database connections */
+      /* Enable mutexing of core data structures */
+      sqlite3GlobalConfig.bCoreMutex = 1;
+      sqlite3GlobalConfig.bFullMutex = 0;
+      break;
+    }
+    case SQLITE_CONFIG_SERIALIZED: {
+      /* Enable all mutexing */
+      sqlite3GlobalConfig.bCoreMutex = 1;
+      sqlite3GlobalConfig.bFullMutex = 1;
+      break;
+    }
+    case SQLITE_CONFIG_MUTEX: {
+      /* Specify an alternative mutex implementation */
+      sqlite3GlobalConfig.mutex = *va_arg(ap, sqlite3_mutex_methods*);
+      break;
+    }
+    case SQLITE_CONFIG_GETMUTEX: {
+      /* Retrieve the current mutex implementation */
+      *va_arg(ap, sqlite3_mutex_methods*) = sqlite3GlobalConfig.mutex;
+      break;
+    }
+#endif
+
+
+    case SQLITE_CONFIG_MALLOC: {
+      /* Specify an alternative malloc implementation */
+      sqlite3GlobalConfig.m = *va_arg(ap, sqlite3_mem_methods*);
+      break;
+    }
+    case SQLITE_CONFIG_GETMALLOC: {
+      /* Retrieve the current malloc() implementation */
+      if( sqlite3GlobalConfig.m.xMalloc==0 ) sqlite3MemSetDefault();
+      *va_arg(ap, sqlite3_mem_methods*) = sqlite3GlobalConfig.m;
+      break;
+    }
+    case SQLITE_CONFIG_MEMSTATUS: {
+      /* Enable or disable the malloc status collection */
+      sqlite3GlobalConfig.bMemstat = va_arg(ap, int);
+      break;
+    }
+    case SQLITE_CONFIG_SCRATCH: {
+      /* Designate a buffer for scratch memory space */
+      sqlite3GlobalConfig.pScratch = va_arg(ap, void*);
+      sqlite3GlobalConfig.szScratch = va_arg(ap, int);
+      sqlite3GlobalConfig.nScratch = va_arg(ap, int);
+      break;
+    }
+    case SQLITE_CONFIG_PAGECACHE: {
+      /* Designate a buffer for page cache memory space */
+      sqlite3GlobalConfig.pPage = va_arg(ap, void*);
+      sqlite3GlobalConfig.szPage = va_arg(ap, int);
+      sqlite3GlobalConfig.nPage = va_arg(ap, int);
+      break;
+    }
+
+    case SQLITE_CONFIG_PCACHE: {
+      /* Specify an alternative page cache implementation */
+      sqlite3GlobalConfig.pcache = *va_arg(ap, sqlite3_pcache_methods*);
+      break;
+    }
+
+    case SQLITE_CONFIG_GETPCACHE: {
+      if( sqlite3GlobalConfig.pcache.xInit==0 ){
+        sqlite3PCacheSetDefault();
+      }
+      *va_arg(ap, sqlite3_pcache_methods*) = sqlite3GlobalConfig.pcache;
+      break;
+    }
+
+#if defined(SQLITE_ENABLE_MEMSYS3) || defined(SQLITE_ENABLE_MEMSYS5)
+    case SQLITE_CONFIG_HEAP: {
+      /* Designate a buffer for heap memory space */
+      sqlite3GlobalConfig.pHeap = va_arg(ap, void*);
+      sqlite3GlobalConfig.nHeap = va_arg(ap, int);
+      sqlite3GlobalConfig.mnReq = va_arg(ap, int);
+
+      if( sqlite3GlobalConfig.mnReq<1 ){
+        sqlite3GlobalConfig.mnReq = 1;
+      }else if( sqlite3GlobalConfig.mnReq>(1<<12) ){
+        /* cap min request size at 2^12 */
+        sqlite3GlobalConfig.mnReq = (1<<12);
+      }
+
+      if( sqlite3GlobalConfig.pHeap==0 ){
+        /* If the heap pointer is NULL, then restore the malloc implementation
+        ** back to NULL pointers too.  This will cause the malloc to go
+        ** back to its default implementation when sqlite3_initialize() is
+        ** run.
+        */
+        memset(&sqlite3GlobalConfig.m, 0, sizeof(sqlite3GlobalConfig.m));
+      }else{
+        /* The heap pointer is not NULL, then install one of the
+        ** mem5.c/mem3.c methods. If neither ENABLE_MEMSYS3 nor
+        ** ENABLE_MEMSYS5 is defined, return an error.
+        */
+#ifdef SQLITE_ENABLE_MEMSYS3
+        sqlite3GlobalConfig.m = *sqlite3MemGetMemsys3();
+#endif
+#ifdef SQLITE_ENABLE_MEMSYS5
+        sqlite3GlobalConfig.m = *sqlite3MemGetMemsys5();
+#endif
+      }
+      break;
+    }
+#endif
+
+    case SQLITE_CONFIG_LOOKASIDE: {
+      sqlite3GlobalConfig.szLookaside = va_arg(ap, int);
+      sqlite3GlobalConfig.nLookaside = va_arg(ap, int);
+      break;
+    }
+    
+    /* Record a pointer to the logger funcction and its first argument.
+    ** The default is NULL.  Logging is disabled if the function pointer is
+    ** NULL.
+    */
+    case SQLITE_CONFIG_LOG: {
+      /* MSVC is picky about pulling func ptrs from va lists.
+      ** http://support.microsoft.com/kb/47961
+      ** sqlite3GlobalConfig.xLog = va_arg(ap, void(*)(void*,int,const char*));
+      */
+      typedef void(*LOGFUNC_t)(void*,int,const char*);
+      sqlite3GlobalConfig.xLog = va_arg(ap, LOGFUNC_t);
+      sqlite3GlobalConfig.pLogArg = va_arg(ap, void*);
+      break;
+    }
+
+    default: {
+      rc = SQLITE_ERROR;
+      break;
+    }
+  }
+  va_end(ap);
+  return rc;
+}
+
+/*
+** Set up the lookaside buffers for a database connection.
+** Return SQLITE_OK on success.  
+** If lookaside is already active, return SQLITE_BUSY.
+**
+** The sz parameter is the number of bytes in each lookaside slot.
+** The cnt parameter is the number of slots.  If pStart is NULL the
+** space for the lookaside memory is obtained from sqlite3_malloc().
+** If pStart is not NULL then it is sz*cnt bytes of memory to use for
+** the lookaside memory.
+*/
+static int setupLookaside(sqlite3 *db, void *pBuf, int sz, int cnt){
+  void *pStart;
+  if( db->lookaside.nOut ){
+    return SQLITE_BUSY;
+  }
+  /* Free any existing lookaside buffer for this handle before
+  ** allocating a new one so we don't have to have space for 
+  ** both at the same time.
+  */
+  if( db->lookaside.bMalloced ){
+    sqlite3_free(db->lookaside.pStart);
+  }
+  /* The size of a lookaside slot needs to be larger than a pointer
+  ** to be useful.
+  */
+  if( sz<=(int)sizeof(LookasideSlot*) ) sz = 0;
+  if( cnt<0 ) cnt = 0;
+  if( sz==0 || cnt==0 ){
+    sz = 0;
+    pStart = 0;
+  }else if( pBuf==0 ){
+    sz = ROUNDDOWN8(sz); /* IMP: R-33038-09382 */
+    sqlite3BeginBenignMalloc();
+    pStart = sqlite3Malloc( sz*cnt );  /* IMP: R-61949-35727 */
+    sqlite3EndBenignMalloc();
+  }else{
+    sz = ROUNDDOWN8(sz); /* IMP: R-33038-09382 */
+    pStart = pBuf;
+  }
+  db->lookaside.pStart = pStart;
+  db->lookaside.pFree = 0;
+  db->lookaside.sz = (u16)sz;
+  if( pStart ){
+    int i;
+    LookasideSlot *p;
+    assert( sz > (int)sizeof(LookasideSlot*) );
+    p = (LookasideSlot*)pStart;
+    for(i=cnt-1; i>=0; i--){
+      p->pNext = db->lookaside.pFree;
+      db->lookaside.pFree = p;
+      p = (LookasideSlot*)&((u8*)p)[sz];
+    }
+    db->lookaside.pEnd = p;
+    db->lookaside.bEnabled = 1;
+    db->lookaside.bMalloced = pBuf==0 ?1:0;
+  }else{
+    db->lookaside.pEnd = 0;
+    db->lookaside.bEnabled = 0;
+    db->lookaside.bMalloced = 0;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Return the mutex associated with a database connection.
+*/
+SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3 *db){
+  return db->mutex;
+}
+
+/*
+** Configuration settings for an individual database connection
+*/
+SQLITE_API int sqlite3_db_config(sqlite3 *db, int op, ...){
+  va_list ap;
+  int rc;
+  va_start(ap, op);
+  switch( op ){
+    case SQLITE_DBCONFIG_LOOKASIDE: {
+      void *pBuf = va_arg(ap, void*); /* IMP: R-26835-10964 */
+      int sz = va_arg(ap, int);       /* IMP: R-47871-25994 */
+      int cnt = va_arg(ap, int);      /* IMP: R-04460-53386 */
+      rc = setupLookaside(db, pBuf, sz, cnt);
+      break;
+    }
+    default: {
+      static const struct {
+        int op;      /* The opcode */
+        u32 mask;    /* Mask of the bit in sqlite3.flags to set/clear */
+      } aFlagOp[] = {
+        { SQLITE_DBCONFIG_ENABLE_FKEY,    SQLITE_ForeignKeys    },
+        { SQLITE_DBCONFIG_ENABLE_TRIGGER, SQLITE_EnableTrigger  },
+      };
+      unsigned int i;
+      rc = SQLITE_ERROR; /* IMP: R-42790-23372 */
+      for(i=0; i<ArraySize(aFlagOp); i++){
+        if( aFlagOp[i].op==op ){
+          int onoff = va_arg(ap, int);
+          int *pRes = va_arg(ap, int*);
+          int oldFlags = db->flags;
+          if( onoff>0 ){
+            db->flags |= aFlagOp[i].mask;
+          }else if( onoff==0 ){
+            db->flags &= ~aFlagOp[i].mask;
+          }
+          if( oldFlags!=db->flags ){
+            sqlite3ExpirePreparedStatements(db);
+          }
+          if( pRes ){
+            *pRes = (db->flags & aFlagOp[i].mask)!=0;
+          }
+          rc = SQLITE_OK;
+          break;
+        }
+      }
+      break;
+    }
+  }
+  va_end(ap);
+  return rc;
+}
+
+
+/*
+** Return true if the buffer z[0..n-1] contains all spaces.
+*/
+static int allSpaces(const char *z, int n){
+  while( n>0 && z[n-1]==' ' ){ n--; }
+  return n==0;
+}
+
+/*
+** This is the default collating function named "BINARY" which is always
+** available.
+**
+** If the padFlag argument is not NULL then space padding at the end
+** of strings is ignored.  This implements the RTRIM collation.
+*/
+static int binCollFunc(
+  void *padFlag,
+  int nKey1, const void *pKey1,
+  int nKey2, const void *pKey2
+){
+  int rc, n;
+  n = nKey1<nKey2 ? nKey1 : nKey2;
+  rc = memcmp(pKey1, pKey2, n);
+  if( rc==0 ){
+    if( padFlag
+     && allSpaces(((char*)pKey1)+n, nKey1-n)
+     && allSpaces(((char*)pKey2)+n, nKey2-n)
+    ){
+      /* Leave rc unchanged at 0 */
+    }else{
+      rc = nKey1 - nKey2;
+    }
+  }
+  return rc;
+}
+
+/*
+** Another built-in collating sequence: NOCASE. 
+**
+** This collating sequence is intended to be used for "case independant
+** comparison". SQLite's knowledge of upper and lower case equivalents
+** extends only to the 26 characters used in the English language.
+**
+** At the moment there is only a UTF-8 implementation.
+*/
+static int nocaseCollatingFunc(
+  void *NotUsed,
+  int nKey1, const void *pKey1,
+  int nKey2, const void *pKey2
+){
+  int r = sqlite3StrNICmp(
+      (const char *)pKey1, (const char *)pKey2, (nKey1<nKey2)?nKey1:nKey2);
+  UNUSED_PARAMETER(NotUsed);
+  if( 0==r ){
+    r = nKey1-nKey2;
+  }
+  return r;
+}
+
+/*
+** Return the ROWID of the most recent insert
+*/
+SQLITE_API sqlite_int64 sqlite3_last_insert_rowid(sqlite3 *db){
+  return db->lastRowid;
+}
+
+/*
+** Return the number of changes in the most recent call to sqlite3_exec().
+*/
+SQLITE_API int sqlite3_changes(sqlite3 *db){
+  return db->nChange;
+}
+
+/*
+** Return the number of changes since the database handle was opened.
+*/
+SQLITE_API int sqlite3_total_changes(sqlite3 *db){
+  return db->nTotalChange;
+}
+
+/*
+** Close all open savepoints. This function only manipulates fields of the
+** database handle object, it does not close any savepoints that may be open
+** at the b-tree/pager level.
+*/
+SQLITE_PRIVATE void sqlite3CloseSavepoints(sqlite3 *db){
+  while( db->pSavepoint ){
+    Savepoint *pTmp = db->pSavepoint;
+    db->pSavepoint = pTmp->pNext;
+    sqlite3DbFree(db, pTmp);
+  }
+  db->nSavepoint = 0;
+  db->nStatement = 0;
+  db->isTransactionSavepoint = 0;
+}
+
+/*
+** Invoke the destructor function associated with FuncDef p, if any. Except,
+** if this is not the last copy of the function, do not invoke it. Multiple
+** copies of a single function are created when create_function() is called
+** with SQLITE_ANY as the encoding.
+*/
+static void functionDestroy(sqlite3 *db, FuncDef *p){
+  FuncDestructor *pDestructor = p->pDestructor;
+  if( pDestructor ){
+    pDestructor->nRef--;
+    if( pDestructor->nRef==0 ){
+      pDestructor->xDestroy(pDestructor->pUserData);
+      sqlite3DbFree(db, pDestructor);
+    }
+  }
+}
+
+/*
+** Close an existing SQLite database
+*/
+SQLITE_API int sqlite3_close(sqlite3 *db){
+  HashElem *i;                    /* Hash table iterator */
+  int j;
+
+  if( !db ){
+    return SQLITE_OK;
+  }
+  if( !sqlite3SafetyCheckSickOrOk(db) ){
+    return SQLITE_MISUSE_BKPT;
+  }
+  sqlite3_mutex_enter(db->mutex);
+
+  /* Force xDestroy calls on all virtual tables */
+  sqlite3ResetInternalSchema(db, -1);
+
+  /* If a transaction is open, the ResetInternalSchema() call above
+  ** will not have called the xDisconnect() method on any virtual
+  ** tables in the db->aVTrans[] array. The following sqlite3VtabRollback()
+  ** call will do so. We need to do this before the check for active
+  ** SQL statements below, as the v-table implementation may be storing
+  ** some prepared statements internally.
+  */
+  sqlite3VtabRollback(db);
+
+  /* If there are any outstanding VMs, return SQLITE_BUSY. */
+  if( db->pVdbe ){
+    sqlite3Error(db, SQLITE_BUSY, 
+        "unable to close due to unfinalised statements");
+    sqlite3_mutex_leave(db->mutex);
+    return SQLITE_BUSY;
+  }
+  assert( sqlite3SafetyCheckSickOrOk(db) );
+
+  for(j=0; j<db->nDb; j++){
+    Btree *pBt = db->aDb[j].pBt;
+    if( pBt && sqlite3BtreeIsInBackup(pBt) ){
+      sqlite3Error(db, SQLITE_BUSY, 
+          "unable to close due to unfinished backup operation");
+      sqlite3_mutex_leave(db->mutex);
+      return SQLITE_BUSY;
+    }
+  }
+
+  /* Free any outstanding Savepoint structures. */
+  sqlite3CloseSavepoints(db);
+
+  for(j=0; j<db->nDb; j++){
+    struct Db *pDb = &db->aDb[j];
+    if( pDb->pBt ){
+      sqlite3BtreeClose(pDb->pBt);
+      pDb->pBt = 0;
+      if( j!=1 ){
+        pDb->pSchema = 0;
+      }
+    }
+  }
+  sqlite3ResetInternalSchema(db, -1);
+
+  /* Tell the code in notify.c that the connection no longer holds any
+  ** locks and does not require any further unlock-notify callbacks.
+  */
+  sqlite3ConnectionClosed(db);
+
+  assert( db->nDb<=2 );
+  assert( db->aDb==db->aDbStatic );
+  for(j=0; j<ArraySize(db->aFunc.a); j++){
+    FuncDef *pNext, *pHash, *p;
+    for(p=db->aFunc.a[j]; p; p=pHash){
+      pHash = p->pHash;
+      while( p ){
+        functionDestroy(db, p);
+        pNext = p->pNext;
+        sqlite3DbFree(db, p);
+        p = pNext;
+      }
+    }
+  }
+  for(i=sqliteHashFirst(&db->aCollSeq); i; i=sqliteHashNext(i)){
+    CollSeq *pColl = (CollSeq *)sqliteHashData(i);
+    /* Invoke any destructors registered for collation sequence user data. */
+    for(j=0; j<3; j++){
+      if( pColl[j].xDel ){
+        pColl[j].xDel(pColl[j].pUser);
+      }
+    }
+    sqlite3DbFree(db, pColl);
+  }
+  sqlite3HashClear(&db->aCollSeq);
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  for(i=sqliteHashFirst(&db->aModule); i; i=sqliteHashNext(i)){
+    Module *pMod = (Module *)sqliteHashData(i);
+    if( pMod->xDestroy ){
+      pMod->xDestroy(pMod->pAux);
+    }
+    sqlite3DbFree(db, pMod);
+  }
+  sqlite3HashClear(&db->aModule);
+#endif
+
+  sqlite3Error(db, SQLITE_OK, 0); /* Deallocates any cached error strings. */
+  if( db->pErr ){
+    sqlite3ValueFree(db->pErr);
+  }
+  sqlite3CloseExtensions(db);
+
+  db->magic = SQLITE_MAGIC_ERROR;
+
+  /* The temp-database schema is allocated differently from the other schema
+  ** objects (using sqliteMalloc() directly, instead of sqlite3BtreeSchema()).
+  ** So it needs to be freed here. Todo: Why not roll the temp schema into
+  ** the same sqliteMalloc() as the one that allocates the database 
+  ** structure?
+  */
+  sqlite3DbFree(db, db->aDb[1].pSchema);
+  sqlite3_mutex_leave(db->mutex);
+  db->magic = SQLITE_MAGIC_CLOSED;
+  sqlite3_mutex_free(db->mutex);
+  assert( db->lookaside.nOut==0 );  /* Fails on a lookaside memory leak */
+  if( db->lookaside.bMalloced ){
+    sqlite3_free(db->lookaside.pStart);
+  }
+  sqlite3_free(db);
+  return SQLITE_OK;
+}
+
+/*
+** Rollback all database files.
+*/
+SQLITE_PRIVATE void sqlite3RollbackAll(sqlite3 *db){
+  int i;
+  int inTrans = 0;
+  assert( sqlite3_mutex_held(db->mutex) );
+  sqlite3BeginBenignMalloc();
+  for(i=0; i<db->nDb; i++){
+    if( db->aDb[i].pBt ){
+      if( sqlite3BtreeIsInTrans(db->aDb[i].pBt) ){
+        inTrans = 1;
+      }
+      sqlite3BtreeRollback(db->aDb[i].pBt);
+      db->aDb[i].inTrans = 0;
+    }
+  }
+  sqlite3VtabRollback(db);
+  sqlite3EndBenignMalloc();
+
+  if( db->flags&SQLITE_InternChanges ){
+    sqlite3ExpirePreparedStatements(db);
+    sqlite3ResetInternalSchema(db, -1);
+  }
+
+  /* Any deferred constraint violations have now been resolved. */
+  db->nDeferredCons = 0;
+
+  /* If one has been configured, invoke the rollback-hook callback */
+  if( db->xRollbackCallback && (inTrans || !db->autoCommit) ){
+    db->xRollbackCallback(db->pRollbackArg);
+  }
+}
+
+/*
+** Return a static string that describes the kind of error specified in the
+** argument.
+*/
+SQLITE_PRIVATE const char *sqlite3ErrStr(int rc){
+  static const char* const aMsg[] = {
+    /* SQLITE_OK          */ "not an error",
+    /* SQLITE_ERROR       */ "SQL logic error or missing database",
+    /* SQLITE_INTERNAL    */ 0,
+    /* SQLITE_PERM        */ "access permission denied",
+    /* SQLITE_ABORT       */ "callback requested query abort",
+    /* SQLITE_BUSY        */ "database is locked",
+    /* SQLITE_LOCKED      */ "database table is locked",
+    /* SQLITE_NOMEM       */ "out of memory",
+    /* SQLITE_READONLY    */ "attempt to write a readonly database",
+    /* SQLITE_INTERRUPT   */ "interrupted",
+    /* SQLITE_IOERR       */ "disk I/O error",
+    /* SQLITE_CORRUPT     */ "database disk image is malformed",
+    /* SQLITE_NOTFOUND    */ "unknown operation",
+    /* SQLITE_FULL        */ "database or disk is full",
+    /* SQLITE_CANTOPEN    */ "unable to open database file",
+    /* SQLITE_PROTOCOL    */ "locking protocol",
+    /* SQLITE_EMPTY       */ "table contains no data",
+    /* SQLITE_SCHEMA      */ "database schema has changed",
+    /* SQLITE_TOOBIG      */ "string or blob too big",
+    /* SQLITE_CONSTRAINT  */ "constraint failed",
+    /* SQLITE_MISMATCH    */ "datatype mismatch",
+    /* SQLITE_MISUSE      */ "library routine called out of sequence",
+    /* SQLITE_NOLFS       */ "large file support is disabled",
+    /* SQLITE_AUTH        */ "authorization denied",
+    /* SQLITE_FORMAT      */ "auxiliary database format error",
+    /* SQLITE_RANGE       */ "bind or column index out of range",
+    /* SQLITE_NOTADB      */ "file is encrypted or is not a database",
+  };
+  rc &= 0xff;
+  if( ALWAYS(rc>=0) && rc<(int)(sizeof(aMsg)/sizeof(aMsg[0])) && aMsg[rc]!=0 ){
+    return aMsg[rc];
+  }else{
+    return "unknown error";
+  }
+}
+
+/*
+** This routine implements a busy callback that sleeps and tries
+** again until a timeout value is reached.  The timeout value is
+** an integer number of milliseconds passed in as the first
+** argument.
+*/
+static int sqliteDefaultBusyCallback(
+ void *ptr,               /* Database connection */
+ int count                /* Number of times table has been busy */
+){
+#if SQLITE_OS_WIN || (defined(HAVE_USLEEP) && HAVE_USLEEP)
+  static const u8 delays[] =
+     { 1, 2, 5, 10, 15, 20, 25, 25,  25,  50,  50, 100 };
+  static const u8 totals[] =
+     { 0, 1, 3,  8, 18, 33, 53, 78, 103, 128, 178, 228 };
+# define NDELAY ArraySize(delays)
+  sqlite3 *db = (sqlite3 *)ptr;
+  int timeout = db->busyTimeout;
+  int delay, prior;
+
+  assert( count>=0 );
+  if( count < NDELAY ){
+    delay = delays[count];
+    prior = totals[count];
+  }else{
+    delay = delays[NDELAY-1];
+    prior = totals[NDELAY-1] + delay*(count-(NDELAY-1));
+  }
+  if( prior + delay > timeout ){
+    delay = timeout - prior;
+    if( delay<=0 ) return 0;
+  }
+  sqlite3OsSleep(db->pVfs, delay*1000);
+  return 1;
+#else
+  sqlite3 *db = (sqlite3 *)ptr;
+  int timeout = ((sqlite3 *)ptr)->busyTimeout;
+  if( (count+1)*1000 > timeout ){
+    return 0;
+  }
+  sqlite3OsSleep(db->pVfs, 1000000);
+  return 1;
+#endif
+}
+
+/*
+** Invoke the given busy handler.
+**
+** This routine is called when an operation failed with a lock.
+** If this routine returns non-zero, the lock is retried.  If it
+** returns 0, the operation aborts with an SQLITE_BUSY error.
+*/
+SQLITE_PRIVATE int sqlite3InvokeBusyHandler(BusyHandler *p){
+  int rc;
+  if( NEVER(p==0) || p->xFunc==0 || p->nBusy<0 ) return 0;
+  rc = p->xFunc(p->pArg, p->nBusy);
+  if( rc==0 ){
+    p->nBusy = -1;
+  }else{
+    p->nBusy++;
+  }
+  return rc; 
+}
+
+/*
+** This routine sets the busy callback for an Sqlite database to the
+** given callback function with the given argument.
+*/
+SQLITE_API int sqlite3_busy_handler(
+  sqlite3 *db,
+  int (*xBusy)(void*,int),
+  void *pArg
+){
+  sqlite3_mutex_enter(db->mutex);
+  db->busyHandler.xFunc = xBusy;
+  db->busyHandler.pArg = pArg;
+  db->busyHandler.nBusy = 0;
+  sqlite3_mutex_leave(db->mutex);
+  return SQLITE_OK;
+}
+
+#ifndef SQLITE_OMIT_PROGRESS_CALLBACK
+/*
+** This routine sets the progress callback for an Sqlite database to the
+** given callback function with the given argument. The progress callback will
+** be invoked every nOps opcodes.
+*/
+SQLITE_API void sqlite3_progress_handler(
+  sqlite3 *db, 
+  int nOps,
+  int (*xProgress)(void*), 
+  void *pArg
+){
+  sqlite3_mutex_enter(db->mutex);
+  if( nOps>0 ){
+    db->xProgress = xProgress;
+    db->nProgressOps = nOps;
+    db->pProgressArg = pArg;
+  }else{
+    db->xProgress = 0;
+    db->nProgressOps = 0;
+    db->pProgressArg = 0;
+  }
+  sqlite3_mutex_leave(db->mutex);
+}
+#endif
+
+
+/*
+** This routine installs a default busy handler that waits for the
+** specified number of milliseconds before returning 0.
+*/
+SQLITE_API int sqlite3_busy_timeout(sqlite3 *db, int ms){
+  if( ms>0 ){
+    db->busyTimeout = ms;
+    sqlite3_busy_handler(db, sqliteDefaultBusyCallback, (void*)db);
+  }else{
+    sqlite3_busy_handler(db, 0, 0);
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Cause any pending operation to stop at its earliest opportunity.
+*/
+SQLITE_API void sqlite3_interrupt(sqlite3 *db){
+  db->u1.isInterrupted = 1;
+}
+
+
+/*
+** This function is exactly the same as sqlite3_create_function(), except
+** that it is designed to be called by internal code. The difference is
+** that if a malloc() fails in sqlite3_create_function(), an error code
+** is returned and the mallocFailed flag cleared. 
+*/
+SQLITE_PRIVATE int sqlite3CreateFunc(
+  sqlite3 *db,
+  const char *zFunctionName,
+  int nArg,
+  int enc,
+  void *pUserData,
+  void (*xFunc)(sqlite3_context*,int,sqlite3_value **),
+  void (*xStep)(sqlite3_context*,int,sqlite3_value **),
+  void (*xFinal)(sqlite3_context*),
+  FuncDestructor *pDestructor
+){
+  FuncDef *p;
+  int nName;
+
+  assert( sqlite3_mutex_held(db->mutex) );
+  if( zFunctionName==0 ||
+      (xFunc && (xFinal || xStep)) || 
+      (!xFunc && (xFinal && !xStep)) ||
+      (!xFunc && (!xFinal && xStep)) ||
+      (nArg<-1 || nArg>SQLITE_MAX_FUNCTION_ARG) ||
+      (255<(nName = sqlite3Strlen30( zFunctionName))) ){
+    return SQLITE_MISUSE_BKPT;
+  }
+  
+#ifndef SQLITE_OMIT_UTF16
+  /* If SQLITE_UTF16 is specified as the encoding type, transform this
+  ** to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the
+  ** SQLITE_UTF16NATIVE macro. SQLITE_UTF16 is not used internally.
+  **
+  ** If SQLITE_ANY is specified, add three versions of the function
+  ** to the hash table.
+  */
+  if( enc==SQLITE_UTF16 ){
+    enc = SQLITE_UTF16NATIVE;
+  }else if( enc==SQLITE_ANY ){
+    int rc;
+    rc = sqlite3CreateFunc(db, zFunctionName, nArg, SQLITE_UTF8,
+         pUserData, xFunc, xStep, xFinal, pDestructor);
+    if( rc==SQLITE_OK ){
+      rc = sqlite3CreateFunc(db, zFunctionName, nArg, SQLITE_UTF16LE,
+          pUserData, xFunc, xStep, xFinal, pDestructor);
+    }
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+    enc = SQLITE_UTF16BE;
+  }
+#else
+  enc = SQLITE_UTF8;
+#endif
+  
+  /* Check if an existing function is being overridden or deleted. If so,
+  ** and there are active VMs, then return SQLITE_BUSY. If a function
+  ** is being overridden/deleted but there are no active VMs, allow the
+  ** operation to continue but invalidate all precompiled statements.
+  */
+  p = sqlite3FindFunction(db, zFunctionName, nName, nArg, (u8)enc, 0);
+  if( p && p->iPrefEnc==enc && p->nArg==nArg ){
+    if( db->activeVdbeCnt ){
+      sqlite3Error(db, SQLITE_BUSY, 
+        "unable to delete/modify user-function due to active statements");
+      assert( !db->mallocFailed );
+      return SQLITE_BUSY;
+    }else{
+      sqlite3ExpirePreparedStatements(db);
+    }
+  }
+
+  p = sqlite3FindFunction(db, zFunctionName, nName, nArg, (u8)enc, 1);
+  assert(p || db->mallocFailed);
+  if( !p ){
+    return SQLITE_NOMEM;
+  }
+
+  /* If an older version of the function with a configured destructor is
+  ** being replaced invoke the destructor function here. */
+  functionDestroy(db, p);
+
+  if( pDestructor ){
+    pDestructor->nRef++;
+  }
+  p->pDestructor = pDestructor;
+  p->flags = 0;
+  p->xFunc = xFunc;
+  p->xStep = xStep;
+  p->xFinalize = xFinal;
+  p->pUserData = pUserData;
+  p->nArg = (u16)nArg;
+  return SQLITE_OK;
+}
+
+/*
+** Create new user functions.
+*/
+SQLITE_API int sqlite3_create_function(
+  sqlite3 *db,
+  const char *zFunc,
+  int nArg,
+  int enc,
+  void *p,
+  void (*xFunc)(sqlite3_context*,int,sqlite3_value **),
+  void (*xStep)(sqlite3_context*,int,sqlite3_value **),
+  void (*xFinal)(sqlite3_context*)
+){
+  return sqlite3_create_function_v2(db, zFunc, nArg, enc, p, xFunc, xStep,
+                                    xFinal, 0);
+}
+
+SQLITE_API int sqlite3_create_function_v2(
+  sqlite3 *db,
+  const char *zFunc,
+  int nArg,
+  int enc,
+  void *p,
+  void (*xFunc)(sqlite3_context*,int,sqlite3_value **),
+  void (*xStep)(sqlite3_context*,int,sqlite3_value **),
+  void (*xFinal)(sqlite3_context*),
+  void (*xDestroy)(void *)
+){
+  int rc = SQLITE_ERROR;
+  FuncDestructor *pArg = 0;
+  sqlite3_mutex_enter(db->mutex);
+  if( xDestroy ){
+    pArg = (FuncDestructor *)sqlite3DbMallocZero(db, sizeof(FuncDestructor));
+    if( !pArg ){
+      xDestroy(p);
+      goto out;
+    }
+    pArg->xDestroy = xDestroy;
+    pArg->pUserData = p;
+  }
+  rc = sqlite3CreateFunc(db, zFunc, nArg, enc, p, xFunc, xStep, xFinal, pArg);
+  if( pArg && pArg->nRef==0 ){
+    assert( rc!=SQLITE_OK );
+    xDestroy(p);
+    sqlite3DbFree(db, pArg);
+  }
+
+ out:
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+#ifndef SQLITE_OMIT_UTF16
+SQLITE_API int sqlite3_create_function16(
+  sqlite3 *db,
+  const void *zFunctionName,
+  int nArg,
+  int eTextRep,
+  void *p,
+  void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
+  void (*xStep)(sqlite3_context*,int,sqlite3_value**),
+  void (*xFinal)(sqlite3_context*)
+){
+  int rc;
+  char *zFunc8;
+  sqlite3_mutex_enter(db->mutex);
+  assert( !db->mallocFailed );
+  zFunc8 = sqlite3Utf16to8(db, zFunctionName, -1, SQLITE_UTF16NATIVE);
+  rc = sqlite3CreateFunc(db, zFunc8, nArg, eTextRep, p, xFunc, xStep, xFinal,0);
+  sqlite3DbFree(db, zFunc8);
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+#endif
+
+
+/*
+** Declare that a function has been overloaded by a virtual table.
+**
+** If the function already exists as a regular global function, then
+** this routine is a no-op.  If the function does not exist, then create
+** a new one that always throws a run-time error.  
+**
+** When virtual tables intend to provide an overloaded function, they
+** should call this routine to make sure the global function exists.
+** A global function must exist in order for name resolution to work
+** properly.
+*/
+SQLITE_API int sqlite3_overload_function(
+  sqlite3 *db,
+  const char *zName,
+  int nArg
+){
+  int nName = sqlite3Strlen30(zName);
+  int rc;
+  sqlite3_mutex_enter(db->mutex);
+  if( sqlite3FindFunction(db, zName, nName, nArg, SQLITE_UTF8, 0)==0 ){
+    sqlite3CreateFunc(db, zName, nArg, SQLITE_UTF8,
+                      0, sqlite3InvalidFunction, 0, 0, 0);
+  }
+  rc = sqlite3ApiExit(db, SQLITE_OK);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+#ifndef SQLITE_OMIT_TRACE
+/*
+** Register a trace function.  The pArg from the previously registered trace
+** is returned.  
+**
+** A NULL trace function means that no tracing is executes.  A non-NULL
+** trace is a pointer to a function that is invoked at the start of each
+** SQL statement.
+*/
+SQLITE_API void *sqlite3_trace(sqlite3 *db, void (*xTrace)(void*,const char*), void *pArg){
+  void *pOld;
+  sqlite3_mutex_enter(db->mutex);
+  pOld = db->pTraceArg;
+  db->xTrace = xTrace;
+  db->pTraceArg = pArg;
+  sqlite3_mutex_leave(db->mutex);
+  return pOld;
+}
+/*
+** Register a profile function.  The pArg from the previously registered 
+** profile function is returned.  
+**
+** A NULL profile function means that no profiling is executes.  A non-NULL
+** profile is a pointer to a function that is invoked at the conclusion of
+** each SQL statement that is run.
+*/
+SQLITE_API void *sqlite3_profile(
+  sqlite3 *db,
+  void (*xProfile)(void*,const char*,sqlite_uint64),
+  void *pArg
+){
+  void *pOld;
+  sqlite3_mutex_enter(db->mutex);
+  pOld = db->pProfileArg;
+  db->xProfile = xProfile;
+  db->pProfileArg = pArg;
+  sqlite3_mutex_leave(db->mutex);
+  return pOld;
+}
+#endif /* SQLITE_OMIT_TRACE */
+
+/*** EXPERIMENTAL ***
+**
+** Register a function to be invoked when a transaction comments.
+** If the invoked function returns non-zero, then the commit becomes a
+** rollback.
+*/
+SQLITE_API void *sqlite3_commit_hook(
+  sqlite3 *db,              /* Attach the hook to this database */
+  int (*xCallback)(void*),  /* Function to invoke on each commit */
+  void *pArg                /* Argument to the function */
+){
+  void *pOld;
+  sqlite3_mutex_enter(db->mutex);
+  pOld = db->pCommitArg;
+  db->xCommitCallback = xCallback;
+  db->pCommitArg = pArg;
+  sqlite3_mutex_leave(db->mutex);
+  return pOld;
+}
+
+/*
+** Register a callback to be invoked each time a row is updated,
+** inserted or deleted using this database connection.
+*/
+SQLITE_API void *sqlite3_update_hook(
+  sqlite3 *db,              /* Attach the hook to this database */
+  void (*xCallback)(void*,int,char const *,char const *,sqlite_int64),
+  void *pArg                /* Argument to the function */
+){
+  void *pRet;
+  sqlite3_mutex_enter(db->mutex);
+  pRet = db->pUpdateArg;
+  db->xUpdateCallback = xCallback;
+  db->pUpdateArg = pArg;
+  sqlite3_mutex_leave(db->mutex);
+  return pRet;
+}
+
+/*
+** Register a callback to be invoked each time a transaction is rolled
+** back by this database connection.
+*/
+SQLITE_API void *sqlite3_rollback_hook(
+  sqlite3 *db,              /* Attach the hook to this database */
+  void (*xCallback)(void*), /* Callback function */
+  void *pArg                /* Argument to the function */
+){
+  void *pRet;
+  sqlite3_mutex_enter(db->mutex);
+  pRet = db->pRollbackArg;
+  db->xRollbackCallback = xCallback;
+  db->pRollbackArg = pArg;
+  sqlite3_mutex_leave(db->mutex);
+  return pRet;
+}
+
+#ifndef SQLITE_OMIT_WAL
+/*
+** The sqlite3_wal_hook() callback registered by sqlite3_wal_autocheckpoint().
+** Invoke sqlite3_wal_checkpoint if the number of frames in the log file
+** is greater than sqlite3.pWalArg cast to an integer (the value configured by
+** wal_autocheckpoint()).
+*/ 
+SQLITE_PRIVATE int sqlite3WalDefaultHook(
+  void *pClientData,     /* Argument */
+  sqlite3 *db,           /* Connection */
+  const char *zDb,       /* Database */
+  int nFrame             /* Size of WAL */
+){
+  if( nFrame>=SQLITE_PTR_TO_INT(pClientData) ){
+    sqlite3BeginBenignMalloc();
+    sqlite3_wal_checkpoint(db, zDb);
+    sqlite3EndBenignMalloc();
+  }
+  return SQLITE_OK;
+}
+#endif /* SQLITE_OMIT_WAL */
+
+/*
+** Configure an sqlite3_wal_hook() callback to automatically checkpoint
+** a database after committing a transaction if there are nFrame or
+** more frames in the log file. Passing zero or a negative value as the
+** nFrame parameter disables automatic checkpoints entirely.
+**
+** The callback registered by this function replaces any existing callback
+** registered using sqlite3_wal_hook(). Likewise, registering a callback
+** using sqlite3_wal_hook() disables the automatic checkpoint mechanism
+** configured by this function.
+*/
+SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int nFrame){
+#ifdef SQLITE_OMIT_WAL
+  UNUSED_PARAMETER(db);
+  UNUSED_PARAMETER(nFrame);
+#else
+  if( nFrame>0 ){
+    sqlite3_wal_hook(db, sqlite3WalDefaultHook, SQLITE_INT_TO_PTR(nFrame));
+  }else{
+    sqlite3_wal_hook(db, 0, 0);
+  }
+#endif
+  return SQLITE_OK;
+}
+
+/*
+** Register a callback to be invoked each time a transaction is written
+** into the write-ahead-log by this database connection.
+*/
+SQLITE_API void *sqlite3_wal_hook(
+  sqlite3 *db,                    /* Attach the hook to this db handle */
+  int(*xCallback)(void *, sqlite3*, const char*, int),
+  void *pArg                      /* First argument passed to xCallback() */
+){
+#ifndef SQLITE_OMIT_WAL
+  void *pRet;
+  sqlite3_mutex_enter(db->mutex);
+  pRet = db->pWalArg;
+  db->xWalCallback = xCallback;
+  db->pWalArg = pArg;
+  sqlite3_mutex_leave(db->mutex);
+  return pRet;
+#else
+  return 0;
+#endif
+}
+
+/*
+** Checkpoint database zDb.
+*/
+SQLITE_API int sqlite3_wal_checkpoint_v2(
+  sqlite3 *db,                    /* Database handle */
+  const char *zDb,                /* Name of attached database (or NULL) */
+  int eMode,                      /* SQLITE_CHECKPOINT_* value */
+  int *pnLog,                     /* OUT: Size of WAL log in frames */
+  int *pnCkpt                     /* OUT: Total number of frames checkpointed */
+){
+#ifdef SQLITE_OMIT_WAL
+  return SQLITE_OK;
+#else
+  int rc;                         /* Return code */
+  int iDb = SQLITE_MAX_ATTACHED;  /* sqlite3.aDb[] index of db to checkpoint */
+
+  /* Initialize the output variables to -1 in case an error occurs. */
+  if( pnLog ) *pnLog = -1;
+  if( pnCkpt ) *pnCkpt = -1;
+
+  assert( SQLITE_CHECKPOINT_FULL>SQLITE_CHECKPOINT_PASSIVE );
+  assert( SQLITE_CHECKPOINT_FULL<SQLITE_CHECKPOINT_RESTART );
+  assert( SQLITE_CHECKPOINT_PASSIVE+2==SQLITE_CHECKPOINT_RESTART );
+  if( eMode<SQLITE_CHECKPOINT_PASSIVE || eMode>SQLITE_CHECKPOINT_RESTART ){
+    return SQLITE_MISUSE;
+  }
+
+  sqlite3_mutex_enter(db->mutex);
+  if( zDb && zDb[0] ){
+    iDb = sqlite3FindDbName(db, zDb);
+  }
+  if( iDb<0 ){
+    rc = SQLITE_ERROR;
+    sqlite3Error(db, SQLITE_ERROR, "unknown database: %s", zDb);
+  }else{
+    rc = sqlite3Checkpoint(db, iDb, eMode, pnLog, pnCkpt);
+    sqlite3Error(db, rc, 0);
+  }
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+#endif
+}
+
+
+/*
+** Checkpoint database zDb. If zDb is NULL, or if the buffer zDb points
+** to contains a zero-length string, all attached databases are 
+** checkpointed.
+*/
+SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb){
+  return sqlite3_wal_checkpoint_v2(db, zDb, SQLITE_CHECKPOINT_PASSIVE, 0, 0);
+}
+
+#ifndef SQLITE_OMIT_WAL
+/*
+** Run a checkpoint on database iDb. This is a no-op if database iDb is
+** not currently open in WAL mode.
+**
+** If a transaction is open on the database being checkpointed, this 
+** function returns SQLITE_LOCKED and a checkpoint is not attempted. If 
+** an error occurs while running the checkpoint, an SQLite error code is 
+** returned (i.e. SQLITE_IOERR). Otherwise, SQLITE_OK.
+**
+** The mutex on database handle db should be held by the caller. The mutex
+** associated with the specific b-tree being checkpointed is taken by
+** this function while the checkpoint is running.
+**
+** If iDb is passed SQLITE_MAX_ATTACHED, then all attached databases are
+** checkpointed. If an error is encountered it is returned immediately -
+** no attempt is made to checkpoint any remaining databases.
+**
+** Parameter eMode is one of SQLITE_CHECKPOINT_PASSIVE, FULL or RESTART.
+*/
+SQLITE_PRIVATE int sqlite3Checkpoint(sqlite3 *db, int iDb, int eMode, int *pnLog, int *pnCkpt){
+  int rc = SQLITE_OK;             /* Return code */
+  int i;                          /* Used to iterate through attached dbs */
+  int bBusy = 0;                  /* True if SQLITE_BUSY has been encountered */
+
+  assert( sqlite3_mutex_held(db->mutex) );
+  assert( !pnLog || *pnLog==-1 );
+  assert( !pnCkpt || *pnCkpt==-1 );
+
+  for(i=0; i<db->nDb && rc==SQLITE_OK; i++){
+    if( i==iDb || iDb==SQLITE_MAX_ATTACHED ){
+      rc = sqlite3BtreeCheckpoint(db->aDb[i].pBt, eMode, pnLog, pnCkpt);
+      pnLog = 0;
+      pnCkpt = 0;
+      if( rc==SQLITE_BUSY ){
+        bBusy = 1;
+        rc = SQLITE_OK;
+      }
+    }
+  }
+
+  return (rc==SQLITE_OK && bBusy) ? SQLITE_BUSY : rc;
+}
+#endif /* SQLITE_OMIT_WAL */
+
+/*
+** This function returns true if main-memory should be used instead of
+** a temporary file for transient pager files and statement journals.
+** The value returned depends on the value of db->temp_store (runtime
+** parameter) and the compile time value of SQLITE_TEMP_STORE. The
+** following table describes the relationship between these two values
+** and this functions return value.
+**
+**   SQLITE_TEMP_STORE     db->temp_store     Location of temporary database
+**   -----------------     --------------     ------------------------------
+**   0                     any                file      (return 0)
+**   1                     1                  file      (return 0)
+**   1                     2                  memory    (return 1)
+**   1                     0                  file      (return 0)
+**   2                     1                  file      (return 0)
+**   2                     2                  memory    (return 1)
+**   2                     0                  memory    (return 1)
+**   3                     any                memory    (return 1)
+*/
+SQLITE_PRIVATE int sqlite3TempInMemory(const sqlite3 *db){
+#if SQLITE_TEMP_STORE==1
+  return ( db->temp_store==2 );
+#endif
+#if SQLITE_TEMP_STORE==2
+  return ( db->temp_store!=1 );
+#endif
+#if SQLITE_TEMP_STORE==3
+  return 1;
+#endif
+#if SQLITE_TEMP_STORE<1 || SQLITE_TEMP_STORE>3
+  return 0;
+#endif
+}
+
+/*
+** Return UTF-8 encoded English language explanation of the most recent
+** error.
+*/
+SQLITE_API const char *sqlite3_errmsg(sqlite3 *db){
+  const char *z;
+  if( !db ){
+    return sqlite3ErrStr(SQLITE_NOMEM);
+  }
+  if( !sqlite3SafetyCheckSickOrOk(db) ){
+    return sqlite3ErrStr(SQLITE_MISUSE_BKPT);
+  }
+  sqlite3_mutex_enter(db->mutex);
+  if( db->mallocFailed ){
+    z = sqlite3ErrStr(SQLITE_NOMEM);
+  }else{
+    z = (char*)sqlite3_value_text(db->pErr);
+    assert( !db->mallocFailed );
+    if( z==0 ){
+      z = sqlite3ErrStr(db->errCode);
+    }
+  }
+  sqlite3_mutex_leave(db->mutex);
+  return z;
+}
+
+#ifndef SQLITE_OMIT_UTF16
+/*
+** Return UTF-16 encoded English language explanation of the most recent
+** error.
+*/
+SQLITE_API const void *sqlite3_errmsg16(sqlite3 *db){
+  static const u16 outOfMem[] = {
+    'o', 'u', 't', ' ', 'o', 'f', ' ', 'm', 'e', 'm', 'o', 'r', 'y', 0
+  };
+  static const u16 misuse[] = {
+    'l', 'i', 'b', 'r', 'a', 'r', 'y', ' ', 
+    'r', 'o', 'u', 't', 'i', 'n', 'e', ' ', 
+    'c', 'a', 'l', 'l', 'e', 'd', ' ', 
+    'o', 'u', 't', ' ', 
+    'o', 'f', ' ', 
+    's', 'e', 'q', 'u', 'e', 'n', 'c', 'e', 0
+  };
+
+  const void *z;
+  if( !db ){
+    return (void *)outOfMem;
+  }
+  if( !sqlite3SafetyCheckSickOrOk(db) ){
+    return (void *)misuse;
+  }
+  sqlite3_mutex_enter(db->mutex);
+  if( db->mallocFailed ){
+    z = (void *)outOfMem;
+  }else{
+    z = sqlite3_value_text16(db->pErr);
+    if( z==0 ){
+      sqlite3ValueSetStr(db->pErr, -1, sqlite3ErrStr(db->errCode),
+           SQLITE_UTF8, SQLITE_STATIC);
+      z = sqlite3_value_text16(db->pErr);
+    }
+    /* A malloc() may have failed within the call to sqlite3_value_text16()
+    ** above. If this is the case, then the db->mallocFailed flag needs to
+    ** be cleared before returning. Do this directly, instead of via
+    ** sqlite3ApiExit(), to avoid setting the database handle error message.
+    */
+    db->mallocFailed = 0;
+  }
+  sqlite3_mutex_leave(db->mutex);
+  return z;
+}
+#endif /* SQLITE_OMIT_UTF16 */
+
+/*
+** Return the most recent error code generated by an SQLite routine. If NULL is
+** passed to this function, we assume a malloc() failed during sqlite3_open().
+*/
+SQLITE_API int sqlite3_errcode(sqlite3 *db){
+  if( db && !sqlite3SafetyCheckSickOrOk(db) ){
+    return SQLITE_MISUSE_BKPT;
+  }
+  if( !db || db->mallocFailed ){
+    return SQLITE_NOMEM;
+  }
+  return db->errCode & db->errMask;
+}
+SQLITE_API int sqlite3_extended_errcode(sqlite3 *db){
+  if( db && !sqlite3SafetyCheckSickOrOk(db) ){
+    return SQLITE_MISUSE_BKPT;
+  }
+  if( !db || db->mallocFailed ){
+    return SQLITE_NOMEM;
+  }
+  return db->errCode;
+}
+
+/*
+** Create a new collating function for database "db".  The name is zName
+** and the encoding is enc.
+*/
+static int createCollation(
+  sqlite3* db,
+  const char *zName, 
+  u8 enc,
+  u8 collType,
+  void* pCtx,
+  int(*xCompare)(void*,int,const void*,int,const void*),
+  void(*xDel)(void*)
+){
+  CollSeq *pColl;
+  int enc2;
+  int nName = sqlite3Strlen30(zName);
+  
+  assert( sqlite3_mutex_held(db->mutex) );
+
+  /* If SQLITE_UTF16 is specified as the encoding type, transform this
+  ** to one of SQLITE_UTF16LE or SQLITE_UTF16BE using the
+  ** SQLITE_UTF16NATIVE macro. SQLITE_UTF16 is not used internally.
+  */
+  enc2 = enc;
+  testcase( enc2==SQLITE_UTF16 );
+  testcase( enc2==SQLITE_UTF16_ALIGNED );
+  if( enc2==SQLITE_UTF16 || enc2==SQLITE_UTF16_ALIGNED ){
+    enc2 = SQLITE_UTF16NATIVE;
+  }
+  if( enc2<SQLITE_UTF8 || enc2>SQLITE_UTF16BE ){
+    return SQLITE_MISUSE_BKPT;
+  }
+
+  /* Check if this call is removing or replacing an existing collation 
+  ** sequence. If so, and there are active VMs, return busy. If there
+  ** are no active VMs, invalidate any pre-compiled statements.
+  */
+  pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 0);
+  if( pColl && pColl->xCmp ){
+    if( db->activeVdbeCnt ){
+      sqlite3Error(db, SQLITE_BUSY, 
+        "unable to delete/modify collation sequence due to active statements");
+      return SQLITE_BUSY;
+    }
+    sqlite3ExpirePreparedStatements(db);
+
+    /* If collation sequence pColl was created directly by a call to
+    ** sqlite3_create_collation, and not generated by synthCollSeq(),
+    ** then any copies made by synthCollSeq() need to be invalidated.
+    ** Also, collation destructor - CollSeq.xDel() - function may need
+    ** to be called.
+    */ 
+    if( (pColl->enc & ~SQLITE_UTF16_ALIGNED)==enc2 ){
+      CollSeq *aColl = sqlite3HashFind(&db->aCollSeq, zName, nName);
+      int j;
+      for(j=0; j<3; j++){
+        CollSeq *p = &aColl[j];
+        if( p->enc==pColl->enc ){
+          if( p->xDel ){
+            p->xDel(p->pUser);
+          }
+          p->xCmp = 0;
+        }
+      }
+    }
+  }
+
+  pColl = sqlite3FindCollSeq(db, (u8)enc2, zName, 1);
+  if( pColl==0 ) return SQLITE_NOMEM;
+  pColl->xCmp = xCompare;
+  pColl->pUser = pCtx;
+  pColl->xDel = xDel;
+  pColl->enc = (u8)(enc2 | (enc & SQLITE_UTF16_ALIGNED));
+  pColl->type = collType;
+  sqlite3Error(db, SQLITE_OK, 0);
+  return SQLITE_OK;
+}
+
+
+/*
+** This array defines hard upper bounds on limit values.  The
+** initializer must be kept in sync with the SQLITE_LIMIT_*
+** #defines in sqlite3.h.
+*/
+static const int aHardLimit[] = {
+  SQLITE_MAX_LENGTH,
+  SQLITE_MAX_SQL_LENGTH,
+  SQLITE_MAX_COLUMN,
+  SQLITE_MAX_EXPR_DEPTH,
+  SQLITE_MAX_COMPOUND_SELECT,
+  SQLITE_MAX_VDBE_OP,
+  SQLITE_MAX_FUNCTION_ARG,
+  SQLITE_MAX_ATTACHED,
+  SQLITE_MAX_LIKE_PATTERN_LENGTH,
+  SQLITE_MAX_VARIABLE_NUMBER,
+  SQLITE_MAX_TRIGGER_DEPTH,
+};
+
+/*
+** Make sure the hard limits are set to reasonable values
+*/
+#if SQLITE_MAX_LENGTH<100
+# error SQLITE_MAX_LENGTH must be at least 100
+#endif
+#if SQLITE_MAX_SQL_LENGTH<100
+# error SQLITE_MAX_SQL_LENGTH must be at least 100
+#endif
+#if SQLITE_MAX_SQL_LENGTH>SQLITE_MAX_LENGTH
+# error SQLITE_MAX_SQL_LENGTH must not be greater than SQLITE_MAX_LENGTH
+#endif
+#if SQLITE_MAX_COMPOUND_SELECT<2
+# error SQLITE_MAX_COMPOUND_SELECT must be at least 2
+#endif
+#if SQLITE_MAX_VDBE_OP<40
+# error SQLITE_MAX_VDBE_OP must be at least 40
+#endif
+#if SQLITE_MAX_FUNCTION_ARG<0 || SQLITE_MAX_FUNCTION_ARG>1000
+# error SQLITE_MAX_FUNCTION_ARG must be between 0 and 1000
+#endif
+#if SQLITE_MAX_ATTACHED<0 || SQLITE_MAX_ATTACHED>62
+# error SQLITE_MAX_ATTACHED must be between 0 and 62
+#endif
+#if SQLITE_MAX_LIKE_PATTERN_LENGTH<1
+# error SQLITE_MAX_LIKE_PATTERN_LENGTH must be at least 1
+#endif
+#if SQLITE_MAX_COLUMN>32767
+# error SQLITE_MAX_COLUMN must not exceed 32767
+#endif
+#if SQLITE_MAX_TRIGGER_DEPTH<1
+# error SQLITE_MAX_TRIGGER_DEPTH must be at least 1
+#endif
+
+
+/*
+** Change the value of a limit.  Report the old value.
+** If an invalid limit index is supplied, report -1.
+** Make no changes but still report the old value if the
+** new limit is negative.
+**
+** A new lower limit does not shrink existing constructs.
+** It merely prevents new constructs that exceed the limit
+** from forming.
+*/
+SQLITE_API int sqlite3_limit(sqlite3 *db, int limitId, int newLimit){
+  int oldLimit;
+
+
+  /* EVIDENCE-OF: R-30189-54097 For each limit category SQLITE_LIMIT_NAME
+  ** there is a hard upper bound set at compile-time by a C preprocessor
+  ** macro called SQLITE_MAX_NAME. (The "_LIMIT_" in the name is changed to
+  ** "_MAX_".)
+  */
+  assert( aHardLimit[SQLITE_LIMIT_LENGTH]==SQLITE_MAX_LENGTH );
+  assert( aHardLimit[SQLITE_LIMIT_SQL_LENGTH]==SQLITE_MAX_SQL_LENGTH );
+  assert( aHardLimit[SQLITE_LIMIT_COLUMN]==SQLITE_MAX_COLUMN );
+  assert( aHardLimit[SQLITE_LIMIT_EXPR_DEPTH]==SQLITE_MAX_EXPR_DEPTH );
+  assert( aHardLimit[SQLITE_LIMIT_COMPOUND_SELECT]==SQLITE_MAX_COMPOUND_SELECT);
+  assert( aHardLimit[SQLITE_LIMIT_VDBE_OP]==SQLITE_MAX_VDBE_OP );
+  assert( aHardLimit[SQLITE_LIMIT_FUNCTION_ARG]==SQLITE_MAX_FUNCTION_ARG );
+  assert( aHardLimit[SQLITE_LIMIT_ATTACHED]==SQLITE_MAX_ATTACHED );
+  assert( aHardLimit[SQLITE_LIMIT_LIKE_PATTERN_LENGTH]==
+                                               SQLITE_MAX_LIKE_PATTERN_LENGTH );
+  assert( aHardLimit[SQLITE_LIMIT_VARIABLE_NUMBER]==SQLITE_MAX_VARIABLE_NUMBER);
+  assert( aHardLimit[SQLITE_LIMIT_TRIGGER_DEPTH]==SQLITE_MAX_TRIGGER_DEPTH );
+  assert( SQLITE_LIMIT_TRIGGER_DEPTH==(SQLITE_N_LIMIT-1) );
+
+
+  if( limitId<0 || limitId>=SQLITE_N_LIMIT ){
+    return -1;
+  }
+  oldLimit = db->aLimit[limitId];
+  if( newLimit>=0 ){                   /* IMP: R-52476-28732 */
+    if( newLimit>aHardLimit[limitId] ){
+      newLimit = aHardLimit[limitId];  /* IMP: R-51463-25634 */
+    }
+    db->aLimit[limitId] = newLimit;
+  }
+  return oldLimit;                     /* IMP: R-53341-35419 */
+}
+
+/*
+** This routine does the work of opening a database on behalf of
+** sqlite3_open() and sqlite3_open16(). The database filename "zFilename"  
+** is UTF-8 encoded.
+*/
+static int openDatabase(
+  const char *zFilename, /* Database filename UTF-8 encoded */
+  sqlite3 **ppDb,        /* OUT: Returned database handle */
+  unsigned flags,        /* Operational flags */
+  const char *zVfs       /* Name of the VFS to use */
+){
+  sqlite3 *db;
+  int rc;
+  int isThreadsafe;
+
+  *ppDb = 0;
+#ifndef SQLITE_OMIT_AUTOINIT
+  rc = sqlite3_initialize();
+  if( rc ) return rc;
+#endif
+
+  /* Only allow sensible combinations of bits in the flags argument.  
+  ** Throw an error if any non-sense combination is used.  If we
+  ** do not block illegal combinations here, it could trigger
+  ** assert() statements in deeper layers.  Sensible combinations
+  ** are:
+  **
+  **  1:  SQLITE_OPEN_READONLY
+  **  2:  SQLITE_OPEN_READWRITE
+  **  6:  SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE
+  */
+  assert( SQLITE_OPEN_READONLY  == 0x01 );
+  assert( SQLITE_OPEN_READWRITE == 0x02 );
+  assert( SQLITE_OPEN_CREATE    == 0x04 );
+  testcase( (1<<(flags&7))==0x02 ); /* READONLY */
+  testcase( (1<<(flags&7))==0x04 ); /* READWRITE */
+  testcase( (1<<(flags&7))==0x40 ); /* READWRITE | CREATE */
+  if( ((1<<(flags&7)) & 0x46)==0 ) return SQLITE_MISUSE;
+
+  if( sqlite3GlobalConfig.bCoreMutex==0 ){
+    isThreadsafe = 0;
+  }else if( flags & SQLITE_OPEN_NOMUTEX ){
+    isThreadsafe = 0;
+  }else if( flags & SQLITE_OPEN_FULLMUTEX ){
+    isThreadsafe = 1;
+  }else{
+    isThreadsafe = sqlite3GlobalConfig.bFullMutex;
+  }
+  if( flags & SQLITE_OPEN_PRIVATECACHE ){
+    flags &= ~SQLITE_OPEN_SHAREDCACHE;
+  }else if( sqlite3GlobalConfig.sharedCacheEnabled ){
+    flags |= SQLITE_OPEN_SHAREDCACHE;
+  }
+
+  /* Remove harmful bits from the flags parameter
+  **
+  ** The SQLITE_OPEN_NOMUTEX and SQLITE_OPEN_FULLMUTEX flags were
+  ** dealt with in the previous code block.  Besides these, the only
+  ** valid input flags for sqlite3_open_v2() are SQLITE_OPEN_READONLY,
+  ** SQLITE_OPEN_READWRITE, SQLITE_OPEN_CREATE, SQLITE_OPEN_SHAREDCACHE,
+  ** SQLITE_OPEN_PRIVATECACHE, and some reserved bits.  Silently mask
+  ** off all other flags.
+  */
+  flags &=  ~( SQLITE_OPEN_DELETEONCLOSE |
+               SQLITE_OPEN_EXCLUSIVE |
+               SQLITE_OPEN_MAIN_DB |
+               SQLITE_OPEN_TEMP_DB | 
+               SQLITE_OPEN_TRANSIENT_DB | 
+               SQLITE_OPEN_MAIN_JOURNAL | 
+               SQLITE_OPEN_TEMP_JOURNAL | 
+               SQLITE_OPEN_SUBJOURNAL | 
+               SQLITE_OPEN_MASTER_JOURNAL |
+               SQLITE_OPEN_NOMUTEX |
+               SQLITE_OPEN_FULLMUTEX |
+               SQLITE_OPEN_WAL
+             );
+
+  /* Allocate the sqlite data structure */
+  db = sqlite3MallocZero( sizeof(sqlite3) );
+  if( db==0 ) goto opendb_out;
+  if( isThreadsafe ){
+    db->mutex = sqlite3MutexAlloc(SQLITE_MUTEX_RECURSIVE);
+    if( db->mutex==0 ){
+      sqlite3_free(db);
+      db = 0;
+      goto opendb_out;
+    }
+  }
+  sqlite3_mutex_enter(db->mutex);
+  db->errMask = 0xff;
+  db->nDb = 2;
+  db->magic = SQLITE_MAGIC_BUSY;
+  db->aDb = db->aDbStatic;
+
+  assert( sizeof(db->aLimit)==sizeof(aHardLimit) );
+  memcpy(db->aLimit, aHardLimit, sizeof(db->aLimit));
+  db->autoCommit = 1;
+  db->nextAutovac = -1;
+  db->nextPagesize = 0;
+  db->flags |= SQLITE_ShortColNames | SQLITE_AutoIndex | SQLITE_EnableTrigger
+#if SQLITE_DEFAULT_FILE_FORMAT<4
+                 | SQLITE_LegacyFileFmt
+#endif
+#ifdef SQLITE_ENABLE_LOAD_EXTENSION
+                 | SQLITE_LoadExtension
+#endif
+#if SQLITE_DEFAULT_RECURSIVE_TRIGGERS
+                 | SQLITE_RecTriggers
+#endif
+#if defined(SQLITE_DEFAULT_FOREIGN_KEYS) && SQLITE_DEFAULT_FOREIGN_KEYS
+                 | SQLITE_ForeignKeys
+#endif
+      ;
+  sqlite3HashInit(&db->aCollSeq);
+#ifndef SQLITE_OMIT_VIRTUALTABLE
+  sqlite3HashInit(&db->aModule);
+#endif
+
+  db->pVfs = sqlite3_vfs_find(zVfs);
+  if( !db->pVfs ){
+    rc = SQLITE_ERROR;
+    sqlite3Error(db, rc, "no such vfs: %s", zVfs);
+    goto opendb_out;
+  }
+
+  /* Add the default collation sequence BINARY. BINARY works for both UTF-8
+  ** and UTF-16, so add a version for each to avoid any unnecessary
+  ** conversions. The only error that can occur here is a malloc() failure.
+  */
+  createCollation(db, "BINARY", SQLITE_UTF8, SQLITE_COLL_BINARY, 0,
+                  binCollFunc, 0);
+  createCollation(db, "BINARY", SQLITE_UTF16BE, SQLITE_COLL_BINARY, 0,
+                  binCollFunc, 0);
+  createCollation(db, "BINARY", SQLITE_UTF16LE, SQLITE_COLL_BINARY, 0,
+                  binCollFunc, 0);
+  createCollation(db, "RTRIM", SQLITE_UTF8, SQLITE_COLL_USER, (void*)1,
+                  binCollFunc, 0);
+  if( db->mallocFailed ){
+    goto opendb_out;
+  }
+  db->pDfltColl = sqlite3FindCollSeq(db, SQLITE_UTF8, "BINARY", 0);
+  assert( db->pDfltColl!=0 );
+
+  /* Also add a UTF-8 case-insensitive collation sequence. */
+  createCollation(db, "NOCASE", SQLITE_UTF8, SQLITE_COLL_NOCASE, 0,
+                  nocaseCollatingFunc, 0);
+
+  /* Open the backend database driver */
+  db->openFlags = flags;
+  rc = sqlite3BtreeOpen(zFilename, db, &db->aDb[0].pBt, 0,
+                        flags | SQLITE_OPEN_MAIN_DB);
+  if( rc!=SQLITE_OK ){
+    if( rc==SQLITE_IOERR_NOMEM ){
+      rc = SQLITE_NOMEM;
+    }
+    sqlite3Error(db, rc, 0);
+    goto opendb_out;
+  }
+  db->aDb[0].pSchema = sqlite3SchemaGet(db, db->aDb[0].pBt);
+  db->aDb[1].pSchema = sqlite3SchemaGet(db, 0);
+
+
+  /* The default safety_level for the main database is 'full'; for the temp
+  ** database it is 'NONE'. This matches the pager layer defaults.  
+  */
+  db->aDb[0].zName = "main";
+  db->aDb[0].safety_level = 3;
+  db->aDb[1].zName = "temp";
+  db->aDb[1].safety_level = 1;
+
+  db->magic = SQLITE_MAGIC_OPEN;
+  if( db->mallocFailed ){
+    goto opendb_out;
+  }
+
+  /* Register all built-in functions, but do not attempt to read the
+  ** database schema yet. This is delayed until the first time the database
+  ** is accessed.
+  */
+  sqlite3Error(db, SQLITE_OK, 0);
+  sqlite3RegisterBuiltinFunctions(db);
+
+  /* Load automatic extensions - extensions that have been registered
+  ** using the sqlite3_automatic_extension() API.
+  */
+  sqlite3AutoLoadExtensions(db);
+  rc = sqlite3_errcode(db);
+  if( rc!=SQLITE_OK ){
+    goto opendb_out;
+  }
+
+#ifdef SQLITE_ENABLE_FTS1
+  if( !db->mallocFailed ){
+    extern int sqlite3Fts1Init(sqlite3*);
+    rc = sqlite3Fts1Init(db);
+  }
+#endif
+
+#ifdef SQLITE_ENABLE_FTS2
+  if( !db->mallocFailed && rc==SQLITE_OK ){
+    extern int sqlite3Fts2Init(sqlite3*);
+    rc = sqlite3Fts2Init(db);
+  }
+#endif
+
+#ifdef SQLITE_ENABLE_FTS3
+  if( !db->mallocFailed && rc==SQLITE_OK ){
+    rc = sqlite3Fts3Init(db);
+  }
+#endif
+
+#ifdef SQLITE_ENABLE_ICU
+  if( !db->mallocFailed && rc==SQLITE_OK ){
+    rc = sqlite3IcuInit(db);
+  }
+#endif
+
+#ifdef SQLITE_ENABLE_RTREE
+  if( !db->mallocFailed && rc==SQLITE_OK){
+    rc = sqlite3RtreeInit(db);
+  }
+#endif
+
+  sqlite3Error(db, rc, 0);
+
+  /* -DSQLITE_DEFAULT_LOCKING_MODE=1 makes EXCLUSIVE the default locking
+  ** mode.  -DSQLITE_DEFAULT_LOCKING_MODE=0 make NORMAL the default locking
+  ** mode.  Doing nothing at all also makes NORMAL the default.
+  */
+#ifdef SQLITE_DEFAULT_LOCKING_MODE
+  db->dfltLockMode = SQLITE_DEFAULT_LOCKING_MODE;
+  sqlite3PagerLockingMode(sqlite3BtreePager(db->aDb[0].pBt),
+                          SQLITE_DEFAULT_LOCKING_MODE);
+#endif
+
+  /* Enable the lookaside-malloc subsystem */
+  setupLookaside(db, 0, sqlite3GlobalConfig.szLookaside,
+                        sqlite3GlobalConfig.nLookaside);
+
+  sqlite3_wal_autocheckpoint(db, SQLITE_DEFAULT_WAL_AUTOCHECKPOINT);
+
+opendb_out:
+  if( db ){
+    assert( db->mutex!=0 || isThreadsafe==0 || sqlite3GlobalConfig.bFullMutex==0 );
+    sqlite3_mutex_leave(db->mutex);
+  }
+  rc = sqlite3_errcode(db);
+  if( rc==SQLITE_NOMEM ){
+    sqlite3_close(db);
+    db = 0;
+  }else if( rc!=SQLITE_OK ){
+    db->magic = SQLITE_MAGIC_SICK;
+  }
+  *ppDb = db;
+  return sqlite3ApiExit(0, rc);
+}
+
+/*
+** Open a new database handle.
+*/
+SQLITE_API int sqlite3_open(
+  const char *zFilename, 
+  sqlite3 **ppDb 
+){
+  return openDatabase(zFilename, ppDb,
+                      SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
+}
+SQLITE_API int sqlite3_open_v2(
+  const char *filename,   /* Database filename (UTF-8) */
+  sqlite3 **ppDb,         /* OUT: SQLite db handle */
+  int flags,              /* Flags */
+  const char *zVfs        /* Name of VFS module to use */
+){
+  return openDatabase(filename, ppDb, flags, zVfs);
+}
+
+#ifndef SQLITE_OMIT_UTF16
+/*
+** Open a new database handle.
+*/
+SQLITE_API int sqlite3_open16(
+  const void *zFilename, 
+  sqlite3 **ppDb
+){
+  char const *zFilename8;   /* zFilename encoded in UTF-8 instead of UTF-16 */
+  sqlite3_value *pVal;
+  int rc;
+
+  assert( zFilename );
+  assert( ppDb );
+  *ppDb = 0;
+#ifndef SQLITE_OMIT_AUTOINIT
+  rc = sqlite3_initialize();
+  if( rc ) return rc;
+#endif
+  pVal = sqlite3ValueNew(0);
+  sqlite3ValueSetStr(pVal, -1, zFilename, SQLITE_UTF16NATIVE, SQLITE_STATIC);
+  zFilename8 = sqlite3ValueText(pVal, SQLITE_UTF8);
+  if( zFilename8 ){
+    rc = openDatabase(zFilename8, ppDb,
+                      SQLITE_OPEN_READWRITE | SQLITE_OPEN_CREATE, 0);
+    assert( *ppDb || rc==SQLITE_NOMEM );
+    if( rc==SQLITE_OK && !DbHasProperty(*ppDb, 0, DB_SchemaLoaded) ){
+      ENC(*ppDb) = SQLITE_UTF16NATIVE;
+    }
+  }else{
+    rc = SQLITE_NOMEM;
+  }
+  sqlite3ValueFree(pVal);
+
+  return sqlite3ApiExit(0, rc);
+}
+#endif /* SQLITE_OMIT_UTF16 */
+
+/*
+** Register a new collation sequence with the database handle db.
+*/
+SQLITE_API int sqlite3_create_collation(
+  sqlite3* db, 
+  const char *zName, 
+  int enc, 
+  void* pCtx,
+  int(*xCompare)(void*,int,const void*,int,const void*)
+){
+  int rc;
+  sqlite3_mutex_enter(db->mutex);
+  assert( !db->mallocFailed );
+  rc = createCollation(db, zName, (u8)enc, SQLITE_COLL_USER, pCtx, xCompare, 0);
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+/*
+** Register a new collation sequence with the database handle db.
+*/
+SQLITE_API int sqlite3_create_collation_v2(
+  sqlite3* db, 
+  const char *zName, 
+  int enc, 
+  void* pCtx,
+  int(*xCompare)(void*,int,const void*,int,const void*),
+  void(*xDel)(void*)
+){
+  int rc;
+  sqlite3_mutex_enter(db->mutex);
+  assert( !db->mallocFailed );
+  rc = createCollation(db, zName, (u8)enc, SQLITE_COLL_USER, pCtx, xCompare, xDel);
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+#ifndef SQLITE_OMIT_UTF16
+/*
+** Register a new collation sequence with the database handle db.
+*/
+SQLITE_API int sqlite3_create_collation16(
+  sqlite3* db, 
+  const void *zName,
+  int enc, 
+  void* pCtx,
+  int(*xCompare)(void*,int,const void*,int,const void*)
+){
+  int rc = SQLITE_OK;
+  char *zName8;
+  sqlite3_mutex_enter(db->mutex);
+  assert( !db->mallocFailed );
+  zName8 = sqlite3Utf16to8(db, zName, -1, SQLITE_UTF16NATIVE);
+  if( zName8 ){
+    rc = createCollation(db, zName8, (u8)enc, SQLITE_COLL_USER, pCtx, xCompare, 0);
+    sqlite3DbFree(db, zName8);
+  }
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+#endif /* SQLITE_OMIT_UTF16 */
+
+/*
+** Register a collation sequence factory callback with the database handle
+** db. Replace any previously installed collation sequence factory.
+*/
+SQLITE_API int sqlite3_collation_needed(
+  sqlite3 *db, 
+  void *pCollNeededArg, 
+  void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)
+){
+  sqlite3_mutex_enter(db->mutex);
+  db->xCollNeeded = xCollNeeded;
+  db->xCollNeeded16 = 0;
+  db->pCollNeededArg = pCollNeededArg;
+  sqlite3_mutex_leave(db->mutex);
+  return SQLITE_OK;
+}
+
+#ifndef SQLITE_OMIT_UTF16
+/*
+** Register a collation sequence factory callback with the database handle
+** db. Replace any previously installed collation sequence factory.
+*/
+SQLITE_API int sqlite3_collation_needed16(
+  sqlite3 *db, 
+  void *pCollNeededArg, 
+  void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)
+){
+  sqlite3_mutex_enter(db->mutex);
+  db->xCollNeeded = 0;
+  db->xCollNeeded16 = xCollNeeded16;
+  db->pCollNeededArg = pCollNeededArg;
+  sqlite3_mutex_leave(db->mutex);
+  return SQLITE_OK;
+}
+#endif /* SQLITE_OMIT_UTF16 */
+
+#ifndef SQLITE_OMIT_DEPRECATED
+/*
+** This function is now an anachronism. It used to be used to recover from a
+** malloc() failure, but SQLite now does this automatically.
+*/
+SQLITE_API int sqlite3_global_recover(void){
+  return SQLITE_OK;
+}
+#endif
+
+/*
+** Test to see whether or not the database connection is in autocommit
+** mode.  Return TRUE if it is and FALSE if not.  Autocommit mode is on
+** by default.  Autocommit is disabled by a BEGIN statement and reenabled
+** by the next COMMIT or ROLLBACK.
+**
+******* THIS IS AN EXPERIMENTAL API AND IS SUBJECT TO CHANGE ******
+*/
+SQLITE_API int sqlite3_get_autocommit(sqlite3 *db){
+  return db->autoCommit;
+}
+
+/*
+** The following routines are subtitutes for constants SQLITE_CORRUPT,
+** SQLITE_MISUSE, SQLITE_CANTOPEN, SQLITE_IOERR and possibly other error
+** constants.  They server two purposes:
+**
+**   1.  Serve as a convenient place to set a breakpoint in a debugger
+**       to detect when version error conditions occurs.
+**
+**   2.  Invoke sqlite3_log() to provide the source code location where
+**       a low-level error is first detected.
+*/
+SQLITE_PRIVATE int sqlite3CorruptError(int lineno){
+  testcase( sqlite3GlobalConfig.xLog!=0 );
+  sqlite3_log(SQLITE_CORRUPT,
+              "database corruption at line %d of [%.10s]",
+              lineno, 20+sqlite3_sourceid());
+  return SQLITE_CORRUPT;
+}
+SQLITE_PRIVATE int sqlite3MisuseError(int lineno){
+  testcase( sqlite3GlobalConfig.xLog!=0 );
+  sqlite3_log(SQLITE_MISUSE, 
+              "misuse at line %d of [%.10s]",
+              lineno, 20+sqlite3_sourceid());
+  return SQLITE_MISUSE;
+}
+SQLITE_PRIVATE int sqlite3CantopenError(int lineno){
+  testcase( sqlite3GlobalConfig.xLog!=0 );
+  sqlite3_log(SQLITE_CANTOPEN, 
+              "cannot open file at line %d of [%.10s]",
+              lineno, 20+sqlite3_sourceid());
+  return SQLITE_CANTOPEN;
+}
+
+
+#ifndef SQLITE_OMIT_DEPRECATED
+/*
+** This is a convenience routine that makes sure that all thread-specific
+** data for this thread has been deallocated.
+**
+** SQLite no longer uses thread-specific data so this routine is now a
+** no-op.  It is retained for historical compatibility.
+*/
+SQLITE_API void sqlite3_thread_cleanup(void){
+}
+#endif
+
+/*
+** Return meta information about a specific column of a database table.
+** See comment in sqlite3.h (sqlite.h.in) for details.
+*/
+#ifdef SQLITE_ENABLE_COLUMN_METADATA
+SQLITE_API int sqlite3_table_column_metadata(
+  sqlite3 *db,                /* Connection handle */
+  const char *zDbName,        /* Database name or NULL */
+  const char *zTableName,     /* Table name */
+  const char *zColumnName,    /* Column name */
+  char const **pzDataType,    /* OUTPUT: Declared data type */
+  char const **pzCollSeq,     /* OUTPUT: Collation sequence name */
+  int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */
+  int *pPrimaryKey,           /* OUTPUT: True if column part of PK */
+  int *pAutoinc               /* OUTPUT: True if column is auto-increment */
+){
+  int rc;
+  char *zErrMsg = 0;
+  Table *pTab = 0;
+  Column *pCol = 0;
+  int iCol;
+
+  char const *zDataType = 0;
+  char const *zCollSeq = 0;
+  int notnull = 0;
+  int primarykey = 0;
+  int autoinc = 0;
+
+  /* Ensure the database schema has been loaded */
+  sqlite3_mutex_enter(db->mutex);
+  sqlite3BtreeEnterAll(db);
+  rc = sqlite3Init(db, &zErrMsg);
+  if( SQLITE_OK!=rc ){
+    goto error_out;
+  }
+
+  /* Locate the table in question */
+  pTab = sqlite3FindTable(db, zTableName, zDbName);
+  if( !pTab || pTab->pSelect ){
+    pTab = 0;
+    goto error_out;
+  }
+
+  /* Find the column for which info is requested */
+  if( sqlite3IsRowid(zColumnName) ){
+    iCol = pTab->iPKey;
+    if( iCol>=0 ){
+      pCol = &pTab->aCol[iCol];
+    }
+  }else{
+    for(iCol=0; iCol<pTab->nCol; iCol++){
+      pCol = &pTab->aCol[iCol];
+      if( 0==sqlite3StrICmp(pCol->zName, zColumnName) ){
+        break;
+      }
+    }
+    if( iCol==pTab->nCol ){
+      pTab = 0;
+      goto error_out;
+    }
+  }
+
+  /* The following block stores the meta information that will be returned
+  ** to the caller in local variables zDataType, zCollSeq, notnull, primarykey
+  ** and autoinc. At this point there are two possibilities:
+  ** 
+  **     1. The specified column name was rowid", "oid" or "_rowid_" 
+  **        and there is no explicitly declared IPK column. 
+  **
+  **     2. The table is not a view and the column name identified an 
+  **        explicitly declared column. Copy meta information from *pCol.
+  */ 
+  if( pCol ){
+    zDataType = pCol->zType;
+    zCollSeq = pCol->zColl;
+    notnull = pCol->notNull!=0;
+    primarykey  = pCol->isPrimKey!=0;
+    autoinc = pTab->iPKey==iCol && (pTab->tabFlags & TF_Autoincrement)!=0;
+  }else{
+    zDataType = "INTEGER";
+    primarykey = 1;
+  }
+  if( !zCollSeq ){
+    zCollSeq = "BINARY";
+  }
+
+error_out:
+  sqlite3BtreeLeaveAll(db);
+
+  /* Whether the function call succeeded or failed, set the output parameters
+  ** to whatever their local counterparts contain. If an error did occur,
+  ** this has the effect of zeroing all output parameters.
+  */
+  if( pzDataType ) *pzDataType = zDataType;
+  if( pzCollSeq ) *pzCollSeq = zCollSeq;
+  if( pNotNull ) *pNotNull = notnull;
+  if( pPrimaryKey ) *pPrimaryKey = primarykey;
+  if( pAutoinc ) *pAutoinc = autoinc;
+
+  if( SQLITE_OK==rc && !pTab ){
+    sqlite3DbFree(db, zErrMsg);
+    zErrMsg = sqlite3MPrintf(db, "no such table column: %s.%s", zTableName,
+        zColumnName);
+    rc = SQLITE_ERROR;
+  }
+  sqlite3Error(db, rc, (zErrMsg?"%s":0), zErrMsg);
+  sqlite3DbFree(db, zErrMsg);
+  rc = sqlite3ApiExit(db, rc);
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+#endif
+
+/*
+** Sleep for a little while.  Return the amount of time slept.
+*/
+SQLITE_API int sqlite3_sleep(int ms){
+  sqlite3_vfs *pVfs;
+  int rc;
+  pVfs = sqlite3_vfs_find(0);
+  if( pVfs==0 ) return 0;
+
+  /* This function works in milliseconds, but the underlying OsSleep() 
+  ** API uses microseconds. Hence the 1000's.
+  */
+  rc = (sqlite3OsSleep(pVfs, 1000*ms)/1000);
+  return rc;
+}
+
+/*
+** Enable or disable the extended result codes.
+*/
+SQLITE_API int sqlite3_extended_result_codes(sqlite3 *db, int onoff){
+  sqlite3_mutex_enter(db->mutex);
+  db->errMask = onoff ? 0xffffffff : 0xff;
+  sqlite3_mutex_leave(db->mutex);
+  return SQLITE_OK;
+}
+
+/*
+** Invoke the xFileControl method on a particular database.
+*/
+SQLITE_API int sqlite3_file_control(sqlite3 *db, const char *zDbName, int op, void *pArg){
+  int rc = SQLITE_ERROR;
+  int iDb;
+  sqlite3_mutex_enter(db->mutex);
+  if( zDbName==0 ){
+    iDb = 0;
+  }else{
+    for(iDb=0; iDb<db->nDb; iDb++){
+      if( strcmp(db->aDb[iDb].zName, zDbName)==0 ) break;
+    }
+  }
+  if( iDb<db->nDb ){
+    Btree *pBtree = db->aDb[iDb].pBt;
+    if( pBtree ){
+      Pager *pPager;
+      sqlite3_file *fd;
+      sqlite3BtreeEnter(pBtree);
+      pPager = sqlite3BtreePager(pBtree);
+      assert( pPager!=0 );
+      fd = sqlite3PagerFile(pPager);
+      assert( fd!=0 );
+      if( op==SQLITE_FCNTL_FILE_POINTER ){
+        *(sqlite3_file**)pArg = fd;
+        rc = SQLITE_OK;
+      }else if( fd->pMethods ){
+        rc = sqlite3OsFileControl(fd, op, pArg);
+      }else{
+        rc = SQLITE_NOTFOUND;
+      }
+      sqlite3BtreeLeave(pBtree);
+    }
+  }
+  sqlite3_mutex_leave(db->mutex);
+  return rc;   
+}
+
+/*
+** Interface to the testing logic.
+*/
+SQLITE_API int sqlite3_test_control(int op, ...){
+  int rc = 0;
+#ifndef SQLITE_OMIT_BUILTIN_TEST
+  va_list ap;
+  va_start(ap, op);
+  switch( op ){
+
+    /*
+    ** Save the current state of the PRNG.
+    */
+    case SQLITE_TESTCTRL_PRNG_SAVE: {
+      sqlite3PrngSaveState();
+      break;
+    }
+
+    /*
+    ** Restore the state of the PRNG to the last state saved using
+    ** PRNG_SAVE.  If PRNG_SAVE has never before been called, then
+    ** this verb acts like PRNG_RESET.
+    */
+    case SQLITE_TESTCTRL_PRNG_RESTORE: {
+      sqlite3PrngRestoreState();
+      break;
+    }
+
+    /*
+    ** Reset the PRNG back to its uninitialized state.  The next call
+    ** to sqlite3_randomness() will reseed the PRNG using a single call
+    ** to the xRandomness method of the default VFS.
+    */
+    case SQLITE_TESTCTRL_PRNG_RESET: {
+      sqlite3PrngResetState();
+      break;
+    }
+
+    /*
+    **  sqlite3_test_control(BITVEC_TEST, size, program)
+    **
+    ** Run a test against a Bitvec object of size.  The program argument
+    ** is an array of integers that defines the test.  Return -1 on a
+    ** memory allocation error, 0 on success, or non-zero for an error.
+    ** See the sqlite3BitvecBuiltinTest() for additional information.
+    */
+    case SQLITE_TESTCTRL_BITVEC_TEST: {
+      int sz = va_arg(ap, int);
+      int *aProg = va_arg(ap, int*);
+      rc = sqlite3BitvecBuiltinTest(sz, aProg);
+      break;
+    }
+
+    /*
+    **  sqlite3_test_control(BENIGN_MALLOC_HOOKS, xBegin, xEnd)
+    **
+    ** Register hooks to call to indicate which malloc() failures 
+    ** are benign.
+    */
+    case SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS: {
+      typedef void (*void_function)(void);
+      void_function xBenignBegin;
+      void_function xBenignEnd;
+      xBenignBegin = va_arg(ap, void_function);
+      xBenignEnd = va_arg(ap, void_function);
+      sqlite3BenignMallocHooks(xBenignBegin, xBenignEnd);
+      break;
+    }
+
+    /*
+    **  sqlite3_test_control(SQLITE_TESTCTRL_PENDING_BYTE, unsigned int X)
+    **
+    ** Set the PENDING byte to the value in the argument, if X>0.
+    ** Make no changes if X==0.  Return the value of the pending byte
+    ** as it existing before this routine was called.
+    **
+    ** IMPORTANT:  Changing the PENDING byte from 0x40000000 results in
+    ** an incompatible database file format.  Changing the PENDING byte
+    ** while any database connection is open results in undefined and
+    ** dileterious behavior.
+    */
+    case SQLITE_TESTCTRL_PENDING_BYTE: {
+      rc = PENDING_BYTE;
+#ifndef SQLITE_OMIT_WSD
+      {
+        unsigned int newVal = va_arg(ap, unsigned int);
+        if( newVal ) sqlite3PendingByte = newVal;
+      }
+#endif
+      break;
+    }
+
+    /*
+    **  sqlite3_test_control(SQLITE_TESTCTRL_ASSERT, int X)
+    **
+    ** This action provides a run-time test to see whether or not
+    ** assert() was enabled at compile-time.  If X is true and assert()
+    ** is enabled, then the return value is true.  If X is true and
+    ** assert() is disabled, then the return value is zero.  If X is
+    ** false and assert() is enabled, then the assertion fires and the
+    ** process aborts.  If X is false and assert() is disabled, then the
+    ** return value is zero.
+    */
+    case SQLITE_TESTCTRL_ASSERT: {
+      volatile int x = 0;
+      assert( (x = va_arg(ap,int))!=0 );
+      rc = x;
+      break;
+    }
+
+
+    /*
+    **  sqlite3_test_control(SQLITE_TESTCTRL_ALWAYS, int X)
+    **
+    ** This action provides a run-time test to see how the ALWAYS and
+    ** NEVER macros were defined at compile-time.
+    **
+    ** The return value is ALWAYS(X).  
+    **
+    ** The recommended test is X==2.  If the return value is 2, that means
+    ** ALWAYS() and NEVER() are both no-op pass-through macros, which is the
+    ** default setting.  If the return value is 1, then ALWAYS() is either
+    ** hard-coded to true or else it asserts if its argument is false.
+    ** The first behavior (hard-coded to true) is the case if
+    ** SQLITE_TESTCTRL_ASSERT shows that assert() is disabled and the second
+    ** behavior (assert if the argument to ALWAYS() is false) is the case if
+    ** SQLITE_TESTCTRL_ASSERT shows that assert() is enabled.
+    **
+    ** The run-time test procedure might look something like this:
+    **
+    **    if( sqlite3_test_control(SQLITE_TESTCTRL_ALWAYS, 2)==2 ){
+    **      // ALWAYS() and NEVER() are no-op pass-through macros
+    **    }else if( sqlite3_test_control(SQLITE_TESTCTRL_ASSERT, 1) ){
+    **      // ALWAYS(x) asserts that x is true. NEVER(x) asserts x is false.
+    **    }else{
+    **      // ALWAYS(x) is a constant 1.  NEVER(x) is a constant 0.
+    **    }
+    */
+    case SQLITE_TESTCTRL_ALWAYS: {
+      int x = va_arg(ap,int);
+      rc = ALWAYS(x);
+      break;
+    }
+
+    /*   sqlite3_test_control(SQLITE_TESTCTRL_RESERVE, sqlite3 *db, int N)
+    **
+    ** Set the nReserve size to N for the main database on the database
+    ** connection db.
+    */
+    case SQLITE_TESTCTRL_RESERVE: {
+      sqlite3 *db = va_arg(ap, sqlite3*);
+      int x = va_arg(ap,int);
+      sqlite3_mutex_enter(db->mutex);
+      sqlite3BtreeSetPageSize(db->aDb[0].pBt, 0, x, 0);
+      sqlite3_mutex_leave(db->mutex);
+      break;
+    }
+
+    /*  sqlite3_test_control(SQLITE_TESTCTRL_OPTIMIZATIONS, sqlite3 *db, int N)
+    **
+    ** Enable or disable various optimizations for testing purposes.  The 
+    ** argument N is a bitmask of optimizations to be disabled.  For normal
+    ** operation N should be 0.  The idea is that a test program (like the
+    ** SQL Logic Test or SLT test module) can run the same SQL multiple times
+    ** with various optimizations disabled to verify that the same answer
+    ** is obtained in every case.
+    */
+    case SQLITE_TESTCTRL_OPTIMIZATIONS: {
+      sqlite3 *db = va_arg(ap, sqlite3*);
+      int x = va_arg(ap,int);
+      db->flags = (x & SQLITE_OptMask) | (db->flags & ~SQLITE_OptMask);
+      break;
+    }
+
+#ifdef SQLITE_N_KEYWORD
+    /* sqlite3_test_control(SQLITE_TESTCTRL_ISKEYWORD, const char *zWord)
+    **
+    ** If zWord is a keyword recognized by the parser, then return the
+    ** number of keywords.  Or if zWord is not a keyword, return 0.
+    ** 
+    ** This test feature is only available in the amalgamation since
+    ** the SQLITE_N_KEYWORD macro is not defined in this file if SQLite
+    ** is built using separate source files.
+    */
+    case SQLITE_TESTCTRL_ISKEYWORD: {
+      const char *zWord = va_arg(ap, const char*);
+      int n = sqlite3Strlen30(zWord);
+      rc = (sqlite3KeywordCode((u8*)zWord, n)!=TK_ID) ? SQLITE_N_KEYWORD : 0;
+      break;
+    }
+#endif 
+
+    /* sqlite3_test_control(SQLITE_TESTCTRL_PGHDRSZ)
+    **
+    ** Return the size of a pcache header in bytes.
+    */
+    case SQLITE_TESTCTRL_PGHDRSZ: {
+      rc = sizeof(PgHdr);
+      break;
+    }
+
+    /* sqlite3_test_control(SQLITE_TESTCTRL_SCRATCHMALLOC, sz, &pNew, pFree);
+    **
+    ** Pass pFree into sqlite3ScratchFree(). 
+    ** If sz>0 then allocate a scratch buffer into pNew.  
+    */
+    case SQLITE_TESTCTRL_SCRATCHMALLOC: {
+      void *pFree, **ppNew;
+      int sz;
+      sz = va_arg(ap, int);
+      ppNew = va_arg(ap, void**);
+      pFree = va_arg(ap, void*);
+      if( sz ) *ppNew = sqlite3ScratchMalloc(sz);
+      sqlite3ScratchFree(pFree);
+      break;
+    }
+
+  }
+  va_end(ap);
+#endif /* SQLITE_OMIT_BUILTIN_TEST */
+  return rc;
+}
+
+/************** End of main.c ************************************************/
+/************** Begin file notify.c ******************************************/
+/*
+** 2009 March 3
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+**
+** This file contains the implementation of the sqlite3_unlock_notify()
+** API method and its associated functionality.
+*/
+
+/* Omit this entire file if SQLITE_ENABLE_UNLOCK_NOTIFY is not defined. */
+#ifdef SQLITE_ENABLE_UNLOCK_NOTIFY
+
+/*
+** Public interfaces:
+**
+**   sqlite3ConnectionBlocked()
+**   sqlite3ConnectionUnlocked()
+**   sqlite3ConnectionClosed()
+**   sqlite3_unlock_notify()
+*/
+
+#define assertMutexHeld() \
+  assert( sqlite3_mutex_held(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER)) )
+
+/*
+** Head of a linked list of all sqlite3 objects created by this process
+** for which either sqlite3.pBlockingConnection or sqlite3.pUnlockConnection
+** is not NULL. This variable may only accessed while the STATIC_MASTER
+** mutex is held.
+*/
+static sqlite3 *SQLITE_WSD sqlite3BlockedList = 0;
+
+#ifndef NDEBUG
+/*
+** This function is a complex assert() that verifies the following 
+** properties of the blocked connections list:
+**
+**   1) Each entry in the list has a non-NULL value for either 
+**      pUnlockConnection or pBlockingConnection, or both.
+**
+**   2) All entries in the list that share a common value for 
+**      xUnlockNotify are grouped together.
+**
+**   3) If the argument db is not NULL, then none of the entries in the
+**      blocked connections list have pUnlockConnection or pBlockingConnection
+**      set to db. This is used when closing connection db.
+*/
+static void checkListProperties(sqlite3 *db){
+  sqlite3 *p;
+  for(p=sqlite3BlockedList; p; p=p->pNextBlocked){
+    int seen = 0;
+    sqlite3 *p2;
+
+    /* Verify property (1) */
+    assert( p->pUnlockConnection || p->pBlockingConnection );
+
+    /* Verify property (2) */
+    for(p2=sqlite3BlockedList; p2!=p; p2=p2->pNextBlocked){
+      if( p2->xUnlockNotify==p->xUnlockNotify ) seen = 1;
+      assert( p2->xUnlockNotify==p->xUnlockNotify || !seen );
+      assert( db==0 || p->pUnlockConnection!=db );
+      assert( db==0 || p->pBlockingConnection!=db );
+    }
+  }
+}
+#else
+# define checkListProperties(x)
+#endif
+
+/*
+** Remove connection db from the blocked connections list. If connection
+** db is not currently a part of the list, this function is a no-op.
+*/
+static void removeFromBlockedList(sqlite3 *db){
+  sqlite3 **pp;
+  assertMutexHeld();
+  for(pp=&sqlite3BlockedList; *pp; pp = &(*pp)->pNextBlocked){
+    if( *pp==db ){
+      *pp = (*pp)->pNextBlocked;
+      break;
+    }
+  }
+}
+
+/*
+** Add connection db to the blocked connections list. It is assumed
+** that it is not already a part of the list.
+*/
+static void addToBlockedList(sqlite3 *db){
+  sqlite3 **pp;
+  assertMutexHeld();
+  for(
+    pp=&sqlite3BlockedList; 
+    *pp && (*pp)->xUnlockNotify!=db->xUnlockNotify; 
+    pp=&(*pp)->pNextBlocked
+  );
+  db->pNextBlocked = *pp;
+  *pp = db;
+}
+
+/*
+** Obtain the STATIC_MASTER mutex.
+*/
+static void enterMutex(void){
+  sqlite3_mutex_enter(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+  checkListProperties(0);
+}
+
+/*
+** Release the STATIC_MASTER mutex.
+*/
+static void leaveMutex(void){
+  assertMutexHeld();
+  checkListProperties(0);
+  sqlite3_mutex_leave(sqlite3MutexAlloc(SQLITE_MUTEX_STATIC_MASTER));
+}
+
+/*
+** Register an unlock-notify callback.
+**
+** This is called after connection "db" has attempted some operation
+** but has received an SQLITE_LOCKED error because another connection
+** (call it pOther) in the same process was busy using the same shared
+** cache.  pOther is found by looking at db->pBlockingConnection.
+**
+** If there is no blocking connection, the callback is invoked immediately,
+** before this routine returns.
+**
+** If pOther is already blocked on db, then report SQLITE_LOCKED, to indicate
+** a deadlock.
+**
+** Otherwise, make arrangements to invoke xNotify when pOther drops
+** its locks.
+**
+** Each call to this routine overrides any prior callbacks registered
+** on the same "db".  If xNotify==0 then any prior callbacks are immediately
+** cancelled.
+*/
+SQLITE_API int sqlite3_unlock_notify(
+  sqlite3 *db,
+  void (*xNotify)(void **, int),
+  void *pArg
+){
+  int rc = SQLITE_OK;
+
+  sqlite3_mutex_enter(db->mutex);
+  enterMutex();
+
+  if( xNotify==0 ){
+    removeFromBlockedList(db);
+    db->pBlockingConnection = 0;
+    db->pUnlockConnection = 0;
+    db->xUnlockNotify = 0;
+    db->pUnlockArg = 0;
+  }else if( 0==db->pBlockingConnection ){
+    /* The blocking transaction has been concluded. Or there never was a 
+    ** blocking transaction. In either case, invoke the notify callback
+    ** immediately. 
+    */
+    xNotify(&pArg, 1);
+  }else{
+    sqlite3 *p;
+
+    for(p=db->pBlockingConnection; p && p!=db; p=p->pUnlockConnection){}
+    if( p ){
+      rc = SQLITE_LOCKED;              /* Deadlock detected. */
+    }else{
+      db->pUnlockConnection = db->pBlockingConnection;
+      db->xUnlockNotify = xNotify;
+      db->pUnlockArg = pArg;
+      removeFromBlockedList(db);
+      addToBlockedList(db);
+    }
+  }
+
+  leaveMutex();
+  assert( !db->mallocFailed );
+  sqlite3Error(db, rc, (rc?"database is deadlocked":0));
+  sqlite3_mutex_leave(db->mutex);
+  return rc;
+}
+
+/*
+** This function is called while stepping or preparing a statement 
+** associated with connection db. The operation will return SQLITE_LOCKED
+** to the user because it requires a lock that will not be available
+** until connection pBlocker concludes its current transaction.
+*/
+SQLITE_PRIVATE void sqlite3ConnectionBlocked(sqlite3 *db, sqlite3 *pBlocker){
+  enterMutex();
+  if( db->pBlockingConnection==0 && db->pUnlockConnection==0 ){
+    addToBlockedList(db);
+  }
+  db->pBlockingConnection = pBlocker;
+  leaveMutex();
+}
+
+/*
+** This function is called when
+** the transaction opened by database db has just finished. Locks held 
+** by database connection db have been released.
+**
+** This function loops through each entry in the blocked connections
+** list and does the following:
+**
+**   1) If the sqlite3.pBlockingConnection member of a list entry is
+**      set to db, then set pBlockingConnection=0.
+**
+**   2) If the sqlite3.pUnlockConnection member of a list entry is
+**      set to db, then invoke the configured unlock-notify callback and
+**      set pUnlockConnection=0.
+**
+**   3) If the two steps above mean that pBlockingConnection==0 and
+**      pUnlockConnection==0, remove the entry from the blocked connections
+**      list.
+*/
+SQLITE_PRIVATE void sqlite3ConnectionUnlocked(sqlite3 *db){
+  void (*xUnlockNotify)(void **, int) = 0; /* Unlock-notify cb to invoke */
+  int nArg = 0;                            /* Number of entries in aArg[] */
+  sqlite3 **pp;                            /* Iterator variable */
+  void **aArg;               /* Arguments to the unlock callback */
+  void **aDyn = 0;           /* Dynamically allocated space for aArg[] */
+  void *aStatic[16];         /* Starter space for aArg[].  No malloc required */
+
+  aArg = aStatic;
+  enterMutex();         /* Enter STATIC_MASTER mutex */
+
+  /* This loop runs once for each entry in the blocked-connections list. */
+  for(pp=&sqlite3BlockedList; *pp; /* no-op */ ){
+    sqlite3 *p = *pp;
+
+    /* Step 1. */
+    if( p->pBlockingConnection==db ){
+      p->pBlockingConnection = 0;
+    }
+
+    /* Step 2. */
+    if( p->pUnlockConnection==db ){
+      assert( p->xUnlockNotify );
+      if( p->xUnlockNotify!=xUnlockNotify && nArg!=0 ){
+        xUnlockNotify(aArg, nArg);
+        nArg = 0;
+      }
+
+      sqlite3BeginBenignMalloc();
+      assert( aArg==aDyn || (aDyn==0 && aArg==aStatic) );
+      assert( nArg<=(int)ArraySize(aStatic) || aArg==aDyn );
+      if( (!aDyn && nArg==(int)ArraySize(aStatic))
+       || (aDyn && nArg==(int)(sqlite3MallocSize(aDyn)/sizeof(void*)))
+      ){
+        /* The aArg[] array needs to grow. */
+        void **pNew = (void **)sqlite3Malloc(nArg*sizeof(void *)*2);
+        if( pNew ){
+          memcpy(pNew, aArg, nArg*sizeof(void *));
+          sqlite3_free(aDyn);
+          aDyn = aArg = pNew;
+        }else{
+          /* This occurs when the array of context pointers that need to
+          ** be passed to the unlock-notify callback is larger than the
+          ** aStatic[] array allocated on the stack and the attempt to 
+          ** allocate a larger array from the heap has failed.
+          **
+          ** This is a difficult situation to handle. Returning an error
+          ** code to the caller is insufficient, as even if an error code
+          ** is returned the transaction on connection db will still be
+          ** closed and the unlock-notify callbacks on blocked connections
+          ** will go unissued. This might cause the application to wait
+          ** indefinitely for an unlock-notify callback that will never 
+          ** arrive.
+          **
+          ** Instead, invoke the unlock-notify callback with the context
+          ** array already accumulated. We can then clear the array and
+          ** begin accumulating any further context pointers without 
+          ** requiring any dynamic allocation. This is sub-optimal because
+          ** it means that instead of one callback with a large array of
+          ** context pointers the application will receive two or more
+          ** callbacks with smaller arrays of context pointers, which will
+          ** reduce the applications ability to prioritize multiple 
+          ** connections. But it is the best that can be done under the
+          ** circumstances.
+          */
+          xUnlockNotify(aArg, nArg);
+          nArg = 0;
+        }
+      }
+      sqlite3EndBenignMalloc();
+
+      aArg[nArg++] = p->pUnlockArg;
+      xUnlockNotify = p->xUnlockNotify;
+      p->pUnlockConnection = 0;
+      p->xUnlockNotify = 0;
+      p->pUnlockArg = 0;
+    }
+
+    /* Step 3. */
+    if( p->pBlockingConnection==0 && p->pUnlockConnection==0 ){
+      /* Remove connection p from the blocked connections list. */
+      *pp = p->pNextBlocked;
+      p->pNextBlocked = 0;
+    }else{
+      pp = &p->pNextBlocked;
+    }
+  }
+
+  if( nArg!=0 ){
+    xUnlockNotify(aArg, nArg);
+  }
+  sqlite3_free(aDyn);
+  leaveMutex();         /* Leave STATIC_MASTER mutex */
+}
+
+/*
+** This is called when the database connection passed as an argument is 
+** being closed. The connection is removed from the blocked list.
+*/
+SQLITE_PRIVATE void sqlite3ConnectionClosed(sqlite3 *db){
+  sqlite3ConnectionUnlocked(db);
+  enterMutex();
+  removeFromBlockedList(db);
+  checkListProperties(db);
+  leaveMutex();
+}
+#endif
+
+/************** End of notify.c **********************************************/
+/************** Begin file fts3.c ********************************************/
+/*
+** 2006 Oct 10
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This is an SQLite module implementing full-text search.
+*/
+
+/*
+** The code in this file is only compiled if:
+**
+**     * The FTS3 module is being built as an extension
+**       (in which case SQLITE_CORE is not defined), or
+**
+**     * The FTS3 module is being built into the core of
+**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
+*/
+
+/* The full-text index is stored in a series of b+tree (-like)
+** structures called segments which map terms to doclists.  The
+** structures are like b+trees in layout, but are constructed from the
+** bottom up in optimal fashion and are not updatable.  Since trees
+** are built from the bottom up, things will be described from the
+** bottom up.
+**
+**
+**** Varints ****
+** The basic unit of encoding is a variable-length integer called a
+** varint.  We encode variable-length integers in little-endian order
+** using seven bits * per byte as follows:
+**
+** KEY:
+**         A = 0xxxxxxx    7 bits of data and one flag bit
+**         B = 1xxxxxxx    7 bits of data and one flag bit
+**
+**  7 bits - A
+** 14 bits - BA
+** 21 bits - BBA
+** and so on.
+**
+** This is similar in concept to how sqlite encodes "varints" but
+** the encoding is not the same.  SQLite varints are big-endian
+** are are limited to 9 bytes in length whereas FTS3 varints are
+** little-endian and can be up to 10 bytes in length (in theory).
+**
+** Example encodings:
+**
+**     1:    0x01
+**   127:    0x7f
+**   128:    0x81 0x00
+**
+**
+**** Document lists ****
+** A doclist (document list) holds a docid-sorted list of hits for a
+** given term.  Doclists hold docids and associated token positions.
+** A docid is the unique integer identifier for a single document.
+** A position is the index of a word within the document.  The first 
+** word of the document has a position of 0.
+**
+** FTS3 used to optionally store character offsets using a compile-time
+** option.  But that functionality is no longer supported.
+**
+** A doclist is stored like this:
+**
+** array {
+**   varint docid;
+**   array {                (position list for column 0)
+**     varint position;     (2 more than the delta from previous position)
+**   }
+**   array {
+**     varint POS_COLUMN;   (marks start of position list for new column)
+**     varint column;       (index of new column)
+**     array {
+**       varint position;   (2 more than the delta from previous position)
+**     }
+**   }
+**   varint POS_END;        (marks end of positions for this document.
+** }
+**
+** Here, array { X } means zero or more occurrences of X, adjacent in
+** memory.  A "position" is an index of a token in the token stream
+** generated by the tokenizer. Note that POS_END and POS_COLUMN occur 
+** in the same logical place as the position element, and act as sentinals
+** ending a position list array.  POS_END is 0.  POS_COLUMN is 1.
+** The positions numbers are not stored literally but rather as two more
+** than the difference from the prior position, or the just the position plus
+** 2 for the first position.  Example:
+**
+**   label:       A B C D E  F  G H   I  J K
+**   value:     123 5 9 1 1 14 35 0 234 72 0
+**
+** The 123 value is the first docid.  For column zero in this document
+** there are two matches at positions 3 and 10 (5-2 and 9-2+3).  The 1
+** at D signals the start of a new column; the 1 at E indicates that the
+** new column is column number 1.  There are two positions at 12 and 45
+** (14-2 and 35-2+12).  The 0 at H indicate the end-of-document.  The
+** 234 at I is the next docid.  It has one position 72 (72-2) and then
+** terminates with the 0 at K.
+**
+** A "position-list" is the list of positions for multiple columns for
+** a single docid.  A "column-list" is the set of positions for a single
+** column.  Hence, a position-list consists of one or more column-lists,
+** a document record consists of a docid followed by a position-list and
+** a doclist consists of one or more document records.
+**
+** A bare doclist omits the position information, becoming an 
+** array of varint-encoded docids.
+**
+**** Segment leaf nodes ****
+** Segment leaf nodes store terms and doclists, ordered by term.  Leaf
+** nodes are written using LeafWriter, and read using LeafReader (to
+** iterate through a single leaf node's data) and LeavesReader (to
+** iterate through a segment's entire leaf layer).  Leaf nodes have
+** the format:
+**
+** varint iHeight;             (height from leaf level, always 0)
+** varint nTerm;               (length of first term)
+** char pTerm[nTerm];          (content of first term)
+** varint nDoclist;            (length of term's associated doclist)
+** char pDoclist[nDoclist];    (content of doclist)
+** array {
+**                             (further terms are delta-encoded)
+**   varint nPrefix;           (length of prefix shared with previous term)
+**   varint nSuffix;           (length of unshared suffix)
+**   char pTermSuffix[nSuffix];(unshared suffix of next term)
+**   varint nDoclist;          (length of term's associated doclist)
+**   char pDoclist[nDoclist];  (content of doclist)
+** }
+**
+** Here, array { X } means zero or more occurrences of X, adjacent in
+** memory.
+**
+** Leaf nodes are broken into blocks which are stored contiguously in
+** the %_segments table in sorted order.  This means that when the end
+** of a node is reached, the next term is in the node with the next
+** greater node id.
+**
+** New data is spilled to a new leaf node when the current node
+** exceeds LEAF_MAX bytes (default 2048).  New data which itself is
+** larger than STANDALONE_MIN (default 1024) is placed in a standalone
+** node (a leaf node with a single term and doclist).  The goal of
+** these settings is to pack together groups of small doclists while
+** making it efficient to directly access large doclists.  The
+** assumption is that large doclists represent terms which are more
+** likely to be query targets.
+**
+** TODO(shess) It may be useful for blocking decisions to be more
+** dynamic.  For instance, it may make more sense to have a 2.5k leaf
+** node rather than splitting into 2k and .5k nodes.  My intuition is
+** that this might extend through 2x or 4x the pagesize.
+**
+**
+**** Segment interior nodes ****
+** Segment interior nodes store blockids for subtree nodes and terms
+** to describe what data is stored by the each subtree.  Interior
+** nodes are written using InteriorWriter, and read using
+** InteriorReader.  InteriorWriters are created as needed when
+** SegmentWriter creates new leaf nodes, or when an interior node
+** itself grows too big and must be split.  The format of interior
+** nodes:
+**
+** varint iHeight;           (height from leaf level, always >0)
+** varint iBlockid;          (block id of node's leftmost subtree)
+** optional {
+**   varint nTerm;           (length of first term)
+**   char pTerm[nTerm];      (content of first term)
+**   array {
+**                                (further terms are delta-encoded)
+**     varint nPrefix;            (length of shared prefix with previous term)
+**     varint nSuffix;            (length of unshared suffix)
+**     char pTermSuffix[nSuffix]; (unshared suffix of next term)
+**   }
+** }
+**
+** Here, optional { X } means an optional element, while array { X }
+** means zero or more occurrences of X, adjacent in memory.
+**
+** An interior node encodes n terms separating n+1 subtrees.  The
+** subtree blocks are contiguous, so only the first subtree's blockid
+** is encoded.  The subtree at iBlockid will contain all terms less
+** than the first term encoded (or all terms if no term is encoded).
+** Otherwise, for terms greater than or equal to pTerm[i] but less
+** than pTerm[i+1], the subtree for that term will be rooted at
+** iBlockid+i.  Interior nodes only store enough term data to
+** distinguish adjacent children (if the rightmost term of the left
+** child is "something", and the leftmost term of the right child is
+** "wicked", only "w" is stored).
+**
+** New data is spilled to a new interior node at the same height when
+** the current node exceeds INTERIOR_MAX bytes (default 2048).
+** INTERIOR_MIN_TERMS (default 7) keeps large terms from monopolizing
+** interior nodes and making the tree too skinny.  The interior nodes
+** at a given height are naturally tracked by interior nodes at
+** height+1, and so on.
+**
+**
+**** Segment directory ****
+** The segment directory in table %_segdir stores meta-information for
+** merging and deleting segments, and also the root node of the
+** segment's tree.
+**
+** The root node is the top node of the segment's tree after encoding
+** the entire segment, restricted to ROOT_MAX bytes (default 1024).
+** This could be either a leaf node or an interior node.  If the top
+** node requires more than ROOT_MAX bytes, it is flushed to %_segments
+** and a new root interior node is generated (which should always fit
+** within ROOT_MAX because it only needs space for 2 varints, the
+** height and the blockid of the previous root).
+**
+** The meta-information in the segment directory is:
+**   level               - segment level (see below)
+**   idx                 - index within level
+**                       - (level,idx uniquely identify a segment)
+**   start_block         - first leaf node
+**   leaves_end_block    - last leaf node
+**   end_block           - last block (including interior nodes)
+**   root                - contents of root node
+**
+** If the root node is a leaf node, then start_block,
+** leaves_end_block, and end_block are all 0.
+**
+**
+**** Segment merging ****
+** To amortize update costs, segments are grouped into levels and
+** merged in batches.  Each increase in level represents exponentially
+** more documents.
+**
+** New documents (actually, document updates) are tokenized and
+** written individually (using LeafWriter) to a level 0 segment, with
+** incrementing idx.  When idx reaches MERGE_COUNT (default 16), all
+** level 0 segments are merged into a single level 1 segment.  Level 1
+** is populated like level 0, and eventually MERGE_COUNT level 1
+** segments are merged to a single level 2 segment (representing
+** MERGE_COUNT^2 updates), and so on.
+**
+** A segment merge traverses all segments at a given level in
+** parallel, performing a straightforward sorted merge.  Since segment
+** leaf nodes are written in to the %_segments table in order, this
+** merge traverses the underlying sqlite disk structures efficiently.
+** After the merge, all segment blocks from the merged level are
+** deleted.
+**
+** MERGE_COUNT controls how often we merge segments.  16 seems to be
+** somewhat of a sweet spot for insertion performance.  32 and 64 show
+** very similar performance numbers to 16 on insertion, though they're
+** a tiny bit slower (perhaps due to more overhead in merge-time
+** sorting).  8 is about 20% slower than 16, 4 about 50% slower than
+** 16, 2 about 66% slower than 16.
+**
+** At query time, high MERGE_COUNT increases the number of segments
+** which need to be scanned and merged.  For instance, with 100k docs
+** inserted:
+**
+**    MERGE_COUNT   segments
+**       16           25
+**        8           12
+**        4           10
+**        2            6
+**
+** This appears to have only a moderate impact on queries for very
+** frequent terms (which are somewhat dominated by segment merge
+** costs), and infrequent and non-existent terms still seem to be fast
+** even with many segments.
+**
+** TODO(shess) That said, it would be nice to have a better query-side
+** argument for MERGE_COUNT of 16.  Also, it is possible/likely that
+** optimizations to things like doclist merging will swing the sweet
+** spot around.
+**
+**
+**
+**** Handling of deletions and updates ****
+** Since we're using a segmented structure, with no docid-oriented
+** index into the term index, we clearly cannot simply update the term
+** index when a document is deleted or updated.  For deletions, we
+** write an empty doclist (varint(docid) varint(POS_END)), for updates
+** we simply write the new doclist.  Segment merges overwrite older
+** data for a particular docid with newer data, so deletes or updates
+** will eventually overtake the earlier data and knock it out.  The
+** query logic likewise merges doclists so that newer data knocks out
+** older data.
+**
+** TODO(shess) Provide a VACUUM type operation to clear out all
+** deletions and duplications.  This would basically be a forced merge
+** into a single segment.
+*/
+
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
+#if defined(SQLITE_ENABLE_FTS3) && !defined(SQLITE_CORE)
+# define SQLITE_CORE 1
+#endif
+
+/************** Include fts3Int.h in the middle of fts3.c ********************/
+/************** Begin file fts3Int.h *****************************************/
+/*
+** 2009 Nov 12
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+*/
+
+#ifndef _FTSINT_H
+#define _FTSINT_H
+
+#if !defined(NDEBUG) && !defined(SQLITE_DEBUG) 
+# define NDEBUG 1
+#endif
+
+/************** Include fts3_tokenizer.h in the middle of fts3Int.h **********/
+/************** Begin file fts3_tokenizer.h **********************************/
+/*
+** 2006 July 10
+**
+** The author disclaims copyright to this source code.
+**
+*************************************************************************
+** Defines the interface to tokenizers used by fulltext-search.  There
+** are three basic components:
+**
+** sqlite3_tokenizer_module is a singleton defining the tokenizer
+** interface functions.  This is essentially the class structure for
+** tokenizers.
+**
+** sqlite3_tokenizer is used to define a particular tokenizer, perhaps
+** including customization information defined at creation time.
+**
+** sqlite3_tokenizer_cursor is generated by a tokenizer to generate
+** tokens from a particular input.
+*/
+#ifndef _FTS3_TOKENIZER_H_
+#define _FTS3_TOKENIZER_H_
+
+/* TODO(shess) Only used for SQLITE_OK and SQLITE_DONE at this time.
+** If tokenizers are to be allowed to call sqlite3_*() functions, then
+** we will need a way to register the API consistently.
+*/
+
+/*
+** Structures used by the tokenizer interface. When a new tokenizer
+** implementation is registered, the caller provides a pointer to
+** an sqlite3_tokenizer_module containing pointers to the callback
+** functions that make up an implementation.
+**
+** When an fts3 table is created, it passes any arguments passed to
+** the tokenizer clause of the CREATE VIRTUAL TABLE statement to the
+** sqlite3_tokenizer_module.xCreate() function of the requested tokenizer
+** implementation. The xCreate() function in turn returns an 
+** sqlite3_tokenizer structure representing the specific tokenizer to
+** be used for the fts3 table (customized by the tokenizer clause arguments).
+**
+** To tokenize an input buffer, the sqlite3_tokenizer_module.xOpen()
+** method is called. It returns an sqlite3_tokenizer_cursor object
+** that may be used to tokenize a specific input buffer based on
+** the tokenization rules supplied by a specific sqlite3_tokenizer
+** object.
+*/
+typedef struct sqlite3_tokenizer_module sqlite3_tokenizer_module;
+typedef struct sqlite3_tokenizer sqlite3_tokenizer;
+typedef struct sqlite3_tokenizer_cursor sqlite3_tokenizer_cursor;
+
+struct sqlite3_tokenizer_module {
+
+  /*
+  ** Structure version. Should always be set to 0.
+  */
+  int iVersion;
+
+  /*
+  ** Create a new tokenizer. The values in the argv[] array are the
+  ** arguments passed to the "tokenizer" clause of the CREATE VIRTUAL
+  ** TABLE statement that created the fts3 table. For example, if
+  ** the following SQL is executed:
+  **
+  **   CREATE .. USING fts3( ... , tokenizer <tokenizer-name> arg1 arg2)
+  **
+  ** then argc is set to 2, and the argv[] array contains pointers
+  ** to the strings "arg1" and "arg2".
+  **
+  ** This method should return either SQLITE_OK (0), or an SQLite error 
+  ** code. If SQLITE_OK is returned, then *ppTokenizer should be set
+  ** to point at the newly created tokenizer structure. The generic
+  ** sqlite3_tokenizer.pModule variable should not be initialised by
+  ** this callback. The caller will do so.
+  */
+  int (*xCreate)(
+    int argc,                           /* Size of argv array */
+    const char *const*argv,             /* Tokenizer argument strings */
+    sqlite3_tokenizer **ppTokenizer     /* OUT: Created tokenizer */
+  );
+
+  /*
+  ** Destroy an existing tokenizer. The fts3 module calls this method
+  ** exactly once for each successful call to xCreate().
+  */
+  int (*xDestroy)(sqlite3_tokenizer *pTokenizer);
+
+  /*
+  ** Create a tokenizer cursor to tokenize an input buffer. The caller
+  ** is responsible for ensuring that the input buffer remains valid
+  ** until the cursor is closed (using the xClose() method). 
+  */
+  int (*xOpen)(
+    sqlite3_tokenizer *pTokenizer,       /* Tokenizer object */
+    const char *pInput, int nBytes,      /* Input buffer */
+    sqlite3_tokenizer_cursor **ppCursor  /* OUT: Created tokenizer cursor */
+  );
+
+  /*
+  ** Destroy an existing tokenizer cursor. The fts3 module calls this 
+  ** method exactly once for each successful call to xOpen().
+  */
+  int (*xClose)(sqlite3_tokenizer_cursor *pCursor);
+
+  /*
+  ** Retrieve the next token from the tokenizer cursor pCursor. This
+  ** method should either return SQLITE_OK and set the values of the
+  ** "OUT" variables identified below, or SQLITE_DONE to indicate that
+  ** the end of the buffer has been reached, or an SQLite error code.
+  **
+  ** *ppToken should be set to point at a buffer containing the 
+  ** normalized version of the token (i.e. after any case-folding and/or
+  ** stemming has been performed). *pnBytes should be set to the length
+  ** of this buffer in bytes. The input text that generated the token is
+  ** identified by the byte offsets returned in *piStartOffset and
+  ** *piEndOffset. *piStartOffset should be set to the index of the first
+  ** byte of the token in the input buffer. *piEndOffset should be set
+  ** to the index of the first byte just past the end of the token in
+  ** the input buffer.
+  **
+  ** The buffer *ppToken is set to point at is managed by the tokenizer
+  ** implementation. It is only required to be valid until the next call
+  ** to xNext() or xClose(). 
+  */
+  /* TODO(shess) current implementation requires pInput to be
+  ** nul-terminated.  This should either be fixed, or pInput/nBytes
+  ** should be converted to zInput.
+  */
+  int (*xNext)(
+    sqlite3_tokenizer_cursor *pCursor,   /* Tokenizer cursor */
+    const char **ppToken, int *pnBytes,  /* OUT: Normalized text for token */
+    int *piStartOffset,  /* OUT: Byte offset of token in input buffer */
+    int *piEndOffset,    /* OUT: Byte offset of end of token in input buffer */
+    int *piPosition      /* OUT: Number of tokens returned before this one */
+  );
+};
+
+struct sqlite3_tokenizer {
+  const sqlite3_tokenizer_module *pModule;  /* The module for this tokenizer */
+  /* Tokenizer implementations will typically add additional fields */
+};
+
+struct sqlite3_tokenizer_cursor {
+  sqlite3_tokenizer *pTokenizer;       /* Tokenizer for this cursor. */
+  /* Tokenizer implementations will typically add additional fields */
+};
+
+int fts3_global_term_cnt(int iTerm, int iCol);
+int fts3_term_cnt(int iTerm, int iCol);
+
+
+#endif /* _FTS3_TOKENIZER_H_ */
+
+/************** End of fts3_tokenizer.h **************************************/
+/************** Continuing where we left off in fts3Int.h ********************/
+/************** Include fts3_hash.h in the middle of fts3Int.h ***************/
+/************** Begin file fts3_hash.h ***************************************/
+/*
+** 2001 September 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This is the header file for the generic hash-table implemenation
+** used in SQLite.  We've modified it slightly to serve as a standalone
+** hash table implementation for the full-text indexing module.
+**
+*/
+#ifndef _FTS3_HASH_H_
+#define _FTS3_HASH_H_
+
+/* Forward declarations of structures. */
+typedef struct Fts3Hash Fts3Hash;
+typedef struct Fts3HashElem Fts3HashElem;
+
+/* A complete hash table is an instance of the following structure.
+** The internals of this structure are intended to be opaque -- client
+** code should not attempt to access or modify the fields of this structure
+** directly.  Change this structure only by using the routines below.
+** However, many of the "procedures" and "functions" for modifying and
+** accessing this structure are really macros, so we can't really make
+** this structure opaque.
+*/
+struct Fts3Hash {
+  char keyClass;          /* HASH_INT, _POINTER, _STRING, _BINARY */
+  char copyKey;           /* True if copy of key made on insert */
+  int count;              /* Number of entries in this table */
+  Fts3HashElem *first;    /* The first element of the array */
+  int htsize;             /* Number of buckets in the hash table */
+  struct _fts3ht {        /* the hash table */
+    int count;               /* Number of entries with this hash */
+    Fts3HashElem *chain;     /* Pointer to first entry with this hash */
+  } *ht;
+};
+
+/* Each element in the hash table is an instance of the following 
+** structure.  All elements are stored on a single doubly-linked list.
+**
+** Again, this structure is intended to be opaque, but it can't really
+** be opaque because it is used by macros.
+*/
+struct Fts3HashElem {
+  Fts3HashElem *next, *prev; /* Next and previous elements in the table */
+  void *data;                /* Data associated with this element */
+  void *pKey; int nKey;      /* Key associated with this element */
+};
+
+/*
+** There are 2 different modes of operation for a hash table:
+**
+**   FTS3_HASH_STRING        pKey points to a string that is nKey bytes long
+**                           (including the null-terminator, if any).  Case
+**                           is respected in comparisons.
+**
+**   FTS3_HASH_BINARY        pKey points to binary data nKey bytes long. 
+**                           memcmp() is used to compare keys.
+**
+** A copy of the key is made if the copyKey parameter to fts3HashInit is 1.  
+*/
+#define FTS3_HASH_STRING    1
+#define FTS3_HASH_BINARY    2
+
+/*
+** Access routines.  To delete, insert a NULL pointer.
+*/
+SQLITE_PRIVATE void sqlite3Fts3HashInit(Fts3Hash *pNew, char keyClass, char copyKey);
+SQLITE_PRIVATE void *sqlite3Fts3HashInsert(Fts3Hash*, const void *pKey, int nKey, void *pData);
+SQLITE_PRIVATE void *sqlite3Fts3HashFind(const Fts3Hash*, const void *pKey, int nKey);
+SQLITE_PRIVATE void sqlite3Fts3HashClear(Fts3Hash*);
+SQLITE_PRIVATE Fts3HashElem *sqlite3Fts3HashFindElem(const Fts3Hash *, const void *, int);
+
+/*
+** Shorthand for the functions above
+*/
+#define fts3HashInit     sqlite3Fts3HashInit
+#define fts3HashInsert   sqlite3Fts3HashInsert
+#define fts3HashFind     sqlite3Fts3HashFind
+#define fts3HashClear    sqlite3Fts3HashClear
+#define fts3HashFindElem sqlite3Fts3HashFindElem
+
+/*
+** Macros for looping over all elements of a hash table.  The idiom is
+** like this:
+**
+**   Fts3Hash h;
+**   Fts3HashElem *p;
+**   ...
+**   for(p=fts3HashFirst(&h); p; p=fts3HashNext(p)){
+**     SomeStructure *pData = fts3HashData(p);
+**     // do something with pData
+**   }
+*/
+#define fts3HashFirst(H)  ((H)->first)
+#define fts3HashNext(E)   ((E)->next)
+#define fts3HashData(E)   ((E)->data)
+#define fts3HashKey(E)    ((E)->pKey)
+#define fts3HashKeysize(E) ((E)->nKey)
+
+/*
+** Number of entries in a hash table
+*/
+#define fts3HashCount(H)  ((H)->count)
+
+#endif /* _FTS3_HASH_H_ */
+
+/************** End of fts3_hash.h *******************************************/
+/************** Continuing where we left off in fts3Int.h ********************/
+
+/*
+** This constant controls how often segments are merged. Once there are
+** FTS3_MERGE_COUNT segments of level N, they are merged into a single
+** segment of level N+1.
+*/
+#define FTS3_MERGE_COUNT 16
+
+/*
+** This is the maximum amount of data (in bytes) to store in the 
+** Fts3Table.pendingTerms hash table. Normally, the hash table is
+** populated as documents are inserted/updated/deleted in a transaction
+** and used to create a new segment when the transaction is committed.
+** However if this limit is reached midway through a transaction, a new 
+** segment is created and the hash table cleared immediately.
+*/
+#define FTS3_MAX_PENDING_DATA (1*1024*1024)
+
+/*
+** Macro to return the number of elements in an array. SQLite has a
+** similar macro called ArraySize(). Use a different name to avoid
+** a collision when building an amalgamation with built-in FTS3.
+*/
+#define SizeofArray(X) ((int)(sizeof(X)/sizeof(X[0])))
+
+/*
+** Maximum length of a varint encoded integer. The varint format is different
+** from that used by SQLite, so the maximum length is 10, not 9.
+*/
+#define FTS3_VARINT_MAX 10
+
+/*
+** The testcase() macro is only used by the amalgamation.  If undefined,
+** make it a no-op.
+*/
+#ifndef testcase
+# define testcase(X)
+#endif
+
+/*
+** Terminator values for position-lists and column-lists.
+*/
+#define POS_COLUMN  (1)     /* Column-list terminator */
+#define POS_END     (0)     /* Position-list terminator */ 
+
+/*
+** This section provides definitions to allow the
+** FTS3 extension to be compiled outside of the 
+** amalgamation.
+*/
+#ifndef SQLITE_AMALGAMATION
+/*
+** Macros indicating that conditional expressions are always true or
+** false.
+*/
+#ifdef SQLITE_COVERAGE_TEST
+# define ALWAYS(x) (1)
+# define NEVER(X)  (0)
+#else
+# define ALWAYS(x) (x)
+# define NEVER(X)  (x)
+#endif
+
+/*
+** Internal types used by SQLite.
+*/
+typedef unsigned char u8;         /* 1-byte (or larger) unsigned integer */
+typedef short int i16;            /* 2-byte (or larger) signed integer */
+typedef unsigned int u32;         /* 4-byte unsigned integer */
+typedef sqlite3_uint64 u64;       /* 8-byte unsigned integer */
+/*
+** Macro used to suppress compiler warnings for unused parameters.
+*/
+#define UNUSED_PARAMETER(x) (void)(x)
+#endif
+
+typedef struct Fts3Table Fts3Table;
+typedef struct Fts3Cursor Fts3Cursor;
+typedef struct Fts3Expr Fts3Expr;
+typedef struct Fts3Phrase Fts3Phrase;
+typedef struct Fts3PhraseToken Fts3PhraseToken;
+
+typedef struct Fts3SegFilter Fts3SegFilter;
+typedef struct Fts3DeferredToken Fts3DeferredToken;
+typedef struct Fts3SegReader Fts3SegReader;
+typedef struct Fts3SegReaderCursor Fts3SegReaderCursor;
+
+/*
+** A connection to a fulltext index is an instance of the following
+** structure. The xCreate and xConnect methods create an instance
+** of this structure and xDestroy and xDisconnect free that instance.
+** All other methods receive a pointer to the structure as one of their
+** arguments.
+*/
+struct Fts3Table {
+  sqlite3_vtab base;              /* Base class used by SQLite core */
+  sqlite3 *db;                    /* The database connection */
+  const char *zDb;                /* logical database name */
+  const char *zName;              /* virtual table name */
+  int nColumn;                    /* number of named columns in virtual table */
+  char **azColumn;                /* column names.  malloced */
+  sqlite3_tokenizer *pTokenizer;  /* tokenizer for inserts and queries */
+
+  /* Precompiled statements used by the implementation. Each of these 
+  ** statements is run and reset within a single virtual table API call. 
+  */
+  sqlite3_stmt *aStmt[24];
+
+  char *zReadExprlist;
+  char *zWriteExprlist;
+
+  int nNodeSize;                  /* Soft limit for node size */
+  u8 bHasStat;                    /* True if %_stat table exists */
+  u8 bHasDocsize;                 /* True if %_docsize table exists */
+  int nPgsz;                      /* Page size for host database */
+  char *zSegmentsTbl;             /* Name of %_segments table */
+  sqlite3_blob *pSegments;        /* Blob handle open on %_segments table */
+
+  /* The following hash table is used to buffer pending index updates during
+  ** transactions. Variable nPendingData estimates the memory size of the 
+  ** pending data, including hash table overhead, but not malloc overhead. 
+  ** When nPendingData exceeds nMaxPendingData, the buffer is flushed 
+  ** automatically. Variable iPrevDocid is the docid of the most recently
+  ** inserted record.
+  */
+  int nMaxPendingData;
+  int nPendingData;
+  sqlite_int64 iPrevDocid;
+  Fts3Hash pendingTerms;
+};
+
+/*
+** When the core wants to read from the virtual table, it creates a
+** virtual table cursor (an instance of the following structure) using
+** the xOpen method. Cursors are destroyed using the xClose method.
+*/
+struct Fts3Cursor {
+  sqlite3_vtab_cursor base;       /* Base class used by SQLite core */
+  i16 eSearch;                    /* Search strategy (see below) */
+  u8 isEof;                       /* True if at End Of Results */
+  u8 isRequireSeek;               /* True if must seek pStmt to %_content row */
+  sqlite3_stmt *pStmt;            /* Prepared statement in use by the cursor */
+  Fts3Expr *pExpr;                /* Parsed MATCH query string */
+  int nPhrase;                    /* Number of matchable phrases in query */
+  Fts3DeferredToken *pDeferred;   /* Deferred search tokens, if any */
+  sqlite3_int64 iPrevId;          /* Previous id read from aDoclist */
+  char *pNextId;                  /* Pointer into the body of aDoclist */
+  char *aDoclist;                 /* List of docids for full-text queries */
+  int nDoclist;                   /* Size of buffer at aDoclist */
+  int eEvalmode;                  /* An FTS3_EVAL_XX constant */
+  int nRowAvg;                    /* Average size of database rows, in pages */
+
+  int isMatchinfoNeeded;          /* True when aMatchinfo[] needs filling in */
+  u32 *aMatchinfo;                /* Information about most recent match */
+  int nMatchinfo;                 /* Number of elements in aMatchinfo[] */
+  char *zMatchinfo;               /* Matchinfo specification */
+};
+
+#define FTS3_EVAL_FILTER    0
+#define FTS3_EVAL_NEXT      1
+#define FTS3_EVAL_MATCHINFO 2
+
+/*
+** The Fts3Cursor.eSearch member is always set to one of the following.
+** Actualy, Fts3Cursor.eSearch can be greater than or equal to
+** FTS3_FULLTEXT_SEARCH.  If so, then Fts3Cursor.eSearch - 2 is the index
+** of the column to be searched.  For example, in
+**
+**     CREATE VIRTUAL TABLE ex1 USING fts3(a,b,c,d);
+**     SELECT docid FROM ex1 WHERE b MATCH 'one two three';
+** 
+** Because the LHS of the MATCH operator is 2nd column "b",
+** Fts3Cursor.eSearch will be set to FTS3_FULLTEXT_SEARCH+1.  (+0 for a,
+** +1 for b, +2 for c, +3 for d.)  If the LHS of MATCH were "ex1" 
+** indicating that all columns should be searched,
+** then eSearch would be set to FTS3_FULLTEXT_SEARCH+4.
+*/
+#define FTS3_FULLSCAN_SEARCH 0    /* Linear scan of %_content table */
+#define FTS3_DOCID_SEARCH    1    /* Lookup by rowid on %_content table */
+#define FTS3_FULLTEXT_SEARCH 2    /* Full-text index search */
+
+/*
+** A "phrase" is a sequence of one or more tokens that must match in
+** sequence.  A single token is the base case and the most common case.
+** For a sequence of tokens contained in double-quotes (i.e. "one two three")
+** nToken will be the number of tokens in the string.
+**
+** The nDocMatch and nMatch variables contain data that may be used by the
+** matchinfo() function. They are populated when the full-text index is 
+** queried for hits on the phrase. If one or more tokens in the phrase
+** are deferred, the nDocMatch and nMatch variables are populated based
+** on the assumption that the 
+*/
+struct Fts3PhraseToken {
+  char *z;                        /* Text of the token */
+  int n;                          /* Number of bytes in buffer z */
+  int isPrefix;                   /* True if token ends with a "*" character */
+  int bFulltext;                  /* True if full-text index was used */
+  Fts3SegReaderCursor *pSegcsr;   /* Segment-reader for this token */
+  Fts3DeferredToken *pDeferred;   /* Deferred token object for this token */
+};
+
+struct Fts3Phrase {
+  /* Variables populated by fts3_expr.c when parsing a MATCH expression */
+  int nToken;                /* Number of tokens in the phrase */
+  int iColumn;               /* Index of column this phrase must match */
+  int isNot;                 /* Phrase prefixed by unary not (-) operator */
+  Fts3PhraseToken aToken[1]; /* One entry for each token in the phrase */
+};
+
+/*
+** A tree of these objects forms the RHS of a MATCH operator.
+**
+** If Fts3Expr.eType is either FTSQUERY_NEAR or FTSQUERY_PHRASE and isLoaded
+** is true, then aDoclist points to a malloced buffer, size nDoclist bytes, 
+** containing the results of the NEAR or phrase query in FTS3 doclist
+** format. As usual, the initial "Length" field found in doclists stored
+** on disk is omitted from this buffer.
+**
+** Variable pCurrent always points to the start of a docid field within
+** aDoclist. Since the doclist is usually scanned in docid order, this can
+** be used to accelerate seeking to the required docid within the doclist.
+*/
+struct Fts3Expr {
+  int eType;                 /* One of the FTSQUERY_XXX values defined below */
+  int nNear;                 /* Valid if eType==FTSQUERY_NEAR */
+  Fts3Expr *pParent;         /* pParent->pLeft==this or pParent->pRight==this */
+  Fts3Expr *pLeft;           /* Left operand */
+  Fts3Expr *pRight;          /* Right operand */
+  Fts3Phrase *pPhrase;       /* Valid if eType==FTSQUERY_PHRASE */
+
+  int isLoaded;              /* True if aDoclist/nDoclist are initialized. */
+  char *aDoclist;            /* Buffer containing doclist */
+  int nDoclist;              /* Size of aDoclist in bytes */
+
+  sqlite3_int64 iCurrent;
+  char *pCurrent;
+};
+
+/*
+** Candidate values for Fts3Query.eType. Note that the order of the first
+** four values is in order of precedence when parsing expressions. For 
+** example, the following:
+**
+**   "a OR b AND c NOT d NEAR e"
+**
+** is equivalent to:
+**
+**   "a OR (b AND (c NOT (d NEAR e)))"
+*/
+#define FTSQUERY_NEAR   1
+#define FTSQUERY_NOT    2
+#define FTSQUERY_AND    3
+#define FTSQUERY_OR     4
+#define FTSQUERY_PHRASE 5
+
+
+/* fts3_write.c */
+SQLITE_PRIVATE int sqlite3Fts3UpdateMethod(sqlite3_vtab*,int,sqlite3_value**,sqlite3_int64*);
+SQLITE_PRIVATE int sqlite3Fts3PendingTermsFlush(Fts3Table *);
+SQLITE_PRIVATE void sqlite3Fts3PendingTermsClear(Fts3Table *);
+SQLITE_PRIVATE int sqlite3Fts3Optimize(Fts3Table *);
+SQLITE_PRIVATE int sqlite3Fts3SegReaderNew(int, sqlite3_int64,
+  sqlite3_int64, sqlite3_int64, const char *, int, Fts3SegReader**);
+SQLITE_PRIVATE int sqlite3Fts3SegReaderPending(Fts3Table*,const char*,int,int,Fts3SegReader**);
+SQLITE_PRIVATE void sqlite3Fts3SegReaderFree(Fts3SegReader *);
+SQLITE_PRIVATE int sqlite3Fts3SegReaderCost(Fts3Cursor *, Fts3SegReader *, int *);
+SQLITE_PRIVATE int sqlite3Fts3AllSegdirs(Fts3Table*, int, sqlite3_stmt **);
+SQLITE_PRIVATE int sqlite3Fts3ReadLock(Fts3Table *);
+SQLITE_PRIVATE int sqlite3Fts3ReadBlock(Fts3Table*, sqlite3_int64, char **, int*);
+
+SQLITE_PRIVATE int sqlite3Fts3SelectDoctotal(Fts3Table *, sqlite3_stmt **);
+SQLITE_PRIVATE int sqlite3Fts3SelectDocsize(Fts3Table *, sqlite3_int64, sqlite3_stmt **);
+
+SQLITE_PRIVATE void sqlite3Fts3FreeDeferredTokens(Fts3Cursor *);
+SQLITE_PRIVATE int sqlite3Fts3DeferToken(Fts3Cursor *, Fts3PhraseToken *, int);
+SQLITE_PRIVATE int sqlite3Fts3CacheDeferredDoclists(Fts3Cursor *);
+SQLITE_PRIVATE void sqlite3Fts3FreeDeferredDoclists(Fts3Cursor *);
+SQLITE_PRIVATE char *sqlite3Fts3DeferredDoclist(Fts3DeferredToken *, int *);
+SQLITE_PRIVATE void sqlite3Fts3SegmentsClose(Fts3Table *);
+
+#define FTS3_SEGCURSOR_PENDING -1
+#define FTS3_SEGCURSOR_ALL     -2
+
+SQLITE_PRIVATE int sqlite3Fts3SegReaderStart(Fts3Table*, Fts3SegReaderCursor*, Fts3SegFilter*);
+SQLITE_PRIVATE int sqlite3Fts3SegReaderStep(Fts3Table *, Fts3SegReaderCursor *);
+SQLITE_PRIVATE void sqlite3Fts3SegReaderFinish(Fts3SegReaderCursor *);
+SQLITE_PRIVATE int sqlite3Fts3SegReaderCursor(
+    Fts3Table *, int, const char *, int, int, int, Fts3SegReaderCursor *);
+
+/* Flags allowed as part of the 4th argument to SegmentReaderIterate() */
+#define FTS3_SEGMENT_REQUIRE_POS   0x00000001
+#define FTS3_SEGMENT_IGNORE_EMPTY  0x00000002
+#define FTS3_SEGMENT_COLUMN_FILTER 0x00000004
+#define FTS3_SEGMENT_PREFIX        0x00000008
+#define FTS3_SEGMENT_SCAN          0x00000010
+
+/* Type passed as 4th argument to SegmentReaderIterate() */
+struct Fts3SegFilter {
+  const char *zTerm;
+  int nTerm;
+  int iCol;
+  int flags;
+};
+
+struct Fts3SegReaderCursor {
+  /* Used internally by sqlite3Fts3SegReaderXXX() calls */
+  Fts3SegReader **apSegment;      /* Array of Fts3SegReader objects */
+  int nSegment;                   /* Size of apSegment array */
+  int nAdvance;                   /* How many seg-readers to advance */
+  Fts3SegFilter *pFilter;         /* Pointer to filter object */
+  char *aBuffer;                  /* Buffer to merge doclists in */
+  int nBuffer;                    /* Allocated size of aBuffer[] in bytes */
+
+  /* Cost of running this iterator. Used by fts3.c only. */
+  int nCost;
+
+  /* Output values. Valid only after Fts3SegReaderStep() returns SQLITE_ROW. */
+  char *zTerm;                    /* Pointer to term buffer */
+  int nTerm;                      /* Size of zTerm in bytes */
+  char *aDoclist;                 /* Pointer to doclist buffer */
+  int nDoclist;                   /* Size of aDoclist[] in bytes */
+};
+
+/* fts3.c */
+SQLITE_PRIVATE int sqlite3Fts3PutVarint(char *, sqlite3_int64);
+SQLITE_PRIVATE int sqlite3Fts3GetVarint(const char *, sqlite_int64 *);
+SQLITE_PRIVATE int sqlite3Fts3GetVarint32(const char *, int *);
+SQLITE_PRIVATE int sqlite3Fts3VarintLen(sqlite3_uint64);
+SQLITE_PRIVATE void sqlite3Fts3Dequote(char *);
+
+SQLITE_PRIVATE char *sqlite3Fts3FindPositions(Fts3Expr *, sqlite3_int64, int);
+SQLITE_PRIVATE int sqlite3Fts3ExprLoadDoclist(Fts3Cursor *, Fts3Expr *);
+SQLITE_PRIVATE int sqlite3Fts3ExprLoadFtDoclist(Fts3Cursor *, Fts3Expr *, char **, int *);
+SQLITE_PRIVATE int sqlite3Fts3ExprNearTrim(Fts3Expr *, Fts3Expr *, int);
+
+/* fts3_tokenizer.c */
+SQLITE_PRIVATE const char *sqlite3Fts3NextToken(const char *, int *);
+SQLITE_PRIVATE int sqlite3Fts3InitHashTable(sqlite3 *, Fts3Hash *, const char *);
+SQLITE_PRIVATE int sqlite3Fts3InitTokenizer(Fts3Hash *pHash, const char *, 
+    sqlite3_tokenizer **, char **
+);
+SQLITE_PRIVATE int sqlite3Fts3IsIdChar(char);
+
+/* fts3_snippet.c */
+SQLITE_PRIVATE void sqlite3Fts3Offsets(sqlite3_context*, Fts3Cursor*);
+SQLITE_PRIVATE void sqlite3Fts3Snippet(sqlite3_context *, Fts3Cursor *, const char *,
+  const char *, const char *, int, int
+);
+SQLITE_PRIVATE void sqlite3Fts3Matchinfo(sqlite3_context *, Fts3Cursor *, const char *);
+
+/* fts3_expr.c */
+SQLITE_PRIVATE int sqlite3Fts3ExprParse(sqlite3_tokenizer *, 
+  char **, int, int, const char *, int, Fts3Expr **
+);
+SQLITE_PRIVATE void sqlite3Fts3ExprFree(Fts3Expr *);
+#ifdef SQLITE_TEST
+SQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3 *db);
+#endif
+
+/* fts3_aux.c */
+SQLITE_PRIVATE int sqlite3Fts3InitAux(sqlite3 *db);
+
+#endif /* _FTSINT_H */
+
+/************** End of fts3Int.h *********************************************/
+/************** Continuing where we left off in fts3.c ***********************/
+
+
+#ifndef SQLITE_CORE 
+  SQLITE_EXTENSION_INIT1
+#endif
+
+/* 
+** Write a 64-bit variable-length integer to memory starting at p[0].
+** The length of data written will be between 1 and FTS3_VARINT_MAX bytes.
+** The number of bytes written is returned.
+*/
+SQLITE_PRIVATE int sqlite3Fts3PutVarint(char *p, sqlite_int64 v){
+  unsigned char *q = (unsigned char *) p;
+  sqlite_uint64 vu = v;
+  do{
+    *q++ = (unsigned char) ((vu & 0x7f) | 0x80);
+    vu >>= 7;
+  }while( vu!=0 );
+  q[-1] &= 0x7f;  /* turn off high bit in final byte */
+  assert( q - (unsigned char *)p <= FTS3_VARINT_MAX );
+  return (int) (q - (unsigned char *)p);
+}
+
+/* 
+** Read a 64-bit variable-length integer from memory starting at p[0].
+** Return the number of bytes read, or 0 on error.
+** The value is stored in *v.
+*/
+SQLITE_PRIVATE int sqlite3Fts3GetVarint(const char *p, sqlite_int64 *v){
+  const unsigned char *q = (const unsigned char *) p;
+  sqlite_uint64 x = 0, y = 1;
+  while( (*q&0x80)==0x80 && q-(unsigned char *)p<FTS3_VARINT_MAX ){
+    x += y * (*q++ & 0x7f);
+    y <<= 7;
+  }
+  x += y * (*q++);
+  *v = (sqlite_int64) x;
+  return (int) (q - (unsigned char *)p);
+}
+
+/*
+** Similar to sqlite3Fts3GetVarint(), except that the output is truncated to a
+** 32-bit integer before it is returned.
+*/
+SQLITE_PRIVATE int sqlite3Fts3GetVarint32(const char *p, int *pi){
+ sqlite_int64 i;
+ int ret = sqlite3Fts3GetVarint(p, &i);
+ *pi = (int) i;
+ return ret;
+}
+
+/*
+** Return the number of bytes required to encode v as a varint
+*/
+SQLITE_PRIVATE int sqlite3Fts3VarintLen(sqlite3_uint64 v){
+  int i = 0;
+  do{
+    i++;
+    v >>= 7;
+  }while( v!=0 );
+  return i;
+}
+
+/*
+** Convert an SQL-style quoted string into a normal string by removing
+** the quote characters.  The conversion is done in-place.  If the
+** input does not begin with a quote character, then this routine
+** is a no-op.
+**
+** Examples:
+**
+**     "abc"   becomes   abc
+**     'xyz'   becomes   xyz
+**     [pqr]   becomes   pqr
+**     `mno`   becomes   mno
+**
+*/
+SQLITE_PRIVATE void sqlite3Fts3Dequote(char *z){
+  char quote;                     /* Quote character (if any ) */
+
+  quote = z[0];
+  if( quote=='[' || quote=='\'' || quote=='"' || quote=='`' ){
+    int iIn = 1;                  /* Index of next byte to read from input */
+    int iOut = 0;                 /* Index of next byte to write to output */
+
+    /* If the first byte was a '[', then the close-quote character is a ']' */
+    if( quote=='[' ) quote = ']';  
+
+    while( ALWAYS(z[iIn]) ){
+      if( z[iIn]==quote ){
+        if( z[iIn+1]!=quote ) break;
+        z[iOut++] = quote;
+        iIn += 2;
+      }else{
+        z[iOut++] = z[iIn++];
+      }
+    }
+    z[iOut] = '\0';
+  }
+}
+
+/*
+** Read a single varint from the doclist at *pp and advance *pp to point
+** to the first byte past the end of the varint.  Add the value of the varint
+** to *pVal.
+*/
+static void fts3GetDeltaVarint(char **pp, sqlite3_int64 *pVal){
+  sqlite3_int64 iVal;
+  *pp += sqlite3Fts3GetVarint(*pp, &iVal);
+  *pVal += iVal;
+}
+
+/*
+** As long as *pp has not reached its end (pEnd), then do the same
+** as fts3GetDeltaVarint(): read a single varint and add it to *pVal.
+** But if we have reached the end of the varint, just set *pp=0 and
+** leave *pVal unchanged.
+*/
+static void fts3GetDeltaVarint2(char **pp, char *pEnd, sqlite3_int64 *pVal){
+  if( *pp>=pEnd ){
+    *pp = 0;
+  }else{
+    fts3GetDeltaVarint(pp, pVal);
+  }
+}
+
+/*
+** The xDisconnect() virtual table method.
+*/
+static int fts3DisconnectMethod(sqlite3_vtab *pVtab){
+  Fts3Table *p = (Fts3Table *)pVtab;
+  int i;
+
+  assert( p->nPendingData==0 );
+  assert( p->pSegments==0 );
+
+  /* Free any prepared statements held */
+  for(i=0; i<SizeofArray(p->aStmt); i++){
+    sqlite3_finalize(p->aStmt[i]);
+  }
+  sqlite3_free(p->zSegmentsTbl);
+  sqlite3_free(p->zReadExprlist);
+  sqlite3_free(p->zWriteExprlist);
+
+  /* Invoke the tokenizer destructor to free the tokenizer. */
+  p->pTokenizer->pModule->xDestroy(p->pTokenizer);
+
+  sqlite3_free(p);
+  return SQLITE_OK;
+}
+
+/*
+** Construct one or more SQL statements from the format string given
+** and then evaluate those statements. The success code is written
+** into *pRc.
+**
+** If *pRc is initially non-zero then this routine is a no-op.
+*/
+static void fts3DbExec(
+  int *pRc,              /* Success code */
+  sqlite3 *db,           /* Database in which to run SQL */
+  const char *zFormat,   /* Format string for SQL */
+  ...                    /* Arguments to the format string */
+){
+  va_list ap;
+  char *zSql;
+  if( *pRc ) return;
+  va_start(ap, zFormat);
+  zSql = sqlite3_vmprintf(zFormat, ap);
+  va_end(ap);
+  if( zSql==0 ){
+    *pRc = SQLITE_NOMEM;
+  }else{
+    *pRc = sqlite3_exec(db, zSql, 0, 0, 0);
+    sqlite3_free(zSql);
+  }
+}
+
+/*
+** The xDestroy() virtual table method.
+*/
+static int fts3DestroyMethod(sqlite3_vtab *pVtab){
+  int rc = SQLITE_OK;              /* Return code */
+  Fts3Table *p = (Fts3Table *)pVtab;
+  sqlite3 *db = p->db;
+
+  /* Drop the shadow tables */
+  fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_content'", p->zDb, p->zName);
+  fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_segments'", p->zDb,p->zName);
+  fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_segdir'", p->zDb, p->zName);
+  fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_docsize'", p->zDb, p->zName);
+  fts3DbExec(&rc, db, "DROP TABLE IF EXISTS %Q.'%q_stat'", p->zDb, p->zName);
+
+  /* If everything has worked, invoke fts3DisconnectMethod() to free the
+  ** memory associated with the Fts3Table structure and return SQLITE_OK.
+  ** Otherwise, return an SQLite error code.
+  */
+  return (rc==SQLITE_OK ? fts3DisconnectMethod(pVtab) : rc);
+}
+
+
+/*
+** Invoke sqlite3_declare_vtab() to declare the schema for the FTS3 table
+** passed as the first argument. This is done as part of the xConnect()
+** and xCreate() methods.
+**
+** If *pRc is non-zero when this function is called, it is a no-op. 
+** Otherwise, if an error occurs, an SQLite error code is stored in *pRc
+** before returning.
+*/
+static void fts3DeclareVtab(int *pRc, Fts3Table *p){
+  if( *pRc==SQLITE_OK ){
+    int i;                        /* Iterator variable */
+    int rc;                       /* Return code */
+    char *zSql;                   /* SQL statement passed to declare_vtab() */
+    char *zCols;                  /* List of user defined columns */
+
+    /* Create a list of user columns for the virtual table */
+    zCols = sqlite3_mprintf("%Q, ", p->azColumn[0]);
+    for(i=1; zCols && i<p->nColumn; i++){
+      zCols = sqlite3_mprintf("%z%Q, ", zCols, p->azColumn[i]);
+    }
+
+    /* Create the whole "CREATE TABLE" statement to pass to SQLite */
+    zSql = sqlite3_mprintf(
+        "CREATE TABLE x(%s %Q HIDDEN, docid HIDDEN)", zCols, p->zName
+    );
+    if( !zCols || !zSql ){
+      rc = SQLITE_NOMEM;
+    }else{
+      rc = sqlite3_declare_vtab(p->db, zSql);
+    }
+
+    sqlite3_free(zSql);
+    sqlite3_free(zCols);
+    *pRc = rc;
+  }
+}
+
+/*
+** Create the backing store tables (%_content, %_segments and %_segdir)
+** required by the FTS3 table passed as the only argument. This is done
+** as part of the vtab xCreate() method.
+**
+** If the p->bHasDocsize boolean is true (indicating that this is an
+** FTS4 table, not an FTS3 table) then also create the %_docsize and
+** %_stat tables required by FTS4.
+*/
+static int fts3CreateTables(Fts3Table *p){
+  int rc = SQLITE_OK;             /* Return code */
+  int i;                          /* Iterator variable */
+  char *zContentCols;             /* Columns of %_content table */
+  sqlite3 *db = p->db;            /* The database connection */
+
+  /* Create a list of user columns for the content table */
+  zContentCols = sqlite3_mprintf("docid INTEGER PRIMARY KEY");
+  for(i=0; zContentCols && i<p->nColumn; i++){
+    char *z = p->azColumn[i];
+    zContentCols = sqlite3_mprintf("%z, 'c%d%q'", zContentCols, i, z);
+  }
+  if( zContentCols==0 ) rc = SQLITE_NOMEM;
+
+  /* Create the content table */
+  fts3DbExec(&rc, db, 
+     "CREATE TABLE %Q.'%q_content'(%s)",
+     p->zDb, p->zName, zContentCols
+  );
+  sqlite3_free(zContentCols);
+  /* Create other tables */
+  fts3DbExec(&rc, db, 
+      "CREATE TABLE %Q.'%q_segments'(blockid INTEGER PRIMARY KEY, block BLOB);",
+      p->zDb, p->zName
+  );
+  fts3DbExec(&rc, db, 
+      "CREATE TABLE %Q.'%q_segdir'("
+        "level INTEGER,"
+        "idx INTEGER,"
+        "start_block INTEGER,"
+        "leaves_end_block INTEGER,"
+        "end_block INTEGER,"
+        "root BLOB,"
+        "PRIMARY KEY(level, idx)"
+      ");",
+      p->zDb, p->zName
+  );
+  if( p->bHasDocsize ){
+    fts3DbExec(&rc, db, 
+        "CREATE TABLE %Q.'%q_docsize'(docid INTEGER PRIMARY KEY, size BLOB);",
+        p->zDb, p->zName
+    );
+  }
+  if( p->bHasStat ){
+    fts3DbExec(&rc, db, 
+        "CREATE TABLE %Q.'%q_stat'(id INTEGER PRIMARY KEY, value BLOB);",
+        p->zDb, p->zName
+    );
+  }
+  return rc;
+}
+
+/*
+** Store the current database page-size in bytes in p->nPgsz.
+**
+** If *pRc is non-zero when this function is called, it is a no-op. 
+** Otherwise, if an error occurs, an SQLite error code is stored in *pRc
+** before returning.
+*/
+static void fts3DatabasePageSize(int *pRc, Fts3Table *p){
+  if( *pRc==SQLITE_OK ){
+    int rc;                       /* Return code */
+    char *zSql;                   /* SQL text "PRAGMA %Q.page_size" */
+    sqlite3_stmt *pStmt;          /* Compiled "PRAGMA %Q.page_size" statement */
+  
+    zSql = sqlite3_mprintf("PRAGMA %Q.page_size", p->zDb);
+    if( !zSql ){
+      rc = SQLITE_NOMEM;
+    }else{
+      rc = sqlite3_prepare(p->db, zSql, -1, &pStmt, 0);
+      if( rc==SQLITE_OK ){
+        sqlite3_step(pStmt);
+        p->nPgsz = sqlite3_column_int(pStmt, 0);
+        rc = sqlite3_finalize(pStmt);
+      }
+    }
+    assert( p->nPgsz>0 || rc!=SQLITE_OK );
+    sqlite3_free(zSql);
+    *pRc = rc;
+  }
+}
+
+/*
+** "Special" FTS4 arguments are column specifications of the following form:
+**
+**   <key> = <value>
+**
+** There may not be whitespace surrounding the "=" character. The <value> 
+** term may be quoted, but the <key> may not.
+*/
+static int fts3IsSpecialColumn(
+  const char *z, 
+  int *pnKey,
+  char **pzValue
+){
+  char *zValue;
+  const char *zCsr = z;
+
+  while( *zCsr!='=' ){
+    if( *zCsr=='\0' ) return 0;
+    zCsr++;
+  }
+
+  *pnKey = (int)(zCsr-z);
+  zValue = sqlite3_mprintf("%s", &zCsr[1]);
+  if( zValue ){
+    sqlite3Fts3Dequote(zValue);
+  }
+  *pzValue = zValue;
+  return 1;
+}
+
+/*
+** Append the output of a printf() style formatting to an existing string.
+*/
+static void fts3Appendf(
+  int *pRc,                       /* IN/OUT: Error code */
+  char **pz,                      /* IN/OUT: Pointer to string buffer */
+  const char *zFormat,            /* Printf format string to append */
+  ...                             /* Arguments for printf format string */
+){
+  if( *pRc==SQLITE_OK ){
+    va_list ap;
+    char *z;
+    va_start(ap, zFormat);
+    z = sqlite3_vmprintf(zFormat, ap);
+    if( z && *pz ){
+      char *z2 = sqlite3_mprintf("%s%s", *pz, z);
+      sqlite3_free(z);
+      z = z2;
+    }
+    if( z==0 ) *pRc = SQLITE_NOMEM;
+    sqlite3_free(*pz);
+    *pz = z;
+  }
+}
+
+/*
+** Return a copy of input string zInput enclosed in double-quotes (") and
+** with all double quote characters escaped. For example:
+**
+**     fts3QuoteId("un \"zip\"")   ->    "un \"\"zip\"\""
+**
+** The pointer returned points to memory obtained from sqlite3_malloc(). It
+** is the callers responsibility to call sqlite3_free() to release this
+** memory.
+*/
+static char *fts3QuoteId(char const *zInput){
+  int nRet;
+  char *zRet;
+  nRet = 2 + strlen(zInput)*2 + 1;
+  zRet = sqlite3_malloc(nRet);
+  if( zRet ){
+    int i;
+    char *z = zRet;
+    *(z++) = '"';
+    for(i=0; zInput[i]; i++){
+      if( zInput[i]=='"' ) *(z++) = '"';
+      *(z++) = zInput[i];
+    }
+    *(z++) = '"';
+    *(z++) = '\0';
+  }
+  return zRet;
+}
+
+/*
+** Return a list of comma separated SQL expressions that could be used
+** in a SELECT statement such as the following:
+**
+**     SELECT <list of expressions> FROM %_content AS x ...
+**
+** to return the docid, followed by each column of text data in order
+** from left to write. If parameter zFunc is not NULL, then instead of
+** being returned directly each column of text data is passed to an SQL
+** function named zFunc first. For example, if zFunc is "unzip" and the
+** table has the three user-defined columns "a", "b", and "c", the following
+** string is returned:
+**
+**     "docid, unzip(x.'a'), unzip(x.'b'), unzip(x.'c')"
+**
+** The pointer returned points to a buffer allocated by sqlite3_malloc(). It
+** is the responsibility of the caller to eventually free it.
+**
+** If *pRc is not SQLITE_OK when this function is called, it is a no-op (and
+** a NULL pointer is returned). Otherwise, if an OOM error is encountered
+** by this function, NULL is returned and *pRc is set to SQLITE_NOMEM. If
+** no error occurs, *pRc is left unmodified.
+*/
+static char *fts3ReadExprList(Fts3Table *p, const char *zFunc, int *pRc){
+  char *zRet = 0;
+  char *zFree = 0;
+  char *zFunction;
+  int i;
+
+  if( !zFunc ){
+    zFunction = "";
+  }else{
+    zFree = zFunction = fts3QuoteId(zFunc);
+  }
+  fts3Appendf(pRc, &zRet, "docid");
+  for(i=0; i<p->nColumn; i++){
+    fts3Appendf(pRc, &zRet, ",%s(x.'c%d%q')", zFunction, i, p->azColumn[i]);
+  }
+  sqlite3_free(zFree);
+  return zRet;
+}
+
+/*
+** Return a list of N comma separated question marks, where N is the number
+** of columns in the %_content table (one for the docid plus one for each
+** user-defined text column).
+**
+** If argument zFunc is not NULL, then all but the first question mark
+** is preceded by zFunc and an open bracket, and followed by a closed
+** bracket. For example, if zFunc is "zip" and the FTS3 table has three 
+** user-defined text columns, the following string is returned:
+**
+**     "?, zip(?), zip(?), zip(?)"
+**
+** The pointer returned points to a buffer allocated by sqlite3_malloc(). It
+** is the responsibility of the caller to eventually free it.
+**
+** If *pRc is not SQLITE_OK when this function is called, it is a no-op (and
+** a NULL pointer is returned). Otherwise, if an OOM error is encountered
+** by this function, NULL is returned and *pRc is set to SQLITE_NOMEM. If
+** no error occurs, *pRc is left unmodified.
+*/
+static char *fts3WriteExprList(Fts3Table *p, const char *zFunc, int *pRc){
+  char *zRet = 0;
+  char *zFree = 0;
+  char *zFunction;
+  int i;
+
+  if( !zFunc ){
+    zFunction = "";
+  }else{
+    zFree = zFunction = fts3QuoteId(zFunc);
+  }
+  fts3Appendf(pRc, &zRet, "?");
+  for(i=0; i<p->nColumn; i++){
+    fts3Appendf(pRc, &zRet, ",%s(?)", zFunction);
+  }
+  sqlite3_free(zFree);
+  return zRet;
+}
+
+/*
+** This function is the implementation of both the xConnect and xCreate
+** methods of the FTS3 virtual table.
+**
+** The argv[] array contains the following:
+**
+**   argv[0]   -> module name  ("fts3" or "fts4")
+**   argv[1]   -> database name
+**   argv[2]   -> table name
+**   argv[...] -> "column name" and other module argument fields.
+*/
+static int fts3InitVtab(
+  int isCreate,                   /* True for xCreate, false for xConnect */
+  sqlite3 *db,                    /* The SQLite database connection */
+  void *pAux,                     /* Hash table containing tokenizers */
+  int argc,                       /* Number of elements in argv array */
+  const char * const *argv,       /* xCreate/xConnect argument array */
+  sqlite3_vtab **ppVTab,          /* Write the resulting vtab structure here */
+  char **pzErr                    /* Write any error message here */
+){
+  Fts3Hash *pHash = (Fts3Hash *)pAux;
+  Fts3Table *p = 0;               /* Pointer to allocated vtab */
+  int rc = SQLITE_OK;             /* Return code */
+  int i;                          /* Iterator variable */
+  int nByte;                      /* Size of allocation used for *p */
+  int iCol;                       /* Column index */
+  int nString = 0;                /* Bytes required to hold all column names */
+  int nCol = 0;                   /* Number of columns in the FTS table */
+  char *zCsr;                     /* Space for holding column names */
+  int nDb;                        /* Bytes required to hold database name */
+  int nName;                      /* Bytes required to hold table name */
+  int isFts4 = (argv[0][3]=='4'); /* True for FTS4, false for FTS3 */
+  int bNoDocsize = 0;             /* True to omit %_docsize table */
+  const char **aCol;              /* Array of column names */
+  sqlite3_tokenizer *pTokenizer = 0;        /* Tokenizer for this table */
+
+  char *zCompress = 0;
+  char *zUncompress = 0;
+
+  assert( strlen(argv[0])==4 );
+  assert( (sqlite3_strnicmp(argv[0], "fts4", 4)==0 && isFts4)
+       || (sqlite3_strnicmp(argv[0], "fts3", 4)==0 && !isFts4)
+  );
+
+  nDb = (int)strlen(argv[1]) + 1;
+  nName = (int)strlen(argv[2]) + 1;
+
+  aCol = (const char **)sqlite3_malloc(sizeof(const char *) * (argc-2) );
+  if( !aCol ) return SQLITE_NOMEM;
+  memset((void *)aCol, 0, sizeof(const char *) * (argc-2));
+
+  /* Loop through all of the arguments passed by the user to the FTS3/4
+  ** module (i.e. all the column names and special arguments). This loop
+  ** does the following:
+  **
+  **   + Figures out the number of columns the FTSX table will have, and
+  **     the number of bytes of space that must be allocated to store copies
+  **     of the column names.
+  **
+  **   + If there is a tokenizer specification included in the arguments,
+  **     initializes the tokenizer pTokenizer.
+  */
+  for(i=3; rc==SQLITE_OK && i<argc; i++){
+    char const *z = argv[i];
+    int nKey;
+    char *zVal;
+
+    /* Check if this is a tokenizer specification */
+    if( !pTokenizer 
+     && strlen(z)>8
+     && 0==sqlite3_strnicmp(z, "tokenize", 8) 
+     && 0==sqlite3Fts3IsIdChar(z[8])
+    ){
+      rc = sqlite3Fts3InitTokenizer(pHash, &z[9], &pTokenizer, pzErr);
+    }
+
+    /* Check if it is an FTS4 special argument. */
+    else if( isFts4 && fts3IsSpecialColumn(z, &nKey, &zVal) ){
+      if( !zVal ){
+        rc = SQLITE_NOMEM;
+        goto fts3_init_out;
+      }
+      if( nKey==9 && 0==sqlite3_strnicmp(z, "matchinfo", 9) ){
+        if( strlen(zVal)==4 && 0==sqlite3_strnicmp(zVal, "fts3", 4) ){
+          bNoDocsize = 1;
+        }else{
+          *pzErr = sqlite3_mprintf("unrecognized matchinfo: %s", zVal);
+          rc = SQLITE_ERROR;
+        }
+      }else if( nKey==8 && 0==sqlite3_strnicmp(z, "compress", 8) ){
+        zCompress = zVal;
+        zVal = 0;
+      }else if( nKey==10 && 0==sqlite3_strnicmp(z, "uncompress", 10) ){
+        zUncompress = zVal;
+        zVal = 0;
+      }else{
+        *pzErr = sqlite3_mprintf("unrecognized parameter: %s", z);
+        rc = SQLITE_ERROR;
+      }
+      sqlite3_free(zVal);
+    }
+
+    /* Otherwise, the argument is a column name. */
+    else {
+      nString += (int)(strlen(z) + 1);
+      aCol[nCol++] = z;
+    }
+  }
+  if( rc!=SQLITE_OK ) goto fts3_init_out;
+
+  if( nCol==0 ){
+    assert( nString==0 );
+    aCol[0] = "content";
+    nString = 8;
+    nCol = 1;
+  }
+
+  if( pTokenizer==0 ){
+    rc = sqlite3Fts3InitTokenizer(pHash, "simple", &pTokenizer, pzErr);
+    if( rc!=SQLITE_OK ) goto fts3_init_out;
+  }
+  assert( pTokenizer );
+
+
+  /* Allocate and populate the Fts3Table structure. */
+  nByte = sizeof(Fts3Table) +              /* Fts3Table */
+          nCol * sizeof(char *) +              /* azColumn */
+          nName +                              /* zName */
+          nDb +                                /* zDb */
+          nString;                             /* Space for azColumn strings */
+  p = (Fts3Table*)sqlite3_malloc(nByte);
+  if( p==0 ){
+    rc = SQLITE_NOMEM;
+    goto fts3_init_out;
+  }
+  memset(p, 0, nByte);
+  p->db = db;
+  p->nColumn = nCol;
+  p->nPendingData = 0;
+  p->azColumn = (char **)&p[1];
+  p->pTokenizer = pTokenizer;
+  p->nNodeSize = 1000;
+  p->nMaxPendingData = FTS3_MAX_PENDING_DATA;
+  p->bHasDocsize = (isFts4 && bNoDocsize==0);
+  p->bHasStat = isFts4;
+  fts3HashInit(&p->pendingTerms, FTS3_HASH_STRING, 1);
+
+  /* Fill in the zName and zDb fields of the vtab structure. */
+  zCsr = (char *)&p->azColumn[nCol];
+  p->zName = zCsr;
+  memcpy(zCsr, argv[2], nName);
+  zCsr += nName;
+  p->zDb = zCsr;
+  memcpy(zCsr, argv[1], nDb);
+  zCsr += nDb;
+
+  /* Fill in the azColumn array */
+  for(iCol=0; iCol<nCol; iCol++){
+    char *z; 
+    int n;
+    z = (char *)sqlite3Fts3NextToken(aCol[iCol], &n);
+    memcpy(zCsr, z, n);
+    zCsr[n] = '\0';
+    sqlite3Fts3Dequote(zCsr);
+    p->azColumn[iCol] = zCsr;
+    zCsr += n+1;
+    assert( zCsr <= &((char *)p)[nByte] );
+  }
+
+  if( (zCompress==0)!=(zUncompress==0) ){
+    char const *zMiss = (zCompress==0 ? "compress" : "uncompress");
+    rc = SQLITE_ERROR;
+    *pzErr = sqlite3_mprintf("missing %s parameter in fts4 constructor", zMiss);
+  }
+  p->zReadExprlist = fts3ReadExprList(p, zUncompress, &rc);
+  p->zWriteExprlist = fts3WriteExprList(p, zCompress, &rc);
+  if( rc!=SQLITE_OK ) goto fts3_init_out;
+
+  /* If this is an xCreate call, create the underlying tables in the 
+  ** database. TODO: For xConnect(), it could verify that said tables exist.
+  */
+  if( isCreate ){
+    rc = fts3CreateTables(p);
+  }
+
+  /* Figure out the page-size for the database. This is required in order to
+  ** estimate the cost of loading large doclists from the database (see 
+  ** function sqlite3Fts3SegReaderCost() for details).
+  */
+  fts3DatabasePageSize(&rc, p);
+
+  /* Declare the table schema to SQLite. */
+  fts3DeclareVtab(&rc, p);
+
+fts3_init_out:
+  sqlite3_free(zCompress);
+  sqlite3_free(zUncompress);
+  sqlite3_free((void *)aCol);
+  if( rc!=SQLITE_OK ){
+    if( p ){
+      fts3DisconnectMethod((sqlite3_vtab *)p);
+    }else if( pTokenizer ){
+      pTokenizer->pModule->xDestroy(pTokenizer);
+    }
+  }else{
+    *ppVTab = &p->base;
+  }
+  return rc;
+}
+
+/*
+** The xConnect() and xCreate() methods for the virtual table. All the
+** work is done in function fts3InitVtab().
+*/
+static int fts3ConnectMethod(
+  sqlite3 *db,                    /* Database connection */
+  void *pAux,                     /* Pointer to tokenizer hash table */
+  int argc,                       /* Number of elements in argv array */
+  const char * const *argv,       /* xCreate/xConnect argument array */
+  sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */
+  char **pzErr                    /* OUT: sqlite3_malloc'd error message */
+){
+  return fts3InitVtab(0, db, pAux, argc, argv, ppVtab, pzErr);
+}
+static int fts3CreateMethod(
+  sqlite3 *db,                    /* Database connection */
+  void *pAux,                     /* Pointer to tokenizer hash table */
+  int argc,                       /* Number of elements in argv array */
+  const char * const *argv,       /* xCreate/xConnect argument array */
+  sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */
+  char **pzErr                    /* OUT: sqlite3_malloc'd error message */
+){
+  return fts3InitVtab(1, db, pAux, argc, argv, ppVtab, pzErr);
+}
+
+/* 
+** Implementation of the xBestIndex method for FTS3 tables. There
+** are three possible strategies, in order of preference:
+**
+**   1. Direct lookup by rowid or docid. 
+**   2. Full-text search using a MATCH operator on a non-docid column.
+**   3. Linear scan of %_content table.
+*/
+static int fts3BestIndexMethod(sqlite3_vtab *pVTab, sqlite3_index_info *pInfo){
+  Fts3Table *p = (Fts3Table *)pVTab;
+  int i;                          /* Iterator variable */
+  int iCons = -1;                 /* Index of constraint to use */
+
+  /* By default use a full table scan. This is an expensive option,
+  ** so search through the constraints to see if a more efficient 
+  ** strategy is possible.
+  */
+  pInfo->idxNum = FTS3_FULLSCAN_SEARCH;
+  pInfo->estimatedCost = 500000;
+  for(i=0; i<pInfo->nConstraint; i++){
+    struct sqlite3_index_constraint *pCons = &pInfo->aConstraint[i];
+    if( pCons->usable==0 ) continue;
+
+    /* A direct lookup on the rowid or docid column. Assign a cost of 1.0. */
+    if( pCons->op==SQLITE_INDEX_CONSTRAINT_EQ 
+     && (pCons->iColumn<0 || pCons->iColumn==p->nColumn+1 )
+    ){
+      pInfo->idxNum = FTS3_DOCID_SEARCH;
+      pInfo->estimatedCost = 1.0;
+      iCons = i;
+    }
+
+    /* A MATCH constraint. Use a full-text search.
+    **
+    ** If there is more than one MATCH constraint available, use the first
+    ** one encountered. If there is both a MATCH constraint and a direct
+    ** rowid/docid lookup, prefer the MATCH strategy. This is done even 
+    ** though the rowid/docid lookup is faster than a MATCH query, selecting
+    ** it would lead to an "unable to use function MATCH in the requested 
+    ** context" error.
+    */
+    if( pCons->op==SQLITE_INDEX_CONSTRAINT_MATCH 
+     && pCons->iColumn>=0 && pCons->iColumn<=p->nColumn
+    ){
+      pInfo->idxNum = FTS3_FULLTEXT_SEARCH + pCons->iColumn;
+      pInfo->estimatedCost = 2.0;
+      iCons = i;
+      break;
+    }
+  }
+
+  if( iCons>=0 ){
+    pInfo->aConstraintUsage[iCons].argvIndex = 1;
+    pInfo->aConstraintUsage[iCons].omit = 1;
+  } 
+  return SQLITE_OK;
+}
+
+/*
+** Implementation of xOpen method.
+*/
+static int fts3OpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){
+  sqlite3_vtab_cursor *pCsr;               /* Allocated cursor */
+
+  UNUSED_PARAMETER(pVTab);
+
+  /* Allocate a buffer large enough for an Fts3Cursor structure. If the
+  ** allocation succeeds, zero it and return SQLITE_OK. Otherwise, 
+  ** if the allocation fails, return SQLITE_NOMEM.
+  */
+  *ppCsr = pCsr = (sqlite3_vtab_cursor *)sqlite3_malloc(sizeof(Fts3Cursor));
+  if( !pCsr ){
+    return SQLITE_NOMEM;
+  }
+  memset(pCsr, 0, sizeof(Fts3Cursor));
+  return SQLITE_OK;
+}
+
+/*
+** Close the cursor.  For additional information see the documentation
+** on the xClose method of the virtual table interface.
+*/
+static int fts3CloseMethod(sqlite3_vtab_cursor *pCursor){
+  Fts3Cursor *pCsr = (Fts3Cursor *)pCursor;
+  assert( ((Fts3Table *)pCsr->base.pVtab)->pSegments==0 );
+  sqlite3_finalize(pCsr->pStmt);
+  sqlite3Fts3ExprFree(pCsr->pExpr);
+  sqlite3Fts3FreeDeferredTokens(pCsr);
+  sqlite3_free(pCsr->aDoclist);
+  sqlite3_free(pCsr->aMatchinfo);
+  sqlite3_free(pCsr);
+  return SQLITE_OK;
+}
+
+/*
+** Position the pCsr->pStmt statement so that it is on the row
+** of the %_content table that contains the last match.  Return
+** SQLITE_OK on success.  
+*/
+static int fts3CursorSeek(sqlite3_context *pContext, Fts3Cursor *pCsr){
+  if( pCsr->isRequireSeek ){
+    pCsr->isRequireSeek = 0;
+    sqlite3_bind_int64(pCsr->pStmt, 1, pCsr->iPrevId);
+    if( SQLITE_ROW==sqlite3_step(pCsr->pStmt) ){
+      return SQLITE_OK;
+    }else{
+      int rc = sqlite3_reset(pCsr->pStmt);
+      if( rc==SQLITE_OK ){
+        /* If no row was found and no error has occured, then the %_content
+        ** table is missing a row that is present in the full-text index.
+        ** The data structures are corrupt.
+        */
+        rc = SQLITE_CORRUPT;
+      }
+      pCsr->isEof = 1;
+      if( pContext ){
+        sqlite3_result_error_code(pContext, rc);
+      }
+      return rc;
+    }
+  }else{
+    return SQLITE_OK;
+  }
+}
+
+/*
+** This function is used to process a single interior node when searching
+** a b-tree for a term or term prefix. The node data is passed to this 
+** function via the zNode/nNode parameters. The term to search for is
+** passed in zTerm/nTerm.
+**
+** If piFirst is not NULL, then this function sets *piFirst to the blockid
+** of the child node that heads the sub-tree that may contain the term.
+**
+** If piLast is not NULL, then *piLast is set to the right-most child node
+** that heads a sub-tree that may contain a term for which zTerm/nTerm is
+** a prefix.
+**
+** If an OOM error occurs, SQLITE_NOMEM is returned. Otherwise, SQLITE_OK.
+*/
+static int fts3ScanInteriorNode(
+  const char *zTerm,              /* Term to select leaves for */
+  int nTerm,                      /* Size of term zTerm in bytes */
+  const char *zNode,              /* Buffer containing segment interior node */
+  int nNode,                      /* Size of buffer at zNode */
+  sqlite3_int64 *piFirst,         /* OUT: Selected child node */
+  sqlite3_int64 *piLast           /* OUT: Selected child node */
+){
+  int rc = SQLITE_OK;             /* Return code */
+  const char *zCsr = zNode;       /* Cursor to iterate through node */
+  const char *zEnd = &zCsr[nNode];/* End of interior node buffer */
+  char *zBuffer = 0;              /* Buffer to load terms into */
+  int nAlloc = 0;                 /* Size of allocated buffer */
+  int isFirstTerm = 1;            /* True when processing first term on page */
+  sqlite3_int64 iChild;           /* Block id of child node to descend to */
+
+  /* Skip over the 'height' varint that occurs at the start of every 
+  ** interior node. Then load the blockid of the left-child of the b-tree
+  ** node into variable iChild.  
+  **
+  ** Even if the data structure on disk is corrupted, this (reading two
+  ** varints from the buffer) does not risk an overread. If zNode is a
+  ** root node, then the buffer comes from a SELECT statement. SQLite does
+  ** not make this guarantee explicitly, but in practice there are always
+  ** either more than 20 bytes of allocated space following the nNode bytes of
+  ** contents, or two zero bytes. Or, if the node is read from the %_segments
+  ** table, then there are always 20 bytes of zeroed padding following the
+  ** nNode bytes of content (see sqlite3Fts3ReadBlock() for details).
+  */
+  zCsr += sqlite3Fts3GetVarint(zCsr, &iChild);
+  zCsr += sqlite3Fts3GetVarint(zCsr, &iChild);
+  if( zCsr>zEnd ){
+    return SQLITE_CORRUPT;
+  }
+  
+  while( zCsr<zEnd && (piFirst || piLast) ){
+    int cmp;                      /* memcmp() result */
+    int nSuffix;                  /* Size of term suffix */
+    int nPrefix = 0;              /* Size of term prefix */
+    int nBuffer;                  /* Total term size */
+  
+    /* Load the next term on the node into zBuffer. Use realloc() to expand
+    ** the size of zBuffer if required.  */
+    if( !isFirstTerm ){
+      zCsr += sqlite3Fts3GetVarint32(zCsr, &nPrefix);
+    }
+    isFirstTerm = 0;
+    zCsr += sqlite3Fts3GetVarint32(zCsr, &nSuffix);
+    
+    if( nPrefix<0 || nSuffix<0 || &zCsr[nSuffix]>zEnd ){
+      rc = SQLITE_CORRUPT;
+      goto finish_scan;
+    }
+    if( nPrefix+nSuffix>nAlloc ){
+      char *zNew;
+      nAlloc = (nPrefix+nSuffix) * 2;
+      zNew = (char *)sqlite3_realloc(zBuffer, nAlloc);
+      if( !zNew ){
+        rc = SQLITE_NOMEM;
+        goto finish_scan;
+      }
+      zBuffer = zNew;
+    }
+    memcpy(&zBuffer[nPrefix], zCsr, nSuffix);
+    nBuffer = nPrefix + nSuffix;
+    zCsr += nSuffix;
+
+    /* Compare the term we are searching for with the term just loaded from
+    ** the interior node. If the specified term is greater than or equal
+    ** to the term from the interior node, then all terms on the sub-tree 
+    ** headed by node iChild are smaller than zTerm. No need to search 
+    ** iChild.
+    **
+    ** If the interior node term is larger than the specified term, then
+    ** the tree headed by iChild may contain the specified term.
+    */
+    cmp = memcmp(zTerm, zBuffer, (nBuffer>nTerm ? nTerm : nBuffer));
+    if( piFirst && (cmp<0 || (cmp==0 && nBuffer>nTerm)) ){
+      *piFirst = iChild;
+      piFirst = 0;
+    }
+
+    if( piLast && cmp<0 ){
+      *piLast = iChild;
+      piLast = 0;
+    }
+
+    iChild++;
+  };
+
+  if( piFirst ) *piFirst = iChild;
+  if( piLast ) *piLast = iChild;
+
+ finish_scan:
+  sqlite3_free(zBuffer);
+  return rc;
+}
+
+
+/*
+** The buffer pointed to by argument zNode (size nNode bytes) contains an
+** interior node of a b-tree segment. The zTerm buffer (size nTerm bytes)
+** contains a term. This function searches the sub-tree headed by the zNode
+** node for the range of leaf nodes that may contain the specified term
+** or terms for which the specified term is a prefix.
+**
+** If piLeaf is not NULL, then *piLeaf is set to the blockid of the 
+** left-most leaf node in the tree that may contain the specified term.
+** If piLeaf2 is not NULL, then *piLeaf2 is set to the blockid of the
+** right-most leaf node that may contain a term for which the specified
+** term is a prefix.
+**
+** It is possible that the range of returned leaf nodes does not contain 
+** the specified term or any terms for which it is a prefix. However, if the 
+** segment does contain any such terms, they are stored within the identified
+** range. Because this function only inspects interior segment nodes (and
+** never loads leaf nodes into memory), it is not possible to be sure.
+**
+** If an error occurs, an error code other than SQLITE_OK is returned.
+*/ 
+static int fts3SelectLeaf(
+  Fts3Table *p,                   /* Virtual table handle */
+  const char *zTerm,              /* Term to select leaves for */
+  int nTerm,                      /* Size of term zTerm in bytes */
+  const char *zNode,              /* Buffer containing segment interior node */
+  int nNode,                      /* Size of buffer at zNode */
+  sqlite3_int64 *piLeaf,          /* Selected leaf node */
+  sqlite3_int64 *piLeaf2          /* Selected leaf node */
+){
+  int rc;                         /* Return code */
+  int iHeight;                    /* Height of this node in tree */
+
+  assert( piLeaf || piLeaf2 );
+
+  sqlite3Fts3GetVarint32(zNode, &iHeight);
+  rc = fts3ScanInteriorNode(zTerm, nTerm, zNode, nNode, piLeaf, piLeaf2);
+  assert( !piLeaf2 || !piLeaf || rc!=SQLITE_OK || (*piLeaf<=*piLeaf2) );
+
+  if( rc==SQLITE_OK && iHeight>1 ){
+    char *zBlob = 0;              /* Blob read from %_segments table */
+    int nBlob;                    /* Size of zBlob in bytes */
+
+    if( piLeaf && piLeaf2 && (*piLeaf!=*piLeaf2) ){
+      rc = sqlite3Fts3ReadBlock(p, *piLeaf, &zBlob, &nBlob);
+      if( rc==SQLITE_OK ){
+        rc = fts3SelectLeaf(p, zTerm, nTerm, zBlob, nBlob, piLeaf, 0);
+      }
+      sqlite3_free(zBlob);
+      piLeaf = 0;
+      zBlob = 0;
+    }
+
+    if( rc==SQLITE_OK ){
+      rc = sqlite3Fts3ReadBlock(p, piLeaf ? *piLeaf : *piLeaf2, &zBlob, &nBlob);
+    }
+    if( rc==SQLITE_OK ){
+      rc = fts3SelectLeaf(p, zTerm, nTerm, zBlob, nBlob, piLeaf, piLeaf2);
+    }
+    sqlite3_free(zBlob);
+  }
+
+  return rc;
+}
+
+/*
+** This function is used to create delta-encoded serialized lists of FTS3 
+** varints. Each call to this function appends a single varint to a list.
+*/
+static void fts3PutDeltaVarint(
+  char **pp,                      /* IN/OUT: Output pointer */
+  sqlite3_int64 *piPrev,          /* IN/OUT: Previous value written to list */
+  sqlite3_int64 iVal              /* Write this value to the list */
+){
+  assert( iVal-*piPrev > 0 || (*piPrev==0 && iVal==0) );
+  *pp += sqlite3Fts3PutVarint(*pp, iVal-*piPrev);
+  *piPrev = iVal;
+}
+
+/*
+** When this function is called, *ppPoslist is assumed to point to the 
+** start of a position-list. After it returns, *ppPoslist points to the
+** first byte after the position-list.
+**
+** A position list is list of positions (delta encoded) and columns for 
+** a single document record of a doclist.  So, in other words, this
+** routine advances *ppPoslist so that it points to the next docid in
+** the doclist, or to the first byte past the end of the doclist.
+**
+** If pp is not NULL, then the contents of the position list are copied
+** to *pp. *pp is set to point to the first byte past the last byte copied
+** before this function returns.
+*/
+static void fts3PoslistCopy(char **pp, char **ppPoslist){
+  char *pEnd = *ppPoslist;
+  char c = 0;
+
+  /* The end of a position list is marked by a zero encoded as an FTS3 
+  ** varint. A single POS_END (0) byte. Except, if the 0 byte is preceded by
+  ** a byte with the 0x80 bit set, then it is not a varint 0, but the tail
+  ** of some other, multi-byte, value.
+  **
+  ** The following while-loop moves pEnd to point to the first byte that is not 
+  ** immediately preceded by a byte with the 0x80 bit set. Then increments
+  ** pEnd once more so that it points to the byte immediately following the
+  ** last byte in the position-list.
+  */
+  while( *pEnd | c ){
+    c = *pEnd++ & 0x80;
+    testcase( c!=0 && (*pEnd)==0 );
+  }
+  pEnd++;  /* Advance past the POS_END terminator byte */
+
+  if( pp ){
+    int n = (int)(pEnd - *ppPoslist);
+    char *p = *pp;
+    memcpy(p, *ppPoslist, n);
+    p += n;
+    *pp = p;
+  }
+  *ppPoslist = pEnd;
+}
+
+/*
+** When this function is called, *ppPoslist is assumed to point to the 
+** start of a column-list. After it returns, *ppPoslist points to the
+** to the terminator (POS_COLUMN or POS_END) byte of the column-list.
+**
+** A column-list is list of delta-encoded positions for a single column
+** within a single document within a doclist.
+**
+** The column-list is terminated either by a POS_COLUMN varint (1) or
+** a POS_END varint (0).  This routine leaves *ppPoslist pointing to
+** the POS_COLUMN or POS_END that terminates the column-list.
+**
+** If pp is not NULL, then the contents of the column-list are copied
+** to *pp. *pp is set to point to the first byte past the last byte copied
+** before this function returns.  The POS_COLUMN or POS_END terminator
+** is not copied into *pp.
+*/
+static void fts3ColumnlistCopy(char **pp, char **ppPoslist){
+  char *pEnd = *ppPoslist;
+  char c = 0;
+
+  /* A column-list is terminated by either a 0x01 or 0x00 byte that is
+  ** not part of a multi-byte varint.
+  */
+  while( 0xFE & (*pEnd | c) ){
+    c = *pEnd++ & 0x80;
+    testcase( c!=0 && ((*pEnd)&0xfe)==0 );
+  }
+  if( pp ){
+    int n = (int)(pEnd - *ppPoslist);
+    char *p = *pp;
+    memcpy(p, *ppPoslist, n);
+    p += n;
+    *pp = p;
+  }
+  *ppPoslist = pEnd;
+}
+
+/*
+** Value used to signify the end of an position-list. This is safe because
+** it is not possible to have a document with 2^31 terms.
+*/
+#define POSITION_LIST_END 0x7fffffff
+
+/*
+** This function is used to help parse position-lists. When this function is
+** called, *pp may point to the start of the next varint in the position-list
+** being parsed, or it may point to 1 byte past the end of the position-list
+** (in which case **pp will be a terminator bytes POS_END (0) or
+** (1)).
+**
+** If *pp points past the end of the current position-list, set *pi to 
+** POSITION_LIST_END and return. Otherwise, read the next varint from *pp,
+** increment the current value of *pi by the value read, and set *pp to
+** point to the next value before returning.
+**
+** Before calling this routine *pi must be initialized to the value of
+** the previous position, or zero if we are reading the first position
+** in the position-list.  Because positions are delta-encoded, the value
+** of the previous position is needed in order to compute the value of
+** the next position.
+*/
+static void fts3ReadNextPos(
+  char **pp,                    /* IN/OUT: Pointer into position-list buffer */
+  sqlite3_int64 *pi             /* IN/OUT: Value read from position-list */
+){
+  if( (**pp)&0xFE ){
+    fts3GetDeltaVarint(pp, pi);
+    *pi -= 2;
+  }else{
+    *pi = POSITION_LIST_END;
+  }
+}
+
+/*
+** If parameter iCol is not 0, write an POS_COLUMN (1) byte followed by
+** the value of iCol encoded as a varint to *pp.   This will start a new
+** column list.
+**
+** Set *pp to point to the byte just after the last byte written before 
+** returning (do not modify it if iCol==0). Return the total number of bytes
+** written (0 if iCol==0).
+*/
+static int fts3PutColNumber(char **pp, int iCol){
+  int n = 0;                      /* Number of bytes written */
+  if( iCol ){
+    char *p = *pp;                /* Output pointer */
+    n = 1 + sqlite3Fts3PutVarint(&p[1], iCol);
+    *p = 0x01;
+    *pp = &p[n];
+  }
+  return n;
+}
+
+/*
+** Compute the union of two position lists.  The output written
+** into *pp contains all positions of both *pp1 and *pp2 in sorted
+** order and with any duplicates removed.  All pointers are
+** updated appropriately.   The caller is responsible for insuring
+** that there is enough space in *pp to hold the complete output.
+*/
+static void fts3PoslistMerge(
+  char **pp,                      /* Output buffer */
+  char **pp1,                     /* Left input list */
+  char **pp2                      /* Right input list */
+){
+  char *p = *pp;
+  char *p1 = *pp1;
+  char *p2 = *pp2;
+
+  while( *p1 || *p2 ){
+    int iCol1;         /* The current column index in pp1 */
+    int iCol2;         /* The current column index in pp2 */
+
+    if( *p1==POS_COLUMN ) sqlite3Fts3GetVarint32(&p1[1], &iCol1);
+    else if( *p1==POS_END ) iCol1 = POSITION_LIST_END;
+    else iCol1 = 0;
+
+    if( *p2==POS_COLUMN ) sqlite3Fts3GetVarint32(&p2[1], &iCol2);
+    else if( *p2==POS_END ) iCol2 = POSITION_LIST_END;
+    else iCol2 = 0;
+
+    if( iCol1==iCol2 ){
+      sqlite3_int64 i1 = 0;       /* Last position from pp1 */
+      sqlite3_int64 i2 = 0;       /* Last position from pp2 */
+      sqlite3_int64 iPrev = 0;
+      int n = fts3PutColNumber(&p, iCol1);
+      p1 += n;
+      p2 += n;
+
+      /* At this point, both p1 and p2 point to the start of column-lists
+      ** for the same column (the column with index iCol1 and iCol2).
+      ** A column-list is a list of non-negative delta-encoded varints, each 
+      ** incremented by 2 before being stored. Each list is terminated by a
+      ** POS_END (0) or POS_COLUMN (1). The following block merges the two lists
+      ** and writes the results to buffer p. p is left pointing to the byte
+      ** after the list written. No terminator (POS_END or POS_COLUMN) is
+      ** written to the output.
+      */
+      fts3GetDeltaVarint(&p1, &i1);
+      fts3GetDeltaVarint(&p2, &i2);
+      do {
+        fts3PutDeltaVarint(&p, &iPrev, (i1<i2) ? i1 : i2); 
+        iPrev -= 2;
+        if( i1==i2 ){
+          fts3ReadNextPos(&p1, &i1);
+          fts3ReadNextPos(&p2, &i2);
+        }else if( i1<i2 ){
+          fts3ReadNextPos(&p1, &i1);
+        }else{
+          fts3ReadNextPos(&p2, &i2);
+        }
+      }while( i1!=POSITION_LIST_END || i2!=POSITION_LIST_END );
+    }else if( iCol1<iCol2 ){
+      p1 += fts3PutColNumber(&p, iCol1);
+      fts3ColumnlistCopy(&p, &p1);
+    }else{
+      p2 += fts3PutColNumber(&p, iCol2);
+      fts3ColumnlistCopy(&p, &p2);
+    }
+  }
+
+  *p++ = POS_END;
+  *pp = p;
+  *pp1 = p1 + 1;
+  *pp2 = p2 + 1;
+}
+
+/*
+** nToken==1 searches for adjacent positions.
+**
+** This function is used to merge two position lists into one. When it is
+** called, *pp1 and *pp2 must both point to position lists. A position-list is
+** the part of a doclist that follows each document id. For example, if a row
+** contains:
+**
+**     'a b c'|'x y z'|'a b b a'
+**
+** Then the position list for this row for token 'b' would consist of:
+**
+**     0x02 0x01 0x02 0x03 0x03 0x00
+**
+** When this function returns, both *pp1 and *pp2 are left pointing to the
+** byte following the 0x00 terminator of their respective position lists.
+**
+** If isSaveLeft is 0, an entry is added to the output position list for 
+** each position in *pp2 for which there exists one or more positions in
+** *pp1 so that (pos(*pp2)>pos(*pp1) && pos(*pp2)-pos(*pp1)<=nToken). i.e.
+** when the *pp1 token appears before the *pp2 token, but not more than nToken
+** slots before it.
+*/
+static int fts3PoslistPhraseMerge(
+  char **pp,                      /* IN/OUT: Preallocated output buffer */
+  int nToken,                     /* Maximum difference in token positions */
+  int isSaveLeft,                 /* Save the left position */
+  int isExact,                    /* If *pp1 is exactly nTokens before *pp2 */
+  char **pp1,                     /* IN/OUT: Left input list */
+  char **pp2                      /* IN/OUT: Right input list */
+){
+  char *p = (pp ? *pp : 0);
+  char *p1 = *pp1;
+  char *p2 = *pp2;
+  int iCol1 = 0;
+  int iCol2 = 0;
+
+  /* Never set both isSaveLeft and isExact for the same invocation. */
+  assert( isSaveLeft==0 || isExact==0 );
+
+  assert( *p1!=0 && *p2!=0 );
+  if( *p1==POS_COLUMN ){ 
+    p1++;
+    p1 += sqlite3Fts3GetVarint32(p1, &iCol1);
+  }
+  if( *p2==POS_COLUMN ){ 
+    p2++;
+    p2 += sqlite3Fts3GetVarint32(p2, &iCol2);
+  }
+
+  for(;;) {
+    if( iCol1==iCol2 ){
+      char *pSave = p;
+      sqlite3_int64 iPrev = 0;
+      sqlite3_int64 iPos1 = 0;
+      sqlite3_int64 iPos2 = 0;
+
+      if( pp && iCol1 ){
+        *p++ = POS_COLUMN;
+        p += sqlite3Fts3PutVarint(p, iCol1);
+      }
+
+      assert( *p1!=POS_END && *p1!=POS_COLUMN );
+      assert( *p2!=POS_END && *p2!=POS_COLUMN );
+      fts3GetDeltaVarint(&p1, &iPos1); iPos1 -= 2;
+      fts3GetDeltaVarint(&p2, &iPos2); iPos2 -= 2;
+
+      for(;;) {
+        if( iPos2==iPos1+nToken 
+         || (isExact==0 && iPos2>iPos1 && iPos2<=iPos1+nToken) 
+        ){
+          sqlite3_int64 iSave;
+          if( !pp ){
+            fts3PoslistCopy(0, &p2);
+            fts3PoslistCopy(0, &p1);
+            *pp1 = p1;
+            *pp2 = p2;
+            return 1;
+          }
+          iSave = isSaveLeft ? iPos1 : iPos2;
+          fts3PutDeltaVarint(&p, &iPrev, iSave+2); iPrev -= 2;
+          pSave = 0;
+        }
+        if( (!isSaveLeft && iPos2<=(iPos1+nToken)) || iPos2<=iPos1 ){
+          if( (*p2&0xFE)==0 ) break;
+          fts3GetDeltaVarint(&p2, &iPos2); iPos2 -= 2;
+        }else{
+          if( (*p1&0xFE)==0 ) break;
+          fts3GetDeltaVarint(&p1, &iPos1); iPos1 -= 2;
+        }
+      }
+
+      if( pSave ){
+        assert( pp && p );
+        p = pSave;
+      }
+
+      fts3ColumnlistCopy(0, &p1);
+      fts3ColumnlistCopy(0, &p2);
+      assert( (*p1&0xFE)==0 && (*p2&0xFE)==0 );
+      if( 0==*p1 || 0==*p2 ) break;
+
+      p1++;
+      p1 += sqlite3Fts3GetVarint32(p1, &iCol1);
+      p2++;
+      p2 += sqlite3Fts3GetVarint32(p2, &iCol2);
+    }
+
+    /* Advance pointer p1 or p2 (whichever corresponds to the smaller of
+    ** iCol1 and iCol2) so that it points to either the 0x00 that marks the
+    ** end of the position list, or the 0x01 that precedes the next 
+    ** column-number in the position list. 
+    */
+    else if( iCol1<iCol2 ){
+      fts3ColumnlistCopy(0, &p1);
+      if( 0==*p1 ) break;
+      p1++;
+      p1 += sqlite3Fts3GetVarint32(p1, &iCol1);
+    }else{
+      fts3ColumnlistCopy(0, &p2);
+      if( 0==*p2 ) break;
+      p2++;
+      p2 += sqlite3Fts3GetVarint32(p2, &iCol2);
+    }
+  }
+
+  fts3PoslistCopy(0, &p2);
+  fts3PoslistCopy(0, &p1);
+  *pp1 = p1;
+  *pp2 = p2;
+  if( !pp || *pp==p ){
+    return 0;
+  }
+  *p++ = 0x00;
+  *pp = p;
+  return 1;
+}
+
+/*
+** Merge two position-lists as required by the NEAR operator.
+*/
+static int fts3PoslistNearMerge(
+  char **pp,                      /* Output buffer */
+  char *aTmp,                     /* Temporary buffer space */
+  int nRight,                     /* Maximum difference in token positions */
+  int nLeft,                      /* Maximum difference in token positions */
+  char **pp1,                     /* IN/OUT: Left input list */
+  char **pp2                      /* IN/OUT: Right input list */
+){
+  char *p1 = *pp1;
+  char *p2 = *pp2;
+
+  if( !pp ){
+    if( fts3PoslistPhraseMerge(0, nRight, 0, 0, pp1, pp2) ) return 1;
+    *pp1 = p1;
+    *pp2 = p2;
+    return fts3PoslistPhraseMerge(0, nLeft, 0, 0, pp2, pp1);
+  }else{
+    char *pTmp1 = aTmp;
+    char *pTmp2;
+    char *aTmp2;
+    int res = 1;
+
+    fts3PoslistPhraseMerge(&pTmp1, nRight, 0, 0, pp1, pp2);
+    aTmp2 = pTmp2 = pTmp1;
+    *pp1 = p1;
+    *pp2 = p2;
+    fts3PoslistPhraseMerge(&pTmp2, nLeft, 1, 0, pp2, pp1);
+    if( pTmp1!=aTmp && pTmp2!=aTmp2 ){
+      fts3PoslistMerge(pp, &aTmp, &aTmp2);
+    }else if( pTmp1!=aTmp ){
+      fts3PoslistCopy(pp, &aTmp);
+    }else if( pTmp2!=aTmp2 ){
+      fts3PoslistCopy(pp, &aTmp2);
+    }else{
+      res = 0;
+    }
+
+    return res;
+  }
+}
+
+/*
+** Values that may be used as the first parameter to fts3DoclistMerge().
+*/
+#define MERGE_NOT        2        /* D + D -> D */
+#define MERGE_AND        3        /* D + D -> D */
+#define MERGE_OR         4        /* D + D -> D */
+#define MERGE_POS_OR     5        /* P + P -> P */
+#define MERGE_PHRASE     6        /* P + P -> D */
+#define MERGE_POS_PHRASE 7        /* P + P -> P */
+#define MERGE_NEAR       8        /* P + P -> D */
+#define MERGE_POS_NEAR   9        /* P + P -> P */
+
+/*
+** Merge the two doclists passed in buffer a1 (size n1 bytes) and a2
+** (size n2 bytes). The output is written to pre-allocated buffer aBuffer,
+** which is guaranteed to be large enough to hold the results. The number
+** of bytes written to aBuffer is stored in *pnBuffer before returning.
+**
+** If successful, SQLITE_OK is returned. Otherwise, if a malloc error
+** occurs while allocating a temporary buffer as part of the merge operation,
+** SQLITE_NOMEM is returned.
+*/
+static int fts3DoclistMerge(
+  int mergetype,                  /* One of the MERGE_XXX constants */
+  int nParam1,                    /* Used by MERGE_NEAR and MERGE_POS_NEAR */
+  int nParam2,                    /* Used by MERGE_NEAR and MERGE_POS_NEAR */
+  char *aBuffer,                  /* Pre-allocated output buffer */
+  int *pnBuffer,                  /* OUT: Bytes written to aBuffer */
+  char *a1,                       /* Buffer containing first doclist */
+  int n1,                         /* Size of buffer a1 */
+  char *a2,                       /* Buffer containing second doclist */
+  int n2,                         /* Size of buffer a2 */
+  int *pnDoc                      /* OUT: Number of docids in output */
+){
+  sqlite3_int64 i1 = 0;
+  sqlite3_int64 i2 = 0;
+  sqlite3_int64 iPrev = 0;
+
+  char *p = aBuffer;
+  char *p1 = a1;
+  char *p2 = a2;
+  char *pEnd1 = &a1[n1];
+  char *pEnd2 = &a2[n2];
+  int nDoc = 0;
+
+  assert( mergetype==MERGE_OR     || mergetype==MERGE_POS_OR 
+       || mergetype==MERGE_AND    || mergetype==MERGE_NOT
+       || mergetype==MERGE_PHRASE || mergetype==MERGE_POS_PHRASE
+       || mergetype==MERGE_NEAR   || mergetype==MERGE_POS_NEAR
+  );
+
+  if( !aBuffer ){
+    *pnBuffer = 0;
+    return SQLITE_NOMEM;
+  }
+
+  /* Read the first docid from each doclist */
+  fts3GetDeltaVarint2(&p1, pEnd1, &i1);
+  fts3GetDeltaVarint2(&p2, pEnd2, &i2);
+
+  switch( mergetype ){
+    case MERGE_OR:
+    case MERGE_POS_OR:
+      while( p1 || p2 ){
+        if( p2 && p1 && i1==i2 ){
+          fts3PutDeltaVarint(&p, &iPrev, i1);
+          if( mergetype==MERGE_POS_OR ) fts3PoslistMerge(&p, &p1, &p2);
+          fts3GetDeltaVarint2(&p1, pEnd1, &i1);
+          fts3GetDeltaVarint2(&p2, pEnd2, &i2);
+        }else if( !p2 || (p1 && i1<i2) ){
+          fts3PutDeltaVarint(&p, &iPrev, i1);
+          if( mergetype==MERGE_POS_OR ) fts3PoslistCopy(&p, &p1);
+          fts3GetDeltaVarint2(&p1, pEnd1, &i1);
+        }else{
+          fts3PutDeltaVarint(&p, &iPrev, i2);
+          if( mergetype==MERGE_POS_OR ) fts3PoslistCopy(&p, &p2);
+          fts3GetDeltaVarint2(&p2, pEnd2, &i2);
+        }
+      }
+      break;
+
+    case MERGE_AND:
+      while( p1 && p2 ){
+        if( i1==i2 ){
+          fts3PutDeltaVarint(&p, &iPrev, i1);
+          fts3GetDeltaVarint2(&p1, pEnd1, &i1);
+          fts3GetDeltaVarint2(&p2, pEnd2, &i2);
+          nDoc++;
+        }else if( i1<i2 ){
+          fts3GetDeltaVarint2(&p1, pEnd1, &i1);
+        }else{
+          fts3GetDeltaVarint2(&p2, pEnd2, &i2);
+        }
+      }
+      break;
+
+    case MERGE_NOT:
+      while( p1 ){
+        if( p2 && i1==i2 ){
+          fts3GetDeltaVarint2(&p1, pEnd1, &i1);
+          fts3GetDeltaVarint2(&p2, pEnd2, &i2);
+        }else if( !p2 || i1<i2 ){
+          fts3PutDeltaVarint(&p, &iPrev, i1);
+          fts3GetDeltaVarint2(&p1, pEnd1, &i1);
+        }else{
+          fts3GetDeltaVarint2(&p2, pEnd2, &i2);
+        }
+      }
+      break;
+
+    case MERGE_POS_PHRASE:
+    case MERGE_PHRASE: {
+      char **ppPos = (mergetype==MERGE_PHRASE ? 0 : &p);
+      while( p1 && p2 ){
+        if( i1==i2 ){
+          char *pSave = p;
+          sqlite3_int64 iPrevSave = iPrev;
+          fts3PutDeltaVarint(&p, &iPrev, i1);
+          if( 0==fts3PoslistPhraseMerge(ppPos, nParam1, 0, 1, &p1, &p2) ){
+            p = pSave;
+            iPrev = iPrevSave;
+          }else{
+            nDoc++;
+          }
+          fts3GetDeltaVarint2(&p1, pEnd1, &i1);
+          fts3GetDeltaVarint2(&p2, pEnd2, &i2);
+        }else if( i1<i2 ){
+          fts3PoslistCopy(0, &p1);
+          fts3GetDeltaVarint2(&p1, pEnd1, &i1);
+        }else{
+          fts3PoslistCopy(0, &p2);
+          fts3GetDeltaVarint2(&p2, pEnd2, &i2);
+        }
+      }
+      break;
+    }
+
+    default: assert( mergetype==MERGE_POS_NEAR || mergetype==MERGE_NEAR ); {
+      char *aTmp = 0;
+      char **ppPos = 0;
+
+      if( mergetype==MERGE_POS_NEAR ){
+        ppPos = &p;
+        aTmp = sqlite3_malloc(2*(n1+n2+1));
+        if( !aTmp ){
+          return SQLITE_NOMEM;
+        }
+      }
+
+      while( p1 && p2 ){
+        if( i1==i2 ){
+          char *pSave = p;
+          sqlite3_int64 iPrevSave = iPrev;
+          fts3PutDeltaVarint(&p, &iPrev, i1);
+
+          if( !fts3PoslistNearMerge(ppPos, aTmp, nParam1, nParam2, &p1, &p2) ){
+            iPrev = iPrevSave;
+            p = pSave;
+          }
+
+          fts3GetDeltaVarint2(&p1, pEnd1, &i1);
+          fts3GetDeltaVarint2(&p2, pEnd2, &i2);
+        }else if( i1<i2 ){
+          fts3PoslistCopy(0, &p1);
+          fts3GetDeltaVarint2(&p1, pEnd1, &i1);
+        }else{
+          fts3PoslistCopy(0, &p2);
+          fts3GetDeltaVarint2(&p2, pEnd2, &i2);
+        }
+      }
+      sqlite3_free(aTmp);
+      break;
+    }
+  }
+
+  if( pnDoc ) *pnDoc = nDoc;
+  *pnBuffer = (int)(p-aBuffer);
+  return SQLITE_OK;
+}
+
+/* 
+** A pointer to an instance of this structure is used as the context 
+** argument to sqlite3Fts3SegReaderIterate()
+*/
+typedef struct TermSelect TermSelect;
+struct TermSelect {
+  int isReqPos;
+  char *aaOutput[16];             /* Malloc'd output buffer */
+  int anOutput[16];               /* Size of output in bytes */
+};
+
+/*
+** Merge all doclists in the TermSelect.aaOutput[] array into a single
+** doclist stored in TermSelect.aaOutput[0]. If successful, delete all
+** other doclists (except the aaOutput[0] one) and return SQLITE_OK.
+**
+** If an OOM error occurs, return SQLITE_NOMEM. In this case it is
+** the responsibility of the caller to free any doclists left in the
+** TermSelect.aaOutput[] array.
+*/
+static int fts3TermSelectMerge(TermSelect *pTS){
+  int mergetype = (pTS->isReqPos ? MERGE_POS_OR : MERGE_OR);
+  char *aOut = 0;
+  int nOut = 0;
+  int i;
+
+  /* Loop through the doclists in the aaOutput[] array. Merge them all
+  ** into a single doclist.
+  */
+  for(i=0; i<SizeofArray(pTS->aaOutput); i++){
+    if( pTS->aaOutput[i] ){
+      if( !aOut ){
+        aOut = pTS->aaOutput[i];
+        nOut = pTS->anOutput[i];
+        pTS->aaOutput[i] = 0;
+      }else{
+        int nNew = nOut + pTS->anOutput[i];
+        char *aNew = sqlite3_malloc(nNew);
+        if( !aNew ){
+          sqlite3_free(aOut);
+          return SQLITE_NOMEM;
+        }
+        fts3DoclistMerge(mergetype, 0, 0,
+            aNew, &nNew, pTS->aaOutput[i], pTS->anOutput[i], aOut, nOut, 0
+        );
+        sqlite3_free(pTS->aaOutput[i]);
+        sqlite3_free(aOut);
+        pTS->aaOutput[i] = 0;
+        aOut = aNew;
+        nOut = nNew;
+      }
+    }
+  }
+
+  pTS->aaOutput[0] = aOut;
+  pTS->anOutput[0] = nOut;
+  return SQLITE_OK;
+}
+
+/*
+** This function is used as the sqlite3Fts3SegReaderIterate() callback when
+** querying the full-text index for a doclist associated with a term or
+** term-prefix.
+*/
+static int fts3TermSelectCb(
+  Fts3Table *p,                   /* Virtual table object */
+  void *pContext,                 /* Pointer to TermSelect structure */
+  char *zTerm,
+  int nTerm,
+  char *aDoclist,
+  int nDoclist
+){
+  TermSelect *pTS = (TermSelect *)pContext;
+
+  UNUSED_PARAMETER(p);
+  UNUSED_PARAMETER(zTerm);
+  UNUSED_PARAMETER(nTerm);
+
+  if( pTS->aaOutput[0]==0 ){
+    /* If this is the first term selected, copy the doclist to the output
+    ** buffer using memcpy(). TODO: Add a way to transfer control of the
+    ** aDoclist buffer from the caller so as to avoid the memcpy().
+    */
+    pTS->aaOutput[0] = sqlite3_malloc(nDoclist);
+    pTS->anOutput[0] = nDoclist;
+    if( pTS->aaOutput[0] ){
+      memcpy(pTS->aaOutput[0], aDoclist, nDoclist);
+    }else{
+      return SQLITE_NOMEM;
+    }
+  }else{
+    int mergetype = (pTS->isReqPos ? MERGE_POS_OR : MERGE_OR);
+    char *aMerge = aDoclist;
+    int nMerge = nDoclist;
+    int iOut;
+
+    for(iOut=0; iOut<SizeofArray(pTS->aaOutput); iOut++){
+      char *aNew;
+      int nNew;
+      if( pTS->aaOutput[iOut]==0 ){
+        assert( iOut>0 );
+        pTS->aaOutput[iOut] = aMerge;
+        pTS->anOutput[iOut] = nMerge;
+        break;
+      }
+
+      nNew = nMerge + pTS->anOutput[iOut];
+      aNew = sqlite3_malloc(nNew);
+      if( !aNew ){
+        if( aMerge!=aDoclist ){
+          sqlite3_free(aMerge);
+        }
+        return SQLITE_NOMEM;
+      }
+      fts3DoclistMerge(mergetype, 0, 0, aNew, &nNew, 
+          pTS->aaOutput[iOut], pTS->anOutput[iOut], aMerge, nMerge, 0
+      );
+
+      if( iOut>0 ) sqlite3_free(aMerge);
+      sqlite3_free(pTS->aaOutput[iOut]);
+      pTS->aaOutput[iOut] = 0;
+
+      aMerge = aNew;
+      nMerge = nNew;
+      if( (iOut+1)==SizeofArray(pTS->aaOutput) ){
+        pTS->aaOutput[iOut] = aMerge;
+        pTS->anOutput[iOut] = nMerge;
+      }
+    }
+  }
+  return SQLITE_OK;
+}
+
+static int fts3DeferredTermSelect(
+  Fts3DeferredToken *pToken,      /* Phrase token */
+  int isTermPos,                  /* True to include positions */
+  int *pnOut,                     /* OUT: Size of list */
+  char **ppOut                    /* OUT: Body of list */
+){
+  char *aSource;
+  int nSource;
+
+  aSource = sqlite3Fts3DeferredDoclist(pToken, &nSource);
+  if( !aSource ){
+    *pnOut = 0;
+    *ppOut = 0;
+  }else if( isTermPos ){
+    *ppOut = sqlite3_malloc(nSource);
+    if( !*ppOut ) return SQLITE_NOMEM;
+    memcpy(*ppOut, aSource, nSource);
+    *pnOut = nSource;
+  }else{
+    sqlite3_int64 docid;
+    *pnOut = sqlite3Fts3GetVarint(aSource, &docid);
+    *ppOut = sqlite3_malloc(*pnOut);
+    if( !*ppOut ) return SQLITE_NOMEM;
+    sqlite3Fts3PutVarint(*ppOut, docid);
+  }
+
+  return SQLITE_OK;
+}
+
+SQLITE_PRIVATE int sqlite3Fts3SegReaderCursor(
+  Fts3Table *p,                   /* FTS3 table handle */
+  int iLevel,                     /* Level of segments to scan */
+  const char *zTerm,              /* Term to query for */
+  int nTerm,                      /* Size of zTerm in bytes */
+  int isPrefix,                   /* True for a prefix search */
+  int isScan,                     /* True to scan from zTerm to EOF */
+  Fts3SegReaderCursor *pCsr       /* Cursor object to populate */
+){
+  int rc = SQLITE_OK;
+  int rc2;
+  int iAge = 0;
+  sqlite3_stmt *pStmt = 0;
+  Fts3SegReader *pPending = 0;
+
+  assert( iLevel==FTS3_SEGCURSOR_ALL 
+      ||  iLevel==FTS3_SEGCURSOR_PENDING 
+      ||  iLevel>=0
+  );
+  assert( FTS3_SEGCURSOR_PENDING<0 );
+  assert( FTS3_SEGCURSOR_ALL<0 );
+  assert( iLevel==FTS3_SEGCURSOR_ALL || (zTerm==0 && isPrefix==1) );
+  assert( isPrefix==0 || isScan==0 );
+
+
+  memset(pCsr, 0, sizeof(Fts3SegReaderCursor));
+
+  /* If iLevel is less than 0, include a seg-reader for the pending-terms. */
+  assert( isScan==0 || fts3HashCount(&p->pendingTerms)==0 );
+  if( iLevel<0 && isScan==0 ){
+    rc = sqlite3Fts3SegReaderPending(p, zTerm, nTerm, isPrefix, &pPending);
+    if( rc==SQLITE_OK && pPending ){
+      int nByte = (sizeof(Fts3SegReader *) * 16);
+      pCsr->apSegment = (Fts3SegReader **)sqlite3_malloc(nByte);
+      if( pCsr->apSegment==0 ){
+        rc = SQLITE_NOMEM;
+      }else{
+        pCsr->apSegment[0] = pPending;
+        pCsr->nSegment = 1;
+        pPending = 0;
+      }
+    }
+  }
+
+  if( iLevel!=FTS3_SEGCURSOR_PENDING ){
+    if( rc==SQLITE_OK ){
+      rc = sqlite3Fts3AllSegdirs(p, iLevel, &pStmt);
+    }
+    while( rc==SQLITE_OK && SQLITE_ROW==(rc = sqlite3_step(pStmt)) ){
+
+      /* Read the values returned by the SELECT into local variables. */
+      sqlite3_int64 iStartBlock = sqlite3_column_int64(pStmt, 1);
+      sqlite3_int64 iLeavesEndBlock = sqlite3_column_int64(pStmt, 2);
+      sqlite3_int64 iEndBlock = sqlite3_column_int64(pStmt, 3);
+      int nRoot = sqlite3_column_bytes(pStmt, 4);
+      char const *zRoot = sqlite3_column_blob(pStmt, 4);
+
+      /* If nSegment is a multiple of 16 the array needs to be extended. */
+      if( (pCsr->nSegment%16)==0 ){
+        Fts3SegReader **apNew;
+        int nByte = (pCsr->nSegment + 16)*sizeof(Fts3SegReader*);
+        apNew = (Fts3SegReader **)sqlite3_realloc(pCsr->apSegment, nByte);
+        if( !apNew ){
+          rc = SQLITE_NOMEM;
+          goto finished;
+        }
+        pCsr->apSegment = apNew;
+      }
+
+      /* If zTerm is not NULL, and this segment is not stored entirely on its
+      ** root node, the range of leaves scanned can be reduced. Do this. */
+      if( iStartBlock && zTerm ){
+        sqlite3_int64 *pi = (isPrefix ? &iLeavesEndBlock : 0);
+        rc = fts3SelectLeaf(p, zTerm, nTerm, zRoot, nRoot, &iStartBlock, pi);
+        if( rc!=SQLITE_OK ) goto finished;
+        if( isPrefix==0 && isScan==0 ) iLeavesEndBlock = iStartBlock;
+      }
+ 
+      rc = sqlite3Fts3SegReaderNew(iAge, iStartBlock, iLeavesEndBlock,
+          iEndBlock, zRoot, nRoot, &pCsr->apSegment[pCsr->nSegment]
+      );
+      if( rc!=SQLITE_OK ) goto finished;
+      pCsr->nSegment++;
+      iAge++;
+    }
+  }
+
+ finished:
+  rc2 = sqlite3_reset(pStmt);
+  if( rc==SQLITE_DONE ) rc = rc2;
+  sqlite3Fts3SegReaderFree(pPending);
+
+  return rc;
+}
+
+
+static int fts3TermSegReaderCursor(
+  Fts3Cursor *pCsr,               /* Virtual table cursor handle */
+  const char *zTerm,              /* Term to query for */
+  int nTerm,                      /* Size of zTerm in bytes */
+  int isPrefix,                   /* True for a prefix search */
+  Fts3SegReaderCursor **ppSegcsr  /* OUT: Allocated seg-reader cursor */
+){
+  Fts3SegReaderCursor *pSegcsr;   /* Object to allocate and return */
+  int rc = SQLITE_NOMEM;          /* Return code */
+
+  pSegcsr = sqlite3_malloc(sizeof(Fts3SegReaderCursor));
+  if( pSegcsr ){
+    Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
+    int i;
+    int nCost = 0;
+    rc = sqlite3Fts3SegReaderCursor(
+        p, FTS3_SEGCURSOR_ALL, zTerm, nTerm, isPrefix, 0, pSegcsr);
+  
+    for(i=0; rc==SQLITE_OK && i<pSegcsr->nSegment; i++){
+      rc = sqlite3Fts3SegReaderCost(pCsr, pSegcsr->apSegment[i], &nCost);
+    }
+    pSegcsr->nCost = nCost;
+  }
+
+  *ppSegcsr = pSegcsr;
+  return rc;
+}
+
+static void fts3SegReaderCursorFree(Fts3SegReaderCursor *pSegcsr){
+  sqlite3Fts3SegReaderFinish(pSegcsr);
+  sqlite3_free(pSegcsr);
+}
+
+/*
+** This function retreives the doclist for the specified term (or term
+** prefix) from the database. 
+**
+** The returned doclist may be in one of two formats, depending on the 
+** value of parameter isReqPos. If isReqPos is zero, then the doclist is
+** a sorted list of delta-compressed docids (a bare doclist). If isReqPos
+** is non-zero, then the returned list is in the same format as is stored 
+** in the database without the found length specifier at the start of on-disk
+** doclists.
+*/
+static int fts3TermSelect(
+  Fts3Table *p,                   /* Virtual table handle */
+  Fts3PhraseToken *pTok,          /* Token to query for */
+  int iColumn,                    /* Column to query (or -ve for all columns) */
+  int isReqPos,                   /* True to include position lists in output */
+  int *pnOut,                     /* OUT: Size of buffer at *ppOut */
+  char **ppOut                    /* OUT: Malloced result buffer */
+){
+  int rc;                         /* Return code */
+  Fts3SegReaderCursor *pSegcsr;   /* Seg-reader cursor for this term */
+  TermSelect tsc;                 /* Context object for fts3TermSelectCb() */
+  Fts3SegFilter filter;           /* Segment term filter configuration */
+
+  pSegcsr = pTok->pSegcsr;
+  memset(&tsc, 0, sizeof(TermSelect));
+  tsc.isReqPos = isReqPos;
+
+  filter.flags = FTS3_SEGMENT_IGNORE_EMPTY 
+        | (pTok->isPrefix ? FTS3_SEGMENT_PREFIX : 0)
+        | (isReqPos ? FTS3_SEGMENT_REQUIRE_POS : 0)
+        | (iColumn<p->nColumn ? FTS3_SEGMENT_COLUMN_FILTER : 0);
+  filter.iCol = iColumn;
+  filter.zTerm = pTok->z;
+  filter.nTerm = pTok->n;
+
+  rc = sqlite3Fts3SegReaderStart(p, pSegcsr, &filter);
+  while( SQLITE_OK==rc
+      && SQLITE_ROW==(rc = sqlite3Fts3SegReaderStep(p, pSegcsr)) 
+  ){
+    rc = fts3TermSelectCb(p, (void *)&tsc, 
+        pSegcsr->zTerm, pSegcsr->nTerm, pSegcsr->aDoclist, pSegcsr->nDoclist
+    );
+  }
+
+  if( rc==SQLITE_OK ){
+    rc = fts3TermSelectMerge(&tsc);
+  }
+  if( rc==SQLITE_OK ){
+    *ppOut = tsc.aaOutput[0];
+    *pnOut = tsc.anOutput[0];
+  }else{
+    int i;
+    for(i=0; i<SizeofArray(tsc.aaOutput); i++){
+      sqlite3_free(tsc.aaOutput[i]);
+    }
+  }
+
+  fts3SegReaderCursorFree(pSegcsr);
+  pTok->pSegcsr = 0;
+  return rc;
+}
+
+/*
+** This function counts the total number of docids in the doclist stored
+** in buffer aList[], size nList bytes.
+**
+** If the isPoslist argument is true, then it is assumed that the doclist
+** contains a position-list following each docid. Otherwise, it is assumed
+** that the doclist is simply a list of docids stored as delta encoded 
+** varints.
+*/
+static int fts3DoclistCountDocids(int isPoslist, char *aList, int nList){
+  int nDoc = 0;                   /* Return value */
+  if( aList ){
+    char *aEnd = &aList[nList];   /* Pointer to one byte after EOF */
+    char *p = aList;              /* Cursor */
+    if( !isPoslist ){
+      /* The number of docids in the list is the same as the number of 
+      ** varints. In FTS3 a varint consists of a single byte with the 0x80 
+      ** bit cleared and zero or more bytes with the 0x80 bit set. So to
+      ** count the varints in the buffer, just count the number of bytes
+      ** with the 0x80 bit clear.  */
+      while( p<aEnd ) nDoc += (((*p++)&0x80)==0);
+    }else{
+      while( p<aEnd ){
+        nDoc++;
+        while( (*p++)&0x80 );     /* Skip docid varint */
+        fts3PoslistCopy(0, &p);   /* Skip over position list */
+      }
+    }
+  }
+
+  return nDoc;
+}
+
+/*
+** Call sqlite3Fts3DeferToken() for each token in the expression pExpr.
+*/
+static int fts3DeferExpression(Fts3Cursor *pCsr, Fts3Expr *pExpr){
+  int rc = SQLITE_OK;
+  if( pExpr ){
+    rc = fts3DeferExpression(pCsr, pExpr->pLeft);
+    if( rc==SQLITE_OK ){
+      rc = fts3DeferExpression(pCsr, pExpr->pRight);
+    }
+    if( pExpr->eType==FTSQUERY_PHRASE ){
+      int iCol = pExpr->pPhrase->iColumn;
+      int i;
+      for(i=0; rc==SQLITE_OK && i<pExpr->pPhrase->nToken; i++){
+        Fts3PhraseToken *pToken = &pExpr->pPhrase->aToken[i];
+        if( pToken->pDeferred==0 ){
+          rc = sqlite3Fts3DeferToken(pCsr, pToken, iCol);
+        }
+      }
+    }
+  }
+  return rc;
+}
+
+/*
+** This function removes the position information from a doclist. When
+** called, buffer aList (size *pnList bytes) contains a doclist that includes
+** position information. This function removes the position information so
+** that aList contains only docids, and adjusts *pnList to reflect the new
+** (possibly reduced) size of the doclist.
+*/
+static void fts3DoclistStripPositions(
+  char *aList,                    /* IN/OUT: Buffer containing doclist */
+  int *pnList                     /* IN/OUT: Size of doclist in bytes */
+){
+  if( aList ){
+    char *aEnd = &aList[*pnList]; /* Pointer to one byte after EOF */
+    char *p = aList;              /* Input cursor */
+    char *pOut = aList;           /* Output cursor */
+  
+    while( p<aEnd ){
+      sqlite3_int64 delta;
+      p += sqlite3Fts3GetVarint(p, &delta);
+      fts3PoslistCopy(0, &p);
+      pOut += sqlite3Fts3PutVarint(pOut, delta);
+    }
+
+    *pnList = (int)(pOut - aList);
+  }
+}
+
+/* 
+** Return a DocList corresponding to the phrase *pPhrase.
+**
+** If this function returns SQLITE_OK, but *pnOut is set to a negative value,
+** then no tokens in the phrase were looked up in the full-text index. This
+** is only possible when this function is called from within xFilter(). The
+** caller should assume that all documents match the phrase. The actual
+** filtering will take place in xNext().
+*/
+static int fts3PhraseSelect(
+  Fts3Cursor *pCsr,               /* Virtual table cursor handle */
+  Fts3Phrase *pPhrase,            /* Phrase to return a doclist for */
+  int isReqPos,                   /* True if output should contain positions */
+  char **paOut,                   /* OUT: Pointer to malloc'd result buffer */
+  int *pnOut                      /* OUT: Size of buffer at *paOut */
+){
+  char *pOut = 0;
+  int nOut = 0;
+  int rc = SQLITE_OK;
+  int ii;
+  int iCol = pPhrase->iColumn;
+  int isTermPos = (pPhrase->nToken>1 || isReqPos);
+  Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
+  int isFirst = 1;
+
+  int iPrevTok = 0;
+  int nDoc = 0;
+
+  /* If this is an xFilter() evaluation, create a segment-reader for each
+  ** phrase token. Or, if this is an xNext() or snippet/offsets/matchinfo
+  ** evaluation, only create segment-readers if there are no Fts3DeferredToken
+  ** objects attached to the phrase-tokens.
+  */
+  for(ii=0; ii<pPhrase->nToken; ii++){
+    Fts3PhraseToken *pTok = &pPhrase->aToken[ii];
+    if( pTok->pSegcsr==0 ){
+      if( (pCsr->eEvalmode==FTS3_EVAL_FILTER)
+       || (pCsr->eEvalmode==FTS3_EVAL_NEXT && pCsr->pDeferred==0) 
+       || (pCsr->eEvalmode==FTS3_EVAL_MATCHINFO && pTok->bFulltext) 
+      ){
+        rc = fts3TermSegReaderCursor(
+            pCsr, pTok->z, pTok->n, pTok->isPrefix, &pTok->pSegcsr
+        );
+        if( rc!=SQLITE_OK ) return rc;
+      }
+    }
+  }
+
+  for(ii=0; ii<pPhrase->nToken; ii++){
+    Fts3PhraseToken *pTok;        /* Token to find doclist for */
+    int iTok = 0;                 /* The token being queried this iteration */
+    char *pList = 0;              /* Pointer to token doclist */
+    int nList = 0;                /* Size of buffer at pList */
+
+    /* Select a token to process. If this is an xFilter() call, then tokens 
+    ** are processed in order from least to most costly. Otherwise, tokens 
+    ** are processed in the order in which they occur in the phrase.
+    */
+    if( pCsr->eEvalmode==FTS3_EVAL_MATCHINFO ){
+      assert( isReqPos );
+      iTok = ii;
+      pTok = &pPhrase->aToken[iTok];
+      if( pTok->bFulltext==0 ) continue;
+    }else if( pCsr->eEvalmode==FTS3_EVAL_NEXT || isReqPos ){
+      iTok = ii;
+      pTok = &pPhrase->aToken[iTok];
+    }else{
+      int nMinCost = 0x7FFFFFFF;
+      int jj;
+
+      /* Find the remaining token with the lowest cost. */
+      for(jj=0; jj<pPhrase->nToken; jj++){
+        Fts3SegReaderCursor *pSegcsr = pPhrase->aToken[jj].pSegcsr;
+        if( pSegcsr && pSegcsr->nCost<nMinCost ){
+          iTok = jj;
+          nMinCost = pSegcsr->nCost;
+        }
+      }
+      pTok = &pPhrase->aToken[iTok];
+
+      /* This branch is taken if it is determined that loading the doclist
+      ** for the next token would require more IO than loading all documents
+      ** currently identified by doclist pOut/nOut. No further doclists will
+      ** be loaded from the full-text index for this phrase.
+      */
+      if( nMinCost>nDoc && ii>0 ){
+        rc = fts3DeferExpression(pCsr, pCsr->pExpr);
+        break;
+      }
+    }
+
+    if( pCsr->eEvalmode==FTS3_EVAL_NEXT && pTok->pDeferred ){
+      rc = fts3DeferredTermSelect(pTok->pDeferred, isTermPos, &nList, &pList);
+    }else{
+      if( pTok->pSegcsr ){
+        rc = fts3TermSelect(p, pTok, iCol, isTermPos, &nList, &pList);
+      }
+      pTok->bFulltext = 1;
+    }
+    assert( rc!=SQLITE_OK || pCsr->eEvalmode || pTok->pSegcsr==0 );
+    if( rc!=SQLITE_OK ) break;
+
+    if( isFirst ){
+      pOut = pList;
+      nOut = nList;
+      if( pCsr->eEvalmode==FTS3_EVAL_FILTER && pPhrase->nToken>1 ){
+        nDoc = fts3DoclistCountDocids(1, pOut, nOut);
+      }
+      isFirst = 0;
+      iPrevTok = iTok;
+    }else{
+      /* Merge the new term list and the current output. */
+      char *aLeft, *aRight;
+      int nLeft, nRight;
+      int nDist;
+      int mt;
+
+      /* If this is the final token of the phrase, and positions were not
+      ** requested by the caller, use MERGE_PHRASE instead of POS_PHRASE.
+      ** This drops the position information from the output list.
+      */
+      mt = MERGE_POS_PHRASE;
+      if( ii==pPhrase->nToken-1 && !isReqPos ) mt = MERGE_PHRASE;
+
+      assert( iPrevTok!=iTok );
+      if( iPrevTok<iTok ){
+        aLeft = pOut;
+        nLeft = nOut;
+        aRight = pList;
+        nRight = nList;
+        nDist = iTok-iPrevTok;
+        iPrevTok = iTok;
+      }else{
+        aRight = pOut;
+        nRight = nOut;
+        aLeft = pList;
+        nLeft = nList;
+        nDist = iPrevTok-iTok;
+      }
+      pOut = aRight;
+      fts3DoclistMerge(
+          mt, nDist, 0, pOut, &nOut, aLeft, nLeft, aRight, nRight, &nDoc
+      );
+      sqlite3_free(aLeft);
+    }
+    assert( nOut==0 || pOut!=0 );
+  }
+
+  if( rc==SQLITE_OK ){
+    if( ii!=pPhrase->nToken ){
+      assert( pCsr->eEvalmode==FTS3_EVAL_FILTER && isReqPos==0 );
+      fts3DoclistStripPositions(pOut, &nOut);
+    }
+    *paOut = pOut;
+    *pnOut = nOut;
+  }else{
+    sqlite3_free(pOut);
+  }
+  return rc;
+}
+
+/*
+** This function merges two doclists according to the requirements of a
+** NEAR operator.
+**
+** Both input doclists must include position information. The output doclist 
+** includes position information if the first argument to this function
+** is MERGE_POS_NEAR, or does not if it is MERGE_NEAR.
+*/
+static int fts3NearMerge(
+  int mergetype,                  /* MERGE_POS_NEAR or MERGE_NEAR */
+  int nNear,                      /* Parameter to NEAR operator */
+  int nTokenLeft,                 /* Number of tokens in LHS phrase arg */
+  char *aLeft,                    /* Doclist for LHS (incl. positions) */
+  int nLeft,                      /* Size of LHS doclist in bytes */
+  int nTokenRight,                /* As nTokenLeft */
+  char *aRight,                   /* As aLeft */
+  int nRight,                     /* As nRight */
+  char **paOut,                   /* OUT: Results of merge (malloced) */
+  int *pnOut                      /* OUT: Sized of output buffer */
+){
+  char *aOut;                     /* Buffer to write output doclist to */
+  int rc;                         /* Return code */
+
+  assert( mergetype==MERGE_POS_NEAR || MERGE_NEAR );
+
+  aOut = sqlite3_malloc(nLeft+nRight+1);
+  if( aOut==0 ){
+    rc = SQLITE_NOMEM;
+  }else{
+    rc = fts3DoclistMerge(mergetype, nNear+nTokenRight, nNear+nTokenLeft, 
+      aOut, pnOut, aLeft, nLeft, aRight, nRight, 0
+    );
+    if( rc!=SQLITE_OK ){
+      sqlite3_free(aOut);
+      aOut = 0;
+    }
+  }
+
+  *paOut = aOut;
+  return rc;
+}
+
+/*
+** This function is used as part of the processing for the snippet() and
+** offsets() functions.
+**
+** Both pLeft and pRight are expression nodes of type FTSQUERY_PHRASE. Both
+** have their respective doclists (including position information) loaded
+** in Fts3Expr.aDoclist/nDoclist. This function removes all entries from
+** each doclist that are not within nNear tokens of a corresponding entry
+** in the other doclist.
+*/
+SQLITE_PRIVATE int sqlite3Fts3ExprNearTrim(Fts3Expr *pLeft, Fts3Expr *pRight, int nNear){
+  int rc;                         /* Return code */
+
+  assert( pLeft->eType==FTSQUERY_PHRASE );
+  assert( pRight->eType==FTSQUERY_PHRASE );
+  assert( pLeft->isLoaded && pRight->isLoaded );
+
+  if( pLeft->aDoclist==0 || pRight->aDoclist==0 ){
+    sqlite3_free(pLeft->aDoclist);
+    sqlite3_free(pRight->aDoclist);
+    pRight->aDoclist = 0;
+    pLeft->aDoclist = 0;
+    rc = SQLITE_OK;
+  }else{
+    char *aOut;                   /* Buffer in which to assemble new doclist */
+    int nOut;                     /* Size of buffer aOut in bytes */
+
+    rc = fts3NearMerge(MERGE_POS_NEAR, nNear, 
+        pLeft->pPhrase->nToken, pLeft->aDoclist, pLeft->nDoclist,
+        pRight->pPhrase->nToken, pRight->aDoclist, pRight->nDoclist,
+        &aOut, &nOut
+    );
+    if( rc!=SQLITE_OK ) return rc;
+    sqlite3_free(pRight->aDoclist);
+    pRight->aDoclist = aOut;
+    pRight->nDoclist = nOut;
+
+    rc = fts3NearMerge(MERGE_POS_NEAR, nNear, 
+        pRight->pPhrase->nToken, pRight->aDoclist, pRight->nDoclist,
+        pLeft->pPhrase->nToken, pLeft->aDoclist, pLeft->nDoclist,
+        &aOut, &nOut
+    );
+    sqlite3_free(pLeft->aDoclist);
+    pLeft->aDoclist = aOut;
+    pLeft->nDoclist = nOut;
+  }
+  return rc;
+}
+
+
+/*
+** Allocate an Fts3SegReaderArray for each token in the expression pExpr. 
+** The allocated objects are stored in the Fts3PhraseToken.pArray member
+** variables of each token structure.
+*/
+static int fts3ExprAllocateSegReaders(
+  Fts3Cursor *pCsr,               /* FTS3 table */
+  Fts3Expr *pExpr,                /* Expression to create seg-readers for */
+  int *pnExpr                     /* OUT: Number of AND'd expressions */
+){
+  int rc = SQLITE_OK;             /* Return code */
+
+  assert( pCsr->eEvalmode==FTS3_EVAL_FILTER );
+  if( pnExpr && pExpr->eType!=FTSQUERY_AND ){
+    (*pnExpr)++;
+    pnExpr = 0;
+  }
+
+  if( pExpr->eType==FTSQUERY_PHRASE ){
+    Fts3Phrase *pPhrase = pExpr->pPhrase;
+    int ii;
+
+    for(ii=0; rc==SQLITE_OK && ii<pPhrase->nToken; ii++){
+      Fts3PhraseToken *pTok = &pPhrase->aToken[ii];
+      if( pTok->pSegcsr==0 ){
+        rc = fts3TermSegReaderCursor(
+            pCsr, pTok->z, pTok->n, pTok->isPrefix, &pTok->pSegcsr
+        );
+      }
+    }
+  }else{ 
+    rc = fts3ExprAllocateSegReaders(pCsr, pExpr->pLeft, pnExpr);
+    if( rc==SQLITE_OK ){
+      rc = fts3ExprAllocateSegReaders(pCsr, pExpr->pRight, pnExpr);
+    }
+  }
+  return rc;
+}
+
+/*
+** Free the Fts3SegReaderArray objects associated with each token in the
+** expression pExpr. In other words, this function frees the resources
+** allocated by fts3ExprAllocateSegReaders().
+*/
+static void fts3ExprFreeSegReaders(Fts3Expr *pExpr){
+  if( pExpr ){
+    Fts3Phrase *pPhrase = pExpr->pPhrase;
+    if( pPhrase ){
+      int kk;
+      for(kk=0; kk<pPhrase->nToken; kk++){
+        fts3SegReaderCursorFree(pPhrase->aToken[kk].pSegcsr);
+        pPhrase->aToken[kk].pSegcsr = 0;
+      }
+    }
+    fts3ExprFreeSegReaders(pExpr->pLeft);
+    fts3ExprFreeSegReaders(pExpr->pRight);
+  }
+}
+
+/*
+** Return the sum of the costs of all tokens in the expression pExpr. This
+** function must be called after Fts3SegReaderArrays have been allocated
+** for all tokens using fts3ExprAllocateSegReaders().
+*/
+static int fts3ExprCost(Fts3Expr *pExpr){
+  int nCost;                      /* Return value */
+  if( pExpr->eType==FTSQUERY_PHRASE ){
+    Fts3Phrase *pPhrase = pExpr->pPhrase;
+    int ii;
+    nCost = 0;
+    for(ii=0; ii<pPhrase->nToken; ii++){
+      Fts3SegReaderCursor *pSegcsr = pPhrase->aToken[ii].pSegcsr;
+      if( pSegcsr ) nCost += pSegcsr->nCost;
+    }
+  }else{
+    nCost = fts3ExprCost(pExpr->pLeft) + fts3ExprCost(pExpr->pRight);
+  }
+  return nCost;
+}
+
+/*
+** The following is a helper function (and type) for fts3EvalExpr(). It
+** must be called after Fts3SegReaders have been allocated for every token
+** in the expression. See the context it is called from in fts3EvalExpr()
+** for further explanation.
+*/
+typedef struct ExprAndCost ExprAndCost;
+struct ExprAndCost {
+  Fts3Expr *pExpr;
+  int nCost;
+};
+static void fts3ExprAssignCosts(
+  Fts3Expr *pExpr,                /* Expression to create seg-readers for */
+  ExprAndCost **ppExprCost        /* OUT: Write to *ppExprCost */
+){
+  if( pExpr->eType==FTSQUERY_AND ){
+    fts3ExprAssignCosts(pExpr->pLeft, ppExprCost);
+    fts3ExprAssignCosts(pExpr->pRight, ppExprCost);
+  }else{
+    (*ppExprCost)->pExpr = pExpr;
+    (*ppExprCost)->nCost = fts3ExprCost(pExpr);
+    (*ppExprCost)++;
+  }
+}
+
+/*
+** Evaluate the full-text expression pExpr against FTS3 table pTab. Store
+** the resulting doclist in *paOut and *pnOut. This routine mallocs for
+** the space needed to store the output. The caller is responsible for
+** freeing the space when it has finished.
+**
+** This function is called in two distinct contexts:
+**
+**   * From within the virtual table xFilter() method. In this case, the
+**     output doclist contains entries for all rows in the table, based on
+**     data read from the full-text index.
+**
+**     In this case, if the query expression contains one or more tokens that 
+**     are very common, then the returned doclist may contain a superset of 
+**     the documents that actually match the expression.
+**
+**   * From within the virtual table xNext() method. This call is only made
+**     if the call from within xFilter() found that there were very common 
+**     tokens in the query expression and did return a superset of the 
+**     matching documents. In this case the returned doclist contains only
+**     entries that correspond to the current row of the table. Instead of
+**     reading the data for each token from the full-text index, the data is
+**     already available in-memory in the Fts3PhraseToken.pDeferred structures.
+**     See fts3EvalDeferred() for how it gets there.
+**
+** In the first case above, Fts3Cursor.doDeferred==0. In the second (if it is
+** required) Fts3Cursor.doDeferred==1.
+**
+** If the SQLite invokes the snippet(), offsets() or matchinfo() function
+** as part of a SELECT on an FTS3 table, this function is called on each
+** individual phrase expression in the query. If there were very common tokens
+** found in the xFilter() call, then this function is called once for phrase
+** for each row visited, and the returned doclist contains entries for the
+** current row only. Otherwise, if there were no very common tokens, then this
+** function is called once only for each phrase in the query and the returned
+** doclist contains entries for all rows of the table.
+**
+** Fts3Cursor.doDeferred==1 when this function is called on phrases as a
+** result of a snippet(), offsets() or matchinfo() invocation.
+*/
+static int fts3EvalExpr(
+  Fts3Cursor *p,                  /* Virtual table cursor handle */
+  Fts3Expr *pExpr,                /* Parsed fts3 expression */
+  char **paOut,                   /* OUT: Pointer to malloc'd result buffer */
+  int *pnOut,                     /* OUT: Size of buffer at *paOut */
+  int isReqPos                    /* Require positions in output buffer */
+){
+  int rc = SQLITE_OK;             /* Return code */
+
+  /* Zero the output parameters. */
+  *paOut = 0;
+  *pnOut = 0;
+
+  if( pExpr ){
+    assert( pExpr->eType==FTSQUERY_NEAR   || pExpr->eType==FTSQUERY_OR     
+         || pExpr->eType==FTSQUERY_AND    || pExpr->eType==FTSQUERY_NOT
+         || pExpr->eType==FTSQUERY_PHRASE
+    );
+    assert( pExpr->eType==FTSQUERY_PHRASE || isReqPos==0 );
+
+    if( pExpr->eType==FTSQUERY_PHRASE ){
+      rc = fts3PhraseSelect(p, pExpr->pPhrase,
+          isReqPos || (pExpr->pParent && pExpr->pParent->eType==FTSQUERY_NEAR),
+          paOut, pnOut
+      );
+      fts3ExprFreeSegReaders(pExpr);
+    }else if( p->eEvalmode==FTS3_EVAL_FILTER && pExpr->eType==FTSQUERY_AND ){
+      ExprAndCost *aExpr = 0;     /* Array of AND'd expressions and costs */
+      int nExpr = 0;              /* Size of aExpr[] */
+      char *aRet = 0;             /* Doclist to return to caller */
+      int nRet = 0;               /* Length of aRet[] in bytes */
+      int nDoc = 0x7FFFFFFF;
+
+      assert( !isReqPos );
+
+      rc = fts3ExprAllocateSegReaders(p, pExpr, &nExpr);
+      if( rc==SQLITE_OK ){
+        assert( nExpr>1 );
+        aExpr = sqlite3_malloc(sizeof(ExprAndCost) * nExpr);
+        if( !aExpr ) rc = SQLITE_NOMEM;
+      }
+      if( rc==SQLITE_OK ){
+        int ii;                   /* Used to iterate through expressions */
+
+        fts3ExprAssignCosts(pExpr, &aExpr);
+        aExpr -= nExpr;
+        for(ii=0; ii<nExpr; ii++){
+          char *aNew;
+          int nNew;
+          int jj;
+          ExprAndCost *pBest = 0;
+  
+          for(jj=0; jj<nExpr; jj++){
+            ExprAndCost *pCand = &aExpr[jj];
+            if( pCand->pExpr && (pBest==0 || pCand->nCost<pBest->nCost) ){
+              pBest = pCand;
+            }
+          }
+  
+          if( pBest->nCost>nDoc ){
+            rc = fts3DeferExpression(p, p->pExpr);
+            break;
+          }else{
+            rc = fts3EvalExpr(p, pBest->pExpr, &aNew, &nNew, 0);
+            if( rc!=SQLITE_OK ) break;
+            pBest->pExpr = 0;
+            if( ii==0 ){
+              aRet = aNew;
+              nRet = nNew;
+              nDoc = fts3DoclistCountDocids(0, aRet, nRet);
+            }else{
+              fts3DoclistMerge(
+                  MERGE_AND, 0, 0, aRet, &nRet, aRet, nRet, aNew, nNew, &nDoc
+              );
+              sqlite3_free(aNew);
+            }
+          }
+        }
+      }
+
+      if( rc==SQLITE_OK ){
+        *paOut = aRet;
+        *pnOut = nRet;
+      }else{
+        assert( *paOut==0 );
+        sqlite3_free(aRet);
+      }
+      sqlite3_free(aExpr);
+      fts3ExprFreeSegReaders(pExpr);
+
+    }else{
+      char *aLeft;
+      char *aRight;
+      int nLeft;
+      int nRight;
+
+      assert( pExpr->eType==FTSQUERY_NEAR 
+           || pExpr->eType==FTSQUERY_OR
+           || pExpr->eType==FTSQUERY_NOT
+           || (pExpr->eType==FTSQUERY_AND && p->eEvalmode==FTS3_EVAL_NEXT)
+      );
+
+      if( 0==(rc = fts3EvalExpr(p, pExpr->pRight, &aRight, &nRight, isReqPos))
+       && 0==(rc = fts3EvalExpr(p, pExpr->pLeft, &aLeft, &nLeft, isReqPos))
+      ){
+        switch( pExpr->eType ){
+          case FTSQUERY_NEAR: {
+            Fts3Expr *pLeft;
+            Fts3Expr *pRight;
+            int mergetype = MERGE_NEAR;
+            if( pExpr->pParent && pExpr->pParent->eType==FTSQUERY_NEAR ){
+              mergetype = MERGE_POS_NEAR;
+            }
+            pLeft = pExpr->pLeft;
+            while( pLeft->eType==FTSQUERY_NEAR ){ 
+              pLeft=pLeft->pRight;
+            }
+            pRight = pExpr->pRight;
+            assert( pRight->eType==FTSQUERY_PHRASE );
+            assert( pLeft->eType==FTSQUERY_PHRASE );
+
+            rc = fts3NearMerge(mergetype, pExpr->nNear, 
+                pLeft->pPhrase->nToken, aLeft, nLeft,
+                pRight->pPhrase->nToken, aRight, nRight,
+                paOut, pnOut
+            );
+            sqlite3_free(aLeft);
+            break;
+          }
+
+          case FTSQUERY_OR: {
+            /* Allocate a buffer for the output. The maximum size is the
+            ** sum of the sizes of the two input buffers. The +1 term is
+            ** so that a buffer of zero bytes is never allocated - this can
+            ** cause fts3DoclistMerge() to incorrectly return SQLITE_NOMEM.
+            */
+            char *aBuffer = sqlite3_malloc(nRight+nLeft+1);
+            rc = fts3DoclistMerge(MERGE_OR, 0, 0, aBuffer, pnOut,
+                aLeft, nLeft, aRight, nRight, 0
+            );
+            *paOut = aBuffer;
+            sqlite3_free(aLeft);
+            break;
+          }
+
+          default: {
+            assert( FTSQUERY_NOT==MERGE_NOT && FTSQUERY_AND==MERGE_AND );
+            fts3DoclistMerge(pExpr->eType, 0, 0, aLeft, pnOut,
+                aLeft, nLeft, aRight, nRight, 0
+            );
+            *paOut = aLeft;
+            break;
+          }
+        }
+      }
+      sqlite3_free(aRight);
+    }
+  }
+
+  assert( rc==SQLITE_OK || *paOut==0 );
+  return rc;
+}
+
+/*
+** This function is called from within xNext() for each row visited by
+** an FTS3 query. If evaluating the FTS3 query expression within xFilter()
+** was able to determine the exact set of matching rows, this function sets
+** *pbRes to true and returns SQLITE_IO immediately.
+**
+** Otherwise, if evaluating the query expression within xFilter() returned a
+** superset of the matching documents instead of an exact set (this happens
+** when the query includes very common tokens and it is deemed too expensive to
+** load their doclists from disk), this function tests if the current row
+** really does match the FTS3 query.
+**
+** If an error occurs, an SQLite error code is returned. Otherwise, SQLITE_OK
+** is returned and *pbRes is set to true if the current row matches the
+** FTS3 query (and should be included in the results returned to SQLite), or
+** false otherwise.
+*/
+static int fts3EvalDeferred(
+  Fts3Cursor *pCsr,               /* FTS3 cursor pointing at row to test */
+  int *pbRes                      /* OUT: Set to true if row is a match */
+){
+  int rc = SQLITE_OK;
+  if( pCsr->pDeferred==0 ){
+    *pbRes = 1;
+  }else{
+    rc = fts3CursorSeek(0, pCsr);
+    if( rc==SQLITE_OK ){
+      sqlite3Fts3FreeDeferredDoclists(pCsr);
+      rc = sqlite3Fts3CacheDeferredDoclists(pCsr);
+    }
+    if( rc==SQLITE_OK ){
+      char *a = 0;
+      int n = 0;
+      rc = fts3EvalExpr(pCsr, pCsr->pExpr, &a, &n, 0);
+      assert( n>=0 );
+      *pbRes = (n>0);
+      sqlite3_free(a);
+    }
+  }
+  return rc;
+}
+
+/*
+** Advance the cursor to the next row in the %_content table that
+** matches the search criteria.  For a MATCH search, this will be
+** the next row that matches. For a full-table scan, this will be
+** simply the next row in the %_content table.  For a docid lookup,
+** this routine simply sets the EOF flag.
+**
+** Return SQLITE_OK if nothing goes wrong.  SQLITE_OK is returned
+** even if we reach end-of-file.  The fts3EofMethod() will be called
+** subsequently to determine whether or not an EOF was hit.
+*/
+static int fts3NextMethod(sqlite3_vtab_cursor *pCursor){
+  int res;
+  int rc = SQLITE_OK;             /* Return code */
+  Fts3Cursor *pCsr = (Fts3Cursor *)pCursor;
+
+  pCsr->eEvalmode = FTS3_EVAL_NEXT;
+  do {
+    if( pCsr->aDoclist==0 ){
+      if( SQLITE_ROW!=sqlite3_step(pCsr->pStmt) ){
+        pCsr->isEof = 1;
+        rc = sqlite3_reset(pCsr->pStmt);
+        break;
+      }
+      pCsr->iPrevId = sqlite3_column_int64(pCsr->pStmt, 0);
+    }else{
+      if( pCsr->pNextId>=&pCsr->aDoclist[pCsr->nDoclist] ){
+        pCsr->isEof = 1;
+        break;
+      }
+      sqlite3_reset(pCsr->pStmt);
+      fts3GetDeltaVarint(&pCsr->pNextId, &pCsr->iPrevId);
+      pCsr->isRequireSeek = 1;
+      pCsr->isMatchinfoNeeded = 1;
+    }
+  }while( SQLITE_OK==(rc = fts3EvalDeferred(pCsr, &res)) && res==0 );
+
+  return rc;
+}
+
+/*
+** This is the xFilter interface for the virtual table.  See
+** the virtual table xFilter method documentation for additional
+** information.
+**
+** If idxNum==FTS3_FULLSCAN_SEARCH then do a full table scan against
+** the %_content table.
+**
+** If idxNum==FTS3_DOCID_SEARCH then do a docid lookup for a single entry
+** in the %_content table.
+**
+** If idxNum>=FTS3_FULLTEXT_SEARCH then use the full text index.  The
+** column on the left-hand side of the MATCH operator is column
+** number idxNum-FTS3_FULLTEXT_SEARCH, 0 indexed.  argv[0] is the right-hand
+** side of the MATCH operator.
+*/
+static int fts3FilterMethod(
+  sqlite3_vtab_cursor *pCursor,   /* The cursor used for this query */
+  int idxNum,                     /* Strategy index */
+  const char *idxStr,             /* Unused */
+  int nVal,                       /* Number of elements in apVal */
+  sqlite3_value **apVal           /* Arguments for the indexing scheme */
+){
+  const char *azSql[] = {
+    "SELECT %s FROM %Q.'%q_content' AS x WHERE docid = ?", /* non-full-scan */
+    "SELECT %s FROM %Q.'%q_content' AS x ",                /* full-scan */
+  };
+  int rc;                         /* Return code */
+  char *zSql;                     /* SQL statement used to access %_content */
+  Fts3Table *p = (Fts3Table *)pCursor->pVtab;
+  Fts3Cursor *pCsr = (Fts3Cursor *)pCursor;
+
+  UNUSED_PARAMETER(idxStr);
+  UNUSED_PARAMETER(nVal);
+
+  assert( idxNum>=0 && idxNum<=(FTS3_FULLTEXT_SEARCH+p->nColumn) );
+  assert( nVal==0 || nVal==1 );
+  assert( (nVal==0)==(idxNum==FTS3_FULLSCAN_SEARCH) );
+  assert( p->pSegments==0 );
+
+  /* In case the cursor has been used before, clear it now. */
+  sqlite3_finalize(pCsr->pStmt);
+  sqlite3_free(pCsr->aDoclist);
+  sqlite3Fts3ExprFree(pCsr->pExpr);
+  memset(&pCursor[1], 0, sizeof(Fts3Cursor)-sizeof(sqlite3_vtab_cursor));
+
+  if( idxNum!=FTS3_DOCID_SEARCH && idxNum!=FTS3_FULLSCAN_SEARCH ){
+    int iCol = idxNum-FTS3_FULLTEXT_SEARCH;
+    const char *zQuery = (const char *)sqlite3_value_text(apVal[0]);
+
+    if( zQuery==0 && sqlite3_value_type(apVal[0])!=SQLITE_NULL ){
+      return SQLITE_NOMEM;
+    }
+
+    rc = sqlite3Fts3ExprParse(p->pTokenizer, p->azColumn, p->nColumn, 
+        iCol, zQuery, -1, &pCsr->pExpr
+    );
+    if( rc!=SQLITE_OK ){
+      if( rc==SQLITE_ERROR ){
+        p->base.zErrMsg = sqlite3_mprintf("malformed MATCH expression: [%s]",
+                                          zQuery);
+      }
+      return rc;
+    }
+
+    rc = sqlite3Fts3ReadLock(p);
+    if( rc!=SQLITE_OK ) return rc;
+
+    rc = fts3EvalExpr(pCsr, pCsr->pExpr, &pCsr->aDoclist, &pCsr->nDoclist, 0);
+    sqlite3Fts3SegmentsClose(p);
+    if( rc!=SQLITE_OK ) return rc;
+    pCsr->pNextId = pCsr->aDoclist;
+    pCsr->iPrevId = 0;
+  }
+
+  /* Compile a SELECT statement for this cursor. For a full-table-scan, the
+  ** statement loops through all rows of the %_content table. For a
+  ** full-text query or docid lookup, the statement retrieves a single
+  ** row by docid.
+  */
+  zSql = (char *)azSql[idxNum==FTS3_FULLSCAN_SEARCH];
+  zSql = sqlite3_mprintf(zSql, p->zReadExprlist, p->zDb, p->zName);
+  if( !zSql ){
+    rc = SQLITE_NOMEM;
+  }else{
+    rc = sqlite3_prepare_v2(p->db, zSql, -1, &pCsr->pStmt, 0);
+    sqlite3_free(zSql);
+  }
+  if( rc==SQLITE_OK && idxNum==FTS3_DOCID_SEARCH ){
+    rc = sqlite3_bind_value(pCsr->pStmt, 1, apVal[0]);
+  }
+  pCsr->eSearch = (i16)idxNum;
+
+  if( rc!=SQLITE_OK ) return rc;
+  return fts3NextMethod(pCursor);
+}
+
+/* 
+** This is the xEof method of the virtual table. SQLite calls this 
+** routine to find out if it has reached the end of a result set.
+*/
+static int fts3EofMethod(sqlite3_vtab_cursor *pCursor){
+  return ((Fts3Cursor *)pCursor)->isEof;
+}
+
+/* 
+** This is the xRowid method. The SQLite core calls this routine to
+** retrieve the rowid for the current row of the result set. fts3
+** exposes %_content.docid as the rowid for the virtual table. The
+** rowid should be written to *pRowid.
+*/
+static int fts3RowidMethod(sqlite3_vtab_cursor *pCursor, sqlite_int64 *pRowid){
+  Fts3Cursor *pCsr = (Fts3Cursor *) pCursor;
+  if( pCsr->aDoclist ){
+    *pRowid = pCsr->iPrevId;
+  }else{
+    /* This branch runs if the query is implemented using a full-table scan
+    ** (not using the full-text index). In this case grab the rowid from the
+    ** SELECT statement.
+    */
+    assert( pCsr->isRequireSeek==0 );
+    *pRowid = sqlite3_column_int64(pCsr->pStmt, 0);
+  }
+  return SQLITE_OK;
+}
+
+/* 
+** This is the xColumn method, called by SQLite to request a value from
+** the row that the supplied cursor currently points to.
+*/
+static int fts3ColumnMethod(
+  sqlite3_vtab_cursor *pCursor,   /* Cursor to retrieve value from */
+  sqlite3_context *pContext,      /* Context for sqlite3_result_xxx() calls */
+  int iCol                        /* Index of column to read value from */
+){
+  int rc;                         /* Return Code */
+  Fts3Cursor *pCsr = (Fts3Cursor *) pCursor;
+  Fts3Table *p = (Fts3Table *)pCursor->pVtab;
+
+  /* The column value supplied by SQLite must be in range. */
+  assert( iCol>=0 && iCol<=p->nColumn+1 );
+
+  if( iCol==p->nColumn+1 ){
+    /* This call is a request for the "docid" column. Since "docid" is an 
+    ** alias for "rowid", use the xRowid() method to obtain the value.
+    */
+    sqlite3_int64 iRowid;
+    rc = fts3RowidMethod(pCursor, &iRowid);
+    sqlite3_result_int64(pContext, iRowid);
+  }else if( iCol==p->nColumn ){
+    /* The extra column whose name is the same as the table.
+    ** Return a blob which is a pointer to the cursor.
+    */
+    sqlite3_result_blob(pContext, &pCsr, sizeof(pCsr), SQLITE_TRANSIENT);
+    rc = SQLITE_OK;
+  }else{
+    rc = fts3CursorSeek(0, pCsr);
+    if( rc==SQLITE_OK ){
+      sqlite3_result_value(pContext, sqlite3_column_value(pCsr->pStmt, iCol+1));
+    }
+  }
+  return rc;
+}
+
+/* 
+** This function is the implementation of the xUpdate callback used by 
+** FTS3 virtual tables. It is invoked by SQLite each time a row is to be
+** inserted, updated or deleted.
+*/
+static int fts3UpdateMethod(
+  sqlite3_vtab *pVtab,            /* Virtual table handle */
+  int nArg,                       /* Size of argument array */
+  sqlite3_value **apVal,          /* Array of arguments */
+  sqlite_int64 *pRowid            /* OUT: The affected (or effected) rowid */
+){
+  return sqlite3Fts3UpdateMethod(pVtab, nArg, apVal, pRowid);
+}
+
+/*
+** Implementation of xSync() method. Flush the contents of the pending-terms
+** hash-table to the database.
+*/
+static int fts3SyncMethod(sqlite3_vtab *pVtab){
+  int rc = sqlite3Fts3PendingTermsFlush((Fts3Table *)pVtab);
+  sqlite3Fts3SegmentsClose((Fts3Table *)pVtab);
+  return rc;
+}
+
+/*
+** Implementation of xBegin() method. This is a no-op.
+*/
+static int fts3BeginMethod(sqlite3_vtab *pVtab){
+  UNUSED_PARAMETER(pVtab);
+  assert( ((Fts3Table *)pVtab)->nPendingData==0 );
+  return SQLITE_OK;
+}
+
+/*
+** Implementation of xCommit() method. This is a no-op. The contents of
+** the pending-terms hash-table have already been flushed into the database
+** by fts3SyncMethod().
+*/
+static int fts3CommitMethod(sqlite3_vtab *pVtab){
+  UNUSED_PARAMETER(pVtab);
+  assert( ((Fts3Table *)pVtab)->nPendingData==0 );
+  return SQLITE_OK;
+}
+
+/*
+** Implementation of xRollback(). Discard the contents of the pending-terms
+** hash-table. Any changes made to the database are reverted by SQLite.
+*/
+static int fts3RollbackMethod(sqlite3_vtab *pVtab){
+  sqlite3Fts3PendingTermsClear((Fts3Table *)pVtab);
+  return SQLITE_OK;
+}
+
+/*
+** Load the doclist associated with expression pExpr to pExpr->aDoclist.
+** The loaded doclist contains positions as well as the document ids.
+** This is used by the matchinfo(), snippet() and offsets() auxillary
+** functions.
+*/
+SQLITE_PRIVATE int sqlite3Fts3ExprLoadDoclist(Fts3Cursor *pCsr, Fts3Expr *pExpr){
+  int rc;
+  assert( pExpr->eType==FTSQUERY_PHRASE && pExpr->pPhrase );
+  assert( pCsr->eEvalmode==FTS3_EVAL_NEXT );
+  rc = fts3EvalExpr(pCsr, pExpr, &pExpr->aDoclist, &pExpr->nDoclist, 1);
+  return rc;
+}
+
+SQLITE_PRIVATE int sqlite3Fts3ExprLoadFtDoclist(
+  Fts3Cursor *pCsr, 
+  Fts3Expr *pExpr,
+  char **paDoclist,
+  int *pnDoclist
+){
+  int rc;
+  assert( pCsr->eEvalmode==FTS3_EVAL_NEXT );
+  assert( pExpr->eType==FTSQUERY_PHRASE && pExpr->pPhrase );
+  pCsr->eEvalmode = FTS3_EVAL_MATCHINFO;
+  rc = fts3EvalExpr(pCsr, pExpr, paDoclist, pnDoclist, 1);
+  pCsr->eEvalmode = FTS3_EVAL_NEXT;
+  return rc;
+}
+
+/*
+** After ExprLoadDoclist() (see above) has been called, this function is
+** used to iterate/search through the position lists that make up the doclist
+** stored in pExpr->aDoclist.
+*/
+SQLITE_PRIVATE char *sqlite3Fts3FindPositions(
+  Fts3Expr *pExpr,                /* Access this expressions doclist */
+  sqlite3_int64 iDocid,           /* Docid associated with requested pos-list */
+  int iCol                        /* Column of requested pos-list */
+){
+  assert( pExpr->isLoaded );
+  if( pExpr->aDoclist ){
+    char *pEnd = &pExpr->aDoclist[pExpr->nDoclist];
+    char *pCsr;
+
+    if( pExpr->pCurrent==0 ){
+      pExpr->pCurrent = pExpr->aDoclist;
+      pExpr->iCurrent = 0;
+      pExpr->pCurrent += sqlite3Fts3GetVarint(pExpr->pCurrent,&pExpr->iCurrent);
+    }
+    pCsr = pExpr->pCurrent;
+    assert( pCsr );
+
+    while( pCsr<pEnd ){
+      if( pExpr->iCurrent<iDocid ){
+        fts3PoslistCopy(0, &pCsr);
+        if( pCsr<pEnd ){
+          fts3GetDeltaVarint(&pCsr, &pExpr->iCurrent);
+        }
+        pExpr->pCurrent = pCsr;
+      }else{
+        if( pExpr->iCurrent==iDocid ){
+          int iThis = 0;
+          if( iCol<0 ){
+            /* If iCol is negative, return a pointer to the start of the
+            ** position-list (instead of a pointer to the start of a list
+            ** of offsets associated with a specific column).
+            */
+            return pCsr;
+          }
+          while( iThis<iCol ){
+            fts3ColumnlistCopy(0, &pCsr);
+            if( *pCsr==0x00 ) return 0;
+            pCsr++;
+            pCsr += sqlite3Fts3GetVarint32(pCsr, &iThis);
+          }
+          if( iCol==iThis && (*pCsr&0xFE) ) return pCsr;
+        }
+        return 0;
+      }
+    }
+  }
+
+  return 0;
+}
+
+/*
+** Helper function used by the implementation of the overloaded snippet(),
+** offsets() and optimize() SQL functions.
+**
+** If the value passed as the third argument is a blob of size
+** sizeof(Fts3Cursor*), then the blob contents are copied to the 
+** output variable *ppCsr and SQLITE_OK is returned. Otherwise, an error
+** message is written to context pContext and SQLITE_ERROR returned. The
+** string passed via zFunc is used as part of the error message.
+*/
+static int fts3FunctionArg(
+  sqlite3_context *pContext,      /* SQL function call context */
+  const char *zFunc,              /* Function name */
+  sqlite3_value *pVal,            /* argv[0] passed to function */
+  Fts3Cursor **ppCsr              /* OUT: Store cursor handle here */
+){
+  Fts3Cursor *pRet;
+  if( sqlite3_value_type(pVal)!=SQLITE_BLOB 
+   || sqlite3_value_bytes(pVal)!=sizeof(Fts3Cursor *)
+  ){
+    char *zErr = sqlite3_mprintf("illegal first argument to %s", zFunc);
+    sqlite3_result_error(pContext, zErr, -1);
+    sqlite3_free(zErr);
+    return SQLITE_ERROR;
+  }
+  memcpy(&pRet, sqlite3_value_blob(pVal), sizeof(Fts3Cursor *));
+  *ppCsr = pRet;
+  return SQLITE_OK;
+}
+
+/*
+** Implementation of the snippet() function for FTS3
+*/
+static void fts3SnippetFunc(
+  sqlite3_context *pContext,      /* SQLite function call context */
+  int nVal,                       /* Size of apVal[] array */
+  sqlite3_value **apVal           /* Array of arguments */
+){
+  Fts3Cursor *pCsr;               /* Cursor handle passed through apVal[0] */
+  const char *zStart = "<b>";
+  const char *zEnd = "</b>";
+  const char *zEllipsis = "<b>...</b>";
+  int iCol = -1;
+  int nToken = 15;                /* Default number of tokens in snippet */
+
+  /* There must be at least one argument passed to this function (otherwise
+  ** the non-overloaded version would have been called instead of this one).
+  */
+  assert( nVal>=1 );
+
+  if( nVal>6 ){
+    sqlite3_result_error(pContext, 
+        "wrong number of arguments to function snippet()", -1);
+    return;
+  }
+  if( fts3FunctionArg(pContext, "snippet", apVal[0], &pCsr) ) return;
+
+  switch( nVal ){
+    case 6: nToken = sqlite3_value_int(apVal[5]);
+    case 5: iCol = sqlite3_value_int(apVal[4]);
+    case 4: zEllipsis = (const char*)sqlite3_value_text(apVal[3]);
+    case 3: zEnd = (const char*)sqlite3_value_text(apVal[2]);
+    case 2: zStart = (const char*)sqlite3_value_text(apVal[1]);
+  }
+  if( !zEllipsis || !zEnd || !zStart ){
+    sqlite3_result_error_nomem(pContext);
+  }else if( SQLITE_OK==fts3CursorSeek(pContext, pCsr) ){
+    sqlite3Fts3Snippet(pContext, pCsr, zStart, zEnd, zEllipsis, iCol, nToken);
+  }
+}
+
+/*
+** Implementation of the offsets() function for FTS3
+*/
+static void fts3OffsetsFunc(
+  sqlite3_context *pContext,      /* SQLite function call context */
+  int nVal,                       /* Size of argument array */
+  sqlite3_value **apVal           /* Array of arguments */
+){
+  Fts3Cursor *pCsr;               /* Cursor handle passed through apVal[0] */
+
+  UNUSED_PARAMETER(nVal);
+
+  assert( nVal==1 );
+  if( fts3FunctionArg(pContext, "offsets", apVal[0], &pCsr) ) return;
+  assert( pCsr );
+  if( SQLITE_OK==fts3CursorSeek(pContext, pCsr) ){
+    sqlite3Fts3Offsets(pContext, pCsr);
+  }
+}
+
+/* 
+** Implementation of the special optimize() function for FTS3. This 
+** function merges all segments in the database to a single segment.
+** Example usage is:
+**
+**   SELECT optimize(t) FROM t LIMIT 1;
+**
+** where 't' is the name of an FTS3 table.
+*/
+static void fts3OptimizeFunc(
+  sqlite3_context *pContext,      /* SQLite function call context */
+  int nVal,                       /* Size of argument array */
+  sqlite3_value **apVal           /* Array of arguments */
+){
+  int rc;                         /* Return code */
+  Fts3Table *p;                   /* Virtual table handle */
+  Fts3Cursor *pCursor;            /* Cursor handle passed through apVal[0] */
+
+  UNUSED_PARAMETER(nVal);
+
+  assert( nVal==1 );
+  if( fts3FunctionArg(pContext, "optimize", apVal[0], &pCursor) ) return;
+  p = (Fts3Table *)pCursor->base.pVtab;
+  assert( p );
+
+  rc = sqlite3Fts3Optimize(p);
+
+  switch( rc ){
+    case SQLITE_OK:
+      sqlite3_result_text(pContext, "Index optimized", -1, SQLITE_STATIC);
+      break;
+    case SQLITE_DONE:
+      sqlite3_result_text(pContext, "Index already optimal", -1, SQLITE_STATIC);
+      break;
+    default:
+      sqlite3_result_error_code(pContext, rc);
+      break;
+  }
+}
+
+/*
+** Implementation of the matchinfo() function for FTS3
+*/
+static void fts3MatchinfoFunc(
+  sqlite3_context *pContext,      /* SQLite function call context */
+  int nVal,                       /* Size of argument array */
+  sqlite3_value **apVal           /* Array of arguments */
+){
+  Fts3Cursor *pCsr;               /* Cursor handle passed through apVal[0] */
+  assert( nVal==1 || nVal==2 );
+  if( SQLITE_OK==fts3FunctionArg(pContext, "matchinfo", apVal[0], &pCsr) ){
+    const char *zArg = 0;
+    if( nVal>1 ){
+      zArg = (const char *)sqlite3_value_text(apVal[1]);
+    }
+    sqlite3Fts3Matchinfo(pContext, pCsr, zArg);
+  }
+}
+
+/*
+** This routine implements the xFindFunction method for the FTS3
+** virtual table.
+*/
+static int fts3FindFunctionMethod(
+  sqlite3_vtab *pVtab,            /* Virtual table handle */
+  int nArg,                       /* Number of SQL function arguments */
+  const char *zName,              /* Name of SQL function */
+  void (**pxFunc)(sqlite3_context*,int,sqlite3_value**), /* OUT: Result */
+  void **ppArg                    /* Unused */
+){
+  struct Overloaded {
+    const char *zName;
+    void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
+  } aOverload[] = {
+    { "snippet", fts3SnippetFunc },
+    { "offsets", fts3OffsetsFunc },
+    { "optimize", fts3OptimizeFunc },
+    { "matchinfo", fts3MatchinfoFunc },
+  };
+  int i;                          /* Iterator variable */
+
+  UNUSED_PARAMETER(pVtab);
+  UNUSED_PARAMETER(nArg);
+  UNUSED_PARAMETER(ppArg);
+
+  for(i=0; i<SizeofArray(aOverload); i++){
+    if( strcmp(zName, aOverload[i].zName)==0 ){
+      *pxFunc = aOverload[i].xFunc;
+      return 1;
+    }
+  }
+
+  /* No function of the specified name was found. Return 0. */
+  return 0;
+}
+
+/*
+** Implementation of FTS3 xRename method. Rename an fts3 table.
+*/
+static int fts3RenameMethod(
+  sqlite3_vtab *pVtab,            /* Virtual table handle */
+  const char *zName               /* New name of table */
+){
+  Fts3Table *p = (Fts3Table *)pVtab;
+  sqlite3 *db = p->db;            /* Database connection */
+  int rc;                         /* Return Code */
+
+  rc = sqlite3Fts3PendingTermsFlush(p);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+
+  fts3DbExec(&rc, db,
+    "ALTER TABLE %Q.'%q_content'  RENAME TO '%q_content';",
+    p->zDb, p->zName, zName
+  );
+  if( p->bHasDocsize ){
+    fts3DbExec(&rc, db,
+      "ALTER TABLE %Q.'%q_docsize'  RENAME TO '%q_docsize';",
+      p->zDb, p->zName, zName
+    );
+  }
+  if( p->bHasStat ){
+    fts3DbExec(&rc, db,
+      "ALTER TABLE %Q.'%q_stat'  RENAME TO '%q_stat';",
+      p->zDb, p->zName, zName
+    );
+  }
+  fts3DbExec(&rc, db,
+    "ALTER TABLE %Q.'%q_segments' RENAME TO '%q_segments';",
+    p->zDb, p->zName, zName
+  );
+  fts3DbExec(&rc, db,
+    "ALTER TABLE %Q.'%q_segdir'   RENAME TO '%q_segdir';",
+    p->zDb, p->zName, zName
+  );
+  return rc;
+}
+
+static const sqlite3_module fts3Module = {
+  /* iVersion      */ 0,
+  /* xCreate       */ fts3CreateMethod,
+  /* xConnect      */ fts3ConnectMethod,
+  /* xBestIndex    */ fts3BestIndexMethod,
+  /* xDisconnect   */ fts3DisconnectMethod,
+  /* xDestroy      */ fts3DestroyMethod,
+  /* xOpen         */ fts3OpenMethod,
+  /* xClose        */ fts3CloseMethod,
+  /* xFilter       */ fts3FilterMethod,
+  /* xNext         */ fts3NextMethod,
+  /* xEof          */ fts3EofMethod,
+  /* xColumn       */ fts3ColumnMethod,
+  /* xRowid        */ fts3RowidMethod,
+  /* xUpdate       */ fts3UpdateMethod,
+  /* xBegin        */ fts3BeginMethod,
+  /* xSync         */ fts3SyncMethod,
+  /* xCommit       */ fts3CommitMethod,
+  /* xRollback     */ fts3RollbackMethod,
+  /* xFindFunction */ fts3FindFunctionMethod,
+  /* xRename */       fts3RenameMethod,
+};
+
+/*
+** This function is registered as the module destructor (called when an
+** FTS3 enabled database connection is closed). It frees the memory
+** allocated for the tokenizer hash table.
+*/
+static void hashDestroy(void *p){
+  Fts3Hash *pHash = (Fts3Hash *)p;
+  sqlite3Fts3HashClear(pHash);
+  sqlite3_free(pHash);
+}
+
+/*
+** The fts3 built-in tokenizers - "simple", "porter" and "icu"- are 
+** implemented in files fts3_tokenizer1.c, fts3_porter.c and fts3_icu.c
+** respectively. The following three forward declarations are for functions
+** declared in these files used to retrieve the respective implementations.
+**
+** Calling sqlite3Fts3SimpleTokenizerModule() sets the value pointed
+** to by the argument to point to the "simple" tokenizer implementation.
+** And so on.
+*/
+SQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(sqlite3_tokenizer_module const**ppModule);
+SQLITE_PRIVATE void sqlite3Fts3PorterTokenizerModule(sqlite3_tokenizer_module const**ppModule);
+#ifdef SQLITE_ENABLE_ICU
+SQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(sqlite3_tokenizer_module const**ppModule);
+#endif
+
+/*
+** Initialise the fts3 extension. If this extension is built as part
+** of the sqlite library, then this function is called directly by
+** SQLite. If fts3 is built as a dynamically loadable extension, this
+** function is called by the sqlite3_extension_init() entry point.
+*/
+SQLITE_PRIVATE int sqlite3Fts3Init(sqlite3 *db){
+  int rc = SQLITE_OK;
+  Fts3Hash *pHash = 0;
+  const sqlite3_tokenizer_module *pSimple = 0;
+  const sqlite3_tokenizer_module *pPorter = 0;
+
+#ifdef SQLITE_ENABLE_ICU
+  const sqlite3_tokenizer_module *pIcu = 0;
+  sqlite3Fts3IcuTokenizerModule(&pIcu);
+#endif
+
+  rc = sqlite3Fts3InitAux(db);
+  if( rc!=SQLITE_OK ) return rc;
+
+  sqlite3Fts3SimpleTokenizerModule(&pSimple);
+  sqlite3Fts3PorterTokenizerModule(&pPorter);
+
+  /* Allocate and initialise the hash-table used to store tokenizers. */
+  pHash = sqlite3_malloc(sizeof(Fts3Hash));
+  if( !pHash ){
+    rc = SQLITE_NOMEM;
+  }else{
+    sqlite3Fts3HashInit(pHash, FTS3_HASH_STRING, 1);
+  }
+
+  /* Load the built-in tokenizers into the hash table */
+  if( rc==SQLITE_OK ){
+    if( sqlite3Fts3HashInsert(pHash, "simple", 7, (void *)pSimple)
+     || sqlite3Fts3HashInsert(pHash, "porter", 7, (void *)pPorter) 
+#ifdef SQLITE_ENABLE_ICU
+     || (pIcu && sqlite3Fts3HashInsert(pHash, "icu", 4, (void *)pIcu))
+#endif
+    ){
+      rc = SQLITE_NOMEM;
+    }
+  }
+
+#ifdef SQLITE_TEST
+  if( rc==SQLITE_OK ){
+    rc = sqlite3Fts3ExprInitTestInterface(db);
+  }
+#endif
+
+  /* Create the virtual table wrapper around the hash-table and overload 
+  ** the two scalar functions. If this is successful, register the
+  ** module with sqlite.
+  */
+  if( SQLITE_OK==rc 
+   && SQLITE_OK==(rc = sqlite3Fts3InitHashTable(db, pHash, "fts3_tokenizer"))
+   && SQLITE_OK==(rc = sqlite3_overload_function(db, "snippet", -1))
+   && SQLITE_OK==(rc = sqlite3_overload_function(db, "offsets", 1))
+   && SQLITE_OK==(rc = sqlite3_overload_function(db, "matchinfo", 1))
+   && SQLITE_OK==(rc = sqlite3_overload_function(db, "matchinfo", 2))
+   && SQLITE_OK==(rc = sqlite3_overload_function(db, "optimize", 1))
+  ){
+    rc = sqlite3_create_module_v2(
+        db, "fts3", &fts3Module, (void *)pHash, hashDestroy
+    );
+    if( rc==SQLITE_OK ){
+      rc = sqlite3_create_module_v2(
+          db, "fts4", &fts3Module, (void *)pHash, 0
+      );
+    }
+    return rc;
+  }
+
+  /* An error has occurred. Delete the hash table and return the error code. */
+  assert( rc!=SQLITE_OK );
+  if( pHash ){
+    sqlite3Fts3HashClear(pHash);
+    sqlite3_free(pHash);
+  }
+  return rc;
+}
+
+#if !SQLITE_CORE
+SQLITE_API int sqlite3_extension_init(
+  sqlite3 *db, 
+  char **pzErrMsg,
+  const sqlite3_api_routines *pApi
+){
+  SQLITE_EXTENSION_INIT2(pApi)
+  return sqlite3Fts3Init(db);
+}
+#endif
+
+#endif
+
+/************** End of fts3.c ************************************************/
+/************** Begin file fts3_aux.c ****************************************/
+/*
+** 2011 Jan 27
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+*/
+
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
+
+typedef struct Fts3auxTable Fts3auxTable;
+typedef struct Fts3auxCursor Fts3auxCursor;
+
+struct Fts3auxTable {
+  sqlite3_vtab base;              /* Base class used by SQLite core */
+  Fts3Table *pFts3Tab;
+};
+
+struct Fts3auxCursor {
+  sqlite3_vtab_cursor base;       /* Base class used by SQLite core */
+  Fts3SegReaderCursor csr;        /* Must be right after "base" */
+  Fts3SegFilter filter;
+  char *zStop;
+  int nStop;                      /* Byte-length of string zStop */
+  int isEof;                      /* True if cursor is at EOF */
+  sqlite3_int64 iRowid;           /* Current rowid */
+
+  int iCol;                       /* Current value of 'col' column */
+  int nStat;                      /* Size of aStat[] array */
+  struct Fts3auxColstats {
+    sqlite3_int64 nDoc;           /* 'documents' values for current csr row */
+    sqlite3_int64 nOcc;           /* 'occurrences' values for current csr row */
+  } *aStat;
+};
+
+/*
+** Schema of the terms table.
+*/
+#define FTS3_TERMS_SCHEMA "CREATE TABLE x(term, col, documents, occurrences)"
+
+/*
+** This function does all the work for both the xConnect and xCreate methods.
+** These tables have no persistent representation of their own, so xConnect
+** and xCreate are identical operations.
+*/
+static int fts3auxConnectMethod(
+  sqlite3 *db,                    /* Database connection */
+  void *pUnused,                  /* Unused */
+  int argc,                       /* Number of elements in argv array */
+  const char * const *argv,       /* xCreate/xConnect argument array */
+  sqlite3_vtab **ppVtab,          /* OUT: New sqlite3_vtab object */
+  char **pzErr                    /* OUT: sqlite3_malloc'd error message */
+){
+  char const *zDb;                /* Name of database (e.g. "main") */
+  char const *zFts3;              /* Name of fts3 table */
+  int nDb;                        /* Result of strlen(zDb) */
+  int nFts3;                      /* Result of strlen(zFts3) */
+  int nByte;                      /* Bytes of space to allocate here */
+  int rc;                         /* value returned by declare_vtab() */
+  Fts3auxTable *p;                /* Virtual table object to return */
+
+  UNUSED_PARAMETER(pUnused);
+
+  /* The user should specify a single argument - the name of an fts3 table. */
+  if( argc!=4 ){
+    *pzErr = sqlite3_mprintf(
+        "wrong number of arguments to fts4aux constructor"
+    );
+    return SQLITE_ERROR;
+  }
+
+  zDb = argv[1]; 
+  nDb = strlen(zDb);
+  zFts3 = argv[3];
+  nFts3 = strlen(zFts3);
+
+  rc = sqlite3_declare_vtab(db, FTS3_TERMS_SCHEMA);
+  if( rc!=SQLITE_OK ) return rc;
+
+  nByte = sizeof(Fts3auxTable) + sizeof(Fts3Table) + nDb + nFts3 + 2;
+  p = (Fts3auxTable *)sqlite3_malloc(nByte);
+  if( !p ) return SQLITE_NOMEM;
+  memset(p, 0, nByte);
+
+  p->pFts3Tab = (Fts3Table *)&p[1];
+  p->pFts3Tab->zDb = (char *)&p->pFts3Tab[1];
+  p->pFts3Tab->zName = &p->pFts3Tab->zDb[nDb+1];
+  p->pFts3Tab->db = db;
+
+  memcpy((char *)p->pFts3Tab->zDb, zDb, nDb);
+  memcpy((char *)p->pFts3Tab->zName, zFts3, nFts3);
+  sqlite3Fts3Dequote((char *)p->pFts3Tab->zName);
+
+  *ppVtab = (sqlite3_vtab *)p;
+  return SQLITE_OK;
+}
+
+/*
+** This function does the work for both the xDisconnect and xDestroy methods.
+** These tables have no persistent representation of their own, so xDisconnect
+** and xDestroy are identical operations.
+*/
+static int fts3auxDisconnectMethod(sqlite3_vtab *pVtab){
+  Fts3auxTable *p = (Fts3auxTable *)pVtab;
+  Fts3Table *pFts3 = p->pFts3Tab;
+  int i;
+
+  /* Free any prepared statements held */
+  for(i=0; i<SizeofArray(pFts3->aStmt); i++){
+    sqlite3_finalize(pFts3->aStmt[i]);
+  }
+  sqlite3_free(pFts3->zSegmentsTbl);
+  sqlite3_free(p);
+  return SQLITE_OK;
+}
+
+#define FTS4AUX_EQ_CONSTRAINT 1
+#define FTS4AUX_GE_CONSTRAINT 2
+#define FTS4AUX_LE_CONSTRAINT 4
+
+/*
+** xBestIndex - Analyze a WHERE and ORDER BY clause.
+*/
+static int fts3auxBestIndexMethod(
+  sqlite3_vtab *pVTab, 
+  sqlite3_index_info *pInfo
+){
+  int i;
+  int iEq = -1;
+  int iGe = -1;
+  int iLe = -1;
+
+  UNUSED_PARAMETER(pVTab);
+
+  /* This vtab delivers always results in "ORDER BY term ASC" order. */
+  if( pInfo->nOrderBy==1 
+   && pInfo->aOrderBy[0].iColumn==0 
+   && pInfo->aOrderBy[0].desc==0
+  ){
+    pInfo->orderByConsumed = 1;
+  }
+
+  /* Search for equality and range constraints on the "term" column. */
+  for(i=0; i<pInfo->nConstraint; i++){
+    if( pInfo->aConstraint[i].usable && pInfo->aConstraint[i].iColumn==0 ){
+      int op = pInfo->aConstraint[i].op;
+      if( op==SQLITE_INDEX_CONSTRAINT_EQ ) iEq = i;
+      if( op==SQLITE_INDEX_CONSTRAINT_LT ) iLe = i;
+      if( op==SQLITE_INDEX_CONSTRAINT_LE ) iLe = i;
+      if( op==SQLITE_INDEX_CONSTRAINT_GT ) iGe = i;
+      if( op==SQLITE_INDEX_CONSTRAINT_GE ) iGe = i;
+    }
+  }
+
+  if( iEq>=0 ){
+    pInfo->idxNum = FTS4AUX_EQ_CONSTRAINT;
+    pInfo->aConstraintUsage[iEq].argvIndex = 1;
+    pInfo->estimatedCost = 5;
+  }else{
+    pInfo->idxNum = 0;
+    pInfo->estimatedCost = 20000;
+    if( iGe>=0 ){
+      pInfo->idxNum += FTS4AUX_GE_CONSTRAINT;
+      pInfo->aConstraintUsage[iGe].argvIndex = 1;
+      pInfo->estimatedCost /= 2;
+    }
+    if( iLe>=0 ){
+      pInfo->idxNum += FTS4AUX_LE_CONSTRAINT;
+      pInfo->aConstraintUsage[iLe].argvIndex = 1 + (iGe>=0);
+      pInfo->estimatedCost /= 2;
+    }
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** xOpen - Open a cursor.
+*/
+static int fts3auxOpenMethod(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCsr){
+  Fts3auxCursor *pCsr;            /* Pointer to cursor object to return */
+
+  UNUSED_PARAMETER(pVTab);
+
+  pCsr = (Fts3auxCursor *)sqlite3_malloc(sizeof(Fts3auxCursor));
+  if( !pCsr ) return SQLITE_NOMEM;
+  memset(pCsr, 0, sizeof(Fts3auxCursor));
+
+  *ppCsr = (sqlite3_vtab_cursor *)pCsr;
+  return SQLITE_OK;
+}
+
+/*
+** xClose - Close a cursor.
+*/
+static int fts3auxCloseMethod(sqlite3_vtab_cursor *pCursor){
+  Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
+  Fts3auxCursor *pCsr = (Fts3auxCursor *)pCursor;
+
+  sqlite3Fts3SegmentsClose(pFts3);
+  sqlite3Fts3SegReaderFinish(&pCsr->csr);
+  sqlite3_free((void *)pCsr->filter.zTerm);
+  sqlite3_free(pCsr->zStop);
+  sqlite3_free(pCsr->aStat);
+  sqlite3_free(pCsr);
+  return SQLITE_OK;
+}
+
+static int fts3auxGrowStatArray(Fts3auxCursor *pCsr, int nSize){
+  if( nSize>pCsr->nStat ){
+    struct Fts3auxColstats *aNew;
+    aNew = (struct Fts3auxColstats *)sqlite3_realloc(pCsr->aStat, 
+        sizeof(struct Fts3auxColstats) * nSize
+    );
+    if( aNew==0 ) return SQLITE_NOMEM;
+    memset(&aNew[pCsr->nStat], 0, 
+        sizeof(struct Fts3auxColstats) * (nSize - pCsr->nStat)
+    );
+    pCsr->aStat = aNew;
+    pCsr->nStat = nSize;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** xNext - Advance the cursor to the next row, if any.
+*/
+static int fts3auxNextMethod(sqlite3_vtab_cursor *pCursor){
+  Fts3auxCursor *pCsr = (Fts3auxCursor *)pCursor;
+  Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
+  int rc;
+
+  /* Increment our pretend rowid value. */
+  pCsr->iRowid++;
+
+  for(pCsr->iCol++; pCsr->iCol<pCsr->nStat; pCsr->iCol++){
+    if( pCsr->aStat[pCsr->iCol].nDoc>0 ) return SQLITE_OK;
+  }
+
+  rc = sqlite3Fts3SegReaderStep(pFts3, &pCsr->csr);
+  if( rc==SQLITE_ROW ){
+    int i = 0;
+    int nDoclist = pCsr->csr.nDoclist;
+    char *aDoclist = pCsr->csr.aDoclist;
+    int iCol;
+
+    int eState = 0;
+
+    if( pCsr->zStop ){
+      int n = (pCsr->nStop<pCsr->csr.nTerm) ? pCsr->nStop : pCsr->csr.nTerm;
+      int mc = memcmp(pCsr->zStop, pCsr->csr.zTerm, n);
+      if( mc<0 || (mc==0 && pCsr->csr.nTerm>pCsr->nStop) ){
+        pCsr->isEof = 1;
+        return SQLITE_OK;
+      }
+    }
+
+    if( fts3auxGrowStatArray(pCsr, 2) ) return SQLITE_NOMEM;
+    memset(pCsr->aStat, 0, sizeof(struct Fts3auxColstats) * pCsr->nStat);
+    iCol = 0;
+
+    while( i<nDoclist ){
+      sqlite3_int64 v = 0;
+
+      i += sqlite3Fts3GetVarint(&aDoclist[i], &v);
+      switch( eState ){
+        /* State 0. In this state the integer just read was a docid. */
+        case 0:
+          pCsr->aStat[0].nDoc++;
+          eState = 1;
+          iCol = 0;
+          break;
+
+        /* State 1. In this state we are expecting either a 1, indicating
+        ** that the following integer will be a column number, or the
+        ** start of a position list for column 0.  
+        ** 
+        ** The only difference between state 1 and state 2 is that if the
+        ** integer encountered in state 1 is not 0 or 1, then we need to
+        ** increment the column 0 "nDoc" count for this term.
+        */
+        case 1:
+          assert( iCol==0 );
+          if( v>1 ){
+            pCsr->aStat[1].nDoc++;
+          }
+          eState = 2;
+          /* fall through */
+
+        case 2:
+          if( v==0 ){       /* 0x00. Next integer will be a docid. */
+            eState = 0;
+          }else if( v==1 ){ /* 0x01. Next integer will be a column number. */
+            eState = 3;
+          }else{            /* 2 or greater. A position. */
+            pCsr->aStat[iCol+1].nOcc++;
+            pCsr->aStat[0].nOcc++;
+          }
+          break;
+
+        /* State 3. The integer just read is a column number. */
+        default: assert( eState==3 );
+          iCol = (int)v;
+          if( fts3auxGrowStatArray(pCsr, iCol+2) ) return SQLITE_NOMEM;
+          pCsr->aStat[iCol+1].nDoc++;
+          eState = 2;
+          break;
+      }
+    }
+
+    pCsr->iCol = 0;
+    rc = SQLITE_OK;
+  }else{
+    pCsr->isEof = 1;
+  }
+  return rc;
+}
+
+/*
+** xFilter - Initialize a cursor to point at the start of its data.
+*/
+static int fts3auxFilterMethod(
+  sqlite3_vtab_cursor *pCursor,   /* The cursor used for this query */
+  int idxNum,                     /* Strategy index */
+  const char *idxStr,             /* Unused */
+  int nVal,                       /* Number of elements in apVal */
+  sqlite3_value **apVal           /* Arguments for the indexing scheme */
+){
+  Fts3auxCursor *pCsr = (Fts3auxCursor *)pCursor;
+  Fts3Table *pFts3 = ((Fts3auxTable *)pCursor->pVtab)->pFts3Tab;
+  int rc;
+  int isScan;
+
+  UNUSED_PARAMETER(nVal);
+
+  assert( idxStr==0 );
+  assert( idxNum==FTS4AUX_EQ_CONSTRAINT || idxNum==0
+       || idxNum==FTS4AUX_LE_CONSTRAINT || idxNum==FTS4AUX_GE_CONSTRAINT
+       || idxNum==(FTS4AUX_LE_CONSTRAINT|FTS4AUX_GE_CONSTRAINT)
+  );
+  isScan = (idxNum!=FTS4AUX_EQ_CONSTRAINT);
+
+  /* In case this cursor is being reused, close and zero it. */
+  testcase(pCsr->filter.zTerm);
+  sqlite3Fts3SegReaderFinish(&pCsr->csr);
+  sqlite3_free((void *)pCsr->filter.zTerm);
+  sqlite3_free(pCsr->aStat);
+  memset(&pCsr->csr, 0, ((u8*)&pCsr[1]) - (u8*)&pCsr->csr);
+
+  pCsr->filter.flags = FTS3_SEGMENT_REQUIRE_POS|FTS3_SEGMENT_IGNORE_EMPTY;
+  if( isScan ) pCsr->filter.flags |= FTS3_SEGMENT_SCAN;
+
+  if( idxNum&(FTS4AUX_EQ_CONSTRAINT|FTS4AUX_GE_CONSTRAINT) ){
+    const unsigned char *zStr = sqlite3_value_text(apVal[0]);
+    if( zStr ){
+      pCsr->filter.zTerm = sqlite3_mprintf("%s", zStr);
+      pCsr->filter.nTerm = sqlite3_value_bytes(apVal[0]);
+      if( pCsr->filter.zTerm==0 ) return SQLITE_NOMEM;
+    }
+  }
+  if( idxNum&FTS4AUX_LE_CONSTRAINT ){
+    int iIdx = (idxNum&FTS4AUX_GE_CONSTRAINT) ? 1 : 0;
+    pCsr->zStop = sqlite3_mprintf("%s", sqlite3_value_text(apVal[iIdx]));
+    pCsr->nStop = sqlite3_value_bytes(apVal[iIdx]);
+    if( pCsr->zStop==0 ) return SQLITE_NOMEM;
+  }
+
+  rc = sqlite3Fts3SegReaderCursor(pFts3, FTS3_SEGCURSOR_ALL,
+      pCsr->filter.zTerm, pCsr->filter.nTerm, 0, isScan, &pCsr->csr
+  );
+  if( rc==SQLITE_OK ){
+    rc = sqlite3Fts3SegReaderStart(pFts3, &pCsr->csr, &pCsr->filter);
+  }
+
+  if( rc==SQLITE_OK ) rc = fts3auxNextMethod(pCursor);
+  return rc;
+}
+
+/*
+** xEof - Return true if the cursor is at EOF, or false otherwise.
+*/
+static int fts3auxEofMethod(sqlite3_vtab_cursor *pCursor){
+  Fts3auxCursor *pCsr = (Fts3auxCursor *)pCursor;
+  return pCsr->isEof;
+}
+
+/*
+** xColumn - Return a column value.
+*/
+static int fts3auxColumnMethod(
+  sqlite3_vtab_cursor *pCursor,   /* Cursor to retrieve value from */
+  sqlite3_context *pContext,      /* Context for sqlite3_result_xxx() calls */
+  int iCol                        /* Index of column to read value from */
+){
+  Fts3auxCursor *p = (Fts3auxCursor *)pCursor;
+
+  assert( p->isEof==0 );
+  if( iCol==0 ){        /* Column "term" */
+    sqlite3_result_text(pContext, p->csr.zTerm, p->csr.nTerm, SQLITE_TRANSIENT);
+  }else if( iCol==1 ){  /* Column "col" */
+    if( p->iCol ){
+      sqlite3_result_int(pContext, p->iCol-1);
+    }else{
+      sqlite3_result_text(pContext, "*", -1, SQLITE_STATIC);
+    }
+  }else if( iCol==2 ){  /* Column "documents" */
+    sqlite3_result_int64(pContext, p->aStat[p->iCol].nDoc);
+  }else{                /* Column "occurrences" */
+    sqlite3_result_int64(pContext, p->aStat[p->iCol].nOcc);
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** xRowid - Return the current rowid for the cursor.
+*/
+static int fts3auxRowidMethod(
+  sqlite3_vtab_cursor *pCursor,   /* Cursor to retrieve value from */
+  sqlite_int64 *pRowid            /* OUT: Rowid value */
+){
+  Fts3auxCursor *pCsr = (Fts3auxCursor *)pCursor;
+  *pRowid = pCsr->iRowid;
+  return SQLITE_OK;
+}
+
+/*
+** Register the fts3aux module with database connection db. Return SQLITE_OK
+** if successful or an error code if sqlite3_create_module() fails.
+*/
+SQLITE_PRIVATE int sqlite3Fts3InitAux(sqlite3 *db){
+  static const sqlite3_module fts3aux_module = {
+     0,                           /* iVersion      */
+     fts3auxConnectMethod,        /* xCreate       */
+     fts3auxConnectMethod,        /* xConnect      */
+     fts3auxBestIndexMethod,      /* xBestIndex    */
+     fts3auxDisconnectMethod,     /* xDisconnect   */
+     fts3auxDisconnectMethod,     /* xDestroy      */
+     fts3auxOpenMethod,           /* xOpen         */
+     fts3auxCloseMethod,          /* xClose        */
+     fts3auxFilterMethod,         /* xFilter       */
+     fts3auxNextMethod,           /* xNext         */
+     fts3auxEofMethod,            /* xEof          */
+     fts3auxColumnMethod,         /* xColumn       */
+     fts3auxRowidMethod,          /* xRowid        */
+     0,                           /* xUpdate       */
+     0,                           /* xBegin        */
+     0,                           /* xSync         */
+     0,                           /* xCommit       */
+     0,                           /* xRollback     */
+     0,                           /* xFindFunction */
+     0                            /* xRename       */
+  };
+  int rc;                         /* Return code */
+
+  rc = sqlite3_create_module(db, "fts4aux", &fts3aux_module, 0);
+  return rc;
+}
+
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
+
+/************** End of fts3_aux.c ********************************************/
+/************** Begin file fts3_expr.c ***************************************/
+/*
+** 2008 Nov 28
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This module contains code that implements a parser for fts3 query strings
+** (the right-hand argument to the MATCH operator). Because the supported 
+** syntax is relatively simple, the whole tokenizer/parser system is
+** hand-coded. 
+*/
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
+/*
+** By default, this module parses the legacy syntax that has been 
+** traditionally used by fts3. Or, if SQLITE_ENABLE_FTS3_PARENTHESIS
+** is defined, then it uses the new syntax. The differences between
+** the new and the old syntaxes are:
+**
+**  a) The new syntax supports parenthesis. The old does not.
+**
+**  b) The new syntax supports the AND and NOT operators. The old does not.
+**
+**  c) The old syntax supports the "-" token qualifier. This is not 
+**     supported by the new syntax (it is replaced by the NOT operator).
+**
+**  d) When using the old syntax, the OR operator has a greater precedence
+**     than an implicit AND. When using the new, both implicity and explicit
+**     AND operators have a higher precedence than OR.
+**
+** If compiled with SQLITE_TEST defined, then this module exports the
+** symbol "int sqlite3_fts3_enable_parentheses". Setting this variable
+** to zero causes the module to use the old syntax. If it is set to 
+** non-zero the new syntax is activated. This is so both syntaxes can
+** be tested using a single build of testfixture.
+**
+** The following describes the syntax supported by the fts3 MATCH
+** operator in a similar format to that used by the lemon parser
+** generator. This module does not use actually lemon, it uses a
+** custom parser.
+**
+**   query ::= andexpr (OR andexpr)*.
+**
+**   andexpr ::= notexpr (AND? notexpr)*.
+**
+**   notexpr ::= nearexpr (NOT nearexpr|-TOKEN)*.
+**   notexpr ::= LP query RP.
+**
+**   nearexpr ::= phrase (NEAR distance_opt nearexpr)*.
+**
+**   distance_opt ::= .
+**   distance_opt ::= / INTEGER.
+**
+**   phrase ::= TOKEN.
+**   phrase ::= COLUMN:TOKEN.
+**   phrase ::= "TOKEN TOKEN TOKEN...".
+*/
+
+#ifdef SQLITE_TEST
+SQLITE_API int sqlite3_fts3_enable_parentheses = 0;
+#else
+# ifdef SQLITE_ENABLE_FTS3_PARENTHESIS 
+#  define sqlite3_fts3_enable_parentheses 1
+# else
+#  define sqlite3_fts3_enable_parentheses 0
+# endif
+#endif
+
+/*
+** Default span for NEAR operators.
+*/
+#define SQLITE_FTS3_DEFAULT_NEAR_PARAM 10
+
+
+typedef struct ParseContext ParseContext;
+struct ParseContext {
+  sqlite3_tokenizer *pTokenizer;      /* Tokenizer module */
+  const char **azCol;                 /* Array of column names for fts3 table */
+  int nCol;                           /* Number of entries in azCol[] */
+  int iDefaultCol;                    /* Default column to query */
+  sqlite3_context *pCtx;              /* Write error message here */
+  int nNest;                          /* Number of nested brackets */
+};
+
+/*
+** This function is equivalent to the standard isspace() function. 
+**
+** The standard isspace() can be awkward to use safely, because although it
+** is defined to accept an argument of type int, its behaviour when passed
+** an integer that falls outside of the range of the unsigned char type
+** is undefined (and sometimes, "undefined" means segfault). This wrapper
+** is defined to accept an argument of type char, and always returns 0 for
+** any values that fall outside of the range of the unsigned char type (i.e.
+** negative values).
+*/
+static int fts3isspace(char c){
+  return c==' ' || c=='\t' || c=='\n' || c=='\r' || c=='\v' || c=='\f';
+}
+
+/*
+** Allocate nByte bytes of memory using sqlite3_malloc(). If successful,
+** zero the memory before returning a pointer to it. If unsuccessful, 
+** return NULL.
+*/
+static void *fts3MallocZero(int nByte){
+  void *pRet = sqlite3_malloc(nByte);
+  if( pRet ) memset(pRet, 0, nByte);
+  return pRet;
+}
+
+
+/*
+** Extract the next token from buffer z (length n) using the tokenizer
+** and other information (column names etc.) in pParse. Create an Fts3Expr
+** structure of type FTSQUERY_PHRASE containing a phrase consisting of this
+** single token and set *ppExpr to point to it. If the end of the buffer is
+** reached before a token is found, set *ppExpr to zero. It is the
+** responsibility of the caller to eventually deallocate the allocated 
+** Fts3Expr structure (if any) by passing it to sqlite3_free().
+**
+** Return SQLITE_OK if successful, or SQLITE_NOMEM if a memory allocation
+** fails.
+*/
+static int getNextToken(
+  ParseContext *pParse,                   /* fts3 query parse context */
+  int iCol,                               /* Value for Fts3Phrase.iColumn */
+  const char *z, int n,                   /* Input string */
+  Fts3Expr **ppExpr,                      /* OUT: expression */
+  int *pnConsumed                         /* OUT: Number of bytes consumed */
+){
+  sqlite3_tokenizer *pTokenizer = pParse->pTokenizer;
+  sqlite3_tokenizer_module const *pModule = pTokenizer->pModule;
+  int rc;
+  sqlite3_tokenizer_cursor *pCursor;
+  Fts3Expr *pRet = 0;
+  int nConsumed = 0;
+
+  rc = pModule->xOpen(pTokenizer, z, n, &pCursor);
+  if( rc==SQLITE_OK ){
+    const char *zToken;
+    int nToken, iStart, iEnd, iPosition;
+    int nByte;                               /* total space to allocate */
+
+    pCursor->pTokenizer = pTokenizer;
+    rc = pModule->xNext(pCursor, &zToken, &nToken, &iStart, &iEnd, &iPosition);
+
+    if( rc==SQLITE_OK ){
+      nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase) + nToken;
+      pRet = (Fts3Expr *)fts3MallocZero(nByte);
+      if( !pRet ){
+        rc = SQLITE_NOMEM;
+      }else{
+        pRet->eType = FTSQUERY_PHRASE;
+        pRet->pPhrase = (Fts3Phrase *)&pRet[1];
+        pRet->pPhrase->nToken = 1;
+        pRet->pPhrase->iColumn = iCol;
+        pRet->pPhrase->aToken[0].n = nToken;
+        pRet->pPhrase->aToken[0].z = (char *)&pRet->pPhrase[1];
+        memcpy(pRet->pPhrase->aToken[0].z, zToken, nToken);
+
+        if( iEnd<n && z[iEnd]=='*' ){
+          pRet->pPhrase->aToken[0].isPrefix = 1;
+          iEnd++;
+        }
+        if( !sqlite3_fts3_enable_parentheses && iStart>0 && z[iStart-1]=='-' ){
+          pRet->pPhrase->isNot = 1;
+        }
+      }
+      nConsumed = iEnd;
+    }
+
+    pModule->xClose(pCursor);
+  }
+  
+  *pnConsumed = nConsumed;
+  *ppExpr = pRet;
+  return rc;
+}
+
+
+/*
+** Enlarge a memory allocation.  If an out-of-memory allocation occurs,
+** then free the old allocation.
+*/
+static void *fts3ReallocOrFree(void *pOrig, int nNew){
+  void *pRet = sqlite3_realloc(pOrig, nNew);
+  if( !pRet ){
+    sqlite3_free(pOrig);
+  }
+  return pRet;
+}
+
+/*
+** Buffer zInput, length nInput, contains the contents of a quoted string
+** that appeared as part of an fts3 query expression. Neither quote character
+** is included in the buffer. This function attempts to tokenize the entire
+** input buffer and create an Fts3Expr structure of type FTSQUERY_PHRASE 
+** containing the results.
+**
+** If successful, SQLITE_OK is returned and *ppExpr set to point at the
+** allocated Fts3Expr structure. Otherwise, either SQLITE_NOMEM (out of memory
+** error) or SQLITE_ERROR (tokenization error) is returned and *ppExpr set
+** to 0.
+*/
+static int getNextString(
+  ParseContext *pParse,                   /* fts3 query parse context */
+  const char *zInput, int nInput,         /* Input string */
+  Fts3Expr **ppExpr                       /* OUT: expression */
+){
+  sqlite3_tokenizer *pTokenizer = pParse->pTokenizer;
+  sqlite3_tokenizer_module const *pModule = pTokenizer->pModule;
+  int rc;
+  Fts3Expr *p = 0;
+  sqlite3_tokenizer_cursor *pCursor = 0;
+  char *zTemp = 0;
+  int nTemp = 0;
+
+  rc = pModule->xOpen(pTokenizer, zInput, nInput, &pCursor);
+  if( rc==SQLITE_OK ){
+    int ii;
+    pCursor->pTokenizer = pTokenizer;
+    for(ii=0; rc==SQLITE_OK; ii++){
+      const char *zToken;
+      int nToken, iBegin, iEnd, iPos;
+      rc = pModule->xNext(pCursor, &zToken, &nToken, &iBegin, &iEnd, &iPos);
+      if( rc==SQLITE_OK ){
+        int nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase);
+        p = fts3ReallocOrFree(p, nByte+ii*sizeof(Fts3PhraseToken));
+        zTemp = fts3ReallocOrFree(zTemp, nTemp + nToken);
+        if( !p || !zTemp ){
+          goto no_mem;
+        }
+        if( ii==0 ){
+          memset(p, 0, nByte);
+          p->pPhrase = (Fts3Phrase *)&p[1];
+        }
+        p->pPhrase = (Fts3Phrase *)&p[1];
+        memset(&p->pPhrase->aToken[ii], 0, sizeof(Fts3PhraseToken));
+        p->pPhrase->nToken = ii+1;
+        p->pPhrase->aToken[ii].n = nToken;
+        memcpy(&zTemp[nTemp], zToken, nToken);
+        nTemp += nToken;
+        if( iEnd<nInput && zInput[iEnd]=='*' ){
+          p->pPhrase->aToken[ii].isPrefix = 1;
+        }else{
+          p->pPhrase->aToken[ii].isPrefix = 0;
+        }
+      }
+    }
+
+    pModule->xClose(pCursor);
+    pCursor = 0;
+  }
+
+  if( rc==SQLITE_DONE ){
+    int jj;
+    char *zNew = NULL;
+    int nNew = 0;
+    int nByte = sizeof(Fts3Expr) + sizeof(Fts3Phrase);
+    nByte += (p?(p->pPhrase->nToken-1):0) * sizeof(Fts3PhraseToken);
+    p = fts3ReallocOrFree(p, nByte + nTemp);
+    if( !p ){
+      goto no_mem;
+    }
+    if( zTemp ){
+      zNew = &(((char *)p)[nByte]);
+      memcpy(zNew, zTemp, nTemp);
+    }else{
+      memset(p, 0, nByte+nTemp);
+    }
+    p->pPhrase = (Fts3Phrase *)&p[1];
+    for(jj=0; jj<p->pPhrase->nToken; jj++){
+      p->pPhrase->aToken[jj].z = &zNew[nNew];
+      nNew += p->pPhrase->aToken[jj].n;
+    }
+    sqlite3_free(zTemp);
+    p->eType = FTSQUERY_PHRASE;
+    p->pPhrase->iColumn = pParse->iDefaultCol;
+    rc = SQLITE_OK;
+  }
+
+  *ppExpr = p;
+  return rc;
+no_mem:
+
+  if( pCursor ){
+    pModule->xClose(pCursor);
+  }
+  sqlite3_free(zTemp);
+  sqlite3_free(p);
+  *ppExpr = 0;
+  return SQLITE_NOMEM;
+}
+
+/*
+** Function getNextNode(), which is called by fts3ExprParse(), may itself
+** call fts3ExprParse(). So this forward declaration is required.
+*/
+static int fts3ExprParse(ParseContext *, const char *, int, Fts3Expr **, int *);
+
+/*
+** The output variable *ppExpr is populated with an allocated Fts3Expr 
+** structure, or set to 0 if the end of the input buffer is reached.
+**
+** Returns an SQLite error code. SQLITE_OK if everything works, SQLITE_NOMEM
+** if a malloc failure occurs, or SQLITE_ERROR if a parse error is encountered.
+** If SQLITE_ERROR is returned, pContext is populated with an error message.
+*/
+static int getNextNode(
+  ParseContext *pParse,                   /* fts3 query parse context */
+  const char *z, int n,                   /* Input string */
+  Fts3Expr **ppExpr,                      /* OUT: expression */
+  int *pnConsumed                         /* OUT: Number of bytes consumed */
+){
+  static const struct Fts3Keyword {
+    char *z;                              /* Keyword text */
+    unsigned char n;                      /* Length of the keyword */
+    unsigned char parenOnly;              /* Only valid in paren mode */
+    unsigned char eType;                  /* Keyword code */
+  } aKeyword[] = {
+    { "OR" ,  2, 0, FTSQUERY_OR   },
+    { "AND",  3, 1, FTSQUERY_AND  },
+    { "NOT",  3, 1, FTSQUERY_NOT  },
+    { "NEAR", 4, 0, FTSQUERY_NEAR }
+  };
+  int ii;
+  int iCol;
+  int iColLen;
+  int rc;
+  Fts3Expr *pRet = 0;
+
+  const char *zInput = z;
+  int nInput = n;
+
+  /* Skip over any whitespace before checking for a keyword, an open or
+  ** close bracket, or a quoted string. 
+  */
+  while( nInput>0 && fts3isspace(*zInput) ){
+    nInput--;
+    zInput++;
+  }
+  if( nInput==0 ){
+    return SQLITE_DONE;
+  }
+
+  /* See if we are dealing with a keyword. */
+  for(ii=0; ii<(int)(sizeof(aKeyword)/sizeof(struct Fts3Keyword)); ii++){
+    const struct Fts3Keyword *pKey = &aKeyword[ii];
+
+    if( (pKey->parenOnly & ~sqlite3_fts3_enable_parentheses)!=0 ){
+      continue;
+    }
+
+    if( nInput>=pKey->n && 0==memcmp(zInput, pKey->z, pKey->n) ){
+      int nNear = SQLITE_FTS3_DEFAULT_NEAR_PARAM;
+      int nKey = pKey->n;
+      char cNext;
+
+      /* If this is a "NEAR" keyword, check for an explicit nearness. */
+      if( pKey->eType==FTSQUERY_NEAR ){
+        assert( nKey==4 );
+        if( zInput[4]=='/' && zInput[5]>='0' && zInput[5]<='9' ){
+          nNear = 0;
+          for(nKey=5; zInput[nKey]>='0' && zInput[nKey]<='9'; nKey++){
+            nNear = nNear * 10 + (zInput[nKey] - '0');
+          }
+        }
+      }
+
+      /* At this point this is probably a keyword. But for that to be true,
+      ** the next byte must contain either whitespace, an open or close
+      ** parenthesis, a quote character, or EOF. 
+      */
+      cNext = zInput[nKey];
+      if( fts3isspace(cNext) 
+       || cNext=='"' || cNext=='(' || cNext==')' || cNext==0
+      ){
+        pRet = (Fts3Expr *)fts3MallocZero(sizeof(Fts3Expr));
+        if( !pRet ){
+          return SQLITE_NOMEM;
+        }
+        pRet->eType = pKey->eType;
+        pRet->nNear = nNear;
+        *ppExpr = pRet;
+        *pnConsumed = (int)((zInput - z) + nKey);
+        return SQLITE_OK;
+      }
+
+      /* Turns out that wasn't a keyword after all. This happens if the
+      ** user has supplied a token such as "ORacle". Continue.
+      */
+    }
+  }
+
+  /* Check for an open bracket. */
+  if( sqlite3_fts3_enable_parentheses ){
+    if( *zInput=='(' ){
+      int nConsumed;
+      pParse->nNest++;
+      rc = fts3ExprParse(pParse, &zInput[1], nInput-1, ppExpr, &nConsumed);
+      if( rc==SQLITE_OK && !*ppExpr ){
+        rc = SQLITE_DONE;
+      }
+      *pnConsumed = (int)((zInput - z) + 1 + nConsumed);
+      return rc;
+    }
+  
+    /* Check for a close bracket. */
+    if( *zInput==')' ){
+      pParse->nNest--;
+      *pnConsumed = (int)((zInput - z) + 1);
+      return SQLITE_DONE;
+    }
+  }
+
+  /* See if we are dealing with a quoted phrase. If this is the case, then
+  ** search for the closing quote and pass the whole string to getNextString()
+  ** for processing. This is easy to do, as fts3 has no syntax for escaping
+  ** a quote character embedded in a string.
+  */
+  if( *zInput=='"' ){
+    for(ii=1; ii<nInput && zInput[ii]!='"'; ii++);
+    *pnConsumed = (int)((zInput - z) + ii + 1);
+    if( ii==nInput ){
+      return SQLITE_ERROR;
+    }
+    return getNextString(pParse, &zInput[1], ii-1, ppExpr);
+  }
+
+
+  /* If control flows to this point, this must be a regular token, or 
+  ** the end of the input. Read a regular token using the sqlite3_tokenizer
+  ** interface. Before doing so, figure out if there is an explicit
+  ** column specifier for the token. 
+  **
+  ** TODO: Strangely, it is not possible to associate a column specifier
+  ** with a quoted phrase, only with a single token. Not sure if this was
+  ** an implementation artifact or an intentional decision when fts3 was
+  ** first implemented. Whichever it was, this module duplicates the 
+  ** limitation.
+  */
+  iCol = pParse->iDefaultCol;
+  iColLen = 0;
+  for(ii=0; ii<pParse->nCol; ii++){
+    const char *zStr = pParse->azCol[ii];
+    int nStr = (int)strlen(zStr);
+    if( nInput>nStr && zInput[nStr]==':' 
+     && sqlite3_strnicmp(zStr, zInput, nStr)==0 
+    ){
+      iCol = ii;
+      iColLen = (int)((zInput - z) + nStr + 1);
+      break;
+    }
+  }
+  rc = getNextToken(pParse, iCol, &z[iColLen], n-iColLen, ppExpr, pnConsumed);
+  *pnConsumed += iColLen;
+  return rc;
+}
+
+/*
+** The argument is an Fts3Expr structure for a binary operator (any type
+** except an FTSQUERY_PHRASE). Return an integer value representing the
+** precedence of the operator. Lower values have a higher precedence (i.e.
+** group more tightly). For example, in the C language, the == operator
+** groups more tightly than ||, and would therefore have a higher precedence.
+**
+** When using the new fts3 query syntax (when SQLITE_ENABLE_FTS3_PARENTHESIS
+** is defined), the order of the operators in precedence from highest to
+** lowest is:
+**
+**   NEAR
+**   NOT
+**   AND (including implicit ANDs)
+**   OR
+**
+** Note that when using the old query syntax, the OR operator has a higher
+** precedence than the AND operator.
+*/
+static int opPrecedence(Fts3Expr *p){
+  assert( p->eType!=FTSQUERY_PHRASE );
+  if( sqlite3_fts3_enable_parentheses ){
+    return p->eType;
+  }else if( p->eType==FTSQUERY_NEAR ){
+    return 1;
+  }else if( p->eType==FTSQUERY_OR ){
+    return 2;
+  }
+  assert( p->eType==FTSQUERY_AND );
+  return 3;
+}
+
+/*
+** Argument ppHead contains a pointer to the current head of a query 
+** expression tree being parsed. pPrev is the expression node most recently
+** inserted into the tree. This function adds pNew, which is always a binary
+** operator node, into the expression tree based on the relative precedence
+** of pNew and the existing nodes of the tree. This may result in the head
+** of the tree changing, in which case *ppHead is set to the new root node.
+*/
+static void insertBinaryOperator(
+  Fts3Expr **ppHead,       /* Pointer to the root node of a tree */
+  Fts3Expr *pPrev,         /* Node most recently inserted into the tree */
+  Fts3Expr *pNew           /* New binary node to insert into expression tree */
+){
+  Fts3Expr *pSplit = pPrev;
+  while( pSplit->pParent && opPrecedence(pSplit->pParent)<=opPrecedence(pNew) ){
+    pSplit = pSplit->pParent;
+  }
+
+  if( pSplit->pParent ){
+    assert( pSplit->pParent->pRight==pSplit );
+    pSplit->pParent->pRight = pNew;
+    pNew->pParent = pSplit->pParent;
+  }else{
+    *ppHead = pNew;
+  }
+  pNew->pLeft = pSplit;
+  pSplit->pParent = pNew;
+}
+
+/*
+** Parse the fts3 query expression found in buffer z, length n. This function
+** returns either when the end of the buffer is reached or an unmatched 
+** closing bracket - ')' - is encountered.
+**
+** If successful, SQLITE_OK is returned, *ppExpr is set to point to the
+** parsed form of the expression and *pnConsumed is set to the number of
+** bytes read from buffer z. Otherwise, *ppExpr is set to 0 and SQLITE_NOMEM
+** (out of memory error) or SQLITE_ERROR (parse error) is returned.
+*/
+static int fts3ExprParse(
+  ParseContext *pParse,                   /* fts3 query parse context */
+  const char *z, int n,                   /* Text of MATCH query */
+  Fts3Expr **ppExpr,                      /* OUT: Parsed query structure */
+  int *pnConsumed                         /* OUT: Number of bytes consumed */
+){
+  Fts3Expr *pRet = 0;
+  Fts3Expr *pPrev = 0;
+  Fts3Expr *pNotBranch = 0;               /* Only used in legacy parse mode */
+  int nIn = n;
+  const char *zIn = z;
+  int rc = SQLITE_OK;
+  int isRequirePhrase = 1;
+
+  while( rc==SQLITE_OK ){
+    Fts3Expr *p = 0;
+    int nByte = 0;
+    rc = getNextNode(pParse, zIn, nIn, &p, &nByte);
+    if( rc==SQLITE_OK ){
+      int isPhrase;
+
+      if( !sqlite3_fts3_enable_parentheses 
+       && p->eType==FTSQUERY_PHRASE && p->pPhrase->isNot 
+      ){
+        /* Create an implicit NOT operator. */
+        Fts3Expr *pNot = fts3MallocZero(sizeof(Fts3Expr));
+        if( !pNot ){
+          sqlite3Fts3ExprFree(p);
+          rc = SQLITE_NOMEM;
+          goto exprparse_out;
+        }
+        pNot->eType = FTSQUERY_NOT;
+        pNot->pRight = p;
+        if( pNotBranch ){
+          pNot->pLeft = pNotBranch;
+        }
+        pNotBranch = pNot;
+        p = pPrev;
+      }else{
+        int eType = p->eType;
+        assert( eType!=FTSQUERY_PHRASE || !p->pPhrase->isNot );
+        isPhrase = (eType==FTSQUERY_PHRASE || p->pLeft);
+
+        /* The isRequirePhrase variable is set to true if a phrase or
+        ** an expression contained in parenthesis is required. If a
+        ** binary operator (AND, OR, NOT or NEAR) is encounted when
+        ** isRequirePhrase is set, this is a syntax error.
+        */
+        if( !isPhrase && isRequirePhrase ){
+          sqlite3Fts3ExprFree(p);
+          rc = SQLITE_ERROR;
+          goto exprparse_out;
+        }
+  
+        if( isPhrase && !isRequirePhrase ){
+          /* Insert an implicit AND operator. */
+          Fts3Expr *pAnd;
+          assert( pRet && pPrev );
+          pAnd = fts3MallocZero(sizeof(Fts3Expr));
+          if( !pAnd ){
+            sqlite3Fts3ExprFree(p);
+            rc = SQLITE_NOMEM;
+            goto exprparse_out;
+          }
+          pAnd->eType = FTSQUERY_AND;
+          insertBinaryOperator(&pRet, pPrev, pAnd);
+          pPrev = pAnd;
+        }
+
+        /* This test catches attempts to make either operand of a NEAR
+        ** operator something other than a phrase. For example, either of
+        ** the following:
+        **
+        **    (bracketed expression) NEAR phrase
+        **    phrase NEAR (bracketed expression)
+        **
+        ** Return an error in either case.
+        */
+        if( pPrev && (
+            (eType==FTSQUERY_NEAR && !isPhrase && pPrev->eType!=FTSQUERY_PHRASE)
+         || (eType!=FTSQUERY_PHRASE && isPhrase && pPrev->eType==FTSQUERY_NEAR)
+        )){
+          sqlite3Fts3ExprFree(p);
+          rc = SQLITE_ERROR;
+          goto exprparse_out;
+        }
+  
+        if( isPhrase ){
+          if( pRet ){
+            assert( pPrev && pPrev->pLeft && pPrev->pRight==0 );
+            pPrev->pRight = p;
+            p->pParent = pPrev;
+          }else{
+            pRet = p;
+          }
+        }else{
+          insertBinaryOperator(&pRet, pPrev, p);
+        }
+        isRequirePhrase = !isPhrase;
+      }
+      assert( nByte>0 );
+    }
+    assert( rc!=SQLITE_OK || (nByte>0 && nByte<=nIn) );
+    nIn -= nByte;
+    zIn += nByte;
+    pPrev = p;
+  }
+
+  if( rc==SQLITE_DONE && pRet && isRequirePhrase ){
+    rc = SQLITE_ERROR;
+  }
+
+  if( rc==SQLITE_DONE ){
+    rc = SQLITE_OK;
+    if( !sqlite3_fts3_enable_parentheses && pNotBranch ){
+      if( !pRet ){
+        rc = SQLITE_ERROR;
+      }else{
+        Fts3Expr *pIter = pNotBranch;
+        while( pIter->pLeft ){
+          pIter = pIter->pLeft;
+        }
+        pIter->pLeft = pRet;
+        pRet = pNotBranch;
+      }
+    }
+  }
+  *pnConsumed = n - nIn;
+
+exprparse_out:
+  if( rc!=SQLITE_OK ){
+    sqlite3Fts3ExprFree(pRet);
+    sqlite3Fts3ExprFree(pNotBranch);
+    pRet = 0;
+  }
+  *ppExpr = pRet;
+  return rc;
+}
+
+/*
+** Parameters z and n contain a pointer to and length of a buffer containing
+** an fts3 query expression, respectively. This function attempts to parse the
+** query expression and create a tree of Fts3Expr structures representing the
+** parsed expression. If successful, *ppExpr is set to point to the head
+** of the parsed expression tree and SQLITE_OK is returned. If an error
+** occurs, either SQLITE_NOMEM (out-of-memory error) or SQLITE_ERROR (parse
+** error) is returned and *ppExpr is set to 0.
+**
+** If parameter n is a negative number, then z is assumed to point to a
+** nul-terminated string and the length is determined using strlen().
+**
+** The first parameter, pTokenizer, is passed the fts3 tokenizer module to
+** use to normalize query tokens while parsing the expression. The azCol[]
+** array, which is assumed to contain nCol entries, should contain the names
+** of each column in the target fts3 table, in order from left to right. 
+** Column names must be nul-terminated strings.
+**
+** The iDefaultCol parameter should be passed the index of the table column
+** that appears on the left-hand-side of the MATCH operator (the default
+** column to match against for tokens for which a column name is not explicitly
+** specified as part of the query string), or -1 if tokens may by default
+** match any table column.
+*/
+SQLITE_PRIVATE int sqlite3Fts3ExprParse(
+  sqlite3_tokenizer *pTokenizer,      /* Tokenizer module */
+  char **azCol,                       /* Array of column names for fts3 table */
+  int nCol,                           /* Number of entries in azCol[] */
+  int iDefaultCol,                    /* Default column to query */
+  const char *z, int n,               /* Text of MATCH query */
+  Fts3Expr **ppExpr                   /* OUT: Parsed query structure */
+){
+  int nParsed;
+  int rc;
+  ParseContext sParse;
+  sParse.pTokenizer = pTokenizer;
+  sParse.azCol = (const char **)azCol;
+  sParse.nCol = nCol;
+  sParse.iDefaultCol = iDefaultCol;
+  sParse.nNest = 0;
+  if( z==0 ){
+    *ppExpr = 0;
+    return SQLITE_OK;
+  }
+  if( n<0 ){
+    n = (int)strlen(z);
+  }
+  rc = fts3ExprParse(&sParse, z, n, ppExpr, &nParsed);
+
+  /* Check for mismatched parenthesis */
+  if( rc==SQLITE_OK && sParse.nNest ){
+    rc = SQLITE_ERROR;
+    sqlite3Fts3ExprFree(*ppExpr);
+    *ppExpr = 0;
+  }
+
+  return rc;
+}
+
+/*
+** Free a parsed fts3 query expression allocated by sqlite3Fts3ExprParse().
+*/
+SQLITE_PRIVATE void sqlite3Fts3ExprFree(Fts3Expr *p){
+  if( p ){
+    sqlite3Fts3ExprFree(p->pLeft);
+    sqlite3Fts3ExprFree(p->pRight);
+    sqlite3_free(p->aDoclist);
+    sqlite3_free(p);
+  }
+}
+
+/****************************************************************************
+*****************************************************************************
+** Everything after this point is just test code.
+*/
+
+#ifdef SQLITE_TEST
+
+
+/*
+** Function to query the hash-table of tokenizers (see README.tokenizers).
+*/
+static int queryTestTokenizer(
+  sqlite3 *db, 
+  const char *zName,  
+  const sqlite3_tokenizer_module **pp
+){
+  int rc;
+  sqlite3_stmt *pStmt;
+  const char zSql[] = "SELECT fts3_tokenizer(?)";
+
+  *pp = 0;
+  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+
+  sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
+  if( SQLITE_ROW==sqlite3_step(pStmt) ){
+    if( sqlite3_column_type(pStmt, 0)==SQLITE_BLOB ){
+      memcpy((void *)pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
+    }
+  }
+
+  return sqlite3_finalize(pStmt);
+}
+
+/*
+** Return a pointer to a buffer containing a text representation of the
+** expression passed as the first argument. The buffer is obtained from
+** sqlite3_malloc(). It is the responsibility of the caller to use 
+** sqlite3_free() to release the memory. If an OOM condition is encountered,
+** NULL is returned.
+**
+** If the second argument is not NULL, then its contents are prepended to 
+** the returned expression text and then freed using sqlite3_free().
+*/
+static char *exprToString(Fts3Expr *pExpr, char *zBuf){
+  switch( pExpr->eType ){
+    case FTSQUERY_PHRASE: {
+      Fts3Phrase *pPhrase = pExpr->pPhrase;
+      int i;
+      zBuf = sqlite3_mprintf(
+          "%zPHRASE %d %d", zBuf, pPhrase->iColumn, pPhrase->isNot);
+      for(i=0; zBuf && i<pPhrase->nToken; i++){
+        zBuf = sqlite3_mprintf("%z %.*s%s", zBuf, 
+            pPhrase->aToken[i].n, pPhrase->aToken[i].z,
+            (pPhrase->aToken[i].isPrefix?"+":"")
+        );
+      }
+      return zBuf;
+    }
+
+    case FTSQUERY_NEAR:
+      zBuf = sqlite3_mprintf("%zNEAR/%d ", zBuf, pExpr->nNear);
+      break;
+    case FTSQUERY_NOT:
+      zBuf = sqlite3_mprintf("%zNOT ", zBuf);
+      break;
+    case FTSQUERY_AND:
+      zBuf = sqlite3_mprintf("%zAND ", zBuf);
+      break;
+    case FTSQUERY_OR:
+      zBuf = sqlite3_mprintf("%zOR ", zBuf);
+      break;
+  }
+
+  if( zBuf ) zBuf = sqlite3_mprintf("%z{", zBuf);
+  if( zBuf ) zBuf = exprToString(pExpr->pLeft, zBuf);
+  if( zBuf ) zBuf = sqlite3_mprintf("%z} {", zBuf);
+
+  if( zBuf ) zBuf = exprToString(pExpr->pRight, zBuf);
+  if( zBuf ) zBuf = sqlite3_mprintf("%z}", zBuf);
+
+  return zBuf;
+}
+
+/*
+** This is the implementation of a scalar SQL function used to test the 
+** expression parser. It should be called as follows:
+**
+**   fts3_exprtest(<tokenizer>, <expr>, <column 1>, ...);
+**
+** The first argument, <tokenizer>, is the name of the fts3 tokenizer used
+** to parse the query expression (see README.tokenizers). The second argument
+** is the query expression to parse. Each subsequent argument is the name
+** of a column of the fts3 table that the query expression may refer to.
+** For example:
+**
+**   SELECT fts3_exprtest('simple', 'Bill col2:Bloggs', 'col1', 'col2');
+*/
+static void fts3ExprTest(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  sqlite3_tokenizer_module const *pModule = 0;
+  sqlite3_tokenizer *pTokenizer = 0;
+  int rc;
+  char **azCol = 0;
+  const char *zExpr;
+  int nExpr;
+  int nCol;
+  int ii;
+  Fts3Expr *pExpr;
+  char *zBuf = 0;
+  sqlite3 *db = sqlite3_context_db_handle(context);
+
+  if( argc<3 ){
+    sqlite3_result_error(context, 
+        "Usage: fts3_exprtest(tokenizer, expr, col1, ...", -1
+    );
+    return;
+  }
+
+  rc = queryTestTokenizer(db,
+                          (const char *)sqlite3_value_text(argv[0]), &pModule);
+  if( rc==SQLITE_NOMEM ){
+    sqlite3_result_error_nomem(context);
+    goto exprtest_out;
+  }else if( !pModule ){
+    sqlite3_result_error(context, "No such tokenizer module", -1);
+    goto exprtest_out;
+  }
+
+  rc = pModule->xCreate(0, 0, &pTokenizer);
+  assert( rc==SQLITE_NOMEM || rc==SQLITE_OK );
+  if( rc==SQLITE_NOMEM ){
+    sqlite3_result_error_nomem(context);
+    goto exprtest_out;
+  }
+  pTokenizer->pModule = pModule;
+
+  zExpr = (const char *)sqlite3_value_text(argv[1]);
+  nExpr = sqlite3_value_bytes(argv[1]);
+  nCol = argc-2;
+  azCol = (char **)sqlite3_malloc(nCol*sizeof(char *));
+  if( !azCol ){
+    sqlite3_result_error_nomem(context);
+    goto exprtest_out;
+  }
+  for(ii=0; ii<nCol; ii++){
+    azCol[ii] = (char *)sqlite3_value_text(argv[ii+2]);
+  }
+
+  rc = sqlite3Fts3ExprParse(
+      pTokenizer, azCol, nCol, nCol, zExpr, nExpr, &pExpr
+  );
+  if( rc!=SQLITE_OK && rc!=SQLITE_NOMEM ){
+    sqlite3_result_error(context, "Error parsing expression", -1);
+  }else if( rc==SQLITE_NOMEM || !(zBuf = exprToString(pExpr, 0)) ){
+    sqlite3_result_error_nomem(context);
+  }else{
+    sqlite3_result_text(context, zBuf, -1, SQLITE_TRANSIENT);
+    sqlite3_free(zBuf);
+  }
+
+  sqlite3Fts3ExprFree(pExpr);
+
+exprtest_out:
+  if( pModule && pTokenizer ){
+    rc = pModule->xDestroy(pTokenizer);
+  }
+  sqlite3_free(azCol);
+}
+
+/*
+** Register the query expression parser test function fts3_exprtest() 
+** with database connection db. 
+*/
+SQLITE_PRIVATE int sqlite3Fts3ExprInitTestInterface(sqlite3* db){
+  return sqlite3_create_function(
+      db, "fts3_exprtest", -1, SQLITE_UTF8, 0, fts3ExprTest, 0, 0
+  );
+}
+
+#endif
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
+
+/************** End of fts3_expr.c *******************************************/
+/************** Begin file fts3_hash.c ***************************************/
+/*
+** 2001 September 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This is the implementation of generic hash-tables used in SQLite.
+** We've modified it slightly to serve as a standalone hash table
+** implementation for the full-text indexing module.
+*/
+
+/*
+** The code in this file is only compiled if:
+**
+**     * The FTS3 module is being built as an extension
+**       (in which case SQLITE_CORE is not defined), or
+**
+**     * The FTS3 module is being built into the core of
+**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
+*/
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
+
+
+/*
+** Malloc and Free functions
+*/
+static void *fts3HashMalloc(int n){
+  void *p = sqlite3_malloc(n);
+  if( p ){
+    memset(p, 0, n);
+  }
+  return p;
+}
+static void fts3HashFree(void *p){
+  sqlite3_free(p);
+}
+
+/* Turn bulk memory into a hash table object by initializing the
+** fields of the Hash structure.
+**
+** "pNew" is a pointer to the hash table that is to be initialized.
+** keyClass is one of the constants 
+** FTS3_HASH_BINARY or FTS3_HASH_STRING.  The value of keyClass 
+** determines what kind of key the hash table will use.  "copyKey" is
+** true if the hash table should make its own private copy of keys and
+** false if it should just use the supplied pointer.
+*/
+SQLITE_PRIVATE void sqlite3Fts3HashInit(Fts3Hash *pNew, char keyClass, char copyKey){
+  assert( pNew!=0 );
+  assert( keyClass>=FTS3_HASH_STRING && keyClass<=FTS3_HASH_BINARY );
+  pNew->keyClass = keyClass;
+  pNew->copyKey = copyKey;
+  pNew->first = 0;
+  pNew->count = 0;
+  pNew->htsize = 0;
+  pNew->ht = 0;
+}
+
+/* Remove all entries from a hash table.  Reclaim all memory.
+** Call this routine to delete a hash table or to reset a hash table
+** to the empty state.
+*/
+SQLITE_PRIVATE void sqlite3Fts3HashClear(Fts3Hash *pH){
+  Fts3HashElem *elem;         /* For looping over all elements of the table */
+
+  assert( pH!=0 );
+  elem = pH->first;
+  pH->first = 0;
+  fts3HashFree(pH->ht);
+  pH->ht = 0;
+  pH->htsize = 0;
+  while( elem ){
+    Fts3HashElem *next_elem = elem->next;
+    if( pH->copyKey && elem->pKey ){
+      fts3HashFree(elem->pKey);
+    }
+    fts3HashFree(elem);
+    elem = next_elem;
+  }
+  pH->count = 0;
+}
+
+/*
+** Hash and comparison functions when the mode is FTS3_HASH_STRING
+*/
+static int fts3StrHash(const void *pKey, int nKey){
+  const char *z = (const char *)pKey;
+  int h = 0;
+  if( nKey<=0 ) nKey = (int) strlen(z);
+  while( nKey > 0  ){
+    h = (h<<3) ^ h ^ *z++;
+    nKey--;
+  }
+  return h & 0x7fffffff;
+}
+static int fts3StrCompare(const void *pKey1, int n1, const void *pKey2, int n2){
+  if( n1!=n2 ) return 1;
+  return strncmp((const char*)pKey1,(const char*)pKey2,n1);
+}
+
+/*
+** Hash and comparison functions when the mode is FTS3_HASH_BINARY
+*/
+static int fts3BinHash(const void *pKey, int nKey){
+  int h = 0;
+  const char *z = (const char *)pKey;
+  while( nKey-- > 0 ){
+    h = (h<<3) ^ h ^ *(z++);
+  }
+  return h & 0x7fffffff;
+}
+static int fts3BinCompare(const void *pKey1, int n1, const void *pKey2, int n2){
+  if( n1!=n2 ) return 1;
+  return memcmp(pKey1,pKey2,n1);
+}
+
+/*
+** Return a pointer to the appropriate hash function given the key class.
+**
+** The C syntax in this function definition may be unfamilar to some 
+** programmers, so we provide the following additional explanation:
+**
+** The name of the function is "ftsHashFunction".  The function takes a
+** single parameter "keyClass".  The return value of ftsHashFunction()
+** is a pointer to another function.  Specifically, the return value
+** of ftsHashFunction() is a pointer to a function that takes two parameters
+** with types "const void*" and "int" and returns an "int".
+*/
+static int (*ftsHashFunction(int keyClass))(const void*,int){
+  if( keyClass==FTS3_HASH_STRING ){
+    return &fts3StrHash;
+  }else{
+    assert( keyClass==FTS3_HASH_BINARY );
+    return &fts3BinHash;
+  }
+}
+
+/*
+** Return a pointer to the appropriate hash function given the key class.
+**
+** For help in interpreted the obscure C code in the function definition,
+** see the header comment on the previous function.
+*/
+static int (*ftsCompareFunction(int keyClass))(const void*,int,const void*,int){
+  if( keyClass==FTS3_HASH_STRING ){
+    return &fts3StrCompare;
+  }else{
+    assert( keyClass==FTS3_HASH_BINARY );
+    return &fts3BinCompare;
+  }
+}
+
+/* Link an element into the hash table
+*/
+static void fts3HashInsertElement(
+  Fts3Hash *pH,            /* The complete hash table */
+  struct _fts3ht *pEntry,  /* The entry into which pNew is inserted */
+  Fts3HashElem *pNew       /* The element to be inserted */
+){
+  Fts3HashElem *pHead;     /* First element already in pEntry */
+  pHead = pEntry->chain;
+  if( pHead ){
+    pNew->next = pHead;
+    pNew->prev = pHead->prev;
+    if( pHead->prev ){ pHead->prev->next = pNew; }
+    else             { pH->first = pNew; }
+    pHead->prev = pNew;
+  }else{
+    pNew->next = pH->first;
+    if( pH->first ){ pH->first->prev = pNew; }
+    pNew->prev = 0;
+    pH->first = pNew;
+  }
+  pEntry->count++;
+  pEntry->chain = pNew;
+}
+
+
+/* Resize the hash table so that it cantains "new_size" buckets.
+** "new_size" must be a power of 2.  The hash table might fail 
+** to resize if sqliteMalloc() fails.
+**
+** Return non-zero if a memory allocation error occurs.
+*/
+static int fts3Rehash(Fts3Hash *pH, int new_size){
+  struct _fts3ht *new_ht;          /* The new hash table */
+  Fts3HashElem *elem, *next_elem;  /* For looping over existing elements */
+  int (*xHash)(const void*,int);   /* The hash function */
+
+  assert( (new_size & (new_size-1))==0 );
+  new_ht = (struct _fts3ht *)fts3HashMalloc( new_size*sizeof(struct _fts3ht) );
+  if( new_ht==0 ) return 1;
+  fts3HashFree(pH->ht);
+  pH->ht = new_ht;
+  pH->htsize = new_size;
+  xHash = ftsHashFunction(pH->keyClass);
+  for(elem=pH->first, pH->first=0; elem; elem = next_elem){
+    int h = (*xHash)(elem->pKey, elem->nKey) & (new_size-1);
+    next_elem = elem->next;
+    fts3HashInsertElement(pH, &new_ht[h], elem);
+  }
+  return 0;
+}
+
+/* This function (for internal use only) locates an element in an
+** hash table that matches the given key.  The hash for this key has
+** already been computed and is passed as the 4th parameter.
+*/
+static Fts3HashElem *fts3FindElementByHash(
+  const Fts3Hash *pH, /* The pH to be searched */
+  const void *pKey,   /* The key we are searching for */
+  int nKey,
+  int h               /* The hash for this key. */
+){
+  Fts3HashElem *elem;            /* Used to loop thru the element list */
+  int count;                     /* Number of elements left to test */
+  int (*xCompare)(const void*,int,const void*,int);  /* comparison function */
+
+  if( pH->ht ){
+    struct _fts3ht *pEntry = &pH->ht[h];
+    elem = pEntry->chain;
+    count = pEntry->count;
+    xCompare = ftsCompareFunction(pH->keyClass);
+    while( count-- && elem ){
+      if( (*xCompare)(elem->pKey,elem->nKey,pKey,nKey)==0 ){ 
+        return elem;
+      }
+      elem = elem->next;
+    }
+  }
+  return 0;
+}
+
+/* Remove a single entry from the hash table given a pointer to that
+** element and a hash on the element's key.
+*/
+static void fts3RemoveElementByHash(
+  Fts3Hash *pH,         /* The pH containing "elem" */
+  Fts3HashElem* elem,   /* The element to be removed from the pH */
+  int h                 /* Hash value for the element */
+){
+  struct _fts3ht *pEntry;
+  if( elem->prev ){
+    elem->prev->next = elem->next; 
+  }else{
+    pH->first = elem->next;
+  }
+  if( elem->next ){
+    elem->next->prev = elem->prev;
+  }
+  pEntry = &pH->ht[h];
+  if( pEntry->chain==elem ){
+    pEntry->chain = elem->next;
+  }
+  pEntry->count--;
+  if( pEntry->count<=0 ){
+    pEntry->chain = 0;
+  }
+  if( pH->copyKey && elem->pKey ){
+    fts3HashFree(elem->pKey);
+  }
+  fts3HashFree( elem );
+  pH->count--;
+  if( pH->count<=0 ){
+    assert( pH->first==0 );
+    assert( pH->count==0 );
+    fts3HashClear(pH);
+  }
+}
+
+SQLITE_PRIVATE Fts3HashElem *sqlite3Fts3HashFindElem(
+  const Fts3Hash *pH, 
+  const void *pKey, 
+  int nKey
+){
+  int h;                          /* A hash on key */
+  int (*xHash)(const void*,int);  /* The hash function */
+
+  if( pH==0 || pH->ht==0 ) return 0;
+  xHash = ftsHashFunction(pH->keyClass);
+  assert( xHash!=0 );
+  h = (*xHash)(pKey,nKey);
+  assert( (pH->htsize & (pH->htsize-1))==0 );
+  return fts3FindElementByHash(pH,pKey,nKey, h & (pH->htsize-1));
+}
+
+/* 
+** Attempt to locate an element of the hash table pH with a key
+** that matches pKey,nKey.  Return the data for this element if it is
+** found, or NULL if there is no match.
+*/
+SQLITE_PRIVATE void *sqlite3Fts3HashFind(const Fts3Hash *pH, const void *pKey, int nKey){
+  Fts3HashElem *pElem;            /* The element that matches key (if any) */
+
+  pElem = sqlite3Fts3HashFindElem(pH, pKey, nKey);
+  return pElem ? pElem->data : 0;
+}
+
+/* Insert an element into the hash table pH.  The key is pKey,nKey
+** and the data is "data".
+**
+** If no element exists with a matching key, then a new
+** element is created.  A copy of the key is made if the copyKey
+** flag is set.  NULL is returned.
+**
+** If another element already exists with the same key, then the
+** new data replaces the old data and the old data is returned.
+** The key is not copied in this instance.  If a malloc fails, then
+** the new data is returned and the hash table is unchanged.
+**
+** If the "data" parameter to this function is NULL, then the
+** element corresponding to "key" is removed from the hash table.
+*/
+SQLITE_PRIVATE void *sqlite3Fts3HashInsert(
+  Fts3Hash *pH,        /* The hash table to insert into */
+  const void *pKey,    /* The key */
+  int nKey,            /* Number of bytes in the key */
+  void *data           /* The data */
+){
+  int hraw;                 /* Raw hash value of the key */
+  int h;                    /* the hash of the key modulo hash table size */
+  Fts3HashElem *elem;       /* Used to loop thru the element list */
+  Fts3HashElem *new_elem;   /* New element added to the pH */
+  int (*xHash)(const void*,int);  /* The hash function */
+
+  assert( pH!=0 );
+  xHash = ftsHashFunction(pH->keyClass);
+  assert( xHash!=0 );
+  hraw = (*xHash)(pKey, nKey);
+  assert( (pH->htsize & (pH->htsize-1))==0 );
+  h = hraw & (pH->htsize-1);
+  elem = fts3FindElementByHash(pH,pKey,nKey,h);
+  if( elem ){
+    void *old_data = elem->data;
+    if( data==0 ){
+      fts3RemoveElementByHash(pH,elem,h);
+    }else{
+      elem->data = data;
+    }
+    return old_data;
+  }
+  if( data==0 ) return 0;
+  if( (pH->htsize==0 && fts3Rehash(pH,8))
+   || (pH->count>=pH->htsize && fts3Rehash(pH, pH->htsize*2))
+  ){
+    pH->count = 0;
+    return data;
+  }
+  assert( pH->htsize>0 );
+  new_elem = (Fts3HashElem*)fts3HashMalloc( sizeof(Fts3HashElem) );
+  if( new_elem==0 ) return data;
+  if( pH->copyKey && pKey!=0 ){
+    new_elem->pKey = fts3HashMalloc( nKey );
+    if( new_elem->pKey==0 ){
+      fts3HashFree(new_elem);
+      return data;
+    }
+    memcpy((void*)new_elem->pKey, pKey, nKey);
+  }else{
+    new_elem->pKey = (void*)pKey;
+  }
+  new_elem->nKey = nKey;
+  pH->count++;
+  assert( pH->htsize>0 );
+  assert( (pH->htsize & (pH->htsize-1))==0 );
+  h = hraw & (pH->htsize-1);
+  fts3HashInsertElement(pH, &pH->ht[h], new_elem);
+  new_elem->data = data;
+  return 0;
+}
+
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
+
+/************** End of fts3_hash.c *******************************************/
+/************** Begin file fts3_porter.c *************************************/
+/*
+** 2006 September 30
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** Implementation of the full-text-search tokenizer that implements
+** a Porter stemmer.
+*/
+
+/*
+** The code in this file is only compiled if:
+**
+**     * The FTS3 module is being built as an extension
+**       (in which case SQLITE_CORE is not defined), or
+**
+**     * The FTS3 module is being built into the core of
+**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
+*/
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
+
+
+
+/*
+** Class derived from sqlite3_tokenizer
+*/
+typedef struct porter_tokenizer {
+  sqlite3_tokenizer base;      /* Base class */
+} porter_tokenizer;
+
+/*
+** Class derived from sqlit3_tokenizer_cursor
+*/
+typedef struct porter_tokenizer_cursor {
+  sqlite3_tokenizer_cursor base;
+  const char *zInput;          /* input we are tokenizing */
+  int nInput;                  /* size of the input */
+  int iOffset;                 /* current position in zInput */
+  int iToken;                  /* index of next token to be returned */
+  char *zToken;                /* storage for current token */
+  int nAllocated;              /* space allocated to zToken buffer */
+} porter_tokenizer_cursor;
+
+
+/*
+** Create a new tokenizer instance.
+*/
+static int porterCreate(
+  int argc, const char * const *argv,
+  sqlite3_tokenizer **ppTokenizer
+){
+  porter_tokenizer *t;
+
+  UNUSED_PARAMETER(argc);
+  UNUSED_PARAMETER(argv);
+
+  t = (porter_tokenizer *) sqlite3_malloc(sizeof(*t));
+  if( t==NULL ) return SQLITE_NOMEM;
+  memset(t, 0, sizeof(*t));
+  *ppTokenizer = &t->base;
+  return SQLITE_OK;
+}
+
+/*
+** Destroy a tokenizer
+*/
+static int porterDestroy(sqlite3_tokenizer *pTokenizer){
+  sqlite3_free(pTokenizer);
+  return SQLITE_OK;
+}
+
+/*
+** Prepare to begin tokenizing a particular string.  The input
+** string to be tokenized is zInput[0..nInput-1].  A cursor
+** used to incrementally tokenize this string is returned in 
+** *ppCursor.
+*/
+static int porterOpen(
+  sqlite3_tokenizer *pTokenizer,         /* The tokenizer */
+  const char *zInput, int nInput,        /* String to be tokenized */
+  sqlite3_tokenizer_cursor **ppCursor    /* OUT: Tokenization cursor */
+){
+  porter_tokenizer_cursor *c;
+
+  UNUSED_PARAMETER(pTokenizer);
+
+  c = (porter_tokenizer_cursor *) sqlite3_malloc(sizeof(*c));
+  if( c==NULL ) return SQLITE_NOMEM;
+
+  c->zInput = zInput;
+  if( zInput==0 ){
+    c->nInput = 0;
+  }else if( nInput<0 ){
+    c->nInput = (int)strlen(zInput);
+  }else{
+    c->nInput = nInput;
+  }
+  c->iOffset = 0;                 /* start tokenizing at the beginning */
+  c->iToken = 0;
+  c->zToken = NULL;               /* no space allocated, yet. */
+  c->nAllocated = 0;
+
+  *ppCursor = &c->base;
+  return SQLITE_OK;
+}
+
+/*
+** Close a tokenization cursor previously opened by a call to
+** porterOpen() above.
+*/
+static int porterClose(sqlite3_tokenizer_cursor *pCursor){
+  porter_tokenizer_cursor *c = (porter_tokenizer_cursor *) pCursor;
+  sqlite3_free(c->zToken);
+  sqlite3_free(c);
+  return SQLITE_OK;
+}
+/*
+** Vowel or consonant
+*/
+static const char cType[] = {
+   0, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0, 1, 1, 1, 1, 1, 0,
+   1, 1, 1, 2, 1
+};
+
+/*
+** isConsonant() and isVowel() determine if their first character in
+** the string they point to is a consonant or a vowel, according
+** to Porter ruls.  
+**
+** A consonate is any letter other than 'a', 'e', 'i', 'o', or 'u'.
+** 'Y' is a consonant unless it follows another consonant,
+** in which case it is a vowel.
+**
+** In these routine, the letters are in reverse order.  So the 'y' rule
+** is that 'y' is a consonant unless it is followed by another
+** consonent.
+*/
+static int isVowel(const char*);
+static int isConsonant(const char *z){
+  int j;
+  char x = *z;
+  if( x==0 ) return 0;
+  assert( x>='a' && x<='z' );
+  j = cType[x-'a'];
+  if( j<2 ) return j;
+  return z[1]==0 || isVowel(z + 1);
+}
+static int isVowel(const char *z){
+  int j;
+  char x = *z;
+  if( x==0 ) return 0;
+  assert( x>='a' && x<='z' );
+  j = cType[x-'a'];
+  if( j<2 ) return 1-j;
+  return isConsonant(z + 1);
+}
+
+/*
+** Let any sequence of one or more vowels be represented by V and let
+** C be sequence of one or more consonants.  Then every word can be
+** represented as:
+**
+**           [C] (VC){m} [V]
+**
+** In prose:  A word is an optional consonant followed by zero or
+** vowel-consonant pairs followed by an optional vowel.  "m" is the
+** number of vowel consonant pairs.  This routine computes the value
+** of m for the first i bytes of a word.
+**
+** Return true if the m-value for z is 1 or more.  In other words,
+** return true if z contains at least one vowel that is followed
+** by a consonant.
+**
+** In this routine z[] is in reverse order.  So we are really looking
+** for an instance of of a consonant followed by a vowel.
+*/
+static int m_gt_0(const char *z){
+  while( isVowel(z) ){ z++; }
+  if( *z==0 ) return 0;
+  while( isConsonant(z) ){ z++; }
+  return *z!=0;
+}
+
+/* Like mgt0 above except we are looking for a value of m which is
+** exactly 1
+*/
+static int m_eq_1(const char *z){
+  while( isVowel(z) ){ z++; }
+  if( *z==0 ) return 0;
+  while( isConsonant(z) ){ z++; }
+  if( *z==0 ) return 0;
+  while( isVowel(z) ){ z++; }
+  if( *z==0 ) return 1;
+  while( isConsonant(z) ){ z++; }
+  return *z==0;
+}
+
+/* Like mgt0 above except we are looking for a value of m>1 instead
+** or m>0
+*/
+static int m_gt_1(const char *z){
+  while( isVowel(z) ){ z++; }
+  if( *z==0 ) return 0;
+  while( isConsonant(z) ){ z++; }
+  if( *z==0 ) return 0;
+  while( isVowel(z) ){ z++; }
+  if( *z==0 ) return 0;
+  while( isConsonant(z) ){ z++; }
+  return *z!=0;
+}
+
+/*
+** Return TRUE if there is a vowel anywhere within z[0..n-1]
+*/
+static int hasVowel(const char *z){
+  while( isConsonant(z) ){ z++; }
+  return *z!=0;
+}
+
+/*
+** Return TRUE if the word ends in a double consonant.
+**
+** The text is reversed here. So we are really looking at
+** the first two characters of z[].
+*/
+static int doubleConsonant(const char *z){
+  return isConsonant(z) && z[0]==z[1];
+}
+
+/*
+** Return TRUE if the word ends with three letters which
+** are consonant-vowel-consonent and where the final consonant
+** is not 'w', 'x', or 'y'.
+**
+** The word is reversed here.  So we are really checking the
+** first three letters and the first one cannot be in [wxy].
+*/
+static int star_oh(const char *z){
+  return
+    isConsonant(z) &&
+    z[0]!='w' && z[0]!='x' && z[0]!='y' &&
+    isVowel(z+1) &&
+    isConsonant(z+2);
+}
+
+/*
+** If the word ends with zFrom and xCond() is true for the stem
+** of the word that preceeds the zFrom ending, then change the 
+** ending to zTo.
+**
+** The input word *pz and zFrom are both in reverse order.  zTo
+** is in normal order. 
+**
+** Return TRUE if zFrom matches.  Return FALSE if zFrom does not
+** match.  Not that TRUE is returned even if xCond() fails and
+** no substitution occurs.
+*/
+static int stem(
+  char **pz,             /* The word being stemmed (Reversed) */
+  const char *zFrom,     /* If the ending matches this... (Reversed) */
+  const char *zTo,       /* ... change the ending to this (not reversed) */
+  int (*xCond)(const char*)   /* Condition that must be true */
+){
+  char *z = *pz;
+  while( *zFrom && *zFrom==*z ){ z++; zFrom++; }
+  if( *zFrom!=0 ) return 0;
+  if( xCond && !xCond(z) ) return 1;
+  while( *zTo ){
+    *(--z) = *(zTo++);
+  }
+  *pz = z;
+  return 1;
+}
+
+/*
+** This is the fallback stemmer used when the porter stemmer is
+** inappropriate.  The input word is copied into the output with
+** US-ASCII case folding.  If the input word is too long (more
+** than 20 bytes if it contains no digits or more than 6 bytes if
+** it contains digits) then word is truncated to 20 or 6 bytes
+** by taking 10 or 3 bytes from the beginning and end.
+*/
+static void copy_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){
+  int i, mx, j;
+  int hasDigit = 0;
+  for(i=0; i<nIn; i++){
+    char c = zIn[i];
+    if( c>='A' && c<='Z' ){
+      zOut[i] = c - 'A' + 'a';
+    }else{
+      if( c>='0' && c<='9' ) hasDigit = 1;
+      zOut[i] = c;
+    }
+  }
+  mx = hasDigit ? 3 : 10;
+  if( nIn>mx*2 ){
+    for(j=mx, i=nIn-mx; i<nIn; i++, j++){
+      zOut[j] = zOut[i];
+    }
+    i = j;
+  }
+  zOut[i] = 0;
+  *pnOut = i;
+}
+
+
+/*
+** Stem the input word zIn[0..nIn-1].  Store the output in zOut.
+** zOut is at least big enough to hold nIn bytes.  Write the actual
+** size of the output word (exclusive of the '\0' terminator) into *pnOut.
+**
+** Any upper-case characters in the US-ASCII character set ([A-Z])
+** are converted to lower case.  Upper-case UTF characters are
+** unchanged.
+**
+** Words that are longer than about 20 bytes are stemmed by retaining
+** a few bytes from the beginning and the end of the word.  If the
+** word contains digits, 3 bytes are taken from the beginning and
+** 3 bytes from the end.  For long words without digits, 10 bytes
+** are taken from each end.  US-ASCII case folding still applies.
+** 
+** If the input word contains not digits but does characters not 
+** in [a-zA-Z] then no stemming is attempted and this routine just 
+** copies the input into the input into the output with US-ASCII
+** case folding.
+**
+** Stemming never increases the length of the word.  So there is
+** no chance of overflowing the zOut buffer.
+*/
+static void porter_stemmer(const char *zIn, int nIn, char *zOut, int *pnOut){
+  int i, j;
+  char zReverse[28];
+  char *z, *z2;
+  if( nIn<3 || nIn>=(int)sizeof(zReverse)-7 ){
+    /* The word is too big or too small for the porter stemmer.
+    ** Fallback to the copy stemmer */
+    copy_stemmer(zIn, nIn, zOut, pnOut);
+    return;
+  }
+  for(i=0, j=sizeof(zReverse)-6; i<nIn; i++, j--){
+    char c = zIn[i];
+    if( c>='A' && c<='Z' ){
+      zReverse[j] = c + 'a' - 'A';
+    }else if( c>='a' && c<='z' ){
+      zReverse[j] = c;
+    }else{
+      /* The use of a character not in [a-zA-Z] means that we fallback
+      ** to the copy stemmer */
+      copy_stemmer(zIn, nIn, zOut, pnOut);
+      return;
+    }
+  }
+  memset(&zReverse[sizeof(zReverse)-5], 0, 5);
+  z = &zReverse[j+1];
+
+
+  /* Step 1a */
+  if( z[0]=='s' ){
+    if(
+     !stem(&z, "sess", "ss", 0) &&
+     !stem(&z, "sei", "i", 0)  &&
+     !stem(&z, "ss", "ss", 0)
+    ){
+      z++;
+    }
+  }
+
+  /* Step 1b */  
+  z2 = z;
+  if( stem(&z, "dee", "ee", m_gt_0) ){
+    /* Do nothing.  The work was all in the test */
+  }else if( 
+     (stem(&z, "gni", "", hasVowel) || stem(&z, "de", "", hasVowel))
+      && z!=z2
+  ){
+     if( stem(&z, "ta", "ate", 0) ||
+         stem(&z, "lb", "ble", 0) ||
+         stem(&z, "zi", "ize", 0) ){
+       /* Do nothing.  The work was all in the test */
+     }else if( doubleConsonant(z) && (*z!='l' && *z!='s' && *z!='z') ){
+       z++;
+     }else if( m_eq_1(z) && star_oh(z) ){
+       *(--z) = 'e';
+     }
+  }
+
+  /* Step 1c */
+  if( z[0]=='y' && hasVowel(z+1) ){
+    z[0] = 'i';
+  }
+
+  /* Step 2 */
+  switch( z[1] ){
+   case 'a':
+     stem(&z, "lanoita", "ate", m_gt_0) ||
+     stem(&z, "lanoit", "tion", m_gt_0);
+     break;
+   case 'c':
+     stem(&z, "icne", "ence", m_gt_0) ||
+     stem(&z, "icna", "ance", m_gt_0);
+     break;
+   case 'e':
+     stem(&z, "rezi", "ize", m_gt_0);
+     break;
+   case 'g':
+     stem(&z, "igol", "log", m_gt_0);
+     break;
+   case 'l':
+     stem(&z, "ilb", "ble", m_gt_0) ||
+     stem(&z, "illa", "al", m_gt_0) ||
+     stem(&z, "iltne", "ent", m_gt_0) ||
+     stem(&z, "ile", "e", m_gt_0) ||
+     stem(&z, "ilsuo", "ous", m_gt_0);
+     break;
+   case 'o':
+     stem(&z, "noitazi", "ize", m_gt_0) ||
+     stem(&z, "noita", "ate", m_gt_0) ||
+     stem(&z, "rota", "ate", m_gt_0);
+     break;
+   case 's':
+     stem(&z, "msila", "al", m_gt_0) ||
+     stem(&z, "ssenevi", "ive", m_gt_0) ||
+     stem(&z, "ssenluf", "ful", m_gt_0) ||
+     stem(&z, "ssensuo", "ous", m_gt_0);
+     break;
+   case 't':
+     stem(&z, "itila", "al", m_gt_0) ||
+     stem(&z, "itivi", "ive", m_gt_0) ||
+     stem(&z, "itilib", "ble", m_gt_0);
+     break;
+  }
+
+  /* Step 3 */
+  switch( z[0] ){
+   case 'e':
+     stem(&z, "etaci", "ic", m_gt_0) ||
+     stem(&z, "evita", "", m_gt_0)   ||
+     stem(&z, "ezila", "al", m_gt_0);
+     break;
+   case 'i':
+     stem(&z, "itici", "ic", m_gt_0);
+     break;
+   case 'l':
+     stem(&z, "laci", "ic", m_gt_0) ||
+     stem(&z, "luf", "", m_gt_0);
+     break;
+   case 's':
+     stem(&z, "ssen", "", m_gt_0);
+     break;
+  }
+
+  /* Step 4 */
+  switch( z[1] ){
+   case 'a':
+     if( z[0]=='l' && m_gt_1(z+2) ){
+       z += 2;
+     }
+     break;
+   case 'c':
+     if( z[0]=='e' && z[2]=='n' && (z[3]=='a' || z[3]=='e')  && m_gt_1(z+4)  ){
+       z += 4;
+     }
+     break;
+   case 'e':
+     if( z[0]=='r' && m_gt_1(z+2) ){
+       z += 2;
+     }
+     break;
+   case 'i':
+     if( z[0]=='c' && m_gt_1(z+2) ){
+       z += 2;
+     }
+     break;
+   case 'l':
+     if( z[0]=='e' && z[2]=='b' && (z[3]=='a' || z[3]=='i') && m_gt_1(z+4) ){
+       z += 4;
+     }
+     break;
+   case 'n':
+     if( z[0]=='t' ){
+       if( z[2]=='a' ){
+         if( m_gt_1(z+3) ){
+           z += 3;
+         }
+       }else if( z[2]=='e' ){
+         stem(&z, "tneme", "", m_gt_1) ||
+         stem(&z, "tnem", "", m_gt_1) ||
+         stem(&z, "tne", "", m_gt_1);
+       }
+     }
+     break;
+   case 'o':
+     if( z[0]=='u' ){
+       if( m_gt_1(z+2) ){
+         z += 2;
+       }
+     }else if( z[3]=='s' || z[3]=='t' ){
+       stem(&z, "noi", "", m_gt_1);
+     }
+     break;
+   case 's':
+     if( z[0]=='m' && z[2]=='i' && m_gt_1(z+3) ){
+       z += 3;
+     }
+     break;
+   case 't':
+     stem(&z, "eta", "", m_gt_1) ||
+     stem(&z, "iti", "", m_gt_1);
+     break;
+   case 'u':
+     if( z[0]=='s' && z[2]=='o' && m_gt_1(z+3) ){
+       z += 3;
+     }
+     break;
+   case 'v':
+   case 'z':
+     if( z[0]=='e' && z[2]=='i' && m_gt_1(z+3) ){
+       z += 3;
+     }
+     break;
+  }
+
+  /* Step 5a */
+  if( z[0]=='e' ){
+    if( m_gt_1(z+1) ){
+      z++;
+    }else if( m_eq_1(z+1) && !star_oh(z+1) ){
+      z++;
+    }
+  }
+
+  /* Step 5b */
+  if( m_gt_1(z) && z[0]=='l' && z[1]=='l' ){
+    z++;
+  }
+
+  /* z[] is now the stemmed word in reverse order.  Flip it back
+  ** around into forward order and return.
+  */
+  *pnOut = i = (int)strlen(z);
+  zOut[i] = 0;
+  while( *z ){
+    zOut[--i] = *(z++);
+  }
+}
+
+/*
+** Characters that can be part of a token.  We assume any character
+** whose value is greater than 0x80 (any UTF character) can be
+** part of a token.  In other words, delimiters all must have
+** values of 0x7f or lower.
+*/
+static const char porterIdChar[] = {
+/* x0 x1 x2 x3 x4 x5 x6 x7 x8 x9 xA xB xC xD xE xF */
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,  /* 3x */
+    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 4x */
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,  /* 5x */
+    0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 6x */
+    1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,  /* 7x */
+};
+#define isDelim(C) (((ch=C)&0x80)==0 && (ch<0x30 || !porterIdChar[ch-0x30]))
+
+/*
+** Extract the next token from a tokenization cursor.  The cursor must
+** have been opened by a prior call to porterOpen().
+*/
+static int porterNext(
+  sqlite3_tokenizer_cursor *pCursor,  /* Cursor returned by porterOpen */
+  const char **pzToken,               /* OUT: *pzToken is the token text */
+  int *pnBytes,                       /* OUT: Number of bytes in token */
+  int *piStartOffset,                 /* OUT: Starting offset of token */
+  int *piEndOffset,                   /* OUT: Ending offset of token */
+  int *piPosition                     /* OUT: Position integer of token */
+){
+  porter_tokenizer_cursor *c = (porter_tokenizer_cursor *) pCursor;
+  const char *z = c->zInput;
+
+  while( c->iOffset<c->nInput ){
+    int iStartOffset, ch;
+
+    /* Scan past delimiter characters */
+    while( c->iOffset<c->nInput && isDelim(z[c->iOffset]) ){
+      c->iOffset++;
+    }
+
+    /* Count non-delimiter characters. */
+    iStartOffset = c->iOffset;
+    while( c->iOffset<c->nInput && !isDelim(z[c->iOffset]) ){
+      c->iOffset++;
+    }
+
+    if( c->iOffset>iStartOffset ){
+      int n = c->iOffset-iStartOffset;
+      if( n>c->nAllocated ){
+        char *pNew;
+        c->nAllocated = n+20;
+        pNew = sqlite3_realloc(c->zToken, c->nAllocated);
+        if( !pNew ) return SQLITE_NOMEM;
+        c->zToken = pNew;
+      }
+      porter_stemmer(&z[iStartOffset], n, c->zToken, pnBytes);
+      *pzToken = c->zToken;
+      *piStartOffset = iStartOffset;
+      *piEndOffset = c->iOffset;
+      *piPosition = c->iToken++;
+      return SQLITE_OK;
+    }
+  }
+  return SQLITE_DONE;
+}
+
+/*
+** The set of routines that implement the porter-stemmer tokenizer
+*/
+static const sqlite3_tokenizer_module porterTokenizerModule = {
+  0,
+  porterCreate,
+  porterDestroy,
+  porterOpen,
+  porterClose,
+  porterNext,
+};
+
+/*
+** Allocate a new porter tokenizer.  Return a pointer to the new
+** tokenizer in *ppModule
+*/
+SQLITE_PRIVATE void sqlite3Fts3PorterTokenizerModule(
+  sqlite3_tokenizer_module const**ppModule
+){
+  *ppModule = &porterTokenizerModule;
+}
+
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
+
+/************** End of fts3_porter.c *****************************************/
+/************** Begin file fts3_tokenizer.c **********************************/
+/*
+** 2007 June 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This is part of an SQLite module implementing full-text search.
+** This particular file implements the generic tokenizer interface.
+*/
+
+/*
+** The code in this file is only compiled if:
+**
+**     * The FTS3 module is being built as an extension
+**       (in which case SQLITE_CORE is not defined), or
+**
+**     * The FTS3 module is being built into the core of
+**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
+*/
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
+#ifndef SQLITE_CORE
+  SQLITE_EXTENSION_INIT1
+#endif
+
+
+/*
+** Implementation of the SQL scalar function for accessing the underlying 
+** hash table. This function may be called as follows:
+**
+**   SELECT <function-name>(<key-name>);
+**   SELECT <function-name>(<key-name>, <pointer>);
+**
+** where <function-name> is the name passed as the second argument
+** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer').
+**
+** If the <pointer> argument is specified, it must be a blob value
+** containing a pointer to be stored as the hash data corresponding
+** to the string <key-name>. If <pointer> is not specified, then
+** the string <key-name> must already exist in the has table. Otherwise,
+** an error is returned.
+**
+** Whether or not the <pointer> argument is specified, the value returned
+** is a blob containing the pointer stored as the hash data corresponding
+** to string <key-name> (after the hash-table is updated, if applicable).
+*/
+static void scalarFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  Fts3Hash *pHash;
+  void *pPtr = 0;
+  const unsigned char *zName;
+  int nName;
+
+  assert( argc==1 || argc==2 );
+
+  pHash = (Fts3Hash *)sqlite3_user_data(context);
+
+  zName = sqlite3_value_text(argv[0]);
+  nName = sqlite3_value_bytes(argv[0])+1;
+
+  if( argc==2 ){
+    void *pOld;
+    int n = sqlite3_value_bytes(argv[1]);
+    if( n!=sizeof(pPtr) ){
+      sqlite3_result_error(context, "argument type mismatch", -1);
+      return;
+    }
+    pPtr = *(void **)sqlite3_value_blob(argv[1]);
+    pOld = sqlite3Fts3HashInsert(pHash, (void *)zName, nName, pPtr);
+    if( pOld==pPtr ){
+      sqlite3_result_error(context, "out of memory", -1);
+      return;
+    }
+  }else{
+    pPtr = sqlite3Fts3HashFind(pHash, zName, nName);
+    if( !pPtr ){
+      char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
+      sqlite3_result_error(context, zErr, -1);
+      sqlite3_free(zErr);
+      return;
+    }
+  }
+
+  sqlite3_result_blob(context, (void *)&pPtr, sizeof(pPtr), SQLITE_TRANSIENT);
+}
+
+SQLITE_PRIVATE int sqlite3Fts3IsIdChar(char c){
+  static const char isFtsIdChar[] = {
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* 0x */
+      0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* 1x */
+      0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,  /* 2x */
+      1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0,  /* 3x */
+      0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 4x */
+      1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1,  /* 5x */
+      0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  /* 6x */
+      1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0,  /* 7x */
+  };
+  return (c&0x80 || isFtsIdChar[(int)(c)]);
+}
+
+SQLITE_PRIVATE const char *sqlite3Fts3NextToken(const char *zStr, int *pn){
+  const char *z1;
+  const char *z2 = 0;
+
+  /* Find the start of the next token. */
+  z1 = zStr;
+  while( z2==0 ){
+    char c = *z1;
+    switch( c ){
+      case '\0': return 0;        /* No more tokens here */
+      case '\'':
+      case '"':
+      case '`': {
+        z2 = z1;
+        while( *++z2 && (*z2!=c || *++z2==c) );
+        break;
+      }
+      case '[':
+        z2 = &z1[1];
+        while( *z2 && z2[0]!=']' ) z2++;
+        if( *z2 ) z2++;
+        break;
+
+      default:
+        if( sqlite3Fts3IsIdChar(*z1) ){
+          z2 = &z1[1];
+          while( sqlite3Fts3IsIdChar(*z2) ) z2++;
+        }else{
+          z1++;
+        }
+    }
+  }
+
+  *pn = (int)(z2-z1);
+  return z1;
+}
+
+SQLITE_PRIVATE int sqlite3Fts3InitTokenizer(
+  Fts3Hash *pHash,                /* Tokenizer hash table */
+  const char *zArg,               /* Tokenizer name */
+  sqlite3_tokenizer **ppTok,      /* OUT: Tokenizer (if applicable) */
+  char **pzErr                    /* OUT: Set to malloced error message */
+){
+  int rc;
+  char *z = (char *)zArg;
+  int n;
+  char *zCopy;
+  char *zEnd;                     /* Pointer to nul-term of zCopy */
+  sqlite3_tokenizer_module *m;
+
+  zCopy = sqlite3_mprintf("%s", zArg);
+  if( !zCopy ) return SQLITE_NOMEM;
+  zEnd = &zCopy[strlen(zCopy)];
+
+  z = (char *)sqlite3Fts3NextToken(zCopy, &n);
+  z[n] = '\0';
+  sqlite3Fts3Dequote(z);
+
+  m = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash,z,(int)strlen(z)+1);
+  if( !m ){
+    *pzErr = sqlite3_mprintf("unknown tokenizer: %s", z);
+    rc = SQLITE_ERROR;
+  }else{
+    char const **aArg = 0;
+    int iArg = 0;
+    z = &z[n+1];
+    while( z<zEnd && (NULL!=(z = (char *)sqlite3Fts3NextToken(z, &n))) ){
+      int nNew = sizeof(char *)*(iArg+1);
+      char const **aNew = (const char **)sqlite3_realloc((void *)aArg, nNew);
+      if( !aNew ){
+        sqlite3_free(zCopy);
+        sqlite3_free((void *)aArg);
+        return SQLITE_NOMEM;
+      }
+      aArg = aNew;
+      aArg[iArg++] = z;
+      z[n] = '\0';
+      sqlite3Fts3Dequote(z);
+      z = &z[n+1];
+    }
+    rc = m->xCreate(iArg, aArg, ppTok);
+    assert( rc!=SQLITE_OK || *ppTok );
+    if( rc!=SQLITE_OK ){
+      *pzErr = sqlite3_mprintf("unknown tokenizer");
+    }else{
+      (*ppTok)->pModule = m; 
+    }
+    sqlite3_free((void *)aArg);
+  }
+
+  sqlite3_free(zCopy);
+  return rc;
+}
+
+
+#ifdef SQLITE_TEST
+
+
+/*
+** Implementation of a special SQL scalar function for testing tokenizers 
+** designed to be used in concert with the Tcl testing framework. This
+** function must be called with two arguments:
+**
+**   SELECT <function-name>(<key-name>, <input-string>);
+**   SELECT <function-name>(<key-name>, <pointer>);
+**
+** where <function-name> is the name passed as the second argument
+** to the sqlite3Fts3InitHashTable() function (e.g. 'fts3_tokenizer')
+** concatenated with the string '_test' (e.g. 'fts3_tokenizer_test').
+**
+** The return value is a string that may be interpreted as a Tcl
+** list. For each token in the <input-string>, three elements are
+** added to the returned list. The first is the token position, the 
+** second is the token text (folded, stemmed, etc.) and the third is the
+** substring of <input-string> associated with the token. For example, 
+** using the built-in "simple" tokenizer:
+**
+**   SELECT fts_tokenizer_test('simple', 'I don't see how');
+**
+** will return the string:
+**
+**   "{0 i I 1 dont don't 2 see see 3 how how}"
+**   
+*/
+static void testFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  Fts3Hash *pHash;
+  sqlite3_tokenizer_module *p;
+  sqlite3_tokenizer *pTokenizer = 0;
+  sqlite3_tokenizer_cursor *pCsr = 0;
+
+  const char *zErr = 0;
+
+  const char *zName;
+  int nName;
+  const char *zInput;
+  int nInput;
+
+  const char *zArg = 0;
+
+  const char *zToken;
+  int nToken;
+  int iStart;
+  int iEnd;
+  int iPos;
+
+  Tcl_Obj *pRet;
+
+  assert( argc==2 || argc==3 );
+
+  nName = sqlite3_value_bytes(argv[0]);
+  zName = (const char *)sqlite3_value_text(argv[0]);
+  nInput = sqlite3_value_bytes(argv[argc-1]);
+  zInput = (const char *)sqlite3_value_text(argv[argc-1]);
+
+  if( argc==3 ){
+    zArg = (const char *)sqlite3_value_text(argv[1]);
+  }
+
+  pHash = (Fts3Hash *)sqlite3_user_data(context);
+  p = (sqlite3_tokenizer_module *)sqlite3Fts3HashFind(pHash, zName, nName+1);
+
+  if( !p ){
+    char *zErr = sqlite3_mprintf("unknown tokenizer: %s", zName);
+    sqlite3_result_error(context, zErr, -1);
+    sqlite3_free(zErr);
+    return;
+  }
+
+  pRet = Tcl_NewObj();
+  Tcl_IncrRefCount(pRet);
+
+  if( SQLITE_OK!=p->xCreate(zArg ? 1 : 0, &zArg, &pTokenizer) ){
+    zErr = "error in xCreate()";
+    goto finish;
+  }
+  pTokenizer->pModule = p;
+  if( SQLITE_OK!=p->xOpen(pTokenizer, zInput, nInput, &pCsr) ){
+    zErr = "error in xOpen()";
+    goto finish;
+  }
+  pCsr->pTokenizer = pTokenizer;
+
+  while( SQLITE_OK==p->xNext(pCsr, &zToken, &nToken, &iStart, &iEnd, &iPos) ){
+    Tcl_ListObjAppendElement(0, pRet, Tcl_NewIntObj(iPos));
+    Tcl_ListObjAppendElement(0, pRet, Tcl_NewStringObj(zToken, nToken));
+    zToken = &zInput[iStart];
+    nToken = iEnd-iStart;
+    Tcl_ListObjAppendElement(0, pRet, Tcl_NewStringObj(zToken, nToken));
+  }
+
+  if( SQLITE_OK!=p->xClose(pCsr) ){
+    zErr = "error in xClose()";
+    goto finish;
+  }
+  if( SQLITE_OK!=p->xDestroy(pTokenizer) ){
+    zErr = "error in xDestroy()";
+    goto finish;
+  }
+
+finish:
+  if( zErr ){
+    sqlite3_result_error(context, zErr, -1);
+  }else{
+    sqlite3_result_text(context, Tcl_GetString(pRet), -1, SQLITE_TRANSIENT);
+  }
+  Tcl_DecrRefCount(pRet);
+}
+
+static
+int registerTokenizer(
+  sqlite3 *db, 
+  char *zName, 
+  const sqlite3_tokenizer_module *p
+){
+  int rc;
+  sqlite3_stmt *pStmt;
+  const char zSql[] = "SELECT fts3_tokenizer(?, ?)";
+
+  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+
+  sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
+  sqlite3_bind_blob(pStmt, 2, &p, sizeof(p), SQLITE_STATIC);
+  sqlite3_step(pStmt);
+
+  return sqlite3_finalize(pStmt);
+}
+
+static
+int queryTokenizer(
+  sqlite3 *db, 
+  char *zName,  
+  const sqlite3_tokenizer_module **pp
+){
+  int rc;
+  sqlite3_stmt *pStmt;
+  const char zSql[] = "SELECT fts3_tokenizer(?)";
+
+  *pp = 0;
+  rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+
+  sqlite3_bind_text(pStmt, 1, zName, -1, SQLITE_STATIC);
+  if( SQLITE_ROW==sqlite3_step(pStmt) ){
+    if( sqlite3_column_type(pStmt, 0)==SQLITE_BLOB ){
+      memcpy((void *)pp, sqlite3_column_blob(pStmt, 0), sizeof(*pp));
+    }
+  }
+
+  return sqlite3_finalize(pStmt);
+}
+
+SQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(sqlite3_tokenizer_module const**ppModule);
+
+/*
+** Implementation of the scalar function fts3_tokenizer_internal_test().
+** This function is used for testing only, it is not included in the
+** build unless SQLITE_TEST is defined.
+**
+** The purpose of this is to test that the fts3_tokenizer() function
+** can be used as designed by the C-code in the queryTokenizer and
+** registerTokenizer() functions above. These two functions are repeated
+** in the README.tokenizer file as an example, so it is important to
+** test them.
+**
+** To run the tests, evaluate the fts3_tokenizer_internal_test() scalar
+** function with no arguments. An assert() will fail if a problem is
+** detected. i.e.:
+**
+**     SELECT fts3_tokenizer_internal_test();
+**
+*/
+static void intTestFunc(
+  sqlite3_context *context,
+  int argc,
+  sqlite3_value **argv
+){
+  int rc;
+  const sqlite3_tokenizer_module *p1;
+  const sqlite3_tokenizer_module *p2;
+  sqlite3 *db = (sqlite3 *)sqlite3_user_data(context);
+
+  UNUSED_PARAMETER(argc);
+  UNUSED_PARAMETER(argv);
+
+  /* Test the query function */
+  sqlite3Fts3SimpleTokenizerModule(&p1);
+  rc = queryTokenizer(db, "simple", &p2);
+  assert( rc==SQLITE_OK );
+  assert( p1==p2 );
+  rc = queryTokenizer(db, "nosuchtokenizer", &p2);
+  assert( rc==SQLITE_ERROR );
+  assert( p2==0 );
+  assert( 0==strcmp(sqlite3_errmsg(db), "unknown tokenizer: nosuchtokenizer") );
+
+  /* Test the storage function */
+  rc = registerTokenizer(db, "nosuchtokenizer", p1);
+  assert( rc==SQLITE_OK );
+  rc = queryTokenizer(db, "nosuchtokenizer", &p2);
+  assert( rc==SQLITE_OK );
+  assert( p2==p1 );
+
+  sqlite3_result_text(context, "ok", -1, SQLITE_STATIC);
+}
+
+#endif
+
+/*
+** Set up SQL objects in database db used to access the contents of
+** the hash table pointed to by argument pHash. The hash table must
+** been initialised to use string keys, and to take a private copy 
+** of the key when a value is inserted. i.e. by a call similar to:
+**
+**    sqlite3Fts3HashInit(pHash, FTS3_HASH_STRING, 1);
+**
+** This function adds a scalar function (see header comment above
+** scalarFunc() in this file for details) and, if ENABLE_TABLE is
+** defined at compilation time, a temporary virtual table (see header 
+** comment above struct HashTableVtab) to the database schema. Both 
+** provide read/write access to the contents of *pHash.
+**
+** The third argument to this function, zName, is used as the name
+** of both the scalar and, if created, the virtual table.
+*/
+SQLITE_PRIVATE int sqlite3Fts3InitHashTable(
+  sqlite3 *db, 
+  Fts3Hash *pHash, 
+  const char *zName
+){
+  int rc = SQLITE_OK;
+  void *p = (void *)pHash;
+  const int any = SQLITE_ANY;
+
+#ifdef SQLITE_TEST
+  char *zTest = 0;
+  char *zTest2 = 0;
+  void *pdb = (void *)db;
+  zTest = sqlite3_mprintf("%s_test", zName);
+  zTest2 = sqlite3_mprintf("%s_internal_test", zName);
+  if( !zTest || !zTest2 ){
+    rc = SQLITE_NOMEM;
+  }
+#endif
+
+  if( SQLITE_OK==rc ){
+    rc = sqlite3_create_function(db, zName, 1, any, p, scalarFunc, 0, 0);
+  }
+  if( SQLITE_OK==rc ){
+    rc = sqlite3_create_function(db, zName, 2, any, p, scalarFunc, 0, 0);
+  }
+#ifdef SQLITE_TEST
+  if( SQLITE_OK==rc ){
+    rc = sqlite3_create_function(db, zTest, 2, any, p, testFunc, 0, 0);
+  }
+  if( SQLITE_OK==rc ){
+    rc = sqlite3_create_function(db, zTest, 3, any, p, testFunc, 0, 0);
+  }
+  if( SQLITE_OK==rc ){
+    rc = sqlite3_create_function(db, zTest2, 0, any, pdb, intTestFunc, 0, 0);
+  }
+#endif
+
+#ifdef SQLITE_TEST
+  sqlite3_free(zTest);
+  sqlite3_free(zTest2);
+#endif
+
+  return rc;
+}
+
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
+
+/************** End of fts3_tokenizer.c **************************************/
+/************** Begin file fts3_tokenizer1.c *********************************/
+/*
+** 2006 Oct 10
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** Implementation of the "simple" full-text-search tokenizer.
+*/
+
+/*
+** The code in this file is only compiled if:
+**
+**     * The FTS3 module is being built as an extension
+**       (in which case SQLITE_CORE is not defined), or
+**
+**     * The FTS3 module is being built into the core of
+**       SQLite (in which case SQLITE_ENABLE_FTS3 is defined).
+*/
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
+
+
+
+typedef struct simple_tokenizer {
+  sqlite3_tokenizer base;
+  char delim[128];             /* flag ASCII delimiters */
+} simple_tokenizer;
+
+typedef struct simple_tokenizer_cursor {
+  sqlite3_tokenizer_cursor base;
+  const char *pInput;          /* input we are tokenizing */
+  int nBytes;                  /* size of the input */
+  int iOffset;                 /* current position in pInput */
+  int iToken;                  /* index of next token to be returned */
+  char *pToken;                /* storage for current token */
+  int nTokenAllocated;         /* space allocated to zToken buffer */
+} simple_tokenizer_cursor;
+
+
+static int simpleDelim(simple_tokenizer *t, unsigned char c){
+  return c<0x80 && t->delim[c];
+}
+static int fts3_isalnum(int x){
+  return (x>='0' && x<='9') || (x>='A' && x<='Z') || (x>='a' && x<='z');
+}
+
+/*
+** Create a new tokenizer instance.
+*/
+static int simpleCreate(
+  int argc, const char * const *argv,
+  sqlite3_tokenizer **ppTokenizer
+){
+  simple_tokenizer *t;
+
+  t = (simple_tokenizer *) sqlite3_malloc(sizeof(*t));
+  if( t==NULL ) return SQLITE_NOMEM;
+  memset(t, 0, sizeof(*t));
+
+  /* TODO(shess) Delimiters need to remain the same from run to run,
+  ** else we need to reindex.  One solution would be a meta-table to
+  ** track such information in the database, then we'd only want this
+  ** information on the initial create.
+  */
+  if( argc>1 ){
+    int i, n = (int)strlen(argv[1]);
+    for(i=0; i<n; i++){
+      unsigned char ch = argv[1][i];
+      /* We explicitly don't support UTF-8 delimiters for now. */
+      if( ch>=0x80 ){
+        sqlite3_free(t);
+        return SQLITE_ERROR;
+      }
+      t->delim[ch] = 1;
+    }
+  } else {
+    /* Mark non-alphanumeric ASCII characters as delimiters */
+    int i;
+    for(i=1; i<0x80; i++){
+      t->delim[i] = !fts3_isalnum(i) ? -1 : 0;
+    }
+  }
+
+  *ppTokenizer = &t->base;
+  return SQLITE_OK;
+}
+
+/*
+** Destroy a tokenizer
+*/
+static int simpleDestroy(sqlite3_tokenizer *pTokenizer){
+  sqlite3_free(pTokenizer);
+  return SQLITE_OK;
+}
+
+/*
+** Prepare to begin tokenizing a particular string.  The input
+** string to be tokenized is pInput[0..nBytes-1].  A cursor
+** used to incrementally tokenize this string is returned in 
+** *ppCursor.
+*/
+static int simpleOpen(
+  sqlite3_tokenizer *pTokenizer,         /* The tokenizer */
+  const char *pInput, int nBytes,        /* String to be tokenized */
+  sqlite3_tokenizer_cursor **ppCursor    /* OUT: Tokenization cursor */
+){
+  simple_tokenizer_cursor *c;
+
+  UNUSED_PARAMETER(pTokenizer);
+
+  c = (simple_tokenizer_cursor *) sqlite3_malloc(sizeof(*c));
+  if( c==NULL ) return SQLITE_NOMEM;
+
+  c->pInput = pInput;
+  if( pInput==0 ){
+    c->nBytes = 0;
+  }else if( nBytes<0 ){
+    c->nBytes = (int)strlen(pInput);
+  }else{
+    c->nBytes = nBytes;
+  }
+  c->iOffset = 0;                 /* start tokenizing at the beginning */
+  c->iToken = 0;
+  c->pToken = NULL;               /* no space allocated, yet. */
+  c->nTokenAllocated = 0;
+
+  *ppCursor = &c->base;
+  return SQLITE_OK;
+}
+
+/*
+** Close a tokenization cursor previously opened by a call to
+** simpleOpen() above.
+*/
+static int simpleClose(sqlite3_tokenizer_cursor *pCursor){
+  simple_tokenizer_cursor *c = (simple_tokenizer_cursor *) pCursor;
+  sqlite3_free(c->pToken);
+  sqlite3_free(c);
+  return SQLITE_OK;
+}
+
+/*
+** Extract the next token from a tokenization cursor.  The cursor must
+** have been opened by a prior call to simpleOpen().
+*/
+static int simpleNext(
+  sqlite3_tokenizer_cursor *pCursor,  /* Cursor returned by simpleOpen */
+  const char **ppToken,               /* OUT: *ppToken is the token text */
+  int *pnBytes,                       /* OUT: Number of bytes in token */
+  int *piStartOffset,                 /* OUT: Starting offset of token */
+  int *piEndOffset,                   /* OUT: Ending offset of token */
+  int *piPosition                     /* OUT: Position integer of token */
+){
+  simple_tokenizer_cursor *c = (simple_tokenizer_cursor *) pCursor;
+  simple_tokenizer *t = (simple_tokenizer *) pCursor->pTokenizer;
+  unsigned char *p = (unsigned char *)c->pInput;
+
+  while( c->iOffset<c->nBytes ){
+    int iStartOffset;
+
+    /* Scan past delimiter characters */
+    while( c->iOffset<c->nBytes && simpleDelim(t, p[c->iOffset]) ){
+      c->iOffset++;
+    }
+
+    /* Count non-delimiter characters. */
+    iStartOffset = c->iOffset;
+    while( c->iOffset<c->nBytes && !simpleDelim(t, p[c->iOffset]) ){
+      c->iOffset++;
+    }
+
+    if( c->iOffset>iStartOffset ){
+      int i, n = c->iOffset-iStartOffset;
+      if( n>c->nTokenAllocated ){
+        char *pNew;
+        c->nTokenAllocated = n+20;
+        pNew = sqlite3_realloc(c->pToken, c->nTokenAllocated);
+        if( !pNew ) return SQLITE_NOMEM;
+        c->pToken = pNew;
+      }
+      for(i=0; i<n; i++){
+        /* TODO(shess) This needs expansion to handle UTF-8
+        ** case-insensitivity.
+        */
+        unsigned char ch = p[iStartOffset+i];
+        c->pToken[i] = (char)((ch>='A' && ch<='Z') ? ch-'A'+'a' : ch);
+      }
+      *ppToken = c->pToken;
+      *pnBytes = n;
+      *piStartOffset = iStartOffset;
+      *piEndOffset = c->iOffset;
+      *piPosition = c->iToken++;
+
+      return SQLITE_OK;
+    }
+  }
+  return SQLITE_DONE;
+}
+
+/*
+** The set of routines that implement the simple tokenizer
+*/
+static const sqlite3_tokenizer_module simpleTokenizerModule = {
+  0,
+  simpleCreate,
+  simpleDestroy,
+  simpleOpen,
+  simpleClose,
+  simpleNext,
+};
+
+/*
+** Allocate a new simple tokenizer.  Return a pointer to the new
+** tokenizer in *ppModule
+*/
+SQLITE_PRIVATE void sqlite3Fts3SimpleTokenizerModule(
+  sqlite3_tokenizer_module const**ppModule
+){
+  *ppModule = &simpleTokenizerModule;
+}
+
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
+
+/************** End of fts3_tokenizer1.c *************************************/
+/************** Begin file fts3_write.c **************************************/
+/*
+** 2009 Oct 23
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+**
+** This file is part of the SQLite FTS3 extension module. Specifically,
+** this file contains code to insert, update and delete rows from FTS3
+** tables. It also contains code to merge FTS3 b-tree segments. Some
+** of the sub-routines used to merge segments are also used by the query 
+** code in fts3.c.
+*/
+
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
+
+/*
+** When full-text index nodes are loaded from disk, the buffer that they
+** are loaded into has the following number of bytes of padding at the end 
+** of it. i.e. if a full-text index node is 900 bytes in size, then a buffer
+** of 920 bytes is allocated for it.
+**
+** This means that if we have a pointer into a buffer containing node data,
+** it is always safe to read up to two varints from it without risking an
+** overread, even if the node data is corrupted.
+*/
+#define FTS3_NODE_PADDING (FTS3_VARINT_MAX*2)
+
+typedef struct PendingList PendingList;
+typedef struct SegmentNode SegmentNode;
+typedef struct SegmentWriter SegmentWriter;
+
+/*
+** Data structure used while accumulating terms in the pending-terms hash
+** table. The hash table entry maps from term (a string) to a malloc'd
+** instance of this structure.
+*/
+struct PendingList {
+  int nData;
+  char *aData;
+  int nSpace;
+  sqlite3_int64 iLastDocid;
+  sqlite3_int64 iLastCol;
+  sqlite3_int64 iLastPos;
+};
+
+
+/*
+** Each cursor has a (possibly empty) linked list of the following objects.
+*/
+struct Fts3DeferredToken {
+  Fts3PhraseToken *pToken;        /* Pointer to corresponding expr token */
+  int iCol;                       /* Column token must occur in */
+  Fts3DeferredToken *pNext;       /* Next in list of deferred tokens */
+  PendingList *pList;             /* Doclist is assembled here */
+};
+
+/*
+** An instance of this structure is used to iterate through the terms on
+** a contiguous set of segment b-tree leaf nodes. Although the details of
+** this structure are only manipulated by code in this file, opaque handles
+** of type Fts3SegReader* are also used by code in fts3.c to iterate through
+** terms when querying the full-text index. See functions:
+**
+**   sqlite3Fts3SegReaderNew()
+**   sqlite3Fts3SegReaderFree()
+**   sqlite3Fts3SegReaderCost()
+**   sqlite3Fts3SegReaderIterate()
+**
+** Methods used to manipulate Fts3SegReader structures:
+**
+**   fts3SegReaderNext()
+**   fts3SegReaderFirstDocid()
+**   fts3SegReaderNextDocid()
+*/
+struct Fts3SegReader {
+  int iIdx;                       /* Index within level, or 0x7FFFFFFF for PT */
+
+  sqlite3_int64 iStartBlock;      /* Rowid of first leaf block to traverse */
+  sqlite3_int64 iLeafEndBlock;    /* Rowid of final leaf block to traverse */
+  sqlite3_int64 iEndBlock;        /* Rowid of final block in segment (or 0) */
+  sqlite3_int64 iCurrentBlock;    /* Current leaf block (or 0) */
+
+  char *aNode;                    /* Pointer to node data (or NULL) */
+  int nNode;                      /* Size of buffer at aNode (or 0) */
+  Fts3HashElem **ppNextElem;
+
+  /* Variables set by fts3SegReaderNext(). These may be read directly
+  ** by the caller. They are valid from the time SegmentReaderNew() returns
+  ** until SegmentReaderNext() returns something other than SQLITE_OK
+  ** (i.e. SQLITE_DONE).
+  */
+  int nTerm;                      /* Number of bytes in current term */
+  char *zTerm;                    /* Pointer to current term */
+  int nTermAlloc;                 /* Allocated size of zTerm buffer */
+  char *aDoclist;                 /* Pointer to doclist of current entry */
+  int nDoclist;                   /* Size of doclist in current entry */
+
+  /* The following variables are used to iterate through the current doclist */
+  char *pOffsetList;
+  sqlite3_int64 iDocid;
+};
+
+#define fts3SegReaderIsPending(p) ((p)->ppNextElem!=0)
+#define fts3SegReaderIsRootOnly(p) ((p)->aNode==(char *)&(p)[1])
+
+/*
+** An instance of this structure is used to create a segment b-tree in the
+** database. The internal details of this type are only accessed by the
+** following functions:
+**
+**   fts3SegWriterAdd()
+**   fts3SegWriterFlush()
+**   fts3SegWriterFree()
+*/
+struct SegmentWriter {
+  SegmentNode *pTree;             /* Pointer to interior tree structure */
+  sqlite3_int64 iFirst;           /* First slot in %_segments written */
+  sqlite3_int64 iFree;            /* Next free slot in %_segments */
+  char *zTerm;                    /* Pointer to previous term buffer */
+  int nTerm;                      /* Number of bytes in zTerm */
+  int nMalloc;                    /* Size of malloc'd buffer at zMalloc */
+  char *zMalloc;                  /* Malloc'd space (possibly) used for zTerm */
+  int nSize;                      /* Size of allocation at aData */
+  int nData;                      /* Bytes of data in aData */
+  char *aData;                    /* Pointer to block from malloc() */
+};
+
+/*
+** Type SegmentNode is used by the following three functions to create
+** the interior part of the segment b+-tree structures (everything except
+** the leaf nodes). These functions and type are only ever used by code
+** within the fts3SegWriterXXX() family of functions described above.
+**
+**   fts3NodeAddTerm()
+**   fts3NodeWrite()
+**   fts3NodeFree()
+*/
+struct SegmentNode {
+  SegmentNode *pParent;           /* Parent node (or NULL for root node) */
+  SegmentNode *pRight;            /* Pointer to right-sibling */
+  SegmentNode *pLeftmost;         /* Pointer to left-most node of this depth */
+  int nEntry;                     /* Number of terms written to node so far */
+  char *zTerm;                    /* Pointer to previous term buffer */
+  int nTerm;                      /* Number of bytes in zTerm */
+  int nMalloc;                    /* Size of malloc'd buffer at zMalloc */
+  char *zMalloc;                  /* Malloc'd space (possibly) used for zTerm */
+  int nData;                      /* Bytes of valid data so far */
+  char *aData;                    /* Node data */
+};
+
+/*
+** Valid values for the second argument to fts3SqlStmt().
+*/
+#define SQL_DELETE_CONTENT             0
+#define SQL_IS_EMPTY                   1
+#define SQL_DELETE_ALL_CONTENT         2 
+#define SQL_DELETE_ALL_SEGMENTS        3
+#define SQL_DELETE_ALL_SEGDIR          4
+#define SQL_DELETE_ALL_DOCSIZE         5
+#define SQL_DELETE_ALL_STAT            6
+#define SQL_SELECT_CONTENT_BY_ROWID    7
+#define SQL_NEXT_SEGMENT_INDEX         8
+#define SQL_INSERT_SEGMENTS            9
+#define SQL_NEXT_SEGMENTS_ID          10
+#define SQL_INSERT_SEGDIR             11
+#define SQL_SELECT_LEVEL              12
+#define SQL_SELECT_ALL_LEVEL          13
+#define SQL_SELECT_LEVEL_COUNT        14
+#define SQL_SELECT_SEGDIR_COUNT_MAX   15
+#define SQL_DELETE_SEGDIR_BY_LEVEL    16
+#define SQL_DELETE_SEGMENTS_RANGE     17
+#define SQL_CONTENT_INSERT            18
+#define SQL_DELETE_DOCSIZE            19
+#define SQL_REPLACE_DOCSIZE           20
+#define SQL_SELECT_DOCSIZE            21
+#define SQL_SELECT_DOCTOTAL           22
+#define SQL_REPLACE_DOCTOTAL          23
+
+/*
+** This function is used to obtain an SQLite prepared statement handle
+** for the statement identified by the second argument. If successful,
+** *pp is set to the requested statement handle and SQLITE_OK returned.
+** Otherwise, an SQLite error code is returned and *pp is set to 0.
+**
+** If argument apVal is not NULL, then it must point to an array with
+** at least as many entries as the requested statement has bound 
+** parameters. The values are bound to the statements parameters before
+** returning.
+*/
+static int fts3SqlStmt(
+  Fts3Table *p,                   /* Virtual table handle */
+  int eStmt,                      /* One of the SQL_XXX constants above */
+  sqlite3_stmt **pp,              /* OUT: Statement handle */
+  sqlite3_value **apVal           /* Values to bind to statement */
+){
+  const char *azSql[] = {
+/* 0  */  "DELETE FROM %Q.'%q_content' WHERE rowid = ?",
+/* 1  */  "SELECT NOT EXISTS(SELECT docid FROM %Q.'%q_content' WHERE rowid!=?)",
+/* 2  */  "DELETE FROM %Q.'%q_content'",
+/* 3  */  "DELETE FROM %Q.'%q_segments'",
+/* 4  */  "DELETE FROM %Q.'%q_segdir'",
+/* 5  */  "DELETE FROM %Q.'%q_docsize'",
+/* 6  */  "DELETE FROM %Q.'%q_stat'",
+/* 7  */  "SELECT %s FROM %Q.'%q_content' AS x WHERE rowid=?",
+/* 8  */  "SELECT (SELECT max(idx) FROM %Q.'%q_segdir' WHERE level = ?) + 1",
+/* 9  */  "INSERT INTO %Q.'%q_segments'(blockid, block) VALUES(?, ?)",
+/* 10 */  "SELECT coalesce((SELECT max(blockid) FROM %Q.'%q_segments') + 1, 1)",
+/* 11 */  "INSERT INTO %Q.'%q_segdir' VALUES(?,?,?,?,?,?)",
+
+          /* Return segments in order from oldest to newest.*/ 
+/* 12 */  "SELECT idx, start_block, leaves_end_block, end_block, root "
+            "FROM %Q.'%q_segdir' WHERE level = ? ORDER BY idx ASC",
+/* 13 */  "SELECT idx, start_block, leaves_end_block, end_block, root "
+            "FROM %Q.'%q_segdir' ORDER BY level DESC, idx ASC",
+
+/* 14 */  "SELECT count(*) FROM %Q.'%q_segdir' WHERE level = ?",
+/* 15 */  "SELECT count(*), max(level) FROM %Q.'%q_segdir'",
+
+/* 16 */  "DELETE FROM %Q.'%q_segdir' WHERE level = ?",
+/* 17 */  "DELETE FROM %Q.'%q_segments' WHERE blockid BETWEEN ? AND ?",
+/* 18 */  "INSERT INTO %Q.'%q_content' VALUES(%s)",
+/* 19 */  "DELETE FROM %Q.'%q_docsize' WHERE docid = ?",
+/* 20 */  "REPLACE INTO %Q.'%q_docsize' VALUES(?,?)",
+/* 21 */  "SELECT size FROM %Q.'%q_docsize' WHERE docid=?",
+/* 22 */  "SELECT value FROM %Q.'%q_stat' WHERE id=0",
+/* 23 */  "REPLACE INTO %Q.'%q_stat' VALUES(0,?)",
+  };
+  int rc = SQLITE_OK;
+  sqlite3_stmt *pStmt;
+
+  assert( SizeofArray(azSql)==SizeofArray(p->aStmt) );
+  assert( eStmt<SizeofArray(azSql) && eStmt>=0 );
+  
+  pStmt = p->aStmt[eStmt];
+  if( !pStmt ){
+    char *zSql;
+    if( eStmt==SQL_CONTENT_INSERT ){
+      zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName, p->zWriteExprlist);
+    }else if( eStmt==SQL_SELECT_CONTENT_BY_ROWID ){
+      zSql = sqlite3_mprintf(azSql[eStmt], p->zReadExprlist, p->zDb, p->zName);
+    }else{
+      zSql = sqlite3_mprintf(azSql[eStmt], p->zDb, p->zName);
+    }
+    if( !zSql ){
+      rc = SQLITE_NOMEM;
+    }else{
+      rc = sqlite3_prepare_v2(p->db, zSql, -1, &pStmt, NULL);
+      sqlite3_free(zSql);
+      assert( rc==SQLITE_OK || pStmt==0 );
+      p->aStmt[eStmt] = pStmt;
+    }
+  }
+  if( apVal ){
+    int i;
+    int nParam = sqlite3_bind_parameter_count(pStmt);
+    for(i=0; rc==SQLITE_OK && i<nParam; i++){
+      rc = sqlite3_bind_value(pStmt, i+1, apVal[i]);
+    }
+  }
+  *pp = pStmt;
+  return rc;
+}
+
+static int fts3SelectDocsize(
+  Fts3Table *pTab,                /* FTS3 table handle */
+  int eStmt,                      /* Either SQL_SELECT_DOCSIZE or DOCTOTAL */
+  sqlite3_int64 iDocid,           /* Docid to bind for SQL_SELECT_DOCSIZE */
+  sqlite3_stmt **ppStmt           /* OUT: Statement handle */
+){
+  sqlite3_stmt *pStmt = 0;        /* Statement requested from fts3SqlStmt() */
+  int rc;                         /* Return code */
+
+  assert( eStmt==SQL_SELECT_DOCSIZE || eStmt==SQL_SELECT_DOCTOTAL );
+
+  rc = fts3SqlStmt(pTab, eStmt, &pStmt, 0);
+  if( rc==SQLITE_OK ){
+    if( eStmt==SQL_SELECT_DOCSIZE ){
+      sqlite3_bind_int64(pStmt, 1, iDocid);
+    }
+    rc = sqlite3_step(pStmt);
+    if( rc!=SQLITE_ROW || sqlite3_column_type(pStmt, 0)!=SQLITE_BLOB ){
+      rc = sqlite3_reset(pStmt);
+      if( rc==SQLITE_OK ) rc = SQLITE_CORRUPT;
+      pStmt = 0;
+    }else{
+      rc = SQLITE_OK;
+    }
+  }
+
+  *ppStmt = pStmt;
+  return rc;
+}
+
+SQLITE_PRIVATE int sqlite3Fts3SelectDoctotal(
+  Fts3Table *pTab,                /* Fts3 table handle */
+  sqlite3_stmt **ppStmt           /* OUT: Statement handle */
+){
+  return fts3SelectDocsize(pTab, SQL_SELECT_DOCTOTAL, 0, ppStmt);
+}
+
+SQLITE_PRIVATE int sqlite3Fts3SelectDocsize(
+  Fts3Table *pTab,                /* Fts3 table handle */
+  sqlite3_int64 iDocid,           /* Docid to read size data for */
+  sqlite3_stmt **ppStmt           /* OUT: Statement handle */
+){
+  return fts3SelectDocsize(pTab, SQL_SELECT_DOCSIZE, iDocid, ppStmt);
+}
+
+/*
+** Similar to fts3SqlStmt(). Except, after binding the parameters in
+** array apVal[] to the SQL statement identified by eStmt, the statement
+** is executed.
+**
+** Returns SQLITE_OK if the statement is successfully executed, or an
+** SQLite error code otherwise.
+*/
+static void fts3SqlExec(
+  int *pRC,                /* Result code */
+  Fts3Table *p,            /* The FTS3 table */
+  int eStmt,               /* Index of statement to evaluate */
+  sqlite3_value **apVal    /* Parameters to bind */
+){
+  sqlite3_stmt *pStmt;
+  int rc;
+  if( *pRC ) return;
+  rc = fts3SqlStmt(p, eStmt, &pStmt, apVal); 
+  if( rc==SQLITE_OK ){
+    sqlite3_step(pStmt);
+    rc = sqlite3_reset(pStmt);
+  }
+  *pRC = rc;
+}
+
+
+/*
+** This function ensures that the caller has obtained a shared-cache
+** table-lock on the %_content table. This is required before reading
+** data from the fts3 table. If this lock is not acquired first, then
+** the caller may end up holding read-locks on the %_segments and %_segdir
+** tables, but no read-lock on the %_content table. If this happens 
+** a second connection will be able to write to the fts3 table, but
+** attempting to commit those writes might return SQLITE_LOCKED or
+** SQLITE_LOCKED_SHAREDCACHE (because the commit attempts to obtain 
+** write-locks on the %_segments and %_segdir ** tables). 
+**
+** We try to avoid this because if FTS3 returns any error when committing
+** a transaction, the whole transaction will be rolled back. And this is
+** not what users expect when they get SQLITE_LOCKED_SHAREDCACHE. It can
+** still happen if the user reads data directly from the %_segments or
+** %_segdir tables instead of going through FTS3 though.
+*/
+SQLITE_PRIVATE int sqlite3Fts3ReadLock(Fts3Table *p){
+  int rc;                         /* Return code */
+  sqlite3_stmt *pStmt;            /* Statement used to obtain lock */
+
+  rc = fts3SqlStmt(p, SQL_SELECT_CONTENT_BY_ROWID, &pStmt, 0);
+  if( rc==SQLITE_OK ){
+    sqlite3_bind_null(pStmt, 1);
+    sqlite3_step(pStmt);
+    rc = sqlite3_reset(pStmt);
+  }
+  return rc;
+}
+
+/*
+** Set *ppStmt to a statement handle that may be used to iterate through
+** all rows in the %_segdir table, from oldest to newest. If successful,
+** return SQLITE_OK. If an error occurs while preparing the statement, 
+** return an SQLite error code.
+**
+** There is only ever one instance of this SQL statement compiled for
+** each FTS3 table.
+**
+** The statement returns the following columns from the %_segdir table:
+**
+**   0: idx
+**   1: start_block
+**   2: leaves_end_block
+**   3: end_block
+**   4: root
+*/
+SQLITE_PRIVATE int sqlite3Fts3AllSegdirs(Fts3Table *p, int iLevel, sqlite3_stmt **ppStmt){
+  int rc;
+  sqlite3_stmt *pStmt = 0;
+  if( iLevel<0 ){
+    rc = fts3SqlStmt(p, SQL_SELECT_ALL_LEVEL, &pStmt, 0);
+  }else{
+    rc = fts3SqlStmt(p, SQL_SELECT_LEVEL, &pStmt, 0);
+    if( rc==SQLITE_OK ) sqlite3_bind_int(pStmt, 1, iLevel);
+  }
+  *ppStmt = pStmt;
+  return rc;
+}
+
+
+/*
+** Append a single varint to a PendingList buffer. SQLITE_OK is returned
+** if successful, or an SQLite error code otherwise.
+**
+** This function also serves to allocate the PendingList structure itself.
+** For example, to create a new PendingList structure containing two
+** varints:
+**
+**   PendingList *p = 0;
+**   fts3PendingListAppendVarint(&p, 1);
+**   fts3PendingListAppendVarint(&p, 2);
+*/
+static int fts3PendingListAppendVarint(
+  PendingList **pp,               /* IN/OUT: Pointer to PendingList struct */
+  sqlite3_int64 i                 /* Value to append to data */
+){
+  PendingList *p = *pp;
+
+  /* Allocate or grow the PendingList as required. */
+  if( !p ){
+    p = sqlite3_malloc(sizeof(*p) + 100);
+    if( !p ){
+      return SQLITE_NOMEM;
+    }
+    p->nSpace = 100;
+    p->aData = (char *)&p[1];
+    p->nData = 0;
+  }
+  else if( p->nData+FTS3_VARINT_MAX+1>p->nSpace ){
+    int nNew = p->nSpace * 2;
+    p = sqlite3_realloc(p, sizeof(*p) + nNew);
+    if( !p ){
+      sqlite3_free(*pp);
+      *pp = 0;
+      return SQLITE_NOMEM;
+    }
+    p->nSpace = nNew;
+    p->aData = (char *)&p[1];
+  }
+
+  /* Append the new serialized varint to the end of the list. */
+  p->nData += sqlite3Fts3PutVarint(&p->aData[p->nData], i);
+  p->aData[p->nData] = '\0';
+  *pp = p;
+  return SQLITE_OK;
+}
+
+/*
+** Add a docid/column/position entry to a PendingList structure. Non-zero
+** is returned if the structure is sqlite3_realloced as part of adding
+** the entry. Otherwise, zero.
+**
+** If an OOM error occurs, *pRc is set to SQLITE_NOMEM before returning.
+** Zero is always returned in this case. Otherwise, if no OOM error occurs,
+** it is set to SQLITE_OK.
+*/
+static int fts3PendingListAppend(
+  PendingList **pp,               /* IN/OUT: PendingList structure */
+  sqlite3_int64 iDocid,           /* Docid for entry to add */
+  sqlite3_int64 iCol,             /* Column for entry to add */
+  sqlite3_int64 iPos,             /* Position of term for entry to add */
+  int *pRc                        /* OUT: Return code */
+){
+  PendingList *p = *pp;
+  int rc = SQLITE_OK;
+
+  assert( !p || p->iLastDocid<=iDocid );
+
+  if( !p || p->iLastDocid!=iDocid ){
+    sqlite3_int64 iDelta = iDocid - (p ? p->iLastDocid : 0);
+    if( p ){
+      assert( p->nData<p->nSpace );
+      assert( p->aData[p->nData]==0 );
+      p->nData++;
+    }
+    if( SQLITE_OK!=(rc = fts3PendingListAppendVarint(&p, iDelta)) ){
+      goto pendinglistappend_out;
+    }
+    p->iLastCol = -1;
+    p->iLastPos = 0;
+    p->iLastDocid = iDocid;
+  }
+  if( iCol>0 && p->iLastCol!=iCol ){
+    if( SQLITE_OK!=(rc = fts3PendingListAppendVarint(&p, 1))
+     || SQLITE_OK!=(rc = fts3PendingListAppendVarint(&p, iCol))
+    ){
+      goto pendinglistappend_out;
+    }
+    p->iLastCol = iCol;
+    p->iLastPos = 0;
+  }
+  if( iCol>=0 ){
+    assert( iPos>p->iLastPos || (iPos==0 && p->iLastPos==0) );
+    rc = fts3PendingListAppendVarint(&p, 2+iPos-p->iLastPos);
+    if( rc==SQLITE_OK ){
+      p->iLastPos = iPos;
+    }
+  }
+
+ pendinglistappend_out:
+  *pRc = rc;
+  if( p!=*pp ){
+    *pp = p;
+    return 1;
+  }
+  return 0;
+}
+
+/*
+** Tokenize the nul-terminated string zText and add all tokens to the
+** pending-terms hash-table. The docid used is that currently stored in
+** p->iPrevDocid, and the column is specified by argument iCol.
+**
+** If successful, SQLITE_OK is returned. Otherwise, an SQLite error code.
+*/
+static int fts3PendingTermsAdd(
+  Fts3Table *p,                   /* Table into which text will be inserted */
+  const char *zText,              /* Text of document to be inserted */
+  int iCol,                       /* Column into which text is being inserted */
+  u32 *pnWord                     /* OUT: Number of tokens inserted */
+){
+  int rc;
+  int iStart;
+  int iEnd;
+  int iPos;
+  int nWord = 0;
+
+  char const *zToken;
+  int nToken;
+
+  sqlite3_tokenizer *pTokenizer = p->pTokenizer;
+  sqlite3_tokenizer_module const *pModule = pTokenizer->pModule;
+  sqlite3_tokenizer_cursor *pCsr;
+  int (*xNext)(sqlite3_tokenizer_cursor *pCursor,
+      const char**,int*,int*,int*,int*);
+
+  assert( pTokenizer && pModule );
+
+  rc = pModule->xOpen(pTokenizer, zText, -1, &pCsr);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+  pCsr->pTokenizer = pTokenizer;
+
+  xNext = pModule->xNext;
+  while( SQLITE_OK==rc
+      && SQLITE_OK==(rc = xNext(pCsr, &zToken, &nToken, &iStart, &iEnd, &iPos))
+  ){
+    PendingList *pList;
+ 
+    if( iPos>=nWord ) nWord = iPos+1;
+
+    /* Positions cannot be negative; we use -1 as a terminator internally.
+    ** Tokens must have a non-zero length.
+    */
+    if( iPos<0 || !zToken || nToken<=0 ){
+      rc = SQLITE_ERROR;
+      break;
+    }
+
+    pList = (PendingList *)fts3HashFind(&p->pendingTerms, zToken, nToken);
+    if( pList ){
+      p->nPendingData -= (pList->nData + nToken + sizeof(Fts3HashElem));
+    }
+    if( fts3PendingListAppend(&pList, p->iPrevDocid, iCol, iPos, &rc) ){
+      if( pList==fts3HashInsert(&p->pendingTerms, zToken, nToken, pList) ){
+        /* Malloc failed while inserting the new entry. This can only 
+        ** happen if there was no previous entry for this token.
+        */
+        assert( 0==fts3HashFind(&p->pendingTerms, zToken, nToken) );
+        sqlite3_free(pList);
+        rc = SQLITE_NOMEM;
+      }
+    }
+    if( rc==SQLITE_OK ){
+      p->nPendingData += (pList->nData + nToken + sizeof(Fts3HashElem));
+    }
+  }
+
+  pModule->xClose(pCsr);
+  *pnWord = nWord;
+  return (rc==SQLITE_DONE ? SQLITE_OK : rc);
+}
+
+/* 
+** Calling this function indicates that subsequent calls to 
+** fts3PendingTermsAdd() are to add term/position-list pairs for the
+** contents of the document with docid iDocid.
+*/
+static int fts3PendingTermsDocid(Fts3Table *p, sqlite_int64 iDocid){
+  /* TODO(shess) Explore whether partially flushing the buffer on
+  ** forced-flush would provide better performance.  I suspect that if
+  ** we ordered the doclists by size and flushed the largest until the
+  ** buffer was half empty, that would let the less frequent terms
+  ** generate longer doclists.
+  */
+  if( iDocid<=p->iPrevDocid || p->nPendingData>p->nMaxPendingData ){
+    int rc = sqlite3Fts3PendingTermsFlush(p);
+    if( rc!=SQLITE_OK ) return rc;
+  }
+  p->iPrevDocid = iDocid;
+  return SQLITE_OK;
+}
+
+/*
+** Discard the contents of the pending-terms hash table. 
+*/
+SQLITE_PRIVATE void sqlite3Fts3PendingTermsClear(Fts3Table *p){
+  Fts3HashElem *pElem;
+  for(pElem=fts3HashFirst(&p->pendingTerms); pElem; pElem=fts3HashNext(pElem)){
+    sqlite3_free(fts3HashData(pElem));
+  }
+  fts3HashClear(&p->pendingTerms);
+  p->nPendingData = 0;
+}
+
+/*
+** This function is called by the xUpdate() method as part of an INSERT
+** operation. It adds entries for each term in the new record to the
+** pendingTerms hash table.
+**
+** Argument apVal is the same as the similarly named argument passed to
+** fts3InsertData(). Parameter iDocid is the docid of the new row.
+*/
+static int fts3InsertTerms(Fts3Table *p, sqlite3_value **apVal, u32 *aSz){
+  int i;                          /* Iterator variable */
+  for(i=2; i<p->nColumn+2; i++){
+    const char *zText = (const char *)sqlite3_value_text(apVal[i]);
+    if( zText ){
+      int rc = fts3PendingTermsAdd(p, zText, i-2, &aSz[i-2]);
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+    }
+    aSz[p->nColumn] += sqlite3_value_bytes(apVal[i]);
+  }
+  return SQLITE_OK;
+}
+
+/*
+** This function is called by the xUpdate() method for an INSERT operation.
+** The apVal parameter is passed a copy of the apVal argument passed by
+** SQLite to the xUpdate() method. i.e:
+**
+**   apVal[0]                Not used for INSERT.
+**   apVal[1]                rowid
+**   apVal[2]                Left-most user-defined column
+**   ...
+**   apVal[p->nColumn+1]     Right-most user-defined column
+**   apVal[p->nColumn+2]     Hidden column with same name as table
+**   apVal[p->nColumn+3]     Hidden "docid" column (alias for rowid)
+*/
+static int fts3InsertData(
+  Fts3Table *p,                   /* Full-text table */
+  sqlite3_value **apVal,          /* Array of values to insert */
+  sqlite3_int64 *piDocid          /* OUT: Docid for row just inserted */
+){
+  int rc;                         /* Return code */
+  sqlite3_stmt *pContentInsert;   /* INSERT INTO %_content VALUES(...) */
+
+  /* Locate the statement handle used to insert data into the %_content
+  ** table. The SQL for this statement is:
+  **
+  **   INSERT INTO %_content VALUES(?, ?, ?, ...)
+  **
+  ** The statement features N '?' variables, where N is the number of user
+  ** defined columns in the FTS3 table, plus one for the docid field.
+  */
+  rc = fts3SqlStmt(p, SQL_CONTENT_INSERT, &pContentInsert, &apVal[1]);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+
+  /* There is a quirk here. The users INSERT statement may have specified
+  ** a value for the "rowid" field, for the "docid" field, or for both.
+  ** Which is a problem, since "rowid" and "docid" are aliases for the
+  ** same value. For example:
+  **
+  **   INSERT INTO fts3tbl(rowid, docid) VALUES(1, 2);
+  **
+  ** In FTS3, this is an error. It is an error to specify non-NULL values
+  ** for both docid and some other rowid alias.
+  */
+  if( SQLITE_NULL!=sqlite3_value_type(apVal[3+p->nColumn]) ){
+    if( SQLITE_NULL==sqlite3_value_type(apVal[0])
+     && SQLITE_NULL!=sqlite3_value_type(apVal[1])
+    ){
+      /* A rowid/docid conflict. */
+      return SQLITE_ERROR;
+    }
+    rc = sqlite3_bind_value(pContentInsert, 1, apVal[3+p->nColumn]);
+    if( rc!=SQLITE_OK ) return rc;
+  }
+
+  /* Execute the statement to insert the record. Set *piDocid to the 
+  ** new docid value. 
+  */
+  sqlite3_step(pContentInsert);
+  rc = sqlite3_reset(pContentInsert);
+
+  *piDocid = sqlite3_last_insert_rowid(p->db);
+  return rc;
+}
+
+
+
+/*
+** Remove all data from the FTS3 table. Clear the hash table containing
+** pending terms.
+*/
+static int fts3DeleteAll(Fts3Table *p){
+  int rc = SQLITE_OK;             /* Return code */
+
+  /* Discard the contents of the pending-terms hash table. */
+  sqlite3Fts3PendingTermsClear(p);
+
+  /* Delete everything from the %_content, %_segments and %_segdir tables. */
+  fts3SqlExec(&rc, p, SQL_DELETE_ALL_CONTENT, 0);
+  fts3SqlExec(&rc, p, SQL_DELETE_ALL_SEGMENTS, 0);
+  fts3SqlExec(&rc, p, SQL_DELETE_ALL_SEGDIR, 0);
+  if( p->bHasDocsize ){
+    fts3SqlExec(&rc, p, SQL_DELETE_ALL_DOCSIZE, 0);
+  }
+  if( p->bHasStat ){
+    fts3SqlExec(&rc, p, SQL_DELETE_ALL_STAT, 0);
+  }
+  return rc;
+}
+
+/*
+** The first element in the apVal[] array is assumed to contain the docid
+** (an integer) of a row about to be deleted. Remove all terms from the
+** full-text index.
+*/
+static void fts3DeleteTerms( 
+  int *pRC,               /* Result code */
+  Fts3Table *p,           /* The FTS table to delete from */
+  sqlite3_value **apVal,  /* apVal[] contains the docid to be deleted */
+  u32 *aSz                /* Sizes of deleted document written here */
+){
+  int rc;
+  sqlite3_stmt *pSelect;
+
+  if( *pRC ) return;
+  rc = fts3SqlStmt(p, SQL_SELECT_CONTENT_BY_ROWID, &pSelect, apVal);
+  if( rc==SQLITE_OK ){
+    if( SQLITE_ROW==sqlite3_step(pSelect) ){
+      int i;
+      for(i=1; i<=p->nColumn; i++){
+        const char *zText = (const char *)sqlite3_column_text(pSelect, i);
+        rc = fts3PendingTermsAdd(p, zText, -1, &aSz[i-1]);
+        if( rc!=SQLITE_OK ){
+          sqlite3_reset(pSelect);
+          *pRC = rc;
+          return;
+        }
+        aSz[p->nColumn] += sqlite3_column_bytes(pSelect, i);
+      }
+    }
+    rc = sqlite3_reset(pSelect);
+  }else{
+    sqlite3_reset(pSelect);
+  }
+  *pRC = rc;
+}
+
+/*
+** Forward declaration to account for the circular dependency between
+** functions fts3SegmentMerge() and fts3AllocateSegdirIdx().
+*/
+static int fts3SegmentMerge(Fts3Table *, int);
+
+/* 
+** This function allocates a new level iLevel index in the segdir table.
+** Usually, indexes are allocated within a level sequentially starting
+** with 0, so the allocated index is one greater than the value returned
+** by:
+**
+**   SELECT max(idx) FROM %_segdir WHERE level = :iLevel
+**
+** However, if there are already FTS3_MERGE_COUNT indexes at the requested
+** level, they are merged into a single level (iLevel+1) segment and the 
+** allocated index is 0.
+**
+** If successful, *piIdx is set to the allocated index slot and SQLITE_OK
+** returned. Otherwise, an SQLite error code is returned.
+*/
+static int fts3AllocateSegdirIdx(Fts3Table *p, int iLevel, int *piIdx){
+  int rc;                         /* Return Code */
+  sqlite3_stmt *pNextIdx;         /* Query for next idx at level iLevel */
+  int iNext = 0;                  /* Result of query pNextIdx */
+
+  /* Set variable iNext to the next available segdir index at level iLevel. */
+  rc = fts3SqlStmt(p, SQL_NEXT_SEGMENT_INDEX, &pNextIdx, 0);
+  if( rc==SQLITE_OK ){
+    sqlite3_bind_int(pNextIdx, 1, iLevel);
+    if( SQLITE_ROW==sqlite3_step(pNextIdx) ){
+      iNext = sqlite3_column_int(pNextIdx, 0);
+    }
+    rc = sqlite3_reset(pNextIdx);
+  }
+
+  if( rc==SQLITE_OK ){
+    /* If iNext is FTS3_MERGE_COUNT, indicating that level iLevel is already
+    ** full, merge all segments in level iLevel into a single iLevel+1
+    ** segment and allocate (newly freed) index 0 at level iLevel. Otherwise,
+    ** if iNext is less than FTS3_MERGE_COUNT, allocate index iNext.
+    */
+    if( iNext>=FTS3_MERGE_COUNT ){
+      rc = fts3SegmentMerge(p, iLevel);
+      *piIdx = 0;
+    }else{
+      *piIdx = iNext;
+    }
+  }
+
+  return rc;
+}
+
+/*
+** The %_segments table is declared as follows:
+**
+**   CREATE TABLE %_segments(blockid INTEGER PRIMARY KEY, block BLOB)
+**
+** This function reads data from a single row of the %_segments table. The
+** specific row is identified by the iBlockid parameter. If paBlob is not
+** NULL, then a buffer is allocated using sqlite3_malloc() and populated
+** with the contents of the blob stored in the "block" column of the 
+** identified table row is. Whether or not paBlob is NULL, *pnBlob is set
+** to the size of the blob in bytes before returning.
+**
+** If an error occurs, or the table does not contain the specified row,
+** an SQLite error code is returned. Otherwise, SQLITE_OK is returned. If
+** paBlob is non-NULL, then it is the responsibility of the caller to
+** eventually free the returned buffer.
+**
+** This function may leave an open sqlite3_blob* handle in the
+** Fts3Table.pSegments variable. This handle is reused by subsequent calls
+** to this function. The handle may be closed by calling the
+** sqlite3Fts3SegmentsClose() function. Reusing a blob handle is a handy
+** performance improvement, but the blob handle should always be closed
+** before control is returned to the user (to prevent a lock being held
+** on the database file for longer than necessary). Thus, any virtual table
+** method (xFilter etc.) that may directly or indirectly call this function
+** must call sqlite3Fts3SegmentsClose() before returning.
+*/
+SQLITE_PRIVATE int sqlite3Fts3ReadBlock(
+  Fts3Table *p,                   /* FTS3 table handle */
+  sqlite3_int64 iBlockid,         /* Access the row with blockid=$iBlockid */
+  char **paBlob,                  /* OUT: Blob data in malloc'd buffer */
+  int *pnBlob                     /* OUT: Size of blob data */
+){
+  int rc;                         /* Return code */
+
+  /* pnBlob must be non-NULL. paBlob may be NULL or non-NULL. */
+  assert( pnBlob);
+
+  if( p->pSegments ){
+    rc = sqlite3_blob_reopen(p->pSegments, iBlockid);
+  }else{
+    if( 0==p->zSegmentsTbl ){
+      p->zSegmentsTbl = sqlite3_mprintf("%s_segments", p->zName);
+      if( 0==p->zSegmentsTbl ) return SQLITE_NOMEM;
+    }
+    rc = sqlite3_blob_open(
+       p->db, p->zDb, p->zSegmentsTbl, "block", iBlockid, 0, &p->pSegments
+    );
+  }
+
+  if( rc==SQLITE_OK ){
+    int nByte = sqlite3_blob_bytes(p->pSegments);
+    if( paBlob ){
+      char *aByte = sqlite3_malloc(nByte + FTS3_NODE_PADDING);
+      if( !aByte ){
+        rc = SQLITE_NOMEM;
+      }else{
+        rc = sqlite3_blob_read(p->pSegments, aByte, nByte, 0);
+        memset(&aByte[nByte], 0, FTS3_NODE_PADDING);
+        if( rc!=SQLITE_OK ){
+          sqlite3_free(aByte);
+          aByte = 0;
+        }
+      }
+      *paBlob = aByte;
+    }
+    *pnBlob = nByte;
+  }
+
+  return rc;
+}
+
+/*
+** Close the blob handle at p->pSegments, if it is open. See comments above
+** the sqlite3Fts3ReadBlock() function for details.
+*/
+SQLITE_PRIVATE void sqlite3Fts3SegmentsClose(Fts3Table *p){
+  sqlite3_blob_close(p->pSegments);
+  p->pSegments = 0;
+}
+
+/*
+** Move the iterator passed as the first argument to the next term in the
+** segment. If successful, SQLITE_OK is returned. If there is no next term,
+** SQLITE_DONE. Otherwise, an SQLite error code.
+*/
+static int fts3SegReaderNext(Fts3Table *p, Fts3SegReader *pReader){
+  char *pNext;                    /* Cursor variable */
+  int nPrefix;                    /* Number of bytes in term prefix */
+  int nSuffix;                    /* Number of bytes in term suffix */
+
+  if( !pReader->aDoclist ){
+    pNext = pReader->aNode;
+  }else{
+    pNext = &pReader->aDoclist[pReader->nDoclist];
+  }
+
+  if( !pNext || pNext>=&pReader->aNode[pReader->nNode] ){
+    int rc;                       /* Return code from Fts3ReadBlock() */
+
+    if( fts3SegReaderIsPending(pReader) ){
+      Fts3HashElem *pElem = *(pReader->ppNextElem);
+      if( pElem==0 ){
+        pReader->aNode = 0;
+      }else{
+        PendingList *pList = (PendingList *)fts3HashData(pElem);
+        pReader->zTerm = (char *)fts3HashKey(pElem);
+        pReader->nTerm = fts3HashKeysize(pElem);
+        pReader->nNode = pReader->nDoclist = pList->nData + 1;
+        pReader->aNode = pReader->aDoclist = pList->aData;
+        pReader->ppNextElem++;
+        assert( pReader->aNode );
+      }
+      return SQLITE_OK;
+    }
+
+    if( !fts3SegReaderIsRootOnly(pReader) ){
+      sqlite3_free(pReader->aNode);
+    }
+    pReader->aNode = 0;
+
+    /* If iCurrentBlock>=iLeafEndBlock, this is an EOF condition. All leaf 
+    ** blocks have already been traversed.  */
+    assert( pReader->iCurrentBlock<=pReader->iLeafEndBlock );
+    if( pReader->iCurrentBlock>=pReader->iLeafEndBlock ){
+      return SQLITE_OK;
+    }
+
+    rc = sqlite3Fts3ReadBlock(
+        p, ++pReader->iCurrentBlock, &pReader->aNode, &pReader->nNode
+    );
+    if( rc!=SQLITE_OK ) return rc;
+    pNext = pReader->aNode;
+  }
+  
+  /* Because of the FTS3_NODE_PADDING bytes of padding, the following is 
+  ** safe (no risk of overread) even if the node data is corrupted.  
+  */
+  pNext += sqlite3Fts3GetVarint32(pNext, &nPrefix);
+  pNext += sqlite3Fts3GetVarint32(pNext, &nSuffix);
+  if( nPrefix<0 || nSuffix<=0 
+   || &pNext[nSuffix]>&pReader->aNode[pReader->nNode] 
+  ){
+    return SQLITE_CORRUPT;
+  }
+
+  if( nPrefix+nSuffix>pReader->nTermAlloc ){
+    int nNew = (nPrefix+nSuffix)*2;
+    char *zNew = sqlite3_realloc(pReader->zTerm, nNew);
+    if( !zNew ){
+      return SQLITE_NOMEM;
+    }
+    pReader->zTerm = zNew;
+    pReader->nTermAlloc = nNew;
+  }
+  memcpy(&pReader->zTerm[nPrefix], pNext, nSuffix);
+  pReader->nTerm = nPrefix+nSuffix;
+  pNext += nSuffix;
+  pNext += sqlite3Fts3GetVarint32(pNext, &pReader->nDoclist);
+  pReader->aDoclist = pNext;
+  pReader->pOffsetList = 0;
+
+  /* Check that the doclist does not appear to extend past the end of the
+  ** b-tree node. And that the final byte of the doclist is 0x00. If either 
+  ** of these statements is untrue, then the data structure is corrupt.
+  */
+  if( &pReader->aDoclist[pReader->nDoclist]>&pReader->aNode[pReader->nNode] 
+   || pReader->aDoclist[pReader->nDoclist-1]
+  ){
+    return SQLITE_CORRUPT;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Set the SegReader to point to the first docid in the doclist associated
+** with the current term.
+*/
+static void fts3SegReaderFirstDocid(Fts3SegReader *pReader){
+  int n;
+  assert( pReader->aDoclist );
+  assert( !pReader->pOffsetList );
+  n = sqlite3Fts3GetVarint(pReader->aDoclist, &pReader->iDocid);
+  pReader->pOffsetList = &pReader->aDoclist[n];
+}
+
+/*
+** Advance the SegReader to point to the next docid in the doclist
+** associated with the current term.
+** 
+** If arguments ppOffsetList and pnOffsetList are not NULL, then 
+** *ppOffsetList is set to point to the first column-offset list
+** in the doclist entry (i.e. immediately past the docid varint).
+** *pnOffsetList is set to the length of the set of column-offset
+** lists, not including the nul-terminator byte. For example:
+*/
+static void fts3SegReaderNextDocid(
+  Fts3SegReader *pReader,
+  char **ppOffsetList,
+  int *pnOffsetList
+){
+  char *p = pReader->pOffsetList;
+  char c = 0;
+
+  /* Pointer p currently points at the first byte of an offset list. The
+  ** following two lines advance it to point one byte past the end of
+  ** the same offset list.
+  */
+  while( *p | c ) c = *p++ & 0x80;
+  p++;
+
+  /* If required, populate the output variables with a pointer to and the
+  ** size of the previous offset-list.
+  */
+  if( ppOffsetList ){
+    *ppOffsetList = pReader->pOffsetList;
+    *pnOffsetList = (int)(p - pReader->pOffsetList - 1);
+  }
+
+  /* If there are no more entries in the doclist, set pOffsetList to
+  ** NULL. Otherwise, set Fts3SegReader.iDocid to the next docid and
+  ** Fts3SegReader.pOffsetList to point to the next offset list before
+  ** returning.
+  */
+  if( p>=&pReader->aDoclist[pReader->nDoclist] ){
+    pReader->pOffsetList = 0;
+  }else{
+    sqlite3_int64 iDelta;
+    pReader->pOffsetList = p + sqlite3Fts3GetVarint(p, &iDelta);
+    pReader->iDocid += iDelta;
+  }
+}
+
+/*
+** This function is called to estimate the amount of data that will be 
+** loaded from the disk If SegReaderIterate() is called on this seg-reader,
+** in units of average document size.
+** 
+** This can be used as follows: If the caller has a small doclist that 
+** contains references to N documents, and is considering merging it with
+** a large doclist (size X "average documents"), it may opt not to load
+** the large doclist if X>N.
+*/
+SQLITE_PRIVATE int sqlite3Fts3SegReaderCost(
+  Fts3Cursor *pCsr,               /* FTS3 cursor handle */
+  Fts3SegReader *pReader,         /* Segment-reader handle */
+  int *pnCost                     /* IN/OUT: Number of bytes read */
+){
+  Fts3Table *p = (Fts3Table*)pCsr->base.pVtab;
+  int rc = SQLITE_OK;             /* Return code */
+  int nCost = 0;                  /* Cost in bytes to return */
+  int pgsz = p->nPgsz;            /* Database page size */
+
+  /* If this seg-reader is reading the pending-terms table, or if all data
+  ** for the segment is stored on the root page of the b-tree, then the cost
+  ** is zero. In this case all required data is already in main memory.
+  */
+  if( p->bHasStat 
+   && !fts3SegReaderIsPending(pReader) 
+   && !fts3SegReaderIsRootOnly(pReader) 
+  ){
+    int nBlob = 0;
+    sqlite3_int64 iBlock;
+
+    if( pCsr->nRowAvg==0 ){
+      /* The average document size, which is required to calculate the cost
+      ** of each doclist, has not yet been determined. Read the required 
+      ** data from the %_stat table to calculate it.
+      **
+      ** Entry 0 of the %_stat table is a blob containing (nCol+1) FTS3 
+      ** varints, where nCol is the number of columns in the FTS3 table.
+      ** The first varint is the number of documents currently stored in
+      ** the table. The following nCol varints contain the total amount of
+      ** data stored in all rows of each column of the table, from left
+      ** to right.
+      */
+      sqlite3_stmt *pStmt;
+      sqlite3_int64 nDoc = 0;
+      sqlite3_int64 nByte = 0;
+      const char *pEnd;
+      const char *a;
+
+      rc = sqlite3Fts3SelectDoctotal(p, &pStmt);
+      if( rc!=SQLITE_OK ) return rc;
+      a = sqlite3_column_blob(pStmt, 0);
+      assert( a );
+
+      pEnd = &a[sqlite3_column_bytes(pStmt, 0)];
+      a += sqlite3Fts3GetVarint(a, &nDoc);
+      while( a<pEnd ){
+        a += sqlite3Fts3GetVarint(a, &nByte);
+      }
+      if( nDoc==0 || nByte==0 ){
+        sqlite3_reset(pStmt);
+        return SQLITE_CORRUPT;
+      }
+
+      pCsr->nRowAvg = (int)(((nByte / nDoc) + pgsz) / pgsz);
+      assert( pCsr->nRowAvg>0 ); 
+      rc = sqlite3_reset(pStmt);
+      if( rc!=SQLITE_OK ) return rc;
+    }
+
+    /* Assume that a blob flows over onto overflow pages if it is larger
+    ** than (pgsz-35) bytes in size (the file-format documentation
+    ** confirms this).
+    */
+    for(iBlock=pReader->iStartBlock; iBlock<=pReader->iLeafEndBlock; iBlock++){
+      rc = sqlite3Fts3ReadBlock(p, iBlock, 0, &nBlob);
+      if( rc!=SQLITE_OK ) break;
+      if( (nBlob+35)>pgsz ){
+        int nOvfl = (nBlob + 34)/pgsz;
+        nCost += ((nOvfl + pCsr->nRowAvg - 1)/pCsr->nRowAvg);
+      }
+    }
+  }
+
+  *pnCost += nCost;
+  return rc;
+}
+
+/*
+** Free all allocations associated with the iterator passed as the 
+** second argument.
+*/
+SQLITE_PRIVATE void sqlite3Fts3SegReaderFree(Fts3SegReader *pReader){
+  if( pReader && !fts3SegReaderIsPending(pReader) ){
+    sqlite3_free(pReader->zTerm);
+    if( !fts3SegReaderIsRootOnly(pReader) ){
+      sqlite3_free(pReader->aNode);
+    }
+  }
+  sqlite3_free(pReader);
+}
+
+/*
+** Allocate a new SegReader object.
+*/
+SQLITE_PRIVATE int sqlite3Fts3SegReaderNew(
+  int iAge,                       /* Segment "age". */
+  sqlite3_int64 iStartLeaf,       /* First leaf to traverse */
+  sqlite3_int64 iEndLeaf,         /* Final leaf to traverse */
+  sqlite3_int64 iEndBlock,        /* Final block of segment */
+  const char *zRoot,              /* Buffer containing root node */
+  int nRoot,                      /* Size of buffer containing root node */
+  Fts3SegReader **ppReader        /* OUT: Allocated Fts3SegReader */
+){
+  int rc = SQLITE_OK;             /* Return code */
+  Fts3SegReader *pReader;         /* Newly allocated SegReader object */
+  int nExtra = 0;                 /* Bytes to allocate segment root node */
+
+  assert( iStartLeaf<=iEndLeaf );
+  if( iStartLeaf==0 ){
+    nExtra = nRoot + FTS3_NODE_PADDING;
+  }
+
+  pReader = (Fts3SegReader *)sqlite3_malloc(sizeof(Fts3SegReader) + nExtra);
+  if( !pReader ){
+    return SQLITE_NOMEM;
+  }
+  memset(pReader, 0, sizeof(Fts3SegReader));
+  pReader->iIdx = iAge;
+  pReader->iStartBlock = iStartLeaf;
+  pReader->iLeafEndBlock = iEndLeaf;
+  pReader->iEndBlock = iEndBlock;
+
+  if( nExtra ){
+    /* The entire segment is stored in the root node. */
+    pReader->aNode = (char *)&pReader[1];
+    pReader->nNode = nRoot;
+    memcpy(pReader->aNode, zRoot, nRoot);
+    memset(&pReader->aNode[nRoot], 0, FTS3_NODE_PADDING);
+  }else{
+    pReader->iCurrentBlock = iStartLeaf-1;
+  }
+
+  if( rc==SQLITE_OK ){
+    *ppReader = pReader;
+  }else{
+    sqlite3Fts3SegReaderFree(pReader);
+  }
+  return rc;
+}
+
+/*
+** This is a comparison function used as a qsort() callback when sorting
+** an array of pending terms by term. This occurs as part of flushing
+** the contents of the pending-terms hash table to the database.
+*/
+static int fts3CompareElemByTerm(const void *lhs, const void *rhs){
+  char *z1 = fts3HashKey(*(Fts3HashElem **)lhs);
+  char *z2 = fts3HashKey(*(Fts3HashElem **)rhs);
+  int n1 = fts3HashKeysize(*(Fts3HashElem **)lhs);
+  int n2 = fts3HashKeysize(*(Fts3HashElem **)rhs);
+
+  int n = (n1<n2 ? n1 : n2);
+  int c = memcmp(z1, z2, n);
+  if( c==0 ){
+    c = n1 - n2;
+  }
+  return c;
+}
+
+/*
+** This function is used to allocate an Fts3SegReader that iterates through
+** a subset of the terms stored in the Fts3Table.pendingTerms array.
+*/
+SQLITE_PRIVATE int sqlite3Fts3SegReaderPending(
+  Fts3Table *p,                   /* Virtual table handle */
+  const char *zTerm,              /* Term to search for */
+  int nTerm,                      /* Size of buffer zTerm */
+  int isPrefix,                   /* True for a term-prefix query */
+  Fts3SegReader **ppReader        /* OUT: SegReader for pending-terms */
+){
+  Fts3SegReader *pReader = 0;     /* Fts3SegReader object to return */
+  Fts3HashElem **aElem = 0;       /* Array of term hash entries to scan */
+  int nElem = 0;                  /* Size of array at aElem */
+  int rc = SQLITE_OK;             /* Return Code */
+
+  if( isPrefix ){
+    int nAlloc = 0;               /* Size of allocated array at aElem */
+    Fts3HashElem *pE = 0;         /* Iterator variable */
+
+    for(pE=fts3HashFirst(&p->pendingTerms); pE; pE=fts3HashNext(pE)){
+      char *zKey = (char *)fts3HashKey(pE);
+      int nKey = fts3HashKeysize(pE);
+      if( nTerm==0 || (nKey>=nTerm && 0==memcmp(zKey, zTerm, nTerm)) ){
+        if( nElem==nAlloc ){
+          Fts3HashElem **aElem2;
+          nAlloc += 16;
+          aElem2 = (Fts3HashElem **)sqlite3_realloc(
+              aElem, nAlloc*sizeof(Fts3HashElem *)
+          );
+          if( !aElem2 ){
+            rc = SQLITE_NOMEM;
+            nElem = 0;
+            break;
+          }
+          aElem = aElem2;
+        }
+        aElem[nElem++] = pE;
+      }
+    }
+
+    /* If more than one term matches the prefix, sort the Fts3HashElem
+    ** objects in term order using qsort(). This uses the same comparison
+    ** callback as is used when flushing terms to disk.
+    */
+    if( nElem>1 ){
+      qsort(aElem, nElem, sizeof(Fts3HashElem *), fts3CompareElemByTerm);
+    }
+
+  }else{
+    Fts3HashElem *pE = fts3HashFindElem(&p->pendingTerms, zTerm, nTerm);
+    if( pE ){
+      aElem = &pE;
+      nElem = 1;
+    }
+  }
+
+  if( nElem>0 ){
+    int nByte = sizeof(Fts3SegReader) + (nElem+1)*sizeof(Fts3HashElem *);
+    pReader = (Fts3SegReader *)sqlite3_malloc(nByte);
+    if( !pReader ){
+      rc = SQLITE_NOMEM;
+    }else{
+      memset(pReader, 0, nByte);
+      pReader->iIdx = 0x7FFFFFFF;
+      pReader->ppNextElem = (Fts3HashElem **)&pReader[1];
+      memcpy(pReader->ppNextElem, aElem, nElem*sizeof(Fts3HashElem *));
+    }
+  }
+
+  if( isPrefix ){
+    sqlite3_free(aElem);
+  }
+  *ppReader = pReader;
+  return rc;
+}
+
+/*
+** Compare the entries pointed to by two Fts3SegReader structures. 
+** Comparison is as follows:
+**
+**   1) EOF is greater than not EOF.
+**
+**   2) The current terms (if any) are compared using memcmp(). If one
+**      term is a prefix of another, the longer term is considered the
+**      larger.
+**
+**   3) By segment age. An older segment is considered larger.
+*/
+static int fts3SegReaderCmp(Fts3SegReader *pLhs, Fts3SegReader *pRhs){
+  int rc;
+  if( pLhs->aNode && pRhs->aNode ){
+    int rc2 = pLhs->nTerm - pRhs->nTerm;
+    if( rc2<0 ){
+      rc = memcmp(pLhs->zTerm, pRhs->zTerm, pLhs->nTerm);
+    }else{
+      rc = memcmp(pLhs->zTerm, pRhs->zTerm, pRhs->nTerm);
+    }
+    if( rc==0 ){
+      rc = rc2;
+    }
+  }else{
+    rc = (pLhs->aNode==0) - (pRhs->aNode==0);
+  }
+  if( rc==0 ){
+    rc = pRhs->iIdx - pLhs->iIdx;
+  }
+  assert( rc!=0 );
+  return rc;
+}
+
+/*
+** A different comparison function for SegReader structures. In this
+** version, it is assumed that each SegReader points to an entry in
+** a doclist for identical terms. Comparison is made as follows:
+**
+**   1) EOF (end of doclist in this case) is greater than not EOF.
+**
+**   2) By current docid.
+**
+**   3) By segment age. An older segment is considered larger.
+*/
+static int fts3SegReaderDoclistCmp(Fts3SegReader *pLhs, Fts3SegReader *pRhs){
+  int rc = (pLhs->pOffsetList==0)-(pRhs->pOffsetList==0);
+  if( rc==0 ){
+    if( pLhs->iDocid==pRhs->iDocid ){
+      rc = pRhs->iIdx - pLhs->iIdx;
+    }else{
+      rc = (pLhs->iDocid > pRhs->iDocid) ? 1 : -1;
+    }
+  }
+  assert( pLhs->aNode && pRhs->aNode );
+  return rc;
+}
+
+/*
+** Compare the term that the Fts3SegReader object passed as the first argument
+** points to with the term specified by arguments zTerm and nTerm. 
+**
+** If the pSeg iterator is already at EOF, return 0. Otherwise, return
+** -ve if the pSeg term is less than zTerm/nTerm, 0 if the two terms are
+** equal, or +ve if the pSeg term is greater than zTerm/nTerm.
+*/
+static int fts3SegReaderTermCmp(
+  Fts3SegReader *pSeg,            /* Segment reader object */
+  const char *zTerm,              /* Term to compare to */
+  int nTerm                       /* Size of term zTerm in bytes */
+){
+  int res = 0;
+  if( pSeg->aNode ){
+    if( pSeg->nTerm>nTerm ){
+      res = memcmp(pSeg->zTerm, zTerm, nTerm);
+    }else{
+      res = memcmp(pSeg->zTerm, zTerm, pSeg->nTerm);
+    }
+    if( res==0 ){
+      res = pSeg->nTerm-nTerm;
+    }
+  }
+  return res;
+}
+
+/*
+** Argument apSegment is an array of nSegment elements. It is known that
+** the final (nSegment-nSuspect) members are already in sorted order
+** (according to the comparison function provided). This function shuffles
+** the array around until all entries are in sorted order.
+*/
+static void fts3SegReaderSort(
+  Fts3SegReader **apSegment,                     /* Array to sort entries of */
+  int nSegment,                                  /* Size of apSegment array */
+  int nSuspect,                                  /* Unsorted entry count */
+  int (*xCmp)(Fts3SegReader *, Fts3SegReader *)  /* Comparison function */
+){
+  int i;                          /* Iterator variable */
+
+  assert( nSuspect<=nSegment );
+
+  if( nSuspect==nSegment ) nSuspect--;
+  for(i=nSuspect-1; i>=0; i--){
+    int j;
+    for(j=i; j<(nSegment-1); j++){
+      Fts3SegReader *pTmp;
+      if( xCmp(apSegment[j], apSegment[j+1])<0 ) break;
+      pTmp = apSegment[j+1];
+      apSegment[j+1] = apSegment[j];
+      apSegment[j] = pTmp;
+    }
+  }
+
+#ifndef NDEBUG
+  /* Check that the list really is sorted now. */
+  for(i=0; i<(nSuspect-1); i++){
+    assert( xCmp(apSegment[i], apSegment[i+1])<0 );
+  }
+#endif
+}
+
+/* 
+** Insert a record into the %_segments table.
+*/
+static int fts3WriteSegment(
+  Fts3Table *p,                   /* Virtual table handle */
+  sqlite3_int64 iBlock,           /* Block id for new block */
+  char *z,                        /* Pointer to buffer containing block data */
+  int n                           /* Size of buffer z in bytes */
+){
+  sqlite3_stmt *pStmt;
+  int rc = fts3SqlStmt(p, SQL_INSERT_SEGMENTS, &pStmt, 0);
+  if( rc==SQLITE_OK ){
+    sqlite3_bind_int64(pStmt, 1, iBlock);
+    sqlite3_bind_blob(pStmt, 2, z, n, SQLITE_STATIC);
+    sqlite3_step(pStmt);
+    rc = sqlite3_reset(pStmt);
+  }
+  return rc;
+}
+
+/* 
+** Insert a record into the %_segdir table.
+*/
+static int fts3WriteSegdir(
+  Fts3Table *p,                   /* Virtual table handle */
+  int iLevel,                     /* Value for "level" field */
+  int iIdx,                       /* Value for "idx" field */
+  sqlite3_int64 iStartBlock,      /* Value for "start_block" field */
+  sqlite3_int64 iLeafEndBlock,    /* Value for "leaves_end_block" field */
+  sqlite3_int64 iEndBlock,        /* Value for "end_block" field */
+  char *zRoot,                    /* Blob value for "root" field */
+  int nRoot                       /* Number of bytes in buffer zRoot */
+){
+  sqlite3_stmt *pStmt;
+  int rc = fts3SqlStmt(p, SQL_INSERT_SEGDIR, &pStmt, 0);
+  if( rc==SQLITE_OK ){
+    sqlite3_bind_int(pStmt, 1, iLevel);
+    sqlite3_bind_int(pStmt, 2, iIdx);
+    sqlite3_bind_int64(pStmt, 3, iStartBlock);
+    sqlite3_bind_int64(pStmt, 4, iLeafEndBlock);
+    sqlite3_bind_int64(pStmt, 5, iEndBlock);
+    sqlite3_bind_blob(pStmt, 6, zRoot, nRoot, SQLITE_STATIC);
+    sqlite3_step(pStmt);
+    rc = sqlite3_reset(pStmt);
+  }
+  return rc;
+}
+
+/*
+** Return the size of the common prefix (if any) shared by zPrev and
+** zNext, in bytes. For example, 
+**
+**   fts3PrefixCompress("abc", 3, "abcdef", 6)   // returns 3
+**   fts3PrefixCompress("abX", 3, "abcdef", 6)   // returns 2
+**   fts3PrefixCompress("abX", 3, "Xbcdef", 6)   // returns 0
+*/
+static int fts3PrefixCompress(
+  const char *zPrev,              /* Buffer containing previous term */
+  int nPrev,                      /* Size of buffer zPrev in bytes */
+  const char *zNext,              /* Buffer containing next term */
+  int nNext                       /* Size of buffer zNext in bytes */
+){
+  int n;
+  UNUSED_PARAMETER(nNext);
+  for(n=0; n<nPrev && zPrev[n]==zNext[n]; n++);
+  return n;
+}
+
+/*
+** Add term zTerm to the SegmentNode. It is guaranteed that zTerm is larger
+** (according to memcmp) than the previous term.
+*/
+static int fts3NodeAddTerm(
+  Fts3Table *p,                   /* Virtual table handle */
+  SegmentNode **ppTree,           /* IN/OUT: SegmentNode handle */ 
+  int isCopyTerm,                 /* True if zTerm/nTerm is transient */
+  const char *zTerm,              /* Pointer to buffer containing term */
+  int nTerm                       /* Size of term in bytes */
+){
+  SegmentNode *pTree = *ppTree;
+  int rc;
+  SegmentNode *pNew;
+
+  /* First try to append the term to the current node. Return early if 
+  ** this is possible.
+  */
+  if( pTree ){
+    int nData = pTree->nData;     /* Current size of node in bytes */
+    int nReq = nData;             /* Required space after adding zTerm */
+    int nPrefix;                  /* Number of bytes of prefix compression */
+    int nSuffix;                  /* Suffix length */
+
+    nPrefix = fts3PrefixCompress(pTree->zTerm, pTree->nTerm, zTerm, nTerm);
+    nSuffix = nTerm-nPrefix;
+
+    nReq += sqlite3Fts3VarintLen(nPrefix)+sqlite3Fts3VarintLen(nSuffix)+nSuffix;
+    if( nReq<=p->nNodeSize || !pTree->zTerm ){
+
+      if( nReq>p->nNodeSize ){
+        /* An unusual case: this is the first term to be added to the node
+        ** and the static node buffer (p->nNodeSize bytes) is not large
+        ** enough. Use a separately malloced buffer instead This wastes
+        ** p->nNodeSize bytes, but since this scenario only comes about when
+        ** the database contain two terms that share a prefix of almost 2KB, 
+        ** this is not expected to be a serious problem. 
+        */
+        assert( pTree->aData==(char *)&pTree[1] );
+        pTree->aData = (char *)sqlite3_malloc(nReq);
+        if( !pTree->aData ){
+          return SQLITE_NOMEM;
+        }
+      }
+
+      if( pTree->zTerm ){
+        /* There is no prefix-length field for first term in a node */
+        nData += sqlite3Fts3PutVarint(&pTree->aData[nData], nPrefix);
+      }
+
+      nData += sqlite3Fts3PutVarint(&pTree->aData[nData], nSuffix);
+      memcpy(&pTree->aData[nData], &zTerm[nPrefix], nSuffix);
+      pTree->nData = nData + nSuffix;
+      pTree->nEntry++;
+
+      if( isCopyTerm ){
+        if( pTree->nMalloc<nTerm ){
+          char *zNew = sqlite3_realloc(pTree->zMalloc, nTerm*2);
+          if( !zNew ){
+            return SQLITE_NOMEM;
+          }
+          pTree->nMalloc = nTerm*2;
+          pTree->zMalloc = zNew;
+        }
+        pTree->zTerm = pTree->zMalloc;
+        memcpy(pTree->zTerm, zTerm, nTerm);
+        pTree->nTerm = nTerm;
+      }else{
+        pTree->zTerm = (char *)zTerm;
+        pTree->nTerm = nTerm;
+      }
+      return SQLITE_OK;
+    }
+  }
+
+  /* If control flows to here, it was not possible to append zTerm to the
+  ** current node. Create a new node (a right-sibling of the current node).
+  ** If this is the first node in the tree, the term is added to it.
+  **
+  ** Otherwise, the term is not added to the new node, it is left empty for
+  ** now. Instead, the term is inserted into the parent of pTree. If pTree 
+  ** has no parent, one is created here.
+  */
+  pNew = (SegmentNode *)sqlite3_malloc(sizeof(SegmentNode) + p->nNodeSize);
+  if( !pNew ){
+    return SQLITE_NOMEM;
+  }
+  memset(pNew, 0, sizeof(SegmentNode));
+  pNew->nData = 1 + FTS3_VARINT_MAX;
+  pNew->aData = (char *)&pNew[1];
+
+  if( pTree ){
+    SegmentNode *pParent = pTree->pParent;
+    rc = fts3NodeAddTerm(p, &pParent, isCopyTerm, zTerm, nTerm);
+    if( pTree->pParent==0 ){
+      pTree->pParent = pParent;
+    }
+    pTree->pRight = pNew;
+    pNew->pLeftmost = pTree->pLeftmost;
+    pNew->pParent = pParent;
+    pNew->zMalloc = pTree->zMalloc;
+    pNew->nMalloc = pTree->nMalloc;
+    pTree->zMalloc = 0;
+  }else{
+    pNew->pLeftmost = pNew;
+    rc = fts3NodeAddTerm(p, &pNew, isCopyTerm, zTerm, nTerm); 
+  }
+
+  *ppTree = pNew;
+  return rc;
+}
+
+/*
+** Helper function for fts3NodeWrite().
+*/
+static int fts3TreeFinishNode(
+  SegmentNode *pTree, 
+  int iHeight, 
+  sqlite3_int64 iLeftChild
+){
+  int nStart;
+  assert( iHeight>=1 && iHeight<128 );
+  nStart = FTS3_VARINT_MAX - sqlite3Fts3VarintLen(iLeftChild);
+  pTree->aData[nStart] = (char)iHeight;
+  sqlite3Fts3PutVarint(&pTree->aData[nStart+1], iLeftChild);
+  return nStart;
+}
+
+/*
+** Write the buffer for the segment node pTree and all of its peers to the
+** database. Then call this function recursively to write the parent of 
+** pTree and its peers to the database. 
+**
+** Except, if pTree is a root node, do not write it to the database. Instead,
+** set output variables *paRoot and *pnRoot to contain the root node.
+**
+** If successful, SQLITE_OK is returned and output variable *piLast is
+** set to the largest blockid written to the database (or zero if no
+** blocks were written to the db). Otherwise, an SQLite error code is 
+** returned.
+*/
+static int fts3NodeWrite(
+  Fts3Table *p,                   /* Virtual table handle */
+  SegmentNode *pTree,             /* SegmentNode handle */
+  int iHeight,                    /* Height of this node in tree */
+  sqlite3_int64 iLeaf,            /* Block id of first leaf node */
+  sqlite3_int64 iFree,            /* Block id of next free slot in %_segments */
+  sqlite3_int64 *piLast,          /* OUT: Block id of last entry written */
+  char **paRoot,                  /* OUT: Data for root node */
+  int *pnRoot                     /* OUT: Size of root node in bytes */
+){
+  int rc = SQLITE_OK;
+
+  if( !pTree->pParent ){
+    /* Root node of the tree. */
+    int nStart = fts3TreeFinishNode(pTree, iHeight, iLeaf);
+    *piLast = iFree-1;
+    *pnRoot = pTree->nData - nStart;
+    *paRoot = &pTree->aData[nStart];
+  }else{
+    SegmentNode *pIter;
+    sqlite3_int64 iNextFree = iFree;
+    sqlite3_int64 iNextLeaf = iLeaf;
+    for(pIter=pTree->pLeftmost; pIter && rc==SQLITE_OK; pIter=pIter->pRight){
+      int nStart = fts3TreeFinishNode(pIter, iHeight, iNextLeaf);
+      int nWrite = pIter->nData - nStart;
+  
+      rc = fts3WriteSegment(p, iNextFree, &pIter->aData[nStart], nWrite);
+      iNextFree++;
+      iNextLeaf += (pIter->nEntry+1);
+    }
+    if( rc==SQLITE_OK ){
+      assert( iNextLeaf==iFree );
+      rc = fts3NodeWrite(
+          p, pTree->pParent, iHeight+1, iFree, iNextFree, piLast, paRoot, pnRoot
+      );
+    }
+  }
+
+  return rc;
+}
+
+/*
+** Free all memory allocations associated with the tree pTree.
+*/
+static void fts3NodeFree(SegmentNode *pTree){
+  if( pTree ){
+    SegmentNode *p = pTree->pLeftmost;
+    fts3NodeFree(p->pParent);
+    while( p ){
+      SegmentNode *pRight = p->pRight;
+      if( p->aData!=(char *)&p[1] ){
+        sqlite3_free(p->aData);
+      }
+      assert( pRight==0 || p->zMalloc==0 );
+      sqlite3_free(p->zMalloc);
+      sqlite3_free(p);
+      p = pRight;
+    }
+  }
+}
+
+/*
+** Add a term to the segment being constructed by the SegmentWriter object
+** *ppWriter. When adding the first term to a segment, *ppWriter should
+** be passed NULL. This function will allocate a new SegmentWriter object
+** and return it via the input/output variable *ppWriter in this case.
+**
+** If successful, SQLITE_OK is returned. Otherwise, an SQLite error code.
+*/
+static int fts3SegWriterAdd(
+  Fts3Table *p,                   /* Virtual table handle */
+  SegmentWriter **ppWriter,       /* IN/OUT: SegmentWriter handle */ 
+  int isCopyTerm,                 /* True if buffer zTerm must be copied */
+  const char *zTerm,              /* Pointer to buffer containing term */
+  int nTerm,                      /* Size of term in bytes */
+  const char *aDoclist,           /* Pointer to buffer containing doclist */
+  int nDoclist                    /* Size of doclist in bytes */
+){
+  int nPrefix;                    /* Size of term prefix in bytes */
+  int nSuffix;                    /* Size of term suffix in bytes */
+  int nReq;                       /* Number of bytes required on leaf page */
+  int nData;
+  SegmentWriter *pWriter = *ppWriter;
+
+  if( !pWriter ){
+    int rc;
+    sqlite3_stmt *pStmt;
+
+    /* Allocate the SegmentWriter structure */
+    pWriter = (SegmentWriter *)sqlite3_malloc(sizeof(SegmentWriter));
+    if( !pWriter ) return SQLITE_NOMEM;
+    memset(pWriter, 0, sizeof(SegmentWriter));
+    *ppWriter = pWriter;
+
+    /* Allocate a buffer in which to accumulate data */
+    pWriter->aData = (char *)sqlite3_malloc(p->nNodeSize);
+    if( !pWriter->aData ) return SQLITE_NOMEM;
+    pWriter->nSize = p->nNodeSize;
+
+    /* Find the next free blockid in the %_segments table */
+    rc = fts3SqlStmt(p, SQL_NEXT_SEGMENTS_ID, &pStmt, 0);
+    if( rc!=SQLITE_OK ) return rc;
+    if( SQLITE_ROW==sqlite3_step(pStmt) ){
+      pWriter->iFree = sqlite3_column_int64(pStmt, 0);
+      pWriter->iFirst = pWriter->iFree;
+    }
+    rc = sqlite3_reset(pStmt);
+    if( rc!=SQLITE_OK ) return rc;
+  }
+  nData = pWriter->nData;
+
+  nPrefix = fts3PrefixCompress(pWriter->zTerm, pWriter->nTerm, zTerm, nTerm);
+  nSuffix = nTerm-nPrefix;
+
+  /* Figure out how many bytes are required by this new entry */
+  nReq = sqlite3Fts3VarintLen(nPrefix) +    /* varint containing prefix size */
+    sqlite3Fts3VarintLen(nSuffix) +         /* varint containing suffix size */
+    nSuffix +                               /* Term suffix */
+    sqlite3Fts3VarintLen(nDoclist) +        /* Size of doclist */
+    nDoclist;                               /* Doclist data */
+
+  if( nData>0 && nData+nReq>p->nNodeSize ){
+    int rc;
+
+    /* The current leaf node is full. Write it out to the database. */
+    rc = fts3WriteSegment(p, pWriter->iFree++, pWriter->aData, nData);
+    if( rc!=SQLITE_OK ) return rc;
+
+    /* Add the current term to the interior node tree. The term added to
+    ** the interior tree must:
+    **
+    **   a) be greater than the largest term on the leaf node just written
+    **      to the database (still available in pWriter->zTerm), and
+    **
+    **   b) be less than or equal to the term about to be added to the new
+    **      leaf node (zTerm/nTerm).
+    **
+    ** In other words, it must be the prefix of zTerm 1 byte longer than
+    ** the common prefix (if any) of zTerm and pWriter->zTerm.
+    */
+    assert( nPrefix<nTerm );
+    rc = fts3NodeAddTerm(p, &pWriter->pTree, isCopyTerm, zTerm, nPrefix+1);
+    if( rc!=SQLITE_OK ) return rc;
+
+    nData = 0;
+    pWriter->nTerm = 0;
+
+    nPrefix = 0;
+    nSuffix = nTerm;
+    nReq = 1 +                              /* varint containing prefix size */
+      sqlite3Fts3VarintLen(nTerm) +         /* varint containing suffix size */
+      nTerm +                               /* Term suffix */
+      sqlite3Fts3VarintLen(nDoclist) +      /* Size of doclist */
+      nDoclist;                             /* Doclist data */
+  }
+
+  /* If the buffer currently allocated is too small for this entry, realloc
+  ** the buffer to make it large enough.
+  */
+  if( nReq>pWriter->nSize ){
+    char *aNew = sqlite3_realloc(pWriter->aData, nReq);
+    if( !aNew ) return SQLITE_NOMEM;
+    pWriter->aData = aNew;
+    pWriter->nSize = nReq;
+  }
+  assert( nData+nReq<=pWriter->nSize );
+
+  /* Append the prefix-compressed term and doclist to the buffer. */
+  nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nPrefix);
+  nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nSuffix);
+  memcpy(&pWriter->aData[nData], &zTerm[nPrefix], nSuffix);
+  nData += nSuffix;
+  nData += sqlite3Fts3PutVarint(&pWriter->aData[nData], nDoclist);
+  memcpy(&pWriter->aData[nData], aDoclist, nDoclist);
+  pWriter->nData = nData + nDoclist;
+
+  /* Save the current term so that it can be used to prefix-compress the next.
+  ** If the isCopyTerm parameter is true, then the buffer pointed to by
+  ** zTerm is transient, so take a copy of the term data. Otherwise, just
+  ** store a copy of the pointer.
+  */
+  if( isCopyTerm ){
+    if( nTerm>pWriter->nMalloc ){
+      char *zNew = sqlite3_realloc(pWriter->zMalloc, nTerm*2);
+      if( !zNew ){
+        return SQLITE_NOMEM;
+      }
+      pWriter->nMalloc = nTerm*2;
+      pWriter->zMalloc = zNew;
+      pWriter->zTerm = zNew;
+    }
+    assert( pWriter->zTerm==pWriter->zMalloc );
+    memcpy(pWriter->zTerm, zTerm, nTerm);
+  }else{
+    pWriter->zTerm = (char *)zTerm;
+  }
+  pWriter->nTerm = nTerm;
+
+  return SQLITE_OK;
+}
+
+/*
+** Flush all data associated with the SegmentWriter object pWriter to the
+** database. This function must be called after all terms have been added
+** to the segment using fts3SegWriterAdd(). If successful, SQLITE_OK is
+** returned. Otherwise, an SQLite error code.
+*/
+static int fts3SegWriterFlush(
+  Fts3Table *p,                   /* Virtual table handle */
+  SegmentWriter *pWriter,         /* SegmentWriter to flush to the db */
+  int iLevel,                     /* Value for 'level' column of %_segdir */
+  int iIdx                        /* Value for 'idx' column of %_segdir */
+){
+  int rc;                         /* Return code */
+  if( pWriter->pTree ){
+    sqlite3_int64 iLast = 0;      /* Largest block id written to database */
+    sqlite3_int64 iLastLeaf;      /* Largest leaf block id written to db */
+    char *zRoot = NULL;           /* Pointer to buffer containing root node */
+    int nRoot = 0;                /* Size of buffer zRoot */
+
+    iLastLeaf = pWriter->iFree;
+    rc = fts3WriteSegment(p, pWriter->iFree++, pWriter->aData, pWriter->nData);
+    if( rc==SQLITE_OK ){
+      rc = fts3NodeWrite(p, pWriter->pTree, 1,
+          pWriter->iFirst, pWriter->iFree, &iLast, &zRoot, &nRoot);
+    }
+    if( rc==SQLITE_OK ){
+      rc = fts3WriteSegdir(
+          p, iLevel, iIdx, pWriter->iFirst, iLastLeaf, iLast, zRoot, nRoot);
+    }
+  }else{
+    /* The entire tree fits on the root node. Write it to the segdir table. */
+    rc = fts3WriteSegdir(
+        p, iLevel, iIdx, 0, 0, 0, pWriter->aData, pWriter->nData);
+  }
+  return rc;
+}
+
+/*
+** Release all memory held by the SegmentWriter object passed as the 
+** first argument.
+*/
+static void fts3SegWriterFree(SegmentWriter *pWriter){
+  if( pWriter ){
+    sqlite3_free(pWriter->aData);
+    sqlite3_free(pWriter->zMalloc);
+    fts3NodeFree(pWriter->pTree);
+    sqlite3_free(pWriter);
+  }
+}
+
+/*
+** The first value in the apVal[] array is assumed to contain an integer.
+** This function tests if there exist any documents with docid values that
+** are different from that integer. i.e. if deleting the document with docid
+** apVal[0] would mean the FTS3 table were empty.
+**
+** If successful, *pisEmpty is set to true if the table is empty except for
+** document apVal[0], or false otherwise, and SQLITE_OK is returned. If an
+** error occurs, an SQLite error code is returned.
+*/
+static int fts3IsEmpty(Fts3Table *p, sqlite3_value **apVal, int *pisEmpty){
+  sqlite3_stmt *pStmt;
+  int rc;
+  rc = fts3SqlStmt(p, SQL_IS_EMPTY, &pStmt, apVal);
+  if( rc==SQLITE_OK ){
+    if( SQLITE_ROW==sqlite3_step(pStmt) ){
+      *pisEmpty = sqlite3_column_int(pStmt, 0);
+    }
+    rc = sqlite3_reset(pStmt);
+  }
+  return rc;
+}
+
+/*
+** Set *pnSegment to the total number of segments in the database. Set
+** *pnMax to the largest segment level in the database (segment levels
+** are stored in the 'level' column of the %_segdir table).
+**
+** Return SQLITE_OK if successful, or an SQLite error code if not.
+*/
+static int fts3SegmentCountMax(Fts3Table *p, int *pnSegment, int *pnMax){
+  sqlite3_stmt *pStmt;
+  int rc;
+
+  rc = fts3SqlStmt(p, SQL_SELECT_SEGDIR_COUNT_MAX, &pStmt, 0);
+  if( rc!=SQLITE_OK ) return rc;
+  if( SQLITE_ROW==sqlite3_step(pStmt) ){
+    *pnSegment = sqlite3_column_int(pStmt, 0);
+    *pnMax = sqlite3_column_int(pStmt, 1);
+  }
+  return sqlite3_reset(pStmt);
+}
+
+/*
+** This function is used after merging multiple segments into a single large
+** segment to delete the old, now redundant, segment b-trees. Specifically,
+** it:
+** 
+**   1) Deletes all %_segments entries for the segments associated with 
+**      each of the SegReader objects in the array passed as the third 
+**      argument, and
+**
+**   2) deletes all %_segdir entries with level iLevel, or all %_segdir
+**      entries regardless of level if (iLevel<0).
+**
+** SQLITE_OK is returned if successful, otherwise an SQLite error code.
+*/
+static int fts3DeleteSegdir(
+  Fts3Table *p,                   /* Virtual table handle */
+  int iLevel,                     /* Level of %_segdir entries to delete */
+  Fts3SegReader **apSegment,      /* Array of SegReader objects */
+  int nReader                     /* Size of array apSegment */
+){
+  int rc;                         /* Return Code */
+  int i;                          /* Iterator variable */
+  sqlite3_stmt *pDelete;          /* SQL statement to delete rows */
+
+  rc = fts3SqlStmt(p, SQL_DELETE_SEGMENTS_RANGE, &pDelete, 0);
+  for(i=0; rc==SQLITE_OK && i<nReader; i++){
+    Fts3SegReader *pSegment = apSegment[i];
+    if( pSegment->iStartBlock ){
+      sqlite3_bind_int64(pDelete, 1, pSegment->iStartBlock);
+      sqlite3_bind_int64(pDelete, 2, pSegment->iEndBlock);
+      sqlite3_step(pDelete);
+      rc = sqlite3_reset(pDelete);
+    }
+  }
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+
+  if( iLevel==FTS3_SEGCURSOR_ALL ){
+    fts3SqlExec(&rc, p, SQL_DELETE_ALL_SEGDIR, 0);
+  }else if( iLevel==FTS3_SEGCURSOR_PENDING ){
+    sqlite3Fts3PendingTermsClear(p);
+  }else{
+    assert( iLevel>=0 );
+    rc = fts3SqlStmt(p, SQL_DELETE_SEGDIR_BY_LEVEL, &pDelete, 0);
+    if( rc==SQLITE_OK ){
+      sqlite3_bind_int(pDelete, 1, iLevel);
+      sqlite3_step(pDelete);
+      rc = sqlite3_reset(pDelete);
+    }
+  }
+
+  return rc;
+}
+
+/*
+** When this function is called, buffer *ppList (size *pnList bytes) contains 
+** a position list that may (or may not) feature multiple columns. This
+** function adjusts the pointer *ppList and the length *pnList so that they
+** identify the subset of the position list that corresponds to column iCol.
+**
+** If there are no entries in the input position list for column iCol, then
+** *pnList is set to zero before returning.
+*/
+static void fts3ColumnFilter(
+  int iCol,                       /* Column to filter on */
+  char **ppList,                  /* IN/OUT: Pointer to position list */
+  int *pnList                     /* IN/OUT: Size of buffer *ppList in bytes */
+){
+  char *pList = *ppList;
+  int nList = *pnList;
+  char *pEnd = &pList[nList];
+  int iCurrent = 0;
+  char *p = pList;
+
+  assert( iCol>=0 );
+  for(;;) {
+    char c = 0;
+    while( p<pEnd && (c | *p)&0xFE ) c = *p++ & 0x80;
+  
+    if( iCol==iCurrent ){
+      nList = (int)(p - pList);
+      break;
+    }
+
+    nList -= (int)(p - pList);
+    pList = p;
+    if( nList==0 ){
+      break;
+    }
+    p = &pList[1];
+    p += sqlite3Fts3GetVarint32(p, &iCurrent);
+  }
+
+  *ppList = pList;
+  *pnList = nList;
+}
+
+SQLITE_PRIVATE int sqlite3Fts3SegReaderStart(
+  Fts3Table *p,                   /* Virtual table handle */
+  Fts3SegReaderCursor *pCsr,      /* Cursor object */
+  Fts3SegFilter *pFilter          /* Restrictions on range of iteration */
+){
+  int i;
+
+  /* Initialize the cursor object */
+  pCsr->pFilter = pFilter;
+
+  /* If the Fts3SegFilter defines a specific term (or term prefix) to search 
+  ** for, then advance each segment iterator until it points to a term of
+  ** equal or greater value than the specified term. This prevents many
+  ** unnecessary merge/sort operations for the case where single segment
+  ** b-tree leaf nodes contain more than one term.
+  */
+  for(i=0; i<pCsr->nSegment; i++){
+    int nTerm = pFilter->nTerm;
+    const char *zTerm = pFilter->zTerm;
+    Fts3SegReader *pSeg = pCsr->apSegment[i];
+    do {
+      int rc = fts3SegReaderNext(p, pSeg);
+      if( rc!=SQLITE_OK ) return rc;
+    }while( zTerm && fts3SegReaderTermCmp(pSeg, zTerm, nTerm)<0 );
+  }
+  fts3SegReaderSort(
+      pCsr->apSegment, pCsr->nSegment, pCsr->nSegment, fts3SegReaderCmp);
+
+  return SQLITE_OK;
+}
+
+SQLITE_PRIVATE int sqlite3Fts3SegReaderStep(
+  Fts3Table *p,                   /* Virtual table handle */
+  Fts3SegReaderCursor *pCsr       /* Cursor object */
+){
+  int rc = SQLITE_OK;
+
+  int isIgnoreEmpty =  (pCsr->pFilter->flags & FTS3_SEGMENT_IGNORE_EMPTY);
+  int isRequirePos =   (pCsr->pFilter->flags & FTS3_SEGMENT_REQUIRE_POS);
+  int isColFilter =    (pCsr->pFilter->flags & FTS3_SEGMENT_COLUMN_FILTER);
+  int isPrefix =       (pCsr->pFilter->flags & FTS3_SEGMENT_PREFIX);
+  int isScan =         (pCsr->pFilter->flags & FTS3_SEGMENT_SCAN);
+
+  Fts3SegReader **apSegment = pCsr->apSegment;
+  int nSegment = pCsr->nSegment;
+  Fts3SegFilter *pFilter = pCsr->pFilter;
+
+  if( pCsr->nSegment==0 ) return SQLITE_OK;
+
+  do {
+    int nMerge;
+    int i;
+  
+    /* Advance the first pCsr->nAdvance entries in the apSegment[] array
+    ** forward. Then sort the list in order of current term again.  
+    */
+    for(i=0; i<pCsr->nAdvance; i++){
+      rc = fts3SegReaderNext(p, apSegment[i]);
+      if( rc!=SQLITE_OK ) return rc;
+    }
+    fts3SegReaderSort(apSegment, nSegment, pCsr->nAdvance, fts3SegReaderCmp);
+    pCsr->nAdvance = 0;
+
+    /* If all the seg-readers are at EOF, we're finished. return SQLITE_OK. */
+    assert( rc==SQLITE_OK );
+    if( apSegment[0]->aNode==0 ) break;
+
+    pCsr->nTerm = apSegment[0]->nTerm;
+    pCsr->zTerm = apSegment[0]->zTerm;
+
+    /* If this is a prefix-search, and if the term that apSegment[0] points
+    ** to does not share a suffix with pFilter->zTerm/nTerm, then all 
+    ** required callbacks have been made. In this case exit early.
+    **
+    ** Similarly, if this is a search for an exact match, and the first term
+    ** of segment apSegment[0] is not a match, exit early.
+    */
+    if( pFilter->zTerm && !isScan ){
+      if( pCsr->nTerm<pFilter->nTerm 
+       || (!isPrefix && pCsr->nTerm>pFilter->nTerm)
+       || memcmp(pCsr->zTerm, pFilter->zTerm, pFilter->nTerm) 
+      ){
+        break;
+      }
+    }
+
+    nMerge = 1;
+    while( nMerge<nSegment 
+        && apSegment[nMerge]->aNode
+        && apSegment[nMerge]->nTerm==pCsr->nTerm 
+        && 0==memcmp(pCsr->zTerm, apSegment[nMerge]->zTerm, pCsr->nTerm)
+    ){
+      nMerge++;
+    }
+
+    assert( isIgnoreEmpty || (isRequirePos && !isColFilter) );
+    if( nMerge==1 && !isIgnoreEmpty ){
+      pCsr->aDoclist = apSegment[0]->aDoclist;
+      pCsr->nDoclist = apSegment[0]->nDoclist;
+      rc = SQLITE_ROW;
+    }else{
+      int nDoclist = 0;           /* Size of doclist */
+      sqlite3_int64 iPrev = 0;    /* Previous docid stored in doclist */
+
+      /* The current term of the first nMerge entries in the array
+      ** of Fts3SegReader objects is the same. The doclists must be merged
+      ** and a single term returned with the merged doclist.
+      */
+      for(i=0; i<nMerge; i++){
+        fts3SegReaderFirstDocid(apSegment[i]);
+      }
+      fts3SegReaderSort(apSegment, nMerge, nMerge, fts3SegReaderDoclistCmp);
+      while( apSegment[0]->pOffsetList ){
+        int j;                    /* Number of segments that share a docid */
+        char *pList;
+        int nList;
+        int nByte;
+        sqlite3_int64 iDocid = apSegment[0]->iDocid;
+        fts3SegReaderNextDocid(apSegment[0], &pList, &nList);
+        j = 1;
+        while( j<nMerge
+            && apSegment[j]->pOffsetList
+            && apSegment[j]->iDocid==iDocid
+        ){
+          fts3SegReaderNextDocid(apSegment[j], 0, 0);
+          j++;
+        }
+
+        if( isColFilter ){
+          fts3ColumnFilter(pFilter->iCol, &pList, &nList);
+        }
+
+        if( !isIgnoreEmpty || nList>0 ){
+          nByte = sqlite3Fts3VarintLen(iDocid-iPrev) + (isRequirePos?nList+1:0);
+          if( nDoclist+nByte>pCsr->nBuffer ){
+            char *aNew;
+            pCsr->nBuffer = (nDoclist+nByte)*2;
+            aNew = sqlite3_realloc(pCsr->aBuffer, pCsr->nBuffer);
+            if( !aNew ){
+              return SQLITE_NOMEM;
+            }
+            pCsr->aBuffer = aNew;
+          }
+          nDoclist += sqlite3Fts3PutVarint(
+              &pCsr->aBuffer[nDoclist], iDocid-iPrev
+          );
+          iPrev = iDocid;
+          if( isRequirePos ){
+            memcpy(&pCsr->aBuffer[nDoclist], pList, nList);
+            nDoclist += nList;
+            pCsr->aBuffer[nDoclist++] = '\0';
+          }
+        }
+
+        fts3SegReaderSort(apSegment, nMerge, j, fts3SegReaderDoclistCmp);
+      }
+      if( nDoclist>0 ){
+        pCsr->aDoclist = pCsr->aBuffer;
+        pCsr->nDoclist = nDoclist;
+        rc = SQLITE_ROW;
+      }
+    }
+    pCsr->nAdvance = nMerge;
+  }while( rc==SQLITE_OK );
+
+  return rc;
+}
+
+SQLITE_PRIVATE void sqlite3Fts3SegReaderFinish(
+  Fts3SegReaderCursor *pCsr       /* Cursor object */
+){
+  if( pCsr ){
+    int i;
+    for(i=0; i<pCsr->nSegment; i++){
+      sqlite3Fts3SegReaderFree(pCsr->apSegment[i]);
+    }
+    sqlite3_free(pCsr->apSegment);
+    sqlite3_free(pCsr->aBuffer);
+
+    pCsr->nSegment = 0;
+    pCsr->apSegment = 0;
+    pCsr->aBuffer = 0;
+  }
+}
+
+/*
+** Merge all level iLevel segments in the database into a single 
+** iLevel+1 segment. Or, if iLevel<0, merge all segments into a
+** single segment with a level equal to the numerically largest level 
+** currently present in the database.
+**
+** If this function is called with iLevel<0, but there is only one
+** segment in the database, SQLITE_DONE is returned immediately. 
+** Otherwise, if successful, SQLITE_OK is returned. If an error occurs, 
+** an SQLite error code is returned.
+*/
+static int fts3SegmentMerge(Fts3Table *p, int iLevel){
+  int rc;                         /* Return code */
+  int iIdx = 0;                   /* Index of new segment */
+  int iNewLevel = 0;              /* Level to create new segment at */
+  SegmentWriter *pWriter = 0;     /* Used to write the new, merged, segment */
+  Fts3SegFilter filter;           /* Segment term filter condition */
+  Fts3SegReaderCursor csr;        /* Cursor to iterate through level(s) */
+
+  rc = sqlite3Fts3SegReaderCursor(p, iLevel, 0, 0, 1, 0, &csr);
+  if( rc!=SQLITE_OK || csr.nSegment==0 ) goto finished;
+
+  if( iLevel==FTS3_SEGCURSOR_ALL ){
+    /* This call is to merge all segments in the database to a single
+    ** segment. The level of the new segment is equal to the the numerically 
+    ** greatest segment level currently present in the database. The index
+    ** of the new segment is always 0.  */
+    int nDummy; /* TODO: Remove this */
+    if( csr.nSegment==1 ){
+      rc = SQLITE_DONE;
+      goto finished;
+    }
+    rc = fts3SegmentCountMax(p, &nDummy, &iNewLevel);
+  }else{
+    /* This call is to merge all segments at level iLevel. Find the next
+    ** available segment index at level iLevel+1. The call to
+    ** fts3AllocateSegdirIdx() will merge the segments at level iLevel+1 to 
+    ** a single iLevel+2 segment if necessary.  */
+    iNewLevel = iLevel+1;
+    rc = fts3AllocateSegdirIdx(p, iNewLevel, &iIdx);
+  }
+  if( rc!=SQLITE_OK ) goto finished;
+  assert( csr.nSegment>0 );
+  assert( iNewLevel>=0 );
+
+  memset(&filter, 0, sizeof(Fts3SegFilter));
+  filter.flags = FTS3_SEGMENT_REQUIRE_POS;
+  filter.flags |= (iLevel==FTS3_SEGCURSOR_ALL ? FTS3_SEGMENT_IGNORE_EMPTY : 0);
+
+  rc = sqlite3Fts3SegReaderStart(p, &csr, &filter);
+  while( SQLITE_OK==rc ){
+    rc = sqlite3Fts3SegReaderStep(p, &csr);
+    if( rc!=SQLITE_ROW ) break;
+    rc = fts3SegWriterAdd(p, &pWriter, 1, 
+        csr.zTerm, csr.nTerm, csr.aDoclist, csr.nDoclist);
+  }
+  if( rc!=SQLITE_OK ) goto finished;
+  assert( pWriter );
+
+  rc = fts3DeleteSegdir(p, iLevel, csr.apSegment, csr.nSegment);
+  if( rc!=SQLITE_OK ) goto finished;
+  rc = fts3SegWriterFlush(p, pWriter, iNewLevel, iIdx);
+
+ finished:
+  fts3SegWriterFree(pWriter);
+  sqlite3Fts3SegReaderFinish(&csr);
+  return rc;
+}
+
+
+/* 
+** Flush the contents of pendingTerms to a level 0 segment.
+*/
+SQLITE_PRIVATE int sqlite3Fts3PendingTermsFlush(Fts3Table *p){
+  return fts3SegmentMerge(p, FTS3_SEGCURSOR_PENDING);
+}
+
+/*
+** Encode N integers as varints into a blob.
+*/
+static void fts3EncodeIntArray(
+  int N,             /* The number of integers to encode */
+  u32 *a,            /* The integer values */
+  char *zBuf,        /* Write the BLOB here */
+  int *pNBuf         /* Write number of bytes if zBuf[] used here */
+){
+  int i, j;
+  for(i=j=0; i<N; i++){
+    j += sqlite3Fts3PutVarint(&zBuf[j], (sqlite3_int64)a[i]);
+  }
+  *pNBuf = j;
+}
+
+/*
+** Decode a blob of varints into N integers
+*/
+static void fts3DecodeIntArray(
+  int N,             /* The number of integers to decode */
+  u32 *a,            /* Write the integer values */
+  const char *zBuf,  /* The BLOB containing the varints */
+  int nBuf           /* size of the BLOB */
+){
+  int i, j;
+  UNUSED_PARAMETER(nBuf);
+  for(i=j=0; i<N; i++){
+    sqlite3_int64 x;
+    j += sqlite3Fts3GetVarint(&zBuf[j], &x);
+    assert(j<=nBuf);
+    a[i] = (u32)(x & 0xffffffff);
+  }
+}
+
+/*
+** Insert the sizes (in tokens) for each column of the document
+** with docid equal to p->iPrevDocid.  The sizes are encoded as
+** a blob of varints.
+*/
+static void fts3InsertDocsize(
+  int *pRC,         /* Result code */
+  Fts3Table *p,     /* Table into which to insert */
+  u32 *aSz          /* Sizes of each column */
+){
+  char *pBlob;             /* The BLOB encoding of the document size */
+  int nBlob;               /* Number of bytes in the BLOB */
+  sqlite3_stmt *pStmt;     /* Statement used to insert the encoding */
+  int rc;                  /* Result code from subfunctions */
+
+  if( *pRC ) return;
+  pBlob = sqlite3_malloc( 10*p->nColumn );
+  if( pBlob==0 ){
+    *pRC = SQLITE_NOMEM;
+    return;
+  }
+  fts3EncodeIntArray(p->nColumn, aSz, pBlob, &nBlob);
+  rc = fts3SqlStmt(p, SQL_REPLACE_DOCSIZE, &pStmt, 0);
+  if( rc ){
+    sqlite3_free(pBlob);
+    *pRC = rc;
+    return;
+  }
+  sqlite3_bind_int64(pStmt, 1, p->iPrevDocid);
+  sqlite3_bind_blob(pStmt, 2, pBlob, nBlob, sqlite3_free);
+  sqlite3_step(pStmt);
+  *pRC = sqlite3_reset(pStmt);
+}
+
+/*
+** Record 0 of the %_stat table contains a blob consisting of N varints,
+** where N is the number of user defined columns in the fts3 table plus
+** two. If nCol is the number of user defined columns, then values of the 
+** varints are set as follows:
+**
+**   Varint 0:       Total number of rows in the table.
+**
+**   Varint 1..nCol: For each column, the total number of tokens stored in
+**                   the column for all rows of the table.
+**
+**   Varint 1+nCol:  The total size, in bytes, of all text values in all
+**                   columns of all rows of the table.
+**
+*/
+static void fts3UpdateDocTotals(
+  int *pRC,                       /* The result code */
+  Fts3Table *p,                   /* Table being updated */
+  u32 *aSzIns,                    /* Size increases */
+  u32 *aSzDel,                    /* Size decreases */
+  int nChng                       /* Change in the number of documents */
+){
+  char *pBlob;             /* Storage for BLOB written into %_stat */
+  int nBlob;               /* Size of BLOB written into %_stat */
+  u32 *a;                  /* Array of integers that becomes the BLOB */
+  sqlite3_stmt *pStmt;     /* Statement for reading and writing */
+  int i;                   /* Loop counter */
+  int rc;                  /* Result code from subfunctions */
+
+  const int nStat = p->nColumn+2;
+
+  if( *pRC ) return;
+  a = sqlite3_malloc( (sizeof(u32)+10)*nStat );
+  if( a==0 ){
+    *pRC = SQLITE_NOMEM;
+    return;
+  }
+  pBlob = (char*)&a[nStat];
+  rc = fts3SqlStmt(p, SQL_SELECT_DOCTOTAL, &pStmt, 0);
+  if( rc ){
+    sqlite3_free(a);
+    *pRC = rc;
+    return;
+  }
+  if( sqlite3_step(pStmt)==SQLITE_ROW ){
+    fts3DecodeIntArray(nStat, a,
+         sqlite3_column_blob(pStmt, 0),
+         sqlite3_column_bytes(pStmt, 0));
+  }else{
+    memset(a, 0, sizeof(u32)*(nStat) );
+  }
+  sqlite3_reset(pStmt);
+  if( nChng<0 && a[0]<(u32)(-nChng) ){
+    a[0] = 0;
+  }else{
+    a[0] += nChng;
+  }
+  for(i=0; i<p->nColumn+1; i++){
+    u32 x = a[i+1];
+    if( x+aSzIns[i] < aSzDel[i] ){
+      x = 0;
+    }else{
+      x = x + aSzIns[i] - aSzDel[i];
+    }
+    a[i+1] = x;
+  }
+  fts3EncodeIntArray(nStat, a, pBlob, &nBlob);
+  rc = fts3SqlStmt(p, SQL_REPLACE_DOCTOTAL, &pStmt, 0);
+  if( rc ){
+    sqlite3_free(a);
+    *pRC = rc;
+    return;
+  }
+  sqlite3_bind_blob(pStmt, 1, pBlob, nBlob, SQLITE_STATIC);
+  sqlite3_step(pStmt);
+  *pRC = sqlite3_reset(pStmt);
+  sqlite3_free(a);
+}
+
+/*
+** Handle a 'special' INSERT of the form:
+**
+**   "INSERT INTO tbl(tbl) VALUES(<expr>)"
+**
+** Argument pVal contains the result of <expr>. Currently the only 
+** meaningful value to insert is the text 'optimize'.
+*/
+static int fts3SpecialInsert(Fts3Table *p, sqlite3_value *pVal){
+  int rc;                         /* Return Code */
+  const char *zVal = (const char *)sqlite3_value_text(pVal);
+  int nVal = sqlite3_value_bytes(pVal);
+
+  if( !zVal ){
+    return SQLITE_NOMEM;
+  }else if( nVal==8 && 0==sqlite3_strnicmp(zVal, "optimize", 8) ){
+    rc = fts3SegmentMerge(p, FTS3_SEGCURSOR_ALL);
+    if( rc==SQLITE_DONE ){
+      rc = SQLITE_OK;
+    }else{
+      sqlite3Fts3PendingTermsClear(p);
+    }
+#ifdef SQLITE_TEST
+  }else if( nVal>9 && 0==sqlite3_strnicmp(zVal, "nodesize=", 9) ){
+    p->nNodeSize = atoi(&zVal[9]);
+    rc = SQLITE_OK;
+  }else if( nVal>11 && 0==sqlite3_strnicmp(zVal, "maxpending=", 9) ){
+    p->nMaxPendingData = atoi(&zVal[11]);
+    rc = SQLITE_OK;
+#endif
+  }else{
+    rc = SQLITE_ERROR;
+  }
+
+  sqlite3Fts3SegmentsClose(p);
+  return rc;
+}
+
+/*
+** Return the deferred doclist associated with deferred token pDeferred.
+** This function assumes that sqlite3Fts3CacheDeferredDoclists() has already
+** been called to allocate and populate the doclist.
+*/
+SQLITE_PRIVATE char *sqlite3Fts3DeferredDoclist(Fts3DeferredToken *pDeferred, int *pnByte){
+  if( pDeferred->pList ){
+    *pnByte = pDeferred->pList->nData;
+    return pDeferred->pList->aData;
+  }
+  *pnByte = 0;
+  return 0;
+}
+
+/*
+** Helper fucntion for FreeDeferredDoclists(). This function removes all
+** references to deferred doclists from within the tree of Fts3Expr 
+** structures headed by 
+*/
+static void fts3DeferredDoclistClear(Fts3Expr *pExpr){
+  if( pExpr ){
+    fts3DeferredDoclistClear(pExpr->pLeft);
+    fts3DeferredDoclistClear(pExpr->pRight);
+    if( pExpr->isLoaded ){
+      sqlite3_free(pExpr->aDoclist);
+      pExpr->isLoaded = 0;
+      pExpr->aDoclist = 0;
+      pExpr->nDoclist = 0;
+      pExpr->pCurrent = 0;
+      pExpr->iCurrent = 0;
+    }
+  }
+}
+
+/*
+** Delete all cached deferred doclists. Deferred doclists are cached
+** (allocated) by the sqlite3Fts3CacheDeferredDoclists() function.
+*/
+SQLITE_PRIVATE void sqlite3Fts3FreeDeferredDoclists(Fts3Cursor *pCsr){
+  Fts3DeferredToken *pDef;
+  for(pDef=pCsr->pDeferred; pDef; pDef=pDef->pNext){
+    sqlite3_free(pDef->pList);
+    pDef->pList = 0;
+  }
+  if( pCsr->pDeferred ){
+    fts3DeferredDoclistClear(pCsr->pExpr);
+  }
+}
+
+/*
+** Free all entries in the pCsr->pDeffered list. Entries are added to 
+** this list using sqlite3Fts3DeferToken().
+*/
+SQLITE_PRIVATE void sqlite3Fts3FreeDeferredTokens(Fts3Cursor *pCsr){
+  Fts3DeferredToken *pDef;
+  Fts3DeferredToken *pNext;
+  for(pDef=pCsr->pDeferred; pDef; pDef=pNext){
+    pNext = pDef->pNext;
+    sqlite3_free(pDef->pList);
+    sqlite3_free(pDef);
+  }
+  pCsr->pDeferred = 0;
+}
+
+/*
+** Generate deferred-doclists for all tokens in the pCsr->pDeferred list
+** based on the row that pCsr currently points to.
+**
+** A deferred-doclist is like any other doclist with position information
+** included, except that it only contains entries for a single row of the
+** table, not for all rows.
+*/
+SQLITE_PRIVATE int sqlite3Fts3CacheDeferredDoclists(Fts3Cursor *pCsr){
+  int rc = SQLITE_OK;             /* Return code */
+  if( pCsr->pDeferred ){
+    int i;                        /* Used to iterate through table columns */
+    sqlite3_int64 iDocid;         /* Docid of the row pCsr points to */
+    Fts3DeferredToken *pDef;      /* Used to iterate through deferred tokens */
+  
+    Fts3Table *p = (Fts3Table *)pCsr->base.pVtab;
+    sqlite3_tokenizer *pT = p->pTokenizer;
+    sqlite3_tokenizer_module const *pModule = pT->pModule;
+   
+    assert( pCsr->isRequireSeek==0 );
+    iDocid = sqlite3_column_int64(pCsr->pStmt, 0);
+  
+    for(i=0; i<p->nColumn && rc==SQLITE_OK; i++){
+      const char *zText = (const char *)sqlite3_column_text(pCsr->pStmt, i+1);
+      sqlite3_tokenizer_cursor *pTC = 0;
+  
+      rc = pModule->xOpen(pT, zText, -1, &pTC);
+      while( rc==SQLITE_OK ){
+        char const *zToken;       /* Buffer containing token */
+        int nToken;               /* Number of bytes in token */
+        int iDum1, iDum2;         /* Dummy variables */
+        int iPos;                 /* Position of token in zText */
+  
+        pTC->pTokenizer = pT;
+        rc = pModule->xNext(pTC, &zToken, &nToken, &iDum1, &iDum2, &iPos);
+        for(pDef=pCsr->pDeferred; pDef && rc==SQLITE_OK; pDef=pDef->pNext){
+          Fts3PhraseToken *pPT = pDef->pToken;
+          if( (pDef->iCol>=p->nColumn || pDef->iCol==i)
+           && (pPT->n==nToken || (pPT->isPrefix && pPT->n<nToken))
+           && (0==memcmp(zToken, pPT->z, pPT->n))
+          ){
+            fts3PendingListAppend(&pDef->pList, iDocid, i, iPos, &rc);
+          }
+        }
+      }
+      if( pTC ) pModule->xClose(pTC);
+      if( rc==SQLITE_DONE ) rc = SQLITE_OK;
+    }
+  
+    for(pDef=pCsr->pDeferred; pDef && rc==SQLITE_OK; pDef=pDef->pNext){
+      if( pDef->pList ){
+        rc = fts3PendingListAppendVarint(&pDef->pList, 0);
+      }
+    }
+  }
+
+  return rc;
+}
+
+/*
+** Add an entry for token pToken to the pCsr->pDeferred list.
+*/
+SQLITE_PRIVATE int sqlite3Fts3DeferToken(
+  Fts3Cursor *pCsr,               /* Fts3 table cursor */
+  Fts3PhraseToken *pToken,        /* Token to defer */
+  int iCol                        /* Column that token must appear in (or -1) */
+){
+  Fts3DeferredToken *pDeferred;
+  pDeferred = sqlite3_malloc(sizeof(*pDeferred));
+  if( !pDeferred ){
+    return SQLITE_NOMEM;
+  }
+  memset(pDeferred, 0, sizeof(*pDeferred));
+  pDeferred->pToken = pToken;
+  pDeferred->pNext = pCsr->pDeferred; 
+  pDeferred->iCol = iCol;
+  pCsr->pDeferred = pDeferred;
+
+  assert( pToken->pDeferred==0 );
+  pToken->pDeferred = pDeferred;
+
+  return SQLITE_OK;
+}
+
+
+/*
+** This function does the work for the xUpdate method of FTS3 virtual
+** tables.
+*/
+SQLITE_PRIVATE int sqlite3Fts3UpdateMethod(
+  sqlite3_vtab *pVtab,            /* FTS3 vtab object */
+  int nArg,                       /* Size of argument array */
+  sqlite3_value **apVal,          /* Array of arguments */
+  sqlite_int64 *pRowid            /* OUT: The affected (or effected) rowid */
+){
+  Fts3Table *p = (Fts3Table *)pVtab;
+  int rc = SQLITE_OK;             /* Return Code */
+  int isRemove = 0;               /* True for an UPDATE or DELETE */
+  sqlite3_int64 iRemove = 0;      /* Rowid removed by UPDATE or DELETE */
+  u32 *aSzIns;                    /* Sizes of inserted documents */
+  u32 *aSzDel;                    /* Sizes of deleted documents */
+  int nChng = 0;                  /* Net change in number of documents */
+
+  assert( p->pSegments==0 );
+
+  /* Allocate space to hold the change in document sizes */
+  aSzIns = sqlite3_malloc( sizeof(aSzIns[0])*(p->nColumn+1)*2 );
+  if( aSzIns==0 ) return SQLITE_NOMEM;
+  aSzDel = &aSzIns[p->nColumn+1];
+  memset(aSzIns, 0, sizeof(aSzIns[0])*(p->nColumn+1)*2);
+
+  /* If this is a DELETE or UPDATE operation, remove the old record. */
+  if( sqlite3_value_type(apVal[0])!=SQLITE_NULL ){
+    int isEmpty = 0;
+    rc = fts3IsEmpty(p, apVal, &isEmpty);
+    if( rc==SQLITE_OK ){
+      if( isEmpty ){
+        /* Deleting this row means the whole table is empty. In this case
+        ** delete the contents of all three tables and throw away any
+        ** data in the pendingTerms hash table.
+        */
+        rc = fts3DeleteAll(p);
+      }else{
+        isRemove = 1;
+        iRemove = sqlite3_value_int64(apVal[0]);
+        rc = fts3PendingTermsDocid(p, iRemove);
+        fts3DeleteTerms(&rc, p, apVal, aSzDel);
+        fts3SqlExec(&rc, p, SQL_DELETE_CONTENT, apVal);
+        if( p->bHasDocsize ){
+          fts3SqlExec(&rc, p, SQL_DELETE_DOCSIZE, apVal);
+        }
+        nChng--;
+      }
+    }
+  }else if( sqlite3_value_type(apVal[p->nColumn+2])!=SQLITE_NULL ){
+    sqlite3_free(aSzIns);
+    return fts3SpecialInsert(p, apVal[p->nColumn+2]);
+  }
+  
+  /* If this is an INSERT or UPDATE operation, insert the new record. */
+  if( nArg>1 && rc==SQLITE_OK ){
+    rc = fts3InsertData(p, apVal, pRowid);
+    if( rc==SQLITE_OK && (!isRemove || *pRowid!=iRemove) ){
+      rc = fts3PendingTermsDocid(p, *pRowid);
+    }
+    if( rc==SQLITE_OK ){
+      rc = fts3InsertTerms(p, apVal, aSzIns);
+    }
+    if( p->bHasDocsize ){
+      fts3InsertDocsize(&rc, p, aSzIns);
+    }
+    nChng++;
+  }
+
+  if( p->bHasStat ){
+    fts3UpdateDocTotals(&rc, p, aSzIns, aSzDel, nChng);
+  }
+
+  sqlite3_free(aSzIns);
+  sqlite3Fts3SegmentsClose(p);
+  return rc;
+}
+
+/* 
+** Flush any data in the pending-terms hash table to disk. If successful,
+** merge all segments in the database (including the new segment, if 
+** there was any data to flush) into a single segment. 
+*/
+SQLITE_PRIVATE int sqlite3Fts3Optimize(Fts3Table *p){
+  int rc;
+  rc = sqlite3_exec(p->db, "SAVEPOINT fts3", 0, 0, 0);
+  if( rc==SQLITE_OK ){
+    rc = fts3SegmentMerge(p, FTS3_SEGCURSOR_ALL);
+    if( rc==SQLITE_OK ){
+      rc = sqlite3_exec(p->db, "RELEASE fts3", 0, 0, 0);
+      if( rc==SQLITE_OK ){
+        sqlite3Fts3PendingTermsClear(p);
+      }
+    }else{
+      sqlite3_exec(p->db, "ROLLBACK TO fts3", 0, 0, 0);
+      sqlite3_exec(p->db, "RELEASE fts3", 0, 0, 0);
+    }
+  }
+  sqlite3Fts3SegmentsClose(p);
+  return rc;
+}
+
+#endif
+
+/************** End of fts3_write.c ******************************************/
+/************** Begin file fts3_snippet.c ************************************/
+/*
+** 2009 Oct 23
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+******************************************************************************
+*/
+
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+
+
+/*
+** Characters that may appear in the second argument to matchinfo().
+*/
+#define FTS3_MATCHINFO_NPHRASE   'p'        /* 1 value */
+#define FTS3_MATCHINFO_NCOL      'c'        /* 1 value */
+#define FTS3_MATCHINFO_NDOC      'n'        /* 1 value */
+#define FTS3_MATCHINFO_AVGLENGTH 'a'        /* nCol values */
+#define FTS3_MATCHINFO_LENGTH    'l'        /* nCol values */
+#define FTS3_MATCHINFO_LCS       's'        /* nCol values */
+#define FTS3_MATCHINFO_HITS      'x'        /* 3*nCol*nPhrase values */
+
+/*
+** The default value for the second argument to matchinfo(). 
+*/
+#define FTS3_MATCHINFO_DEFAULT   "pcx"
+
+
+/*
+** Used as an fts3ExprIterate() context when loading phrase doclists to
+** Fts3Expr.aDoclist[]/nDoclist.
+*/
+typedef struct LoadDoclistCtx LoadDoclistCtx;
+struct LoadDoclistCtx {
+  Fts3Cursor *pCsr;               /* FTS3 Cursor */
+  int nPhrase;                    /* Number of phrases seen so far */
+  int nToken;                     /* Number of tokens seen so far */
+};
+
+/*
+** The following types are used as part of the implementation of the 
+** fts3BestSnippet() routine.
+*/
+typedef struct SnippetIter SnippetIter;
+typedef struct SnippetPhrase SnippetPhrase;
+typedef struct SnippetFragment SnippetFragment;
+
+struct SnippetIter {
+  Fts3Cursor *pCsr;               /* Cursor snippet is being generated from */
+  int iCol;                       /* Extract snippet from this column */
+  int nSnippet;                   /* Requested snippet length (in tokens) */
+  int nPhrase;                    /* Number of phrases in query */
+  SnippetPhrase *aPhrase;         /* Array of size nPhrase */
+  int iCurrent;                   /* First token of current snippet */
+};
+
+struct SnippetPhrase {
+  int nToken;                     /* Number of tokens in phrase */
+  char *pList;                    /* Pointer to start of phrase position list */
+  int iHead;                      /* Next value in position list */
+  char *pHead;                    /* Position list data following iHead */
+  int iTail;                      /* Next value in trailing position list */
+  char *pTail;                    /* Position list data following iTail */
+};
+
+struct SnippetFragment {
+  int iCol;                       /* Column snippet is extracted from */
+  int iPos;                       /* Index of first token in snippet */
+  u64 covered;                    /* Mask of query phrases covered */
+  u64 hlmask;                     /* Mask of snippet terms to highlight */
+};
+
+/*
+** This type is used as an fts3ExprIterate() context object while 
+** accumulating the data returned by the matchinfo() function.
+*/
+typedef struct MatchInfo MatchInfo;
+struct MatchInfo {
+  Fts3Cursor *pCursor;            /* FTS3 Cursor */
+  int nCol;                       /* Number of columns in table */
+  int nPhrase;                    /* Number of matchable phrases in query */
+  sqlite3_int64 nDoc;             /* Number of docs in database */
+  u32 *aMatchinfo;                /* Pre-allocated buffer */
+};
+
+
+
+/*
+** The snippet() and offsets() functions both return text values. An instance
+** of the following structure is used to accumulate those values while the
+** functions are running. See fts3StringAppend() for details.
+*/
+typedef struct StrBuffer StrBuffer;
+struct StrBuffer {
+  char *z;                        /* Pointer to buffer containing string */
+  int n;                          /* Length of z in bytes (excl. nul-term) */
+  int nAlloc;                     /* Allocated size of buffer z in bytes */
+};
+
+
+/*
+** This function is used to help iterate through a position-list. A position
+** list is a list of unique integers, sorted from smallest to largest. Each
+** element of the list is represented by an FTS3 varint that takes the value
+** of the difference between the current element and the previous one plus
+** two. For example, to store the position-list:
+**
+**     4 9 113
+**
+** the three varints:
+**
+**     6 7 106
+**
+** are encoded.
+**
+** When this function is called, *pp points to the start of an element of
+** the list. *piPos contains the value of the previous entry in the list.
+** After it returns, *piPos contains the value of the next element of the
+** list and *pp is advanced to the following varint.
+*/
+static void fts3GetDeltaPosition(char **pp, int *piPos){
+  int iVal;
+  *pp += sqlite3Fts3GetVarint32(*pp, &iVal);
+  *piPos += (iVal-2);
+}
+
+/*
+** Helper function for fts3ExprIterate() (see below).
+*/
+static int fts3ExprIterate2(
+  Fts3Expr *pExpr,                /* Expression to iterate phrases of */
+  int *piPhrase,                  /* Pointer to phrase counter */
+  int (*x)(Fts3Expr*,int,void*),  /* Callback function to invoke for phrases */
+  void *pCtx                      /* Second argument to pass to callback */
+){
+  int rc;                         /* Return code */
+  int eType = pExpr->eType;       /* Type of expression node pExpr */
+
+  if( eType!=FTSQUERY_PHRASE ){
+    assert( pExpr->pLeft && pExpr->pRight );
+    rc = fts3ExprIterate2(pExpr->pLeft, piPhrase, x, pCtx);
+    if( rc==SQLITE_OK && eType!=FTSQUERY_NOT ){
+      rc = fts3ExprIterate2(pExpr->pRight, piPhrase, x, pCtx);
+    }
+  }else{
+    rc = x(pExpr, *piPhrase, pCtx);
+    (*piPhrase)++;
+  }
+  return rc;
+}
+
+/*
+** Iterate through all phrase nodes in an FTS3 query, except those that
+** are part of a sub-tree that is the right-hand-side of a NOT operator.
+** For each phrase node found, the supplied callback function is invoked.
+**
+** If the callback function returns anything other than SQLITE_OK, 
+** the iteration is abandoned and the error code returned immediately.
+** Otherwise, SQLITE_OK is returned after a callback has been made for
+** all eligible phrase nodes.
+*/
+static int fts3ExprIterate(
+  Fts3Expr *pExpr,                /* Expression to iterate phrases of */
+  int (*x)(Fts3Expr*,int,void*),  /* Callback function to invoke for phrases */
+  void *pCtx                      /* Second argument to pass to callback */
+){
+  int iPhrase = 0;                /* Variable used as the phrase counter */
+  return fts3ExprIterate2(pExpr, &iPhrase, x, pCtx);
+}
+
+/*
+** The argument to this function is always a phrase node. Its doclist 
+** (Fts3Expr.aDoclist[]) and the doclists associated with all phrase nodes
+** to the left of this one in the query tree have already been loaded.
+**
+** If this phrase node is part of a series of phrase nodes joined by 
+** NEAR operators (and is not the left-most of said series), then elements are
+** removed from the phrases doclist consistent with the NEAR restriction. If
+** required, elements may be removed from the doclists of phrases to the
+** left of this one that are part of the same series of NEAR operator 
+** connected phrases.
+**
+** If an OOM error occurs, SQLITE_NOMEM is returned. Otherwise, SQLITE_OK.
+*/
+static int fts3ExprNearTrim(Fts3Expr *pExpr){
+  int rc = SQLITE_OK;
+  Fts3Expr *pParent = pExpr->pParent;
+
+  assert( pExpr->eType==FTSQUERY_PHRASE );
+  while( rc==SQLITE_OK
+   && pParent 
+   && pParent->eType==FTSQUERY_NEAR 
+   && pParent->pRight==pExpr 
+  ){
+    /* This expression (pExpr) is the right-hand-side of a NEAR operator. 
+    ** Find the expression to the left of the same operator.
+    */
+    int nNear = pParent->nNear;
+    Fts3Expr *pLeft = pParent->pLeft;
+
+    if( pLeft->eType!=FTSQUERY_PHRASE ){
+      assert( pLeft->eType==FTSQUERY_NEAR );
+      assert( pLeft->pRight->eType==FTSQUERY_PHRASE );
+      pLeft = pLeft->pRight;
+    }
+
+    rc = sqlite3Fts3ExprNearTrim(pLeft, pExpr, nNear);
+
+    pExpr = pLeft;
+    pParent = pExpr->pParent;
+  }
+
+  return rc;
+}
+
+/*
+** This is an fts3ExprIterate() callback used while loading the doclists
+** for each phrase into Fts3Expr.aDoclist[]/nDoclist. See also
+** fts3ExprLoadDoclists().
+*/
+static int fts3ExprLoadDoclistsCb(Fts3Expr *pExpr, int iPhrase, void *ctx){
+  int rc = SQLITE_OK;
+  LoadDoclistCtx *p = (LoadDoclistCtx *)ctx;
+
+  UNUSED_PARAMETER(iPhrase);
+
+  p->nPhrase++;
+  p->nToken += pExpr->pPhrase->nToken;
+
+  if( pExpr->isLoaded==0 ){
+    rc = sqlite3Fts3ExprLoadDoclist(p->pCsr, pExpr);
+    pExpr->isLoaded = 1;
+    if( rc==SQLITE_OK ){
+      rc = fts3ExprNearTrim(pExpr);
+    }
+  }
+
+  return rc;
+}
+
+/*
+** Load the doclists for each phrase in the query associated with FTS3 cursor
+** pCsr. 
+**
+** If pnPhrase is not NULL, then *pnPhrase is set to the number of matchable 
+** phrases in the expression (all phrases except those directly or 
+** indirectly descended from the right-hand-side of a NOT operator). If 
+** pnToken is not NULL, then it is set to the number of tokens in all
+** matchable phrases of the expression.
+*/
+static int fts3ExprLoadDoclists(
+  Fts3Cursor *pCsr,               /* Fts3 cursor for current query */
+  int *pnPhrase,                  /* OUT: Number of phrases in query */
+  int *pnToken                    /* OUT: Number of tokens in query */
+){
+  int rc;                         /* Return Code */
+  LoadDoclistCtx sCtx = {0,0,0};  /* Context for fts3ExprIterate() */
+  sCtx.pCsr = pCsr;
+  rc = fts3ExprIterate(pCsr->pExpr, fts3ExprLoadDoclistsCb, (void *)&sCtx);
+  if( pnPhrase ) *pnPhrase = sCtx.nPhrase;
+  if( pnToken ) *pnToken = sCtx.nToken;
+  return rc;
+}
+
+static int fts3ExprPhraseCountCb(Fts3Expr *pExpr, int iPhrase, void *ctx){
+  (*(int *)ctx)++;
+  UNUSED_PARAMETER(pExpr);
+  UNUSED_PARAMETER(iPhrase);
+  return SQLITE_OK;
+}
+static int fts3ExprPhraseCount(Fts3Expr *pExpr){
+  int nPhrase = 0;
+  (void)fts3ExprIterate(pExpr, fts3ExprPhraseCountCb, (void *)&nPhrase);
+  return nPhrase;
+}
+
+/*
+** Advance the position list iterator specified by the first two 
+** arguments so that it points to the first element with a value greater
+** than or equal to parameter iNext.
+*/
+static void fts3SnippetAdvance(char **ppIter, int *piIter, int iNext){
+  char *pIter = *ppIter;
+  if( pIter ){
+    int iIter = *piIter;
+
+    while( iIter<iNext ){
+      if( 0==(*pIter & 0xFE) ){
+        iIter = -1;
+        pIter = 0;
+        break;
+      }
+      fts3GetDeltaPosition(&pIter, &iIter);
+    }
+
+    *piIter = iIter;
+    *ppIter = pIter;
+  }
+}
+
+/*
+** Advance the snippet iterator to the next candidate snippet.
+*/
+static int fts3SnippetNextCandidate(SnippetIter *pIter){
+  int i;                          /* Loop counter */
+
+  if( pIter->iCurrent<0 ){
+    /* The SnippetIter object has just been initialized. The first snippet
+    ** candidate always starts at offset 0 (even if this candidate has a
+    ** score of 0.0).
+    */
+    pIter->iCurrent = 0;
+
+    /* Advance the 'head' iterator of each phrase to the first offset that
+    ** is greater than or equal to (iNext+nSnippet).
+    */
+    for(i=0; i<pIter->nPhrase; i++){
+      SnippetPhrase *pPhrase = &pIter->aPhrase[i];
+      fts3SnippetAdvance(&pPhrase->pHead, &pPhrase->iHead, pIter->nSnippet);
+    }
+  }else{
+    int iStart;
+    int iEnd = 0x7FFFFFFF;
+
+    for(i=0; i<pIter->nPhrase; i++){
+      SnippetPhrase *pPhrase = &pIter->aPhrase[i];
+      if( pPhrase->pHead && pPhrase->iHead<iEnd ){
+        iEnd = pPhrase->iHead;
+      }
+    }
+    if( iEnd==0x7FFFFFFF ){
+      return 1;
+    }
+
+    pIter->iCurrent = iStart = iEnd - pIter->nSnippet + 1;
+    for(i=0; i<pIter->nPhrase; i++){
+      SnippetPhrase *pPhrase = &pIter->aPhrase[i];
+      fts3SnippetAdvance(&pPhrase->pHead, &pPhrase->iHead, iEnd+1);
+      fts3SnippetAdvance(&pPhrase->pTail, &pPhrase->iTail, iStart);
+    }
+  }
+
+  return 0;
+}
+
+/*
+** Retrieve information about the current candidate snippet of snippet 
+** iterator pIter.
+*/
+static void fts3SnippetDetails(
+  SnippetIter *pIter,             /* Snippet iterator */
+  u64 mCovered,                   /* Bitmask of phrases already covered */
+  int *piToken,                   /* OUT: First token of proposed snippet */
+  int *piScore,                   /* OUT: "Score" for this snippet */
+  u64 *pmCover,                   /* OUT: Bitmask of phrases covered */
+  u64 *pmHighlight                /* OUT: Bitmask of terms to highlight */
+){
+  int iStart = pIter->iCurrent;   /* First token of snippet */
+  int iScore = 0;                 /* Score of this snippet */
+  int i;                          /* Loop counter */
+  u64 mCover = 0;                 /* Mask of phrases covered by this snippet */
+  u64 mHighlight = 0;             /* Mask of tokens to highlight in snippet */
+
+  for(i=0; i<pIter->nPhrase; i++){
+    SnippetPhrase *pPhrase = &pIter->aPhrase[i];
+    if( pPhrase->pTail ){
+      char *pCsr = pPhrase->pTail;
+      int iCsr = pPhrase->iTail;
+
+      while( iCsr<(iStart+pIter->nSnippet) ){
+        int j;
+        u64 mPhrase = (u64)1 << i;
+        u64 mPos = (u64)1 << (iCsr - iStart);
+        assert( iCsr>=iStart );
+        if( (mCover|mCovered)&mPhrase ){
+          iScore++;
+        }else{
+          iScore += 1000;
+        }
+        mCover |= mPhrase;
+
+        for(j=0; j<pPhrase->nToken; j++){
+          mHighlight |= (mPos>>j);
+        }
+
+        if( 0==(*pCsr & 0x0FE) ) break;
+        fts3GetDeltaPosition(&pCsr, &iCsr);
+      }
+    }
+  }
+
+  /* Set the output variables before returning. */
+  *piToken = iStart;
+  *piScore = iScore;
+  *pmCover = mCover;
+  *pmHighlight = mHighlight;
+}
+
+/*
+** This function is an fts3ExprIterate() callback used by fts3BestSnippet().
+** Each invocation populates an element of the SnippetIter.aPhrase[] array.
+*/
+static int fts3SnippetFindPositions(Fts3Expr *pExpr, int iPhrase, void *ctx){
+  SnippetIter *p = (SnippetIter *)ctx;
+  SnippetPhrase *pPhrase = &p->aPhrase[iPhrase];
+  char *pCsr;
+
+  pPhrase->nToken = pExpr->pPhrase->nToken;
+
+  pCsr = sqlite3Fts3FindPositions(pExpr, p->pCsr->iPrevId, p->iCol);
+  if( pCsr ){
+    int iFirst = 0;
+    pPhrase->pList = pCsr;
+    fts3GetDeltaPosition(&pCsr, &iFirst);
+    pPhrase->pHead = pCsr;
+    pPhrase->pTail = pCsr;
+    pPhrase->iHead = iFirst;
+    pPhrase->iTail = iFirst;
+  }else{
+    assert( pPhrase->pList==0 && pPhrase->pHead==0 && pPhrase->pTail==0 );
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** Select the fragment of text consisting of nFragment contiguous tokens 
+** from column iCol that represent the "best" snippet. The best snippet
+** is the snippet with the highest score, where scores are calculated
+** by adding:
+**
+**   (a) +1 point for each occurence of a matchable phrase in the snippet.
+**
+**   (b) +1000 points for the first occurence of each matchable phrase in 
+**       the snippet for which the corresponding mCovered bit is not set.
+**
+** The selected snippet parameters are stored in structure *pFragment before
+** returning. The score of the selected snippet is stored in *piScore
+** before returning.
+*/
+static int fts3BestSnippet(
+  int nSnippet,                   /* Desired snippet length */
+  Fts3Cursor *pCsr,               /* Cursor to create snippet for */
+  int iCol,                       /* Index of column to create snippet from */
+  u64 mCovered,                   /* Mask of phrases already covered */
+  u64 *pmSeen,                    /* IN/OUT: Mask of phrases seen */
+  SnippetFragment *pFragment,     /* OUT: Best snippet found */
+  int *piScore                    /* OUT: Score of snippet pFragment */
+){
+  int rc;                         /* Return Code */
+  int nList;                      /* Number of phrases in expression */
+  SnippetIter sIter;              /* Iterates through snippet candidates */
+  int nByte;                      /* Number of bytes of space to allocate */
+  int iBestScore = -1;            /* Best snippet score found so far */
+  int i;                          /* Loop counter */
+
+  memset(&sIter, 0, sizeof(sIter));
+
+  /* Iterate through the phrases in the expression to count them. The same
+  ** callback makes sure the doclists are loaded for each phrase.
+  */
+  rc = fts3ExprLoadDoclists(pCsr, &nList, 0);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+
+  /* Now that it is known how many phrases there are, allocate and zero
+  ** the required space using malloc().
+  */
+  nByte = sizeof(SnippetPhrase) * nList;
+  sIter.aPhrase = (SnippetPhrase *)sqlite3_malloc(nByte);
+  if( !sIter.aPhrase ){
+    return SQLITE_NOMEM;
+  }
+  memset(sIter.aPhrase, 0, nByte);
+
+  /* Initialize the contents of the SnippetIter object. Then iterate through
+  ** the set of phrases in the expression to populate the aPhrase[] array.
+  */
+  sIter.pCsr = pCsr;
+  sIter.iCol = iCol;
+  sIter.nSnippet = nSnippet;
+  sIter.nPhrase = nList;
+  sIter.iCurrent = -1;
+  (void)fts3ExprIterate(pCsr->pExpr, fts3SnippetFindPositions, (void *)&sIter);
+
+  /* Set the *pmSeen output variable. */
+  for(i=0; i<nList; i++){
+    if( sIter.aPhrase[i].pHead ){
+      *pmSeen |= (u64)1 << i;
+    }
+  }
+
+  /* Loop through all candidate snippets. Store the best snippet in 
+  ** *pFragment. Store its associated 'score' in iBestScore.
+  */
+  pFragment->iCol = iCol;
+  while( !fts3SnippetNextCandidate(&sIter) ){
+    int iPos;
+    int iScore;
+    u64 mCover;
+    u64 mHighlight;
+    fts3SnippetDetails(&sIter, mCovered, &iPos, &iScore, &mCover, &mHighlight);
+    assert( iScore>=0 );
+    if( iScore>iBestScore ){
+      pFragment->iPos = iPos;
+      pFragment->hlmask = mHighlight;
+      pFragment->covered = mCover;
+      iBestScore = iScore;
+    }
+  }
+
+  sqlite3_free(sIter.aPhrase);
+  *piScore = iBestScore;
+  return SQLITE_OK;
+}
+
+
+/*
+** Append a string to the string-buffer passed as the first argument.
+**
+** If nAppend is negative, then the length of the string zAppend is
+** determined using strlen().
+*/
+static int fts3StringAppend(
+  StrBuffer *pStr,                /* Buffer to append to */
+  const char *zAppend,            /* Pointer to data to append to buffer */
+  int nAppend                     /* Size of zAppend in bytes (or -1) */
+){
+  if( nAppend<0 ){
+    nAppend = (int)strlen(zAppend);
+  }
+
+  /* If there is insufficient space allocated at StrBuffer.z, use realloc()
+  ** to grow the buffer until so that it is big enough to accomadate the
+  ** appended data.
+  */
+  if( pStr->n+nAppend+1>=pStr->nAlloc ){
+    int nAlloc = pStr->nAlloc+nAppend+100;
+    char *zNew = sqlite3_realloc(pStr->z, nAlloc);
+    if( !zNew ){
+      return SQLITE_NOMEM;
+    }
+    pStr->z = zNew;
+    pStr->nAlloc = nAlloc;
+  }
+
+  /* Append the data to the string buffer. */
+  memcpy(&pStr->z[pStr->n], zAppend, nAppend);
+  pStr->n += nAppend;
+  pStr->z[pStr->n] = '\0';
+
+  return SQLITE_OK;
+}
+
+/*
+** The fts3BestSnippet() function often selects snippets that end with a
+** query term. That is, the final term of the snippet is always a term
+** that requires highlighting. For example, if 'X' is a highlighted term
+** and '.' is a non-highlighted term, BestSnippet() may select:
+**
+**     ........X.....X
+**
+** This function "shifts" the beginning of the snippet forward in the 
+** document so that there are approximately the same number of 
+** non-highlighted terms to the right of the final highlighted term as there
+** are to the left of the first highlighted term. For example, to this:
+**
+**     ....X.....X....
+**
+** This is done as part of extracting the snippet text, not when selecting
+** the snippet. Snippet selection is done based on doclists only, so there
+** is no way for fts3BestSnippet() to know whether or not the document 
+** actually contains terms that follow the final highlighted term. 
+*/
+static int fts3SnippetShift(
+  Fts3Table *pTab,                /* FTS3 table snippet comes from */
+  int nSnippet,                   /* Number of tokens desired for snippet */
+  const char *zDoc,               /* Document text to extract snippet from */
+  int nDoc,                       /* Size of buffer zDoc in bytes */
+  int *piPos,                     /* IN/OUT: First token of snippet */
+  u64 *pHlmask                    /* IN/OUT: Mask of tokens to highlight */
+){
+  u64 hlmask = *pHlmask;          /* Local copy of initial highlight-mask */
+
+  if( hlmask ){
+    int nLeft;                    /* Tokens to the left of first highlight */
+    int nRight;                   /* Tokens to the right of last highlight */
+    int nDesired;                 /* Ideal number of tokens to shift forward */
+
+    for(nLeft=0; !(hlmask & ((u64)1 << nLeft)); nLeft++);
+    for(nRight=0; !(hlmask & ((u64)1 << (nSnippet-1-nRight))); nRight++);
+    nDesired = (nLeft-nRight)/2;
+
+    /* Ideally, the start of the snippet should be pushed forward in the
+    ** document nDesired tokens. This block checks if there are actually
+    ** nDesired tokens to the right of the snippet. If so, *piPos and
+    ** *pHlMask are updated to shift the snippet nDesired tokens to the
+    ** right. Otherwise, the snippet is shifted by the number of tokens
+    ** available.
+    */
+    if( nDesired>0 ){
+      int nShift;                 /* Number of tokens to shift snippet by */
+      int iCurrent = 0;           /* Token counter */
+      int rc;                     /* Return Code */
+      sqlite3_tokenizer_module *pMod;
+      sqlite3_tokenizer_cursor *pC;
+      pMod = (sqlite3_tokenizer_module *)pTab->pTokenizer->pModule;
+
+      /* Open a cursor on zDoc/nDoc. Check if there are (nSnippet+nDesired)
+      ** or more tokens in zDoc/nDoc.
+      */
+      rc = pMod->xOpen(pTab->pTokenizer, zDoc, nDoc, &pC);
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+      pC->pTokenizer = pTab->pTokenizer;
+      while( rc==SQLITE_OK && iCurrent<(nSnippet+nDesired) ){
+        const char *ZDUMMY; int DUMMY1, DUMMY2, DUMMY3;
+        rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &DUMMY2, &DUMMY3, &iCurrent);
+      }
+      pMod->xClose(pC);
+      if( rc!=SQLITE_OK && rc!=SQLITE_DONE ){ return rc; }
+
+      nShift = (rc==SQLITE_DONE)+iCurrent-nSnippet;
+      assert( nShift<=nDesired );
+      if( nShift>0 ){
+        *piPos += nShift;
+        *pHlmask = hlmask >> nShift;
+      }
+    }
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Extract the snippet text for fragment pFragment from cursor pCsr and
+** append it to string buffer pOut.
+*/
+static int fts3SnippetText(
+  Fts3Cursor *pCsr,               /* FTS3 Cursor */
+  SnippetFragment *pFragment,     /* Snippet to extract */
+  int iFragment,                  /* Fragment number */
+  int isLast,                     /* True for final fragment in snippet */
+  int nSnippet,                   /* Number of tokens in extracted snippet */
+  const char *zOpen,              /* String inserted before highlighted term */
+  const char *zClose,             /* String inserted after highlighted term */
+  const char *zEllipsis,          /* String inserted between snippets */
+  StrBuffer *pOut                 /* Write output here */
+){
+  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
+  int rc;                         /* Return code */
+  const char *zDoc;               /* Document text to extract snippet from */
+  int nDoc;                       /* Size of zDoc in bytes */
+  int iCurrent = 0;               /* Current token number of document */
+  int iEnd = 0;                   /* Byte offset of end of current token */
+  int isShiftDone = 0;            /* True after snippet is shifted */
+  int iPos = pFragment->iPos;     /* First token of snippet */
+  u64 hlmask = pFragment->hlmask; /* Highlight-mask for snippet */
+  int iCol = pFragment->iCol+1;   /* Query column to extract text from */
+  sqlite3_tokenizer_module *pMod; /* Tokenizer module methods object */
+  sqlite3_tokenizer_cursor *pC;   /* Tokenizer cursor open on zDoc/nDoc */
+  const char *ZDUMMY;             /* Dummy argument used with tokenizer */
+  int DUMMY1;                     /* Dummy argument used with tokenizer */
+  
+  zDoc = (const char *)sqlite3_column_text(pCsr->pStmt, iCol);
+  if( zDoc==0 ){
+    if( sqlite3_column_type(pCsr->pStmt, iCol)!=SQLITE_NULL ){
+      return SQLITE_NOMEM;
+    }
+    return SQLITE_OK;
+  }
+  nDoc = sqlite3_column_bytes(pCsr->pStmt, iCol);
+
+  /* Open a token cursor on the document. */
+  pMod = (sqlite3_tokenizer_module *)pTab->pTokenizer->pModule;
+  rc = pMod->xOpen(pTab->pTokenizer, zDoc, nDoc, &pC);
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+  pC->pTokenizer = pTab->pTokenizer;
+
+  while( rc==SQLITE_OK ){
+    int iBegin;                   /* Offset in zDoc of start of token */
+    int iFin;                     /* Offset in zDoc of end of token */
+    int isHighlight;              /* True for highlighted terms */
+
+    rc = pMod->xNext(pC, &ZDUMMY, &DUMMY1, &iBegin, &iFin, &iCurrent);
+    if( rc!=SQLITE_OK ){
+      if( rc==SQLITE_DONE ){
+        /* Special case - the last token of the snippet is also the last token
+        ** of the column. Append any punctuation that occurred between the end
+        ** of the previous token and the end of the document to the output. 
+        ** Then break out of the loop. */
+        rc = fts3StringAppend(pOut, &zDoc[iEnd], -1);
+      }
+      break;
+    }
+    if( iCurrent<iPos ){ continue; }
+
+    if( !isShiftDone ){
+      int n = nDoc - iBegin;
+      rc = fts3SnippetShift(pTab, nSnippet, &zDoc[iBegin], n, &iPos, &hlmask);
+      isShiftDone = 1;
+
+      /* Now that the shift has been done, check if the initial "..." are
+      ** required. They are required if (a) this is not the first fragment,
+      ** or (b) this fragment does not begin at position 0 of its column. 
+      */
+      if( rc==SQLITE_OK && (iPos>0 || iFragment>0) ){
+        rc = fts3StringAppend(pOut, zEllipsis, -1);
+      }
+      if( rc!=SQLITE_OK || iCurrent<iPos ) continue;
+    }
+
+    if( iCurrent>=(iPos+nSnippet) ){
+      if( isLast ){
+        rc = fts3StringAppend(pOut, zEllipsis, -1);
+      }
+      break;
+    }
+
+    /* Set isHighlight to true if this term should be highlighted. */
+    isHighlight = (hlmask & ((u64)1 << (iCurrent-iPos)))!=0;
+
+    if( iCurrent>iPos ) rc = fts3StringAppend(pOut, &zDoc[iEnd], iBegin-iEnd);
+    if( rc==SQLITE_OK && isHighlight ) rc = fts3StringAppend(pOut, zOpen, -1);
+    if( rc==SQLITE_OK ) rc = fts3StringAppend(pOut, &zDoc[iBegin], iFin-iBegin);
+    if( rc==SQLITE_OK && isHighlight ) rc = fts3StringAppend(pOut, zClose, -1);
+
+    iEnd = iFin;
+  }
+
+  pMod->xClose(pC);
+  return rc;
+}
+
+
+/*
+** This function is used to count the entries in a column-list (a 
+** delta-encoded list of term offsets within a single column of a single 
+** row). When this function is called, *ppCollist should point to the
+** beginning of the first varint in the column-list (the varint that
+** contains the position of the first matching term in the column data).
+** Before returning, *ppCollist is set to point to the first byte after
+** the last varint in the column-list (either the 0x00 signifying the end
+** of the position-list, or the 0x01 that precedes the column number of
+** the next column in the position-list).
+**
+** The number of elements in the column-list is returned.
+*/
+static int fts3ColumnlistCount(char **ppCollist){
+  char *pEnd = *ppCollist;
+  char c = 0;
+  int nEntry = 0;
+
+  /* A column-list is terminated by either a 0x01 or 0x00. */
+  while( 0xFE & (*pEnd | c) ){
+    c = *pEnd++ & 0x80;
+    if( !c ) nEntry++;
+  }
+
+  *ppCollist = pEnd;
+  return nEntry;
+}
+
+static void fts3LoadColumnlistCounts(char **pp, u32 *aOut, int isGlobal){
+  char *pCsr = *pp;
+  while( *pCsr ){
+    int nHit;
+    sqlite3_int64 iCol = 0;
+    if( *pCsr==0x01 ){
+      pCsr++;
+      pCsr += sqlite3Fts3GetVarint(pCsr, &iCol);
+    }
+    nHit = fts3ColumnlistCount(&pCsr);
+    assert( nHit>0 );
+    if( isGlobal ){
+      aOut[iCol*3+1]++;
+    }
+    aOut[iCol*3] += nHit;
+  }
+  pCsr++;
+  *pp = pCsr;
+}
+
+/*
+** fts3ExprIterate() callback used to collect the "global" matchinfo stats
+** for a single query. 
+**
+** fts3ExprIterate() callback to load the 'global' elements of a
+** FTS3_MATCHINFO_HITS matchinfo array. The global stats are those elements 
+** of the matchinfo array that are constant for all rows returned by the 
+** current query.
+**
+** Argument pCtx is actually a pointer to a struct of type MatchInfo. This
+** function populates Matchinfo.aMatchinfo[] as follows:
+**
+**   for(iCol=0; iCol<nCol; iCol++){
+**     aMatchinfo[3*iPhrase*nCol + 3*iCol + 1] = X;
+**     aMatchinfo[3*iPhrase*nCol + 3*iCol + 2] = Y;
+**   }
+**
+** where X is the number of matches for phrase iPhrase is column iCol of all
+** rows of the table. Y is the number of rows for which column iCol contains
+** at least one instance of phrase iPhrase.
+**
+** If the phrase pExpr consists entirely of deferred tokens, then all X and
+** Y values are set to nDoc, where nDoc is the number of documents in the 
+** file system. This is done because the full-text index doclist is required
+** to calculate these values properly, and the full-text index doclist is
+** not available for deferred tokens.
+*/
+static int fts3ExprGlobalHitsCb(
+  Fts3Expr *pExpr,                /* Phrase expression node */
+  int iPhrase,                    /* Phrase number (numbered from zero) */
+  void *pCtx                      /* Pointer to MatchInfo structure */
+){
+  MatchInfo *p = (MatchInfo *)pCtx;
+  Fts3Cursor *pCsr = p->pCursor;
+  char *pIter;
+  char *pEnd;
+  char *pFree = 0;
+  u32 *aOut = &p->aMatchinfo[3*iPhrase*p->nCol];
+
+  assert( pExpr->isLoaded );
+  assert( pExpr->eType==FTSQUERY_PHRASE );
+
+  if( pCsr->pDeferred ){
+    Fts3Phrase *pPhrase = pExpr->pPhrase;
+    int ii;
+    for(ii=0; ii<pPhrase->nToken; ii++){
+      if( pPhrase->aToken[ii].bFulltext ) break;
+    }
+    if( ii<pPhrase->nToken ){
+      int nFree = 0;
+      int rc = sqlite3Fts3ExprLoadFtDoclist(pCsr, pExpr, &pFree, &nFree);
+      if( rc!=SQLITE_OK ) return rc;
+      pIter = pFree;
+      pEnd = &pFree[nFree];
+    }else{
+      int iCol;                   /* Column index */
+      for(iCol=0; iCol<p->nCol; iCol++){
+        aOut[iCol*3 + 1] = (u32)p->nDoc;
+        aOut[iCol*3 + 2] = (u32)p->nDoc;
+      }
+      return SQLITE_OK;
+    }
+  }else{
+    pIter = pExpr->aDoclist;
+    pEnd = &pExpr->aDoclist[pExpr->nDoclist];
+  }
+
+  /* Fill in the global hit count matrix row for this phrase. */
+  while( pIter<pEnd ){
+    while( *pIter++ & 0x80 );      /* Skip past docid. */
+    fts3LoadColumnlistCounts(&pIter, &aOut[1], 1);
+  }
+
+  sqlite3_free(pFree);
+  return SQLITE_OK;
+}
+
+/*
+** fts3ExprIterate() callback used to collect the "local" part of the
+** FTS3_MATCHINFO_HITS array. The local stats are those elements of the 
+** array that are different for each row returned by the query.
+*/
+static int fts3ExprLocalHitsCb(
+  Fts3Expr *pExpr,                /* Phrase expression node */
+  int iPhrase,                    /* Phrase number */
+  void *pCtx                      /* Pointer to MatchInfo structure */
+){
+  MatchInfo *p = (MatchInfo *)pCtx;
+  int iStart = iPhrase * p->nCol * 3;
+  int i;
+
+  for(i=0; i<p->nCol; i++) p->aMatchinfo[iStart+i*3] = 0;
+
+  if( pExpr->aDoclist ){
+    char *pCsr;
+
+    pCsr = sqlite3Fts3FindPositions(pExpr, p->pCursor->iPrevId, -1);
+    if( pCsr ){
+      fts3LoadColumnlistCounts(&pCsr, &p->aMatchinfo[iStart], 0);
+    }
+  }
+
+  return SQLITE_OK;
+}
+
+static int fts3MatchinfoCheck(
+  Fts3Table *pTab, 
+  char cArg,
+  char **pzErr
+){
+  if( (cArg==FTS3_MATCHINFO_NPHRASE)
+   || (cArg==FTS3_MATCHINFO_NCOL)
+   || (cArg==FTS3_MATCHINFO_NDOC && pTab->bHasStat)
+   || (cArg==FTS3_MATCHINFO_AVGLENGTH && pTab->bHasStat)
+   || (cArg==FTS3_MATCHINFO_LENGTH && pTab->bHasDocsize)
+   || (cArg==FTS3_MATCHINFO_LCS)
+   || (cArg==FTS3_MATCHINFO_HITS)
+  ){
+    return SQLITE_OK;
+  }
+  *pzErr = sqlite3_mprintf("unrecognized matchinfo request: %c", cArg);
+  return SQLITE_ERROR;
+}
+
+static int fts3MatchinfoSize(MatchInfo *pInfo, char cArg){
+  int nVal;                       /* Number of integers output by cArg */
+
+  switch( cArg ){
+    case FTS3_MATCHINFO_NDOC:
+    case FTS3_MATCHINFO_NPHRASE: 
+    case FTS3_MATCHINFO_NCOL: 
+      nVal = 1;
+      break;
+
+    case FTS3_MATCHINFO_AVGLENGTH:
+    case FTS3_MATCHINFO_LENGTH:
+    case FTS3_MATCHINFO_LCS:
+      nVal = pInfo->nCol;
+      break;
+
+    default:
+      assert( cArg==FTS3_MATCHINFO_HITS );
+      nVal = pInfo->nCol * pInfo->nPhrase * 3;
+      break;
+  }
+
+  return nVal;
+}
+
+static int fts3MatchinfoSelectDoctotal(
+  Fts3Table *pTab,
+  sqlite3_stmt **ppStmt,
+  sqlite3_int64 *pnDoc,
+  const char **paLen
+){
+  sqlite3_stmt *pStmt;
+  const char *a;
+  sqlite3_int64 nDoc;
+
+  if( !*ppStmt ){
+    int rc = sqlite3Fts3SelectDoctotal(pTab, ppStmt);
+    if( rc!=SQLITE_OK ) return rc;
+  }
+  pStmt = *ppStmt;
+  assert( sqlite3_data_count(pStmt)==1 );
+
+  a = sqlite3_column_blob(pStmt, 0);
+  a += sqlite3Fts3GetVarint(a, &nDoc);
+  if( nDoc==0 ) return SQLITE_CORRUPT;
+  *pnDoc = (u32)nDoc;
+
+  if( paLen ) *paLen = a;
+  return SQLITE_OK;
+}
+
+/*
+** An instance of the following structure is used to store state while 
+** iterating through a multi-column position-list corresponding to the
+** hits for a single phrase on a single row in order to calculate the
+** values for a matchinfo() FTS3_MATCHINFO_LCS request.
+*/
+typedef struct LcsIterator LcsIterator;
+struct LcsIterator {
+  Fts3Expr *pExpr;                /* Pointer to phrase expression */
+  char *pRead;                    /* Cursor used to iterate through aDoclist */
+  int iPosOffset;                 /* Tokens count up to end of this phrase */
+  int iCol;                       /* Current column number */
+  int iPos;                       /* Current position */
+};
+
+/* 
+** If LcsIterator.iCol is set to the following value, the iterator has
+** finished iterating through all offsets for all columns.
+*/
+#define LCS_ITERATOR_FINISHED 0x7FFFFFFF;
+
+static int fts3MatchinfoLcsCb(
+  Fts3Expr *pExpr,                /* Phrase expression node */
+  int iPhrase,                    /* Phrase number (numbered from zero) */
+  void *pCtx                      /* Pointer to MatchInfo structure */
+){
+  LcsIterator *aIter = (LcsIterator *)pCtx;
+  aIter[iPhrase].pExpr = pExpr;
+  return SQLITE_OK;
+}
+
+/*
+** Advance the iterator passed as an argument to the next position. Return
+** 1 if the iterator is at EOF or if it now points to the start of the
+** position list for the next column.
+*/
+static int fts3LcsIteratorAdvance(LcsIterator *pIter){
+  char *pRead = pIter->pRead;
+  sqlite3_int64 iRead;
+  int rc = 0;
+
+  pRead += sqlite3Fts3GetVarint(pRead, &iRead);
+  if( iRead==0 ){
+    pIter->iCol = LCS_ITERATOR_FINISHED;
+    rc = 1;
+  }else{
+    if( iRead==1 ){
+      pRead += sqlite3Fts3GetVarint(pRead, &iRead);
+      pIter->iCol = (int)iRead;
+      pIter->iPos = pIter->iPosOffset;
+      pRead += sqlite3Fts3GetVarint(pRead, &iRead);
+      rc = 1;
+    }
+    pIter->iPos += (int)(iRead-2);
+  }
+
+  pIter->pRead = pRead;
+  return rc;
+}
+  
+/*
+** This function implements the FTS3_MATCHINFO_LCS matchinfo() flag. 
+**
+** If the call is successful, the longest-common-substring lengths for each
+** column are written into the first nCol elements of the pInfo->aMatchinfo[] 
+** array before returning. SQLITE_OK is returned in this case.
+**
+** Otherwise, if an error occurs, an SQLite error code is returned and the
+** data written to the first nCol elements of pInfo->aMatchinfo[] is 
+** undefined.
+*/
+static int fts3MatchinfoLcs(Fts3Cursor *pCsr, MatchInfo *pInfo){
+  LcsIterator *aIter;
+  int i;
+  int iCol;
+  int nToken = 0;
+
+  /* Allocate and populate the array of LcsIterator objects. The array
+  ** contains one element for each matchable phrase in the query.
+  **/
+  aIter = sqlite3_malloc(sizeof(LcsIterator) * pCsr->nPhrase);
+  if( !aIter ) return SQLITE_NOMEM;
+  memset(aIter, 0, sizeof(LcsIterator) * pCsr->nPhrase);
+  (void)fts3ExprIterate(pCsr->pExpr, fts3MatchinfoLcsCb, (void*)aIter);
+  for(i=0; i<pInfo->nPhrase; i++){
+    LcsIterator *pIter = &aIter[i];
+    nToken -= pIter->pExpr->pPhrase->nToken;
+    pIter->iPosOffset = nToken;
+    pIter->pRead = sqlite3Fts3FindPositions(pIter->pExpr, pCsr->iPrevId, -1);
+    if( pIter->pRead ){
+      pIter->iPos = pIter->iPosOffset;
+      fts3LcsIteratorAdvance(&aIter[i]);
+    }else{
+      pIter->iCol = LCS_ITERATOR_FINISHED;
+    }
+  }
+
+  for(iCol=0; iCol<pInfo->nCol; iCol++){
+    int nLcs = 0;                 /* LCS value for this column */
+    int nLive = 0;                /* Number of iterators in aIter not at EOF */
+
+    /* Loop through the iterators in aIter[]. Set nLive to the number of
+    ** iterators that point to a position-list corresponding to column iCol.
+    */
+    for(i=0; i<pInfo->nPhrase; i++){
+      assert( aIter[i].iCol>=iCol );
+      if( aIter[i].iCol==iCol ) nLive++;
+    }
+
+    /* The following loop runs until all iterators in aIter[] have finished
+    ** iterating through positions in column iCol. Exactly one of the 
+    ** iterators is advanced each time the body of the loop is run.
+    */
+    while( nLive>0 ){
+      LcsIterator *pAdv = 0;      /* The iterator to advance by one position */
+      int nThisLcs = 0;           /* LCS for the current iterator positions */
+
+      for(i=0; i<pInfo->nPhrase; i++){
+        LcsIterator *pIter = &aIter[i];
+        if( iCol!=pIter->iCol ){  
+          /* This iterator is already at EOF for this column. */
+          nThisLcs = 0;
+        }else{
+          if( pAdv==0 || pIter->iPos<pAdv->iPos ){
+            pAdv = pIter;
+          }
+          if( nThisLcs==0 || pIter->iPos==pIter[-1].iPos ){
+            nThisLcs++;
+          }else{
+            nThisLcs = 1;
+          }
+          if( nThisLcs>nLcs ) nLcs = nThisLcs;
+        }
+      }
+      if( fts3LcsIteratorAdvance(pAdv) ) nLive--;
+    }
+
+    pInfo->aMatchinfo[iCol] = nLcs;
+  }
+
+  sqlite3_free(aIter);
+  return SQLITE_OK;
+}
+
+/*
+** Populate the buffer pInfo->aMatchinfo[] with an array of integers to
+** be returned by the matchinfo() function. Argument zArg contains the 
+** format string passed as the second argument to matchinfo (or the
+** default value "pcx" if no second argument was specified). The format
+** string has already been validated and the pInfo->aMatchinfo[] array
+** is guaranteed to be large enough for the output.
+**
+** If bGlobal is true, then populate all fields of the matchinfo() output.
+** If it is false, then assume that those fields that do not change between
+** rows (i.e. FTS3_MATCHINFO_NPHRASE, NCOL, NDOC, AVGLENGTH and part of HITS)
+** have already been populated.
+**
+** Return SQLITE_OK if successful, or an SQLite error code if an error 
+** occurs. If a value other than SQLITE_OK is returned, the state the
+** pInfo->aMatchinfo[] buffer is left in is undefined.
+*/
+static int fts3MatchinfoValues(
+  Fts3Cursor *pCsr,               /* FTS3 cursor object */
+  int bGlobal,                    /* True to grab the global stats */
+  MatchInfo *pInfo,               /* Matchinfo context object */
+  const char *zArg                /* Matchinfo format string */
+){
+  int rc = SQLITE_OK;
+  int i;
+  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
+  sqlite3_stmt *pSelect = 0;
+
+  for(i=0; rc==SQLITE_OK && zArg[i]; i++){
+
+    switch( zArg[i] ){
+      case FTS3_MATCHINFO_NPHRASE:
+        if( bGlobal ) pInfo->aMatchinfo[0] = pInfo->nPhrase;
+        break;
+
+      case FTS3_MATCHINFO_NCOL:
+        if( bGlobal ) pInfo->aMatchinfo[0] = pInfo->nCol;
+        break;
+        
+      case FTS3_MATCHINFO_NDOC:
+        if( bGlobal ){
+          sqlite3_int64 nDoc;
+          rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &nDoc, 0);
+          pInfo->aMatchinfo[0] = (u32)nDoc;
+        }
+        break;
+
+      case FTS3_MATCHINFO_AVGLENGTH: 
+        if( bGlobal ){
+          sqlite3_int64 nDoc;     /* Number of rows in table */
+          const char *a;          /* Aggregate column length array */
+
+          rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &nDoc, &a);
+          if( rc==SQLITE_OK ){
+            int iCol;
+            for(iCol=0; iCol<pInfo->nCol; iCol++){
+              u32 iVal;
+              sqlite3_int64 nToken;
+              a += sqlite3Fts3GetVarint(a, &nToken);
+              iVal = (u32)(((u32)(nToken&0xffffffff)+nDoc/2)/nDoc);
+              pInfo->aMatchinfo[iCol] = iVal;
+            }
+          }
+        }
+        break;
+
+      case FTS3_MATCHINFO_LENGTH: {
+        sqlite3_stmt *pSelectDocsize = 0;
+        rc = sqlite3Fts3SelectDocsize(pTab, pCsr->iPrevId, &pSelectDocsize);
+        if( rc==SQLITE_OK ){
+          int iCol;
+          const char *a = sqlite3_column_blob(pSelectDocsize, 0);
+          for(iCol=0; iCol<pInfo->nCol; iCol++){
+            sqlite3_int64 nToken;
+            a += sqlite3Fts3GetVarint(a, &nToken);
+            pInfo->aMatchinfo[iCol] = (u32)nToken;
+          }
+        }
+        sqlite3_reset(pSelectDocsize);
+        break;
+      }
+
+      case FTS3_MATCHINFO_LCS:
+        rc = fts3ExprLoadDoclists(pCsr, 0, 0);
+        if( rc==SQLITE_OK ){
+          rc = fts3MatchinfoLcs(pCsr, pInfo);
+        }
+        break;
+
+      default: {
+        Fts3Expr *pExpr;
+        assert( zArg[i]==FTS3_MATCHINFO_HITS );
+        pExpr = pCsr->pExpr;
+        rc = fts3ExprLoadDoclists(pCsr, 0, 0);
+        if( rc!=SQLITE_OK ) break;
+        if( bGlobal ){
+          if( pCsr->pDeferred ){
+            rc = fts3MatchinfoSelectDoctotal(pTab, &pSelect, &pInfo->nDoc, 0);
+            if( rc!=SQLITE_OK ) break;
+          }
+          rc = fts3ExprIterate(pExpr, fts3ExprGlobalHitsCb,(void*)pInfo);
+          if( rc!=SQLITE_OK ) break;
+        }
+        (void)fts3ExprIterate(pExpr, fts3ExprLocalHitsCb,(void*)pInfo);
+        break;
+      }
+    }
+
+    pInfo->aMatchinfo += fts3MatchinfoSize(pInfo, zArg[i]);
+  }
+
+  sqlite3_reset(pSelect);
+  return rc;
+}
+
+
+/*
+** Populate pCsr->aMatchinfo[] with data for the current row. The 
+** 'matchinfo' data is an array of 32-bit unsigned integers (C type u32).
+*/
+static int fts3GetMatchinfo(
+  Fts3Cursor *pCsr,               /* FTS3 Cursor object */
+  const char *zArg                /* Second argument to matchinfo() function */
+){
+  MatchInfo sInfo;
+  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
+  int rc = SQLITE_OK;
+  int bGlobal = 0;                /* Collect 'global' stats as well as local */
+
+  memset(&sInfo, 0, sizeof(MatchInfo));
+  sInfo.pCursor = pCsr;
+  sInfo.nCol = pTab->nColumn;
+
+  /* If there is cached matchinfo() data, but the format string for the 
+  ** cache does not match the format string for this request, discard 
+  ** the cached data. */
+  if( pCsr->zMatchinfo && strcmp(pCsr->zMatchinfo, zArg) ){
+    assert( pCsr->aMatchinfo );
+    sqlite3_free(pCsr->aMatchinfo);
+    pCsr->zMatchinfo = 0;
+    pCsr->aMatchinfo = 0;
+  }
+
+  /* If Fts3Cursor.aMatchinfo[] is NULL, then this is the first time the
+  ** matchinfo function has been called for this query. In this case 
+  ** allocate the array used to accumulate the matchinfo data and
+  ** initialize those elements that are constant for every row.
+  */
+  if( pCsr->aMatchinfo==0 ){
+    int nMatchinfo = 0;           /* Number of u32 elements in match-info */
+    int nArg;                     /* Bytes in zArg */
+    int i;                        /* Used to iterate through zArg */
+
+    /* Determine the number of phrases in the query */
+    pCsr->nPhrase = fts3ExprPhraseCount(pCsr->pExpr);
+    sInfo.nPhrase = pCsr->nPhrase;
+
+    /* Determine the number of integers in the buffer returned by this call. */
+    for(i=0; zArg[i]; i++){
+      nMatchinfo += fts3MatchinfoSize(&sInfo, zArg[i]);
+    }
+
+    /* Allocate space for Fts3Cursor.aMatchinfo[] and Fts3Cursor.zMatchinfo. */
+    nArg = (int)strlen(zArg);
+    pCsr->aMatchinfo = (u32 *)sqlite3_malloc(sizeof(u32)*nMatchinfo + nArg + 1);
+    if( !pCsr->aMatchinfo ) return SQLITE_NOMEM;
+
+    pCsr->zMatchinfo = (char *)&pCsr->aMatchinfo[nMatchinfo];
+    pCsr->nMatchinfo = nMatchinfo;
+    memcpy(pCsr->zMatchinfo, zArg, nArg+1);
+    memset(pCsr->aMatchinfo, 0, sizeof(u32)*nMatchinfo);
+    pCsr->isMatchinfoNeeded = 1;
+    bGlobal = 1;
+  }
+
+  sInfo.aMatchinfo = pCsr->aMatchinfo;
+  sInfo.nPhrase = pCsr->nPhrase;
+  if( pCsr->isMatchinfoNeeded ){
+    rc = fts3MatchinfoValues(pCsr, bGlobal, &sInfo, zArg);
+    pCsr->isMatchinfoNeeded = 0;
+  }
+
+  return rc;
+}
+
+/*
+** Implementation of snippet() function.
+*/
+SQLITE_PRIVATE void sqlite3Fts3Snippet(
+  sqlite3_context *pCtx,          /* SQLite function call context */
+  Fts3Cursor *pCsr,               /* Cursor object */
+  const char *zStart,             /* Snippet start text - "<b>" */
+  const char *zEnd,               /* Snippet end text - "</b>" */
+  const char *zEllipsis,          /* Snippet ellipsis text - "<b>...</b>" */
+  int iCol,                       /* Extract snippet from this column */
+  int nToken                      /* Approximate number of tokens in snippet */
+){
+  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
+  int rc = SQLITE_OK;
+  int i;
+  StrBuffer res = {0, 0, 0};
+
+  /* The returned text includes up to four fragments of text extracted from
+  ** the data in the current row. The first iteration of the for(...) loop
+  ** below attempts to locate a single fragment of text nToken tokens in 
+  ** size that contains at least one instance of all phrases in the query
+  ** expression that appear in the current row. If such a fragment of text
+  ** cannot be found, the second iteration of the loop attempts to locate
+  ** a pair of fragments, and so on.
+  */
+  int nSnippet = 0;               /* Number of fragments in this snippet */
+  SnippetFragment aSnippet[4];    /* Maximum of 4 fragments per snippet */
+  int nFToken = -1;               /* Number of tokens in each fragment */
+
+  if( !pCsr->pExpr ){
+    sqlite3_result_text(pCtx, "", 0, SQLITE_STATIC);
+    return;
+  }
+
+  for(nSnippet=1; 1; nSnippet++){
+
+    int iSnip;                    /* Loop counter 0..nSnippet-1 */
+    u64 mCovered = 0;             /* Bitmask of phrases covered by snippet */
+    u64 mSeen = 0;                /* Bitmask of phrases seen by BestSnippet() */
+
+    if( nToken>=0 ){
+      nFToken = (nToken+nSnippet-1) / nSnippet;
+    }else{
+      nFToken = -1 * nToken;
+    }
+
+    for(iSnip=0; iSnip<nSnippet; iSnip++){
+      int iBestScore = -1;        /* Best score of columns checked so far */
+      int iRead;                  /* Used to iterate through columns */
+      SnippetFragment *pFragment = &aSnippet[iSnip];
+
+      memset(pFragment, 0, sizeof(*pFragment));
+
+      /* Loop through all columns of the table being considered for snippets.
+      ** If the iCol argument to this function was negative, this means all
+      ** columns of the FTS3 table. Otherwise, only column iCol is considered.
+      */
+      for(iRead=0; iRead<pTab->nColumn; iRead++){
+        SnippetFragment sF = {0, 0, 0, 0};
+        int iS;
+        if( iCol>=0 && iRead!=iCol ) continue;
+
+        /* Find the best snippet of nFToken tokens in column iRead. */
+        rc = fts3BestSnippet(nFToken, pCsr, iRead, mCovered, &mSeen, &sF, &iS);
+        if( rc!=SQLITE_OK ){
+          goto snippet_out;
+        }
+        if( iS>iBestScore ){
+          *pFragment = sF;
+          iBestScore = iS;
+        }
+      }
+
+      mCovered |= pFragment->covered;
+    }
+
+    /* If all query phrases seen by fts3BestSnippet() are present in at least
+    ** one of the nSnippet snippet fragments, break out of the loop.
+    */
+    assert( (mCovered&mSeen)==mCovered );
+    if( mSeen==mCovered || nSnippet==SizeofArray(aSnippet) ) break;
+  }
+
+  assert( nFToken>0 );
+
+  for(i=0; i<nSnippet && rc==SQLITE_OK; i++){
+    rc = fts3SnippetText(pCsr, &aSnippet[i], 
+        i, (i==nSnippet-1), nFToken, zStart, zEnd, zEllipsis, &res
+    );
+  }
+
+ snippet_out:
+  sqlite3Fts3SegmentsClose(pTab);
+  if( rc!=SQLITE_OK ){
+    sqlite3_result_error_code(pCtx, rc);
+    sqlite3_free(res.z);
+  }else{
+    sqlite3_result_text(pCtx, res.z, -1, sqlite3_free);
+  }
+}
+
+
+typedef struct TermOffset TermOffset;
+typedef struct TermOffsetCtx TermOffsetCtx;
+
+struct TermOffset {
+  char *pList;                    /* Position-list */
+  int iPos;                       /* Position just read from pList */
+  int iOff;                       /* Offset of this term from read positions */
+};
+
+struct TermOffsetCtx {
+  int iCol;                       /* Column of table to populate aTerm for */
+  int iTerm;
+  sqlite3_int64 iDocid;
+  TermOffset *aTerm;
+};
+
+/*
+** This function is an fts3ExprIterate() callback used by sqlite3Fts3Offsets().
+*/
+static int fts3ExprTermOffsetInit(Fts3Expr *pExpr, int iPhrase, void *ctx){
+  TermOffsetCtx *p = (TermOffsetCtx *)ctx;
+  int nTerm;                      /* Number of tokens in phrase */
+  int iTerm;                      /* For looping through nTerm phrase terms */
+  char *pList;                    /* Pointer to position list for phrase */
+  int iPos = 0;                   /* First position in position-list */
+
+  UNUSED_PARAMETER(iPhrase);
+  pList = sqlite3Fts3FindPositions(pExpr, p->iDocid, p->iCol);
+  nTerm = pExpr->pPhrase->nToken;
+  if( pList ){
+    fts3GetDeltaPosition(&pList, &iPos);
+    assert( iPos>=0 );
+  }
+
+  for(iTerm=0; iTerm<nTerm; iTerm++){
+    TermOffset *pT = &p->aTerm[p->iTerm++];
+    pT->iOff = nTerm-iTerm-1;
+    pT->pList = pList;
+    pT->iPos = iPos;
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** Implementation of offsets() function.
+*/
+SQLITE_PRIVATE void sqlite3Fts3Offsets(
+  sqlite3_context *pCtx,          /* SQLite function call context */
+  Fts3Cursor *pCsr                /* Cursor object */
+){
+  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
+  sqlite3_tokenizer_module const *pMod = pTab->pTokenizer->pModule;
+  const char *ZDUMMY;             /* Dummy argument used with xNext() */
+  int NDUMMY;                     /* Dummy argument used with xNext() */
+  int rc;                         /* Return Code */
+  int nToken;                     /* Number of tokens in query */
+  int iCol;                       /* Column currently being processed */
+  StrBuffer res = {0, 0, 0};      /* Result string */
+  TermOffsetCtx sCtx;             /* Context for fts3ExprTermOffsetInit() */
+
+  if( !pCsr->pExpr ){
+    sqlite3_result_text(pCtx, "", 0, SQLITE_STATIC);
+    return;
+  }
+
+  memset(&sCtx, 0, sizeof(sCtx));
+  assert( pCsr->isRequireSeek==0 );
+
+  /* Count the number of terms in the query */
+  rc = fts3ExprLoadDoclists(pCsr, 0, &nToken);
+  if( rc!=SQLITE_OK ) goto offsets_out;
+
+  /* Allocate the array of TermOffset iterators. */
+  sCtx.aTerm = (TermOffset *)sqlite3_malloc(sizeof(TermOffset)*nToken);
+  if( 0==sCtx.aTerm ){
+    rc = SQLITE_NOMEM;
+    goto offsets_out;
+  }
+  sCtx.iDocid = pCsr->iPrevId;
+
+  /* Loop through the table columns, appending offset information to 
+  ** string-buffer res for each column.
+  */
+  for(iCol=0; iCol<pTab->nColumn; iCol++){
+    sqlite3_tokenizer_cursor *pC; /* Tokenizer cursor */
+    int iStart;
+    int iEnd;
+    int iCurrent;
+    const char *zDoc;
+    int nDoc;
+
+    /* Initialize the contents of sCtx.aTerm[] for column iCol. There is 
+    ** no way that this operation can fail, so the return code from
+    ** fts3ExprIterate() can be discarded.
+    */
+    sCtx.iCol = iCol;
+    sCtx.iTerm = 0;
+    (void)fts3ExprIterate(pCsr->pExpr, fts3ExprTermOffsetInit, (void *)&sCtx);
+
+    /* Retreive the text stored in column iCol. If an SQL NULL is stored 
+    ** in column iCol, jump immediately to the next iteration of the loop.
+    ** If an OOM occurs while retrieving the data (this can happen if SQLite
+    ** needs to transform the data from utf-16 to utf-8), return SQLITE_NOMEM 
+    ** to the caller. 
+    */
+    zDoc = (const char *)sqlite3_column_text(pCsr->pStmt, iCol+1);
+    nDoc = sqlite3_column_bytes(pCsr->pStmt, iCol+1);
+    if( zDoc==0 ){
+      if( sqlite3_column_type(pCsr->pStmt, iCol+1)==SQLITE_NULL ){
+        continue;
+      }
+      rc = SQLITE_NOMEM;
+      goto offsets_out;
+    }
+
+    /* Initialize a tokenizer iterator to iterate through column iCol. */
+    rc = pMod->xOpen(pTab->pTokenizer, zDoc, nDoc, &pC);
+    if( rc!=SQLITE_OK ) goto offsets_out;
+    pC->pTokenizer = pTab->pTokenizer;
+
+    rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);
+    while( rc==SQLITE_OK ){
+      int i;                      /* Used to loop through terms */
+      int iMinPos = 0x7FFFFFFF;   /* Position of next token */
+      TermOffset *pTerm = 0;      /* TermOffset associated with next token */
+
+      for(i=0; i<nToken; i++){
+        TermOffset *pT = &sCtx.aTerm[i];
+        if( pT->pList && (pT->iPos-pT->iOff)<iMinPos ){
+          iMinPos = pT->iPos-pT->iOff;
+          pTerm = pT;
+        }
+      }
+
+      if( !pTerm ){
+        /* All offsets for this column have been gathered. */
+        break;
+      }else{
+        assert( iCurrent<=iMinPos );
+        if( 0==(0xFE&*pTerm->pList) ){
+          pTerm->pList = 0;
+        }else{
+          fts3GetDeltaPosition(&pTerm->pList, &pTerm->iPos);
+        }
+        while( rc==SQLITE_OK && iCurrent<iMinPos ){
+          rc = pMod->xNext(pC, &ZDUMMY, &NDUMMY, &iStart, &iEnd, &iCurrent);
+        }
+        if( rc==SQLITE_OK ){
+          char aBuffer[64];
+          sqlite3_snprintf(sizeof(aBuffer), aBuffer, 
+              "%d %d %d %d ", iCol, pTerm-sCtx.aTerm, iStart, iEnd-iStart
+          );
+          rc = fts3StringAppend(&res, aBuffer, -1);
+        }else if( rc==SQLITE_DONE ){
+          rc = SQLITE_CORRUPT;
+        }
+      }
+    }
+    if( rc==SQLITE_DONE ){
+      rc = SQLITE_OK;
+    }
+
+    pMod->xClose(pC);
+    if( rc!=SQLITE_OK ) goto offsets_out;
+  }
+
+ offsets_out:
+  sqlite3_free(sCtx.aTerm);
+  assert( rc!=SQLITE_DONE );
+  sqlite3Fts3SegmentsClose(pTab);
+  if( rc!=SQLITE_OK ){
+    sqlite3_result_error_code(pCtx,  rc);
+    sqlite3_free(res.z);
+  }else{
+    sqlite3_result_text(pCtx, res.z, res.n-1, sqlite3_free);
+  }
+  return;
+}
+
+/*
+** Implementation of matchinfo() function.
+*/
+SQLITE_PRIVATE void sqlite3Fts3Matchinfo(
+  sqlite3_context *pContext,      /* Function call context */
+  Fts3Cursor *pCsr,               /* FTS3 table cursor */
+  const char *zArg                /* Second arg to matchinfo() function */
+){
+  Fts3Table *pTab = (Fts3Table *)pCsr->base.pVtab;
+  int rc;
+  int i;
+  const char *zFormat;
+
+  if( zArg ){
+    for(i=0; zArg[i]; i++){
+      char *zErr = 0;
+      if( fts3MatchinfoCheck(pTab, zArg[i], &zErr) ){
+        sqlite3_result_error(pContext, zErr, -1);
+        sqlite3_free(zErr);
+        return;
+      }
+    }
+    zFormat = zArg;
+  }else{
+    zFormat = FTS3_MATCHINFO_DEFAULT;
+  }
+
+  if( !pCsr->pExpr ){
+    sqlite3_result_blob(pContext, "", 0, SQLITE_STATIC);
+    return;
+  }
+
+  /* Retrieve matchinfo() data. */
+  rc = fts3GetMatchinfo(pCsr, zFormat);
+  sqlite3Fts3SegmentsClose(pTab);
+
+  if( rc!=SQLITE_OK ){
+    sqlite3_result_error_code(pContext, rc);
+  }else{
+    int n = pCsr->nMatchinfo * sizeof(u32);
+    sqlite3_result_blob(pContext, pCsr->aMatchinfo, n, SQLITE_TRANSIENT);
+  }
+}
+
+#endif
+
+/************** End of fts3_snippet.c ****************************************/
+/************** Begin file rtree.c *******************************************/
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file contains code for implementations of the r-tree and r*-tree
+** algorithms packaged as an SQLite virtual table module.
+*/
+
+/*
+** Database Format of R-Tree Tables
+** --------------------------------
+**
+** The data structure for a single virtual r-tree table is stored in three 
+** native SQLite tables declared as follows. In each case, the '%' character
+** in the table name is replaced with the user-supplied name of the r-tree
+** table.
+**
+**   CREATE TABLE %_node(nodeno INTEGER PRIMARY KEY, data BLOB)
+**   CREATE TABLE %_parent(nodeno INTEGER PRIMARY KEY, parentnode INTEGER)
+**   CREATE TABLE %_rowid(rowid INTEGER PRIMARY KEY, nodeno INTEGER)
+**
+** The data for each node of the r-tree structure is stored in the %_node
+** table. For each node that is not the root node of the r-tree, there is
+** an entry in the %_parent table associating the node with its parent.
+** And for each row of data in the table, there is an entry in the %_rowid
+** table that maps from the entries rowid to the id of the node that it
+** is stored on.
+**
+** The root node of an r-tree always exists, even if the r-tree table is
+** empty. The nodeno of the root node is always 1. All other nodes in the
+** table must be the same size as the root node. The content of each node
+** is formatted as follows:
+**
+**   1. If the node is the root node (node 1), then the first 2 bytes
+**      of the node contain the tree depth as a big-endian integer.
+**      For non-root nodes, the first 2 bytes are left unused.
+**
+**   2. The next 2 bytes contain the number of entries currently 
+**      stored in the node.
+**
+**   3. The remainder of the node contains the node entries. Each entry
+**      consists of a single 8-byte integer followed by an even number
+**      of 4-byte coordinates. For leaf nodes the integer is the rowid
+**      of a record. For internal nodes it is the node number of a
+**      child page.
+*/
+
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_RTREE)
+
+/*
+** This file contains an implementation of a couple of different variants
+** of the r-tree algorithm. See the README file for further details. The 
+** same data-structure is used for all, but the algorithms for insert and
+** delete operations vary. The variants used are selected at compile time 
+** by defining the following symbols:
+*/
+
+/* Either, both or none of the following may be set to activate 
+** r*tree variant algorithms.
+*/
+#define VARIANT_RSTARTREE_CHOOSESUBTREE 0
+#define VARIANT_RSTARTREE_REINSERT      1
+
+/* 
+** Exactly one of the following must be set to 1.
+*/
+#define VARIANT_GUTTMAN_QUADRATIC_SPLIT 0
+#define VARIANT_GUTTMAN_LINEAR_SPLIT    0
+#define VARIANT_RSTARTREE_SPLIT         1
+
+#define VARIANT_GUTTMAN_SPLIT \
+        (VARIANT_GUTTMAN_LINEAR_SPLIT||VARIANT_GUTTMAN_QUADRATIC_SPLIT)
+
+#if VARIANT_GUTTMAN_QUADRATIC_SPLIT
+  #define PickNext QuadraticPickNext
+  #define PickSeeds QuadraticPickSeeds
+  #define AssignCells splitNodeGuttman
+#endif
+#if VARIANT_GUTTMAN_LINEAR_SPLIT
+  #define PickNext LinearPickNext
+  #define PickSeeds LinearPickSeeds
+  #define AssignCells splitNodeGuttman
+#endif
+#if VARIANT_RSTARTREE_SPLIT
+  #define AssignCells splitNodeStartree
+#endif
+
+#if !defined(NDEBUG) && !defined(SQLITE_DEBUG) 
+# define NDEBUG 1
+#endif
+
+#ifndef SQLITE_CORE
+  SQLITE_EXTENSION_INIT1
+#else
+#endif
+
+
+#ifndef SQLITE_AMALGAMATION
+#include "sqlite3rtree.h"
+typedef sqlite3_int64 i64;
+typedef unsigned char u8;
+typedef unsigned int u32;
+#endif
+
+/*  The following macro is used to suppress compiler warnings.
+*/
+#ifndef UNUSED_PARAMETER
+# define UNUSED_PARAMETER(x) (void)(x)
+#endif
+
+typedef struct Rtree Rtree;
+typedef struct RtreeCursor RtreeCursor;
+typedef struct RtreeNode RtreeNode;
+typedef struct RtreeCell RtreeCell;
+typedef struct RtreeConstraint RtreeConstraint;
+typedef struct RtreeMatchArg RtreeMatchArg;
+typedef struct RtreeGeomCallback RtreeGeomCallback;
+typedef union RtreeCoord RtreeCoord;
+
+/* The rtree may have between 1 and RTREE_MAX_DIMENSIONS dimensions. */
+#define RTREE_MAX_DIMENSIONS 5
+
+/* Size of hash table Rtree.aHash. This hash table is not expected to
+** ever contain very many entries, so a fixed number of buckets is 
+** used.
+*/
+#define HASHSIZE 128
+
+/* 
+** An rtree virtual-table object.
+*/
+struct Rtree {
+  sqlite3_vtab base;
+  sqlite3 *db;                /* Host database connection */
+  int iNodeSize;              /* Size in bytes of each node in the node table */
+  int nDim;                   /* Number of dimensions */
+  int nBytesPerCell;          /* Bytes consumed per cell */
+  int iDepth;                 /* Current depth of the r-tree structure */
+  char *zDb;                  /* Name of database containing r-tree table */
+  char *zName;                /* Name of r-tree table */ 
+  RtreeNode *aHash[HASHSIZE]; /* Hash table of in-memory nodes. */ 
+  int nBusy;                  /* Current number of users of this structure */
+
+  /* List of nodes removed during a CondenseTree operation. List is
+  ** linked together via the pointer normally used for hash chains -
+  ** RtreeNode.pNext. RtreeNode.iNode stores the depth of the sub-tree 
+  ** headed by the node (leaf nodes have RtreeNode.iNode==0).
+  */
+  RtreeNode *pDeleted;
+  int iReinsertHeight;        /* Height of sub-trees Reinsert() has run on */
+
+  /* Statements to read/write/delete a record from xxx_node */
+  sqlite3_stmt *pReadNode;
+  sqlite3_stmt *pWriteNode;
+  sqlite3_stmt *pDeleteNode;
+
+  /* Statements to read/write/delete a record from xxx_rowid */
+  sqlite3_stmt *pReadRowid;
+  sqlite3_stmt *pWriteRowid;
+  sqlite3_stmt *pDeleteRowid;
+
+  /* Statements to read/write/delete a record from xxx_parent */
+  sqlite3_stmt *pReadParent;
+  sqlite3_stmt *pWriteParent;
+  sqlite3_stmt *pDeleteParent;
+
+  int eCoordType;
+};
+
+/* Possible values for eCoordType: */
+#define RTREE_COORD_REAL32 0
+#define RTREE_COORD_INT32  1
+
+/*
+** The minimum number of cells allowed for a node is a third of the 
+** maximum. In Gutman's notation:
+**
+**     m = M/3
+**
+** If an R*-tree "Reinsert" operation is required, the same number of
+** cells are removed from the overfull node and reinserted into the tree.
+*/
+#define RTREE_MINCELLS(p) ((((p)->iNodeSize-4)/(p)->nBytesPerCell)/3)
+#define RTREE_REINSERT(p) RTREE_MINCELLS(p)
+#define RTREE_MAXCELLS 51
+
+/*
+** The smallest possible node-size is (512-64)==448 bytes. And the largest
+** supported cell size is 48 bytes (8 byte rowid + ten 4 byte coordinates).
+** Therefore all non-root nodes must contain at least 3 entries. Since 
+** 2^40 is greater than 2^64, an r-tree structure always has a depth of
+** 40 or less.
+*/
+#define RTREE_MAX_DEPTH 40
+
+/* 
+** An rtree cursor object.
+*/
+struct RtreeCursor {
+  sqlite3_vtab_cursor base;
+  RtreeNode *pNode;                 /* Node cursor is currently pointing at */
+  int iCell;                        /* Index of current cell in pNode */
+  int iStrategy;                    /* Copy of idxNum search parameter */
+  int nConstraint;                  /* Number of entries in aConstraint */
+  RtreeConstraint *aConstraint;     /* Search constraints. */
+};
+
+union RtreeCoord {
+  float f;
+  int i;
+};
+
+/*
+** The argument is an RtreeCoord. Return the value stored within the RtreeCoord
+** formatted as a double. This macro assumes that local variable pRtree points
+** to the Rtree structure associated with the RtreeCoord.
+*/
+#define DCOORD(coord) (                           \
+  (pRtree->eCoordType==RTREE_COORD_REAL32) ?      \
+    ((double)coord.f) :                           \
+    ((double)coord.i)                             \
+)
+
+/*
+** A search constraint.
+*/
+struct RtreeConstraint {
+  int iCoord;                     /* Index of constrained coordinate */
+  int op;                         /* Constraining operation */
+  double rValue;                  /* Constraint value. */
+  int (*xGeom)(sqlite3_rtree_geometry *, int, double *, int *);
+  sqlite3_rtree_geometry *pGeom;  /* Constraint callback argument for a MATCH */
+};
+
+/* Possible values for RtreeConstraint.op */
+#define RTREE_EQ    0x41
+#define RTREE_LE    0x42
+#define RTREE_LT    0x43
+#define RTREE_GE    0x44
+#define RTREE_GT    0x45
+#define RTREE_MATCH 0x46
+
+/* 
+** An rtree structure node.
+*/
+struct RtreeNode {
+  RtreeNode *pParent;               /* Parent node */
+  i64 iNode;
+  int nRef;
+  int isDirty;
+  u8 *zData;
+  RtreeNode *pNext;                 /* Next node in this hash chain */
+};
+#define NCELL(pNode) readInt16(&(pNode)->zData[2])
+
+/* 
+** Structure to store a deserialized rtree record.
+*/
+struct RtreeCell {
+  i64 iRowid;
+  RtreeCoord aCoord[RTREE_MAX_DIMENSIONS*2];
+};
+
+
+/*
+** Value for the first field of every RtreeMatchArg object. The MATCH
+** operator tests that the first field of a blob operand matches this
+** value to avoid operating on invalid blobs (which could cause a segfault).
+*/
+#define RTREE_GEOMETRY_MAGIC 0x891245AB
+
+/*
+** An instance of this structure must be supplied as a blob argument to
+** the right-hand-side of an SQL MATCH operator used to constrain an
+** r-tree query.
+*/
+struct RtreeMatchArg {
+  u32 magic;                      /* Always RTREE_GEOMETRY_MAGIC */
+  int (*xGeom)(sqlite3_rtree_geometry *, int, double *, int *);
+  void *pContext;
+  int nParam;
+  double aParam[1];
+};
+
+/*
+** When a geometry callback is created (see sqlite3_rtree_geometry_callback),
+** a single instance of the following structure is allocated. It is used
+** as the context for the user-function created by by s_r_g_c(). The object
+** is eventually deleted by the destructor mechanism provided by
+** sqlite3_create_function_v2() (which is called by s_r_g_c() to create
+** the geometry callback function).
+*/
+struct RtreeGeomCallback {
+  int (*xGeom)(sqlite3_rtree_geometry *, int, double *, int *);
+  void *pContext;
+};
+
+#ifndef MAX
+# define MAX(x,y) ((x) < (y) ? (y) : (x))
+#endif
+#ifndef MIN
+# define MIN(x,y) ((x) > (y) ? (y) : (x))
+#endif
+
+/*
+** Functions to deserialize a 16 bit integer, 32 bit real number and
+** 64 bit integer. The deserialized value is returned.
+*/
+static int readInt16(u8 *p){
+  return (p[0]<<8) + p[1];
+}
+static void readCoord(u8 *p, RtreeCoord *pCoord){
+  u32 i = (
+    (((u32)p[0]) << 24) + 
+    (((u32)p[1]) << 16) + 
+    (((u32)p[2]) <<  8) + 
+    (((u32)p[3]) <<  0)
+  );
+  *(u32 *)pCoord = i;
+}
+static i64 readInt64(u8 *p){
+  return (
+    (((i64)p[0]) << 56) + 
+    (((i64)p[1]) << 48) + 
+    (((i64)p[2]) << 40) + 
+    (((i64)p[3]) << 32) + 
+    (((i64)p[4]) << 24) + 
+    (((i64)p[5]) << 16) + 
+    (((i64)p[6]) <<  8) + 
+    (((i64)p[7]) <<  0)
+  );
+}
+
+/*
+** Functions to serialize a 16 bit integer, 32 bit real number and
+** 64 bit integer. The value returned is the number of bytes written
+** to the argument buffer (always 2, 4 and 8 respectively).
+*/
+static int writeInt16(u8 *p, int i){
+  p[0] = (i>> 8)&0xFF;
+  p[1] = (i>> 0)&0xFF;
+  return 2;
+}
+static int writeCoord(u8 *p, RtreeCoord *pCoord){
+  u32 i;
+  assert( sizeof(RtreeCoord)==4 );
+  assert( sizeof(u32)==4 );
+  i = *(u32 *)pCoord;
+  p[0] = (i>>24)&0xFF;
+  p[1] = (i>>16)&0xFF;
+  p[2] = (i>> 8)&0xFF;
+  p[3] = (i>> 0)&0xFF;
+  return 4;
+}
+static int writeInt64(u8 *p, i64 i){
+  p[0] = (i>>56)&0xFF;
+  p[1] = (i>>48)&0xFF;
+  p[2] = (i>>40)&0xFF;
+  p[3] = (i>>32)&0xFF;
+  p[4] = (i>>24)&0xFF;
+  p[5] = (i>>16)&0xFF;
+  p[6] = (i>> 8)&0xFF;
+  p[7] = (i>> 0)&0xFF;
+  return 8;
+}
+
+/*
+** Increment the reference count of node p.
+*/
+static void nodeReference(RtreeNode *p){
+  if( p ){
+    p->nRef++;
+  }
+}
+
+/*
+** Clear the content of node p (set all bytes to 0x00).
+*/
+static void nodeZero(Rtree *pRtree, RtreeNode *p){
+  memset(&p->zData[2], 0, pRtree->iNodeSize-2);
+  p->isDirty = 1;
+}
+
+/*
+** Given a node number iNode, return the corresponding key to use
+** in the Rtree.aHash table.
+*/
+static int nodeHash(i64 iNode){
+  return (
+    (iNode>>56) ^ (iNode>>48) ^ (iNode>>40) ^ (iNode>>32) ^ 
+    (iNode>>24) ^ (iNode>>16) ^ (iNode>> 8) ^ (iNode>> 0)
+  ) % HASHSIZE;
+}
+
+/*
+** Search the node hash table for node iNode. If found, return a pointer
+** to it. Otherwise, return 0.
+*/
+static RtreeNode *nodeHashLookup(Rtree *pRtree, i64 iNode){
+  RtreeNode *p;
+  for(p=pRtree->aHash[nodeHash(iNode)]; p && p->iNode!=iNode; p=p->pNext);
+  return p;
+}
+
+/*
+** Add node pNode to the node hash table.
+*/
+static void nodeHashInsert(Rtree *pRtree, RtreeNode *pNode){
+  int iHash;
+  assert( pNode->pNext==0 );
+  iHash = nodeHash(pNode->iNode);
+  pNode->pNext = pRtree->aHash[iHash];
+  pRtree->aHash[iHash] = pNode;
+}
+
+/*
+** Remove node pNode from the node hash table.
+*/
+static void nodeHashDelete(Rtree *pRtree, RtreeNode *pNode){
+  RtreeNode **pp;
+  if( pNode->iNode!=0 ){
+    pp = &pRtree->aHash[nodeHash(pNode->iNode)];
+    for( ; (*pp)!=pNode; pp = &(*pp)->pNext){ assert(*pp); }
+    *pp = pNode->pNext;
+    pNode->pNext = 0;
+  }
+}
+
+/*
+** Allocate and return new r-tree node. Initially, (RtreeNode.iNode==0),
+** indicating that node has not yet been assigned a node number. It is
+** assigned a node number when nodeWrite() is called to write the
+** node contents out to the database.
+*/
+static RtreeNode *nodeNew(Rtree *pRtree, RtreeNode *pParent){
+  RtreeNode *pNode;
+  pNode = (RtreeNode *)sqlite3_malloc(sizeof(RtreeNode) + pRtree->iNodeSize);
+  if( pNode ){
+    memset(pNode, 0, sizeof(RtreeNode) + pRtree->iNodeSize);
+    pNode->zData = (u8 *)&pNode[1];
+    pNode->nRef = 1;
+    pNode->pParent = pParent;
+    pNode->isDirty = 1;
+    nodeReference(pParent);
+  }
+  return pNode;
+}
+
+/*
+** Obtain a reference to an r-tree node.
+*/
+static int
+nodeAcquire(
+  Rtree *pRtree,             /* R-tree structure */
+  i64 iNode,                 /* Node number to load */
+  RtreeNode *pParent,        /* Either the parent node or NULL */
+  RtreeNode **ppNode         /* OUT: Acquired node */
+){
+  int rc;
+  int rc2 = SQLITE_OK;
+  RtreeNode *pNode;
+
+  /* Check if the requested node is already in the hash table. If so,
+  ** increase its reference count and return it.
+  */
+  if( (pNode = nodeHashLookup(pRtree, iNode)) ){
+    assert( !pParent || !pNode->pParent || pNode->pParent==pParent );
+    if( pParent && !pNode->pParent ){
+      nodeReference(pParent);
+      pNode->pParent = pParent;
+    }
+    pNode->nRef++;
+    *ppNode = pNode;
+    return SQLITE_OK;
+  }
+
+  sqlite3_bind_int64(pRtree->pReadNode, 1, iNode);
+  rc = sqlite3_step(pRtree->pReadNode);
+  if( rc==SQLITE_ROW ){
+    const u8 *zBlob = sqlite3_column_blob(pRtree->pReadNode, 0);
+    if( pRtree->iNodeSize==sqlite3_column_bytes(pRtree->pReadNode, 0) ){
+      pNode = (RtreeNode *)sqlite3_malloc(sizeof(RtreeNode)+pRtree->iNodeSize);
+      if( !pNode ){
+        rc2 = SQLITE_NOMEM;
+      }else{
+        pNode->pParent = pParent;
+        pNode->zData = (u8 *)&pNode[1];
+        pNode->nRef = 1;
+        pNode->iNode = iNode;
+        pNode->isDirty = 0;
+        pNode->pNext = 0;
+        memcpy(pNode->zData, zBlob, pRtree->iNodeSize);
+        nodeReference(pParent);
+      }
+    }
+  }
+  rc = sqlite3_reset(pRtree->pReadNode);
+  if( rc==SQLITE_OK ) rc = rc2;
+
+  /* If the root node was just loaded, set pRtree->iDepth to the height
+  ** of the r-tree structure. A height of zero means all data is stored on
+  ** the root node. A height of one means the children of the root node
+  ** are the leaves, and so on. If the depth as specified on the root node
+  ** is greater than RTREE_MAX_DEPTH, the r-tree structure must be corrupt.
+  */
+  if( pNode && iNode==1 ){
+    pRtree->iDepth = readInt16(pNode->zData);
+    if( pRtree->iDepth>RTREE_MAX_DEPTH ){
+      rc = SQLITE_CORRUPT;
+    }
+  }
+
+  /* If no error has occurred so far, check if the "number of entries"
+  ** field on the node is too large. If so, set the return code to 
+  ** SQLITE_CORRUPT.
+  */
+  if( pNode && rc==SQLITE_OK ){
+    if( NCELL(pNode)>((pRtree->iNodeSize-4)/pRtree->nBytesPerCell) ){
+      rc = SQLITE_CORRUPT;
+    }
+  }
+
+  if( rc==SQLITE_OK ){
+    if( pNode!=0 ){
+      nodeHashInsert(pRtree, pNode);
+    }else{
+      rc = SQLITE_CORRUPT;
+    }
+    *ppNode = pNode;
+  }else{
+    sqlite3_free(pNode);
+    *ppNode = 0;
+  }
+
+  return rc;
+}
+
+/*
+** Overwrite cell iCell of node pNode with the contents of pCell.
+*/
+static void nodeOverwriteCell(
+  Rtree *pRtree, 
+  RtreeNode *pNode,  
+  RtreeCell *pCell, 
+  int iCell
+){
+  int ii;
+  u8 *p = &pNode->zData[4 + pRtree->nBytesPerCell*iCell];
+  p += writeInt64(p, pCell->iRowid);
+  for(ii=0; ii<(pRtree->nDim*2); ii++){
+    p += writeCoord(p, &pCell->aCoord[ii]);
+  }
+  pNode->isDirty = 1;
+}
+
+/*
+** Remove cell the cell with index iCell from node pNode.
+*/
+static void nodeDeleteCell(Rtree *pRtree, RtreeNode *pNode, int iCell){
+  u8 *pDst = &pNode->zData[4 + pRtree->nBytesPerCell*iCell];
+  u8 *pSrc = &pDst[pRtree->nBytesPerCell];
+  int nByte = (NCELL(pNode) - iCell - 1) * pRtree->nBytesPerCell;
+  memmove(pDst, pSrc, nByte);
+  writeInt16(&pNode->zData[2], NCELL(pNode)-1);
+  pNode->isDirty = 1;
+}
+
+/*
+** Insert the contents of cell pCell into node pNode. If the insert
+** is successful, return SQLITE_OK.
+**
+** If there is not enough free space in pNode, return SQLITE_FULL.
+*/
+static int
+nodeInsertCell(
+  Rtree *pRtree, 
+  RtreeNode *pNode, 
+  RtreeCell *pCell 
+){
+  int nCell;                    /* Current number of cells in pNode */
+  int nMaxCell;                 /* Maximum number of cells for pNode */
+
+  nMaxCell = (pRtree->iNodeSize-4)/pRtree->nBytesPerCell;
+  nCell = NCELL(pNode);
+
+  assert( nCell<=nMaxCell );
+  if( nCell<nMaxCell ){
+    nodeOverwriteCell(pRtree, pNode, pCell, nCell);
+    writeInt16(&pNode->zData[2], nCell+1);
+    pNode->isDirty = 1;
+  }
+
+  return (nCell==nMaxCell);
+}
+
+/*
+** If the node is dirty, write it out to the database.
+*/
+static int
+nodeWrite(Rtree *pRtree, RtreeNode *pNode){
+  int rc = SQLITE_OK;
+  if( pNode->isDirty ){
+    sqlite3_stmt *p = pRtree->pWriteNode;
+    if( pNode->iNode ){
+      sqlite3_bind_int64(p, 1, pNode->iNode);
+    }else{
+      sqlite3_bind_null(p, 1);
+    }
+    sqlite3_bind_blob(p, 2, pNode->zData, pRtree->iNodeSize, SQLITE_STATIC);
+    sqlite3_step(p);
+    pNode->isDirty = 0;
+    rc = sqlite3_reset(p);
+    if( pNode->iNode==0 && rc==SQLITE_OK ){
+      pNode->iNode = sqlite3_last_insert_rowid(pRtree->db);
+      nodeHashInsert(pRtree, pNode);
+    }
+  }
+  return rc;
+}
+
+/*
+** Release a reference to a node. If the node is dirty and the reference
+** count drops to zero, the node data is written to the database.
+*/
+static int
+nodeRelease(Rtree *pRtree, RtreeNode *pNode){
+  int rc = SQLITE_OK;
+  if( pNode ){
+    assert( pNode->nRef>0 );
+    pNode->nRef--;
+    if( pNode->nRef==0 ){
+      if( pNode->iNode==1 ){
+        pRtree->iDepth = -1;
+      }
+      if( pNode->pParent ){
+        rc = nodeRelease(pRtree, pNode->pParent);
+      }
+      if( rc==SQLITE_OK ){
+        rc = nodeWrite(pRtree, pNode);
+      }
+      nodeHashDelete(pRtree, pNode);
+      sqlite3_free(pNode);
+    }
+  }
+  return rc;
+}
+
+/*
+** Return the 64-bit integer value associated with cell iCell of
+** node pNode. If pNode is a leaf node, this is a rowid. If it is
+** an internal node, then the 64-bit integer is a child page number.
+*/
+static i64 nodeGetRowid(
+  Rtree *pRtree, 
+  RtreeNode *pNode, 
+  int iCell
+){
+  assert( iCell<NCELL(pNode) );
+  return readInt64(&pNode->zData[4 + pRtree->nBytesPerCell*iCell]);
+}
+
+/*
+** Return coordinate iCoord from cell iCell in node pNode.
+*/
+static void nodeGetCoord(
+  Rtree *pRtree, 
+  RtreeNode *pNode, 
+  int iCell,
+  int iCoord,
+  RtreeCoord *pCoord           /* Space to write result to */
+){
+  readCoord(&pNode->zData[12 + pRtree->nBytesPerCell*iCell + 4*iCoord], pCoord);
+}
+
+/*
+** Deserialize cell iCell of node pNode. Populate the structure pointed
+** to by pCell with the results.
+*/
+static void nodeGetCell(
+  Rtree *pRtree, 
+  RtreeNode *pNode, 
+  int iCell,
+  RtreeCell *pCell
+){
+  int ii;
+  pCell->iRowid = nodeGetRowid(pRtree, pNode, iCell);
+  for(ii=0; ii<pRtree->nDim*2; ii++){
+    nodeGetCoord(pRtree, pNode, iCell, ii, &pCell->aCoord[ii]);
+  }
+}
+
+
+/* Forward declaration for the function that does the work of
+** the virtual table module xCreate() and xConnect() methods.
+*/
+static int rtreeInit(
+  sqlite3 *, void *, int, const char *const*, sqlite3_vtab **, char **, int
+);
+
+/* 
+** Rtree virtual table module xCreate method.
+*/
+static int rtreeCreate(
+  sqlite3 *db,
+  void *pAux,
+  int argc, const char *const*argv,
+  sqlite3_vtab **ppVtab,
+  char **pzErr
+){
+  return rtreeInit(db, pAux, argc, argv, ppVtab, pzErr, 1);
+}
+
+/* 
+** Rtree virtual table module xConnect method.
+*/
+static int rtreeConnect(
+  sqlite3 *db,
+  void *pAux,
+  int argc, const char *const*argv,
+  sqlite3_vtab **ppVtab,
+  char **pzErr
+){
+  return rtreeInit(db, pAux, argc, argv, ppVtab, pzErr, 0);
+}
+
+/*
+** Increment the r-tree reference count.
+*/
+static void rtreeReference(Rtree *pRtree){
+  pRtree->nBusy++;
+}
+
+/*
+** Decrement the r-tree reference count. When the reference count reaches
+** zero the structure is deleted.
+*/
+static void rtreeRelease(Rtree *pRtree){
+  pRtree->nBusy--;
+  if( pRtree->nBusy==0 ){
+    sqlite3_finalize(pRtree->pReadNode);
+    sqlite3_finalize(pRtree->pWriteNode);
+    sqlite3_finalize(pRtree->pDeleteNode);
+    sqlite3_finalize(pRtree->pReadRowid);
+    sqlite3_finalize(pRtree->pWriteRowid);
+    sqlite3_finalize(pRtree->pDeleteRowid);
+    sqlite3_finalize(pRtree->pReadParent);
+    sqlite3_finalize(pRtree->pWriteParent);
+    sqlite3_finalize(pRtree->pDeleteParent);
+    sqlite3_free(pRtree);
+  }
+}
+
+/* 
+** Rtree virtual table module xDisconnect method.
+*/
+static int rtreeDisconnect(sqlite3_vtab *pVtab){
+  rtreeRelease((Rtree *)pVtab);
+  return SQLITE_OK;
+}
+
+/* 
+** Rtree virtual table module xDestroy method.
+*/
+static int rtreeDestroy(sqlite3_vtab *pVtab){
+  Rtree *pRtree = (Rtree *)pVtab;
+  int rc;
+  char *zCreate = sqlite3_mprintf(
+    "DROP TABLE '%q'.'%q_node';"
+    "DROP TABLE '%q'.'%q_rowid';"
+    "DROP TABLE '%q'.'%q_parent';",
+    pRtree->zDb, pRtree->zName, 
+    pRtree->zDb, pRtree->zName,
+    pRtree->zDb, pRtree->zName
+  );
+  if( !zCreate ){
+    rc = SQLITE_NOMEM;
+  }else{
+    rc = sqlite3_exec(pRtree->db, zCreate, 0, 0, 0);
+    sqlite3_free(zCreate);
+  }
+  if( rc==SQLITE_OK ){
+    rtreeRelease(pRtree);
+  }
+
+  return rc;
+}
+
+/* 
+** Rtree virtual table module xOpen method.
+*/
+static int rtreeOpen(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor){
+  int rc = SQLITE_NOMEM;
+  RtreeCursor *pCsr;
+
+  pCsr = (RtreeCursor *)sqlite3_malloc(sizeof(RtreeCursor));
+  if( pCsr ){
+    memset(pCsr, 0, sizeof(RtreeCursor));
+    pCsr->base.pVtab = pVTab;
+    rc = SQLITE_OK;
+  }
+  *ppCursor = (sqlite3_vtab_cursor *)pCsr;
+
+  return rc;
+}
+
+
+/*
+** Free the RtreeCursor.aConstraint[] array and its contents.
+*/
+static void freeCursorConstraints(RtreeCursor *pCsr){
+  if( pCsr->aConstraint ){
+    int i;                        /* Used to iterate through constraint array */
+    for(i=0; i<pCsr->nConstraint; i++){
+      sqlite3_rtree_geometry *pGeom = pCsr->aConstraint[i].pGeom;
+      if( pGeom ){
+        if( pGeom->xDelUser ) pGeom->xDelUser(pGeom->pUser);
+        sqlite3_free(pGeom);
+      }
+    }
+    sqlite3_free(pCsr->aConstraint);
+    pCsr->aConstraint = 0;
+  }
+}
+
+/* 
+** Rtree virtual table module xClose method.
+*/
+static int rtreeClose(sqlite3_vtab_cursor *cur){
+  Rtree *pRtree = (Rtree *)(cur->pVtab);
+  int rc;
+  RtreeCursor *pCsr = (RtreeCursor *)cur;
+  freeCursorConstraints(pCsr);
+  rc = nodeRelease(pRtree, pCsr->pNode);
+  sqlite3_free(pCsr);
+  return rc;
+}
+
+/*
+** Rtree virtual table module xEof method.
+**
+** Return non-zero if the cursor does not currently point to a valid 
+** record (i.e if the scan has finished), or zero otherwise.
+*/
+static int rtreeEof(sqlite3_vtab_cursor *cur){
+  RtreeCursor *pCsr = (RtreeCursor *)cur;
+  return (pCsr->pNode==0);
+}
+
+/*
+** The r-tree constraint passed as the second argument to this function is
+** guaranteed to be a MATCH constraint.
+*/
+static int testRtreeGeom(
+  Rtree *pRtree,                  /* R-Tree object */
+  RtreeConstraint *pConstraint,   /* MATCH constraint to test */
+  RtreeCell *pCell,               /* Cell to test */
+  int *pbRes                      /* OUT: Test result */
+){
+  int i;
+  double aCoord[RTREE_MAX_DIMENSIONS*2];
+  int nCoord = pRtree->nDim*2;
+
+  assert( pConstraint->op==RTREE_MATCH );
+  assert( pConstraint->pGeom );
+
+  for(i=0; i<nCoord; i++){
+    aCoord[i] = DCOORD(pCell->aCoord[i]);
+  }
+  return pConstraint->xGeom(pConstraint->pGeom, nCoord, aCoord, pbRes);
+}
+
+/* 
+** Cursor pCursor currently points to a cell in a non-leaf page.
+** Set *pbEof to true if the sub-tree headed by the cell is filtered
+** (excluded) by the constraints in the pCursor->aConstraint[] 
+** array, or false otherwise.
+**
+** Return SQLITE_OK if successful or an SQLite error code if an error
+** occurs within a geometry callback.
+*/
+static int testRtreeCell(Rtree *pRtree, RtreeCursor *pCursor, int *pbEof){
+  RtreeCell cell;
+  int ii;
+  int bRes = 0;
+  int rc = SQLITE_OK;
+
+  nodeGetCell(pRtree, pCursor->pNode, pCursor->iCell, &cell);
+  for(ii=0; bRes==0 && ii<pCursor->nConstraint; ii++){
+    RtreeConstraint *p = &pCursor->aConstraint[ii];
+    double cell_min = DCOORD(cell.aCoord[(p->iCoord>>1)*2]);
+    double cell_max = DCOORD(cell.aCoord[(p->iCoord>>1)*2+1]);
+
+    assert(p->op==RTREE_LE || p->op==RTREE_LT || p->op==RTREE_GE 
+        || p->op==RTREE_GT || p->op==RTREE_EQ || p->op==RTREE_MATCH
+    );
+
+    switch( p->op ){
+      case RTREE_LE: case RTREE_LT: 
+        bRes = p->rValue<cell_min; 
+        break;
+
+      case RTREE_GE: case RTREE_GT: 
+        bRes = p->rValue>cell_max; 
+        break;
+
+      case RTREE_EQ:
+        bRes = (p->rValue>cell_max || p->rValue<cell_min);
+        break;
+
+      default: {
+        assert( p->op==RTREE_MATCH );
+        rc = testRtreeGeom(pRtree, p, &cell, &bRes);
+        bRes = !bRes;
+        break;
+      }
+    }
+  }
+
+  *pbEof = bRes;
+  return rc;
+}
+
+/* 
+** Test if the cell that cursor pCursor currently points to
+** would be filtered (excluded) by the constraints in the 
+** pCursor->aConstraint[] array. If so, set *pbEof to true before
+** returning. If the cell is not filtered (excluded) by the constraints,
+** set pbEof to zero.
+**
+** Return SQLITE_OK if successful or an SQLite error code if an error
+** occurs within a geometry callback.
+**
+** This function assumes that the cell is part of a leaf node.
+*/
+static int testRtreeEntry(Rtree *pRtree, RtreeCursor *pCursor, int *pbEof){
+  RtreeCell cell;
+  int ii;
+  *pbEof = 0;
+
+  nodeGetCell(pRtree, pCursor->pNode, pCursor->iCell, &cell);
+  for(ii=0; ii<pCursor->nConstraint; ii++){
+    RtreeConstraint *p = &pCursor->aConstraint[ii];
+    double coord = DCOORD(cell.aCoord[p->iCoord]);
+    int res;
+    assert(p->op==RTREE_LE || p->op==RTREE_LT || p->op==RTREE_GE 
+        || p->op==RTREE_GT || p->op==RTREE_EQ || p->op==RTREE_MATCH
+    );
+    switch( p->op ){
+      case RTREE_LE: res = (coord<=p->rValue); break;
+      case RTREE_LT: res = (coord<p->rValue);  break;
+      case RTREE_GE: res = (coord>=p->rValue); break;
+      case RTREE_GT: res = (coord>p->rValue);  break;
+      case RTREE_EQ: res = (coord==p->rValue); break;
+      default: {
+        int rc;
+        assert( p->op==RTREE_MATCH );
+        rc = testRtreeGeom(pRtree, p, &cell, &res);
+        if( rc!=SQLITE_OK ){
+          return rc;
+        }
+        break;
+      }
+    }
+
+    if( !res ){
+      *pbEof = 1;
+      return SQLITE_OK;
+    }
+  }
+
+  return SQLITE_OK;
+}
+
+/*
+** Cursor pCursor currently points at a node that heads a sub-tree of
+** height iHeight (if iHeight==0, then the node is a leaf). Descend
+** to point to the left-most cell of the sub-tree that matches the 
+** configured constraints.
+*/
+static int descendToCell(
+  Rtree *pRtree, 
+  RtreeCursor *pCursor, 
+  int iHeight,
+  int *pEof                 /* OUT: Set to true if cannot descend */
+){
+  int isEof;
+  int rc;
+  int ii;
+  RtreeNode *pChild;
+  sqlite3_int64 iRowid;
+
+  RtreeNode *pSavedNode = pCursor->pNode;
+  int iSavedCell = pCursor->iCell;
+
+  assert( iHeight>=0 );
+
+  if( iHeight==0 ){
+    rc = testRtreeEntry(pRtree, pCursor, &isEof);
+  }else{
+    rc = testRtreeCell(pRtree, pCursor, &isEof);
+  }
+  if( rc!=SQLITE_OK || isEof || iHeight==0 ){
+    goto descend_to_cell_out;
+  }
+
+  iRowid = nodeGetRowid(pRtree, pCursor->pNode, pCursor->iCell);
+  rc = nodeAcquire(pRtree, iRowid, pCursor->pNode, &pChild);
+  if( rc!=SQLITE_OK ){
+    goto descend_to_cell_out;
+  }
+
+  nodeRelease(pRtree, pCursor->pNode);
+  pCursor->pNode = pChild;
+  isEof = 1;
+  for(ii=0; isEof && ii<NCELL(pChild); ii++){
+    pCursor->iCell = ii;
+    rc = descendToCell(pRtree, pCursor, iHeight-1, &isEof);
+    if( rc!=SQLITE_OK ){
+      goto descend_to_cell_out;
+    }
+  }
+
+  if( isEof ){
+    assert( pCursor->pNode==pChild );
+    nodeReference(pSavedNode);
+    nodeRelease(pRtree, pChild);
+    pCursor->pNode = pSavedNode;
+    pCursor->iCell = iSavedCell;
+  }
+
+descend_to_cell_out:
+  *pEof = isEof;
+  return rc;
+}
+
+/*
+** One of the cells in node pNode is guaranteed to have a 64-bit 
+** integer value equal to iRowid. Return the index of this cell.
+*/
+static int nodeRowidIndex(
+  Rtree *pRtree, 
+  RtreeNode *pNode, 
+  i64 iRowid,
+  int *piIndex
+){
+  int ii;
+  int nCell = NCELL(pNode);
+  for(ii=0; ii<nCell; ii++){
+    if( nodeGetRowid(pRtree, pNode, ii)==iRowid ){
+      *piIndex = ii;
+      return SQLITE_OK;
+    }
+  }
+  return SQLITE_CORRUPT;
+}
+
+/*
+** Return the index of the cell containing a pointer to node pNode
+** in its parent. If pNode is the root node, return -1.
+*/
+static int nodeParentIndex(Rtree *pRtree, RtreeNode *pNode, int *piIndex){
+  RtreeNode *pParent = pNode->pParent;
+  if( pParent ){
+    return nodeRowidIndex(pRtree, pParent, pNode->iNode, piIndex);
+  }
+  *piIndex = -1;
+  return SQLITE_OK;
+}
+
+/* 
+** Rtree virtual table module xNext method.
+*/
+static int rtreeNext(sqlite3_vtab_cursor *pVtabCursor){
+  Rtree *pRtree = (Rtree *)(pVtabCursor->pVtab);
+  RtreeCursor *pCsr = (RtreeCursor *)pVtabCursor;
+  int rc = SQLITE_OK;
+
+  /* RtreeCursor.pNode must not be NULL. If is is NULL, then this cursor is
+  ** already at EOF. It is against the rules to call the xNext() method of
+  ** a cursor that has already reached EOF.
+  */
+  assert( pCsr->pNode );
+
+  if( pCsr->iStrategy==1 ){
+    /* This "scan" is a direct lookup by rowid. There is no next entry. */
+    nodeRelease(pRtree, pCsr->pNode);
+    pCsr->pNode = 0;
+  }else{
+    /* Move to the next entry that matches the configured constraints. */
+    int iHeight = 0;
+    while( pCsr->pNode ){
+      RtreeNode *pNode = pCsr->pNode;
+      int nCell = NCELL(pNode);
+      for(pCsr->iCell++; pCsr->iCell<nCell; pCsr->iCell++){
+        int isEof;
+        rc = descendToCell(pRtree, pCsr, iHeight, &isEof);
+        if( rc!=SQLITE_OK || !isEof ){
+          return rc;
+        }
+      }
+      pCsr->pNode = pNode->pParent;
+      rc = nodeParentIndex(pRtree, pNode, &pCsr->iCell);
+      if( rc!=SQLITE_OK ){
+        return rc;
+      }
+      nodeReference(pCsr->pNode);
+      nodeRelease(pRtree, pNode);
+      iHeight++;
+    }
+  }
+
+  return rc;
+}
+
+/* 
+** Rtree virtual table module xRowid method.
+*/
+static int rtreeRowid(sqlite3_vtab_cursor *pVtabCursor, sqlite_int64 *pRowid){
+  Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;
+  RtreeCursor *pCsr = (RtreeCursor *)pVtabCursor;
+
+  assert(pCsr->pNode);
+  *pRowid = nodeGetRowid(pRtree, pCsr->pNode, pCsr->iCell);
+
+  return SQLITE_OK;
+}
+
+/* 
+** Rtree virtual table module xColumn method.
+*/
+static int rtreeColumn(sqlite3_vtab_cursor *cur, sqlite3_context *ctx, int i){
+  Rtree *pRtree = (Rtree *)cur->pVtab;
+  RtreeCursor *pCsr = (RtreeCursor *)cur;
+
+  if( i==0 ){
+    i64 iRowid = nodeGetRowid(pRtree, pCsr->pNode, pCsr->iCell);
+    sqlite3_result_int64(ctx, iRowid);
+  }else{
+    RtreeCoord c;
+    nodeGetCoord(pRtree, pCsr->pNode, pCsr->iCell, i-1, &c);
+    if( pRtree->eCoordType==RTREE_COORD_REAL32 ){
+      sqlite3_result_double(ctx, c.f);
+    }else{
+      assert( pRtree->eCoordType==RTREE_COORD_INT32 );
+      sqlite3_result_int(ctx, c.i);
+    }
+  }
+
+  return SQLITE_OK;
+}
+
+/* 
+** Use nodeAcquire() to obtain the leaf node containing the record with 
+** rowid iRowid. If successful, set *ppLeaf to point to the node and
+** return SQLITE_OK. If there is no such record in the table, set
+** *ppLeaf to 0 and return SQLITE_OK. If an error occurs, set *ppLeaf
+** to zero and return an SQLite error code.
+*/
+static int findLeafNode(Rtree *pRtree, i64 iRowid, RtreeNode **ppLeaf){
+  int rc;
+  *ppLeaf = 0;
+  sqlite3_bind_int64(pRtree->pReadRowid, 1, iRowid);
+  if( sqlite3_step(pRtree->pReadRowid)==SQLITE_ROW ){
+    i64 iNode = sqlite3_column_int64(pRtree->pReadRowid, 0);
+    rc = nodeAcquire(pRtree, iNode, 0, ppLeaf);
+    sqlite3_reset(pRtree->pReadRowid);
+  }else{
+    rc = sqlite3_reset(pRtree->pReadRowid);
+  }
+  return rc;
+}
+
+/*
+** This function is called to configure the RtreeConstraint object passed
+** as the second argument for a MATCH constraint. The value passed as the
+** first argument to this function is the right-hand operand to the MATCH
+** operator.
+*/
+static int deserializeGeometry(sqlite3_value *pValue, RtreeConstraint *pCons){
+  RtreeMatchArg *p;
+  sqlite3_rtree_geometry *pGeom;
+  int nBlob;
+
+  /* Check that value is actually a blob. */
+  if( !sqlite3_value_type(pValue)==SQLITE_BLOB ) return SQLITE_ERROR;
+
+  /* Check that the blob is roughly the right size. */
+  nBlob = sqlite3_value_bytes(pValue);
+  if( nBlob<(int)sizeof(RtreeMatchArg) 
+   || ((nBlob-sizeof(RtreeMatchArg))%sizeof(double))!=0
+  ){
+    return SQLITE_ERROR;
+  }
+
+  pGeom = (sqlite3_rtree_geometry *)sqlite3_malloc(
+      sizeof(sqlite3_rtree_geometry) + nBlob
+  );
+  if( !pGeom ) return SQLITE_NOMEM;
+  memset(pGeom, 0, sizeof(sqlite3_rtree_geometry));
+  p = (RtreeMatchArg *)&pGeom[1];
+
+  memcpy(p, sqlite3_value_blob(pValue), nBlob);
+  if( p->magic!=RTREE_GEOMETRY_MAGIC 
+   || nBlob!=(int)(sizeof(RtreeMatchArg) + (p->nParam-1)*sizeof(double))
+  ){
+    sqlite3_free(pGeom);
+    return SQLITE_ERROR;
+  }
+
+  pGeom->pContext = p->pContext;
+  pGeom->nParam = p->nParam;
+  pGeom->aParam = p->aParam;
+
+  pCons->xGeom = p->xGeom;
+  pCons->pGeom = pGeom;
+  return SQLITE_OK;
+}
+
+/* 
+** Rtree virtual table module xFilter method.
+*/
+static int rtreeFilter(
+  sqlite3_vtab_cursor *pVtabCursor, 
+  int idxNum, const char *idxStr,
+  int argc, sqlite3_value **argv
+){
+  Rtree *pRtree = (Rtree *)pVtabCursor->pVtab;
+  RtreeCursor *pCsr = (RtreeCursor *)pVtabCursor;
+
+  RtreeNode *pRoot = 0;
+  int ii;
+  int rc = SQLITE_OK;
+
+  rtreeReference(pRtree);
+
+  freeCursorConstraints(pCsr);
+  pCsr->iStrategy = idxNum;
+
+  if( idxNum==1 ){
+    /* Special case - lookup by rowid. */
+    RtreeNode *pLeaf;        /* Leaf on which the required cell resides */
+    i64 iRowid = sqlite3_value_int64(argv[0]);
+    rc = findLeafNode(pRtree, iRowid, &pLeaf);
+    pCsr->pNode = pLeaf; 
+    if( pLeaf ){
+      assert( rc==SQLITE_OK );
+      rc = nodeRowidIndex(pRtree, pLeaf, iRowid, &pCsr->iCell);
+    }
+  }else{
+    /* Normal case - r-tree scan. Set up the RtreeCursor.aConstraint array 
+    ** with the configured constraints. 
+    */
+    if( argc>0 ){
+      pCsr->aConstraint = sqlite3_malloc(sizeof(RtreeConstraint)*argc);
+      pCsr->nConstraint = argc;
+      if( !pCsr->aConstraint ){
+        rc = SQLITE_NOMEM;
+      }else{
+        memset(pCsr->aConstraint, 0, sizeof(RtreeConstraint)*argc);
+        assert( (idxStr==0 && argc==0) || (int)strlen(idxStr)==argc*2 );
+        for(ii=0; ii<argc; ii++){
+          RtreeConstraint *p = &pCsr->aConstraint[ii];
+          p->op = idxStr[ii*2];
+          p->iCoord = idxStr[ii*2+1]-'a';
+          if( p->op==RTREE_MATCH ){
+            /* A MATCH operator. The right-hand-side must be a blob that
+            ** can be cast into an RtreeMatchArg object. One created using
+            ** an sqlite3_rtree_geometry_callback() SQL user function.
+            */
+            rc = deserializeGeometry(argv[ii], p);
+            if( rc!=SQLITE_OK ){
+              break;
+            }
+          }else{
+            p->rValue = sqlite3_value_double(argv[ii]);
+          }
+        }
+      }
+    }
+  
+    if( rc==SQLITE_OK ){
+      pCsr->pNode = 0;
+      rc = nodeAcquire(pRtree, 1, 0, &pRoot);
+    }
+    if( rc==SQLITE_OK ){
+      int isEof = 1;
+      int nCell = NCELL(pRoot);
+      pCsr->pNode = pRoot;
+      for(pCsr->iCell=0; rc==SQLITE_OK && pCsr->iCell<nCell; pCsr->iCell++){
+        assert( pCsr->pNode==pRoot );
+        rc = descendToCell(pRtree, pCsr, pRtree->iDepth, &isEof);
+        if( !isEof ){
+          break;
+        }
+      }
+      if( rc==SQLITE_OK && isEof ){
+        assert( pCsr->pNode==pRoot );
+        nodeRelease(pRtree, pRoot);
+        pCsr->pNode = 0;
+      }
+      assert( rc!=SQLITE_OK || !pCsr->pNode || pCsr->iCell<NCELL(pCsr->pNode) );
+    }
+  }
+
+  rtreeRelease(pRtree);
+  return rc;
+}
+
+/*
+** Rtree virtual table module xBestIndex method. There are three
+** table scan strategies to choose from (in order from most to 
+** least desirable):
+**
+**   idxNum     idxStr        Strategy
+**   ------------------------------------------------
+**     1        Unused        Direct lookup by rowid.
+**     2        See below     R-tree query or full-table scan.
+**   ------------------------------------------------
+**
+** If strategy 1 is used, then idxStr is not meaningful. If strategy
+** 2 is used, idxStr is formatted to contain 2 bytes for each 
+** constraint used. The first two bytes of idxStr correspond to 
+** the constraint in sqlite3_index_info.aConstraintUsage[] with
+** (argvIndex==1) etc.
+**
+** The first of each pair of bytes in idxStr identifies the constraint
+** operator as follows:
+**
+**   Operator    Byte Value
+**   ----------------------
+**      =        0x41 ('A')
+**     <=        0x42 ('B')
+**      <        0x43 ('C')
+**     >=        0x44 ('D')
+**      >        0x45 ('E')
+**   MATCH       0x46 ('F')
+**   ----------------------
+**
+** The second of each pair of bytes identifies the coordinate column
+** to which the constraint applies. The leftmost coordinate column
+** is 'a', the second from the left 'b' etc.
+*/
+static int rtreeBestIndex(sqlite3_vtab *tab, sqlite3_index_info *pIdxInfo){
+  int rc = SQLITE_OK;
+  int ii;
+
+  int iIdx = 0;
+  char zIdxStr[RTREE_MAX_DIMENSIONS*8+1];
+  memset(zIdxStr, 0, sizeof(zIdxStr));
+  UNUSED_PARAMETER(tab);
+
+  assert( pIdxInfo->idxStr==0 );
+  for(ii=0; ii<pIdxInfo->nConstraint && iIdx<(int)(sizeof(zIdxStr)-1); ii++){
+    struct sqlite3_index_constraint *p = &pIdxInfo->aConstraint[ii];
+
+    if( p->usable && p->iColumn==0 && p->op==SQLITE_INDEX_CONSTRAINT_EQ ){
+      /* We have an equality constraint on the rowid. Use strategy 1. */
+      int jj;
+      for(jj=0; jj<ii; jj++){
+        pIdxInfo->aConstraintUsage[jj].argvIndex = 0;
+        pIdxInfo->aConstraintUsage[jj].omit = 0;
+      }
+      pIdxInfo->idxNum = 1;
+      pIdxInfo->aConstraintUsage[ii].argvIndex = 1;
+      pIdxInfo->aConstraintUsage[jj].omit = 1;
+
+      /* This strategy involves a two rowid lookups on an B-Tree structures
+      ** and then a linear search of an R-Tree node. This should be 
+      ** considered almost as quick as a direct rowid lookup (for which 
+      ** sqlite uses an internal cost of 0.0).
+      */ 
+      pIdxInfo->estimatedCost = 10.0;
+      return SQLITE_OK;
+    }
+
+    if( p->usable && (p->iColumn>0 || p->op==SQLITE_INDEX_CONSTRAINT_MATCH) ){
+      u8 op;
+      switch( p->op ){
+        case SQLITE_INDEX_CONSTRAINT_EQ: op = RTREE_EQ; break;
+        case SQLITE_INDEX_CONSTRAINT_GT: op = RTREE_GT; break;
+        case SQLITE_INDEX_CONSTRAINT_LE: op = RTREE_LE; break;
+        case SQLITE_INDEX_CONSTRAINT_LT: op = RTREE_LT; break;
+        case SQLITE_INDEX_CONSTRAINT_GE: op = RTREE_GE; break;
+        default:
+          assert( p->op==SQLITE_INDEX_CONSTRAINT_MATCH );
+          op = RTREE_MATCH; 
+          break;
+      }
+      zIdxStr[iIdx++] = op;
+      zIdxStr[iIdx++] = p->iColumn - 1 + 'a';
+      pIdxInfo->aConstraintUsage[ii].argvIndex = (iIdx/2);
+      pIdxInfo->aConstraintUsage[ii].omit = 1;
+    }
+  }
+
+  pIdxInfo->idxNum = 2;
+  pIdxInfo->needToFreeIdxStr = 1;
+  if( iIdx>0 && 0==(pIdxInfo->idxStr = sqlite3_mprintf("%s", zIdxStr)) ){
+    return SQLITE_NOMEM;
+  }
+  assert( iIdx>=0 );
+  pIdxInfo->estimatedCost = (2000000.0 / (double)(iIdx + 1));
+  return rc;
+}
+
+/*
+** Return the N-dimensional volumn of the cell stored in *p.
+*/
+static float cellArea(Rtree *pRtree, RtreeCell *p){
+  float area = 1.0;
+  int ii;
+  for(ii=0; ii<(pRtree->nDim*2); ii+=2){
+    area = area * (DCOORD(p->aCoord[ii+1]) - DCOORD(p->aCoord[ii]));
+  }
+  return area;
+}
+
+/*
+** Return the margin length of cell p. The margin length is the sum
+** of the objects size in each dimension.
+*/
+static float cellMargin(Rtree *pRtree, RtreeCell *p){
+  float margin = 0.0;
+  int ii;
+  for(ii=0; ii<(pRtree->nDim*2); ii+=2){
+    margin += (DCOORD(p->aCoord[ii+1]) - DCOORD(p->aCoord[ii]));
+  }
+  return margin;
+}
+
+/*
+** Store the union of cells p1 and p2 in p1.
+*/
+static void cellUnion(Rtree *pRtree, RtreeCell *p1, RtreeCell *p2){
+  int ii;
+  if( pRtree->eCoordType==RTREE_COORD_REAL32 ){
+    for(ii=0; ii<(pRtree->nDim*2); ii+=2){
+      p1->aCoord[ii].f = MIN(p1->aCoord[ii].f, p2->aCoord[ii].f);
+      p1->aCoord[ii+1].f = MAX(p1->aCoord[ii+1].f, p2->aCoord[ii+1].f);
+    }
+  }else{
+    for(ii=0; ii<(pRtree->nDim*2); ii+=2){
+      p1->aCoord[ii].i = MIN(p1->aCoord[ii].i, p2->aCoord[ii].i);
+      p1->aCoord[ii+1].i = MAX(p1->aCoord[ii+1].i, p2->aCoord[ii+1].i);
+    }
+  }
+}
+
+/*
+** Return true if the area covered by p2 is a subset of the area covered
+** by p1. False otherwise.
+*/
+static int cellContains(Rtree *pRtree, RtreeCell *p1, RtreeCell *p2){
+  int ii;
+  int isInt = (pRtree->eCoordType==RTREE_COORD_INT32);
+  for(ii=0; ii<(pRtree->nDim*2); ii+=2){
+    RtreeCoord *a1 = &p1->aCoord[ii];
+    RtreeCoord *a2 = &p2->aCoord[ii];
+    if( (!isInt && (a2[0].f<a1[0].f || a2[1].f>a1[1].f)) 
+     || ( isInt && (a2[0].i<a1[0].i || a2[1].i>a1[1].i)) 
+    ){
+      return 0;
+    }
+  }
+  return 1;
+}
+
+/*
+** Return the amount cell p would grow by if it were unioned with pCell.
+*/
+static float cellGrowth(Rtree *pRtree, RtreeCell *p, RtreeCell *pCell){
+  float area;
+  RtreeCell cell;
+  memcpy(&cell, p, sizeof(RtreeCell));
+  area = cellArea(pRtree, &cell);
+  cellUnion(pRtree, &cell, pCell);
+  return (cellArea(pRtree, &cell)-area);
+}
+
+#if VARIANT_RSTARTREE_CHOOSESUBTREE || VARIANT_RSTARTREE_SPLIT
+static float cellOverlap(
+  Rtree *pRtree, 
+  RtreeCell *p, 
+  RtreeCell *aCell, 
+  int nCell, 
+  int iExclude
+){
+  int ii;
+  float overlap = 0.0;
+  for(ii=0; ii<nCell; ii++){
+#if VARIANT_RSTARTREE_CHOOSESUBTREE
+    if( ii!=iExclude )
+#else
+    assert( iExclude==-1 );
+    UNUSED_PARAMETER(iExclude);
+#endif
+    {
+      int jj;
+      float o = 1.0;
+      for(jj=0; jj<(pRtree->nDim*2); jj+=2){
+        double x1;
+        double x2;
+
+        x1 = MAX(DCOORD(p->aCoord[jj]), DCOORD(aCell[ii].aCoord[jj]));
+        x2 = MIN(DCOORD(p->aCoord[jj+1]), DCOORD(aCell[ii].aCoord[jj+1]));
+
+        if( x2<x1 ){
+          o = 0.0;
+          break;
+        }else{
+          o = o * (x2-x1);
+        }
+      }
+      overlap += o;
+    }
+  }
+  return overlap;
+}
+#endif
+
+#if VARIANT_RSTARTREE_CHOOSESUBTREE
+static float cellOverlapEnlargement(
+  Rtree *pRtree, 
+  RtreeCell *p, 
+  RtreeCell *pInsert, 
+  RtreeCell *aCell, 
+  int nCell, 
+  int iExclude
+){
+  float before;
+  float after;
+  before = cellOverlap(pRtree, p, aCell, nCell, iExclude);
+  cellUnion(pRtree, p, pInsert);
+  after = cellOverlap(pRtree, p, aCell, nCell, iExclude);
+  return after-before;
+}
+#endif
+
+
+/*
+** This function implements the ChooseLeaf algorithm from Gutman[84].
+** ChooseSubTree in r*tree terminology.
+*/
+static int ChooseLeaf(
+  Rtree *pRtree,               /* Rtree table */
+  RtreeCell *pCell,            /* Cell to insert into rtree */
+  int iHeight,                 /* Height of sub-tree rooted at pCell */
+  RtreeNode **ppLeaf           /* OUT: Selected leaf page */
+){
+  int rc;
+  int ii;
+  RtreeNode *pNode;
+  rc = nodeAcquire(pRtree, 1, 0, &pNode);
+
+  for(ii=0; rc==SQLITE_OK && ii<(pRtree->iDepth-iHeight); ii++){
+    int iCell;
+    sqlite3_int64 iBest;
+
+    float fMinGrowth;
+    float fMinArea;
+    float fMinOverlap;
+
+    int nCell = NCELL(pNode);
+    RtreeCell cell;
+    RtreeNode *pChild;
+
+    RtreeCell *aCell = 0;
+
+#if VARIANT_RSTARTREE_CHOOSESUBTREE
+    if( ii==(pRtree->iDepth-1) ){
+      int jj;
+      aCell = sqlite3_malloc(sizeof(RtreeCell)*nCell);
+      if( !aCell ){
+        rc = SQLITE_NOMEM;
+        nodeRelease(pRtree, pNode);
+        pNode = 0;
+        continue;
+      }
+      for(jj=0; jj<nCell; jj++){
+        nodeGetCell(pRtree, pNode, jj, &aCell[jj]);
+      }
+    }
+#endif
+
+    /* Select the child node which will be enlarged the least if pCell
+    ** is inserted into it. Resolve ties by choosing the entry with
+    ** the smallest area.
+    */
+    for(iCell=0; iCell<nCell; iCell++){
+      int bBest = 0;
+      float growth;
+      float area;
+      float overlap = 0.0;
+      nodeGetCell(pRtree, pNode, iCell, &cell);
+      growth = cellGrowth(pRtree, &cell, pCell);
+      area = cellArea(pRtree, &cell);
+
+#if VARIANT_RSTARTREE_CHOOSESUBTREE
+      if( ii==(pRtree->iDepth-1) ){
+        overlap = cellOverlapEnlargement(pRtree,&cell,pCell,aCell,nCell,iCell);
+      }
+      if( (iCell==0) 
+       || (overlap<fMinOverlap) 
+       || (overlap==fMinOverlap && growth<fMinGrowth)
+       || (overlap==fMinOverlap && growth==fMinGrowth && area<fMinArea)
+      ){
+        bBest = 1;
+      }
+#else
+      if( iCell==0||growth<fMinGrowth||(growth==fMinGrowth && area<fMinArea) ){
+        bBest = 1;
+      }
+#endif
+      if( bBest ){
+        fMinOverlap = overlap;
+        fMinGrowth = growth;
+        fMinArea = area;
+        iBest = cell.iRowid;
+      }
+    }
+
+    sqlite3_free(aCell);
+    rc = nodeAcquire(pRtree, iBest, pNode, &pChild);
+    nodeRelease(pRtree, pNode);
+    pNode = pChild;
+  }
+
+  *ppLeaf = pNode;
+  return rc;
+}
+
+/*
+** A cell with the same content as pCell has just been inserted into
+** the node pNode. This function updates the bounding box cells in
+** all ancestor elements.
+*/
+static int AdjustTree(
+  Rtree *pRtree,                    /* Rtree table */
+  RtreeNode *pNode,                 /* Adjust ancestry of this node. */
+  RtreeCell *pCell                  /* This cell was just inserted */
+){
+  RtreeNode *p = pNode;
+  while( p->pParent ){
+    RtreeNode *pParent = p->pParent;
+    RtreeCell cell;
+    int iCell;
+
+    if( nodeParentIndex(pRtree, p, &iCell) ){
+      return SQLITE_CORRUPT;
+    }
+
+    nodeGetCell(pRtree, pParent, iCell, &cell);
+    if( !cellContains(pRtree, &cell, pCell) ){
+      cellUnion(pRtree, &cell, pCell);
+      nodeOverwriteCell(pRtree, pParent, &cell, iCell);
+    }
+ 
+    p = pParent;
+  }
+  return SQLITE_OK;
+}
+
+/*
+** Write mapping (iRowid->iNode) to the <rtree>_rowid table.
+*/
+static int rowidWrite(Rtree *pRtree, sqlite3_int64 iRowid, sqlite3_int64 iNode){
+  sqlite3_bind_int64(pRtree->pWriteRowid, 1, iRowid);
+  sqlite3_bind_int64(pRtree->pWriteRowid, 2, iNode);
+  sqlite3_step(pRtree->pWriteRowid);
+  return sqlite3_reset(pRtree->pWriteRowid);
+}
+
+/*
+** Write mapping (iNode->iPar) to the <rtree>_parent table.
+*/
+static int parentWrite(Rtree *pRtree, sqlite3_int64 iNode, sqlite3_int64 iPar){
+  sqlite3_bind_int64(pRtree->pWriteParent, 1, iNode);
+  sqlite3_bind_int64(pRtree->pWriteParent, 2, iPar);
+  sqlite3_step(pRtree->pWriteParent);
+  return sqlite3_reset(pRtree->pWriteParent);
+}
+
+static int rtreeInsertCell(Rtree *, RtreeNode *, RtreeCell *, int);
+
+#if VARIANT_GUTTMAN_LINEAR_SPLIT
+/*
+** Implementation of the linear variant of the PickNext() function from
+** Guttman[84].
+*/
+static RtreeCell *LinearPickNext(
+  Rtree *pRtree,
+  RtreeCell *aCell, 
+  int nCell, 
+  RtreeCell *pLeftBox, 
+  RtreeCell *pRightBox,
+  int *aiUsed
+){
+  int ii;
+  for(ii=0; aiUsed[ii]; ii++);
+  aiUsed[ii] = 1;
+  return &aCell[ii];
+}
+
+/*
+** Implementation of the linear variant of the PickSeeds() function from
+** Guttman[84].
+*/
+static void LinearPickSeeds(
+  Rtree *pRtree,
+  RtreeCell *aCell, 
+  int nCell, 
+  int *piLeftSeed, 
+  int *piRightSeed
+){
+  int i;
+  int iLeftSeed = 0;
+  int iRightSeed = 1;
+  float maxNormalInnerWidth = 0.0;
+
+  /* Pick two "seed" cells from the array of cells. The algorithm used
+  ** here is the LinearPickSeeds algorithm from Gutman[1984]. The 
+  ** indices of the two seed cells in the array are stored in local
+  ** variables iLeftSeek and iRightSeed.
+  */
+  for(i=0; i<pRtree->nDim; i++){
+    float x1 = DCOORD(aCell[0].aCoord[i*2]);
+    float x2 = DCOORD(aCell[0].aCoord[i*2+1]);
+    float x3 = x1;
+    float x4 = x2;
+    int jj;
+
+    int iCellLeft = 0;
+    int iCellRight = 0;
+
+    for(jj=1; jj<nCell; jj++){
+      float left = DCOORD(aCell[jj].aCoord[i*2]);
+      float right = DCOORD(aCell[jj].aCoord[i*2+1]);
+
+      if( left<x1 ) x1 = left;
+      if( right>x4 ) x4 = right;
+      if( left>x3 ){
+        x3 = left;
+        iCellRight = jj;
+      }
+      if( right<x2 ){
+        x2 = right;
+        iCellLeft = jj;
+      }
+    }
+
+    if( x4!=x1 ){
+      float normalwidth = (x3 - x2) / (x4 - x1);
+      if( normalwidth>maxNormalInnerWidth ){
+        iLeftSeed = iCellLeft;
+        iRightSeed = iCellRight;
+      }
+    }
+  }
+
+  *piLeftSeed = iLeftSeed;
+  *piRightSeed = iRightSeed;
+}
+#endif /* VARIANT_GUTTMAN_LINEAR_SPLIT */
+
+#if VARIANT_GUTTMAN_QUADRATIC_SPLIT
+/*
+** Implementation of the quadratic variant of the PickNext() function from
+** Guttman[84].
+*/
+static RtreeCell *QuadraticPickNext(
+  Rtree *pRtree,
+  RtreeCell *aCell, 
+  int nCell, 
+  RtreeCell *pLeftBox, 
+  RtreeCell *pRightBox,
+  int *aiUsed
+){
+  #define FABS(a) ((a)<0.0?-1.0*(a):(a))
+
+  int iSelect = -1;
+  float fDiff;
+  int ii;
+  for(ii=0; ii<nCell; ii++){
+    if( aiUsed[ii]==0 ){
+      float left = cellGrowth(pRtree, pLeftBox, &aCell[ii]);
+      float right = cellGrowth(pRtree, pLeftBox, &aCell[ii]);
+      float diff = FABS(right-left);
+      if( iSelect<0 || diff>fDiff ){
+        fDiff = diff;
+        iSelect = ii;
+      }
+    }
+  }
+  aiUsed[iSelect] = 1;
+  return &aCell[iSelect];
+}
+
+/*
+** Implementation of the quadratic variant of the PickSeeds() function from
+** Guttman[84].
+*/
+static void QuadraticPickSeeds(
+  Rtree *pRtree,
+  RtreeCell *aCell, 
+  int nCell, 
+  int *piLeftSeed, 
+  int *piRightSeed
+){
+  int ii;
+  int jj;
+
+  int iLeftSeed = 0;
+  int iRightSeed = 1;
+  float fWaste = 0.0;
+
+  for(ii=0; ii<nCell; ii++){
+    for(jj=ii+1; jj<nCell; jj++){
+      float right = cellArea(pRtree, &aCell[jj]);
+      float growth = cellGrowth(pRtree, &aCell[ii], &aCell[jj]);
+      float waste = growth - right;
+
+      if( waste>fWaste ){
+        iLeftSeed = ii;
+        iRightSeed = jj;
+        fWaste = waste;
+      }
+    }
+  }
+
+  *piLeftSeed = iLeftSeed;
+  *piRightSeed = iRightSeed;
+}
+#endif /* VARIANT_GUTTMAN_QUADRATIC_SPLIT */
+
+/*
+** Arguments aIdx, aDistance and aSpare all point to arrays of size
+** nIdx. The aIdx array contains the set of integers from 0 to 
+** (nIdx-1) in no particular order. This function sorts the values
+** in aIdx according to the indexed values in aDistance. For
+** example, assuming the inputs:
+**
+**   aIdx      = { 0,   1,   2,   3 }
+**   aDistance = { 5.0, 2.0, 7.0, 6.0 }
+**
+** this function sets the aIdx array to contain:
+**
+**   aIdx      = { 0,   1,   2,   3 }
+**
+** The aSpare array is used as temporary working space by the
+** sorting algorithm.
+*/
+static void SortByDistance(
+  int *aIdx, 
+  int nIdx, 
+  float *aDistance, 
+  int *aSpare
+){
+  if( nIdx>1 ){
+    int iLeft = 0;
+    int iRight = 0;
+
+    int nLeft = nIdx/2;
+    int nRight = nIdx-nLeft;
+    int *aLeft = aIdx;
+    int *aRight = &aIdx[nLeft];
+
+    SortByDistance(aLeft, nLeft, aDistance, aSpare);
+    SortByDistance(aRight, nRight, aDistance, aSpare);
+
+    memcpy(aSpare, aLeft, sizeof(int)*nLeft);
+    aLeft = aSpare;
+
+    while( iLeft<nLeft || iRight<nRight ){
+      if( iLeft==nLeft ){
+        aIdx[iLeft+iRight] = aRight[iRight];
+        iRight++;
+      }else if( iRight==nRight ){
+        aIdx[iLeft+iRight] = aLeft[iLeft];
+        iLeft++;
+      }else{
+        float fLeft = aDistance[aLeft[iLeft]];
+        float fRight = aDistance[aRight[iRight]];
+        if( fLeft<fRight ){
+          aIdx[iLeft+iRight] = aLeft[iLeft];
+          iLeft++;
+        }else{
+          aIdx[iLeft+iRight] = aRight[iRight];
+          iRight++;
+        }
+      }
+    }
+
+#if 0
+    /* Check that the sort worked */
+    {
+      int jj;
+      for(jj=1; jj<nIdx; jj++){
+        float left = aDistance[aIdx[jj-1]];
+        float right = aDistance[aIdx[jj]];
+        assert( left<=right );
+      }
+    }
+#endif
+  }
+}
+
+/*
+** Arguments aIdx, aCell and aSpare all point to arrays of size
+** nIdx. The aIdx array contains the set of integers from 0 to 
+** (nIdx-1) in no particular order. This function sorts the values
+** in aIdx according to dimension iDim of the cells in aCell. The
+** minimum value of dimension iDim is considered first, the
+** maximum used to break ties.
+**
+** The aSpare array is used as temporary working space by the
+** sorting algorithm.
+*/
+static void SortByDimension(
+  Rtree *pRtree,
+  int *aIdx, 
+  int nIdx, 
+  int iDim, 
+  RtreeCell *aCell, 
+  int *aSpare
+){
+  if( nIdx>1 ){
+
+    int iLeft = 0;
+    int iRight = 0;
+
+    int nLeft = nIdx/2;
+    int nRight = nIdx-nLeft;
+    int *aLeft = aIdx;
+    int *aRight = &aIdx[nLeft];
+
+    SortByDimension(pRtree, aLeft, nLeft, iDim, aCell, aSpare);
+    SortByDimension(pRtree, aRight, nRight, iDim, aCell, aSpare);
+
+    memcpy(aSpare, aLeft, sizeof(int)*nLeft);
+    aLeft = aSpare;
+    while( iLeft<nLeft || iRight<nRight ){
+      double xleft1 = DCOORD(aCell[aLeft[iLeft]].aCoord[iDim*2]);
+      double xleft2 = DCOORD(aCell[aLeft[iLeft]].aCoord[iDim*2+1]);
+      double xright1 = DCOORD(aCell[aRight[iRight]].aCoord[iDim*2]);
+      double xright2 = DCOORD(aCell[aRight[iRight]].aCoord[iDim*2+1]);
+      if( (iLeft!=nLeft) && ((iRight==nRight)
+       || (xleft1<xright1)
+       || (xleft1==xright1 && xleft2<xright2)
+      )){
+        aIdx[iLeft+iRight] = aLeft[iLeft];
+        iLeft++;
+      }else{
+        aIdx[iLeft+iRight] = aRight[iRight];
+        iRight++;
+      }
+    }
+
+#if 0
+    /* Check that the sort worked */
+    {
+      int jj;
+      for(jj=1; jj<nIdx; jj++){
+        float xleft1 = aCell[aIdx[jj-1]].aCoord[iDim*2];
+        float xleft2 = aCell[aIdx[jj-1]].aCoord[iDim*2+1];
+        float xright1 = aCell[aIdx[jj]].aCoord[iDim*2];
+        float xright2 = aCell[aIdx[jj]].aCoord[iDim*2+1];
+        assert( xleft1<=xright1 && (xleft1<xright1 || xleft2<=xright2) );
+      }
+    }
+#endif
+  }
+}
+
+#if VARIANT_RSTARTREE_SPLIT
+/*
+** Implementation of the R*-tree variant of SplitNode from Beckman[1990].
+*/
+static int splitNodeStartree(
+  Rtree *pRtree,
+  RtreeCell *aCell,
+  int nCell,
+  RtreeNode *pLeft,
+  RtreeNode *pRight,
+  RtreeCell *pBboxLeft,
+  RtreeCell *pBboxRight
+){
+  int **aaSorted;
+  int *aSpare;
+  int ii;
+
+  int iBestDim;
+  int iBestSplit;
+  float fBestMargin;
+
+  int nByte = (pRtree->nDim+1)*(sizeof(int*)+nCell*sizeof(int));
+
+  aaSorted = (int **)sqlite3_malloc(nByte);
+  if( !aaSorted ){
+    return SQLITE_NOMEM;
+  }
+
+  aSpare = &((int *)&aaSorted[pRtree->nDim])[pRtree->nDim*nCell];
+  memset(aaSorted, 0, nByte);
+  for(ii=0; ii<pRtree->nDim; ii++){
+    int jj;
+    aaSorted[ii] = &((int *)&aaSorted[pRtree->nDim])[ii*nCell];
+    for(jj=0; jj<nCell; jj++){
+      aaSorted[ii][jj] = jj;
+    }
+    SortByDimension(pRtree, aaSorted[ii], nCell, ii, aCell, aSpare);
+  }
+
+  for(ii=0; ii<pRtree->nDim; ii++){
+    float margin = 0.0;
+    float fBestOverlap;
+    float fBestArea;
+    int iBestLeft;
+    int nLeft;
+
+    for(
+      nLeft=RTREE_MINCELLS(pRtree); 
+      nLeft<=(nCell-RTREE_MINCELLS(pRtree)); 
+      nLeft++
+    ){
+      RtreeCell left;
+      RtreeCell right;
+      int kk;
+      float overlap;
+      float area;
+
+      memcpy(&left, &aCell[aaSorted[ii][0]], sizeof(RtreeCell));
+      memcpy(&right, &aCell[aaSorted[ii][nCell-1]], sizeof(RtreeCell));
+      for(kk=1; kk<(nCell-1); kk++){
+        if( kk<nLeft ){
+          cellUnion(pRtree, &left, &aCell[aaSorted[ii][kk]]);
+        }else{
+          cellUnion(pRtree, &right, &aCell[aaSorted[ii][kk]]);
+        }
+      }
+      margin += cellMargin(pRtree, &left);
+      margin += cellMargin(pRtree, &right);
+      overlap = cellOverlap(pRtree, &left, &right, 1, -1);
+      area = cellArea(pRtree, &left) + cellArea(pRtree, &right);
+      if( (nLeft==RTREE_MINCELLS(pRtree))
+       || (overlap<fBestOverlap)
+       || (overlap==fBestOverlap && area<fBestArea)
+      ){
+        iBestLeft = nLeft;
+        fBestOverlap = overlap;
+        fBestArea = area;
+      }
+    }
+
+    if( ii==0 || margin<fBestMargin ){
+      iBestDim = ii;
+      fBestMargin = margin;
+      iBestSplit = iBestLeft;
+    }
+  }
+
+  memcpy(pBboxLeft, &aCell[aaSorted[iBestDim][0]], sizeof(RtreeCell));
+  memcpy(pBboxRight, &aCell[aaSorted[iBestDim][iBestSplit]], sizeof(RtreeCell));
+  for(ii=0; ii<nCell; ii++){
+    RtreeNode *pTarget = (ii<iBestSplit)?pLeft:pRight;
+    RtreeCell *pBbox = (ii<iBestSplit)?pBboxLeft:pBboxRight;
+    RtreeCell *pCell = &aCell[aaSorted[iBestDim][ii]];
+    nodeInsertCell(pRtree, pTarget, pCell);
+    cellUnion(pRtree, pBbox, pCell);
+  }
+
+  sqlite3_free(aaSorted);
+  return SQLITE_OK;
+}
+#endif
+
+#if VARIANT_GUTTMAN_SPLIT
+/*
+** Implementation of the regular R-tree SplitNode from Guttman[1984].
+*/
+static int splitNodeGuttman(
+  Rtree *pRtree,
+  RtreeCell *aCell,
+  int nCell,
+  RtreeNode *pLeft,
+  RtreeNode *pRight,
+  RtreeCell *pBboxLeft,
+  RtreeCell *pBboxRight
+){
+  int iLeftSeed = 0;
+  int iRightSeed = 1;
+  int *aiUsed;
+  int i;
+
+  aiUsed = sqlite3_malloc(sizeof(int)*nCell);
+  if( !aiUsed ){
+    return SQLITE_NOMEM;
+  }
+  memset(aiUsed, 0, sizeof(int)*nCell);
+
+  PickSeeds(pRtree, aCell, nCell, &iLeftSeed, &iRightSeed);
+
+  memcpy(pBboxLeft, &aCell[iLeftSeed], sizeof(RtreeCell));
+  memcpy(pBboxRight, &aCell[iRightSeed], sizeof(RtreeCell));
+  nodeInsertCell(pRtree, pLeft, &aCell[iLeftSeed]);
+  nodeInsertCell(pRtree, pRight, &aCell[iRightSeed]);
+  aiUsed[iLeftSeed] = 1;
+  aiUsed[iRightSeed] = 1;
+
+  for(i=nCell-2; i>0; i--){
+    RtreeCell *pNext;
+    pNext = PickNext(pRtree, aCell, nCell, pBboxLeft, pBboxRight, aiUsed);
+    float diff =  
+      cellGrowth(pRtree, pBboxLeft, pNext) - 
+      cellGrowth(pRtree, pBboxRight, pNext)
+    ;
+    if( (RTREE_MINCELLS(pRtree)-NCELL(pRight)==i)
+     || (diff>0.0 && (RTREE_MINCELLS(pRtree)-NCELL(pLeft)!=i))
+    ){
+      nodeInsertCell(pRtree, pRight, pNext);
+      cellUnion(pRtree, pBboxRight, pNext);
+    }else{
+      nodeInsertCell(pRtree, pLeft, pNext);
+      cellUnion(pRtree, pBboxLeft, pNext);
+    }
+  }
+
+  sqlite3_free(aiUsed);
+  return SQLITE_OK;
+}
+#endif
+
+static int updateMapping(
+  Rtree *pRtree, 
+  i64 iRowid, 
+  RtreeNode *pNode, 
+  int iHeight
+){
+  int (*xSetMapping)(Rtree *, sqlite3_int64, sqlite3_int64);
+  xSetMapping = ((iHeight==0)?rowidWrite:parentWrite);
+  if( iHeight>0 ){
+    RtreeNode *pChild = nodeHashLookup(pRtree, iRowid);
+    if( pChild ){
+      nodeRelease(pRtree, pChild->pParent);
+      nodeReference(pNode);
+      pChild->pParent = pNode;
+    }
+  }
+  return xSetMapping(pRtree, iRowid, pNode->iNode);
+}
+
+static int SplitNode(
+  Rtree *pRtree,
+  RtreeNode *pNode,
+  RtreeCell *pCell,
+  int iHeight
+){
+  int i;
+  int newCellIsRight = 0;
+
+  int rc = SQLITE_OK;
+  int nCell = NCELL(pNode);
+  RtreeCell *aCell;
+  int *aiUsed;
+
+  RtreeNode *pLeft = 0;
+  RtreeNode *pRight = 0;
+
+  RtreeCell leftbbox;
+  RtreeCell rightbbox;
+
+  /* Allocate an array and populate it with a copy of pCell and 
+  ** all cells from node pLeft. Then zero the original node.
+  */
+  aCell = sqlite3_malloc((sizeof(RtreeCell)+sizeof(int))*(nCell+1));
+  if( !aCell ){
+    rc = SQLITE_NOMEM;
+    goto splitnode_out;
+  }
+  aiUsed = (int *)&aCell[nCell+1];
+  memset(aiUsed, 0, sizeof(int)*(nCell+1));
+  for(i=0; i<nCell; i++){
+    nodeGetCell(pRtree, pNode, i, &aCell[i]);
+  }
+  nodeZero(pRtree, pNode);
+  memcpy(&aCell[nCell], pCell, sizeof(RtreeCell));
+  nCell++;
+
+  if( pNode->iNode==1 ){
+    pRight = nodeNew(pRtree, pNode);
+    pLeft = nodeNew(pRtree, pNode);
+    pRtree->iDepth++;
+    pNode->isDirty = 1;
+    writeInt16(pNode->zData, pRtree->iDepth);
+  }else{
+    pLeft = pNode;
+    pRight = nodeNew(pRtree, pLeft->pParent);
+    nodeReference(pLeft);
+  }
+
+  if( !pLeft || !pRight ){
+    rc = SQLITE_NOMEM;
+    goto splitnode_out;
+  }
+
+  memset(pLeft->zData, 0, pRtree->iNodeSize);
+  memset(pRight->zData, 0, pRtree->iNodeSize);
+
+  rc = AssignCells(pRtree, aCell, nCell, pLeft, pRight, &leftbbox, &rightbbox);
+  if( rc!=SQLITE_OK ){
+    goto splitnode_out;
+  }
+
+  /* Ensure both child nodes have node numbers assigned to them by calling
+  ** nodeWrite(). Node pRight always needs a node number, as it was created
+  ** by nodeNew() above. But node pLeft sometimes already has a node number.
+  ** In this case avoid the all to nodeWrite().
+  */
+  if( SQLITE_OK!=(rc = nodeWrite(pRtree, pRight))
+   || (0==pLeft->iNode && SQLITE_OK!=(rc = nodeWrite(pRtree, pLeft)))
+  ){
+    goto splitnode_out;
+  }
+
+  rightbbox.iRowid = pRight->iNode;
+  leftbbox.iRowid = pLeft->iNode;
+
+  if( pNode->iNode==1 ){
+    rc = rtreeInsertCell(pRtree, pLeft->pParent, &leftbbox, iHeight+1);
+    if( rc!=SQLITE_OK ){
+      goto splitnode_out;
+    }
+  }else{
+    RtreeNode *pParent = pLeft->pParent;
+    int iCell;
+    rc = nodeParentIndex(pRtree, pLeft, &iCell);
+    if( rc==SQLITE_OK ){
+      nodeOverwriteCell(pRtree, pParent, &leftbbox, iCell);
+      rc = AdjustTree(pRtree, pParent, &leftbbox);
+    }
+    if( rc!=SQLITE_OK ){
+      goto splitnode_out;
+    }
+  }
+  if( (rc = rtreeInsertCell(pRtree, pRight->pParent, &rightbbox, iHeight+1)) ){
+    goto splitnode_out;
+  }
+
+  for(i=0; i<NCELL(pRight); i++){
+    i64 iRowid = nodeGetRowid(pRtree, pRight, i);
+    rc = updateMapping(pRtree, iRowid, pRight, iHeight);
+    if( iRowid==pCell->iRowid ){
+      newCellIsRight = 1;
+    }
+    if( rc!=SQLITE_OK ){
+      goto splitnode_out;
+    }
+  }
+  if( pNode->iNode==1 ){
+    for(i=0; i<NCELL(pLeft); i++){
+      i64 iRowid = nodeGetRowid(pRtree, pLeft, i);
+      rc = updateMapping(pRtree, iRowid, pLeft, iHeight);
+      if( rc!=SQLITE_OK ){
+        goto splitnode_out;
+      }
+    }
+  }else if( newCellIsRight==0 ){
+    rc = updateMapping(pRtree, pCell->iRowid, pLeft, iHeight);
+  }
+
+  if( rc==SQLITE_OK ){
+    rc = nodeRelease(pRtree, pRight);
+    pRight = 0;
+  }
+  if( rc==SQLITE_OK ){
+    rc = nodeRelease(pRtree, pLeft);
+    pLeft = 0;
+  }
+
+splitnode_out:
+  nodeRelease(pRtree, pRight);
+  nodeRelease(pRtree, pLeft);
+  sqlite3_free(aCell);
+  return rc;
+}
+
+/*
+** If node pLeaf is not the root of the r-tree and its pParent pointer is 
+** still NULL, load all ancestor nodes of pLeaf into memory and populate
+** the pLeaf->pParent chain all the way up to the root node.
+**
+** This operation is required when a row is deleted (or updated - an update
+** is implemented as a delete followed by an insert). SQLite provides the
+** rowid of the row to delete, which can be used to find the leaf on which
+** the entry resides (argument pLeaf). Once the leaf is located, this 
+** function is called to determine its ancestry.
+*/
+static int fixLeafParent(Rtree *pRtree, RtreeNode *pLeaf){
+  int rc = SQLITE_OK;
+  RtreeNode *pChild = pLeaf;
+  while( rc==SQLITE_OK && pChild->iNode!=1 && pChild->pParent==0 ){
+    int rc2 = SQLITE_OK;          /* sqlite3_reset() return code */
+    sqlite3_bind_int64(pRtree->pReadParent, 1, pChild->iNode);
+    rc = sqlite3_step(pRtree->pReadParent);
+    if( rc==SQLITE_ROW ){
+      RtreeNode *pTest;           /* Used to test for reference loops */
+      i64 iNode;                  /* Node number of parent node */
+
+      /* Before setting pChild->pParent, test that we are not creating a
+      ** loop of references (as we would if, say, pChild==pParent). We don't
+      ** want to do this as it leads to a memory leak when trying to delete
+      ** the referenced counted node structures.
+      */
+      iNode = sqlite3_column_int64(pRtree->pReadParent, 0);
+      for(pTest=pLeaf; pTest && pTest->iNode!=iNode; pTest=pTest->pParent);
+      if( !pTest ){
+        rc2 = nodeAcquire(pRtree, iNode, 0, &pChild->pParent);
+      }
+    }
+    rc = sqlite3_reset(pRtree->pReadParent);
+    if( rc==SQLITE_OK ) rc = rc2;
+    if( rc==SQLITE_OK && !pChild->pParent ) rc = SQLITE_CORRUPT;
+    pChild = pChild->pParent;
+  }
+  return rc;
+}
+
+static int deleteCell(Rtree *, RtreeNode *, int, int);
+
+static int removeNode(Rtree *pRtree, RtreeNode *pNode, int iHeight){
+  int rc;
+  int rc2;
+  RtreeNode *pParent;
+  int iCell;
+
+  assert( pNode->nRef==1 );
+
+  /* Remove the entry in the parent cell. */
+  rc = nodeParentIndex(pRtree, pNode, &iCell);
+  if( rc==SQLITE_OK ){
+    pParent = pNode->pParent;
+    pNode->pParent = 0;
+    rc = deleteCell(pRtree, pParent, iCell, iHeight+1);
+  }
+  rc2 = nodeRelease(pRtree, pParent);
+  if( rc==SQLITE_OK ){
+    rc = rc2;
+  }
+  if( rc!=SQLITE_OK ){
+    return rc;
+  }
+
+  /* Remove the xxx_node entry. */
+  sqlite3_bind_int64(pRtree->pDeleteNode, 1, pNode->iNode);
+  sqlite3_step(pRtree->pDeleteNode);
+  if( SQLITE_OK!=(rc = sqlite3_reset(pRtree->pDeleteNode)) ){
+    return rc;
+  }
+
+  /* Remove the xxx_parent entry. */
+  sqlite3_bind_int64(pRtree->pDeleteParent, 1, pNode->iNode);
+  sqlite3_step(pRtree->pDeleteParent);
+  if( SQLITE_OK!=(rc = sqlite3_reset(pRtree->pDeleteParent)) ){
+    return rc;
+  }
+  
+  /* Remove the node from the in-memory hash table and link it into
+  ** the Rtree.pDeleted list. Its contents will be re-inserted later on.
+  */
+  nodeHashDelete(pRtree, pNode);
+  pNode->iNode = iHeight;
+  pNode->pNext = pRtree->pDeleted;
+  pNode->nRef++;
+  pRtree->pDeleted = pNode;
+
+  return SQLITE_OK;
+}
+
+static int fixBoundingBox(Rtree *pRtree, RtreeNode *pNode){
+  RtreeNode *pParent = pNode->pParent;
+  int rc = SQLITE_OK; 
+  if( pParent ){
+    int ii; 
+    int nCell = NCELL(pNode);
+    RtreeCell box;                            /* Bounding box for pNode */
+    nodeGetCell(pRtree, pNode, 0, &box);
+    for(ii=1; ii<nCell; ii++){
+      RtreeCell cell;
+      nodeGetCell(pRtree, pNode, ii, &cell);
+      cellUnion(pRtree, &box, &cell);
+    }
+    box.iRowid = pNode->iNode;
+    rc = nodeParentIndex(pRtree, pNode, &ii);
+    if( rc==SQLITE_OK ){
+      nodeOverwriteCell(pRtree, pParent, &box, ii);
+      rc = fixBoundingBox(pRtree, pParent);
+    }
+  }
+  return rc;
+}
+
+/*
+** Delete the cell at index iCell of node pNode. After removing the
+** cell, adjust the r-tree data structure if required.
+*/
+static int deleteCell(Rtree *pRtree, RtreeNode *pNode, int iCell, int iHeight){
+  RtreeNode *pParent;
+  int rc;
+
+  if( SQLITE_OK!=(rc = fixLeafParent(pRtree, pNode)) ){
+    return rc;
+  }
+
+  /* Remove the cell from the node. This call just moves bytes around
+  ** the in-memory node image, so it cannot fail.
+  */
+  nodeDeleteCell(pRtree, pNode, iCell);
+
+  /* If the node is not the tree root and now has less than the minimum
+  ** number of cells, remove it from the tree. Otherwise, update the
+  ** cell in the parent node so that it tightly contains the updated
+  ** node.
+  */
+  pParent = pNode->pParent;
+  assert( pParent || pNode->iNode==1 );
+  if( pParent ){
+    if( NCELL(pNode)<RTREE_MINCELLS(pRtree) ){
+      rc = removeNode(pRtree, pNode, iHeight);
+    }else{
+      rc = fixBoundingBox(pRtree, pNode);
+    }
+  }
+
+  return rc;
+}
+
+static int Reinsert(
+  Rtree *pRtree, 
+  RtreeNode *pNode, 
+  RtreeCell *pCell, 
+  int iHeight
+){
+  int *aOrder;
+  int *aSpare;
+  RtreeCell *aCell;
+  float *aDistance;
+  int nCell;
+  float aCenterCoord[RTREE_MAX_DIMENSIONS];
+  int iDim;
+  int ii;
+  int rc = SQLITE_OK;
+
+  memset(aCenterCoord, 0, sizeof(float)*RTREE_MAX_DIMENSIONS);
+
+  nCell = NCELL(pNode)+1;
+
+  /* Allocate the buffers used by this operation. The allocation is
+  ** relinquished before this function returns.
+  */
+  aCell = (RtreeCell *)sqlite3_malloc(nCell * (
+    sizeof(RtreeCell) +         /* aCell array */
+    sizeof(int)       +         /* aOrder array */
+    sizeof(int)       +         /* aSpare array */
+    sizeof(float)               /* aDistance array */
+  ));
+  if( !aCell ){
+    return SQLITE_NOMEM;
+  }
+  aOrder    = (int *)&aCell[nCell];
+  aSpare    = (int *)&aOrder[nCell];
+  aDistance = (float *)&aSpare[nCell];
+
+  for(ii=0; ii<nCell; ii++){
+    if( ii==(nCell-1) ){
+      memcpy(&aCell[ii], pCell, sizeof(RtreeCell));
+    }else{
+      nodeGetCell(pRtree, pNode, ii, &aCell[ii]);
+    }
+    aOrder[ii] = ii;
+    for(iDim=0; iDim<pRtree->nDim; iDim++){
+      aCenterCoord[iDim] += DCOORD(aCell[ii].aCoord[iDim*2]);
+      aCenterCoord[iDim] += DCOORD(aCell[ii].aCoord[iDim*2+1]);
+    }
+  }
+  for(iDim=0; iDim<pRtree->nDim; iDim++){
+    aCenterCoord[iDim] = aCenterCoord[iDim]/((float)nCell*2.0);
+  }
+
+  for(ii=0; ii<nCell; ii++){
+    aDistance[ii] = 0.0;
+    for(iDim=0; iDim<pRtree->nDim; iDim++){
+      float coord = DCOORD(aCell[ii].aCoord[iDim*2+1]) - 
+          DCOORD(aCell[ii].aCoord[iDim*2]);
+      aDistance[ii] += (coord-aCenterCoord[iDim])*(coord-aCenterCoord[iDim]);
+    }
+  }
+
+  SortByDistance(aOrder, nCell, aDistance, aSpare);
+  nodeZero(pRtree, pNode);
+
+  for(ii=0; rc==SQLITE_OK && ii<(nCell-(RTREE_MINCELLS(pRtree)+1)); ii++){
+    RtreeCell *p = &aCell[aOrder[ii]];
+    nodeInsertCell(pRtree, pNode, p);
+    if( p->iRowid==pCell->iRowid ){
+      if( iHeight==0 ){
+        rc = rowidWrite(pRtree, p->iRowid, pNode->iNode);
+      }else{
+        rc = parentWrite(pRtree, p->iRowid, pNode->iNode);
+      }
+    }
+  }
+  if( rc==SQLITE_OK ){
+    rc = fixBoundingBox(pRtree, pNode);
+  }
+  for(; rc==SQLITE_OK && ii<nCell; ii++){
+    /* Find a node to store this cell in. pNode->iNode currently contains
+    ** the height of the sub-tree headed by the cell.
+    */
+    RtreeNode *pInsert;
+    RtreeCell *p = &aCell[aOrder[ii]];
+    rc = ChooseLeaf(pRtree, p, iHeight, &pInsert);
+    if( rc==SQLITE_OK ){
+      int rc2;
+      rc = rtreeInsertCell(pRtree, pInsert, p, iHeight);
+      rc2 = nodeRelease(pRtree, pInsert);
+      if( rc==SQLITE_OK ){
+        rc = rc2;
+      }
+    }
+  }
+
+  sqlite3_free(aCell);
+  return rc;
+}
+
+/*
+** Insert cell pCell into node pNode. Node pNode is the head of a 
+** subtree iHeight high (leaf nodes have iHeight==0).
+*/
+static int rtreeInsertCell(
+  Rtree *pRtree,
+  RtreeNode *pNode,
+  RtreeCell *pCell,
+  int iHeight
+){
+  int rc = SQLITE_OK;
+  if( iHeight>0 ){
+    RtreeNode *pChild = nodeHashLookup(pRtree, pCell->iRowid);
+    if( pChild ){
+      nodeRelease(pRtree, pChild->pParent);
+      nodeReference(pNode);
+      pChild->pParent = pNode;
+    }
+  }
+  if( nodeInsertCell(pRtree, pNode, pCell) ){
+#if VARIANT_RSTARTREE_REINSERT
+    if( iHeight<=pRtree->iReinsertHeight || pNode->iNode==1){
+      rc = SplitNode(pRtree, pNode, pCell, iHeight);
+    }else{
+      pRtree->iReinsertHeight = iHeight;
+      rc = Reinsert(pRtree, pNode, pCell, iHeight);
+    }
+#else
+    rc = SplitNode(pRtree, pNode, pCell, iHeight);
+#endif
+  }else{
+    rc = AdjustTree(pRtree, pNode, pCell);
+    if( rc==SQLITE_OK ){
+      if( iHeight==0 ){
+        rc = rowidWrite(pRtree, pCell->iRowid, pNode->iNode);
+      }else{
+        rc = parentWrite(pRtree, pCell->iRowid, pNode->iNode);
+      }
+    }
+  }
+  return rc;
+}
+
+static int reinsertNodeContent(Rtree *pRtree, RtreeNode *pNode){
+  int ii;
+  int rc = SQLITE_OK;
+  int nCell = NCELL(pNode);
+
+  for(ii=0; rc==SQLITE_OK && ii<nCell; ii++){
+    RtreeNode *pInsert;
+    RtreeCell cell;
+    nodeGetCell(pRtree, pNode, ii, &cell);
+
+    /* Find a node to store this cell in. pNode->iNode currently contains
+    ** the height of the sub-tree headed by the cell.
+    */
+    rc = ChooseLeaf(pRtree, &cell, pNode->iNode, &pInsert);
+    if( rc==SQLITE_OK ){
+      int rc2;
+      rc = rtreeInsertCell(pRtree, pInsert, &cell, pNode->iNode);
+      rc2 = nodeRelease(pRtree, pInsert);
+      if( rc==SQLITE_OK ){
+        rc = rc2;
+      }
+    }
+  }
+  return rc;
+}
+
+/*
+** Select a currently unused rowid for a new r-tree record.
+*/
+static int newRowid(Rtree *pRtree, i64 *piRowid){
+  int rc;
+  sqlite3_bind_null(pRtree->pWriteRowid, 1);
+  sqlite3_bind_null(pRtree->pWriteRowid, 2);
+  sqlite3_step(pRtree->pWriteRowid);
+  rc = sqlite3_reset(pRtree->pWriteRowid);
+  *piRowid = sqlite3_last_insert_rowid(pRtree->db);
+  return rc;
+}
+
+/*
+** The xUpdate method for rtree module virtual tables.
+*/
+static int rtreeUpdate(
+  sqlite3_vtab *pVtab, 
+  int nData, 
+  sqlite3_value **azData, 
+  sqlite_int64 *pRowid
+){
+  Rtree *pRtree = (Rtree *)pVtab;
+  int rc = SQLITE_OK;
+
+  rtreeReference(pRtree);
+
+  assert(nData>=1);
+
+  /* If azData[0] is not an SQL NULL value, it is the rowid of a
+  ** record to delete from the r-tree table. The following block does
+  ** just that.
+  */
+  if( sqlite3_value_type(azData[0])!=SQLITE_NULL ){
+    i64 iDelete;                /* The rowid to delete */
+    RtreeNode *pLeaf;           /* Leaf node containing record iDelete */
+    int iCell;                  /* Index of iDelete cell in pLeaf */
+    RtreeNode *pRoot;
+
+    /* Obtain a reference to the root node to initialise Rtree.iDepth */
+    rc = nodeAcquire(pRtree, 1, 0, &pRoot);
+
+    /* Obtain a reference to the leaf node that contains the entry 
+    ** about to be deleted. 
+    */
+    if( rc==SQLITE_OK ){
+      iDelete = sqlite3_value_int64(azData[0]);
+      rc = findLeafNode(pRtree, iDelete, &pLeaf);
+    }
+
+    /* Delete the cell in question from the leaf node. */
+    if( rc==SQLITE_OK ){
+      int rc2;
+      rc = nodeRowidIndex(pRtree, pLeaf, iDelete, &iCell);
+      if( rc==SQLITE_OK ){
+        rc = deleteCell(pRtree, pLeaf, iCell, 0);
+      }
+      rc2 = nodeRelease(pRtree, pLeaf);
+      if( rc==SQLITE_OK ){
+        rc = rc2;
+      }
+    }
+
+    /* Delete the corresponding entry in the <rtree>_rowid table. */
+    if( rc==SQLITE_OK ){
+      sqlite3_bind_int64(pRtree->pDeleteRowid, 1, iDelete);
+      sqlite3_step(pRtree->pDeleteRowid);
+      rc = sqlite3_reset(pRtree->pDeleteRowid);
+    }
+
+    /* Check if the root node now has exactly one child. If so, remove
+    ** it, schedule the contents of the child for reinsertion and 
+    ** reduce the tree height by one.
+    **
+    ** This is equivalent to copying the contents of the child into
+    ** the root node (the operation that Gutman's paper says to perform 
+    ** in this scenario).
+    */
+    if( rc==SQLITE_OK && pRtree->iDepth>0 && NCELL(pRoot)==1 ){
+      int rc2;
+      RtreeNode *pChild;
+      i64 iChild = nodeGetRowid(pRtree, pRoot, 0);
+      rc = nodeAcquire(pRtree, iChild, pRoot, &pChild);
+      if( rc==SQLITE_OK ){
+        rc = removeNode(pRtree, pChild, pRtree->iDepth-1);
+      }
+      rc2 = nodeRelease(pRtree, pChild);
+      if( rc==SQLITE_OK ) rc = rc2;
+      if( rc==SQLITE_OK ){
+        pRtree->iDepth--;
+        writeInt16(pRoot->zData, pRtree->iDepth);
+        pRoot->isDirty = 1;
+      }
+    }
+
+    /* Re-insert the contents of any underfull nodes removed from the tree. */
+    for(pLeaf=pRtree->pDeleted; pLeaf; pLeaf=pRtree->pDeleted){
+      if( rc==SQLITE_OK ){
+        rc = reinsertNodeContent(pRtree, pLeaf);
+      }
+      pRtree->pDeleted = pLeaf->pNext;
+      sqlite3_free(pLeaf);
+    }
+
+    /* Release the reference to the root node. */
+    if( rc==SQLITE_OK ){
+      rc = nodeRelease(pRtree, pRoot);
+    }else{
+      nodeRelease(pRtree, pRoot);
+    }
+  }
+
+  /* If the azData[] array contains more than one element, elements
+  ** (azData[2]..azData[argc-1]) contain a new record to insert into
+  ** the r-tree structure.
+  */
+  if( rc==SQLITE_OK && nData>1 ){
+    /* Insert a new record into the r-tree */
+    RtreeCell cell;
+    int ii;
+    RtreeNode *pLeaf;
+
+    /* Populate the cell.aCoord[] array. The first coordinate is azData[3]. */
+    assert( nData==(pRtree->nDim*2 + 3) );
+    if( pRtree->eCoordType==RTREE_COORD_REAL32 ){
+      for(ii=0; ii<(pRtree->nDim*2); ii+=2){
+        cell.aCoord[ii].f = (float)sqlite3_value_double(azData[ii+3]);
+        cell.aCoord[ii+1].f = (float)sqlite3_value_double(azData[ii+4]);
+        if( cell.aCoord[ii].f>cell.aCoord[ii+1].f ){
+          rc = SQLITE_CONSTRAINT;
+          goto constraint;
+        }
+      }
+    }else{
+      for(ii=0; ii<(pRtree->nDim*2); ii+=2){
+        cell.aCoord[ii].i = sqlite3_value_int(azData[ii+3]);
+        cell.aCoord[ii+1].i = sqlite3_value_int(azData[ii+4]);
+        if( cell.aCoord[ii].i>cell.aCoord[ii+1].i ){
+          rc = SQLITE_CONSTRAINT;
+          goto constraint;
+        }
+      }
+    }
+
+    /* Figure out the rowid of the new row. */
+    if( sqlite3_value_type(azData[2])==SQLITE_NULL ){
+      rc = newRowid(pRtree, &cell.iRowid);
+    }else{
+      cell.iRowid = sqlite3_value_int64(azData[2]);
+      sqlite3_bind_int64(pRtree->pReadRowid, 1, cell.iRowid);
+      if( SQLITE_ROW==sqlite3_step(pRtree->pReadRowid) ){
+        sqlite3_reset(pRtree->pReadRowid);
+        rc = SQLITE_CONSTRAINT;
+        goto constraint;
+      }
+      rc = sqlite3_reset(pRtree->pReadRowid);
+    }
+    *pRowid = cell.iRowid;
+
+    if( rc==SQLITE_OK ){
+      rc = ChooseLeaf(pRtree, &cell, 0, &pLeaf);
+    }
+    if( rc==SQLITE_OK ){
+      int rc2;
+      pRtree->iReinsertHeight = -1;
+      rc = rtreeInsertCell(pRtree, pLeaf, &cell, 0);
+      rc2 = nodeRelease(pRtree, pLeaf);
+      if( rc==SQLITE_OK ){
+        rc = rc2;
+      }
+    }
+  }
+
+constraint:
+  rtreeRelease(pRtree);
+  return rc;
+}
+
+/*
+** The xRename method for rtree module virtual tables.
+*/
+static int rtreeRename(sqlite3_vtab *pVtab, const char *zNewName){
+  Rtree *pRtree = (Rtree *)pVtab;
+  int rc = SQLITE_NOMEM;
+  char *zSql = sqlite3_mprintf(
+    "ALTER TABLE %Q.'%q_node'   RENAME TO \"%w_node\";"
+    "ALTER TABLE %Q.'%q_parent' RENAME TO \"%w_parent\";"
+    "ALTER TABLE %Q.'%q_rowid'  RENAME TO \"%w_rowid\";"
+    , pRtree->zDb, pRtree->zName, zNewName 
+    , pRtree->zDb, pRtree->zName, zNewName 
+    , pRtree->zDb, pRtree->zName, zNewName
+  );
+  if( zSql ){
+    rc = sqlite3_exec(pRtree->db, zSql, 0, 0, 0);
+    sqlite3_free(zSql);
+  }
+  return rc;
+}
+
+static sqlite3_module rtreeModule = {
+  0,                         /* iVersion */
+  rtreeCreate,                /* xCreate - create a table */
+  rtreeConnect,               /* xConnect - connect to an existing table */
+  rtreeBestIndex,             /* xBestIndex - Determine search strategy */
+  rtreeDisconnect,            /* xDisconnect - Disconnect from a table */
+  rtreeDestroy,               /* xDestroy - Drop a table */
+  rtreeOpen,                  /* xOpen - open a cursor */
+  rtreeClose,                 /* xClose - close a cursor */
+  rtreeFilter,                /* xFilter - configure scan constraints */
+  rtreeNext,                  /* xNext - advance a cursor */
+  rtreeEof,                   /* xEof */
+  rtreeColumn,                /* xColumn - read data */
+  rtreeRowid,                 /* xRowid - read data */
+  rtreeUpdate,                /* xUpdate - write data */
+  0,                          /* xBegin - begin transaction */
+  0,                          /* xSync - sync transaction */
+  0,                          /* xCommit - commit transaction */
+  0,                          /* xRollback - rollback transaction */
+  0,                          /* xFindFunction - function overloading */
+  rtreeRename                 /* xRename - rename the table */
+};
+
+static int rtreeSqlInit(
+  Rtree *pRtree, 
+  sqlite3 *db, 
+  const char *zDb, 
+  const char *zPrefix, 
+  int isCreate
+){
+  int rc = SQLITE_OK;
+
+  #define N_STATEMENT 9
+  static const char *azSql[N_STATEMENT] = {
+    /* Read and write the xxx_node table */
+    "SELECT data FROM '%q'.'%q_node' WHERE nodeno = :1",
+    "INSERT OR REPLACE INTO '%q'.'%q_node' VALUES(:1, :2)",
+    "DELETE FROM '%q'.'%q_node' WHERE nodeno = :1",
+
+    /* Read and write the xxx_rowid table */
+    "SELECT nodeno FROM '%q'.'%q_rowid' WHERE rowid = :1",
+    "INSERT OR REPLACE INTO '%q'.'%q_rowid' VALUES(:1, :2)",
+    "DELETE FROM '%q'.'%q_rowid' WHERE rowid = :1",
+
+    /* Read and write the xxx_parent table */
+    "SELECT parentnode FROM '%q'.'%q_parent' WHERE nodeno = :1",
+    "INSERT OR REPLACE INTO '%q'.'%q_parent' VALUES(:1, :2)",
+    "DELETE FROM '%q'.'%q_parent' WHERE nodeno = :1"
+  };
+  sqlite3_stmt **appStmt[N_STATEMENT];
+  int i;
+
+  pRtree->db = db;
+
+  if( isCreate ){
+    char *zCreate = sqlite3_mprintf(
+"CREATE TABLE \"%w\".\"%w_node\"(nodeno INTEGER PRIMARY KEY, data BLOB);"
+"CREATE TABLE \"%w\".\"%w_rowid\"(rowid INTEGER PRIMARY KEY, nodeno INTEGER);"
+"CREATE TABLE \"%w\".\"%w_parent\"(nodeno INTEGER PRIMARY KEY, parentnode INTEGER);"
+"INSERT INTO '%q'.'%q_node' VALUES(1, zeroblob(%d))",
+      zDb, zPrefix, zDb, zPrefix, zDb, zPrefix, zDb, zPrefix, pRtree->iNodeSize
+    );
+    if( !zCreate ){
+      return SQLITE_NOMEM;
+    }
+    rc = sqlite3_exec(db, zCreate, 0, 0, 0);
+    sqlite3_free(zCreate);
+    if( rc!=SQLITE_OK ){
+      return rc;
+    }
+  }
+
+  appStmt[0] = &pRtree->pReadNode;
+  appStmt[1] = &pRtree->pWriteNode;
+  appStmt[2] = &pRtree->pDeleteNode;
+  appStmt[3] = &pRtree->pReadRowid;
+  appStmt[4] = &pRtree->pWriteRowid;
+  appStmt[5] = &pRtree->pDeleteRowid;
+  appStmt[6] = &pRtree->pReadParent;
+  appStmt[7] = &pRtree->pWriteParent;
+  appStmt[8] = &pRtree->pDeleteParent;
+
+  for(i=0; i<N_STATEMENT && rc==SQLITE_OK; i++){
+    char *zSql = sqlite3_mprintf(azSql[i], zDb, zPrefix);
+    if( zSql ){
+      rc = sqlite3_prepare_v2(db, zSql, -1, appStmt[i], 0); 
+    }else{
+      rc = SQLITE_NOMEM;
+    }
+    sqlite3_free(zSql);
+  }
+
+  return rc;
+}
+
+/*
+** The second argument to this function contains the text of an SQL statement
+** that returns a single integer value. The statement is compiled and executed
+** using database connection db. If successful, the integer value returned
+** is written to *piVal and SQLITE_OK returned. Otherwise, an SQLite error
+** code is returned and the value of *piVal after returning is not defined.
+*/
+static int getIntFromStmt(sqlite3 *db, const char *zSql, int *piVal){
+  int rc = SQLITE_NOMEM;
+  if( zSql ){
+    sqlite3_stmt *pStmt = 0;
+    rc = sqlite3_prepare_v2(db, zSql, -1, &pStmt, 0);
+    if( rc==SQLITE_OK ){
+      if( SQLITE_ROW==sqlite3_step(pStmt) ){
+        *piVal = sqlite3_column_int(pStmt, 0);
+      }
+      rc = sqlite3_finalize(pStmt);
+    }
+  }
+  return rc;
+}
+
+/*
+** This function is called from within the xConnect() or xCreate() method to
+** determine the node-size used by the rtree table being created or connected
+** to. If successful, pRtree->iNodeSize is populated and SQLITE_OK returned.
+** Otherwise, an SQLite error code is returned.
+**
+** If this function is being called as part of an xConnect(), then the rtree
+** table already exists. In this case the node-size is determined by inspecting
+** the root node of the tree.
+**
+** Otherwise, for an xCreate(), use 64 bytes less than the database page-size. 
+** This ensures that each node is stored on a single database page. If the 
+** database page-size is so large that more than RTREE_MAXCELLS entries 
+** would fit in a single node, use a smaller node-size.
+*/
+static int getNodeSize(
+  sqlite3 *db,                    /* Database handle */
+  Rtree *pRtree,                  /* Rtree handle */
+  int isCreate                    /* True for xCreate, false for xConnect */
+){
+  int rc;
+  char *zSql;
+  if( isCreate ){
+    int iPageSize;
+    zSql = sqlite3_mprintf("PRAGMA %Q.page_size", pRtree->zDb);
+    rc = getIntFromStmt(db, zSql, &iPageSize);
+    if( rc==SQLITE_OK ){
+      pRtree->iNodeSize = iPageSize-64;
+      if( (4+pRtree->nBytesPerCell*RTREE_MAXCELLS)<pRtree->iNodeSize ){
+        pRtree->iNodeSize = 4+pRtree->nBytesPerCell*RTREE_MAXCELLS;
+      }
+    }
+  }else{
+    zSql = sqlite3_mprintf(
+        "SELECT length(data) FROM '%q'.'%q_node' WHERE nodeno = 1",
+        pRtree->zDb, pRtree->zName
+    );
+    rc = getIntFromStmt(db, zSql, &pRtree->iNodeSize);
+  }
+
+  sqlite3_free(zSql);
+  return rc;
+}
+
+/* 
+** This function is the implementation of both the xConnect and xCreate
+** methods of the r-tree virtual table.
+**
+**   argv[0]   -> module name
+**   argv[1]   -> database name
+**   argv[2]   -> table name
+**   argv[...] -> column names...
+*/
+static int rtreeInit(
+  sqlite3 *db,                        /* Database connection */
+  void *pAux,                         /* One of the RTREE_COORD_* constants */
+  int argc, const char *const*argv,   /* Parameters to CREATE TABLE statement */
+  sqlite3_vtab **ppVtab,              /* OUT: New virtual table */
+  char **pzErr,                       /* OUT: Error message, if any */
+  int isCreate                        /* True for xCreate, false for xConnect */
+){
+  int rc = SQLITE_OK;
+  Rtree *pRtree;
+  int nDb;              /* Length of string argv[1] */
+  int nName;            /* Length of string argv[2] */
+  int eCoordType = (pAux ? RTREE_COORD_INT32 : RTREE_COORD_REAL32);
+
+  const char *aErrMsg[] = {
+    0,                                                    /* 0 */
+    "Wrong number of columns for an rtree table",         /* 1 */
+    "Too few columns for an rtree table",                 /* 2 */
+    "Too many columns for an rtree table"                 /* 3 */
+  };
+
+  int iErr = (argc<6) ? 2 : argc>(RTREE_MAX_DIMENSIONS*2+4) ? 3 : argc%2;
+  if( aErrMsg[iErr] ){
+    *pzErr = sqlite3_mprintf("%s", aErrMsg[iErr]);
+    return SQLITE_ERROR;
+  }
+
+  /* Allocate the sqlite3_vtab structure */
+  nDb = strlen(argv[1]);
+  nName = strlen(argv[2]);
+  pRtree = (Rtree *)sqlite3_malloc(sizeof(Rtree)+nDb+nName+2);
+  if( !pRtree ){
+    return SQLITE_NOMEM;
+  }
+  memset(pRtree, 0, sizeof(Rtree)+nDb+nName+2);
+  pRtree->nBusy = 1;
+  pRtree->base.pModule = &rtreeModule;
+  pRtree->zDb = (char *)&pRtree[1];
+  pRtree->zName = &pRtree->zDb[nDb+1];
+  pRtree->nDim = (argc-4)/2;
+  pRtree->nBytesPerCell = 8 + pRtree->nDim*4*2;
+  pRtree->eCoordType = eCoordType;
+  memcpy(pRtree->zDb, argv[1], nDb);
+  memcpy(pRtree->zName, argv[2], nName);
+
+  /* Figure out the node size to use. */
+  rc = getNodeSize(db, pRtree, isCreate);
+
+  /* Create/Connect to the underlying relational database schema. If
+  ** that is successful, call sqlite3_declare_vtab() to configure
+  ** the r-tree table schema.
+  */
+  if( rc==SQLITE_OK ){
+    if( (rc = rtreeSqlInit(pRtree, db, argv[1], argv[2], isCreate)) ){
+      *pzErr = sqlite3_mprintf("%s", sqlite3_errmsg(db));
+    }else{
+      char *zSql = sqlite3_mprintf("CREATE TABLE x(%s", argv[3]);
+      char *zTmp;
+      int ii;
+      for(ii=4; zSql && ii<argc; ii++){
+        zTmp = zSql;
+        zSql = sqlite3_mprintf("%s, %s", zTmp, argv[ii]);
+        sqlite3_free(zTmp);
+      }
+      if( zSql ){
+        zTmp = zSql;
+        zSql = sqlite3_mprintf("%s);", zTmp);
+        sqlite3_free(zTmp);
+      }
+      if( !zSql ){
+        rc = SQLITE_NOMEM;
+      }else if( SQLITE_OK!=(rc = sqlite3_declare_vtab(db, zSql)) ){
+        *pzErr = sqlite3_mprintf("%s", sqlite3_errmsg(db));
+      }
+      sqlite3_free(zSql);
+    }
+  }
+
+  if( rc==SQLITE_OK ){
+    *ppVtab = (sqlite3_vtab *)pRtree;
+  }else{
+    rtreeRelease(pRtree);
+  }
+  return rc;
+}
+
+
+/*
+** Implementation of a scalar function that decodes r-tree nodes to
+** human readable strings. This can be used for debugging and analysis.
+**
+** The scalar function takes two arguments, a blob of data containing
+** an r-tree node, and the number of dimensions the r-tree indexes.
+** For a two-dimensional r-tree structure called "rt", to deserialize
+** all nodes, a statement like:
+**
+**   SELECT rtreenode(2, data) FROM rt_node;
+**
+** The human readable string takes the form of a Tcl list with one
+** entry for each cell in the r-tree node. Each entry is itself a
+** list, containing the 8-byte rowid/pageno followed by the 
+** <num-dimension>*2 coordinates.
+*/
+static void rtreenode(sqlite3_context *ctx, int nArg, sqlite3_value **apArg){
+  char *zText = 0;
+  RtreeNode node;
+  Rtree tree;
+  int ii;
+
+  UNUSED_PARAMETER(nArg);
+  memset(&node, 0, sizeof(RtreeNode));
+  memset(&tree, 0, sizeof(Rtree));
+  tree.nDim = sqlite3_value_int(apArg[0]);
+  tree.nBytesPerCell = 8 + 8 * tree.nDim;
+  node.zData = (u8 *)sqlite3_value_blob(apArg[1]);
+
+  for(ii=0; ii<NCELL(&node); ii++){
+    char zCell[512];
+    int nCell = 0;
+    RtreeCell cell;
+    int jj;
+
+    nodeGetCell(&tree, &node, ii, &cell);
+    sqlite3_snprintf(512-nCell,&zCell[nCell],"%lld", cell.iRowid);
+    nCell = strlen(zCell);
+    for(jj=0; jj<tree.nDim*2; jj++){
+      sqlite3_snprintf(512-nCell,&zCell[nCell]," %f",(double)cell.aCoord[jj].f);
+      nCell = strlen(zCell);
+    }
+
+    if( zText ){
+      char *zTextNew = sqlite3_mprintf("%s {%s}", zText, zCell);
+      sqlite3_free(zText);
+      zText = zTextNew;
+    }else{
+      zText = sqlite3_mprintf("{%s}", zCell);
+    }
+  }
+  
+  sqlite3_result_text(ctx, zText, -1, sqlite3_free);
+}
+
+static void rtreedepth(sqlite3_context *ctx, int nArg, sqlite3_value **apArg){
+  UNUSED_PARAMETER(nArg);
+  if( sqlite3_value_type(apArg[0])!=SQLITE_BLOB 
+   || sqlite3_value_bytes(apArg[0])<2
+  ){
+    sqlite3_result_error(ctx, "Invalid argument to rtreedepth()", -1); 
+  }else{
+    u8 *zBlob = (u8 *)sqlite3_value_blob(apArg[0]);
+    sqlite3_result_int(ctx, readInt16(zBlob));
+  }
+}
+
+/*
+** Register the r-tree module with database handle db. This creates the
+** virtual table module "rtree" and the debugging/analysis scalar 
+** function "rtreenode".
+*/
+SQLITE_PRIVATE int sqlite3RtreeInit(sqlite3 *db){
+  const int utf8 = SQLITE_UTF8;
+  int rc;
+
+  rc = sqlite3_create_function(db, "rtreenode", 2, utf8, 0, rtreenode, 0, 0);
+  if( rc==SQLITE_OK ){
+    rc = sqlite3_create_function(db, "rtreedepth", 1, utf8, 0,rtreedepth, 0, 0);
+  }
+  if( rc==SQLITE_OK ){
+    void *c = (void *)RTREE_COORD_REAL32;
+    rc = sqlite3_create_module_v2(db, "rtree", &rtreeModule, c, 0);
+  }
+  if( rc==SQLITE_OK ){
+    void *c = (void *)RTREE_COORD_INT32;
+    rc = sqlite3_create_module_v2(db, "rtree_i32", &rtreeModule, c, 0);
+  }
+
+  return rc;
+}
+
+/*
+** A version of sqlite3_free() that can be used as a callback. This is used
+** in two places - as the destructor for the blob value returned by the
+** invocation of a geometry function, and as the destructor for the geometry
+** functions themselves.
+*/
+static void doSqlite3Free(void *p){
+  sqlite3_free(p);
+}
+
+/*
+** Each call to sqlite3_rtree_geometry_callback() creates an ordinary SQLite
+** scalar user function. This C function is the callback used for all such
+** registered SQL functions.
+**
+** The scalar user functions return a blob that is interpreted by r-tree
+** table MATCH operators.
+*/
+static void geomCallback(sqlite3_context *ctx, int nArg, sqlite3_value **aArg){
+  RtreeGeomCallback *pGeomCtx = (RtreeGeomCallback *)sqlite3_user_data(ctx);
+  RtreeMatchArg *pBlob;
+  int nBlob;
+
+  nBlob = sizeof(RtreeMatchArg) + (nArg-1)*sizeof(double);
+  pBlob = (RtreeMatchArg *)sqlite3_malloc(nBlob);
+  if( !pBlob ){
+    sqlite3_result_error_nomem(ctx);
+  }else{
+    int i;
+    pBlob->magic = RTREE_GEOMETRY_MAGIC;
+    pBlob->xGeom = pGeomCtx->xGeom;
+    pBlob->pContext = pGeomCtx->pContext;
+    pBlob->nParam = nArg;
+    for(i=0; i<nArg; i++){
+      pBlob->aParam[i] = sqlite3_value_double(aArg[i]);
+    }
+    sqlite3_result_blob(ctx, pBlob, nBlob, doSqlite3Free);
+  }
+}
+
+/*
+** Register a new geometry function for use with the r-tree MATCH operator.
+*/
+SQLITE_API int sqlite3_rtree_geometry_callback(
+  sqlite3 *db,
+  const char *zGeom,
+  int (*xGeom)(sqlite3_rtree_geometry *, int, double *, int *),
+  void *pContext
+){
+  RtreeGeomCallback *pGeomCtx;      /* Context object for new user-function */
+
+  /* Allocate and populate the context object. */
+  pGeomCtx = (RtreeGeomCallback *)sqlite3_malloc(sizeof(RtreeGeomCallback));
+  if( !pGeomCtx ) return SQLITE_NOMEM;
+  pGeomCtx->xGeom = xGeom;
+  pGeomCtx->pContext = pContext;
+
+  /* Create the new user-function. Register a destructor function to delete
+  ** the context object when it is no longer required.  */
+  return sqlite3_create_function_v2(db, zGeom, -1, SQLITE_ANY, 
+      (void *)pGeomCtx, geomCallback, 0, 0, doSqlite3Free
+  );
+}
+
+#if !SQLITE_CORE
+SQLITE_API int sqlite3_extension_init(
+  sqlite3 *db,
+  char **pzErrMsg,
+  const sqlite3_api_routines *pApi
+){
+  SQLITE_EXTENSION_INIT2(pApi)
+  return sqlite3RtreeInit(db);
+}
+#endif
+
+#endif
+
+/************** End of rtree.c ***********************************************/
+/************** Begin file icu.c *********************************************/
+/*
+** 2007 May 6
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** $Id: sqlite3.c $
+**
+** This file implements an integration between the ICU library 
+** ("International Components for Unicode", an open-source library 
+** for handling unicode data) and SQLite. The integration uses 
+** ICU to provide the following to SQLite:
+**
+**   * An implementation of the SQL regexp() function (and hence REGEXP
+**     operator) using the ICU uregex_XX() APIs.
+**
+**   * Implementations of the SQL scalar upper() and lower() functions
+**     for case mapping.
+**
+**   * Integration of ICU and SQLite collation seqences.
+**
+**   * An implementation of the LIKE operator that uses ICU to 
+**     provide case-independent matching.
+*/
+
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_ICU)
+
+/* Include ICU headers */
+#include <unicode/utypes.h>
+#include <unicode/uregex.h>
+#include <unicode/ustring.h>
+#include <unicode/ucol.h>
+
+
+#ifndef SQLITE_CORE
+  SQLITE_EXTENSION_INIT1
+#else
+#endif
+
+/*
+** Maximum length (in bytes) of the pattern in a LIKE or GLOB
+** operator.
+*/
+#ifndef SQLITE_MAX_LIKE_PATTERN_LENGTH
+# define SQLITE_MAX_LIKE_PATTERN_LENGTH 50000
+#endif
+
+/*
+** Version of sqlite3_free() that is always a function, never a macro.
+*/
+static void xFree(void *p){
+  sqlite3_free(p);
+}
+
+/*
+** Compare two UTF-8 strings for equality where the first string is
+** a "LIKE" expression. Return true (1) if they are the same and 
+** false (0) if they are different.
+*/
+static int icuLikeCompare(
+  const uint8_t *zPattern,   /* LIKE pattern */
+  const uint8_t *zString,    /* The UTF-8 string to compare against */
+  const UChar32 uEsc         /* The escape character */
+){
+  static const int MATCH_ONE = (UChar32)'_';
+  static const int MATCH_ALL = (UChar32)'%';
+
+  int iPattern = 0;       /* Current byte index in zPattern */
+  int iString = 0;        /* Current byte index in zString */
+
+  int prevEscape = 0;     /* True if the previous character was uEsc */
+
+  while( zPattern[iPattern]!=0 ){
+
+    /* Read (and consume) the next character from the input pattern. */
+    UChar32 uPattern;
+    U8_NEXT_UNSAFE(zPattern, iPattern, uPattern);
+    assert(uPattern!=0);
+
+    /* There are now 4 possibilities:
+    **
+    **     1. uPattern is an unescaped match-all character "%",
+    **     2. uPattern is an unescaped match-one character "_",
+    **     3. uPattern is an unescaped escape character, or
+    **     4. uPattern is to be handled as an ordinary character
+    */
+    if( !prevEscape && uPattern==MATCH_ALL ){
+      /* Case 1. */
+      uint8_t c;
+
+      /* Skip any MATCH_ALL or MATCH_ONE characters that follow a
+      ** MATCH_ALL. For each MATCH_ONE, skip one character in the 
+      ** test string.
+      */
+      while( (c=zPattern[iPattern]) == MATCH_ALL || c == MATCH_ONE ){
+        if( c==MATCH_ONE ){
+          if( zString[iString]==0 ) return 0;
+          U8_FWD_1_UNSAFE(zString, iString);
+        }
+        iPattern++;
+      }
+
+      if( zPattern[iPattern]==0 ) return 1;
+
+      while( zString[iString] ){
+        if( icuLikeCompare(&zPattern[iPattern], &zString[iString], uEsc) ){
+          return 1;
+        }
+        U8_FWD_1_UNSAFE(zString, iString);
+      }
+      return 0;
+
+    }else if( !prevEscape && uPattern==MATCH_ONE ){
+      /* Case 2. */
+      if( zString[iString]==0 ) return 0;
+      U8_FWD_1_UNSAFE(zString, iString);
+
+    }else if( !prevEscape && uPattern==uEsc){
+      /* Case 3. */
+      prevEscape = 1;
+
+    }else{
+      /* Case 4. */
+      UChar32 uString;
+      U8_NEXT_UNSAFE(zString, iString, uString);
+      uString = u_foldCase(uString, U_FOLD_CASE_DEFAULT);
+      uPattern = u_foldCase(uPattern, U_FOLD_CASE_DEFAULT);
+      if( uString!=uPattern ){
+        return 0;
+      }
+      prevEscape = 0;
+    }
+  }
+
+  return zString[iString]==0;
+}
+
+/*
+** Implementation of the like() SQL function.  This function implements
+** the build-in LIKE operator.  The first argument to the function is the
+** pattern and the second argument is the string.  So, the SQL statements:
+**
+**       A LIKE B
+**
+** is implemented as like(B, A). If there is an escape character E, 
+**
+**       A LIKE B ESCAPE E
+**
+** is mapped to like(B, A, E).
+*/
+static void icuLikeFunc(
+  sqlite3_context *context, 
+  int argc, 
+  sqlite3_value **argv
+){
+  const unsigned char *zA = sqlite3_value_text(argv[0]);
+  const unsigned char *zB = sqlite3_value_text(argv[1]);
+  UChar32 uEsc = 0;
+
+  /* Limit the length of the LIKE or GLOB pattern to avoid problems
+  ** of deep recursion and N*N behavior in patternCompare().
+  */
+  if( sqlite3_value_bytes(argv[0])>SQLITE_MAX_LIKE_PATTERN_LENGTH ){
+    sqlite3_result_error(context, "LIKE or GLOB pattern too complex", -1);
+    return;
+  }
+
+
+  if( argc==3 ){
+    /* The escape character string must consist of a single UTF-8 character.
+    ** Otherwise, return an error.
+    */
+    int nE= sqlite3_value_bytes(argv[2]);
+    const unsigned char *zE = sqlite3_value_text(argv[2]);
+    int i = 0;
+    if( zE==0 ) return;
+    U8_NEXT(zE, i, nE, uEsc);
+    if( i!=nE){
+      sqlite3_result_error(context, 
+          "ESCAPE expression must be a single character", -1);
+      return;
+    }
+  }
+
+  if( zA && zB ){
+    sqlite3_result_int(context, icuLikeCompare(zA, zB, uEsc));
+  }
+}
+
+/*
+** This function is called when an ICU function called from within
+** the implementation of an SQL scalar function returns an error.
+**
+** The scalar function context passed as the first argument is 
+** loaded with an error message based on the following two args.
+*/
+static void icuFunctionError(
+  sqlite3_context *pCtx,       /* SQLite scalar function context */
+  const char *zName,           /* Name of ICU function that failed */
+  UErrorCode e                 /* Error code returned by ICU function */
+){
+  char zBuf[128];
+  sqlite3_snprintf(128, zBuf, "ICU error: %s(): %s", zName, u_errorName(e));
+  zBuf[127] = '\0';
+  sqlite3_result_error(pCtx, zBuf, -1);
+}
+
+/*
+** Function to delete compiled regexp objects. Registered as
+** a destructor function with sqlite3_set_auxdata().
+*/
+static void icuRegexpDelete(void *p){
+  URegularExpression *pExpr = (URegularExpression *)p;
+  uregex_close(pExpr);
+}
+
+/*
+** Implementation of SQLite REGEXP operator. This scalar function takes
+** two arguments. The first is a regular expression pattern to compile
+** the second is a string to match against that pattern. If either 
+** argument is an SQL NULL, then NULL Is returned. Otherwise, the result
+** is 1 if the string matches the pattern, or 0 otherwise.
+**
+** SQLite maps the regexp() function to the regexp() operator such
+** that the following two are equivalent:
+**
+**     zString REGEXP zPattern
+**     regexp(zPattern, zString)
+**
+** Uses the following ICU regexp APIs:
+**
+**     uregex_open()
+**     uregex_matches()
+**     uregex_close()
+*/
+static void icuRegexpFunc(sqlite3_context *p, int nArg, sqlite3_value **apArg){
+  UErrorCode status = U_ZERO_ERROR;
+  URegularExpression *pExpr;
+  UBool res;
+  const UChar *zString = sqlite3_value_text16(apArg[1]);
+
+  (void)nArg;  /* Unused parameter */
+
+  /* If the left hand side of the regexp operator is NULL, 
+  ** then the result is also NULL. 
+  */
+  if( !zString ){
+    return;
+  }
+
+  pExpr = sqlite3_get_auxdata(p, 0);
+  if( !pExpr ){
+    const UChar *zPattern = sqlite3_value_text16(apArg[0]);
+    if( !zPattern ){
+      return;
+    }
+    pExpr = uregex_open(zPattern, -1, 0, 0, &status);
+
+    if( U_SUCCESS(status) ){
+      sqlite3_set_auxdata(p, 0, pExpr, icuRegexpDelete);
+    }else{
+      assert(!pExpr);
+      icuFunctionError(p, "uregex_open", status);
+      return;
+    }
+  }
+
+  /* Configure the text that the regular expression operates on. */
+  uregex_setText(pExpr, zString, -1, &status);
+  if( !U_SUCCESS(status) ){
+    icuFunctionError(p, "uregex_setText", status);
+    return;
+  }
+
+  /* Attempt the match */
+  res = uregex_matches(pExpr, 0, &status);
+  if( !U_SUCCESS(status) ){
+    icuFunctionError(p, "uregex_matches", status);
+    return;
+  }
+
+  /* Set the text that the regular expression operates on to a NULL
+  ** pointer. This is not really necessary, but it is tidier than 
+  ** leaving the regular expression object configured with an invalid
+  ** pointer after this function returns.
+  */
+  uregex_setText(pExpr, 0, 0, &status);
+
+  /* Return 1 or 0. */
+  sqlite3_result_int(p, res ? 1 : 0);
+}
+
+/*
+** Implementations of scalar functions for case mapping - upper() and 
+** lower(). Function upper() converts its input to upper-case (ABC).
+** Function lower() converts to lower-case (abc).
+**
+** ICU provides two types of case mapping, "general" case mapping and
+** "language specific". Refer to ICU documentation for the differences
+** between the two.
+**
+** To utilise "general" case mapping, the upper() or lower() scalar 
+** functions are invoked with one argument:
+**
+**     upper('ABC') -> 'abc'
+**     lower('abc') -> 'ABC'
+**
+** To access ICU "language specific" case mapping, upper() or lower()
+** should be invoked with two arguments. The second argument is the name
+** of the locale to use. Passing an empty string ("") or SQL NULL value
+** as the second argument is the same as invoking the 1 argument version
+** of upper() or lower().
+**
+**     lower('I', 'en_us') -> 'i'
+**     lower('I', 'tr_tr') -> 'ı' (small dotless i)
+**
+** http://www.icu-project.org/userguide/posix.html#case_mappings
+*/
+static void icuCaseFunc16(sqlite3_context *p, int nArg, sqlite3_value **apArg){
+  const UChar *zInput;
+  UChar *zOutput;
+  int nInput;
+  int nOutput;
+
+  UErrorCode status = U_ZERO_ERROR;
+  const char *zLocale = 0;
+
+  assert(nArg==1 || nArg==2);
+  if( nArg==2 ){
+    zLocale = (const char *)sqlite3_value_text(apArg[1]);
+  }
+
+  zInput = sqlite3_value_text16(apArg[0]);
+  if( !zInput ){
+    return;
+  }
+  nInput = sqlite3_value_bytes16(apArg[0]);
+
+  nOutput = nInput * 2 + 2;
+  zOutput = sqlite3_malloc(nOutput);
+  if( !zOutput ){
+    return;
+  }
+
+  if( sqlite3_user_data(p) ){
+    u_strToUpper(zOutput, nOutput/2, zInput, nInput/2, zLocale, &status);
+  }else{
+    u_strToLower(zOutput, nOutput/2, zInput, nInput/2, zLocale, &status);
+  }
+
+  if( !U_SUCCESS(status) ){
+    icuFunctionError(p, "u_strToLower()/u_strToUpper", status);
+    return;
+  }
+
+  sqlite3_result_text16(p, zOutput, -1, xFree);
+}
+
+/*
+** Collation sequence destructor function. The pCtx argument points to
+** a UCollator structure previously allocated using ucol_open().
+*/
+static void icuCollationDel(void *pCtx){
+  UCollator *p = (UCollator *)pCtx;
+  ucol_close(p);
+}
+
+/*
+** Collation sequence comparison function. The pCtx argument points to
+** a UCollator structure previously allocated using ucol_open().
+*/
+static int icuCollationColl(
+  void *pCtx,
+  int nLeft,
+  const void *zLeft,
+  int nRight,
+  const void *zRight
+){
+  UCollationResult res;
+  UCollator *p = (UCollator *)pCtx;
+  res = ucol_strcoll(p, (UChar *)zLeft, nLeft/2, (UChar *)zRight, nRight/2);
+  switch( res ){
+    case UCOL_LESS:    return -1;
+    case UCOL_GREATER: return +1;
+    case UCOL_EQUAL:   return 0;
+  }
+  assert(!"Unexpected return value from ucol_strcoll()");
+  return 0;
+}
+
+/*
+** Implementation of the scalar function icu_load_collation().
+**
+** This scalar function is used to add ICU collation based collation 
+** types to an SQLite database connection. It is intended to be called
+** as follows:
+**
+**     SELECT icu_load_collation(<locale>, <collation-name>);
+**
+** Where <locale> is a string containing an ICU locale identifier (i.e.
+** "en_AU", "tr_TR" etc.) and <collation-name> is the name of the
+** collation sequence to create.
+*/
+static void icuLoadCollation(
+  sqlite3_context *p, 
+  int nArg, 
+  sqlite3_value **apArg
+){
+  sqlite3 *db = (sqlite3 *)sqlite3_user_data(p);
+  UErrorCode status = U_ZERO_ERROR;
+  const char *zLocale;      /* Locale identifier - (eg. "jp_JP") */
+  const char *zName;        /* SQL Collation sequence name (eg. "japanese") */
+  UCollator *pUCollator;    /* ICU library collation object */
+  int rc;                   /* Return code from sqlite3_create_collation_x() */
+
+  assert(nArg==2);
+  zLocale = (const char *)sqlite3_value_text(apArg[0]);
+  zName = (const char *)sqlite3_value_text(apArg[1]);
+
+  if( !zLocale || !zName ){
+    return;
+  }
+
+  pUCollator = ucol_open(zLocale, &status);
+  if( !U_SUCCESS(status) ){
+    icuFunctionError(p, "ucol_open", status);
+    return;
+  }
+  assert(p);
+
+  rc = sqlite3_create_collation_v2(db, zName, SQLITE_UTF16, (void *)pUCollator, 
+      icuCollationColl, icuCollationDel
+  );
+  if( rc!=SQLITE_OK ){
+    ucol_close(pUCollator);
+    sqlite3_result_error(p, "Error registering collation function", -1);
+  }
+}
+
+/*
+** Register the ICU extension functions with database db.
+*/
+SQLITE_PRIVATE int sqlite3IcuInit(sqlite3 *db){
+  struct IcuScalar {
+    const char *zName;                        /* Function name */
+    int nArg;                                 /* Number of arguments */
+    int enc;                                  /* Optimal text encoding */
+    void *pContext;                           /* sqlite3_user_data() context */
+    void (*xFunc)(sqlite3_context*,int,sqlite3_value**);
+  } scalars[] = {
+    {"regexp", 2, SQLITE_ANY,          0, icuRegexpFunc},
+
+    {"lower",  1, SQLITE_UTF16,        0, icuCaseFunc16},
+    {"lower",  2, SQLITE_UTF16,        0, icuCaseFunc16},
+    {"upper",  1, SQLITE_UTF16, (void*)1, icuCaseFunc16},
+    {"upper",  2, SQLITE_UTF16, (void*)1, icuCaseFunc16},
+
+    {"lower",  1, SQLITE_UTF8,         0, icuCaseFunc16},
+    {"lower",  2, SQLITE_UTF8,         0, icuCaseFunc16},
+    {"upper",  1, SQLITE_UTF8,  (void*)1, icuCaseFunc16},
+    {"upper",  2, SQLITE_UTF8,  (void*)1, icuCaseFunc16},
+
+    {"like",   2, SQLITE_UTF8,         0, icuLikeFunc},
+    {"like",   3, SQLITE_UTF8,         0, icuLikeFunc},
+
+    {"icu_load_collation",  2, SQLITE_UTF8, (void*)db, icuLoadCollation},
+  };
+
+  int rc = SQLITE_OK;
+  int i;
+
+  for(i=0; rc==SQLITE_OK && i<(int)(sizeof(scalars)/sizeof(scalars[0])); i++){
+    struct IcuScalar *p = &scalars[i];
+    rc = sqlite3_create_function(
+        db, p->zName, p->nArg, p->enc, p->pContext, p->xFunc, 0, 0
+    );
+  }
+
+  return rc;
+}
+
+#if !SQLITE_CORE
+SQLITE_API int sqlite3_extension_init(
+  sqlite3 *db, 
+  char **pzErrMsg,
+  const sqlite3_api_routines *pApi
+){
+  SQLITE_EXTENSION_INIT2(pApi)
+  return sqlite3IcuInit(db);
+}
+#endif
+
+#endif
+
+/************** End of icu.c *************************************************/
+/************** Begin file fts3_icu.c ****************************************/
+/*
+** 2007 June 22
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This file implements a tokenizer for fts3 based on the ICU library.
+** 
+** $Id: sqlite3.c $
+*/
+
+#if !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3)
+#ifdef SQLITE_ENABLE_ICU
+
+
+#include <unicode/ubrk.h>
+#include <unicode/utf16.h>
+
+typedef struct IcuTokenizer IcuTokenizer;
+typedef struct IcuCursor IcuCursor;
+
+struct IcuTokenizer {
+  sqlite3_tokenizer base;
+  char *zLocale;
+};
+
+struct IcuCursor {
+  sqlite3_tokenizer_cursor base;
+
+  UBreakIterator *pIter;      /* ICU break-iterator object */
+  int nChar;                  /* Number of UChar elements in pInput */
+  UChar *aChar;               /* Copy of input using utf-16 encoding */
+  int *aOffset;               /* Offsets of each character in utf-8 input */
+
+  int nBuffer;
+  char *zBuffer;
+
+  int iToken;
+};
+
+/*
+** Create a new tokenizer instance.
+*/
+static int icuCreate(
+  int argc,                            /* Number of entries in argv[] */
+  const char * const *argv,            /* Tokenizer creation arguments */
+  sqlite3_tokenizer **ppTokenizer      /* OUT: Created tokenizer */
+){
+  IcuTokenizer *p;
+  int n = 0;
+
+  if( argc>0 ){
+    n = strlen(argv[0])+1;
+  }
+  p = (IcuTokenizer *)sqlite3_malloc(sizeof(IcuTokenizer)+n);
+  if( !p ){
+    return SQLITE_NOMEM;
+  }
+  memset(p, 0, sizeof(IcuTokenizer));
+
+  if( n ){
+    p->zLocale = (char *)&p[1];
+    memcpy(p->zLocale, argv[0], n);
+  }
+
+  *ppTokenizer = (sqlite3_tokenizer *)p;
+
+  return SQLITE_OK;
+}
+
+/*
+** Destroy a tokenizer
+*/
+static int icuDestroy(sqlite3_tokenizer *pTokenizer){
+  IcuTokenizer *p = (IcuTokenizer *)pTokenizer;
+  sqlite3_free(p);
+  return SQLITE_OK;
+}
+
+/*
+** Prepare to begin tokenizing a particular string.  The input
+** string to be tokenized is pInput[0..nBytes-1].  A cursor
+** used to incrementally tokenize this string is returned in 
+** *ppCursor.
+*/
+static int icuOpen(
+  sqlite3_tokenizer *pTokenizer,         /* The tokenizer */
+  const char *zInput,                    /* Input string */
+  int nInput,                            /* Length of zInput in bytes */
+  sqlite3_tokenizer_cursor **ppCursor    /* OUT: Tokenization cursor */
+){
+  IcuTokenizer *p = (IcuTokenizer *)pTokenizer;
+  IcuCursor *pCsr;
+
+  const int32_t opt = U_FOLD_CASE_DEFAULT;
+  UErrorCode status = U_ZERO_ERROR;
+  int nChar;
+
+  UChar32 c;
+  int iInput = 0;
+  int iOut = 0;
+
+  *ppCursor = 0;
+
+  if( nInput<0 ){
+    nInput = strlen(zInput);
+  }
+  nChar = nInput+1;
+  pCsr = (IcuCursor *)sqlite3_malloc(
+      sizeof(IcuCursor) +                /* IcuCursor */
+      nChar * sizeof(UChar) +            /* IcuCursor.aChar[] */
+      (nChar+1) * sizeof(int)            /* IcuCursor.aOffset[] */
+  );
+  if( !pCsr ){
+    return SQLITE_NOMEM;
+  }
+  memset(pCsr, 0, sizeof(IcuCursor));
+  pCsr->aChar = (UChar *)&pCsr[1];
+  pCsr->aOffset = (int *)&pCsr->aChar[nChar];
+
+  pCsr->aOffset[iOut] = iInput;
+  U8_NEXT(zInput, iInput, nInput, c); 
+  while( c>0 ){
+    int isError = 0;
+    c = u_foldCase(c, opt);
+    U16_APPEND(pCsr->aChar, iOut, nChar, c, isError);
+    if( isError ){
+      sqlite3_free(pCsr);
+      return SQLITE_ERROR;
+    }
+    pCsr->aOffset[iOut] = iInput;
+
+    if( iInput<nInput ){
+      U8_NEXT(zInput, iInput, nInput, c);
+    }else{
+      c = 0;
+    }
+  }
+
+  pCsr->pIter = ubrk_open(UBRK_WORD, p->zLocale, pCsr->aChar, iOut, &status);
+  if( !U_SUCCESS(status) ){
+    sqlite3_free(pCsr);
+    return SQLITE_ERROR;
+  }
+  pCsr->nChar = iOut;
+
+  ubrk_first(pCsr->pIter);
+  *ppCursor = (sqlite3_tokenizer_cursor *)pCsr;
+  return SQLITE_OK;
+}
+
+/*
+** Close a tokenization cursor previously opened by a call to icuOpen().
+*/
+static int icuClose(sqlite3_tokenizer_cursor *pCursor){
+  IcuCursor *pCsr = (IcuCursor *)pCursor;
+  ubrk_close(pCsr->pIter);
+  sqlite3_free(pCsr->zBuffer);
+  sqlite3_free(pCsr);
+  return SQLITE_OK;
+}
+
+/*
+** Extract the next token from a tokenization cursor.
+*/
+static int icuNext(
+  sqlite3_tokenizer_cursor *pCursor,  /* Cursor returned by simpleOpen */
+  const char **ppToken,               /* OUT: *ppToken is the token text */
+  int *pnBytes,                       /* OUT: Number of bytes in token */
+  int *piStartOffset,                 /* OUT: Starting offset of token */
+  int *piEndOffset,                   /* OUT: Ending offset of token */
+  int *piPosition                     /* OUT: Position integer of token */
+){
+  IcuCursor *pCsr = (IcuCursor *)pCursor;
+
+  int iStart = 0;
+  int iEnd = 0;
+  int nByte = 0;
+
+  while( iStart==iEnd ){
+    UChar32 c;
+
+    iStart = ubrk_current(pCsr->pIter);
+    iEnd = ubrk_next(pCsr->pIter);
+    if( iEnd==UBRK_DONE ){
+      return SQLITE_DONE;
+    }
+
+    while( iStart<iEnd ){
+      int iWhite = iStart;
+      U8_NEXT(pCsr->aChar, iWhite, pCsr->nChar, c);
+      if( u_isspace(c) ){
+        iStart = iWhite;
+      }else{
+        break;
+      }
+    }
+    assert(iStart<=iEnd);
+  }
+
+  do {
+    UErrorCode status = U_ZERO_ERROR;
+    if( nByte ){
+      char *zNew = sqlite3_realloc(pCsr->zBuffer, nByte);
+      if( !zNew ){
+        return SQLITE_NOMEM;
+      }
+      pCsr->zBuffer = zNew;
+      pCsr->nBuffer = nByte;
+    }
+
+    u_strToUTF8(
+        pCsr->zBuffer, pCsr->nBuffer, &nByte,    /* Output vars */
+        &pCsr->aChar[iStart], iEnd-iStart,       /* Input vars */
+        &status                                  /* Output success/failure */
+    );
+  } while( nByte>pCsr->nBuffer );
+
+  *ppToken = pCsr->zBuffer;
+  *pnBytes = nByte;
+  *piStartOffset = pCsr->aOffset[iStart];
+  *piEndOffset = pCsr->aOffset[iEnd];
+  *piPosition = pCsr->iToken++;
+
+  return SQLITE_OK;
+}
+
+/*
+** The set of routines that implement the simple tokenizer
+*/
+static const sqlite3_tokenizer_module icuTokenizerModule = {
+  0,                           /* iVersion */
+  icuCreate,                   /* xCreate  */
+  icuDestroy,                  /* xCreate  */
+  icuOpen,                     /* xOpen    */
+  icuClose,                    /* xClose   */
+  icuNext,                     /* xNext    */
+};
+
+/*
+** Set *ppModule to point at the implementation of the ICU tokenizer.
+*/
+SQLITE_PRIVATE void sqlite3Fts3IcuTokenizerModule(
+  sqlite3_tokenizer_module const**ppModule
+){
+  *ppModule = &icuTokenizerModule;
+}
+
+#endif /* defined(SQLITE_ENABLE_ICU) */
+#endif /* !defined(SQLITE_CORE) || defined(SQLITE_ENABLE_FTS3) */
+
+/************** End of fts3_icu.c ********************************************/
diff --git a/cadxcore/sqlite/sqlite3.h b/cadxcore/sqlite/sqlite3.h
new file mode 100644
index 0000000..197f69d
--- /dev/null
+++ b/cadxcore/sqlite/sqlite3.h
@@ -0,0 +1,6464 @@
+/*
+** 2001 September 15
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This header file defines the interface that the SQLite library
+** presents to client programs.  If a C-function, structure, datatype,
+** or constant definition does not appear in this file, then it is
+** not a published API of SQLite, is subject to change without
+** notice, and should not be referenced by programs that use SQLite.
+**
+** Some of the definitions that are in this file are marked as
+** "experimental".  Experimental interfaces are normally new
+** features recently added to SQLite.  We do not anticipate changes
+** to experimental interfaces but reserve the right to make minor changes
+** if experience from use "in the wild" suggest such changes are prudent.
+**
+** The official C-language API documentation for SQLite is derived
+** from comments in this file.  This file is the authoritative source
+** on how SQLite interfaces are suppose to operate.
+**
+** The name of this file under configuration management is "sqlite.h.in".
+** The makefile makes some minor changes to this file (such as inserting
+** the version number) and changes its name to "sqlite3.h" as
+** part of the build process.
+*/
+#ifndef _SQLITE3_H_
+#define _SQLITE3_H_
+#include <stdarg.h>     /* Needed for the definition of va_list */
+
+/*
+** Make sure we can call this stuff from C++.
+*/
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*
+** Add the ability to override 'extern'
+*/
+#ifndef SQLITE_EXTERN
+# define SQLITE_EXTERN extern
+#endif
+
+#ifndef SQLITE_API
+# define SQLITE_API
+#endif
+
+
+/*
+** These no-op macros are used in front of interfaces to mark those
+** interfaces as either deprecated or experimental.  New applications
+** should not use deprecated interfaces - they are support for backwards
+** compatibility only.  Application writers should be aware that
+** experimental interfaces are subject to change in point releases.
+**
+** These macros used to resolve to various kinds of compiler magic that
+** would generate warning messages when they were used.  But that
+** compiler magic ended up generating such a flurry of bug reports
+** that we have taken it all out and gone back to using simple
+** noop macros.
+*/
+#define SQLITE_DEPRECATED
+#define SQLITE_EXPERIMENTAL
+
+/*
+** Ensure these symbols were not defined by some previous header file.
+*/
+#ifdef SQLITE_VERSION
+# undef SQLITE_VERSION
+#endif
+#ifdef SQLITE_VERSION_NUMBER
+# undef SQLITE_VERSION_NUMBER
+#endif
+
+/*
+** CAPI3REF: Compile-Time Library Version Numbers
+**
+** ^(The [SQLITE_VERSION] C preprocessor macro in the sqlite3.h header
+** evaluates to a string literal that is the SQLite version in the
+** format "X.Y.Z" where X is the major version number (always 3 for
+** SQLite3) and Y is the minor version number and Z is the release number.)^
+** ^(The [SQLITE_VERSION_NUMBER] C preprocessor macro resolves to an integer
+** with the value (X*1000000 + Y*1000 + Z) where X, Y, and Z are the same
+** numbers used in [SQLITE_VERSION].)^
+** The SQLITE_VERSION_NUMBER for any given release of SQLite will also
+** be larger than the release from which it is derived.  Either Y will
+** be held constant and Z will be incremented or else Y will be incremented
+** and Z will be reset to zero.
+**
+** Since version 3.6.18, SQLite source code has been stored in the
+** <a href="http://www.fossil-scm.org/">Fossil configuration management
+** system</a>.  ^The SQLITE_SOURCE_ID macro evaluates to
+** a string which identifies a particular check-in of SQLite
+** within its configuration management system.  ^The SQLITE_SOURCE_ID
+** string contains the date and time of the check-in (UTC) and an SHA1
+** hash of the entire source tree.
+**
+** See also: [sqlite3_libversion()],
+** [sqlite3_libversion_number()], [sqlite3_sourceid()],
+** [sqlite_version()] and [sqlite_source_id()].
+*/
+#define SQLITE_VERSION        "3.7.6.2"
+#define SQLITE_VERSION_NUMBER 3007006
+#define SQLITE_SOURCE_ID      "2011-04-17 17:25:17 154ddbc17120be2915eb03edc52af1225eb7cb5e"
+
+/*
+** CAPI3REF: Run-Time Library Version Numbers
+** KEYWORDS: sqlite3_version, sqlite3_sourceid
+**
+** These interfaces provide the same information as the [SQLITE_VERSION],
+** [SQLITE_VERSION_NUMBER], and [SQLITE_SOURCE_ID] C preprocessor macros
+** but are associated with the library instead of the header file.  ^(Cautious
+** programmers might include assert() statements in their application to
+** verify that values returned by these interfaces match the macros in
+** the header, and thus insure that the application is
+** compiled with matching library and header files.
+**
+** <blockquote><pre>
+** assert( sqlite3_libversion_number()==SQLITE_VERSION_NUMBER );
+** assert( strcmp(sqlite3_sourceid(),SQLITE_SOURCE_ID)==0 );
+** assert( strcmp(sqlite3_libversion(),SQLITE_VERSION)==0 );
+** </pre></blockquote>)^
+**
+** ^The sqlite3_version[] string constant contains the text of [SQLITE_VERSION]
+** macro.  ^The sqlite3_libversion() function returns a pointer to the
+** to the sqlite3_version[] string constant.  The sqlite3_libversion()
+** function is provided for use in DLLs since DLL users usually do not have
+** direct access to string constants within the DLL.  ^The
+** sqlite3_libversion_number() function returns an integer equal to
+** [SQLITE_VERSION_NUMBER].  ^The sqlite3_sourceid() function returns
+** a pointer to a string constant whose value is the same as the
+** [SQLITE_SOURCE_ID] C preprocessor macro.
+**
+** See also: [sqlite_version()] and [sqlite_source_id()].
+*/
+SQLITE_API SQLITE_EXTERN const char sqlite3_version[];
+SQLITE_API const char *sqlite3_libversion(void);
+SQLITE_API const char *sqlite3_sourceid(void);
+SQLITE_API int sqlite3_libversion_number(void);
+
+/*
+** CAPI3REF: Run-Time Library Compilation Options Diagnostics
+**
+** ^The sqlite3_compileoption_used() function returns 0 or 1
+** indicating whether the specified option was defined at
+** compile time.  ^The SQLITE_ prefix may be omitted from the
+** option name passed to sqlite3_compileoption_used().
+**
+** ^The sqlite3_compileoption_get() function allows iterating
+** over the list of options that were defined at compile time by
+** returning the N-th compile time option string.  ^If N is out of range,
+** sqlite3_compileoption_get() returns a NULL pointer.  ^The SQLITE_
+** prefix is omitted from any strings returned by
+** sqlite3_compileoption_get().
+**
+** ^Support for the diagnostic functions sqlite3_compileoption_used()
+** and sqlite3_compileoption_get() may be omitted by specifying the
+** [SQLITE_OMIT_COMPILEOPTION_DIAGS] option at compile time.
+**
+** See also: SQL functions [sqlite_compileoption_used()] and
+** [sqlite_compileoption_get()] and the [compile_options pragma].
+*/
+#ifndef SQLITE_OMIT_COMPILEOPTION_DIAGS
+SQLITE_API int sqlite3_compileoption_used(const char *zOptName);
+SQLITE_API const char *sqlite3_compileoption_get(int N);
+#endif
+
+/*
+** CAPI3REF: Test To See If The Library Is Threadsafe
+**
+** ^The sqlite3_threadsafe() function returns zero if and only if
+** SQLite was compiled mutexing code omitted due to the
+** [SQLITE_THREADSAFE] compile-time option being set to 0.
+**
+** SQLite can be compiled with or without mutexes.  When
+** the [SQLITE_THREADSAFE] C preprocessor macro is 1 or 2, mutexes
+** are enabled and SQLite is threadsafe.  When the
+** [SQLITE_THREADSAFE] macro is 0,
+** the mutexes are omitted.  Without the mutexes, it is not safe
+** to use SQLite concurrently from more than one thread.
+**
+** Enabling mutexes incurs a measurable performance penalty.
+** So if speed is of utmost importance, it makes sense to disable
+** the mutexes.  But for maximum safety, mutexes should be enabled.
+** ^The default behavior is for mutexes to be enabled.
+**
+** This interface can be used by an application to make sure that the
+** version of SQLite that it is linking against was compiled with
+** the desired setting of the [SQLITE_THREADSAFE] macro.
+**
+** This interface only reports on the compile-time mutex setting
+** of the [SQLITE_THREADSAFE] flag.  If SQLite is compiled with
+** SQLITE_THREADSAFE=1 or =2 then mutexes are enabled by default but
+** can be fully or partially disabled using a call to [sqlite3_config()]
+** with the verbs [SQLITE_CONFIG_SINGLETHREAD], [SQLITE_CONFIG_MULTITHREAD],
+** or [SQLITE_CONFIG_MUTEX].  ^(The return value of the
+** sqlite3_threadsafe() function shows only the compile-time setting of
+** thread safety, not any run-time changes to that setting made by
+** sqlite3_config(). In other words, the return value from sqlite3_threadsafe()
+** is unchanged by calls to sqlite3_config().)^
+**
+** See the [threading mode] documentation for additional information.
+*/
+SQLITE_API int sqlite3_threadsafe(void);
+
+/*
+** CAPI3REF: Database Connection Handle
+** KEYWORDS: {database connection} {database connections}
+**
+** Each open SQLite database is represented by a pointer to an instance of
+** the opaque structure named "sqlite3".  It is useful to think of an sqlite3
+** pointer as an object.  The [sqlite3_open()], [sqlite3_open16()], and
+** [sqlite3_open_v2()] interfaces are its constructors, and [sqlite3_close()]
+** is its destructor.  There are many other interfaces (such as
+** [sqlite3_prepare_v2()], [sqlite3_create_function()], and
+** [sqlite3_busy_timeout()] to name but three) that are methods on an
+** sqlite3 object.
+*/
+typedef struct sqlite3 sqlite3;
+
+/*
+** CAPI3REF: 64-Bit Integer Types
+** KEYWORDS: sqlite_int64 sqlite_uint64
+**
+** Because there is no cross-platform way to specify 64-bit integer types
+** SQLite includes typedefs for 64-bit signed and unsigned integers.
+**
+** The sqlite3_int64 and sqlite3_uint64 are the preferred type definitions.
+** The sqlite_int64 and sqlite_uint64 types are supported for backwards
+** compatibility only.
+**
+** ^The sqlite3_int64 and sqlite_int64 types can store integer values
+** between -9223372036854775808 and +9223372036854775807 inclusive.  ^The
+** sqlite3_uint64 and sqlite_uint64 types can store integer values
+** between 0 and +18446744073709551615 inclusive.
+*/
+#ifdef SQLITE_INT64_TYPE
+typedef SQLITE_INT64_TYPE sqlite_int64;
+typedef unsigned SQLITE_INT64_TYPE sqlite_uint64;
+#elif defined(_MSC_VER) || defined(__BORLANDC__)
+typedef __int64 sqlite_int64;
+typedef unsigned __int64 sqlite_uint64;
+#else
+typedef long long int sqlite_int64;
+typedef unsigned long long int sqlite_uint64;
+#endif
+typedef sqlite_int64 sqlite3_int64;
+typedef sqlite_uint64 sqlite3_uint64;
+
+/*
+** If compiling for a processor that lacks floating point support,
+** substitute integer for floating-point.
+*/
+#ifdef SQLITE_OMIT_FLOATING_POINT
+# define double sqlite3_int64
+#endif
+
+/*
+** CAPI3REF: Closing A Database Connection
+**
+** ^The sqlite3_close() routine is the destructor for the [sqlite3] object.
+** ^Calls to sqlite3_close() return SQLITE_OK if the [sqlite3] object is
+** successfully destroyed and all associated resources are deallocated.
+**
+** Applications must [sqlite3_finalize | finalize] all [prepared statements]
+** and [sqlite3_blob_close | close] all [BLOB handles] associated with
+** the [sqlite3] object prior to attempting to close the object.  ^If
+** sqlite3_close() is called on a [database connection] that still has
+** outstanding [prepared statements] or [BLOB handles], then it returns
+** SQLITE_BUSY.
+**
+** ^If [sqlite3_close()] is invoked while a transaction is open,
+** the transaction is automatically rolled back.
+**
+** The C parameter to [sqlite3_close(C)] must be either a NULL
+** pointer or an [sqlite3] object pointer obtained
+** from [sqlite3_open()], [sqlite3_open16()], or
+** [sqlite3_open_v2()], and not previously closed.
+** ^Calling sqlite3_close() with a NULL pointer argument is a
+** harmless no-op.
+*/
+SQLITE_API int sqlite3_close(sqlite3 *);
+
+/*
+** The type for a callback function.
+** This is legacy and deprecated.  It is included for historical
+** compatibility and is not documented.
+*/
+typedef int (*sqlite3_callback)(void*,int,char**, char**);
+
+/*
+** CAPI3REF: One-Step Query Execution Interface
+**
+** The sqlite3_exec() interface is a convenience wrapper around
+** [sqlite3_prepare_v2()], [sqlite3_step()], and [sqlite3_finalize()],
+** that allows an application to run multiple statements of SQL
+** without having to use a lot of C code.
+**
+** ^The sqlite3_exec() interface runs zero or more UTF-8 encoded,
+** semicolon-separate SQL statements passed into its 2nd argument,
+** in the context of the [database connection] passed in as its 1st
+** argument.  ^If the callback function of the 3rd argument to
+** sqlite3_exec() is not NULL, then it is invoked for each result row
+** coming out of the evaluated SQL statements.  ^The 4th argument to
+** to sqlite3_exec() is relayed through to the 1st argument of each
+** callback invocation.  ^If the callback pointer to sqlite3_exec()
+** is NULL, then no callback is ever invoked and result rows are
+** ignored.
+**
+** ^If an error occurs while evaluating the SQL statements passed into
+** sqlite3_exec(), then execution of the current statement stops and
+** subsequent statements are skipped.  ^If the 5th parameter to sqlite3_exec()
+** is not NULL then any error message is written into memory obtained
+** from [sqlite3_malloc()] and passed back through the 5th parameter.
+** To avoid memory leaks, the application should invoke [sqlite3_free()]
+** on error message strings returned through the 5th parameter of
+** of sqlite3_exec() after the error message string is no longer needed.
+** ^If the 5th parameter to sqlite3_exec() is not NULL and no errors
+** occur, then sqlite3_exec() sets the pointer in its 5th parameter to
+** NULL before returning.
+**
+** ^If an sqlite3_exec() callback returns non-zero, the sqlite3_exec()
+** routine returns SQLITE_ABORT without invoking the callback again and
+** without running any subsequent SQL statements.
+**
+** ^The 2nd argument to the sqlite3_exec() callback function is the
+** number of columns in the result.  ^The 3rd argument to the sqlite3_exec()
+** callback is an array of pointers to strings obtained as if from
+** [sqlite3_column_text()], one for each column.  ^If an element of a
+** result row is NULL then the corresponding string pointer for the
+** sqlite3_exec() callback is a NULL pointer.  ^The 4th argument to the
+** sqlite3_exec() callback is an array of pointers to strings where each
+** entry represents the name of corresponding result column as obtained
+** from [sqlite3_column_name()].
+**
+** ^If the 2nd parameter to sqlite3_exec() is a NULL pointer, a pointer
+** to an empty string, or a pointer that contains only whitespace and/or
+** SQL comments, then no SQL statements are evaluated and the database
+** is not changed.
+**
+** Restrictions:
+**
+** <ul>
+** <li> The application must insure that the 1st parameter to sqlite3_exec()
+**      is a valid and open [database connection].
+** <li> The application must not close [database connection] specified by
+**      the 1st parameter to sqlite3_exec() while sqlite3_exec() is running.
+** <li> The application must not modify the SQL statement text passed into
+**      the 2nd parameter of sqlite3_exec() while sqlite3_exec() is running.
+** </ul>
+*/
+SQLITE_API int sqlite3_exec(
+        sqlite3*,                                  /* An open database */
+        const char *sql,                           /* SQL to be evaluated */
+        int (*callback)(void*,int,char**,char**),  /* Callback function */
+        void *,                                    /* 1st argument to callback */
+        char **errmsg                              /* Error msg written here */
+);
+
+/*
+** CAPI3REF: Result Codes
+** KEYWORDS: SQLITE_OK {error code} {error codes}
+** KEYWORDS: {result code} {result codes}
+**
+** Many SQLite functions return an integer result code from the set shown
+** here in order to indicates success or failure.
+**
+** New error codes may be added in future versions of SQLite.
+**
+** See also: [SQLITE_IOERR_READ | extended result codes]
+*/
+#define SQLITE_OK           0   /* Successful result */
+/* beginning-of-error-codes */
+#define SQLITE_ERROR        1   /* SQL error or missing database */
+#define SQLITE_INTERNAL     2   /* Internal logic error in SQLite */
+#define SQLITE_PERM         3   /* Access permission denied */
+#define SQLITE_ABORT        4   /* Callback routine requested an abort */
+#define SQLITE_BUSY         5   /* The database file is locked */
+#define SQLITE_LOCKED       6   /* A table in the database is locked */
+#define SQLITE_NOMEM        7   /* A malloc() failed */
+#define SQLITE_READONLY     8   /* Attempt to write a readonly database */
+#define SQLITE_INTERRUPT    9   /* Operation terminated by sqlite3_interrupt()*/
+#define SQLITE_IOERR       10   /* Some kind of disk I/O error occurred */
+#define SQLITE_CORRUPT     11   /* The database disk image is malformed */
+#define SQLITE_NOTFOUND    12   /* Unknown opcode in sqlite3_file_control() */
+#define SQLITE_FULL        13   /* Insertion failed because database is full */
+#define SQLITE_CANTOPEN    14   /* Unable to open the database file */
+#define SQLITE_PROTOCOL    15   /* Database lock protocol error */
+#define SQLITE_EMPTY       16   /* Database is empty */
+#define SQLITE_SCHEMA      17   /* The database schema changed */
+#define SQLITE_TOOBIG      18   /* String or BLOB exceeds size limit */
+#define SQLITE_CONSTRAINT  19   /* Abort due to constraint violation */
+#define SQLITE_MISMATCH    20   /* Data type mismatch */
+#define SQLITE_MISUSE      21   /* Library used incorrectly */
+#define SQLITE_NOLFS       22   /* Uses OS features not supported on host */
+#define SQLITE_AUTH        23   /* Authorization denied */
+#define SQLITE_FORMAT      24   /* Auxiliary database format error */
+#define SQLITE_RANGE       25   /* 2nd parameter to sqlite3_bind out of range */
+#define SQLITE_NOTADB      26   /* File opened that is not a database file */
+#define SQLITE_ROW         100  /* sqlite3_step() has another row ready */
+#define SQLITE_DONE        101  /* sqlite3_step() has finished executing */
+/* end-of-error-codes */
+
+/*
+** CAPI3REF: Extended Result Codes
+** KEYWORDS: {extended error code} {extended error codes}
+** KEYWORDS: {extended result code} {extended result codes}
+**
+** In its default configuration, SQLite API routines return one of 26 integer
+** [SQLITE_OK | result codes].  However, experience has shown that many of
+** these result codes are too coarse-grained.  They do not provide as
+** much information about problems as programmers might like.  In an effort to
+** address this, newer versions of SQLite (version 3.3.8 and later) include
+** support for additional result codes that provide more detailed information
+** about errors. The extended result codes are enabled or disabled
+** on a per database connection basis using the
+** [sqlite3_extended_result_codes()] API.
+**
+** Some of the available extended result codes are listed here.
+** One may expect the number of extended result codes will be expand
+** over time.  Software that uses extended result codes should expect
+** to see new result codes in future releases of SQLite.
+**
+** The SQLITE_OK result code will never be extended.  It will always
+** be exactly zero.
+*/
+#define SQLITE_IOERR_READ              (SQLITE_IOERR | (1<<8))
+#define SQLITE_IOERR_SHORT_READ        (SQLITE_IOERR | (2<<8))
+#define SQLITE_IOERR_WRITE             (SQLITE_IOERR | (3<<8))
+#define SQLITE_IOERR_FSYNC             (SQLITE_IOERR | (4<<8))
+#define SQLITE_IOERR_DIR_FSYNC         (SQLITE_IOERR | (5<<8))
+#define SQLITE_IOERR_TRUNCATE          (SQLITE_IOERR | (6<<8))
+#define SQLITE_IOERR_FSTAT             (SQLITE_IOERR | (7<<8))
+#define SQLITE_IOERR_UNLOCK            (SQLITE_IOERR | (8<<8))
+#define SQLITE_IOERR_RDLOCK            (SQLITE_IOERR | (9<<8))
+#define SQLITE_IOERR_DELETE            (SQLITE_IOERR | (10<<8))
+#define SQLITE_IOERR_BLOCKED           (SQLITE_IOERR | (11<<8))
+#define SQLITE_IOERR_NOMEM             (SQLITE_IOERR | (12<<8))
+#define SQLITE_IOERR_ACCESS            (SQLITE_IOERR | (13<<8))
+#define SQLITE_IOERR_CHECKRESERVEDLOCK (SQLITE_IOERR | (14<<8))
+#define SQLITE_IOERR_LOCK              (SQLITE_IOERR | (15<<8))
+#define SQLITE_IOERR_CLOSE             (SQLITE_IOERR | (16<<8))
+#define SQLITE_IOERR_DIR_CLOSE         (SQLITE_IOERR | (17<<8))
+#define SQLITE_IOERR_SHMOPEN           (SQLITE_IOERR | (18<<8))
+#define SQLITE_IOERR_SHMSIZE           (SQLITE_IOERR | (19<<8))
+#define SQLITE_IOERR_SHMLOCK           (SQLITE_IOERR | (20<<8))
+#define SQLITE_LOCKED_SHAREDCACHE      (SQLITE_LOCKED |  (1<<8))
+#define SQLITE_BUSY_RECOVERY           (SQLITE_BUSY   |  (1<<8))
+#define SQLITE_CANTOPEN_NOTEMPDIR      (SQLITE_CANTOPEN | (1<<8))
+
+/*
+** CAPI3REF: Flags For File Open Operations
+**
+** These bit values are intended for use in the
+** 3rd parameter to the [sqlite3_open_v2()] interface and
+** in the 4th parameter to the xOpen method of the
+** [sqlite3_vfs] object.
+*/
+#define SQLITE_OPEN_READONLY         0x00000001  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_READWRITE        0x00000002  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_CREATE           0x00000004  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_DELETEONCLOSE    0x00000008  /* VFS only */
+#define SQLITE_OPEN_EXCLUSIVE        0x00000010  /* VFS only */
+#define SQLITE_OPEN_AUTOPROXY        0x00000020  /* VFS only */
+#define SQLITE_OPEN_MAIN_DB          0x00000100  /* VFS only */
+#define SQLITE_OPEN_TEMP_DB          0x00000200  /* VFS only */
+#define SQLITE_OPEN_TRANSIENT_DB     0x00000400  /* VFS only */
+#define SQLITE_OPEN_MAIN_JOURNAL     0x00000800  /* VFS only */
+#define SQLITE_OPEN_TEMP_JOURNAL     0x00001000  /* VFS only */
+#define SQLITE_OPEN_SUBJOURNAL       0x00002000  /* VFS only */
+#define SQLITE_OPEN_MASTER_JOURNAL   0x00004000  /* VFS only */
+#define SQLITE_OPEN_NOMUTEX          0x00008000  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_FULLMUTEX        0x00010000  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_SHAREDCACHE      0x00020000  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_PRIVATECACHE     0x00040000  /* Ok for sqlite3_open_v2() */
+#define SQLITE_OPEN_WAL              0x00080000  /* VFS only */
+
+/* Reserved:                         0x00F00000 */
+
+/*
+** CAPI3REF: Device Characteristics
+**
+** The xDeviceCharacteristics method of the [sqlite3_io_methods]
+** object returns an integer which is a vector of the these
+** bit values expressing I/O characteristics of the mass storage
+** device that holds the file that the [sqlite3_io_methods]
+** refers to.
+**
+** The SQLITE_IOCAP_ATOMIC property means that all writes of
+** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
+** mean that writes of blocks that are nnn bytes in size and
+** are aligned to an address which is an integer multiple of
+** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
+** that when data is appended to a file, the data is appended
+** first then the size of the file is extended, never the other
+** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
+** information is written to disk in the same order as calls
+** to xWrite().
+*/
+#define SQLITE_IOCAP_ATOMIC                 0x00000001
+#define SQLITE_IOCAP_ATOMIC512              0x00000002
+#define SQLITE_IOCAP_ATOMIC1K               0x00000004
+#define SQLITE_IOCAP_ATOMIC2K               0x00000008
+#define SQLITE_IOCAP_ATOMIC4K               0x00000010
+#define SQLITE_IOCAP_ATOMIC8K               0x00000020
+#define SQLITE_IOCAP_ATOMIC16K              0x00000040
+#define SQLITE_IOCAP_ATOMIC32K              0x00000080
+#define SQLITE_IOCAP_ATOMIC64K              0x00000100
+#define SQLITE_IOCAP_SAFE_APPEND            0x00000200
+#define SQLITE_IOCAP_SEQUENTIAL             0x00000400
+#define SQLITE_IOCAP_UNDELETABLE_WHEN_OPEN  0x00000800
+
+/*
+** CAPI3REF: File Locking Levels
+**
+** SQLite uses one of these integer values as the second
+** argument to calls it makes to the xLock() and xUnlock() methods
+** of an [sqlite3_io_methods] object.
+*/
+#define SQLITE_LOCK_NONE          0
+#define SQLITE_LOCK_SHARED        1
+#define SQLITE_LOCK_RESERVED      2
+#define SQLITE_LOCK_PENDING       3
+#define SQLITE_LOCK_EXCLUSIVE     4
+
+/*
+** CAPI3REF: Synchronization Type Flags
+**
+** When SQLite invokes the xSync() method of an
+** [sqlite3_io_methods] object it uses a combination of
+** these integer values as the second argument.
+**
+** When the SQLITE_SYNC_DATAONLY flag is used, it means that the
+** sync operation only needs to flush data to mass storage.  Inode
+** information need not be flushed. If the lower four bits of the flag
+** equal SQLITE_SYNC_NORMAL, that means to use normal fsync() semantics.
+** If the lower four bits equal SQLITE_SYNC_FULL, that means
+** to use Mac OS X style fullsync instead of fsync().
+**
+** Do not confuse the SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags
+** with the [PRAGMA synchronous]=NORMAL and [PRAGMA synchronous]=FULL
+** settings.  The [synchronous pragma] determines when calls to the
+** xSync VFS method occur and applies uniformly across all platforms.
+** The SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL flags determine how
+** energetic or rigorous or forceful the sync operations are and
+** only make a difference on Mac OSX for the default SQLite code.
+** (Third-party VFS implementations might also make the distinction
+** between SQLITE_SYNC_NORMAL and SQLITE_SYNC_FULL, but among the
+** operating systems natively supported by SQLite, only Mac OSX
+** cares about the difference.)
+*/
+#define SQLITE_SYNC_NORMAL        0x00002
+#define SQLITE_SYNC_FULL          0x00003
+#define SQLITE_SYNC_DATAONLY      0x00010
+
+/*
+** CAPI3REF: OS Interface Open File Handle
+**
+** An [sqlite3_file] object represents an open file in the
+** [sqlite3_vfs | OS interface layer].  Individual OS interface
+** implementations will
+** want to subclass this object by appending additional fields
+** for their own use.  The pMethods entry is a pointer to an
+** [sqlite3_io_methods] object that defines methods for performing
+** I/O operations on the open file.
+*/
+typedef struct sqlite3_file sqlite3_file;
+struct sqlite3_file {
+        const struct sqlite3_io_methods *pMethods;  /* Methods for an open file */
+};
+
+/*
+** CAPI3REF: OS Interface File Virtual Methods Object
+**
+** Every file opened by the [sqlite3_vfs] xOpen method populates an
+** [sqlite3_file] object (or, more commonly, a subclass of the
+** [sqlite3_file] object) with a pointer to an instance of this object.
+** This object defines the methods used to perform various operations
+** against the open file represented by the [sqlite3_file] object.
+**
+** If the xOpen method sets the sqlite3_file.pMethods element
+** to a non-NULL pointer, then the sqlite3_io_methods.xClose method
+** may be invoked even if the xOpen reported that it failed.  The
+** only way to prevent a call to xClose following a failed xOpen
+** is for the xOpen to set the sqlite3_file.pMethods element to NULL.
+**
+** The flags argument to xSync may be one of [SQLITE_SYNC_NORMAL] or
+** [SQLITE_SYNC_FULL].  The first choice is the normal fsync().
+** The second choice is a Mac OS X style fullsync.  The [SQLITE_SYNC_DATAONLY]
+** flag may be ORed in to indicate that only the data of the file
+** and not its inode needs to be synced.
+**
+** The integer values to xLock() and xUnlock() are one of
+** <ul>
+** <li> [SQLITE_LOCK_NONE],
+** <li> [SQLITE_LOCK_SHARED],
+** <li> [SQLITE_LOCK_RESERVED],
+** <li> [SQLITE_LOCK_PENDING], or
+** <li> [SQLITE_LOCK_EXCLUSIVE].
+** </ul>
+** xLock() increases the lock. xUnlock() decreases the lock.
+** The xCheckReservedLock() method checks whether any database connection,
+** either in this process or in some other process, is holding a RESERVED,
+** PENDING, or EXCLUSIVE lock on the file.  It returns true
+** if such a lock exists and false otherwise.
+**
+** The xFileControl() method is a generic interface that allows custom
+** VFS implementations to directly control an open file using the
+** [sqlite3_file_control()] interface.  The second "op" argument is an
+** integer opcode.  The third argument is a generic pointer intended to
+** point to a structure that may contain arguments or space in which to
+** write return values.  Potential uses for xFileControl() might be
+** functions to enable blocking locks with timeouts, to change the
+** locking strategy (for example to use dot-file locks), to inquire
+** about the status of a lock, or to break stale locks.  The SQLite
+** core reserves all opcodes less than 100 for its own use.
+** A [SQLITE_FCNTL_LOCKSTATE | list of opcodes] less than 100 is available.
+** Applications that define a custom xFileControl method should use opcodes
+** greater than 100 to avoid conflicts.  VFS implementations should
+** return [SQLITE_NOTFOUND] for file control opcodes that they do not
+** recognize.
+**
+** The xSectorSize() method returns the sector size of the
+** device that underlies the file.  The sector size is the
+** minimum write that can be performed without disturbing
+** other bytes in the file.  The xDeviceCharacteristics()
+** method returns a bit vector describing behaviors of the
+** underlying device:
+**
+** <ul>
+** <li> [SQLITE_IOCAP_ATOMIC]
+** <li> [SQLITE_IOCAP_ATOMIC512]
+** <li> [SQLITE_IOCAP_ATOMIC1K]
+** <li> [SQLITE_IOCAP_ATOMIC2K]
+** <li> [SQLITE_IOCAP_ATOMIC4K]
+** <li> [SQLITE_IOCAP_ATOMIC8K]
+** <li> [SQLITE_IOCAP_ATOMIC16K]
+** <li> [SQLITE_IOCAP_ATOMIC32K]
+** <li> [SQLITE_IOCAP_ATOMIC64K]
+** <li> [SQLITE_IOCAP_SAFE_APPEND]
+** <li> [SQLITE_IOCAP_SEQUENTIAL]
+** </ul>
+**
+** The SQLITE_IOCAP_ATOMIC property means that all writes of
+** any size are atomic.  The SQLITE_IOCAP_ATOMICnnn values
+** mean that writes of blocks that are nnn bytes in size and
+** are aligned to an address which is an integer multiple of
+** nnn are atomic.  The SQLITE_IOCAP_SAFE_APPEND value means
+** that when data is appended to a file, the data is appended
+** first then the size of the file is extended, never the other
+** way around.  The SQLITE_IOCAP_SEQUENTIAL property means that
+** information is written to disk in the same order as calls
+** to xWrite().
+**
+** If xRead() returns SQLITE_IOERR_SHORT_READ it must also fill
+** in the unread portions of the buffer with zeros.  A VFS that
+** fails to zero-fill short reads might seem to work.  However,
+** failure to zero-fill short reads will eventually lead to
+** database corruption.
+*/
+typedef struct sqlite3_io_methods sqlite3_io_methods;
+struct sqlite3_io_methods {
+        int iVersion;
+        int (*xClose)(sqlite3_file*);
+        int (*xRead)(sqlite3_file*, void*, int iAmt, sqlite3_int64 iOfst);
+        int (*xWrite)(sqlite3_file*, const void*, int iAmt, sqlite3_int64 iOfst);
+        int (*xTruncate)(sqlite3_file*, sqlite3_int64 size);
+        int (*xSync)(sqlite3_file*, int flags);
+        int (*xFileSize)(sqlite3_file*, sqlite3_int64 *pSize);
+        int (*xLock)(sqlite3_file*, int);
+        int (*xUnlock)(sqlite3_file*, int);
+        int (*xCheckReservedLock)(sqlite3_file*, int *pResOut);
+        int (*xFileControl)(sqlite3_file*, int op, void *pArg);
+        int (*xSectorSize)(sqlite3_file*);
+        int (*xDeviceCharacteristics)(sqlite3_file*);
+        /* Methods above are valid for version 1 */
+        int (*xShmMap)(sqlite3_file*, int iPg, int pgsz, int, void volatile**);
+        int (*xShmLock)(sqlite3_file*, int offset, int n, int flags);
+        void (*xShmBarrier)(sqlite3_file*);
+        int (*xShmUnmap)(sqlite3_file*, int deleteFlag);
+        /* Methods above are valid for version 2 */
+        /* Additional methods may be added in future releases */
+};
+
+/*
+** CAPI3REF: Standard File Control Opcodes
+**
+** These integer constants are opcodes for the xFileControl method
+** of the [sqlite3_io_methods] object and for the [sqlite3_file_control()]
+** interface.
+**
+** The [SQLITE_FCNTL_LOCKSTATE] opcode is used for debugging.  This
+** opcode causes the xFileControl method to write the current state of
+** the lock (one of [SQLITE_LOCK_NONE], [SQLITE_LOCK_SHARED],
+** [SQLITE_LOCK_RESERVED], [SQLITE_LOCK_PENDING], or [SQLITE_LOCK_EXCLUSIVE])
+** into an integer that the pArg argument points to. This capability
+** is used during testing and only needs to be supported when SQLITE_TEST
+** is defined.
+**
+** The [SQLITE_FCNTL_SIZE_HINT] opcode is used by SQLite to give the VFS
+** layer a hint of how large the database file will grow to be during the
+** current transaction.  This hint is not guaranteed to be accurate but it
+** is often close.  The underlying VFS might choose to preallocate database
+** file space based on this hint in order to help writes to the database
+** file run faster.
+**
+** The [SQLITE_FCNTL_CHUNK_SIZE] opcode is used to request that the VFS
+** extends and truncates the database file in chunks of a size specified
+** by the user. The fourth argument to [sqlite3_file_control()] should
+** point to an integer (type int) containing the new chunk-size to use
+** for the nominated database. Allocating database file space in large
+** chunks (say 1MB at a time), may reduce file-system fragmentation and
+** improve performance on some systems.
+**
+** The [SQLITE_FCNTL_FILE_POINTER] opcode is used to obtain a pointer
+** to the [sqlite3_file] object associated with a particular database
+** connection.  See the [sqlite3_file_control()] documentation for
+** additional information.
+**
+** ^(The [SQLITE_FCNTL_SYNC_OMITTED] opcode is generated internally by
+** SQLite and sent to all VFSes in place of a call to the xSync method
+** when the database connection has [PRAGMA synchronous] set to OFF.)^
+** Some specialized VFSes need this signal in order to operate correctly
+** when [PRAGMA synchronous | PRAGMA synchronous=OFF] is set, but most
+** VFSes do not need this signal and should silently ignore this opcode.
+** Applications should not call [sqlite3_file_control()] with this
+** opcode as doing so may disrupt the operation of the specialized VFSes
+** that do require it.
+*/
+#define SQLITE_FCNTL_LOCKSTATE        1
+#define SQLITE_GET_LOCKPROXYFILE      2
+#define SQLITE_SET_LOCKPROXYFILE      3
+#define SQLITE_LAST_ERRNO             4
+#define SQLITE_FCNTL_SIZE_HINT        5
+#define SQLITE_FCNTL_CHUNK_SIZE       6
+#define SQLITE_FCNTL_FILE_POINTER     7
+#define SQLITE_FCNTL_SYNC_OMITTED     8
+
+
+/*
+** CAPI3REF: Mutex Handle
+**
+** The mutex module within SQLite defines [sqlite3_mutex] to be an
+** abstract type for a mutex object.  The SQLite core never looks
+** at the internal representation of an [sqlite3_mutex].  It only
+** deals with pointers to the [sqlite3_mutex] object.
+**
+** Mutexes are created using [sqlite3_mutex_alloc()].
+*/
+typedef struct sqlite3_mutex sqlite3_mutex;
+
+/*
+** CAPI3REF: OS Interface Object
+**
+** An instance of the sqlite3_vfs object defines the interface between
+** the SQLite core and the underlying operating system.  The "vfs"
+** in the name of the object stands for "virtual file system".
+**
+** The value of the iVersion field is initially 1 but may be larger in
+** future versions of SQLite.  Additional fields may be appended to this
+** object when the iVersion value is increased.  Note that the structure
+** of the sqlite3_vfs object changes in the transaction between
+** SQLite version 3.5.9 and 3.6.0 and yet the iVersion field was not
+** modified.
+**
+** The szOsFile field is the size of the subclassed [sqlite3_file]
+** structure used by this VFS.  mxPathname is the maximum length of
+** a pathname in this VFS.
+**
+** Registered sqlite3_vfs objects are kept on a linked list formed by
+** the pNext pointer.  The [sqlite3_vfs_register()]
+** and [sqlite3_vfs_unregister()] interfaces manage this list
+** in a thread-safe way.  The [sqlite3_vfs_find()] interface
+** searches the list.  Neither the application code nor the VFS
+** implementation should use the pNext pointer.
+**
+** The pNext field is the only field in the sqlite3_vfs
+** structure that SQLite will ever modify.  SQLite will only access
+** or modify this field while holding a particular static mutex.
+** The application should never modify anything within the sqlite3_vfs
+** object once the object has been registered.
+**
+** The zName field holds the name of the VFS module.  The name must
+** be unique across all VFS modules.
+**
+** ^SQLite guarantees that the zFilename parameter to xOpen
+** is either a NULL pointer or string obtained
+** from xFullPathname() with an optional suffix added.
+** ^If a suffix is added to the zFilename parameter, it will
+** consist of a single "-" character followed by no more than
+** 10 alphanumeric and/or "-" characters.
+** ^SQLite further guarantees that
+** the string will be valid and unchanged until xClose() is
+** called. Because of the previous sentence,
+** the [sqlite3_file] can safely store a pointer to the
+** filename if it needs to remember the filename for some reason.
+** If the zFilename parameter to xOpen is a NULL pointer then xOpen
+** must invent its own temporary name for the file.  ^Whenever the
+** xFilename parameter is NULL it will also be the case that the
+** flags parameter will include [SQLITE_OPEN_DELETEONCLOSE].
+**
+** The flags argument to xOpen() includes all bits set in
+** the flags argument to [sqlite3_open_v2()].  Or if [sqlite3_open()]
+** or [sqlite3_open16()] is used, then flags includes at least
+** [SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE].
+** If xOpen() opens a file read-only then it sets *pOutFlags to
+** include [SQLITE_OPEN_READONLY].  Other bits in *pOutFlags may be set.
+**
+** ^(SQLite will also add one of the following flags to the xOpen()
+** call, depending on the object being opened:
+**
+** <ul>
+** <li>  [SQLITE_OPEN_MAIN_DB]
+** <li>  [SQLITE_OPEN_MAIN_JOURNAL]
+** <li>  [SQLITE_OPEN_TEMP_DB]
+** <li>  [SQLITE_OPEN_TEMP_JOURNAL]
+** <li>  [SQLITE_OPEN_TRANSIENT_DB]
+** <li>  [SQLITE_OPEN_SUBJOURNAL]
+** <li>  [SQLITE_OPEN_MASTER_JOURNAL]
+** <li>  [SQLITE_OPEN_WAL]
+** </ul>)^
+**
+** The file I/O implementation can use the object type flags to
+** change the way it deals with files.  For example, an application
+** that does not care about crash recovery or rollback might make
+** the open of a journal file a no-op.  Writes to this journal would
+** also be no-ops, and any attempt to read the journal would return
+** SQLITE_IOERR.  Or the implementation might recognize that a database
+** file will be doing page-aligned sector reads and writes in a random
+** order and set up its I/O subsystem accordingly.
+**
+** SQLite might also add one of the following flags to the xOpen method:
+**
+** <ul>
+** <li> [SQLITE_OPEN_DELETEONCLOSE]
+** <li> [SQLITE_OPEN_EXCLUSIVE]
+** </ul>
+**
+** The [SQLITE_OPEN_DELETEONCLOSE] flag means the file should be
+** deleted when it is closed.  ^The [SQLITE_OPEN_DELETEONCLOSE]
+** will be set for TEMP databases and their journals, transient
+** databases, and subjournals.
+**
+** ^The [SQLITE_OPEN_EXCLUSIVE] flag is always used in conjunction
+** with the [SQLITE_OPEN_CREATE] flag, which are both directly
+** analogous to the O_EXCL and O_CREAT flags of the POSIX open()
+** API.  The SQLITE_OPEN_EXCLUSIVE flag, when paired with the
+** SQLITE_OPEN_CREATE, is used to indicate that file should always
+** be created, and that it is an error if it already exists.
+** It is <i>not</i> used to indicate the file should be opened
+** for exclusive access.
+**
+** ^At least szOsFile bytes of memory are allocated by SQLite
+** to hold the  [sqlite3_file] structure passed as the third
+** argument to xOpen.  The xOpen method does not have to
+** allocate the structure; it should just fill it in.  Note that
+** the xOpen method must set the sqlite3_file.pMethods to either
+** a valid [sqlite3_io_methods] object or to NULL.  xOpen must do
+** this even if the open fails.  SQLite expects that the sqlite3_file.pMethods
+** element will be valid after xOpen returns regardless of the success
+** or failure of the xOpen call.
+**
+** ^The flags argument to xAccess() may be [SQLITE_ACCESS_EXISTS]
+** to test for the existence of a file, or [SQLITE_ACCESS_READWRITE] to
+** test whether a file is readable and writable, or [SQLITE_ACCESS_READ]
+** to test whether a file is at least readable.   The file can be a
+** directory.
+**
+** ^SQLite will always allocate at least mxPathname+1 bytes for the
+** output buffer xFullPathname.  The exact size of the output buffer
+** is also passed as a parameter to both  methods. If the output buffer
+** is not large enough, [SQLITE_CANTOPEN] should be returned. Since this is
+** handled as a fatal error by SQLite, vfs implementations should endeavor
+** to prevent this by setting mxPathname to a sufficiently large value.
+**
+** The xRandomness(), xSleep(), xCurrentTime(), and xCurrentTimeInt64()
+** interfaces are not strictly a part of the filesystem, but they are
+** included in the VFS structure for completeness.
+** The xRandomness() function attempts to return nBytes bytes
+** of good-quality randomness into zOut.  The return value is
+** the actual number of bytes of randomness obtained.
+** The xSleep() method causes the calling thread to sleep for at
+** least the number of microseconds given.  ^The xCurrentTime()
+** method returns a Julian Day Number for the current date and time as
+** a floating point value.
+** ^The xCurrentTimeInt64() method returns, as an integer, the Julian
+** Day Number multipled by 86400000 (the number of milliseconds in
+** a 24-hour day).
+** ^SQLite will use the xCurrentTimeInt64() method to get the current
+** date and time if that method is available (if iVersion is 2 or
+** greater and the function pointer is not NULL) and will fall back
+** to xCurrentTime() if xCurrentTimeInt64() is unavailable.
+**
+** ^The xSetSystemCall(), xGetSystemCall(), and xNestSystemCall() interfaces
+** are not used by the SQLite core.  These optional interfaces are provided
+** by some VFSes to facilitate testing of the VFS code. By overriding
+** system calls with functions under its control, a test program can
+** simulate faults and error conditions that would otherwise be difficult
+** or impossible to induce.  The set of system calls that can be overridden
+** varies from one VFS to another, and from one version of the same VFS to the
+** next.  Applications that use these interfaces must be prepared for any
+** or all of these interfaces to be NULL or for their behavior to change
+** from one release to the next.  Applications must not attempt to access
+** any of these methods if the iVersion of the VFS is less than 3.
+*/
+typedef struct sqlite3_vfs sqlite3_vfs;
+typedef void (*sqlite3_syscall_ptr)(void);
+struct sqlite3_vfs {
+        int iVersion;            /* Structure version number (currently 3) */
+        int szOsFile;            /* Size of subclassed sqlite3_file */
+        int mxPathname;          /* Maximum file pathname length */
+        sqlite3_vfs *pNext;      /* Next registered VFS */
+        const char *zName;       /* Name of this virtual file system */
+        void *pAppData;          /* Pointer to application-specific data */
+        int (*xOpen)(sqlite3_vfs*, const char *zName, sqlite3_file*,
+                     int flags, int *pOutFlags);
+        int (*xDelete)(sqlite3_vfs*, const char *zName, int syncDir);
+        int (*xAccess)(sqlite3_vfs*, const char *zName, int flags, int *pResOut);
+        int (*xFullPathname)(sqlite3_vfs*, const char *zName, int nOut, char *zOut);
+        void *(*xDlOpen)(sqlite3_vfs*, const char *zFilename);
+        void (*xDlError)(sqlite3_vfs*, int nByte, char *zErrMsg);
+        void (*(*xDlSym)(sqlite3_vfs*,void*, const char *zSymbol))(void);
+        void (*xDlClose)(sqlite3_vfs*, void*);
+        int (*xRandomness)(sqlite3_vfs*, int nByte, char *zOut);
+        int (*xSleep)(sqlite3_vfs*, int microseconds);
+        int (*xCurrentTime)(sqlite3_vfs*, double*);
+        int (*xGetLastError)(sqlite3_vfs*, int, char *);
+        /*
+        ** The methods above are in version 1 of the sqlite_vfs object
+        ** definition.  Those that follow are added in version 2 or later
+        */
+        int (*xCurrentTimeInt64)(sqlite3_vfs*, sqlite3_int64*);
+        /*
+        ** The methods above are in versions 1 and 2 of the sqlite_vfs object.
+        ** Those below are for version 3 and greater.
+        */
+        int (*xSetSystemCall)(sqlite3_vfs*, const char *zName, sqlite3_syscall_ptr);
+        sqlite3_syscall_ptr (*xGetSystemCall)(sqlite3_vfs*, const char *zName);
+        const char *(*xNextSystemCall)(sqlite3_vfs*, const char *zName);
+        /*
+        ** The methods above are in versions 1 through 3 of the sqlite_vfs object.
+        ** New fields may be appended in figure versions.  The iVersion
+        ** value will increment whenever this happens.
+        */
+};
+
+/*
+** CAPI3REF: Flags for the xAccess VFS method
+**
+** These integer constants can be used as the third parameter to
+** the xAccess method of an [sqlite3_vfs] object.  They determine
+** what kind of permissions the xAccess method is looking for.
+** With SQLITE_ACCESS_EXISTS, the xAccess method
+** simply checks whether the file exists.
+** With SQLITE_ACCESS_READWRITE, the xAccess method
+** checks whether the named directory is both readable and writable
+** (in other words, if files can be added, removed, and renamed within
+** the directory).
+** The SQLITE_ACCESS_READWRITE constant is currently used only by the
+** [temp_store_directory pragma], though this could change in a future
+** release of SQLite.
+** With SQLITE_ACCESS_READ, the xAccess method
+** checks whether the file is readable.  The SQLITE_ACCESS_READ constant is
+** currently unused, though it might be used in a future release of
+** SQLite.
+*/
+#define SQLITE_ACCESS_EXISTS    0
+#define SQLITE_ACCESS_READWRITE 1   /* Used by PRAGMA temp_store_directory */
+#define SQLITE_ACCESS_READ      2   /* Unused */
+
+/*
+** CAPI3REF: Flags for the xShmLock VFS method
+**
+** These integer constants define the various locking operations
+** allowed by the xShmLock method of [sqlite3_io_methods].  The
+** following are the only legal combinations of flags to the
+** xShmLock method:
+**
+** <ul>
+** <li>  SQLITE_SHM_LOCK | SQLITE_SHM_SHARED
+** <li>  SQLITE_SHM_LOCK | SQLITE_SHM_EXCLUSIVE
+** <li>  SQLITE_SHM_UNLOCK | SQLITE_SHM_SHARED
+** <li>  SQLITE_SHM_UNLOCK | SQLITE_SHM_EXCLUSIVE
+** </ul>
+**
+** When unlocking, the same SHARED or EXCLUSIVE flag must be supplied as
+** was given no the corresponding lock.
+**
+** The xShmLock method can transition between unlocked and SHARED or
+** between unlocked and EXCLUSIVE.  It cannot transition between SHARED
+** and EXCLUSIVE.
+*/
+#define SQLITE_SHM_UNLOCK       1
+#define SQLITE_SHM_LOCK         2
+#define SQLITE_SHM_SHARED       4
+#define SQLITE_SHM_EXCLUSIVE    8
+
+/*
+** CAPI3REF: Maximum xShmLock index
+**
+** The xShmLock method on [sqlite3_io_methods] may use values
+** between 0 and this upper bound as its "offset" argument.
+** The SQLite core will never attempt to acquire or release a
+** lock outside of this range
+*/
+#define SQLITE_SHM_NLOCK        8
+
+
+/*
+** CAPI3REF: Initialize The SQLite Library
+**
+** ^The sqlite3_initialize() routine initializes the
+** SQLite library.  ^The sqlite3_shutdown() routine
+** deallocates any resources that were allocated by sqlite3_initialize().
+** These routines are designed to aid in process initialization and
+** shutdown on embedded systems.  Workstation applications using
+** SQLite normally do not need to invoke either of these routines.
+**
+** A call to sqlite3_initialize() is an "effective" call if it is
+** the first time sqlite3_initialize() is invoked during the lifetime of
+** the process, or if it is the first time sqlite3_initialize() is invoked
+** following a call to sqlite3_shutdown().  ^(Only an effective call
+** of sqlite3_initialize() does any initialization.  All other calls
+** are harmless no-ops.)^
+**
+** A call to sqlite3_shutdown() is an "effective" call if it is the first
+** call to sqlite3_shutdown() since the last sqlite3_initialize().  ^(Only
+** an effective call to sqlite3_shutdown() does any deinitialization.
+** All other valid calls to sqlite3_shutdown() are harmless no-ops.)^
+**
+** The sqlite3_initialize() interface is threadsafe, but sqlite3_shutdown()
+** is not.  The sqlite3_shutdown() interface must only be called from a
+** single thread.  All open [database connections] must be closed and all
+** other SQLite resources must be deallocated prior to invoking
+** sqlite3_shutdown().
+**
+** Among other things, ^sqlite3_initialize() will invoke
+** sqlite3_os_init().  Similarly, ^sqlite3_shutdown()
+** will invoke sqlite3_os_end().
+**
+** ^The sqlite3_initialize() routine returns [SQLITE_OK] on success.
+** ^If for some reason, sqlite3_initialize() is unable to initialize
+** the library (perhaps it is unable to allocate a needed resource such
+** as a mutex) it returns an [error code] other than [SQLITE_OK].
+**
+** ^The sqlite3_initialize() routine is called internally by many other
+** SQLite interfaces so that an application usually does not need to
+** invoke sqlite3_initialize() directly.  For example, [sqlite3_open()]
+** calls sqlite3_initialize() so the SQLite library will be automatically
+** initialized when [sqlite3_open()] is called if it has not be initialized
+** already.  ^However, if SQLite is compiled with the [SQLITE_OMIT_AUTOINIT]
+** compile-time option, then the automatic calls to sqlite3_initialize()
+** are omitted and the application must call sqlite3_initialize() directly
+** prior to using any other SQLite interface.  For maximum portability,
+** it is recommended that applications always invoke sqlite3_initialize()
+** directly prior to using any other SQLite interface.  Future releases
+** of SQLite may require this.  In other words, the behavior exhibited
+** when SQLite is compiled with [SQLITE_OMIT_AUTOINIT] might become the
+** default behavior in some future release of SQLite.
+**
+** The sqlite3_os_init() routine does operating-system specific
+** initialization of the SQLite library.  The sqlite3_os_end()
+** routine undoes the effect of sqlite3_os_init().  Typical tasks
+** performed by these routines include allocation or deallocation
+** of static resources, initialization of global variables,
+** setting up a default [sqlite3_vfs] module, or setting up
+** a default configuration using [sqlite3_config()].
+**
+** The application should never invoke either sqlite3_os_init()
+** or sqlite3_os_end() directly.  The application should only invoke
+** sqlite3_initialize() and sqlite3_shutdown().  The sqlite3_os_init()
+** interface is called automatically by sqlite3_initialize() and
+** sqlite3_os_end() is called by sqlite3_shutdown().  Appropriate
+** implementations for sqlite3_os_init() and sqlite3_os_end()
+** are built into SQLite when it is compiled for Unix, Windows, or OS/2.
+** When [custom builds | built for other platforms]
+** (using the [SQLITE_OS_OTHER=1] compile-time
+** option) the application must supply a suitable implementation for
+** sqlite3_os_init() and sqlite3_os_end().  An application-supplied
+** implementation of sqlite3_os_init() or sqlite3_os_end()
+** must return [SQLITE_OK] on success and some other [error code] upon
+** failure.
+*/
+SQLITE_API int sqlite3_initialize(void);
+SQLITE_API int sqlite3_shutdown(void);
+SQLITE_API int sqlite3_os_init(void);
+SQLITE_API int sqlite3_os_end(void);
+
+/*
+** CAPI3REF: Configuring The SQLite Library
+**
+** The sqlite3_config() interface is used to make global configuration
+** changes to SQLite in order to tune SQLite to the specific needs of
+** the application.  The default configuration is recommended for most
+** applications and so this routine is usually not necessary.  It is
+** provided to support rare applications with unusual needs.
+**
+** The sqlite3_config() interface is not threadsafe.  The application
+** must insure that no other SQLite interfaces are invoked by other
+** threads while sqlite3_config() is running.  Furthermore, sqlite3_config()
+** may only be invoked prior to library initialization using
+** [sqlite3_initialize()] or after shutdown by [sqlite3_shutdown()].
+** ^If sqlite3_config() is called after [sqlite3_initialize()] and before
+** [sqlite3_shutdown()] then it will return SQLITE_MISUSE.
+** Note, however, that ^sqlite3_config() can be called as part of the
+** implementation of an application-defined [sqlite3_os_init()].
+**
+** The first argument to sqlite3_config() is an integer
+** [SQLITE_CONFIG_SINGLETHREAD | configuration option] that determines
+** what property of SQLite is to be configured.  Subsequent arguments
+** vary depending on the [SQLITE_CONFIG_SINGLETHREAD | configuration option]
+** in the first argument.
+**
+** ^When a configuration option is set, sqlite3_config() returns [SQLITE_OK].
+** ^If the option is unknown or SQLite is unable to set the option
+** then this routine returns a non-zero [error code].
+*/
+SQLITE_API int sqlite3_config(int, ...);
+
+/*
+** CAPI3REF: Configure database connections
+**
+** The sqlite3_db_config() interface is used to make configuration
+** changes to a [database connection].  The interface is similar to
+** [sqlite3_config()] except that the changes apply to a single
+** [database connection] (specified in the first argument).
+**
+** The second argument to sqlite3_db_config(D,V,...)  is the
+** [SQLITE_DBCONFIG_LOOKASIDE | configuration verb] - an integer code
+** that indicates what aspect of the [database connection] is being configured.
+** Subsequent arguments vary depending on the configuration verb.
+**
+** ^Calls to sqlite3_db_config() return SQLITE_OK if and only if
+** the call is considered successful.
+*/
+SQLITE_API int sqlite3_db_config(sqlite3*, int op, ...);
+
+/*
+** CAPI3REF: Memory Allocation Routines
+**
+** An instance of this object defines the interface between SQLite
+** and low-level memory allocation routines.
+**
+** This object is used in only one place in the SQLite interface.
+** A pointer to an instance of this object is the argument to
+** [sqlite3_config()] when the configuration option is
+** [SQLITE_CONFIG_MALLOC] or [SQLITE_CONFIG_GETMALLOC].
+** By creating an instance of this object
+** and passing it to [sqlite3_config]([SQLITE_CONFIG_MALLOC])
+** during configuration, an application can specify an alternative
+** memory allocation subsystem for SQLite to use for all of its
+** dynamic memory needs.
+**
+** Note that SQLite comes with several [built-in memory allocators]
+** that are perfectly adequate for the overwhelming majority of applications
+** and that this object is only useful to a tiny minority of applications
+** with specialized memory allocation requirements.  This object is
+** also used during testing of SQLite in order to specify an alternative
+** memory allocator that simulates memory out-of-memory conditions in
+** order to verify that SQLite recovers gracefully from such
+** conditions.
+**
+** The xMalloc and xFree methods must work like the
+** malloc() and free() functions from the standard C library.
+** The xRealloc method must work like realloc() from the standard C library
+** with the exception that if the second argument to xRealloc is zero,
+** xRealloc must be a no-op - it must not perform any allocation or
+** deallocation.  ^SQLite guarantees that the second argument to
+** xRealloc is always a value returned by a prior call to xRoundup.
+** And so in cases where xRoundup always returns a positive number,
+** xRealloc can perform exactly as the standard library realloc() and
+** still be in compliance with this specification.
+**
+** xSize should return the allocated size of a memory allocation
+** previously obtained from xMalloc or xRealloc.  The allocated size
+** is always at least as big as the requested size but may be larger.
+**
+** The xRoundup method returns what would be the allocated size of
+** a memory allocation given a particular requested size.  Most memory
+** allocators round up memory allocations at least to the next multiple
+** of 8.  Some allocators round up to a larger multiple or to a power of 2.
+** Every memory allocation request coming in through [sqlite3_malloc()]
+** or [sqlite3_realloc()] first calls xRoundup.  If xRoundup returns 0,
+** that causes the corresponding memory allocation to fail.
+**
+** The xInit method initializes the memory allocator.  (For example,
+** it might allocate any require mutexes or initialize internal data
+** structures.  The xShutdown method is invoked (indirectly) by
+** [sqlite3_shutdown()] and should deallocate any resources acquired
+** by xInit.  The pAppData pointer is used as the only parameter to
+** xInit and xShutdown.
+**
+** SQLite holds the [SQLITE_MUTEX_STATIC_MASTER] mutex when it invokes
+** the xInit method, so the xInit method need not be threadsafe.  The
+** xShutdown method is only called from [sqlite3_shutdown()] so it does
+** not need to be threadsafe either.  For all other methods, SQLite
+** holds the [SQLITE_MUTEX_STATIC_MEM] mutex as long as the
+** [SQLITE_CONFIG_MEMSTATUS] configuration option is turned on (which
+** it is by default) and so the methods are automatically serialized.
+** However, if [SQLITE_CONFIG_MEMSTATUS] is disabled, then the other
+** methods must be threadsafe or else make their own arrangements for
+** serialization.
+**
+** SQLite will never invoke xInit() more than once without an intervening
+** call to xShutdown().
+*/
+typedef struct sqlite3_mem_methods sqlite3_mem_methods;
+struct sqlite3_mem_methods {
+        void *(*xMalloc)(int);         /* Memory allocation function */
+        void (*xFree)(void*);          /* Free a prior allocation */
+        void *(*xRealloc)(void*,int);  /* Resize an allocation */
+        int (*xSize)(void*);           /* Return the size of an allocation */
+        int (*xRoundup)(int);          /* Round up request size to allocation size */
+        int (*xInit)(void*);           /* Initialize the memory allocator */
+        void (*xShutdown)(void*);      /* Deinitialize the memory allocator */
+        void *pAppData;                /* Argument to xInit() and xShutdown() */
+};
+
+/*
+** CAPI3REF: Configuration Options
+**
+** These constants are the available integer configuration options that
+** can be passed as the first argument to the [sqlite3_config()] interface.
+**
+** New configuration options may be added in future releases of SQLite.
+** Existing configuration options might be discontinued.  Applications
+** should check the return code from [sqlite3_config()] to make sure that
+** the call worked.  The [sqlite3_config()] interface will return a
+** non-zero [error code] if a discontinued or unsupported configuration option
+** is invoked.
+**
+** <dl>
+** <dt>SQLITE_CONFIG_SINGLETHREAD</dt>
+** <dd>There are no arguments to this option.  ^This option sets the
+** [threading mode] to Single-thread.  In other words, it disables
+** all mutexing and puts SQLite into a mode where it can only be used
+** by a single thread.   ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** it is not possible to change the [threading mode] from its default
+** value of Single-thread and so [sqlite3_config()] will return
+** [SQLITE_ERROR] if called with the SQLITE_CONFIG_SINGLETHREAD
+** configuration option.</dd>
+**
+** <dt>SQLITE_CONFIG_MULTITHREAD</dt>
+** <dd>There are no arguments to this option.  ^This option sets the
+** [threading mode] to Multi-thread.  In other words, it disables
+** mutexing on [database connection] and [prepared statement] objects.
+** The application is responsible for serializing access to
+** [database connections] and [prepared statements].  But other mutexes
+** are enabled so that SQLite will be safe to use in a multi-threaded
+** environment as long as no two threads attempt to use the same
+** [database connection] at the same time.  ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** it is not possible to set the Multi-thread [threading mode] and
+** [sqlite3_config()] will return [SQLITE_ERROR] if called with the
+** SQLITE_CONFIG_MULTITHREAD configuration option.</dd>
+**
+** <dt>SQLITE_CONFIG_SERIALIZED</dt>
+** <dd>There are no arguments to this option.  ^This option sets the
+** [threading mode] to Serialized. In other words, this option enables
+** all mutexes including the recursive
+** mutexes on [database connection] and [prepared statement] objects.
+** In this mode (which is the default when SQLite is compiled with
+** [SQLITE_THREADSAFE=1]) the SQLite library will itself serialize access
+** to [database connections] and [prepared statements] so that the
+** application is free to use the same [database connection] or the
+** same [prepared statement] in different threads at the same time.
+** ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** it is not possible to set the Serialized [threading mode] and
+** [sqlite3_config()] will return [SQLITE_ERROR] if called with the
+** SQLITE_CONFIG_SERIALIZED configuration option.</dd>
+**
+** <dt>SQLITE_CONFIG_MALLOC</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mem_methods] structure.  The argument specifies
+** alternative low-level memory allocation routines to be used in place of
+** the memory allocation routines built into SQLite.)^ ^SQLite makes
+** its own private copy of the content of the [sqlite3_mem_methods] structure
+** before the [sqlite3_config()] call returns.</dd>
+**
+** <dt>SQLITE_CONFIG_GETMALLOC</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mem_methods] structure.  The [sqlite3_mem_methods]
+** structure is filled with the currently defined memory allocation routines.)^
+** This option can be used to overload the default memory allocation
+** routines with a wrapper that simulations memory allocation failure or
+** tracks memory usage, for example. </dd>
+**
+** <dt>SQLITE_CONFIG_MEMSTATUS</dt>
+** <dd> ^This option takes single argument of type int, interpreted as a
+** boolean, which enables or disables the collection of memory allocation
+** statistics. ^(When memory allocation statistics are disabled, the
+** following SQLite interfaces become non-operational:
+**   <ul>
+**   <li> [sqlite3_memory_used()]
+**   <li> [sqlite3_memory_highwater()]
+**   <li> [sqlite3_soft_heap_limit64()]
+**   <li> [sqlite3_status()]
+**   </ul>)^
+** ^Memory allocation statistics are enabled by default unless SQLite is
+** compiled with [SQLITE_DEFAULT_MEMSTATUS]=0 in which case memory
+** allocation statistics are disabled by default.
+** </dd>
+**
+** <dt>SQLITE_CONFIG_SCRATCH</dt>
+** <dd> ^This option specifies a static memory buffer that SQLite can use for
+** scratch memory.  There are three arguments:  A pointer an 8-byte
+** aligned memory buffer from which the scratch allocations will be
+** drawn, the size of each scratch allocation (sz),
+** and the maximum number of scratch allocations (N).  The sz
+** argument must be a multiple of 16.
+** The first argument must be a pointer to an 8-byte aligned buffer
+** of at least sz*N bytes of memory.
+** ^SQLite will use no more than two scratch buffers per thread.  So
+** N should be set to twice the expected maximum number of threads.
+** ^SQLite will never require a scratch buffer that is more than 6
+** times the database page size. ^If SQLite needs needs additional
+** scratch memory beyond what is provided by this configuration option, then
+** [sqlite3_malloc()] will be used to obtain the memory needed.</dd>
+**
+** <dt>SQLITE_CONFIG_PAGECACHE</dt>
+** <dd> ^This option specifies a static memory buffer that SQLite can use for
+** the database page cache with the default page cache implemenation.
+** This configuration should not be used if an application-define page
+** cache implementation is loaded using the SQLITE_CONFIG_PCACHE option.
+** There are three arguments to this option: A pointer to 8-byte aligned
+** memory, the size of each page buffer (sz), and the number of pages (N).
+** The sz argument should be the size of the largest database page
+** (a power of two between 512 and 32768) plus a little extra for each
+** page header.  ^The page header size is 20 to 40 bytes depending on
+** the host architecture.  ^It is harmless, apart from the wasted memory,
+** to make sz a little too large.  The first
+** argument should point to an allocation of at least sz*N bytes of memory.
+** ^SQLite will use the memory provided by the first argument to satisfy its
+** memory needs for the first N pages that it adds to cache.  ^If additional
+** page cache memory is needed beyond what is provided by this option, then
+** SQLite goes to [sqlite3_malloc()] for the additional storage space.
+** The pointer in the first argument must
+** be aligned to an 8-byte boundary or subsequent behavior of SQLite
+** will be undefined.</dd>
+**
+** <dt>SQLITE_CONFIG_HEAP</dt>
+** <dd> ^This option specifies a static memory buffer that SQLite will use
+** for all of its dynamic memory allocation needs beyond those provided
+** for by [SQLITE_CONFIG_SCRATCH] and [SQLITE_CONFIG_PAGECACHE].
+** There are three arguments: An 8-byte aligned pointer to the memory,
+** the number of bytes in the memory buffer, and the minimum allocation size.
+** ^If the first pointer (the memory pointer) is NULL, then SQLite reverts
+** to using its default memory allocator (the system malloc() implementation),
+** undoing any prior invocation of [SQLITE_CONFIG_MALLOC].  ^If the
+** memory pointer is not NULL and either [SQLITE_ENABLE_MEMSYS3] or
+** [SQLITE_ENABLE_MEMSYS5] are defined, then the alternative memory
+** allocator is engaged to handle all of SQLites memory allocation needs.
+** The first pointer (the memory pointer) must be aligned to an 8-byte
+** boundary or subsequent behavior of SQLite will be undefined.
+** The minimum allocation size is capped at 2^12. Reasonable values
+** for the minimum allocation size are 2^5 through 2^8.</dd>
+**
+** <dt>SQLITE_CONFIG_MUTEX</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mutex_methods] structure.  The argument specifies
+** alternative low-level mutex routines to be used in place
+** the mutex routines built into SQLite.)^  ^SQLite makes a copy of the
+** content of the [sqlite3_mutex_methods] structure before the call to
+** [sqlite3_config()] returns. ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** the entire mutexing subsystem is omitted from the build and hence calls to
+** [sqlite3_config()] with the SQLITE_CONFIG_MUTEX configuration option will
+** return [SQLITE_ERROR].</dd>
+**
+** <dt>SQLITE_CONFIG_GETMUTEX</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** instance of the [sqlite3_mutex_methods] structure.  The
+** [sqlite3_mutex_methods]
+** structure is filled with the currently defined mutex routines.)^
+** This option can be used to overload the default mutex allocation
+** routines with a wrapper used to track mutex usage for performance
+** profiling or testing, for example.   ^If SQLite is compiled with
+** the [SQLITE_THREADSAFE | SQLITE_THREADSAFE=0] compile-time option then
+** the entire mutexing subsystem is omitted from the build and hence calls to
+** [sqlite3_config()] with the SQLITE_CONFIG_GETMUTEX configuration option will
+** return [SQLITE_ERROR].</dd>
+**
+** <dt>SQLITE_CONFIG_LOOKASIDE</dt>
+** <dd> ^(This option takes two arguments that determine the default
+** memory allocation for the lookaside memory allocator on each
+** [database connection].  The first argument is the
+** size of each lookaside buffer slot and the second is the number of
+** slots allocated to each database connection.)^  ^(This option sets the
+** <i>default</i> lookaside size. The [SQLITE_DBCONFIG_LOOKASIDE]
+** verb to [sqlite3_db_config()] can be used to change the lookaside
+** configuration on individual connections.)^ </dd>
+**
+** <dt>SQLITE_CONFIG_PCACHE</dt>
+** <dd> ^(This option takes a single argument which is a pointer to
+** an [sqlite3_pcache_methods] object.  This object specifies the interface
+** to a custom page cache implementation.)^  ^SQLite makes a copy of the
+** object and uses it for page cache memory allocations.</dd>
+**
+** <dt>SQLITE_CONFIG_GETPCACHE</dt>
+** <dd> ^(This option takes a single argument which is a pointer to an
+** [sqlite3_pcache_methods] object.  SQLite copies of the current
+** page cache implementation into that object.)^ </dd>
+**
+** <dt>SQLITE_CONFIG_LOG</dt>
+** <dd> ^The SQLITE_CONFIG_LOG option takes two arguments: a pointer to a
+** function with a call signature of void(*)(void*,int,const char*),
+** and a pointer to void. ^If the function pointer is not NULL, it is
+** invoked by [sqlite3_log()] to process each logging event.  ^If the
+** function pointer is NULL, the [sqlite3_log()] interface becomes a no-op.
+** ^The void pointer that is the second argument to SQLITE_CONFIG_LOG is
+** passed through as the first parameter to the application-defined logger
+** function whenever that function is invoked.  ^The second parameter to
+** the logger function is a copy of the first parameter to the corresponding
+** [sqlite3_log()] call and is intended to be a [result code] or an
+** [extended result code].  ^The third parameter passed to the logger is
+** log message after formatting via [sqlite3_snprintf()].
+** The SQLite logging interface is not reentrant; the logger function
+** supplied by the application must not invoke any SQLite interface.
+** In a multi-threaded application, the application-defined logger
+** function must be threadsafe. </dd>
+**
+** </dl>
+*/
+#define SQLITE_CONFIG_SINGLETHREAD  1  /* nil */
+#define SQLITE_CONFIG_MULTITHREAD   2  /* nil */
+#define SQLITE_CONFIG_SERIALIZED    3  /* nil */
+#define SQLITE_CONFIG_MALLOC        4  /* sqlite3_mem_methods* */
+#define SQLITE_CONFIG_GETMALLOC     5  /* sqlite3_mem_methods* */
+#define SQLITE_CONFIG_SCRATCH       6  /* void*, int sz, int N */
+#define SQLITE_CONFIG_PAGECACHE     7  /* void*, int sz, int N */
+#define SQLITE_CONFIG_HEAP          8  /* void*, int nByte, int min */
+#define SQLITE_CONFIG_MEMSTATUS     9  /* boolean */
+#define SQLITE_CONFIG_MUTEX        10  /* sqlite3_mutex_methods* */
+#define SQLITE_CONFIG_GETMUTEX     11  /* sqlite3_mutex_methods* */
+/* previously SQLITE_CONFIG_CHUNKALLOC 12 which is now unused. */
+#define SQLITE_CONFIG_LOOKASIDE    13  /* int int */
+#define SQLITE_CONFIG_PCACHE       14  /* sqlite3_pcache_methods* */
+#define SQLITE_CONFIG_GETPCACHE    15  /* sqlite3_pcache_methods* */
+#define SQLITE_CONFIG_LOG          16  /* xFunc, void* */
+
+/*
+** CAPI3REF: Database Connection Configuration Options
+**
+** These constants are the available integer configuration options that
+** can be passed as the second argument to the [sqlite3_db_config()] interface.
+**
+** New configuration options may be added in future releases of SQLite.
+** Existing configuration options might be discontinued.  Applications
+** should check the return code from [sqlite3_db_config()] to make sure that
+** the call worked.  ^The [sqlite3_db_config()] interface will return a
+** non-zero [error code] if a discontinued or unsupported configuration option
+** is invoked.
+**
+** <dl>
+** <dt>SQLITE_DBCONFIG_LOOKASIDE</dt>
+** <dd> ^This option takes three additional arguments that determine the
+** [lookaside memory allocator] configuration for the [database connection].
+** ^The first argument (the third parameter to [sqlite3_db_config()] is a
+** pointer to a memory buffer to use for lookaside memory.
+** ^The first argument after the SQLITE_DBCONFIG_LOOKASIDE verb
+** may be NULL in which case SQLite will allocate the
+** lookaside buffer itself using [sqlite3_malloc()]. ^The second argument is the
+** size of each lookaside buffer slot.  ^The third argument is the number of
+** slots.  The size of the buffer in the first argument must be greater than
+** or equal to the product of the second and third arguments.  The buffer
+** must be aligned to an 8-byte boundary.  ^If the second argument to
+** SQLITE_DBCONFIG_LOOKASIDE is not a multiple of 8, it is internally
+** rounded down to the next smaller multiple of 8.  ^(The lookaside memory
+** configuration for a database connection can only be changed when that
+** connection is not currently using lookaside memory, or in other words
+** when the "current value" returned by
+** [sqlite3_db_status](D,[SQLITE_CONFIG_LOOKASIDE],...) is zero.
+** Any attempt to change the lookaside memory configuration when lookaside
+** memory is in use leaves the configuration unchanged and returns
+** [SQLITE_BUSY].)^</dd>
+**
+** <dt>SQLITE_DBCONFIG_ENABLE_FKEY</dt>
+** <dd> ^This option is used to enable or disable the enforcement of
+** [foreign key constraints].  There should be two additional arguments.
+** The first argument is an integer which is 0 to disable FK enforcement,
+** positive to enable FK enforcement or negative to leave FK enforcement
+** unchanged.  The second parameter is a pointer to an integer into which
+** is written 0 or 1 to indicate whether FK enforcement is off or on
+** following this call.  The second parameter may be a NULL pointer, in
+** which case the FK enforcement setting is not reported back. </dd>
+**
+** <dt>SQLITE_DBCONFIG_ENABLE_TRIGGER</dt>
+** <dd> ^This option is used to enable or disable [CREATE TRIGGER | triggers].
+** There should be two additional arguments.
+** The first argument is an integer which is 0 to disable triggers,
+** positive to enable triggers or negative to leave the setting unchanged.
+** The second parameter is a pointer to an integer into which
+** is written 0 or 1 to indicate whether triggers are disabled or enabled
+** following this call.  The second parameter may be a NULL pointer, in
+** which case the trigger setting is not reported back. </dd>
+**
+** </dl>
+*/
+#define SQLITE_DBCONFIG_LOOKASIDE       1001  /* void* int int */
+#define SQLITE_DBCONFIG_ENABLE_FKEY     1002  /* int int* */
+#define SQLITE_DBCONFIG_ENABLE_TRIGGER  1003  /* int int* */
+
+
+/*
+** CAPI3REF: Enable Or Disable Extended Result Codes
+**
+** ^The sqlite3_extended_result_codes() routine enables or disables the
+** [extended result codes] feature of SQLite. ^The extended result
+** codes are disabled by default for historical compatibility.
+*/
+SQLITE_API int sqlite3_extended_result_codes(sqlite3*, int onoff);
+
+/*
+** CAPI3REF: Last Insert Rowid
+**
+** ^Each entry in an SQLite table has a unique 64-bit signed
+** integer key called the [ROWID | "rowid"]. ^The rowid is always available
+** as an undeclared column named ROWID, OID, or _ROWID_ as long as those
+** names are not also used by explicitly declared columns. ^If
+** the table has a column of type [INTEGER PRIMARY KEY] then that column
+** is another alias for the rowid.
+**
+** ^This routine returns the [rowid] of the most recent
+** successful [INSERT] into the database from the [database connection]
+** in the first argument.  ^If no successful [INSERT]s
+** have ever occurred on that database connection, zero is returned.
+**
+** ^(If an [INSERT] occurs within a trigger, then the [rowid] of the inserted
+** row is returned by this routine as long as the trigger is running.
+** But once the trigger terminates, the value returned by this routine
+** reverts to the last value inserted before the trigger fired.)^
+**
+** ^An [INSERT] that fails due to a constraint violation is not a
+** successful [INSERT] and does not change the value returned by this
+** routine.  ^Thus INSERT OR FAIL, INSERT OR IGNORE, INSERT OR ROLLBACK,
+** and INSERT OR ABORT make no changes to the return value of this
+** routine when their insertion fails.  ^(When INSERT OR REPLACE
+** encounters a constraint violation, it does not fail.  The
+** INSERT continues to completion after deleting rows that caused
+** the constraint problem so INSERT OR REPLACE will always change
+** the return value of this interface.)^
+**
+** ^For the purposes of this routine, an [INSERT] is considered to
+** be successful even if it is subsequently rolled back.
+**
+** This function is accessible to SQL statements via the
+** [last_insert_rowid() SQL function].
+**
+** If a separate thread performs a new [INSERT] on the same
+** database connection while the [sqlite3_last_insert_rowid()]
+** function is running and thus changes the last insert [rowid],
+** then the value returned by [sqlite3_last_insert_rowid()] is
+** unpredictable and might not equal either the old or the new
+** last insert [rowid].
+*/
+SQLITE_API sqlite3_int64 sqlite3_last_insert_rowid(sqlite3*);
+
+/*
+** CAPI3REF: Count The Number Of Rows Modified
+**
+** ^This function returns the number of database rows that were changed
+** or inserted or deleted by the most recently completed SQL statement
+** on the [database connection] specified by the first parameter.
+** ^(Only changes that are directly specified by the [INSERT], [UPDATE],
+** or [DELETE] statement are counted.  Auxiliary changes caused by
+** triggers or [foreign key actions] are not counted.)^ Use the
+** [sqlite3_total_changes()] function to find the total number of changes
+** including changes caused by triggers and foreign key actions.
+**
+** ^Changes to a view that are simulated by an [INSTEAD OF trigger]
+** are not counted.  Only real table changes are counted.
+**
+** ^(A "row change" is a change to a single row of a single table
+** caused by an INSERT, DELETE, or UPDATE statement.  Rows that
+** are changed as side effects of [REPLACE] constraint resolution,
+** rollback, ABORT processing, [DROP TABLE], or by any other
+** mechanisms do not count as direct row changes.)^
+**
+** A "trigger context" is a scope of execution that begins and
+** ends with the script of a [CREATE TRIGGER | trigger].
+** Most SQL statements are
+** evaluated outside of any trigger.  This is the "top level"
+** trigger context.  If a trigger fires from the top level, a
+** new trigger context is entered for the duration of that one
+** trigger.  Subtriggers create subcontexts for their duration.
+**
+** ^Calling [sqlite3_exec()] or [sqlite3_step()] recursively does
+** not create a new trigger context.
+**
+** ^This function returns the number of direct row changes in the
+** most recent INSERT, UPDATE, or DELETE statement within the same
+** trigger context.
+**
+** ^Thus, when called from the top level, this function returns the
+** number of changes in the most recent INSERT, UPDATE, or DELETE
+** that also occurred at the top level.  ^(Within the body of a trigger,
+** the sqlite3_changes() interface can be called to find the number of
+** changes in the most recently completed INSERT, UPDATE, or DELETE
+** statement within the body of the same trigger.
+** However, the number returned does not include changes
+** caused by subtriggers since those have their own context.)^
+**
+** See also the [sqlite3_total_changes()] interface, the
+** [count_changes pragma], and the [changes() SQL function].
+**
+** If a separate thread makes changes on the same database connection
+** while [sqlite3_changes()] is running then the value returned
+** is unpredictable and not meaningful.
+*/
+SQLITE_API int sqlite3_changes(sqlite3*);
+
+/*
+** CAPI3REF: Total Number Of Rows Modified
+**
+** ^This function returns the number of row changes caused by [INSERT],
+** [UPDATE] or [DELETE] statements since the [database connection] was opened.
+** ^(The count returned by sqlite3_total_changes() includes all changes
+** from all [CREATE TRIGGER | trigger] contexts and changes made by
+** [foreign key actions]. However,
+** the count does not include changes used to implement [REPLACE] constraints,
+** do rollbacks or ABORT processing, or [DROP TABLE] processing.  The
+** count does not include rows of views that fire an [INSTEAD OF trigger],
+** though if the INSTEAD OF trigger makes changes of its own, those changes
+** are counted.)^
+** ^The sqlite3_total_changes() function counts the changes as soon as
+** the statement that makes them is completed (when the statement handle
+** is passed to [sqlite3_reset()] or [sqlite3_finalize()]).
+**
+** See also the [sqlite3_changes()] interface, the
+** [count_changes pragma], and the [total_changes() SQL function].
+**
+** If a separate thread makes changes on the same database connection
+** while [sqlite3_total_changes()] is running then the value
+** returned is unpredictable and not meaningful.
+*/
+SQLITE_API int sqlite3_total_changes(sqlite3*);
+
+/*
+** CAPI3REF: Interrupt A Long-Running Query
+**
+** ^This function causes any pending database operation to abort and
+** return at its earliest opportunity. This routine is typically
+** called in response to a user action such as pressing "Cancel"
+** or Ctrl-C where the user wants a long query operation to halt
+** immediately.
+**
+** ^It is safe to call this routine from a thread different from the
+** thread that is currently running the database operation.  But it
+** is not safe to call this routine with a [database connection] that
+** is closed or might close before sqlite3_interrupt() returns.
+**
+** ^If an SQL operation is very nearly finished at the time when
+** sqlite3_interrupt() is called, then it might not have an opportunity
+** to be interrupted and might continue to completion.
+**
+** ^An SQL operation that is interrupted will return [SQLITE_INTERRUPT].
+** ^If the interrupted SQL operation is an INSERT, UPDATE, or DELETE
+** that is inside an explicit transaction, then the entire transaction
+** will be rolled back automatically.
+**
+** ^The sqlite3_interrupt(D) call is in effect until all currently running
+** SQL statements on [database connection] D complete.  ^Any new SQL statements
+** that are started after the sqlite3_interrupt() call and before the
+** running statements reaches zero are interrupted as if they had been
+** running prior to the sqlite3_interrupt() call.  ^New SQL statements
+** that are started after the running statement count reaches zero are
+** not effected by the sqlite3_interrupt().
+** ^A call to sqlite3_interrupt(D) that occurs when there are no running
+** SQL statements is a no-op and has no effect on SQL statements
+** that are started after the sqlite3_interrupt() call returns.
+**
+** If the database connection closes while [sqlite3_interrupt()]
+** is running then bad things will likely happen.
+*/
+SQLITE_API void sqlite3_interrupt(sqlite3*);
+
+/*
+** CAPI3REF: Determine If An SQL Statement Is Complete
+**
+** These routines are useful during command-line input to determine if the
+** currently entered text seems to form a complete SQL statement or
+** if additional input is needed before sending the text into
+** SQLite for parsing.  ^These routines return 1 if the input string
+** appears to be a complete SQL statement.  ^A statement is judged to be
+** complete if it ends with a semicolon token and is not a prefix of a
+** well-formed CREATE TRIGGER statement.  ^Semicolons that are embedded within
+** string literals or quoted identifier names or comments are not
+** independent tokens (they are part of the token in which they are
+** embedded) and thus do not count as a statement terminator.  ^Whitespace
+** and comments that follow the final semicolon are ignored.
+**
+** ^These routines return 0 if the statement is incomplete.  ^If a
+** memory allocation fails, then SQLITE_NOMEM is returned.
+**
+** ^These routines do not parse the SQL statements thus
+** will not detect syntactically incorrect SQL.
+**
+** ^(If SQLite has not been initialized using [sqlite3_initialize()] prior
+** to invoking sqlite3_complete16() then sqlite3_initialize() is invoked
+** automatically by sqlite3_complete16().  If that initialization fails,
+** then the return value from sqlite3_complete16() will be non-zero
+** regardless of whether or not the input SQL is complete.)^
+**
+** The input to [sqlite3_complete()] must be a zero-terminated
+** UTF-8 string.
+**
+** The input to [sqlite3_complete16()] must be a zero-terminated
+** UTF-16 string in native byte order.
+*/
+SQLITE_API int sqlite3_complete(const char *sql);
+SQLITE_API int sqlite3_complete16(const void *sql);
+
+/*
+** CAPI3REF: Register A Callback To Handle SQLITE_BUSY Errors
+**
+** ^This routine sets a callback function that might be invoked whenever
+** an attempt is made to open a database table that another thread
+** or process has locked.
+**
+** ^If the busy callback is NULL, then [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED]
+** is returned immediately upon encountering the lock.  ^If the busy callback
+** is not NULL, then the callback might be invoked with two arguments.
+**
+** ^The first argument to the busy handler is a copy of the void* pointer which
+** is the third argument to sqlite3_busy_handler().  ^The second argument to
+** the busy handler callback is the number of times that the busy handler has
+** been invoked for this locking event.  ^If the
+** busy callback returns 0, then no additional attempts are made to
+** access the database and [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED] is returned.
+** ^If the callback returns non-zero, then another attempt
+** is made to open the database for reading and the cycle repeats.
+**
+** The presence of a busy handler does not guarantee that it will be invoked
+** when there is lock contention. ^If SQLite determines that invoking the busy
+** handler could result in a deadlock, it will go ahead and return [SQLITE_BUSY]
+** or [SQLITE_IOERR_BLOCKED] instead of invoking the busy handler.
+** Consider a scenario where one process is holding a read lock that
+** it is trying to promote to a reserved lock and
+** a second process is holding a reserved lock that it is trying
+** to promote to an exclusive lock.  The first process cannot proceed
+** because it is blocked by the second and the second process cannot
+** proceed because it is blocked by the first.  If both processes
+** invoke the busy handlers, neither will make any progress.  Therefore,
+** SQLite returns [SQLITE_BUSY] for the first process, hoping that this
+** will induce the first process to release its read lock and allow
+** the second process to proceed.
+**
+** ^The default busy callback is NULL.
+**
+** ^The [SQLITE_BUSY] error is converted to [SQLITE_IOERR_BLOCKED]
+** when SQLite is in the middle of a large transaction where all the
+** changes will not fit into the in-memory cache.  SQLite will
+** already hold a RESERVED lock on the database file, but it needs
+** to promote this lock to EXCLUSIVE so that it can spill cache
+** pages into the database file without harm to concurrent
+** readers.  ^If it is unable to promote the lock, then the in-memory
+** cache will be left in an inconsistent state and so the error
+** code is promoted from the relatively benign [SQLITE_BUSY] to
+** the more severe [SQLITE_IOERR_BLOCKED].  ^This error code promotion
+** forces an automatic rollback of the changes.  See the
+** <a href="/cvstrac/wiki?p=CorruptionFollowingBusyError">
+** CorruptionFollowingBusyError</a> wiki page for a discussion of why
+** this is important.
+**
+** ^(There can only be a single busy handler defined for each
+** [database connection].  Setting a new busy handler clears any
+** previously set handler.)^  ^Note that calling [sqlite3_busy_timeout()]
+** will also set or clear the busy handler.
+**
+** The busy callback should not take any actions which modify the
+** database connection that invoked the busy handler.  Any such actions
+** result in undefined behavior.
+**
+** A busy handler must not close the database connection
+** or [prepared statement] that invoked the busy handler.
+*/
+SQLITE_API int sqlite3_busy_handler(sqlite3*, int(*)(void*,int), void*);
+
+/*
+** CAPI3REF: Set A Busy Timeout
+**
+** ^This routine sets a [sqlite3_busy_handler | busy handler] that sleeps
+** for a specified amount of time when a table is locked.  ^The handler
+** will sleep multiple times until at least "ms" milliseconds of sleeping
+** have accumulated.  ^After at least "ms" milliseconds of sleeping,
+** the handler returns 0 which causes [sqlite3_step()] to return
+** [SQLITE_BUSY] or [SQLITE_IOERR_BLOCKED].
+**
+** ^Calling this routine with an argument less than or equal to zero
+** turns off all busy handlers.
+**
+** ^(There can only be a single busy handler for a particular
+** [database connection] any any given moment.  If another busy handler
+** was defined  (using [sqlite3_busy_handler()]) prior to calling
+** this routine, that other busy handler is cleared.)^
+*/
+SQLITE_API int sqlite3_busy_timeout(sqlite3*, int ms);
+
+/*
+** CAPI3REF: Convenience Routines For Running Queries
+**
+** This is a legacy interface that is preserved for backwards compatibility.
+** Use of this interface is not recommended.
+**
+** Definition: A <b>result table</b> is memory data structure created by the
+** [sqlite3_get_table()] interface.  A result table records the
+** complete query results from one or more queries.
+**
+** The table conceptually has a number of rows and columns.  But
+** these numbers are not part of the result table itself.  These
+** numbers are obtained separately.  Let N be the number of rows
+** and M be the number of columns.
+**
+** A result table is an array of pointers to zero-terminated UTF-8 strings.
+** There are (N+1)*M elements in the array.  The first M pointers point
+** to zero-terminated strings that  contain the names of the columns.
+** The remaining entries all point to query results.  NULL values result
+** in NULL pointers.  All other values are in their UTF-8 zero-terminated
+** string representation as returned by [sqlite3_column_text()].
+**
+** A result table might consist of one or more memory allocations.
+** It is not safe to pass a result table directly to [sqlite3_free()].
+** A result table should be deallocated using [sqlite3_free_table()].
+**
+** ^(As an example of the result table format, suppose a query result
+** is as follows:
+**
+** <blockquote><pre>
+**        Name        | Age
+**        -----------------------
+**        Alice       | 43
+**        Bob         | 28
+**        Cindy       | 21
+** </pre></blockquote>
+**
+** There are two column (M==2) and three rows (N==3).  Thus the
+** result table has 8 entries.  Suppose the result table is stored
+** in an array names azResult.  Then azResult holds this content:
+**
+** <blockquote><pre>
+**        azResult[0] = "Name";
+**        azResult[1] = "Age";
+**        azResult[2] = "Alice";
+**        azResult[3] = "43";
+**        azResult[4] = "Bob";
+**        azResult[5] = "28";
+**        azResult[6] = "Cindy";
+**        azResult[7] = "21";
+** </pre></blockquote>)^
+**
+** ^The sqlite3_get_table() function evaluates one or more
+** semicolon-separated SQL statements in the zero-terminated UTF-8
+** string of its 2nd parameter and returns a result table to the
+** pointer given in its 3rd parameter.
+**
+** After the application has finished with the result from sqlite3_get_table(),
+** it must pass the result table pointer to sqlite3_free_table() in order to
+** release the memory that was malloced.  Because of the way the
+** [sqlite3_malloc()] happens within sqlite3_get_table(), the calling
+** function must not try to call [sqlite3_free()] directly.  Only
+** [sqlite3_free_table()] is able to release the memory properly and safely.
+**
+** The sqlite3_get_table() interface is implemented as a wrapper around
+** [sqlite3_exec()].  The sqlite3_get_table() routine does not have access
+** to any internal data structures of SQLite.  It uses only the public
+** interface defined here.  As a consequence, errors that occur in the
+** wrapper layer outside of the internal [sqlite3_exec()] call are not
+** reflected in subsequent calls to [sqlite3_errcode()] or
+** [sqlite3_errmsg()].
+*/
+SQLITE_API int sqlite3_get_table(
+        sqlite3 *db,          /* An open database */
+        const char *zSql,     /* SQL to be evaluated */
+        char ***pazResult,    /* Results of the query */
+        int *pnRow,           /* Number of result rows written here */
+        int *pnColumn,        /* Number of result columns written here */
+        char **pzErrmsg       /* Error msg written here */
+);
+SQLITE_API void sqlite3_free_table(char **result);
+
+/*
+** CAPI3REF: Formatted String Printing Functions
+**
+** These routines are work-alikes of the "printf()" family of functions
+** from the standard C library.
+**
+** ^The sqlite3_mprintf() and sqlite3_vmprintf() routines write their
+** results into memory obtained from [sqlite3_malloc()].
+** The strings returned by these two routines should be
+** released by [sqlite3_free()].  ^Both routines return a
+** NULL pointer if [sqlite3_malloc()] is unable to allocate enough
+** memory to hold the resulting string.
+**
+** ^(The sqlite3_snprintf() routine is similar to "snprintf()" from
+** the standard C library.  The result is written into the
+** buffer supplied as the second parameter whose size is given by
+** the first parameter. Note that the order of the
+** first two parameters is reversed from snprintf().)^  This is an
+** historical accident that cannot be fixed without breaking
+** backwards compatibility.  ^(Note also that sqlite3_snprintf()
+** returns a pointer to its buffer instead of the number of
+** characters actually written into the buffer.)^  We admit that
+** the number of characters written would be a more useful return
+** value but we cannot change the implementation of sqlite3_snprintf()
+** now without breaking compatibility.
+**
+** ^As long as the buffer size is greater than zero, sqlite3_snprintf()
+** guarantees that the buffer is always zero-terminated.  ^The first
+** parameter "n" is the total size of the buffer, including space for
+** the zero terminator.  So the longest string that can be completely
+** written will be n-1 characters.
+**
+** ^The sqlite3_vsnprintf() routine is a varargs version of sqlite3_snprintf().
+**
+** These routines all implement some additional formatting
+** options that are useful for constructing SQL statements.
+** All of the usual printf() formatting options apply.  In addition, there
+** is are "%q", "%Q", and "%z" options.
+**
+** ^(The %q option works like %s in that it substitutes a null-terminated
+** string from the argument list.  But %q also doubles every '\'' character.
+** %q is designed for use inside a string literal.)^  By doubling each '\''
+** character it escapes that character and allows it to be inserted into
+** the string.
+**
+** For example, assume the string variable zText contains text as follows:
+**
+** <blockquote><pre>
+**  char *zText = "It's a happy day!";
+** </pre></blockquote>
+**
+** One can use this text in an SQL statement as follows:
+**
+** <blockquote><pre>
+**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES('%q')", zText);
+**  sqlite3_exec(db, zSQL, 0, 0, 0);
+**  sqlite3_free(zSQL);
+** </pre></blockquote>
+**
+** Because the %q format string is used, the '\'' character in zText
+** is escaped and the SQL generated is as follows:
+**
+** <blockquote><pre>
+**  INSERT INTO table1 VALUES('It''s a happy day!')
+** </pre></blockquote>
+**
+** This is correct.  Had we used %s instead of %q, the generated SQL
+** would have looked like this:
+**
+** <blockquote><pre>
+**  INSERT INTO table1 VALUES('It's a happy day!');
+** </pre></blockquote>
+**
+** This second example is an SQL syntax error.  As a general rule you should
+** always use %q instead of %s when inserting text into a string literal.
+**
+** ^(The %Q option works like %q except it also adds single quotes around
+** the outside of the total string.  Additionally, if the parameter in the
+** argument list is a NULL pointer, %Q substitutes the text "NULL" (without
+** single quotes).)^  So, for example, one could say:
+**
+** <blockquote><pre>
+**  char *zSQL = sqlite3_mprintf("INSERT INTO table VALUES(%Q)", zText);
+**  sqlite3_exec(db, zSQL, 0, 0, 0);
+**  sqlite3_free(zSQL);
+** </pre></blockquote>
+**
+** The code above will render a correct SQL statement in the zSQL
+** variable even if the zText variable is a NULL pointer.
+**
+** ^(The "%z" formatting option works like "%s" but with the
+** addition that after the string has been read and copied into
+** the result, [sqlite3_free()] is called on the input string.)^
+*/
+SQLITE_API char *sqlite3_mprintf(const char*,...);
+SQLITE_API char *sqlite3_vmprintf(const char*, va_list);
+SQLITE_API char *sqlite3_snprintf(int,char*,const char*, ...);
+SQLITE_API char *sqlite3_vsnprintf(int,char*,const char*, va_list);
+
+/*
+** CAPI3REF: Memory Allocation Subsystem
+**
+** The SQLite core uses these three routines for all of its own
+** internal memory allocation needs. "Core" in the previous sentence
+** does not include operating-system specific VFS implementation.  The
+** Windows VFS uses native malloc() and free() for some operations.
+**
+** ^The sqlite3_malloc() routine returns a pointer to a block
+** of memory at least N bytes in length, where N is the parameter.
+** ^If sqlite3_malloc() is unable to obtain sufficient free
+** memory, it returns a NULL pointer.  ^If the parameter N to
+** sqlite3_malloc() is zero or negative then sqlite3_malloc() returns
+** a NULL pointer.
+**
+** ^Calling sqlite3_free() with a pointer previously returned
+** by sqlite3_malloc() or sqlite3_realloc() releases that memory so
+** that it might be reused.  ^The sqlite3_free() routine is
+** a no-op if is called with a NULL pointer.  Passing a NULL pointer
+** to sqlite3_free() is harmless.  After being freed, memory
+** should neither be read nor written.  Even reading previously freed
+** memory might result in a segmentation fault or other severe error.
+** Memory corruption, a segmentation fault, or other severe error
+** might result if sqlite3_free() is called with a non-NULL pointer that
+** was not obtained from sqlite3_malloc() or sqlite3_realloc().
+**
+** ^(The sqlite3_realloc() interface attempts to resize a
+** prior memory allocation to be at least N bytes, where N is the
+** second parameter.  The memory allocation to be resized is the first
+** parameter.)^ ^ If the first parameter to sqlite3_realloc()
+** is a NULL pointer then its behavior is identical to calling
+** sqlite3_malloc(N) where N is the second parameter to sqlite3_realloc().
+** ^If the second parameter to sqlite3_realloc() is zero or
+** negative then the behavior is exactly the same as calling
+** sqlite3_free(P) where P is the first parameter to sqlite3_realloc().
+** ^sqlite3_realloc() returns a pointer to a memory allocation
+** of at least N bytes in size or NULL if sufficient memory is unavailable.
+** ^If M is the size of the prior allocation, then min(N,M) bytes
+** of the prior allocation are copied into the beginning of buffer returned
+** by sqlite3_realloc() and the prior allocation is freed.
+** ^If sqlite3_realloc() returns NULL, then the prior allocation
+** is not freed.
+**
+** ^The memory returned by sqlite3_malloc() and sqlite3_realloc()
+** is always aligned to at least an 8 byte boundary, or to a
+** 4 byte boundary if the [SQLITE_4_BYTE_ALIGNED_MALLOC] compile-time
+** option is used.
+**
+** In SQLite version 3.5.0 and 3.5.1, it was possible to define
+** the SQLITE_OMIT_MEMORY_ALLOCATION which would cause the built-in
+** implementation of these routines to be omitted.  That capability
+** is no longer provided.  Only built-in memory allocators can be used.
+**
+** The Windows OS interface layer calls
+** the system malloc() and free() directly when converting
+** filenames between the UTF-8 encoding used by SQLite
+** and whatever filename encoding is used by the particular Windows
+** installation.  Memory allocation errors are detected, but
+** they are reported back as [SQLITE_CANTOPEN] or
+** [SQLITE_IOERR] rather than [SQLITE_NOMEM].
+**
+** The pointer arguments to [sqlite3_free()] and [sqlite3_realloc()]
+** must be either NULL or else pointers obtained from a prior
+** invocation of [sqlite3_malloc()] or [sqlite3_realloc()] that have
+** not yet been released.
+**
+** The application must not read or write any part of
+** a block of memory after it has been released using
+** [sqlite3_free()] or [sqlite3_realloc()].
+*/
+SQLITE_API void *sqlite3_malloc(int);
+SQLITE_API void *sqlite3_realloc(void*, int);
+SQLITE_API void sqlite3_free(void*);
+
+/*
+** CAPI3REF: Memory Allocator Statistics
+**
+** SQLite provides these two interfaces for reporting on the status
+** of the [sqlite3_malloc()], [sqlite3_free()], and [sqlite3_realloc()]
+** routines, which form the built-in memory allocation subsystem.
+**
+** ^The [sqlite3_memory_used()] routine returns the number of bytes
+** of memory currently outstanding (malloced but not freed).
+** ^The [sqlite3_memory_highwater()] routine returns the maximum
+** value of [sqlite3_memory_used()] since the high-water mark
+** was last reset.  ^The values returned by [sqlite3_memory_used()] and
+** [sqlite3_memory_highwater()] include any overhead
+** added by SQLite in its implementation of [sqlite3_malloc()],
+** but not overhead added by the any underlying system library
+** routines that [sqlite3_malloc()] may call.
+**
+** ^The memory high-water mark is reset to the current value of
+** [sqlite3_memory_used()] if and only if the parameter to
+** [sqlite3_memory_highwater()] is true.  ^The value returned
+** by [sqlite3_memory_highwater(1)] is the high-water mark
+** prior to the reset.
+*/
+SQLITE_API sqlite3_int64 sqlite3_memory_used(void);
+SQLITE_API sqlite3_int64 sqlite3_memory_highwater(int resetFlag);
+
+/*
+** CAPI3REF: Pseudo-Random Number Generator
+**
+** SQLite contains a high-quality pseudo-random number generator (PRNG) used to
+** select random [ROWID | ROWIDs] when inserting new records into a table that
+** already uses the largest possible [ROWID].  The PRNG is also used for
+** the build-in random() and randomblob() SQL functions.  This interface allows
+** applications to access the same PRNG for other purposes.
+**
+** ^A call to this routine stores N bytes of randomness into buffer P.
+**
+** ^The first time this routine is invoked (either internally or by
+** the application) the PRNG is seeded using randomness obtained
+** from the xRandomness method of the default [sqlite3_vfs] object.
+** ^On all subsequent invocations, the pseudo-randomness is generated
+** internally and without recourse to the [sqlite3_vfs] xRandomness
+** method.
+*/
+SQLITE_API void sqlite3_randomness(int N, void *P);
+
+/*
+** CAPI3REF: Compile-Time Authorization Callbacks
+**
+** ^This routine registers an authorizer callback with a particular
+** [database connection], supplied in the first argument.
+** ^The authorizer callback is invoked as SQL statements are being compiled
+** by [sqlite3_prepare()] or its variants [sqlite3_prepare_v2()],
+** [sqlite3_prepare16()] and [sqlite3_prepare16_v2()].  ^At various
+** points during the compilation process, as logic is being created
+** to perform various actions, the authorizer callback is invoked to
+** see if those actions are allowed.  ^The authorizer callback should
+** return [SQLITE_OK] to allow the action, [SQLITE_IGNORE] to disallow the
+** specific action but allow the SQL statement to continue to be
+** compiled, or [SQLITE_DENY] to cause the entire SQL statement to be
+** rejected with an error.  ^If the authorizer callback returns
+** any value other than [SQLITE_IGNORE], [SQLITE_OK], or [SQLITE_DENY]
+** then the [sqlite3_prepare_v2()] or equivalent call that triggered
+** the authorizer will fail with an error message.
+**
+** When the callback returns [SQLITE_OK], that means the operation
+** requested is ok.  ^When the callback returns [SQLITE_DENY], the
+** [sqlite3_prepare_v2()] or equivalent call that triggered the
+** authorizer will fail with an error message explaining that
+** access is denied.
+**
+** ^The first parameter to the authorizer callback is a copy of the third
+** parameter to the sqlite3_set_authorizer() interface. ^The second parameter
+** to the callback is an integer [SQLITE_COPY | action code] that specifies
+** the particular action to be authorized. ^The third through sixth parameters
+** to the callback are zero-terminated strings that contain additional
+** details about the action to be authorized.
+**
+** ^If the action code is [SQLITE_READ]
+** and the callback returns [SQLITE_IGNORE] then the
+** [prepared statement] statement is constructed to substitute
+** a NULL value in place of the table column that would have
+** been read if [SQLITE_OK] had been returned.  The [SQLITE_IGNORE]
+** return can be used to deny an untrusted user access to individual
+** columns of a table.
+** ^If the action code is [SQLITE_DELETE] and the callback returns
+** [SQLITE_IGNORE] then the [DELETE] operation proceeds but the
+** [truncate optimization] is disabled and all rows are deleted individually.
+**
+** An authorizer is used when [sqlite3_prepare | preparing]
+** SQL statements from an untrusted source, to ensure that the SQL statements
+** do not try to access data they are not allowed to see, or that they do not
+** try to execute malicious statements that damage the database.  For
+** example, an application may allow a user to enter arbitrary
+** SQL queries for evaluation by a database.  But the application does
+** not want the user to be able to make arbitrary changes to the
+** database.  An authorizer could then be put in place while the
+** user-entered SQL is being [sqlite3_prepare | prepared] that
+** disallows everything except [SELECT] statements.
+**
+** Applications that need to process SQL from untrusted sources
+** might also consider lowering resource limits using [sqlite3_limit()]
+** and limiting database size using the [max_page_count] [PRAGMA]
+** in addition to using an authorizer.
+**
+** ^(Only a single authorizer can be in place on a database connection
+** at a time.  Each call to sqlite3_set_authorizer overrides the
+** previous call.)^  ^Disable the authorizer by installing a NULL callback.
+** The authorizer is disabled by default.
+**
+** The authorizer callback must not do anything that will modify
+** the database connection that invoked the authorizer callback.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** ^When [sqlite3_prepare_v2()] is used to prepare a statement, the
+** statement might be re-prepared during [sqlite3_step()] due to a
+** schema change.  Hence, the application should ensure that the
+** correct authorizer callback remains in place during the [sqlite3_step()].
+**
+** ^Note that the authorizer callback is invoked only during
+** [sqlite3_prepare()] or its variants.  Authorization is not
+** performed during statement evaluation in [sqlite3_step()], unless
+** as stated in the previous paragraph, sqlite3_step() invokes
+** sqlite3_prepare_v2() to reprepare a statement after a schema change.
+*/
+SQLITE_API int sqlite3_set_authorizer(
+        sqlite3*,
+        int (*xAuth)(void*,int,const char*,const char*,const char*,const char*),
+        void *pUserData
+);
+
+/*
+** CAPI3REF: Authorizer Return Codes
+**
+** The [sqlite3_set_authorizer | authorizer callback function] must
+** return either [SQLITE_OK] or one of these two constants in order
+** to signal SQLite whether or not the action is permitted.  See the
+** [sqlite3_set_authorizer | authorizer documentation] for additional
+** information.
+*/
+#define SQLITE_DENY   1   /* Abort the SQL statement with an error */
+#define SQLITE_IGNORE 2   /* Don't allow access, but don't generate an error */
+
+/*
+** CAPI3REF: Authorizer Action Codes
+**
+** The [sqlite3_set_authorizer()] interface registers a callback function
+** that is invoked to authorize certain SQL statement actions.  The
+** second parameter to the callback is an integer code that specifies
+** what action is being authorized.  These are the integer action codes that
+** the authorizer callback may be passed.
+**
+** These action code values signify what kind of operation is to be
+** authorized.  The 3rd and 4th parameters to the authorization
+** callback function will be parameters or NULL depending on which of these
+** codes is used as the second parameter.  ^(The 5th parameter to the
+** authorizer callback is the name of the database ("main", "temp",
+** etc.) if applicable.)^  ^The 6th parameter to the authorizer callback
+** is the name of the inner-most trigger or view that is responsible for
+** the access attempt or NULL if this access attempt is directly from
+** top-level SQL code.
+*/
+/******************************************* 3rd ************ 4th ***********/
+#define SQLITE_CREATE_INDEX          1   /* Index Name      Table Name      */
+#define SQLITE_CREATE_TABLE          2   /* Table Name      NULL            */
+#define SQLITE_CREATE_TEMP_INDEX     3   /* Index Name      Table Name      */
+#define SQLITE_CREATE_TEMP_TABLE     4   /* Table Name      NULL            */
+#define SQLITE_CREATE_TEMP_TRIGGER   5   /* Trigger Name    Table Name      */
+#define SQLITE_CREATE_TEMP_VIEW      6   /* View Name       NULL            */
+#define SQLITE_CREATE_TRIGGER        7   /* Trigger Name    Table Name      */
+#define SQLITE_CREATE_VIEW           8   /* View Name       NULL            */
+#define SQLITE_DELETE                9   /* Table Name      NULL            */
+#define SQLITE_DROP_INDEX           10   /* Index Name      Table Name      */
+#define SQLITE_DROP_TABLE           11   /* Table Name      NULL            */
+#define SQLITE_DROP_TEMP_INDEX      12   /* Index Name      Table Name      */
+#define SQLITE_DROP_TEMP_TABLE      13   /* Table Name      NULL            */
+#define SQLITE_DROP_TEMP_TRIGGER    14   /* Trigger Name    Table Name      */
+#define SQLITE_DROP_TEMP_VIEW       15   /* View Name       NULL            */
+#define SQLITE_DROP_TRIGGER         16   /* Trigger Name    Table Name      */
+#define SQLITE_DROP_VIEW            17   /* View Name       NULL            */
+#define SQLITE_INSERT               18   /* Table Name      NULL            */
+#define SQLITE_PRAGMA               19   /* Pragma Name     1st arg or NULL */
+#define SQLITE_READ                 20   /* Table Name      Column Name     */
+#define SQLITE_SELECT               21   /* NULL            NULL            */
+#define SQLITE_TRANSACTION          22   /* Operation       NULL            */
+#define SQLITE_UPDATE               23   /* Table Name      Column Name     */
+#define SQLITE_ATTACH               24   /* Filename        NULL            */
+#define SQLITE_DETACH               25   /* Database Name   NULL            */
+#define SQLITE_ALTER_TABLE          26   /* Database Name   Table Name      */
+#define SQLITE_REINDEX              27   /* Index Name      NULL            */
+#define SQLITE_ANALYZE              28   /* Table Name      NULL            */
+#define SQLITE_CREATE_VTABLE        29   /* Table Name      Module Name     */
+#define SQLITE_DROP_VTABLE          30   /* Table Name      Module Name     */
+#define SQLITE_FUNCTION             31   /* NULL            Function Name   */
+#define SQLITE_SAVEPOINT            32   /* Operation       Savepoint Name  */
+#define SQLITE_COPY                  0   /* No longer used */
+
+/*
+** CAPI3REF: Tracing And Profiling Functions
+**
+** These routines register callback functions that can be used for
+** tracing and profiling the execution of SQL statements.
+**
+** ^The callback function registered by sqlite3_trace() is invoked at
+** various times when an SQL statement is being run by [sqlite3_step()].
+** ^The sqlite3_trace() callback is invoked with a UTF-8 rendering of the
+** SQL statement text as the statement first begins executing.
+** ^(Additional sqlite3_trace() callbacks might occur
+** as each triggered subprogram is entered.  The callbacks for triggers
+** contain a UTF-8 SQL comment that identifies the trigger.)^
+**
+** ^The callback function registered by sqlite3_profile() is invoked
+** as each SQL statement finishes.  ^The profile callback contains
+** the original statement text and an estimate of wall-clock time
+** of how long that statement took to run.  ^The profile callback
+** time is in units of nanoseconds, however the current implementation
+** is only capable of millisecond resolution so the six least significant
+** digits in the time are meaningless.  Future versions of SQLite
+** might provide greater resolution on the profiler callback.  The
+** sqlite3_profile() function is considered experimental and is
+** subject to change in future versions of SQLite.
+*/
+SQLITE_API void *sqlite3_trace(sqlite3*, void(*xTrace)(void*,const char*), void*);
+SQLITE_API SQLITE_EXPERIMENTAL void *sqlite3_profile(sqlite3*,
+                void(*xProfile)(void*,const char*,sqlite3_uint64), void*);
+
+/*
+** CAPI3REF: Query Progress Callbacks
+**
+** ^The sqlite3_progress_handler(D,N,X,P) interface causes the callback
+** function X to be invoked periodically during long running calls to
+** [sqlite3_exec()], [sqlite3_step()] and [sqlite3_get_table()] for
+** database connection D.  An example use for this
+** interface is to keep a GUI updated during a large query.
+**
+** ^The parameter P is passed through as the only parameter to the
+** callback function X.  ^The parameter N is the number of
+** [virtual machine instructions] that are evaluated between successive
+** invocations of the callback X.
+**
+** ^Only a single progress handler may be defined at one time per
+** [database connection]; setting a new progress handler cancels the
+** old one.  ^Setting parameter X to NULL disables the progress handler.
+** ^The progress handler is also disabled by setting N to a value less
+** than 1.
+**
+** ^If the progress callback returns non-zero, the operation is
+** interrupted.  This feature can be used to implement a
+** "Cancel" button on a GUI progress dialog box.
+**
+** The progress handler callback must not do anything that will modify
+** the database connection that invoked the progress handler.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+*/
+SQLITE_API void sqlite3_progress_handler(sqlite3*, int, int(*)(void*), void*);
+
+/*
+** CAPI3REF: Opening A New Database Connection
+**
+** ^These routines open an SQLite database file whose name is given by the
+** filename argument. ^The filename argument is interpreted as UTF-8 for
+** sqlite3_open() and sqlite3_open_v2() and as UTF-16 in the native byte
+** order for sqlite3_open16(). ^(A [database connection] handle is usually
+** returned in *ppDb, even if an error occurs.  The only exception is that
+** if SQLite is unable to allocate memory to hold the [sqlite3] object,
+** a NULL will be written into *ppDb instead of a pointer to the [sqlite3]
+** object.)^ ^(If the database is opened (and/or created) successfully, then
+** [SQLITE_OK] is returned.  Otherwise an [error code] is returned.)^ ^The
+** [sqlite3_errmsg()] or [sqlite3_errmsg16()] routines can be used to obtain
+** an English language description of the error following a failure of any
+** of the sqlite3_open() routines.
+**
+** ^The default encoding for the database will be UTF-8 if
+** sqlite3_open() or sqlite3_open_v2() is called and
+** UTF-16 in the native byte order if sqlite3_open16() is used.
+**
+** Whether or not an error occurs when it is opened, resources
+** associated with the [database connection] handle should be released by
+** passing it to [sqlite3_close()] when it is no longer required.
+**
+** The sqlite3_open_v2() interface works like sqlite3_open()
+** except that it accepts two additional parameters for additional control
+** over the new database connection.  ^(The flags parameter to
+** sqlite3_open_v2() can take one of
+** the following three values, optionally combined with the
+** [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX], [SQLITE_OPEN_SHAREDCACHE],
+** and/or [SQLITE_OPEN_PRIVATECACHE] flags:)^
+**
+** <dl>
+** ^(<dt>[SQLITE_OPEN_READONLY]</dt>
+** <dd>The database is opened in read-only mode.  If the database does not
+** already exist, an error is returned.</dd>)^
+**
+** ^(<dt>[SQLITE_OPEN_READWRITE]</dt>
+** <dd>The database is opened for reading and writing if possible, or reading
+** only if the file is write protected by the operating system.  In either
+** case the database must already exist, otherwise an error is returned.</dd>)^
+**
+** ^(<dt>[SQLITE_OPEN_READWRITE] | [SQLITE_OPEN_CREATE]</dt>
+** <dd>The database is opened for reading and writing, and is created if
+** it does not already exist. This is the behavior that is always used for
+** sqlite3_open() and sqlite3_open16().</dd>)^
+** </dl>
+**
+** If the 3rd parameter to sqlite3_open_v2() is not one of the
+** combinations shown above or one of the combinations shown above combined
+** with the [SQLITE_OPEN_NOMUTEX], [SQLITE_OPEN_FULLMUTEX],
+** [SQLITE_OPEN_SHAREDCACHE] and/or [SQLITE_OPEN_PRIVATECACHE] flags,
+** then the behavior is undefined.
+**
+** ^If the [SQLITE_OPEN_NOMUTEX] flag is set, then the database connection
+** opens in the multi-thread [threading mode] as long as the single-thread
+** mode has not been set at compile-time or start-time.  ^If the
+** [SQLITE_OPEN_FULLMUTEX] flag is set then the database connection opens
+** in the serialized [threading mode] unless single-thread was
+** previously selected at compile-time or start-time.
+** ^The [SQLITE_OPEN_SHAREDCACHE] flag causes the database connection to be
+** eligible to use [shared cache mode], regardless of whether or not shared
+** cache is enabled using [sqlite3_enable_shared_cache()].  ^The
+** [SQLITE_OPEN_PRIVATECACHE] flag causes the database connection to not
+** participate in [shared cache mode] even if it is enabled.
+**
+** ^If the filename is ":memory:", then a private, temporary in-memory database
+** is created for the connection.  ^This in-memory database will vanish when
+** the database connection is closed.  Future versions of SQLite might
+** make use of additional special filenames that begin with the ":" character.
+** It is recommended that when a database filename actually does begin with
+** a ":" character you should prefix the filename with a pathname such as
+** "./" to avoid ambiguity.
+**
+** ^If the filename is an empty string, then a private, temporary
+** on-disk database will be created.  ^This private database will be
+** automatically deleted as soon as the database connection is closed.
+**
+** ^The fourth parameter to sqlite3_open_v2() is the name of the
+** [sqlite3_vfs] object that defines the operating system interface that
+** the new database connection should use.  ^If the fourth parameter is
+** a NULL pointer then the default [sqlite3_vfs] object is used.
+**
+** <b>Note to Windows users:</b>  The encoding used for the filename argument
+** of sqlite3_open() and sqlite3_open_v2() must be UTF-8, not whatever
+** codepage is currently defined.  Filenames containing international
+** characters must be converted to UTF-8 prior to passing them into
+** sqlite3_open() or sqlite3_open_v2().
+*/
+SQLITE_API int sqlite3_open(
+        const char *filename,   /* Database filename (UTF-8) */
+        sqlite3 **ppDb          /* OUT: SQLite db handle */
+);
+SQLITE_API int sqlite3_open16(
+        const void *filename,   /* Database filename (UTF-16) */
+        sqlite3 **ppDb          /* OUT: SQLite db handle */
+);
+SQLITE_API int sqlite3_open_v2(
+        const char *filename,   /* Database filename (UTF-8) */
+        sqlite3 **ppDb,         /* OUT: SQLite db handle */
+        int flags,              /* Flags */
+        const char *zVfs        /* Name of VFS module to use */
+);
+
+/*
+** CAPI3REF: Error Codes And Messages
+**
+** ^The sqlite3_errcode() interface returns the numeric [result code] or
+** [extended result code] for the most recent failed sqlite3_* API call
+** associated with a [database connection]. If a prior API call failed
+** but the most recent API call succeeded, the return value from
+** sqlite3_errcode() is undefined.  ^The sqlite3_extended_errcode()
+** interface is the same except that it always returns the
+** [extended result code] even when extended result codes are
+** disabled.
+**
+** ^The sqlite3_errmsg() and sqlite3_errmsg16() return English-language
+** text that describes the error, as either UTF-8 or UTF-16 respectively.
+** ^(Memory to hold the error message string is managed internally.
+** The application does not need to worry about freeing the result.
+** However, the error string might be overwritten or deallocated by
+** subsequent calls to other SQLite interface functions.)^
+**
+** When the serialized [threading mode] is in use, it might be the
+** case that a second error occurs on a separate thread in between
+** the time of the first error and the call to these interfaces.
+** When that happens, the second error will be reported since these
+** interfaces always report the most recent result.  To avoid
+** this, each thread can obtain exclusive use of the [database connection] D
+** by invoking [sqlite3_mutex_enter]([sqlite3_db_mutex](D)) before beginning
+** to use D and invoking [sqlite3_mutex_leave]([sqlite3_db_mutex](D)) after
+** all calls to the interfaces listed here are completed.
+**
+** If an interface fails with SQLITE_MISUSE, that means the interface
+** was invoked incorrectly by the application.  In that case, the
+** error code and message may or may not be set.
+*/
+SQLITE_API int sqlite3_errcode(sqlite3 *db);
+SQLITE_API int sqlite3_extended_errcode(sqlite3 *db);
+SQLITE_API const char *sqlite3_errmsg(sqlite3*);
+SQLITE_API const void *sqlite3_errmsg16(sqlite3*);
+
+/*
+** CAPI3REF: SQL Statement Object
+** KEYWORDS: {prepared statement} {prepared statements}
+**
+** An instance of this object represents a single SQL statement.
+** This object is variously known as a "prepared statement" or a
+** "compiled SQL statement" or simply as a "statement".
+**
+** The life of a statement object goes something like this:
+**
+** <ol>
+** <li> Create the object using [sqlite3_prepare_v2()] or a related
+**      function.
+** <li> Bind values to [host parameters] using the sqlite3_bind_*()
+**      interfaces.
+** <li> Run the SQL by calling [sqlite3_step()] one or more times.
+** <li> Reset the statement using [sqlite3_reset()] then go back
+**      to step 2.  Do this zero or more times.
+** <li> Destroy the object using [sqlite3_finalize()].
+** </ol>
+**
+** Refer to documentation on individual methods above for additional
+** information.
+*/
+typedef struct sqlite3_stmt sqlite3_stmt;
+
+/*
+** CAPI3REF: Run-time Limits
+**
+** ^(This interface allows the size of various constructs to be limited
+** on a connection by connection basis.  The first parameter is the
+** [database connection] whose limit is to be set or queried.  The
+** second parameter is one of the [limit categories] that define a
+** class of constructs to be size limited.  The third parameter is the
+** new limit for that construct.)^
+**
+** ^If the new limit is a negative number, the limit is unchanged.
+** ^(For each limit category SQLITE_LIMIT_<i>NAME</i> there is a
+** [limits | hard upper bound]
+** set at compile-time by a C preprocessor macro called
+** [limits | SQLITE_MAX_<i>NAME</i>].
+** (The "_LIMIT_" in the name is changed to "_MAX_".))^
+** ^Attempts to increase a limit above its hard upper bound are
+** silently truncated to the hard upper bound.
+**
+** ^Regardless of whether or not the limit was changed, the
+** [sqlite3_limit()] interface returns the prior value of the limit.
+** ^Hence, to find the current value of a limit without changing it,
+** simply invoke this interface with the third parameter set to -1.
+**
+** Run-time limits are intended for use in applications that manage
+** both their own internal database and also databases that are controlled
+** by untrusted external sources.  An example application might be a
+** web browser that has its own databases for storing history and
+** separate databases controlled by JavaScript applications downloaded
+** off the Internet.  The internal databases can be given the
+** large, default limits.  Databases managed by external sources can
+** be given much smaller limits designed to prevent a denial of service
+** attack.  Developers might also want to use the [sqlite3_set_authorizer()]
+** interface to further control untrusted SQL.  The size of the database
+** created by an untrusted script can be contained using the
+** [max_page_count] [PRAGMA].
+**
+** New run-time limit categories may be added in future releases.
+*/
+SQLITE_API int sqlite3_limit(sqlite3*, int id, int newVal);
+
+/*
+** CAPI3REF: Run-Time Limit Categories
+** KEYWORDS: {limit category} {*limit categories}
+**
+** These constants define various performance limits
+** that can be lowered at run-time using [sqlite3_limit()].
+** The synopsis of the meanings of the various limits is shown below.
+** Additional information is available at [limits | Limits in SQLite].
+**
+** <dl>
+** ^(<dt>SQLITE_LIMIT_LENGTH</dt>
+** <dd>The maximum size of any string or BLOB or table row, in bytes.<dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_SQL_LENGTH</dt>
+** <dd>The maximum length of an SQL statement, in bytes.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_COLUMN</dt>
+** <dd>The maximum number of columns in a table definition or in the
+** result set of a [SELECT] or the maximum number of columns in an index
+** or in an ORDER BY or GROUP BY clause.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_EXPR_DEPTH</dt>
+** <dd>The maximum depth of the parse tree on any expression.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_COMPOUND_SELECT</dt>
+** <dd>The maximum number of terms in a compound SELECT statement.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_VDBE_OP</dt>
+** <dd>The maximum number of instructions in a virtual machine program
+** used to implement an SQL statement.  This limit is not currently
+** enforced, though that might be added in some future release of
+** SQLite.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_FUNCTION_ARG</dt>
+** <dd>The maximum number of arguments on a function.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_ATTACHED</dt>
+** <dd>The maximum number of [ATTACH | attached databases].)^</dd>
+**
+** ^(<dt>SQLITE_LIMIT_LIKE_PATTERN_LENGTH</dt>
+** <dd>The maximum length of the pattern argument to the [LIKE] or
+** [GLOB] operators.</dd>)^
+**
+** ^(<dt>SQLITE_LIMIT_VARIABLE_NUMBER</dt>
+** <dd>The maximum index number of any [parameter] in an SQL statement.)^
+**
+** ^(<dt>SQLITE_LIMIT_TRIGGER_DEPTH</dt>
+** <dd>The maximum depth of recursion for triggers.</dd>)^
+** </dl>
+*/
+#define SQLITE_LIMIT_LENGTH                    0
+#define SQLITE_LIMIT_SQL_LENGTH                1
+#define SQLITE_LIMIT_COLUMN                    2
+#define SQLITE_LIMIT_EXPR_DEPTH                3
+#define SQLITE_LIMIT_COMPOUND_SELECT           4
+#define SQLITE_LIMIT_VDBE_OP                   5
+#define SQLITE_LIMIT_FUNCTION_ARG              6
+#define SQLITE_LIMIT_ATTACHED                  7
+#define SQLITE_LIMIT_LIKE_PATTERN_LENGTH       8
+#define SQLITE_LIMIT_VARIABLE_NUMBER           9
+#define SQLITE_LIMIT_TRIGGER_DEPTH            10
+
+/*
+** CAPI3REF: Compiling An SQL Statement
+** KEYWORDS: {SQL statement compiler}
+**
+** To execute an SQL query, it must first be compiled into a byte-code
+** program using one of these routines.
+**
+** The first argument, "db", is a [database connection] obtained from a
+** prior successful call to [sqlite3_open()], [sqlite3_open_v2()] or
+** [sqlite3_open16()].  The database connection must not have been closed.
+**
+** The second argument, "zSql", is the statement to be compiled, encoded
+** as either UTF-8 or UTF-16.  The sqlite3_prepare() and sqlite3_prepare_v2()
+** interfaces use UTF-8, and sqlite3_prepare16() and sqlite3_prepare16_v2()
+** use UTF-16.
+**
+** ^If the nByte argument is less than zero, then zSql is read up to the
+** first zero terminator. ^If nByte is non-negative, then it is the maximum
+** number of  bytes read from zSql.  ^When nByte is non-negative, the
+** zSql string ends at either the first '\000' or '\u0000' character or
+** the nByte-th byte, whichever comes first. If the caller knows
+** that the supplied string is nul-terminated, then there is a small
+** performance advantage to be gained by passing an nByte parameter that
+** is equal to the number of bytes in the input string <i>including</i>
+** the nul-terminator bytes.
+**
+** ^If pzTail is not NULL then *pzTail is made to point to the first byte
+** past the end of the first SQL statement in zSql.  These routines only
+** compile the first statement in zSql, so *pzTail is left pointing to
+** what remains uncompiled.
+**
+** ^*ppStmt is left pointing to a compiled [prepared statement] that can be
+** executed using [sqlite3_step()].  ^If there is an error, *ppStmt is set
+** to NULL.  ^If the input text contains no SQL (if the input is an empty
+** string or a comment) then *ppStmt is set to NULL.
+** The calling procedure is responsible for deleting the compiled
+** SQL statement using [sqlite3_finalize()] after it has finished with it.
+** ppStmt may not be NULL.
+**
+** ^On success, the sqlite3_prepare() family of routines return [SQLITE_OK];
+** otherwise an [error code] is returned.
+**
+** The sqlite3_prepare_v2() and sqlite3_prepare16_v2() interfaces are
+** recommended for all new programs. The two older interfaces are retained
+** for backwards compatibility, but their use is discouraged.
+** ^In the "v2" interfaces, the prepared statement
+** that is returned (the [sqlite3_stmt] object) contains a copy of the
+** original SQL text. This causes the [sqlite3_step()] interface to
+** behave differently in three ways:
+**
+** <ol>
+** <li>
+** ^If the database schema changes, instead of returning [SQLITE_SCHEMA] as it
+** always used to do, [sqlite3_step()] will automatically recompile the SQL
+** statement and try to run it again.
+** </li>
+**
+** <li>
+** ^When an error occurs, [sqlite3_step()] will return one of the detailed
+** [error codes] or [extended error codes].  ^The legacy behavior was that
+** [sqlite3_step()] would only return a generic [SQLITE_ERROR] result code
+** and the application would have to make a second call to [sqlite3_reset()]
+** in order to find the underlying cause of the problem. With the "v2" prepare
+** interfaces, the underlying reason for the error is returned immediately.
+** </li>
+**
+** <li>
+** ^If the specific value bound to [parameter | host parameter] in the
+** WHERE clause might influence the choice of query plan for a statement,
+** then the statement will be automatically recompiled, as if there had been
+** a schema change, on the first  [sqlite3_step()] call following any change
+** to the [sqlite3_bind_text | bindings] of that [parameter].
+** ^The specific value of WHERE-clause [parameter] might influence the
+** choice of query plan if the parameter is the left-hand side of a [LIKE]
+** or [GLOB] operator or if the parameter is compared to an indexed column
+** and the [SQLITE_ENABLE_STAT2] compile-time option is enabled.
+** the
+** </li>
+** </ol>
+*/
+SQLITE_API int sqlite3_prepare(
+        sqlite3 *db,            /* Database handle */
+        const char *zSql,       /* SQL statement, UTF-8 encoded */
+        int nByte,              /* Maximum length of zSql in bytes. */
+        sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
+        const char **pzTail     /* OUT: Pointer to unused portion of zSql */
+);
+SQLITE_API int sqlite3_prepare_v2(
+        sqlite3 *db,            /* Database handle */
+        const char *zSql,       /* SQL statement, UTF-8 encoded */
+        int nByte,              /* Maximum length of zSql in bytes. */
+        sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
+        const char **pzTail     /* OUT: Pointer to unused portion of zSql */
+);
+SQLITE_API int sqlite3_prepare16(
+        sqlite3 *db,            /* Database handle */
+        const void *zSql,       /* SQL statement, UTF-16 encoded */
+        int nByte,              /* Maximum length of zSql in bytes. */
+        sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
+        const void **pzTail     /* OUT: Pointer to unused portion of zSql */
+);
+SQLITE_API int sqlite3_prepare16_v2(
+        sqlite3 *db,            /* Database handle */
+        const void *zSql,       /* SQL statement, UTF-16 encoded */
+        int nByte,              /* Maximum length of zSql in bytes. */
+        sqlite3_stmt **ppStmt,  /* OUT: Statement handle */
+        const void **pzTail     /* OUT: Pointer to unused portion of zSql */
+);
+
+/*
+** CAPI3REF: Retrieving Statement SQL
+**
+** ^This interface can be used to retrieve a saved copy of the original
+** SQL text used to create a [prepared statement] if that statement was
+** compiled using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()].
+*/
+SQLITE_API const char *sqlite3_sql(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Determine If An SQL Statement Writes The Database
+**
+** ^The sqlite3_stmt_readonly(X) interface returns true (non-zero) if
+** and only if the [prepared statement] X makes no direct changes to
+** the content of the database file.
+**
+** Note that [application-defined SQL functions] or
+** [virtual tables] might change the database indirectly as a side effect.
+** ^(For example, if an application defines a function "eval()" that
+** calls [sqlite3_exec()], then the following SQL statement would
+** change the database file through side-effects:
+**
+** <blockquote><pre>
+**    SELECT eval('DELETE FROM t1') FROM t2;
+** </pre></blockquote>
+**
+** But because the [SELECT] statement does not change the database file
+** directly, sqlite3_stmt_readonly() would still return true.)^
+**
+** ^Transaction control statements such as [BEGIN], [COMMIT], [ROLLBACK],
+** [SAVEPOINT], and [RELEASE] cause sqlite3_stmt_readonly() to return true,
+** since the statements themselves do not actually modify the database but
+** rather they control the timing of when other statements modify the
+** database.  ^The [ATTACH] and [DETACH] statements also cause
+** sqlite3_stmt_readonly() to return true since, while those statements
+** change the configuration of a database connection, they do not make
+** changes to the content of the database files on disk.
+*/
+SQLITE_API int sqlite3_stmt_readonly(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Dynamically Typed Value Object
+** KEYWORDS: {protected sqlite3_value} {unprotected sqlite3_value}
+**
+** SQLite uses the sqlite3_value object to represent all values
+** that can be stored in a database table. SQLite uses dynamic typing
+** for the values it stores.  ^Values stored in sqlite3_value objects
+** can be integers, floating point values, strings, BLOBs, or NULL.
+**
+** An sqlite3_value object may be either "protected" or "unprotected".
+** Some interfaces require a protected sqlite3_value.  Other interfaces
+** will accept either a protected or an unprotected sqlite3_value.
+** Every interface that accepts sqlite3_value arguments specifies
+** whether or not it requires a protected sqlite3_value.
+**
+** The terms "protected" and "unprotected" refer to whether or not
+** a mutex is held.  An internal mutex is held for a protected
+** sqlite3_value object but no mutex is held for an unprotected
+** sqlite3_value object.  If SQLite is compiled to be single-threaded
+** (with [SQLITE_THREADSAFE=0] and with [sqlite3_threadsafe()] returning 0)
+** or if SQLite is run in one of reduced mutex modes
+** [SQLITE_CONFIG_SINGLETHREAD] or [SQLITE_CONFIG_MULTITHREAD]
+** then there is no distinction between protected and unprotected
+** sqlite3_value objects and they can be used interchangeably.  However,
+** for maximum code portability it is recommended that applications
+** still make the distinction between protected and unprotected
+** sqlite3_value objects even when not strictly required.
+**
+** ^The sqlite3_value objects that are passed as parameters into the
+** implementation of [application-defined SQL functions] are protected.
+** ^The sqlite3_value object returned by
+** [sqlite3_column_value()] is unprotected.
+** Unprotected sqlite3_value objects may only be used with
+** [sqlite3_result_value()] and [sqlite3_bind_value()].
+** The [sqlite3_value_blob | sqlite3_value_type()] family of
+** interfaces require protected sqlite3_value objects.
+*/
+typedef struct Mem sqlite3_value;
+
+/*
+** CAPI3REF: SQL Function Context Object
+**
+** The context in which an SQL function executes is stored in an
+** sqlite3_context object.  ^A pointer to an sqlite3_context object
+** is always first parameter to [application-defined SQL functions].
+** The application-defined SQL function implementation will pass this
+** pointer through into calls to [sqlite3_result_int | sqlite3_result()],
+** [sqlite3_aggregate_context()], [sqlite3_user_data()],
+** [sqlite3_context_db_handle()], [sqlite3_get_auxdata()],
+** and/or [sqlite3_set_auxdata()].
+*/
+typedef struct sqlite3_context sqlite3_context;
+
+/*
+** CAPI3REF: Binding Values To Prepared Statements
+** KEYWORDS: {host parameter} {host parameters} {host parameter name}
+** KEYWORDS: {SQL parameter} {SQL parameters} {parameter binding}
+**
+** ^(In the SQL statement text input to [sqlite3_prepare_v2()] and its variants,
+** literals may be replaced by a [parameter] that matches one of following
+** templates:
+**
+** <ul>
+** <li>  ?
+** <li>  ?NNN
+** <li>  :VVV
+** <li>  @VVV
+** <li>  $VVV
+** </ul>
+**
+** In the templates above, NNN represents an integer literal,
+** and VVV represents an alphanumeric identifier.)^  ^The values of these
+** parameters (also called "host parameter names" or "SQL parameters")
+** can be set using the sqlite3_bind_*() routines defined here.
+**
+** ^The first argument to the sqlite3_bind_*() routines is always
+** a pointer to the [sqlite3_stmt] object returned from
+** [sqlite3_prepare_v2()] or its variants.
+**
+** ^The second argument is the index of the SQL parameter to be set.
+** ^The leftmost SQL parameter has an index of 1.  ^When the same named
+** SQL parameter is used more than once, second and subsequent
+** occurrences have the same index as the first occurrence.
+** ^The index for named parameters can be looked up using the
+** [sqlite3_bind_parameter_index()] API if desired.  ^The index
+** for "?NNN" parameters is the value of NNN.
+** ^The NNN value must be between 1 and the [sqlite3_limit()]
+** parameter [SQLITE_LIMIT_VARIABLE_NUMBER] (default value: 999).
+**
+** ^The third argument is the value to bind to the parameter.
+**
+** ^(In those routines that have a fourth argument, its value is the
+** number of bytes in the parameter.  To be clear: the value is the
+** number of <u>bytes</u> in the value, not the number of characters.)^
+** ^If the fourth parameter is negative, the length of the string is
+** the number of bytes up to the first zero terminator.
+**
+** ^The fifth argument to sqlite3_bind_blob(), sqlite3_bind_text(), and
+** sqlite3_bind_text16() is a destructor used to dispose of the BLOB or
+** string after SQLite has finished with it.  ^The destructor is called
+** to dispose of the BLOB or string even if the call to sqlite3_bind_blob(),
+** sqlite3_bind_text(), or sqlite3_bind_text16() fails.
+** ^If the fifth argument is
+** the special value [SQLITE_STATIC], then SQLite assumes that the
+** information is in static, unmanaged space and does not need to be freed.
+** ^If the fifth argument has the value [SQLITE_TRANSIENT], then
+** SQLite makes its own private copy of the data immediately, before
+** the sqlite3_bind_*() routine returns.
+**
+** ^The sqlite3_bind_zeroblob() routine binds a BLOB of length N that
+** is filled with zeroes.  ^A zeroblob uses a fixed amount of memory
+** (just an integer to hold its size) while it is being processed.
+** Zeroblobs are intended to serve as placeholders for BLOBs whose
+** content is later written using
+** [sqlite3_blob_open | incremental BLOB I/O] routines.
+** ^A negative value for the zeroblob results in a zero-length BLOB.
+**
+** ^If any of the sqlite3_bind_*() routines are called with a NULL pointer
+** for the [prepared statement] or with a prepared statement for which
+** [sqlite3_step()] has been called more recently than [sqlite3_reset()],
+** then the call will return [SQLITE_MISUSE].  If any sqlite3_bind_()
+** routine is passed a [prepared statement] that has been finalized, the
+** result is undefined and probably harmful.
+**
+** ^Bindings are not cleared by the [sqlite3_reset()] routine.
+** ^Unbound parameters are interpreted as NULL.
+**
+** ^The sqlite3_bind_* routines return [SQLITE_OK] on success or an
+** [error code] if anything goes wrong.
+** ^[SQLITE_RANGE] is returned if the parameter
+** index is out of range.  ^[SQLITE_NOMEM] is returned if malloc() fails.
+**
+** See also: [sqlite3_bind_parameter_count()],
+** [sqlite3_bind_parameter_name()], and [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API int sqlite3_bind_blob(sqlite3_stmt*, int, const void*, int n, void(*)(void*));
+SQLITE_API int sqlite3_bind_double(sqlite3_stmt*, int, double);
+SQLITE_API int sqlite3_bind_int(sqlite3_stmt*, int, int);
+SQLITE_API int sqlite3_bind_int64(sqlite3_stmt*, int, sqlite3_int64);
+SQLITE_API int sqlite3_bind_null(sqlite3_stmt*, int);
+SQLITE_API int sqlite3_bind_text(sqlite3_stmt*, int, const char*, int n, void(*)(void*));
+SQLITE_API int sqlite3_bind_text16(sqlite3_stmt*, int, const void*, int, void(*)(void*));
+SQLITE_API int sqlite3_bind_value(sqlite3_stmt*, int, const sqlite3_value*);
+SQLITE_API int sqlite3_bind_zeroblob(sqlite3_stmt*, int, int n);
+
+/*
+** CAPI3REF: Number Of SQL Parameters
+**
+** ^This routine can be used to find the number of [SQL parameters]
+** in a [prepared statement].  SQL parameters are tokens of the
+** form "?", "?NNN", ":AAA", "$AAA", or "@AAA" that serve as
+** placeholders for values that are [sqlite3_bind_blob | bound]
+** to the parameters at a later time.
+**
+** ^(This routine actually returns the index of the largest (rightmost)
+** parameter. For all forms except ?NNN, this will correspond to the
+** number of unique parameters.  If parameters of the ?NNN form are used,
+** there may be gaps in the list.)^
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_name()], and
+** [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API int sqlite3_bind_parameter_count(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Name Of A Host Parameter
+**
+** ^The sqlite3_bind_parameter_name(P,N) interface returns
+** the name of the N-th [SQL parameter] in the [prepared statement] P.
+** ^(SQL parameters of the form "?NNN" or ":AAA" or "@AAA" or "$AAA"
+** have a name which is the string "?NNN" or ":AAA" or "@AAA" or "$AAA"
+** respectively.
+** In other words, the initial ":" or "$" or "@" or "?"
+** is included as part of the name.)^
+** ^Parameters of the form "?" without a following integer have no name
+** and are referred to as "nameless" or "anonymous parameters".
+**
+** ^The first host parameter has an index of 1, not 0.
+**
+** ^If the value N is out of range or if the N-th parameter is
+** nameless, then NULL is returned.  ^The returned string is
+** always in UTF-8 encoding even if the named parameter was
+** originally specified as UTF-16 in [sqlite3_prepare16()] or
+** [sqlite3_prepare16_v2()].
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_count()], and
+** [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API const char *sqlite3_bind_parameter_name(sqlite3_stmt*, int);
+
+/*
+** CAPI3REF: Index Of A Parameter With A Given Name
+**
+** ^Return the index of an SQL parameter given its name.  ^The
+** index value returned is suitable for use as the second
+** parameter to [sqlite3_bind_blob|sqlite3_bind()].  ^A zero
+** is returned if no matching parameter is found.  ^The parameter
+** name must be given in UTF-8 even if the original statement
+** was prepared from UTF-16 text using [sqlite3_prepare16_v2()].
+**
+** See also: [sqlite3_bind_blob|sqlite3_bind()],
+** [sqlite3_bind_parameter_count()], and
+** [sqlite3_bind_parameter_index()].
+*/
+SQLITE_API int sqlite3_bind_parameter_index(sqlite3_stmt*, const char *zName);
+
+/*
+** CAPI3REF: Reset All Bindings On A Prepared Statement
+**
+** ^Contrary to the intuition of many, [sqlite3_reset()] does not reset
+** the [sqlite3_bind_blob | bindings] on a [prepared statement].
+** ^Use this routine to reset all host parameters to NULL.
+*/
+SQLITE_API int sqlite3_clear_bindings(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Number Of Columns In A Result Set
+**
+** ^Return the number of columns in the result set returned by the
+** [prepared statement]. ^This routine returns 0 if pStmt is an SQL
+** statement that does not return data (for example an [UPDATE]).
+**
+** See also: [sqlite3_data_count()]
+*/
+SQLITE_API int sqlite3_column_count(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Column Names In A Result Set
+**
+** ^These routines return the name assigned to a particular column
+** in the result set of a [SELECT] statement.  ^The sqlite3_column_name()
+** interface returns a pointer to a zero-terminated UTF-8 string
+** and sqlite3_column_name16() returns a pointer to a zero-terminated
+** UTF-16 string.  ^The first parameter is the [prepared statement]
+** that implements the [SELECT] statement. ^The second parameter is the
+** column number.  ^The leftmost column is number 0.
+**
+** ^The returned string pointer is valid until either the [prepared statement]
+** is destroyed by [sqlite3_finalize()] or until the statement is automatically
+** reprepared by the first call to [sqlite3_step()] for a particular run
+** or until the next call to
+** sqlite3_column_name() or sqlite3_column_name16() on the same column.
+**
+** ^If sqlite3_malloc() fails during the processing of either routine
+** (for example during a conversion from UTF-8 to UTF-16) then a
+** NULL pointer is returned.
+**
+** ^The name of a result column is the value of the "AS" clause for
+** that column, if there is an AS clause.  If there is no AS clause
+** then the name of the column is unspecified and may change from
+** one release of SQLite to the next.
+*/
+SQLITE_API const char *sqlite3_column_name(sqlite3_stmt*, int N);
+SQLITE_API const void *sqlite3_column_name16(sqlite3_stmt*, int N);
+
+/*
+** CAPI3REF: Source Of Data In A Query Result
+**
+** ^These routines provide a means to determine the database, table, and
+** table column that is the origin of a particular result column in
+** [SELECT] statement.
+** ^The name of the database or table or column can be returned as
+** either a UTF-8 or UTF-16 string.  ^The _database_ routines return
+** the database name, the _table_ routines return the table name, and
+** the origin_ routines return the column name.
+** ^The returned string is valid until the [prepared statement] is destroyed
+** using [sqlite3_finalize()] or until the statement is automatically
+** reprepared by the first call to [sqlite3_step()] for a particular run
+** or until the same information is requested
+** again in a different encoding.
+**
+** ^The names returned are the original un-aliased names of the
+** database, table, and column.
+**
+** ^The first argument to these interfaces is a [prepared statement].
+** ^These functions return information about the Nth result column returned by
+** the statement, where N is the second function argument.
+** ^The left-most column is column 0 for these routines.
+**
+** ^If the Nth column returned by the statement is an expression or
+** subquery and is not a column value, then all of these functions return
+** NULL.  ^These routine might also return NULL if a memory allocation error
+** occurs.  ^Otherwise, they return the name of the attached database, table,
+** or column that query result column was extracted from.
+**
+** ^As with all other SQLite APIs, those whose names end with "16" return
+** UTF-16 encoded strings and the other functions return UTF-8.
+**
+** ^These APIs are only available if the library was compiled with the
+** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol.
+**
+** If two or more threads call one or more of these routines against the same
+** prepared statement and column at the same time then the results are
+** undefined.
+**
+** If two or more threads call one or more
+** [sqlite3_column_database_name | column metadata interfaces]
+** for the same [prepared statement] and result column
+** at the same time then the results are undefined.
+*/
+SQLITE_API const char *sqlite3_column_database_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_database_name16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_table_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_table_name16(sqlite3_stmt*,int);
+SQLITE_API const char *sqlite3_column_origin_name(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_origin_name16(sqlite3_stmt*,int);
+
+/*
+** CAPI3REF: Declared Datatype Of A Query Result
+**
+** ^(The first parameter is a [prepared statement].
+** If this statement is a [SELECT] statement and the Nth column of the
+** returned result set of that [SELECT] is a table column (not an
+** expression or subquery) then the declared type of the table
+** column is returned.)^  ^If the Nth column of the result set is an
+** expression or subquery, then a NULL pointer is returned.
+** ^The returned string is always UTF-8 encoded.
+**
+** ^(For example, given the database schema:
+**
+** CREATE TABLE t1(c1 VARIANT);
+**
+** and the following statement to be compiled:
+**
+** SELECT c1 + 1, c1 FROM t1;
+**
+** this routine would return the string "VARIANT" for the second result
+** column (i==1), and a NULL pointer for the first result column (i==0).)^
+**
+** ^SQLite uses dynamic run-time typing.  ^So just because a column
+** is declared to contain a particular type does not mean that the
+** data stored in that column is of the declared type.  SQLite is
+** strongly typed, but the typing is dynamic not static.  ^Type
+** is associated with individual values, not with the containers
+** used to hold those values.
+*/
+SQLITE_API const char *sqlite3_column_decltype(sqlite3_stmt*,int);
+SQLITE_API const void *sqlite3_column_decltype16(sqlite3_stmt*,int);
+
+/*
+** CAPI3REF: Evaluate An SQL Statement
+**
+** After a [prepared statement] has been prepared using either
+** [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] or one of the legacy
+** interfaces [sqlite3_prepare()] or [sqlite3_prepare16()], this function
+** must be called one or more times to evaluate the statement.
+**
+** The details of the behavior of the sqlite3_step() interface depend
+** on whether the statement was prepared using the newer "v2" interface
+** [sqlite3_prepare_v2()] and [sqlite3_prepare16_v2()] or the older legacy
+** interface [sqlite3_prepare()] and [sqlite3_prepare16()].  The use of the
+** new "v2" interface is recommended for new applications but the legacy
+** interface will continue to be supported.
+**
+** ^In the legacy interface, the return value will be either [SQLITE_BUSY],
+** [SQLITE_DONE], [SQLITE_ROW], [SQLITE_ERROR], or [SQLITE_MISUSE].
+** ^With the "v2" interface, any of the other [result codes] or
+** [extended result codes] might be returned as well.
+**
+** ^[SQLITE_BUSY] means that the database engine was unable to acquire the
+** database locks it needs to do its job.  ^If the statement is a [COMMIT]
+** or occurs outside of an explicit transaction, then you can retry the
+** statement.  If the statement is not a [COMMIT] and occurs within a
+** explicit transaction then you should rollback the transaction before
+** continuing.
+**
+** ^[SQLITE_DONE] means that the statement has finished executing
+** successfully.  sqlite3_step() should not be called again on this virtual
+** machine without first calling [sqlite3_reset()] to reset the virtual
+** machine back to its initial state.
+**
+** ^If the SQL statement being executed returns any data, then [SQLITE_ROW]
+** is returned each time a new row of data is ready for processing by the
+** caller. The values may be accessed using the [column access functions].
+** sqlite3_step() is called again to retrieve the next row of data.
+**
+** ^[SQLITE_ERROR] means that a run-time error (such as a constraint
+** violation) has occurred.  sqlite3_step() should not be called again on
+** the VM. More information may be found by calling [sqlite3_errmsg()].
+** ^With the legacy interface, a more specific error code (for example,
+** [SQLITE_INTERRUPT], [SQLITE_SCHEMA], [SQLITE_CORRUPT], and so forth)
+** can be obtained by calling [sqlite3_reset()] on the
+** [prepared statement].  ^In the "v2" interface,
+** the more specific error code is returned directly by sqlite3_step().
+**
+** [SQLITE_MISUSE] means that the this routine was called inappropriately.
+** Perhaps it was called on a [prepared statement] that has
+** already been [sqlite3_finalize | finalized] or on one that had
+** previously returned [SQLITE_ERROR] or [SQLITE_DONE].  Or it could
+** be the case that the same database connection is being used by two or
+** more threads at the same moment in time.
+**
+** For all versions of SQLite up to and including 3.6.23.1, a call to
+** [sqlite3_reset()] was required after sqlite3_step() returned anything
+** other than [SQLITE_ROW] before any subsequent invocation of
+** sqlite3_step().  Failure to reset the prepared statement using
+** [sqlite3_reset()] would result in an [SQLITE_MISUSE] return from
+** sqlite3_step().  But after version 3.6.23.1, sqlite3_step() began
+** calling [sqlite3_reset()] automatically in this circumstance rather
+** than returning [SQLITE_MISUSE].  This is not considered a compatibility
+** break because any application that ever receives an SQLITE_MISUSE error
+** is broken by definition.  The [SQLITE_OMIT_AUTORESET] compile-time option
+** can be used to restore the legacy behavior.
+**
+** <b>Goofy Interface Alert:</b> In the legacy interface, the sqlite3_step()
+** API always returns a generic error code, [SQLITE_ERROR], following any
+** error other than [SQLITE_BUSY] and [SQLITE_MISUSE].  You must call
+** [sqlite3_reset()] or [sqlite3_finalize()] in order to find one of the
+** specific [error codes] that better describes the error.
+** We admit that this is a goofy design.  The problem has been fixed
+** with the "v2" interface.  If you prepare all of your SQL statements
+** using either [sqlite3_prepare_v2()] or [sqlite3_prepare16_v2()] instead
+** of the legacy [sqlite3_prepare()] and [sqlite3_prepare16()] interfaces,
+** then the more specific [error codes] are returned directly
+** by sqlite3_step().  The use of the "v2" interface is recommended.
+*/
+SQLITE_API int sqlite3_step(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Number of columns in a result set
+**
+** ^The sqlite3_data_count(P) interface returns the number of columns in the
+** current row of the result set of [prepared statement] P.
+** ^If prepared statement P does not have results ready to return
+** (via calls to the [sqlite3_column_int | sqlite3_column_*()] of
+** interfaces) then sqlite3_data_count(P) returns 0.
+** ^The sqlite3_data_count(P) routine also returns 0 if P is a NULL pointer.
+**
+** See also: [sqlite3_column_count()]
+*/
+SQLITE_API int sqlite3_data_count(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Fundamental Datatypes
+** KEYWORDS: SQLITE_TEXT
+**
+** ^(Every value in SQLite has one of five fundamental datatypes:
+**
+** <ul>
+** <li> 64-bit signed integer
+** <li> 64-bit IEEE floating point number
+** <li> string
+** <li> BLOB
+** <li> NULL
+** </ul>)^
+**
+** These constants are codes for each of those types.
+**
+** Note that the SQLITE_TEXT constant was also used in SQLite version 2
+** for a completely different meaning.  Software that links against both
+** SQLite version 2 and SQLite version 3 should use SQLITE3_TEXT, not
+** SQLITE_TEXT.
+*/
+#define SQLITE_INTEGER  1
+#define SQLITE_FLOAT    2
+#define SQLITE_BLOB     4
+#define SQLITE_NULL     5
+#ifdef SQLITE_TEXT
+# undef SQLITE_TEXT
+#else
+# define SQLITE_TEXT     3
+#endif
+#define SQLITE3_TEXT     3
+
+/*
+** CAPI3REF: Result Values From A Query
+** KEYWORDS: {column access functions}
+**
+** These routines form the "result set" interface.
+**
+** ^These routines return information about a single column of the current
+** result row of a query.  ^In every case the first argument is a pointer
+** to the [prepared statement] that is being evaluated (the [sqlite3_stmt*]
+** that was returned from [sqlite3_prepare_v2()] or one of its variants)
+** and the second argument is the index of the column for which information
+** should be returned. ^The leftmost column of the result set has the index 0.
+** ^The number of columns in the result can be determined using
+** [sqlite3_column_count()].
+**
+** If the SQL statement does not currently point to a valid row, or if the
+** column index is out of range, the result is undefined.
+** These routines may only be called when the most recent call to
+** [sqlite3_step()] has returned [SQLITE_ROW] and neither
+** [sqlite3_reset()] nor [sqlite3_finalize()] have been called subsequently.
+** If any of these routines are called after [sqlite3_reset()] or
+** [sqlite3_finalize()] or after [sqlite3_step()] has returned
+** something other than [SQLITE_ROW], the results are undefined.
+** If [sqlite3_step()] or [sqlite3_reset()] or [sqlite3_finalize()]
+** are called from a different thread while any of these routines
+** are pending, then the results are undefined.
+**
+** ^The sqlite3_column_type() routine returns the
+** [SQLITE_INTEGER | datatype code] for the initial data type
+** of the result column.  ^The returned value is one of [SQLITE_INTEGER],
+** [SQLITE_FLOAT], [SQLITE_TEXT], [SQLITE_BLOB], or [SQLITE_NULL].  The value
+** returned by sqlite3_column_type() is only meaningful if no type
+** conversions have occurred as described below.  After a type conversion,
+** the value returned by sqlite3_column_type() is undefined.  Future
+** versions of SQLite may change the behavior of sqlite3_column_type()
+** following a type conversion.
+**
+** ^If the result is a BLOB or UTF-8 string then the sqlite3_column_bytes()
+** routine returns the number of bytes in that BLOB or string.
+** ^If the result is a UTF-16 string, then sqlite3_column_bytes() converts
+** the string to UTF-8 and then returns the number of bytes.
+** ^If the result is a numeric value then sqlite3_column_bytes() uses
+** [sqlite3_snprintf()] to convert that value to a UTF-8 string and returns
+** the number of bytes in that string.
+** ^If the result is NULL, then sqlite3_column_bytes() returns zero.
+**
+** ^If the result is a BLOB or UTF-16 string then the sqlite3_column_bytes16()
+** routine returns the number of bytes in that BLOB or string.
+** ^If the result is a UTF-8 string, then sqlite3_column_bytes16() converts
+** the string to UTF-16 and then returns the number of bytes.
+** ^If the result is a numeric value then sqlite3_column_bytes16() uses
+** [sqlite3_snprintf()] to convert that value to a UTF-16 string and returns
+** the number of bytes in that string.
+** ^If the result is NULL, then sqlite3_column_bytes16() returns zero.
+**
+** ^The values returned by [sqlite3_column_bytes()] and
+** [sqlite3_column_bytes16()] do not include the zero terminators at the end
+** of the string.  ^For clarity: the values returned by
+** [sqlite3_column_bytes()] and [sqlite3_column_bytes16()] are the number of
+** bytes in the string, not the number of characters.
+**
+** ^Strings returned by sqlite3_column_text() and sqlite3_column_text16(),
+** even empty strings, are always zero terminated.  ^The return
+** value from sqlite3_column_blob() for a zero-length BLOB is a NULL pointer.
+**
+** ^The object returned by [sqlite3_column_value()] is an
+** [unprotected sqlite3_value] object.  An unprotected sqlite3_value object
+** may only be used with [sqlite3_bind_value()] and [sqlite3_result_value()].
+** If the [unprotected sqlite3_value] object returned by
+** [sqlite3_column_value()] is used in any other way, including calls
+** to routines like [sqlite3_value_int()], [sqlite3_value_text()],
+** or [sqlite3_value_bytes()], then the behavior is undefined.
+**
+** These routines attempt to convert the value where appropriate.  ^For
+** example, if the internal representation is FLOAT and a text result
+** is requested, [sqlite3_snprintf()] is used internally to perform the
+** conversion automatically.  ^(The following table details the conversions
+** that are applied:
+**
+** <blockquote>
+** <table border="1">
+** <tr><th> Internal<br>Type <th> Requested<br>Type <th>  Conversion
+**
+** <tr><td>  NULL    <td> INTEGER   <td> Result is 0
+** <tr><td>  NULL    <td>  FLOAT    <td> Result is 0.0
+** <tr><td>  NULL    <td>   TEXT    <td> Result is NULL pointer
+** <tr><td>  NULL    <td>   BLOB    <td> Result is NULL pointer
+** <tr><td> INTEGER  <td>  FLOAT    <td> Convert from integer to float
+** <tr><td> INTEGER  <td>   TEXT    <td> ASCII rendering of the integer
+** <tr><td> INTEGER  <td>   BLOB    <td> Same as INTEGER->TEXT
+** <tr><td>  FLOAT   <td> INTEGER   <td> Convert from float to integer
+** <tr><td>  FLOAT   <td>   TEXT    <td> ASCII rendering of the float
+** <tr><td>  FLOAT   <td>   BLOB    <td> Same as FLOAT->TEXT
+** <tr><td>  TEXT    <td> INTEGER   <td> Use atoi()
+** <tr><td>  TEXT    <td>  FLOAT    <td> Use atof()
+** <tr><td>  TEXT    <td>   BLOB    <td> No change
+** <tr><td>  BLOB    <td> INTEGER   <td> Convert to TEXT then use atoi()
+** <tr><td>  BLOB    <td>  FLOAT    <td> Convert to TEXT then use atof()
+** <tr><td>  BLOB    <td>   TEXT    <td> Add a zero terminator if needed
+** </table>
+** </blockquote>)^
+**
+** The table above makes reference to standard C library functions atoi()
+** and atof().  SQLite does not really use these functions.  It has its
+** own equivalent internal routines.  The atoi() and atof() names are
+** used in the table for brevity and because they are familiar to most
+** C programmers.
+**
+** Note that when type conversions occur, pointers returned by prior
+** calls to sqlite3_column_blob(), sqlite3_column_text(), and/or
+** sqlite3_column_text16() may be invalidated.
+** Type conversions and pointer invalidations might occur
+** in the following cases:
+**
+** <ul>
+** <li> The initial content is a BLOB and sqlite3_column_text() or
+**      sqlite3_column_text16() is called.  A zero-terminator might
+**      need to be added to the string.</li>
+** <li> The initial content is UTF-8 text and sqlite3_column_bytes16() or
+**      sqlite3_column_text16() is called.  The content must be converted
+**      to UTF-16.</li>
+** <li> The initial content is UTF-16 text and sqlite3_column_bytes() or
+**      sqlite3_column_text() is called.  The content must be converted
+**      to UTF-8.</li>
+** </ul>
+**
+** ^Conversions between UTF-16be and UTF-16le are always done in place and do
+** not invalidate a prior pointer, though of course the content of the buffer
+** that the prior pointer references will have been modified.  Other kinds
+** of conversion are done in place when it is possible, but sometimes they
+** are not possible and in those cases prior pointers are invalidated.
+**
+** The safest and easiest to remember policy is to invoke these routines
+** in one of the following ways:
+**
+** <ul>
+**  <li>sqlite3_column_text() followed by sqlite3_column_bytes()</li>
+**  <li>sqlite3_column_blob() followed by sqlite3_column_bytes()</li>
+**  <li>sqlite3_column_text16() followed by sqlite3_column_bytes16()</li>
+** </ul>
+**
+** In other words, you should call sqlite3_column_text(),
+** sqlite3_column_blob(), or sqlite3_column_text16() first to force the result
+** into the desired format, then invoke sqlite3_column_bytes() or
+** sqlite3_column_bytes16() to find the size of the result.  Do not mix calls
+** to sqlite3_column_text() or sqlite3_column_blob() with calls to
+** sqlite3_column_bytes16(), and do not mix calls to sqlite3_column_text16()
+** with calls to sqlite3_column_bytes().
+**
+** ^The pointers returned are valid until a type conversion occurs as
+** described above, or until [sqlite3_step()] or [sqlite3_reset()] or
+** [sqlite3_finalize()] is called.  ^The memory space used to hold strings
+** and BLOBs is freed automatically.  Do <b>not</b> pass the pointers returned
+** [sqlite3_column_blob()], [sqlite3_column_text()], etc. into
+** [sqlite3_free()].
+**
+** ^(If a memory allocation error occurs during the evaluation of any
+** of these routines, a default value is returned.  The default value
+** is either the integer 0, the floating point number 0.0, or a NULL
+** pointer.  Subsequent calls to [sqlite3_errcode()] will return
+** [SQLITE_NOMEM].)^
+*/
+SQLITE_API const void *sqlite3_column_blob(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_bytes(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_bytes16(sqlite3_stmt*, int iCol);
+SQLITE_API double sqlite3_column_double(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_int(sqlite3_stmt*, int iCol);
+SQLITE_API sqlite3_int64 sqlite3_column_int64(sqlite3_stmt*, int iCol);
+SQLITE_API const unsigned char *sqlite3_column_text(sqlite3_stmt*, int iCol);
+SQLITE_API const void *sqlite3_column_text16(sqlite3_stmt*, int iCol);
+SQLITE_API int sqlite3_column_type(sqlite3_stmt*, int iCol);
+SQLITE_API sqlite3_value *sqlite3_column_value(sqlite3_stmt*, int iCol);
+
+/*
+** CAPI3REF: Destroy A Prepared Statement Object
+**
+** ^The sqlite3_finalize() function is called to delete a [prepared statement].
+** ^If the most recent evaluation of the statement encountered no errors or
+** or if the statement is never been evaluated, then sqlite3_finalize() returns
+** SQLITE_OK.  ^If the most recent evaluation of statement S failed, then
+** sqlite3_finalize(S) returns the appropriate [error code] or
+** [extended error code].
+**
+** ^The sqlite3_finalize(S) routine can be called at any point during
+** the life cycle of [prepared statement] S:
+** before statement S is ever evaluated, after
+** one or more calls to [sqlite3_reset()], or after any call
+** to [sqlite3_step()] regardless of whether or not the statement has
+** completed execution.
+**
+** ^Invoking sqlite3_finalize() on a NULL pointer is a harmless no-op.
+**
+** The application must finalize every [prepared statement] in order to avoid
+** resource leaks.  It is a grievous error for the application to try to use
+** a prepared statement after it has been finalized.  Any use of a prepared
+** statement after it has been finalized can result in undefined and
+** undesirable behavior such as segfaults and heap corruption.
+*/
+SQLITE_API int sqlite3_finalize(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Reset A Prepared Statement Object
+**
+** The sqlite3_reset() function is called to reset a [prepared statement]
+** object back to its initial state, ready to be re-executed.
+** ^Any SQL statement variables that had values bound to them using
+** the [sqlite3_bind_blob | sqlite3_bind_*() API] retain their values.
+** Use [sqlite3_clear_bindings()] to reset the bindings.
+**
+** ^The [sqlite3_reset(S)] interface resets the [prepared statement] S
+** back to the beginning of its program.
+**
+** ^If the most recent call to [sqlite3_step(S)] for the
+** [prepared statement] S returned [SQLITE_ROW] or [SQLITE_DONE],
+** or if [sqlite3_step(S)] has never before been called on S,
+** then [sqlite3_reset(S)] returns [SQLITE_OK].
+**
+** ^If the most recent call to [sqlite3_step(S)] for the
+** [prepared statement] S indicated an error, then
+** [sqlite3_reset(S)] returns an appropriate [error code].
+**
+** ^The [sqlite3_reset(S)] interface does not change the values
+** of any [sqlite3_bind_blob|bindings] on the [prepared statement] S.
+*/
+SQLITE_API int sqlite3_reset(sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Create Or Redefine SQL Functions
+** KEYWORDS: {function creation routines}
+** KEYWORDS: {application-defined SQL function}
+** KEYWORDS: {application-defined SQL functions}
+**
+** ^These functions (collectively known as "function creation routines")
+** are used to add SQL functions or aggregates or to redefine the behavior
+** of existing SQL functions or aggregates.  The only differences between
+** these routines are the text encoding expected for
+** the second parameter (the name of the function being created)
+** and the presence or absence of a destructor callback for
+** the application data pointer.
+**
+** ^The first parameter is the [database connection] to which the SQL
+** function is to be added.  ^If an application uses more than one database
+** connection then application-defined SQL functions must be added
+** to each database connection separately.
+**
+** ^The second parameter is the name of the SQL function to be created or
+** redefined.  ^The length of the name is limited to 255 bytes in a UTF-8
+** representation, exclusive of the zero-terminator.  ^Note that the name
+** length limit is in UTF-8 bytes, not characters nor UTF-16 bytes.
+** ^Any attempt to create a function with a longer name
+** will result in [SQLITE_MISUSE] being returned.
+**
+** ^The third parameter (nArg)
+** is the number of arguments that the SQL function or
+** aggregate takes. ^If this parameter is -1, then the SQL function or
+** aggregate may take any number of arguments between 0 and the limit
+** set by [sqlite3_limit]([SQLITE_LIMIT_FUNCTION_ARG]).  If the third
+** parameter is less than -1 or greater than 127 then the behavior is
+** undefined.
+**
+** ^The fourth parameter, eTextRep, specifies what
+** [SQLITE_UTF8 | text encoding] this SQL function prefers for
+** its parameters.  Every SQL function implementation must be able to work
+** with UTF-8, UTF-16le, or UTF-16be.  But some implementations may be
+** more efficient with one encoding than another.  ^An application may
+** invoke sqlite3_create_function() or sqlite3_create_function16() multiple
+** times with the same function but with different values of eTextRep.
+** ^When multiple implementations of the same function are available, SQLite
+** will pick the one that involves the least amount of data conversion.
+** If there is only a single implementation which does not care what text
+** encoding is used, then the fourth argument should be [SQLITE_ANY].
+**
+** ^(The fifth parameter is an arbitrary pointer.  The implementation of the
+** function can gain access to this pointer using [sqlite3_user_data()].)^
+**
+** ^The sixth, seventh and eighth parameters, xFunc, xStep and xFinal, are
+** pointers to C-language functions that implement the SQL function or
+** aggregate. ^A scalar SQL function requires an implementation of the xFunc
+** callback only; NULL pointers must be passed as the xStep and xFinal
+** parameters. ^An aggregate SQL function requires an implementation of xStep
+** and xFinal and NULL pointer must be passed for xFunc. ^To delete an existing
+** SQL function or aggregate, pass NULL pointers for all three function
+** callbacks.
+**
+** ^(If the ninth parameter to sqlite3_create_function_v2() is not NULL,
+** then it is destructor for the application data pointer.
+** The destructor is invoked when the function is deleted, either by being
+** overloaded or when the database connection closes.)^
+** ^The destructor is also invoked if the call to
+** sqlite3_create_function_v2() fails.
+** ^When the destructor callback of the tenth parameter is invoked, it
+** is passed a single argument which is a copy of the application data
+** pointer which was the fifth parameter to sqlite3_create_function_v2().
+**
+** ^It is permitted to register multiple implementations of the same
+** functions with the same name but with either differing numbers of
+** arguments or differing preferred text encodings.  ^SQLite will use
+** the implementation that most closely matches the way in which the
+** SQL function is used.  ^A function implementation with a non-negative
+** nArg parameter is a better match than a function implementation with
+** a negative nArg.  ^A function where the preferred text encoding
+** matches the database encoding is a better
+** match than a function where the encoding is different.
+** ^A function where the encoding difference is between UTF16le and UTF16be
+** is a closer match than a function where the encoding difference is
+** between UTF8 and UTF16.
+**
+** ^Built-in functions may be overloaded by new application-defined functions.
+**
+** ^An application-defined function is permitted to call other
+** SQLite interfaces.  However, such calls must not
+** close the database connection nor finalize or reset the prepared
+** statement in which the function is running.
+*/
+SQLITE_API int sqlite3_create_function(
+        sqlite3 *db,
+        const char *zFunctionName,
+        int nArg,
+        int eTextRep,
+        void *pApp,
+        void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
+        void (*xStep)(sqlite3_context*,int,sqlite3_value**),
+        void (*xFinal)(sqlite3_context*)
+);
+SQLITE_API int sqlite3_create_function16(
+        sqlite3 *db,
+        const void *zFunctionName,
+        int nArg,
+        int eTextRep,
+        void *pApp,
+        void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
+        void (*xStep)(sqlite3_context*,int,sqlite3_value**),
+        void (*xFinal)(sqlite3_context*)
+);
+SQLITE_API int sqlite3_create_function_v2(
+        sqlite3 *db,
+        const char *zFunctionName,
+        int nArg,
+        int eTextRep,
+        void *pApp,
+        void (*xFunc)(sqlite3_context*,int,sqlite3_value**),
+        void (*xStep)(sqlite3_context*,int,sqlite3_value**),
+        void (*xFinal)(sqlite3_context*),
+        void(*xDestroy)(void*)
+);
+
+/*
+** CAPI3REF: Text Encodings
+**
+** These constant define integer codes that represent the various
+** text encodings supported by SQLite.
+*/
+#define SQLITE_UTF8           1
+#define SQLITE_UTF16LE        2
+#define SQLITE_UTF16BE        3
+#define SQLITE_UTF16          4    /* Use native byte order */
+#define SQLITE_ANY            5    /* sqlite3_create_function only */
+#define SQLITE_UTF16_ALIGNED  8    /* sqlite3_create_collation only */
+
+/*
+** CAPI3REF: Deprecated Functions
+** DEPRECATED
+**
+** These functions are [deprecated].  In order to maintain
+** backwards compatibility with older code, these functions continue
+** to be supported.  However, new applications should avoid
+** the use of these functions.  To help encourage people to avoid
+** using these functions, we are not going to tell you what they do.
+*/
+#ifndef SQLITE_OMIT_DEPRECATED
+SQLITE_API SQLITE_DEPRECATED int sqlite3_aggregate_count(sqlite3_context*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_expired(sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_transfer_bindings(sqlite3_stmt*, sqlite3_stmt*);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_global_recover(void);
+SQLITE_API SQLITE_DEPRECATED void sqlite3_thread_cleanup(void);
+SQLITE_API SQLITE_DEPRECATED int sqlite3_memory_alarm(void(*)(void*,sqlite3_int64,int),void*,sqlite3_int64);
+#endif
+
+/*
+** CAPI3REF: Obtaining SQL Function Parameter Values
+**
+** The C-language implementation of SQL functions and aggregates uses
+** this set of interface routines to access the parameter values on
+** the function or aggregate.
+**
+** The xFunc (for scalar functions) or xStep (for aggregates) parameters
+** to [sqlite3_create_function()] and [sqlite3_create_function16()]
+** define callbacks that implement the SQL functions and aggregates.
+** The 3rd parameter to these callbacks is an array of pointers to
+** [protected sqlite3_value] objects.  There is one [sqlite3_value] object for
+** each parameter to the SQL function.  These routines are used to
+** extract values from the [sqlite3_value] objects.
+**
+** These routines work only with [protected sqlite3_value] objects.
+** Any attempt to use these routines on an [unprotected sqlite3_value]
+** object results in undefined behavior.
+**
+** ^These routines work just like the corresponding [column access functions]
+** except that  these routines take a single [protected sqlite3_value] object
+** pointer instead of a [sqlite3_stmt*] pointer and an integer column number.
+**
+** ^The sqlite3_value_text16() interface extracts a UTF-16 string
+** in the native byte-order of the host machine.  ^The
+** sqlite3_value_text16be() and sqlite3_value_text16le() interfaces
+** extract UTF-16 strings as big-endian and little-endian respectively.
+**
+** ^(The sqlite3_value_numeric_type() interface attempts to apply
+** numeric affinity to the value.  This means that an attempt is
+** made to convert the value to an integer or floating point.  If
+** such a conversion is possible without loss of information (in other
+** words, if the value is a string that looks like a number)
+** then the conversion is performed.  Otherwise no conversion occurs.
+** The [SQLITE_INTEGER | datatype] after conversion is returned.)^
+**
+** Please pay particular attention to the fact that the pointer returned
+** from [sqlite3_value_blob()], [sqlite3_value_text()], or
+** [sqlite3_value_text16()] can be invalidated by a subsequent call to
+** [sqlite3_value_bytes()], [sqlite3_value_bytes16()], [sqlite3_value_text()],
+** or [sqlite3_value_text16()].
+**
+** These routines must be called from the same thread as
+** the SQL function that supplied the [sqlite3_value*] parameters.
+*/
+SQLITE_API const void *sqlite3_value_blob(sqlite3_value*);
+SQLITE_API int sqlite3_value_bytes(sqlite3_value*);
+SQLITE_API int sqlite3_value_bytes16(sqlite3_value*);
+SQLITE_API double sqlite3_value_double(sqlite3_value*);
+SQLITE_API int sqlite3_value_int(sqlite3_value*);
+SQLITE_API sqlite3_int64 sqlite3_value_int64(sqlite3_value*);
+SQLITE_API const unsigned char *sqlite3_value_text(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16le(sqlite3_value*);
+SQLITE_API const void *sqlite3_value_text16be(sqlite3_value*);
+SQLITE_API int sqlite3_value_type(sqlite3_value*);
+SQLITE_API int sqlite3_value_numeric_type(sqlite3_value*);
+
+/*
+** CAPI3REF: Obtain Aggregate Function Context
+**
+** Implementations of aggregate SQL functions use this
+** routine to allocate memory for storing their state.
+**
+** ^The first time the sqlite3_aggregate_context(C,N) routine is called
+** for a particular aggregate function, SQLite
+** allocates N of memory, zeroes out that memory, and returns a pointer
+** to the new memory. ^On second and subsequent calls to
+** sqlite3_aggregate_context() for the same aggregate function instance,
+** the same buffer is returned.  Sqlite3_aggregate_context() is normally
+** called once for each invocation of the xStep callback and then one
+** last time when the xFinal callback is invoked.  ^(When no rows match
+** an aggregate query, the xStep() callback of the aggregate function
+** implementation is never called and xFinal() is called exactly once.
+** In those cases, sqlite3_aggregate_context() might be called for the
+** first time from within xFinal().)^
+**
+** ^The sqlite3_aggregate_context(C,N) routine returns a NULL pointer if N is
+** less than or equal to zero or if a memory allocate error occurs.
+**
+** ^(The amount of space allocated by sqlite3_aggregate_context(C,N) is
+** determined by the N parameter on first successful call.  Changing the
+** value of N in subsequent call to sqlite3_aggregate_context() within
+** the same aggregate function instance will not resize the memory
+** allocation.)^
+**
+** ^SQLite automatically frees the memory allocated by
+** sqlite3_aggregate_context() when the aggregate query concludes.
+**
+** The first parameter must be a copy of the
+** [sqlite3_context | SQL function context] that is the first parameter
+** to the xStep or xFinal callback routine that implements the aggregate
+** function.
+**
+** This routine must be called from the same thread in which
+** the aggregate SQL function is running.
+*/
+SQLITE_API void *sqlite3_aggregate_context(sqlite3_context*, int nBytes);
+
+/*
+** CAPI3REF: User Data For Functions
+**
+** ^The sqlite3_user_data() interface returns a copy of
+** the pointer that was the pUserData parameter (the 5th parameter)
+** of the [sqlite3_create_function()]
+** and [sqlite3_create_function16()] routines that originally
+** registered the application defined function.
+**
+** This routine must be called from the same thread in which
+** the application-defined function is running.
+*/
+SQLITE_API void *sqlite3_user_data(sqlite3_context*);
+
+/*
+** CAPI3REF: Database Connection For Functions
+**
+** ^The sqlite3_context_db_handle() interface returns a copy of
+** the pointer to the [database connection] (the 1st parameter)
+** of the [sqlite3_create_function()]
+** and [sqlite3_create_function16()] routines that originally
+** registered the application defined function.
+*/
+SQLITE_API sqlite3 *sqlite3_context_db_handle(sqlite3_context*);
+
+/*
+** CAPI3REF: Function Auxiliary Data
+**
+** The following two functions may be used by scalar SQL functions to
+** associate metadata with argument values. If the same value is passed to
+** multiple invocations of the same SQL function during query execution, under
+** some circumstances the associated metadata may be preserved. This may
+** be used, for example, to add a regular-expression matching scalar
+** function. The compiled version of the regular expression is stored as
+** metadata associated with the SQL value passed as the regular expression
+** pattern.  The compiled regular expression can be reused on multiple
+** invocations of the same function so that the original pattern string
+** does not need to be recompiled on each invocation.
+**
+** ^The sqlite3_get_auxdata() interface returns a pointer to the metadata
+** associated by the sqlite3_set_auxdata() function with the Nth argument
+** value to the application-defined function. ^If no metadata has been ever
+** been set for the Nth argument of the function, or if the corresponding
+** function parameter has changed since the meta-data was set,
+** then sqlite3_get_auxdata() returns a NULL pointer.
+**
+** ^The sqlite3_set_auxdata() interface saves the metadata
+** pointed to by its 3rd parameter as the metadata for the N-th
+** argument of the application-defined function.  Subsequent
+** calls to sqlite3_get_auxdata() might return this data, if it has
+** not been destroyed.
+** ^If it is not NULL, SQLite will invoke the destructor
+** function given by the 4th parameter to sqlite3_set_auxdata() on
+** the metadata when the corresponding function parameter changes
+** or when the SQL statement completes, whichever comes first.
+**
+** SQLite is free to call the destructor and drop metadata on any
+** parameter of any function at any time.  ^The only guarantee is that
+** the destructor will be called before the metadata is dropped.
+**
+** ^(In practice, metadata is preserved between function calls for
+** expressions that are constant at compile time. This includes literal
+** values and [parameters].)^
+**
+** These routines must be called from the same thread in which
+** the SQL function is running.
+*/
+SQLITE_API void *sqlite3_get_auxdata(sqlite3_context*, int N);
+SQLITE_API void sqlite3_set_auxdata(sqlite3_context*, int N, void*, void (*)(void*));
+
+
+/*
+** CAPI3REF: Constants Defining Special Destructor Behavior
+**
+** These are special values for the destructor that is passed in as the
+** final argument to routines like [sqlite3_result_blob()].  ^If the destructor
+** argument is SQLITE_STATIC, it means that the content pointer is constant
+** and will never change.  It does not need to be destroyed.  ^The
+** SQLITE_TRANSIENT value means that the content will likely change in
+** the near future and that SQLite should make its own private copy of
+** the content before returning.
+**
+** The typedef is necessary to work around problems in certain
+** C++ compilers.  See ticket #2191.
+*/
+typedef void (*sqlite3_destructor_type)(void*);
+#define SQLITE_STATIC      ((sqlite3_destructor_type)0)
+#define SQLITE_TRANSIENT   ((sqlite3_destructor_type)-1)
+
+/*
+** CAPI3REF: Setting The Result Of An SQL Function
+**
+** These routines are used by the xFunc or xFinal callbacks that
+** implement SQL functions and aggregates.  See
+** [sqlite3_create_function()] and [sqlite3_create_function16()]
+** for additional information.
+**
+** These functions work very much like the [parameter binding] family of
+** functions used to bind values to host parameters in prepared statements.
+** Refer to the [SQL parameter] documentation for additional information.
+**
+** ^The sqlite3_result_blob() interface sets the result from
+** an application-defined function to be the BLOB whose content is pointed
+** to by the second parameter and which is N bytes long where N is the
+** third parameter.
+**
+** ^The sqlite3_result_zeroblob() interfaces set the result of
+** the application-defined function to be a BLOB containing all zero
+** bytes and N bytes in size, where N is the value of the 2nd parameter.
+**
+** ^The sqlite3_result_double() interface sets the result from
+** an application-defined function to be a floating point value specified
+** by its 2nd argument.
+**
+** ^The sqlite3_result_error() and sqlite3_result_error16() functions
+** cause the implemented SQL function to throw an exception.
+** ^SQLite uses the string pointed to by the
+** 2nd parameter of sqlite3_result_error() or sqlite3_result_error16()
+** as the text of an error message.  ^SQLite interprets the error
+** message string from sqlite3_result_error() as UTF-8. ^SQLite
+** interprets the string from sqlite3_result_error16() as UTF-16 in native
+** byte order.  ^If the third parameter to sqlite3_result_error()
+** or sqlite3_result_error16() is negative then SQLite takes as the error
+** message all text up through the first zero character.
+** ^If the third parameter to sqlite3_result_error() or
+** sqlite3_result_error16() is non-negative then SQLite takes that many
+** bytes (not characters) from the 2nd parameter as the error message.
+** ^The sqlite3_result_error() and sqlite3_result_error16()
+** routines make a private copy of the error message text before
+** they return.  Hence, the calling function can deallocate or
+** modify the text after they return without harm.
+** ^The sqlite3_result_error_code() function changes the error code
+** returned by SQLite as a result of an error in a function.  ^By default,
+** the error code is SQLITE_ERROR.  ^A subsequent call to sqlite3_result_error()
+** or sqlite3_result_error16() resets the error code to SQLITE_ERROR.
+**
+** ^The sqlite3_result_toobig() interface causes SQLite to throw an error
+** indicating that a string or BLOB is too long to represent.
+**
+** ^The sqlite3_result_nomem() interface causes SQLite to throw an error
+** indicating that a memory allocation failed.
+**
+** ^The sqlite3_result_int() interface sets the return value
+** of the application-defined function to be the 32-bit signed integer
+** value given in the 2nd argument.
+** ^The sqlite3_result_int64() interface sets the return value
+** of the application-defined function to be the 64-bit signed integer
+** value given in the 2nd argument.
+**
+** ^The sqlite3_result_null() interface sets the return value
+** of the application-defined function to be NULL.
+**
+** ^The sqlite3_result_text(), sqlite3_result_text16(),
+** sqlite3_result_text16le(), and sqlite3_result_text16be() interfaces
+** set the return value of the application-defined function to be
+** a text string which is represented as UTF-8, UTF-16 native byte order,
+** UTF-16 little endian, or UTF-16 big endian, respectively.
+** ^SQLite takes the text result from the application from
+** the 2nd parameter of the sqlite3_result_text* interfaces.
+** ^If the 3rd parameter to the sqlite3_result_text* interfaces
+** is negative, then SQLite takes result text from the 2nd parameter
+** through the first zero character.
+** ^If the 3rd parameter to the sqlite3_result_text* interfaces
+** is non-negative, then as many bytes (not characters) of the text
+** pointed to by the 2nd parameter are taken as the application-defined
+** function result.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces
+** or sqlite3_result_blob is a non-NULL pointer, then SQLite calls that
+** function as the destructor on the text or BLOB result when it has
+** finished using that result.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces or to
+** sqlite3_result_blob is the special constant SQLITE_STATIC, then SQLite
+** assumes that the text or BLOB result is in constant space and does not
+** copy the content of the parameter nor call a destructor on the content
+** when it has finished using that result.
+** ^If the 4th parameter to the sqlite3_result_text* interfaces
+** or sqlite3_result_blob is the special constant SQLITE_TRANSIENT
+** then SQLite makes a copy of the result into space obtained from
+** from [sqlite3_malloc()] before it returns.
+**
+** ^The sqlite3_result_value() interface sets the result of
+** the application-defined function to be a copy the
+** [unprotected sqlite3_value] object specified by the 2nd parameter.  ^The
+** sqlite3_result_value() interface makes a copy of the [sqlite3_value]
+** so that the [sqlite3_value] specified in the parameter may change or
+** be deallocated after sqlite3_result_value() returns without harm.
+** ^A [protected sqlite3_value] object may always be used where an
+** [unprotected sqlite3_value] object is required, so either
+** kind of [sqlite3_value] object can be used with this interface.
+**
+** If these routines are called from within the different thread
+** than the one containing the application-defined function that received
+** the [sqlite3_context] pointer, the results are undefined.
+*/
+SQLITE_API void sqlite3_result_blob(sqlite3_context*, const void*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_double(sqlite3_context*, double);
+SQLITE_API void sqlite3_result_error(sqlite3_context*, const char*, int);
+SQLITE_API void sqlite3_result_error16(sqlite3_context*, const void*, int);
+SQLITE_API void sqlite3_result_error_toobig(sqlite3_context*);
+SQLITE_API void sqlite3_result_error_nomem(sqlite3_context*);
+SQLITE_API void sqlite3_result_error_code(sqlite3_context*, int);
+SQLITE_API void sqlite3_result_int(sqlite3_context*, int);
+SQLITE_API void sqlite3_result_int64(sqlite3_context*, sqlite3_int64);
+SQLITE_API void sqlite3_result_null(sqlite3_context*);
+SQLITE_API void sqlite3_result_text(sqlite3_context*, const char*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_text16(sqlite3_context*, const void*, int, void(*)(void*));
+SQLITE_API void sqlite3_result_text16le(sqlite3_context*, const void*, int,void(*)(void*));
+SQLITE_API void sqlite3_result_text16be(sqlite3_context*, const void*, int,void(*)(void*));
+SQLITE_API void sqlite3_result_value(sqlite3_context*, sqlite3_value*);
+SQLITE_API void sqlite3_result_zeroblob(sqlite3_context*, int n);
+
+/*
+** CAPI3REF: Define New Collating Sequences
+**
+** ^These functions add, remove, or modify a [collation] associated
+** with the [database connection] specified as the first argument.
+**
+** ^The name of the collation is a UTF-8 string
+** for sqlite3_create_collation() and sqlite3_create_collation_v2()
+** and a UTF-16 string in native byte order for sqlite3_create_collation16().
+** ^Collation names that compare equal according to [sqlite3_strnicmp()] are
+** considered to be the same name.
+**
+** ^(The third argument (eTextRep) must be one of the constants:
+** <ul>
+** <li> [SQLITE_UTF8],
+** <li> [SQLITE_UTF16LE],
+** <li> [SQLITE_UTF16BE],
+** <li> [SQLITE_UTF16], or
+** <li> [SQLITE_UTF16_ALIGNED].
+** </ul>)^
+** ^The eTextRep argument determines the encoding of strings passed
+** to the collating function callback, xCallback.
+** ^The [SQLITE_UTF16] and [SQLITE_UTF16_ALIGNED] values for eTextRep
+** force strings to be UTF16 with native byte order.
+** ^The [SQLITE_UTF16_ALIGNED] value for eTextRep forces strings to begin
+** on an even byte address.
+**
+** ^The fourth argument, pArg, is an application data pointer that is passed
+** through as the first argument to the collating function callback.
+**
+** ^The fifth argument, xCallback, is a pointer to the collating function.
+** ^Multiple collating functions can be registered using the same name but
+** with different eTextRep parameters and SQLite will use whichever
+** function requires the least amount of data transformation.
+** ^If the xCallback argument is NULL then the collating function is
+** deleted.  ^When all collating functions having the same name are deleted,
+** that collation is no longer usable.
+**
+** ^The collating function callback is invoked with a copy of the pArg
+** application data pointer and with two strings in the encoding specified
+** by the eTextRep argument.  The collating function must return an
+** integer that is negative, zero, or positive
+** if the first string is less than, equal to, or greater than the second,
+** respectively.  A collating function must always return the same answer
+** given the same inputs.  If two or more collating functions are registered
+** to the same collation name (using different eTextRep values) then all
+** must give an equivalent answer when invoked with equivalent strings.
+** The collating function must obey the following properties for all
+** strings A, B, and C:
+**
+** <ol>
+** <li> If A==B then B==A.
+** <li> If A==B and B==C then A==C.
+** <li> If A<B THEN B>A.
+** <li> If A<B and B<C then A<C.
+** </ol>
+**
+** If a collating function fails any of the above constraints and that
+** collating function is  registered and used, then the behavior of SQLite
+** is undefined.
+**
+** ^The sqlite3_create_collation_v2() works like sqlite3_create_collation()
+** with the addition that the xDestroy callback is invoked on pArg when
+** the collating function is deleted.
+** ^Collating functions are deleted when they are overridden by later
+** calls to the collation creation functions or when the
+** [database connection] is closed using [sqlite3_close()].
+**
+** ^The xDestroy callback is <u>not</u> called if the
+** sqlite3_create_collation_v2() function fails.  Applications that invoke
+** sqlite3_create_collation_v2() with a non-NULL xDestroy argument should
+** check the return code and dispose of the application data pointer
+** themselves rather than expecting SQLite to deal with it for them.
+** This is different from every other SQLite interface.  The inconsistency
+** is unfortunate but cannot be changed without breaking backwards
+** compatibility.
+**
+** See also:  [sqlite3_collation_needed()] and [sqlite3_collation_needed16()].
+*/
+SQLITE_API int sqlite3_create_collation(
+        sqlite3*,
+        const char *zName,
+        int eTextRep,
+        void *pArg,
+        int(*xCompare)(void*,int,const void*,int,const void*)
+);
+SQLITE_API int sqlite3_create_collation_v2(
+        sqlite3*,
+        const char *zName,
+        int eTextRep,
+        void *pArg,
+        int(*xCompare)(void*,int,const void*,int,const void*),
+        void(*xDestroy)(void*)
+);
+SQLITE_API int sqlite3_create_collation16(
+        sqlite3*,
+        const void *zName,
+        int eTextRep,
+        void *pArg,
+        int(*xCompare)(void*,int,const void*,int,const void*)
+);
+
+/*
+** CAPI3REF: Collation Needed Callbacks
+**
+** ^To avoid having to register all collation sequences before a database
+** can be used, a single callback function may be registered with the
+** [database connection] to be invoked whenever an undefined collation
+** sequence is required.
+**
+** ^If the function is registered using the sqlite3_collation_needed() API,
+** then it is passed the names of undefined collation sequences as strings
+** encoded in UTF-8. ^If sqlite3_collation_needed16() is used,
+** the names are passed as UTF-16 in machine native byte order.
+** ^A call to either function replaces the existing collation-needed callback.
+**
+** ^(When the callback is invoked, the first argument passed is a copy
+** of the second argument to sqlite3_collation_needed() or
+** sqlite3_collation_needed16().  The second argument is the database
+** connection.  The third argument is one of [SQLITE_UTF8], [SQLITE_UTF16BE],
+** or [SQLITE_UTF16LE], indicating the most desirable form of the collation
+** sequence function required.  The fourth parameter is the name of the
+** required collation sequence.)^
+**
+** The callback function should register the desired collation using
+** [sqlite3_create_collation()], [sqlite3_create_collation16()], or
+** [sqlite3_create_collation_v2()].
+*/
+SQLITE_API int sqlite3_collation_needed(
+        sqlite3*,
+        void*,
+        void(*)(void*,sqlite3*,int eTextRep,const char*)
+);
+SQLITE_API int sqlite3_collation_needed16(
+        sqlite3*,
+        void*,
+        void(*)(void*,sqlite3*,int eTextRep,const void*)
+);
+
+#ifdef SQLITE_HAS_CODEC
+/*
+** Specify the key for an encrypted database.  This routine should be
+** called right after sqlite3_open().
+**
+** The code to implement this API is not available in the public release
+** of SQLite.
+*/
+SQLITE_API int sqlite3_key(
+        sqlite3 *db,                   /* Database to be rekeyed */
+        const void *pKey, int nKey     /* The key */
+);
+
+/*
+** Change the key on an open database.  If the current database is not
+** encrypted, this routine will encrypt it.  If pNew==0 or nNew==0, the
+** database is decrypted.
+**
+** The code to implement this API is not available in the public release
+** of SQLite.
+*/
+SQLITE_API int sqlite3_rekey(
+        sqlite3 *db,                   /* Database to be rekeyed */
+        const void *pKey, int nKey     /* The new key */
+);
+
+/*
+** Specify the activation key for a SEE database.  Unless
+** activated, none of the SEE routines will work.
+*/
+SQLITE_API void sqlite3_activate_see(
+        const char *zPassPhrase        /* Activation phrase */
+);
+#endif
+
+#ifdef SQLITE_ENABLE_CEROD
+/*
+** Specify the activation key for a CEROD database.  Unless
+** activated, none of the CEROD routines will work.
+*/
+SQLITE_API void sqlite3_activate_cerod(
+        const char *zPassPhrase        /* Activation phrase */
+);
+#endif
+
+/*
+** CAPI3REF: Suspend Execution For A Short Time
+**
+** The sqlite3_sleep() function causes the current thread to suspend execution
+** for at least a number of milliseconds specified in its parameter.
+**
+** If the operating system does not support sleep requests with
+** millisecond time resolution, then the time will be rounded up to
+** the nearest second. The number of milliseconds of sleep actually
+** requested from the operating system is returned.
+**
+** ^SQLite implements this interface by calling the xSleep()
+** method of the default [sqlite3_vfs] object.  If the xSleep() method
+** of the default VFS is not implemented correctly, or not implemented at
+** all, then the behavior of sqlite3_sleep() may deviate from the description
+** in the previous paragraphs.
+*/
+SQLITE_API int sqlite3_sleep(int);
+
+/*
+** CAPI3REF: Name Of The Folder Holding Temporary Files
+**
+** ^(If this global variable is made to point to a string which is
+** the name of a folder (a.k.a. directory), then all temporary files
+** created by SQLite when using a built-in [sqlite3_vfs | VFS]
+** will be placed in that directory.)^  ^If this variable
+** is a NULL pointer, then SQLite performs a search for an appropriate
+** temporary file directory.
+**
+** It is not safe to read or modify this variable in more than one
+** thread at a time.  It is not safe to read or modify this variable
+** if a [database connection] is being used at the same time in a separate
+** thread.
+** It is intended that this variable be set once
+** as part of process initialization and before any SQLite interface
+** routines have been called and that this variable remain unchanged
+** thereafter.
+**
+** ^The [temp_store_directory pragma] may modify this variable and cause
+** it to point to memory obtained from [sqlite3_malloc].  ^Furthermore,
+** the [temp_store_directory pragma] always assumes that any string
+** that this variable points to is held in memory obtained from
+** [sqlite3_malloc] and the pragma may attempt to free that memory
+** using [sqlite3_free].
+** Hence, if this variable is modified directly, either it should be
+** made NULL or made to point to memory obtained from [sqlite3_malloc]
+** or else the use of the [temp_store_directory pragma] should be avoided.
+*/
+SQLITE_API SQLITE_EXTERN char *sqlite3_temp_directory;
+
+/*
+** CAPI3REF: Test For Auto-Commit Mode
+** KEYWORDS: {autocommit mode}
+**
+** ^The sqlite3_get_autocommit() interface returns non-zero or
+** zero if the given database connection is or is not in autocommit mode,
+** respectively.  ^Autocommit mode is on by default.
+** ^Autocommit mode is disabled by a [BEGIN] statement.
+** ^Autocommit mode is re-enabled by a [COMMIT] or [ROLLBACK].
+**
+** If certain kinds of errors occur on a statement within a multi-statement
+** transaction (errors including [SQLITE_FULL], [SQLITE_IOERR],
+** [SQLITE_NOMEM], [SQLITE_BUSY], and [SQLITE_INTERRUPT]) then the
+** transaction might be rolled back automatically.  The only way to
+** find out whether SQLite automatically rolled back the transaction after
+** an error is to use this function.
+**
+** If another thread changes the autocommit status of the database
+** connection while this routine is running, then the return value
+** is undefined.
+*/
+SQLITE_API int sqlite3_get_autocommit(sqlite3*);
+
+/*
+** CAPI3REF: Find The Database Handle Of A Prepared Statement
+**
+** ^The sqlite3_db_handle interface returns the [database connection] handle
+** to which a [prepared statement] belongs.  ^The [database connection]
+** returned by sqlite3_db_handle is the same [database connection]
+** that was the first argument
+** to the [sqlite3_prepare_v2()] call (or its variants) that was used to
+** create the statement in the first place.
+*/
+SQLITE_API sqlite3 *sqlite3_db_handle(sqlite3_stmt*);
+
+/*
+** CAPI3REF: Find the next prepared statement
+**
+** ^This interface returns a pointer to the next [prepared statement] after
+** pStmt associated with the [database connection] pDb.  ^If pStmt is NULL
+** then this interface returns a pointer to the first prepared statement
+** associated with the database connection pDb.  ^If no prepared statement
+** satisfies the conditions of this routine, it returns NULL.
+**
+** The [database connection] pointer D in a call to
+** [sqlite3_next_stmt(D,S)] must refer to an open database
+** connection and in particular must not be a NULL pointer.
+*/
+SQLITE_API sqlite3_stmt *sqlite3_next_stmt(sqlite3 *pDb, sqlite3_stmt *pStmt);
+
+/*
+** CAPI3REF: Commit And Rollback Notification Callbacks
+**
+** ^The sqlite3_commit_hook() interface registers a callback
+** function to be invoked whenever a transaction is [COMMIT | committed].
+** ^Any callback set by a previous call to sqlite3_commit_hook()
+** for the same database connection is overridden.
+** ^The sqlite3_rollback_hook() interface registers a callback
+** function to be invoked whenever a transaction is [ROLLBACK | rolled back].
+** ^Any callback set by a previous call to sqlite3_rollback_hook()
+** for the same database connection is overridden.
+** ^The pArg argument is passed through to the callback.
+** ^If the callback on a commit hook function returns non-zero,
+** then the commit is converted into a rollback.
+**
+** ^The sqlite3_commit_hook(D,C,P) and sqlite3_rollback_hook(D,C,P) functions
+** return the P argument from the previous call of the same function
+** on the same [database connection] D, or NULL for
+** the first call for each function on D.
+**
+** The callback implementation must not do anything that will modify
+** the database connection that invoked the callback.  Any actions
+** to modify the database connection must be deferred until after the
+** completion of the [sqlite3_step()] call that triggered the commit
+** or rollback hook in the first place.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** ^Registering a NULL function disables the callback.
+**
+** ^When the commit hook callback routine returns zero, the [COMMIT]
+** operation is allowed to continue normally.  ^If the commit hook
+** returns non-zero, then the [COMMIT] is converted into a [ROLLBACK].
+** ^The rollback hook is invoked on a rollback that results from a commit
+** hook returning non-zero, just as it would be with any other rollback.
+**
+** ^For the purposes of this API, a transaction is said to have been
+** rolled back if an explicit "ROLLBACK" statement is executed, or
+** an error or constraint causes an implicit rollback to occur.
+** ^The rollback callback is not invoked if a transaction is
+** automatically rolled back because the database connection is closed.
+**
+** See also the [sqlite3_update_hook()] interface.
+*/
+SQLITE_API void *sqlite3_commit_hook(sqlite3*, int(*)(void*), void*);
+SQLITE_API void *sqlite3_rollback_hook(sqlite3*, void(*)(void *), void*);
+
+/*
+** CAPI3REF: Data Change Notification Callbacks
+**
+** ^The sqlite3_update_hook() interface registers a callback function
+** with the [database connection] identified by the first argument
+** to be invoked whenever a row is updated, inserted or deleted.
+** ^Any callback set by a previous call to this function
+** for the same database connection is overridden.
+**
+** ^The second argument is a pointer to the function to invoke when a
+** row is updated, inserted or deleted.
+** ^The first argument to the callback is a copy of the third argument
+** to sqlite3_update_hook().
+** ^The second callback argument is one of [SQLITE_INSERT], [SQLITE_DELETE],
+** or [SQLITE_UPDATE], depending on the operation that caused the callback
+** to be invoked.
+** ^The third and fourth arguments to the callback contain pointers to the
+** database and table name containing the affected row.
+** ^The final callback parameter is the [rowid] of the row.
+** ^In the case of an update, this is the [rowid] after the update takes place.
+**
+** ^(The update hook is not invoked when internal system tables are
+** modified (i.e. sqlite_master and sqlite_sequence).)^
+**
+** ^In the current implementation, the update hook
+** is not invoked when duplication rows are deleted because of an
+** [ON CONFLICT | ON CONFLICT REPLACE] clause.  ^Nor is the update hook
+** invoked when rows are deleted using the [truncate optimization].
+** The exceptions defined in this paragraph might change in a future
+** release of SQLite.
+**
+** The update hook implementation must not do anything that will modify
+** the database connection that invoked the update hook.  Any actions
+** to modify the database connection must be deferred until after the
+** completion of the [sqlite3_step()] call that triggered the update hook.
+** Note that [sqlite3_prepare_v2()] and [sqlite3_step()] both modify their
+** database connections for the meaning of "modify" in this paragraph.
+**
+** ^The sqlite3_update_hook(D,C,P) function
+** returns the P argument from the previous call
+** on the same [database connection] D, or NULL for
+** the first call on D.
+**
+** See also the [sqlite3_commit_hook()] and [sqlite3_rollback_hook()]
+** interfaces.
+*/
+SQLITE_API void *sqlite3_update_hook(
+        sqlite3*,
+        void(*)(void *,int ,char const *,char const *,sqlite3_int64),
+        void*
+);
+
+/*
+** CAPI3REF: Enable Or Disable Shared Pager Cache
+** KEYWORDS: {shared cache}
+**
+** ^(This routine enables or disables the sharing of the database cache
+** and schema data structures between [database connection | connections]
+** to the same database. Sharing is enabled if the argument is true
+** and disabled if the argument is false.)^
+**
+** ^Cache sharing is enabled and disabled for an entire process.
+** This is a change as of SQLite version 3.5.0. In prior versions of SQLite,
+** sharing was enabled or disabled for each thread separately.
+**
+** ^(The cache sharing mode set by this interface effects all subsequent
+** calls to [sqlite3_open()], [sqlite3_open_v2()], and [sqlite3_open16()].
+** Existing database connections continue use the sharing mode
+** that was in effect at the time they were opened.)^
+**
+** ^(This routine returns [SQLITE_OK] if shared cache was enabled or disabled
+** successfully.  An [error code] is returned otherwise.)^
+**
+** ^Shared cache is disabled by default. But this might change in
+** future releases of SQLite.  Applications that care about shared
+** cache setting should set it explicitly.
+**
+** See Also:  [SQLite Shared-Cache Mode]
+*/
+SQLITE_API int sqlite3_enable_shared_cache(int);
+
+/*
+** CAPI3REF: Attempt To Free Heap Memory
+**
+** ^The sqlite3_release_memory() interface attempts to free N bytes
+** of heap memory by deallocating non-essential memory allocations
+** held by the database library.   Memory used to cache database
+** pages to improve performance is an example of non-essential memory.
+** ^sqlite3_release_memory() returns the number of bytes actually freed,
+** which might be more or less than the amount requested.
+** ^The sqlite3_release_memory() routine is a no-op returning zero
+** if SQLite is not compiled with [SQLITE_ENABLE_MEMORY_MANAGEMENT].
+*/
+SQLITE_API int sqlite3_release_memory(int);
+
+/*
+** CAPI3REF: Impose A Limit On Heap Size
+**
+** ^The sqlite3_soft_heap_limit64() interface sets and/or queries the
+** soft limit on the amount of heap memory that may be allocated by SQLite.
+** ^SQLite strives to keep heap memory utilization below the soft heap
+** limit by reducing the number of pages held in the page cache
+** as heap memory usages approaches the limit.
+** ^The soft heap limit is "soft" because even though SQLite strives to stay
+** below the limit, it will exceed the limit rather than generate
+** an [SQLITE_NOMEM] error.  In other words, the soft heap limit
+** is advisory only.
+**
+** ^The return value from sqlite3_soft_heap_limit64() is the size of
+** the soft heap limit prior to the call.  ^If the argument N is negative
+** then no change is made to the soft heap limit.  Hence, the current
+** size of the soft heap limit can be determined by invoking
+** sqlite3_soft_heap_limit64() with a negative argument.
+**
+** ^If the argument N is zero then the soft heap limit is disabled.
+**
+** ^(The soft heap limit is not enforced in the current implementation
+** if one or more of following conditions are true:
+**
+** <ul>
+** <li> The soft heap limit is set to zero.
+** <li> Memory accounting is disabled using a combination of the
+**      [sqlite3_config]([SQLITE_CONFIG_MEMSTATUS],...) start-time option and
+**      the [SQLITE_DEFAULT_MEMSTATUS] compile-time option.
+** <li> An alternative page cache implementation is specified using
+**      [sqlite3_config]([SQLITE_CONFIG_PCACHE],...).
+** <li> The page cache allocates from its own memory pool supplied
+**      by [sqlite3_config]([SQLITE_CONFIG_PAGECACHE],...) rather than
+**      from the heap.
+** </ul>)^
+**
+** Beginning with SQLite version 3.7.3, the soft heap limit is enforced
+** regardless of whether or not the [SQLITE_ENABLE_MEMORY_MANAGEMENT]
+** compile-time option is invoked.  With [SQLITE_ENABLE_MEMORY_MANAGEMENT],
+** the soft heap limit is enforced on every memory allocation.  Without
+** [SQLITE_ENABLE_MEMORY_MANAGEMENT], the soft heap limit is only enforced
+** when memory is allocated by the page cache.  Testing suggests that because
+** the page cache is the predominate memory user in SQLite, most
+** applications will achieve adequate soft heap limit enforcement without
+** the use of [SQLITE_ENABLE_MEMORY_MANAGEMENT].
+**
+** The circumstances under which SQLite will enforce the soft heap limit may
+** changes in future releases of SQLite.
+*/
+SQLITE_API sqlite3_int64 sqlite3_soft_heap_limit64(sqlite3_int64 N);
+
+/*
+** CAPI3REF: Deprecated Soft Heap Limit Interface
+** DEPRECATED
+**
+** This is a deprecated version of the [sqlite3_soft_heap_limit64()]
+** interface.  This routine is provided for historical compatibility
+** only.  All new applications should use the
+** [sqlite3_soft_heap_limit64()] interface rather than this one.
+*/
+SQLITE_API SQLITE_DEPRECATED void sqlite3_soft_heap_limit(int N);
+
+
+/*
+** CAPI3REF: Extract Metadata About A Column Of A Table
+**
+** ^This routine returns metadata about a specific column of a specific
+** database table accessible using the [database connection] handle
+** passed as the first function argument.
+**
+** ^The column is identified by the second, third and fourth parameters to
+** this function. ^The second parameter is either the name of the database
+** (i.e. "main", "temp", or an attached database) containing the specified
+** table or NULL. ^If it is NULL, then all attached databases are searched
+** for the table using the same algorithm used by the database engine to
+** resolve unqualified table references.
+**
+** ^The third and fourth parameters to this function are the table and column
+** name of the desired column, respectively. Neither of these parameters
+** may be NULL.
+**
+** ^Metadata is returned by writing to the memory locations passed as the 5th
+** and subsequent parameters to this function. ^Any of these arguments may be
+** NULL, in which case the corresponding element of metadata is omitted.
+**
+** ^(<blockquote>
+** <table border="1">
+** <tr><th> Parameter <th> Output<br>Type <th>  Description
+**
+** <tr><td> 5th <td> const char* <td> Data type
+** <tr><td> 6th <td> const char* <td> Name of default collation sequence
+** <tr><td> 7th <td> int         <td> True if column has a NOT NULL constraint
+** <tr><td> 8th <td> int         <td> True if column is part of the PRIMARY KEY
+** <tr><td> 9th <td> int         <td> True if column is [AUTOINCREMENT]
+** </table>
+** </blockquote>)^
+**
+** ^The memory pointed to by the character pointers returned for the
+** declaration type and collation sequence is valid only until the next
+** call to any SQLite API function.
+**
+** ^If the specified table is actually a view, an [error code] is returned.
+**
+** ^If the specified column is "rowid", "oid" or "_rowid_" and an
+** [INTEGER PRIMARY KEY] column has been explicitly declared, then the output
+** parameters are set for the explicitly declared column. ^(If there is no
+** explicitly declared [INTEGER PRIMARY KEY] column, then the output
+** parameters are set as follows:
+**
+** <pre>
+**     data type: "INTEGER"
+**     collation sequence: "BINARY"
+**     not null: 0
+**     primary key: 1
+**     auto increment: 0
+** </pre>)^
+**
+** ^(This function may load one or more schemas from database files. If an
+** error occurs during this process, or if the requested table or column
+** cannot be found, an [error code] is returned and an error message left
+** in the [database connection] (to be retrieved using sqlite3_errmsg()).)^
+**
+** ^This API is only available if the library was compiled with the
+** [SQLITE_ENABLE_COLUMN_METADATA] C-preprocessor symbol defined.
+*/
+SQLITE_API int sqlite3_table_column_metadata(
+        sqlite3 *db,                /* Connection handle */
+        const char *zDbName,        /* Database name or NULL */
+        const char *zTableName,     /* Table name */
+        const char *zColumnName,    /* Column name */
+        char const **pzDataType,    /* OUTPUT: Declared data type */
+        char const **pzCollSeq,     /* OUTPUT: Collation sequence name */
+        int *pNotNull,              /* OUTPUT: True if NOT NULL constraint exists */
+        int *pPrimaryKey,           /* OUTPUT: True if column part of PK */
+        int *pAutoinc               /* OUTPUT: True if column is auto-increment */
+);
+
+/*
+** CAPI3REF: Load An Extension
+**
+** ^This interface loads an SQLite extension library from the named file.
+**
+** ^The sqlite3_load_extension() interface attempts to load an
+** SQLite extension library contained in the file zFile.
+**
+** ^The entry point is zProc.
+** ^zProc may be 0, in which case the name of the entry point
+** defaults to "sqlite3_extension_init".
+** ^The sqlite3_load_extension() interface returns
+** [SQLITE_OK] on success and [SQLITE_ERROR] if something goes wrong.
+** ^If an error occurs and pzErrMsg is not 0, then the
+** [sqlite3_load_extension()] interface shall attempt to
+** fill *pzErrMsg with error message text stored in memory
+** obtained from [sqlite3_malloc()]. The calling function
+** should free this memory by calling [sqlite3_free()].
+**
+** ^Extension loading must be enabled using
+** [sqlite3_enable_load_extension()] prior to calling this API,
+** otherwise an error will be returned.
+**
+** See also the [load_extension() SQL function].
+*/
+SQLITE_API int sqlite3_load_extension(
+        sqlite3 *db,          /* Load the extension into this database connection */
+        const char *zFile,    /* Name of the shared library containing extension */
+        const char *zProc,    /* Entry point.  Derived from zFile if 0 */
+        char **pzErrMsg       /* Put error message here if not 0 */
+);
+
+/*
+** CAPI3REF: Enable Or Disable Extension Loading
+**
+** ^So as not to open security holes in older applications that are
+** unprepared to deal with extension loading, and as a means of disabling
+** extension loading while evaluating user-entered SQL, the following API
+** is provided to turn the [sqlite3_load_extension()] mechanism on and off.
+**
+** ^Extension loading is off by default. See ticket #1863.
+** ^Call the sqlite3_enable_load_extension() routine with onoff==1
+** to turn extension loading on and call it with onoff==0 to turn
+** it back off again.
+*/
+SQLITE_API int sqlite3_enable_load_extension(sqlite3 *db, int onoff);
+
+/*
+** CAPI3REF: Automatically Load Statically Linked Extensions
+**
+** ^This interface causes the xEntryPoint() function to be invoked for
+** each new [database connection] that is created.  The idea here is that
+** xEntryPoint() is the entry point for a statically linked SQLite extension
+** that is to be automatically loaded into all new database connections.
+**
+** ^(Even though the function prototype shows that xEntryPoint() takes
+** no arguments and returns void, SQLite invokes xEntryPoint() with three
+** arguments and expects and integer result as if the signature of the
+** entry point where as follows:
+**
+** <blockquote><pre>
+**    int xEntryPoint(
+**      sqlite3 *db,
+**      const char **pzErrMsg,
+**      const struct sqlite3_api_routines *pThunk
+**    );
+** </pre></blockquote>)^
+**
+** If the xEntryPoint routine encounters an error, it should make *pzErrMsg
+** point to an appropriate error message (obtained from [sqlite3_mprintf()])
+** and return an appropriate [error code].  ^SQLite ensures that *pzErrMsg
+** is NULL before calling the xEntryPoint().  ^SQLite will invoke
+** [sqlite3_free()] on *pzErrMsg after xEntryPoint() returns.  ^If any
+** xEntryPoint() returns an error, the [sqlite3_open()], [sqlite3_open16()],
+** or [sqlite3_open_v2()] call that provoked the xEntryPoint() will fail.
+**
+** ^Calling sqlite3_auto_extension(X) with an entry point X that is already
+** on the list of automatic extensions is a harmless no-op. ^No entry point
+** will be called more than once for each database connection that is opened.
+**
+** See also: [sqlite3_reset_auto_extension()].
+*/
+SQLITE_API int sqlite3_auto_extension(void (*xEntryPoint)(void));
+
+/*
+** CAPI3REF: Reset Automatic Extension Loading
+**
+** ^This interface disables all automatic extensions previously
+** registered using [sqlite3_auto_extension()].
+*/
+SQLITE_API void sqlite3_reset_auto_extension(void);
+
+/*
+** The interface to the virtual-table mechanism is currently considered
+** to be experimental.  The interface might change in incompatible ways.
+** If this is a problem for you, do not use the interface at this time.
+**
+** When the virtual-table mechanism stabilizes, we will declare the
+** interface fixed, support it indefinitely, and remove this comment.
+*/
+
+/*
+** Structures used by the virtual table interface
+*/
+typedef struct sqlite3_vtab sqlite3_vtab;
+typedef struct sqlite3_index_info sqlite3_index_info;
+typedef struct sqlite3_vtab_cursor sqlite3_vtab_cursor;
+typedef struct sqlite3_module sqlite3_module;
+
+/*
+** CAPI3REF: Virtual Table Object
+** KEYWORDS: sqlite3_module {virtual table module}
+**
+** This structure, sometimes called a "virtual table module",
+** defines the implementation of a [virtual tables].
+** This structure consists mostly of methods for the module.
+**
+** ^A virtual table module is created by filling in a persistent
+** instance of this structure and passing a pointer to that instance
+** to [sqlite3_create_module()] or [sqlite3_create_module_v2()].
+** ^The registration remains valid until it is replaced by a different
+** module or until the [database connection] closes.  The content
+** of this structure must not change while it is registered with
+** any database connection.
+*/
+struct sqlite3_module {
+        int iVersion;
+        int (*xCreate)(sqlite3*, void *pAux,
+                       int argc, const char *const*argv,
+                       sqlite3_vtab **ppVTab, char**);
+        int (*xConnect)(sqlite3*, void *pAux,
+                        int argc, const char *const*argv,
+                        sqlite3_vtab **ppVTab, char**);
+        int (*xBestIndex)(sqlite3_vtab *pVTab, sqlite3_index_info*);
+        int (*xDisconnect)(sqlite3_vtab *pVTab);
+        int (*xDestroy)(sqlite3_vtab *pVTab);
+        int (*xOpen)(sqlite3_vtab *pVTab, sqlite3_vtab_cursor **ppCursor);
+        int (*xClose)(sqlite3_vtab_cursor*);
+        int (*xFilter)(sqlite3_vtab_cursor*, int idxNum, const char *idxStr,
+                       int argc, sqlite3_value **argv);
+        int (*xNext)(sqlite3_vtab_cursor*);
+        int (*xEof)(sqlite3_vtab_cursor*);
+        int (*xColumn)(sqlite3_vtab_cursor*, sqlite3_context*, int);
+        int (*xRowid)(sqlite3_vtab_cursor*, sqlite3_int64 *pRowid);
+        int (*xUpdate)(sqlite3_vtab *, int, sqlite3_value **, sqlite3_int64 *);
+        int (*xBegin)(sqlite3_vtab *pVTab);
+        int (*xSync)(sqlite3_vtab *pVTab);
+        int (*xCommit)(sqlite3_vtab *pVTab);
+        int (*xRollback)(sqlite3_vtab *pVTab);
+        int (*xFindFunction)(sqlite3_vtab *pVtab, int nArg, const char *zName,
+                             void (**pxFunc)(sqlite3_context*,int,sqlite3_value**),
+                             void **ppArg);
+        int (*xRename)(sqlite3_vtab *pVtab, const char *zNew);
+};
+
+/*
+** CAPI3REF: Virtual Table Indexing Information
+** KEYWORDS: sqlite3_index_info
+**
+** The sqlite3_index_info structure and its substructures is used as part
+** of the [virtual table] interface to
+** pass information into and receive the reply from the [xBestIndex]
+** method of a [virtual table module].  The fields under **Inputs** are the
+** inputs to xBestIndex and are read-only.  xBestIndex inserts its
+** results into the **Outputs** fields.
+**
+** ^(The aConstraint[] array records WHERE clause constraints of the form:
+**
+** <blockquote>column OP expr</blockquote>
+**
+** where OP is =, <, <=, >, or >=.)^  ^(The particular operator is
+** stored in aConstraint[].op using one of the
+** [SQLITE_INDEX_CONSTRAINT_EQ | SQLITE_INDEX_CONSTRAINT_ values].)^
+** ^(The index of the column is stored in
+** aConstraint[].iColumn.)^  ^(aConstraint[].usable is TRUE if the
+** expr on the right-hand side can be evaluated (and thus the constraint
+** is usable) and false if it cannot.)^
+**
+** ^The optimizer automatically inverts terms of the form "expr OP column"
+** and makes other simplifications to the WHERE clause in an attempt to
+** get as many WHERE clause terms into the form shown above as possible.
+** ^The aConstraint[] array only reports WHERE clause terms that are
+** relevant to the particular virtual table being queried.
+**
+** ^Information about the ORDER BY clause is stored in aOrderBy[].
+** ^Each term of aOrderBy records a column of the ORDER BY clause.
+**
+** The [xBestIndex] method must fill aConstraintUsage[] with information
+** about what parameters to pass to xFilter.  ^If argvIndex>0 then
+** the right-hand side of the corresponding aConstraint[] is evaluated
+** and becomes the argvIndex-th entry in argv.  ^(If aConstraintUsage[].omit
+** is true, then the constraint is assumed to be fully handled by the
+** virtual table and is not checked again by SQLite.)^
+**
+** ^The idxNum and idxPtr values are recorded and passed into the
+** [xFilter] method.
+** ^[sqlite3_free()] is used to free idxPtr if and only if
+** needToFreeIdxPtr is true.
+**
+** ^The orderByConsumed means that output from [xFilter]/[xNext] will occur in
+** the correct order to satisfy the ORDER BY clause so that no separate
+** sorting step is required.
+**
+** ^The estimatedCost value is an estimate of the cost of doing the
+** particular lookup.  A full scan of a table with N entries should have
+** a cost of N.  A binary search of a table of N entries should have a
+** cost of approximately log(N).
+*/
+struct sqlite3_index_info {
+        /* Inputs */
+        int nConstraint;           /* Number of entries in aConstraint */
+        struct sqlite3_index_constraint {
+                int iColumn;              /* Column on left-hand side of constraint */
+                unsigned char op;         /* Constraint operator */
+                unsigned char usable;     /* True if this constraint is usable */
+                int iTermOffset;          /* Used internally - xBestIndex should ignore */
+        } *aConstraint;            /* Table of WHERE clause constraints */
+        int nOrderBy;              /* Number of terms in the ORDER BY clause */
+        struct sqlite3_index_orderby {
+                int iColumn;              /* Column number */
+                unsigned char desc;       /* True for DESC.  False for ASC. */
+        } *aOrderBy;               /* The ORDER BY clause */
+        /* Outputs */
+        struct sqlite3_index_constraint_usage {
+                int argvIndex;           /* if >0, constraint is part of argv to xFilter */
+                unsigned char omit;      /* Do not code a test for this constraint */
+        } *aConstraintUsage;
+        int idxNum;                /* Number used to identify the index */
+        char *idxStr;              /* String, possibly obtained from sqlite3_malloc */
+        int needToFreeIdxStr;      /* Free idxStr using sqlite3_free() if true */
+        int orderByConsumed;       /* True if output is already ordered */
+        double estimatedCost;      /* Estimated cost of using this index */
+};
+
+/*
+** CAPI3REF: Virtual Table Constraint Operator Codes
+**
+** These macros defined the allowed values for the
+** [sqlite3_index_info].aConstraint[].op field.  Each value represents
+** an operator that is part of a constraint term in the wHERE clause of
+** a query that uses a [virtual table].
+*/
+#define SQLITE_INDEX_CONSTRAINT_EQ    2
+#define SQLITE_INDEX_CONSTRAINT_GT    4
+#define SQLITE_INDEX_CONSTRAINT_LE    8
+#define SQLITE_INDEX_CONSTRAINT_LT    16
+#define SQLITE_INDEX_CONSTRAINT_GE    32
+#define SQLITE_INDEX_CONSTRAINT_MATCH 64
+
+/*
+** CAPI3REF: Register A Virtual Table Implementation
+**
+** ^These routines are used to register a new [virtual table module] name.
+** ^Module names must be registered before
+** creating a new [virtual table] using the module and before using a
+** preexisting [virtual table] for the module.
+**
+** ^The module name is registered on the [database connection] specified
+** by the first parameter.  ^The name of the module is given by the
+** second parameter.  ^The third parameter is a pointer to
+** the implementation of the [virtual table module].   ^The fourth
+** parameter is an arbitrary client data pointer that is passed through
+** into the [xCreate] and [xConnect] methods of the virtual table module
+** when a new virtual table is be being created or reinitialized.
+**
+** ^The sqlite3_create_module_v2() interface has a fifth parameter which
+** is a pointer to a destructor for the pClientData.  ^SQLite will
+** invoke the destructor function (if it is not NULL) when SQLite
+** no longer needs the pClientData pointer.  ^The destructor will also
+** be invoked if the call to sqlite3_create_module_v2() fails.
+** ^The sqlite3_create_module()
+** interface is equivalent to sqlite3_create_module_v2() with a NULL
+** destructor.
+*/
+SQLITE_API int sqlite3_create_module(
+        sqlite3 *db,               /* SQLite connection to register module with */
+        const char *zName,         /* Name of the module */
+        const sqlite3_module *p,   /* Methods for the module */
+        void *pClientData          /* Client data for xCreate/xConnect */
+);
+SQLITE_API int sqlite3_create_module_v2(
+        sqlite3 *db,               /* SQLite connection to register module with */
+        const char *zName,         /* Name of the module */
+        const sqlite3_module *p,   /* Methods for the module */
+        void *pClientData,         /* Client data for xCreate/xConnect */
+        void(*xDestroy)(void*)     /* Module destructor function */
+);
+
+/*
+** CAPI3REF: Virtual Table Instance Object
+** KEYWORDS: sqlite3_vtab
+**
+** Every [virtual table module] implementation uses a subclass
+** of this object to describe a particular instance
+** of the [virtual table].  Each subclass will
+** be tailored to the specific needs of the module implementation.
+** The purpose of this superclass is to define certain fields that are
+** common to all module implementations.
+**
+** ^Virtual tables methods can set an error message by assigning a
+** string obtained from [sqlite3_mprintf()] to zErrMsg.  The method should
+** take care that any prior string is freed by a call to [sqlite3_free()]
+** prior to assigning a new string to zErrMsg.  ^After the error message
+** is delivered up to the client application, the string will be automatically
+** freed by sqlite3_free() and the zErrMsg field will be zeroed.
+*/
+struct sqlite3_vtab {
+        const sqlite3_module *pModule;  /* The module for this virtual table */
+        int nRef;                       /* NO LONGER USED */
+        char *zErrMsg;                  /* Error message from sqlite3_mprintf() */
+        /* Virtual table implementations will typically add additional fields */
+};
+
+/*
+** CAPI3REF: Virtual Table Cursor Object
+** KEYWORDS: sqlite3_vtab_cursor {virtual table cursor}
+**
+** Every [virtual table module] implementation uses a subclass of the
+** following structure to describe cursors that point into the
+** [virtual table] and are used
+** to loop through the virtual table.  Cursors are created using the
+** [sqlite3_module.xOpen | xOpen] method of the module and are destroyed
+** by the [sqlite3_module.xClose | xClose] method.  Cursors are used
+** by the [xFilter], [xNext], [xEof], [xColumn], and [xRowid] methods
+** of the module.  Each module implementation will define
+** the content of a cursor structure to suit its own needs.
+**
+** This superclass exists in order to define fields of the cursor that
+** are common to all implementations.
+*/
+struct sqlite3_vtab_cursor {
+        sqlite3_vtab *pVtab;      /* Virtual table of this cursor */
+        /* Virtual table implementations will typically add additional fields */
+};
+
+/*
+** CAPI3REF: Declare The Schema Of A Virtual Table
+**
+** ^The [xCreate] and [xConnect] methods of a
+** [virtual table module] call this interface
+** to declare the format (the names and datatypes of the columns) of
+** the virtual tables they implement.
+*/
+SQLITE_API int sqlite3_declare_vtab(sqlite3*, const char *zSQL);
+
+/*
+** CAPI3REF: Overload A Function For A Virtual Table
+**
+** ^(Virtual tables can provide alternative implementations of functions
+** using the [xFindFunction] method of the [virtual table module].
+** But global versions of those functions
+** must exist in order to be overloaded.)^
+**
+** ^(This API makes sure a global version of a function with a particular
+** name and number of parameters exists.  If no such function exists
+** before this API is called, a new function is created.)^  ^The implementation
+** of the new function always causes an exception to be thrown.  So
+** the new function is not good for anything by itself.  Its only
+** purpose is to be a placeholder function that can be overloaded
+** by a [virtual table].
+*/
+SQLITE_API int sqlite3_overload_function(sqlite3*, const char *zFuncName, int nArg);
+
+/*
+** The interface to the virtual-table mechanism defined above (back up
+** to a comment remarkably similar to this one) is currently considered
+** to be experimental.  The interface might change in incompatible ways.
+** If this is a problem for you, do not use the interface at this time.
+**
+** When the virtual-table mechanism stabilizes, we will declare the
+** interface fixed, support it indefinitely, and remove this comment.
+*/
+
+/*
+** CAPI3REF: A Handle To An Open BLOB
+** KEYWORDS: {BLOB handle} {BLOB handles}
+**
+** An instance of this object represents an open BLOB on which
+** [sqlite3_blob_open | incremental BLOB I/O] can be performed.
+** ^Objects of this type are created by [sqlite3_blob_open()]
+** and destroyed by [sqlite3_blob_close()].
+** ^The [sqlite3_blob_read()] and [sqlite3_blob_write()] interfaces
+** can be used to read or write small subsections of the BLOB.
+** ^The [sqlite3_blob_bytes()] interface returns the size of the BLOB in bytes.
+*/
+typedef struct sqlite3_blob sqlite3_blob;
+
+/*
+** CAPI3REF: Open A BLOB For Incremental I/O
+**
+** ^(This interfaces opens a [BLOB handle | handle] to the BLOB located
+** in row iRow, column zColumn, table zTable in database zDb;
+** in other words, the same BLOB that would be selected by:
+**
+** <pre>
+**     SELECT zColumn FROM zDb.zTable WHERE [rowid] = iRow;
+** </pre>)^
+**
+** ^If the flags parameter is non-zero, then the BLOB is opened for read
+** and write access. ^If it is zero, the BLOB is opened for read access.
+** ^It is not possible to open a column that is part of an index or primary
+** key for writing. ^If [foreign key constraints] are enabled, it is
+** not possible to open a column that is part of a [child key] for writing.
+**
+** ^Note that the database name is not the filename that contains
+** the database but rather the symbolic name of the database that
+** appears after the AS keyword when the database is connected using [ATTACH].
+** ^For the main database file, the database name is "main".
+** ^For TEMP tables, the database name is "temp".
+**
+** ^(On success, [SQLITE_OK] is returned and the new [BLOB handle] is written
+** to *ppBlob. Otherwise an [error code] is returned and *ppBlob is set
+** to be a null pointer.)^
+** ^This function sets the [database connection] error code and message
+** accessible via [sqlite3_errcode()] and [sqlite3_errmsg()] and related
+** functions. ^Note that the *ppBlob variable is always initialized in a
+** way that makes it safe to invoke [sqlite3_blob_close()] on *ppBlob
+** regardless of the success or failure of this routine.
+**
+** ^(If the row that a BLOB handle points to is modified by an
+** [UPDATE], [DELETE], or by [ON CONFLICT] side-effects
+** then the BLOB handle is marked as "expired".
+** This is true if any column of the row is changed, even a column
+** other than the one the BLOB handle is open on.)^
+** ^Calls to [sqlite3_blob_read()] and [sqlite3_blob_write()] for
+** an expired BLOB handle fail with a return code of [SQLITE_ABORT].
+** ^(Changes written into a BLOB prior to the BLOB expiring are not
+** rolled back by the expiration of the BLOB.  Such changes will eventually
+** commit if the transaction continues to completion.)^
+**
+** ^Use the [sqlite3_blob_bytes()] interface to determine the size of
+** the opened blob.  ^The size of a blob may not be changed by this
+** interface.  Use the [UPDATE] SQL command to change the size of a
+** blob.
+**
+** ^The [sqlite3_bind_zeroblob()] and [sqlite3_result_zeroblob()] interfaces
+** and the built-in [zeroblob] SQL function can be used, if desired,
+** to create an empty, zero-filled blob in which to read or write using
+** this interface.
+**
+** To avoid a resource leak, every open [BLOB handle] should eventually
+** be released by a call to [sqlite3_blob_close()].
+*/
+SQLITE_API int sqlite3_blob_open(
+        sqlite3*,
+        const char *zDb,
+        const char *zTable,
+        const char *zColumn,
+        sqlite3_int64 iRow,
+        int flags,
+        sqlite3_blob **ppBlob
+);
+
+/*
+** CAPI3REF: Move a BLOB Handle to a New Row
+**
+** ^This function is used to move an existing blob handle so that it points
+** to a different row of the same database table. ^The new row is identified
+** by the rowid value passed as the second argument. Only the row can be
+** changed. ^The database, table and column on which the blob handle is open
+** remain the same. Moving an existing blob handle to a new row can be
+** faster than closing the existing handle and opening a new one.
+**
+** ^(The new row must meet the same criteria as for [sqlite3_blob_open()] -
+** it must exist and there must be either a blob or text value stored in
+** the nominated column.)^ ^If the new row is not present in the table, or if
+** it does not contain a blob or text value, or if another error occurs, an
+** SQLite error code is returned and the blob handle is considered aborted.
+** ^All subsequent calls to [sqlite3_blob_read()], [sqlite3_blob_write()] or
+** [sqlite3_blob_reopen()] on an aborted blob handle immediately return
+** SQLITE_ABORT. ^Calling [sqlite3_blob_bytes()] on an aborted blob handle
+** always returns zero.
+**
+** ^This function sets the database handle error code and message.
+*/
+SQLITE_API SQLITE_EXPERIMENTAL int sqlite3_blob_reopen(sqlite3_blob *, sqlite3_int64);
+
+/*
+** CAPI3REF: Close A BLOB Handle
+**
+** ^Closes an open [BLOB handle].
+**
+** ^Closing a BLOB shall cause the current transaction to commit
+** if there are no other BLOBs, no pending prepared statements, and the
+** database connection is in [autocommit mode].
+** ^If any writes were made to the BLOB, they might be held in cache
+** until the close operation if they will fit.
+**
+** ^(Closing the BLOB often forces the changes
+** out to disk and so if any I/O errors occur, they will likely occur
+** at the time when the BLOB is closed.  Any errors that occur during
+** closing are reported as a non-zero return value.)^
+**
+** ^(The BLOB is closed unconditionally.  Even if this routine returns
+** an error code, the BLOB is still closed.)^
+**
+** ^Calling this routine with a null pointer (such as would be returned
+** by a failed call to [sqlite3_blob_open()]) is a harmless no-op.
+*/
+SQLITE_API int sqlite3_blob_close(sqlite3_blob *);
+
+/*
+** CAPI3REF: Return The Size Of An Open BLOB
+**
+** ^Returns the size in bytes of the BLOB accessible via the
+** successfully opened [BLOB handle] in its only argument.  ^The
+** incremental blob I/O routines can only read or overwriting existing
+** blob content; they cannot change the size of a blob.
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()].  Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+*/
+SQLITE_API int sqlite3_blob_bytes(sqlite3_blob *);
+
+/*
+** CAPI3REF: Read Data From A BLOB Incrementally
+**
+** ^(This function is used to read data from an open [BLOB handle] into a
+** caller-supplied buffer. N bytes of data are copied into buffer Z
+** from the open BLOB, starting at offset iOffset.)^
+**
+** ^If offset iOffset is less than N bytes from the end of the BLOB,
+** [SQLITE_ERROR] is returned and no data is read.  ^If N or iOffset is
+** less than zero, [SQLITE_ERROR] is returned and no data is read.
+** ^The size of the blob (and hence the maximum value of N+iOffset)
+** can be determined using the [sqlite3_blob_bytes()] interface.
+**
+** ^An attempt to read from an expired [BLOB handle] fails with an
+** error code of [SQLITE_ABORT].
+**
+** ^(On success, sqlite3_blob_read() returns SQLITE_OK.
+** Otherwise, an [error code] or an [extended error code] is returned.)^
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()].  Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+**
+** See also: [sqlite3_blob_write()].
+*/
+SQLITE_API int sqlite3_blob_read(sqlite3_blob *, void *Z, int N, int iOffset);
+
+/*
+** CAPI3REF: Write Data Into A BLOB Incrementally
+**
+** ^This function is used to write data into an open [BLOB handle] from a
+** caller-supplied buffer. ^N bytes of data are copied from the buffer Z
+** into the open BLOB, starting at offset iOffset.
+**
+** ^If the [BLOB handle] passed as the first argument was not opened for
+** writing (the flags parameter to [sqlite3_blob_open()] was zero),
+** this function returns [SQLITE_READONLY].
+**
+** ^This function may only modify the contents of the BLOB; it is
+** not possible to increase the size of a BLOB using this API.
+** ^If offset iOffset is less than N bytes from the end of the BLOB,
+** [SQLITE_ERROR] is returned and no data is written.  ^If N is
+** less than zero [SQLITE_ERROR] is returned and no data is written.
+** The size of the BLOB (and hence the maximum value of N+iOffset)
+** can be determined using the [sqlite3_blob_bytes()] interface.
+**
+** ^An attempt to write to an expired [BLOB handle] fails with an
+** error code of [SQLITE_ABORT].  ^Writes to the BLOB that occurred
+** before the [BLOB handle] expired are not rolled back by the
+** expiration of the handle, though of course those changes might
+** have been overwritten by the statement that expired the BLOB handle
+** or by other independent statements.
+**
+** ^(On success, sqlite3_blob_write() returns SQLITE_OK.
+** Otherwise, an  [error code] or an [extended error code] is returned.)^
+**
+** This routine only works on a [BLOB handle] which has been created
+** by a prior successful call to [sqlite3_blob_open()] and which has not
+** been closed by [sqlite3_blob_close()].  Passing any other pointer in
+** to this routine results in undefined and probably undesirable behavior.
+**
+** See also: [sqlite3_blob_read()].
+*/
+SQLITE_API int sqlite3_blob_write(sqlite3_blob *, const void *z, int n, int iOffset);
+
+/*
+** CAPI3REF: Virtual File System Objects
+**
+** A virtual filesystem (VFS) is an [sqlite3_vfs] object
+** that SQLite uses to interact
+** with the underlying operating system.  Most SQLite builds come with a
+** single default VFS that is appropriate for the host computer.
+** New VFSes can be registered and existing VFSes can be unregistered.
+** The following interfaces are provided.
+**
+** ^The sqlite3_vfs_find() interface returns a pointer to a VFS given its name.
+** ^Names are case sensitive.
+** ^Names are zero-terminated UTF-8 strings.
+** ^If there is no match, a NULL pointer is returned.
+** ^If zVfsName is NULL then the default VFS is returned.
+**
+** ^New VFSes are registered with sqlite3_vfs_register().
+** ^Each new VFS becomes the default VFS if the makeDflt flag is set.
+** ^The same VFS can be registered multiple times without injury.
+** ^To make an existing VFS into the default VFS, register it again
+** with the makeDflt flag set.  If two different VFSes with the
+** same name are registered, the behavior is undefined.  If a
+** VFS is registered with a name that is NULL or an empty string,
+** then the behavior is undefined.
+**
+** ^Unregister a VFS with the sqlite3_vfs_unregister() interface.
+** ^(If the default VFS is unregistered, another VFS is chosen as
+** the default.  The choice for the new VFS is arbitrary.)^
+*/
+SQLITE_API sqlite3_vfs *sqlite3_vfs_find(const char *zVfsName);
+SQLITE_API int sqlite3_vfs_register(sqlite3_vfs*, int makeDflt);
+SQLITE_API int sqlite3_vfs_unregister(sqlite3_vfs*);
+
+/*
+** CAPI3REF: Mutexes
+**
+** The SQLite core uses these routines for thread
+** synchronization. Though they are intended for internal
+** use by SQLite, code that links against SQLite is
+** permitted to use any of these routines.
+**
+** The SQLite source code contains multiple implementations
+** of these mutex routines.  An appropriate implementation
+** is selected automatically at compile-time.  ^(The following
+** implementations are available in the SQLite core:
+**
+** <ul>
+** <li>   SQLITE_MUTEX_OS2
+** <li>   SQLITE_MUTEX_PTHREAD
+** <li>   SQLITE_MUTEX_W32
+** <li>   SQLITE_MUTEX_NOOP
+** </ul>)^
+**
+** ^The SQLITE_MUTEX_NOOP implementation is a set of routines
+** that does no real locking and is appropriate for use in
+** a single-threaded application.  ^The SQLITE_MUTEX_OS2,
+** SQLITE_MUTEX_PTHREAD, and SQLITE_MUTEX_W32 implementations
+** are appropriate for use on OS/2, Unix, and Windows.
+**
+** ^(If SQLite is compiled with the SQLITE_MUTEX_APPDEF preprocessor
+** macro defined (with "-DSQLITE_MUTEX_APPDEF=1"), then no mutex
+** implementation is included with the library. In this case the
+** application must supply a custom mutex implementation using the
+** [SQLITE_CONFIG_MUTEX] option of the sqlite3_config() function
+** before calling sqlite3_initialize() or any other public sqlite3_
+** function that calls sqlite3_initialize().)^
+**
+** ^The sqlite3_mutex_alloc() routine allocates a new
+** mutex and returns a pointer to it. ^If it returns NULL
+** that means that a mutex could not be allocated.  ^SQLite
+** will unwind its stack and return an error.  ^(The argument
+** to sqlite3_mutex_alloc() is one of these integer constants:
+**
+** <ul>
+** <li>  SQLITE_MUTEX_FAST
+** <li>  SQLITE_MUTEX_RECURSIVE
+** <li>  SQLITE_MUTEX_STATIC_MASTER
+** <li>  SQLITE_MUTEX_STATIC_MEM
+** <li>  SQLITE_MUTEX_STATIC_MEM2
+** <li>  SQLITE_MUTEX_STATIC_PRNG
+** <li>  SQLITE_MUTEX_STATIC_LRU
+** <li>  SQLITE_MUTEX_STATIC_LRU2
+** </ul>)^
+**
+** ^The first two constants (SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE)
+** cause sqlite3_mutex_alloc() to create
+** a new mutex.  ^The new mutex is recursive when SQLITE_MUTEX_RECURSIVE
+** is used but not necessarily so when SQLITE_MUTEX_FAST is used.
+** The mutex implementation does not need to make a distinction
+** between SQLITE_MUTEX_RECURSIVE and SQLITE_MUTEX_FAST if it does
+** not want to.  ^SQLite will only request a recursive mutex in
+** cases where it really needs one.  ^If a faster non-recursive mutex
+** implementation is available on the host platform, the mutex subsystem
+** might return such a mutex in response to SQLITE_MUTEX_FAST.
+**
+** ^The other allowed parameters to sqlite3_mutex_alloc() (anything other
+** than SQLITE_MUTEX_FAST and SQLITE_MUTEX_RECURSIVE) each return
+** a pointer to a static preexisting mutex.  ^Six static mutexes are
+** used by the current version of SQLite.  Future versions of SQLite
+** may add additional static mutexes.  Static mutexes are for internal
+** use by SQLite only.  Applications that use SQLite mutexes should
+** use only the dynamic mutexes returned by SQLITE_MUTEX_FAST or
+** SQLITE_MUTEX_RECURSIVE.
+**
+** ^Note that if one of the dynamic mutex parameters (SQLITE_MUTEX_FAST
+** or SQLITE_MUTEX_RECURSIVE) is used then sqlite3_mutex_alloc()
+** returns a different mutex on every call.  ^But for the static
+** mutex types, the same mutex is returned on every call that has
+** the same type number.
+**
+** ^The sqlite3_mutex_free() routine deallocates a previously
+** allocated dynamic mutex.  ^SQLite is careful to deallocate every
+** dynamic mutex that it allocates.  The dynamic mutexes must not be in
+** use when they are deallocated.  Attempting to deallocate a static
+** mutex results in undefined behavior.  ^SQLite never deallocates
+** a static mutex.
+**
+** ^The sqlite3_mutex_enter() and sqlite3_mutex_try() routines attempt
+** to enter a mutex.  ^If another thread is already within the mutex,
+** sqlite3_mutex_enter() will block and sqlite3_mutex_try() will return
+** SQLITE_BUSY.  ^The sqlite3_mutex_try() interface returns [SQLITE_OK]
+** upon successful entry.  ^(Mutexes created using
+** SQLITE_MUTEX_RECURSIVE can be entered multiple times by the same thread.
+** In such cases the,
+** mutex must be exited an equal number of times before another thread
+** can enter.)^  ^(If the same thread tries to enter any other
+** kind of mutex more than once, the behavior is undefined.
+** SQLite will never exhibit
+** such behavior in its own use of mutexes.)^
+**
+** ^(Some systems (for example, Windows 95) do not support the operation
+** implemented by sqlite3_mutex_try().  On those systems, sqlite3_mutex_try()
+** will always return SQLITE_BUSY.  The SQLite core only ever uses
+** sqlite3_mutex_try() as an optimization so this is acceptable behavior.)^
+**
+** ^The sqlite3_mutex_leave() routine exits a mutex that was
+** previously entered by the same thread.   ^(The behavior
+** is undefined if the mutex is not currently entered by the
+** calling thread or is not currently allocated.  SQLite will
+** never do either.)^
+**
+** ^If the argument to sqlite3_mutex_enter(), sqlite3_mutex_try(), or
+** sqlite3_mutex_leave() is a NULL pointer, then all three routines
+** behave as no-ops.
+**
+** See also: [sqlite3_mutex_held()] and [sqlite3_mutex_notheld()].
+*/
+SQLITE_API sqlite3_mutex *sqlite3_mutex_alloc(int);
+SQLITE_API void sqlite3_mutex_free(sqlite3_mutex*);
+SQLITE_API void sqlite3_mutex_enter(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_try(sqlite3_mutex*);
+SQLITE_API void sqlite3_mutex_leave(sqlite3_mutex*);
+
+/*
+** CAPI3REF: Mutex Methods Object
+**
+** An instance of this structure defines the low-level routines
+** used to allocate and use mutexes.
+**
+** Usually, the default mutex implementations provided by SQLite are
+** sufficient, however the user has the option of substituting a custom
+** implementation for specialized deployments or systems for which SQLite
+** does not provide a suitable implementation. In this case, the user
+** creates and populates an instance of this structure to pass
+** to sqlite3_config() along with the [SQLITE_CONFIG_MUTEX] option.
+** Additionally, an instance of this structure can be used as an
+** output variable when querying the system for the current mutex
+** implementation, using the [SQLITE_CONFIG_GETMUTEX] option.
+**
+** ^The xMutexInit method defined by this structure is invoked as
+** part of system initialization by the sqlite3_initialize() function.
+** ^The xMutexInit routine is called by SQLite exactly once for each
+** effective call to [sqlite3_initialize()].
+**
+** ^The xMutexEnd method defined by this structure is invoked as
+** part of system shutdown by the sqlite3_shutdown() function. The
+** implementation of this method is expected to release all outstanding
+** resources obtained by the mutex methods implementation, especially
+** those obtained by the xMutexInit method.  ^The xMutexEnd()
+** interface is invoked exactly once for each call to [sqlite3_shutdown()].
+**
+** ^(The remaining seven methods defined by this structure (xMutexAlloc,
+** xMutexFree, xMutexEnter, xMutexTry, xMutexLeave, xMutexHeld and
+** xMutexNotheld) implement the following interfaces (respectively):
+**
+** <ul>
+**   <li>  [sqlite3_mutex_alloc()] </li>
+**   <li>  [sqlite3_mutex_free()] </li>
+**   <li>  [sqlite3_mutex_enter()] </li>
+**   <li>  [sqlite3_mutex_try()] </li>
+**   <li>  [sqlite3_mutex_leave()] </li>
+**   <li>  [sqlite3_mutex_held()] </li>
+**   <li>  [sqlite3_mutex_notheld()] </li>
+** </ul>)^
+**
+** The only difference is that the public sqlite3_XXX functions enumerated
+** above silently ignore any invocations that pass a NULL pointer instead
+** of a valid mutex handle. The implementations of the methods defined
+** by this structure are not required to handle this case, the results
+** of passing a NULL pointer instead of a valid mutex handle are undefined
+** (i.e. it is acceptable to provide an implementation that segfaults if
+** it is passed a NULL pointer).
+**
+** The xMutexInit() method must be threadsafe.  ^It must be harmless to
+** invoke xMutexInit() multiple times within the same process and without
+** intervening calls to xMutexEnd().  Second and subsequent calls to
+** xMutexInit() must be no-ops.
+**
+** ^xMutexInit() must not use SQLite memory allocation ([sqlite3_malloc()]
+** and its associates).  ^Similarly, xMutexAlloc() must not use SQLite memory
+** allocation for a static mutex.  ^However xMutexAlloc() may use SQLite
+** memory allocation for a fast or recursive mutex.
+**
+** ^SQLite will invoke the xMutexEnd() method when [sqlite3_shutdown()] is
+** called, but only if the prior call to xMutexInit returned SQLITE_OK.
+** If xMutexInit fails in any way, it is expected to clean up after itself
+** prior to returning.
+*/
+typedef struct sqlite3_mutex_methods sqlite3_mutex_methods;
+struct sqlite3_mutex_methods {
+        int (*xMutexInit)(void);
+        int (*xMutexEnd)(void);
+        sqlite3_mutex *(*xMutexAlloc)(int);
+        void (*xMutexFree)(sqlite3_mutex *);
+        void (*xMutexEnter)(sqlite3_mutex *);
+        int (*xMutexTry)(sqlite3_mutex *);
+        void (*xMutexLeave)(sqlite3_mutex *);
+        int (*xMutexHeld)(sqlite3_mutex *);
+        int (*xMutexNotheld)(sqlite3_mutex *);
+};
+
+/*
+** CAPI3REF: Mutex Verification Routines
+**
+** The sqlite3_mutex_held() and sqlite3_mutex_notheld() routines
+** are intended for use inside assert() statements.  ^The SQLite core
+** never uses these routines except inside an assert() and applications
+** are advised to follow the lead of the core.  ^The SQLite core only
+** provides implementations for these routines when it is compiled
+** with the SQLITE_DEBUG flag.  ^External mutex implementations
+** are only required to provide these routines if SQLITE_DEBUG is
+** defined and if NDEBUG is not defined.
+**
+** ^These routines should return true if the mutex in their argument
+** is held or not held, respectively, by the calling thread.
+**
+** ^The implementation is not required to provided versions of these
+** routines that actually work. If the implementation does not provide working
+** versions of these routines, it should at least provide stubs that always
+** return true so that one does not get spurious assertion failures.
+**
+** ^If the argument to sqlite3_mutex_held() is a NULL pointer then
+** the routine should return 1.   This seems counter-intuitive since
+** clearly the mutex cannot be held if it does not exist.  But the
+** the reason the mutex does not exist is because the build is not
+** using mutexes.  And we do not want the assert() containing the
+** call to sqlite3_mutex_held() to fail, so a non-zero return is
+** the appropriate thing to do.  ^The sqlite3_mutex_notheld()
+** interface should also return 1 when given a NULL pointer.
+*/
+#ifndef NDEBUG
+SQLITE_API int sqlite3_mutex_held(sqlite3_mutex*);
+SQLITE_API int sqlite3_mutex_notheld(sqlite3_mutex*);
+#endif
+
+/*
+** CAPI3REF: Mutex Types
+**
+** The [sqlite3_mutex_alloc()] interface takes a single argument
+** which is one of these integer constants.
+**
+** The set of static mutexes may change from one SQLite release to the
+** next.  Applications that override the built-in mutex logic must be
+** prepared to accommodate additional static mutexes.
+*/
+#define SQLITE_MUTEX_FAST             0
+#define SQLITE_MUTEX_RECURSIVE        1
+#define SQLITE_MUTEX_STATIC_MASTER    2
+#define SQLITE_MUTEX_STATIC_MEM       3  /* sqlite3_malloc() */
+#define SQLITE_MUTEX_STATIC_MEM2      4  /* NOT USED */
+#define SQLITE_MUTEX_STATIC_OPEN      4  /* sqlite3BtreeOpen() */
+#define SQLITE_MUTEX_STATIC_PRNG      5  /* sqlite3_random() */
+#define SQLITE_MUTEX_STATIC_LRU       6  /* lru page list */
+#define SQLITE_MUTEX_STATIC_LRU2      7  /* NOT USED */
+#define SQLITE_MUTEX_STATIC_PMEM      7  /* sqlite3PageMalloc() */
+
+/*
+** CAPI3REF: Retrieve the mutex for a database connection
+**
+** ^This interface returns a pointer the [sqlite3_mutex] object that
+** serializes access to the [database connection] given in the argument
+** when the [threading mode] is Serialized.
+** ^If the [threading mode] is Single-thread or Multi-thread then this
+** routine returns a NULL pointer.
+*/
+SQLITE_API sqlite3_mutex *sqlite3_db_mutex(sqlite3*);
+
+/*
+** CAPI3REF: Low-Level Control Of Database Files
+**
+** ^The [sqlite3_file_control()] interface makes a direct call to the
+** xFileControl method for the [sqlite3_io_methods] object associated
+** with a particular database identified by the second argument. ^The
+** name of the database is "main" for the main database or "temp" for the
+** TEMP database, or the name that appears after the AS keyword for
+** databases that are added using the [ATTACH] SQL command.
+** ^A NULL pointer can be used in place of "main" to refer to the
+** main database file.
+** ^The third and fourth parameters to this routine
+** are passed directly through to the second and third parameters of
+** the xFileControl method.  ^The return value of the xFileControl
+** method becomes the return value of this routine.
+**
+** ^The SQLITE_FCNTL_FILE_POINTER value for the op parameter causes
+** a pointer to the underlying [sqlite3_file] object to be written into
+** the space pointed to by the 4th parameter.  ^The SQLITE_FCNTL_FILE_POINTER
+** case is a short-circuit path which does not actually invoke the
+** underlying sqlite3_io_methods.xFileControl method.
+**
+** ^If the second parameter (zDbName) does not match the name of any
+** open database file, then SQLITE_ERROR is returned.  ^This error
+** code is not remembered and will not be recalled by [sqlite3_errcode()]
+** or [sqlite3_errmsg()].  The underlying xFileControl method might
+** also return SQLITE_ERROR.  There is no way to distinguish between
+** an incorrect zDbName and an SQLITE_ERROR return from the underlying
+** xFileControl method.
+**
+** See also: [SQLITE_FCNTL_LOCKSTATE]
+*/
+SQLITE_API int sqlite3_file_control(sqlite3*, const char *zDbName, int op, void*);
+
+/*
+** CAPI3REF: Testing Interface
+**
+** ^The sqlite3_test_control() interface is used to read out internal
+** state of SQLite and to inject faults into SQLite for testing
+** purposes.  ^The first parameter is an operation code that determines
+** the number, meaning, and operation of all subsequent parameters.
+**
+** This interface is not for use by applications.  It exists solely
+** for verifying the correct operation of the SQLite library.  Depending
+** on how the SQLite library is compiled, this interface might not exist.
+**
+** The details of the operation codes, their meanings, the parameters
+** they take, and what they do are all subject to change without notice.
+** Unlike most of the SQLite API, this function is not guaranteed to
+** operate consistently from one release to the next.
+*/
+SQLITE_API int sqlite3_test_control(int op, ...);
+
+/*
+** CAPI3REF: Testing Interface Operation Codes
+**
+** These constants are the valid operation code parameters used
+** as the first argument to [sqlite3_test_control()].
+**
+** These parameters and their meanings are subject to change
+** without notice.  These values are for testing purposes only.
+** Applications should not use any of these parameters or the
+** [sqlite3_test_control()] interface.
+*/
+#define SQLITE_TESTCTRL_FIRST                    5
+#define SQLITE_TESTCTRL_PRNG_SAVE                5
+#define SQLITE_TESTCTRL_PRNG_RESTORE             6
+#define SQLITE_TESTCTRL_PRNG_RESET               7
+#define SQLITE_TESTCTRL_BITVEC_TEST              8
+#define SQLITE_TESTCTRL_FAULT_INSTALL            9
+#define SQLITE_TESTCTRL_BENIGN_MALLOC_HOOKS     10
+#define SQLITE_TESTCTRL_PENDING_BYTE            11
+#define SQLITE_TESTCTRL_ASSERT                  12
+#define SQLITE_TESTCTRL_ALWAYS                  13
+#define SQLITE_TESTCTRL_RESERVE                 14
+#define SQLITE_TESTCTRL_OPTIMIZATIONS           15
+#define SQLITE_TESTCTRL_ISKEYWORD               16
+#define SQLITE_TESTCTRL_PGHDRSZ                 17
+#define SQLITE_TESTCTRL_SCRATCHMALLOC           18
+#define SQLITE_TESTCTRL_LAST                    18
+
+/*
+** CAPI3REF: SQLite Runtime Status
+**
+** ^This interface is used to retrieve runtime status information
+** about the performance of SQLite, and optionally to reset various
+** highwater marks.  ^The first argument is an integer code for
+** the specific parameter to measure.  ^(Recognized integer codes
+** are of the form [SQLITE_STATUS_MEMORY_USED | SQLITE_STATUS_...].)^
+** ^The current value of the parameter is returned into *pCurrent.
+** ^The highest recorded value is returned in *pHighwater.  ^If the
+** resetFlag is true, then the highest record value is reset after
+** *pHighwater is written.  ^(Some parameters do not record the highest
+** value.  For those parameters
+** nothing is written into *pHighwater and the resetFlag is ignored.)^
+** ^(Other parameters record only the highwater mark and not the current
+** value.  For these latter parameters nothing is written into *pCurrent.)^
+**
+** ^The sqlite3_status() routine returns SQLITE_OK on success and a
+** non-zero [error code] on failure.
+**
+** This routine is threadsafe but is not atomic.  This routine can be
+** called while other threads are running the same or different SQLite
+** interfaces.  However the values returned in *pCurrent and
+** *pHighwater reflect the status of SQLite at different points in time
+** and it is possible that another thread might change the parameter
+** in between the times when *pCurrent and *pHighwater are written.
+**
+** See also: [sqlite3_db_status()]
+*/
+SQLITE_API int sqlite3_status(int op, int *pCurrent, int *pHighwater, int resetFlag);
+
+
+/*
+** CAPI3REF: Status Parameters
+**
+** These integer constants designate various run-time status parameters
+** that can be returned by [sqlite3_status()].
+**
+** <dl>
+** ^(<dt>SQLITE_STATUS_MEMORY_USED</dt>
+** <dd>This parameter is the current amount of memory checked out
+** using [sqlite3_malloc()], either directly or indirectly.  The
+** figure includes calls made to [sqlite3_malloc()] by the application
+** and internal memory usage by the SQLite library.  Scratch memory
+** controlled by [SQLITE_CONFIG_SCRATCH] and auxiliary page-cache
+** memory controlled by [SQLITE_CONFIG_PAGECACHE] is not included in
+** this parameter.  The amount returned is the sum of the allocation
+** sizes as reported by the xSize method in [sqlite3_mem_methods].</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_MALLOC_SIZE</dt>
+** <dd>This parameter records the largest memory allocation request
+** handed to [sqlite3_malloc()] or [sqlite3_realloc()] (or their
+** internal equivalents).  Only the value returned in the
+** *pHighwater parameter to [sqlite3_status()] is of interest.
+** The value written into the *pCurrent parameter is undefined.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_MALLOC_COUNT</dt>
+** <dd>This parameter records the number of separate memory allocations
+** currently checked out.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PAGECACHE_USED</dt>
+** <dd>This parameter returns the number of pages used out of the
+** [pagecache memory allocator] that was configured using
+** [SQLITE_CONFIG_PAGECACHE].  The
+** value returned is in pages, not in bytes.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PAGECACHE_OVERFLOW</dt>
+** <dd>This parameter returns the number of bytes of page cache
+** allocation which could not be satisfied by the [SQLITE_CONFIG_PAGECACHE]
+** buffer and where forced to overflow to [sqlite3_malloc()].  The
+** returned value includes allocations that overflowed because they
+** where too large (they were larger than the "sz" parameter to
+** [SQLITE_CONFIG_PAGECACHE]) and allocations that overflowed because
+** no space was left in the page cache.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PAGECACHE_SIZE</dt>
+** <dd>This parameter records the largest memory allocation request
+** handed to [pagecache memory allocator].  Only the value returned in the
+** *pHighwater parameter to [sqlite3_status()] is of interest.
+** The value written into the *pCurrent parameter is undefined.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_SCRATCH_USED</dt>
+** <dd>This parameter returns the number of allocations used out of the
+** [scratch memory allocator] configured using
+** [SQLITE_CONFIG_SCRATCH].  The value returned is in allocations, not
+** in bytes.  Since a single thread may only have one scratch allocation
+** outstanding at time, this parameter also reports the number of threads
+** using scratch memory at the same time.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_SCRATCH_OVERFLOW</dt>
+** <dd>This parameter returns the number of bytes of scratch memory
+** allocation which could not be satisfied by the [SQLITE_CONFIG_SCRATCH]
+** buffer and where forced to overflow to [sqlite3_malloc()].  The values
+** returned include overflows because the requested allocation was too
+** larger (that is, because the requested allocation was larger than the
+** "sz" parameter to [SQLITE_CONFIG_SCRATCH]) and because no scratch buffer
+** slots were available.
+** </dd>)^
+**
+** ^(<dt>SQLITE_STATUS_SCRATCH_SIZE</dt>
+** <dd>This parameter records the largest memory allocation request
+** handed to [scratch memory allocator].  Only the value returned in the
+** *pHighwater parameter to [sqlite3_status()] is of interest.
+** The value written into the *pCurrent parameter is undefined.</dd>)^
+**
+** ^(<dt>SQLITE_STATUS_PARSER_STACK</dt>
+** <dd>This parameter records the deepest parser stack.  It is only
+** meaningful if SQLite is compiled with [YYTRACKMAXSTACKDEPTH].</dd>)^
+** </dl>
+**
+** New status parameters may be added from time to time.
+*/
+#define SQLITE_STATUS_MEMORY_USED          0
+#define SQLITE_STATUS_PAGECACHE_USED       1
+#define SQLITE_STATUS_PAGECACHE_OVERFLOW   2
+#define SQLITE_STATUS_SCRATCH_USED         3
+#define SQLITE_STATUS_SCRATCH_OVERFLOW     4
+#define SQLITE_STATUS_MALLOC_SIZE          5
+#define SQLITE_STATUS_PARSER_STACK         6
+#define SQLITE_STATUS_PAGECACHE_SIZE       7
+#define SQLITE_STATUS_SCRATCH_SIZE         8
+#define SQLITE_STATUS_MALLOC_COUNT         9
+
+/*
+** CAPI3REF: Database Connection Status
+**
+** ^This interface is used to retrieve runtime status information
+** about a single [database connection].  ^The first argument is the
+** database connection object to be interrogated.  ^The second argument
+** is an integer constant, taken from the set of
+** [SQLITE_DBSTATUS_LOOKASIDE_USED | SQLITE_DBSTATUS_*] macros, that
+** determines the parameter to interrogate.  The set of
+** [SQLITE_DBSTATUS_LOOKASIDE_USED | SQLITE_DBSTATUS_*] macros is likely
+** to grow in future releases of SQLite.
+**
+** ^The current value of the requested parameter is written into *pCur
+** and the highest instantaneous value is written into *pHiwtr.  ^If
+** the resetFlg is true, then the highest instantaneous value is
+** reset back down to the current value.
+**
+** ^The sqlite3_db_status() routine returns SQLITE_OK on success and a
+** non-zero [error code] on failure.
+**
+** See also: [sqlite3_status()] and [sqlite3_stmt_status()].
+*/
+SQLITE_API int sqlite3_db_status(sqlite3*, int op, int *pCur, int *pHiwtr, int resetFlg);
+
+/*
+** CAPI3REF: Status Parameters for database connections
+**
+** These constants are the available integer "verbs" that can be passed as
+** the second argument to the [sqlite3_db_status()] interface.
+**
+** New verbs may be added in future releases of SQLite. Existing verbs
+** might be discontinued. Applications should check the return code from
+** [sqlite3_db_status()] to make sure that the call worked.
+** The [sqlite3_db_status()] interface will return a non-zero error code
+** if a discontinued or unsupported verb is invoked.
+**
+** <dl>
+** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_USED</dt>
+** <dd>This parameter returns the number of lookaside memory slots currently
+** checked out.</dd>)^
+**
+** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_HIT</dt>
+** <dd>This parameter returns the number malloc attempts that were
+** satisfied using lookaside memory. Only the high-water value is meaningful;
+** the current value is always zero.)^
+**
+** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE</dt>
+** <dd>This parameter returns the number malloc attempts that might have
+** been satisfied using lookaside memory but failed due to the amount of
+** memory requested being larger than the lookaside slot size.
+** Only the high-water value is meaningful;
+** the current value is always zero.)^
+**
+** ^(<dt>SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL</dt>
+** <dd>This parameter returns the number malloc attempts that might have
+** been satisfied using lookaside memory but failed due to all lookaside
+** memory already being in use.
+** Only the high-water value is meaningful;
+** the current value is always zero.)^
+**
+** ^(<dt>SQLITE_DBSTATUS_CACHE_USED</dt>
+** <dd>This parameter returns the approximate number of of bytes of heap
+** memory used by all pager caches associated with the database connection.)^
+** ^The highwater mark associated with SQLITE_DBSTATUS_CACHE_USED is always 0.
+**
+** ^(<dt>SQLITE_DBSTATUS_SCHEMA_USED</dt>
+** <dd>This parameter returns the approximate number of of bytes of heap
+** memory used to store the schema for all databases associated
+** with the connection - main, temp, and any [ATTACH]-ed databases.)^
+** ^The full amount of memory used by the schemas is reported, even if the
+** schema memory is shared with other database connections due to
+** [shared cache mode] being enabled.
+** ^The highwater mark associated with SQLITE_DBSTATUS_SCHEMA_USED is always 0.
+**
+** ^(<dt>SQLITE_DBSTATUS_STMT_USED</dt>
+** <dd>This parameter returns the approximate number of of bytes of heap
+** and lookaside memory used by all prepared statements associated with
+** the database connection.)^
+** ^The highwater mark associated with SQLITE_DBSTATUS_STMT_USED is always 0.
+** </dd>
+** </dl>
+*/
+#define SQLITE_DBSTATUS_LOOKASIDE_USED       0
+#define SQLITE_DBSTATUS_CACHE_USED           1
+#define SQLITE_DBSTATUS_SCHEMA_USED          2
+#define SQLITE_DBSTATUS_STMT_USED            3
+#define SQLITE_DBSTATUS_LOOKASIDE_HIT        4
+#define SQLITE_DBSTATUS_LOOKASIDE_MISS_SIZE  5
+#define SQLITE_DBSTATUS_LOOKASIDE_MISS_FULL  6
+#define SQLITE_DBSTATUS_MAX                  6   /* Largest defined DBSTATUS */
+
+
+/*
+** CAPI3REF: Prepared Statement Status
+**
+** ^(Each prepared statement maintains various
+** [SQLITE_STMTSTATUS_SORT | counters] that measure the number
+** of times it has performed specific operations.)^  These counters can
+** be used to monitor the performance characteristics of the prepared
+** statements.  For example, if the number of table steps greatly exceeds
+** the number of table searches or result rows, that would tend to indicate
+** that the prepared statement is using a full table scan rather than
+** an index.
+**
+** ^(This interface is used to retrieve and reset counter values from
+** a [prepared statement].  The first argument is the prepared statement
+** object to be interrogated.  The second argument
+** is an integer code for a specific [SQLITE_STMTSTATUS_SORT | counter]
+** to be interrogated.)^
+** ^The current value of the requested counter is returned.
+** ^If the resetFlg is true, then the counter is reset to zero after this
+** interface call returns.
+**
+** See also: [sqlite3_status()] and [sqlite3_db_status()].
+*/
+SQLITE_API int sqlite3_stmt_status(sqlite3_stmt*, int op,int resetFlg);
+
+/*
+** CAPI3REF: Status Parameters for prepared statements
+**
+** These preprocessor macros define integer codes that name counter
+** values associated with the [sqlite3_stmt_status()] interface.
+** The meanings of the various counters are as follows:
+**
+** <dl>
+** <dt>SQLITE_STMTSTATUS_FULLSCAN_STEP</dt>
+** <dd>^This is the number of times that SQLite has stepped forward in
+** a table as part of a full table scan.  Large numbers for this counter
+** may indicate opportunities for performance improvement through
+** careful use of indices.</dd>
+**
+** <dt>SQLITE_STMTSTATUS_SORT</dt>
+** <dd>^This is the number of sort operations that have occurred.
+** A non-zero value in this counter may indicate an opportunity to
+** improvement performance through careful use of indices.</dd>
+**
+** <dt>SQLITE_STMTSTATUS_AUTOINDEX</dt>
+** <dd>^This is the number of rows inserted into transient indices that
+** were created automatically in order to help joins run faster.
+** A non-zero value in this counter may indicate an opportunity to
+** improvement performance by adding permanent indices that do not
+** need to be reinitialized each time the statement is run.</dd>
+**
+** </dl>
+*/
+#define SQLITE_STMTSTATUS_FULLSCAN_STEP     1
+#define SQLITE_STMTSTATUS_SORT              2
+#define SQLITE_STMTSTATUS_AUTOINDEX         3
+
+/*
+** CAPI3REF: Custom Page Cache Object
+**
+** The sqlite3_pcache type is opaque.  It is implemented by
+** the pluggable module.  The SQLite core has no knowledge of
+** its size or internal structure and never deals with the
+** sqlite3_pcache object except by holding and passing pointers
+** to the object.
+**
+** See [sqlite3_pcache_methods] for additional information.
+*/
+typedef struct sqlite3_pcache sqlite3_pcache;
+
+/*
+** CAPI3REF: Application Defined Page Cache.
+** KEYWORDS: {page cache}
+**
+** ^(The [sqlite3_config]([SQLITE_CONFIG_PCACHE], ...) interface can
+** register an alternative page cache implementation by passing in an
+** instance of the sqlite3_pcache_methods structure.)^
+** In many applications, most of the heap memory allocated by
+** SQLite is used for the page cache.
+** By implementing a
+** custom page cache using this API, an application can better control
+** the amount of memory consumed by SQLite, the way in which
+** that memory is allocated and released, and the policies used to
+** determine exactly which parts of a database file are cached and for
+** how long.
+**
+** The alternative page cache mechanism is an
+** extreme measure that is only needed by the most demanding applications.
+** The built-in page cache is recommended for most uses.
+**
+** ^(The contents of the sqlite3_pcache_methods structure are copied to an
+** internal buffer by SQLite within the call to [sqlite3_config].  Hence
+** the application may discard the parameter after the call to
+** [sqlite3_config()] returns.)^
+**
+** ^(The xInit() method is called once for each effective
+** call to [sqlite3_initialize()])^
+** (usually only once during the lifetime of the process). ^(The xInit()
+** method is passed a copy of the sqlite3_pcache_methods.pArg value.)^
+** The intent of the xInit() method is to set up global data structures
+** required by the custom page cache implementation.
+** ^(If the xInit() method is NULL, then the
+** built-in default page cache is used instead of the application defined
+** page cache.)^
+**
+** ^The xShutdown() method is called by [sqlite3_shutdown()].
+** It can be used to clean up
+** any outstanding resources before process shutdown, if required.
+** ^The xShutdown() method may be NULL.
+**
+** ^SQLite automatically serializes calls to the xInit method,
+** so the xInit method need not be threadsafe.  ^The
+** xShutdown method is only called from [sqlite3_shutdown()] so it does
+** not need to be threadsafe either.  All other methods must be threadsafe
+** in multithreaded applications.
+**
+** ^SQLite will never invoke xInit() more than once without an intervening
+** call to xShutdown().
+**
+** ^SQLite invokes the xCreate() method to construct a new cache instance.
+** SQLite will typically create one cache instance for each open database file,
+** though this is not guaranteed. ^The
+** first parameter, szPage, is the size in bytes of the pages that must
+** be allocated by the cache.  ^szPage will not be a power of two.  ^szPage
+** will the page size of the database file that is to be cached plus an
+** increment (here called "R") of less than 250.  SQLite will use the
+** extra R bytes on each page to store metadata about the underlying
+** database page on disk.  The value of R depends
+** on the SQLite version, the target platform, and how SQLite was compiled.
+** ^(R is constant for a particular build of SQLite. Except, there are two
+** distinct values of R when SQLite is compiled with the proprietary
+** ZIPVFS extension.)^  ^The second argument to
+** xCreate(), bPurgeable, is true if the cache being created will
+** be used to cache database pages of a file stored on disk, or
+** false if it is used for an in-memory database. The cache implementation
+** does not have to do anything special based with the value of bPurgeable;
+** it is purely advisory.  ^On a cache where bPurgeable is false, SQLite will
+** never invoke xUnpin() except to deliberately delete a page.
+** ^In other words, calls to xUnpin() on a cache with bPurgeable set to
+** false will always have the "discard" flag set to true.
+** ^Hence, a cache created with bPurgeable false will
+** never contain any unpinned pages.
+**
+** ^(The xCachesize() method may be called at any time by SQLite to set the
+** suggested maximum cache-size (number of pages stored by) the cache
+** instance passed as the first argument. This is the value configured using
+** the SQLite "[PRAGMA cache_size]" command.)^  As with the bPurgeable
+** parameter, the implementation is not required to do anything with this
+** value; it is advisory only.
+**
+** The xPagecount() method must return the number of pages currently
+** stored in the cache, both pinned and unpinned.
+**
+** The xFetch() method locates a page in the cache and returns a pointer to
+** the page, or a NULL pointer.
+** A "page", in this context, means a buffer of szPage bytes aligned at an
+** 8-byte boundary. The page to be fetched is determined by the key. ^The
+** mimimum key value is 1.  After it has been retrieved using xFetch, the page
+** is considered to be "pinned".
+**
+** If the requested page is already in the page cache, then the page cache
+** implementation must return a pointer to the page buffer with its content
+** intact.  If the requested page is not already in the cache, then the
+** cache implementation should use the value of the createFlag
+** parameter to help it determined what action to take:
+**
+** <table border=1 width=85% align=center>
+** <tr><th> createFlag <th> Behaviour when page is not already in cache
+** <tr><td> 0 <td> Do not allocate a new page.  Return NULL.
+** <tr><td> 1 <td> Allocate a new page if it easy and convenient to do so.
+**                 Otherwise return NULL.
+** <tr><td> 2 <td> Make every effort to allocate a new page.  Only return
+**                 NULL if allocating a new page is effectively impossible.
+** </table>
+**
+** ^(SQLite will normally invoke xFetch() with a createFlag of 0 or 1.  SQLite
+** will only use a createFlag of 2 after a prior call with a createFlag of 1
+** failed.)^  In between the to xFetch() calls, SQLite may
+** attempt to unpin one or more cache pages by spilling the content of
+** pinned pages to disk and synching the operating system disk cache.
+**
+** ^xUnpin() is called by SQLite with a pointer to a currently pinned page
+** as its second argument.  If the third parameter, discard, is non-zero,
+** then the page must be evicted from the cache.
+** ^If the discard parameter is
+** zero, then the page may be discarded or retained at the discretion of
+** page cache implementation. ^The page cache implementation
+** may choose to evict unpinned pages at any time.
+**
+** The cache must not perform any reference counting. A single
+** call to xUnpin() unpins the page regardless of the number of prior calls
+** to xFetch().
+**
+** The xRekey() method is used to change the key value associated with the
+** page passed as the second argument. If the cache
+** previously contains an entry associated with newKey, it must be
+** discarded. ^Any prior cache entry associated with newKey is guaranteed not
+** to be pinned.
+**
+** When SQLite calls the xTruncate() method, the cache must discard all
+** existing cache entries with page numbers (keys) greater than or equal
+** to the value of the iLimit parameter passed to xTruncate(). If any
+** of these pages are pinned, they are implicitly unpinned, meaning that
+** they can be safely discarded.
+**
+** ^The xDestroy() method is used to delete a cache allocated by xCreate().
+** All resources associated with the specified cache should be freed. ^After
+** calling the xDestroy() method, SQLite considers the [sqlite3_pcache*]
+** handle invalid, and will not use it with any other sqlite3_pcache_methods
+** functions.
+*/
+typedef struct sqlite3_pcache_methods sqlite3_pcache_methods;
+struct sqlite3_pcache_methods {
+        void *pArg;
+        int (*xInit)(void*);
+        void (*xShutdown)(void*);
+        sqlite3_pcache *(*xCreate)(int szPage, int bPurgeable);
+        void (*xCachesize)(sqlite3_pcache*, int nCachesize);
+        int (*xPagecount)(sqlite3_pcache*);
+        void *(*xFetch)(sqlite3_pcache*, unsigned key, int createFlag);
+        void (*xUnpin)(sqlite3_pcache*, void*, int discard);
+        void (*xRekey)(sqlite3_pcache*, void*, unsigned oldKey, unsigned newKey);
+        void (*xTruncate)(sqlite3_pcache*, unsigned iLimit);
+        void (*xDestroy)(sqlite3_pcache*);
+};
+
+/*
+** CAPI3REF: Online Backup Object
+**
+** The sqlite3_backup object records state information about an ongoing
+** online backup operation.  ^The sqlite3_backup object is created by
+** a call to [sqlite3_backup_init()] and is destroyed by a call to
+** [sqlite3_backup_finish()].
+**
+** See Also: [Using the SQLite Online Backup API]
+*/
+typedef struct sqlite3_backup sqlite3_backup;
+
+/*
+** CAPI3REF: Online Backup API.
+**
+** The backup API copies the content of one database into another.
+** It is useful either for creating backups of databases or
+** for copying in-memory databases to or from persistent files.
+**
+** See Also: [Using the SQLite Online Backup API]
+**
+** ^SQLite holds a write transaction open on the destination database file
+** for the duration of the backup operation.
+** ^The source database is read-locked only while it is being read;
+** it is not locked continuously for the entire backup operation.
+** ^Thus, the backup may be performed on a live source database without
+** preventing other database connections from
+** reading or writing to the source database while the backup is underway.
+**
+** ^(To perform a backup operation:
+**   <ol>
+**     <li><b>sqlite3_backup_init()</b> is called once to initialize the
+**         backup,
+**     <li><b>sqlite3_backup_step()</b> is called one or more times to transfer
+**         the data between the two databases, and finally
+**     <li><b>sqlite3_backup_finish()</b> is called to release all resources
+**         associated with the backup operation.
+**   </ol>)^
+** There should be exactly one call to sqlite3_backup_finish() for each
+** successful call to sqlite3_backup_init().
+**
+** <b>sqlite3_backup_init()</b>
+**
+** ^The D and N arguments to sqlite3_backup_init(D,N,S,M) are the
+** [database connection] associated with the destination database
+** and the database name, respectively.
+** ^The database name is "main" for the main database, "temp" for the
+** temporary database, or the name specified after the AS keyword in
+** an [ATTACH] statement for an attached database.
+** ^The S and M arguments passed to
+** sqlite3_backup_init(D,N,S,M) identify the [database connection]
+** and database name of the source database, respectively.
+** ^The source and destination [database connections] (parameters S and D)
+** must be different or else sqlite3_backup_init(D,N,S,M) will fail with
+** an error.
+**
+** ^If an error occurs within sqlite3_backup_init(D,N,S,M), then NULL is
+** returned and an error code and error message are stored in the
+** destination [database connection] D.
+** ^The error code and message for the failed call to sqlite3_backup_init()
+** can be retrieved using the [sqlite3_errcode()], [sqlite3_errmsg()], and/or
+** [sqlite3_errmsg16()] functions.
+** ^A successful call to sqlite3_backup_init() returns a pointer to an
+** [sqlite3_backup] object.
+** ^The [sqlite3_backup] object may be used with the sqlite3_backup_step() and
+** sqlite3_backup_finish() functions to perform the specified backup
+** operation.
+**
+** <b>sqlite3_backup_step()</b>
+**
+** ^Function sqlite3_backup_step(B,N) will copy up to N pages between
+** the source and destination databases specified by [sqlite3_backup] object B.
+** ^If N is negative, all remaining source pages are copied.
+** ^If sqlite3_backup_step(B,N) successfully copies N pages and there
+** are still more pages to be copied, then the function returns [SQLITE_OK].
+** ^If sqlite3_backup_step(B,N) successfully finishes copying all pages
+** from source to destination, then it returns [SQLITE_DONE].
+** ^If an error occurs while running sqlite3_backup_step(B,N),
+** then an [error code] is returned. ^As well as [SQLITE_OK] and
+** [SQLITE_DONE], a call to sqlite3_backup_step() may return [SQLITE_READONLY],
+** [SQLITE_NOMEM], [SQLITE_BUSY], [SQLITE_LOCKED], or an
+** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX] extended error code.
+**
+** ^(The sqlite3_backup_step() might return [SQLITE_READONLY] if
+** <ol>
+** <li> the destination database was opened read-only, or
+** <li> the destination database is using write-ahead-log journaling
+** and the destination and source page sizes differ, or
+** <li> the destination database is an in-memory database and the
+** destination and source page sizes differ.
+** </ol>)^
+**
+** ^If sqlite3_backup_step() cannot obtain a required file-system lock, then
+** the [sqlite3_busy_handler | busy-handler function]
+** is invoked (if one is specified). ^If the
+** busy-handler returns non-zero before the lock is available, then
+** [SQLITE_BUSY] is returned to the caller. ^In this case the call to
+** sqlite3_backup_step() can be retried later. ^If the source
+** [database connection]
+** is being used to write to the source database when sqlite3_backup_step()
+** is called, then [SQLITE_LOCKED] is returned immediately. ^Again, in this
+** case the call to sqlite3_backup_step() can be retried later on. ^(If
+** [SQLITE_IOERR_ACCESS | SQLITE_IOERR_XXX], [SQLITE_NOMEM], or
+** [SQLITE_READONLY] is returned, then
+** there is no point in retrying the call to sqlite3_backup_step(). These
+** errors are considered fatal.)^  The application must accept
+** that the backup operation has failed and pass the backup operation handle
+** to the sqlite3_backup_finish() to release associated resources.
+**
+** ^The first call to sqlite3_backup_step() obtains an exclusive lock
+** on the destination file. ^The exclusive lock is not released until either
+** sqlite3_backup_finish() is called or the backup operation is complete
+** and sqlite3_backup_step() returns [SQLITE_DONE].  ^Every call to
+** sqlite3_backup_step() obtains a [shared lock] on the source database that
+** lasts for the duration of the sqlite3_backup_step() call.
+** ^Because the source database is not locked between calls to
+** sqlite3_backup_step(), the source database may be modified mid-way
+** through the backup process.  ^If the source database is modified by an
+** external process or via a database connection other than the one being
+** used by the backup operation, then the backup will be automatically
+** restarted by the next call to sqlite3_backup_step(). ^If the source
+** database is modified by the using the same database connection as is used
+** by the backup operation, then the backup database is automatically
+** updated at the same time.
+**
+** <b>sqlite3_backup_finish()</b>
+**
+** When sqlite3_backup_step() has returned [SQLITE_DONE], or when the
+** application wishes to abandon the backup operation, the application
+** should destroy the [sqlite3_backup] by passing it to sqlite3_backup_finish().
+** ^The sqlite3_backup_finish() interfaces releases all
+** resources associated with the [sqlite3_backup] object.
+** ^If sqlite3_backup_step() has not yet returned [SQLITE_DONE], then any
+** active write-transaction on the destination database is rolled back.
+** The [sqlite3_backup] object is invalid
+** and may not be used following a call to sqlite3_backup_finish().
+**
+** ^The value returned by sqlite3_backup_finish is [SQLITE_OK] if no
+** sqlite3_backup_step() errors occurred, regardless or whether or not
+** sqlite3_backup_step() completed.
+** ^If an out-of-memory condition or IO error occurred during any prior
+** sqlite3_backup_step() call on the same [sqlite3_backup] object, then
+** sqlite3_backup_finish() returns the corresponding [error code].
+**
+** ^A return of [SQLITE_BUSY] or [SQLITE_LOCKED] from sqlite3_backup_step()
+** is not a permanent error and does not affect the return value of
+** sqlite3_backup_finish().
+**
+** <b>sqlite3_backup_remaining(), sqlite3_backup_pagecount()</b>
+**
+** ^Each call to sqlite3_backup_step() sets two values inside
+** the [sqlite3_backup] object: the number of pages still to be backed
+** up and the total number of pages in the source database file.
+** The sqlite3_backup_remaining() and sqlite3_backup_pagecount() interfaces
+** retrieve these two values, respectively.
+**
+** ^The values returned by these functions are only updated by
+** sqlite3_backup_step(). ^If the source database is modified during a backup
+** operation, then the values are not updated to account for any extra
+** pages that need to be updated or the size of the source database file
+** changing.
+**
+** <b>Concurrent Usage of Database Handles</b>
+**
+** ^The source [database connection] may be used by the application for other
+** purposes while a backup operation is underway or being initialized.
+** ^If SQLite is compiled and configured to support threadsafe database
+** connections, then the source database connection may be used concurrently
+** from within other threads.
+**
+** However, the application must guarantee that the destination
+** [database connection] is not passed to any other API (by any thread) after
+** sqlite3_backup_init() is called and before the corresponding call to
+** sqlite3_backup_finish().  SQLite does not currently check to see
+** if the application incorrectly accesses the destination [database connection]
+** and so no error code is reported, but the operations may malfunction
+** nevertheless.  Use of the destination database connection while a
+** backup is in progress might also also cause a mutex deadlock.
+**
+** If running in [shared cache mode], the application must
+** guarantee that the shared cache used by the destination database
+** is not accessed while the backup is running. In practice this means
+** that the application must guarantee that the disk file being
+** backed up to is not accessed by any connection within the process,
+** not just the specific connection that was passed to sqlite3_backup_init().
+**
+** The [sqlite3_backup] object itself is partially threadsafe. Multiple
+** threads may safely make multiple concurrent calls to sqlite3_backup_step().
+** However, the sqlite3_backup_remaining() and sqlite3_backup_pagecount()
+** APIs are not strictly speaking threadsafe. If they are invoked at the
+** same time as another thread is invoking sqlite3_backup_step() it is
+** possible that they return invalid values.
+*/
+SQLITE_API sqlite3_backup *sqlite3_backup_init(
+        sqlite3 *pDest,                        /* Destination database handle */
+        const char *zDestName,                 /* Destination database name */
+        sqlite3 *pSource,                      /* Source database handle */
+        const char *zSourceName                /* Source database name */
+);
+SQLITE_API int sqlite3_backup_step(sqlite3_backup *p, int nPage);
+SQLITE_API int sqlite3_backup_finish(sqlite3_backup *p);
+SQLITE_API int sqlite3_backup_remaining(sqlite3_backup *p);
+SQLITE_API int sqlite3_backup_pagecount(sqlite3_backup *p);
+
+/*
+** CAPI3REF: Unlock Notification
+**
+** ^When running in shared-cache mode, a database operation may fail with
+** an [SQLITE_LOCKED] error if the required locks on the shared-cache or
+** individual tables within the shared-cache cannot be obtained. See
+** [SQLite Shared-Cache Mode] for a description of shared-cache locking.
+** ^This API may be used to register a callback that SQLite will invoke
+** when the connection currently holding the required lock relinquishes it.
+** ^This API is only available if the library was compiled with the
+** [SQLITE_ENABLE_UNLOCK_NOTIFY] C-preprocessor symbol defined.
+**
+** See Also: [Using the SQLite Unlock Notification Feature].
+**
+** ^Shared-cache locks are released when a database connection concludes
+** its current transaction, either by committing it or rolling it back.
+**
+** ^When a connection (known as the blocked connection) fails to obtain a
+** shared-cache lock and SQLITE_LOCKED is returned to the caller, the
+** identity of the database connection (the blocking connection) that
+** has locked the required resource is stored internally. ^After an
+** application receives an SQLITE_LOCKED error, it may call the
+** sqlite3_unlock_notify() method with the blocked connection handle as
+** the first argument to register for a callback that will be invoked
+** when the blocking connections current transaction is concluded. ^The
+** callback is invoked from within the [sqlite3_step] or [sqlite3_close]
+** call that concludes the blocking connections transaction.
+**
+** ^(If sqlite3_unlock_notify() is called in a multi-threaded application,
+** there is a chance that the blocking connection will have already
+** concluded its transaction by the time sqlite3_unlock_notify() is invoked.
+** If this happens, then the specified callback is invoked immediately,
+** from within the call to sqlite3_unlock_notify().)^
+**
+** ^If the blocked connection is attempting to obtain a write-lock on a
+** shared-cache table, and more than one other connection currently holds
+** a read-lock on the same table, then SQLite arbitrarily selects one of
+** the other connections to use as the blocking connection.
+**
+** ^(There may be at most one unlock-notify callback registered by a
+** blocked connection. If sqlite3_unlock_notify() is called when the
+** blocked connection already has a registered unlock-notify callback,
+** then the new callback replaces the old.)^ ^If sqlite3_unlock_notify() is
+** called with a NULL pointer as its second argument, then any existing
+** unlock-notify callback is canceled. ^The blocked connections
+** unlock-notify callback may also be canceled by closing the blocked
+** connection using [sqlite3_close()].
+**
+** The unlock-notify callback is not reentrant. If an application invokes
+** any sqlite3_xxx API functions from within an unlock-notify callback, a
+** crash or deadlock may be the result.
+**
+** ^Unless deadlock is detected (see below), sqlite3_unlock_notify() always
+** returns SQLITE_OK.
+**
+** <b>Callback Invocation Details</b>
+**
+** When an unlock-notify callback is registered, the application provides a
+** single void* pointer that is passed to the callback when it is invoked.
+** However, the signature of the callback function allows SQLite to pass
+** it an array of void* context pointers. The first argument passed to
+** an unlock-notify callback is a pointer to an array of void* pointers,
+** and the second is the number of entries in the array.
+**
+** When a blocking connections transaction is concluded, there may be
+** more than one blocked connection that has registered for an unlock-notify
+** callback. ^If two or more such blocked connections have specified the
+** same callback function, then instead of invoking the callback function
+** multiple times, it is invoked once with the set of void* context pointers
+** specified by the blocked connections bundled together into an array.
+** This gives the application an opportunity to prioritize any actions
+** related to the set of unblocked database connections.
+**
+** <b>Deadlock Detection</b>
+**
+** Assuming that after registering for an unlock-notify callback a
+** database waits for the callback to be issued before taking any further
+** action (a reasonable assumption), then using this API may cause the
+** application to deadlock. For example, if connection X is waiting for
+** connection Y's transaction to be concluded, and similarly connection
+** Y is waiting on connection X's transaction, then neither connection
+** will proceed and the system may remain deadlocked indefinitely.
+**
+** To avoid this scenario, the sqlite3_unlock_notify() performs deadlock
+** detection. ^If a given call to sqlite3_unlock_notify() would put the
+** system in a deadlocked state, then SQLITE_LOCKED is returned and no
+** unlock-notify callback is registered. The system is said to be in
+** a deadlocked state if connection A has registered for an unlock-notify
+** callback on the conclusion of connection B's transaction, and connection
+** B has itself registered for an unlock-notify callback when connection
+** A's transaction is concluded. ^Indirect deadlock is also detected, so
+** the system is also considered to be deadlocked if connection B has
+** registered for an unlock-notify callback on the conclusion of connection
+** C's transaction, where connection C is waiting on connection A. ^Any
+** number of levels of indirection are allowed.
+**
+** <b>The "DROP TABLE" Exception</b>
+**
+** When a call to [sqlite3_step()] returns SQLITE_LOCKED, it is almost
+** always appropriate to call sqlite3_unlock_notify(). There is however,
+** one exception. When executing a "DROP TABLE" or "DROP INDEX" statement,
+** SQLite checks if there are any currently executing SELECT statements
+** that belong to the same connection. If there are, SQLITE_LOCKED is
+** returned. In this case there is no "blocking connection", so invoking
+** sqlite3_unlock_notify() results in the unlock-notify callback being
+** invoked immediately. If the application then re-attempts the "DROP TABLE"
+** or "DROP INDEX" query, an infinite loop might be the result.
+**
+** One way around this problem is to check the extended error code returned
+** by an sqlite3_step() call. ^(If there is a blocking connection, then the
+** extended error code is set to SQLITE_LOCKED_SHAREDCACHE. Otherwise, in
+** the special "DROP TABLE/INDEX" case, the extended error code is just
+** SQLITE_LOCKED.)^
+*/
+SQLITE_API int sqlite3_unlock_notify(
+        sqlite3 *pBlocked,                          /* Waiting connection */
+        void (*xNotify)(void **apArg, int nArg),    /* Callback function to invoke */
+        void *pNotifyArg                            /* Argument to pass to xNotify */
+);
+
+
+/*
+** CAPI3REF: String Comparison
+**
+** ^The [sqlite3_strnicmp()] API allows applications and extensions to
+** compare the contents of two buffers containing UTF-8 strings in a
+** case-independent fashion, using the same definition of case independence
+** that SQLite uses internally when comparing identifiers.
+*/
+SQLITE_API int sqlite3_strnicmp(const char *, const char *, int);
+
+/*
+** CAPI3REF: Error Logging Interface
+**
+** ^The [sqlite3_log()] interface writes a message into the error log
+** established by the [SQLITE_CONFIG_LOG] option to [sqlite3_config()].
+** ^If logging is enabled, the zFormat string and subsequent arguments are
+** used with [sqlite3_snprintf()] to generate the final output string.
+**
+** The sqlite3_log() interface is intended for use by extensions such as
+** virtual tables, collating functions, and SQL functions.  While there is
+** nothing to prevent an application from calling sqlite3_log(), doing so
+** is considered bad form.
+**
+** The zFormat string must not be NULL.
+**
+** To avoid deadlocks and other threading problems, the sqlite3_log() routine
+** will not use dynamically allocated memory.  The log message is stored in
+** a fixed-length buffer on the stack.  If the log message is longer than
+** a few hundred characters, it will be truncated to the length of the
+** buffer.
+*/
+SQLITE_API void sqlite3_log(int iErrCode, const char *zFormat, ...);
+
+/*
+** CAPI3REF: Write-Ahead Log Commit Hook
+**
+** ^The [sqlite3_wal_hook()] function is used to register a callback that
+** will be invoked each time a database connection commits data to a
+** [write-ahead log] (i.e. whenever a transaction is committed in
+** [journal_mode | journal_mode=WAL mode]).
+**
+** ^The callback is invoked by SQLite after the commit has taken place and
+** the associated write-lock on the database released, so the implementation
+** may read, write or [checkpoint] the database as required.
+**
+** ^The first parameter passed to the callback function when it is invoked
+** is a copy of the third parameter passed to sqlite3_wal_hook() when
+** registering the callback. ^The second is a copy of the database handle.
+** ^The third parameter is the name of the database that was written to -
+** either "main" or the name of an [ATTACH]-ed database. ^The fourth parameter
+** is the number of pages currently in the write-ahead log file,
+** including those that were just committed.
+**
+** The callback function should normally return [SQLITE_OK].  ^If an error
+** code is returned, that error will propagate back up through the
+** SQLite code base to cause the statement that provoked the callback
+** to report an error, though the commit will have still occurred. If the
+** callback returns [SQLITE_ROW] or [SQLITE_DONE], or if it returns a value
+** that does not correspond to any valid SQLite error code, the results
+** are undefined.
+**
+** A single database handle may have at most a single write-ahead log callback
+** registered at one time. ^Calling [sqlite3_wal_hook()] replaces any
+** previously registered write-ahead log callback. ^Note that the
+** [sqlite3_wal_autocheckpoint()] interface and the
+** [wal_autocheckpoint pragma] both invoke [sqlite3_wal_hook()] and will
+** those overwrite any prior [sqlite3_wal_hook()] settings.
+*/
+SQLITE_API void *sqlite3_wal_hook(
+        sqlite3*,
+        int(*)(void *,sqlite3*,const char*,int),
+        void*
+);
+
+/*
+** CAPI3REF: Configure an auto-checkpoint
+**
+** ^The [sqlite3_wal_autocheckpoint(D,N)] is a wrapper around
+** [sqlite3_wal_hook()] that causes any database on [database connection] D
+** to automatically [checkpoint]
+** after committing a transaction if there are N or
+** more frames in the [write-ahead log] file.  ^Passing zero or
+** a negative value as the nFrame parameter disables automatic
+** checkpoints entirely.
+**
+** ^The callback registered by this function replaces any existing callback
+** registered using [sqlite3_wal_hook()].  ^Likewise, registering a callback
+** using [sqlite3_wal_hook()] disables the automatic checkpoint mechanism
+** configured by this function.
+**
+** ^The [wal_autocheckpoint pragma] can be used to invoke this interface
+** from SQL.
+**
+** ^Every new [database connection] defaults to having the auto-checkpoint
+** enabled with a threshold of 1000 or [SQLITE_DEFAULT_WAL_AUTOCHECKPOINT]
+** pages.  The use of this interface
+** is only necessary if the default setting is found to be suboptimal
+** for a particular application.
+*/
+SQLITE_API int sqlite3_wal_autocheckpoint(sqlite3 *db, int N);
+
+/*
+** CAPI3REF: Checkpoint a database
+**
+** ^The [sqlite3_wal_checkpoint(D,X)] interface causes database named X
+** on [database connection] D to be [checkpointed].  ^If X is NULL or an
+** empty string, then a checkpoint is run on all databases of
+** connection D.  ^If the database connection D is not in
+** [WAL | write-ahead log mode] then this interface is a harmless no-op.
+**
+** ^The [wal_checkpoint pragma] can be used to invoke this interface
+** from SQL.  ^The [sqlite3_wal_autocheckpoint()] interface and the
+** [wal_autocheckpoint pragma] can be used to cause this interface to be
+** run whenever the WAL reaches a certain size threshold.
+**
+** See also: [sqlite3_wal_checkpoint_v2()]
+*/
+SQLITE_API int sqlite3_wal_checkpoint(sqlite3 *db, const char *zDb);
+
+/*
+** CAPI3REF: Checkpoint a database
+**
+** Run a checkpoint operation on WAL database zDb attached to database
+** handle db. The specific operation is determined by the value of the
+** eMode parameter:
+**
+** <dl>
+** <dt>SQLITE_CHECKPOINT_PASSIVE<dd>
+**   Checkpoint as many frames as possible without waiting for any database
+**   readers or writers to finish. Sync the db file if all frames in the log
+**   are checkpointed. This mode is the same as calling
+**   sqlite3_wal_checkpoint(). The busy-handler callback is never invoked.
+**
+** <dt>SQLITE_CHECKPOINT_FULL<dd>
+**   This mode blocks (calls the busy-handler callback) until there is no
+**   database writer and all readers are reading from the most recent database
+**   snapshot. It then checkpoints all frames in the log file and syncs the
+**   database file. This call blocks database writers while it is running,
+**   but not database readers.
+**
+** <dt>SQLITE_CHECKPOINT_RESTART<dd>
+**   This mode works the same way as SQLITE_CHECKPOINT_FULL, except after
+**   checkpointing the log file it blocks (calls the busy-handler callback)
+**   until all readers are reading from the database file only. This ensures
+**   that the next client to write to the database file restarts the log file
+**   from the beginning. This call blocks database writers while it is running,
+**   but not database readers.
+** </dl>
+**
+** If pnLog is not NULL, then *pnLog is set to the total number of frames in
+** the log file before returning. If pnCkpt is not NULL, then *pnCkpt is set to
+** the total number of checkpointed frames (including any that were already
+** checkpointed when this function is called). *pnLog and *pnCkpt may be
+** populated even if sqlite3_wal_checkpoint_v2() returns other than SQLITE_OK.
+** If no values are available because of an error, they are both set to -1
+** before returning to communicate this to the caller.
+**
+** All calls obtain an exclusive "checkpoint" lock on the database file. If
+** any other process is running a checkpoint operation at the same time, the
+** lock cannot be obtained and SQLITE_BUSY is returned. Even if there is a
+** busy-handler configured, it will not be invoked in this case.
+**
+** The SQLITE_CHECKPOINT_FULL and RESTART modes also obtain the exclusive
+** "writer" lock on the database file. If the writer lock cannot be obtained
+** immediately, and a busy-handler is configured, it is invoked and the writer
+** lock retried until either the busy-handler returns 0 or the lock is
+** successfully obtained. The busy-handler is also invoked while waiting for
+** database readers as described above. If the busy-handler returns 0 before
+** the writer lock is obtained or while waiting for database readers, the
+** checkpoint operation proceeds from that point in the same way as
+** SQLITE_CHECKPOINT_PASSIVE - checkpointing as many frames as possible
+** without blocking any further. SQLITE_BUSY is returned in this case.
+**
+** If parameter zDb is NULL or points to a zero length string, then the
+** specified operation is attempted on all WAL databases. In this case the
+** values written to output parameters *pnLog and *pnCkpt are undefined. If
+** an SQLITE_BUSY error is encountered when processing one or more of the
+** attached WAL databases, the operation is still attempted on any remaining
+** attached databases and SQLITE_BUSY is returned to the caller. If any other
+** error occurs while processing an attached database, processing is abandoned
+** and the error code returned to the caller immediately. If no error
+** (SQLITE_BUSY or otherwise) is encountered while processing the attached
+** databases, SQLITE_OK is returned.
+**
+** If database zDb is the name of an attached database that is not in WAL
+** mode, SQLITE_OK is returned and both *pnLog and *pnCkpt set to -1. If
+** zDb is not NULL (or a zero length string) and is not the name of any
+** attached database, SQLITE_ERROR is returned to the caller.
+*/
+SQLITE_API int sqlite3_wal_checkpoint_v2(
+        sqlite3 *db,                    /* Database handle */
+        const char *zDb,                /* Name of attached database (or NULL) */
+        int eMode,                      /* SQLITE_CHECKPOINT_* value */
+        int *pnLog,                     /* OUT: Size of WAL log in frames */
+        int *pnCkpt                     /* OUT: Total number of frames checkpointed */
+);
+
+/*
+** CAPI3REF: Checkpoint operation parameters
+**
+** These constants can be used as the 3rd parameter to
+** [sqlite3_wal_checkpoint_v2()].  See the [sqlite3_wal_checkpoint_v2()]
+** documentation for additional information about the meaning and use of
+** each of these values.
+*/
+#define SQLITE_CHECKPOINT_PASSIVE 0
+#define SQLITE_CHECKPOINT_FULL    1
+#define SQLITE_CHECKPOINT_RESTART 2
+
+
+/*
+** Undo the hack that converts floating point types to integer for
+** builds on processors without floating point support.
+*/
+#ifdef SQLITE_OMIT_FLOATING_POINT
+# undef double
+#endif
+
+#ifdef __cplusplus
+}  /* End of the 'extern "C"' block */
+#endif
+#endif
+
+/*
+** 2010 August 30
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+*/
+
+#ifndef _SQLITE3RTREE_H_
+#define _SQLITE3RTREE_H_
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+typedef struct sqlite3_rtree_geometry sqlite3_rtree_geometry;
+
+/*
+** Register a geometry callback named zGeom that can be used as part of an
+** R-Tree geometry query as follows:
+**
+**   SELECT ... FROM <rtree> WHERE <rtree col> MATCH $zGeom(... params ...)
+*/
+SQLITE_API int sqlite3_rtree_geometry_callback(
+        sqlite3 *db,
+        const char *zGeom,
+        int (*xGeom)(sqlite3_rtree_geometry *, int nCoord, double *aCoord, int *pRes),
+        void *pContext
+);
+
+
+/*
+** A pointer to a structure of the following type is passed as the first
+** argument to callbacks registered using rtree_geometry_callback().
+*/
+struct sqlite3_rtree_geometry {
+        void *pContext;                 /* Copy of pContext passed to s_r_g_c() */
+        int nParam;                     /* Size of array aParam[] */
+        double *aParam;                 /* Parameters passed to SQL geom function */
+        void *pUser;                    /* Callback implementation user data */
+        void (*xDelUser)(void *);       /* Called by SQLite to clean up pUser */
+};
+
+
+#ifdef __cplusplus
+}  /* end of the 'extern "C"' block */
+#endif
+
+#endif  /* ifndef _SQLITE3RTREE_H_ */
+
diff --git a/cadxcore/sqlite/sqlite3ext.h b/cadxcore/sqlite/sqlite3ext.h
new file mode 100644
index 0000000..80a3eb7
--- /dev/null
+++ b/cadxcore/sqlite/sqlite3ext.h
@@ -0,0 +1,420 @@
+/*
+** 2006 June 7
+**
+** The author disclaims copyright to this source code.  In place of
+** a legal notice, here is a blessing:
+**
+**    May you do good and not evil.
+**    May you find forgiveness for yourself and forgive others.
+**    May you share freely, never taking more than you give.
+**
+*************************************************************************
+** This header file defines the SQLite interface for use by
+** shared libraries that want to be imported as extensions into
+** an SQLite instance.  Shared libraries that intend to be loaded
+** as extensions by SQLite should #include this file instead of
+** sqlite3.h.
+*/
+#ifndef _SQLITE3EXT_H_
+#define _SQLITE3EXT_H_
+#include "sqlite3.h"
+
+typedef struct sqlite3_api_routines sqlite3_api_routines;
+
+/*
+** The following structure holds pointers to all of the SQLite API
+** routines.
+**
+** WARNING:  In order to maintain backwards compatibility, add new
+** interfaces to the end of this structure only.  If you insert new
+** interfaces in the middle of this structure, then older different
+** versions of SQLite will not be able to load each others' shared
+** libraries!
+*/
+struct sqlite3_api_routines {
+        void * (*aggregate_context)(sqlite3_context*,int nBytes);
+        int  (*aggregate_count)(sqlite3_context*);
+        int  (*bind_blob)(sqlite3_stmt*,int,const void*,int n,void(*)(void*));
+        int  (*bind_double)(sqlite3_stmt*,int,double);
+        int  (*bind_int)(sqlite3_stmt*,int,int);
+        int  (*bind_int64)(sqlite3_stmt*,int,sqlite_int64);
+        int  (*bind_null)(sqlite3_stmt*,int);
+        int  (*bind_parameter_count)(sqlite3_stmt*);
+        int  (*bind_parameter_index)(sqlite3_stmt*,const char*zName);
+        const char * (*bind_parameter_name)(sqlite3_stmt*,int);
+        int  (*bind_text)(sqlite3_stmt*,int,const char*,int n,void(*)(void*));
+        int  (*bind_text16)(sqlite3_stmt*,int,const void*,int,void(*)(void*));
+        int  (*bind_value)(sqlite3_stmt*,int,const sqlite3_value*);
+        int  (*busy_handler)(sqlite3*,int(*)(void*,int),void*);
+        int  (*busy_timeout)(sqlite3*,int ms);
+        int  (*changes)(sqlite3*);
+        int  (*close)(sqlite3*);
+        int  (*collation_needed)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const char*));
+        int  (*collation_needed16)(sqlite3*,void*,void(*)(void*,sqlite3*,int eTextRep,const void*));
+        const void * (*column_blob)(sqlite3_stmt*,int iCol);
+        int  (*column_bytes)(sqlite3_stmt*,int iCol);
+        int  (*column_bytes16)(sqlite3_stmt*,int iCol);
+        int  (*column_count)(sqlite3_stmt*pStmt);
+        const char * (*column_database_name)(sqlite3_stmt*,int);
+        const void * (*column_database_name16)(sqlite3_stmt*,int);
+        const char * (*column_decltype)(sqlite3_stmt*,int i);
+        const void * (*column_decltype16)(sqlite3_stmt*,int);
+        double  (*column_double)(sqlite3_stmt*,int iCol);
+        int  (*column_int)(sqlite3_stmt*,int iCol);
+        sqlite_int64  (*column_int64)(sqlite3_stmt*,int iCol);
+        const char * (*column_name)(sqlite3_stmt*,int);
+        const void * (*column_name16)(sqlite3_stmt*,int);
+        const char * (*column_origin_name)(sqlite3_stmt*,int);
+        const void * (*column_origin_name16)(sqlite3_stmt*,int);
+        const char * (*column_table_name)(sqlite3_stmt*,int);
+        const void * (*column_table_name16)(sqlite3_stmt*,int);
+        const unsigned char * (*column_text)(sqlite3_stmt*,int iCol);
+        const void * (*column_text16)(sqlite3_stmt*,int iCol);
+        int  (*column_type)(sqlite3_stmt*,int iCol);
+        sqlite3_value* (*column_value)(sqlite3_stmt*,int iCol);
+        void * (*commit_hook)(sqlite3*,int(*)(void*),void*);
+        int  (*complete)(const char*sql);
+        int  (*complete16)(const void*sql);
+        int  (*create_collation)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*));
+        int  (*create_collation16)(sqlite3*,const void*,int,void*,int(*)(void*,int,const void*,int,const void*));
+        int  (*create_function)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
+        int  (*create_function16)(sqlite3*,const void*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*));
+        int (*create_module)(sqlite3*,const char*,const sqlite3_module*,void*);
+        int  (*data_count)(sqlite3_stmt*pStmt);
+        sqlite3 * (*db_handle)(sqlite3_stmt*);
+        int (*declare_vtab)(sqlite3*,const char*);
+        int  (*enable_shared_cache)(int);
+        int  (*errcode)(sqlite3*db);
+        const char * (*errmsg)(sqlite3*);
+        const void * (*errmsg16)(sqlite3*);
+        int  (*exec)(sqlite3*,const char*,sqlite3_callback,void*,char**);
+        int  (*expired)(sqlite3_stmt*);
+        int  (*finalize)(sqlite3_stmt*pStmt);
+        void  (*free)(void*);
+        void  (*free_table)(char**result);
+        int  (*get_autocommit)(sqlite3*);
+        void * (*get_auxdata)(sqlite3_context*,int);
+        int  (*get_table)(sqlite3*,const char*,char***,int*,int*,char**);
+        int  (*global_recover)(void);
+        void  (*interruptx)(sqlite3*);
+        sqlite_int64  (*last_insert_rowid)(sqlite3*);
+        const char * (*libversion)(void);
+        int  (*libversion_number)(void);
+        void *(*malloc)(int);
+        char * (*mprintf)(const char*,...);
+        int  (*open)(const char*,sqlite3**);
+        int  (*open16)(const void*,sqlite3**);
+        int  (*prepare)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
+        int  (*prepare16)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
+        void * (*profile)(sqlite3*,void(*)(void*,const char*,sqlite_uint64),void*);
+        void  (*progress_handler)(sqlite3*,int,int(*)(void*),void*);
+        void *(*realloc)(void*,int);
+        int  (*reset)(sqlite3_stmt*pStmt);
+        void  (*result_blob)(sqlite3_context*,const void*,int,void(*)(void*));
+        void  (*result_double)(sqlite3_context*,double);
+        void  (*result_error)(sqlite3_context*,const char*,int);
+        void  (*result_error16)(sqlite3_context*,const void*,int);
+        void  (*result_int)(sqlite3_context*,int);
+        void  (*result_int64)(sqlite3_context*,sqlite_int64);
+        void  (*result_null)(sqlite3_context*);
+        void  (*result_text)(sqlite3_context*,const char*,int,void(*)(void*));
+        void  (*result_text16)(sqlite3_context*,const void*,int,void(*)(void*));
+        void  (*result_text16be)(sqlite3_context*,const void*,int,void(*)(void*));
+        void  (*result_text16le)(sqlite3_context*,const void*,int,void(*)(void*));
+        void  (*result_value)(sqlite3_context*,sqlite3_value*);
+        void * (*rollback_hook)(sqlite3*,void(*)(void*),void*);
+        int  (*set_authorizer)(sqlite3*,int(*)(void*,int,const char*,const char*,const char*,const char*),void*);
+        void  (*set_auxdata)(sqlite3_context*,int,void*,void (*)(void*));
+        char * (*snprintf)(int,char*,const char*,...);
+        int  (*step)(sqlite3_stmt*);
+        int  (*table_column_metadata)(sqlite3*,const char*,const char*,const char*,char const**,char const**,int*,int*,int*);
+        void  (*thread_cleanup)(void);
+        int  (*total_changes)(sqlite3*);
+        void * (*trace)(sqlite3*,void(*xTrace)(void*,const char*),void*);
+        int  (*transfer_bindings)(sqlite3_stmt*,sqlite3_stmt*);
+        void * (*update_hook)(sqlite3*,void(*)(void*,int ,char const*,char const*,sqlite_int64),void*);
+        void * (*user_data)(sqlite3_context*);
+        const void * (*value_blob)(sqlite3_value*);
+        int  (*value_bytes)(sqlite3_value*);
+        int  (*value_bytes16)(sqlite3_value*);
+        double  (*value_double)(sqlite3_value*);
+        int  (*value_int)(sqlite3_value*);
+        sqlite_int64  (*value_int64)(sqlite3_value*);
+        int  (*value_numeric_type)(sqlite3_value*);
+        const unsigned char * (*value_text)(sqlite3_value*);
+        const void * (*value_text16)(sqlite3_value*);
+        const void * (*value_text16be)(sqlite3_value*);
+        const void * (*value_text16le)(sqlite3_value*);
+        int  (*value_type)(sqlite3_value*);
+        char *(*vmprintf)(const char*,va_list);
+        /* Added ??? */
+        int (*overload_function)(sqlite3*, const char *zFuncName, int nArg);
+        /* Added by 3.3.13 */
+        int (*prepare_v2)(sqlite3*,const char*,int,sqlite3_stmt**,const char**);
+        int (*prepare16_v2)(sqlite3*,const void*,int,sqlite3_stmt**,const void**);
+        int (*clear_bindings)(sqlite3_stmt*);
+        /* Added by 3.4.1 */
+        int (*create_module_v2)(sqlite3*,const char*,const sqlite3_module*,void*,void (*xDestroy)(void *));
+        /* Added by 3.5.0 */
+        int (*bind_zeroblob)(sqlite3_stmt*,int,int);
+        int (*blob_bytes)(sqlite3_blob*);
+        int (*blob_close)(sqlite3_blob*);
+        int (*blob_open)(sqlite3*,const char*,const char*,const char*,sqlite3_int64,int,sqlite3_blob**);
+        int (*blob_read)(sqlite3_blob*,void*,int,int);
+        int (*blob_write)(sqlite3_blob*,const void*,int,int);
+        int (*create_collation_v2)(sqlite3*,const char*,int,void*,int(*)(void*,int,const void*,int,const void*),void(*)(void*));
+        int (*file_control)(sqlite3*,const char*,int,void*);
+        sqlite3_int64 (*memory_highwater)(int);
+        sqlite3_int64 (*memory_used)(void);
+        sqlite3_mutex *(*mutex_alloc)(int);
+        void (*mutex_enter)(sqlite3_mutex*);
+        void (*mutex_free)(sqlite3_mutex*);
+        void (*mutex_leave)(sqlite3_mutex*);
+        int (*mutex_try)(sqlite3_mutex*);
+        int (*open_v2)(const char*,sqlite3**,int,const char*);
+        int (*release_memory)(int);
+        void (*result_error_nomem)(sqlite3_context*);
+        void (*result_error_toobig)(sqlite3_context*);
+        int (*sleep)(int);
+        void (*soft_heap_limit)(int);
+        sqlite3_vfs *(*vfs_find)(const char*);
+        int (*vfs_register)(sqlite3_vfs*,int);
+        int (*vfs_unregister)(sqlite3_vfs*);
+        int (*xthreadsafe)(void);
+        void (*result_zeroblob)(sqlite3_context*,int);
+        void (*result_error_code)(sqlite3_context*,int);
+        int (*test_control)(int, ...);
+        void (*randomness)(int,void*);
+        sqlite3 *(*context_db_handle)(sqlite3_context*);
+        int (*extended_result_codes)(sqlite3*,int);
+        int (*limit)(sqlite3*,int,int);
+        sqlite3_stmt *(*next_stmt)(sqlite3*,sqlite3_stmt*);
+        const char *(*sql)(sqlite3_stmt*);
+        int (*status)(int,int*,int*,int);
+        int (*backup_finish)(sqlite3_backup*);
+        sqlite3_backup *(*backup_init)(sqlite3*,const char*,sqlite3*,const char*);
+        int (*backup_pagecount)(sqlite3_backup*);
+        int (*backup_remaining)(sqlite3_backup*);
+        int (*backup_step)(sqlite3_backup*,int);
+        const char *(*compileoption_get)(int);
+        int (*compileoption_used)(const char*);
+        int (*create_function_v2)(sqlite3*,const char*,int,int,void*,void (*xFunc)(sqlite3_context*,int,sqlite3_value**),void (*xStep)(sqlite3_context*,int,sqlite3_value**),void (*xFinal)(sqlite3_context*),void(*xDestroy)(void*));
+        int (*db_config)(sqlite3*,int,...);
+        sqlite3_mutex *(*db_mutex)(sqlite3*);
+        int (*db_status)(sqlite3*,int,int*,int*,int);
+        int (*extended_errcode)(sqlite3*);
+        void (*log)(int,const char*,...);
+        sqlite3_int64 (*soft_heap_limit64)(sqlite3_int64);
+        const char *(*sourceid)(void);
+        int (*stmt_status)(sqlite3_stmt*,int,int);
+        int (*strnicmp)(const char*,const char*,int);
+        int (*unlock_notify)(sqlite3*,void(*)(void**,int),void*);
+        int (*wal_autocheckpoint)(sqlite3*,int);
+        int (*wal_checkpoint)(sqlite3*,const char*);
+        void *(*wal_hook)(sqlite3*,int(*)(void*,sqlite3*,const char*,int),void*);
+};
+
+/*
+** The following macros redefine the API routines so that they are
+** redirected throught the global sqlite3_api structure.
+**
+** This header file is also used by the loadext.c source file
+** (part of the main SQLite library - not an extension) so that
+** it can get access to the sqlite3_api_routines structure
+** definition.  But the main library does not want to redefine
+** the API.  So the redefinition macros are only valid if the
+** SQLITE_CORE macros is undefined.
+*/
+#ifndef SQLITE_CORE
+#define sqlite3_aggregate_context      sqlite3_api->aggregate_context
+#ifndef SQLITE_OMIT_DEPRECATED
+#define sqlite3_aggregate_count        sqlite3_api->aggregate_count
+#endif
+#define sqlite3_bind_blob              sqlite3_api->bind_blob
+#define sqlite3_bind_double            sqlite3_api->bind_double
+#define sqlite3_bind_int               sqlite3_api->bind_int
+#define sqlite3_bind_int64             sqlite3_api->bind_int64
+#define sqlite3_bind_null              sqlite3_api->bind_null
+#define sqlite3_bind_parameter_count   sqlite3_api->bind_parameter_count
+#define sqlite3_bind_parameter_index   sqlite3_api->bind_parameter_index
+#define sqlite3_bind_parameter_name    sqlite3_api->bind_parameter_name
+#define sqlite3_bind_text              sqlite3_api->bind_text
+#define sqlite3_bind_text16            sqlite3_api->bind_text16
+#define sqlite3_bind_value             sqlite3_api->bind_value
+#define sqlite3_busy_handler           sqlite3_api->busy_handler
+#define sqlite3_busy_timeout           sqlite3_api->busy_timeout
+#define sqlite3_changes                sqlite3_api->changes
+#define sqlite3_close                  sqlite3_api->close
+#define sqlite3_collation_needed       sqlite3_api->collation_needed
+#define sqlite3_collation_needed16     sqlite3_api->collation_needed16
+#define sqlite3_column_blob            sqlite3_api->column_blob
+#define sqlite3_column_bytes           sqlite3_api->column_bytes
+#define sqlite3_column_bytes16         sqlite3_api->column_bytes16
+#define sqlite3_column_count           sqlite3_api->column_count
+#define sqlite3_column_database_name   sqlite3_api->column_database_name
+#define sqlite3_column_database_name16 sqlite3_api->column_database_name16
+#define sqlite3_column_decltype        sqlite3_api->column_decltype
+#define sqlite3_column_decltype16      sqlite3_api->column_decltype16
+#define sqlite3_column_double          sqlite3_api->column_double
+#define sqlite3_column_int             sqlite3_api->column_int
+#define sqlite3_column_int64           sqlite3_api->column_int64
+#define sqlite3_column_name            sqlite3_api->column_name
+#define sqlite3_column_name16          sqlite3_api->column_name16
+#define sqlite3_column_origin_name     sqlite3_api->column_origin_name
+#define sqlite3_column_origin_name16   sqlite3_api->column_origin_name16
+#define sqlite3_column_table_name      sqlite3_api->column_table_name
+#define sqlite3_column_table_name16    sqlite3_api->column_table_name16
+#define sqlite3_column_text            sqlite3_api->column_text
+#define sqlite3_column_text16          sqlite3_api->column_text16
+#define sqlite3_column_type            sqlite3_api->column_type
+#define sqlite3_column_value           sqlite3_api->column_value
+#define sqlite3_commit_hook            sqlite3_api->commit_hook
+#define sqlite3_complete               sqlite3_api->complete
+#define sqlite3_complete16             sqlite3_api->complete16
+#define sqlite3_create_collation       sqlite3_api->create_collation
+#define sqlite3_create_collation16     sqlite3_api->create_collation16
+#define sqlite3_create_function        sqlite3_api->create_function
+#define sqlite3_create_function16      sqlite3_api->create_function16
+#define sqlite3_create_module          sqlite3_api->create_module
+#define sqlite3_create_module_v2       sqlite3_api->create_module_v2
+#define sqlite3_data_count             sqlite3_api->data_count
+#define sqlite3_db_handle              sqlite3_api->db_handle
+#define sqlite3_declare_vtab           sqlite3_api->declare_vtab
+#define sqlite3_enable_shared_cache    sqlite3_api->enable_shared_cache
+#define sqlite3_errcode                sqlite3_api->errcode
+#define sqlite3_errmsg                 sqlite3_api->errmsg
+#define sqlite3_errmsg16               sqlite3_api->errmsg16
+#define sqlite3_exec                   sqlite3_api->exec
+#ifndef SQLITE_OMIT_DEPRECATED
+#define sqlite3_expired                sqlite3_api->expired
+#endif
+#define sqlite3_finalize               sqlite3_api->finalize
+#define sqlite3_free                   sqlite3_api->free
+#define sqlite3_free_table             sqlite3_api->free_table
+#define sqlite3_get_autocommit         sqlite3_api->get_autocommit
+#define sqlite3_get_auxdata            sqlite3_api->get_auxdata
+#define sqlite3_get_table              sqlite3_api->get_table
+#ifndef SQLITE_OMIT_DEPRECATED
+#define sqlite3_global_recover         sqlite3_api->global_recover
+#endif
+#define sqlite3_interrupt              sqlite3_api->interruptx
+#define sqlite3_last_insert_rowid      sqlite3_api->last_insert_rowid
+#define sqlite3_libversion             sqlite3_api->libversion
+#define sqlite3_libversion_number      sqlite3_api->libversion_number
+#define sqlite3_malloc                 sqlite3_api->malloc
+#define sqlite3_mprintf                sqlite3_api->mprintf
+#define sqlite3_open                   sqlite3_api->open
+#define sqlite3_open16                 sqlite3_api->open16
+#define sqlite3_prepare                sqlite3_api->prepare
+#define sqlite3_prepare16              sqlite3_api->prepare16
+#define sqlite3_prepare_v2             sqlite3_api->prepare_v2
+#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2
+#define sqlite3_profile                sqlite3_api->profile
+#define sqlite3_progress_handler       sqlite3_api->progress_handler
+#define sqlite3_realloc                sqlite3_api->realloc
+#define sqlite3_reset                  sqlite3_api->reset
+#define sqlite3_result_blob            sqlite3_api->result_blob
+#define sqlite3_result_double          sqlite3_api->result_double
+#define sqlite3_result_error           sqlite3_api->result_error
+#define sqlite3_result_error16         sqlite3_api->result_error16
+#define sqlite3_result_int             sqlite3_api->result_int
+#define sqlite3_result_int64           sqlite3_api->result_int64
+#define sqlite3_result_null            sqlite3_api->result_null
+#define sqlite3_result_text            sqlite3_api->result_text
+#define sqlite3_result_text16          sqlite3_api->result_text16
+#define sqlite3_result_text16be        sqlite3_api->result_text16be
+#define sqlite3_result_text16le        sqlite3_api->result_text16le
+#define sqlite3_result_value           sqlite3_api->result_value
+#define sqlite3_rollback_hook          sqlite3_api->rollback_hook
+#define sqlite3_set_authorizer         sqlite3_api->set_authorizer
+#define sqlite3_set_auxdata            sqlite3_api->set_auxdata
+#define sqlite3_snprintf               sqlite3_api->snprintf
+#define sqlite3_step                   sqlite3_api->step
+#define sqlite3_table_column_metadata  sqlite3_api->table_column_metadata
+#define sqlite3_thread_cleanup         sqlite3_api->thread_cleanup
+#define sqlite3_total_changes          sqlite3_api->total_changes
+#define sqlite3_trace                  sqlite3_api->trace
+#ifndef SQLITE_OMIT_DEPRECATED
+#define sqlite3_transfer_bindings      sqlite3_api->transfer_bindings
+#endif
+#define sqlite3_update_hook            sqlite3_api->update_hook
+#define sqlite3_user_data              sqlite3_api->user_data
+#define sqlite3_value_blob             sqlite3_api->value_blob
+#define sqlite3_value_bytes            sqlite3_api->value_bytes
+#define sqlite3_value_bytes16          sqlite3_api->value_bytes16
+#define sqlite3_value_double           sqlite3_api->value_double
+#define sqlite3_value_int              sqlite3_api->value_int
+#define sqlite3_value_int64            sqlite3_api->value_int64
+#define sqlite3_value_numeric_type     sqlite3_api->value_numeric_type
+#define sqlite3_value_text             sqlite3_api->value_text
+#define sqlite3_value_text16           sqlite3_api->value_text16
+#define sqlite3_value_text16be         sqlite3_api->value_text16be
+#define sqlite3_value_text16le         sqlite3_api->value_text16le
+#define sqlite3_value_type             sqlite3_api->value_type
+#define sqlite3_vmprintf               sqlite3_api->vmprintf
+#define sqlite3_overload_function      sqlite3_api->overload_function
+#define sqlite3_prepare_v2             sqlite3_api->prepare_v2
+#define sqlite3_prepare16_v2           sqlite3_api->prepare16_v2
+#define sqlite3_clear_bindings         sqlite3_api->clear_bindings
+#define sqlite3_bind_zeroblob          sqlite3_api->bind_zeroblob
+#define sqlite3_blob_bytes             sqlite3_api->blob_bytes
+#define sqlite3_blob_close             sqlite3_api->blob_close
+#define sqlite3_blob_open              sqlite3_api->blob_open
+#define sqlite3_blob_read              sqlite3_api->blob_read
+#define sqlite3_blob_write             sqlite3_api->blob_write
+#define sqlite3_create_collation_v2    sqlite3_api->create_collation_v2
+#define sqlite3_file_control           sqlite3_api->file_control
+#define sqlite3_memory_highwater       sqlite3_api->memory_highwater
+#define sqlite3_memory_used            sqlite3_api->memory_used
+#define sqlite3_mutex_alloc            sqlite3_api->mutex_alloc
+#define sqlite3_mutex_enter            sqlite3_api->mutex_enter
+#define sqlite3_mutex_free             sqlite3_api->mutex_free
+#define sqlite3_mutex_leave            sqlite3_api->mutex_leave
+#define sqlite3_mutex_try              sqlite3_api->mutex_try
+#define sqlite3_open_v2                sqlite3_api->open_v2
+#define sqlite3_release_memory         sqlite3_api->release_memory
+#define sqlite3_result_error_nomem     sqlite3_api->result_error_nomem
+#define sqlite3_result_error_toobig    sqlite3_api->result_error_toobig
+#define sqlite3_sleep                  sqlite3_api->sleep
+#define sqlite3_soft_heap_limit        sqlite3_api->soft_heap_limit
+#define sqlite3_vfs_find               sqlite3_api->vfs_find
+#define sqlite3_vfs_register           sqlite3_api->vfs_register
+#define sqlite3_vfs_unregister         sqlite3_api->vfs_unregister
+#define sqlite3_threadsafe             sqlite3_api->xthreadsafe
+#define sqlite3_result_zeroblob        sqlite3_api->result_zeroblob
+#define sqlite3_result_error_code      sqlite3_api->result_error_code
+#define sqlite3_test_control           sqlite3_api->test_control
+#define sqlite3_randomness             sqlite3_api->randomness
+#define sqlite3_context_db_handle      sqlite3_api->context_db_handle
+#define sqlite3_extended_result_codes  sqlite3_api->extended_result_codes
+#define sqlite3_limit                  sqlite3_api->limit
+#define sqlite3_next_stmt              sqlite3_api->next_stmt
+#define sqlite3_sql                    sqlite3_api->sql
+#define sqlite3_status                 sqlite3_api->status
+#define sqlite3_backup_finish          sqlite3_api->backup_finish
+#define sqlite3_backup_init            sqlite3_api->backup_init
+#define sqlite3_backup_pagecount       sqlite3_api->backup_pagecount
+#define sqlite3_backup_remaining       sqlite3_api->backup_remaining
+#define sqlite3_backup_step            sqlite3_api->backup_step
+#define sqlite3_compileoption_get      sqlite3_api->compileoption_get
+#define sqlite3_compileoption_used     sqlite3_api->compileoption_used
+#define sqlite3_create_function_v2     sqlite3_api->create_function_v2
+#define sqlite3_db_config              sqlite3_api->db_config
+#define sqlite3_db_mutex               sqlite3_api->db_mutex
+#define sqlite3_db_status              sqlite3_api->db_status
+#define sqlite3_extended_errcode       sqlite3_api->extended_errcode
+#define sqlite3_log                    sqlite3_api->log
+#define sqlite3_soft_heap_limit64      sqlite3_api->soft_heap_limit64
+#define sqlite3_sourceid               sqlite3_api->sourceid
+#define sqlite3_stmt_status            sqlite3_api->stmt_status
+#define sqlite3_strnicmp               sqlite3_api->strnicmp
+#define sqlite3_unlock_notify          sqlite3_api->unlock_notify
+#define sqlite3_wal_autocheckpoint     sqlite3_api->wal_autocheckpoint
+#define sqlite3_wal_checkpoint         sqlite3_api->wal_checkpoint
+#define sqlite3_wal_hook               sqlite3_api->wal_hook
+#endif /* SQLITE_CORE */
+
+#define SQLITE_EXTENSION_INIT1     const sqlite3_api_routines *sqlite3_api = 0;
+#define SQLITE_EXTENSION_INIT2(v)  sqlite3_api = v;
+
+#endif /* _SQLITE3EXT_H_ */
diff --git a/cadxcore/stdafx.cpp b/cadxcore/stdafx.cpp
new file mode 100644
index 0000000..c666761
--- /dev/null
+++ b/cadxcore/stdafx.cpp
@@ -0,0 +1 @@
+#include <stdafx.h>
diff --git a/cadxcore/stdafx.h b/cadxcore/stdafx.h
new file mode 100644
index 0000000..17c6ac7
--- /dev/null
+++ b/cadxcore/stdafx.h
@@ -0,0 +1,76 @@
+#pragma once
+
+#if defined(_WINDOWS)
+#if !defined (_SCL_SECURE_NO_WARNINGS)
+#define _SCL_SECURE_NO_WARNINGS
+#endif
+#if !defined (_CRT_SECURE_NO_WARNINGS)
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#else
+#if defined(__DEPRECATED)
+#undef __DEPRECATED
+#endif
+#endif
+
+#if defined(_WINDOWS) && defined(_GINKGO_DEBUG)
+#if defined _GINKGO_CHECK_LEAKS
+#define _CRTDBG_MAP_ALLOC
+#include <crtdbg.h>
+#endif
+#endif
+
+#if defined(_WINDOWS)
+#include <stdlib.h>
+#include <sys/types.h>
+#include <winsock2.h>
+#include <windows.h>
+#else // !_WIN32
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#endif
+
+#if !defined(__cplusplus)
+#include <stdio.h>
+#else
+
+#include <string>
+#include <iostream>
+#include <sstream>
+#include <vector>
+#include <list>
+#include <map>
+#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <ctime>
+#include <limits>
+#include <algorithm>
+#include <wx/wx.h>
+#include <wx/event.h>
+#include <wx/aui/aui.h>
+#include <wx/image.h>
+#include <wx/bitmap.h>
+#include <wx/xml/xml.h>
+#include <wx/file.h>
+#include <wx/sstream.h>
+#include <wx/tokenzr.h>
+#include <wx/filename.h>
+#include <wx/thread.h>
+
+#include <itkImage.h>
+#include <itkExceptionObject.h>
+#include <itkExceptionObject.h>
+#include <itkSmartPointer.h>
+#include <vtkInformation.h>
+#include <vtkAlgorithmOutput.h>
+#include <vtkImageData.h>
+#include <vtkMatrix4x4.h>
+#include <vtkgl.h>
+
+#include <api/api.h>
+#include <api/autoptr.h>
+#endif
diff --git a/cadxcore/vtk/command/ginkgoimagecommand.cpp b/cadxcore/vtk/command/ginkgoimagecommand.cpp
new file mode 100644
index 0000000..0b529cd
--- /dev/null
+++ b/cadxcore/vtk/command/ginkgoimagecommand.cpp
@@ -0,0 +1,366 @@
+/*
+ *
+ *  $Id: ginkgoimagecommand.cpp $
+ *  Ginkgo CADx Project
+ *
+ *  Code adapted from vtkINRIA3D
+=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: ginkgoimagecommand.cpp $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2008-06-06 18:10:57 +0200 (vie, 06 jun 2008) $
+Version:   $Revision: 880 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#ifdef _MSC_VER
+#  pragma warning (disable : 4018)
+#endif
+
+#include <string.h>
+#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
+#include <vtk/vtkginkgoimageviewer.h>
+
+#include <vtkAbstractPropPicker.h>
+#include <vtkRenderer.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkImageData.h>
+
+
+#include "ginkgoimagecommand.h"
+
+
+GinkgoImageCommand::GinkgoImageCommand() :
+        View(NULL), InitialWindow(0), InitialLevel(0),
+        WindowEventStatus(false)
+{
+}
+
+void
+GinkgoImageCommand::Execute(vtkObject*    caller,
+                            unsigned long event,
+                            void*         /*callData*/)
+{
+        if (this->View->GetInput() == NULL) {
+                return;
+        }
+
+        if (event == vtkCommand::KeyPressEvent) {
+
+                vtkRenderWindowInteractor *rwi = this->View->GetRenderWindow()->GetInteractor();
+                char key = rwi->GetKeyCode();
+
+                if ( key=='i' || key=='I') {
+                        //int mode;
+                        //mode = this->View->GetInterpolationMode();
+                        //this->View->SetInterpolationMode((++mode)%2);
+                        //this->View->Render();
+                        return;
+                }
+
+                return;
+        }
+
+        if (event == vtkCommand::StartWindowLevelEvent) {
+                this->StartWindowing();
+                return;
+        }
+        if (event == vtkCommand::EndWindowLevelEvent) {
+                this->EndWindowing();
+                return;
+        }
+        if (event == vtkCommand::WindowLevelEvent) {
+                this->Windowing(GinkgoInteractorStyleImage2D::SafeDownCast(caller));
+                return;
+        }
+        if (event == vtkCommand::ResetWindowLevelEvent) {
+                //this->View->SyncResetWindowLevel();
+                //std::cout << "GinkgoImageCommand::ResetWindowLevelEvent()" << std::endl;
+                this->View->ResetToDefaultWindowLevel();
+                this->View->SyncSetWindow ( this->View->GetWindow() );
+                this->View->SyncSetLevel ( this->View->GetLevel() );
+                this->View->Render();
+                return;
+        }
+        if (event == GinkgoImageCommand::ResetPositionEvent) {
+                //std::cout << "GinkgoImageCommand::ResetPositionEvent()" << std::endl;
+                //this->View->SyncResetCurrentPoint();
+                //this->View->Render();
+                return;
+        }
+        if (event == GinkgoImageCommand::ZoomEvent) {
+                //std::cout << "GinkgoImageCommand::ZoomEvent()" << std::endl;
+                this->Zoom(GinkgoInteractorStyleImage2D::SafeDownCast(caller));
+                return;
+        }
+        if (event == GinkgoImageCommand::ResetZoomEvent) {
+                //std::cout << "GinkgoImageCommand::ResetZoomEvent()" << std::endl;
+                //this->View->SyncResetZoom();
+                //this->View->Render();
+                return;
+        }
+        if (event == vtkCommand::StartPickEvent) {
+                this->StartPicking(vtkInteractorStyleImage::SafeDownCast(caller));
+                return;
+        }
+        if (event == vtkCommand::EndPickEvent) {
+                this->EndPicking(/*static_cast<vtkInteractorStyleImage *>(caller)*/);
+                return;
+        }
+        if (event == GinkgoImageCommand::StartMeasureEvent) {
+                //std::cout<<"StartMeasureEvent\n";
+                return;
+        }
+        if (event == GinkgoImageCommand::MeasureEvent) {
+                //std::cout<<"MeasureEvent\n";
+                return;
+        }
+        if (event == GinkgoImageCommand::EndMeasureEvent) {
+                //std::cout<<"EndMeasureEvent\n";
+                return;
+        }
+        if (event == GinkgoImageCommand::StartZSliceMoveEvent) {
+                return;
+        }
+        if (event == GinkgoImageCommand::ZSliceMoveEvent) {
+                this->ChangeZSlice(GinkgoInteractorStyleImage2D::SafeDownCast(caller));
+                return;
+        }
+        if (event == GinkgoImageCommand::EndZSliceMoveEvent) {
+                return;
+        }
+        if (event == GinkgoImageCommand::FullPageEvent) {
+                return;
+        }
+
+}
+
+void
+GinkgoImageCommand::StartWindowing()
+{
+        this->InitialWindow = this->View->GetWindow();
+        this->InitialLevel  = this->View->GetLevel();
+}
+
+void
+GinkgoImageCommand::Windowing(GinkgoInteractorStyleImage2D* p_isi)
+{
+
+        if( !p_isi ) {
+                return;
+        }
+
+        double window = this->InitialWindow;
+        double level  = this->InitialLevel;
+        double EPS    = 0.01;
+
+
+        double dx = p_isi->GetWindowStep();
+        double dy = p_isi->GetLevelStep();
+
+        // Scale by current values
+        if (fabs(window) > EPS) {
+                dx = dx * window;
+        } else {
+                dx = dx * (window < 0 ? -EPS : EPS);
+        }
+
+        if (fabs(level) > EPS) {
+                dy = dy * level;
+        } else {
+                dy = dy * (level < 0 ? -EPS : EPS);
+        }
+
+        // Abs so that direction does not flip
+        if (window < 0.0f) {
+                dx = -1*dx;
+        }
+        if (level < 0.0f) {
+                dy = -1*dy;
+        }
+
+        // Compute new window level
+        double newWindow = dx + window;
+        double newLevel  = level - dy;
+
+        // Stay away from zero and really
+        if (fabs(newWindow) < EPS) {
+                newWindow = EPS * (newWindow < 0 ? -1 : 1);
+        }
+
+        if (fabs(newLevel) < EPS) {
+                newLevel = EPS * (newLevel < 0 ? -1 : 1);
+        }
+
+        this->View->SyncSetWindow(newWindow);
+        this->View->SyncSetLevel(newLevel);
+        this->View->Modified();
+}
+
+void
+GinkgoImageCommand::EndWindowing()
+{
+}
+
+void
+GinkgoImageCommand::StartPicking(vtkInteractorStyleImage* p_isi)
+{
+        vtkRenderWindowInteractor *rwi = p_isi->GetInteractor();
+        vtkAssemblyPath *path=NULL;
+        p_isi->FindPokedRenderer(rwi->GetEventPosition()[0],
+                                 rwi->GetEventPosition()[1]);
+        rwi->GetPicker()->Pick(rwi->GetEventPosition()[0],
+                               rwi->GetEventPosition()[1], 0.0,
+                               p_isi->GetCurrentRenderer());
+        vtkAbstractPropPicker *picker;
+        if ( (picker=vtkAbstractPropPicker::SafeDownCast(rwi->GetPicker())) ) {
+                path = picker->GetPath();
+        }
+
+        if ( path != NULL ) {
+                double* world = picker->GetPickPosition();
+
+                double  pos[3] = {0.0, 0.0, 0.0};
+                //this->View->GetCurrentPoint(pos);
+
+                //double* imBounds = this->View->GetImage()->GetBounds();
+
+                switch(this->View->GetOrientation()) {
+                case vtkGinkgoImageViewer::SAGITTAL_ID:
+
+                        pos [1] = world[0];//*1.0;
+                        pos [2] = world[1];//*1.0;
+                        break;
+
+
+                case vtkGinkgoImageViewer::CORONAL_ID:
+
+                        if( this->View->GetConventions() == vtkGinkgoImageViewer::RADIOLOGIC ) {
+                                pos [0] = world[0];//*-1.0;
+                        } else {
+                                pos [0] = world[0]*-1.0;
+                        }
+                        pos [2] = world[1];
+                        break;
+
+
+                case vtkGinkgoImageViewer::AXIAL_ID:
+
+                        if( this->View->GetConventions() == vtkGinkgoImageViewer::RADIOLOGIC ) {
+                                pos [0] = world[0];
+                        } else {
+                                pos [0] = world[0]*-1.0;
+                        }
+                        pos [1] = world[1]*-1.0;
+                        break;
+
+                }
+
+                // Treat extrem positions
+                int range[3][2] = {{0, 0}, {0, 0}, {0, 0}};
+                this->View->GetSliceRange(vtkGinkgoImageViewer::X, range[0]);
+                this->View->GetSliceRange(vtkGinkgoImageViewer::Y, range[1]);
+                this->View->GetSliceRange(vtkGinkgoImageViewer::Z, range[2]);
+
+                for (unsigned int i=0; i<3; i++) {
+                        if (pos[i] < range[i][0]) {
+                                pos[i] = range[i][0] + 0.0005;
+                        }
+                        if (pos[i] > range[i][1]) {
+                                pos[i] = range[i][1] - 0.0005;
+                        }
+                }
+
+                // Set the position
+                //this->View->SyncSetCurrentPoint(pos);
+                //this->View->Modified();
+        }
+
+}
+
+void
+GinkgoImageCommand::EndPicking()
+{
+}
+
+void
+GinkgoImageCommand::ChangeZSlice(GinkgoInteractorStyleImage2D* /*p_isi*/)
+{
+
+        /*
+        if( !p_isi )
+        {
+        return;
+        }
+
+        int p_nbSlices = p_isi->GetZSliceStep();
+
+        int current_slice = 0;
+        int dest_slice    = current_slice + p_nbSlices;
+        //int min_slice     = this->View->GetWholeZMin();
+        //int max_slice     = this->View->GetWholeZMax();
+
+        double pos[3];
+        this->View->GetPositionForSlice ( dest_slice, this->View->GetOrientation(), pos);
+        //this->View->SyncSetPosition (pos);
+
+        if ((dest_slice > min_slice) && (dest_slice < max_slice)) {
+        this->View->GetPositionForSlice ( dest_slice, this->View->GetOrientation(), pos);
+        //this->View->SyncSetSlice(this->View->GetOrientation(), dest_slice);
+        }
+        if ((dest_slice >= max_slice) && (current_slice != max_slice)) {
+        this->View->GetPositionForSlice ( max_slice, this->View->GetOrientation(), pos);
+        //this->View->SyncSetSlice(this->View->GetOrientation(), max_slice);
+        }
+        if ((dest_slice <= min_slice) && (current_slice != min_slice)) {
+        this->View->GetPositionForSlice ( min_slice, this->View->GetOrientation(), pos);
+        //this->View->SyncSetSlice(this->View->GetOrientation(), min_slice);
+        }
+
+        //this->View->Modified();
+        */
+}
+
+
+void
+GinkgoImageCommand::SetView(vtkGinkgoImageViewer *p_view)
+{
+        this->View = p_view;
+}
+
+
+
+void
+GinkgoImageCommand::Zoom (vtkInteractorStyleImage* p_isi)
+{
+        if( !p_isi ) {
+                return;
+        }
+
+        vtkRenderWindowInteractor *rwi = p_isi->GetInteractor();
+
+        // vtkAssemblyPath *path=NULL;
+        p_isi->FindPokedRenderer(rwi->GetEventPosition()[0],
+                                 rwi->GetEventPosition()[1]);
+
+        double *center = p_isi->GetCurrentRenderer()->GetCenter();
+        int dy = rwi->GetEventPosition()[1] - rwi->GetLastEventPosition()[1];
+
+        double factor = 10.0 * (double)(dy) / (double)(center[1]);
+
+        //this->View->SyncSetZoom ( pow((double)1.1, factor) );
+        this->View->SyncSetZoom ( pow((double)1.1, factor)*this->View->GetZoom() );
+        this->View->Modified();
+}
diff --git a/cadxcore/vtk/command/ginkgoimagecommand.h b/cadxcore/vtk/command/ginkgoimagecommand.h
new file mode 100644
index 0000000..5eeda6f
--- /dev/null
+++ b/cadxcore/vtk/command/ginkgoimagecommand.h
@@ -0,0 +1,85 @@
+/*
+ *
+ *  $Id: ginkgoimagecommand.h $
+ *  Ginkgo CADx Project
+ *
+ *  Code adapted from vtkINRIA3D
+=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: ginkgoimagecommand.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2008-01-14 09:21:23 +0100 (lun, 14 ene 2008) $
+Version:   $Revision: 608 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#pragma once
+
+#include<vtkCommand.h>
+#include<vtkObjectFactory.h>
+
+
+class vtkInteractorStyleImage;
+class vtkInteractorStyleImage2D;
+class vtkGinkgoImageViewer;
+
+class GinkgoImageCommand : public vtkCommand
+{
+public:
+        GinkgoImageCommand();
+
+        static  GinkgoImageCommand* New()
+        {
+                return new GinkgoImageCommand;
+        }
+
+        void Execute(vtkObject *   caller,
+                     unsigned long event,
+                     void *        callData);
+
+        void SetView(vtkGinkgoImageViewer *p_view);
+
+        //BTX
+        enum EventIds {
+                ZSliceMoveEvent=(vtkCommand::UserEvent+1),
+                StartZSliceMoveEvent,
+                EndZSliceMoveEvent,
+                StartMeasureEvent,
+                MeasureEvent,
+                EndMeasureEvent,
+                StartAngleEvent,
+                AngleEvent,
+                EndAngleEvent,
+                FullPageEvent,
+                ResetPositionEvent,
+                ZoomEvent,
+                ResetZoomEvent
+        };
+        //ETX
+
+private:
+        void ChangeZSlice(GinkgoInteractorStyleImage2D* p_isi);
+        void EndWindowing();
+        void Windowing(GinkgoInteractorStyleImage2D* p_isi);
+        void StartWindowing();
+        void StartPicking(vtkInteractorStyleImage* p_isi);
+        void EndPicking (void);
+        void Zoom (vtkInteractorStyleImage* p_isi);
+
+private:
+        vtkGinkgoImageViewer* View;
+        double          InitialWindow;
+        double          InitialLevel;
+
+        bool            WindowEventStatus;
+
+};
+
diff --git a/cadxcore/vtk/interactor/ginkgointeractorstyleimage2d.cpp b/cadxcore/vtk/interactor/ginkgointeractorstyleimage2d.cpp
new file mode 100644
index 0000000..26966be
--- /dev/null
+++ b/cadxcore/vtk/interactor/ginkgointeractorstyleimage2d.cpp
@@ -0,0 +1,736 @@
+/*
+ *
+ *  $Id: ginkgointeractorstyleimage2d.cpp $
+ *  Ginkgo CADx Project
+ *
+ *  Code adapted from vtkINRIA3D
+=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: ginkgointeractorstyleimage2d.cpp $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2008-03-11 17:32:52 +0100 (mar, 11 mar 2008) $
+Version:   $Revision: 752 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include "ginkgointeractorstyleimage2d.h"
+#include "../command/ginkgoimagecommand.h"
+#include <vtkAbstractPropPicker.h>
+#include <vtkAssemblyPath.h>
+#include <vtkMath.h>
+#include <vtkObjectFactory.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkImageData.h>
+#include <vtkRenderWindow.h>
+#include <wx/timer.h>
+
+vtkStandardNewMacro(GinkgoInteractorStyleImage2D);
+
+#include <vtkCamera.h>
+#include <vtkRenderer.h>
+
+class ISTimerZoom: public wxTimer
+{
+public:
+        ISTimerZoom(GinkgoInteractorStyleImage2D* pIS): IS(pIS)
+        {
+        }
+        virtual void Notify()
+        {
+                IS->EndZoom();
+        }
+
+        GinkgoInteractorStyleImage2D* IS;
+};
+
+//----------------------------------------------------------------------------
+
+GinkgoInteractorStyleImage2D::GinkgoInteractorStyleImage2D()
+        : vtkInteractorStyleImage()
+{
+        this->View = 0;
+        this->ZSliceStep = 0;
+        this->LevelStep = 0.0;
+        this->WindowStep = 0.0;
+        this->PreviewMode = false;
+        this->TimerZoom = new ISTimerZoom(this);
+}
+
+//----------------------------------------------------------------------------
+
+GinkgoInteractorStyleImage2D::~GinkgoInteractorStyleImage2D()
+{
+        if (TimerZoom != NULL) {
+                TimerZoom->Stop();
+                delete TimerZoom;
+        }
+}
+
+//----------------------------------------------------------------------------
+
+void GinkgoInteractorStyleImage2D::OnMouseMove()
+{
+        int x = this->Interactor->GetEventPosition()[0];
+        int y = this->Interactor->GetEventPosition()[1];
+
+        switch (this->State) {
+        case VTKIS_WINDOW_LEVEL:
+                this->FindPokedRenderer(x, y);
+                this->WindowLevel();
+                this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
+                break;
+
+        case VTKIS_PICK:
+                // No Drag is allowed for picking. Toggle to ZSliceMove state
+                // We force StartZSliceMove or StartPan or StartDolly without ending the picking.
+                // We don't want to pick at all
+                this->StopState();
+                this->StartZSliceMove();
+        // There we don't break to let the hand to ZSliceMove
+
+        case VTKIS_ZSLICE_MOVE:
+                this->FindPokedRenderer(x, y);
+                this->ZSliceMove();
+                this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
+                break;
+
+        case VTKIS_DOLLY:
+                this->FindPokedRenderer(x, y);
+                //this->Dolly();
+                //this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
+                this->InvokeEvent(GinkgoImageCommand::ZoomEvent, this);
+                break;
+
+        case VTKIS_PAN:
+                if (PreviewMode) {
+                        this->FindPokedRenderer(x, y);
+                        this->Pan();
+                        this->PropagateCameraFocalAndPosition();
+                        this->InvokeEvent(vtkCommand::InteractionEvent, NULL);
+                }
+                break;
+        default:
+                break;
+        }
+}
+
+void GinkgoInteractorStyleImage2D::PropagateCameraFocalAndPosition()
+{
+        if (!this->GetView()) {
+                return;
+        }
+
+        double pos[3], focal[3];
+
+        if (!this->GetView()->GetRenderer()) {
+                return;
+        }
+
+        vtkCamera* camera = this->GetView()->GetRenderer()->GetActiveCamera();
+        camera->GetFocalPoint(focal);
+        camera->GetPosition(pos);
+
+        bool LinkCamera = this->GetView()->GetLinkCameraFocalAndPosition();
+        this->GetView()->SetLinkCameraFocalAndPosition(false);
+        this->GetView()->SyncSetCameraFocalAndPosition(focal, pos);
+        this->GetView()->SetLinkCameraFocalAndPosition(LinkCamera);
+
+        this->GetView()->Render();
+
+
+}
+
+
+//----------------------------------------------------------------------------
+
+void GinkgoInteractorStyleImage2D::OnLeftButtonDown()
+{
+        int x = this->Interactor->GetEventPosition()[0];
+        int y = this->Interactor->GetEventPosition()[1];
+
+        this->FindPokedRenderer(x, y);
+        if (!this->CurrentRenderer) {
+                return;
+        }
+
+        //switch ( this->View->GetInteractionStyle() )
+        switch (this->View->GetLeftButtonInteractionStyle()) {
+        /*
+        case vtkGinkgoImageViewer::WINDOW_LEVEL_INTERACTION :
+        	this->WindowLevelStartPosition[0] = x;
+        	this->WindowLevelStartPosition[1] = y;
+        	this->StartWindowLevel();
+        	break;
+        */
+        case vtkGinkgoImageViewer::SELECT_INTERACTION :
+                if (this->PreviewMode) {
+                        this->StartPick();
+                }
+                break;
+        case vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION :
+                if (this->PreviewMode) {
+                        this->StartPick();
+                        this->StopState();
+                }
+                //this->StartPan();
+                break;
+        /*
+        case vtkGinkgoImageViewer::FULL_PAGE_INTERACTION :
+        	this->FullPage();
+        	break;
+        case vtkGinkgoImageViewer::MEASURE_INTERACTION :
+        	this->StartMeasure();
+        	break;
+        */
+        case vtkGinkgoImageViewer::ZOOM_INTERACTION :
+                /*
+                if (this->Interactor->GetShiftKey()) {
+                	this->StartPan();
+                } else {
+                	this->StartDolly(); // continuous zoom
+                }
+                */
+                break;
+        }
+
+}
+
+//----------------------------------------------------------------------------
+
+void GinkgoInteractorStyleImage2D::OnMiddleButtonDown()
+{
+        int x = this->Interactor->GetEventPosition()[0];
+        int y = this->Interactor->GetEventPosition()[1];
+
+        this->FindPokedRenderer(x, y);
+        if (!this->CurrentRenderer) {
+                return;
+        }
+
+        //switch ( this->View->GetInteractionStyle() )
+        switch (this->View->GetMiddleButtonInteractionStyle()) {
+        /*
+        case vtkGinkgoImageViewer::WINDOW_LEVEL_INTERACTION :
+        	this->WindowLevelStartPosition[0] = x;
+        	this->WindowLevelStartPosition[1] = y;
+        	this->StartWindowLevel();
+        	break;
+        */
+        case vtkGinkgoImageViewer::SELECT_INTERACTION :
+                if (this->PreviewMode) {
+                        this->StartPick();
+                } else {
+                        this->StartPan();
+                }
+                break;
+        case vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION :
+                if (this->PreviewMode) {
+                        this->StartPan();
+                }
+                break;
+        /*
+        case vtkGinkgoImageViewer::FULL_PAGE_INTERACTION :
+        	this->FullPage();
+        	break;
+        case vtkGinkgoImageViewer::MEASURE_INTERACTION :
+        	this->StartMeasure();
+        	break;
+        */
+        case vtkGinkgoImageViewer::ZOOM_INTERACTION :
+                if (!this->PreviewMode) {
+                        this->StartPan();
+                }
+                break;
+        }
+}
+
+//----------------------------------------------------------------------------
+
+void GinkgoInteractorStyleImage2D::OnMiddleButtonUp()
+{
+        switch (this->State) {
+        case VTKIS_ZSLICE_MOVE:
+                if (this->PreviewMode) {
+                        this->EndZSliceMove();
+                }
+                break;
+        case VTKIS_WINDOW_LEVEL:
+                if (this->PreviewMode) {
+                        this->EndWindowLevel();
+                }
+                break;
+        case VTKIS_PICK:
+                if (this->PreviewMode) {
+                        this->EndPick();
+                }
+                break;
+        case VTKIS_MEASURE:
+                if (this->PreviewMode) {
+                        this->EndMeasure();
+                }
+                break;
+        case VTKIS_PAN:
+                this->EndPan();
+                break;
+        case VTKIS_DOLLY:
+                if (this->PreviewMode) {
+                        this->EndDolly(); // continuous zoom
+                }
+                break;
+        }
+
+}
+
+//----------------------------------------------------------------------------
+
+void GinkgoInteractorStyleImage2D::OnLeftButtonUp()
+{
+        switch (this->State) {
+        case VTKIS_ZSLICE_MOVE:
+                if (this->PreviewMode) {
+                        this->EndZSliceMove();
+                }
+                break;
+        case VTKIS_WINDOW_LEVEL:
+                if (this->PreviewMode) {
+                        this->EndWindowLevel();
+                }
+                break;
+        case VTKIS_PICK:
+                if (this->PreviewMode) {
+                        this->EndPick();
+                }
+                break;
+        case VTKIS_MEASURE:
+                if (this->PreviewMode) {
+                        this->EndMeasure();
+                }
+                break;
+        case VTKIS_DOLLY: // continuous zoom
+                if (this->PreviewMode) {
+                        this->EndDolly();
+                }
+                break;
+        case VTKIS_PAN: // continuous zoom
+                if (this->PreviewMode) {
+                        this->EndPan();
+                }
+                break;
+        }
+}
+
+//----------------------------------------------------------------------------
+
+void GinkgoInteractorStyleImage2D::OnRightButtonDown()
+{
+        int x = this->Interactor->GetEventPosition()[0];
+        int y = this->Interactor->GetEventPosition()[1];
+
+        this->FindPokedRenderer(x, y);
+        if (!this->CurrentRenderer) {
+                return;
+        }
+
+        //switch ( this->View->GetInteractionStyle() )
+        switch (this->View->GetRightButtonInteractionStyle()) {
+        /*
+        case vtkGinkgoImageViewer::WINDOW_LEVEL_INTERACTION :
+        	this->WindowLevelStartPosition[0] = x;
+        	this->WindowLevelStartPosition[1] = y;
+        	this->StartWindowLevel();
+        	break;
+        */
+        case vtkGinkgoImageViewer::SELECT_INTERACTION :
+                if (this->PreviewMode) {
+                        this->StartPick();
+                }
+                break;
+        case vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION :
+                if (this->PreviewMode) {
+                        this->StartPan();
+                }
+                break;
+        /*
+        case vtkGinkgoImageViewer::FULL_PAGE_INTERACTION :
+        	this->FullPage();
+        	break;
+        case vtkGinkgoImageViewer::MEASURE_INTERACTION :
+        	this->StartMeasure();
+        	break;
+        */
+        case vtkGinkgoImageViewer::ZOOM_INTERACTION :
+                if (this->PreviewMode) {
+                        this->StartPan();
+                }
+                break;
+        }
+}
+
+//----------------------------------------------------------------------------
+
+void GinkgoInteractorStyleImage2D::OnRightButtonUp()
+{
+        switch (this->State) {
+        case VTKIS_ZSLICE_MOVE:
+                if (this->PreviewMode) {
+                        this->EndZSliceMove();
+                }
+                break;
+        case VTKIS_WINDOW_LEVEL:
+                if (this->PreviewMode) {
+                        this->EndWindowLevel();
+                }
+                break;
+        case VTKIS_PICK:
+                if (this->PreviewMode) {
+                        this->EndPick();
+                }
+                break;
+        case VTKIS_MEASURE:
+                if (this->PreviewMode) {
+                        this->EndMeasure();
+                }
+                break;
+        case VTKIS_DOLLY: // continuous zoom
+                if (this->PreviewMode) {
+                        this->EndDolly();
+                }
+                break;
+        case VTKIS_PAN:
+
+                if (this->PreviewMode) {
+                        this->EndPan();
+                }
+                break;
+        }
+}
+
+//----------------------------------------------------------------------------
+
+void GinkgoInteractorStyleImage2D::OnChar()
+{
+        vtkRenderWindowInteractor *rwi = this->Interactor;
+
+        //double factor = 0.0;
+        //int *size = this->View->GetRenderWindow()->GetSize();
+
+        std::string key_sym(rwi->GetKeySym());
+
+        vtkAssemblyPath *path = 0;
+        vtkAbstractPropPicker *picker = 0;
+
+        switch (rwi->GetKeyCode()) {
+
+        case 'f':
+        case 'F': {
+                this->AnimState = VTKIS_ANIM_ON;
+                this->FindPokedRenderer(rwi->GetEventPosition()[0],
+                                        rwi->GetEventPosition()[1]);
+                rwi->GetPicker()->Pick(rwi->GetEventPosition()[0],
+                                       rwi->GetEventPosition()[1], 0.0,
+                                       this->CurrentRenderer);
+                picker = vtkAbstractPropPicker::SafeDownCast(rwi->GetPicker());
+                if (picker) {
+                        path = picker->GetPath();
+                }
+                if (path) {
+                        rwi->FlyToImage(this->CurrentRenderer, picker->GetPickPosition());
+                }
+                this->AnimState = VTKIS_ANIM_OFF;
+                break;
+        }
+
+        case 'r':
+        case 'R':
+                /*
+                if (this->View->GetLeftButtonInteractionStyle() == vtkGinkgoImageViewer::WINDOW_LEVEL_INTERACTION ||
+                			this->View->GetRightButtonInteractionStyle() == vtkGinkgoImageViewer::WINDOW_LEVEL_INTERACTION ||
+                			this->View->GetMiddleButtonInteractionStyle() == vtkGinkgoImageViewer::WINDOW_LEVEL_INTERACTION ||
+                			this->View->GetWheelInteractionStyle() == vtkGinkgoImageViewer::WINDOW_LEVEL_INTERACTION) {
+                	this->InvokeEvent(vtkCommand::ResetWindowLevelEvent, this);
+                }
+                */
+                if (this->View->GetLeftButtonInteractionStyle() == vtkGinkgoImageViewer::SELECT_INTERACTION ||
+                    this->View->GetRightButtonInteractionStyle() == vtkGinkgoImageViewer::SELECT_INTERACTION ||
+                    this->View->GetMiddleButtonInteractionStyle() == vtkGinkgoImageViewer::SELECT_INTERACTION ||
+                    this->View->GetWheelInteractionStyle() == vtkGinkgoImageViewer::SELECT_INTERACTION) {
+                        this->InvokeEvent(GinkgoImageCommand::ResetPositionEvent, this);
+                }
+                if (this->View->GetLeftButtonInteractionStyle() == vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION ||
+                    this->View->GetRightButtonInteractionStyle() == vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION ||
+                    this->View->GetMiddleButtonInteractionStyle() == vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION ||
+                    this->View->GetWheelInteractionStyle() == vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION) {
+                        this->InvokeEvent(GinkgoImageCommand::ResetPositionEvent, this);
+                        this->InvokeEvent(GinkgoImageCommand::ResetZoomEvent, this);
+                }
+                if (this->View->GetLeftButtonInteractionStyle() == vtkGinkgoImageViewer::ZOOM_INTERACTION ||
+                    this->View->GetRightButtonInteractionStyle() == vtkGinkgoImageViewer::ZOOM_INTERACTION ||
+                    this->View->GetMiddleButtonInteractionStyle() == vtkGinkgoImageViewer::ZOOM_INTERACTION ||
+                    this->View->GetWheelInteractionStyle() == vtkGinkgoImageViewer::ZOOM_INTERACTION) {
+                        this->InvokeEvent(GinkgoImageCommand::ResetZoomEvent, this);
+                }
+
+                break;
+        }
+
+}
+
+//----------------------------------------------------------------------------
+
+void
+GinkgoInteractorStyleImage2D::StartZSliceMove()
+{
+        if ((this->State != VTKIS_NONE) && (this->State != VTKIS_PICK)) {
+                return;
+        }
+        this->StartState(VTKIS_ZSLICE_MOVE);
+        this->InvokeEvent(GinkgoImageCommand::StartZSliceMoveEvent, this);
+}
+
+void
+GinkgoInteractorStyleImage2D::ZSliceMove()
+{
+        vtkRenderWindowInteractor *rwi = this->Interactor;
+        int dy = rwi->GetEventPosition()[1] - rwi->GetLastEventPosition()[1];
+        this->ZSliceStep = dy;
+        this->InvokeEvent(GinkgoImageCommand::ZSliceMoveEvent, this);
+}
+
+void
+GinkgoInteractorStyleImage2D::ZSliceWheelForward()
+{
+        int dy = (int) this->MouseWheelMotionFactor;
+        this->ZSliceStep = dy;
+        this->InvokeEvent(GinkgoImageCommand::ZSliceMoveEvent, this);
+}
+
+void
+GinkgoInteractorStyleImage2D::ZSliceWheelBackward()
+{
+        int dy = (int) (-1.0 * this->MouseWheelMotionFactor);
+        this->ZSliceStep = dy;
+        this->InvokeEvent(GinkgoImageCommand::ZSliceMoveEvent, this);
+}
+
+void
+GinkgoInteractorStyleImage2D::EndZSliceMove()
+{
+        if (this->State != VTKIS_ZSLICE_MOVE) {
+                return;
+        }
+        this->InvokeEvent(GinkgoImageCommand::EndZSliceMoveEvent, this);
+        this->StopState();
+}
+
+//----------------------------------------------------------------------------
+
+void
+GinkgoInteractorStyleImage2D::FullPage()
+{
+        this->InvokeEvent(GinkgoImageCommand::FullPageEvent, this);
+}
+
+//----------------------------------------------------------------------------
+
+void
+GinkgoInteractorStyleImage2D::StartMeasure()
+{
+        if (this->State != VTKIS_NONE) {
+                return;
+        }
+        this->StartState(VTKIS_MEASURE);
+        this->InvokeEvent(GinkgoImageCommand::StartMeasureEvent, this);
+}
+
+void
+GinkgoInteractorStyleImage2D::Measure()
+{
+        this->InvokeEvent(GinkgoImageCommand::MeasureEvent, this);
+}
+
+void
+GinkgoInteractorStyleImage2D::EndMeasure()
+{
+        if (this->State != VTKIS_MEASURE) {
+                return;
+        }
+        this->InvokeEvent(GinkgoImageCommand::EndMeasureEvent, this);
+        this->StopState();
+}
+//----------------------------------------------------------------------------
+
+void
+GinkgoInteractorStyleImage2D::WindowLevel()
+{
+        vtkRenderWindowInteractor *rwi = this->Interactor;
+
+        this->WindowLevelCurrentPosition[0] = rwi->GetEventPosition()[0];
+        this->WindowLevelCurrentPosition[1] = rwi->GetEventPosition()[1];
+
+        int *size = this->View->GetRenderWindow()->GetSize();
+
+        // Compute normalized delta
+        double dx = 4.0 *
+                    (this->GetWindowLevelCurrentPosition()[0] -
+                     this->GetWindowLevelStartPosition()[0]) / size[0];
+        double dy = 4.0 *
+                    (this->GetWindowLevelStartPosition()[1] -
+                     this->GetWindowLevelCurrentPosition()[1]) / size[1];
+
+        this->SetWindowStep(dx);
+        this->SetLevelStep(dy);
+
+        this->InvokeEvent(vtkCommand::WindowLevelEvent, this);
+}
+
+void
+GinkgoInteractorStyleImage2D::WindowLevelWheelForward()
+{
+        int *size = this->View->GetRenderWindow()->GetSize();
+
+        double dy = 4.0 * (double) (this->MouseWheelMotionFactor) / size[1];
+
+        this->SetWindowStep(0.0);
+        this->SetLevelStep(dy);
+
+        this->InvokeEvent(vtkCommand::WindowLevelEvent, this);
+}
+
+void
+GinkgoInteractorStyleImage2D::WindowLevelWheelBackward()
+{
+        int *size = this->View->GetRenderWindow()->GetSize();
+
+        double dy = 4.0 * (double) (-1.0 * this->MouseWheelMotionFactor) / size[1];
+
+        this->SetWindowStep(0.0);
+        this->SetLevelStep(dy);
+
+        this->InvokeEvent(vtkCommand::WindowLevelEvent, this);
+}
+//----------------------------------------------------------------------------
+
+void GinkgoInteractorStyleImage2D::OnMouseWheelForward()
+{
+
+        int x = this->Interactor->GetEventPosition()[0];
+        int y = this->Interactor->GetEventPosition()[1];
+
+        double factor = 0.0;
+
+        this->FindPokedRenderer(x, y);
+
+        if (this->CurrentRenderer == NULL) {
+                return;
+        }
+
+        switch (this->View->GetWheelInteractionStyle()) {
+        /*
+        case vtkGinkgoImageViewer::WINDOW_LEVEL_INTERACTION :
+        	this->StartWindowLevel();
+        	this->WindowLevelWheelForward();
+        	this->EndWindowLevel();
+        	break;
+        */
+        case vtkGinkgoImageViewer::SELECT_INTERACTION :
+                this->StartZSliceMove();
+                this->ZSliceWheelForward();
+                this->EndZSliceMove();
+                break;
+        case vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION :
+                factor = 10.0 * 0.2 * this->MouseWheelMotionFactor;
+                DoZoom(factor);
+                break;
+        /*
+        case vtkGinkgoImageViewer::FULL_PAGE_INTERACTION :
+
+        	break;
+        */
+        case vtkGinkgoImageViewer::ZOOM_INTERACTION :
+                factor = 10.0 * 0.2 * this->MouseWheelMotionFactor;
+                DoZoom(factor);
+                break;
+
+        default:
+                break;
+        }
+
+}
+
+void GinkgoInteractorStyleImage2D::OnMouseWheelBackward()
+{
+        int x = this->Interactor->GetEventPosition()[0];
+        int y = this->Interactor->GetEventPosition()[1];
+
+        double factor = 0.0;
+
+        this->FindPokedRenderer(x, y);
+
+        if (this->CurrentRenderer == NULL) {
+                return;
+        }
+
+
+        switch (this->View->GetWheelInteractionStyle()) {
+        /*
+        case vtkGinkgoImageViewer::WINDOW_LEVEL_INTERACTION :
+        	this->StartWindowLevel();
+        	this->WindowLevelWheelBackward();
+        	this->EndWindowLevel();
+        	break;
+        */
+        case vtkGinkgoImageViewer::SELECT_INTERACTION :
+                this->StartZSliceMove();
+                this->ZSliceWheelBackward();
+                this->EndZSliceMove();
+                break;
+        case vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION :
+                factor = 10.0 * -0.2 * this->MouseWheelMotionFactor;
+                DoZoom(factor);
+                break;
+        /*
+        case vtkGinkgoImageViewer::FULL_PAGE_INTERACTION :
+
+        break;
+        */
+        case vtkGinkgoImageViewer::ZOOM_INTERACTION :
+                factor = 10.0 * -0.2 * this->MouseWheelMotionFactor;
+                DoZoom(factor);
+                break;
+
+        default:
+                break;
+        }
+
+}
+
+void GinkgoInteractorStyleImage2D::DoZoom(double factor, bool launchTimer)
+{
+        if (TimerZoom->IsRunning()) {
+                TimerZoom->Stop();
+        }
+
+        if (this->State != VTKIS_ZOOM) {
+                this->StartZoom();
+        }
+        this->View->SyncSetZoom(pow((double) 1.1, factor) * this->View->GetZoom());
+        GetInteractor()->Render();
+
+        if (launchTimer) {
+                TimerZoom->Start(600, true);
+        }
+}
+
+
+
diff --git a/cadxcore/vtk/interactor/ginkgointeractorstyleimage2d.h b/cadxcore/vtk/interactor/ginkgointeractorstyleimage2d.h
new file mode 100644
index 0000000..43888e9
--- /dev/null
+++ b/cadxcore/vtk/interactor/ginkgointeractorstyleimage2d.h
@@ -0,0 +1,108 @@
+/*
+ *
+ *  $Id: ginkgointeractorstyleimage2d.h $
+ *  Ginkgo CADx Project
+ *
+ *  Code adapted from vtkINRIA3D
+=========================================================================
+
+Program:   vtkINRIA3D
+Module:    $Id: ginkgointeractorstyleimage2d.h $
+Language:  C++
+Author:    $Author: filus $
+Date:      $Date: 2008-01-14 09:21:23 +0100 (lun, 14 ene 2008) $
+Version:   $Revision: 608 $
+
+Copyright (c) 2007 INRIA - Asclepios Project. All rights reserved.
+See Copyright.txt for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notices for more information.
+
+=========================================================================*/
+#pragma once
+
+#include <api/api.h>
+#include <vtkInteractorStyleImage.h>
+#include "../vtkginkgoimageviewer.h"
+
+// Motion flags (See VTKIS_PICK and so on in vtkInteractorStyleImage.h)
+#define VTKIS_MEASURE      5050
+#define VTKIS_ZSLICE_MOVE  5051
+
+class wxTimer;
+
+class EXTAPI GinkgoInteractorStyleImage2D : public vtkInteractorStyleImage
+{
+public:
+        static GinkgoInteractorStyleImage2D *New();
+        vtkTypeMacro (GinkgoInteractorStyleImage2D, vtkInteractorStyleImage);
+
+        virtual void OnMouseMove();
+        virtual void OnLeftButtonDown();
+        virtual void OnLeftButtonUp();
+        virtual void OnMiddleButtonDown();
+        virtual void OnMiddleButtonUp();
+        virtual void OnRightButtonDown();
+        virtual void OnRightButtonUp();
+        virtual void OnMouseWheelForward();
+        virtual void OnMouseWheelBackward();
+        virtual void OnChar();
+
+        void SetView (vtkGinkgoImageViewer* view)
+        {
+                this->View = view;
+        }
+
+        vtkGetObjectMacro (View, vtkGinkgoImageViewer);
+        vtkSetMacro (ZSliceStep, int);
+        vtkGetMacro (ZSliceStep, int);
+
+        vtkSetMacro (WindowStep, double);
+        vtkGetMacro (WindowStep, double);
+
+        vtkSetMacro (LevelStep,  double);
+        vtkGetMacro (LevelStep,  double);
+
+        vtkSetMacro (PreviewMode,  bool);
+        vtkGetMacro (PreviewMode,  bool);
+
+
+        virtual void StartZSliceMove();
+        virtual void ZSliceMove();
+        virtual void ZSliceWheelForward();
+        virtual void ZSliceWheelBackward();
+        virtual void EndZSliceMove();
+        virtual void FullPage();
+        virtual void StartMeasure();
+        virtual void Measure();
+        virtual void EndMeasure();
+        virtual void WindowLevel ();
+        virtual void WindowLevelWheelForward ();
+        virtual void WindowLevelWheelBackward ();
+
+        void PropagateCameraFocalAndPosition();
+
+        void DoZoom(double factor, bool launchTimer = true);
+
+        vtkRenderer* GetCurrentRenderer()
+        {
+                return CurrentRenderer;
+        }
+
+protected:
+        GinkgoInteractorStyleImage2D();
+        ~GinkgoInteractorStyleImage2D();
+
+private:
+
+private:
+        vtkGinkgoImageViewer*  View;
+        int                    ZSliceStep;
+        double                 WindowStep;
+        double                 LevelStep;
+        bool						PreviewMode;
+        wxTimer*				TimerZoom;
+};
+
diff --git a/cadxcore/vtk/vtkSmartVolumeMapper.cxx b/cadxcore/vtk/vtkSmartVolumeMapper.cxx
new file mode 100644
index 0000000..f5b22d8
--- /dev/null
+++ b/cadxcore/vtk/vtkSmartVolumeMapper.cxx
@@ -0,0 +1,617 @@
+/*=========================================================================
+
+  Program:   Visualization Toolkit
+  Module:    vtkFixedPointRayCastImage.cxx
+
+  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+  All rights reserved.
+  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notice for more information.
+
+=========================================================================*/
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include "vtkSmartVolumeMapper.h"
+
+#include "vtkObjectFactory.h"
+
+#include "vtkColorTransferFunction.h"
+#include "vtkDataArray.h"
+#include "vtkFixedPointVolumeRayCastMapper.h"
+#include "vtkEventForwarderCommand.h"
+#include "vtkGPUVolumeRayCastMapper.h"
+#include "vtkImageData.h"
+#include "vtkImageResample.h"
+#include "vtkPiecewiseFunction.h"
+#include "vtkRenderer.h"
+#include "vtkRenderWindow.h"
+#include "vtkVolume.h"
+#include "vtkVolumeProperty.h"
+#include "vtkVolumeTextureMapper3D.h"
+#include <cassert>
+
+vtkStandardNewMacro( vtkSmartVolumeMapper );
+
+// ----------------------------------------------------------------------------
+// Constructor
+// ----------------------------------------------------------------------------
+vtkSmartVolumeMapper::vtkSmartVolumeMapper()
+{
+        // Default for Window / Level - no adjustment
+        this->FinalColorWindow  = 1.0;
+        this->FinalColorLevel   = 0.5;
+
+        // Our render mode is undefined at this point
+        this->CurrentRenderMode = vtkSmartVolumeMapper::UndefinedRenderMode;
+
+        // Nothing is initialized and we assume nothing is supported
+        this->Initialized        = 0;
+        this->TextureSupported   = 0;
+        this->GPUSupported       = 0;
+        this->RayCastSupported   = 0;
+        this->LowResGPUNecessary = 0;
+        this->InterpolationMode=VTK_RESLICE_CUBIC;
+
+        // Create all the mappers we might need
+        this->RayCastMapper   = vtkFixedPointVolumeRayCastMapper::New();
+        this->GPUMapper       = vtkGPUVolumeRayCastMapper::New();
+        this->MaxMemoryInBytes=this->GPUMapper->GetMaxMemoryInBytes();
+        this->MaxMemoryFraction=this->GPUMapper->GetMaxMemoryFraction();
+
+        this->TextureMapper   = vtkVolumeTextureMapper3D::New();
+        this->GPULowResMapper = vtkGPUVolumeRayCastMapper::New();
+
+        // If the render window has a desired update rate of at least 1 frame
+        // per second or more, we'll consider this interactive
+        this->InteractiveUpdateRate = 0.00001;
+
+        // This is the resample filter that may be used if we need
+        // a lower resolution version of the input for GPU rendering
+        this->GPUResampleFilter = vtkImageResample::New();
+
+        // Turn this on by default - this means that the sample spacing will be
+        // automatically computed from the spacing of the input data. This is
+        // also true for the GPU ray cast mapper.
+        this->RayCastMapper->LockSampleDistanceToInputSpacingOn();
+
+        // Default to the default mode - which will use the best option that
+        // is supported by the hardware
+        this->RequestedRenderMode = vtkSmartVolumeMapper::DefaultRenderMode;
+
+        // Keep track of what blend mode we had when we initialized and
+        // checked for hardware support - we need to recheck if the blend
+        // mode changes
+        this->InitializedBlendMode = -1;
+
+        // Create the forwarding command
+        vtkEventForwarderCommand *cb = vtkEventForwarderCommand::New();
+        cb->SetTarget(this);
+
+        // Now forward the ray caster's events
+        this->RayCastMapper->AddObserver(vtkCommand::VolumeMapperRenderStartEvent, cb);
+        this->RayCastMapper->AddObserver(vtkCommand::VolumeMapperRenderEndEvent, cb);
+        this->RayCastMapper->AddObserver(vtkCommand::VolumeMapperRenderProgressEvent, cb);
+        this->RayCastMapper->AddObserver(vtkCommand::VolumeMapperComputeGradientsStartEvent, cb);
+        this->RayCastMapper->AddObserver(vtkCommand::VolumeMapperComputeGradientsEndEvent, cb);
+        this->RayCastMapper->AddObserver(vtkCommand::VolumeMapperComputeGradientsProgressEvent, cb);
+
+        // And the texture mapper's events
+        this->TextureMapper->AddObserver(vtkCommand::StartEvent, cb);
+        this->TextureMapper->AddObserver(vtkCommand::EndEvent, cb);
+        this->TextureMapper->AddObserver(vtkCommand::ProgressEvent, cb);
+        this->TextureMapper->AddObserver(vtkCommand::VolumeMapperRenderStartEvent, cb);
+        this->TextureMapper->AddObserver(vtkCommand::VolumeMapperRenderEndEvent, cb);
+        this->TextureMapper->AddObserver(vtkCommand::VolumeMapperRenderProgressEvent, cb);
+        this->TextureMapper->AddObserver(vtkCommand::VolumeMapperComputeGradientsStartEvent, cb);
+        this->TextureMapper->AddObserver(vtkCommand::VolumeMapperComputeGradientsEndEvent, cb);
+        this->TextureMapper->AddObserver(vtkCommand::VolumeMapperComputeGradientsProgressEvent, cb);
+
+        // And the GPU mapper's events
+        // Commented out because too many events are being forwwarded
+        // put back in after that is fixed
+        /***
+        this->GPUMapper->AddObserver(vtkCommand::VolumeMapperRenderStartEvent, cb);
+        this->GPUMapper->AddObserver(vtkCommand::VolumeMapperRenderEndEvent, cb);
+        this->GPUMapper->AddObserver(vtkCommand::VolumeMapperRenderProgressEvent, cb);
+        ***/
+
+        // And the low res GPU mapper's events
+        // Commented out because too many events are being forwwarded
+        // put back in after that is fixed
+        /***
+        this->GPULowResMapper->AddObserver(vtkCommand::VolumeMapperRenderStartEvent, cb);
+        this->GPULowResMapper->AddObserver(vtkCommand::VolumeMapperRenderEndEvent, cb);
+        this->GPULowResMapper->AddObserver(vtkCommand::VolumeMapperRenderProgressEvent, cb);
+        ***/
+
+        cb->Delete();
+}
+
+// ----------------------------------------------------------------------------
+// Destructor
+// ----------------------------------------------------------------------------
+vtkSmartVolumeMapper::~vtkSmartVolumeMapper()
+{
+        this->RayCastMapper->Delete();
+        this->GPUMapper->Delete();
+        this->GPULowResMapper->Delete();
+        this->TextureMapper->Delete();
+        this->GPUResampleFilter->Delete();
+}
+
+
+// ----------------------------------------------------------------------------
+// The Render method will determine the render mode and then render using the
+// appropriate mapper. If the render mode is invalid (the user explicitly
+// chooses something that is not supported) the render will silently fail.
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::Render( vtkRenderer *ren, vtkVolume *vol )
+{
+        // Compute the render mode based on the requested
+        // render mode, available hardware, and render window's
+        // desired update rate
+        this->ComputeRenderMode(ren,vol);
+
+        vtkGPUVolumeRayCastMapper *usedMapper=0;
+
+        switch ( this->CurrentRenderMode ) {
+        case vtkSmartVolumeMapper::RayCastRenderMode:
+                this->RayCastMapper->Render(ren,vol);
+                break;
+        case vtkSmartVolumeMapper::TextureRenderMode:
+                this->TextureMapper->Render(ren,vol);
+                break;
+        case vtkSmartVolumeMapper::GPURenderMode:
+                if(this->LowResGPUNecessary) {
+                        usedMapper=this->GPULowResMapper;
+                } else {
+                        usedMapper=this->GPUMapper;
+                }
+                usedMapper->SetAutoAdjustSampleDistances(
+                        ren->GetRenderWindow()->GetDesiredUpdateRate()>=
+                        this->InteractiveUpdateRate);
+                usedMapper->Render(ren, vol);
+                break;
+        case vtkSmartVolumeMapper::InvalidRenderMode:
+                // Silently fail - a render mode that is not
+                // valid was selected so we will render nothing
+                break;
+        default:
+                vtkErrorMacro("Internal Error!");
+                break;
+        }
+}
+
+
+// ----------------------------------------------------------------------------
+// Initialize the rende
+// We need to determine whether the texture mapper or GPU mapper are supported
+// First we need to know what input scalar field we are working with to find
+// out how many components it has. If it has more than one, and we are considering
+// them to be independent components, then we know that neither the texture mapper
+// nor the GPU mapper will work.
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::Initialize(vtkRenderer *ren, vtkVolume *vol)
+{
+
+        if ( !this->GetInput() ) {
+                this->Initialized = 0;
+                return;
+        }
+
+        int usingCellColors=0;
+        vtkDataArray *scalars  = this->GetScalars(this->GetInput(), this->ScalarMode,
+                                 this->ArrayAccessMode,
+                                 this->ArrayId, this->ArrayName,
+                                 usingCellColors);
+
+        if ( scalars->GetNumberOfComponents() != 1 ) {
+                if ( vol->GetProperty()->GetIndependentComponents() ) {
+                        this->TextureSupported = 0;
+                        this->GPUSupported     = 0;
+                        if ( usingCellColors ) {
+                                this->RayCastSupported = 0;
+                        } else {
+                                this->RayCastSupported = 1;
+                        }
+                        this->Initialized      = 1;
+                        this->SupportStatusCheckTime.Modified();
+                        return;
+                }
+        }
+
+        if ( usingCellColors ) {
+                this->RayCastSupported = 0;
+        } else {
+                this->RayCastSupported = 1;
+        }
+
+        // Make the window current because we need the OpenGL context
+        vtkRenderWindow *win=ren->GetRenderWindow();
+        win->MakeCurrent();
+
+        // Have to give the texture mapper its input or else it won't report that
+        // it is supported. Texture mapper only supported for composite blend
+        if ( this->GetBlendMode() !=  vtkVolumeMapper::COMPOSITE_BLEND ) {
+                this->TextureSupported = 0;
+        } else {
+                this->ConnectMapperInput(this->TextureMapper);
+                this->TextureSupported = this->TextureMapper->IsRenderSupported(vol->GetProperty(), ren);
+        }
+
+        this->GPUSupported = this->GPUMapper->IsRenderSupported(win, vol->GetProperty());
+        this->Initialized = 1;
+        this->InitializedBlendMode = this->GetBlendMode();
+        this->SupportStatusCheckTime.Modified();
+}
+
+// ----------------------------------------------------------------------------
+// Compute the render mode based on what hardware is available, what the user
+// requested as a render mode, and the desired update rate of the render window
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::ComputeRenderMode(vtkRenderer *ren, vtkVolume *vol)
+{
+        // If we are already initialized, and the volume,
+        // volume's input, and volume's property have not
+        // changed since last time we computed the render mode,
+        // then we don't need to initialize again
+        if (!( this->Initialized &&
+               this->SupportStatusCheckTime.GetMTime() > this->GetMTime() &&
+               this->SupportStatusCheckTime.GetMTime() > vol->GetProperty()->GetMTime() &&
+               this->SupportStatusCheckTime.GetMTime() > this->GetInput()->GetMTime() &&
+               this->InitializedBlendMode == this->GetBlendMode() ) ) {
+                this->Initialize(ren,vol);
+        }
+
+
+        // Use this as the initial state to simplify the code below
+        this->CurrentRenderMode = vtkSmartVolumeMapper::InvalidRenderMode;
+
+        if ( !this->GetInput() ) {
+                return;
+        }
+
+        double scale[3];
+        double spacing[3];
+        this->GetInput()->GetSpacing(spacing);
+
+        vtkRenderWindow *win=ren->GetRenderWindow();
+
+        switch ( this->RequestedRenderMode ) {
+        // Requested ray casting - OK as long as it is supported
+        // This ray caster is a software mapper so it is supported as
+        // we aren't attempting to render cell scalars
+        case vtkSmartVolumeMapper::RayCastRenderMode:
+                if ( this->RayCastSupported ) {
+                        this->CurrentRenderMode = vtkSmartVolumeMapper::RayCastRenderMode;
+                }
+                break;
+
+        // Requested 3D texture - OK as long as it is supported
+        case vtkSmartVolumeMapper::TextureRenderMode:
+                if ( this->TextureSupported ) {
+                        this->CurrentRenderMode = vtkSmartVolumeMapper::TextureRenderMode;
+                }
+                break;
+
+        // Requested GPU - OK as long as it is supported
+        case vtkSmartVolumeMapper::GPURenderMode:
+                if ( this->GPUSupported ) {
+                        this->CurrentRenderMode = vtkSmartVolumeMapper::GPURenderMode;
+                }
+                break;
+
+        // Requested default mode - select GPU if supported, otherwise
+        // select texture mapping for interactive rendering (if supported)
+        // and ray casting for still rendering. Make determination of
+        // still vs. interactive based on whether the desired update rate
+        // is at or above this->InteractiveUpdateRate
+        case vtkSmartVolumeMapper::DefaultRenderMode:
+                // Go with GPU rendering if it is supported
+                if ( this->GPUSupported ) {
+                        this->CurrentRenderMode = vtkSmartVolumeMapper::GPURenderMode;
+                }
+                // If this is interactive, try for texture mapping
+                else if ( win->GetDesiredUpdateRate() >= this->InteractiveUpdateRate &&
+                          this->TextureSupported ) {
+                        this->CurrentRenderMode = vtkSmartVolumeMapper::TextureRenderMode;
+                } else if ( this->RayCastSupported ) {
+                        this->CurrentRenderMode = vtkSmartVolumeMapper::RayCastRenderMode;
+                }
+                break;
+
+        // Requested the texture mapping / ray cast combo. If texture
+        // mapping is supported and this is an interactive render, then
+        // use it. Otherwise use ray casting.
+        case vtkSmartVolumeMapper::RayCastAndTextureRenderMode:
+                if ( win->GetDesiredUpdateRate() >= this->InteractiveUpdateRate &&
+                     this->TextureSupported ) {
+                        this->CurrentRenderMode = vtkSmartVolumeMapper::TextureRenderMode;
+                } else if ( this->RayCastSupported ) {
+                        this->CurrentRenderMode = vtkSmartVolumeMapper::RayCastRenderMode;
+                }
+                break;
+
+        // This should never happen since the SetRequestedRenderMode
+        // protects against invalid states
+        default:
+                vtkErrorMacro("Internal Error: Invalid RequestedRenderMode");
+                break;
+        }
+
+        switch ( this->CurrentRenderMode ) {
+        // We are rendering with the vtkFixedPointVolumeRayCastMapper
+        case vtkSmartVolumeMapper::RayCastRenderMode:
+                this->ConnectMapperInput(this->RayCastMapper);
+                this->RayCastMapper->SetClippingPlanes(this->GetClippingPlanes());
+                this->RayCastMapper->SetCropping(this->GetCropping());
+                this->RayCastMapper->SetCroppingRegionPlanes(
+                        this->GetCroppingRegionPlanes());
+                this->RayCastMapper->SetCroppingRegionFlags(
+                        this->GetCroppingRegionFlags());
+                this->RayCastMapper->SetBlendMode( this->GetBlendMode() );
+                this->RayCastMapper->SetFinalColorWindow(this->FinalColorWindow);
+                this->RayCastMapper->SetFinalColorLevel(this->FinalColorLevel);
+                break;
+
+        // We are rendering with the vtkVolumeTextureMapper3D
+        case vtkSmartVolumeMapper::TextureRenderMode:
+                this->ConnectMapperInput(this->TextureMapper);
+                if ( this->RequestedRenderMode == vtkSmartVolumeMapper::DefaultRenderMode ||
+                     this->RequestedRenderMode == vtkSmartVolumeMapper::RayCastAndTextureRenderMode ) {
+                        this->TextureMapper->SetSampleDistance( static_cast<float>((spacing[0] + spacing[1] + spacing[2] ) / 2.0) );
+                } else {
+                        this->TextureMapper->SetSampleDistance( static_cast<float>((spacing[0] + spacing[1] + spacing[2] ) / 6.0) );
+                }
+                this->TextureMapper->SetClippingPlanes(this->GetClippingPlanes());
+                this->TextureMapper->SetCropping(this->GetCropping());
+                this->TextureMapper->SetCroppingRegionPlanes(
+                        this->GetCroppingRegionPlanes());
+                this->TextureMapper->SetCroppingRegionFlags(
+                        this->GetCroppingRegionFlags());
+                // TextureMapper does not support FinalColor Window/Level.
+                break;
+
+        // We are rendering with the vtkGPUVolumeRayCastMapper
+        case vtkSmartVolumeMapper::GPURenderMode:
+                this->GPUMapper->SetMaxMemoryInBytes(this->MaxMemoryInBytes);
+                this->GPUMapper->SetMaxMemoryFraction(this->MaxMemoryFraction);
+                this->GPUMapper->SetSampleDistance(
+                        static_cast<float>((spacing[0] + spacing[1] + spacing[2] ) / 6.0) );
+                this->ConnectMapperInput(this->GPUMapper);
+                this->GPUMapper->SetClippingPlanes(this->GetClippingPlanes());
+                this->GPUMapper->SetCropping(this->GetCropping());
+                this->GPUMapper->SetCroppingRegionPlanes(
+                        this->GetCroppingRegionPlanes());
+                this->GPUMapper->SetCroppingRegionFlags(
+                        this->GetCroppingRegionFlags());
+                this->GPUMapper->SetBlendMode( this->GetBlendMode() );
+                this->GPUMapper->SetFinalColorWindow(this->FinalColorWindow);
+                this->GPUMapper->SetFinalColorLevel(this->FinalColorLevel);
+
+                // Make the window current because we need the OpenGL context
+                win->MakeCurrent();
+
+                // Now we need to find out if we need to use a low resolution
+                // version of the mapper for interactive rendering. This is true
+                // if the GPU mapper cannot hand the size of the volume.
+                this->GPUMapper->GetReductionRatio(scale);
+
+                // if any of the scale factors is not 1.0, then we do need
+                // to use the low res mapper for interactive rendering
+                if ( scale[0] != 1.0 || scale[1] != 1.0 || scale[2] != 1.0 ) {
+                        this->LowResGPUNecessary = 1;
+                        this->ConnectFilterInput(this->GPUResampleFilter);
+                        this->GPUResampleFilter->SetInterpolationMode(this->InterpolationMode);
+                        this->GPUResampleFilter->SetAxisMagnificationFactor( 0, scale[0]/2.0 );
+                        this->GPUResampleFilter->SetAxisMagnificationFactor( 1, scale[1]/2.0 );
+                        this->GPUResampleFilter->SetAxisMagnificationFactor( 2, scale[2]/2.0 );
+
+                        this->GPULowResMapper->SetMaxMemoryInBytes(this->MaxMemoryInBytes);
+                        this->GPULowResMapper->SetMaxMemoryFraction(this->MaxMemoryFraction);
+                        this->GPULowResMapper->SetSampleDistance(
+                                static_cast<float>((spacing[0] + spacing[1] + spacing[2] ) / 6.0) );
+
+                        this->GPULowResMapper->SetInputConnection(
+                                this->GPUResampleFilter->GetOutputPort());
+                        this->GPULowResMapper->SetClippingPlanes(this->GetClippingPlanes());
+                        this->GPULowResMapper->SetCropping(this->GetCropping());
+                        this->GPULowResMapper->SetCroppingRegionPlanes(
+                                this->GetCroppingRegionPlanes());
+                        this->GPULowResMapper->SetCroppingRegionFlags(
+                                this->GetCroppingRegionFlags());
+                        this->GPULowResMapper->SetBlendMode( this->GetBlendMode() );
+                        this->GPULowResMapper->SetFinalColorWindow(this->FinalColorWindow);
+                        this->GPULowResMapper->SetFinalColorLevel(this->FinalColorLevel);
+                } else {
+                        this->LowResGPUNecessary = 0;
+                }
+
+                break;
+
+        // The user selected a RequestedRenderMode that is
+        // not supported. In this case the mapper will just
+        // silently fail.
+        case vtkSmartVolumeMapper::InvalidRenderMode:
+                break;
+
+        // This should never happen since we don't set the CurrentRenderMode
+        // to anything other than the above handled options
+        default:
+                vtkErrorMacro("Internal Error: Invalid CurrentRenderMode");
+                break;
+        }
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::ConnectMapperInput(vtkVolumeMapper *m)
+{
+        assert("pre: m_exists" && m!=0);
+
+        vtkImageData *input2=m->GetInput();
+        bool needShallowCopy=false;
+        if(input2==0) {
+                // make sure we not create a shallow copy each time to avoid
+                // performance penalty.
+                input2=vtkImageData::New();
+                m->SetInputData(input2);
+                input2->Delete();
+                needShallowCopy=true;
+        } else {
+                needShallowCopy=input2->GetMTime()<this->GetInput()->GetMTime();
+        }
+        if(needShallowCopy) {
+                input2->ShallowCopy(this->GetInput());
+        }
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::ConnectFilterInput(vtkImageResample *f)
+{
+        assert("pre: f_exists" && f!=0);
+
+        vtkImageData *input2=static_cast<vtkImageData *>(f->GetInput());
+        bool needShallowCopy=false;
+        if(input2==0) {
+                // make sure we not create a shallow copy each time to avoid
+                // performance penalty.
+                input2=vtkImageData::New();
+                f->SetInputData(input2);
+                input2->Delete();
+                needShallowCopy=true;
+        } else {
+                needShallowCopy=input2->GetMTime()<this->GetInput()->GetMTime();
+        }
+        if(needShallowCopy) {
+                input2->ShallowCopy(this->GetInput());
+        }
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::SetRequestedRenderMode(int mode)
+{
+        // If we aren't actually changing it, just return
+        if ( this->RequestedRenderMode == mode ) {
+                return;
+        }
+
+        // Make sure it is a valid mode
+        if ( mode < vtkSmartVolumeMapper::DefaultRenderMode ||
+             mode > vtkSmartVolumeMapper::GPURenderMode ) {
+                vtkErrorMacro("Invalid Render Mode.");
+                return;
+        }
+
+        this->RequestedRenderMode = mode;
+        this->Modified();
+
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::SetRequestedRenderModeToDefault()
+{
+        this->SetRequestedRenderMode(vtkSmartVolumeMapper::DefaultRenderMode);
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::SetRequestedRenderModeToRayCastAndTexture()
+{
+        this->SetRequestedRenderMode(
+                vtkSmartVolumeMapper::RayCastAndTextureRenderMode );
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::SetRequestedRenderModeToRayCast()
+{
+        this->SetRequestedRenderMode(vtkSmartVolumeMapper::RayCastRenderMode);
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::ReleaseGraphicsResources(vtkWindow *w)
+{
+        this->RayCastMapper->ReleaseGraphicsResources(w);
+        this->TextureMapper->ReleaseGraphicsResources(w);
+        this->GPUMapper->ReleaseGraphicsResources(w);
+        this->GPULowResMapper->ReleaseGraphicsResources(w);
+
+        this->Initialized      = 0;
+        this->TextureSupported = 0;
+        this->GPUSupported     = 0;
+        this->RayCastSupported = 0;
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::SetInterpolationModeToNearestNeighbor()
+{
+        this->SetInterpolationMode(VTK_RESLICE_NEAREST);
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::SetInterpolationModeToLinear()
+{
+        this->SetInterpolationMode(VTK_RESLICE_LINEAR);
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::SetInterpolationModeToCubic()
+{
+        this->SetInterpolationMode(VTK_RESLICE_CUBIC);
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::CreateCanonicalView(
+        vtkRenderer *ren,
+        vtkVolume *volume,
+        vtkVolume *volume2,
+        vtkImageData *image,
+        int blend_mode,
+        double viewDirection[3],
+        double viewUp[3])
+{
+        this->ComputeRenderMode(ren, volume);
+
+        if ( this->CurrentRenderMode == vtkSmartVolumeMapper::GPURenderMode ) {
+                vtkVolumeProperty *savedProperty = volume->GetProperty();
+                volume->SetProperty(volume2->GetProperty());
+                volume->GetProperty()->Modified();
+                volume->GetProperty()->GetScalarOpacity()->Modified();
+                volume->GetProperty()->GetRGBTransferFunction()->Modified();
+                this->GPUMapper->CreateCanonicalView(ren, volume,
+                                                     image, blend_mode,
+                                                     viewDirection, viewUp);
+                volume->SetProperty(savedProperty);
+                volume->GetProperty()->Modified();
+                volume->GetProperty()->GetScalarOpacity()->Modified();
+                volume->GetProperty()->GetRGBTransferFunction()->Modified();
+        } else if ( this->RayCastSupported ) {
+                this->RayCastMapper->CreateCanonicalView(volume2,
+                                image, blend_mode,
+                                viewDirection, viewUp);
+        } else {
+                vtkErrorMacro("Could not create image - no available mapper");
+        }
+}
+
+// ----------------------------------------------------------------------------
+int vtkSmartVolumeMapper::GetLastUsedRenderMode()
+{
+        return this->CurrentRenderMode;
+}
+
+// ----------------------------------------------------------------------------
+void vtkSmartVolumeMapper::PrintSelf(ostream& os, vtkIndent indent)
+{
+        this->Superclass::PrintSelf(os,indent);
+
+        os << "FinalColorWindow: " << this->FinalColorWindow << endl;
+        os << "FinalColorLevel: " << this->FinalColorLevel << endl;
+        os << "RequestedRenderMode: " << this->RequestedRenderMode << endl;
+        os << "InteractiveUpdateRate: " << this->InteractiveUpdateRate << endl;
+        os << "InterpolationMode: " << this->InterpolationMode << endl;
+        os << "MaxMemoryInBytes:" << this->MaxMemoryInBytes << endl;
+        os << "MaxMemoryFraction:" << this->MaxMemoryFraction << endl;
+}
diff --git a/cadxcore/vtk/vtkSmartVolumeMapper.h b/cadxcore/vtk/vtkSmartVolumeMapper.h
new file mode 100644
index 0000000..ea83c1b
--- /dev/null
+++ b/cadxcore/vtk/vtkSmartVolumeMapper.h
@@ -0,0 +1,342 @@
+/*=========================================================================
+
+  Program:   Visualization Toolkit
+  Module:    vtkFixedPointRayCastImage.h
+
+  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+  All rights reserved.
+  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+     This software is distributed WITHOUT ANY WARRANTY; without even
+     the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+     PURPOSE.  See the above copyright notice for more information.
+
+=========================================================================*/
+// .NAME vtkSmartVolumeMapper - Adaptive volume mapper
+// .SECTION Description
+// vtkSmartVolumeMapper is a volume mapper that will delegate to a specific
+// volume mapper based on rendering parameters and available hardware. Use the
+// SetRequestedRenderMode() method to control the behavior of the selection.
+// The following options are available:
+//
+//  vtkSmartVolumeMapper::DefaultRenderMode:
+//          Allow the vtkSmartVolumeMapper to select the best mapper based on
+//          rendering parameters and hardware support. If GPU ray casting is
+//          supported, this mapper will be used for all rendering. If not,
+//          then if 3D texture mapping is supported, it will be used for
+//          interactive rendering and the vtkFixedPointRayCastMapper will be
+//          used for still rendering. If 3D texture mapping is not supported,
+//          then the vtkFixedPointRayCastMapper will be used exclusively.
+//          This is the default requested render mode, and is generally the
+//          best option. When you use this option, your volume will always
+//          be rendered, but the method used to render it may vary based
+//          on parameters and platform.
+//
+//  vtkSmartVolumeMapper::RayCastAndTextureRenderMode:
+//          Use the vtkVolumeTextureMapper3D for interactive rendering,
+//          and the vtkFixedPointVolumeRayCastMapper for still renders.
+//          If 3D texture mapping is not supported, then the ray
+//          caster will be used exclusively. When you use this option your
+//          volume will always be rendered, but the method used for
+//          interactive rendering will vary based on parameters and
+//          platform. The decision on whether a particular render is
+//          interactive or still is based on the adjustable parameter
+//          InteractiveUpdateRate. If the DesiredUpdateRate found in the
+//          vtkRenderWindow that initiated the Render is at or above
+//          the InteractiveUpdateRate value, then the render is considered
+//          interactive, otherwise it is considered a still render.
+//
+//  vtkSmartVolumeMapper::RayCastRenderMode:
+//          Use the vtkFixedPointVolumeRayCastMapper for both interactive and
+//          still rendering. When you use this option your volume will always
+//          be rendered with the vtkFixedPointVolumeRayCastMapper.
+//
+//  vtkSmartVolumeMapper::TextureRenderMode:
+//          Use the vtkVolumeTextureMapper3D, if supported, for both
+//          interactive and still rendering. If 3D texture mapping is not
+//          supported (either by the hardware, or due to the rendering
+//          parameters) then no image will be rendered. Use this option only
+//          if you have already checked for support based on the current
+//          hardware, number of scalar components, and rendering parameters
+//          in the vtkVolumeProperty. Also note that the
+//          vtkVolumeTextureMapper3D does not support window / level
+//          operations on the final image, so FinalColorWindow must be at
+//          the default value of 1.0 and FinalColorLevel must be at the
+//          default value of 0.5.
+//
+//  vtkSmartVolumeMapper::GPURenderMode:
+//          Use the vtkGPUVolumeRayCastMapper, if supported, for both
+//          interactive and still rendering. If the GPU ray caster is not
+//          supported (due to hardware limitations or rendering parameters)
+//          then no image will be rendered. Use this option only if you have
+//          already checked for supported based on the current hardware,
+//          number of scalar components, and rendering parameters in the
+//          vtkVolumeProperty.
+//
+//  You can adjust the contrast and brightness in the rendered image using the
+//  FinalColorWindow and FinalColorLevel ivars. By default the
+//  FinalColorWindow is set to 1.0, and the FinalColorLevel is set to 0.5,
+//  which applies no correction to the computed image. To apply the window /
+//  level operation to the computer image color, first a Scale and Bias
+//  value are computed:
+//
+//  scale = 1.0 / this->FinalColorWindow
+//  bias  = 0.5 - this->FinalColorLevel / this->FinalColorWindow
+//
+//  To compute a new color (R', G', B', A') from an existing color (R,G,B,A)
+//  for a pixel, the following equation is used:
+//
+//  R' = R*scale + bias*A
+//  G' = G*scale + bias*A
+//  B' = B*scale + bias*A
+//  A' = A
+//
+// Note that bias is multiplied by the alpha component before adding because
+// the red, green, and blue component of the color are already pre-multiplied
+// by alpha. Also note that the window / level operation leaves the alpha
+// component unchanged - it only adjusts the RGB values.
+//
+//-----------------------------------------------------------------------------
+
+#ifndef __vtkSmartVolumeMapper_h
+#define __vtkSmartVolumeMapper_h
+
+#include "vtkVolumeMapper.h"
+#include "vtkImageReslice.h" // for VTK_RESLICE_NEAREST, VTK_RESLICE_CUBIC
+#include <api/api.h>
+
+class vtkFixedPointVolumeRayCastMapper;
+class vtkGPUVolumeRayCastMapper;
+class vtkImageResample;
+class vtkRenderWindow;
+class vtkVolume;
+class vtkVolumeProperty;
+class vtkVolumeTextureMapper3D;
+
+class EXTAPI vtkSmartVolumeMapper : public vtkVolumeMapper
+{
+public:
+        static vtkSmartVolumeMapper *New();
+        vtkTypeMacro(vtkSmartVolumeMapper,vtkVolumeMapper);
+        void PrintSelf( ostream& os, vtkIndent indent );
+
+        // Description:
+        // Set the final color window. This controls the contrast of
+        // the image. The default value is 1.0. The Window can be
+        // negative (this causes a "negative" effect on the image)
+        // Although Window can be set to 0.0, any value less than
+        // 0.00001 and greater than or equal to 0.0 will be set to
+        // 0.00001, and any value greater than -0.00001 but less
+        // than or equal to 0.0 will be set to -0.00001.
+        // Initial value is 1.0.
+        vtkSetMacro( FinalColorWindow, float );
+
+        // Description:
+        // Get the final color window. Initial value is 1.0.
+        vtkGetMacro( FinalColorWindow, float );
+
+        // Description:
+        // Set the final color level. The level controls the
+        // brightness of the image. The final color window will
+        // be centered at the final color level, and together
+        // represent a linear remapping of color values. The
+        // default value for the level is 0.5.
+        vtkSetMacro( FinalColorLevel,  float );
+
+        // Description:
+        // Get the final color level.
+        vtkGetMacro( FinalColorLevel,  float );
+
+//BTX
+// The possible values for the default and current render mode ivars
+        enum {
+                DefaultRenderMode=0,
+                RayCastAndTextureRenderMode,
+                RayCastRenderMode,
+                TextureRenderMode,
+                GPURenderMode,
+                UndefinedRenderMode,
+                InvalidRenderMode
+        };
+//ETX
+
+        // Description:
+        // Set the requested render mode. The default is
+        // vtkSmartVolumeMapper::DefaultRenderMode.
+        void SetRequestedRenderMode(int mode);
+
+        // Description:
+        // Set the requested render mode to vtkSmartVolumeMapper::DefaultRenderMode.
+        // This is the best option for an application that must adapt to different
+        // data types, harware, and rendering parameters.
+        void SetRequestedRenderModeToDefault();
+
+        // Description:
+        // Set the requested render mode to
+        // vtkSmartVolumeMapper::RayCastAndTextureRenderMode.
+        // This is a good option if you want to avoid using advanced OpenGL
+        // functionality, but would still like to used 3D texture mapping, if
+        // available, for interactive rendering.
+        void SetRequestedRenderModeToRayCastAndTexture();
+
+        // Description:
+        // Set the requested render mode to vtkSmartVolumeMapper::RayCastRenderMode.
+        // This option will use software rendering exclusively. This is a good option
+        // if you know there is no hardware acceleration.
+        void SetRequestedRenderModeToRayCast();
+
+        // Description:
+        // Get the requested render mode.
+        vtkGetMacro( RequestedRenderMode, int );
+
+        // Description:
+        // Set the rate at or above this render will be considered interactive.
+        // If the DesiredUpdateRate of the vtkRenderWindow that caused the Render
+        // falls at or above this rate, the render is considered interactive and
+        // the mapper may be adjusted (depending on the render mode).
+        // Initial value is 1.0e-5.
+        vtkSetClampMacro( InteractiveUpdateRate, double, 1.0e-10, 1.0e10 );
+
+        // Description:
+        // Get the update rate at or above which this is considered an
+        // interactive render.
+        // Initial value is 1.0e-5.
+        vtkGetMacro( InteractiveUpdateRate, double );
+
+        // Description:
+        // This will return the render mode used during the previous call to
+        // Render().
+        int GetLastUsedRenderMode();
+
+        // Description:
+        // Value passed to the GPU mapper. Ignored by other mappers.
+        // Maximum size of the 3D texture in GPU memory.
+        // Will default to the size computed from the graphics
+        // card. Can be adjusted by the user.
+        // Useful if the automatic detection is defective or missing.
+        vtkSetMacro( MaxMemoryInBytes, vtkIdType );
+        vtkGetMacro( MaxMemoryInBytes, vtkIdType );
+
+        // Description:
+        // Value passed to the GPU mapper. Ignored by other mappers.
+        // Maximum fraction of the MaxMemoryInBytes that should
+        // be used to hold the texture. Valid values are 0.1 to
+        // 1.0.
+        vtkSetClampMacro( MaxMemoryFraction, float, 0.1f, 1.0f );
+        vtkGetMacro( MaxMemoryFraction, float );
+
+        // Description:
+        // Set interpolation mode for downsampling (lowres GPU)
+        // (initial value: cubic).
+        vtkSetClampMacro(InterpolationMode, int,
+                         VTK_RESLICE_NEAREST, VTK_RESLICE_CUBIC);
+        vtkGetMacro(InterpolationMode, int);
+        void SetInterpolationModeToNearestNeighbor();
+        void SetInterpolationModeToLinear();
+        void SetInterpolationModeToCubic();
+
+        // Description:
+        // This method can be used to render a representative view of the input data
+        // into the supplied image given the supplied blending mode, view direction,
+        // and view up vector.
+        void CreateCanonicalView( vtkRenderer *ren,
+                                  vtkVolume *volume,
+                                  vtkVolume *volume2,
+                                  vtkImageData *image,
+                                  int blend_mode,
+                                  double viewDirection[3],
+                                  double viewUp[3] );
+
+
+//BTX
+        // Description:
+        // WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE
+        // Initialize rendering for this volume.
+        void Render( vtkRenderer *, vtkVolume * );
+
+        // Description:
+        // WARNING: INTERNAL METHOD - NOT INTENDED FOR GENERAL USE
+        // Release any graphics resources that are being consumed by this mapper.
+        // The parameter window could be used to determine which graphic
+        // resources to release.
+        void ReleaseGraphicsResources(vtkWindow *);
+//ETX
+
+protected:
+        vtkSmartVolumeMapper();
+        ~vtkSmartVolumeMapper();
+
+        // Description:
+        // Connect input of the vtkSmartVolumeMapper to the input of the
+        // internal volume mapper by doing a shallow to avoid memory leaks.
+        // \pre m_exists: m!=0
+        void ConnectMapperInput(vtkVolumeMapper *m);
+
+        // Description:
+        // Connect input of the vtkSmartVolumeMapper to the input of the
+        // internal resample filter by doing a shallow to avoid memory leaks.
+        // \pre m_exists: f!=0
+        void ConnectFilterInput(vtkImageResample *f);
+
+        // Window / level ivars
+        float   FinalColorWindow;
+        float   FinalColorLevel;
+
+        // GPU mapper-specific memory ivars.
+        vtkIdType MaxMemoryInBytes;
+        float MaxMemoryFraction;
+
+        // Used for downsampling.
+        int InterpolationMode;
+
+        // The requested render mode is used to compute the current render mode. Note
+        // that the current render mode can be invalid if the requested mode is not
+        // supported.
+        int     RequestedRenderMode;
+        int     CurrentRenderMode;
+
+        // Initialization variables.
+        int          Initialized;
+        vtkTimeStamp SupportStatusCheckTime;
+        int          TextureSupported;
+        int          GPUSupported;
+        int          RayCastSupported;
+        int          LowResGPUNecessary;
+
+        // This is the resample filter that may be used if we need to
+        // create a low resolution version of the volume for GPU rendering
+        vtkImageResample *GPUResampleFilter;
+
+        // If the DesiredUpdateRate of the vtkRenderWindow causing the Render is at
+        // or above this value, the render is considered interactive. Otherwise it is
+        // considered still.
+        double InteractiveUpdateRate;
+
+        // The initialize method. Called from ComputeRenderMode whenever something
+        // relavent has changed.
+        void  Initialize(vtkRenderer *ren,
+                         vtkVolume *vol);
+
+        // The method that computes the render mode from the requested render mode
+        // based on the support status for each render method.
+        void  ComputeRenderMode(vtkRenderer *ren,
+                                vtkVolume *vol);
+
+        // The three potential mappers
+        vtkGPUVolumeRayCastMapper      *GPULowResMapper;
+        vtkGPUVolumeRayCastMapper      *GPUMapper;
+        vtkFixedPointVolumeRayCastMapper  *RayCastMapper;
+        vtkVolumeTextureMapper3D          *TextureMapper;
+
+
+        // We need to keep track of the blend mode we had when we initialized
+        // because we need to reinitialize (and recheck hardware support) if
+        // it changes
+        int  InitializedBlendMode;
+
+private:
+        vtkSmartVolumeMapper(const vtkSmartVolumeMapper&);  // Not implemented.
+        void operator=(const vtkSmartVolumeMapper&);  // Not implemented.
+};
+
+#endif
diff --git a/cadxcore/vtk/vtkginkgoimageviewer.cpp b/cadxcore/vtk/vtkginkgoimageviewer.cpp
new file mode 100644
index 0000000..7ebde1a
--- /dev/null
+++ b/cadxcore/vtk/vtkginkgoimageviewer.cpp
@@ -0,0 +1,2569 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <limits>
+#include <sstream>
+#include <iostream>
+#include <stdlib.h>
+#include <cmath>
+
+#include <wx/wxprec.h>
+
+#include <api/globals.h>
+#include <api/controllers/icontroladorcarga.h>
+#include <api/math/geometry.h>
+#include <api/math/geometry3d.h>
+#include <api/utils/iginkgomatrix4x4.h>
+
+#include <main/controllers/controladorlog.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include "vtkginkgoimageviewer.h"
+#include "vtkopenglginkgotexture.h"
+#include "interactor/ginkgointeractorstyleimage2d.h"
+#include "command/ginkgoimagecommand.h"
+
+#include <vtkRenderer.h>
+#include <vtkRenderWindow.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkInteractorStyle.h>
+
+#include <vtkObjectFactory.h>
+#include <vtkInformation.h>
+#include <vtkAlgorithmOutput.h>
+#include <vtkImageData.h>
+#include <vtkImageReslice.h>
+#include <vtkActor.h>
+#include <vtkProperty.h>
+
+#include <vtkImageMapToColors.h>
+#include <vtkScalarsToColors.h>
+#include <vtkImageMapToWindowLevelColors.h>
+#include <vtkActor.h>
+#include <vtkImageActor.h>
+#include <vtkAlgorithm.h>
+#include <vtkInformation.h>
+#include <vtkDebugLeaks.h>
+#include <vtkCamera.h>
+#include <vtkProperty.h>
+#include <vtkPlaneSource.h>
+#include <vtkPlane.h>
+#include <vtkPolyDataMapper.h>
+
+#include <VTKInria3D/vtkVISUManagement/vtkLookupTableManager.h>
+
+#include <vtkAlgorithmOutput.h>
+#include <vtkDataSetAttributes.h>
+#include <vtkExecutive.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
+#include <vtkStreamingDemandDrivenPipeline.h>
+#include <vtkImageDataStreamer.h>
+#include <vtkOpenGLTexture.h>
+#include <vtkMatrix3x3.h>
+#include <vtkMatrix4x4.h>
+#include <vtkPointData.h>
+
+//#define DEBUG_PIPELINE
+
+#include <vtkCellArray.h>
+#include <vtkDoubleArray.h>
+
+#define VTK_GINKGO_ZOOM_MIN 0.25f
+#define VTK_GINKGO_ZOOM_MAX 200
+
+class vtkGinkgoTexture : public vtkOpenGLTexture
+{
+protected:
+        vtkGinkgoTexture() : m_IdTextura(-1),  m_vtkRenderWindow(NULL) {}
+
+        ~vtkGinkgoTexture() {}
+public:
+
+        static vtkGinkgoTexture *New();
+
+        vtkTypeMacro(vtkGinkgoTexture,vtkOpenGLTexture);
+
+        long GetTextureId() const
+        {
+                return Index;
+        }
+
+        //indica si la textura tiene id (se ha intentado cargar)
+        bool TextureDefined() const
+        {
+                return Index != 0;
+        }
+
+        operator long () const
+        {
+                return Index;
+        }
+
+protected:
+        long m_IdTextura;
+
+        vtkRenderWindow *m_vtkRenderWindow;
+};
+
+vtkStandardNewMacro(vtkGinkgoTexture);
+
+#if defined(DEBUG_PIPELINE)
+static vtkIdType pts[6][4]= {{0,1,2,3}, {4,5,6,7}, {0,1,5,4}, {1,2,6,5}, {2,3,7,6}, {3,0,4,7}};
+#endif
+
+class Pipeline
+{
+public:
+        vtkSmartPointer<vtkAlgorithmOutput>             InputConnection;
+        vtkSmartPointer<vtkRenderer>                    Renderer;
+        vtkSmartPointer<vtkRenderWindowInteractor>      RenderWindowInteractor;
+        vtkSmartPointer<vtkRenderWindow>                RenderWindow;
+
+
+        vtkSmartPointer<vtkInteractorStyle>             InteractorStyle;
+
+        vtkSmartPointer<vtkImageData>                   ImageData;
+        vtkSmartPointer<vtkImageData>                   OverlayData;
+        vtkSmartPointer<vtkActor>                       ImageActor;
+#if defined(DEBUG_PIPELINE)
+
+        GNC::GCS::Vector3D coords[8];
+
+        vtkSmartPointer<vtkPolyData>                    DebugVolumePolyData;
+        vtkSmartPointer<vtkPoints>                      DebugVolumePoints;
+        vtkSmartPointer<vtkCellArray>                   DebugVolumePolys;
+        vtkSmartPointer<vtkDoubleArray>                 DebugVolumeScalars;
+
+        vtkSmartPointer<vtkPolyDataMapper>              DebugVolumeMapper;
+        vtkSmartPointer<vtkActor>                       DebugVolumeActor;
+#endif
+        vtkSmartPointer<vtkActor>                       OverlayActor;
+        vtkSmartPointer<vtkPlaneSource>                 PlaneSource;
+        vtkSmartPointer<vtkProperty>                    PlaneProperty;
+        vtkSmartPointer<vtkPlane>                       Plane;
+        vtkSmartPointer<vtkGinkgoOpenGLTexture>         Textura;
+        vtkSmartPointer<vtkPolyDataMapper>              MapperPlano;
+        vtkSmartPointer<vtkGinkgoTexture>               TexturaOverlay;
+        vtkSmartPointer<vtkPolyDataMapper>              MapperPlanoOverlay;
+
+        vtkSmartPointer<vtkImageMapToWindowLevelColors> WindowLevel;
+
+        vtkSmartPointer<vtkScalarsToColors>             LookupTable;
+        int                                             LookupTableId;
+
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> ModelMatrix;
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> ModelMatrixInv;
+
+        Pipeline();
+        ~Pipeline();
+        void ResetMatrices();
+
+};
+
+Pipeline::Pipeline(): ModelMatrix(GNC::GCS::IGinkgoMatrix4x4::New()),
+        ModelMatrixInv(GNC::GCS::IGinkgoMatrix4x4::New())
+{
+        ImageActor      = vtkSmartPointer<vtkActor>::New();
+
+#if defined(DEBUG_PIPELINE)
+
+        DebugVolumePolyData = vtkSmartPointer<vtkPolyData>::New();
+        DebugVolumePoints = vtkSmartPointer<vtkPoints>::New();
+        DebugVolumePolys = vtkSmartPointer<vtkCellArray>::New();
+        DebugVolumeScalars = vtkSmartPointer<vtkDoubleArray>::New();
+        DebugVolumeMapper = vtkSmartPointer<vtkPolyDataMapper>::New();
+        DebugVolumeActor = vtkSmartPointer<vtkActor>::New();
+
+        for (int i=0; i<8; i++) DebugVolumePoints->InsertPoint(i, 0, 0, 0);
+        for (int i=0; i<6; i++) DebugVolumePolys->InsertNextCell(4, pts[i]);
+        for (int i=0; i<8; i++) DebugVolumeScalars->InsertTuple1(i,i);
+
+        DebugVolumePolyData->SetPoints(DebugVolumePoints);
+        DebugVolumePolyData->SetPolys(DebugVolumePolys);
+        DebugVolumePolyData->GetPointData()->SetScalars(DebugVolumeScalars);
+        DebugVolumeMapper->SetInput(DebugVolumePolyData);
+        DebugVolumeMapper->SetScalarVisibility(0);
+        DebugVolumeActor->SetMapper(DebugVolumeMapper);
+        DebugVolumeActor->GetProperty()->SetRepresentationToWireframe();
+
+#endif
+
+        OverlayActor    = vtkSmartPointer<vtkActor>::New();
+        PlaneProperty   = vtkSmartPointer<vtkProperty>::New();
+
+        PlaneProperty->SetAmbient(1.0);
+        PlaneProperty->SetAmbientColor(1.0,1.0,1.0);
+        PlaneProperty->SetOpacity(1);
+
+        PlaneSource = vtkSmartPointer<vtkPlaneSource>::New();
+        PlaneSource->SetXResolution(1);
+        PlaneSource->SetYResolution(1);
+
+        Textura            = vtkSmartPointer<vtkGinkgoOpenGLTexture>::New();
+        TexturaOverlay     = vtkSmartPointer<vtkGinkgoTexture>::New();
+        MapperPlano        = vtkSmartPointer<vtkPolyDataMapper>::New();
+        MapperPlanoOverlay = vtkSmartPointer<vtkPolyDataMapper>::New();
+        Plane              = vtkSmartPointer<vtkPlane>::New();
+
+        double bounds[6];
+        bounds[0] = -0.5;
+        bounds[1] =  0.5;
+        bounds[2] = -0.5;
+        bounds[3] =  0.5;
+        bounds[4] = -0.5;
+        bounds[5] =  0.5;
+
+        double center[3];
+        center[0] = (bounds[0] + bounds[1])/2.0;
+        center[1] = (bounds[2] + bounds[3])/2.0;
+        center[2] = (bounds[4] + bounds[5])/2.0;
+
+        PlaneSource->SetOrigin(center[0],bounds[2],bounds[4]);
+        PlaneSource->SetPoint1(center[0],bounds[3],bounds[4]);
+        PlaneSource->SetPoint2(center[0],bounds[2],bounds[5]);
+
+        Textura->SetPremultipliedAlpha(1.0);
+        Textura->SetInterpolate(1);
+        Textura->RepeatOff();
+        TexturaOverlay->SetInterpolate(1);
+        TexturaOverlay->RepeatOff();
+        TexturaOverlay->MapColorScalarsThroughLookupTableOn();
+        vtkLookupTable* tblover = vtkLookupTableManager::GetOverlayLooupTable();
+        TexturaOverlay->SetLookupTable(tblover);
+        TexturaOverlay->GetLookupTable()->SetRange(0, 1);
+        tblover->Delete();
+
+        MapperPlano->SetInputData(vtkPolyData::SafeDownCast(PlaneSource->GetOutput()));
+        MapperPlano->ScalarVisibilityOff();
+        MapperPlanoOverlay->ScalarVisibilityOff();
+        MapperPlanoOverlay->SetInputData(vtkPolyData::SafeDownCast(PlaneSource->GetOutput()));
+
+        WindowLevel = vtkSmartPointer<vtkImageMapToWindowLevelColors>::New();
+
+        vtkLookupTable* tbl = vtkLookupTableManager::GetLinearLookupTable();
+        LookupTableId = vtkLookupTableManager::LUT_LINEAR;
+        LookupTable = tbl;
+
+        tbl->Delete();
+
+        ImageActor->SetMapper(MapperPlano);
+        ImageActor->SetTexture(Textura);
+        ImageActor->GetProperty()->SetLighting(false);
+        ImageActor->PickableOff();
+        ImageActor->GetProperty()->SetOpacity(1.0);
+        OverlayActor->SetMapper(MapperPlanoOverlay);
+        OverlayActor->SetTexture(TexturaOverlay);
+        OverlayActor->GetProperty()->SetLighting(false);
+        OverlayActor->PickableOff();
+
+        ResetMatrices();
+}
+
+Pipeline::~Pipeline()
+{
+        std::cout << "Pipeline::~Pipeline()\n";
+}
+
+
+void Pipeline::ResetMatrices()
+{
+        ModelMatrix->Identity();
+        ModelMatrixInv->Identity();
+}
+
+
+class Interactuacion
+{
+public:
+        int LeftButtonInteractionStyle;
+        int RightButtonInteractionStyle;
+        int MiddleButtonInteractionStyle;
+        int WheelInteractionStyle;
+
+        Interactuacion()
+        {
+                LeftButtonInteractionStyle = RightButtonInteractionStyle = MiddleButtonInteractionStyle = WheelInteractionStyle = vtkGinkgoImageViewer::ZOOM_WITH_SELECT_INTERACTION;
+        }
+};
+
+class Comportamiento
+{
+public:
+        int  InteractorStyleType;
+        bool ShowAnnotations;
+        bool ShowDirections;
+
+        ::Interactuacion Interactuacion;
+
+        Comportamiento()
+        {
+                InteractorStyleType = vtkGinkgoImageViewer::ZOOM_INTERACTION;
+                ShowAnnotations     = false;
+                ShowDirections      = false;
+        }
+
+};
+
+class Propiedades
+{
+public:
+        unsigned int Orientacion;
+        unsigned int Conventions;
+
+        GNC::GCS::Vector3D  CameraFocalPoint;
+        GNC::GCS::Vector3D  CameraPosition;
+        GNC::GCS::Vector3D  CameraViewUp;
+        double              ParallelScale;
+        bool                Interaction;
+        bool                LinkRender;
+        bool                LinkCameraFocalAndPosition;
+        bool                LinkZoom;
+
+        bool         Modificado;
+
+private:
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> DirectionCosines;
+
+public:
+
+        Propiedades(): DirectionCosines(GNC::GCS::IGinkgoMatrix4x4::New())
+        {
+                Orientacion = vtkGinkgoImageViewer::AXIAL_ID;
+                Conventions = vtkGinkgoImageViewer::RADIOLOGIC;
+                DirectionCosines->Identity();
+
+                Interaction = false;
+                LinkRender = false;
+                LinkCameraFocalAndPosition = true;
+                LinkZoom = true;
+                Modificado = true;
+                ParallelScale = 1.0;
+
+        }
+
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4>& GetDirection()
+        {
+                return DirectionCosines;
+        }
+
+        void SetDirection(const GNC::GCS::IGinkgoMatrix4x4* directionCosines)
+        {
+                DirectionCosines->DeepCopy(directionCosines);
+                Modificado = true;
+        }
+
+        void SetConventions(unsigned int c)
+        {
+                if (Conventions != c) {
+                        Conventions = c;
+                        Modificado = false;
+                }
+        }
+
+        void ResetModifiedStatus()
+        {
+                Modificado = false;
+        }
+
+
+};
+
+class Estado
+{
+public:
+
+        bool    Initialized;
+        bool    PipelineInstalled;
+        bool    FirstRender;
+
+
+        bool    DefaultWindowLevelSetted;
+        double  InitialWindow;
+        double  InitialLevel;
+
+        double  RollOffset;
+        bool    FlipHorizontal;
+        bool    FlipVertical;
+
+        double  InitialParallelScale;
+
+        bool    IsProcessed;
+
+        double  Zoom;
+
+        unsigned int CurrentNumberOfComponents;
+
+        Estado()
+        {
+
+                Initialized               = false;
+                PipelineInstalled         = false;
+                FirstRender               = true;
+
+                DefaultWindowLevelSetted  = false;
+                InitialWindow             = InitialLevel = std::numeric_limits<double>::quiet_NaN();
+
+                InitialParallelScale      = 1.0f;
+
+                IsProcessed               = false;
+
+                Zoom                      = 1.0f;
+                CurrentNumberOfComponents = 0;
+                RollOffset                = 0.0;
+                FlipHorizontal            = false;
+                FlipVertical              = false;
+        }
+};
+
+class InternalMembers
+{
+public:
+
+        ::Pipeline Pipeline;
+        ::Comportamiento Comportamiento;
+        ::Propiedades Propiedades;
+        ::Estado Estado;
+};
+
+vtkStandardNewMacro(vtkGinkgoImageViewer);
+
+
+vtkGinkgoImageViewer::vtkGinkgoImageViewer() :
+        IImagePropertiesProxy(NULL),
+        ImageSizeData(),
+        PixelSizeData(),
+        VoxelSizeData(),
+        CurrentPositionData(),
+        CurrentSliceData(),
+        CurrentPointValueData(),
+        CurrentPointPositionData(),
+        CurrentWindowLevelData(),
+        members(new InternalMembers()),
+        ambitolog("3DView")
+{
+        InitDefaultInteractor();
+}
+
+void vtkGinkgoImageViewer::InitDefaultInteractor()
+{
+        vtkSmartPointer<GinkgoInteractorStyleImage2D> interactor = vtkSmartPointer<GinkgoInteractorStyleImage2D>::New();
+        interactor->SetView(this);
+
+        vtkSmartPointer<GinkgoImageCommand> cbk = vtkSmartPointer<GinkgoImageCommand>::New();
+        cbk->SetView(this);
+        interactor->AddObserver(vtkCommand::KeyPressEvent, cbk);
+        interactor->AddObserver(GinkgoImageCommand::ZoomEvent, cbk);
+
+        SetInteractorStyle(interactor);
+}
+
+vtkGinkgoImageViewer::~vtkGinkgoImageViewer()
+{
+        if (this->GetRenderer()) {
+                this->GetRenderer()->RemoveAllViewProps();
+        }
+        delete members;
+}
+
+
+void vtkGinkgoImageViewer::PrepareForDelete(void)
+{
+        Uninitialize();
+}
+
+/**
+This function is called right after setting both Renderer and RenderWindow.
+It allows a class to add actors for instance without knowing when the Renderer
+and RenderWindow are set. For example, vtkGinkgoImageViewer will add the corner annotations
+during the call to the Initialize function.
+*/
+void vtkGinkgoImageViewer::Initialize(void)
+{
+        //std::cout << "vtkGinkgoImageViewer::Initialize()" << std::endl;
+        Pipeline& p = members->Pipeline;
+        Estado&   e = members->Estado;
+
+        if (e.Initialized) {
+                return;
+        }
+
+        if (p.Renderer) {
+                p.Renderer->SetBackground(0.0f, 0.0f, 0.0f);
+        }
+        if (p.RenderWindow && p.Renderer) {
+                p.RenderWindow->AddRenderer(p.Renderer);
+        }
+
+        if (p.RenderWindow && p.RenderWindowInteractor && p.InteractorStyle) {
+                p.RenderWindowInteractor->SetInteractorStyle(p.InteractorStyle);
+                p.RenderWindowInteractor->SetRenderWindow(p.RenderWindow);
+                e.Initialized = true;
+                SetInteractionOn();
+        }
+
+        if (p.Renderer) {
+                p.Renderer->GetActiveCamera()->ParallelProjectionOn();
+                p.Renderer->AddActor(p.ImageActor);
+#if defined(DEBUG_PIPELINE)
+                p.Renderer->AddActor(p.DebugVolumeActor);
+#endif
+                p.Renderer->AddActor(p.OverlayActor);
+                p.ImageActor->VisibilityOff();
+#if defined(DEBUG_PIPELINE)
+                p.DebugVolumeActor->VisibilityOff();
+#endif
+                p.OverlayActor->VisibilityOff();
+        }
+}
+
+void vtkGinkgoImageViewer::Uninitialize()
+{
+        Pipeline& p = members->Pipeline;
+        Estado&   e = members->Estado;
+
+        if (!e.Initialized) {
+                return;
+        }
+
+        if (p.Renderer) {
+                p.Renderer->RemoveAllViewProps();
+        }
+
+        if (p.RenderWindow && p.Renderer) {
+                p.RenderWindow->RemoveRenderer(p.Renderer);
+        }
+
+        if (p.RenderWindowInteractor) {
+                p.RenderWindowInteractor->SetInteractorStyle(NULL);
+                p.RenderWindowInteractor->SetRenderWindow(NULL);
+        }
+
+        e.Initialized = false;
+        SetInteractionOff();
+}
+
+void vtkGinkgoImageViewer::SetInteraction()
+{
+        Pipeline& p = members->Pipeline;
+        if ( p.RenderWindowInteractor ) {
+                if ( !members->Propiedades.Interaction ) {
+                        p.RenderWindowInteractor->SetInteractorStyle(NULL);
+                } else {
+                        if ( GetInteractorStyle() ) {
+                                p.RenderWindowInteractor->SetInteractorStyle(p.InteractorStyle);
+                        }
+                }
+        }
+}
+
+bool vtkGinkgoImageViewer::IsInstalledAndInitialized()
+{
+        Estado&   e = members->Estado;
+        Pipeline& p = members->Pipeline;
+
+        if (p.InputConnection != NULL || p.ImageData != NULL) {
+                return e.PipelineInstalled && e.Initialized;
+        } else {
+                return false;
+        }
+}
+
+void vtkGinkgoImageViewer::SetInteractionOff()
+{
+        Propiedades& p = members->Propiedades;
+        p.Interaction = false;
+        this->SetInteraction();
+}
+
+void vtkGinkgoImageViewer::SetInteractionOn()
+{
+        Propiedades& p = members->Propiedades;
+        p.Interaction = true;
+        this->SetInteraction();
+}
+
+bool vtkGinkgoImageViewer::GetInteraction()
+{
+        Propiedades& p = members->Propiedades;
+        return p.Interaction;
+}
+
+/**
+Detach the view, i.e. add its own children (if any) to its parent's children (if any).
+*/
+void vtkGinkgoImageViewer::Detach (void)
+{
+        vtkSmartPointer<vtkGinkgoImageViewer> parent = GetParent();
+        if ( parent ) {
+                parent->AddChildren( Children );
+                parent->RemoveChild(this);
+                Parent = NULL;
+        }
+
+        RemoveAllChildren();
+}
+
+void vtkGinkgoImageViewer::SetInput(const vtkSmartPointer<vtkImageData>& input, bool forzarSetup)
+{
+        //std::cout << "vtkGinkgoImageViewer::SetInput()" << std::endl;
+        Pipeline& p = members->Pipeline;
+        Estado&   e = members->Estado;
+        p.ImageData = input;
+        p.InputConnection = NULL;
+        if (e.PipelineInstalled || forzarSetup) {
+                SetupPipeline(forzarSetup);
+        }
+}
+
+void vtkGinkgoImageViewer::SetInputConnection(const vtkSmartPointer<vtkAlgorithmOutput>& input, bool forzarSetup)
+{
+        Pipeline& p = members->Pipeline;
+        Estado&   e = members->Estado;
+
+        p.InputConnection = input;
+        p.ImageData = NULL;
+
+        if (e.PipelineInstalled || forzarSetup) {
+                p.InputConnection->GetProducer()->UpdateInformation();
+                SetupPipeline(forzarSetup);
+        }
+}
+
+void vtkGinkgoImageViewer::RemoveInputs()
+{
+        Pipeline& p = members->Pipeline;
+        Estado&   e = members->Estado;
+
+        e.PipelineInstalled = false;
+        p.InputConnection = NULL;
+        p.ImageData = NULL;
+        p.ImageActor->VisibilityOff();
+#if defined(DEBUG_PIPELINE)
+        p.DebugVolumeActor->VisibilityOff();
+#endif
+        p.OverlayActor->VisibilityOff();
+        IImagePropertiesProxy = NULL;
+}
+
+void vtkGinkgoImageViewer::SetOverlay(const vtkSmartPointer<vtkImageData>& inputOverlay)
+{
+        //std::cout << "vtkGinkgoImageViewer::SetInputConnection()" << std::endl;
+        Pipeline& p = members->Pipeline;
+        Estado&   e = members->Estado;
+
+        p.OverlayData = inputOverlay;
+        if (e.PipelineInstalled) {
+                if (GetNumberOfComponents() == 1)  { // NC = 1. Antes era 0, 2, 3 o 4
+                        //overlay???
+                        if (p.OverlayData != NULL) {
+                                p.TexturaOverlay->SetInputData(p.OverlayData);
+                                p.TexturaOverlay->Modified();
+                                p.OverlayActor->Modified();
+                                p.OverlayActor->VisibilityOn();
+                        } else {
+                                p.OverlayActor->VisibilityOff();
+                        }
+                } else {
+                        p.OverlayActor->VisibilityOff();
+                }
+        }
+}
+
+//====================================================================================================
+
+
+void vtkGinkgoImageViewer::UpdateDisplayExtent()
+{
+        Pipeline&    p  = members->Pipeline;
+        Estado&      e  = members->Estado;
+        Propiedades& pr = members->Propiedades;
+
+
+        if (!e.Initialized || !e.PipelineInstalled) {
+                return;
+        }
+
+        GNC::GCS::Vector3D origin;
+        GNC::GCS::Vector3D spacing;
+
+
+        //if we have an input connection we take properties from proxy
+        if (p.InputConnection != NULL) {
+                if (IImagePropertiesProxy != NULL) {
+                        IImagePropertiesProxy->UpdateInformation();
+                        //std::cout << GetTickCount() << " Update direction" << std::endl;
+                        pr.SetDirection(IImagePropertiesProxy->GetOutputDirection());
+                        IImagePropertiesProxy->GetOutputOrigin(origin);
+                        IImagePropertiesProxy->GetOutputSpacing(spacing);
+                } else {
+                        LOG_ERROR("ginkgoImageViewer", "you are tying to load an image from a input connection without properties proxy");
+                }
+        } else {
+                // vtk 6 deleted this function, and since we have no InputConnection
+                // we must pray that the information doesn't need updating.
+                // p.ImageData->UpdateInformation();
+                p.ImageData->GetOrigin(origin);
+                p.ImageData->GetSpacing(spacing);
+        }
+
+#if 0
+        std::cout << "Origin  = " << origin << std::endl;
+        std::cout << "Spacing = " << spacing << std::endl;
+#endif
+
+        CurrentOrigin = origin;
+
+        p.ResetMatrices();
+
+        //build model matrix with directioncosines + spacing + origin
+
+#if defined(REAL_WORLD_IMAGE_POSITION)
+        p.ModelMatrix->DeepCopy(pr.GetDirection());
+#endif
+
+        GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4> spacingMatrix(GNC::GCS::IGinkgoMatrix4x4::New());
+        spacingMatrix->Identity();
+        spacingMatrix->SetElement(0,0, spacing.x);
+        spacingMatrix->SetElement(1,1, spacing.y);
+        spacingMatrix->SetElement(2,2, spacing.z);
+
+        p.ModelMatrix = p.ModelMatrix->Multiply4x4(spacingMatrix);
+        p.ModelMatrix->SetElement(0, 3, origin.x);
+        p.ModelMatrix->SetElement(1, 3, origin.y);
+        p.ModelMatrix->SetElement(2, 3, origin.z);
+
+        p.ModelMatrixInv = p.ModelMatrix->Invert();
+
+#if 0 && defined(_DEBUG)
+        std::cout << "Matriz Modelo:" << std::endl;
+        p.ModelMatrix->Print(std::cout);
+#endif
+
+#if 0
+        std::cout << "Matriz Modelo Invertida:" << std::endl;
+        p.ModelMatrixInv->Print(std::cout);
+#endif
+}
+
+void vtkGinkgoImageViewer::ResetCameraClippingRange(bool resetCameraPosition)
+{
+        Pipeline& p  = members->Pipeline;
+        //Propiedades& pr = members->Propiedades;
+
+        //update planeSource...
+        double zpos = 0.0;
+        int dimensions[3] = {0, 0, 0};
+        if (GetDimensions(dimensions)) {
+                //if we have an input connection we take properties from proxy
+                if (p.InputConnection != NULL) {
+                        if (IImagePropertiesProxy != NULL) {
+                                zpos = IImagePropertiesProxy->GetCurrentSliceIndex();
+                        }
+                }
+
+                double po[4] = {-0.5,                                                    -0.5,      zpos,    1.0};
+                double p1[4] = {((double)dimensions[0]) - 0.5,                           -0.5,      zpos,    1.0};
+                double p2[4] = {((double)dimensions[0]) - 0.5,  ((double)dimensions[1]) - 0.5,      zpos,    1.0};
+                double p3[4] = {-0.5,                           ((double)dimensions[1]) - 0.5,      zpos,    1.0};
+
+                double r[4] = {0.0,0.0,0.0,0.0};
+                if ( GNC::GCS::IControladorLog::Instance()->IsEnabledFor(GNC::GCS::IControladorLog::DebugLog) ) {
+                        LOG_DEBUG(ambitolog, "----- Image Plane Coordinates -----");
+                        double ptest[4][4]  = { {0.0, 0.0, zpos, 1.0}, {0.0, (double)(dimensions[1]-1), zpos, 1.0}, {(double)(dimensions[0]-1), (double)(dimensions[1]-1), zpos, 1.0}, {(double)(dimensions[0]-1), 0.0, zpos, 1.0} };
+                        for (int i = 0; i < 4; i++) {
+                                p.ModelMatrix->MultiplyPoint(ptest[i], r);
+                                GNC::GCS::Vector3D tptest = r;
+
+                                CoordenadasMundoACoordenadasMundoReal(tptest.v, tptest.v);
+
+                                LOG_DEBUG(ambitolog, "P(" << ptest[i][0] << "," << ptest[i][1] << "," << ptest[i][2] << ") * M  = " << tptest);
+                        }
+                }
+
+                //points of plane source
+                p.ModelMatrix->MultiplyPoint(po, SliceCoordinates[0].v);
+                p.ModelMatrix->MultiplyPoint(p1, SliceCoordinates[1].v);
+                p.ModelMatrix->MultiplyPoint(p2, SliceCoordinates[2].v);
+                p.ModelMatrix->MultiplyPoint(p3, SliceCoordinates[3].v);
+
+                p.PlaneSource->SetOrigin(SliceCoordinates[0].v);
+                p.PlaneSource->SetPoint1(SliceCoordinates[1].v);
+                p.PlaneSource->SetPoint2(SliceCoordinates[3].v);
+                //z direction cosines is the normal of plane source
+                p.PlaneSource->Update();
+
+                p.Plane->SetOrigin( p.PlaneSource->GetOrigin() );
+                p.Plane->SetNormal( p.PlaneSource->GetNormal() );
+
+                p.MapperPlano->Modified();
+                p.MapperPlanoOverlay->Modified();
+                p.ImageActor->Modified();
+
+                if (resetCameraPosition) { // Depending on interaction, could not be desirable to re-position the camera each time (ex: 3D interaction)
+                        Estado& e = members->Estado;
+                        GNC::GCS::Vector3D plane_center;
+                        GNC::GCS::Vector3D plane_normal;
+                        GNC::GCS::Vector3D plane_origin;
+                        GNC::GCS::Vector3D plane_p2;
+
+                        GNC::GCS::Vector3D camera_position;
+                        GNC::GCS::Vector3D camera_focal_point;
+                        GNC::GCS::Vector3D camera_view_up;
+
+                        p.PlaneSource->GetCenter(plane_center.v);
+                        p.PlaneSource->GetNormal(plane_normal.v);
+                        p.PlaneSource->GetOrigin(plane_origin.v);
+                        p.PlaneSource->GetPoint2(plane_p2.v);
+
+                        camera_focal_point = plane_center;
+                        camera_view_up =  (plane_origin - plane_p2).Normalizado();
+                        camera_position = plane_center - (plane_normal * 1000.0);
+
+                        double rotation = e.RollOffset;
+                        if (IImagePropertiesProxy != NULL) {
+                                IImagePropertiesProxy->SetCustomOrientation(camera_focal_point, camera_position, camera_view_up, rotation);
+                        }
+
+                        bool hflip = e.FlipHorizontal;
+
+                        if (e.FlipVertical) {
+                                camera_view_up =  (plane_p2 - plane_origin).Normalizado();
+                                hflip = !hflip;
+                        }
+                        if (hflip) {
+                                camera_position = plane_center + (plane_normal * 1000.0);
+                        }
+
+                        vtkCamera *cam = p.Renderer ? p.Renderer->GetActiveCamera() : NULL;
+
+                        if (cam != NULL) {
+                                cam->SetFocalPoint(camera_focal_point.v);
+                                cam->SetPosition(camera_position.v);
+                                cam->SetViewUp(camera_view_up.v);
+                                cam->Roll(rotation);
+                                cam->OrthogonalizeViewUp();
+
+                                //necessary for views synchronization in standard view
+                                Propiedades& pr = members->Propiedades;
+                                pr.CameraFocalPoint = camera_focal_point;
+                                pr.CameraPosition = camera_position;
+                                pr.CameraViewUp = camera_view_up;
+                                p.Renderer->ResetCameraClippingRange();
+                        }
+                } else {
+                        p.Renderer->ResetCameraClippingRange();
+                }
+
+        }
+}
+
+void vtkGinkgoImageViewer::UpdateOrientation()
+{
+        Propiedades& pr = members->Propiedades;
+
+        ResetCameraClippingRange(true);
+
+        pr.ResetModifiedStatus();
+}
+
+
+void vtkGinkgoImageViewer::IntersectarRayo(double wp[4], double vd[3], double pt[3])
+{
+        typedef GNC::GCS::Vector3D TVector;
+        if (members != NULL) {
+                Pipeline& p = members->Pipeline;
+                TVector punto_recta = wp;
+                TVector vdir_recta = vd;
+                TVector centro_plano;
+                TVector vnorm_plano;
+                p.Plane->GetOrigin(centro_plano.v);
+                p.Plane->GetNormal(vnorm_plano.v);
+                TVector interseccion = TVector::InterseccionEntreRectaYPlano(punto_recta, vdir_recta, centro_plano, vnorm_plano);
+                pt[0] = interseccion.x;
+                pt[1] = interseccion.y;
+                pt[2] = interseccion.z;
+        }
+}
+
+double* vtkGinkgoImageViewer::Proyect2D(const double wp[4], double ip[3]) const
+{
+        Pipeline& p = members->Pipeline;
+        double pt[4] = {0.0, 0.0, 0.0, 1.0};
+        p.ModelMatrixInv->MultiplyPoint(wp, pt);
+        ip[0] = pt[0];
+        ip[1] = pt[1];
+        ip[2] = pt[2];
+        return ip;
+}
+
+double* vtkGinkgoImageViewer::UnProyect2D(const double ip[3], double wp[4]) const
+{
+        Pipeline& p = members->Pipeline;
+        double pt[4] = {0.0, 0.0, 0.0, 1.0};
+        pt[0] = ip[0];
+        pt[1] = ip[1];
+        pt[2] = ip[2];
+
+        if (IImagePropertiesProxy != NULL) {
+                pt[2] = (double)IImagePropertiesProxy->GetCurrentSliceIndex();
+        }
+
+        p.ModelMatrix->MultiplyPoint(pt, wp);
+        return wp;
+}
+
+void vtkGinkgoImageViewer::SetupPipeline(bool forceReload)
+{
+        //GNC::GCS::Timer t;
+        Pipeline& p = members->Pipeline;
+        Estado&   e = members->Estado;
+
+        //t.start();
+
+        double oldSpacing[3] = {-1.0,-1.0,-1.0};
+        double oldOrigin[3] = {0.0, 0.0, 0.0};
+        int oldDimensions[3] = {-1,-1,-1};
+
+        //se consultan las dimensiones y spacing para saber si al final hay que resetear el zoom
+        bool mantenerVista = !forceReload;
+
+        if (e.PipelineInstalled) {
+                GetSpacing(oldSpacing, false);
+                GetOrigin(oldOrigin, false);
+                GetDimensions(oldDimensions, false);
+        } else {
+                mantenerVista = false;
+        }
+
+        unsigned int nc = 0;
+
+        if (p.ImageData != NULL) {
+                //p.ImageData->UpdateInformation();
+                nc = p.ImageData->GetNumberOfScalarComponents();
+        } else if (p.InputConnection != NULL) {
+                if (IImagePropertiesProxy != NULL) {
+                        IImagePropertiesProxy->UpdateInformation();
+                }
+                p.InputConnection->GetProducer()->UpdateInformation();
+                nc = GetNumberOfComponents();
+        } else {
+                //std::cout << "NULL input" << std::endl;
+        }
+
+#if defined(DEBUG_PIPELINE)
+
+        if (IImagePropertiesProxy != NULL) {
+                GNC::GCS::Vector3D origin;
+                GNC::GCS::Vector3D spacing;
+                GNC::GCS::Vector3D dimensions;
+
+                IImagePropertiesProxy->GetOrigin(origin);
+                IImagePropertiesProxy->GetSpacing(spacing);
+                IImagePropertiesProxy->GetFPDimensions(dimensions);
+
+                const GNC::GCS::Vector3D pt[8] = {
+                        GNC::GCS::Vector3D(0.0, 0.0, 0.0), GNC::GCS::Vector3D(1.0, 0.0, 0.0), GNC::GCS::Vector3D(1.0, 1.0, 0.0), GNC::GCS::Vector3D(0.0, 1.0, 0.0),
+                        GNC::GCS::Vector3D(0.0, 0.0, 1.0), GNC::GCS::Vector3D(1.0, 0.0, 1.0), GNC::GCS::Vector3D(1.0, 1.0, 1.0), GNC::GCS::Vector3D(0.0, 1.0, 1.0)
+                };
+
+                GNC::GCS::Vector3D pp;
+                for (int i = 0; i < 8; ++i) {
+                        IImagePropertiesProxy->GetDirection()->MultiplyPoint( (dimensions * spacing * pt[i]).v, pp.v);
+                        pp = (origin + pp);
+                        p.DebugVolumePolyData->GetPoints()->SetPoint(i, pp.v);
+                }
+
+        }
+#endif
+
+        if (!e.PipelineInstalled) {
+
+                if (nc == 1)  {
+                        p.Textura->MapColorScalarsThroughLookupTableOn();
+                        if (p.ImageData != NULL) {
+                                GNC::GCS::ILocker lock(p.Textura);
+                                p.Textura->SetInputData(p.ImageData);
+                        } else {
+                                GNC::GCS::ILocker lock(p.Textura);
+                                p.Textura->SetInputConnection(p.InputConnection);
+                        }
+                        p.Textura->SetLookupTable(p.LookupTable);
+                        p.Textura->Modified();
+
+                        //overlay???
+                        if (p.OverlayData != NULL) {
+                                p.TexturaOverlay->SetInputData(p.OverlayData);
+                                p.TexturaOverlay->Modified();
+                                p.OverlayActor->Modified();
+                                p.OverlayActor->VisibilityOn();
+                        } else {
+                                p.OverlayActor->VisibilityOff();
+                        }
+                }//nc == 1
+                else {
+                        p.Textura->MapColorScalarsThroughLookupTableOff();
+                        if (p.ImageData != NULL) {
+                                GNC::GCS::ILocker lock(p.Textura);
+                                p.Textura->SetInputData(p.ImageData);
+                        } else {
+                                GNC::GCS::ILocker lock(p.Textura);
+                                p.Textura->SetInputConnection(p.InputConnection);
+                        }
+
+                        p.Textura->Modified();
+                        p.OverlayActor->VisibilityOff();
+                }
+                p.ImageActor->Modified();
+                p.ImageActor->VisibilityOn();
+#if defined(DEBUG_PIPELINE)
+                if (IImagePropertiesProxy != NULL) {
+                        p.DebugVolumeActor->Modified();
+                        p.DebugVolumeActor->VisibilityOn();
+                }
+#endif
+                e.PipelineInstalled = true;
+                e.CurrentNumberOfComponents = nc;
+        } else {
+                if (nc != e.CurrentNumberOfComponents) {
+                        if (nc == 1)  { // NC = 1. Antes era 0, 2, 3 o 4
+                                p.Textura->MapColorScalarsThroughLookupTableOn();
+                                //p.StreamConnector->RemoveAllInputs();
+                                if (p.ImageData != NULL) {
+                                        GNC::GCS::ILocker lock(p.Textura);
+                                        p.Textura->SetInputData(p.ImageData);
+                                } else {
+                                        GNC::GCS::ILocker lock(p.Textura);
+                                        p.Textura->SetInputConnection(p.InputConnection);
+                                }
+                                p.Textura->SetLookupTable(p.LookupTable);
+                                p.Textura->Modified();
+                                //overlay???
+                                if (p.OverlayData != NULL) {
+                                        p.TexturaOverlay->SetInputData(p.OverlayData);
+                                        p.TexturaOverlay->Modified();
+                                        p.OverlayActor->Modified();
+                                        p.OverlayActor->VisibilityOn();
+                                } else {
+                                        p.OverlayActor->VisibilityOff();
+                                }
+                        } else { // NC = 0, 2, 3 o 4. antes era 1
+                                p.Textura->MapColorScalarsThroughLookupTableOff();
+                                p.WindowLevel->RemoveAllInputs();
+                                p.Textura->SetLookupTable(NULL);
+
+                                if (p.ImageData != NULL) {
+                                        GNC::GCS::ILocker lock(p.Textura);
+                                        p.Textura->SetInputData(p.ImageData);
+                                } else {
+                                        GNC::GCS::ILocker lock(p.Textura);
+                                        p.Textura->SetInputConnection(p.InputConnection);
+                                }
+                                p.Textura->Modified();
+
+                                p.OverlayActor->VisibilityOff();
+                        }
+                        e.CurrentNumberOfComponents = nc;
+                } else {
+                        if (nc == 1) {
+                                p.Textura->MapColorScalarsThroughLookupTableOn();
+                                if (p.OverlayData != NULL) {
+                                        p.TexturaOverlay->SetInputData(p.OverlayData);
+                                        p.TexturaOverlay->Modified();
+                                        p.OverlayActor->Modified();
+                                        p.OverlayActor->VisibilityOn();
+                                } else {
+                                        p.OverlayActor->VisibilityOff();
+                                }
+                        } else {
+                                p.Textura->MapColorScalarsThroughLookupTableOff();
+                                p.OverlayActor->VisibilityOff();
+                        }
+                        if (p.ImageData != NULL) {
+                                GNC::GCS::ILocker lock(p.Textura);
+                                p.Textura->SetInputData(p.ImageData);
+                        } else {
+                                GNC::GCS::ILocker lock(p.Textura);
+                                p.Textura->SetInputConnection(p.InputConnection);
+                        }
+                        p.Textura->Modified();
+                }
+        }
+
+        //t.stop();
+        //std::cout << "vtkGinkgoImageViewer::SetupPipeline(): " << t << std::endl;
+
+        double curSpacing[3] = {0.0,0.0,0.0};
+        double curOrigin[3] = {0.0, 0.0, 0.0};
+        int curDimensions[3] = {0,0,0};
+
+        GetSpacing(curSpacing);
+        GetOrigin(curOrigin);
+        GetDimensions(curDimensions);
+
+        for (int i = 0; mantenerVista && i < 3; i++) {
+                if ( (curSpacing[i] != oldSpacing[i]) || (curOrigin[i] != oldOrigin[i]) || (curDimensions[i] != oldDimensions[i])) {
+                        mantenerVista = false;
+                }
+        }
+        if (this->GetTindex() != 0) {
+                mantenerVista = false;
+        }
+
+        SetTindex(0);
+
+        //save camera position to restore if we have to mantain zoom or zoom and pan
+        double focal[3], pos[3];
+        GetRelativePositionOfCamera(focal, pos);
+
+        UpdateDisplayExtent();
+        ResetCameraClippingRange(true);
+        //se comprueba si han cambiado las dimensiones o el spacing
+        bool mantenerZoom = true;
+        {
+
+                for(int i = 0; i < 3 && mantenerZoom; ++i) {
+                        mantenerZoom = mantenerZoom && oldSpacing[i] == curSpacing[i] && oldDimensions[i] == curDimensions[i];
+                }
+        }
+        ResetZoom(mantenerZoom, 0);
+        if (mantenerVista || mantenerZoom) {
+                SetRelativePositionOfCamera(focal, pos);
+        }
+
+}
+
+//====================================================================================================
+
+vtkSmartPointer<vtkAlgorithmOutput> vtkGinkgoImageViewer::GetInputConnection()
+{
+        Pipeline& p = members->Pipeline;
+        return p.InputConnection;
+}
+
+
+vtkSmartPointer<vtkImageData> vtkGinkgoImageViewer::GetInput()
+{
+        Pipeline& p = members->Pipeline;
+        if (p.InputConnection != NULL) {
+                return vtkImageData::SafeDownCast(p.Textura->GetInput());
+        } else if (p.ImageData != NULL) {
+                return p.ImageData;
+        } else {
+                return NULL;
+        }
+}
+
+
+vtkSmartPointer<vtkActor> vtkGinkgoImageViewer::GetImageActor()
+{
+        Pipeline& p = members->Pipeline;
+        if (p.ImageActor != NULL) {
+                return p.ImageActor;
+        }
+        return NULL;
+}
+
+vtkSmartPointer<vtkPlane> vtkGinkgoImageViewer::GetPlane()
+{
+        Pipeline& p = members->Pipeline;
+        if (p.ImageActor != NULL) {
+                return p.Plane;
+        }
+        return NULL;
+}
+
+const GNC::GCS::Vector3D* vtkGinkgoImageViewer::GetSliceCoordinates()
+{
+        return SliceCoordinates;
+}
+
+long vtkGinkgoImageViewer::GetImageTexture()
+{
+        Pipeline& p = members->Pipeline;
+        if (p.InputConnection != NULL) {
+                return p.Textura->GetTextureId();
+        } else if (p.ImageData != NULL) {
+                return p.Textura->GetTextureId();
+        } else {
+                return -1;
+        }
+}
+
+/** Set the RenderWindow */
+void vtkGinkgoImageViewer::SetRenderWindow(vtkSmartPointer<vtkRenderWindow> rw)
+{
+        Pipeline& p = members->Pipeline;
+        Estado&   e = members->Estado;
+
+        if (p.RenderWindow == rw) {
+                return;
+        }
+
+        if (e.Initialized) {
+                Uninitialize();
+        }
+
+        p.RenderWindow = rw;
+        p.RenderWindowInteractor = rw->GetInteractor();
+
+        if (p.RenderWindow && p.Renderer) {
+                Initialize();
+        }
+}
+
+
+/** Set the Renderer **/
+void vtkGinkgoImageViewer::SetRenderer(vtkSmartPointer<vtkRenderer> ren)
+{
+        Pipeline& p = members->Pipeline;
+        Estado&   e = members->Estado;
+
+        if (p.Renderer == ren) {
+                return;
+        }
+
+        if (e.Initialized) {
+                Uninitialize();
+        }
+
+        p.Renderer = ren;
+
+        if (p.RenderWindow && p.Renderer) {
+                Initialize();
+        }
+}
+
+
+/** Attach an interactor to the internal RenderWindow. **/
+void vtkGinkgoImageViewer::SetInteractor(vtkSmartPointer<vtkRenderWindowInteractor> rwi)
+{
+        Pipeline& p = members->Pipeline;
+        p.RenderWindowInteractor = rwi;
+}
+
+
+/** Get the vtkRenderWindow associated */
+vtkSmartPointer<vtkRenderWindow> vtkGinkgoImageViewer::GetRenderWindow()
+{
+        Pipeline& p = members->Pipeline;
+        return p.RenderWindow;
+}
+
+/** Get the vtkRenderer associated */
+vtkSmartPointer<vtkRenderer> vtkGinkgoImageViewer::GetRenderer()
+{
+        Pipeline& p = members->Pipeline;
+        return p.Renderer;
+}
+
+/** Get the vtkRenderWindow associated */
+vtkSmartPointer<vtkRenderWindowInteractor> vtkGinkgoImageViewer::GetRenderWindowInteractor()
+{
+        Pipeline& p = members->Pipeline;
+        return p.RenderWindowInteractor;
+}
+
+/** Add the actor to the first renderer of the render window if exist.
+Do nothing otherwise.*/
+void vtkGinkgoImageViewer::AddActor(vtkSmartPointer<vtkProp> actor)
+{
+        Pipeline& p = members->Pipeline;
+        if (p.Renderer) {
+                p.Renderer->AddActor(actor);
+        } else {
+                LOG_ERROR("Viewer", "No se pudo insertar el actor en el pipeline del viewer porque no hay un renderer asociado");
+        }
+
+}
+
+/** remove the actor from the first renderer of the render window if exist.
+Do nothing otherwise.*/
+void vtkGinkgoImageViewer::RemoveActor(vtkSmartPointer<vtkProp> actor)
+{
+        Pipeline& p = members->Pipeline;
+        if (p.Renderer) {
+                p.Renderer->RemoveActor(actor);
+        } else {
+                LOG_ERROR("Viewer", "No se pudo insertar el actor en el pipeline del viewer porque no hay un renderer asociado");
+        }
+}
+
+void vtkGinkgoImageViewer::Reset()
+{
+}
+
+void vtkGinkgoImageViewer::SetTindex(int index)
+{
+        Pipeline& p = members->Pipeline;
+
+        if (p.Textura) {
+                p.Textura->SetTindex(index);
+        }
+}
+
+int vtkGinkgoImageViewer::GetTindex()
+{
+        Pipeline& p = members->Pipeline;
+        if (p.Textura) {
+                return p.Textura->GetTindex();
+        }
+        return -1;
+}
+
+/** Call the RenderWindow's Render() method. */
+void vtkGinkgoImageViewer::Render (void)
+{
+        Pipeline& p = members->Pipeline;
+        p.RenderWindow->Render();
+
+}
+
+void vtkGinkgoImageViewer::SyncRender (void)
+{
+}
+
+void vtkGinkgoImageViewer::Update()
+{
+}
+
+void vtkGinkgoImageViewer::UpdateImage()
+{
+}
+
+//region Propiedades / Estado
+bool vtkGinkgoImageViewer::GetDimensions( int dimensions[3], bool testProxy )
+{
+        Pipeline& p  = members->Pipeline;
+
+        int extent[6] = {0, 0, 0, 0, 0, 0};
+        dimensions[0] = dimensions[1] = dimensions[2] = 0;
+        bool ok = false;
+
+        if (testProxy && IImagePropertiesProxy != NULL) {
+                IImagePropertiesProxy->GetOutputDimensions(dimensions);
+                return true;
+        }
+
+        if (p.InputConnection != NULL) {
+                if (p.InputConnection->GetProducer() &&  p.InputConnection->GetProducer()->GetExecutive()) {
+                        vtkInformationVector* iv = p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+                        if (iv && iv->GetNumberOfInformationObjects() > 0) {
+                                vtkInformation* io = iv->GetInformationObject(0);
+                                vtkInformationIntegerVectorKey* k = vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT();
+                                if (io->Has(k)) {
+                                        io->Get(k, extent);
+                                        dimensions[0] = extent[1] + 1;
+                                        dimensions[1] = extent[3] + 1;
+                                        dimensions[2] = extent[5] + 1;
+                                }
+                                ok = true;
+                        }
+                }
+        } else if (p.ImageData != NULL) {
+                p.ImageData->GetDimensions(dimensions);
+                ok = true;
+        }
+
+        return ok;
+
+}
+
+bool vtkGinkgoImageViewer::GetSpacing( double spacing[3] , bool testProxy)
+{
+        Pipeline& p  = members->Pipeline;
+
+        spacing[0] = spacing[1] = spacing[2] = 1.0f;
+
+        if (testProxy && IImagePropertiesProxy != NULL) {
+                IImagePropertiesProxy->GetOutputSpacing(spacing);
+                return true;
+        }
+
+        bool ok = false;
+
+        if (p.InputConnection != NULL) {
+
+                if (p.InputConnection->GetProducer() &&  p.InputConnection->GetProducer()->GetExecutive()) {
+                        vtkInformationVector* iv = p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+                        if (iv && iv->GetNumberOfInformationObjects() > 0) {
+                                vtkInformation* io = iv->GetInformationObject(0);
+                                io->Get(vtkDataObject::SPACING(), spacing);
+                                ok = true;
+                        }
+                }
+        } else if (p.ImageData != NULL) {
+                p.ImageData->GetSpacing(spacing);
+        }
+
+        for (int i = 0; i < 2; ++i) {
+                if (spacing[i] <= 0.0f) {
+                        spacing[i] = 1.0f;
+                }
+        }
+
+        return ok;
+}
+
+bool vtkGinkgoImageViewer::GetOrigin( double origin[3] , bool testProxy)
+{
+        Pipeline& p  = members->Pipeline;
+
+        origin[0] = origin[1] = origin[2] = 0.0f;
+
+        if (testProxy && IImagePropertiesProxy != NULL) {
+                IImagePropertiesProxy->GetOutputOrigin(origin);
+                return true;
+        }
+
+        bool ok = false;
+
+        if (p.InputConnection != NULL) {
+                if (p.InputConnection->GetProducer() &&  p.InputConnection->GetProducer()->GetExecutive()) {
+                        vtkInformationVector* iv = p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+                        if (iv && iv->GetNumberOfInformationObjects() > 0) {
+                                vtkInformation* io = iv->GetInformationObject(0);
+                                io->Get(vtkDataObject::ORIGIN(), origin);
+                                ok = true;
+                        }
+                }
+        } else if (p.ImageData != NULL) {
+                p.ImageData->GetOrigin(origin);
+        }
+        return ok;
+}
+
+bool vtkGinkgoImageViewer::GetBounds( double bounds[6]  )
+{
+        Estado&   e  = members->Estado;
+        Pipeline& p  = members->Pipeline;
+        if (e.PipelineInstalled) {
+
+#if defined(DEBUG_PIPELINE)
+                double b1[6];
+                double b2[6];
+                p.DebugVolumeActor->GetBounds(b1);
+                p.ImageActor->GetBounds(b2);
+                for (int i = 0, j = 1; i < 6; i+=2, j+=2) {
+                        bounds[i] = std::min(b1[i], b2[i]);
+                        bounds[j] = std::max(b1[j], b2[j]);
+                }
+                return true;
+#else
+                double b[3];
+                GNC::GCS::Vector3D p1, p2, pt;
+                p.PlaneSource->GetOrigin(b);
+                bounds[0] = b[0];
+                bounds[2] = b[1];
+                bounds[4] = b[2];
+
+                p.PlaneSource->GetOrigin(pt.v);
+                p.PlaneSource->GetPoint1(p1.v);
+                p.PlaneSource->GetPoint2(p2.v);
+
+                p1 = p1 - pt;
+                p2 = p2 - pt;
+
+                pt = pt + (p1 + p2);
+
+                bounds[1] = pt.x;
+                bounds[3] = pt.y;
+                bounds[5] = pt.z;
+                return true;
+#endif
+
+        } else {
+                for (int i = 0; i < 6; i++) {
+                        bounds[i] = 0;
+                }
+        }
+        return false;
+}
+
+
+const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4>& vtkGinkgoImageViewer::GetModelMatrix()
+{
+        Pipeline& p  = members->Pipeline;
+        return p.ModelMatrix;
+}
+
+const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4>& vtkGinkgoImageViewer::GetModelMatrixInv()
+{
+        Pipeline& p  = members->Pipeline;
+        return p.ModelMatrixInv;
+}
+
+int vtkGinkgoImageViewer::GetNumberOfComponents()
+{
+        Pipeline& p  = members->Pipeline;
+        int nc = 0;
+
+        if (p.InputConnection != NULL) {
+                p.InputConnection->GetProducer()->Update();
+                vtkInformationVector* iv = p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+                if (iv->GetNumberOfInformationObjects() > 0) {
+                        vtkInformation* io = iv->GetInformationObject(0);
+                        vtkInformation* scalarInfo = vtkDataObject::GetActiveFieldInformation(io, vtkImageData::FIELD_ASSOCIATION_POINTS, vtkDataSetAttributes::SCALARS);
+                        if (scalarInfo && scalarInfo->Has(vtkImageData::FIELD_NUMBER_OF_COMPONENTS())) {
+                                nc = scalarInfo->Get( vtkImageData::FIELD_NUMBER_OF_COMPONENTS() );
+                        }
+                }
+        } else if (p.ImageData != NULL) {
+                nc = p.ImageData->GetNumberOfScalarComponents();
+        }
+
+        return nc;
+}
+
+vtkDataArray* vtkGinkgoImageViewer::GetScalars()
+{
+        vtkSmartPointer<vtkImageData> pImgData = GetDataObject();
+
+        if (pImgData == NULL)
+                return NULL;
+
+        //pImgData->Update();
+        return pImgData->GetPointData()->GetScalars();
+}
+
+
+void* vtkGinkgoImageViewer::GetScalarPointer()
+{
+        vtkSmartPointer<vtkImageData> pImgData = GetDataObject();
+
+        if (pImgData == NULL)
+                return NULL;
+
+        return pImgData->GetScalarPointer();
+}
+
+int vtkGinkgoImageViewer::GetScalarType()
+{
+        vtkSmartPointer<vtkImageData> pImgData = GetDataObject();
+
+        if (pImgData == NULL)
+                return -1;
+
+        return pImgData->GetScalarType();
+}
+
+vtkSmartPointer<vtkImageData> vtkGinkgoImageViewer::GetDataObject()
+{
+        Pipeline& p  = members->Pipeline;
+
+        vtkSmartPointer<vtkImageData> pImgData = NULL;
+        if (p.InputConnection != NULL ) {
+                if (p.InputConnection->GetProducer() &&  p.InputConnection->GetProducer()->GetExecutive()) {
+                        p.InputConnection->GetProducer()->Update();
+                        //if (p.InputConnection->GetProducer()->GetExecutive()->Update())
+                        //{
+                        vtkInformationVector* iv = p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+                        if (iv && iv->GetNumberOfInformationObjects() > 0) {
+                                vtkInformation* io = iv->GetInformationObject(0);
+                                pImgData = vtkImageData::SafeDownCast(io->Get(vtkDataObject::DATA_OBJECT()));
+
+                        }
+                        //}
+                        //else {
+                        //	pImgData = NULL;
+                        //}
+                }
+        } else if (p.ImageData != NULL) {
+                pImgData = p.ImageData;
+                //pImgData->Update();
+        }
+
+        if (pImgData == NULL)
+                return NULL;
+
+        return pImgData;
+}
+
+//endregion
+
+
+/**
+Switch between radiological (left is right and right is left) and
+neurological (left is left and right is right) conventions.
+*/
+
+void vtkGinkgoImageViewer::SetConventionsToRadiological(void)
+{
+        Propiedades& pr = members->Propiedades;
+        pr.Conventions = vtkGinkgoImageViewer::RADIOLOGIC;
+        UpdateCamera();
+}
+
+/**
+Switch between radiological (left is right and right is left) and
+neurological (left is left and right is right) conventions.
+*/
+void vtkGinkgoImageViewer::SetConventionsToNeurological(void)
+{
+        Propiedades& pr = members->Propiedades;
+        pr.Conventions = vtkGinkgoImageViewer::NEUROLOGIC;
+        UpdateCamera();
+}
+
+int vtkGinkgoImageViewer::GetOrientation()
+{
+        return members->Propiedades.Orientacion;
+}
+
+
+double vtkGinkgoImageViewer::GetCameraRotation() const
+{
+        const Estado& e= members->Estado;
+        return M_PI * (e.RollOffset / 180.0);
+}
+
+bool vtkGinkgoImageViewer::GetCameraFlipVertical() const
+{
+        const Estado& e= members->Estado;
+        return e.FlipVertical;
+}
+
+bool vtkGinkgoImageViewer::GetCameraFlipHorizontal() const
+{
+        const Estado& e= members->Estado;
+        return e.FlipHorizontal;
+}
+
+void vtkGinkgoImageViewer::SetOrientation(unsigned int orientation)
+{
+        if (orientation != members->Propiedades.Orientacion) {
+                members->Propiedades.Orientacion = orientation;
+                UpdateCamera();
+        }
+}
+
+/** Specify the interactor style */
+void vtkGinkgoImageViewer::SetInteractorStyle(vtkSmartPointer<vtkInteractorStyle> style)
+{
+        Pipeline& p = members->Pipeline;
+        p.InteractorStyle = style;
+}
+
+/** Get the interactor style */
+vtkSmartPointer<vtkInteractorStyle> vtkGinkgoImageViewer::GetInteractorStyle()
+{
+        Pipeline& p = members->Pipeline;
+        return p.InteractorStyle;
+}
+
+int vtkGinkgoImageViewer::GetInteractionStyle()
+{
+        Comportamiento& c = members->Comportamiento;
+        return c.InteractorStyleType;
+}
+
+void vtkGinkgoImageViewer::SetInteractionStyle(int type)
+{
+        //Pipeline& p = members->Pipeline;
+
+        switch (type) {
+        case ZOOM_WITH_SELECT_INTERACTION:
+                //p.InteractorStyle = NULL;
+                break;
+        default:
+                break;
+        }
+
+}
+
+/** Set the background color. Format is RGB, 0 <= R,G,B <=1
+Example: SetBackgroundColor(0.9,0.9,0.9) for grey-white. */
+void vtkGinkgoImageViewer::SetBackgroundColor(double /*r*/, double /*g*/, double /*b*/)
+{
+}
+
+/** Show/Hide the annotations. Call UpdateAnnotations after this function. */
+void vtkGinkgoImageViewer::SetShowAnnotations (bool show)
+{
+        members->Comportamiento.ShowAnnotations = show;
+}
+
+bool vtkGinkgoImageViewer::GetShowAnnotations()
+{
+        return members->Comportamiento.ShowAnnotations;
+}
+
+//--------------------------------------------------------------------
+//region Propiedades
+void vtkGinkgoImageViewer::SetInterpolationMode(int enable)
+{
+        Pipeline& p  = members->Pipeline;
+        p.Textura->SetInterpolate(enable);
+        p.TexturaOverlay->SetInterpolate(enable);
+}
+
+int vtkGinkgoImageViewer::GetInterpolationMode()
+{
+        Pipeline& p  = members->Pipeline;
+        return p.Textura->GetInterpolate();
+}
+
+bool vtkGinkgoImageViewer::GetWholeExtent(int extent[6]) const
+{
+
+        Pipeline& p  = members->Pipeline;
+        memset(extent, 0, 6 * sizeof(int));
+
+        bool ok = false;
+
+        if (p.InputConnection != NULL) {
+                if (p.InputConnection->GetProducer() &&  p.InputConnection->GetProducer()->GetExecutive()) {
+                        vtkInformationVector* iv = p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+                        if (iv && iv->GetNumberOfInformationObjects() > 0) {
+                                vtkInformation* io = iv->GetInformationObject(0);
+                                io->Get(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent);
+                                ok = true;
+                        }
+                }
+        } else if (p.ImageData != NULL) {
+                // essentially pray
+                p.ImageData->GetExtent(extent);
+        }
+
+        return ok;
+}
+
+bool vtkGinkgoImageViewer::SetUpdateExtent(int extent[6])
+{
+
+        Pipeline& p  = members->Pipeline;
+
+        bool ok = false;
+
+        if (p.InputConnection != NULL) {
+                if (p.InputConnection->GetProducer() &&  p.InputConnection->GetProducer()->GetExecutive()) {
+                        p.InputConnection->GetProducer()->SetUpdateExtent(extent);
+                        vtkInformationVector* iv = p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+                        if (iv && iv->GetNumberOfInformationObjects() > 0) {
+                                vtkInformation* io = iv->GetInformationObject(0);
+                                io->Set(vtkStreamingDemandDrivenPipeline::WHOLE_EXTENT(), extent, 6);
+                                ok = true;
+                        }
+                }
+        }
+
+        return ok;
+}
+
+bool vtkGinkgoImageViewer::GetSliceRange(vtkGinkgoImageViewer::Axis axis, int range[2]) const
+{
+        int extent[6] = {0, 0, 0, 0, 0, 0};
+        bool ok = false;
+        int axis_offset = (axis >> 1);
+        ok = GetWholeExtent(extent);
+        range[0] = extent[axis_offset];
+        range[1] = extent[axis_offset + 1];
+        return ok;
+}
+
+bool vtkGinkgoImageViewer::GetLinkCameraFocalAndPosition()
+{
+        return true;
+}
+
+void vtkGinkgoImageViewer::SetLinkCameraFocalAndPosition(bool link)
+{
+        Propiedades& p = members->Propiedades;
+        p.LinkCameraFocalAndPosition = link;
+}
+
+bool vtkGinkgoImageViewer::GetLinkZoom()
+{
+        Propiedades& p = members->Propiedades;
+        return p.LinkZoom;
+}
+
+void vtkGinkgoImageViewer::SetLinkZoom(bool link)
+{
+        Propiedades& p = members->Propiedades;
+        p.LinkZoom = link;
+}
+
+void vtkGinkgoImageViewer::CopyCameraStatus(vtkGinkgoImageViewer* w)
+{
+        if (w == this || w == NULL) {
+                return;
+        } else {
+                Estado& e        = members->Estado;
+                Estado& eo       = w->members->Estado;
+                e.RollOffset     = eo.RollOffset;
+                e.FlipHorizontal = eo.FlipHorizontal;
+                e.FlipVertical   = eo.FlipVertical;
+
+                double focal[3], pos[3];
+                w->GetRelativePositionOfCamera(focal, pos);
+                this->SetRelativePositionOfCamera(focal,pos);
+        }
+}
+
+void vtkGinkgoImageViewer::CopyCamera(const vtkGinkgoImageViewer* w)
+{
+        if (w == this || w == NULL) {
+                return;
+        } else {
+                Pipeline& p            = members->Pipeline;
+                const Pipeline& po     = w->members->Pipeline;
+
+                Propiedades& pr        = members->Propiedades;
+                const Propiedades& pro = w->members->Propiedades;
+
+                pr.CameraPosition       = pro.CameraPosition;
+                pr.CameraFocalPoint     = pro.CameraFocalPoint;
+                pr.CameraViewUp         = pro.CameraViewUp;
+                pr.ParallelScale        = pro.ParallelScale;
+
+                vtkCamera *c        = p.Renderer->GetActiveCamera();
+                vtkCamera *co = po.Renderer->GetActiveCamera();
+
+                double tmp[3];
+                co->GetPosition(tmp);
+                c->SetPosition(tmp);
+
+                co->GetFocalPoint(tmp);
+                c->SetFocalPoint(tmp);
+
+                co->GetViewUp(tmp);
+                c->SetViewUp(tmp);
+
+                c->SetParallelScale(co->GetParallelScale());
+        }
+}
+
+void vtkGinkgoImageViewer::ClearRotationAndFlip(bool update)
+{
+        Estado& e = members->Estado;
+        e.RollOffset = 0;
+        e.FlipVertical = false;
+        e.FlipHorizontal = false;
+
+        if (update) {
+                Propiedades& pr = members->Propiedades;
+                ResetCameraClippingRange(true);
+                pr.ResetModifiedStatus();
+        }
+}
+
+void vtkGinkgoImageViewer::RotateCamera( bool right)
+{
+        Estado& e = members->Estado;
+
+        right? e.RollOffset -= 90 : e.RollOffset += 90;
+
+        if (e.RollOffset > 180.0) {
+                e.RollOffset -= 360.0;
+        } else if (e.RollOffset <= -180.0) {
+                e.RollOffset += 360.0;
+        }
+
+        UpdateOrientation();
+}
+
+void vtkGinkgoImageViewer::RotateCamera( double angle)
+{
+        Estado& e = members->Estado;
+
+        e.RollOffset += angle;
+
+        if (e.RollOffset > 180.0) {
+                e.RollOffset -= 360.0;
+        } else if (e.RollOffset <= -180.0) {
+                e.RollOffset += 360.0;
+        }
+
+        //update has to be call UpdateOrientation();
+}
+
+void vtkGinkgoImageViewer::Flip(bool vertical)
+{
+        Estado& e = members->Estado;
+        //if its rolled between 45 and 135 or between -45 and -135 vertical means horizontal and horizontal vertical
+        if ( (e.RollOffset > 45 && e.RollOffset <= 135)
+             || (e.RollOffset < -45 && e.RollOffset >= -135) ) {
+                if (vertical) {
+                        e.FlipHorizontal = !e.FlipHorizontal;
+                } else {
+                        e.FlipVertical = !e.FlipVertical;
+                }
+        } else {
+                if (vertical) {
+                        e.FlipVertical = !e.FlipVertical;
+                } else {
+                        e.FlipHorizontal = !e.FlipHorizontal;
+                }
+        }
+        UpdateOrientation();
+}
+
+void vtkGinkgoImageViewer::SetWindowLevelFrom(vtkSmartPointer<vtkGinkgoImageViewer> /*p_view*/)
+{
+}
+
+void vtkGinkgoImageViewer::SetDefaultWindowLevel(float initialWindow, float initialLevel)
+{
+        Estado& e = members->Estado;
+        e.InitialWindow = initialWindow;
+        e.InitialLevel = initialLevel;
+        e.DefaultWindowLevelSetted = true;
+        ResetToDefaultWindowLevel();
+}
+
+void vtkGinkgoImageViewer::SetAutoDefaultWindowLevel()
+{
+        Pipeline& p  = members->Pipeline;
+
+        vtkImageData* pImgData = NULL;
+        if (p.InputConnection != NULL) {
+                if (p.InputConnection->GetProducer() &&  p.InputConnection->GetProducer()->GetExecutive()) {
+                        p.InputConnection->GetProducer()->Update();
+                        vtkInformationVector* iv = p.InputConnection->GetProducer()->GetExecutive()->GetOutputInformation();
+                        if (iv && iv->GetNumberOfInformationObjects() > 0) {
+                                vtkInformation* io = iv->GetInformationObject(0);
+                                pImgData = vtkImageData::SafeDownCast(io->Get(vtkDataObject::DATA_OBJECT()));
+                        }
+                }
+        } else if (p.ImageData != NULL) {
+                pImgData = p.ImageData;
+        }
+
+        if (pImgData == NULL) {
+                return;
+        }
+
+        if( pImgData->GetNumberOfScalarComponents()==3 || pImgData->GetNumberOfScalarComponents()==4 ) {
+                return;
+        }
+
+        double range[2];
+        // TODO PETA
+        // vtk6 doesn't have these
+        //pImgData->UpdateInformation();
+        //pImgData->UpdateData();
+        pImgData->GetScalarRange(range);
+        //std::cout << range[0] << ", " << range[1] << std::endl;
+
+        double window = range[1]-range[0];
+        double level = 0.5*(range[1]+range[0]);
+
+        //no tenemos shift/scale
+        /*window = (window-this->GetShift())/this->GetScale();
+        level = (level-this->GetShift())/this->GetScale();*/
+
+        Estado& e = members->Estado;
+        e.InitialWindow = window;
+        e.InitialLevel = level;
+        e.DefaultWindowLevelSetted = true;
+
+        //se establece
+        SyncSetWindow(e.InitialWindow);
+        SyncSetLevel(e.InitialLevel);
+        ActualizarAnotaciones();
+}
+
+double vtkGinkgoImageViewer::GetWindow()
+{
+        Pipeline& p = members->Pipeline;
+        return p.WindowLevel->GetWindow();
+}
+
+double vtkGinkgoImageViewer::GetLevel()
+{
+        Pipeline& p = members->Pipeline;
+        return p.WindowLevel->GetLevel();
+}
+
+void vtkGinkgoImageViewer::SetWindow(double window)
+{
+        Pipeline& p = members->Pipeline;
+        p.WindowLevel->SetWindow(window);
+
+        //rango del window/level
+        if (members->Pipeline.LookupTable) {
+                double v_min = this->GetLevel() - 0.5 * this->GetWindow();
+                double v_max = this->GetLevel() + 0.5 * this->GetWindow();
+
+                members->Pipeline.LookupTable->SetRange(v_min,v_max);
+        }
+}
+
+void vtkGinkgoImageViewer::SetLevel(double level)
+{
+        Pipeline& p = members->Pipeline;
+        p.WindowLevel->SetLevel(level);
+
+        //rango del window/level
+        if (members->Pipeline.LookupTable) {
+                double v_min = this->GetLevel() - 0.5 * this->GetWindow();
+                double v_max = this->GetLevel() + 0.5 * this->GetWindow();
+
+                members->Pipeline.LookupTable->SetRange(v_min,v_max);
+        }
+}
+
+void vtkGinkgoImageViewer::SyncSetWindow (double w)
+{
+        SetWindow(w);
+}
+
+void vtkGinkgoImageViewer::SyncSetLevel (double w)
+{
+        SetLevel(w);
+}
+
+void vtkGinkgoImageViewer::ResetToDefaultWindowLevel()
+{
+        Estado& e = members->Estado;
+        if (e.DefaultWindowLevelSetted) {
+                SyncSetWindow(e.InitialWindow);
+                SyncSetLevel(e.InitialLevel);
+                //Modified();
+                ActualizarAnotaciones();
+        } else {
+                this->SetAutoDefaultWindowLevel();
+        }
+}
+
+
+
+void vtkGinkgoImageViewer::SyncSetCameraFocalAndPosition(double* /*focal*/, double* /*pos*/)
+{
+        //propagate event
+        this->InvokeEvent (vtkGinkgoImageViewer::ViewImagePositionChangeEvent, NULL);
+}
+
+void vtkGinkgoImageViewer::GetRelativePositionOfCamera(double focal[3], double pos[3])
+{
+        //relative position of camera
+        Propiedades& pr = members->Propiedades;
+        Pipeline& p = members->Pipeline;
+
+        vtkCamera *camera = p.Renderer->GetActiveCamera();
+        double focal_c[3], pos_c[3];
+        camera->GetPosition(pos_c);
+        camera->GetFocalPoint(focal_c);
+
+        for (int i = 0; i < 3; i++) {
+                focal[i] = pr.CameraFocalPoint[i] - focal_c[i];
+                pos[i] = pr.CameraPosition[i] - pos_c[i];
+        }
+}
+
+void vtkGinkgoImageViewer::SetRelativePositionOfCamera(const double focal[3], const double pos[3])
+{
+        Propiedades& pr = members->Propiedades;
+        Pipeline& p = members->Pipeline;
+
+        double focal_c[3], pos_c[3];
+        for (int i = 0; i < 3; i++) {
+                focal_c[i] = pr.CameraFocalPoint[i] - focal[i];
+                pos_c[i] = pr.CameraPosition[i] - pos[i];
+        }
+
+        vtkCamera *camera = p.Renderer->GetActiveCamera();
+        camera->SetPosition(pos_c);
+        camera->SetFocalPoint(focal_c);
+}
+
+void vtkGinkgoImageViewer::SetLookupTable(vtkSmartPointer<vtkScalarsToColors> lut, int idLookupTable)
+{
+        if (!lut) {
+                return;
+        }
+        double v_min = this->GetLevel() - 0.5 * this->GetWindow();
+        double v_max = this->GetLevel() + 0.5 * this->GetWindow();
+
+        lut->SetRange(v_min,v_max);
+
+
+        vtkLookupTable* realLut = vtkLookupTable::SafeDownCast(lut);
+
+        if (!realLut) {
+                std::cerr << "Error: Cannot cast vtkScalarsToColors to vtkLookupTable." << std::endl;
+                return;
+        }
+
+        /**
+        Due to the same problem as above (shift/scale), one must copy the lut
+        so that it does not change values of the shared object.
+        */
+        vtkLookupTable* newLut = vtkLookupTable::New();
+        newLut->DeepCopy(realLut);
+        newLut->SetRange(v_min, v_max);
+        members->Pipeline.Textura->SetLookupTable(newLut);
+        members->Pipeline.LookupTable = newLut;
+        members->Pipeline.LookupTableId = (vtkLookupTableManager::LookupTableIds) idLookupTable;
+        newLut->Delete();
+}
+
+vtkSmartPointer<vtkScalarsToColors> vtkGinkgoImageViewer::GetLookupTable()
+{
+        return members->Pipeline.LookupTable;
+}
+
+int vtkGinkgoImageViewer::GetIdLookupTable()
+{
+        return members->Pipeline.LookupTableId;
+}
+
+/** Set Image Brightness (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+void vtkGinkgoImageViewer::SetBrightness(float brightness)
+{
+        members->Pipeline.Textura->SetBrightness(brightness);
+}
+
+/** Set Image Contrast (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+void vtkGinkgoImageViewer::SetContrast(float contrast)
+{
+        members->Pipeline.Textura->SetContrast(contrast);
+}
+
+/** Get Image Brightness (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+float vtkGinkgoImageViewer::GetBrightness()
+{
+        return members->Pipeline.Textura->GetBrightness();
+}
+
+/** Get Image Contrast (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+float vtkGinkgoImageViewer::GetContrast()
+{
+        return members->Pipeline.Textura->GetContrast();
+}
+
+void vtkGinkgoImageViewer::ResetBrightnessAndContrast()
+{
+        members->Pipeline.Textura->ResetBrightnessAndContrast();
+}
+
+//region Control: Zoom
+void vtkGinkgoImageViewer::ResetZoom(bool mantenerZoom, int zoomMode)
+{
+        Pipeline& p = members->Pipeline;
+        Estado& e = members->Estado;
+        Propiedades& pr = members->Propiedades;
+
+        double bounds[6];
+        p.Renderer->ComputeVisiblePropBounds(bounds);
+        p.Renderer->ResetCamera(members->Pipeline.ImageActor->GetBounds());
+        double w1 = bounds[1] - bounds[0];
+        double w2 = bounds[3] - bounds[2];
+        double w3 = bounds[5] - bounds[4];
+        double radius = 0.5 * (std::max(w1, std::max(w2, w3)));
+
+        vtkCamera *camera = p.Renderer->GetActiveCamera();
+
+        camera->SetParallelScale(radius);
+
+        double focal_c[3], pos_c[3];
+        camera->GetPosition(pos_c);
+        camera->GetFocalPoint(focal_c);
+        //save initial focal point and position
+        pr.CameraFocalPoint[0] = focal_c[0];
+        pr.CameraFocalPoint[1] = focal_c[1];
+        pr.CameraFocalPoint[2] = focal_c[2];
+
+        pr.CameraPosition[0] = pos_c[0];
+        pr.CameraPosition[1] = pos_c[1];
+        pr.CameraPosition[2] = pos_c[2];
+
+        e.InitialParallelScale = radius;
+
+        if (mantenerZoom) {
+                SetZoom(e.Zoom);
+        } else {
+                e.Zoom = 1.0;
+                if (zoomMode == 1) {
+
+                        double wPunto[2][4]    = {{0.0, 0.0, 0.0, 0.0},{0.0, 0.0, 0.0, 0.0}};
+                        double wPPunto[2][4]    = {{0.0, 0.0, 0.0, 0.0},{0.0, 0.0, 0.0, 0.0}};
+                        double cdir[3]       = {0.0, 0.0, 0.0};         // Vector director de la camara
+                        double iPunto[2][3] = {{0.0, 0.0, 0.0},{0.0, 0.0, 0.0}}; //origen del plano
+
+                        camera->GetDirectionOfProjection(cdir);
+
+                        //>>World
+                        vtkInteractorObserver::ComputeDisplayToWorld(p.Renderer, p.RenderWindow->GetSize()[0] >> 1 , p.RenderWindow->GetSize()[1] >> 1, 0, wPunto[0]);
+                        vtkInteractorObserver::ComputeDisplayToWorld(p.Renderer, (p.RenderWindow->GetSize()[0] >> 1) + 1 , (p.RenderWindow->GetSize()[1] >> 1) + 1, 0, wPunto[1]);
+                        //>>plano imagen
+                        IntersectarRayo(wPunto[0], cdir, wPPunto[0]);
+                        IntersectarRayo(wPunto[1], cdir, wPPunto[1]);
+                        wPPunto[0][3] = 1.0;
+                        wPPunto[1][3] = 1.0;
+                        //>>Imagen
+                        Proyect2D(wPPunto[0], iPunto[0]);
+                        Proyect2D(wPPunto[1], iPunto[1]);
+
+                        double relX = std::abs( (iPunto[1][0] - iPunto[0][0]) );
+                        double relY = std::abs( (iPunto[1][1] - iPunto[0][1]) );
+
+                        SetZoom( (relX + relY) / 2.0);
+                }
+        }
+}
+
+void vtkGinkgoImageViewer::SetInitialParallelScale(double scale)
+{
+        Estado& e = members->Estado;
+        e.InitialParallelScale = scale;
+        SetZoom(e.Zoom);
+}
+
+
+/** Set the actual zoom factor of the view. */
+void vtkGinkgoImageViewer::SetZoom(double factor)
+{
+        Pipeline& p = members->Pipeline;
+        Estado& e = members->Estado;
+
+        //se satura
+#ifndef _GINKGO_DEBUG
+        factor = std::max(factor,(double)VTK_GINKGO_ZOOM_MIN);
+        factor = std::min(factor,(double)VTK_GINKGO_ZOOM_MAX);
+#endif
+
+        if (p.Renderer == NULL) {
+                return;
+        }
+
+
+        if( this->IsLocked() ) {
+                return;
+        }
+
+        this->Lock();
+
+
+        for( std::list< vtkSmartPointer<vtkGinkgoImageViewer> >::iterator it = this->Children.begin(); it != this->Children.end(); ++it) {
+
+                vtkGinkgoImageViewer* view = vtkGinkgoImageViewer::SafeDownCast ( *it );
+
+                if( view && view->GetLinkZoom() ) {
+                        view->SyncSetZoom (factor);
+                        if( !view->GetRenderWindow()->GetNeverRendered() ) {
+                                view->Render();
+                        }
+                }
+        }
+        this->UnLock();
+
+
+        vtkCamera *camera = p.Renderer->GetActiveCamera();
+
+        e.Zoom = factor;
+
+        camera->SetParallelScale(e.InitialParallelScale / e.Zoom);
+
+        //se invoca el evento
+        this->InvokeEvent (vtkGinkgoImageViewer::ViewImageZoomChangeEvent, NULL);
+        /*
+        if (p.RenderWindowInteractor->GetLightFollowCamera()) {
+        	p.Renderer->UpdateLightsGeometryToFollowCamera();
+        }
+        */
+}
+
+double vtkGinkgoImageViewer::GetZoom()
+{
+        Estado& e = members->Estado;
+        return e.Zoom;
+}
+
+double vtkGinkgoImageViewer::GetZoomFactor()
+{
+        Pipeline& p = members->Pipeline;
+        //Estado& e = members->Estado;
+
+        return p.Renderer->GetActiveCamera()->GetParallelScale() / (double) p.RenderWindow->GetSize()[1];
+}
+
+void vtkGinkgoImageViewer::SyncSetZoom(double factor)
+{
+        SetZoom(factor);
+}
+
+int vtkGinkgoImageViewer::GetLeftButtonInteractionStyle()
+{
+        Comportamiento& c = members->Comportamiento;
+        Interactuacion& i = c.Interactuacion;
+        return i.LeftButtonInteractionStyle;
+}
+
+int vtkGinkgoImageViewer::GetRightButtonInteractionStyle()
+{
+        Comportamiento& c = members->Comportamiento;
+        Interactuacion& i = c.Interactuacion;
+        return i.RightButtonInteractionStyle;
+}
+
+int vtkGinkgoImageViewer::GetMiddleButtonInteractionStyle()
+{
+        Comportamiento& c = members->Comportamiento;
+        Interactuacion& i = c.Interactuacion;
+        return i.MiddleButtonInteractionStyle;
+}
+
+int vtkGinkgoImageViewer::GetWheelInteractionStyle()
+{
+        Comportamiento& c = members->Comportamiento;
+        Interactuacion& i = c.Interactuacion;
+        return i.WheelInteractionStyle;
+}
+
+//--------------------------------------------------------------------
+//region Conversion de coordenadas
+
+void vtkGinkgoImageViewer::CoordenadasImagenACoordenadasMundo(const double ip[3], double wp[3])
+{
+        double pointImagen[4] = {0.0, 0.0, 0.0, 1.0};
+        pointImagen[0] = ip[0];
+        pointImagen[1] = ip[1];
+        pointImagen[2] = ip[2];
+
+        Pipeline& p = members->Pipeline;
+        double r[4];
+        p.ModelMatrix->MultiplyPoint(pointImagen,r);
+
+#if 0
+        double pt[4] = {0.0, 0.0, 0.0, 0.0};
+
+        for (int i = 0; i < 4; i++) {
+                pt[i] = r[i];
+        }
+#endif
+
+        //transformacion homogeneas => no homogeneas
+        if (r[3] == 1.0) {
+                wp[0] = r[0];
+                wp[1] = r[1];
+                wp[2] = r[2];
+        } else if (r[3]) {
+                wp[0] = r[0]/r[3];
+                wp[1] = r[1]/r[3];
+                wp[2] = r[2]/r[3];
+        }
+}
+
+
+void vtkGinkgoImageViewer::CoordenadasMundoACoordenadasImagen(const double wp[3], double ip[3])
+{
+        vtkSmartPointer<vtkImageData> input = GetInput();
+        if (!input) {
+                return;
+        }
+
+        const double* spacing = input->GetSpacing();
+        const double* origin = input->GetOrigin();
+
+        ip[0] = (wp[0] - origin[0]) / spacing[0];
+        ip[1] = ( wp[1] - origin[1]) / spacing[1];
+        ip[2] = (wp[2] - origin[2]) / spacing[2];
+}
+
+void vtkGinkgoImageViewer::CoordenadasImagenACoordenadasPixel(const double ip[3], int pp[3])
+{
+        //Transforma a coordenadas pixel para usar con vtk (un 0.5 del desplazamiento y otro para hacer un round)
+        pp[0] = floor(ip[0] + 0.5);
+        pp[1] = floor(ip[1] + 0.5);
+        pp[2] = floor(ip[2] + 0.5);
+}
+
+void vtkGinkgoImageViewer::CoordenadasImagenACoordenadasPixel(GNC::GCS::Vector& vector)
+{
+        vector += 0.5;
+}
+
+void vtkGinkgoImageViewer::CoordenadasMundoACoordenadasMundoReal(const double wp[3], double rwp[3])
+{
+#if defined(REAL_WORLD_IMAGE_POSITION)
+        if (wp != rwp) {
+                rwp[0] = wp[0];
+                rwp[1] = wp[1];
+                rwp[2] = wp[2];
+        }
+#else
+        Propiedades& pr = members->Propiedades;
+        GNC::GCS::Vector3D v = wp;
+        v -= CurrentOrigin;
+        pr.GetDirection()->MultiplyPoint(v.v, v.v);
+        v += CurrentOrigin;
+        rwp[0] = v.x;
+        rwp[1] = v.y;
+        rwp[2] = v.z;
+#endif
+}
+
+//--------------------------------------------------------------------
+//region Anotaciones
+void vtkGinkgoImageViewer::ActualizarAnotaciones()
+{
+        /*
+        SetupAnnotations();
+        */
+}
+
+
+//region Propiedades geometricas
+
+void vtkGinkgoImageViewer::IntersectarRectangulo(double /*wp0*/[3], double /*wp1*/[3], double /*ip0*/[3], double /*ip1*/[3])
+{
+        assert(false);
+
+}
+
+/** Update the annotations. */
+void vtkGinkgoImageViewer::UpdateAnnotations( void )
+{
+        assert(false);
+}
+
+void vtkGinkgoImageViewer::PrintSelf(std::ostream& os, vtkIndent indent)
+{
+        this->Superclass::PrintSelf(os, indent);
+}
+
+unsigned int vtkGinkgoImageViewer::GetConventions()
+{
+        Propiedades& p = members->Propiedades;
+        return p.Conventions;
+}
+
+/** Reset the camera */
+void vtkGinkgoImageViewer::ResetCamera()
+{
+        Pipeline& p = members->Pipeline;
+
+        if (!p.Renderer) {
+                return;
+        }
+        p.Renderer->Modified();
+        p.Renderer->ResetCamera();
+}
+
+vtkSmartPointer<vtkGinkgoImageViewer> vtkGinkgoImageViewer::GetParent (void) const
+{
+        return NULL;
+}
+
+/**
+Add a child to the list of children. Check if the child is already
+in the list firt.
+*/
+void vtkGinkgoImageViewer::AddChild (vtkSmartPointer<vtkGinkgoImageViewer> /*p_view*/)
+{
+}
+
+void vtkGinkgoImageViewer::AddChildren (std::list<vtkSmartPointer<vtkGinkgoImageViewer> > /*p_viewlist*/)
+{
+}
+
+/**
+Remove a child form the list of children.
+*/
+void vtkGinkgoImageViewer::RemoveChild (vtkSmartPointer<vtkGinkgoImageViewer> /*view*/)
+{
+}
+
+void vtkGinkgoImageViewer::RemoveAllChildren (void)
+{
+}
+
+void vtkGinkgoImageViewer::DrawOn()
+{
+}
+
+void vtkGinkgoImageViewer::DrawOff()
+{
+}
+
+void vtkGinkgoImageViewer::SetIsProcessed(bool processed)
+{
+        Estado& e = members->Estado;
+        e.IsProcessed = processed;
+}
+
+bool vtkGinkgoImageViewer::GetIsProcessed()
+{
+        Estado& e = members->Estado;
+        return e.IsProcessed;
+}
+
+/**
+Part of the function propagation mechanism, when the function Lock() is
+called, the view does not transmit the function to its children (and does
+not do anything in fact).
+*/
+void vtkGinkgoImageViewer::Lock (void)
+{
+}
+
+/**
+A call to UnLock() permits to transmit function calls to the view's children.
+*/
+void vtkGinkgoImageViewer::UnLock (void)
+{
+}
+
+/**
+Returns true if the view has this child in its list.
+*/
+bool vtkGinkgoImageViewer::HasChild (vtkSmartPointer<vtkGinkgoImageViewer>) const
+{
+        return false;
+}
+
+void vtkGinkgoImageViewer::SetLinkRender(bool linkRender)
+{
+        Propiedades& p = members->Propiedades;
+        p.LinkRender = linkRender;
+}
+
+bool vtkGinkgoImageViewer::GetLinkRender()
+{
+        Propiedades& p = members->Propiedades;
+        return p.LinkRender;
+}
+
+void vtkGinkgoImageViewer::InternalEnableShaders(bool enabled)
+{
+        Pipeline& p = members->Pipeline;
+        p.Textura->ForceEnableShaders(enabled);
+}
+
+//------------------------------------------------------------------------------------------------------
+
+void vtkGinkgoImageViewer::SetupAnnotations()
+{
+        assert(false);
+}
+
+void vtkGinkgoImageViewer::UpdateCamera()
+{
+        assert(false);
+}
+
+void vtkGinkgoImageViewer::ActualizarImagen()
+{
+        assert(false);
+}
diff --git a/cadxcore/vtk/vtkginkgoimageviewer.h b/cadxcore/vtk/vtkginkgoimageviewer.h
new file mode 100644
index 0000000..00a1577
--- /dev/null
+++ b/cadxcore/vtk/vtkginkgoimageviewer.h
@@ -0,0 +1,536 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ *  Code based in VTK/VTKInria3D
+ */
+#pragma once
+
+#define REAL_WORLD_IMAGE_POSITION // Use direction cosines to position image plane. Otherwise vtk position is used (identity cosines) and real position is calculated translating and rotating.
+
+#include <vector>
+#include <iostream>
+
+#include <api/api.h>
+
+#include <api/istudycontext.h>
+#include <api/math/geometry.h>
+#include <api/math/geometry3d.h>
+
+#include <vtkObject.h>
+#include <vtkCommand.h>
+#include <vtkSmartPointer.h>
+#include <vtkMatrix4x4.h>
+
+//----------------------------------------------------------------------------------------------------
+//region Forward Declarations
+
+class vtkImageData;
+class vtkRenderer;
+class vtkRenderWindow;
+class vtkRenderWindowInteractor;
+class vtkInteractorStyle;
+class vtkActor;
+class vtkProp;
+class vtkScalarsToColors;
+class vtkImageActor;
+class vtkLookupTable;
+class vtkImageReslice;
+class vtkAlgorithmOutput;
+class vtkDataArray;
+class vtkPlane;
+
+class InternalMembers;
+namespace GNC
+{
+namespace GCS
+{
+class IGinkgoMatrix4x4;
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+class IPipelineProperties;
+}
+}
+
+//endregion
+
+
+class EXTAPI vtkGinkgoImageViewer : public vtkObject
+{
+public:
+
+        //--------------------------------------------------------------------
+        //region Estructuras de datos
+
+        typedef enum InteractionStyleIds {
+                NO_INTERACTION,
+                SELECT_INTERACTION,
+                ZOOM_WITH_SELECT_INTERACTION,
+                ZOOM_INTERACTION
+        } InteractionStyleIds;
+
+        typedef enum ConventionIds {
+                RADIOLOGIC,
+                NEUROLOGIC
+        } ConventionIds;
+
+        typedef enum Axis {
+                X = 0,
+                Y = 1,
+                Z = 2
+        } Axis;
+
+        typedef enum PlanIds {
+                SAGITTAL_ID,
+                CORONAL_ID,
+                AXIAL_ID,
+                NB_PLAN_IDS  // The number of PlanIds
+        } PlanIds;
+
+        typedef enum EventIds {
+                ViewImagePositionChangeEvent=(vtkCommand::UserEvent+1),
+                ViewImageWindowLevelChangeEvent,
+                ViewImageZoomChangeEvent
+        } EventIds;
+
+        //endregion
+
+        //--------------------------------------------------------------------
+        //region Constructores y soporte VTK
+
+        static vtkGinkgoImageViewer* New();
+        vtkTypeMacro(vtkGinkgoImageViewer, vtkObject);
+
+        void InitDefaultInteractor();
+
+        //--------------------------------------------------------------------
+        //region Entrada y pipeline
+
+        GNC::GCS::IPipelineProperties* IImagePropertiesProxy;
+
+        void PrepareForDelete(void);
+
+        void Initialize();
+
+        void Uninitialize();
+
+        void SetInteraction();
+
+        bool IsInstalledAndInitialized();
+
+        /** Enable or Disable interaction on the view. The Interaction mode is store
+        internaly and set at each time the widget is showed. The interaction
+        mode cannot be set before the vtkRenderWindowInteractor is initialized. */
+        void SetInteractionOff( void );
+        void SetInteractionOn( void );
+
+        bool GetInteraction();
+
+        /**
+        Detach the view, i.e. add its own children (if any) to its parent's children (if any).
+        */
+        void Detach (void);
+
+        void ResetCameraClippingRange(bool resetCameraPosition = true);
+
+        void UpdateOrientation();
+
+        void UpdateDisplayExtent();
+
+        void SetInput(const vtkSmartPointer<vtkImageData>& input, bool forzarSetup = false);
+
+        void SetInputConnection(const vtkSmartPointer<vtkAlgorithmOutput>& input, bool forzeSetup = false);
+
+        void RemoveInputs();
+
+        void SetOverlay(const vtkSmartPointer<vtkImageData>& inputOverlay);
+
+        void IntersectarRayo(double wp[4], double vd[3], double pt[3]);
+
+        /** Proyecta un punto en coordenadas mundo a coordenadas imagen (plano con z=currentSlice) **/
+        double* Proyect2D(const double wp[4], double ip[2]) const;
+
+        /** Proyecta un punto en coordenadas imagen (plano con z=currentSlice) a coordenadas mundo **/
+        double* UnProyect2D(const double ip[3], double wp[4]) const;
+
+        void SetupPipeline(bool forceReload = false);
+
+        vtkSmartPointer<vtkAlgorithmOutput> GetInputConnection();
+
+        vtkSmartPointer<vtkImageData> GetInput();
+
+        vtkSmartPointer<vtkActor> GetImageActor();
+
+        vtkSmartPointer<vtkPlane> GetPlane();
+
+        const GNC::GCS::Vector3D* GetSliceCoordinates();
+
+        long GetImageTexture();
+
+        /*
+        void SetMaskImage(vtkSmartPointer<vtkImageData> mask, vtkSmartPointer<vtkLookupTable> lut);
+
+        void RemoveMaskImage();
+        */
+
+        /** Set the RenderWindow */
+        void SetRenderWindow(vtkSmartPointer<vtkRenderWindow> arg);
+
+
+        /** Set the Renderer **/
+        void SetRenderer(vtkSmartPointer<vtkRenderer> arg);
+
+
+        /** Attach an interactor to the internal RenderWindow. **/
+        void SetInteractor(vtkSmartPointer<vtkRenderWindowInteractor>);
+
+        /** Get the vtkRenderWindow associated */
+        vtkSmartPointer<vtkRenderWindow> GetRenderWindow();
+
+
+        /** Get the vtkRenderer associated */
+        vtkSmartPointer<vtkRenderer> GetRenderer();
+
+
+        /** Get the vtkRenderWindow associated */
+        vtkSmartPointer<vtkRenderWindowInteractor> GetRenderWindowInteractor();
+
+
+        /** Add the actor to the first renderer of the render window if exist.
+        Do nothing otherwise.*/
+        void AddActor(vtkSmartPointer<vtkProp> actor);
+
+
+        /** remove the actor from the first renderer of the render window if exist.
+        Do nothing otherwise.*/
+        void RemoveActor(vtkSmartPointer<vtkProp> actor);
+
+        void Reset();
+
+        void SetTindex(int index);
+        int GetTindex();
+
+        /** Call the RenderWindow's Render() method. */
+        void Render (void);
+        void SyncRender (void);
+
+        void Update();
+
+        void UpdateImage();
+
+        //region Propiedades / Estado, to obtain old spaicing, dimensions... test proxy has to be false
+        bool GetDimensions( int dimensions[3], bool testProxy = true );
+        bool GetSpacing( double spacing[3], bool testProxy = true );
+        bool GetOrigin( double origin[3], bool testProxy = true  );
+        bool GetBounds( double bounds[6] );
+
+//	bool GetMatrizModelo(double matriz[16]);
+        const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4>& GetModelMatrix();
+        const GNC::GCS::Ptr<GNC::GCS::IGinkgoMatrix4x4>& GetModelMatrixInv();
+
+        int GetNumberOfComponents();
+        ///intentar usar estas funciones sólo cuando la imagen este cargada
+        vtkDataArray* GetScalars();
+        void* GetScalarPointer();
+        int GetScalarType();
+        vtkSmartPointer<vtkImageData> GetDataObject();
+        //endregion
+
+        //--------------------------------------------------------------------
+        //region Comportamiento
+
+        /**
+        Switch between radiological (left is right and right is left) and
+        neurological (left is left and right is right) conventions.
+        */
+        void SetConventionsToRadiological(void);
+
+        /**
+        Switch between radiological (left is right and right is left) and
+        neurological (left is left and right is right) conventions.
+        */
+        void SetConventionsToNeurological(void);
+
+        void SetOrientation(unsigned int p_orientation);
+
+        int GetOrientation();
+
+        /** Copy camera status from other **/
+        void CopyCameraStatus(vtkGinkgoImageViewer* other);
+
+        /** Copy camera from other **/
+        void CopyCamera(const vtkGinkgoImageViewer* other);
+
+        /** Returns the current camera rotation in radians (-PI/2, PI/2] **/
+        double GetCameraRotation() const;
+
+        /** Returns if camera location has changed to Flip image vertically **/
+        bool   GetCameraFlipVertical() const;
+
+        /** Returns if camera location has changed to Flip image horizonally **/
+        bool   GetCameraFlipHorizontal() const;
+
+
+        /** Specify the interactor style */
+        void SetInteractorStyle(vtkSmartPointer<vtkInteractorStyle> style);
+
+
+        /** Get the interactor style */
+        vtkSmartPointer<vtkInteractorStyle> GetInteractorStyle();
+
+        int GetInteractionStyle();
+        void SetInteractionStyle(int type);
+
+
+        /** Set the background color. Format is RGB, 0 <= R,G,B <=1
+        Example: SetBackgroundColor(0.9,0.9,0.9) for grey-white. */
+        void SetBackgroundColor(double r, double g, double b);
+
+
+        /** Show/Hide the annotations. Call UpdateAnnotations after this function. */
+        void SetShowAnnotations (bool show);
+        bool GetShowAnnotations();
+
+        //--------------------------------------------------------------------
+        //region Propiedades
+
+        void SetInterpolationMode(int enable);
+        int GetInterpolationMode();
+
+        bool GetWholeExtent(int extent[6]) const;
+        bool SetUpdateExtent(int extent[6]);
+        bool GetSliceRange(vtkGinkgoImageViewer::Axis axis, int range[2]) const;
+
+        bool GetLinkCameraFocalAndPosition();
+        void SetLinkCameraFocalAndPosition(bool link);
+
+        bool GetLinkZoom();
+        void SetLinkZoom(bool link);
+
+        void ClearRotationAndFlip(bool update = false);
+        void RotateCamera( bool right);
+        void RotateCamera( double angle);
+        void Flip(bool vertical);
+
+
+        //region Control: WindowLevel
+
+        void SetWindowLevelFrom(vtkSmartPointer<vtkGinkgoImageViewer> p_view);
+        void SetDefaultWindowLevel(float initialWindow, float initialLevel);
+        void SetAutoDefaultWindowLevel();
+
+        double GetWindow();
+        double GetLevel();
+
+        void SetWindow(double window);
+        void SetLevel(double level);
+        void SyncSetWindow (double w);
+        void SyncSetLevel (double w);
+
+        void ResetToDefaultWindowLevel();
+
+        void SyncSetCameraFocalAndPosition(double* focal, double* pos);
+        void GetRelativePositionOfCamera(double focal[3], double pos[3]);
+        void SetRelativePositionOfCamera(const double focal[3], const double pos[3]);
+
+        void SetLookupTable(vtkSmartPointer<vtkScalarsToColors> lut, int idLookupTable);
+        vtkSmartPointer<vtkScalarsToColors> GetLookupTable();
+        int GetIdLookupTable();
+
+        /** Set Image Brightness (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+        void SetBrightness(float brightness);
+
+        /** Set Image Contrast (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+        void SetContrast(float contrast);
+
+        /** Get Image Brightness (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+        float GetBrightness();
+
+        /** Get Image Contrast (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+        float GetContrast();
+
+        void ResetBrightnessAndContrast();
+
+        //region Control: Zoom
+        void SetInitialParallelScale(double scale);
+        /**
+        Resets Zoom
+        \param maintainZoom Maintain current zoom scale
+        \param zoomMode Set the Zoom mode: ZM_CenteredBestFit = 0, ZM_CenteredOriginalSize = 1
+        **/
+        void ResetZoom(bool mantenerZoom, int zoomMode);
+
+        /** Set the actual zoom factor of the view. */
+        void SetZoom(double factor);
+        double GetZoom();
+        /* Returns the height of one display pixel in world size (mm) */
+        double GetZoomFactor();
+        void SyncSetZoom(double factor);
+
+        int GetLeftButtonInteractionStyle();
+        int GetRightButtonInteractionStyle();
+        int GetMiddleButtonInteractionStyle();
+        int GetWheelInteractionStyle();
+
+
+        //--------------------------------------------------------------------
+        //region Conversion de coordenadas
+
+        void CoordenadasImagenACoordenadasMundo(const double ip[3], double wp[4]);
+
+        void CoordenadasImagenACoordenadasPixel(const double ip[3], int pp[2]);
+
+        void CoordenadasImagenACoordenadasPixel(GNC::GCS::Vector& vector);
+
+        void CoordenadasMundoACoordenadasImagen(const double wp[3], double ip[3]);
+
+        /** Apply cosines correction if needed **/
+        void CoordenadasMundoACoordenadasMundoReal(const double wp[3], double rwp[3]);
+
+        //--------------------------------------------------------------------
+        //region Anotaciones
+        void ActualizarAnotaciones();
+
+        //region Propiedades geometricas
+
+        void IntersectarRectangulo(double wp0[3], double wp1[3], double ip0[3], double ip1[3]);
+
+        /** Update the annotations. */
+        void UpdateAnnotations( void );
+
+        void PrintSelf(ostream& os, vtkIndent indent);
+
+        unsigned int GetConventions();
+
+        /** Reset the camera */
+        void ResetCamera();
+
+        vtkSmartPointer<vtkGinkgoImageViewer> GetParent (void) const;
+
+        /**
+        Add a child to the list of children. Check if the child is already
+        in the list firt.
+        */
+        void AddChild (vtkSmartPointer<vtkGinkgoImageViewer> p_view);
+
+        //BTX
+        void AddChildren (std::list<vtkSmartPointer<vtkGinkgoImageViewer> > p_viewlist);
+        //ETX
+
+        /**
+        Remove a child form the list of children.
+        */
+        void RemoveChild (vtkSmartPointer<vtkGinkgoImageViewer> view);
+
+        void RemoveAllChildren (void);
+
+        /**
+        This function is called right after setting both Renderer and RenderWindow.
+        It allows a class to add actors for instance without knowing when the Renderer
+        and RenderWindow are set. For example, vtkGinkgoImageViewer will add the corner annotations
+        during the call to the Initialize function.
+        */
+
+        //BTX
+        std::list < vtkSmartPointer<vtkGinkgoImageViewer> > GetChildren(void) const
+        {
+                return this->Children;
+        }
+        //ETX
+
+        void DrawOn();
+        void DrawOff();
+
+        void SetIsProcessed(bool processed);
+        bool GetIsProcessed();
+
+        bool IsLocked (void)
+        {
+                return this->GetIsProcessed();
+        }
+
+        /**
+        Part of the function propagation mechanism, when the function Lock() is
+        called, the view does not transmit the function to its children (and does
+        not do anything in fact).
+        */
+        void Lock (void);
+
+        /**
+        A call to UnLock() permits to transmit function calls to the view's children.
+        */
+        void UnLock (void);
+
+        /**
+        Returns true if the view has this child in its list.
+        */
+        bool HasChild (vtkSmartPointer<vtkGinkgoImageViewer>) const;
+
+        /** Set the render link ON or OFF */
+        void SetLinkRender(bool linkRender);
+        bool GetLinkRender();
+
+        /**force disable shaders...*/
+        void InternalEnableShaders(bool enabled);
+
+protected:
+
+        //BTX
+        vtkSmartPointer<vtkGinkgoImageViewer>                 Parent;
+        std::list< vtkSmartPointer<vtkGinkgoImageViewer> > Children;
+        //ETX
+
+        /**
+        Set the parent for this view. Internal use only.
+        */
+        void SetParent (vtkSmartPointer<vtkGinkgoImageViewer> view);
+
+protected:
+        vtkGinkgoImageViewer();
+        ~vtkGinkgoImageViewer();
+
+        void SetupAnnotations();
+
+        void UpdateCamera();
+public:
+        void ActualizarImagen();
+
+
+public:
+        std::string ImageSizeData;
+        std::string PixelSizeData;
+        std::string VoxelSizeData;
+        std::string CurrentPositionData;
+        std::string CurrentSliceData;
+        std::string CurrentPointValueData;
+        std::string CurrentPointPositionData;
+        std::string CurrentWindowLevelData;
+
+        InternalMembers*  members;
+
+        std::string ambitolog;
+
+        GNC::GCS::Vector3D SliceCoordinates[4];
+
+        GNC::GCS::Vector3D CurrentOrigin;
+
+};
diff --git a/cadxcore/vtk/vtkopenglginkgotexture.cpp b/cadxcore/vtk/vtkopenglginkgotexture.cpp
new file mode 100644
index 0000000..d2da127
--- /dev/null
+++ b/cadxcore/vtk/vtkopenglginkgotexture.cpp
@@ -0,0 +1,1423 @@
+
+/*
+*
+*  $Id: vtkopenglginkgotexture.cpp $
+*  Ginkgo CADx Project
+*
+*  Code adapted from VTK
+*
+*
+=========================================================================
+
+Program:   Visualization Toolkit
+Module:    $RCSfile: vtkGinkgoOpenGLTexture.cxx,v $
+
+Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+All rights reserved.
+See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+This software is distributed WITHOUT ANY WARRANTY; without even
+the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+PURPOSE.  See the above copyright notice for more information.
+
+=========================================================================*/
+#if defined max
+#undef max
+#endif
+#if defined min
+#undef min
+#endif
+
+#include <cmath>
+#include <limits>
+
+#if defined(__DEPRECATED)
+#undef __DEPRECATED
+#endif
+#include "vtkopenglginkgotexture.h"
+
+#include <vtkHomogeneousTransform.h>
+#include <vtkImageData.h>
+#include <vtkUnsignedCharArray.h>
+#include <vtkUnsignedShortArray.h>
+#include <vtkUnsignedIntArray.h>
+#include <vtkFloatArray.h>
+#include <vtkDoubleArray.h>
+#include <vtkLookupTable.h>
+#include <vtkObjectFactory.h>
+#include <vtkOpenGLRenderer.h>
+#include <vtkPointData.h>
+#include <vtkRenderWindow.h>
+#include <vtkOpenGLExtensionManager.h>
+#include <vtkOpenGLRenderWindow.h>
+#include <vtkTransform.h>
+#include <vtkPixelBufferObject.h>
+#include <vtkOpenGL.h>
+#include <vtkgl.h> // vtkgl namespace
+
+#include <main/controllers/controladorlog.h>
+#include <main/controllers/controladorpermisos.h>
+
+#ifndef VTK_IMPLEMENT_MESA_CXX
+vtkStandardNewMacro(vtkGinkgoOpenGLTexture);
+#endif
+
+#define ADAPTATIVE_BRIGHNESS_CONTRAST
+
+inline char clampByte(int color)
+{
+        if( color & (~255) ) {
+                color = (char)((-(color)) >> 31);
+        } else {
+                color = (char)(color);
+        }
+        return color;
+}
+
+// integer implementation (fast but incomplete)
+inline char mixFixedPoint( char x, char y, char a)
+{
+        unsigned int alpha = a;
+        unsigned int inv_alpha = 255 - a;
+        return clampByte( (alpha * x + inv_alpha * y) >> 8);
+}
+
+/** Interpolate the normalized values between "x" and "y" with factor "1-a, a" (slow) **/
+inline float mixNormalized(float x, float y, float a)
+{
+        return x * (1.0f - a) + (y * a);
+}
+
+inline float clamp(float min, float max, float val)
+{
+        if (val > max) {
+                return max;
+        } else {
+                if (val < min) {
+                        return min;
+                } else {
+                        return val;
+                }
+        }
+}
+
+// ----------------------------------------------------------------------------
+// Initializes an instance, generates a unique index.
+vtkGinkgoOpenGLTexture::vtkGinkgoOpenGLTexture()
+{
+        this->Index = 0;
+        this->RenderWindow = 0;
+        this->CheckedHardwareSupport=false;
+        this->SupportsNonPowerOfTwoTextures=false;
+        this->SupportsPBO=false;
+        this->SupportsVertexShaders=false;
+        this->SupportsFragmentShaders=false;
+        this->SupportsMultiTexture=false;
+        this->PBO=0;
+        this->VertexProgram=0;
+        this->FragmentProgram=0;
+        this->ProgramObject=0;
+        this->LUTIndex=0;
+        this->UseShader=false;
+        this->InternalEnableShaders = true;
+        this->zsize=0;
+        this->TIndex=0;
+        this->TIndexChanged=false;
+        this->LookupTableChanged = false;
+        this->RGBImage = false;
+        this->ResetBrightnessAndContrast();
+}
+
+void vtkGinkgoOpenGLTexture::SetBrightness(float brightness)
+{
+#if defined(ADAPTATIVE_BRIGHNESS_CONTRAST)
+        this->Brightness = brightness;
+#else
+        this->Brightness = clamp(-1.0f, 1.0f, brightness);
+#endif
+
+        this->LookupTableChanged = true;
+}
+
+void vtkGinkgoOpenGLTexture::SetContrast(float contrast)
+{
+#if defined(ADAPTATIVE_BRIGHNESS_CONTRAST)
+        this->Contrast = contrast;
+#else
+        this->Contrast = clamp(0.0f, 2.0f, contrast);
+#endif
+
+        this->LookupTableChanged = true;
+}
+
+float vtkGinkgoOpenGLTexture::GetBrightness()
+{
+        return this->Brightness;
+}
+
+float vtkGinkgoOpenGLTexture::GetContrast()
+{
+        return this->Contrast;
+}
+
+void vtkGinkgoOpenGLTexture::ResetBrightnessAndContrast()
+{
+
+#if defined(ADAPTATIVE_BRIGHNESS_CONTRAST)
+        this->Brightness = 1.0f;
+#else
+        this->Brightness = 0.0f;
+#endif
+        this->Contrast = 1.0f;
+        this->LookupTableChanged = true;
+}
+
+// ----------------------------------------------------------------------------
+vtkGinkgoOpenGLTexture::~vtkGinkgoOpenGLTexture()
+{
+        if (this->RenderWindow) {
+                this->ReleaseGraphicsResources(this->RenderWindow);
+        }
+        if(this->PBO!=0) {
+                vtkErrorMacro(<< "PBO should have been deleted in ReleaseGraphicsResources()");
+        }
+        this->RenderWindow = NULL;
+}
+
+// ----------------------------------------------------------------------------
+void vtkGinkgoOpenGLTexture::Initialize(vtkRenderer * vtkNotUsed(ren))
+{
+}
+
+void vtkGinkgoOpenGLTexture::SetLookupTable(vtkScalarsToColors* table)
+{
+        vtkOpenGLTexture::SetLookupTable(table);
+        this->LookupTableChanged = true;
+
+}
+
+// ----------------------------------------------------------------------------
+// Release the graphics resources used by this texture.
+void vtkGinkgoOpenGLTexture::ReleaseGraphicsResources(vtkWindow *renWin)
+{
+        if (this->Index && renWin && renWin->GetMapped()) {
+                static_cast<vtkRenderWindow *>(renWin)->MakeCurrent();
+#ifdef GL_VERSION_1_1
+                // free any textures
+                if (glIsTexture(static_cast<GLuint>(this->Index))) {
+                        GLuint tempIndex;
+                        tempIndex = this->Index;
+                        // NOTE: Sun's OpenGL seems to require disabling of texture before delete
+                        //glDisable(GL_TEXTURE_2D);
+                        glDeleteTextures(1, &tempIndex);
+                }
+#else
+                if (glIsList(this->Index)) {
+                        glDeleteLists(this->Index,1);
+                }
+#endif
+        }
+        this->Index = 0;
+        this->RenderWindow = NULL;
+        this->CheckedHardwareSupport=false;
+        this->SupportsNonPowerOfTwoTextures=false;
+        this->SupportsPBO=false;
+        if(this->PBO!=0) {
+                this->PBO->Delete();
+                this->PBO=0;
+        }
+        this->Modified();
+}
+
+
+#if defined(ADAPTATIVE_BRIGHNESS_CONTRAST) // "The OpenGL Shading Language" C.19.
+
+const char *FragmenProgramCode_rgb[] =   {
+        "uniform sampler2D imagetexture;",
+        "uniform float brightness;",
+        "uniform float contrast;",
+        "vec4 averageLuminance = vec4(0.5, 0.5, 0.5, 1.0);",
+        "void main(void)",
+        "{",
+        "vec4 color = texture2D(imagetexture, gl_TexCoord[0].xy);",
+        "gl_FragColor = mix(color * brightness, mix(averageLuminance, color, contrast), 0.5);",
+        "}"
+};
+#else
+const char *FragmenProgramCode_rgb[] =   {
+        "uniform sampler2D imagetexture;",
+        "uniform float brightness;",
+        "uniform float contrast;",
+        "void main(void)",
+        "{",
+        "vec4 color = texture2D(imagetexture, gl_TexCoord[0].xy);",
+        "float pa = color.a;",
+        "color = ((color - 0.5) * max(contrast, 0.0)) + 0.5 + brightness;",
+        "color.a = pa;",
+        "gl_FragColor = color;",
+        "}"
+};
+#endif
+const char *FragmenProgramCode_gray[] = {
+        "uniform sampler2D imagetexture;",
+        "uniform sampler1D lookuptable;",
+        "uniform float lutShift;",
+        "uniform float lutScale;",
+        "void main(void)",
+        "{",
+        "vec4 color = texture2D(imagetexture, gl_TexCoord[0].xy);",
+        "float lutColor = (color.r + lutShift) * lutScale;",
+        "lutColor = clamp(lutColor, 0.0f, 1.0f);",
+        "vec4 cr = texture1D(lookuptable, lutColor);",
+        //"cr.a = 1.0;",
+        "gl_FragColor = cr;",
+        "}"
+};
+
+
+// ----------------------------------------------------------------------------
+// Implement base class method.
+void vtkGinkgoOpenGLTexture::Load(vtkRenderer *ren)
+{
+        vtkImageData *input = NULL;
+
+        GNC::GCS::ILocker lock(this);
+        {
+                input = this->GetInput();
+
+                GLenum TexFormat         = GL_LUMINANCE;
+                GLenum TexInternalFormat = GL_LUMINANCE;
+                GLenum TexType           = GL_UNSIGNED_BYTE;
+
+
+                this->Initialize(ren);
+
+                // Need to reload the texture.
+                // There used to be a check on the render window's mtime, but
+                // this is too broad of a check (e.g. it would cause all textures
+                // to load when only the desired update rate changed).
+                // If a better check is required, check something more specific,
+                // like the graphics context.
+                vtkOpenGLRenderWindow* renWin = static_cast<vtkOpenGLRenderWindow*>(ren->GetRenderWindow());
+
+                if(this->BlendingMode != VTK_TEXTURE_BLENDING_MODE_NONE && vtkgl::ActiveTexture) {
+                        glTexEnvf (GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, vtkgl::COMBINE);
+
+                        switch(this->BlendingMode) {
+                        case VTK_TEXTURE_BLENDING_MODE_REPLACE: {
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_RGB, GL_REPLACE);
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_ALPHA, GL_REPLACE);
+                                break;
+                        }
+                        case VTK_TEXTURE_BLENDING_MODE_MODULATE: {
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_RGB, GL_MODULATE);
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_ALPHA, GL_MODULATE);
+                                break;
+                        }
+                        case VTK_TEXTURE_BLENDING_MODE_ADD: {
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_RGB, GL_ADD);
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_ALPHA, GL_ADD);
+                                break;
+                        }
+                        case VTK_TEXTURE_BLENDING_MODE_ADD_SIGNED: {
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_RGB, vtkgl::ADD_SIGNED);
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_ALPHA, vtkgl::ADD_SIGNED);
+                                break;
+                        }
+                        case VTK_TEXTURE_BLENDING_MODE_INTERPOLATE: {
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_RGB, vtkgl::INTERPOLATE);
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_ALPHA, vtkgl::INTERPOLATE);
+                                break;
+                        }
+                        case VTK_TEXTURE_BLENDING_MODE_SUBTRACT: {
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_RGB, vtkgl::SUBTRACT);
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_ALPHA, vtkgl::SUBTRACT);
+                                break;
+                        }
+                        default: {
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_RGB, GL_ADD);
+                                glTexEnvf (GL_TEXTURE_ENV, vtkgl::COMBINE_ALPHA, GL_ADD);
+                        }
+                        }
+                }
+
+                bool ImageDataChanged =
+                        ( this->GetMTime() > this->LoadTime.GetMTime() )
+                        || ( input->GetMTime() > this->LoadTime.GetMTime() )
+                        || ( !UseShader && this->GetLookupTable() && (this->GetLookupTable()->GetMTime () > this->LoadTime.GetMTime()) )
+                        || ( !UseShader && LookupTableChanged )
+                        || ( renWin != this->RenderWindow.GetPointer() )
+                        || ( renWin->GetContextCreationTime() > this->LoadTime );
+
+                if (TIndexChanged || ImageDataChanged ) {
+                        int bytesPerPixel;
+                        int size[3];
+                        vtkDataArray *scalars = NULL;
+                        unsigned char* vptr = NULL;
+                        unsigned char *resultData=NULL;
+                        int xsize, ysize;
+                        unsigned int xs,ys;
+                        GLuint tempIndex=0;
+
+                        unsigned long off = 0;
+                        unsigned char* pNPOTPixelData = NULL;
+                        unsigned char* pResampledPixelData = NULL;
+
+                        // Get the scalars the user choose to color with.
+                        scalars = this->GetInputArrayToProcess(0, input);
+
+                        // make sure scalars are non null
+                        if (!input || !scalars) {
+                                LOG_ERROR("OpenGLComponent", "NULL INPUT");
+                                return;
+                        }
+
+                        // get some info
+                        input->GetDimensions(size);
+
+                        int e[6] = {0, 0, 0, 0, 0, 0};
+                        input->GetExtent(e);
+
+                        //std::cout << "Update extent: [ " << e[0] << ", " << e[1] << ", " << e[2] << ", " << e[3] << ", " << e[4] << ", " << e[5] << " ] " << std::endl;
+
+                        if (input->GetNumberOfCells() == scalars->GetNumberOfTuples()) {
+                                // we are using cell scalars. Adjust image size for cells.
+                                for (int kk=0; kk < 3; kk++) {
+                                        if (size[kk]>1) {
+                                                size[kk]--;
+                                        }
+                                }
+                        }
+
+                        bytesPerPixel = scalars->GetNumberOfComponents();
+
+                        xsize = size[0];
+                        ysize = size[1];
+                        zsize = size[2];
+
+                        if (xsize <= 0 || ysize <= 0 || zsize <= 0) {
+                                LOG_ERROR("OpenGLComponent", "Wrong size: " << xsize << "x" << ysize << "x" << zsize);
+                                return;
+                        }
+                        ///CHECK HARDWARE SUPPORT
+                        if(!this->CheckedHardwareSupport) {
+                                vtkOpenGLExtensionManager *m = renWin->GetExtensionManager();
+                                this->CheckedHardwareSupport = true;
+                                this->SupportsNonPowerOfTwoTextures = m->ExtensionSupported("GL_VERSION_2_0") || m->ExtensionSupported("GL_ARB_texture_non_power_of_two");
+                                this->SupportsPBO=vtkPixelBufferObject::IsSupported(renWin);
+
+                                int supports_GL_VERSION_2_0=m->ExtensionSupported("GL_VERSION_2_0");
+                                if(supports_GL_VERSION_2_0) {
+                                        m->LoadExtension("GL_ARB_multitexture");
+                                        m->LoadExtension("GL_VERSION_2_0");
+                                        //ENABLE/DISABLE SHADER!
+                                        if (this->InternalEnableShaders && GNC::GCS::IControladorPermisos::Instance()->Get("core.opengl", "enable_shaders").Activo()) {
+                                                this->UseShader = true;
+                                        }
+                                }
+                        }
+
+                        if (!UseShader) {
+                                LookupTableChanged = false; // Reset LUT changed state
+                        }
+
+                        TIndex = std::max<int>(0, std::min<int>(TIndex, zsize - 1));
+                        TIndexChanged = false;
+                        off = size[0] * size[1] * TIndex * bytesPerPixel;
+                        //LOG_DEBUG("OpenGLComponent", "Fijado indice " << TIndex);
+
+                        // make sure using unsigned char data of color scalars type
+                        // IF MAP SCALARS
+                        if ( (this->MapColorScalarsThroughLookupTable) || (scalars->GetDataType() != VTK_UNSIGNED_CHAR) ) {
+                                const unsigned int wdh = size[0] * size[1];
+                                const unsigned int numComponents = scalars->GetNumberOfComponents();
+
+                                this->RGBImage = false;
+
+                                //IF THERE IS ONLY ONE COMPONENT COULD USE SHADERS...
+                                if (numComponents == 1) {
+
+                                        if (UseShader) {
+                                                double range[2] = {0.0, 1.0};
+                                                scalars->GetRange(range);
+
+                                                TIndex = std::max<int>(0, std::min<int>(TIndex, zsize - 1));
+                                                TIndexChanged = false;
+
+                                                LOG_DEBUG("OpenGLComponent", "Tipo de componente: " << scalars->GetDataTypeAsString());
+                                                if (scalars->GetDataType() == VTK_UNSIGNED_SHORT || scalars->GetDataType() == VTK_SHORT) {
+                                                        //RESCALE TO UNSIGNED SHORT
+                                                        bytesPerPixel         = 2;
+                                                        TexInternalFormat = GL_LUMINANCE16;
+                                                        TexType           = GL_UNSIGNED_SHORT;
+
+                                                        unsigned short* resamplePixelData = new unsigned short[wdh];
+
+                                                        const unsigned int psize = wdh;
+                                                        double diff = range[1] - range[0];
+
+                                                        if (diff < std::numeric_limits<double>::epsilon() ) {
+                                                                range[0] = (scalars->GetDataType() == VTK_UNSIGNED_SHORT)?((double) std::numeric_limits<unsigned short>::min()):((double) std::numeric_limits<short>::min());
+                                                                range[1] = (scalars->GetDataType() == VTK_UNSIGNED_SHORT)?((double) std::numeric_limits<unsigned short>::max()):((double) std::numeric_limits<short>::max());
+                                                                diff = range[1] - range[0];
+                                                        }
+
+                                                        off = size[0] * size[1] * TIndex * bytesPerPixel;
+                                                        unsigned char* dptr = (unsigned char*) scalars->GetVoidPointer(0);
+                                                        if (dptr == NULL) {
+                                                                delete[] resamplePixelData;
+                                                                LOG_ERROR("OpenGLComponent", "Could not get pixel data pointer");
+                                                                return;
+                                                        }
+                                                        vptr = (unsigned char*) (dptr + off);
+
+                                                        double scale = 1 / diff;
+                                                        unsigned short* dst = resamplePixelData;
+                                                        short* src = (short*)vptr;
+
+                                                        // Verificaciones extra para VIX. El flujo permanece igual.
+                                                        unsigned short v;
+                                                        long long maxVal1 = - ( (long long) std::numeric_limits<unsigned short>::min());
+                                                        long long minVal1 = ( (long long) std::numeric_limits<unsigned short>::max());
+
+                                                        long long maxVal2 = - ( (long long) std::numeric_limits<unsigned short>::min());
+                                                        long long minVal2 = ( (long long) std::numeric_limits<unsigned short>::max());
+
+                                                        for (unsigned int i = 0; i < psize; i++) {
+                                                                if (scalars->GetDataType() == VTK_UNSIGNED_SHORT) {
+                                                                        const unsigned short v1 = *((unsigned short*) src++);
+                                                                        minVal1 = std::min(minVal1, (long long)v1);
+                                                                        maxVal1 = std::max(maxVal1, (long long)v1);
+                                                                        v = (unsigned short)(( scale * ((double)v1 - range[0]) ) * std::numeric_limits<unsigned short>::max());
+                                                                        minVal2 = std::min(minVal2, (long long)v);
+                                                                        maxVal2 = std::max(maxVal2, (long long)v);
+                                                                } else {
+                                                                        const signed short v1 = *((signed short*) src++);
+                                                                        minVal1 = std::min(minVal1, (long long)v1);
+                                                                        maxVal1 = std::max(maxVal1, (long long)v1);
+                                                                        v = (unsigned short)(( scale * ((double)v1 - range[0]) ) * std::numeric_limits<unsigned short>::max());
+                                                                        minVal2 = std::min(minVal2, (long long)v);
+                                                                        maxVal2 = std::max(maxVal2, (long long)v);
+                                                                }
+                                                                *(dst++) =  v;
+                                                        }
+                                                        pResampledPixelData = (unsigned char*) resamplePixelData;
+                                                        vptr = pResampledPixelData;
+                                                } else if (scalars->GetDataType() == VTK_UNSIGNED_CHAR || scalars->GetDataType() == VTK_CHAR) {
+                                                        //rescale to unsigned byte
+                                                        bytesPerPixel         = 1;
+                                                        TexInternalFormat = GL_LUMINANCE8;
+                                                        TexType = GL_UNSIGNED_BYTE;
+
+                                                        unsigned char* resamplePixelData = new unsigned char[wdh];
+
+                                                        const unsigned int psize = wdh;
+                                                        double diff = range[1] - range[0];
+
+                                                        if (diff < std::numeric_limits<double>::epsilon() ) {
+                                                                range[0] = (scalars->GetDataType() == VTK_UNSIGNED_CHAR)?((double) std::numeric_limits<unsigned char>::min()):((double) std::numeric_limits<char>::min());
+                                                                range[1] = (scalars->GetDataType() == VTK_UNSIGNED_CHAR)?((double) std::numeric_limits<unsigned char>::max()):((double) std::numeric_limits<char>::max());
+                                                                diff = range[1] - range[0];
+                                                        }
+
+                                                        off = size[0] * size[1] * TIndex * bytesPerPixel;
+                                                        unsigned char* dptr = (unsigned char*) scalars->GetVoidPointer(0);
+                                                        if (dptr == NULL) {
+                                                                delete[] resamplePixelData;
+                                                                LOG_ERROR("OpenGLComponent", "Could not get pixel data pointer");
+                                                                return;
+                                                        }
+                                                        vptr = (unsigned char*) (dptr + off);
+
+                                                        double scale = 1 / diff;
+                                                        unsigned char* dst = resamplePixelData;
+                                                        char* src = (char*)vptr;
+
+                                                        unsigned char v;
+                                                        for (unsigned int i = 0; i < psize; i++) {
+                                                                if (scalars->GetDataType() == VTK_UNSIGNED_CHAR) {
+                                                                        const unsigned char v1 = *((unsigned char*)src);
+                                                                        v = (unsigned char)(( scale * ( v1 - range[0]) )*std::numeric_limits<unsigned char>::max());
+                                                                        src++;
+                                                                } else {
+                                                                        v = (unsigned char)(( scale * ((char) *(src++) - range[0]) )*std::numeric_limits<unsigned char>::max());
+                                                                }
+                                                                *(dst++) =  v;
+                                                        }
+                                                        pResampledPixelData = (unsigned char*) resamplePixelData;
+                                                        vptr = pResampledPixelData;
+                                                } else {
+                                                        LOG_DEBUG("OpenGLComponent", "Shaders don't support this component type: Wrong size: " << scalars->GetDataTypeAsString());
+                                                        this->UseShader = false;
+                                                }
+                                        }
+                                        //if support shaders but scalar type isn't short or char, vtk makes the mapping
+                                        if (!this->UseShader) {
+                                                //optimization, if we call mapscalars to colors with all scalars multiframe performance will be very bad
+                                                if (zsize > 1) {
+                                                        vtkDataArray* myScalars = vtkDataArray::CreateDataArray(scalars->GetDataType());
+                                                        myScalars->SetNumberOfComponents(scalars->GetNumberOfComponents());
+                                                        myScalars->SetNumberOfTuples(wdh);
+                                                        myScalars->SetVoidArray((scalars->GetVoidPointer(wdh * TIndex)), wdh, 1);
+                                                        myScalars->SetLookupTable(scalars->GetLookupTable());
+                                                        vptr = this->MapScalarsToColors (myScalars);
+                                                        myScalars->Delete();
+                                                } else {
+                                                        vptr = this->MapScalarsToColors (scalars);
+                                                }
+                                                if (vptr == NULL) {
+                                                        LOG_DEBUG("OpenGLComponent", "Could not map pixel data");
+                                                        return;
+                                                }
+                                                bytesPerPixel = 4;
+                                        }
+                                }//end 1 component
+                                else {
+                                        //lookup table with more than one component... extrange
+                                        this->UseShader = false;
+                                        pResampledPixelData = new unsigned char[wdh * 4];
+                                        const unsigned int psize = wdh;
+                                        double range[2] = {0.0, 1.0};
+                                        scalars->GetRange(range);
+                                        double diff = range[1] - range[0];
+
+                                        vptr = (unsigned char*) scalars->GetVoidPointer(0);
+                                        unsigned char *dst = pResampledPixelData;
+
+                                        switch (scalars->GetDataType()) {
+                                        case VTK_CHAR: {
+                                                if (diff < std::numeric_limits<double>::epsilon() ) {
+                                                        range[0] = (double) std::numeric_limits<char>::min();
+                                                        range[1] = (double) std::numeric_limits<char>::max();
+                                                        diff = range[1] - range[0];
+                                                }
+
+                                                double scale = 255.0 / diff;
+
+                                                char *src = ((char*) vptr) + (wdh * TIndex * numComponents);
+
+                                                for (unsigned int i = 0; i < psize; i++) {
+                                                        for (unsigned int j = 0; j < 4; j++) {
+                                                                if (j < numComponents) {
+                                                                        const unsigned char v = (unsigned char) ( scale * ((double) *(src++)) );
+                                                                        *(dst++) =  v;
+                                                                } else {
+                                                                        *(dst++) = 255;
+                                                                }
+                                                        }
+                                                }
+
+                                        }
+                                        break;
+                                        case VTK_UNSIGNED_CHAR: {
+                                                unsigned char *src = ((unsigned char*) vptr) + (wdh * TIndex * numComponents);
+
+                                                for (unsigned int i = 0; i < psize; i++) {
+                                                        for (unsigned int j = 0; j < 4; j++) {
+                                                                if (j < numComponents) {
+                                                                        const unsigned char v = *(src++);
+                                                                        *(dst++) =  v;
+                                                                } else {
+                                                                        *(dst++) = 255;
+                                                                }
+                                                        }
+                                                }
+
+                                        }
+                                        break;
+                                        case VTK_SHORT: {
+
+                                                if (diff < std::numeric_limits<double>::epsilon() ) {
+                                                        range[0] = (double) std::numeric_limits<short>::min();
+                                                        range[1] = (double) std::numeric_limits<short>::max();
+                                                        diff = range[1] - range[0];
+                                                }
+
+                                                short *src = ((short*) vptr) + (wdh * TIndex * numComponents);
+                                                double scale = 255.0 / diff;
+
+                                                for (unsigned int i = 0; i < psize; i++) {
+                                                        for (unsigned int j = 0; j < 4; j++) {
+                                                                if (j < numComponents) {
+                                                                        const unsigned char v = (unsigned char) ( scale * ((double) *(src++)) );
+                                                                        *(dst++) =  v;
+                                                                } else {
+                                                                        *(dst++) = 255;
+                                                                }
+                                                        }
+                                                }
+                                        }
+                                        break;
+                                        case VTK_UNSIGNED_SHORT: {
+                                                if (diff < std::numeric_limits<double>::epsilon() ) {
+                                                        range[0] = (double) std::numeric_limits<unsigned short>::min();
+                                                        range[1] = (double) std::numeric_limits<unsigned short>::max();
+                                                        diff = range[1] - range[0];
+                                                }
+
+                                                unsigned short *src = ((unsigned short*) vptr) + (wdh * TIndex * numComponents);
+                                                double scale = 255.0 / diff;
+
+                                                for (unsigned int i = 0; i < psize; i++) {
+                                                        for (unsigned int j = 0; j < 4; j++) {
+                                                                if (j < numComponents) {
+                                                                        const unsigned char v = (unsigned char) ( scale * ((double) *(src++)) );
+                                                                        *(dst++) =  v;
+                                                                } else {
+                                                                        *(dst++) = 255;
+                                                                }
+                                                        }
+                                                }
+                                        }
+                                        break;
+
+                                        case VTK_INT: {
+                                                if (diff < std::numeric_limits<double>::epsilon() ) {
+                                                        range[0] = (double) std::numeric_limits<int>::min();
+                                                        range[1] = (double) std::numeric_limits<int>::max();
+                                                        diff = range[1] - range[0];
+                                                }
+
+                                                int *src = ((int*) vptr) + (wdh * TIndex * numComponents);
+                                                double scale = 255.0 / diff;
+
+                                                for (unsigned int i = 0; i < psize; i++) {
+                                                        for (unsigned int j = 0; j < 4; j++) {
+                                                                if (j < numComponents) {
+                                                                        const unsigned char v = (unsigned char) ( scale * ((double) *(src++)) );
+                                                                        *(dst++) =  v;
+                                                                } else {
+                                                                        *(dst++) = 255;
+                                                                }
+                                                        }
+                                                }
+                                        }
+                                        break;
+                                        case VTK_UNSIGNED_INT: {
+                                                if (diff < std::numeric_limits<double>::epsilon() ) {
+                                                        range[0] = (double) std::numeric_limits<unsigned int>::min();
+                                                        range[1] = (double) std::numeric_limits<unsigned int>::max();
+                                                        diff = range[1] - range[0];
+                                                }
+
+                                                unsigned int *src = ((unsigned int*) vptr) + (wdh * TIndex * numComponents);
+                                                double scale = 255.0 / diff;
+
+                                                for (unsigned int i = 0; i < psize; i++) {
+                                                        for (unsigned int j = 0; j < 4; j++) {
+                                                                if (j < numComponents) {
+                                                                        const unsigned char v = (unsigned char) ( scale * ((double) *(src++)) );
+                                                                        *(dst++) =  v;
+                                                                } else {
+                                                                        *(dst++) = 255;
+                                                                }
+                                                        }
+                                                }
+                                        }
+                                        break;
+                                        case VTK_FLOAT: {
+                                                if (diff < std::numeric_limits<double>::epsilon() ) {
+                                                        range[0] = (double) std::numeric_limits<float>::min();
+                                                        range[1] = (double) std::numeric_limits<float>::max();
+                                                        diff = range[1] - range[0];
+                                                }
+
+                                                float *src = ((float*) vptr) + (wdh * TIndex * numComponents);
+                                                double scale = 255.0 / diff;
+
+                                                for (unsigned int i = 0; i < psize; i++) {
+                                                        for (unsigned int j = 0; j < 4; j++) {
+                                                                if (j < numComponents) {
+                                                                        const unsigned char v = (unsigned char) ( scale * ((double) *(src++)) );
+                                                                        *(dst++) =  v;
+                                                                } else {
+                                                                        *(dst++) = 255;
+                                                                }
+                                                        }
+                                                }
+                                        }
+                                        break;
+                                        case VTK_DOUBLE: {
+                                                if (diff < std::numeric_limits<double>::epsilon() ) {
+                                                        range[0] = (double) std::numeric_limits<double>::min();
+                                                        range[1] = (double) std::numeric_limits<double>::max();
+                                                        diff = range[1] - range[0];
+                                                }
+
+                                                double *src = ((double*) vptr) + (wdh * TIndex * numComponents);
+                                                double scale = 255.0 / diff;
+
+                                                for (unsigned int i = 0; i < psize; i++) {
+                                                        for (unsigned int j = 0; j < 4; j++) {
+                                                                if (j < numComponents) {
+                                                                        const unsigned char v = (unsigned char) ( scale * ((double) *(src++)) );
+                                                                        *(dst++) =  v;
+                                                                } else {
+                                                                        *(dst++) = 255;
+                                                                }
+                                                        }
+                                                }
+                                        }
+                                        break;
+                                        default:
+                                                delete[] pResampledPixelData;
+                                                LOG_ERROR("OpenGLComponent", "Pixel data not supported");
+                                                return;
+                                        }
+
+                                        vptr = pResampledPixelData;
+                                        bytesPerPixel = 4;
+                                }//end more than one component...
+                        } else {
+                                if ( (scalars->GetDataType() == VTK_UNSIGNED_CHAR) ) {
+                                        this->RGBImage = true;
+                                } else {
+                                        this->RGBImage = false;
+                                        this->UseShader = false;
+                                }
+
+                                //RGB IMAGES
+                                unsigned char *s_array = static_cast<vtkUnsignedCharArray *>(scalars)->GetPointer(0);
+                                if (s_array != NULL) {
+                                        int bsize = bytesPerPixel * size[0] * size[1];
+
+                                        unsigned char *src = s_array + off;
+                                        unsigned char *dst = vptr = pResampledPixelData = new unsigned char[bsize];
+
+#if defined (ADAPTATIVE_BRIGHNESS_CONTRAST)
+                                        for (int i = 0; i < bsize; i++) {
+                                                const float colorIn = (float) ( *(src++) ) / 255.0f;
+                                                const float clampedResult = clamp(0.0f, 1.0f, mixNormalized( colorIn * Brightness, mixNormalized(0.5f, colorIn, Contrast), 0.5f ));
+                                                const char colorOut = (char) ( clamp(0.0f, 255.0f, 255.0f * clampedResult) );
+                                                *(dst++) = colorOut;
+                                        }
+#else
+                                        std::cout << "---\nBrightness = " << Brightness << std::endl;
+                                        std::cout << "Contrast =  " << Contrast << std::endl;
+
+                                        for (int i = 0; i < bsize; i++) {
+                                                const float colorIn = (float) ( *(src++) ) / 255.0f;
+                                                const float clampedResult = clamp(0.0f, 1.0f, ((colorIn - 0.5f) * std::max<float>(Contrast, 0.0f)) + 0.5f + Brightness );
+                                                const char colorOut = (char) ( clamp(0.0f, 255.0f, 255.0f * clampedResult) );
+                                                *(dst++) = colorOut;
+                                        }
+#endif
+                                } else {
+                                        LOG_DEBUG("OpenGLComponent", "Could not get pixel data pointer");
+                                        return;
+                                }
+                        }
+
+                        //if no use pixel shader...
+                        if (!this->UseShader || RGBImage) {
+                                TexInternalFormat = bytesPerPixel;
+                                TexType = GL_UNSIGNED_BYTE;
+                                switch (bytesPerPixel) {
+                                case 1:
+                                        TexFormat = GL_LUMINANCE;
+                                        break;
+                                case 2:
+                                        TexFormat = GL_LUMINANCE_ALPHA;
+                                        break;
+                                case 3:
+                                        TexFormat = GL_RGB;
+                                        break;
+                                case 4:
+                                        TexFormat = GL_RGBA;
+                                        break;
+                                }
+                                // if we are using OpenGL 1.1, you can force 32 or16 bit textures
+#ifdef GL_VERSION_1_1
+                                if (this->Quality == VTK_TEXTURE_QUALITY_32BIT) {
+                                        switch (bytesPerPixel) {
+                                        case 1:
+                                                TexInternalFormat = GL_LUMINANCE8;
+                                                break;
+                                        case 2:
+                                                TexInternalFormat = GL_LUMINANCE8_ALPHA8;
+                                                break;
+                                        case 3:
+                                                TexInternalFormat = GL_RGB8;
+                                                break;
+                                        case 4:
+                                                TexInternalFormat = GL_RGBA8;
+                                                break;
+                                        }
+                                } else if (this->Quality == VTK_TEXTURE_QUALITY_16BIT) {
+                                        switch (bytesPerPixel) {
+                                        case 1:
+                                                TexInternalFormat = GL_LUMINANCE4;
+                                                break;
+                                        case 2:
+                                                TexInternalFormat = GL_LUMINANCE4_ALPHA4;
+                                                break;
+                                        case 3:
+                                                TexInternalFormat = GL_RGB4;
+                                                break;
+                                        case 4:
+                                                TexInternalFormat = GL_RGBA4;
+                                                break;
+                                        }
+                                }
+#endif
+                        }
+
+                        // -- decide whether the texture needs to be resampled --
+
+                        GLint maxDimGL;
+                        glGetIntegerv(GL_MAX_TEXTURE_SIZE,&maxDimGL);
+                        // if larger than permitted by the graphics library then must resample
+                        bool resampleNeeded = xsize > maxDimGL || ysize > maxDimGL;
+                        if(resampleNeeded) {
+                                vtkDebugMacro( "Texture too big for gl, maximum is " << maxDimGL);
+                        }
+
+                        if(!resampleNeeded && !this->SupportsNonPowerOfTwoTextures) {
+                                // xsize and ysize must be a power of 2 in OpenGL
+                                xs = static_cast<unsigned int>(xsize);
+                                ys = static_cast<unsigned int>(ysize);
+                                while (!(xs & 0x01)) {
+                                        xs = xs >> 1;
+                                }
+                                while (!(ys & 0x01)) {
+                                        ys = ys >> 1;
+                                }
+                                // if not a power of two then resampling is required
+                                resampleNeeded= (xs>1) || (ys>1);
+                        }
+
+                        if(resampleNeeded) {
+                                vtkDebugMacro(<< "Resampling texture to power of two for OpenGL");
+                                resultData = this->ResampleToPowerOfTwo(xsize, ysize, vptr, bytesPerPixel);
+                                pNPOTPixelData = resultData;
+
+                        }
+
+                        if ( resultData == NULL ) {
+                                resultData = vptr;
+                        }
+
+                        // free any old display lists (from the old context)
+                        if (this->RenderWindow) {
+                                this->ReleaseGraphicsResources(this->RenderWindow);
+                        }
+                        this->RenderWindow = ren->GetRenderWindow();
+                        if (this->RenderWindow == NULL) {
+                                if (pResampledPixelData) {
+                                        delete[] pResampledPixelData;
+                                }
+                                if (pNPOTPixelData) {
+                                        delete[] pNPOTPixelData;
+                                }
+                                return;
+                        }
+
+                        // make the new context current before we mess with opengl
+                        this->RenderWindow->MakeCurrent();
+
+                        // define a display list for this texture
+                        // get a unique display list id
+
+#ifdef GL_VERSION_1_1
+                        glGenTextures(1, &tempIndex);
+                        this->Index = static_cast<long>(tempIndex);
+                        glBindTexture(GL_TEXTURE_2D, this->Index);
+#else
+                        this->Index = glGenLists(1);
+                        glDeleteLists (static_cast<GLuint>(this->Index), static_cast<GLsizei>(0));
+                        glNewList (static_cast<GLuint>(this->Index), GL_COMPILE);
+#endif
+                        //seg fault protection for those wackos that don't use an
+                        //opengl render window
+                        if(this->RenderWindow->IsA("vtkOpenGLRenderWindow")) {
+                                static_cast<vtkOpenGLRenderWindow *>(ren->GetRenderWindow())->
+                                RegisterTextureResource( this->Index );
+                        }
+
+                        //pixel interpolate
+                        if (this->Interpolate) {
+                                glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,
+                                                 GL_LINEAR);
+                                glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER,
+                                                 GL_LINEAR );
+                        } else {
+                                glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+                                glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
+                        }
+                        /////repeat texture??
+                        if (this->Repeat) {
+                                glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,     GL_REPEAT );
+                                glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,     GL_REPEAT );
+                        } else {
+                                vtkOpenGLExtensionManager* manager = renWin->GetExtensionManager();
+                                if (this->EdgeClamp &&
+                                    (manager->ExtensionSupported("GL_VERSION_1_2") ||
+                                     manager->ExtensionSupported("GL_EXT_texture_edge_clamp"))) {
+                                        glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,
+                                                         vtkgl::CLAMP_TO_EDGE );
+                                        glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,
+                                                         vtkgl::CLAMP_TO_EDGE );
+                                } else {
+                                        glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S,     GL_CLAMP );
+                                        glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T,     GL_CLAMP );
+                                }
+                        }
+
+                        // =======================================UPLOAD SHADER ========
+                        if( this->UseShader) {
+                           GLint params = 0;
+
+                                //code of the shader
+                                if (this->ProgramObject == 0) {
+                                        glEnable(vtkgl::FRAGMENT_PROGRAM_ARB);
+                                        //upload vertex program code...
+                                        this->ProgramObject = vtkgl::CreateProgram();
+                                        this->VertexProgram = vtkgl::CreateShader(vtkgl::VERTEX_SHADER);
+
+                                        std::string VertexProgramCode =
+                                                "void main (void)\n"
+                                                "{\n"
+                                                "gl_TexCoord[0] = gl_MultiTexCoord0;\n"
+                                                "gl_Position = ftransform();\n"
+                                                "}\n";
+                                        const char* ptr1 = (const char*)VertexProgramCode.c_str();
+                                        vtkgl::ShaderSource(this->VertexProgram, 1, &ptr1, NULL);
+                                        vtkgl::CompileShader(this->VertexProgram);
+                                        vtkgl::GetShaderiv(this->VertexProgram, vtkgl::COMPILE_STATUS, &params);
+
+                                        if(params==GL_TRUE) {
+                                                //std::cout <<"vertex shader source compiled successfully" << std::endl;
+                                        } else {
+                                                LOG_ERROR("Visualization", "vertex shader source compile error");
+                                                // include null terminator
+                                                vtkgl::GetShaderiv(this->VertexProgram, vtkgl::INFO_LOG_LENGTH, &params);
+                                                if(params>0) {
+                                                        char *buffer=new char[params];
+                                                        vtkgl::GetShaderInfoLog(this->VertexProgram, params, 0, buffer);
+                                                        LOG_ERROR("Visualization", buffer);
+                                                        delete[] buffer;
+                                                } else {
+                                                        LOG_ERROR("Visualization", "No error information available");
+                                                }
+                                        }
+
+                                        this->FragmentProgram = vtkgl::CreateShader(vtkgl::FRAGMENT_SHADER);
+
+
+                                        if (this->RGBImage) { // RGB Frament shader program.
+                                                vtkgl::ShaderSource(this->FragmentProgram, sizeof(FragmenProgramCode_rgb) / sizeof (char*), FragmenProgramCode_rgb, 0);
+                                        } else { // GrayLevel Frament shader program
+                                                vtkgl::ShaderSource(this->FragmentProgram, sizeof(FragmenProgramCode_gray) / sizeof (char*), FragmenProgramCode_gray, 0);
+                                        }
+
+                                        vtkgl::CompileShader(this->FragmentProgram);
+                                        vtkgl::GetShaderiv(this->FragmentProgram, vtkgl::COMPILE_STATUS, &params);
+
+                                        if(params==GL_TRUE) {
+                                                //std::cout <<"fragment shader source compiled successfully" << std::endl;
+                                        } else {
+                                                LOG_ERROR("Visualization", "Fragment shader source compile error");
+                                                // include null terminator
+                                                vtkgl::GetShaderiv(this->FragmentProgram, vtkgl::INFO_LOG_LENGTH, &params);
+                                                if(params>0) {
+                                                        char *buffer=new char[params];
+                                                        vtkgl::GetShaderInfoLog(this->FragmentProgram, params, 0, buffer);
+                                                        LOG_ERROR("Visualization", buffer);
+                                                        delete[] buffer;
+                                                } else {
+                                                        LOG_ERROR("Visualization", "No error information available");
+                                                }
+                                        }
+
+                                        vtkgl::AttachShader(this->ProgramObject, this->VertexProgram);
+                                        vtkgl::AttachShader(this->ProgramObject, this->FragmentProgram);
+                                        vtkgl::LinkProgram(this->ProgramObject);
+
+                                        GLint linked;
+                                        vtkgl::GetProgramiv(this->ProgramObject, vtkgl::LINK_STATUS, &linked);
+                                        if (linked) {
+                                                //std::cout << "GPU Program enlazado" << std::endl;
+                                        }
+                                        glDisable(vtkgl::FRAGMENT_PROGRAM_ARB);
+                                }
+
+                        }//END PROGRAM SHADER
+
+                        //UPLOAD TEXTURE...
+                        if(this->SupportsPBO) {
+                                if(this->PBO==0) {
+                                        this->PBO=vtkPixelBufferObject::New();
+                                        this->PBO->SetContext(renWin);
+                                }
+                                //std::cout << ">> UpdatePBO" << std::endl;
+                                unsigned int dims[2];
+                                vtkIdType increments[2];
+                                dims[0] = static_cast<unsigned int>(xsize);
+                                dims[1] = static_cast<unsigned int>(ysize);
+                                increments[0] = 0;
+                                increments[1] = 0;
+
+                                if (RGBImage) {
+                                        this->PBO->Upload2D(VTK_UNSIGNED_CHAR, resultData, dims, bytesPerPixel, increments);
+                                } else {
+                                        if (UseShader) {
+                                                this->PBO->Upload2D(scalars->GetDataType(), resultData, dims, scalars->GetNumberOfComponents(), increments);
+                                        } else {
+                                                this->PBO->Upload2D(VTK_UNSIGNED_CHAR, resultData, dims, bytesPerPixel, increments);
+                                        }
+                                }
+                                // non-blocking call
+                                this->PBO->Bind(vtkPixelBufferObject::UNPACKED_BUFFER);
+                                glTexImage2D( GL_TEXTURE_2D, 0 , TexInternalFormat, xsize, ysize, 0, TexFormat, TexType, 0);
+                                this->PBO->UnBind();
+                                //std::cout << "<< UpdatePBO" << std::endl;
+                        } else {
+                                //std::cout << ">> UpdateText(slow). ResultData = " << (void*)resultData << std::endl;
+                                // blocking call
+                                glTexImage2D( GL_TEXTURE_2D, 0 , TexInternalFormat, xsize, ysize, 0, TexFormat, TexType, resultData);
+                                //std::cout << "<< UpdateText(slow)" << std::endl;
+
+                        }
+#ifndef GL_VERSION_1_1
+                        glEndList ();
+#endif
+                        // modify the load time to the current time
+                        this->LoadTime.Modified();
+
+                        // free memory
+                        if (pResampledPixelData) {
+                                delete[] pResampledPixelData;
+                        }
+                        if (pNPOTPixelData) {
+                                delete[] pNPOTPixelData;
+                        }
+                }// end if changes...
+
+                //UPLOAD LOOKUP TABLE IF NEEDED
+                bool LUT_NeedsToBeInitialized = !RGBImage && this->LUTIndex == 0;
+
+                if (this->UseShader && ( LUT_NeedsToBeInitialized || LookupTableChanged)) {
+                        if (RGBImage) {
+                        } else if (LookupTable != NULL) {
+
+                                GLsizei lutNvals = 1024;
+                                GLvoid* lutData = NULL;
+
+                                if (LookupTable != NULL) {
+                                        vtkLookupTable* LUT = static_cast<vtkLookupTable*>(LookupTable);
+                                        lutNvals = LUT->GetNumberOfTableValues();
+                                        lutData = LUT->GetPointer(0);
+                                } else {
+                                        LOG_ERROR("OpenGLComponent", "LUT Not found. Bad initiallization");
+                                }
+
+                                //glEnable(GL_TEXTURE_1D);
+#if defined(_WINDOWS) || defined(__WXGTK__)
+                                vtkgl::ActiveTextureARB(vtkgl::TEXTURE1_ARB);
+#else
+                                glActiveTexture(vtkgl::TEXTURE1_ARB);
+#endif
+                                glGenTextures(1, &this->LUTIndex);
+                                glBindTexture(GL_TEXTURE_1D, this->LUTIndex);
+                                glTexParameterf( GL_TEXTURE_1D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+                                glTexParameterf( GL_TEXTURE_1D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
+                                glTexParameterf( GL_TEXTURE_1D, GL_TEXTURE_WRAP_S,     GL_CLAMP );
+                                glTexParameterf( GL_TEXTURE_1D, GL_TEXTURE_WRAP_T,     GL_CLAMP );
+
+                                glTexImage1D( GL_TEXTURE_1D, 0 , GL_RGBA,
+                                              lutNvals, 0, GL_RGBA,
+                                              GL_UNSIGNED_BYTE, lutData);
+#if defined(_WINDOWS) || defined(__WXGTK__)
+                                vtkgl::ActiveTextureARB(vtkgl::TEXTURE0_ARB);
+#else
+                                glActiveTexture(vtkgl::TEXTURE0_ARB);
+#endif
+                        }
+                }
+                LookupTableChanged = false;
+        }
+
+        // execute the display list that uses creates the texture
+#ifdef GL_VERSION_1_1
+        glBindTexture(GL_TEXTURE_2D, this->Index);
+#else
+        glCallList(this->Index);
+#endif
+
+        // don't accept fragments if they have zero opacity. this will stop the
+        // zbuffer from be blocked by totally transparent texture fragments.
+        glAlphaFunc (GL_GREATER, static_cast<GLclampf>(0));
+        glEnable (GL_ALPHA_TEST);
+
+        if (this->PremultipliedAlpha) {
+                // save the blend function.
+                glPushAttrib(GL_COLOR_BUFFER_BIT);
+
+                // make the blend function correct for textures premultiplied by alpha.
+                glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
+        }
+
+        // now bind it
+        if (this->UseShader) {
+                if (!this->RGBImage) {
+                        glEnable(GL_TEXTURE_1D);
+                }
+        }
+        glEnable(GL_TEXTURE_2D);
+        // clear any texture transform
+        glMatrixMode(GL_TEXTURE);
+        glLoadIdentity();
+
+        // build transformation
+        if (this->Transform) {
+                double *mat = this->Transform->GetMatrix()->Element[0];
+                double mat2[16];
+                mat2[0] = mat[0];
+                mat2[1] = mat[4];
+                mat2[2] = mat[8];
+                mat2[3] = mat[12];
+                mat2[4] = mat[1];
+                mat2[5] = mat[5];
+                mat2[6] = mat[9];
+                mat2[7] = mat[13];
+                mat2[8] = mat[2];
+                mat2[9] = mat[6];
+                mat2[10] = mat[10];
+                mat2[11] = mat[14];
+                mat2[12] = mat[3];
+                mat2[13] = mat[7];
+                mat2[14] = mat[11];
+                mat2[15] = mat[15];
+
+                // insert texture transformation
+                glMultMatrixd(mat2);
+        }
+        glMatrixMode(GL_MODELVIEW);
+
+        vtkOpenGLRenderer *oRenderer=static_cast<vtkOpenGLRenderer *>(ren);
+
+        if(oRenderer->GetDepthPeelingHigherLayer()) {
+                //std::cout << "DepthPeeling" << std::endl;
+        }
+
+        if (this->UseShader) {
+                GLint loc = 0;
+
+                glEnable(vtkgl::FRAGMENT_PROGRAM_ARB);
+                vtkgl::UseProgram(this->ProgramObject);
+
+                // Common parameters for shaders
+
+                // === imageTexture ===
+                loc = vtkgl::GetUniformLocation(this->ProgramObject,"imagetexture");
+                if(loc != -1) {
+                        vtkgl::Uniform1i(loc, 0);
+                } else {
+                        LOG_ERROR("OpenGLComponent", "error: imagetexture is not a uniform");
+                }
+
+                if (this->RGBImage) { // Parameters for RGB shader
+
+                        // === brightness ===
+                        loc = vtkgl::GetUniformLocation(this->ProgramObject, "brightness");
+                        if(loc != -1) {
+                                vtkgl::Uniform1f(loc, Brightness);
+                        } else {
+                                LOG_ERROR("OpenGLComponent", "error: brightness is not a uniform");
+                        }
+
+                        // === contrast ===
+                        loc = vtkgl::GetUniformLocation(this->ProgramObject, "contrast");
+                        if(loc != -1) {
+                                vtkgl::Uniform1f(loc, Contrast);
+                        } else {
+                                LOG_ERROR("OpenGLComponent", "error: contrast is not a uniform");
+                        }
+
+                } else if (LookupTable != NULL) {
+                        // Parameters for LUT shader
+
+                        // === lookupTable ===
+                        loc = vtkgl::GetUniformLocation(this->ProgramObject,"lookuptable");
+                        if(loc != -1) {
+                                vtkgl::Uniform1i(loc, 1);
+                        } else {
+                                LOG_ERROR("OpenGLComponent", "error: lut is not a uniform");
+                        }
+
+                        double normRange[2] = {0.0, 1.0};
+                        vtkDataArray *scalars = this->GetInputArrayToProcess(0, input);
+                        scalars->GetRange(normRange);
+                        double* drange = LookupTable->GetRange();
+
+                        float range[2] = { static_cast<float>((drange[0]-normRange[0]) / (normRange[1]-normRange[0])),
+                                           static_cast<float>((drange[1]-normRange[0]) / (normRange[1]-normRange[0]))
+                                         };
+
+                        // === shift ===
+                        float shift = -range[0];
+                        loc = vtkgl::GetUniformLocation(this->ProgramObject,"lutShift");
+                        if(loc != -1) {
+                                vtkgl::Uniform1f(loc, shift);
+                        } else {
+                                LOG_ERROR("OpenGLComponent", "error: shift is not a uniform");
+                        }
+
+                        // === scale ===
+                        float scale = (1.0f)/(range[1] - range[0]);
+                        loc = vtkgl::GetUniformLocation(this->ProgramObject,"lutScale");
+                        if(loc != -1) {
+                                vtkgl::Uniform1f(loc, scale);
+                        } else {
+                                LOG_ERROR("OpenGLComponent", "error: scale is not a uniform");
+                        }
+                }
+
+                glDisable(vtkgl::FRAGMENT_PROGRAM_ARB);
+        }
+}
+
+// ----------------------------------------------------------------------------
+void vtkGinkgoOpenGLTexture::PostRender(vtkRenderer *vtkNotUsed(ren))
+{
+
+        if (this->UseShader) {
+                vtkgl::UseProgram(0);
+                /*
+
+                #if defined(_WINDOWS) || defined(__WXGTK__)
+                vtkgl::ActiveTextureARB(vtkgl::TEXTURE1_ARB);
+                #else
+                glActiveTexture(vtkgl::TEXTURE1_ARB);
+                #endif
+
+                glBindTexture(GL_TEXTURE_1D, 0);
+                glDisable(GL_TEXTURE_1D);
+
+                #if defined(_WINDOWS) || defined(__WXGTK__)
+                vtkgl::ActiveTextureARB(vtkgl::TEXTURE0_ARB);
+                #else
+                glActiveTexture(vtkgl::TEXTURE0_ARB);
+                #endif
+
+                glBindTexture(GL_TEXTURE_2D, 0);
+                */
+        }
+        if (this->GetInput() && this->PremultipliedAlpha) {
+                // restore the blend function
+                glPopAttrib();
+        }
+}
+
+// ----------------------------------------------------------------------------
+static int FindPowerOfTwo(int i)
+{
+        int size;
+
+        for ( i--, size=1; i > 0; size*=2 ) {
+                i /= 2;
+        }
+
+        // [these lines added by Tim Hutton (implementing Joris Vanden Wyngaerd's
+        // suggestions)]
+        // limit the size of the texture to the maximum allowed by OpenGL
+        // (slightly more graceful than texture failing but not ideal)
+        GLint maxDimGL;
+        glGetIntegerv(GL_MAX_TEXTURE_SIZE,&maxDimGL);
+        if ( size > maxDimGL ) {
+                size = maxDimGL ;
+        }
+        // end of Tim's additions
+
+        return size;
+}
+
+// ----------------------------------------------------------------------------
+// Creates resampled unsigned char texture map that is a power of two in both
+// x and y.
+unsigned char *vtkGinkgoOpenGLTexture::ResampleToPowerOfTwo(int &xs,
+                int &ys,
+                unsigned char *dptr,
+                int bpp)
+{
+        unsigned char *tptr, *p, *p1, *p2, *p3, *p4;
+        int xsize, ysize, i, j, k, jOffset, iIdx, jIdx;
+        double pcoords[3], hx, hy, rm, sm, w0, w1, w2, w3;
+
+        xsize = FindPowerOfTwo(xs);
+        ysize = FindPowerOfTwo(ys);
+        if (this->RestrictPowerOf2ImageSmaller) {
+                if (xsize > xs) {
+                        xsize /= 2;
+                }
+                if (ysize > ys) {
+                        ysize /= 2;
+                }
+        }
+        hx = (xs - 1.0) / (xsize - 1.0);
+        hy = (ys - 1.0) / (ysize - 1.0);
+
+        tptr = p = new unsigned char[xsize*ysize*bpp];
+
+        // Resample from the previous image. Compute parametric coordinates and
+        // interpolate
+        for (j=0; j < ysize; j++) {
+                pcoords[1] = j*hy;
+
+                jIdx = static_cast<int>(pcoords[1]);
+                if ( jIdx >= (ys-1) ) { //make sure to interpolate correctly at edge
+                        jIdx = ys - 2;
+                        pcoords[1] = 1.0;
+                } else {
+                        pcoords[1] = pcoords[1] - jIdx;
+                }
+                jOffset = jIdx*xs;
+                sm = 1.0 - pcoords[1];
+
+                for (i=0; i < xsize; i++) {
+                        pcoords[0] = i*hx;
+                        iIdx = static_cast<int>(pcoords[0]);
+                        if ( iIdx >= (xs-1) ) {
+                                iIdx = xs - 2;
+                                pcoords[0] = 1.0;
+                        } else {
+                                pcoords[0] = pcoords[0] - iIdx;
+                        }
+                        rm = 1.0 - pcoords[0];
+
+                        // Get pointers to 4 surrounding pixels
+                        p1 = dptr + bpp*(iIdx + jOffset);
+                        p2 = p1 + bpp;
+                        p3 = p1 + bpp*xs;
+                        p4 = p3 + bpp;
+
+                        // Compute interpolation weights interpolate components
+                        w0 = rm*sm;
+                        w1 = pcoords[0]*sm;
+                        w2 = rm*pcoords[1];
+                        w3 = pcoords[0]*pcoords[1];
+                        for (k=0; k < bpp; k++) {
+                                *p++ = static_cast<unsigned char>(p1[k]*w0 + p2[k]*w1 + p3[k]*w2
+                                                                  + p4[k]*w3);
+                        }
+                }
+        }
+
+        xs = xsize;
+        ys = ysize;
+
+        return tptr;
+}
+
+// ----------------------------------------------------------------------------
+void vtkGinkgoOpenGLTexture::PrintSelf(ostream& os, vtkIndent indent)
+{
+        this->Superclass::PrintSelf(os,indent);
+        os << indent << "Index: " << this->Index << endl;
+}
+
+
+void vtkGinkgoOpenGLTexture::ForceEnableShaders(bool force)
+{
+        InternalEnableShaders = force;
+}
diff --git a/cadxcore/vtk/vtkopenglginkgotexture.h b/cadxcore/vtk/vtkopenglginkgotexture.h
new file mode 100644
index 0000000..6d339ee
--- /dev/null
+++ b/cadxcore/vtk/vtkopenglginkgotexture.h
@@ -0,0 +1,158 @@
+/*
+ *
+ *  $Id: vtkopenglginkgotexture.h $
+ *  Ginkgo CADx Project
+ *
+ *  Code adapted from VTK
+ *
+ *
+=========================================================================
+
+ Program:   Visualization Toolkit
+ Module:    $RCSfile: vtkGinkgoOpenGLTexture.h,v $
+
+ Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
+ All rights reserved.
+ See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
+
+ This software is distributed WITHOUT ANY WARRANTY; without even
+ the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
+ PURPOSE.  See the above copyright notice for more information.
+
+ =========================================================================*/
+// .NAME vtkGinkgoOpenGLTexture - OpenGL texture map
+// .SECTION Description
+// vtkGinkgoOpenGLTexture is a concrete implementation of the abstract class
+// vtkTexture. vtkGinkgoOpenGLTexture interfaces to the OpenGL rendering library.
+
+#pragma once
+#include <api/ilock.h>
+#include <vtkOpenGLTexture.h>
+//BTX
+#include <vtkWeakPointer.h> // needed for vtkWeakPointer.
+//ETX
+
+class vtkWindow;
+class vtkOpenGLRenderer;
+class vtkRenderWindow;
+class vtkPixelBufferObject;
+
+class vtkGinkgoOpenGLTexture : public vtkOpenGLTexture, public GNC::GCS::ILockable
+{
+public:
+        static vtkGinkgoOpenGLTexture *New();
+        vtkTypeMacro(vtkGinkgoOpenGLTexture,vtkOpenGLTexture);
+        virtual void PrintSelf(ostream& os, vtkIndent indent);
+
+        // Description:
+        // Implement base class method.
+        void Load(vtkRenderer *ren);
+
+        // Descsription:
+        // Clean up after the rendering is complete.
+        virtual void PostRender(vtkRenderer *ren);
+
+        // Description:
+        // Release any graphics resources that are being consumed by this texture.
+        // The parameter window could be used to determine which graphic
+        // resources to release. Using the same texture object in multiple
+        // render windows is NOT currently supported.
+        void ReleaseGraphicsResources(vtkWindow *);
+
+
+        // Description:
+        // Get the openGL texture name to which this texture is bound.
+        // This is available only if GL version >= 1.1
+        vtkGetMacro(Index, long);
+
+        long GetTextureId() const
+        {
+                return Index;
+        }
+
+        //indica si la textura tiene id (se ha intentado cargar)
+        bool TextureDefined() const
+        {
+                return Index != 0;
+        }
+
+        void SetTindex(int index)
+        {
+                GNC::GCS::ILocker lock(this);
+                if (TIndex != index) {
+                        this->TIndex = index;
+                        this->TIndexChanged = true;
+                }
+        }
+
+        int GetTindex()  const
+        {
+                return this->TIndex;
+        }
+
+        operator long () const
+        {
+                return Index;
+        }
+
+        /** Set Image Brightness (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+        void SetBrightness(float brightness);
+
+        /** Set Image Contrast (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+        void SetContrast(float contrast);
+
+        /** Get Image Brightness (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+        float GetBrightness();
+
+        /** Get Image Contrast (-1.0, 0.0, 1.0) (Only aplicable with RGB Images) **/
+        float GetContrast();
+
+        void ResetBrightnessAndContrast();
+
+        void ForceEnableShaders(bool force);
+
+        //BTX
+protected:
+        vtkGinkgoOpenGLTexture();
+        ~vtkGinkgoOpenGLTexture();
+
+        unsigned char *ResampleToPowerOfTwo(int &xsize, int &ysize,
+                                            unsigned char *dptr, int bpp);
+
+        vtkTimeStamp   LoadTime;
+        unsigned int Index; // actually GLuint
+        vtkWeakPointer<vtkRenderWindow> RenderWindow;   // RenderWindow used for previous render
+        bool CheckedHardwareSupport;
+        bool SupportsNonPowerOfTwoTextures;
+        bool SupportsPBO;
+        bool SupportsVertexShaders;
+        bool SupportsFragmentShaders;
+        bool SupportsMultiTexture;
+        vtkPixelBufferObject *PBO;
+        long VertexProgram;
+        long FragmentProgram;
+        long ProgramObject;
+        unsigned int LUTIndex;
+        bool UseShader;
+        int zsize;
+        int TIndex;
+        bool TIndexChanged;
+        bool LookupTableChanged;
+        bool InternalEnableShaders;
+        bool RGBImage;
+
+        float Brightness; // Only for RGB Images
+        float Contrast;   // Only for RGB Images
+public:
+        void SetLookupTable(vtkScalarsToColors* table);
+
+private:
+        vtkGinkgoOpenGLTexture(const vtkGinkgoOpenGLTexture&);  // Not implemented.
+        void operator=(const vtkGinkgoOpenGLTexture&);  // Not implemented.
+
+        // Description:
+        // Handle loading in extension support
+        virtual void Initialize(vtkRenderer * ren);
+
+        //ETX
+};
diff --git a/cadxcore/vtk/widgets/widgetsactor.cpp b/cadxcore/vtk/widgets/widgetsactor.cpp
new file mode 100644
index 0000000..0ba051e
--- /dev/null
+++ b/cadxcore/vtk/widgets/widgetsactor.cpp
@@ -0,0 +1,639 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/autoptr.h>
+#include <api/iwidgetsmanager.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/utils/iginkgomatrix4x4.h>
+#include <api/ioverlay.h>
+
+#include <cassert>
+#include <api/controllers/icontroladorlog.h>
+#include "widgetsactor.h"
+
+#include <vtkRenderer.h>
+#include <vtkRenderWindow.h>
+#include <vtkInteractorObserver.h>
+#include <vtkBox.h>
+#include <vtkObjectFactory.h>
+#include <vtkCellArray.h>
+#include <vtkCellData.h>
+#include <vtkCommand.h>
+#include <vtkDataArray.h>
+#include <vtkFloatArray.h>
+#include <vtkMatrix4x4.h>
+#include <vtkObjectFactory.h>
+#include <vtkOpenGLRenderer.h>
+#include <vtkPlane.h>
+#include <vtkPlaneCollection.h>
+#include <vtkPointData.h>
+#include <vtkPolyData.h>
+#include <vtkPolygon.h>
+#include <vtkProperty.h>
+#include <vtkTimerLog.h>
+#include <vtkTriangle.h>
+#include <vtkOpenGLRenderWindow.h>
+#include <vtkOpenGLTexture.h>
+#include <vtkImageData.h>
+#include <vtkOpenGL.h>
+#include <api/iwidgets.h>
+#include <vtkgl.h>
+#include <vtkDebugLeaks.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <api/controllers/icontroladorcarga.h>
+
+
+vtkStandardNewMacro(WidgetRepresentation);
+
+//----------------------------------------------------------------------
+
+WidgetRepresentation::WidgetRepresentation()
+{
+        Enabled = true;
+        this->Renderer = NULL;
+
+        this->InteractionState = 0;
+        this->StartEventPosition[0] = 0.0;
+        this->StartEventPosition[1] = 0.0;
+        this->StartEventPosition[2] = 0.0;
+
+        this->PlaceFactor = 0.5;
+        this->Placed = 0;
+        this->ValidPick = 0;
+        this->HandleSize = 0.01;
+
+        this->InitialBounds[0] = this->InitialBounds[2] = this->InitialBounds[4] = 0.0;
+        this->InitialBounds[1] = this->InitialBounds[3] = this->InitialBounds[5] = 1.0;
+
+        this->InitialLength = 0.0;
+
+        this->NeedToRender = 0;
+
+        this->CustomActor = WidgetsActor::New();
+        this->CustomMapper = WidgetsMapper::New();
+        this->CustomActor->SetMapper(CustomMapper);
+        this->CustomActor->GetProperty()->SetOpacity(0.5);
+
+}
+
+//----------------------------------------------------------------------
+
+WidgetRepresentation::~WidgetRepresentation()
+{
+        this->CustomMapper->Delete();
+        this->CustomActor->Delete();
+
+}
+
+//----------------------------------------------------------------------
+
+void WidgetRepresentation::SetRenderer(vtkRenderer *ren)
+{
+        if (ren != this->Renderer) {
+                if (this->Renderer != NULL) {
+                        this->Renderer->RemoveViewProp(static_cast<vtkProp*>(this));
+                }
+                this->Renderer = ren;
+                if (this->Renderer != NULL) {
+                        this->Renderer->AddViewProp(static_cast<vtkProp*>(this));
+                }
+                this->Modified();
+        }
+}
+
+//----------------------------------------------------------------------
+
+void WidgetRepresentation::AdjustBounds(double bounds[6], double newBounds[6],
+                                        double center[3])
+{
+        center[0] = (bounds[0] + bounds[1]) / 2.0;
+        center[1] = (bounds[2] + bounds[3]) / 2.0;
+        center[2] = (bounds[4] + bounds[5]) / 2.0;
+
+        newBounds[0] = center[0] + this->PlaceFactor * (bounds[0] - center[0]);
+        newBounds[1] = center[0] + this->PlaceFactor * (bounds[1] - center[0]);
+        newBounds[2] = center[1] + this->PlaceFactor * (bounds[2] - center[1]);
+        newBounds[3] = center[1] + this->PlaceFactor * (bounds[3] - center[1]);
+        newBounds[4] = center[2] + this->PlaceFactor * (bounds[4] - center[2]);
+        newBounds[5] = center[2] + this->PlaceFactor * (bounds[5] - center[2]);
+}
+
+//----------------------------------------------------------------------
+
+double WidgetRepresentation::SizeHandlesInPixels(double factor,
+                double pos[3])
+{
+        //
+        int i;
+        vtkRenderer *renderer;
+
+        if (!this->ValidPick || !(renderer = this->Renderer) ||
+            !renderer->GetActiveCamera()) {
+                return (this->HandleSize * factor * this->InitialLength);
+        } else {
+                double radius, z;
+                double lowerLeft[4], upperRight[4];
+                double focalPoint[4];
+
+                vtkInteractorObserver::ComputeWorldToDisplay(this->Renderer,
+                                pos[0], pos[1], pos[2],
+                                focalPoint);
+                z = focalPoint[2];
+
+                double x = focalPoint[0] - this->HandleSize / 2.0;
+                double y = focalPoint[1] - this->HandleSize / 2.0;
+                vtkInteractorObserver::ComputeDisplayToWorld(this->Renderer, x, y, z, lowerLeft);
+
+                x = focalPoint[0] + this->HandleSize / 2.0;
+                y = focalPoint[1] + this->HandleSize / 2.0;
+                vtkInteractorObserver::ComputeDisplayToWorld(this->Renderer, x, y, z, upperRight);
+
+                for (radius = 0.0, i = 0; i < 3; i++) {
+                        radius += (upperRight[i] - lowerLeft[i]) *
+                                  (upperRight[i] - lowerLeft[i]);
+                }
+                return (factor * (sqrt(radius) / 2.0));
+        }
+}
+
+//----------------------------------------------------------------------
+
+double WidgetRepresentation::SizeHandlesRelativeToViewport(double factor,
+                double pos[3])
+{
+        int i;
+        vtkRenderer *renderer;
+
+        if (!this->ValidPick || !(renderer = this->Renderer) ||
+            !renderer->GetActiveCamera()) {
+                return (this->HandleSize * factor * this->InitialLength);
+        } else {
+                double radius, z;
+                double windowLowerLeft[4], windowUpperRight[4];
+                double *viewport = renderer->GetViewport();
+                int *winSize = renderer->GetRenderWindow()->GetSize();
+                double focalPoint[4];
+
+                vtkInteractorObserver::ComputeWorldToDisplay(this->Renderer,
+                                pos[0], pos[1], pos[2],
+                                focalPoint);
+                z = focalPoint[2];
+
+                double x = winSize[0] * viewport[0];
+                double y = winSize[1] * viewport[1];
+                vtkInteractorObserver::ComputeDisplayToWorld(this->Renderer, x, y, z, windowLowerLeft);
+
+                x = winSize[0] * viewport[2];
+                y = winSize[1] * viewport[3];
+                vtkInteractorObserver::ComputeDisplayToWorld(this->Renderer, x, y, z, windowUpperRight);
+
+                for (radius = 0.0, i = 0; i < 3; i++) {
+                        radius += (windowUpperRight[i] - windowLowerLeft[i]) *
+                                  (windowUpperRight[i] - windowLowerLeft[i]);
+                }
+
+                return (sqrt(radius) * factor * this->HandleSize);
+        }
+}
+
+//----------------------------------------------------------------------
+
+void WidgetRepresentation::PrintSelf(ostream& os, vtkIndent indent)
+{
+        //Superclass typedef defined in vtkTypeMacro() found in vtkSetGet.h
+        this->Superclass::PrintSelf(os, indent);
+
+        os << indent << "Renderer: " << this->Renderer << "\n";
+        os << indent << "Interaction State: " << this->InteractionState << "\n";
+        os << indent << "Handle Size: " << this->HandleSize << "\n";
+        os << indent << "Need to Render: " << (this->NeedToRender ? "On\n" : "Off\n");
+        os << indent << "Place Factor: " << this->PlaceFactor << "\n";
+}
+
+double* WidgetRepresentation::GetBounds()
+{
+        return NULL;
+}
+
+void WidgetRepresentation::GetActors(vtkPropCollection *)
+{
+        ;
+}
+
+void WidgetRepresentation::GetActors2D(vtkPropCollection *)
+{
+        ;
+}
+
+void WidgetRepresentation::GetVolumes(vtkPropCollection *)
+{
+        ;
+}
+
+void WidgetRepresentation::ReleaseGraphicsResources(vtkWindow *w)
+{
+        this->CustomActor->ReleaseGraphicsResources(w);
+}
+
+int WidgetRepresentation::RenderOverlay(vtkViewport *v)
+{
+        return CustomActor->RenderOverlay(v);
+        //return 0;
+}
+
+int WidgetRepresentation::RenderOpaqueGeometry(vtkViewport *v)
+{
+        return CustomActor->RenderOpaqueGeometry(v);
+        //return 0;
+}
+
+int WidgetRepresentation::RenderTranslucentPolygonalGeometry(vtkViewport* v)
+{
+        return CustomActor->RenderTranslucentPolygonalGeometry(v);
+        //return 0;
+}
+
+int WidgetRepresentation::RenderVolumetricGeometry(vtkViewport* /*v*/)
+{
+        return 0;
+}
+
+int WidgetRepresentation::HasTranslucentPolygonalGeometry()
+{
+        return CustomActor->HasTranslucentPolygonalGeometry();
+        //return 1;
+}
+
+void WidgetRepresentation::SetWidgetsManager(GNC::GCS::IWidgetsManager* pWidgetsManager)
+{
+        CustomMapper->SetWidgetsManager(pWidgetsManager);
+}
+
+void WidgetRepresentation::SetWidgetsRenderer(GNC::GCS::IWidgetsRenderer* pWidgetsRenderer)
+{
+        CustomMapper->SetWidgetsRenderer(pWidgetsRenderer);
+}
+
+
+vtkStandardNewMacro(WidgetsActor);
+
+WidgetsActor::WidgetsActor()
+{
+        Modified();
+}
+
+WidgetsActor::~WidgetsActor()
+{
+        if ( this->Property != NULL) {
+                this->Property->UnRegister(this);
+                this->Property = NULL;
+        }
+
+        if ( this->BackfaceProperty != NULL) {
+                this->BackfaceProperty->UnRegister(this);
+                this->BackfaceProperty = NULL;
+        }
+
+        if (this->Mapper) {
+                this->Mapper->UnRegister(this);
+                this->Mapper = NULL;
+        }
+        this->SetTexture(NULL);
+};
+
+void WidgetsActor::Render(vtkRenderer* ren, vtkMapper* mapper)
+{
+        //double opacity;
+        int param;
+        glGetIntegerv(GL_RENDER_MODE, &param);
+        if (param == GL_SELECT) {
+                return;
+        }
+        //glGetIntegerv(GL_RENDER_MODE, param);
+        //glDepthMask( GL_FALSE );
+
+        // build transformation
+        if (!this->IsIdentity) {
+                double *mat = this->GetMatrix()->Element[0];
+                double mat2[16];
+                mat2[0] = mat[0];
+                mat2[1] = mat[4];
+                mat2[2] = mat[8];
+                mat2[3] = mat[12];
+                mat2[4] = mat[1];
+                mat2[5] = mat[5];
+                mat2[6] = mat[9];
+                mat2[7] = mat[13];
+                mat2[8] = mat[2];
+                mat2[9] = mat[6];
+                mat2[10] = mat[10];
+                mat2[11] = mat[14];
+                mat2[12] = mat[3];
+                mat2[13] = mat[7];
+                mat2[14] = mat[11];
+                mat2[15] = mat[15];
+
+                // insert model transformation
+                glMatrixMode(GL_MODELVIEW);
+                glPushMatrix();
+                glMultMatrixd(mat2);
+        }
+
+        // send a render to the mapper; update pipeline
+        mapper->Render(ren, this);
+
+        // pop transformation matrix
+        if (!this->IsIdentity) {
+                glMatrixMode(GL_MODELVIEW);
+                glPopMatrix();
+        }
+
+        //glDepthMask(GL_TRUE);
+}
+
+
+int WidgetsActor::GetIsOpaque()
+{
+        return 0;
+}
+
+//----------------------------------------------------------------------------
+// This causes the actor to be rendered. It in turn will render the actor's
+// property, texture map and then mapper. If a property hasn't been
+// assigned, then the actor will create one automatically. Note that a
+// side effect of this method is that the visualization network is updated.
+int WidgetsActor::RenderOpaqueGeometry(vtkViewport *vp)
+{
+        int          renderedSomething = 0;
+        vtkRenderer* ren = static_cast<vtkRenderer*>(vp);
+
+        if ( !this->Mapper ) {
+                return 0;
+        }
+
+        // is this actor opaque ?
+        if (this->GetIsOpaque()) {
+
+                // render the backface property
+                if (this->BackfaceProperty) {
+                        this->BackfaceProperty->BackfaceRender(this, ren);
+                }
+
+                this->Render(ren,this->Mapper);
+                renderedSomething = 1;
+        }
+
+        return renderedSomething;
+}
+
+int WidgetsActor::RenderOverlay(vtkViewport *vp)
+{
+
+        if ( !this->Mapper ) {
+                return 0;
+        }
+        vtkRenderer* ren = static_cast<vtkRenderer*>(vp);
+        this->Render(ren,this->Mapper);
+        return 1;
+
+        //return 0;
+}
+
+//-----------------------------------------------------------------------------
+int WidgetsActor::RenderTranslucentPolygonalGeometry(vtkViewport* /*vp*/)
+{
+        int          renderedSomething = 0;
+// vtkRenderer* ren = static_cast<vtkRenderer*>(vp);
+
+        if ( !this->Mapper ) {
+                return 0;
+        }
+
+        /*
+        // is this actor opaque ?
+        if (!this->GetIsOpaque())
+        {
+          // render the backface property
+          if (this->BackfaceProperty)
+          {
+        	  this->BackfaceProperty->BackfaceRender(this, ren);
+          }
+
+          this->Render(ren,this->Mapper);
+
+          renderedSomething = 1;
+        }
+         */
+        return renderedSomething;
+}
+
+//-----------------------------------------------------------------------------
+// Description:
+// Does this prop have some translucent polygonal geometry?
+int WidgetsActor::HasTranslucentPolygonalGeometry()
+{
+        if ( !this->Mapper ) {
+                return 0;
+        }
+
+        return !this->GetIsOpaque();
+}
+
+
+vtkStandardNewMacro(WidgetsMapper);
+
+WidgetsMapper::WidgetsMapper()
+{
+        this->ListId = 0;
+        this->m_pWManager = NULL;
+        this->m_pWRenderer = NULL;
+        this->LastWindow = NULL;
+}
+
+
+WidgetsMapper::~WidgetsMapper()
+{
+        if (this->LastWindow) {
+                this->ReleaseGraphicsResources(this->LastWindow);
+        }
+}
+
+
+void WidgetsMapper::ReleaseGraphicsResources(vtkWindow* /*win*/)
+{
+        if (m_pWRenderer == NULL) {
+                return;
+        }
+        this->LastWindow = NULL;
+}
+
+void WidgetsMapper::RenderPiece(vtkRenderer *ren, vtkActor *act)
+{
+        //
+        // make sure that we've been properly initialized
+        //
+        if (ren->GetRenderWindow()->CheckAbortStatus()) {
+                return;
+        }
+
+        // make sure our window is current
+        //ren->GetRenderWindow()->MakeCurrent();
+
+        //
+        // if something has changed regenerate colors and display lists
+        // if required
+        //
+        int noAbort = 1;
+
+        // TODO: Reescribir toda esta lógica
+        if (this->GetMTime() > this->BuildTime ||
+            act->GetProperty()->GetMTime() > this->BuildTime ||
+            ren->GetRenderWindow() != this->LastWindow) {
+                if (!this->ImmediateModeRendering &&
+                    !this->GetGlobalImmediateModeRendering()) {
+                        //this->ReleaseGraphicsResources(ren->GetRenderWindow());
+                        this->LastWindow = ren->GetRenderWindow();
+
+                        //bool redimensionado = false;
+                        // get a unique display list id
+                        //this->ListId = glGenLists(1);
+                        //glNewList(this->ListId, GL_COMPILE);
+
+                        noAbort = this->Draw(ren, act);
+                        //glEndList();
+
+                        // Time the actual drawing
+                        this->Timer->StartTimer();
+                        //glCallList(this->ListId);
+                        this->Timer->StopTimer();
+                } else {
+                        this->ReleaseGraphicsResources(ren->GetRenderWindow());
+                        this->LastWindow = ren->GetRenderWindow();
+                }
+                if (noAbort) {
+                        this->BuildTime.Modified();
+                }
+        }// if nothing changed but we are using display lists, draw it
+        else {
+                if (!this->ImmediateModeRendering &&
+                    !this->GetGlobalImmediateModeRendering()) {
+                        // Time the actual drawing
+                        this->Timer->StartTimer();
+                        //glCallList(this->ListId);
+                        this->Timer->StopTimer();
+                }
+        }
+
+        // if we are in immediate mode rendering we always
+        // want to draw the primitives here
+        if (this->ImmediateModeRendering ||
+            this->GetGlobalImmediateModeRendering()) {
+                // Time the actual drawing
+                this->Timer->StartTimer();
+                this->Draw(ren, act);
+                this->Timer->StopTimer();
+        }
+
+        this->TimeToDraw = this->Timer->GetElapsedTime();
+
+        // If the timer is not accurate enough, set it to a small
+        // time so that it is not zero
+        if (this->TimeToDraw == 0.0) {
+                this->TimeToDraw = 0.0001;
+        }
+}
+
+void WidgetsMapper::Render(vtkRenderer *ren, vtkActor *act)
+{
+        this->RenderPiece(ren, act);
+}
+
+// Draw method for OpenGL.
+
+void ImprimirMatriz(const double matriz[16])
+{
+        for(int i = 0; i<4; ++i) {
+                for(int j = 0; j<4; ++j) {
+                        std::cout << matriz[j*4 + i] << "\t";
+                }
+                std::cout<< std::endl;
+        }
+        std::cout<< std::endl;
+        std::cout<< std::endl;
+}
+
+int WidgetsMapper::Draw(vtkRenderer *aren, vtkActor* /*act*/)
+{
+
+        glPushAttrib(GL_ALL_ATTRIB_BITS);
+
+        glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
+        glHint(GL_LINE_SMOOTH_HINT, GL_NICEST);
+        glEnable(GL_POINT_SMOOTH);
+        glEnable(GL_LINE_SMOOTH);
+        glEnable(GL_POLYGON_SMOOTH);
+        glEnable(GL_BLEND);
+        glDisable (GL_ALPHA_TEST);
+        glDisable(GL_SCISSOR_TEST);
+        //glAlphaFunc (GL_GREATER, 0);
+        glFrontFace(GL_CCW);
+        glCullFace(GL_FRONT);
+
+        glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
+        glDisable(GL_DEPTH_TEST);
+        glDisable(GL_LIGHTING);
+        glEnable(GL_TEXTURE_2D);
+        glBindTexture(GL_TEXTURE_2D, 0);
+        glDisable(GL_TEXTURE_2D);
+
+        glMatrixMode(GL_MODELVIEW);
+
+        if (!m_pWRenderer) {
+                LOG_ERROR("idgetsMapper::Draw", "m_pWRenderer=NULL, bailing out");
+                return 0;
+        }
+
+        vtkGinkgoImageViewer* pViewer = m_pWRenderer->m_pImageViewer;
+        if (!pViewer) {
+                LOG_ERROR("idgetsMapper::Draw", "m_pWRenderer->m_pImageViewer=NULL, bailing out");
+                return 0;
+        }
+
+        double MatrizModelo[16];
+
+        pViewer->GetModelMatrix()->ToDoubleArrayByColumns(MatrizModelo);
+        double ip[3] = {0.0, 0.0, (double)pViewer->GetTindex()};
+        double wp[4] = {0.0, 0.0, 0.0, 1.0};
+
+        pViewer->UnProyect2D(ip, wp);
+        MatrizModelo[12] = wp[0];
+        MatrizModelo[13] = wp[1];
+        MatrizModelo[14] = wp[2];
+
+        glMultMatrixd(MatrizModelo);
+
+        if (m_pWManager != NULL && m_pWRenderer != NULL) {
+                m_pWManager->RenderPrivate(m_pWRenderer->m_c);
+        }
+
+        glPopAttrib();
+        this->UpdateProgress(1.0);
+        return aren->GetRenderWindow()->CheckAbortStatus();
+}
diff --git a/cadxcore/vtk/widgets/widgetsactor.h b/cadxcore/vtk/widgets/widgetsactor.h
new file mode 100644
index 0000000..dda222d
--- /dev/null
+++ b/cadxcore/vtk/widgets/widgetsactor.h
@@ -0,0 +1,192 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ *  Code based in VTK
+ */
+#pragma once
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <api/api.h>
+#include <vtkProp.h>
+#include <vtkOpenGLActor.h>
+#include <vtkOpenGLPolyDataMapper.h>
+#include <vtkOpenGLTexture.h>
+
+class vtkRenderer;
+class vtkBox;
+class WidgetsActor;
+class WidgetsMapper;
+
+namespace GNC
+{
+namespace GCS
+{
+class IWidgetsManager;
+class IWidgetsRenderer;
+}
+}
+
+class EXTAPI WidgetRepresentation : public vtkProp
+{
+public:
+        // Description:
+        // Standard methods for instances of this class.
+        void PrintSelf(ostream& os, vtkIndent indent);
+
+        static WidgetRepresentation *New();
+
+        vtkTypeMacro(WidgetRepresentation,vtkProp);
+
+        virtual void SetRenderer(vtkRenderer *ren);
+        vtkGetObjectMacro(Renderer,vtkRenderer);
+        virtual int GetInteractionState()
+        {
+                return this->InteractionState;
+        }
+
+        vtkSetClampMacro(HandleSize,double,0.001,1000);
+        vtkGetMacro(HandleSize,double);
+
+        vtkGetMacro( NeedToRender, int );
+        vtkSetClampMacro( NeedToRender, int, 0, 1 );
+        vtkBooleanMacro( NeedToRender, int );
+
+        virtual double *GetBounds();
+        virtual void GetActors(vtkPropCollection *);
+        virtual void GetActors2D(vtkPropCollection *);
+        virtual void GetVolumes(vtkPropCollection *);
+        virtual void ReleaseGraphicsResources(vtkWindow *);
+        virtual int RenderOverlay(vtkViewport *vtkNotUsed(viewport));
+        virtual int RenderOpaqueGeometry(vtkViewport *vtkNotUsed(viewport));
+        virtual int RenderTranslucentPolygonalGeometry(vtkViewport *vtkNotUsed(viewport));
+        virtual int RenderVolumetricGeometry(vtkViewport *vtkNotUsed(viewport));
+        virtual int HasTranslucentPolygonalGeometry();
+
+        void SetWidgetsManager(GNC::GCS::IWidgetsManager* pWidgetsManager);
+        void SetWidgetsRenderer(GNC::GCS::IWidgetsRenderer* pWidgetRenderer);
+
+protected:
+        WidgetRepresentation();
+        ~WidgetRepresentation();
+
+        vtkRenderer *Renderer;
+
+        int InteractionState;
+
+        // These are used to track the beginning of interaction with the representation
+        // It's dimensioned [3] because some events re processed in 3D.
+        double StartEventPosition[3];
+
+        // Instance variable and members supporting suclasses
+        double PlaceFactor; // Used to control how widget is placed around bounding box
+        int    Placed; // Indicate whether widget has been placed
+        void   AdjustBounds(double bounds[6], double newBounds[6], double center[3]);
+        double InitialBounds[6]; //initial bounds on place widget (valid after PlaceWidget)
+        double InitialLength; //initial length on place widget
+        bool   Enabled;
+
+        int    ValidPick; //indicate when valid picks are made
+
+        double HandleSize; //controlling relative size of widget handles
+        double SizeHandlesRelativeToViewport(double factor, double pos[3]);
+        double SizeHandlesInPixels(double factor,double pos[3]);
+
+        int NeedToRender;
+
+        vtkTimeStamp  BuildTime;
+
+        WidgetsActor*  CustomActor;
+        WidgetsMapper* CustomMapper;
+
+private:
+        WidgetRepresentation(const WidgetRepresentation&);  //Not implemented
+        void operator=(const WidgetRepresentation&);  //Not implemented
+};
+
+class EXTAPI WidgetsActor : public vtkOpenGLActor
+{
+public:
+        static WidgetsActor *New();
+
+protected:
+        WidgetsActor();
+        ~WidgetsActor();
+
+        vtkTypeMacro(WidgetsActor,vtkOpenGLActor);
+
+        void Render(vtkRenderer *ren, vtkMapper *mapper);
+        virtual int GetIsOpaque();
+        virtual int RenderOpaqueGeometry(vtkViewport *viewport);
+        virtual int RenderOverlay(vtkViewport *viewport);
+        virtual int RenderTranslucentPolygonalGeometry(vtkViewport *viewport);
+
+        // Description:
+        // Does this prop have some translucent polygonal geometry?
+        virtual int HasTranslucentPolygonalGeometry();
+
+
+public:
+
+};
+
+
+class EXTAPI WidgetsMapper : public vtkPolyDataMapper
+{
+public:
+        static WidgetsMapper *New();
+
+        vtkTypeMacro(WidgetsMapper,vtkPolyDataMapper);
+
+        // Description:
+        // Implement superclass render method.
+        virtual void RenderPiece(vtkRenderer *ren, vtkActor *a);
+        virtual void Render(vtkRenderer *ren, vtkActor *a);
+
+        // Description:
+        // Release any graphics resources that are being consumed by this mapper.
+        // The parameter window could be used to determine which graphic
+        // resources to release.
+        void ReleaseGraphicsResources(vtkWindow *);
+
+        // Description:
+        // Draw method for OpenGL.
+        virtual int Draw(vtkRenderer *ren, vtkActor *a);
+
+        void SetWidgetsManager (GNC::GCS::IWidgetsManager* pManager)
+        {
+                m_pWManager = pManager;
+        }
+
+        virtual void SetWidgetsRenderer(GNC::GCS::IWidgetsRenderer* pRenderer)
+        {
+                m_pWRenderer = pRenderer;
+        }
+
+protected:
+        WidgetsMapper();
+        ~WidgetsMapper();
+
+        int ListId;
+        GNC::GCS::IWidgetsManager*  m_pWManager;
+        GNC::GCS::IWidgetsRenderer* m_pWRenderer;
+
+private:
+        WidgetsMapper(const WidgetsMapper&);  // Not implemented.
+        void operator=(const WidgetsMapper&);  // Not implemented.
+};
diff --git a/cadxcore/widgets/gui/SeleccionTexto.fbp b/cadxcore/widgets/gui/SeleccionTexto.fbp
new file mode 100644
index 0000000..e2681cd
--- /dev/null
+++ b/cadxcore/widgets/gui/SeleccionTexto.fbp
@@ -0,0 +1,634 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration"></property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">selecciontextobase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">Seleccion de Texto</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">300,250</property>
+            <property name="name">SeleccionTextoBase</property>
+            <property name="pos"></property>
+            <property name="size">300,250</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Edit</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate">OnActivar</event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown">OnDialogoKeyDown</event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer5</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_panel4</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Note</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer6</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxBOTTOM</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg">wxSYS_COLOUR_WINDOWTEXT</property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">0</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pControlTexto</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxTE_MULTILINE|wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB|wxTE_WORDWRAP</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown">OnControlTextoKeyDown</event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText">OnControlTextoTextoActualizado</event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">m_pSizerBotonera</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">2</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBotonAceptar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxBU_EXACTFIT</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnBotonAceptarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBotonCancelar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxBU_EXACTFIT</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnBotonCancelarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/widgets/gui/calibracion.cpp b/cadxcore/widgets/gui/calibracion.cpp
new file mode 100644
index 0000000..91d78fd
--- /dev/null
+++ b/cadxcore/widgets/gui/calibracion.cpp
@@ -0,0 +1,236 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/icon.h>
+#include <wx/msgdlg.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include "calibracion.h"
+#include <sstream>
+#include <main/entorno.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/iwidgetsrenderer.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <eventos/modificacionimagen.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/math/geometry3d.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtkSmartPointer.h>
+#include <vtkImageData.h>
+#include <limits>
+
+GNC::GCS::Widgets::Dialogos::Calibracion::Calibracion(wxWindow* parent, TWidget* pWidget, TManager* pManager) : CalibracionBase(parent)
+{
+        wxIcon icono;
+        icono.CopyFromBitmap(GinkgoResourcesManager::MenuIcons::GetIcoCalibrarImagen());
+        this->SetIcon(icono);
+
+        m_pWidget = pWidget;
+        m_pManager = pManager;
+
+        float metricaDistancia = m_pWidget->m_Distancia;
+
+        if (metricaDistancia > 1000.0f) {
+                metricaDistancia = metricaDistancia / 1000.0f;
+                m_unidades->SetSelection(3);
+        } else if (metricaDistancia > 10.0f) {
+                metricaDistancia = metricaDistancia / 10.0f;
+                m_unidades->SetSelection(2);
+        } else if (metricaDistancia < 1.0f) {
+                metricaDistancia = metricaDistancia * 1000.0f;
+                m_unidades->SetSelection(0);
+        } else {
+                m_unidades->SetSelection(1);
+        }
+
+        std::ostringstream os;
+
+        os << metricaDistancia;
+
+        m_ControlDistancia->SetValue(wxString::FromUTF8(os.str().c_str()));
+}
+
+GNC::GCS::Widgets::Dialogos::Calibracion::~Calibracion()
+{
+}
+
+void GNC::GCS::Widgets::Dialogos::Calibracion::OnDialogoKeyDown( wxKeyEvent& event )
+{
+        if (event.GetKeyCode() == WXK_ESCAPE) {
+                Close();
+        } else if (event.GetKeyCode() == WXK_RETURN) {
+                if (ValidarDouble(m_ControlDistancia->GetValue(),std::numeric_limits<GNC::GCS::Vector::TComp>::min(), 1000000)) {
+                        Close();
+                        Calibrar();
+                }
+        } else {
+                event.Skip();
+        }
+}
+
+void GNC::GCS::Widgets::Dialogos::Calibracion::OnControlDistanciaKeyDown( wxKeyEvent& event )
+{
+        if (event.GetKeyCode() == WXK_ESCAPE) {
+                Close();
+        }
+        if (event.GetKeyCode() == WXK_RETURN) {
+                if (ValidarDouble(m_ControlDistancia->GetValue(),std::numeric_limits<GNC::GCS::Vector::TComp>::min(), 1000000)) {
+                        Close();
+                        Calibrar();
+                }
+        } else {
+                event.Skip();
+        }
+}
+
+void GNC::GCS::Widgets::Dialogos::Calibracion::OnBotonCancelarClick( wxCommandEvent& /*event*/ )
+{
+        Close();
+}
+
+void GNC::GCS::Widgets::Dialogos::Calibracion::OnBotonAceptarClick( wxCommandEvent& /*event*/ )
+{
+        //validamos el campo
+        if(ValidarDouble(m_ControlDistancia->GetValue(),std::numeric_limits<GNC::GCS::Vector::TComp>::min(), 1000000)) {
+                m_panelMedida->Hide();
+                m_pPanelEspera->Show(true);
+                Layout();
+                if(Calibrar()) {
+                        Close();
+                } else {
+                        m_panelMedida->Show(true);
+                        m_pPanelEspera->Hide();
+                        Layout();
+                }
+        }
+}
+
+void GNC::GCS::Widgets::Dialogos::Calibracion::OnActivate(wxActivateEvent& /*event*/)
+{
+        m_panelMedida->SetFocus();
+}
+
+void GNC::GCS::Widgets::Dialogos::Calibracion::OnClickEnMenu(wxCommandEvent& /*event*/)
+{
+        Center();
+        ShowModal();
+}
+
+bool GNC::GCS::Widgets::Dialogos::Calibracion::Calibrar()
+{
+
+        if (m_pWidget == NULL) {
+                return false;
+        }
+
+        double oldSpacing[3];                    // Espaciado antiguo
+        double newSpacing[3];                    // Nuevo espaciado
+
+        GNC::GCS::Vector3D worldPosition0,worldPosition1, wDiff;
+
+        double oldDist = m_pWidget->m_Distancia;  // Distancia antigua
+        double newDist;                           // Nueva distancia
+
+        std::string dist(m_ControlDistancia->GetValue().ToUTF8());
+        std::istringstream is (dist);
+        is >> newDist;
+
+        if(m_unidades->GetSelection() == 0) {
+                newDist = newDist / 1000.0f;
+        } else if(m_unidades->GetSelection() == 2) {
+                newDist = newDist * 10.0f;
+        } else if(m_unidades->GetSelection() == 3) {
+                newDist = newDist * 1000.0f;
+        }
+
+        if(!ValidarDouble(newDist,(double)0.0000001f, (double)100000000.0f)) {
+                return false;
+        }
+
+        newDist = std::abs(newDist);
+
+        //proporcion...
+        double proporcion = newDist / oldDist;
+
+        m_pManager->GetRendererActivo()->m_pImageViewer->GetSpacing(oldSpacing);
+
+        //const double raizDe3 = std::sqrt(3.0f);
+        for (int i = 0; i< 3; ++i) {
+                newSpacing[i] = proporcion * oldSpacing[i];
+        }
+
+        if(!ValidarDouble(newSpacing[0],std::numeric_limits<GNC::GCS::Vector::TComp>::min(), (double)1000000.0f)
+            || !ValidarDouble(newSpacing[1],std::numeric_limits<GNC::GCS::Vector::TComp>::min(), (double)1000000.0f)
+            || !ValidarDouble(newSpacing[2],std::numeric_limits<GNC::GCS::Vector::TComp>::min(), (double)1000000.0f)) {
+                return false;
+        } else {
+                //std::cout << "Nuevo espaciado: " << newSpacing[0] << ", " << newSpacing[1] << std::endl;
+
+                GNC::GCS::Events::EventoModificacionImagen* pEvt = new GNC::GCS::Events::EventoModificacionImagen(m_pManager->GetVista(),GNC::GCS::Events::EventoModificacionImagen::ImagenRecalibrada,m_pWidget->GetVID());
+                pEvt->SetOldSpacing(oldSpacing);
+                pEvt->SetNewSpacing(newSpacing);
+
+                double oldOrigin[3];                    // Origen antiguo
+                m_pManager->GetRendererActivo()->m_pImageViewer->GetOrigin(oldOrigin);
+                pEvt->SetOldOrigin(oldOrigin);
+                pEvt->SetNewOrigin(oldOrigin);
+
+                GNC::Entorno::Instance()->GetControladorEventos()->ProcesarEvento(pEvt);
+                return true;
+        }
+}
+
+bool GNC::GCS::Widgets::Dialogos::Calibracion::ValidarDouble(wxString wxStr, double min, double max )
+{
+        if(wxStr != wxEmptyString ) {
+                double valor;
+                if(!wxStr.ToDouble(&valor)) {
+                        wxMessageBox(_("The calibration value must be a decimal number"), _("Error"), wxICON_ERROR);
+                        return false;
+                } else {
+                        if(valor <= min ) {
+                                wxMessageBox(_("Calibration value is too low"), _("Error"), wxICON_ERROR);
+                                return false;
+                        }
+                        if(valor >= max) {
+                                wxMessageBox(wxT("Calibration value is too high"), wxT("Error"), wxICON_ERROR);
+                                return false;
+                        }
+                }
+                return true;
+        }
+        wxMessageBox(_("Enter the calibration value"), _("Error"), wxICON_ERROR);
+        return false;
+}
+
+bool GNC::GCS::Widgets::Dialogos::Calibracion::ValidarDouble(double valor, double min, double max )
+{
+        if(valor<=min ) {
+                wxMessageBox(_("The calibration value is too low"), _("Error"), wxICON_ERROR);
+                return false;
+        }
+        if(valor >=max) {
+                wxMessageBox(_("The calibration value is too high"), _("Error"), wxICON_ERROR);
+                return false;
+        }
+        return true;
+}
diff --git a/cadxcore/widgets/gui/calibracion.fbp b/cadxcore/widgets/gui/calibracion.fbp
new file mode 100644
index 0000000..5350941
--- /dev/null
+++ b/cadxcore/widgets/gui/calibracion.fbp
@@ -0,0 +1,698 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="10" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration"></property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">calibracionbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">Calibracion</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="bg"></property>
+            <property name="center"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">340,180</property>
+            <property name="name">CalibracionBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU</property>
+            <property name="subclass"></property>
+            <property name="title">Calibration</property>
+            <property name="tooltip"></property>
+            <property name="validator_data_type"></property>
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate">OnActivate</event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown">OnDialogoKeyDown</event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pBody</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer6</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND | wxALL</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">1</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pPanelEspera</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer7</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="spacer" expanded="1">
+                                                <property name="height">0</property>
+                                                <property name="permission">protected</property>
+                                                <property name="width">0</property>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">2</property>
+                                            <property name="flag">wxALL|wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxStaticText" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Calibrating...</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pLabelMensaje</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="spacer" expanded="1">
+                                                <property name="height">0</property>
+                                                <property name="permission">protected</property>
+                                                <property name="width">0</property>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_panelMedida</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size">-1,-1</property>
+                                    <property name="subclass">TitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="tooltip">Real Measure</property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer71</property>
+                                        <property name="orient">wxHORIZONTAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxStaticText" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="label">Distance</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_staticText1</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <property name="wrap">-1</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">2</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxTextCtrl" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="maxlength">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_ControlDistancia</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size">80,-1</property>
+                                                <property name="style"></property>
+                                                <property name="subclass"></property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown">OnControlDistanciaKeyDown</event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnText"></event>
+                                                <event name="OnTextEnter"></event>
+                                                <event name="OnTextMaxLen"></event>
+                                                <event name="OnTextURL"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">2</property>
+                                            <property name="flag">wxALL</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxChoice" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="choices">"Microns" "Milimeters" "Centimeters" "Meters"</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_unidades</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="selection">0</property>
+                                                <property name="size"></property>
+                                                <property name="subclass"></property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnChoice"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pFooter</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">m_pSizerBotonera</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">2</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="1">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">2</property>
+                                <property name="flag">wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Accept</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pBotonAceptar</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="style">wxBU_EXACTFIT</property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnBotonAceptarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">2</property>
+                                <property name="flag">wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="1">
+                                    <property name="bg"></property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pBotonCancelar</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="style">wxBU_EXACTFIT</property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnBotonCancelarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/widgets/gui/calibracion.h b/cadxcore/widgets/gui/calibracion.h
new file mode 100644
index 0000000..b1935f1
--- /dev/null
+++ b/cadxcore/widgets/gui/calibracion.h
@@ -0,0 +1,66 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "calibracionbase.h"
+#include <widgets/wrule.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+namespace Dialogos
+{
+class Calibracion : public CalibracionBase
+{
+public:
+        typedef GNC::GCS::Widgets::WRule TWidget;
+        typedef GNC::GCS::IWidgetsManager TManager;
+
+        Calibracion(wxWindow* parent, TWidget* pWidget, TManager* pManager);
+        ~Calibracion();
+
+        virtual void OnClickEnMenu(wxCommandEvent& event);
+
+protected:
+        virtual void OnDialogoKeyDown( wxKeyEvent& event );
+
+        virtual void OnControlDistanciaKeyDown( wxKeyEvent& event );
+
+        virtual void OnBotonCancelarClick( wxCommandEvent& event );
+
+        virtual void OnBotonAceptarClick( wxCommandEvent& event );
+
+        virtual void OnActivate(wxActivateEvent& event);
+
+        bool Calibrar();
+
+        bool ValidarDouble(wxString strNumero, double min, double max);
+        bool ValidarDouble(double valor, double min, double max);
+
+        TWidget*   m_pWidget;
+        TManager*  m_pManager;
+};
+}
+}
+}
+}
diff --git a/cadxcore/widgets/gui/calibracionbase.cpp b/cadxcore/widgets/gui/calibracionbase.cpp
new file mode 100644
index 0000000..8a94777
--- /dev/null
+++ b/cadxcore/widgets/gui/calibracionbase.cpp
@@ -0,0 +1,115 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "calibracionbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+CalibracionBase::CalibracionBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 340,180 ), wxDefaultSize );
+
+        wxBoxSizer* m_pMainSizer;
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelEspera = new wxPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelEspera->Hide();
+
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+
+        bSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pLabelMensaje = new wxStaticText( m_pPanelEspera, wxID_ANY, _("Calibrating..."), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelMensaje->Wrap( -1 );
+        bSizer7->Add( m_pLabelMensaje, 1, wxALL|wxEXPAND, 2 );
+
+
+        bSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pPanelEspera->SetSizer( bSizer7 );
+        m_pPanelEspera->Layout();
+        bSizer7->Fit( m_pPanelEspera );
+        bSizer6->Add( m_pPanelEspera, 1, wxEXPAND | wxALL, 5 );
+
+        m_panelMedida = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
+        m_panelMedida->SetToolTip( _("Real Measure") );
+
+        wxBoxSizer* bSizer71;
+        bSizer71 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_staticText1 = new wxStaticText( m_panelMedida, wxID_ANY, _("Distance"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_staticText1->Wrap( -1 );
+        bSizer71->Add( m_staticText1, 0, wxALL, 5 );
+
+        m_ControlDistancia = new wxTextCtrl( m_panelMedida, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 80,-1 ), 0 );
+        bSizer71->Add( m_ControlDistancia, 1, wxALL, 2 );
+
+        wxString m_unidadesChoices[] = { _("Microns"), _("Milimeters"), _("Centimeters"), _("Meters") };
+        int m_unidadesNChoices = sizeof( m_unidadesChoices ) / sizeof( wxString );
+        m_unidades = new wxChoice( m_panelMedida, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_unidadesNChoices, m_unidadesChoices, 0 );
+        m_unidades->SetSelection( 0 );
+        bSizer71->Add( m_unidades, 0, wxALL, 2 );
+
+        m_panelMedida->SetSizer( bSizer71 );
+        m_panelMedida->Layout();
+        bSizer71->Fit( m_panelMedida );
+        bSizer6->Add( m_panelMedida, 1, wxEXPAND, 5 );
+
+        m_pBody->SetSizer( bSizer6 );
+        m_pBody->Layout();
+        bSizer6->Fit( m_pBody );
+        m_pMainSizer->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* m_pSizerBotonera;
+        m_pSizerBotonera = new wxBoxSizer( wxHORIZONTAL );
+
+
+        m_pSizerBotonera->Add( 0, 0, 1, wxEXPAND, 2 );
+
+        m_pBotonAceptar = new wxButton( m_pFooter, wxID_ANY, _("Accept"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        m_pBotonAceptar->SetDefault();
+        m_pSizerBotonera->Add( m_pBotonAceptar, 0, wxRIGHT, 2 );
+
+        m_pBotonCancelar = new wxButton( m_pFooter, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        m_pSizerBotonera->Add( m_pBotonCancelar, 0, wxLEFT, 2 );
+
+        m_pFooter->SetSizer( m_pSizerBotonera );
+        m_pFooter->Layout();
+        m_pSizerBotonera->Fit( m_pFooter );
+        m_pMainSizer->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+        m_pMainSizer->Fit( this );
+
+        // Connect Events
+        this->Connect( wxEVT_ACTIVATE, wxActivateEventHandler( CalibracionBase::OnActivate ) );
+        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CalibracionBase::OnDialogoKeyDown ) );
+        m_ControlDistancia->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( CalibracionBase::OnControlDistanciaKeyDown ), NULL, this );
+        m_pBotonAceptar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CalibracionBase::OnBotonAceptarClick ), NULL, this );
+        m_pBotonCancelar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CalibracionBase::OnBotonCancelarClick ), NULL, this );
+}
+
+CalibracionBase::~CalibracionBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_ACTIVATE, wxActivateEventHandler( CalibracionBase::OnActivate ) );
+        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CalibracionBase::OnDialogoKeyDown ) );
+        m_ControlDistancia->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( CalibracionBase::OnControlDistanciaKeyDown ), NULL, this );
+        m_pBotonAceptar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CalibracionBase::OnBotonAceptarClick ), NULL, this );
+        m_pBotonCancelar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( CalibracionBase::OnBotonCancelarClick ), NULL, this );
+
+}
diff --git a/cadxcore/widgets/gui/calibracionbase.h b/cadxcore/widgets/gui/calibracionbase.h
new file mode 100644
index 0000000..94d5749
--- /dev/null
+++ b/cadxcore/widgets/gui/calibracionbase.h
@@ -0,0 +1,85 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __calibracionbase__
+#define __calibracionbase__
+
+#include <wx/intl.h>
+
+class BodyPanel;
+class FooterPanel;
+class TitledPanel;
+
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/textctrl.h>
+#include <wx/choice.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class CalibracionBase
+///////////////////////////////////////////////////////////////////////////////
+class CalibracionBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        wxPanel* m_pPanelEspera;
+
+        wxStaticText* m_pLabelMensaje;
+
+        TitledPanel* m_panelMedida;
+        wxStaticText* m_staticText1;
+        wxTextCtrl* m_ControlDistancia;
+        wxChoice* m_unidades;
+        FooterPanel* m_pFooter;
+
+        wxButton* m_pBotonAceptar;
+        wxButton* m_pBotonCancelar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnActivate( wxActivateEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnDialogoKeyDown( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnControlDistanciaKeyDown( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnBotonAceptarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnBotonCancelarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        CalibracionBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Calibration"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~CalibracionBase();
+
+};
+
+#endif //__calibracionbase__
diff --git a/cadxcore/widgets/gui/selecciontexto.cpp b/cadxcore/widgets/gui/selecciontexto.cpp
new file mode 100644
index 0000000..26274b2
--- /dev/null
+++ b/cadxcore/widgets/gui/selecciontexto.cpp
@@ -0,0 +1,117 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <cmath>
+#include <wx/icon.h>
+#include "selecciontexto.h"
+#include <api/iwidgetsmanager.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <wx/xml/xml.h>
+
+GNC::GCS::Widgets::Dialogos::SeleccionTexto::SeleccionTexto(wxWindow* parent, TWidget* pWidget, TManager* pManager) : SeleccionTextoBase(parent)
+{
+        wxIcon icono;
+        icono.CopyFromBitmap(GinkgoResourcesManager::MenuIcons::GetIcoEditar());
+        this->SetIcon(icono);
+
+        m_pWidget = pWidget;
+        m_pManager = pManager;
+        m_pControlTexto->SetValue(wxString::FromUTF8(m_pWidget->m_Texto.c_str()));
+        m_pControlTexto->SetSelection(-1,-1);
+}
+
+GNC::GCS::Widgets::Dialogos::SeleccionTexto::~SeleccionTexto()
+{
+        if (m_pWidget != NULL && m_pWidget->m_pWidgetSeleccion == this) {
+                m_pWidget->m_pWidgetSeleccion= NULL;
+        }
+}
+
+void GNC::GCS::Widgets::Dialogos::SeleccionTexto::OnClickEnMenu(wxCommandEvent& /*event*/)
+{
+        Center();
+        ShowModal();
+}
+
+void GNC::GCS::Widgets::Dialogos::SeleccionTexto::OnDialogoKeyDown( wxKeyEvent& event )
+{
+        if (event.GetKeyCode() == WXK_ESCAPE) {
+                Close();
+        } else if (event.GetKeyCode() == WXK_RETURN) {
+                Actualizar();
+                Close();
+        } else {
+                event.Skip();
+        }
+}
+
+void GNC::GCS::Widgets::Dialogos::SeleccionTexto::OnControlTextoKeyDown( wxKeyEvent& event )
+{
+        if (event.GetKeyCode() == WXK_ESCAPE) {
+                Close();
+        } else {
+                event.Skip();
+        }
+}
+
+void GNC::GCS::Widgets::Dialogos::SeleccionTexto::OnControlTextoTextoActualizado( wxCommandEvent& event )
+{
+        event.Skip();
+}
+
+void GNC::GCS::Widgets::Dialogos::SeleccionTexto::OnBotonCancelarClick( wxCommandEvent& /*event*/ )
+{
+        Close();
+}
+
+void GNC::GCS::Widgets::Dialogos::SeleccionTexto::OnBotonAceptarClick( wxCommandEvent& /*event*/ )
+{
+        Actualizar();
+        Close();
+}
+
+void GNC::GCS::Widgets::Dialogos::SeleccionTexto::OnActivar(wxActivateEvent &/*event*/)
+{
+        m_pControlTexto->SetFocus();
+}
+
+void GNC::GCS::Widgets::Dialogos::SeleccionTexto::Actualizar(bool actualizarWidget)
+{
+
+
+        if (actualizarWidget) {
+
+                bool modifica = false;
+
+                std::string textoControl(m_pControlTexto->GetValue().ToUTF8());
+
+                if (m_pWidget->GetTexto() != textoControl) {
+                        m_pWidget->SetTexto(textoControl);
+                        modifica = true;
+                }
+
+                if (modifica) {
+                        m_pWidget->Invalidar();
+                        m_pWidget->PropagarModificacion();
+                }
+        }
+
+}
+
diff --git a/cadxcore/widgets/gui/selecciontexto.h b/cadxcore/widgets/gui/selecciontexto.h
new file mode 100644
index 0000000..73d80e3
--- /dev/null
+++ b/cadxcore/widgets/gui/selecciontexto.h
@@ -0,0 +1,66 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "selecciontextobase.h"
+#include "../wtextbox.h"
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+namespace Dialogos
+{
+class SeleccionTexto : public SeleccionTextoBase
+{
+public:
+        typedef GNC::GCS::Widgets::WTextBox TWidget;
+        typedef GNC::GCS::IWidgetsManager TManager;
+
+        SeleccionTexto(wxWindow* parent, TWidget* pWidget, TManager* pManager);
+        ~SeleccionTexto();
+
+        virtual void OnClickEnMenu(wxCommandEvent& event);
+
+protected:
+
+        virtual void OnDialogoKeyDown( wxKeyEvent& event );
+
+        virtual void OnControlTextoKeyDown( wxKeyEvent& event );
+
+        virtual void OnControlTextoTextoActualizado( wxCommandEvent& event );
+
+        virtual void OnBotonCancelarClick( wxCommandEvent& event );
+
+        virtual void OnBotonAceptarClick( wxCommandEvent& event );
+
+        virtual void OnActivar(wxActivateEvent &event);
+
+        void Actualizar(bool actualizarWidget = true);
+
+        TWidget*   m_pWidget;
+        TManager*  m_pManager;
+};
+}
+}
+}
+}
diff --git a/cadxcore/widgets/gui/selecciontextobase.cpp b/cadxcore/widgets/gui/selecciontextobase.cpp
new file mode 100644
index 0000000..9775d5e
--- /dev/null
+++ b/cadxcore/widgets/gui/selecciontextobase.cpp
@@ -0,0 +1,92 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "selecciontextobase.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+SeleccionTextoBase::SeleccionTextoBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 300,250 ), wxDefaultSize );
+
+        wxBoxSizer* m_pMainSizer;
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer5;
+        bSizer5 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel4 = new TitledPanel( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel4->SetToolTip( _("Note") );
+
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_pControlTexto = new wxTextCtrl( m_panel4, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_PROCESS_ENTER|wxTE_PROCESS_TAB|wxTE_WORDWRAP );
+        m_pControlTexto->SetMaxLength( 0 );
+        m_pControlTexto->SetForegroundColour( wxSystemSettings::GetColour( wxSYS_COLOUR_WINDOWTEXT ) );
+
+        bSizer6->Add( m_pControlTexto, 1, wxEXPAND|wxBOTTOM, 5 );
+
+
+        m_panel4->SetSizer( bSizer6 );
+        m_panel4->Layout();
+        bSizer6->Fit( m_panel4 );
+        bSizer5->Add( m_panel4, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer5 );
+        m_pBody->Layout();
+        bSizer5->Fit( m_pBody );
+        m_pMainSizer->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* m_pSizerBotonera;
+        m_pSizerBotonera = new wxBoxSizer( wxHORIZONTAL );
+
+
+        m_pSizerBotonera->Add( 0, 0, 1, wxEXPAND, 2 );
+
+        m_pBotonAceptar = new wxButton( m_pFooter, wxID_ANY, _("Accept"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        m_pBotonAceptar->SetDefault();
+        m_pSizerBotonera->Add( m_pBotonAceptar, 0, wxRIGHT, 5 );
+
+        m_pBotonCancelar = new wxButton( m_pFooter, wxID_ANY, _("Cancel"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        m_pSizerBotonera->Add( m_pBotonCancelar, 0, wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( m_pSizerBotonera );
+        m_pFooter->Layout();
+        m_pSizerBotonera->Fit( m_pFooter );
+        m_pMainSizer->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+
+        // Connect Events
+        this->Connect( wxEVT_ACTIVATE, wxActivateEventHandler( SeleccionTextoBase::OnActivar ) );
+        this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( SeleccionTextoBase::OnDialogoKeyDown ) );
+        m_pControlTexto->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( SeleccionTextoBase::OnControlTextoKeyDown ), NULL, this );
+        m_pControlTexto->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SeleccionTextoBase::OnControlTextoTextoActualizado ), NULL, this );
+        m_pBotonAceptar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SeleccionTextoBase::OnBotonAceptarClick ), NULL, this );
+        m_pBotonCancelar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SeleccionTextoBase::OnBotonCancelarClick ), NULL, this );
+}
+
+SeleccionTextoBase::~SeleccionTextoBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_ACTIVATE, wxActivateEventHandler( SeleccionTextoBase::OnActivar ) );
+        this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( SeleccionTextoBase::OnDialogoKeyDown ) );
+        m_pControlTexto->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( SeleccionTextoBase::OnControlTextoKeyDown ), NULL, this );
+        m_pControlTexto->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( SeleccionTextoBase::OnControlTextoTextoActualizado ), NULL, this );
+        m_pBotonAceptar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SeleccionTextoBase::OnBotonAceptarClick ), NULL, this );
+        m_pBotonCancelar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( SeleccionTextoBase::OnBotonCancelarClick ), NULL, this );
+
+}
diff --git a/cadxcore/widgets/gui/selecciontextobase.h b/cadxcore/widgets/gui/selecciontextobase.h
new file mode 100644
index 0000000..d3a1d0e
--- /dev/null
+++ b/cadxcore/widgets/gui/selecciontextobase.h
@@ -0,0 +1,81 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __SELECCIONTEXTOBASE_H__
+#define __SELECCIONTEXTOBASE_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class TitledPanel;
+
+#include <wx/string.h>
+#include <wx/textctrl.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class SeleccionTextoBase
+///////////////////////////////////////////////////////////////////////////////
+class SeleccionTextoBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanel* m_panel4;
+        wxTextCtrl* m_pControlTexto;
+        FooterPanel* m_pFooter;
+        wxButton* m_pBotonAceptar;
+        wxButton* m_pBotonCancelar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnActivar( wxActivateEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnDialogoKeyDown( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnControlTextoKeyDown( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnControlTextoTextoActualizado( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnBotonAceptarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnBotonCancelarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        SeleccionTextoBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Edit"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 300,250 ), long style = wxCAPTION|wxCLOSE_BOX|wxRESIZE_BORDER|wxSYSTEM_MENU );
+        ~SeleccionTextoBase();
+
+};
+
+#endif //__SELECCIONTEXTOBASE_H__
diff --git a/cadxcore/widgets/observers/iobservadorchroma.h b/cadxcore/widgets/observers/iobservadorchroma.h
new file mode 100644
index 0000000..7bec9ef
--- /dev/null
+++ b/cadxcore/widgets/observers/iobservadorchroma.h
@@ -0,0 +1,84 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <stddef.h>
+#include <api/ievento.h>
+
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+class WMarcadoArea;
+
+namespace Observadores
+{
+
+/* Observador especifico de la herramienta lazo */
+class IObservadorChroma
+{
+public:
+        virtual ~IObservadorChroma() {};
+
+        virtual void OnKeyEvent(GNC::GCS::Events::EventoTeclado & evt) = 0;
+};
+}
+
+namespace Notificadores
+{
+class INotificadorChroma
+{
+
+protected:
+        GNC::GCS::Widgets::Observadores::IObservadorChroma* m_pObservadorChroma;
+
+public:
+        INotificadorChroma()
+        {
+                m_pObservadorChroma = NULL;
+        }
+
+        INotificadorChroma(GNC::GCS::Widgets::Observadores::IObservadorChroma* pObservador)
+        {
+                m_pObservadorChroma = pObservador;
+        }
+
+        virtual ~INotificadorChroma() {};
+
+public:
+        void SetObservador(GNC::GCS::Widgets::Observadores::IObservadorChroma* pObservador)
+        {
+                m_pObservadorChroma = pObservador;
+        }
+
+        virtual void NotificarKeyEvent(GNC::GCS::Events::EventoTeclado& evt)
+        {
+                if (m_pObservadorChroma != NULL) {
+                        m_pObservadorChroma->OnKeyEvent(evt);
+                }
+        }
+};
+}
+}
+}
+}
diff --git a/cadxcore/widgets/observers/iobservadorchromacomplejo.h b/cadxcore/widgets/observers/iobservadorchromacomplejo.h
new file mode 100644
index 0000000..f17d2a2
--- /dev/null
+++ b/cadxcore/widgets/observers/iobservadorchromacomplejo.h
@@ -0,0 +1,80 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/ievento.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+namespace Observadores
+{
+
+/* Observador especifico de la herramienta lazo */
+class IObservadorChromaComplejo
+{
+public:
+        virtual ~IObservadorChromaComplejo() {}
+
+        virtual void OnKeyEvent(GNC::GCS::Events::EventoTeclado & evt) = 0;
+};
+}
+
+namespace Notificadores
+{
+class INotificadorChromaComplejo
+{
+
+protected:
+        GNC::GCS::Widgets::Observadores::IObservadorChromaComplejo* m_pObservadorChroma;
+
+public:
+        virtual ~INotificadorChromaComplejo() {}
+
+        INotificadorChromaComplejo()
+        {
+                m_pObservadorChroma = NULL;
+        }
+
+        INotificadorChromaComplejo(GNC::GCS::Widgets::Observadores::IObservadorChromaComplejo* pObservador)
+        {
+                m_pObservadorChroma = pObservador;
+        }
+
+public:
+        void SetObservador(GNC::GCS::Widgets::Observadores::IObservadorChromaComplejo* pObservador)
+        {
+                m_pObservadorChroma = pObservador;
+        }
+
+        virtual void NotificarKeyEvent(GNC::GCS::Events::EventoTeclado& evt)
+        {
+                if (m_pObservadorChroma != NULL) {
+                        m_pObservadorChroma->OnKeyEvent(evt);
+                }
+        }
+};
+}
+}
+}
+}
diff --git a/cadxcore/widgets/observers/iobservadormarcadoarea.h b/cadxcore/widgets/observers/iobservadormarcadoarea.h
new file mode 100644
index 0000000..e5f75b8
--- /dev/null
+++ b/cadxcore/widgets/observers/iobservadormarcadoarea.h
@@ -0,0 +1,110 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <stddef.h>
+#include <api/ievento.h>
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+class WMarcadoArea;
+
+namespace Observadores
+{
+
+/* Observador especifico de la herramienta lazo */
+class IObservadorMarcadoArea
+{
+public:
+
+        virtual ~IObservadorMarcadoArea() {}
+
+        virtual void OnPoligonoCreado(GNC::GCS::Widgets::WMarcadoArea* pPoligono) = 0;
+        virtual void OnPoligonoModificado(GNC::GCS::Widgets::WMarcadoArea* pPoligono) = 0;
+        virtual void OnPoligonoDestruido(GNC::GCS::Widgets::WMarcadoArea* pPoligono) = 0;
+        virtual void OnKeyEvent(GNC::GCS::Events::EventoTeclado & evt) = 0;
+};
+}
+
+namespace Notificadores
+{
+class INotificadorMarcadoArea
+{
+
+protected:
+        GNC::GCS::Widgets::Observadores::IObservadorMarcadoArea* m_pObservadorMarcado;
+
+public:
+
+
+        INotificadorMarcadoArea()
+        {
+                m_pObservadorMarcado = NULL;
+        }
+
+        INotificadorMarcadoArea(GNC::GCS::Widgets::Observadores::IObservadorMarcadoArea* pObservador)
+        {
+                m_pObservadorMarcado = pObservador;
+        }
+
+        virtual ~INotificadorMarcadoArea() {}
+
+public:
+        void SetObservador(GNC::GCS::Widgets::Observadores::IObservadorMarcadoArea* pObservador)
+        {
+                m_pObservadorMarcado = pObservador;
+        }
+
+        virtual void NotificarCreacion(WMarcadoArea* pWidget)
+        {
+                if (m_pObservadorMarcado != NULL) {
+                        m_pObservadorMarcado->OnPoligonoCreado(pWidget);
+                }
+        }
+
+        virtual void NotificarModificacion(WMarcadoArea* pWidget)
+        {
+                if (m_pObservadorMarcado != NULL) {
+                        m_pObservadorMarcado->OnPoligonoModificado(pWidget);
+                }
+        }
+
+        virtual void NotificarDestruccion(WMarcadoArea* pWidget)
+        {
+                if (m_pObservadorMarcado != NULL) {
+                        m_pObservadorMarcado->OnPoligonoDestruido(pWidget);
+                }
+        }
+
+        virtual void NotificarKeyEvent(GNC::GCS::Events::EventoTeclado& evt)
+        {
+                if (m_pObservadorMarcado != NULL) {
+                        m_pObservadorMarcado->OnKeyEvent(evt);
+                }
+        }
+};
+}
+}
+}
+}
diff --git a/cadxcore/widgets/observers/iobservadorwindowlevel.h b/cadxcore/widgets/observers/iobservadorwindowlevel.h
new file mode 100644
index 0000000..d308f12
--- /dev/null
+++ b/cadxcore/widgets/observers/iobservadorwindowlevel.h
@@ -0,0 +1,46 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/math/geometry.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+namespace Observadores
+{
+class IObservadorWindowLevel
+{
+public:
+        typedef GNC::GCS::Vector TVector;
+
+        virtual ~IObservadorWindowLevel() {}
+
+        virtual void OnStart() = 0;
+        virtual void OnAjuste(TVector& start, TVector& stop) = 0;
+        virtual void OnEnd() = 0;
+};
+};
+};
+};
+};
diff --git a/cadxcore/widgets/openglhelper.cpp b/cadxcore/widgets/openglhelper.cpp
new file mode 100644
index 0000000..cbcb53b
--- /dev/null
+++ b/cadxcore/widgets/openglhelper.cpp
@@ -0,0 +1,581 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include <api/helpers/helpertexto.h>
+#include <api/westilo.h>
+#include <api/controllers/icontroladorlog.h>
+#include "openglhelper.h"
+#include <sstream>
+#include <string>
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtkgl.h>
+#include <cairo/cairo.h>
+
+//--------------------------------------------------------------------------------------------
+
+GNC::GCS::TexturaCairo::TexturaCairo()
+{
+        idTextura         = (unsigned int)-1;
+        contextoCreado    = false;
+        texturaCargada    = false;
+        texturaModificada = false;
+        ancho             = 0;
+        alto              = 0;
+        anchoPOT          = 2;
+        altoPOT           = 2;
+        numCanales        = 0;
+        rowStride         = 0;
+        pPixelData        = NULL;
+        cs                = NULL;
+        cr                = NULL;
+        opacidad          = 0.5f;
+        m_Interpolar      = false;
+        trel.Asignar(1.0f, 1.0f);
+}
+
+GNC::GCS::TexturaCairo::~TexturaCairo()
+{
+        Descargar();
+        Destruir();
+}
+
+void GNC::GCS::TexturaCairo::Redimensionar(unsigned int anchoTextura, unsigned int altoTextura)
+{
+
+        texturaModificada = true;
+        if (!contextoCreado || anchoTextura != ancho || altoTextura != alto) {
+                //std::cout << "Actualizando " << anchoTextura << "x" << altoTextura << std::endl;
+                Destruir();
+
+                GTRACE("Creando textura de: " << anchoTextura << "x" << altoTextura);
+
+                ancho = anchoTextura;
+                anchoPOT = NearestPOT(anchoTextura);
+                alto = altoTextura;
+                altoPOT = NearestPOT(altoTextura);
+
+                GTRACE("Creando textura POT de: " << anchoPOT << "x" << altoPOT);
+
+                trel.Asignar((double)anchoTextura / (double) anchoPOT, (double)altoTextura / (double) altoPOT);
+
+                numCanales = 4;
+                rowStride = anchoPOT * numCanales;
+                pPixelData = (unsigned char*) calloc(rowStride * altoPOT, sizeof(unsigned char));
+                cs = cairo_image_surface_create_for_data(pPixelData, CAIRO_FORMAT_ARGB32, anchoPOT, altoPOT, rowStride);
+                if (cairo_surface_status(cs) != CAIRO_STATUS_SUCCESS) {
+                        std::cerr << "Error al crear surface" << std::endl;
+                        free(pPixelData);
+                        pPixelData = NULL;
+                        cairo_surface_destroy(cs);
+                        cs =  NULL;
+                } else {
+                        GTRACE("Superficie creada " << cs);
+                        cr = cairo_create(cs);
+                        if (cairo_status(cr) != CAIRO_STATUS_SUCCESS) {
+                                std::cerr << "Error al crear contexto" << std::endl;
+                                free(pPixelData);
+                                pPixelData = NULL;
+                                cairo_destroy(cr);
+                                cr = NULL;
+                                cairo_surface_destroy(cs);
+                                cs = NULL;
+                        } else {
+                                GTRACE("Contexto creado " << cr);
+                                contextoCreado = true;
+                        }
+                        //std::cout << "Contexto creado: " << ancho << "x" << alto << std::endl;
+                }
+        } else {
+                //std::cout << "No necesita actualizar (" << ancho << "x" << alto << ")" << std::endl;
+        }
+}
+
+void GNC::GCS::TexturaCairo::Destruir()
+{
+
+        if (texturaCargada) {
+                Descargar();
+        }
+        if (contextoCreado) {
+
+                if(cairo_status(cr) == CAIRO_STATUS_SUCCESS) {
+                        GTRACE("Contexto destruido: " << cr);
+                        cairo_destroy(cr);
+                        cr = NULL;
+                }
+                if(cairo_surface_status(cs) == CAIRO_STATUS_SUCCESS) {
+                        GTRACE("Superficie destruida: " << cs);
+                        cairo_surface_destroy(cs);
+                        cs = NULL;
+                }
+                if (pPixelData != NULL) {
+                        free(pPixelData);
+                        pPixelData = NULL;
+                }
+                contextoCreado = false;
+        }
+}
+
+void GNC::GCS::TexturaCairo::Cargar()
+{
+        if (!contextoCreado) {
+                std::cerr << "Error al cargar textura: Contexto no  creado" << std::endl;
+                return;
+        }
+        if (texturaCargada) {
+                return;
+        }
+
+        glEnable(GL_TEXTURE_2D);
+
+        //glHint(GL_TEXTURE_COMPRESSION_HINT, GL_FASTEST);
+        //glHint(GL_TEXTURE_COMPRESSION_HINT, GL_FASTEST);
+        //glHint(GL_TEXTURE_COMPRESSION_HINT, GL_DONT_CARE);
+
+        glGenTextures(1, &idTextura);
+
+        GTRACE("Textura cargada: " << ancho << "x" << alto << ", " << idTextura);
+
+        glBindTexture(GL_TEXTURE_2D, idTextura);
+        if (m_Interpolar) {
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+        } else {
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+        }
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP );
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP );
+
+        glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, anchoPOT, altoPOT, 0, GL_RGBA, GL_UNSIGNED_BYTE, pPixelData);
+
+        glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+
+        glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
+
+        glBindTexture(GL_TEXTURE_2D, 0);
+
+        glDisable(GL_TEXTURE_2D);
+        texturaCargada = true;
+        texturaModificada = false;
+        //std::cout << "Textura cargada: " << ancho << "x" << alto << std::endl;
+}
+
+void GNC::GCS::TexturaCairo::Descargar()
+{
+        if (!contextoCreado) {
+                return;
+        }
+        if (!texturaCargada) {
+                return;
+        }
+
+        glEnable(GL_TEXTURE_2D);
+
+        GTRACE("Textura descargada: " << ancho << "x" << alto << ", " << idTextura);
+
+        glDeleteTextures(1, &idTextura);
+
+        glDisable(GL_TEXTURE_2D);
+
+        idTextura = (unsigned int)-1;
+
+        texturaCargada = false;
+        texturaModificada = false;
+}
+
+void GNC::GCS::TexturaCairo::Actualizar()
+{
+        if (!texturaCargada) {
+                Cargar();
+                return;
+        }
+        if (!texturaModificada) {
+                return;
+        }
+
+        glEnable(GL_TEXTURE_2D);
+
+        if (m_Interpolar) {
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
+        } else {
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
+                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);
+        }
+
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP );
+        glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP );
+
+        //glHint(GL_TEXTURE_COMPRESSION_HINT, GL_FASTEST);
+        glBindTexture(GL_TEXTURE_2D, idTextura);
+        glTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, anchoPOT, altoPOT, GL_RGBA, GL_UNSIGNED_BYTE, pPixelData);
+
+        glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+
+        glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
+
+        glBindTexture(GL_TEXTURE_2D, 0);
+
+        glDisable(GL_TEXTURE_2D);
+
+        texturaModificada = false;
+}
+
+void GNC::GCS::TexturaCairo::Render(const GNC::GCS::Vector* const quad, bool flipHorizontal, bool flipVertical, double rotacionCamara) const
+{
+        /*
+         * Posicion del Quad
+         *  q3   q2
+         *  q0   q1
+         * */
+
+        glEnable(GL_TEXTURE_2D);
+
+        glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+        glBindTexture(GL_TEXTURE_2D, idTextura);
+        glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+        glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
+        glBegin(GL_QUADS);
+
+        if (flipVertical) {
+                if (flipHorizontal) { // Se actua como si no se hiciese flipH
+                        //std::cout << "Render flipV & flipH" << std::endl;
+
+                        if (rotacionCamara != 0.0 ) {}
+
+                        glTexCoord2d(0.0f, 0.0f);
+                        glVertex2d(quad[2].x, quad[2].y);
+
+                        glTexCoord2d(trel.x,  0);
+                        glVertex2d(quad[3].x, quad[3].y);
+
+                        glTexCoord2d(trel.x, trel.y);
+                        glVertex2d(quad[0].x, quad[0].y);
+
+                        glTexCoord2d(0.0f, trel.y);
+                        glVertex2d(quad[1].x, quad[1].y);
+                } else {
+                        //std::cout << "Render flipV & !flipH" << std::endl;
+
+                        if (rotacionCamara != 0.0 ) {}
+
+                        // Se actua como si se hiciese flipH
+                        glTexCoord2d(0.0f, 0.0f);
+                        glVertex2d(quad[3].x, quad[3].y);
+
+                        glTexCoord2d(trel.x,  0);
+                        glVertex2d(quad[2].x, quad[2].y);
+
+                        glTexCoord2d(trel.x, trel.y);
+                        glVertex2d(quad[1].x, quad[1].y);
+
+                        glTexCoord2d(0.0f, trel.y);
+                        glVertex2d(quad[0].x, quad[0].y);
+
+                }
+        } else {
+                if (flipHorizontal) {
+                        //std::cout << "Render !flipV & flipH" << std::endl;
+
+                        if (rotacionCamara != 0.0 ) {}
+
+                        glTexCoord2d(0.0f, 0.0f);
+                        glVertex2d(quad[1].x, quad[1].y);
+
+                        glTexCoord2d(trel.x,  0);
+                        glVertex2d(quad[0].x, quad[0].y);
+
+                        glTexCoord2d(trel.x, trel.y);
+                        glVertex2d(quad[3].x, quad[3].y);
+
+                        glTexCoord2d(0.0f, trel.y);
+                        glVertex2d(quad[2].x, quad[2].y);
+                } else {
+                        //std::cout << "Render !flipV & !flipH" << std::endl;
+
+                        if (rotacionCamara != 0.0 ) {}
+
+                        glTexCoord2d(0.0f, 0.0f);
+                        glVertex2d(quad[0].x, quad[0].y);
+
+                        glTexCoord2d(trel.x,  0);
+                        glVertex2d(quad[1].x, quad[1].y);
+
+                        glTexCoord2d(trel.x, trel.y);
+                        glVertex2d(quad[2].x, quad[2].y);
+
+                        glTexCoord2d(0.0f, trel.y);
+                        glVertex2d(quad[3].x, quad[3].y);
+                }
+        }
+
+        glEnd();
+
+        glBindTexture(GL_TEXTURE_2D, 0);
+        glDisable(GL_TEXTURE_2D);
+}
+
+
+void GNC::GCS::TexturaCairo::Render2D(const GNC::GCS::Vector* const quad)
+{
+
+        /*
+         * Posicion del Quad
+         *  q3   q2
+         *  q0   q1
+         * */
+
+        glEnable(GL_TEXTURE_2D);
+
+        glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+        glBindTexture(GL_TEXTURE_2D, idTextura);
+        glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+        glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
+
+        glBegin(GL_QUADS);
+
+        glTexCoord2d(0.0f, 0.0f);
+        glVertex2d(quad[0].x, quad[0].y);
+
+        glTexCoord2d(1.0,  0);
+        glVertex2d(quad[1].x, quad[1].y);
+
+        glTexCoord2d(1.0, 1.0);
+        glVertex2d(quad[2].x, quad[2].y);
+
+        glTexCoord2d(0.0f, 1.0);
+        glVertex2d(quad[3].x, quad[3].y);
+
+        glEnd();
+
+        glBindTexture(GL_TEXTURE_2D, 0);
+
+        glDisable(GL_TEXTURE_2D);
+
+}
+
+
+void GNC::GCS::TexturaCairo::Render(GNC::GCS::Contexto3D* c, const GNC::GCS::Vector& pos, bool flipHorizontal, bool flipVertical, double rotacionCamara, bool ajustarAPixeslPantalla, bool aplicarEscala) const
+{
+
+        /*
+         * Posicion del Quad
+         *  q3   q2
+         *  q0   q1
+         * */
+
+        GNC::GCS::Vector escala;
+        if (aplicarEscala) {
+                escala = c->RelacionImagenPantalla();
+        } else {
+                escala.x = 1;
+                escala.y = 1;
+        }
+
+        GNC::GCS::Vector quad[4];
+
+        GNC::GCS::Vector rasterPos = pos.Redondeado();
+
+        quad[0].x = rasterPos.x;
+        quad[0].y = rasterPos.y;
+
+        quad[2].x = quad[0].x + (double)anchoPOT * escala.x;
+        quad[2].y = quad[0].y + (double)altoPOT * escala.y;
+
+        quad[1].x = quad[2].x;
+        quad[1].y = quad[0].y;
+
+        quad[3].x = quad[0].x;
+        quad[3].y = quad[2].y;
+
+        glEnable(GL_TEXTURE_2D);
+
+        glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+        glBindTexture(GL_TEXTURE_2D, idTextura);
+        glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+        glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
+
+        if (ajustarAPixeslPantalla) {
+                AjustarAPixelsPantalla(c, quad, 4);
+        }
+
+        glBegin(GL_QUADS);
+        if (flipVertical) {
+                if (flipHorizontal) { // Se actua como si no se hiciese flipH
+                        //std::cout << "Render2 flipV & flipH" << std::endl;
+
+                        if (rotacionCamara != 0.0 ) {}
+
+                        glTexCoord2d(0.0f, 0.0f);
+                        glVertex2d(quad[2].x, quad[2].y);
+
+                        glTexCoord2d(1.0,  0);
+                        glVertex2d(quad[3].x, quad[3].y);
+
+                        glTexCoord2d(1.0, 1.0);
+                        glVertex2d(quad[0].x, quad[0].y);
+
+                        glTexCoord2d(0.0f, 1.0);
+                        glVertex2d(quad[1].x, quad[1].y);
+                } else {
+                        //std::cout << "Render2 flipV & !flipH" << std::endl;
+
+                        if (rotacionCamara != 0.0 ) {}
+
+                        // Se actua como si se hiciese flipH
+                        glTexCoord2d(0.0f, 0.0f);
+                        glVertex2d(quad[3].x, quad[3].y);
+
+                        glTexCoord2d(1.0,  0);
+                        glVertex2d(quad[2].x, quad[2].y);
+
+                        glTexCoord2d(1.0, 1.0);
+                        glVertex2d(quad[1].x, quad[1].y);
+
+                        glTexCoord2d(0.0f, 1.0);
+                        glVertex2d(quad[0].x, quad[0].y);
+
+                }
+        } else {
+                if (flipHorizontal) {
+                        //std::cout << "Render2 !flipV & flipH" << std::endl;
+
+                        if (rotacionCamara != 0.0 ) {}
+
+                        glTexCoord2d(0.0f, 0.0f);
+                        glVertex2d(quad[1].x, quad[1].y);
+
+                        glTexCoord2d(1.0,  0);
+                        glVertex2d(quad[0].x, quad[0].y);
+
+                        glTexCoord2d(1.0, 1.0);
+                        glVertex2d(quad[3].x, quad[3].y);
+
+                        glTexCoord2d(0.0f, 1.0);
+                        glVertex2d(quad[2].x, quad[2].y);
+                } else {
+                        //std::cout << "Render2 !flipV & !flipH" << std::endl;
+
+                        if (rotacionCamara != 0.0 ) {}
+
+                        glTexCoord2d(0.0f, 0.0f);
+                        glVertex2d(quad[0].x, quad[0].y);
+
+                        glTexCoord2d(1.0,  0);
+                        glVertex2d(quad[1].x, quad[1].y);
+
+                        glTexCoord2d(1.0, 1.0);
+                        glVertex2d(quad[2].x, quad[2].y);
+
+                        glTexCoord2d(0.0f, 1.0);
+                        glVertex2d(quad[3].x, quad[3].y);
+                }
+        }
+        glEnd();
+
+        glBindTexture(GL_TEXTURE_2D, 0);
+
+        glDisable(GL_TEXTURE_2D);
+        /*
+        	glColor3f(1.0f, 0.0f, 0.0f);
+        	glLineWidth(2.0f);
+        	glBegin(GL_LINES);
+        	glVertex2dv(quad[0]);
+        	glVertex2dv(quad[2]);
+        	glEnd();
+        */
+}
+
+inline unsigned int GNC::GCS::TexturaCairo::NearestPOT(unsigned int size)
+{
+
+        unsigned int pot = 1;
+        while (pot < size && pot < 0x80000000) {
+                pot <<= 1;
+        }
+
+        return pot;
+}
+
+void GNC::GCS::TexturaCairo::SetFontNormal(const std::string& fontname, float tamFuente)
+{
+        cairo_font_options_t* options;
+        if (cr != NULL) {
+                cairo_select_font_face (cr, fontname.c_str(), CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
+                cairo_set_font_size(cr, tamFuente);
+                options = cairo_font_options_create ();
+                cairo_get_font_options(cr, options);
+                cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_NONE);
+                cairo_set_font_options(cr, options);
+                cairo_font_options_destroy(options);
+        } else {
+                LOG_WARN("Core/RenderAPI", "Unable to set font. Context not created yet");
+        }
+}
+
+void GNC::GCS::TexturaCairo::SetFontBold(const std::string& fontname, float tamFuente)
+{
+        cairo_font_options_t* options;
+        if (cr != NULL) {
+                cairo_select_font_face (cr, fontname.c_str(), CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_BOLD);
+                cairo_set_font_size(cr, tamFuente);
+                options = cairo_font_options_create ();
+                cairo_get_font_options(cr, options);
+                cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_NONE);
+                cairo_set_font_options(cr, options);
+                cairo_font_options_destroy(options);
+        } else {
+                LOG_WARN("Core/RenderAPI","Unable to set font. Context not created yet");
+        }
+}
+
+void GNC::GCS::TexturaCairo::SetSourceColor(float b, float g, float r, float a)
+{
+        cairo_set_source_rgba (cr, r, g, b, a);
+}
+
+//--------------------------------------------------------------------------------------------
+
+
+GNC::GCS::GLHelper::TVector GNC::GCS::GLHelper::calcularBoundingBox(TTextura& tc, const std::string& texto, bool withShadow, float anchoMaximo, TAlineamiento alineamiento)
+{
+        if (!tc.contextoCreado) {
+                tc.Redimensionar(2, 2);
+        }
+        return GNC::GCS::Widgets::HelperTexto::procesarTexto(tc.cr, texto, NULL, withShadow, anchoMaximo, alineamiento, false);
+}
+
+GNC::GCS::GLHelper::TVector GNC::GCS::GLHelper::dibujarTexto(TTextura& tc, const std::string& texto, bool withShadow, float anchoMaximo, TAlineamiento alineamiento)
+{
+        tc.texturaModificada = true;
+        return GNC::GCS::Widgets::HelperTexto::procesarTexto(tc.cr, texto, NULL, withShadow, anchoMaximo, alineamiento, true);
+}
+
+GNC::GCS::GLHelper::TVector GNC::GCS::GLHelper::dibujarTexto(TTextura& tc, const std::string& texto, const TColor& c, bool withShadow, float anchoMaximo, TAlineamiento alineamiento)
+{
+        tc.texturaModificada = true;
+        return GNC::GCS::Widgets::HelperTexto::procesarTexto(tc.cr, texto, &c, withShadow, anchoMaximo, alineamiento, true);
+}
+
+//--------------------------------------------------------------------------------------------
diff --git a/cadxcore/widgets/openglhelper.h b/cadxcore/widgets/openglhelper.h
new file mode 100644
index 0000000..5e99da5
--- /dev/null
+++ b/cadxcore/widgets/openglhelper.h
@@ -0,0 +1,148 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/math/geometry.h>
+#include <api/iwidgets.h>
+#include <api/helpers/helpertexto.h>
+#include <api/api.h>
+#include <vtkgl.h>
+
+#ifndef GL_TEXTURE_COMPRESSION_HINT
+#define GL_TEXTURE_COMPRESSION_HINT 0x84EF
+#endif
+#ifndef GL_COMPRESSED_RGBA
+#define GL_COMPRESSED_RGBA 0x84EE
+#endif
+#ifndef GL_COMPRESSED_LUMINANCE
+#define GL_COMPRESSED_LUMINANCE 0x84EA
+#endif
+
+struct _cairo_surface;
+struct _cairo;
+
+namespace GNC
+{
+namespace GCS
+{
+
+class EXTAPI TexturaCairo
+{
+public:
+
+        /* Dimension en las coordenadas x de la imagen */
+        unsigned int ancho;
+        /* Dimension en las coordenadas y de la imagen */
+        unsigned int alto;
+        /* Dimension en las coordenadas x de la imagen como potencia de 2 mas cercana */
+        unsigned int anchoPOT;
+        /* Dimension en las coordenadas y de la imagen como potencia de 2 mas cercana*/
+        unsigned int altoPOT;
+        /* Numero de canales de la imagen (R,G,B..) */
+        unsigned int numCanales;
+        /* Longitud de una fila */
+        unsigned int rowStride;
+        /* Imagen sobre la que escribe Cairo */
+        unsigned char*         pPixelData;
+        /* Superficie de Cairo */
+        struct _cairo_surface* cs;
+        /* Contexto de renderer Cairo*/
+        struct _cairo*         cr;
+
+        float opacidad;
+
+        GNC::GCS::Vector trel; // Tamano de la textura en coordenadas normalizadas [0,1]x[0,1]
+
+        bool contextoCreado;
+
+        bool texturaCargada;
+
+        bool texturaModificada;
+
+        unsigned int idTextura;
+
+        bool m_Interpolar;
+
+        TexturaCairo();
+
+        ~TexturaCairo();
+
+        void Redimensionar(unsigned int anchoTextura, unsigned int altoTextura);
+
+        void Destruir();
+
+        void Cargar();
+
+        void Descargar();
+
+        void Actualizar();
+
+        inline void Modificar(bool modificada = true)
+        {
+                texturaModificada = modificada;
+        }
+
+        inline void ActivarInterpolacion()
+        {
+                m_Interpolar = true;
+        }
+
+        inline void DesactivarInterpolacion()
+        {
+                m_Interpolar = false;
+        }
+
+        inline bool EsValida()
+        {
+                return ( (cr != NULL) );
+        }
+
+        void Render(const GNC::GCS::Vector* const quad, bool flipHorizontal, bool flipVertical, double rotacionCamara) const;
+        void Render2D(const GNC::GCS::Vector* const quad);
+        void Render(GNC::GCS::Contexto3D* c, const GNC::GCS::Vector& pos, bool flipHorizontal, bool flipVertical, double rotacionCamara, bool ajustarAPixelsPantalla = false, bool aplicarEscala = false) const;
+
+        inline unsigned int NearestPOT(unsigned int size);
+
+        void SetFontNormal(const std::string& fontname, float tamFuente);
+        void SetFontBold(const std::string& fontname, float tamFuente);
+
+        void SetSourceColor(float b, float g, float r, float a);
+
+};
+
+class EXTAPI GLHelper
+{
+public:
+        typedef GNC::GCS::TexturaCairo               TTextura;
+        typedef GNC::GCS::Vector                     TVector;
+        typedef GNC::GCS::Widgets::Color             TColor;
+        typedef GNC::GCS::Widgets::HelperTexto::TAlineamiento TAlineamiento;
+
+        /* Calcula el bounding box del texto sobre cairo para la fuente seleccionada. Realiza word-wrapping. */
+        static TVector calcularBoundingBox(TTextura& tc, const std::string& text, bool withShadow, float anchoMaximo = -1.0f, TAlineamiento alineamiento = GNC::GCS::Widgets::HelperTexto::TA_Izquierda);
+
+        /* Dibuja el texto en el contexto cairo con fuente seleccionada. Realiza word-wrapping. */
+        static TVector dibujarTexto(TTextura& tc, const std::string& texto, bool withShadow, float anchoMaximo = -1.0f, TAlineamiento alineamiento = GNC::GCS::Widgets::HelperTexto::TA_Izquierda);
+
+        /* Dibuja el texto en el contexto cairo con fuente seleccionada y color especificado. Realiza word-wrapping. */
+        static TVector dibujarTexto(TTextura& tc, const std::string& texto, const TColor& c, bool withShadow, float anchoMaximo = -1.0f, TAlineamiento alineamiento = GNC::GCS::Widgets::HelperTexto::TA_Izquierda);
+};
+}
+}
diff --git a/cadxcore/widgets/striptexthelper.cpp b/cadxcore/widgets/striptexthelper.cpp
new file mode 100644
index 0000000..74320cd
--- /dev/null
+++ b/cadxcore/widgets/striptexthelper.cpp
@@ -0,0 +1,225 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "striptexthelper.h"
+#include <api/math/geometry.h>
+#include <api/westilo.h>
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtkgl.h>
+#include <cairo/cairo.h>
+
+GNC::GCS::Widgets::StripDescription::StripDescription(GNC::GCS::Vector position, GNC::GCS::Vector size):
+        rasterPosition(position),
+        rasterSize(size)
+{
+
+}
+
+GNC::GCS::Widgets::StripTextRenderer::StripTextRenderer():
+        m_textHeigh(2)
+{
+        m_pFontOptions = cairo_font_options_create();
+        tc.Redimensionar(2, 2);
+        cairo_get_font_options(tc.cr, m_pFontOptions);
+        cairo_font_options_set_antialias (m_pFontOptions, CAIRO_ANTIALIAS_NONE);
+        cairo_set_font_options(tc.cr, m_pFontOptions);
+}
+
+GNC::GCS::Widgets::StripTextRenderer::~StripTextRenderer()
+{
+        cairo_font_options_destroy(m_pFontOptions);
+        m_pFontOptions = NULL;
+}
+
+void GNC::GCS::Widgets::StripTextRenderer::Destroy()
+{
+        tc.Destruir();
+}
+
+void GNC::GCS::Widgets::StripTextRenderer::Render(const std::string& text, const GNC::GCS::Vector& renderPosition, bool leftAlign)
+{
+        tc.Actualizar();
+        GNC::GCS::Vector curRenderPosition = renderPosition;
+
+        GNC::GCS::Vector quadRaster[4];
+        GNC::GCS::Vector quadTexture[4];
+
+        GNC::GCS::Vector rasterPos = curRenderPosition.Redondeado();
+
+        quadRaster[0].x = rasterPos.x;
+        quadRaster[0].y = rasterPos.y;
+
+        glEnable(GL_TEXTURE_2D);
+
+        glColor4f(1.0f, 1.0f, 1.0f, 1.0f);
+        glBindTexture(GL_TEXTURE_2D, tc.idTextura);
+        glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_REPLACE);
+        glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_FASTEST);
+
+        for (std::string::const_iterator it1 = text.begin(); it1 != text.end(); it1++) {
+                if (m_CharMap.find((*it1)) == m_CharMap.end()) {
+                        continue;
+                }
+                const StripDescription& sd = m_CharMap[(*it1)];
+                if (!leftAlign) {
+                        quadRaster[0].x -= sd.rasterSize.x;
+                }
+                //raster position
+                quadRaster[2] = quadRaster[0] + sd.rasterSize;
+
+                quadRaster[1].x = quadRaster[2].x;
+                quadRaster[1].y = quadRaster[0].y;
+
+                quadRaster[3].x = quadRaster[0].x;
+                quadRaster[3].y = quadRaster[2].y;
+                //texture position 0.0,1.0
+
+                glBegin(GL_QUADS);
+                glTexCoord2d(sd.textPosition.x, sd.textPosition.y);
+                glVertex2d(quadRaster[0].x, quadRaster[0].y);
+
+                glTexCoord2d(sd.textPosition.x + sd.textSize.x, sd.textPosition.y);
+                glVertex2d(quadRaster[1].x, quadRaster[1].y);
+
+                glTexCoord2d(sd.textPosition.x + sd.textSize.x, sd.textPosition.y + sd.textSize.y);
+                glVertex2d(quadRaster[2].x, quadRaster[2].y);
+
+                glTexCoord2d(sd.textPosition.x, sd.textPosition.y + sd.textSize.y);
+                glVertex2d(quadRaster[3].x, quadRaster[3].y);
+                glEnd();
+
+                //increments raster position...
+                if (leftAlign) {
+                        quadRaster[0].x += sd.rasterSize.x;
+                }
+        }
+
+        glBindTexture(GL_TEXTURE_2D, 0);
+        glDisable(GL_TEXTURE_2D);
+}
+
+void GNC::GCS::Widgets::StripTextRenderer::Update(const std::string& strip, const GNC::GCS::GLHelper::TColor& color, double fontSize, bool drawShadow)
+{
+        m_text = strip;
+
+        if (tc.EsValida() && (m_text.size() > 0) ) {
+
+                ///process strip...
+                m_CharMap.clear();
+                //measure each char...
+
+                cairo_text_extents_t text_extents;
+
+                _cairo* cr = tc.cr;
+                //clear canvas...
+                cairo_select_font_face(cr, "cairo:monospace", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
+                cairo_set_font_size(cr, fontSize);
+
+                cairo_get_font_options(cr, m_pFontOptions);
+                cairo_font_options_set_antialias (m_pFontOptions, CAIRO_ANTIALIAS_NONE);
+                cairo_set_font_options(cr, m_pFontOptions);
+                cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+
+                cairo_font_extents_t      font_extents;
+                cairo_font_extents(cr, &font_extents);
+                m_textHeigh = font_extents.height + 2;
+
+                int elementsPerRow = std::ceil(sqrt((double)m_text.size()));
+                GNC::GCS::Vector pos(0.0, 0.0);
+                GNC::GCS::Vector size(0,0);
+                std::string charString;
+                int currElement = 0;
+                for (std::string::const_iterator it1 = m_text.begin(); it1 != m_text.end(); it1++) {
+                        charString = (*it1);
+                        if (m_CharMap.find((*it1)) != m_CharMap.end()) {
+                                continue;
+                        }
+                        //measure char
+                        cairo_text_extents(cr, charString.c_str(), &text_extents);
+                        GNC::GCS::Vector psize (text_extents.x_advance + 2, font_extents.height + 2);
+                        m_CharMap[(*it1)] = StripDescription(pos, psize);
+
+                        currElement++;
+                        if (currElement%elementsPerRow == 0) {
+                                size.x = std::max<double>(size.x, pos.x);
+                                pos.x = 0;
+                                pos.y += font_extents.height + 2;
+                        } else {
+                                pos.x += psize.x;
+                        }
+                        pos.RedondearAlza();
+                }
+
+                size.y = pos.y + font_extents.height;
+                size.RedondearAlza();
+                tc.Redimensionar(size.x, size.y);
+                size.x = tc.anchoPOT;
+                size.y = tc.altoPOT;
+                cr = tc.cr;
+                //clear canvas...
+                cairo_select_font_face(cr, "cairo:monospace", CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
+                cairo_set_font_size(cr, fontSize);
+
+                cairo_get_font_options(cr, m_pFontOptions);
+                cairo_font_options_set_antialias (m_pFontOptions, CAIRO_ANTIALIAS_NONE);
+                cairo_set_font_options(cr, m_pFontOptions);
+                cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+
+                cairo_set_source_rgba (cr, 1.0f, 1.0f, 0.0f, 0.0f);
+                cairo_paint(cr);
+                //
+
+                currElement = 0;
+                for (std::map<char, StripDescription>::iterator it = m_CharMap.begin(); it != m_CharMap.end(); ++it) {
+                        //draw char
+                        charString = (*it).first;
+                        GNC::GCS::Vector& pos = (*it).second.rasterPosition;
+
+                        if (drawShadow) {
+                                cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+                                cairo_move_to(cr, std::ceil(pos.x + 1.0f), std::ceil(pos.y + font_extents.height + 1.0f));
+                                cairo_set_source_rgba(cr, DEFAULT_TEXT_COLOR_INVERTED);
+                                cairo_show_text(cr,charString.c_str());
+                                cairo_set_operator(cr, CAIRO_OPERATOR_OVER);
+                        } else {
+                                cairo_set_operator(cr, CAIRO_OPERATOR_SOURCE);
+                        }
+
+                        cairo_move_to(cr, std::ceil(pos.x), std::ceil(pos.y + font_extents.height));
+
+                        cairo_set_source_rgba(cr, color.RF(), color.GF(), color.BF(), color.AF());
+
+                        cairo_show_text(cr, charString.c_str());
+                        //update position and size...
+                        (*it).second.textPosition = (*it).second.rasterPosition/ size;
+                        //(*it).second.textPosition.RedondearAlza();
+                        (*it).second.textSize = (*it).second.rasterSize/size;
+                        //(*it).second.textSize.RedondearAlza();
+                }
+
+        }
+}
+
+double GNC::GCS::Widgets::StripTextRenderer::GetTextHeigh()
+{
+        return m_textHeigh;
+}
diff --git a/cadxcore/widgets/striptexthelper.h b/cadxcore/widgets/striptexthelper.h
new file mode 100644
index 0000000..ec1f698
--- /dev/null
+++ b/cadxcore/widgets/striptexthelper.h
@@ -0,0 +1,76 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/math/geometry.h>
+#include <api/iwidgets.h>
+#include <widgets/openglhelper.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class Contexto3D;
+}
+}
+//endregion
+struct _cairo_font_options;
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+struct StripDescription {
+        StripDescription() = default;
+        StripDescription(GNC::GCS::Vector position, GNC::GCS::Vector size);
+
+        GNC::GCS::Vector rasterPosition;
+        GNC::GCS::Vector rasterSize;
+        GNC::GCS::Vector textPosition;
+        GNC::GCS::Vector textSize;
+};
+
+class StripTextRenderer
+{
+public:
+        StripTextRenderer();
+
+        ~StripTextRenderer();
+
+        void Render(const std::string& text, const GNC::GCS::Vector& renderPosition, bool leftAlign = true);
+
+        void Update(const std::string& strip, const GNC::GCS::Widgets::Color& color, double fontSize, bool drawShadow);
+
+        double GetTextHeigh();
+
+        void Destroy();
+
+        std::map<char, StripDescription> m_CharMap;
+        _cairo_font_options* m_pFontOptions;
+        double m_textHeigh;
+        std::string m_text;
+        GNC::GCS::TexturaCairo tc;
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wangulo.cpp b/cadxcore/widgets/wangulo.cpp
new file mode 100644
index 0000000..39975dd
--- /dev/null
+++ b/cadxcore/widgets/wangulo.cpp
@@ -0,0 +1,1309 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <ostream>
+#include <sstream>
+#include <cmath>
+
+#include <api/globals.h>
+#include <api/math/geometry3d.h>
+#include <api/internationalization/internationalization.h>
+#include "wangulo.h"
+#include "wtextbox.h"
+#include <api/ievento.h>
+#include <api/icontexto.h>
+#include <api/iwidgetsrenderer.h>
+#include <eventos/modificacionimagen.h>
+#include "main/managers/widgetsmanager.h"
+#include <vtkgl.h>
+#include <cairo/cairo.h>
+#include "openglhelper.h"
+#include <wx/xml/xml.h>
+
+//region "Implementacion de WAnguloBuilder"
+
+GNC::GCS::Widgets::WAnguloBuilder::WAnguloBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask) :
+        GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask),
+        m_Changed(false),
+        m_Estado(WBS_Ninguno),
+        m_Modo(MA_Normal),
+        m_NodoActual(0),
+        m_pAnguloTemp(NULL)
+{
+}
+
+GNC::GCS::Widgets::WAnguloBuilder::~WAnguloBuilder()
+{
+        if (m_pAnguloTemp != NULL) {
+                delete m_pAnguloTemp;
+                m_pAnguloTemp = NULL;
+                m_NodoActual = 0;
+        }
+}
+
+void GNC::GCS::Widgets::WAnguloBuilder::SetModo(ModoAngulo modo)
+{
+        if (m_pAnguloTemp == NULL) {
+                delete m_pAnguloTemp;
+                m_pAnguloTemp = NULL;
+                m_NodoActual = 0;
+        }
+        m_Modo = modo;
+}
+
+void GNC::GCS::Widgets::WAnguloBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        GTRACE("GNC::GCS::Widgets::WAnguloBuilder::OnMouseEvents(wxMouseEvent&)");
+        if (m_Estado == WBS_Creando && evento.ButtonUp(m_ButtonMask)) {
+                if (m_pAnguloTemp != NULL) {
+                        if (m_Modo == MA_Normal) { // Angulo normal
+                                if (m_NodoActual == 1) {
+                                        m_pAnguloTemp->m_Nodos[1] = evento.iP;
+                                        if ( (m_pAnguloTemp->m_Nodos[1] - m_pAnguloTemp->m_Nodos[0]).Norma2Cuadrado() < GNC::GCS::Vector::EpsilonDeReales() ) {
+                                                m_NodoActual = 0;
+                                                delete m_pAnguloTemp;
+                                                m_Estado = WBS_Ninguno;
+                                                m_pAnguloTemp = NULL;
+                                        } else {
+                                                m_pAnguloTemp->m_Nodos[2] = evento.iP;
+                                                m_NodoActual = 2;
+                                                m_pAnguloTemp->Recalcular(evento.c->GetRenderer(), true);
+                                                ConsumirEvento();
+                                        }
+                                } else {
+                                        m_pAnguloTemp->m_Nodos[2] = evento.iP;
+                                        if ( (m_pAnguloTemp->m_Nodos[2] - m_pAnguloTemp->m_Nodos[1]).Norma2Cuadrado() < GNC::GCS::Vector::EpsilonDeReales()) {
+                                                m_NodoActual = 0;
+                                                delete m_pAnguloTemp;
+                                                m_Estado = WBS_Ninguno;
+                                                m_pAnguloTemp = NULL;
+                                        } else {
+                                                m_pAnguloTemp->Recalcular(evento.c->GetRenderer(), true);
+                                                m_pManager->InsertarWidget(m_pAnguloTemp);
+                                                LanzarEventoCreacion(m_pAnguloTemp);
+                                                m_pAnguloTemp = NULL;
+                                                m_Estado = WBS_Ninguno;
+                                                m_NodoActual = 0;
+                                                ConsumirEvento();
+                                        }
+                                }
+                        } else { // Angulo de Cobb
+                                m_pAnguloTemp->m_Nodos[m_NodoActual] = evento.iP;
+                                m_pAnguloTemp->Recalcular(evento.c->GetRenderer(), true);
+                                if (m_NodoActual == 1) {
+                                        if ( (m_pAnguloTemp->m_Nodos[1] - m_pAnguloTemp->m_Nodos[0]).Norma2Cuadrado() < GNC::GCS::Vector::EpsilonDeReales() ) {
+                                                m_NodoActual = 0;
+                                                delete m_pAnguloTemp;
+                                                m_Estado = WBS_Ninguno;
+                                                m_pAnguloTemp = NULL;
+                                        } else {
+                                                m_NodoActual = 2;
+                                                ConsumirEvento();
+                                        }
+                                } else {
+                                        if ( (m_pAnguloTemp->m_Nodos[3] - m_pAnguloTemp->m_Nodos[2]).Norma2Cuadrado() < GNC::GCS::Vector::EpsilonDeReales()) {
+                                                m_NodoActual = 0;
+                                                delete m_pAnguloTemp;
+                                                m_Estado = WBS_Ninguno;
+                                                m_pAnguloTemp = NULL;
+                                        } else {
+                                                m_pManager->InsertarWidget(m_pAnguloTemp);
+
+                                                m_pManager->LanzarEventoCreacion(m_pAnguloTemp);
+                                                m_pAnguloTemp = NULL;
+                                                m_Estado = WBS_Ninguno;
+                                                m_NodoActual = 0;
+                                                ConsumirEvento();
+                                        }
+                                }
+                        }
+                        m_pManager->Modificado();
+                }
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado == WBS_Ninguno) {
+                        m_Estado = WBS_Creando;
+                        if (m_pAnguloTemp == NULL) {
+                                if (m_pAnguloTemp != NULL) {
+                                        delete m_pAnguloTemp;
+                                }
+                                m_pAnguloTemp = new GNC::GCS::Widgets::WAngulo(m_pManager, evento.c->GetRenderer()->GetVID(), m_Modo, "Angle");
+                                if (m_Modo == MA_Cobb) {
+                                        m_pAnguloTemp->SetCompleted(false);
+                                }
+                                m_pAnguloTemp->m_Nodos[0] = m_pAnguloTemp->m_Nodos[1] = m_pAnguloTemp->m_Nodos[2] = evento.iP;
+                                m_pAnguloTemp->Recalcular(evento.c->GetRenderer(), true);
+                                m_NodoActual = 1;
+                                ConsumirEvento();
+                        }
+                } else {
+                        if (m_pAnguloTemp != NULL) {
+                                if (m_Modo == MA_Cobb) {  // Angulo de Cobb
+                                        if (m_NodoActual == 2) {
+                                                m_pAnguloTemp->SetCompleted(true);
+                                                m_pAnguloTemp->m_Nodos[2] = evento.iP;
+                                                m_NodoActual = 3;
+                                                m_pAnguloTemp->m_Nodos[3] = evento.iP;
+                                        }
+                                }
+                                ConsumirEvento();
+                        } else {
+                                m_Estado = WBS_Ninguno;
+                        }
+                }
+                m_pManager->Modificado();
+        } else if (evento.Dragging() && m_Estado == WBS_Creando) {
+                if (m_pAnguloTemp != NULL) {
+                        m_pAnguloTemp->m_Nodos[m_NodoActual] = evento.iP;
+                        m_pAnguloTemp->Recalcular(evento.c->GetRenderer(), true);
+                        m_pManager->Modificado();
+                        ConsumirEvento();
+                }
+        } else if (evento.Moving() && m_Estado == WBS_Creando) {
+                if (m_pAnguloTemp != NULL) {
+                        m_pAnguloTemp->m_Nodos[m_NodoActual] = evento.iP;
+                        m_pAnguloTemp->Recalcular(evento.c->GetRenderer(), true);
+                        m_pManager->Modificado();
+                        ConsumirEvento();
+                }
+        }
+}
+
+void GNC::GCS::Widgets::WAnguloBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+        GTRACE("GNC::GCS::Widgets::WAnguloBuilder::OnKeyEvents(wxKeyEvent&)");
+}
+
+void GNC::GCS::Widgets::WAnguloBuilder::Render(GNC::GCS::Contexto3D* c)
+{
+
+        if (m_pAnguloTemp == NULL) {
+                return;
+        }
+        if (c->GetRenderer()->GetVID() == m_pAnguloTemp->GetVID()) {
+
+                glLineWidth(m_LineWidthProp);
+
+                if (m_Modo == MA_Normal) {
+                        if (m_NodoActual < 2) {
+                                glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
+                                glBegin(GL_LINE_STRIP);
+                                glVertex2d(m_pAnguloTemp->m_Nodos[0].x, m_pAnguloTemp->m_Nodos[0].y);
+                                glVertex2d(m_pAnguloTemp->m_Nodos[1].x, m_pAnguloTemp->m_Nodos[1].y);
+                                glEnd();
+                        } else {
+                                m_pAnguloTemp->Render(c);
+                        }
+
+                } else if (m_Modo == MA_Cobb) {
+                        if (m_NodoActual < 3) {
+                                glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
+                                glBegin(GL_LINES);
+                                glVertex2d(m_pAnguloTemp->m_Nodos[0].x, m_pAnguloTemp->m_Nodos[0].y);
+                                glVertex2d(m_pAnguloTemp->m_Nodos[1].x, m_pAnguloTemp->m_Nodos[1].y);
+                                glEnd();
+                        } else {
+                                m_pAnguloTemp->Render(c);
+                        }
+                }
+        }
+
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WAnguloBuilder::GetCursor()
+{
+        if (m_Modo == MA_Normal) {
+                return GNC::GCS::Widgets::CUR_CREAR_ANGULO_NORMAL;
+        } else {
+                return GNC::GCS::Widgets::CUR_CREAR_ANGULO_COBB;
+        }
+}
+
+//endregion
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WAngulo::WAngulo(IWidgetsManager* pManager, long vid, ModoAngulo modo, const char* nombre) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre,0,TID_USER_ANNOTATION_WIDGET), GNC::GCS::Widgets::IWidgetSerializable()
+{
+        m_Modo = modo;
+
+        m_MouseDown = false;
+        m_Oculto = false;
+
+        m_pTextBox = new GNC::GCS::Widgets::WTextBox(m_pManager, m_VID, m_Nodos[1], GNC::GCS::Widgets::WTextBox::TNM_Dynamic, "ruleBox", "");
+        m_pTextBox->SetTexto("0");
+        m_pManager->InsertarWidget(m_pTextBox);
+
+        Recalcular(NULL, false);
+        GNC::GCS::Events::EventoModificacionImagen evt1(m_pManager->GetVista());
+}
+
+GNC::GCS::Widgets::WAngulo::~WAngulo()
+{
+        m_pManager->EliminarWidget(m_pTextBox, false);
+        LanzarEventoDestruccion();
+}
+
+//endregion
+
+//region "Serializado y desserializado"
+GNC::GCS::Widgets::WAngulo::WAngulo(IWidgetsManager* pManager, long vid, wxXmlNode* nodo):GNC::GCS::Widgets::IWidget(pManager, vid, "Ángulo"), GNC::GCS::Widgets::IWidgetSerializable(nodo)
+{
+        if(nodo->GetName() != wxT("angle_widget")) {
+                std::cerr<< "Ha ocurrido un error al desserializar el widget regla"<<std::endl;
+        }
+
+        if(nodo->GetAttribute(wxT("mode"),wxT("normal")) == wxT("normal")) {
+                m_Modo = MA_Normal;
+        } else {
+                m_Modo = MA_Cobb;
+        }
+
+        wxXmlNode *child = nodo->GetChildren();
+        while (child) {
+                if(child->GetName() == wxT("node0")) {
+                        m_Nodos[0] = GNC::GCS::Nodo::Deserializar(child);
+                } else if(child->GetName() == wxT("node1")) {
+                        m_Nodos[1] = GNC::GCS::Nodo::Deserializar(child);
+                } else if(child->GetName() == wxT("node2")) {
+                        m_Nodos[2] = GNC::GCS::Nodo::Deserializar(child);
+                } else if(child->GetName() == wxT("node3")) {
+                        m_Nodos[3] = GNC::GCS::Nodo::Deserializar(child);
+                }
+                child = child->GetNext();
+        }
+
+        m_MouseDown = false;
+
+        m_pTextBox = new GNC::GCS::Widgets::WTextBox(m_pManager, m_VID, m_Nodos[1], GNC::GCS::Widgets::WTextBox::TNM_Dynamic, "ruleBox", "");
+        m_pTextBox->SetTexto("0");
+        m_pManager->InsertarWidget(m_pTextBox);
+
+        Recalcular(NULL, false);
+
+        GNC::GCS::Events::EventoModificacionImagen evt1(m_pManager->GetVista());
+}
+
+void GNC::GCS::Widgets::WAngulo::SetCompleted(bool completed)
+{
+        m_pTextBox->Ocultar(!completed);
+}
+
+wxXmlNode* GNC::GCS::Widgets::WAngulo::Serializar(const std::string& nombreMedico)
+{
+        wxXmlNode* resultado = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxT("angle_widget"));
+        if(m_Modo == MA_Normal) {
+                resultado->AddAttribute(wxT("mode"),wxT("normal"));
+        } else {
+                resultado->AddAttribute(wxT("mode"),wxT("cobb"));
+        }
+        //almacenamos los dos nodos
+        wxXmlNode* nodo = m_Nodos[0].Serializar();
+        nodo->SetName(wxT("node0"));
+        resultado->AddChild(nodo);
+
+        nodo = m_Nodos[1].Serializar();
+        nodo->SetName(wxT("node1"));
+        resultado->AddChild(nodo);
+
+        nodo = m_Nodos[2].Serializar();
+        nodo->SetName(wxT("node2"));
+        resultado->AddChild(nodo);
+
+        nodo = m_Nodos[3].Serializar();
+        nodo->SetName(wxT("node3"));
+        resultado->AddChild(nodo);
+
+        //metadatos
+        SerializarMetadatos(resultado,nombreMedico);
+        return resultado;
+}
+//endregion
+
+void GNC::GCS::Widgets::WAngulo::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (EstaOculto()) {
+                return;
+        }
+        //------------------------------------------------------
+        // Leaving
+        if (evento.Leaving() ) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        else if (evento.Dragging() && m_MouseDown) {
+
+                Vector delta = evento.iP - m_PosCursor;
+                m_PosCursor = evento.iP;
+
+                if (EstaSeleccionado())  {
+                        m_Nodos[0] += delta;
+                        m_Nodos[1] += delta;
+                        m_Nodos[2] += delta;
+                        if (m_Modo == MA_Cobb) {
+                                m_Nodos[3] += delta;
+                        }
+                } else if (m_Nodos[0].EstaIluminado()) {
+                        m_Nodos[0] += delta;
+                } else if (m_Nodos[1].EstaIluminado()) {
+                        m_Nodos[1] += delta;
+                } else if (m_Nodos[2].EstaIluminado()) {
+                        m_Nodos[2] += delta;
+                } else if (m_Modo == MA_Cobb && m_Nodos[3].EstaIluminado()) {
+                        m_Nodos[3] += delta;
+                }
+
+                Recalcular(evento.c->GetRenderer(), false);
+                LanzarEventoModificacion();
+                ConsumirEvento();
+
+                return;
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        SeleccionarNodo(m_Nodos[0], false);
+                        SeleccionarNodo(m_Nodos[1], false);
+                        SeleccionarNodo(m_Nodos[2], false);
+                        SeleccionarNodo(m_Nodos[3], false);
+                        Seleccionar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_PosCursor = evento.iP;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                if (!dentro && m_Nodos[0].Hits(evento.iP, factor) ) {
+                        SeleccionarNodo(m_Nodos[0], true);
+                        Seleccionar(false);
+                        dentro = true;
+                } else {
+                        SeleccionarNodo(m_Nodos[0], false);
+                }
+
+                if (!dentro && m_Nodos[1].Hits(evento.iP, factor) ) {
+                        SeleccionarNodo(m_Nodos[1], true);
+                        Seleccionar(false);
+                        dentro = true;
+                } else {
+                        SeleccionarNodo(m_Nodos[1], false);
+                }
+
+                if (!dentro && m_Nodos[2].Hits(evento.iP, factor) ) {
+                        SeleccionarNodo(m_Nodos[2], true);
+                        Seleccionar(false);
+                        dentro = true;
+                } else {
+                        SeleccionarNodo(m_Nodos[2], false);
+                }
+
+                if (m_Modo == MA_Cobb && !dentro &&  m_Nodos[3].Hits(evento.iP, factor) ) {
+                        SeleccionarNodo(m_Nodos[3], true);
+                        Seleccionar(false);
+                        dentro = true;
+                } else {
+                        SeleccionarNodo(m_Nodos[3], false);
+                }
+
+                if (!dentro) {
+                        if (HitTest(evento.iP.x, evento.iP.y, factor) ) {
+                                if (evento.m_controlDown) { // Inversion de seleccion
+                                        InvertirSeleccion();
+                                } else {
+                                        Seleccionar(true);
+                                }
+                                dentro = true;
+                        } else {
+                                if (!evento.m_controlDown) {
+                                        Seleccionar(false);
+                                } else {
+                                        ConsumirEvento();
+                                        if (EstaSeleccionado()) {
+                                                m_MouseDown = true;
+                                        }
+                                }
+                        }
+                }
+
+                if (dentro) {
+                        m_MouseDown = true;
+                        ConsumirEvento();
+                }
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        ActualizarTimestampModificacion();
+                        m_MouseDown = false;
+                        ConsumirEvento();
+                }
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+                if (EventoConsumido()) {
+                        IluminarNodo(m_Nodos[0], false);
+                        IluminarNodo(m_Nodos[1], false);
+                        IluminarNodo(m_Nodos[2], false);
+                        IluminarNodo(m_Nodos[3], false);
+                        Iluminar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_PosCursor = evento.iP;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                if (!dentro && m_Nodos[0].Hits(evento.iP, factor) ) {
+                        IluminarNodo(m_Nodos[0], true);
+                        Iluminar(false);
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_Nodos[0], false);
+                }
+
+                if (!dentro && m_Nodos[1].Hits(evento.iP, factor) ) {
+                        IluminarNodo(m_Nodos[1], true);
+                        Iluminar(false);
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_Nodos[1], false);
+                }
+
+                if (!dentro && m_Nodos[2].Hits(evento.iP, factor) ) {
+                        IluminarNodo(m_Nodos[2], true);
+                        Iluminar(false);
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_Nodos[2], false);
+                }
+
+                if (m_Modo == MA_Cobb && !dentro &&  m_Nodos[3].Hits(evento.iP, factor) ) {
+                        IluminarNodo(m_Nodos[3], true);
+                        Iluminar(false);
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_Nodos[3], false);
+                }
+
+                if (!dentro) {
+                        if (HitTest(evento.iP.x, evento.iP.y, factor) ) {
+                                Iluminar(true);
+                                dentro = true;
+                        } else {
+                                Iluminar(false);
+                        }
+                }
+
+                if (dentro) {
+                        ConsumirEvento();
+                }
+                return;
+        }
+}
+
+void GNC::GCS::Widgets::WAngulo::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+bool GNC::GCS::Widgets::WAngulo::HitTest(float x, float y, const GNC::GCS::Vector& rel)
+{
+        bool hits = false;
+
+        GNC::GCS::Vector dpos(x,y);
+        const GNC::GCS::Vector::TReal umbralCuadrado = (GNC::GCS::Vector::TReal)m_Nodos[0].m_Size * (GNC::GCS::Vector::TReal)m_Nodos[0].m_Size;
+
+        if (m_Modo == MA_Normal) {
+
+                if ( m_Nodos[0].DistanciaEuclideaCuadrado(m_Nodos[1]) / 4.0f > dpos.DistanciaEuclideaCuadrado(m_Nodos[0].PuntoMedio(m_Nodos[1]))) { // Hit Test Recta 1
+
+                        GNC::GCS::Vector vdir = m_Nodos[1] - m_Nodos[0];
+                        GNC::GCS::Vector orto = (vdir / rel).VectorOrtogonal() * rel;
+
+                        GNC::GCS::Vector inter = GNC::GCS::Vector::InterseccionEntreRectas(dpos, dpos + orto, m_Nodos[0], m_Nodos[1]);
+                        GNC::GCS::Vector diff = (inter - dpos).ValorAbsoluto();
+                        if ((diff / rel).Norma2Cuadrado() < umbralCuadrado) {
+                                hits = true;
+                        }
+                }
+                if (!hits) { // Hit Test Recta 2
+                        if ( m_Nodos[1].DistanciaEuclideaCuadrado(m_Nodos[2]) / 4.0f > dpos.DistanciaEuclideaCuadrado(m_Nodos[1].PuntoMedio(m_Nodos[2]))) { // Recta 1
+
+                                GNC::GCS::Vector vdir = m_Nodos[2] - m_Nodos[1];
+                                GNC::GCS::Vector orto = (vdir / rel).VectorOrtogonal() * rel;
+
+                                GNC::GCS::Vector inter = GNC::GCS::Vector::InterseccionEntreRectas(dpos, dpos + orto, m_Nodos[1], m_Nodos[2]);
+                                GNC::GCS::Vector diff = (inter - dpos).ValorAbsoluto();
+                                if ((diff / rel).Norma2Cuadrado() < umbralCuadrado) {
+                                        hits = true;
+                                }
+                        }
+                }
+        } else {
+                if ( m_Nodos[0].DistanciaEuclideaCuadrado(m_Nodos[1]) / 4.0f > dpos.DistanciaEuclideaCuadrado(m_Nodos[0].PuntoMedio(m_Nodos[1]))) { // Hit Test Recta 1
+
+                        GNC::GCS::Vector vdir = m_Nodos[1] - m_Nodos[0];
+                        GNC::GCS::Vector orto = (vdir / rel).VectorOrtogonal() * rel;
+
+                        GNC::GCS::Vector inter = GNC::GCS::Vector::InterseccionEntreRectas(dpos, dpos + orto, m_Nodos[0], m_Nodos[1]);
+                        GNC::GCS::Vector diff = (inter - dpos).ValorAbsoluto();
+                        if ((diff / rel).Norma2Cuadrado() < umbralCuadrado) {
+                                hits = true;
+                        }
+                }
+                if (!hits) { // Hit Test Recta 2
+                        if ( m_Nodos[2].DistanciaEuclideaCuadrado(m_Nodos[3]) / 4.0f > dpos.DistanciaEuclideaCuadrado(m_Nodos[2].PuntoMedio(m_Nodos[3]))) { // Recta 1
+
+                                GNC::GCS::Vector vdir = m_Nodos[3] - m_Nodos[2];
+                                GNC::GCS::Vector orto = (vdir / rel).VectorOrtogonal() * rel;
+
+                                GNC::GCS::Vector inter = GNC::GCS::Vector::InterseccionEntreRectas(dpos, dpos + orto, m_Nodos[2], m_Nodos[3]);
+                                GNC::GCS::Vector diff = (inter - dpos).ValorAbsoluto();
+                                if ((diff / rel).Norma2Cuadrado() < umbralCuadrado) {
+                                        hits = true;
+                                }
+                        }
+                }
+        }
+
+        return hits;
+}
+
+bool GNC::GCS::Widgets::WAngulo::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+        if (m_Modo == MA_Normal) {
+                return m_Nodos[0].DentroDePoligono2(vertices, numVertices) && m_Nodos[1].DentroDePoligono2(vertices, numVertices) && m_Nodos[2].DentroDePoligono2(vertices, numVertices);
+
+        } else {
+                return m_Nodos[0].DentroDePoligono2(vertices, numVertices) && m_Nodos[1].DentroDePoligono2(vertices, numVertices) && m_Nodos[2].DentroDePoligono2(vertices, numVertices) && m_Nodos[3].DentroDePoligono2(vertices, numVertices);
+        }
+}
+
+void GNC::GCS::Widgets::WAngulo::Render(GNC::GCS::Contexto3D* c)
+{
+        if (m_Oculto) {
+                return;
+        }
+
+        if (m_Modo == MA_Normal)
+                this->RenderNormal(c);
+        else if (m_Modo == MA_Cobb)
+                this->RenderCobb(c);
+}
+
+void GNC::GCS::Widgets::WAngulo::RenderNormal(GNC::GCS::Contexto3D* c)
+{
+        GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+
+        TVector v1 = m_Nodos[0] - m_Nodos[1];
+        TVector v2 = m_Nodos[2] - m_Nodos[1];
+
+        //norma of unscaled vector
+        float n1 = (v1/escala).Norma2();
+        float n2 = (v2/escala).Norma2();
+
+        if (n1 == 0.0f || n2 == 0.0f) {
+                return;
+        }
+
+        // Sombra
+        float fsombrax, fsombray;
+        if (m_Seleccionado && m_MouseDown) {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA_SELECCIONADO * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO * escala.y;
+        } else {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA * escala.y;
+        }
+
+        glLineWidth(m_LineWidthProp);
+
+        // Sombra cuerpo
+        wColorSombra.Aplicar();
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(m_Nodos[0].x + fsombrax, m_Nodos[0].y - fsombray);
+        glVertex2d(m_Nodos[1].x + fsombrax, m_Nodos[1].y - fsombray);
+        glVertex2d(m_Nodos[2].x + fsombrax, m_Nodos[2].y - fsombray);
+        glEnd();
+
+        // Sombra puntas de flecha
+        float anguloPunta = M_PI_4 / 2.0f;
+
+        TVector puntaA0 = m_Nodos[0] + ((v1/escala).RotacionSobreZ(M_PI+anguloPunta).Normalizar() * escala * 15.0f);
+        TVector puntaA1 = m_Nodos[0] + ((v1/escala).RotacionSobreZ(M_PI-anguloPunta).Normalizar() * escala * 15.0f);
+
+        TVector puntaB0 = m_Nodos[2] + ((v2/escala).RotacionSobreZ(M_PI+anguloPunta).Normalizar() * escala * 15.0f);
+        TVector puntaB1 = m_Nodos[2] + ((v2/escala).RotacionSobreZ(M_PI-anguloPunta).Normalizar() * escala * 15.0f);
+
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(puntaA0.x + fsombrax, puntaA0.y - fsombray);
+        glVertex2d(m_Nodos[0].x + fsombrax, m_Nodos[0].y - fsombray);
+        glVertex2d(puntaA1.x + fsombrax, puntaA1.y - fsombray);
+        glEnd();
+
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(puntaB0.x + fsombrax, puntaB0.y - fsombray);
+        glVertex2d(m_Nodos[2].x + fsombrax, m_Nodos[2].y - fsombray);
+        glVertex2d(puntaB1.x + fsombrax, puntaB1.y - fsombray);
+        glEnd();
+
+        // sombra punto origen
+        glBegin(GL_POINTS);
+        glVertex2d(m_Nodos[1].x + fsombrax, m_Nodos[1].y - fsombray);
+        glEnd();
+
+        TMatriz mRot;
+        mRot = TMatriz::MatrizRotacion(m_Angulo/60.0f);
+
+        //we have to un scale and scale to print a circle instead an ellipse
+        TVector va = ((v1/escala).Normalizado() * std::min(n1, n2))*escala * 0.3f;
+        TVector vb = ((v2/escala).Normalizado() * std::min(n1, n2))*escala * 0.3f;
+
+        double normaVa = (va/escala).Norma2();
+
+        TVector puntoTexto;
+
+        // Arco
+        wColorAngulo.Aplicar();
+        glBegin(GL_LINE_STRIP);
+        for (int i = 0; i < 60; ++i) {
+                if ( i == 30) {
+                        puntoTexto = m_Nodos[1] + va;
+                }
+                glVertex2d(m_Nodos[1].x + va.x, m_Nodos[1].y + va.y);
+                va /= escala;
+                //all va vector has the same norma unscaled
+                va = mRot.ProductoMatricial(va).Normalizar() * normaVa;
+                va *= escala;
+        }
+        glVertex2d(m_Nodos[1].x + vb.x, m_Nodos[1].y + vb.y);
+        glEnd();
+
+        // Arco interior
+        va = ((v1/escala).Normalizado() * std::min(n1, n2))*escala * 0.3f;
+        wColorAnguloInterior.Aplicar();
+
+        glBegin(GL_TRIANGLE_FAN);
+        glVertex2d(m_Nodos[1].x, m_Nodos[1].y);
+        for (int i = 0; i < 60; ++i) {
+                glVertex2d(m_Nodos[1].x + va.x, m_Nodos[1].y + va.y);
+                va /= escala;
+                va = mRot.ProductoMatricial(va).Normalizar() * normaVa;
+                va *= escala;
+        }
+        glVertex2d(m_Nodos[1].x + vb.x, m_Nodos[1].y + vb.y);
+        glEnd();
+
+        // Cuerpo
+        wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(m_Nodos[0].x, m_Nodos[0].y);
+        glVertex2d(m_Nodos[1].x, m_Nodos[1].y);
+        glVertex2d(m_Nodos[2].x, m_Nodos[2].y);
+        glEnd();
+
+
+        // Dibujo highlights puntos activos
+        for (int i = 0; i < 4; ++i) {
+                if (m_Nodos[i].m_Iluminado) {
+                        wDibujarElipseDegradado(m_Nodos[i], wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+                }
+        }
+
+        // Nodos
+        if (m_Seleccionado && m_MouseDown)
+                glPointSize(WIDGET_SIZE_PUNTO * WIDGET_INCREMENTO_DETALLE_SELECCIONADO);
+        else
+                glPointSize(WIDGET_SIZE_PUNTO);
+
+
+        // Puntas de flecha
+        wAplicarColor(m_Iluminado || m_Nodos[0].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(puntaA0.x, puntaA0.y);
+        glVertex2d(m_Nodos[0].x, m_Nodos[0].y);
+        glVertex2d(puntaA1.x, puntaA1.y);
+        glEnd();
+
+        wAplicarColor(m_Iluminado || m_Nodos[2].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(puntaB0.x, puntaB0.y);
+        glVertex2d(m_Nodos[2].x, m_Nodos[2].y);
+        glVertex2d(puntaB1.x, puntaB1.y);
+        glEnd();
+
+
+        wAplicarColor(m_Iluminado || m_Nodos[1].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_POINTS);
+        glVertex2d(m_Nodos[1].x, m_Nodos[1].y);
+        glEnd();
+}
+
+void GNC::GCS::Widgets::WAngulo::RenderCobb(GNC::GCS::Contexto3D* c)
+{
+        TVector v1 = m_Nodos[1] - m_Nodos[0];
+        TVector v2 = m_Nodos[3] - m_Nodos[2];
+
+        GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+
+        float n1 = (v1/escala).Norma2();
+        float n2 = (v2/escala).Norma2();
+
+        if (n1 == 0.0f || n2 == 0.0f) {
+                return;
+        }
+
+        // Sombra
+        float fsombrax, fsombray;
+        if (m_Seleccionado && m_MouseDown) {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA_SELECCIONADO * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO * escala.y;
+        } else {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA * escala.y;
+        }
+
+        glLineWidth(m_LineWidthProp);
+
+        // Sombra
+        wColorSombra.Aplicar();
+
+        // Sombra cuerpo
+        glBegin(GL_LINES);
+        glVertex2d(m_Nodos[0].x + fsombrax, m_Nodos[0].y - fsombray);
+        glVertex2d(m_Nodos[1].x + fsombrax, m_Nodos[1].y - fsombray);
+        glVertex2d(m_Nodos[2].x + fsombrax, m_Nodos[2].y - fsombray);
+        glVertex2d(m_Nodos[3].x + fsombrax, m_Nodos[3].y - fsombray);
+        glEnd();
+
+        // Sombra puntos origen 0 y 2
+        wColorSombra.Aplicar();
+        glPointSize(WIDGET_SIZE_PUNTO);
+        glBegin(GL_POINTS);
+        glVertex2d(m_Nodos[0].x + fsombrax, m_Nodos[0].y - fsombray);
+        glVertex2d(m_Nodos[2].x + fsombrax, m_Nodos[2].y - fsombray);
+        glEnd();
+
+
+        // Sombra puntas de flecha
+        float anguloPunta = M_PI_4 / 2.0f;
+
+        TVector puntaA0 = m_Nodos[1] + ((v1/escala).RotacionSobreZ(M_PI+anguloPunta).Normalizar() * escala * 15.0f);
+        TVector puntaA1 = m_Nodos[1] + ((v1/escala).RotacionSobreZ(M_PI-anguloPunta).Normalizar() * escala * 15.0f);
+
+        TVector puntaB0 = m_Nodos[3] + ((v2/escala).RotacionSobreZ(M_PI+anguloPunta).Normalizar() * escala * 15.0f);
+        TVector puntaB1 = m_Nodos[3] + ((v2/escala).RotacionSobreZ(M_PI-anguloPunta).Normalizar() * escala * 15.0f);
+
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(puntaA0.x + fsombrax, puntaA0.y - fsombray);
+        glVertex2d(m_Nodos[1].x + fsombrax, m_Nodos[1].y - fsombray);
+        glVertex2d(puntaA1.x + fsombrax, puntaA1.y - fsombray);
+        glEnd();
+
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(puntaB0.x + fsombrax, puntaB0.y - fsombray);
+        glVertex2d(m_Nodos[3].x + fsombrax, m_Nodos[3].y - fsombray);
+        glVertex2d(puntaB1.x + fsombrax, puntaB1.y - fsombray);
+        glEnd();
+
+        TVector puntoTexto;
+
+        TVector interseccion = TVector::InterseccionEntreRectas(m_Nodos[0], m_Nodos[1], m_Nodos[2], m_Nodos[3]);
+        // Arco
+        {
+                TVector p0 = m_Nodos[0].PuntoMedio(m_Nodos[1]);
+                TVector p1 = m_Nodos[3].PuntoMedio(m_Nodos[2]);
+                puntoTexto = p0.PuntoMedio(p1);
+
+                // Sombra de arco
+                glEnable(GL_LINE_STIPPLE);
+                glLineStipple(3, 0xAAAA);
+                wColorSombra.Aplicar();
+                glBegin(GL_LINES);
+                glVertex2d(p0.x, p0.y);
+                glVertex2d(p1.x, p1.y);
+                glEnd();
+                glDisable(GL_LINE_STIPPLE);
+
+                glEnable(GL_LINE_STIPPLE);
+                glLineStipple(3, 0xAAAA);
+                wColorAngulo.Aplicar();
+                glBegin(GL_LINES);
+                glVertex2d(p0.x, p0.y);
+                glVertex2d(p1.x, p1.y);
+                glEnd();
+                glDisable(GL_LINE_STIPPLE);
+        }
+
+        //arco
+        TMatriz mRot;
+
+        mRot = TMatriz::MatrizRotacion(m_Angulo/60.0f);
+
+
+        float normaMenor = std::min(n1, n2);
+        TVector va;
+
+        if (normaMenor == n1) {
+                va = m_Nodos[0].PuntoMedio(m_Nodos[1]);
+        } else {
+                va = m_Nodos[3].PuntoMedio(m_Nodos[2]);
+        }
+        va -= interseccion;
+
+        // Sombra de arco
+        wColorSombra.Aplicar();
+
+        GNC::GCS::Vector tva = va;
+        double normaVa = (va/escala).Norma2();
+
+        glBegin(GL_LINE_STRIP);
+        for (int i = 0; i < 60; ++i) {
+                glVertex2d(interseccion.x + tva.x + fsombrax, interseccion.y + tva.y + fsombray);
+                tva /= escala;
+                tva = mRot.ProductoMatricial(tva).Normalizar() * normaVa;
+                tva *= escala;
+        }
+        glEnd();
+
+        // Arco
+        wColorAngulo.Aplicar();
+
+        glBegin(GL_LINE_STRIP);
+        for (int i = 0; i <= 60; ++i) {
+                glVertex2d(interseccion.x + va.x, interseccion.y + va.y);
+                va /= escala;
+                va = mRot.ProductoMatricial(va).Normalizar() * normaVa;
+                va *= escala;
+        }
+        glEnd();
+
+
+        // Dibujo highlights puntos activos
+        for (int i = 0; i < 4; ++i) {
+                if (m_Nodos[i].m_Iluminado) {
+                        wDibujarElipseDegradado(m_Nodos[i], wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+                }
+        }
+
+        // Cuerpo
+        wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+
+        glBegin(GL_LINES);
+        glVertex2d(m_Nodos[0].x, m_Nodos[0].y);
+        glVertex2d(m_Nodos[1].x, m_Nodos[1].y);
+        glVertex2d(m_Nodos[2].x, m_Nodos[2].y);
+        glVertex2d(m_Nodos[3].x, m_Nodos[3].y);
+        glEnd();
+
+        // Puntas de flechas
+        wAplicarColor(m_Iluminado || m_Nodos[1].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(puntaA0.x, puntaA0.y);
+        glVertex2d(m_Nodos[1].x, m_Nodos[1].y);
+        glVertex2d(puntaA1.x, puntaA1.y);
+        glEnd();
+
+        wAplicarColor(m_Iluminado || m_Nodos[3].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(puntaB0.x, puntaB0.y);
+        glVertex2d(m_Nodos[3].x, m_Nodos[3].y);
+        glVertex2d(puntaB1.x, puntaB1.y);
+        glEnd();
+
+        // Nodos
+        if (m_Seleccionado && m_MouseDown)
+                glPointSize(WIDGET_SIZE_PUNTO * WIDGET_INCREMENTO_DETALLE_SELECCIONADO);
+        else
+                glPointSize(WIDGET_SIZE_PUNTO);
+
+        wAplicarColor(m_Iluminado || m_Nodos[0].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_POINTS);
+        glVertex2d(m_Nodos[0].x, m_Nodos[0].y);
+        glEnd();
+
+        wAplicarColor(m_Iluminado || m_Nodos[2].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_POINTS);
+        glVertex2d(m_Nodos[2].x, m_Nodos[2].y);
+        glEnd();
+
+        // Interseccion
+        interseccion = TVector::InterseccionEntreRectas(m_Nodos[0], m_Nodos[1], m_Nodos[2], m_Nodos[3]);
+
+        if (m_MouseDown && m_Iluminado)
+                glPointSize(WIDGET_INCREMENTO_DETALLE_SELECCIONADO * WIDGET_SIZE_PUNTO);
+        else
+                glPointSize(WIDGET_SIZE_PUNTO);
+
+        // Sombra
+        wColorSombra.Aplicar();
+        glBegin(GL_POINTS);
+        glVertex2d(interseccion.x + fsombrax, interseccion.y - fsombray);
+        glEnd();
+
+        // Punto
+        wColorAngulo.Aplicar();
+        glBegin(GL_POINTS);
+        glVertex2d(interseccion.x, interseccion.y);
+        glEnd();
+}
+
+void GNC::GCS::Widgets::WAngulo::Recalcular(GNC::GCS::IWidgetsRenderer* renderer, bool building)
+{
+        GNC::GCS::Vector3D worldNodes[4];
+        if (renderer != NULL && renderer->m_pImageViewer != NULL) {
+                const double tindex = renderer->m_pImageViewer->GetTindex();
+                for (int i = 0; i < 4; i++) {
+                        double imagePosition[3] = { m_Nodos[i].x, m_Nodos[i].y, tindex };
+                        renderer->m_pImageViewer->CoordenadasImagenACoordenadasMundo(imagePosition, worldNodes[i].v);
+                }
+        } else {
+                return;
+        }
+
+        m_Modificado = true;
+        //std::cout << *this << std::endl;
+
+        if (m_Modo == MA_Normal) {
+                GNC::GCS::Vector3D w1 = worldNodes[0] - worldNodes[1];
+                GNC::GCS::Vector3D w2 = worldNodes[2] - worldNodes[1];
+
+                GNC::GCS::Vector i1 = m_Nodos[0] - m_Nodos[1];
+                GNC::GCS::Vector i2 = m_Nodos[2] - m_Nodos[1];
+
+                m_Angulo = w1.Angulo(w2);
+                if (i1.ProductoVectorialZ(i2) > 0.0) {
+                        m_Angulo *= -1.0;
+                }
+        } else {
+                GNC::GCS::Vector3D w1 = worldNodes[1] - worldNodes[0];
+                GNC::GCS::Vector3D w2 = worldNodes[3] - worldNodes[2];
+
+                GNC::GCS::Vector i1 = m_Nodos[1] - m_Nodos[0];
+                GNC::GCS::Vector i2 = m_Nodos[3] - m_Nodos[2];
+
+                float n1 = w1.Norma2Cuadrado();
+                float n2 = w2.Norma2Cuadrado();
+
+                if (n1 == 0.0f || n2 == 0.0f) {
+                        return;
+                }
+
+                float normaMenor = std::min(n1, n2);
+
+                if (normaMenor == n1) {
+                        m_Angulo = w1.Angulo(w2);
+                        if (i1.ProductoVectorialZ(i2) > 0.0) {
+                                m_Angulo *= -1.0;
+                        }
+                } else {
+                        m_Angulo = w2.Angulo(w1);
+                        if (i2.ProductoVectorialZ(i1) > 0.0) {
+                                m_Angulo *= -1.0;
+                        }
+                }
+
+                if (m_Angulo > M_PI ) {
+                        m_Angulo = m_Angulo - M_PI;
+                } else if (m_Angulo < -M_PI ) {
+                        m_Angulo = m_Angulo + M_PI;
+                }
+        }
+
+        std::stringstream os;
+        os.setf(ios::floatfield, ios::fixed );
+        os.precision(2);
+        os.fill('0');
+
+        os << (std::abs(m_Angulo) * 180.0 / M_PI)  << " º";
+
+        std::string medida = os.str();
+
+        m_pTextBox->SetTexto(medida);
+        if (building) {
+                if (m_Modo == MA_Normal) {
+                        m_pTextBox->SetPosition(m_Nodos[1]);
+                } else {
+                        m_pTextBox->SetPosition(m_Nodos[1].PuntoMedio(m_Nodos[2]));
+                }
+        }
+}
+
+void GNC::GCS::Widgets::WAngulo::InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades)
+{
+        TMapaPropiedades& primerMapa = listaMapaPropiedades.front();
+        if(m_Modo == GNC::GCS::Widgets::MA_Normal) {
+                primerMapa[_Std("Type")] = _Std("Normal");
+        } else {
+                primerMapa[_Std("Type")] = _Std("Cobb");
+        }
+        {
+                std::stringstream os;
+                os.setf(ios::floatfield, ios::fixed );
+                os.precision(2);
+                os.fill('0');
+
+                os << (std::abs(m_Angulo) * 180.0 / M_PI)  << " º";
+
+                std::string medida = os.str();
+                primerMapa[_Std("Value")] = medida;
+        }
+}
+
+//endregion
+
+void GNC::GCS::Widgets::WAngulo::OffscreenRender(GNC::GCS::Contexto3D* c)
+{
+        const GNC::GCS::Vector& escala = c->RefRelacionMundoPantallaOffscreen();
+        float Angulo;
+
+        if (m_Modo == MA_Normal) {
+                TVector v1 = m_Nodos[0] - m_Nodos[1];
+                TVector v2 = m_Nodos[2] - m_Nodos[1];
+
+                Angulo = v1.Angulo(v2);
+        } else {
+                TVector v1 = m_Nodos[1] - m_Nodos[0];
+                TVector v2 = m_Nodos[3] - m_Nodos[2];
+
+                float n1 = v1.Norma2Cuadrado();
+                float n2 = v2.Norma2Cuadrado();
+
+                if (n1 == 0.0f || n2 == 0.0f) {
+                        return;
+                }
+
+                float normaMenor = std::min(n1, n2);
+
+                if (normaMenor == n1) {
+                        Angulo = v1.Angulo(v2);
+                } else {
+                        Angulo = v2.Angulo(v1);
+                }
+
+                if (Angulo > M_PI ) {
+                        Angulo = Angulo - M_PI;
+                } else if (Angulo < -M_PI ) {
+                        Angulo = Angulo + M_PI;
+                }
+        }
+
+        if (m_Modo == MA_Normal) {
+
+                TVector Nodos[3] = { c->Reproyectar(m_Nodos[0]) * c->factorReescalado, c->Reproyectar(m_Nodos[1]) * c->factorReescalado, c->Reproyectar(m_Nodos[2]) * c->factorReescalado };
+
+                TVector v1 = Nodos[0] - Nodos[1];
+                TVector v2 = Nodos[2] - Nodos[1];
+
+                float n1 = v1.Norma2();
+                float n2 = v2.Norma2();
+
+                if (n1 == 0.0f || n2 == 0.0f) {
+                        return;
+                }
+                cairo_set_line_width(c->cr, m_LineWidthProp);
+
+                float anguloPunta = M_PI_4 / 2.0f;
+                TVector vOrtogonalA = (Nodos[1] - Nodos[0]).VectorOrtonormal() * escala * 15.0f;
+                TVector puntaA0 = Nodos[0] + vOrtogonalA.RotacionSobreZ(M_PI_2 + anguloPunta);
+                TVector puntaA1 = Nodos[0] + vOrtogonalA.RotacionSobreZ(M_PI_2 - anguloPunta);
+
+                TVector vOrtogonalB = (Nodos[1] - Nodos[2]).VectorOrtonormal() * escala * 15.0f;
+                TVector puntaB0 = Nodos[2] + vOrtogonalB.RotacionSobreZ(M_PI_2 + anguloPunta);
+                TVector puntaB1 = Nodos[2] + vOrtogonalB.RotacionSobreZ(M_PI_2 - anguloPunta);
+
+                TMatriz mRot;
+                mRot = TMatriz::MatrizRotacion(Angulo/60.0f);
+
+                TVector va = v1.Normalizado() * std::min(n1, n2) * 0.3f;
+                TVector vb = v2.Normalizado() * std::min(n1, n2) * 0.3f;
+
+                TVector puntoTexto;
+
+                // Arco
+                cairo_set_source_rgba(c->cr, wColorAngulo.r, wColorAngulo.g, wColorAngulo.b, wColorAngulo.a);
+
+                cairo_move_to(c->cr, Nodos[1].x + va.x, Nodos[1].y + va.y);
+                va = mRot.ProductoMatricial(va);
+                for (int i = 1; i < 60; ++i) {
+                        if ( i == 30) {
+                                puntoTexto = Nodos[1] + va;
+                        }
+                        cairo_line_to(c->cr, Nodos[1].x + va.x, Nodos[1].y + va.y);
+                        va = mRot.ProductoMatricial(va);
+                }
+                cairo_line_to(c->cr, Nodos[1].x + vb.x, Nodos[1].y + vb.y);
+                cairo_stroke(c->cr);
+
+                // Arco interior
+                va = v1.Normalizado() * std::min(n1, n2) * 0.3f;
+                cairo_set_source_rgba(c->cr, wColorAnguloInterior.r, wColorAnguloInterior.g, wColorAnguloInterior.b, wColorAnguloInterior.a);
+
+                cairo_move_to(c->cr, Nodos[1].x, Nodos[1].y);
+                cairo_line_to(c->cr, Nodos[1].x + va.x, Nodos[1].y + va.y);
+                for (int i = 0; i < 60; ++i) {
+                        cairo_line_to(c->cr, Nodos[1].x + va.x, Nodos[1].y + va.y);
+                        va = mRot.ProductoMatricial(va);
+                }
+                cairo_line_to(c->cr, Nodos[1].x + vb.x, Nodos[1].y + vb.y);
+                cairo_close_path(c->cr);
+                cairo_fill(c->cr);
+
+                // Cuerpo
+                cairo_set_source_rgba(c->cr, wColorNormal.r, wColorNormal.g, wColorNormal.b, wColorNormal.a);
+
+                cairo_move_to(c->cr, Nodos[0].x, Nodos[0].y);
+                cairo_line_to(c->cr, Nodos[1].x, Nodos[1].y);
+                cairo_line_to(c->cr, Nodos[2].x, Nodos[2].y);
+                cairo_stroke(c->cr);
+
+                // Puntas de flecha
+                cairo_move_to(c->cr, puntaA0.x, puntaA0.y);
+                cairo_line_to(c->cr, Nodos[0].x, Nodos[0].y);
+                cairo_line_to(c->cr, puntaA1.x, puntaA1.y);
+                cairo_stroke(c->cr);
+
+                cairo_move_to(c->cr, puntaB0.x, puntaB0.y);
+                cairo_line_to(c->cr, Nodos[2].x, Nodos[2].y);
+                cairo_line_to(c->cr, puntaB1.x, puntaB1.y);
+                cairo_stroke(c->cr);
+
+                cairo_arc(c->cr, Nodos[1].x, Nodos[1].y, ( (WIDGET_SIZE_PUNTO / 2.0f) * escala.x), 0, M_2PI);
+                cairo_fill(c->cr);
+        } else {
+                TVector Nodos[4] = { c->Reproyectar(m_Nodos[0]) * c->factorReescalado, c->Reproyectar(m_Nodos[1]) * c->factorReescalado, c->Reproyectar(m_Nodos[2]) * c->factorReescalado, c->Reproyectar(m_Nodos[3]) * c->factorReescalado };
+                TVector v1 = Nodos[1] - Nodos[0];
+                TVector v2 = Nodos[3] - Nodos[2];
+
+                float n1 = v1.Norma2Cuadrado();
+                float n2 = v2.Norma2Cuadrado();
+
+                if (n1 == 0.0f || n2 == 0.0f) {
+                        return;
+                }
+
+                cairo_set_line_width(c->cr, m_LineWidthProp);
+
+                float anguloPunta = M_PI_4 / 2.0f;
+                TVector vOrtogonalA = (Nodos[0] - Nodos[1]).VectorOrtonormal() * escala * 15.0f;
+                TVector puntaA0 = Nodos[1] + vOrtogonalA.RotacionSobreZ(M_PI_2 + anguloPunta);
+                TVector puntaA1 = Nodos[1] + vOrtogonalA.RotacionSobreZ(M_PI_2 - anguloPunta);
+
+                TVector vOrtogonalB = (Nodos[2] - Nodos[3]).VectorOrtonormal() * escala * 15.0f;
+                TVector puntaB0 = Nodos[3] + vOrtogonalB.RotacionSobreZ(M_PI_2 + anguloPunta);
+                TVector puntaB1 = Nodos[3] + vOrtogonalB.RotacionSobreZ(M_PI_2 - anguloPunta);
+
+                float normaMenor = std::min(n1, n2);
+                TVector va;
+
+                if (normaMenor == n1) {
+                        va = Nodos[0].PuntoMedio(Nodos[1]);
+                } else {
+                        va = Nodos[3].PuntoMedio(Nodos[2]);
+                }
+
+                TVector interseccion = TVector::InterseccionEntreRectas(Nodos[0], Nodos[1], Nodos[2], Nodos[3]);
+                // Arco
+                {
+                        TVector p0 = Nodos[0].PuntoMedio(Nodos[1]);
+                        TVector p1 = Nodos[3].PuntoMedio(Nodos[2]);
+
+                        wColorAngulo.AplicarCairo(c->cr);
+                        cairo_move_to(c->cr, p0.x, p0.y);
+                        cairo_line_to(c->cr, p1.x, p1.y);
+                        cairo_stroke(c->cr);
+                }
+
+                TMatriz mRot;
+
+                mRot = TMatriz::MatrizRotacion(Angulo/60.0f);
+                va -= interseccion;
+
+                // Arco
+                wColorAngulo.AplicarCairo(c->cr);
+
+                /////////////////////////////
+                cairo_move_to(c->cr, interseccion.x + va.x, interseccion.y + va.y);
+                for (int i = 1; i <= 60; ++i) {
+
+                        va = mRot.ProductoMatricial(va);
+                        cairo_line_to(c->cr, interseccion.x + va.x, interseccion.y + va.y);
+                }
+                cairo_stroke(c->cr);
+
+                // Cuerpo
+                wColorNormal.AplicarCairo(c->cr);
+                cairo_move_to(c->cr, Nodos[0].x, Nodos[0].y);
+                cairo_line_to(c->cr, Nodos[1].x, Nodos[1].y);
+                cairo_stroke(c->cr);
+
+                cairo_move_to(c->cr, Nodos[2].x, Nodos[2].y);
+                cairo_line_to(c->cr, Nodos[3].x, Nodos[3].y);
+                cairo_stroke(c->cr);
+
+                cairo_move_to(c->cr, puntaA0.x, puntaA0.y);
+                cairo_line_to(c->cr, Nodos[1].x, Nodos[1].y);
+                cairo_line_to(c->cr, puntaA1.x, puntaA1.y);
+                cairo_stroke(c->cr);
+
+                cairo_move_to(c->cr, puntaB0.x, puntaB0.y);
+                cairo_line_to(c->cr, Nodos[3].x, Nodos[3].y);
+                cairo_line_to(c->cr, puntaB1.x, puntaB1.y);
+                cairo_stroke(c->cr);
+
+                cairo_arc(c->cr, Nodos[0].x, Nodos[0].y,  (WIDGET_SIZE_PUNTO / 2.0f) * escala.x, 0, M_2PI);
+                cairo_fill(c->cr);
+
+                cairo_arc(c->cr, Nodos[2].x, Nodos[2].y,  (WIDGET_SIZE_PUNTO / 2.0f) * escala.x, 0, M_2PI);
+                cairo_fill(c->cr);
+
+                // Interseccion
+                interseccion = TVector::InterseccionEntreRectas(Nodos[0], Nodos[1], Nodos[2], Nodos[3]);
+                cairo_arc(c->cr, interseccion.x, interseccion.y,  (WIDGET_SIZE_PUNTO / 2.0f) * escala.x, 0, M_2PI);
+                cairo_fill(c->cr);
+
+                // Punto
+                wColorAngulo.AplicarCairo(c->cr);
+                cairo_arc(c->cr, interseccion.x, interseccion.y,  (WIDGET_SIZE_PUNTO / 2.0f) * escala.x, 0, M_2PI);
+                cairo_fill(c->cr);
+        }
+}
diff --git a/cadxcore/widgets/wangulo.h b/cadxcore/widgets/wangulo.h
new file mode 100644
index 0000000..c3ca744
--- /dev/null
+++ b/cadxcore/widgets/wangulo.h
@@ -0,0 +1,158 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/widgetserializable.h>
+#include <widgets/openglhelper.h>
+#include <api/westilo.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+class WAngulo;
+class WTextBox;
+
+typedef enum ModoAngulo {
+        MA_Normal,
+        MA_Cobb
+} ModoAngulo;
+
+class WAnguloBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Nodo   TNodo;
+        typedef GNC::GCS::Matriz TMatriz;
+
+        WAnguloBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask);
+
+        ~WAnguloBuilder();
+
+        void SetModo(ModoAngulo modo);
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+protected:
+        TVector          m_Start;
+        bool             m_Changed;
+        Estado           m_Estado;
+        ModoAngulo       m_Modo;
+        int              m_NodoActual;
+
+        WAngulo*         m_pAnguloTemp;
+
+};
+
+class WAngulo : public GNC::GCS::Widgets::IWidget, public GNC::GCS::Widgets::IWidgetSerializable
+{
+
+public:
+        GNC::GCS::Nodo m_Nodos[4];
+
+        //region "Constructor y destructor"
+
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Matriz TMatriz;
+
+        WAngulo(IWidgetsManager* pManager, long vid, ModoAngulo modo, const char* nombre = "");
+
+        ~WAngulo();
+
+        //endregion
+
+        //region "Serializado y desserializado"
+        WAngulo(IWidgetsManager* pManager, long vid, wxXmlNode* nodo);
+
+        void SetCompleted(bool completed);
+
+        wxXmlNode* Serializar(const std::string& nombreMedico);
+        //endregion
+
+        //region "Interfaz especifica"
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return true;
+        }
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void OffscreenRender(Contexto3D* c);
+
+        void RenderNormal(GNC::GCS::Contexto3D* c);
+        void RenderCobb(GNC::GCS::Contexto3D* c);
+
+        //endregion
+
+        //region "Estado interno"
+private:
+        bool            m_MouseDown;
+        //endregion
+
+        //region "Propiedades geometricas"
+private:
+        ModoAngulo         m_Modo;
+        float              m_Angulo;
+
+        WTextBox*          m_pTextBox;
+
+        friend std::ostream& operator<<(std::ostream& out, const WAngulo& w)
+        {
+                out << "[ P0=" << w.m_Nodos[0] << ", P1=" << w.m_Nodos[1] <<
+                    ", Angulo=" << w.m_Angulo << "=" << w.m_Angulo*180.0f/M_PI <<
+                    ", CursorPoint=" << w.m_PosCursor << " ]";
+                return out;
+        }
+
+public:
+
+        void Recalcular(GNC::GCS::IWidgetsRenderer* renderer, bool building);
+
+public:
+        //endregion
+
+        //endregion
+        virtual void InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades);
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wanotacionesquina.cpp b/cadxcore/widgets/wanotacionesquina.cpp
new file mode 100644
index 0000000..7fe3167
--- /dev/null
+++ b/cadxcore/widgets/wanotacionesquina.cpp
@@ -0,0 +1,1279 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <algorithm>
+#include <sstream>
+#include <cmath>
+#include <cstring>
+#include <cairo/cairo.h>
+
+//#define _GINKGO_TRACE
+#include <api/globals.h>
+#include <api/helpers/helpertexto.h>
+#include <api/iwidgetsmanager.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/ievento.h>
+#include <api/icontexto.h>
+#include <api/math/geometry3d.h>
+#include <api/westilo.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/iannotator.h>
+
+#include <eventos/modificacionimagen.h>
+
+#include <main/entorno.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/controllers/modalitysettingscontroller.h>
+#include <api/controllers/icontroladorpermisos.h>
+
+#include "wanotacionesquina.h"
+
+#include <vtkgl.h>
+#include <vtkImageData.h>
+#include <vtkImageActor.h>
+#include <vtkPointData.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include "striptexthelper.h"
+
+namespace GNC
+{
+const char* PatientPositionOrientation[10*3*3] = {
+        "",  "",  "",    "", "",  "",    "", "",  "", // N/A
+        "R", "", "L",   "A", "", "P",   "I", "", "S", // HFS
+        "L", "", "R",   "P", "", "A",   "I", "", "S", // HFP
+        "A", "", "P",   "L", "", "R",   "I", "", "S", // HFDR
+        "P", "", "A",   "R", "", "L",   "I", "", "S", // HFDL
+        "P", "", "A",   "L", "", "R",   "S", "", "I", // FFDR
+        "A", "", "P",   "R", "", "L",   "S", "", "I", // FFDL
+        "L", "", "R",   "A", "", "P",   "S", "", "I", // FFS
+        "R", "", "L",   "P", "", "A",   "S", "", "I", // FFP
+        "?", "", "?",   "?", "", "?",   "?", "", "?", // Unknown
+};
+}
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+//----------------------------------------------------------------------------------------------------
+class OrientationMarks
+{
+public:
+        typedef enum TOrientationPosition {
+                TP_Top,
+                TP_Right,
+                TP_Bottom,
+                TP_Left,
+                TP_NumPosiciones
+        } TPosicionAnotacion;
+        OrientationMarks()
+        {
+                m_FontSizeProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "cornerAnnotation.fontSize").ObtenerValor<float>();
+                m_StripTextRenderer.Update("RLAPISHF", GNC::GCS::GLHelper::TColor(ANNOTATOR_TEXT_COLOR), m_FontSizeProp, ANNOTATION_TEXT_WITH_SHADOW);
+        }
+
+        ~OrientationMarks()
+        {
+        }
+
+        bool SetAnotation(TOrientationPosition index, const std::string& str)
+        {
+                if (m_TextoAnotacion[index] != str) {
+                        m_TextoAnotacion[index] = str;
+                        return true;
+                } else {
+                        return false;
+                }
+        }
+
+
+        void Render(GNC::GCS::Contexto3D* /*c*/, GNC::GCS::Vector m_RectViewport[2])
+        {
+                GNC::GCS::Vector pos;
+                //
+                pos = GNC::GCS::Vector( (0.5 * m_RectViewport[1].x), 2.0).Redondeado();
+                m_StripTextRenderer.Render(m_TextoAnotacion[OrientationMarks::TP_Top], pos, true);
+
+                pos = GNC::GCS::Vector(10.0, (0.5 * m_RectViewport[1].y)).Redondeado();
+                m_StripTextRenderer.Render(m_TextoAnotacion[OrientationMarks::TP_Left], pos, true);
+
+                pos = GNC::GCS::Vector((0.5 * m_RectViewport[1].x), m_RectViewport[1].y - m_StripTextRenderer.GetTextHeigh() - 10.0 ).Redondeado();
+                m_StripTextRenderer.Render(m_TextoAnotacion[OrientationMarks::TP_Bottom], pos, true);
+
+                pos = GNC::GCS::Vector( m_RectViewport[1].x - 4.0,  (0.5 * m_RectViewport[1].y) ).Redondeado();
+                m_StripTextRenderer.Render(m_TextoAnotacion[OrientationMarks::TP_Right], pos, false);
+                //
+        }
+        void LiberarRecursos()
+        {
+                m_StripTextRenderer.Destroy();
+        }
+
+        std::string m_TextoAnotacion[4];
+        GNC::GCS::Widgets::StripTextRenderer m_StripTextRenderer;
+        float m_FontSizeProp;
+};
+
+/**
+annotationn items
+*/
+class AnnotationItem
+{
+public:
+        AnnotationItem(): isModified(true), value("")
+        {
+        }
+
+        AnnotationItem(const std::string& value): isModified(true)
+        {
+                this->value = value;
+        }
+
+        AnnotationItem(const AnnotationItem& other)
+        {
+                (*this) = other;
+        }
+
+        AnnotationItem& operator = (const AnnotationItem& o)
+        {
+                this->isModified = o.isModified;
+                this->value = o.value;
+                return *this;
+        }
+
+        void setValue(const std::string& value)
+        {
+                if (value != this->value) {
+                        isModified = true;
+                }
+        }
+
+protected:
+        bool isModified;
+        std::string value;
+
+};
+
+class Anotaciones
+{
+public:
+        typedef std::map<std::string, AnnotationItem> TAnnotationItemDictionary;
+
+        Anotaciones(GNC::GCS::IWidgetsRenderer* pRenderer)
+        {
+                m_Correcta            = false;
+                m_TamFuente           = 10; // GW: guessed value, will probably be overwritten before use
+                m_RecalcularTamOptimo = false;
+                m_pRenderer           = pRenderer;
+                m_Modificada          = false;
+                for (int i = 0; i < GNC::GCS::AnnotationSettings::TP_NumPos; i++) {
+                        m_TexturaModificada[i] = false;
+                }
+
+                m_FontSizeProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "cornerAnnotation.fontSize").ObtenerValor<float>();
+
+                m_Alineacion[GNC::GCS::AnnotationSettings::TP_TopLeft] = GNC::GCS::Widgets::HelperTexto::TA_Izquierda;
+                m_Alineacion[GNC::GCS::AnnotationSettings::TP_TopRight] = GNC::GCS::Widgets::HelperTexto::TA_Derecha;
+                m_Alineacion[GNC::GCS::AnnotationSettings::TP_BottomLeft] = GNC::GCS::Widgets::HelperTexto::TA_Izquierda;
+                m_Alineacion[GNC::GCS::AnnotationSettings::TP_BottomRight] = GNC::GCS::Widgets::HelperTexto::TA_Derecha;
+
+                m_pFontOptions = cairo_font_options_create();
+                m_TexturaMetrica.Redimensionar(2, 2);
+                cairo_get_font_options(m_TexturaMetrica.cr, m_pFontOptions);
+                cairo_font_options_set_antialias (m_pFontOptions, CAIRO_ANTIALIAS_NONE);
+                cairo_set_font_options(m_TexturaMetrica.cr, m_pFontOptions);
+        }
+
+        ~Anotaciones()
+        {
+                cairo_font_options_destroy(m_pFontOptions);
+                m_pFontOptions = NULL;
+                //std::cout << "Destruyendo recursos de " << m_pRenderer << std::endl;
+        }
+
+        void Recalculate(GNC::GCS::Contexto3D* c, const GNC::GCS::Ptr<GNC::GCS::IAnnotator>& pAnnotator)
+        {
+                if (!pAnnotator.IsValid()) {
+                        m_Correcta = false;
+                        return;
+                }
+                //firstly get modality to get the pattern...
+                const std::string modality = pAnnotator->GetTagValue(c, GKDCM_Modality);
+
+                GNC::GCS::Ptr<GNC::GCS::DefaultModalitySettings> pModalitySettings = GNC::GCS::ModalitySettingsController::Instance()->getModalitySettings(modality);
+                if (!pModalitySettings.IsValid()) {
+                        pModalitySettings = GNC::GCS::ModalitySettingsController::Instance()->getModalitySettings("OT");
+                        if (!pModalitySettings.IsValid()) {
+                                LOG_WARN("WCornerAnnotations", "settings for default modality OT not found");
+                                m_Correcta = false;
+                                return;
+                        }
+                }
+
+                const GNC::GCS::Ptr<GNC::GCS::AnnotationSettings>& pAnnotationSettings = pModalitySettings->getAnnotationSettings();
+
+                for (int i = 0; i < GNC::GCS::AnnotationSettings::TP_NumPos; ++i) {
+                        //recalculate annotation
+                        SetAnotation((GNC::GCS::AnnotationSettings::TAnnotationPosition)i, pAnnotationSettings->getAnnotation((GNC::GCS::AnnotationSettings::TAnnotationPosition)i), c, pAnnotator);
+                }
+
+                m_Correcta = true;
+        }
+
+
+        void Redimensionar(double* viewport)
+        {
+                bool redimensionado = false;
+                if (m_RectViewport[0].x != viewport[0]) {
+                        m_RectViewport[0].x = viewport[0];
+                        redimensionado = true;
+                }
+                if (m_RectViewport[0].y != viewport[1]) {
+                        m_RectViewport[0].y = viewport[1];
+                        redimensionado = true;
+                }
+                if (m_RectViewport[1].x != viewport[2]) {
+                        m_RectViewport[1].x = viewport[2];
+                        redimensionado = true;
+                }
+                if (m_RectViewport[1].y != viewport[3]) {
+                        m_RectViewport[1].y = viewport[3];
+                        redimensionado = true;
+                }
+                if (redimensionado) {
+                        m_TamViewPort = (m_RectViewport[1] - m_RectViewport[0]).ValorAbsoluto() * PROPVIEWPORT;
+                        m_RecalcularTamOptimo = true;
+                }
+        }
+
+public:
+
+        void ModificarTextura(int i, bool modificada)
+        {
+                m_TexturaModificada[i] = modificada;
+                if (modificada) {
+                        Modificar(true);
+                        m_RecalcularTamOptimo = true;
+                }
+
+        }
+
+        void Modificar(bool modificada)
+        {
+                m_Modificada = modificada;
+                if (m_Modificada) {
+                        m_pRenderer->Modificar(true);
+                }
+        }
+
+        bool EstaModificada()
+        {
+                return m_Modificada;
+        }
+
+        bool SetAnotation(GNC::GCS::AnnotationSettings::TAnnotationPosition index, const std::string& str, GNC::GCS::Contexto3D* c, const GNC::GCS::Ptr<GNC::GCS::IAnnotator>& pAnnotator)
+        {
+                //parse annotation...
+                std::ostringstream annotationStream;
+                unsigned initialPos = 0;
+                int defValuePos,formatPos = 0;
+                std::ostringstream::pos_type lastEndl = 0;
+                std::string tmp;
+                for (unsigned curPos = 0; curPos < str.length(); ++curPos) {
+                        if (str[curPos] == '$') {
+                                //copy from initial position...
+                                annotationStream << str.substr(initialPos, curPos - initialPos);
+                                initialPos = curPos;
+                                if (curPos + 1 < str.length() && str[curPos+1] == '{') {
+                                        //search for '}'
+                                        defValuePos = -1;
+                                        formatPos = -1;
+                                        bool isTag = false;
+                                        for (; curPos < str.length(); ++curPos) {
+                                                if (str[curPos] == '}') {
+                                                        //key found...
+                                                        if (pAnnotator.IsValid()) {
+                                                                if (isTag) {
+                                                                        if (defValuePos > 0) {
+                                                                                if (formatPos > 0) {
+                                                                                        std::string lowerTag = str.substr(initialPos + 2, defValuePos - initialPos - 3);
+                                                                                        std::transform(lowerTag.begin(), lowerTag.end(), lowerTag.begin(), ::tolower);
+                                                                                        annotationStream << pAnnotator->GetTagValue(c, lowerTag, str.substr(defValuePos, formatPos - defValuePos), str.substr(formatPos, curPos - formatPos));
+                                                                                } else {
+                                                                                        std::string lowerTag = str.substr(initialPos + 2, defValuePos - initialPos - 3);
+                                                                                        std::transform(lowerTag.begin(), lowerTag.end(), lowerTag.begin(), ::tolower);
+                                                                                        annotationStream << pAnnotator->GetTagValue(c, lowerTag, str.substr(defValuePos, curPos - defValuePos));
+                                                                                }
+                                                                        } else {
+                                                                                std::string lowerTag = str.substr(initialPos + 2, curPos - initialPos -2);
+                                                                                std::transform(lowerTag.begin(), lowerTag.end(), lowerTag.begin(), ::tolower);
+                                                                                annotationStream << pAnnotator->GetTagValue(c, lowerTag);
+                                                                        }
+                                                                } else {
+                                                                        tmp = pAnnotator->GetAnnotationValue(c, str.substr(initialPos, curPos - initialPos + 1));
+                                                                        if (tmp == "\n") {
+                                                                                if (annotationStream.tellp() != lastEndl) {
+                                                                                        annotationStream << tmp;
+                                                                                        lastEndl = annotationStream.tellp();
+                                                                                }
+                                                                        } else {
+                                                                                annotationStream << tmp;
+                                                                        }
+                                                                }
+                                                        } else {
+                                                                //if no anotator..
+                                                                //copy from initial position...
+                                                                annotationStream << str.substr(initialPos, curPos - initialPos + 1);
+                                                        }
+                                                        break;
+                                                } else if (str[curPos] == ':') {
+                                                        //this could be defvalue or format
+                                                        if (defValuePos > 0) {
+                                                                formatPos = curPos + 1;
+                                                        } else {
+                                                                defValuePos = curPos + 1;
+                                                        }
+                                                } else if (str[curPos] == '|') {
+                                                        isTag = true;
+                                                }
+                                        }
+                                        initialPos = curPos + 1;
+                                }
+                        }
+                }
+                if (initialPos < str.length()) {
+                        annotationStream << str.substr(initialPos, str.length() - initialPos);
+                }
+
+                std::string ann = annotationStream.str();
+
+                if (m_TextoAnotacion[index] != ann) {
+                        m_TextoAnotacion[index] = ann;
+                        ModificarTextura(index, true);
+                        return true;
+                } else {
+                        return false;
+                }
+        }
+
+        void RecalcularTamOptimo()
+        {
+                if (m_RecalcularTamOptimo) {
+                        m_RecalcularTamOptimo = false;
+                        m_TamCajaMaxima = m_TamViewPort;
+                        m_TamFuente = m_FontSizeProp;
+                        for (int i = 0; i < GNC::GCS::AnnotationSettings::TP_NumPos; ++i) {
+                                m_TamTexto[i].Asignar(0.0f, 0.0f);
+                                if (m_TextoAnotacion[i].size() > 0) {
+                                        cairo_select_font_face(m_TexturaMetrica.cr, WIDGETS_TEXT_FONT_FAMILY, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
+                                        cairo_set_font_size(m_TexturaMetrica.cr, m_FontSizeProp);
+                                        m_TamTexto[i] = GNC::GCS::GLHelper::calcularBoundingBox(m_TexturaMetrica, m_TextoAnotacion[i], ANNOTATION_TEXT_WITH_SHADOW, -1.0f);
+                                        m_TamCajaMaxima.AsignarMaximos(m_TamTexto[i]);
+                                }
+                        }
+                        if (!m_TamCajaMaxima.EsNulo()) {
+                                m_TamFuente = ((m_TamViewPort * m_FontSizeProp) / m_TamCajaMaxima).Redondear().ComponenteMinima(); // Calculo del tamanyo de fuente maxima
+                                m_TamFuente = std::max(TAMFUENTE_MIN, m_TamFuente);
+
+                                for (int i = 0; i < GNC::GCS::AnnotationSettings::TP_NumPos; ++i) {
+                                        m_TamTexto[i] *=  (m_TamFuente / m_FontSizeProp);
+                                        m_TamTexto[i].RedondearAlza();
+                                        m_Texturas[i].Redimensionar(m_TamTexto[i].x, m_TamTexto[i].y);
+                                        m_TexturaModificada[i] = true;
+                                }
+                        } else {
+                                for (int i = 0; i < GNC::GCS::AnnotationSettings::TP_NumPos; ++i) {
+                                        m_TamTexto[i].RedondearAlza();
+                                        m_Texturas[i].Redimensionar(m_TamTexto[i].x, m_TamTexto[i].y);
+                                        m_TexturaModificada[i] = true;
+                                }
+                        }
+                }
+        }
+
+        void Actualizar(const GNC::GCS::GLHelper::TColor& color)
+        {
+                RecalcularTamOptimo();
+
+                for (int i = 0; i < GNC::GCS::AnnotationSettings::TP_NumPos; ++i) {
+                        const std::string& texto = m_TextoAnotacion[i];
+
+                        if ( m_TexturaModificada[i] && m_Texturas[i].EsValida() && (m_TextoAnotacion[i].size() > 0) ) {
+                                cairo_select_font_face(m_Texturas[i].cr, WIDGETS_TEXT_FONT_FAMILY, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
+                                cairo_set_font_size(m_Texturas[i].cr, m_TamFuente);
+
+                                cairo_get_font_options(m_Texturas[i].cr, m_pFontOptions);
+                                cairo_font_options_set_antialias (m_pFontOptions, CAIRO_ANTIALIAS_NONE);
+                                cairo_set_font_options(m_Texturas[i].cr, m_pFontOptions);
+                                cairo_set_operator(m_Texturas[i].cr, CAIRO_OPERATOR_SOURCE);
+
+                                cairo_set_source_rgba (m_Texturas[i].cr, 1.0f, 1.0f, 0.0f, 0.0f);
+                                cairo_paint(m_Texturas[i].cr);
+                                m_TamTexto[i] = GNC::GCS::GLHelper::dibujarTexto(m_Texturas[i], texto, color, ANNOTATION_TEXT_WITH_SHADOW, m_TamCajaMaxima.x, m_Alineacion[i]);
+                                m_TexturaModificada[i] = false;
+                        }
+                }
+        }
+
+        void Render(GNC::GCS::Contexto3D* c)
+        {
+                GTRACE("Anotaciones::Render(" << c->GetRenderer() << ")");
+                GNC::GCS::Vector pos;
+
+                pos = GNC::GCS::Vector(0.0, 0.0).Redondeado();
+                m_Texturas[GNC::GCS::AnnotationSettings::TP_TopLeft].Actualizar();
+                m_Texturas[GNC::GCS::AnnotationSettings::TP_TopLeft].Render(c, pos, false, false, 0);
+
+                pos = GNC::GCS::Vector(m_RectViewport[1].x - m_TamTexto[GNC::GCS::AnnotationSettings::TP_TopRight].x, 0.0).Redondeado();
+                m_Texturas[GNC::GCS::AnnotationSettings::TP_TopRight].Actualizar();
+                m_Texturas[GNC::GCS::AnnotationSettings::TP_TopRight].Render(c, pos, false, false, 0);
+
+                pos = GNC::GCS::Vector(0.0, m_RectViewport[1].y - m_TamTexto[GNC::GCS::AnnotationSettings::TP_BottomLeft].y).Redondeado();
+                m_Texturas[GNC::GCS::AnnotationSettings::TP_BottomLeft].Actualizar();
+                m_Texturas[GNC::GCS::AnnotationSettings::TP_BottomLeft].Render(c, pos, false, false, 0);
+
+                pos = GNC::GCS::Vector(m_RectViewport[1].x - m_TamTexto[GNC::GCS::AnnotationSettings::TP_BottomRight].x, m_RectViewport[1].y - m_TamTexto[GNC::GCS::AnnotationSettings::TP_BottomRight].y).Redondeado();
+                m_Texturas[GNC::GCS::AnnotationSettings::TP_BottomRight].Actualizar();
+                m_Texturas[GNC::GCS::AnnotationSettings::TP_BottomRight].Render(c, pos, false, false, 0);
+
+                Modificar(false);
+        }
+
+        void LiberarRecursos()
+        {
+                for (int i = 0; i < GNC::GCS::AnnotationSettings::TP_NumPos; i++) {
+                        m_Texturas[i].Destruir();
+                }
+        }
+
+        GNC::GCS::Vector m_RectViewport[2];
+        GNC::GCS::Vector m_TamViewPort;
+
+        GNC::GCS::Vector m_TamCajaMaxima;
+
+        GNC::GCS::TexturaCairo m_TexturaMetrica; // Contexto usado solamente para medir.
+
+        bool m_TexturaModificada[GNC::GCS::AnnotationSettings::TP_NumPos];
+
+        std::string m_TextoAnotacion[GNC::GCS::AnnotationSettings::TP_NumPos];
+
+        GNC::GCS::Vector m_TamTexto[GNC::GCS::AnnotationSettings::TP_NumPos];
+
+        GNC::GCS::TexturaCairo m_Texturas[GNC::GCS::AnnotationSettings::TP_NumPos];
+
+        bool m_RecalcularTamOptimo;
+
+        cairo_font_options_t* m_pFontOptions;
+
+        bool m_Correcta;
+        float m_TamFuente;
+        float m_FontSizeProp;
+
+        GNC::GCS::Widgets::HelperTexto::TAlineamiento m_Alineacion[GNC::GCS::AnnotationSettings::TP_NumPos];
+
+        GNC::GCS::IWidgetsRenderer* m_pRenderer;
+        TAnnotationItemDictionary m_annotationDicionary;
+        bool m_Modificada;
+
+};
+
+//----------------------------------------------------------------------------------------------------
+//region "Textura de anotacion"
+class EstadoInterno
+{
+public:
+        typedef std::map<GNC::GCS::IWidgetsRenderer*,Anotaciones*> MapaAnotaciones;
+        typedef std::map<GNC::GCS::IWidgetsRenderer*,OrientationMarks*> OrientationMap;
+
+        MapaAnotaciones       m_Anotaciones;
+        OrientationMap		  m_Orientations;
+
+        inline OrientationMarks* GetOrientation(GNC::GCS::IWidgetsRenderer* key)
+        {
+                OrientationMarks* res = NULL;
+
+                OrientationMap::iterator it = m_Orientations.find(key);
+                if(it != m_Orientations.end()) {
+                        res = (*it).second;
+                } else {
+                        m_Orientations[key] = res = new OrientationMarks();
+                }
+
+                return res;
+        }
+
+        inline Anotaciones* Get(GNC::GCS::IWidgetsRenderer* key)
+        {
+                Anotaciones* res = NULL;
+
+                MapaAnotaciones::iterator it = m_Anotaciones.find(key);
+                if(it != m_Anotaciones.end()) {
+                        res = (*it).second;
+                } else {
+                        m_Anotaciones[key] = res = new Anotaciones(key);
+                }
+
+                return res;
+        }
+
+        inline void Delete(GNC::GCS::IWidgetsRenderer* key)
+        {
+                {
+                        MapaAnotaciones::iterator it = m_Anotaciones.find(key);
+                        if(it != m_Anotaciones.end()) {
+                                (*it).second->LiberarRecursos();
+                                delete (*it).second;
+                                m_Anotaciones.erase(it);
+                        }
+                }
+                {
+                        OrientationMap::iterator it = m_Orientations.find(key);
+                        if(it != m_Orientations.end()) {
+                                (*it).second->LiberarRecursos();
+                                delete (*it).second;
+                                m_Orientations.erase(it);
+                        }
+                }
+        }
+
+};
+
+/**
+* Gets the orientation index given string. Default is zero.
+* strPos: The patient position string (HFS, HFP...)
+* defautlunknown: When orientation index is empty, set the default index to unknown ("?") or empty ("") values
+**/
+int GetPatientPositionOrientationIndex(const std::string& strPos, bool defaultunknown)
+{
+
+        if (strcmp(strPos.c_str(), "HFS") == 0) {
+                return 1;
+        } else if (strcmp(strPos.c_str(), "HFP") == 0) {
+                return 2;
+        } else if (strcmp(strPos.c_str(), "HFDR") == 0) {
+                return 3;
+        } else if (strcmp(strPos.c_str(), "HFDL") == 0) {
+                return 4;
+        } else if (strcmp(strPos.c_str(), "FFDR") == 0) {
+                return 5;
+        } else if (strcmp(strPos.c_str(), "FFDL") == 0) {
+                return 6;
+        } else if (strcmp(strPos.c_str(), "FFS") == 0) {
+                return 7;
+        } else if(strcmp(strPos.c_str(), "FFP") == 0) {
+                return 8;
+        }
+        if (defaultunknown) {
+                return 9;
+        } else {
+                return 0;
+        }
+}
+
+/**
+* Gets the patient orientation char ("R", "L", "S"...) from:
+* patientPosIndex: The patient position index: get if from GetPatientPositionOrientationIndex() call.
+* axis: The axis: 0==x, 1==y, 2==z
+* dir: The direction: -1 == decreasing, +1 == decreasing
+**/
+const char* GetPatientPositionOrientationChar(int patientPosIndex, int axis, int dir)
+{
+        const int offPos = 9 * patientPosIndex;
+        const int offAxis = 3 * axis;
+        const int offDir = 1 + dir;
+
+        return PatientPositionOrientation[offPos + offAxis + offDir];
+}
+}
+}
+}
+
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WAnotador::WAnotador(IWidgetsManager* pManager, long vid, const char* nombre, long gid) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid)
+{
+        GNC::GCS::ConfigurationController::Instance()->readBoolUser("/GinkgoCore/Tools/CornerAnotations", "IsShown", m_Oculto, true);
+        m_TopLevel = true;
+        m_ReservaRecursos = true;
+        m_Estado = new EstadoInterno();
+        m_color = GNC::GCS::GLHelper::TColor(ANNOTATOR_TEXT_COLOR);
+}
+
+GNC::GCS::Widgets::WAnotador::~WAnotador()
+{
+        delete m_Estado;
+}
+
+//endregion
+
+void GNC::GCS::Widgets::WAnotador::LiberarRecursos(GNC::GCS::IWidgetsRenderer* renderer)
+{
+        m_Estado->Delete(renderer);
+}
+
+
+//region "Interfaz generica"
+
+void GNC::GCS::Widgets::WAnotador::OnMouseEvents(GNC::GCS::Events::EventoRaton& /*evento*/)
+{
+
+}
+
+void GNC::GCS::Widgets::WAnotador::OnKeyEvents(GNC::GCS::Events::EventoTeclado& /*evento*/)
+{
+}
+
+bool GNC::GCS::Widgets::WAnotador::HitTest(float , float , const GNC::GCS::Vector&)
+{
+        return false;
+}
+
+bool GNC::GCS::Widgets::WAnotador::HitTest(GNC::GCS::Vector* , int )
+{
+        return false;
+}
+
+void GNC::GCS::Widgets::WAnotador::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        double viewport[4] = {0.0f, 0.0f, 0.0f, 0.0f}; // { x, y, ancho, alto }. Convenio de coordenadas: {x, y} == {bottom, left}, {ancho, alto} == {top, right}
+        glGetDoublev(GL_VIEWPORT, viewport);
+
+        glPushAttrib(GL_ALL_ATTRIB_BITS);
+
+        glMatrixMode(GL_TEXTURE);
+        glPushMatrix();
+        glLoadIdentity();
+
+        glMatrixMode(GL_PROJECTION);
+        glPushMatrix();
+        glLoadIdentity();
+        glOrtho( 0, viewport[2] , viewport[3] , 0, -1, 1 );
+
+        glMatrixMode(GL_MODELVIEW);
+        glPushMatrix();
+        glLoadIdentity();
+
+        Anotaciones* pAnotaciones = m_Estado->Get(c->GetRenderer());
+        OrientationMarks* pOrientation = m_Estado->GetOrientation(c->GetRenderer());
+
+
+        pAnotaciones->Redimensionar(viewport);
+
+        pAnotaciones->Recalculate(c, m_pManager->GetAnnotator());
+
+        RecalcularPosicion(pOrientation, c);
+
+
+        pAnotaciones->Actualizar(m_color);
+
+        pAnotaciones->Render(c);
+        pOrientation->Render(c, pAnotaciones->m_RectViewport);
+
+
+        glPopMatrix();
+
+        glMatrixMode(GL_PROJECTION);
+        glPopMatrix();
+
+        glMatrixMode(GL_TEXTURE);
+        glPopMatrix();
+
+        glMatrixMode(GL_MODELVIEW);
+
+        glPopAttrib();
+}
+
+void GNC::GCS::Widgets::WAnotador::Seleccionar(bool )
+{
+}
+
+void GNC::GCS::Widgets::WAnotador::Iluminar(bool )
+{
+}
+
+void GNC::GCS::Widgets::WAnotador::Ocultar(bool oculto)
+{
+        if(oculto != m_Oculto) {
+                m_Oculto = oculto;
+                Modificar(true);
+        }
+        GNC::GCS::ConfigurationController::Instance()->writeBoolUser("/GinkgoCore/Tools/CornerAnotations", "IsShown", m_Oculto);
+}
+
+
+
+//endregion
+
+void GNC::GCS::Widgets::WAnotador::RecalcularPosicion(OrientationMarks* pAnotaciones, GNC::GCS::Contexto3D* c)
+{
+        std::ostringstream dirs[6]; // left, right, top, bottom, back, forward
+
+        ComputeOrientation(c, dirs);
+        pAnotaciones->SetAnotation(OrientationMarks::TP_Left, dirs[0].str());
+        pAnotaciones->SetAnotation(OrientationMarks::TP_Right, dirs[1].str());
+        pAnotaciones->SetAnotation(OrientationMarks::TP_Top, dirs[2].str());
+        pAnotaciones->SetAnotation(OrientationMarks::TP_Bottom, dirs[3].str());
+
+}
+
+void GNC::GCS::Widgets::WAnotador::ComputeOrientation(GNC::GCS::Contexto3D* c, std::ostringstream* dirs )
+{
+        GNC::GCS::Vector3D camPos;
+        GNC::GCS::Vector3D camDir;
+        GNC::GCS::Vector3D camUp;
+
+        c->GetRenderer()->GetCamVectors(camPos.v, camDir.v, camUp.v);
+
+        for (int i = 0; i < 3; ++i) {
+                if (std::abs(camUp.v[i]) < 0.1) {
+                        camUp.v[i] = 0.0;
+                }
+                if (std::abs(camDir.v[i]) < 0.1) {
+                        camDir.v[i] = 0.0;
+                }
+        }
+
+        GNC::GCS::Vector3D camCross = camDir.ProductoVectorial(camUp).Normalizado();
+
+        for (int i = 0; i < 3; ++i) {
+                if (std::abs(camCross.v[i]) < 0.1) {
+                        camCross.v[i] = 0.0;
+                }
+        }
+        LOG_DEBUG("View", "---\nDir         : " << camDir);
+        LOG_DEBUG("View", "Up          : " << camUp);
+
+        GNC::GCS::Vector3D camOrient[3][2];
+        camOrient[0][0] = camCross.Sign();            // izq
+        camOrient[0][1] = -camOrient[0][0];           // der
+
+        camOrient[1][0] = camUp.Stabilized().Sign();  // up
+        camOrient[1][1] = -camOrient[1][0];           // down
+
+        camOrient[2][0] = camDir.Stabilized().Sign(); // back
+        camOrient[2][1] = -camOrient[2][0];           // front
+
+        std::string patPosition;
+        if (m_pManager->GetAnnotator().IsValid()) {
+                patPosition = m_pManager->GetAnnotator()->GetTagValue(c, GKDCM_PatientPosition);
+        }
+        if (patPosition.empty()) {
+
+                std::string viewPosition = m_pManager->GetAnnotator()->GetTagValue(c, GKDCM_ViewPosition);
+                std::string patientOrientation = m_pManager->GetAnnotator()->GetTagValue(c, GKDCM_PatientOrientation);
+
+                LOG_DEBUG("View", "Computing orientation from [ ViewPosition = " << viewPosition << ", PatientOrientation = " << patientOrientation << " ]");
+
+                if (!viewPosition.empty() && !patientOrientation.empty()) {
+
+                        if (viewPosition.find("CC") != std::string::npos) {
+                                LOG_DEBUG("View", "Warning: CC ViewPosition not supported yet");
+                                return;
+                        }
+
+                        std::string DynamicPatientPositionOrientation[] = {
+                                "",  "",  "",    "", "", "",   "", "", "",
+                        };
+                        char direction[2] = {'?', '?'}; // Annotations for each axis direction (columns, rows)
+
+                        std::istringstream pis(patientOrientation);
+
+                        if (pis.eof()) { // Read first char (pixel columns orientation)
+                                return;
+                        }
+                        direction[0] = (char) pis.get();
+                        if (pis.eof()) {
+                                return;
+                        }
+                        pis.get(); // Read separator
+                        if (pis.eof()) {
+                                return;
+                        }
+                        direction[1] = (char) pis.get(); // Read first char (pixel rows orientation)
+
+                        for (int i = 0; i < 2; ++i) { // Compute directions dinamically
+                                int curPos = 1 + i*3;
+
+                                switch (direction[i]) {
+                                case 'A':
+                                        DynamicPatientPositionOrientation[curPos - 1] = "P";
+                                        DynamicPatientPositionOrientation[curPos + 1] = "A";
+                                        break;
+                                case 'P':
+                                        DynamicPatientPositionOrientation[curPos - 1] = "A";
+                                        DynamicPatientPositionOrientation[curPos + 1] = "P";
+                                        break;
+                                case 'R':
+                                        DynamicPatientPositionOrientation[curPos - 1] = "L";
+                                        DynamicPatientPositionOrientation[curPos + 1] = "R";
+                                        break;
+                                case 'L':
+                                        DynamicPatientPositionOrientation[curPos - 1] = "R";
+                                        DynamicPatientPositionOrientation[curPos + 1] = "L";
+                                        break;
+                                case 'H':
+                                        DynamicPatientPositionOrientation[curPos - 1] = "F";
+                                        DynamicPatientPositionOrientation[curPos + 1] = "H";
+                                        break;
+                                case 'F':
+                                        DynamicPatientPositionOrientation[curPos - 1] = "H";
+                                        DynamicPatientPositionOrientation[curPos + 1] = "F";
+                                        break;
+                                default:
+                                        break;
+                                }
+                        }
+
+                        if (viewPosition == "AP") {
+                                DynamicPatientPositionOrientation[6] = "A";
+                                DynamicPatientPositionOrientation[8] = "P";
+                        } else if (viewPosition == "PA") {
+                                DynamicPatientPositionOrientation[6] = "P";
+                                DynamicPatientPositionOrientation[8] = "A";
+                        }
+
+
+                        const int offPos = 0;
+                        const int offX = 0;
+                        const int offY = 3;
+                        const int offZ = 6;
+                        const int offSignNeg = 0;
+                        const int offSignZero = 1;
+                        const int offSignPos = 2;
+
+                        // Left X:
+                        if (camOrient[0][1][0] == 1.0) {
+                                dirs[0] << DynamicPatientPositionOrientation[offPos + offX + offSignPos];
+                        } else if (camOrient[0][1][0] == -1.0) {
+                                dirs[0] << DynamicPatientPositionOrientation[offPos + offX + offSignNeg];
+                        } else {
+                                dirs[0] << DynamicPatientPositionOrientation[offPos + offX + offSignZero];
+                        }
+                        // Left Y:
+                        if (camOrient[0][1][1] == 1.0) {
+                                dirs[0] << DynamicPatientPositionOrientation[offPos + offY + offSignPos];
+                        } else if (camOrient[0][1][1] == -1.0) {
+                                dirs[0] << DynamicPatientPositionOrientation[offPos + offY + offSignNeg];
+                        } else {
+                                dirs[0] << DynamicPatientPositionOrientation[offPos + offY + offSignZero];
+                        }
+                        // Left Z:
+                        if (camOrient[0][1][2] == 1.0) {
+                                dirs[0] << DynamicPatientPositionOrientation[offPos + offZ + offSignPos];
+                        } else if (camOrient[0][1][2] == -1.0) {
+                                dirs[0] << DynamicPatientPositionOrientation[offPos + offZ + offSignNeg];
+                        } else {
+                                dirs[0] << DynamicPatientPositionOrientation[offPos + offZ + offSignZero];
+                        }
+
+                        // Right X:
+                        if (camOrient[0][0][0] == 1.0) {
+                                dirs[1] << DynamicPatientPositionOrientation[offPos + offX + offSignPos];
+                        } else if (camOrient[0][0][0] == -1.0) {
+                                dirs[1] << DynamicPatientPositionOrientation[offPos + offX + offSignNeg];
+                        } else {
+                                dirs[1] << DynamicPatientPositionOrientation[offPos + offX + offSignZero];
+                        }
+                        // Right Y:
+                        if (camOrient[0][0][1] == 1.0) {
+                                dirs[1] << DynamicPatientPositionOrientation[offPos + offY + offSignPos];
+                        } else if (camOrient[0][0][1] == -1.0) {
+                                dirs[1] << DynamicPatientPositionOrientation[offPos + offY + offSignNeg];
+                        } else {
+                                dirs[1] << DynamicPatientPositionOrientation[offPos + offY + offSignZero];
+                        }
+                        // Right Z:
+                        if (camOrient[0][0][2] == 1.0) {
+                                dirs[1] << DynamicPatientPositionOrientation[offPos + offZ + offSignPos];
+                        } else if (camOrient[0][0][2] == -1.0) {
+                                dirs[1] << DynamicPatientPositionOrientation[offPos + offZ + offSignNeg];
+                        } else {
+                                dirs[1] << DynamicPatientPositionOrientation[offPos + offZ + offSignZero];
+                        }
+
+                        // Top X:
+                        if (camOrient[1][0][0] == 1.0) {
+                                dirs[2] << DynamicPatientPositionOrientation[offPos + offX + offSignPos];
+                        } else if (camOrient[1][0][0] == -1.0) {
+                                dirs[2] << DynamicPatientPositionOrientation[offPos + offX + offSignNeg];
+                        } else {
+                                dirs[2] << DynamicPatientPositionOrientation[offPos + offX + offSignZero];
+                        }
+                        // Top Y:
+                        if (camOrient[1][0][1] == 1.0) {
+                                dirs[2] << DynamicPatientPositionOrientation[offPos + offY + offSignPos];
+                        } else if (camOrient[1][0][1] == -1.0) {
+                                dirs[2] << DynamicPatientPositionOrientation[offPos + offY + offSignNeg];
+                        } else {
+                                dirs[2] << DynamicPatientPositionOrientation[offPos + offY + offSignZero];
+                        }
+                        // Top Z:
+                        if (camOrient[1][0][2] == 1.0) {
+                                dirs[2] << DynamicPatientPositionOrientation[offPos + offZ + offSignPos];
+                        } else if (camOrient[1][0][2] == -1.0) {
+                                dirs[2] << DynamicPatientPositionOrientation[offPos + offZ + offSignNeg];
+                        } else {
+                                dirs[2] << DynamicPatientPositionOrientation[offPos + offZ + offSignZero];
+                        }
+
+                        // Bottom X:
+                        if (camOrient[1][1][0] == 1.0) {
+                                dirs[3] << DynamicPatientPositionOrientation[offPos + offX + offSignPos];
+                        } else if (camOrient[1][1][0] == -1.0) {
+                                dirs[3] << DynamicPatientPositionOrientation[offPos + offX + offSignNeg];
+                        } else {
+                                dirs[3] << DynamicPatientPositionOrientation[offPos + offX + offSignZero];
+                        }
+                        // Bottom Y:
+                        if (camOrient[1][1][1] == 1.0) {
+                                dirs[3] << DynamicPatientPositionOrientation[offPos + offY + offSignPos];
+                        } else if (camOrient[1][1][1] == -1.0) {
+                                dirs[3] << DynamicPatientPositionOrientation[offPos + offY + offSignNeg];
+                        } else {
+                                dirs[3] << DynamicPatientPositionOrientation[offPos + offY + offSignZero];
+                        }
+                        // Bottom Z:
+                        if (camOrient[1][1][2] == 1.0) {
+                                dirs[3] << DynamicPatientPositionOrientation[offPos + offZ + offSignPos];
+                        } else if (camOrient[1][1][2] == -1.0) {
+                                dirs[3] << DynamicPatientPositionOrientation[offPos + offZ + offSignNeg];
+                        } else {
+                                dirs[3] << DynamicPatientPositionOrientation[offPos + offZ + offSignZero];
+                        }
+
+                        // Extended
+                        // Back X:
+                        if (camOrient[2][1][0] == 1.0) {
+                                dirs[4] << DynamicPatientPositionOrientation[offPos + offX + offSignPos];
+                        } else if (camOrient[2][1][0] == -1.0) {
+                                dirs[4] << DynamicPatientPositionOrientation[offPos + offX + offSignNeg];
+                        } else {
+                                dirs[4] << DynamicPatientPositionOrientation[offPos + offX + offSignZero];
+                        }
+                        // Back Y:
+                        if (camOrient[2][1][1] == 1.0) {
+                                dirs[4] << DynamicPatientPositionOrientation[offPos + offY + offSignPos];
+                        } else if (camOrient[2][1][1] == -1.0) {
+                                dirs[4] << DynamicPatientPositionOrientation[offPos + offY + offSignNeg];
+                        } else {
+                                dirs[4] << DynamicPatientPositionOrientation[offPos + offY + offSignZero];
+                        }
+                        // Back Z:
+                        if (camOrient[2][1][2] == 1.0) {
+                                dirs[4] << DynamicPatientPositionOrientation[offPos + offZ + offSignPos];
+                        } else if (camOrient[2][1][2] == -1.0) {
+                                dirs[4] << DynamicPatientPositionOrientation[offPos + offZ + offSignNeg];
+                        } else {
+                                dirs[4] << DynamicPatientPositionOrientation[offPos + offZ + offSignZero];
+                        }
+
+                        // Front X:
+                        if (camOrient[2][0][0] == 1.0) {
+                                dirs[5] << DynamicPatientPositionOrientation[offPos + offX + offSignPos];
+                        } else if (camOrient[2][0][0] == -1.0) {
+                                dirs[5] << DynamicPatientPositionOrientation[offPos + offX + offSignNeg];
+                        } else {
+                                dirs[5] << DynamicPatientPositionOrientation[offPos + offX + offSignZero];
+                        }
+                        // Front Y:
+                        if (camOrient[2][0][1] == 1.0) {
+                                dirs[5] << DynamicPatientPositionOrientation[offPos + offY + offSignPos];
+                        } else if (camOrient[2][0][1] == -1.0) {
+                                dirs[5] << DynamicPatientPositionOrientation[offPos + offY + offSignNeg];
+                        } else {
+                                dirs[5] << DynamicPatientPositionOrientation[offPos + offY + offSignZero];
+                        }
+                        // Front Z:
+                        if (camOrient[2][0][2] == 1.0) {
+                                dirs[5] << DynamicPatientPositionOrientation[offPos + offZ + offSignPos];
+                        } else if (camOrient[2][0][2] == -1.0) {
+                                dirs[5] << DynamicPatientPositionOrientation[offPos + offZ + offSignNeg];
+                        } else {
+                                dirs[5] << DynamicPatientPositionOrientation[offPos + offZ + offSignZero];
+                        }
+
+                        LOG_DEBUG("View", "Annotation:");
+                        LOG_DEBUG("View", "    " << dirs[2].str() << "   ");
+                        LOG_DEBUG("View", "  " << dirs[0].str() << "   " << dirs[1].str() << " ");
+                        LOG_DEBUG("View", "    " << dirs[3].str() << "   ");
+
+                }
+        } else {
+                LOG_DEBUG("View", "Computing orientation from [ PatientPosition = " << patPosition << " ]");
+                int patientPosIndex = GetPatientPositionOrientationIndex(patPosition, false);
+
+
+                LOG_DEBUG("View", "Current orientation:");
+                LOG_DEBUG("View", "Left = " << camOrient[0][1] << ", Right = " << camOrient[0][0]);
+                LOG_DEBUG("View", "Up  = " << camOrient[1][0] << ", Down = " << camOrient[1][1]);
+                LOG_DEBUG("View", "Back  = " << camOrient[2][0] << ", Front = " << camOrient[2][1]);
+
+                const int offPos = 9 * patientPosIndex;
+                const int offX = 0;
+                const int offY = 3;
+                const int offZ = 6;
+                const int offSignNeg = 0;
+                const int offSignZero = 1;
+                const int offSignPos = 2;
+
+                // Left X:
+                if (camOrient[0][1][0] == 1.0) {
+                        dirs[0] << PatientPositionOrientation[offPos + offX + offSignPos];
+                } else if (camOrient[0][1][0] == -1.0) {
+                        dirs[0] << PatientPositionOrientation[offPos + offX + offSignNeg];
+                } else {
+                        dirs[0] << PatientPositionOrientation[offPos + offX + offSignZero];
+                }
+                // Left Y:
+                if (camOrient[0][1][1] == 1.0) {
+                        dirs[0] << PatientPositionOrientation[offPos + offY + offSignPos];
+                } else if (camOrient[0][1][1] == -1.0) {
+                        dirs[0] << PatientPositionOrientation[offPos + offY + offSignNeg];
+                } else {
+                        dirs[0] << PatientPositionOrientation[offPos + offY + offSignZero];
+                }
+                // Left Z:
+                if (camOrient[0][1][2] == 1.0) {
+                        dirs[0] << PatientPositionOrientation[offPos + offZ + offSignPos];
+                } else if (camOrient[0][1][2] == -1.0) {
+                        dirs[0] << PatientPositionOrientation[offPos + offZ + offSignNeg];
+                } else {
+                        dirs[0] << PatientPositionOrientation[offPos + offZ + offSignZero];
+                }
+
+                // Right X:
+                if (camOrient[0][0][0] == 1.0) {
+                        dirs[1] << PatientPositionOrientation[offPos + offX + offSignPos];
+                } else if (camOrient[0][0][0] == -1.0) {
+                        dirs[1] << PatientPositionOrientation[offPos + offX + offSignNeg];
+                } else {
+                        dirs[1] << PatientPositionOrientation[offPos + offX + offSignZero];
+                }
+                // Right Y:
+                if (camOrient[0][0][1] == 1.0) {
+                        dirs[1] << PatientPositionOrientation[offPos + offY + offSignPos];
+                } else if (camOrient[0][0][1] == -1.0) {
+                        dirs[1] << PatientPositionOrientation[offPos + offY + offSignNeg];
+                } else {
+                        dirs[1] << PatientPositionOrientation[offPos + offY + offSignZero];
+                }
+                // Right Z:
+                if (camOrient[0][0][2] == 1.0) {
+                        dirs[1] << PatientPositionOrientation[offPos + offZ + offSignPos];
+                } else if (camOrient[0][0][2] == -1.0) {
+                        dirs[1] << PatientPositionOrientation[offPos + offZ + offSignNeg];
+                } else {
+                        dirs[1] << PatientPositionOrientation[offPos + offZ + offSignZero];
+                }
+
+                // Top X:
+                if (camOrient[1][0][0] == 1.0) {
+                        dirs[2] << PatientPositionOrientation[offPos + offX + offSignPos];
+                } else if (camOrient[1][0][0] == -1.0) {
+                        dirs[2] << PatientPositionOrientation[offPos + offX + offSignNeg];
+                } else {
+                        dirs[2] << PatientPositionOrientation[offPos + offX + offSignZero];
+                }
+                // Top Y:
+                if (camOrient[1][0][1] == 1.0) {
+                        dirs[2] << PatientPositionOrientation[offPos + offY + offSignPos];
+                } else if (camOrient[1][0][1] == -1.0) {
+                        dirs[2] << PatientPositionOrientation[offPos + offY + offSignNeg];
+                } else {
+                        dirs[2] << PatientPositionOrientation[offPos + offY + offSignZero];
+                }
+                // Top Z:
+                if (camOrient[1][0][2] == 1.0) {
+                        dirs[2] << PatientPositionOrientation[offPos + offZ + offSignPos];
+                } else if (camOrient[1][0][2] == -1.0) {
+                        dirs[2] << PatientPositionOrientation[offPos + offZ + offSignNeg];
+                } else {
+                        dirs[2] << PatientPositionOrientation[offPos + offZ + offSignZero];
+                }
+
+                // Bottom X:
+                if (camOrient[1][1][0] == 1.0) {
+                        dirs[3] << PatientPositionOrientation[offPos + offX + offSignPos];
+                } else if (camOrient[1][1][0] == -1.0) {
+                        dirs[3] << PatientPositionOrientation[offPos + offX + offSignNeg];
+                } else {
+                        dirs[3] << PatientPositionOrientation[offPos + offX + offSignZero];
+                }
+                // Bottom Y:
+                if (camOrient[1][1][1] == 1.0) {
+                        dirs[3] << PatientPositionOrientation[offPos + offY + offSignPos];
+                } else if (camOrient[1][1][1] == -1.0) {
+                        dirs[3] << PatientPositionOrientation[offPos + offY + offSignNeg];
+                } else {
+                        dirs[3] << PatientPositionOrientation[offPos + offY + offSignZero];
+                }
+                // Bottom Z:
+                if (camOrient[1][1][2] == 1.0) {
+                        dirs[3] << PatientPositionOrientation[offPos + offZ + offSignPos];
+                } else if (camOrient[1][1][2] == -1.0) {
+                        dirs[3] << PatientPositionOrientation[offPos + offZ + offSignNeg];
+                } else {
+                        dirs[3] << PatientPositionOrientation[offPos + offZ + offSignZero];
+                }
+
+                // Extended
+                // Back X:
+                if (camOrient[2][1][0] == 1.0) {
+                        dirs[4] << PatientPositionOrientation[offPos + offX + offSignPos];
+                } else if (camOrient[2][1][0] == -1.0) {
+                        dirs[4] << PatientPositionOrientation[offPos + offX + offSignNeg];
+                } else {
+                        dirs[4] << PatientPositionOrientation[offPos + offX + offSignZero];
+                }
+                // Back Y:
+                if (camOrient[2][1][1] == 1.0) {
+                        dirs[4] << PatientPositionOrientation[offPos + offY + offSignPos];
+                } else if (camOrient[2][1][1] == -1.0) {
+                        dirs[4] << PatientPositionOrientation[offPos + offY + offSignNeg];
+                } else {
+                        dirs[4] << PatientPositionOrientation[offPos + offY + offSignZero];
+                }
+                // Back Z:
+                if (camOrient[2][1][2] == 1.0) {
+                        dirs[4] << PatientPositionOrientation[offPos + offZ + offSignPos];
+                } else if (camOrient[2][1][2] == -1.0) {
+                        dirs[4] << PatientPositionOrientation[offPos + offZ + offSignNeg];
+                } else {
+                        dirs[4] << PatientPositionOrientation[offPos + offZ + offSignZero];
+                }
+
+                // Front X:
+                if (camOrient[2][0][0] == 1.0) {
+                        dirs[5] << PatientPositionOrientation[offPos + offX + offSignPos];
+                } else if (camOrient[2][0][0] == -1.0) {
+                        dirs[5] << PatientPositionOrientation[offPos + offX + offSignNeg];
+                } else {
+                        dirs[5] << PatientPositionOrientation[offPos + offX + offSignZero];
+                }
+                // Front Y:
+                if (camOrient[2][0][1] == 1.0) {
+                        dirs[5] << PatientPositionOrientation[offPos + offY + offSignPos];
+                } else if (camOrient[2][0][1] == -1.0) {
+                        dirs[5] << PatientPositionOrientation[offPos + offY + offSignNeg];
+                } else {
+                        dirs[5] << PatientPositionOrientation[offPos + offY + offSignZero];
+                }
+                // Front Z:
+                if (camOrient[2][0][2] == 1.0) {
+                        dirs[5] << PatientPositionOrientation[offPos + offZ + offSignPos];
+                } else if (camOrient[2][0][2] == -1.0) {
+                        dirs[5] << PatientPositionOrientation[offPos + offZ + offSignNeg];
+                } else {
+                        dirs[5] << PatientPositionOrientation[offPos + offZ + offSignZero];
+                }
+        }
+
+}
+
+//region "Interfaz especifica"
+
+
+
+void GNC::GCS::Widgets::WAnotador::SetTextColor(const GNC::GCS::GLHelper::TColor& color)
+{
+        m_color = color;
+}
+//endregion
+
+
+//region "Estado interno"
+
+
+void GNC::GCS::Widgets::WAnotador::OffscreenRender(GNC::GCS::Contexto3D* c)
+{
+        GNC::GCS::Vector RectViewport[2] = { GNC::GCS::Vector(0, 0), GNC::GCS::Vector(c->ancho, c->alto) };
+        GNC::GCS::Vector TamViewPort = ((RectViewport[1] - RectViewport[0]).ValorAbsoluto() * PROPVIEWPORT).Redondear();
+
+        GNC::GCS::Vector TamCajaMaxima = (RectViewport[1] - RectViewport[0]).ValorAbsoluto();
+
+        const std::string        TextoAnotacion[WAnotador::TP_NumPosiciones] = {"","","",""};/////////////{ m_pAnnotator->GetTopLeftAnnotation(c), m_pAnnotator->GetTopRightAnnotation(c), m_pAnnotator->GetBottomLeftAnnotation(c), m_pAnnotator->GetBottomRightAnnotation(c) };
+        GNC::GCS::Vector         TamTexto      [WAnotador::TP_NumPosiciones];
+        GNC::GCS::Widgets::HelperTexto::TAlineamiento Alineacion[4] = { GNC::GCS::Widgets::HelperTexto::TA_Izquierda, GNC::GCS::Widgets::HelperTexto::TA_Derecha, GNC::GCS::Widgets::HelperTexto::TA_Izquierda, GNC::GCS::Widgets::HelperTexto::TA_Derecha };
+
+        cairo_font_options_t* options;
+        options = cairo_font_options_create ();
+
+        cairo_select_font_face (c->cr, WIDGETS_TEXT_FONT_FAMILY, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
+        cairo_set_font_size(c->cr, std::max(m_FontSizeProp * c->RefRelacionMundoPantallaOffscreen().x, (double)8.0f));
+        cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_NONE);
+        cairo_set_font_options(c->cr, options);
+
+
+        for (int i = 0; i < WAnotador::TP_NumPosiciones; ++i) {
+                TamTexto[i].Asignar(0.0f, 0.0f);
+                if (TextoAnotacion[i].size() > 0) {
+                        TamTexto[i] = GNC::GCS::Widgets::HelperTexto::calcularBoundingBox(c, TextoAnotacion[i], ANNOTATION_TEXT_WITH_SHADOW, TamCajaMaxima.x);
+                        TamCajaMaxima.AsignarMaximos(TamTexto[i]);
+                }
+        }
+
+        GNC::GCS::Vector pos;
+
+
+        // Anotacion TP_TopLeft
+        pos.Asignar(0.0f, 0.0f).Redondear();
+        cairo_save(c->cr);
+        cairo_translate(c->cr, pos.x, pos.y );
+
+        TamTexto[TP_TopLeft] = GNC::GCS::Widgets::HelperTexto::dibujarTexto(c, TextoAnotacion[TP_TopLeft], ANNOTATION_TEXT_WITH_SHADOW, TamCajaMaxima.x, Alineacion[TP_TopLeft]);
+        cairo_restore(c->cr);
+
+        // Anotacion TP_TopRight
+        pos.Asignar(RectViewport[1].x - TamTexto[TP_TopRight].x - 5.0f, 0.0f).Redondear();
+        cairo_save(c->cr);
+        cairo_translate(c->cr, pos.x, pos.y );
+
+        TamTexto[TP_TopRight] = GNC::GCS::Widgets::HelperTexto::dibujarTexto(c, TextoAnotacion[TP_TopRight], ANNOTATION_TEXT_WITH_SHADOW, TamCajaMaxima.x, Alineacion[TP_TopRight]);
+        cairo_restore(c->cr);
+
+        // Anotacion TP_BottomLeft
+        pos.Asignar(0.0f, RectViewport[1].y - TamTexto[TP_BottomLeft].y).Redondear();
+        cairo_save(c->cr);
+        cairo_translate(c->cr, pos.x, pos.y );
+
+        TamTexto[TP_BottomLeft] = GNC::GCS::Widgets::HelperTexto::dibujarTexto(c, TextoAnotacion[TP_BottomLeft], ANNOTATION_TEXT_WITH_SHADOW, TamCajaMaxima.x, Alineacion[TP_BottomLeft]);
+        cairo_restore(c->cr);
+
+        // Anotacion TP_BottomRight
+        pos.Asignar(RectViewport[1].x - TamTexto[TP_BottomRight].x - 5.0f, RectViewport[1].y - TamTexto[TP_BottomRight].y).Redondear();
+        cairo_save(c->cr);
+        cairo_translate(c->cr, pos.x, pos.y );
+
+        TamTexto[TP_BottomRight] = GNC::GCS::Widgets::HelperTexto::dibujarTexto(c, TextoAnotacion[TP_BottomRight], ANNOTATION_TEXT_WITH_SHADOW, TamCajaMaxima.x, Alineacion[TP_BottomRight]);
+        cairo_restore(c->cr);
+
+
+        cairo_font_options_destroy(options);
+}
+
diff --git a/cadxcore/widgets/wanotacionesquina.h b/cadxcore/widgets/wanotacionesquina.h
new file mode 100644
index 0000000..11f4362
--- /dev/null
+++ b/cadxcore/widgets/wanotacionesquina.h
@@ -0,0 +1,139 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/api.h>
+#include <api/observers/ieventsobserver.h>
+#include <vector>
+#include <list>
+#include "openglhelper.h"
+
+#define TAMFUENTE_MIN 10.0f
+#define PROPVIEWPORT 0.40f // Proporcion maxima del viewport, tanto de ancho como de alto. (25%)
+
+namespace GNC
+{
+namespace GCS
+{
+
+namespace Widgets
+{
+
+class EstadoInterno;
+class OrientationMarks;
+
+//----------------------------------------------------------------------------------------------------
+//region Widget anotador
+class EXTAPI WAnotador : public GNC::GCS::Widgets::IWidget
+{
+public:
+
+        WAnotador(IWidgetsManager* pManager, long vid, const char* nombre, long gid);
+
+        ~WAnotador();
+
+        virtual void LiberarRecursos(GNC::GCS::IWidgetsRenderer* renderer);
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz generica"
+public:
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void OffscreenRender(Contexto3D* c);
+
+        virtual void Seleccionar(bool seleccionado);
+
+        virtual void Iluminar(bool iluminado);
+
+        virtual void Ocultar(bool oculto);
+
+        virtual void RecalcularPosicion(OrientationMarks* pAnotaciones, GNC::GCS::Contexto3D* c);
+
+        virtual void ComputeOrientation(GNC::GCS::Contexto3D* c, std::ostringstream* dirs);
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz especifica"
+public:
+        virtual void SetTextColor(const GNC::GCS::GLHelper::TColor& color);
+        //endregion
+
+public:
+
+        typedef enum TPosicionAnotacion {
+                TP_TopLeft = 0,
+                TP_TopRight,
+                TP_BottomLeft,
+                TP_BottomRight,
+                TP_Top,
+                TP_Right,
+                TP_Bottom,
+                TP_Left,
+                TP_NumPosiciones
+        } TPosicionAnotacion;
+
+        //endregion
+
+
+
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Estado interno"
+protected:
+
+        EstadoInterno* m_Estado;
+        GNC::GCS::GLHelper::TColor m_color;
+
+        //endregion
+
+};
+//endregion
+
+
+/**
+* Gets the orientation index given string. Default is zero.
+* strPos: The patient position string (HFS, HFP...)
+* defautlunknown: When orientation index is empty, set the default index to unknown ("?") or empty ("") values
+**/
+int GetPatientPositionOrientationIndex(const std::string& strPos, bool defaultunknown);
+
+/**
+* Gets the patient orientation char ("R", "L", "S"...) from:
+* patientPosIndex: The patient position index: get if from GetOrientationIndex() call.
+* axis: The axis: 0==x, 1==y, 2==z
+* dir: The direction: -1 == decreasing, +1 == decreasing
+**/
+const char* GetPatientPositionOrientationChar(int patientPosIndex, int axis, int dir);
+}
+}
+}
diff --git a/cadxcore/widgets/wanotacionposicion.cpp b/cadxcore/widgets/wanotacionposicion.cpp
new file mode 100644
index 0000000..82aa0cd
--- /dev/null
+++ b/cadxcore/widgets/wanotacionposicion.cpp
@@ -0,0 +1,105 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "wanotacionposicion.h"
+
+#include <main/managers/widgetsmanager.h>
+#include <eventos/mensajes.h>
+#include <api/iannotator.h>
+#include <main/entorno.h>
+#include <main/controllers/controladoreventos.h>
+
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WAnotacionPosicion::WAnotacionPosicion(IWidgetsManager* pManager, long vid, const char* nombre, long gid) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid)
+{
+        m_Oculto = false;
+        m_TopLevel = true;
+        m_ReservaRecursos = false;
+
+        GTRACE("Anotador posicion creado");
+}
+
+GNC::GCS::Widgets::WAnotacionPosicion::~WAnotacionPosicion()
+{
+        GTRACE("Anotador posicion destruido");
+
+        std::ostringstream os;
+        os <<  GNC::Entorno::Instance()->GetApplicationName() << " " << GNC::Entorno::Instance()->GetGinkgoCopyRight();
+        std::string mensaje = os.str();
+        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,mensaje));
+}
+
+//endregion
+
+//region "Interfaz generica"
+
+void GNC::GCS::Widgets::WAnotacionPosicion::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        if( evento.Moving() || evento.Dragging()) {
+                if (m_pManager->GetAnnotator().IsValid()) {
+                        std::string posstr = m_pManager->GetAnnotator()->GetPositionAnnotation(evento.c, evento.wP);
+                        GNC::GCS::ControladorEventos::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,posstr));
+                }
+        }
+}
+
+void GNC::GCS::Widgets::WAnotacionPosicion::OnKeyEvents(GNC::GCS::Events::EventoTeclado& /*evento*/)
+{
+}
+
+bool GNC::GCS::Widgets::WAnotacionPosicion::HitTest(float , float , const GNC::GCS::Vector&)
+{
+        return false;
+}
+
+bool GNC::GCS::Widgets::WAnotacionPosicion::HitTest(GNC::GCS::Vector* , int )
+{
+        return false;
+}
+
+void GNC::GCS::Widgets::WAnotacionPosicion::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+}
+
+
+void GNC::GCS::Widgets::WAnotacionPosicion::Seleccionar(bool )
+{
+}
+
+void GNC::GCS::Widgets::WAnotacionPosicion::Iluminar(bool )
+{
+}
+
+void GNC::GCS::Widgets::WAnotacionPosicion::Ocultar(bool oculto)
+{
+        if(oculto != m_Oculto) {
+                m_Oculto = oculto;
+        }
+}
+
+
+
diff --git a/cadxcore/widgets/wanotacionposicion.h b/cadxcore/widgets/wanotacionposicion.h
new file mode 100644
index 0000000..a3c1a60
--- /dev/null
+++ b/cadxcore/widgets/wanotacionposicion.h
@@ -0,0 +1,77 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/controllers/ieventscontroller.h>
+#include <vector>
+
+class vtkImageData;
+
+namespace GNC
+{
+namespace GCS
+{
+class IAnotador;
+namespace Widgets
+{
+
+//---------------------------------------------------------------------
+
+class WAnotacionPosicion : public GNC::GCS::Widgets::IWidget
+{
+
+
+        //region "Constructor y destructor"
+
+public:
+        WAnotacionPosicion(IWidgetsManager* pManager, long vid, const char* nombre, long gid);
+
+        ~WAnotacionPosicion();
+
+        //endregion
+
+        //region "Interfaz especifica"
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void Seleccionar(bool seleccionado);
+
+        virtual void Iluminar(bool iluminado);
+
+        virtual void Ocultar(bool oculto);
+
+        //endregion
+
+        //region "Interfaz especifica"
+public:
+        //endregion
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wbrightnesscontrast.cpp b/cadxcore/widgets/wbrightnesscontrast.cpp
new file mode 100644
index 0000000..7054148
--- /dev/null
+++ b/cadxcore/widgets/wbrightnesscontrast.cpp
@@ -0,0 +1,183 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <cmath>
+
+#include <api/globals.h>
+#include "wbrightnesscontrast.h"
+
+#include <api/controllers/ieventscontroller.h>
+#include <eventos/modificacionimagen.h>
+#include <main/managers/widgetsmanager.h>
+#include <api/westilo.h>
+
+#include <vtkgl.h>
+
+//region "Implementacion de WBrightnessContrastBuilder"
+
+GNC::GCS::Widgets::WBrightnessContrastBuilder::WBrightnessContrastBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_MouseDown = false;
+        m_Changed = false;
+}
+
+GNC::GCS::Widgets::WBrightnessContrastBuilder::~WBrightnessContrastBuilder()
+{
+}
+
+void GNC::GCS::Widgets::WBrightnessContrastBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                m_pManager->Modificado();
+                if (m_Changed) {
+                        ConsumirEvento();
+                }
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+
+                m_MouseDown = true;
+                m_Changed = false;
+
+                m_StartBCPoint.Asignar(m_pManager->GetRendererActivo()->m_pImageViewer->GetContrast(), m_pManager->GetRendererActivo()->m_pImageViewer->GetBrightness());
+                m_Start.Asignar(evento.sX, evento.sY);
+                m_Stop = m_Start;
+
+                m_pManager->Modificado();
+                ConsumirEvento();
+        } else if (evento.Dragging() && m_MouseDown) {
+
+                m_Stop.Asignar(evento.sX, evento.sY);
+                if (m_Start.DistanciaEuclideaCuadrado(m_Stop) > TVector::EpsilonDeComponentes()) {
+                        m_Changed = true;
+                }
+
+                AdjustBrightnessContrast(m_Stop - m_Start);
+
+                m_pManager->Modificado();
+                ConsumirEvento();
+        } else if( evento.Moving() ) {
+                m_NodoMoviendose.Asignar(evento.sX, evento.sY);
+        }
+
+}
+
+void GNC::GCS::Widgets::WBrightnessContrastBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+
+}
+
+void GNC::GCS::Widgets::WBrightnessContrastBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+        if (!m_MouseDown) {
+                return;
+        }
+
+        double viewport[4] = {0.0f, 0.0f, 0.0f, 0.0f}; // { x, y, ancho, alto }. Convenio de coordenadas: {x, y} == {bottom, left}, {ancho, alto} == {top, right}
+        glGetDoublev(GL_VIEWPORT, viewport);
+
+        glPushAttrib(GL_ALL_ATTRIB_BITS);
+
+        glMatrixMode(GL_TEXTURE);
+        glPushMatrix();
+        glLoadIdentity();
+
+        glMatrixMode(GL_PROJECTION);
+        glPushMatrix();
+        glLoadIdentity();
+        glOrtho( 0, viewport[2] , viewport[3] , 0, -1, 1 );
+
+        glMatrixMode(GL_MODELVIEW);
+        glPushMatrix();
+        glLoadIdentity();
+
+        {
+                // Dibujado de la regla
+                glLineWidth(m_LineWidthProp);
+
+                wAplicarColor(false, false, false);
+                glBegin(GL_LINES);
+                glVertex2d(m_Start.x - 50.0f, m_Start.y);
+                glVertex2d(m_Start.x + 50.0f, m_Start.y);
+                glVertex2d(m_Start.x, m_Start.y - 50.0f);
+                glVertex2d(m_Start.x, m_Start.y + 50.0f);
+                glEnd();
+
+                wAplicarColor(true, true, false);
+                glLineWidth(m_LineWidthProp * 0.5f);
+                glBegin(GL_LINES);
+                glVertex2d(m_Start.x, m_Start.y);
+                glVertex2d(m_Stop.x, m_Start.y);
+                glVertex2d(m_Start.x, m_Start.y);
+                glVertex2d(m_Start.x, m_Stop.y);
+                glEnd();
+
+                glEnable(GL_LINE_STIPPLE);
+
+                glPointSize(WIDGET_SIZE_PUNTO * 0.5f);
+                glBegin(GL_POINTS);
+                glVertex2d(m_Stop.x, m_Start.y);
+                glVertex2d(m_Start.x, m_Stop.y);
+                glEnd();
+
+                wAplicarColorSuave(true, false, false);
+                glLineStipple(3, 0xAAAA);
+                glBegin(GL_LINES);
+                glVertex2dv(m_Start);
+                glVertex2dv(m_Stop);
+                glEnd();
+                glDisable(GL_LINE_STIPPLE);
+        }
+
+        glPopMatrix();
+
+        glMatrixMode(GL_PROJECTION);
+        glPopMatrix();
+
+        glMatrixMode(GL_TEXTURE);
+        glPopMatrix();
+
+        glMatrixMode(GL_MODELVIEW);
+
+        glPopAttrib();
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WBrightnessContrastBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_WINDOW_LEVEL;
+}
+
+void GNC::GCS::Widgets::WBrightnessContrastBuilder::AdjustBrightnessContrast(const TVector& offset)
+{
+
+        TVector viewPort( TVector(m_pManager->GetRendererActivo()->m_c->ancho, m_pManager->GetRendererActivo()->m_c->alto));
+        TVector rel = 4.0 * (offset/viewPort) * TVector(1.0, -1.0);
+
+        m_pManager->GetRendererActivo()->m_pImageViewer->SetBrightness( (m_StartBCPoint + rel).y );
+        m_pManager->GetRendererActivo()->m_pImageViewer->SetContrast( (m_StartBCPoint + rel).x );
+
+        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(m_pManager->GetVista(), GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas));
+
+}
+
+//endregion
diff --git a/cadxcore/widgets/wbrightnesscontrast.h b/cadxcore/widgets/wbrightnesscontrast.h
new file mode 100644
index 0000000..0e5cb8f
--- /dev/null
+++ b/cadxcore/widgets/wbrightnesscontrast.h
@@ -0,0 +1,66 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <vector>
+
+#include <api/iwidgets.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+//---------------------------------------------------------------------
+
+class WBrightnessContrastBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector TVector;
+
+        WBrightnessContrastBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WBrightnessContrastBuilder();
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+protected:
+
+        void AdjustBrightnessContrast(const TVector& offset);
+
+        TVector            m_StartBCPoint;
+        TVector            m_NodoMoviendose;  // Cursor
+        bool               m_Changed;
+        TVector            m_Start;           // Origen del trazado
+        TVector            m_Stop;           // Fin del trazado
+
+        bool               m_MouseDown;
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wcamerarotation.cpp b/cadxcore/widgets/wcamerarotation.cpp
new file mode 100644
index 0000000..2d71340
--- /dev/null
+++ b/cadxcore/widgets/wcamerarotation.cpp
@@ -0,0 +1,194 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include "wcamerarotation.h"
+#include <main/managers/widgetsmanager.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/westilo.h>
+#include <vtkgl.h>
+#include <vtkSmartPointer.h>
+
+#include <cmath>
+
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtkRenderer.h>
+#include <vtkMath.h>
+#include <vtkCamera.h>
+#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
+
+//region "Implementacion de WPanBuilder"
+#include <api/icontexto.h>
+
+
+GNC::GCS::Widgets::WCameraRotation::WCameraRotation(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        m_Dentro = true;
+        m_Changed = false;
+}
+
+GNC::GCS::Widgets::WCameraRotation::~WCameraRotation()
+{
+}
+
+void GNC::GCS::Widgets::WCameraRotation::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+
+        if (!m_pManager) {
+                return;
+        }
+        if ( (m_MouseDown && evento.ButtonUp(m_ButtonMask)) || evento.Leaving()) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+                vtkSmartPointer<vtkRenderWindowInteractor> rwi = evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor();
+                vtkSmartPointer<GinkgoInteractorStyleImage2D> is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+
+                if (is != NULL) {
+                        is->EndSpin();
+                }
+                if (m_Changed) {
+                        ConsumirEvento();
+                }
+
+                m_Estado = WBS_Ninguno;
+                //m_pManager->Modificado();
+                //no se consume el evento para poder mostrar las propiedades de un widget
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+                m_MouseDown = true;
+                m_Changed = false;
+                m_Start = evento.iP;
+
+                vtkSmartPointer<vtkRenderWindowInteractor> rwi = evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor();
+                vtkSmartPointer<GinkgoInteractorStyleImage2D> is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+
+                if (is != NULL) {
+                        is->StartSpin();
+                }
+
+                m_Estado = WBS_Creando;
+                evento.Skip(false);
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+                vtkSmartPointer<vtkRenderWindowInteractor> rwi = evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor();
+                vtkSmartPointer<GinkgoInteractorStyleImage2D> is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+
+                if (m_Start.DistanciaEuclideaCuadrado(evento.iP) > TVector::EpsilonDeReales()) {
+                        m_Changed = true;
+                }
+
+                if (is != NULL) {
+                        vtkRenderWindowInteractor *rwi = is->GetInteractor();
+
+                        double *center = is->GetCurrentRenderer()->GetCenter();
+
+                        double newAngle =
+                                vtkMath::DegreesFromRadians( atan2( rwi->GetEventPosition()[1] - center[1],
+                                                             rwi->GetEventPosition()[0] - center[0] ) );
+
+                        double oldAngle =
+                                vtkMath::DegreesFromRadians( atan2( rwi->GetLastEventPosition()[1] - center[1],
+                                                             rwi->GetLastEventPosition()[0] - center[0] ) );
+
+                        vtkCamera *camera = is->GetCurrentRenderer()->GetActiveCamera();
+                        camera->Roll( newAngle - oldAngle );
+                        camera->OrthogonalizeViewUp();
+
+                        rwi->Render();
+                        //acumulate rotation...
+                        evento.c->pRenderer->m_pImageViewer->RotateCamera(newAngle - oldAngle);
+                        is->PropagateCameraFocalAndPosition();
+                }
+
+                //m_pManager->Modificado();
+                evento.Skip(false);
+        } else if( evento.Moving() ) {
+                GTRACE("Moviendose");
+                m_NodoMoviendose = evento.iP;
+                m_Estado = WBS_Ninguno;
+        }
+
+}
+
+void GNC::GCS::Widgets::WCameraRotation::OnKeyEvents(TEventoTeclado&)
+{
+
+}
+
+void GNC::GCS::Widgets::WCameraRotation::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+
+        /*
+        TVector box = TVector(100, 10) * c->RefRelacionImagenPantalla();
+
+        box = TVector(100, 10) * c->RefRelacionImagenPantalla();
+        TVector pos = TVector(std::max(m_Start.x - box.x, std::min(m_Start.x + box.x, m_Stop.x)), m_Start.y);
+
+        if (m_Estado == WBS_Creando) {
+        	glLineWidth(2.0f);
+        	glColor4f(0.0f, 0.75f, 0.0f, 1.0f);
+
+        	glBegin(GL_LINES);
+
+        		glVertex2d(m_Start.x - box.x, m_Start.y);
+        		glVertex2d(m_Start.x + box.x, m_Start.y);
+
+        		glVertex2d(m_Start.x - box.x, m_Start.y - box.y);
+        		glVertex2d(m_Start.x - box.x, m_Start.y + box.y);
+
+        		glVertex2d(m_Start.x + box.x, m_Start.y - box.y);
+        		glVertex2d(m_Start.x + box.x, m_Start.y + box.y);
+
+        	glEnd();
+
+        	glColor4f(0.75f, 0.0f, 0.0f, 1.0f);
+
+        	glLineWidth(1.5);
+        	glBegin(GL_LINES);
+        		glVertex2d(pos.x, pos.y - box.y);
+        		glVertex2d(pos.x, pos.y + box.y);
+        	glEnd();
+        }
+        else {
+
+        }
+        */
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WCameraRotation::GetCursor()
+{
+        if (m_Estado == WBS_Creando && m_Changed) {
+                return GNC::GCS::Widgets::CUR_MANO_CERRADA;
+        } else {
+                return GNC::GCS::Widgets::CUR_MANO_ABIERTA;
+        }
+}
+
+//endregion
diff --git a/cadxcore/widgets/wcamerarotation.h b/cadxcore/widgets/wcamerarotation.h
new file mode 100644
index 0000000..26cf9cd
--- /dev/null
+++ b/cadxcore/widgets/wcamerarotation.h
@@ -0,0 +1,73 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <vector>
+
+#include <api/iwidgets.h>
+#include <api/math/geometry3d.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+//---------------------------------------------------------------------
+
+class WCameraRotation : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector                    TVector;
+        typedef GNC::GCS::Vector3D                  TVector3D;
+        typedef GNC::GCS::Events::EventoRaton      TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado    TEventoTeclado;
+        typedef GNC::GCS::IWidgetsManager           TWidgetsManager;
+        typedef GNC::GCS::Widgets::IWidget          TWidget;
+
+        WCameraRotation(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WCameraRotation();
+
+        virtual void OnMouseEvents(TEventoRaton& event);
+        virtual void OnKeyEvents(TEventoTeclado& event);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+        //region "Helpers"
+
+        bool         m_Dentro;
+        bool         m_Changed;
+        TVector      m_Start;
+        //endregion
+
+
+protected:
+        TVector   m_NodoMoviendose;  // Cursor
+
+        bool      m_MouseDown;
+        Estado    m_Estado;
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wchromacomplejo.cpp b/cadxcore/widgets/wchromacomplejo.cpp
new file mode 100644
index 0000000..e004ed8
--- /dev/null
+++ b/cadxcore/widgets/wchromacomplejo.cpp
@@ -0,0 +1,407 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include "wchromacomplejo.h"
+#include <api/ievento.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/iwidgetsmanager.h>
+#include <api/icontexto.h>
+#include "main/managers/widgetsmanager.h"
+#include <vtkgl.h>
+#include <api/westilo.h>
+#include <cmath>
+#include <wx/xml/xml.h>
+
+#define WRADIO_CRUZ 8.0f
+#define WLONGITUD_LINEA 15.0f
+
+//region "Implementacion de WSemillasBuilder"
+
+GNC::GCS::Widgets::WChromaComplejoBuilder::WChromaComplejoBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid, int numeroPuntos, GNC::GCS::Widgets::Observadores::IObservadorChromaComplejo* pObservador) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid), GNC::GCS::Widgets::Notificadores::INotificadorChromaComplejo(pObservador)
+{
+        m_MouseDown = false;
+        m_NumMaxSemillas = 1;
+        m_Estado = WBS_Ninguno;
+        m_numeroPuntos = numeroPuntos;
+}
+
+GNC::GCS::Widgets::WChromaComplejoBuilder::~WChromaComplejoBuilder()
+{
+
+}
+
+void GNC::GCS::Widgets::WChromaComplejoBuilder::SetNumeroPuntos(int numeroPuntos)
+{
+        m_numeroPuntos = numeroPuntos;
+        for (GNC::GCS::ListaWidgets::iterator it = m_pManager->GetListaWidgets().begin(); it !=  m_pManager->GetListaWidgets().end(); ++it) {
+                if ( (*it)->GetGID() == m_GID) {
+                        GNC::GCS::Widgets::WChromaComplejo* semilla = dynamic_cast<GNC::GCS::Widgets::WChromaComplejo*>((*it));
+                        if(semilla != NULL) {
+                                semilla->SetNumeroPuntos(numeroPuntos);
+                        }
+                }
+        }
+}
+
+void GNC::GCS::Widgets::WChromaComplejoBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        GTRACE("GNC::GCS::Widgets::WSemillasBuilder::OnMouseEvents(wxMouseEvent&)");
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+
+                m_MouseDown = false;
+                switch(m_Estado) {
+                case WBS_Ninguno:
+                        // ¿Error?
+                        break;
+                case WBS_Creando: {
+                        GNC::GCS::Widgets::WChromaComplejo* semilla = new GNC::GCS::Widgets::WChromaComplejo(m_pManager, evento.c->GetRenderer()->GetVID(), m_ListaNodos, m_numeroPuntos, evento.ControlDown(), "chromacomplejo", m_GID);
+
+                        if (m_NumMaxSemillas > 0) {
+                                int numSemillas = 0;
+                                for (GNC::GCS::ListaWidgets::iterator it = m_pManager->GetListaWidgets().begin(); it !=  m_pManager->GetListaWidgets().end(); ++it) {
+                                        if ( (*it)->GetGID() == m_GID) {
+                                                numSemillas++;
+                                                if (numSemillas >= m_NumMaxSemillas) {
+                                                        m_pManager->EliminarWidget(it);
+                                                        break;
+                                                }
+                                        }
+                                }
+                        }
+                        m_pManager->InsertarWidget(semilla);
+                        m_pManager->LanzarEventoCreacion(semilla);
+                        m_pManager->Modificado();
+                        ConsumirEvento();
+                }
+                break;
+                case WBS_Seleccionando:
+                        break;
+                case WBS_Moviendo:
+                        break;
+                }
+                m_Estado = WBS_Ninguno;
+
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+
+                if (m_NumMaxSemillas > 0) {
+                        int numSemillas = 0;
+                        for (GNC::GCS::ListaWidgets::iterator it = m_pManager->GetListaWidgets().begin(); it !=  m_pManager->GetListaWidgets().end(); ++it) {
+                                if ( (*it)->GetGID() == m_GID) {
+                                        numSemillas++;
+                                        if (numSemillas >= m_NumMaxSemillas) {
+                                                m_pManager->EliminarWidget(it);
+                                                break;
+                                        }
+                                }
+                        }
+                }
+
+                m_ListaNodos.clear();
+                m_ListaNodos.push_back(GNC::GCS::Nodo(evento.iP));
+                m_MouseDown = true;
+                m_Estado = WBS_Creando;
+                m_pManager->Modificado();
+                ConsumirEvento();
+
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado == WBS_Creando) {
+                        m_ListaNodos.push_back(GNC::GCS::Nodo(evento.iP));
+                        m_pManager->Modificado();
+                        ConsumirEvento();
+                }
+        } else if (evento.Moving()) {
+                m_PosCursor = evento.iP;
+                m_pManager->Modificado();
+                evento.Skip(false);
+        }
+}
+
+void GNC::GCS::Widgets::WChromaComplejoBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evt)
+{
+        NotificarKeyEvent(evt);
+}
+
+void DibujaAspa(const GNC::GCS::Nodo& nodo, float radioCruz, bool rallado = false, float fsombrax = 0.0f, float fsombray = 0.0f)
+{
+        // Cruz
+        if(rallado) {
+                glEnable(GL_LINE_STIPPLE);
+                glLineStipple(3, 0xAAAA);
+        }
+        glBegin(GL_LINE_STRIP);
+        glVertex3f(nodo.x - radioCruz + fsombrax, nodo.y - fsombray, 0.0f);
+        glVertex3f(nodo.x + fsombrax, nodo.y - fsombray, 0.0f);
+        glEnd();
+        glBegin(GL_LINE_STRIP);
+        glVertex3f(nodo.x + radioCruz + fsombrax, nodo.y - fsombray, 0.0f);
+        glVertex3f(nodo.x + fsombrax, nodo.y - fsombray, 0.0f);
+        glEnd();
+
+        glBegin(GL_LINE_STRIP);
+        glVertex3f(nodo.x + fsombrax, nodo.y - radioCruz - fsombray, 0.0f);
+        glVertex3f(nodo.x + fsombrax, nodo.y - fsombray, 0.0f);
+        glEnd();
+        glBegin(GL_LINE_STRIP);
+        glVertex3f(nodo.x + fsombrax, nodo.y + radioCruz - fsombray, 0.0f);
+        glVertex3f(nodo.x + fsombrax, nodo.y - fsombray, 0.0f);
+        glEnd();
+        if(rallado)
+                glDisable(GL_LINE_STIPPLE);
+}
+
+void DibujaAspaInclinada(const GNC::GCS::Nodo& nodo, float radioCruz, bool rallado = false, float fsombrax = 0.0f, float fsombray = 0.0f)
+{
+        // Cruz
+        if(rallado) {
+                glEnable(GL_LINE_STIPPLE);
+                glLineStipple(3, 0xAAAA);
+        }
+        glBegin(GL_LINE_STRIP);
+        glVertex3f(nodo.x + fsombrax, nodo.y - fsombray, 0.0f);
+        glVertex3f(nodo.x + radioCruz + fsombrax, nodo.y - radioCruz - fsombray, 0.0f);
+        glEnd();
+        glBegin(GL_LINE_STRIP);
+        glVertex3f(nodo.x + fsombrax, nodo.y - fsombray, 0.0f);
+        glVertex3f(nodo.x + radioCruz + fsombrax, nodo.y + radioCruz - fsombray, 0.0f);
+        glEnd();
+
+        glBegin(GL_LINE_STRIP);
+        glVertex3f(nodo.x + fsombrax, nodo.y - fsombray, 0.0f);
+        glVertex3f(nodo.x - radioCruz + fsombrax, nodo.y + radioCruz - fsombray, 0.0f);
+        glEnd();
+        glBegin(GL_LINE_STRIP);
+        glVertex3f(nodo.x + fsombrax, nodo.y - fsombray, 0.0f);
+        glVertex3f(nodo.x - radioCruz + fsombrax, nodo.y - radioCruz - fsombray, 0.0f);
+        glEnd();
+        if(rallado)
+                glDisable(GL_LINE_STIPPLE);
+}
+
+void GNC::GCS::Widgets::WChromaComplejoBuilder::DibujarVarita(GNC::GCS::Contexto3D* c)
+{
+        GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+        float radioCruz = WRADIO_CRUZ * escala.x;
+        float longitudLinea = WLONGITUD_LINEA * escala.x;
+
+        // Sombra
+        float fsombrax, fsombray;
+
+        GNC::GCS::Nodo m_Nodo;
+        if (m_MouseDown) {
+                m_Nodo = m_ListaNodos.back();
+                fsombrax = WIDGET_OFFSET_X_SOMBRA_SELECCIONADO * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO * escala.y;
+        } else {
+                m_Nodo = m_PosCursor;
+                fsombrax = WIDGET_OFFSET_X_SOMBRA * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA * escala.y;
+        }
+
+        wColorSombra.Aplicar();
+
+        glLineWidth(m_LineWidthProp);
+        // cruz
+        DibujaAspa(m_Nodo, radioCruz,true,fsombrax,fsombray);
+
+        //linea de la cruz 45 grados xa abajo
+        glBegin(GL_LINES);
+        glVertex3f(m_Nodo.x + fsombrax, m_Nodo.y - fsombray, 0.0f);
+        glVertex3f(m_Nodo.x + longitudLinea + fsombrax, m_Nodo.y + longitudLinea + fsombray, 0.0f);
+        glEnd();
+
+        // Cuerpo
+        glLineWidth(m_DraggingLineWidthProp);
+        wAplicarColor(m_Nodo.m_Iluminado, m_MouseDown, m_Nodo.m_Seleccionado);
+
+        // Cruz
+        DibujaAspa(m_Nodo, radioCruz, true);
+
+        //linea de la cruz 45 grados xa abajo
+
+        glBegin(GL_LINES);
+        glVertex3f(m_Nodo.x, m_Nodo.y, 0.0f);
+        glVertex3f(m_Nodo.x + longitudLinea, m_Nodo.y + longitudLinea, 0.0f);
+        glEnd();
+}
+
+void GNC::GCS::Widgets::WChromaComplejoBuilder::Render(GNC::GCS::Contexto3D* c)
+{
+        if (m_Estado == WBS_Creando && m_ListaNodos.size() != 0) {
+                GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+
+                float radioCruz = WRADIO_CRUZ * escala.x;
+
+                //se pinta la linea:
+                glLineWidth(m_LineWidthProp);
+                wAplicarColor(false, false, false);
+                glEnable(GL_LINE_STIPPLE);
+                glLineStipple(3, 0xAAAA);
+                glBegin(GL_LINE_STRIP);
+                for (TListaNodos::iterator it = m_ListaNodos.begin(); it != m_ListaNodos.end(); ++it) {
+                        glVertex2d((*it).x, (*it).y);
+                }
+                glEnd();
+                glDisable(GL_LINE_STIPPLE);
+
+                wAplicarColor(true, false, true);
+                glLineWidth(m_LineWidthProp);
+                //se pintan los nodos representativos
+                if(m_ListaNodos.size()<= (unsigned int)m_numeroPuntos) {
+                        // Dibujo las aspas
+                        for(TListaNodos::iterator it = m_ListaNodos.begin(); it!=m_ListaNodos.end(); ++it) {
+                                // Cruz
+                                DibujaAspaInclinada((*it),radioCruz);
+                        }
+                } else {
+                        //metemos el último
+                        DibujaAspaInclinada(m_ListaNodos.back(),radioCruz);
+
+                        for(int i = 0; i < m_numeroPuntos - 1; i++) {
+                                int indice = (m_ListaNodos.size() / (m_numeroPuntos-1))*i;
+
+                                TListaNodos::iterator it = m_ListaNodos.begin();
+                                for (int i = 0; i < indice; i++, ++it);
+                                GNC::GCS::Nodo& nodo = *it;
+                                DibujaAspaInclinada(nodo, radioCruz);
+                        }
+                }
+        }
+
+        DibujarVarita(c);
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WChromaComplejoBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_TRANSPARENTE;
+}
+
+//endregion
+
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WChromaComplejo::WChromaComplejo(IWidgetsManager* pManager, long vid, GNC::GCS::Widgets::WChromaComplejo::TListaNodos listaNodos, int numeroPuntos, bool isAgregar, const char* nombre, long gid, bool oculto) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid)
+{
+        m_ListaNodos = listaNodos;
+        m_numeroPuntos = numeroPuntos;
+        m_isAgregar = isAgregar;
+////////////////////////////////////	m_Nodo.m_Size = WRADIO_CRUZ;
+        m_MouseDown = false;
+        m_UID = (long)this;
+        m_Oculto = oculto;
+}
+
+GNC::GCS::Widgets::WChromaComplejo::~WChromaComplejo()
+{
+        LanzarEventoDestruccion();
+}
+
+//endregion
+
+void GNC::GCS::Widgets::WChromaComplejo::OnMouseEvents(GNC::GCS::Events::EventoRaton& /*evento*/)
+{
+}
+
+void GNC::GCS::Widgets::WChromaComplejo::OnKeyEvents(GNC::GCS::Events::EventoTeclado& /*evento*/)
+{
+}
+
+bool GNC::GCS::Widgets::WChromaComplejo::HitTest(float , float , const GNC::GCS::Vector&)
+{
+        return false;
+}
+
+bool GNC::GCS::Widgets::WChromaComplejo::HitTest(GNC::GCS::Vector* /*vertices*/, int /*numVertices*/)
+{
+        return false;
+}
+
+GNC::GCS::Widgets::WChromaComplejo::TListaNodos GNC::GCS::Widgets::WChromaComplejo::GetListaNodos()
+{
+        TListaNodos resultado;
+        if(m_ListaNodos.size()<= (unsigned int)m_numeroPuntos) {
+                for(TListaNodos::iterator it = m_ListaNodos.begin(); it!=m_ListaNodos.end(); ++it) {
+                        resultado.push_back((*it));
+                }
+        } else {
+                //metemos el último
+                resultado.push_back(m_ListaNodos.back());
+                for(int i = 0; i< m_numeroPuntos-1; i++) {
+                        int indice = (m_ListaNodos.size() / (m_numeroPuntos-1) )*i;
+                        // Dibujo los puntos
+
+                        TListaNodos::iterator it = m_ListaNodos.begin();
+                        for (int i = 0; i < indice; i++, ++it);
+                        GNC::GCS::Nodo& nodo = *it;
+                        resultado.push_back(nodo);
+                }
+        }
+        return resultado;
+}
+
+void GNC::GCS::Widgets::WChromaComplejo::SetNumeroPuntos(int numeroPuntos)
+{
+        m_numeroPuntos = numeroPuntos;
+        Modificar(true);
+        m_pManager->NotificarModificacion(this);
+}
+
+void GNC::GCS::Widgets::WChromaComplejo::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+
+        float radioCruz = WRADIO_CRUZ * escala.x;
+
+        //se pinta la linea:
+        wAplicarColor(false, false, false);
+        glLineWidth(m_LineWidthProp);
+        glEnable(GL_LINE_STIPPLE);
+        glLineStipple(3, 0xAAAA);
+        glBegin(GL_LINE_STRIP);
+        for (TListaNodos::iterator it = m_ListaNodos.begin(); it != m_ListaNodos.end(); ++it) {
+                glVertex2d((*it).x, (*it).y);
+        }
+        glEnd();
+        glDisable(GL_LINE_STIPPLE);
+
+        //se pintan los nodos representativos
+        wAplicarColor(true, false, true);
+        glLineWidth(m_LineWidthProp);
+        TListaNodos puntos = GetListaNodos();
+        for(TListaNodos::iterator it = puntos.begin(); it!=puntos.end(); ++it) {
+                // Dibujo los puntos
+                glPointSize(WIDGET_SIZE_PUNTO);
+                DibujaAspaInclinada((*it),radioCruz);
+        }
+}
+
+//region Interfaz de eventos ginkgo
+
diff --git a/cadxcore/widgets/wchromacomplejo.h b/cadxcore/widgets/wchromacomplejo.h
new file mode 100644
index 0000000..f190ba4
--- /dev/null
+++ b/cadxcore/widgets/wchromacomplejo.h
@@ -0,0 +1,151 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/controllers/ieventscontroller.h>
+#include <widgets/observers/iobservadorchromacomplejo.h>
+#include <vector>
+
+class vtkImageData;
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+//---------------------------------------------------------------------
+class EXTAPI WChromaComplejoBuilder : public GNC::GCS::Widgets::IWidgetBuilder, public GNC::GCS::Widgets::Notificadores::INotificadorChromaComplejo
+{
+public:
+        typedef std::list<GNC::GCS::Nodo> TListaNodos;
+        WChromaComplejoBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid, int numeroPuntos, GNC::GCS::Widgets::Observadores::IObservadorChromaComplejo* pObservador = NULL);
+
+        ~WChromaComplejoBuilder();
+
+        void SetNumeroPuntos(int numeroPuntos);
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        void DibujarVarita(GNC::GCS::Contexto3D* c);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+
+protected:
+        int                         m_NumMaxSemillas;
+        GNC::GCS::Vector m_VerticesSeleccion[2];
+        TListaNodos   m_ListaNodos;
+        GNC::GCS::Vector m_PosCursor;
+        bool                      m_MouseDown;
+        Estado                   m_Estado;
+        int m_numeroPuntos;
+};
+
+//---------------------------------------------------------------------
+
+class EXTAPI WChromaComplejo : public GNC::GCS::Widgets::IWidget
+{
+
+
+        //region "Constructor y destructor"
+
+public:
+        typedef std::list<GNC::GCS::Nodo> TListaNodos;
+        WChromaComplejo(IWidgetsManager* pManager, long vid, TListaNodos listaNodos, int numeroPuntos, bool isAgregar, const char* nombre, long gid, bool oculto = false);
+
+        ~WChromaComplejo();
+
+        //endregion
+
+        //region "Interfaz especifica"
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return false;
+        }
+
+        virtual bool EsMarcador() const
+        {
+                return false;
+        }
+
+        virtual bool DelimitaArea() const
+        {
+                return false;
+        }
+        //endregion
+
+        virtual TListaNodos GetListaNodos();
+
+        void SetNumeroPuntos(int numeroPuntos);
+
+        bool EsAgregar()
+        {
+                return m_isAgregar;
+        }
+
+        //region "Estado interno"
+private:
+        bool            m_MouseDown;
+        //endregion
+
+        //region "Propiedades geometricas"
+private:
+        TListaNodos m_ListaNodos;
+        int m_numeroPuntos;
+        bool m_isAgregar;
+
+public:
+        friend std::ostream& operator<<(std::ostream& out, const WChromaComplejo& w)
+        {
+                out << ", GID=" << w.m_GID << ", TID=" << w.m_TID << " UID=" << w.m_UID << " ]";
+                return out;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const WChromaComplejo* w)
+        {
+                if (w == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *w;
+                }
+                return out;
+        }
+};
+}
+}
+}
diff --git a/cadxcore/widgets/welevacion.cpp b/cadxcore/widgets/welevacion.cpp
new file mode 100644
index 0000000..a6ec2d3
--- /dev/null
+++ b/cadxcore/widgets/welevacion.cpp
@@ -0,0 +1,253 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include <api/iwidgetsmanager.h>
+#include <api/iwidgetsrenderer.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include "welevacion.h"
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <api/ievento.h>
+#include <vtkgl.h>
+#include <cmath>
+
+#include <vtkImageData.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtkImageActor.h>
+
+//region "Implementacion de WElevacionBuilder"
+
+GNC::GCS::Widgets::WElevacionBuilder::WElevacionBuilder(GNC::GCS::IWidgetsManager* pManager, GNC::GCS::Widgets::Elevacion::ListaRepresentaciones* pRepresentaciones, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        m_pRepresentaciones = pRepresentaciones;
+        m_ListaCreada = false;
+        m_RadioCacheado = 0.0f;
+        m_LIndex = 0;
+        m_pRepActiva = nullptr;
+        m_Dentro = true;
+        m_RepresentacionActiva = 0;
+        m_pObservador = nullptr;
+}
+
+GNC::GCS::Widgets::WElevacionBuilder::~WElevacionBuilder()
+{
+        for (TipoIteradorListaNodos it = m_Nodos.begin(); it != m_Nodos.end(); ++it) {
+                delete *it;
+        }
+        m_Nodos.clear();
+        DestroyDisplayList();
+}
+
+void GNC::GCS::Widgets::WElevacionBuilder::SetRepresentacionActiva(int idRepresentacion)
+{
+        m_RepresentacionActiva = idRepresentacion;
+        GNC::GCS::Widgets::Elevacion::ListaRepresentaciones::iterator it = m_pRepresentaciones->begin();
+        for (int i = 0; i < idRepresentacion; i++, ++it);
+        m_pRepActiva = *it;
+}
+
+void GNC::GCS::Widgets::WElevacionBuilder::SetObservador(GNC::GCS::Widgets::Elevacion::IObservadorElevacion* pObservador)
+{
+        m_pObservador=pObservador;
+}
+
+void GNC::GCS::Widgets::WElevacionBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+
+        GNC::GCS::Widgets::Elevacion::ListaRepresentaciones::iterator it = m_pRepresentaciones->begin();
+        for (int i = 0; i < m_RepresentacionActiva; i++, ++it);
+        m_pRepActiva = *it;
+
+        if (evento.Entering()) {
+                m_Dentro = true;
+                m_pManager->Modificado();
+        } else if (evento.Leaving()) {
+                m_Dentro = false;
+                m_pManager->Modificado();
+        }
+
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+                m_Estado = WBS_Ninguno;
+
+                m_NodoMoviendose= evento.iP;
+                if(m_pObservador!=NULL) {
+                        m_pObservador->OnTerminarInsertar();
+                }
+                for (TipoIteradorListaNodos it = m_Nodos.begin(); it != m_Nodos.end(); ++it) {
+                        delete *it;
+                }
+                m_Nodos.clear();
+                evento.Skip(false);
+                m_pManager->Modificado();
+                m_Estado = WBS_Ninguno;
+                GTRACE("Levanta el boton pasamos a ninguno");
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+                m_MouseDown = true;
+
+                for (TipoIteradorListaNodos it = m_Nodos.begin(); it != m_Nodos.end(); ++it) {
+                        delete *it;
+                }
+                m_Nodos.clear();
+
+                GNC::GCS::Nodo* nodo= new GNC::GCS::Nodo();
+                nodo->Asignar(evento.iP.x, evento.iP.y);
+                m_Nodos.push_back(nodo);
+                //aviso que han soltado
+                m_pManager->Modificado();
+                GTRACE("Hace click pasamos a creando");
+                if(m_pObservador!=NULL) {
+                        m_pObservador->OnPuntoInsertado(evento.iP.x, evento.iP.y);
+                }
+                m_Estado = WBS_Creando;
+                evento.Skip(false);
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+                //mando punto para que suban la valoracion!!!!!!
+                GTRACE("esta haciendo dragging con el boton pulsado..........");
+                GNC::GCS::Nodo* nodo= new GNC::GCS::Nodo();
+                nodo->Asignar(evento.iP.x, evento.iP.y);
+                m_Nodos.push_back(nodo);
+                if(m_pObservador!=NULL) {
+                        m_pObservador->OnPuntoInsertado(evento.iP.x, evento.iP.y);
+                }
+                m_pManager->Modificado();
+                evento.Skip(false);
+        } else if( evento.Moving() ) {
+                GTRACE("Moviendose "<< evento.wX <<","<<evento.wY);
+                m_NodoMoviendose= evento.iP;
+                m_Estado = WBS_Ninguno;
+                m_pManager->Modificado();
+                evento.Skip(false);
+        }
+
+        GTRACE("GNC::GCS::Widgets::WElevacionBuilder::OnMouseEvents(wxMouseEvent&)");
+}
+
+void GNC::GCS::Widgets::WElevacionBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+        GTRACE("GNC::GCS::Widgets::WElevacionBuilder::OnKeyEvents(wxKeyEvent&)");
+}
+
+void GNC::GCS::Widgets::WElevacionBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+        float radioCirculo;
+
+        radioCirculo = m_pRepActiva->m_RadioCircunferencia;
+
+
+        if (m_Estado == WBS_Creando) {
+                if (radioCirculo != m_RadioCacheado) {
+                        BuildDisplayList();
+                }
+                glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+                for(TipoIteradorListaNodos it=m_Nodos.begin(); it!=m_Nodos.end(); ++it) {
+                        glMatrixMode(GL_MODELVIEW);
+                        glPushMatrix();
+                        glTranslatef((*it)->x, (*it)->y, 0.0f);
+                        glColor4f(m_pRepActiva->colorCircunferencia.r, m_pRepActiva->colorCircunferencia.g, m_pRepActiva->colorCircunferencia.b, m_pRepActiva->colorCircunferencia.a);
+                        glCallList(m_LIndex);
+                        glPopMatrix();
+                }
+        } else {
+                if (m_Dentro) {
+                        if (radioCirculo != m_RadioCacheado) {
+                                BuildDisplayList();
+                        }
+                        glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+                        glMatrixMode(GL_MODELVIEW);
+                        glPushMatrix();
+                        glTranslatef(m_NodoMoviendose.x, m_NodoMoviendose.y, 0.0f);
+                        glColor4f(m_pRepActiva->colorCircunferencia.r, m_pRepActiva->colorCircunferencia.g, m_pRepActiva->colorCircunferencia.b, m_pRepActiva->colorCircunferencia.a);
+                        glCallList(m_LIndex);
+                        glPopMatrix();
+                }
+        }
+}
+
+//endregion
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WElevacionBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_TRANSPARENTE;
+}
+
+
+//region "Helpers"
+void GNC::GCS::Widgets::WElevacionBuilder::BuildDisplayList()
+{
+
+        if (m_pRepActiva == NULL ) {
+                return;
+        }
+        if (m_ListaCreada) {
+                glDeleteLists(m_LIndex, 1);
+        }
+
+        glMatrixMode(GL_MODELVIEW);
+        glPushMatrix();
+        glLoadIdentity();
+
+        m_LIndex = glGenLists(1);
+        m_ListaCreada = true;
+
+        glNewList(m_LIndex, GL_COMPILE);
+
+        glBegin(GL_TRIANGLE_FAN);
+        float step = M_2PI / 30;
+        m_RadioCacheado = m_pRepActiva->m_RadioCircunferencia;
+
+        for ( float angulo = 0; angulo < M_2PI; angulo += step) {
+                glVertex3f(m_RadioCacheado * cos (angulo) , m_RadioCacheado * sin (angulo), 0.0f);
+
+        }
+        glEnd();
+
+        glEndList();
+
+        glPopMatrix();
+
+}
+
+void GNC::GCS::Widgets::WElevacionBuilder::DestroyDisplayList()
+{
+        if (m_ListaCreada) {
+                glDeleteLists(m_LIndex, 1);
+                m_ListaCreada = false;
+        }
+}
+
diff --git a/cadxcore/widgets/welevacion.h b/cadxcore/widgets/welevacion.h
new file mode 100644
index 0000000..f9e8858
--- /dev/null
+++ b/cadxcore/widgets/welevacion.h
@@ -0,0 +1,180 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <vector>
+
+#include <api/iwidgets.h>
+#include <api/controllers/ieventscontroller.h>
+
+#include <vtkSmartPointer.h>
+
+class vtkImageData;
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+namespace Elevacion
+{
+
+//------------------------------------------------------------------
+
+class RepresentacionElevacion
+{
+public:
+
+        typedef struct Color {
+                float r;
+                float g;
+                float b;
+                float a;
+
+                inline Color() :
+                        r(0.0f),
+                        g(0.0f),
+                        b(0.0f),
+                        a(0.0f)
+                {
+                }
+
+                inline Color(float r, float g, float b, float a) :
+                        r(r),
+                        g(g),
+                        b(b),
+                        a(a)
+                {
+                }
+
+                inline Color(const Color& o) :
+                        r(o.r),
+                        g(o.g),
+                        b(o.b),
+                        a(o.a)
+                {
+                }
+
+                inline void asignar(float r, float g, float b, float a)
+                {
+                        this->r = r;
+                        this->g = g;
+                        this->b = b;
+                        this->a = a;
+                };
+
+        } Color;
+
+        //region "Constructor y destructor"
+
+        RepresentacionElevacion( bool soportaAutoBorrado = false) :
+                colorCircunferencia(0.0f, 0.5f, 0.0f, 1.0f),
+                colorCircunferenciaIluminada(0.5f, 0.0f, 0.0f, 1.0f),
+                m_RadioCircunferencia(15.0f),
+                m_SoportaAutoBorrado(soportaAutoBorrado)
+        {
+        }
+
+        ~RepresentacionElevacion()
+        {
+
+        }
+
+        bool SoportaAutoBorrado()
+        {
+                return m_SoportaAutoBorrado;
+        }
+
+        //region "Propiedades radiometricas"
+
+        Color colorCircunferencia;
+        Color colorCircunferenciaIluminada;
+        float m_RadioCircunferencia;
+        bool m_SoportaAutoBorrado;
+
+        //endregion
+};
+
+typedef std::list<GNC::GCS::Widgets::Elevacion::RepresentacionElevacion*> ListaRepresentaciones;
+
+//---------------------------------------------------------------------
+class IObservadorElevacion
+{
+public:
+
+        virtual ~IObservadorElevacion() {}
+
+        virtual void OnPuntoInsertado(float x, float y) = 0;
+
+        virtual void OnTerminarInsertar() = 0;
+};
+}
+
+//---------------------------------------------------------------------
+
+class WElevacionBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+        WElevacionBuilder(GNC::GCS::IWidgetsManager* pManager, GNC::GCS::Widgets::Elevacion::ListaRepresentaciones* pRepresentaciones, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        virtual ~WElevacionBuilder();
+
+        virtual void SetRepresentacionActiva(int idRepresentacion);
+
+        virtual void SetObservador (GNC::GCS::Widgets::Elevacion::IObservadorElevacion* pobservador);
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+        //region "Helpers"
+
+        bool         m_Dentro;
+        bool         m_ListaCreada;
+        unsigned int m_LIndex;
+        float        m_RadioCacheado; // Radio el que esta creada la display list
+
+        virtual void BuildDisplayList();
+        virtual void DestroyDisplayList();
+
+
+protected:
+        GNC::GCS::Nodo				 m_NodoMoviendose;
+        typedef std::list<GNC::GCS::Nodo*> TipoListaNodos;
+        typedef std::list<GNC::GCS::Nodo*>::iterator TipoIteradorListaNodos;
+        TipoListaNodos   m_Nodos;
+        GNC::GCS::Vector m_VerticesSeleccion[2];
+        bool             m_MouseDown;
+        int              m_RepresentacionActiva;
+        Estado           m_Estado;
+        GNC::GCS::Widgets::Elevacion::ListaRepresentaciones* m_pRepresentaciones;
+        GNC::GCS::Widgets::Elevacion::RepresentacionElevacion* m_pRepActiva;
+        GNC::GCS::Widgets::Elevacion::IObservadorElevacion* m_pObservador;
+
+};
+}
+}
+}
diff --git a/cadxcore/widgets/welipse.cpp b/cadxcore/widgets/welipse.cpp
new file mode 100644
index 0000000..4a652dd
--- /dev/null
+++ b/cadxcore/widgets/welipse.cpp
@@ -0,0 +1,829 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/xml/xml.h>
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/icontexto.h>
+#include <api/iwidgetsrenderer.h>
+#include "welipse.h"
+#include "wtextbox.h"
+#include <api/ievento.h>
+#include <api/ioverlay.h>
+#include "main/managers/widgetsmanager.h"
+#include <vtkgl.h>
+#include <api/westilo.h>
+#include <cmath>
+
+
+//region "Implementacion de WElipseBuilder"
+
+GNC::GCS::Widgets::WElipseBuilder::WElipseBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        m_Dentro = true;
+}
+
+GNC::GCS::Widgets::WElipseBuilder::~WElipseBuilder()
+{
+}
+
+void GNC::GCS::Widgets::WElipseBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+                m_Estado = WBS_Ninguno;
+
+                m_Stop = evento.iP;
+
+                GNC::GCS::Vector a = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[0]);
+                GNC::GCS::Vector b = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[1]);
+                m_BB[0] = m_Start;
+                m_BB[1] = a;
+                m_BB[2] = m_Stop;
+                m_BB[3] = b;
+
+
+                TVector diff = m_Stop - m_Start;
+                if (std::abs(diff.x) > 0.001f && std::abs(diff.y) > 0.001f) {
+                        GNC::GCS::Vector bBox[2];
+                        bBox[0] = m_BB[0];
+                        bBox[1] = m_BB[2];
+                        GNC::GCS::Vector::OrdenarBoundingBox(bBox);
+
+                        TVector centro = m_BB[0].PuntoMedio(m_BB[2]);
+
+                        TVector m_RadioMayor = m_BB[0] - m_BB[1];
+                        TVector m_RadioMenor = m_BB[0] - m_BB[3];
+
+                        /*
+                        TVector centro = bBox[0].PuntoMedio(bBox[1]);
+
+                        TVector radio1(bBox[1].x - centro.x, 0.0f);
+                        TVector radio2(0.0f, bBox[1].y - centro.y);
+                        */
+
+                        WElipse* w = new WElipse(centro, m_RadioMayor/2, m_RadioMenor/2, m_pManager, evento.c->GetRenderer()->GetVID(), "Elipse", m_GID, evento.c);
+                        m_pManager->InsertarWidget(w);
+                        m_pManager->LanzarEventoCreacion(w);
+                        ConsumirEvento();
+                }
+
+                m_pManager->Modificado();
+                m_Estado = WBS_Ninguno;
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+                m_MouseDown = true;
+
+                m_Start = evento.iP;
+                m_Stop = m_Start;
+
+                GNC::GCS::Vector a = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[0]);
+                GNC::GCS::Vector b = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[1]);
+                m_BB[0] = m_Start;
+                m_BB[1] = a;
+                m_BB[2] = m_Stop;
+                m_BB[3] = b;
+
+                m_pManager->Modificado();
+                m_Estado = WBS_Creando;
+                evento.Skip(false);
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+
+                m_Stop = evento.iP;
+
+                GNC::GCS::Vector a = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[0]);
+                GNC::GCS::Vector b = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[1]);
+                m_BB[0] = m_Start;
+                m_BB[1] = a;
+                m_BB[2] = m_Stop;
+                m_BB[3] = b;
+
+                m_pManager->Modificado();
+                evento.Skip(false);
+        } else if( evento.Moving() ) {
+                GTRACE("Moviendose");
+                m_NodoMoviendose = evento.iP;
+                m_Estado = WBS_Ninguno;
+        }
+
+}
+
+void GNC::GCS::Widgets::WElipseBuilder::OnKeyEvents(TEventoTeclado&)
+{
+}
+
+void GNC::GCS::Widgets::WElipseBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+
+        if (m_Estado == WBS_Creando) {
+                TVector centro = m_BB[0].PuntoMedio(m_BB[2]);
+
+                TVector m_RadioMayor = m_BB[0] - m_BB[1];
+                TVector m_RadioMenor = m_BB[0] - m_BB[3];
+
+                double m_NormaRadioMayor = m_RadioMayor.Norma2()/2;
+                double m_NormaRadioMenor = m_RadioMenor.Norma2()/2;
+
+                double m_Angulo = m_RadioMayor.AnguloSobreAbscisa();
+
+                float step = M_2PI / 100;
+
+                glLineWidth(2.0f);
+                glColor4f(0.0f, 0.5f, 0.0f, 0.75f);
+                glBegin(GL_LINE_LOOP);
+
+                for ( float angulo = 0; angulo < M_2PI; angulo += step) {
+                        GNC::GCS::Vector v (m_NormaRadioMayor * cos(angulo), m_NormaRadioMenor * sin(angulo));
+                        v = centro + v.RotacionSobreZ(m_Angulo);
+                        glVertex3f(v.x , v.y, 0.0f);
+                }
+
+                glEnd();
+        } else {
+
+        }
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WElipseBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_CREAR_ELIPSE;
+}
+
+//endregion
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WElipse::WElipse(TVector centro, TVector radio1, TVector radio2, IWidgetsManager* pManager, long vid, const char* nombre, long gid, GNC::GCS::Contexto3D* c) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid,TID_USER_ANNOTATION_WIDGET),
+        GNC::GCS::Widgets::IWidgetSerializable(),
+        m_pTextBox(NULL)
+{
+        m_Centro = centro;
+        m_RadioMayor = radio1;
+        m_RadioMenor = radio2;
+        m_NodoRadioMayor = m_Centro + m_RadioMayor;
+        m_NodoRadioMayorReflejado = m_NodoRadioMayor.ReflejoSobrePunto(m_Centro);
+        m_NodoRadioMenor = m_Centro + m_RadioMenor;
+        m_NodoRadioMenorReflejado = m_NodoRadioMenor.ReflejoSobrePunto(m_Centro);
+        m_MouseDown = false;
+        m_UID = (long)this;
+        m_Debug = true;
+
+        m_Nodos = new GNC::GCS::Vector[m_NumNodos];
+
+        initTextBox(c->rotacion);
+        Recalcular();
+}
+
+GNC::GCS::Widgets::WElipse::~WElipse()
+{
+        delete[] m_Nodos;
+        m_pManager->EliminarWidget(m_pTextBox, false);
+        m_pManager->Modificado();
+}
+
+//endregion
+
+//region "Serializado y desserializado"
+GNC::GCS::Widgets::WElipse::WElipse(IWidgetsManager* pManager, long vid, long gid, wxXmlNode* nodo): GNC::GCS::Widgets::IWidget(pManager, vid,"Elipse",gid),
+        GNC::GCS::Widgets::IWidgetSerializable(nodo),
+        m_pTextBox(NULL)
+{
+        if(nodo->GetName() != wxT("elipse_widget")) {
+                std::cerr<< "Ha ocurrido un error al desserializar el widget elipse"<<std::endl;
+        }
+        wxXmlNode *child = nodo->GetChildren();
+        GNC::GCS::Nodo nodoTmp;
+        while (child) {
+                if(child->GetName() == wxT("centro")) {
+                        nodoTmp = GNC::GCS::Nodo::Deserializar(child);
+                        m_Centro.x = nodoTmp.x;
+                        m_Centro.y = nodoTmp.y;
+                } else if(child->GetName() == wxT("radioMayor")) {
+                        m_NodoRadioMayor = GNC::GCS::Nodo::Deserializar(child);
+                } else if(child->GetName() == wxT("radioMenor")) {
+                        m_NodoRadioMenor = GNC::GCS::Nodo::Deserializar(child);
+                } else if(child->GetName() == wxT("rotacion")) {
+                        wxString strTmp = child->GetAttribute(wxT("valor"),wxT("0.0"));
+                        double doubleTmp;
+                        strTmp.ToDouble(&doubleTmp);
+                        m_Angulo = (float) doubleTmp;
+                }
+                child = child->GetNext();
+        }
+
+        m_NodoRadioMayorReflejado = m_NodoRadioMayor.ReflejoSobrePunto(m_Centro);
+        m_NodoRadioMenorReflejado = m_NodoRadioMenor.ReflejoSobrePunto(m_Centro);
+
+        initTextBox();
+
+        m_MouseDown = false;
+        m_UID = (long)this;
+        m_Debug = true;
+
+        m_Nodos = new GNC::GCS::Vector[m_NumNodos];
+
+        Recalcular();
+}
+
+void GNC::GCS::Widgets::WElipse::initTextBox(double rotation)
+{
+        if (m_pTextBox == NULL) {
+                //calculate bottom right corner to set label...
+                GNC::GCS::Vector bb[2];
+                m_NodoRadioMayor.IniciarBoundingBox(bb);
+                m_NodoRadioMayorReflejado.ExtenderBoundingBox(bb);
+                m_NodoRadioMenor.ExtenderBoundingBox(bb);
+                m_NodoRadioMenorReflejado.ExtenderBoundingBox(bb);
+
+                GNC::GCS::Vector pm = bb[0].PuntoMedio(bb[1]);
+                bb[1].RotarSobreZ( pm, rotation);
+
+                m_pTextBox = new WTextBox(m_pManager, m_VID, bb[1], WTextBox::TNM_Dynamic, "ellipse", "");
+                m_pManager->InsertarWidget(m_pTextBox);
+        }
+}
+
+wxXmlNode* GNC::GCS::Widgets::WElipse::Serializar(const std::string& nombreMedico)
+{
+        wxXmlNode* resultado = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxT("elipse_widget"));
+        //almacenamos los dos nodos
+        wxXmlNode* nodo = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxT("centro"));
+        nodo->AddAttribute(new wxXmlProperty(wxT("x"),wxString::Format(wxT("%f"),m_Centro.x)));
+        nodo->AddAttribute(new wxXmlProperty(wxT("y"),wxString::Format(wxT("%f"),m_Centro.y)));
+        resultado->AddChild(nodo);
+
+        nodo = m_NodoRadioMayor.Serializar();
+        nodo->SetName(wxT("radioMayor"));
+        resultado->AddChild(nodo);
+
+        nodo = m_NodoRadioMenor.Serializar();
+        nodo->SetName(wxT("radioMenor"));
+        resultado->AddChild(nodo);
+
+        nodo = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxT("rotacion"));
+        nodo->AddAttribute(new wxXmlProperty(wxT("valor"),wxString::Format(wxT("%f"),m_Angulo)));
+        resultado->AddChild(nodo);
+
+        //metadatos
+        SerializarMetadatos(resultado,nombreMedico);
+
+        return resultado;
+}
+//endregion
+
+void GNC::GCS::Widgets::WElipse::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if(EstaOculto()) {
+                return;
+        }
+
+        //------------------------------------------------------
+        // Leaving
+        if (evento.Leaving() ) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        else if (evento.Dragging() && m_MouseDown) {
+                Vector delta = evento.iP - m_PosCursor;
+                m_PosCursor = evento.iP;
+
+                //GNC::GCS::Vector escala = evento.c->RelacionImagenPantalla();
+
+                if (m_NodoRadioMayor.EstaSeleccionado()) {
+                        m_NodoRadioMayor += delta;
+                        m_Centro = m_NodoRadioMayor.PuntoMedio(m_NodoRadioMayorReflejado);
+                        m_RadioMayor = m_NodoRadioMayor - m_Centro;
+                        m_RadioMenor = (m_RadioMayor).VectorOrtogonal().Normalizar() * m_NormaRadioMenor;
+                        m_NodoRadioMenor = m_Centro + m_RadioMenor;
+                        m_NodoRadioMenorReflejado = m_NodoRadioMenor.ReflejoSobrePunto(m_Centro);
+                        Modificar(true);
+                } else if (m_NodoRadioMayorReflejado.EstaSeleccionado()) {
+                        m_NodoRadioMayorReflejado += delta;
+                        m_Centro = m_NodoRadioMayorReflejado.PuntoMedio(m_NodoRadioMayor);
+                        m_RadioMayor = m_NodoRadioMayor - m_Centro;
+                        m_RadioMenor = (m_RadioMayor).VectorOrtogonal().Normalizar() * m_NormaRadioMenor;
+                        m_NodoRadioMenor = m_Centro + m_RadioMenor;
+                        m_NodoRadioMenorReflejado = m_NodoRadioMenor.ReflejoSobrePunto(m_Centro);
+                        Modificar(true);
+                } else if (m_NodoRadioMenor.EstaSeleccionado()) {
+                        m_NodoRadioMenor += delta;
+                        m_Centro = m_NodoRadioMenor.PuntoMedio(m_NodoRadioMenorReflejado);
+                        m_RadioMenor = m_NodoRadioMenor - m_Centro;
+                        m_RadioMayor = (m_RadioMenor).VectorOrtogonal().Normalizar() *  m_NormaRadioMayor;
+                        m_NodoRadioMayor = m_Centro + m_RadioMayor;
+                        m_NodoRadioMayorReflejado = m_NodoRadioMayor.ReflejoSobrePunto(m_Centro);
+                        Modificar(true);
+                } else if (m_NodoRadioMenorReflejado.EstaSeleccionado()) {
+                        m_NodoRadioMenorReflejado += delta;
+                        m_Centro = m_NodoRadioMenorReflejado.PuntoMedio(m_NodoRadioMenor);
+                        m_RadioMenor = m_NodoRadioMenorReflejado - m_Centro;
+                        m_RadioMayor = (m_RadioMenor).VectorOrtogonal().Normalizar() * m_NormaRadioMayor;
+                        m_NodoRadioMayor = m_Centro + m_RadioMayor;
+                        m_NodoRadioMayorReflejado = m_NodoRadioMayor.ReflejoSobrePunto(m_Centro);
+                        Modificar(true);
+                } else if (EstaSeleccionado())  {
+                        m_Centro += delta;
+                        m_NodoRadioMayor += delta;
+                        m_NodoRadioMayorReflejado += delta;
+                        m_NodoRadioMenor += delta;
+                        m_NodoRadioMenorReflejado += delta;
+                        Modificar(true);
+                }
+
+                if (m_Modificado) {
+                        Recalcular();
+                        LanzarEventoModificacion();
+                        ConsumirEvento();
+                }
+                return;
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        SeleccionarNodo(m_NodoRadioMayor, false);
+                        SeleccionarNodo(m_NodoRadioMayorReflejado, false);
+                        SeleccionarNodo(m_NodoRadioMenor, false);
+                        SeleccionarNodo(m_NodoRadioMenorReflejado, false);
+                        Seleccionar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_PosCursor = evento.iP;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                if (!dentro && m_NodoRadioMayor.Hits(evento.iP, factor)) {
+                        SeleccionarNodo(m_NodoRadioMayor, true);
+                        Seleccionar(false);
+                        dentro = true;
+                } else {
+                        SeleccionarNodo(m_NodoRadioMayor, false);
+                }
+
+                if (!dentro && m_NodoRadioMayorReflejado.Hits(evento.iP, factor)) {
+                        SeleccionarNodo(m_NodoRadioMayorReflejado, true);
+                        Seleccionar(false);
+                        dentro = true;
+                } else {
+                        SeleccionarNodo(m_NodoRadioMayorReflejado, false);
+                }
+
+                if (!dentro && m_NodoRadioMenor.Hits(evento.iP, factor)) {
+                        SeleccionarNodo(m_NodoRadioMenor, true);
+                        Seleccionar(false);
+                        dentro = true;
+                } else {
+                        SeleccionarNodo(m_NodoRadioMenor, false);
+                }
+
+                if (!dentro && m_NodoRadioMenorReflejado.Hits(evento.iP, factor)) {
+                        SeleccionarNodo(m_NodoRadioMenorReflejado, true);
+                        Seleccionar(false);
+                        dentro = true;
+                } else {
+                        SeleccionarNodo(m_NodoRadioMenorReflejado, false);
+                }
+
+                if (!dentro) {
+                        if (HitTest(evento.iP.x, evento.iP.y,evento.c->RelacionImagenPantalla())) {
+                                dentro = true;
+                                if (evento.m_controlDown) { // Inversion de seleccion
+                                        InvertirSeleccion();
+                                } else {
+                                        Seleccionar(true);
+                                }
+                        } else {
+                                if (!evento.m_controlDown) {
+                                        Seleccionar(false);
+                                } else {
+                                        ConsumirEvento();
+                                        if (EstaSeleccionado()) {
+                                                m_MouseDown = true;
+                                                m_PosCursor = evento.iP;
+                                        }
+                                }
+                        }
+                }
+
+                if (dentro) {
+                        m_MouseDown = true;
+                        m_PosCursor = evento.iP;
+                        ConsumirEvento();
+                }
+
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        m_MouseDown = false;
+                        ActualizarTimestampModificacion();
+                        ConsumirEvento();
+                }
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+                if (EventoConsumido()) {
+                        IluminarNodo(m_NodoRadioMayor, false);
+                        IluminarNodo(m_NodoRadioMayorReflejado, false);
+                        IluminarNodo(m_NodoRadioMenor, false);
+                        IluminarNodo(m_NodoRadioMenorReflejado, false);
+                        Iluminar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_PosCursor = evento.iP;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                if (!dentro && m_NodoRadioMayor.Hits(evento.iP, factor)) {
+                        IluminarNodo(m_NodoRadioMayor, true);
+                        Iluminar(false);
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_NodoRadioMayor, false);
+                }
+
+                if (!dentro && m_NodoRadioMayorReflejado.Hits(evento.iP, factor)) {
+                        IluminarNodo(m_NodoRadioMayorReflejado, true);
+                        Iluminar(false);
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_NodoRadioMayorReflejado, false);
+                }
+
+                if (!dentro && m_NodoRadioMenor.Hits(evento.iP, factor)) {
+                        IluminarNodo(m_NodoRadioMenor, true);
+                        Iluminar(false);
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_NodoRadioMenor, false);
+                }
+
+                if (!dentro && m_NodoRadioMenorReflejado.Hits(evento.iP, factor)) {
+                        IluminarNodo(m_NodoRadioMenorReflejado, true);
+                        Iluminar(false);
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_NodoRadioMenorReflejado, false);
+                }
+
+                if (!dentro) {
+
+                        if (HitTest(evento.iP.x, evento.iP.y,evento.c->RelacionImagenPantalla())) {
+                                Iluminar(true);
+                                dentro = true;
+                        } else {
+                                Iluminar(false);
+                        }
+                }
+
+                if (dentro) {
+                        ConsumirEvento();
+                }
+
+                return;
+        }
+}
+
+void GNC::GCS::Widgets::WElipse::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+bool GNC::GCS::Widgets::WElipse::HitTest(float x, float y, const GNC::GCS::Vector& threshold)
+{
+        bool dentro = true;
+        TNodo nodo(x,y);
+        float difference = 0.0f;
+        if (m_NormaRadioMayor > m_NormaRadioMenor) {
+                difference = (((nodo - m_focus[0]).Norma2() + (nodo - m_focus[1]).Norma2()) - 2 * m_NormaRadioMayor);
+        } else {
+                difference = (((nodo - m_focus[0]).Norma2() + (nodo - m_focus[1]).Norma2()) - 2 * m_NormaRadioMenor);
+        }
+
+        dentro  = std::abs(difference) < (m_NodoRadioMayor.m_Size * threshold).Norma2();
+
+        return dentro;
+}
+
+bool GNC::GCS::Widgets::WElipse::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+
+        bool dentro = true;
+
+        if (m_NumNodos == 0) {
+                dentro = false;
+        } else {
+                for (unsigned int i = 0; dentro && i < m_NumNodos; ++i) {
+                        dentro = m_Nodos[i].DentroDePoligono2(vertices, numVertices);
+                }
+        }
+
+        return dentro;
+}
+
+void GNC::GCS::Widgets::WElipse::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+
+        glLineWidth(m_LineWidthProp);
+
+        // Sombras
+        float fsombrax, fsombray;
+        if (m_Seleccionado && m_MouseDown) {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA_SELECCIONADO * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO * escala.y;
+        } else {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA * escala.y;
+        }
+
+        // Sombra del cuerpo
+        wColorSombra.Aplicar();
+        glBegin(GL_LINE_LOOP);
+        for (unsigned int i = 0; i < m_NumNodos; ++i) {
+                glVertex2d(m_Nodos[i].x + fsombrax , m_Nodos[i].y - fsombray);
+        }
+        glEnd();
+
+        // Sombra de los puntos
+        glPointSize(WIDGET_SIZE_PUNTO);
+
+        if (m_Seleccionado && m_MouseDown)
+                glPointSize(WIDGET_SIZE_PUNTO * WIDGET_INCREMENTO_DETALLE_SELECCIONADO);
+
+        glBegin(GL_POINTS);
+        glVertex2d(m_NodoRadioMayor.x + fsombrax, m_NodoRadioMayor.y - fsombray);
+        glVertex2d(m_NodoRadioMayorReflejado.x + fsombrax, m_NodoRadioMayorReflejado.y - fsombray);
+        glVertex2d(m_NodoRadioMenor.x + fsombrax, m_NodoRadioMenor.y - fsombray);
+        glVertex2d(m_NodoRadioMenorReflejado.x + fsombrax, m_NodoRadioMenorReflejado.y - fsombray);
+        glEnd();
+
+        // Highlights
+        bool nodoEnabled = false;
+
+        if (m_NodoRadioMayor.m_Iluminado) {
+                wDibujarElipseDegradado(m_NodoRadioMayor, wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+                nodoEnabled = true;
+        }
+
+        if (m_NodoRadioMayorReflejado.m_Iluminado) {
+                wDibujarElipseDegradado(m_NodoRadioMayorReflejado, wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+                nodoEnabled = true;
+        }
+
+        if (m_NodoRadioMenor.m_Iluminado) {
+                wDibujarElipseDegradado(m_NodoRadioMenor, wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+                nodoEnabled = true;
+        }
+
+        if (m_NodoRadioMenorReflejado.m_Iluminado) {
+                wDibujarElipseDegradado(m_NodoRadioMenorReflejado, wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+                nodoEnabled = true;
+        }
+
+        // Dibujado
+        wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINE_LOOP);
+        for (unsigned int i = 0; i < m_NumNodos; ++i) {
+                glVertex2d(m_Nodos[i].x, m_Nodos[i].y);
+        }
+        glEnd();
+
+        // Lineas internas
+        if (nodoEnabled) {
+                glLineWidth(1.0f);
+                glEnable(GL_LINE_STIPPLE);
+                wColorAngulo.Aplicar();
+                glLineStipple(3, 0xAAAA);
+
+                glBegin(GL_LINES);
+                glVertex2d(m_NodoRadioMayor.x, m_NodoRadioMayor.y);
+                glVertex2d(m_NodoRadioMayorReflejado.x, m_NodoRadioMayorReflejado.y);
+                glEnd();
+
+                glBegin(GL_LINES);
+                glVertex2d(m_NodoRadioMenor.x, m_NodoRadioMenor.y);
+                glVertex2d(m_NodoRadioMenorReflejado.x, m_NodoRadioMenorReflejado.y);
+                glEnd();
+
+                glDisable(GL_LINE_STIPPLE);
+        }
+
+
+        // Nodos
+        glPointSize(WIDGET_SIZE_PUNTO);
+
+        wAplicarColor(m_Iluminado || m_NodoRadioMayor.m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_POINTS);
+        glVertex2d(m_NodoRadioMayor.x, m_NodoRadioMayor.y);
+        glEnd();
+
+        wAplicarColor(m_Iluminado || m_NodoRadioMayorReflejado.m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_POINTS);
+        glVertex2d(m_NodoRadioMayorReflejado.x, m_NodoRadioMayorReflejado.y);
+        glEnd();
+
+        wAplicarColor(m_Iluminado || m_NodoRadioMenor.m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_POINTS);
+        glVertex2d(m_NodoRadioMenor.x, m_NodoRadioMenor.y);
+        glEnd();
+
+        wAplicarColor(m_Iluminado || m_NodoRadioMenorReflejado.m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_POINTS);
+        glVertex2d(m_NodoRadioMenorReflejado.x, m_NodoRadioMenorReflejado.y);
+        glEnd();
+}
+
+void GNC::GCS::Widgets::WElipse::Recalcular()
+{
+        m_Centro = m_NodoRadioMayor.PuntoMedio(m_NodoRadioMayorReflejado);
+        m_RadioMayor = m_NodoRadioMayor - m_Centro;
+        m_RadioMenor = m_NodoRadioMenor - m_Centro;
+
+        m_NormaRadioMayor = m_RadioMayor.Norma2();
+        m_NormaRadioMenor = m_RadioMenor.Norma2();
+
+        //calculate focus points
+        double fDistance = sqrt(std::abs(m_NormaRadioMayor*m_NormaRadioMayor - m_NormaRadioMenor*m_NormaRadioMenor));
+        //difference from the formula => the sum of distance from point to focus has to be = 2*bigger radious
+        if (m_NormaRadioMayor > m_NormaRadioMenor) {
+                m_focus[0] = m_Centro +  m_RadioMayor.Normalizado() * fDistance;
+                m_focus[1]= m_Centro +  m_RadioMayor.Normalizado() * (-fDistance);
+        } else {
+                m_focus[0] = m_Centro +  m_RadioMenor.Normalizado() * fDistance;
+                m_focus[1] = m_Centro +  m_RadioMenor.Normalizado() * (-fDistance);
+        }
+
+        m_Angulo = m_RadioMayor.AnguloSobreAbscisa();
+
+        float step = M_2PI / m_NumNodos;
+        float angulo = 0.0f;
+        for ( unsigned int i = 0; i < m_NumNodos; ++i, angulo += step ) {
+                GNC::GCS::Vector v (m_NormaRadioMayor * cos(angulo), m_NormaRadioMenor * sin(angulo));
+                m_Nodos[i] =  m_Centro + v.RotacionSobreZ(m_Angulo);
+        }
+
+        m_Modificado = true;
+
+        const float suma = m_NormaRadioMayor + m_NormaRadioMenor;
+        const float diff = std::max<float>(m_NormaRadioMayor, m_NormaRadioMenor) - std::min<float>(m_NormaRadioMayor, m_NormaRadioMenor);
+        const float rel = diff / suma;
+        m_Perimetro = M_PI * suma * (3.0f - std::sqrt (4.0f - (rel * rel)));
+        m_AreaMetrica = M_PI * m_NormaRadioMayor * m_NormaRadioMenor;
+
+        //std::cout << this << std::endl;
+
+        std::string text;
+        if (m_pManager->GetRendererActivo() != NULL && m_pManager->GetRendererActivo()->m_pIOverlay != NULL) {
+                text = m_pManager->GetRendererActivo()->m_pIOverlay->ImprimirOverlay(this, m_pManager->GetRendererActivo()->m_pImageViewer);
+        }
+        if (text.empty()) {
+                m_pTextBox->Ocultar(true);
+        } else {
+                m_pTextBox->Ocultar(false);
+                m_pTextBox->SetTexto(text);
+        }
+
+}
+
+void GNC::GCS::Widgets::WElipse::InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades)
+{
+        TMapaPropiedades& primerMapa = listaMapaPropiedades.front();
+        {
+                std::ostringstream ostr;
+                ostr <<  m_Centro;
+                primerMapa[_Std("Center (I)")] = ostr.str();
+        }
+
+        {
+                std::stringstream out;
+                out << PuntoToStringMundo(m_Centro);
+                primerMapa[_Std("Center (M)")] = out.str();
+        }
+
+
+        std::string strRadioMayor;
+        std::string strRadioMenor;
+
+        {
+                std::ostringstream os;
+                if (m_NormaRadioMayor > 1000.0f) {
+                        os << m_NormaRadioMayor / 1000.0f << " m.";
+                } else if (m_NormaRadioMayor > 10.0f) {
+                        os << m_NormaRadioMayor / 10.0f << " cm.";
+                } else {
+                        os << m_NormaRadioMayor << " mm.";
+                }
+                strRadioMayor = os.str();
+        }
+        {
+                std::ostringstream os;
+                if (m_NormaRadioMenor > 1000.0f) {
+                        os << m_NormaRadioMenor / 1000.0f << " m.";
+                } else if (m_NormaRadioMenor > 10.0f) {
+                        os << m_NormaRadioMenor / 10.0f << " cm.";
+                } else {
+                        os << m_NormaRadioMenor << " mm.";
+                }
+                strRadioMenor = os.str();
+        }
+
+        if (m_NormaRadioMayor > m_NormaRadioMenor) {
+                primerMapa[_Std("Greater Radius")] = strRadioMayor;
+                primerMapa[_Std("Lower Radius")] = strRadioMenor;
+        } else {
+                primerMapa[_Std("Greater Radius")] = strRadioMenor;
+                primerMapa[_Std("Lower Radius")] = strRadioMayor;
+        }
+}
+
+//endregion
+
+void GNC::GCS::Widgets::WElipse::OffscreenRender(GNC::GCS::Contexto3D* c)
+{
+        const GNC::GCS::Vector& escala = c->RefRelacionMundoPantallaOffscreen();
+        TVector Nodos[m_NumNodos];
+
+        Recalcular();
+
+        TVector NPuntos[4] =  { c->Reproyectar(m_NodoRadioMayor) * c->factorReescalado, c->Reproyectar(m_NodoRadioMayorReflejado) * c->factorReescalado, c->Reproyectar(m_NodoRadioMenor) * c->factorReescalado, c->Reproyectar(m_NodoRadioMenorReflejado) * c->factorReescalado };
+
+        for (unsigned int i = 0; i < m_NumNodos; ++i) {
+                Nodos[i] = c->Reproyectar(m_Nodos[i]) * c->factorReescalado;
+        }
+
+        cairo_set_line_width(c->cr, m_LineWidthProp);
+
+        // Color del cuerpo
+        wColorNormal.AplicarCairo(c->cr);
+
+        // Sombra de los puntos
+        for (int i = 0; i < 4; ++i) {
+                cairo_arc(c->cr, NPuntos[i].x, NPuntos[i].y, (WIDGET_SIZE_PUNTO / 2.0f) * escala.x, 0, M_2PI);
+                cairo_fill(c->cr);
+        }
+
+        // Dibujado del cuerpo
+        for (unsigned int i = 0; i < m_NumNodos; ++i) {
+                if(i == 0) {
+                        cairo_move_to(c->cr, Nodos[i].x, Nodos[i].y);
+                }
+                cairo_line_to(c->cr, Nodos[i].x, Nodos[i].y);
+        }
+        cairo_line_to(c->cr, Nodos[0].x, Nodos[1].y);
+        cairo_stroke(c->cr);
+}
diff --git a/cadxcore/widgets/welipse.h b/cadxcore/widgets/welipse.h
new file mode 100644
index 0000000..2a74afc
--- /dev/null
+++ b/cadxcore/widgets/welipse.h
@@ -0,0 +1,239 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/widgetserializable.h>
+#include <vector>
+
+class vtkImageData;
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+class WTextBox;
+//---------------------------------------------------------------------
+
+class WElipseBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Events::EventoRaton   TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado TEventoTeclado;
+        typedef GNC::GCS::IWidgetsManager        TWidgetsManager;
+        typedef GNC::GCS::Widgets::IWidget       TWidget;
+
+        WElipseBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WElipseBuilder();
+
+        virtual void OnMouseEvents(TEventoRaton& event);
+        virtual void OnKeyEvents(TEventoTeclado& event);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+        //region "Helpers"
+
+        bool         m_Dentro;
+        //endregion
+
+
+protected:
+        TVector	                 m_NodoMoviendose;  // Cursor
+        TVector                  m_Start;           // Origen del boundingBox
+        TVector                  m_Stop;            // Destino del boundingBox
+
+        TVector                  m_BB[4]; // Vertices del bounding box.
+
+        bool                     m_MouseDown;
+        Estado                   m_Estado;
+};
+
+//---------------------------------------------------------------------
+
+class WElipse : public GNC::GCS::Widgets::IWidget, public GNC::GCS::Widgets::IWidgetSerializable
+{
+
+        //region "Constructor y destructor"
+
+public:
+        typedef GNC::GCS::Nodo   TNodo;
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Matriz TMatriz;
+        typedef GNC::GCS::Contexto3D TContexto;
+        typedef GNC::GCS::Events::EventoRaton TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado TEventoTeclado;
+
+        WElipse(TVector centro, TVector radio1, TVector radio2, IWidgetsManager* pManager, long vid, const char* nombre, long gid, GNC::GCS::Contexto3D* c);
+
+        ~WElipse();
+
+        //endregion
+
+        //region "Serializado y desserializado"
+        WElipse(IWidgetsManager* pManager, long vid, long gid, wxXmlNode* nodo);
+
+        void initTextBox(double rotation = 0.0);
+
+        wxXmlNode* Serializar(const std::string& nombreMedico);
+        //endregion
+
+        //region "Interfaz especifica"
+
+        virtual void OnMouseEvents(TEventoRaton&);
+
+        virtual void OnKeyEvents(TEventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(TVector* vertices, int numVertices);
+
+        virtual void Render(TContexto* c);
+
+        virtual void OffscreenRender(Contexto3D* c);
+
+        virtual bool EsMarcador() const
+        {
+                return true;
+        }
+
+        virtual bool DelimitaArea() const
+        {
+                return true;
+        }
+
+        virtual bool ContieneFast(const GNC::GCS::Vector& punto) const
+        {
+                return punto.DentroDeElipse(m_Centro, m_NormaRadioMayor, m_NormaRadioMenor, m_Angulo);
+        }
+
+        virtual void GetBoundingBox(GNC::GCS::Vector& bb0, GNC::GCS::Vector& bb1) const
+        {
+                if (m_NumNodos > 0) {
+                }
+                m_Nodos[0].IniciarBoundingBox(bb0, bb1);
+                for (unsigned int i = 1; i < m_NumNodos; ++i) {
+                        m_Nodos[i].ExtenderBoundingBox(bb0, bb1);
+                }
+
+        }
+
+        virtual void GetPosicion(GNC::GCS::Vector& posicion) const
+        {
+                posicion = m_Centro;
+        }
+
+        virtual void GetPuntoAnclaje(GNC::GCS::Vector& punto, const GNC::GCS::Vector& escala) const
+        {
+                punto = m_PosCursor + (GNC::GCS::Vector(10.0f, -10.0f) * escala);
+        }
+
+        virtual void GetCentro(GNC::GCS::Vector& centro) const
+        {
+                centro = m_Centro;
+        }
+
+        virtual float GetAreaMetrica() const
+        {
+                return m_AreaMetrica;
+        }
+
+        virtual float GetPerimetro() const
+        {
+                return m_Perimetro;
+        }
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return true;
+        }
+        //endregion
+
+        //region "Estado interno"
+private:
+        bool            m_MouseDown;
+        //endregion
+
+        //region "Propiedades geometricas"
+public:
+        bool         m_Debug;
+        static const unsigned int m_NumNodos = 100;
+
+        TVector* m_Nodos;
+
+        TVector m_PosCursor;
+
+        TVector m_Centro;
+        TVector m_RadioMayor;
+        TVector m_RadioMenor;
+        TNodo   m_NodoRadioMayor;
+        TNodo   m_NodoRadioMenor;
+        TNodo   m_NodoRadioMayorReflejado;
+        TNodo   m_NodoRadioMenorReflejado;
+        float   m_NormaRadioMayor;
+        float   m_NormaRadioMenor;
+        float   m_Angulo;
+        TVector m_focus[2];
+        TVector m_BB[4];
+
+        float m_AreaMetrica;
+        float m_Perimetro;
+        WTextBox*                m_pTextBox;
+
+        friend std::ostream& operator<<(std::ostream& out, const WElipse& w)
+        {
+                out << "Elipse = [ centro = " << w.m_Centro << ", radioMayor = " << w.m_RadioMayor << ", radioMenor = " << w.m_RadioMenor << ", GID=" << w.m_GID << ", TID=" << w.m_TID << " UID=" << w.m_UID << " ]";
+                return out;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const WElipse* w)
+        {
+                if (w == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *w;
+                }
+                return out;
+        }
+
+public:
+        //endregion
+
+        //region "Propiedades radiometricas"
+
+        //endregion
+
+public:
+
+        void Recalcular();
+
+        virtual void InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades);
+
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wflecha.cpp b/cadxcore/widgets/wflecha.cpp
new file mode 100644
index 0000000..a89eb8d
--- /dev/null
+++ b/cadxcore/widgets/wflecha.cpp
@@ -0,0 +1,601 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/xml/xml.h>
+
+#include <cmath>
+#include <sstream>
+
+#include <api/globals.h>
+#include "wflecha.h"
+#include "wtextbox.h"
+#include <api/westilo.h>
+#include <api/ievento.h>
+#include <api/ioverlay.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/icontexto.h>
+#include <main/managers/widgetsmanager.h>
+#include <vtkgl.h>
+
+#include <cairo/cairo.h>
+#include "openglhelper.h"
+
+
+//region "Implementacion de WFlechaBuilder"
+
+GNC::GCS::Widgets::WFlechaBuilder::WFlechaBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask)
+{
+        m_MouseDown = false;
+        m_pFlechaTemp = NULL;
+}
+
+GNC::GCS::Widgets::WFlechaBuilder::~WFlechaBuilder()
+{
+        if (m_pFlechaTemp != NULL) {
+                delete m_pFlechaTemp;
+                m_pFlechaTemp = NULL;
+        }
+}
+
+void GNC::GCS::Widgets::WFlechaBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        GTRACE("GNC::GCS::Widgets::WFlechaBuilder::OnMouseEvents(wxMouseEvent&)");
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_pFlechaTemp != NULL) {
+                        m_pFlechaTemp->m_Vertices[1] = evento.iP;
+                        m_pFlechaTemp->Recalcular();
+                        if (std::abs(m_pFlechaTemp->Distancia()) > evento.c->RelacionImagenPantalla().NormaInfinito()) {
+                                m_pManager->InsertarWidget(m_pFlechaTemp);
+                                m_pManager->LanzarEventoCreacion(m_pFlechaTemp);
+                                ConsumirEvento();
+                        } else {
+                                delete m_pFlechaTemp;
+                        }
+                        m_pFlechaTemp = NULL;
+                        m_pManager->Modificado();
+                }
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                m_MouseDown = true;
+                TNodo nodos[2];
+                nodos[0] = nodos[1] = evento.iP;
+                if (m_pFlechaTemp != NULL) {
+                        delete m_pFlechaTemp;
+                }
+                m_pFlechaTemp = new GNC::GCS::Widgets::WFlecha(m_pManager, evento.c->GetRenderer()->GetVID(), nodos, evento.c, "Flecha");
+                //std::cout << "linea (leftdwn): " << m_Vertices[0].m_wX << ", " << m_Vertices[0].m_wY << " -> " << m_Vertices[1].m_wX << ", " << m_Vertices[1].m_wY << std::endl;
+                m_pManager->Modificado();
+                ConsumirEvento();
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_pFlechaTemp != NULL) {
+                        m_pFlechaTemp->m_Vertices[1] = evento.iP;
+                        m_pFlechaTemp->Recalcular();
+                        //std::cout << "linea (moving): " << m_Vertices[0].m_wX << ", " << m_Vertices[0].m_wY << " -> " << m_Vertices[1].m_wX << ", " << m_Vertices[1].m_wY << std::endl;
+                        m_pManager->Modificado();
+                        ConsumirEvento();
+                }
+        }
+
+}
+
+void GNC::GCS::Widgets::WFlechaBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+        GTRACE("GNC::GCS::Widgets::WFlechaBuilder::OnKeyEvents(wxKeyEvent&)");
+}
+
+void GNC::GCS::Widgets::WFlechaBuilder::Render(GNC::GCS::Contexto3D* c)
+{
+        if (m_pFlechaTemp == NULL) {
+                return;
+        }
+        m_pFlechaTemp->Render(c);
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WFlechaBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_CREAR_LINEA;
+}
+
+//endregion
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WFlecha::WFlecha(IWidgetsManager* pManager, long vid, GNC::GCS::Nodo nodos[2], GNC::GCS::Contexto3D* c, const char* nombre) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre,0,TID_USER_ANNOTATION_WIDGET),
+        GNC::GCS::Widgets::IWidgetSerializable(),
+        m_pTextBox(NULL)
+{
+        m_Vertices[0] = nodos[0];
+        m_Vertices[1] = nodos[1];
+
+        m_MouseDown = false;
+        m_Oculto = false;
+
+        initTextBox(c->rotacion);
+        Recalcular();
+}
+
+GNC::GCS::Widgets::WFlecha::~WFlecha()
+{
+        m_pManager->EliminarWidget(m_pTextBox, false);
+        m_pManager->Modificado();
+}
+
+//endregion
+
+//region "Serializado y desserializado"
+GNC::GCS::Widgets::WFlecha::WFlecha(IWidgetsManager* pManager, long vid, wxXmlNode* nodo): GNC::GCS::Widgets::IWidget(pManager, vid, "Flecha"),
+        GNC::GCS::Widgets::IWidgetSerializable(nodo),
+        m_pTextBox(NULL)
+{
+        if(nodo->GetName() != wxT("flecha_widget")) {
+                std::cerr<< "Ha ocurrido un error al desserializar el widget flecha"<<std::endl;
+        }
+
+        wxXmlNode *child = nodo->GetChildren();
+        while (child) {
+                if(child->GetName() == wxT("node0")) {
+                        m_Vertices[0] = GNC::GCS::Nodo::Deserializar(child);
+                } else if(child->GetName() == wxT("node1")) {
+                        m_Vertices[1] = GNC::GCS::Nodo::Deserializar(child);
+                }
+                child = child->GetNext();
+        }
+
+        m_MouseDown = false;
+
+        initTextBox();
+        Recalcular();
+}
+
+void GNC::GCS::Widgets::WFlecha::initTextBox(double rotation)
+{
+        if (m_pTextBox == NULL) {
+                //calculate bottom right corner to set label...
+                GNC::GCS::Vector bb[2];
+                m_Vertices[0].IniciarBoundingBox(bb);
+                m_Vertices[1].ExtenderBoundingBox(bb);
+                GNC::GCS::Vector pm = bb[0].PuntoMedio(bb[1]);
+                bb[1].RotarSobreZ( pm, rotation);
+
+                m_pTextBox = new WTextBox(m_pManager, m_VID, bb[1], WTextBox::TNM_Dynamic, "arrow", "");
+                m_pManager->InsertarWidget(m_pTextBox);
+        }
+}
+
+wxXmlNode* GNC::GCS::Widgets::WFlecha::Serializar(const std::string& nombreMedico)
+{
+        wxXmlNode* resultado = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxT("flecha_widget"));
+        //almacenamos los dos nodos
+        wxXmlNode* nodo = m_Vertices[0].Serializar();
+        nodo->SetName(wxT("node0"));
+        resultado->AddChild(nodo);
+        nodo = m_Vertices[1].Serializar();
+        nodo->SetName(wxT("node1"));
+        resultado->AddChild(nodo);
+        //metadatos
+        SerializarMetadatos(resultado,nombreMedico);
+        return resultado;
+}
+
+//endregion
+
+void GNC::GCS::Widgets::WFlecha::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (EstaOculto()) {
+                return;
+        }
+        //------------------------------------------------------
+        // Leaving
+        if (evento.Leaving() ) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        else if (evento.Dragging() && m_MouseDown) {
+
+                if (EstaSeleccionado() || m_Vertices[0].EstaSeleccionado() || m_Vertices[1].EstaSeleccionado()) {
+                        Vector delta = evento.iP - m_PosCursor;
+                        m_PosCursor = evento.iP;
+                        if (EstaSeleccionado() || m_Vertices[0].EstaSeleccionado()) {
+                                m_Vertices[0] += delta;
+                        }
+                        if (EstaSeleccionado() || m_Vertices[1].EstaSeleccionado()) {
+                                m_Vertices[1] += delta;
+                        }
+                        LanzarEventoModificacion();
+                        Recalcular();
+                        ConsumirEvento();
+                }
+                return;
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        SeleccionarNodo(m_Vertices[0], false);
+                        SeleccionarNodo(m_Vertices[1], false);
+                        Seleccionar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+
+                m_StartPointMov = evento.iP;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                if (m_Vertices[0].Hits(evento.iP, factor)) { // click sobre el nodo
+                        SeleccionarNodo(m_Vertices[0], true);
+                        SeleccionarNodo(m_Vertices[1], false);
+                        Seleccionar(false);
+
+                        dentro = true;
+                } else { // Click fuera del nodo
+                        SeleccionarNodo(m_Vertices[0], false);
+                }
+                if (!dentro && m_Vertices[1].Hits(evento.iP, factor)) { // click sobre el nodo
+                        SeleccionarNodo(m_Vertices[0], false);
+                        SeleccionarNodo(m_Vertices[1], true);
+                        Seleccionar(false);
+
+                        dentro = true;
+                } else { // Click fuera del nodo
+                        SeleccionarNodo(m_Vertices[1], false);
+                }
+
+                if (!dentro && HitTest(evento.iP.x, evento.iP.y, factor ) ) { // click sobre la recta
+                        if (evento.m_controlDown) { // Inversion de seleccion
+                                InvertirSeleccion();
+                        } else {
+                                Seleccionar(true);
+                        }
+
+                        dentro = true;
+                } else { // Click fuera del nodo
+                        if (!evento.m_controlDown) {
+                                Seleccionar(false);
+                        } else {
+                                ConsumirEvento();
+                                if (EstaSeleccionado()) {
+                                        m_MouseDown = true;
+                                        m_CentroAntiguo = m_Centro;
+                                        m_PosCursor = evento.iP;
+                                }
+                        }
+                }
+
+                if (dentro) {
+                        m_MouseDown = true;
+                        m_CentroAntiguo = m_Centro;
+                        m_PosCursor = evento.iP;
+                        ConsumirEvento();
+                }
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        m_MouseDown = false;
+                        ActualizarTimestampModificacion();
+                        ConsumirEvento();
+                }
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+                if (EventoConsumido()) {
+                        IluminarNodo(m_Vertices[0], false);
+                        IluminarNodo(m_Vertices[1], false);
+                        Iluminar(false);
+                        return;
+                }
+                bool dentro = false;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                m_PosCursor = evento.iP;
+
+                if (m_Vertices[0].Hits(evento.iP, factor)) {
+
+                        IluminarNodo(m_Vertices[0], true);
+                        IluminarNodo(m_Vertices[1], false);
+                        Iluminar(false);
+
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_Vertices[0], false);
+                }
+
+                if (m_Vertices[1].Hits(evento.iP, factor)) {
+
+                        IluminarNodo(m_Vertices[0], false);
+                        IluminarNodo(m_Vertices[1], true);
+                        Iluminar(false);
+
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_Vertices[1], false);
+                }
+
+                if (!dentro && HitTest(evento.iP.x, evento.iP.y, factor) ) {
+                        Iluminar(true);
+                        dentro = true;
+                } else {
+                        Iluminar(false);
+                }
+
+                if (dentro) {
+                        ConsumirEvento();
+                }
+                return;
+        }
+}
+
+void GNC::GCS::Widgets::WFlecha::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+bool GNC::GCS::Widgets::WFlecha::HitTest(float x, float y, const GNC::GCS::Vector& rel)
+{
+        bool hits = false;
+
+        GNC::GCS::Vector dpos(x,y);
+        if ( m_Vertices[0].DistanciaEuclideaCuadrado(m_Vertices[1]) / 4.0f > dpos.DistanciaEuclideaCuadrado(m_Vertices[0].PuntoMedio(m_Vertices[1]))) {
+
+                GNC::GCS::Vector vdir = m_Vertices[1] - m_Vertices[0];
+                GNC::GCS::Vector orto = (vdir / rel).VectorOrtogonal() * rel;
+
+                GNC::GCS::Vector inter = GNC::GCS::Vector::InterseccionEntreRectas(dpos, dpos + orto, m_Vertices[0], m_Vertices[1]);
+                GNC::GCS::Vector diff = (inter - dpos).ValorAbsoluto();
+                if ( (diff / rel).Norma2Cuadrado() < (m_Vertices[0].m_Size * m_Vertices[0].m_Size) ) {
+                        hits = true;
+                }
+        }
+        return hits;
+}
+
+bool GNC::GCS::Widgets::WFlecha::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+        return m_Vertices[0].DentroDePoligono2(vertices, numVertices) && m_Vertices[1].DentroDePoligono2(vertices, numVertices);
+}
+
+void GNC::GCS::Widgets::WFlecha::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        const GNC::GCS::Vector& escala = c->RelacionImagenPantalla();
+
+        glLineWidth(m_LineWidthProp);
+
+        if (m_Vertices[0].m_Iluminado) {
+                wDibujarElipseDegradado(m_Vertices[0], wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+        }
+
+        if (m_Vertices[1].m_Iluminado) {
+                wDibujarElipseDegradado(m_Vertices[1], wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+        }
+
+        float fsombrax, fsombray;
+
+        TVector vOrtogonal = ((m_Vertices[0] - m_Vertices[1]) / escala).VectorOrtonormal() * 15.0f;
+
+        if (m_Seleccionado && m_MouseDown) {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA_SELECCIONADO * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO * escala.y;
+                vOrtogonal *= WIDGET_INCREMENTO_DETALLE_SELECCIONADO;
+        } else {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA * escala.y;
+        }
+
+        float angulo = M_PI_4 / 2.0f;
+        TVector f0 = m_Vertices[1] + vOrtogonal.RotacionSobreZ(M_PI_2 + angulo) * escala;
+        TVector f1 = m_Vertices[1] + vOrtogonal.RotacionSobreZ(M_PI_2 - angulo) * escala;
+
+        //------------------------------------------------------------------------------------------
+        // Sombra del cuerpo de la flecha
+        wColorSombra.Aplicar();
+        glBegin(GL_LINES);
+        glVertex2d(m_Vertices[0].x + fsombrax, m_Vertices[0].y - fsombray);
+        glVertex2d(m_Vertices[1].x + fsombrax, m_Vertices[1].y - fsombray);
+        glEnd();
+
+        // Sombra de las aspas de la flecha
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(f0.x + fsombrax, f0.y - fsombray);
+        glVertex2d(m_Vertices[1].x + fsombrax, m_Vertices[1].y - fsombray);
+        glVertex2d(f1.x + fsombrax, f1.y - fsombray);
+        glEnd();
+
+        // Sombra de la cola
+        glPointSize(WIDGET_SIZE_PUNTO);
+        glBegin(GL_POINTS);
+        glVertex2d(m_Vertices[0].x + fsombrax, m_Vertices[0].y - fsombray);
+        glEnd();
+
+        // Dibujado de la flecha
+
+        // Cuerpo
+        wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINES);
+        glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+        glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+        glEnd();
+
+        // Aspas
+        wAplicarColor(m_Iluminado || m_Vertices[1].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINE_STRIP);
+        glVertex2d(f0.x, f0.y);
+        glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+        glVertex2d(f1.x, f1.y);
+        glEnd();
+
+        // Cola
+        wAplicarColor(m_Iluminado || m_Vertices[0].m_Iluminado, m_MouseDown, m_Seleccionado);
+        if (m_Seleccionado && m_MouseDown)
+                glPointSize(WIDGET_SIZE_PUNTO * WIDGET_INCREMENTO_DETALLE_SELECCIONADO);
+        else
+                glPointSize(WIDGET_SIZE_PUNTO);
+
+        glBegin(GL_POINTS);
+        glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+        glEnd();
+
+
+        //------------------------------------------------------------------------------------------
+        // Dibujado de la linea punteada de arrastre
+        if (m_MouseDown) {
+                glLineWidth(m_DraggingLineWidthProp);
+                glEnable(GL_LINE_STIPPLE);
+                wColorLineaArrastre.Aplicar();
+                glLineStipple(3, 0xAAAA);
+
+                GNC::GCS::Vector startPoint, endPoint;
+                if (m_Vertices[0].m_Seleccionado) {
+                        startPoint = m_Vertices[0];
+                        endPoint = m_Vertices[0] - (m_PosCursor - m_StartPointMov);
+                } else if (m_Vertices[1].m_Seleccionado) {
+                        startPoint = m_Vertices[1];
+                        endPoint = m_Vertices[1] - (m_PosCursor - m_StartPointMov);
+                } else { // Es el centro
+                        startPoint = m_CentroAntiguo;
+                        endPoint = m_Centro;
+                }
+
+                glBegin(GL_LINE_STRIP);
+                glVertex2d(startPoint.x, startPoint.y);
+                glVertex2d(endPoint.x, endPoint.y);
+                glEnd();
+
+                glDisable(GL_LINE_STIPPLE);
+        }
+}
+
+void GNC::GCS::Widgets::WFlecha::Seleccionar(bool seleccionado)
+{
+        if(m_Seleccionado != seleccionado) {
+                m_Seleccionado = seleccionado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WFlecha::Iluminar(bool iluminado)
+{
+        if(m_Iluminado != iluminado) {
+                m_Iluminado = iluminado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WFlecha::IluminarNodo( GNC::GCS::Nodo& nodo, bool iluminado)
+{
+        if(nodo.m_Iluminado != iluminado) {
+                nodo.m_Iluminado = iluminado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WFlecha::SeleccionarNodo( GNC::GCS::Nodo& nodo, bool seleccionado)
+{
+        if(nodo.m_Seleccionado != seleccionado) {
+                nodo.m_Seleccionado = seleccionado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WFlecha::Ocultar(bool oculto)
+{
+        if(oculto != m_Oculto) {
+                m_Oculto = oculto;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WFlecha::Recalcular()
+{
+        //std::cout << "--- Recalculando... " << std::endl;
+        m_Modificado = true;
+        m_Diff = m_Vertices[1] - m_Vertices[0];
+        m_Centro = m_Vertices[0].PuntoMedio(m_Vertices[1]);
+        m_Pendiente = m_Diff.Pendiente();
+        m_Angulo = m_Diff.AnguloSobreAbscisa();
+        m_Distancia = m_Vertices[0].DistanciaEuclidea(m_Vertices[1]);
+        //std::cout << *this << std::endl;
+
+        std::string text;
+        if (m_pManager->GetRendererActivo() != NULL && m_pManager->GetRendererActivo()->m_pIOverlay != NULL) {
+                text = m_pManager->GetRendererActivo()->m_pIOverlay->ImprimirOverlay(this, m_pManager->GetRendererActivo()->m_pImageViewer);
+        }
+        if (text.empty()) {
+                m_pTextBox->Ocultar(true);
+        } else {
+                m_pTextBox->Ocultar(false);
+                m_pTextBox->SetTexto(text);
+        }
+}
+
+void GNC::GCS::Widgets::WFlecha::OffscreenRender(GNC::GCS::Contexto3D* c)
+{
+        const GNC::GCS::Vector& escala = c->RefRelacionMundoPantallaOffscreen();
+        TVector Vertices[2] = { c->Reproyectar(m_Vertices[0]) * c->factorReescalado, c->Reproyectar(m_Vertices[1]) * c->factorReescalado};
+
+        TVector vOrtogonal = (Vertices[0] - Vertices[1]).VectorOrtonormal() * escala * 10.0f;
+
+        float angulo = M_PI_4 / 2.0f;
+        TVector f0 = Vertices[1] + vOrtogonal.RotacionSobreZ(M_PI_2 + angulo);
+        TVector f1 = Vertices[1] + vOrtogonal.RotacionSobreZ(M_PI_2 - angulo);
+
+        // Dibujado de la flecha
+
+        // Color del cuerpo
+        wColorNormal.AplicarCairo(c->cr);
+
+        // Punto de origen de la flecha
+        cairo_arc(c->cr, Vertices[0].x, Vertices[0].y, (WIDGET_SIZE_PUNTO / 2.0f) * escala.x, 0, M_2PI);
+        cairo_fill(c->cr);
+
+        // Cuerpo
+        cairo_move_to(c->cr, Vertices[0].x, Vertices[0].y);
+        cairo_line_to(c->cr, Vertices[1].x, Vertices[1].y);
+        cairo_stroke(c->cr);
+
+        // Aspas
+        cairo_move_to(c->cr, f0.x, f0.y);
+        cairo_line_to(c->cr, Vertices[1].x, Vertices[1].y);
+        cairo_line_to(c->cr, f1.x, f1.y);
+        cairo_stroke(c->cr);
+}
diff --git a/cadxcore/widgets/wflecha.h b/cadxcore/widgets/wflecha.h
new file mode 100644
index 0000000..89a1280
--- /dev/null
+++ b/cadxcore/widgets/wflecha.h
@@ -0,0 +1,223 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/iwidgets.h>
+#include <widgets/openglhelper.h>
+#include <api/widgetserializable.h>
+
+// Forward Declarations
+namespace GNC
+{
+namespace GCS
+{
+class IWidgetsManager;
+}
+}
+class vtkImageData;
+// Forward Declarations
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+class WFlecha;
+class WTextBox;
+
+class WFlechaBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Nodo   TNodo;
+        typedef GNC::GCS::Matriz TMatriz;
+
+        WFlechaBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask);
+
+        ~WFlechaBuilder();
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+
+protected:
+
+        bool                          m_MouseDown;
+        WFlecha*                      m_pFlechaTemp;
+
+};
+
+class WFlecha : public GNC::GCS::Widgets::IWidget, public GNC::GCS::Widgets::IWidgetSerializable
+{
+
+public:
+        GNC::GCS::Nodo m_Vertices[2];
+
+//region "Constructor y destructor"
+
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Matriz TMatriz;
+
+        GNC::GCS::Vector m_StartPointMov;
+
+        WFlecha(IWidgetsManager* pManager, long vid, GNC::GCS::Nodo nodos[2], GNC::GCS::Contexto3D* c, const char* nombre = "");
+
+        ~WFlecha();
+
+//endregion
+
+        //region "Serializado y desserializado"
+        WFlecha(IWidgetsManager* pManager, long vid, wxXmlNode* nodo);
+
+        void initTextBox(double rotation = 0.0);
+
+        wxXmlNode* Serializar(const std::string& nombreMedico);
+
+        //endregion
+
+        virtual bool EsMarcador() const
+        {
+                return true;
+        }
+
+        virtual void GetBoundingBox(GNC::GCS::Vector& bb0, GNC::GCS::Vector& bb1) const
+        {
+                m_Vertices[0].IniciarBoundingBox(bb0, bb1);
+                m_Vertices[1].ExtenderBoundingBox(bb0, bb1);
+        }
+
+        virtual bool DelimitaTendencia() const
+        {
+                return true;
+        }
+
+        virtual void GetPuntoAnclaje(GNC::GCS::Vector& punto, const GNC::GCS::Vector& escala) const
+        {
+                if (m_Vertices[0].m_Seleccionado || m_Vertices[0].m_Iluminado) {
+                        punto = m_Vertices[0] + GNC::GCS::Vector(10.0f, -10.0f) * escala;
+                } else {
+                        punto = m_Vertices[1] + GNC::GCS::Vector(10.0f, -10.0f) * escala;
+                }
+        }
+
+        //region Propiedades exclusivas de widgets de tendencia
+
+        virtual void GetDistancia(GNC::GCS::Vector& distancia) const
+        {
+                distancia = m_Vertices[1] - m_Vertices[0];
+        }
+
+        virtual void GetRecorrido(std::list<GNC::GCS::Vector>& recorrido) const
+        {
+                recorrido.push_back(GNC::GCS::Vector(m_Vertices[0]));
+                recorrido.push_back(GNC::GCS::Vector(m_Vertices[1]));
+        }
+        //endregion
+
+
+        //region "Interfaz especifica"
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return true;
+        }
+
+        virtual bool ReservaRecursos() const
+        {
+                return true;
+        }
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void OffscreenRender(Contexto3D* c);
+
+        virtual void Seleccionar(bool seleccionado);
+
+        virtual void Iluminar(bool iluminado);
+
+        virtual void IluminarNodo( GNC::GCS::Nodo& nodo, bool iluminado);
+
+        virtual void SeleccionarNodo( GNC::GCS::Nodo& nodo, bool seleccionado);
+
+        virtual void Ocultar(bool oculto);
+
+        virtual float Distancia()
+        {
+                return m_Distancia;
+        }
+
+        //endregion
+
+        //region "Estado interno"
+private:
+        bool            m_MouseDown;
+        //endregion
+
+        //region "Propiedades geometricas"
+private:
+        GNC::GCS::Nodo   m_Centro;
+        GNC::GCS::Vector m_CentroAntiguo;
+        GNC::GCS::Vector m_Diff;
+        float            m_Angulo;
+        float            m_Pendiente;
+
+        WTextBox*                m_pTextBox;
+
+
+        friend std::ostream& operator<<(std::ostream& out, const WFlecha& w)
+        {
+                out << "[ P0=" << w.m_Vertices[0] << ", P1=" << w.m_Vertices[1] <<
+                    ", Centro=" << w.m_Centro << ", Angulo=" << w.m_Angulo << "=" << w.m_Angulo*180.0f/M_PI <<
+                    ", Pendiente=" << w.m_Pendiente << ", Longitud=" << w.m_Distancia << ", Cursor=" << w.m_PosCursor << " ]";
+                return out;
+        }
+
+public:
+        float            m_Distancia;
+
+public:
+
+        void Recalcular();
+
+public:
+        //endregion
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wfreeform.cpp b/cadxcore/widgets/wfreeform.cpp
new file mode 100644
index 0000000..32b24fb
--- /dev/null
+++ b/cadxcore/widgets/wfreeform.cpp
@@ -0,0 +1,558 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/xml/xml.h>
+#include <api/globals.h>
+#include <api/icontexto.h>
+#include "wfreeform.h"
+#include "wtextbox.h"
+#include <api/internationalization/internationalization.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/ievento.h>
+#include <api/ioverlay.h>
+#include "main/managers/widgetsmanager.h"
+
+
+#include <iterator>
+#include <vtkgl.h>
+#include <api/westilo.h>
+#include <cmath>
+
+//region "Implementacion de WPoligonoBuilder"
+
+GNC::GCS::Widgets::WFreeFormBuilder::WFreeFormBuilder( GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask)
+{
+        m_NumNodos = 0;
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        SetRadioNodo(5.0f);
+        m_pPoligonoCreado = NULL;
+}
+
+GNC::GCS::Widgets::WFreeFormBuilder::~WFreeFormBuilder()
+{
+        m_Vertices.clear();
+}
+
+void GNC::GCS::Widgets::WFreeFormBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+                m_Estado = WBS_Ninguno;
+                m_PosCursor= evento.iP;
+
+
+                if(m_Vertices.size()>2) {
+                        m_pPoligonoCreado = new WFreeForm(m_pManager, evento.c->GetRenderer()->GetVID(), m_Vertices, m_RadioNodo, evento.c, "FreeForm");
+                        m_pManager->InsertarWidget(m_pPoligonoCreado);
+                        m_pManager->LanzarEventoCreacion(m_pPoligonoCreado);
+                        ConsumirEvento();
+                }
+                m_Vertices.clear();
+                m_pManager->Modificado();
+
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+
+                m_MouseDown = true;
+                //aviso que han soltado
+                m_pManager->Modificado();
+                m_Estado = WBS_Creando;
+                ConsumirEvento();
+
+        } else if (evento.Dragging() && m_MouseDown) {
+
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+
+                if (!m_Vertices.empty() && ((evento.iP - m_PosCursor)/evento.c->RelacionImagenPantalla()).Norma2Cuadrado() < m_DistanciaMinimaCuadrado) {
+                        return;
+                }
+                m_PosCursor = evento.iP;
+                m_Vertices.push_back(m_PosCursor);
+                m_pManager->Modificado();
+                ConsumirEvento();
+        } else if( evento.Moving() ) {
+                m_PosCursor= evento.iP;
+                m_Estado = WBS_Ninguno;
+                ConsumirEvento();
+        }
+}
+
+void GNC::GCS::Widgets::WFreeFormBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado& /*evento*/)
+{
+        GTRACE("GNC::GCS::Widgets::WPoligonoBuilder::OnKeyEvents(wxKeyEvent&)");
+}
+
+void GNC::GCS::Widgets::WFreeFormBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+
+        if (m_Estado != WBS_Creando) {
+                return;
+        }
+
+        glLineWidth(m_LineWidthProp);
+        wColorNormal.Aplicar();
+
+        VerticesPoligono::iterator prev = m_Vertices.begin();
+        if (prev != m_Vertices.end()) {
+                VerticesPoligono::iterator curr = prev;
+                ++curr;
+                for (; curr != m_Vertices.end(); ++curr) {
+                        glBegin(GL_LINES);
+                        glVertex2d((*prev).x, (*prev).y);
+                        glVertex2d((*curr).x, (*curr).y);
+                        glEnd();
+                        prev = curr;
+                }
+        }
+
+
+        if (m_Vertices.size() > 2) {
+                glEnable(GL_LINE_STIPPLE);
+                glColor4f(0.7f, 0.7f, 0.0f, 1.0);
+                glLineStipple(3, 0xAAAA);
+                glBegin(GL_LINES);
+                glVertex2d(m_Vertices.front().x, m_Vertices.front().y);
+                glVertex2d(m_Vertices.back().x, m_Vertices.back().y);
+                glEnd();
+                glDisable(GL_LINE_STIPPLE);
+        }
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WFreeFormBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_CREAR_POLIGONO;
+}
+
+//endregion
+
+//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WFreeForm::WFreeForm(IWidgetsManager* pManager, unsigned int vid, VerticesPoligono& vertices, float radioNodo, GNC::GCS::Contexto3D* c, const char* nombre) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre,0,TID_USER_ANNOTATION_WIDGET),
+        GNC::GCS::Widgets::IWidgetSerializable(),
+        m_pTextBox(NULL)
+{
+        m_Vertices = vertices;
+
+        m_RadioNodo = radioNodo;
+
+        initTextBox(c->rotacion);
+
+        Recalcular();
+        m_MouseDown = false;
+        m_PosCursor = m_Centro;
+}
+
+GNC::GCS::Widgets::WFreeForm::~WFreeForm()
+{
+        m_pManager->EliminarWidget(m_pTextBox, false);
+        m_pManager->Modificado();
+}
+
+//endregion
+
+//region "Serializado y desserializado"
+GNC::GCS::Widgets::WFreeForm::WFreeForm(IWidgetsManager* pManager, long vid, wxXmlNode* nodo, float radioNodo): GNC::GCS::Widgets::IWidget(pManager, vid, "FreeForm"), GNC::GCS::Widgets::IWidgetSerializable(nodo), m_AreaMetrica(0),
+        m_pTextBox(NULL)
+{
+        if(nodo->GetName() != wxT("free_form")) {
+                std::cerr<< "Ha ocurrido un error al desserializar el widget free_form"<<std::endl;
+        }
+
+        wxXmlNode *child = nodo->GetChildren();
+        GNC::GCS::Nodo nodoTmp;
+        while (child) {
+                nodoTmp = GNC::GCS::Nodo::Deserializar(child);
+                GNC::GCS::Vector v(nodoTmp);
+                m_Vertices.push_back(v);
+                child = child->GetNext();
+        }
+        initTextBox();
+
+        m_RadioNodo = radioNodo;
+        m_MouseDown = false;
+        Recalcular();
+        m_PosCursor = m_Centro;
+}
+
+wxXmlNode* GNC::GCS::Widgets::WFreeForm::Serializar(const std::string& nombreMedico)
+{
+        wxXmlNode* resultado = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxT("free_form"));
+
+
+        int i=0;
+        for (VerticesPoligono::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                wxXmlNode* nodo = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxString::Format(wxT("nodo%d"), (int) i));
+                nodo->AddAttribute(new wxXmlProperty(wxT("x"),wxString::Format(wxT("%f"),(*it).x)));
+                nodo->AddAttribute(new wxXmlProperty(wxT("y"),wxString::Format(wxT("%f"),(*it).y)));
+                resultado->AddChild(nodo);
+                i++;
+        }
+        //metadatos
+        SerializarMetadatos(resultado,nombreMedico);
+        return resultado;
+}
+//endregion
+
+void GNC::GCS::Widgets::WFreeForm::initTextBox(double rotation)
+{
+        if (m_pTextBox == NULL) {
+                //calculate bottom right corner to set label...
+                GNC::GCS::Vector bb[2];
+                for (VerticesPoligono::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                        if (it == m_Vertices.begin()) {
+                                (*it).IniciarBoundingBox(bb);
+                        } else {
+                                (*it).ExtenderBoundingBox(bb);
+                        }
+                }
+                GNC::GCS::Vector pm = bb[0].PuntoMedio(bb[1]);
+                bb[1].RotarSobreZ( pm, rotation);
+
+                m_pTextBox = new WTextBox(m_pManager, m_VID, bb[1], WTextBox::TNM_Dynamic, "polygonBox", "");
+                m_pManager->InsertarWidget(m_pTextBox);
+        }
+}
+
+void GNC::GCS::Widgets::WFreeForm::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if(EstaOculto()) {
+                return;
+        }
+        //------------------------------------------------------
+        // Leaving
+        if (evento.Leaving()) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        else if (evento.Dragging() && m_MouseDown) {
+                Vector delta = evento.iP - m_PosCursor;
+                m_PosCursor = evento.iP;
+
+                if (EstaSeleccionado()) {
+                        for (VerticesPoligono::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                                (*it) += delta;
+                        }
+
+                        Recalcular();
+
+                        Modificar(true);
+
+                        LanzarEventoModificacion();
+                }
+
+                ConsumirEvento();
+
+                return;
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        Seleccionar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                if (HitTest(evento.iP.x, evento.iP.y, evento.c->RelacionImagenPantalla())) {
+                        dentro = true;
+                        if (evento.m_controlDown) { // Inversion de seleccion
+                                InvertirSeleccion();
+                        } else {
+                                Seleccionar(true);
+                        }
+                } else {
+                        if (!evento.m_controlDown) {
+                                Seleccionar(false);
+                        } else {
+                                ConsumirEvento();
+                                if (EstaSeleccionado()) {
+                                        m_MouseDown = true;
+                                        m_PosCursor= evento.iP;
+                                }
+                        }
+                }
+
+                if (dentro) {
+                        m_MouseDown = true;
+                        m_PosCursor= evento.iP;
+                        m_Modificado = true;
+                        ConsumirEvento();
+                }
+
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        ActualizarTimestampModificacion();
+                        m_MouseDown = false;
+                        ConsumirEvento();
+                }
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+
+                if (EventoConsumido()) {
+                        Iluminar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_PosCursor= evento.iP;
+
+                if (HitTest(evento.iP.x, evento.iP.y, evento.c->RelacionImagenPantalla())) {
+                        Iluminar(true);
+                        dentro = true;
+                } else {
+                        Iluminar(false);
+                }
+                if (dentro) {
+                        ConsumirEvento();
+                }
+        }
+
+}
+
+void GNC::GCS::Widgets::WFreeForm::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+bool GNC::GCS::Widgets::WFreeForm::HitTest(const GNC::GCS::Vector& p0, const GNC::GCS::Vector& p1, const GNC::GCS::Vector& cursor, const GNC::GCS::Vector& rel)
+{
+        bool hits = false;
+
+        if ( p0.DistanciaEuclideaCuadrado(p1) / 4.0f > cursor.DistanciaEuclideaCuadrado(p0.PuntoMedio(p1))) {
+
+                GNC::GCS::Vector vdir = p1 - p0;
+                GNC::GCS::Vector orto = (vdir / rel).VectorOrtogonal() * rel;
+
+                GNC::GCS::Vector inter = GNC::GCS::Vector::InterseccionEntreRectas(cursor, cursor + orto, p0, p1);
+                GNC::GCS::Vector diff = (inter - cursor).ValorAbsoluto();
+                if ( (diff / rel).Norma2Cuadrado() < (m_RadioNodo * m_RadioNodo) ) {
+                        hits = true;
+                }
+        }
+        return hits;
+}
+
+bool GNC::GCS::Widgets::WFreeForm::HitTest(float x, float y, const GNC::GCS::Vector& u)
+{
+        //distance to each line....
+        bool hits = false;
+        if (m_Vertices.empty())
+                return false;
+
+        GNC::GCS::Vector point(x, y);
+        hits = HitTest(m_Vertices.front(), m_Vertices.back(), point, u);
+
+        VerticesPoligono::iterator prev = m_Vertices.begin();
+        VerticesPoligono::iterator it = prev;
+        ++it;
+
+        while (!hits && (it != m_Vertices.end())) {
+                hits = HitTest((*prev), (*it), point, u);
+                prev = it;
+                ++it;
+        }
+        return hits;
+}
+
+bool GNC::GCS::Widgets::WFreeForm::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+        bool hits = true;
+
+        for (VerticesPoligono::iterator it = m_Vertices.begin(); hits && it != m_Vertices.end(); ++it) {
+                if (!(*it).DentroDePoligono2(vertices, numVertices) ) {
+                        hits = false;
+                }
+        }
+
+        return hits;
+}
+
+void GNC::GCS::Widgets::WFreeForm::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+
+        GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+        glLineWidth(m_LineWidthProp);
+
+        float fsombrax, fsombray;
+
+        if (m_Seleccionado && m_MouseDown) {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA_SELECCIONADO * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO * escala.y;
+        } else {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA * escala.y;
+        }
+
+        wColorSombra.Aplicar();
+        glBegin(GL_LINE_LOOP);
+        for (VerticesPoligono::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                glVertex2d((*it).x + fsombrax, (*it).y - fsombray);
+        }
+        glEnd();
+
+        // Dibujo el poligono
+        wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINE_LOOP);
+        for (VerticesPoligono::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                glVertex2d((*it).x, (*it).y);
+        }
+        glEnd();
+        m_Modificado = false;
+}
+
+void GNC::GCS::Widgets::WFreeForm::Seleccionar(bool seleccionado)
+{
+        if (m_Seleccionado != seleccionado) {
+                m_Seleccionado = seleccionado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WFreeForm::Iluminar(bool iluminado)
+{
+        if (m_Iluminado != iluminado) {
+                m_Iluminado = iluminado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WFreeForm::Ocultar(bool oculto)
+{
+        if(oculto != m_Oculto) {
+                m_Oculto = oculto;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WFreeForm::Recalcular()
+{
+        m_Centro = GNC::GCS::Vector::Centroide(m_Vertices);
+        m_Perimetro = GNC::GCS::Vector::PerimetroDePoligono(m_Vertices);
+
+        std::string text;
+        if (m_pManager->GetRendererActivo() != NULL && m_pManager->GetRendererActivo()->m_pIOverlay != NULL) {
+                text = m_pManager->GetRendererActivo()->m_pIOverlay->ImprimirOverlay(this, m_pManager->GetRendererActivo()->m_pImageViewer);
+        }
+        if (text.empty()) {
+                m_pTextBox->Ocultar(true);
+        } else {
+                m_pTextBox->Ocultar(false);
+                m_pTextBox->SetTexto(text);
+        }
+}
+
+//endregion
+void GNC::GCS::Widgets::WFreeForm::InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades)
+{
+        TMapaPropiedades& primerMapa = listaMapaPropiedades.front();
+        {
+                std::ostringstream ostr;
+                ostr <<  m_Centro;
+                primerMapa[_Std("Center (I)")] = ostr.str();
+        }
+
+        {
+                std::stringstream out;
+                out << PuntoToStringMundo(m_Centro);
+                primerMapa[_Std("Center (M)")] = out.str();
+        }
+
+        {
+                std::ostringstream ostr;
+                ostr <<  m_Vertices.size();
+                primerMapa[_Std("Number of Vertex")] = ostr.str();
+        }
+}
+
+void GNC::GCS::Widgets::WFreeForm::OffscreenRender(GNC::GCS::Contexto3D* c)
+{
+        if(m_Vertices.size() < 2) {
+                return;
+        }
+
+        VerticesPoligono Vertices;
+
+        for (VerticesPoligono::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                Vertices.push_back( c->Reproyectar(*it) * c->factorReescalado );
+        }
+
+        cairo_set_line_width(c->cr, m_LineWidthProp);
+
+        // Color del cuerpo
+        wColorNormal.AplicarCairo(c->cr);
+
+        // Dibujado del cuerpo
+        for (VerticesPoligono::iterator it = Vertices.begin(); it != Vertices.end(); ++it) {
+                if(it == Vertices.begin()) {
+                        cairo_move_to(c->cr, (*it).x, (*it).y);
+                }
+                cairo_line_to(c->cr, (*it).x, (*it).y);
+        }
+        cairo_line_to(c->cr, Vertices.front().x, Vertices.front().y);
+        cairo_stroke(c->cr);
+}
+
+float GNC::GCS::Widgets::WFreeForm::GetAreaMetrica() const
+{
+        if (GNC::GCS::Vector::EsPoligonoSimple(m_Vertices)) {
+                return GNC::GCS::Vector::AreaDePoligono(m_Vertices);
+        } else {
+                return std::numeric_limits<float>::quiet_NaN();
+        }
+}
+
diff --git a/cadxcore/widgets/wfreeform.h b/cadxcore/widgets/wfreeform.h
new file mode 100644
index 0000000..25a05c5
--- /dev/null
+++ b/cadxcore/widgets/wfreeform.h
@@ -0,0 +1,227 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/widgetserializable.h>
+#include <vector>
+
+class vtkImageData;
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+typedef std::list<GNC::GCS::Vector> VerticesPoligono;
+
+class WFreeForm;
+class WTextBox;
+
+class WFreeFormBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        WFreeFormBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask);
+
+        ~WFreeFormBuilder();
+
+        void SetRadioNodo(float radio)
+        {
+                m_RadioNodo = radio;
+                m_DistanciaMinimaCuadrado = radio * 2;
+                m_DistanciaMinimaCuadrado *= m_DistanciaMinimaCuadrado;
+
+        }
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+protected:
+
+        GNC::GCS::Vector                          m_PosCursor;
+        VerticesPoligono                          m_Vertices;
+        GNC::GCS::Widgets::IWidgetBuilder::Estado m_Estado;
+
+        int                            m_NumNodos;
+        bool                           m_MouseDown;
+        float                          m_RadioNodo;
+        float                          m_DistanciaMinimaCuadrado;
+        GNC::GCS::Widgets::WFreeForm*  m_pPoligonoCreado;
+
+};
+
+
+
+class WFreeForm : public GNC::GCS::Widgets::IWidget, public GNC::GCS::Widgets::IWidgetSerializable
+{
+
+//region "Constructor y destructor"
+public:
+        WFreeForm(IWidgetsManager* pManager, unsigned int vid, VerticesPoligono& vertices, float radioNodo, GNC::GCS::Contexto3D* c, const char* nombre = "");
+
+        ~WFreeForm();
+
+//endregion
+        //region "Serializado y desserializado"
+        WFreeForm(IWidgetsManager* pManager, long vid, wxXmlNode* nodo, float radioNodo = 5.0f);
+
+        void initTextBox(double rotation = 0.0);
+
+        wxXmlNode* Serializar(const std::string& nombreMedico);
+        //endregion
+
+        virtual bool EsMarcador() const
+        {
+                return true;
+        }
+
+        virtual bool DelimitaArea() const
+        {
+                return true;
+        }
+
+        virtual bool ContieneFast(const GNC::GCS::Vector& punto) const
+        {
+                return punto.DentroDePoligono2(m_Vertices);
+        }
+
+        virtual void GetBoundingBox(GNC::GCS::Vector& bb0, GNC::GCS::Vector& bb1) const
+        {
+                if (!m_Vertices.empty()) {
+
+                        VerticesPoligono::const_iterator it = m_Vertices.begin();
+                        (*it).IniciarBoundingBox(bb0, bb1);
+                        for (; it != m_Vertices.end(); ++it) {
+                                (*it).ExtenderBoundingBox(bb0, bb1);
+                        }
+                }
+        }
+
+        virtual void GetPosicion(GNC::GCS::Vector& posicion) const
+        {
+                posicion = m_Centro;
+        }
+
+        virtual void GetPuntoAnclaje(GNC::GCS::Vector& punto, const GNC::GCS::Vector& escala) const
+        {
+                punto = m_PosCursor + (GNC::GCS::Vector(10.0f, -10.0f) * escala);
+        }
+
+        virtual void GetCentro(GNC::GCS::Vector& centro) const
+        {
+                centro = m_Centro;
+        }
+
+
+        virtual float GetAreaMetrica() const;
+
+        virtual float GetPerimetro() const
+        {
+                return m_Perimetro;
+        }
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return true;
+        }
+
+
+//region "Interfaz especifica"
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        bool HitTest(const GNC::GCS::Vector& p0, const GNC::GCS::Vector& p1, const GNC::GCS::Vector& cursor, const GNC::GCS::Vector& rel);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void OffscreenRender(Contexto3D* c);
+
+        virtual void Seleccionar(bool seleccionado);
+
+        virtual void Iluminar(bool iluminado);
+
+        virtual void Ocultar(bool oculto);
+
+//endregion
+
+//region "Estado interno"
+private:
+        bool                    m_MouseDown;
+        GNC::GCS::Vector m_PosCursor;
+//endregion
+
+//region "Propiedades geometricas"
+private:
+
+        VerticesPoligono  m_Vertices;
+        float                    m_RadioNodo;
+
+        GNC::GCS::Vector m_Centro;
+        float                    m_AreaMetrica;
+        float                    m_Perimetro;
+        WTextBox*                m_pTextBox;
+
+
+        friend std::ostream & operator<<(std::ostream& out, const WFreeForm& /*w*/)
+        {
+                return out;
+        }
+
+        void Recalcular();
+
+public:
+        virtual void GetVertices(std::list<GNC::GCS::Vector>& vertices) const
+        {
+                for (VerticesPoligono::const_iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                        vertices.push_back(*it);
+                }
+        }
+
+        void GetNodos(std::list<GNC::GCS::Nodo>& vertices)
+        {
+                for (VerticesPoligono::const_iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                        vertices.push_back(*it);
+                }
+        }
+
+//endregion
+
+        virtual void InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades);
+
+private:
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wlupa.cpp b/cadxcore/widgets/wlupa.cpp
new file mode 100644
index 0000000..6c4e004
--- /dev/null
+++ b/cadxcore/widgets/wlupa.cpp
@@ -0,0 +1,807 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <cmath>
+#include <cstring>
+
+#include <api/globals.h>
+#include <api/ievento.h>
+#include <api/icontexto.h>
+#include <api/iwidgetsmanager.h>
+#include <api/iwidgetsrenderer.h>
+#include <eventos/modificacionimagen.h>
+#include <api/math/geometry3d.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/westilo.h>
+
+#include "wlupa.h"
+
+
+#include <vtkgl.h>
+#include <vtkImageData.h>
+#include <vtkImageActor.h>
+#include <vtkPointData.h>
+#include <vtkBMPWriter.h>
+#include <vtk/vtkginkgoimageviewer.h>
+
+#include <wx/defs.h>
+
+//region "Implementacion de WBuilder"
+
+GNC::GCS::Widgets::WLupaBuilder::WLupaBuilder(GNC::GCS::IWidgetsManager* pManager, GNC::GCS::Widgets::ModoLupa modo,
+                const GNC::GCS::TriggerButton& buttonMask, long gid) :
+        GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid), IObservadorWidget(-1, gid)
+{
+        m_ModoActivo = modo;
+        m_pLupaActiva = NULL;
+
+        m_pManager->InsertarObservador(this);
+
+        // Comprobamos si existe alguna lupa para esta vista, y de ser asi la asociamos.
+        bool notfound = true;
+        for( GNC::GCS::ListaWidgets::iterator it = m_pManager->GetListaWidgets().begin(); notfound && it != m_pManager->GetListaWidgets().end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = *it;
+                if (w->GetVID() == -1 && w->GetGID() == m_GID) {
+                        m_pLupaActiva = dynamic_cast<GNC::GCS::Widgets::WLupa*> (w);
+                        if (m_pLupaActiva != NULL) {
+                                m_pLupaActiva->SetModo(m_ModoActivo);
+                                m_pLupaActiva->SetRendererActivo(m_pManager->GetRendererActivo());
+                                notfound = true;
+                        }
+                }
+        }
+}
+
+GNC::GCS::Widgets::WLupaBuilder::~WLupaBuilder()
+{
+        m_pManager->EliminarObservador(this);
+}
+
+void GNC::GCS::Widgets::WLupaBuilder::OnWidgetDestruido(GNC::GCS::Widgets::IWidget* w)
+{
+        if (m_pLupaActiva == w) {
+                m_pLupaActiva = NULL;
+        }
+}
+
+void GNC::GCS::Widgets::WLupaBuilder::SetModo(GNC::GCS::Widgets::ModoLupa modo)
+{
+        m_ModoActivo = modo;
+        if (m_pLupaActiva != NULL) {
+                m_pLupaActiva->SetModo(m_ModoActivo);
+        }
+}
+
+//region "Interfaz especifica"
+void GNC::GCS::Widgets::WLupaBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+
+        else if (evento.ButtonDown(m_ButtonMask)) {
+                m_PosicionCursor= evento.iP;
+                if (m_pLupaActiva == NULL) {
+                        const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+                        m_pLupaActiva = new WLupa(evento.c->GetRenderer(), GNC::GCS::Vector(factor.x, factor.y), m_PosicionCursor, m_ModoActivo, m_pManager, -1, "Lupa", m_GID);
+                        GNC::GCS::Events::EventoModificacionImagen evt2(m_pManager->GetVista());
+                        GNC::GCS::IEventsController::Instance()->Registrar(m_pLupaActiva, evt2);
+                        m_pManager->InsertarWidget(m_pLupaActiva, true);
+                        m_pLupaActiva->SetMouseDown(true);
+                        m_pLupaActiva->OnMouseEvents(evento);
+                        m_pLupaActiva->SetPosCursor(m_PosicionCursor);
+                        m_pLupaActiva->DesplazarA(m_PosicionCursor);
+
+                } else {
+                        m_pLupaActiva->SetRendererActivo(evento.c->GetRenderer());
+                        m_pLupaActiva->DesplazarA(m_PosicionCursor);
+                        m_pLupaActiva->SetMouseDown(true);
+                        m_pLupaActiva->OnMouseEvents(evento);
+                }
+
+                ConsumirEvento();
+        }
+
+        GTRACE("GNC::GCS::Widgets::WLupaBuilder::OnMouseEvents(wxMouseEvent&)");
+}
+
+void GNC::GCS::Widgets::WLupaBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+        GTRACE("GNC::GCS::Widgets::WLupaBuilder::OnKeyEvents(wxKeyEvent&)");
+}
+
+void GNC::GCS::Widgets::WLupaBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+        return;
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WLupaBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_LUPA;
+}
+
+//endregion
+
+//-----------------------------------------------------------------------------------------------
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WLupa::WLupa(GNC::GCS::IWidgetsRenderer* pRenderer, const GNC::GCS::Vector& relacionImagenPantalla, GNC::GCS::Vector& puntoAnclaje,
+                                ModoLupa modo, IWidgetsManager* pManager, long vid, const char* nombre, long gid) :
+        GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid),
+        m_LDown(false),
+        m_RDown(false),
+        m_Dentro(false)
+{
+        m_TopLevel = true;
+
+        m_ModoActivo = modo;
+        m_MouseDown = false;
+        m_pRenderer = pRenderer;
+
+        m_RelacionImagenPantalla = relacionImagenPantalla;
+
+        m_RadioLente          = 75.0f; // 75 pixels-pantalla
+        m_GrosorLupa          = 10.0f; // 10 pixels-pantalla
+        m_GrosorMango         = 30.0f; // 30 pixels-pantalla
+
+        m_AnguloPosAsa        = (M_PI / 4.0f); // 314 grados ( 45 grados )
+        m_AnguloAsa           = M_PI / 24.0f; // 7.5 grados
+
+        m_NumVertices = 60;
+        m_AnguloVertices = (float)M_2PI / (float)m_NumVertices;
+        m_VCoordsInteriores = new GNC::GCS::Vector[m_NumVertices];
+        m_VInteriores = new GNC::GCS::Vector[m_NumVertices];
+        m_VExteriores = new GNC::GCS::Vector[m_NumVertices];
+
+
+        m_PosicionCursor = puntoAnclaje;
+
+        GNC::GCS::Vector vDir = GNC::GCS::Vector::VectorDeRotacion(m_AnguloPosAsa);
+        float radio = (m_RadioLente + m_GrosorLupa);
+        GNC::GCS::Vector offset = (vDir * radio) / relacionImagenPantalla.NormaInfinito() ;
+
+        m_Centro.Asignar(-offset.x, -offset.y);
+
+        Recalcular();
+
+}
+
+GNC::GCS::Widgets::WLupa::~WLupa()
+{
+        delete[] m_VCoordsInteriores;
+        m_VCoordsInteriores = NULL;
+        delete[] m_VInteriores;
+        m_VInteriores = NULL;
+        delete[] m_VExteriores;
+        m_VExteriores = NULL;
+}
+
+//endregion
+
+//region "Interfaz especifica"
+
+void GNC::GCS::Widgets::WLupa::SetModo(GNC::GCS::Widgets::ModoLupa modo)
+{
+        if (m_ModoActivo != modo) {
+                m_ModoActivo = modo;
+                Modificar(true);
+        }
+}
+
+void GNC::GCS::Widgets::WLupa::SetRendererActivo( GNC::GCS::IWidgetsRenderer* r)
+{
+        if (m_pRenderer != r) {
+                if (m_pRenderer != NULL) {
+                        m_pRenderer->Modificar(true);
+                }
+                m_pRenderer = r;
+        }
+}
+
+
+//endregion
+
+//region "Interfaz generica"
+
+void GNC::GCS::Widgets::WLupa::Modificar(bool modificar)
+{
+        m_Modificado = modificar;
+        if (m_Modificado && m_pRenderer != NULL) {
+                m_pRenderer->Modificar(true);
+        }
+
+}
+
+void GNC::GCS::Widgets::WLupa::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if(m_Oculto || evento.c == NULL || evento.c->GetRenderer() != m_pRenderer) {
+                return;
+        }
+
+        //std::cerr << "GNC::GCS::Widgets::WLupa::OnMouseEvents(" << evento.c << ")" << std::endl;
+
+        if(EstaOculto()) {
+                return;
+        }
+        //------------------------------------------------------
+        // Leaving
+        if (evento.Leaving() ) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        else if (evento.Dragging() && m_MouseDown) {
+
+                //if (EstaSeleccionado()) {
+                Vector delta = evento.iP - m_PosCursor;
+                m_PosCursor = evento.iP ;
+
+                Desplazar(delta);
+                ConsumirEvento();
+                //}
+                return;
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        Seleccionar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_PosCursor= evento.iP;
+
+                if (HitTest(evento.iP.x, evento.iP.y, GNC::GCS::Vector())) {
+                        dentro = true;
+                        if (evento.m_controlDown) { // Inversion de seleccion
+                                InvertirSeleccion();
+                        } else {
+                                Seleccionar(true);
+                        }
+                } else {
+                        if (!evento.m_controlDown) {
+                                Seleccionar(false);
+                        } else {
+                                ConsumirEvento();
+                                if (EstaSeleccionado()) {
+                                        m_MouseDown = true;
+                                        m_PosCursor= evento.iP;
+                                }
+                        }
+                }
+
+                if (dentro) {
+                        m_MouseDown = true;
+                        m_PosCursor= evento.iP;
+                        ConsumirEvento();
+                }
+
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        m_MouseDown = false;
+                        ConsumirEvento();
+                }
+                return;
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+
+                if (EventoConsumido()) {
+                        Iluminar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                if (HitTest(evento.iP.x, evento.iP.y, GNC::GCS::Vector())) {
+                        Iluminar(true);
+                        dentro = true;
+                } else {
+                        Iluminar(false);
+                }
+
+                if (dentro) {
+                        ConsumirEvento();
+                }
+
+        }
+}
+
+void GNC::GCS::Widgets::WLupa::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+bool GNC::GCS::Widgets::WLupa::HitTest(float x, float y, const GNC::GCS::Vector&)
+{
+        return GNC::GCS::Vector(x, y).DentroDePoligono2(m_VExteriores, m_NumVertices);
+}
+
+bool GNC::GCS::Widgets::WLupa::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+        bool dentro = true;
+
+        for (unsigned int i = 0; dentro && i < m_NumVertices; i++) {
+                dentro = m_VExteriores[i].DentroDePoligono2(vertices, numVertices);
+        }
+
+        return dentro;
+}
+
+void GNC::GCS::Widgets::WLupa::Render(GNC::GCS::Contexto3D* c)
+{
+
+        if (c == NULL || c->GetRenderer() != m_pRenderer) {
+                return;
+        }
+
+        //std::cerr << "GNC::GCS::Widgets::WLupa::Render(" << c->GetRenderer() << ")" << std::endl;
+
+        const GNC::GCS::Vector& rel = c->RelacionImagenPantalla();
+
+        if (rel != m_RelacionImagenPantalla) {
+                m_RelacionImagenPantalla = rel;
+                Recalcular();
+        }
+
+        const GNC::GCS::Vector& escala = m_RelacionImagenPantalla;
+
+        //glPolygonMode(GL_FRONT_AND_BACK,GL_FILL);
+        glHint(GL_PERSPECTIVE_CORRECTION_HINT, GL_NICEST);
+        glHint(GL_POLYGON_SMOOTH_HINT, GL_NICEST);
+
+        // Dibujado de sombra de la lupa
+        GNC::GCS::Vector::TComp fsombrax = 6.0f * escala.x;
+        GNC::GCS::Vector::TComp fsombray = 2.0f * escala.y;
+        glBegin(GL_QUAD_STRIP);
+        for (unsigned int i = 0; i < m_NumVertices; i++) {
+                glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
+                glVertex2d( m_VInteriores[i].x + fsombrax,m_VInteriores[i].y - fsombray);
+                glColor4f(0.1f, 0.1f, 0.1f, 0.1f);
+                glVertex2d( m_VExteriores[i].x + fsombrax,m_VExteriores[i].y -fsombray);
+        }
+        if (m_NumVertices > 0) {
+                glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
+                glVertex2d( m_VInteriores[0].x + fsombrax,m_VInteriores[0].y - fsombray);
+                glColor4f(0.1f, 0.1f, 0.1f, 0.1f);
+                glVertex2d( m_VExteriores[0].x + fsombrax,m_VExteriores[0].y - fsombray);
+        }
+
+        glEnd();
+
+
+        // Dibujado del efecto 3D de la lupa
+        glColor4f(0.1f, 0.1f, 0.1f, 1.0f);
+        fsombrax = 3.0f * escala.x;
+        fsombray = 2.0f * escala.y;
+        glBegin(GL_QUAD_STRIP);
+        for (unsigned int i = 0; i < m_NumVertices; i++) {
+                glVertex2d( m_VInteriores[i].x + fsombrax, m_VInteriores[i].y - fsombray);
+                glVertex2d( m_VExteriores[i].x + fsombrax, m_VExteriores[i].y - fsombray);
+        }
+        if (m_NumVertices > 0) {
+                glVertex2d( m_VInteriores[0].x + fsombrax, m_VInteriores[0].y - fsombray);
+                glVertex2d( m_VExteriores[0].x + fsombrax, m_VExteriores[0].y - fsombray);
+        }
+
+        glEnd();
+
+        glBegin(GL_LINE_LOOP);
+        glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
+        for (unsigned int i = 0; i < m_NumVertices; i++) {
+                glVertex2d( m_VExteriores[i].x + fsombrax, m_VExteriores[i].y - fsombray);
+        }
+        glEnd();
+
+
+        glDisable(GL_BLEND);
+
+        glColor4f(0.0f, 0.0f, 0.0f, 0.0f);
+
+        double worldPoint[3];
+        worldPoint[0] = m_Centro.x;
+        worldPoint[1] = m_Centro.y;
+        worldPoint[2] = 0.0f;
+
+        float factor = 0.0f;
+
+        if (m_ModoActivo == ML_Aumentar) {
+                factor = 0.5f;
+        } else {
+                factor = 2.0f;
+        }
+
+        // Dibujado del fondo solido de la lente
+        glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
+        glBegin(GL_TRIANGLE_FAN);
+        glVertex2d(m_Centro.x, m_Centro.y);
+        for (unsigned int i = 0; i < m_NumVertices; i++) {
+                glVertex2d(m_VInteriores[i].x, m_VInteriores[i].y);
+        }
+        if (m_NumVertices > 0) {
+                glVertex2d(m_VInteriores[0].x, m_VInteriores[0].y);
+        }
+
+        glEnd();
+
+
+        long IdTextura = c->GetRenderer()->m_pImageViewer->GetImageTexture();
+
+
+        if ( IdTextura != 0 && glIsTexture(IdTextura) ) {
+                int dimensiones[3] = {0, 0, 0};
+                int dimensionesTextura[2] = {0, 0};
+                double spacing[3] = {0.0, 0.0, 0.0};
+
+                c->GetRenderer()->m_pImageViewer->GetDimensions(dimensiones);
+                c->GetRenderer()->m_pImageViewer->GetSpacing(spacing);
+
+                GNC::GCS::Vector dimsImagen(dimensiones);
+                GNC::GCS::Vector spacingImagen(spacing);
+
+                glEnable(GL_TEXTURE_2D);
+                glBindTexture(GL_TEXTURE_2D, IdTextura);
+
+                glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &(dimensionesTextura[0]) );
+                glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_HEIGHT, &(dimensionesTextura[1]) );
+
+                glBindTexture(GL_TEXTURE_2D, 0);
+
+                glDisable(GL_TEXTURE_2D);
+
+                GNC::GCS::Vector dimsTextura(dimensionesTextura);
+
+                GNC::GCS::Vector pi = GNC::GCS::Vector(worldPoint[0], worldPoint[1]);
+
+                GNC::GCS::Vector aumento = GNC::GCS::Vector(factor * m_RadioLentePantalla, factor * m_RadioLentePantalla) / dimsImagen;
+
+                GNC::GCS::Vector vCoordCentro = (pi / dimsTextura);
+
+                //std::cout << "Centro lupa = " << pi << std::endl;
+                //std::cout << "Coord centro lupa = " << vCoordCentro << std::endl;
+
+                GNC::GCS::Vector3D rectDis[2];
+
+                float angulo = 0.0f;
+
+                for (unsigned int i = 0; i < m_NumVertices; i++, angulo += m_AnguloVertices) {
+                        m_VCoordsInteriores[i] = ( vCoordCentro + aumento * GNC::GCS::Vector(cos(angulo), sin(angulo)) ) ;
+                }
+
+                GNC::GCS::Vector3D v0(0.0, 0.0, 0.0);
+                GNC::GCS::Vector3D v1(dimsImagen.x, dimsImagen.y, (double)c->GetRenderer()->m_pImageViewer->GetTindex());
+
+                double rect[2][4] = { {0.0, 0.0, 0.0, 1.0 }, {0.0, 0.0, 0.0, 1.0} };
+
+                c->GetRenderer()->m_pImageViewer->UnProyect2D(v0.v, rect[0]);
+                c->GetRenderer()->m_pImageViewer->UnProyect2D(v1.v, rect[1]);
+
+                c->GetRenderer()->WorldToDisplay(rect[0], rectDis[0].v);
+                c->GetRenderer()->WorldToDisplay(rect[1], rectDis[1].v);
+
+#if 0 /* Codigo de depurado visual */
+                /*
+                glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
+                glLineWidth(2.0f);
+                glBegin(GL_LINES);
+                glVertex3dv(rectCam[0].v);
+                glVertex3dv(rectCam[1].v);
+                glEnd();
+                */
+
+
+                glLineWidth(2.0f);
+                glColor4f(1.0f, 1.0f, 0.0f, 1.0f);
+                glBegin(GL_LINES);
+                glVertex3dv(v0.v);
+                glVertex3dv(v1.v);
+                glEnd();
+
+
+                // Debug 2
+
+                double viewport[4] = {0.0f, 0.0f, 0.0f, 0.0f}; // { x, y, ancho, alto }. Convenio de coordenadas: {x, y} == {bottom, left}, {ancho, alto} == {top, right}
+                glGetDoublev(GL_VIEWPORT, viewport);
+
+                glPushAttrib(GL_ALL_ATTRIB_BITS);
+
+                glMatrixMode(GL_PROJECTION);
+                glPushMatrix();
+                glLoadIdentity();
+                glOrtho( 0, viewport[2] , 0 , viewport[3], -1, 1 );
+
+                glMatrixMode(GL_MODELVIEW);
+                glPushMatrix();
+                glLoadIdentity();
+
+                glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
+                glLineWidth(2.0f);
+                glBegin(GL_LINES);
+                glVertex3dv(rectDis[0].v);
+                glVertex3dv(rectDis[1].v);
+                glEnd();
+
+                glMatrixMode(GL_MODELVIEW);
+                glPopMatrix();
+
+                glMatrixMode(GL_PROJECTION);
+                glPopMatrix();
+
+                glMatrixMode(GL_MODELVIEW);
+
+                glPopAttrib();
+
+#endif
+
+
+#if 1 /* Habilitar o deshabilitar scissor */
+                glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
+                glScissor(rectDis[0][0], rectDis[0][1], rectDis[1][0] - rectDis[0][0] - 1.0f, rectDis[1][1] - rectDis[0][1] - 1.0f);
+                glEnable(GL_SCISSOR_TEST);
+#endif
+
+                glTexEnvf(GL_TEXTURE_ENV,GL_TEXTURE_ENV_MODE, GL_REPLACE);
+
+                glEnable(GL_TEXTURE_2D);
+                glBindTexture(GL_TEXTURE_2D, IdTextura);
+
+                glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST );
+                glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST );
+
+                glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, vtkgl::CLAMP_TO_BORDER );
+                glTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, vtkgl::CLAMP_TO_BORDER );
+
+                // Dibujado de la lente
+
+                glBegin(GL_TRIANGLE_FAN);
+
+                glTexCoord2d(vCoordCentro.x, vCoordCentro.y);
+                glVertex2d(m_Centro.x, m_Centro.y);
+
+                angulo = 0.0f;
+                for (unsigned int i = 0; i < m_NumVertices; i++, angulo += m_AnguloVertices) {
+                        glTexCoord2d(m_VCoordsInteriores[i].x , m_VCoordsInteriores[i].y);
+                        glVertex2d(m_VInteriores[i].x, m_VInteriores[i].y);
+                }
+
+                if (m_NumVertices > 0) {
+                        glTexCoord2d(m_VCoordsInteriores[0].x, m_VCoordsInteriores[0].y);
+                        glVertex2d(m_VInteriores[0].x, m_VInteriores[0].y);
+                }
+
+                glEnd();
+
+                glBindTexture(GL_TEXTURE_2D, 0);
+                glDisable(GL_TEXTURE_2D);
+
+                glDisable(GL_SCISSOR_TEST);
+
+
+                glColor4f(0.0f, 0.5f, 0.0f, 1.0f);
+                glLineWidth(1.0f);
+
+        }
+
+        glEnable(GL_BLEND);
+
+        // Dibujado de la lupa transparente
+        glColor4f(0.2f, 0.2f, 0.2f, 1.0f);
+        glBegin(GL_QUAD_STRIP);
+        for (unsigned int i = 0; i < m_NumVertices; i++) {
+                glVertex2d( m_VInteriores[i].x,m_VInteriores[i].y);
+                glVertex2d( m_VExteriores[i].x,m_VExteriores[i].y);
+        }
+        if (m_NumVertices > 0) {
+                glVertex2d( m_VInteriores[0].x,m_VInteriores[0].y);
+                glVertex2d( m_VExteriores[0].x,m_VExteriores[0].y);
+        }
+
+        glEnd();
+
+        // Dibujado de detalles
+
+        glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
+        glBegin(GL_LINE_LOOP);
+        for (unsigned int i = 0; i < m_NumVertices; i++) {
+                glVertex2d( m_VInteriores[i].x,m_VInteriores[i].y);
+        }
+        glEnd();
+
+        GNC::GCS::Vector rot = GNC::GCS::Vector::VectorDeRotacion(m_AnguloPosAsa);
+        float radio = m_GrosorMangoPantalla;
+        GNC::GCS::Vector prayas = rot * (m_RadioLentePantalla);
+
+        for (float inc = 0.25f; inc <= 1.0f; inc += 0.25f) {
+                GNC::GCS::Vector p = prayas + (rot * (m_GrosorLupaPantalla + (inc * radio)));
+                GNC::GCS::Vector ort = p.VectorOrtonormal() * 10.0f * (1.0f - inc) * escala;
+                GNC::GCS::Vector p0 = m_Centro + p - ort;
+                GNC::GCS::Vector p1 = m_Centro + p + ort;
+                glColor4f(1.0f, 1.0f, 1.0f, 0.2f);
+                glBegin(GL_LINES);
+                glVertex2d(p0.x, p0.y);
+                glVertex2d(p1.x, p1.y);
+                glEnd();
+
+                p = prayas + (rot * (escala + m_GrosorLupaPantalla + (inc * radio)));
+                ort = p.VectorOrtonormal() * 10.0f * (1.0f - inc) * escala;
+                p0 = m_Centro + p - ort;
+                p1 = m_Centro + p + ort;
+                glColor4f(0.0f, 0.0f, 0.0f, 0.2f);
+                glBegin(GL_LINES);
+                glVertex2d(p0.x, p0.y);
+                glVertex2d(p1.x, p1.y);
+                glEnd();
+        }
+
+        // Dibujado del outline de iluminacion/seleccion
+
+        glLineWidth(m_LineWidthProp);
+        if (m_Seleccionado || m_Iluminado) {
+                wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+        } else {
+                glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
+        }
+
+        glBegin(GL_LINE_LOOP);
+
+        for (unsigned int i = 0; i < m_NumVertices; i++) {
+                glVertex2d( m_VExteriores[i].x,m_VExteriores[i].y);
+        }
+
+        glEnd();
+
+        glPointSize(5.0f);
+        if (m_Seleccionado) {
+                glColor4f(1.0f, 1.0f, 0.0f, 0.25f);
+        } else if (m_Iluminado) {
+                glColor4f(1.0f, 1.0f, 0.0f, 0.25f);
+        } else {
+                glColor4f(0.0f, 0.0f, 0.0f, 0.25f);
+        }
+        glBegin(GL_POINTS);
+        glVertex2d(m_Centro.x, m_Centro.y);
+        glEnd();
+
+        glFlush();
+}
+
+//endregion
+
+//region "Estado interno"
+
+void GNC::GCS::Widgets::WLupa::Desplazar(const GNC::GCS::Vector& delta)
+{
+        m_Centro += delta;
+        Recalcular();
+        m_Modificado = true;
+}
+
+void GNC::GCS::Widgets::WLupa::DesplazarA(const GNC::GCS::Vector& posicion)
+{
+        Desplazar( (posicion - (
+                            GNC::GCS::Vector::VectorDeRotacion(m_AnguloPosAsa) * (m_RadioLentePantalla + m_GrosorLupaPantalla + (m_GrosorMangoPantalla * 0.5f)))
+                   ) - m_Centro);
+
+        m_PosicionCursor = m_Centro + ( GNC::GCS::Vector::VectorDeRotacion(m_AnguloPosAsa) * (m_RadioLentePantalla + m_GrosorLupaPantalla + (m_GrosorMangoPantalla * 0.5f)));
+}
+
+void GNC::GCS::Widgets::WLupa::Recalcular()
+{
+        m_RadioLentePantalla   = (m_RelacionImagenPantalla * m_RadioLente).NormaInfinito();
+        m_GrosorLupaPantalla   = (m_RelacionImagenPantalla * m_GrosorLupa).NormaInfinito();
+        m_GrosorMangoPantalla  = (m_RelacionImagenPantalla * m_GrosorMango).NormaInfinito();
+
+        GNC::GCS::Vector modsxy(m_RadioLentePantalla, m_RadioLentePantalla);
+
+        GNC::GCS::Vector rot;
+        float angulo = 0.0f;
+
+        for (unsigned int i = 0; i < m_NumVertices; i++, angulo += m_AnguloVertices) {
+                rot =  GNC::GCS::Vector::VectorDeRotacion(angulo);
+                m_VInteriores[i] = m_Centro + rot * m_RadioLentePantalla;
+                m_VExteriores[i] = m_Centro + rot * (m_RadioLentePantalla + m_GrosorLupaPantalla);
+
+                if (angulo < m_AnguloPosAsa - m_AnguloAsa) {
+                        m_VExteriores[i] = m_Centro + rot * (m_RadioLentePantalla + m_GrosorLupaPantalla);
+                }
+                /*
+                else if (angulo < m_AnguloPosAsa - m_AnguloAsa) // Asa ascendiendo
+                {
+                	m_VExteriores[i] = m_Centro + rot * (m_RadioLentePantalla + m_GrosorLupaPantalla + m_GrosorMangoPantalla);
+                }
+                */
+                else if (angulo < m_AnguloPosAsa + m_AnguloAsa) { // Asa descendiendo
+                        m_VExteriores[i] = m_Centro + rot * (m_RadioLentePantalla + m_GrosorLupaPantalla + m_GrosorMangoPantalla);
+                } else {
+                        m_VExteriores[i] = m_Centro + rot * (m_RadioLentePantalla + m_GrosorLupaPantalla);
+                }
+
+        }
+
+        m_Modificado = true;
+}
+
+
+//region Interfaz de eventos ginkgo
+
+void GNC::GCS::Widgets::WLupa::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        if (evt == NULL) {
+                std::cerr << "Error: Evento nulo" << std::endl;
+                return;
+        }
+        switch (evt->GetCodigoEvento()) {
+
+        case ginkgoEVT_Core_ModificacionImagen: {
+                GNC::GCS::Events::EventoModificacionImagen* pEvt = dynamic_cast<GNC::GCS::Events::EventoModificacionImagen*>(evt);
+                if (pEvt != NULL) {
+                        switch (pEvt->GetTipo()) {
+                        case GNC::GCS::Events::EventoModificacionImagen::ImagenCargada:
+                                Modificar(true);
+                                break;
+                        case GNC::GCS::Events::EventoModificacionImagen::ImagenModificada:
+                                Modificar(true);
+                                break;
+                        case GNC::GCS::Events::EventoModificacionImagen::VisualizacionImagenModificada:
+                                Modificar(true);
+                                break;
+                        case  GNC::GCS::Events::EventoModificacionImagen::ImagenRecalibrada: {
+                        }
+                        break;
+                        case GNC::GCS::Events::EventoModificacionImagen::ImagenDescargada:
+                                Modificar(true);
+                                break;
+                        case GNC::GCS::Events::EventoModificacionImagen::SliceCambiado:
+                                Modificar(true);
+                                break;
+                        case GNC::GCS::Events::EventoModificacionImagen::MapaModificado:
+                                Modificar(true);
+                                break;
+                        case GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas:
+                                break;
+                        default:
+                                break;
+                        }
+                }
+        }
+        break;
+        }
+}
+
+//endregion
+
diff --git a/cadxcore/widgets/wlupa.h b/cadxcore/widgets/wlupa.h
new file mode 100644
index 0000000..3dcbbdf
--- /dev/null
+++ b/cadxcore/widgets/wlupa.h
@@ -0,0 +1,223 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <vector>
+#include <list>
+#include <set>
+
+#include <api/iwidgets.h>
+#include <api/observers/ieventsobserver.h>
+#include <api/observers/iwidgetsobserver.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtkSmartPointer.h>
+#include <vtkImageData.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IWidgetsRenderer;
+}
+}
+
+
+namespace GNC
+{
+namespace GCS
+{
+
+namespace Widgets
+{
+
+class WLupa;
+
+typedef enum ModoLupa {
+        ML_Aumentar,
+        ML_Disminuir
+} ModoLupa;
+
+
+class WLupaBuilder : public GNC::GCS::Widgets::IWidgetBuilder, public GNC::GCS::Widgets::IObservadorWidget
+{
+public:
+
+        WLupaBuilder(GNC::GCS::IWidgetsManager* pManager, GNC::GCS::Widgets::ModoLupa modo, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WLupaBuilder();
+
+        virtual void OnWidgetDestruido(IWidget*);
+
+        virtual void SetModo(GNC::GCS::Widgets::ModoLupa modo);
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+protected:
+        GNC::GCS::Vector              m_PosicionCursor;
+        GNC::GCS::Widgets::ModoLupa   m_ModoActivo;
+        WLupa*                        m_pLupaActiva;
+
+};
+
+//----------------------------------------------------------------------------
+
+class WLupa : public GNC::GCS::Widgets::IWidget, public GNC::GCS::IEventsObserver
+{
+
+protected:
+
+
+public:
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Matriz TMatriz;
+
+        float               m_AnguloVertices;
+        unsigned int        m_NumVertices;
+        GNC::GCS::Vector*   m_VInteriores;
+        GNC::GCS::Vector*   m_VExteriores;
+        GNC::GCS::Vector*   m_VCoordsInteriores;
+        GNC::GCS::Vector    m_Centro;
+
+        //region "Constructor y destructor"
+
+public:
+
+        WLupa(GNC::GCS::IWidgetsRenderer* pRenderer, const GNC::GCS::Vector& relacionImagenPantalla, GNC::GCS::Vector& puntoAnclaje, ModoLupa modo, IWidgetsManager* pManager, long vid, const char* nombre, long gid);
+
+        ~WLupa();
+
+        //endregion
+
+        //region "Interfaz especifica"
+private:
+        GNC::GCS::Widgets::ModoLupa   m_ModoActivo;
+
+public:
+
+        void SetRendererActivo( GNC::GCS::IWidgetsRenderer* r);
+
+        void SetModo(GNC::GCS::Widgets::ModoLupa modo);
+
+        void SetCenter(const GNC::GCS::Vector& punto)
+        {
+                m_Centro = punto;
+        }
+
+        const GNC::GCS::Vector& GetCenter() const
+        {
+                return m_Centro;
+        }
+
+        void SetPosCursor(const GNC::GCS::Vector& punto)
+        {
+                m_PosCursor = punto;
+        }
+
+        const GNC::GCS::Vector& GetPosCursor()
+        {
+                return m_PosCursor;
+        }
+
+        //endregion
+
+        //region "Interfaz generica"
+
+        virtual void Modificar(bool modificar);
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return true;
+        }
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        //endregion
+
+        //region "Estado interno"
+
+private:
+        bool              m_MouseDown;
+        bool              m_LDown;
+        bool              m_RDown;
+        GNC::GCS::Vector  m_PosicionCursor;
+        //endregion
+
+        bool              m_Dentro;
+
+public:
+        void SetMouseDown(bool estado)
+        {
+                m_MouseDown = estado;
+        }
+
+
+        //region "Propiedades geometricas"
+private:
+        GNC::GCS::Vector  m_RelacionImagenPantalla;
+
+        float             m_RadioLente;
+        float             m_RadioLentePantalla;
+        float             m_GrosorLupa;
+        float             m_GrosorLupaPantalla;
+        float             m_GrosorMango;
+        float             m_GrosorMangoPantalla;
+
+        float             m_AnguloPosAsa;
+        float             m_AnguloAsa;
+
+public:
+
+        void Desplazar(const GNC::GCS::Vector& delta);
+        void DesplazarA(const GNC::GCS::Vector& posicion);
+
+        void Recalcular();
+
+public:
+
+        //endregion
+
+        //region Interfaz de eventos ginkgo
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+        //endregion
+
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wmarcadoarea.cpp b/cadxcore/widgets/wmarcadoarea.cpp
new file mode 100644
index 0000000..9177ef6
--- /dev/null
+++ b/cadxcore/widgets/wmarcadoarea.cpp
@@ -0,0 +1,470 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include <api/icontexto.h>
+#include "wmarcadoarea.h"
+#include <api/iwidgetsrenderer.h>
+#include <api/ievento.h>
+#include "main/managers/widgetsmanager.h"
+#include <api/controllers/icontroladorpermisos.h>
+
+#include <iterator>
+#include <vtkgl.h>
+#include <api/westilo.h>
+#include <cmath>
+
+
+//====================================================================================================
+//= Builder de marcado
+//====================================================================================================
+
+//region "Implementacion de WMarcadoAreaBuilder"
+
+GNC::GCS::Widgets::WMarcadoAreaBuilder::WMarcadoAreaBuilder(ModoMarcado modo, vtkImageData* /*pImageData*/, GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid, GNC::GCS::Widgets::Observadores::IObservadorMarcadoArea* pObservador) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid), GNC::GCS::Widgets::Notificadores::INotificadorMarcadoArea(pObservador)
+{
+        m_NumNodos = 0;
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        SetRadioNodo(5.0f);
+        m_pPoligonoCreado = NULL;
+        m_pImageData = NULL;
+        m_Modo = modo;
+        m_LineWidthProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "widgets.lineWidth").ObtenerValor<float>();
+        m_DraggingLineWidthProp = GNC::GCS::IControladorPermisos::Instance()->Get("style", "widgets.draggingLineWidth").ObtenerValor<float>();
+}
+
+GNC::GCS::Widgets::WMarcadoAreaBuilder::~WMarcadoAreaBuilder()
+{
+        m_Vertices.clear();
+        if (m_Modo == MP_Lazo) {
+                if (m_pPoligonoCreado) {
+                        NotificarDestruccion(m_pPoligonoCreado);
+                        m_pManager->EliminarWidget(m_pPoligonoCreado, false);
+                        m_pPoligonoCreado = NULL;
+                }
+        }
+}
+
+void GNC::GCS::Widgets::WMarcadoAreaBuilder::EliminarWidget(bool notificar)
+{
+        if (m_Modo == MP_Lazo) {
+                if (m_pPoligonoCreado) {
+                        if(notificar) {
+                                NotificarDestruccion(m_pPoligonoCreado);
+                        }
+                        m_pManager->EliminarWidget(m_pPoligonoCreado, false);
+                        m_pPoligonoCreado = NULL;
+                }
+        }
+}
+
+void GNC::GCS::Widgets::WMarcadoAreaBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+                m_Estado = WBS_Ninguno;
+                m_PosCursor= evento.iP;
+
+                if (m_Modo == MP_Lazo && m_pPoligonoCreado != NULL) {
+                        NotificarDestruccion(m_pPoligonoCreado);
+                        m_pManager->EliminarWidget(m_pPoligonoCreado, false);
+                        m_pPoligonoCreado = NULL;
+                }
+                if(m_Vertices.size()>2) {
+                        m_pPoligonoCreado = new WMarcadoArea(m_Modo, m_pManager, evento.c->GetRenderer()->GetVID(), m_Vertices, m_GID, m_pObservadorMarcado, "poligono");
+                        m_pManager->InsertarWidget(m_pPoligonoCreado);
+                        NotificarCreacion(m_pPoligonoCreado);
+                        m_pManager->LanzarEventoCreacion(m_pPoligonoCreado);
+                }
+                m_Vertices.clear();
+                evento.Skip(false);
+                m_pManager->Modificado();
+
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+
+                m_MouseDown = true;
+                if (m_Modo == MP_Lazo && m_pPoligonoCreado != NULL) {
+                        NotificarDestruccion(m_pPoligonoCreado);
+                        m_pManager->EliminarWidget(m_pPoligonoCreado, false);
+                        m_pPoligonoCreado = NULL;
+                }
+
+                //aviso que han soltado
+                m_pManager->Modificado();
+                m_Estado = WBS_Creando;
+                ConsumirEvento();
+
+        } else if (evento.Dragging() && m_MouseDown) {
+
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+
+                GTRACE(" ---->"<<(evento.iP - m_PosCursor).Norma2Cuadrado()<<" minimo= " << m_DistanciaMinimaCuadrado);
+
+                if (!m_Vertices.empty() && ((evento.iP - m_PosCursor)/evento.c->RelacionImagenPantalla()).Norma2Cuadrado() < m_DistanciaMinimaCuadrado) {
+                        return;
+                }
+                m_PosCursor = evento.iP;
+                m_Vertices.push_back(m_PosCursor);
+                m_pManager->Modificado();
+                ConsumirEvento();
+        } else if( evento.Moving() ) {
+                m_PosCursor= evento.iP;
+                m_Estado = WBS_Ninguno;
+                ConsumirEvento();
+        }
+}
+
+void GNC::GCS::Widgets::WMarcadoAreaBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        NotificarKeyEvent(evento);
+}
+
+void GNC::GCS::Widgets::WMarcadoAreaBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+
+        if (m_Estado != WBS_Creando) {
+                return;
+        }
+
+        glLineWidth(m_LineWidthProp);
+        wColorNormal.Aplicar();
+
+        VerticesPoligono::iterator prev = m_Vertices.begin();
+        if (prev != m_Vertices.end()) {
+                VerticesPoligono::iterator curr = prev;
+                ++curr;
+                for (; curr != m_Vertices.end(); ++curr) {
+                        glBegin(GL_LINES);
+                        glVertex2d((*prev).x, (*prev).y);
+                        glVertex2d((*curr).x, (*curr).y);
+                        glEnd();
+                        prev = curr;
+                }
+        }
+
+        if (m_Vertices.size() > 2) {
+                glEnable(GL_LINE_STIPPLE);
+                glColor4f(0.7f, 0.7f, 0.0f, 1.0);
+                glLineStipple(3, 0xAAAA);
+                glBegin(GL_LINES);
+                glVertex2d(m_Vertices.front().x, m_Vertices.front().y);
+                glVertex2d(m_Vertices.back().x, m_Vertices.back().y);
+                glEnd();
+                glDisable(GL_LINE_STIPPLE);
+        }
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WMarcadoAreaBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_CREAR_POLIGONO;
+}
+
+//endregion
+
+
+//====================================================================================================
+//= Widget de marcado
+//====================================================================================================
+
+//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WMarcadoArea::WMarcadoArea(GNC::GCS::Widgets::WMarcadoAreaBuilder::ModoMarcado modo, IWidgetsManager* pManager,
+                unsigned int vid, VerticesPoligono& vertices, long gid,
+                GNC::GCS::Widgets::Observadores::IObservadorMarcadoArea* pObservador, const char* nombre) :
+        GNC::GCS::Widgets::IWidget(pManager, vid, nombre,gid), GNC::GCS::Widgets::Notificadores::INotificadorMarcadoArea(pObservador),
+        m_AreaMetrica(0.0f)
+{
+        m_Vertices = vertices;
+
+        m_RadioNodo = 0.0f;
+        m_Modo = modo;
+        Recalcular();
+        m_MouseDown = false;
+        m_PosCursor = m_Centro;
+
+}
+
+GNC::GCS::Widgets::WMarcadoArea::~WMarcadoArea()
+{
+        if(m_Modo != GNC::GCS::Widgets::WMarcadoAreaBuilder::MP_Normal) {
+                LanzarEventoDestruccion();
+        }
+}
+
+//endregion
+
+
+void GNC::GCS::Widgets::WMarcadoArea::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if(EstaOculto()) {
+                return;
+        }
+        //------------------------------------------------------
+        // Leaving
+        if (evento.Leaving() ) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        else if (evento.Dragging() && m_MouseDown) {
+
+                Vector delta = evento.iP - m_PosCursor;
+                m_PosCursor = evento.iP;
+
+                if (EstaSeleccionado()) {
+                        for (VerticesPoligono::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                                (*it) += delta;
+                        }
+
+                        Recalcular();
+
+                        Modificar(true);
+
+                        LanzarEventoModificacion();
+                }
+
+                ConsumirEvento();
+
+                return;
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        Seleccionar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                if (evento.iP.DentroDePoligono2(m_Vertices)) {
+                        dentro = true;
+                        if (evento.m_controlDown) { // Inversion de seleccion
+                                InvertirSeleccion();
+                        } else {
+                                Seleccionar(true);
+                        }
+                } else {
+                        if (!evento.m_controlDown) {
+                                Seleccionar(false);
+                        } else {
+                                ConsumirEvento();
+                                if (EstaSeleccionado()) {
+                                        m_MouseDown = true;
+                                        m_PosCursor= evento.iP;
+                                }
+                        }
+                }
+
+                if (dentro) {
+                        m_MouseDown = true;
+                        m_PosCursor= evento.iP;
+                        m_Modificado = true;
+                        ConsumirEvento();
+                }
+
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        m_MouseDown = false;
+                        ConsumirEvento();
+                        NotificarModificacion(this);
+                }
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+
+                if (EventoConsumido()) {
+                        Iluminar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_PosCursor= evento.iP;
+
+                if (evento.iP.DentroDePoligono2(m_Vertices)) {
+                        Iluminar(true);
+                        dentro = true;
+                } else {
+                        Iluminar(false);
+                }
+                if (dentro) {
+                        ConsumirEvento();
+                }
+        }
+
+}
+
+void GNC::GCS::Widgets::WMarcadoArea::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+bool GNC::GCS::Widgets::WMarcadoArea::HitTest(float x, float y, const GNC::GCS::Vector& u)
+{
+        GNC::GCS::Vector punto(x, y);
+        GNC::GCS::Vector umbral(u.x * u.x, u.y * u.y);
+
+        bool hits = HitTest(&punto, 1);
+
+        if (! hits ) {
+                punto.Asignar(x - umbral.x, y - umbral.y);
+                hits = HitTest(&punto, 1);
+        }
+        if (! hits ) {
+                punto.Asignar(x, y - umbral.y);
+                hits = HitTest(&punto, 1);
+        }
+        if (! hits ) {
+                punto.Asignar(x + umbral.x, y + umbral.y);
+                hits = HitTest(&punto, 1);
+        }
+        if (! hits ) {
+                punto.Asignar(x + umbral.x, y);
+                hits = HitTest(&punto, 1);
+        }
+        if (! hits ) {
+                punto.Asignar(x + umbral.x, y - umbral.y);
+                hits = HitTest(&punto, 1);
+        }
+        if (! hits ) {
+                punto.Asignar(x , y - umbral.y);
+                hits = HitTest(&punto, 1);
+        }
+        if (! hits ) {
+                punto.Asignar(x - umbral.x, y - umbral.y);
+                hits = HitTest(&punto, 1);
+        }
+        if (! hits ) {
+                punto.Asignar(x - umbral.x, y);
+                hits = HitTest(&punto, 1);
+        }
+        return hits;
+}
+
+bool GNC::GCS::Widgets::WMarcadoArea::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+        bool hits = true;
+
+        for (VerticesPoligono::iterator it = m_Vertices.begin(); hits && it != m_Vertices.end(); ++it) {
+                if (!(*it).DentroDePoligono2(vertices, numVertices) ) {
+                        hits = false;
+                }
+        }
+
+        return hits;
+}
+
+void GNC::GCS::Widgets::WMarcadoArea::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+        glLineWidth(m_LineWidthProp);
+
+        glBegin(GL_POINTS);
+        for (VerticesPoligono::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                glVertex2d((*it).x , (*it).y );
+        }
+        glEnd();
+
+        // Dibujo el poligono
+        wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINE_LOOP);
+        for (VerticesPoligono::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                glVertex2d((*it).x, (*it).y);
+        }
+        glEnd();
+
+        m_Modificado = false;
+}
+
+void GNC::GCS::Widgets::WMarcadoArea::Seleccionar(bool seleccionado)
+{
+        if (m_Seleccionado != seleccionado) {
+                m_Seleccionado = seleccionado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WMarcadoArea::Iluminar(bool iluminado)
+{
+        if (m_Iluminado != iluminado) {
+                m_Iluminado = iluminado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WMarcadoArea::Ocultar(bool oculto)
+{
+        if(oculto != m_Oculto) {
+                m_Oculto = oculto;
+                m_Modificado = true;
+        }
+}
+
+//endregion
+
+
+void GNC::GCS::Widgets::WMarcadoArea::Recalcular()
+{
+        m_Centro = GNC::GCS::Vector::Centroide(m_Vertices);
+        m_Perimetro = GNC::GCS::Vector::PerimetroDePoligono(m_Vertices);
+}
+
+//endregion
+
+
+
+
+
+
+
diff --git a/cadxcore/widgets/wmarcadoarea.h b/cadxcore/widgets/wmarcadoarea.h
new file mode 100644
index 0000000..f235b6a
--- /dev/null
+++ b/cadxcore/widgets/wmarcadoarea.h
@@ -0,0 +1,264 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/widgetserializable.h>
+#include <vector>
+#include <widgets/observers/iobservadormarcadoarea.h>
+
+
+//----------------------------------------------------------------------------------------------------
+//region "Forward Declarations"
+class vtkImageData;
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+typedef std::list<GNC::GCS::Nodo> VerticesPoligono;
+
+class WMarcadoArea;
+}
+}
+}
+//endregion
+
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+//====================================================================================================
+//= Builder de marcado
+//====================================================================================================
+
+class EXTAPI WMarcadoAreaBuilder : public GNC::GCS::Widgets::IWidgetBuilder, public GNC::GCS::Widgets::Notificadores::INotificadorMarcadoArea
+{
+
+public:
+        typedef enum ModoMarcado {
+                MP_Lazo,      // Poligono volatil. Existencia maxima: 1.
+                MP_Normal   // Poligono persistente. Existencia maxima: Inf.
+        } ModoMarcado;
+
+        WMarcadoAreaBuilder(ModoMarcado modo, vtkImageData* pImageData, GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid, GNC::GCS::Widgets::Observadores::IObservadorMarcadoArea* pObservador = NULL);
+
+        ~WMarcadoAreaBuilder();
+
+        void EliminarWidget(bool notificar = false);
+
+        void SetRadioNodo(float radio)
+        {
+                m_RadioNodo = radio;
+                m_DistanciaMinimaCuadrado = radio * 2;
+                m_DistanciaMinimaCuadrado *= m_DistanciaMinimaCuadrado;
+
+        }
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+protected:
+
+        GNC::GCS::Vector                          m_PosCursor;
+        VerticesPoligono                          m_Vertices;
+        GNC::GCS::Widgets::IWidgetBuilder::Estado m_Estado;
+
+        int                                       m_NumNodos;
+        bool                                      m_MouseDown;
+        float                                     m_RadioNodo;
+        float                                     m_DistanciaMinimaCuadrado;
+        GNC::GCS::Widgets::WMarcadoArea*          m_pPoligonoCreado;
+        vtkImageData*                             m_pImageData;
+        ModoMarcado                               m_Modo;
+
+};
+
+//====================================================================================================
+//= Widget de marcado
+//====================================================================================================
+class EXTAPI WMarcadoArea : public GNC::GCS::Widgets::IWidget, public GNC::GCS::Widgets::Notificadores::INotificadorMarcadoArea
+{
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Constructor y destructor"
+public:
+        WMarcadoArea(WMarcadoAreaBuilder::ModoMarcado modo, IWidgetsManager* pManager, unsigned int vid, VerticesPoligono& vertices, long gid, GNC::GCS::Widgets::Observadores::IObservadorMarcadoArea* pObservador = NULL, const char* nombre = "");
+
+        ~WMarcadoArea();
+
+        //endregion
+
+        virtual bool EsMarcador() const
+        {
+                return m_Modo == WMarcadoAreaBuilder::MP_Normal;
+        }
+
+        virtual bool DelimitaArea() const
+        {
+                return true;
+        }
+
+        virtual bool ContieneFast(const GNC::GCS::Vector& punto) const
+        {
+                return punto.DentroDePoligono2(m_Vertices);
+        }
+
+        virtual void GetBoundingBox(GNC::GCS::Vector& bb0, GNC::GCS::Vector& bb1) const
+        {
+                if (m_Vertices.size() > 0) {
+
+                        VerticesPoligono::const_iterator it = m_Vertices.begin();
+                        (*it).IniciarBoundingBox(bb0, bb1);
+                        for (; it != m_Vertices.end(); ++it) {
+                                (*it).ExtenderBoundingBox(bb0, bb1);
+                        }
+                }
+        }
+
+        virtual void GetPosicion(GNC::GCS::Vector& posicion) const
+        {
+                posicion = m_Centro;
+        }
+
+        virtual void GetPuntoAnclaje(GNC::GCS::Vector& punto, const GNC::GCS::Vector& escala) const
+        {
+                punto = m_PosCursor + (GNC::GCS::Vector(10.0f, -10.0f) * escala);
+        }
+
+        virtual void GetCentro(GNC::GCS::Vector& centro) const
+        {
+                centro = m_Centro;
+        }
+
+        virtual float GetAreaMetrica() const
+        {
+                return m_AreaMetrica;
+        }
+
+        virtual float GetPerimetro() const
+        {
+                return m_Perimetro;
+        }
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                if (m_Modo == WMarcadoAreaBuilder::MP_Normal) {
+                        return true;
+                } else {
+                        return false;
+                }
+        }
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz especifica"
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void Seleccionar(bool seleccionado);
+
+        virtual void Iluminar(bool iluminado);
+
+        virtual void Ocultar(bool oculto);
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Estado interno"
+private:
+        bool              m_MouseDown;
+        GNC::GCS::Vector  m_PosCursor;
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Propiedades geometricas"
+private:
+
+        VerticesPoligono  m_Vertices;
+        float                    m_RadioNodo;
+
+        GNC::GCS::Vector m_Centro;
+        float                    m_AreaMetrica;
+        float                    m_Perimetro;
+
+
+        friend std::ostream & operator<<(std::ostream& out, const WMarcadoArea& /*w*/)
+        {
+                return out;
+        }
+
+public:
+        virtual void GetVertices(std::list<GNC::GCS::Vector>& vertices) const
+        {
+                for (VerticesPoligono::const_iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                        vertices.push_back(*it);
+                }
+        }
+
+        void GetNodos(std::list<GNC::GCS::Nodo>& vertices)
+        {
+                for (VerticesPoligono::const_iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                        vertices.push_back(*it);
+                }
+        }
+
+        const VerticesPoligono& Vertices() const
+        {
+                return m_Vertices;
+        }
+
+        //endregion
+
+private:
+        WMarcadoAreaBuilder::ModoMarcado m_Modo;
+
+
+
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Helpers"
+public:
+
+        virtual void Recalcular();
+
+        //endregion
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wnota.cpp b/cadxcore/widgets/wnota.cpp
new file mode 100644
index 0000000..8d8a598
--- /dev/null
+++ b/cadxcore/widgets/wnota.cpp
@@ -0,0 +1,130 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#if defined(__DEPRECATED)
+#undef __DEPRECATED
+#endif
+#include <list>
+#include <vtkgl.h>
+#include <cmath>
+#include <cairo/cairo.h>
+
+#include <wx/xml/xml.h>
+#include <wx/menu.h>
+
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/math/geometry3d.h>
+
+#include "wnota.h"
+#include "wtextbox.h"
+#include <api/ievento.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/icontexto.h>
+#include <api/iwidgetsmanager.h>
+
+#include <api/westilo.h>
+
+
+//====================================================================================================
+//= Builder de notas
+//====================================================================================================
+GNC::GCS::Widgets::WNotaBuilder::WNotaBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask) : IWidgetBuilder(pManager, buttonMask)
+{
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        m_pTempWidget = NULL;
+}
+
+GNC::GCS::Widgets::WNotaBuilder::~WNotaBuilder()
+{
+        if (m_pTempWidget != NULL) {
+                delete m_pTempWidget;
+        }
+}
+
+void GNC::GCS::Widgets::WNotaBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+                m_Estado = WBS_Ninguno;
+                m_Posicion= evento.iP;
+                m_pManager->InsertarWidget(m_pTempWidget);
+                m_pManager->LanzarEventoCreacion(m_pTempWidget);
+                WTextBox* pTmp = m_pTempWidget;
+                m_pTempWidget = NULL;
+                pTmp->DoEditText(evento.c->pWindow);
+                evento.Skip(false);
+                m_pManager->Modificado();
+
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+                m_MouseDown = true;
+                m_Posicion= evento.iP;
+                if (m_pTempWidget != NULL) {
+                        delete m_pTempWidget;
+                }
+                m_pTempWidget = new WTextBox(m_pManager, evento.c->GetRenderer()->GetVID(), m_Posicion, WTextBox::TNM_Static, "TextNote");
+                m_pManager->LanzarEventoCreacion(m_pTempWidget);
+                m_pManager->Modificado();
+                m_Estado = WBS_Creando;
+                evento.Skip(false);
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+                m_Posicion= evento.iP;
+                if (m_pTempWidget != NULL) {
+                        m_pTempWidget->m_Posicion = m_Posicion;
+                }
+                m_pManager->Modificado();
+                evento.Skip(false);
+        } else if( evento.Moving() ) {
+        }
+}
+
+void GNC::GCS::Widgets::WNotaBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+}
+
+void GNC::GCS::Widgets::WNotaBuilder::Render(GNC::GCS::Contexto3D* c)
+{
+        if (m_Estado != WBS_Creando) {
+                return;
+        }
+        if (m_pTempWidget == NULL) {
+                return;
+        }
+        m_pTempWidget->Render(c);
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WNotaBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_CREAR_ANOTACION;
+}
diff --git a/cadxcore/widgets/wnota.h b/cadxcore/widgets/wnota.h
new file mode 100644
index 0000000..3b1db94
--- /dev/null
+++ b/cadxcore/widgets/wnota.h
@@ -0,0 +1,91 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <cmath>
+#include <api/iwidgets.h>
+#include <api/widgetserializable.h>
+#include <widgets/openglhelper.h>
+
+//----------------------------------------------------------------------------------------------------
+//region Forward Declarations
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+namespace Dialogos
+{
+class SeleccionTexto;
+}
+
+class WTextBox;
+}
+}
+}
+//endregion
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+namespace Dialogos
+{
+class SeleccionTexto;
+}
+
+class WTextBox;
+
+//====================================================================================================
+//= Builder de notas
+//====================================================================================================
+class WNotaBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+        typedef GNC::GCS::Vector TVector;
+        WNotaBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask);
+
+        ~WNotaBuilder();
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+protected:
+        TVector m_Posicion;
+        GNC::GCS::Widgets::IWidgetBuilder::Estado m_Estado;
+        bool m_MouseDown;
+
+        WTextBox* m_pTempWidget;
+
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wpan.cpp b/cadxcore/widgets/wpan.cpp
new file mode 100644
index 0000000..0318dba
--- /dev/null
+++ b/cadxcore/widgets/wpan.cpp
@@ -0,0 +1,174 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include "wpan.h"
+#include <main/managers/widgetsmanager.h>
+
+#include <api/iwidgetsrenderer.h>
+#include <api/westilo.h>
+#include <vtkgl.h>
+#include <vtkSmartPointer.h>
+
+#include <cmath>
+
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
+
+//region "Implementacion de WPanBuilder"
+#include <api/icontexto.h>
+
+
+GNC::GCS::Widgets::WPanBuilder::WPanBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        m_Dentro = true;
+        m_Changed = false;
+}
+
+GNC::GCS::Widgets::WPanBuilder::~WPanBuilder()
+{
+}
+
+void GNC::GCS::Widgets::WPanBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+
+        if (!m_pManager) {
+                return;
+        }
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+                vtkSmartPointer<vtkRenderWindowInteractor> rwi = evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor();
+                vtkSmartPointer<GinkgoInteractorStyleImage2D> is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+
+
+                if (is != NULL) {
+                        is->EndPan();
+                }
+
+                if (m_Changed) {
+                        ConsumirEvento();
+                }
+
+                m_Estado = WBS_Ninguno;
+                //m_pManager->Modificado();
+                //no se consume el evento para poder mostrar las propiedades de un widget
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+                m_Start = evento.iP;
+                m_Changed = false;
+                m_MouseDown = true;
+
+                vtkSmartPointer<vtkRenderWindowInteractor> rwi = evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor();
+                vtkSmartPointer<GinkgoInteractorStyleImage2D> is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+
+                if (is != NULL) {
+                        is->StartPan();
+                }
+                m_Estado = WBS_Creando;
+                ConsumirEvento();
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+                vtkSmartPointer<vtkRenderWindowInteractor> rwi = evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor();
+                vtkSmartPointer<GinkgoInteractorStyleImage2D> is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+
+                if (is != NULL) {
+                        is->Pan();
+                        is->PropagateCameraFocalAndPosition();
+                        if (m_Start.DistanciaEuclideaCuadrado(evento.iP) > TVector::EpsilonDeReales()) {
+                                m_Changed = true;
+                        }
+                }
+
+                //m_pManager->Modificado();
+                ConsumirEvento();
+        } else if( evento.Moving() ) {
+                GTRACE("Moviendose");
+                m_NodoMoviendose = evento.iP;
+                m_Estado = WBS_Ninguno;
+        }
+
+}
+
+void GNC::GCS::Widgets::WPanBuilder::OnKeyEvents(TEventoTeclado&)
+{
+
+}
+
+void GNC::GCS::Widgets::WPanBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+
+        /*
+        TVector box = TVector(100, 10) * c->RefRelacionImagenPantalla();
+
+        box = TVector(100, 10) * c->RefRelacionImagenPantalla();
+        TVector pos = TVector(std::max(m_Start.x - box.x, std::min(m_Start.x + box.x, m_Stop.x)), m_Start.y);
+
+        if (m_Estado == WBS_Creando) {
+        	glLineWidth(2.0f);
+        	glColor4f(0.0f, 0.75f, 0.0f, 1.0f);
+
+        	glBegin(GL_LINES);
+
+        		glVertex2d(m_Start.x - box.x, m_Start.y);
+        		glVertex2d(m_Start.x + box.x, m_Start.y);
+
+        		glVertex2d(m_Start.x - box.x, m_Start.y - box.y);
+        		glVertex2d(m_Start.x - box.x, m_Start.y + box.y);
+
+        		glVertex2d(m_Start.x + box.x, m_Start.y - box.y);
+        		glVertex2d(m_Start.x + box.x, m_Start.y + box.y);
+
+        	glEnd();
+
+        	glColor4f(0.75f, 0.0f, 0.0f, 1.0f);
+
+        	glLineWidth(1.5);
+        	glBegin(GL_LINES);
+        		glVertex2d(pos.x, pos.y - box.y);
+        		glVertex2d(pos.x, pos.y + box.y);
+        	glEnd();
+        }
+        else {
+
+        }
+        */
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WPanBuilder::GetCursor()
+{
+        if (m_Estado == WBS_Creando && m_Changed) {
+                return GNC::GCS::Widgets::CUR_MANO_CERRADA;
+        } else {
+                return GNC::GCS::Widgets::CUR_MANO_ABIERTA;
+        }
+}
+
+//endregion
diff --git a/cadxcore/widgets/wpan.h b/cadxcore/widgets/wpan.h
new file mode 100644
index 0000000..7184e74
--- /dev/null
+++ b/cadxcore/widgets/wpan.h
@@ -0,0 +1,75 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <vector>
+
+#include <export/tools/itoolslider.h>
+#include <api/iwidgets.h>
+#include <api/math/geometry3d.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+//---------------------------------------------------------------------
+
+class WPanBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector                    TVector;
+        typedef GNC::GCS::Vector3D                  TVector3D;
+        typedef GNC::GCS::Events::EventoRaton      TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado    TEventoTeclado;
+        typedef GNC::GCS::IWidgetsManager           TWidgetsManager;
+        typedef GNC::GCS::Widgets::IWidget          TWidget;
+
+        WPanBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WPanBuilder();
+
+        virtual void OnMouseEvents(TEventoRaton& event);
+        virtual void OnKeyEvents(TEventoTeclado& event);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+        //region "Helpers"
+
+        bool         m_Dentro;
+        //endregion
+
+
+protected:
+        TVector   m_Start;
+        bool      m_Changed;
+        TVector   m_NodoMoviendose;  // Cursor
+
+        bool      m_MouseDown;
+        Estado    m_Estado;
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wpolygon.cpp b/cadxcore/widgets/wpolygon.cpp
new file mode 100644
index 0000000..a6a75d0
--- /dev/null
+++ b/cadxcore/widgets/wpolygon.cpp
@@ -0,0 +1,602 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/xml/xml.h>
+#include <api/globals.h>
+#include <api/icontexto.h>
+#include "wpolygon.h"
+#include "wtextbox.h"
+#include <api/internationalization/internationalization.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/ievento.h>
+#include <api/ioverlay.h>
+#include "main/managers/widgetsmanager.h"
+
+
+#include <iterator>
+#include <vtkgl.h>
+#include <api/westilo.h>
+#include <cmath>
+
+//region "Implementacion de WPoligonoBuilder"
+
+GNC::GCS::Widgets::WPolygonBuilder::WPolygonBuilder( GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask)
+{
+}
+
+GNC::GCS::Widgets::WPolygonBuilder::~WPolygonBuilder()
+{
+        m_Vertices.clear();
+}
+
+void GNC::GCS::Widgets::WPolygonBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+
+        if (evento.ButtonDClick(m_ButtonMask) && m_Vertices.size() >= 3) {
+                WPolygon* m_pPoligonoCreado = new WPolygon(m_pManager, evento.c->GetRenderer()->GetVID(), m_Vertices, evento.c, "FreeForm");
+                m_pManager->InsertarWidget(m_pPoligonoCreado);
+                m_pManager->LanzarEventoCreacion(m_pPoligonoCreado);
+                ConsumirEvento();
+
+                m_Vertices.clear();
+                m_pManager->Modificado();
+        } else if (evento.ButtonUp(m_ButtonMask)) {
+                float distanceWithLastPoint = ((evento.iP - m_PosCursor)/evento.c->RelacionImagenPantalla()).Norma2Cuadrado();
+                if (m_Vertices.empty() || distanceWithLastPoint  > (WIDGET_SIZE_PUNTO*WIDGET_SIZE_PUNTO) ) {
+                        m_PosCursor = evento.iP;
+                        m_Vertices.push_back(m_PosCursor);
+                        m_pManager->Modificado();
+                        ConsumirEvento();
+                }
+        } else if( evento.Moving() ) {
+                if (m_Vertices.empty()) {
+                        m_PosCursor= evento.iP;
+                }
+        }
+}
+
+void GNC::GCS::Widgets::WPolygonBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                m_Vertices.clear();
+                m_pManager->Modificado();
+                evento.Skip(false);
+        }
+}
+
+void GNC::GCS::Widgets::WPolygonBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+
+        glLineWidth(m_LineWidthProp);
+        wColorNormal.Aplicar();
+
+        TPolygonVertexList::iterator prev = m_Vertices.begin();
+        if (prev != m_Vertices.end()) {
+                TPolygonVertexList::iterator curr = prev;
+                ++curr;
+                for (; curr != m_Vertices.end(); ++curr) {
+                        glBegin(GL_LINES);
+                        glVertex2d((*prev).x, (*prev).y);
+                        glVertex2d((*curr).x, (*curr).y);
+                        glEnd();
+                        prev = curr;
+                }
+        }
+
+
+        if (m_Vertices.size() > 2) {
+                glEnable(GL_LINE_STIPPLE);
+                glColor4f(0.7f, 0.7f, 0.0f, 1.0);
+                glLineStipple(3, 0xAAAA);
+                glBegin(GL_LINES);
+                glVertex2d(m_Vertices.front().x, m_Vertices.front().y);
+                glVertex2d(m_Vertices.back().x, m_Vertices.back().y);
+                glEnd();
+                glDisable(GL_LINE_STIPPLE);
+        }
+
+
+        glColor4f(0.0f, 1.0f, 0.0f, 1.0f);
+        glPointSize(WIDGET_SIZE_PUNTO);
+        glBegin(GL_POINTS);
+        for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                glVertex2d((*it).x, (*it).y);
+        }
+        glEnd();
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WPolygonBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_CREAR_POLIGONO;
+}
+
+//endregion
+
+//---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WPolygon::WPolygon(IWidgetsManager* pManager, unsigned int vid, TPolygonVertexList& vertices, GNC::GCS::Contexto3D* c, const char* nombre) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre,0,TID_USER_ANNOTATION_WIDGET),
+        GNC::GCS::Widgets::IWidgetSerializable(),
+        m_pTextBox(NULL)
+{
+        m_Vertices = vertices;
+
+        initTextBox(c->rotacion);
+
+        Recalcular();
+        m_MouseDown = false;
+        m_PosCursor = m_Centro;
+}
+
+GNC::GCS::Widgets::WPolygon::~WPolygon()
+{
+        m_pManager->EliminarWidget(m_pTextBox, false);
+        m_pManager->Modificado();
+}
+
+//endregion
+
+//region "Serializado y desserializado"
+GNC::GCS::Widgets::WPolygon::WPolygon(IWidgetsManager* pManager, long vid, wxXmlNode* nodo): GNC::GCS::Widgets::IWidget(pManager, vid, "FreeForm"),
+        GNC::GCS::Widgets::IWidgetSerializable(nodo),
+        m_AreaMetrica(0),
+        m_pTextBox(NULL)
+{
+        if(nodo->GetName() != wxT("free_form")) {
+                std::cerr<< "Ha ocurrido un error al desserializar el widget free_form"<<std::endl;
+        }
+
+        wxXmlNode *child = nodo->GetChildren();
+        GNC::GCS::Nodo nodoTmp;
+        while (child) {
+                nodoTmp = GNC::GCS::Nodo::Deserializar(child);
+                GNC::GCS::Vector v(nodoTmp);
+                m_Vertices.push_back(v);
+                child = child->GetNext();
+        }
+        initTextBox();
+
+        m_MouseDown = false;
+        Recalcular();
+        m_PosCursor = m_Centro;
+}
+
+void GNC::GCS::Widgets::WPolygon::initTextBox(double rotation)
+{
+        if (m_pTextBox == NULL) {
+                //calculate bottom right corner to set label...
+                GNC::GCS::Vector bb[2];
+                for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                        if (it == m_Vertices.begin()) {
+                                (*it).IniciarBoundingBox(bb);
+                        } else {
+                                (*it).ExtenderBoundingBox(bb);
+                        }
+                }
+                GNC::GCS::Vector pm = bb[0].PuntoMedio(bb[1]);
+                bb[1].RotarSobreZ( pm, rotation);
+
+                m_pTextBox = new WTextBox(m_pManager, m_VID, bb[1], WTextBox::TNM_Dynamic, "polygonBox", "");
+                m_pManager->InsertarWidget(m_pTextBox);
+        }
+}
+
+wxXmlNode* GNC::GCS::Widgets::WPolygon::Serializar(const std::string& nombreMedico)
+{
+        wxXmlNode* resultado = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxT("free_form"));
+
+
+        int i=0;
+        for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                wxXmlNode* nodo = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxString::Format(wxT("nodo%d"), (int) i));
+                nodo->AddAttribute(new wxXmlProperty(wxT("x"),wxString::Format(wxT("%f"),(*it).x)));
+                nodo->AddAttribute(new wxXmlProperty(wxT("y"),wxString::Format(wxT("%f"),(*it).y)));
+                resultado->AddChild(nodo);
+                i++;
+        }
+        //metadatos
+        SerializarMetadatos(resultado,nombreMedico);
+        return resultado;
+}
+//endregion
+
+void GNC::GCS::Widgets::WPolygon::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if(EstaOculto()) {
+                return;
+        }
+        //------------------------------------------------------
+        // Leaving
+        if (evento.Leaving()) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        else if (evento.Dragging() && m_MouseDown) {
+                Vector delta = evento.iP - m_PosCursor;
+                m_PosCursor = evento.iP;
+
+                bool modified = false;
+                if (EstaSeleccionado()) {
+                        for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                                (*it) += delta;
+                        }
+
+                        modified = true;
+                } else {
+                        for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                                if ((*it).EstaIluminado()) {
+                                        (*it) += delta;
+                                        modified = true;
+                                }
+                        }
+                }
+                if (modified) {
+                        Recalcular();
+                        Modificar(true);
+                        LanzarEventoModificacion();
+                }
+
+                ConsumirEvento();
+
+                return;
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+                for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                        SeleccionarNodo((*it), false);
+                }
+
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        Seleccionar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                ////first of all find if hits any vertex...
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                        if ((*it).Hits(evento.iP, factor)) {
+                                SeleccionarNodo((*it), true);
+                                IluminarNodo((*it), true);
+                                Seleccionar(false);
+                                dentro = true;
+                                break;
+                        } else {
+                                SeleccionarNodo((*it), false);
+                                IluminarNodo((*it), false);
+                        }
+                }
+
+                if (!dentro) {
+                        if (HitTest(evento.iP.x, evento.iP.y, evento.c->RelacionImagenPantalla())) {
+                                dentro = true;
+                                if (evento.m_controlDown) { // Inversion de seleccion
+                                        InvertirSeleccion();
+                                } else {
+                                        Seleccionar(true);
+                                }
+                        } else {
+                                if (!evento.m_controlDown) {
+                                        Seleccionar(false);
+                                } else {
+                                        ConsumirEvento();
+                                        if (EstaSeleccionado()) {
+                                                m_MouseDown = true;
+                                                m_PosCursor= evento.iP;
+                                        }
+                                }
+                        }
+                }
+
+                if (dentro) {
+                        m_MouseDown = true;
+                        m_PosCursor= evento.iP;
+                        m_Modificado = true;
+                        ConsumirEvento();
+                }
+
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        ActualizarTimestampModificacion();
+                        m_MouseDown = false;
+                        ConsumirEvento();
+                }
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+                for (TPolygonVertexList::iterator it2 = m_Vertices.begin(); it2 != m_Vertices.end(); ++it2) {
+                        IluminarNodo((*it2), false);
+                }
+
+                if (EventoConsumido()) {
+                        Iluminar(false);
+                        return;
+                }
+
+                bool dentro = false;
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+                m_PosCursor= evento.iP;
+
+                for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                        if ((*it).Hits(evento.iP, factor)) {
+                                IluminarNodo((*it), true);
+                                dentro = true;
+                                break;
+                        } else {
+                                IluminarNodo((*it), false);
+                        }
+                }
+
+                if (!dentro) {
+                        if (HitTest(evento.iP.x, evento.iP.y, evento.c->RelacionImagenPantalla())) {
+                                Iluminar(true);
+                                dentro = true;
+                        } else {
+                                Iluminar(false);
+                        }
+                }
+                if (dentro) {
+                        ConsumirEvento();
+                }
+        }
+
+}
+
+void GNC::GCS::Widgets::WPolygon::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+bool GNC::GCS::Widgets::WPolygon::HitTest(const GNC::GCS::Nodo& p0, const GNC::GCS::Nodo& p1, const GNC::GCS::Vector& cursor, const GNC::GCS::Vector& rel)
+{
+        bool hits = false;
+
+        if ( p0.DistanciaEuclideaCuadrado(p1) / 4.0f > cursor.DistanciaEuclideaCuadrado(p0.PuntoMedio(p1))) {
+
+                GNC::GCS::Vector vdir = p1 - p0;
+                GNC::GCS::Vector orto = (vdir / rel).VectorOrtogonal() * rel;
+
+                GNC::GCS::Vector inter = GNC::GCS::Vector::InterseccionEntreRectas(cursor, cursor + orto, p0, p1);
+                GNC::GCS::Vector diff = (inter - cursor).ValorAbsoluto();
+                if ( (diff / rel).Norma2Cuadrado() < (p0.m_Size * p0.m_Size) ) {
+                        hits = true;
+                }
+        }
+        return hits;
+}
+
+bool GNC::GCS::Widgets::WPolygon::HitTest(float x, float y, const GNC::GCS::Vector& u)
+{
+        //distance to each line....
+        bool hits = false;
+        if (m_Vertices.empty())
+                return hits;
+
+        GNC::GCS::Vector point(x, y);
+        TPolygonVertexList::iterator it = m_Vertices.begin();
+        TPolygonVertexList::iterator prev = it++;
+
+
+        hits = HitTest(m_Vertices.front(), m_Vertices.back(), point, u);
+
+        while  (!hits && it != m_Vertices.end()) {
+                hits = HitTest((*prev), (*it), point, u);
+                prev = it++;
+        }
+        return hits;
+}
+
+bool GNC::GCS::Widgets::WPolygon::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+        bool hits = true;
+
+        for (TPolygonVertexList::iterator it = m_Vertices.begin(); hits && it != m_Vertices.end(); ++it) {
+                if (!(*it).DentroDePoligono2(vertices, numVertices) ) {
+                        hits = false;
+                }
+        }
+
+        return hits;
+}
+
+void GNC::GCS::Widgets::WPolygon::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+
+        GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+        glLineWidth(m_LineWidthProp);
+
+        float fsombrax, fsombray;
+
+        if (m_Seleccionado && m_MouseDown) {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA_SELECCIONADO * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO * escala.y;
+        } else {
+                fsombrax = WIDGET_OFFSET_X_SOMBRA * escala.x;
+                fsombray = WIDGET_OFFSET_Y_SOMBRA * escala.y;
+        }
+
+        wColorSombra.Aplicar();
+        glBegin(GL_LINE_LOOP);
+        for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                glVertex2d((*it).x + fsombrax, (*it).y - fsombray);
+        }
+        glEnd();
+
+        glBegin(GL_POINTS);
+        for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                glVertex2d((*it).x + fsombrax, (*it).y - fsombray);
+        }
+        glEnd();
+
+        // Dibujo highlights puntos activos
+        for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                if ((*it).m_Iluminado) {
+                        wDibujarElipseDegradado((*it), wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+                }
+        }
+
+        // Dibujo el poligono
+        wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINE_LOOP);
+        for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                glVertex2d((*it).x, (*it).y);
+        }
+        glEnd();
+        m_Modificado = false;
+
+        glColor4f(0.0f, 1.0f, 0.0f, 1.0f);
+        glPointSize(WIDGET_SIZE_PUNTO);
+
+        for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                wAplicarColor(m_Iluminado || (*it).m_Iluminado, m_MouseDown, m_Seleccionado);
+                glBegin(GL_POINTS);
+                glVertex2d((*it).x, (*it).y);
+                glEnd();
+        }
+}
+
+void GNC::GCS::Widgets::WPolygon::Seleccionar(bool seleccionado)
+{
+        if (m_Seleccionado != seleccionado) {
+                m_Seleccionado = seleccionado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WPolygon::Iluminar(bool iluminado)
+{
+        if (m_Iluminado != iluminado) {
+                m_Iluminado = iluminado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WPolygon::Ocultar(bool oculto)
+{
+        if(oculto != m_Oculto) {
+                m_Oculto = oculto;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WPolygon::Recalcular()
+{
+        m_Centro = GNC::GCS::Vector::Centroide(m_Vertices);
+        m_Perimetro = GNC::GCS::Vector::PerimetroDePoligono(m_Vertices);
+
+        std::string text;
+        if (m_pManager->GetRendererActivo() != NULL && m_pManager->GetRendererActivo()->m_pIOverlay != NULL) {
+                text = m_pManager->GetRendererActivo()->m_pIOverlay->ImprimirOverlay(this, m_pManager->GetRendererActivo()->m_pImageViewer);
+        }
+        if (text.empty()) {
+                m_pTextBox->Ocultar(true);
+        } else {
+                m_pTextBox->Ocultar(false);
+                m_pTextBox->SetTexto(text);
+        }
+}
+
+//endregion
+void GNC::GCS::Widgets::WPolygon::InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades)
+{
+        TMapaPropiedades& primerMapa = listaMapaPropiedades.front();
+        {
+                std::ostringstream ostr;
+                ostr <<  m_Centro;
+                primerMapa[_Std("Center (I)")] = ostr.str();
+        }
+
+        {
+                std::stringstream out;
+                out << PuntoToStringMundo(m_Centro);
+                primerMapa[_Std("Center (M)")] = out.str();
+        }
+
+        {
+                std::ostringstream ostr;
+                ostr <<  m_Vertices.size();
+                primerMapa[_Std("Number of Vertex")] = ostr.str();
+        }
+}
+
+void GNC::GCS::Widgets::WPolygon::OffscreenRender(GNC::GCS::Contexto3D* c)
+{
+        if(m_Vertices.size() < 2) {
+                return;
+        }
+
+        TPolygonVertexList Vertices;
+
+        for (TPolygonVertexList::iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                Vertices.push_back( c->Reproyectar(*it) * c->factorReescalado );
+        }
+
+        cairo_set_line_width(c->cr, m_LineWidthProp);
+
+        // Color del cuerpo
+        wColorNormal.AplicarCairo(c->cr);
+
+        // Dibujado del cuerpo
+        for (TPolygonVertexList::iterator it = Vertices.begin(); it != Vertices.end(); ++it) {
+                if(it == Vertices.begin()) {
+                        cairo_move_to(c->cr, (*it).x, (*it).y);
+                }
+                cairo_line_to(c->cr, (*it).x, (*it).y);
+        }
+        cairo_line_to(c->cr, Vertices.front().x, Vertices.front().y);
+        cairo_stroke(c->cr);
+}
+
+float GNC::GCS::Widgets::WPolygon::GetAreaMetrica() const
+{
+        if (GNC::GCS::Vector::EsPoligonoSimple(m_Vertices)) {
+                return GNC::GCS::Vector::AreaDePoligono(m_Vertices);
+        } else {
+                return std::numeric_limits<float>::quiet_NaN();
+        }
+}
+
diff --git a/cadxcore/widgets/wpolygon.h b/cadxcore/widgets/wpolygon.h
new file mode 100644
index 0000000..6cf7d6f
--- /dev/null
+++ b/cadxcore/widgets/wpolygon.h
@@ -0,0 +1,217 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/widgetserializable.h>
+#include <vector>
+
+class vtkImageData;
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+typedef std::list<GNC::GCS::Nodo> TPolygonVertexList;
+
+class WPolygon;
+class WTextBox;
+}
+}
+}
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+class WPolygonBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        WPolygonBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask);
+
+        ~WPolygonBuilder();
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+protected:
+
+        GNC::GCS::Nodo                          m_PosCursor;
+        TPolygonVertexList                          m_Vertices;
+
+};
+
+class WPolygon : public GNC::GCS::Widgets::IWidget, public GNC::GCS::Widgets::IWidgetSerializable
+{
+
+        //region "Constructor y destructor"
+public:
+        WPolygon(IWidgetsManager* pManager, unsigned int vid, TPolygonVertexList& vertices, GNC::GCS::Contexto3D* c, const char* nombre = "");
+
+        ~WPolygon();
+
+        //endregion
+        //region "Serializado y desserializado"
+        WPolygon(IWidgetsManager* pManager, long vid, wxXmlNode* nodo);
+
+        void initTextBox(double rotation = 0.0);
+
+        wxXmlNode* Serializar(const std::string& nombreMedico);
+        //endregion
+
+        virtual bool EsMarcador() const
+        {
+                return true;
+        }
+
+        virtual bool DelimitaArea() const
+        {
+                return true;
+        }
+
+        virtual bool ContieneFast(const GNC::GCS::Vector& punto) const
+        {
+                return punto.DentroDePoligono2(m_Vertices);
+        }
+
+        virtual void GetBoundingBox(GNC::GCS::Vector& bb0, GNC::GCS::Vector& bb1) const
+        {
+                if (!m_Vertices.empty()) {
+
+                        TPolygonVertexList::const_iterator it = m_Vertices.begin();
+                        (*it).IniciarBoundingBox(bb0, bb1);
+                        for (; it != m_Vertices.end(); ++it) {
+                                (*it).ExtenderBoundingBox(bb0, bb1);
+                        }
+                }
+        }
+
+        virtual void GetPosicion(GNC::GCS::Vector& posicion) const
+        {
+                posicion = m_Centro;
+        }
+
+        virtual void GetPuntoAnclaje(GNC::GCS::Vector& punto, const GNC::GCS::Vector& escala) const
+        {
+                punto = m_PosCursor + (GNC::GCS::Vector(10.0f, -10.0f) * escala);
+        }
+
+        virtual void GetCentro(GNC::GCS::Vector& centro) const
+        {
+                centro = m_Centro;
+        }
+
+
+        virtual float GetAreaMetrica() const;
+
+        virtual float GetPerimetro() const
+        {
+                return m_Perimetro;
+        }
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return true;
+        }
+
+
+        //region "Interfaz especifica"
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(const GNC::GCS::Nodo& p0, const GNC::GCS::Nodo& p1, const GNC::GCS::Vector& cursor, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void OffscreenRender(Contexto3D* c);
+
+        virtual void Seleccionar(bool seleccionado);
+
+        virtual void Iluminar(bool iluminado);
+
+        virtual void Ocultar(bool oculto);
+
+        //endregion
+
+        //region "Estado interno"
+private:
+        bool                    m_MouseDown;
+        GNC::GCS::Nodo m_PosCursor;
+        //endregion
+
+        //region "Propiedades geometricas"
+private:
+
+        TPolygonVertexList  m_Vertices;
+
+        GNC::GCS::Vector m_Centro;
+        float                    m_AreaMetrica;
+        float                    m_Perimetro;
+        WTextBox*                m_pTextBox;
+
+        friend std::ostream & operator<<(std::ostream& out, const WPolygon& /*w*/)
+        {
+                return out;
+        }
+
+        void Recalcular();
+
+public:
+        virtual void GetVertices(std::list<GNC::GCS::Vector>& vertices) const
+        {
+                for (TPolygonVertexList::const_iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                        vertices.push_back(*it);
+                }
+        }
+
+        void GetNodos(std::list<GNC::GCS::Nodo>& vertices)
+        {
+                for (TPolygonVertexList::const_iterator it = m_Vertices.begin(); it != m_Vertices.end(); ++it) {
+                        vertices.push_back(*it);
+                }
+        }
+
+        //endregion
+
+        virtual void InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades);
+
+private:
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wpunto.cpp b/cadxcore/widgets/wpunto.cpp
new file mode 100644
index 0000000..9973bea
--- /dev/null
+++ b/cadxcore/widgets/wpunto.cpp
@@ -0,0 +1,444 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/xml/xml.h>
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include "wpunto.h"
+#include "wtextbox.h"
+#include <api/ievento.h>
+#include <api/icontexto.h>
+#include <api/ioverlay.h>
+#include <api/iwidgetsrenderer.h>
+#include "main/managers/widgetsmanager.h"
+#include <vtkgl.h>
+#include <api/westilo.h>
+#include <cmath>
+
+
+//region "Implementacion de WPuntoBuilder"
+
+GNC::GCS::Widgets::WPuntoBuilder::WPuntoBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+}
+
+GNC::GCS::Widgets::WPuntoBuilder::~WPuntoBuilder()
+{
+}
+
+
+void GNC::GCS::Widgets::WPuntoBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        GTRACE("GNC::GCS::Widgets::WPuntoBuilder::OnMouseEvents(wxMouseEvent&)");
+        if (evento.ButtonDown(m_ButtonMask)) {
+                GNC::GCS::Widgets::WPunto* punto = new GNC::GCS::Widgets::WPunto(m_pManager, evento.c->GetRenderer()->GetVID(), evento.iP, "Punto", m_GID);
+                m_pManager->InsertarWidget(punto);
+                punto->OnMouseEvents(evento);
+                m_pManager->LanzarEventoCreacion(punto);
+                m_pManager->Modificado();
+                ConsumirEvento();
+        }
+}
+
+void GNC::GCS::Widgets::WPuntoBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+        GTRACE("GNC::GCS::Widgets::WPuntoBuilder::OnKeyEvents(wxKeyEvent&)");
+}
+
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WPuntoBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_CREAR_PUNTO;
+}
+
+
+void GNC::GCS::Widgets::WPuntoBuilder::Render(GNC::GCS::Contexto3D *)
+{
+        //nothing to do
+}
+//endregion
+
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WPunto::WPunto(IWidgetsManager* pManager, long vid, GNC::GCS::Nodo nodo, const char* nombre, long gid, bool oculto) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid,TID_USER_ANNOTATION_WIDGET),
+        GNC::GCS::Widgets::IWidgetSerializable(),
+        m_pTextBox(NULL)
+{
+        m_Nodo = nodo;
+        m_Nodo.m_Size = WRADIO_CRUZ;
+        m_MouseDown = false;
+        m_UID = (long)this;
+        m_Oculto = oculto;
+        initTextBox();
+        Recalcular();
+}
+
+GNC::GCS::Widgets::WPunto::~WPunto()
+{
+        m_pManager->EliminarWidget(m_pTextBox, false);
+        m_pManager->Modificado();
+}
+//endregion
+
+//region "Serializado y desserializado"
+GNC::GCS::Widgets::WPunto::WPunto(IWidgetsManager* pManager, long vid, long gid, wxXmlNode* nodo) : GNC::GCS::Widgets::IWidget(pManager, vid, "Punto", gid) ,
+        GNC::GCS::Widgets::IWidgetSerializable(nodo),
+        m_pTextBox(NULL)
+{
+        if(nodo->GetName() != wxT("punto_widget")) {
+                std::cerr<< "Ha ocurrido un error al desserializar el widget puntos"<<std::endl;
+        }
+
+        wxString strTmp = nodo->GetAttribute(wxT("x"),wxT("0.0"));
+        double doubleTmp;
+        strTmp.ToDouble(&doubleTmp);
+        m_Nodo.x = (float) doubleTmp;
+
+        strTmp = nodo->GetAttribute(wxT("y"),wxT("0.0"));
+        strTmp.ToDouble(&doubleTmp);
+        m_Nodo.y = (float) doubleTmp;
+
+        m_Nodo.m_Size = WRADIO_CIRCULO;
+
+        initTextBox();
+        Recalcular();
+
+        m_MouseDown = false;
+        m_UID = (long)this;
+}
+
+void GNC::GCS::Widgets::WPunto::initTextBox()
+{
+        if (m_pTextBox == NULL) {
+                //calculate bottom right corner to set label...
+                m_pTextBox = new WTextBox(m_pManager, m_VID, m_Nodo, WTextBox::TNM_Dynamic, "point", "");
+                m_pManager->InsertarWidget(m_pTextBox);
+        }
+}
+
+wxXmlNode* GNC::GCS::Widgets::WPunto::Serializar(const std::string& nombreMedico)
+{
+        wxXmlNode* resultado = new wxXmlNode(NULL,wxXML_ELEMENT_NODE,wxT("punto_widget"));
+        //almacenamos los dos nodos
+        resultado->AddAttribute(new wxXmlProperty(wxT("x"),wxString::Format(wxT("%f"),m_Nodo.x)));
+        resultado->AddAttribute(new wxXmlProperty(wxT("y"),wxString::Format(wxT("%f"),m_Nodo.y)));
+        //serializar Metadatos
+        SerializarMetadatos(resultado,nombreMedico);
+        return resultado;
+}
+//endregion
+
+void GNC::GCS::Widgets::WPunto::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if(EstaOculto()) {
+                return;
+        }
+        //------------------------------------------------------
+        // Leaving
+        if (evento.Leaving() ) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        else if (evento.Dragging() && m_MouseDown) {
+                if (m_Nodo.m_Seleccionado) {
+                        Vector delta = evento.iP - m_PosCursor;
+                        m_PosCursor = evento.iP;
+                        m_Nodo += delta;
+                        Modificar(true);
+
+                        NotificarCambios(true);
+                        ConsumirEvento();
+                        LanzarEventoModificacion();
+                }
+                return;
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        if (EstaSeleccionado()) {
+                                NotificarCambios(true);
+                        }
+                        Seleccionar(false);
+                        return;
+                }
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                bool dentro = false;
+
+                m_PosCursor= evento.iP;
+
+                if (m_Nodo.Hits(evento.iP, factor)) { // click sobre el nodo
+                        dentro = true;
+                        if (evento.m_controlDown) { // Inversion de seleccion
+                                InvertirSeleccion();
+                        } else {
+                                Seleccionar(true);
+                        }
+                } else { // Click fuera del nodo
+                        if (!evento.m_controlDown) {
+                                Seleccionar(false);
+                        } else {
+                                ConsumirEvento();
+                                if (EstaSeleccionado()) {
+                                        m_MouseDown = true;
+                                }
+                        }
+                }
+                if (dentro) {
+                        m_MouseDown = true;
+                        m_PosAntigua = m_Nodo;
+                        ConsumirEvento();
+                }
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        m_MouseDown = false;
+                        ConsumirEvento();
+                }
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+                if (EventoConsumido()) {
+                        return;
+                }
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                bool dentro = false;
+
+                m_PosCursor= evento.iP;
+
+                if (m_Nodo.Hits(evento.iP, factor)) {
+                        Iluminar(true);
+                        dentro = true;
+                } else {
+                        Iluminar(false);
+                }
+                if (dentro) {
+                        ConsumirEvento();
+                }
+                return;
+        }
+}
+
+void GNC::GCS::Widgets::WPunto::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+bool GNC::GCS::Widgets::WPunto::HitTest(float x, float y, const GNC::GCS::Vector& umbral)
+{
+        return m_Nodo.Hits(x, y, umbral);
+}
+
+bool GNC::GCS::Widgets::WPunto::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+        return m_Nodo.DentroDePoligono(vertices,numVertices);
+}
+
+void GNC::GCS::Widgets::WPunto::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+
+        GNC::GCS::Vector radioCruz = escala * WRADIO_CRUZ;
+        GNC::GCS::Vector radioCirculo = escala * WRADIO_CIRCULO;
+
+        // Sombra
+        GNC::GCS::Vector fsombra;
+        if (m_MouseDown) {
+                fsombra.Asignar(WIDGET_OFFSET_X_SOMBRA_SELECCIONADO, WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO);
+        } else {
+                fsombra.Asignar(WIDGET_OFFSET_X_SOMBRA, WIDGET_OFFSET_Y_SOMBRA);
+        }
+
+        fsombra *= escala;
+
+        wColorSombra.Aplicar();
+
+        // Circulo
+        glBegin(GL_LINE_LOOP);
+        float step = M_2PI / 30;
+        for ( float angulo = 0; angulo < M_2PI; angulo += step) {
+                glVertex3f(m_Nodo.x + (radioCirculo.x * cos (angulo)) + fsombra.x , m_Nodo.y + (radioCirculo.y * sin (angulo)) - fsombra.y, 0.0f);
+        }
+        glEnd();
+
+        // cruz
+        glBegin(GL_LINES);
+        glVertex3f(m_Nodo.x - radioCruz.x + fsombra.x, m_Nodo.y - fsombra.y, 0.0f);
+        glVertex3f(m_Nodo.x + radioCruz.x + fsombra.x, m_Nodo.y - fsombra.y, 0.0f);
+        glEnd();
+
+        glBegin(GL_LINES);
+        glVertex3f(m_Nodo.x + fsombra.x, m_Nodo.y - radioCruz.y - fsombra.y, 0.0f);
+        glVertex3f(m_Nodo.x + fsombra.x, m_Nodo.y + radioCruz.y - fsombra.y, 0.0f);
+        glEnd();
+
+        // arrastre
+        if (m_MouseDown) {
+                glEnable(GL_LINE_STIPPLE);
+                wColorLineaArrastre.Aplicar();
+                glLineWidth(m_DraggingLineWidthProp);
+                glLineStipple(3, 0xAAAA);
+
+                glBegin(GL_LINE_STRIP);
+                glVertex2d(m_PosAntigua.x, m_PosAntigua.y);
+                glVertex2d(m_Nodo.x, m_Nodo.y);
+                glEnd();
+
+                glDisable(GL_LINE_STIPPLE);
+        }
+
+        // Cuerpo
+        glLineWidth(m_LineWidthProp);
+        wAplicarColor(m_Nodo.m_Iluminado, m_MouseDown, m_Nodo.m_Seleccionado);
+
+        // Circulo
+        glBegin(GL_LINE_LOOP);
+        for ( float angulo = 0; angulo < M_2PI; angulo += step) {
+                glVertex3f(m_Nodo.x + (radioCirculo.x * cos (angulo)) , m_Nodo.y + (radioCirculo.y * sin (angulo)), 0.0f);
+        }
+        glEnd();
+
+        // Cruz
+        glBegin(GL_LINES);
+        glVertex3f(m_Nodo.x - radioCruz.x, m_Nodo.y, 0.0f);
+        glVertex3f(m_Nodo.x + radioCruz.x, m_Nodo.y, 0.0f);
+        glEnd();
+
+        glBegin(GL_LINES);
+        glVertex3f(m_Nodo.x, m_Nodo.y - radioCruz.y, 0.0f);
+        glVertex3f(m_Nodo.x, m_Nodo.y + radioCruz.y, 0.0f);
+        glEnd();
+
+        //label;
+        Recalcular();
+}
+
+void GNC::GCS::Widgets::WPunto::Recalcular()
+{
+        //label...
+        std::string text;
+        if (m_pManager->GetRendererActivo() != NULL && m_pManager->GetRendererActivo()->m_pIOverlay != NULL) {
+                text = m_pManager->GetRendererActivo()->m_pIOverlay->ImprimirOverlay(this, m_pManager->GetRendererActivo()->m_pImageViewer);
+        }
+        if (text.empty()) {
+                m_pTextBox->Ocultar(true);
+        } else {
+                m_pTextBox->Ocultar(false);
+                m_pTextBox->SetTexto(text);
+        }
+}
+
+void GNC::GCS::Widgets::WPunto::InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades)
+{
+        TMapaPropiedades& primerMapa = listaMapaPropiedades.front();
+        {
+                std::ostringstream ostr;
+                ostr <<  m_Nodo;
+                primerMapa[_Std("Position (I)")] = ostr.str();
+        }
+        {
+                std::stringstream out;
+                out << PuntoToStringMundo(m_Nodo);
+                primerMapa[_Std("Position (M)")] = out.str();
+        }
+}
+
+void GNC::GCS::Widgets::WPunto::OffscreenRender(GNC::GCS::Contexto3D* c)
+{
+        const GNC::GCS::Vector& escala = c->RefRelacionMundoPantallaOffscreen();
+
+        GNC::GCS::Vector Nodo = c->Reproyectar(m_Nodo) * c->factorReescalado;
+
+        float radioCruz = WRADIO_CRUZ * escala.x;
+        float radioCirculo = WRADIO_CIRCULO * escala.x;
+        /*
+        	// Sombra
+        	float fsombrax, fsombray;
+        	if (m_MouseDown)
+        	{
+        		fsombrax = WIDGET_OFFSET_X_SOMBRA_SELECCIONADO * escala.x;
+        		fsombray = WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO * escala.y;
+        	}
+        	else
+        	{
+        		fsombrax = WIDGET_OFFSET_X_SOMBRA * escala.x;
+        		fsombray = WIDGET_OFFSET_Y_SOMBRA * escala.y;
+        	}
+        */
+        /*	//sombra
+        	wColorSombra.AplicarCairo(c->cr);
+         */
+        cairo_set_line_width(c->cr, m_LineWidthProp);
+        /*
+        	//la cruz
+        	cairo_move_to(c->cr, Nodo.x - radioCruz + fsombrax, Nodo.y - fsombray);
+        	cairo_line_to(c->cr, Nodo.x + radioCruz + fsombrax, Nodo.y - fsombray);
+        	cairo_stroke(c->cr);
+
+        	cairo_move_to(c->cr, Nodo.x + fsombrax, Nodo.y - radioCruz - fsombray);
+        	cairo_line_to(c->cr, Nodo.x + fsombrax, Nodo.y + radioCruz - fsombray);
+        	cairo_stroke(c->cr);
+        */
+        /*
+        //el circulo
+        cairo_arc(c->cr, Nodo.x + fsombrax, Nodo.y - fsombray, radioCirculo, 0, M_2PI);
+        cairo_stroke(c->cr);
+        */
+        //punto
+        wColorNormal.AplicarCairo(c->cr);
+        //la cruz
+        cairo_move_to(c->cr, Nodo.x - radioCruz, Nodo.y);
+        cairo_line_to(c->cr, Nodo.x + radioCruz, Nodo.y);
+        cairo_stroke(c->cr);
+
+        cairo_move_to(c->cr, Nodo.x, Nodo.y - radioCruz );
+        cairo_line_to(c->cr, Nodo.x, Nodo.y + radioCruz );
+        cairo_stroke(c->cr);
+
+        //el circulo
+        cairo_arc(c->cr, Nodo.x, Nodo.y, radioCirculo, 0, M_2PI);
+        cairo_stroke(c->cr);
+}
diff --git a/cadxcore/widgets/wpunto.h b/cadxcore/widgets/wpunto.h
new file mode 100644
index 0000000..f52b2b4
--- /dev/null
+++ b/cadxcore/widgets/wpunto.h
@@ -0,0 +1,215 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <vector>
+
+#include <api/iwidgets.h>
+#include <api/widgetserializable.h>
+
+#define WRADIO_CIRCULO 10.0f
+#define WRADIO_CRUZ 17.0f
+
+class vtkImageData;
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+class WTextBox;
+class WPunto;
+
+//---------------------------------------------------------------------
+
+class WPuntoBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+        WPuntoBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WPuntoBuilder();
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+        virtual void Render(GNC::GCS::Contexto3D *);
+
+
+protected:
+};
+
+//---------------------------------------------------------------------
+
+class WPunto : public GNC::GCS::Widgets::IWidget, public GNC::GCS::Widgets::IWidgetSerializable
+{
+
+        //region "Propiedades geometricas"
+private:
+        GNC::GCS::Nodo   m_Nodo;
+        GNC::GCS::Vector m_PosAntigua;
+        WTextBox*                m_pTextBox;
+
+
+        //region "Constructor y destructor"
+
+public:
+        WPunto(IWidgetsManager* pManager, long vid, GNC::GCS::Nodo nodo, const char* nombre, long gid, bool oculto = false);
+
+        ~WPunto();
+
+        //endregion
+
+        //region "Serializado y desserializado"
+        WPunto(IWidgetsManager* pManager, long vid, long gid, wxXmlNode* nodo);
+        void initTextBox();
+
+        wxXmlNode* Serializar(const std::string& nombreMedico);
+        //endregion
+
+        //region "Interfaz especifica"
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        void Recalcular();
+
+        virtual void OffscreenRender(Contexto3D* c);
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return true;
+        }
+
+        virtual GNC::GCS::Nodo& GetNodo()
+        {
+                return m_Nodo;
+        }
+
+        virtual bool EsMarcador() const
+        {
+                return true;
+        }
+
+        virtual bool DelimitaArea() const
+        {
+                return false;
+        }
+
+        virtual void GetPuntoAnclaje(GNC::GCS::Vector& punto, const GNC::GCS::Vector& escala) const
+        {
+                punto = m_Nodo + GNC::GCS::Vector(WRADIO_CRUZ, -WRADIO_CRUZ) * escala;
+        }
+
+        virtual void GetPosicion(GNC::GCS::Vector& posicion) const
+        {
+                posicion = m_Nodo;
+        }
+
+        virtual void Seleccionar(bool seleccionar)
+        {
+                if (m_Nodo.EstaSeleccionado() != seleccionar) {
+                        m_Nodo.Seleccionar(seleccionar);
+                        m_Seleccionado = seleccionar;
+                        m_Modificado = true;
+                }
+        }
+
+        virtual void Iluminar(bool iluminar)
+        {
+                if (m_Nodo.EstaIluminado() != iluminar) {
+                        m_Nodo.Iluminar(iluminar);
+                        m_Iluminado = iluminar;
+                        m_Modificado = true;
+                }
+        }
+
+        virtual bool EstaSeleccionado() const
+        {
+                return m_Nodo.EstaSeleccionado();
+        }
+
+        virtual bool EstaIluminado() const
+        {
+                return m_Nodo.EstaIluminado();
+        }
+
+        //endregion
+
+        //region "Estado interno"
+private:
+        bool            m_MouseDown;
+        //endregion
+
+        void SeleccionarNodo(GNC::GCS::Nodo &nodo, bool estado)
+        {
+                if (nodo.m_Seleccionado != estado) {
+                        nodo.m_Seleccionado = estado;
+                        m_Modificado = true;
+                }
+        }
+
+        void IluminarNodo(GNC::GCS::Nodo &nodo, bool estado)
+        {
+                if (nodo.m_Iluminado != estado) {
+                        nodo.m_Iluminado = estado;
+                        m_Modificado = true;
+                }
+        }
+
+public:
+        friend std::ostream& operator<<(std::ostream& out, const WPunto& w)
+        {
+                out << "[ P=" << w.m_Nodo << ", GID=" << w.m_GID << " UID=" << w.m_UID << " ]";
+                return out;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const WPunto* w)
+        {
+                if (w == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *w;
+                }
+                return out;
+        }
+
+public:
+        //endregion
+
+        //region "Propiedades radiometricas"
+
+        //endregion
+        virtual void InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades);
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wrectangulo.cpp b/cadxcore/widgets/wrectangulo.cpp
new file mode 100644
index 0000000..ba7d895
--- /dev/null
+++ b/cadxcore/widgets/wrectangulo.cpp
@@ -0,0 +1,491 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include "wrectangulo.h"
+#include <api/ievento.h>
+#include <api/icontexto.h>
+#include <api/iwidgetsrenderer.h>
+#include "main/managers/widgetsmanager.h"
+#include <vtkgl.h>
+#include <api/westilo.h>
+#include <cmath>
+
+//region "Implementacion de WRectanguloBuilder"
+
+GNC::GCS::Widgets::WRectanguloBuilder::WRectanguloBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        m_Dentro = true;
+}
+
+GNC::GCS::Widgets::WRectanguloBuilder::~WRectanguloBuilder()
+{
+}
+
+void GNC::GCS::Widgets::WRectanguloBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        //------------------------------------------------------
+        // Dragging
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+
+                m_Estado = WBS_Ninguno;
+
+                m_Stop= evento.iP;
+
+                m_Vertices[0].Asignar(m_Start.x, m_Start.y);
+                m_Vertices[1].Asignar(m_Stop.x, m_Start.y);
+                m_Vertices[2].Asignar(m_Stop.x, m_Stop.y);
+                m_Vertices[3].Asignar(m_Start.x, m_Stop.y);
+
+                TVector diff = m_Stop - m_Start;
+                if (std::abs(diff.x) > 0.001f && std::abs(diff.y) > evento.c->RelacionImagenPantalla().NormaInfinito()) {
+                        WRectangulo* w = new WRectangulo(m_Vertices, m_pManager, evento.c->GetRenderer()->GetVID(), "rectangulo", m_GID);
+                        m_pManager->InsertarWidget(w);
+                        m_pManager->LanzarEventoCreacion(w);
+                }
+
+                m_pManager->Modificado();
+                m_Estado = WBS_Ninguno;
+                ConsumirEvento();
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+                GTRACE("WRectanguloBuilder::OnMouseEvents:: Left down)");
+                m_MouseDown = true;
+
+                m_Start= evento.iP;
+                m_Stop = m_Start;
+
+                m_Vertices[0].Asignar(m_Start.x, m_Start.y);
+                m_Vertices[1].Asignar(m_Stop.x, m_Start.y);
+                m_Vertices[2].Asignar(m_Stop.x, m_Stop.y);
+                m_Vertices[3].Asignar(m_Start.x, m_Stop.y);
+
+                m_pManager->Modificado();
+                m_Estado = WBS_Creando;
+                ConsumirEvento();
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+                GTRACE("WRectanguloBuilder::OnMouseEvents:: Creando...)");
+
+                m_Stop= evento.iP;
+
+                m_Vertices[0].Asignar(m_Start.x, m_Start.y);
+                m_Vertices[1].Asignar(m_Stop.x, m_Start.y);
+                m_Vertices[2].Asignar(m_Stop.x, m_Stop.y);
+                m_Vertices[3].Asignar(m_Start.x, m_Stop.y);
+
+                m_pManager->Modificado();
+                ConsumirEvento();
+        } else if( evento.Moving() ) {
+                m_NodoMoviendose= evento.iP;
+                m_Estado = WBS_Ninguno;
+        }
+}
+
+void GNC::GCS::Widgets::WRectanguloBuilder::OnKeyEvents(TEventoTeclado&)
+{
+
+}
+
+void GNC::GCS::Widgets::WRectanguloBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+
+        if (m_Estado == WBS_Creando) {
+                glLineWidth(2.0f);
+                glEnable(GL_LINE_STIPPLE);
+                glLineStipple(3, 0xAAAA);
+                glColor4f(0.0f, 0.5f, 0.0f, 0.75f);
+                glBegin(GL_LINE_LOOP);
+                glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+                glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+                glVertex2d(m_Vertices[2].x, m_Vertices[2].y);
+                glVertex2d(m_Vertices[3].x, m_Vertices[3].y);
+                glEnd();
+
+                glDisable(GL_LINE_STIPPLE);
+        } else {
+
+        }
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WRectanguloBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_CREAR_RECTANGULO;
+}
+
+//endregion
+
+
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WRectangulo::WRectangulo(TVector bb[4], IWidgetsManager* pManager, long vid, const char* nombre, long gid) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid)
+{
+        m_Vertices[0] = bb[0];
+        m_Vertices[1] = bb[1];
+        m_Vertices[2] = bb[2];
+        m_Vertices[3] = bb[3];
+        m_MouseDown = false;
+        m_UID = (long)this;
+}
+
+GNC::GCS::Widgets::WRectangulo::~WRectangulo()
+{
+        LanzarEventoDestruccion();
+}
+
+//endregion
+
+void GNC::GCS::Widgets::WRectangulo::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if(m_Oculto) {
+                return;
+        }
+        //------------------------------------------------------
+        // Leaving
+        if (evento.Leaving() ) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        else if (evento.Dragging() && m_MouseDown) {
+                Vector delta = evento.iP - m_PosCursor;
+                m_PosCursor = evento.iP;
+
+                if (EstaSeleccionado())  {
+                        m_Vertices[0] += delta;
+                        m_Vertices[1] += delta;
+                        m_Vertices[2] += delta;
+                        m_Vertices[3] += delta;
+                } else if (m_Vertices[0].m_Seleccionado) {
+                        m_Vertices[3].x += delta.x;
+                        m_Vertices[0] += delta;
+                        m_Vertices[1].y += delta.y;
+                } else if (m_Vertices[1].m_Seleccionado) {
+                        m_Vertices[2].x += delta.x;
+                        m_Vertices[1] += delta;
+                        m_Vertices[0].y += delta.y;
+                } else if (m_Vertices[2].m_Seleccionado) {
+                        m_Vertices[1].x += delta.x;
+                        m_Vertices[2] += delta;
+                        m_Vertices[3].y += delta.y;
+                } else if (m_Vertices[3].m_Seleccionado) {
+                        m_Vertices[0].x += delta.x;
+                        m_Vertices[3] += delta;
+                        m_Vertices[2].y += delta.y;
+                }
+                LanzarEventoModificacion();
+                Modificar(true);
+                ConsumirEvento();
+                return;
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        SeleccionarNodo(m_Vertices[0], false);
+                        SeleccionarNodo(m_Vertices[1], false);
+                        SeleccionarNodo(m_Vertices[2], false);
+                        SeleccionarNodo(m_Vertices[3], false);
+                        Seleccionar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_PosCursor= evento.iP;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                for (int i = 0; i < 4 && !dentro; ++i) {
+                        if (m_Vertices[i].Hits(evento.iP, factor)) {
+                                SeleccionarNodo(m_Vertices[i], true);
+                                IluminarNodo(m_Vertices[i], true);
+                                for (int j = 0; j < 4; ++j) {
+                                        if (i != j) {
+                                                SeleccionarNodo(m_Vertices[i], false);
+                                        }
+                                }
+                                Seleccionar(false);
+                                dentro = true;
+                        } else {
+                                SeleccionarNodo(m_Vertices[i], false);
+                                IluminarNodo(m_Vertices[i], false);
+                        }
+                }
+
+                if (!dentro) {
+                        if (evento.iP.DentroDePoligono2(m_Vertices, 4)) {
+                                if (evento.m_controlDown) { // Inversion de seleccion
+                                        InvertirSeleccion();
+                                } else {
+                                        Seleccionar(true);
+                                }
+                                dentro = true;
+                        } else { // Click fuera del nodo
+                                if (!evento.m_controlDown) {
+                                        Seleccionar(false);
+                                } else {
+                                        ConsumirEvento();
+                                        if (EstaSeleccionado()) {
+                                                m_MouseDown = true;
+                                                m_PosCursor= evento.iP;
+                                        }
+                                }
+                        }
+                }
+
+                if (dentro) {
+                        m_MouseDown = true;
+                        m_PosCursor= evento.iP;
+                        ConsumirEvento();
+                }
+
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        m_MouseDown = false;
+                        ConsumirEvento();
+                }
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+                if (EventoConsumido()) {
+                        IluminarNodo(m_Vertices[0], false);
+                        IluminarNodo(m_Vertices[1], false);
+                        IluminarNodo(m_Vertices[2], false);
+                        IluminarNodo(m_Vertices[3], false);
+                        Iluminar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_PosCursor= evento.iP;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                for (int i = 0; i < 4 && !dentro; ++i) {
+                        if (m_Vertices[i].Hits(evento.iP, factor)) {
+                                IluminarNodo(m_Vertices[i], true);
+                                for (int j = 0; j < 4; ++j) {
+                                        if (j != i) {
+                                                IluminarNodo(m_Vertices[j], false);
+                                        }
+                                }
+                                Iluminar(false);
+                                dentro = true;
+                        } else {
+                                IluminarNodo(m_Vertices[i], false);
+                        }
+                }
+
+                if (!dentro) {
+
+                        if (evento.iP.DentroDePoligono2(m_Vertices, 4)) {
+                                Iluminar(true);
+                                dentro = true;
+                        } else {
+                                Iluminar(false);
+                        }
+                }
+
+                if (dentro) {
+                        ConsumirEvento();
+                }
+
+                return;
+        }
+}
+
+void GNC::GCS::Widgets::WRectangulo::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+bool GNC::GCS::Widgets::WRectangulo::HitTest(float /*x*/, float /*y*/, const GNC::GCS::Vector&)
+{
+        return false;
+}
+
+bool GNC::GCS::Widgets::WRectangulo::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+        return
+                m_Vertices[0].DentroDePoligono2(vertices, numVertices) &&
+                m_Vertices[1].DentroDePoligono2(vertices, numVertices) &&
+                m_Vertices[2].DentroDePoligono2(vertices, numVertices) &&
+                m_Vertices[3].DentroDePoligono2(vertices, numVertices);
+}
+
+void GNC::GCS::Widgets::WRectangulo::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        wColorSombra.Aplicar();
+        glBegin(GL_QUADS);
+        glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+        glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+        glVertex2d(m_Vertices[2].x, m_Vertices[2].y);
+        glVertex2d(m_Vertices[3].x, m_Vertices[3].y);
+        glEnd();
+
+        if (m_Seleccionado) {
+                glLineWidth(2.0f);
+                glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
+                glBegin(GL_LINE_LOOP);
+                glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+                glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+                glVertex2d(m_Vertices[2].x, m_Vertices[2].y);
+                glVertex2d(m_Vertices[3].x, m_Vertices[3].y);
+                glEnd();
+        }
+
+        if (m_Vertices[0].m_Seleccionado || m_Vertices[0].m_Iluminado) {
+                glPointSize(5.0f);
+                if (m_Vertices[0].m_Seleccionado) {
+                        glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
+                } else {
+                        glColor4f(0.0f, 1.0f, 0.0f, 1.0f);
+                }
+
+                glBegin(GL_LINE_STRIP);
+                glVertex2d(m_Vertices[3].x, m_Vertices[3].y);
+                glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+                glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+                glEnd();
+
+                glBegin(GL_POINTS);
+                glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+                glEnd();
+        } else if (m_Vertices[1].m_Seleccionado || m_Vertices[1].m_Iluminado) {
+                if (m_Vertices[1].m_Seleccionado) {
+                        glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
+                } else {
+                        glColor4f(0.0f, 1.0f, 0.0f, 1.0f);
+                }
+
+                glBegin(GL_LINE_STRIP);
+                glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+                glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+                glVertex2d(m_Vertices[2].x, m_Vertices[2].y);
+                glEnd();
+
+                glPointSize(5.0f);
+                glBegin(GL_POINTS);
+                glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+                glEnd();
+
+        } else if (m_Vertices[2].m_Seleccionado || m_Vertices[2].m_Iluminado) {
+                if (m_Vertices[2].m_Seleccionado) {
+                        glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
+                } else {
+                        glColor4f(0.0f, 1.0f, 0.0f, 1.0f);
+                }
+
+                glBegin(GL_LINE_STRIP);
+                glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+                glVertex2d(m_Vertices[2].x, m_Vertices[2].y);
+                glVertex2d(m_Vertices[3].x, m_Vertices[3].y);
+                glEnd();
+
+                glPointSize(5.0f);
+                glBegin(GL_POINTS);
+                glVertex2d(m_Vertices[2].x, m_Vertices[2].y);
+                glEnd();
+        } else if (m_Vertices[3].m_Seleccionado || m_Vertices[3].m_Iluminado) {
+                if (m_Vertices[3].m_Seleccionado) {
+                        glColor4f(1.0f, 0.0f, 0.0f, 1.0f);
+                } else {
+                        glColor4f(0.0f, 1.0f, 0.0f, 1.0f);
+                }
+
+                glBegin(GL_LINE_STRIP);
+                glVertex2d(m_Vertices[2].x, m_Vertices[2].y);
+                glVertex2d(m_Vertices[3].x, m_Vertices[3].y);
+                glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+                glEnd();
+
+                glPointSize(5.0f);
+                glBegin(GL_POINTS);
+                glVertex2d(m_Vertices[3].x, m_Vertices[3].y);
+                glEnd();
+        }
+}
+
+void GNC::GCS::Widgets::WRectangulo::OffscreenRender(GNC::GCS::Contexto3D* c)
+{
+        const GNC::GCS::Vector& escala = c->RefRelacionMundoPantallaOffscreen();
+
+        TVector Vertices[4] = {c->Reproyectar(m_Vertices[0]) * c->factorReescalado, c->Reproyectar(m_Vertices[1]) * c->factorReescalado, c->Reproyectar(m_Vertices[2]) * c->factorReescalado, c->Reproyectar(m_Vertices[3]) * c->factorReescalado};
+
+        cairo_set_line_width(c->cr, m_LineWidthProp);
+
+        // Color del cuerpo
+        wColorNormal.AplicarCairo(c->cr);
+
+        // Dibujo  de los puntos
+        cairo_arc(c->cr, Vertices[0].x, Vertices[0].y, (WIDGET_SIZE_PUNTO / 2.0f) * escala.x, 0, M_2PI);
+        cairo_fill(c->cr);
+        cairo_arc(c->cr, Vertices[1].x, Vertices[1].y, (WIDGET_SIZE_PUNTO / 2.0f) * escala.x, 0, M_2PI);
+        cairo_fill(c->cr);
+        cairo_arc(c->cr, Vertices[2].x, Vertices[2].y, (WIDGET_SIZE_PUNTO / 2.0f) * escala.x, 0, M_2PI);
+        cairo_fill(c->cr);
+        cairo_arc(c->cr, Vertices[3].x, Vertices[3].y, (WIDGET_SIZE_PUNTO / 2.0f) * escala.x, 0, M_2PI);
+        cairo_fill(c->cr);
+
+        // Dibujo rectangulo
+        cairo_move_to(c->cr, Vertices[0].x, Vertices[0].y);
+        cairo_line_to(c->cr, Vertices[1].x, Vertices[1].y);
+        cairo_line_to(c->cr, Vertices[2].x, Vertices[2].y);
+        cairo_line_to(c->cr, Vertices[3].x, Vertices[3].y);
+        cairo_line_to(c->cr, Vertices[0].x, Vertices[0].y);
+        cairo_stroke(c->cr);
+}
+
diff --git a/cadxcore/widgets/wrectangulo.h b/cadxcore/widgets/wrectangulo.h
new file mode 100644
index 0000000..4f9e538
--- /dev/null
+++ b/cadxcore/widgets/wrectangulo.h
@@ -0,0 +1,148 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <vector>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+//---------------------------------------------------------------------
+
+class EXTAPI WRectanguloBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector                 TVector;
+        typedef GNC::GCS::Events::EventoRaton   TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado TEventoTeclado;
+        typedef GNC::GCS::IWidgetsManager        TWidgetsManager;
+        typedef GNC::GCS::Widgets::IWidget       TWidget;
+
+        WRectanguloBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WRectanguloBuilder();
+
+        virtual void OnMouseEvents(TEventoRaton& event);
+        virtual void OnKeyEvents(TEventoTeclado& event);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+        //region "Helpers"
+
+        bool         m_Dentro;
+        //endregion
+
+
+protected:
+        TVector                  m_NodoMoviendose;  // Cursor
+        TVector                  m_Start;           // Origen del boundingBox
+        TVector                  m_Stop;            // Destino del boundingBox
+
+        TVector                  m_Vertices[4];     // Vertices del bounding box.
+
+        bool                     m_MouseDown;
+        Estado                   m_Estado;
+};
+
+//---------------------------------------------------------------------
+
+class EXTAPI WRectangulo : public GNC::GCS::Widgets::IWidget
+{
+
+        //region "Constructor y destructor"
+
+public:
+        typedef GNC::GCS::Nodo                   TNodo;
+        typedef GNC::GCS::Vector                 TVector;
+        typedef GNC::GCS::Matriz                 TMatriz;
+        typedef GNC::GCS::Contexto3D             TContexto;
+        typedef GNC::GCS::Events::EventoRaton   TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado TEventoTeclado;
+
+        WRectangulo(TVector bb[4], IWidgetsManager* pManager, long vid, const char* nombre, long gid);
+
+        ~WRectangulo();
+
+        //endregion
+
+        //region "Interfaz especifica"
+
+        virtual void OnMouseEvents(TEventoRaton&);
+
+        virtual void OnKeyEvents(TEventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(TVector* vertices, int numVertices);
+
+        virtual void Render(TContexto* c);
+
+        virtual void OffscreenRender(Contexto3D* c);
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return true;
+        }
+
+        //endregion
+
+        //region "Estado interno"
+private:
+        bool            m_MouseDown;
+        TVector         m_PosCursor;
+        //endregion
+
+        //region "Propiedades geometricas"
+public:
+        TNodo m_Vertices[4];
+
+        friend std::ostream& operator<<(std::ostream& out, const WRectangulo& w)
+        {
+                out << "[ Rect = [ " << w.m_Vertices[0] << ", " << w.m_Vertices[1] << ", " << w.m_Vertices[2] << ", " << w.m_Vertices[3] <<  " ],  GID=" << w.m_GID << ", TID=" << w.m_TID << " UID=" << w.m_UID << " ]";
+                return out;
+        };
+
+        friend std::ostream& operator<<(std::ostream& out, const WRectangulo* w)
+        {
+                if (w == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *w;
+                }
+                return out;
+        };
+
+public:
+        //endregion
+
+        //region "Propiedades radiometricas"
+
+        //endregion
+};
+};
+};
+};
diff --git a/cadxcore/widgets/wrejilla.cpp b/cadxcore/widgets/wrejilla.cpp
new file mode 100644
index 0000000..cb4a51b
--- /dev/null
+++ b/cadxcore/widgets/wrejilla.cpp
@@ -0,0 +1,306 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include "wrejilla.h"
+#include <api/icontexto.h>
+#include <api/ievento.h>
+#include <api/iwidgetsmanager.h>
+#include <api/iwidgetsrenderer.h>
+
+#include <cmath>
+#include <cstring>
+
+#include <vtkgl.h>
+#include <vtkImageData.h>
+#include <vtkImageActor.h>
+#include <vtkPointData.h>
+#include <vtk/vtkginkgoimageviewer.h>
+
+//region "Implementacion de WBuilder"
+
+GNC::GCS::Widgets::WRejillaBuilder::WRejillaBuilder(GNC::GCS::IWidgetsManager* pManager, long gid, double escalaX, double escalaY) : GNC::GCS::Widgets::IWidgetBuilder(pManager, GNC::GCS::TriggerButton(), gid, false), IObservadorWidget(-1, gid)
+{
+        m_pRejillaActiva = NULL;
+        m_EscalaX = escalaX;
+        m_EscalaY = escalaY;
+
+        m_pManager->InsertarObservador(this);
+
+        // Comprobamos si existe alguna rejilla para esta vista, y de ser asi la asociamos.
+        for( GNC::GCS::ListaWidgets::iterator it = m_pManager->GetListaWidgets().begin(); it != m_pManager->GetListaWidgets().end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = *it;
+                if (w->GetVID() == -1 && w->GetGID() == m_GID) {
+                        m_pRejillaActiva = dynamic_cast<GNC::GCS::Widgets::WRejilla*> (w);
+                        if (m_pRejillaActiva != NULL) {
+                                m_EscalaX = m_pRejillaActiva->GetEscalaX();
+                                m_EscalaY = m_pRejillaActiva->GetEscalaY();
+                                return;
+                        }
+                }
+        }
+
+}
+
+GNC::GCS::Widgets::WRejillaBuilder::~WRejillaBuilder()
+{
+        m_pManager->EliminarObservador(this);
+}
+
+void GNC::GCS::Widgets::WRejillaBuilder::OnWidgetDestruido(GNC::GCS::Widgets::IWidget* w)
+{
+        if (m_pRejillaActiva == w) {
+                m_pRejillaActiva = NULL;
+        }
+}
+
+bool GNC::GCS::Widgets::WRejillaBuilder::IsRejillaVisible()
+{
+        if(m_pRejillaActiva == NULL) {
+                return false;
+        } else {
+                return !m_pRejillaActiva->EstaOculto();
+        }
+}
+
+void GNC::GCS::Widgets::WRejillaBuilder::ActivarRejilla(bool activar)
+{
+        if (m_pRejillaActiva != NULL) {
+                m_pRejillaActiva->Ocultar(!activar);
+        } else {
+                //se crea y se muestra
+                if(activar) {
+                        m_pRejillaActiva = new WRejilla(m_pManager,m_EscalaX, m_EscalaY, -1, "rejilla", m_GID);
+                        m_pManager->InsertarWidget(m_pRejillaActiva, true);
+                        m_pRejillaActiva->Ocultar(false);
+                }
+        }
+}
+
+void GNC::GCS::Widgets::WRejillaBuilder::SetEscalaX(double escala)
+{
+        m_EscalaX = escala;
+        if (m_pRejillaActiva != NULL) {
+                m_pRejillaActiva->SetEscalaX(escala);
+        }
+}
+
+void GNC::GCS::Widgets::WRejillaBuilder::SetEscalaY(double escala)
+{
+        m_EscalaY = escala;
+        if (m_pRejillaActiva != NULL) {
+                m_pRejillaActiva->SetEscalaY(escala);
+        }
+}
+
+double GNC::GCS::Widgets::WRejillaBuilder::GetEscalaX()
+{
+        return m_EscalaX;
+}
+
+double GNC::GCS::Widgets::WRejillaBuilder::GetEscalaY()
+{
+        return m_EscalaY;
+}
+
+//region "Interfaz especifica"
+void GNC::GCS::Widgets::WRejillaBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& )
+{
+        if (!m_pManager) {
+                return;
+        }
+        GTRACE("GNC::GCS::Widgets::WRejillaBuilder::OnMouseEvents(wxMouseEvent&)");
+}
+
+void GNC::GCS::Widgets::WRejillaBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+        GTRACE("GNC::GCS::Widgets::WRejillaBuilder::OnKeyEvents(wxKeyEvent&)");
+}
+
+void GNC::GCS::Widgets::WRejillaBuilder::Render(GNC::GCS::Contexto3D* )
+{
+        return;
+}
+
+//endregion
+
+//-----------------------------------------------------------------------------------------------
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WRejilla::WRejilla(IWidgetsManager* pManager, double escalaX, double escalaY, long vid, const char* nombre, long gid) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid)
+{
+        m_TopLevel = true;
+        m_Oculto = true;
+        m_EscalaX = escalaX;
+        m_EscalaY = escalaY;
+}
+
+GNC::GCS::Widgets::WRejilla::~WRejilla()
+{
+
+}
+
+//endregion
+
+
+//region "Interfaz generica"
+
+void GNC::GCS::Widgets::WRejilla::OnMouseEvents(GNC::GCS::Events::EventoRaton& )
+{
+}
+
+void GNC::GCS::Widgets::WRejilla::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+}
+
+bool GNC::GCS::Widgets::WRejilla::HitTest(float , float , const GNC::GCS::Vector&)
+{
+        return false;
+}
+
+bool GNC::GCS::Widgets::WRejilla::HitTest(GNC::GCS::Vector* , int )
+{
+        return false;
+}
+
+void GNC::GCS::Widgets::WRejilla::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        //esto es necesario ya que la escala esta en coord mundo as� lo pasamos a coord imagen
+        double spacing[3] = {1.0,1.0,1.0};
+        c->GetRenderer()->m_pImageViewer->GetSpacing(spacing);
+        GNC::GCS::Vector escalaRejilla(m_EscalaX / spacing[0], m_EscalaY / spacing[1]);
+        //
+
+        glPushAttrib(GL_ALL_ATTRIB_BITS);
+
+        float viewport[4] = {0.0f, 0.0f, 0.0f, 0.0f}; // { x, y, ancho, alto }. Convenio de coordenadas: {x, y} == {bottom, left}, {ancho, alto} == {top, right}
+        glGetFloatv(GL_VIEWPORT, viewport);
+        glMatrixMode(GL_PROJECTION);
+        glPushMatrix();
+        glLoadIdentity();
+        glOrtho( 0, viewport[2] , viewport[3] , 0, -1, 1 );
+
+        glMatrixMode(GL_MODELVIEW);
+        glPushMatrix();
+        glLoadIdentity();
+
+
+        const GNC::GCS::Vector& relacionImagenPantalla = c->RelacionImagenPantalla();
+        GNC::GCS::Vector viewPortPantalla(viewport[2], viewport[3]);
+        GNC::GCS::Vector escalaRejillaPantalla = escalaRejilla / relacionImagenPantalla;
+
+        escalaRejillaPantalla.TruncarAMaximo(1.0f);
+
+        GNC::GCS::Vector numCortes = (viewPortPantalla / escalaRejillaPantalla).RedondearBaja();
+        if ( ((int) numCortes.x &1 ) == 0) {
+                numCortes.x++;
+        }
+        if ( ((int) numCortes.y &1 ) == 0) {
+                numCortes.y++;
+        }
+        GNC::GCS::Vector rejillaPantalla = escalaRejillaPantalla * numCortes;
+
+        GNC::GCS::Vector rejillaCentrada[2];
+        rejillaCentrada[0] = rejillaPantalla.OrigenDeVectorCentradoA(viewPortPantalla);
+        rejillaCentrada[1] = rejillaCentrada[0] + rejillaPantalla;
+
+        // Test
+        glLineWidth(0.5f);
+        glColor4f(0.0f, 0.75f, 0.0f, 0.75f);
+
+        int n;
+        float p;
+
+        p = rejillaCentrada[0].x;
+        for ( n = 0; n <= (int) numCortes.x; p += escalaRejillaPantalla.x, ++n) {
+                glBegin(GL_LINES);
+                glVertex3f(p, 0.0f, 0.0f);
+                glVertex3f(p, viewPortPantalla.y, 0.0f);
+                glEnd();
+        }
+
+        p = rejillaCentrada[0].y;
+        for (n = 0; n <= (int)numCortes.y; p += escalaRejillaPantalla.y, ++n) {
+                glBegin(GL_LINES);
+                glVertex3f(0.0f, p, 0.0f);
+                glVertex3f(viewPortPantalla.x, p, 0.0f);
+                glEnd();
+        }
+
+        glMatrixMode(GL_PROJECTION);
+        glPopMatrix();
+        glMatrixMode(GL_MODELVIEW);
+        glPopMatrix();
+        glPopAttrib();
+
+}
+
+void GNC::GCS::Widgets::WRejilla::Seleccionar(bool )
+{
+}
+
+void GNC::GCS::Widgets::WRejilla::Iluminar(bool )
+{
+}
+
+void GNC::GCS::Widgets::WRejilla::Ocultar(bool oculto)
+{
+        if (m_Oculto != oculto) {
+                m_Oculto = oculto;
+                m_Modificado = true;
+        }
+}
+
+
+//endregion
+
+//region "Estado interno"
+
+void GNC::GCS::Widgets::WRejilla::SetEscalaX(double escala)
+{
+        if(escala != m_EscalaX) {
+                m_EscalaX = escala;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WRejilla::SetEscalaY(double escala)
+{
+        if(escala != m_EscalaY) {
+                m_EscalaY = escala;
+                m_Modificado = true;
+        }
+}
+
+double GNC::GCS::Widgets::WRejilla::GetEscalaX()
+{
+        return m_EscalaX;
+}
+
+double GNC::GCS::Widgets::WRejilla::GetEscalaY()
+{
+        return m_EscalaY;
+}
+
diff --git a/cadxcore/widgets/wrejilla.h b/cadxcore/widgets/wrejilla.h
new file mode 100644
index 0000000..c3d6476
--- /dev/null
+++ b/cadxcore/widgets/wrejilla.h
@@ -0,0 +1,144 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/observers/iwidgetsobserver.h>
+#include <api/controllers/ieventscontroller.h>
+#include <vector>
+#include <list>
+#include <set>
+
+namespace GNC
+{
+namespace GCS
+{
+
+namespace Widgets
+{
+
+class WRejilla;
+
+class WRejillaBuilder : public GNC::GCS::Widgets::IWidgetBuilder, public GNC::GCS::Widgets::IObservadorWidget
+{
+public:
+
+        WRejillaBuilder(GNC::GCS::IWidgetsManager* pManager, long gid, double escalaX = 50, double escalaY = 50);
+
+        ~WRejillaBuilder();
+
+        virtual void OnWidgetDestruido(IWidget*);
+
+        virtual bool IsRejillaVisible();
+
+        virtual void ActivarRejilla(bool activar);
+
+        virtual void SetEscalaX(double escala);
+        virtual void SetEscalaY(double escala);
+
+        virtual double GetEscalaX();
+        virtual double GetEscalaY();
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+protected:
+        GNC::GCS::Vector              m_PosicionCursor;
+        WRejilla*                     m_pRejillaActiva;
+        double									m_EscalaX;
+        double									m_EscalaY;
+
+};
+
+//----------------------------------------------------------------------------
+
+class WRejilla : public GNC::GCS::Widgets::IWidget
+{
+
+protected:
+
+
+public:
+
+        //region "Constructor y destructor"
+
+public:
+
+        WRejilla(IWidgetsManager* pManager, double escalaX, double escalaY, long vid, const char* nombre, long gid);
+
+        ~WRejilla();
+
+        //endregion
+
+        //region "Interfaz generica"
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return false;
+        }
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void Seleccionar(bool seleccionado);
+
+        virtual void Iluminar(bool iluminado);
+
+        virtual void Ocultar(bool oculto);
+
+        virtual void SetEscalaX(double escala);
+        virtual void SetEscalaY(double escala);
+
+        virtual double GetEscalaX();
+        virtual double GetEscalaY();
+
+        //endregion
+
+        //region "Estado interno"
+
+private:
+
+
+        //region "Propiedades geometricas"
+private:
+        double m_EscalaX;
+        double m_EscalaY;
+
+public:
+
+        //endregion
+
+        //endregion
+
+};
+}
+}
+}
+
diff --git a/cadxcore/widgets/wrule.cpp b/cadxcore/widgets/wrule.cpp
new file mode 100644
index 0000000..a58fe9c
--- /dev/null
+++ b/cadxcore/widgets/wrule.cpp
@@ -0,0 +1,728 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/xml/xml.h>
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/icontexto.h>
+#include <api/ivista.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/iwidgetsmanager.h>
+#include <api/westilo.h>
+
+#include <widgets/gui/calibracion.h>
+#include <wx/menu.h>
+#include <wx/xml/xml.h>
+#include "wrule.h"
+#include "wtextbox.h"
+
+#include <main/managers/widgetsmanager.h>
+#include <vtkgl.h>
+#include <cmath>
+#include <sstream>
+#include <cairo/cairo.h>
+#include "openglhelper.h"
+#include <eventos/modificacionimagen.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#include <api/math/geometry3d.h>
+
+//region "Implementacion de WRuleBuilder"
+
+GNC::GCS::Widgets::WRuleBuilder::WRuleBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, bool supportsCallibration) :
+        GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask),
+        m_MouseDown(false),
+        m_pReglaTemp(NULL),
+        m_SupportsCallibration(supportsCallibration)
+{
+        //GNC::GCS::Events::EventoModificacionImagen evt1(m_pManager->GetVista());
+}
+
+GNC::GCS::Widgets::WRuleBuilder::~WRuleBuilder()
+{
+        if (m_pReglaTemp != NULL) {
+                delete m_pReglaTemp;
+                m_pReglaTemp = NULL;
+        }
+}
+
+void GNC::GCS::Widgets::WRuleBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        GTRACE("GNC::GCS::Widgets::WRuleBuilder::OnMouseEvents(wxMouseEvent&)");
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_pReglaTemp != NULL) {
+                        m_pReglaTemp->m_Vertices[1] = evento.iP;;
+                        m_pReglaTemp->Recalcular(evento.c->GetRenderer(), true);
+                        //como mínimo 2 pixels imagen
+                        if (std::abs(m_pReglaTemp->Distancia()) > GNC::GCS::Vector::EpsilonDeReales() ) {
+                                ConsumirEvento();
+                                m_pManager->InsertarWidget(m_pReglaTemp);
+                                m_pManager->LanzarEventoCreacion(m_pReglaTemp);
+                        } else {
+                                delete m_pReglaTemp;
+                        }
+                        m_pReglaTemp = NULL;
+                        m_pManager->Modificado();
+                }
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+
+                m_MouseDown = true;
+                TNodo nodos[2];
+                nodos[0] = nodos[1] = evento.iP;
+                if (m_pReglaTemp != NULL) {
+                        delete m_pReglaTemp;
+                }
+                m_pReglaTemp = new GNC::GCS::Widgets::WRule(m_pManager, evento.c->GetRenderer()->GetVID(), nodos, m_SupportsCallibration, "Regla");
+                //std::cout << "linea (leftdwn): " << m_Vertices[0].m_wX << ", " << m_Vertices[0].m_wY << " -> " << m_Vertices[1].m_wX << ", " << m_Vertices[1].m_wY << std::endl;
+                m_pManager->Modificado();
+                ConsumirEvento();
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_pReglaTemp != NULL) {
+                        m_pReglaTemp->m_Vertices[1] = evento.iP;
+                        m_pReglaTemp->Recalcular(evento.c->GetRenderer(), true);
+                        //std::cout << "linea (moving): " << m_Vertices[0].m_wX << ", " << m_Vertices[0].m_wY << " -> " << m_Vertices[1].m_wX << ", " << m_Vertices[1].m_wY << std::endl;
+                        m_pManager->Modificado();
+                }
+                ConsumirEvento();
+        }
+
+}
+
+void GNC::GCS::Widgets::WRuleBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+        GTRACE("GNC::GCS::Widgets::WRuleBuilder::OnKeyEvents(wxKeyEvent&)");
+}
+
+void GNC::GCS::Widgets::WRuleBuilder::Render(GNC::GCS::Contexto3D* c)
+{
+        if (m_pReglaTemp == NULL) {
+                return;
+        }
+        m_pReglaTemp->Render(c);
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WRuleBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_CREAR_LINEA;
+}
+
+//region Interfaz de eventos ginkgo
+
+
+
+//endregion
+
+
+//endregion
+
+
+//region "Constructor y destructor"
+
+GNC::GCS::Widgets::WRule::WRule(IWidgetsManager* pManager, long vid, GNC::GCS::Nodo nodos[2], bool supportsCallibration, const char* nombre) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre,0,TID_USER_ANNOTATION_WIDGET),
+        GNC::GCS::Widgets::IWidgetSerializable(),
+        m_MouseDown(false),
+        m_Angulo(0.0),
+        m_Pendiente(0.0),
+        m_Distancia(0),
+        m_SupportsCallibration(supportsCallibration)
+{
+        m_Vertices[0] = nodos[0];
+        m_Vertices[1] = nodos[1];
+        m_Oculto = false;
+
+        GNC::GCS::Events::EventoModificacionImagen evt1(m_pManager->GetVista());
+        GNC::GCS::IEventsController::Instance()->Registrar(this, evt1);
+
+        m_pTextBox = new GNC::GCS::Widgets::WTextBox(m_pManager, m_VID, m_Vertices[1], GNC::GCS::Widgets::WTextBox::TNM_Dynamic, "ruleBox", "");
+        m_pTextBox->SetTexto("0");
+        m_pManager->InsertarWidget(m_pTextBox);
+}
+
+GNC::GCS::Widgets::WRule::~WRule()
+{
+        m_pManager->EliminarWidget(m_pTextBox, false);
+        LanzarEventoDestruccion();
+}
+
+//endregion
+
+//region "Serializado y desserializado"
+GNC::GCS::Widgets::WRule::WRule(IWidgetsManager* pManager, long vid, wxXmlNode* nodo):
+        GNC::GCS::Widgets::IWidget(pManager, vid, "Regla"),
+        GNC::GCS::Widgets::IWidgetSerializable(nodo),
+        m_MouseDown(false),
+        m_Angulo(0.0),
+        m_Pendiente(0.0),
+        m_Distancia(0),
+        m_SupportsCallibration(false)
+{
+        if(nodo->GetName() != wxT("rule_widget")) {
+                std::cerr<< "Ha ocurrido un error al desserializar el widget regla"<<std::endl;
+        }
+
+        wxXmlNode *child = nodo->GetChildren();
+        while (child) {
+                if(child->GetName() == wxT("node0")) {
+                        m_Vertices[0] = GNC::GCS::Nodo::Deserializar(child);
+                } else if(child->GetName() == wxT("node1")) {
+                        m_Vertices[1] = GNC::GCS::Nodo::Deserializar(child);
+                }
+                child = child->GetNext();
+        }
+
+        GNC::GCS::Events::EventoModificacionImagen evt1(m_pManager->GetVista());
+        GNC::GCS::IEventsController::Instance()->Registrar(this, evt1);
+
+        m_pTextBox = new GNC::GCS::Widgets::WTextBox(m_pManager, m_VID, m_Vertices[1], GNC::GCS::Widgets::WTextBox::TNM_Dynamic, "ruleBox", "");
+        m_pTextBox->SetTexto("0");
+        m_pManager->InsertarWidget(m_pTextBox);
+}
+
+wxXmlNode* GNC::GCS::Widgets::WRule::Serializar(const std::string& nombreMedico)
+{
+        wxXmlNode* resultado = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("rule_widget"));
+        //almacenamos los dos nodos
+        wxXmlNode* nodo = m_Vertices[0].Serializar();
+        nodo->SetName(wxT("node0"));
+        resultado->AddChild(nodo);
+        nodo = m_Vertices[1].Serializar();
+        nodo->SetName(wxT("node1"));
+        resultado->AddChild(nodo);
+        //metadatos
+        SerializarMetadatos(resultado,nombreMedico);
+        return resultado;
+}
+
+//endregion
+
+void GNC::GCS::Widgets::WRule::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if(EstaOculto()) {
+                return;
+        }
+        //------------------------------------------------------
+        // Leaving
+        if (evento.Leaving() ) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        else if (evento.Dragging() && m_MouseDown) {
+                if (EstaSeleccionado() || m_Vertices[0].EstaSeleccionado() || m_Vertices[1].EstaSeleccionado()) {
+                        Vector delta = evento.iP - m_PosCursor;
+                        m_PosCursor = evento.iP;
+                        if (EstaSeleccionado() || m_Vertices[0].EstaSeleccionado()) {
+                                m_Vertices[0] += delta;
+                        }
+                        if (EstaSeleccionado() || m_Vertices[1].EstaSeleccionado()) {
+                                m_Vertices[1] += delta;
+                        }
+                        LanzarEventoModificacion();
+                        Recalcular(evento.c->GetRenderer(), false);
+                        ConsumirEvento();
+                }
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        SeleccionarNodo(m_Vertices[0], false);
+                        SeleccionarNodo(m_Vertices[1], false);
+                        Seleccionar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_StartPointMov = evento.iP;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                if (m_Vertices[0].Hits(evento.iP.x, evento.iP.y, factor)) { // click sobre el nodo
+                        SeleccionarNodo(m_Vertices[0], true);
+                        SeleccionarNodo(m_Vertices[1], false);
+                        Seleccionar(false);
+
+                        dentro = true;
+                } else { // Click fuera del nodo
+                        SeleccionarNodo(m_Vertices[0], false);
+                }
+                if (!dentro && m_Vertices[1].Hits(evento.iP.x, evento.iP.y, factor)) { // click sobre el nodo
+                        SeleccionarNodo(m_Vertices[0], false);
+                        SeleccionarNodo(m_Vertices[1], true);
+                        Seleccionar(false);
+
+                        dentro = true;
+                } else { // Click fuera del nodo
+                        SeleccionarNodo(m_Vertices[1], false);
+                }
+
+                if (!dentro && HitTest(evento.iP.x, evento.iP.y, factor ) ) { // click sobre la recta
+                        if (evento.m_controlDown) { // Inversion de seleccion
+                                InvertirSeleccion();
+                        } else {
+                                Seleccionar(true);
+                        }
+
+                        dentro = true;
+                } else { // Click fuera del nodo
+                        if (!evento.m_controlDown) {
+                                Seleccionar(false);
+                        } else {
+                                ConsumirEvento();
+                                if (EstaSeleccionado()) {
+                                        m_MouseDown = true;
+                                        m_PosCursor = evento.iP;
+                                        m_CentroAntiguo = m_Centro;
+                                }
+                        }
+                }
+
+                if (dentro) {
+                        m_MouseDown = true;
+                        m_PosCursor = evento.iP;
+                        m_CentroAntiguo = m_Centro;
+                        ConsumirEvento();
+                }
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        ActualizarTimestampModificacion();
+                        m_MouseDown = false;
+                        ConsumirEvento();
+                }
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+
+                if (EventoConsumido()) {
+                        IluminarNodo(m_Vertices[0], false);
+                        IluminarNodo(m_Vertices[1], false);
+                        Iluminar(false);
+                        return;
+                }
+                bool dentro = false;
+
+                m_PosCursor = evento.iP;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                if (m_Vertices[0].Hits(evento.iP.x, evento.iP.y, factor)) {
+
+                        IluminarNodo(m_Vertices[0], true);
+                        IluminarNodo(m_Vertices[1], false);
+                        Iluminar(false);
+
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_Vertices[0], false);
+                }
+
+                if (m_Vertices[1].Hits(evento.iP.x, evento.iP.y, factor)) {
+
+                        IluminarNodo(m_Vertices[0], false);
+                        IluminarNodo(m_Vertices[1], true);
+                        Iluminar(false);
+
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_Vertices[1], false);
+                }
+
+                if (!dentro && HitTest(evento.iP.x, evento.iP.y, factor) ) {
+                        Iluminar(true);
+                        dentro = true;
+                } else {
+                        Iluminar(false);
+                }
+
+                if (dentro) {
+                        ConsumirEvento();
+                }
+                return;
+        }
+}
+
+void GNC::GCS::Widgets::WRule::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+bool GNC::GCS::Widgets::WRule::HitTest(float x, float y, const GNC::GCS::Vector& rel)
+{
+        bool hits = false;
+
+        GNC::GCS::Vector dpos(x,y);
+        if ( m_Vertices[0].DistanciaEuclideaCuadrado(m_Vertices[1]) / 4.0f > dpos.DistanciaEuclideaCuadrado(m_Vertices[0].PuntoMedio(m_Vertices[1]))) {
+
+                GNC::GCS::Vector vdir = m_Vertices[1] - m_Vertices[0];
+                GNC::GCS::Vector orto = (vdir / rel).VectorOrtogonal() * rel;
+
+                GNC::GCS::Vector inter = GNC::GCS::Vector::InterseccionEntreRectas(dpos, dpos + orto, m_Vertices[0], m_Vertices[1]);
+                GNC::GCS::Vector diff = (inter - dpos).ValorAbsoluto();
+                if ( (diff / rel).Norma2Cuadrado() < (m_Vertices[0].m_Size * m_Vertices[0].m_Size) ) {
+                        hits = true;
+                }
+        }
+        return hits;
+}
+
+bool GNC::GCS::Widgets::WRule::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+        return m_Vertices[0].DentroDePoligono2(vertices, numVertices) && m_Vertices[1].DentroDePoligono2(vertices, numVertices);
+}
+
+void GNC::GCS::Widgets::WRule::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+
+        glLineWidth(m_LineWidthProp);
+
+        // Highlights sobre nodos activos
+        if (m_Vertices[0].m_Iluminado) {
+                wDibujarElipseDegradado(m_Vertices[0], wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+        }
+
+        if (m_Vertices[1].m_Iluminado) {
+                wDibujarElipseDegradado(m_Vertices[1], wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+        }
+
+        GNC::GCS::Vector fsombra;
+        if (m_Seleccionado && m_MouseDown) {
+                fsombra.Asignar(WIDGET_OFFSET_X_SOMBRA_SELECCIONADO, WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO);
+        } else {
+                fsombra.Asignar(WIDGET_OFFSET_X_SOMBRA, WIDGET_OFFSET_Y_SOMBRA);
+        }
+        fsombra *= escala;
+
+        //------------------------------------------------------------------------------------------
+        // Sombra de la regla
+        wColorSombra.Aplicar();
+        glBegin(GL_LINES);
+        glVertex2d(m_Vertices[0].x + fsombra.x, m_Vertices[0].y - fsombra.y);
+        glVertex2d(m_Vertices[1].x + fsombra.x, m_Vertices[1].y - fsombra.y);
+        glEnd();
+
+        // Dibujado de la regla
+        wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINES);
+        glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+        glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+        glEnd();
+
+
+        TVector diff = m_Vertices[1] - m_Vertices[0];
+
+        // Apply spacing deformation
+        diff /= GNC::GCS::Vector(escala.x, escala.y);
+
+        TVector puntoMedio = m_Vertices[0].PuntoMedio(m_Vertices[1]);
+        TVector ortogonal = (diff).VectorOrtogonal().Normalizar() * escala * 6.0;
+
+        if (m_MouseDown && m_Seleccionado) {
+                ortogonal *= WIDGET_INCREMENTO_DETALLE_SELECCIONADO;
+        }
+
+        TVector f00 = m_Vertices[0] + ortogonal;
+        TVector f01 = m_Vertices[0] - ortogonal;
+        TVector f10 = puntoMedio + ortogonal;
+        TVector f20 = m_Vertices[1] + ortogonal;
+        TVector f21 = m_Vertices[1] - ortogonal;
+
+        //------------------------------------------------------------------------------------------
+        // Dibujado de las marcas de la regla.
+        //-- Sombras
+        wColorSombra.Aplicar();
+        glBegin(GL_LINES);
+        glVertex2d(f00.x + fsombra.x, f00.y - fsombra.y);
+        glVertex2d(f01.x + fsombra.x, f01.y - fsombra.y);
+        glEnd();
+
+        glBegin(GL_LINES);
+        glVertex2d(f10.x + fsombra.x, f10.y - fsombra.y);
+        glVertex2d(puntoMedio.x + fsombra.x, puntoMedio.y - fsombra.y);
+        glEnd();
+
+        glBegin(GL_LINES);
+        glVertex2d(f20.x + fsombra.x, f20.y - fsombra.y);
+        glVertex2d(f21.x + fsombra.x, f21.y - fsombra.y);
+        glEnd();
+
+        // Right mark
+        glBegin(GL_LINES);
+        glVertex2d(f20.x + fsombra.x, f20.y - fsombra.y);
+        glVertex2d(f21.x + fsombra.x, f21.y - fsombra.y);
+        glEnd();
+
+        //-- Left mark
+        wAplicarColor(m_Iluminado || m_Vertices[0].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINES);
+        glVertex2d(f00.x, f00.y);
+        glVertex2d(f01.x, f01.y);
+        glEnd();
+
+        //-- Central mark
+        wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINES);
+        glVertex2d(f10.x, f10.y);
+        glVertex2d(puntoMedio.x, puntoMedio.y);
+        glEnd();
+
+        // Right mark
+        wAplicarColor(m_Iluminado || m_Vertices[1].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINES);
+        glVertex2d(f20.x, f20.y);
+        glVertex2d(f21.x, f21.y);
+        glEnd();
+
+        //------------------------------------------------------------------------------------------
+        // Dibujado de la linea punteada de arrastre
+        if (m_MouseDown) {
+                glLineWidth(m_DraggingLineWidthProp);
+                glEnable(GL_LINE_STIPPLE);
+                wColorLineaArrastre.Aplicar();
+                glLineStipple(3, 0xAAAA);
+
+                GNC::GCS::Vector startPoint, endPoint;
+                if (m_Vertices[0].m_Seleccionado) {
+                        startPoint = m_Vertices[0];
+                        endPoint = m_Vertices[0] - (m_PosCursor - m_StartPointMov);
+                } else if (m_Vertices[1].m_Seleccionado) {
+                        startPoint = m_Vertices[1];
+                        endPoint = m_Vertices[1] - (m_PosCursor - m_StartPointMov);
+                } else { // Es el centro
+                        startPoint = m_CentroAntiguo;
+                        endPoint = m_Centro;
+                }
+
+                glBegin(GL_LINE_STRIP);
+                glVertex2d(startPoint.x, startPoint.y);
+                glVertex2d(endPoint.x, endPoint.y);
+                glEnd();
+
+                glDisable(GL_LINE_STIPPLE);
+        }
+
+}
+
+bool GNC::GCS::Widgets::WRule::GetMenuContextual(wxMenu* menuContextual, wxWindow* pParent)
+{
+
+        if (m_SupportsCallibration) {
+                GNC::GCS::Widgets::Dialogos::Calibracion* pCalibracion = new GNC::GCS::Widgets::Dialogos::Calibracion(pParent, this, m_pManager);
+                wxMenuItem* pMenuCalibrar = new wxMenuItem(menuContextual, 1, _("Image Calibration"), _("Image Calibration"), wxITEM_NORMAL );
+                menuContextual->Connect(1,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( GNC::GCS::Widgets::Dialogos::Calibracion::OnClickEnMenu), NULL, pCalibracion);
+
+#ifdef __WXMSW__
+                pMenuCalibrar->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoCalibrarImagen());
+#else
+                pMenuCalibrar->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoCalibrarImagen());
+#endif
+
+                menuContextual->Append(pMenuCalibrar);
+                return true;
+        } else {
+                return false;
+        }
+}
+
+void GNC::GCS::Widgets::WRule::Recalcular(GNC::GCS::IWidgetsRenderer* renderer, bool building)
+{
+        GNC::GCS::Vector3D worldPosition0, worldPosition1, wDiff;
+        GNC::GCS::Vector iDiff;
+
+
+        if (renderer != NULL && renderer->m_pImageViewer != NULL) {
+                const double tindex = renderer->m_pImageViewer->GetTindex();
+                double imagePosition0[3] = {m_Vertices[0].x, m_Vertices[0].y, tindex};
+                double imagePosition1[3] = {m_Vertices[1].x, m_Vertices[1].y, tindex};
+                renderer->m_pImageViewer->CoordenadasImagenACoordenadasMundo(imagePosition0, worldPosition0.v);
+                renderer->m_pImageViewer->CoordenadasImagenACoordenadasMundo(imagePosition1, worldPosition1.v);
+        }
+
+        //std::cout << "--- Recalculando... " << std::endl;
+        m_Modificado = true;
+        wDiff = worldPosition1 - worldPosition0;
+        iDiff = m_Vertices[1] - m_Vertices[0];
+        m_Centro = m_Vertices[0].PuntoMedio(m_Vertices[1]);
+        m_Pendiente = iDiff.Pendiente();
+        m_Angulo = iDiff.AnguloSobreAbscisa();
+        m_Distancia = worldPosition0.DistanciaEuclidea(worldPosition1);
+        //std::cout << *this << std::endl;
+
+        std::stringstream os;
+        os.setf(ios::floatfield, ios::fixed );
+        os.precision(2);
+        os.fill('0');
+        float metricaDistancia = wDiff.Norma2();
+
+        double spacing[3] = {0.0, 0.0, 0.0};
+        bool hasSpacing = m_pManager->GetVista()->GetEstudio()->GetSpacingActive(spacing[0], spacing[1], spacing[2]);
+        if (hasSpacing) {
+                if (metricaDistancia > 1000.0f) {
+                        os << metricaDistancia / 1000.0f << " m.";
+                } else if (metricaDistancia > 10.0f) {
+                        os << metricaDistancia / 10.0f << " cm.";
+                } else if (metricaDistancia < 1.0f) {
+                        os << metricaDistancia * 1000.0f << " µm.";
+                } else {
+                        os << metricaDistancia << " mm.";
+                }
+        } else {
+                os << metricaDistancia << " px.";
+        }
+
+        std::string medida = os.str();
+
+        m_pTextBox->SetTexto(medida);
+        if (building) {
+                m_pTextBox->SetPosition(m_Vertices[0].PuntoMedio(m_Vertices[1]));
+        }
+}
+
+//region Interfaz de eventos ginkgo
+
+//endregion
+void GNC::GCS::Widgets::WRule::InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades)
+{
+        TMapaPropiedades& primerMapa = listaMapaPropiedades.front();
+        {
+                std::stringstream os;
+                os.setf(ios::floatfield, ios::fixed );
+                os.precision(2);
+                os.fill('0');
+
+                double spacing[3] = {0.0, 0.0, 0.0};
+                bool hasSpacing = m_pManager->GetVista()->GetEstudio()->GetSpacingActive(spacing[0], spacing[1], spacing[2]);
+                float metricaDistancia = m_Distancia;
+                if (hasSpacing) {
+                        if (metricaDistancia > 1000.0f) {
+                                os << metricaDistancia / 1000.0f << " m.";
+                        } else if (metricaDistancia > 10.0f) {
+                                os << metricaDistancia / 10.0f << " cm.";
+                        } else if (metricaDistancia < 1.0f) {
+                                os << metricaDistancia * 1000.0f << " µm.";
+                        } else {
+                                os << metricaDistancia << " mm.";
+                        }
+                } else {
+                        os << metricaDistancia << " px.";
+                }
+
+                std::string medida = os.str();
+                primerMapa[_Std("Length")] = medida;
+        }
+        {
+                std::stringstream out;
+                out << m_Vertices[0] << ",\n" << m_Vertices[1];
+                primerMapa[_Std("Points (I)")] = out.str();
+        }
+        {
+                std::stringstream out;
+                out << PuntoToStringMundo(m_Vertices[0]) << "," << std::endl;
+                out << PuntoToStringMundo(m_Vertices[1]) ;
+
+                primerMapa[_Std("Points (M)")] = out.str();
+        }
+}
+
+void GNC::GCS::Widgets::WRule::OffscreenRender(GNC::GCS::Contexto3D* c)
+{
+        const GNC::GCS::Vector& escala = c->RefRelacionMundoPantallaOffscreen();
+
+        GNC::GCS::Vector vert[2] = {c->Reproyectar(m_Vertices[0]) * c->factorReescalado, c->Reproyectar(m_Vertices[1]) * c->factorReescalado };
+
+        glLineWidth(m_LineWidthProp);
+
+        // Dibujado de la regla
+        wColorNormal.AplicarCairo(c->cr);
+        cairo_move_to(c->cr, vert[0].x, vert[0].y);
+        cairo_line_to(c->cr, vert[1].x, vert[1].y);
+        cairo_stroke(c->cr);
+
+        TVector diff = vert[1] - vert[0];
+
+        TVector puntoMedio = vert[0].PuntoMedio(vert[1]);
+        TVector ortogonal = (diff).VectorOrtonormal() * escala * 6.0f;
+
+        TVector f00 = vert[0] + ortogonal;
+        TVector f01 = vert[0] - ortogonal;
+        TVector f10 = puntoMedio + ortogonal;
+        TVector f20 = vert[1] + ortogonal;
+        TVector f21 = vert[1] - ortogonal;
+
+        //------------------------------------------------------------------------------------------
+        // Dibujado de las marcas de la regla.
+
+        //-- marcas normales
+        wColorNormal.AplicarCairo(c->cr);
+        //-- Marca izquierda
+        cairo_move_to(c->cr, f00.x , f00.y );
+        cairo_line_to(c->cr, f01.x , f01.y );
+        cairo_stroke(c->cr);
+
+        //-- Marca central
+        cairo_move_to(c->cr, f10.x , f10.y );
+        cairo_line_to(c->cr, puntoMedio.x , puntoMedio.y );
+        cairo_stroke(c->cr);
+
+        // Marca derecha
+        cairo_move_to(c->cr, f20.x , f20.y );
+        cairo_line_to(c->cr, f21.x , f21.y );
+        cairo_stroke(c->cr);
+
+}
+
+void GNC::GCS::Widgets::WRule::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        if (evt->GetCodigoEvento() == ginkgoEVT_Core_ModificacionImagen) {
+                GNC::GCS::Events::EventoModificacionImagen* pEvt = dynamic_cast<GNC::GCS::Events::EventoModificacionImagen*>(evt);
+                if (pEvt == NULL) {
+                        std::cerr << "Error al interpretar evento como evento de modificacion de imagen: Evento = " << evt << std::endl;
+                        return;
+                }
+                if(pEvt->GetTipo() == GNC::GCS::Events::EventoModificacionImagen::ImagenRecalibrada) {
+                        Recalcular(m_pManager->GetRendererActivo(), false);
+                }
+        }
+}
+
diff --git a/cadxcore/widgets/wrule.h b/cadxcore/widgets/wrule.h
new file mode 100644
index 0000000..6388af8
--- /dev/null
+++ b/cadxcore/widgets/wrule.h
@@ -0,0 +1,178 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/iwidgetsmanager.h>
+#include <api/widgetserializable.h>
+#include <api/observers/ieventsobserver.h>
+#include <widgets/openglhelper.h>
+
+class wxXmlNode;
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtkSmartPointer.h>
+#include <vtkImageData.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+class WTextBox;
+
+class WRule;
+
+class EXTAPI WRuleBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Nodo   TNodo;
+        typedef GNC::GCS::Matriz TMatriz;
+
+        WRuleBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, bool supportsCallibration);
+
+        ~WRuleBuilder();
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+protected:
+
+        bool                           m_MouseDown;
+        WRule*                         m_pReglaTemp;
+        bool                           m_SupportsCallibration;
+
+};
+
+class EXTAPI WRule : public GNC::GCS::Widgets::IWidget, public GNC::GCS::Widgets::IWidgetSerializable, GNC::GCS::IEventsObserver
+{
+
+public:
+        GNC::GCS::Nodo                  m_Vertices[2];
+
+//region "Constructor y destructor"
+
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Matriz TMatriz;
+
+        //static const unsigned int m_NumNodos = 100;
+
+        GNC::GCS::Vector m_StartPointMov;
+
+        WRule(IWidgetsManager* pManager, long vid, GNC::GCS::Nodo nodos[2], bool supportsCallibration, const char* nombre = "");
+
+        ~WRule();
+
+//endregion
+
+        //region "Serializado y desserializado"
+        WRule(IWidgetsManager* pManager, long vid, wxXmlNode* nodo);
+
+        wxXmlNode* Serializar(const std::string& nombreMedico);
+
+        //endregion
+
+
+        //region "Interfaz especifica"
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return true;
+        }
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void OffscreenRender(Contexto3D* c);
+
+        virtual float Distancia()
+        {
+                return m_Distancia;
+        }
+
+        //endregion
+
+        //region menu contextual
+        virtual bool GetMenuContextual(wxMenu* pMenu, wxWindow* pParent) ;
+        //endregion
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+        //region "Estado interno"
+private:
+        bool            m_MouseDown;
+        //endregion
+
+        //region "Propiedades geometricas"
+private:
+        GNC::GCS::Nodo   m_Centro;
+        GNC::GCS::Vector m_CentroAntiguo;
+        float            m_Angulo;
+        float            m_Pendiente;
+
+        WTextBox*        m_pTextBox;
+
+        GNC::GCS::Vector m_Escala;
+
+        friend std::ostream& operator<<(std::ostream& out, const WRule& w)
+        {
+                out << "[ P0=" << w.m_Vertices[0] << ", P1=" << w.m_Vertices[1] <<
+                    ", Centro=" << w.m_Centro << ", Angulo=" << w.m_Angulo << "=" << w.m_Angulo*180.0f/M_PI <<
+                    ", Pendiente=" << w.m_Pendiente << ", Longitud=" << w.m_Distancia << ", CursorPoint=" << w.m_PosCursor << " ]";
+                return out;
+        }
+
+public:
+        float            m_Distancia;
+
+protected:
+        bool             m_SupportsCallibration;
+
+public:
+
+        void Recalcular(GNC::GCS::IWidgetsRenderer* renderer, bool building);
+
+public:
+        //endregion
+        virtual void InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades);
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wseleccion.cpp b/cadxcore/widgets/wseleccion.cpp
new file mode 100644
index 0000000..0724d40
--- /dev/null
+++ b/cadxcore/widgets/wseleccion.cpp
@@ -0,0 +1,150 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include "wseleccion.h"
+#include <main/managers/widgetsmanager.h>
+#include <api/icontexto.h>
+#include <api/math/geometry3d.h>
+#include <vtkgl.h>
+#include <cmath>
+
+//region "Implementacion de WSeleccionBuilder"
+
+GNC::GCS::Widgets::WSeleccionBuilder::WSeleccionBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        m_Dentro = true;
+}
+
+GNC::GCS::Widgets::WSeleccionBuilder::~WSeleccionBuilder()
+{
+}
+
+void GNC::GCS::Widgets::WSeleccionBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        /*
+        if (evento.Entering()) {
+        	m_Dentro = true;
+        	m_pManager->Modificado();
+        }
+        else if (evento.Leaving()) {
+        	m_Dentro = false;
+        	m_pManager->Modificado();
+        }
+        */
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+                m_Estado = WBS_Ninguno;
+
+                m_Stop = evento.iP;
+
+                if (m_Start.DistanciaEuclidea(m_Stop) < GNC::GCS::Vector::EpsilonDeReales() ) {
+                        evento.Skip(true);
+                } else {
+                        GNC::GCS::Vector a = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[0]);
+                        GNC::GCS::Vector b = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[1]);
+                        m_BB[0] = m_Start;
+                        m_BB[1] = a;
+                        m_BB[2] = m_Stop;
+                        m_BB[3] = b;
+                        m_pManager->PropagarHitTestSeleccion(m_BB, 4);
+
+                        evento.Skip(false);
+                }
+                m_pManager->Modificado();
+                m_Estado = WBS_Ninguno;
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+                m_MouseDown = true;
+
+                m_Start = evento.iP;
+                m_Stop = m_Start;
+
+
+                m_pManager->Modificado();
+                m_Estado = WBS_Creando;
+                evento.Skip(false);
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+
+                m_Stop = evento.iP;
+
+                m_pManager->Modificado();
+                evento.Skip(false);
+        } else if( evento.Moving() ) {
+                GTRACE("Moviendose");
+                m_NodoMoviendose = evento.iP;
+                m_Estado = WBS_Ninguno;
+        }
+
+
+}
+
+void GNC::GCS::Widgets::WSeleccionBuilder::OnKeyEvents(TEventoTeclado&)
+{
+
+}
+
+void GNC::GCS::Widgets::WSeleccionBuilder::Render(GNC::GCS::Contexto3D* c)
+{
+
+        if (m_Estado == WBS_Creando) {
+                glLineWidth(1.0f);
+                glColor4f(0.0f, 0.36f, 0.807f, 0.15f);
+                GNC::GCS::Vector a = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - c->ScreenDirectionCosines[0]);
+                GNC::GCS::Vector b = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - c->ScreenDirectionCosines[1]);
+
+                glBegin(GL_QUADS);
+                glVertex2dv(m_Start.v);
+                glVertex2dv(a.v);
+                glVertex2dv(m_Stop.v);
+                glVertex2dv(b.v);
+                glEnd();
+                glColor4f(0.0f, 0.36f, 0.807f, 1.0f);
+                glBegin(GL_LINE_LOOP);
+                glVertex2dv(m_Start.v);
+                glVertex2dv(a.v);
+                glVertex2dv(m_Stop.v);
+                glVertex2dv(b.v);
+                glEnd();
+        } else {
+
+        }
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WSeleccionBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_FLECHA;
+}
+
+//endregion
diff --git a/cadxcore/widgets/wseleccion.h b/cadxcore/widgets/wseleccion.h
new file mode 100644
index 0000000..d5216ae
--- /dev/null
+++ b/cadxcore/widgets/wseleccion.h
@@ -0,0 +1,87 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/math/geometry3d.h>
+#include <vector>
+
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Events
+{
+class EventoRaton;
+class EventoTeclado;
+}
+}
+}
+
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+//---------------------------------------------------------------------
+
+class WSeleccionBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Events::EventoRaton    TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado  TEventoTeclado;
+        typedef GNC::GCS::IWidgetsManager        TWidgetsManager;
+        typedef GNC::GCS::Widgets::IWidget       TWidget;
+
+        WSeleccionBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WSeleccionBuilder();
+
+        virtual void OnMouseEvents(TEventoRaton& event);
+        virtual void OnKeyEvents(TEventoTeclado& event);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+        //region "Helpers"
+
+        bool         m_Dentro;
+        //endregion
+
+
+protected:
+        TVector  m_NodoMoviendose;  // Cursor
+        TVector  m_Start;           // Origen del boundingBox
+        TVector  m_Stop;            // Destino del boundingBox
+
+        TVector  m_BB[4]; // Vertices del bounding box.
+
+        bool     m_MouseDown;
+        Estado   m_Estado;
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wsemillas.h b/cadxcore/widgets/wsemillas.h
new file mode 100644
index 0000000..0c54be7
--- /dev/null
+++ b/cadxcore/widgets/wsemillas.h
@@ -0,0 +1,272 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <vector>
+
+#include <api/iwidgets.h>
+
+class vtkImageData;
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+namespace Semillas
+{
+
+//------------------------------------------------------------------
+
+class RepresentacionSemilla
+{
+public:
+
+        typedef struct Color {
+                float r;
+                float g;
+                float b;
+                float a;
+
+                inline void asignar(float r, float g, float b, float a)
+                {
+                        this->r = r;
+                        this->g = g;
+                        this->b = b;
+                        this->a = a;
+                };
+
+        } Color;
+
+        //region "Constructor y destructor"
+
+        RepresentacionSemilla(bool soportaAutoBorrado = false)
+        {
+                m_RadioCruz = 20.0f;
+                m_RadioCircunferencia = 15.0f;
+                m_SoportaAutoBorrado = soportaAutoBorrado;
+        }
+
+        ~RepresentacionSemilla()
+        {
+
+        }
+
+        void SetAutoBorrado(bool autoBorrado)
+        {
+                m_SoportaAutoBorrado = autoBorrado;
+        }
+
+        bool SoportaAutoBorrado()
+        {
+                return m_SoportaAutoBorrado;
+        }
+
+        //region "Propiedades radiometricas"
+
+        Color colorCruz;
+        Color colorCircunferencia;
+        Color colorCruzIluminada;
+        Color colorCircunferenciaIluminada;
+        Color colorCruzSeleccionada;
+        Color colorCircunferenciaSeleccionada;
+        float m_RadioCircunferencia;
+        float m_RadioCruz;
+        bool m_SoportaAutoBorrado;
+
+        //endregion
+};
+
+typedef std::vector<GNC::GCS::Widgets::Semillas::RepresentacionSemilla*> ListaRepresentaciones;
+
+
+}
+
+//---------------------------------------------------------------------
+
+class WSemillasBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+        WSemillasBuilder(GNC::GCS::IWidgetsManager* pManager, int numMaxSemillas, GNC::GCS::Widgets::Semillas::ListaRepresentaciones* pRepresentaciones, long gid, vtkImageData* pImageData = NULL);
+
+        ~WSemillasBuilder();
+
+        virtual void SetRepresentacionActiva(int idRepresentacion);
+
+        virtual void OnMouseEvents(GNC::GCS::Eventos::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Eventos::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+
+protected:
+        int                         m_NumMaxSemillas;
+        GNC::GCS::Vector m_VerticesSeleccion[2];
+        GNC::GCS::Nodo   m_Nodo;
+        bool                      m_MouseDown;
+        int                         m_RepresentacionActiva;
+        Estado                   m_Estado;
+        GNC::GCS::Widgets::Semillas::ListaRepresentaciones* m_pRepresentaciones;
+        GNC::GCS::Widgets::Semillas::RepresentacionSemilla* m_pRepActiva;
+        vtkImageData*                                       m_pImageData;
+
+};
+
+//---------------------------------------------------------------------
+
+class WSemillas : public GNC::GCS::Widgets::IWidget
+{
+
+
+        //region "Constructor y destructor"
+
+public:
+        WSemillas(IWidgetsManager* pManager, long vid, GNC::GCS::Widgets::Semillas::RepresentacionSemilla* pRepSemilla, GNC::GCS::Nodo nodo, const char* nombre, long gid, long tid, bool oculto = false);
+
+        ~WSemillas();
+
+        //endregion
+
+        //region "Serializado y desserializado"
+        WSemillas(IWidgetsManager* pManager, long vid, GNC::GCS::Widgets::Semillas::RepresentacionSemilla* pRepSemilla, long gid, wxXmlNode* nodo);
+
+        wxXmlNode* Serializar();
+        //endregion
+
+        //region "Interfaz especifica"
+
+        virtual void OnMouseEvents(GNC::GCS::Eventos::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Eventos::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, float umbralCuadrado);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return m_pRepresentacion != NULL && m_pRepresentacion->SoportaAutoBorrado();
+        }
+
+        virtual GNC::GCS::Nodo& GetNodo()
+        {
+                return m_Nodo;
+        }
+
+        virtual bool EsMarcador() const
+        {
+                return true;
+        }
+
+        virtual bool DelimitaArea() const
+        {
+                return false;
+        }
+
+        virtual void GetPuntoAnclaje(GNC::GCS::Vector& punto, const GNC::GCS::Vector& escala) const
+        {
+                punto = m_Nodo + GNC::GCS::Vector(10.0f, -10.0f) * escala;
+        }
+
+        virtual void GetPosicion(GNC::GCS::Vector& posicion) const
+        {
+                posicion = m_Nodo;
+        }
+
+        virtual void Seleccionar(bool seleccionar)
+        {
+                SeleccionarNodo(m_Nodo, seleccionar);
+        }
+
+        virtual void Iluminar(bool iluminar)
+        {
+                if (iluminar != m_Nodo.EstaIluminado()) {
+                        IluminarNodo(m_Nodo, iluminar);
+                        m_Modificado = true;
+                }
+        }
+
+        virtual void SeleccionarNodo(GNC::GCS::Nodo& nodo, bool seleccionar)
+        {
+                if(seleccionar != nodo.EstaSeleccionado()) {
+                        nodo.Seleccionar(seleccionar);
+                        m_Modificado = true;
+                }
+        }
+
+        virtual bool EstaSeleccionado() const
+        {
+                return m_Nodo.EstaSeleccionado();
+        }
+
+        virtual bool EstaIluminado() const
+        {
+                return m_Nodo.EstaIluminado();
+        }
+
+        //endregion
+
+        //region "Estado interno"
+private:
+        bool            m_MouseDown;
+        //endregion
+
+        //region "Propiedades geometricas"
+private:
+        GNC::GCS::Nodo   m_Nodo;
+        GNC::GCS::Vector m_PosAntigua;
+
+public:
+        friend std::ostream& operator<<(std::ostream& out, const WSemillas& w)
+        {
+                out << "[ P=" << w.m_Nodo << ", GID=" << w.m_GID << ", TID=" << w.m_TID << " UID=" << w.m_UID << " ]";
+                return out;
+        }
+
+        friend std::ostream& operator<<(std::ostream& out, const WSemillas* w)
+        {
+                if (w == NULL) {
+                        out << "[ NULL ]";
+                } else {
+                        out << *w;
+                }
+                return out;
+        }
+
+public:
+        //endregion
+
+        //region "Propiedades radiometricas"
+
+        GNC::GCS::Widgets::Semillas::RepresentacionSemilla* m_pRepresentacion;
+
+        //endregion
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wslider.cpp b/cadxcore/widgets/wslider.cpp
new file mode 100644
index 0000000..a8b82ea
--- /dev/null
+++ b/cadxcore/widgets/wslider.cpp
@@ -0,0 +1,129 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include "wslider.h"
+#include <main/managers/widgetsmanager.h>
+#include <vtkgl.h>
+#include <api/westilo.h>
+#include <cmath>
+
+//region "Implementacion de WSliderBuilder"
+#include <api/icontexto.h>
+
+GNC::GCS::Widgets::WSliderBuilder::WSliderBuilder(TWidgetsManager* pManager, TContract* pContract, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_pContract = pContract;
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        m_Dentro = true;
+        m_InitialSlice = 0;
+        m_Start = 0.0;
+        m_Stop = 0.0;
+        m_Changed = false;
+}
+
+GNC::GCS::Widgets::WSliderBuilder::~WSliderBuilder()
+{
+}
+
+void GNC::GCS::Widgets::WSliderBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+                m_Estado = WBS_Ninguno;
+
+                if (m_Changed) {
+                        m_pManager->Modificado();
+                        ConsumirEvento();
+                }
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+                m_MouseDown = true;
+
+                m_Changed = false;
+                m_Start = evento.sY;
+                m_Stop = m_Start;
+                m_InitialSlice = m_pContract->GetSlice();
+
+                m_pManager->Modificado();
+
+                m_Estado = WBS_Creando;
+                evento.Skip(false);
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+
+                m_Stop = evento.sY;
+
+                double delta = (m_Stop - m_Start) / 5.0;
+
+                int newSlice = m_InitialSlice;
+                int numberOfSlices = m_pContract->GetNumberOfSlices();
+                if (delta != 0.0) {
+                        m_Changed = true;
+
+                        if (delta > 0.0)  {
+                                newSlice += std::floor(delta);
+                        } else {
+                                newSlice += std::ceil(delta);
+                        }
+                        newSlice = std::max(0, std::min(newSlice,  numberOfSlices - 1));
+                }
+                if (m_pContract->GetSlice() != newSlice) {
+                        m_pContract->SetSlice(newSlice);
+                } else if ((delta >= 1.0 || delta <= -1.0) && (newSlice == 0 || newSlice == numberOfSlices)) {
+                        m_Start = m_Stop;
+                        m_InitialSlice = newSlice;
+                }
+                evento.Skip(false);
+        } else if( evento.Moving() ) {
+                GTRACE("Moviendose");
+                m_NodoMoviendose = evento.iP;
+                m_Estado = WBS_Ninguno;
+        }
+
+}
+
+void GNC::GCS::Widgets::WSliderBuilder::OnKeyEvents(TEventoTeclado&)
+{
+
+}
+
+void GNC::GCS::Widgets::WSliderBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WSliderBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_FLECHA;
+}
+
+//endregion
diff --git a/cadxcore/widgets/wslider.h b/cadxcore/widgets/wslider.h
new file mode 100644
index 0000000..131f7ad
--- /dev/null
+++ b/cadxcore/widgets/wslider.h
@@ -0,0 +1,81 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <export/tools/itoolslider.h>
+#include <api/iwidgets.h>
+#include <api/math/geometry3d.h>
+#include <export/contracts/islidercontract.h>
+#include <vector>
+
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+//---------------------------------------------------------------------
+
+class WSliderBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Events::EventoRaton   TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado TEventoTeclado;
+        typedef GNC::GCS::IWidgetsManager        TWidgetsManager;
+        typedef GNC::GCS::Widgets::IWidget       TWidget;
+        typedef GNC::GCS::ISliderContract        TContract;
+
+        WSliderBuilder(TWidgetsManager* pManager, TContract* pContract, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WSliderBuilder();
+
+        virtual void OnMouseEvents(TEventoRaton& event);
+        virtual void OnKeyEvents(TEventoTeclado& event);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+        //region "Helpers"
+
+        bool         m_Dentro;
+        bool         m_Changed;
+        //endregion
+
+
+protected:
+        TVector  m_NodoMoviendose;  // Cursor
+
+        int     m_InitialSlice;
+        double  m_Start;           // Displacement origin in screen pixels
+        double  m_Stop;            // Displacement destination in screen pixels
+
+        bool     m_MouseDown;
+        Estado   m_Estado;
+
+
+        TContract* m_pContract;
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wstaticrule.cpp b/cadxcore/widgets/wstaticrule.cpp
new file mode 100644
index 0000000..f9fa8c1
--- /dev/null
+++ b/cadxcore/widgets/wstaticrule.cpp
@@ -0,0 +1,248 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <sstream>
+#include <cmath>
+#include <cstring>
+#include <cairo/cairo.h>
+
+//#define _GINKGO_TRACE
+#include <api/globals.h>
+#include <api/helpers/helpertexto.h>
+#include <api/iwidgetsmanager.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/ievento.h>
+#include <api/icontexto.h>
+#include <api/math/geometry3d.h>
+#include <api/westilo.h>
+
+#include <eventos/modificacionimagen.h>
+
+#include <main/entorno.h>
+#include <main/controllers/controladoreventos.h>
+#include <main/controllers/configurationcontroller.h>
+
+#include "wstaticrule.h"
+
+#include <vtkgl.h>
+#include <vtkImageData.h>
+#include <vtkImageActor.h>
+#include <vtkPointData.h>
+#include <vtk/vtkginkgoimageviewer.h>
+
+
+//region "Constructor y destructor"
+
+#define ANNOTATOR_STATIC_RULE_COLOR 0.0f, 1.0f, 0.0f, 0.5f
+#define RULE_MARGIN 5
+#define SIZE_BIG_MARKS 5
+#define SIZE_SMALL_MARKS 2
+
+GNC::GCS::Widgets::WStaticRule::WStaticRule(IWidgetsManager* pManager, long vid, const char* nombre, long gid) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre, gid)
+{
+        GNC::GCS::ConfigurationController::Instance()->readBoolUser("/GinkgoCore/Tools/CornerAnotations", "IsShown", m_Oculto, true);
+        m_TopLevel = true;
+        m_ReservaRecursos = false;
+        m_color = GNC::GCS::GLHelper::TColor(ANNOTATOR_STATIC_RULE_COLOR);
+
+        GNC::GCS::Events::EventoModificacionImagen evt2(m_pManager->GetVista());
+        GNC::GCS::IEventsController::Instance()->Registrar(this, evt2);
+}
+
+GNC::GCS::Widgets::WStaticRule::~WStaticRule()
+{}
+
+//endregion
+
+
+//region "Interfaz generica"
+
+void GNC::GCS::Widgets::WStaticRule::OnMouseEvents(GNC::GCS::Events::EventoRaton& /*evento*/)
+{
+
+}
+
+void GNC::GCS::Widgets::WStaticRule::OnKeyEvents(GNC::GCS::Events::EventoTeclado& /*evento*/)
+{
+}
+
+bool GNC::GCS::Widgets::WStaticRule::HitTest(float , float , const GNC::GCS::Vector&)
+{
+        return false;
+}
+
+bool GNC::GCS::Widgets::WStaticRule::HitTest(GNC::GCS::Vector* , int )
+{
+        return false;
+}
+void GNC::GCS::Widgets::WStaticRule::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto && c->GetRenderer() != NULL && c->GetRenderer()->m_pImageViewer != NULL) {
+                return;
+        }
+
+        vtkGinkgoImageViewer* pImageViewer = c->GetRenderer()->m_pImageViewer;
+
+        double viewport[4] = {0.0f, 0.0f, 0.0f, 0.0f}; // { x, y, ancho, alto }. Convenio de coordenadas: {x, y} == {bottom, left}, {ancho, alto} == {top, right}
+        glGetDoublev(GL_VIEWPORT, viewport);
+
+        glPushAttrib(GL_ALL_ATTRIB_BITS);
+
+        glMatrixMode(GL_TEXTURE);
+        glPushMatrix();
+        glLoadIdentity();
+
+        glMatrixMode(GL_PROJECTION);
+        glPushMatrix();
+        glLoadIdentity();
+        glOrtho( 0, viewport[2] , viewport[3] , 0, -1, 1 );
+
+        glMatrixMode(GL_MODELVIEW);
+        glPushMatrix();
+        glLoadIdentity();
+
+
+        {
+                GNC::GCS::Vector3D screenToImage(c->RelacionImagenPantalla().x,c->RelacionImagenPantalla().y,0);
+                double spacing[3];
+                pImageViewer->GetSpacing(spacing);
+                GNC::GCS::Vector3D spacingVector(spacing[0], spacing[1], spacing[2]);
+                GNC::GCS::Vector3D screenToWorld = spacingVector * screenToImage;
+
+                GNC::GCS::Vector ruleMeasure(100.0, 100.0);
+                GNC::GCS::Vector ruleFragments(10.0, 10.0);
+
+                // Dibujado de la regla
+                glLineWidth(m_LineWidthProp);
+
+                const double ruleMeasureScreen[2] = {ruleMeasure.x / screenToWorld.x, ruleMeasure.y / screenToWorld.y};
+                const double xLimitsRule[2] = {(viewport[2]/2)-(0.5*ruleMeasureScreen[0]), (viewport[2]/2)+(0.5*ruleMeasureScreen[0])};
+                const double yLimitsRule[2] = {(viewport[3]/2)-(0.5*ruleMeasureScreen[1]), (viewport[3]/2)+(0.5*ruleMeasureScreen[1])};
+
+                glColor4f(m_color.RF(), m_color.GF(), m_color.BF(), m_color.AF());
+                glBegin(GL_LINES);
+                glVertex2d(xLimitsRule[0], viewport[3] - RULE_MARGIN);
+                glVertex2d(xLimitsRule[1], viewport[3] - RULE_MARGIN);
+                glEnd();
+
+                //marks
+                for (int i = 0; i <= ruleFragments.x; ++i) {
+                        glBegin(GL_LINES);
+                        glVertex2d(xLimitsRule[0] + (i*ruleMeasureScreen[0]/ruleFragments.x), viewport[3] - RULE_MARGIN);
+                        if (i%5==0) {
+                                glVertex2d(xLimitsRule[0] + (i*ruleMeasureScreen[0]/ruleFragments.x), viewport[3] - RULE_MARGIN - SIZE_BIG_MARKS);
+                        } else {
+                                glVertex2d(xLimitsRule[0] + (i*ruleMeasureScreen[0]/ruleFragments.x), viewport[3] - RULE_MARGIN - SIZE_SMALL_MARKS);
+                        }
+                        glEnd();
+                }
+
+                //yRule
+                glBegin(GL_LINES);
+                glVertex2d(RULE_MARGIN,yLimitsRule[0]);
+                glVertex2d(RULE_MARGIN,yLimitsRule[1]);
+                glEnd();
+
+                //marks
+                for (int i = 0; i <=  ruleFragments.y; ++i) {
+                        glBegin(GL_LINES);
+                        glVertex2d(RULE_MARGIN, yLimitsRule[0] + (i*ruleMeasureScreen[1]/ruleFragments.y));
+                        if (i%5==0) {
+                                glVertex2d(RULE_MARGIN + SIZE_BIG_MARKS, yLimitsRule[0] + (i*ruleMeasureScreen[1]/ruleFragments.y) );
+                        } else {
+                                glVertex2d(RULE_MARGIN + SIZE_SMALL_MARKS, yLimitsRule[0] + (i*ruleMeasureScreen[1]/ruleFragments.y) );
+                        }
+                        glEnd();
+                }
+        }
+
+        glPopMatrix();
+
+        glMatrixMode(GL_PROJECTION);
+        glPopMatrix();
+
+        glMatrixMode(GL_TEXTURE);
+        glPopMatrix();
+
+        glMatrixMode(GL_MODELVIEW);
+
+        glPopAttrib();
+}
+
+void GNC::GCS::Widgets::WStaticRule::Modificar (bool /*modificada*/)
+{
+
+}
+
+void GNC::GCS::Widgets::WStaticRule::Seleccionar(bool )
+{
+}
+
+void GNC::GCS::Widgets::WStaticRule::Iluminar(bool )
+{
+}
+
+void GNC::GCS::Widgets::WStaticRule::Ocultar(bool oculto)
+{
+        if(oculto != m_Oculto) {
+                m_Oculto = oculto;
+        }
+}
+
+//endregion
+
+
+//region "Interfaz especifica"
+
+//endregion
+
+
+//region "Estado interno"
+
+//region Interfaz de eventos ginkgo
+
+void GNC::GCS::Widgets::WStaticRule::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        if (evt == NULL) {
+                std::cerr << "Error: Evento nulo" << std::endl;
+                return;
+        }
+        switch (evt->GetCodigoEvento()) {
+
+        case ginkgoEVT_Core_ModificacionImagen: {
+                /*		GNC::GCS::Events::EventoModificacionImagen* pEvt = dynamic_cast<GNC::GCS::Events::EventoModificacionImagen*>(evt);
+                		if (pEvt != NULL && pEvt->GetTipo() == GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas) {
+                			Modificar(true);
+                			m_Estado->InvalidarTodas();
+                		}*/
+        }
+        break;
+
+        }
+}
+
+//endregion
+
+void GNC::GCS::Widgets::WStaticRule::OffscreenRender(GNC::GCS::Contexto3D* /*c*/)
+{
+
+}
+
diff --git a/cadxcore/widgets/wstaticrule.h b/cadxcore/widgets/wstaticrule.h
new file mode 100644
index 0000000..7923d4a
--- /dev/null
+++ b/cadxcore/widgets/wstaticrule.h
@@ -0,0 +1,103 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/api.h>
+#include <api/observers/ieventsobserver.h>
+#include <vector>
+#include <list>
+#include "openglhelper.h"
+
+
+namespace GNC
+{
+namespace GCS
+{
+
+namespace Widgets
+{
+
+class EstadoInterno;
+class Anotaciones;
+
+//----------------------------------------------------------------------------------------------------
+//region Widget anotador
+class EXTAPI WStaticRule : public GNC::GCS::Widgets::IWidget, public GNC::GCS::IEventsObserver
+{
+public:
+
+        WStaticRule(IWidgetsManager* pManager, long vid, const char* nombre, long gid);
+
+        ~WStaticRule();
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz generica"
+public:
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void OffscreenRender(Contexto3D* c);
+
+        virtual void Modificar(bool modificar);
+
+        virtual void Seleccionar(bool seleccionado);
+
+        virtual void Iluminar(bool iluminado);
+
+        virtual void Ocultar(bool oculto);
+
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz especifica"
+public:
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz de eventos ginkgo"
+public:
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt);
+
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Estado interno"
+protected:
+        GNC::GCS::GLHelper::TColor m_color;
+
+        //endregion
+
+};
+//endregion
+}
+}
+}
diff --git a/cadxcore/widgets/wtextbox.cpp b/cadxcore/widgets/wtextbox.cpp
new file mode 100644
index 0000000..48fa967
--- /dev/null
+++ b/cadxcore/widgets/wtextbox.cpp
@@ -0,0 +1,573 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#if defined(__DEPRECATED)
+#undef __DEPRECATED
+#endif
+#include <list>
+#include <vtkgl.h>
+#include <cmath>
+#include <cairo/cairo.h>
+
+#include <wx/xml/xml.h>
+#include <wx/menu.h>
+
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/math/geometry.h>
+#include <api/math/geometry3d.h>
+
+#include "wnota.h"
+#include <api/ievento.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/icontexto.h>
+#include <api/iwidgetsmanager.h>
+
+#include <main/managers/widgetsmanager.h>
+
+#include <widgets/gui/selecciontexto.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/westilo.h>
+
+#include "openglhelper.h"
+
+#include <vtkRenderer.h>
+#include <vtkCamera.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+struct TextBoxTexture {
+        std::string texto;
+        TexturaCairo* m_textura;
+        bool	correcta;	//indica si esta correctamente cargada
+        TextBoxTexture()
+        {
+                m_textura = new GNC::GCS::TexturaCairo();
+                m_textura->ActivarInterpolacion();
+                texto = "";
+                correcta = false;
+        }
+        ~TextBoxTexture()
+        {
+                m_textura->Descargar();
+                delete m_textura;
+        }
+};
+
+}
+}
+}
+
+//====================================================================================================
+
+GNC::GCS::Widgets::WTextBox::WTextBox(IWidgetsManager* pManager, long vid, GNC::GCS::Vector posicion, TNoteMode mode, const char* nombre, std::string texto) :
+        IWidget(pManager, vid, nombre,0,TID_USER_ANNOTATION_WIDGET),
+        GNC::GCS::Widgets::IWidgetSerializable(),
+        m_Enabled(true),
+        m_mode(mode)
+{
+        m_Texto = texto;
+        m_Vacio = false;
+        m_MouseDown = false;
+        m_ReservaRecursos = true;
+        m_Posicion = posicion;
+        m_pWidgetSeleccion = NULL;
+}
+
+GNC::GCS::Widgets::WTextBox::~WTextBox()
+{
+        LanzarEventoDestruccion();
+        if (m_pWidgetSeleccion != NULL) {
+                m_pWidgetSeleccion->Destroy();
+                m_pWidgetSeleccion = NULL;
+        }
+}
+
+//----------------------------------------------------------------------------------------------------
+//region "Serializado y desserializado"
+GNC::GCS::Widgets::WTextBox::WTextBox(IWidgetsManager* pManager, long vid, wxXmlNode* nodo):
+        GNC::GCS::Widgets::IWidget(pManager, vid, "Nota de Texto"),
+        GNC::GCS::Widgets::IWidgetSerializable(nodo),
+        m_Enabled(true),
+        m_mode(TNM_Static)
+{
+
+        wxString strTmp = nodo->GetAttribute(wxT("x"),wxT("0.0"));
+        double doubleTmp;
+        strTmp.ToDouble(&doubleTmp);
+        m_Posicion.x = (float) doubleTmp;
+
+        strTmp = nodo->GetAttribute(wxT("y"),wxT("0.0"));
+        strTmp.ToDouble(&doubleTmp);
+        m_Posicion.y = (float) doubleTmp;
+
+        m_Texto = std::string(nodo->GetAttribute(wxT("text"), wxT("")).ToUTF8());
+
+        m_Vacio = false;
+        m_MouseDown = false;
+        m_ReservaRecursos = true;
+        m_pWidgetSeleccion = NULL;
+}
+
+wxXmlNode* GNC::GCS::Widgets::WTextBox::Serializar(const std::string& nombreMedico)
+{
+        wxXmlNode* resultado = new wxXmlNode(NULL, wxXML_ELEMENT_NODE, wxT("text_widget"));
+        //almacenamos los dos nodos
+        resultado->AddAttribute(new wxXmlProperty(wxT("x"), wxString::Format(wxT("%f"),m_Posicion.x)));
+        resultado->AddAttribute(new wxXmlProperty(wxT("y"), wxString::Format(wxT("%f"),m_Posicion.y)));
+        resultado->AddAttribute(new wxXmlProperty(wxT("text"), wxString::FromUTF8(m_Texto.c_str())));
+        //metadatos
+        SerializarMetadatos(resultado, nombreMedico);
+        return resultado;
+}
+//endregion
+
+void GNC::GCS::Widgets::WTextBox::DoEditText(wxWindow* pWindow)
+{
+        if (m_pWidgetSeleccion != NULL) {
+                m_pWidgetSeleccion->Destroy();
+                m_pWidgetSeleccion = NULL;
+        }
+        if (m_mode == TNM_Static) {
+                m_pWidgetSeleccion = new GNC::GCS::Widgets::Dialogos::SeleccionTexto(pWindow, this, m_pManager);
+                m_pWidgetSeleccion->Center();
+                m_pWidgetSeleccion->ShowModal();
+        }
+}
+
+GNC::GCS::Widgets::TextBoxTexture* GNC::GCS::Widgets::WTextBox::GetTextura(void* renderer)
+{
+        if(m_mapaRecursos.find(renderer) == m_mapaRecursos.end()) {
+                TextBoxTexture* pTextura = new TextBoxTexture();
+                m_mapaRecursos[renderer] = pTextura;
+                Recalcular(renderer);
+        }
+        return m_mapaRecursos[renderer];
+}
+
+void GNC::GCS::Widgets::WTextBox::Invalidar()
+{
+        for (TMapaRecursos::iterator it = m_mapaRecursos.begin(); it != m_mapaRecursos.end(); ++it) {
+                TextBoxTexture* tn = (*it).second;
+                tn->correcta = false;
+        }
+}
+
+//----------------------------------------------------------------------------------------------------
+
+const std::string& GNC::GCS::Widgets::WTextBox::GetTexto() const
+{
+        return m_Texto;
+}
+
+void GNC::GCS::Widgets::WTextBox::SetTexto(const std::string& texto)
+{
+        if (m_Texto != texto) {
+                m_Texto = texto;
+                ActualizarTimestampModificacion();
+                Modificar(true);
+        }
+}
+
+void GNC::GCS::Widgets::WTextBox::SetPosition(const TVector& pos)
+{
+        if (m_Posicion != pos) {
+                m_Posicion = pos;
+                ActualizarTimestampModificacion();
+                Modificar(true);
+        }
+}
+
+void GNC::GCS::Widgets::WTextBox::PropagarModificacion()
+{
+        m_pManager->LanzarEventoModificacion(this);
+}
+
+
+void GNC::GCS::Widgets::WTextBox::Enable(bool enabled)
+{
+        m_Enabled = enabled;
+}
+
+bool GNC::GCS::Widgets::WTextBox::Enabled()
+{
+        return m_Enabled;
+}
+
+bool GNC::GCS::Widgets::WTextBox::SoportaAutoBorrado() const
+{
+        return m_mode == TNM_Static;
+}
+
+void GNC::GCS::Widgets::WTextBox::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if(EstaOculto() || !Enabled()) {
+                return;
+        }
+        //------------------------------------------------------
+        // Leaving
+        else if (evento.Leaving() ) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        if (evento.Dragging() && m_MouseDown) {
+                if (EstaSeleccionado()) {
+                        Vector delta = evento.iP - m_PosCursor;
+                        m_PosCursor = evento.iP;
+                        m_Posicion += delta;
+                        LanzarEventoModificacion();
+                        Modificar(true);
+                        ConsumirEvento();
+                }
+                return;
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        Seleccionar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_PosCursor= evento.iP;
+
+                if (m_PosCursor.DentroDePoligono2(m_Quad, 4)) {
+                        if (evento.m_controlDown) { // Inversion de seleccion
+                                InvertirSeleccion();
+                        } else {
+                                Seleccionar(true);
+                        }
+                        dentro = true;
+                } else { // Click fuera del texto
+                        if (!evento.m_controlDown) {
+                                Seleccionar(false);
+                        } else {
+                                ConsumirEvento();
+                                if (EstaSeleccionado()) {
+                                        m_MouseDown = true;
+                                        m_PosCursor= evento.iP;
+                                }
+                        }
+                }
+
+                if (dentro) {
+                        m_MouseDown = true;
+                        m_PosCursor= evento.iP;
+                        ConsumirEvento();
+                }
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        ActualizarTimestampModificacion();
+                        m_MouseDown = false;
+                        ConsumirEvento();
+                }
+                return;
+        } else if (evento.ButtonDClick(GNC::GCS::Events::EventoRaton::EB_IZQUIERDO)) {
+                if (!EventoConsumido() && m_mode == TNM_Static) {
+                        if (evento.iP.DentroDePoligono2(m_Quad,4)) {
+                                DoEditText(evento.c->pWindow);
+                                ConsumirEvento();
+                        }
+                }
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+                if (EventoConsumido()) {
+                        Iluminar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+                m_PosCursor= evento.iP;
+
+                if (m_PosCursor.DentroDePoligono2(m_Quad,4)) {
+                        Iluminar(true);
+                        dentro = true;
+                } else {
+                        Iluminar(false);
+                }
+
+                if (dentro) {
+                        ConsumirEvento();
+                }
+        }
+}
+
+void GNC::GCS::Widgets::WTextBox::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+bool GNC::GCS::Widgets::WTextBox::HitTest(float x, float y, const GNC::GCS::Vector& )
+{
+        return GNC::GCS::Vector(x,y).DentroDePoligono2(m_Quad, 4);
+}
+
+bool GNC::GCS::Widgets::WTextBox::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+        return m_Quad[0].DentroDePoligono2(vertices, numVertices) && m_Quad[1].DentroDePoligono2(vertices, numVertices) && m_Quad[2].DentroDePoligono2(vertices, numVertices) && m_Quad[3].DentroDePoligono2(vertices, numVertices);
+}
+
+void GNC::GCS::Widgets::WTextBox::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        TextBoxTexture* tn = GetTextura(c->GetRenderer());
+        if(tn->texto != m_Texto || !tn->correcta) {
+                Recalcular(c->GetRenderer());
+        }
+        GNC::GCS::TexturaCairo* tc = tn->m_textura;
+
+        if (!tc->contextoCreado) {
+                //std::cerr << "Error: Contexto no creado" << std::endl;
+                return;
+        }
+        if (!tc->texturaCargada) {
+                tc->Cargar();
+        }
+        if (tc->texturaModificada) {
+                tc->Actualizar();
+        }
+
+        TVector texP0;
+
+        // Compute display pos
+        GNC::GCS::Vector3D planePos(m_Posicion.x, m_Posicion.y, (double)c->pRenderer->m_pImageViewer->GetTindex());
+        GNC::GCS::Vector3D worldPos;
+        GNC::GCS::Vector3D displayPos;
+
+        c->pRenderer->m_pImageViewer->UnProyect2D(planePos.v, worldPos.v);
+        c->pRenderer->WorldToDisplay(worldPos.v, displayPos.v);
+
+        GNC::GCS::Vector pos = (GNC::GCS::Vector(displayPos.x, displayPos.y)).Redondear();
+
+
+        TWidgetColor backColor(0.0f, 0.0f, 1.0f, 0.8f);
+        backColor.Aplicar();
+        wDibujarFondoTexto2D(c, *tc, pos);
+
+        wDibujarTexturaTexto2D(c, *tc, pos);
+
+        if (m_Seleccionado || m_Iluminado) {
+                wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+                wDibujarBordeTexto2D(c, *tc, pos);
+        }
+
+        const GNC::GCS::Vector& escala = c->RefRelacionImagenPantalla();
+
+        // Center
+
+        m_Quad[0] =  m_Posicion;
+
+        m_Quad[2].x = m_Quad[0].x + (double)tc->ancho * escala.x;
+        m_Quad[2].y = m_Quad[0].y + (double)tc->alto * escala.y;
+
+        m_Quad[1].x = m_Quad[2].x;
+        m_Quad[1].y = m_Quad[0].y;
+
+        m_Quad[3].x = m_Quad[0].x;
+        m_Quad[3].y = m_Quad[2].y;
+
+        // Apply camera transformation
+
+        for (int i = 0; i < 4; i++) {
+                m_Quad[i].RotarSobreZ( m_Posicion, c->rotacion);
+        }
+
+#if 0 // DEBUG
+        wAplicarColor(true, false, false);
+        glBegin(GL_LINE_LOOP);
+        glVertex2d(m_Quad[0].x, m_Quad[0].y);
+        glVertex2d(m_Quad[1].x, m_Quad[1].y);
+        glVertex2d(m_Quad[2].x, m_Quad[2].y);
+        glVertex2d(m_Quad[3].x, m_Quad[3].y);
+        glEnd();
+#endif
+
+}
+
+bool GNC::GCS::Widgets::WTextBox::GetMenuContextual(wxMenu *menuContextual, wxWindow* pParent)
+{
+        if (m_mode == TNM_Static) {
+                m_pWidgetSeleccion = new GNC::GCS::Widgets::Dialogos::SeleccionTexto(pParent, this, m_pManager);
+
+                wxMenuItem* pMenuEditar = new wxMenuItem(menuContextual, 1, wxT("Editar texto"), wxT("Editar contenido de la nota"), wxITEM_NORMAL );
+                menuContextual->Connect(1,wxEVT_COMMAND_MENU_SELECTED,wxCommandEventHandler( GNC::GCS::Widgets::Dialogos::SeleccionTexto::OnClickEnMenu), NULL, m_pWidgetSeleccion);
+
+#ifdef __WXMSW__
+                pMenuEditar->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoEditar());
+#else
+                pMenuEditar->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoEditar());
+#endif
+
+                menuContextual->Append(pMenuEditar);
+                return true;
+        } else {
+                return false;
+        }
+}
+
+
+void GNC::GCS::Widgets::WTextBox::Recalcular(void* renderer)
+{
+        TextBoxTexture* tn = GetTextura(renderer);
+        GNC::GCS::TexturaCairo* tc = tn->m_textura;
+        tn->correcta = true;
+
+        if (!tc->contextoCreado) {
+                tc->Redimensionar(32, 32);
+        }
+
+        std::string texto = m_Texto;
+        if (texto.empty()) {
+                texto = _Std("Default text");
+        }
+
+        m_Texto = texto;
+
+        tn->texto = texto;
+
+        if (!tc->contextoCreado) {
+                tc->Redimensionar(2, 2);
+        }
+
+        cairo_font_options_t* options;
+
+        cairo_select_font_face (tc->cr, WIDGETS_TEXT_FONT_FAMILY, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
+        cairo_set_font_size(tc->cr, m_FontSizeProp);
+        options = cairo_font_options_create ();
+        cairo_get_font_options(tc->cr, options);
+        cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_NONE);
+        cairo_set_font_options(tc->cr, options);
+        cairo_font_options_destroy(options);
+        options = NULL;
+
+        m_TamTexto = GNC::GCS::GLHelper::calcularBoundingBox((*tc), m_Texto, false, m_MaxTextWidthProp); // Tamaño de la region en pixels
+
+        tc->Redimensionar(std::ceil(m_TamTexto.x), std::ceil(m_TamTexto.y));
+        m_TamTexto.Asignar(tc->ancho, tc->alto);
+
+        cairo_select_font_face (tc->cr, WIDGETS_TEXT_FONT_FAMILY, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
+        cairo_set_font_size(tc->cr, m_FontSizeProp);
+        options = cairo_font_options_create ();
+        cairo_get_font_options(tc->cr, options);
+        cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_NONE);
+        cairo_set_font_options(tc->cr, options);
+        cairo_font_options_destroy(options);
+        options = NULL;
+
+        cairo_set_operator(tc->cr, CAIRO_OPERATOR_SOURCE);
+        cairo_set_source_rgba(tc->cr, 0.0f, 0.0f, 0.0f, 0.0f);
+        cairo_paint(tc->cr);
+
+        GNC::GCS::GLHelper::dibujarTexto((*tc), m_Texto, false, m_MaxTextWidthProp);
+}
+
+void GNC::GCS::Widgets::WTextBox::LiberarRecursos(GNC::GCS::IWidgetsRenderer* renderer)
+{
+        TMapaRecursos::iterator it = m_mapaRecursos.find(renderer);
+        if(it!=m_mapaRecursos.end()) {
+                delete (*it).second;
+                m_mapaRecursos.erase(it);
+        }
+}
+
+void GNC::GCS::Widgets::WTextBox::Seleccionar(bool seleccionado)
+{
+        if (m_Seleccionado != seleccionado) {
+                m_Seleccionado = seleccionado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WTextBox::Iluminar(bool iluminado)
+{
+        if (m_Iluminado != iluminado) {
+                m_Iluminado = iluminado;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WTextBox::Ocultar(bool oculto)
+{
+        if (m_Oculto != oculto) {
+                m_Oculto = oculto;
+                m_Modificado = true;
+        }
+}
+
+void GNC::GCS::Widgets::WTextBox::InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades)
+{
+        TMapaPropiedades& primerMapa = listaMapaPropiedades.front();
+        {
+                primerMapa[_Std("Text")] = m_Texto;
+        }
+}
+
+void GNC::GCS::Widgets::WTextBox::OffscreenRender(GNC::GCS::Contexto3D* c)
+{
+        const GNC::GCS::Vector& escala = c->RefRelacionMundoPantallaOffscreen();
+        TVector Pos = c->Reproyectar(m_Posicion) * c->factorReescalado;
+        cairo_font_options_t* options;
+        options = cairo_font_options_create ();
+
+        cairo_select_font_face (c->cr, WIDGETS_TEXT_FONT_FAMILY, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
+        cairo_set_font_size(c->cr, std::max(m_FontSizeProp * escala.x, (double)8.0f));
+        cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_NONE);
+        cairo_set_font_options(c->cr, options);
+
+
+        GNC::GCS::Vector puntoTexto(Pos.x, Pos.y);
+        puntoTexto.Redondear();
+        cairo_set_source_rgba (c->cr, 1.0f, 1.0f, 1.0f, 1.0f);
+        cairo_save(c->cr);
+        cairo_translate(c->cr, puntoTexto.x, puntoTexto.y);
+        GNC::GCS::Widgets::HelperTexto::dibujarTexto(c, m_Texto, false, m_MaxTextWidthProp * escala.x);
+        cairo_restore(c->cr);
+
+        cairo_font_options_destroy(options);
+}
diff --git a/cadxcore/widgets/wtextbox.h b/cadxcore/widgets/wtextbox.h
new file mode 100644
index 0000000..bd751e3
--- /dev/null
+++ b/cadxcore/widgets/wtextbox.h
@@ -0,0 +1,168 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <cmath>
+#include <api/iwidgets.h>
+#include <api/widgetserializable.h>
+#include <widgets/openglhelper.h>
+
+//----------------------------------------------------------------------------------------------------
+//region Forward Declarations
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+namespace Dialogos
+{
+class SeleccionTexto;
+}
+
+class WTextBox;
+struct TextBoxTexture;
+}
+}
+}
+//endregion
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+
+namespace Dialogos
+{
+class SeleccionTexto;
+}
+
+class WTextBox;
+
+//====================================================================================================
+//= Multipurpose text box wiget
+//====================================================================================================
+class WTextBox : public GNC::GCS::Widgets::IWidget, public GNC::GCS::Widgets::IWidgetSerializable
+{
+
+public:
+        typedef enum TNoteMode {
+                TNM_Static, //static text edited by user
+                TNM_Dynamic //text can not be edited by user
+        } TNoteMode;
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Matriz TMatriz;
+
+        WTextBox(IWidgetsManager* pManager, long vid, TVector posicion, TNoteMode mode, const char* nombre = "", std::string texto = "");
+
+        ~WTextBox();
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Serializado y desserializado"
+public:
+        WTextBox(IWidgetsManager* pManager, long vid, wxXmlNode* nodo);
+
+        wxXmlNode* Serializar(const std::string& nombreMedico);
+        void DoEditText(wxWindow* pWindow);
+        //endregion
+
+        TVector          m_Posicion;
+        TVector          m_PosAntigua;
+
+        TVector          m_Quad[4]; // Quad position in plane coordiantes
+
+        GNC::GCS::Vector m_TamTexto;
+
+        std::string      m_Texto;
+        bool             m_Vacio;
+        bool			 m_Enabled;
+        TNoteMode		 m_mode;
+
+
+        typedef std::map<void*,TextBoxTexture*> TMapaRecursos;
+        TMapaRecursos m_mapaRecursos;
+        TextBoxTexture* GetTextura(void* renderer);
+        void Invalidar();
+
+        GNC::GCS::Widgets::Dialogos::SeleccionTexto* m_pWidgetSeleccion;
+
+protected:
+        bool m_MouseDown;
+
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Colores"
+public:
+
+        virtual const std::string& GetTexto() const;
+        virtual void SetTexto(const std::string& texto);
+        virtual void SetPosition(const TVector& pos);
+        virtual void PropagarModificacion();
+        virtual void Enable(bool enabled);
+        virtual bool Enabled();
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Interfaz especifica"
+public:
+
+        virtual bool SoportaAutoBorrado() const;
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void OffscreenRender(Contexto3D* c);
+
+        virtual void Seleccionar(bool seleccionado);
+
+        virtual void Iluminar(bool iluminado);
+
+        virtual void Ocultar(bool oculto);
+
+        virtual void LiberarRecursos(GNC::GCS::IWidgetsRenderer* pKey);
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Helpers"
+public:
+        virtual void Recalcular(void* renderer);
+        //endregion
+
+        //----------------------------------------------------------------------------------------------------
+        //region "Menu contextual"
+public:
+        virtual bool GetMenuContextual(wxMenu* , wxWindow* pParent) ;
+        //endregion
+
+        virtual void InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades);
+
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wtrackball.cpp b/cadxcore/widgets/wtrackball.cpp
new file mode 100644
index 0000000..4252d11
--- /dev/null
+++ b/cadxcore/widgets/wtrackball.cpp
@@ -0,0 +1,174 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include "wtrackball.h"
+#include <main/managers/widgetsmanager.h>
+#include <api/iwidgetsrenderer.h>
+#include <vtkgl.h>
+#include <vtkSmartPointer.h>
+
+#include <cmath>
+
+#include <vtk/vtkginkgoimageviewer.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
+
+//region "Implementacion de WPanBuilder"
+#include <api/icontexto.h>
+
+
+GNC::GCS::Widgets::WTrackballBuilder::WTrackballBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        m_Dentro = true;
+}
+
+GNC::GCS::Widgets::WTrackballBuilder::~WTrackballBuilder()
+{
+}
+
+void GNC::GCS::Widgets::WTrackballBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+
+        if (!m_pManager) {
+                return;
+        }
+        if ((m_MouseDown && evento.ButtonUp(m_ButtonMask)) || evento.Leaving()) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+                vtkSmartPointer<vtkRenderWindowInteractor> rwi = evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor();
+                vtkSmartPointer<GinkgoInteractorStyleImage2D> is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+
+                if (is != NULL) {
+                        if (is->GetState() == VTKIS_ROTATE) {
+                                is->EndRotate();
+                        } else {
+                                is->EndSpin();
+                        }
+                }
+
+                m_Estado = WBS_Ninguno;
+                //m_pManager->Modificado();
+                //no se consume el evento para poder mostrar las propiedades de un widget
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+                m_MouseDown = true;
+
+                vtkSmartPointer<vtkRenderWindowInteractor> rwi = evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor();
+                vtkSmartPointer<GinkgoInteractorStyleImage2D> is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+
+                if (is != NULL) {
+                        if (evento.ControlDown()) {
+                                is->StartSpin();
+                        } else {
+                                is->StartRotate();
+                        }
+                }
+
+                m_Estado = WBS_Creando;
+                evento.Skip(false);
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+                vtkSmartPointer<vtkRenderWindowInteractor> rwi = evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor();
+                vtkSmartPointer<GinkgoInteractorStyleImage2D> is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+
+                if (is != NULL) {
+                        if (is->GetState() == VTKIS_ROTATE) {
+                                is->Rotate();
+                        } else {
+                                is->Spin();
+                        }
+                        is->PropagateCameraFocalAndPosition();
+                }
+
+                //m_pManager->Modificado();
+                evento.Skip(false);
+        } else if( evento.Moving() ) {
+                GTRACE("Moviendose");
+                m_NodoMoviendose = evento.iP;
+                m_Estado = WBS_Ninguno;
+        }
+
+}
+
+void GNC::GCS::Widgets::WTrackballBuilder::OnKeyEvents(TEventoTeclado&)
+{
+
+}
+
+void GNC::GCS::Widgets::WTrackballBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+
+        /*
+        TVector box = TVector(100, 10) * c->RefRelacionImagenPantalla();
+
+        box = TVector(100, 10) * c->RefRelacionImagenPantalla();
+        TVector pos = TVector(std::max(m_Start.x - box.x, std::min(m_Start.x + box.x, m_Stop.x)), m_Start.y);
+
+        if (m_Estado == WBS_Creando) {
+        	glLineWidth(2.0f);
+        	glColor4f(0.0f, 0.75f, 0.0f, 1.0f);
+
+        	glBegin(GL_LINES);
+
+        		glVertex2d(m_Start.x - box.x, m_Start.y);
+        		glVertex2d(m_Start.x + box.x, m_Start.y);
+
+        		glVertex2d(m_Start.x - box.x, m_Start.y - box.y);
+        		glVertex2d(m_Start.x - box.x, m_Start.y + box.y);
+
+        		glVertex2d(m_Start.x + box.x, m_Start.y - box.y);
+        		glVertex2d(m_Start.x + box.x, m_Start.y + box.y);
+
+        	glEnd();
+
+        	glColor4f(0.75f, 0.0f, 0.0f, 1.0f);
+
+        	glLineWidth(1.5);
+        	glBegin(GL_LINES);
+        		glVertex2d(pos.x, pos.y - box.y);
+        		glVertex2d(pos.x, pos.y + box.y);
+        	glEnd();
+        }
+        else {
+
+        }
+        */
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WTrackballBuilder::GetCursor()
+{
+        if (m_Estado == WBS_Creando) {
+                return GNC::GCS::Widgets::CUR_MANO_CERRADA;
+        } else {
+                return GNC::GCS::Widgets::CUR_MANO_ABIERTA;
+        }
+}
+
+//endregion
diff --git a/cadxcore/widgets/wtrackball.h b/cadxcore/widgets/wtrackball.h
new file mode 100644
index 0000000..0e701c5
--- /dev/null
+++ b/cadxcore/widgets/wtrackball.h
@@ -0,0 +1,72 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <vector>
+
+#include <export/tools/itrackballtool.h>
+#include <api/iwidgets.h>
+#include <api/math/geometry3d.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+//---------------------------------------------------------------------
+
+class WTrackballBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector                    TVector;
+        typedef GNC::GCS::Vector3D                  TVector3D;
+        typedef GNC::GCS::Events::EventoRaton      TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado    TEventoTeclado;
+        typedef GNC::GCS::IWidgetsManager           TWidgetsManager;
+        typedef GNC::GCS::Widgets::IWidget          TWidget;
+
+        WTrackballBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WTrackballBuilder();
+
+        virtual void OnMouseEvents(TEventoRaton& event);
+        virtual void OnKeyEvents(TEventoTeclado& event);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+        //region "Helpers"
+
+        bool         m_Dentro;
+        //endregion
+
+
+protected:
+        TVector   m_NodoMoviendose;  // Cursor
+
+        bool      m_MouseDown;
+        Estado    m_Estado;
+};
+}
+}
+}
diff --git a/cadxcore/widgets/wtrapezoide.cpp b/cadxcore/widgets/wtrapezoide.cpp
new file mode 100644
index 0000000..09591fa
--- /dev/null
+++ b/cadxcore/widgets/wtrapezoide.cpp
@@ -0,0 +1,174 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/xml/xml.h>
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include "wtrapezoide.h"
+#include "wpolygon.h"
+#include <api/ievento.h>
+#include <api/icontexto.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/iwidgetsmanager.h>
+#include <vtkgl.h>
+#include <api/westilo.h>
+#include <cmath>
+
+
+//region "Implementacion de WTrapezoideBuilder , se construye exactamente igual a un rectangulo"
+
+GNC::GCS::Widgets::WTrapezoideBuilder::WTrapezoideBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid,  int numMaxTrapezoides) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        m_Dentro = true;
+        m_NumMaxTrapezoides = numMaxTrapezoides;
+}
+
+GNC::GCS::Widgets::WTrapezoideBuilder::~WTrapezoideBuilder()
+{
+}
+
+void GNC::GCS::Widgets::WTrapezoideBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+                m_Estado = WBS_Ninguno;
+
+                m_Stop= evento.iP;
+
+                GNC::GCS::Vector a = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[0]);
+                GNC::GCS::Vector b = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[1]);
+                m_Vertices[0] = m_Start;
+                m_Vertices[1] = a;
+                m_Vertices[2] = m_Stop;
+                m_Vertices[3] = b;
+
+                m_pManager->Modificado();
+                TVector diff = m_Stop - m_Start;
+                if (std::abs(diff.x) > evento.c->RelacionImagenPantalla().NormaInfinito() && std::abs(diff.y) > evento.c->RelacionImagenPantalla().NormaInfinito()) {
+                        GNC::GCS::Widgets::TPolygonVertexList vertexList;
+                        for (int i = 0; i < 4; ++i) {
+                                GNC::GCS::Nodo n;
+                                n = m_Vertices[i];
+                                vertexList.push_back(n);
+                        }
+                        WPolygon* w = new WPolygon(m_pManager, evento.c->GetRenderer()->GetVID(), vertexList, evento.c, "Trapezoide");
+                        m_pManager->InsertarWidget(w);
+                        ConsumirEvento();
+                        m_pManager->LanzarEventoCreacion(w);
+                }
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+
+                //si ya hay uno pues nada
+
+                if (m_NumMaxTrapezoides > 0) {
+                        int numSemillas = 0;
+                        for (GNC::GCS::ListaWidgets::iterator it = m_pManager->GetListaWidgets().begin(); it !=  m_pManager->GetListaWidgets().end(); ++it) {
+                                if ( (*it)->GetGID() == m_GID) {
+                                        numSemillas++;
+                                        if (numSemillas >= m_NumMaxTrapezoides) {
+                                                return;
+                                        }
+                                }
+                        }
+                }
+
+                m_MouseDown = true;
+
+                m_Start= evento.iP;
+                m_Stop = m_Start;
+
+                GNC::GCS::Vector a = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[0]);
+                GNC::GCS::Vector b = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[1]);
+                m_Vertices[0] = m_Start;
+                m_Vertices[1] = a;
+                m_Vertices[2] = m_Stop;
+                m_Vertices[3] = b;
+
+                m_pManager->Modificado();
+                m_Estado = WBS_Creando;
+                ConsumirEvento();
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+
+                m_Stop= evento.iP;
+
+                GNC::GCS::Vector a = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[0]);
+                GNC::GCS::Vector b = m_Start.ProyeccionOrtogonalSobreRecta(m_Stop,  m_Stop - evento.c->ScreenDirectionCosines[1]);
+                m_Vertices[0] = m_Start;
+                m_Vertices[1] = a;
+                m_Vertices[2] = m_Stop;
+                m_Vertices[3] = b;
+
+                m_pManager->Modificado();
+                ConsumirEvento();
+        } else if( evento.Moving() ) {
+                GTRACE("Moviendose");
+                m_NodoMoviendose= evento.iP;
+                m_Estado = WBS_Ninguno;
+        }
+}
+
+void GNC::GCS::Widgets::WTrapezoideBuilder::OnKeyEvents(TEventoTeclado&)
+{
+
+}
+
+void GNC::GCS::Widgets::WTrapezoideBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+
+        if (m_Estado == WBS_Creando) {
+                glLineWidth(2.0f);
+                //glEnable(GL_LINE_STIPPLE);
+                //glLineStipple(3, 0xAAAA);
+                glColor4f(0.0f, 0.5f, 0.0f, 0.75f);
+                glBegin(GL_LINE_LOOP);
+                glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+                glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+                glVertex2d(m_Vertices[2].x, m_Vertices[2].y);
+                glVertex2d(m_Vertices[3].x, m_Vertices[3].y);
+                glEnd();
+
+                //glDisable(GL_LINE_STIPPLE);
+        } else {
+
+        }
+}
+
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WTrapezoideBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_CREAR_RECTANGULO;
+}
+
+//endregion
diff --git a/cadxcore/widgets/wtrapezoide.h b/cadxcore/widgets/wtrapezoide.h
new file mode 100644
index 0000000..bcec93a
--- /dev/null
+++ b/cadxcore/widgets/wtrapezoide.h
@@ -0,0 +1,77 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/widgetserializable.h>
+#include <vector>
+
+class vtkImageData;
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+//---------------------------------------------------------------------
+
+class WTrapezoideBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Events::EventoRaton   TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado TEventoTeclado;
+        typedef GNC::GCS::IWidgetsManager        TWidgetsManager;
+        typedef GNC::GCS::Widgets::IWidget       TWidget;
+
+        WTrapezoideBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid, int numMaxTrapezoides = 0);
+
+        ~WTrapezoideBuilder();
+
+        virtual void OnMouseEvents(TEventoRaton& event);
+        virtual void OnKeyEvents(TEventoTeclado& event);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+        //region "Helpers"
+
+        bool         m_Dentro;
+        //endregion
+
+
+protected:
+        TVector                  m_NodoMoviendose;  // Cursor
+        TVector                  m_Start;           // Origen del boundingBox
+        TVector                  m_Stop;            // Destino del boundingBox
+        int                      m_NumMaxTrapezoides;
+
+        TVector                  m_Vertices[4]; // Vertices del bounding box.
+
+        bool                     m_MouseDown;
+        Estado                   m_Estado;
+};
+
+}
+}
+}
diff --git a/cadxcore/widgets/wwindowlevel.cpp b/cadxcore/widgets/wwindowlevel.cpp
new file mode 100644
index 0000000..cbdf0ed
--- /dev/null
+++ b/cadxcore/widgets/wwindowlevel.cpp
@@ -0,0 +1,109 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <cmath>
+
+#include <api/globals.h>
+#include "wwindowlevel.h"
+#include <main/managers/widgetsmanager.h>
+#include <api/westilo.h>
+
+#include <vtkgl.h>
+
+
+//region "Implementacion de WWindowLevelBuilder"
+
+GNC::GCS::Widgets::WWindowLevelBuilder::WWindowLevelBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_pObservador = NULL;
+        m_MouseDown = false;
+        m_Changed = false;
+}
+
+GNC::GCS::Widgets::WWindowLevelBuilder::~WWindowLevelBuilder()
+{
+}
+
+void GNC::GCS::Widgets::WWindowLevelBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+
+                TVector stop(evento.sX, evento.sY);
+                if (m_pObservador != NULL) {
+                        m_pObservador->OnAjuste(m_Start, stop);
+                }
+                if (m_pObservador != NULL) {
+                        m_pObservador->OnEnd();
+                }
+                if (m_Changed) {
+                        ConsumirEvento();
+                }
+                //m_pManager->Modificado();
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+
+                m_MouseDown = true;
+                m_Changed = false;
+                if (m_pObservador != NULL) {
+                        m_pObservador->OnStart();
+                }
+                m_Start.Asignar(evento.sX, evento.sY);
+
+                //m_pManager->Modificado();
+                ConsumirEvento();
+        } else if (evento.Dragging() && m_MouseDown) {
+                TVector stop(evento.sX, evento.sY);
+                if (m_Start.DistanciaEuclideaCuadrado(stop) > TVector::EpsilonDeReales()) {
+                        m_Changed = true;
+                }
+                if (m_pObservador != NULL) {
+                        m_pObservador->OnAjuste(m_Start, stop);
+                }
+
+                //m_pManager->Modificado();
+                ConsumirEvento();
+        } else if( evento.Moving() ) {
+                GTRACE("Moviendose");
+                m_NodoMoviendose.Asignar(evento.sX, evento.sY);
+        }
+
+        GTRACE("GNC::GCS::Widgets::WWindowLevelBuilder::OnMouseEvents(wxMouseEvent&)");
+}
+
+void GNC::GCS::Widgets::WWindowLevelBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+        GTRACE("GNC::GCS::Widgets::WWindowLevelBuilder::OnKeyEvents(wxKeyEvent&)");
+}
+
+void GNC::GCS::Widgets::WWindowLevelBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WWindowLevelBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_WINDOW_LEVEL;
+}
+
+//endregion
diff --git a/cadxcore/widgets/wwindowlevel.h b/cadxcore/widgets/wwindowlevel.h
new file mode 100644
index 0000000..6e1f9d3
--- /dev/null
+++ b/cadxcore/widgets/wwindowlevel.h
@@ -0,0 +1,69 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <vector>
+
+#include <api/iwidgets.h>
+#include <widgets/observers/iobservadorwindowlevel.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+//---------------------------------------------------------------------
+
+class WWindowLevelBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Widgets::Observadores::IObservadorWindowLevel TObservador;
+
+        WWindowLevelBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        void SetObservador(TObservador* pObservador)
+        {
+                m_pObservador = pObservador;
+        };
+
+        ~WWindowLevelBuilder();
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+protected:
+        TObservador*             m_pObservador;
+        TVector                  m_NodoMoviendose;  // Cursor
+        TVector                  m_Start;           // Origen del trazado de la recta
+        bool                     m_MouseDown;
+        bool                     m_Changed;
+};
+};
+};
+};
diff --git a/cadxcore/widgets/wzoom.cpp b/cadxcore/widgets/wzoom.cpp
new file mode 100644
index 0000000..f8747dd
--- /dev/null
+++ b/cadxcore/widgets/wzoom.cpp
@@ -0,0 +1,146 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include "wzoom.h"
+#include <main/managers/widgetsmanager.h>
+#include <vtkgl.h>
+#include <api/westilo.h>
+#include <cmath>
+#include <vtkInteractorStyle.h>
+#include <vtkRenderWindowInteractor.h>
+#include <vtk/interactor/ginkgointeractorstyleimage2d.h>
+
+//region "Implementacion de WZoomBuilder"
+#include <api/icontexto.h>
+
+GNC::GCS::Widgets::WZoomBuilder::WZoomBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid)
+{
+        m_MouseDown = false;
+        m_Estado = WBS_Ninguno;
+        m_Dentro = true;
+        m_Start = 0.0;
+        m_Changed = false;
+        m_Stop = 0.0;
+}
+
+GNC::GCS::Widgets::WZoomBuilder::~WZoomBuilder()
+{
+}
+
+void GNC::GCS::Widgets::WZoomBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+
+        if (!m_pManager) {
+                return;
+        }
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_Estado != WBS_Creando) {
+                        m_Estado = WBS_Ninguno;
+                        return;
+                }
+
+                vtkSmartPointer<vtkRenderWindowInteractor> rwi = evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor();
+                vtkSmartPointer<GinkgoInteractorStyleImage2D> is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+                std::cout << "ending " << std::endl;
+
+                if (is != NULL) {
+                        is->EndZoom();
+                        std::cout << "ending zoom " << std::endl;
+                }
+
+                m_Estado = WBS_Ninguno;
+                if (m_Changed) {
+                        ConsumirEvento();
+                }
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+                if (m_Estado != WBS_Ninguno) {
+                        return;
+                }
+
+                m_Changed = false;
+                m_MouseDown = true;
+
+                m_Start = evento.sY;
+                m_Stop = m_Start;
+
+                m_Estado = WBS_Creando;
+                std::cout << "Creando " << evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor()->GetEnabled() << std::endl;
+                evento.Skip(false);
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_Estado != WBS_Creando) {
+                        return;
+                }
+
+                m_Stop = evento.sY;
+
+                double delta = (m_Start - m_Stop) / 1.0;
+
+                if (delta != 0.0) {
+                        m_Changed = true;
+                        int steps = 0;
+                        if (delta > 0.0)  {
+                                steps = (int)std::floor(delta);
+                        } else {
+                                steps = (int)std::ceil(delta);
+                        }
+                        if (steps != 0) {
+                                m_Start = evento.sY;
+                                std::cout << "Dragging " << delta << std::endl;
+
+                                vtkSmartPointer<vtkRenderWindowInteractor> rwi = evento.c->pRenderer->m_pImageViewer->GetRenderWindowInteractor();
+                                GinkgoInteractorStyleImage2D* is = dynamic_cast<GinkgoInteractorStyleImage2D*> (rwi->GetInteractorStyle());
+                                if (is != NULL) {
+                                        if (is->GetState() != VTKIS_ZOOM) {
+                                                std::cout << "starting zoom " << std::endl;
+                                                is->StartZoom();
+                                        }
+                                        double factor = 0.1 *steps * is->GetMouseWheelMotionFactor();
+                                        //this->Dolly(pow((double)1.1, factor));
+                                        is->DoZoom(factor, false);
+                                }
+
+                        }
+                }
+
+                evento.Skip(false);
+        } else if( evento.Moving() ) {
+                m_NodoMoviendose = evento.iP;
+                m_Estado = WBS_Ninguno;
+        }
+
+}
+
+void GNC::GCS::Widgets::WZoomBuilder::OnKeyEvents(TEventoTeclado&)
+{
+
+}
+
+void GNC::GCS::Widgets::WZoomBuilder::Render(GNC::GCS::Contexto3D* /*c*/)
+{
+}
+
+GNC::GCS::Widgets::TipoCursor GNC::GCS::Widgets::WZoomBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_LUPA;
+}
+
+//endregion
diff --git a/cadxcore/widgets/wzoom.h b/cadxcore/widgets/wzoom.h
new file mode 100644
index 0000000..0c6de2f
--- /dev/null
+++ b/cadxcore/widgets/wzoom.h
@@ -0,0 +1,76 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <vector>
+
+#include <export/tools/itoolslider.h>
+#include <api/iwidgets.h>
+#include <api/math/geometry3d.h>
+
+
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+//---------------------------------------------------------------------
+class WZoomBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Events::EventoRaton   TEventoRaton;
+        typedef GNC::GCS::Events::EventoTeclado TEventoTeclado;
+        typedef GNC::GCS::IWidgetsManager        TWidgetsManager;
+        typedef GNC::GCS::Widgets::IWidget       TWidget;
+        WZoomBuilder(TWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WZoomBuilder();
+
+        virtual void OnMouseEvents(TEventoRaton& event);
+        virtual void OnKeyEvents(TEventoTeclado& event);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+        //region "Helpers"
+
+        bool         m_Changed;
+        bool         m_Dentro;
+        //endregion
+
+
+protected:
+        TVector  m_NodoMoviendose;  // Cursor
+
+        double  m_Start;           // Displacement origin in screen pixels
+        double  m_Stop;            // Displacement destination in screen pixels
+
+        bool     m_MouseDown;
+        Estado   m_Estado;
+};
+}
+}
+}
diff --git a/cadxcore/wx/ginkgostyle/ginkgostyle.cpp b/cadxcore/wx/ginkgostyle/ginkgostyle.cpp
new file mode 100644
index 0000000..8d86ca4
--- /dev/null
+++ b/cadxcore/wx/ginkgostyle/ginkgostyle.cpp
@@ -0,0 +1,1186 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ginkgostyle.h"
+#include <wx/dcclient.h>
+#include <wx/image.h>
+#include <wx/sizer.h>
+#include <wx/dcbuffer.h>
+#include <wx/settings.h>
+#include <wx/window.h>
+#include <wx/wxginkgotoolbar.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <algorithm>
+
+/////////////////////////////////////////////VerticalHeader/////////////////////////////////////
+VerticalHeader::VerticalHeader(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long style, const wxString& titulo )
+        :wxPanel(parent,winid,pos,size,style,titulo)
+{
+        wxPanel::SetBackgroundColour(wxBG_STYLE_CUSTOM);
+        m_colorBorde = wxColour(115, 115, 115);
+        m_colorSombraBorde = wxColour(230, 230, 230);
+        m_colorTitulo = wxColour(32,32,32);
+        m_colorTituloInactivo = wxColour(200,200,200);
+        m_sizeBorder = 1;
+        m_fuente = wxFont( 10, 70, 90, wxFONTWEIGHT_BOLD, false, wxEmptyString );
+        m_fondoTituloTopColor = wxColour(230, 230, 230);
+        m_fondoTituloBottomColor = wxColour(180, 180, 180);
+        m_AlturaCabecera = 50;
+
+        m_titulo = wxGetTranslation(titulo);
+
+        //tamanio minimo
+
+        int x = -1,y = -1;
+        if (m_titulo != wxEmptyString) {
+                wxClientDC dc(this);;
+                dc.SetFont(m_fuente);
+                dc.GetTextExtent(m_titulo, &x, &y, NULL, NULL, NULL);
+        }
+        wxSizer* pNewSizer = new wxBoxSizer(wxVERTICAL);
+        pNewSizer->Insert(0, m_AlturaCabecera, x, 0, 0, 0 );
+        wxPanel::SetSizer(pNewSizer);
+        Layout();
+        pNewSizer->Fit(this);
+
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( VerticalHeader::OnSize ), NULL, this );
+        this->Connect( wxEVT_PAINT, wxPaintEventHandler( VerticalHeader::OnPaint ), NULL, this );
+        this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( VerticalHeader::OnEraseBackground ), NULL, this);
+}
+
+VerticalHeader::~VerticalHeader()
+{
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( VerticalHeader::OnSize ), NULL, this );
+        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( VerticalHeader::OnPaint ), NULL, this );
+        this->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( VerticalHeader::OnEraseBackground ), NULL, this);
+}
+
+
+void VerticalHeader::SetToolTip(const wxString& tip)
+{
+        SetTitle(tip);
+}
+
+void VerticalHeader::SetTitle(const wxString& titulo)
+{
+        m_titulo = titulo;
+        wxClientDC dc(this);
+        dc.SetFont(m_fuente);
+        int x,y;
+        dc.GetTextExtent(titulo, &x, &y, NULL, NULL, NULL);
+
+        //tamanio minimo
+        GetSizer()->Remove(0);
+        GetSizer()->Insert(0, m_AlturaCabecera, x + 20, 0, 0, 0 );
+        Layout();
+
+        Refresh();
+}
+
+void VerticalHeader::OnEraseBackground( wxEraseEvent& /*event*/ )
+{
+}
+
+void VerticalHeader::OnPaint(wxPaintEvent &/*event*/)
+{
+        wxPaintDC dc(this);
+        //no muestra la rallita de abajo
+        //wxBufferedPaintDC dc(this);
+
+        const int width = dc.GetSize().x;
+        const int height = dc.GetSize().y;
+
+        dc.SetFont( m_fuente );
+
+        //se calcula los m�rgenes para centrar el texto
+
+        wxCoord textW, textH;
+        dc.GetTextExtent(m_titulo, &textW, &textH);
+
+        /*
+        	wxRect rTitle(0, 0, cli_size.x, cli_size.y);
+        	dc.GradientFillLinear(rTitle, wxColour(180, 180, 180), wxColour(230, 230, 230), wxWEST);
+
+        	dc.SetFont( wxFont( 10, 70, 90, wxFONTWEIGHT_BOLD, false, wxEmptyString ) );
+        	wxCoord x = 0;
+        	wxCoord y = 0;
+        	//dc.SetTextForeground( wxColour(245,245,245) );
+
+        	dc.GetTextExtent(str, &x, &y, NULL, NULL, NULL);
+        	dc.DrawRotatedText(str, (cli_size.x - y) / 2.0, (cli_size.y + x) / 2.0, 90.0);
+        	*/
+        // Title
+        wxRect rTitle(0, 0, width, height);
+
+        // Title background
+        dc.GradientFillLinear(rTitle, m_fondoTituloBottomColor, m_fondoTituloTopColor, wxWEST);
+
+        // Title border
+        dc.SetBrush(*wxTRANSPARENT_BRUSH);
+        dc.SetPen(wxPen(m_colorBorde, m_sizeBorder, wxSOLID));
+        dc.DrawRectangle(rTitle);
+
+        dc.SetTextForeground(m_colorTitulo);
+
+        dc.SetFont(m_fuente);
+        wxCoord x = 0;
+        wxCoord y = 0;
+        dc.GetTextExtent(m_titulo, &x, &y, NULL, NULL, NULL);
+        dc.DrawRotatedText(m_titulo, (width - y) / 2.0, (height + x) / 2.0, 90.0);
+}
+
+void VerticalHeader::OnSize(wxSizeEvent & event)
+{
+        Layout();
+        this->Refresh(false);
+        event.Skip(true);
+}
+
+
+/////////////////////////////////////////////HeaderPanelWithButton/////////////////////////////////////
+#define ID_TITULO 0
+
+class TitleBar : public wxGinkgoToolBar
+{
+public:
+        TitleBar(wxWindow* pParent, const wxColour& color, const wxFont& fuente, const wxString& titulo = wxEmptyString) : wxGinkgoToolBar(pParent, wxID_ANY, wxDefaultPosition, wxDefaultSize)
+        {
+                SetToolBitmapSize(wxSize(16,16));
+
+                wxGinkgoToolBarArt* pToolArt= new wxGinkgoToolBarArt(color);
+                pToolArt->SetFont(fuente);
+
+                SetArtProvider(pToolArt);
+
+                if (titulo != wxEmptyString) {
+                        wxClientDC dc(this);
+                        int width, height;
+#if !defined(__WXOSX__)
+                        dc.SetFont(fuente);
+#else
+                        dc.SetFont(GetFont());
+#endif
+                        dc.GetTextExtent(titulo, &width, &height);
+                        AddLabel(ID_TITULO,titulo, width);
+                }
+
+                Realize();
+        }
+
+        ~TitleBar()
+        {
+        }
+};
+
+
+HeaderPanelWithButton::HeaderPanelWithButton(wxWindow *parent, wxWindowID winid,const wxPoint& pos, const wxSize& size,long style, const wxString& titulo )
+        :wxPanel(parent,winid,pos,size,style,titulo)
+{
+        m_barColor = wxColour(200,200,200);
+        m_fontBar = wxFont( 10, 70, 90, wxFONTWEIGHT_BOLD, false, wxEmptyString );
+
+        m_pTittleBar = m_pButtonBar = NULL;
+
+        wxSizer* pNewSizer = new wxBoxSizer(wxHORIZONTAL);
+        wxPanel::SetSizer(pNewSizer);
+        Layout();
+        pNewSizer->Fit(this);
+
+        if (titulo != wxEmptyString) {
+                SetTitle(titulo);
+        }
+
+        m_pButtonBar = new TitleBar(this, m_barColor, m_fontBar);
+        GetSizer()->Add(m_pButtonBar,0, wxALIGN_CENTER_VERTICAL|wxEXPAND,0);
+}
+
+HeaderPanelWithButton::~HeaderPanelWithButton()
+{
+}
+
+void HeaderPanelWithButton::SetToolTip(const wxString& tip)
+{
+        SetTitle(tip);
+}
+
+void HeaderPanelWithButton::SetTitle(const wxString& titulo)
+{
+        if (m_pTittleBar != NULL) {
+                GetSizer()->Detach(m_pTittleBar);
+                m_pTittleBar->Destroy();
+        }
+        m_pTittleBar = new TitleBar(this, m_barColor, m_fontBar, titulo);
+        GetSizer()->Insert(0,m_pTittleBar,1, wxALIGN_CENTER_VERTICAL|wxEXPAND,0);
+        Layout();
+}
+
+void HeaderPanelWithButton::Realize()
+{
+        m_pButtonBar->Realize();
+        m_pTittleBar->Realize();
+        Layout();
+}
+
+wxGinkgoToolBar* HeaderPanelWithButton::GetButtonBar()
+{
+        return m_pButtonBar;
+}
+
+/////////////////////////////////////////////SubHeaderPanelWithButton/////////////////////////////////////
+SubHeaderPanelWithButton::SubHeaderPanelWithButton(wxWindow *parent, wxWindowID winid,const wxPoint& pos, const wxSize& size,long style, const wxString& titulo )
+        :HeaderPanelWithButton(parent,winid,pos,size,style,titulo)
+{
+        m_barColor = wxColour(200,200,200);
+        m_fontBar = wxFont( 8, 70, 90, wxFONTWEIGHT_BOLD, false, wxEmptyString );
+
+        m_pTittleBar = m_pButtonBar = NULL;
+
+        wxSizer* pNewSizer = new wxBoxSizer(wxHORIZONTAL);
+        wxPanel::SetSizer(pNewSizer);
+        Layout();
+        pNewSizer->Fit(this);
+
+        if (titulo != wxEmptyString) {
+                SetTitle(titulo);
+        }
+
+        m_pButtonBar = new TitleBar(this, m_barColor, m_fontBar);
+        GetSizer()->Add(m_pButtonBar,0, wxALIGN_CENTER_VERTICAL|wxEXPAND,0);
+}
+
+SubHeaderPanelWithButton::~SubHeaderPanelWithButton()
+{
+}
+
+
+/////////////////////////////////////////////HeaderPanel/////////////////////////////////////
+
+HeaderPanel::HeaderPanel(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long style, const wxString& titulo )
+        :wxPanel(parent,winid,pos,size,style,titulo)
+{
+        wxPanel::SetBackgroundColour(wxBG_STYLE_CUSTOM);
+        m_colorBorde = wxColour(115, 115, 115);
+        m_colorSombraBorde = wxColour(230, 230, 230);
+        m_colorTitulo = wxColour(245,245,245);
+        m_colorTituloInactivo = wxColour(200,200,200);
+        m_sizeBorder = 1;
+        m_fuente = wxFont( 14, 70, 90, wxFONTWEIGHT_NORMAL, false, wxEmptyString );
+        m_fuenteSubTitle = wxFont( 10, 70, 90, wxFONTWEIGHT_NORMAL, false, wxEmptyString );
+        m_fondoTituloTopColor = wxColour(0, 0, 0);
+        m_fondoTituloBottomColor = wxColour(0, 0, 0);
+        m_AlturaCabecera = 40;
+
+        m_titulo = wxGetTranslation(titulo);
+
+        m_bitmap = GinkgoResourcesManager::Wizards::GetIcoBarraSuperior();
+
+        //tamanio minimo
+        wxSizer* pNewSizer = new wxBoxSizer(wxVERTICAL);
+        pNewSizer->Insert(0, 0, m_AlturaCabecera, 0, 0, 0 );
+        wxPanel::SetSizer(pNewSizer);
+        Layout();
+        pNewSizer->Fit(this);
+
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( HeaderPanel::OnSize ), NULL, this );
+        this->Connect( wxEVT_PAINT, wxPaintEventHandler( HeaderPanel::OnPaint ), NULL, this );
+        this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( HeaderPanel::OnEraseBackground ), NULL, this);
+}
+
+HeaderPanel::~HeaderPanel()
+{
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( HeaderPanel::OnSize ), NULL, this );
+        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( HeaderPanel::OnPaint ), NULL, this );
+        this->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( HeaderPanel::OnEraseBackground ), NULL, this);
+}
+
+void HeaderPanel::SetSubtitle(const wxString& subtitle)
+{
+        m_subtitle = subtitle;
+        m_AlturaCabecera = 70;
+
+        wxSizer* pNewSizer = new wxBoxSizer(wxVERTICAL);
+        pNewSizer->Insert(0, 0, m_AlturaCabecera, 0, 0, 0 );
+        wxPanel::SetSizer(pNewSizer);
+        Layout();
+        pNewSizer->Fit(this);
+
+        Refresh(true);
+}
+
+
+void HeaderPanel::SetToolTip(const wxString& tip)
+{
+        SetTitle(tip);
+}
+
+void HeaderPanel::SetTitle(const wxString& titulo)
+{
+        m_titulo = titulo;
+        Refresh();
+}
+
+bool HeaderPanel::Enable(bool enabled)
+{
+        return wxPanel::Enable(enabled);
+}
+
+void HeaderPanel::OnEraseBackground( wxEraseEvent& /*event*/ )
+{
+}
+
+void HeaderPanel::OnPaint(wxPaintEvent &/*event*/)
+{
+        wxPaintDC dc(this);
+        //no muestra la rallita de abajo
+        //wxBufferedPaintDC dc(this);
+
+        const int width = dc.GetSize().x;
+        const int height = dc.GetSize().y;
+
+        dc.SetFont( m_fuente );
+
+        //se calcula los m�rgenes para centrar el texto
+        int margenTitulo = 0, margenSubtitulo = 0;
+
+        wxCoord textW, textH;
+        dc.GetTextExtent(m_titulo, &textW, &textH);
+
+        wxCoord textWSub = 0, textHSub = 0;
+
+        if (m_subtitle != wxEmptyString) {
+                dc.SetFont( m_fuenteSubTitle );
+                dc.GetTextExtent(m_subtitle, & textWSub, & textHSub);
+                dc.SetFont( m_fuente );
+                margenTitulo = 8 * ((height - textH - textHSub) / 12);
+                margenSubtitulo = 1 * ((height - textH - textHSub) / 12);
+        } else {
+                margenTitulo = (height - textH) / 2;
+        }
+
+        // Title
+        wxRect rTitle(0, 0, width, height);
+
+        // Title background
+        dc.GradientFillLinear(rTitle, m_fondoTituloBottomColor, m_fondoTituloTopColor, wxNORTH);
+
+        dc.DrawBitmap(m_bitmap,width - m_bitmap.GetWidth(),0);
+
+        // Title border
+        dc.SetBrush(*wxTRANSPARENT_BRUSH);
+        dc.SetPen(wxPen(m_colorBorde, m_sizeBorder, wxSOLID));
+        dc.DrawRectangle(rTitle);
+
+        // Title text
+        if (!IsEnabled()) {
+                dc.SetTextForeground(wxColour(172,168,153));
+        } else {
+                dc.SetTextForeground(m_colorTitulo);
+        }
+
+        dc.DrawText(m_titulo, 15, margenTitulo);
+
+        if (m_subtitle != wxEmptyString) {
+                dc.SetFont( m_fuenteSubTitle );
+                dc.DrawText(m_subtitle, 15, margenTitulo + margenSubtitulo + textH);
+        }
+}
+
+void HeaderPanel::OnSize(wxSizeEvent & event)
+{
+        Layout();
+        this->Refresh(false);
+        event.Skip(true);
+}
+
+
+/////////////////////////////////////////////PANEL SCROLLABLE/////////////////////////////////////
+
+PanelScrollable::PanelScrollable(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long style)
+        :wxScrolledWindow(parent,winid,pos,size,style)
+{
+        SetScrollRate( 5, 5 );
+}
+PanelScrollable::~PanelScrollable() {}
+
+/////////////////////////////////////////////BodyPanel/////////////////////////////////////
+BodyPanel::BodyPanel(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long style)
+        :PanelScrollable(parent,winid,pos,size,style)
+{
+        m_colorFondo = wxColour(211,211,211);
+        wxPanel::SetBackgroundColour(m_colorFondo);
+        m_sizeBorderInterior = 10;
+
+}
+BodyPanel::~BodyPanel() {}
+
+void BodyPanel::SetSizer(wxSizer* sizer, bool deleteOld)
+{
+        wxSizer* pNewSizer = new wxBoxSizer(wxVERTICAL);
+        pNewSizer->Add(sizer,1,wxEXPAND|wxALL, m_sizeBorderInterior);
+        PanelScrollable::SetSizer(pNewSizer,deleteOld);
+        Layout();
+        pNewSizer->Fit(this);
+}
+/////////////////////////////////////////////BodyPanel/////////////////////////////////////
+BodyPanelSinScroll::BodyPanelSinScroll(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long style)
+        :wxPanel(parent,winid,pos,size,style)
+{
+        m_colorFondo = wxColour(211,211,211);
+        wxPanel::SetBackgroundColour(m_colorFondo);
+        m_sizeBorderInterior = 5;
+
+}
+BodyPanelSinScroll::~BodyPanelSinScroll() {}
+
+void BodyPanelSinScroll::SetSizer(wxSizer* sizer, bool deleteOld)
+{
+        wxSizer* pNewSizer = new wxBoxSizer(wxVERTICAL);
+        pNewSizer->Add(sizer,1,wxEXPAND|wxALL, m_sizeBorderInterior);
+        wxPanel::SetSizer(pNewSizer,deleteOld);
+        Layout();
+        pNewSizer->Fit(this);
+}
+/////////////////////////////////////////////Footer/////////////////////////////////////
+FooterPanel::FooterPanel(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long style)
+        :wxPanel(parent,winid,pos,size,style)
+{
+        m_sizeBorderInterior = 8;
+        m_sizeBorder = 1;
+        m_colorBorde = wxColour(115, 115, 115);
+
+        this->Connect( wxEVT_PAINT, wxPaintEventHandler( FooterPanel::OnPaint ), NULL, this );
+        this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( FooterPanel::OnEraseBackground ), NULL, this);
+}
+FooterPanel::~FooterPanel() {}
+
+
+void FooterPanel::OnEraseBackground( wxEraseEvent& /*event*/ )
+{
+}
+
+void FooterPanel::OnPaint(wxPaintEvent &/*event*/)
+{
+        wxPaintDC dc(this);
+        //no muestra la rallita de abajo
+        //wxBufferedPaintDC dc(this);
+
+        const int width = dc.GetSize().x;
+        const int height = dc.GetSize().y;
+
+        //panelbackground
+        wxRect rPanelBackground(0, 0, width, height);
+        dc.SetBrush(wxBrush(GetBackgroundColour()));
+        dc.SetPen(*wxTRANSPARENT_PEN);
+        dc.DrawRectangle(rPanelBackground);
+
+        // Border superior
+        wxRect rPanel(0, 0, width, height);
+        dc.SetPen(wxPen(m_colorBorde, m_sizeBorder, wxSOLID));
+        dc.DrawLine(0,0,width,0);
+}
+
+void FooterPanel::SetSizer(wxSizer* sizer, bool deleteOld)
+{
+        wxSizer* pNewSizer = new wxBoxSizer(wxVERTICAL);
+        pNewSizer->Add(sizer,1,wxEXPAND|wxALL, m_sizeBorderInterior);
+        wxPanel::SetSizer(pNewSizer,deleteOld);
+        Layout();
+        pNewSizer->Fit(this);
+}
+
+/////////////////////////////////////////////TitledPanel/////////////////////////////////////
+UnTitledPanel::UnTitledPanel(wxWindow *parent,
+                             wxWindowID winid ,
+                             const wxPoint& pos ,
+                             const wxSize& size ,
+                             long style):wxPanel(parent,winid,pos,size,style)
+{
+        m_colorFondo = wxColour(242,242,242);
+        wxPanel::SetBackgroundColour(m_colorFondo);
+        m_colorBorde = wxColour(115, 115, 115);
+        m_colorSombraBorde = wxColour(230, 230, 230);
+
+        m_sizeBorder = 1;
+
+#if defined(__WXGTK__)
+        m_borderInterior = 4;
+#else
+        m_borderInterior = 10;
+#endif
+
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( UnTitledPanel::OnSize ), NULL, this );
+        this->Connect( wxEVT_PAINT, wxPaintEventHandler( UnTitledPanel::OnPaint ), NULL, this );
+        this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( UnTitledPanel::OnEraseBackground ), NULL, this);
+
+}
+UnTitledPanel::~UnTitledPanel()
+{
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( UnTitledPanel::OnSize ), NULL, this );
+        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( UnTitledPanel::OnPaint ), NULL, this );
+        this->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( UnTitledPanel::OnEraseBackground ), NULL, this);
+}
+
+void UnTitledPanel::OnEraseBackground( wxEraseEvent& /*event*/ )
+{
+}
+
+void UnTitledPanel::OnPaint(wxPaintEvent &/*event*/)
+{
+        wxPaintDC dc(this);
+        //no muestra la rallita de abajo
+        //wxBufferedPaintDC dc(this);
+
+        const int width = dc.GetSize().x;
+        const int height = dc.GetSize().y;
+
+        //panelbackground
+        wxRect rPanelBackground(0, 0, width, height);
+        dc.SetBrush(wxBrush(m_colorFondo));
+        dc.SetPen(*wxTRANSPARENT_PEN);
+        dc.DrawRectangle(rPanelBackground);
+
+        // Panel Border
+        wxRect rPanel(0, 0, width, height);
+        dc.SetBrush(*wxTRANSPARENT_BRUSH);
+        dc.SetPen(wxPen(m_colorBorde, m_sizeBorder, wxSOLID));
+        dc.DrawRectangle(rPanel);
+
+}
+
+void UnTitledPanel::OnSize(wxSizeEvent & event)
+{
+        Layout();
+        this->Refresh(false);
+        event.Skip(true);
+}
+
+void UnTitledPanel::SetColorBorde(const wxColour& colorBorde)
+{
+        m_colorBorde = colorBorde;
+        Refresh();
+}
+
+wxColour UnTitledPanel::GetColorBorde()
+{
+        return m_colorBorde;
+}
+
+int UnTitledPanel::GetSizeBorde()
+{
+        return m_sizeBorder;
+}
+
+void UnTitledPanel::SetSizeBorde(int size)
+{
+        m_sizeBorder = size;
+        Refresh();
+}
+
+int UnTitledPanel::GetBorderInterior()
+{
+        return m_borderInterior;
+}
+
+void UnTitledPanel::SetBorderInterior(int size)
+{
+        m_borderInterior = size;
+        if ( GetSizer() != NULL ) {
+                GetSizer()->GetItem((size_t)1)->SetBorder(m_borderInterior);
+        }
+        Refresh();
+}
+
+
+/////////////////////////////////////////////TitledPanel/////////////////////////////////////
+TitledPanel::TitledPanel(wxWindow *parent,
+                         wxWindowID winid ,
+                         const wxPoint& pos ,
+                         const wxSize& size ,
+                         long style,
+                         const wxString& titulo  ):wxPanel(parent,winid,pos,size,style)
+{
+        m_recogido = false;
+        m_colorFondo = wxColour(242,242,242);
+        wxPanel::SetBackgroundColour(m_colorFondo);
+        m_colorBorde = wxColour(115, 115, 115);
+        m_colorSombraBorde = wxColour(230, 230, 230);
+        m_colorTitulo = wxColour(245,245,245);
+        m_colorTituloInactivo = wxColour(200,200,200);
+        m_sizeBorder = 1;
+        m_fuente = wxFont( 10, 70, 90, wxFONTWEIGHT_BOLD, false, wxEmptyString );
+        m_fondoTituloTopColor = wxColour(90, 90, 90);
+        m_fondoTituloBottomColor = wxColour(54, 54, 54);
+        m_margenTitulo = 5;
+#if defined(__WXGTK__)
+        m_borderInterior = 4;
+#else
+        m_borderInterior = 10;
+#endif
+
+        m_titulo = wxGetTranslation(titulo);
+
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( TitledPanel::OnSize ), NULL, this );
+        this->Connect( wxEVT_PAINT, wxPaintEventHandler( TitledPanel::OnPaint ), NULL, this );
+        this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( TitledPanel::OnEraseBackground ), NULL, this);
+
+}
+TitledPanel::~TitledPanel()
+{
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( TitledPanel::OnSize ), NULL, this );
+        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( TitledPanel::OnPaint ), NULL, this );
+        this->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( TitledPanel::OnEraseBackground ), NULL, this);
+}
+
+void TitledPanel::SetToolTip(const wxString& tip)
+{
+        SetTitle(tip);
+}
+
+void TitledPanel::SetTitle(const wxString& titulo)
+{
+        m_titulo = titulo;
+        Refresh();
+}
+
+bool TitledPanel::Enable(bool enabled)
+{
+        return wxPanel::Enable(enabled);
+}
+
+void TitledPanel::OnEraseBackground( wxEraseEvent& /*event*/ )
+{
+}
+
+void TitledPanel::OnPaint(wxPaintEvent &/*event*/)
+{
+        wxPaintDC dc(this);
+        //no muestra la rallita de abajo
+        //wxBufferedPaintDC dc(this);
+
+        const int width = dc.GetSize().x;
+        const int height = dc.GetSize().y;
+
+        dc.SetFont( m_fuente );
+
+        wxCoord textW, textH;
+        dc.GetTextExtent(m_titulo, & textW, & textH);
+
+        // Title
+        int dobleMargen = m_margenTitulo*2;
+        wxRect rTitle(0, 0, width, textH + dobleMargen);
+
+        // Title background
+
+        dc.GradientFillLinear(rTitle, m_fondoTituloBottomColor, m_fondoTituloTopColor, wxNORTH);
+
+        // Title border
+        dc.SetBrush(*wxTRANSPARENT_BRUSH);
+        dc.SetPen(wxPen(m_colorBorde, m_sizeBorder, wxSOLID));
+        dc.DrawRectangle(rTitle);
+
+        // Title text
+        if (!IsEnabled()) {
+                dc.SetTextForeground(wxSystemSettings::GetColour( wxSYS_COLOUR_GRAYTEXT ));
+        } else {
+                dc.SetTextForeground(m_colorTitulo);
+        }
+
+        dc.DrawText(m_titulo,m_margenTitulo+3,m_margenTitulo);
+
+        // inner shadow container
+        wxRect rTitleShadow(1, textH + dobleMargen, width - 2, height - textH - dobleMargen - 1);
+        dc.SetPen(wxPen(m_colorSombraBorde, m_sizeBorder, wxSOLID));
+        dc.DrawRectangle(rTitleShadow);
+
+        //panelbackground
+        wxRect rPanelBackground(0, textH + dobleMargen, width, height);
+        dc.SetBrush(wxBrush(m_colorFondo));
+        dc.SetPen(*wxTRANSPARENT_PEN);
+        dc.DrawRectangle(rPanelBackground);
+
+        // Panel Border
+        wxRect rPanel(0, 0, width, height);
+        dc.SetBrush(*wxTRANSPARENT_BRUSH);
+        dc.SetPen(wxPen(m_colorBorde, m_sizeBorder, wxSOLID));
+        dc.DrawRectangle(rPanel);
+
+}
+
+void TitledPanel::OnSize(wxSizeEvent & event)
+{
+        Layout();
+        this->Refresh(false);
+        event.Skip(true);
+}
+
+void TitledPanel::SetColorBorde(const wxColour& colorBorde)
+{
+        m_colorBorde = colorBorde;
+        Refresh();
+}
+
+wxColour TitledPanel::GetColorBorde()
+{
+        return m_colorBorde;
+}
+
+void TitledPanel::SetColorTitulo(const wxColour& colorTitulo)
+{
+        m_colorTitulo = colorTitulo;
+        Refresh();
+}
+
+wxColour TitledPanel::GetColorTitulo()
+{
+        return m_colorTitulo;
+}
+
+int TitledPanel::GetSizeBorde()
+{
+        return m_sizeBorder;
+}
+
+void TitledPanel::SetSizeBorde(int size)
+{
+        m_sizeBorder = size;
+        Refresh();
+}
+
+int TitledPanel::GetBorderInterior()
+{
+        return m_borderInterior;
+}
+
+void TitledPanel::SetBorderInterior(int size)
+{
+        m_borderInterior = size;
+        if ( GetSizer() != NULL ) {
+                GetSizer()->GetItem((size_t)1)->SetBorder(m_borderInterior);
+        }
+        Refresh();
+}
+
+//TODO: esta mu deprecated, pero tiene posibilidades de seguir en un futuro
+bool TitledPanel::SetBackgroundColour(const wxColour &colour)
+{
+        //TODO HAY QUE MEJORAR ESTE METODO PARA PONERLO TODO EN FUNCION DEL RESTO
+        bool correcto = wxPanel::SetBackgroundColour(colour);
+
+        // el color del titulo sera mas oscuro y el del borde mas todavia
+        wxImage::HSVValue valorHSV = wxImage::RGBtoHSV(wxImage::RGBValue(colour.Red(), colour.Green(), colour.Blue()));
+
+        valorHSV.saturation +=  (float)30 * 0.0125f;
+        valorHSV.saturation = std::min<double>(1.0f,valorHSV.saturation);
+        valorHSV.value -= (float)30 * 0.00625f;
+        valorHSV.value = std::max<double>(0.0f,valorHSV.value);
+
+        wxImage::RGBValue rgbAux = wxImage::HSVtoRGB(valorHSV);
+        /*m_colorFondoTitulo = wxColour(rgbAux.red,rgbAux.green,rgbAux.blue);*/
+
+
+        valorHSV.saturation +=  (float)50 * 0.0125f;
+        valorHSV.saturation = std::min<double>(1.0f,valorHSV.saturation);
+        valorHSV.value -= (float)50 * 0.00625f;
+        valorHSV.value = std::max<double>(0.0f,valorHSV.value);
+
+        rgbAux = wxImage::HSVtoRGB(valorHSV);
+        m_colorBorde = wxColour(rgbAux.red,rgbAux.green,rgbAux.blue);
+
+        //????como calcular la letra
+        Refresh();
+
+        return correcto;
+}
+
+void TitledPanel::Recoger(bool recoger)
+{
+        m_recogido = recoger;
+
+        wxWindowList listaVentanas = GetChildren();
+        for (wxWindowList::iterator it = listaVentanas.begin(); it != listaVentanas.end(); ++it) {
+                (*it)->Show(!recoger);
+        }
+
+        Layout();
+        GetParent()->Layout();
+        GetParent()->Refresh(true);
+}
+
+bool TitledPanel::EstaRecogido()
+{
+        return m_recogido;
+}
+
+int TitledPanel::GetGap()
+{
+        int gap = m_margenTitulo*2 + m_fuente.GetPointSize() + m_fuente.GetPointSize()*0.5f; //margenes + fuente + margen porque si pones "pl" y mide mas d 10 porque la p mide 10 pero esta mas abajo y la ele lo mismo pero para arriba
+        return gap;
+}
+
+void TitledPanel::SetSizer(wxSizer* sizer, bool deleteOld)
+{
+        int gap = m_margenTitulo*2 + m_fuente.GetPointSize() + m_fuente.GetPointSize()*0.5f; //margenes + fuente + margen porque si pones "pl" y mide mas d 10 porque la p mide 10 pero esta mas abajo y la ele lo mismo pero para arriba
+        wxSizer* pNewSizer = new wxBoxSizer(wxVERTICAL);
+
+        pNewSizer->Insert(0, 0, gap, 0, 0, 0, 0 );
+        pNewSizer->Add(sizer,1,wxEXPAND|wxALL, m_borderInterior);
+        wxPanel::SetSizer(pNewSizer,deleteOld);
+        Layout();
+        pNewSizer->Fit(this);
+}
+
+/////////////////////////////////////////////TitledPanelSinBorder/////////////////////////////////////
+
+TitledPanelSinBorder::TitledPanelSinBorder(wxWindow *parent,
+                wxWindowID winid ,
+                const wxPoint& pos ,
+                const wxSize& size ,
+                long style,
+                const wxString& titulo  ):TitledPanel(parent,winid,pos,size,style,titulo)
+{
+        m_borderInterior = 1;
+}
+TitledPanelSinBorder::~TitledPanelSinBorder()
+{
+}
+
+/////////////////////////////////////////////TitledPanelSeparatorV/////////////////////////////////////
+TitledPanelSeparatorV::TitledPanelSeparatorV(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long  )
+        :wxPanel(parent,winid,pos,size,wxNO_BORDER)
+{
+        m_separacion = 15;
+        SetMinSize( wxSize(0,m_separacion) );
+        SetMaxSize( wxSize(0,m_separacion) );
+        SetSize( wxSize(0,m_separacion) );
+}
+
+TitledPanelSeparatorV::~TitledPanelSeparatorV()
+{
+}
+/////////////////////////////////////////////TitledPanelSeparatorH/////////////////////////////////////
+TitledPanelSeparatorH::TitledPanelSeparatorH(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long  )
+        :wxPanel(parent,winid,pos,size,wxNO_BORDER)
+{
+        m_separacion = 15;
+        SetMinSize( wxSize(m_separacion,0) );
+        SetMaxSize( wxSize(m_separacion,0) );
+        SetSize( wxSize(m_separacion,0) );
+}
+
+TitledPanelSeparatorH::~TitledPanelSeparatorH()
+{
+}
+
+/////////////////////////////////////////////SUBTITLED/////////////////////////////////////
+
+SubTitledPanel::SubTitledPanel(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long style, const wxString& titulo )
+        :TitledPanel(parent,winid,pos,size,style,titulo)
+{
+        m_recogido = false;
+        m_colorFondo = wxColour(255,255,255);
+        wxPanel::SetBackgroundColour(m_colorFondo);
+
+        m_colorBorde = wxColour(175, 175, 175);
+        m_colorSombraBorde = wxColour(230, 230, 230);
+        m_colorTitulo = wxColour(245,245,245);
+        m_sizeBorder = 1;
+        m_fuente = wxFont( 8, 70, 90, wxFONTWEIGHT_BOLD, false, wxEmptyString );
+
+        m_fondoTituloTopColor = wxColour(130, 130, 130);
+        m_fondoTituloBottomColor = wxColour(110, 110, 110);
+
+        m_margenTitulo = 4;
+#if defined(__WXGTK__)
+        m_borderInterior = 4;
+#else
+        m_borderInterior = 10;
+#endif
+}
+
+SubTitledPanel::~SubTitledPanel()
+{
+}
+
+/////////////////////////////////////////////SubTitledPanelSinBorder/////////////////////////////////////
+
+SubTitledPanelSinBorder::SubTitledPanelSinBorder(wxWindow *parent,
+                wxWindowID winid ,
+                const wxPoint& pos ,
+                const wxSize& size ,
+                long style,
+                const wxString& titulo  ):SubTitledPanel(parent,winid,pos,size,style,titulo)
+{
+        m_borderInterior = 1;
+}
+SubTitledPanelSinBorder::~SubTitledPanelSinBorder()
+{
+}
+
+/////////////////////////////////////////////SubTitledPanelSeparatorV/////////////////////////////////////
+SubTitledPanelSeparatorV::SubTitledPanelSeparatorV(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long  )
+        :wxPanel(parent,winid,pos,size,wxNO_BORDER)
+{
+        m_separacion = 15;
+        SetMinSize( wxSize(0,m_separacion) );
+        SetMaxSize( wxSize(0,m_separacion) );
+        SetSize( wxSize(0,m_separacion) );
+#if defined(__WXGTK__)
+        SetBackgroundColour(parent->GetBackgroundColour());
+#endif
+}
+
+SubTitledPanelSeparatorV::~SubTitledPanelSeparatorV()
+{
+}
+/////////////////////////////////////////////SubTitledPanelSeparatorH/////////////////////////////////////
+SubTitledPanelSeparatorH::SubTitledPanelSeparatorH(wxWindow *parent, wxWindowID winid, const wxPoint& pos, const wxSize& size, long  )
+        :wxPanel(parent,winid,pos,size,wxNO_BORDER)
+{
+        m_separacion = 15;
+        SetMinSize( wxSize(m_separacion,0) );
+        SetMaxSize( wxSize(m_separacion,0) );
+        SetSize( wxSize(m_separacion,0) );
+#if defined(__WXGTK__)
+        SetBackgroundColour(parent->GetBackgroundColour());
+#endif
+}
+
+SubTitledPanelSeparatorH::~SubTitledPanelSeparatorH()
+{
+}
+
+/////////////////////////////////////////////GinkgoBoxPanel/////////////////////////////////////
+GinkgoBoxPanel::GinkgoBoxPanel(wxWindow *parent,
+                               wxWindowID winid ,
+                               const wxPoint& pos,
+                               const wxSize& size ,
+                               long style):wxPanel(parent, winid, pos, size, style)
+{
+        m_backgroudColor = wxColour(248,247,243);
+        m_borderColor = wxColour(216, 215, 209, 255);
+        SetBackgroundColour(m_backgroudColor);
+
+        this->Connect( wxEVT_PAINT, wxPaintEventHandler( GinkgoBoxPanel::OnPaint ), NULL, this );
+}
+
+GinkgoBoxPanel::~GinkgoBoxPanel()
+{
+        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( GinkgoBoxPanel::OnPaint ), NULL, this );
+}
+
+void GinkgoBoxPanel::OnPaint(wxPaintEvent &event)
+{
+        wxPaintDC dc(this);
+
+        dc.SetBrush(wxBrush(m_borderColor,wxTRANSPARENT));
+        dc.SetPen(wxPen(m_borderColor, 1, wxSOLID));
+
+        dc.DrawRectangle(wxRect(wxPoint(0,0), wxPoint(dc.GetSize().x-1, dc.GetSize().y-1)));
+        event.Skip(false);
+}
+
+/////////////////////////////////////////////GinkgoGauge/////////////////////////////////////
+GinkgoGauge::GinkgoGauge(wxWindow *parent,
+                         wxWindowID winid,
+                         const wxPoint& pos,
+                         const wxSize& size,
+                         long style): wxPanel(parent, winid, pos, size, style),
+        m_dirty(false)
+{
+        SetMinSize(wxSize(150, 15));
+        m_progress = 0.0f;
+        wxFont font(8, GetFont().GetFamily(), GetFont().GetStyle(), GetFont().GetWeight());
+        SetFont(font);
+        wxWindow::SetBackgroundStyle(wxBG_STYLE_CUSTOM);
+
+        wxClientDC dc(this);
+        dc.SetFont(font);
+        int height,width;
+        dc.GetTextExtent(wxT("000% "), &width, &height, NULL, NULL, NULL);
+        m_maxSizeOfText = GetSize().x - (width +15);
+
+        RecreateBuffer(size);
+
+
+        this->Connect( wxEVT_IDLE, wxIdleEventHandler(GinkgoGauge::OnIdle), NULL, this );
+        this->Connect( wxEVT_PAINT, wxPaintEventHandler( GinkgoGauge::OnPaint ), NULL, this );
+        this->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( GinkgoGauge::OnEraseBackground ), NULL, this);
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( GinkgoGauge::OnSize ), NULL, this );
+}
+
+GinkgoGauge::~GinkgoGauge()
+{
+        this->Disconnect(wxEVT_IDLE, wxIdleEventHandler(GinkgoGauge::OnIdle), NULL, this );
+        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( GinkgoGauge::OnPaint ), NULL, this );
+        this->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( GinkgoGauge::OnEraseBackground ), NULL, this);
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( GinkgoGauge::OnSize ), NULL, this );
+}
+
+void GinkgoGauge::SetStatus(const wxString& status)
+{
+        if (m_status != status) {
+                m_status = status;
+                wxClientDC dc(this);
+                dc.SetFont(GetFont());
+                int width,height;
+                dc.GetTextExtent(m_status, &width, &height, NULL, NULL, NULL);
+                while (width > m_maxSizeOfText && m_status.size() > 2) {
+                        m_status = m_status.substr(0, m_status.size() - 2);
+                        dc.GetTextExtent(m_status, &width, &height, NULL, NULL, NULL);
+                }
+                m_dirty = true;
+        }
+}
+
+wxString GinkgoGauge::GetStatus()
+{
+        return m_status;
+}
+
+void GinkgoGauge::SetProgress(float progress)
+{
+        if (progress != m_progress && progress >= 0.0f && progress <= 1.0f) {
+                m_progress = progress;
+                m_dirty = true;
+        }
+}
+
+float GinkgoGauge::GetProgress()
+{
+        return m_progress;
+}
+
+void GinkgoGauge::OnIdle(wxIdleEvent &WXUNUSED(event))
+{
+        if (m_dirty) {
+                Refresh();
+                m_dirty = false;
+        }
+}
+
+void GinkgoGauge::OnPaint(wxPaintEvent &event)
+{
+        wxBufferedPaintDC dc(this, m_bufferBitmap);
+        PrepareDC(dc);
+
+        dc.SetFont(GetFont());
+        dc.SetPen( wxPen( m_borderColour, 1, wxSOLID ) );
+        dc.SetBrush(wxColour(255,255,255));
+
+        int width = dc.GetSize().x;
+        int height = dc.GetSize().y;
+        wxRect cr(0,0, width, height);
+
+        dc.DrawRectangle(cr);
+
+        cr.width = (int) ( (float)width * m_progress );
+
+        dc.GradientFillLinear(cr, m_startColour, m_endColour, wxEAST);
+
+        wxRasterOperationMode func = dc.GetLogicalFunction();
+        dc.SetLogicalFunction(wxXOR);
+
+        wxCoord tx = 0, ty = 0;
+        wxString str = wxString::Format(wxT("%.00f%% "), 100.0f * m_progress) + m_status;
+        dc.GetTextExtent(str, &tx, &ty, NULL, NULL, NULL);
+
+
+        dc.DrawText(str, (width >> 1)  - (tx >> 1), (height >> 1) - (ty >> 1) );
+        dc.SetLogicalFunction(func);
+        event.Skip(false);
+}
+
+void GinkgoGauge::OnEraseBackground( wxEraseEvent&  )
+{
+}
+
+
+void GinkgoGauge::OnSize(wxSizeEvent& )
+{
+        RecreateBuffer();
+}
+
+void GinkgoGauge::SetMinSize(const wxSize &minSize)
+{
+        wxPanel::SetMinSize(minSize);
+        RecreateBuffer();
+}
+
+void GinkgoGauge::SetSize(const wxSize &minSize)
+{
+        wxPanel::SetSize(minSize);
+        RecreateBuffer();
+}
+
+void GinkgoGauge::SetColorSchema(TColorSchema schema)
+{
+        switch (schema) {
+        case TCS_BLUE:
+                m_fontColour = wxColour(0,0,0);
+                m_startColour = wxColour(224, 237, 255);
+                m_endColour = wxColour(119, 169, 255);
+                m_borderColour = wxColour(58, 143, 255);
+                break;
+        case TCS_RED:
+                m_fontColour = wxColour(0,0,0);
+                m_startColour = wxColour(255, 224, 237);
+                m_endColour = wxColour(255, 169, 119);
+                m_borderColour = wxColour(255, 0, 0);
+                break;
+        case TCS_GREY:
+                m_fontColour = wxColour(0,0,0);
+                m_startColour = wxColour(237, 237, 237);
+                m_endColour = wxColour(100, 100, 100);
+                m_borderColour = wxColour(143, 143, 143);
+                break;
+        case TCS_GREEN:
+                m_fontColour = wxColour(0,0,0);
+                m_startColour = wxColour(237, 255, 224);
+                m_endColour = wxColour(120, 198, 83);
+                m_borderColour = wxColour(143, 255, 58);
+                break;
+        }
+        SetForegroundColour(m_fontColour);
+}
+
+bool GinkgoGauge::RecreateBuffer(const wxSize& size)
+{
+        wxSize sz = size;
+        if (sz == wxDefaultSize)
+                sz = GetClientSize();
+
+        if (sz.x < 1 || sz.y < 1)
+                return false;
+
+        wxClientDC dc(this);
+        dc.SetFont(GetFont());
+        int height,width;
+        dc.GetTextExtent(wxT("000% "), &width, &height, NULL, NULL, NULL);
+        m_maxSizeOfText = sz.x - (width +15);
+        m_maxSizeOfText = std::max<int>(m_maxSizeOfText, 200);
+
+        if (!m_bufferBitmap.Ok() || m_bufferBitmap.GetWidth() < sz.x || m_bufferBitmap.GetHeight() < sz.y)
+                m_bufferBitmap = wxBitmap(sz.x, sz.y);
+
+        return m_bufferBitmap.Ok();
+}
+
+
+
diff --git a/cadxcore/wx/ginkgostyle/ginkgostyle.h b/cadxcore/wx/ginkgostyle/ginkgostyle.h
new file mode 100644
index 0000000..cb61072
--- /dev/null
+++ b/cadxcore/wx/ginkgostyle/ginkgostyle.h
@@ -0,0 +1,455 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/api.h>
+#include <wx/scrolwin.h>
+#include <wx/panel.h>
+#include <wx/bitmap.h>
+#include <wx/wxginkgotoolbar.h>
+
+class EXTAPI VerticalHeader : public wxPanel
+{
+public:
+        VerticalHeader(wxWindow *parent,
+                       wxWindowID winid = wxID_ANY,
+                       const wxPoint& pos = wxDefaultPosition,
+                       const wxSize& size = wxDefaultSize,
+                       long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+                       const wxString& titulo = wxEmptyString);
+        ~VerticalHeader();
+
+        virtual void SetToolTip(const wxString& tip);
+        virtual void SetTitle(const wxString& titulo);
+
+protected:
+        virtual void OnEraseBackground( wxEraseEvent& event );
+        virtual void OnPaint(wxPaintEvent &event);
+        virtual void OnSize(wxSizeEvent &event);
+
+        wxColour m_colorBorde;
+        wxColour m_colorSombraBorde;
+        wxColour m_colorTitulo;
+        wxColour m_colorTituloInactivo;
+        wxColour m_fondoTituloTopColor;
+        wxColour m_fondoTituloBottomColor;
+        wxString m_titulo;
+        wxFont m_fuente;
+        int m_AlturaCabecera;
+
+        int m_sizeBorder;
+};
+
+class EXTAPI HeaderPanelWithButton: public wxPanel
+{
+public:
+        HeaderPanelWithButton(wxWindow *parent,
+                              wxWindowID winid = wxID_ANY,
+                              const wxPoint& pos = wxDefaultPosition,
+                              const wxSize& size = wxDefaultSize,
+                              long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+                              const wxString& titulo = wxEmptyString);
+        ~HeaderPanelWithButton();
+
+        virtual void SetToolTip(const wxString& tip);
+        virtual void SetTitle(const wxString& titulo);
+        virtual void Realize();
+        wxGinkgoToolBar* GetButtonBar();
+
+protected:
+        wxColour m_barColor;
+        wxFont m_fontBar;
+        wxGinkgoToolBar* m_pTittleBar;
+        wxGinkgoToolBar* m_pButtonBar;
+};
+
+class EXTAPI SubHeaderPanelWithButton: public HeaderPanelWithButton
+{
+public:
+        SubHeaderPanelWithButton(wxWindow *parent,
+                                 wxWindowID winid = wxID_ANY,
+                                 const wxPoint& pos = wxDefaultPosition,
+                                 const wxSize& size = wxDefaultSize,
+                                 long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+                                 const wxString& titulo = wxT(""));
+        ~SubHeaderPanelWithButton();
+};
+
+class EXTAPI HeaderPanel: public wxPanel
+{
+public:
+        HeaderPanel(wxWindow *parent,
+                    wxWindowID winid = wxID_ANY,
+                    const wxPoint& pos = wxDefaultPosition,
+                    const wxSize& size = wxDefaultSize,
+                    long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+                    const wxString& titulo = wxT(""));
+        ~HeaderPanel();
+
+        virtual void SetSubtitle(const wxString& subtitle);
+
+        virtual void SetToolTip(const wxString& tip);
+        virtual void SetTitle(const wxString& titulo);
+
+        virtual bool Enable(bool enabled);
+
+        virtual void OnEraseBackground( wxEraseEvent& event );
+        virtual void OnPaint(wxPaintEvent &event);
+        virtual void OnSize(wxSizeEvent &event);
+
+protected:
+        wxColour m_colorBorde;
+        wxColour m_colorSombraBorde;
+        wxColour m_colorTitulo;
+        wxColour m_colorTituloInactivo;
+        wxColour m_fondoTituloTopColor;
+        wxColour m_fondoTituloBottomColor;
+        wxString m_titulo;
+        wxFont m_fuente;
+        int m_AlturaCabecera;
+
+        int m_sizeBorder;
+
+        wxBitmap m_bitmap;
+        wxString m_subtitle;
+        wxFont m_fuenteSubTitle;
+};
+
+
+
+
+class EXTAPI PanelScrollable: public wxScrolledWindow
+{
+public:
+        PanelScrollable(wxWindow *parent,
+                        wxWindowID winid = wxID_ANY,
+                        const wxPoint& pos = wxDefaultPosition,
+                        const wxSize& size = wxDefaultSize,
+                        long style = wxTAB_TRAVERSAL | wxNO_BORDER);
+        ~PanelScrollable();
+};
+
+
+class EXTAPI BodyPanel: public PanelScrollable
+{
+public:
+        BodyPanel(wxWindow *parent,
+                  wxWindowID winid = wxID_ANY,
+                  const wxPoint& pos = wxDefaultPosition,
+                  const wxSize& size = wxDefaultSize,
+                  long style = wxTAB_TRAVERSAL | wxNO_BORDER);
+        ~BodyPanel();
+
+        void SetSizer(wxSizer* sizer, bool deleteOld = true);
+
+protected:
+        int m_sizeBorderInterior;
+        wxColour m_colorFondo;
+};
+
+class EXTAPI BodyPanelSinScroll: public wxPanel
+{
+public:
+        BodyPanelSinScroll(wxWindow *parent,
+                           wxWindowID winid = wxID_ANY,
+                           const wxPoint& pos = wxDefaultPosition,
+                           const wxSize& size = wxDefaultSize,
+                           long style = wxTAB_TRAVERSAL | wxNO_BORDER);
+        ~BodyPanelSinScroll();
+
+        void SetSizer(wxSizer* sizer, bool deleteOld = true);
+
+protected:
+        int m_sizeBorderInterior;
+        wxColour m_colorFondo;
+};
+
+class EXTAPI FooterPanel: public wxPanel
+{
+public:
+        FooterPanel(wxWindow *parent,
+                    wxWindowID winid = wxID_ANY,
+                    const wxPoint& pos = wxDefaultPosition,
+                    const wxSize& size = wxDefaultSize,
+                    long style = wxTAB_TRAVERSAL | wxNO_BORDER);
+        ~FooterPanel();
+
+        void SetSizer(wxSizer* sizer, bool deleteOld = true);
+
+        virtual void OnEraseBackground( wxEraseEvent& event );
+        virtual void OnPaint(wxPaintEvent &event);
+
+protected:
+        int m_sizeBorderInterior;
+        wxColour m_colorBorde;
+        int m_sizeBorder;
+};
+
+class EXTAPI UnTitledPanel: public wxPanel
+{
+public:
+        UnTitledPanel(wxWindow *parent,
+                      wxWindowID winid = wxID_ANY,
+                      const wxPoint& pos = wxDefaultPosition,
+                      const wxSize& size = wxDefaultSize,
+                      long style = wxTAB_TRAVERSAL | wxNO_BORDER);
+        ~UnTitledPanel();
+
+        virtual void OnEraseBackground( wxEraseEvent& event );
+        virtual void OnPaint(wxPaintEvent &event);
+        virtual void OnSize(wxSizeEvent &event);
+
+        virtual void SetColorBorde(const wxColour& colorBorde);
+        virtual wxColour GetColorBorde();
+
+        virtual int GetSizeBorde();
+        virtual void SetSizeBorde(int size);
+
+        virtual int GetBorderInterior();
+        virtual void SetBorderInterior(int size);
+
+protected:
+        wxColour m_colorFondo;
+        wxColour m_colorBorde;
+        wxColour m_colorSombraBorde;
+        int m_sizeBorder;
+        int m_borderInterior;
+};
+
+
+class EXTAPI TitledPanel: public wxPanel
+{
+public:
+        TitledPanel(wxWindow *parent,
+                    wxWindowID winid = wxID_ANY,
+                    const wxPoint& pos = wxDefaultPosition,
+                    const wxSize& size = wxDefaultSize,
+                    long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+                    const wxString& titulo = wxT(""));
+        ~TitledPanel();
+        virtual void SetToolTip(const wxString& tip);
+        virtual void SetTitle(const wxString& titulo);
+
+        virtual bool Enable(bool enabled);
+
+        virtual void OnEraseBackground( wxEraseEvent& event );
+        virtual void OnPaint(wxPaintEvent &event);
+        virtual void OnSize(wxSizeEvent &event);
+
+        virtual void SetColorBorde(const wxColour& colorBorde);
+        virtual wxColour GetColorBorde();
+
+        virtual void SetColorTitulo(const wxColour& colorBorde);
+        virtual wxColour GetColorTitulo();
+
+        virtual int GetSizeBorde();
+        virtual void SetSizeBorde(int size);
+
+        virtual int GetBorderInterior();
+        virtual void SetBorderInterior(int size);
+
+        virtual bool SetBackgroundColour(const wxColour& colour);
+
+        virtual void Recoger(bool recoger = true);
+
+        virtual bool EstaRecogido();
+
+        virtual int GetGap();
+
+        void SetSizer(wxSizer* sizer, bool deleteOld = true);
+
+protected:
+        bool		m_recogido;
+        wxColour m_colorFondo;
+        wxColour m_colorBorde;
+        wxColour m_colorSombraBorde;
+        wxColour m_colorTitulo;
+        wxColour m_colorTituloInactivo;
+        wxColour m_fondoTituloTopColor;
+        wxColour m_fondoTituloBottomColor;
+        wxString m_titulo;
+        wxFont m_fuente;
+        int m_margenTitulo;
+        int m_sizeBorder;
+        int m_borderInterior;
+};
+
+class EXTAPI TitledPanelSinBorder: public TitledPanel
+{
+public:
+        TitledPanelSinBorder(wxWindow *parent,
+                             wxWindowID winid = wxID_ANY,
+                             const wxPoint& pos = wxDefaultPosition,
+                             const wxSize& size = wxDefaultSize,
+                             long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+                             const wxString& titulo = wxT(""));
+        ~TitledPanelSinBorder();
+};
+
+
+class EXTAPI TitledPanelSeparatorV: public wxPanel
+{
+public:
+        TitledPanelSeparatorV(wxWindow *parent,
+                              wxWindowID winid = wxID_ANY,
+                              const wxPoint& pos = wxDefaultPosition,
+                              const wxSize& size = wxDefaultSize,
+                              long style = wxNO_BORDER);
+        ~TitledPanelSeparatorV();
+
+protected:
+        int m_separacion;
+};
+
+class EXTAPI TitledPanelSeparatorH: public wxPanel
+{
+public:
+        TitledPanelSeparatorH(wxWindow *parent,
+                              wxWindowID winid = wxID_ANY,
+                              const wxPoint& pos = wxDefaultPosition,
+                              const wxSize& size = wxDefaultSize,
+                              long style = wxNO_BORDER);
+        ~TitledPanelSeparatorH();
+
+protected:
+        int m_separacion;
+};
+
+class EXTAPI SubTitledPanel: public TitledPanel
+{
+public:
+        SubTitledPanel(wxWindow *parent,
+                       wxWindowID winid = wxID_ANY,
+                       const wxPoint& pos = wxDefaultPosition,
+                       const wxSize& size = wxDefaultSize,
+                       long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+                       const wxString& titulo = wxT(""));
+        ~SubTitledPanel();
+};
+
+class EXTAPI SubTitledPanelSinBorder: public SubTitledPanel
+{
+public:
+        SubTitledPanelSinBorder(wxWindow *parent,
+                                wxWindowID winid = wxID_ANY,
+                                const wxPoint& pos = wxDefaultPosition,
+                                const wxSize& size = wxDefaultSize,
+                                long style = wxTAB_TRAVERSAL | wxNO_BORDER,
+                                const wxString& titulo = wxT(""));
+        ~SubTitledPanelSinBorder();
+};
+
+
+class EXTAPI SubTitledPanelSeparatorV: public wxPanel
+{
+public:
+        SubTitledPanelSeparatorV(wxWindow *parent,
+                                 wxWindowID winid = wxID_ANY,
+                                 const wxPoint& pos = wxDefaultPosition,
+                                 const wxSize& size = wxDefaultSize,
+                                 long style = wxTAB_TRAVERSAL | wxNO_BORDER);
+        ~SubTitledPanelSeparatorV();
+
+protected:
+        int m_separacion;
+};
+
+class EXTAPI SubTitledPanelSeparatorH: public wxPanel
+{
+public:
+        SubTitledPanelSeparatorH(wxWindow *parent,
+                                 wxWindowID winid = wxID_ANY,
+                                 const wxPoint& pos = wxDefaultPosition,
+                                 const wxSize& size = wxDefaultSize,
+                                 long style = wxTAB_TRAVERSAL | wxNO_BORDER);
+        ~SubTitledPanelSeparatorH();
+
+protected:
+        int m_separacion;
+};
+
+class EXTAPI GinkgoBoxPanel: public wxPanel
+{
+public:
+        GinkgoBoxPanel(wxWindow *parent,
+                       wxWindowID winid = wxID_ANY,
+                       const wxPoint& pos = wxDefaultPosition,
+                       const wxSize& size = wxDefaultSize,
+                       long style = wxTAB_TRAVERSAL | wxNO_BORDER);
+        ~GinkgoBoxPanel();
+protected:
+
+        virtual void OnPaint(wxPaintEvent &event);
+
+        wxColour m_backgroudColor;
+        wxColour m_borderColor;
+};
+
+
+class EXTAPI GinkgoGauge: public wxPanel
+{
+public:
+        typedef enum {
+                TCS_BLUE,
+                TCS_RED,
+                TCS_GREY,
+                TCS_GREEN
+        } TColorSchema;
+
+        GinkgoGauge(wxWindow *parent,
+                    wxWindowID winid = wxID_ANY,
+                    const wxPoint& pos = wxDefaultPosition,
+                    const wxSize& size = wxDefaultSize,
+                    long style = wxTAB_TRAVERSAL | wxNO_BORDER);
+        ~GinkgoGauge();
+
+        virtual void SetStatus(const wxString& status);
+        virtual wxString GetStatus();
+        virtual void SetProgress(float progress);
+        virtual float GetProgress();
+
+        virtual void SetMinSize(const wxSize &minSize);
+        virtual void SetSize(const wxSize &minSize);
+
+        virtual void SetColorSchema(TColorSchema schema);
+
+protected:
+
+        virtual void OnPaint(wxPaintEvent &event);
+        virtual void OnEraseBackground( wxEraseEvent& event );
+        virtual void OnSize(wxSizeEvent& event);
+        virtual bool RecreateBuffer(const wxSize& size = wxDefaultSize);
+        virtual void OnIdle(wxIdleEvent &WXUNUSED(event));
+
+
+        wxString m_status;
+        float m_progress;
+        int m_maxSizeOfText;
+        bool m_dirty;
+
+        /// Buffer bitmap
+        wxBitmap                m_bufferBitmap;
+        wxColour						m_fontColour;
+        wxColour						m_startColour;
+        wxColour						m_endColour;
+        wxColour						m_borderColour;
+};
+
+
diff --git a/cadxcore/wx/gnkinforme/GNK_Informe.fbp b/cadxcore/wx/gnkinforme/GNK_Informe.fbp
new file mode 100644
index 0000000..92569c1
--- /dev/null
+++ b/cadxcore/wx/gnkinforme/GNK_Informe.fbp
@@ -0,0 +1,1077 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="10" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">gnkinformebasewx</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">GNK_Informe</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Panel" expanded="1">
+            <property name="bg">240,240,240</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size"></property>
+            <property name="name">GNKInformeBaseWx</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass">wxScrolledWindow; wx/scrolwin.h</property>
+            <property name="tooltip"></property>
+            <property name="validator_data_type"></property>
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer1</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size">669,-1</property>
+                        <property name="minimum_size">669,-1</property>
+                        <property name="name">m_pPanelReport</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size">669,-1</property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer2</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="bg">90,90,90</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="font"></property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_panel21</property>
+                                    <property name="permission">protected</property>
+                                    <property name="pos"></property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="1">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer19</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
+                                            <property name="proportion">0</property>
+                                            <object class="wxGridBagSizer" expanded="1">
+                                                <property name="empty_cell_size"></property>
+                                                <property name="flexible_direction">wxBOTH</property>
+                                                <property name="growablecols">0</property>
+                                                <property name="growablerows">0</property>
+                                                <property name="hgap">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">gbSizer1</property>
+                                                <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                <property name="permission">none</property>
+                                                <property name="vgap">0</property>
+                                                <object class="gbsizeritem" expanded="0">
+                                                    <property name="border">3</property>
+                                                    <property name="colspan">1</property>
+                                                    <property name="column">0</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="row">0</property>
+                                                    <property name="rowspan">1</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="bg"></property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg">255,255,255</property>
+                                                        <property name="font">,90,90,13,70,0</property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">NAME SURNAME SECOND_SURNAME</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pNombrePaciente</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="gbsizeritem" expanded="0">
+                                                    <property name="border">5</property>
+                                                    <property name="colspan">1</property>
+                                                    <property name="column">2</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="row">0</property>
+                                                    <property name="rowspan">2</property>
+                                                    <object class="wxStaticBitmap" expanded="0">
+                                                        <property name="bg"></property>
+                                                        <property name="bitmap"></property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg"></property>
+                                                        <property name="font"></property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pBitmapSexo</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                                <object class="gbsizeritem" expanded="0">
+                                                    <property name="border">3</property>
+                                                    <property name="colspan">1</property>
+                                                    <property name="column">0</property>
+                                                    <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                    <property name="row">1</property>
+                                                    <property name="rowspan">1</property>
+                                                    <object class="wxStaticText" expanded="0">
+                                                        <property name="bg"></property>
+                                                        <property name="context_help"></property>
+                                                        <property name="context_menu">1</property>
+                                                        <property name="enabled">1</property>
+                                                        <property name="fg">255,255,255</property>
+                                                        <property name="font"></property>
+                                                        <property name="hidden">0</property>
+                                                        <property name="id">wxID_ANY</property>
+                                                        <property name="label">644654645</property>
+                                                        <property name="maximum_size"></property>
+                                                        <property name="minimum_size"></property>
+                                                        <property name="name">m_pIdPaciente</property>
+                                                        <property name="permission">protected</property>
+                                                        <property name="pos"></property>
+                                                        <property name="size"></property>
+                                                        <property name="style"></property>
+                                                        <property name="subclass"></property>
+                                                        <property name="tooltip"></property>
+                                                        <property name="validator_data_type"></property>
+                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                        <property name="validator_variable"></property>
+                                                        <property name="window_extra_style"></property>
+                                                        <property name="window_name"></property>
+                                                        <property name="window_style"></property>
+                                                        <property name="wrap">-1</property>
+                                                        <event name="OnChar"></event>
+                                                        <event name="OnEnterWindow"></event>
+                                                        <event name="OnEraseBackground"></event>
+                                                        <event name="OnKeyDown"></event>
+                                                        <event name="OnKeyUp"></event>
+                                                        <event name="OnKillFocus"></event>
+                                                        <event name="OnLeaveWindow"></event>
+                                                        <event name="OnLeftDClick"></event>
+                                                        <event name="OnLeftDown"></event>
+                                                        <event name="OnLeftUp"></event>
+                                                        <event name="OnMiddleDClick"></event>
+                                                        <event name="OnMiddleDown"></event>
+                                                        <event name="OnMiddleUp"></event>
+                                                        <event name="OnMotion"></event>
+                                                        <event name="OnMouseEvents"></event>
+                                                        <event name="OnMouseWheel"></event>
+                                                        <event name="OnPaint"></event>
+                                                        <event name="OnRightDClick"></event>
+                                                        <event name="OnRightDown"></event>
+                                                        <event name="OnRightUp"></event>
+                                                        <event name="OnSetFocus"></event>
+                                                        <event name="OnSize"></event>
+                                                        <event name="OnUpdateUI"></event>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                        <object class="sizeritem" expanded="1">
+                                            <property name="border">2</property>
+                                            <property name="flag">wxEXPAND|wxALL</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxPanel" expanded="1">
+                                                <property name="bg"></property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="font"></property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minimum_size"></property>
+                                                <property name="name">m_pPanelCuerpo</property>
+                                                <property name="permission">protected</property>
+                                                <property name="pos"></property>
+                                                <property name="size"></property>
+                                                <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                                <object class="wxBoxSizer" expanded="1">
+                                                    <property name="minimum_size"></property>
+                                                    <property name="name">pSizerCuerpo</property>
+                                                    <property name="orient">wxVERTICAL</property>
+                                                    <property name="permission">none</property>
+                                                    <object class="sizeritem" expanded="1">
+                                                        <property name="border">1</property>
+                                                        <property name="flag">wxEXPAND</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxPanel" expanded="1">
+                                                            <property name="bg"></property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="font"></property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_pPanelDatosDemograficos</property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pos"></property>
+                                                            <property name="size"></property>
+                                                            <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                                            <property name="tooltip">Demographic data</property>
+                                                            <property name="validator_data_type"></property>
+                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                            <property name="validator_variable"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                            <object class="wxBoxSizer" expanded="1">
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">bSizer20</property>
+                                                                <property name="orient">wxVERTICAL</property>
+                                                                <property name="permission">none</property>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">5</property>
+                                                                    <property name="flag">wxLEFT</property>
+                                                                    <property name="proportion">1</property>
+                                                                    <object class="wxFlexGridSizer" expanded="0">
+                                                                        <property name="cols">2</property>
+                                                                        <property name="flexible_direction">wxBOTH</property>
+                                                                        <property name="growablecols">0</property>
+                                                                        <property name="growablerows"></property>
+                                                                        <property name="hgap">0</property>
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">m_pSizerDatosDemograficos</property>
+                                                                        <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                                                        <property name="permission">protected</property>
+                                                                        <property name="rows">2</property>
+                                                                        <property name="vgap">0</property>
+                                                                    </object>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxEXPAND</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxPanel" expanded="0">
+                                                            <property name="bg"></property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="font"></property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_panel22</property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pos"></property>
+                                                            <property name="size"></property>
+                                                            <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="validator_data_type"></property>
+                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                            <property name="validator_variable"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">3</property>
+                                                        <property name="flag">wxEXPAND</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxBoxSizer" expanded="0">
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_pSizerCustom</property>
+                                                            <property name="orient">wxVERTICAL</property>
+                                                            <property name="permission">protected</property>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="1">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxEXPAND</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxPanel" expanded="1">
+                                                            <property name="bg"></property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="font"></property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_pPanelComentarios</property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pos"></property>
+                                                            <property name="size"></property>
+                                                            <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                                            <property name="tooltip">Comments</property>
+                                                            <property name="validator_data_type"></property>
+                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                            <property name="validator_variable"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                            <object class="wxBoxSizer" expanded="1">
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">pSizerComments</property>
+                                                                <property name="orient">wxVERTICAL</property>
+                                                                <property name="permission">none</property>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">10</property>
+                                                                    <property name="flag">wxEXPAND|wxALL</property>
+                                                                    <property name="proportion">0</property>
+                                                                    <object class="wxTextCtrl" expanded="0">
+                                                                        <property name="bg"></property>
+                                                                        <property name="context_help"></property>
+                                                                        <property name="context_menu">1</property>
+                                                                        <property name="enabled">1</property>
+                                                                        <property name="fg"></property>
+                                                                        <property name="font"></property>
+                                                                        <property name="hidden">0</property>
+                                                                        <property name="id">wxID_ANY</property>
+                                                                        <property name="maximum_size"></property>
+                                                                        <property name="maxlength">0</property>
+                                                                        <property name="minimum_size">-1,60</property>
+                                                                        <property name="name">m_pComentarios</property>
+                                                                        <property name="permission">protected</property>
+                                                                        <property name="pos"></property>
+                                                                        <property name="size"></property>
+                                                                        <property name="style">wxTE_MULTILINE</property>
+                                                                        <property name="subclass"></property>
+                                                                        <property name="tooltip"></property>
+                                                                        <property name="validator_data_type"></property>
+                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                        <property name="validator_variable"></property>
+                                                                        <property name="value"></property>
+                                                                        <property name="window_extra_style"></property>
+                                                                        <property name="window_name"></property>
+                                                                        <property name="window_style"></property>
+                                                                        <event name="OnChar"></event>
+                                                                        <event name="OnEnterWindow"></event>
+                                                                        <event name="OnEraseBackground"></event>
+                                                                        <event name="OnKeyDown"></event>
+                                                                        <event name="OnKeyUp"></event>
+                                                                        <event name="OnKillFocus"></event>
+                                                                        <event name="OnLeaveWindow"></event>
+                                                                        <event name="OnLeftDClick"></event>
+                                                                        <event name="OnLeftDown"></event>
+                                                                        <event name="OnLeftUp"></event>
+                                                                        <event name="OnMiddleDClick"></event>
+                                                                        <event name="OnMiddleDown"></event>
+                                                                        <event name="OnMiddleUp"></event>
+                                                                        <event name="OnMotion"></event>
+                                                                        <event name="OnMouseEvents"></event>
+                                                                        <event name="OnMouseWheel"></event>
+                                                                        <event name="OnPaint"></event>
+                                                                        <event name="OnRightDClick"></event>
+                                                                        <event name="OnRightDown"></event>
+                                                                        <event name="OnRightUp"></event>
+                                                                        <event name="OnSetFocus"></event>
+                                                                        <event name="OnSize"></event>
+                                                                        <event name="OnText">OnComentariosText</event>
+                                                                        <event name="OnTextEnter"></event>
+                                                                        <event name="OnTextMaxLen"></event>
+                                                                        <event name="OnTextURL"></event>
+                                                                        <event name="OnUpdateUI"></event>
+                                                                    </object>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="0">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxEXPAND</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxPanel" expanded="0">
+                                                            <property name="bg"></property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="font"></property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_panel221</property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pos"></property>
+                                                            <property name="size"></property>
+                                                            <property name="subclass">SubTitledPanelSeparatorV; wx/ginkgostyle/ginkgostyle.h</property>
+                                                            <property name="tooltip"></property>
+                                                            <property name="validator_data_type"></property>
+                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                            <property name="validator_variable"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                        </object>
+                                                    </object>
+                                                    <object class="sizeritem" expanded="1">
+                                                        <property name="border">5</property>
+                                                        <property name="flag">wxEXPAND</property>
+                                                        <property name="proportion">0</property>
+                                                        <object class="wxPanel" expanded="1">
+                                                            <property name="bg"></property>
+                                                            <property name="context_help"></property>
+                                                            <property name="context_menu">1</property>
+                                                            <property name="enabled">1</property>
+                                                            <property name="fg"></property>
+                                                            <property name="font"></property>
+                                                            <property name="hidden">0</property>
+                                                            <property name="id">wxID_ANY</property>
+                                                            <property name="maximum_size"></property>
+                                                            <property name="minimum_size"></property>
+                                                            <property name="name">m_pPanelConsolidar</property>
+                                                            <property name="permission">protected</property>
+                                                            <property name="pos"></property>
+                                                            <property name="size"></property>
+                                                            <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                                            <property name="tooltip">Commit inform</property>
+                                                            <property name="validator_data_type"></property>
+                                                            <property name="validator_style">wxFILTER_NONE</property>
+                                                            <property name="validator_type">wxDefaultValidator</property>
+                                                            <property name="validator_variable"></property>
+                                                            <property name="window_extra_style"></property>
+                                                            <property name="window_name"></property>
+                                                            <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                            <event name="OnChar"></event>
+                                                            <event name="OnEnterWindow"></event>
+                                                            <event name="OnEraseBackground"></event>
+                                                            <event name="OnKeyDown"></event>
+                                                            <event name="OnKeyUp"></event>
+                                                            <event name="OnKillFocus"></event>
+                                                            <event name="OnLeaveWindow"></event>
+                                                            <event name="OnLeftDClick"></event>
+                                                            <event name="OnLeftDown"></event>
+                                                            <event name="OnLeftUp"></event>
+                                                            <event name="OnMiddleDClick"></event>
+                                                            <event name="OnMiddleDown"></event>
+                                                            <event name="OnMiddleUp"></event>
+                                                            <event name="OnMotion"></event>
+                                                            <event name="OnMouseEvents"></event>
+                                                            <event name="OnMouseWheel"></event>
+                                                            <event name="OnPaint"></event>
+                                                            <event name="OnRightDClick"></event>
+                                                            <event name="OnRightDown"></event>
+                                                            <event name="OnRightUp"></event>
+                                                            <event name="OnSetFocus"></event>
+                                                            <event name="OnSize"></event>
+                                                            <event name="OnUpdateUI"></event>
+                                                            <object class="wxBoxSizer" expanded="1">
+                                                                <property name="minimum_size"></property>
+                                                                <property name="name">pSizerComments1</property>
+                                                                <property name="orient">wxVERTICAL</property>
+                                                                <property name="permission">none</property>
+                                                                <object class="sizeritem" expanded="0">
+                                                                    <property name="border">10</property>
+                                                                    <property name="flag">wxEXPAND|wxALL</property>
+                                                                    <property name="proportion">0</property>
+                                                                    <object class="wxListCtrl" expanded="0">
+                                                                        <property name="bg"></property>
+                                                                        <property name="context_help"></property>
+                                                                        <property name="context_menu">1</property>
+                                                                        <property name="enabled">1</property>
+                                                                        <property name="fg"></property>
+                                                                        <property name="font"></property>
+                                                                        <property name="hidden">0</property>
+                                                                        <property name="id">wxID_ANY</property>
+                                                                        <property name="maximum_size"></property>
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">m_pListaConsolidaciones</property>
+                                                                        <property name="permission">protected</property>
+                                                                        <property name="pos"></property>
+                                                                        <property name="size"></property>
+                                                                        <property name="style">wxLC_HRULES|wxLC_REPORT</property>
+                                                                        <property name="subclass"></property>
+                                                                        <property name="tooltip"></property>
+                                                                        <property name="validator_data_type"></property>
+                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                        <property name="validator_variable"></property>
+                                                                        <property name="window_extra_style"></property>
+                                                                        <property name="window_name"></property>
+                                                                        <property name="window_style"></property>
+                                                                        <event name="OnChar"></event>
+                                                                        <event name="OnEnterWindow"></event>
+                                                                        <event name="OnEraseBackground"></event>
+                                                                        <event name="OnKeyDown"></event>
+                                                                        <event name="OnKeyUp"></event>
+                                                                        <event name="OnKillFocus"></event>
+                                                                        <event name="OnLeaveWindow"></event>
+                                                                        <event name="OnLeftDClick"></event>
+                                                                        <event name="OnLeftDown"></event>
+                                                                        <event name="OnLeftUp"></event>
+                                                                        <event name="OnListBeginDrag"></event>
+                                                                        <event name="OnListBeginLabelEdit"></event>
+                                                                        <event name="OnListBeginRDrag"></event>
+                                                                        <event name="OnListCacheHint"></event>
+                                                                        <event name="OnListColBeginDrag"></event>
+                                                                        <event name="OnListColClick"></event>
+                                                                        <event name="OnListColDragging"></event>
+                                                                        <event name="OnListColEndDrag"></event>
+                                                                        <event name="OnListColRightClick"></event>
+                                                                        <event name="OnListDeleteAllItems"></event>
+                                                                        <event name="OnListDeleteItem"></event>
+                                                                        <event name="OnListEndLabelEdit"></event>
+                                                                        <event name="OnListInsertItem"></event>
+                                                                        <event name="OnListItemActivated"></event>
+                                                                        <event name="OnListItemDeselected"></event>
+                                                                        <event name="OnListItemFocused"></event>
+                                                                        <event name="OnListItemMiddleClick"></event>
+                                                                        <event name="OnListItemRightClick"></event>
+                                                                        <event name="OnListItemSelected"></event>
+                                                                        <event name="OnListKeyDown"></event>
+                                                                        <event name="OnMiddleDClick"></event>
+                                                                        <event name="OnMiddleDown"></event>
+                                                                        <event name="OnMiddleUp"></event>
+                                                                        <event name="OnMotion"></event>
+                                                                        <event name="OnMouseEvents"></event>
+                                                                        <event name="OnMouseWheel"></event>
+                                                                        <event name="OnPaint"></event>
+                                                                        <event name="OnRightDClick"></event>
+                                                                        <event name="OnRightDown"></event>
+                                                                        <event name="OnRightUp"></event>
+                                                                        <event name="OnSetFocus"></event>
+                                                                        <event name="OnSize"></event>
+                                                                        <event name="OnUpdateUI"></event>
+                                                                    </object>
+                                                                </object>
+                                                                <object class="sizeritem" expanded="1">
+                                                                    <property name="border">0</property>
+                                                                    <property name="flag">wxEXPAND | wxALL</property>
+                                                                    <property name="proportion">0</property>
+                                                                    <object class="wxPanel" expanded="1">
+                                                                        <property name="bg"></property>
+                                                                        <property name="context_help"></property>
+                                                                        <property name="context_menu">1</property>
+                                                                        <property name="enabled">1</property>
+                                                                        <property name="fg"></property>
+                                                                        <property name="font"></property>
+                                                                        <property name="hidden">0</property>
+                                                                        <property name="id">wxID_ANY</property>
+                                                                        <property name="maximum_size"></property>
+                                                                        <property name="minimum_size"></property>
+                                                                        <property name="name">m_pPanelBoton</property>
+                                                                        <property name="permission">protected</property>
+                                                                        <property name="pos"></property>
+                                                                        <property name="size"></property>
+                                                                        <property name="subclass"></property>
+                                                                        <property name="tooltip"></property>
+                                                                        <property name="validator_data_type"></property>
+                                                                        <property name="validator_style">wxFILTER_NONE</property>
+                                                                        <property name="validator_type">wxDefaultValidator</property>
+                                                                        <property name="validator_variable"></property>
+                                                                        <property name="window_extra_style"></property>
+                                                                        <property name="window_name"></property>
+                                                                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                                                                        <event name="OnChar"></event>
+                                                                        <event name="OnEnterWindow"></event>
+                                                                        <event name="OnEraseBackground"></event>
+                                                                        <event name="OnKeyDown"></event>
+                                                                        <event name="OnKeyUp"></event>
+                                                                        <event name="OnKillFocus"></event>
+                                                                        <event name="OnLeaveWindow"></event>
+                                                                        <event name="OnLeftDClick"></event>
+                                                                        <event name="OnLeftDown"></event>
+                                                                        <event name="OnLeftUp"></event>
+                                                                        <event name="OnMiddleDClick"></event>
+                                                                        <event name="OnMiddleDown"></event>
+                                                                        <event name="OnMiddleUp"></event>
+                                                                        <event name="OnMotion"></event>
+                                                                        <event name="OnMouseEvents"></event>
+                                                                        <event name="OnMouseWheel"></event>
+                                                                        <event name="OnPaint"></event>
+                                                                        <event name="OnRightDClick"></event>
+                                                                        <event name="OnRightDown"></event>
+                                                                        <event name="OnRightUp"></event>
+                                                                        <event name="OnSetFocus"></event>
+                                                                        <event name="OnSize"></event>
+                                                                        <event name="OnUpdateUI"></event>
+                                                                        <object class="wxBoxSizer" expanded="1">
+                                                                            <property name="minimum_size"></property>
+                                                                            <property name="name">bSizer43</property>
+                                                                            <property name="orient">wxHORIZONTAL</property>
+                                                                            <property name="permission">none</property>
+                                                                            <object class="sizeritem" expanded="0">
+                                                                                <property name="border">5</property>
+                                                                                <property name="flag">wxEXPAND</property>
+                                                                                <property name="proportion">1</property>
+                                                                                <object class="spacer" expanded="0">
+                                                                                    <property name="height">0</property>
+                                                                                    <property name="permission">protected</property>
+                                                                                    <property name="width">0</property>
+                                                                                </object>
+                                                                            </object>
+                                                                            <object class="sizeritem" expanded="0">
+                                                                                <property name="border">5</property>
+                                                                                <property name="flag">wxALL|wxALIGN_CENTER_VERTICAL</property>
+                                                                                <property name="proportion">0</property>
+                                                                                <object class="wxStaticText" expanded="0">
+                                                                                    <property name="bg"></property>
+                                                                                    <property name="context_help"></property>
+                                                                                    <property name="context_menu">1</property>
+                                                                                    <property name="enabled">1</property>
+                                                                                    <property name="fg"></property>
+                                                                                    <property name="font">,90,92,-1,70,0</property>
+                                                                                    <property name="hidden">0</property>
+                                                                                    <property name="id">wxID_ANY</property>
+                                                                                    <property name="label">Commited</property>
+                                                                                    <property name="maximum_size"></property>
+                                                                                    <property name="minimum_size"></property>
+                                                                                    <property name="name">m_pLabelStatus</property>
+                                                                                    <property name="permission">protected</property>
+                                                                                    <property name="pos"></property>
+                                                                                    <property name="size"></property>
+                                                                                    <property name="style"></property>
+                                                                                    <property name="subclass"></property>
+                                                                                    <property name="tooltip"></property>
+                                                                                    <property name="validator_data_type"></property>
+                                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                                    <property name="validator_variable"></property>
+                                                                                    <property name="window_extra_style"></property>
+                                                                                    <property name="window_name"></property>
+                                                                                    <property name="window_style"></property>
+                                                                                    <property name="wrap">-1</property>
+                                                                                    <event name="OnChar"></event>
+                                                                                    <event name="OnEnterWindow"></event>
+                                                                                    <event name="OnEraseBackground"></event>
+                                                                                    <event name="OnKeyDown"></event>
+                                                                                    <event name="OnKeyUp"></event>
+                                                                                    <event name="OnKillFocus"></event>
+                                                                                    <event name="OnLeaveWindow"></event>
+                                                                                    <event name="OnLeftDClick"></event>
+                                                                                    <event name="OnLeftDown"></event>
+                                                                                    <event name="OnLeftUp"></event>
+                                                                                    <event name="OnMiddleDClick"></event>
+                                                                                    <event name="OnMiddleDown"></event>
+                                                                                    <event name="OnMiddleUp"></event>
+                                                                                    <event name="OnMotion"></event>
+                                                                                    <event name="OnMouseEvents"></event>
+                                                                                    <event name="OnMouseWheel"></event>
+                                                                                    <event name="OnPaint"></event>
+                                                                                    <event name="OnRightDClick"></event>
+                                                                                    <event name="OnRightDown"></event>
+                                                                                    <event name="OnRightUp"></event>
+                                                                                    <event name="OnSetFocus"></event>
+                                                                                    <event name="OnSize"></event>
+                                                                                    <event name="OnUpdateUI"></event>
+                                                                                </object>
+                                                                            </object>
+                                                                            <object class="sizeritem" expanded="0">
+                                                                                <property name="border">5</property>
+                                                                                <property name="flag">wxALL</property>
+                                                                                <property name="proportion">0</property>
+                                                                                <object class="wxButton" expanded="0">
+                                                                                    <property name="bg"></property>
+                                                                                    <property name="context_help"></property>
+                                                                                    <property name="context_menu">1</property>
+                                                                                    <property name="default">0</property>
+                                                                                    <property name="enabled">1</property>
+                                                                                    <property name="fg"></property>
+                                                                                    <property name="font"></property>
+                                                                                    <property name="hidden">0</property>
+                                                                                    <property name="id">wxID_ANY</property>
+                                                                                    <property name="label">Commit inform</property>
+                                                                                    <property name="maximum_size"></property>
+                                                                                    <property name="minimum_size"></property>
+                                                                                    <property name="name">m_pBConsolidar</property>
+                                                                                    <property name="permission">protected</property>
+                                                                                    <property name="pos"></property>
+                                                                                    <property name="size"></property>
+                                                                                    <property name="style">wxBU_EXACTFIT</property>
+                                                                                    <property name="subclass"></property>
+                                                                                    <property name="tooltip"></property>
+                                                                                    <property name="validator_data_type"></property>
+                                                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                                                    <property name="validator_variable"></property>
+                                                                                    <property name="window_extra_style"></property>
+                                                                                    <property name="window_name"></property>
+                                                                                    <property name="window_style"></property>
+                                                                                    <event name="OnButtonClick">OnConsolidarClick</event>
+                                                                                    <event name="OnChar"></event>
+                                                                                    <event name="OnEnterWindow"></event>
+                                                                                    <event name="OnEraseBackground"></event>
+                                                                                    <event name="OnKeyDown"></event>
+                                                                                    <event name="OnKeyUp"></event>
+                                                                                    <event name="OnKillFocus"></event>
+                                                                                    <event name="OnLeaveWindow"></event>
+                                                                                    <event name="OnLeftDClick"></event>
+                                                                                    <event name="OnLeftDown"></event>
+                                                                                    <event name="OnLeftUp"></event>
+                                                                                    <event name="OnMiddleDClick"></event>
+                                                                                    <event name="OnMiddleDown"></event>
+                                                                                    <event name="OnMiddleUp"></event>
+                                                                                    <event name="OnMotion"></event>
+                                                                                    <event name="OnMouseEvents"></event>
+                                                                                    <event name="OnMouseWheel"></event>
+                                                                                    <event name="OnPaint"></event>
+                                                                                    <event name="OnRightDClick"></event>
+                                                                                    <event name="OnRightDown"></event>
+                                                                                    <event name="OnRightUp"></event>
+                                                                                    <event name="OnSetFocus"></event>
+                                                                                    <event name="OnSize"></event>
+                                                                                    <event name="OnUpdateUI"></event>
+                                                                                </object>
+                                                                            </object>
+                                                                        </object>
+                                                                    </object>
+                                                                </object>
+                                                            </object>
+                                                        </object>
+                                                    </object>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/wx/gnkinforme/gnkinformebase.cpp b/cadxcore/wx/gnkinforme/gnkinformebase.cpp
new file mode 100644
index 0000000..010206b
--- /dev/null
+++ b/cadxcore/wx/gnkinforme/gnkinformebase.cpp
@@ -0,0 +1,295 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <sstream>
+
+#include <wx/tokenzr.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include "gnkinformebase.h"
+
+#include <api/dicom/idicommanager.h>
+#include <api/internationalization/internationalization.h>
+
+#include <main/controllers/pacscontroller.h>
+#include <main/controllers/controladorvistas.h>
+#include <main/controllers/controladoreventos.h>
+
+#include <export/tagsprivadoscomunes.h>
+
+#include <resources/ginkgoresourcesmanager.h>
+
+#define COL_MEDICO 0
+#define COL_FECHA 1
+
+namespace GNC
+{
+namespace GUI
+{
+GnkInformeBase::GnkInformeBase( wxWindow* parent):GNKInformeBaseWx(parent)
+{
+        m_pListaConsolidaciones->InsertColumn(COL_MEDICO,_("Physician"),wxLIST_FORMAT_LEFT);
+        m_pListaConsolidaciones->InsertColumn(COL_FECHA,_("Commit date"),wxLIST_FORMAT_LEFT);
+        this->SetScrollRate( 5, 5 );
+        m_cadenaConsolidaciones = "";
+        m_estado = NO_INICIALIZADO;
+        ActualizarEstado(NO_EXISTE);
+        m_pPanelCuerpo->SetScrollRate(0,0);
+}
+
+GnkInformeBase::~GnkInformeBase()
+{
+        ;
+}
+
+void GnkInformeBase::CargarInforme(const std::string& pathFicheroInforme)
+{
+        GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> pTagsPrivados = new GIL::DICOM::TipoPrivateTags(UID_TAGS_PRIVADOS_INFORME);
+        GNC::GCS::Ptr<GIL::DICOM::DicomDataset> pBase = new GIL::DICOM::DicomDataset;
+        GIL::DICOM::IDICOMManager* pDicomManager = GIL::DICOM::PACSController::Instance()->CrearInstanciaDeDICOMManager();
+        if(pDicomManager->CargarFichero(pathFicheroInforme,*pBase)) {
+                pDicomManager->CargarTagsPrivados(*pTagsPrivados);
+                SetTags(pBase,pTagsPrivados);
+                m_pathInforme = pathFicheroInforme;
+                ActualizarEstado(ALMACENADO);
+        }
+        GIL::DICOM::PACSController::Instance()->LiberarInstanciaDeDICOMManager(pDicomManager);
+}
+
+void GnkInformeBase::SetTags(GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& pBase, GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> pTagsPrivadosComunes)
+{
+        if(pBase.IsValid()) {
+                //titulo...
+                GIL::DICOM::DicomDataset& base = (*pBase);
+                std::string tag;
+                //nombre paciente
+                {
+                        std::ostringstream os;
+                        if(base.getTag("0010|0010",tag)) {
+                                m_pNombrePaciente->SetLabel(wxString::FromUTF8(tag.c_str()).Upper());
+                        } else {
+                                m_pNombrePaciente->SetLabel(wxString(_("UNKNOW")).Upper());
+                        }
+
+                        if(base.getTag(std::string("0010|0020"),tag)) { //id del paciente
+                                m_pIdPaciente->SetLabel(wxString::FromUTF8(tag.c_str()));
+                        } else {
+                                m_pIdPaciente->SetLabel(_("<unknown ID>"));
+                        }
+                }
+                //sexo
+                if(base.getTag(std::string("0010|0040"),tag)) { //sexo
+                        if(tag.compare("M")==0) {
+                                m_pBitmapSexo->SetBitmap(GinkgoResourcesManager::History::GetIcoHombre());
+                        } else if(tag.compare("F")==0) {
+                                m_pBitmapSexo->SetBitmap(GinkgoResourcesManager::History::GetIcoMujer());
+                        } else if(tag.compare("O")==0) {
+                                m_pBitmapSexo->SetBitmap(GinkgoResourcesManager::History::GetIcoOtro());
+                        } else {
+                                m_pBitmapSexo->SetBitmap(GinkgoResourcesManager::History::GetIcoOtro());
+                        }
+                } else {
+                        m_pBitmapSexo->SetBitmap(GinkgoResourcesManager::History::GetIcoOtro());
+                }
+
+                //datos demograficos
+                TListaDatosDemograficos listaDatosDemograficos;
+
+                if(base.getTag("0010|1010",tag) && tag != "") { // edad
+                        listaDatosDemograficos.push_back(TDatoDemografico(_Std("Age"),tag));
+                }
+
+                if(base.getTag("0010|0030",tag)) {//fecha nacimiento
+                        wxDateTime fecha;
+                        fecha.ParseFormat(wxString::FromUTF8(tag.c_str()),wxT("%Y%m%d"));
+                        if(fecha.IsValid()) {
+                                listaDatosDemograficos.push_back(TDatoDemografico(_Std("Birth date") , std::string(fecha.Format(_("%m/%d/%Y")).ToUTF8())));
+                        }
+                }
+                if(base.getTag("0010|1020",tag) && tag != "") {//altura
+                        listaDatosDemograficos.push_back(TDatoDemografico(_Std("Height"),tag+" cm"));
+                }
+                if(base.getTag("0010|1030",tag) && tag != "") { //peso
+                        listaDatosDemograficos.push_back(TDatoDemografico(_Std("Weight"),tag+" kg"));
+                }
+
+                AddDatosDemograficos(listaDatosDemograficos);
+        }
+
+        //datos del informe
+        if(pTagsPrivadosComunes.IsValid()) {
+                if(pTagsPrivadosComunes->UIDModulo == UID_TAGS_PRIVADOS_INFORME) {
+                        std::string tmp;
+                        if(pTagsPrivadosComunes->GetTag((char)TAG_LISTA_COMENTARIOS,tmp))	{
+                                m_comentarios = tmp;
+                                m_pComentarios->SetLabel(wxString::FromUTF8(tmp.c_str()));
+                        }
+                        if(pTagsPrivadosComunes->GetTag((char)TAG_LISTA_COMPROMISOS,tmp)) {
+                                m_cadenaConsolidaciones = tmp;
+                                wxStringTokenizer tkzLinea(wxString::FromUTF8(tmp.c_str()), wxT("\n"));
+                                while ( tkzLinea.HasMoreTokens() ) {
+                                        wxString linea = tkzLinea.GetNextToken();
+                                        wxStringTokenizer tkzClaveValor(linea,wxT("\t"));
+                                        if ( tkzClaveValor.HasMoreTokens() ) {
+                                                wxString medico = tkzClaveValor.GetNextToken();
+                                                if(tkzClaveValor.HasMoreTokens()) {
+                                                        wxString fecha = tkzClaveValor.GetNextToken();
+                                                        long fila = m_pListaConsolidaciones->InsertItem(m_pListaConsolidaciones->GetItemCount(),medico);
+                                                        m_pListaConsolidaciones->SetItem(fila,COL_FECHA,fecha);
+                                                }
+                                        }
+                                }
+                        }
+                }
+        }
+
+        m_pListaConsolidaciones->SetColumnWidth(COL_MEDICO,300);
+        m_pListaConsolidaciones->SetColumnWidth(COL_FECHA,200);
+        m_pPanelReport->Layout();
+        Layout();
+}
+
+void GnkInformeBase::OnConsolidarClick(wxCommandEvent& /*event*/)
+{
+        OnConsolidar();
+}
+
+void GnkInformeBase::ConsolidarComun(GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags>& tagsPrivadosComunes, const std::string& medico )
+{
+        tagsPrivadosComunes->UIDModulo = UID_TAGS_PRIVADOS_INFORME;
+        //comentarios
+        std::string comentarios(m_pComentarios->GetValue().ToUTF8());
+        tagsPrivadosComunes->SetTag((char)TAG_LISTA_COMENTARIOS, comentarios);
+        //el changelog
+        std::ostringstream os;
+        if(m_cadenaConsolidaciones != "") {
+                os << m_cadenaConsolidaciones << std::endl;
+        }
+
+        wxString fecha = wxDateTime::Now().Format(wxT("%H:%M:%S  %d/%m/%Y"));
+        std::string medicoConsolida = medico;
+        if (medicoConsolida == "") {
+                medicoConsolida = _Std("Unknown");
+        }
+        os << medicoConsolida;
+        os << "\t";
+        os << fecha.ToUTF8();
+
+        m_cadenaConsolidaciones = os.str();
+        tagsPrivadosComunes->SetTag((char)TAG_LISTA_COMPROMISOS,m_cadenaConsolidaciones);
+
+        long fila = m_pListaConsolidaciones->InsertItem(m_pListaConsolidaciones->GetItemCount(),wxString::FromUTF8(medicoConsolida.c_str()));
+        m_pListaConsolidaciones->SetItem(fila,COL_FECHA,fecha);
+
+        ActualizarEstado(ALMACENADO);
+}
+
+void GnkInformeBase::OnComentariosText(wxCommandEvent &)
+{
+        if(!wxFileExists(FROMPATH(m_pathInforme))) {
+                ActualizarEstado(NO_EXISTE);
+        } else {
+                ActualizarEstado(ALMACENADO_CON_MODIFICACIONES_PENDIENTES);
+        }
+}
+
+void GnkInformeBase::ActualizarEstado(TEstado estado)
+{
+        if(m_estado != estado) {
+                m_estado = estado;
+                switch(m_estado) {
+                case ALMACENADO:
+                        m_pLabelStatus->SetLabel(_("Commited"));
+                        m_pLabelStatus->SetForegroundColour(wxColour(0,174,0));
+                        m_pBConsolidar->Enable(false);
+                        break;
+                case ALMACENADO_CON_MODIFICACIONES_PENDIENTES:
+                        m_pLabelStatus->SetLabel(_("Modified"));
+                        m_pLabelStatus->SetForegroundColour(wxColour(174,0,0));
+                        m_pBConsolidar->Enable(true);
+                        break;
+                case NO_INICIALIZADO:
+                case NO_EXISTE:
+                        m_pLabelStatus->SetLabel(_("Not commited"));
+                        m_pLabelStatus->SetForegroundColour(wxColour(232,82,0));
+                        m_pBConsolidar->Enable(true);
+                        break;
+                }
+                m_pPanelBoton->Layout();
+        }
+}
+
+wxWindow* GnkInformeBase::GetParentPanelesCustom()
+{
+        return m_pPanelCuerpo;
+}
+
+void GnkInformeBase::AddDatosDemograficos(const TListaDatosDemograficos& datosDemograficos)
+{
+        for(TListaDatosDemograficos::const_iterator it = datosDemograficos.begin(); it != datosDemograficos.end(); ++it) {
+                //primero mira a ver si ya esta insertado...
+                wxSizerItemList& listaHijos = m_pSizerDatosDemograficos->GetChildren();
+                bool found = false;
+                int i = 0;
+                for (wxSizerItemList::iterator itEtiquetas = listaHijos.begin(); itEtiquetas != listaHijos.end(); ++itEtiquetas, i++) {
+                        if (i%2 != 0)
+                                continue;
+                        wxStaticText* pTextClave = dynamic_cast<wxStaticText*>((*itEtiquetas)->GetWindow());
+                        if (pTextClave != NULL) {
+                                if (pTextClave->GetLabel() == wxString::FromUTF8((*it).clave.c_str())) {
+                                        //encontrada clave, se busca el valor y se asigna
+                                        itEtiquetas++;
+                                        wxStaticText* pTextValor = dynamic_cast<wxStaticText*>((*itEtiquetas)->GetWindow());
+                                        if (pTextValor != NULL) {
+                                                pTextValor->SetLabel(wxString::FromUTF8((*it).valor.c_str()));
+                                                found = true;
+                                                break;
+                                        }
+                                }
+                        }
+                }
+                if (!found) {
+                        wxStaticText* m_staticTextClave = new wxStaticText( m_pPanelDatosDemograficos, wxID_ANY, wxString::FromUTF8((*it).clave.c_str()));
+                        m_staticTextClave->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+                        m_pSizerDatosDemograficos->Add( m_staticTextClave, 0, wxALL, 5 );
+
+                        wxStaticText* m_staticTextValor = new wxStaticText( m_pPanelDatosDemograficos, wxID_ANY, wxString::FromUTF8((*it).valor.c_str()));
+                        m_pSizerDatosDemograficos->Add( m_staticTextValor, 0, wxALL, 5 );
+                }
+        }
+}
+
+void GnkInformeBase::SetPanelesCustom(const TListaPanelesCustom& listaPaneles)
+{
+        for(TListaPanelesCustom::const_iterator it = listaPaneles.begin(); it != listaPaneles.end(); ++it) {
+                wxWindow* pWindow = (*it);
+                if(pWindow->GetParent() != GetParentPanelesCustom()) {
+                        pWindow->Reparent(GetParentPanelesCustom());
+                }
+                m_pSizerCustom->Add(pWindow,0,wxEXPAND);
+                SubTitledPanelSeparatorV* pSep = new SubTitledPanelSeparatorV(GetParentPanelesCustom());
+                m_pSizerCustom->Add(pSep,0,wxEXPAND);
+
+        }
+}
+}
+}
+
diff --git a/cadxcore/wx/gnkinforme/gnkinformebase.h b/cadxcore/wx/gnkinforme/gnkinformebase.h
new file mode 100644
index 0000000..22a86b0
--- /dev/null
+++ b/cadxcore/wx/gnkinforme/gnkinformebase.h
@@ -0,0 +1,82 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+#pragma once
+#include <api/api.h>
+#include "gnkinformebasewx.h"
+#include <api/controllers/ipacscontroller.h>
+#include <string>
+#include <map>
+#include <list>
+
+namespace GNC
+{
+namespace GUI
+{
+
+class EXTAPI GnkInformeBase: public GNKInformeBaseWx
+{
+public:
+        typedef enum TEstado {
+                NO_INICIALIZADO,
+                NO_EXISTE,
+                ALMACENADO,
+                ALMACENADO_CON_MODIFICACIONES_PENDIENTES
+        } TEstado;
+
+        typedef struct TDatoDemografico {
+                std::string clave;
+                std::string valor;
+
+                TDatoDemografico(const std::string& clave, const std::string& valor)
+                {
+                        this->clave = clave;
+                        this->valor = valor;
+                }
+        } TDatoDemografico;
+        typedef std::list< TDatoDemografico > TListaDatosDemograficos;
+        typedef std::list< wxWindow* > TListaPanelesCustom;
+
+        GnkInformeBase( wxWindow* parent);
+        ~GnkInformeBase();
+
+        virtual void CargarInforme(const std::string& pathFicheroInforme);
+
+        void SetTags(GNC::GCS::Ptr<GIL::DICOM::DicomDataset>& pBase, GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags> pTagsPrivadosComunes = NULL);
+
+        void AddDatosDemograficos(const TListaDatosDemograficos& datosDemograficos);
+        void SetPanelesCustom(const TListaPanelesCustom& listaPaneles);
+
+protected:
+        virtual void OnConsolidarClick(wxCommandEvent& event);
+        virtual void ConsolidarComun(GNC::GCS::Ptr<GIL::DICOM::TipoPrivateTags>& tagsPrivadosComunes, const std::string& medico);
+        void OnComentariosText(wxCommandEvent &event);
+
+        virtual void ActualizarEstado(TEstado estado);
+
+        virtual void OnConsolidar() = 0;
+        wxWindow* GetParentPanelesCustom();
+        std::string m_pathInforme;
+        std::string m_cadenaConsolidaciones;
+        std::string m_comentarios;
+        TEstado m_estado;
+};
+}
+}
+
diff --git a/cadxcore/wx/gnkinforme/gnkinformebasewx.cpp b/cadxcore/wx/gnkinforme/gnkinformebasewx.cpp
new file mode 100644
index 0000000..c40b469
--- /dev/null
+++ b/cadxcore/wx/gnkinforme/gnkinformebasewx.cpp
@@ -0,0 +1,172 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "gnkinformebasewx.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+GNKInformeBaseWx::GNKInformeBaseWx( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxScrolledWindow( parent, id, pos, size, style )
+{
+        this->SetBackgroundColour( wxColour( 240, 240, 240 ) );
+
+        wxBoxSizer* bSizer1;
+        bSizer1 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelReport = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( 669,-1 ), wxTAB_TRAVERSAL );
+        m_pPanelReport->SetMinSize( wxSize( 669,-1 ) );
+        m_pPanelReport->SetMaxSize( wxSize( 669,-1 ) );
+
+        wxBoxSizer* bSizer2;
+        bSizer2 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel21 = new wxPanel( m_pPanelReport, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel21->SetBackgroundColour( wxColour( 90, 90, 90 ) );
+
+        wxBoxSizer* bSizer19;
+        bSizer19 = new wxBoxSizer( wxVERTICAL );
+
+        wxGridBagSizer* gbSizer1;
+        gbSizer1 = new wxGridBagSizer( 0, 0 );
+        gbSizer1->AddGrowableCol( 0 );
+        gbSizer1->AddGrowableRow( 0 );
+        gbSizer1->SetFlexibleDirection( wxBOTH );
+        gbSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        m_pNombrePaciente = new wxStaticText( m_panel21, wxID_ANY, _("NAME SURNAME SECOND_SURNAME"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pNombrePaciente->Wrap( -1 );
+        m_pNombrePaciente->SetFont( wxFont( 13, 70, 90, 90, false, wxEmptyString ) );
+        m_pNombrePaciente->SetForegroundColour( wxColour( 255, 255, 255 ) );
+
+        gbSizer1->Add( m_pNombrePaciente, wxGBPosition( 0, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 3 );
+
+        m_pBitmapSexo = new wxStaticBitmap( m_panel21, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, 0 );
+        gbSizer1->Add( m_pBitmapSexo, wxGBPosition( 0, 2 ), wxGBSpan( 2, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pIdPaciente = new wxStaticText( m_panel21, wxID_ANY, _("644654645"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pIdPaciente->Wrap( -1 );
+        m_pIdPaciente->SetForegroundColour( wxColour( 255, 255, 255 ) );
+
+        gbSizer1->Add( m_pIdPaciente, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALL|wxALIGN_CENTER_VERTICAL, 3 );
+
+        bSizer19->Add( gbSizer1, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
+
+        m_pPanelCuerpo = new BodyPanel( m_panel21, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* pSizerCuerpo;
+        pSizerCuerpo = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelDatosDemograficos = new SubTitledPanel( m_pPanelCuerpo, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelDatosDemograficos->SetToolTip( _("Demographic data") );
+
+        wxBoxSizer* bSizer20;
+        bSizer20 = new wxBoxSizer( wxVERTICAL );
+
+        m_pSizerDatosDemograficos = new wxFlexGridSizer( 2, 2, 0, 0 );
+        m_pSizerDatosDemograficos->AddGrowableCol( 0 );
+        m_pSizerDatosDemograficos->SetFlexibleDirection( wxBOTH );
+        m_pSizerDatosDemograficos->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+
+        bSizer20->Add( m_pSizerDatosDemograficos, 1, wxLEFT, 5 );
+
+        m_pPanelDatosDemograficos->SetSizer( bSizer20 );
+        m_pPanelDatosDemograficos->Layout();
+        bSizer20->Fit( m_pPanelDatosDemograficos );
+        pSizerCuerpo->Add( m_pPanelDatosDemograficos, 0, wxEXPAND, 1 );
+
+        m_panel22 = new SubTitledPanelSeparatorV( m_pPanelCuerpo, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        pSizerCuerpo->Add( m_panel22, 0, wxEXPAND, 5 );
+
+        m_pSizerCustom = new wxBoxSizer( wxVERTICAL );
+
+        pSizerCuerpo->Add( m_pSizerCustom, 0, wxEXPAND, 3 );
+
+        m_pPanelComentarios = new SubTitledPanel( m_pPanelCuerpo, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelComentarios->SetToolTip( _("Comments") );
+
+        wxBoxSizer* pSizerComments;
+        pSizerComments = new wxBoxSizer( wxVERTICAL );
+
+        m_pComentarios = new wxTextCtrl( m_pPanelComentarios, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE );
+        m_pComentarios->SetMinSize( wxSize( -1,60 ) );
+
+        pSizerComments->Add( m_pComentarios, 0, wxEXPAND|wxALL, 10 );
+
+        m_pPanelComentarios->SetSizer( pSizerComments );
+        m_pPanelComentarios->Layout();
+        pSizerComments->Fit( m_pPanelComentarios );
+        pSizerCuerpo->Add( m_pPanelComentarios, 0, wxEXPAND, 5 );
+
+        m_panel221 = new SubTitledPanelSeparatorV( m_pPanelCuerpo, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        pSizerCuerpo->Add( m_panel221, 0, wxEXPAND, 5 );
+
+        m_pPanelConsolidar = new SubTitledPanel( m_pPanelCuerpo, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelConsolidar->SetToolTip( _("Commit inform") );
+
+        wxBoxSizer* pSizerComments1;
+        pSizerComments1 = new wxBoxSizer( wxVERTICAL );
+
+        m_pListaConsolidaciones = new wxListCtrl( m_pPanelConsolidar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_HRULES|wxLC_REPORT );
+        pSizerComments1->Add( m_pListaConsolidaciones, 0, wxEXPAND|wxALL, 10 );
+
+        m_pPanelBoton = new wxPanel( m_pPanelConsolidar, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer43;
+        bSizer43 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer43->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_pLabelStatus = new wxStaticText( m_pPanelBoton, wxID_ANY, _("Commited"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabelStatus->Wrap( -1 );
+        m_pLabelStatus->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
+
+        bSizer43->Add( m_pLabelStatus, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
+
+        m_pBConsolidar = new wxButton( m_pPanelBoton, wxID_ANY, _("Commit inform"), wxDefaultPosition, wxDefaultSize, wxBU_EXACTFIT );
+        bSizer43->Add( m_pBConsolidar, 0, wxALL, 5 );
+
+        m_pPanelBoton->SetSizer( bSizer43 );
+        m_pPanelBoton->Layout();
+        bSizer43->Fit( m_pPanelBoton );
+        pSizerComments1->Add( m_pPanelBoton, 0, wxEXPAND | wxALL, 0 );
+
+        m_pPanelConsolidar->SetSizer( pSizerComments1 );
+        m_pPanelConsolidar->Layout();
+        pSizerComments1->Fit( m_pPanelConsolidar );
+        pSizerCuerpo->Add( m_pPanelConsolidar, 0, wxEXPAND, 5 );
+
+        m_pPanelCuerpo->SetSizer( pSizerCuerpo );
+        m_pPanelCuerpo->Layout();
+        pSizerCuerpo->Fit( m_pPanelCuerpo );
+        bSizer19->Add( m_pPanelCuerpo, 1, wxEXPAND|wxALL, 2 );
+
+        m_panel21->SetSizer( bSizer19 );
+        m_panel21->Layout();
+        bSizer19->Fit( m_panel21 );
+        bSizer2->Add( m_panel21, 0, wxEXPAND, 5 );
+
+        m_pPanelReport->SetSizer( bSizer2 );
+        m_pPanelReport->Layout();
+        bSizer1->Add( m_pPanelReport, 1, wxALIGN_CENTER_HORIZONTAL, 5 );
+
+        this->SetSizer( bSizer1 );
+        this->Layout();
+        bSizer1->Fit( this );
+
+        // Connect Events
+        m_pComentarios->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GNKInformeBaseWx::OnComentariosText ), NULL, this );
+        m_pBConsolidar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GNKInformeBaseWx::OnConsolidarClick ), NULL, this );
+}
+
+GNKInformeBaseWx::~GNKInformeBaseWx()
+{
+        // Disconnect Events
+        m_pComentarios->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( GNKInformeBaseWx::OnComentariosText ), NULL, this );
+        m_pBConsolidar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( GNKInformeBaseWx::OnConsolidarClick ), NULL, this );
+
+}
diff --git a/cadxcore/wx/gnkinforme/gnkinformebasewx.h b/cadxcore/wx/gnkinforme/gnkinformebasewx.h
new file mode 100644
index 0000000..79f4225
--- /dev/null
+++ b/cadxcore/wx/gnkinforme/gnkinformebasewx.h
@@ -0,0 +1,92 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __gnkinformebasewx__
+#define __gnkinformebasewx__
+
+#include <wx/intl.h>
+
+class BodyPanel;
+class SubTitledPanel;
+class SubTitledPanelSeparatorV;
+class wxScrolledWindow;
+
+#include "wx/scrolwin.h"
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/statbmp.h>
+#include <wx/gbsizer.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/textctrl.h>
+#include <wx/listctrl.h>
+#include <wx/button.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class GNKInformeBaseWx
+///////////////////////////////////////////////////////////////////////////////
+class GNKInformeBaseWx : public wxScrolledWindow
+{
+private:
+
+protected:
+        wxPanel* m_pPanelReport;
+        wxPanel* m_panel21;
+        wxStaticText* m_pNombrePaciente;
+        wxStaticBitmap* m_pBitmapSexo;
+        wxStaticText* m_pIdPaciente;
+        BodyPanel* m_pPanelCuerpo;
+        SubTitledPanel* m_pPanelDatosDemograficos;
+        wxFlexGridSizer* m_pSizerDatosDemograficos;
+        SubTitledPanelSeparatorV* m_panel22;
+        wxBoxSizer* m_pSizerCustom;
+        SubTitledPanel* m_pPanelComentarios;
+        wxTextCtrl* m_pComentarios;
+        SubTitledPanelSeparatorV* m_panel221;
+        SubTitledPanel* m_pPanelConsolidar;
+        wxListCtrl* m_pListaConsolidaciones;
+        wxPanel* m_pPanelBoton;
+
+        wxStaticText* m_pLabelStatus;
+        wxButton* m_pBConsolidar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnComentariosText( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnConsolidarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        GNKInformeBaseWx( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~GNKInformeBaseWx();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__gnkinformebasewx__
diff --git a/cadxcore/wx/link_additions.h b/cadxcore/wx/link_additions.h
new file mode 100644
index 0000000..e69de29
diff --git a/cadxcore/wx/maskedtextctrl/maskedtextctrl.cpp b/cadxcore/wx/maskedtextctrl/maskedtextctrl.cpp
new file mode 100644
index 0000000..7dfe76a
--- /dev/null
+++ b/cadxcore/wx/maskedtextctrl/maskedtextctrl.cpp
@@ -0,0 +1,1851 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        wxMaskedTextCtrl.cpp
+// Purpose:     wxMaskedTextCtrl: masked edit control class
+// Author:      Thomas H‰rtel
+// Modified by:
+// Created:     2002-11-14
+// RCS-ID:      $Id: wxMaskedTextCtrl.cpp,v $
+// Copyright:   (c) Thomas H‰rtel
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+// For compilers that support precompilation, includes "wx/wx.h".
+#if defined(__WXGTK__) || defined(__WXMOTIF__)
+#include "wx/wx.h"
+#endif
+
+
+#include "wx/wxprec.h"
+#include "maskedtextctrl.h"
+#include <api/controllers/icontroladorlog.h>
+
+IMPLEMENT_DYNAMIC_CLASS(wxMaskData, wxObject)
+IMPLEMENT_DYNAMIC_CLASS(wxMaskedTextCtrl, wxTextCtrl)
+
+BEGIN_EVENT_TABLE(wxMaskedTextCtrl, wxTextCtrl)
+        EVT_KEY_DOWN(wxMaskedTextCtrl::OnKeyDown)
+        EVT_CHAR(wxMaskedTextCtrl::OnChar)
+
+        EVT_SET_FOCUS(wxMaskedTextCtrl::OnSetFocus)
+        EVT_KILL_FOCUS(wxMaskedTextCtrl::OnKillFocus)
+        EVT_LEFT_DOWN(wxMaskedTextCtrl::OnLeftButtonDown)
+
+        EVT_UPDATE_UI(wxID_CUT, wxMaskedTextCtrl::OnCut)
+        EVT_UPDATE_UI(wxID_COPY, wxMaskedTextCtrl::OnCopy)
+        EVT_UPDATE_UI(wxID_PASTE, wxMaskedTextCtrl::OnPaste)
+END_EVENT_TABLE()
+
+
+
+
+wxMaskData::wxMaskData() :
+        m_eType(MaskDataTypeLITERAL),
+        m_eSubType(MaskDataSubTypeNONE),
+        m_chValue(chNULL)
+{
+}
+
+wxMaskData::~wxMaskData()
+{
+}
+
+void wxMaskData::operator=(const wxMaskData& src)
+{
+        m_eType = src.m_eType;
+        m_chValue = src.m_chValue;
+}
+
+bool wxMaskData::IsInputData()
+{
+
+        bool bIsInputData=FALSE;
+        switch(m_eType) {
+        // These are the input types.
+        case MaskDataTypeDIGIT:
+        case MaskDataTypeALPHANUMERIC:
+        case MaskDataTypeALPHABETIC:
+        case MaskDataTypeALPHAETICUPPER:
+        case MaskDataTypeALPHAETICLOWER:
+        case MaskDataTypeCHARACTER:
+                bIsInputData=TRUE;
+                break;
+        default:
+                break;
+        }
+        return bIsInputData;
+}
+
+bool wxMaskData::IsValidInput(wxChar chNewChar)
+{
+        bool bIsValidInput=FALSE;
+        switch(m_eType) {
+        // These are the input types.
+        case MaskDataTypeDIGIT:
+                bIsValidInput=wxIsdigit(chNewChar) != 0;
+                break;
+
+        case MaskDataTypeALPHANUMERIC:
+                bIsValidInput=wxIsalnum(chNewChar) != 0;
+                break;
+
+        case MaskDataTypeALPHABETIC:
+        case MaskDataTypeALPHAETICUPPER:
+        case MaskDataTypeALPHAETICLOWER:
+                bIsValidInput=wxIsalpha(chNewChar) != 0;
+                break;
+
+        case MaskDataTypeCHARACTER:
+                if((chNewChar >=  32) && (chNewChar <= 126))
+                        bIsValidInput=TRUE;
+                if((chNewChar >= 128) && (chNewChar <= 255))
+                        bIsValidInput = TRUE;
+                break;
+        default:
+                break;
+        }
+        return bIsValidInput;
+}
+
+wxChar wxMaskData::PreProcessChar(wxChar chNewChar)
+{
+        wxChar chProcessedChar=chNewChar;
+        switch(m_eType) {
+        case MaskDataTypeALPHAETICUPPER:
+                chProcessedChar=(wxChar) wxToupper(chNewChar);
+                break;
+
+        case MaskDataTypeALPHAETICLOWER:
+                chProcessedChar=(wxChar) wxTolower(chNewChar);
+                break;
+        default:
+                break;
+        }
+        return chProcessedChar;
+}
+
+wxMaskedTextCtrl::wxMaskedTextCtrl():
+        m_bInsertMode(TRUE),
+        m_chPromptSymbol(chSPACE),
+        m_chIntlDecimal(chPERIOD),
+        m_chIntlThousands(chCOMMA),
+        m_chIntlTime(chCOLON),
+        m_chIntlDate(chSLASH),
+        m_bAutoTab(FALSE),
+        m_bBackwardLocationRight(TRUE),
+        m_bNeedValidation(TRUE),
+        m_bValidation(FALSE),
+        m_dtDateTime(wxInvalidDateTime),
+        m_dtMinDateTime(wxInvalidDateTime),
+        m_dtMaxDateTime(wxInvalidDateTime)
+{
+}
+
+wxMaskedTextCtrl::wxMaskedTextCtrl(wxWindow *parent, wxWindowID id, const wxString& mask, const wxString &value, const wxPoint &pos, const wxSize &size, int style = 0)
+        : wxTextCtrl(parent, id, value, pos, size, style),
+          m_bInsertMode(TRUE),
+          m_chPromptSymbol(chSPACE),
+          m_chIntlDecimal(chPERIOD),
+          m_chIntlThousands(chCOMMA),
+          m_chIntlTime(chCOLON),
+          m_chIntlDate(chSLASH),
+          m_bAutoTab(FALSE),
+          m_bBackwardLocationRight(TRUE),
+          m_bNeedValidation(TRUE),
+          m_bValidation(FALSE),
+          m_dtDateTime(wxInvalidDateTime),
+          m_dtMinDateTime(wxInvalidDateTime),
+          m_dtMaxDateTime(wxInvalidDateTime)
+{
+        wxString str = mask;
+        SetMask(str);
+
+        if(m_listData.GetCount() != 0)
+                UpdateControl();
+}
+
+wxMaskedTextCtrl::~wxMaskedTextCtrl()
+{
+        DeleteContents();
+}
+
+void wxMaskedTextCtrl::DeleteContents()
+{
+        if(m_listData.GetCount() == 0)
+                return;
+
+        m_listData.DeleteContents(TRUE);
+
+        m_bNeedValidation = FALSE;
+        m_bValidation = TRUE;
+}
+
+wxString wxMaskedTextCtrl::GetMask()
+{
+        wxString csMask;
+        wxMaskData* pobjData=NULL;
+        for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                pobjData= (wxMaskData *) (m_listData.Item(pos))->GetData();
+                switch(pobjData->m_eType) {
+                case MaskDataTypeDECIMALSEPARATOR:
+                        csMask += chMaskPlaceholderDECIMALSEPARATOR;
+                        break;
+
+                case MaskDataTypeTHOUSANDSSEPARATOR:
+                        csMask += chMaskPlaceholderTHOUSANDSSEPARATOR;
+                        break;
+
+                case MaskDataTypeTIMESEPARATOR:
+                        csMask += chMaskPlaceholderTIMESEPARATOR;
+                        break;
+                case MaskDataTypeDATESEPARATOR:
+                        csMask += chMaskPlaceholderDATESEPARATOR;
+                        break;
+
+                case MaskDataTypeALPHANUMERIC:
+                        csMask += chMaskPlaceholderALPHANUMERIC;
+                        break;
+
+                case MaskDataTypeALPHABETIC:
+                        csMask += chMaskPlaceholderALPHABETIC;
+                        break;
+
+                case MaskDataTypeALPHAETICUPPER:
+                        csMask += chMaskPlaceholderALPHABETICUPPER;
+                        break;
+
+                case MaskDataTypeALPHAETICLOWER:
+                        csMask += chMaskPlaceholderALPHABETICLOWER;
+                        break;
+
+                case MaskDataTypeCHARACTER:
+                        csMask += chMaskPlaceholderCHARACTER;
+                        break;
+
+                case MaskDataTypeDIGIT:
+                        switch(pobjData->m_eSubType) {
+                        case MaskDataSubTypeDATEDAY:
+                                csMask += chMaskPlaceholderDATEDAY;
+                                break;
+
+                        case MaskDataSubTypeDATEMONTH:
+                                csMask += chMaskPlaceholderDATEMONTH;
+                                break;
+
+                        case MaskDataSubTypeDATEYEAR:
+                                csMask += chMaskPlaceholderDATEYEAR;
+                                break;
+
+                        case MaskDataSubTypeTIMEHOUR:
+                                csMask += chMaskPlaceholderTIMEHOUR;
+                                break;
+
+                        case MaskDataSubTypeTIMEMINUTE:
+                                csMask += chMaskPlaceholderTIMEMINUTE;
+                                break;
+
+                        case MaskDataSubTypeTIMESECOND:
+                                csMask += chMaskPlaceholderTIMESECOND;
+                                break;
+
+                        default:
+                                csMask += chMaskPlaceholderDIGIT;
+                                break;
+                        }
+                        break;
+
+                case MaskDataTypeLITERALESCAPE:
+                        // Need to add the escape to things that were escaped.
+                        csMask += chMaskPlaceholderLITERALESCAPE;
+                        csMask += pobjData->m_chValue;
+                        break;
+
+                default:
+                        // Literals and everything else is kept the same.
+                        csMask += pobjData->m_chValue;
+                        break;
+                }
+        }
+        return csMask;
+}
+
+void wxMaskedTextCtrl::SetMask(wxString& mask)
+{
+        if(mask.IsEmpty()) {
+                mask = wxT("");
+        }
+        DeleteContents();
+
+        wxMaskData* pobjData = NULL;
+        for(unsigned int i = 0; i < mask.Length(); i++) {
+                wxChar chNew = mask[i];
+                pobjData = new wxMaskData();
+                if(pobjData) {
+                        m_listData.Append(pobjData);
+                        pobjData->m_eSubType = MaskDataSubTypeNONE;
+
+                        switch(chNew) {
+                        case chMaskPlaceholderDECIMALSEPARATOR:
+                                pobjData->m_eType = MaskDataTypeDECIMALSEPARATOR;
+                                pobjData->m_chValue = m_chIntlDecimal;
+                                break;
+
+                        case chMaskPlaceholderTHOUSANDSSEPARATOR:
+                                pobjData->m_eType = MaskDataTypeTHOUSANDSSEPARATOR;
+                                pobjData->m_chValue = m_chIntlThousands;
+                                break;
+
+                        case chMaskPlaceholderTIMESEPARATOR:
+                                pobjData->m_eType = MaskDataTypeTIMESEPARATOR;
+                                pobjData->m_chValue = m_chIntlTime;
+                                break;
+
+                        case chMaskPlaceholderDATESEPARATOR:
+                                pobjData->m_eType = MaskDataTypeDATESEPARATOR;
+                                pobjData->m_chValue = m_chIntlDate;
+                                break;
+
+                        case chMaskPlaceholderDIGIT:
+                                pobjData->m_eType = MaskDataTypeDIGIT;
+                                pobjData->m_chValue = m_chPromptSymbol;
+                                break;
+
+                        case chMaskPlaceholderALPHANUMERIC:
+                                pobjData->m_eType = MaskDataTypeALPHANUMERIC;
+                                pobjData->m_chValue = m_chPromptSymbol;
+                                break;
+
+                        case chMaskPlaceholderALPHABETIC:
+                                pobjData->m_eType = MaskDataTypeALPHABETIC;
+                                pobjData->m_chValue = m_chPromptSymbol;
+                                break;
+
+                        case chMaskPlaceholderALPHABETICUPPER:
+                                pobjData->m_eType = MaskDataTypeALPHAETICUPPER;
+                                pobjData->m_chValue = m_chPromptSymbol;
+                                break;
+
+                        case chMaskPlaceholderALPHABETICLOWER:
+                                pobjData->m_eType = MaskDataTypeALPHAETICLOWER;
+                                pobjData->m_chValue = m_chPromptSymbol;
+                                break;
+
+                        case chMaskPlaceholderCHARACTER:
+                                pobjData->m_eType = MaskDataTypeCHARACTER;
+                                pobjData->m_chValue = m_chPromptSymbol;
+                                break;
+
+                        default:
+                                if(chNew == chMaskPlaceholderLITERALESCAPE) {
+                                        // It is the next character that is inserted.
+                                        chNew = mask[++i];
+                                        if(chNew) {
+                                                pobjData->m_eType = MaskDataTypeLITERALESCAPE;
+                                                pobjData->m_chValue = chNew;
+                                                break;
+                                        }
+                                } else if(chNew == chMaskPlaceholderDATEDAY) {
+                                        // It is the next character that is inserted.
+                                        wxChar chNext = (i < (mask.Length()-1) ? mask[i+1] : wxT('\0'));
+                                        wxChar chBefore = (i > 0 ? mask[i-1] : wxT('\0'));
+                                        if((chNext == chMaskPlaceholderDATEDAY || chBefore == chMaskPlaceholderDATEDAY) && chBefore != chNext) {
+                                                pobjData->m_eType = MaskDataTypeDIGIT;
+                                                pobjData->m_eSubType = MaskDataSubTypeDATEDAY;
+                                                pobjData->m_chValue = m_chPromptSymbol;
+                                                break;
+                                        }
+                                } else if(chNew == chMaskPlaceholderDATEMONTH) {
+                                        // It is the next character that is inserted.
+                                        wxChar chNext = (i < (mask.Length()-1) ? mask[i+1] : wxT('\0'));
+                                        wxChar chBefore = (i > 0 ? mask[i-1] : wxT('\0'));
+                                        if((chNext == chMaskPlaceholderDATEMONTH || chBefore == chMaskPlaceholderDATEMONTH) && chBefore != chNext) {
+                                                pobjData->m_eType = MaskDataTypeDIGIT;
+                                                pobjData->m_eSubType = MaskDataSubTypeDATEMONTH;
+                                                pobjData->m_chValue = m_chPromptSymbol;
+                                                break;
+                                        }
+                                } else if(chNew == chMaskPlaceholderDATEYEAR) {
+                                        // It is the next character that is inserted.
+                                        wxChar chNext = (i < (mask.Length()-1) ? mask[i+1] : wxT('\0'));
+                                        wxChar chBefore = (i > 0 ? mask[i-1] : wxT('\0'));
+                                        if(chNext == chMaskPlaceholderDATEYEAR || chBefore == chMaskPlaceholderDATEYEAR) {
+                                                pobjData->m_eType = MaskDataTypeDIGIT;
+                                                pobjData->m_eSubType = MaskDataSubTypeDATEYEAR;
+                                                pobjData->m_chValue = m_chPromptSymbol;
+                                                break;
+                                        }
+                                } else if(chNew == chMaskPlaceholderTIMEHOUR) {
+                                        // It is the next character that is inserted.
+                                        wxChar chNext = (i < (mask.Length()-1) ? mask[i+1] : wxT('\0'));
+                                        wxChar chBefore = (i > 0 ? mask[i-1] : wxT('\0'));
+                                        if((chNext == chMaskPlaceholderTIMEHOUR || chBefore == chMaskPlaceholderTIMEHOUR) && chBefore != chNext) {
+                                                pobjData->m_eType = MaskDataTypeDIGIT;
+                                                pobjData->m_eSubType = MaskDataSubTypeTIMEHOUR;
+                                                pobjData->m_chValue = m_chPromptSymbol;
+                                                break;
+                                        }
+                                } else if(chNew == chMaskPlaceholderTIMEMINUTE) {
+                                        // It is the next character that is inserted.
+                                        wxChar chNext = (i < (mask.Length()-1) ? mask[i+1] : wxT('\0'));
+                                        wxChar chBefore = (i > 0 ? mask[i-1] : wxT('\0'));
+                                        if((chNext == chMaskPlaceholderTIMEMINUTE || chBefore == chMaskPlaceholderTIMEMINUTE) && chBefore != chNext) {
+                                                pobjData->m_eType = MaskDataTypeDIGIT;
+                                                pobjData->m_eSubType = MaskDataSubTypeTIMEMINUTE;
+                                                pobjData->m_chValue = m_chPromptSymbol;
+                                                break;
+                                        }
+                                } else if(chNew == chMaskPlaceholderTIMESECOND) {
+                                        // It is the next character that is inserted.
+                                        wxChar chNext = (i < (mask.Length()-1) ? mask[i+1] : wxT('\0'));
+                                        wxChar chBefore = (i > 0 ? mask[i-1] : wxT('\0'));
+                                        if((chNext == chMaskPlaceholderTIMESECOND || chBefore == chMaskPlaceholderTIMESECOND) && chBefore != chNext) {
+                                                pobjData->m_eType = MaskDataTypeDIGIT;
+                                                pobjData->m_eSubType = MaskDataSubTypeTIMESECOND;
+                                                pobjData->m_chValue = m_chPromptSymbol;
+                                                break;
+                                        }
+                                }
+
+                                // Everything else is just a literal.
+                                pobjData->m_eType = MaskDataTypeLITERAL;
+                                pobjData->m_chValue = chNew;
+                                break;
+                        }
+                }
+        }
+        wxTextCtrl::SetMaxLength(m_listData.GetCount());
+        UpdateControl();
+}
+
+wxString wxMaskedTextCtrl::GetInputData()
+{
+        wxString csInputData;
+
+        if(m_listData.GetCount() == 0) {
+                csInputData = GetValue();
+                return csInputData;
+        }
+
+        wxMaskData* pobjData=NULL;
+        for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                pobjData= (wxMaskData *) (m_listData.Item(pos))->GetData();
+                // Ignore everything that is not data.
+                if(pobjData->IsInputData())
+                        csInputData += pobjData->m_chValue;
+        }
+        return csInputData;
+}
+
+wxString wxMaskedTextCtrl::GetInputData(wxString& value)
+{
+        wxString csInputData = value;
+        unsigned int nSymbolCount = csInputData.Length();
+        wxMaskData* pobjData = NULL;
+        wxString sToExclude;
+        int nStartPos = -1;
+        int nEndPos = -1;
+        unsigned int nIndex = 0;
+        int nRemovedCount = 0;
+
+        for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                if(!pobjData->IsInputData()) {
+                        if(nStartPos == -1) {
+                                nStartPos = nIndex;
+                                sToExclude.Empty();
+                        }
+                        sToExclude+=pobjData->m_chValue;
+                } else {
+                        if(nStartPos != -1) {
+                                nEndPos = nIndex-1;
+                                if(csInputData.Mid(nStartPos-nRemovedCount, nEndPos-nStartPos+1) == sToExclude) {
+                                        csInputData=csInputData.Left(nStartPos-nRemovedCount) + csInputData.Mid(nEndPos-nRemovedCount+1);
+                                        nRemovedCount+=nEndPos-nStartPos+1;
+                                }
+                                nStartPos = -1;
+                        }
+                }
+
+                nIndex++;
+                if(nIndex >= nSymbolCount)
+                        break;
+        }
+
+        return csInputData;
+}
+
+bool wxMaskedTextCtrl::SetInputData(const wxString& value, int nBeginPos/*=0*/, bool bAllowPrompt/*=TRUE*/)
+{
+        wxString csFullInput;
+
+        m_bNeedValidation = TRUE;
+        m_bValidation = FALSE;
+
+
+        // Start with existing data and append the new data.
+        csFullInput = GetInputData();
+        csFullInput = csFullInput.Left(nBeginPos);
+
+        if(bAllowPrompt)
+                csFullInput += value;
+        else {
+                // If the prompt symbol is not valid, then
+                // add the data one-by-one ignoring any prompt symbols.
+                for(unsigned int i = 0; i < value.Length(); i++) {
+                        if(value[i] != m_chPromptSymbol)
+                                csFullInput += value[i];
+                }
+        }
+
+        bool bCompleteSuccess=TRUE;
+        wxString pszReplaceData=csFullInput;
+        wxMaskData* pobjData=NULL;
+        unsigned int posReplaceData=0;
+
+        for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+
+                // Ignore everything that is not data.
+                if(pobjData->IsInputData()) {
+                        // If we run out of replacement data, then use the prompt symbol.
+                        // Make sure we iterate through the entire list so that the
+                        // prompt symbol is applied to any empty areas.
+                        if(posReplaceData < pszReplaceData.Length()) {
+                                // This inner while loop is so that we can re-apply input data
+                                // after an error.  This will allow us to skip over invalid
+                                // input data and try the next character.
+                                while(posReplaceData< pszReplaceData.Length()) {
+                                        wxChar chReplace = pszReplaceData[posReplaceData++];
+
+                                        // Make sure to follow the input validation.
+                                        // The prompt symbol is always valid at this level.
+                                        // This allows the user to erase a string by overtyping a space.
+                                        // On error, just skip the character being inserted.
+                                        // This will allow the DeleteRange() function to have the remaining
+                                        // characters validated.
+                                        if((chReplace == m_chPromptSymbol) || pobjData->IsValidInput(chReplace)) {
+                                                pobjData->m_chValue = pobjData->PreProcessChar(chReplace);
+                                                break;
+                                        } else
+                                                bCompleteSuccess = FALSE;
+                                }
+                        } else
+                                pobjData->m_chValue = m_chPromptSymbol;
+                }
+        }
+
+        UpdateControl();
+
+        return bCompleteSuccess;
+}
+
+wxChar wxMaskedTextCtrl::GetPromptSymbol()
+{
+        return m_chPromptSymbol;
+}
+
+void wxMaskedTextCtrl::SetPromptSymbol(wxChar chNewPromptSymbol)
+{
+        // The prompt symbol must be a valid edit box symbol.
+
+        if(wxIsprint((int) chNewPromptSymbol)) {
+                // Just for the heck of it, if the prompt symbol changes,
+                // go through and replace the existing prompts with the new prompt.
+                wxMaskData* pobjData = NULL;
+                for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                        pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                        if(pobjData->IsInputData()) {
+                                if(pobjData->m_chValue == m_chPromptSymbol)
+                                        pobjData->m_chValue = chNewPromptSymbol;
+                        }
+                }
+                m_chPromptSymbol = chNewPromptSymbol;
+        }
+
+        // Don't update the insertion point if just setting the prompt symbol.
+        UpdateControl(-1);
+}
+
+wxChar wxMaskedTextCtrl::GetDecimalSeperator()
+{
+        return m_chIntlDecimal;
+}
+
+void wxMaskedTextCtrl::SetDecimalSeperator(wxChar chNewDecimalSeperator)
+{
+        // The decimal seperator must be a valid edit box symbol.
+
+        if(wxIsprint((int) chNewDecimalSeperator)) {
+                // Just for the heck of it, if the decimal symbol changes,
+                // go through and replace the existing symbols with the new symbol.
+                wxMaskData* pobjData = NULL;
+                for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                        pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                        if(pobjData->m_eType == MaskDataTypeDECIMALSEPARATOR)
+                                pobjData->m_chValue = chNewDecimalSeperator;
+                }
+                m_chIntlDecimal = chNewDecimalSeperator;
+        }
+
+        // Don't update the insertion point if just setting the decimal symbol.
+        UpdateControl(-1);
+}
+
+wxChar wxMaskedTextCtrl::GetThousandsSeperator()
+{
+        return m_chIntlThousands;
+}
+
+void wxMaskedTextCtrl::SetThousandsSeperator(wxChar chNewThousandsSeperator)
+{
+        // The thousands seperator must be a valid edit box symbol.
+
+        if(wxIsprint((int) chNewThousandsSeperator)) {
+                // Just for the heck of it, if the thousands symbol changes,
+                // go through and replace the existing symbols with the new symbol.
+                wxMaskData* pobjData = NULL;
+                for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                        pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                        if(pobjData->m_eType == MaskDataTypeTHOUSANDSSEPARATOR)
+                                pobjData->m_chValue = chNewThousandsSeperator;
+                }
+                m_chIntlThousands = chNewThousandsSeperator;
+        }
+
+        // Don't update the insertion point if just setting the thousands symbol.
+        UpdateControl(-1);
+}
+
+wxChar wxMaskedTextCtrl::GetTimeSeperator()
+{
+        return m_chIntlTime;
+}
+
+void wxMaskedTextCtrl::SetTimeSeperator(wxChar chNewTimeSeperator)
+{
+        // The time seperator must be a valid edit box symbol.
+
+        if(wxIsprint((int) chNewTimeSeperator)) {
+                // Just for the heck of it, if the time symbol changes,
+                // go through and replace the existing symbols with the new symbol.
+                wxMaskData* pobjData = NULL;
+                for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                        pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                        if(pobjData->m_eType == MaskDataTypeTIMESEPARATOR)
+                                pobjData->m_chValue = chNewTimeSeperator;
+                }
+                m_chIntlTime = chNewTimeSeperator;
+        }
+
+        // Don't update the insertion point if just setting the time symbol.
+        UpdateControl(-1);
+}
+
+wxChar wxMaskedTextCtrl::GetDateSeperator()
+{
+        return m_chIntlDate;
+}
+
+void wxMaskedTextCtrl::SetDateSeperator(wxChar chNewDateSeperator)
+{
+        // The time seperator must be a valid edit box symbol.
+
+        if(wxIsprint((int) chNewDateSeperator)) {
+                // Just for the heck of it, if the date symbol changes,
+                // go through and replace the existing symbols with the new symbol.
+                wxMaskData* pobjData=NULL;
+                for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                        pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                        if(pobjData->m_eType == MaskDataTypeDATESEPARATOR)
+                                pobjData->m_chValue = chNewDateSeperator;
+                }
+                m_chIntlDate = chNewDateSeperator;
+        }
+
+        // Don't update the insertion point if just setting the date symbol.
+        UpdateControl(-1);
+}
+
+void wxMaskedTextCtrl::EmptyData(bool bOnlyInput/*=FALSE*/)
+{
+        if(m_listData.GetCount()==0) {
+                DeleteContents();
+                return;
+        }
+
+        if(bOnlyInput) {
+                // If emptying only the data, the iterate through the list
+                // of data and replace input data with the prompt symbol.
+                wxMaskData* pobjData = NULL;
+                for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                        pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                        if(pobjData->IsInputData())
+                                pobjData->m_chValue=m_chPromptSymbol;
+                }
+        } else
+                DeleteContents();
+
+        UpdateControl();
+}
+
+bool wxMaskedTextCtrl::IsInputEmpty() const
+{
+        if(m_listData.GetCount() == 0) {
+                wxString csInputData;
+                csInputData = GetValue();
+                return csInputData.IsEmpty();
+        }
+
+        wxMaskData* pobjData=NULL;
+        for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                if (pobjData->IsInputData() && pobjData->m_chValue!=m_chPromptSymbol)
+                        return FALSE;
+        }
+        return TRUE;
+}
+
+bool wxMaskedTextCtrl::GetInsertMode()
+{
+        return m_bInsertMode;
+}
+
+void wxMaskedTextCtrl::SetInsertMode(bool bInsertMode)
+{
+        m_bInsertMode=bInsertMode;
+}
+
+bool wxMaskedTextCtrl::GetAutoTab()
+{
+        return m_bAutoTab;
+}
+
+void wxMaskedTextCtrl::SetAutoTab(bool bAutoTab)
+{
+        m_bAutoTab=bAutoTab;
+}
+
+void wxMaskedTextCtrl::SetBackwardLocationRight(bool bRight)
+{
+        m_bBackwardLocationRight = bRight;
+}
+
+bool wxMaskedTextCtrl::GetBackwardLocationRight()
+{
+        return m_bBackwardLocationRight;
+}
+
+wxString wxMaskedTextCtrl::ShowMask()
+{
+        wxString csShow;
+        wxMaskData* pobjData=NULL;
+        for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+
+                // There is no need to do any fancy string building because
+                // all validation is done when characters are inserted into the list.
+                // Literals and placeholders are converted properly at that time
+                // so all we have to do here is get the value.
+                if(pobjData->m_chValue != chNULL)
+                        csShow += pobjData->m_chValue;
+        }
+        return csShow;
+}
+
+bool wxMaskedTextCtrl::IsInputData(int nPosition)
+{
+        if(m_listData.GetCount() == 0) {
+                return TRUE;
+        }
+
+        // We frequently need to know if a position refers to
+        // input data or to a literal.
+        bool bIsInputData=FALSE;
+        if(nPosition >= 0 && nPosition < (int) m_listData.GetCount()) {
+                wxMaskData* pobjData = (wxMaskData*) (m_listData.Item(nPosition))->GetData();
+                if(pobjData) {
+                        bIsInputData = pobjData->IsInputData();
+                }
+        }
+        return bIsInputData;
+}
+
+int wxMaskedTextCtrl::DeleteRange(int nSelectionStart, int nSelectionEnd)
+{
+        // In order to delete properly, we must count the number of
+        // input characters that are selected and only delete that many.
+        // This is because the selection can include literals.
+        int nCharIndex  =0;
+        int nDeleteCount=0;
+        wxString csInputData;
+        wxMaskData* pobjData = NULL;
+
+        m_bNeedValidation = TRUE;
+        m_bValidation = FALSE;
+
+        for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++,nCharIndex++) {
+                pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                // Ignore everything that is not data.
+                // This is just like we do in GetInputData except that we
+                // will ignore the input data within the selection range.
+                if(pobjData->IsInputData()) {
+                        if((nCharIndex < nSelectionStart) || (nCharIndex >= nSelectionEnd)) {
+                                // The SetInputData() function will take care of validating
+                                // the shifted characters.
+                                csInputData += pobjData->m_chValue;
+                        } else
+                                nDeleteCount++;
+                }
+        }
+        // Now apply the filtered data stream.
+        SetInputData(csInputData);
+        // return the deleted count so that an error can be generated
+        // if none were deleted.
+        return nDeleteCount;
+}
+
+int wxMaskedTextCtrl::InsertAt(int nSelectionStart, wxChar chNewChar)
+{
+        // Although we could have some complex, yet efficient, routine
+        // that would error if inserting pushed an existing character
+        // into an invalid region.  Instead, just save the current
+        // state and restore it on error.
+        wxString csPreviousInput=GetInputData();
+
+        int nCharIndex = 0;
+        int nInsertionPoint = -1;
+        wxString csInputData;
+        wxMaskData* pobjData = NULL;
+        for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++,nCharIndex++) {
+                pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                // Ignore everything that is not data.
+                // This is just like we do in GetInputData except that we
+                // will ignore the input data within the selection range.
+                if(pobjData->IsInputData()) {
+                        // Wait until a valid insertion point and
+                        // only make sure to insert once.
+                        if((nInsertionPoint < 0) && (nCharIndex >= nSelectionStart)) {
+                                csInputData += chNewChar;
+                                nInsertionPoint=nCharIndex;
+                        }
+                        csInputData += pobjData->m_chValue;
+                }
+        }
+        // Now apply the filtered data stream and check if it was successful.
+        if(!SetInputData(csInputData)) {
+                // If not successful, then restore the previous input and return -1.
+                SetInputData(csPreviousInput);
+                return -1;
+        }
+        return nInsertionPoint;
+}
+
+int wxMaskedTextCtrl::SetAt(int nSelectionStart, wxChar chNewChar)
+{
+        if(nSelectionStart >= 0) {
+                m_bNeedValidation = TRUE;
+                m_bValidation = FALSE;
+
+                wxMaskData* pobjData=(wxMaskData*) (m_listData.Item(nSelectionStart))->GetData();
+                if(pobjData) {
+                        if(pobjData->IsInputData()) {
+                                if((chNewChar == m_chPromptSymbol) || pobjData->IsValidInput(chNewChar))
+                                        pobjData->m_chValue=pobjData->PreProcessChar(chNewChar);
+                                else
+                                        return -1;  // Input value is invalid or not allowed.
+                        }
+                }
+        }
+        return nSelectionStart;
+}
+
+int wxMaskedTextCtrl::GetNextInputLocation(int nSelectionStart)
+{
+        // One of the functions of this edit control is that it skips over literals.
+        // We need a function to help skip to the next position.
+        int nNextInputLocation=nSelectionStart;
+        if(nNextInputLocation < 0)
+                nNextInputLocation = 0;
+
+        wxMaskData* pobjData = NULL;
+        while(nNextInputLocation < (int) m_listData.GetCount()) {
+                pobjData = (wxMaskData *) (m_listData.Item(nNextInputLocation))->GetData();
+                if(pobjData->IsInputData())
+                        break;
+
+                nNextInputLocation++;
+        }
+
+        return nNextInputLocation;
+}
+
+int wxMaskedTextCtrl::GetPreviousInputLocation(int nSelectionStart)
+{
+        // One of the functions of this edit control is that it skips over literals.
+        // We need a function to help skip to the next position.
+        int nNextInputLocation=nSelectionStart;
+        if(nNextInputLocation < 0)
+                nNextInputLocation = 0;
+        // Need to determine if we moved to a previous location.
+        // There will need to be some correction.
+        int nInitialInputLocation=nNextInputLocation;
+
+        wxMaskData* pobjData = NULL;
+        for(wxNode* node = m_listData.Item(nNextInputLocation); node; nNextInputLocation--) {
+                pobjData = (wxMaskData *) node->GetData();
+                if(pobjData->IsInputData()) {
+                        if(nInitialInputLocation != nNextInputLocation) {
+                                // If we find a valid previous location, then move to the right of it.
+                                // This backup, then move forward is typical when seeking backward.
+                                if(m_bBackwardLocationRight)
+                                        nNextInputLocation++;
+                        }
+                        break;
+                }
+                node = node->GetPrevious();
+        }
+        // If there is no input data to the left of the selection,
+        // then seek forward to the next location.
+        if(nNextInputLocation < 0)
+                return GetNextInputLocation(nSelectionStart);
+        return nNextInputLocation;
+}
+
+int wxMaskedTextCtrl::GetEmptyInputLocation(int nSelectionStart)
+{
+        int nEmptyInputLocation=nSelectionStart;
+        if(nEmptyInputLocation < 0)
+                nEmptyInputLocation = 0;
+
+        wxMaskData* pobjData=NULL;
+        for(unsigned long pos = nEmptyInputLocation;; pos++,nEmptyInputLocation++) {
+                pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                if(pobjData->IsInputData()) {
+                        if(pobjData->m_chValue == m_chPromptSymbol)
+                                break;
+                }
+        }
+        return nEmptyInputLocation;
+}
+
+void wxMaskedTextCtrl::UpdateControl(int nSelectionStart)
+{
+        // Update the edit control if it exists.
+        wxString sText = ShowMask();
+        wxTextCtrl::SetValue(sText);
+        // We usually need to update the insertion point.
+        if(nSelectionStart >= 0)
+                UpdateInsertionPointForward(nSelectionStart);
+}
+
+void wxMaskedTextCtrl::UpdateInsertionPointForward(int nSelectionStart)
+{
+        int nNewInsertionPoint=GetNextInputLocation(nSelectionStart);
+
+        if(m_bAutoTab && (unsigned int) nNewInsertionPoint == m_listData.GetCount()) {
+                wxNavigationKeyEvent eventNav;
+                eventNav.SetDirection(TRUE);
+                eventNav.SetWindowChange(FALSE);
+                eventNav.SetEventObject(this);
+
+                GetParent()->GetEventHandler()->ProcessEvent(eventNav);
+        } else {
+                SetSelection(nNewInsertionPoint, nNewInsertionPoint);
+        }
+}
+
+void wxMaskedTextCtrl::UpdateInsertionPointBackward(int nSelectionStart)
+{
+        int nNewInsertionPoint=GetPreviousInputLocation(nSelectionStart);
+        SetSelection(nNewInsertionPoint, nNewInsertionPoint);
+}
+
+void wxMaskedTextCtrl::ValidationError()
+{
+        wxBell();
+}
+
+
+void wxMaskedTextCtrl::OnKeyDown(wxKeyEvent& event)
+{
+        // If there is no mask, then exit quickly performing the default operation.
+        long keycode = event.GetKeyCode();
+
+        if(m_listData.GetCount()== 0) {
+                event.Skip();
+                return;
+        }
+
+        // Keep the OnKeyDown processing to a minimum.  This is because the edit
+        // control does lots of processing before OnChar() is sent and we want
+        // to let it continue.
+        bool bIsShiftKeyDown=event.ShiftDown();
+        if(keycode == WXK_DELETE) {
+                long nSelectionStart = 0;
+                long nSelectionEnd = 0;
+                GetSelection(&nSelectionStart, &nSelectionEnd);
+
+                // Delete has two functions, it can delete the selection and
+                // it can delete characters to the right.
+                if(nSelectionStart==nSelectionEnd) {
+                        nSelectionEnd++; // Do the equivalent of a selection.
+                        if(DeleteRange(nSelectionStart, nSelectionEnd)) {
+                                UpdateControl(nSelectionStart);
+                        } else	// Must be on a literal, so continue moving to right
+                                // and re-attempting the delete until we either delete
+                                // a character or run out of characters.
+                        {
+                                while (nSelectionEnd != (long) m_listData.GetCount()) {
+                                        nSelectionStart++;
+                                        nSelectionEnd++; // Do the equivalent of a selection.
+                                        if(DeleteRange(nSelectionStart, nSelectionEnd)) {
+                                                UpdateControl(nSelectionStart);
+                                                break;
+                                        }
+                                }
+                        }
+                } else if(DeleteRange(nSelectionStart, nSelectionEnd)) {
+                        UpdateControl(nSelectionStart);
+                } else	// Must be on a literal, so continue moving to right
+                        // and reattempting the delete until we either delete
+                        // a character or run out of characters.
+                {
+                        while (nSelectionEnd != (long) m_listData.GetCount()) {
+                                nSelectionStart++;
+                                nSelectionEnd++; // Do the equivalent of a selection.
+                                if(DeleteRange(nSelectionStart, nSelectionEnd)) {
+                                        UpdateControl(nSelectionStart);
+                                        break;
+                                }
+                        }
+                }
+        } else if(keycode == WXK_HOME && !bIsShiftKeyDown) {
+                // If the shift key is not down, then HOME is a navigation and we need to
+                // move the insertion point to the first available position.
+
+                UpdateInsertionPointForward(0);
+        } else if(keycode == WXK_LEFT && !bIsShiftKeyDown) {
+                // If the shift key is not down, then LEFT is a navigation and we need to
+                // move the insertion point to the previous available position.
+                long nSelectionStart = 0;
+                long nSelectionEnd = 0;
+                GetSelection(&nSelectionStart, &nSelectionEnd);
+
+                UpdateInsertionPointBackward(nSelectionStart-1);
+        } else if(keycode == WXK_UP && !bIsShiftKeyDown) {
+                // If the shift key is not down, then UP is a navigation and we need to
+                // move the insertion point to the previous available position.
+                long nSelectionStart = 0;
+                long nSelectionEnd = 0;
+                GetSelection(&nSelectionStart, &nSelectionEnd);
+
+                UpdateInsertionPointBackward(nSelectionStart-1);
+        } else if(keycode == WXK_RIGHT && !bIsShiftKeyDown) {
+                // If the shift key is not down, then RIGHT is a navigation and we need to
+                // move the insertion point to the next available position.
+                long nSelectionStart = 0;
+                long nSelectionEnd = 0;
+                GetSelection(&nSelectionStart, &nSelectionEnd);
+
+                UpdateInsertionPointForward(nSelectionStart+1);
+        } else if(keycode == WXK_DOWN && !bIsShiftKeyDown) {
+                // If the shift key is not down, then DOWN is a navigation and we need to
+                // move the insertion point to the next available position.
+                long nSelectionStart = 0;
+                long nSelectionEnd = 0;
+                GetSelection(&nSelectionStart, &nSelectionEnd);
+
+                UpdateInsertionPointForward(nSelectionStart+1);
+        } else if(keycode == WXK_INSERT) {
+                // The standard CEdit control does not support over-typing.
+                // This flag is used to manage over-typing internally.
+                SetInsertMode(!GetInsertMode());
+        } else
+                event.Skip();
+}
+
+void wxMaskedTextCtrl::OnChar(wxKeyEvent& event)
+{
+        long keycode = event.GetKeyCode();
+        // If there is no mask, then exit quickly performing the default operation.
+        if(m_listData.GetCount()==0) {
+                wxTextCtrl::OnChar(event);
+                return;
+        }
+
+        long nSelectionStart = 0;
+        long nSelectionEnd = 0;
+        GetSelection(&nSelectionStart, &nSelectionEnd);
+
+        // If character value is above 32, then it is ANSI or Extended.
+        // Below 32 are control and navigation characters.
+        if(keycode >= 32 && wxIsprint((int) keycode)) {
+                if(nSelectionStart == nSelectionEnd) {
+                        if(IsInputData(nSelectionStart)) {
+                                int nActualInsertionPoint=nSelectionStart;
+                                if(m_bInsertMode)
+                                        nActualInsertionPoint=InsertAt(nSelectionStart, (wxChar) keycode);
+                                else
+                                        nActualInsertionPoint=SetAt(nSelectionStart, (wxChar) keycode);
+
+                                // InsertAt will return -1 if the character cannot be inserted here.
+                                if(nActualInsertionPoint >= 0)
+                                        nSelectionStart=nActualInsertionPoint + 1;
+                                else
+                                        ValidationError();
+
+                                UpdateControl(nSelectionStart);
+                        } else {
+                                // Beep if trying to type over a literal.
+                                ValidationError();
+                                UpdateInsertionPointForward(nSelectionStart);
+                        }
+                } else {
+                        // First delete the remaining selection.
+                        // The function will return a valid count if
+                        // some input characters were deleted. We use
+                        // this value to determine if it makes sense to insert.
+                        if(DeleteRange(nSelectionStart, nSelectionEnd)) {
+                                // InsertAt will place the character at the next available position,
+                                // then return that positition
+                                int nActualInsertionPoint=nSelectionStart;
+                                nActualInsertionPoint=InsertAt(nSelectionStart, (wxChar) keycode);
+
+                                // InsertAt will return -1 if the character cannot be inserted here.
+                                if(nActualInsertionPoint >= 0)
+                                        nSelectionStart=nActualInsertionPoint + 1;
+                                else
+                                        ValidationError();
+
+                                UpdateControl(nSelectionStart);
+                        } else { // Must be on a literal, so beep and move to a valid location.
+                                ValidationError();
+                                UpdateInsertionPointForward(nSelectionStart);
+                        }
+                }
+        } else {
+                if(keycode==WXK_BACK) {
+                        // Backspace performs two functions, if there is a selection,
+                        // then the backspace is the same as deleting the selection.
+                        // If there is no selection, then the backspace deletes the
+                        // first non-literal character to the left.
+                        if(nSelectionStart==nSelectionEnd) {
+                                if (nSelectionStart >= 1) {
+                                        while (nSelectionStart >= 0) {
+                                                nSelectionStart--; // Do the equivalent of a backspace.
+
+                                                if (DeleteRange(nSelectionStart, nSelectionEnd)) {
+                                                        UpdateControl(nSelectionStart);
+                                                        break;
+                                                }
+
+                                                nSelectionEnd--;
+                                        }
+                                }
+                        } else if(DeleteRange(nSelectionStart, nSelectionEnd)) {
+                                UpdateControl(nSelectionStart);
+                        } else	// Must be on a literal, so continue moving to left
+                                // and re-attempting the delete until we either delete
+                                // a character or run out of characters.
+                        {
+                                if (nSelectionStart >= 1) {
+                                        while (nSelectionStart >= 0) {
+                                                nSelectionStart--; // Do the equivalent of a backspace.
+
+                                                if (DeleteRange(nSelectionStart, nSelectionEnd)) {
+                                                        UpdateControl(nSelectionStart);
+                                                        break;
+                                                }
+                                                nSelectionEnd--;
+                                        }
+                                }
+                        }
+                } else
+                        // let edit control to do its job
+                        event.Skip();
+        }
+}
+
+void wxMaskedTextCtrl::OnSetFocus(wxFocusEvent& /*event*/)
+{
+        wxTextCtrl::SetFocus();
+        // The default behavior is to highlight the entire string.
+        // If this is the case, then move the insertion to the first input position.
+        long nSelectionStart = 0;
+        long nSelectionEnd = 0;
+        GetSelection(&nSelectionStart, &nSelectionEnd);
+        if((nSelectionStart == 0) && ((unsigned long) nSelectionEnd == GetValue().Length())) {
+                // Only update the insertion point if the entire string is selected.
+                // This will allow the mouse to be used to set the cursor without our interfering.
+                UpdateInsertionPointForward(0);
+        }
+}
+
+void wxMaskedTextCtrl::OnKillFocus(wxFocusEvent& /*event*/)
+{
+        Validate();
+}
+
+
+void wxMaskedTextCtrl::OnCut(wxUpdateUIEvent& event)
+{
+        if(m_listData.GetCount() == 0) {
+                event.Skip();
+                return;
+        }
+
+        long nSelectionStart = 0;
+        long nSelectionEnd = 0;
+        GetSelection(&nSelectionStart, &nSelectionEnd);
+
+        // First do our version of the cut.
+        if (nSelectionStart != nSelectionEnd) {
+                int nDeleteCount =  DeleteRange(nSelectionStart, nSelectionEnd);
+                if (nDeleteCount == 0)
+                        LOG_DEBUG("wx", "Deletecount zero even though the selection was not empty");
+        }
+
+        // Before updating, let the control do its normal thing.
+        // This will save us the effort of filling the clipboard.
+        wxTextCtrl::OnCut(event);
+
+        // Now we update with our standard mask.
+        UpdateControl(nSelectionStart);
+        /*	if(nDeleteCount==0)
+        	{
+        		// I don't think we want to beep if no input characters were cut.
+        		//ValidationError();
+        	}*/
+}
+
+void wxMaskedTextCtrl::OnCopy(wxUpdateUIEvent& event)
+{
+        // Just let copy do its thing and copy the selected text.
+        event.Skip();
+}
+
+void wxMaskedTextCtrl::OnPaste(wxUpdateUIEvent& event)
+{
+        if(m_listData.GetCount() == 0) {
+                event.Skip();
+                return;
+        }
+
+        long nSelectionStart = 0;
+        long nSelectionEnd = 0;
+        GetSelection(&nSelectionStart, &nSelectionEnd);
+
+        wxTextCtrl::OnPaste(event);
+
+
+        // This is a real dump paste routine that expects SetInputData do
+        // do the filtering.  There is probably no easy solution to this
+        // task because anything can be pasted.  We could try and match
+        // the literals, but maybe we will get to that later.
+        wxString csNewString = GetValue();
+
+        // It is very important that we do not allow the prompt character
+        // in this scenario.  This is because we expect the pasted text
+        // to contain lots of literals and spaces.
+        SetInputData(csNewString, 0, FALSE);
+        UpdateControl(-1);
+        // Setting the insertion point after a paste is tricky because the
+        // expected location is after the last valid pasted character.
+        // Try and determine this location by setting the insertion point
+        // to the first empty location after the specified starting point.
+        int nNewInsertionPoint = GetEmptyInputLocation(nSelectionStart);
+        SetSelection(nNewInsertionPoint, nNewInsertionPoint);
+}
+
+void wxMaskedTextCtrl::Clear()
+{
+        if(m_listData.GetCount() == 0)
+                wxTextCtrl::Clear();
+        else {
+                long nSelectionStart = 0;
+                long nSelectionEnd = 0;
+                GetSelection(&nSelectionStart, &nSelectionEnd);
+
+                // First do our version of the cut.
+                if (nSelectionStart != nSelectionEnd) {
+                        int nDeleteCount = DeleteRange(nSelectionStart, nSelectionEnd);
+
+                        // if the selection is not empty there should be some debug message
+                        if (nDeleteCount != 0)
+                                LOG_DEBUG("wx", "Deletecount zero even though the selection was not empty");
+                }
+
+                // Now we update with our standard mask.
+                UpdateControl(nSelectionStart);
+        }
+}
+
+bool wxMaskedTextCtrl::Validate()
+{
+        int day = 0, month = 0, year = 0, hour = 0, minute = 0, second = 0;
+        bool bDay = FALSE, bMonth = FALSE, bYear = FALSE, bHour = FALSE, bMinute = FALSE, bSecond = FALSE;
+        bool DateValid, TimeValid;
+        int year_len = 0;
+        unsigned long used = 0;
+        long StartPosDay = -1, EndPosDay = -1, StartPosMonth = -1, EndPosMonth = -1, StartPosYear = -1, EndPosYear = -1;
+        long StartPosHour = -1, EndPosHour = -1, StartPosMinute = -1, EndPosMinute = -1, StartPosSecond = -1, EndPosSecond = -1;
+
+        if(!m_bNeedValidation)
+                return m_bValidation;
+
+        wxMaskData* pobjData=NULL;
+        m_dtDateTime = wxInvalidDateTime;
+        for(unsigned long pos = 0; pos < m_listData.GetCount(); pos++) {
+                pobjData= (wxMaskData *) (m_listData.Item(pos))->GetData();
+                if(pobjData->m_eType == MaskDataTypeDIGIT) {
+                        if(pobjData->m_chValue != m_chPromptSymbol)
+                                used++;
+
+                        wxMaskData* pobjDataNext = NULL;
+
+                        switch(pobjData->m_eSubType) {
+                        case MaskDataSubTypeDATEDAY:
+                                bDay = TRUE;
+                                if(StartPosDay == -1) {
+                                        StartPosDay = pos;
+                                        EndPosDay = pos;
+                                }
+                                EndPosDay++;
+
+                                pobjDataNext = (wxMaskData *) (pos < (m_listData.GetCount()-1) ? (m_listData.Item(pos+1))->GetData() : NULL);
+                                if(pobjData->m_chValue != m_chPromptSymbol) {
+                                        day = (day * 10) + (pobjData->m_chValue - 48);
+
+                                        if(pobjDataNext != NULL) {
+                                                if(pobjDataNext->m_eType == MaskDataTypeDIGIT && pobjDataNext->m_eSubType == MaskDataSubTypeDATEDAY) {
+                                                        day = (day * 10) + (pobjDataNext->m_chValue != m_chPromptSymbol ? (pobjDataNext->m_chValue - 48) : 0);
+                                                        EndPosDay++;
+                                                        pos++;
+                                                }
+                                        }
+                                }
+                                break;
+
+                        case MaskDataSubTypeDATEMONTH:
+                                bMonth = TRUE;
+                                if(StartPosMonth == -1) {
+                                        StartPosMonth = pos;
+                                        EndPosMonth = pos;
+                                }
+                                EndPosMonth++;
+
+                                pobjDataNext = (wxMaskData *) (pos < (m_listData.GetCount()-1) ? (m_listData.Item(pos+1))->GetData() : NULL);
+                                if(pobjData->m_chValue != m_chPromptSymbol) {
+                                        month = (month * 10) + (pobjData->m_chValue - 48);
+
+                                        if(pobjDataNext != NULL) {
+                                                if(pobjDataNext->m_eType == MaskDataTypeDIGIT && pobjDataNext->m_eSubType == MaskDataSubTypeDATEMONTH) {
+                                                        month = (month * 10) + (pobjDataNext->m_chValue != m_chPromptSymbol ? (pobjDataNext->m_chValue - 48) : 0);
+                                                        EndPosMonth++;
+                                                        pos++;
+                                                }
+                                        }
+                                }
+                                break;
+
+                        case MaskDataSubTypeDATEYEAR:
+                                bYear = TRUE;
+                                if(StartPosYear == -1) {
+                                        StartPosYear = pos;
+                                        EndPosYear = pos;
+                                }
+                                EndPosYear++;
+
+                                if(pobjData->m_chValue != m_chPromptSymbol) {
+                                        year = (year * 10) + (pobjData->m_chValue - 48);
+                                        year_len++;
+                                }
+                                break;
+
+                        case MaskDataSubTypeTIMEHOUR:
+                                bHour = TRUE;
+                                if(StartPosHour == -1) {
+                                        StartPosHour = pos;
+                                        EndPosHour = pos;
+                                }
+                                EndPosHour++;
+
+                                pobjDataNext = (wxMaskData *) (pos < (m_listData.GetCount()-1) ? (m_listData.Item(pos+1))->GetData() : NULL);
+                                if(pobjData->m_chValue != m_chPromptSymbol) {
+                                        hour = (hour * 10) + (pobjData->m_chValue - 48);
+
+                                        if(pobjDataNext != NULL) {
+                                                if(pobjDataNext->m_eType == MaskDataTypeDIGIT && pobjDataNext->m_eSubType == MaskDataSubTypeTIMEHOUR) {
+                                                        hour = (hour * 10) + (pobjDataNext->m_chValue != m_chPromptSymbol ? (pobjDataNext->m_chValue - 48) : 0);
+                                                        EndPosHour++;
+                                                        pos++;
+                                                }
+                                        }
+                                }
+                                break;
+
+                        case MaskDataSubTypeTIMEMINUTE:
+                                bMinute = TRUE;
+                                if(StartPosMinute == -1) {
+                                        StartPosMinute = pos;
+                                        EndPosMinute = pos;
+                                }
+                                EndPosMinute++;
+
+                                pobjDataNext = (wxMaskData *) (pos < (m_listData.GetCount()-1) ? (m_listData.Item(pos+1))->GetData() : NULL);
+                                if(pobjData->m_chValue != m_chPromptSymbol) {
+
+                                        minute = (minute * 10) + (pobjData->m_chValue - 48);
+
+                                        if(pobjDataNext != NULL) {
+                                                if(pobjDataNext->m_eType == MaskDataTypeDIGIT && pobjDataNext->m_eSubType == MaskDataSubTypeTIMEMINUTE) {
+                                                        minute = (minute * 10) + (pobjDataNext->m_chValue != m_chPromptSymbol ? (pobjDataNext->m_chValue - 48) : 0);
+                                                        EndPosMinute++;
+                                                        pos++;
+                                                }
+                                        }
+                                }
+                                break;
+
+                        case MaskDataSubTypeTIMESECOND:
+                                bSecond = TRUE;
+                                if(StartPosSecond == -1) {
+                                        StartPosSecond = pos;
+                                        EndPosSecond = pos;
+                                }
+                                EndPosSecond++;
+
+                                pobjDataNext = (wxMaskData *) (pos < (m_listData.GetCount()-1) ? (m_listData.Item(pos+1))->GetData() : NULL);
+                                if(pobjData->m_chValue != m_chPromptSymbol) {
+                                        second = (second * 10) + (pobjData->m_chValue - 48);
+
+                                        if(pobjDataNext != NULL) {
+                                                if(pobjDataNext->m_eType == MaskDataTypeDIGIT && pobjDataNext->m_eSubType == MaskDataSubTypeTIMESECOND) {
+                                                        second = (second * 10) + (pobjDataNext->m_chValue != m_chPromptSymbol ? (pobjDataNext->m_chValue - 48) : 0);
+                                                        EndPosSecond++;
+                                                        pos++;
+                                                }
+                                        }
+                                }
+                                break;
+                        default:
+                                break;
+                        }
+                }
+        }
+
+        m_bNeedValidation = FALSE;
+
+        if(used == 0)
+                return (m_bValidation = TRUE);
+
+        bool minValid = m_dtMinDateTime.IsValid();
+        bool maxValid = m_dtMaxDateTime.IsValid();
+
+        DateValid = TRUE;
+        if(bDay || bMonth || bYear) {
+                long pos;
+                wxDateTime minDate = m_dtMinDateTime;
+                wxDateTime maxDate = m_dtMaxDateTime;
+                wxDateTime Date = wxDateTime(1, wxDateTime::Jan, (wxDateTime::Now()).GetYear(), 0, 0, 0, 0);
+
+                if((bDay && day == 0) || (bMonth && month == 0))
+                        DateValid = FALSE;
+                else if((bDay && day > 31) || (bMonth && month > 12))
+                        DateValid = FALSE;
+
+                if(DateValid) {
+                        if(bYear && year_len < 3 && year < 100) {
+                                if(year_len == 0) {
+                                        year = (wxDateTime::Now()).GetYear();
+                                        year_len = 1;
+                                } else
+                                        year += ((wxDateTime::Now()).GetYear() / 1000) * 1000;
+                        }
+
+                        if(bYear) {
+                                if(StartPosYear != -1) {
+                                        wxString Year_Str = wxString::Format(wxT("%04d"), year);
+
+                                        for(pos = StartPosYear; pos < EndPosYear; pos++)
+                                                SetAt(pos, Year_Str[(int) (Year_Str.Length() + pos - EndPosYear)]);
+                                }
+
+                                Date.SetYear(year);
+
+                                if(minValid) {
+                                        minDate.SetMonth(wxDateTime::Jan);
+                                        minDate.SetDay(1);
+                                }
+
+                                if(maxValid) {
+                                        maxDate.SetMonth(wxDateTime::Dec);
+                                        maxDate.SetDay(31);
+                                }
+                        } else {
+                                if(minValid)
+                                        minDate.SetYear(Date.GetYear());
+
+                                if(maxValid)
+                                        maxDate.SetYear(Date.GetYear());
+                        }
+
+                        if(bMonth) {
+                                if(StartPosMonth != -1) {
+                                        wxString Month_Str = wxString::Format(wxT("%02d"), month);
+
+                                        for(pos = StartPosMonth; pos < EndPosMonth; pos++)
+                                                SetAt(pos, Month_Str[(int) (pos - StartPosMonth)]);
+                                }
+
+                                Date.SetMonth(wxDateTime::Month(month-1));
+
+                                if(minValid)
+                                        minDate.SetMonth(m_dtMinDateTime.GetMonth());
+
+                                if(maxValid) {
+                                        maxDate.SetDay(1);
+                                        maxDate.SetMonth(m_dtMaxDateTime.GetMonth());
+                                        maxDate.SetDay(m_dtMaxDateTime.GetNumberOfDays(m_dtMaxDateTime.GetMonth(), m_dtMaxDateTime.GetYear()));
+                                }
+                        } else {
+                                if(minValid)
+                                        minDate.SetMonth(m_dtMinDateTime.GetMonth());
+
+                                if(maxValid)
+                                        maxDate.SetMonth(m_dtMaxDateTime.GetMonth());
+                        }
+
+                        if(bDay) {
+                                if(StartPosDay != -1) {
+                                        wxString Day_Str = wxString::Format(wxT("%02d"), day);
+
+                                        for(pos = StartPosDay; pos < EndPosDay; pos++)
+                                                SetAt(pos, Day_Str[(int) (pos - StartPosDay)]);
+                                }
+
+                                if(day > Date.GetNumberOfDays(Date.GetMonth(), Date.GetYear()))
+                                        DateValid = FALSE;
+
+                                if(DateValid) {
+                                        Date.SetDay(day);
+
+                                        if(minValid)
+                                                minDate.SetDay(m_dtMinDateTime.GetDay());
+
+                                        if(maxValid)
+                                                maxDate.SetDay(m_dtMaxDateTime.GetDay());
+                                }
+                        } else {
+                                if(minValid)
+                                        minDate.SetDay(1);
+
+                                if(maxValid)
+                                        maxDate.SetDay(m_dtMaxDateTime.GetNumberOfDays(m_dtMaxDateTime.GetMonth(), m_dtMaxDateTime.GetYear()));
+                        }
+
+                        if(DateValid) {
+                                if(!Date.IsValid())
+                                        DateValid = FALSE;
+
+                                if(minValid && m_bValidation) {
+                                        if(Date.IsEarlierThan(minDate))
+                                                DateValid = FALSE;
+                                }
+
+                                if(maxValid && m_bValidation) {
+                                        if(Date.IsLaterThan(maxDate))
+                                                DateValid = FALSE;
+                                }
+
+                                m_dtDateTime = Date;
+                        }
+                }
+        }
+
+        TimeValid = TRUE;
+        if(bHour || bMinute || bSecond) {
+                long pos;
+                wxDateTime minDate = m_dtMinDateTime;
+                wxDateTime maxDate = m_dtMaxDateTime;
+                wxDateTime Date;
+
+                if(m_dtDateTime.IsValid())
+                        Date = m_dtDateTime;
+                else
+                        Date = wxDateTime(1, wxDateTime::Jan, (wxDateTime::Now()).GetYear(), 0, 0, 0, 0);
+
+                if((bHour && hour > 23) || (bMinute && minute > 59) || (bSecond && second > 59))
+                        TimeValid = FALSE;
+
+                if(TimeValid) {
+                        if(bHour) {
+                                if(StartPosHour != -1) {
+                                        wxString Hour_Str = wxString::Format(wxT("%02d"), hour);
+
+                                        for(pos = StartPosHour; pos < EndPosHour; pos++)
+                                                SetAt(pos, Hour_Str[(int) (pos - StartPosHour)]);
+                                }
+
+                                Date.SetHour(hour);
+                        } else {
+                                if(minValid)
+                                        minDate.SetHour(0);
+
+                                if(maxValid)
+                                        maxDate.SetHour(1);
+                        }
+
+                        if(bMinute) {
+                                if(StartPosMinute != -1) {
+                                        wxString Minute_Str = wxString::Format(wxT("%02d"), minute);
+
+                                        for(pos = StartPosMinute; pos < EndPosMinute; pos++)
+                                                SetAt(pos, Minute_Str[(int) (pos - StartPosMinute)]);
+                                }
+
+                                Date.SetMinute(minute);
+                        } else {
+                                if(minValid)
+                                        minDate.SetMinute(0);
+
+                                if(maxValid)
+                                        maxDate.SetMinute(59);
+                        }
+
+                        if(bSecond) {
+                                if(StartPosSecond != -1) {
+                                        wxString Second_Str = wxString::Format(wxT("%02d"), second);
+
+                                        for(pos = StartPosSecond; pos < EndPosSecond; pos++)
+                                                SetAt(pos, Second_Str[(int) (pos - StartPosSecond)]);
+                                }
+
+                                Date.SetSecond(second);
+                        } else {
+                                if(minValid)
+                                        minDate.SetSecond(0);
+
+                                if(maxValid)
+                                        maxDate.SetSecond(59);
+                        }
+
+                        if(!Date.IsValid())
+                                TimeValid = FALSE;
+
+                        if(TimeValid) {
+                                if(minValid) {
+                                        if(Date.IsEarlierThan(minDate))
+                                                TimeValid = FALSE;
+                                }
+
+                                if(maxValid) {
+                                        if(Date.IsLaterThan(maxDate))
+                                                TimeValid = FALSE;
+                                }
+
+                                m_dtDateTime.Set(hour, minute, second);
+                        }
+                }
+        }
+
+        UpdateControl(-1);
+
+        m_bValidation = DateValid & TimeValid;
+        m_bNeedValidation = FALSE;
+
+        return m_bValidation;
+}
+
+bool wxMaskedTextCtrl::IsValid(void)
+{
+        if(m_bNeedValidation)
+                Validate();
+
+        return m_bValidation;
+}
+
+void wxMaskedTextCtrl::OnLeftButtonDown(wxMouseEvent& event)
+{
+        if(FindFocus()!= this && IsInputEmpty()) {
+                SetFocus();
+                UpdateInsertionPointForward(0);
+        } else
+                event.Skip();
+}
+
+bool wxMaskedTextCtrl::IsEmpty(void) const
+{
+        return IsInputEmpty();
+}
+
+wxDateTime wxMaskedTextCtrl::GetMinDateTime(void)
+{
+        return m_dtMinDateTime;
+}
+
+void wxMaskedTextCtrl::SetMinDateTime(wxDateTime& minDateTime)
+{
+        m_dtMinDateTime = minDateTime;
+}
+
+wxDateTime wxMaskedTextCtrl::GetMaxDateTime(void)
+{
+        return m_dtMaxDateTime;
+}
+
+void wxMaskedTextCtrl::SetMaxDateTime(wxDateTime& maxDateTime)
+{
+        m_dtMaxDateTime = maxDateTime;
+}
+
+void wxMaskedTextCtrl::SetDateTimeRange(wxDateTime& minDateTime, wxDateTime& maxDateTime)
+{
+        m_dtMinDateTime = minDateTime;
+        m_dtMaxDateTime = maxDateTime;
+}
+
+void wxMaskedTextCtrl::SetValue(const wxString& value)
+{
+        if(m_listData.GetCount() == 0)
+                wxTextCtrl::SetValue(value);
+        else
+                SetInputData(value, 0, TRUE);
+}
+
+void wxMaskedTextCtrl::SetDateTimeValue(wxDateTime& value)
+{
+        wxMaskData *pobjData = NULL, *pobjDataNext = NULL;
+        wxString str_Value;
+        long length;
+        int year_len;
+
+        if(m_listData.GetCount() == 0 && value.IsValid())
+                return;
+
+        for(long pos = 0; pos < (long) m_listData.GetCount(); pos++) {
+                pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                if(pobjData->m_eType == MaskDataTypeDIGIT) {
+                        if(pobjData->m_eSubType == MaskDataSubTypeDATEDAY) {
+                                pobjDataNext = (wxMaskData *) (pos < (long) (m_listData.GetCount()-1) ? (m_listData.Item(pos+1))->GetData() : NULL);
+                                if(pobjDataNext) {
+                                        if(pobjData->m_eType == MaskDataTypeDIGIT && pobjData->m_eSubType == MaskDataSubTypeDATEDAY)
+                                                str_Value = wxString::Format(wxT("%02d"), value.GetDay());
+                                        else
+                                                str_Value = wxString::Format(wxT("%d"), value.GetDay() % 10);
+                                }
+
+                        } else if(pobjData->m_eSubType == MaskDataSubTypeDATEMONTH) {
+                                pobjDataNext = (wxMaskData *) (pos < (long) (m_listData.GetCount()-1) ? (m_listData.Item(pos+1))->GetData() : NULL);
+                                if(pobjDataNext) {
+                                        if(pobjData->m_eType == MaskDataTypeDIGIT && pobjData->m_eSubType == MaskDataSubTypeDATEMONTH)
+                                                str_Value = wxString::Format(wxT("%02d"), value.GetMonth());
+                                        else
+                                                str_Value = wxString::Format(wxT("%d"), value.GetMonth() % 10);
+                                }
+                        } else if(pobjData->m_eSubType == MaskDataSubTypeDATEYEAR) {
+                                year_len = 1;
+                                for(long i = pos; i < (long) m_listData.GetCount(); i++) {
+                                        pobjDataNext = (wxMaskData *) (m_listData.Item(pos+1))->GetData();
+                                        if(pobjDataNext->m_eType == MaskDataTypeDIGIT && pobjDataNext->m_eSubType == MaskDataSubTypeDATEYEAR)
+                                                year_len++;
+                                        else
+                                                break;
+                                }
+                                str_Value = (wxString::Format(wxT("%04d"), value.GetYear())).Right(year_len);;
+                        } else if(pobjData->m_eSubType == MaskDataSubTypeTIMEHOUR) {
+                                pobjDataNext = (wxMaskData *) (pos < (long) (m_listData.GetCount()-1) ? (m_listData.Item(pos+1))->GetData() : NULL);
+                                if(pobjDataNext) {
+                                        if(pobjData->m_eType == MaskDataTypeDIGIT && pobjData->m_eSubType == MaskDataSubTypeTIMEHOUR)
+                                                str_Value = wxString::Format(wxT("%02d"), value.GetHour());
+                                        else
+                                                str_Value = wxString::Format(wxT("%d"), value.GetHour() % 10);
+                                }
+                        } else if(pobjData->m_eSubType == MaskDataSubTypeTIMEMINUTE) {
+                                pobjDataNext = (wxMaskData *) (pos < (long) (m_listData.GetCount()-1) ? (m_listData.Item(pos+1))->GetData() : NULL);
+                                if(pobjDataNext) {
+                                        if(pobjData->m_eType == MaskDataTypeDIGIT && pobjData->m_eSubType == MaskDataSubTypeTIMEMINUTE)
+                                                str_Value = wxString::Format(wxT("%02d"), value.GetMinute());
+                                        else
+                                                str_Value = wxString::Format(wxT("%d"), value.GetMinute() % 10);
+                                }
+                        } else if(pobjData->m_eSubType == MaskDataSubTypeTIMESECOND) {
+                                pobjDataNext = (wxMaskData *) (pos < (long) (m_listData.GetCount()-1) ? (m_listData.Item(pos+1))->GetData() : NULL);
+                                if(pobjDataNext) {
+                                        if(pobjData->m_eType == MaskDataTypeDIGIT && pobjData->m_eSubType == MaskDataSubTypeTIMESECOND)
+                                                str_Value = wxString::Format(wxT("%02d"), value.GetSecond());
+                                        else
+                                                str_Value = wxString::Format(wxT("%d"), value.GetSecond() % 10);
+                                }
+                        }
+
+                        length = str_Value.Length();
+                        if(pos + length > (long) m_listData.GetCount())
+                                length = (long) str_Value.Length() - pos;
+
+                        for(long i = pos; pos < (long) (i + length); pos++)
+                                SetAt(pos, str_Value[(int) (pos-i)]);
+                }
+        }
+        UpdateControl();
+}
+
+wxDateTime wxMaskedTextCtrl::GetDateTimeValue()
+{
+        if(m_bNeedValidation)
+                Validate();
+
+        return m_dtDateTime;
+}
+
+int wxMaskedTextCtrl::RPtoLP(int nRealPos)
+{
+        // All wxMaskedTextCtrl functions that take cursor position as argument interpret it
+        // as real position within edit control (taking into account all symbols including
+        // literals). But sometimes we want to know which non-literal symbol is at
+        // particular real position. In that case this function is really useful
+
+        if(nRealPos < 0 || nRealPos >= (int) m_listData.GetCount())
+                return -1;
+
+        int nLogicalPos = -1;
+        wxMaskData* pobjData = NULL;
+        int nNextInputLocation = 0;
+        for(unsigned long pos = nNextInputLocation; pos < m_listData.GetCount(); pos++, nNextInputLocation++) {
+                pobjData = (wxMaskData *) (m_listData.Item(pos))->GetData();
+                if(pobjData->IsInputData()) {
+                        nLogicalPos++;
+                }
+                if(nNextInputLocation == nRealPos) {
+                        return pobjData->IsInputData() ? nLogicalPos : -1;
+                }
+        }
+
+        return -1;
+}
+
+int wxMaskedTextCtrl::LPtoRP(int nLogicalPos)
+{
+        // All wxMaskedTextCtrl functions that take cursor position as argument interpret it
+        // as real position within edit control (taking into account all symbols including
+        // literals). But sometimes we want to set cursor at position before or after
+        // particular non-literal symbol. In that case this function is really useful
+
+        if(nLogicalPos < 0 || nLogicalPos >= (int) m_listData.GetCount())
+                return -1;
+
+        int nRealPos = -1;
+        int nNonLiterals = -1;
+        wxMaskData* pobjData = NULL;
+        int nNextInputLocation = 0;
+        for(unsigned long pos = nNextInputLocation; pos < m_listData.GetCount(); pos++, nNextInputLocation++) {
+                pobjData= (wxMaskData *) (m_listData.Item(pos))->GetData();
+                nRealPos++;
+                if(pobjData->IsInputData()) {
+                        nNonLiterals++;
+                        if(nNonLiterals == nLogicalPos) {
+                                return nRealPos;
+                        }
+                }
+        }
+
+        return -1;
+}
diff --git a/cadxcore/wx/maskedtextctrl/maskedtextctrl.h b/cadxcore/wx/maskedtextctrl/maskedtextctrl.h
new file mode 100644
index 0000000..2e6fb61
--- /dev/null
+++ b/cadxcore/wx/maskedtextctrl/maskedtextctrl.h
@@ -0,0 +1,192 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        wxMaskedTextCtrl.h
+// Purpose:     wxMaskedTextCtrl: masked edit control class
+// Author:      Thomas H�rtel
+// Modified by:
+// Created:     2002-11-14
+// RCS-ID:      $Id: wxMaskedTextCtrl.h,v $
+// Copyright:   (c) Thomas H�rtel
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+#pragma once
+#include <api/api.h>
+#include <wx/list.h>
+#include <wx/datetime.h>
+#include <wx/textctrl.h>
+
+const wxChar chNULL = wxT('\0') ;
+const wxChar chDECIMALNULL = wxT('0') ;
+const wxChar chCR = wxT('\r') ;
+const wxChar chLF = wxT('\n') ;
+const wxChar chSPACE = wxT('_') ;
+const wxChar chPERIOD = wxT('.') ;
+const wxChar chCOMMA = wxT(',') ;
+const wxChar chCOLON = wxT(':') ;
+const wxChar chSLASH = wxT('/') ;
+
+/////////////////////////////////////////////////////////////////////////////
+// wxMaskData object
+
+const wxChar chMaskPlaceholderDECIMALSEPARATOR = wxT('.');
+const wxChar chMaskPlaceholderTHOUSANDSSEPARATOR = wxT(',');
+const wxChar chMaskPlaceholderTIMESEPARATOR = wxT(':');
+const wxChar chMaskPlaceholderDATESEPARATOR = wxT('/');
+const wxChar chMaskPlaceholderDIGIT = wxT('#');
+const wxChar chMaskPlaceholderALPHANUMERIC = wxT('A');
+const wxChar chMaskPlaceholderALPHABETIC = wxT('?');
+const wxChar chMaskPlaceholderALPHABETICUPPER = wxT('>');
+const wxChar chMaskPlaceholderALPHABETICLOWER = wxT('<');
+const wxChar chMaskPlaceholderCHARACTER = wxT('&');
+const wxChar chMaskPlaceholderLITERALESCAPE = wxT('\\');
+const wxChar chMaskPlaceholderDATEDAY = wxT('d');
+const wxChar chMaskPlaceholderDATEMONTH = wxT('m');
+const wxChar chMaskPlaceholderDATEYEAR = wxT('y');
+const wxChar chMaskPlaceholderTIMEHOUR = wxT('h');
+const wxChar chMaskPlaceholderTIMEMINUTE = wxT('n');
+const wxChar chMaskPlaceholderTIMESECOND = wxT('s');
+
+enum enumMaskDataType {
+        MaskDataTypeDECIMALSEPARATOR=0,  // Decimal separator.
+        MaskDataTypeTHOUSANDSSEPARATOR,  // Thousands separator.
+        MaskDataTypeTIMESEPARATOR     ,  // Time separator.
+        MaskDataTypeDATESEPARATOR     ,  // Date separator.
+        MaskDataTypeDIGIT             ,  // # digit placeholder (0-9).
+        MaskDataTypeALPHANUMERIC      ,  // A alphanumeric character placeholder (0-9 and a-Z).
+        MaskDataTypeALPHABETIC        ,  // ? Alphabetic placeholder (a-Z).
+        MaskDataTypeALPHAETICUPPER    ,  // > Alphabetic placeholder, but forced to Uppercase characters (A-Z).
+        MaskDataTypeALPHAETICLOWER    ,  // < Alphabetic placeholder, but forced to Lowercase characters (a-z).
+        MaskDataTypeCHARACTER         ,  // # character placeholder (ANSI characters 32-126 and 128-255).
+        MaskDataTypeLITERALESCAPE     ,  // All other symbols are displayed as themselves.
+        MaskDataTypeLITERAL           ,  // All other symbols are displayed as themselves.
+        MASKDATATYPECOUNT
+};
+
+enum enumMaskDataSubType {
+        MaskDataSubTypeNONE = 0,
+        MaskDataSubTypeDATEDAY,
+        MaskDataSubTypeDATEMONTH,
+        MaskDataSubTypeDATEYEAR,
+        MaskDataSubTypeTIMEHOUR,
+        MaskDataSubTypeTIMEMINUTE,
+        MaskDataSubTypeTIMESECOND,
+        MASKDATASUBTYPECOUNT
+};
+
+class EXTAPI wxMaskData : public wxObject
+{
+        DECLARE_DYNAMIC_CLASS(wxMaskData)
+
+public:
+        wxMaskData();
+        virtual ~wxMaskData();
+
+// Attributes
+public:
+        enumMaskDataType m_eType;
+        enumMaskDataSubType m_eSubType;
+        wxChar m_chValue;
+
+// Operations
+public:
+        void operator=(const wxMaskData& src);
+        bool IsInputData();
+        bool IsValidInput(wxChar chNewChar);
+        wxChar PreProcessChar(wxChar chNewChar);
+};
+
+class EXTAPI wxMaskedTextCtrl : public wxTextCtrl
+{
+        DECLARE_DYNAMIC_CLASS(wxMaskedTextCtrl)
+
+// Member functions ---------------------------------------------------------
+public:
+        wxMaskedTextCtrl();
+        wxMaskedTextCtrl(wxWindow *parent, wxWindowID id, const wxString& mask, const wxString &value, const wxPoint &pos, const wxSize &size, int style);
+        virtual ~wxMaskedTextCtrl();
+
+        wxString GetMask();
+        void SetMask(wxString& mask);
+        wxChar GetPromptSymbol();
+        void SetPromptSymbol(wxChar chNewPromptSymbol);
+        wxChar GetDecimalSeperator();
+        void SetDecimalSeperator(wxChar chNewDecimalSeperator);
+        wxChar GetThousandsSeperator();
+        void SetThousandsSeperator(wxChar chNewThousandsSeperator);
+        wxChar GetTimeSeperator();
+        void SetTimeSeperator(wxChar chNewTimeSeperator);
+        wxChar GetDateSeperator();
+        void SetDateSeperator(wxChar chNewDateSeperator);
+        bool GetInsertMode();
+        void SetInsertMode(bool bInsertMode);
+        bool GetAutoTab();
+        void SetAutoTab(bool bAutoTab);
+        bool GetBackwardLocationRight();
+        void SetBackwardLocationRight(bool bRight=TRUE);
+        wxDateTime GetMinDateTime(void);
+        void SetMinDateTime(wxDateTime& minDateTime);
+        wxDateTime GetMaxDateTime(void);
+        void SetMaxDateTime(wxDateTime& maxDateTime);
+        void SetDateTimeRange(wxDateTime& minDateTime, wxDateTime& maxDateTime);
+
+        void Clear();
+        void SetValue(const wxString& value);
+        wxDateTime GetDateTimeValue();
+        void SetDateTimeValue(wxDateTime& value);
+
+// Internal Member functions ------------------------------------------------
+protected:
+        // Event Handler
+        void OnKeyDown(wxKeyEvent& event);
+        void OnChar(wxKeyEvent& event);
+        void OnSetFocus(wxFocusEvent& event);
+        void OnKillFocus(wxFocusEvent& event);
+        void OnLeftButtonDown(wxMouseEvent& event);
+        void OnCut(wxUpdateUIEvent& event);
+        void OnCopy(wxUpdateUIEvent& event);
+        void OnPaste(wxUpdateUIEvent& event);
+        DECLARE_EVENT_TABLE();
+
+        wxString ShowMask();
+        wxString GetInputData();
+        wxString GetInputData(wxString& value);
+        bool SetInputData(const wxString& value, int nBeginPos=0, bool bAllowPrompt=TRUE);
+        void EmptyData(bool bOnlyInput=FALSE);
+        bool IsInputEmpty() const;
+        bool IsEmpty() const;
+        virtual void ValidationError();
+        bool Validate();
+        bool IsValid(void);
+        int RPtoLP(int nRealPos);
+        int LPtoRP(int nLogicalPos);
+
+        void DeleteContents();
+        bool IsInputData(int nPosition);
+        int DeleteRange(int nSelectionStart, int nSelectionEnd);
+        int InsertAt(int nSelectionStart, wxChar chNewChar);
+        int SetAt(int nSelectionStart, wxChar chNewChar);
+        int GetNextInputLocation(int nSelectionStart);
+        int GetPreviousInputLocation(int nSelectionStart);
+        int GetEmptyInputLocation(int nSelectionStart);
+
+        void UpdateControl(int nSelectionStart=0);  // UpdateInsertionPoint is automatic.
+        void UpdateInsertionPointForward(int nSelectionStart);
+        void UpdateInsertionPointBackward(int nSelectionStart);
+
+// Data members -------------------------------------------------------------
+        wxList m_listData;
+
+        bool m_bInsertMode;
+        wxChar m_chPromptSymbol;
+        wxChar m_chIntlDecimal;
+        wxChar m_chIntlThousands;
+        wxChar m_chIntlTime;
+        wxChar m_chIntlDate;
+        bool m_bAutoTab;
+        bool m_bBackwardLocationRight;
+        bool m_bNeedValidation;
+        bool m_bValidation;
+
+        wxDateTime m_dtDateTime;
+        wxDateTime m_dtMinDateTime;
+        wxDateTime m_dtMaxDateTime;
+};
diff --git a/cadxcore/wx/propiedades/Propiedades.fbp b/cadxcore/wx/propiedades/Propiedades.fbp
new file mode 100644
index 0000000..18b5da9
--- /dev/null
+++ b/cadxcore/wx/propiedades/Propiedades.fbp
@@ -0,0 +1,640 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration"></property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">wxpropiedadesbase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">Propiedades</property>
+        <property name="namespace">"GNC" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">385,441</property>
+            <property name="name">wxPropiedadesBase</property>
+            <property name="pos"></property>
+            <property name="size">385,441</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">Properties of ...</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose">OnClose</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize">OnSize</event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer28</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxNotebook" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="bitmapsize"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pNotebook</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnNotebookPageChanged"></event>
+                        <event name="OnNotebookPageChanging"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="notebookpage" expanded="1">
+                            <property name="bitmap"></property>
+                            <property name="label">General</property>
+                            <property name="select">0</property>
+                            <object class="wxScrolledWindow" expanded="1">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pGeneral</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="scroll_rate_x">5</property>
+                                <property name="scroll_rate_y">5</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass"></property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxHSCROLL|wxVSCROLL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="1">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pSizerGeneral</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">protected</property>
+                                    <object class="sizeritem" expanded="1">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxBoxSizer" expanded="1">
+                                            <property name="minimum_size"></property>
+                                            <property name="name">bSizer7</property>
+                                            <property name="orient">wxHORIZONTAL</property>
+                                            <property name="permission">none</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticBitmap" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="bitmap">Load From File; </property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pIcono</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size">48,48</property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALIGN_CENTER|wxALL</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxStaticText" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Widget's Name</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_pNombreWidget</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <property name="wrap">-1</property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">0</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size">-1,-1</property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelBotones</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">m_pArchSizerPanelPropiedades</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">2</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">10</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">&Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBCerrar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick"></event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/wx/propiedades/wxpropiedades.cpp b/cadxcore/wx/propiedades/wxpropiedades.cpp
new file mode 100644
index 0000000..8a1fac9
--- /dev/null
+++ b/cadxcore/wx/propiedades/wxpropiedades.cpp
@@ -0,0 +1,84 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "wxpropiedades.h"
+#include <sstream>
+#include <wx/statline.h>
+#include <wx/textctrl.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+
+namespace GNC
+{
+namespace GUI
+{
+wxPropiedades::wxPropiedades( wxWindow* parent, const std::string& nombre, const TListaMapasPropiedades& listaMapas):wxPropiedadesBase(parent)
+{
+        m_pIcono->SetBitmap(GinkgoResourcesManager::Logos::GetLogoGinkgo48x48());
+
+        {
+                std::stringstream ostr;
+                ostr << _Std("Properties of ") <<nombre;
+                SetTitle(wxString::FromUTF8(ostr.str().c_str()));
+                m_pNombreWidget->SetLabel(wxString::FromUTF8(nombre.c_str()));
+        }
+
+        for(TListaMapasPropiedades::const_iterator itLista = listaMapas.begin(); itLista!= listaMapas.end(); itLista++) {
+                //agrego la linea
+                wxStaticLine* staticline = new wxStaticLine( m_pGeneral, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+                m_pSizerGeneral->Add( staticline, 0, wxEXPAND | wxALL, 5 );
+
+                //creo el sizer
+                wxFlexGridSizer* pSizer;
+                pSizer = new wxFlexGridSizer( 0, 2, 0, 0 );
+                pSizer->SetFlexibleDirection( wxBOTH );
+                pSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+                pSizer->AddGrowableCol(1, 1);
+                m_pSizerGeneral->Add( pSizer, 0, wxEXPAND|wxALL, 5 );
+
+                for(TMapaPropiedades::const_iterator itMapa = (*itLista).begin(); itMapa!=(*itLista).end(); itMapa++) {
+                        std::stringstream ostr;
+                        ostr << (*itMapa).first << ":";
+                        //agrego los ids
+                        pSizer->Add(new wxStaticText(m_pGeneral,wxID_ANY,wxString::FromUTF8(ostr.str().c_str())), 0, wxEXPAND | wxALL, 2);
+                        wxTextCtrl* pText = new wxTextCtrl(m_pGeneral, wxID_ANY, wxString::FromUTF8((*itMapa).second.c_str()), wxDefaultPosition, wxDefaultSize, wxTE_READONLY | wxNO_BORDER);
+                        pText->SetBackgroundColour(m_pGeneral->GetBackgroundColour());
+                        pSizer->Add(pText, 1, wxEXPAND|wxALL, 2);
+                }
+
+        }
+        m_pGeneral->SetScrollRate(5,5);
+        m_pGeneral->FitInside();
+        m_pGeneral->Layout();
+        Layout();
+}
+
+wxPropiedades::~wxPropiedades()
+{
+}
+
+void wxPropiedades::AddPage(const wxString& titulo, wxPanel* panel)
+{
+        m_pNotebook->AddPage(panel,titulo,false);
+}
+}
+}
+
diff --git a/cadxcore/wx/propiedades/wxpropiedades.h b/cadxcore/wx/propiedades/wxpropiedades.h
new file mode 100644
index 0000000..b83b87c
--- /dev/null
+++ b/cadxcore/wx/propiedades/wxpropiedades.h
@@ -0,0 +1,46 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <string>
+#include <map>
+#include <list>
+#include <api/api.h>
+#include "wxpropiedadesbase.h"
+
+namespace GNC
+{
+namespace GUI
+{
+class EXTAPI wxPropiedades: public wxPropiedadesBase
+{
+public:
+        typedef std::map< std::string , std::string > TMapaPropiedades;
+        typedef std::list< TMapaPropiedades > TListaMapasPropiedades;
+
+        wxPropiedades( wxWindow* parent, const std::string& nombre, const TListaMapasPropiedades& listaMapas);
+        ~wxPropiedades();
+
+        void AddPage(const wxString& titulo, wxPanel* panel);
+
+};
+}
+}
+
diff --git a/cadxcore/wx/propiedades/wxpropiedadesbase.cpp b/cadxcore/wx/propiedades/wxpropiedadesbase.cpp
new file mode 100644
index 0000000..e3e3b37
--- /dev/null
+++ b/cadxcore/wx/propiedades/wxpropiedadesbase.cpp
@@ -0,0 +1,79 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wxpropiedadesbase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNC::GUI;
+
+wxPropiedadesBase::wxPropiedadesBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 385,441 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer28;
+        bSizer28 = new wxBoxSizer( wxVERTICAL );
+
+        m_pNotebook = new wxNotebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pGeneral = new wxScrolledWindow( m_pNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHSCROLL|wxVSCROLL );
+        m_pGeneral->SetScrollRate( 5, 5 );
+        m_pSizerGeneral = new wxBoxSizer( wxVERTICAL );
+
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pIcono = new wxStaticBitmap( m_pGeneral, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxSize( 48,48 ), 0 );
+        bSizer7->Add( m_pIcono, 0, wxALL, 5 );
+
+        m_pNombreWidget = new wxStaticText( m_pGeneral, wxID_ANY, _("Widget's Name"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pNombreWidget->Wrap( -1 );
+        bSizer7->Add( m_pNombreWidget, 0, wxALIGN_CENTER|wxALL, 5 );
+
+        m_pSizerGeneral->Add( bSizer7, 0, wxEXPAND, 5 );
+
+        m_pGeneral->SetSizer( m_pSizerGeneral );
+        m_pGeneral->Layout();
+        m_pSizerGeneral->Fit( m_pGeneral );
+        m_pNotebook->AddPage( m_pGeneral, _("General"), false );
+
+        bSizer28->Add( m_pNotebook, 1, wxEXPAND | wxALL, 5 );
+
+        m_pPanelBotones = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* m_pArchSizerPanelPropiedades;
+        m_pArchSizerPanelPropiedades = new wxBoxSizer( wxHORIZONTAL );
+
+
+        m_pArchSizerPanelPropiedades->Add( 0, 0, 1, wxEXPAND, 2 );
+
+
+        m_pArchSizerPanelPropiedades->Add( 10, 0, 0, wxEXPAND, 5 );
+
+        m_pBCerrar = new wxButton( m_pPanelBotones, wxID_CANCEL, _("&Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBCerrar->SetDefault();
+        m_pArchSizerPanelPropiedades->Add( m_pBCerrar, 0, wxALL, 5 );
+
+        m_pPanelBotones->SetSizer( m_pArchSizerPanelPropiedades );
+        m_pPanelBotones->Layout();
+        m_pArchSizerPanelPropiedades->Fit( m_pPanelBotones );
+        bSizer28->Add( m_pPanelBotones, 0, wxEXPAND | wxALL, 0 );
+
+        this->SetSizer( bSizer28 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( wxPropiedadesBase::OnClose ) );
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( wxPropiedadesBase::OnSize ) );
+}
+
+wxPropiedadesBase::~wxPropiedadesBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( wxPropiedadesBase::OnClose ) );
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( wxPropiedadesBase::OnSize ) );
+
+}
diff --git a/cadxcore/wx/propiedades/wxpropiedadesbase.h b/cadxcore/wx/propiedades/wxpropiedadesbase.h
new file mode 100644
index 0000000..43746cb
--- /dev/null
+++ b/cadxcore/wx/propiedades/wxpropiedadesbase.h
@@ -0,0 +1,76 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __wxpropiedadesbase__
+#define __wxpropiedadesbase__
+
+#include <wx/intl.h>
+
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/icon.h>
+#include <wx/statbmp.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/stattext.h>
+#include <wx/sizer.h>
+#include <wx/scrolwin.h>
+#include <wx/notebook.h>
+#include <wx/button.h>
+#include <wx/panel.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNC
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class wxPropiedadesBase
+///////////////////////////////////////////////////////////////////////////////
+class wxPropiedadesBase : public wxDialog
+{
+private:
+
+protected:
+        wxNotebook* m_pNotebook;
+        wxScrolledWindow* m_pGeneral;
+        wxBoxSizer* m_pSizerGeneral;
+        wxStaticBitmap* m_pIcono;
+        wxStaticText* m_pNombreWidget;
+        wxPanel* m_pPanelBotones;
+
+
+        wxButton* m_pBCerrar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnClose( wxCloseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSize( wxSizeEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        wxPropiedadesBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Properties of ..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 385,441 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+        ~wxPropiedadesBase();
+
+};
+
+} // namespace GUI
+} // namespace GNC
+
+#endif //__wxpropiedadesbase__
diff --git a/cadxcore/wx/thumbnailctrl/thumbnailctrl.cpp b/cadxcore/wx/thumbnailctrl/thumbnailctrl.cpp
new file mode 100644
index 0000000..d836acb
--- /dev/null
+++ b/cadxcore/wx/thumbnailctrl/thumbnailctrl.cpp
@@ -0,0 +1,1681 @@
+/*
+ *
+ *  $Id: thumbnailctrl.cpp $
+ *  Ginkgo CADx Project
+ *
+ *
+/////////////////////////////////////////////////////////////////////////////
+// Name:        thumbnailctrl.cpp
+// Purpose:     Displays a scrolling window of thumbnails
+// Author:      Julian Smart
+// Modified by:
+// Created:     03/08/04 17:22:46
+// RCS-ID:
+// Copyright:   (c) Julian Smart
+// Licence:     wxWidgets Licence
+/////////////////////////////////////////////////////////////////////////////
+*/
+#if defined(__GNUG__) && !defined(__APPLE__)
+#pragma implementation "thumbnailctrl.h"
+#endif
+
+#include <iostream>
+#include <algorithm>
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+#ifndef WX_PRECOMP
+#include "wx/wx.h"
+#endif
+
+#include "thumbnailctrl.h"
+
+#define USE_BUFFERED_PAINT 1
+
+// #include "utils.h"
+#include "wx/settings.h"
+#include "wx/arrimpl.cpp"
+#include "wx/image.h"
+#include "wx/filename.h"
+#include "wx/dcbuffer.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/globals.h>
+#include <main/controllers/commandcontroller.h>
+
+#include "tick.xpm"
+
+WX_DEFINE_EXPORTED_OBJARRAY(wxThumbnailItemArray);
+
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_THUMBNAIL_ITEM_SELECTED)
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_THUMBNAIL_ITEM_DESELECTED)
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_THUMBNAIL_LEFT_CLICK)
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_THUMBNAIL_MIDDLE_CLICK)
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_THUMBNAIL_RIGHT_CLICK)
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_THUMBNAIL_LEFT_DCLICK)
+DEFINE_EVENT_TYPE(wxEVT_COMMAND_THUMBNAIL_RETURN)
+
+IMPLEMENT_DYNAMIC_CLASS( wxThumbnailCtrl, wxScrolledWindow )
+IMPLEMENT_DYNAMIC_CLASS( wxThumbnailItem, wxObject )
+IMPLEMENT_DYNAMIC_CLASS( wxThumbnailEvent, wxNotifyEvent )
+IMPLEMENT_DYNAMIC_CLASS( wxImageThumbnailItem, wxThumbnailItem)
+IMPLEMENT_DYNAMIC_CLASS( wxMemoryImageThumbnailItem, wxThumbnailItem)
+
+BEGIN_EVENT_TABLE( wxThumbnailCtrl, wxScrolledWindow )
+        EVT_PAINT(wxThumbnailCtrl::OnPaint)
+        EVT_ERASE_BACKGROUND(wxThumbnailCtrl::OnEraseBackground)
+        EVT_LEFT_DOWN(wxThumbnailCtrl::OnLeftClick)
+        EVT_RIGHT_DOWN(wxThumbnailCtrl::OnRightClick)
+        EVT_MIDDLE_DOWN(wxThumbnailCtrl::OnMiddleClick)
+        EVT_LEFT_DCLICK(wxThumbnailCtrl::OnLeftDClick)
+        EVT_CHAR(wxThumbnailCtrl::OnChar)
+        EVT_SIZE(wxThumbnailCtrl::OnSize)
+        EVT_SET_FOCUS(wxThumbnailCtrl::OnSetFocus)
+        EVT_KILL_FOCUS(wxThumbnailCtrl::OnKillFocus)
+
+        EVT_MENU(wxID_SELECTALL, wxThumbnailCtrl::OnSelectAll)
+        EVT_UPDATE_UI(wxID_SELECTALL, wxThumbnailCtrl::OnUpdateSelectAll)
+END_EVENT_TABLE()
+
+int wxThumbnailCtrlCmpFunc(wxThumbnailItem** item1, wxThumbnailItem** item2);
+
+wxThumbnailCtrl* wxThumbnailCtrl::sm_currentThumbnailCtrl = NULL;
+
+/*!
+ * wxThumbnailCtrl
+ */
+
+wxThumbnailCtrl::wxThumbnailCtrl( )
+{
+        m_thumbnailOverallSize = wxTHUMBNAIL_DEFAULT_OVERALL_SIZE;
+        m_thumbnailImageSize = wxTHUMBNAIL_DEFAULT_IMAGE_SIZE;
+        m_freezeCount = 0;
+        m_spacing = wxTHUMBNAIL_DEFAULT_SPACING;
+        m_thumbnailMargin = wxTHUMBNAIL_DEFAULT_MARGIN;
+        m_thumbnailTextHeight = wxTHUMBNAIL_DEFAULT_HEIGHT;
+        m_firstSelection = -1;
+        m_lastSelection = -1;
+        m_sortMode = wxTHUMBNAIL_SORT_NAME_UP;
+        m_focussedThumbnailBackgroundColour = wxTHUMBNAIL_DEFAULT_FOCUSSED_BACKGROUND;
+        m_unfocussedThumbnailBackgroundColour  = wxTHUMBNAIL_DEFAULT_UNFOCUSSED_BACKGROUND;
+        m_unselectedThumbnailBackgroundColour = wxTHUMBNAIL_DEFAULT_UNSELECTED_BACKGROUND;
+        m_typeColour = wxTHUMBNAIL_DEFAULT_TYPE_COLOUR;
+        m_tagColour = wxTHUMBNAIL_DEFAULT_TAG_COLOUR;
+        m_focusRectColour = wxTHUMBNAIL_DEFAULT_FOCUS_RECT_COLOUR;
+        m_selectedTextColour = wxTHUMBNAIL_DEFAULT_SELECTED_TEXT_COLOR;
+        m_unselectedTextColour = wxTHUMBNAIL_DEFAULT_UNSELECTED_TEXT_COLOR;
+        m_focusItem = -1;
+}
+
+wxThumbnailCtrl::wxThumbnailCtrl( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style):
+        wxThumbnailCtrl()
+{
+        Create(parent, id, pos, size, style);
+}
+
+/// Creation
+bool wxThumbnailCtrl::Create( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style)
+{
+        if (!wxScrolledWindow::Create(parent, id, pos, size, style
+                                      |wxFULL_REPAINT_ON_RESIZE
+                                     ))
+                return false;
+
+        if (!GetFont().Ok()) {
+                SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT));
+        }
+        CalculateOverallThumbnailSize();
+
+        SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE));
+        m_tagBitmap = wxBitmap(tick_xpm);
+
+        SetBackgroundStyle(wxBG_STYLE_CUSTOM);
+
+        // Tell the sizers to use the given or best size
+        SetSize(size);
+        //SetBestFittingSize(size);
+
+#if USE_BUFFERED_PAINT
+        // Create a buffer
+        RecreateBuffer(size);
+#endif
+
+        return true;
+}
+
+
+/// Call Freeze to prevent refresh
+void wxThumbnailCtrl::Freeze()
+{
+        m_freezeCount ++;
+}
+
+/// Call Thaw to refresh
+void wxThumbnailCtrl::Thaw()
+{
+        m_freezeCount --;
+
+        if (m_freezeCount == 0) {
+                SetupScrollbars();
+                Refresh();
+        }
+}
+
+/// Append a single item
+int wxThumbnailCtrl::Append(wxThumbnailItem* item)
+{
+        int sz = (int) GetCount();
+        m_items.Add(item);
+        m_firstSelection = -1;
+        m_lastSelection = -1;
+        m_focusItem = -1;
+
+        item->Load(this, false);
+
+        if (m_freezeCount == 0) {
+                SetupScrollbars();
+                Refresh();
+        }
+        return sz;
+}
+
+/// Insert a single item
+int wxThumbnailCtrl::Insert(wxThumbnailItem* item, int pos)
+{
+        m_items.Insert(item, pos);
+        m_firstSelection = -1;
+        m_lastSelection = -1;
+        m_focusItem = -1;
+        m_selections.Clear();
+
+        // Must now change selection indices because
+        // items above it have moved up
+        size_t i;
+        for (i = 0; i < m_selections.GetCount(); i++) {
+                if (m_selections[i] >= pos)
+                        m_selections[i] = m_selections[i] + 1;
+        }
+        // Ditto for tags
+        for (i = 0; i < m_tags.GetCount(); i++) {
+                if (m_tags[i] >= pos)
+                        m_tags[i] = m_tags[i] + 1;
+        }
+
+        item->Load(this, false);
+
+        if (m_freezeCount == 0) {
+                SetupScrollbars();
+                Refresh();
+        }
+        return pos;
+}
+
+/// Clear all items
+void wxThumbnailCtrl::Clear()
+{
+        m_firstSelection = -1;
+        m_lastSelection = -1;
+        m_focusItem = -1;
+        m_items.Clear();
+        m_selections.Clear();
+        m_tags.Clear();
+
+        if (m_freezeCount == 0) {
+                SetupScrollbars();
+                Refresh();
+        }
+}
+
+static bool wxGetIntegerFromFilename(const wxString& fname, int& n)
+{
+        wxString filename = fname;
+
+        wxFileName::StripExtension(filename);
+        wxString strNum;
+
+        size_t len = filename.Len();
+        size_t i;
+        for (i = len; i == 0; i--) {
+                if (wxIsdigit(filename[i]) != 0) {
+                        strNum = filename[i] + strNum;
+                } else
+                        break;
+        }
+        if (strNum.IsEmpty())
+                return false;
+        else {
+                n = wxAtoi(strNum);
+                return true;
+        }
+}
+
+int wxThumbnailCtrlCmpFunc(wxThumbnailItem** item1, wxThumbnailItem** item2)
+{
+        int sortMode = wxTHUMBNAIL_SORT_NAME_UP;
+        if (wxThumbnailCtrl::GetThumbnailCtrl())
+                sortMode = wxThumbnailCtrl::GetThumbnailCtrl()->GetSortMode();
+
+        if (sortMode == wxTHUMBNAIL_SORT_NAME_UP || sortMode == wxTHUMBNAIL_SORT_NAME_DOWN) {
+                wxString filename1, filename2;
+                if (sortMode == wxTHUMBNAIL_SORT_NAME_UP) {
+                        filename1 = wxFileNameFromPath((*item1)->GetFilename());
+                        filename2 = wxFileNameFromPath((*item2)->GetFilename());
+                } else {
+                        filename2 = wxFileNameFromPath((*item1)->GetFilename());
+                        filename1 = wxFileNameFromPath((*item2)->GetFilename());
+                }
+                return filename1.CmpNoCase(filename2);
+        } else if (sortMode == wxTHUMBNAIL_SORT_TIMESTAMP_UP || sortMode == wxTHUMBNAIL_SORT_TIMESTAMP_DOWN) {
+                wxFileName fname1, fname2;
+                if (sortMode == wxTHUMBNAIL_SORT_TIMESTAMP_UP) {
+                        fname1 = ((*item1)->GetFilename());
+                        fname2 = ((*item2)->GetFilename());
+                } else {
+                        fname2 = ((*item1)->GetFilename());
+                        fname1 = ((*item2)->GetFilename());
+                }
+
+                wxDateTime lastMod1, lastMod2;
+                if (fname1.GetTimes(NULL, & lastMod1, NULL) &&
+                    fname2.GetTimes(NULL, & lastMod2, NULL)) {
+                        if (lastMod1 < lastMod2)
+                                return -1;
+                        else if (lastMod1 > lastMod2)
+                                return 1;
+                        else
+                                return 0;
+                } else
+                        return 0;
+        } else if (sortMode == wxTHUMBNAIL_SORT_NUMERICALLY_UP || sortMode == wxTHUMBNAIL_SORT_NUMERICALLY_DOWN) {
+                int n1, n2;
+                bool success1, success2;
+
+                if (sortMode == wxTHUMBNAIL_SORT_NUMERICALLY_UP) {
+                        success1 = wxGetIntegerFromFilename((*item1)->GetFilename(), n1);
+                        success2 = wxGetIntegerFromFilename((*item2)->GetFilename(), n2);
+                } else {
+                        success1 = wxGetIntegerFromFilename((*item2)->GetFilename(), n1);
+                        success2 = wxGetIntegerFromFilename((*item1)->GetFilename(), n2);
+                }
+
+                if (success1 && !success2)
+                        return -1;
+                else if (!success1 && success2)
+                        return 1;
+                else if (!success1 && !success2)
+                        return 0;
+
+                if (n1 < n2)
+                        return -1;
+                else if (n2 > n1)
+                        return 1;
+                else
+                        return 0;
+        } else if (sortMode == wxTHUMBNAIL_SORT_TYPE_UP || sortMode == wxTHUMBNAIL_SORT_TYPE_DOWN) {
+                wxString filename1, path1, ext1;
+                wxString filename2, path2, ext2;
+                if (sortMode == wxTHUMBNAIL_SORT_TYPE_UP) {
+                        wxFileName::SplitPath((*item1)->GetFilename(), & filename1, & path1, & ext1);
+                        wxFileName::SplitPath((*item2)->GetFilename(), & filename2, & path2, & ext2);
+                } else {
+                        wxFileName::SplitPath((*item2)->GetFilename(), & filename1, & path1, & ext1);
+                        wxFileName::SplitPath((*item1)->GetFilename(), & filename2, & path2, & ext2);
+                }
+                return ext1.CmpNoCase(ext2);
+        }
+        return 0;
+}
+
+/// Sorts items in the specified way
+void wxThumbnailCtrl::Sort(int sortMode)
+{
+        m_sortMode = sortMode;
+
+        // preserve and restore selections & tags
+        size_t i;
+        size_t len = m_items.GetCount();
+        for (i = 0; i < len; i++) {
+                wxThumbnailItem& item = m_items[i];
+                int state = 0;
+                if (IsSelected(i))
+                        state |= wxTHUMBNAIL_SELECTED;
+                if (IsTagged(i))
+                        state |= wxTHUMBNAIL_TAGGED;
+                item.SetState(state);
+        }
+        m_selections.Clear();
+        m_tags.Clear();
+        m_firstSelection = -1;
+        m_lastSelection = -1;
+        m_focusItem = -1;
+
+        sm_currentThumbnailCtrl = this;
+
+        m_items.Sort(wxThumbnailCtrlCmpFunc);
+
+        sm_currentThumbnailCtrl = NULL;
+
+        Freeze();
+
+        for (i = 0; i < len; i++) {
+                wxThumbnailItem& item = m_items[i];
+                if (item.GetState() & wxTHUMBNAIL_SELECTED)
+                        Select(i);
+                if (item.GetState() & wxTHUMBNAIL_TAGGED)
+                        Tag(i);
+        }
+
+        Thaw();
+}
+
+/// Delete this item
+void wxThumbnailCtrl::Delete(int n)
+{
+        if (m_firstSelection == n)
+                m_firstSelection = -1;
+        else if (m_firstSelection>n)
+                m_firstSelection--;
+
+        if (m_lastSelection == n)
+                m_lastSelection = -1;
+        else if (m_lastSelection>n)
+                m_lastSelection--;
+
+        if (m_focusItem == n)
+                m_focusItem = -1;
+        else if (m_focusItem>n)
+                m_focusItem--;
+
+        if (m_selections.Index(n) != wxNOT_FOUND)
+                m_selections.Remove(n);
+
+        if (m_tags.Index(n) != wxNOT_FOUND)
+                m_tags.Remove(n);
+
+        m_items.RemoveAt(n);
+
+        // Must now change selection indices because
+        // items have moved down
+        size_t i;
+        for (i = 0; i < m_selections.GetCount(); i++) {
+                if (m_selections[i] > n) {
+                        m_selections[i] = m_selections[i] - 1;
+                }
+        }
+
+        for (i = 0; i < m_tags.GetCount(); i++) {
+                if (m_tags[i] > n) {
+                        m_tags[i] = m_tags[i] - 1;
+                }
+        }
+
+        if (m_freezeCount == 0) {
+                SetupScrollbars();
+                Refresh();
+        }
+}
+
+/// Get the nth item
+wxThumbnailItem* wxThumbnailCtrl::GetItem(int n)
+{
+        wxASSERT(n < GetCount());
+
+        if (n < GetCount()) {
+                return & m_items[(size_t) n];
+        } else
+                return NULL;
+}
+
+wxThumbnailItem* wxThumbnailCtrl::GetItemWithId(int n)
+{
+        for (unsigned int i = 0; i < m_items.size(); ++i) {
+                if (m_items[i].GetId() == n) {
+                        return &m_items[i];
+                }
+        }
+        return NULL;
+}
+
+/// Get the overall rect of the given item
+bool wxThumbnailCtrl::GetItemRect(int n, wxRect& rect, bool transform)
+{
+        wxASSERT(n < GetCount());
+        if (n < GetCount()) {
+                int row, col;
+                if (!GetRowCol(n, GetClientSize(), row, col))
+                        return false;
+
+                int x = col * (m_thumbnailOverallSize.x + m_spacing) + m_spacing;
+                int y = row * (m_thumbnailOverallSize.y + m_spacing) + m_spacing;
+
+                if (transform) {
+                        int startX, startY;
+                        int xppu, yppu;
+                        GetScrollPixelsPerUnit(& xppu, & yppu);
+                        GetViewStart(& startX, & startY);
+                        x = x - startX*xppu;
+                        y = y - startY*yppu;
+                }
+
+                rect.x = x;
+                rect.y = y;
+                rect.width = m_thumbnailOverallSize.x;
+                rect.height = m_thumbnailOverallSize.y;
+
+                return true;
+        }
+
+        return false;
+}
+
+/// Get the image rect of the given item
+bool wxThumbnailCtrl::GetItemRectImage(int n, wxRect& rect, bool transform)
+{
+        wxASSERT(n < GetCount());
+
+        wxRect outerRect;
+        if (!GetItemRect(n, outerRect, transform))
+                return false;
+
+        rect.width = m_thumbnailImageSize.x;
+        rect.height = m_thumbnailImageSize.y;
+        rect.x = outerRect.x + (outerRect.width - rect.width)/2;
+        rect.y = outerRect.y + (outerRect.height - rect.height)/2;
+        if ((GetWindowStyle() & wxTH_EXTENSION_LABEL) == 0) rect.y -= m_thumbnailTextHeight / 2;
+
+        return true;
+}
+
+/// The size of the image part
+void wxThumbnailCtrl::SetThumbnailImageSize(const wxSize& sz)
+{
+        m_thumbnailImageSize = sz;
+        CalculateOverallThumbnailSize();
+
+        if (GetCount() > 0 && m_freezeCount == 0) {
+                SetupScrollbars();
+                Refresh();
+        }
+}
+
+/// Calculate the outer thumbnail size based
+/// on font used for text and inner size
+void wxThumbnailCtrl::CalculateOverallThumbnailSize()
+{
+        wxCoord w;
+        wxClientDC dc(this);
+        dc.SetFont(GetFont());
+        dc.GetTextExtent(wxT("X"), & w, & m_thumbnailTextHeight);
+
+        // From left to right: margin, image, margin
+        m_thumbnailOverallSize.x = m_thumbnailMargin * 2 + m_thumbnailImageSize.x;
+
+        // From top to bottom: margin, text + margin (if wxTH_EXTENSION_LABEL set), image, margin, text, margin
+        if (GetWindowStyle() & wxTH_EXTENSION_LABEL) {
+                m_thumbnailOverallSize.y = m_thumbnailMargin * 4 + m_thumbnailTextHeight * 2 + m_thumbnailImageSize.y;
+        } else {
+                m_thumbnailOverallSize.y = m_thumbnailMargin * 3 + m_thumbnailTextHeight + m_thumbnailImageSize.y;
+        }
+}
+
+/// Return the row and column given the client
+/// size and a left-to-right, top-to-bottom layout
+/// assumption
+bool wxThumbnailCtrl::GetRowCol(int item, const wxSize& clientSize, int& row, int& col)
+{
+        wxASSERT(item < GetCount());
+        if (item >= GetCount())
+                return false;
+
+        // How many can we fit in a row?
+
+        int perRow = clientSize.x/(m_thumbnailOverallSize.x + m_spacing);
+        if (perRow < 1)
+                perRow = 1;
+
+        row = item/perRow;
+        col = item % perRow;
+
+        return true;
+}
+
+
+/// Select or deselect an item
+void wxThumbnailCtrl::Select(int n, bool select)
+{
+        wxASSERT (n < GetCount());
+
+        if (select) {
+                if (m_selections.Index(n) == wxNOT_FOUND)
+                        m_selections.Add(n);
+        } else {
+                if (m_selections.Index(n) != wxNOT_FOUND)
+                        m_selections.Remove(n);
+        }
+
+        m_firstSelection = n;
+        m_lastSelection = n;
+        int oldFocusItem = m_focusItem;
+        m_focusItem = n;
+
+        if (m_freezeCount == 0) {
+                wxRect rect;
+                GetItemRect(n, rect);
+                RefreshRect(rect);
+
+                if (oldFocusItem != -1 && oldFocusItem != n) {
+                        GetItemRect(oldFocusItem, rect);
+                        RefreshRect(rect);
+                }
+        }
+}
+
+/// Select or deselect a range
+void wxThumbnailCtrl::SelectRange(int from, int to, bool select)
+{
+        int first = from;
+        int last = to;
+        if (first < last) {
+                first = to;
+                last = from;
+        }
+        wxASSERT (first >= 0 && first < GetCount());
+        wxASSERT (last >= 0 && last < GetCount());
+
+        Freeze();
+        int i;
+        for (i = first; i < last; i++) {
+                Select(i, select);
+        }
+        m_focusItem = to;
+        Thaw();
+}
+
+/// Select all
+void wxThumbnailCtrl::SelectAll()
+{
+        Freeze();
+        int i;
+        for (i = 0; i < GetCount(); i++) {
+                Select(i, true);
+        }
+        if (GetCount() > 0) {
+                m_focusItem = GetCount()-1;
+        } else {
+                m_focusItem = -1;
+        }
+        Thaw();
+}
+
+/// Select none
+void wxThumbnailCtrl::SelectNone()
+{
+        Freeze();
+        int i;
+        for (i = 0; i < GetCount(); i++) {
+                Select(i, false);
+        }
+        Thaw();
+}
+
+/// Get the index of the single selection, if not multi-select.
+/// Returns -1 if there is no selection.
+int wxThumbnailCtrl::GetSelection() const
+{
+        if (m_selections.GetCount() > 0)
+                return m_selections[0u];
+        else
+                return -1;
+}
+
+/// Returns true if the item is selected
+bool wxThumbnailCtrl::IsSelected(int n) const
+{
+        return (m_selections.Index(n) != wxNOT_FOUND) ;
+}
+
+/// Clears all selections
+void wxThumbnailCtrl::ClearSelections()
+{
+        int count = GetCount();
+
+        m_selections.Clear();
+        m_firstSelection = -1;
+        m_lastSelection = -1;
+        m_focusItem = -1;
+
+        if (count > 0 && m_freezeCount == 0) {
+                Refresh();
+        }
+}
+
+/// Set the focus item
+void wxThumbnailCtrl::SetFocusItem(int item)
+{
+        wxASSERT( item < GetCount() );
+        if (item < GetCount()) {
+                int oldFocusItem = m_focusItem;
+                m_focusItem = item;
+
+                if (m_freezeCount == 0) {
+                        wxRect rect;
+                        if (oldFocusItem != -1) {
+                                GetItemRect(oldFocusItem, rect);
+                                RefreshRect(rect);
+                        }
+                        if (m_focusItem != -1) {
+                                GetItemRect(m_focusItem, rect);
+                                RefreshRect(rect);
+                        }
+                }
+        }
+}
+
+/// Tag or untag an item
+void wxThumbnailCtrl::Tag(int n, bool tag)
+{
+        wxASSERT (n < GetCount());
+
+        if (tag) {
+                if (m_tags.Index(n) == wxNOT_FOUND)
+                        m_tags.Add(n);
+        } else {
+                if (m_tags.Index(n) != wxNOT_FOUND)
+                        m_tags.Remove(n);
+        }
+
+        if (m_freezeCount == 0) {
+                wxRect rect;
+                GetItemRect(n, rect);
+                RefreshRect(rect);
+        }
+}
+
+/// Returns true if the item is tagged
+bool wxThumbnailCtrl::IsTagged(int n) const
+{
+        return (m_tags.Index(n) != wxNOT_FOUND) ;
+}
+
+/// Clears all tags
+void wxThumbnailCtrl::ClearTags()
+{
+        int count = GetCount();
+
+        m_tags.Clear();
+
+        if (count > 0 && m_freezeCount == 0) {
+                Refresh();
+        }
+}
+
+/// Painting
+void wxThumbnailCtrl::OnPaint(wxPaintEvent& WXUNUSED(event))
+{
+        // Set this to 0 to compare it with the
+        // unbuffered implementation
+#if USE_BUFFERED_PAINT
+        wxBufferedPaintDC dc(this, m_bufferBitmap);
+#else
+        wxPaintDC dc(this);
+#endif
+
+        PrepareDC(dc);
+
+        if (m_freezeCount > 0)
+                return;
+
+        // Paint the background
+        PaintBackground(dc);
+
+        if (GetCount() == 0)
+                return;
+
+        wxRegion dirtyRegion = GetUpdateRegion();
+        bool isFocussed = (FindFocus() == this);
+
+        int i;
+        int count = GetCount();
+        int style = 0;
+        wxRect rect, untransformedRect, imageRect, untransformedImageRect;
+        for (i = 0; i < count; i++) {
+                GetItemRect(i, rect);
+
+                wxRegionContain c = dirtyRegion.Contains(rect);
+                if (c != wxOutRegion) {
+                        GetItemRectImage(i, imageRect);
+                        style = 0;
+                        if (IsSelected(i))
+                                style |= wxTHUMBNAIL_SELECTED;
+                        if (IsTagged(i))
+                                style |= wxTHUMBNAIL_TAGGED;
+                        if (isFocussed)
+                                style |= wxTHUMBNAIL_FOCUSSED;
+                        if (isFocussed && i == m_focusItem)
+                                style |= wxTHUMBNAIL_IS_FOCUS;
+
+                        GetItemRect(i, untransformedRect, false);
+                        GetItemRectImage(i, untransformedImageRect, false);
+
+                        DrawItemBackground(i, dc, untransformedRect, untransformedImageRect, style);
+                        DrawItem(i, dc, untransformedImageRect, style);
+                }
+        }
+}
+
+// Empty implementation, to prevent flicker
+void wxThumbnailCtrl::OnEraseBackground(wxEraseEvent& WXUNUSED(event))
+{
+}
+
+void wxThumbnailCtrl::OnSetFocus(wxFocusEvent& WXUNUSED(event))
+{
+        if (GetCount() > 0)
+                Refresh();
+}
+
+void wxThumbnailCtrl::OnKillFocus(wxFocusEvent& WXUNUSED(event))
+{
+        if (GetCount() > 0)
+                Refresh();
+}
+
+/// Left-click
+void wxThumbnailCtrl::OnLeftClick(wxMouseEvent& event)
+{
+        SetFocus();
+        int n;
+        if (HitTest(event.GetPosition(), n)) {
+                int flags = 0;
+                if (event.ControlDown())
+                        flags |= wxTHUMBNAIL_CTRL_DOWN;
+                if (event.ShiftDown())
+                        flags |= wxTHUMBNAIL_SHIFT_DOWN;
+                if (event.AltDown())
+                        flags |= wxTHUMBNAIL_ALT_DOWN;
+
+                EnsureVisible(n);
+                DoSelection(n, flags);
+
+                wxThumbnailEvent cmdEvent(
+                        wxEVT_COMMAND_THUMBNAIL_LEFT_CLICK,
+                        GetId());
+                cmdEvent.SetEventObject(this);
+                cmdEvent.SetIndex(n);
+                cmdEvent.SetFlags(flags);
+                GetEventHandler()->ProcessEvent(cmdEvent);
+        }
+}
+
+/// Right-click
+void wxThumbnailCtrl::OnRightClick(wxMouseEvent& event)
+{
+        SetFocus();
+        int n;
+        if (HitTest(event.GetPosition(), n)) {
+                int flags = 0;
+                if (event.ControlDown())
+                        flags |= wxTHUMBNAIL_CTRL_DOWN;
+                if (event.ShiftDown())
+                        flags |= wxTHUMBNAIL_SHIFT_DOWN;
+                if (event.AltDown())
+                        flags |= wxTHUMBNAIL_ALT_DOWN;
+
+                if (m_focusItem != n)
+                        SetFocusItem(n);
+
+                wxThumbnailEvent cmdEvent(
+                        wxEVT_COMMAND_THUMBNAIL_RIGHT_CLICK,
+                        GetId());
+                cmdEvent.SetEventObject(this);
+                cmdEvent.SetIndex(n);
+                cmdEvent.SetFlags(flags);
+                GetEventHandler()->ProcessEvent(cmdEvent);
+        }
+}
+
+/// Left-double-click
+void wxThumbnailCtrl::OnLeftDClick(wxMouseEvent& event)
+{
+        int n;
+        if (HitTest(event.GetPosition(), n)) {
+                int flags = 0;
+                if (event.ControlDown())
+                        flags |= wxTHUMBNAIL_CTRL_DOWN;
+                if (event.ShiftDown())
+                        flags |= wxTHUMBNAIL_SHIFT_DOWN;
+                if (event.AltDown())
+                        flags |= wxTHUMBNAIL_ALT_DOWN;
+
+                wxThumbnailEvent cmdEvent(
+                        wxEVT_COMMAND_THUMBNAIL_LEFT_DCLICK,
+                        GetId());
+                cmdEvent.SetEventObject(this);
+                cmdEvent.SetIndex(n);
+                cmdEvent.SetFlags(flags);
+                GetEventHandler()->ProcessEvent(cmdEvent);
+        }
+}
+
+/// Middle-click
+void wxThumbnailCtrl::OnMiddleClick(wxMouseEvent& event)
+{
+        int n;
+        if (HitTest(event.GetPosition(), n)) {
+                int flags = 0;
+                if (event.ControlDown())
+                        flags |= wxTHUMBNAIL_CTRL_DOWN;
+                if (event.ShiftDown())
+                        flags |= wxTHUMBNAIL_SHIFT_DOWN;
+                if (event.AltDown())
+                        flags |= wxTHUMBNAIL_ALT_DOWN;
+
+                wxThumbnailEvent cmdEvent(
+                        wxEVT_COMMAND_THUMBNAIL_MIDDLE_CLICK,
+                        GetId());
+                cmdEvent.SetEventObject(this);
+                cmdEvent.SetIndex(n);
+                cmdEvent.SetFlags(flags);
+                GetEventHandler()->ProcessEvent(cmdEvent);
+        }
+}
+
+/// Key press
+void wxThumbnailCtrl::OnChar(wxKeyEvent& event)
+{
+        int flags = 0;
+        if (event.ControlDown())
+                flags |= wxTHUMBNAIL_CTRL_DOWN;
+        if (event.ShiftDown())
+                flags |= wxTHUMBNAIL_SHIFT_DOWN;
+        if (event.AltDown())
+                flags |= wxTHUMBNAIL_ALT_DOWN;
+
+        if (event.GetKeyCode() == WXK_LEFT ||
+            event.GetKeyCode() == WXK_RIGHT ||
+            event.GetKeyCode() == WXK_UP ||
+            event.GetKeyCode() == WXK_DOWN ||
+            event.GetKeyCode() == WXK_HOME ||
+            event.GetKeyCode() == WXK_PAGEUP ||
+            event.GetKeyCode() == WXK_PAGEDOWN ||
+            event.GetKeyCode() == WXK_UP ||
+            event.GetKeyCode() == WXK_DOWN ||
+            event.GetKeyCode() == WXK_END) {
+                KeyboardNavigate(event.GetKeyCode(), flags);
+        } else if (event.GetKeyCode() == WXK_RETURN) {
+                wxThumbnailEvent cmdEvent(
+                        wxEVT_COMMAND_THUMBNAIL_RETURN,
+                        GetId());
+                cmdEvent.SetEventObject(this);
+                cmdEvent.SetFlags(flags);
+                GetEventHandler()->ProcessEvent(cmdEvent);
+        } else
+                event.Skip();
+}
+
+/// Keyboard navigation
+bool wxThumbnailCtrl::KeyboardNavigate(int keyCode, int flags)
+{
+        if (GetCount() == 0)
+                return false;
+
+        wxSize clientSize = GetClientSize();
+        int perRow = clientSize.x/(m_thumbnailOverallSize.x + m_spacing);
+        if (perRow < 1)
+                perRow = 1;
+
+        int rowsInView = clientSize.y/(m_thumbnailOverallSize.y + m_spacing);
+        if (rowsInView < 1)
+                rowsInView = 1;
+
+        int focus = m_focusItem;
+        if (focus == -1)
+                focus = m_lastSelection;
+
+        if (focus == -1 || focus >= GetCount()) {
+                m_lastSelection = 0;
+                DoSelection(m_lastSelection, flags);
+                ScrollIntoView(m_lastSelection, keyCode);
+                return true;
+        }
+
+        if (keyCode == WXK_RIGHT) {
+                int next = focus + 1;
+                if (next < GetCount()) {
+                        DoSelection(next, flags);
+                        ScrollIntoView(next, keyCode);
+                }
+        } else if (keyCode == WXK_LEFT) {
+                int next = focus - 1;
+                if (next >= 0) {
+                        DoSelection(next, flags);
+                        ScrollIntoView(next, keyCode);
+                }
+        } else if (keyCode == WXK_UP) {
+                int next = focus - perRow;
+                if (next >= 0) {
+                        DoSelection(next, flags);
+                        ScrollIntoView(next, keyCode);
+                }
+        } else if (keyCode == WXK_DOWN) {
+                int next = focus + perRow;
+                if (next < GetCount()) {
+                        DoSelection(next, flags);
+                        ScrollIntoView(next, keyCode);
+                }
+        } else if (keyCode == WXK_PAGEUP || keyCode == WXK_LEFT) {
+                int next = focus - (perRow * rowsInView);
+                if (next < 0)
+                        next = 0;
+                if (next >= 0) {
+                        DoSelection(next, flags);
+                        ScrollIntoView(next, keyCode);
+                }
+        } else if (keyCode == WXK_PAGEDOWN || keyCode == WXK_RIGHT) {
+                int next = focus + (perRow * rowsInView);
+                if (next >= GetCount())
+                        next = GetCount() - 1;
+                if (next < GetCount()) {
+                        DoSelection(next, flags);
+                        ScrollIntoView(next, keyCode);
+                }
+        } else if (keyCode == WXK_HOME) {
+                DoSelection(0, flags);
+                ScrollIntoView(0, keyCode);
+        } else if (keyCode == WXK_END) {
+                DoSelection(GetCount()-1, flags);
+                ScrollIntoView(GetCount()-1, keyCode);
+        }
+        return true;
+}
+
+/// Scroll to see the image
+void wxThumbnailCtrl::ScrollIntoView(int n, int keyCode)
+{
+        wxRect rect;
+        GetItemRect(n, rect, false); // _Not_ relative to scroll start
+
+        int ppuX, ppuY;
+        GetScrollPixelsPerUnit(& ppuX, & ppuY);
+
+        // just maake sure they are not zero. Assertiopn would also do, but would crash the program
+        if (ppuX == 0)
+                ppuX = 1;
+        if (ppuY == 0)
+                ppuY = 1;
+
+        int startX, startY;
+        GetViewStart(& startX, & startY);
+        startX = 0;
+        startY = startY * ppuY;
+
+        int sx, sy;
+        GetVirtualSize(& sx, & sy);
+        sx = 0;
+        if (ppuY != 0)
+                sy = sy/ppuY;
+
+        wxSize clientSize = GetClientSize();
+
+        // Going down
+        if (keyCode == WXK_DOWN || keyCode == WXK_RIGHT || keyCode == WXK_END || keyCode == WXK_RIGHT || keyCode == WXK_PAGEDOWN) {
+                if ((rect.y + rect.height) > (clientSize.y + startY)) {
+                        // Make it scroll so this item is at the bottom
+                        // of the window
+                        double y = rect.y - (clientSize.y - m_thumbnailOverallSize.y - m_spacing) ;
+                        SetScrollbars(ppuX, ppuY, sx, sy, 0, (int) (0.5 + y/ppuY));
+                } else if (rect.y < startY) {
+                        // Make it scroll so this item is at the top
+                        // of the window
+                        double y = rect.y ;
+                        SetScrollbars(ppuX, ppuY, sx, sy, 0, (int) (0.5 + y/ppuY));
+                }
+        }
+        // Going up
+        else if (keyCode == WXK_UP || keyCode == WXK_LEFT || keyCode == WXK_HOME || keyCode == WXK_UP || keyCode == WXK_PAGEUP) {
+                if (rect.y < startY) {
+                        // Make it scroll so this item is at the top
+                        // of the window
+                        double y = rect.y ;
+                        SetScrollbars(ppuX, ppuY, sx, sy, 0, (int) (0.5 + y/ppuY));
+                } else if ((rect.y + rect.height) > (clientSize.y + startY)) {
+                        // Make it scroll so this item is at the bottom
+                        // of the window
+                        double y = rect.y - (clientSize.y - m_thumbnailOverallSize.y - m_spacing) ;
+                        SetScrollbars(ppuX, ppuY, sx, sy, 0, (int) (0.5 + y/ppuY));
+                }
+        }
+}
+
+/// Scrolls the item into view if necessary
+void wxThumbnailCtrl::EnsureVisible(int n)
+{
+        wxRect rect;
+        GetItemRect(n, rect, false); // _Not_ relative to scroll start
+
+        int ppuX, ppuY;
+        GetScrollPixelsPerUnit(& ppuX, & ppuY);
+
+        if (ppuY == 0)
+                return;
+
+        int startX, startY;
+        GetViewStart(& startX, & startY);
+        startX = 0;
+        startY = startY * ppuY;
+
+        int sx, sy;
+        GetVirtualSize(& sx, & sy);
+        sx = 0;
+        if (ppuY != 0)
+                sy = sy/ppuY;
+
+        wxSize clientSize = GetClientSize();
+
+        if ((rect.y + rect.height) > (clientSize.y + startY)) {
+                // Make it scroll so this item is at the bottom
+                // of the window
+                double y = rect.y - (clientSize.y - m_thumbnailOverallSize.y - m_spacing) ;
+                SetScrollbars(ppuX, ppuY, sx, sy, 0, (int) (0.5 + y/ppuY));
+        } else if (rect.y < startY) {
+                // Make it scroll so this item is at the top
+                // of the window
+                double y = rect.y ;
+                SetScrollbars(ppuX, ppuY, sx, sy, 0, (int) (0.5 + y/ppuY));
+        }
+}
+
+/// Forces a reload of this item's thumbnail image
+void wxThumbnailCtrl::Reload(int n)
+{
+        wxThumbnailItem* item = GetItem(n);
+        if (item) {
+                item->Load(this, true);
+        }
+}
+
+/// Finds an item that matches a given filename
+int wxThumbnailCtrl::FindItemForFilename(const wxString& filename)
+{
+        wxString searchName = filename;
+#ifdef __WXMSW__
+        searchName.Replace(wxT("\\"), wxT("/"));
+#endif
+        size_t i;
+        for (i = 0; i < m_items.GetCount(); i++) {
+                wxThumbnailItem& item = m_items[i];
+                wxString itemName = item.GetFilename();
+#ifdef __WXMSW__
+                itemName.Replace(wxT("\\"), wxT("/"));
+#endif
+                if (itemName == searchName)
+                        return i;
+        }
+        return -1;
+}
+
+/// Sizing
+void wxThumbnailCtrl::OnSize(wxSizeEvent& event)
+{
+        SetupScrollbars();
+        RecreateBuffer();
+        event.Skip();
+}
+
+/// Set up scrollbars, e.g. after a resize
+void wxThumbnailCtrl::SetupScrollbars()
+{
+        if (m_freezeCount)
+                return;
+
+        if (GetCount() == 0) {
+                SetScrollbars(0, 0, 0, 0, 0, 0);
+                return;
+        }
+
+        int lastItem = wxMax(0, GetCount() - 1);
+        int pixelsPerUnit = 10;
+        wxSize clientSize = GetClientSize();
+
+        int row = 0, col = 0;
+        GetRowCol(lastItem, clientSize, row, col);
+
+        int maxHeight = (row+1) * (m_thumbnailOverallSize.y + m_spacing) + m_spacing;
+
+        int unitsY = maxHeight/pixelsPerUnit;
+
+        int startX, startY;
+        GetViewStart(& startX, & startY);
+
+        int maxPositionX = 0; // wxMax(sz.x - clientSize.x, 0);
+        int maxPositionY = (wxMax(maxHeight - clientSize.y, 0))/pixelsPerUnit;
+
+        // Move to previous scroll position if
+        // possible
+        SetScrollbars(0, pixelsPerUnit,
+                      0, unitsY,
+                      wxMin(maxPositionX, startX), wxMin(maxPositionY, startY));
+}
+
+/// Draws the item. Normally you override function in wxThumbnailItem.
+bool wxThumbnailCtrl::DrawItem(int n, wxDC& dc, const wxRect& rect, int style)
+{
+        wxThumbnailItem* item = GetItem(n);
+        if (item) {
+                return item->Draw(dc, this, rect, style);
+        } else
+                return false;
+}
+
+/// Draws the background for the item, including bevel
+bool wxThumbnailCtrl::DrawItemBackground(int n, wxDC& dc, const wxRect& rect, const wxRect& imageRect, int style)
+{
+        wxThumbnailItem* item = GetItem(n);
+        if (item) {
+                return item->DrawBackground(dc, this, rect, imageRect, style, n);
+        } else {
+                return false;
+        }
+}
+
+/// Do (de)selection
+void wxThumbnailCtrl::DoSelection(int n, int flags)
+{
+        bool isSelected = IsSelected(n);
+
+        wxArrayInt stateChanged;
+
+        bool multiSelect = (GetWindowStyle() & wxTH_MULTIPLE_SELECT) != 0;
+
+        if (multiSelect && (flags & wxTHUMBNAIL_CTRL_DOWN) == wxTHUMBNAIL_CTRL_DOWN) {
+                Select(n, !isSelected);
+                stateChanged.Add(n);
+        } else if (multiSelect && (flags & wxTHUMBNAIL_SHIFT_DOWN) == wxTHUMBNAIL_SHIFT_DOWN) {
+                // We need to find the last item selected,
+                // and select all in between.
+
+                int first = m_firstSelection ;
+
+                // Want to keep the 'first' selection
+                // if we're extending the selection
+                bool keepFirstSelection = false;
+                wxArrayInt oldSelections = m_selections;
+
+                m_selections.Clear(); // TODO: need to refresh those that become unselected. Store old selections, compare with new
+
+                if (m_firstSelection != -1 && m_firstSelection < GetCount() && m_firstSelection != n) {
+                        int step = (n < m_firstSelection) ? -1 : 1;
+                        int i;
+                        for (i = m_firstSelection; i != n; i += step) {
+                                if (!IsSelected(i)) {
+                                        m_selections.Add(i);
+                                        stateChanged.Add(i);
+
+                                        wxRect rect;
+                                        GetItemRect(i, rect);
+                                        RefreshRect(rect);
+                                }
+                        }
+                        keepFirstSelection = true;
+                }
+
+                // Refresh all the previously selected items that became unselected
+                size_t i;
+                for (i = 0; i < oldSelections.GetCount(); i++) {
+                        if (!IsSelected(oldSelections[i])) {
+                                wxRect rect;
+                                GetItemRect(oldSelections[i], rect);
+                                RefreshRect(rect);
+                        }
+                }
+
+                Select(n, true);
+                if (stateChanged.Index(n) == wxNOT_FOUND)
+                        stateChanged.Add(n);
+
+                if (keepFirstSelection)
+                        m_firstSelection = first;
+        } else {
+                size_t i = 0;
+                for (i = 0; i < m_selections.GetCount(); i++) {
+                        wxRect rect;
+                        GetItemRect(m_selections[i], rect);
+                        RefreshRect(rect);
+
+                        stateChanged.Add(i);
+                }
+
+                m_selections.Clear();
+                Select(n, true);
+                if (stateChanged.Index(n) == wxNOT_FOUND)
+                        stateChanged.Add(n);
+        }
+
+        // Now notify the app of any selection changes
+        size_t i = 0;
+        for (i = 0; i < stateChanged.GetCount(); i++) {
+                wxThumbnailEvent event(
+                        m_selections.Index(stateChanged[i]) != wxNOT_FOUND ? wxEVT_COMMAND_THUMBNAIL_ITEM_SELECTED : wxEVT_COMMAND_THUMBNAIL_ITEM_DESELECTED,
+                        GetId());
+                event.SetEventObject(this);
+                event.SetIndex(stateChanged[i]);
+                GetEventHandler()->ProcessEvent(event);
+        }
+}
+
+/// Find the item under the given point
+bool wxThumbnailCtrl::HitTest(const wxPoint& pt, int& n)
+{
+        wxSize clientSize = GetClientSize();
+        int startX, startY;
+        int ppuX, ppuY;
+        GetViewStart(& startX, & startY);
+        GetScrollPixelsPerUnit(& ppuX, & ppuY);
+
+        int perRow = clientSize.x/(m_thumbnailOverallSize.x + m_spacing);
+        if (perRow < 1)
+                perRow = 1;
+
+        int colPos = (int) (pt.x / (m_thumbnailOverallSize.x + m_spacing));
+        int rowPos = (int) ((pt.y + startY * ppuY) / (m_thumbnailOverallSize.y + m_spacing));
+
+        int itemN = (rowPos * perRow + colPos);
+        if (itemN >= GetCount())
+                return false;
+
+        wxRect rect;
+        GetItemRect(itemN, rect);
+        if (rect.Contains(pt)) {
+                n = itemN;
+                return true;
+        }
+
+        return false;
+}
+
+void wxThumbnailCtrl::OnSelectAll(wxCommandEvent& WXUNUSED(event))
+{
+        SelectAll();
+}
+
+void wxThumbnailCtrl::OnUpdateSelectAll(wxUpdateUIEvent& event)
+{
+        event.Enable( GetCount() > 0 );
+}
+
+/// Paint the background
+void wxThumbnailCtrl::PaintBackground(wxDC& dc)
+{
+        wxColour backgroundColour = GetBackgroundColour();
+        if (!backgroundColour.Ok())
+                backgroundColour = wxSystemSettings::GetColour(wxSYS_COLOUR_3DFACE);
+
+        // Clear the background
+        dc.SetBrush(wxBrush(backgroundColour));
+        dc.SetPen(*wxTRANSPARENT_PEN);
+        wxRect windowRect(wxPoint(0, 0), GetClientSize());
+        windowRect.x -= 2;
+        windowRect.y -= 2;
+        windowRect.width += 4;
+        windowRect.height += 4;
+
+        // We need to shift the rectangle to take into account
+        // scrolling. Converting device to logical coordinates.
+        CalcUnscrolledPosition(windowRect.x, windowRect.y, & windowRect.x, & windowRect.y);
+        dc.DrawRectangle(windowRect);
+}
+
+/// Recreate buffer bitmap if necessary
+bool wxThumbnailCtrl::RecreateBuffer(const wxSize& size)
+{
+        wxSize sz = size;
+        if (sz == wxDefaultSize)
+                sz = GetClientSize();
+
+        if (sz.x < 1 || sz.y < 1)
+                return false;
+
+        if (!m_bufferBitmap.Ok() || m_bufferBitmap.GetWidth() < sz.x || m_bufferBitmap.GetHeight() < sz.y)
+                m_bufferBitmap = wxBitmap(sz.x, sz.y);
+        return m_bufferBitmap.Ok();
+}
+
+/*!
+ * wxThumbnailItem
+ */
+
+/// Draw the item
+bool wxThumbnailItem::Draw(wxDC& WXUNUSED(dc), wxThumbnailCtrl* WXUNUSED(ctrl), const wxRect& WXUNUSED(rect), int WXUNUSED(style))
+{
+        return false;
+}
+
+/// Draw the item background
+bool wxThumbnailItem::DrawBackground(wxDC& dc, wxThumbnailCtrl* ctrl, const wxRect& rect, const wxRect& imageRect, int style, int WXUNUSED(index))
+{
+        wxColour mediumGrey = ctrl->GetUnselectedThumbnailBackgroundColour();
+        wxColour unfocussedDarkGrey = ctrl->GetSelectedThumbnailUnfocussedBackgroundColour();
+        wxColour focussedDarkGrey = ctrl->GetSelectedThumbnailFocussedBackgroundColour();
+        wxColour darkGrey ;
+        if (style & wxTHUMBNAIL_FOCUSSED)
+                darkGrey = focussedDarkGrey;
+        else
+                darkGrey = unfocussedDarkGrey;
+
+        if (style & wxTHUMBNAIL_SELECTED) {
+                wxBrush brush(darkGrey);
+                wxPen pen(darkGrey);
+                dc.SetBrush(brush);
+                dc.SetPen(pen);
+        } else {
+                wxBrush brush(mediumGrey);
+                wxPen pen(mediumGrey);
+                dc.SetBrush(brush);
+                dc.SetPen(pen);
+        }
+
+        dc.DrawRectangle(rect);
+
+        if (style & wxTHUMBNAIL_TAGGED) {
+                wxPen bluePen = ctrl->GetTagColour();
+                bluePen.SetWidth(3);
+                dc.SetPen(bluePen);
+
+                dc.DrawLine(rect.GetRight(), rect.GetTop(), rect.GetRight(), rect.GetBottom());
+                dc.DrawLine(rect.GetLeft(), rect.GetBottom(), rect.GetRight(), rect.GetBottom());
+
+                dc.DrawLine(rect.GetLeft(), rect.GetTop(), rect.GetRight(), rect.GetTop());
+                dc.DrawLine(rect.GetLeft(), rect.GetTop(), rect.GetLeft(), rect.GetBottom());
+        } else if (style & wxTHUMBNAIL_SELECTED) {
+                dc.SetPen(*wxWHITE_PEN);
+                dc.DrawLine(rect.GetRight(), rect.GetTop(), rect.GetRight(), rect.GetBottom());
+                dc.DrawLine(rect.GetLeft(), rect.GetBottom(), rect.GetRight()+1, rect.GetBottom());
+
+                dc.SetPen(*wxBLACK_PEN);
+                dc.DrawLine(rect.GetLeft(), rect.GetTop(), rect.GetRight(), rect.GetTop());
+                dc.DrawLine(rect.GetLeft(), rect.GetTop(), rect.GetLeft(), rect.GetBottom());
+        } else {
+                dc.SetPen(*wxBLACK_PEN);
+                dc.DrawLine(rect.GetRight(), rect.GetTop(), rect.GetRight(), rect.GetBottom());
+                dc.DrawLine(rect.GetLeft(), rect.GetBottom(), rect.GetRight()+1, rect.GetBottom());
+
+                dc.DrawLine(rect.GetLeft(), rect.GetTop(), rect.GetRight(), rect.GetTop());
+                dc.DrawLine(rect.GetLeft(), rect.GetTop(), rect.GetLeft(), rect.GetBottom());
+        }
+
+        // wxString filename = wxFileNameFromPath(m_filename);
+        wxString filename = m_filename;
+
+        if (!filename.IsEmpty() && (ctrl->GetWindowStyle() & wxTH_TEXT_LABEL)) {
+                dc.SetFont(ctrl->GetFont());
+                if (style & wxTHUMBNAIL_SELECTED)
+                        dc.SetTextForeground(ctrl->GetSelectedTextColour());
+                else
+                        dc.SetTextForeground(ctrl->GetUnselectedTextColour());
+                dc.SetBackgroundMode(wxTRANSPARENT);
+
+                int margin = ctrl->GetThumbnailMargin();
+
+                wxRect fRect;
+                fRect.x = rect.x + margin;
+                fRect.y = rect.y + rect.height - (rect.height - imageRect.height) + margin;
+                fRect.width = rect.width - 2*margin;
+                fRect.height = (rect.height - imageRect.height) - margin;
+
+                wxString tmp;
+                if (wxFileExists(filename)) {
+                        tmp = wxFileNameFromPath(filename);
+                } else {
+                        tmp = filename;
+                }
+
+                wxCoord textW, textH;
+                dc.GetTextExtent(tmp, & textW, & textH);
+
+                dc.SetClippingRegion(fRect);
+                int x = fRect.x + wxMax(0, (fRect.width - textW)/2);
+                int y = fRect.y ;
+
+                dc.DrawText(tmp, x, y);
+                dc.DestroyClippingRegion();
+        }
+        if (!filename.IsEmpty()) {
+                wxString file, name, ext;
+                wxFileName::SplitPath(filename, &file, &name, &ext);
+                if (!ext.IsEmpty() && (ctrl->GetWindowStyle() & wxTH_EXTENSION_LABEL)) {
+                        ext.MakeUpper();
+
+                        dc.SetFont(ctrl->GetFont());
+                        if (style & wxTHUMBNAIL_SELECTED)
+                                dc.SetTextForeground(ctrl->GetSelectedTextColour());
+                        else
+                                dc.SetTextForeground(ctrl->GetUnselectedTextColour());
+                        dc.SetBackgroundMode(wxTRANSPARENT);
+
+                        int margin = ctrl->GetThumbnailMargin();
+
+                        wxRect fRect;
+                        fRect.x = rect.x + margin;
+                        fRect.y = rect.y + margin;
+                        fRect.width = rect.width - 2*margin;
+                        fRect.height = (rect.height - imageRect.height)/2 - 2*margin;
+
+                        wxCoord textW, textH;
+                        dc.GetTextExtent(ext, & textW, & textH);
+
+                        dc.SetClippingRegion(fRect);
+                        int x = fRect.x ;
+                        int y = fRect.y ;
+                        dc.DrawText(ext, x, y);
+                        dc.DestroyClippingRegion();
+                }
+        }
+        // Draw tag bitmap
+        if (style & wxTHUMBNAIL_TAGGED) {
+                const wxBitmap& tagBitmap = ctrl->GetTagBitmap();
+                if (tagBitmap.Ok()) {
+                        int x = rect.x + rect.width - tagBitmap.GetWidth() - ctrl->GetThumbnailMargin();
+                        int y = rect.y + ctrl->GetThumbnailMargin();
+                        dc.DrawBitmap(tagBitmap, x, y, true);
+                }
+        }
+
+        return true;
+}
+
+wxSize wxThumbnailCtrl::DoGetBestSize() const
+{
+        wxSize sz = wxWindow::DoGetBestSize();
+        return sz;
+}
+
+/*!
+ * wxImageThumbnailItem
+ */
+
+
+/// Load the thumbnail
+class LoadThread: public wxThread
+{
+public:
+        LoadThread(const wxString& filename, wxBitmap& bitmap, wxImageThumbnailItem* _item):
+                wxThread(wxTHREAD_JOINABLE),
+                m_cachedBitmap(bitmap),
+                m_filename(filename),
+                item(_item)
+        {
+        }
+
+        virtual void *Entry()
+        {
+                if (wxFileExists(m_filename)) {
+                        wxImage image;
+                        wxFileName fileName(m_filename);
+                        /* if(!fileName.HasExt() || fileName.GetExt().CompareTo(wxT("DCM"), wxString::ignoreCase) == 0) {
+                         std::string stdFileName(TOPATH(m_filename));
+                         {
+                        	 GNC::GCS::ThumbnailController::Instance()->requestThumbnail(stdFileName, this->item);
+                         }
+                        } else {*/
+                        if (!image.LoadFile(m_filename, wxBITMAP_TYPE_ANY)) {
+                                if (fileName.GetExt().CompareTo(wxT("PDF"), wxString::ignoreCase) == 0) {
+                                        image = GinkgoResourcesManager::History::GetPDFPreview().ConvertToImage();
+                                } else {
+                                        image = GinkgoResourcesManager::History::GetIcoUnknownFile().ConvertToImage();
+                                }
+                        }
+                        item->LoadwxImage(image);
+                } else {
+                        long id_file;
+                        if (m_filename.ToLong(&id_file)) {
+                                GNC::GCS::ThumbnailController::Instance()->requestThumbnail(id_file, this->item);
+                        }
+                }
+                return NULL;
+        }
+        wxBitmap& m_cachedBitmap;
+        wxString m_filename;
+        wxImageThumbnailItem* item;
+};
+
+void wxImageThumbnailItem::SetImage(long /*file_pk*/, wxImage* pImage)
+{
+        LoadwxImage((*pImage));
+}
+
+void wxImageThumbnailItem::LoadwxImage(wxImage& image)
+{
+        wxSize thumbnailSize = m_ctrl->GetThumbnailImageSize();
+        double scaleX = ((double) thumbnailSize.x)/((double) image.GetWidth());
+        double scaleY = ((double) thumbnailSize.y)/((double) image.GetHeight());
+
+        if (scaleX < 1.0 || scaleY < 1.0) {
+                double scale = wxMin(scaleX, scaleY);
+                int newWidth = std::max<int>(1, (int) (scale * image.GetWidth()));
+                int newHeight = std::max<int>(1, (int) (scale * image.GetHeight()));
+                image.Rescale(newWidth, newHeight);
+        }
+        m_cachedBitmap = wxBitmap(image);
+        m_ctrl->Refresh(true);
+}
+
+/// Draw the item
+bool wxImageThumbnailItem::Draw(wxDC& dc, wxThumbnailCtrl* /*ctrl*/, const wxRect& rect, int WXUNUSED(style))
+{
+        wxCriticalSectionLocker l(*m_plock);
+        dc.SetBrush(*wxBLACK);
+        dc.SetPen(*wxBLACK);
+        dc.DrawRectangle(rect);
+        if (m_cachedBitmap.Ok()) {
+                int x = rect.x + (rect.width - m_cachedBitmap.GetWidth())/2;
+                int y = rect.y + (rect.height - m_cachedBitmap.GetHeight())/2;
+
+                // Work around apparent eVC++ bug (image not drawing properly)
+#ifdef __WXWINCE__
+                wxBitmap tmpBitmap = m_cachedBitmap;
+                dc.DrawBitmap(tmpBitmap, x, y);
+#else
+                dc.DrawBitmap(m_cachedBitmap, x, y);
+#endif
+        }  else {
+                if (pThread == NULL) {
+                        pThread = new LoadThread(m_filename, m_cachedBitmap, this);
+                        if (pThread->Create() == wxTHREAD_NO_ERROR) {
+                                pThread->SetPriority(WXTHREAD_MIN_PRIORITY);
+                                pThread->Run();
+                        } else {
+                                delete pThread;
+                                pThread = NULL;
+                        }
+                }
+        }
+
+        return true;
+}
+
+wxImageThumbnailItem::wxImageThumbnailItem(const wxString& filename):
+        wxThumbnailItem(filename),
+        pThread(nullptr),
+        m_ctrl(nullptr)
+{
+        m_plock = new wxCriticalSection;
+}
+
+wxImageThumbnailItem::~wxImageThumbnailItem()
+{
+        {
+                wxCriticalSectionLocker l(*m_plock);
+                GNC::GCS::ThumbnailController::Instance()->removeRequest(this);
+                try {
+                        if (pThread != NULL) {
+                                if (pThread->IsRunning()) {
+                                        pThread->Wait();
+                                }
+                                pThread->Delete();
+                                delete pThread;
+                        }
+                } catch (...) {
+                        wxLogDebug("wxImageThumbnailItem::~wxImageThumbnailItem(): something went wrong halting the thread\n");
+                }
+        }
+        delete m_plock;
+}
+
+bool wxImageThumbnailItem::Load(wxThumbnailCtrl* ctrl, bool forceLoad)
+{
+        m_ctrl = ctrl;
+        if (m_cachedBitmap.Ok() && !forceLoad)
+                return true;
+        return false;
+}
+
+/*!
+ * wxImageThumbnailItem
+ */
+
+/// Draw the item
+bool wxMemoryImageThumbnailItem::Draw(wxDC& dc, wxThumbnailCtrl* WXUNUSED(ctrl), const wxRect& rect, int WXUNUSED(style))
+{
+        if (m_cachedBitmap.Ok()) {
+                int x = rect.x + (rect.width - m_cachedBitmap.GetWidth())/2;
+                int y = rect.y + (rect.height - m_cachedBitmap.GetHeight())/2;
+
+                // Work around apparent eVC++ bug (image not drawing properly)
+#ifdef __WXWINCE__
+                wxBitmap tmpBitmap = m_cachedBitmap;
+                dc.DrawBitmap(tmpBitmap, x, y);
+#else
+                dc.DrawBitmap(m_cachedBitmap, x, y);
+#endif
+        }
+        return true;
+}
+
+/// Load the thumbnail
+bool wxMemoryImageThumbnailItem::Load(wxThumbnailCtrl* ctrl, bool forceLoad)
+{
+        if (m_cachedBitmap.Ok() && !forceLoad)
+                return true;
+
+        if (m_Image.IsOk()) {
+                wxSize thumbnailSize = ctrl->GetThumbnailImageSize();
+                double scaleX = ((double) thumbnailSize.x)/((double) m_Image.GetWidth());
+                double scaleY = ((double) thumbnailSize.y)/((double) m_Image.GetHeight());
+
+                if (scaleX < 1.0 || scaleY < 1.0) {
+                        double scale = wxMin(scaleX, scaleY);
+                        int newWidth = (int) (scale * m_Image.GetWidth());
+                        int newHeight = (int) (scale * m_Image.GetHeight());
+                        m_Image.Rescale(newWidth, newHeight,wxIMAGE_QUALITY_HIGH);
+
+                }
+                m_cachedBitmap = wxBitmap(m_Image);
+
+                return true;
+        }
+        return false;
+}
diff --git a/cadxcore/wx/thumbnailctrl/thumbnailctrl.h b/cadxcore/wx/thumbnailctrl/thumbnailctrl.h
new file mode 100644
index 0000000..68c17a2
--- /dev/null
+++ b/cadxcore/wx/thumbnailctrl/thumbnailctrl.h
@@ -0,0 +1,752 @@
+/*
+ *
+ *  $Id: thumbnailctrl.h $
+ *  Ginkgo CADx Project
+ *
+ *
+/////////////////////////////////////////////////////////////////////////////
+// Name:        thumbnailctrl.h
+// Purpose:     Displays a scrolling window of thumbnails
+// Author:      Julian Smart
+// Modified by:
+// Created:     03/08/04 17:22:46
+// RCS-ID:
+// Copyright:   (c) Julian Smart
+// Licence:     wxWidgets Licence
+/////////////////////////////////////////////////////////////////////////////
+*/
+#ifndef _WX_THUMBNAILCTRL_H_
+#define _WX_THUMBNAILCTRL_H_
+
+#if defined(__GNUG__) && !defined(__APPLE__)
+#pragma interface "thumbnailctrl.cpp"
+#endif
+#include <api/api.h>
+#include <wx/dynarray.h>
+#include <wx/scrolwin.h>
+#include <wx/image.h>
+#include <wx/bitmap.h>
+#include <main/controllers/thumbnailcontroller.h>
+
+/*!
+ * Includes
+ */
+
+/*!
+ * Styles and flags
+ */
+
+/* Styles
+ */
+
+#define wxTH_MULTIPLE_SELECT    0x0010
+#define wxTH_SINGLE_SELECT      0x0000
+#define wxTH_TEXT_LABEL         0x0020
+#define wxTH_IMAGE_LABEL        0x0040
+#define wxTH_EXTENSION_LABEL    0x0080
+
+/* Flags
+ */
+
+#define wxTHUMBNAIL_SHIFT_DOWN  0x01
+#define wxTHUMBNAIL_CTRL_DOWN   0x02
+#define wxTHUMBNAIL_ALT_DOWN    0x04
+
+#define wxTHUMBNAIL_SORT_NAME_UP            1
+#define wxTHUMBNAIL_SORT_NAME_DOWN          2
+#define wxTHUMBNAIL_SORT_TIMESTAMP_UP       3
+#define wxTHUMBNAIL_SORT_TIMESTAMP_DOWN     4
+#define wxTHUMBNAIL_SORT_NUMERICALLY_UP     5
+#define wxTHUMBNAIL_SORT_NUMERICALLY_DOWN   6
+#define wxTHUMBNAIL_SORT_TYPE_UP            7
+#define wxTHUMBNAIL_SORT_TYPE_DOWN          8
+
+/* Defaults
+ */
+
+#define wxTHUMBNAIL_DEFAULT_OVERALL_SIZE wxSize(-1, -1)
+#define wxTHUMBNAIL_DEFAULT_IMAGE_SIZE wxSize(80, 80)
+#define wxTHUMBNAIL_DEFAULT_SPACING 3
+#define wxTHUMBNAIL_DEFAULT_MARGIN 1
+#define wxTHUMBNAIL_DEFAULT_HEIGHT 10
+#define wxTHUMBNAIL_DEFAULT_UNFOCUSSED_BACKGROUND wxColour(175, 175, 175)
+#define wxTHUMBNAIL_DEFAULT_FOCUSSED_BACKGROUND wxColour(140, 140, 140)
+// #define wxTHUMBNAIL_DEFAULT_UNSELECTED_BACKGROUND wxColour(205, 205, 205)
+#define wxTHUMBNAIL_DEFAULT_UNSELECTED_BACKGROUND wxColour(255,255,255)
+#define wxTHUMBNAIL_DEFAULT_SELECTED_TEXT_COLOR wxColour(255,255,255);
+#define wxTHUMBNAIL_DEFAULT_UNSELECTED_TEXT_COLOR wxColour(0,0,0);
+#define wxTHUMBNAIL_DEFAULT_TYPE_COLOUR wxColour(0, 0, 200)
+#define wxTHUMBNAIL_DEFAULT_TAG_COLOUR wxColour(0, 0, 255)
+#define wxTHUMBNAIL_DEFAULT_FOCUS_RECT_COLOUR wxColour(100, 80, 80)
+
+/*!
+ * Forward declarations
+ */
+
+class wxThumbnailCtrl;
+
+/*!
+ * wxThumbnailItem class declaration
+ */
+
+// Drawing styles/states
+#define wxTHUMBNAIL_SELECTED    0x01
+#define wxTHUMBNAIL_TAGGED      0x02
+// The control is focussed
+#define wxTHUMBNAIL_FOCUSSED    0x04
+// The item itself has the focus
+#define wxTHUMBNAIL_IS_FOCUS    0x08
+
+class EXTAPI wxThumbnailItem: public wxObject
+{
+        DECLARE_DYNAMIC_CLASS(wxThumbnailItem)
+public:
+// Constructors
+
+        wxThumbnailItem(const wxString& filename = wxEmptyString)
+        {
+                m_filename = filename;
+                m_state = 0;
+                m_id = 0;
+        }
+
+// Accessors
+
+        /// Filename
+        void SetFilename(const wxString& filename)
+        {
+                m_filename = filename;
+        }
+        const wxString& GetFilename() const
+        {
+                return m_filename;
+        }
+
+        /// State storage while sorting
+        void SetState(int state)
+        {
+                m_state = state;
+        }
+        int GetState() const
+        {
+                return m_state;
+        }
+
+        void SetId(int id)
+        {
+                m_id= id;
+        }
+        int GetId()
+        {
+                return m_id;
+        }
+
+// Overrideables
+
+        /// Draw the item
+        virtual bool Draw(wxDC& dc, wxThumbnailCtrl* ctrl, const wxRect& rect, int style) ;
+
+        /// Draw the background
+        virtual bool DrawBackground(wxDC& dc, wxThumbnailCtrl* ctrl, const wxRect& rect, const wxRect& imageRect, int style, int index) ;
+
+        /// Load the thumbnail
+        virtual bool Load(wxThumbnailCtrl* WXUNUSED(ctrl), bool WXUNUSED(forceLoad))
+        {
+                return false;
+        }
+
+protected:
+        wxString    m_filename;
+        int         m_state; // state storage while sorting
+        int			 m_id; // state storage while sorting
+};
+
+/*!
+ * wxImageThumbnailItem class declaration
+ */
+
+class LoadThread;
+class EXTAPI wxImageThumbnailItem: public wxThumbnailItem, public GADAPI::ThumbnailsNotifier
+{
+        DECLARE_DYNAMIC_CLASS(wxImageThumbnailItem)
+public:
+// Constructors
+
+        wxImageThumbnailItem(const wxString& filename = wxEmptyString);
+        ~wxImageThumbnailItem();
+
+// Overrideables
+
+        /// Draw the item
+        virtual bool Draw(wxDC& dc, wxThumbnailCtrl* ctrl, const wxRect& rect, int style) ;
+
+        /// Load the thumbnail
+        virtual bool Load(wxThumbnailCtrl* ctrl, bool forceLoad) ;
+
+        //inotificador thumbnail
+        virtual void SetImage(long /*file_pk*/, wxImage* pImage);
+
+        void LoadwxImage(wxImage& image);
+
+        wxBitmap& GetCachedBitmap()
+        {
+                return m_cachedBitmap;
+        }
+
+protected:
+        wxBitmap    m_cachedBitmap;
+        LoadThread* pThread;
+        wxThumbnailCtrl* m_ctrl;
+        wxCriticalSection* m_plock;
+};
+
+/*!
+ * wxImageThumbnailItem class declaration
+ */
+
+class EXTAPI wxMemoryImageThumbnailItem: public wxThumbnailItem
+{
+        DECLARE_DYNAMIC_CLASS(wxMemoryImageThumbnailItem)
+public:
+// Constructors
+
+        wxMemoryImageThumbnailItem(const wxString& name = wxEmptyString,wxImage image = wxImage()):
+                wxThumbnailItem(name)
+        {
+                m_Image=image;
+        }
+
+// Overrideables
+
+        /// Draw the item
+        virtual bool Draw(wxDC& dc, wxThumbnailCtrl* ctrl, const wxRect& rect, int style) ;
+
+        /// Load the thumbnail
+        virtual bool Load(wxThumbnailCtrl* ctrl, bool forceLoad) ;
+
+        wxBitmap& GetCachedBitmap()
+        {
+                return m_cachedBitmap;
+        }
+
+        virtual void SetImage(wxImage image)
+        {
+                m_Image=image;
+        };
+
+        virtual wxImage& GetImage()
+        {
+                return m_Image;
+        }
+
+protected:
+        wxBitmap    m_cachedBitmap;
+        wxImage	m_Image;
+};
+
+
+
+WX_DECLARE_OBJARRAY(wxThumbnailItem, wxThumbnailItemArray);
+
+/*!
+ * wxThumbnailCtrl class declaration
+ */
+
+class EXTAPI wxThumbnailCtrl: public wxScrolledWindow
+{
+        DECLARE_DYNAMIC_CLASS( wxThumbnailCtrl )
+        DECLARE_EVENT_TABLE()
+
+public:
+// Constructors
+
+        wxThumbnailCtrl( );
+        wxThumbnailCtrl( wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
+                         long style = wxTH_TEXT_LABEL|wxTH_IMAGE_LABEL|wxTH_EXTENSION_LABEL );
+
+// Operations
+
+        /// Creation
+        bool Create( wxWindow* parent, wxWindowID id = -1, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize,
+                     long style = wxTH_TEXT_LABEL|wxTH_IMAGE_LABEL|wxTH_EXTENSION_LABEL );
+
+        /// Call Freeze to prevent refresh
+        void Freeze();
+
+        /// Call Thaw to refresh
+        void Thaw();
+
+        /// Scrolls the item into view if necessary
+        void EnsureVisible(int n);
+
+        /// Forces a reload of this item's thumbnail image
+        void Reload(int n);
+
+        /// Finds an item that matches a given filename
+        int FindItemForFilename(const wxString& filename);
+
+        /// Sorts items in the specified way
+        void Sort(int sortMode);
+
+        /// Draws the item. Normally you override function in wxThumbnailItem.
+        virtual bool DrawItem(int n, wxDC& dc, const wxRect& rect, int style) ;
+
+        /// Draws the background for the item, including bevel
+        virtual bool DrawItemBackground(int n, wxDC& dc, const wxRect& rect, const wxRect& imageRect, int style) ;
+
+// Adding items
+
+        /// Append a single item
+        virtual int Append(wxThumbnailItem* item);
+
+        /// Insert a single item
+        virtual int Insert(wxThumbnailItem* item, int pos = 0);
+
+// Deleting items
+
+        /// Clear all items
+        virtual void Clear() ;
+
+        /// Delete this item
+        virtual void Delete(int n) ;
+
+// Accessing items
+
+        /// Get the number of items in the control
+        virtual int GetCount() const
+        {
+                return (int) m_items.GetCount();
+        }
+
+        /// Is the control empty?
+        bool IsEmpty() const
+        {
+                return GetCount() == 0;
+        }
+
+        /// Get the nth item
+        wxThumbnailItem* GetItem(int n);
+
+        /// Get the item searching by id
+        wxThumbnailItem* GetItemWithId(int n);
+
+        /// Get the overall rect of the given item
+        /// If transform is true, rect is relative to the scroll viewport
+        /// (i.e. may be negative)
+        bool GetItemRect(int item, wxRect& rect, bool transform = true);
+
+        /// Get the image rect of the given item
+        bool GetItemRectImage(int item, wxRect& rect, bool transform = true);
+
+        /// Return the row and column given the client
+        /// size and a left-to-right, top-to-bottom layout
+        /// assumption
+        bool GetRowCol(int item, const wxSize& clientSize, int& row, int& col);
+
+        /// Get the focus item, or -1 if there is none
+        int GetFocusItem() const
+        {
+                return m_focusItem;
+        }
+
+        /// Set the focus item
+        void SetFocusItem(int item) ;
+
+// Selection
+
+        /// Select or deselect an item
+        void Select(int n, bool select = true) ;
+
+        /// Select or deselect a range
+        void SelectRange(int from, int to, bool select = true) ;
+
+        /// Tag or untag an item
+        void Tag(int n, bool tag = true) ;
+
+        /// Select all
+        void SelectAll() ;
+
+        /// Select none
+        void SelectNone() ;
+
+        /// Get the index of the single selection, if not multi-select.
+        /// Returns -1 if there is no selection.
+        int GetSelection() const ;
+
+        /// Get indexes of all selections, if multi-select
+        const wxArrayInt& GetSelections() const
+        {
+                return m_selections;
+        }
+
+        /// Get indexes of all tags
+        const wxArrayInt& GetTags() const
+        {
+                return m_tags;
+        }
+
+        /// Returns true if the item is selected
+        bool IsSelected(int n) const ;
+
+        /// Returns true if the item is tagged
+        bool IsTagged(int n) const ;
+
+        /// Clears all selections
+        void ClearSelections();
+
+        /// Clears all tags
+        void ClearTags();
+
+// Visual properties
+
+        /// The overall size of the thumbnail, including decorations.
+        /// DON'T USE THIS from the application, since it will
+        /// normally be calculated by SetThumbnailImageSize.
+        void SetThumbnailOverallSize(const wxSize& sz)
+        {
+                m_thumbnailOverallSize = sz;
+        }
+        const wxSize& GetThumbnailOverallSize() const
+        {
+                return m_thumbnailOverallSize;
+        }
+
+        /// The size of the image part
+        void SetThumbnailImageSize(const wxSize& sz);
+        const wxSize& GetThumbnailImageSize() const
+        {
+                return m_thumbnailImageSize;
+        }
+
+        /// The inter-item spacing
+        void SetSpacing(int spacing)
+        {
+                m_spacing = spacing;
+        }
+        int GetSpacing() const
+        {
+                return m_spacing;
+        }
+
+        /// The margin between elements within the thumbnail
+        void SetThumbnailMargin(int margin)
+        {
+                m_thumbnailMargin = margin;
+        }
+        int GetThumbnailMargin() const
+        {
+                return m_thumbnailMargin;
+        }
+
+        /// The height required for text in the thumbnail
+        void SetThumbnailTextHeight(int h)
+        {
+                m_thumbnailTextHeight = h;
+        }
+        int GetThumbnailTextHeight() const
+        {
+                return m_thumbnailTextHeight;
+        }
+
+        /// The focussed and unfocussed background colour for a
+        /// selected thumbnail
+        void SetSelectedThumbnailBackgroundColour(const wxColour& focussedColour, const wxColour& unfocussedColour)
+        {
+                m_focussedThumbnailBackgroundColour = focussedColour;
+                m_unfocussedThumbnailBackgroundColour = unfocussedColour;
+        }
+        const wxColour& GetSelectedThumbnailFocussedBackgroundColour() const
+        {
+                return m_focussedThumbnailBackgroundColour;
+        }
+        const wxColour& GetSelectedThumbnailUnfocussedBackgroundColour() const
+        {
+                return m_unfocussedThumbnailBackgroundColour;
+        }
+
+        /// The unselected background colour for a thumbnail
+        void SetUnselectedThumbnailBackgroundColour(const wxColour& colour)
+        {
+                m_unselectedThumbnailBackgroundColour = colour;
+        }
+        const wxColour& GetUnselectedThumbnailBackgroundColour() const
+        {
+                return m_unselectedThumbnailBackgroundColour;
+        }
+
+        void SetUnselectedTextColour(const wxColour& colour)
+        {
+                m_unselectedTextColour = colour;
+        }
+        const wxColour& GetUnselectedTextColour() const
+        {
+                return m_unselectedTextColour;
+        }
+
+        void SetSelectedTextColour(const wxColour& colour)
+        {
+                m_selectedTextColour = colour;
+        }
+        const wxColour& GetSelectedTextColour() const
+        {
+                return m_selectedTextColour;
+        }
+
+        /// The colour for the type text (top left of thumbnail)
+        void SetTypeColour(const wxColour& colour)
+        {
+                m_typeColour = colour;
+        }
+        const wxColour& GetTypeColour() const
+        {
+                return m_typeColour;
+        }
+
+        /// The colour for the tag outline
+        void SetTagColour(const wxColour& colour)
+        {
+                m_tagColour = colour;
+        }
+        const wxColour& GetTagColour() const
+        {
+                return m_tagColour;
+        }
+
+        /// The focus rectangle pen colour
+        void SetFocusRectColour(const wxColour& colour)
+        {
+                m_focusRectColour = colour;
+        }
+        const wxColour& GetFocusRectColour() const
+        {
+                return m_focusRectColour;
+        }
+
+// Command handlers
+
+        void OnSelectAll(wxCommandEvent& event);
+        void OnUpdateSelectAll(wxUpdateUIEvent& event);
+
+// Event handlers
+
+        /// Painting
+        void OnPaint(wxPaintEvent& event);
+        void OnEraseBackground(wxEraseEvent& event);
+
+        /// Left-click
+        void OnLeftClick(wxMouseEvent& event);
+
+        /// Left-double-click
+        void OnLeftDClick(wxMouseEvent& event);
+
+        /// Middle-click
+        void OnMiddleClick(wxMouseEvent& event);
+
+        /// Right-click
+        void OnRightClick(wxMouseEvent& event);
+
+        /// Key press
+        void OnChar(wxKeyEvent& event);
+
+        /// Sizing
+        void OnSize(wxSizeEvent& event);
+
+        /// Setting/losing focus
+        void OnSetFocus(wxFocusEvent& event);
+        void OnKillFocus(wxFocusEvent& event);
+
+// Implementation
+
+        /// Set up scrollbars, e.g. after a resize
+        void SetupScrollbars();
+
+        /// Calculate the outer thumbnail size based
+        /// on font used for text and inner size
+        void CalculateOverallThumbnailSize();
+
+        /// Do (de)selection
+        void DoSelection(int n, int flags);
+
+        /// Find the item under the given point
+        bool HitTest(const wxPoint& pt, int& n);
+
+        /// Keyboard navigation
+        virtual bool KeyboardNavigate(int keyCode, int flags);
+
+        /// Scroll to see the image
+        void ScrollIntoView(int n, int keyCode);
+
+        /// Paint the background
+        void PaintBackground(wxDC& dc);
+
+        /// Recreate buffer bitmap if necessary
+        bool RecreateBuffer(const wxSize& size = wxDefaultSize);
+
+        /// Get tag bitmap
+        const wxBitmap& GetTagBitmap() const
+        {
+                return m_tagBitmap;
+        }
+
+        /// Get/set sort mode
+        void SetSortMode(int sortMode)
+        {
+                m_sortMode = sortMode;
+        }
+        int GetSortMode() const
+        {
+                return m_sortMode ;
+        }
+
+        static wxThumbnailCtrl* GetThumbnailCtrl()
+        {
+                return sm_currentThumbnailCtrl;
+        }
+
+// Overrides
+        wxSize DoGetBestSize() const ;
+
+// Data members
+private:
+
+        /// The items
+        wxThumbnailItemArray    m_items;
+
+        /// The selections
+        wxArrayInt              m_selections;
+
+        /// The tags
+        wxArrayInt              m_tags;
+
+        /// Outer size of the thumbnail item
+        wxSize                  m_thumbnailOverallSize;
+
+        /// Image size of the thumbnail item
+        wxSize                  m_thumbnailImageSize;
+
+        /// The inter-item spacing
+        int                     m_spacing;
+
+        /// The margin between the image/text and the edge of the thumbnail
+        int                     m_thumbnailMargin;
+
+        /// The height of thumbnail text in the current font
+        int                     m_thumbnailTextHeight;
+
+        /// Allows nested Freeze/Thaw
+        int                     m_freezeCount;
+
+        /// First selection in a range
+        int                     m_firstSelection;
+
+        /// Last selection
+        int                     m_lastSelection;
+
+        /// Focus item
+        int                     m_focusItem;
+
+        /// Tag marker bitmap
+        wxBitmap                m_tagBitmap;
+
+        /// Sort mode
+        int                     m_sortMode;
+
+        /// Current control, used in sorting
+        static wxThumbnailCtrl* sm_currentThumbnailCtrl;
+
+        /// Focussed/unfocussed selected thumbnail background colours
+        wxColour                m_focussedThumbnailBackgroundColour;
+        wxColour                m_unfocussedThumbnailBackgroundColour;
+        wxColour                m_unselectedThumbnailBackgroundColour;
+        wxColour                m_focusRectColour;
+        wxColour                m_unselectedTextColour;
+        wxColour                m_selectedTextColour;
+
+        /// Type text colour
+        wxColour                m_typeColour;
+
+        /// Tag colour
+        wxColour                m_tagColour;
+
+        /// Buffer bitmap
+        wxBitmap                m_bufferBitmap;
+};
+
+/*!
+ * wxThumbnailEvent - the event class for wxThumbnailCtrl notifications
+ */
+
+class EXTAPI wxThumbnailEvent : public wxNotifyEvent
+{
+public:
+        wxThumbnailEvent(wxEventType commandType = wxEVT_NULL, int winid = 0)
+                : wxNotifyEvent(commandType, winid),
+                  m_itemIndex(-1), m_flags(0)
+        { }
+
+        wxThumbnailEvent(const wxThumbnailEvent& event)
+                : wxNotifyEvent(event),
+                  m_itemIndex(event.m_itemIndex), m_flags(event.m_flags)
+        { }
+
+        int GetIndex() const
+        {
+                return m_itemIndex;
+        }
+        void SetIndex(int n)
+        {
+                m_itemIndex = n;
+        }
+
+        int GetFlags() const
+        {
+                return m_flags;
+        }
+        void SetFlags(int flags)
+        {
+                m_flags = flags;
+        }
+
+        virtual wxEvent *Clone() const
+        {
+                return new wxThumbnailEvent(*this);
+        }
+
+protected:
+        int           m_itemIndex;
+        int           m_flags;
+
+private:
+        DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxThumbnailEvent)
+};
+
+/*!
+ * wxThumbnailCtrl event macros
+ */
+
+BEGIN_DECLARE_EVENT_TYPES()
+DECLARE_EXPORTED_EVENT_TYPE(EXTAPI, wxEVT_COMMAND_THUMBNAIL_ITEM_SELECTED, 2600)
+DECLARE_EXPORTED_EVENT_TYPE(EXTAPI, wxEVT_COMMAND_THUMBNAIL_ITEM_DESELECTED, 2601)
+DECLARE_EXPORTED_EVENT_TYPE(EXTAPI, wxEVT_COMMAND_THUMBNAIL_LEFT_CLICK, 2602)
+DECLARE_EXPORTED_EVENT_TYPE(EXTAPI, wxEVT_COMMAND_THUMBNAIL_RIGHT_CLICK, 2603)
+DECLARE_EXPORTED_EVENT_TYPE(EXTAPI, wxEVT_COMMAND_THUMBNAIL_MIDDLE_CLICK, 2604)
+DECLARE_EXPORTED_EVENT_TYPE(EXTAPI, wxEVT_COMMAND_THUMBNAIL_LEFT_DCLICK, 2605)
+DECLARE_EXPORTED_EVENT_TYPE(EXTAPI, wxEVT_COMMAND_THUMBNAIL_RETURN, 2606)
+END_DECLARE_EVENT_TYPES()
+
+
+typedef void (wxEvtHandler::*wxThumbnailEventFunction)(wxThumbnailEvent&);
+
+#define wxThumbnailHandler(func) \
+			 (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxThumbnailEventFunction, &func)
+
+#define EVT_THUMBNAIL_ITEM_SELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_THUMBNAIL_ITEM_SELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxThumbnailEventFunction, & fn ), NULL ),
+#define EVT_THUMBNAIL_ITEM_DESELECTED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_THUMBNAIL_ITEM_DESELECTED, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxThumbnailEventFunction, & fn ), NULL ),
+#define EVT_THUMBNAIL_LEFT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_THUMBNAIL_LEFT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxThumbnailEventFunction, & fn ), NULL ),
+#define EVT_THUMBNAIL_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_THUMBNAIL_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxThumbnailEventFunction, & fn ), NULL ),
+#define EVT_THUMBNAIL_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_THUMBNAIL_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxThumbnailEventFunction, & fn ), NULL ),
+#define EVT_THUMBNAIL_LEFT_DCLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_THUMBNAIL_LEFT_DCLICK, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxThumbnailEventFunction, & fn ), NULL ),
+#define EVT_THUMBNAIL_RETURN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_THUMBNAIL_RETURN, id, -1, (wxObjectEventFunction) (wxEventFunction)  wxStaticCastEvent( wxThumbnailEventFunction, & fn ), NULL ),
+
+#endif
+// _WX_THUMBNAILCTRL_H_
diff --git a/cadxcore/wx/thumbnailctrl/thumbnailwidget.cpp b/cadxcore/wx/thumbnailctrl/thumbnailwidget.cpp
new file mode 100644
index 0000000..cd4b1b0
--- /dev/null
+++ b/cadxcore/wx/thumbnailctrl/thumbnailwidget.cpp
@@ -0,0 +1,313 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "thumbnailwidget.h"
+
+// For compilers that support precompilation, includes "wx/wx.h".
+#include <wx/wxprec.h>
+
+#ifdef __BORLANDC__
+#pragma hdrstop
+#endif
+
+////@begin includes
+////@end includes
+
+#include <wx/dir.h>
+#include <wx/filename.h>
+#include "thumbnailwidget.h"
+// #include "thumbnailitem.h"
+// #include "utils.h"
+
+////@begin XPM images
+////@end XPM images
+
+/// Returns the image type, or -1, determined from the extension.
+static int DetermineImageType(const wxString& filename);
+
+
+/*!
+ * wxThumbnailWidget type definition
+ */
+
+IMPLEMENT_DYNAMIC_CLASS( wxThumbnailWidget, wxControl )
+
+/*!
+ * wxThumbnailWidget event table definition
+ */
+
+BEGIN_EVENT_TABLE( wxThumbnailWidget, wxControl )
+        // The correct control is actually the tree control, not the dir control.
+        EVT_TREE_SEL_CHANGED( wxID_TREECTRL, wxThumbnailWidget::OnImageBrowserDirctrlSelChanged )
+
+        EVT_THUMBNAIL_LEFT_CLICK(ID_IMAGE_BROWSER_BROWSER, wxThumbnailWidget::OnLeftClick)
+        EVT_THUMBNAIL_LEFT_DCLICK(ID_IMAGE_BROWSER_BROWSER, wxThumbnailWidget::OnLeftDClick)
+
+////@begin wxThumbnailWidget event table entries
+        EVT_TREE_SEL_CHANGED( ID_IMAGE_BROWSER_DIRCTRL, wxThumbnailWidget::OnImageBrowserDirctrlSelChanged )
+
+////@end wxThumbnailWidget event table entries
+
+END_EVENT_TABLE()
+
+/*!
+ * wxThumbnailWidget constructors
+ */
+
+wxThumbnailWidget::wxThumbnailWidget( ):
+        m_dirCtrl(nullptr),
+        m_imageBrowser(nullptr),
+        m_selectionCount(-1)
+{
+}
+
+wxThumbnailWidget::wxThumbnailWidget( wxWindow* parent, wxWindowID id, const wxString& caption, const wxPoint& pos, const wxSize& size, long style ):
+        m_selectionCount(-1)
+{
+        Create(parent, id, caption, pos, size, style);
+}
+
+/*!
+ * wxThumbnailWidget creator
+ */
+
+bool wxThumbnailWidget::Create( wxWindow* parent, wxWindowID id, const wxString& /*caption*/, const wxPoint& pos, const wxSize& size, long style )
+{
+////@begin wxThumbnailWidget member initialisation
+        m_dirCtrl = NULL;
+        m_imageBrowser = NULL;
+////@end wxThumbnailWidget member initialisation
+
+////@begin wxThumbnailWidget creation
+        SetExtraStyle(wxWS_EX_BLOCK_EVENTS);
+        wxControl::Create(parent, id, pos, size, style);
+
+        CreateControls();
+        GetSizer()->Fit(this);
+        GetSizer()->SetSizeHints(this);
+        Centre();
+////@end wxThumbnailWidget creation
+
+        if (!m_initialSelection.IsEmpty())
+                SetSelection(m_initialSelection);
+
+        wxSplitterWindow* splitter = (wxSplitterWindow*) FindWindow(ID_IMAGE_BROWSER_SPLITTER);
+        // Make the splitter update its sizes now instead of in idle time
+        // to reduce on-screen changes
+        splitter->UpdateSize();
+
+        return TRUE;
+}
+
+/*!
+ * Control creation for wxThumbnailWidget
+ */
+
+void wxThumbnailWidget::CreateControls()
+{
+#define EXTRA_STYLES wxTH_TEXT_LABEL|wxTH_IMAGE_LABEL|wxTH_EXTENSION_LABEL|wxTH_MULTIPLE_SELECT
+
+////@begin wxThumbnailWidget content construction
+
+        wxThumbnailWidget* item1 = this;
+
+        wxBoxSizer* item2 = new wxBoxSizer(wxVERTICAL);
+        item1->SetSizer(item2);
+        item1->SetAutoLayout(TRUE);
+
+        wxBoxSizer* item3 = new wxBoxSizer(wxVERTICAL);
+        item2->Add(item3, 1, wxGROW|wxALL, 5);
+
+        wxSplitterWindow* item4 = new wxSplitterWindow( item1, ID_IMAGE_BROWSER_SPLITTER, wxDefaultPosition, wxSize(500, 400), wxSP_3DBORDER|wxSP_3DSASH|wxNO_BORDER|wxCLIP_CHILDREN|wxSP_LIVE_UPDATE  );
+        wxGenericDirCtrl* item5 = new wxGenericDirCtrl( item4, ID_IMAGE_BROWSER_DIRCTRL, _T(""), wxDefaultPosition, wxDefaultSize, wxDIRCTRL_DIR_ONLY, _T("All files (*.*)|*.*"), 0 );
+        m_dirCtrl = item5;
+        wxThumbnailCtrl* item6 = new wxThumbnailCtrl( item4, ID_IMAGE_BROWSER_BROWSER, wxDefaultPosition, wxDefaultSize, wxSUNKEN_BORDER|wxHSCROLL|wxVSCROLL|wxTH_TEXT_LABEL|wxTH_IMAGE_LABEL|wxTH_EXTENSION_LABEL|wxTH_MULTIPLE_SELECT );
+        m_imageBrowser = item6;
+        item4->SplitVertically(item5, item6, 180);
+        item3->Add(item4, 1, wxGROW|wxALL|wxFIXED_MINSIZE, 5);
+
+        wxBoxSizer* item7 = new wxBoxSizer(wxHORIZONTAL);
+        item3->Add(item7, 0, wxGROW, 5);
+
+        item7->Add(5, 5, 1, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+        wxButton* item9 = new wxButton( item1, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 );
+        item9->SetDefault();
+        item7->Add(item9, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+        wxButton* item11 = new wxButton( item1, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        item7->Add(item11, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+        wxButton* item10 = new wxButton( item1, wxID_CANCEL, _("&Help"), wxDefaultPosition, wxDefaultSize, 0 );
+        item7->Add(item10, 0, wxALIGN_CENTER_VERTICAL|wxALL, 5);
+
+////@end wxThumbnailWidget content construction
+}
+
+/*!
+ * Should we show tooltips?
+ */
+
+bool wxThumbnailWidget::ShowToolTips()
+{
+        return TRUE;
+}
+
+/*!
+ * wxEVT_COMMAND_TREELIST_SELECTION_CHANGED event handler for ID_IMAGE_BROWSER_DIRCTRL
+ */
+
+void wxThumbnailWidget::OnImageBrowserDirctrlSelChanged( wxTreeEvent& event )
+{
+        if (!m_dirCtrl || !m_imageBrowser)
+                return;
+
+        m_selectionCount ++;
+
+        if (m_selectionCount > 1) {
+                m_selectionCount --;
+                return;
+        }
+
+        wxTreeItemId id = event.GetItem();
+        if (id) {
+                wxDirItemData* data = (wxDirItemData*) m_dirCtrl->GetTreeCtrl()->GetItemData(id);
+                if (data && data->m_isDir) {
+                        ShowFolder(data->m_path);
+                }
+        }
+
+        m_selectionCount --;
+}
+
+/// Shows the images in the given dir
+void wxThumbnailWidget::ShowFolder(const wxString& path)
+{
+        wxBusyCursor busy;
+        m_imageBrowser->Clear();
+
+        m_imageBrowser->Freeze();
+        wxDir dir;
+        if (dir.Open(path)) {
+                wxString filename;
+
+                bool cont = dir.GetFirst(&filename, wxT("*.*"), wxDIR_FILES);
+                while ( cont ) {
+                        wxString file = path + wxFILE_SEP_PATH + filename;
+                        if (wxFileExists(file) && DetermineImageType(file) != -1) {
+                                m_imageBrowser->Append(new wxImageThumbnailItem(file));
+                        }
+
+                        cont = dir.GetNext(&filename);
+                }
+        }
+        m_imageBrowser->Thaw();
+}
+
+/// Custom event handlers
+void wxThumbnailWidget::OnLeftClick(wxThumbnailEvent& event)
+{
+        if (event.GetFlags() & wxTHUMBNAIL_ALT_DOWN) {
+                int index = event.GetIndex();
+                m_imageBrowser->Tag(index, !m_imageBrowser->IsTagged(index));
+        }
+}
+
+void wxThumbnailWidget::OnLeftDClick(wxThumbnailEvent& WXUNUSED(event))
+{
+        //EndModal(wxID_OK);
+}
+
+void wxThumbnailWidget::SetSelection(const wxString& filename)
+{
+        if (!m_imageBrowser) {
+                m_initialSelection = filename;
+                return;
+        }
+
+        m_selectionCount = 0;
+
+        if (wxDirExists(filename)) {
+                m_dirCtrl->SetPath(filename);
+                return;
+        }
+
+        wxString path = wxPathOnly(filename);
+        wxString file = wxFileNameFromPath(filename);
+        m_dirCtrl->SetPath(path);
+
+        m_selectionCount = -1;
+
+        int index = m_imageBrowser->FindItemForFilename(filename);
+        if (index > -1) {
+                m_imageBrowser->Select(index);
+                m_imageBrowser->EnsureVisible(index);
+        }
+}
+
+wxString wxThumbnailWidget::GetSelection() const
+{
+        int sel = m_imageBrowser->GetSelection();
+        if (sel > -1) {
+                wxThumbnailItem* item = m_imageBrowser->GetItem(sel);
+                if (item) {
+                        return item->GetFilename();
+                }
+        }
+        return wxEmptyString;
+}
+
+wxArrayString wxThumbnailWidget::GetSelections() const
+{
+        wxArrayString arr;
+        wxArrayInt selections = m_imageBrowser->GetSelections();
+        size_t i;
+        for (i = 0; i < selections.GetCount(); i++) {
+                wxThumbnailItem* item = m_imageBrowser->GetItem(selections[i]);
+                if (item)
+                        arr.Add(item->GetFilename());
+        }
+        return arr;
+}
+
+// Returns the image type, or -1, determined from the extension.
+static int DetermineImageType(const wxString& filename)
+{
+        wxString path, name, ext;
+
+        wxFileName::SplitPath(filename, &path, &name, &ext);
+
+        ext.MakeLower();
+        if (ext == wxT("jpg") || ext == wxT("jpeg"))
+                return wxBITMAP_TYPE_JPEG;
+        else if (ext == wxT("gif"))
+                return wxBITMAP_TYPE_GIF;
+        else if (ext == wxT("bmp"))
+                return wxBITMAP_TYPE_BMP;
+        else if (ext == wxT("png"))
+                return wxBITMAP_TYPE_PNG;
+        else if (ext == wxT("pcx"))
+                return wxBITMAP_TYPE_PCX;
+        else if (ext == wxT("tif") || ext == wxT("tiff"))
+                return wxBITMAP_TYPE_TIF;
+        else
+                return -1;
+}
+
+
diff --git a/cadxcore/wx/thumbnailctrl/thumbnailwidget.h b/cadxcore/wx/thumbnailctrl/thumbnailwidget.h
new file mode 100644
index 0000000..1730177
--- /dev/null
+++ b/cadxcore/wx/thumbnailctrl/thumbnailwidget.h
@@ -0,0 +1,126 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+/*!
+ * Includes
+ */
+#include <api/api.h>
+////@begin includes
+#include "wx/wx.h"
+#include "wx/splitter.h"
+#include "wx/dirctrl.h"
+////@end includes
+
+#include "thumbnailctrl.h"
+
+/*!
+ * Forward declarations
+ */
+
+////@begin forward declarations
+class wxGenericDirCtrl;
+class wxThumbnailCtrl;
+////@end forward declarations
+
+/*!
+ * Control identifiers
+ */
+
+////@begin control identifiers
+#define ID_IMAGE_BROWSER_DIALOG 21500
+#define SYMBOL_wxThumbnailWidget_STYLE wxCAPTION|wxRESIZE_BORDER|wxSYSTEM_MENU|wxCLOSE_BOX
+#define SYMBOL_wxThumbnailWidget_TITLE _("Image Browser Dialog")
+#define SYMBOL_wxThumbnailWidget_IDNAME ID_IMAGE_BROWSER_DIALOG
+#define SYMBOL_wxThumbnailWidget_SIZE wxSize(400, 300)
+#define SYMBOL_wxThumbnailWidget_POSITION wxPoint(0, 0)
+#define ID_IMAGE_BROWSER_SPLITTER 21501
+#define ID_IMAGE_BROWSER_DIRCTRL 21502
+#define ID_IMAGE_BROWSER_BROWSER 21503
+////@end control identifiers
+
+/*!
+ * Compatibility
+ */
+
+#ifndef wxCLOSE_BOX
+#define wxCLOSE_BOX 0x1000
+#endif
+
+/*!
+ * wxThumbnailWidget class declaration
+ */
+
+class EXTAPI wxThumbnailWidget: public wxControl
+{
+        DECLARE_DYNAMIC_CLASS( wxThumbnailWidget )
+        DECLARE_EVENT_TABLE()
+
+public:
+        /// Constructors
+        wxThumbnailWidget( );
+        wxThumbnailWidget( wxWindow* parent, wxWindowID id = SYMBOL_wxThumbnailWidget_IDNAME, const wxString& caption = SYMBOL_wxThumbnailWidget_TITLE, const wxPoint& pos = SYMBOL_wxThumbnailWidget_POSITION, const wxSize& size = SYMBOL_wxThumbnailWidget_SIZE, long style = SYMBOL_wxThumbnailWidget_STYLE );
+
+        /// Creation
+        bool Create( wxWindow* parent, wxWindowID id = SYMBOL_wxThumbnailWidget_IDNAME, const wxString& caption = SYMBOL_wxThumbnailWidget_TITLE, const wxPoint& pos = SYMBOL_wxThumbnailWidget_POSITION, const wxSize& size = SYMBOL_wxThumbnailWidget_SIZE, long style = SYMBOL_wxThumbnailWidget_STYLE );
+
+        /// Creates the controls and sizers
+        void CreateControls();
+
+        /// Shows the images in the given dir
+        void ShowFolder(const wxString& path);
+
+        /// Accessors
+
+        void SetSelection(const wxString& filename);
+        wxString GetSelection() const ;
+        wxArrayString GetSelections() const ;
+
+        /// Custom event handlers
+        void OnLeftClick(wxThumbnailEvent& event);
+        void OnLeftDClick(wxThumbnailEvent& event);
+
+////@begin wxThumbnailWidget event handler declarations
+
+        /// wxEVT_COMMAND_TREELIST_SELECTION_CHANGED event handler for ID_IMAGE_BROWSER_DIRCTRL
+        void OnImageBrowserDirctrlSelChanged( wxTreeEvent& event );
+
+////@end wxThumbnailWidget event handler declarations
+
+////@begin wxThumbnailWidget member function declarations
+
+////@end wxThumbnailWidget member function declarations
+
+        /// Should we show tooltips?
+        static bool ShowToolTips();
+
+////@begin wxThumbnailWidget member variables
+        wxGenericDirCtrl* m_dirCtrl;
+        wxThumbnailCtrl* m_imageBrowser;
+////@end wxThumbnailWidget member variables
+
+        // Work around calling selection callback twice
+        int m_selectionCount;
+
+        // Initial path or filename, if set
+        wxString m_initialSelection;
+};
+
diff --git a/cadxcore/wx/thumbnailctrl/tick.xpm b/cadxcore/wx/thumbnailctrl/tick.xpm
new file mode 100644
index 0000000..6bbe2ad
--- /dev/null
+++ b/cadxcore/wx/thumbnailctrl/tick.xpm
@@ -0,0 +1,40 @@
+/* XPM */
+/*
+ *  $Id $
+ *  Proyecto Ginkgo
+ *
+ *  Copyright 2008 MetaEmotion S.L. All rights reserved.
+ *
+ */
+/* Drawn  by Mark Donohoe for the K Desktop Environment */
+/* See http://www.kde.org */
+static const char*tick_xpm[]={
+"22 22 5 1",
+"# c #000000",
+"a c #808080",
+"b c #ffffff",
+"c c #c0c0c0",
+". c None",
+"......................",
+"......................",
+"......................",
+"......................",
+"......................",
+"................#a#...",
+"...............aba#...",
+"..............aba#....",
+".............aba#.....",
+".......a....aba#......",
+"......aba..ab##.......",
+".....abcca#bca#.......",
+".....#acccbc##........",
+".....##acccca#........",
+"......##acca#.........",
+".......##aca#.........",
+"........##a#..........",
+".........###..........",
+"..........#...........",
+"......................",
+"......................",
+"......................"};
+
diff --git a/cadxcore/wx/wizardginkgo/DialogoWizard.fbp b/cadxcore/wx/wizardginkgo/DialogoWizard.fbp
new file mode 100644
index 0000000..e5879f9
--- /dev/null
+++ b/cadxcore/wx/wizardginkgo/DialogoWizard.fbp
@@ -0,0 +1,804 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">wxwizardginkgobasewx</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">wxWizardBase</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Dialog" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">520,300</property>
+            <property name="name">wxWizardGinkgoBaseWx</property>
+            <property name="pos"></property>
+            <property name="size">880,600</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER</property>
+            <property name="subclass"></property>
+            <property name="title">Test title</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose">OnClose</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize">OnSize</event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer28</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pHeader</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">HeaderPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">0</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size">-1,-1</property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBodyPanel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size">-1,-1</property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer6</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">0</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelPrincipal</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">m_pSizerPrincipal</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">protected</property>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="1">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size">-1,-1</property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="1">
+                            <property name="minimum_size"></property>
+                            <property name="name">m_pArchSizerPanelPropiedades</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxStaticText" expanded="1">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label"></property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBottomLeftLabel</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">2</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT|wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="label">< &Previous</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBAnterior</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnAnteriorClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT|wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">&Next ></property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBSiguiente</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnSiguienteClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">10</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxRIGHT|wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">&Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pBCerrar</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCancelarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/cadxcore/wx/wizardginkgo/wxwizardginkgobase.cpp b/cadxcore/wx/wizardginkgo/wxwizardginkgobase.cpp
new file mode 100644
index 0000000..8fd3b72
--- /dev/null
+++ b/cadxcore/wx/wizardginkgo/wxwizardginkgobase.cpp
@@ -0,0 +1,65 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "wxwizardginkgobase.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/controllers/inactivitycontroller.h>
+
+wxWizardGinkgoBase::wxWizardGinkgoBase( wxWindow* parent):
+        wxWizardGinkgoBaseWx(parent)
+{
+        //stops inactivity monitor
+        GNC::GCS::InactivityController::Instance()->StopsMonitoring();
+        //
+}
+
+wxWizardGinkgoBase::~wxWizardGinkgoBase()
+{
+        //starts inactivity monitor
+        GNC::GCS::InactivityController::Instance()->RestartMonitoring();
+        //
+}
+
+void wxWizardGinkgoBase::SiguientePaso()
+{
+        wxCommandEvent evt;
+        OnSiguienteClick(evt);
+}
+
+void wxWizardGinkgoBase::EnableSiguiente(bool enable)
+{
+        m_pBSiguiente->Enable(enable);
+}
+
+void wxWizardGinkgoBase::EnableAnterior(bool enable)
+{
+        m_pBAnterior->Enable(enable);
+}
+
+void wxWizardGinkgoBase::EnableCancelar(bool enable)
+{
+        m_pBCerrar->Enable(enable);
+}
+
+void wxWizardGinkgoBase::OnSize(wxSizeEvent& event)
+{
+        event.Skip(true);
+}
+
diff --git a/cadxcore/wx/wizardginkgo/wxwizardginkgobase.h b/cadxcore/wx/wizardginkgo/wxwizardginkgobase.h
new file mode 100644
index 0000000..cad0ace
--- /dev/null
+++ b/cadxcore/wx/wizardginkgo/wxwizardginkgobase.h
@@ -0,0 +1,43 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "wxwizardginkgobasewx.h"
+#include <api/iwizard.h>
+#include <api/api.h>
+
+class EXTAPI wxWizardGinkgoBase: public wxWizardGinkgoBaseWx, public IWizard
+{
+public:
+        wxWizardGinkgoBase( wxWindow* parent);
+        ~wxWizardGinkgoBase();
+
+        virtual void SiguientePaso();
+
+        virtual void EnableSiguiente(bool enable);
+
+        virtual void EnableAnterior(bool enable);
+
+        virtual void EnableCancelar(bool enable);
+
+        void OnSize(wxSizeEvent&);
+
+};
+
diff --git a/cadxcore/wx/wizardginkgo/wxwizardginkgobasewx.cpp b/cadxcore/wx/wizardginkgo/wxwizardginkgobasewx.cpp
new file mode 100644
index 0000000..b469777
--- /dev/null
+++ b/cadxcore/wx/wizardginkgo/wxwizardginkgobasewx.cpp
@@ -0,0 +1,96 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "wxwizardginkgobasewx.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+wxWizardGinkgoBaseWx::wxWizardGinkgoBaseWx( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 520,300 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer28;
+        bSizer28 = new wxBoxSizer( wxVERTICAL );
+
+        m_pHeader = new HeaderPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        bSizer28->Add( m_pHeader, 0, wxEXPAND, 5 );
+
+        m_pBodyPanel = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,-1 ), wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer6;
+        bSizer6 = new wxBoxSizer( wxVERTICAL );
+
+        m_pPanelPrincipal = new wxPanel( m_pBodyPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pSizerPrincipal = new wxBoxSizer( wxVERTICAL );
+
+
+        m_pPanelPrincipal->SetSizer( m_pSizerPrincipal );
+        m_pPanelPrincipal->Layout();
+        m_pSizerPrincipal->Fit( m_pPanelPrincipal );
+        bSizer6->Add( m_pPanelPrincipal, 1, wxEXPAND, 0 );
+
+
+        m_pBodyPanel->SetSizer( bSizer6 );
+        m_pBodyPanel->Layout();
+        bSizer6->Fit( m_pBodyPanel );
+        bSizer28->Add( m_pBodyPanel, 1, wxEXPAND, 0 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* m_pArchSizerPanelPropiedades;
+        m_pArchSizerPanelPropiedades = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pBottomLeftLabel = new wxStaticText( m_pFooter, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBottomLeftLabel->Wrap( -1 );
+        m_pArchSizerPanelPropiedades->Add( m_pBottomLeftLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
+
+
+        m_pArchSizerPanelPropiedades->Add( 0, 0, 1, wxEXPAND, 2 );
+
+        m_pBAnterior = new wxButton( m_pFooter, wxID_ANY, _("< &Previous"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pArchSizerPanelPropiedades->Add( m_pBAnterior, 0, wxRIGHT|wxLEFT, 5 );
+
+        m_pBSiguiente = new wxButton( m_pFooter, wxID_OK, _("&Next >"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pBSiguiente->SetDefault();
+        m_pArchSizerPanelPropiedades->Add( m_pBSiguiente, 0, wxRIGHT|wxLEFT, 5 );
+
+
+        m_pArchSizerPanelPropiedades->Add( 10, 0, 0, wxEXPAND, 5 );
+
+        m_pBCerrar = new wxButton( m_pFooter, wxID_CANCEL, _("&Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pArchSizerPanelPropiedades->Add( m_pBCerrar, 0, wxRIGHT|wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( m_pArchSizerPanelPropiedades );
+        m_pFooter->Layout();
+        m_pArchSizerPanelPropiedades->Fit( m_pFooter );
+        bSizer28->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer28 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( wxWizardGinkgoBaseWx::OnClose ) );
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( wxWizardGinkgoBaseWx::OnSize ) );
+        m_pBAnterior->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxWizardGinkgoBaseWx::OnAnteriorClick ), NULL, this );
+        m_pBSiguiente->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxWizardGinkgoBaseWx::OnSiguienteClick ), NULL, this );
+        m_pBCerrar->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxWizardGinkgoBaseWx::OnCancelarClick ), NULL, this );
+}
+
+wxWizardGinkgoBaseWx::~wxWizardGinkgoBaseWx()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( wxWizardGinkgoBaseWx::OnClose ) );
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( wxWizardGinkgoBaseWx::OnSize ) );
+        m_pBAnterior->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxWizardGinkgoBaseWx::OnAnteriorClick ), NULL, this );
+        m_pBSiguiente->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxWizardGinkgoBaseWx::OnSiguienteClick ), NULL, this );
+        m_pBCerrar->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( wxWizardGinkgoBaseWx::OnCancelarClick ), NULL, this );
+
+}
diff --git a/cadxcore/wx/wizardginkgo/wxwizardginkgobasewx.h b/cadxcore/wx/wizardginkgo/wxwizardginkgobasewx.h
new file mode 100644
index 0000000..43974f4
--- /dev/null
+++ b/cadxcore/wx/wizardginkgo/wxwizardginkgobasewx.h
@@ -0,0 +1,80 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __WXWIZARDGINKGOBASEWX_H__
+#define __WXWIZARDGINKGOBASEWX_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class HeaderPanel;
+
+#include <wx/panel.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/sizer.h>
+#include <wx/stattext.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class wxWizardGinkgoBaseWx
+///////////////////////////////////////////////////////////////////////////////
+class wxWizardGinkgoBaseWx : public wxDialog
+{
+private:
+
+protected:
+        HeaderPanel* m_pHeader;
+        BodyPanel* m_pBodyPanel;
+        wxPanel* m_pPanelPrincipal;
+        wxBoxSizer* m_pSizerPrincipal;
+        FooterPanel* m_pFooter;
+        wxStaticText* m_pBottomLeftLabel;
+        wxButton* m_pBAnterior;
+        wxButton* m_pBSiguiente;
+        wxButton* m_pBCerrar;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnClose( wxCloseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSize( wxSizeEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnAnteriorClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnSiguienteClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancelarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        wxWizardGinkgoBaseWx( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Test title"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 880,600 ), long style = wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
+        ~wxWizardGinkgoBaseWx();
+
+};
+
+#endif //__WXWIZARDGINKGOBASEWX_H__
diff --git a/cadxcore/wx/wxginkgotoolbar.cpp b/cadxcore/wx/wxginkgotoolbar.cpp
new file mode 100644
index 0000000..d659609
--- /dev/null
+++ b/cadxcore/wx/wxginkgotoolbar.cpp
@@ -0,0 +1,704 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "wxginkgotoolbar.h"
+
+#include <wx/dcbuffer.h>
+#include <wx/menu.h>
+#include <wx/aui/aui.h>
+
+enum {
+        wxITEM_CONTROL = wxITEM_MAX,
+        wxITEM_LABEL,
+        wxITEM_SPACER
+};
+
+const int BUTTON_DROPDOWN_WIDTH = 10;
+
+class ToolbarCommandCapture : public wxEvtHandler
+{
+public:
+
+        ToolbarCommandCapture()
+        {
+                m_lastId = 0;
+        }
+        int GetCommandId() const
+        {
+                return m_lastId;
+        }
+
+        bool ProcessEvent(wxEvent& evt)
+        {
+                if (evt.GetEventType() == wxEVT_MENU) {
+                        m_lastId = evt.GetId();
+                        return true;
+                }
+
+                if (GetNextHandler())
+                        return GetNextHandler()->ProcessEvent(evt);
+
+                return false;
+        }
+
+private:
+        int m_lastId;
+};
+
+wxGinkgoToolBarArt::wxGinkgoToolBarArt()
+{
+}
+
+wxGinkgoToolBarArt::wxGinkgoToolBarArt(const wxColor& color)
+{
+        m_baseColour = color;
+}
+
+wxGinkgoToolBarArt::~wxGinkgoToolBarArt()
+{
+}
+
+void wxGinkgoToolBarArt::SetCustomBaseColor(const wxColor& color)
+{
+        m_baseColour = color;
+}
+
+wxColor wxGinkgoToolBarArt::GetCustomBaseColor()
+{
+        return m_baseColour;
+}
+
+int wxGinkgoToolBarArt::ShowDropDown(wxWindow* wnd, const wxAuiToolBarItemArray& items)
+{
+        wxMenu menuPopup;
+
+        size_t items_added = 0;
+
+        size_t i, count = items.GetCount();
+        for (i = 0; i < count; ++i) {
+                wxAuiToolBarItem& item = items.Item(i);
+
+                if (item.GetKind() == wxITEM_NORMAL) {
+                        wxString text = item.GetShortHelp();
+                        if (text.empty())
+                                text = item.GetLabel();
+
+                        if (text.empty())
+                                text = wxT(" ");
+
+                        wxMenuItem* m =  new wxMenuItem(&menuPopup, item.GetId(), text, item.GetShortHelp());
+
+                        m->SetBitmap(item.GetBitmap());
+                        menuPopup.Append(m);
+                        items_added++;
+                } else if (item.GetKind() == wxITEM_SEPARATOR) {
+                        if (items_added > 0)
+                                menuPopup.AppendSeparator();
+                }
+        }
+
+        // find out where to put the popup menu of window items
+        wxPoint pt = ::wxGetMousePosition();
+        pt = wnd->ScreenToClient(pt);
+
+        // find out the screen coordinate at the bottom of the tab ctrl
+        wxRect cli_rect = wnd->GetClientRect();
+        pt.y = cli_rect.y + cli_rect.height;
+
+        ToolbarCommandCapture* cc = new ToolbarCommandCapture;
+        wnd->PushEventHandler(cc);
+        wnd->PopupMenu(&menuPopup, pt);
+        int command = cc->GetCommandId();
+        wnd->PopEventHandler(true);
+
+        return command;
+}
+
+void wxGinkgoToolBarArt::DrawDropDownButton(
+        wxDC& dc,
+        wxWindow* /*wnd*/,
+        const wxAuiToolBarItem& item,
+        const wxRect& rect)
+{
+        const int BUTTON_DROPDOWN_WIDTH = 10;
+        static const unsigned char DISABLED_TEXT_GREY_HUE = wxColour::AlphaBlend(0, 255, 0.4);
+        const wxColour DISABLED_TEXT_COLOR(DISABLED_TEXT_GREY_HUE, DISABLED_TEXT_GREY_HUE, DISABLED_TEXT_GREY_HUE);
+
+        int textWidth = 0, textHeight = 0, textX = 0, textY = 0;
+        int bmpX = 0, bmpY = 0, dropBmpX = 0, dropBmpY = 0;
+
+        wxRect buttonRect = wxRect(rect.x,
+                                   rect.y,
+                                   rect.width-BUTTON_DROPDOWN_WIDTH,
+                                   rect.height);
+        wxRect dropDownRect = wxRect(rect.x+rect.width-BUTTON_DROPDOWN_WIDTH-1,
+                                     rect.y,
+                                     BUTTON_DROPDOWN_WIDTH+1,
+                                     rect.height);
+
+        if (m_flags & wxAUI_TB_TEXT) {
+                dc.SetFont(m_font);
+
+                int tx, ty;
+                if (m_flags & wxAUI_TB_TEXT) {
+                        dc.GetTextExtent(wxT("ABCDHgj"), &tx, &textHeight);
+                        textWidth = 0;
+                }
+
+                dc.GetTextExtent(item.GetLabel(), &textWidth, &ty);
+        }
+
+        dropBmpX = dropDownRect.x +
+                   (dropDownRect.width/2) -
+                   (m_buttonDropDownBmp.GetWidth()/2);
+        dropBmpY = dropDownRect.y +
+                   (dropDownRect.height/2) -
+                   (m_buttonDropDownBmp.GetHeight()/2);
+
+        if (m_textOrientation == wxAUI_TBTOOL_TEXT_BOTTOM) {
+                bmpX = buttonRect.x +
+                       (buttonRect.width/2) -
+                       (item.GetBitmap().GetWidth()/2);
+                bmpY = buttonRect.y +
+                       ((buttonRect.height-textHeight)/2) -
+                       (item.GetBitmap().GetHeight()/2);
+
+                textX = rect.x + (rect.width/2) - (textWidth/2) + 1;
+                textY = rect.y + rect.height - textHeight - 1;
+        } else if (m_textOrientation == wxAUI_TBTOOL_TEXT_RIGHT) {
+                bmpX = rect.x + 3;
+
+                bmpY = rect.y +
+                       (rect.height/2) -
+                       (item.GetBitmap().GetHeight()/2);
+
+                textX = bmpX + 3 + item.GetBitmap().GetWidth();
+                textY = rect.y +
+                        (rect.height/2) -
+                        (textHeight/2);
+        }
+
+
+        if (item.GetState() & wxAUI_BUTTON_STATE_PRESSED) {
+                dc.SetPen(wxPen(m_highlightColour));
+                dc.SetBrush(wxBrush(m_highlightColour.ChangeLightness(140)));
+                dc.DrawRectangle(buttonRect);
+
+                dc.SetBrush(wxBrush(m_highlightColour.ChangeLightness(170)));
+                dc.DrawRectangle(dropDownRect);
+        } else if (item.GetState() & wxAUI_BUTTON_STATE_HOVER ||
+                   item.IsSticky()) {
+                dc.SetPen(wxPen(m_highlightColour));
+                dc.SetBrush(wxBrush(m_highlightColour.ChangeLightness(170)));
+                dc.DrawRectangle(buttonRect);
+                dc.DrawRectangle(dropDownRect);
+        } else if (item.GetState() & wxAUI_BUTTON_STATE_CHECKED) {
+                // Notice that this branch must come after the hover one to ensure the
+                // correct appearance when the mouse hovers over a checked item.m_
+                dc.SetPen(wxPen(m_highlightColour));
+                dc.SetBrush(wxBrush(m_highlightColour.ChangeLightness(170)));
+                dc.DrawRectangle(buttonRect);
+                dc.DrawRectangle(dropDownRect);
+        }
+
+        wxBitmap bmp;
+        wxBitmap dropbmp;
+        if (item.GetState() & wxAUI_BUTTON_STATE_DISABLED) {
+                bmp = item.GetDisabledBitmap();
+                dropbmp = m_disabledButtonDropDownBmp;
+        } else {
+                bmp = item.GetBitmap();
+                dropbmp = m_buttonDropDownBmp;
+        }
+
+        if (!bmp.IsOk())
+                return;
+
+        dc.DrawBitmap(bmp, bmpX, bmpY, true);
+        dc.DrawBitmap(dropbmp, dropBmpX, dropBmpY, true);
+
+        // set the item's text color based on if it is disabled
+        dc.SetTextForeground(*wxBLACK);
+        if (item.GetState() & wxAUI_BUTTON_STATE_DISABLED)
+                dc.SetTextForeground(DISABLED_TEXT_COLOR);
+
+        if ( (m_flags & wxAUI_TB_TEXT) && !item.GetLabel().empty() ) {
+                dc.DrawText(item.GetLabel(), textX, textY);
+        }
+}
+
+void wxGinkgoToolBarArt::DrawButton(
+        wxDC& dc,
+        wxWindow* wnd,
+        const wxAuiToolBarItem& item,
+        const wxRect& rect)
+{
+        if (item.HasDropDown()) {
+                //we have modified default draw function to draw checked + drop down (not supported in wxWidgets)
+                DrawDropDownButton(dc, wnd, item, rect);
+        } else {
+                wxAuiDefaultToolBarArt::DrawButton(dc, wnd, item, rect);
+        }
+}
+
+//==================================================================================
+
+wxGinkgoToolBar::wxGinkgoToolBar(wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style) : wxAuiToolBar(parent, id, pos, size, style)
+{
+        SetToolBitmapSize(wxSize(16,16));
+        wxAuiDefaultToolBarArt* pToolArt= new wxGinkgoToolBarArt();
+        SetArtProvider(pToolArt);
+
+        Connect(wxEVT_PAINT, wxPaintEventHandler(wxGinkgoToolBar::OnPaint), NULL, this);
+        Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(wxGinkgoToolBar::OnLeftDown), NULL, this);
+        Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(wxGinkgoToolBar::OnLeftDown), NULL, this);
+        Connect(wxEVT_LEFT_UP, wxMouseEventHandler(wxGinkgoToolBar::OnLeftUp), NULL, this);
+        Connect(wxEVT_MOTION, wxMouseEventHandler(wxGinkgoToolBar::OnMotion), NULL, this);
+        Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxGinkgoToolBar ::OnEraseBackground ) );
+}
+
+wxGinkgoToolBar::wxGinkgoToolBar(wxWindow* pParent, const wxColor& color, int style) : wxAuiToolBar(pParent, wxID_ANY, wxDefaultPosition, wxDefaultSize, style|wxAUI_TB_DEFAULT_STYLE)
+{
+        SetToolBitmapSize(wxSize(16,16));
+        wxAuiDefaultToolBarArt* pToolArt= new wxGinkgoToolBarArt(color);
+        SetArtProvider(pToolArt);
+        Connect(wxEVT_PAINT, wxPaintEventHandler(wxGinkgoToolBar::OnPaint), NULL, this);
+        Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(wxGinkgoToolBar::OnLeftDown), NULL, this);
+        Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(wxGinkgoToolBar::OnLeftDown), NULL, this);
+        Connect(wxEVT_LEFT_UP, wxMouseEventHandler(wxGinkgoToolBar::OnLeftUp), NULL, this);
+        Connect(wxEVT_MOTION, wxMouseEventHandler(wxGinkgoToolBar::OnMotion), NULL, this);
+        Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxGinkgoToolBar ::OnEraseBackground ) );
+}
+
+wxGinkgoToolBar::wxGinkgoToolBar(wxWindow* pParent, const wxColor& color, wxFont& fontBar) : wxAuiToolBar(pParent,wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE)
+{
+        SetToolBitmapSize(wxSize(16,16));
+        wxAuiDefaultToolBarArt* pToolArt= new wxGinkgoToolBarArt(color);
+        pToolArt->SetFont(fontBar);
+        SetArtProvider(pToolArt);
+        Connect(wxEVT_PAINT, wxPaintEventHandler(wxGinkgoToolBar::OnPaint), NULL, this);
+        Connect(wxEVT_LEFT_DOWN, wxMouseEventHandler(wxGinkgoToolBar::OnLeftDown), NULL, this);
+        Connect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(wxGinkgoToolBar::OnLeftDown), NULL, this);
+        Connect(wxEVT_LEFT_UP, wxMouseEventHandler(wxGinkgoToolBar::OnLeftUp), NULL, this);
+        Connect(wxEVT_MOTION, wxMouseEventHandler(wxGinkgoToolBar::OnMotion), NULL, this);
+        Connect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxGinkgoToolBar ::OnEraseBackground ) );
+}
+
+wxGinkgoToolBar::~wxGinkgoToolBar()
+{
+        Disconnect(wxEVT_MOTION, wxMouseEventHandler(wxGinkgoToolBar::OnMotion), NULL, this);
+        Disconnect(wxEVT_LEFT_UP, wxMouseEventHandler(wxGinkgoToolBar::OnLeftUp), NULL, this);
+        Disconnect(wxEVT_LEFT_DOWN, wxMouseEventHandler(wxGinkgoToolBar::OnLeftDown), NULL, this);
+        Disconnect(wxEVT_LEFT_DCLICK, wxMouseEventHandler(wxGinkgoToolBar::OnLeftDown), NULL, this);
+        Disconnect(wxEVT_PAINT, wxPaintEventHandler(wxGinkgoToolBar::OnPaint), NULL, this);
+        Disconnect(wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( wxGinkgoToolBar ::OnEraseBackground ) );
+}
+
+void wxGinkgoToolBar::ForceToggleTool(int tool_id, bool state)
+{
+        wxAuiToolBarItem* tool = FindTool(tool_id);
+
+        if (tool) {
+                if (tool->GetKind() == wxITEM_RADIO) {
+                        int i, idx, count;
+                        idx = GetToolIndex(tool_id);
+                        count = (int)m_items.GetCount();
+
+                        if (idx >= 0 && idx < count) {
+                                for (i = idx + 1; i < count; ++i) {
+                                        if (m_items[i].GetKind() != wxITEM_RADIO)
+                                                break;
+                                        m_items[i].SetState(m_items[i].GetState() & ~wxAUI_BUTTON_STATE_CHECKED);
+                                }
+                                for (i = idx - 1; i >= 0; i--) {
+                                        if (m_items[i].GetKind() != wxITEM_RADIO)
+                                                break;
+                                        m_items[i].SetState(m_items[i].GetState() & ~wxAUI_BUTTON_STATE_CHECKED);
+                                }
+                        }
+
+                        tool->SetState(tool->GetState() | wxAUI_BUTTON_STATE_CHECKED);
+                } else {
+                        if (state == true) {
+                                tool->SetState(tool->GetState() | wxAUI_BUTTON_STATE_CHECKED);
+                        } else {
+                                tool->SetState(tool->GetState() & ~wxAUI_BUTTON_STATE_CHECKED);
+                        }
+                }
+        }
+}
+
+bool wxGinkgoToolBar::ForceGetToolToggled(int tool_id) const
+{
+        wxAuiToolBarItem* tool = FindTool(tool_id);
+
+        if (tool) {
+                return (tool->GetState() & wxAUI_BUTTON_STATE_CHECKED) ? true : false;
+        }
+
+        return false;
+}
+
+void wxGinkgoToolBar::ForceSetToolDropDown(int tool_id, bool dropdown)
+{
+        wxAuiToolBarItem* item = FindTool(tool_id);
+        if (!item)
+                return;
+
+        if (item->GetKind() != wxITEM_NORMAL) {
+                int kind = item->GetKind(); // Hack
+                item->SetKind(wxITEM_NORMAL);
+                item->SetHasDropDown(dropdown);
+                item->SetKind(kind);
+        } else {
+                item->SetHasDropDown(dropdown);
+        }
+}
+
+void wxGinkgoToolBar::ForceSetOrientation(int orientation)
+{
+        wxAuiToolBar::SetOrientation(orientation);
+}
+
+void wxGinkgoToolBar::OnPaint(wxPaintEvent& WXUNUSED(evt))
+{
+        wxAutoBufferedPaintDC dc(this);
+        wxRect cli_rect(wxPoint(0,0), GetClientSize());
+
+        bool horizontal = m_orientation == wxHORIZONTAL;
+
+        if (m_windowStyle & wxAUI_TB_PLAIN_BACKGROUND)
+                m_art->DrawPlainBackground(dc, this, cli_rect);
+        else
+                m_art->DrawBackground(dc, this, cli_rect);
+
+        int gripperSize = m_art->GetElementSize(wxAUI_TBART_GRIPPER_SIZE);
+        int dropdown_size = m_art->GetElementSize(wxAUI_TBART_OVERFLOW_SIZE);
+
+        // paint the gripper
+        if (gripperSize > 0 && m_gripperSizerItem) {
+                wxRect gripper_rect = m_gripperSizerItem->GetRect();
+                if (horizontal)
+                        gripper_rect.width = gripperSize;
+                else
+                        gripper_rect.height = gripperSize;
+                m_art->DrawGripper(dc, this, gripper_rect);
+        }
+
+        // calculated how far we can draw items
+        int last_extent;
+        if (horizontal)
+                last_extent = cli_rect.width;
+        else
+                last_extent = cli_rect.height;
+        if (m_overflowVisible)
+                last_extent -= dropdown_size;
+
+        // paint each individual tool
+        size_t i, count = m_items.GetCount();
+        for (i = 0; i < count; ++i) {
+                wxAuiToolBarItem& item = m_items.Item(i);
+
+                if (!item.GetSizerItem())
+                        continue;
+
+                wxRect item_rect = item.GetSizerItem()->GetRect();
+
+
+                if ((horizontal  && item_rect.x + item_rect.width >= last_extent) ||
+                    (!horizontal && item_rect.y + item_rect.height >= last_extent)) {
+                        break;
+                }
+
+                switch ( item.GetKind() ) {
+                case wxITEM_CHECK:
+                case wxITEM_NORMAL:
+                        m_art->DrawButton(dc, this, item, item_rect);
+                        break;
+                case wxITEM_RADIO:
+                        // draw a toggle button
+                        m_art->DrawButton(dc, this, item, item_rect);
+                        break;
+
+                case wxITEM_SEPARATOR:
+                        // draw a separator
+                        m_art->DrawSeparator(dc, this, item_rect);
+                        break;
+                case wxITEM_LABEL:
+                        // draw a text label only
+                        m_art->DrawLabel(dc, this, item, item_rect);
+                        break;
+
+                case wxITEM_CONTROL:
+                        // draw the control's label
+                        m_art->DrawControlLabel(dc, this, item, item_rect);
+                        break;
+                }
+
+                // fire a signal to see if the item wants to be custom-rendered
+                OnCustomRender(dc, item, item_rect);
+        }
+
+        // paint the overflow button
+        if (dropdown_size > 0 && m_overflowSizerItem) {
+                wxRect dropDownRect = GetOverflowRect();
+                m_art->DrawOverflowButton(dc, this, dropDownRect, m_overflowState);
+        }
+}
+
+void wxGinkgoToolBar::OnLeftDown(wxMouseEvent& evt)
+{
+        //very important to prevent trap because of capturemouse reentering
+        if (HasCapture()) {
+                ReleaseMouse();
+                return;
+        }
+        wxRect cli_rect(wxPoint(0,0), GetClientSize());
+
+        if (m_gripperSizerItem) {
+                wxRect gripper_rect = m_gripperSizerItem->GetRect();
+                if (gripper_rect.Contains(evt.GetX(), evt.GetY())) {
+                        // find aui manager
+                        wxAuiManager* manager = wxAuiManager::GetManager(this);
+                        if (!manager)
+                                return;
+
+                        int x_drag_offset = evt.GetX() - gripper_rect.GetX();
+                        int y_drag_offset = evt.GetY() - gripper_rect.GetY();
+
+                        // gripper was clicked
+                        manager->StartPaneDrag(this, wxPoint(x_drag_offset, y_drag_offset));
+                        return;
+                }
+        }
+
+        if (m_overflowSizerItem) {
+                wxRect overflow_rect = GetOverflowRect();
+
+                if (m_art &&
+                    m_overflowVisible &&
+                    overflow_rect.Contains(evt.m_x, evt.m_y)) {
+                        wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_OVERFLOW_CLICK, -1);
+                        e.SetEventObject(this);
+                        e.SetToolId(-1);
+                        e.SetClickPoint(wxPoint(evt.GetX(), evt.GetY()));
+                        bool processed = GetEventHandler()->ProcessEvent(e);
+
+                        if (processed) {
+                                DoIdleUpdate();
+                        } else {
+                                size_t i, count;
+                                wxAuiToolBarItemArray overflow_items;
+
+
+                                // add custom overflow prepend items, if any
+                                count = m_customOverflowPrepend.GetCount();
+                                for (i = 0; i < count; ++i)
+                                        overflow_items.Add(m_customOverflowPrepend[i]);
+
+                                // only show items that don't fit in the dropdown
+                                count = m_items.GetCount();
+                                for (i = 0; i < count; ++i) {
+                                        if (!GetToolFitsByIndex(i))
+                                                overflow_items.Add(m_items[i]);
+                                }
+
+                                // add custom overflow append items, if any
+                                count = m_customOverflowAppend.GetCount();
+                                for (i = 0; i < count; ++i)
+                                        overflow_items.Add(m_customOverflowAppend[i]);
+
+                                int res = m_art->ShowDropDown(this, overflow_items);
+                                m_overflowState = 0;
+                                Refresh(false);
+                                if (res != -1) {
+                                        wxCommandEvent event(wxEVT_MENU, res);
+                                        event.SetEventObject(this);
+                                        GetParent()->GetEventHandler()->ProcessEvent(event);
+                                }
+                        }
+
+                        return;
+                }
+        }
+
+        m_dragging = false;
+        m_actionPos = wxPoint(evt.GetX(), evt.GetY());
+        m_actionItem = FindToolByPosition(evt.GetX(), evt.GetY());
+
+        if (m_actionItem) {
+                if (m_actionItem->GetState() & wxAUI_BUTTON_STATE_DISABLED) {
+                        m_actionPos = wxPoint(-1,-1);
+                        m_actionItem = NULL;
+                        return;
+                }
+
+                UnsetToolTip();
+
+                // fire the tool dropdown event
+                wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_TOOL_DROPDOWN, m_actionItem->GetId());
+                e.SetEventObject(this);
+                e.SetToolId(m_actionItem->GetId());
+
+                int mouse_x = evt.GetX();
+                wxRect rect = m_actionItem->GetSizerItem()->GetRect();
+                const bool dropDownHit = m_actionItem->HasDropDown() &&
+                                         mouse_x >= (rect.x+rect.width-BUTTON_DROPDOWN_WIDTH-1) &&
+                                         mouse_x < (rect.x+rect.width);
+                e.SetDropDownClicked(dropDownHit);
+
+                e.SetClickPoint(evt.GetPosition());
+                e.SetItemRect(rect);
+
+                // we only set the 'pressed button' state if we hit the actual button
+                // and not just the drop-down
+                SetPressedItem(dropDownHit ? 0 : m_actionItem);
+
+                if(dropDownHit) {
+                        m_actionPos = wxPoint(-1,-1);
+                        m_actionItem = NULL;
+                }
+
+                if(!GetEventHandler()->ProcessEvent(e) || e.GetSkipped()) {
+                        CaptureMouse();
+                }
+
+                // Ensure hovered item is really ok, as mouse may have moved during
+                //  event processing
+                wxPoint cursor_pos_after_evt = ScreenToClient(wxGetMousePosition());
+                SetHoverItem(FindToolByPosition(cursor_pos_after_evt.x, cursor_pos_after_evt.y));
+
+                DoIdleUpdate();
+        }
+}
+
+void wxGinkgoToolBar::OnLeftUp(wxMouseEvent& evt)
+{
+        //process only if this control has registered capture
+        if (!HasCapture())
+                return;
+
+        SetPressedItem(NULL);
+
+        wxAuiToolBarItem* hitItem;
+        hitItem = FindToolByPosition(evt.GetX(), evt.GetY());
+        SetHoverItem(hitItem);
+
+        if (m_dragging) {
+                ReleaseMouse();
+        } else {
+                if (m_actionItem && hitItem == m_actionItem) {
+                        UnsetToolTip();
+
+                        wxCommandEvent e(wxEVT_MENU, m_actionItem->GetId());
+                        e.SetEventObject(this);
+
+                        if (hitItem->GetKind() == wxITEM_CHECK || hitItem->GetKind() == wxITEM_RADIO) {
+                                const bool toggle = !(m_actionItem->GetState() & wxAUI_BUTTON_STATE_CHECKED);
+
+                                ForceToggleTool(m_actionItem->GetId(), toggle);
+
+                                // repaint immediately
+                                Refresh(false);
+                                Update();
+
+                                e.SetInt(toggle);
+                        }
+
+                        // we have to release the mouse *before* sending the event, because
+                        // we don't know what a handler might do. It could open up a popup
+                        // menu for example and that would make us lose our capture anyway.
+
+                        ReleaseMouse();
+
+                        GetEventHandler()->ProcessEvent(e);
+
+                        // Ensure hovered item is really ok, as mouse may have moved during
+                        // event processing
+                        wxPoint cursor_pos_after_evt = ScreenToClient(wxGetMousePosition());
+                        SetHoverItem(FindToolByPosition(cursor_pos_after_evt.x, cursor_pos_after_evt.y));
+
+                        DoIdleUpdate();
+                } else
+                        ReleaseMouse();
+        }
+}
+void wxGinkgoToolBar::OnMotion(wxMouseEvent& evt)
+{
+        const bool button_pressed = HasCapture();
+
+        // start a drag event
+        if (m_actionItem && !m_dragging && button_pressed &&
+            abs(evt.GetX() - m_actionPos.x) + abs(evt.GetY() - m_actionPos.y) > 5) {
+                // TODO: sending this event only makes sense if there is an 'END_DRAG'
+                // event sent sometime in the future (see OnLeftUp())
+                wxAuiToolBarEvent e(wxEVT_AUITOOLBAR_BEGIN_DRAG, GetId());
+                e.SetEventObject(this);
+                e.SetToolId(m_actionItem->GetId());
+
+                m_dragging = GetEventHandler()->ProcessEvent(e) && !e.GetSkipped();
+
+                DoIdleUpdate();
+        }
+
+        if(m_dragging)
+                return;
+
+        wxAuiToolBarItem* hitItem = FindToolByPosition(evt.GetX(), evt.GetY());
+        if(button_pressed) {
+                // if we have a button pressed we want it to be shown in 'depressed'
+                // state unless we move the mouse outside the button, then we want it
+                // to show as just 'highlighted'
+                if (hitItem == m_actionItem)
+                        SetPressedItem(m_actionItem);
+                else {
+                        SetPressedItem(NULL);
+                        SetHoverItem(m_actionItem);
+                }
+        } else {
+                SetHoverItem(hitItem);
+
+                // tooltips handling
+                wxAuiToolBarItem* packingHitItem;
+                packingHitItem = FindToolByPositionWithPacking(evt.GetX(), evt.GetY());
+                if (packingHitItem) {
+                        if (packingHitItem != m_tipItem) {
+                                m_tipItem = packingHitItem;
+
+                                if ( !packingHitItem->GetShortHelp().empty() )
+                                        SetToolTip(packingHitItem->GetShortHelp());
+                                else
+                                        UnsetToolTip();
+                        }
+                } else {
+                        UnsetToolTip();
+                        m_tipItem = NULL;
+                }
+
+                // figure out the dropdown button state (are we hovering or pressing it?)
+                RefreshOverflowState();
+        }
+}
+
+void wxGinkgoToolBar::OnEraseBackground( wxEraseEvent& event )
+{
+        event.Skip(false);
+}
diff --git a/cadxcore/wx/wxginkgotoolbar.h b/cadxcore/wx/wxginkgotoolbar.h
new file mode 100644
index 0000000..6912f34
--- /dev/null
+++ b/cadxcore/wx/wxginkgotoolbar.h
@@ -0,0 +1,86 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#include <wx/bitmap.h>
+#include <wx/aui/auibar.h>
+#include <wx/colour.h>
+
+class wxGinkgoToolBarArt: public wxAuiDefaultToolBarArt
+{
+public:
+        wxGinkgoToolBarArt();
+        wxGinkgoToolBarArt(const wxColor& color);
+        ~wxGinkgoToolBarArt();
+
+        virtual void SetCustomBaseColor(const wxColor& color);
+
+        virtual int ShowDropDown(wxWindow* wnd, const wxAuiToolBarItemArray& items);
+
+        wxColor GetCustomBaseColor();
+
+        virtual void DrawDropDownButton(
+                wxDC& dc,
+                wxWindow* wnd,
+                const wxAuiToolBarItem& item,
+                const wxRect& rect);
+
+        virtual void DrawButton(
+                wxDC& dc,
+                wxWindow* wnd,
+                const wxAuiToolBarItem& item,
+                const wxRect& rect);
+};
+
+class wxGinkgoToolBar : public wxAuiToolBar
+{
+public:
+        wxGinkgoToolBar(wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxAUI_TB_DEFAULT_STYLE);
+        wxGinkgoToolBar(wxWindow* pParent, const wxColor& color = wxColor(0x40, 0x40, 0x40), int style = 0);
+        wxGinkgoToolBar(wxWindow* pParent, const wxColor& color, wxFont& fontBar);
+
+        ~wxGinkgoToolBar();
+
+        /**
+        * Use this method instead of ToggleTool
+        **/
+        virtual void ForceToggleTool(int tool_id, bool state);
+        /**
+        * Use this method instead of GetToolToggled
+        **/
+        virtual bool ForceGetToolToggled(int tool_id) const;
+        /**
+        * Use this method instead of SetToolDropDown
+        **/
+        virtual void ForceSetToolDropDown(int tool_id, bool dropdown);
+
+        /**change visibility of setOrientation...*/
+        virtual void ForceSetOrientation(int orientation);
+
+        virtual void OnPaint(wxPaintEvent& evt);
+        virtual void OnLeftDown(wxMouseEvent& evt);
+        virtual void OnLeftUp(wxMouseEvent& evt);
+        virtual void OnMotion(wxMouseEvent& evt);
+        virtual void OnEraseBackground( wxEraseEvent& event ) ;
+};
+
+
diff --git a/cadxcore/wx/wxsqlite3/wxsqlite3.cpp b/cadxcore/wx/wxsqlite3/wxsqlite3.cpp
new file mode 100644
index 0000000..d7a434e
--- /dev/null
+++ b/cadxcore/wx/wxsqlite3/wxsqlite3.cpp
@@ -0,0 +1,3920 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        wxsqlite3.cpp
+// Purpose:     Implementation of wxSQLite3 classes
+// Author:      Ulrich Telle
+// Modified by:
+// Created:     2005-07-06
+// Copyright:   (c) Ulrich Telle
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+/// \file wxsqlite3.cpp Implementation of the wxSQLite3 class
+
+#if defined(__GNUG__) && !defined(__APPLE__)
+#pragma implementation "wxsqlite3.h"
+#endif
+
+// 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
+
+#include "wx/regex.h"
+
+#include "wxsqlite3.h"
+#include "wxsqlite3opt.h"
+
+// Suppress some Visual C++ warnings regarding the default constructor
+// for a C struct used only in SQLite modules
+#ifdef __VISUALC__
+#pragma warning (disable:4510)
+#pragma warning (disable:4610)
+#endif
+
+#if WXSQLITE3_HAVE_CODEC
+#define SQLITE_HAS_CODEC 1
+#else
+#define SQLITE_HAS_CODEC 0
+#endif
+#if defined(USE_SYSTEM_SQLITE)
+#include <sqlite3.h>
+#else
+#include "sqlite/sqlite3.h"
+#endif
+// Dynamic loading of the SQLite library
+#include <api/controllers/icontroladorlog.h>
+
+#if wxUSE_DYNAMIC_SQLITE3_LOAD
+
+#include "wx/dynlib.h"
+
+#define DYNFUNC(rcode, rtype, fname, farg, farguse) \
+  typedef rtype (*p##fname) farg ; \
+  static p##fname s_##fname = NULL;
+#include "wx/wxsqlite3dyn.h"
+#undef DYNFUNC
+
+static wxDynamicLibrary s_dll;
+
+static void InitSQLite3DLL()
+{
+        if (s_dll.IsLoaded()) {
+                return;
+        }
+
+#ifdef __WIN32__
+        if (! s_dll.Load(wxT("sqlite3")))
+#else
+        if (! s_dll.Load(wxT("libsqlite3")))
+#endif
+        {
+                throw wxSQLite3Exception(-1, wxT("error loading dynamic library"));
+        }
+
+#define DYNFUNC(rcode, rtype, fname, farg, farguse) \
+  s_##fname = (p##fname) s_dll.GetSymbol(wxT(#fname));\
+  if (! s_##fname)\
+  {\
+    s_dll.Unload();\
+    throw wxSQLite3Exception(-1, wxT("error getting symbol <") wxT(#fname) wxT(">"));\
+  }
+#include "wx/wxsqlite3dyn.h"
+#undef DYNFUNC
+
+};
+
+#define DYNFUNC(rcode, rtype, fname, farg, farguse) \
+  rtype fname farg \
+  {\
+    InitSQLite3DLL();\
+    rcode s_##fname farguse;\
+  };
+#include "wx/wxsqlite3dyn.h"
+#undef DYNFUNC
+
+#endif // wxUSE_DYNAMIC_SQLITE3_LOAD
+
+// Error messages
+
+const char* wxERRMSG_NODB          = wxTRANSLATE("No Database opened");
+const char* wxERRMSG_NOSTMT        = wxTRANSLATE("Statement not accessible");
+const char* wxERRMSG_NOMEM         = wxTRANSLATE("Out of memory");
+const char* wxERRMSG_DECODE        = wxTRANSLATE("Cannot decode binary");
+const char* wxERRMSG_INVALID_INDEX = wxTRANSLATE("Invalid field index");
+const char* wxERRMSG_INVALID_NAME  = wxTRANSLATE("Invalid field name");
+const char* wxERRMSG_INVALID_ROW   = wxTRANSLATE("Invalid row index");
+const char* wxERRMSG_INVALID_QUERY = wxTRANSLATE("Invalid scalar query");
+const char* wxERRMSG_INVALID_BLOB  = wxTRANSLATE("Invalid BLOB handle");
+
+const char* wxERRMSG_NORESULT      = wxTRANSLATE("Null Results pointer");
+const char* wxERRMSG_BIND_STR      = wxTRANSLATE("Error binding string param");
+const char* wxERRMSG_BIND_INT      = wxTRANSLATE("Error binding int param");
+const char* wxERRMSG_BIND_INT64    = wxTRANSLATE("Error binding int64 param");
+const char* wxERRMSG_BIND_DBL      = wxTRANSLATE("Error binding double param");
+const char* wxERRMSG_BIND_BLOB     = wxTRANSLATE("Error binding blob param");
+const char* wxERRMSG_BIND_DATETIME = wxTRANSLATE("Error binding date/time param");
+const char* wxERRMSG_BIND_NULL     = wxTRANSLATE("Error binding NULL param");
+const char* wxERRMSG_BIND_ZEROBLOB = wxTRANSLATE("Error binding zero blob param");
+const char* wxERRMSG_BIND_CLEAR    = wxTRANSLATE("Error clearing bindings");
+const char* wxERRMSG_NOTOWNED      = wxTRANSLATE("Transfer of statement ownership not possible");
+
+const char* wxERRMSG_NOMETADATA    = wxTRANSLATE("Meta data support not available");
+const char* wxERRMSG_NOCODEC       = wxTRANSLATE("Encryption support not available");
+const char* wxERRMSG_NOLOADEXT     = wxTRANSLATE("Loadable extension support not available");
+const char* wxERRMSG_NOINCBLOB     = wxTRANSLATE("Incremental BLOB support not available");
+const char* wxERRMSG_NOBLOBREBIND  = wxTRANSLATE("Rebind BLOB support not available");
+const char* wxERRMSG_NOSAVEPOINT   = wxTRANSLATE("Savepoint support not available");
+const char* wxERRMSG_NOBACKUP      = wxTRANSLATE("Backup/restore support not available");
+const char* wxERRMSG_NOWAL         = wxTRANSLATE("Write Ahead Log support not available");
+const char* wxERRMSG_NOCOLLECTIONS = wxTRANSLATE("Named collection support not available");
+
+const char* wxERRMSG_SHARED_CACHE  = wxTRANSLATE("Setting SQLite shared cache mode failed");
+
+const char* wxERRMSG_INITIALIZE    = wxTRANSLATE("Initialization of SQLite failed");
+const char* wxERRMSG_SHUTDOWN      = wxTRANSLATE("Shutdown of SQLite failed");
+
+const char* wxERRMSG_SOURCEDB_BUSY = wxTRANSLATE("Source database is busy");
+const char* wxERRMSG_DBOPEN_FAILED = wxTRANSLATE("Database open failed");
+const char* wxERRMSG_DBASSIGN_FAILED = wxTRANSLATE("Database assignment failed");
+
+// ----------------------------------------------------------------------------
+// inline conversion from wxString to wxLongLong
+// ----------------------------------------------------------------------------
+
+inline wxLongLong ConvertStringToLongLong(const wxString& str, wxLongLong defValue /*=0*/)
+{
+        size_t n = str.Length();
+        size_t j = 0;
+        wxLongLong value = 0;
+        bool negative = false;
+
+        if (str[j] == '-') {
+                negative = true;
+                j++;
+        }
+
+        while (j < n) {
+                if (str[j] < '0' || str[j] > '9') {
+                        return defValue;
+                }
+                value *= 10;
+                value += (str[j] - '0');
+                j++;
+        }
+
+        return negative ? -value : value;
+}
+
+// ----------------------------------------------------------------------------
+// wxSQLite3Exception: class
+// ----------------------------------------------------------------------------
+
+wxSQLite3Exception::wxSQLite3Exception(int errorCode, const wxString& errorMsg)
+        : m_errorCode(errorCode)
+{
+        m_errorMessage = ErrorCodeAsString(errorCode) + wxT("[") +
+                         wxString::Format(wxT("%d"), errorCode) + wxT("]: ") +
+                         wxGetTranslation(errorMsg);
+}
+
+wxSQLite3Exception::wxSQLite3Exception(const wxSQLite3Exception&  e)
+        : m_errorCode(e.m_errorCode), m_errorMessage(e.m_errorMessage)
+{
+}
+
+const wxString wxSQLite3Exception::ErrorCodeAsString(int errorCode)
+{
+        switch (errorCode) {
+        case SQLITE_OK          :
+                return wxT("SQLITE_OK");
+        case SQLITE_ERROR       :
+                return wxT("SQLITE_ERROR");
+        case SQLITE_INTERNAL    :
+                return wxT("SQLITE_INTERNAL");
+        case SQLITE_PERM        :
+                return wxT("SQLITE_PERM");
+        case SQLITE_ABORT       :
+                return wxT("SQLITE_ABORT");
+        case SQLITE_BUSY        :
+                return wxT("SQLITE_BUSY");
+        case SQLITE_LOCKED      :
+                return wxT("SQLITE_LOCKED");
+        case SQLITE_NOMEM       :
+                return wxT("SQLITE_NOMEM");
+        case SQLITE_READONLY    :
+                return wxT("SQLITE_READONLY");
+        case SQLITE_INTERRUPT   :
+                return wxT("SQLITE_INTERRUPT");
+        case SQLITE_IOERR       :
+                return wxT("SQLITE_IOERR");
+        case SQLITE_CORRUPT     :
+                return wxT("SQLITE_CORRUPT");
+        case SQLITE_NOTFOUND    :
+                return wxT("SQLITE_NOTFOUND");
+        case SQLITE_FULL        :
+                return wxT("SQLITE_FULL");
+        case SQLITE_CANTOPEN    :
+                return wxT("SQLITE_CANTOPEN");
+        case SQLITE_PROTOCOL    :
+                return wxT("SQLITE_PROTOCOL");
+        case SQLITE_EMPTY       :
+                return wxT("SQLITE_EMPTY");
+        case SQLITE_SCHEMA      :
+                return wxT("SQLITE_SCHEMA");
+        case SQLITE_TOOBIG      :
+                return wxT("SQLITE_TOOBIG");
+        case SQLITE_CONSTRAINT  :
+                return wxT("SQLITE_CONSTRAINT");
+        case SQLITE_MISMATCH    :
+                return wxT("SQLITE_MISMATCH");
+        case SQLITE_MISUSE      :
+                return wxT("SQLITE_MISUSE");
+        case SQLITE_NOLFS       :
+                return wxT("SQLITE_NOLFS");
+        case SQLITE_AUTH        :
+                return wxT("SQLITE_AUTH");
+        case SQLITE_FORMAT      :
+                return wxT("SQLITE_FORMAT");
+        case SQLITE_RANGE       :
+                return wxT("SQLITE_RANGE");
+        case SQLITE_NOTADB      :
+                return wxT("SQLITE_NOTADB");
+        case SQLITE_ROW         :
+                return wxT("SQLITE_ROW");
+        case SQLITE_DONE        :
+                return wxT("SQLITE_DONE");
+        // Extended error codes
+        case SQLITE_IOERR_READ       :
+                return wxT("SQLITE_IOERR_READ");
+        case SQLITE_IOERR_SHORT_READ :
+                return wxT("SQLITE_IOERR_SHORT_READ");
+        case SQLITE_IOERR_WRITE      :
+                return wxT("SQLITE_IOERR_WRITE");
+        case SQLITE_IOERR_FSYNC      :
+                return wxT("SQLITE_IOERR_FSYNC");
+        case SQLITE_IOERR_DIR_FSYNC  :
+                return wxT("SQLITE_IOERR_DIR_FSYNC");
+        case SQLITE_IOERR_TRUNCATE   :
+                return wxT("SQLITE_IOERR_TRUNCATE");
+        case SQLITE_IOERR_FSTAT      :
+                return wxT("SQLITE_IOERR_FSTAT");
+        case SQLITE_IOERR_UNLOCK     :
+                return wxT("SQLITE_IOERR_UNLOCK");
+        case SQLITE_IOERR_RDLOCK     :
+                return wxT("SQLITE_IOERR_RDLOCK");
+        case SQLITE_IOERR_DELETE     :
+                return wxT("SQLITE_IOERR_DELETE");
+#if SQLITE_VERSION_NUMBER >= 3004000
+        case SQLITE_IOERR_BLOCKED    :
+                return wxT("SQLITE_IOERR_BLOCKED");
+#endif
+#if SQLITE_VERSION_NUMBER >= 3005001
+        case SQLITE_IOERR_NOMEM      :
+                return wxT("SQLITE_IOERR_NOMEM");
+#endif
+#if SQLITE_VERSION_NUMBER >= 3006000
+        case SQLITE_IOERR_ACCESS     :
+                return wxT("SQLITE_IOERR_ACCESS");
+        case SQLITE_IOERR_CHECKRESERVEDLOCK :
+                return wxT("SQLITE_IOERR_CHECKRESERVEDLOCK");
+#endif
+#if SQLITE_VERSION_NUMBER >= 3006002
+        case SQLITE_IOERR_LOCK       :
+                return wxT("SQLITE_IOERR_LOCK");
+#endif
+#if SQLITE_VERSION_NUMBER >= 3006007
+        case SQLITE_IOERR_CLOSE      :
+                return wxT("SQLITE_IOERR_CLOSE");
+        case SQLITE_IOERR_DIR_CLOSE  :
+                return wxT("SQLITE_IOERR_DIR_CLOSE");
+#endif
+#if SQLITE_VERSION_NUMBER >= 3007000
+        case SQLITE_IOERR_SHMOPEN      :
+                return wxT("SQLITE_IOERR_SHMOPEN");
+        case SQLITE_IOERR_SHMSIZE      :
+                return wxT("SQLITE_IOERR_SHMSIZE");
+        case SQLITE_IOERR_SHMLOCK      :
+                return wxT("SQLITE_IOERR_SHMLOCK");
+        case SQLITE_LOCKED_SHAREDCACHE :
+                return wxT("SQLITE_LOCKED_SHAREDCACHE");
+        case SQLITE_BUSY_RECOVERY      :
+                return wxT("SQLITE_BUSY_RECOVERY");
+        case SQLITE_CANTOPEN_NOTEMPDIR :
+                return wxT("SQLITE_CANTOPEN_NOTEMPDIR");
+#endif
+
+        case WXSQLITE_ERROR     :
+                return wxT("WXSQLITE_ERROR");
+        default                 :
+                return wxT("UNKNOWN_ERROR");
+        }
+}
+
+wxSQLite3Exception::~wxSQLite3Exception()
+{
+}
+
+// ----------------------------------------------------------------------------
+// wxSQLite3StatementBuffer: class providing a statement buffer
+//                           for use with the SQLite3 vmprintf function
+// ----------------------------------------------------------------------------
+
+wxSQLite3StatementBuffer::wxSQLite3StatementBuffer()
+{
+        m_buffer = 0;
+}
+
+wxSQLite3StatementBuffer::~wxSQLite3StatementBuffer()
+{
+        Clear();
+}
+
+void wxSQLite3StatementBuffer::Clear()
+{
+        if (m_buffer) {
+                sqlite3_free(m_buffer);
+                m_buffer = 0;
+        }
+
+}
+
+const char* wxSQLite3StatementBuffer::Format(const char* format, ...)
+{
+        Clear();
+        va_list va;
+        va_start(va, format);
+        m_buffer = sqlite3_vmprintf(format, va);
+        va_end(va);
+        return m_buffer;
+}
+
+const char* wxSQLite3StatementBuffer::FormatV(const char* format, va_list va)
+{
+        Clear();
+        m_buffer = sqlite3_vmprintf(format, va);
+        return m_buffer;
+}
+
+// ----------------------------------------------------------------------------
+// wxSQLite3ResultSet: class providing access to the result set of a query
+// ----------------------------------------------------------------------------
+
+wxSQLite3ResultSet::wxSQLite3ResultSet()
+{
+        m_db = 0;
+        m_stmt = 0;
+        m_eof = true;
+        m_first = true;
+        m_cols = 0;
+        m_ownStmt = false;
+}
+
+wxSQLite3ResultSet::wxSQLite3ResultSet(const wxSQLite3ResultSet& resultSet)
+{
+        m_db = resultSet.m_db;
+        m_stmt = resultSet.m_stmt;
+        // Only one object can own the statement
+        const_cast<wxSQLite3ResultSet&>(resultSet).m_stmt = 0;
+        m_eof = resultSet.m_eof;
+        m_first = resultSet.m_first;
+        m_cols = resultSet.m_cols;
+        m_ownStmt = resultSet.m_ownStmt;
+}
+
+wxSQLite3ResultSet::wxSQLite3ResultSet(void* db,
+                                       void* stmt,
+                                       bool eof,
+                                       bool first,
+                                       bool ownStmt /*=true*/)
+{
+        m_db = db;
+        m_stmt = stmt;
+        m_eof = eof;
+        m_first = first;
+        m_cols = sqlite3_column_count((sqlite3_stmt*) m_stmt);
+        m_ownStmt = ownStmt;
+}
+
+wxSQLite3ResultSet::~wxSQLite3ResultSet()
+{
+        try {
+                Finalize();
+        } catch (...) {
+        }
+}
+
+wxSQLite3ResultSet& wxSQLite3ResultSet::operator=(const wxSQLite3ResultSet& resultSet)
+{
+        if (this != &resultSet) {
+                try {
+                        Finalize();
+                } catch (...) {
+                }
+                m_db = resultSet.m_db;
+                m_stmt = resultSet.m_stmt;
+                // Only one object can own the statement
+                const_cast<wxSQLite3ResultSet&>(resultSet).m_stmt = 0;
+                m_eof = resultSet.m_eof;
+                m_first = resultSet.m_first;
+                m_cols = resultSet.m_cols;
+                m_ownStmt = resultSet.m_ownStmt;
+        }
+        return *this;
+}
+
+int wxSQLite3ResultSet::GetColumnCount()
+{
+        CheckStmt();
+        return m_cols;
+}
+
+wxString wxSQLite3ResultSet::GetAsString(int columnIndex)
+{
+        CheckStmt();
+
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        const char* localValue = (const char*) sqlite3_column_text((sqlite3_stmt*) m_stmt, columnIndex);
+        return wxString::FromUTF8(localValue);
+}
+
+wxString wxSQLite3ResultSet::GetAsString(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        const char* localValue = (const char*) sqlite3_column_text((sqlite3_stmt*) m_stmt, columnIndex);
+        return wxString::FromUTF8(localValue);
+}
+
+int wxSQLite3ResultSet::GetInt(int columnIndex, int nullValue /* = 0 */)
+{
+        if (GetColumnType(columnIndex) == SQLITE_NULL) {
+                return nullValue;
+        } else {
+                return sqlite3_column_int((sqlite3_stmt*) m_stmt, columnIndex);
+        }
+}
+
+
+int wxSQLite3ResultSet::GetInt(const wxString& columnName, int nullValue /* = 0 */)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetInt(columnIndex, nullValue);
+}
+
+wxLongLong wxSQLite3ResultSet::GetInt64(int columnIndex, wxLongLong nullValue /* = 0 */)
+{
+        if (GetColumnType(columnIndex) == SQLITE_NULL) {
+                return nullValue;
+        } else {
+                return wxLongLong(sqlite3_column_int64((sqlite3_stmt*) m_stmt, columnIndex));
+        }
+}
+
+wxLongLong wxSQLite3ResultSet::GetInt64(const wxString& columnName, wxLongLong nullValue /* = 0 */)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetInt64(columnIndex, nullValue);
+}
+
+double wxSQLite3ResultSet::GetDouble(int columnIndex, double nullValue /* = 0.0 */)
+{
+        if (GetColumnType(columnIndex) == SQLITE_NULL) {
+                return nullValue;
+        } else {
+                return sqlite3_column_double((sqlite3_stmt*) m_stmt, columnIndex);
+        }
+}
+
+double wxSQLite3ResultSet::GetDouble(const wxString& columnName, double nullValue /* = 0.0 */)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetDouble(columnIndex, nullValue);
+}
+
+wxString wxSQLite3ResultSet::GetString(int columnIndex, const wxString& nullValue /* = wxEmptyString */)
+{
+        if (GetColumnType(columnIndex) == SQLITE_NULL) {
+                return nullValue;
+        } else {
+                const char* localValue = (const char*) sqlite3_column_text((sqlite3_stmt*) m_stmt, columnIndex);
+                return wxString::FromUTF8(localValue);
+        }
+}
+
+wxString wxSQLite3ResultSet::GetString(const wxString& columnName, const wxString& nullValue /* = wxEmptyString */)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetString(columnIndex, nullValue);
+}
+
+const unsigned char* wxSQLite3ResultSet::GetBlob(int columnIndex, int& len)
+{
+        CheckStmt();
+
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        len = sqlite3_column_bytes((sqlite3_stmt*) m_stmt, columnIndex);
+        return (const unsigned char*) sqlite3_column_blob((sqlite3_stmt*) m_stmt, columnIndex);
+}
+
+const unsigned char* wxSQLite3ResultSet::GetBlob(const wxString& columnName, int& len)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetBlob(columnIndex, len);
+}
+
+wxMemoryBuffer& wxSQLite3ResultSet::GetBlob(int columnIndex, wxMemoryBuffer& buffer)
+{
+        CheckStmt();
+
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        int len = sqlite3_column_bytes((sqlite3_stmt*) m_stmt, columnIndex);
+        const void* blob = sqlite3_column_blob((sqlite3_stmt*) m_stmt, columnIndex);
+        buffer.AppendData((void*) blob, (size_t) len);
+        return buffer;
+}
+
+wxMemoryBuffer& wxSQLite3ResultSet::GetBlob(const wxString& columnName, wxMemoryBuffer& buffer)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetBlob(columnIndex, buffer);
+}
+
+wxDateTime wxSQLite3ResultSet::GetDate(int columnIndex)
+{
+        if (GetColumnType(columnIndex) == SQLITE_NULL) {
+                return wxInvalidDateTime;
+        } else {
+                wxDateTime date;
+                const wxChar* result = date.ParseDate(GetString(columnIndex));
+                if (result != NULL) {
+                        return date;
+                } else {
+                        return wxInvalidDateTime;
+                }
+        }
+}
+
+wxDateTime wxSQLite3ResultSet::GetDate(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetDate(columnIndex);
+}
+
+
+wxDateTime wxSQLite3ResultSet::GetTime(int columnIndex)
+{
+        if (GetColumnType(columnIndex) == SQLITE_NULL) {
+                return wxInvalidDateTime;
+        } else {
+                wxDateTime date;
+                const wxChar* result = date.ParseTime(GetString(columnIndex));
+                if (result != NULL) {
+                        return date;
+                } else {
+                        return wxInvalidDateTime;
+                }
+        }
+}
+
+wxDateTime wxSQLite3ResultSet::GetTime(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetTime(columnIndex);
+}
+
+wxDateTime wxSQLite3ResultSet::GetDateTime(int columnIndex)
+{
+        if (GetColumnType(columnIndex) == SQLITE_NULL) {
+                return wxInvalidDateTime;
+        } else {
+                wxDateTime date;
+                const wxChar* result = date.ParseDateTime(GetString(columnIndex));
+                if (result != NULL) {
+                        date.SetMillisecond(0);
+                        return date;
+                } else {
+                        return wxInvalidDateTime;
+                }
+        }
+}
+
+wxDateTime wxSQLite3ResultSet::GetDateTime(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetDateTime(columnIndex);
+}
+
+wxDateTime wxSQLite3ResultSet::GetTimestamp(int columnIndex)
+{
+        if (GetColumnType(columnIndex) == SQLITE_NULL) {
+                return wxInvalidDateTime;
+        } else {
+                wxDateTime date;
+                const wxChar* result = date.ParseDateTime(GetString(columnIndex));
+                if (result != NULL) {
+                        return date;
+                } else {
+                        return wxInvalidDateTime;
+                }
+        }
+}
+
+wxDateTime wxSQLite3ResultSet::GetTimestamp(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetTimestamp(columnIndex);
+}
+
+wxDateTime wxSQLite3ResultSet::GetNumericDateTime(int columnIndex)
+{
+        if (GetColumnType(columnIndex) == SQLITE_NULL) {
+                return wxInvalidDateTime;
+        } else {
+                wxLongLong value = GetInt64(columnIndex);
+                return wxDateTime(value);
+        }
+}
+
+wxDateTime wxSQLite3ResultSet::GetNumericDateTime(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetNumericDateTime(columnIndex);
+}
+
+wxDateTime wxSQLite3ResultSet::GetJulianDayNumber(int columnIndex)
+{
+        if (GetColumnType(columnIndex) == SQLITE_NULL) {
+                return wxInvalidDateTime;
+        } else {
+                double value = GetDouble(columnIndex);
+                return wxDateTime(value);
+        }
+}
+
+wxDateTime wxSQLite3ResultSet::GetJulianDayNumber(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetJulianDayNumber(columnIndex);
+}
+
+bool wxSQLite3ResultSet::GetBool(int columnIndex)
+{
+        return GetInt(columnIndex) != 0;
+}
+
+bool wxSQLite3ResultSet::GetBool(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetBool(columnIndex);
+}
+
+bool wxSQLite3ResultSet::IsNull(int columnIndex)
+{
+        return (GetColumnType(columnIndex) == SQLITE_NULL);
+}
+
+bool wxSQLite3ResultSet::IsNull(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return (GetColumnType(columnIndex) == SQLITE_NULL);
+}
+
+int wxSQLite3ResultSet::FindColumnIndex(const wxString& columnName)
+{
+        CheckStmt();
+
+        wxCharBuffer strColumnName = columnName.ToUTF8();
+        const char* localColumnName = strColumnName;
+
+        if (columnName.Len() > 0) {
+                for (int columnIndex = 0; columnIndex < m_cols; columnIndex++) {
+                        const char* temp = sqlite3_column_name((sqlite3_stmt*) m_stmt, columnIndex);
+
+                        if (strcmp(localColumnName, temp) == 0) {
+                                return columnIndex;
+                        }
+                }
+        }
+
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+}
+
+wxString wxSQLite3ResultSet::GetColumnName(int columnIndex)
+{
+        CheckStmt();
+
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        const char* localValue = sqlite3_column_name((sqlite3_stmt*) m_stmt, columnIndex);
+        return wxString::FromUTF8(localValue);
+}
+
+wxString wxSQLite3ResultSet::GetDeclaredColumnType(int columnIndex)
+{
+        CheckStmt();
+
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        const char* localValue = sqlite3_column_decltype((sqlite3_stmt*) m_stmt, columnIndex);
+        return wxString::FromUTF8(localValue);
+}
+
+int wxSQLite3ResultSet::GetColumnType(int columnIndex)
+{
+        CheckStmt();
+
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        return sqlite3_column_type((sqlite3_stmt*) m_stmt, columnIndex);
+}
+
+bool wxSQLite3ResultSet::Eof()
+{
+        CheckStmt();
+        return m_eof;
+}
+
+bool wxSQLite3ResultSet::NextRow()
+{
+        CheckStmt();
+
+        int rc;
+        if (m_first) {
+                m_first = false;
+                rc = (m_eof) ? SQLITE_DONE : SQLITE_ROW;
+        } else {
+                rc = sqlite3_step((sqlite3_stmt*) m_stmt);
+        }
+
+        if (rc == SQLITE_DONE) { // no more rows
+                m_eof = true;
+                return false;
+        } else if (rc == SQLITE_ROW) { // more rows
+                return true;
+        } else {
+                rc = sqlite3_finalize((sqlite3_stmt*) m_stmt);
+                m_stmt = 0;
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+}
+
+void wxSQLite3ResultSet::Finalize()
+{
+        if (m_stmt && m_ownStmt) {
+                int rc = sqlite3_finalize((sqlite3_stmt*) m_stmt);
+                m_stmt = 0;
+                if (rc != SQLITE_OK) {
+                        const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                        throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+                }
+        }
+}
+
+wxString wxSQLite3ResultSet::GetSQL()
+{
+        wxString sqlString = wxEmptyString;
+#if SQLITE_VERSION_NUMBER >= 3005003
+        CheckStmt();
+        const char* sqlLocal = sqlite3_sql((sqlite3_stmt*) m_stmt);
+        if (sqlLocal != NULL) sqlString = wxString::FromUTF8(sqlLocal);
+#endif
+        return sqlString;
+}
+
+bool wxSQLite3ResultSet::IsOk()
+{
+        return (m_db != 0) && (m_stmt != 0);
+}
+
+void* wxSQLite3ResultSet::GetStmt()
+{
+        return m_stmt;
+}
+
+void wxSQLite3ResultSet::CheckStmt()
+{
+        if (m_stmt == 0) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOSTMT);
+        }
+}
+
+wxString wxSQLite3ResultSet::GetDatabaseName(int columnIndex)
+{
+#if WXSQLITE3_HAVE_METADATA
+        CheckStmt();
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        const char* localValue = sqlite3_column_database_name((sqlite3_stmt*) m_stmt, columnIndex);
+        if (localValue != NULL)
+                return wxString::FromUTF8(localValue);
+        else
+                return wxEmptyString;
+#else
+        wxUnusedVar(columnIndex);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOMETADATA);
+#endif
+}
+
+wxString wxSQLite3ResultSet::GetTableName(int columnIndex)
+{
+#if WXSQLITE3_HAVE_METADATA
+        CheckStmt();
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        const char* localValue = sqlite3_column_table_name((sqlite3_stmt*) m_stmt, columnIndex);
+        if (localValue != NULL)
+                return wxString::FromUTF8(localValue);
+        else
+                return wxEmptyString;
+#else
+        wxUnusedVar(columnIndex);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOMETADATA);
+#endif
+}
+
+wxString wxSQLite3ResultSet::GetOriginName(int columnIndex)
+{
+#if WXSQLITE3_HAVE_METADATA
+        CheckStmt();
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        const char* localValue = sqlite3_column_origin_name((sqlite3_stmt*) m_stmt, columnIndex);
+        if (localValue != NULL)
+                return wxString::FromUTF8(localValue);
+        else
+                return wxEmptyString;
+#else
+        wxUnusedVar(columnIndex);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOMETADATA);
+#endif
+}
+
+// ----------------------------------------------------------------------------
+// wxSQLite3Table: class holding the complete result set of a query
+// ----------------------------------------------------------------------------
+
+wxSQLite3Table::wxSQLite3Table()
+{
+        m_results = 0;
+        m_rows = 0;
+        m_cols = 0;
+        m_currentRow = 0;
+}
+
+wxSQLite3Table::wxSQLite3Table(const wxSQLite3Table& table)
+{
+        m_results = table.m_results;
+        // Only one object can own the results
+        const_cast<wxSQLite3Table&>(table).m_results = 0;
+        m_rows = table.m_rows;
+        m_cols = table.m_cols;
+        m_currentRow = table.m_currentRow;
+}
+
+wxSQLite3Table::wxSQLite3Table(char** results, int rows, int cols)
+{
+        m_results = results;
+        m_rows = rows;
+        m_cols = cols;
+        m_currentRow = 0;
+}
+
+wxSQLite3Table::~wxSQLite3Table()
+{
+        try {
+                Finalize();
+        } catch (...) {
+        }
+}
+
+wxSQLite3Table& wxSQLite3Table::operator=(const wxSQLite3Table& table)
+{
+        if (this != &table) {
+                try {
+                        Finalize();
+                } catch (...) {
+                }
+                m_results = table.m_results;
+                // Only one object can own the results
+                const_cast<wxSQLite3Table&>(table).m_results = 0;
+                m_rows = table.m_rows;
+                m_cols = table.m_cols;
+                m_currentRow = table.m_currentRow;
+        }
+        return *this;
+}
+
+void wxSQLite3Table::Finalize()
+{
+        if (m_results) {
+                sqlite3_free_table(m_results);
+                m_results = 0;
+        }
+}
+
+int wxSQLite3Table::GetColumnCount()
+{
+        CheckResults();
+        return m_cols;
+}
+
+int wxSQLite3Table::GetRowCount()
+{
+        CheckResults();
+        return m_rows;
+}
+
+int wxSQLite3Table::FindColumnIndex(const wxString& columnName)
+{
+        CheckResults();
+
+        wxCharBuffer strColumnName = columnName.ToUTF8();
+        const char* localColumnName = strColumnName;
+
+        if (columnName.Len() > 0) {
+                for (int columnIndex = 0; columnIndex < m_cols; columnIndex++) {
+                        if (strcmp(localColumnName, m_results[columnIndex]) == 0) {
+                                return columnIndex;
+                        }
+                }
+        }
+
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_NAME);
+}
+
+wxString wxSQLite3Table::GetAsString(int columnIndex)
+{
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        int nIndex = (m_currentRow*m_cols) + m_cols + columnIndex;
+        const char* localValue = m_results[nIndex];
+        return wxString::FromUTF8(localValue);
+}
+
+wxString wxSQLite3Table::GetAsString(const wxString& columnName)
+{
+        int index = FindColumnIndex(columnName);
+        return GetAsString(index);
+}
+
+int wxSQLite3Table::GetInt(int columnIndex, int nullValue /* = 0 */)
+{
+        if (IsNull(columnIndex)) {
+                return nullValue;
+        } else {
+                long value = nullValue;
+                GetAsString(columnIndex).ToLong(&value);
+                return (int) value;
+        }
+}
+
+int wxSQLite3Table::GetInt(const wxString& columnName, int nullValue /* = 0 */)
+{
+        if (IsNull(columnName)) {
+                return nullValue;
+        } else {
+                long value = nullValue;
+                GetAsString(columnName).ToLong(&value);
+                return (int) value;
+        }
+}
+
+wxLongLong wxSQLite3Table::GetInt64(int columnIndex, wxLongLong nullValue /* = 0 */)
+{
+        if (IsNull(columnIndex)) {
+                return nullValue;
+        } else {
+                return ConvertStringToLongLong(GetAsString(columnIndex), nullValue);
+        }
+}
+
+wxLongLong wxSQLite3Table::GetInt64(const wxString& columnName, wxLongLong nullValue /* = 0 */)
+{
+        if (IsNull(columnName)) {
+                return nullValue;
+        } else {
+                return ConvertStringToLongLong(GetAsString(columnName), nullValue);
+        }
+}
+
+// Since SQLite uses internally a locale independent string representation
+// of double values, we need to provide our own conversion procedure using
+// always a point as the decimal separator.
+// The following code duplicates a SQLite utility function with minor modifications.
+
+static double wxSQLite3AtoF(const char *z)
+{
+        int sign = 1;
+        long double v1 = 0.0;
+        int nSignificant = 0;
+        while (isspace(*(unsigned char*)z)) {
+                ++z;
+        }
+        if (*z == '-') {
+                sign = -1;
+                ++z;
+        } else if (*z == '+') {
+                ++z;
+        }
+        while (*z == '0') {
+                ++z;
+        }
+        while (isdigit(*(unsigned char*)z)) {
+                v1 = v1*10.0 + (*z - '0');
+                ++z;
+                ++nSignificant;
+        }
+        if (*z == '.') {
+                long double divisor = 1.0;
+                ++z;
+                if (nSignificant == 0) {
+                        while (*z == '0') {
+                                divisor *= 10.0;
+                                ++z;
+                        }
+                }
+                while (isdigit(*(unsigned char*)z)) {
+                        if (nSignificant < 18) {
+                                v1 = v1*10.0 + (*z - '0');
+                                divisor *= 10.0;
+                                ++nSignificant;
+                        }
+                        ++z;
+                }
+                v1 /= divisor;
+        }
+        if (*z=='e' || *z=='E') {
+                int esign = 1;
+                int eval = 0;
+                long double scale = 1.0;
+                ++z;
+                if (*z == '-') {
+                        esign = -1;
+                        ++z;
+                } else if (*z == '+') {
+                        ++z;
+                }
+                while (isdigit(*(unsigned char*)z)) {
+                        eval = eval*10 + *z - '0';
+                        ++z;
+                }
+                while (eval >= 64) {
+                        scale *= 1.0e+64;
+                        eval -= 64;
+                }
+                while (eval >= 16) {
+                        scale *= 1.0e+16;
+                        eval -= 16;
+                }
+                while (eval >=  4) {
+                        scale *= 1.0e+4;
+                        eval -= 4;
+                }
+                while (eval >=  1) {
+                        scale *= 1.0e+1;
+                        eval -= 1;
+                }
+                if (esign < 0) {
+                        v1 /= scale;
+                } else {
+                        v1 *= scale;
+                }
+        }
+        return (double) ((sign < 0) ? -v1 : v1);
+}
+
+double wxSQLite3Table::GetDouble(int columnIndex, double nullValue /* = 0.0 */)
+{
+        if (IsNull(columnIndex)) {
+                return nullValue;
+        } else {
+                if (columnIndex < 0 || columnIndex > m_cols-1) {
+                        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+                }
+                int nIndex = (m_currentRow*m_cols) + m_cols + columnIndex;
+                return wxSQLite3AtoF(m_results[nIndex]);
+        }
+}
+
+double wxSQLite3Table::GetDouble(const wxString& columnName, double nullValue /* = 0.0 */)
+{
+        int index = FindColumnIndex(columnName);
+        return GetDouble(index, nullValue);
+}
+
+wxString wxSQLite3Table::GetString(int columnIndex, const wxString& nullValue /* = wxEmptyString */)
+{
+        if (IsNull(columnIndex)) {
+                return nullValue;
+        } else {
+                return GetAsString(columnIndex);
+        }
+}
+
+wxString wxSQLite3Table::GetString(const wxString& columnName, const wxString& nullValue /* = wxEmptyString */)
+{
+        if (IsNull(columnName)) {
+                return nullValue;
+        } else {
+                return GetAsString(columnName);
+        }
+}
+
+wxDateTime wxSQLite3Table::GetDate(int columnIndex)
+{
+        wxDateTime date;
+        const wxChar* result = date.ParseDate(GetString(columnIndex));
+        if (result != NULL) {
+                return date;
+        } else {
+                return wxInvalidDateTime;
+        }
+}
+
+wxDateTime wxSQLite3Table::GetDate(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetDate(columnIndex);
+}
+
+wxDateTime wxSQLite3Table::GetTime(int columnIndex)
+{
+        wxDateTime date;
+        const wxChar* result = date.ParseTime(GetString(columnIndex));
+        if (result != NULL) {
+                return date;
+        } else {
+                return wxInvalidDateTime;
+        }
+}
+
+wxDateTime wxSQLite3Table::GetTime(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetTime(columnIndex);
+}
+
+wxDateTime wxSQLite3Table::GetDateTime(int columnIndex)
+{
+        wxDateTime date;
+        const wxChar* result = date.ParseDateTime(GetString(columnIndex));
+        if (result != NULL) {
+                return date;
+        } else {
+                return wxInvalidDateTime;
+        }
+}
+
+wxDateTime wxSQLite3Table::GetDateTime(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetDateTime(columnIndex);
+}
+
+bool wxSQLite3Table::GetBool(int columnIndex)
+{
+        return GetInt(columnIndex) != 0;
+}
+
+bool wxSQLite3Table::GetBool(const wxString& columnName)
+{
+        int columnIndex = FindColumnIndex(columnName);
+        return GetBool(columnIndex);
+}
+
+bool wxSQLite3Table::IsNull(int columnIndex)
+{
+        CheckResults();
+
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        int index = (m_currentRow*m_cols) + m_cols + columnIndex;
+        const char* localValue = m_results[index];
+        return (localValue == 0);
+}
+
+bool wxSQLite3Table::IsNull(const wxString& columnName)
+{
+        int index = FindColumnIndex(columnName);
+        return IsNull(index);
+}
+
+wxString wxSQLite3Table::GetColumnName(int columnIndex)
+{
+        CheckResults();
+
+        if (columnIndex < 0 || columnIndex > m_cols-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_INDEX);
+        }
+
+        const char* localValue = m_results[columnIndex];
+        return wxString::FromUTF8(localValue);
+}
+
+void wxSQLite3Table::SetRow(int row)
+{
+        CheckResults();
+
+        if (row < 0 || row > m_rows-1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_ROW);
+        }
+
+        m_currentRow = row;
+}
+
+bool wxSQLite3Table::IsOk()
+{
+        return (m_results != 0);
+}
+
+void wxSQLite3Table::CheckResults()
+{
+        if (m_results == 0) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NORESULT);
+        }
+}
+
+// ----------------------------------------------------------------------------
+// wxSQLite3Statement: class holding a prepared statement
+// ----------------------------------------------------------------------------
+
+wxSQLite3Statement::wxSQLite3Statement()
+{
+        m_db = 0;
+        m_stmt = 0;
+        m_hasOwnership = false;
+}
+
+wxSQLite3Statement::wxSQLite3Statement(const wxSQLite3Statement& statement)
+{
+        m_db = statement.m_db;
+        m_stmt = statement.m_stmt;
+        m_hasOwnership = statement.m_hasOwnership;
+        // Only one object can own prepared statement
+        const_cast<wxSQLite3Statement&>(statement).m_hasOwnership = false;
+}
+
+wxSQLite3Statement::wxSQLite3Statement(void* db, void* stmt)
+{
+        m_db = db;
+        m_stmt = stmt;
+        m_hasOwnership = true;
+}
+
+wxSQLite3Statement::~wxSQLite3Statement()
+{
+        try {
+                Finalize();
+        } catch (...) {
+        }
+}
+
+wxSQLite3Statement& wxSQLite3Statement::operator=(const wxSQLite3Statement& statement)
+{
+        if (this != &statement) {
+                try {
+                        Finalize();
+                } catch (...) {
+                }
+                m_db = statement.m_db;
+                m_stmt = statement.m_stmt;
+                m_hasOwnership = statement.m_hasOwnership;
+                // Only one object can own prepared statement
+                const_cast<wxSQLite3Statement&>(statement).m_hasOwnership = false;
+        }
+        return *this;
+}
+
+int wxSQLite3Statement::ExecuteUpdate()
+{
+        CheckDatabase();
+        CheckStmt();
+
+        const char* localError=0;
+
+        int rc = sqlite3_step((sqlite3_stmt*) m_stmt);
+
+        if (rc == SQLITE_DONE) {
+                int rowsChanged = sqlite3_changes((sqlite3*) m_db);
+
+                rc = sqlite3_reset((sqlite3_stmt*) m_stmt);
+
+                if (rc != SQLITE_OK) {
+                        localError = sqlite3_errmsg((sqlite3*) m_db);
+                        throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+                }
+
+                return rowsChanged;
+        } else {
+                rc = sqlite3_reset((sqlite3_stmt*) m_stmt);
+                localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+}
+
+wxSQLite3ResultSet wxSQLite3Statement::ExecuteQuery(bool transferStatementOwnership)
+{
+        CheckDatabase();
+        CheckStmt();
+        if (transferStatementOwnership) {
+                if (m_hasOwnership) {
+                        m_hasOwnership = false;
+                } else {
+                        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOTOWNED);
+                }
+        }
+
+        int rc = sqlite3_step((sqlite3_stmt*) m_stmt);
+
+        if (rc == SQLITE_DONE) { // no more rows
+                return wxSQLite3ResultSet(m_db, m_stmt, true/*eof*/, true/*first*/, transferStatementOwnership);
+        } else if (rc == SQLITE_ROW) { // one or more rows
+                return wxSQLite3ResultSet(m_db, m_stmt, false/*eof*/, true/*first*/, transferStatementOwnership);
+        } else {
+                rc = sqlite3_reset((sqlite3_stmt*) m_stmt);
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+}
+
+int wxSQLite3Statement::ExecuteScalar()
+{
+        wxSQLite3ResultSet resultSet = ExecuteQuery(true);
+
+        if (resultSet.Eof() || resultSet.GetColumnCount() < 1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_QUERY);
+        }
+
+        long value = 0;
+        resultSet.GetAsString(0).ToLong(&value);
+        return (int) value;
+}
+
+int wxSQLite3Statement::GetParamCount()
+{
+        CheckStmt();
+        return sqlite3_bind_parameter_count((sqlite3_stmt*) m_stmt);
+}
+
+int wxSQLite3Statement::GetParamIndex(const wxString& paramName)
+{
+        CheckStmt();
+
+        wxCharBuffer strParamName = paramName.ToUTF8();
+        const char* localParamName = strParamName;
+
+        return sqlite3_bind_parameter_index((sqlite3_stmt*) m_stmt, localParamName);
+}
+
+wxString wxSQLite3Statement::GetParamName(int paramIndex)
+{
+        CheckStmt();
+        const char* localParamName = sqlite3_bind_parameter_name((sqlite3_stmt*) m_stmt, paramIndex);
+        return wxString::FromUTF8(localParamName);
+}
+
+void wxSQLite3Statement::Bind(int paramIndex, const wxString& stringValue)
+{
+        CheckStmt();
+
+        wxCharBuffer strStringValue = stringValue.ToUTF8();
+        const char* localStringValue = strStringValue;
+
+        int rc = sqlite3_bind_text((sqlite3_stmt*) m_stmt, paramIndex, localStringValue, -1, SQLITE_TRANSIENT);
+
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_BIND_STR);
+        }
+}
+
+void wxSQLite3Statement::Bind(int paramIndex, int intValue)
+{
+        CheckStmt();
+        int rc = sqlite3_bind_int((sqlite3_stmt*) m_stmt, paramIndex, intValue);
+
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_BIND_INT);
+        }
+}
+
+void wxSQLite3Statement::Bind(int paramIndex, wxLongLong int64Value)
+{
+        CheckStmt();
+        int rc = sqlite3_bind_int64((sqlite3_stmt*) m_stmt, paramIndex, int64Value.GetValue());
+
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_BIND_INT64);
+        }
+}
+
+void wxSQLite3Statement::Bind(int paramIndex, double doubleValue)
+{
+        CheckStmt();
+        int rc = sqlite3_bind_double((sqlite3_stmt*) m_stmt, paramIndex, doubleValue);
+
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_BIND_DBL);
+        }
+}
+
+void wxSQLite3Statement::Bind(int paramIndex, const char* charValue)
+{
+        CheckStmt();
+        int rc = sqlite3_bind_text((sqlite3_stmt*) m_stmt, paramIndex, charValue, -1, SQLITE_TRANSIENT);
+
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_BIND_STR);
+        }
+}
+
+void wxSQLite3Statement::Bind(int paramIndex, const unsigned char* blobValue, int blobLen)
+{
+        CheckStmt();
+        int rc = sqlite3_bind_blob((sqlite3_stmt*) m_stmt, paramIndex,
+                                   (const void*)blobValue, blobLen, SQLITE_TRANSIENT);
+
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_BIND_BLOB);
+        }
+}
+
+void wxSQLite3Statement::Bind(int paramIndex, const wxMemoryBuffer& blobValue)
+{
+        CheckStmt();
+        int blobLen = (int) blobValue.GetDataLen();
+        int rc = sqlite3_bind_blob((sqlite3_stmt*) m_stmt, paramIndex,
+                                   (const void*)blobValue.GetData(), blobLen, SQLITE_TRANSIENT);
+
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_BIND_BLOB);
+        }
+}
+
+void wxSQLite3Statement::BindDate(int paramIndex, const wxDateTime& date)
+{
+        if (date.IsValid()) {
+                Bind(paramIndex,date.FormatISODate());
+        } else {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
+        }
+}
+
+void wxSQLite3Statement::BindTime(int paramIndex, const wxDateTime& time)
+{
+        if (time.IsValid()) {
+                Bind(paramIndex,time.FormatISOTime());
+        } else {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
+        }
+}
+
+void wxSQLite3Statement::BindDateTime(int paramIndex, const wxDateTime& datetime)
+{
+        if (datetime.IsValid()) {
+                Bind(paramIndex,datetime.Format(wxT("%Y-%m-%d %H:%M:%S")));
+        } else {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
+        }
+}
+
+void wxSQLite3Statement::BindTimestamp(int paramIndex, const wxDateTime& timestamp)
+{
+        if (timestamp.IsValid()) {
+                Bind(paramIndex,timestamp.Format(wxT("%Y-%m-%d %H:%M:%S.%l")));
+        } else {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
+        }
+}
+
+void wxSQLite3Statement::BindNumericDateTime(int paramIndex, const wxDateTime& datetime)
+{
+        if (datetime.IsValid()) {
+                Bind(paramIndex, datetime.GetValue());
+        } else {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
+        }
+}
+
+void wxSQLite3Statement::BindJulianDayNumber(int paramIndex, const wxDateTime& datetime)
+{
+        if (datetime.IsValid()) {
+                Bind(paramIndex, datetime.GetJulianDayNumber());
+        } else {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_BIND_DATETIME);
+        }
+}
+
+void wxSQLite3Statement::BindBool(int paramIndex, bool value)
+{
+        Bind(paramIndex, value ? 1 : 0);
+}
+
+void wxSQLite3Statement::BindNull(int paramIndex)
+{
+        CheckStmt();
+        int rc = sqlite3_bind_null((sqlite3_stmt*) m_stmt, paramIndex);
+
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_BIND_NULL);
+        }
+}
+
+void wxSQLite3Statement::BindZeroBlob(int paramIndex, int blobSize)
+{
+#if SQLITE_VERSION_NUMBER >= 3004000
+        CheckStmt();
+        int rc = sqlite3_bind_zeroblob((sqlite3_stmt*) m_stmt, paramIndex, blobSize);
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_BIND_ZEROBLOB);
+        }
+#else
+        wxUnusedVar(paramIndex);
+        wxUnusedVar(blobSize);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
+#endif
+}
+
+void wxSQLite3Statement::ClearBindings()
+{
+        CheckStmt();
+#if 0 // missing in SQLite DLL
+        int rc = sqlite3_clear_bindings((sqlite3_stmt*) m_stmt);
+
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_BIND_CLEAR);
+        }
+#else
+        for (int paramIndex = 1; paramIndex <= GetParamCount(); paramIndex++) {
+                BindNull(paramIndex);
+        }
+#endif
+}
+
+wxString wxSQLite3Statement::GetSQL()
+{
+        wxString sqlString = wxEmptyString;
+#if SQLITE_VERSION_NUMBER >= 3005003
+        CheckStmt();
+        const char* sqlLocal = sqlite3_sql((sqlite3_stmt*) m_stmt);
+        if (sqlLocal != NULL) sqlString = wxString::FromUTF8(sqlLocal);
+#endif
+        return sqlString;
+}
+
+void wxSQLite3Statement::Reset()
+{
+        if (m_stmt) {
+                int rc = sqlite3_reset((sqlite3_stmt*) m_stmt);
+
+                if (rc != SQLITE_OK) {
+                        const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                        throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+                }
+        }
+}
+
+bool wxSQLite3Statement::IsReadOnly()
+{
+#if SQLITE_VERSION_NUMBER >= 3007004
+        CheckStmt();
+        return sqlite3_stmt_readonly((sqlite3_stmt*) m_stmt) != 0;
+#else
+        return false;
+#endif
+}
+
+void wxSQLite3Statement::Finalize()
+{
+        if (m_stmt && m_hasOwnership) {
+                int rc = sqlite3_finalize((sqlite3_stmt*) m_stmt);
+                m_stmt = 0;
+                m_hasOwnership = false;
+
+                if (rc != SQLITE_OK) {
+                        const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                        throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+                }
+        }
+}
+
+bool wxSQLite3Statement::IsOk()
+{
+        return (m_db != 0) && (m_stmt != 0);
+}
+
+void wxSQLite3Statement::CheckDatabase()
+{
+        if (m_db == 0) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NODB);
+        }
+}
+
+void wxSQLite3Statement::CheckStmt()
+{
+        if (m_stmt == 0) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOSTMT);
+        }
+}
+
+//
+
+wxSQLite3Blob::wxSQLite3Blob()
+{
+        m_db   = NULL;
+        m_blob = NULL;
+        m_ok   = false;
+        m_writable = false;
+}
+
+wxSQLite3Blob::wxSQLite3Blob(const wxSQLite3Blob& blob)
+{
+        m_db   = blob.m_db;
+        m_blob = blob.m_blob;
+        m_ok   = blob.m_ok;
+        m_writable = blob.m_writable;
+}
+
+wxSQLite3Blob& wxSQLite3Blob::operator=(const wxSQLite3Blob& blob)
+{
+        if (this != &blob) {
+                try {
+                        Finalize();
+                } catch (...) {
+                }
+                m_db   = blob.m_db;
+                m_blob = blob.m_blob;
+                m_ok   = blob.m_ok;
+                m_writable = blob.m_writable;
+                // only one blob can own the blob handle
+                const_cast<wxSQLite3Blob&>(blob).m_ok = false;
+        }
+        return *this;
+}
+
+wxSQLite3Blob::wxSQLite3Blob(void* db, void* blobHandle, bool writable)
+{
+        m_db   = db;
+        m_blob = blobHandle;
+        m_ok   = true;
+        m_writable = writable;
+}
+
+wxSQLite3Blob::~wxSQLite3Blob()
+{
+        try {
+                Finalize();
+        } catch (...) {
+        }
+}
+
+wxMemoryBuffer& wxSQLite3Blob::Read(wxMemoryBuffer& blobValue, int length, int offset)
+{
+#if SQLITE_VERSION_NUMBER >= 3004000
+        CheckBlob();
+        char* localBuffer = (char*) blobValue.GetAppendBuf((size_t) length);
+        int rc = sqlite3_blob_read((sqlite3_blob*) m_blob, localBuffer, length, offset);
+
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+
+        blobValue.UngetAppendBuf((size_t) length);
+#else
+        wxUnusedVar(blobValue);
+        wxUnusedVar(length);
+        wxUnusedVar(offset);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
+#endif
+        return blobValue;
+}
+
+void wxSQLite3Blob::Write(const wxMemoryBuffer& blobValue, int offset)
+{
+#if SQLITE_VERSION_NUMBER >= 3004000
+        CheckBlob();
+        if (m_writable) {
+                int blobLen = (int) blobValue.GetDataLen();
+                int rc = sqlite3_blob_write((sqlite3_blob*) m_blob,
+                                            (const void*) blobValue.GetData(), blobLen, offset);
+
+                if (rc != SQLITE_OK) {
+                        const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                        throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+                }
+        } else {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_BLOB);
+        }
+#else
+        wxUnusedVar(blobValue);
+        wxUnusedVar(offset);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
+#endif
+}
+
+bool wxSQLite3Blob::IsOk()
+{
+        return m_ok;
+}
+
+bool wxSQLite3Blob::IsReadOnly()
+{
+        return !m_writable;
+}
+
+int wxSQLite3Blob::GetSize()
+{
+#if SQLITE_VERSION_NUMBER >= 3004000
+        CheckBlob();
+        return sqlite3_blob_bytes((sqlite3_blob*) m_blob);
+#else
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
+        return 0;
+#endif
+}
+
+void wxSQLite3Blob::Rebind(wxLongLong rowid)
+{
+#if SQLITE_VERSION_NUMBER >= 3007004
+        CheckBlob();
+        int rc = sqlite3_blob_reopen((sqlite3_blob*) m_blob, rowid.GetValue());
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+#else
+        wxUnusedVar(rowid);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOBLOBREBIND);
+#endif
+}
+
+void wxSQLite3Blob::Finalize()
+{
+#if SQLITE_VERSION_NUMBER >= 3004000
+        if (m_ok) {
+                int rc = sqlite3_blob_close((sqlite3_blob*) m_blob);
+                m_blob = NULL;
+                m_ok = false;
+                if (rc != SQLITE_OK) {
+                        const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                        throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+                }
+        }
+#else
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
+#endif
+}
+
+void wxSQLite3Blob::CheckBlob()
+{
+        if (!m_ok) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_BLOB);
+        }
+}
+
+// ----------------------------------------------------------------------------
+// wxSQLite3Database: class holding a SQLite3 database object
+// ----------------------------------------------------------------------------
+
+bool wxSQLite3Database::ms_sharedCacheEnabled = false;
+
+void
+wxSQLite3Database::SetSharedCache(bool enable)
+{
+        int flag = (enable) ? 1 : 0;
+        int rc = sqlite3_enable_shared_cache(flag);
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_SHARED_CACHE);
+        }
+        ms_sharedCacheEnabled = enable;
+}
+
+#if WXSQLITE3_HAVE_CODEC
+bool wxSQLite3Database::ms_hasEncryptionSupport = true;
+#else
+bool wxSQLite3Database::ms_hasEncryptionSupport = false;
+#endif
+
+#if WXSQLITE3_HAVE_METADATA
+bool wxSQLite3Database::ms_hasMetaDataSupport = true;
+#else
+bool wxSQLite3Database::ms_hasMetaDataSupport = false;
+#endif
+
+#if WXSQLITE3_HAVE_LOAD_EXTENSION
+bool wxSQLite3Database::ms_hasLoadExtSupport = true;
+#else
+bool wxSQLite3Database::ms_hasLoadExtSupport = false;
+#endif
+
+#if WXSQLITE3_USE_NAMED_COLLECTIONS
+bool wxSQLite3Database::ms_hasNamedCollectionSupport = true;
+#else
+bool wxSQLite3Database::ms_hasNamedCollectionSupport = false;
+#endif
+
+#if SQLITE_VERSION_NUMBER >= 3004000
+bool wxSQLite3Database::ms_hasIncrementalBlobSupport = true;
+#else
+bool wxSQLite3Database::ms_hasIncrementalBlobSupport = false;
+#endif
+
+#if SQLITE_VERSION_NUMBER >= 3006008
+bool wxSQLite3Database::ms_hasSavepointSupport = true;
+#else
+bool wxSQLite3Database::ms_hasSavepointSupport = false;
+#endif
+
+#if SQLITE_VERSION_NUMBER >= 3006011
+bool wxSQLite3Database::ms_hasBackupSupport = true;
+#else
+bool wxSQLite3Database::ms_hasBackupSupport = false;
+#endif
+
+#if SQLITE_VERSION_NUMBER >= 3007000
+bool wxSQLite3Database::ms_hasWriteAheadLogSupport = true;
+#else
+bool wxSQLite3Database::ms_hasWriteAheadLogSupport = false;
+#endif
+
+bool
+wxSQLite3Database::HasEncryptionSupport()
+{
+        return ms_hasEncryptionSupport;
+}
+
+bool
+wxSQLite3Database::HasMetaDataSupport()
+{
+        return ms_hasMetaDataSupport;
+}
+
+bool
+wxSQLite3Database::HasLoadExtSupport()
+{
+        return ms_hasLoadExtSupport;
+}
+
+bool
+wxSQLite3Database::HasNamedCollectionSupport()
+{
+        return ms_hasNamedCollectionSupport;
+}
+
+bool
+wxSQLite3Database::HasIncrementalBlobSupport()
+{
+        return ms_hasIncrementalBlobSupport;
+}
+
+bool
+wxSQLite3Database::HasSavepointSupport()
+{
+        return ms_hasSavepointSupport;
+}
+
+bool
+wxSQLite3Database::HasBackupSupport()
+{
+        return ms_hasBackupSupport;
+}
+
+bool
+wxSQLite3Database::HasWriteAheadLogSupport()
+{
+        return ms_hasWriteAheadLogSupport;
+}
+
+wxSQLite3Database::wxSQLite3Database()
+{
+        m_db = 0;
+        m_busyTimeoutMs = 60000; // 60 seconds
+        m_isEncrypted = false;
+}
+
+wxSQLite3Database::wxSQLite3Database(const wxSQLite3Database& db)
+{
+        m_db = db.m_db;
+        m_busyTimeoutMs = 60000; // 60 seconds
+        m_isEncrypted = false;
+}
+
+wxSQLite3Database::~wxSQLite3Database()
+{
+        Close();
+}
+
+wxSQLite3Database& wxSQLite3Database::operator=(const wxSQLite3Database& db)
+{
+        if (this != &db) {
+                if (m_db == 0) {
+                        m_db = db.m_db;
+                        m_busyTimeoutMs = 60000; // 60 seconds
+                        m_isEncrypted = db.m_isEncrypted;
+                } else {
+                        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_DBASSIGN_FAILED);
+                }
+        }
+        return *this;
+}
+
+void wxSQLite3Database::Open(const wxString& fileName, const wxString& key, int flags)
+{
+        wxCharBuffer strLocalKey = key.ToUTF8();
+        const char* localKey = strLocalKey;
+        wxMemoryBuffer binaryKey;
+        if (key.Length() > 0) {
+                binaryKey.AppendData((void*) localKey, strlen(localKey));
+        }
+        Open(fileName, binaryKey, flags);
+}
+
+void wxSQLite3Database::Open(const wxString& fileName, const wxMemoryBuffer& key, int flags)
+{
+        wxCharBuffer strFileName = fileName.ToUTF8();
+        const char* localFileName = strFileName;
+
+        int rc = sqlite3_open_v2((const char*) localFileName, (sqlite3**) &m_db, flags, NULL);
+
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                Close();
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+
+        rc = sqlite3_extended_result_codes((sqlite3*) m_db, 1);
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                Close();
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+
+#if WXSQLITE3_HAVE_CODEC
+        if (key.GetDataLen() > 0) {
+                rc = sqlite3_key((sqlite3*) m_db, key.GetData(), (int) key.GetDataLen());
+                if (rc != SQLITE_OK) {
+                        const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                        Close();
+                        throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+                }
+                m_isEncrypted = true;
+        }
+#else
+        wxUnusedVar(key);
+#endif
+
+        SetBusyTimeout(m_busyTimeoutMs);
+}
+
+bool wxSQLite3Database::IsOpen() const
+{
+        return (m_db != NULL);
+}
+
+void wxSQLite3Database::Close()
+{
+        if (m_db) {
+#if SQLITE_VERSION_NUMBER >= 3006000
+// Unfortunately the following code leads to a crash if the RTree module is used
+// therefore it is disabled for now
+#if 0
+                // Finalize all unfinalized prepared statements
+                sqlite3_stmt *pStmt;
+                while( (pStmt = sqlite3_next_stmt((sqlite3*) m_db, 0))!=0 ) {
+                        sqlite3_finalize(pStmt);
+                }
+#endif
+#endif
+                sqlite3_close((sqlite3*) m_db);
+                m_db = 0;
+                m_isEncrypted = false;
+        }
+}
+
+void wxSQLite3Database::Backup(const wxString& targetFileName, const wxString& key, const wxString& sourceDatabaseName)
+{
+        wxCharBuffer strLocalKey = key.ToUTF8();
+        const char* localKey = strLocalKey;
+        wxMemoryBuffer binaryKey;
+        if (key.Length() > 0) {
+                binaryKey.AppendData((void*) localKey, strlen(localKey));
+        }
+        Backup(targetFileName, binaryKey, sourceDatabaseName);
+}
+
+void wxSQLite3Database::Backup(const wxString& targetFileName, const wxMemoryBuffer& key, const wxString& sourceDatabaseName)
+{
+#if SQLITE_VERSION_NUMBER >= 3006011
+        CheckDatabase();
+
+        wxCharBuffer strFileName = targetFileName.ToUTF8();
+        const char* localTargetFileName = strFileName;
+        wxCharBuffer strDatabaseName = sourceDatabaseName.ToUTF8();
+        const char* localSourceDatabaseName = strDatabaseName;
+
+        sqlite3* pDest;
+        sqlite3_backup* pBackup;
+        int rc;
+        rc = sqlite3_open(localTargetFileName, &pDest);
+        if (rc != SQLITE_OK) {
+                sqlite3_close(pDest);
+                throw wxSQLite3Exception(rc, wxERRMSG_DBOPEN_FAILED);
+        }
+#if WXSQLITE3_HAVE_CODEC
+        if (key.GetDataLen() > 0) {
+                rc = sqlite3_key(pDest, key.GetData(), (int) key.GetDataLen());
+                if (rc != SQLITE_OK) {
+                        const char* localError = sqlite3_errmsg((sqlite3*) pDest);
+                        sqlite3_close(pDest);
+                        throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+                }
+        }
+#else
+        wxUnusedVar(key);
+#endif
+
+        pBackup = sqlite3_backup_init(pDest, "main", (sqlite3*) m_db, localSourceDatabaseName);
+        if (pBackup == 0) {
+                const char* localError = sqlite3_errmsg(pDest);
+                sqlite3_close(pDest);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+
+        do {
+                rc = sqlite3_backup_step(pBackup, 10);
+#if 0
+                xProgress(sqlite3_backup_remaining(pBackup),
+                          sqlite3_backup_pagecount(pBackup));
+#endif
+                if (rc == SQLITE_BUSY || rc == SQLITE_LOCKED) {
+                        sqlite3_sleep(250);
+                }
+        } while (rc == SQLITE_OK || rc == SQLITE_BUSY || rc == SQLITE_LOCKED);
+
+        sqlite3_backup_finish(pBackup);
+        if (rc == SQLITE_DONE) {
+                sqlite3_close(pDest);
+        } else {
+                const char* localError = sqlite3_errmsg(pDest);
+                sqlite3_close(pDest);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+#else
+        wxUnusedVar(targetFileName);
+        wxUnusedVar(sourceDatabaseName);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOBACKUP);
+#endif
+}
+
+void wxSQLite3Database::Restore(const wxString& sourceFileName, const wxString& key, const wxString& targetDatabaseName)
+{
+        wxCharBuffer strLocalKey = key.ToUTF8();
+        const char* localKey = strLocalKey;
+        wxMemoryBuffer binaryKey;
+        if (key.Length() > 0) {
+                binaryKey.AppendData((void*) localKey, strlen(localKey));
+        }
+        Restore(sourceFileName, binaryKey, targetDatabaseName);
+}
+
+void wxSQLite3Database::Restore(const wxString& sourceFileName, const wxMemoryBuffer& key, const wxString& targetDatabaseName)
+{
+#if SQLITE_VERSION_NUMBER >= 3006011
+        CheckDatabase();
+
+        wxCharBuffer strFileName = sourceFileName.ToUTF8();
+        const char* localSourceFileName = strFileName;
+        wxCharBuffer strDatabaseName = targetDatabaseName.ToUTF8();
+        const char* localTargetDatabaseName = strDatabaseName;
+
+        sqlite3* pSrc;
+        sqlite3_backup* pBackup;
+        int rc;
+        int nTimeout = 0;
+
+        rc = sqlite3_open(localSourceFileName, &pSrc);
+        if (rc != SQLITE_OK) {
+                sqlite3_close(pSrc);
+                throw wxSQLite3Exception(rc, wxERRMSG_DBOPEN_FAILED);
+        }
+#if WXSQLITE3_HAVE_CODEC
+        if (key.GetDataLen() > 0) {
+                rc = sqlite3_key(pSrc, key.GetData(), (int) key.GetDataLen());
+                if (rc != SQLITE_OK) {
+                        const char* localError = sqlite3_errmsg((sqlite3*) pSrc);
+                        sqlite3_close(pSrc);
+                        throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+                }
+        }
+#else
+        wxUnusedVar(key);
+#endif
+
+        pBackup = sqlite3_backup_init((sqlite3*) m_db, localTargetDatabaseName, pSrc, "main");
+        if (pBackup == 0) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                sqlite3_close(pSrc);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+        while ((rc = sqlite3_backup_step(pBackup, 100)) == SQLITE_OK || rc == SQLITE_BUSY) {
+                if (rc == SQLITE_BUSY) {
+                        if (nTimeout++ >= 3) break;
+                        sqlite3_sleep(100);
+                }
+        }
+        sqlite3_backup_finish(pBackup);
+        if (rc == SQLITE_DONE) {
+                sqlite3_close(pSrc);
+        } else if (rc == SQLITE_BUSY || rc == SQLITE_LOCKED) {
+                sqlite3_close(pSrc);
+                throw wxSQLite3Exception(rc, wxERRMSG_SOURCEDB_BUSY);
+        } else {
+                const char* localError = sqlite3_errmsg(pSrc);
+                sqlite3_close(pSrc);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+#else
+        wxUnusedVar(sourceFileName);
+        wxUnusedVar(targetDatabaseName);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOBACKUP);
+#endif
+}
+
+void wxSQLite3Database::Begin(wxSQLite3TransactionType transactionType)
+{
+        wxString sql;
+        switch (transactionType) {
+        case WXSQLITE_TRANSACTION_DEFERRED:
+                sql << wxT("begin deferred transaction");
+                break;
+        case WXSQLITE_TRANSACTION_IMMEDIATE:
+                sql << wxT("begin immediate transaction");
+                break;
+        case WXSQLITE_TRANSACTION_EXCLUSIVE:
+                sql << wxT("begin exclusive transaction");
+                break;
+        default:
+                sql << wxT("begin transaction");
+                break;
+        }
+        ExecuteUpdate(sql);
+}
+
+void wxSQLite3Database::Commit()
+{
+        ExecuteUpdate("commit transaction");
+}
+
+void wxSQLite3Database::Rollback(const wxString& savepointName)
+{
+#if SQLITE_VERSION_NUMBER >= 3006008
+        if (savepointName.IsEmpty()) {
+#endif
+                ExecuteUpdate("rollback transaction");
+#if SQLITE_VERSION_NUMBER >= 3006008
+        } else {
+                ExecuteUpdate(wxString(wxT("rollback transaction to savepoint "))+savepointName);
+        }
+#endif
+}
+
+bool wxSQLite3Database::GetAutoCommit()
+{
+        CheckDatabase();
+        return sqlite3_get_autocommit((sqlite3*) m_db) != 0;
+}
+
+void wxSQLite3Database::Savepoint(const wxString& savepointName)
+{
+#if SQLITE_VERSION_NUMBER >= 3006008
+        ExecuteUpdate(wxString(wxT("savepoint "))+savepointName);
+#else
+        wxUnusedVar(savepointName);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOSAVEPOINT);
+#endif
+}
+
+void wxSQLite3Database::ReleaseSavepoint(const wxString& savepointName)
+{
+#if SQLITE_VERSION_NUMBER >= 3006008
+        ExecuteUpdate(wxString(wxT("release savepoint "))+savepointName);
+#else
+        wxUnusedVar(savepointName);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOSAVEPOINT);
+#endif
+}
+
+wxSQLite3Statement wxSQLite3Database::PrepareStatement(const wxString& sql)
+{
+        wxCharBuffer strSql = sql.ToUTF8();
+        const char* localSql = strSql;
+        return PrepareStatement(localSql);
+}
+
+wxSQLite3Statement wxSQLite3Database::PrepareStatement(const wxSQLite3StatementBuffer& sql)
+{
+        return PrepareStatement((const char*) sql);
+}
+
+wxSQLite3Statement wxSQLite3Database::PrepareStatement(const char* sql)
+{
+        CheckDatabase();
+        sqlite3_stmt* stmt = (sqlite3_stmt*) Prepare(sql);
+        return wxSQLite3Statement(m_db, stmt);
+}
+
+bool wxSQLite3Database::TableExists(const wxString& tableName, const wxString& databaseName)
+{
+        wxString sql;
+        if (databaseName.IsEmpty()) {
+                sql = wxT("select count(*) from sqlite_master where type='table' and name like ?");
+        } else {
+                sql = wxString(wxT("select count(*) from ")) + databaseName + wxString(wxT(".sqlite_master where type='table' and name like ?"));
+        }
+        wxSQLite3Statement stmt = PrepareStatement(sql);
+        stmt.Bind(1, tableName);
+        wxSQLite3ResultSet resultSet = stmt.ExecuteQuery();
+        long value = 0;
+        resultSet.GetAsString(0).ToLong(&value);
+        return (value > 0);
+}
+
+bool wxSQLite3Database::TableExists(const wxString& tableName, wxArrayString& databaseNames)
+{
+        wxArrayString databaseList;
+        GetDatabaseList(databaseList);
+
+        bool found = false;
+        size_t count = databaseList.GetCount();
+        if (count > 0) {
+                size_t j;
+                for (j = 0; j < count; j++) {
+                        if (TableExists(tableName, databaseList.Item(j))) {
+                                found = true;
+                                databaseNames.Add(databaseList.Item(j));
+                        }
+                }
+        }
+        return found;
+}
+
+void wxSQLite3Database::GetDatabaseList(wxArrayString& databaseNames)
+{
+        databaseNames.Empty();
+        wxSQLite3ResultSet resultSet = ExecuteQuery("PRAGMA database_list;");
+        while (resultSet.NextRow()) {
+                databaseNames.Add(resultSet.GetString(1));
+        }
+}
+
+void wxSQLite3Database::GetDatabaseList(wxArrayString& databaseNames, wxArrayString& databaseFiles)
+{
+        databaseNames.Empty();
+        databaseFiles.Empty();
+        wxSQLite3ResultSet resultSet = ExecuteQuery("PRAGMA database_list;");
+        while (resultSet.NextRow()) {
+                databaseNames.Add(resultSet.GetString(1));
+                databaseFiles.Add(resultSet.GetString(2));
+        }
+}
+
+bool wxSQLite3Database::EnableForeignKeySupport(bool enable)
+{
+        if (enable) {
+                ExecuteUpdate("PRAGMA foreign_keys=ON;");
+        } else {
+                ExecuteUpdate("PRAGMA foreign_keys=OFF;");
+        }
+        bool enabled = IsForeignKeySupportEnabled();
+        return (enable && enabled) || (!enable && !enabled);
+}
+
+bool wxSQLite3Database::IsForeignKeySupportEnabled()
+{
+        bool enabled = false;
+        wxSQLite3ResultSet resultSet = ExecuteQuery("PRAGMA foreign_keys;");
+        if (resultSet.NextRow()) {
+                enabled = (resultSet.GetInt(0) == 1);
+        }
+        return enabled;
+}
+
+wxSQLite3JournalMode
+wxSQLite3Database::SetJournalMode(wxSQLite3JournalMode journalMode, const wxString& database)
+{
+        wxString mode = ConvertJournalMode(journalMode);
+        wxString query = wxT("PRAGMA ");
+        if (!database.IsEmpty()) {
+                query += database;
+                query += wxT(".");
+        }
+        query += wxT("journal_mode=");
+        query += mode;
+        query += wxT(";");
+        wxSQLite3ResultSet resultSet = ExecuteQuery(query);
+        if (resultSet.NextRow()) {
+                mode = resultSet.GetString(0);
+        }
+        return ConvertJournalMode(mode);
+}
+
+wxSQLite3JournalMode
+wxSQLite3Database::GetJournalMode(const wxString& database)
+{
+        wxString mode = wxT("DELETE");
+        wxString query = wxT("PRAGMA ");
+        if (!database.IsEmpty()) {
+                query += database;
+                query += wxT(".");
+        }
+        query += wxT("journal_mode;");
+        wxSQLite3ResultSet resultSet = ExecuteQuery(query);
+        if (resultSet.NextRow()) {
+                mode = resultSet.GetString(0);
+        }
+        return ConvertJournalMode(mode);
+}
+
+/* static */
+wxString wxSQLite3Database::ConvertJournalMode(wxSQLite3JournalMode mode)
+{
+        wxString journalMode;
+        if      (mode == WXSQLITE_JOURNALMODE_DELETE)   journalMode = wxT("DELETE");
+        else if (mode == WXSQLITE_JOURNALMODE_PERSIST)  journalMode = wxT("PERSIST");
+        else if (mode == WXSQLITE_JOURNALMODE_OFF)      journalMode = wxT("OFF");
+        else if (mode == WXSQLITE_JOURNALMODE_TRUNCATE) journalMode = wxT("TRUNCATE");
+        else if (mode == WXSQLITE_JOURNALMODE_MEMORY)   journalMode = wxT("MEMORY");
+        else if (mode == WXSQLITE_JOURNALMODE_WAL)      journalMode = wxT("WAL");
+        else                                            journalMode = wxT("DELETE");
+        return journalMode;
+}
+
+/* static */
+wxSQLite3JournalMode wxSQLite3Database::ConvertJournalMode(const wxString& mode)
+{
+        wxSQLite3JournalMode journalMode;
+        if      (mode.IsSameAs(wxT("DELETE")))   journalMode = WXSQLITE_JOURNALMODE_DELETE;
+        else if (mode.IsSameAs(wxT("PERSIST")))  journalMode = WXSQLITE_JOURNALMODE_PERSIST;
+        else if (mode.IsSameAs(wxT("OFF")))      journalMode = WXSQLITE_JOURNALMODE_OFF;
+        else if (mode.IsSameAs(wxT("TRUNCATE"))) journalMode = WXSQLITE_JOURNALMODE_TRUNCATE;
+        else if (mode.IsSameAs(wxT("MEMORY")))   journalMode = WXSQLITE_JOURNALMODE_MEMORY;
+        else if (mode.IsSameAs(wxT("WAL")))      journalMode = WXSQLITE_JOURNALMODE_WAL;
+        else                                     journalMode = WXSQLITE_JOURNALMODE_DELETE;
+        return journalMode;
+}
+
+bool wxSQLite3Database::CheckSyntax(const wxString& sql)
+{
+        wxCharBuffer strSql = sql.ToUTF8();
+        const char* localSql = strSql;
+        return CheckSyntax(localSql);
+}
+
+bool wxSQLite3Database::CheckSyntax(const wxSQLite3StatementBuffer& sql)
+{
+        return CheckSyntax((const char*) sql);
+}
+
+bool wxSQLite3Database::CheckSyntax(const char* sql)
+{
+        return sqlite3_complete(sql) != 0;
+}
+
+int wxSQLite3Database::ExecuteUpdate(const wxString& sql)
+{
+        wxCharBuffer strSql = sql.ToUTF8();
+        const char* localSql = strSql;
+        return ExecuteUpdate(localSql);
+}
+
+int wxSQLite3Database::ExecuteUpdate(const wxSQLite3StatementBuffer& sql)
+{
+        return ExecuteUpdate((const char*) sql);
+}
+
+int wxSQLite3Database::ExecuteUpdate(const char* sql)
+{
+        CheckDatabase();
+
+        char* localError=0;
+
+        int rc = sqlite3_exec((sqlite3*) m_db, sql, 0, 0, &localError);
+
+        if (rc == SQLITE_OK) {
+                return sqlite3_changes((sqlite3*) m_db);
+        } else {
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+}
+
+wxSQLite3ResultSet wxSQLite3Database::ExecuteQuery(const wxString& sql)
+{
+        wxCharBuffer strSql = sql.ToUTF8();
+        const char* localSql = strSql;
+        return ExecuteQuery(localSql);
+}
+
+wxSQLite3ResultSet wxSQLite3Database::ExecuteQuery(const wxSQLite3StatementBuffer& sql)
+{
+        return ExecuteQuery((const char*) sql);
+}
+
+wxSQLite3ResultSet wxSQLite3Database::ExecuteQuery(const char* sql)
+{
+        CheckDatabase();
+
+        sqlite3_stmt* stmt = (sqlite3_stmt*) Prepare(sql);
+
+        int rc = sqlite3_step(stmt);
+
+        if (rc == SQLITE_DONE) { // no rows
+                return wxSQLite3ResultSet(m_db, stmt, true /* eof */);
+        } else if (rc == SQLITE_ROW) { // one or more rows
+                return wxSQLite3ResultSet(m_db, stmt, false /* eof */);
+        } else {
+                rc = sqlite3_finalize(stmt);
+                const char* localError= sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+}
+
+int wxSQLite3Database::ExecuteScalar(const wxString& sql)
+{
+        wxCharBuffer strSql = sql.ToUTF8();
+        const char* localSql = strSql;
+        return ExecuteScalar(localSql);
+}
+
+int wxSQLite3Database::ExecuteScalar(const wxSQLite3StatementBuffer& sql)
+{
+        return ExecuteScalar((const char*) sql);
+}
+
+int wxSQLite3Database::ExecuteScalar(const char* sql)
+{
+        wxSQLite3ResultSet resultSet = ExecuteQuery(sql);
+
+        if (resultSet.Eof() || resultSet.GetColumnCount() < 1) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_INVALID_QUERY);
+        }
+
+        long value = 0;
+        resultSet.GetAsString(0).ToLong(&value);
+        return (int) value;
+}
+
+wxSQLite3Table wxSQLite3Database::GetTable(const wxString& sql)
+{
+        wxCharBuffer strSql = sql.ToUTF8();
+        const char* localSql = strSql;
+        return GetTable(localSql);
+}
+
+wxSQLite3Table wxSQLite3Database::GetTable(const wxSQLite3StatementBuffer& sql)
+{
+        return GetTable((const char*) sql);
+}
+
+wxSQLite3Table wxSQLite3Database::GetTable(const char* sql)
+{
+        CheckDatabase();
+
+        char* localError=0;
+        char** results=0;
+        int rc;
+        int rows(0);
+        int cols(0);
+
+        rc = sqlite3_get_table((sqlite3*) m_db, sql, &results, &rows, &cols, &localError);
+
+        if (rc == SQLITE_OK) {
+                return wxSQLite3Table(results, rows, cols);
+        } else {
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+}
+
+wxLongLong wxSQLite3Database::GetLastRowId()
+{
+        CheckDatabase();
+        return wxLongLong(sqlite3_last_insert_rowid((sqlite3*) m_db));
+}
+
+wxSQLite3Blob wxSQLite3Database::GetReadOnlyBlob(wxLongLong rowId,
+                const wxString& columnName,
+                const wxString& tableName,
+                const wxString& dbName)
+{
+        return GetBlob(rowId, columnName, tableName, dbName, false);
+}
+
+wxSQLite3Blob wxSQLite3Database::GetWritableBlob(wxLongLong rowId,
+                const wxString& columnName,
+                const wxString& tableName,
+                const wxString& dbName)
+{
+        return GetBlob(rowId, columnName, tableName, dbName, true);
+}
+
+wxSQLite3Blob wxSQLite3Database::GetBlob(wxLongLong rowId,
+                const wxString& columnName,
+                const wxString& tableName,
+                const wxString& dbName,
+                bool writable)
+{
+#if SQLITE_VERSION_NUMBER >= 3004000
+        wxCharBuffer strColumnName = columnName.ToUTF8();
+        const char* localColumnName = strColumnName;
+        wxCharBuffer strTableName = tableName.ToUTF8();
+        const char* localTableName = strTableName;
+        wxCharBuffer strDbName = dbName.ToUTF8();
+        const char* localDbName = (!dbName.IsEmpty()) ? (const char*) strDbName : (const char*) NULL;
+        int flags = (writable) ? 1 : 0;
+        sqlite3_blob* blobHandle;
+        CheckDatabase();
+        int rc = sqlite3_blob_open((sqlite3*) m_db, localDbName, localTableName, localColumnName, rowId.GetValue(), flags, &blobHandle);
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+        return wxSQLite3Blob(m_db, (void*) blobHandle, writable);
+#else
+        wxUnusedVar(rowId);
+        wxUnusedVar(columnName);
+        wxUnusedVar(tableName);
+        wxUnusedVar(dbName);
+        wxUnusedVar(writable);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOINCBLOB);
+        return NULL;
+#endif
+}
+
+void wxSQLite3Database::Interrupt()
+{
+        CheckDatabase();
+        sqlite3_interrupt((sqlite3*) m_db);
+}
+
+void wxSQLite3Database::SetBusyTimeout(int nMillisecs)
+{
+        CheckDatabase();
+        m_busyTimeoutMs = nMillisecs;
+        sqlite3_busy_timeout((sqlite3*) m_db, m_busyTimeoutMs);
+}
+
+wxString wxSQLite3Database::GetVersion()
+{
+        return wxString::FromUTF8(sqlite3_libversion());
+}
+
+wxString wxSQLite3Database::GetSourceId()
+{
+#if SQLITE_VERSION_NUMBER >= 3006018
+        return wxString::FromUTF8(sqlite3_sourceid());
+#else
+        return wxEmptyString;
+#endif
+}
+
+bool wxSQLite3Database::CompileOptionUsed(const wxString& optionName)
+{
+#if SQLITE_VERSION_NUMBER >= 3006023
+        wxCharBuffer strOption = optionName.ToUTF8();
+        const char* localOption = strOption;
+        return sqlite3_compileoption_used(localOption) == 1;
+#else
+        return false;
+#endif
+}
+
+wxString wxSQLite3Database::GetCompileOptionName(int optionIndex)
+{
+#if SQLITE_VERSION_NUMBER >= 3006023
+        const char* unknownOption = "";
+        const char* optionName = sqlite3_compileoption_get(optionIndex);
+        if (optionName == NULL) {
+                optionName = unknownOption;
+        }
+        return wxString::FromUTF8(optionName);
+#else
+        return wxEmptyString;
+#endif
+}
+
+bool wxSQLite3Database::CreateFunction(const wxString& funcName, int argCount, wxSQLite3ScalarFunction& function)
+{
+        CheckDatabase();
+        wxCharBuffer strFuncName = funcName.ToUTF8();
+        const char* localFuncName = strFuncName;
+        int rc = sqlite3_create_function((sqlite3*) m_db, localFuncName, argCount,
+                                         SQLITE_UTF8, &function,
+                                         (void (*)(sqlite3_context*,int,sqlite3_value**)) wxSQLite3FunctionContext::ExecScalarFunction, NULL, NULL);
+        return rc == SQLITE_OK;
+}
+
+bool wxSQLite3Database::CreateFunction(const wxString& funcName, int argCount, wxSQLite3AggregateFunction& function)
+{
+        CheckDatabase();
+        wxCharBuffer strFuncName = funcName.ToUTF8();
+        const char* localFuncName = strFuncName;
+        int rc = sqlite3_create_function((sqlite3*) m_db, localFuncName, argCount,
+                                         SQLITE_UTF8, &function,
+                                         NULL,
+                                         (void (*)(sqlite3_context*,int,sqlite3_value**)) wxSQLite3FunctionContext::ExecAggregateStep,
+                                         (void (*)(sqlite3_context*)) wxSQLite3FunctionContext::ExecAggregateFinalize);
+        return rc == SQLITE_OK;
+}
+
+bool wxSQLite3Database::SetAuthorizer(wxSQLite3Authorizer& authorizer)
+{
+        CheckDatabase();
+        int rc = sqlite3_set_authorizer((sqlite3*) m_db, wxSQLite3FunctionContext::ExecAuthorizer, &authorizer);
+        return rc == SQLITE_OK;
+}
+
+void wxSQLite3Database::SetCommitHook(wxSQLite3Hook* commitHook)
+{
+        CheckDatabase();
+        if (commitHook) {
+                sqlite3_commit_hook((sqlite3*) m_db, (int(*)(void*)) wxSQLite3FunctionContext::ExecCommitHook, commitHook);
+        } else {
+                sqlite3_commit_hook((sqlite3*) m_db, (int(*)(void*)) NULL, NULL);
+        }
+}
+
+void wxSQLite3Database::SetRollbackHook(wxSQLite3Hook* rollbackHook)
+{
+        CheckDatabase();
+        if (rollbackHook) {
+                sqlite3_rollback_hook((sqlite3*) m_db, (void(*)(void*)) wxSQLite3FunctionContext::ExecRollbackHook, rollbackHook);
+        } else {
+                sqlite3_rollback_hook((sqlite3*) m_db, (void(*)(void*)) NULL, NULL);
+        }
+}
+
+void wxSQLite3Database::SetUpdateHook(wxSQLite3Hook* updateHook)
+{
+        CheckDatabase();
+        if (updateHook) {
+                sqlite3_update_hook((sqlite3*) m_db, (void(*)(void*,int,const char*,const char*, wxsqlite_int64)) wxSQLite3FunctionContext::ExecUpdateHook, updateHook);
+        } else {
+                sqlite3_update_hook((sqlite3*) m_db, (void(*)(void*,int,const char*,const char*, wxsqlite_int64)) NULL, NULL);
+        }
+}
+
+void wxSQLite3Database::SetWriteAheadLogHook(wxSQLite3Hook* walHook)
+{
+#if SQLITE_VERSION_NUMBER >= 3007000
+        CheckDatabase();
+        if (walHook) {
+                walHook->SetDatabase(this);
+                sqlite3_wal_hook((sqlite3*) m_db, (int(*)(void *,sqlite3*,const char*,int)) wxSQLite3FunctionContext::ExecWriteAheadLogHook, walHook);
+        } else {
+                sqlite3_wal_hook((sqlite3*) m_db, (int(*)(void *,sqlite3*,const char*,int)) NULL, NULL);
+        }
+#else
+        wxUnusedVar(walHook);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOWAL);
+#endif
+}
+
+void wxSQLite3Database::WriteAheadLogCheckpoint(const wxString& database, int mode,
+                int* logFrameCount, int* ckptFrameCount)
+{
+#if SQLITE_VERSION_NUMBER >= 3007000
+        CheckDatabase();
+        wxCharBuffer strDatabase = database.ToUTF8();
+        const char* localDatabase = strDatabase;
+#if SQLITE_VERSION_NUMBER >= 3007006
+        int rc = sqlite3_wal_checkpoint_v2((sqlite3*) m_db, localDatabase, mode, logFrameCount, ckptFrameCount);
+#else
+        int rc = sqlite3_wal_checkpoint((sqlite3*) m_db, localDatabase);
+        if (logFrameCount  != NULL) *logFrameCount  = 0;
+        if (ckptFrameCount != NULL) *ckptFrameCount = 0;
+#endif
+
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+#else
+        wxUnusedVar(database);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOWAL);
+#endif
+}
+
+void wxSQLite3Database::AutoWriteAheadLogCheckpoint(int frameCount)
+{
+#if SQLITE_VERSION_NUMBER >= 3007000
+        CheckDatabase();
+        int rc = sqlite3_wal_autocheckpoint((sqlite3*) m_db, frameCount);
+
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+#else
+        wxUnusedVar(frameCount);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOWAL);
+#endif
+}
+
+void wxSQLite3Database::SetCollation(const wxString& collationName, wxSQLite3Collation* collation)
+{
+        CheckDatabase();
+        wxCharBuffer strCollationName = collationName.ToUTF8();
+        const char* localCollationName = strCollationName;
+        int rc;
+        if (collation) {
+                rc = sqlite3_create_collation((sqlite3*) m_db, localCollationName, SQLITE_UTF8, collation, (int(*)(void*,int,const void*,int,const void*)) wxSQLite3Database::ExecComparisonWithCollation);
+        } else {
+                rc = sqlite3_create_collation((sqlite3*) m_db, localCollationName, SQLITE_UTF8, NULL, (int(*)(void*,int,const void*,int,const void*)) NULL);
+        }
+        LOG_DEBUG("sqlite3_create_collation rc=%d", rc);
+}
+
+void wxSQLite3Database::SetCollationNeededCallback()
+{
+        CheckDatabase();
+        int rc = sqlite3_collation_needed((sqlite3*) m_db, this, (void(*)(void*,sqlite3*,int,const char*)) wxSQLite3Database::ExecCollationNeeded);
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+}
+
+void wxSQLite3Database::CheckDatabase()
+{
+        if (!m_db) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NODB);
+        }
+}
+
+void* wxSQLite3Database::Prepare(const char* sql)
+{
+        CheckDatabase();
+
+        const char* tail=0;
+        sqlite3_stmt* stmt;
+
+        int rc = sqlite3_prepare_v2((sqlite3*) m_db, sql, -1, &stmt, &tail);
+
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+
+        return stmt;
+}
+
+/* static */
+int wxSQLite3Database::ExecComparisonWithCollation(void* collation,
+                int len1, const void* text1,
+                int len2, const void* text2)
+{
+        wxString locText1 = wxString::FromUTF8((const char*) text1, (size_t) len1);
+        wxString locText2 = wxString::FromUTF8((const char*) text2, (size_t) len2);
+        return ((wxSQLite3Collation*) collation)->Compare(locText1, locText2);
+}
+
+void wxSQLite3Database::ExecCollationNeeded(void* db, void*, int, const char* collationName)
+{
+        wxString locCollation = wxString::FromUTF8((const char*) collationName);
+        ((wxSQLite3Database*) db)->SetNeededCollation(locCollation);
+}
+
+void wxSQLite3Database::GetMetaData(const wxString& databaseName, const wxString& tableName, const wxString& columnName,
+                                    wxString* dataType, wxString* collation, bool* notNull, bool* primaryKey, bool* autoIncrement)
+{
+#if WXSQLITE3_HAVE_METADATA
+        wxCharBuffer strDatabaseName = databaseName.ToUTF8();
+        const char* localDatabaseName = strDatabaseName;
+        if (databaseName == wxEmptyString) localDatabaseName = NULL;
+        wxCharBuffer strTableName = tableName.ToUTF8();
+        const char* localTableName = strTableName;
+        wxCharBuffer strColumnName = columnName.ToUTF8();
+        const char* localColumnName = strColumnName;
+        const char* localDataType;
+        const char* localCollation;
+        int localNotNull;
+        int localPrimaryKey;
+        int localAutoIncrement;
+        int rc = sqlite3_table_column_metadata((sqlite3*) m_db, localDatabaseName, localTableName, localColumnName,
+                                               &localDataType, &localCollation, &localNotNull, &localPrimaryKey, &localAutoIncrement);
+
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+
+        if (dataType      != NULL) *dataType      = wxString::FromUTF8(localDataType);
+        if (collation     != NULL) *collation     = wxString::FromUTF8(localCollation);
+
+        if (notNull       != NULL) *notNull       = (localNotNull       != 0);
+        if (primaryKey    != NULL) *primaryKey    = (localPrimaryKey    != 0);
+        if (autoIncrement != NULL) *autoIncrement = (localAutoIncrement != 0);
+#else
+        wxUnusedVar(databaseName);
+        wxUnusedVar(tableName);
+        wxUnusedVar(columnName);
+        wxUnusedVar(dataType);
+        wxUnusedVar(collation);
+        wxUnusedVar(notNull);
+        wxUnusedVar(primaryKey);
+        wxUnusedVar(autoIncrement);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOMETADATA);
+#endif
+}
+
+void wxSQLite3Database::LoadExtension(const wxString& fileName, const wxString& entryPoint)
+{
+#if WXSQLITE3_HAVE_LOAD_EXTENSION
+        wxCharBuffer strFileName = fileName.ToUTF8();
+        const char* localFileName = strFileName;
+        wxCharBuffer strEntryPoint = entryPoint.ToUTF8();
+        const char* localEntryPoint = strEntryPoint;
+
+        int rc = sqlite3_load_extension((sqlite3 *) m_db, localFileName, localEntryPoint, NULL);
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+#else
+        wxUnusedVar(fileName);
+        wxUnusedVar(entryPoint);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOLOADEXT);
+#endif
+}
+
+void wxSQLite3Database::EnableLoadExtension(bool enable)
+{
+#if WXSQLITE3_HAVE_LOAD_EXTENSION
+        int onoff = (enable) ? 1 : 0;
+        int rc = sqlite3_enable_load_extension((sqlite3 *) m_db, onoff);
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+#else
+        wxUnusedVar(enable);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOLOADEXT);
+#endif
+}
+
+void wxSQLite3Database::ReKey(const wxString& newKey)
+{
+#if WXSQLITE3_HAVE_CODEC
+        wxCharBuffer strLocalNewKey = newKey.ToUTF8();
+        const char* localNewKey = strLocalNewKey;
+        wxMemoryBuffer binaryNewKey;
+        if (newKey.Length() > 0) {
+                binaryNewKey.AppendData((void*) localNewKey, strlen(localNewKey));
+        }
+        ReKey(binaryNewKey);
+#else
+        wxUnusedVar(newKey);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOCODEC);
+#endif
+}
+
+void wxSQLite3Database::ReKey(const wxMemoryBuffer& newKey)
+{
+#if WXSQLITE3_HAVE_CODEC
+        int rc = sqlite3_rekey((sqlite3*) m_db, newKey.GetData(), (int) newKey.GetDataLen());
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+#else
+        wxUnusedVar(newKey);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOCODEC);
+#endif
+}
+
+int wxSQLite3Database::GetLimit(wxSQLite3LimitType id)
+{
+        int value = -1;
+#if SQLITE_VERSION_NUMBER >= 3005008
+        CheckDatabase();
+        if (id >= WXSQLITE_LIMIT_LENGTH && id <= WXSQLITE_LIMIT_VARIABLE_NUMBER) {
+                value = sqlite3_limit((sqlite3 *) m_db, id, -1);
+        }
+#else
+        wxUnusedVar(id);
+#endif
+        return value;
+}
+
+int wxSQLite3Database::SetLimit(wxSQLite3LimitType id, int newValue)
+{
+        int value = -1;
+#if SQLITE_VERSION_NUMBER >= 3005008
+        CheckDatabase();
+        if (id >= WXSQLITE_LIMIT_LENGTH && id <= WXSQLITE_LIMIT_VARIABLE_NUMBER) {
+                value = sqlite3_limit((sqlite3 *) m_db, id, newValue);
+        }
+#else
+        wxUnusedVar(id);
+        wxUnusedVar(newValue);
+#endif
+        return value;
+}
+
+static const wxChar* limitCodeString[] = {
+        wxT("SQLITE_LIMIT_LENGTH"),              wxT("SQLITE_LIMIT_SQL_LENGTH"),
+        wxT("SQLITE_LIMIT_COLUMN"),              wxT("SQLITE_LIMIT_EXPR_DEPTH"),
+        wxT("SQLITE_LIMIT_COMPOUND_SELECT"),     wxT("SQLITE_LIMIT_VDBE_OP"),
+        wxT("SQLITE_LIMIT_FUNCTION_ARG"),        wxT("SQLITE_LIMIT_ATTACHED"),
+        wxT("SQLITE_LIMIT_LIKE_PATTERN_LENGTH"), wxT("SQLITE_LIMIT_VARIABLE_NUMBER"),
+        wxT("SQLITE_LIMIT_TRIGGER_DEPTH")
+};
+
+
+/* static */
+wxString wxSQLite3Database::LimitTypeToString(wxSQLite3LimitType type)
+{
+        const wxChar* limitString = wxT("Unknown");
+        if (type >= WXSQLITE_LIMIT_LENGTH && type <= WXSQLITE_LIMIT_VARIABLE_NUMBER) {
+                limitString = limitCodeString[type];
+        }
+        return wxString(limitString);
+}
+
+/* static */
+void wxSQLite3Database::InitializeSQLite()
+{
+#if SQLITE_VERSION_NUMBER >= 3006000
+        int rc = sqlite3_initialize();
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_INITIALIZE);
+        }
+#endif
+}
+
+/* static */
+void wxSQLite3Database::ShutdownSQLite()
+{
+#if SQLITE_VERSION_NUMBER >= 3006000
+        int rc = sqlite3_shutdown();
+        if (rc != SQLITE_OK) {
+                throw wxSQLite3Exception(rc, wxERRMSG_SHUTDOWN);
+        }
+#endif
+}
+
+/* static */
+bool wxSQLite3Database::Randomness(int n, wxMemoryBuffer& random)
+{
+        bool ok = false;
+#if SQLITE_VERSION_NUMBER >= 3005008
+        if (n > 0) {
+                void* buffer = random.GetWriteBuf(n);
+                sqlite3_randomness(n, buffer);
+                random.UngetWriteBuf(n);
+                ok = true;
+        }
+#else
+        wxUnusedVar(n);
+        wxUnusedVar(random);
+#endif
+        return ok;
+}
+
+// ----------------------------------------------------------------------------
+// wxSQLite3FunctionContext: class providing the function context
+//                           for user defined functions
+// ----------------------------------------------------------------------------
+
+int wxSQLite3FunctionContext::GetArgCount()
+{
+        return m_argc;
+}
+
+int wxSQLite3FunctionContext::GetArgType(int argIndex)
+{
+        if (argIndex >= 0 && argIndex < m_argc) {
+                return sqlite3_value_type((sqlite3_value*) m_argv[argIndex]);
+        } else {
+                return SQLITE_NULL;
+        }
+}
+
+bool wxSQLite3FunctionContext::IsNull(int argIndex)
+{
+        if (argIndex >= 0 && argIndex < m_argc) {
+                return sqlite3_value_type((sqlite3_value*) m_argv[argIndex]) == SQLITE_NULL;
+        } else {
+                return true;
+        }
+}
+
+int wxSQLite3FunctionContext::GetInt(int argIndex, int nullValue)
+{
+        if (argIndex >= 0 && argIndex < m_argc) {
+                if (!IsNull(argIndex)) {
+                        return sqlite3_value_int((sqlite3_value*) m_argv[argIndex]);
+                } else {
+                        return nullValue;
+                }
+        } else {
+                return nullValue;
+        }
+}
+
+wxLongLong wxSQLite3FunctionContext::GetInt64(int argIndex, wxLongLong nullValue)
+{
+        if (argIndex >= 0 && argIndex < m_argc) {
+                if (!IsNull(argIndex)) {
+                        return wxLongLong(sqlite3_value_int64((sqlite3_value*) m_argv[argIndex]));
+                } else {
+                        return nullValue;
+                }
+        } else {
+                return nullValue;
+        }
+}
+
+double wxSQLite3FunctionContext::GetDouble(int argIndex, double nullValue)
+{
+        if (argIndex >= 0 && argIndex < m_argc) {
+                if (!IsNull(argIndex)) {
+                        return sqlite3_value_double((sqlite3_value*) m_argv[argIndex]);
+                } else {
+                        return nullValue;
+                }
+        } else {
+                return nullValue;
+        }
+}
+
+wxString wxSQLite3FunctionContext::GetString(int argIndex, const wxString& nullValue)
+{
+        if (argIndex >= 0 && argIndex < m_argc) {
+                if (!IsNull(argIndex)) {
+                        const char* localValue = (const char*) sqlite3_value_text((sqlite3_value*) m_argv[argIndex]);
+                        return wxString::FromUTF8(localValue);
+                } else {
+                        return nullValue;
+                }
+        } else {
+                return nullValue;
+        }
+}
+
+wxMemoryBuffer& wxSQLite3FunctionContext::GetBlob(int argIndex, wxMemoryBuffer& buffer)
+{
+        if (argIndex >= 0 && argIndex < m_argc) {
+                if (!IsNull(argIndex)) {
+                        int len = sqlite3_value_bytes((sqlite3_value*) m_argv[argIndex]);
+                        const void* blob = sqlite3_value_blob((sqlite3_value*) m_argv[argIndex]);
+                        buffer.AppendData((void*) blob, (size_t) len);
+                }
+        }
+        return buffer;
+}
+
+void wxSQLite3FunctionContext::SetResult(int value)
+{
+        sqlite3_result_int((sqlite3_context*) m_ctx, value);
+}
+
+void wxSQLite3FunctionContext::SetResult(wxLongLong value)
+{
+        sqlite3_result_int64((sqlite3_context*) m_ctx, value.GetValue());
+}
+
+void wxSQLite3FunctionContext::SetResult(double value)
+{
+        sqlite3_result_double((sqlite3_context*) m_ctx, value);
+}
+
+void wxSQLite3FunctionContext::SetResult(const wxString& value)
+{
+        wxCharBuffer strValue = value.ToUTF8();
+        const char* localValue = strValue;
+        sqlite3_result_text((sqlite3_context*) m_ctx, localValue, -1, SQLITE_TRANSIENT);
+}
+
+void wxSQLite3FunctionContext::SetResult(unsigned char* value, int len)
+{
+        sqlite3_result_blob((sqlite3_context*) m_ctx, value, len, SQLITE_TRANSIENT);
+}
+
+void wxSQLite3FunctionContext::SetResult(const wxMemoryBuffer& buffer)
+{
+        sqlite3_result_blob((sqlite3_context*) m_ctx, buffer.GetData(), (int) buffer.GetDataLen(), SQLITE_TRANSIENT);
+}
+
+void wxSQLite3FunctionContext::SetResultNull()
+{
+        sqlite3_result_null((sqlite3_context*) m_ctx);
+}
+
+void wxSQLite3FunctionContext::SetResultZeroBlob(int blobSize)
+{
+#if SQLITE_VERSION_NUMBER >= 3004000
+        sqlite3_result_zeroblob((sqlite3_context*) m_ctx, blobSize);
+#endif
+}
+
+void wxSQLite3FunctionContext::SetResultArg(int argIndex)
+{
+        if (argIndex >= 0 && argIndex < m_argc) {
+                sqlite3_result_value((sqlite3_context*) m_ctx, (sqlite3_value*) m_argv[argIndex]);
+        } else {
+                sqlite3_result_null((sqlite3_context*) m_ctx);
+        }
+}
+
+void wxSQLite3FunctionContext::SetResultError(const wxString& errmsg)
+{
+        wxCharBuffer strErrmsg = errmsg.ToUTF8();
+        const char* localErrmsg = strErrmsg;
+        sqlite3_result_error((sqlite3_context*) m_ctx, localErrmsg, -1);
+}
+
+int wxSQLite3FunctionContext::GetAggregateCount()
+{
+        if (m_isAggregate) {
+                return m_count;
+        } else {
+                return 0;
+        }
+}
+
+void* wxSQLite3FunctionContext::GetAggregateStruct(int len)
+{
+        if (m_isAggregate) {
+                return sqlite3_aggregate_context((sqlite3_context*) m_ctx, len);
+        } else {
+                return NULL;
+        }
+}
+
+/* static */
+void wxSQLite3FunctionContext::ExecScalarFunction(void* ctx, int argc, void** argv)
+{
+        wxSQLite3FunctionContext context(ctx, false, argc, argv);
+        wxSQLite3ScalarFunction* func = (wxSQLite3ScalarFunction*) sqlite3_user_data((sqlite3_context*) ctx);
+        func->Execute(context);
+}
+
+/* static */
+void wxSQLite3FunctionContext::ExecAggregateStep(void* ctx, int argc, void** argv)
+{
+        wxSQLite3FunctionContext context(ctx, true, argc, argv);
+        wxSQLite3AggregateFunction* func = (wxSQLite3AggregateFunction*) sqlite3_user_data((sqlite3_context*) ctx);
+        func->m_count++;
+        context.m_count = func->m_count;
+        func->Aggregate(context);
+}
+
+/* static */
+void wxSQLite3FunctionContext::ExecAggregateFinalize(void* ctx)
+{
+        wxSQLite3FunctionContext context(ctx, true, 0, NULL);
+        wxSQLite3AggregateFunction* func = (wxSQLite3AggregateFunction*) sqlite3_user_data((sqlite3_context*) ctx);
+        context.m_count = func->m_count;
+        func->Finalize(context);
+}
+
+/* static */
+int wxSQLite3FunctionContext::ExecAuthorizer(void* func, int type,
+                const char* arg1, const char* arg2,
+                const char* arg3, const char* arg4)
+{
+        wxString locArg1 = wxString::FromUTF8(arg1);
+        wxString locArg2 = wxString::FromUTF8(arg2);
+        wxString locArg3 = wxString::FromUTF8(arg3);
+        wxString locArg4 = wxString::FromUTF8(arg4);
+        wxSQLite3Authorizer::wxAuthorizationCode localType = (wxSQLite3Authorizer::wxAuthorizationCode) type;
+        return (int) ((wxSQLite3Authorizer*) func)->Authorize(localType, locArg1, locArg2, locArg3, locArg3);
+}
+
+/* static */
+int wxSQLite3FunctionContext::ExecCommitHook(void* hook)
+{
+        return (int) ((wxSQLite3Hook*) hook)->CommitCallback();
+}
+
+/* static */
+void wxSQLite3FunctionContext::ExecRollbackHook(void* hook)
+{
+        ((wxSQLite3Hook*) hook)->RollbackCallback();
+}
+
+/* static */
+void wxSQLite3FunctionContext::ExecUpdateHook(void* hook, int type,
+                const char* database, const char* table,
+                wxsqlite_int64 rowid)
+{
+        wxString locDatabase = wxString::FromUTF8(database);
+        wxString locTable = wxString::FromUTF8(table);
+        wxSQLite3Hook::wxUpdateType locType = (wxSQLite3Hook::wxUpdateType) type;
+        wxLongLong locRowid = rowid;
+        ((wxSQLite3Hook*) hook)->UpdateCallback(locType, locDatabase, locTable, locRowid);
+}
+
+wxSQLite3FunctionContext::wxSQLite3FunctionContext(void* ctx, bool isAggregate, int argc, void** argv)
+        : m_ctx(ctx), m_isAggregate(isAggregate), m_count(0), m_argc(argc), m_argv(argv)
+{
+}
+
+/* static */
+int wxSQLite3FunctionContext::ExecWriteAheadLogHook(void* hook, void* dbHandle,
+                const char* database, int numPages)
+{
+        wxString locDatabase = wxString::FromUTF8(database);
+        wxUnusedVar(dbHandle);
+        return (int) ((wxSQLite3Hook*) hook)->WriteAheadLogCallback(locDatabase, numPages);
+}
+
+static const wxChar* authCodeString[] = {
+        wxT("SQLITE_COPY"),              wxT("SQLITE_CREATE_INDEX"),      wxT("SQLITE_CREATE_TABLE"),
+        wxT("SQLITE_CREATE_TEMP_INDEX"), wxT("SQLITE_CREATE_TEMP_TABLE"), wxT("SQLITE_CREATE_TEMP_TRIGGER"),
+        wxT("SQLITE_CREATE_TEMP_VIEW"),  wxT("SQLITE_CREATE_TRIGGER"),    wxT("SQLITE_CREATE_VIEW"),
+        wxT("SQLITE_DELETE"),            wxT("SQLITE_DROP_INDEX"),        wxT("SQLITE_DROP_TABLE"),
+        wxT("SQLITE_DROP_TEMP_INDEX"),   wxT("SQLITE_DROP_TEMP_TABLE"),   wxT("SQLITE_DROP_TEMP_TRIGGER"),
+        wxT("SQLITE_DROP_TEMP_VIEW"),    wxT("SQLITE_DROP_TRIGGER"),      wxT("SQLITE_DROP_VIEW"),
+        wxT("SQLITE_INSERT"),            wxT("SQLITE_PRAGMA"),            wxT("SQLITE_READ"),
+        wxT("SQLITE_SELECT"),            wxT("SQLITE_TRANSACTION"),       wxT("SQLITE_UPDATE"),
+        wxT("SQLITE_ATTACH"),            wxT("SQLITE_DETACH"),            wxT("SQLITE_ALTER_TABLE"),
+        wxT("SQLITE_REINDEX"),           wxT("SQLITE_ANALYZE"),           wxT("SQLITE_CREATE_VTABLE"),
+        wxT("SQLITE_DROP_VTABLE"),       wxT("SQLITE_FUNCTION"),          wxT("SQLITE_SAVEPOINT")
+};
+
+
+/* static */
+wxString wxSQLite3Authorizer::AuthorizationCodeToString(wxSQLite3Authorizer::wxAuthorizationCode type)
+{
+        const wxChar* authString = wxT("Unknown");
+        if (type >= SQLITE_COPY && type <= SQLITE_MAX_CODE) {
+                authString = authCodeString[type];
+        }
+        return wxString(authString);
+}
+
+// ----------------------------------------------------------------------------
+// wxSQLite3Transaction
+// ----------------------------------------------------------------------------
+
+wxSQLite3Transaction::wxSQLite3Transaction(wxSQLite3Database* db, wxSQLite3TransactionType transactionType)
+{
+        assert(db != NULL);
+        m_database = db;
+        try {
+                m_database->Begin(transactionType);
+        } catch (...) {
+                m_database = NULL; // Flag that transaction is not active
+        }
+}
+
+wxSQLite3Transaction::~wxSQLite3Transaction()
+{
+        if (m_database != NULL) {
+                try  {
+                        m_database->Rollback();
+                }catch (wxSQLite3Exception& x) {
+                        LOG_ERROR("wxSQLite3", "Cleaning up wxSQLite3Transaction failed: " << x.GetMessage());
+                }
+        }
+}
+
+void wxSQLite3Transaction::Commit()
+{
+        try {
+                m_database->Commit();
+        } catch (...) {
+                m_database->Rollback();
+        }
+        m_database = NULL;
+}
+
+void wxSQLite3Transaction::Rollback()
+{
+        try {
+                m_database->Rollback();
+        } catch (...) {
+                m_database->Rollback();
+        }
+        m_database = NULL;
+}
+
+// --- User defined function classes
+
+#if wxUSE_REGEX
+
+wxSQLite3RegExpOperator::wxSQLite3RegExpOperator(int flags) : m_flags(flags)
+{
+}
+
+wxSQLite3RegExpOperator::~wxSQLite3RegExpOperator()
+{
+}
+
+void wxSQLite3RegExpOperator::Execute(wxSQLite3FunctionContext& ctx)
+{
+        int argCount = ctx.GetArgCount();
+        if (argCount == 2) {
+                wxString exprStr = ctx.GetString(0);
+                wxString textStr = ctx.GetString(1);
+                if (!m_exprStr.IsSameAs(exprStr)) {
+                        m_exprStr = exprStr;
+                        m_regEx.Compile(m_exprStr, m_flags);
+                }
+                if (m_regEx.IsValid()) {
+                        int rc = (m_regEx.Matches(textStr)) ? 1 : 0;
+                        ctx.SetResult(rc);
+                } else {
+                        ctx.SetResultError(wxString(_("Regular expression invalid: '"))+exprStr+_T("'."));
+                }
+        } else {
+                ctx.SetResultError(wxString::Format(_("REGEXP called with wrong number of arguments: %d instead of 2."), (int) argCount));
+        }
+}
+
+#endif
+
+// --- Support for named collections
+
+#if WXSQLITE3_USE_NAMED_COLLECTIONS
+
+// The following code is based on the SQLite test_intarray source code.
+
+#include <string.h>
+#include <assert.h>
+
+/// Definition of the sqlite3_intarray object (internal)
+struct sqlite3_intarray {
+        int n;                    // Number of elements in the array
+        sqlite3_int64* a;         // Contents of the array
+        void (*xFree)(void*);     // Function used to free a[]
+};
+
+// Objects used internally by the virtual table implementation
+typedef struct intarray_vtab intarray_vtab;
+typedef struct intarray_cursor intarray_cursor;
+
+/// Definition of intarray table object (internal)
+struct intarray_vtab {
+        sqlite3_vtab base;            // Base class
+        sqlite3_intarray* pContent;   // Content of the integer array
+};
+
+/// Definition of  intarray cursor object (internal)
+struct intarray_cursor {
+        sqlite3_vtab_cursor base;    // Base class
+        int i;                       // Current cursor position
+};
+
+// Free an sqlite3_intarray object.
+static void intarrayFree(sqlite3_intarray* p)
+{
+        if (p->a != NULL && p->xFree) {
+                p->xFree(p->a);
+        }
+        sqlite3_free(p);
+}
+
+// Table destructor for the intarray module.
+static int intarrayDestroy(sqlite3_vtab* p)
+{
+        intarray_vtab* pVtab = (intarray_vtab*)p;
+        sqlite3_free(pVtab);
+        return 0;
+}
+
+// Table constructor for the intarray module.
+static int intarrayCreate(sqlite3* db,                  // Database where module is created
+                          void* pAux,                   // clientdata for the module
+                          int /*argc*/,                 // Number of arguments
+                          const char* const* /*argv*/,  // Value for all arguments
+                          sqlite3_vtab** ppVtab,        // Write the new virtual table object here
+                          char** /*pzErr*/)             // Put error message text here
+{
+        int rc = SQLITE_NOMEM;
+        intarray_vtab* pVtab = (intarray_vtab*) sqlite3_malloc(sizeof(intarray_vtab));
+
+        if (pVtab) {
+                memset(pVtab, 0, sizeof(intarray_vtab));
+                pVtab->pContent = (sqlite3_intarray*)pAux;
+                rc = sqlite3_declare_vtab(db, "CREATE TABLE x(value INTEGER PRIMARY KEY)");
+        }
+        *ppVtab = (sqlite3_vtab*)pVtab;
+        return rc;
+}
+
+// Open a new cursor on the intarray table.
+static int intarrayOpen(sqlite3_vtab* /*pVTab*/, sqlite3_vtab_cursor** ppCursor)
+{
+        int rc = SQLITE_NOMEM;
+        intarray_cursor* pCur = (intarray_cursor*) sqlite3_malloc(sizeof(intarray_cursor));
+        if (pCur) {
+                memset(pCur, 0, sizeof(intarray_cursor));
+                *ppCursor = (sqlite3_vtab_cursor *)pCur;
+                rc = SQLITE_OK;
+        }
+        return rc;
+}
+
+// Close a intarray table cursor.
+static int intarrayClose(sqlite3_vtab_cursor* cur)
+{
+        intarray_cursor* pCur = (intarray_cursor*)cur;
+        sqlite3_free(pCur);
+        return SQLITE_OK;
+}
+
+// Retrieve a column of data.
+static int intarrayColumn(sqlite3_vtab_cursor* cur, sqlite3_context* ctx, int /*i*/)
+{
+        intarray_cursor* pCur = (intarray_cursor*)cur;
+        intarray_vtab* pVtab = (intarray_vtab*)cur->pVtab;
+        if (pCur->i >= 0 && pCur->i < pVtab->pContent->n) {
+                sqlite3_result_int64(ctx, pVtab->pContent->a[pCur->i]);
+        }
+        return SQLITE_OK;
+}
+
+// Retrieve the current rowid.
+static int intarrayRowid(sqlite3_vtab_cursor* cur, sqlite_int64* pRowid)
+{
+        intarray_cursor* pCur = (intarray_cursor*)cur;
+        *pRowid = pCur->i;
+        return SQLITE_OK;
+}
+
+static int intarrayEof(sqlite3_vtab_cursor* cur)
+{
+        intarray_cursor* pCur = (intarray_cursor*)cur;
+        intarray_vtab* pVtab = (intarray_vtab*)cur->pVtab;
+        return pCur->i >= pVtab->pContent->n;
+}
+
+// Advance the cursor to the next row.
+static int intarrayNext(sqlite3_vtab_cursor* cur)
+{
+        intarray_cursor* pCur = (intarray_cursor*)cur;
+        pCur->i++;
+        return SQLITE_OK;
+}
+
+// Reset a intarray table cursor.
+static int intarrayFilter(sqlite3_vtab_cursor* pVtabCursor,
+                          int /*idxNum*/, const char* /*idxStr*/,
+                          int /*argc*/, sqlite3_value** /*argv*/)
+{
+        intarray_cursor *pCur = (intarray_cursor *)pVtabCursor;
+        pCur->i = 0;
+        return SQLITE_OK;
+}
+
+// Analyse the WHERE condition.
+static int intarrayBestIndex(sqlite3_vtab* /*tab*/, sqlite3_index_info* /*pIdxInfo*/)
+{
+        return SQLITE_OK;
+}
+
+// Definition of a virtual table module for integer collections
+static sqlite3_module intarrayModule = {
+        0,                           // iVersion
+        intarrayCreate,              // xCreate - create a new virtual table
+        intarrayCreate,              // xConnect - connect to an existing vtab
+        intarrayBestIndex,           // xBestIndex - find the best query index
+        intarrayDestroy,             // xDisconnect - disconnect a vtab
+        intarrayDestroy,             // xDestroy - destroy a vtab
+        intarrayOpen,                // xOpen - open a cursor
+        intarrayClose,               // xClose - close a cursor
+        intarrayFilter,              // xFilter - configure scan constraints
+        intarrayNext,                // xNext - advance a cursor
+        intarrayEof,                 // xEof
+        intarrayColumn,              // xColumn - read data
+        intarrayRowid,               // xRowid - read data
+        0,                           // xUpdate
+        0,                           // xBegin
+        0,                           // xSync
+        0,                           // xCommit
+        0,                           // xRollback
+        0,                           // xFindMethod
+        0,                           // xRename
+};
+
+/// Definition of the sqlite3_chararray object (internal)
+struct sqlite3_chararray {
+        int n;                    // Number of elements in the array
+        char** a;                 // Contents of the array
+        void (*xFree)(void*);     // Function used to free a[]
+};
+
+// Objects used internally by the virtual table implementation
+typedef struct chararray_vtab chararray_vtab;
+typedef struct chararray_cursor chararray_cursor;
+
+/// Definition of chararray table object (internal)
+struct chararray_vtab {
+        sqlite3_vtab base;            // Base class
+        sqlite3_chararray* pContent;  // Content of the char array
+};
+
+/// Definition of chararray cursor object (internal)
+struct chararray_cursor {
+        sqlite3_vtab_cursor base;    // Base class
+        int i;                       // Current cursor position
+};
+
+// Free an sqlite3_chararray object.
+static void chararrayFree(sqlite3_chararray* p)
+{
+        if (p->a != NULL && p->xFree) {
+                int j;
+                for (j = 0; j < p->n; ++j) {
+                        p->xFree(p->a[j]);
+                }
+                p->xFree(p->a);
+        }
+        sqlite3_free(p);
+}
+
+// Table destructor for the chararray module.
+static int chararrayDestroy(sqlite3_vtab* p)
+{
+        chararray_vtab* pVtab = (chararray_vtab*)p;
+        sqlite3_free(pVtab);
+        return 0;
+}
+
+// Table constructor for the chararray module.
+static int chararrayCreate(sqlite3* db,                  // Database where module is created
+                           void* pAux,                   // clientdata for the module
+                           int /*argc*/,                 // Number of arguments
+                           const char* const* /*argv*/,  // Value for all arguments
+                           sqlite3_vtab** ppVtab,        // Write the new virtual table object here
+                           char** /*pzErr*/)             // Put error message text here
+{
+        int rc = SQLITE_NOMEM;
+        chararray_vtab* pVtab = (chararray_vtab*) sqlite3_malloc(sizeof(chararray_vtab));
+
+        if (pVtab) {
+                memset(pVtab, 0, sizeof(chararray_vtab));
+                pVtab->pContent = (sqlite3_chararray*)pAux;
+                rc = sqlite3_declare_vtab(db, "CREATE TABLE x(value CHAR PRIMARY KEY)");
+        }
+        *ppVtab = (sqlite3_vtab*)pVtab;
+        return rc;
+}
+
+// Open a new cursor on the chararray table.
+static int chararrayOpen(sqlite3_vtab* /*pVTab*/, sqlite3_vtab_cursor** ppCursor)
+{
+        int rc = SQLITE_NOMEM;
+        chararray_cursor* pCur = (chararray_cursor*) sqlite3_malloc(sizeof(chararray_cursor));
+        if (pCur) {
+                memset(pCur, 0, sizeof(chararray_cursor));
+                *ppCursor = (sqlite3_vtab_cursor *)pCur;
+                rc = SQLITE_OK;
+        }
+        return rc;
+}
+
+// Close a chararray table cursor.
+static int chararrayClose(sqlite3_vtab_cursor* cur)
+{
+        chararray_cursor* pCur = (chararray_cursor*)cur;
+        sqlite3_free(pCur);
+        return SQLITE_OK;
+}
+
+// Retrieve a column of data.
+static int chararrayColumn(sqlite3_vtab_cursor* cur, sqlite3_context* ctx, int /*i*/)
+{
+        chararray_cursor* pCur = (chararray_cursor*)cur;
+        chararray_vtab* pVtab = (chararray_vtab*)cur->pVtab;
+        if (pCur->i >= 0 && pCur->i < pVtab->pContent->n) {
+                sqlite3_result_text(ctx, pVtab->pContent->a[pCur->i], -1, SQLITE_STATIC);
+        }
+        return SQLITE_OK;
+}
+
+// Retrieve the current rowid.
+static int chararrayRowid(sqlite3_vtab_cursor* cur, sqlite_int64* pRowid)
+{
+        chararray_cursor* pCur = (chararray_cursor*)cur;
+        *pRowid = pCur->i;
+        return SQLITE_OK;
+}
+
+static int chararrayEof(sqlite3_vtab_cursor* cur)
+{
+        chararray_cursor* pCur = (chararray_cursor*)cur;
+        chararray_vtab* pVtab = (chararray_vtab*)cur->pVtab;
+        return pCur->i >= pVtab->pContent->n;
+}
+
+// Advance the cursor to the next row.
+static int chararrayNext(sqlite3_vtab_cursor* cur)
+{
+        chararray_cursor* pCur = (chararray_cursor*)cur;
+        pCur->i++;
+        return SQLITE_OK;
+}
+
+// Reset a chararray table cursor.
+static int chararrayFilter(sqlite3_vtab_cursor* pVtabCursor,
+                           int /*idxNum*/, const char* /*idxStr*/,
+                           int /*argc*/, sqlite3_value** /*argv*/)
+{
+        chararray_cursor *pCur = (chararray_cursor *)pVtabCursor;
+        pCur->i = 0;
+        return SQLITE_OK;
+}
+
+// Analyse the WHERE condition.
+static int chararrayBestIndex(sqlite3_vtab* /*tab*/, sqlite3_index_info* /*pIdxInfo*/)
+{
+        return SQLITE_OK;
+}
+
+// Definition of a virtual table module for string collections
+static sqlite3_module chararrayModule = {
+        0,                           // iVersion
+        chararrayCreate,             // xCreate - create a new virtual table
+        chararrayCreate,             // xConnect - connect to an existing vtab
+        chararrayBestIndex,          // xBestIndex - find the best query index
+        chararrayDestroy,            // xDisconnect - disconnect a vtab
+        chararrayDestroy,            // xDestroy - destroy a vtab
+        chararrayOpen,               // xOpen - open a cursor
+        chararrayClose,              // xClose - close a cursor
+        chararrayFilter,             // xFilter - configure scan constraints
+        chararrayNext,               // xNext - advance a cursor
+        chararrayEof,                // xEof
+        chararrayColumn,             // xColumn - read data
+        chararrayRowid,              // xRowid - read data
+        0,                           // xUpdate
+        0,                           // xBegin
+        0,                           // xSync
+        0,                           // xCommit
+        0,                           // xRollback
+        0,                           // xFindMethod
+        0,                           // xRename
+};
+
+#endif // WXSQLITE3_USE_NAMED_COLLECTIONS
+
+wxSQLite3NamedCollection::wxSQLite3NamedCollection()
+{
+        m_name = wxEmptyString;
+        m_data = NULL;
+}
+
+wxSQLite3NamedCollection::wxSQLite3NamedCollection(const wxString& collectionName, void* collectionData)
+{
+        m_name = collectionName;
+        m_data = collectionData;
+}
+
+wxSQLite3NamedCollection::wxSQLite3NamedCollection(const wxSQLite3NamedCollection& collection)
+        : m_name(collection.m_name), m_data(collection.m_data)
+{
+}
+
+wxSQLite3NamedCollection&
+wxSQLite3NamedCollection::operator=(const wxSQLite3NamedCollection& collection)
+{
+        if (this != &collection) {
+                m_name = collection.m_name;
+                m_data = collection.m_data;
+        }
+        return *this;
+}
+
+wxSQLite3NamedCollection::~wxSQLite3NamedCollection()
+{
+}
+
+wxSQLite3IntegerCollection::wxSQLite3IntegerCollection()
+        : wxSQLite3NamedCollection(wxEmptyString, NULL)
+{
+}
+
+wxSQLite3IntegerCollection::wxSQLite3IntegerCollection(const wxSQLite3IntegerCollection& collection)
+        : wxSQLite3NamedCollection(collection)
+{
+}
+
+wxSQLite3IntegerCollection&
+wxSQLite3IntegerCollection::operator=(const wxSQLite3IntegerCollection& collection)
+{
+        if (this != &collection) {
+                wxSQLite3NamedCollection::operator=(collection);
+        }
+        return *this;
+}
+
+wxSQLite3IntegerCollection::wxSQLite3IntegerCollection(const wxString& collectionName, void* collectionData)
+        : wxSQLite3NamedCollection(collectionName, collectionData)
+{
+}
+
+wxSQLite3IntegerCollection::~wxSQLite3IntegerCollection()
+{
+}
+
+void
+wxSQLite3IntegerCollection::Bind(const wxArrayInt& integerCollection)
+{
+        size_t n = integerCollection.Count();
+        sqlite3_intarray* pIntArray = (sqlite3_intarray*) m_data;
+        if (m_data != NULL) {
+                if (pIntArray->a != NULL && pIntArray->xFree) {
+                        pIntArray->xFree(pIntArray->a);
+                }
+        }
+        pIntArray->n = n;
+        if (n > 0) {
+                pIntArray->a = (sqlite3_int64*) sqlite3_malloc(sizeof(sqlite3_int64)*n);
+                pIntArray->xFree = sqlite3_free;
+        } else {
+                pIntArray->a = NULL;
+                pIntArray->xFree = NULL;
+        }
+
+        size_t j;
+        for (j = 0; j < n; ++j) {
+                pIntArray->a[j] = integerCollection[j];
+        }
+}
+
+void
+wxSQLite3IntegerCollection::Bind(int n, int* integerCollection)
+{
+        sqlite3_intarray* pIntArray = (sqlite3_intarray*) m_data;
+        if (m_data != NULL) {
+                if (pIntArray->a != NULL && pIntArray->xFree) {
+                        pIntArray->xFree(pIntArray->a);
+                }
+        }
+        pIntArray->n = n;
+        if (n > 0) {
+                pIntArray->a = (sqlite3_int64*) sqlite3_malloc(sizeof(sqlite3_int64)*n);
+                pIntArray->xFree = sqlite3_free;
+        } else {
+                pIntArray->a = NULL;
+                pIntArray->xFree = NULL;
+        }
+
+        int j;
+        for (j = 0; j < n; ++j) {
+                pIntArray->a[j] = integerCollection[j];
+        }
+}
+
+wxSQLite3IntegerCollection
+wxSQLite3Database::CreateIntegerCollection(const wxString& collectionName)
+{
+#if WXSQLITE3_USE_NAMED_COLLECTIONS
+        int rc = SQLITE_OK;
+        wxCharBuffer strCollectionName = collectionName.ToUTF8();
+        const char* zName = strCollectionName;
+        sqlite3_intarray* p = (sqlite3_intarray*) sqlite3_malloc( sizeof(*p) );
+        if (p == 0) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOMEM);
+        }
+        p->n = 0;
+        p->a= NULL;
+        p->xFree = NULL;
+        rc = sqlite3_create_module_v2((sqlite3*)m_db, zName, &intarrayModule, p, (void(*)(void*))intarrayFree);
+        if (rc == SQLITE_OK) {
+                wxSQLite3StatementBuffer zBuffer;
+                const char* zSql = zBuffer.Format("CREATE VIRTUAL TABLE temp.%Q USING %Q", zName, zName);
+                rc = sqlite3_exec((sqlite3*)m_db, zSql, 0, 0, 0);
+        }
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+        return wxSQLite3IntegerCollection(collectionName, p);
+#else
+        wxUnusedVar(collectionName);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOCOLLECTIONS);
+#endif // WXSQLITE3_USE_NAMED_COLLECTIONS
+}
+
+wxSQLite3StringCollection::wxSQLite3StringCollection()
+        : wxSQLite3NamedCollection(wxEmptyString, NULL)
+{
+}
+
+wxSQLite3StringCollection::wxSQLite3StringCollection(const wxSQLite3StringCollection& collection)
+        : wxSQLite3NamedCollection(collection)
+{
+}
+
+wxSQLite3StringCollection&
+wxSQLite3StringCollection::operator=(const wxSQLite3StringCollection& collection)
+{
+        if (this != &collection) {
+                wxSQLite3StringCollection::operator=(collection);
+        }
+        return *this;
+}
+
+wxSQLite3StringCollection::wxSQLite3StringCollection(const wxString& collectionName, void* collectionData)
+        : wxSQLite3NamedCollection(collectionName, collectionData)
+{
+}
+
+wxSQLite3StringCollection::~wxSQLite3StringCollection()
+{
+}
+
+void
+wxSQLite3StringCollection::Bind(const wxArrayString& stringCollection)
+{
+        size_t n = stringCollection.Count();
+        sqlite3_chararray* pCharArray = (sqlite3_chararray*) m_data;
+        if (m_data != NULL) {
+                if (pCharArray->a != NULL && pCharArray->xFree) {
+                        pCharArray->xFree(pCharArray->a);
+                }
+        }
+        pCharArray->n = n;
+        if (n > 0) {
+                pCharArray->a = (char**) sqlite3_malloc(sizeof(char*)*n);
+                pCharArray->xFree = sqlite3_free;
+        } else {
+                pCharArray->a = NULL;
+                pCharArray->xFree = NULL;
+        }
+
+        size_t j;
+        for (j = 0; j < n; ++j) {
+                wxCharBuffer strValue = stringCollection[j].ToUTF8();
+                const char* zValue = strValue;
+                size_t k = strlen(zValue) + 1;
+                pCharArray->a[j] = (char*) sqlite3_malloc(sizeof(char)*k);
+                strcpy(pCharArray->a[j], zValue);
+        }
+}
+
+wxSQLite3StringCollection
+wxSQLite3Database::CreateStringCollection(const wxString& collectionName)
+{
+#if WXSQLITE3_USE_NAMED_COLLECTIONS
+        int rc = SQLITE_OK;
+        wxCharBuffer strCollectionName = collectionName.ToUTF8();
+        const char* zName = strCollectionName;
+        sqlite3_chararray* p = (sqlite3_chararray*) sqlite3_malloc( sizeof(*p) );
+        if (p == 0) {
+                throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOMEM);
+        }
+        p->n = 0;
+        p->a= NULL;
+        p->xFree = NULL;
+        rc = sqlite3_create_module_v2((sqlite3*)m_db, zName, &chararrayModule, p, (void(*)(void*))chararrayFree);
+        if (rc == SQLITE_OK) {
+                wxSQLite3StatementBuffer zBuffer;
+                const char* zSql = zBuffer.Format("CREATE VIRTUAL TABLE temp.%Q USING %Q", zName, zName);
+                rc = sqlite3_exec((sqlite3*)m_db, zSql, 0, 0, 0);
+        }
+        if (rc != SQLITE_OK) {
+                const char* localError = sqlite3_errmsg((sqlite3*) m_db);
+                throw wxSQLite3Exception(rc, wxString::FromUTF8(localError));
+        }
+        return wxSQLite3StringCollection(collectionName, p);
+#else
+        wxUnusedVar(collectionName);
+        throw wxSQLite3Exception(WXSQLITE_ERROR, wxERRMSG_NOCOLLECTIONS);
+#endif // WXSQLITE3_USE_NAMED_COLLECTIONS
+}
+
diff --git a/cadxcore/wx/wxsqlite3/wxsqlite3.h b/cadxcore/wx/wxsqlite3/wxsqlite3.h
new file mode 100644
index 0000000..d30bddf
--- /dev/null
+++ b/cadxcore/wx/wxsqlite3/wxsqlite3.h
@@ -0,0 +1,2763 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        wxsqlite3.h
+// Purpose:     wxWidgets wrapper around the SQLite3 embedded database library.
+// Author:      Ulrich Telle
+// Modified by:
+// Created:     2005-07-14
+// Copyright:   (c) Ulrich Telle
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+/// \file wxsqlite3.h Interface of the wxSQLite3 class
+
+#ifndef _WX_SQLITE3_H_
+#define _WX_SQLITE3_H_
+
+#if defined(__GNUG__) && !defined(__APPLE__)
+#pragma interface "wxsqlite3.h"
+#endif
+
+#include <api/api.h>
+#include <wx/arrstr.h>
+#include <wx/datetime.h>
+#include <wx/buffer.h>
+#include <wx/hashmap.h>
+#include <wx/regex.h>
+#include <wx/string.h>
+
+#include "wxsqlite3def.h"
+
+#define WXSQLITE_ERROR 1000
+
+#define WXSQLITE_INTEGER  1
+#define WXSQLITE_FLOAT    2
+#define WXSQLITE_TEXT     3
+#define WXSQLITE_BLOB     4
+#define WXSQLITE_NULL     5
+
+#if defined(_MSC_VER) || defined(__BORLANDC__)
+typedef __int64 wxsqlite_int64;
+#else
+typedef long long int wxsqlite_int64;
+#endif
+
+/// Enumeration of transaction types
+enum wxSQLite3TransactionType {
+        WXSQLITE_TRANSACTION_DEFAULT,
+        WXSQLITE_TRANSACTION_DEFERRED,
+        WXSQLITE_TRANSACTION_IMMEDIATE,
+        WXSQLITE_TRANSACTION_EXCLUSIVE
+};
+
+/// Enumeration of SQLite limitation types
+enum wxSQLite3LimitType {
+        WXSQLITE_LIMIT_LENGTH              = 0,
+        WXSQLITE_LIMIT_SQL_LENGTH          = 1,
+        WXSQLITE_LIMIT_COLUMN              = 2,
+        WXSQLITE_LIMIT_EXPR_DEPTH          = 3,
+        WXSQLITE_LIMIT_COMPOUND_SELECT     = 4,
+        WXSQLITE_LIMIT_VDBE_OP             = 5,
+        WXSQLITE_LIMIT_FUNCTION_ARG        = 6,
+        WXSQLITE_LIMIT_ATTACHED            = 7,
+        WXSQLITE_LIMIT_LIKE_PATTERN_LENGTH = 8,
+        WXSQLITE_LIMIT_VARIABLE_NUMBER     = 9,
+        WXSQLITE_LIMIT_TRIGGER_DEPTH       = 10
+};
+
+/// Enumeration of journal modes
+enum wxSQLite3JournalMode {
+        WXSQLITE_JOURNALMODE_DELETE     = 0,   // Commit by deleting journal file
+        WXSQLITE_JOURNALMODE_PERSIST    = 1,   // Commit by zeroing journal header
+        WXSQLITE_JOURNALMODE_OFF        = 2,   // Journal omitted.
+        WXSQLITE_JOURNALMODE_TRUNCATE   = 3,   // Commit by truncating journal
+        WXSQLITE_JOURNALMODE_MEMORY     = 4,   // In-memory journal file
+        WXSQLITE_JOURNALMODE_WAL        = 5    // Use write-ahead logging
+};
+
+#define WXSQLITE_OPEN_READONLY         0x00000001
+#define WXSQLITE_OPEN_READWRITE        0x00000002
+#define WXSQLITE_OPEN_CREATE           0x00000004
+#define WXSQLITE_OPEN_NOMUTEX          0x00008000
+#define WXSQLITE_OPEN_FULLMUTEX        0x00010000
+#define WXSQLITE_OPEN_SHAREDCACHE      0x00020000
+#define WXSQLITE_OPEN_PRIVATECACHE     0x00040000
+
+#define WXSQLITE_CHECKPOINT_PASSIVE 0
+#define WXSQLITE_CHECKPOINT_FULL    1
+#define WXSQLITE_CHECKPOINT_RESTART 2
+
+inline void operator++(wxSQLite3LimitType& value)
+{
+        value = wxSQLite3LimitType(value+1);
+}
+
+/// SQL exception
+class EXTAPI wxSQLite3Exception
+{
+public:
+        /// Constructor
+        wxSQLite3Exception(int errorCode, const wxString& errMsg);
+
+        /// Copy constructor
+        wxSQLite3Exception(const wxSQLite3Exception&  e);
+
+        /// Destructor
+        virtual ~wxSQLite3Exception();
+
+        /// Get error code associated with the exception
+        int GetErrorCode() const
+        {
+                return (m_errorCode & 0xff);
+        }
+
+        /// Get extended error code associated with the exception
+        int GetExtendedErrorCode() const
+        {
+                return m_errorCode;
+        }
+
+        /// Get error message associated with the exception
+        const wxString GetMessage() const
+        {
+                return m_errorMessage;
+        }
+
+        /// Convert error code to error message
+        static const wxString ErrorCodeAsString(int errorCode);
+
+private:
+        int      m_errorCode;     ///< SQLite3 error code associated with this exception
+        wxString m_errorMessage;  ///< SQLite3 error message associated with this exception
+};
+
+/// SQL statment buffer for use with SQLite3's printf method
+class EXTAPI wxSQLite3StatementBuffer
+{
+public:
+        /// Constructor
+        wxSQLite3StatementBuffer();
+
+        /// Destructor
+        ~wxSQLite3StatementBuffer();
+
+        /// Format a SQL statement using SQLite3's printf method
+        /**
+        * This method is a variant of the "sprintf()" from the standard C library.
+        * All of the usual printf formatting options apply. In addition,
+        * there is a "%q" option. %q works like %s in that it substitutes
+        * a null-terminated string from the argument list. But %q also
+        * doubles every '\'' character. %q is designed for use inside a
+        * string literal. By doubling each '\'' character it escapes that
+        * character and allows it to be inserted into the string.
+        *
+        * For example, so some string variable contains text as follows:
+        *
+        * char *zText = "It's a happy day!";
+        *
+        * One can use this text in an SQL statement as follows:
+        *
+        * wxSQLite3StatementBuffer stmtBuffer;
+        * stmtBuffer.Format("INSERT INTO table VALUES('%q')", zText);
+        *
+        * Because the %q format string is used, the '\'' character in
+        * zText is escaped and the SQL generated is as follows:
+        *
+        * INSERT INTO table1 VALUES('It''s a happy day!')
+        *
+        * \param format SQL statement string with formatting options
+        * \param ... list of statement parameters
+        * \return const char pointer to the resulting statement buffer
+        */
+        const char* Format(const char* format, ...);
+
+        /// Format a SQL statement using SQLite3's printf method
+        /**
+        * This method is like method Format but takes a va_list argument
+        * to pass the statement parameters.
+        *
+        * \param format SQL statement string with formatting options
+        * \param va va_list of statement parameters
+        * \return const char pointer to the resulting statement buffer
+        */
+        const char* FormatV(const char* format, va_list va);
+
+        /// Dereference the internal buffer
+        /**
+        * \return const char pointer to the resulting statement buffer
+        */
+        operator const char*() const
+        {
+                return m_buffer;
+        }
+
+        /// Clear the internal buffer
+        void Clear();
+
+private:
+        char* m_buffer;  ///< Internal buffer
+};
+
+/// Context for user defined scalar or aggregate functions
+/**
+* A function context gives user defined scalar or aggregate functions
+* access to function arguments and function results. The "Execute" method
+* resp. the "Aggregate" and "Finalize" methods receive the current
+* function context as an argument.
+*/
+class EXTAPI wxSQLite3FunctionContext
+{
+public:
+        /// Get the number of function arguments
+        /**
+        * \return the number of arguments the function was called with
+        */
+        int GetArgCount();
+
+        /// Get the type of a function argument
+        /**
+        * \param argIndex index of the function argument. Indices start with 0.
+        * \return argument type as one of the values WXSQLITE_INTEGER, WXSQLITE_FLOAT, WXSQLITE_TEXT, WXSQLITE_BLOB, or WXSQLITE_NULL
+        */
+        int GetArgType(int argIndex);
+
+        /// Check whether a function argument is a NULL value
+        /**
+        * \param argIndex index of the function argument. Indices start with 0.
+        * \return TRUE if the argument is NULL or the argIndex is out of bounds, FALSE otherwise
+        */
+        bool IsNull(int argIndex);
+
+        /// Get a function argument as an integer value
+        /**
+        * \param argIndex index of the function argument. Indices start with 0.
+        * \param nullValue value to be returned in case the argument is NULL
+        * \return argument value
+        */
+        int GetInt(int argIndex, int nullValue = 0);
+
+        /// Get a function argument as an 64-bit integer value
+        /**
+        * \param argIndex index of the function argument. Indices start with 0.
+        * \param nullValue value to be returned in case the argument is NULL
+        * \return argument value
+        */
+        wxLongLong GetInt64(int argIndex, wxLongLong nullValue = 0);
+
+        /// Get a function argument as a double value
+        /**
+        * \param argIndex index of the function argument. Indices start with 0.
+        * \param nullValue value to be returned in case the argument is NULL
+        * \return argument value
+        */
+        double GetDouble(int argIndex, double nullValue = 0);
+
+        /// Get a function argument as a string value
+        /**
+        * \param argIndex index of the function argument. Indices start with 0.
+        * \param nullValue value to be returned in case the argument is NULL
+        * \return argument value
+        */
+        wxString GetString(int argIndex, const wxString& nullValue = wxEmptyString);
+
+        /// Get a function argument as a BLOB value
+        /**
+        * \param argIndex index of the function argument. Indices start with 0.
+        * \param[out] len length of the blob argument in bytes
+        * \return argument value
+        */
+        const unsigned char* GetBlob(int argIndex, int& len);
+
+        /// Get a function argument as a BLOB value
+        /**
+        * \param argIndex index of the function argument. Indices start with 0.
+        * \param[out] buffer to which the blob argument value is appended
+        * \return reference to argument value
+        */
+        wxMemoryBuffer& GetBlob(int argIndex, wxMemoryBuffer& buffer);
+
+        /// Set the function result as an integer value
+        /**
+        * \param value function result value
+        */
+        void SetResult(int value);
+
+        /// Set the function result as an 64-bit integer value
+        /**
+        * \param value function result value
+        */
+        void SetResult(wxLongLong value);
+
+        /// Set the function result as a double value
+        /**
+        * \param value function result value
+        */
+        void SetResult(double value);
+
+        /// Set the function result as a string value
+        /**
+        * \param value function result value
+        */
+        void SetResult(const wxString& value);
+
+        /// Set the function result as a BLOB value
+        /**
+        * \param value function result value
+        * \param len length of the result blob in bytes
+        */
+        void SetResult(unsigned char* value, int len);
+
+        /// Set the function result as a BLOB value
+        /**
+        * \param buffer containing the function result value
+        */
+        void SetResult(const wxMemoryBuffer& buffer);
+
+        /// Set the function result as a NULL value
+        void SetResultNull();
+
+        /// Set the function result as a zero BLOB value
+        /**
+        * \param blobSize size of the zero filled BLOB value
+        */
+        void SetResultZeroBlob(int blobSize);
+
+        /// Set the function result as a exact copy of a function argument
+        /**
+        * \param argIndex index of the argument which should be copied as the result value
+        */
+        void SetResultArg(int argIndex);
+
+        /// Set an error message as the function result
+        /**
+        * \param errmsg string containing an error message
+        */
+        void SetResultError(const wxString& errmsg);
+
+        /// Get the number of aggregate steps
+        /**
+        * \return the number of aggregation steps. The current aggregation step counts so at least 1 is returned.
+        */
+        int GetAggregateCount();
+
+        /// Get a pointer to an aggregate structure of specified length
+        /**
+        * Usually an aggregation functions needs temporary memory to collect
+        * the information gathered from each invocation of the "Aggregate" method.
+        * On the first invocation of this method the returned memory contains
+        * binary zeros.
+        * If this memory is used to store pointers to allocated objects,
+        * it is important to free all allocated objects in the "Finalize" method.
+        *
+        * \param len amount of memory needed in bytes
+        * \return pointer to the allocated memory
+        */
+        void* GetAggregateStruct(int len);
+
+        /// Execute a user defined scalar function (internal use only)
+        static void ExecScalarFunction(void* ctx, int argc, void** argv);
+
+        /// Execute an aggregate step of a user defined aggregate function (internal use only)
+        static void ExecAggregateStep(void* ctx, int argc, void** argv);
+
+        /// Execute the final step of a user defined aggregate function (internal use only)
+        static void ExecAggregateFinalize(void* ctx);
+
+        /// Execute the user defined authorizer function (internal use only)
+        static int  ExecAuthorizer(void*, int type,
+                                   const char* arg1, const char* arg2,
+                                   const char* arg3, const char* arg4);
+
+        /// Execute the user defined commit hook (internal use only)
+        static int ExecCommitHook(void* hook);
+
+        /// Execute the user defined rollback hook (internal use only)
+        static void ExecRollbackHook(void* hook);
+
+        /// Execute the user defined update hook (internal use only)
+        static void ExecUpdateHook(void* hook, int type,
+                                   const char* database, const char* table,
+                                   wxsqlite_int64 rowid);
+
+        /// Execute the user defined Write Ahead Log hook (internal use only)
+        static int ExecWriteAheadLogHook(void* hook, void* dbHandle,
+                                         const char* database, int numPages);
+
+private:
+        /// Constructor
+        wxSQLite3FunctionContext(void* ctx, bool isAggregate, int argc = 0, void** argv = NULL);
+
+        /// Copy constructor
+        wxSQLite3FunctionContext(wxSQLite3FunctionContext& ctx);
+
+        void*  m_ctx;          ///< SQLite3 context
+        bool   m_isAggregate;  ///< Flag whether this is the context of an aggregate function
+        int    m_count;        ///< Aggregate count
+        int    m_argc;         ///< Number of arguments
+        void** m_argv;         ///< Array of SQLite3 arguments
+};
+
+
+/// Interface for user defined scalar functions
+/**
+*/
+class EXTAPI wxSQLite3ScalarFunction
+{
+public:
+        /// Constructor
+        wxSQLite3ScalarFunction() {}
+
+        /// Virtual destructor
+        virtual ~wxSQLite3ScalarFunction() {}
+        /// Execute the scalar function
+        /**
+        * This method is invoked for each appearance of the scalar function in the SQL query.
+        * \param ctx function context which can be used to access arguments and result value
+        */
+        virtual void Execute(wxSQLite3FunctionContext& ctx) = 0;
+};
+
+
+/// Interface for user defined aggregate functions
+/**
+*/
+class EXTAPI wxSQLite3AggregateFunction
+{
+public:
+        /// Constructor
+        wxSQLite3AggregateFunction()
+        {
+                m_count = 0;
+        }
+
+        /// Virtual destructor
+        virtual ~wxSQLite3AggregateFunction() {}
+        /// Execute the aggregate of the function
+        /**
+        * This method is invoked for each row of the result set of the query using the aggregate function.
+        * \param ctx function context which can be used to access arguments and result value
+        */
+        virtual void Aggregate(wxSQLite3FunctionContext& ctx) = 0;
+
+        /// Prepare the result of the aggregate function
+        /**
+        * This method is invoked after all rows of the result set of the query
+        * using the aggregate function have been processed. Usually the final result
+        * is calculated and returned in this method.
+        * \param ctx function context which can be used to access arguments and result value
+        */
+        virtual void Finalize(wxSQLite3FunctionContext& ctx) = 0;
+
+private:
+        int    m_count;        ///< Aggregate count
+        friend class wxSQLite3FunctionContext;
+};
+
+
+/// Interface for a user defined authorizer function
+/**
+*/
+class EXTAPI wxSQLite3Authorizer
+{
+public:
+        /// Codes identifying the command for which authorization is requested
+        enum wxAuthorizationCode {
+                // arg1 =          arg2 =
+                SQLITE_COPY                =  0,   // Table Name      File Name
+                SQLITE_CREATE_INDEX        =  1,   // Index Name      Table Name
+                SQLITE_CREATE_TABLE        =  2,   // Table Name      NULL
+                SQLITE_CREATE_TEMP_INDEX   =  3,   // Index Name      Table Name
+                SQLITE_CREATE_TEMP_TABLE   =  4,   // Table Name      NULL
+                SQLITE_CREATE_TEMP_TRIGGER =  5,   // Trigger Name    Table Name
+                SQLITE_CREATE_TEMP_VIEW    =  6,   // View Name       NULL
+                SQLITE_CREATE_TRIGGER      =  7,   // Trigger Name    Table Name
+                SQLITE_CREATE_VIEW         =  8,   // View Name       NULL
+                SQLITE_DELETE              =  9,   // Table Name      NULL
+                SQLITE_DROP_INDEX          = 10,   // Index Name      Table Name
+                SQLITE_DROP_TABLE          = 11,   // Table Name      NULL
+                SQLITE_DROP_TEMP_INDEX     = 12,   // Index Name      Table Name
+                SQLITE_DROP_TEMP_TABLE     = 13,   // Table Name      NULL
+                SQLITE_DROP_TEMP_TRIGGER   = 14,   // Trigger Name    Table Name
+                SQLITE_DROP_TEMP_VIEW      = 15,   // View Name       NULL
+                SQLITE_DROP_TRIGGER        = 16,   // Trigger Name    Table Name
+                SQLITE_DROP_VIEW           = 17,   // View Name       NULL
+                SQLITE_INSERT              = 18,   // Table Name      NULL
+                SQLITE_PRAGMA              = 19,   // Pragma Name     1st arg or NULL
+                SQLITE_READ                = 20,   // Table Name      Column Name
+                SQLITE_SELECT              = 21,   // NULL            NULL
+                SQLITE_TRANSACTION         = 22,   // Operation       NULL
+                SQLITE_UPDATE              = 23,   // Table Name      Column Name
+                SQLITE_ATTACH              = 24,   // Filename        NULL
+                SQLITE_DETACH              = 25,   // Database Name   NULL
+                SQLITE_ALTER_TABLE         = 26,   // Database Name   Table Name
+                SQLITE_REINDEX             = 27,   // Index Name      NULL
+                SQLITE_ANALYZE             = 28,   // Table Name      NULL
+                SQLITE_CREATE_VTABLE       = 29,   // Table Name      Module Name
+                SQLITE_DROP_VTABLE         = 30,   // Table Name      Module Name
+                SQLITE_FUNCTION            = 31,   // NULL            Function Name
+                SQLITE_SAVEPOINT           = 32,   // Operation       Savepoint Name
+                SQLITE_MAX_CODE            = SQLITE_SAVEPOINT
+        };
+
+        /// Return codes of the authorizer
+        enum wxAuthorizationResult {
+                SQLITE_OK     = 0,   // Allow access
+                SQLITE_DENY   = 1,   // Abort the SQL statement with an error
+                SQLITE_IGNORE = 2    // Don't allow access, but don't generate an error
+        };
+        /// Virtual destructor
+        virtual ~wxSQLite3Authorizer() {}
+        /// Execute the authorizer function
+        /**
+        * Please refer to the SQLite documentation for further information about the
+        * meaning of the parameters.
+        *
+        * \param type wxAuthorizationCode. The value signifies what kind of operation is to be authorized.
+        * \param arg1 first argument (value depends on "type")
+        * \param arg2 second argument (value depends on "type")
+        * \param arg3 third argument (name of database if applicable)
+        * \param arg4 fourth argument (name of trigger or view if applicable)
+        * \return a wxAuthorizationResult, i.e. SQLITE_OK, SQLITE_DENY or SQLITE_IGNORE
+        */
+        virtual wxAuthorizationResult Authorize(wxAuthorizationCode type,
+                                                const wxString& arg1, const wxString& arg2,
+                                                const wxString& arg3, const wxString& arg4) = 0;
+        /// Convert authorization code to string
+        /**
+        * \param type wxAuthorizationCode. The value signifies what kind of operation is to be authorized.
+        */
+        static wxString AuthorizationCodeToString(wxSQLite3Authorizer::wxAuthorizationCode type);
+};
+
+class WXDLLIMPEXP_FWD_SQLITE3 wxSQLite3Database;
+
+/// Interface for a user defined hook function
+/**
+*/
+class EXTAPI wxSQLite3Hook
+{
+public:
+        /// Codes identifying the command for which the hook is called
+        enum wxUpdateType {
+                SQLITE_DELETE              =  9,
+                SQLITE_INSERT              = 18,
+                SQLITE_UPDATE              = 23
+        };
+        /// Default constructor
+        wxSQLite3Hook() : m_db(NULL) {}
+
+        /// Virtual destructor
+        virtual ~wxSQLite3Hook() {}
+
+        /// Execute the commit hook callback function
+        /**
+        * Please refer to the SQLite documentation for further information.
+        * \return true to request rollback of the transaction, false to continue with commit
+        */
+        virtual bool CommitCallback()
+        {
+                return false;
+        }
+
+        /// Execute the rollback hook callback function
+        /**
+        * Please refer to the SQLite documentation for further information.
+        */
+        virtual void RollbackCallback() {}
+
+        /// Execute the hook callback function
+        /**
+        * Please refer to the SQLite documentation for further information about the
+        * meaning of the parameters.
+        *
+        * \param type wxHookType. The value signifies what kind of operation is to be authorized.
+        * \param database Name of the database
+        * \param table Name of the table
+        * \param rowid The rowid of the affected row
+        */
+        virtual void UpdateCallback(wxUpdateType WXUNUSED(type),
+                                    const wxString& WXUNUSED(database), const wxString& WXUNUSED(table),
+                                    wxLongLong WXUNUSED(rowid)) {}
+
+        /// Execute the write-ahead log hook callback function
+        /**
+        * Please refer to the SQLite documentation for further information about the
+        * meaning of the parameters.
+        *
+        * \param database Name of the database
+        * \param numPages the number of pages
+        */
+        virtual int WriteAheadLogCallback(const wxString& WXUNUSED(database),
+                                          int WXUNUSED(numPages))
+        {
+                return 0;
+        }
+
+        /// Set the associated database
+        /**
+        * For the write-ahead log hook the associated database is set internally.
+        * \param db pointer to the associated database instance
+        */
+        void SetDatabase(wxSQLite3Database* db)
+        {
+                m_db = db;
+        }
+
+        /// Get the associated database
+        /**
+        * For the write-ahead log hook the associated database can be accessed.
+        *
+        * \return pointer to the associated database instance
+        * \note Access to the associated database is only provided for write-ahead log hooks.
+        */
+        wxSQLite3Database* GetDatabase() const
+        {
+                return m_db;
+        }
+
+private:
+        wxSQLite3Database* m_db;
+};
+
+/// Interface for a user defined collation sequence
+/**
+*/
+class EXTAPI wxSQLite3Collation
+{
+public:
+        /// Virtual destructor
+        virtual ~wxSQLite3Collation() {}
+
+        /// Execute a comparison using a user-defined collation sequence
+        /**
+        * Please refer to the SQLite documentation for further information.
+        * \param text1 first text string
+        * \param text2 second text string
+        * \return an integer < 0, = 0, or > 0 depending on whether text1 is less than, equal to, or greater than text2.
+        */
+        virtual int Compare(const wxString& text1, const wxString& text2)
+        {
+                return text1.Cmp(text2);
+        }
+};
+
+/// Result set of a SQL query
+class EXTAPI wxSQLite3ResultSet
+{
+public:
+        /// Constructor
+        wxSQLite3ResultSet();
+
+        /// Copy constructor
+        wxSQLite3ResultSet(const wxSQLite3ResultSet& resultSet);
+
+        /// Constructor for internal use
+        wxSQLite3ResultSet(void* db, void* stmt,
+                           bool eof, bool first = true, bool ownStmt = true);
+
+        /// Assignment constructor
+        wxSQLite3ResultSet& operator=(const wxSQLite3ResultSet& resultSet);
+
+        /// Destructor
+        /**
+        */
+        virtual ~wxSQLite3ResultSet();
+
+        /// Get the number of columns in the result set
+        /**
+        * \return number of columns in result set
+        */
+        int GetColumnCount();
+
+        /// Find the index of a column by name
+        /**
+        * \param columnName name of the column
+        * \return index of the column. Indices start with 0.
+        */
+        int FindColumnIndex(const wxString& columnName);
+
+        /// Get the name of a column
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return column name as string
+        */
+        wxString GetColumnName(int columnIndex);
+
+        /// Get the declared type of a column
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return type string as specified in the table definition
+        */
+        wxString GetDeclaredColumnType(int columnIndex);
+
+        /// Get the actual type of a column
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return column type as one of the values WXSQLITE_INTEGER, WXSQLITE_FLOAT, WXSQLITE_TEXT, WXSQLITE_BLOB, or WXSQLITE_NULL
+        */
+        int GetColumnType(int columnIndex);
+
+        /// Get the database name of a column
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return database name the column belongs to or empty string
+        *
+        * This method is only available if WXSQLITE3_HAVE_METADATA is defined and SQLite has been compiled with SQLITE_ENABLE_COLUMN_METADATA defined.
+        */
+        wxString GetDatabaseName(int columnIndex);
+
+        /// Get the table name of a column
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return table name the column belongs to or empty string
+        *
+        * This method is only available if WXSQLITE3_HAVE_METADATA is defined and SQLite has been compiled with SQLITE_ENABLE_COLUMN_METADATA defined.
+        */
+        wxString GetTableName(int columnIndex);
+
+        /// Get the origin name of a column
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return origin name the column belongs to or empty string
+        *
+        * This method is only available if WXSQLITE3_HAVE_METADATA is defined and SQLite has been compiled with SQLITE_ENABLE_COLUMN_METADATA defined.
+        */
+        wxString GetOriginName(int columnIndex);
+
+        /// Get a column as a string using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column as string
+        */
+        wxString GetAsString(int columnIndex);
+
+        /// Get a column as a string using the column name
+        /**
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        wxString GetAsString(const wxString& columnName);
+
+        /// Get a column as an integer using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        int GetInt(int columnIndex, int nullValue = 0);
+
+        /// Get a column as an integer using the column name
+        /**
+        * \param columnName name of the column
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        int GetInt(const wxString& columnName, int nullValue = 0);
+
+        /// Get a column as a 64-bit integer using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        wxLongLong GetInt64(int columnIndex, wxLongLong nullValue = 0);
+
+        /// Get a column as a 64-bit integer using the column name
+        /**
+        * \param columnName name of the column
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        wxLongLong GetInt64(const wxString& columnName, wxLongLong nullValue = 0);
+
+        /// Get a column as a double using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        double GetDouble(int columnIndex, double nullValue = 0.0);
+
+        /// Get a column as a double using the column name
+        /**
+        * \param columnName name of the column
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        double GetDouble(const wxString& columnName, double nullValue = 0.0);
+
+        /// Get a column as a string using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        wxString GetString(int columnIndex, const wxString& nullValue = wxEmptyString);
+
+        /// Get a column as a string using the column name
+        /**
+        * \param columnName name of the column
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        wxString GetString(const wxString& columnName, const wxString& nullValue = wxEmptyString);
+
+        /// Get a column as a BLOB using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \param[out] len length of the blob in bytes
+        * \return value of the column
+        */
+        const unsigned char* GetBlob(int columnIndex, int& len);
+
+        /// Get a column as a BLOB using the column name
+        /**
+        * \param columnName name of the column
+        * \param[out] len length of the blob in bytes
+        * \return value of the column
+        */
+        const unsigned char* GetBlob(const wxString& columnName, int& len);
+
+        /// Get a column as a BLOB using the column index and append to memory buffer
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \param[out] buffer the memory buffer to which the BLOB value is appended
+        * \return reference to the memory buffer
+        */
+        wxMemoryBuffer& GetBlob(int columnIndex, wxMemoryBuffer& buffer);
+
+        /// Get a column as a BLOB using the column index and append to memory buffer
+        /**
+        * \param columnName name of the column
+        * \param[out] buffer the memory buffer to which the BLOB value is appended
+        * \return reference to the memory buffer
+        */
+        wxMemoryBuffer& GetBlob(const wxString& columnName, wxMemoryBuffer& buffer);
+
+        /// Get a column as a date value using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column
+        */
+        wxDateTime GetDate(int columnIndex);
+
+        /// Get a column as a date value using the column name
+        /**
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        wxDateTime GetDate(const wxString& columnName);
+
+        /// Get a column as a time value using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column
+        */
+        wxDateTime GetTime(int columnIndex);
+
+        /// Get a column as a time value using the column name
+        /**
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        wxDateTime GetTime(const wxString& columnName);
+
+        /// Get a column as a date and time value using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column
+        */
+        wxDateTime GetDateTime(int columnIndex);
+
+        /// Get a column as a date and time value using the column name
+        /**
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        wxDateTime GetDateTime(const wxString& columnName);
+
+        /// Get a column as a timestamp value using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column
+        */
+        wxDateTime GetTimestamp(int columnIndex);
+
+        /// Get a column as a timestamp value using the column name
+        /**
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        wxDateTime GetTimestamp(const wxString& columnName);
+
+        /// Get a column as a date and time value using the column index
+        /**
+        * The date/time value is expected to be stored in the database as a numeric value (i.e. int64).
+        *
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column
+        */
+        wxDateTime GetNumericDateTime(int columnIndex);
+
+        /// Get a column as a date and time value using the column name
+        /**
+        * The date/time value is expected to be stored in the database as a numeric value (i.e. int64).
+        *
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        wxDateTime GetNumericDateTime(const wxString& columnName);
+
+        /// Get a column as a date and time value using the column index
+        /**
+        * The date/time value is expected to be stored in the database as a Julian Day Number (i.e. double).
+        *
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column
+        */
+        wxDateTime GetJulianDayNumber(int columnIndex);
+
+        /// Get a column as a date and time value using the column name
+        /**
+        * The date/time value is expected to be stored in the database as a Julian Day Number (i.e. double).
+        *
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        wxDateTime GetJulianDayNumber(const wxString& columnName);
+
+        /// Get a column as a boolean value using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column
+        */
+        bool GetBool(int columnIndex);
+
+        /// Get a column as a boolean value using the column name
+        /**
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        bool GetBool(const wxString& columnName);
+
+        /// Check whether a column has a NULL value using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return TRUE if the value is NULL, FALSE otherwise
+        */
+        bool IsNull(int columnIndex);
+
+        /// Check whether a column has a NULL value using the column name
+        /**
+        * \param columnName name of the column
+        * \return TRUE if the value is NULL, FALSE otherwise
+        */
+        bool IsNull(const wxString& columnName);
+
+        /// Check whether all rows of the result set have been processed
+        /**
+        * \return TRUE if all rows of the result have been processed, FALSE otherwise
+        */
+        bool Eof();
+
+        /// Retrieve next row of the result set
+        /**
+        * Advances the cursor to the next row.
+        * On creation of the result set the cursor is positioned BEFORE the first row, i.e.
+        * the first call to this method makes the first row available for processing.
+        * \return TRUE while there are still rows to process, FALSE otherwise
+        */
+        bool NextRow();
+
+        /// Finalize the result set
+        /**
+        */
+        void Finalize();
+
+        /// Get the original SQL string for preparing the query statement
+        /**
+        * \return the original SQL string used to prepare the query statement
+        */
+        wxString GetSQL();
+
+        /// Validate associated SQLite database and statement
+        /**
+        * \return TRUE if both, a SQLite database and a SQLite statement, are associated, FALSE otherwise
+        */
+        bool IsOk();
+
+        ///return statment
+        void* GetStmt();
+
+private:
+        /// Check the validity of the associated statement
+        void CheckStmt();
+
+        void* m_db;       ///< associated database
+        void* m_stmt;     ///< associated statement
+        bool  m_eof;      ///< Flag for end of result set
+        bool  m_first;    ///< Flag for first row of the result set
+        int   m_cols;     ///< Numver of columns in row set
+        bool  m_ownStmt;  ///< Flag for ownership of the associated statement
+};
+
+
+/// Holds the complete result set of a SQL query
+class EXTAPI wxSQLite3Table
+{
+public:
+        /// Constructor
+        wxSQLite3Table();
+
+        wxSQLite3Table(const wxSQLite3Table& table);
+
+        wxSQLite3Table(char** results, int rows, int cols);
+
+        virtual ~wxSQLite3Table();
+
+        wxSQLite3Table& operator=(const wxSQLite3Table& table);
+
+        /// Get the number of columns in the result set
+        /**
+        * \return the number of columns
+        */
+        int GetColumnCount();
+
+        /// Get the number of rows in the result set
+        /**
+        * \return the number of rows
+        */
+        int GetRowCount();
+
+        /// Find the index of a column by name
+        /**
+        * \param columnName name of the column
+        * \return the index of the column
+        */
+        int FindColumnIndex(const wxString& columnName);
+
+        /// Get the name of a column
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return name of the column
+        */
+        wxString GetColumnName(int columnIndex);
+
+        /// Get a column as a string using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column as a string
+        *
+        * \note This method returns values of type <code>double</code>
+        * always using the point character as the decimal separator.
+        * This is SQLite default behaviour. Use method wxSQLite3Table::GetDouble
+        * to apply correct conversion from <code>string</code> to <code>double</code>.
+        */
+        wxString GetAsString(int columnIndex);
+
+        /// Get a column as a string using the column name
+        /**
+        * \param columnName name of the column
+        * \return value of the column as a string
+        *
+        * \note This method returns values of type <code>double</code>
+        * always using the point character as the decimal separator.
+        * This is SQLite default behaviour. Use method wxSQLite3Table::GetDouble
+        * to apply correct conversion from <code>string</code> to <code>double</code>.
+        */
+        wxString GetAsString(const wxString& columnName);
+
+        /// Get a column as an integer using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        int GetInt(int columnIndex, int nullValue = 0);
+
+        /// Get a column as an integer using the column name
+        /**
+        * \param columnName name of the column
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        int GetInt(const wxString& columnName, int nullValue = 0);
+
+        /// Get a column as a 64-bit integer using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        wxLongLong GetInt64(int columnIndex, wxLongLong nullValue = 0);
+
+        /// Get a column as an integer using the column name
+        /**
+        * \param columnName name of the column
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        wxLongLong GetInt64(const wxString& columnName, wxLongLong nullValue = 0);
+
+        /// Get a column as a double using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        double GetDouble(int columnIndex, double nullValue = 0.0);
+
+        /// Get a column as a double using the column name
+        /**
+        * \param columnName name of the column
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        double GetDouble(const wxString& columnName, double nullValue = 0.0);
+
+        /// Get a column as a string using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        wxString GetString(int columnIndex, const wxString& nullValue = wxEmptyString);
+
+        /// Get a column as a string using the column name
+        /**
+        * \param columnName name of the column
+        * \param nullValue value to be returned in case the column is NULL
+        * \return value of the column
+        */
+        wxString GetString(const wxString& columnName, const wxString& nullValue = wxEmptyString);
+
+        /// Get a column as a date value using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column
+        */
+        wxDateTime GetDate(int columnIndex);
+
+        /// Get a column as a date value using the column name
+        /**
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        wxDateTime GetDate(const wxString& columnName);
+
+        /// Get a column as a time value using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column
+        */
+        wxDateTime GetTime(int columnIndex);
+
+        /// Get a column as a time value using the column name
+        /**
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        wxDateTime GetTime(const wxString& columnName);
+
+        /// Get a column as a date/time value using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column
+        */
+        wxDateTime GetDateTime(int columnIndex);
+
+        /// Get a column as a date/time value using the column name
+        /**
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        wxDateTime GetDateTime(const wxString& columnName);
+
+        /// Get a column as a boolean using the column index
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return value of the column
+        */
+        bool GetBool(int columnIndex);
+
+        /// Get a column as a boolean using the column name
+        /**
+        * \param columnName name of the column
+        * \return value of the column
+        */
+        bool GetBool(const wxString& columnName);
+
+        /// Check whether the column selected by index is a NULL value
+        /**
+        * \param columnIndex index of the column. Indices start with 0.
+        * \return TRUE if the value is NULL, FALSE otherwise
+        */
+        bool IsNull(int columnIndex);
+
+        /// Check whether the column selected by name is a NULL value
+        /**
+        * \param columnName name of the column
+        * \return TRUE if the value is NULL, FALSE otherwise
+        */
+        bool IsNull(const wxString& columnName);
+
+        /// Set the current row
+        /**
+        * \param row index of the requested row. Indices start with 0.
+        */
+        void SetRow(int row);
+
+        /// Finalize the result set
+        /**
+        */
+        void Finalize();
+
+        /// Validate associated SQLite resultset
+        /**
+        * \return TRUE if SQLite resultset is associated, FALSE otherwise
+        */
+        bool IsOk();
+
+private:
+        /// Check for valid results
+        void CheckResults();
+
+        int m_cols;        ///< Number of columns
+        int m_rows;        ///< Number of rows
+        int m_currentRow;  ///< Index of the current row
+        char** m_results;  ///< SQLite3 result buffer
+};
+
+
+/// Represents a prepared SQL statement
+class EXTAPI wxSQLite3Statement
+{
+public:
+        /// Constructor
+        /**
+        */
+        wxSQLite3Statement();
+
+        /// Copy constructor
+        /**
+        */
+        wxSQLite3Statement(const wxSQLite3Statement& statement);
+
+        /// Assignement constructor
+        /**
+        */
+        wxSQLite3Statement& operator=(const wxSQLite3Statement& statement);
+
+        /// Constructor (internal use only)
+        /**
+        */
+        wxSQLite3Statement(void* db, void* stmt);
+
+        /// Destructor
+        /**
+        */
+        virtual ~wxSQLite3Statement();
+
+        /// Execute the database update represented by this statement
+        /**
+        * \return the number of database rows that were changed (or inserted or deleted)
+        */
+        int ExecuteUpdate();
+
+        /// Execute the query represented by this statement
+        /**
+        * \param transferStatementOwnership if TRUE the ownership of the underlying SQLite
+        * statement object is transferred to the created result set (default: FALSE)
+        * \return result set instance
+        * \note the transfer of ownership of the underlying SQLite statement object can be
+        * performed only once. If the transfer of ownership has been requested this
+        * wxSQL3Statement instance isn't usable anymore as soon as the result set is destroyed.
+        * If the transfer of ownership isn't requested the created result set can be used to
+        * retrieve the selected data rows only as long as this wxSQLite3Statement instance exists.
+        */
+        wxSQLite3ResultSet ExecuteQuery(bool transferStatementOwnership = false);
+
+        /// Execute a scalar SQL query statement given as a wxString
+        /**
+        * Allows to easily retrieve the result of queries returning a single integer result
+        * like SELECT COUNT(*) FROM table WHERE condition.
+        * \return first column of first row as an int
+        */
+        int ExecuteScalar();
+
+        /// Get the number of statement parameters
+        /**
+        * \return the number of parameters in the prepared statement
+        */
+        int GetParamCount();
+
+        /// Get the index of a parameter with a given name
+        /**
+        * \param paramName
+        * \return the index of the parameter with the given name. The name must match exactly.
+        * If there is no parameter with the given name, return 0.
+        */
+        int GetParamIndex(const wxString& paramName);
+
+        /// Get the name of a paramater at the given position
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \return the name of the paramIndex-th parameter in the precompiled statement.
+        * Parameters of the form ":AAA" or "$VVV" have a name which is the string ":AAA" or "$VVV".
+        * Parameters of the form "?" have no name.
+        */
+        wxString GetParamName(int paramIndex);
+
+        /// Bind parameter to a string value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param stringValue value of the parameter
+        */
+        void Bind(int paramIndex, const wxString& stringValue);
+
+        /// Bind parameter to a integer value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param intValue value of the parameter
+        */
+        void Bind(int paramIndex, int intValue);
+
+        /// Bind parameter to a 64-bit integer value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param int64Value value of the parameter
+        */
+        void Bind(int paramIndex, wxLongLong int64Value);
+
+        /// Bind parameter to a double value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param doubleValue value of the parameter
+        */
+        void Bind(int paramIndex, double doubleValue);
+
+        /// Bind parameter to a utf-8 character string value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param charValue value of the parameter
+        */
+        void Bind(int paramIndex, const char* charValue);
+
+        /// Bind parameter to a BLOB value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param blobValue value of the parameter
+        * \param blobLen length of the blob in bytes
+        */
+        void Bind(int paramIndex, const unsigned char* blobValue, int blobLen);
+
+        /// Bind parameter to a BLOB value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param blobValue value of the parameter
+        */
+        void Bind(int paramIndex, const wxMemoryBuffer& blobValue);
+
+        /// Bind parameter to a date value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param date value of the parameter
+        */
+        void BindDate(int paramIndex, const wxDateTime& date);
+
+        /// Bind parameter to a time value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param time value of the parameter
+        */
+        void BindTime(int paramIndex, const wxDateTime& time);
+
+        /// Bind parameter to a date and time value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param datetime value of the parameter
+        */
+        void BindDateTime(int paramIndex, const wxDateTime& datetime);
+
+        /// Bind parameter to a timestamp value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param timestamp value of the parameter
+        */
+        void BindTimestamp(int paramIndex, const wxDateTime& timestamp);
+
+        /// Bind parameter to a date and time value
+        /**
+        * The date/time value is transferred to the database as a numeric value (i.e. int64).
+        *
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param datetime value of the parameter
+        */
+        void BindNumericDateTime(int paramIndex, const wxDateTime& datetime);
+
+        /// Bind parameter to a date and time value
+        /**
+        * The date/time value is transferred to the database as a Julian Day Number value (i.e. double).
+        *
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param datetime value of the parameter
+        */
+        void BindJulianDayNumber(int paramIndex, const wxDateTime& datetime);
+
+        /// Bind parameter to a boolean value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param value value of the parameter
+        */
+        void BindBool(int paramIndex, bool value);
+
+        /// Bind parameter to a NULL value
+        /**
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        */
+        void BindNull(int paramIndex);
+
+        /// Bind parameter to a Zero BLOB value
+        /**
+        * Space for a BLOB is reserved and filled with binary zeros for later reference
+        * through a BLOB handle.
+        *
+        * \param paramIndex index of the parameter. The first parameter has an index of 1.
+        * \param blobSize size of the BLOB
+        */
+        void BindZeroBlob(int paramIndex, int blobSize);
+
+        /// Clear all parameter bindings
+        /**
+        * Sets all the parameters in the prepared SQL statement back to NULL.
+        */
+        void ClearBindings();
+
+        /// Get the original SQL string for the prepared statement
+        /**
+        * \return the original SQL string used to prepare the statement
+        */
+        wxString GetSQL();
+
+        /// Reset the prepared statement
+        /**
+        * Resets the statement back to it's initial state, ready to be re-executed.
+        * Any SQL statement variables that had values bound to them retain their values.
+        */
+        void Reset();
+
+        /// Determine whether the statement is read-only
+        /**
+        * \return TRUE if the statement is read-only, FALSE otherwise
+        * \since SQLite3 version 3.7.4
+        * \note For SQLite3 version before version 3.7.4 this method returns always FALSE.
+        */
+        bool IsReadOnly();
+
+        /// Finalize the prepared statement
+        /**
+        */
+        void Finalize();
+
+        /// Validate associated SQLite database and statement
+        /**
+        * \return TRUE if both, a SQLite database and a SQLite statement, are associated, FALSE otherwise
+        */
+        bool IsOk();
+
+private:
+        /// Check for valid database connection
+        void CheckDatabase();
+
+        /// Check for valid statement
+        void CheckStmt();
+
+        void* m_db;            ///< associated SQLite3 database
+        void* m_stmt;          ///< associated SQLite3 statement
+        bool  m_hasOwnership;  ///< flag whether the associated SQLite3 statement is owned
+};
+
+
+/// Represents a SQLite BLOB handle
+class EXTAPI wxSQLite3Blob
+{
+public:
+        /// Constructor
+        /**
+        */
+        wxSQLite3Blob();
+
+        /// Copy constructor
+        /**
+        */
+        wxSQLite3Blob(const wxSQLite3Blob& blob);
+
+        /// Assignement constructor
+        /**
+        */
+        wxSQLite3Blob& operator=(const wxSQLite3Blob& blob);
+
+        /// Constructor (internal use only)
+        /**
+        */
+        wxSQLite3Blob(void* m_db, void* blobHandle, bool writable);
+
+        /// Destructor
+        /**
+        */
+        virtual ~wxSQLite3Blob();
+
+        /// Read partial BLOB value
+        /**
+         * \param blobValue memory buffer receiving the partial content of the BLOB
+         * \param length length of BLOB content to be read
+         * \param offset offset within BLOB where the read starts
+         * \return the address of the memory buffer
+        */
+        wxMemoryBuffer& Read(wxMemoryBuffer& blobValue, int length, int offset);
+
+        /// Write partial BLOB value
+        /**
+         * \param blobValue memory buffer receiving the partial content of the BLOB
+         * \param offset offset within BLOB where the read starts
+        */
+        void Write(const wxMemoryBuffer& blobValue, int offset);
+
+        /// Check whether the BLOB handle is correctly initialized
+        /**
+         * \return TRUE if the BLOB handle is correctly initialized, FALSE otherweis
+        */
+        bool IsOk();
+
+        /// Check whether the BLOB handle is read only
+        /**
+         * \return TRUE if the BLOB handle is readonly, FALSE otherweis
+        */
+        bool IsReadOnly();
+
+        /// Get the size of the associated BLOB
+        /**
+         * \return the BLOB size
+        */
+        int GetSize();
+
+        /// Rebind the associated BLOB to a new row
+        /**
+         * Please refer to the SQLite documentation for further information
+         * (see function sqlite3_blob_reopen)
+         * \param rowid id of the row to which the BLOB should be rebound
+         * \since SQLite3 version 3.7.4
+        */
+        void Rebind(wxLongLong rowid);
+
+        /// Finalize the BLOB
+        /**
+        */
+        void Finalize();
+
+private:
+        /// Check for valid BLOB
+        void CheckBlob();
+
+        void* m_db;       ///< associated SQLite3 database handle
+        void* m_blob;     ///< associated SQLite3 BLOB handle
+        bool  m_ok;       ///< flag whether the BLOB handle is correctly initialized
+        bool  m_writable; ///< flag whether the BLOB is writable or read only
+};
+
+/// Represents a named collection
+/**
+* A named collection is designed to facilitate using an array of
+* integers or strings as the right-hand side of an IN operator.
+* So instead of doing a prepared statement like this:
+*
+*     SELECT * FROM table WHERE x IN (?,?,?,...,?);
+*
+* And then binding indivdual integers to each of ? slots, an application
+* can create a named collection object (named "ex1" in the following
+* example), prepare a statement like this:
+*
+*     SELECT * FROM table WHERE x IN ex1;
+*
+* Then bind an array of integer or string values to the ex1 object
+* to run the statement.
+*
+* USAGE:
+*
+* One or more named collection objects can be created as follows:
+*
+*      wxSQLite3IntegerCollection p1, p2, p3;
+*      p1 = db.CreateIntegerCollection("ex1");
+*      p2 = db.CreateIntegerCollection("ex2");
+*      p3 = db.CreateIntegerCollection("ex3");
+*
+* Each call to CreateIntegerCollection generates a new virtual table
+* module and a singleton of that virtual table module in the TEMP
+* database.  Both the module and the virtual table instance use the
+* name given by the second parameter.  The virtual tables can then be
+* used in prepared statements:
+*
+*      SELECT * FROM t1, t2, t3
+*       WHERE t1.x IN ex1
+*         AND t2.y IN ex2
+*         AND t3.z IN ex3;
+*
+* Each integer array is initially empty.  New arrays can be bound to
+* an integer array as follows:
+*
+*     int a1[] = { 1, 2, 3, 4 };
+*     int a2[] = { 5, 6, 7, 8, 9, 10, 11 };
+*     wxArrayInt a3;
+*     // Fill a3
+*     p1.Bind(4, a1);
+*     p2.Bind(7, a2);
+*     p3.Bind(a3);
+*
+* A single named collection object can be rebound multiple times.  But do not
+* attempt to change the bindings of a named collection while it is in the middle
+* of a query.
+*
+* The array that holds the integer or string values is automatically allocated
+* by the Bind method.
+*
+* The named collection object is automatically destroyed when its corresponding
+* virtual table is dropped.  Since the virtual tables are created in the
+* TEMP database, they are automatically dropped when the database connection
+* closes so the application does not normally need to take any special
+* action to free the named collection objects.
+*/
+class EXTAPI wxSQLite3NamedCollection
+{
+public:
+        /// Constructor
+        wxSQLite3NamedCollection();
+
+        /// Copy constructor
+        wxSQLite3NamedCollection(const wxSQLite3NamedCollection& collection);
+
+        /// Assignement constructor
+        wxSQLite3NamedCollection& operator=(const wxSQLite3NamedCollection& collection);
+
+        /// Constructor (internal use only)
+        wxSQLite3NamedCollection(const wxString& collectionName, void* collectionData);
+
+        /// Destructor
+        virtual ~wxSQLite3NamedCollection();
+
+        /// Get the name of the collection
+        /**
+        * \return the name of the collection
+        */
+        const wxString& GetName()
+        {
+                return m_name;
+        }
+
+protected:
+        wxString m_name; ///< Name of the collection
+        void*    m_data; ///< Reference to the actual array of values representing the collection
+
+        friend class wxSQLite3Database;
+};
+
+/// Represents a named integer value collection
+class EXTAPI wxSQLite3IntegerCollection : public wxSQLite3NamedCollection
+{
+public:
+        /// Constructor
+        wxSQLite3IntegerCollection();
+
+        /// Copy constructor
+        wxSQLite3IntegerCollection(const wxSQLite3IntegerCollection& collection);
+
+        /// Assignement constructor
+        wxSQLite3IntegerCollection& operator=(const wxSQLite3IntegerCollection& collection);
+
+        /// Constructor (internal use only)
+        wxSQLite3IntegerCollection(const wxString& collectionName, void* collectionData);
+
+        /// Destructor
+        virtual ~wxSQLite3IntegerCollection();
+
+        /// Bind a new array of integer values
+        /**
+        * Bind a new array of integer values to this named collection object.
+        * \param integerCollection array of integer values to be bound
+        * \note Binding values to a named collection after closing the corresponding
+        * database results in undefined behaviour, i.e. the application is likely to crash.
+        */
+        void Bind(const wxArrayInt& integerCollection);
+
+        /// Bind a new array of integer values
+        /**
+        * Bind a new array of integer values to this named collection object.
+        * \param n number of elements in the array
+        * \param integerCollection array of integer values to be bound
+        * \note Binding values to a named collection after closing the corresponding
+        * database results in undefined behaviour, i.e. the application is likely to crash.
+        */
+        void Bind(int n, int* integerCollection);
+
+private:
+        friend class wxSQLite3Database;
+};
+
+/// Represents a named string value collection
+class EXTAPI wxSQLite3StringCollection : public wxSQLite3NamedCollection
+{
+public:
+        /// Constructor
+        wxSQLite3StringCollection();
+
+        /// Copy constructor
+        wxSQLite3StringCollection(const wxSQLite3StringCollection& collection);
+
+        /// Assignement constructor
+        wxSQLite3StringCollection& operator=(const wxSQLite3StringCollection& collection);
+
+        /// Constructor (internal use only)
+        wxSQLite3StringCollection(const wxString& collectionName, void* collectionData);
+
+        /// Destructor
+        virtual ~wxSQLite3StringCollection();
+
+        /// Bind a new array of integer values
+        /**
+        * Bind a new array of integer values to this named collection object.
+        * \param stringCollection array of integer values to be bound
+        * \note Binding values to a named collection after closing the corresponding
+        * database results in undefined behaviour, i.e. the application is likely to crash.
+        */
+        void Bind(const wxArrayString& stringCollection);
+
+private:
+        friend class wxSQLite3Database;
+};
+
+/// Represents a SQLite3 database object
+class EXTAPI wxSQLite3Database
+{
+public:
+        /// Default constructor
+        /**
+        * Initializes a SQLite database object.
+        * The SQLite database object can only be used in the same thread in which it was created.
+        */
+        wxSQLite3Database();
+
+        /// Destructor
+        /**
+        * Destructs a SQLite database object.
+        * The database will be closed implicitly if it is still open.
+        */
+        virtual ~wxSQLite3Database();
+
+        /// Open a SQLite3 database
+        /**
+        * Opens the sqlite database file "filename". The "filename" is UTF-8 encoded.
+        * If the database could not be opened (or created) successfully, then an exception is thrown.
+        * If the database file does not exist, then a new database will be created as needed.
+        * \param[in] fileName Name of the database file.
+        * \param[in] key Database encryption key.
+        * \param[in] flags Control over the database connection (see http://www.sqlite.org/c3ref/open.html for further information).
+        * Flag values are prefixed by WX to distinguish them from the original SQLite flag values.
+        */
+        void Open(const wxString& fileName, const wxString& key = wxEmptyString,
+                  int flags = WXSQLITE_OPEN_READWRITE | WXSQLITE_OPEN_CREATE);
+
+        /// Open a SQLite3 database using a binary key
+        /**
+        * Opens the sqlite database file "filename". The "filename" is UTF-8 encoded.
+        * If the database could not be opened (or created) successfully, then an exception is thrown.
+        * If the database file does not exist, then a new database will be created as needed.
+        * \param[in] fileName Name of the database file.
+        * \param[in] key Database encryption key.
+        * \param[in] flags Control over the database connection (see http://www.sqlite.org/c3ref/open.html for further information).
+        * Flag values are prefixed by WX to distinguish them from the original SQLite flag values.
+        */
+        void Open(const wxString& fileName, const wxMemoryBuffer& key,
+                  int flags = WXSQLITE_OPEN_READWRITE | WXSQLITE_OPEN_CREATE);
+
+        /// Check whether the database has been opened
+        /**
+        * \return TRUE if database has been opened, FALSE otherwise
+        */
+        bool IsOpen() const;
+
+        /// Close a SQLite3 database
+        /**
+        * Take care that all prepared statements have been finalized!
+        * Starting with version 3.6.0 SQLite has support to finialize all unfinalized
+        * prepared statements. The Close method has been changed to take advantage of
+        * this feature. Nevertheless it is recommended to explicitly finalize all
+        * wxSQLite3Statement instances before closing a database.
+        *
+        * NOTE: Finalizing all wxSQLite3Blob instances before closing a database is still required!
+        *
+        */
+        void Close();
+
+        /// Backup a SQLite3 database
+        /**
+        * This method is used to overwrite the contents of a database with the contents
+        * of this database. This is useful either for creating backups of the database or
+        * for copying an in-memory database to persistent files.
+        *
+        * NOTE: Exclusive access is required to the target database for the
+        * duration of the operation. However the source database is only
+        * read-locked while it is actually being read, it is not locked
+        * continuously for the entire operation. Thus, the backup may be
+        * performed on a live database without preventing other users from
+        * writing to the database for an extended period of time.
+        *
+        * NOTE: If the target database file already exists it must be a valid
+        * SQLite database, in case of an encrypted database the key used for
+        * backup must be the same as the key used for creation.
+        * If this does not hold true, the file should be deleted prior to
+        * performing the backup.
+        *
+        * \param[in] targetFileName Name of the target database file.
+        * \param[in] key Optional database encryption key for the target database.
+        * \param[in] sourceDatabaseName Optional name of the source database (default: 'main').
+        */
+        void Backup(const wxString& targetFileName, const wxString& key = wxEmptyString, const wxString& sourceDatabaseName = wxT("main"));
+
+        /// Backup a SQLite3 database
+        /**
+        * This method is used to overwrite the contents of a database with the contents
+        * of this database. This is useful either for creating backups of the database or
+        * for copying an in-memory database to persistent files.
+        *
+        * NOTE: Exclusive access is required to the target database for the
+        * duration of the operation. However the source database is only
+        * read-locked while it is actually being read, it is not locked
+        * continuously for the entire operation. Thus, the backup may be
+        * performed on a live database without preventing other users from
+        * writing to the database for an extended period of time.
+        *
+        * NOTE: If the target database file already exists it must be a valid
+        * SQLite database, in case of an encrypted database the key used for
+        * backup must be the same as the key used for creation.
+        * If this does not hold true, the file should be deleted prior to
+        * performing the backup.
+        *
+        * \param[in] targetFileName Name of the target database file.
+        * \param[in] key Binary database encryption key for the target database.
+        * \param[in] sourceDatabaseName Optional name of the source database (default: 'main').
+        */
+        void Backup(const wxString& targetFileName, const wxMemoryBuffer& key, const wxString& sourceDatabaseName = wxT("main"));
+
+        /// Restore a SQLite3 database
+        /**
+        * This method is used to restore the contents of this database with the contents
+        * of another database. This is useful either for restoring a backup of the database or
+        * for copying a persistent file to an in-memory database.
+        *
+        * NOTE: Exclusive access is required to the target database for the
+        * duration of the operation. However the source database is only
+        * read-locked while it is actually being read, it is not locked
+        * continuously for the entire operation. Thus, the backup may be
+        * performed on a live database without preventing other users from
+        * writing to the database for an extended period of time.
+        *
+        * \param[in] sourceFileName Name of the source database file.
+        * \param[in] key Optional database encryption key for the source database.
+        * \param[in] targetDatabaseName Optional name of the target database (default: 'main').
+        */
+        void Restore(const wxString& sourceFileName, const wxString& key = wxEmptyString, const wxString& targetDatabaseName = wxT("main"));
+
+        /// Restore a SQLite3 database
+        /**
+        * This method is used to restore the contents of this database with the contents
+        * of another database. This is useful either for restoring a backup of the database or
+        * for copying a persistent file to an in-memory database.
+        *
+        * NOTE: Exclusive access is required to the target database for the
+        * duration of the operation. However the source database is only
+        * read-locked while it is actually being read, it is not locked
+        * continuously for the entire operation. Thus, the backup may be
+        * performed on a live database without preventing other users from
+        * writing to the database for an extended period of time.
+        *
+        * \param[in] sourceFileName Name of the source database file.
+        * \param[in] key Optional binary database encryption key for the source database.
+        * \param[in] targetDatabaseName Optional name of the target database (default: 'main').
+        */
+        void Restore(const wxString& sourceFileName, const wxMemoryBuffer& key, const wxString& targetDatabaseName = wxT("main"));
+
+        /// Begin transaction
+        /**
+        * In SQLite transactions can be deferred, immediate, or exclusive.
+        * Deferred means that no locks are acquired on the database until the database is first accessed.
+        * Thus with a deferred transaction, the BEGIN statement itself does nothing. Locks are not
+        * acquired until the first read or write operation. The first read operation against a database
+        * creates a SHARED lock and the first write operation creates a RESERVED lock. Because the
+        * acquisition of locks is deferred until they are needed, it is possible that another thread or
+        * process could create a separate transaction and write to the database after the BEGIN on the
+        * current thread has executed. If the transaction is immediate, then RESERVED locks are acquired
+        * on all databases as soon as the BEGIN command is executed, without waiting for the database to
+        * be used. After a BEGIN IMMEDIATE, it is guaranteed that no other thread or process will be able
+        * to write to the database or do a BEGIN IMMEDIATE or BEGIN EXCLUSIVE. Other processes can continue
+        * to read from the database, however. An exclusive transaction causes EXCLUSIVE locks to be acquired
+        * on all databases. After a BEGIN EXCLUSIVE, it is guaranteed that no other thread or process will
+        * be able to read or write the database until the transaction is complete.
+        *
+        * \param[in] transactionType type of transaction (default: DEFERRED).
+        */
+        void Begin(wxSQLite3TransactionType transactionType = WXSQLITE_TRANSACTION_DEFAULT);
+
+        /// Commit transaction
+        /**
+        */
+        void Commit();
+
+        /// Rollback transaction
+        /**
+        * Rolls back a transaction or optionally to a previously set savepoint
+        *
+        * \param savepointName optional name of a previously set savepoint
+        */
+        void Rollback(const wxString& savepointName = wxEmptyString);
+
+        /// Get the auto commit state
+        /**
+        * Test to see whether or not the database connection is in autocommit mode.
+        * \return TRUE if it is and FALSE if not.
+        * Autocommit mode is on by default. Autocommit is disabled by a BEGIN statement
+        * and reenabled by the next COMMIT or ROLLBACK.
+        */
+        bool GetAutoCommit();
+
+        /// Set savepoint
+        /*
+        * Sets a savepoint with a given name
+        *
+        * \param savepointName the name of the savepoint
+        */
+        void Savepoint(const wxString& savepointName);
+
+        /// Release savepoint
+        /*
+        * Releases a savepoint with a given name
+        *
+        * \param savepointName the name of the savepoint
+        */
+        void ReleaseSavepoint(const wxString& savepointName);
+
+        /// Check whether a table with the given name exists
+        /**
+        * Checks the main database or a specific attached database for existence of a table
+        * with a given name.
+        *
+        * \param tableName name of the table
+        * \param databaseName optional name of an attached database
+        * \return TRUE if the table exists, FALSE otherwise
+        */
+        bool TableExists(const wxString& tableName, const wxString& databaseName = wxEmptyString);
+
+        /// Check whether a table with the given name exists in the main database or any attached database
+        /**
+        * \param tableName name of the table
+        * \param databaseNames list of the names of those databases in which the table exists
+        * \return TRUE if the table exists at least in one database, FALSE otherwise
+        */
+        bool TableExists(const wxString& tableName, wxArrayString& databaseNames);
+
+        /// Get a list containing the names of all attached databases including the main database
+        /**
+        * \param databaseNames contains on return the list of the database names
+        */
+        void GetDatabaseList(wxArrayString& databaseNames);
+
+        /// Get a list containing the names of all attached databases including the main database
+        /**
+        * \param databaseNames contains on return the list of the database names
+        * \param databaseFiles contains on return the list of the database file names
+        */
+        void GetDatabaseList(wxArrayString& databaseNames, wxArrayString& databaseFiles);
+
+        /// Enable or disable foreign key support
+        /**
+        * Starting with SQLite version 3.6.19 foreign key constraints can be enforced.
+        * Foreign key constraints are disabled by default (for backwards compatibility),
+        * so they must be enabled separately for each database connection.
+        * \note Future releases of SQLite might change so that foreign key constraints
+        * are enabled by default. No assumptions should be made about whether or not
+        * foreign keys are enabled by default
+        * \return TRUE if the requested action succeeded, FALSE otherwise
+        */
+        bool EnableForeignKeySupport(bool enable);
+
+        /// Check whether foreign key support is enabled for this database
+        /**
+        * \return TRUE if foreign key support is enabled, FALSE otherwise
+        */
+        bool IsForeignKeySupportEnabled();
+
+        /// Set SQLite journal mode
+        /**
+        * \param mode the journal mode to be set
+        * \param database the attached database for which the journal mode should be set. If not given then
+        *                 the journal mode of all attached databases is set.
+        * \return the active journal mode
+        * \note The journal mode for an in-memory database  is either MEMORY or OFF and can not be changed
+        * to a different value. An attempt to change the journal mode of an in-memory database to any setting
+        * other than MEMORY or OFF is ignored. Note also that the journal mode cannot be changed while a
+        * transaction is active.
+        * The WAL journaling mode uses a write-ahead log instead of a rollback journal to implement transactions.
+        * The WAL journaling mode is persistent; after being set it stays in effect across multiple database
+        * connections and after closing and reopening the database. A database in WAL journaling mode can only be
+        * accessed by SQLite version 3.7.0 or later.
+        */
+        wxSQLite3JournalMode SetJournalMode(wxSQLite3JournalMode mode, const wxString& database = wxEmptyString);
+
+        /// Get the active SQLite journal mode
+        /**
+        * \param database the attached database for which the journal mode should be queried (default: main)
+        * \return active journal mode
+        */
+        wxSQLite3JournalMode GetJournalMode(const wxString& database = wxEmptyString);
+
+        /// Check the syntax of an SQL statement given as a wxString
+        /**
+        * \param sql query string
+        * \return TRUE if the syntax is correct, FALSE otherwise
+        */
+        bool CheckSyntax(const wxString& sql);
+
+        /// Check the syntax of an SQL statement given as a statement buffer
+        /**
+        * \param sql query string
+        * \return TRUE if the syntax is correct, FALSE otherwise
+        */
+        bool CheckSyntax(const wxSQLite3StatementBuffer& sql);
+
+        /// Check the syntax of an SQL statement given as a utf-8 character string
+        /**
+        * \param sql query string
+        * \return TRUE if the syntax is correct, FALSE otherwise
+        */
+        bool CheckSyntax(const char* sql);
+
+        /// Execute a insert, update or delete SQL statement given as a wxString
+        /**
+        * \param sql query string
+        * \return the number of database rows that were changed (or inserted or deleted)
+        */
+        int ExecuteUpdate(const wxString& sql);
+
+        /// Execute a insert, update or delete SQL statement given as a statement buffer
+        /**
+        * \param sql query string
+        * \return the number of database rows that were changed (or inserted or deleted)
+        */
+        int ExecuteUpdate(const wxSQLite3StatementBuffer& sql);
+
+        /// Execute a insert, update or delete SQL statement given as a utf-8 character string
+        /**
+        * \param sql query string
+        * \return the number of database rows that were changed (or inserted or deleted)
+        */
+        int ExecuteUpdate(const char* sql);
+
+        /// Execute a SQL query statement given as a wxString
+        /**
+        * \param sql query string
+        * \return result set instance
+        */
+        wxSQLite3ResultSet ExecuteQuery(const wxString& sql);
+
+        /// Execute a SQL query statement given as a statement buffer
+        /**
+        * \param sql query string
+        * \return result set instance
+        */
+        wxSQLite3ResultSet ExecuteQuery(const wxSQLite3StatementBuffer& sql);
+
+        /// Execute a SQL query statement given as a utf-8 character string
+        /**
+        * \param sql query string
+        * \return result set instance
+        */
+        wxSQLite3ResultSet ExecuteQuery(const char* sql);
+
+        /// Execute a scalar SQL query statement given as a wxString
+        /**
+        * Allows to easily retrieve the result of queries returning a single integer result
+        * like SELECT COUNT(*) FROM table WHERE condition.
+        * \param sql query string
+        * \return first column of first row as an int
+        */
+        int ExecuteScalar(const wxString& sql);
+
+        /// Execute a scalar SQL query statement given as a statement buffer
+        /**
+        * Allows to easily retrieve the result of queries returning a single integer result
+        * like SELECT COUNT(*) FROM table WHERE condition.
+        * \param sql query string
+        * \return first column of first row as an int
+        */
+        int ExecuteScalar(const wxSQLite3StatementBuffer& sql);
+
+        /// Execute a scalar SQL query statement given as a utf-8 character string
+        /**
+        * Allows to easily retrieve the result of queries returning a single integer result
+        * like SELECT COUNT(*) FROM table WHERE condition.
+        * \param sql query string
+        * \return first column of first row as an int
+        */
+        int ExecuteScalar(const char* sql);
+
+        /// Get the result table for a SQL query statement given as a wxString
+        /**
+        * Returns all resulting rows of the query for later processing.
+        * \param sql query string
+        * \return table instance
+        */
+        wxSQLite3Table GetTable(const wxString& sql);
+
+        /// Get the result table for a SQL query statement given as a statement buffer
+        /**
+        * Returns all resulting rows of the query for later processing.
+        * \param sql query string
+        * \return table instance
+        */
+        wxSQLite3Table GetTable(const wxSQLite3StatementBuffer& sql);
+
+        /// Get the result table for a SQL query statement given as a utf-8 character string
+        /**
+        * Returns all resulting rows of the query for later processing.
+        * \param sql query string
+        * \return table instance
+        */
+        wxSQLite3Table GetTable(const char* sql);
+
+        /// Prepare a SQL query statement given as a wxString for parameter binding
+        /**
+        * \param sql query string
+        * \return statement instance
+        */
+        wxSQLite3Statement PrepareStatement(const wxString& sql);
+
+        /// Prepare a SQL query statement given as a statement buffer for parameter binding
+        /**
+        * \param sql query string
+        * \return statement instance
+        */
+        wxSQLite3Statement PrepareStatement(const wxSQLite3StatementBuffer& sql);
+
+        /// Prepare a SQL query statement given as a utf-8 character string for parameter binding
+        /**
+        * \param sql query string
+        * \return statement instance
+        */
+        wxSQLite3Statement PrepareStatement(const char* sql);
+
+        /// Get the row id of last inserted row
+        /**
+        * Each entry in an SQLite table has a unique integer key.
+        * (The key is the value of the INTEGER PRIMARY KEY column if there is such a column,
+        * otherwise the key is generated at random. The unique key is always available as the
+        * ROWID, OID, or _ROWID_ column.)
+        * \return the integer key of the most recent insert in the database.
+        */
+        wxLongLong GetLastRowId();
+
+        /// Get handle to a read only BLOB
+        /**
+        * \param rowId
+        * \param columnName
+        * \param tableName
+        * \param dbName
+        */
+        wxSQLite3Blob GetReadOnlyBlob(wxLongLong rowId,
+                                      const wxString& columnName,
+                                      const wxString& tableName,
+                                      const wxString& dbName = wxEmptyString);
+
+        /// Get handle to a writable BLOB
+        /**
+        * \param rowId
+        * \param columnName
+        * \param tableName
+        * \param dbName
+        */
+        wxSQLite3Blob GetWritableBlob(wxLongLong rowId,
+                                      const wxString& columnName,
+                                      const wxString& tableName,
+                                      const wxString& dbName = wxEmptyString);
+
+        /// Get handle to a BLOB
+        /**
+        * \param rowId
+        * \param columnName
+        * \param tableName
+        * \param dbName
+        * \param writable
+        */
+        wxSQLite3Blob GetBlob(wxLongLong rowId,
+                              const wxString& columnName,
+                              const wxString& tableName,
+                              const wxString& dbName = wxEmptyString,
+                              bool writable = true);
+
+        /// Create a named integer value collection
+        /**
+        * Invoke this method to create a specific instance of an integer collection object.
+        * Initially the created collection is empty. Use it's Bind method to actually bind
+        * an array of values to the collection.
+        * \param collectionName name of the collection
+        * \return the new integer collection object.
+        *
+        * Each integer value collection object corresponds to a virtual table in the TEMP table
+        * with a name of collectionName.
+        *
+        * The virtual table will be dropped implicitly when the database connection is closed.
+        */
+        wxSQLite3IntegerCollection CreateIntegerCollection(const wxString& collectionName);
+
+        /// Create a named string value collection
+        /**
+        * Invoke this method to create a specific instance of a string collection object.
+        * Initially the created collection is empty. Use it's Bind method to actually bind
+        * an array of values to the collection.
+        * \param collectionName name of the collection
+        * \return the new string collection object.
+        *
+        * Each integer value collection object corresponds to a virtual table in the TEMP table
+        * with a name of collectionName.
+        *
+        * The virtual table will be dropped implicitly when the database connection is closed.
+        */
+        wxSQLite3StringCollection CreateStringCollection(const wxString& collectionName);
+
+        /// Interrupt a long running query
+        /**
+        * Causes any pending database operation to abort and return at its earliest opportunity.
+        * This method is typically called in response to a user action such as pressing "Cancel"
+        * or Ctrl-C where the user wants a long query operation to halt immediately.
+        */
+        void Interrupt();
+
+        /// Set the busy timeout
+        /**
+        * This method sets a busy handler that sleeps for a while when a table is locked.
+        * The handler will sleep multiple times until at least "ms" milliseconds of sleeping
+        * have been done.
+        * Calling this routine with an argument less than or equal to zero turns off all busy handlers.
+        * \param milliSeconds timeout in milliseconds
+        */
+        void SetBusyTimeout(int milliSeconds);
+
+        /// Create a user-defined scalar function
+        /**
+        * Registers a SQL scalar function with the database.
+        * \param name
+        * \param argCount number of arguments the scalar function takes.
+        *                 If this argument is -1 then the scalar function may take any number of arguments.
+        * \param function instance of an scalar function
+        * \return TRUE on successful registration, FALSE otherwise
+        */
+        bool CreateFunction(const wxString& name, int argCount, wxSQLite3ScalarFunction& function);
+
+        /// Create a user-defined aggregate function
+        /**
+        * Registers a SQL aggregate function with the database.
+        * \param name
+        * \param argCount number of arguments the aggregate function takes.
+        *                 If this argument is -1 then the aggregate function may take any number of arguments.
+        * \param function instance of an aggregate function
+        * \return TRUE on successful registration, FALSE otherwise
+        */
+        bool CreateFunction(const wxString& name, int argCount, wxSQLite3AggregateFunction& function);
+
+        /// Create a user-defined authorizer function
+        /**
+        * Registers an authorizer object with the SQLite library. The authorizer is invoked
+        * (at compile-time, not at run-time) for each attempt to access a column of a table in the database.
+        * The authorizer should return SQLITE_OK if access is allowed, SQLITE_DENY if the entire SQL statement
+        * should be aborted with an error and SQLITE_IGNORE if the column should be treated as a NULL value.
+        * \param authorizer instance of an authorizer function
+        * \return TRUE on successful registration, FALSE otherwise
+        */
+        bool SetAuthorizer(wxSQLite3Authorizer& authorizer);
+
+        /// Create a user-defined commit callback function
+        /**
+        * Registers a callback function object to be invoked whenever a new transaction is committed.
+        * If the callback function returns non-zero, then the commit is converted into a rollback.
+        * Registering a NULL function object disables the callback. Only a single commit hook callback
+        * can be registered at a time.
+        * \param commitHook address of an instance of a commit callback function
+        */
+        void SetCommitHook(wxSQLite3Hook* commitHook);
+
+        /// Create a user-defined rollback callback function
+        /**
+        * Registers a callback function object to be invoked whenever a transaction is rolled back.
+        * Registering a NULL function object disables the callback. Only a single rollback hook callback
+        * can be registered at a time.
+        *
+        * For the purposes of this API, a transaction is said to have been rolled back if an explicit
+        * "ROLLBACK" statement is executed, or an error or constraint causes an implicit rollback to occur.
+        * The callback is not invoked if a transaction is automatically rolled back because the database
+        * connection is closed.
+        * \param rollbackHook address of an instance of a rollback callback function
+        */
+        void SetRollbackHook(wxSQLite3Hook* rollbackHook);
+
+        /// Create a user-defined update callback function
+        /**
+        * Registers a callback function object to be invoked whenever a row is updated, inserted or deleted.
+        * Registering a NULL function object disables the callback. Only a single commit hook callback
+        * can be registered at a time.
+        * The update hook is not invoked when internal system tables are modified (i.e. sqlite_master and sqlite_sequence).
+        * \param updateHook address of an instance of an update callback function
+        */
+        void SetUpdateHook(wxSQLite3Hook* updateHook);
+
+        /// Create a user-defined Write Ahead Log callback function
+        /**
+        * Registers a callback function object to be invoked whenever a commit has taken place in WAL journal mode.
+        * Registering a NULL function object disables the callback. Only a single Write Ahead Log hook callback
+        * can be registered at a time.
+        * \param walHook address of an instance of a Write Ahead Log callback function
+        */
+        void SetWriteAheadLogHook(wxSQLite3Hook* walHook);
+
+        /// Checkpoint database in write-ahead log mode
+        /**
+        * Causes an optionally named database to be checkpointed.
+        * If no database name is given, then a checkpoint is run on all databases associated with this
+        * database instance. If the database instance is not in write-ahead log mode then this method
+        * is a harmless no-op.
+        * \param database name of a database to be checkpointed
+        * \param mode checkpoint mode, allowed values: WXSQLITE_CHECKPOINT_PASSIVE (default),
+        *             WXSQLITE_CHECKPOINT_FULL, WXSQLITE_CHECKPOINT_RESTART
+        *             (see http://www.sqlite.org/c3ref/wal_checkpoint_v2.html)
+        * \param logFrameCount size of write-ahead log in frames
+        * \param ckptFrameCount number of frames actually checkpointed
+        * \note The frame counts are set to zero if the SQLite version is below 3.7.6.
+        */
+        void WriteAheadLogCheckpoint(const wxString& database, int mode = WXSQLITE_CHECKPOINT_PASSIVE,
+                                     int* logFrameCount = NULL, int* ckptFrameCount = NULL);
+
+        /// Automatically checkpoint database in write-ahead log mode
+        /**
+        * Causes any database associated with this database instance to automatically checkpoint after
+        * committing a transaction if there are N or more frames in the write-ahead log file.
+        * Passing zero or a negative value as the nFrame parameter disables automatic checkpoints entirely.
+        * \param frameCount frame threshold
+        */
+        void AutoWriteAheadLogCheckpoint(int frameCount);
+
+        /// Create a user-defined collation sequence
+        /**
+        * Registers a callback function object to be invoked whenever this collation is needed
+        * in comparing strings.
+        * Registering a NULL function object disables the specified collation sequence.
+        * \param name name of a user-defined collation sequence
+        * \param collation address of an instance of a user-defined collation sequence
+        */
+        void SetCollation(const wxString& name, wxSQLite3Collation* collation);
+
+        /// Return meta information about a specific column of a specific database table
+        /**
+        * \param dbName is either the name of the database (i.e. "main", "temp" or an attached database) or an empty string. If it is an empty string all attached databases are searched for the table.
+        * \param tableName name of the database table
+        * \param columnName name of the database column
+        * \param dataType declared data type of the column. Pass NULL if information not needed.
+        * \param collation name of the collation sequence. Pass NULL if information is not needed.
+        * \param notNull output flag whether the column has a not null constraint. Pass NULL if information not needed.
+        * \param primaryKey output flag whether the column is part of the primary key. Pass NULL if information not needed.
+        * \param autoIncrement output flag whether the column is an auto increment column. Pass NULL if information not needed.
+        *
+        * This method is only available if WXSQLITE3_HAVE_METADATA is defined and SQLite has been compiled with SQLITE_ENABLE_COLUMN_METADATA defined.
+        */
+        void GetMetaData(const wxString& dbName, const wxString& tableName, const wxString& columnName,
+                         wxString* dataType = NULL, wxString* collation = NULL,
+                         bool* notNull = NULL, bool* primaryKey = NULL, bool* autoIncrement = NULL);
+
+        /// Load a database extension
+        /**
+        * \param fileName Name of the shared library containing extension.
+        * \param entryPoint Name of the entry point.
+        */
+        void LoadExtension(const wxString& fileName, const wxString& entryPoint = wxT("sqlite3_extension_init"));
+
+        /// Enable or disable loading of database extensions
+        /**
+        * \param enable Flag whether to enable (TRUE) or disable (FALSE) loadable extensions
+        */
+        void EnableLoadExtension(bool enable);
+
+        /// Change the encryption key of the database
+        /**
+        * If the database is currently not encrypted, this method will encrypt it.
+        * If an empty key (with key length == 0) is given, the database is decrypted.
+        *
+        * \param newKey The new encryption key (will be converted to UTF-8)
+        */
+        void ReKey(const wxString& newKey);
+
+        /// Change the encryption key of the database
+        /**
+        * If the database is currently not encrypted, this method will encrypt it.
+        * If an empty key (with key length == 0) is given, the database is decrypted.
+        *
+        * \param newKey The new encryption key
+        */
+        void ReKey(const wxMemoryBuffer& newKey);
+
+        /// Check whether the database is encrypted
+        /**
+        * Check whether the database has been opened using an encryption key.
+        *
+        * \return TRUE if database is encrypted, FALSE otherwise
+        */
+        bool IsEncrypted() const
+        {
+                return m_isEncrypted;
+        }
+
+        /// Query the value of a database limit
+        /**
+        * This method allows to query several database limits. Consult the SQLite
+        * documentation for further explanation.
+        *
+        * \param id The identifier of the limit to be queried
+        * \return the current value of the queried limit
+        */
+        int GetLimit(wxSQLite3LimitType id);
+
+        /// Change a database limit to a new value
+        /**
+        * This method allows to change several database limits. Consult the SQLite
+        * documentation for further explanation.
+        *
+        * \param id The identifier of the limit to be queried
+        * \param newValue The new value of the limit to be set
+        * \return the previous value of the specified limit
+        */
+        int SetLimit(wxSQLite3LimitType id, int newValue);
+
+        /// Convert database limit type to string
+        /**
+        * \param type The database limit type to be converted to string representation.
+        */
+        static wxString LimitTypeToString(wxSQLite3LimitType type);
+
+        /// Initialize the SQLite library
+        /**
+        * Starting with SQLite version 3.6.0 there is a new method to initialize
+        * the SQLite library. Currently an explicit call to this method is not
+        * required, but this behaviour might change in the future of SQLite.
+        * Therefore it is recommended to call this method once before accessing
+        * any SQLite databases.
+        */
+        static void InitializeSQLite();
+
+        /// Shutdown the SQLite library
+        /**
+        * Starting with SQLite version 3.6.0 there is a new method to shutdown
+        * the SQLite library. Currently an explicit call to this method is not
+        * required, but this behaviour might change in the future of SQLite.
+        * Therefore it is recommended to call this method once when no further
+        * access to any SQLite databases is required.
+        */
+        static void ShutdownSQLite();
+
+        /// Get random bytes
+        /**
+        * SQLite contains a high-quality pseudo-random number generator.
+        * This method allows to access it for application specofoc purposes.
+        *
+        * \param n The amount of random bytes to be created
+        * \param random A memory buffer containing the random bytes on return
+        */
+        static bool Randomness(int n, wxMemoryBuffer& random);
+
+        /// Enable or disable SQLite shared cache
+        /**
+        * The cache sharing mode set effects all subsequent database connections.
+        * Existing database connections continue use the sharing mode that was in effect
+        * at the time they were opened.
+        *
+        * Virtual tables cannot be used with a shared cache.
+        */
+        static void SetSharedCache(bool enable);
+
+        /// Check whether SQLite shared cache is enabled
+        /**
+        * \return TRUE if the SQLite shared cache is enabled, FALSE otherwise
+        */
+        static bool IsSharedCacheEnabled()
+        {
+                return ms_sharedCacheEnabled;
+        }
+
+        /// Get the version of the underlying SQLite3 library
+        /**
+        * \return a string which contains the version number of the library
+        */
+        static wxString GetVersion();
+
+        /// Get the source id of the underlying SQLite3 library
+        /**
+        * \return a string which contains the source id of the library
+        */
+        static wxString GetSourceId();
+
+        /// Check SQLite compile option
+        /**
+        * Check whether the compile option with a given name has been used on building SQLite.
+        * The SQLITE_ prefix may be omitted from the option name passed to this method.
+        *
+        * \param optionName name of the compile option to be queried
+        * \return TRUE if the compile option was in use, FALSE otherwise
+        *
+        * \note If the option name is unknown or if the SQLite version is lower than 3.6.23
+        * this method returns FALSE.
+        */
+        static bool CompileOptionUsed(const wxString& optionName);
+
+        /// Get SQLite compile option name
+        /**
+        * Get the name of a SQLite compile option at a given index.
+        * This method allows interating over the list of options that were defined
+        * at compile time. If the option index is out of range, an empty string is returned.
+        * The SQLITE_ prefix is omitted from any strings returned by this method.
+        *
+        * \param optionIndex Index of the compile option
+        * \return a string containing the name of the n-th
+        */
+        static wxString GetCompileOptionName(int optionIndex);
+
+        /// Convert journal mode to/from string
+        /**
+        * \param mode the wxSQLite3JournalMode enum value signifying the desired journal mode.
+        * \return the string representation of the journal mode
+        */
+        static wxString ConvertJournalMode(wxSQLite3JournalMode mode);
+
+        /// Convert journal mode to/from string
+        /**
+        * \param mode the string representation of the desired journal mode.
+        * \return the enum representation of the journal mode
+        */
+        static wxSQLite3JournalMode ConvertJournalMode(const wxString& mode);
+
+        /// Check whether wxSQLite3 has been compiled with encryption support
+        /**
+        * \return TRUE if encryption support is enabled, FALSE otherwise
+        */
+        static bool HasEncryptionSupport();
+
+        /// Check whether wxSQLite3 has been compiled with meta data support
+        /**
+        * \return TRUE if meta data support is enabled, FALSE otherwise
+        */
+        static bool HasMetaDataSupport();
+
+        /// Check whether wxSQLite3 has been compiled with loadable extension support
+        /**
+        * \return TRUE if loadable extension support is enabled, FALSE otherwise
+        */
+        static bool HasLoadExtSupport();
+
+        /// Check whether wxSQLite3 has been compiled with support for named collections
+        /**
+        * \return TRUE if named collection support is enabled, FALSE otherwise
+        */
+        static bool HasNamedCollectionSupport();
+
+        /// Check whether wxSQLite3 has support for incremental BLOBs
+        /**
+        * \return TRUE if incremental BLOB support is available, FALSE otherwise
+        */
+        static bool HasIncrementalBlobSupport();
+
+        /// Check whether wxSQLite3 has support for SQLite savepoints
+        /**
+        * \return TRUE if SQLite savepoints are supported, FALSE otherwise
+        */
+        static bool HasSavepointSupport();
+
+        /// Check whether wxSQLite3 has support for SQLite backup/restore
+        /**
+        * \return TRUE if SQLite backup/restore is supported, FALSE otherwise
+        */
+        static bool HasBackupSupport();
+
+        /// Check whether wxSQLite3 has support for SQLite write-ahead log
+        /**
+        * \return TRUE if SQLite write-ahead log is supported, FALSE otherwise
+        */
+        static bool HasWriteAheadLogSupport();
+
+protected:
+        /// Access SQLite's internal database handle
+        void* GetDatabaseHandle()
+        {
+                return m_db;
+        }
+
+        /// Activate the callback for needed collations for this database
+        /**
+        * To avoid having to register all collation sequences before a database can be used,
+        * a single callback function may be registered with the database handle to be called
+        * whenever an undefined collation sequence is required.
+        */
+        void SetCollationNeededCallback();
+
+        /// Request the instantiation of a user defined collation sequence
+        /**
+        * This method is called for every undefined collation sequence.
+        * In a derived database class this method should call SetCollation registering an
+        * appropriate collation class instance.
+        * \param collationName name of the collation which is needed for string comparison
+        */
+        virtual void SetNeededCollation(const wxString& WXUNUSED(collationName)) {}
+
+        /// Execute a comparison using a user-defined collation
+        static int ExecComparisonWithCollation(void* collation, int len1, const void* txt1, int len2, const void* txt2);
+
+        /// Execute callback for needed collation sequences
+        static void ExecCollationNeeded(void* db, void* internalDb, int eTextRep, const char* name);
+
+private:
+        /// Private copy constructor
+        wxSQLite3Database(const wxSQLite3Database& db);
+
+        /// Private assignment constructor
+        wxSQLite3Database& operator=(const wxSQLite3Database& db);
+
+        /// Prepare a SQL statement (internal use only)
+        void* Prepare(const char* sql);
+
+        /// Check for valid database connection
+        void CheckDatabase();
+
+        void* m_db;             ///< associated SQLite3 database
+        int   m_busyTimeoutMs;  ///< Timeout in milli seconds
+        bool  m_isEncrypted;    ///< Flag whether the database is encrypted or not
+
+        static bool  ms_sharedCacheEnabled;        ///< Flag whether SQLite shared cache is enabled
+        static bool  ms_hasEncryptionSupport;      ///< Flag whether wxSQLite3 has been compiled with encryption support
+        static bool  ms_hasMetaDataSupport;        ///< Flag whether wxSQLite3 has been compiled with meta data support
+        static bool  ms_hasLoadExtSupport;         ///< Flag whether wxSQLite3 has been compiled with loadable extension support
+        static bool  ms_hasNamedCollectionSupport; ///< Flag whether wxSQLite3 has been compiled with support for named collections
+        static bool  ms_hasIncrementalBlobSupport; ///< Flag whether wxSQLite3 has support for incremental BLOBs
+        static bool  ms_hasSavepointSupport;       ///< Flag whether wxSQLite3 has support for SQLite savepoints
+        static bool  ms_hasBackupSupport;          ///< Flag whether wxSQLite3 has support for SQLite backup/restore
+        static bool  ms_hasWriteAheadLogSupport;   ///< Flag whether wxSQLite3 has support for SQLite write-ahead log
+};
+
+/// RAII class for managing transactions
+/***
+* This object allows easy managment of transaction. It con only be
+* created on the stack. This guarantees that the destructor is called
+* at the moment it goes out of scope. Usage:
+* \code
+* void doDB(wxSQLite3Database *db)
+* {
+*   wxSQLite3Transaction t(db);
+*   doDatabaseOperations();
+*   t.Commit();
+* }
+* \endcode
+* In case doDatabseOperations() fails by throwing an exception,
+* the transaction is automatically rolled back. If it succedes,
+* Commit() commits the changes to the db and the destructor
+* of Transaction does nothing.
+*/
+class EXTAPI wxSQLite3Transaction
+{
+public:
+        /// Constructor. Start the Transaction.
+        /**
+          * The constructor starts the transaction.
+          * \param db Pointer to the open Database. The pointer to the database
+          * is NOT freed on destruction!
+          * \param transactionType Type of the transaction to be opened.
+          */
+        explicit wxSQLite3Transaction(wxSQLite3Database* db, wxSQLite3TransactionType transactionType = WXSQLITE_TRANSACTION_DEFAULT);
+
+        /// Destructor.
+        /**
+          * The destructor does nothing if the changes were already commited (see commit()).
+          * In case the changes were not commited, a call to the destructor rolls back the
+          * transaction.
+          */
+        ~wxSQLite3Transaction();
+
+        /// Commits the transaction
+        /**
+          * Commits the transaction if active. If not, it does nothing.
+          * After the commit, the transaction is not active.
+          */
+        void Commit();
+
+        /// Rolls back the transaction
+        /**
+          * Rolls back the transaction if active. If not, it does nothing.
+          * After the rollback, the transaction is not active.
+          */
+        void Rollback();
+
+        /// Determins wether the transaction is open or not
+        /**
+          * \return TRUE if the constructor successfully opend the transaction, false otherwise.
+          * After committing the transaction, active returns false.
+          */
+        inline bool IsActive()
+        {
+                return m_database != NULL;
+        }
+
+private:
+        /// New operator (May only be created on the stack)
+        static void *operator new(size_t size);
+
+        /// Delete operator (May not be deleted (for symmetry))
+        static void operator delete(void *ptr);
+
+        /// Copy constructor (Must not be copied)
+        wxSQLite3Transaction(const wxSQLite3Transaction&);
+
+        /// Assignment operator (Must not be assigned)
+        wxSQLite3Transaction& operator=(const wxSQLite3Transaction&);
+
+        wxSQLite3Database* m_database; ///< Pointer to the associated database (no ownership)
+};
+
+#if wxUSE_REGEX
+
+/// User defined function for REGEXP operator
+/**
+*/
+class EXTAPI wxSQLite3RegExpOperator : public wxSQLite3ScalarFunction
+{
+public:
+        /// Constructor
+        wxSQLite3RegExpOperator(int flags = wxRE_DEFAULT);
+
+        /// Virtual destructor
+        virtual ~wxSQLite3RegExpOperator();
+
+        /// Execute the scalar function
+        /**
+        * This method is invoked for each appearance of the scalar function in the SQL query.
+        * \param ctx function context which can be used to access arguments and result value
+        */
+        virtual void Execute(wxSQLite3FunctionContext& ctx);
+
+private:
+        wxString m_exprStr; ///< Last regular expression string
+        wxRegEx  m_regEx;   ///< Regular expression cache (currently only 1 instance)
+        int      m_flags;   ///< Flags for regular expression
+};
+
+#endif // wxUSE_REGEX
+
+#endif
+
diff --git a/cadxcore/wx/wxsqlite3/wxsqlite3def.h b/cadxcore/wx/wxsqlite3/wxsqlite3def.h
new file mode 100644
index 0000000..df1a068
--- /dev/null
+++ b/cadxcore/wx/wxsqlite3/wxsqlite3def.h
@@ -0,0 +1,421 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        wxsqlite3def.h
+// Purpose:     wxWidgets wrapper around the SQLite3 embedded database library.
+// Author:      Ulrich Telle
+// Modified by:
+// Created:     2005-07-14
+// Changes:     2005-10-03  - Upgrade to SQLite3 version 3.2.7
+//              2005-10-09  - Corrected error in wxSQLite3Table::FindColumnIndex
+//              2005-10-30  - Added wxGTK build support
+//              2005-11-01  - Corrected wxSQLite3ResultSet::GetInt64.
+//                            Added wxSQLite3Table::GetInt64
+//              2005-11-09  - Optionally load SQLite library dynamically
+//              2006-02-01  - Upgrade to SQLite3 version 3.3.3
+//              2006-02-12  - Upgrade to SQLite3 version 3.3.4 (wxMSW only)
+//              2006-03-15  - Fixed a bug in wxSQLite3Database::Prepare
+//                            Added wxSQLite3Database::IsOpen for convenience
+//              2006-06-11  - Upgrade to SQLite3 version 3.3.6
+//                            Added support for optional SQLite meta data methods
+//              2007-01-11  - Upgrade to SQLite3 version 3.3.10
+//                            Added support for BLOBs as wxMemoryBuffer objects
+//                            Added support for loadable extensions
+//                            Optional support for key based database encryption
+//              2007-02-12  - Upgrade to SQLite3 version 3.3.12
+//              2007-05-01  - Upgrade to SQLite3 version 3.3.17
+//              2007-10-28  - Upgrade to SQLite3 version 3.5.2
+//              2007-11-17  - Fixed a bug in wxSQLite3Database::Close
+//                            Eliminated several compile time warnings
+//              2007-12-19  - Upgrade to SQLite3 version 3.5.4
+//                            Fixed a bug in wxSQLite3Database::Begin
+//              2008-01-05  - Added support for shared cache mode
+//                            Added support for access to original SQL statement
+//                            for prepared statements (requires SQLite 3.5.3 or above)
+//              2008-04-27  - Upgrade to SQLite3 version 3.5.8
+//                            Fixed several minor issues in the build files
+//              2008-06-28  - Upgrade to SQLite3 version 3.5.9
+//              2008-07-19  - Upgrade to SQLite3 version 3.6.0
+//              2008-09-04  - Upgrade to SQLite3 version 3.6.2
+//              2008-11-22  - Upgrade to SQLite3 version 3.6.6
+//              2008-12-18  - Upgrade to SQLite3 version 3.6.7
+//                            Fixed a bug in method wxSQLite3Table::GetDouble
+//              2009-01-14  - Upgrade to SQLite3 version 3.6.10
+//                            Added savepoint support
+//                            Added IsOk methods to some classes
+//              2009-02-21  - Upgrade to SQLite3 version 3.6.11
+//                            Added user defined function class for REGEXP operator
+//                            Added support for SQLite backup/restore API
+//              2009-09-12  - Upgrade to SQLite3 version 3.6.18
+//                            Fixed a potential memory leak in wxSQLite3Statement class
+//              2009-11-07  - Upgrade to SQLite3 version 3.6.20
+//              2010-02-05  - Upgrade to SQLite3 version 3.6.22
+//              2010-03-11  - Upgrade to SQLite3 version 3.6.23
+//              2010-07-25  - Upgrade to SQLite3 version 3.7.0
+//              2010-10-10  - Upgrade to SQLite3 version 3.7.3
+//              2010-12-11  - Upgrade to SQLite3 version 3.7.4
+//              2011-02-09  - Upgrade to SQLite3 version 3.7.5
+//              2011-04-17  - Upgrade to SQLite3 version 3.7.6.1
+//
+// Copyright:   (c) Ulrich Telle
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+/// \file wxsqlite3def.h Compile time switches for the wxSQLite3 class
+
+/** \mainpage wxSQLite3
+
+\section intro What is wxSQLite3?
+
+  \b wxSQLite3 is a C++ wrapper around the public domain <a href="http://www.sqlite.org">SQLite 3.x</a> database
+  and is specifically designed for use in programs based on the \b wxWidgets library.
+
+  Several solutions already exist to access SQLite databases. To name just a few:
+
+  - <a href="http://sourceforge.net/projects/wxsqlite">wxSQLite</a> :
+    This is a wxWidgets wrapper for version 2.8.x of SQLite.
+    SQLite version 3.x has a lot more features - which are not supported by this wrapper.
+
+  - <a href="http://www.codeproject.com/database/CppSQLite.asp">CppSQLite</a> :
+    Not wxWidgets specific, but with (partial) support for the newer version 3.x of SQLite.
+
+  - <a href="http://wxcode.sf.net">DatabaseLayer</a> :
+    This is a database abstraction providing a JDBC-like interface to database I/O.
+    In the current version SQLite3, PostgreSQL, MySQL, Firebird, and ODBC database backends
+    are supported.
+
+  The component \b wxSQLite3 was inspired by all three mentioned SQLite wrappers.
+  \b wxSQLite3 does not try to hide the underlying database, in contrary almost all special features
+  of the SQLite3 version 3.x are supported, like for example the creation of user defined
+  scalar or aggregate functions.
+
+  Since SQLite stores strings in UTF-8 encoding, the wxSQLite3 methods provide automatic conversion
+  between wxStrings and UTF-8 strings. The methods ToUTF8 and FromUTF8 of the wxString class (available
+  since wxWidgets 2.8.4) are used for the conversion. Special care has to be taken if external administration
+  tools are used to modify the database contents, since not all of these tools operate in Unicode or UTF-8 mode.
+
+\section version Version history
+
+<dl>
+
+<dt><b>2.1.1</b> - <i>April 2011</i></dt>
+<dd>
+Upgrade to SQLite version 3.7.6.1<br>
+Added convenience method wxSQLite3Statement::ExecuteScalar<br>
+Changed write-ahead log checkpoint method to new version (v2)<br>
+
+</dd>
+<dt><b>2.1.0</b> - <i>March 2011</i></dt>
+<dd>
+Upgrade to SQLite version 3.7.5<br>
+Added wxSQLite+, a database administration application written by Fred Cailleau-Lepetit,
+as a GUI sample for wxSQLite3. Minor adjustments were applied to make wxSQLite+
+compatible with wxWidgets 2.9.x. Please note that wxSQLite+ is under GPL license.<br>
+
+</dd>
+<dt><b>2.0.2</b> - <i>December 2010</i></dt>
+<dd>
+Upgrade to SQLite version 3.7.4<br>
+Added support for rebinding a BLOB object to a new row<br>
+Added support for determining if an SQL statement writes the database<br>
+
+</dd>
+<dt><b>2.0.1</b> - <i>October 2010</i></dt>
+<dd>
+Upgrade to SQLite version 3.7.3<br>
+Added parameter transferStatementOwnership to method wxSQLite3Statement::ExecuteQuery
+to allow using the returned result set beyond the life time of the wxSQLite3Statement instance<br>
+Eliminated the use of sqlite3_mprintf which caused linker problems when loading SQLite dynamically<br>
+
+</dd>
+<dt><b>2.0.0</b> - <i>July 2010</i></dt>
+<dd>
+Upgrade to SQLite version 3.7.0<br>
+Fixed a bug in class wxSQLite3ResultSet<br>
+Added support for SQLite's write-ahead log journal mode<br>
+Added support for named collections (see class wxSQLite3NamedCollection)<br>
+Changed UTF-8 string handling to use methods To/FromUTF8 of the wxString class (requires wxWidgets 2.8.4 or higher)<br>
+Compatible with wxWidgets 2.9.1<br>
+
+</dd>
+<dt><b>1.9.9</b> - <i>March 2010</i></dt>
+<dd>
+Upgrade to SQLite version 3.6.23<br>
+Fixed a bug when compiling for dynamic loading of SQLite<br>
+Added static methods for accessing the run-time library compilation options diagnostics<br>
+Added mathod FormatV to class wxSQLite3StatementBuffer<br>
+
+</dd>
+<dt><b>1.9.8</b> - <i>February 2010</i></dt>
+<dd>
+Upgrade to SQLite version 3.6.22<br>
+Fixed a bug when compiling without precompiled header support
+(by including wx/arrstr.h)<br>
+
+</dd>
+<dt><b>1.9.7</b> - <i>November 2009</i></dt>
+<dd>
+Upgrade to SQLite version 3.6.20<br>
+Added methods to query, enable or disable foreign key support<br>
+
+</dd>
+<dt><b>1.9.6</b> - <i>September 2009</i></dt>
+<dd>
+Upgrade to SQLite version 3.6.18<br>
+Added method to get the SQLite library source id<br>
+Added flags parameter to wxSQLite3Database::Open to allow additional control over the database
+connection (see http://www.sqlite.org/c3ref/open.html for further information)<br>
+Fixed a potential memory leak in wxSQLite3Statement class<br>
+Converted encryption extension from C++ to pure C to make it
+compatible with the SQLite amalgamation.<br>
+
+</dd>
+<dt><b>1.9.5</b> - <i>February 2009</i></dt>
+<dd>
+Upgrade to SQLite version 3.6.11<br>
+Added user defined function class for REGEXP operator.<br>
+Added support for SQLite backup/restore API, introduced with SQLite 3.6.11<br>
+
+</dd>
+<dt><b>1.9.4</b> - <i>January 2009</i></dt>
+<dd>
+Upgrade to SQLite version 3.6.10<br>
+Added support for savepoints, introduced with SQLite 3.6.8<br>
+Added method IsOk to the classes wxSQLite3Statement, wxSQLite3Table and wxSQLite3ResultSet,
+thus instances of these classes can be checked whether the associated SQLite database or
+statement are valid without throwing an exception.<br>
+
+</dd>
+<dt><b>1.9.3</b> - <i>December 2008</i></dt>
+<dd>
+Upgrade to SQLite version 3.6.7<br>
+Fixed a bug in method wxSQLite3Table::GetDouble
+(conversion from string to double failed in non-US locales)<br>
+Build system upgraded using Bakefile 0.2.5<br>
+
+</dd>
+<dt><b>1.9.2</b> - <i>November 2008</i></dt>
+<dd>
+Upgrade to SQLite version 3.6.6<br>
+Added RAII transaction class (see docs for details)<br>
+
+</dd>
+<dt><b>1.9.1</b> - <i>September 2008</i></dt>
+<dd>
+Upgrade to SQLite version 3.6.2<br>
+Introduced own step counting for aggregate user functions
+since the sqlite3_aggregate_count function is now deprecated<br>
+Enhanced wxSQLite3Database::TableExists method to query an attached database
+for existence of a table or to query the main database and all attached databases<br>
+
+</dd>
+<dt><b>1.9.0</b> - <i>July 2008</i></dt>
+<dd>
+Upgrade to SQLite version 3.6.0<br>
+The optional key based encryption support has been adapted to
+support SQLite version 3.6.0.<br>
+Added static methods to initialize and shutdown the SQLite library.<br>
+Changed build system to support static library build against shared
+wxWidgets build on Linux.<br>
+Changed behaviour of wxSQLite3Database::Close method to finalize
+all unfinalized prepared statements.
+
+</dd>
+<dt><b>1.8.5</b> - <i>June 2008</i></dt>
+<dd>
+Upgrade to SQLite version 3.5.9<br>
+Integration of the optional key based encryption support into SQLite
+has been made easier. Changes to original SQLite source files
+are no longer necessary.
+
+</dd>
+<dt><b>1.8.4</b> - <i>April 2008</i></dt>
+<dd>
+Upgrade to SQLite version 3.5.8<br>
+Added support for accessing database limits<br>
+Changed method TableExists to check a table name case insensitive<br>
+Fixed several minor issues in the build files.
+
+</dd>
+<dt><b>1.8.3</b> - <i>January 2008</i></dt>
+<dd>
+Added support for shared cache mode<br>
+Added support for access to original SQL statement
+for prepared statements (requires SQLite 3.5.3 or above)
+
+</dd>
+<dt><b>1.8.2</b> - <i>December 2007</i></dt>
+<dd>
+Upgrade to SQLite version 3.5.4<br>
+Fixed a bug in wxSQLite3Database::Begin (wrong transaction type)
+
+</dd>
+<dt><b>1.8.1</b> - <i>November 2007</i></dt>
+<dd>
+Fixed a bug in in wxSQLite3Database::Close (resetting flag m_isEncrypted)<br>
+Eliminated several compile time warnings (regarding unused parameters)<br>
+Fixed a compile time bug in wxSQLite3Database::GetBlob (missing explicit type cast)
+
+</dd>
+<dt><b>1.8.0</b> - <i>November 2007</i></dt>
+<dd>
+Upgrade to SQLite version 3.5.2<br>
+Support for SQLite incremental BLOBs<br>
+ Changed source code in the SQLite3 encryption extension to eliminate several warnings<br>
+Changed default wxWidgets version to 2.8.x<br>
+Adjusted sources for SQLite encryption support are included for all SQLite version from 3.3.1 up to 3.5.2<br>
+SQLite link libraries for MinGW on Windows are included<br>
+Added <code>WXMAKINGLIB_WXSQLITE3</code> compile time option
+to support building wxSQLite3 as a static library while
+using the shared libraries of wxWidgets.
+
+</dd>
+<dt><b>1.7.3</b> - <i>May 2007</i></dt>
+<dd>
+Upgrade to SQLite version 3.3.17<br>
+
+Fixed a bug in the SQLite3 encryption extension
+(MD5 algorithm was not aware of endianess on
+big-endian platforms, resulting in non-portable
+database files)
+
+</dd>
+<dt><b>1.7.2</b> - <i>February 2007</i></dt>
+<dd>
+Upgrade to SQLite version 3.3.12<br>
+Support for loadable extensions is now optional
+Check for optional wxSQLite3 features at runtime
+wxSQLite3 API independent of optional features
+
+</dd>
+<dt><b>1.7.1</b> - <i>January 2007</i></dt>
+<dd>
+Fixed a bug in the key based database encryption feature
+(The call to <b>sqlite3_rekey</b> in wxSQLite3Database::ReKey
+could cause a program crash, when used to encrypt a previously
+unencrypted database.)<br>
+
+</dd>
+<dt><b>1.7.0</b> - <i>January 2007</i></dt>
+<dd>
+Upgrade to SQLite version 3.3.10 (<b>Attention</b>: at least SQLite version 3.3.9 is required)<br>
+Added support for BLOBs as wxMemoryBuffer objects<br>
+Added support for loadable extensions<br>
+Optional support for key based database encryption
+
+</dd>
+<dt><b>1.6.0</b> - <i>July 2006</i></dt>
+<dd>
+Added support for user defined collation sequences
+
+</dd>
+<dt><b>1.5.3</b> - <i>June 2006</i></dt>
+<dd>
+Upgrade to SQLite version 3.3.6<br>
+Added support for optional SQLite meta data methods
+
+</dd>
+<dt><b>1.5.2</b> - <i>March 2006</i></dt>
+<dd>
+Fixed a bug in wxSQLite3Database::Prepare<br>
+Added wxSQLite3Database::IsOpen for convenience
+
+</dd>
+<dt><b>1.5.1</b> - <i>February 2006</i></dt>
+<dd>
+Upgrade to SQLite version 3.3.4 (wxMSW only)
+
+</dd>
+<dt><b>1.5</b> - <i>February 2006</i></dt>
+<dd>
+Upgrade to SQLite version 3.3.3<br>
+Added support for commit, rollback and update callbacks
+
+</dd>
+<dt><b>1.4.2</b> - <i>November 2005</i></dt>
+<dd>
+Optimized code for wxString arguments
+
+</dd>
+<dt><b>1.4.1</b> - <i>November 2005</i></dt>
+<dd>
+Fixed a bug in wxSQLite3Database::TableExists,<br>
+Changed the handling of Unicode string conversion,<br>
+Added support for different transaction types
+
+</dd>
+<dt><b>1.4</b> - <i>November 2005</i></dt>
+<dd>
+Optionally load the SQLite library dynamically at run time.
+
+</dd>
+<dt><b>1.3.1</b> - <i>November 2005</i></dt>
+<dd>
+Corrected wxSQLite3ResultSet::GetInt64.<br>
+Added wxSQLite3Table::GetInt64
+
+</dd>
+<dt><b>1.3</b> - <i>October 2005</i></dt>
+<dd>
+Added wxGTK build support<br>
+
+</dd>
+<dt><b>1.2</b> - <i>October 2005</i></dt>
+<dd>
+Corrected error in wxSQLite3Table::FindColumnIndex<br>
+
+</dd>
+<dt><b>1.1</b> - <i>October 2005</i></dt>
+<dd>
+Upgrade to SQLite version 3.2.7 <br>
+
+</dd>
+
+<dt><b>1.0</b> - <i>July 2005</i></dt>
+<dd>
+First public release
+</dd>
+</dl>
+
+\author Ulrich Telle (<a href="mailto:ulrich.telle@gmx.de">ulrich DOT telle AT gmx DOT de</a>)
+
+\section ackn Acknowledgements
+
+Kudos to <b>Fred Cailleau-Lepetit</b> for developing <b>wxSQLite+</b> as a sample demonstrating
+the wxWidgets components <b>wxAUI</b> and <b>wxSQLite3</b> and for allowing it to be included
+in the wxSQLite3 distribution.
+
+The following people have contributed to wxSQLite3:
+
+<ul>
+<li>Francesco Montorsi (enhancement of the build system)</li>
+<li>Neville Dastur (enhancement of the method TableExists)</li>
+<li>Tobias Langner (RAII class for managing transactions)</li>
+</ul>
+
+ */
+
+#ifndef _WX_SQLITE3_DEF_H_
+#define _WX_SQLITE3_DEF_H_
+
+#if defined(WXMAKINGLIB_WXSQLITE3)
+#define WXDLLIMPEXP_SQLITE3
+#elif defined(WXMAKINGDLL_WXSQLITE3)
+#define WXDLLIMPEXP_SQLITE3 WXEXPORT
+#elif defined(WXUSINGDLL_WXSQLITE3)
+#define WXDLLIMPEXP_SQLITE3 WXIMPORT
+#else // not making nor using DLL
+#define WXDLLIMPEXP_SQLITE3
+#endif
+
+/*
+  GCC warns about using __declspec on forward declarations
+  while MSVC complains about forward declarations without
+  __declspec for the classes later declared with it. To hide this
+  difference a separate macro for forward declarations is defined:
+ */
+#if defined(__WINDOWS__) && defined(__GNUC__)
+#define WXDLLIMPEXP_FWD_SQLITE3
+#else
+#define WXDLLIMPEXP_FWD_SQLITE3 WXDLLIMPEXP_SQLITE3
+#endif
+
+#endif // _WX_SQLITE3_DEF_H_
diff --git a/cadxcore/wx/wxsqlite3/wxsqlite3dyn.h b/cadxcore/wx/wxsqlite3/wxsqlite3dyn.h
new file mode 100644
index 0000000..62d8052
--- /dev/null
+++ b/cadxcore/wx/wxsqlite3/wxsqlite3dyn.h
@@ -0,0 +1,219 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        wxsqlite3dyn.h
+// Purpose:     wxWidgets wrapper around the SQLite3 embedded database library.
+// Author:      Ulrich Telle
+// Modified by:
+// Created:     2005-11-12
+// Copyright:   (c) Ulrich Telle
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+/// \file wxsqlite3dyn.h Definition of the SQLite3 API functions
+
+#ifdef DYNFUNC
+
+DYNFUNC(return, void *,                sqlite3_aggregate_context,     (sqlite3_context *p, int nBytes), (p, nBytes));
+#if SQLITE_VERSION_NUMBER <= 3006000
+DYNFUNC(return, int,                   sqlite3_aggregate_count,       (sqlite3_context *p), (p));
+#endif
+#if SQLITE_VERSION_NUMBER >= 3006011
+DYNFUNC(return, sqlite3_backup*,       sqlite3_backup_init,           (sqlite3 *pDest, const char *zDestName, sqlite3 *pSource, const char *zSourceName), (pDest, zDestName, pSource, zSourceName));
+DYNFUNC(return, int,                   sqlite3_backup_step,           (sqlite3_backup *p, int nPage), (p, nPage));
+DYNFUNC(return, int,                   sqlite3_backup_finish,         (sqlite3_backup *p), (p));
+DYNFUNC(return, int,                   sqlite3_backup_remaining,      (sqlite3_backup *p), (p));
+DYNFUNC(return, int,                   sqlite3_backup_pagecount,      (sqlite3_backup *p), (p));
+#endif
+DYNFUNC(return, int,                   sqlite3_bind_blob,             (sqlite3_stmt *pStmt, int i, const void *zData, int nData, void (*xDel)(void*)), (pStmt, i, zData, nData, xDel));
+DYNFUNC(return, int,                   sqlite3_bind_double,           (sqlite3_stmt *pStmt, int i, double rValue), (pStmt, i, rValue));
+DYNFUNC(return, int,                   sqlite3_bind_int,              (sqlite3_stmt *pStmt, int i, int iValue), (pStmt, i, iValue));
+DYNFUNC(return, int,                   sqlite3_bind_int64,            (sqlite3_stmt *pStmt, int i, sqlite_int64 iValue), (pStmt, i, iValue));
+DYNFUNC(return, int,                   sqlite3_bind_null,             (sqlite3_stmt *pStmt, int i), (pStmt, i));
+DYNFUNC(return, int,                   sqlite3_bind_parameter_count,  (sqlite3_stmt *pStmt), (pStmt));
+DYNFUNC(return, int,                   sqlite3_bind_parameter_index,  (sqlite3_stmt *pStmt, const char *zName), (pStmt, zName));
+DYNFUNC(return, const char *,          sqlite3_bind_parameter_name,   (sqlite3_stmt *pStmt, int i), (pStmt, i));
+DYNFUNC(return, int,                   sqlite3_bind_text,             (sqlite3_stmt *pStmt, int i, const char *zData, int nData, void (*xDel)(void*)), (pStmt, i, zData, nData, xDel));
+// DYNFUNC(return, int,                   sqlite3_bind_text16,           (sqlite3_stmt *pStmt, int i, const void *zData, int nData, void (*xDel)(void*)), (pStmt, i, zData, nData, xDel));
+// DYNFUNC(return, int,                   sqlite3_bind_value,            (sqlite3_stmt *pStmt, int i, const sqlite3_value *pValue), (pStmt, i, pValue));
+#if SQLITE_VERSION_NUMBER >= 3004000
+DYNFUNC(return, int,                   sqlite3_bind_zeroblob,         (sqlite3_stmt *pStmt, int i, int n), (pStmt, i, n));
+DYNFUNC(return, int,                   sqlite3_blob_open,             (sqlite3 *db, const char *zDb, const char *zTable, const char *zColumn, sqlite3_int64 iRow, int flags, sqlite3_blob **ppBlob), (db, zDb, zTable, zColumn, iRow, flags, ppBlob));
+DYNFUNC(return, int,                   sqlite3_blob_close,            (sqlite3_blob *pBlob), (pBlob));
+DYNFUNC(return, int,                   sqlite3_blob_bytes,            (sqlite3_blob *pBlob), (pBlob));
+DYNFUNC(return, int,                   sqlite3_blob_read,             (sqlite3_blob *pBlob, void *z, int n, int iOffset), (pBlob, z, n, iOffset));
+#if SQLITE_VERSION_NUMBER >= 3007004
+DYNFUNC(return, int,                   sqlite3_blob_reopen,           (sqlite3_blob *pBlob, sqlite3_int64 rowid), (pBlob, rowid));
+#endif
+DYNFUNC(return, int,                   sqlite3_blob_write,            (sqlite3_blob *pBlob, const void *z, int n, int iOffset), (pBlob, z, n, iOffset));
+#endif
+// DYNFUNC(return, int,                   sqlite3_busy_handler,          (sqlite3 *db, int (*xBusy)(void*,int), void *pArg), (db, xBusy, pArg));
+DYNFUNC(return, int,                   sqlite3_busy_timeout,          (sqlite3 *db, int ms), (db, ms));
+DYNFUNC(return, int,                   sqlite3_changes,               (sqlite3 *db), (db));
+DYNFUNC(return, int,                   sqlite3_clear_bindings,        (sqlite3_stmt *pStmt), (pStmt));
+DYNFUNC(return, int,                   sqlite3_close,                 (sqlite3 *db), (db));
+DYNFUNC(return, int,                   sqlite3_collation_needed,      (sqlite3 *db, void *pCollNeededArg, void(*xCollNeeded)(void*,sqlite3*,int eTextRep,const char*)), (db, pCollNeededArg, xCollNeeded));
+// DYNFUNC(return, int,                   sqlite3_collation_needed16,    (sqlite3 *db, void *pCollNeededArg, void(*xCollNeeded16)(void*,sqlite3*,int eTextRep,const void*)), (db, pCollNeededArg, xCollNeeded16));
+DYNFUNC(return, const void *,          sqlite3_column_blob,           (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+DYNFUNC(return, int,                   sqlite3_column_bytes,          (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+// DYNFUNC(return, int,                   sqlite3_column_bytes16,        (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+DYNFUNC(return, int,                   sqlite3_column_count,          (sqlite3_stmt *pStmt), (pStmt));
+DYNFUNC(return, const char *,          sqlite3_column_decltype,       (sqlite3_stmt *pStmt, int i), (pStmt, i));
+// DYNFUNC(return, const void *,          sqlite3_column_decltype16,     (sqlite3_stmt *pStmt, int i), (pStmt, i));
+DYNFUNC(return, double,                sqlite3_column_double,         (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+DYNFUNC(return, int,                   sqlite3_column_int,            (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+DYNFUNC(return, sqlite_int64,          sqlite3_column_int64,          (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+DYNFUNC(return, const char *,          sqlite3_column_name,           (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+// DYNFUNC(return, const void *,          sqlite3_column_name16,         (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+DYNFUNC(return, const unsigned char *, sqlite3_column_text,           (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+// DYNFUNC(return, const void *,          sqlite3_column_text16,         (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+DYNFUNC(return, int,                   sqlite3_column_type,           (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+DYNFUNC(return, void *,                sqlite3_commit_hook,           (sqlite3 *db, int (*xCallback)(void*), void *pArg), (db, xCallback, pArg));
+#if SQLITE_VERSION_NUMBER >= 3006023
+DYNFUNC(return, int,                   sqlite3_compileoption_used,    (const char *zOptName), (zOptName));
+DYNFUNC(return, const char *,          sqlite3_compileoption_get,     (int N), (N));
+#endif
+DYNFUNC(return, int,                   sqlite3_complete,              (const char *sql), (sql));
+// DYNFUNC(return, int,                   sqlite3_complete16,            (const void *sql), (sql));
+//DYNFUNC(return, sqlite3 *,             sqlite3_context_db_handle,     (sqlite3_context* ctx) (ctx));
+DYNFUNC(return, int,                   sqlite3_create_collation,      (sqlite3 *db, const char *zName, int eTextRep, void*v, int(*xCompare)(void*,int,const void*,int,const void*)), (db, zName, eTextRep, v, xCompare));
+// DYNFUNC(return, int,                   sqlite3_create_collation16,    (sqlite3 *db, const char *zName, int eTextRep, void*v, int(*xCompare)(void*,int,const void*,int,const void*)), (db, zName, eTextRep, v, xCompare));
+DYNFUNC(return, int,                   sqlite3_create_function,       (sqlite3 *db, const char *zFunctionName, int nArg, int eTextRep, void*v, void (*xFunc)(sqlite3_context*,int,sqlite3_value**), void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*)), (db, zFunctionName, nArg, eTextRep, v, xFunc, xStep, xFinal));
+// DYNFUNC(return, int,                   sqlite3_create_function16,     (sqlite3 *db, const void *zFunctionName, int nArg, int eTextRep, void*v, void (*xFunc)(sqlite3_context*,int,sqlite3_value**), void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*)), (db, zFunctionName, nArg, eTextRep, v, xFunc, xStep, xFinal));
+#if SQLITE_VERSION_NUMBER >= 3007003
+DYNFUNC(return, int,                   sqlite3_create_function_v2,    (sqlite3 *db, const char *zFunctionName, int nArg, int eTextRep, void *pApp, void (*xFunc)(sqlite3_context*,int,sqlite3_value**), void (*xStep)(sqlite3_context*,int,sqlite3_value**), void (*xFinal)(sqlite3_context*), void(*xDestroy)(void*)), (db, zFunctionName, nArg, eTextRep, pApp, xFunc, xStep, xFinal, xDestroy));
+#endif
+#if SQLITE_VERSION_NUMBER >= 3004001
+DYNFUNC(return, int,                   sqlite3_create_module,         (sqlite3 *db, const char *zName, const sqlite3_module *p, void *pClientData), (db, zName, p, pClientData));
+DYNFUNC(return, int,                   sqlite3_create_module_v2,      (sqlite3 *db, const char *zName, const sqlite3_module *p, void *pClientData, void(*xDestroy)(void*)), (db, zName, p, pClientData, xDestroy));
+#endif
+// DYNFUNC(return, int,                   sqlite3_data_count,            (sqlite3_stmt *pStmt), (pStmt));
+// DYNFUNC(return, sqlite3 *,             sqlite3_db_handle,             (sqlite3_stmt *pStmt), (pStmt));
+DYNFUNC(return, int,                   sqlite3_declare_vtab,          (sqlite3 *db, const char *zSQL), (db, zSQL));
+DYNFUNC(return, int,                   sqlite3_enable_load_extension, (sqlite3 *db, int onoff), (db, onoff));
+DYNFUNC(return, int,                   sqlite3_enable_shared_cache,   (int enable), (enable));
+// DYNFUNC(return, int,                   sqlite3_errcode,               (sqlite3 *db), (db));
+DYNFUNC(return, const char *,          sqlite3_errmsg,                (sqlite3 *db), (db));
+// DYNFUNC(return, const void *,          sqlite3_errmsg16,              (sqlite3 *db), (db));
+DYNFUNC(return, int,                   sqlite3_exec,                  (sqlite3 *db, const char *sql, sqlite3_callback c, void *v, char **errmsg), (db, sql, c, v, errmsg));
+// DYNFUNC(return, int,                   sqlite3_expired,               (sqlite3_stmt *pStmt), (pStmt));
+DYNFUNC(return, int,                   sqlite3_extended_result_codes, (sqlite3 *db, int onoff), (db, onoff));
+DYNFUNC(return, int,                   sqlite3_finalize,              (sqlite3_stmt *pStmt), (pStmt));
+DYNFUNC(; , void,                       sqlite3_free,                  (void *z), (z));
+DYNFUNC(; , void,                       sqlite3_free_table,            (char **result), (result));
+DYNFUNC(return, int,                   sqlite3_get_autocommit,        (sqlite3 *db), (db));
+// DYNFUNC(return, void *,                sqlite3_get_auxdata,           (sqlite3_context *pCtx, int iArg), (pCtx, iArg));
+DYNFUNC(return, int,                   sqlite3_get_table,             (sqlite3 *db, const char *sql, char ***resultp, int *nrow, int *ncolumn, char **errmsg), (db, sql, resultp, nrow, ncolumn, errmsg));
+// DYNFUNC(return, int,                   sqlite3_global_recover,        (), ());
+#if SQLITE_VERSION_NUMBER >= 3006000
+DYNFUNC(return, int,                   sqlite3_initialize,            (void), ());
+#endif
+DYNFUNC(; , void,                       sqlite3_interrupt,             (sqlite3 *db), (db));
+DYNFUNC(return, sqlite_int64,          sqlite3_last_insert_rowid,     (sqlite3 *db), (db));
+DYNFUNC(return, const char *,          sqlite3_libversion,            (void), ());
+// DYNFUNC(return, int,                   sqlite3_libversion_number,     (void), ());
+DYNFUNC(return, int,                   sqlite3_limit,                 (sqlite3 *db, int id, int newVal), (db, id, newVal));
+DYNFUNC(return, int,                   sqlite3_load_extension,        (sqlite3 *db, const char *zFile, const char *zProc, char **pzErrMsg), (db, zFile, zProc, pzErrMsg));
+DYNFUNC(return, void*,                 sqlite3_malloc,                (int size), (size));
+// DYNFUNC(return, char *,                sqlite3_mprintf,               (const char *zFormat,...), (zFormat,...));
+#if SQLITE_VERSION_NUMBER >= 3006000
+DYNFUNC(return, sqlite3_stmt *,        sqlite3_next_stmt,             (sqlite3 *pDb, sqlite3_stmt *pStmt), (pDb, pStmt));
+#endif
+DYNFUNC(return, int,                   sqlite3_open,                  (const char *filename, sqlite3 **ppDb), (filename, ppDb));
+// DYNFUNC(return, int,                   sqlite3_open16,                (const void *filename, sqlite3 **ppDb), (filename, ppDb));
+DYNFUNC(return, int,                   sqlite3_open_v2,               (const char *filename, sqlite3 **ppDb, int flags, const char *zVfs), (filename, ppDb, flags, zVfs));
+DYNFUNC(return, int,                   sqlite3_prepare_v2,            (sqlite3 *db, const char *zSql, int nBytes, sqlite3_stmt **ppStmt, const char **pzTail), (db, zSql, nBytes, ppStmt, pzTail));
+// DYNFUNC(return, int,                   sqlite3_prepare16_v2,          (sqlite3 *db, const void *zSql, int nBytes, sqlite3_stmt **ppStmt, const void **pzTail), (db, zSql, nBytes, ppStmt, pzTail));
+// DYNFUNC(;, void,                       sqlite3_progress_handler,      (sqlite3 *db, int nOps, int (*xProgress)(void*), void *pArg), (db, nOps, xProgress, pArg));
+DYNFUNC(; , void,                       sqlite3_randomness,            (int N, void *P), (N, P));
+DYNFUNC(return, void*,                 sqlite3_realloc,               (void* ptr, int newSize), (ptr, newSize));
+DYNFUNC(return, int,                   sqlite3_reset,                 (sqlite3_stmt *pStmt), (pStmt));
+DYNFUNC(; , void,                       sqlite3_result_blob,           (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
+DYNFUNC(; , void,                       sqlite3_result_double,         (sqlite3_context *pCtx, double rVal), (pCtx, rVal));
+DYNFUNC(; , void,                       sqlite3_result_error,          (sqlite3_context *pCtx, const char *z, int n), (pCtx, z, n));
+// DYNFUNC(;, void,                       sqlite3_result_error16,        (sqlite3_context *pCtx, const void *z, int n), (pCtx, z, n));
+DYNFUNC(; , void,                       sqlite3_result_int,            (sqlite3_context *pCtx, int iVal), (pCtx, iVal));
+DYNFUNC(; , void,                       sqlite3_result_int64,          (sqlite3_context *pCtx, sqlite_int64 iVal), (pCtx, iVal));
+DYNFUNC(; , void,                       sqlite3_result_null,           (sqlite3_context *pCtx), (pCtx));
+DYNFUNC(; , void,                       sqlite3_result_text,           (sqlite3_context *pCtx, const char *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
+// DYNFUNC(;, void,                       sqlite3_result_text16,         (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
+// DYNFUNC(;, void,                       sqlite3_result_text16be,       (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
+// DYNFUNC(;, void,                       sqlite3_result_text16le,       (sqlite3_context *pCtx, const void *z, int n, void (*xDel)(void *)), (pCtx, z, n, xDel));
+DYNFUNC(; , void,                       sqlite3_result_value,          (sqlite3_context *pCtx, sqlite3_value *pValue), (pCtx, pValue));
+#if SQLITE_VERSION_NUMBER >= 3004000
+DYNFUNC(; , void,                       sqlite3_result_zeroblob,       (sqlite3_context *pCtx, int n), (pCtx, n));
+#endif
+DYNFUNC(return, void *,                sqlite3_rollback_hook,         (sqlite3 *db, void (*xCallback)(void*), void *pArg), (db, xCallback, pArg));
+#if SQLITE_VERSION_NUMBER >= 3007003
+DYNFUNC(return, int,                   sqlite3_rtree_geometry_callback, (sqlite3 *db, const char *zGeom, int (*xGeom)(sqlite3_rtree_geometry *, int nCoord, double *aCoord, int *pRes), void *pContext), (db, zGeom, xGeom, pContext));
+#endif
+DYNFUNC(return, int,                   sqlite3_set_authorizer,        (sqlite3 *db, int (*xAuth)(void*,int,const char*,const char*,const char*,const char*), void *pArg), (db, xAuth, pArg));
+// DYNFUNC(;, void,                       sqlite3_set_auxdata,           (sqlite3_context *pCtx, int iArg, void *pAux, void (*xDelete)(void*)), (pCtx, iArg, pAux, xDelete));
+#if SQLITE_VERSION_NUMBER >= 3006000
+DYNFUNC(return, int,                   sqlite3_shutdown,              (void), ());
+#endif
+DYNFUNC(return, int,                   sqlite3_sleep,                 (int ms), (ms));
+// DYNFUNC(return, char *,                sqlite3_snprintf,              (int n, char *zBuf, const char *zFormat, ...), (n, zBuf, zFormat, ...));
+#if SQLITE_VERSION_NUMBER >= 3006018
+DYNFUNC(return, const char *,          sqlite3_sourceid,              (void), ());
+#endif
+#if SQLITE_VERSION_NUMBER >= 3005003
+DYNFUNC(return, const char *,          sqlite3_sql,                   (sqlite3_stmt *pStmt), (pStmt));
+#endif
+DYNFUNC(return, int,                   sqlite3_step,                  (sqlite3_stmt *pStmt), (pStmt));
+#if SQLITE_VERSION_NUMBER >= 3007004
+DYNFUNC(return, int,                   sqlite3_stmt_readonly,         (sqlite3_stmt *pStmt), (pStmt));
+#endif
+DYNFUNC(return, int,                   sqlite3_threadsafe,            (void), ());
+// DYNFUNC(return, int,                   sqlite3_total_changes,         (sqlite3 *db), (db));
+// DYNFUNC(return, void *,                sqlite3_trace,                 (sqlite3 *db, void(*xTrace)(void*,const char*), void *pArg), (db, xTrace, pArg));
+// DYNFUNC(return, int,                   sqlite3_transfer_bindings,     (sqlite3_stmt *pStmt, sqlite3_stmt *pStmt), (pStmt, pStmt));
+#if SQLITE_VERSION_NUMBER >= 3007000
+// DYNFUNC(return, int,                   sqlite3_unlock_notify,         (sqlite3 *pBlocked, void (*xNotify)(void **apArg, int nArg), void *pNotifyArg), (pBlocked, xNotify, pNotifyArg));
+#endif
+DYNFUNC(return, void *,                sqlite3_update_hook,           (sqlite3 *db, void (*xCallback)(void *, int, char const *, char const *, wxsqlite_int64), void *pArg), (db, xCallback, pArg));
+DYNFUNC(return, void *,                sqlite3_user_data,             (sqlite3_context *pCtx), (pCtx));
+DYNFUNC(return, const void *,          sqlite3_value_blob,            (sqlite3_value *pVal), (pVal));
+DYNFUNC(return, int,                   sqlite3_value_bytes,           (sqlite3_value *pVal), (pVal));
+// DYNFUNC(return, int,                   sqlite3_value_bytes16,         (sqlite3_value *pVal), (pVal));
+DYNFUNC(return, double,                sqlite3_value_double,          (sqlite3_value *pVal), (pVal));
+DYNFUNC(return, int,                   sqlite3_value_int,             (sqlite3_value *pVal), (pVal));
+DYNFUNC(return, sqlite_int64,          sqlite3_value_int64,           (sqlite3_value *pVal), (pVal));
+DYNFUNC(return, const unsigned char *, sqlite3_value_text,            (sqlite3_value *pVal), (pVal));
+// DYNFUNC(return, const void *,          sqlite3_value_text16,          (sqlite3_value *pVal), (pVal));
+// DYNFUNC(return, const void *,          sqlite3_value_text16be,        (sqlite3_value *pVal), (pVal));
+// DYNFUNC(return, const void *,          sqlite3_value_text16le,        (sqlite3_value *pVal), (pVal));
+DYNFUNC(return, int,                   sqlite3_value_type,            (sqlite3_value *pVal), (pVal));
+DYNFUNC(return, char *,                sqlite3_vmprintf,              (const char* p, va_list ap), (p, ap));
+#if SQLITE_VERSION_NUMBER >= 3007000
+DYNFUNC(return, int,                   sqlite3_wal_autocheckpoint,    (sqlite3 *db, int N), (db, N));
+DYNFUNC(return, int,                   sqlite3_wal_checkpoint,        (sqlite3 *db, const char *zDb), (db, zDb));
+#if SQLITE_VERSION_NUMBER >= 3007006
+DYNFUNC(return, int,                   sqlite3_wal_checkpoint_v2,     (sqlite3 *db, const char *zDb, int mode, int* logFrameCount, int* ckptFrameCount), (db, zDb, mode, logFrameCount, ckptFrameCount));
+#endif
+DYNFUNC(return, void *,                sqlite3_wal_hook,              (sqlite3 *db, int (*xCallback)(void *, sqlite3 *, const char*, int), void *pArg), (db, xCallback, pArg));
+#endif
+#if WXSQLITE3_HAVE_METADATA
+DYNFUNC(return, const char *,          sqlite3_column_database_name,  (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+// DYNFUNC(return, const void *,          sqlite3_column_database_name16, (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+DYNFUNC(return, const char *,          sqlite3_column_table_name,     (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+// DYNFUNC(return, const void *,          sqlite3_column_table_name16,   (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+DYNFUNC(return, const char *,          sqlite3_column_origin_name,    (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+// DYNFUNC(return, const void *,          sqlite3_column_origin_name16,  (sqlite3_stmt *pStmt, int iCol), (pStmt, iCol));
+DYNFUNC(return, int,                   sqlite3_table_column_metadata, (sqlite3 *db, const char *zDbName, const char *zTableName, const char *zColumnName, char const **pzDataType, char const **pzCollSeq, int *pNotNull, int *pPrimaryKey, int *pAutoinc), (db, zDbName, zTableName, zColumnName, pzDataType, pzCollSeq, pNotNull, pPrimaryKey, pAutoinc));
+#endif
+
+#if WXSQLITE3_HAVE_CODEC
+DYNFUNC(return, int,                   sqlite3_key,                   (sqlite3 *db, const void *pKey, int nKey), (db, pKey, nKey));
+DYNFUNC(return, int,                   sqlite3_rekey,                 (sqlite3 *db, const void *pKey, int nKey), (db, pKey, nKey));
+#endif
+
+// SQLcrypt API
+// Additional error codes: SQLCRYPT3_TOOSHORT, SQLCRYPT3_TOOLONG, SQLCRYPT3_BADLIC
+// DYNFUNC(return, int,                  sqlcrypt3_passphrase,           (sqlite3 *db, const char *key, int codec, char **errmsg), (db, key, codec, errmsg));
+// DYNFUNC(return, int,                  sqlcrypt3_license_key,          (const char *lic), (lic));
+
+// SQLite-Crypt API
+// ATTN: different open call
+// DYNFUNC(return, int,                   sqlite3_open,                  (const char *filename, const char *strPass, sqlite3 **ppDb), (filename, strPass, ppDb));
+// DYNFUNC(;, void,                       sqlite3_changepassword,        (sqlite3* db,const char* strNewPass), (db, strNewPass));
+
+#endif
diff --git a/cadxcore/wx/wxsqlite3/wxsqlite3opt.h b/cadxcore/wx/wxsqlite3/wxsqlite3opt.h
new file mode 100644
index 0000000..f6b304b
--- /dev/null
+++ b/cadxcore/wx/wxsqlite3/wxsqlite3opt.h
@@ -0,0 +1,51 @@
+///////////////////////////////////////////////////////////////////////////////
+// Name:        wxsqlite3opt.h
+// Purpose:     wxSQLite3 optional feature selection
+// Author:      Ulrich Telle
+// Modified by:
+// Created:     2007-02-01
+//
+// Copyright:   (c) Ulrich Telle
+// Licence:     wxWindows licence
+///////////////////////////////////////////////////////////////////////////////
+
+/// \file wxsqlite3opt.h Compile time switches for the wxSQLite3 class
+
+#ifndef _WX_SQLITE3_OPT_H_
+#define _WX_SQLITE3_OPT_H_
+
+// Conditional compilation
+// -----------------------
+
+//! If this define is set to 1, then the SQLite library will be loaded dynamically
+//! otherwise a link library is required to build wxSQLite3.
+#ifndef wxUSE_DYNAMIC_SQLITE3_LOAD
+#define wxUSE_DYNAMIC_SQLITE3_LOAD   0
+#endif
+
+//! To enable SQLite's meta data methods define WXSQLITE3_HAVE_METADATA as 1 here.
+//! Attention: SQLite needs to be compiled with SQLITE_ENABLE_COLUMN_METADATA for this to work
+#ifndef WXSQLITE3_HAVE_METADATA
+#define WXSQLITE3_HAVE_METADATA 0
+#endif
+
+//! To enable SQLite's database encryption support define WXSQLITE3_HAVE_CODEC as 1 here.
+//! Attention: SQLite needs to be compiled with SQLITE_HAS_CODEC for this to work
+#ifndef WXSQLITE3_HAVE_CODEC
+#define WXSQLITE3_HAVE_CODEC 0
+#endif
+
+//! To enable SQLite's loadable extension feature define WXSQLITE3_HAVE_LOAD_EXTENSION as 1 here.
+//! Attention: SQLite needs to be compiled without SQLITE_OMIT_LOAD_EXTENSION for this to work
+#ifndef WXSQLITE3_HAVE_LOAD_EXTENSION
+#define WXSQLITE3_HAVE_LOAD_EXTENSION 0
+#endif
+
+//! To disable support for named collections define WXSQLITE3_USE_NAMED_COLLECTIONS as 0 here.
+//! Attention: if WXSQLITE3_USE_NAMED_COLLECTIONS is defined as 1 (default) SQLite needs to be
+//! compiled without SQLITE_OMIT_VIRTUALTABLE for this to work
+#ifndef WXSQLITE3_USE_NAMED_COLLECTIONS
+#define WXSQLITE3_USE_NAMED_COLLECTIONS 1
+#endif
+
+#endif // _WX_SQLITE3_OPT_H_
diff --git a/debian/README.Debian b/debian/README.Debian
deleted file mode 100644
index 022dd99..0000000
--- a/debian/README.Debian
+++ /dev/null
@@ -1,6 +0,0 @@
-ginkgocadx for Debian
----------------------
-
-You can view or download Ginkgo CADx documentation at: http://doc.ginkgo-cadx.com/
-
- -- Andreas Tille <tille at debian.org>  Mon, 02 May 2011 08:09:26 +0200
diff --git a/debian/changelog b/debian/changelog
deleted file mode 100644
index 270e69e..0000000
--- a/debian/changelog
+++ /dev/null
@@ -1,359 +0,0 @@
-ginkgocadx (3.8.6-1) unstable; urgency=medium
-
-  * New upstream release
-
- -- Gert Wollny <gewo at debian.org>  Fri, 18 Aug 2017 13:07:34 +0000
-
-ginkgocadx (3.8.5-1) unstable; urgency=medium
-
-  * Upload to unstable, Closes: #865796 
-  * Update standards version to 4.0.0
-
- -- Gert Wollny <gewo at debian.org>  Sun, 25 Jun 2017 05:32:32 +0000
-
-ginkgocadx (3.8.5-1~exp1) experimental; urgency=medium
-
-  * New upstream version  
-
- -- Gert Wollny <gewo at debian.org>  Mon, 13 Mar 2017 12:27:26 +0000
-
-ginkgocadx (3.8.4-1) unstable; urgency=medium
-
-  * New upstream version 
-  * d/p/01: remove patches applied upstream 
-
- -- Gert Wollny <gewo at debian.org>  Wed, 11 Jan 2017 12:09:30 +0000
-
-ginkgocadx (3.8.3-4) unstable; urgency=medium
-
-  * d/control: Update uploader mail address for Gert Wollny 
-  * d/patches/01: Patch OGLSL shader to work with LLVM compiler 
-    backend 
-
- -- Gert Wollny <gewo at debian.org>  Sun, 08 Jan 2017 18:44:29 +0000
-
-ginkgocadx (3.8.3-3) unstable; urgency=medium
-
-  * d/control: remove libssl-dev because lindcmtk-dev pulls it in
-
- -- Gert Wollny <gw.fossdev at gmail.com>  Fri, 18 Nov 2016 06:54:45 +0000
-
-ginkgocadx (3.8.3-2) unstable; urgency=medium
-
-  * d/control: Change dependency to default-mysqlclient-dev 
-    Closes: #841577
-
- -- Gert Wollny <gw.fossdev at gmail.com>  Thu, 27 Oct 2016 14:56:59 +0000
-
-ginkgocadx (3.8.3-1) unstable; urgency=medium
-
-  * New upstream release, Closes:  #827061
-  * d/rules: enable new hardening flags 
-  * d/copyright: remove deleted files from list
-
- -- Gert Wollny <gw.fossdev at gmail.com>  Sun, 03 Jul 2016 19:55:54 +0000
-
-ginkgocadx (3.8.2-2) unstable; urgency=medium
-
-  * cme fix dpkg-control 
-
- -- Gert Wollny <gw.fossdev at gmail.com>  Sat, 04 Jun 2016 20:19:47 +0000
-
-ginkgocadx (3.8.2-1) unstable; urgency=medium
-
-  * New upstream version
-
- -- Gert Wollny <gw.fossdev at gmail.com>  Wed, 13 Apr 2016 13:58:41 +0000
-
-ginkgocadx (3.8.0-1) unstable; urgency=medium
-
-  * New upstream version
-
- -- Gert Wollny <gw.fossdev at gmail.com>  Wed, 16 Mar 2016 17:13:53 +0000
-
-ginkgocadx (3.7.5-1) unstable; urgency=medium
-
-  * New upstream version Closes: #753809
-
- -- Gert Wollny <gw.fossdev at gmail.com>  Fri, 04 Mar 2016 11:09:47 +0000
-
-ginkgocadx (3.7.4-1) unstable; urgency=medium
-
-  * New upstream, Closes: #779713
-
- -- Gert Wollny <gw.fossdev at gmail.com>  Thu, 25 Feb 2016 14:52:52 +0000
-
-ginkgocadx (3.7.3-1) unstable; urgency=medium
-
-  * New upstream 
-
- -- Gert Wollny <gw.fossdev at gmail.com>  Thu, 25 Feb 2016 13:01:49 +0000
-
-ginkgocadx (3.7.2-1) experimental; urgency=medium
-
-  * New (forked) upstream Closes: #805170 Closes: #800025
-  * removed conformance document, since MetaEmotion doesn't exist
-    anymore
-  * correct copyrights
-
- -- Gert Wollny <gw.fossdev at gmail.com>  Tue, 23 Feb 2016 15:57:09 +0000
-
-ginkgocadx (3.7.1.1573.41+dfsg-4) unstable; urgency=medium
-
-  * Build-Depends: libdcmtk2-dev --> libdcmtk-dev (Closes: #804574).
-    Thanks, Emilio Pozuelo Monfort.
-
- -- Dmitry Smirnov <onlyjob at debian.org>  Wed, 11 Nov 2015 09:58:06 +1100
-
-ginkgocadx (3.7.1.1573.41+dfsg-3) unstable; urgency=medium
-
-  * Upload to unstable.
-
- -- Dmitry Smirnov <onlyjob at debian.org>  Fri, 06 Nov 2015 17:46:18 +1100
-
-ginkgocadx (3.7.1.1573.41+dfsg-2) experimental; urgency=medium
-
-  * Build-Depends:
-    - libinsighttoolkit3-dev (>= 3.20.0)
-    + libinsighttoolkit4-dev
-  * New "libitk4.patch" fixing FTBFS (Closes: #789932, #777876).
-
- -- Dmitry Smirnov <onlyjob at debian.org>  Thu, 27 Aug 2015 14:30:57 +1000
-
-ginkgocadx (3.7.1.1573.41+dfsg-1) experimental; urgency=medium
-
-  [ Dmitry Smirnov ]
-  * New upstream release [December 2014].
-  * Standards-Version: 3.9.6.
-
-  [ Andreas Tille ]
-  * d/rules: Use uscan + Files-Excluded
-  * d/watch: proper versionmangling
-  * d/copyright: point to SF as source location
-
- -- Dmitry Smirnov <onlyjob at debian.org>  Thu, 01 Jan 2015 12:18:14 +1100
-
-ginkgocadx (3.7.0.1465.37+dfsg-1) unstable; urgency=low
-
-  * New upstream release [June 2014] (Closes: #740703).
-  * Updated patches; added new "skip-cn-translation.patch".
-  * Fixed wx3.0 compatibility by building with "-DNDEBUG" and
-    "ginkgocadx-wxdebug.patch". Thanks, Olly Betts.
-
- -- Dmitry Smirnov <onlyjob at debian.org>  Sat, 20 Sep 2014 03:45:20 +1000
-
-ginkgocadx (3.6.1.1367.34+dfsg-1) unstable; urgency=medium
-
-  * New upstream version (adapt patches)
-  * Build-Depend: libwxgtk3.0-dev (>= 3.0.1-2~ due to a gcc bug) and
-    Patch from Olly Betts (thanks to Olly for his help)
-    Closes: #749487
-
- -- Andreas Tille <tille at debian.org>  Tue, 17 Jun 2014 08:20:07 +0200
-
-ginkgocadx (3.6.0.1228.33+dfsg-1) unstable; urgency=low
-
-  * New upstream release [December 2013]
-
- -- Dmitry Smirnov <onlyjob at debian.org>  Thu, 09 Jan 2014 07:37:09 +1100
-
-ginkgocadx (3.5.0.1137.31+dfsg-2) unstable; urgency=medium
-
-  * Standards-Version: 3.9.5 (no changes needed)
-  * Remove Build-Depends: libgdcm2-dev
-    Closes: #731917
-
- -- Andreas Tille <tille at debian.org>  Fri, 13 Dec 2013 22:32:54 +0100
-
-ginkgocadx (3.5.0.1137.31+dfsg-1) unstable; urgency=low
-
-  * New upstream release [October 2013]
-
- -- Dmitry Smirnov <onlyjob at debian.org>  Thu, 24 Oct 2013 21:28:17 +1100
-
-ginkgocadx (3.4.0.928.29+dfsg-1) unstable; urgency=low
-
-  * New upstream release [July 2013]
-    + new B-D: "libjsoncpp-dev".
-    + new patch "unbundle-libjsoncpp.patch" to avoid building bundled
-      "libjsoncpp-dev".
-    + new patch "fix-wx.patch" to avoid FTBFS due to missing
-      "-lwx_gtk2u_html-2.8".
-  * Removed unnecessary versioned Build-Depends.
-  * Removed obsolete lintian override.
-  * Reference get-orig-source implementation for orig.tar clean-up and
-    DFSG-repackaging.
-  * Upload to unstable.
-
- -- Dmitry Smirnov <onlyjob at debian.org>  Sun, 21 Jul 2013 11:58:53 +1000
-
-ginkgocadx (3.2.0.634.25-1~exp0) experimental; urgency=low
-
-  [ Mathieu Malaterre ]
-  * Remove self from main list
-
-  [ Dmitry Smirnov ]
-  * New upstream release [February 2013]
-    + new B-D: "libcurl4-gnutls-dev".
-  * Updated my email address.
-  * Dropped all patches (applied-upstream).
-  * Updated Vcs fields to use canonical URLs.
-
- -- Dmitry Smirnov <onlyjob at debian.org>  Fri, 29 Mar 2013 22:34:44 +1100
-
-ginkgocadx (3.1.0.498.20-1~exp0) experimental; urgency=low
-
-  * New upstream release [December 2012].
-    - "New version available" (Closes: #686376).
-    - "Unable to close application" (Closes: #684990).
-    - "Package appears to be non-free" (Closes: #688952).
-  * new build-dependency: libfreetype6-dev
-  * install upstream changelog.
-  * install DICOM_Conformance-GinkgoCADx.pdf (docs).
-  * disabled chrpath invocation, it is no longer needed.
-  * patchworks:
-    + fix-desktop.patch is updated to use "Graphics" as main cathegory.
-    + fix-spelling.patch is updated.
-    - fix-path.patch is dropped (applied-upstream).
-    - fixwhatis.patch is dropped (applied-upstream).
-  * updated lintian-overrides.
-  * dropped obsolete "DM-Upload-Allowed: yes".
-  * added "get-orig-source" target to recompress orig.tar.
-  * append custom LDFLAGS using DEB_LDFLAGS_MAINT_APPEND.
-  * Standards to 3.9.4.
-  * debian/watch is updated to catch broader range of orig.tar file
-    name patterns.
-  * added -dbg package (commented).
-
- -- Dmitry Smirnov <onlyjob at member.fsf.org>  Mon, 28 Jan 2013 04:56:27 +1100
-
-ginkgocadx (2.14.0.4972-1) UNRELEASED; urgency=low
-
-  * New upstream release.
-  * debian/control:
-    + Build-Depends list is re-formatted and alphabetised.
-    + added Dmitry to uploaders.
-  * debian/copyright:
-    + audit & update.
-    + to copyright-format-1.0
-    - removed '©' characters.
-  * debian/rules:
-    + pass CXXFLAGS and CPPFLAGS to fix Hardening.
-    + pass --as-needed to reduce needless linking.
-    + install missing desktop icon.
-    + override dh_makeshlibs to avoid 'useless-call-to-ldconfig'.
-    + .xz compression for .deb files.
-    - removed needless calls to 'dpkg-buildflags' (cleanup).
-  * new patches:
-    + fix-desktop.patch to correct .desktop file validation.
-    + fix-path.patch to fix FTBFS due to renamed files.
-    + fix-spelling.patch to correct spelling (lintianisation).
-  * lintian-overrides:
-    - removed unused and incorrect entries.
-    + added overrides for hardening false positives.
-  * debian source compression to .xz
-
- -- Dmitry Smirnov <onlyjob at member.fsf.org>  Fri, 17 Aug 2012 22:27:02 +1000
-
-ginkgocadx (2.12.0.4889-1) unstable; urgency=low
-
-  * New upstream version
-  * debian/control: Standards-Version: 3.9.3 (no changes needed)
-  * debhelper 9 (control+compat)
-
- -- Andreas Tille <tille at debian.org>  Sat, 19 May 2012 11:37:14 +0200
-
-ginkgocadx (2.8.0.4602-1) unstable; urgency=low
-
-  * New upstream version (adapted patch, removed patch applied upstream)
-    Closes: #657827
-
- -- Andreas Tille <tille at debian.org>  Sun, 29 Jan 2012 12:02:54 +0100
-
-ginkgocadx (2.6.0.0-1) unstable; urgency=low
-
-  * New upstream version (refreshed patches)
-  * debian/copyright: Added Upstream-Contact
-  * debian/control: * s/libmysqlclient16/libmysqlclient-dev/ in
-    Build-Deps (Thanks for the patch to Micah Gersten <micahg at ubuntu.com>)
-    Closes: #652529
-
- -- Andreas Tille <tille at debian.org>  Sun, 18 Dec 2011 16:00:58 +0100
-
-ginkgocadx (2.6.0.0~rc-2) unstable; urgency=low
-
-  * removed hardcoded vtk version number - allow to link against vtk-5.8
-
- -- Dominique Belhachemi <domibel at debian.org>  Fri, 11 Nov 2011 21:33:50 -0500
-
-ginkgocadx (2.6.0.0~rc-1) unstable; urgency=low
-
-  * New upstream version
-    Closes: #647413
-  * Rebuild against recent insighttoolkit
-    Closes: #648167
-
- -- Andreas Tille <tille at debian.org>  Wed, 09 Nov 2011 12:29:00 +0100
-
-ginkgocadx (2.5.4.1-1) unstable; urgency=low
-
-  [ Mathieu Malaterre ]
-  * New upstream (Closes: #644513)
-  * Fix lintian warning in man page
-  * Add myself to uploaders
-
-  [ Thorsten Alteholz ]
-  * debian/copyright: 
-     - change Format: (according to lintian)
-     - filenames in Files: need to be separated by whitspace instead of comma
-  * debian/ginkgocadx.lintian-overrides: added again, still needed
-     - spelling override is due to development in Spain
-     - lintian still complains about useless ldconfig, independemt of rpath
-
- -- Thorsten Alteholz <debian at alteholz.de>  Tue, 11 Oct 2011 18:00:00 +0200
-
-ginkgocadx (2.5.4.0~rc-1) unstable; urgency=low
-
-  [ Andreas Tille ]
-  * New upstream version (patches were applied)
-
-  [ Mathieu Malaterre ]
-  * Add get-orig-source target in debian/rules
-
- -- Andreas Tille <tille at debian.org>  Fri, 09 Sep 2011 08:39:26 +0200
-
-ginkgocadx (2.5.1.0-1) unstable; urgency=low
-
-  * New upstream version (all patches applied)
-    Closes: #630877
-  * debian/patches/drop_rpath.patch: Fix remaining rpath issue
-  * debian/{mime,sharedmimeinfo}: Mime info for DICOM images
-    Closes: #631205
-  * Add upstream manpage + desktop file
-  * Fixed Vcs fields
-  * debian/rules:
-     - Add new extension liblightvisualizator
-     - remove get-orig-source target which becames void because
-       upstream dropped the debian/ dir
-     - Hack around explicite rpath definitions
-  * debian/install: move conformance.xml into place
-  * debian/watch: drop useless comments
-  * debian/ginkgocadx.lintian-overrides: Drop unneeded overrides
-    as well as those which stay in effect.  These should vanish
-    once rpath is correctly fixed - so the warning should not
-    be hidden here.
-
- -- Andreas Tille <tille at debian.org>  Thu, 14 Jul 2011 16:17:51 +0200
-
-ginkgocadx (2.4.1.1-2) unstable; urgency=low
-
-  * debian/patches/01_no_msse.patch: Do not build with -msse flag
-    Closes: #630852
-
- -- Andreas Tille <tille at debian.org>  Sat, 18 Jun 2011 08:10:00 +0200
-
-ginkgocadx (2.4.1.1-1) unstable; urgency=low
-
-  * Initial release (Closes: #628106)
-
- -- Andreas Tille <tille at debian.org>  Mon, 02 May 2011 08:09:26 +0200
diff --git a/debian/compat b/debian/compat
deleted file mode 100644
index ec63514..0000000
--- a/debian/compat
+++ /dev/null
@@ -1 +0,0 @@
-9
diff --git a/debian/control b/debian/control
deleted file mode 100644
index d8a9a4b..0000000
--- a/debian/control
+++ /dev/null
@@ -1,51 +0,0 @@
-Source: ginkgocadx
-Maintainer: Debian Med Packaging Team <debian-med-packaging at lists.alioth.debian.org>
-Uploaders: Andreas Tille <tille at debian.org>,
-           Thorsten Alteholz <debian at alteholz.de>,
-           Gert Wollny <gewo at debian.org>
-Section: science
-Priority: optional
-Build-Depends: debhelper (>= 9),
-               chrpath,
-               cmake,
-               libcairo2-dev,
-               libcurl4-gnutls-dev,
-               libdcmtk-dev,
-               libfftw3-dev,
-               libfreetype6-dev,
-               libgtk2.0-dev,
-               libinsighttoolkit4-dev,
-               libjsoncpp-dev,
-               default-libmysqlclient-dev,
-               libsqlite3-dev,
-               libvtk6-dev,
-               libwrap0,
-               libwrap0-dev,
-               libwxgtk3.0-dev,
-               libxml2-dev,
-               libgdcm-tools
-Standards-Version: 4.0.0
-Vcs-Browser: https://anonscm.debian.org/viewvc/debian-med/trunk/packages/ginkgocadx/trunk/
-Vcs-Svn: svn://anonscm.debian.org/debian-med/trunk/packages/ginkgocadx/trunk/
-Homepage: http://ginkgo-cadx.com/
-
-Package: ginkgocadx
-Architecture: any
-Depends: ${shlibs:Depends},
-         ${misc:Depends}
-Description: Medical Imaging Software and complete DICOM Viewer
- Ginkgo CADx provides a complete DICOM viewer solution with advanced
- capabilities and support for extensions.
- .
-  * Easy and customizable interface through profiles.
-  * Full featured DICOM image visualization.
-  * Complete tool set (measure, markers, text, ...).
-  * Multiple modalities support (Neurological, Radiological, Dermatological,
-    Ophthalmological, Ultrasound, Endoscopy, ...)
-  * Dicomization support from JPEG, PNG, GIF and TIFF.
-  * Full EMH integration support: HL7 standard and IHE compliant workflows.
-  * PACS Workstation (C-FIND, C-MOVE, C-STORE...)
-  * Extensible through custom extensions.
-    - Retinal image mosaic composition.
-    - Automatic retinal analysis diagnostics.
-    - Psoriasis automatic diagnostics.
diff --git a/debian/copyright b/debian/copyright
deleted file mode 100644
index 4988b46..0000000
--- a/debian/copyright
+++ /dev/null
@@ -1,301 +0,0 @@
-Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
-Upstream-Name: Ginkgo CADx
-Upstream-Contact: Gert Wollny <gw.fossdev at gmail.com
-Source: https://github.com/gerddie/ginkgocadx
-
-Files: *
-Copyright: 2015-2016 Gert Wollny 
-           2011      metaemotion healthcare. http://healthcare.metaemotion.com
-           2008-2014 MetaEmotion S. L. http://ginkgo-cadx.com
-License: LGPL-3+
-
-Files: cadxcore/api/autoptr.h
-Copyright: 2005-2007 Alex Rubinsteyn
-License: zlib-license
- This software is provided 'as-is', without any express or implied
- warranty.  In no event will the authors be held liable for any damages
- arising from the use of this software.
- .
- Permission is granted to anyone to use this software for any purpose,
- including commercial applications, and to alter it and redistribute it
- freely, subject to the following restrictions:
- .
- 1. The origin of this software must not be misrepresented; you must not
-    claim that you wrote the original software. If you use this software
-    in a product, an acknowledgment in the product documentation would be
-    appreciated but is not required.
- 2. Altered source versions must be plainly marked as such, and must not be
-    misrepresented as being the original software.
- 3. This notice may not be removed or altered from any source distribution.
-Comment:
- See text of license at http://www.gzip.org/zlib/zlib_license.html
-
-Files:
-    cadxcore/main/controllers/dcmtk/libi2d/d2dsource.h
-    cadxcore/main/controllers/dcmtk/libi2d/document2dcm.cpp
-    cadxcore/main/controllers/dcmtk/libi2d/document2dcm.h
-    cadxcore/main/controllers/dcmtk/libi2d/foooutpl.h
-    cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.cpp
-    cadxcore/main/controllers/dcmtk/libi2d/i2dimgs.h
-    cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.cpp
-    cadxcore/main/controllers/dcmtk/libi2d/i2djpgs.h
-    cadxcore/main/controllers/dcmtk/libi2d/i2doutpl.h
-    cadxcore/main/controllers/dcmtk/libi2d/i2dplnsc.cpp
-    cadxcore/main/controllers/dcmtk/libi2d/i2dplnsc.h
-    cadxcore/main/controllers/dcmtk/libi2d/i2dplsc.cpp
-    cadxcore/main/controllers/dcmtk/libi2d/i2dplsc.h
-    cadxcore/main/controllers/dcmtk/libi2d/i2dplvlp.cpp
-    cadxcore/main/controllers/dcmtk/libi2d/i2dplvlp.h
-    cadxcore/main/controllers/dcmtk/libi2d/pdf2dsource.cpp
-    cadxcore/main/controllers/dcmtk/libi2d/pdf2dsource.h
-    cadxcore/main/controllers/dcmtk/ofstd/*
-Copyright: Copyright (C) 2001-2007, OFFIS
-License: public-domain
- THIS SOFTWARE IS MADE AVAILABLE,  AS IS,  AND OFFIS MAKES NO  WARRANTY
- REGARDING  THE  SOFTWARE,  ITS  PERFORMANCE,  ITS  MERCHANTABILITY  OR
- FITNESS FOR ANY PARTICULAR USE, FREEDOM FROM ANY COMPUTER DISEASES  OR
- ITS CONFORMITY TO ANY SPECIFICATION. THE ENTIRE RISK AS TO QUALITY AND
- PERFORMANCE OF THE SOFTWARE IS WITH THE USER.
-Comment:
- For a definition of public domain see:
- http://www.gnu.org/philosophy/categories.html#PublicDomainSoftware
-
-Files: cadxcore/sqlite/sqlite3.c
- cadxcore/sqlite/sqlite3ext.h
- cadxcore/sqlite/sqlite3.h
-Copyright: Copyright (C) 2001-2011 Hwaci
-License: public-domain
- For a definition of public domain see:
- http://www.gnu.org/philosophy/categories.html#PublicDomainSoftware
-
-Files: cadxcore/VTKInria3D/vtkVISUManagement/*
- cadxcore/vtk/command/*
- cadxcore/vtk/interactor/*
-Copyright: 2007 INRIA - Asclepios Project
-License: BSD-like-INRIA
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- .
- * Redistributions of source code must retain the above copyright notice,
-   this list of conditions and the following disclaimer.
- .
- * Redistributions in binary form must reproduce the above copyright notice,
-   this list of conditions and the following disclaimer in the documentation
-   and/or other materials provided with the distribution.
- .
- * Neither the name of INRIA or ASCLEPIOS, nor the names of any contributors
-   may be used to endorse or promote products derived from this software
-   without specific prior written permission.
- .
- * Modified source versions must be plainly marked as such, and must not be
-   misrepresented as being the original software.
- .
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS ``AS IS''
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-Comment:
- See text of license at https://gforge.inria.fr/projects/vtkinria3d/
-
-Files: cadxcore/VTKInria3D/wxVTK/*
- cadxcore/vtk/vtkopenglginkgotexture.cpp
- cadxcore/vtk/vtkopenglginkgotexture.h
- cadxcore/vtk/vtkSmartVolumeMapper.cxx
- cadxcore/vtk/vtkSmartVolumeMapper.h
-Copyright: Copyright (c) 1993-2008 Ken Martin, Will Schroeder, Bill Lorensen
-License: open-source
- This is an open-source copyright as follows:
- .
- Copyright (c) 1993-2008 Ken Martin, Will Schroeder, Bill Lorensen
- All rights reserved.
- .
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- .
- * Redistributions of source code must retain the above copyright notice,
- this list of conditions and the following disclaimer.
- .
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- .
- * Neither name of Ken Martin, Will Schroeder, or Bill Lorensen nor the names
- of any contributors may be used to endorse or promote products derived from
- this software without specific prior written permission.
- .
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS ``AS IS''
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
- SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
- CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Files: cadxcore/itk/*
-Copyright: 2002 Insight Consortium.
-License: BSD-like-ITK
- Copyright (c) 1999-2008 Insight Software Consortium All rights reserved.
- Redistribution and use in source and binary forms, with or without
- modification, are permitted provided that the following conditions are met:
- .
- * Redistributions of source code must retain the above copyright notice, this
- list of conditions and the following disclaimer.
- * Redistributions in binary form must reproduce the above copyright notice,
- this list of conditions and the following disclaimer in the documentation
- and/or other materials provided with the distribution.
- * The name of the Insight Software Consortium, nor the names of any
- consortium members, nor of any contributors, may be used to endorse or
- promote products derived from this software without specific prior written
- permission.
- * Modified source versions must be plainly marked as such, and must not be
- misrepresented as being the original software.
- .
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS''
- AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE FOR
- ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
- (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
- LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
- ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
- SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
-Files: cadxcore/endpoint/inet_ntop.c
-Copyright: 1996 by Internet Software Consortium.
- Modified 2003-03-27 Jeff Connelly to compile under C++
-License: public-domain
- Permission to use, copy, modify, and distribute this software for any
- purpose with or without fee is hereby granted, provided that the above
- copyright notice and this permission notice appear in all copies.
- .
- THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS
- ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES
- OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE
- CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL
- DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
- PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS
- ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
- SOFTWARE.
-
-Files: cadxcore/wx/maskedtextctrl/*
-Copyright: Thomas Härtel
-License: wxWindows
-
-Files: cadxcore/wx/thumbnailctrl/thumbnailctrl.*
-Copyright: Julian Smart
-License: wxWindows
-
-Files: cadxcore/wx/wxsqlite3/*
-Copyright: Ulrich Telle
-License: wxWindows
-
-Files:
-    visualizator/lang/de/*.po
-    cadxcore/lang/de/*.po
-    cadxcore/lang/ja/*.po
-    cadxcore/lang/pt*/*.po
-    cadxcore/lang/tr/*.po
-Copyright: 2011-2012 Rosetta Contributors
-           2011-2012 Canonical Ltd
-License: LGPL-3+
-
-Files: debian/*
-Copyright: 2011-2012 Andreas Tille <tille at debian.org>
-           2011      Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>
-           2012-2014 Dmitry Smirnov <onlyjob at debian.org>
-           2011      Thorsten Alteholz <debian at alteholz.de>
-License: GPL-2+
- This package is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
- .
- This package 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/>
- .
- The complete text of the GNU General Public License version 2
- can be found in "/usr/share/common-licenses/GPL-2".
-
-License: LGPL-3+
- This package is free software; you can redistribute it and/or modify
- it under the terms of the GNU Lesser General Public License version 3
- as published by the Free Software Foundation.
- .
- This package 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 Lesser General Public License
- along with this program. If not, see <http://www.gnu.org/licenses/>
- .
- The complete text fo the GNU Lesser General Public License version 3
- can be found in "/usr/share/common-licenses/LGPL-3"
-
-License: wxWindows
- wxWindows Library Licence, Version 3.1
- ======================================
- .
- Copyright (C) 1998-2005 Julian Smart, Robert Roebling et al
- .
- Everyone is permitted to copy and distribute verbatim copies
- of this licence document, but changing it is not allowed.
- .
- WXWINDOWS LIBRARY LICENCE
- TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
- .
- This library is free software; you can redistribute it and/or modify it
- under the terms of the GNU Library General Public Licence as published by
- the Free Software Foundation; either version 2 of the Licence, or (at
- your option) any later version.
- .
- This library 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 Library
- General Public Licence for more details.
- .
- You should have received a copy of the GNU Library General Public Licence
- along with this software, usually in a file named COPYING.LIB.  If not,
- write to the Free Software Foundation, Inc., 51 Franklin Street,
- Fifth Floor, Boston, MA  02110-1301  USA.
- .
- EXCEPTION NOTICE
- .
- 1. As a special exception, the copyright holders of this library give
- permission for additional uses of the text contained in this release of
- the library as licenced under the wxWindows Library Licence, applying
- either version 3.1 of the Licence, or (at your option) any later version of
- the Licence as published by the copyright holders of version
- 3.1 of the Licence document.
- .
- 2. The exception is that you may use, copy, link, modify and distribute
- under your own terms, binary object code versions of works based
- on the Library.
- .
- 3. If you copy code from files distributed under the terms of the GNU
- General Public Licence or the GNU Library General Public Licence into a
- copy of this library, as this licence permits, the exception does not
- apply to the code that you add in this way.  To avoid misleading anyone as
- to the status of such modified files, you must delete this exception
- notice from such code and/or adjust the licensing conditions notice
- accordingly.
- .
- 4. If you write modifications of your own for this library, it is your
- choice whether to permit this exception to apply to your modifications.
- If you do not wish that, you must delete the exception notice from such
- code and/or adjust the licensing conditions notice accordingly.
diff --git a/debian/install b/debian/install
deleted file mode 100644
index 1dbf60c..0000000
--- a/debian/install
+++ /dev/null
@@ -1 +0,0 @@
-ginkgocadx/*.desktop	usr/share/applications
diff --git a/debian/links b/debian/links
deleted file mode 100644
index 943e5ed..0000000
--- a/debian/links
+++ /dev/null
@@ -1 +0,0 @@
-/usr/share/ginkgocadx/resources/cadxcore/logos/ginkgo48x48.png /usr/share/pixmaps/ginkgocadx.png
diff --git a/debian/lintian-overrides b/debian/lintian-overrides
deleted file mode 100644
index 66ab7ed..0000000
--- a/debian/lintian-overrides
+++ /dev/null
@@ -1,3 +0,0 @@
-# the software has been developed in Spain, and this error corresponds to
-# some spanish text within the code
-spelling-error-in-binary usr/bin/ginkgocadx Posible Possible
diff --git a/debian/manpages b/debian/manpages
deleted file mode 100644
index 524a2d8..0000000
--- a/debian/manpages
+++ /dev/null
@@ -1 +0,0 @@
-ginkgocadx/*.1
diff --git a/debian/mime b/debian/mime
deleted file mode 100644
index 079da4c..0000000
--- a/debian/mime
+++ /dev/null
@@ -1 +0,0 @@
-application/dicom; ginkgocadx '%s'; description=DICOM medical image; nametemplate=%s.dcm
diff --git a/debian/rules b/debian/rules
deleted file mode 100755
index 3516ac7..0000000
--- a/debian/rules
+++ /dev/null
@@ -1,22 +0,0 @@
-#!/usr/bin/make -f
-# -*- makefile -*-
-# debian/rules for Ginkgo CADx
-
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
-
-export DEB_BUILD_MAINT_OPTIONS = hardening=+all
-
-# minimise needless linking
-export DEB_LDFLAGS_MAINT_APPEND= -Wl,--as-needed
-
-## Disable wx3.0 WXDEBUG checks, as happened by default in wx2.8.
-## (This is necessary to avoid segfaults with wx3.0).
-export DEB_CPPFLAGS_MAINT_APPEND=-DNDEBUG
-
-%:
-	dh $@ --parallel 
-
-## avoid post{inst|rm}-useless-call-to-ldconfig
-override_dh_makeshlibs:
-	dh_makeshlibs --noscripts
diff --git a/debian/sharedmimeinfo b/debian/sharedmimeinfo
deleted file mode 100644
index 8b78e4c..0000000
--- a/debian/sharedmimeinfo
+++ /dev/null
@@ -1,9 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<mime-info xmlns='http://www.freedesktop.org/standards/shared-mime-info'>
-  <mime-type type="application/dicom">
-    <sub-class-of type="text/plain"/>
-    <comment>DICOM medical image</comment>
-    <comment xml:lang="de">DICOM medizinisches Bild</comment>
-    <glob pattern="*.dcm"/>
-  </mime-type>
-</mime-info>
diff --git a/debian/source/format b/debian/source/format
deleted file mode 100644
index 163aaf8..0000000
--- a/debian/source/format
+++ /dev/null
@@ -1 +0,0 @@
-3.0 (quilt)
diff --git a/debian/source/options b/debian/source/options
deleted file mode 100644
index b7bc1f2..0000000
--- a/debian/source/options
+++ /dev/null
@@ -1 +0,0 @@
-compression = "xz"
diff --git a/debian/watch b/debian/watch
deleted file mode 100644
index df1012f..0000000
--- a/debian/watch
+++ /dev/null
@@ -1,3 +0,0 @@
-version=3
-opts=filenamemangle=s/.+\/v?(\d\S*)\.tar\.gz/ginkgocadx-$1\.tar\.gz/ \
-  https://github.com/gerddie/ginkgocadx/tags .*/v?(\d\S*)\.tar\.gz
diff --git a/ginkgocadx/CMakeLists.txt b/ginkgocadx/CMakeLists.txt
new file mode 100644
index 0000000..21d34a6
--- /dev/null
+++ b/ginkgocadx/CMakeLists.txt
@@ -0,0 +1,154 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+
+PROJECT(${GINKGO_PROJECT})
+
+MESSAGE(STATUS "GINKGO PROJECT = ${GINKGO_PROJECT}")
+
+SET(SRCS main.cpp)
+
+ADD_GINKGO_DEFINITIONS()
+
+INCLUDE_DIRECTORIES(${CADxCore_INCLUDE_DIR})
+
+IF(LINUX AND NOT CUSTOM_BUILD)
+	SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
+	SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 
+	SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/ginkgocadx")
+	SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
+	LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib/ginkgocadx" isSystemDir)
+	IF("${isSystemDir}" STREQUAL "-1")
+		SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/ginkgocadx")
+	ENDIF()
+ENDIF()
+
+ADD_DEFINITIONS(${libcurl_defines})
+INCLUDE_DIRECTORIES(${libcurl_INCLUDE_DIR})
+LINK_DIRECTORIES(${libcurl_DIR})
+
+
+IF(USE_CUSTOM_WX)
+        ADD_DEFINITIONS(${wxWidgets_defines})
+        INCLUDE_DIRECTORIES(${wxWidgets_INCLUDE_DIR})
+        LINK_DIRECTORIES(${wxWidgets_DIR})
+ELSE()
+        INCLUDE(${wxWidgets_USE_FILE})
+	#MESSAGE("SYSTEM_WX: VL = ${VTK_DIR}")
+        LINK_DIRECTORIES(${wxWidgets_DIR})
+ENDIF()
+
+IF (USE_CUSTOM_VTK)
+	LINK_DIRECTORIES(${VTK_DIR})
+ELSE()
+	#MESSAGE("SYSTEM_VTK: VL = ${VTK_DIR}")
+	LINK_DIRECTORIES(${VTK_LIBRARY_DIRS})
+ENDIF()
+
+
+IF(USE_CUSTOM_ITK)
+	LINK_DIRECTORIES(${ITK_DIR})
+ELSE()
+	#MESSAGE("SYSTEM_ITK: IL = ${ITK_DIR}")
+	LINK_DIRECTORIES(${ITK_DIR})
+ENDIF()
+
+IF(USE_CUSTOM_DCMTK)
+	ADD_DEFINITIONS(${DCMTK_defines})
+	INCLUDE_DIRECTORIES(${DCMTK_INCLUDE_DIR})
+	LINK_DIRECTORIES(${DCMTK_DIR})
+ELSE()
+	ADD_DEFINITIONS(-DHAVE_CONFIG_H)
+	INCLUDE_DIRECTORIES(${DCMTK_INCLUDE_DIRS})
+	#MESSAGE("DCMTKLIBS = ${DCMTK_LIBRARIES}")
+	#MESSAGE("DCMTKINC = ${DCMTK_INCLUDE_DIRS}")
+ENDIF()
+
+LINK_DIRECTORIES(${Cairo_DIR})
+LINK_DIRECTORIES(${Pixman_DIR})
+#LINK_DIRECTORIES(${XmlRpc++_DIR})
+
+IF(MACOS)
+	SET(SRCS ${SRCS}
+		${CMAKE_CURRENT_SOURCE_DIR}/ginkgocadx.icns
+		${CMAKE_CURRENT_SOURCE_DIR}/dcmdoc.icns
+		${CMAKE_CURRENT_SOURCE_DIR}/../cadxcore/resources/conformance.xml
+	)
+	FOREACH(PLUGIN ${GINKGO_PLUGINS})
+		EXECUTE_PROCESS(
+			COMMAND /bin/bash -c "touch ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN}/${PLUGIN}.inf"
+		)
+		SET(SRCS ${SRCS} ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN}/${PLUGIN}.inf)
+		SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN}/${PLUGIN}.inf PROPERTIES MACOSX_PACKAGE_LOCATION PlugIns)
+	ENDFOREACH()
+	
+	SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/ginkgocadx.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+	SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/dcmdoc.icns PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+	SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/../cadxcore/resources/conformance.xml PROPERTIES MACOSX_PACKAGE_LOCATION Resources)
+	SET_SOURCE_FILES_PROPERTIES(${CMAKE_CURRENT_SOURCE_DIR}/PkgInfo PROPERTIES MACOSX_PACKAGE_LOCATION .)
+	LINK_LIBRARIES(CADxCore)
+ENDIF()
+
+ADD_EXECUTABLE(${PROJECT_NAME} WIN32 MACOSX_BUNDLE ${SRCS})
+
+IF(LINUX)
+  TARGET_LINK_LIBRARIES(${PROJECT_NAME} CADxCore pthread dl)
+  TARGET_LINK_LIBRARIES(${PROJECT_NAME} visualizator)
+  TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${GTK_LIBRARIES})
+ENDIF()
+
+IF(USE_CUSTOM_DCMTK)
+	MESSAGE(STATUS "DCMTK_LIBS= ${DCMTK_LIBRARIES}" )
+	TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${DCMTK_LIBRARIES})
+ELSE()
+	TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${DCMTK_LIBRARIES} oflog dcmdsig dcmtls)
+ENDIF()
+IF(LINUX)
+	SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
+	LINK_INTERFACE_LIBRARIES ""
+	CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/ginkgocadx")
+
+	INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
+ENDIF()
+
+IF (MACOS)
+	SET(DIRS
+		${wxWidgets_DIR}
+		${VTK_DIR}
+		${ITK_DIR}
+		${DCMTK_DIR}
+		CADxCore
+		${CMAKE_CURRENT_BINARY_DIR}/../cadxcore
+	)
+	MESSAGE(STATUS "Directories: ${DIRS}")
+	SET(GINKGO_PLUGINS "" CACHE PARENT_SCOPE "")
+
+	SET(APPBUNDLE ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.app)
+	SET(MACOSX_BUNDLE_GUI_IDENTIFIER "com.metaemotion.Ginkgo_CADx")
+	SET(MACOSX_BUNDLE_BUNDLE_NAME ${PROJECT_NAME})
+	SET(MACOSX_BUNDLE_VERSION ${GINKGO_VERSION_STR})
+	
+	CONFIGURE_FILE(${CMAKE_CURRENT_SOURCE_DIR}/GinkgoCADx-Info.plist.in ${CMAKE_CURRENT_BINARY_DIR}/Info.plist)
+
+	SET(LIBS)
+
+	MESSAGE(STATUS "PLUGINS = ${GINKGO_PLUGINS}")
+	FOREACH(PLUGIN ${GINKGO_PLUGINS})
+		LIST(APPEND LIBS ${CMAKE_CURRENT_BINARY_DIR}/../${PLUGIN}/lib${PLUGIN}.dylib)
+	ENDFOREACH()
+
+	install(CODE 
+	        " 
+	        include(BundleUtilities) 
+	        fixup_bundle(\"${APPBUNDLE}\" \"${LIBS}\" \"${DIRS}\") 
+	        " 
+	        COMPONENT Runtime 
+	    )
+		
+	SET_TARGET_PROPERTIES(
+		"${PROJECT_NAME}"
+		PROPERTIES
+			MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_BINARY_DIR}/Info.plist
+		    LINK_FLAGS "-Wl ${XCODE_LINK_FLAGS}"
+	)
+ENDIF()
+
+MESSAGE(STATUS "OS=[${OS}], Arch=[${ARCH}], Target=[${CMAKE_BUILD_TYPE}], Project=[${PROJECT_NAME}]")
diff --git a/ginkgocadx/GinkgoCADx-Info.plist.in b/ginkgocadx/GinkgoCADx-Info.plist.in
new file mode 100644
index 0000000..267212e
--- /dev/null
+++ b/ginkgocadx/GinkgoCADx-Info.plist.in
@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+	<dict>
+		<key>CFBundleDevelopmentRegion</key>
+		<string>English</string>
+		<key>CFBundleDocumentTypes</key>
+		<array>
+			<dict>
+				<key>CFBundleTypeExtensions</key>
+				<array>
+					<string>dcm</string>
+				</array>
+				<key>CFBundleTypeIconFile</key>
+				<string>dcmdoc.icns</string>
+				<key>CFBundleTypeMIMETypes</key>
+				<array>
+					<string>application/dicom</string>
+				</array>
+				<key>CFBundleTypeName</key>
+				<string>DICOM</string>
+				<key>CFBundleTypeOSTypes</key>
+				<array>
+					<string>DCM</string>
+				</array>
+				<key>CFBundleTypeRole</key>
+				<string>Editor</string>
+				<key>LSTypeIsPackage</key>
+				<true/>
+				<key>NSPersistentStoreTypeKey</key>
+				<string>Binary</string>
+			</dict>
+		</array>
+		<key>CFBundleExecutable</key>
+		<string>${MACOSX_BUNDLE_BUNDLE_NAME}</string>
+		<key>CFBundleIconFile</key>
+		<string>ginkgocadx.icns</string>
+		<key>CFBundleIdentifier</key>
+		<string>${MACOSX_BUNDLE_GUI_IDENTIFIER}</string>
+		<key>CFBundleInfoDictionaryVersion</key>
+		<string>6.0</string>
+		<key>CFBundlePackageType</key>
+		<string>APPL</string>
+		<key>CFBundleSignature</key>
+		<string>????</string>
+		<key>CFBundleVersion</key>
+		<string>${MACOSX_BUNDLE_VERSION}</string>
+		<key>LSMultipleInstancesProhibited</key>
+		<true/>
+		<key>NSHumanReadableCopyright</key>
+		<string>MetaEmotion S.L.</string>
+	</dict>
+</plist>
diff --git a/ginkgocadx/GinkgoCADx.Doxyfile b/ginkgocadx/GinkgoCADx.Doxyfile
new file mode 100644
index 0000000..5a64fbc
--- /dev/null
+++ b/ginkgocadx/GinkgoCADx.Doxyfile
@@ -0,0 +1,1826 @@
+# Doxyfile 1.8.1.2
+
+# This file describes the settings to be used by the documentation system
+# doxygen (www.doxygen.org) for a project
+#
+# All text after a hash (#) is considered a comment and will be ignored
+# The format is:
+#       TAG = value [value, ...]
+# For lists items can also be appended using:
+#       TAG += value [value, ...]
+# Values that contain spaces should be placed between quotes (" ")
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+
+# This tag specifies the encoding used for all characters in the config file 
+# that follow. The default is UTF-8 which is also the encoding used for all 
+# text before the first occurrence of this tag. Doxygen uses libiconv (or the 
+# iconv built into libc) for the transcoding. See 
+# http://www.gnu.org/software/libiconv for the list of possible encodings.
+
+DOXYFILE_ENCODING      = UTF-8
+
+# The PROJECT_NAME tag is a single word (or sequence of words) that should 
+# identify the project. Note that if you do not use Doxywizard you need 
+# to put quotes around the project name if it contains spaces.
+
+PROJECT_NAME           = GinkgoCADx
+
+# The PROJECT_NUMBER tag can be used to enter a project or revision number. 
+# This could be handy for archiving the generated documentation or 
+# if some version control system is used.
+
+PROJECT_NUMBER         = 3.0.0
+
+# Using the PROJECT_BRIEF tag one can provide an optional one line description 
+# for a project that appears at the top of each page and should give viewer 
+# a quick idea about the purpose of the project. Keep the description short.
+
+PROJECT_BRIEF          =  DICOM Viewer + Dicomizer + CADx
+
+# With the PROJECT_LOGO tag one can specify an logo or icon that is 
+# included in the documentation. The maximum height of the logo should not 
+# exceed 55 pixels and the maximum width should not exceed 200 pixels. 
+# Doxygen will copy the logo to the output directory.
+
+PROJECT_LOGO           = logo.png
+
+# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) 
+# base path where the generated documentation will be put. 
+# If a relative path is entered, it will be relative to the location 
+# where doxygen was started. If left blank the current directory will be used.
+
+OUTPUT_DIRECTORY       = ../apidocs
+
+# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 
+# 4096 sub-directories (in 2 levels) under the output directory of each output 
+# format and will distribute the generated files over these directories. 
+# Enabling this option can be useful when feeding doxygen a huge amount of 
+# source files, where putting all generated files in the same directory would 
+# otherwise cause performance problems for the file system.
+
+CREATE_SUBDIRS         = NO
+
+# The OUTPUT_LANGUAGE tag is used to specify the language in which all 
+# documentation generated by doxygen is written. Doxygen will use this 
+# information to generate all constant output in the proper language. 
+# The default language is English, other supported languages are: 
+# Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, 
+# Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, 
+# Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English 
+# messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, 
+# Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, 
+# Slovene, Spanish, Swedish, Ukrainian, and Vietnamese.
+
+OUTPUT_LANGUAGE        = English
+
+# If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will 
+# include brief member descriptions after the members that are listed in 
+# the file and class documentation (similar to JavaDoc). 
+# Set to NO to disable this.
+
+BRIEF_MEMBER_DESC      = YES
+
+# If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend 
+# the brief description of a member or function before the detailed description. 
+# Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the 
+# brief descriptions will be completely suppressed.
+
+REPEAT_BRIEF           = YES
+
+# This tag implements a quasi-intelligent brief description abbreviator 
+# that is used to form the text in various listings. Each string 
+# in this list, if found as the leading text of the brief description, will be 
+# stripped from the text and the result after processing the whole list, is 
+# used as the annotated text. Otherwise, the brief description is used as-is. 
+# If left blank, the following values are used ("$name" is automatically 
+# replaced with the name of the entity): "The $name class" "The $name widget" 
+# "The $name file" "is" "provides" "specifies" "contains" 
+# "represents" "a" "an" "the"
+
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+
+# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then 
+# Doxygen will generate a detailed section even if there is only a brief 
+# description.
+
+ALWAYS_DETAILED_SEC    = NO
+
+# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all 
+# inherited members of a class in the documentation of that class as if those 
+# members were ordinary class members. Constructors, destructors and assignment 
+# operators of the base classes will not be shown.
+
+INLINE_INHERITED_MEMB  = NO
+
+# If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full 
+# path before files name in the file list and in the header files. If set 
+# to NO the shortest path that makes the file name unique will be used.
+
+FULL_PATH_NAMES        = YES
+
+# If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag 
+# can be used to strip a user-defined part of the path. Stripping is 
+# only done if one of the specified strings matches the left-hand part of 
+# the path. The tag can be used to show relative paths in the file list. 
+# If left blank the directory from which doxygen is run is used as the 
+# path to strip.
+
+STRIP_FROM_PATH        = 
+
+# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of 
+# the path mentioned in the documentation of a class, which tells 
+# the reader which header file to include in order to use a class. 
+# If left blank only the name of the header file containing the class 
+# definition is used. Otherwise one should specify the include paths that 
+# are normally passed to the compiler using the -I flag.
+
+STRIP_FROM_INC_PATH    = 
+
+# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter 
+# (but less readable) file names. This can be useful if your file system 
+# doesn't support long names like on DOS, Mac, or CD-ROM.
+
+SHORT_NAMES            = NO
+
+# If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen 
+# will interpret the first line (until the first dot) of a JavaDoc-style 
+# comment as the brief description. If set to NO, the JavaDoc 
+# comments will behave just like regular Qt-style comments 
+# (thus requiring an explicit @brief command for a brief description.)
+
+JAVADOC_AUTOBRIEF      = NO
+
+# If the QT_AUTOBRIEF tag is set to YES then Doxygen will 
+# interpret the first line (until the first dot) of a Qt-style 
+# comment as the brief description. If set to NO, the comments 
+# will behave just like regular Qt-style comments (thus requiring 
+# an explicit \brief command for a brief description.)
+
+QT_AUTOBRIEF           = NO
+
+# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen 
+# treat a multi-line C++ special comment block (i.e. a block of //! or /// 
+# comments) as a brief description. This used to be the default behaviour. 
+# The new default is to treat a multi-line C++ comment block as a detailed 
+# description. Set this tag to YES if you prefer the old behaviour instead.
+
+MULTILINE_CPP_IS_BRIEF = NO
+
+# If the INHERIT_DOCS tag is set to YES (the default) then an undocumented 
+# member inherits the documentation from any documented member that it 
+# re-implements.
+
+INHERIT_DOCS           = YES
+
+# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce 
+# a new page for each member. If set to NO, the documentation of a member will 
+# be part of the file/class/namespace that contains it.
+
+SEPARATE_MEMBER_PAGES  = NO
+
+# The TAB_SIZE tag can be used to set the number of spaces in a tab. 
+# Doxygen uses this value to replace tabs by spaces in code fragments.
+
+TAB_SIZE               = 1
+
+# This tag can be used to specify a number of aliases that acts 
+# as commands in the documentation. An alias has the form "name=value". 
+# For example adding "sideeffect=\par Side Effects:\n" will allow you to 
+# put the command \sideeffect (or @sideeffect) in the documentation, which 
+# will result in a user-defined paragraph with heading "Side Effects:". 
+# You can put \n's in the value part of an alias to insert newlines.
+
+ALIASES                = 
+
+# This tag can be used to specify a number of word-keyword mappings (TCL only). 
+# A mapping has the form "name=value". For example adding 
+# "class=itcl::class" will allow you to use the command class in the 
+# itcl::class meaning.
+
+TCL_SUBST              = 
+
+# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C 
+# sources only. Doxygen will then generate output that is more tailored for C. 
+# For instance, some of the names that are used will be different. The list 
+# of all members will be omitted, etc.
+
+OPTIMIZE_OUTPUT_FOR_C  = NO
+
+# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Java. For instance, namespaces will be presented as packages, qualified 
+# scopes will look different, etc.
+
+OPTIMIZE_OUTPUT_JAVA   = NO
+
+# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran 
+# sources only. Doxygen will then generate output that is more tailored for 
+# Fortran.
+
+OPTIMIZE_FOR_FORTRAN   = NO
+
+# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL 
+# sources. Doxygen will then generate output that is tailored for 
+# VHDL.
+
+OPTIMIZE_OUTPUT_VHDL   = NO
+
+# Doxygen selects the parser to use depending on the extension of the files it 
+# parses. With this tag you can assign which parser to use for a given extension. 
+# Doxygen has a built-in mapping, but you can override or extend it using this 
+# tag. The format is ext=language, where ext is a file extension, and language 
+# is one of the parsers supported by doxygen: IDL, Java, Javascript, CSharp, C, 
+# C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, C++. For instance to make 
+# doxygen treat .inc files as Fortran files (default is PHP), and .f files as C 
+# (default is Fortran), use: inc=Fortran f=C. Note that for custom extensions 
+# you also need to set FILE_PATTERNS otherwise the files are not read by doxygen.
+
+EXTENSION_MAPPING      = 
+
+# If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all 
+# comments according to the Markdown format, which allows for more readable 
+# documentation. See http://daringfireball.net/projects/markdown/ for details. 
+# The output of markdown processing is further processed by doxygen, so you 
+# can mix doxygen, HTML, and XML commands with Markdown formatting. 
+# Disable only in case of backward compatibilities issues.
+
+MARKDOWN_SUPPORT       = YES
+
+# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want 
+# to include (a tag file for) the STL sources as input, then you should 
+# set this tag to YES in order to let doxygen match functions declarations and 
+# definitions whose arguments contain STL classes (e.g. func(std::string); v.s. 
+# func(std::string) {}). This also makes the inheritance and collaboration 
+# diagrams that involve STL classes more complete and accurate.
+
+BUILTIN_STL_SUPPORT    = NO
+
+# If you use Microsoft's C++/CLI language, you should set this option to YES to 
+# enable parsing support.
+
+CPP_CLI_SUPPORT        = NO
+
+# Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. 
+# Doxygen will parse them like normal C++ but will assume all classes use public 
+# instead of private inheritance when no explicit protection keyword is present.
+
+SIP_SUPPORT            = NO
+
+# For Microsoft's IDL there are propget and propput attributes to indicate getter 
+# and setter methods for a property. Setting this option to YES (the default) 
+# will make doxygen replace the get and set methods by a property in the 
+# documentation. This will only work if the methods are indeed getting or 
+# setting a simple type. If this is not the case, or you want to show the 
+# methods anyway, you should set this option to NO.
+
+IDL_PROPERTY_SUPPORT   = YES
+
+# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC 
+# tag is set to YES, then doxygen will reuse the documentation of the first 
+# member in the group (if any) for the other members of the group. By default 
+# all members of a group must be documented explicitly.
+
+DISTRIBUTE_GROUP_DOC   = NO
+
+# Set the SUBGROUPING tag to YES (the default) to allow class member groups of 
+# the same type (for instance a group of public functions) to be put as a 
+# subgroup of that type (e.g. under the Public Functions section). Set it to 
+# NO to prevent subgrouping. Alternatively, this can be done per class using 
+# the \nosubgrouping command.
+
+SUBGROUPING            = YES
+
+# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and 
+# unions are shown inside the group in which they are included (e.g. using 
+# @ingroup) instead of on a separate page (for HTML and Man pages) or 
+# section (for LaTeX and RTF).
+
+INLINE_GROUPED_CLASSES = NO
+
+# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and 
+# unions with only public data fields will be shown inline in the documentation 
+# of the scope in which they are defined (i.e. file, namespace, or group 
+# documentation), provided this scope is documented. If set to NO (the default), 
+# structs, classes, and unions are shown on a separate page (for HTML and Man 
+# pages) or section (for LaTeX and RTF).
+
+INLINE_SIMPLE_STRUCTS  = NO
+
+# When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum 
+# is documented as struct, union, or enum with the name of the typedef. So 
+# typedef struct TypeS {} TypeT, will appear in the documentation as a struct 
+# with name TypeT. When disabled the typedef will appear as a member of a file, 
+# namespace, or class. And the struct will be named TypeS. This can typically 
+# be useful for C code in case the coding convention dictates that all compound 
+# types are typedef'ed and only the typedef is referenced, never the tag name.
+
+TYPEDEF_HIDES_STRUCT   = NO
+
+# The SYMBOL_CACHE_SIZE determines the size of the internal cache use to 
+# determine which symbols to keep in memory and which to flush to disk. 
+# When the cache is full, less often used symbols will be written to disk. 
+# For small to medium size projects (<1000 input files) the default value is 
+# probably good enough. For larger projects a too small cache size can cause 
+# doxygen to be busy swapping symbols to and from disk most of the time 
+# causing a significant performance penalty. 
+# If the system has enough physical memory increasing the cache will improve the 
+# performance by keeping more symbols in memory. Note that the value works on 
+# a logarithmic scale so increasing the size by one will roughly double the 
+# memory usage. The cache size is given by this formula: 
+# 2^(16+SYMBOL_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols.
+
+SYMBOL_CACHE_SIZE      = 0
+
+# Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be 
+# set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given 
+# their name and scope. Since this can be an expensive process and often the 
+# same symbol appear multiple times in the code, doxygen keeps a cache of 
+# pre-resolved symbols. If the cache is too small doxygen will become slower. 
+# If the cache is too large, memory is wasted. The cache size is given by this 
+# formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, 
+# corresponding to a cache size of 2^16 = 65536 symbols.
+
+LOOKUP_CACHE_SIZE      = 0
+
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+
+# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in 
+# documentation are documented, even if no documentation was available. 
+# Private class members and static file members will be hidden unless 
+# the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES
+
+EXTRACT_ALL            = YES
+
+# If the EXTRACT_PRIVATE tag is set to YES all private members of a class 
+# will be included in the documentation.
+
+EXTRACT_PRIVATE        = NO
+
+# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal
+# scope will be included in the documentation.
+
+EXTRACT_PACKAGE        = NO
+
+# If the EXTRACT_STATIC tag is set to YES all static members of a file 
+# will be included in the documentation.
+
+EXTRACT_STATIC         = NO
+
+# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) 
+# defined locally in source files will be included in the documentation. 
+# If set to NO only classes defined in header files are included.
+
+EXTRACT_LOCAL_CLASSES  = YES
+
+# This flag is only useful for Objective-C code. When set to YES local 
+# methods, which are defined in the implementation section but not in 
+# the interface are included in the documentation. 
+# If set to NO (the default) only methods in the interface are included.
+
+EXTRACT_LOCAL_METHODS  = NO
+
+# If this flag is set to YES, the members of anonymous namespaces will be 
+# extracted and appear in the documentation as a namespace called 
+# 'anonymous_namespace{file}', where file will be replaced with the base 
+# name of the file that contains the anonymous namespace. By default 
+# anonymous namespaces are hidden.
+
+EXTRACT_ANON_NSPACES   = NO
+
+# If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all 
+# undocumented members of documented classes, files or namespaces. 
+# If set to NO (the default) these members will be included in the 
+# various overviews, but no documentation section is generated. 
+# This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_MEMBERS     = NO
+
+# If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all 
+# undocumented classes that are normally visible in the class hierarchy. 
+# If set to NO (the default) these classes will be included in the various 
+# overviews. This option has no effect if EXTRACT_ALL is enabled.
+
+HIDE_UNDOC_CLASSES     = NO
+
+# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all 
+# friend (class|struct|union) declarations. 
+# If set to NO (the default) these declarations will be included in the 
+# documentation.
+
+HIDE_FRIEND_COMPOUNDS  = NO
+
+# If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any 
+# documentation blocks found inside the body of a function. 
+# If set to NO (the default) these blocks will be appended to the 
+# function's detailed documentation block.
+
+HIDE_IN_BODY_DOCS      = NO
+
+# The INTERNAL_DOCS tag determines if documentation 
+# that is typed after a \internal command is included. If the tag is set 
+# to NO (the default) then the documentation will be excluded. 
+# Set it to YES to include the internal documentation.
+
+INTERNAL_DOCS          = NO
+
+# If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate 
+# file names in lower-case letters. If set to YES upper-case letters are also 
+# allowed. This is useful if you have classes or files whose names only differ 
+# in case and if your file system supports case sensitive file names. Windows 
+# and Mac users are advised to set this option to NO.
+
+CASE_SENSE_NAMES       = NO
+
+# If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen 
+# will show members with their full class and namespace scopes in the 
+# documentation. If set to YES the scope will be hidden.
+
+HIDE_SCOPE_NAMES       = NO
+
+# If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen 
+# will put a list of the files that are included by a file in the documentation 
+# of that file.
+
+SHOW_INCLUDE_FILES     = YES
+
+# If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen 
+# will list include files with double quotes in the documentation 
+# rather than with sharp brackets.
+
+FORCE_LOCAL_INCLUDES   = NO
+
+# If the INLINE_INFO tag is set to YES (the default) then a tag [inline] 
+# is inserted in the documentation for inline members.
+
+INLINE_INFO            = YES
+
+# If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen 
+# will sort the (detailed) documentation of file and class members 
+# alphabetically by member name. If set to NO the members will appear in 
+# declaration order.
+
+SORT_MEMBER_DOCS       = YES
+
+# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the 
+# brief documentation of file, namespace and class members alphabetically 
+# by member name. If set to NO (the default) the members will appear in 
+# declaration order.
+
+SORT_BRIEF_DOCS        = NO
+
+# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen 
+# will sort the (brief and detailed) documentation of class members so that 
+# constructors and destructors are listed first. If set to NO (the default) 
+# the constructors will appear in the respective orders defined by 
+# SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. 
+# This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO 
+# and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO.
+
+SORT_MEMBERS_CTORS_1ST = NO
+
+# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the 
+# hierarchy of group names into alphabetical order. If set to NO (the default) 
+# the group names will appear in their defined order.
+
+SORT_GROUP_NAMES       = NO
+
+# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be 
+# sorted by fully-qualified names, including namespaces. If set to 
+# NO (the default), the class list will be sorted only by class name, 
+# not including the namespace part. 
+# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. 
+# Note: This option applies only to the class list, not to the 
+# alphabetical list.
+
+SORT_BY_SCOPE_NAME     = NO
+
+# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to 
+# do proper type resolution of all parameters of a function it will reject a 
+# match between the prototype and the implementation of a member function even 
+# if there is only one candidate or it is obvious which candidate to choose 
+# by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen 
+# will still accept a match between prototype and implementation in such cases.
+
+STRICT_PROTO_MATCHING  = NO
+
+# The GENERATE_TODOLIST tag can be used to enable (YES) or 
+# disable (NO) the todo list. This list is created by putting \todo 
+# commands in the documentation.
+
+GENERATE_TODOLIST      = YES
+
+# The GENERATE_TESTLIST tag can be used to enable (YES) or 
+# disable (NO) the test list. This list is created by putting \test 
+# commands in the documentation.
+
+GENERATE_TESTLIST      = YES
+
+# The GENERATE_BUGLIST tag can be used to enable (YES) or 
+# disable (NO) the bug list. This list is created by putting \bug 
+# commands in the documentation.
+
+GENERATE_BUGLIST       = YES
+
+# The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or 
+# disable (NO) the deprecated list. This list is created by putting 
+# \deprecated commands in the documentation.
+
+GENERATE_DEPRECATEDLIST= YES
+
+# The ENABLED_SECTIONS tag can be used to enable conditional 
+# documentation sections, marked by \if sectionname ... \endif.
+
+ENABLED_SECTIONS       = 
+
+# The MAX_INITIALIZER_LINES tag determines the maximum number of lines 
+# the initial value of a variable or macro consists of for it to appear in 
+# the documentation. If the initializer consists of more lines than specified 
+# here it will be hidden. Use a value of 0 to hide initializers completely. 
+# The appearance of the initializer of individual variables and macros in the 
+# documentation can be controlled using \showinitializer or \hideinitializer 
+# command in the documentation regardless of this setting.
+
+MAX_INITIALIZER_LINES  = 30
+
+# Set the SHOW_USED_FILES tag to NO to disable the list of files generated 
+# at the bottom of the documentation of classes and structs. If set to YES the 
+# list will mention the files that were used to generate the documentation.
+
+SHOW_USED_FILES        = YES
+
+# Set the SHOW_FILES tag to NO to disable the generation of the Files page. 
+# This will remove the Files entry from the Quick Index and from the 
+# Folder Tree View (if specified). The default is YES.
+
+SHOW_FILES             = YES
+
+# Set the SHOW_NAMESPACES tag to NO to disable the generation of the 
+# Namespaces page.  This will remove the Namespaces entry from the Quick Index 
+# and from the Folder Tree View (if specified). The default is YES.
+
+SHOW_NAMESPACES        = YES
+
+# The FILE_VERSION_FILTER tag can be used to specify a program or script that 
+# doxygen should invoke to get the current version for each file (typically from 
+# the version control system). Doxygen will invoke the program by executing (via 
+# popen()) the command <command> <input-file>, where <command> is the value of 
+# the FILE_VERSION_FILTER tag, and <input-file> is the name of an input file 
+# provided by doxygen. Whatever the program writes to standard output 
+# is used as the file version. See the manual for examples.
+
+FILE_VERSION_FILTER    = 
+
+# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed 
+# by doxygen. The layout file controls the global structure of the generated 
+# output files in an output format independent way. To create the layout file 
+# that represents doxygen's defaults, run doxygen with the -l option. 
+# You can optionally specify a file name after the option, if omitted 
+# DoxygenLayout.xml will be used as the name of the layout file.
+
+LAYOUT_FILE            = 
+
+# The CITE_BIB_FILES tag can be used to specify one or more bib files 
+# containing the references data. This must be a list of .bib files. The 
+# .bib extension is automatically appended if omitted. Using this command 
+# requires the bibtex tool to be installed. See also 
+# http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style 
+# of the bibliography can be controlled using LATEX_BIB_STYLE. To use this 
+# feature you need bibtex and perl available in the search path.
+
+CITE_BIB_FILES         = 
+
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+
+# The QUIET tag can be used to turn on/off the messages that are generated 
+# by doxygen. Possible values are YES and NO. If left blank NO is used.
+
+QUIET                  = NO
+
+# The WARNINGS tag can be used to turn on/off the warning messages that are 
+# generated by doxygen. Possible values are YES and NO. If left blank 
+# NO is used.
+
+WARNINGS               = YES
+
+# If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings 
+# for undocumented members. If EXTRACT_ALL is set to YES then this flag will 
+# automatically be disabled.
+
+WARN_IF_UNDOCUMENTED   = YES
+
+# If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for 
+# potential errors in the documentation, such as not documenting some 
+# parameters in a documented function, or documenting parameters that 
+# don't exist or using markup commands wrongly.
+
+WARN_IF_DOC_ERROR      = YES
+
+# The WARN_NO_PARAMDOC option can be enabled to get warnings for 
+# functions that are documented, but have no documentation for their parameters 
+# or return value. If set to NO (the default) doxygen will only warn about 
+# wrong or incomplete parameter documentation, but not about the absence of 
+# documentation.
+
+WARN_NO_PARAMDOC       = NO
+
+# The WARN_FORMAT tag determines the format of the warning messages that 
+# doxygen can produce. The string should contain the $file, $line, and $text 
+# tags, which will be replaced by the file and line number from which the 
+# warning originated and the warning text. Optionally the format may contain 
+# $version, which will be replaced by the version of the file (if it could 
+# be obtained via FILE_VERSION_FILTER)
+
+WARN_FORMAT            = "$file:$line: $text"
+
+# The WARN_LOGFILE tag can be used to specify a file to which warning 
+# and error messages should be written. If left blank the output is written 
+# to stderr.
+
+WARN_LOGFILE           = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+
+# The INPUT tag can be used to specify the files and/or directories that contain 
+# documented source files. You may enter file names like "myfile.cpp" or 
+# directories like "/usr/src/myproject". Separate the files or directories 
+# with spaces.
+
+INPUT                  = . ../cadxcore ../visualizator ../gnkpro ../mpr
+
+# This tag can be used to specify the character encoding of the source files 
+# that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is 
+# also the default input encoding. Doxygen uses libiconv (or the iconv built 
+# into libc) for the transcoding. See http://www.gnu.org/software/libiconv for 
+# the list of possible encodings.
+
+INPUT_ENCODING         = UTF-8
+
+# If the value of the INPUT tag contains directories, you can use the 
+# FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank the following patterns are tested: 
+# *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh 
+# *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py 
+# *.f90 *.f *.for *.vhd *.vhdl
+
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.d \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.markdown \
+                         *.md \
+                         *.mm \
+                         *.dox \
+                         *.py \
+                         *.f90 \
+                         *.f \
+                         *.for \
+                         *.vhd \
+                         *.vhdl
+
+# The RECURSIVE tag can be used to turn specify whether or not subdirectories 
+# should be searched for input files as well. Possible values are YES and NO. 
+# If left blank NO is used.
+
+RECURSIVE              = YES
+
+# The EXCLUDE tag can be used to specify files and/or directories that should be 
+# excluded from the INPUT source files. This way you can easily exclude a 
+# subdirectory from a directory tree whose root is specified with the INPUT tag. 
+# Note that relative paths are relative to the directory from which doxygen is 
+# run.
+
+EXCLUDE                = 
+
+# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or 
+# directories that are symbolic links (a Unix file system feature) are excluded 
+# from the input.
+
+EXCLUDE_SYMLINKS       = NO
+
+# If the value of the INPUT tag contains directories, you can use the 
+# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude 
+# certain files from those directories. Note that the wildcards are matched 
+# against the file with absolute path, so to exclude all test directories 
+# for example use the pattern */test/*
+
+EXCLUDE_PATTERNS       = 
+
+# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names 
+# (namespaces, classes, functions, etc.) that should be excluded from the 
+# output. The symbol name can be a fully qualified name, a word, or if the 
+# wildcard * is used, a substring. Examples: ANamespace, AClass, 
+# AClass::ANamespace, ANamespace::*Test
+
+EXCLUDE_SYMBOLS        = 
+
+# The EXAMPLE_PATH tag can be used to specify one or more files or 
+# directories that contain example code fragments that are included (see 
+# the \include command).
+
+EXAMPLE_PATH           = 
+
+# If the value of the EXAMPLE_PATH tag contains directories, you can use the 
+# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp 
+# and *.h) to filter out the source-files in the directories. If left 
+# blank all files are included.
+
+EXAMPLE_PATTERNS       = *
+
+# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be 
+# searched for input files to be used with the \include or \dontinclude 
+# commands irrespective of the value of the RECURSIVE tag. 
+# Possible values are YES and NO. If left blank NO is used.
+
+EXAMPLE_RECURSIVE      = NO
+
+# The IMAGE_PATH tag can be used to specify one or more files or 
+# directories that contain image that are included in the documentation (see 
+# the \image command).
+
+IMAGE_PATH             = 
+
+# The INPUT_FILTER tag can be used to specify a program that doxygen should 
+# invoke to filter for each input file. Doxygen will invoke the filter program 
+# by executing (via popen()) the command <filter> <input-file>, where <filter> 
+# is the value of the INPUT_FILTER tag, and <input-file> is the name of an 
+# input file. Doxygen will then use the output that the filter program writes 
+# to standard output.  If FILTER_PATTERNS is specified, this tag will be 
+# ignored.
+
+INPUT_FILTER           = 
+
+# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern 
+# basis.  Doxygen will compare the file name with each pattern and apply the 
+# filter if there is a match.  The filters are a list of the form: 
+# pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further 
+# info on how filters are used. If FILTER_PATTERNS is empty or if 
+# non of the patterns match the file name, INPUT_FILTER is applied.
+
+FILTER_PATTERNS        = 
+
+# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using 
+# INPUT_FILTER) will be used to filter the input files when producing source 
+# files to browse (i.e. when SOURCE_BROWSER is set to YES).
+
+FILTER_SOURCE_FILES    = NO
+
+# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file 
+# pattern. A pattern will override the setting for FILTER_PATTERN (if any) 
+# and it is also possible to disable source filtering for a specific pattern 
+# using *.ext= (so without naming a filter). This option only has effect when 
+# FILTER_SOURCE_FILES is enabled.
+
+FILTER_SOURCE_PATTERNS = 
+
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+
+# If the SOURCE_BROWSER tag is set to YES then a list of source files will 
+# be generated. Documented entities will be cross-referenced with these sources. 
+# Note: To get rid of all source code in the generated output, make sure also 
+# VERBATIM_HEADERS is set to NO.
+
+SOURCE_BROWSER         = YES
+
+# Setting the INLINE_SOURCES tag to YES will include the body 
+# of functions and classes directly in the documentation.
+
+INLINE_SOURCES         = NO
+
+# Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct 
+# doxygen to hide any special comment blocks from generated source code 
+# fragments. Normal C, C++ and Fortran comments will always remain visible.
+
+STRIP_CODE_COMMENTS    = YES
+
+# If the REFERENCED_BY_RELATION tag is set to YES 
+# then for each documented function all documented 
+# functions referencing it will be listed.
+
+REFERENCED_BY_RELATION = NO
+
+# If the REFERENCES_RELATION tag is set to YES 
+# then for each documented function all documented entities 
+# called/used by that function will be listed.
+
+REFERENCES_RELATION    = NO
+
+# If the REFERENCES_LINK_SOURCE tag is set to YES (the default) 
+# and SOURCE_BROWSER tag is set to YES, then the hyperlinks from 
+# functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will 
+# link to the source code.  Otherwise they will link to the documentation.
+
+REFERENCES_LINK_SOURCE = YES
+
+# If the USE_HTAGS tag is set to YES then the references to source code 
+# will point to the HTML generated by the htags(1) tool instead of doxygen 
+# built-in source browser. The htags tool is part of GNU's global source 
+# tagging system (see http://www.gnu.org/software/global/global.html). You 
+# will need version 4.8.6 or higher.
+
+USE_HTAGS              = NO
+
+# If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen 
+# will generate a verbatim copy of the header file for each class for 
+# which an include is specified. Set to NO to disable this.
+
+VERBATIM_HEADERS       = YES
+
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+
+# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index 
+# of all compounds will be generated. Enable this if the project 
+# contains a lot of classes, structs, unions or interfaces.
+
+ALPHABETICAL_INDEX     = YES
+
+# If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then 
+# the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns 
+# in which this list will be split (can be a number in the range [1..20])
+
+COLS_IN_ALPHA_INDEX    = 5
+
+# In case all classes in a project start with a common prefix, all 
+# classes will be put under the same header in the alphabetical index. 
+# The IGNORE_PREFIX tag can be used to specify one or more prefixes that 
+# should be ignored while generating the index headers.
+
+IGNORE_PREFIX          = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_HTML tag is set to YES (the default) Doxygen will 
+# generate HTML output.
+
+GENERATE_HTML          = YES
+
+# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `html' will be used as the default path.
+
+HTML_OUTPUT            = html
+
+# The HTML_FILE_EXTENSION tag can be used to specify the file extension for 
+# each generated HTML page (for example: .htm,.php,.asp). If it is left blank 
+# doxygen will generate files with .html extension.
+
+HTML_FILE_EXTENSION    = .html
+
+# The HTML_HEADER tag can be used to specify a personal HTML header for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard header. Note that when using a custom header you are responsible  
+# for the proper inclusion of any scripts and style sheets that doxygen 
+# needs, which is dependent on the configuration options used. 
+# It is advised to generate a default header using "doxygen -w html 
+# header.html footer.html stylesheet.css YourConfigFile" and then modify 
+# that header. Note that the header is subject to change so you typically 
+# have to redo this when upgrading to a newer version of doxygen or when 
+# changing the value of configuration settings such as GENERATE_TREEVIEW!
+
+HTML_HEADER            = 
+
+# The HTML_FOOTER tag can be used to specify a personal HTML footer for 
+# each generated HTML page. If it is left blank doxygen will generate a 
+# standard footer.
+
+HTML_FOOTER            = 
+
+# The HTML_STYLESHEET tag can be used to specify a user-defined cascading 
+# style sheet that is used by each HTML page. It can be used to 
+# fine-tune the look of the HTML output. If the tag is left blank doxygen 
+# will generate a default style sheet. Note that doxygen will try to copy 
+# the style sheet file to the HTML output directory, so don't put your own 
+# style sheet in the HTML output directory as well, or it will be erased!
+
+HTML_STYLESHEET        = 
+
+# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or 
+# other source files which should be copied to the HTML output directory. Note 
+# that these files will be copied to the base HTML output directory. Use the 
+# $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these 
+# files. In the HTML_STYLESHEET file, use the file name only. Also note that 
+# the files will be copied as-is; there are no commands or markers available.
+
+HTML_EXTRA_FILES       = 
+
+# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. 
+# Doxygen will adjust the colors in the style sheet and background images 
+# according to this color. Hue is specified as an angle on a colorwheel, 
+# see http://en.wikipedia.org/wiki/Hue for more information. 
+# For instance the value 0 represents red, 60 is yellow, 120 is green, 
+# 180 is cyan, 240 is blue, 300 purple, and 360 is red again. 
+# The allowed range is 0 to 359.
+
+HTML_COLORSTYLE_HUE    = 220
+
+# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of 
+# the colors in the HTML output. For a value of 0 the output will use 
+# grayscales only. A value of 255 will produce the most vivid colors.
+
+HTML_COLORSTYLE_SAT    = 100
+
+# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to 
+# the luminance component of the colors in the HTML output. Values below 
+# 100 gradually make the output lighter, whereas values above 100 make 
+# the output darker. The value divided by 100 is the actual gamma applied, 
+# so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, 
+# and 100 does not change the gamma.
+
+HTML_COLORSTYLE_GAMMA  = 80
+
+# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML 
+# page will contain the date and time when the page was generated. Setting 
+# this to NO can help when comparing the output of multiple runs.
+
+HTML_TIMESTAMP         = YES
+
+# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML 
+# documentation will contain sections that can be hidden and shown after the 
+# page has loaded.
+
+HTML_DYNAMIC_SECTIONS  = NO
+
+# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of 
+# entries shown in the various tree structured indices initially; the user 
+# can expand and collapse entries dynamically later on. Doxygen will expand 
+# the tree to such a level that at most the specified number of entries are 
+# visible (unless a fully collapsed tree already exceeds this amount). 
+# So setting the number of entries 1 will produce a full collapsed tree by 
+# default. 0 is a special value representing an infinite number of entries 
+# and will result in a full expanded tree by default.
+
+HTML_INDEX_NUM_ENTRIES = 100
+
+# If the GENERATE_DOCSET tag is set to YES, additional index files 
+# will be generated that can be used as input for Apple's Xcode 3 
+# integrated development environment, introduced with OSX 10.5 (Leopard). 
+# To create a documentation set, doxygen will generate a Makefile in the 
+# HTML output directory. Running make will produce the docset in that 
+# directory and running "make install" will install the docset in 
+# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find 
+# it at startup. 
+# See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html 
+# for more information.
+
+GENERATE_DOCSET        = NO
+
+# When GENERATE_DOCSET tag is set to YES, this tag determines the name of the 
+# feed. A documentation feed provides an umbrella under which multiple 
+# documentation sets from a single provider (such as a company or product suite) 
+# can be grouped.
+
+DOCSET_FEEDNAME        = "Doxygen generated docs"
+
+# When GENERATE_DOCSET tag is set to YES, this tag specifies a string that 
+# should uniquely identify the documentation set bundle. This should be a 
+# reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen 
+# will append .docset to the name.
+
+DOCSET_BUNDLE_ID       = org.doxygen.Project
+
+# When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely identify 
+# the documentation publisher. This should be a reverse domain-name style 
+# string, e.g. com.mycompany.MyDocSet.documentation.
+
+DOCSET_PUBLISHER_ID    = org.doxygen.Publisher
+
+# The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher.
+
+DOCSET_PUBLISHER_NAME  = Publisher
+
+# If the GENERATE_HTMLHELP tag is set to YES, additional index files 
+# will be generated that can be used as input for tools like the 
+# Microsoft HTML help workshop to generate a compiled HTML help file (.chm) 
+# of the generated HTML documentation.
+
+GENERATE_HTMLHELP      = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can 
+# be used to specify the file name of the resulting .chm file. You 
+# can add a path in front of the file if the result should not be 
+# written to the html output directory.
+
+CHM_FILE               = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can 
+# be used to specify the location (absolute path including file name) of 
+# the HTML help compiler (hhc.exe). If non-empty doxygen will try to run 
+# the HTML help compiler on the generated index.hhp.
+
+HHC_LOCATION           = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag 
+# controls if a separate .chi index file is generated (YES) or that 
+# it should be included in the master .chm file (NO).
+
+GENERATE_CHI           = NO
+
+# If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING 
+# is used to encode HtmlHelp index (hhk), content (hhc) and project file 
+# content.
+
+CHM_INDEX_ENCODING     = 
+
+# If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag 
+# controls whether a binary table of contents is generated (YES) or a 
+# normal table of contents (NO) in the .chm file.
+
+BINARY_TOC             = NO
+
+# The TOC_EXPAND flag can be set to YES to add extra items for group members 
+# to the contents of the HTML help documentation and to the tree view.
+
+TOC_EXPAND             = NO
+
+# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and 
+# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated 
+# that can be used as input for Qt's qhelpgenerator to generate a 
+# Qt Compressed Help (.qch) of the generated HTML documentation.
+
+GENERATE_QHP           = NO
+
+# If the QHG_LOCATION tag is specified, the QCH_FILE tag can 
+# be used to specify the file name of the resulting .qch file. 
+# The path specified is relative to the HTML output folder.
+
+QCH_FILE               = 
+
+# The QHP_NAMESPACE tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#namespace
+
+QHP_NAMESPACE          = org.doxygen.Project
+
+# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating 
+# Qt Help Project output. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#virtual-folders
+
+QHP_VIRTUAL_FOLDER     = doc
+
+# If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to 
+# add. For more information please see 
+# http://doc.trolltech.com/qthelpproject.html#custom-filters
+
+QHP_CUST_FILTER_NAME   = 
+
+# The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the 
+# custom filter to add. For more information please see 
+# <a href="http://doc.trolltech.com/qthelpproject.html#custom-filters"> 
+# Qt Help Project / Custom Filters</a>.
+
+QHP_CUST_FILTER_ATTRS  = 
+
+# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this 
+# project's 
+# filter section matches. 
+# <a href="http://doc.trolltech.com/qthelpproject.html#filter-attributes"> 
+# Qt Help Project / Filter Attributes</a>.
+
+QHP_SECT_FILTER_ATTRS  = 
+
+# If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can 
+# be used to specify the location of Qt's qhelpgenerator. 
+# If non-empty doxygen will try to run qhelpgenerator on the generated 
+# .qhp file.
+
+QHG_LOCATION           = 
+
+# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files  
+# will be generated, which together with the HTML files, form an Eclipse help 
+# plugin. To install this plugin and make it available under the help contents 
+# menu in Eclipse, the contents of the directory containing the HTML and XML 
+# files needs to be copied into the plugins directory of eclipse. The name of 
+# the directory within the plugins directory should be the same as 
+# the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before 
+# the help appears.
+
+GENERATE_ECLIPSEHELP   = NO
+
+# A unique identifier for the eclipse help plugin. When installing the plugin 
+# the directory name containing the HTML and XML files should also have 
+# this name.
+
+ECLIPSE_DOC_ID         = org.doxygen.Project
+
+# The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) 
+# at top of each HTML page. The value NO (the default) enables the index and 
+# the value YES disables it. Since the tabs have the same information as the 
+# navigation tree you can set this option to NO if you already set 
+# GENERATE_TREEVIEW to YES.
+
+DISABLE_INDEX          = NO
+
+# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index 
+# structure should be generated to display hierarchical information. 
+# If the tag value is set to YES, a side panel will be generated 
+# containing a tree-like index structure (just like the one that 
+# is generated for HTML Help). For this to work a browser that supports 
+# JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). 
+# Windows users are probably better off using the HTML help feature. 
+# Since the tree basically has the same information as the tab index you 
+# could consider to set DISABLE_INDEX to NO when enabling this option.
+
+GENERATE_TREEVIEW      = NO
+
+# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values 
+# (range [0,1..20]) that doxygen will group on one line in the generated HTML 
+# documentation. Note that a value of 0 will completely suppress the enum 
+# values from appearing in the overview section.
+
+ENUM_VALUES_PER_LINE   = 4
+
+# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be 
+# used to set the initial width (in pixels) of the frame in which the tree 
+# is shown.
+
+TREEVIEW_WIDTH         = 250
+
+# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open 
+# links to external symbols imported via tag files in a separate window.
+
+EXT_LINKS_IN_WINDOW    = NO
+
+# Use this tag to change the font size of Latex formulas included 
+# as images in the HTML documentation. The default is 10. Note that 
+# when you change the font size after a successful doxygen run you need 
+# to manually remove any form_*.png images from the HTML output directory 
+# to force them to be regenerated.
+
+FORMULA_FONTSIZE       = 10
+
+# Use the FORMULA_TRANPARENT tag to determine whether or not the images 
+# generated for formulas are transparent PNGs. Transparent PNGs are 
+# not supported properly for IE 6.0, but are supported on all modern browsers. 
+# Note that when changing this option you need to delete any form_*.png files 
+# in the HTML output before the changes have effect.
+
+FORMULA_TRANSPARENT    = YES
+
+# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax 
+# (see http://www.mathjax.org) which uses client side Javascript for the 
+# rendering instead of using prerendered bitmaps. Use this if you do not 
+# have LaTeX installed or if you want to formulas look prettier in the HTML 
+# output. When enabled you may also need to install MathJax separately and 
+# configure the path to it using the MATHJAX_RELPATH option.
+
+USE_MATHJAX            = NO
+
+# When MathJax is enabled you need to specify the location relative to the 
+# HTML output directory using the MATHJAX_RELPATH option. The destination 
+# directory should contain the MathJax.js script. For instance, if the mathjax 
+# directory is located at the same level as the HTML output directory, then 
+# MATHJAX_RELPATH should be ../mathjax. The default value points to 
+# the MathJax Content Delivery Network so you can quickly see the result without 
+# installing MathJax.  However, it is strongly recommended to install a local 
+# copy of MathJax from http://www.mathjax.org before deployment.
+
+MATHJAX_RELPATH        = http://cdn.mathjax.org/mathjax/latest
+
+# The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension 
+# names that should be enabled during MathJax rendering.
+
+MATHJAX_EXTENSIONS     = 
+
+# When the SEARCHENGINE tag is enabled doxygen will generate a search box 
+# for the HTML output. The underlying search engine uses javascript 
+# and DHTML and should work on any modern browser. Note that when using 
+# HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets 
+# (GENERATE_DOCSET) there is already a search function so this one should 
+# typically be disabled. For large projects the javascript based search engine 
+# can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution.
+
+SEARCHENGINE           = YES
+
+# When the SERVER_BASED_SEARCH tag is enabled the search engine will be 
+# implemented using a PHP enabled web server instead of at the web client 
+# using Javascript. Doxygen will generate the search PHP script and index 
+# file to put on the web server. The advantage of the server 
+# based approach is that it scales better to large projects and allows 
+# full text search. The disadvantages are that it is more difficult to setup 
+# and does not have live searching capabilities.
+
+SERVER_BASED_SEARCH    = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_LATEX tag is set to YES (the default) Doxygen will 
+# generate Latex output.
+
+GENERATE_LATEX         = YES
+
+# The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `latex' will be used as the default path.
+
+LATEX_OUTPUT           = latex
+
+# The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be 
+# invoked. If left blank `latex' will be used as the default command name. 
+# Note that when enabling USE_PDFLATEX this option is only used for 
+# generating bitmaps for formulas in the HTML output, but not in the 
+# Makefile that is written to the output directory.
+
+LATEX_CMD_NAME         = latex
+
+# The MAKEINDEX_CMD_NAME tag can be used to specify the command name to 
+# generate index for LaTeX. If left blank `makeindex' will be used as the 
+# default command name.
+
+MAKEINDEX_CMD_NAME     = makeindex
+
+# If the COMPACT_LATEX tag is set to YES Doxygen generates more compact 
+# LaTeX documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_LATEX          = NO
+
+# The PAPER_TYPE tag can be used to set the paper type that is used 
+# by the printer. Possible values are: a4, letter, legal and 
+# executive. If left blank a4wide will be used.
+
+PAPER_TYPE             = a4
+
+# The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX 
+# packages that should be included in the LaTeX output.
+
+EXTRA_PACKAGES         = 
+
+# The LATEX_HEADER tag can be used to specify a personal LaTeX header for 
+# the generated latex document. The header should contain everything until 
+# the first chapter. If it is left blank doxygen will generate a 
+# standard header. Notice: only use this tag if you know what you are doing!
+
+LATEX_HEADER           = 
+
+# The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for 
+# the generated latex document. The footer should contain everything after 
+# the last chapter. If it is left blank doxygen will generate a 
+# standard footer. Notice: only use this tag if you know what you are doing!
+
+LATEX_FOOTER           = 
+
+# If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated 
+# is prepared for conversion to pdf (using ps2pdf). The pdf file will 
+# contain links (just like the HTML output) instead of page references 
+# This makes the output suitable for online browsing using a pdf viewer.
+
+PDF_HYPERLINKS         = YES
+
+# If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of 
+# plain latex in the generated Makefile. Set this option to YES to get a 
+# higher quality PDF documentation.
+
+USE_PDFLATEX           = YES
+
+# If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. 
+# command to the generated LaTeX files. This will instruct LaTeX to keep 
+# running if errors occur, instead of asking the user for help. 
+# This option is also used when generating formulas in HTML.
+
+LATEX_BATCHMODE        = NO
+
+# If LATEX_HIDE_INDICES is set to YES then doxygen will not 
+# include the index chapters (such as File Index, Compound Index, etc.) 
+# in the output.
+
+LATEX_HIDE_INDICES     = NO
+
+# If LATEX_SOURCE_CODE is set to YES then doxygen will include 
+# source code with syntax highlighting in the LaTeX output. 
+# Note that which sources are shown also depends on other settings 
+# such as SOURCE_BROWSER.
+
+LATEX_SOURCE_CODE      = NO
+
+# The LATEX_BIB_STYLE tag can be used to specify the style to use for the 
+# bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See 
+# http://en.wikipedia.org/wiki/BibTeX for more info.
+
+LATEX_BIB_STYLE        = plain
+
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output 
+# The RTF output is optimized for Word 97 and may not look very pretty with 
+# other RTF readers or editors.
+
+GENERATE_RTF           = NO
+
+# The RTF_OUTPUT tag is used to specify where the RTF docs will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `rtf' will be used as the default path.
+
+RTF_OUTPUT             = rtf
+
+# If the COMPACT_RTF tag is set to YES Doxygen generates more compact 
+# RTF documents. This may be useful for small projects and may help to 
+# save some trees in general.
+
+COMPACT_RTF            = NO
+
+# If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated 
+# will contain hyperlink fields. The RTF file will 
+# contain links (just like the HTML output) instead of page references. 
+# This makes the output suitable for online browsing using WORD or other 
+# programs which support those fields. 
+# Note: wordpad (write) and others do not support links.
+
+RTF_HYPERLINKS         = NO
+
+# Load style sheet definitions from file. Syntax is similar to doxygen's 
+# config file, i.e. a series of assignments. You only have to provide 
+# replacements, missing definitions are set to their default value.
+
+RTF_STYLESHEET_FILE    = 
+
+# Set optional variables used in the generation of an rtf document. 
+# Syntax is similar to doxygen's config file.
+
+RTF_EXTENSIONS_FILE    = 
+
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_MAN tag is set to YES (the default) Doxygen will 
+# generate man pages
+
+GENERATE_MAN           = NO
+
+# The MAN_OUTPUT tag is used to specify where the man pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `man' will be used as the default path.
+
+MAN_OUTPUT             = man
+
+# The MAN_EXTENSION tag determines the extension that is added to 
+# the generated man pages (default is the subroutine's section .3)
+
+MAN_EXTENSION          = .3
+
+# If the MAN_LINKS tag is set to YES and Doxygen generates man output, 
+# then it will generate one additional man file for each entity 
+# documented in the real man page(s). These additional files 
+# only source the real man page, but without them the man command 
+# would be unable to find the correct page. The default is NO.
+
+MAN_LINKS              = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_XML tag is set to YES Doxygen will 
+# generate an XML file that captures the structure of 
+# the code including all documentation.
+
+GENERATE_XML           = NO
+
+# The XML_OUTPUT tag is used to specify where the XML pages will be put. 
+# If a relative path is entered the value of OUTPUT_DIRECTORY will be 
+# put in front of it. If left blank `xml' will be used as the default path.
+
+XML_OUTPUT             = xml
+
+# The XML_SCHEMA tag can be used to specify an XML schema, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_SCHEMA             = 
+
+# The XML_DTD tag can be used to specify an XML DTD, 
+# which can be used by a validating XML parser to check the 
+# syntax of the XML files.
+
+XML_DTD                = 
+
+# If the XML_PROGRAMLISTING tag is set to YES Doxygen will 
+# dump the program listings (including syntax highlighting 
+# and cross-referencing information) to the XML output. Note that 
+# enabling this will significantly increase the size of the XML output.
+
+XML_PROGRAMLISTING     = YES
+
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will 
+# generate an AutoGen Definitions (see autogen.sf.net) file 
+# that captures the structure of the code including all 
+# documentation. Note that this feature is still experimental 
+# and incomplete at the moment.
+
+GENERATE_AUTOGEN_DEF   = NO
+
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+
+# If the GENERATE_PERLMOD tag is set to YES Doxygen will 
+# generate a Perl module file that captures the structure of 
+# the code including all documentation. Note that this 
+# feature is still experimental and incomplete at the 
+# moment.
+
+GENERATE_PERLMOD       = NO
+
+# If the PERLMOD_LATEX tag is set to YES Doxygen will generate 
+# the necessary Makefile rules, Perl scripts and LaTeX code to be able 
+# to generate PDF and DVI output from the Perl module output.
+
+PERLMOD_LATEX          = NO
+
+# If the PERLMOD_PRETTY tag is set to YES the Perl module output will be 
+# nicely formatted so it can be parsed by a human reader.  This is useful 
+# if you want to understand what is going on.  On the other hand, if this 
+# tag is set to NO the size of the Perl module output will be much smaller 
+# and Perl will parse it just the same.
+
+PERLMOD_PRETTY         = YES
+
+# The names of the make variables in the generated doxyrules.make file 
+# are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. 
+# This is useful so different doxyrules.make files included by the same 
+# Makefile don't overwrite each other's variables.
+
+PERLMOD_MAKEVAR_PREFIX = 
+
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+
+# If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will 
+# evaluate all C-preprocessor directives found in the sources and include 
+# files.
+
+ENABLE_PREPROCESSING   = YES
+
+# If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro 
+# names in the source code. If set to NO (the default) only conditional 
+# compilation will be performed. Macro expansion can be done in a controlled 
+# way by setting EXPAND_ONLY_PREDEF to YES.
+
+MACRO_EXPANSION        = NO
+
+# If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES 
+# then the macro expansion is limited to the macros specified with the 
+# PREDEFINED and EXPAND_AS_DEFINED tags.
+
+EXPAND_ONLY_PREDEF     = NO
+
+# If the SEARCH_INCLUDES tag is set to YES (the default) the includes files 
+# pointed to by INCLUDE_PATH will be searched when a #include is found.
+
+SEARCH_INCLUDES        = YES
+
+# The INCLUDE_PATH tag can be used to specify one or more directories that 
+# contain include files that are not input files but should be processed by 
+# the preprocessor.
+
+INCLUDE_PATH           = 
+
+# You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard 
+# patterns (like *.h and *.hpp) to filter out the header-files in the 
+# directories. If left blank, the patterns specified with FILE_PATTERNS will 
+# be used.
+
+INCLUDE_FILE_PATTERNS  = 
+
+# The PREDEFINED tag can be used to specify one or more macro names that 
+# are defined before the preprocessor is started (similar to the -D option of 
+# gcc). The argument of the tag is a list of macros of the form: name 
+# or name=definition (no spaces). If the definition and the = are 
+# omitted =1 is assumed. To prevent a macro definition from being 
+# undefined via #undef or recursively expanded use the := operator 
+# instead of the = operator.
+
+PREDEFINED             = 
+
+# If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then 
+# this tag can be used to specify a list of macro names that should be expanded. 
+# The macro definition that is found in the sources will be used. 
+# Use the PREDEFINED tag if you want to use a different macro definition that 
+# overrules the definition found in the source code.
+
+EXPAND_AS_DEFINED      = 
+
+# If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then 
+# doxygen's preprocessor will remove all references to function-like macros 
+# that are alone on a line, have an all uppercase name, and do not end with a 
+# semicolon, because these will confuse the parser if not removed.
+
+SKIP_FUNCTION_MACROS   = YES
+
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+
+# The TAGFILES option can be used to specify one or more tagfiles. For each 
+# tag file the location of the external documentation should be added. The 
+# format of a tag file without this location is as follows: 
+#   TAGFILES = file1 file2 ... 
+# Adding location for the tag files is done as follows: 
+#   TAGFILES = file1=loc1 "file2 = loc2" ... 
+# where "loc1" and "loc2" can be relative or absolute paths 
+# or URLs. Note that each tag file must have a unique name (where the name does 
+# NOT include the path). If a tag file is not located in the directory in which 
+# doxygen is run, you must also specify the path to the tagfile here.
+
+TAGFILES               = 
+
+# When a file name is specified after GENERATE_TAGFILE, doxygen will create 
+# a tag file that is based on the input files it reads.
+
+GENERATE_TAGFILE       = 
+
+# If the ALLEXTERNALS tag is set to YES all external classes will be listed 
+# in the class index. If set to NO only the inherited external classes 
+# will be listed.
+
+ALLEXTERNALS           = NO
+
+# If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed 
+# in the modules index. If set to NO, only the current project's groups will 
+# be listed.
+
+EXTERNAL_GROUPS        = YES
+
+# The PERL_PATH should be the absolute path and name of the perl script 
+# interpreter (i.e. the result of `which perl').
+
+PERL_PATH              = /usr/bin/perl
+
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+
+# If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will 
+# generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base 
+# or super classes. Setting the tag to NO turns the diagrams off. Note that 
+# this option also works with HAVE_DOT disabled, but it is recommended to 
+# install and use dot, since it yields more powerful graphs.
+
+CLASS_DIAGRAMS         = NO
+
+# You can define message sequence charts within doxygen comments using the \msc 
+# command. Doxygen will then run the mscgen tool (see 
+# http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the 
+# documentation. The MSCGEN_PATH tag allows you to specify the directory where 
+# the mscgen tool resides. If left empty the tool is assumed to be found in the 
+# default search path.
+
+MSCGEN_PATH            = 
+
+# If set to YES, the inheritance and collaboration graphs will hide 
+# inheritance and usage relations if the target is undocumented 
+# or is not a class.
+
+HIDE_UNDOC_RELATIONS   = YES
+
+# If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is 
+# available from the path. This tool is part of Graphviz, a graph visualization 
+# toolkit from AT&T and Lucent Bell Labs. The other options in this section 
+# have no effect if this option is set to NO (the default)
+
+HAVE_DOT               = YES
+
+# The DOT_NUM_THREADS specifies the number of dot invocations doxygen is 
+# allowed to run in parallel. When set to 0 (the default) doxygen will 
+# base this on the number of processors available in the system. You can set it 
+# explicitly to a value larger than 0 to get control over the balance 
+# between CPU load and processing speed.
+
+DOT_NUM_THREADS        = 0
+
+# By default doxygen will use the Helvetica font for all dot files that 
+# doxygen generates. When you want a differently looking font you can specify 
+# the font name using DOT_FONTNAME. You need to make sure dot is able to find 
+# the font, which can be done by putting it in a standard location or by setting 
+# the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the 
+# directory containing the font.
+
+DOT_FONTNAME           = Helvetica
+
+# The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. 
+# The default size is 10pt.
+
+DOT_FONTSIZE           = 10
+
+# By default doxygen will tell dot to use the Helvetica font. 
+# If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to 
+# set the path where dot can find it.
+
+DOT_FONTPATH           = 
+
+# If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect inheritance relations. Setting this tag to YES will force the 
+# CLASS_DIAGRAMS tag to NO.
+
+CLASS_GRAPH            = YES
+
+# If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for each documented class showing the direct and 
+# indirect implementation dependencies (inheritance, containment, and 
+# class references variables) of the class with other documented classes.
+
+COLLABORATION_GRAPH    = YES
+
+# If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graph for groups, showing the direct groups dependencies
+
+GROUP_GRAPHS           = YES
+
+# If the UML_LOOK tag is set to YES doxygen will generate inheritance and 
+# collaboration diagrams in a style similar to the OMG's Unified Modeling 
+# Language.
+
+UML_LOOK               = NO
+
+# If the UML_LOOK tag is enabled, the fields and methods are shown inside 
+# the class node. If there are many fields or methods and many nodes the 
+# graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS 
+# threshold limits the number of items for each type to make the size more 
+# managable. Set this to 0 for no limit. Note that the threshold may be 
+# exceeded by 50% before the limit is enforced.
+
+UML_LIMIT_NUM_FIELDS   = 10
+
+# If set to YES, the inheritance and collaboration graphs will show the 
+# relations between templates and their instances.
+
+TEMPLATE_RELATIONS     = NO
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT 
+# tags are set to YES then doxygen will generate a graph for each documented 
+# file showing the direct and indirect include dependencies of the file with 
+# other documented files.
+
+INCLUDE_GRAPH          = YES
+
+# If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and 
+# HAVE_DOT tags are set to YES then doxygen will generate a graph for each 
+# documented header file showing the documented files that directly or 
+# indirectly include this file.
+
+INCLUDED_BY_GRAPH      = YES
+
+# If the CALL_GRAPH and HAVE_DOT options are set to YES then 
+# doxygen will generate a call dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable call graphs 
+# for selected functions only using the \callgraph command.
+
+CALL_GRAPH             = YES
+
+# If the CALLER_GRAPH and HAVE_DOT tags are set to YES then 
+# doxygen will generate a caller dependency graph for every global function 
+# or class method. Note that enabling this option will significantly increase 
+# the time of a run. So in most cases it will be better to enable caller 
+# graphs for selected functions only using the \callergraph command.
+
+CALLER_GRAPH           = YES
+
+# If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen 
+# will generate a graphical hierarchy of all classes instead of a textual one.
+
+GRAPHICAL_HIERARCHY    = YES
+
+# If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES 
+# then doxygen will show the dependencies a directory has on other directories 
+# in a graphical way. The dependency relations are determined by the #include 
+# relations between the files in the directories.
+
+DIRECTORY_GRAPH        = YES
+
+# The DOT_IMAGE_FORMAT tag can be used to set the image format of the images 
+# generated by dot. Possible values are svg, png, jpg, or gif. 
+# If left blank png will be used. If you choose svg you need to set 
+# HTML_FILE_EXTENSION to xhtml in order to make the SVG files 
+# visible in IE 9+ (other browsers do not have this requirement).
+
+DOT_IMAGE_FORMAT       = png
+
+# If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to 
+# enable generation of interactive SVG images that allow zooming and panning. 
+# Note that this requires a modern browser other than Internet Explorer. 
+# Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you 
+# need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files 
+# visible. Older versions of IE do not have SVG support.
+
+INTERACTIVE_SVG        = NO
+
+# The tag DOT_PATH can be used to specify the path where the dot tool can be 
+# found. If left blank, it is assumed the dot tool can be found in the path.
+
+DOT_PATH               = /usr/local/bin/dot
+
+# The DOTFILE_DIRS tag can be used to specify one or more directories that 
+# contain dot files that are included in the documentation (see the 
+# \dotfile command).
+
+DOTFILE_DIRS           = 
+
+# The MSCFILE_DIRS tag can be used to specify one or more directories that 
+# contain msc files that are included in the documentation (see the 
+# \mscfile command).
+
+MSCFILE_DIRS           = 
+
+# The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of 
+# nodes that will be shown in the graph. If the number of nodes in a graph 
+# becomes larger than this value, doxygen will truncate the graph, which is 
+# visualized by representing a node as a red box. Note that doxygen if the 
+# number of direct children of the root node in a graph is already larger than 
+# DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note 
+# that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH.
+
+DOT_GRAPH_MAX_NODES    = 50
+
+# The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the 
+# graphs generated by dot. A depth value of 3 means that only nodes reachable 
+# from the root by following a path via at most 3 edges will be shown. Nodes 
+# that lay further from the root node will be omitted. Note that setting this 
+# option to 1 or 2 may greatly reduce the computation time needed for large 
+# code bases. Also note that the size of a graph can be further restricted by 
+# DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction.
+
+MAX_DOT_GRAPH_DEPTH    = 0
+
+# Set the DOT_TRANSPARENT tag to YES to generate images with a transparent 
+# background. This is disabled by default, because dot on Windows does not 
+# seem to support this out of the box. Warning: Depending on the platform used, 
+# enabling this option may lead to badly anti-aliased labels on the edges of 
+# a graph (i.e. they become hard to read).
+
+DOT_TRANSPARENT        = NO
+
+# Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output 
+# files in one run (i.e. multiple -o and -T options on the command line). This 
+# makes dot run faster, but since only newer versions of dot (>1.8.10) 
+# support this, this feature is disabled by default.
+
+DOT_MULTI_TARGETS      = NO
+
+# If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will 
+# generate a legend page explaining the meaning of the various boxes and 
+# arrows in the dot generated graphs.
+
+GENERATE_LEGEND        = YES
+
+# If the DOT_CLEANUP tag is set to YES (the default) Doxygen will 
+# remove the intermediate dot files that are used to generate 
+# the various graphs.
+
+DOT_CLEANUP            = YES
diff --git a/ginkgocadx/build_descriptor.sh b/ginkgocadx/build_descriptor.sh
new file mode 100644
index 0000000..0e26c1d
--- /dev/null
+++ b/ginkgocadx/build_descriptor.sh
@@ -0,0 +1,43 @@
+#!/bin/bash
+# This scripts build the extension descriptors
+SRCDIR="$1"
+DLLPATH="$2"
+INFPATH="$3"
+CORE_VERSION=$4
+CORE_SUBVERSION=$5
+
+cd "`dirname $0`"
+
+if [ -z ${DLLPATH} ] || [ -z ${INFPATH} ] || [ -z ${CORE_VERSION} ] || [ -z ${CORE_SUBVERSION} ]; then
+	echo "Uso: $0 <srcdir> <dll_path> <inf_path> <ginkgo_version> <ginkgo_release>"
+	exit 1
+fi
+if ! [ -d "${SRCDIR}" ]; then
+	echo "srcdir not found"
+	exit 1
+fi
+
+DLLFILE=`basename ${DLLPATH}`
+
+LICENSE_FILE="`find "${SRCDIR}" -maxdepth 2 -name 'license.h' | sed '1q'`"
+
+if ! [ -f "${LICENSE_FILE}" ]; then
+	echo "license file not found"
+	exit 1
+fi
+
+(echo "DLL=${DLLFILE}" > "${INFPATH}") || exit 1
+(cat "$LICENSE_FILE" | grep 'EXT_' | sed "s/[^\(EXT_\)]*EXT_\([^ \t]*\)[  \t]*/\1=/" | while read line
+do
+	KEY="${line%%=*}"
+	VAL="${line##*=}"
+	VAL=`echo $VAL | sed 's/_Std("\([^"]*\).*/\1/;s/^"\$[^:]*:[ \t]*\([^ \t\$]*\).*/\1/;s/^"\(.*\)"$/\1/'`
+	echo "$KEY=$VAL"
+done
+) | grep "^SID\|^PROVIDER\|^DESCRIPTION\|^VERSION\|^SUBVERSION\|^RELEASE\|^BUILD\|^CODENAME\|^UPDATEURL"  >> "${INFPATH}"
+echo "CORE_VERSION=${CORE_VERSION}" >> "${INFPATH}"
+echo "CORE_SUBVERSION=${CORE_SUBVERSION}" >> "${INFPATH}"
+
+exit 0
+
+
diff --git a/ginkgocadx/dcmdoc.icns b/ginkgocadx/dcmdoc.icns
new file mode 100644
index 0000000..654b56b
Binary files /dev/null and b/ginkgocadx/dcmdoc.icns differ
diff --git a/ginkgocadx/dcmdoc_vacio.icns b/ginkgocadx/dcmdoc_vacio.icns
new file mode 100644
index 0000000..ce9d127
Binary files /dev/null and b/ginkgocadx/dcmdoc_vacio.icns differ
diff --git a/ginkgocadx/dmg_template.tgz b/ginkgocadx/dmg_template.tgz
new file mode 100644
index 0000000..26285a7
Binary files /dev/null and b/ginkgocadx/dmg_template.tgz differ
diff --git a/ginkgocadx/ginkgo.ico b/ginkgocadx/ginkgo.ico
new file mode 100644
index 0000000..6dd4c3b
Binary files /dev/null and b/ginkgocadx/ginkgo.ico differ
diff --git a/ginkgocadx/ginkgo.rc b/ginkgocadx/ginkgo.rc
new file mode 100644
index 0000000..70f2b5d
--- /dev/null
+++ b/ginkgocadx/ginkgo.rc
@@ -0,0 +1,150 @@
+//Microsoft Visual C++ generated resource script.
+//
+#include "resource.h"
+
+#define APSTUDIO_READONLY_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 2 resource.
+//
+#ifndef APSTUDIO_INVOKED
+#include "targetver.h"
+#endif
+#define APSTUDIO_HIDDEN_SYMBOLS
+#include "windows.h"
+#undef APSTUDIO_HIDDEN_SYMBOLS
+/////////////////////////////////////////////////////////////////////////////
+#undef APSTUDIO_READONLY_SYMBOLS
+
+#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
+LANGUAGE 9, 1
+#pragma code_page(1252)
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Icon
+//
+
+// Icon with lowest ID value placed first to ensure application icon
+// remains consistent on all systems.
+
+IDI_GINKGO       ICON         "ginkgo.ico"
+IDI_SMALL               ICON         "ginkgo.ico"
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Menu
+//
+
+IDC_GINKGO MENU
+BEGIN
+    POPUP "&File"
+    BEGIN
+        MENUITEM "E&xit",                IDM_EXIT
+    END
+    POPUP "&Help"
+    BEGIN
+        MENUITEM "&About ...",           IDM_ABOUT
+    END
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Accelerator
+//
+
+IDC_GINKGO ACCELERATORS
+BEGIN
+    "?",            IDM_ABOUT,              ASCII,  ALT
+    "/",            IDM_ABOUT,              ASCII,  ALT
+END
+
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// Dialog
+//
+
+IDD_ABOUTBOX DIALOGEX 0, 0, 170, 62
+STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU
+CAPTION "About ginkgo"
+FONT 8, "MS Shell Dlg"
+BEGIN
+    ICON            IDR_MAINFRAME,IDC_STATIC,14,14,21,20
+    LTEXT           "ginkgo, Version 3.0",IDC_STATIC,42,14,114,8,SS_NOPREFIX
+    LTEXT           "Copyright (C) 2008",IDC_STATIC,42,26,114,8
+    DEFPUSHBUTTON   "OK",IDOK,113,41,50,14,WS_GROUP
+END
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// DESIGNINFO
+//
+
+#ifdef APSTUDIO_INVOKED
+GUIDELINES DESIGNINFO
+BEGIN
+    IDD_ABOUTBOX, DIALOG
+    BEGIN
+        LEFTMARGIN, 7
+        RIGHTMARGIN, 163
+        TOPMARGIN, 7
+        BOTTOMMARGIN, 55
+    END
+END
+#endif    // APSTUDIO_INVOKED
+
+#ifdef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// TEXTINCLUDE
+//
+1 TEXTINCLUDE
+BEGIN
+    "resource.h\0"
+END
+
+2 TEXTINCLUDE
+BEGIN
+	"#ifndef APSTUDIO_INVOKED\r\n"
+    "#include ""targetver.h""\r\n"
+    "#endif\r\n"
+    "#define APSTUDIO_HIDDEN_SYMBOLS\r\n"
+    "#include ""windows.h""\r\n"
+    "#undef APSTUDIO_HIDDEN_SYMBOLS\r\n"
+    "\0"
+END
+
+3 TEXTINCLUDE
+BEGIN
+    "\r\n"
+    "\0"
+END
+
+#endif    // APSTUDIO_INVOKED
+
+/////////////////////////////////////////////////////////////////////////////
+//
+// String Table
+//
+
+STRINGTABLE
+BEGIN
+   IDC_GINKGO   "GINKGO"
+   IDS_APP_TITLE       "ginkgo"
+END
+
+#endif
+/////////////////////////////////////////////////////////////////////////////
+
+
+
+#ifndef APSTUDIO_INVOKED
+/////////////////////////////////////////////////////////////////////////////
+//
+// Generated from the TEXTINCLUDE 3 resource.
+//
+
+/////////////////////////////////////////////////////////////////////////////
+#endif    // not APSTUDIO_INVOKED
diff --git a/ginkgocadx/ginkgocadx.1 b/ginkgocadx/ginkgocadx.1
new file mode 100644
index 0000000..f1d7fb8
--- /dev/null
+++ b/ginkgocadx/ginkgocadx.1
@@ -0,0 +1,51 @@
+.\" ========================================================
+.\" license: GPL v2 or later
+.\" ========================================================
+
+.TH Ginkgo\ CADx 1 "2011 June 22nd" "Manual for Ginkgo CADx"
+
+.SH NAME
+ginkgocadx \- a medical image (DICOM) viewer
+
+.SH SYNOPSIS
+.B ginkgocadx
+[
+.RB --version
+|
+.RB -version
+|
+.RB -v
+]
+[
+.I <DICOM file>
+|
+.I <XML integration file>
+]
+
+
+.SH DESCRIPTION
+.B Ginkgo CADx
+is a solution for working with medical images in the DICOM
+format.
+
+.SH OPTIONS
+.PP
+.TP
+.B \--version, \--version, -v
+Show version information about Ginkgo CADx.
+.TP
+.B <DICOM file>
+A DICOM file to load on startup.
+.TP
+.B <XML integration file>
+An XML integration file to load on startup.
+
+
+.SH SEE ALSO
+.PP
+.TP
+.B http://ginkgo-cadx.com
+Homepage
+.TP
+.B /usr/share/doc/ginkgocadx/
+Local documentation
diff --git a/ginkgocadx/ginkgocadx.desktop b/ginkgocadx/ginkgocadx.desktop
new file mode 100644
index 0000000..63f3c36
--- /dev/null
+++ b/ginkgocadx/ginkgocadx.desktop
@@ -0,0 +1,15 @@
+#====================================================
+# license: LGPL v3
+#====================================================
+
+[Desktop Entry]
+Type=Application
+Name=Ginkgo CADx
+GenericName=DICOM Viewer
+Comment=Medical Image (DICOM) Viewer
+Icon=ginkgocadx
+TryExec=ginkgocadx
+Exec=/usr/bin/ginkgocadx %F
+Terminal=false
+Categories=Graphics;MedicalSoftware;Science;
+MimeType=application/dicom;
diff --git a/ginkgocadx/ginkgocadx.icns b/ginkgocadx/ginkgocadx.icns
new file mode 100644
index 0000000..f9aebdb
Binary files /dev/null and b/ginkgocadx/ginkgocadx.icns differ
diff --git a/ginkgocadx/ginkgocadx.properties b/ginkgocadx/ginkgocadx.properties
new file mode 100644
index 0000000..014d21f
--- /dev/null
+++ b/ginkgocadx/ginkgocadx.properties
@@ -0,0 +1,16 @@
+
+log4cplus.rootLogger=ERROR, FICHERO, STDOUT
+log4cplus.logger.default=DEBUG
+log4cplus.logger.ControladorHistorial=DEBUG
+log4cplus.logger.ControladorEnvioHl7=INFO
+
+
+log4cplus.appender.FICHERO=log4cplus::RollingFileAppender
+log4cplus.appender.FICHERO.File= Ginkgo.log
+log4cplus.appender.FICHERO.MaxFileSize=1024KB
+log4cplus.appender.FICHERO.MaxBackupIndex=5
+log4cplus.appender.FICHERO.layout=log4cplus::TTCCLayout
+
+
+log4cplus.appender.STDOUT=log4cplus::ConsoleAppender
+log4cplus.appender.STDOUT.layout=log4cplus::TTCCLayout
diff --git a/ginkgocadx/ginkgocadx.vcxproj b/ginkgocadx/ginkgocadx.vcxproj
new file mode 100644
index 0000000..09ba9ee
--- /dev/null
+++ b/ginkgocadx/ginkgocadx.vcxproj
@@ -0,0 +1,233 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="DebugMonoliticOS|Win32">
+      <Configuration>DebugMonoliticOS</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="DebugMonoliticOS|x64">
+      <Configuration>DebugMonoliticOS</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseMonoliticOpenSource|Win32">
+      <Configuration>ReleaseMonoliticOpenSource</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseMonoliticOpenSource|x64">
+      <Configuration>ReleaseMonoliticOpenSource</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}</ProjectGuid>
+    <RootNamespace>ginkgocadx</RootNamespace>
+    <Keyword>Win32Proj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <PlatformToolset>v90</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <PlatformToolset>v90</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">
+    <OutDir>$(Configuration)\</OutDir>
+    <IntDir>$(Configuration)\</IntDir>
+    <IgnoreImportLibrary>true</IgnoreImportLibrary>
+    <LinkIncremental>true</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">
+    <IgnoreImportLibrary>true</IgnoreImportLibrary>
+    <LinkIncremental>true</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(Configuration)\</IntDir>
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore;..\..\lib\Windows-x86\WX-3.0.1\mswud;..\..\lib\Windows-x86\WX-3.0.1\include;..\..\lib\Windows-x86\DCMTK-3.6.0\include;..\..\lib\Windows-x86\VTK-5.10.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK-3.20.0\include\gdcm\src;..\..\lib\Windows-x86\ITK-3.20.0\include [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;USING_MODULES;USING_EXTENSIONS;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;UNICODE;USE_PATCHED_LIBS;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <MinimalRebuild>true</MinimalRebuild>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <ProjectReference>
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>
+    </ProjectReference>
+    <Link>
+      <AdditionalDependencies>wxbase30ud_net.lib;wxmsw30ud_aui.lib;wxmsw30ud_media.lib;wxmsw30ud_qa.lib;wxmsw30ud_richtext.lib;wxmsw30ud_xrc.lib;wxmsw30ud_adv.lib;wxmsw30ud_html.lib;wxbase30ud_xml.lib;wxmsw30ud_core.lib;wxmsw30ud_propgrid.lib;wxbase30ud.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;vtkCommon.lib;vtkRendering.lib;vtkexpat.lib;vtkFiltering.lib;vtkfreetype.lib;vtkftgl.lib;vtkGenericFiltering.lib;vtkGraphics.lib;vtkHybrid.lib;vtkImaging.lib;vt [...]
+      <AdditionalLibraryDirectories>..\..\lib\Windows-x86\cairo\lib\debug;..\..\lib\Windows-x86\WX-3.0.1\lib\debug;..\..\lib\Windows-x86\VTK-5.10.0\lib\debug;..\..\lib\Windows-x86\ITK-3.20.0\lib\Debug;..\..\lib\Windows-x86\openssl-1.0.0d\lib\debug;..\..\lib\Windows-x86\DCMTK-3.6.0\lib\debug;..\..\lib\Windows-x86\libcurl\lib\debug;DebugMonoliticOS;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AssemblyDebug>true</AssemblyDebug>
+      <SubSystem>Windows</SubSystem>
+      <TargetMachine>MachineX86</TargetMachine>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore;..\..\lib\Windows-x86\WX-2.8.11\include;..\..\lib\Windows-x86\WX-2.8.11\mswud;..\..\lib\Windows-x86\DCMTK-3.6.0\include;..\..\lib\Windows-x86\VTK-5.10.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK-3.20.0\include\gdcm\src;..\..\lib\Windows-x86\ITK-3.20.0\inclu [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;USING_MODULES;USING_EXTENSIONS;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;UNICODE;USE_PATCHED_LIBS;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+    </ClCompile>
+    <ProjectReference>
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>
+    </ProjectReference>
+    <Link>
+      <AdditionalDependencies>wxbase28ud_net.lib;wxmsw28ud_aui.lib;wxmsw28ud_media.lib;wxmsw28ud_qa.lib;wxmsw28ud_richtext.lib;wxmsw28ud_xrc.lib;wxmsw28ud_adv.lib;wxmsw28ud_html.lib;wxbase28ud_xml.lib;wxmsw28ud_core.lib;wxbase28ud.lib;wxmsw28ud_gl.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;vtkCommon.lib;vtkRendering.lib;vtkexpat.lib;vtkFiltering.lib;vtkfreetype.lib;vtkftgl.lib;vtkGenericFiltering.lib;vtkGraphics.lib;vtkHybrid.lib;vtkImaging.lib;vtkIO.li [...]
+      <AdditionalLibraryDirectories>..\..\lib\Windows-x86\cairowin32\cairowin32\Debug;..\..\lib\Windows-x86\WX-2.8.11\lib;..\..\lib\Windows-x86\VTK-5.10.0\lib\debug;..\..\lib\Windows-x86\ITK-3.20.0\lib\debug;..\..\lib\Windows-x86\openssl-1.0.0d\lib\debug;..\..\lib\Windows-x86\DCMTK-3.6.0\lib\debug;DebugMonoliticOpenSource;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AssemblyDebug>true</AssemblyDebug>
+      <SubSystem>Windows</SubSystem>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\..\lib\Windows-x86\WX-3.0.1\mswu;..\..\lib\Windows-x86\WX-3.0.1\include;..\..\lib\Windows-x86\DCMTK-3.6.0\include;..\..\lib\Windows-x86\VTK-5.10.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK-3.20.0\include\gdcm\src;..\..\lib\Windows-x86\ITK-3.20.0\include\IO;..\..\lib [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;USING_MODULES;USING_EXTENSIONS;_CFE_;CAIRO_WIN32_STATIC_BUILD;USE_PATCHED_LIBS;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+      <PrecompiledHeader />
+      <BrowseInformation />
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat />
+    </ClCompile>
+    <ProjectReference>
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>
+    </ProjectReference>
+    <Link>
+      <AdditionalDependencies>wxbase30u.lib;wxbase30u_net.lib;wxmsw30u_aui.lib;wxmsw30u_media.lib;wxmsw30u_qa.lib;wxmsw30u_richtext.lib;wxmsw30u_xrc.lib;wxmsw30u_adv.lib;wxmsw30u_html.lib;wxbase30u_xml.lib;wxmsw30u_core.lib;wxmsw30u_propgrid.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;vtkCommon.lib;vtkRendering.lib;vtkDICOMParser.lib;vtkexoIIc.lib;vtkexpat.lib;vtkFiltering.lib;vtkfreetype.lib;vtkftgl.lib;vtkGenericFiltering.lib;vtkGraphics.lib;vtkHybrid.lib;vt [...]
+      <Version>3.0.0</Version>
+      <AdditionalLibraryDirectories>..\..\lib\Windows-x86\cairo\lib\Release;..\..\lib\Windows-x86\WX-3.0.1\lib\release;..\..\lib\Windows-x86\VTK-5.10.0\lib\release;..\..\lib\Windows-x86\ITK-3.20.0\lib\release;..\..\lib\Windows-x86\openssl-1.0.0d\lib\release;..\..\lib\Windows-x86\DCMTK-3.6.0\lib\release;..\..\lib\Windows-x86\libcurl\lib\release;ReleaseMonoliticOpenSource;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences />
+      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\..\lib\Windows-x86\WX-2.8.11\include;..\..\lib\Windows-x86\WX-2.8.11\mswu;..\..\lib\Windows-x86\DCMTK-3.6.0\include;..\..\lib\Windows-x86\VTK-5.10.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK-3.20.0\include\gdcm\src;..\..\lib\Windows-x86\ITK-3.20.0\include\IO;..\..\l [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;USING_MODULES;USING_EXTENSIONS;_CFE_;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;USE_PATCHED_LIBS;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+    </ClCompile>
+    <ProjectReference>
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>
+    </ProjectReference>
+    <Link>
+      <AdditionalDependencies>wxbase28u_net.lib;wxmsw28u_aui.lib;wxmsw28u_media.lib;wxmsw28u_qa.lib;wxmsw28u_richtext.lib;wxmsw28u_xrc.lib;wxmsw28u_adv.lib;wxmsw28u_html.lib;wxbase28u_xml.lib;wxmsw28u_core.lib;wxbase28u.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;vtkCommon.lib;vtkRendering.lib;vtkDICOMParser.lib;vtkexoIIc.lib;vtkexpat.lib;vtkFiltering.lib;vtkfreetype.lib;vtkftgl.lib;vtkGenericFiltering.lib;vtkGraphics.lib;vtkHybrid.lib;vtkImaging.lib;vtkInfovi [...]
+      <Version>3.0.0</Version>
+      <AdditionalLibraryDirectories>..\..\lib\Windows-x86\cairowin32\cairowin32\Release;..\..\lib\Windows-x86\WX-2.8.11\lib;..\..\lib\Windows-x86\VTK-5.10.0\lib\release;..\..\lib\Windows-x86\ITK-3.20.0\lib\release;..\..\lib\Windows-x86\openssl-1.0.0d\lib\release;..\..\lib\Windows-x86\DCMTK-3.6.0\lib\release;ReleaseMonoliticOpenSource;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>
+      </OptimizeReferences>
+      <LinkTimeCodeGeneration>UseLinkTimeCodeGeneration</LinkTimeCodeGeneration>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="main.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="resource.h" />
+    <ClInclude Include="targetver.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <Image Include="ginkgo.ico" />
+    <Image Include="small.ico" />
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="ginkgo.rc" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\cadxcore\cadxcore.vcxproj">
+      <Project>{51617602-e33c-4a52-941e-3e3302de4447}</Project>
+    </ProjectReference>
+    <ProjectReference Include="..\visualizator\visualizator.vcxproj">
+      <Project>{489a2bbd-64a0-4e2f-b700-b18b71680593}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/ginkgocadx/ginkgocadx.vcxproj.filters b/ginkgocadx/ginkgocadx.vcxproj.filters
new file mode 100644
index 0000000..68c7060
--- /dev/null
+++ b/ginkgocadx/ginkgocadx.vcxproj.filters
@@ -0,0 +1,39 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Archivos de código fuente">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="main.cpp">
+      <Filter>Archivos de código fuente</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="resource.h">
+      <Filter>Archivos de código fuente</Filter>
+    </ClInclude>
+    <ClInclude Include="targetver.h">
+      <Filter>Archivos de código fuente</Filter>
+    </ClInclude>
+  </ItemGroup>
+  <ItemGroup>
+    <Image Include="ginkgo.ico">
+      <Filter>Resource Files</Filter>
+    </Image>
+    <Image Include="small.ico">
+      <Filter>Resource Files</Filter>
+    </Image>
+  </ItemGroup>
+  <ItemGroup>
+    <ResourceCompile Include="ginkgo.rc">
+      <Filter>Resource Files</Filter>
+    </ResourceCompile>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/ginkgocadx/ginkgocadx_vs2012.sln b/ginkgocadx/ginkgocadx_vs2012.sln
new file mode 100644
index 0000000..ccd97ae
--- /dev/null
+++ b/ginkgocadx/ginkgocadx_vs2012.sln
@@ -0,0 +1,180 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio Express 2012 for Windows Desktop
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cadxcore", "..\cadxcore\cadxcore.vcxproj", "{51617602-E33C-4A52-941E-3E3302DE4447}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "visualizator", "..\visualizator\visualizator.vcxproj", "{489A2BBD-64A0-4E2F-B700-B18B71680593}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "ginkgocadx", "ginkgocadx.vcxproj", "{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}"
+	ProjectSection(ProjectDependencies) = postProject
+		{51617602-E33C-4A52-941E-3E3302DE4447} = {51617602-E33C-4A52-941E-3E3302DE4447}
+		{489A2BBD-64A0-4E2F-B700-B18B71680593} = {489A2BBD-64A0-4E2F-B700-B18B71680593}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "install_open_source", "..\install_open_source\install_open_source.vcxproj", "{0F92665B-E708-4924-AC41-469893222737}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		DebugDynamicPro|Mixed Platforms = DebugDynamicPro|Mixed Platforms
+		DebugDynamicPro|Win32 = DebugDynamicPro|Win32
+		DebugDynamicPro|x64 = DebugDynamicPro|x64
+		DebugMonoliticOS|Mixed Platforms = DebugMonoliticOS|Mixed Platforms
+		DebugMonoliticOS|Win32 = DebugMonoliticOS|Win32
+		DebugMonoliticOS|x64 = DebugMonoliticOS|x64
+		DebugMonoliticPro|Mixed Platforms = DebugMonoliticPro|Mixed Platforms
+		DebugMonoliticPro|Win32 = DebugMonoliticPro|Win32
+		DebugMonoliticPro|x64 = DebugMonoliticPro|x64
+		ReleaseDynamicPro|Mixed Platforms = ReleaseDynamicPro|Mixed Platforms
+		ReleaseDynamicPro|Win32 = ReleaseDynamicPro|Win32
+		ReleaseDynamicPro|x64 = ReleaseDynamicPro|x64
+		ReleaseMonoliticOpenSource|Mixed Platforms = ReleaseMonoliticOpenSource|Mixed Platforms
+		ReleaseMonoliticOpenSource|Win32 = ReleaseMonoliticOpenSource|Win32
+		ReleaseMonoliticOpenSource|x64 = ReleaseMonoliticOpenSource|x64
+		ReleaseMonoliticPro|Mixed Platforms = ReleaseMonoliticPro|Mixed Platforms
+		ReleaseMonoliticPro|Win32 = ReleaseMonoliticPro|Win32
+		ReleaseMonoliticPro|x64 = ReleaseMonoliticPro|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugDynamicPro|Mixed Platforms.ActiveCfg = DebugDynamicPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugDynamicPro|Mixed Platforms.Build.0 = DebugDynamicPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugDynamicPro|Win32.ActiveCfg = DebugDynamicPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugDynamicPro|Win32.Build.0 = DebugDynamicPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugDynamicPro|x64.ActiveCfg = DebugDynamicPro|x64
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugDynamicPro|x64.Build.0 = DebugDynamicPro|x64
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticOS|Mixed Platforms.ActiveCfg = DebugMonoliticOS|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticOS|Mixed Platforms.Build.0 = DebugMonoliticOS|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticOS|Win32.ActiveCfg = DebugMonoliticOS|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticOS|Win32.Build.0 = DebugMonoliticOS|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticOS|x64.ActiveCfg = DebugMonoliticOS|x64
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticOS|x64.Build.0 = DebugMonoliticOS|x64
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticPro|Mixed Platforms.ActiveCfg = DebugMonoliticPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticPro|Mixed Platforms.Build.0 = DebugMonoliticPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticPro|Win32.ActiveCfg = DebugMonoliticPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticPro|Win32.Build.0 = DebugMonoliticPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticPro|x64.ActiveCfg = DebugMonoliticPro|x64
+		{51617602-E33C-4A52-941E-3E3302DE4447}.DebugMonoliticPro|x64.Build.0 = DebugMonoliticPro|x64
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseDynamicPro|Mixed Platforms.ActiveCfg = ReleaseDynamicPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseDynamicPro|Mixed Platforms.Build.0 = ReleaseDynamicPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseDynamicPro|Win32.ActiveCfg = ReleaseDynamicPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseDynamicPro|Win32.Build.0 = ReleaseDynamicPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseDynamicPro|x64.ActiveCfg = ReleaseDynamicPro|x64
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseDynamicPro|x64.Build.0 = ReleaseDynamicPro|x64
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticOpenSource|Mixed Platforms.ActiveCfg = ReleaseMonoliticOpenSource|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticOpenSource|Mixed Platforms.Build.0 = ReleaseMonoliticOpenSource|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticOpenSource|Win32.ActiveCfg = ReleaseMonoliticOpenSource|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticOpenSource|Win32.Build.0 = ReleaseMonoliticOpenSource|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticOpenSource|x64.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticOpenSource|x64.Build.0 = ReleaseMonoliticOpenSource|x64
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticPro|Mixed Platforms.ActiveCfg = ReleaseMonoliticPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticPro|Mixed Platforms.Build.0 = ReleaseMonoliticPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticPro|Win32.ActiveCfg = ReleaseMonoliticPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticPro|Win32.Build.0 = ReleaseMonoliticPro|Win32
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticPro|x64.ActiveCfg = ReleaseMonoliticPro|x64
+		{51617602-E33C-4A52-941E-3E3302DE4447}.ReleaseMonoliticPro|x64.Build.0 = ReleaseMonoliticPro|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugDynamicPro|Mixed Platforms.ActiveCfg = DebugDynamicPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugDynamicPro|Mixed Platforms.Build.0 = DebugDynamicPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugDynamicPro|Win32.ActiveCfg = DebugDynamicPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugDynamicPro|Win32.Build.0 = DebugDynamicPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugDynamicPro|x64.ActiveCfg = DebugDynamicPro|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugDynamicPro|x64.Build.0 = DebugDynamicPro|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticOS|Mixed Platforms.ActiveCfg = DebugMonoliticOS|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticOS|Mixed Platforms.Build.0 = DebugMonoliticOS|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticOS|Win32.ActiveCfg = DebugMonoliticOS|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticOS|Win32.Build.0 = DebugMonoliticOS|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticOS|x64.ActiveCfg = DebugMonoliticOS|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticOS|x64.Build.0 = DebugMonoliticOS|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticPro|Mixed Platforms.ActiveCfg = DebugMonoliticPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticPro|Mixed Platforms.Build.0 = DebugMonoliticPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticPro|Win32.ActiveCfg = DebugMonoliticPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticPro|Win32.Build.0 = DebugMonoliticPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticPro|x64.ActiveCfg = DebugMonoliticPro|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.DebugMonoliticPro|x64.Build.0 = DebugMonoliticPro|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseDynamicPro|Mixed Platforms.ActiveCfg = ReleaseDynamicPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseDynamicPro|Mixed Platforms.Build.0 = ReleaseDynamicPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseDynamicPro|Win32.ActiveCfg = ReleaseDynamicPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseDynamicPro|Win32.Build.0 = ReleaseDynamicPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseDynamicPro|x64.ActiveCfg = ReleaseDynamicPro|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseDynamicPro|x64.Build.0 = ReleaseDynamicPro|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticOpenSource|Mixed Platforms.ActiveCfg = ReleaseMonoliticOpenSource|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticOpenSource|Mixed Platforms.Build.0 = ReleaseMonoliticOpenSource|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticOpenSource|Win32.ActiveCfg = ReleaseMonoliticOpenSource|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticOpenSource|Win32.Build.0 = ReleaseMonoliticOpenSource|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticOpenSource|x64.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticOpenSource|x64.Build.0 = ReleaseMonoliticOpenSource|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticPro|Mixed Platforms.ActiveCfg = ReleaseMonoliticPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticPro|Mixed Platforms.Build.0 = ReleaseMonoliticPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticPro|Win32.ActiveCfg = ReleaseMonoliticPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticPro|Win32.Build.0 = ReleaseMonoliticPro|Win32
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticPro|x64.ActiveCfg = ReleaseMonoliticPro|x64
+		{489A2BBD-64A0-4E2F-B700-B18B71680593}.ReleaseMonoliticPro|x64.Build.0 = ReleaseMonoliticPro|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugDynamicPro|Mixed Platforms.ActiveCfg = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugDynamicPro|Mixed Platforms.Build.0 = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugDynamicPro|Win32.ActiveCfg = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugDynamicPro|Win32.Build.0 = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugDynamicPro|x64.ActiveCfg = DebugMonoliticOS|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugDynamicPro|x64.Build.0 = DebugMonoliticOS|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticOS|Mixed Platforms.ActiveCfg = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticOS|Mixed Platforms.Build.0 = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticOS|Win32.ActiveCfg = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticOS|Win32.Build.0 = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticOS|x64.ActiveCfg = DebugMonoliticOS|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticOS|x64.Build.0 = DebugMonoliticOS|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticPro|Mixed Platforms.ActiveCfg = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticPro|Mixed Platforms.Build.0 = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticPro|Win32.ActiveCfg = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticPro|Win32.Build.0 = DebugMonoliticOS|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticPro|x64.ActiveCfg = DebugMonoliticOS|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.DebugMonoliticPro|x64.Build.0 = DebugMonoliticOS|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseDynamicPro|Mixed Platforms.ActiveCfg = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseDynamicPro|Mixed Platforms.Build.0 = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseDynamicPro|Win32.ActiveCfg = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseDynamicPro|Win32.Build.0 = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseDynamicPro|x64.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseDynamicPro|x64.Build.0 = ReleaseMonoliticOpenSource|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticOpenSource|Mixed Platforms.ActiveCfg = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticOpenSource|Mixed Platforms.Build.0 = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticOpenSource|Win32.ActiveCfg = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticOpenSource|Win32.Build.0 = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticOpenSource|x64.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticOpenSource|x64.Build.0 = ReleaseMonoliticOpenSource|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticPro|Mixed Platforms.ActiveCfg = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticPro|Mixed Platforms.Build.0 = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticPro|Win32.ActiveCfg = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticPro|Win32.Build.0 = ReleaseMonoliticOpenSource|Win32
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticPro|x64.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{5E2F34C0-AC7F-45F9-B3F3-7027FA2BC469}.ReleaseMonoliticPro|x64.Build.0 = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugDynamicPro|Mixed Platforms.ActiveCfg = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugDynamicPro|Mixed Platforms.Build.0 = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugDynamicPro|Win32.ActiveCfg = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugDynamicPro|x64.ActiveCfg = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugDynamicPro|x64.Build.0 = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugMonoliticOS|Mixed Platforms.ActiveCfg = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugMonoliticOS|Mixed Platforms.Build.0 = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugMonoliticOS|Win32.ActiveCfg = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugMonoliticOS|x64.ActiveCfg = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugMonoliticPro|Mixed Platforms.ActiveCfg = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugMonoliticPro|Mixed Platforms.Build.0 = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugMonoliticPro|Win32.ActiveCfg = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugMonoliticPro|x64.ActiveCfg = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.DebugMonoliticPro|x64.Build.0 = DebugMonoliticOS|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseDynamicPro|Mixed Platforms.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseDynamicPro|Mixed Platforms.Build.0 = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseDynamicPro|Win32.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseDynamicPro|x64.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseDynamicPro|x64.Build.0 = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseMonoliticOpenSource|Mixed Platforms.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseMonoliticOpenSource|Mixed Platforms.Build.0 = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseMonoliticOpenSource|Win32.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseMonoliticOpenSource|Win32.Build.0 = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseMonoliticOpenSource|x64.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseMonoliticOpenSource|x64.Build.0 = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseMonoliticPro|Mixed Platforms.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseMonoliticPro|Mixed Platforms.Build.0 = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseMonoliticPro|Win32.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseMonoliticPro|x64.ActiveCfg = ReleaseMonoliticOpenSource|x64
+		{0F92665B-E708-4924-AC41-469893222737}.ReleaseMonoliticPro|x64.Build.0 = ReleaseMonoliticOpenSource|x64
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
diff --git a/ginkgocadx/logo.png b/ginkgocadx/logo.png
new file mode 100644
index 0000000..922769a
Binary files /dev/null and b/ginkgocadx/logo.png differ
diff --git a/ginkgocadx/main.cpp b/ginkgocadx/main.cpp
new file mode 100644
index 0000000..6491ca1
--- /dev/null
+++ b/ginkgocadx/main.cpp
@@ -0,0 +1,43 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/init.h>
+
+#if defined(_WIN32)
+#include <windows.h>
+
+
+
+struct Registry {
+        Registry();
+};
+
+
+int WINAPI WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{
+        return Init(hInstance, hPrevInstance, lpCmdLine, nCmdShow);
+}
+#else
+int main(int argc, char** argv)
+{
+
+        return Init(argc, argv);
+}
+#endif
diff --git a/ginkgocadx/resource.h b/ginkgocadx/resource.h
new file mode 100644
index 0000000..d037446
--- /dev/null
+++ b/ginkgocadx/resource.h
@@ -0,0 +1,31 @@
+//{{NO_DEPENDENCIES}}
+// Microsoft Visual C++ generated include file.
+// Used by ginkgo.rc
+//
+
+#define IDS_APP_TITLE			103
+
+#define IDR_MAINFRAME			128
+#define IDD_GINKGO_DIALOG	102
+#define IDD_ABOUTBOX			103
+#define IDM_ABOUT				104
+#define IDM_EXIT				105
+#define IDI_GINKGO			107
+#define IDI_SMALL				108
+#define IDC_GINKGO			109
+#define IDC_MYICON				2
+#ifndef IDC_STATIC
+#define IDC_STATIC				-1
+#endif
+// Next default values for new objects
+//
+#ifdef APSTUDIO_INVOKED
+#ifndef APSTUDIO_READONLY_SYMBOLS
+
+#define _APS_NO_MFC					130
+#define _APS_NEXT_RESOURCE_VALUE	129
+#define _APS_NEXT_COMMAND_VALUE		32771
+#define _APS_NEXT_CONTROL_VALUE		1000
+#define _APS_NEXT_SYMED_VALUE		110
+#endif
+#endif
diff --git a/ginkgocadx/targetver.h b/ginkgocadx/targetver.h
new file mode 100644
index 0000000..28ff06c
--- /dev/null
+++ b/ginkgocadx/targetver.h
@@ -0,0 +1,24 @@
+#pragma once
+
+// The following macros define the minimum required platform.  The minimum required platform
+// is the earliest version of Windows, Internet Explorer etc. that has the necessary features to run
+// your application.  The macros work by enabling all features available on platform versions up to and
+// including the version specified.
+
+// Modify the following defines if you have to target a platform prior to the ones specified below.
+// Refer to MSDN for the latest info on corresponding values for different platforms.
+#ifndef WINVER                          // Specifies that the minimum required platform is Windows Vista.
+#define WINVER 0x0600           // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#ifndef _WIN32_WINNT            // Specifies that the minimum required platform is Windows Vista.
+#define _WIN32_WINNT 0x0600     // Change this to the appropriate value to target other versions of Windows.
+#endif
+
+#ifndef _WIN32_WINDOWS          // Specifies that the minimum required platform is Windows 98.
+#define _WIN32_WINDOWS 0x0410 // Change this to the appropriate value to target Windows Me or later.
+#endif
+
+#ifndef _WIN32_IE                       // Specifies that the minimum required platform is Internet Explorer 7.0.
+#define _WIN32_IE 0x0700        // Change this to the appropriate value to target other versions of IE.
+#endif
diff --git a/install_open_source/Clean.bat b/install_open_source/Clean.bat
new file mode 100644
index 0000000..ea1d6bc
--- /dev/null
+++ b/install_open_source/Clean.bat
@@ -0,0 +1,6 @@
+
+rmdir /S /Q %RELEASE_DIR%
+mkdir %RELEASE_DIR%
+
+
+
diff --git a/install_open_source/CleanDebugMonoliticOpenSource.bat b/install_open_source/CleanDebugMonoliticOpenSource.bat
new file mode 100644
index 0000000..427e9be
--- /dev/null
+++ b/install_open_source/CleanDebugMonoliticOpenSource.bat
@@ -0,0 +1,6 @@
+ at echo off
+set RELEASE_DIR=..\ginkgocadx\DebugMonoliticOpenSource
+
+call Clean.bat
+
+call InstallDebugMonoliticOpenSource.bat
\ No newline at end of file
diff --git a/install_open_source/CleanReleaseMonoliticOpenSource.bat b/install_open_source/CleanReleaseMonoliticOpenSource.bat
new file mode 100644
index 0000000..0baecdd
--- /dev/null
+++ b/install_open_source/CleanReleaseMonoliticOpenSource.bat
@@ -0,0 +1,3 @@
+set RELEASE_DIR=..\ginkgocadx\ReleaseMonoliticOpenSource
+
+call Clean.bat
\ No newline at end of file
diff --git a/install_open_source/GINKGO_CADX_LICENSE.txt b/install_open_source/GINKGO_CADX_LICENSE.txt
new file mode 100644
index 0000000..8f6140a
--- /dev/null
+++ b/install_open_source/GINKGO_CADX_LICENSE.txt
@@ -0,0 +1,22 @@
+This is a open source Ginkgo CADx Framework build. MetaEmotion S.L does not provide support so eximes from all responsabilities derived from its usage.
+ 
+WARANTY DISCLAIMER
+------------------
+ 
+The software, procedures, information and data made available by MetaEmotion S.L. under current conditions are provided "AS IS", without warranties of any kind except for contracted services, in which cases the specific contract conditions will be applied.
+	
+MetaEmotion S.L. expressly disclaims any representations and warranties, including without limitation, the implied warranties of merchantability and fitness for a particular purpose.	
+	
+MetaEmotion S.L. shall have no liability for:
+	
+* Any loss or injury caused, in whole or in part, by its actions, omissions, or negligence, or for contingencies beyond its control, in procuring, compiling, or delivering the Information or
+   
+* Any errors, omissions, or inaccuracies in the Information regardless of how caused, or delays or interruptions in delivery of the Information; or
+    
+* Any decision made or action taken or not taken in reliance upon the Information furnished hereunder.
+	
+Under no circumstances shall the authors be liable for direct, indirect, special, incidental, consequential damages or misdiagnosis resulting from the use, misuse, or inability to use the software, even if the authors have been advised of the possibility of such damages.
+		
+The user assumes the entire risk of using this program as well as conditions above.
+	
+Ginkgo CADx is licensed under the LGPL v3 license. You can find the legal terms of the license at http://www.gnu.org/copyleft/lgpl.html or in LGPL3.txt file provided with this software
diff --git a/install_open_source/InstallDebugMonoliticOpenSource.bat b/install_open_source/InstallDebugMonoliticOpenSource.bat
new file mode 100644
index 0000000..9945d75
--- /dev/null
+++ b/install_open_source/InstallDebugMonoliticOpenSource.bat
@@ -0,0 +1,74 @@
+ at echo off
+set LANGUAGE_DIR=..\ginkgocadx\DebugMonoliticOS\lang
+set RESOURCES_DIR=..\ginkgocadx\DebugMonoliticOS\resources
+set CADXCORE_RESOURCES_DIR=%RESOURCES_DIR%\cadxcore
+set VISUALIZATOR_RESOURCES_DIR=%RESOURCES_DIR%\visualizator
+set CADXPRO_RESOURCES_DIR=%RESOURCES_DIR%\cadxpro
+set DLL_DIR=..\ginkgocadx\DebugMonoliticOS
+
+mkdir %RESOURCES_DIR% 2>NUL
+mkdir %CADXCORE_RESOURCES_DIR% 2>NUL
+mkdir %VISUALIZATOR_RESOURCES_DIR% 2>NUL
+xcopy /y /s ..\cadxcore\resources\files\*.* %CADXCORE_RESOURCES_DIR%
+xcopy /y /s ..\visualizator\resources\files\*.* %VISUALIZATOR_RESOURCES_DIR%
+
+mkdir %LANGUAGE_DIR% 2>NUL
+
+mkdir %LANGUAGE_DIR%\de 2>NUL
+copy ..\visualizator\lang\de\visualizator.mo %LANGUAGE_DIR%\de
+copy ..\cadxcore\lang\de\cadxcore.mo %LANGUAGE_DIR%\de
+copy ..\cadxcore\lang\de\wxstd.mo %LANGUAGE_DIR%\de
+
+mkdir %LANGUAGE_DIR%\el 2>NUL
+copy ..\visualizator\lang\el\visualizator.mo %LANGUAGE_DIR%\el
+copy ..\cadxcore\lang\el\cadxcore.mo %LANGUAGE_DIR%\el
+copy ..\cadxcore\lang\el\wxstd.mo %LANGUAGE_DIR%\el
+
+mkdir %LANGUAGE_DIR%\es 2>NUL
+copy ..\visualizator\lang\es\visualizator.mo %LANGUAGE_DIR%\es
+copy ..\cadxcore\lang\es\cadxcore.mo %LANGUAGE_DIR%\es
+copy ..\cadxcore\lang\es\wxstd.mo %LANGUAGE_DIR%\es
+
+mkdir %LANGUAGE_DIR%\fr 2>NUL
+copy ..\visualizator\lang\fr\visualizator.mo %LANGUAGE_DIR%\fr
+copy ..\cadxcore\lang\fr\cadxcore.mo %LANGUAGE_DIR%\fr
+copy ..\cadxcore\lang\fr\wxstd.mo %LANGUAGE_DIR%\fr
+
+mkdir %LANGUAGE_DIR%\ja 2>NUL
+copy ..\visualizator\lang\ja\visualizator.mo %LANGUAGE_DIR%\ja
+copy ..\cadxcore\lang\ja\cadxcore.mo %LANGUAGE_DIR%\ja
+copy ..\cadxcore\lang\ja\wxstd.mo %LANGUAGE_DIR%\ja
+
+mkdir %LANGUAGE_DIR%\pl 2>NUL
+copy ..\visualizator\lang\pl\visualizator.mo %LANGUAGE_DIR%\pl
+copy ..\cadxcore\lang\pl\cadxcore.mo %LANGUAGE_DIR%\pl
+copy ..\cadxcore\lang\pl\wxstd.mo %LANGUAGE_DIR%\pl
+
+mkdir %LANGUAGE_DIR%\pt 2>NUL
+copy ..\visualizator\lang\pt\visualizator.mo %LANGUAGE_DIR%\pt
+copy ..\cadxcore\lang\pt\cadxcore.mo %LANGUAGE_DIR%\pt
+copy ..\cadxcore\lang\pt\wxstd.mo %LANGUAGE_DIR%\pt
+
+mkdir %LANGUAGE_DIR%\pt_BR 2>NUL
+copy ..\visualizator\lang\pt_BR\visualizator.mo %LANGUAGE_DIR%\pt_BR
+copy ..\cadxcore\lang\pt_BR\cadxcore.mo %LANGUAGE_DIR%\pt_BR
+copy ..\cadxcore\lang\pt_BR\wxstd.mo %LANGUAGE_DIR%\pt_BR
+
+mkdir %LANGUAGE_DIR%\sr 2>NUL
+copy ..\visualizator\lang\sr\visualizator.mo %LANGUAGE_DIR%\sr
+copy ..\cadxcore\lang\sr\cadxcore.mo %LANGUAGE_DIR%\sr
+
+mkdir %LANGUAGE_DIR%\tr 2>NUL
+copy ..\visualizator\lang\tr\visualizator.mo %LANGUAGE_DIR%\tr
+copy ..\cadxcore\lang\tr\cadxcore.mo %LANGUAGE_DIR%\tr
+copy ..\cadxcore\lang\tr\wxstd.mo %LANGUAGE_DIR%\tr
+
+mkdir %LANGUAGE_DIR%\zh_CN 2>NUL
+copy ..\visualizator\lang\zh_CN\visualizator.mo %LANGUAGE_DIR%\zh_CN
+copy ..\cadxcore\lang\zh_CN\cadxcore.mo %LANGUAGE_DIR%\zh_CN
+copy ..\cadxcore\lang\zh_CN\wxstd.mo %LANGUAGE_DIR%\zh_CN
+
+REM DLL's
+copy ..\..\lib\Windows-x86\ITK-3.20.0\lib\Debug\*.dll %DLL_DIR%
+copy ..\..\lib\Windows-x86\VTK-5.10.0\lib\Debug\*.dll %DLL_DIR%
+copy ..\..\lib\Windows-x86\WX-3.0.0\lib\Debug\*.dll %DLL_DIR%
diff --git a/install_open_source/InstallReleaseMonoliticOpenSource.bat b/install_open_source/InstallReleaseMonoliticOpenSource.bat
new file mode 100644
index 0000000..8ad0ea7
--- /dev/null
+++ b/install_open_source/InstallReleaseMonoliticOpenSource.bat
@@ -0,0 +1,181 @@
+rem @echo off
+
+set TARGET="WIN32"
+IF "%TARGET%"=="x64" (set ARCH=x64) ELSE (set ARCH=x86)
+echo Installing %TARGET% (Rel \%ARCH%\)
+
+set CORE_PATH=..\ginkgocadx\%TARGET%\ReleaseMonoliticOpenSource
+set LANGUAGE_DIR=%CORE_PATH%\lang
+set RESOURCES_DIR=%CORE_PATH%\resources
+set CADXCORE_RESOURCES_DIR=%RESOURCES_DIR%\cadxcore
+set VISUALIZATOR_RESOURCES_DIR=%RESOURCES_DIR%\visualizator
+set COMPILATION=Internet
+
+REM @echo off
+set DLL_DIR=%CORE_PATH%
+copy ..\..\lib\Windows-x86\ITK-3.20.0\lib\Release\*.dll %DLL_DIR%
+copy ..\..\lib\Windows-x86\VTK-5.10.0\lib\release\*.dll %DLL_DIR%
+
+set RELEASE_DIR=.\ginkgoRelease
+
+set LANGUAGE_DIR_RELEASE=%RELEASE_DIR%\lang
+set RESOURCES_DIR_RELEASE=%RELEASE_DIR%\resources
+set DLL_DIR=%RELEASE_DIR%
+set MPRESS_EXECUTABLE=..\..\utils\mpress.exe
+set UPX_SENTENCE=..\..\utils\upx -9 
+set NSIS_SENTENCE="..\..\utils\nsis\makensis.exe"
+set ZIP_SENTENCE="..\..\utils\7z.exe"
+
+mkdir %RESOURCES_DIR% 2>NUL
+mkdir %CADXCORE_RESOURCES_DIR% 2>NUL
+mkdir %VISUALIZATOR_RESOURCES_DIR% 2>NUL
+xcopy /y /s ..\cadxcore\resources\files\*.* %CADXCORE_RESOURCES_DIR%
+xcopy /y /s ..\visualizator\resources\files\*.* %VISUALIZATOR_RESOURCES_DIR%
+
+mkdir %LANGUAGE_DIR% 2>NUL
+
+mkdir %LANGUAGE_DIR%\de 2>NUL
+copy ..\visualizator\lang\de\visualizator.mo %LANGUAGE_DIR%\de
+copy ..\cadxcore\lang\de\cadxcore.mo %LANGUAGE_DIR%\de
+copy ..\cadxcore\lang\de\wxstd.mo %LANGUAGE_DIR%\de
+
+mkdir %LANGUAGE_DIR%\el 2>NUL
+copy ..\visualizator\lang\el\visualizator.mo %LANGUAGE_DIR%\el
+copy ..\cadxcore\lang\el\cadxcore.mo %LANGUAGE_DIR%\el
+copy ..\cadxcore\lang\el\wxstd.mo %LANGUAGE_DIR%\el
+
+mkdir %LANGUAGE_DIR%\es 2>NUL
+copy ..\visualizator\lang\es\visualizator.mo %LANGUAGE_DIR%\es
+copy ..\cadxcore\lang\es\cadxcore.mo %LANGUAGE_DIR%\es
+copy ..\cadxcore\lang\es\wxstd.mo %LANGUAGE_DIR%\es
+
+mkdir %LANGUAGE_DIR%\fr 2>NUL
+copy ..\visualizator\lang\fr\visualizator.mo %LANGUAGE_DIR%\fr
+copy ..\cadxcore\lang\fr\cadxcore.mo %LANGUAGE_DIR%\fr
+copy ..\cadxcore\lang\fr\wxstd.mo %LANGUAGE_DIR%\fr
+
+mkdir %LANGUAGE_DIR%\ja 2>NUL
+copy ..\visualizator\lang\ja\visualizator.mo %LANGUAGE_DIR%\ja
+copy ..\cadxcore\lang\ja\cadxcore.mo %LANGUAGE_DIR%\ja
+copy ..\cadxcore\lang\ja\wxstd.mo %LANGUAGE_DIR%\ja
+
+mkdir %LANGUAGE_DIR%\pl 2>NUL
+copy ..\visualizator\lang\pl\visualizator.mo %LANGUAGE_DIR%\pl
+copy ..\cadxcore\lang\pl\cadxcore.mo %LANGUAGE_DIR%\pl
+copy ..\cadxcore\lang\pl\wxstd.mo %LANGUAGE_DIR%\pl
+
+mkdir %LANGUAGE_DIR%\pt 2>NUL
+copy ..\visualizator\lang\pt\visualizator.mo %LANGUAGE_DIR%\pt
+copy ..\cadxcore\lang\pt\cadxcore.mo %LANGUAGE_DIR%\pt
+copy ..\cadxcore\lang\pt\wxstd.mo %LANGUAGE_DIR%\pt
+
+mkdir %LANGUAGE_DIR%\pt_BR 2>NUL
+copy ..\visualizator\lang\pt_BR\visualizator.mo %LANGUAGE_DIR%\pt_BR
+copy ..\cadxcore\lang\pt_BR\cadxcore.mo %LANGUAGE_DIR%\pt_BR
+copy ..\cadxcore\lang\pt_BR\wxstd.mo %LANGUAGE_DIR%\pt_BR
+
+mkdir %LANGUAGE_DIR%\sr 2>NUL
+copy ..\visualizator\lang\sr\visualizator.mo %LANGUAGE_DIR%\sr
+copy ..\cadxcore\lang\sr\cadxcore.mo %LANGUAGE_DIR%\sr
+
+mkdir %LANGUAGE_DIR%\tr 2>NUL
+copy ..\visualizator\lang\tr\visualizator.mo %LANGUAGE_DIR%\tr
+copy ..\cadxcore\lang\tr\cadxcore.mo %LANGUAGE_DIR%\tr
+copy ..\cadxcore\lang\tr\wxstd.mo %LANGUAGE_DIR%\tr
+
+mkdir %LANGUAGE_DIR%\zh_CN 2>NUL
+copy ..\visualizator\lang\zh_CN\visualizator.mo %LANGUAGE_DIR%\zh_CN
+copy ..\cadxcore\lang\zh_CN\cadxcore.mo %LANGUAGE_DIR%\zh_CN
+copy ..\cadxcore\lang\zh_CN\wxstd.mo %LANGUAGE_DIR%\zh_CN
+
+REM A PARTIR DE AQUI GENERAMOS LA VERSION RELEASE
+
+mkdir %RELEASE_DIR% 2>NUL
+REM LANGUAGE
+mkdir  %LANGUAGE_DIR_RELEASE% 2>NUL
+
+mkdir %LANGUAGE_DIR_RELEASE%\de 2>NUL
+copy ..\visualizator\lang\de\visualizator.mo %LANGUAGE_DIR_RELEASE%\de
+copy ..\cadxcore\lang\de\cadxcore.mo %LANGUAGE_DIR_RELEASE%\de
+copy ..\cadxcore\lang\de\wxstd.mo %LANGUAGE_DIR_RELEASE%\de
+
+mkdir %LANGUAGE_DIR_RELEASE%\el 2>NUL
+copy ..\visualizator\lang\el\visualizator.mo %LANGUAGE_DIR_RELEASE%\el
+copy ..\cadxcore\lang\el\cadxcore.mo %LANGUAGE_DIR_RELEASE%\el
+copy ..\cadxcore\lang\el\wxstd.mo %LANGUAGE_DIR_RELEASE%\el
+
+mkdir %LANGUAGE_DIR_RELEASE%\es 2>NUL
+copy ..\visualizator\lang\es\visualizator.mo %LANGUAGE_DIR_RELEASE%\es
+copy ..\cadxcore\lang\es\cadxcore.mo %LANGUAGE_DIR_RELEASE%\es
+copy ..\cadxcore\lang\es\wxstd.mo %LANGUAGE_DIR_RELEASE%\es
+
+mkdir %LANGUAGE_DIR_RELEASE%\pl 2>NUL
+copy ..\visualizator\lang\pl\visualizator.mo %LANGUAGE_DIR_RELEASE%\pl
+copy ..\cadxcore\lang\pl\cadxcore.mo %LANGUAGE_DIR_RELEASE%\pl
+copy ..\cadxcore\lang\pl\wxstd.mo %LANGUAGE_DIR_RELEASE%\pl
+
+mkdir %LANGUAGE_DIR_RELEASE%\ja 2>NUL
+copy ..\visualizator\lang\ja\visualizator.mo %LANGUAGE_DIR_RELEASE%\ja
+copy ..\cadxcore\lang\ja\cadxcore.mo %LANGUAGE_DIR_RELEASE%\ja
+copy ..\cadxcore\lang\ja\wxstd.mo %LANGUAGE_DIR_RELEASE%\ja
+
+mkdir %LANGUAGE_DIR_RELEASE%\pt 2>NUL
+copy ..\visualizator\lang\pt\visualizator.mo %LANGUAGE_DIR_RELEASE%\pt
+copy ..\cadxcore\lang\pt\cadxcore.mo %LANGUAGE_DIR_RELEASE%\pt
+copy ..\cadxcore\lang\pt\wxstd.mo %LANGUAGE_DIR_RELEASE%\pt
+
+mkdir %LANGUAGE_DIR_RELEASE%\pt_BR 2>NUL
+copy ..\visualizator\lang\pt_BR\visualizator.mo %LANGUAGE_DIR_RELEASE%\pt_BR
+copy ..\cadxcore\lang\pt_BR\cadxcore.mo %LANGUAGE_DIR_RELEASE%\pt_BR
+copy ..\cadxcore\lang\pt_BR\wxstd.mo %LANGUAGE_DIR_RELEASE%\pt_BR
+
+mkdir %LANGUAGE_DIR_RELEASE%\fr 2>NUL
+copy ..\visualizator\lang\fr\visualizator.mo %LANGUAGE_DIR_RELEASE%\fr
+copy ..\cadxcore\lang\fr\cadxcore.mo %LANGUAGE_DIR_RELEASE%\fr
+copy ..\cadxcore\lang\fr\wxstd.mo %LANGUAGE_DIR_RELEASE%\fr
+
+mkdir %LANGUAGE_DIR_RELEASE%\sr 2>NUL
+copy ..\visualizator\lang\sr\visualizator.mo %LANGUAGE_DIR_RELEASE%\sr
+copy ..\cadxcore\lang\sr\cadxcore.mo %LANGUAGE_DIR_RELEASE%\sr
+
+mkdir %LANGUAGE_DIR_RELEASE%\tr 2>NUL
+copy ..\visualizator\lang\tr\visualizator.mo %LANGUAGE_DIR_RELEASE%\tr
+copy ..\cadxcore\lang\tr\cadxcore.mo %LANGUAGE_DIR_RELEASE%\tr
+copy ..\cadxcore\lang\tr\wxstd.mo %LANGUAGE_DIR_RELEASE%\tr
+
+mkdir %RESOURCES_DIR_RELEASE% 2>NUL
+xcopy /s %RESOURCES_DIR%\*.* %RESOURCES_DIR_RELEASE% 1>NUL
+
+REM DLL's
+mkdir %DLL_DIR% 2>NUL
+copy ..\..\lib\Windows-x86\ITK-3.20.0\lib\Release\*.dll %DLL_DIR%
+copy ..\..\lib\Windows-x86\VTK-5.10.0\lib\release\*.dll %DLL_DIR%
+copy ..\..\lib\Windows-x86\Microsoft.crt\bin\*.dll %DLL_DIR%
+copy ..\..\lib\Windows-x86\Microsoft.crt\bin\*.manifest %DLL_DIR%
+
+REM EJECUTABLE
+copy %CORE_PATH%\ginkgocadx.exe %RELEASE_DIR%\
+copy %CORE_PATH%\conformance.xml %RELEASE_DIR%\
+copy GINKGO_CADX_LICENSE.txt %RELEASE_DIR%\
+copy LGPL3.txt %RELEASE_DIR%\
+
+REM mpress (lo desactivo porque da alerta)
+REM %MPRESS_EXECUTABLE% %RELEASE_DIR%\Ginkgo_CADx.exe
+
+REM UPX para las dlls
+REM %UPX_SENTENCE% %RELEASE_DIR%\cadxcore.dll
+
+REM No se les pasa UPX
+
+%NSIS_SENTENCE% NsisInstaller.nsi
+
+REM compress folder
+echo "comprimiendo directorio..."
+move %RELEASE_DIR% GinkgoCADx
+%ZIP_SENTENCE% a -tzip GinkgoCADx.zip GinkgoCADx
+rmdir /S /Q GinkgoCADx
+
+REM echo "moviendo fichero comprimido..."
+REM move GinkgoCADx.zip ..\..\..\dist\0-ESTABLE\%COMPILATION%\
+REM echo "moviendo fichero ejecutable..."
+REM move Ginkgo_CADx-*.exe ..\..\..\dist\0-ESTABLE\%COMPILATION%\
diff --git a/install_open_source/LGPL3.txt b/install_open_source/LGPL3.txt
new file mode 100644
index 0000000..f0156c5
--- /dev/null
+++ b/install_open_source/LGPL3.txt
@@ -0,0 +1,165 @@
+                   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
\ No newline at end of file
diff --git a/install_open_source/NsisInstaller.nsi b/install_open_source/NsisInstaller.nsi
new file mode 100644
index 0000000..53034f6
--- /dev/null
+++ b/install_open_source/NsisInstaller.nsi
@@ -0,0 +1,372 @@
+;Ginkgo Installation script
+;Start Menu Folder Selection Example Script
+;Written by Javier Tovar
+
+
+;--------------------------------
+;Include Modern UI
+
+  !include "MUI2.nsh"
+  !include "Sections.nsh"
+  !include "Registry.nsh"
+  !include "LogicLib.nsh" ; Logical Library
+  !include "..\Versions.nsh"
+  
+;--------------------------------
+;Include FileAssociation
+!include "FileAssociation.nsh"
+
+;--------------------------------
+;General
+
+  ;definicion de variables
+  !define RELEASE_DIR ".\ginkgoRelease"
+    
+  ;Name and file
+  Name "Ginkgo CADx"
+  OutFile "Ginkgo_CADx_installer.exe"
+
+  ;Default installation folder
+  InstallDir "$PROGRAMFILES\MetaEmotion\GinkgoCADx"
+  
+  ;Get installation folder from registry if available
+  InstallDirRegKey HKLM "Software\Metaemotion\Ginkgo CADx" ""
+
+  ;Request application privileges for Windows Vista
+  RequestExecutionLevel admin
+  
+  !define MUI_ICON ginkgocadx_installer.ico
+  ;!define MUI_UNICON  gnkvideo_uninstall.ico
+
+
+;--------------------------------
+;Language Selection Dialog Settings
+
+  ;Remember the installer language
+  !define MUI_LANGDLL_REGISTRY_ROOT "HKLM" 
+  !define MUI_LANGDLL_REGISTRY_KEY "Software\Ginkgo CADx" 
+  !define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
+  
+;--------------------------------
+;Variables
+
+  Var StartMenuFolder
+
+;--------------------------------
+;Interface Settings
+
+  !define MUI_ABORTWARNING
+
+;--------------------------------
+;Pages
+
+  BrandingText "Ginkgo CADx ${VERSION_GINKGO}"
+  
+  !insertmacro MUI_PAGE_WELCOME
+  !define MUI_LICENSEPAGE_CHECKBOX
+  !insertmacro MUI_PAGE_LICENSE "GINKGO_CADX_LICENSE.txt"
+  !insertmacro MUI_PAGE_COMPONENTS
+  !insertmacro MUI_PAGE_DIRECTORY
+  
+  ;Start Menu Folder Page Configuration
+  !define MUI_STARTMENUPAGE_REGISTRY_ROOT "HKLM" 
+  !define MUI_STARTMENUPAGE_REGISTRY_KEY "Software\Ginkgo CADx" 
+  !define MUI_STARTMENUPAGE_REGISTRY_VALUENAME "Ginkgo CADx"
+  
+  !insertmacro MUI_PAGE_STARTMENU Application $StartMenuFolder
+  
+  !insertmacro MUI_PAGE_INSTFILES
+  !define MUI_FINISHPAGE_RUN
+  !define MUI_FINISHPAGE_RUN_FUNCTION "LaunchLink"
+  !define MUI_FINISHPAGE_LINK "Ginkgo CADx website"
+  !define MUI_FINISHPAGE_LINK_LOCATION http://ginkgo-cadx.com
+  !insertmacro MUI_PAGE_FINISH
+  
+  
+  !insertmacro MUI_UNPAGE_CONFIRM
+  !insertmacro MUI_UNPAGE_INSTFILES
+  
+;--------------------------------
+;function launch
+Function LaunchLink
+  ExecShell "" "$INSTDIR\ginkgocadx.exe"
+FunctionEnd
+
+;--------------------------------
+;Languages
+ 
+  !insertmacro MUI_LANGUAGE "Spanish" ;first language is the default language
+  !insertmacro MUI_LANGUAGE "English" ;
+  
+;--------------------------------
+;Reserve Files
+  
+  ;If you are using solid compression, files that are required before
+  ;the actual installation should be stored first in the data block,
+  ;because this will make your installer start faster.
+  
+  !insertmacro MUI_RESERVEFILE_LANGDLL
+
+
+;--------------------------------
+; Strings
+  
+  ;Microsoft Redistributable
+
+  LangString DESC_SecGinkgo ${LANG_SPANISH} "Ginkgo CADx framework."
+  LangString PRODUCT_NAME ${LANG_SPANISH} "Ginkgo CADx framework."
+  LangString DESC_ELIMINARCONFIGURACION_DECISION ${LANG_SPANISH} "�Desea eliminar la configuraci�n de Ginkgo CADx y los estudios importados$\nen la base de datos por defecto?"
+  LangString MSG_GINKGO_ALREADY_INSTALLED ${LANG_SPANISH} "Ginkgo CADx ya est� instalado. $\n$\nHaga click en `Aceptar` para desinstalar la versi�n anterior o `Cancel` para cancelar esta actualizaci�n."
+  LangString MSG_HA_HABIDO_ERRORES ${LANG_SPANISH} "Ha ocurrido un error al desinstalar Ginkgo CADx �Desea continuar instalando la nueva versi�n?"
+  LangString MSG_GINKGO_IS_RUNNING ${LANG_SPANISH} "Ginkgo CADx Pro est� en ejecuci�n. Cierre los procesos y reintente la instalaci�n."
+  
+  ;Microsoft Redistributable  
+  LangString DESC_SecGinkgo ${LANG_ENGLISH} "Ginkgo CADx framework."
+  LangString PRODUCT_NAME ${LANG_ENGLISH} "Ginkgo CADx framework."
+  
+  LangString DESC_ELIMINARCONFIGURACION_DECISION ${LANG_ENGLISH} "Would you like to delete Ginkgo CADx configuration and $\nimported studies stored in the default database?"
+  LangString MSG_GINKGO_ALREADY_INSTALLED ${LANG_ENGLISH}  "Ginkgo CADx is already installed. $\n$\nClick `Accept` to remove the previous version or `Cancel` to cancel this upgrade."
+  LangString MSG_HA_HABIDO_ERRORES ${LANG_ENGLISH} "There have been an error uninstalling Ginkgo CADx �Do you want to continue installing new version?."
+  LangString MSG_GINKGO_IS_RUNNING ${LANG_ENGLISH} "Ginkgo CADx Pro is running. Close running processes and retry."
+;--------------------------------
+;URI Handling
+ 
+; If ginkgocadx is the current URI handler for the specified protocol, remove it.
+Function un.UnregisterURIHandler
+  Exch $R0
+ 
+  ;Unregister the URI handler
+  DetailPrint "Unregistering $R0 URI Handler"
+  DeleteRegKey HKCR "$R0"
+ 
+  done:
+  Pop $R0
+FunctionEnd
+ 
+Function RegisterURIHandler
+  Exch $R0
+  DetailPrint "Registering $R0 URI Handler"
+  DeleteRegKey HKCR "$R0"
+  WriteRegStr HKCR "$R0" "" "URL:$R0"
+  WriteRegStr HKCR "$R0" "URL Protocol" ""
+  WriteRegStr HKCR "$R0\DefaultIcon" "" "$INSTDIR\ginkgocadx.exe,0"
+  WriteRegStr HKCR "$R0\shell" "" ""
+  WriteRegStr HKCR "$R0\shell\Open" "" ""
+  WriteRegStr HKCR "$R0\shell\Open\command" "" "$INSTDIR\ginkgocadx.exe %1"
+  Pop $R0
+FunctionEnd
+
+;Installer Sections
+
+Section "Ginkgo CADx" SecGinkgo
+
+  
+  ;ejecutable + dlls
+  AllowSkipFiles off
+   ;SetOutPath "$INSTDIR\Plugins"
+   ;File /r "${RELEASE_DIR}\Plugins\"
+   
+   SetOutPath "$INSTDIR\lang\de"
+   File "${RELEASE_DIR}\lang\de\*.*" 
+   
+   SetOutPath "$INSTDIR\lang\el"
+   File "${RELEASE_DIR}\lang\el\*.*" 
+   
+   SetOutPath "$INSTDIR\lang\es"
+   File "${RELEASE_DIR}\lang\es\*.*" 
+   
+   SetOutPath "$INSTDIR\lang\ja"
+   File "${RELEASE_DIR}\lang\ja\*.*" 
+   
+   SetOutPath "$INSTDIR\lang\pl"
+   File "${RELEASE_DIR}\lang\pl\*.*" 
+   
+   SetOutPath "$INSTDIR\lang\pt"
+   File "${RELEASE_DIR}\lang\pt\*.*" 
+
+   SetOutPath "$INSTDIR\lang\pt_BR"
+   File "${RELEASE_DIR}\lang\pt_BR\*.*" 
+   
+   SetOutPath "$INSTDIR\lang\fr"
+   File "${RELEASE_DIR}\lang\fr\*.*" 
+   
+   SetOutPath "$INSTDIR\lang\sr"
+   File "${RELEASE_DIR}\lang\sr\*.*" 
+   
+   SetOutPath "$INSTDIR\lang\tr"
+   File "${RELEASE_DIR}\lang\tr\*.*" 
+   
+   SetOutPath "$INSTDIR\resources"
+   File /r "${RELEASE_DIR}\resources\"   
+   
+   SetOutPath "$INSTDIR"
+   File  /oname=ginkgocadx.exe "${RELEASE_DIR}\ginkgocadx.exe" 
+   File "${RELEASE_DIR}\*.dll" 
+   File "${RELEASE_DIR}\*.manifest" 
+   File "${RELEASE_DIR}\*.xml" 
+   File "GINKGO_CADX_LICENSE.txt"
+   File "LGPL3.txt"
+   
+   
+  ;Store installation folder
+  WriteRegStr HKLM "Software\Ginkgo CADx" "" $INSTDIR
+  WriteRegStr HKLM "Software\Ginkgo CADx" "version" "${VERSION_GINKGO}"
+  
+  ;Create uninstaller
+  WriteUninstaller "$INSTDIR\Uninstall.exe"
+  
+  !insertmacro MUI_STARTMENU_WRITE_BEGIN Application
+    
+    SetShellVarContext all
+    ;Create shortcuts
+    CreateDirectory "$SMPROGRAMS\$StartMenuFolder"
+    CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Uninstall Ginkgo CADx.lnk" "$INSTDIR\Uninstall.exe"
+
+    CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Ginkgo CADx website.lnk" "http://ginkgo-cadx.com" "" "$WINDIR\System32\SHELL32.dll" 13
+    CreateShortCut "$SMPROGRAMS\$StartMenuFolder\Ginkgo CADx.lnk" "$INSTDIR\ginkgocadx.exe"
+    
+    ${registerExtension} "$INSTDIR\ginkgocadx.exe" ".gxml" "Ginkgo Integration CADx file"
+    ${registerExtension} "$INSTDIR\ginkgocadx.exe" ".gkxml" "Ginkgo Integration CADx file"
+    ${registerExtension} "$INSTDIR\ginkgocadx.exe" ".dcm" "Ginkgo CADx file"
+	
+	Push "ginkgocadx"
+    Call RegisterURIHandler
+  
+  !insertmacro MUI_STARTMENU_WRITE_END
+
+SectionEnd
+
+Function .onInit
+;test local
+;Language selection dialog
+  !insertmacro MUI_LANGDLL_DISPLAY
+  
+  ;para cuando queramos poner la imagen de bienvenida/fin MUI_WELCOMEFINISHPAGE_BITMAP 
+FindProcDLL::FindProc "ginkgocadx.exe"
+IntCmp $R0 1 0 notRunning
+    MessageBox MB_OK|MB_ICONEXCLAMATION $(MSG_GINKGO_IS_RUNNING) /SD IDOK
+    Abort
+notRunning:
+
+ReadRegStr $R0 HKLM \
+  "Software\Ginkgo CADx" \
+  ""
+StrCmp $R0 "" testcurrentuser tryuninstall
+  
+;test current user
+testcurrentuser:
+ReadRegStr $R0 HKCU \
+  "Software\Ginkgo CADx" \
+  ""
+StrCmp $R0 "" uninst_Done
+
+ tryuninstall:
+  MessageBox MB_OKCANCEL|MB_ICONEXCLAMATION  $(MSG_GINKGO_ALREADY_INSTALLED) /SD IDOK IDOK uninst
+  Abort
+ 
+;Run the uninstaller
+uninst:
+ClearErrors
+  ExecWait '$R0\uninstall.exe /S _?=$R0' $R2
+  ;if uninstall status != 0... error
+  ExecWait '$R0\uninstall.exe /S' 
+  Sleep 1000
+  
+  StrCmp $R2 0 uninst_Done
+  MessageBox MB_YESNO|MB_ICONEXCLAMATION $(MSG_HA_HABIDO_ERRORES) /SD IDYES IDYES uninst_Done
+  Abort
+  
+   
+uninst_Done:
+  
+
+;  !define MUI_LANGDLL_WINDOWTITLE "$LANGUAGE_DLL_TITLE"
+;  !define MUI_LANGDLL_INFO "$LANGUAGE_DLL_INFO"
+;  !insertmacro MUI_LANGDLL_DISPLAY
+;  !undef MUI_LANGDLL_WINDOWTITLE
+;  !undef MUI_LANGDLL_INFO
+  InitPluginsDir
+  SetOutPath "$PLUGINSDIR"
+  ;File "Common\Plugins\*.*"
+  File /r "${NSISDIR}\Plugins\*.*"
+FunctionEnd
+
+;--------------------------------
+;Uninstaller Section
+
+Section "Uninstall" 
+;respetar configuracion...
+  ;RMDir /r "$INSTDIR"
+  ;RMDir /r "$INSTDIR\Plugins"
+  RMDir /r "$INSTDIR\lang"
+  RMDir /r "$INSTDIR\resources"
+  
+  Delete "$INSTDIR\*.exe"
+  Delete "$INSTDIR\*.dll"
+  Delete "$INSTDIR\*.manifest"
+  Delete "$INSTDIR\*.xml"
+  Delete "$INSTDIR\GINKGO_CADX_LICENSE.txt"
+  Delete "$INSTDIR\LGPL3.txt"
+  
+  RMDir "$INSTDIR"
+	
+  !insertmacro MUI_STARTMENU_GETFOLDER Application $StartMenuFolder
+    
+  SetShellVarContext all
+  Delete "$SMPROGRAMS\$StartMenuFolder\Uninstall Ginkgo CADx.lnk"
+  Delete "$SMPROGRAMS\$StartMenuFolder\Ginkgo CADx website.lnk"
+  Delete "$SMPROGRAMS\$StartMenuFolder\Ginkgo CADx.lnk"
+  RMDir "$SMPROGRAMS\$StartMenuFolder"
+  
+  ${unregisterExtension} ".gxml" "Ginkgo CADx Integration file"
+  ${unregisterExtension} ".gkxml" "Ginkgo CADx Integration file"
+  ${unregisterExtension} ".dcm" "Ginkgo CADx file"
+  
+  
+  DeleteRegKey /ifempty HKLM "Software\Ginkgo CADx"
+  ;unregister URI handler
+  Push "ginkgocadx"
+  Call un.UnregisterURIHandler
+  
+  ;se le pregunta si desea eliminar la configuraci�n actual
+  MessageBox MB_ICONEXCLAMATION|MB_YESNO|MB_DEFBUTTON2 "$(DESC_ELIMINARCONFIGURACION_DECISION)" /SD IDNO IDYES 0 IDNO enduninstall
+  ; "Downloading Microsoft Visual C++ 2008 Redistributable Package"
+  Delete "$PROFILE\Ginkgo.ini"
+  Delete "$PROFILE\GinkgoUser.ini"
+  
+  ;remove ginkgocadx dir
+  ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
+ 
+  ${If} $R0 < 6
+	;version less than windows vista
+	RMDir /r "$APPDATA\ginkgocadx"
+  ${Else}
+	;windows vista, 7, 8...
+    RMDir /r "$PROFILE\AppData\Roaming\ginkgocadx"
+  ${EndIf}
+ enduninstall:
+	
+SectionEnd
+
+
+
+;--------------------------------
+;Uninstaller Functions
+
+Function un.onInit
+
+  !insertmacro MUI_UNGETLANGUAGE
+  
+FunctionEnd
+
+;--------------------------------
+;Descriptions
+
+  ;Language strings
+  
+
+  ;Assign language strings to sections
+  !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN    
+    !insertmacro MUI_DESCRIPTION_TEXT ${SecGinkgo} $(DESC_SecGinkgo)
+  !insertmacro MUI_FUNCTION_DESCRIPTION_END
+
diff --git a/install_open_source/ginkgocadx_installer.ico b/install_open_source/ginkgocadx_installer.ico
new file mode 100644
index 0000000..6dd4c3b
Binary files /dev/null and b/install_open_source/ginkgocadx_installer.ico differ
diff --git a/install_open_source/install_open_source.vcxproj b/install_open_source/install_open_source.vcxproj
new file mode 100644
index 0000000..cc60527
--- /dev/null
+++ b/install_open_source/install_open_source.vcxproj
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="DebugMonoliticOS|x64">
+      <Configuration>DebugMonoliticOS</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseMonoliticOpenSource|x64">
+      <Configuration>ReleaseMonoliticOpenSource</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{0F92665B-E708-4924-AC41-469893222737}</ProjectGuid>
+    <Keyword>MakeFileProj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'" Label="Configuration">
+    <ConfigurationType>Makefile</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">
+    <NMakeBuildCommandLine>InstallDebugMonoliticOpenSource.bat</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine />
+    <NMakeCleanCommandLine>CleanDebugMonoliticOpenSource.bat</NMakeCleanCommandLine>
+    <NMakeOutput />
+    <NMakePreprocessorDefinitions>WIN32;_DEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">
+    <NMakeBuildCommandLine>InstallReleaseMonoliticOpenSource.bat</NMakeBuildCommandLine>
+    <NMakeReBuildCommandLine />
+    <NMakeCleanCommandLine>CleanReleaseMonoliticOpenSource.bat</NMakeCleanCommandLine>
+    <NMakeOutput />
+    <NMakePreprocessorDefinitions>WIN32;NDEBUG;$(NMakePreprocessorDefinitions)</NMakePreprocessorDefinitions>
+  </PropertyGroup>
+  <ItemDefinitionGroup>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <None Include="CleanDebugMonoliticOpenSource.bat" />
+    <None Include="CleanReleaseMonoliticOpenSource.bat" />
+    <None Include="InstallDebugMonoliticOpenSource.bat" />
+    <None Include="InstallReleaseMonoliticOpenSource.bat" />
+    <None Include="NsisInstaller.nsi" />
+    <None Include="..\Versions.nsh" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\cadxcore\cadxcore.vcxproj">
+      <Project>{51617602-e33c-4a52-941e-3e3302de4447}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="..\ginkgocadx\ginkgocadx.vcxproj">
+      <Project>{5e2f34c0-ac7f-45f9-b3f3-7027fa2bc469}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+    <ProjectReference Include="..\visualizator\visualizator.vcxproj">
+      <Project>{489a2bbd-64a0-4e2f-b700-b18b71680593}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/install_open_source/install_open_source.vcxproj.filters b/install_open_source/install_open_source.vcxproj.filters
new file mode 100644
index 0000000..13bcbc1
--- /dev/null
+++ b/install_open_source/install_open_source.vcxproj.filters
@@ -0,0 +1,37 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Archivos de código fuente">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Archivos de encabezado">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Archivos de recursos">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav</Extensions>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <None Include="CleanDebugMonoliticOpenSource.bat">
+      <Filter>Archivos de código fuente</Filter>
+    </None>
+    <None Include="CleanReleaseMonoliticOpenSource.bat">
+      <Filter>Archivos de código fuente</Filter>
+    </None>
+    <None Include="InstallDebugMonoliticOpenSource.bat">
+      <Filter>Archivos de código fuente</Filter>
+    </None>
+    <None Include="InstallReleaseMonoliticOpenSource.bat">
+      <Filter>Archivos de código fuente</Filter>
+    </None>
+    <None Include="NsisInstaller.nsi">
+      <Filter>Archivos de código fuente</Filter>
+    </None>
+    <None Include="..\Versions.nsh">
+      <Filter>Archivos de código fuente</Filter>
+    </None>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/model_ginkgo.cpp b/model_ginkgo.cpp
new file mode 100644
index 0000000..3a73c7c
--- /dev/null
+++ b/model_ginkgo.cpp
@@ -0,0 +1,5 @@
+void assert(bool x)
+{
+        if (!x)
+                __coverity_panic__();
+}
diff --git a/visualizator/CMakeLists.txt b/visualizator/CMakeLists.txt
new file mode 100644
index 0000000..4723648
--- /dev/null
+++ b/visualizator/CMakeLists.txt
@@ -0,0 +1,170 @@
+CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
+
+PROJECT(visualizator)
+
+################ SOURCES ################
+
+SET(SRCS visualizator.cpp)
+AUX_SOURCE_DIRECTORY(visualizator/commands SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/controllers SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/dialogos SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/dialogos/importacion SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/dialogos/seleccionardiagnostico SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/estudios SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/herramientas SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/vistas SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/widgets SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/export SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/export/contracts SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/export/tools SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/tools SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/wxvtk SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/wxvtk/reconstruction SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/wxvtk/reconstruction/commands SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/wxvtk/reconstruction/interactors SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/wxvtk/reconstruction/pipelines SRCS)
+AUX_SOURCE_DIRECTORY(visualizator/wxvtk/reconstruction/volumedataset SRCS)
+AUX_SOURCE_DIRECTORY(resources SRCS)
+
+################ DEFINITIONS ################
+
+ADD_EXTENSION_DEFINITIONS()
+ADD_DEFINITIONS(-DMONOLITIC)
+
+################ INCLUDE DIRECTORIES ################
+
+SET(${PROJECT_NAME}_INCLUDE_DIR
+	${CMAKE_CURRENT_SOURCE_DIR}
+	${CMAKE_CURRENT_SOURCE_DIR}/comandos
+	${CMAKE_CURRENT_SOURCE_DIR}/controllers
+	${CMAKE_CURRENT_SOURCE_DIR}/dialogos
+	${CMAKE_CURRENT_SOURCE_DIR}/estudios
+	${CMAKE_CURRENT_SOURCE_DIR}/eventos
+	${CMAKE_CURRENT_SOURCE_DIR}/exportacion
+	${CMAKE_CURRENT_SOURCE_DIR}/herramientas
+	${CMAKE_CURRENT_SOURCE_DIR}/vistas
+	${CMAKE_CURRENT_SOURCE_DIR}/widgets
+	${CMAKE_CURRENT_SOURCE_DIR}/wxvtk
+	CACHE INTERNAL ""
+)
+
+INCLUDE_DIRECTORIES(${CADxCore_INCLUDE_DIR})
+
+INCLUDE_DIRECTORIES(${${PROJECT_NAME}_INCLUDE_DIR})
+
+IF(USE_CUSTOM_WX)
+	ADD_DEFINITIONS(${wxWidgets_defines})
+	INCLUDE_DIRECTORIES(${wxWidgets_INCLUDE_DIR})
+	LINK_DIRECTORIES(${wxWidgets_DIR})
+ELSE()
+	INCLUDE(${wxWidgets_USE_FILE})
+	#MESSAGE("WXLIBS = ${wxWidgets_LIBRARIES} ")
+ENDIF()
+
+
+IF (USE_CUSTOM_VTK)
+	ADD_DEFINITIONS(${VTK_defines})
+	INCLUDE_DIRECTORIES(${VTK_INCLUDE_DIR})
+	LINK_DIRECTORIES(${VTK_DIR})
+ELSE()
+	INCLUDE(${VTK_USE_FILE})
+ENDIF()
+
+
+
+IF(USE_CUSTOM_ITK)
+	ADD_DEFINITIONS(${ITK_defines})
+	INCLUDE_DIRECTORIES(${ITK_INCLUDE_DIR})
+	LINK_DIRECTORIES(${ITK_DIR})
+ELSE()
+	INCLUDE(${ITK_USE_FILE})
+	#MESSAGE("ITKLIBS = ${ITK_LIBRARIES}")
+ENDIF()
+
+ADD_DEFINITIONS(${Cairo_defines})
+INCLUDE_DIRECTORIES(${Cairo_INCLUDE_DIR})
+LINK_DIRECTORIES(${Cairo_LIB})
+
+ADD_DEFINITIONS(${Pixman_defines})
+INCLUDE_DIRECTORIES(${Pixman_INCLUDE_DIR})
+LINK_DIRECTORIES(${Pixman_LIB})
+
+################ TARGET ################
+
+IF(LINUX AND NOT CUSTOM_PACKAGE)
+	SET(CMAKE_SKIP_BUILD_RPATH  FALSE)
+	SET(CMAKE_BUILD_WITH_INSTALL_RPATH FALSE) 
+	SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/ginkgocadx")
+	SET(CMAKE_INSTALL_RPATH_USE_LINK_PATH FALSE)
+	LIST(FIND CMAKE_PLATFORM_IMPLICIT_LINK_DIRECTORIES "${CMAKE_INSTALL_PREFIX}/lib/ginkgocadx" isSystemDir)
+	IF("${isSystemDir}" STREQUAL "-1")
+		SET(CMAKE_INSTALL_RPATH "${CMAKE_INSTALL_PREFIX}/lib/ginkgocadx")
+	ENDIF()
+ENDIF()
+
+ADD_LIBRARY(${PROJECT_NAME} STATIC ${SRCS} )
+#ADD_EXECUTABLE(${PROJECT_NAME} WIN32 MACOSX_BUNDLE ${SRCS})
+
+IF(LINUX)
+	SET(LIBNAME "lib${PROJECT_NAME}.so.${GINKGO_VERSION_STR}")
+ENDIF()
+IF(MACOS)
+	SET(LIBNAME "lib${PROJECT_NAME}.${GINKGO_VERSION_STR}.dylib")
+ENDIF()
+
+#ADD_CUSTOM_COMMAND( TARGET ${PROJECT_NAME} POST_BUILD COMMAND /bin/sh ARGS "${CMAKE_CURRENT_SOURCE_DIR}/../ginkgocadx/build_descriptor.sh" "${CMAKE_CURRENT_SOURCE_DIR}" "${LIBNAME}" "${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.inf" "${GINKGO_VERSION}" "${GINKGO_SUB_VERSION}")
+
+SET_TARGET_PROPERTIES(${PROJECT_NAME} PROPERTIES
+	VERSION "${GINKGO_VERSION_STR}" SOVERSION "${GINKGO_VERSION_STR}"
+	LINK_INTERFACE_LIBRARIES ""
+	INSTALL_RPATH_USE_LINK_PATH FALSE )
+
+#INSTALL(TARGETS ${PROJECT_NAME} LIBRARY DESTINATION lib/ginkgocadx/Plugins)
+#INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/${PROJECT_NAME}.inf DESTINATION lib/ginkgocadx/Plugins)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/3d_bar DESTINATION share/ginkgocadx/resources/visualizator)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/logos DESTINATION share/ginkgocadx/resources/visualizator)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/synchronization_bar DESTINATION share/ginkgocadx/resources/visualizator)
+INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/resources/files/tool_icons DESTINATION share/ginkgocadx/resources/visualizator)
+
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/zh_CN/visualizator.mo DESTINATION share/ginkgocadx/lang/zh_CN)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/de/visualizator.mo DESTINATION share/ginkgocadx/lang/es)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/de/visualizator.mo DESTINATION share/ginkgocadx/lang/de)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/el/visualizator.mo DESTINATION share/ginkgocadx/lang/el)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/es/visualizator.mo DESTINATION share/ginkgocadx/lang/es)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/fr/visualizator.mo DESTINATION share/ginkgocadx/lang/fr)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/ja/visualizator.mo DESTINATION share/ginkgocadx/lang/ja)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/pl/visualizator.mo DESTINATION share/ginkgocadx/lang/pl)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/pt/visualizator.mo DESTINATION share/ginkgocadx/lang/pt)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/lang/tr/visualizator.mo DESTINATION share/ginkgocadx/lang/tr)
+################ LIBS ################
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} CADxCore)
+
+
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${wxWidgets_LIBRARIES})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${VTK_LIBRARIES})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${ITK_LIBRARIES})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Cairo_LIBRARIES})
+TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${Pixman_LIBRARIES})
+
+IF (LINUX)
+	TARGET_LINK_LIBRARIES(${PROJECT_NAME} GL xml2)
+ENDIF()
+
+IF(MACOS)
+	FIND_LIBRARY( CARBON_LIB Carbon )
+	FIND_LIBRARY( OPENGL_LIB OpenGL )
+	
+	MARK_AS_ADVANCED( CARBON_LIB OPENGL_LIB )
+
+	SET(LIBS ${CARBON_LIB} ${OPENGL_LIB} )
+	LIST( APPEND LIBS xml2 z )
+
+	TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${LIBS})
+
+	SET_TARGET_PROPERTIES( PROPERTIES LINK_FLAGS "-Wl ${XCODE_LINK_FLAGS}" )
+	
+ENDIF()
+
+MESSAGE(STATUS "OS=[${OS}], Arch=[${ARCH}], Target=[${CMAKE_BUILD_TYPE}], Project=[${PROJECT_NAME}]")
+
diff --git a/visualizator/License.txt b/visualizator/License.txt
new file mode 100644
index 0000000..f0156c5
--- /dev/null
+++ b/visualizator/License.txt
@@ -0,0 +1,165 @@
+                   GNU LESSER GENERAL PUBLIC LICENSE
+                       Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+
+  This version of the GNU Lesser General Public License incorporates
+the terms and conditions of version 3 of the GNU General Public
+License, supplemented by the additional permissions listed below.
+
+  0. Additional Definitions.
+
+  As used herein, "this License" refers to version 3 of the GNU Lesser
+General Public License, and the "GNU GPL" refers to version 3 of the GNU
+General Public License.
+
+  "The Library" refers to a covered work governed by this License,
+other than an Application or a Combined Work as defined below.
+
+  An "Application" is any work that makes use of an interface provided
+by the Library, but which is not otherwise based on the Library.
+Defining a subclass of a class defined by the Library is deemed a mode
+of using an interface provided by the Library.
+
+  A "Combined Work" is a work produced by combining or linking an
+Application with the Library.  The particular version of the Library
+with which the Combined Work was made is also called the "Linked
+Version".
+
+  The "Minimal Corresponding Source" for a Combined Work means the
+Corresponding Source for the Combined Work, excluding any source code
+for portions of the Combined Work that, considered in isolation, are
+based on the Application, and not on the Linked Version.
+
+  The "Corresponding Application Code" for a Combined Work means the
+object code and/or source code for the Application, including any data
+and utility programs needed for reproducing the Combined Work from the
+Application, but excluding the System Libraries of the Combined Work.
+
+  1. Exception to Section 3 of the GNU GPL.
+
+  You may convey a covered work under sections 3 and 4 of this License
+without being bound by section 3 of the GNU GPL.
+
+  2. Conveying Modified Versions.
+
+  If you modify a copy of the Library, and, in your modifications, a
+facility refers to a function or data to be supplied by an Application
+that uses the facility (other than as an argument passed when the
+facility is invoked), then you may convey a copy of the modified
+version:
+
+   a) under this License, provided that you make a good faith effort to
+   ensure that, in the event an Application does not supply the
+   function or data, the facility still operates, and performs
+   whatever part of its purpose remains meaningful, or
+
+   b) under the GNU GPL, with none of the additional permissions of
+   this License applicable to that copy.
+
+  3. Object Code Incorporating Material from Library Header Files.
+
+  The object code form of an Application may incorporate material from
+a header file that is part of the Library.  You may convey such object
+code under terms of your choice, provided that, if the incorporated
+material is not limited to numerical parameters, data structure
+layouts and accessors, or small macros, inline functions and templates
+(ten or fewer lines in length), you do both of the following:
+
+   a) Give prominent notice with each copy of the object code that the
+   Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the object code with a copy of the GNU GPL and this license
+   document.
+
+  4. Combined Works.
+
+  You may convey a Combined Work under terms of your choice that,
+taken together, effectively do not restrict modification of the
+portions of the Library contained in the Combined Work and reverse
+engineering for debugging such modifications, if you also do each of
+the following:
+
+   a) Give prominent notice with each copy of the Combined Work that
+   the Library is used in it and that the Library and its use are
+   covered by this License.
+
+   b) Accompany the Combined Work with a copy of the GNU GPL and this license
+   document.
+
+   c) For a Combined Work that displays copyright notices during
+   execution, include the copyright notice for the Library among
+   these notices, as well as a reference directing the user to the
+   copies of the GNU GPL and this license document.
+
+   d) Do one of the following:
+
+       0) Convey the Minimal Corresponding Source under the terms of this
+       License, and the Corresponding Application Code in a form
+       suitable for, and under terms that permit, the user to
+       recombine or relink the Application with a modified version of
+       the Linked Version to produce a modified Combined Work, in the
+       manner specified by section 6 of the GNU GPL for conveying
+       Corresponding Source.
+
+       1) Use a suitable shared library mechanism for linking with the
+       Library.  A suitable mechanism is one that (a) uses at run time
+       a copy of the Library already present on the user's computer
+       system, and (b) will operate properly with a modified version
+       of the Library that is interface-compatible with the Linked
+       Version.
+
+   e) Provide Installation Information, but only if you would otherwise
+   be required to provide such information under section 6 of the
+   GNU GPL, and only to the extent that such information is
+   necessary to install and execute a modified version of the
+   Combined Work produced by recombining or relinking the
+   Application with a modified version of the Linked Version. (If
+   you use option 4d0, the Installation Information must accompany
+   the Minimal Corresponding Source and Corresponding Application
+   Code. If you use option 4d1, you must provide the Installation
+   Information in the manner specified by section 6 of the GNU GPL
+   for conveying Corresponding Source.)
+
+  5. Combined Libraries.
+
+  You may place library facilities that are a work based on the
+Library side by side in a single library together with other library
+facilities that are not Applications and are not covered by this
+License, and convey such a combined library under terms of your
+choice, if you do both of the following:
+
+   a) Accompany the combined library with a copy of the same work based
+   on the Library, uncombined with any other library facilities,
+   conveyed under the terms of this License.
+
+   b) Give prominent notice with the combined library that part of it
+   is a work based on the Library, and explaining where to find the
+   accompanying uncombined form of the same work.
+
+  6. Revised Versions of the GNU Lesser General Public License.
+
+  The Free Software Foundation may publish revised and/or new versions
+of the GNU Lesser General Public License from time to time. Such new
+versions will be similar in spirit to the present version, but may
+differ in detail to address new problems or concerns.
+
+  Each version is given a distinguishing version number. If the
+Library as you received it specifies that a certain numbered version
+of the GNU Lesser General Public License "or any later version"
+applies to it, you have the option of following the terms and
+conditions either of that published version or of any later version
+published by the Free Software Foundation. If the Library as you
+received it does not specify a version number of the GNU Lesser
+General Public License, you may choose any version of the GNU Lesser
+General Public License ever published by the Free Software Foundation.
+
+  If the Library as you received it specifies that a proxy can decide
+whether future versions of the GNU Lesser General Public License shall
+apply, that proxy's public statement of acceptance of any version is
+permanent authorization for you to choose that version for the
+Library.
\ No newline at end of file
diff --git a/visualizator/lang/de/visualizator.mo b/visualizator/lang/de/visualizator.mo
new file mode 100644
index 0000000..6a9f098
Binary files /dev/null and b/visualizator/lang/de/visualizator.mo differ
diff --git a/visualizator/lang/de/visualizator.po b/visualizator/lang/de/visualizator.po
new file mode 100644
index 0000000..5132522
--- /dev/null
+++ b/visualizator/lang/de/visualizator.po
@@ -0,0 +1,874 @@
+# German translation for ginkgocadx
+# Copyright (c) 2011 Rosetta Contributors and Canonical Ltd 2011
+# This file is distributed under the same license as the ginkgocadx package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, 2011.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-06-11 15:54+0100\n"
+"PO-Revision-Date: 2014-06-11 15:54+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: German <de at li.org>\n"
+"Language: de_DE\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: ../../\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr "PNG-Bitmap-Ressource konnte nicht geladen werden"
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr "Ginkgo CADx Visualisator ist Open Source"
+
+#: visualizator.cpp:62
+msgid "Info"
+msgstr "Information"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+msgid "Ginkgo CADx viewer"
+msgstr "Betrachter \"Ginkgo CADx\""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+msgid "Simple importation of images"
+msgstr "Einfaches Importieren von Bildern"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+msgid "Medical viewer"
+msgstr "Medizinischer Betrachter"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+msgid "Waveform viewer"
+msgstr "Wellenformbetrachter"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+msgid "Default importer"
+msgstr "Vorgabe-Importprogramm"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+msgid "Ginkgo CADx Image Report"
+msgstr "Ginkgo CADx – Visueller Bericht"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+msgid "Medical Image Viewer"
+msgstr "Betrachter für medizinische Bilder"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+msgid "Error opening study"
+msgstr "Fehler beim Öffnen der Studie"
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+msgid "Performing tasks of integration ..."
+msgstr "Integriere ..."
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+msgid "There are no overlays on this image"
+msgstr "Es gibt für dieses Bild keine Overlays"
+
+#: visualizator/estudios/ecgstudy.cpp:380
+msgid "We are working to support "
+msgstr "Wir arbeiten an Unterstützung von "
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr "Atemfrequenz:      "
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr " Hf"
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr "PR int:      "
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr " ms"
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr "QRS-Länge:      "
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr "QT/QTc:      "
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr "P-R-T-Achsen: "
+
+#: visualizator/estudios/ecgstudy.cpp:489
+msgid "Measurements not found"
+msgstr "Meßwerte nicht gefunden"
+
+#: visualizator/estudios/ecgstudy.cpp:589
+msgid "ECG format not supported"
+msgstr "EKG-Format nicht unterstützt"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr "RR-Intervall"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr "PP-Intervall"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "QTc Interval"
+msgstr "QTc-Intervall"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr "Atemfrequenz"
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+#, fuzzy
+msgid "Rule \tCtrl+R"
+msgstr "P-R-T-Achsen: "
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+msgid "Overlay layers"
+msgstr "Ebenen"
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr "3D/4D-Rekonstruktion"
+
+#: visualizator/tools/reconstructiontool.cpp:207
+msgid "3D MPR"
+msgstr "3D-MPR"
+
+#: visualizator/tools/reconstructiontool.cpp:213
+msgid "MIP 3D"
+msgstr "MIP 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:219
+msgid "3D volume rendering"
+msgstr "3D-Volumendarstellung"
+
+#: visualizator/tools/reconstructiontool.cpp:225
+msgid "3D surface rendering"
+msgstr "3D-Oberflächendarstellung"
+
+#: visualizator/tools/reconstructiontool.cpp:232
+msgid "3D endoscopy"
+msgstr "3D-Endoskopie"
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr ""
+"Fehler: Speicher voll. Schließen Sie einige Studien, um Speicher freizugeben."
+
+#: visualizator/widgets/wecgrule.cpp:595
+msgid "Length"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:600
+msgid "Points (I)"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:607
+msgid "Points (M)"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr ""
+"Der Videospeicher des Systems ist ausgeschöpft und das Raster konnte nicht "
+"konfiguriert werden. Schließen Sie einige Studien, um Speicher freizugeben."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid "Error configuring the grid"
+msgstr "Fehler beim Erstellen des Rasters"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr "Slice: "
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr "Anzeigeoptionen"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr "Synchronisieren/Desynchronisieren"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+"Fehler: Videospeicher voll. Kann Bild nicht laden. Schließen Sie einige "
+"Studien, um Speicher freizugeben."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr "Anzeige schließen"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+msgid "Error: Internal error."
+msgstr "Fehler: Internes Problem."
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+msgid "Area      : "
+msgstr "Fläche : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr "unbestimmt"
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr "Perimeter : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+msgid "Position   : "
+msgstr "Position : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+msgid "RGB ("
+msgstr "RGB ("
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr "Bewertung : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr "[DNorm ="
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr "Centroid-Position:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+msgid "Area:"
+msgstr "Fläche:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr "Perimeter:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr "Bewertung: Mean ="
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ", dev ="
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+msgid "Show/Hide metadata"
+msgstr "Metadaten zeigen/verbergen"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error loading study with ecg view"
+msgstr "Fehler beim Laden der Studie im EKG-Betrachter"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error"
+msgstr "Fehler"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+msgid "Uploading to the PACS ..."
+msgstr "Es wird zum PACS hochgeladen …"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+msgid "Upload series to PACS..."
+msgstr "Serie wird zum PACS hochgeladen …"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, c-format
+msgid "%d series"
+msgstr "%d-Serie"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr ""
+"Wählen Sie das Fenster, welches mit dem aktuellen synchronisiert werden soll."
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr "Übernehmen"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr "Abbrechen"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr "Metadaten"
+
+#: visualizator/estudios/ecgstudy.h:108
+msgid "Unknown"
+msgstr "Unbekannt"
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr "Visualisator-Erweiterung"
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+msgid "Synchronize..."
+msgstr "Es wird abgeglichen …"
+
+#~ msgid "Play"
+#~ msgstr "Wiedergabe"
+
+#~ msgid "Speed"
+#~ msgstr "Geschwindigkeit"
+
+#~ msgid "Loop"
+#~ msgstr "Endlosschleife"
+
+#~ msgid "Repeat on end"
+#~ msgstr "Nach dem Ende wiederholen"
+
+#~ msgid "Start playback"
+#~ msgstr "Wiedergabe starten"
+
+#~ msgid "Stop"
+#~ msgstr "Anhalten"
+
+#~ msgid "End playback"
+#~ msgstr "Abspielen beenden"
+
+#~ msgid "Patient: "
+#~ msgstr "Patient: "
+
+#~ msgid "Patient Id: "
+#~ msgstr "Patienten-ID: "
+
+#~ msgid "Modality: "
+#~ msgstr "Modalität: "
+
+#~ msgid "Image:"
+#~ msgstr "Bild:"
+
+#~ msgid "Right"
+#~ msgstr "Rechts"
+
+#~ msgid "Voxel:"
+#~ msgstr "Voxel:"
+
+#~ msgid "Image without metric information"
+#~ msgstr "Bild ohne Maßstab"
+
+#~ msgid "Made with %s"
+#~ msgstr "Erstellt mit %s"
+
+#~ msgid "Position:"
+#~ msgstr "Position:"
+
+#~ msgid "Value:"
+#~ msgstr "Wert:"
+
+#~ msgid "Study"
+#~ msgstr "Studie"
+
+#~ msgid "DICOM Tags"
+#~ msgstr "DICOM-Markierungen"
+
+#~ msgid "Surface settings"
+#~ msgstr "Oberflächeneinstellungen"
+
+#~ msgid "Quality"
+#~ msgstr "Qualität"
+
+#~ msgid "Smooth"
+#~ msgstr "Glätten"
+
+#~ msgid "Resolution"
+#~ msgstr "Auflösung"
+
+#~ msgid "Volume visualization resolution (25-100%)"
+#~ msgstr "Auflösung der Volumendarstellung (25-100%)"
+
+#~ msgid "Surfaces"
+#~ msgstr "Oberflächen"
+
+#~ msgid "Volume visualization"
+#~ msgstr "Volumendarstellung"
+
+#~ msgid "Window/Level"
+#~ msgstr "Fenster/Niveau"
+
+#~ msgid "Radiolucency Window/Level"
+#~ msgstr "Radioluzenzfenster/-niveau"
+
+#~ msgid "Radiolucency Level"
+#~ msgstr "Radioluzenzniveau"
+
+#~ msgid "/"
+#~ msgstr "/"
+
+#~ msgid "Radiolucency Window"
+#~ msgstr "Radioluzenzfenster"
+
+#~ msgid "Blend Mode"
+#~ msgstr "Mischmodus"
+
+#~ msgid "MIP"
+#~ msgstr "MIP"
+
+#~ msgid "Composite Ramp"
+#~ msgstr "Kompositverlauf"
+
+#~ msgid "Composite Ramp Shaded"
+#~ msgstr "Abgestufter Kompositverlauf"
+
+#~ msgid "RGB Composite"
+#~ msgstr "RGB-Komposit"
+
+#~ msgid "CT Skin"
+#~ msgstr "CT Haut"
+
+#~ msgid "CT Muscle"
+#~ msgstr "CT Muskulatur"
+
+#~ msgid "CT Bone"
+#~ msgstr "CT Knochen"
+
+#~ msgid "Apply"
+#~ msgstr "Anwenden"
+
+#~ msgid "Apply reconstuction"
+#~ msgstr "Rekonstruktion anwenden"
+
+#~ msgid "DataSet 0000/0000"
+#~ msgstr "DataSet 0000/0000"
+
+#~ msgid "Pre-Smooth"
+#~ msgstr "Vorglättung"
+
+#~ msgid "Enable/Disable Smoothing the high resolution input volume data."
+#~ msgstr "Glätten der hochaufgelösten Volumenausgangsdaten ein-/ausschalten."
+
+#~ msgid "Post-Smooth"
+#~ msgstr "Nachglättung"
+
+#~ msgid "Enable/Disable Smoothing the low resolution resampled volume data."
+#~ msgstr ""
+#~ "Glätten der niedrig aufgelösten, berechneten Volumendaten ein-/"
+#~ "ausschalten."
+
+#~ msgid "Sets the resampling resolution"
+#~ msgstr "Resampling-Auflösung festlegen"
+
+#~ msgid "Resampled resolution: 32x32x32, 64x64x64, 128x128x128, 256x256x256"
+#~ msgstr "Resampling-Auflösung: 32x32x32, 64x64x64, 128x128x128, 256x256x256"
+
+#~ msgid "First surface"
+#~ msgstr "Erste Oberfläche"
+
+#~ msgid "Value"
+#~ msgstr "Wert"
+
+#~ msgid "IsoSurface pixel value"
+#~ msgstr "Pixelwert der Iso-Oberfläche"
+
+#~ msgid "CT - Bone"
+#~ msgstr "CT - Knochen"
+
+#~ msgid "CT - Muscle"
+#~ msgstr "CT - Muskulatur"
+
+#~ msgid "CT - Skin"
+#~ msgstr "CT - Haut"
+
+#~ msgid "CT Pressets"
+#~ msgstr "CT Vorgaben"
+
+#~ msgid "Color"
+#~ msgstr "Farbe"
+
+#~ msgid "Rendering color"
+#~ msgstr "Darstellungsfarbe"
+
+#~ msgid "Second surface"
+#~ msgstr "Zweite Oberfläche"
+
+#~ msgid "Enable"
+#~ msgstr "Aktivieren"
+
+#~ msgid "Enable/Disable second surface"
+#~ msgstr "Zweite Oberfläche ein-/ausschalten"
+
+#~ msgid "Color / alpha"
+#~ msgstr "Farbe / Alpha"
+
+#~ msgid "Surface rendering color and transparency"
+#~ msgstr "Farbe und Transparenz der Oberflächendarstellung"
+
+#~ msgid "Transparency level"
+#~ msgstr "Transparenzniveau"
+
+#~ msgid "Apply reconstruction"
+#~ msgstr "Rekonstruktion anwenden"
+
+#~ msgid "Cursor"
+#~ msgstr "Zeiger"
+
+#~ msgid "Reset Camera"
+#~ msgstr "Kamera zurücksetzen"
+
+#~ msgid "Stereo view"
+#~ msgstr "Stereoansicht"
+
+#~ msgid "Demo mode"
+#~ msgstr "Demo-Modus"
+
+#~ msgid "Save Frame"
+#~ msgstr "Einzelbild speichern"
+
+#~ msgid "Save current frame to new serie"
+#~ msgstr "Aktuelles Einzelbild als neue Serie speichern"
+
+#~ msgid "Hide"
+#~ msgstr "Verbergen"
+
+#~ msgid "3D Surface"
+#~ msgstr "3D-Oberfläche"
+
+#~ msgid "Pixel value of first surface doesn't have a valid value"
+#~ msgstr "Pixelwert der ersten Oberfläche ist ungültig"
+
+#~ msgid "Warning"
+#~ msgstr "Achtung"
+
+#~ msgid "Pixel value of second surface doesn't have a valid value"
+#~ msgstr "Pixelwert der zweiten Oberfläche ist ungültig"
+
+#~ msgid "Reset"
+#~ msgstr "Zurücksetzen"
+
+#~ msgid "Radiolucency Window does not have a valid value"
+#~ msgstr "Ungültiger Wert für Radioluzenzfenster"
+
+#~ msgid "Radiolucency Level does not have a valid value"
+#~ msgstr "Ungültiger Wert für Radioluzenzniveau"
+
+#~ msgid "Generating VOIs...."
+#~ msgstr "VOIs werden erstellt …"
+
+#~ msgid " VOIs detected."
+#~ msgstr " VOI ermittelt."
+
+#~ msgid "Computing VOIs...."
+#~ msgstr "VOIs werden berechnet …"
+
+#~ msgid "Done"
+#~ msgstr "Fertiggestellt"
+
+#~ msgid "Aborted"
+#~ msgstr "Abgebrochen"
+
+#~ msgid "Saving frame..."
+#~ msgstr "Einzelbild wird gespeichert …"
+
+#~ msgid "Saving done"
+#~ msgstr "Speichern abgeschlossen"
+
+#~ msgid "Saving failed"
+#~ msgstr "Speichern gescheitert"
+
+#~ msgid "Updating..."
+#~ msgstr "Es wird aktualisiert …"
+
+#~ msgid "Reconstruction internal error"
+#~ msgstr "Interner Rekonstruktionsfehler"
+
+#~ msgid "Update done"
+#~ msgstr "Aktualisierung abgeschlossen"
+
+#~ msgid "3D Volume Reconstruction"
+#~ msgstr "3D-Rekonstruktion"
+
+#~ msgid "3D MIP Reconstruction"
+#~ msgstr "3D-Rekonstruktion"
+
+#~ msgid "3D Surface Reconstruction"
+#~ msgstr "3D-Rekonstruktion"
+
+#~ msgid "Endoscopy"
+#~ msgstr "Endoskopie"
+
+#~ msgid "3D reconstruction"
+#~ msgstr "3D-Rekonstruktion"
+
+#~ msgid "3D orthogonal multi-planar reconstruction (MPR)"
+#~ msgstr "Orthogonale 3D-Multi-Ebenen-Rekonstruktion (MPR)"
+
+#~ msgid "3D maximun intensity projection (MIP)"
+#~ msgstr "3D-MIP (Maximum-Intensity-Projektion)"
+
+#~ msgid "Save changes with medical viewer"
+#~ msgstr "Speichere Änderungen des medizinischen Betrachters"
+
+#~ msgid "%m/%d/%Y"
+#~ msgstr "%d.%m.%Y"
+
+#~ msgid "Select a diagnosis"
+#~ msgstr "Diagnose wählen"
+
+#~ msgid "Select diagnosis"
+#~ msgstr "Diagnose wählen"
+
+#~ msgid "Select diagnosis file"
+#~ msgstr "Diagnosendatei wählen"
+
+#~ msgid "Physician"
+#~ msgstr "Arzt"
+
+#~ msgid "Time"
+#~ msgstr "Zeit"
+
+#~ msgid "Date"
+#~ msgstr "Datum"
+
+#~ msgid "Description"
+#~ msgstr "Beschreibung"
+
+#~ msgid "UID"
+#~ msgstr "UID"
+
+#~ msgid "Create new diagnosis"
+#~ msgstr "Erzeuge neue Diagnose"
+
+#~ msgid "Color Map"
+#~ msgstr "Farbkarte"
+
+#~ msgid "Invert color map"
+#~ msgstr "Farbkarte umkehren"
+
+#~ msgid ""
+#~ "Errors have occurred while trying to save the files in the series\n"
+#~ "verify that the disk is not full and that has write permissions"
+#~ msgstr ""
+#~ "Fehler sind beim Speicher der Dateien als Serie aufgetreten.\n"
+#~ "Stellen Sie sicher, daß die Festplatte nicht voll und beschreibbar ist."
+
+#~ msgid "Layout Setup"
+#~ msgstr "Einstellung zur Anordnung"
+
+#~ msgid "Disencage view"
+#~ msgstr "Anzeige freistellen"
+
+#~ msgid "Rotate 90"
+#~ msgstr "90° drehen"
+
+#~ msgid " Counter-ClockWise"
+#~ msgstr " gegen den Uhrzeigersinn"
+
+#~ msgid " ClockWise"
+#~ msgstr " im Uhrzeigersinn"
+
+#~ msgid "Flip Vertical"
+#~ msgstr "Vertikal spiegeln"
+
+#~ msgid "Flip Horizontal"
+#~ msgstr "Horizontal spiegeln"
+
+#~ msgid "Disengage Vista"
+#~ msgstr "Darstellung entkoppeln"
+
+#~ msgid "Fit View"
+#~ msgstr "Darsteller angleichen"
+
+#~ msgid "Reconstruction mode not implemented:\n"
+#~ msgstr "Nicht implementierter Rekonstruktionsmodus:\n"
+
+#~ msgid "Reconstruction mode not supported:\n"
+#~ msgstr "Nicht unterstützter Rekonstruktionsmodus:\n"
+
+#~ msgid "Show/Hide corner annotations"
+#~ msgstr "Ecknotizen zeigen/verbergen"
+
+#~ msgid ""
+#~ "\n"
+#~ "* Concatenation of patient name and surnames can't be higher than 61."
+#~ msgstr ""
+#~ "\n"
+#~ "* Familien- und Vornamen dürfen zusammen nicht mehr als 61 Zeichen "
+#~ "enthalten."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The format of the height in centimeters is not correct. "
+#~ msgstr ""
+#~ "\n"
+#~ "* Format der Größenangabe in cm unzulässig. "
+
+#~ msgid ""
+#~ "\n"
+#~ "* The format of the weight is not correct. Valid range is between 0 and "
+#~ "400 Kg."
+#~ msgstr ""
+#~ "\n"
+#~ "* Format der Gewichtsangabe ungültig. Zulässiger Bereich 0 bis 400kg."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The patient ID is required."
+#~ msgstr ""
+#~ "\n"
+#~ "* Die Patienten-ID ist erforderlich."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The patient's birth date is after the date of study"
+#~ msgstr ""
+#~ "\n"
+#~ "* Der Patient wurde nach Erstellung der Studie geboren"
+
+#~ msgid ""
+#~ "\n"
+#~ "Would you like to retry?"
+#~ msgstr ""
+#~ "\n"
+#~ "Erneut versuchen ?"
+
+#~ msgid "(ID or medical history number)"
+#~ msgstr "(ID oder Aktennummer)"
+
+#~ msgid "3D Volume"
+#~ msgstr "3D-Volumen"
+
+#~ msgid "Birthday"
+#~ msgstr "Geburtstag"
+
+#~ msgid ""
+#~ "Can not upload to the PACS:\n"
+#~ "Internal Error"
+#~ msgstr ""
+#~ "Kann nicht ins PACS laden:\n"
+#~ "Interner Fehler"
+
+#~ msgid "DICOM Files (*.dcm) | *.dcm"
+#~ msgstr "DICOM-Dateien (*.dcm) | *.dcm"
+
+#~ msgid "DICOM Files (*.dcm)|*.dcm"
+#~ msgstr "DICOM-Dateien (*.dcm)|*.dcm"
+
+#~ msgid "Demographic data"
+#~ msgstr "Personenstammdaten"
+
+#~ msgid "Error validating fields"
+#~ msgstr "Fehler beim Überprüfen der Felder"
+
+#~ msgid "Female"
+#~ msgstr "Weiblich"
+
+#~ msgid "Identificator *"
+#~ msgstr "Identifikator *"
+
+#~ msgid "Importing..."
+#~ msgstr "Import läuft..."
+
+#~ msgid "Include in existing series"
+#~ msgstr "Zu existierender Studie hinzufügen"
+
+#~ msgid "Kg"
+#~ msgstr "kg"
+
+#~ msgid "Layers Overlays"
+#~ msgstr "Schichten-Overlays"
+
+#~ msgid "Male"
+#~ msgstr "Männlich"
+
+#~ msgid "Name"
+#~ msgstr "Name"
+
+#~ msgid "Overview data of DICOM files"
+#~ msgstr "Übersichtsdaten der DICOM-Dateien"
+
+#~ msgid "Patient"
+#~ msgstr "Patient"
+
+#~ msgid "Series reference"
+#~ msgstr "Serienreferenz"
+
+#~ msgid "Sex"
+#~ msgstr "Geschlecht"
+
+#~ msgid "Step 1 of 3: Importing images"
+#~ msgstr "Schritt 1/3: Bilder importieren"
+
+#~ msgid "Step 2 of 3: Copying images"
+#~ msgstr "Schritt 2/3: Bilder kopieren"
+
+#~ msgid "Step 3 of 3: Uploading Images"
+#~ msgstr "Schritt 3/3: Bilder hochladen"
+
+#~ msgid "Study Details"
+#~ msgstr "Studiendetails"
+
+#~ msgid "Surname 1"
+#~ msgstr "Vorname 1"
+
+#~ msgid "Surname 2"
+#~ msgstr "Vorname 2"
+
+#~ msgid "The following errors have occurred when validating fields"
+#~ msgstr "Die folgenden Fehler traten bei der Feldprüfung auf"
+
+#~ msgid "Weight"
+#~ msgstr "Gewicht"
+
+#~ msgid "cm"
+#~ msgstr "cm"
+
+#~ msgid "Comment:"
+#~ msgstr "Kommentar:"
+
+#~ msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+#~ msgstr ""
+#~ "Fehler beim Extrahieren des PDFs, Ginkgo CADx kann dieses Format nicht "
+#~ "laden"
+
+#~ msgid "Left"
+#~ msgstr "Links"
+
+#~ msgid "PDF files extracted successfully..."
+#~ msgstr "PDF-Dateien wurden erfolgreich extrahiert …"
+
+#~ msgid "There isn't any pdf reader registered in the system"
+#~ msgstr "Im System ist kein PDF-Betrachter festgelegt"
+
+#~ msgid "Uploading..."
+#~ msgstr "Es wird hochgeladen …"
+
+#~ msgid "Visualization blend type"
+#~ msgstr "Visualisierungs-Übergangstyp"
+
+#~ msgid "Visualization blending mode"
+#~ msgstr "Visualisierungs-Übergangsmodus"
diff --git a/visualizator/lang/el/visualizator.mo b/visualizator/lang/el/visualizator.mo
new file mode 100644
index 0000000..2f54c9e
Binary files /dev/null and b/visualizator/lang/el/visualizator.mo differ
diff --git a/visualizator/lang/el/visualizator.po b/visualizator/lang/el/visualizator.po
new file mode 100644
index 0000000..3c7c515
--- /dev/null
+++ b/visualizator/lang/el/visualizator.po
@@ -0,0 +1,372 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: FULL NAME <EMAIL at ADDRESS>\n"
+"POT-Creation-Date: 2014-06-11 15:54+0100\n"
+"PO-Revision-Date: 2014-06-11 15:54+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Ελληνικά, Σύγχρονα <opensuse-translation-el at opensuse.org>\n"
+"Language: el\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: ../../\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Info"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+msgid "Ginkgo CADx viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+msgid "Simple importation of images"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+msgid "Medical viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+msgid "Waveform viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+msgid "Default importer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+msgid "Ginkgo CADx Image Report"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+msgid "Medical Image Viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+#, fuzzy
+msgid "Error opening study"
+msgstr "σφάλμα"
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+msgid "Performing tasks of integration ..."
+msgstr ""
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+msgid "There are no overlays on this image"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:380
+msgid "We are working to support "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:489
+msgid "Measurements not found"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:589
+msgid "ECG format not supported"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "QTc Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr ""
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+msgid "Overlay layers"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:207
+msgid "3D MPR"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:213
+msgid "MIP 3D"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:219
+msgid "3D volume rendering"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:225
+msgid "3D surface rendering"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:232
+msgid "3D endoscopy"
+msgstr ""
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:595
+msgid "Length"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:600
+msgid "Points (I)"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:607
+msgid "Points (M)"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+#, fuzzy
+msgid "Error configuring the grid"
+msgstr "σφάλμα"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+#, fuzzy
+msgid "Error: Internal error."
+msgstr "σφάλμα"
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+#, fuzzy
+msgid "Area      : "
+msgstr "Περιοχή"
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+msgid "Position   : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+msgid "RGB ("
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+#, fuzzy
+msgid "Area:"
+msgstr "Περιοχή"
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+msgid "Show/Hide metadata"
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error loading study with ecg view"
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+#, fuzzy
+msgid "Error"
+msgstr "σφάλμα"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+msgid "Uploading to the PACS ..."
+msgstr ""
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+msgid "Upload series to PACS..."
+msgstr ""
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, c-format
+msgid "%d series"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.h:108
+msgid "Unknown"
+msgstr ""
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+msgid "Synchronize..."
+msgstr ""
+
+#~ msgid "Speed"
+#~ msgstr "Ταχύτητα"
+
+#~ msgid "Right"
+#~ msgstr "Ύψος"
+
+#~ msgid "Resolution"
+#~ msgstr "Ανάλυση"
+
+#~ msgid "Hide"
+#~ msgstr "Απόκρυψη"
+
+#~ msgid "Warning"
+#~ msgstr "Προσοχή"
+
+#~ msgid "Kg"
+#~ msgstr "Kg"
+
+#~ msgid "Name"
+#~ msgstr "Όνομα"
+
+#~ msgid "Rotate 90"
+#~ msgstr "Περιστροφή 90"
+
+#~ msgid "Sex"
+#~ msgstr "Φύλο"
+
+#~ msgid "Time"
+#~ msgstr "Ώρα"
+
+#~ msgid "Weight"
+#~ msgstr "Βάρος"
+
+#~ msgid "cm"
+#~ msgstr "cm"
diff --git a/visualizator/lang/es/visualizator.mo b/visualizator/lang/es/visualizator.mo
new file mode 100644
index 0000000..47f6c45
Binary files /dev/null and b/visualizator/lang/es/visualizator.mo differ
diff --git a/visualizator/lang/es/visualizator.po b/visualizator/lang/es/visualizator.po
new file mode 100644
index 0000000..eeaab6c
--- /dev/null
+++ b/visualizator/lang/es/visualizator.po
@@ -0,0 +1,1072 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-06-11 15:54+0100\n"
+"PO-Revision-Date: 2014-06-11 15:54+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Metaemotion <ginkgo at metaemotion.com>\n"
+"Language: es_ES\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: ../../\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr "No se pudo cargar recurso de bitmap PNG"
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr "Ginkgo CADx visualizator es Open Source"
+
+#: visualizator.cpp:62
+msgid "Info"
+msgstr "Info"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+msgid "Ginkgo CADx viewer"
+msgstr "Visor Ginkgo CADx"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+msgid "Simple importation of images"
+msgstr "Importación de atención primaria"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+msgid "Medical viewer"
+msgstr "Visor de imágenes médicas"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+msgid "Waveform viewer"
+msgstr "Visor de electrocardiogramas"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+msgid "Default importer"
+msgstr "Importador por defecto"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+msgid "Ginkgo CADx Image Report"
+msgstr "Informe de imagen convencional"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+msgid "Medical Image Viewer"
+msgstr "Visor de imágenes médicas"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+msgid "Error opening study"
+msgstr "Error al abrir el estudio"
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+msgid "Performing tasks of integration ..."
+msgstr "Realizando tareas de integración..."
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+msgid "There are no overlays on this image"
+msgstr "No existen capas overlays en esta imagen"
+
+#: visualizator/estudios/ecgstudy.cpp:380
+msgid "We are working to support "
+msgstr "Estamos trabajando para soportar "
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr "Tasa de vent:      "
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr " BPM"
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr "PR int:      "
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr " ms"
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr "QRS dur:      "
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr "QT\\QTc:      "
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr "P-R-T axes: "
+
+#: visualizator/estudios/ecgstudy.cpp:489
+msgid "Measurements not found"
+msgstr "Métricas no encontradas"
+
+#: visualizator/estudios/ecgstudy.cpp:589
+msgid "ECG format not supported"
+msgstr "Formato de ECG no soportado"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr "Intervalo RR"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr "PP Interval"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "QTc Interval"
+msgstr "Intervalo QTc"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr "Tasa de vent"
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+#, fuzzy
+msgid "Rule \tCtrl+R"
+msgstr "Regla \tCtrl+R"
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+msgid "Overlay layers"
+msgstr "Capas overlays"
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr "Reconstrucción 3D/4D"
+
+#: visualizator/tools/reconstructiontool.cpp:207
+msgid "3D MPR"
+msgstr "MPR 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:213
+msgid "MIP 3D"
+msgstr "MIP 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:219
+msgid "3D volume rendering"
+msgstr "Reconstrucción de volumen 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:225
+msgid "3D surface rendering"
+msgstr "Reconstrucción de superficies 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:232
+msgid "3D endoscopy"
+msgstr "Endoscopia 3D"
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr ""
+"Error: Se ha agotado la memoria del sistema y no se ha podido cargar la "
+"imagen. Cierre algunos estudios para liberar memoria."
+
+#: visualizator/widgets/wecgrule.cpp:595
+#, fuzzy
+msgid "Length"
+msgstr "Longitud"
+
+#: visualizator/widgets/wecgrule.cpp:600
+#, fuzzy
+msgid "Points (I)"
+msgstr "Puntos (I)"
+
+#: visualizator/widgets/wecgrule.cpp:607
+#, fuzzy
+msgid "Points (M)"
+msgstr "Puntos (M)"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr ""
+"Se ha agotado la memoria de vídeo y no se puede crear la rejilla. Cierre "
+"algunos estudios para liberar memoria."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid "Error configuring the grid"
+msgstr "Error al configurar la rejilla"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr "Corte: "
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr "Opciones de visualización"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr "Sincronizar/Des sincronizar"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+"Error: Se ha agotado la memoria del sistema y no se ha podido cargar la "
+"imagen. Cierre algunos estudios para liberar memoria."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr "Destruir vista"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+msgid "Error: Internal error."
+msgstr "Error: Error interno."
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+msgid "Area      : "
+msgstr "Área     : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr "indeterminada"
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr "Perímetro : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+msgid "Position   : "
+msgstr "Posición   : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+msgid "RGB ("
+msgstr "RGB ("
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr "Valoración : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr " [ dNorm = "
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr "Pos. Centroide : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+msgid "Area:"
+msgstr "Área      : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr "Perímetro : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr "Valoración: med="
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ", desv ="
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+msgid "Show/Hide metadata"
+msgstr "Mostrar/Ocultar metadatos"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error loading study with ecg view"
+msgstr "Error al cargar el estudio con la vista ECG"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error"
+msgstr "Error"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+msgid "Uploading to the PACS ..."
+msgstr "Subiendo al PACS ..."
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+msgid "Upload series to PACS..."
+msgstr "Subir series al PACS ..."
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, c-format
+msgid "%d series"
+msgstr "%d series"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr "Seleccione las vistas que desea sincronizar con la actual"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr "Aceptar"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr "Metadatos"
+
+#: visualizator/estudios/ecgstudy.h:108
+msgid "Unknown"
+msgstr "Desconocido"
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr "Extensión visualizator"
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+msgid "Synchronize..."
+msgstr "Sincronizar..."
+
+#~ msgid "Play"
+#~ msgstr "Play"
+
+#~ msgid "Speed"
+#~ msgstr "Velocidad"
+
+#~ msgid "Loop"
+#~ msgstr "Bucle"
+
+#~ msgid "Repeat on end"
+#~ msgstr "Repetir al llegar al final"
+
+#~ msgid "Start playback"
+#~ msgstr "Comenzar la reproducción"
+
+#~ msgid "Stop"
+#~ msgstr "Stop"
+
+#~ msgid "End playback"
+#~ msgstr "Terminar la reproducción"
+
+#~ msgid "Unable to load PNG image resource"
+#~ msgstr "No se pudo cargar el recurso de imagen PNG"
+
+#~ msgid "Unable to load GIF animation resource"
+#~ msgstr "No se pudo cargar el recurso de animación GIF"
+
+#~ msgid "Patient: "
+#~ msgstr "Paciente: "
+
+#~ msgid "Patient Id: "
+#~ msgstr "Id paciente: "
+
+#~ msgid "Sexo"
+#~ msgstr "Sexo"
+
+#~ msgid "Modality: "
+#~ msgstr "Modalidad: "
+
+#~ msgid "Comment:"
+#~ msgstr "Comentario:"
+
+#~ msgid "Image:"
+#~ msgstr "Imagen:"
+
+#~ msgid "Right"
+#~ msgstr "Derecha"
+
+#~ msgid "Left"
+#~ msgstr "Izquierda"
+
+#~ msgid "Voxel:"
+#~ msgstr "Vóxel:"
+
+#~ msgid "Image without metric information"
+#~ msgstr "Imagen sin información métrica"
+
+#~ msgid "Slice thickness:"
+#~ msgstr "Grosor del corte:"
+
+#~ msgid "Made with %s"
+#~ msgstr "Hecho con %s"
+
+#~ msgid "Position:"
+#~ msgstr "Posición:"
+
+#~ msgid "Value:"
+#~ msgstr "Valor:"
+
+#~ msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+#~ msgstr "Error al extraer el pdf, Ginkgo CADx no puede cargar este formato"
+
+#~ msgid "There isn't any pdf reader registered in the system"
+#~ msgstr "No existe ningún lector de pdf registrado en el sistema"
+
+#~ msgid "PDF files extracted successfully..."
+#~ msgstr "Ficheros PDF extraídos correctamente..."
+
+#~ msgid "Study"
+#~ msgstr "Estudio"
+
+#~ msgid "DICOM Tags"
+#~ msgstr "Tags DICOM"
+
+#~ msgid "Uploading..."
+#~ msgstr "Subiendo..."
+
+#~ msgid "Surface settings"
+#~ msgstr "Configuración de superficie"
+
+#~ msgid "Quality"
+#~ msgstr "Calidad"
+
+#~ msgid "Smooth"
+#~ msgstr "Suavizado"
+
+#~ msgid "Resolution"
+#~ msgstr "Resolución"
+
+#~ msgid "Volume visualization resolution (25-100%)"
+#~ msgstr "Resolución de visualización del volumen (25-100%)"
+
+#~ msgid "Surfaces"
+#~ msgstr "Superficies"
+
+#~ msgid "Volume visualization"
+#~ msgstr "Visualización del volumen"
+
+#~ msgid "Window/Level"
+#~ msgstr "Window/Level"
+
+#~ msgid "Radiolucency Window/Level"
+#~ msgstr "Niveles Window/Level de radiolucencia"
+
+#~ msgid "Radiolucency Level"
+#~ msgstr "Nivel de radiolucencia"
+
+#~ msgid "/"
+#~ msgstr "/"
+
+#~ msgid "Radiolucency Window"
+#~ msgstr "Ventana de radiolucencia"
+
+#~ msgid "Blend Mode"
+#~ msgstr "Modo de fusión"
+
+#~ msgid "Visualization blend type"
+#~ msgstr "Tipo de fusión"
+
+#~ msgid "MIP"
+#~ msgstr "MIP"
+
+#~ msgid "Composite Ramp"
+#~ msgstr "Rampa compuesta"
+
+#~ msgid "Composite Ramp Shaded"
+#~ msgstr "Rampa compuesta sombreado"
+
+#~ msgid "RGB Composite"
+#~ msgstr "RGB compuesto"
+
+#~ msgid "CT Skin"
+#~ msgstr "CT Piel"
+
+#~ msgid "CT Muscle"
+#~ msgstr "CT Músculo"
+
+#~ msgid "CT Bone"
+#~ msgstr "CT Hueso"
+
+#~ msgid "Visualization blending mode"
+#~ msgstr "Modo de visualización de la fusión"
+
+#~ msgid "Apply"
+#~ msgstr "Aplicar"
+
+#~ msgid "Apply reconstuction"
+#~ msgstr "Aplicar reconstrucción"
+
+#~ msgid "DataSet 0000/0000"
+#~ msgstr "DataSet 0000/0000"
+
+#~ msgid "Pre-Smooth"
+#~ msgstr "Pre-Suavizado"
+
+#~ msgid "Enable/Disable Smoothing the high resolution input volume data."
+#~ msgstr ""
+#~ "Habilitar/Deshabilitar el suavizado del volumen de entrada de alta "
+#~ "resolución."
+
+#~ msgid "Post-Smooth"
+#~ msgstr "Post-Suavizado"
+
+#~ msgid "Enable/Disable Smoothing the low resolution resampled volume data."
+#~ msgstr ""
+#~ "Habilitar/Deshabilitar el suavizado del volumen muestreado de baja/media "
+#~ "resolución."
+
+#~ msgid "Sets the resampling resolution"
+#~ msgstr "Establece la resolución de re-muestreado"
+
+#~ msgid "Resampled resolution: 32x32x32, 64x64x64, 128x128x128, 256x256x256"
+#~ msgstr ""
+#~ "Resolución de re-muestreado: 32x32x32, 64x64x64, 128x128x128, 256x256x256"
+
+#~ msgid "First surface"
+#~ msgstr "Primera superficie"
+
+#~ msgid "Value"
+#~ msgstr "Valor"
+
+#~ msgid "IsoSurface pixel value"
+#~ msgstr "Valor de pixel para la ISO-Superficie"
+
+#~ msgid "CT - Bone"
+#~ msgstr "CT - Hueso"
+
+#~ msgid "CT - Muscle"
+#~ msgstr "CT - Músculo"
+
+#~ msgid "CT - Skin"
+#~ msgstr "CT - Piel"
+
+#~ msgid "CT Pressets"
+#~ msgstr "Ajustes de CTs"
+
+#~ msgid "Color"
+#~ msgstr "Color"
+
+#~ msgid "Rendering color"
+#~ msgstr "Color"
+
+#~ msgid "Second surface"
+#~ msgstr "Segunda superficie"
+
+#~ msgid "Enable"
+#~ msgstr "Habilitar"
+
+#~ msgid "Enable/Disable second surface"
+#~ msgstr "Habilitar/Deshabilitar segunda superficie"
+
+#~ msgid "Color / alpha"
+#~ msgstr "Color / alpha"
+
+#~ msgid "Surface rendering color and transparency"
+#~ msgstr "Color y transparencia de la superficie"
+
+#~ msgid "Transparency level"
+#~ msgstr "Nivel de transparencia"
+
+#~ msgid "Apply reconstruction"
+#~ msgstr "Aplicar reconstrucción"
+
+#~ msgid "Cursor"
+#~ msgstr "Cursor"
+
+#~ msgid "Reset Camera"
+#~ msgstr "Resetear cámara"
+
+#~ msgid "Stereo view"
+#~ msgstr "Vista estereoscópica"
+
+#~ msgid "Demo mode"
+#~ msgstr "Modo demostración"
+
+#~ msgid "Save Frame"
+#~ msgstr "Guardar frame"
+
+#~ msgid "Save current frame to new serie"
+#~ msgstr "Guardar frame en una nueva serie"
+
+#~ msgid "Hide"
+#~ msgstr "Ocultar"
+
+#~ msgid "3D Surface"
+#~ msgstr "Superficie 3D"
+
+#~ msgid "Pixel value of first surface doesn't have a valid value"
+#~ msgstr "El valor de pixel de la primera superficie no tiene un valor válido"
+
+#~ msgid "Warning"
+#~ msgstr "Atención"
+
+#~ msgid "Pixel value of second surface doesn't have a valid value"
+#~ msgstr "El valor de pixel de la segunda superficie no tiene un valor válido"
+
+#~ msgid "Reset"
+#~ msgstr "Reset"
+
+#~ msgid "Radiolucency Window does not have a valid value"
+#~ msgstr "El valor ventana de radiolucencia no es válido."
+
+#~ msgid "Radiolucency Level does not have a valid value"
+#~ msgstr "El valor ventana de nivel no es válido."
+
+#~ msgid "Generating VOIs...."
+#~ msgstr "Generando VOIs..."
+
+#~ msgid " VOIs detected."
+#~ msgstr " VOIs detectadas."
+
+#~ msgid "Computing VOIs...."
+#~ msgstr "Procesando VOIs..."
+
+#~ msgid "Done"
+#~ msgstr "Hecho"
+
+#~ msgid "Aborted"
+#~ msgstr "Abortado"
+
+#~ msgid "Saving frame..."
+#~ msgstr "Guardando frame..."
+
+#~ msgid "Saving done"
+#~ msgstr "Guardado completado"
+
+#~ msgid "Saving failed"
+#~ msgstr "Fallo al guardar"
+
+#~ msgid "Updating..."
+#~ msgstr "Actualizando..."
+
+#~ msgid "Reconstruction internal error"
+#~ msgstr "Error interno en la reconstrucción"
+
+#~ msgid "Update done"
+#~ msgstr "Actualización completada"
+
+#~ msgid "3D Volume Reconstruction"
+#~ msgstr "Reconstrucción de volumen 3D"
+
+#~ msgid "3D MIP Reconstruction"
+#~ msgstr "Reconstrucción MIP 3D"
+
+#~ msgid "3D Surface Reconstruction"
+#~ msgstr "Reconstrucción de superficies 3D"
+
+#~ msgid "Endoscopy"
+#~ msgstr "Endoscopia"
+
+#~ msgid "3D reconstruction"
+#~ msgstr "Reconstrucción 3D"
+
+#~ msgid "3D orthogonal multi-planar reconstruction (MPR)"
+#~ msgstr "Reconstrucción ortogonal multi-planar 3D (MPR)"
+
+#~ msgid "3D maximun intensity projection (MIP)"
+#~ msgstr "Proyección 3D de máxima intensidad (MIP)"
+
+#~ msgid "Save changes with medical viewer"
+#~ msgstr "Guardar cambios con el visor"
+
+#~ msgid "Color Map"
+#~ msgstr "Mapa de color"
+
+#~ msgid "Invert color map"
+#~ msgstr "Invertir mapa de color"
+
+#~ msgid "%m/%d/%Y"
+#~ msgstr "%d/%m/%Y"
+
+#~ msgid "Select a diagnosis"
+#~ msgstr "Seleccione un diagnóstico"
+
+#~ msgid "Select diagnosis"
+#~ msgstr "Seleccionar diagnóstico"
+
+#~ msgid "Select diagnosis file"
+#~ msgstr "Seleccione un diagnóstico"
+
+#~ msgid "Physician"
+#~ msgstr "Médico"
+
+#~ msgid "Time"
+#~ msgstr "Hora"
+
+#~ msgid "Date"
+#~ msgstr "Fecha"
+
+#~ msgid "Description"
+#~ msgstr "Descripción"
+
+#~ msgid "UID"
+#~ msgstr "UID"
+
+#~ msgid "Create new diagnosis"
+#~ msgstr "Crear nuevo diagnóstico"
+
+#~ msgid "Medical Diagnostic"
+#~ msgstr "Diagnóstico de atención primaria"
+
+#~ msgid ""
+#~ "Errors have occurred while trying to save the files in the series\n"
+#~ "verify that the disk is not full and that has write permissions"
+#~ msgstr ""
+#~ "Han ocurrido errores al intentar guardar los ficheros de la serie.\n"
+#~ "Compruebe que el disco no esta lleno y que tiene permisos de escritura"
+
+#~ msgid "Layout Setup"
+#~ msgstr "Configurar layout"
+
+#~ msgid "Disencage view"
+#~ msgstr "Desencajar vista"
+
+#~ msgid "Rotate 90"
+#~ msgstr "Girar 90"
+
+#~ msgid " Counter-ClockWise"
+#~ msgstr " a la izquierda"
+
+#~ msgid " ClockWise"
+#~ msgstr " a la derecha"
+
+#~ msgid "Flip Vertical"
+#~ msgstr "Voltear verticalmente"
+
+#~ msgid "Flip Horizontal"
+#~ msgstr "Voltear horizontalmente"
+
+#~ msgid "Disengage Vista"
+#~ msgstr "Desencajar vista"
+
+#~ msgid "Fit View"
+#~ msgstr "Encajar vista"
+
+#~ msgid "Reconstruction mode not implemented:\n"
+#~ msgstr "Modo de reconstrucción no implementado:\n"
+
+#~ msgid "Reconstruction mode not supported:\n"
+#~ msgstr "Modo de reconstrucción no soportado:\n"
+
+#~ msgid "Show/Hide corner annotations"
+#~ msgstr "Mostrar/Ocultar anotaciones de las esquinas"
+
+#~ msgid "Step 1 of 3: Importing images"
+#~ msgstr "Paso 1 de 3: Importando imágenes"
+
+#~ msgid "Step 2 of 3: Copying images"
+#~ msgstr "Paso 2 de 3: Copiando imágenes"
+
+#~ msgid "Step 3 of 3: Uploading images"
+#~ msgstr "Paso 3 de 3: Subiendo imágenes"
+
+#~ msgid "Import process failed:"
+#~ msgstr "El proceso de importación ha fallado:"
+
+#~ msgid ""
+#~ "\n"
+#~ "Would you like to retry?"
+#~ msgstr ""
+#~ "\n"
+#~ "¿Desea reintentarlo?"
+
+#~ msgid "Importing..."
+#~ msgstr "Importando..."
+
+#~ msgid "Unkown error in dicomization process"
+#~ msgstr "Error desconocido en el proceso de dicomización"
+
+#~ msgid "Can not upload to the PACS:\n"
+#~ msgstr "No se puede subir al PACS:\n"
+
+#~ msgid ""
+#~ "Can not upload to the PACS:\n"
+#~ "Internal Error"
+#~ msgstr ""
+#~ "No se puede subir al PACS:\n"
+#~ "Error Interno"
+
+#~ msgid "Overview data of DICOM files"
+#~ msgstr "Datos generales de los ficheros DICOM"
+
+#~ msgid "DICOM data from the files to be generated can be populated"
+#~ msgstr "Puede rellenar los datos DICOM de los ficheros que se generarán"
+
+#~ msgid ""
+#~ "\n"
+#~ "* The patient ID is required."
+#~ msgstr ""
+#~ "\n"
+#~ "* El Identificador de paciente es obligatorio."
+
+#~ msgid ""
+#~ "\n"
+#~ "* Concatenation of patient name and surnames can't be higher than 61."
+#~ msgstr ""
+#~ "\n"
+#~ "* La concatenación del nombre del paciente y de sus apellidos no puede "
+#~ "ser mayor a 61 caracteres."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The format of the height in centimeters is not correct. "
+#~ msgstr ""
+#~ "\n"
+#~ "* El formato de la altura en centímetros no es correcto. Rango válido: "
+#~ "entre 0 y 400 cm."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The patient's birth date is after the date of study"
+#~ msgstr ""
+#~ "\n"
+#~ "* La fecha de nacimiento del paciente es posterior a la fecha del estudio"
+
+#~ msgid ""
+#~ "\n"
+#~ "* The format of the weight is not correct. Valid range is between 0 and "
+#~ "400 Kg."
+#~ msgstr ""
+#~ "\n"
+#~ "* El formato del peso no es correcto. Rango válido: entre 0 y 400 Kg."
+
+#~ msgid "The following errors have occurred when validating fields"
+#~ msgstr "Han ocurrido los siguientes errores al validar los campos"
+
+#~ msgid "Error validating fields"
+#~ msgstr "Error al validar los campos"
+
+#~ msgid "Refer Study"
+#~ msgstr "Referenciar estudio"
+
+#~ msgid "DICOM Files (*.dcm)|*.dcm"
+#~ msgstr "Ficheros DICOM (*.dcm)|*.dcm"
+
+#~ msgid "Series reference"
+#~ msgstr "Referenciar serie"
+
+#~ msgid "DICOM Files (*.dcm) | *.dcm"
+#~ msgstr "Ficheros DICOM (*.dcm)|*.dcm"
+
+#~ msgid "Demographic data"
+#~ msgstr "Datos demográficos"
+
+#~ msgid "Identificator *"
+#~ msgstr "Identificador *"
+
+#~ msgid "(ID or medical history number)"
+#~ msgstr "(DNI o Número de historia clínica)"
+
+#~ msgid "Name"
+#~ msgstr "Nombre"
+
+#~ msgid "Surname 1"
+#~ msgstr "Apellido 1"
+
+#~ msgid "Surname 2"
+#~ msgstr "Apellido 2"
+
+#~ msgid "Birthday"
+#~ msgstr "Fecha nacimiento"
+
+#~ msgid "Sex"
+#~ msgstr "Sexo"
+
+#~ msgid "Male"
+#~ msgstr "Masculino"
+
+#~ msgid "Female"
+#~ msgstr "Femenino"
+
+#~ msgid "Others"
+#~ msgstr "Otros"
+
+#~ msgid "Study Details"
+#~ msgstr "Datos del estudio"
+
+#~ msgid "Patient"
+#~ msgstr "Paciente"
+
+#~ msgid "Kg"
+#~ msgstr "Kg"
+
+#~ msgid "Height"
+#~ msgstr "Altura"
+
+#~ msgid "cm"
+#~ msgstr "cm"
+
+#~ msgid "Include in existing series"
+#~ msgstr "Incluir en serie existente"
+
+#~ msgid "3D Volume"
+#~ msgstr "Volumen 3D"
+
+#~ msgid "Visualizator"
+#~ msgstr "Visualizator"
+
+#~ msgid "Layers Overlays"
+#~ msgstr "Capas Overlays"
+
+#~ msgid "Do you want to retry?"
+#~ msgstr "¿Desea reintentarlo?"
+
+#~ msgid "Basic templates"
+#~ msgstr "Plantillas básicas"
+
+#~ msgid "Visualization Module"
+#~ msgstr "Módulo de visualización DICOM"
+
+#~ msgid "Select Diagnosis"
+#~ msgstr "Seleccionar Diagnóstico"
+
+#~ msgid "Primary Care Report"
+#~ msgstr "Informe de atención primaria"
+
+#~ msgid "Primary Care"
+#~ msgstr "Atención Primaria"
+
+#~ msgid "S.A.C. View"
+#~ msgstr "Vista S.A.C."
+
+#~ msgid "<"
+#~ msgstr "<"
+
+#~ msgid "First"
+#~ msgstr "Primero"
+
+#~ msgid "Pixel value:"
+#~ msgstr "Valor de pixel:"
+
+#~ msgid "-120"
+#~ msgstr "-120"
+
+#~ msgid "Second"
+#~ msgstr "Segundo"
+
+#~ msgid "40"
+#~ msgstr "40"
+
+#~ msgid "Third"
+#~ msgstr "Tercero"
+
+#~ msgid "400"
+#~ msgstr "400"
+
+#~ msgid "StudyInstanceUID"
+#~ msgstr "StudyInstanceUID"
+
+#~ msgid "Derived Study's StudyInstanceUID"
+#~ msgstr "StudyInstanceUID del estudio derivado"
+
+#~ msgid "Accession Number"
+#~ msgstr "Accession Number"
+
+#~ msgid "WADO Image"
+#~ msgstr "Imagen WADO"
+
+#~ msgid "Rotate Left (CounterClockWise, AntiClockWise: CCW, ACW)"
+#~ msgstr "Rotar Izquierda "
+
+#~ msgid ""
+#~ "There was an error writing in configured DICOM directory, make sure you "
+#~ "have space and permissions on the directory."
+#~ msgstr ""
+#~ "Se ha producido un error al escribir en el directorio de DICOM "
+#~ "configurado, compruebe que tiene espacio disponible y permisos sobre el "
+#~ "directorio."
+
+#~ msgid "Failed to load study"
+#~ msgstr "Error al cargar el estudio"
+
+#~ msgid "Error loading:"
+#~ msgstr "Error al cargar: "
+
+#~ msgid "Internal Error loading study"
+#~ msgstr "Error interno al cargar el estudio"
+
+#~ msgid "Synchronize"
+#~ msgstr "Sincronizar"
+
+#~ msgid ""
+#~ "Error: out of memory video system and has not been able to recalibrate "
+#~ "the image. Close some studies to free memory."
+#~ msgstr ""
+#~ "Error: Se ha agotado la memoria de video del sistema y no se ha podido "
+#~ "recalibrar la imagen. Cierre algunos estudios para liberar memoria."
+
+#~ msgid "Views"
+#~ msgstr "Vistas"
+
+#~ msgid "Seleccione las vistas que desea sincronizar con la actual"
+#~ msgstr "Seleccione las "
+
+#~ msgid "Original Study's StudyInstanceUID"
+#~ msgstr "StudyInstanceUID del estudio original"
+
+#~ msgid "Referencing existing study"
+#~ msgstr "Referenciar estudio existente"
+
+#~ msgid "Select the diagnosis you want to open"
+#~ msgstr "Seleccione el diagnóstico que desea abrir"
+
+#~ msgid "Destruir View"
+#~ msgstr "Destruir Vista"
+
+#~ msgid "Descripción"
+#~ msgstr "Descripción"
+
+#~ msgid "Desencajar Vista"
+#~ msgstr "Desencajar Vista"
+
+#~ msgid "Perímetro : "
+#~ msgstr "Perímetro : "
+
+#~ msgid "Posición   : "
+#~ msgstr "Posición   : "
+
+#~ msgid "Position   :  "
+#~ msgstr "Posición   : "
+
+#~ msgid "Vista S.A.C."
+#~ msgstr "Vista S.A.C."
+
+#~ msgid "Dicomizando ..."
+#~ msgstr "Dicomizando..."
+
+#~ msgid "ID *"
+#~ msgstr "Identificador *"
+
+#~ msgid "Man"
+#~ msgstr "Hombre"
+
+#~ msgid "Woman"
+#~ msgstr "Mujer"
+
+#~ msgid "% D /% m /% Y"
+#~ msgstr "%d/%m/%Y"
+
+#~ msgid "Doctor"
+#~ msgstr "Médico"
+
+#~ msgid ""
+#~ "Error: Se ha agotado la memoria de video del sistema y no se ha podido "
+#~ "cargar la imagen. Cierre algunos estudios para liberar memoria."
+#~ msgstr ""
+#~ "Error: Se ha agotado la memoria de video del sistema y no se ha podido "
+#~ "cargar la imagen. Cierre algunos estudios para liberar memoria."
+
+#~ msgid ""
+#~ "Se ha agotado la memoria de vídeo del sistema y no se ha podido asignar "
+#~ "la configuración de rejilla. Cierre algunos estudios para liberar memoria."
+#~ msgstr ""
+#~ "Se ha agotado la memoria de vídeo del sistema y no se ha podido asignar "
+#~ "la configuración de rejilla. Cierre algunos estudios para liberar memoria."
+
+#~ msgid "Court:"
+#~ msgstr "Corte: "
+
+#~ msgid ", Misguidance ="
+#~ msgstr ", desv="
diff --git a/visualizator/lang/fr/visualizator.mo b/visualizator/lang/fr/visualizator.mo
new file mode 100644
index 0000000..87aa813
Binary files /dev/null and b/visualizator/lang/fr/visualizator.mo differ
diff --git a/visualizator/lang/fr/visualizator.po b/visualizator/lang/fr/visualizator.po
new file mode 100644
index 0000000..d4c575b
--- /dev/null
+++ b/visualizator/lang/fr/visualizator.po
@@ -0,0 +1,408 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: ginkgo at metaemotion.com\n"
+"POT-Creation-Date: 2014-06-11 15:54+0100\n"
+"PO-Revision-Date: 2014-06-11 15:54+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: French <fr at li.org>\n"
+"Language: fr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: ../../\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr "Impossible de charger la ressource bitmap PNG"
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr "Ginkgo CADx visualizator est Open Source"
+
+#: visualizator.cpp:62
+msgid "Info"
+msgstr "Info"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+msgid "Ginkgo CADx viewer"
+msgstr "Visualisateur Ginkgo CADx"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+msgid "Simple importation of images"
+msgstr "Import d'image simple"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+msgid "Medical viewer"
+msgstr "Visualisateur médical"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+msgid "Waveform viewer"
+msgstr "Visualisateur de courbe"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+msgid "Default importer"
+msgstr "Importeur par défaut"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+msgid "Ginkgo CADx Image Report"
+msgstr "Rapport d'image Ginkgo CADx"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+msgid "Medical Image Viewer"
+msgstr "Visualisateur d'image médical"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+msgid "Error opening study"
+msgstr "Erreur à l'ouverture du travail"
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+msgid "Performing tasks of integration ..."
+msgstr "Effectuer les tâches d'intégration ..."
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+msgid "There are no overlays on this image"
+msgstr "Il n'y a pas de superpositions sur cette image"
+
+#: visualizator/estudios/ecgstudy.cpp:380
+msgid "We are working to support "
+msgstr "Nous travaillons au support"
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr " BPM"
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr " ms"
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr "Axes P-R-T : "
+
+#: visualizator/estudios/ecgstudy.cpp:489
+msgid "Measurements not found"
+msgstr "Mesures introuvables"
+
+#: visualizator/estudios/ecgstudy.cpp:589
+msgid "ECG format not supported"
+msgstr "Format ECG non supporté"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr "Intervalle RR"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr "Intervalle PP"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "QTc Interval"
+msgstr "Intervalle QTc"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr ""
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+#, fuzzy
+msgid "Rule \tCtrl+R"
+msgstr "Règle \tCtrl+R"
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+msgid "Overlay layers"
+msgstr "cCuches de superposition"
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr "Reconstruction 3D/4D"
+
+#: visualizator/tools/reconstructiontool.cpp:207
+msgid "3D MPR"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:213
+msgid "MIP 3D"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:219
+msgid "3D volume rendering"
+msgstr "Rendu volume 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:225
+msgid "3D surface rendering"
+msgstr "Rendu surface 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:232
+msgid "3D endoscopy"
+msgstr "Endoscopie 3D"
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr ""
+"Erreur : Mémoire insuffisante. Fermez des études pour libérer de la mémoire."
+
+#: visualizator/widgets/wecgrule.cpp:595
+#, fuzzy
+msgid "Length"
+msgstr "Longueur"
+
+#: visualizator/widgets/wecgrule.cpp:600
+#, fuzzy
+msgid "Points (I)"
+msgstr "Points (I)"
+
+#: visualizator/widgets/wecgrule.cpp:607
+#, fuzzy
+msgid "Points (M)"
+msgstr "Points (M)"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr ""
+"La mémoire vidéo du système est épuisée et la configuration de la grille n'a "
+"pu être allouée. Fermez certaines travaux pour libérer de la mémoire."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid "Error configuring the grid"
+msgstr "Erreur de configuration de la grille"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr "Tranche :"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr "Options d'affichage"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr "Synchroniser/Désynchroniser"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+"Erreur : Vous avez épuisé la mémoire vidéo du système et il n'est pas "
+"capable de charger l'image. Fermer des études pour libérer de la mémoire."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr "Détruire la vue"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+msgid "Error: Internal error."
+msgstr "Erreur : erreur interne."
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+msgid "Area      : "
+msgstr "Aire     : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr "indétérminé"
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr "Périmètre :"
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+msgid "Position   : "
+msgstr "Position :"
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+msgid "RGB ("
+msgstr "RVB ("
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr "Estimation :"
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+msgid "Area:"
+msgstr "Aire :"
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr "Périmètre :"
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+msgid "Show/Hide metadata"
+msgstr "Montrer/cacher metadata"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error loading study with ecg view"
+msgstr "Erreur au chargement de l'étude avec la vue ECG"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error"
+msgstr "Erreur"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+msgid "Uploading to the PACS ..."
+msgstr "Envoi au PACS ..."
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+msgid "Upload series to PACS..."
+msgstr "Envoi de séries au PACS..."
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, c-format
+msgid "%d series"
+msgstr "%d séries"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr "Sélectionner la vue que vous voulez synchroniser avec l'actuelle"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr "Accepter"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr "Annuler"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr "Metadata"
+
+#: visualizator/estudios/ecgstudy.h:108
+msgid "Unknown"
+msgstr "Inconnu"
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr "Extension du visualisateur"
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+msgid "Synchronize..."
+msgstr "Synchronisation..."
+
+#~ msgid "Unable to load PNG image resource"
+#~ msgstr "Impossible de charger la ressource image PNG"
+
+#~ msgid "Unable to load GIF animation resource"
+#~ msgstr "Impossible de charger l'animation GIF"
+
+#~ msgid "Play"
+#~ msgstr "Lancer"
+
+#~ msgid "Speed"
+#~ msgstr "Vitesse"
+
+#~ msgid "Loop"
+#~ msgstr "Boucle"
+
+#~ msgid "Repeat on end"
+#~ msgstr "Répéter jusqu'à la fin"
+
+#~ msgid "Start playback"
+#~ msgstr "Lancer l'aninmation"
+
+#~ msgid "Stop"
+#~ msgstr "Stop"
+
+#~ msgid "End playback"
+#~ msgstr "Fin de l'animation"
+
+#~ msgid "Patient: "
+#~ msgstr "Patient :"
+
+#~ msgid "Patient Id: "
+#~ msgstr "Id Patient :"
+
+#~ msgid "Sexo"
+#~ msgstr "Sexe"
+
+#~ msgid "Modality: "
+#~ msgstr "Modalité :"
+
+#~ msgid "Comment:"
+#~ msgstr "Commentaire :"
+
+#~ msgid "Image:"
+#~ msgstr "Image :"
+
+#~ msgid "Right"
+#~ msgstr "Droite"
+
+#~ msgid "Left"
+#~ msgstr "Gauche"
+
+#~ msgid "Voxel:"
+#~ msgstr "Voxel :"
+
+#~ msgid "Image without metric information"
+#~ msgstr "Image sans information métrique"
+
+#~ msgid "Slice thickness:"
+#~ msgstr "Epaisseur de tranche"
+
+#~ msgid "Made with %s"
+#~ msgstr "Fait avec %s"
+
+#~ msgid "Position:"
+#~ msgstr "Position :"
+
+#~ msgid "Value:"
+#~ msgstr "Valeur :"
diff --git a/visualizator/lang/ja/visualizator.mo b/visualizator/lang/ja/visualizator.mo
new file mode 100644
index 0000000..1309151
Binary files /dev/null and b/visualizator/lang/ja/visualizator.mo differ
diff --git a/visualizator/lang/ja/visualizator.po b/visualizator/lang/ja/visualizator.po
new file mode 100644
index 0000000..466d3b2
--- /dev/null
+++ b/visualizator/lang/ja/visualizator.po
@@ -0,0 +1,881 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: ginkgo at metaemotion.com\n"
+"POT-Creation-Date: 2014-06-11 15:54+0100\n"
+"PO-Revision-Date: 2014-06-11 15:54+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: YOKOHAMA <Unknown>\n"
+"Language: ja_JP\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: ../../\n"
+"X-Poedit-Bookmarks: -1,-1,-1,-1,-1,-1,-1,-1,6,-1\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr "Ginkgo CADx visualizator はオープンソースです"
+
+#: visualizator.cpp:62
+msgid "Info"
+msgstr "情報"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+msgid "Ginkgo CADx viewer"
+msgstr "Ginkgo CADx ビューア"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+msgid "Simple importation of images"
+msgstr "画像の簡易読み込み"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+msgid "Medical viewer"
+msgstr "医用ビューア"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+msgid "Waveform viewer"
+msgstr "波形ビューワ"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+msgid "Default importer"
+msgstr "デフォルト読み込み"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+msgid "Ginkgo CADx Image Report"
+msgstr "Ginkgo CADx 画像レポート"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+msgid "Medical Image Viewer"
+msgstr "医用画像ビューア"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+msgid "Error opening study"
+msgstr "検査を開く時にエラー"
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+msgid "Performing tasks of integration ..."
+msgstr "実装タスクを実行中..."
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+msgid "There are no overlays on this image"
+msgstr "この画像にオーバーレイはありません"
+
+#: visualizator/estudios/ecgstudy.cpp:380
+msgid "We are working to support "
+msgstr "サポートするように奮闘中"
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr "Vent rate:      "
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr " BPM"
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr "PR int:      "
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr " ms"
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr "QRS dur:      "
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr "QT\\QTc:      "
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr "P-R-T axes: "
+
+#: visualizator/estudios/ecgstudy.cpp:489
+msgid "Measurements not found"
+msgstr "計測が見つかりません"
+
+#: visualizator/estudios/ecgstudy.cpp:589
+msgid "ECG format not supported"
+msgstr "ECGはサポートしてません"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr "RR Interval"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr "PP Interval"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "QTc Interval"
+msgstr "QTc Interval"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr "Vent Rate"
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+#, fuzzy
+msgid "Rule \tCtrl+R"
+msgstr "P-R-T axes: "
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+msgid "Overlay layers"
+msgstr "重ね合わせ層"
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr "3D/4D 再構成"
+
+#: visualizator/tools/reconstructiontool.cpp:207
+msgid "3D MPR"
+msgstr "3D MPR"
+
+#: visualizator/tools/reconstructiontool.cpp:213
+msgid "MIP 3D"
+msgstr "MIP 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:219
+msgid "3D volume rendering"
+msgstr "3D ボリュームレンダリング"
+
+#: visualizator/tools/reconstructiontool.cpp:225
+msgid "3D surface rendering"
+msgstr "3D サーフェスレンダリング"
+
+#: visualizator/tools/reconstructiontool.cpp:232
+msgid "3D endoscopy"
+msgstr "3D 内視鏡"
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr "エラー: システムメモリ不足. メモリ確保のためスタディを閉じて下さい."
+
+#: visualizator/widgets/wecgrule.cpp:595
+#, fuzzy
+msgid "Length"
+msgstr "長さ"
+
+#: visualizator/widgets/wecgrule.cpp:600
+#, fuzzy
+msgid "Points (I)"
+msgstr "点 (I)"
+
+#: visualizator/widgets/wecgrule.cpp:607
+#, fuzzy
+msgid "Points (M)"
+msgstr "点 (M)"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr ""
+"システムのビデオメモリが枯渇し、グリッド設定を割り当てることができません.いく"
+"つかの検査を閉じてメモリを解放して下さい."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid "Error configuring the grid"
+msgstr "グリッド設定中にエラー"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr "スライス: "
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr "ディスプレイオプション"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr "同期"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+"エラー: ビデオメモリが枯渇して画像が読み込めません. メモリ確保のためスタディ"
+"を閉じて下さい."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr "ビューを破棄"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+msgid "Error: Internal error."
+msgstr "エラー: 内部エラー."
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+msgid "Area      : "
+msgstr "領域      : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr "未確定"
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr "周囲長 : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+msgid "Position   : "
+msgstr "位置   : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+msgid "RGB ("
+msgstr "RGB ("
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr "率   : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr "[DNorm ="
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr "重心位置:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+msgid "Area:"
+msgstr "領域:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr "周囲長:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr "率: 平均 ="
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ", dev ="
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+msgid "Show/Hide metadata"
+msgstr "メタデータの表示/非表示"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+#, fuzzy
+msgid "Error loading study with ecg view"
+msgstr "検査読み込み中にエラー: "
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error"
+msgstr "エラー"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+#, fuzzy
+msgid "Uploading to the PACS ..."
+msgstr "PACSへ検査をアップロード中にエラー: "
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+#, fuzzy
+msgid "Upload series to PACS..."
+msgstr "PACSサーバへ画像をアップロード"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, fuzzy, c-format
+msgid "%d series"
+msgstr "シリーズ書き出し %d の %d"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr "同期したい現在のデータ表示を選択"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr "受入"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr "キャンセル"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr "メタデータ"
+
+#: visualizator/estudios/ecgstudy.h:108
+#, fuzzy
+msgid "Unknown"
+msgstr "不明"
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+#, fuzzy
+msgid "Synchronize..."
+msgstr "同期"
+
+#~ msgid "Play"
+#~ msgstr "再生"
+
+#~ msgid "Speed"
+#~ msgstr "スピード"
+
+#~ msgid "Loop"
+#~ msgstr "ループ"
+
+#~ msgid "Repeat on end"
+#~ msgstr "終わりまでリピート"
+
+#~ msgid "Start playback"
+#~ msgstr "再生開始"
+
+#~ msgid "Stop"
+#~ msgstr "停止"
+
+#~ msgid "End playback"
+#~ msgstr "再生終了"
+
+#~ msgid "Patient: "
+#~ msgstr "患者: "
+
+#~ msgid "Patient Id: "
+#~ msgstr "患者 Id: "
+
+#~ msgid "Modality: "
+#~ msgstr "モダリティ: "
+
+#~ msgid "Comment:"
+#~ msgstr "コメント:"
+
+#~ msgid "Image:"
+#~ msgstr "画像:"
+
+#~ msgid "Right"
+#~ msgstr "右"
+
+#~ msgid "Left"
+#~ msgstr "左"
+
+#~ msgid "Voxel:"
+#~ msgstr "ボクセル:"
+
+#~ msgid "Image without metric information"
+#~ msgstr "距離情報なし画像"
+
+#~ msgid "Made with %s"
+#~ msgstr "%sで作られた"
+
+#~ msgid "Position:"
+#~ msgstr "位置:"
+
+#~ msgid "Value:"
+#~ msgstr "値:"
+
+#~ msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+#~ msgstr "PDF展開エラー, Ginkgo CADxはこのファイルをロードできません"
+
+#~ msgid "There isn't any pdf reader registered in the system"
+#~ msgstr "このシステムにはPDFリーダーが登録されていません"
+
+#~ msgid "PDF files extracted successfully..."
+#~ msgstr "PDFファイルの展開が成功..."
+
+#~ msgid "Study"
+#~ msgstr "検査"
+
+#~ msgid "DICOM Tags"
+#~ msgstr "DICOMタグ"
+
+#~ msgid "Surface settings"
+#~ msgstr "サーフェス設定"
+
+#~ msgid "Quality"
+#~ msgstr "品質"
+
+#~ msgid "Smooth"
+#~ msgstr "スムース"
+
+#~ msgid "Resolution"
+#~ msgstr "解像度"
+
+#~ msgid "Volume visualization resolution (25-100%)"
+#~ msgstr "ボリューム可視化解像度 (25-100%)"
+
+#~ msgid "Surfaces"
+#~ msgstr "サーフェス"
+
+#~ msgid "Volume visualization"
+#~ msgstr "ボリューム可視化"
+
+#~ msgid "Window/Level"
+#~ msgstr "Window/Level"
+
+#~ msgid "Radiolucency Window/Level"
+#~ msgstr "放射線透過性 Window/Level"
+
+#~ msgid "Radiolucency Level"
+#~ msgstr "放射線透過性レベル"
+
+#~ msgid "/"
+#~ msgstr "/"
+
+#~ msgid "Radiolucency Window"
+#~ msgstr "放射線透過性ウインドウ"
+
+#~ msgid "Blend Mode"
+#~ msgstr "ブレンドモード"
+
+#~ msgid "Visualization blend type"
+#~ msgstr "可視化ブレンドモード"
+
+#~ msgid "MIP"
+#~ msgstr "MIP"
+
+#~ msgid "Composite Ramp"
+#~ msgstr "Composite Ramp"
+
+#~ msgid "Composite Ramp Shaded"
+#~ msgstr "Composite Ramp Shaded"
+
+#~ msgid "RGB Composite"
+#~ msgstr "RGB合成"
+
+#~ msgid "CT Skin"
+#~ msgstr "CT 皮膚"
+
+#~ msgid "CT Muscle"
+#~ msgstr "CT 筋肉"
+
+#~ msgid "CT Bone"
+#~ msgstr "CT 骨"
+
+#~ msgid "Visualization blending mode"
+#~ msgstr "可視化ブレンドモード"
+
+#~ msgid "Apply"
+#~ msgstr "適応"
+
+#~ msgid "Apply reconstuction"
+#~ msgstr "再構築を適応"
+
+#~ msgid "DataSet 0000/0000"
+#~ msgstr "データセット 0000/0000"
+
+#~ msgid "Pre-Smooth"
+#~ msgstr "プレスムース"
+
+#~ msgid "Enable/Disable Smoothing the high resolution input volume data."
+#~ msgstr "有効/無効 入力された高解像度ボリュームデータのスムージング"
+
+#~ msgid "Post-Smooth"
+#~ msgstr "ポストスムース"
+
+#~ msgid "Enable/Disable Smoothing the low resolution resampled volume data."
+#~ msgstr ""
+#~ "有効/無効 リサンプリングされた低解像度ボリュームデータのスムージング"
+
+#~ msgid "Sets the resampling resolution"
+#~ msgstr "リサンプリング解像度をセット"
+
+#~ msgid "Resampled resolution: 32x32x32, 64x64x64, 128x128x128, 256x256x256"
+#~ msgstr "リサンプリング解像度: 32x32x32, 64x64x64, 128x128x128, 256x256x256"
+
+#~ msgid "First surface"
+#~ msgstr "最初のサーフェス"
+
+#~ msgid "Value"
+#~ msgstr "値"
+
+#~ msgid "IsoSurface pixel value"
+#~ msgstr "等価サーフェスのピクセル値"
+
+#~ msgid "CT - Bone"
+#~ msgstr "CT - 骨"
+
+#~ msgid "CT - Muscle"
+#~ msgstr "CT - 筋肉"
+
+#~ msgid "CT - Skin"
+#~ msgstr "CT - 皮膚"
+
+#~ msgid "CT Pressets"
+#~ msgstr "CT プリセット"
+
+#~ msgid "Color"
+#~ msgstr "色彩"
+
+#~ msgid "Rendering color"
+#~ msgstr "レンダリング色"
+
+#~ msgid "Second surface"
+#~ msgstr "2番目のサーフェス"
+
+#~ msgid "Enable"
+#~ msgstr "有効"
+
+#~ msgid "Enable/Disable second surface"
+#~ msgstr "有効/無効 2番目のサーフェス"
+
+#~ msgid "Color / alpha"
+#~ msgstr "色彩 / アルファ"
+
+#~ msgid "Surface rendering color and transparency"
+#~ msgstr "サーフェスレンダリングの色と透過度"
+
+#~ msgid "Transparency level"
+#~ msgstr "透過レベル"
+
+#~ msgid "Apply reconstruction"
+#~ msgstr "構築を適応"
+
+#~ msgid "Cursor"
+#~ msgstr "カーソル"
+
+#~ msgid "Reset Camera"
+#~ msgstr "カメラリセット"
+
+#~ msgid "Stereo view"
+#~ msgstr "ステレオビュー"
+
+#~ msgid "Demo mode"
+#~ msgstr "デモモード"
+
+#~ msgid "Save Frame"
+#~ msgstr "フレーム保存"
+
+#~ msgid "Save current frame to new serie"
+#~ msgstr "現在のフレームを新しいシリーズへ保存"
+
+#~ msgid "Hide"
+#~ msgstr "隠す"
+
+#~ msgid "3D Surface"
+#~ msgstr "3D サーフェス"
+
+#~ msgid "Pixel value of first surface doesn't have a valid value"
+#~ msgstr "最初のサーフェスのピクセル値は、有効な値ではありません"
+
+#~ msgid "Warning"
+#~ msgstr "警告"
+
+#~ msgid "Pixel value of second surface doesn't have a valid value"
+#~ msgstr "2番目のサーフェスのピクセル値は、有効な値ではありません"
+
+#~ msgid "Reset"
+#~ msgstr "リセット"
+
+#~ msgid "Radiolucency Window does not have a valid value"
+#~ msgstr "放射線透過性ウインドウは、有効な値ではありません"
+
+#~ msgid "Radiolucency Level does not have a valid value"
+#~ msgstr "放射線透過性レベルは、有効な値ではありません"
+
+#~ msgid "Generating VOIs...."
+#~ msgstr "VOIs 生成中...."
+
+#~ msgid " VOIs detected."
+#~ msgstr " VOIs 検出."
+
+#~ msgid "Computing VOIs...."
+#~ msgstr "VOIs 計算中...."
+
+#~ msgid "Done"
+#~ msgstr "完了"
+
+#~ msgid "Aborted"
+#~ msgstr "中止"
+
+#~ msgid "Saving frame..."
+#~ msgstr "フレーム保存中..."
+
+#~ msgid "Saving done"
+#~ msgstr "保存中"
+
+#~ msgid "Saving failed"
+#~ msgstr "保存に失敗"
+
+#~ msgid "Updating..."
+#~ msgstr "アップデート中..."
+
+#~ msgid "Reconstruction internal error"
+#~ msgstr "再構築内部エラー"
+
+#~ msgid "Update done"
+#~ msgstr "アップデート完了"
+
+#~ msgid "3D Volume Reconstruction"
+#~ msgstr "3D ボリューム再構成"
+
+#~ msgid "3D MIP Reconstruction"
+#~ msgstr "3D MIP再構築"
+
+#~ msgid "3D Surface Reconstruction"
+#~ msgstr "3D サーフェス再構築"
+
+#~ msgid "Endoscopy"
+#~ msgstr "内視鏡"
+
+#~ msgid " ClockWise"
+#~ msgstr " 時計回り"
+
+#~ msgid " Counter-ClockWise"
+#~ msgstr " 反時計回り"
+
+#~ msgid "%m/%d/%Y"
+#~ msgstr "%m/%d/%Y"
+
+#~ msgid "3D maximun intensity projection (MIP)"
+#~ msgstr "3D 最大値投影 (MIP)"
+
+#~ msgid "3D orthogonal multi-planar reconstruction (MPR)"
+#~ msgstr "3D 直交多面再構成 (MPR)"
+
+#~ msgid "3D reconstruction"
+#~ msgstr "3D再構築"
+
+#~ msgid "Color Map"
+#~ msgstr "カラーマップ"
+
+#~ msgid "Create new diagnosis"
+#~ msgstr "新しい診断をクリア"
+
+#~ msgid "Date"
+#~ msgstr "日付"
+
+#~ msgid "Description"
+#~ msgstr "概要"
+
+#~ msgid "Disencage view"
+#~ msgstr "Disencage view"
+
+#~ msgid "Disengage Vista"
+#~ msgstr "Disengage Vista"
+
+#~ msgid ""
+#~ "Errors have occurred while trying to save the files in the series\n"
+#~ "verify that the disk is not full and that has write permissions"
+#~ msgstr ""
+#~ "このシリーズをファイルに保存中にエラーが発生しました\n"
+#~ "ディスクがいっぱいか書き込み権限を確認して下さい"
+
+#~ msgid "Fit View"
+#~ msgstr "表示に合わせる"
+
+#~ msgid "Flip Horizontal"
+#~ msgstr "水平反転"
+
+#~ msgid "Flip Vertical"
+#~ msgstr "垂直反転"
+
+#~ msgid "Invert color map"
+#~ msgstr "カラーマップ反転"
+
+#~ msgid "Layout Setup"
+#~ msgstr "レイアウト設定"
+
+#~ msgid "Medical Diagnostic"
+#~ msgstr "医療診断"
+
+#~ msgid "Physician"
+#~ msgstr "医師"
+
+#~ msgid "Reconstruction mode not implemented:\n"
+#~ msgstr "再構築モードは実装されていません:\n"
+
+#~ msgid "Reconstruction mode not supported:\n"
+#~ msgstr "再構築モードはサポートされていない:\n"
+
+#~ msgid "Rotate 90"
+#~ msgstr "90度回転"
+
+#~ msgid "Save changes with medical viewer"
+#~ msgstr "医用ビューアの変更を保存"
+
+#~ msgid "Select a diagnosis"
+#~ msgstr "診断を選択"
+
+#~ msgid "Select diagnosis"
+#~ msgstr "診断を選択"
+
+#~ msgid "Select diagnosis file"
+#~ msgstr "診断ファイルを選択"
+
+#~ msgid "Show/Hide corner annotations"
+#~ msgstr "アノテーションの表示/非表示"
+
+#~ msgid "Time"
+#~ msgstr "時間"
+
+#~ msgid "UID"
+#~ msgstr "UID"
+
+#~ msgid "Step 1 of 3: Importing images"
+#~ msgstr "新規画像を作成中..."
+
+#~ msgid "Step 2 of 3: Copying images"
+#~ msgstr "新規画像を作成中..."
+
+#~ msgid "Step 3 of 3: Uploading Images"
+#~ msgstr "新規画像を作成中..."
+
+#~ msgid "Import process failed:"
+#~ msgstr "プロセス %d の kill に失敗しました"
+
+#~ msgid ""
+#~ "\n"
+#~ "Would you like to retry?"
+#~ msgstr ""
+#~ "\n"
+#~ "リトライしますか?"
+
+#~ msgid "Can not upload to the PACS:\n"
+#~ msgstr "PACSサーバへ画像をアップロード"
+
+#~ msgid "Overview data of DICOM files"
+#~ msgstr "このファイルは Dicom Dirs:"
+
+#~ msgid ""
+#~ "\n"
+#~ "* The patient ID is required."
+#~ msgstr ""
+#~ "\n"
+#~ "* 患者IDが必要です"
+
+#~ msgid ""
+#~ "\n"
+#~ "* Concatenation of patient name and surnames can't be higher than 61."
+#~ msgstr ""
+#~ "\n"
+#~ "* 患者の名字と名前を合わせて、61文字以上にはできません."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The format of the height in centimeters is not correct. "
+#~ msgstr ""
+#~ "\n"
+#~ "* 身長のフォーマットがセンチメーターでは正しくありません "
+
+#~ msgid ""
+#~ "\n"
+#~ "* The patient's birth date is after the date of study"
+#~ msgstr ""
+#~ "\n"
+#~ "* 患者の誕生日が検査日の後です"
+
+#~ msgid ""
+#~ "\n"
+#~ "* The format of the weight is not correct. Valid range is between 0 and "
+#~ "400 Kg."
+#~ msgstr ""
+#~ "\n"
+#~ "* 体重のフォーマットが正しくありません. 有効な範囲は0から400kgです."
+
+#~ msgid "The following errors have occurred when validating fields"
+#~ msgstr "フィールドの検証中にエラーが起こりました"
+
+#~ msgid "Error validating fields"
+#~ msgstr "フィールドを検証中にエラー"
+
+#~ msgid "Refer Study"
+#~ msgstr "関連する検査"
+
+#~ msgid "DICOM Files (*.dcm)|*.dcm"
+#~ msgstr "DICOMファイル (*.dcm)|*.dcm"
+
+#~ msgid "Series reference"
+#~ msgstr "シリーズリファレンス"
+
+#~ msgid "DICOM Files (*.dcm) | *.dcm"
+#~ msgstr "DICOMファイル (*.dcm) | *.dcm"
+
+#~ msgid "Demographic data"
+#~ msgstr "デモデータ"
+
+#~ msgid "Identificator *"
+#~ msgstr "ID *"
+
+#~ msgid "(ID or medical history number)"
+#~ msgstr "(IDあるいは医療履歴番号)"
+
+#~ msgid "Name"
+#~ msgstr "名前"
+
+#~ msgid "Surname 1"
+#~ msgstr "名字 1"
+
+#~ msgid "Surname 2"
+#~ msgstr "名字 2"
+
+#~ msgid "Birthday"
+#~ msgstr "誕生日"
+
+#~ msgid "Sex"
+#~ msgstr "性別"
+
+#~ msgid "Male"
+#~ msgstr "男性"
+
+#~ msgid "Female"
+#~ msgstr "女性"
+
+#~ msgid "Others"
+#~ msgstr "その他"
+
+#~ msgid "Study Details"
+#~ msgstr "検査詳細"
+
+#~ msgid "Patient"
+#~ msgstr "患者"
+
+#~ msgid "Kg"
+#~ msgstr "Kg"
+
+#~ msgid "Height"
+#~ msgstr "身長"
+
+#~ msgid "cm"
+#~ msgstr "cm"
+
+#~ msgid "Include in existing series"
+#~ msgstr "存在するシリーズを含む"
+
+#~ msgid "Layers Overlays"
+#~ msgstr "重ね合わせ層"
+
+#~ msgid "3D Volume"
+#~ msgstr "3D ボリューム再構成"
+
+#~ msgid "Visualizator"
+#~ msgstr "可視化拡張"
+
+#~ msgid "Uploading..."
+#~ msgstr "アップロード中..."
diff --git a/visualizator/lang/pl/visualizator.mo b/visualizator/lang/pl/visualizator.mo
new file mode 100644
index 0000000..1d269de
Binary files /dev/null and b/visualizator/lang/pl/visualizator.mo differ
diff --git a/visualizator/lang/pl/visualizator.po b/visualizator/lang/pl/visualizator.po
new file mode 100644
index 0000000..d5107ed
--- /dev/null
+++ b/visualizator/lang/pl/visualizator.po
@@ -0,0 +1,608 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR MetaEmotion S.L
+# This file is distributed under the same license as the PACKAGE package.
+# FIRST AUTHOR <EMAIL at ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: Ginkgo CADx Visualizator 2.12.0.4869\n"
+"Report-Msgid-Bugs-To: ginkgo at metaemotion.com\n"
+"POT-Creation-Date: 2014-06-11 15:54+0100\n"
+"PO-Revision-Date: 2014-06-11 15:55+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language: pl\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Poedit-Basepath: ../../\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Info"
+msgstr "Info"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+msgid "Ginkgo CADx viewer"
+msgstr "Przeglądarka Ginkgo CADx"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+msgid "Simple importation of images"
+msgstr "Prosty import zdjęć"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+msgid "Medical viewer"
+msgstr "Przeglądarka medyczna"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+#, fuzzy
+msgid "Waveform viewer"
+msgstr "Przeglądarka medyczna"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+msgid "Default importer"
+msgstr "Domyślny importer"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+#, fuzzy
+msgid "Ginkgo CADx Image Report"
+msgstr "Przeglądarka Ginkgo CADx"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+msgid "Medical Image Viewer"
+msgstr "Przeględarka zdjęć medycznych"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+msgid "Error opening study"
+msgstr "Błąd przy otwieraniu badania"
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+msgid "Performing tasks of integration ..."
+msgstr "Wykonywanie zadań integracji ..."
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+msgid "There are no overlays on this image"
+msgstr "Na tym zdjęciu nie ma warstw"
+
+#: visualizator/estudios/ecgstudy.cpp:380
+msgid "We are working to support "
+msgstr "Pracujemy, by wesprzeć"
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr "Uderzeń na minutę"
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:489
+msgid "Measurements not found"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:589
+msgid "ECG format not supported"
+msgstr "Format ECG nie jest czytany"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "QTc Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr ""
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+msgid "Overlay layers"
+msgstr "Warstwy overlay"
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr "Rekonstrukcja 3D/4D"
+
+#: visualizator/tools/reconstructiontool.cpp:207
+#, fuzzy
+msgid "3D MPR"
+msgstr "Endoskopia 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:213
+#, fuzzy
+msgid "MIP 3D"
+msgstr "Endoskopia 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:219
+#, fuzzy
+msgid "3D volume rendering"
+msgstr "Endoskopia 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:225
+#, fuzzy
+msgid "3D surface rendering"
+msgstr "Endoskopia 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:232
+msgid "3D endoscopy"
+msgstr "Endoskopia 3D"
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr ""
+"Błąd: Systemowi brakuje pamięci. Zamknij kilka badań w celu zwolnienia "
+"pamięci."
+
+#: visualizator/widgets/wecgrule.cpp:595
+msgid "Length"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:600
+msgid "Points (I)"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:607
+msgid "Points (M)"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr ""
+"Zostały wyczerpane zasoby systemowej pamięci wideo i nie można przypisać "
+"konfiguracji siatki. Zamknij kilka badań, by zwolnić pamięć."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid "Error configuring the grid"
+msgstr "Błąd konfiguracji siatki"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr "Przekrój:"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr "Opcje wyświetlania"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr "Synchronizuj/Desynchronizuj"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+"Błąd: pamięć video systemu została wyczerpana i nie było możliwe załadowanie "
+"zdjęcia. Zamknij kilka badań w celu zwolnienia pamięci."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+msgid "Error: Internal error."
+msgstr "Błąd: błąd wewnętrzny"
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+msgid "Area      : "
+msgstr "Obszar       :"
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr "nieustalony"
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+msgid "Position   : "
+msgstr "Pozycja:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+msgid "RGB ("
+msgstr "RGB ("
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr "Ocena/wskaźnik:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+msgid "Area:"
+msgstr "Obszar:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr "Ocena/wskaźnik: średnia ="
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+msgid "Show/Hide metadata"
+msgstr "Pokaż/ukryj metadane"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+#, fuzzy
+msgid "Error loading study with ecg view"
+msgstr "Błąd przy otwieraniu badania"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error"
+msgstr "Błąd"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+#, fuzzy
+msgid "Uploading to the PACS ..."
+msgstr "Wczytywanie trwa ..."
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+msgid "Upload series to PACS..."
+msgstr ""
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, c-format
+msgid "%d series"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr "Wybierz widok do synchronizacji z widokiem bieżącym"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr "Zaakceptuj"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr "Anuluj"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr "Metadane"
+
+#: visualizator/estudios/ecgstudy.h:108
+msgid "Unknown"
+msgstr ""
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+#, fuzzy
+msgid "Synchronize..."
+msgstr "Synchronizuj/Desynchronizuj"
+
+#~ msgid "Play"
+#~ msgstr "Odtwórz"
+
+#~ msgid "Speed"
+#~ msgstr "Prędkość"
+
+#~ msgid "Loop"
+#~ msgstr "Pętla"
+
+#~ msgid "Repeat on end"
+#~ msgstr "Powtórz na końcu"
+
+#~ msgid "Start playback"
+#~ msgstr "Zacznij odtwarzanie"
+
+#~ msgid "Stop"
+#~ msgstr "Zatrzymaj/przerwij"
+
+#~ msgid "End playback"
+#~ msgstr "Koniec odtwarzania"
+
+#~ msgid "Patient: "
+#~ msgstr "Pacjent:"
+
+#~ msgid "Patient Id: "
+#~ msgstr "Id pacjenta:"
+
+#~ msgid "Modality: "
+#~ msgstr "Rodzaj badania:"
+
+#~ msgid "Comment:"
+#~ msgstr "Komentarz:"
+
+#~ msgid "Image:"
+#~ msgstr "Zdjęcie:"
+
+#~ msgid "Right"
+#~ msgstr "Strona prawa"
+
+#~ msgid "Left"
+#~ msgstr "Strona lewa"
+
+#~ msgid "Image without metric information"
+#~ msgstr "Zdjęcie bez informacji metrycznej"
+
+#, fuzzy
+#~ msgid "Made with %s"
+#~ msgstr "Wykonane przy pomocy Ginkgo CADx"
+
+#~ msgid "Position:"
+#~ msgstr "Pozycja:"
+
+#~ msgid "Value:"
+#~ msgstr "Wartość:"
+
+#~ msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+#~ msgstr "Błąd odczytu pdf, Ginkgo CADx nie może załadować tego formatu"
+
+#~ msgid "There isn't any pdf reader registered in the system"
+#~ msgstr "W systemie nie ma zarejestrowanego programu czytającego format pdf"
+
+#~ msgid "PDF files extracted successfully..."
+#~ msgstr "Pliki pdf odczytane pomyślnie"
+
+#~ msgid "DICOM Tags"
+#~ msgstr "Tagi DICOM"
+
+#~ msgid " ClockWise"
+#~ msgstr "Zgodnie ze wskazówkami zegara"
+
+#~ msgid " Counter-ClockWise"
+#~ msgstr "Przeciwnie do wskazówek zegara"
+
+#~ msgid "%m/%d/%Y"
+#~ msgstr "%d/%m/%R"
+
+#~ msgid "3D Surface"
+#~ msgstr "Powierzchnia 3D"
+
+#~ msgid "3D reconstruction"
+#~ msgstr "Rekonstrukcja 3D"
+
+#~ msgid "Aborted"
+#~ msgstr "Przerwane"
+
+#~ msgid "Apply"
+#~ msgstr "Zastosuj"
+
+#~ msgid "Apply reconstruction"
+#~ msgstr "Zastosuj rekonstrukcję"
+
+#~ msgid "Apply reconstuction"
+#~ msgstr "Zastosuj rekonstrukcję"
+
+#~ msgid "Blend Mode"
+#~ msgstr "Tryb wtapiania"
+
+#~ msgid "CT - Bone"
+#~ msgstr "TK - Kości"
+
+#~ msgid "CT - Muscle"
+#~ msgstr "TK - mięśni"
+
+#~ msgid "CT - Skin"
+#~ msgstr "TK - skóra"
+
+#~ msgid "CT Bone"
+#~ msgstr "TK kości"
+
+#~ msgid "CT Muscle"
+#~ msgstr "TK mięśni"
+
+#~ msgid "CT Skin"
+#~ msgstr "TK skóry"
+
+#~ msgid "Color"
+#~ msgstr "Kolor/barwa"
+
+#~ msgid "Color / alpha"
+#~ msgstr "Kolor / alfa"
+
+#~ msgid "Color Map"
+#~ msgstr "Mapa kolorów"
+
+#~ msgid "Create new diagnosis"
+#~ msgstr "Utwórz nową diagnozę"
+
+#~ msgid "Cursor"
+#~ msgstr "Kursor"
+
+#~ msgid "Date"
+#~ msgstr "Data"
+
+#~ msgid "Demo mode"
+#~ msgstr "Tryb demo"
+
+#~ msgid "Description"
+#~ msgstr "Opis"
+
+#~ msgid "Done"
+#~ msgstr "Wykonane"
+
+#~ msgid "Enable"
+#~ msgstr "Umożliw"
+
+#~ msgid ""
+#~ "Errors have occurred while trying to save the files in the series\n"
+#~ "verify that the disk is not full and that has write permissions"
+#~ msgstr ""
+#~ "Wystąpił błąd podczas próby zapisu plików w serii \n"
+#~ "należy sprawdzić, czy dysk nie jest zapełniony oraz posiadanie uprawnień "
+#~ "do zapisu na nim."
+
+#~ msgid "First surface"
+#~ msgstr "Pierwsza powierzchnia"
+
+#~ msgid "Fit View"
+#~ msgstr "Dopasuj widok"
+
+#~ msgid "Flip Horizontal"
+#~ msgstr "Obróć w poziomie"
+
+#~ msgid "Flip Vertical"
+#~ msgstr "Obróć w pionie"
+
+#~ msgid "Hide"
+#~ msgstr "Ukryj"
+
+#~ msgid "Invert color map"
+#~ msgstr "Odwróć mapę kolorów (negatyw)"
+
+#~ msgid "Layout Setup"
+#~ msgstr "Układ - ustawienia"
+
+#~ msgid "Medical Diagnostic"
+#~ msgstr "Diagnostyka medyczna"
+
+#~ msgid "Physician"
+#~ msgstr "Lekarz"
+
+#~ msgid "Pixel value of first surface doesn't have a valid value"
+#~ msgstr "Piksel z pierwszej powierzchni nie ma poprawnej wartości."
+
+#~ msgid "Pixel value of second surface doesn't have a valid value"
+#~ msgstr "Piksel z drugiej powierzchni nie ma poprawnej wartości."
+
+#~ msgid "Quality"
+#~ msgstr "Jakość"
+
+#~ msgid "Reconstruction internal error"
+#~ msgstr "Błąd wewnętrzny rekonstrukcji"
+
+#~ msgid "Resolution"
+#~ msgstr "Rozdzielczość"
+
+#~ msgid "Rotate 90"
+#~ msgstr "Obróć o 90"
+
+#~ msgid "Save Frame"
+#~ msgstr "Zapisz ramkę"
+
+#~ msgid "Save current frame to new serie"
+#~ msgstr "Zapisz bieżącą ramkę do nowej serii"
+
+#~ msgid "Saving done"
+#~ msgstr "Zapisywanie zakończone"
+
+#~ msgid "Saving failed"
+#~ msgstr "Zapisywanie się nie powiodło"
+
+#~ msgid "Saving frame..."
+#~ msgstr "Zapisywanie ramki ..."
+
+#~ msgid "Second surface"
+#~ msgstr "Druga powierzchnia"
+
+#~ msgid "Select a diagnosis"
+#~ msgstr "Wybierz rozpoznanie"
+
+#~ msgid "Select diagnosis"
+#~ msgstr "Wybierz rozpoznanie"
+
+#~ msgid "Select diagnosis file"
+#~ msgstr "Wybierz plik rozpoznania"
+
+#~ msgid "Show/Hide corner annotations"
+#~ msgstr "Pokaż/ukryj adnotacje narożne"
+
+#~ msgid "Smooth"
+#~ msgstr "Gładki (Gładkość)"
+
+#~ msgid "Surface settings"
+#~ msgstr "Ustawienia powierzchni"
+
+#~ msgid "Surfaces"
+#~ msgstr "Powierzchnie"
+
+#~ msgid "Time"
+#~ msgstr "Czas"
+
+#~ msgid "Transparency level"
+#~ msgstr "Poziom przezroczystości"
+
+#~ msgid "UID"
+#~ msgstr "UID"
+
+#~ msgid "Update done"
+#~ msgstr "Aktualizacja wykonana"
+
+#~ msgid "Updating..."
+#~ msgstr "Auktualnienie trwa ..."
+
+#~ msgid "Value"
+#~ msgstr "Wartość"
+
+#~ msgid "Warning"
+#~ msgstr "Ostrzeżenie"
+
+#~ msgid "Window/Level"
+#~ msgstr "Okno/Poziom"
diff --git a/visualizator/lang/pt/visualizator.mo b/visualizator/lang/pt/visualizator.mo
new file mode 100644
index 0000000..6b95585
Binary files /dev/null and b/visualizator/lang/pt/visualizator.mo differ
diff --git a/visualizator/lang/pt/visualizator.po b/visualizator/lang/pt/visualizator.po
new file mode 100644
index 0000000..3d31d7f
--- /dev/null
+++ b/visualizator/lang/pt/visualizator.po
@@ -0,0 +1,439 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-06-11 15:55+0100\n"
+"PO-Revision-Date: 2014-06-11 15:55+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Portuguese <pt at li.org>\n"
+"Language: pt\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Poedit-Basepath: ../../\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr "Não foi possível carregar recursos PNG"
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr "Visualizador Gingko CADx é Código Aberto "
+
+#: visualizator.cpp:62
+msgid "Info"
+msgstr "Informação"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+msgid "Ginkgo CADx viewer"
+msgstr "Visualizador Ginkgo CADx "
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+msgid "Simple importation of images"
+msgstr "Importação simples de imagens"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+msgid "Medical viewer"
+msgstr "Visualizador médico "
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+msgid "Waveform viewer"
+msgstr "Visualizador de forma de onda "
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+msgid "Default importer"
+msgstr "Importação por defeito"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+msgid "Ginkgo CADx Image Report"
+msgstr "Relatório de imagem do Ginkgo CADx"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+msgid "Medical Image Viewer"
+msgstr "Visualizador de Imagem Médica"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+msgid "Error opening study"
+msgstr "Erro ao abrir estudo"
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+msgid "Performing tasks of integration ..."
+msgstr "A efectuar tarefas de integração..."
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+msgid "There are no overlays on this image"
+msgstr "Não existem sobreposições nesta imagem"
+
+#: visualizator/estudios/ecgstudy.cpp:380
+msgid "We are working to support "
+msgstr "Estamos a trabalhar no apoio a prestar"
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr "Freq. Ventricular:"
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr " BPM"
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr "Int. PR:"
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr " ms"
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr "Duração QRS:"
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr "QT\\QTc:"
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr "Taxas P - R - T:"
+
+#: visualizator/estudios/ecgstudy.cpp:489
+msgid "Measurements not found"
+msgstr "Medidas não encontradas"
+
+#: visualizator/estudios/ecgstudy.cpp:589
+msgid "ECG format not supported"
+msgstr "Formato de ECG não suportado"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr "Intervalo RR"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr "Intervalo PP"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "QTc Interval"
+msgstr "Intervalo QTc"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr "Freq. Ventricular"
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr "Regra \tCtrl+R"
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+msgid "Overlay layers"
+msgstr "Camadas de sobreposição"
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr "Reconstrução em 3D/4D"
+
+#: visualizator/tools/reconstructiontool.cpp:207
+msgid "3D MPR"
+msgstr "Reformatação multiplanar 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:213
+msgid "MIP 3D"
+msgstr "Projeção de intensidade máxima 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:219
+msgid "3D volume rendering"
+msgstr "Renderização de volume 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:225
+msgid "3D surface rendering"
+msgstr "Renderização de superfície 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:232
+msgid "3D endoscopy"
+msgstr "endoscopia 3D"
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr "Erro: Sistema sem memória. Feche alguns estudos para libertar memória."
+
+#: visualizator/widgets/wecgrule.cpp:595
+msgid "Length"
+msgstr "Comprimento"
+
+#: visualizator/widgets/wecgrule.cpp:600
+msgid "Points (I)"
+msgstr "Pontos (I)"
+
+#: visualizator/widgets/wecgrule.cpp:607
+msgid "Points (M)"
+msgstr "Pontos (M)"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr "Foi excedida a memória gráfica do sistema e não foi possível "
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid "Error configuring the grid"
+msgstr "Erro ao configurar a grelha"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr "Corte:"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr "Opções de visualização"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr "Sincronizar / (Des)sincronizar"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+"Erro: Sobrecarregou a memória do sistema gráfico e não foi possível carregar "
+"a imagem. Feche alguns estudos para libertar memória."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr "Visualizar no modo detalhado/expandido"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+msgid "Error: Internal error."
+msgstr "Erro Interno "
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+msgid "Area      : "
+msgstr "Área: "
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr "indeterminado"
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr "Perímetro:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+msgid "Position   : "
+msgstr "Posição :"
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+msgid "RGB ("
+msgstr "RGB"
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr "Classificação :"
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr "[DNorm="
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr "Posição do Centroide:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+msgid "Area:"
+msgstr "Área:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr "Perímetro:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr "Classificação: significa ="
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ", dev ="
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+msgid "Show/Hide metadata"
+msgstr "Mostra ou esconde metadados"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error loading study with ecg view"
+msgstr "Erro ao carregar estudo tipo ECG"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error"
+msgstr "Erro"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+msgid "Uploading to the PACS ..."
+msgstr "A carregar o estudo para o PACS... "
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+msgid "Upload series to PACS..."
+msgstr "Carregar series para o PACS..."
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, c-format
+msgid "%d series"
+msgstr "%d Series "
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr "Escolha a vista que deseja sincronizar com a actual"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr "Aceitar "
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr "Metadados "
+
+#: visualizator/estudios/ecgstudy.h:108
+msgid "Unknown"
+msgstr "Desconhecido "
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr "Extensão do Visualizator"
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+msgid "Synchronize..."
+msgstr "Sincronizar..."
+
+#~ msgid "/"
+#~ msgstr "/"
+
+#~ msgid "CT Muscle"
+#~ msgstr "CT Músculo"
+
+#~ msgid "CT Bone"
+#~ msgstr "CT Ossos"
+
+#~ msgid "Apply"
+#~ msgstr "Aplicar"
+
+#~ msgid "Apply reconstuction"
+#~ msgstr "Aplicar reconstrução"
+
+#~ msgid "CT - Bone"
+#~ msgstr "CT - Ossos"
+
+#~ msgid "CT - Muscle"
+#~ msgstr "CT - Músculo"
+
+#~ msgid "CT - Skin"
+#~ msgstr "CT - Pele"
+
+#~ msgid "Apply reconstruction"
+#~ msgstr "Aplicar reconstrução"
+
+#~ msgid "3D Surface"
+#~ msgstr "Superfície 3D"
+
+#~ msgid "Aborted"
+#~ msgstr "Abortado"
+
+#~ msgid "3D Volume Reconstruction"
+#~ msgstr "Reconstrução 3D"
+
+#~ msgid "3D MIP Reconstruction"
+#~ msgstr "Reconstrução 3D"
+
+#~ msgid "3D Surface Reconstruction"
+#~ msgstr "Reconstrução 3D"
+
+#~ msgid "Endoscopy"
+#~ msgstr "Endoscopia 3D"
+
+#~ msgid "3D reconstruction"
+#~ msgstr "Reconstrução 3D"
+
+#~ msgid "%m/%d/%Y"
+#~ msgstr "%d/%m/%Y"
+
+#~ msgid " Counter-ClockWise"
+#~ msgstr " Sentido anti-horário"
+
+#~ msgid " ClockWise"
+#~ msgstr " Sentido horário"
+
+#~ msgid ""
+#~ "\n"
+#~ "* Concatenation of patient name and surnames can't be higher than 61."
+#~ msgstr ""
+#~ "\n"
+#~ "* Concatenação do nome e sobrenomes do paciente não pode ser maior que 61."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The format of the height in centimeters is not correct. "
+#~ msgstr ""
+#~ "\n"
+#~ "* O formato da altura em centímetros não está correta. "
+
+#~ msgid ""
+#~ "\n"
+#~ "* The format of the weight is not correct. Valid range is between 0 and "
+#~ "400 Kg."
+#~ msgstr ""
+#~ "\n"
+#~ "* O formato da altura não está correto. A faixa válida é entre 0 e 400 Kg."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The patient ID is required."
+#~ msgstr ""
+#~ "\n"
+#~ "* O ID do paciente é necessário."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The patient's birth date is after the date of study"
+#~ msgstr ""
+#~ "\n"
+#~ "* A data de nascimento do paciente está após a data do estudo"
+
+#~ msgid ""
+#~ "\n"
+#~ "Would you like to retry?"
+#~ msgstr ""
+#~ "\n"
+#~ "Você gostaria de tentar novamente?"
+
+#~ msgid "(ID or medical history number)"
+#~ msgstr "(ID ou número do histórico médico)"
+
+#~ msgid "3D Volume"
+#~ msgstr "Volume 3D"
+
+#~ msgid "Birthday"
+#~ msgstr "Data de nascimento"
diff --git a/visualizator/lang/pt_BR/visualizator.mo b/visualizator/lang/pt_BR/visualizator.mo
new file mode 100644
index 0000000..e5675ad
Binary files /dev/null and b/visualizator/lang/pt_BR/visualizator.mo differ
diff --git a/visualizator/lang/pt_BR/visualizator.po b/visualizator/lang/pt_BR/visualizator.po
new file mode 100644
index 0000000..9cc470d
--- /dev/null
+++ b/visualizator/lang/pt_BR/visualizator.po
@@ -0,0 +1,488 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-06-11 15:55+0100\n"
+"PO-Revision-Date: 2014-06-11 15:55+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Brazilian Portuguese <pt_BR at li.org>\n"
+"Language: pt_BR\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Poedit-Basepath: ../../\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr ""
+
+#: visualizator.cpp:62
+#, fuzzy
+msgid "Info"
+msgstr "delegate has não tipo_devolvido info"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#, fuzzy
+msgid "Ginkgo CADx viewer"
+msgstr "Ginkgo CADx"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#, fuzzy
+msgid "Simple importation of images"
+msgstr "Tema monocrom�tico simples"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#, fuzzy
+msgid "Medical viewer"
+msgstr "(ID ou número do histórico médico)"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+msgid "Waveform viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+#, fuzzy
+msgid "Default importer"
+msgstr "padrão"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+#, fuzzy
+msgid "Ginkgo CADx Image Report"
+msgstr "Ginkgo CADx"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+#, fuzzy
+msgid "Medical Image Viewer"
+msgstr "(ID ou número do histórico médico)"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+#, fuzzy
+msgid "Error opening study"
+msgstr "erro ao abrir '%s'"
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+#, fuzzy
+msgid "Performing tasks of integration ..."
+msgstr "0 tarefas sendo executadas."
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+#, fuzzy
+msgid "There are no overlays on this image"
+msgstr "imagem"
+
+#: visualizator/estudios/ecgstudy.cpp:380
+#, fuzzy
+msgid "We are working to support "
+msgstr "Falha ao obter diretório de trabalho"
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr " BPM"
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr " ms"
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:489
+#, fuzzy
+msgid "Measurements not found"
+msgstr "Encontrado"
+
+#: visualizator/estudios/ecgstudy.cpp:589
+#, fuzzy
+msgid "ECG format not supported"
+msgstr "Encaminhamento de hrefs não é suportado"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "QTc Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr ""
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+#, fuzzy
+msgid "Overlay layers"
+msgstr "Imposs�vel criar a janela \"overlay\""
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr "Reconstrução em 3D/4D"
+
+#: visualizator/tools/reconstructiontool.cpp:207
+msgid "3D MPR"
+msgstr "MPR 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:213
+#, fuzzy
+msgid "MIP 3D"
+msgstr "MPR 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:219
+msgid "3D volume rendering"
+msgstr "Renderização de volume 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:225
+msgid "3D surface rendering"
+msgstr "Renderização de superfície 3D"
+
+#: visualizator/tools/reconstructiontool.cpp:232
+msgid "3D endoscopy"
+msgstr "Endoscopia 3D"
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:595
+#, fuzzy
+msgid "Length"
+msgstr "tamanho do arquivo armazenado n�o consta do cabe�alho Zip"
+
+#: visualizator/widgets/wecgrule.cpp:600
+#, fuzzy
+msgid "Points (I)"
+msgstr "%i de %i"
+
+#: visualizator/widgets/wecgrule.cpp:607
+#, fuzzy
+msgid "Points (M)"
+msgstr "Lista o tamanho das fontes em pontos."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+#, fuzzy
+msgid "Error configuring the grid"
+msgstr "Configurando ambiente ..."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr "Opções de Exibição"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr "Destruir Visualização"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+#, fuzzy
+msgid "Error: Internal error."
+msgstr "Erro Interno"
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+msgid "Area      : "
+msgstr "Área: "
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+#, fuzzy
+msgid "Position   : "
+msgstr "A posi��o da tabula��o."
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+#, fuzzy
+msgid "RGB ("
+msgstr "BMP: Não foi possível gravar mapa de cores RGB."
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+msgid "Area:"
+msgstr "Área:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ", dev ="
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+#, fuzzy
+msgid "Show/Hide metadata"
+msgstr "Mostrar/ocultar painel de navegação"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+#, fuzzy
+msgid "Error loading study with ecg view"
+msgstr "Erro ao carregar estudo: "
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error"
+msgstr "Erro"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+#, fuzzy
+msgid "Uploading to the PACS ..."
+msgstr "Erro ao carregar o estudo para o PACS: "
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+#, fuzzy
+msgid "Upload series to PACS..."
+msgstr "Enviar imagens para o servidor PACS"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, fuzzy, c-format
+msgid "%d series"
+msgstr "Exportando série %d de %d"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr "Aceitar"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr "Cancelar"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.h:108
+#, fuzzy
+msgid "Unknown"
+msgstr "Desconhecido"
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+msgid "Synchronize..."
+msgstr ""
+
+#~ msgid "/"
+#~ msgstr "/"
+
+#~ msgid "CT Muscle"
+#~ msgstr "CT Músculo"
+
+#~ msgid "CT Bone"
+#~ msgstr "CT Ossos"
+
+#~ msgid "Apply"
+#~ msgstr "Aplicar"
+
+#~ msgid "Apply reconstuction"
+#~ msgstr "Aplicar reconstrução"
+
+#~ msgid "CT - Bone"
+#~ msgstr "CT - Ossos"
+
+#~ msgid "CT - Muscle"
+#~ msgstr "CT - Músculo"
+
+#~ msgid "CT - Skin"
+#~ msgstr "CT - Pele"
+
+#~ msgid "Apply reconstruction"
+#~ msgstr "Aplicar reconstrução"
+
+#~ msgid "3D Surface"
+#~ msgstr "Superfície 3D"
+
+#~ msgid "Aborted"
+#~ msgstr "Abortado"
+
+#~ msgid "3D Volume Reconstruction"
+#~ msgstr "Reconstrução 3D"
+
+#~ msgid "3D MIP Reconstruction"
+#~ msgstr "Reconstrução 3D"
+
+#~ msgid "3D Surface Reconstruction"
+#~ msgstr "Reconstrução 3D"
+
+#~ msgid "Endoscopy"
+#~ msgstr "Endoscopia 3D"
+
+#~ msgid "3D reconstruction"
+#~ msgstr "Reconstrução 3D"
+
+#~ msgid "%m/%d/%Y"
+#~ msgstr "%d/%m/%Y"
+
+#~ msgid " Counter-ClockWise"
+#~ msgstr " Sentido anti-horário"
+
+#~ msgid " ClockWise"
+#~ msgstr " Sentido horário"
+
+#~ msgid ""
+#~ "\n"
+#~ "* Concatenation of patient name and surnames can't be higher than 61."
+#~ msgstr ""
+#~ "\n"
+#~ "* Concatenação do nome e sobrenomes do paciente não pode ser maior que 61."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The format of the height in centimeters is not correct. "
+#~ msgstr ""
+#~ "\n"
+#~ "* O formato da altura em centímetros não está correta. "
+
+#~ msgid ""
+#~ "\n"
+#~ "* The format of the weight is not correct. Valid range is between 0 and "
+#~ "400 Kg."
+#~ msgstr ""
+#~ "\n"
+#~ "* O formato da altura não está correto. A faixa válida é entre 0 e 400 Kg."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The patient ID is required."
+#~ msgstr ""
+#~ "\n"
+#~ "* O ID do paciente é necessário."
+
+#~ msgid ""
+#~ "\n"
+#~ "* The patient's birth date is after the date of study"
+#~ msgstr ""
+#~ "\n"
+#~ "* A data de nascimento do paciente está após a data do estudo"
+
+#~ msgid ""
+#~ "\n"
+#~ "Would you like to retry?"
+#~ msgstr ""
+#~ "\n"
+#~ "Você gostaria de tentar novamente?"
+
+#~ msgid "(ID or medical history number)"
+#~ msgstr "(ID ou número do histórico médico)"
+
+#~ msgid "3D Volume"
+#~ msgstr "Volume 3D"
+
+#~ msgid "Birthday"
+#~ msgstr "Data de nascimento"
+
+#~ msgid " VOIs detected."
+#~ msgstr " VOIs detectado."
+
+#~ msgid "Blend Mode"
+#~ msgstr "Modo de Mesclagem"
+
+#~ msgid "Color"
+#~ msgstr "Cor"
+
+#~ msgid "Comment:"
+#~ msgstr "Comentário:"
+
+#~ msgid "Cursor"
+#~ msgstr "Cursor"
+
+#~ msgid "Demo mode"
+#~ msgstr "Modo de demonstração"
+
+#~ msgid "Done"
+#~ msgstr "Concluído"
+
+#~ msgid "Enable"
+#~ msgstr "Ativar"
diff --git a/visualizator/lang/sr/visualizator.mo b/visualizator/lang/sr/visualizator.mo
new file mode 100644
index 0000000..4bc2538
Binary files /dev/null and b/visualizator/lang/sr/visualizator.mo differ
diff --git a/visualizator/lang/sr/visualizator.po b/visualizator/lang/sr/visualizator.po
new file mode 100644
index 0000000..107f7d2
--- /dev/null
+++ b/visualizator/lang/sr/visualizator.po
@@ -0,0 +1,600 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: ginkgo at metaemotion.com\n"
+"POT-Creation-Date: 2014-06-11 15:55+0100\n"
+"PO-Revision-Date: 2014-06-11 15:55+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Serbian <sr at li.org>\n"
+"Language: sr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: ../../\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: utf-8\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr "Приказивач Гинкго КАДикс-а је отвореног кода"
+
+#: visualizator.cpp:62
+msgid "Info"
+msgstr "Подаци"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+msgid "Ginkgo CADx viewer"
+msgstr "Прегледник Гинкго КАДикс-а"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+msgid "Simple importation of images"
+msgstr "Једноставан увоз слика"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+msgid "Medical viewer"
+msgstr "Медицински прегледник"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+msgid "Waveform viewer"
+msgstr "Прегледник таласног облика"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+msgid "Default importer"
+msgstr "Основни увозник"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+msgid "Ginkgo CADx Image Report"
+msgstr "Извештај о слици Гинкго КАДикс-са"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+msgid "Medical Image Viewer"
+msgstr "Прегледник медицинских слика"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+msgid "Error opening study"
+msgstr "Грешка отварања студије"
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+msgid "Performing tasks of integration ..."
+msgstr "Обављам задатке обједињавања ..."
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+msgid "There are no overlays on this image"
+msgstr "Нема преклапања на овој слици"
+
+#: visualizator/estudios/ecgstudy.cpp:380
+msgid "We are working to support "
+msgstr "Радимо на подршци "
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr " БПМ"
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr " ms"
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr "КуТ\\КуТц:      "
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr "П-Р-Т осе: "
+
+#: visualizator/estudios/ecgstudy.cpp:489
+msgid "Measurements not found"
+msgstr "Нисам пронашао мерења"
+
+#: visualizator/estudios/ecgstudy.cpp:589
+msgid "ECG format not supported"
+msgstr "ЕЦГ запис није подржан"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr "РР период"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr "ПП период"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "QTc Interval"
+msgstr "КуТц период"
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr ""
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+#, fuzzy
+msgid "Rule \tCtrl+R"
+msgstr "П-Р-Т осе: "
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+msgid "Overlay layers"
+msgstr "Слојеви прекривања"
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr "3Д/4Д обнова"
+
+#: visualizator/tools/reconstructiontool.cpp:207
+msgid "3D MPR"
+msgstr "3Д МПР"
+
+#: visualizator/tools/reconstructiontool.cpp:213
+msgid "MIP 3D"
+msgstr "МИП 3Д"
+
+#: visualizator/tools/reconstructiontool.cpp:219
+msgid "3D volume rendering"
+msgstr "Исцртавање 3Д запремине"
+
+#: visualizator/tools/reconstructiontool.cpp:225
+msgid "3D surface rendering"
+msgstr "Исцртавање 3Д површине"
+
+#: visualizator/tools/reconstructiontool.cpp:232
+msgid "3D endoscopy"
+msgstr "3Д ендоскопија"
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr ""
+"Грешка: Систем је остао без меморије. Затворите неке студије да ослободите "
+"меморију."
+
+#: visualizator/widgets/wecgrule.cpp:595
+#, fuzzy
+msgid "Length"
+msgstr ""
+"\n"
+"— Највећа дужина АЕТ-а је 16 знакова"
+
+#: visualizator/widgets/wecgrule.cpp:600
+msgid "Points (I)"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:607
+msgid "Points (M)"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr ""
+"Потрошена је видео меморија система и због тога није могуће доделити "
+"подешавање мреже. Затворите неке студије да ослободите меморију."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid "Error configuring the grid"
+msgstr "Грешка подешавања мреже"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr "Парче: "
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr "Могућности приказа"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr "Усклади/Врати усклађивање"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+"Грешка: Потрошили сте видео меморију система и због тога није могуће учитати "
+"слику. Затворите неке студије да ослободите меморију."
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr "Уништи преглед"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+msgid "Error: Internal error."
+msgstr "Грешка: Унутрашња грешка."
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+msgid "Area      : "
+msgstr "Област      : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr "неодређено"
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr "Обим : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+msgid "Position   : "
+msgstr "Положај   : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+msgid "RGB ("
+msgstr "РГБ ("
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr "Оцена   : "
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr "Положај тежишнице:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+msgid "Area:"
+msgstr "Област:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr "Обим:"
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr "Оцена: значи ="
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ", dev ="
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+msgid "Show/Hide metadata"
+msgstr "Прикажи/сакриј мета податке"
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error loading study with ecg view"
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error"
+msgstr "Грeшкa"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+#, fuzzy
+msgid "Uploading to the PACS ..."
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+#, fuzzy
+msgid "Upload series to PACS..."
+msgstr ""
+"\n"
+"— ИБ овог ПАЦС-а је у употреби"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, fuzzy, c-format
+msgid "%d series"
+msgstr " (слика — %d)"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr "Изаберите преглед који желите да ускладите са текућим"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr "Прихвати"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr "Откажи"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr "Метаподаци"
+
+#: visualizator/estudios/ecgstudy.h:108
+#, fuzzy
+msgid "Unknown"
+msgstr "<непознат ИБ>"
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+#, fuzzy
+msgid "Synchronize..."
+msgstr "Усклади/Врати усклађивање"
+
+#~ msgid "Play"
+#~ msgstr "Пусти"
+
+#~ msgid "Speed"
+#~ msgstr "Брзина"
+
+#~ msgid "Loop"
+#~ msgstr "Упетљај"
+
+#~ msgid "Repeat on end"
+#~ msgstr "Понови на крају"
+
+#~ msgid "Start playback"
+#~ msgstr "Започни пуштање"
+
+#~ msgid "Stop"
+#~ msgstr "Заустави"
+
+#~ msgid "End playback"
+#~ msgstr "Заврши пуштање"
+
+#~ msgid " VOIs detected."
+#~ msgstr " ВОИс је откривен."
+
+#~ msgid "/"
+#~ msgstr "/"
+
+#~ msgid "3D Surface"
+#~ msgstr "3Д површина"
+
+#~ msgid "Aborted"
+#~ msgstr "Прекинуто"
+
+#~ msgid "Apply"
+#~ msgstr "Примени"
+
+#~ msgid "Apply reconstruction"
+#~ msgstr "Примени обнову"
+
+#~ msgid "Apply reconstuction"
+#~ msgstr "Примени обнову"
+
+#~ msgid "Blend Mode"
+#~ msgstr "Режим стапања"
+
+#~ msgid "CT - Bone"
+#~ msgstr "ЦТ — Кост"
+
+#~ msgid "CT - Muscle"
+#~ msgstr "ЦТ — Мишић"
+
+#~ msgid "CT - Skin"
+#~ msgstr "ЦТ — Кожа"
+
+#~ msgid "CT Bone"
+#~ msgstr "ЦТ кост"
+
+#~ msgid "CT Muscle"
+#~ msgstr "ЦТ мишић"
+
+#~ msgid "CT Pressets"
+#~ msgstr "ЦТ претподешавања"
+
+#~ msgid "CT Skin"
+#~ msgstr "ЦТ кожа"
+
+#~ msgid "Color"
+#~ msgstr "Боја"
+
+#~ msgid "Color / alpha"
+#~ msgstr "Боја / алфа"
+
+#~ msgid "Comment:"
+#~ msgstr "Напомена:"
+
+#~ msgid "Computing VOIs...."
+#~ msgstr "Израчунавам ВОИс..."
+
+#~ msgid "Cursor"
+#~ msgstr "Курсор"
+
+#~ msgid "DICOM Tags"
+#~ msgstr "ДИЦОМ ознаке"
+
+#~ msgid "DataSet 0000/0000"
+#~ msgstr "Подешавање података 0000/0000"
+
+#~ msgid "Demo mode"
+#~ msgstr "Пробни режим"
+
+#~ msgid "Done"
+#~ msgstr "Урађено"
+
+#~ msgid "Enable"
+#~ msgstr "Укључи"
+
+#~ msgid "Enable/Disable Smoothing the high resolution input volume data."
+#~ msgstr ""
+#~ "Укључите/Искључите умекшавање података улазног волумена високе резолуције."
+
+#~ msgid "Enable/Disable Smoothing the low resolution resampled volume data."
+#~ msgstr ""
+#~ "Укључите/Искључите умекшавање података улазног волумена ниске резолуције."
+
+#~ msgid "Enable/Disable second surface"
+#~ msgstr "Укључи/искључи други површину"
+
+#~ msgid "Error extracting pdf, Ginkgo CADx is unable to load this format"
+#~ msgstr "Грешка извлачења пдф-а, Гинкго КАДикс не може да учита овај запис"
+
+#~ msgid "First surface"
+#~ msgstr "Прва површина"
+
+#~ msgid "Generating VOIs...."
+#~ msgstr "Стварам ВОИс...."
+
+#~ msgid "Hide"
+#~ msgstr "Сакриј"
+
+#~ msgid "Image without metric information"
+#~ msgstr "Слика без метричких података"
+
+#~ msgid "Image:"
+#~ msgstr "Слика:"
+
+#~ msgid "IsoSurface pixel value"
+#~ msgstr "Вредност тачкице исо површине"
+
+#~ msgid "Left"
+#~ msgstr "Лево"
+
+#~ msgid "MIP"
+#~ msgstr "МИП"
+
+#~ msgid "Made with %s"
+#~ msgstr "Направљено програмом „%s“"
+
+#~ msgid "Modality: "
+#~ msgstr "Начин: "
+
+#~ msgid "PDF files extracted successfully..."
+#~ msgstr "ПДФ датотека је успешно распакована..."
+
+#~ msgid "Patient Id: "
+#~ msgstr "ИБ пацијента: "
+
+#~ msgid "Patient: "
+#~ msgstr "Пацијент: "
+
+#~ msgid "Pixel value of first surface doesn't have a valid value"
+#~ msgstr "Вредност тачкица прве површине нема исправну вредност"
+
+#~ msgid "Pixel value of second surface doesn't have a valid value"
+#~ msgstr "Вредност тачкица друге површине нема исправну вредност"
+
+#~ msgid "Position:"
+#~ msgstr "Положај:"
+
+#~ msgid "Post-Smooth"
+#~ msgstr "Пост-умекшавање"
+
+#~ msgid "Pre-Smooth"
+#~ msgstr "Пре-умекшавање"
+
+#~ msgid "Quality"
+#~ msgstr "Квалитет"
+
+#~ msgid "Reconstruction internal error"
+#~ msgstr "Унутрашња грешка обнављања"
+
+#~ msgid "Rendering color"
+#~ msgstr "Боја исцртавања"
+
+#~ msgid "Resampled resolution: 32x32x32, 64x64x64, 128x128x128, 256x256x256"
+#~ msgstr ""
+#~ "Поново узоркована резолуција: 32x32x32, 64x64x64, 128x128x128, 256x256x256"
+
+#~ msgid "Reset"
+#~ msgstr "Врати"
+
+#~ msgid "Reset Camera"
+#~ msgstr "Врати фото-апарат"
+
+#~ msgid "Resolution"
+#~ msgstr "Резолуција"
+
+#~ msgid "Right"
+#~ msgstr "Десно"
+
+#~ msgid "Save Frame"
+#~ msgstr "Сачувај кадар"
+
+#~ msgid "Save current frame to new serie"
+#~ msgstr "Сачувајте текући кадар у нову серију"
+
+#~ msgid "Saving done"
+#~ msgstr "Чување је обављено"
+
+#~ msgid "Saving failed"
+#~ msgstr "Чување није успело"
+
+#~ msgid "Saving frame..."
+#~ msgstr "Чувам кадар..."
+
+#~ msgid "Second surface"
+#~ msgstr "Друга површина"
+
+#~ msgid "Sets the resampling resolution"
+#~ msgstr "Подесите резолуцију поновног узорковања"
+
+#~ msgid "Smooth"
+#~ msgstr "Глатко"
+
+#~ msgid "Stereo view"
+#~ msgstr "Стерео преглед"
+
+#~ msgid "Surface rendering color and transparency"
+#~ msgstr "Боја и провидност исцртавања површине"
+
+#~ msgid "Surface settings"
+#~ msgstr "Подешавања површине"
+
+#~ msgid "Surfaces"
+#~ msgstr "Површине"
+
+#~ msgid "There isn't any pdf reader registered in the system"
+#~ msgstr "На систему не постоји ни један пдф читач"
+
+#~ msgid "Transparency level"
+#~ msgstr "Ниво провидности"
+
+#~ msgid "Update done"
+#~ msgstr "Доградња је обављена"
+
+#~ msgid "Updating..."
+#~ msgstr "Дограђујем..."
+
+#~ msgid "Uploading..."
+#~ msgstr "Отпремам..."
+
+#~ msgid "Value"
+#~ msgstr "Вредност"
+
+#~ msgid "Value:"
+#~ msgstr "Вредност:"
+
+#~ msgid "Warning"
+#~ msgstr "Упозорење"
+
+#~ msgid "Window/Level"
+#~ msgstr "Прозор/Ниво"
diff --git a/visualizator/lang/tr/visualizator.mo b/visualizator/lang/tr/visualizator.mo
new file mode 100644
index 0000000..cfeead1
Binary files /dev/null and b/visualizator/lang/tr/visualizator.mo differ
diff --git a/visualizator/lang/tr/visualizator.po b/visualizator/lang/tr/visualizator.po
new file mode 100644
index 0000000..4d8c59d
--- /dev/null
+++ b/visualizator/lang/tr/visualizator.po
@@ -0,0 +1,398 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2014-06-11 15:55+0100\n"
+"PO-Revision-Date: 2014-06-11 15:55+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Turkish <tr at li.org>\n"
+"Language: tr\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: ../../\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Info"
+msgstr "Bilgi"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+msgid "Ginkgo CADx viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+msgid "Simple importation of images"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+msgid "Medical viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+msgid "Waveform viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+#, fuzzy
+msgid "Default importer"
+msgstr "Varsayılan"
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+msgid "Ginkgo CADx Image Report"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+msgid "Medical Image Viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+#, fuzzy
+msgid "Error opening study"
+msgstr "Hata"
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+msgid "Performing tasks of integration ..."
+msgstr ""
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+msgid "There are no overlays on this image"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:380
+msgid "We are working to support "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr "QT\\QTc:      "
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:489
+msgid "Measurements not found"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:589
+msgid "ECG format not supported"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+#, fuzzy
+msgid "QTc Interval"
+msgstr "QT\\QTc:      "
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr ""
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+msgid "Overlay layers"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:207
+msgid "3D MPR"
+msgstr "3D MPR"
+
+#: visualizator/tools/reconstructiontool.cpp:213
+#, fuzzy
+msgid "MIP 3D"
+msgstr "3D MPR"
+
+#: visualizator/tools/reconstructiontool.cpp:219
+#, fuzzy
+msgid "3D volume rendering"
+msgstr "3D MPR"
+
+#: visualizator/tools/reconstructiontool.cpp:225
+#, fuzzy
+msgid "3D surface rendering"
+msgstr "3D MPR"
+
+#: visualizator/tools/reconstructiontool.cpp:232
+#, fuzzy
+msgid "3D endoscopy"
+msgstr "3D MPR"
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:595
+msgid "Length"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:600
+msgid "Points (I)"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:607
+msgid "Points (M)"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+#, fuzzy
+msgid "Error configuring the grid"
+msgstr "Hata"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr "Görünüm Seçenekleri"
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+#, fuzzy
+msgid "Error: Internal error."
+msgstr "Hata"
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+msgid "Area      : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+msgid "Position   : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+msgid "RGB ("
+msgstr "RGB ("
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+msgid "Area:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+msgid "Show/Hide metadata"
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error loading study with ecg view"
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error"
+msgstr "Hata"
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+msgid "Uploading to the PACS ..."
+msgstr ""
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+msgid "Upload series to PACS..."
+msgstr ""
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, fuzzy, c-format
+msgid "%d series"
+msgstr "%m/%d/%Y"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr "Kabul et"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr "İptal"
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.h:108
+msgid "Unknown"
+msgstr ""
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+msgid "Synchronize..."
+msgstr ""
+
+#~ msgid "Image:"
+#~ msgstr "Görüntü:"
+
+#~ msgid "Value:"
+#~ msgstr "Değer:"
+
+#~ msgid "Quality"
+#~ msgstr "Kalite"
+
+#~ msgid "/"
+#~ msgstr "/"
+
+#~ msgid "Apply"
+#~ msgstr "Uygula"
+
+#~ msgid "Color"
+#~ msgstr "Renk"
+
+#~ msgid "Reset Camera"
+#~ msgstr "Kamerayı Sıfırla"
+
+#~ msgid "Hide"
+#~ msgstr "Gizle"
+
+#~ msgid "Reset"
+#~ msgstr "Sıfırla"
+
+#~ msgid "Done"
+#~ msgstr "Bitti"
+
+#~ msgid "Updating..."
+#~ msgstr "Güncelleniyor..."
+
+#~ msgid "Endoscopy"
+#~ msgstr "3D Endoskopi"
+
+#~ msgid "Name"
+#~ msgstr "İsim"
+
+#~ msgid "Birthday"
+#~ msgstr "Doğum günü"
+
+#~ msgid "Kg"
+#~ msgstr "Kg"
+
+#~ msgid "cm"
+#~ msgstr "cm"
+
+#~ msgid "Date"
+#~ msgstr "Tarih"
+
+#~ msgid "Description"
+#~ msgstr "Açıklama"
+
+#~ msgid "%m/%d/%Y"
+#~ msgstr "%m/%d/%Y"
+
+#~ msgid "Color Map"
+#~ msgstr "Renk Haritası"
diff --git a/visualizator/lang/visualizator.pot b/visualizator/lang/visualizator.pot
new file mode 100644
index 0000000..0ad43a3
--- /dev/null
+++ b/visualizator/lang/visualizator.pot
@@ -0,0 +1,331 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: ginkgo at metaemotion.com\n"
+"POT-Creation-Date: 2014-06-11 15:56+0100\n"
+"PO-Revision-Date: 2014-06-11 15:56+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: LANGUAGE <LL at li.org>\n"
+"Language: en_US\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-Generator: Poedit 1.6.5\n"
+"X-Launchpad-Export-Date: 2012-04-24 11:40+0000\n"
+"X-Poedit-Basepath: ../\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SourceCharset: UTF-8\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Info"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+msgid "Ginkgo CADx viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+msgid "Simple importation of images"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+msgid "Medical viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+msgid "Waveform viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+msgid "Default importer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+msgid "Ginkgo CADx Image Report"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+msgid "Medical Image Viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+msgid "Error opening study"
+msgstr ""
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+msgid "Performing tasks of integration ..."
+msgstr ""
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+msgid "There are no overlays on this image"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:380
+msgid "We are working to support "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:489
+msgid "Measurements not found"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:589
+msgid "ECG format not supported"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "QTc Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr ""
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+msgid "Overlay layers"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:207
+msgid "3D MPR"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:213
+msgid "MIP 3D"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:219
+msgid "3D volume rendering"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:225
+msgid "3D surface rendering"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:232
+msgid "3D endoscopy"
+msgstr ""
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:595
+msgid "Length"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:600
+msgid "Points (I)"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:607
+msgid "Points (M)"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid "Error configuring the grid"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+msgid "Error: Internal error."
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+msgid "Area      : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+msgid "Position   : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+msgid "RGB ("
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+msgid "Area:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+msgid "Show/Hide metadata"
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error loading study with ecg view"
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error"
+msgstr ""
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+msgid "Uploading to the PACS ..."
+msgstr ""
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+msgid "Upload series to PACS..."
+msgstr ""
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, c-format
+msgid "%d series"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.h:108
+msgid "Unknown"
+msgstr ""
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+msgid "Synchronize..."
+msgstr ""
diff --git a/visualizator/lang/zh_CN/visualizator.mo b/visualizator/lang/zh_CN/visualizator.mo
new file mode 100644
index 0000000..3cced19
Binary files /dev/null and b/visualizator/lang/zh_CN/visualizator.mo differ
diff --git a/visualizator/lang/zh_CN/visualizator.po b/visualizator/lang/zh_CN/visualizator.po
new file mode 100644
index 0000000..be71213
--- /dev/null
+++ b/visualizator/lang/zh_CN/visualizator.po
@@ -0,0 +1,328 @@
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: ginkgocadx\n"
+"Report-Msgid-Bugs-To: ginkgo at metaemotion.com\n"
+"POT-Creation-Date: 2014-06-11 15:56+0100\n"
+"PO-Revision-Date: 2014-06-11 15:56+0100\n"
+"Last-Translator: Carlos Barrales Ruiz <carlos.barrales at metaemotion.com>\n"
+"Language-Team: Chinese <zh at li.org>\n"
+"Language: zh\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"X-Generator: Poedit 1.6.5\n"
+"X-Poedit-Basepath: ../../\n"
+"X-Poedit-KeywordsList: _;_Std\n"
+"X-Poedit-SearchPath-0: .\n"
+
+#: resources/visualizatorresourcesmanager.cpp:37
+msgid "Unable to load PNG bitmap resource"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Ginkgo CADx visualizator is Open Source"
+msgstr ""
+
+#: visualizator.cpp:62
+msgid "Info"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+msgid "Ginkgo CADx viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:102
+msgid "Simple importation of images"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:103
+msgid "Medical viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:104
+#: visualizator/controllers/visualizatorcontroller.cpp:199
+#: visualizator/controllers/visualizatorcontroller.cpp:332
+msgid "Waveform viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:107
+msgid "Default importer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:110
+msgid "Ginkgo CADx Image Report"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:189
+#: visualizator/controllers/visualizatorcontroller.cpp:298
+msgid "Medical Image Viewer"
+msgstr ""
+
+#: visualizator/controllers/visualizatorcontroller.cpp:318
+#: visualizator/controllers/visualizatorcontroller.cpp:326
+#: visualizator/controllers/visualizatorcontroller.cpp:354
+#: visualizator/controllers/visualizatorcontroller.cpp:362
+msgid "Error opening study"
+msgstr ""
+
+#: visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp:86
+msgid "Performing tasks of integration ..."
+msgstr ""
+
+#: visualizator/dialogos/panelesherramientasaprimariabase.cpp:47
+msgid "There are no overlays on this image"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:380
+msgid "We are working to support "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:454
+msgid "Vent rate:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:456
+msgid " BPM"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:458
+msgid "PR int:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:460
+#: visualizator/estudios/ecgstudy.cpp:464
+#: visualizator/estudios/ecgstudy.cpp:468
+msgid " ms"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:462
+msgid "QRS dur:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:466
+msgid "QT\\QTc:      "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:470
+msgid "P-R-T axes: "
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:489
+msgid "Measurements not found"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:589
+msgid "ECG format not supported"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "RR Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "PP Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "QTc Interval"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.cpp:716
+msgid "Vent Rate"
+msgstr ""
+
+#: visualizator/export/tools/iecgruletool.cpp:19
+msgid "Rule \tCtrl+R"
+msgstr ""
+
+#: visualizator/export/tools/ioverlaystool.cpp:22
+msgid "Overlay layers"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:188
+msgid "3D/4D Reconstruction"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:207
+msgid "3D MPR"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:213
+msgid "MIP 3D"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:219
+msgid "3D volume rendering"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:225
+msgid "3D surface rendering"
+msgstr ""
+
+#: visualizator/tools/reconstructiontool.cpp:232
+msgid "3D endoscopy"
+msgstr ""
+
+#: visualizator/vistas/vista2d.cpp:117
+#: visualizator/vistas/waveformview.cpp:105
+#: visualizator/wxvtk/gvistacompleja.cpp:808
+msgid "Error: System out of memory. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:595
+msgid "Length"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:600
+msgid "Points (I)"
+msgstr ""
+
+#: visualizator/widgets/wecgrule.cpp:607
+msgid "Points (M)"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid ""
+"It has exhausted the system's video memory and has not been able to assign "
+"the grid configuration. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:203
+msgid "Error configuring the grid"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:396
+#: visualizator/wxvtk/gvistacompleja.cpp:403
+msgid "Slice: "
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:551
+msgid "Display Options"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:569
+msgid "Synchronize/Des synchronize"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:797
+msgid ""
+"Error: You have exhausted the system's video memory and has not been able to "
+"load the image. Close some studies to free memory."
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:799
+#: visualizator/wxvtk/gvistacompleja.cpp:810
+#: visualizator/wxvtk/gvistacompleja.cpp:817
+msgid "Destroy View"
+msgstr ""
+
+#: visualizator/wxvtk/gvistacompleja.cpp:815
+msgid "Error: Internal error."
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:420
+msgid "Area      : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:423
+msgid "undetermined"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:445
+msgid "Perimeter : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:480
+#: visualizator/wxvtk/gvistasimple.cpp:513
+#: visualizator/wxvtk/gvistasimple.cpp:600
+msgid "Position   : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:481
+msgid "RGB ("
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:528
+#: visualizator/wxvtk/gvistasimple.cpp:601
+msgid "Rating   : "
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:534
+msgid "[DNorm ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:552
+msgid "Centroid Pos:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:553
+msgid "Area:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:577
+msgid "Perimeter:"
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid "Rating: mean ="
+msgstr ""
+
+#: visualizator/wxvtk/gvistasimple.cpp:595
+msgid ", dev ="
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:179
+msgid "Show/Hide metadata"
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error loading study with ecg view"
+msgstr ""
+
+#: visualizator/wxvtk/gwaveformview.cpp:254
+msgid "Error"
+msgstr ""
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:129
+msgid "Uploading to the PACS ..."
+msgstr ""
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:152
+msgid "Upload series to PACS..."
+msgstr ""
+
+#: visualizator/wxvtk/previewpanelvisualizator.cpp:204
+#, c-format
+msgid "%d series"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:193
+msgid "Select the view you want to synchronize with the current"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:221
+msgid "Accept"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:224
+msgid "Cancel"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.cpp:294
+msgid "Metadata"
+msgstr ""
+
+#: visualizator/estudios/ecgstudy.h:108
+msgid "Unknown"
+msgstr ""
+
+#: visualizator/license.h:17
+msgid "Visualizator extension"
+msgstr ""
+
+#: visualizator/wxvtk/visualizatorviews.h:120
+msgid "Synchronize..."
+msgstr ""
diff --git a/visualizator/makepot.sh b/visualizator/makepot.sh
new file mode 100644
index 0000000..694d573
--- /dev/null
+++ b/visualizator/makepot.sh
@@ -0,0 +1,6 @@
+if [ -z "$1" ]; then
+	echo "uso: $0 <version>";
+	exit 1;
+fi
+
+cd lang && xgettext -s -d visualizator -L C++ --keyword=_ --keyword=_Std --copyright-holder="MetaEmotion S.L" --package-name="Ginkgo CADx Visualizator"  --package-version="$1" --msgid-bugs-address=ginkgo at metaemotion.com -o visualizator.pot `find .. -type f |grep -i 'cpp\|\.c$' |grep -v .svn`
diff --git a/visualizator/resources/files/3d_bar/ico_cursor3d.png b/visualizator/resources/files/3d_bar/ico_cursor3d.png
new file mode 100644
index 0000000..ee4cb38
Binary files /dev/null and b/visualizator/resources/files/3d_bar/ico_cursor3d.png differ
diff --git a/visualizator/resources/files/3d_bar/ico_demo.png b/visualizator/resources/files/3d_bar/ico_demo.png
new file mode 100644
index 0000000..3165489
Binary files /dev/null and b/visualizator/resources/files/3d_bar/ico_demo.png differ
diff --git a/visualizator/resources/files/3d_bar/ico_plegar.png b/visualizator/resources/files/3d_bar/ico_plegar.png
new file mode 100644
index 0000000..3215caa
Binary files /dev/null and b/visualizator/resources/files/3d_bar/ico_plegar.png differ
diff --git a/visualizator/resources/files/3d_bar/ico_stereo.png b/visualizator/resources/files/3d_bar/ico_stereo.png
new file mode 100644
index 0000000..f0388a7
Binary files /dev/null and b/visualizator/resources/files/3d_bar/ico_stereo.png differ
diff --git a/visualizator/resources/files/logos/logo_visualizator.png b/visualizator/resources/files/logos/logo_visualizator.png
new file mode 100644
index 0000000..635e3fe
Binary files /dev/null and b/visualizator/resources/files/logos/logo_visualizator.png differ
diff --git a/visualizator/resources/files/synchronization_bar/ico_dessincronizar.png b/visualizator/resources/files/synchronization_bar/ico_dessincronizar.png
new file mode 100644
index 0000000..ce79979
Binary files /dev/null and b/visualizator/resources/files/synchronization_bar/ico_dessincronizar.png differ
diff --git a/visualizator/resources/files/tool_icons/ico_capas.png b/visualizator/resources/files/tool_icons/ico_capas.png
new file mode 100644
index 0000000..7267af8
Binary files /dev/null and b/visualizator/resources/files/tool_icons/ico_capas.png differ
diff --git a/visualizator/resources/files/tool_icons/ico_ecg_metadata.png b/visualizator/resources/files/tool_icons/ico_ecg_metadata.png
new file mode 100644
index 0000000..daf0bbf
Binary files /dev/null and b/visualizator/resources/files/tool_icons/ico_ecg_metadata.png differ
diff --git a/visualizator/resources/files/tool_icons/ico_menu_imagen.png b/visualizator/resources/files/tool_icons/ico_menu_imagen.png
new file mode 100644
index 0000000..931448c
Binary files /dev/null and b/visualizator/resources/files/tool_icons/ico_menu_imagen.png differ
diff --git a/visualizator/resources/files/tool_icons/ico_reset.png b/visualizator/resources/files/tool_icons/ico_reset.png
new file mode 100644
index 0000000..0de2656
Binary files /dev/null and b/visualizator/resources/files/tool_icons/ico_reset.png differ
diff --git a/visualizator/resources/visualizatorresourcesmanager.cpp b/visualizator/resources/visualizatorresourcesmanager.cpp
new file mode 100644
index 0000000..d1b2357
--- /dev/null
+++ b/visualizator/resources/visualizatorresourcesmanager.cpp
@@ -0,0 +1,130 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/globals.h>
+#include <api/ientorno.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/internationalization/internationalization.h>
+
+#include "visualizatorresourcesmanager.h"
+
+#include <wx/bitmap.h>
+#include <wx/image.h>
+#include <wx/animate.h>
+#include <wx/filename.h>
+
+static wxString bundleDir(wxString(wxT("resources")) + wxFileName::GetPathSeparator() + wxT("visualizator"));
+
+static wxString ToolIconsDir(wxT("tool_icons"));
+static wxString LogosDir(wxT("logos"));
+static wxString T3DBarDir(wxT("3d_bar"));
+static wxString SynchronizationBarDir(wxT("synchronization_bar"));
+
+static void LoadPNG(wxBitmap& bmp, const wxString& section, const wxString& filename)
+{
+        wxString path = wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetGinkgoResourcesDir().c_str()) + wxFileName::GetPathSeparator() + bundleDir + wxFileName::GetPathSeparator() + section + wxFileName::GetPathSeparator() + filename;
+        if (!bmp.LoadFile(path, wxBITMAP_TYPE_PNG)) {
+                LOG_ERROR("Visualizator/Resources", _Std("Unable to load PNG bitmap resource") << ": " << std::string(path.ToUTF8()));
+        }
+}
+/*
+static void LoadPNG(wxImage& img, const wxString& section, const wxString& filename) {
+	wxString path = wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetGinkgoResourcesDir().c_str()) + wxFileName::GetPathSeparator() + bundleDir + wxFileName::GetPathSeparator() + section + wxFileName::GetPathSeparator() + filename;
+	if (!img.LoadFile(path, wxBITMAP_TYPE_PNG)) {
+		LOG_ERROR("Visualizator/Resources", _Std("Unable to load PNG image resource") << ": " << std::string(path.ToUTF8()));
+	}
+}
+
+static void LoadGIF(wxAnimation& anim, const wxString& section, const wxString& filename) {
+	wxString path = wxString::FromUTF8(GNC::GCS::IEntorno::Instance()->GetGinkgoResourcesDir().c_str()) + wxFileName::GetPathSeparator() + bundleDir + wxFileName::GetPathSeparator() + section + wxFileName::GetPathSeparator() + filename;
+	if (!anim.LoadFile(path, wxANIMATION_TYPE_GIF)) {
+		LOG_ERROR("Visualizator/Resources", _Std("Unable to load GIF animation resource") << ": " << std::string(path.ToUTF8()));
+	}
+}
+*/
+
+// Tool Icons
+wxBitmap GNKVisualizator::ResourcesManager::ToolIcons::GetIcoCapas()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_capas.png"));
+        return bmp;
+}
+wxBitmap GNKVisualizator::ResourcesManager::ToolIcons::GetIcoReset()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_reset.png"));
+        return bmp;
+}
+wxBitmap GNKVisualizator::ResourcesManager::ToolIcons::GetIcoMenuImagen()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_menu_imagen.png"));
+        return bmp;
+}
+wxBitmap GNKVisualizator::ResourcesManager::ToolIcons::GetIcoECGMetadata()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, ToolIconsDir, wxT("ico_ecg_metadata.png"));
+        return bmp;
+}
+
+// Logos
+wxBitmap GNKVisualizator::ResourcesManager::Logos::GetIcoVisualizator()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, LogosDir, wxT("logo_visualizator.png"));
+        return bmp;
+}
+
+// 3D Bar
+wxBitmap GNKVisualizator::ResourcesManager::T3DBar::GetIco3DArrow()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, T3DBarDir, wxT("ico_cursor3d.png"));
+        return bmp;
+}
+wxBitmap GNKVisualizator::ResourcesManager::T3DBar::GetIcoStereo()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, T3DBarDir, wxT("ico_stereo.png"));
+        return bmp;
+}
+wxBitmap GNKVisualizator::ResourcesManager::T3DBar::GetIcoPin()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, T3DBarDir, wxT("ico_plegar.png"));
+        return bmp;
+}
+wxBitmap GNKVisualizator::ResourcesManager::T3DBar::GetIcoDemo()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, T3DBarDir, wxT("ico_demo.png"));
+        return bmp;
+}
+
+// Synchronization Bar
+wxBitmap GNKVisualizator::ResourcesManager::SynchronizationBar::GetIcoDessincronizar()
+{
+        wxBitmap bmp;
+        LoadPNG(bmp, SynchronizationBarDir, wxT("ico_dessincronizar.png"));
+        return bmp;
+}
diff --git a/visualizator/resources/visualizatorresourcesmanager.h b/visualizator/resources/visualizatorresourcesmanager.h
new file mode 100644
index 0000000..46ea019
--- /dev/null
+++ b/visualizator/resources/visualizatorresourcesmanager.h
@@ -0,0 +1,62 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <wx/bitmap.h>
+
+namespace GNKVisualizator
+{
+class ResourcesManager
+{
+
+public:
+        class ToolIcons
+        {
+        public:
+                static wxBitmap GetIcoCapas();
+                static wxBitmap GetIcoReset();
+                static wxBitmap GetIcoMenuImagen();
+                static wxBitmap GetIcoECGMetadata();
+        };
+
+        class T3DBar
+        {
+        public:
+                static wxBitmap GetIco3DArrow();
+                static wxBitmap GetIcoStereo();
+                static wxBitmap GetIcoPin();
+                static wxBitmap GetIcoDemo();
+        };
+
+        class SynchronizationBar
+        {
+        public:
+                static wxBitmap GetIcoDessincronizar();
+        };
+
+        class Logos
+        {
+        public:
+                static wxBitmap GetIcoVisualizator();
+        };
+
+
+};
+}
diff --git a/visualizator/visualizator.cpp b/visualizator/visualizator.cpp
new file mode 100644
index 0000000..eb6c026
--- /dev/null
+++ b/visualizator/visualizator.cpp
@@ -0,0 +1,71 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <iostream>
+
+#include <api/ientorno.h>
+#include <api/internationalization/internationalization.h>
+#include <api/controllers/icontroladorlog.h>
+
+#include <visualizator/license.h>
+#include "visualizator/controllers/visualizatorcontroller.h"
+
+#include <resources/visualizatorresourcesmanager.h>
+
+#include "visualizator.h"
+
+#include <wx/msgdlg.h>
+
+#if defined(_WIN32) && defined(_GINKGO_DEBUG) && !defined(_WIN32_WINNT_WIN7)
+//#include <vld.h>
+#endif
+
+#if defined(MONOLITIC)
+PrivateExtension* init_VisualizatorExtension()
+{
+        return new GNKVisualizatorExtension();
+}
+#else
+#error UNSUPPORTED
+IMPLEMENT_PrivateExtension(GNKVisualizatorExtension)
+#endif
+
+GNKVisualizatorExtension::GNKVisualizatorExtension() : PrivateExtension(EXT_SID, EXT_PROVIDER, EXT_DESCRIPTION, EXT_UPDATEURL)
+{
+}
+
+GNKVisualizatorExtension::~GNKVisualizatorExtension()
+{
+}
+PrivateExtension::TListControllers GNKVisualizatorExtension::InitializeLibrary(GNC::GCS::IEntorno* pEntorno)
+{
+        PrivateExtension::TListControllers list;
+        list.push_back(new GNKVisualizator::ControladorAtencionPrimaria(pEntorno));
+        return list;
+}
+bool GNKVisualizatorExtension::IsActive()
+{
+        return true;
+}
+void GNKVisualizatorExtension::ShowActivationDialog(wxWindow* /*pParent*/)
+{
+        wxMessageBox(_("Ginkgo CADx visualizator is Open Source"), _("Info"));
+}
+
diff --git a/visualizator/visualizator.h b/visualizator/visualizator.h
new file mode 100644
index 0000000..996b366
--- /dev/null
+++ b/visualizator/visualizator.h
@@ -0,0 +1,38 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <prvext/prvext.h>
+
+#include <wx/dynlib.h>
+#include <api/imodulo.h>
+
+class GNKVisualizatorExtension : public PrivateExtension
+{
+public :
+        GNKVisualizatorExtension();
+        ~GNKVisualizatorExtension();
+        virtual PrivateExtension::TListControllers InitializeLibrary(GNC::GCS::IEntorno* pEntorno);
+        virtual bool IsActive();
+        virtual void ShowActivationDialog(wxWindow* pParent);
+};
+
+PrivateExtension* init_VisualizatorExtension();
diff --git a/visualizator/visualizator.vcxproj b/visualizator/visualizator.vcxproj
new file mode 100644
index 0000000..c098d52
--- /dev/null
+++ b/visualizator/visualizator.vcxproj
@@ -0,0 +1,703 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="DebugDynamicPro|Win32">
+      <Configuration>DebugDynamicPro</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="DebugDynamicPro|x64">
+      <Configuration>DebugDynamicPro</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="DebugMonoliticOS|Win32">
+      <Configuration>DebugMonoliticOS</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="DebugMonoliticOS|x64">
+      <Configuration>DebugMonoliticOS</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="DebugMonoliticPro|Win32">
+      <Configuration>DebugMonoliticPro</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="DebugMonoliticPro|x64">
+      <Configuration>DebugMonoliticPro</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseDynamicPro|Win32">
+      <Configuration>ReleaseDynamicPro</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseDynamicPro|x64">
+      <Configuration>ReleaseDynamicPro</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseMonoliticOpenSource|Win32">
+      <Configuration>ReleaseMonoliticOpenSource</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseMonoliticOpenSource|x64">
+      <Configuration>ReleaseMonoliticOpenSource</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseMonoliticPro|Win32">
+      <Configuration>ReleaseMonoliticPro</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="ReleaseMonoliticPro|x64">
+      <Configuration>ReleaseMonoliticPro</Configuration>
+      <Platform>x64</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{489A2BBD-64A0-4E2F-B700-B18B71680593}</ProjectGuid>
+    <RootNamespace>dermatologia</RootNamespace>
+    <Keyword>ManagedCProj</Keyword>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v90</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v90</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v90</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'" Label="Configuration">
+    <ConfigurationType>StaticLibrary</ConfigurationType>
+    <PlatformToolset>v90</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'" Label="Configuration">
+    <ConfigurationType>DynamicLibrary</ConfigurationType>
+    <PlatformToolset>v110</PlatformToolset>
+    <CharacterSet>Unicode</CharacterSet>
+    <CLRSupport>false</CLRSupport>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'" Label="PropertySheets">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <_ProjectFileVersion>11.0.50727.1</_ProjectFileVersion>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">
+    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">
+    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">
+    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">
+    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">
+    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">
+    <EnableManagedIncrementalBuild>true</EnableManagedIncrementalBuild>
+    <OutDir>$(SolutionDir)$(Platform)\$(Configuration)\</OutDir>
+    <IntDir>$(Platform)\$(Configuration)\</IntDir>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|x64'">
+    <CustomBuildStep>
+      <Command>cd $(OutDir)
+cd ..
+rundll32 Plugins\$(TargetFileName),BuildDescriptor Plugins $(TargetName)
+</Command>
+      <Inputs>$(OutDir)$(TargetFileName).dll;%(Inputs)</Inputs>
+      <Outputs>$(OutDir)$(TargetFileName).inf;%(Outputs)</Outputs>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;..\visualizator;.\;..\..\lib\Windows-x64\WX-2.8.11\mswu;..\..\lib\Windows-x64\WX-2.8.11\include;..\..\lib\Windows-x64\VTK-5.10.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;USE_PATCHED_LIBS;GINKGO_PRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>true</BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <ProjectReference>
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>
+    </ProjectReference>
+    <Link>
+      <AdditionalDependencies>wxbase28ud_net.lib;wxmsw28ud_aui.lib;wxmsw28ud_media.lib;wxmsw28ud_qa.lib;wxmsw28ud_richtext.lib;wxmsw28ud_xrc.lib;wxmsw28ud_adv.lib;wxmsw28ud_html.lib;wxbase28ud_xml.lib;wxmsw28ud_core.lib;wxbase28ud.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;vtkCommon.lib;vtkRendering.lib;vtkexpat.lib;vtkFiltering.lib;vtkfreetype.lib;vtkftgl.lib;vtkGenericFiltering.lib;vtkGraphics.lib;vtkHybrid.lib;vtkImaging.lib;vtkIO.lib;vtkjpeg.lib;vtk [...]
+      <AdditionalLibraryDirectories>..\..\lib\Windows-x86\cairowin32\cairowin32\Debug\;..\..\lib\Windows-x86\WX-2.8.11\lib;..\..\lib\Windows-x86\VTK-5.10.0\lib\debug;..\..\lib\Windows-x86\ITK-3.20.0\lib\debug;Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AssemblyDebug>true</AssemblyDebug>
+    </Link>
+    <PostBuildEvent>
+      <Command>
+      </Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugDynamicPro|Win32'">
+    <CustomBuildStep>
+      <Command>cd $(OutDir)
+cd ..
+rundll32 Plugins\$(TargetFileName),BuildDescriptor Plugins $(TargetName)
+</Command>
+      <Inputs>$(OutDir)$(TargetFileName).dll;%(Inputs)</Inputs>
+      <Outputs>$(OutDir)$(TargetFileName).inf;%(Outputs)</Outputs>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;.\;..\..\lib\Windows-x86\WX-2.8.11\mswu;..\..\lib\Windows-x86\WX-2.8.11\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;USE_PATCHED_LIBS;GINKGO_PRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>true</BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <ProjectReference>
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>
+    </ProjectReference>
+    <Link>
+      <AdditionalDependencies>wxbase28ud_net.lib;wxmsw28ud_aui.lib;wxmsw28ud_media.lib;wxmsw28ud_qa.lib;wxmsw28ud_richtext.lib;wxmsw28ud_xrc.lib;wxmsw28ud_adv.lib;wxmsw28ud_html.lib;wxbase28ud_xml.lib;wxmsw28ud_core.lib;wxbase28ud.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;vtkCommon.lib;vtkRendering.lib;vtkexpat.lib;vtkFiltering.lib;vtkfreetype.lib;vtkftgl.lib;vtkGenericFiltering.lib;vtkGraphics.lib;vtkHybrid.lib;vtkImaging.lib;vtkIO.lib;vtkjpeg.lib;vtk [...]
+      <AdditionalLibraryDirectories>..\..\lib\Windows-x86\cairowin32\cairowin32\Debug\;..\..\lib\Windows-x86\WX-2.8.11\lib;..\..\lib\Windows-x86\VTK-5.10.0\lib\debug;..\..\lib\Windows-x86\ITK-3.20.0\lib\debug;Debug;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AssemblyDebug>true</AssemblyDebug>
+    </Link>
+    <PostBuildEvent>
+      <Command>
+      </Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">
+    <CustomBuildStep>
+      <Command>cd $(OutDir)
+cd ..
+rundll32 Plugins\$(TargetFileName),BuildDescriptor Plugins $(TargetName)
+</Command>
+      <Inputs>$(OutDir)$(TargetFileName).dll;%(Inputs)</Inputs>
+      <Outputs>$(OutDir)$(TargetFileName).inf;%(Outputs)</Outputs>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;..\visualizator;.\;..\..\lib\Windows-x64\WX-2.8.11\mswu;..\..\lib\Windows-x64\WX-2.8.11\include;..\..\lib\Windows-x64\VTK-5.10.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;USE_PATCHED_LIBS;GINKGO_PRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>false</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <ProjectReference>
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>
+    </ProjectReference>
+    <Link>
+      <AdditionalDependencies>wxbase28u_net.lib;wxmsw28u_aui.lib;wxmsw28u_media.lib;wxmsw28u_qa.lib;wxmsw28u_richtext.lib;wxmsw28u_xrc.lib;wxmsw28u_adv.lib;wxmsw28u_html.lib;wxbase28u_xml.lib;wxmsw28u_core.lib;wxbase28u.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;vtkCommon.lib;vtkRendering.lib;vtkexpat.lib;vtkFiltering.lib;vtkfreetype.lib;vtkftgl.lib;vtkGenericFiltering.lib;vtkGraphics.lib;vtkHybrid.lib;vtkImaging.lib;vtkIO.lib;vtkjpeg.lib;vtklibxml2.lib;vtkme [...]
+      <AdditionalLibraryDirectories>..\..\lib\Windows-x86\cairowin32\cairowin32\Release;..\..\lib\Windows-x86\WX-2.8.11\lib;..\..\lib\Windows-x86\VTK-5.10.0\lib\release;..\..\lib\Windows-x86\ITK-3.20.0\lib\release;Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>
+      </OptimizeReferences>
+      <LinkTimeCodeGeneration>
+      </LinkTimeCodeGeneration>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">
+    <CustomBuildStep>
+      <Command>cd $(OutDir)
+cd ..
+rundll32 Plugins\$(TargetFileName),BuildDescriptor Plugins $(TargetName)
+</Command>
+      <Inputs>$(OutDir)$(TargetFileName).dll;%(Inputs)</Inputs>
+      <Outputs>$(OutDir)$(TargetFileName).inf;%(Outputs)</Outputs>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;.\;..\..\lib\Windows-x86\WX-2.8.11\mswu;..\..\lib\Windows-x86\WX-2.8.11\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;USE_PATCHED_LIBS;GINKGO_PRO;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>false</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <ProjectReference>
+      <LinkLibraryDependencies>true</LinkLibraryDependencies>
+    </ProjectReference>
+    <Link>
+      <AdditionalDependencies>wxbase28u_net.lib;wxmsw28u_aui.lib;wxmsw28u_media.lib;wxmsw28u_qa.lib;wxmsw28u_richtext.lib;wxmsw28u_xrc.lib;wxmsw28u_adv.lib;wxmsw28u_html.lib;wxbase28u_xml.lib;wxmsw28u_core.lib;wxbase28u.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;vtkCommon.lib;vtkRendering.lib;vtkexpat.lib;vtkFiltering.lib;vtkfreetype.lib;vtkftgl.lib;vtkGenericFiltering.lib;vtkGraphics.lib;vtkHybrid.lib;vtkImaging.lib;vtkIO.lib;vtkjpeg.lib;vtklibxml2.lib;vtkme [...]
+      <AdditionalLibraryDirectories>..\..\lib\Windows-x86\cairowin32\cairowin32\Release;..\..\lib\Windows-x86\WX-2.8.11\lib;..\..\lib\Windows-x86\VTK-5.10.0\lib\release;..\..\lib\Windows-x86\ITK-3.20.0\lib\release;Release;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <GenerateDebugInformation>false</GenerateDebugInformation>
+      <SubSystem>Windows</SubSystem>
+      <OptimizeReferences>
+      </OptimizeReferences>
+      <LinkTimeCodeGeneration>
+      </LinkTimeCodeGeneration>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">
+    <CustomBuildStep>
+      <Command>
+      </Command>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;..\visualizator;.\;..\..\lib\Windows-x64\WX-2.8.11\mswu;..\..\lib\Windows-x64\WX-2.8.11\include;..\..\lib\Windows-x64\VTK-5.10.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;CAIRO_WIN32_STATIC_BUILD;WXUSINGDLL;USE_PATCHED_LIBS;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">
+    <CustomBuildStep>
+      <Command>
+      </Command>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;.\;..\..\lib\Windows-x86\WX-3.0.1\mswu;..\..\lib\Windows-x86\WX-3.0.1\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK-3 [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;CAIRO_WIN32_STATIC_BUILD;USE_PATCHED_LIBS;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>true</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>StreamingSIMDExtensions2</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">
+    <CustomBuildStep>
+      <Command>
+      </Command>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;..\visualizator;.\;..\..\lib\Windows-x64\WX-3.0.1\mswud;..\..\lib\Windows-x64\WX-3.0.1\include;..\..\lib\Windows-x64\VTK-5.10.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib\ [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;USE_PATCHED_LIBS;GINKGO_PRO;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>true</BrowseInformation>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <MultiProcessorCompilation>false</MultiProcessorCompilation>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <MinimalRebuild>true</MinimalRebuild>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+    </ClCompile>
+    <PostBuildEvent>
+      <Command>
+      </Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">
+    <CustomBuildStep>
+      <Command>
+      </Command>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;..\visualizator;.\;..\..\lib\Windows-x64\WX-3.0.0\mswud;..\..\lib\Windows-x64\WX-3.0.0\include;..\..\lib\Windows-x64\VTK-5.10.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib\ [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;USE_PATCHED_LIBS;GINKGO_PRO;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>true</BrowseInformation>
+      <WarningLevel>Level4</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+      <MultiProcessorCompilation>false</MultiProcessorCompilation>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <MinimalRebuild>true</MinimalRebuild>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+    </ClCompile>
+    <PostBuildEvent>
+      <Command>
+      </Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">
+    <CustomBuildStep>
+      <Command>
+      </Command>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;.\;..\..\lib\Windows-x86\WX-3.0.1\mswud;..\..\lib\Windows-x86\WX-3.0.1\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK- [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;USE_PATCHED_LIBS;GINKGO_PRO;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>true</BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <PostBuildEvent>
+      <Command>
+      </Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">
+    <CustomBuildStep>
+      <Command>
+      </Command>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Disabled</Optimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;.\;..\..\lib\Windows-x86\WX-3.0.1\mswud;..\..\lib\Windows-x86\WX-3.0.1\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK- [...]
+      <PreprocessorDefinitions>WIN32;_DEBUG;__WXMSW__;__WXDEBUG__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;_GINKGO_DEBUG;CAIRO_WIN32_STATIC_BUILD;USE_PATCHED_LIBS;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
+      <RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>true</BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+    <PostBuildEvent>
+      <Command>
+      </Command>
+    </PostBuildEvent>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">
+    <CustomBuildStep>
+      <Command>
+      </Command>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;..\visualizator;.\;..\..\lib\Windows-x64\WX-3.0.1\mswu;..\..\lib\Windows-x64\WX-3.0.1\include;..\..\lib\Windows-x64\VTK-5.10.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include;..\..\lib\Windows-x64\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x64\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x64\ITK-3.20.0\include\Common;..\..\lib\W [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;CAIRO_WIN32_STATIC_BUILD;USE_PATCHED_LIBS;GINKGO_PRO;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>false</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">
+    <CustomBuildStep>
+      <Command>
+      </Command>
+    </CustomBuildStep>
+    <ClCompile>
+      <Optimization>Full</Optimization>
+      <InlineFunctionExpansion>AnySuitable</InlineFunctionExpansion>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <FavorSizeOrSpeed>Speed</FavorSizeOrSpeed>
+      <OmitFramePointers>true</OmitFramePointers>
+      <EnableFiberSafeOptimizations>true</EnableFiberSafeOptimizations>
+      <WholeProgramOptimization>false</WholeProgramOptimization>
+      <AdditionalIncludeDirectories>..\cadxcore\VTKInria3D;..\cadxcore\VTKInria3D\vtkVISUManagement;..\cadxcore\VTKInria3D\wxVTK;..\cadxcore\wx\VTK;..\cadxcore\vtk;..\cadxcore\itk;..\cadxcore;.\;..\..\lib\Windows-x86\WX-3.0.1\mswu;..\..\lib\Windows-x86\WX-3.0.1\include;..\..\lib\Windows-x86\ITK-3.20.0\include;..\..\lib\Windows-x86\ITK-3.20.0\include\Algorithms;..\..\lib\Windows-x86\ITK-3.20.0\include\BasicFilters;..\..\lib\Windows-x86\ITK-3.20.0\include\Common;..\..\lib\Windows-x86\ITK-3 [...]
+      <PreprocessorDefinitions>WIN32;NDEBUG;__WXMSW__;_WINDOWS;NOPCH;USING_MODULES;_CFE_;CAIRO_WIN32_STATIC_BUILD;USE_PATCHED_LIBS;GINKGO_PRO;MONOLITIC;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <StringPooling>false</StringPooling>
+      <MinimalRebuild>false</MinimalRebuild>
+      <RuntimeLibrary>MultiThreadedDLL</RuntimeLibrary>
+      <BufferSecurityCheck>false</BufferSecurityCheck>
+      <FunctionLevelLinking>false</FunctionLevelLinking>
+      <EnableEnhancedInstructionSet>NotSet</EnableEnhancedInstructionSet>
+      <FloatingPointModel>Precise</FloatingPointModel>
+      <PrecompiledHeader>Use</PrecompiledHeader>
+      <PrecompiledHeaderFile>visustdafx.h</PrecompiledHeaderFile>
+      <BrowseInformation>
+      </BrowseInformation>
+      <WarningLevel>Level3</WarningLevel>
+      <DebugInformationFormat>
+      </DebugInformationFormat>
+      <ForcedIncludeFiles>visustdafx.h;%(ForcedIncludeFiles)</ForcedIncludeFiles>
+    </ClCompile>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ClCompile Include="resources\visualizatorresourcesmanager.cpp" />
+    <ClCompile Include="visualizator.cpp" />
+    <ClCompile Include="visualizator\export\tools\iecgruletool.cpp" />
+    <ClCompile Include="visualizator\tools\ecgruletool.cpp" />
+    <ClCompile Include="visualizator\widgets\wecgrule.cpp" />
+    <ClCompile Include="visustdafx.cpp">
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticPro|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='DebugMonoliticOS|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseDynamicPro|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticOpenSource|Win32'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|x64'">Create</PrecompiledHeader>
+      <PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='ReleaseMonoliticPro|Win32'">Create</PrecompiledHeader>
+    </ClCompile>
+    <ClCompile Include="visualizator\controllers\visualizatorcontroller.cpp" />
+    <ClCompile Include="visualizator\dialogos\contenedorherramientas.cpp" />
+    <ClCompile Include="visualizator\dialogos\panelesherramientasaprimariabase.cpp" />
+    <ClCompile Include="visualizator\dialogos\importacion\selectimagesimportationvisualizator.cpp" />
+    <ClCompile Include="visualizator\vistas\vista2d.cpp" />
+    <ClCompile Include="visualizator\vistas\waveformview.cpp" />
+    <ClCompile Include="visualizator\wxvtk\gvistacompleja.cpp" />
+    <ClCompile Include="visualizator\wxvtk\gvistasimple.cpp" />
+    <ClCompile Include="visualizator\wxvtk\gwaveformview.cpp" />
+    <ClCompile Include="visualizator\wxvtk\previewpanelvisualizator.cpp" />
+    <ClCompile Include="visualizator\wxvtk\visualizatorviews.cpp" />
+    <ClCompile Include="visualizator\estudios\ecgstudy.cpp" />
+    <ClCompile Include="visualizator\estudios\globalmeasurement.cpp" />
+    <ClCompile Include="visualizator\estudios\globalmeasurements.cpp" />
+    <ClCompile Include="visualizator\estudios\visualizatorstudy.cpp" />
+    <ClCompile Include="visualizator\export\contracts\ioverlayscontract.cpp" />
+    <ClCompile Include="visualizator\export\contracts\ioverlayscontractable.cpp" />
+    <ClCompile Include="visualizator\export\tools\ioverlaystool.cpp" />
+    <ClCompile Include="visualizator\tools\overlaystool.cpp" />
+    <ClCompile Include="visualizator\widgets\wecg.cpp" />
+    <ClCompile Include="visualizator_test\visualizatortest.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="resources\visualizatorresourcesmanager.h" />
+    <ClInclude Include="visualizator.h" />
+    <ClInclude Include="visualizator\export\tools\iecgruletool.h" />
+    <ClInclude Include="visualizator\tools\ecgruletool.h" />
+    <ClInclude Include="visualizator\widgets\wecgrule.h" />
+    <ClInclude Include="visustdafx.h" />
+    <ClInclude Include="visualizator\license.h" />
+    <ClInclude Include="visualizator\controllers\visualizatorcontroller.h" />
+    <ClInclude Include="visualizator\dialogos\contenedorherramientas.h" />
+    <ClInclude Include="visualizator\dialogos\panelesherramientasaprimariabase.h" />
+    <ClInclude Include="visualizator\dialogos\importacion\selectimagesimportationvisualizator.h" />
+    <ClInclude Include="visualizator\vistas\vista2d.h" />
+    <ClInclude Include="visualizator\vistas\waveformview.h" />
+    <ClInclude Include="visualizator\wxvtk\gvistacompleja.h" />
+    <ClInclude Include="visualizator\wxvtk\gvistasimple.h" />
+    <ClInclude Include="visualizator\wxvtk\gwaveformview.h" />
+    <ClInclude Include="visualizator\wxvtk\previewpanelvisualizator.h" />
+    <ClInclude Include="visualizator\wxvtk\visualizatorviews.h" />
+    <ClInclude Include="visualizator\eventos\changeposition.h" />
+    <ClInclude Include="visualizator\eventos\overlays.h" />
+    <ClInclude Include="visualizator\eventos\sincronizacion.h" />
+    <ClInclude Include="visualizator\eventos\visualizatorevents.h" />
+    <ClInclude Include="visualizator\eventos\zoom.h" />
+    <ClInclude Include="visualizator\estudios\ecgstudy.h" />
+    <ClInclude Include="visualizator\estudios\globalmeasurement.h" />
+    <ClInclude Include="visualizator\estudios\globalmeasurements.h" />
+    <ClInclude Include="visualizator\estudios\overlay.h" />
+    <ClInclude Include="visualizator\estudios\visualizatorstudy.h" />
+    <ClInclude Include="visualizator\export\contracts\ioverlayscontract.h" />
+    <ClInclude Include="visualizator\export\contracts\ioverlayscontractable.h" />
+    <ClInclude Include="visualizator\export\tools\ioverlaystool.h" />
+    <ClInclude Include="visualizator\tools\overlaystool.h" />
+    <ClInclude Include="visualizator\widgets\wecg.h" />
+    <ClInclude Include="visualizator_test\visualizatortest.h" />
+  </ItemGroup>
+  <ItemGroup>
+    <ProjectReference Include="..\cadxcore\cadxcore.vcxproj">
+      <Project>{51617602-e33c-4a52-941e-3e3302de4447}</Project>
+      <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
+    </ProjectReference>
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>
\ No newline at end of file
diff --git a/visualizator/visualizator.vcxproj.filters b/visualizator/visualizator.vcxproj.filters
new file mode 100644
index 0000000..db5722e
--- /dev/null
+++ b/visualizator/visualizator.vcxproj.filters
@@ -0,0 +1,244 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Resources">
+      <UniqueIdentifier>{bac80409-bc29-4ab1-a02f-e187838b32f2}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Source\visualizator">
+      <UniqueIdentifier>{952c64a7-98f8-4c07-bf42-a80d6fe50d75}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\controllers">
+      <UniqueIdentifier>{3a82d602-bafe-4339-bf01-aeabfde36677}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\dialogos">
+      <UniqueIdentifier>{2278410e-191d-4e7c-856e-752652c0620d}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\dialogos\importacion">
+      <UniqueIdentifier>{fe50e9dd-be36-427d-937d-0abb241741bc}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\vistas">
+      <UniqueIdentifier>{9381e327-01ec-4a51-b6ab-62876ed6d893}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\wxvtk">
+      <UniqueIdentifier>{8b2c9b8d-08d3-4d21-a89a-521dc9618461}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\eventos">
+      <UniqueIdentifier>{9b1d6666-3a5b-4d58-9e17-dca9a6b4a802}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\estudios">
+      <UniqueIdentifier>{0b7d459d-7b35-4d59-8fb6-5002eb3cb7f6}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\export">
+      <UniqueIdentifier>{7b7a771d-a8a0-4df8-9e7a-0e0a59ad32d4}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\export\contracts">
+      <UniqueIdentifier>{332fb7aa-11d7-4179-b410-ff9bed7e6ff9}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\export\tools">
+      <UniqueIdentifier>{dedf701a-a032-49e3-a82c-fa74cc12c405}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\tools">
+      <UniqueIdentifier>{f7babfc5-eccf-40fd-af62-ab2700c8dfea}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\widgets">
+      <UniqueIdentifier>{eec2a698-1eb0-4e93-bfc1-5270dd30ea9a}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator\commands">
+      <UniqueIdentifier>{7cea56a3-30e0-466c-9151-c71639720286}</UniqueIdentifier>
+    </Filter>
+    <Filter Include="Source\visualizator_test">
+      <UniqueIdentifier>{4978ca13-cd69-40d2-a71f-b9c63be8efba}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="resources\visualizatorresourcesmanager.cpp">
+      <Filter>Resources</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator.cpp">
+      <Filter>Source</Filter>
+    </ClCompile>
+    <ClCompile Include="visustdafx.cpp">
+      <Filter>Source</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\controllers\visualizatorcontroller.cpp">
+      <Filter>Source\visualizator\controllers</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\dialogos\contenedorherramientas.cpp">
+      <Filter>Source\visualizator\dialogos</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\dialogos\panelesherramientasaprimariabase.cpp">
+      <Filter>Source\visualizator\dialogos</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\dialogos\importacion\selectimagesimportationvisualizator.cpp">
+      <Filter>Source\visualizator\dialogos\importacion</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\vistas\vista2d.cpp">
+      <Filter>Source\visualizator\vistas</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\vistas\waveformview.cpp">
+      <Filter>Source\visualizator\vistas</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\wxvtk\gvistacompleja.cpp">
+      <Filter>Source\visualizator\wxvtk</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\wxvtk\gvistasimple.cpp">
+      <Filter>Source\visualizator\wxvtk</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\wxvtk\gwaveformview.cpp">
+      <Filter>Source\visualizator\wxvtk</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\wxvtk\previewpanelvisualizator.cpp">
+      <Filter>Source\visualizator\wxvtk</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\wxvtk\visualizatorviews.cpp">
+      <Filter>Source\visualizator\wxvtk</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\estudios\ecgstudy.cpp">
+      <Filter>Source\visualizator\estudios</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\estudios\globalmeasurement.cpp">
+      <Filter>Source\visualizator\estudios</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\estudios\globalmeasurements.cpp">
+      <Filter>Source\visualizator\estudios</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\estudios\visualizatorstudy.cpp">
+      <Filter>Source\visualizator\estudios</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\export\contracts\ioverlayscontract.cpp">
+      <Filter>Source\visualizator\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\export\contracts\ioverlayscontractable.cpp">
+      <Filter>Source\visualizator\export\contracts</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\export\tools\ioverlaystool.cpp">
+      <Filter>Source\visualizator\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\tools\overlaystool.cpp">
+      <Filter>Source\visualizator\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\widgets\wecg.cpp">
+      <Filter>Source\visualizator\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator_test\visualizatortest.cpp">
+      <Filter>Source\visualizator_test</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\widgets\wecgrule.cpp">
+      <Filter>Source\visualizator\widgets</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\export\tools\iecgruletool.cpp">
+      <Filter>Source\visualizator\export\tools</Filter>
+    </ClCompile>
+    <ClCompile Include="visualizator\tools\ecgruletool.cpp">
+      <Filter>Source\visualizator\tools</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="resources\visualizatorresourcesmanager.h">
+      <Filter>Resources</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator.h">
+      <Filter>Source</Filter>
+    </ClInclude>
+    <ClInclude Include="visustdafx.h">
+      <Filter>Source</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\license.h">
+      <Filter>Source\visualizator</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\controllers\visualizatorcontroller.h">
+      <Filter>Source\visualizator\controllers</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\dialogos\contenedorherramientas.h">
+      <Filter>Source\visualizator\dialogos</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\dialogos\panelesherramientasaprimariabase.h">
+      <Filter>Source\visualizator\dialogos</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\dialogos\importacion\selectimagesimportationvisualizator.h">
+      <Filter>Source\visualizator\dialogos\importacion</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\vistas\vista2d.h">
+      <Filter>Source\visualizator\vistas</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\vistas\waveformview.h">
+      <Filter>Source\visualizator\vistas</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\wxvtk\gvistacompleja.h">
+      <Filter>Source\visualizator\wxvtk</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\wxvtk\gvistasimple.h">
+      <Filter>Source\visualizator\wxvtk</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\wxvtk\gwaveformview.h">
+      <Filter>Source\visualizator\wxvtk</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\wxvtk\previewpanelvisualizator.h">
+      <Filter>Source\visualizator\wxvtk</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\wxvtk\visualizatorviews.h">
+      <Filter>Source\visualizator\wxvtk</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\eventos\changeposition.h">
+      <Filter>Source\visualizator\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\eventos\overlays.h">
+      <Filter>Source\visualizator\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\eventos\sincronizacion.h">
+      <Filter>Source\visualizator\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\eventos\visualizatorevents.h">
+      <Filter>Source\visualizator\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\eventos\zoom.h">
+      <Filter>Source\visualizator\eventos</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\estudios\ecgstudy.h">
+      <Filter>Source\visualizator\estudios</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\estudios\globalmeasurement.h">
+      <Filter>Source\visualizator\estudios</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\estudios\globalmeasurements.h">
+      <Filter>Source\visualizator\estudios</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\estudios\overlay.h">
+      <Filter>Source\visualizator\estudios</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\estudios\visualizatorstudy.h">
+      <Filter>Source\visualizator\estudios</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\export\contracts\ioverlayscontract.h">
+      <Filter>Source\visualizator\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\export\contracts\ioverlayscontractable.h">
+      <Filter>Source\visualizator\export\contracts</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\export\tools\ioverlaystool.h">
+      <Filter>Source\visualizator\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\tools\overlaystool.h">
+      <Filter>Source\visualizator\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\widgets\wecg.h">
+      <Filter>Source\visualizator\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator_test\visualizatortest.h">
+      <Filter>Source\visualizator_test</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\widgets\wecgrule.h">
+      <Filter>Source\visualizator\widgets</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\export\tools\iecgruletool.h">
+      <Filter>Source\visualizator\export\tools</Filter>
+    </ClInclude>
+    <ClInclude Include="visualizator\tools\ecgruletool.h">
+      <Filter>Source\visualizator\tools</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>
\ No newline at end of file
diff --git a/visualizator/visualizator/controllers/visualizatorcontroller.cpp b/visualizator/visualizator/controllers/visualizatorcontroller.cpp
new file mode 100644
index 0000000..bf35d96
--- /dev/null
+++ b/visualizator/visualizator/controllers/visualizatorcontroller.cpp
@@ -0,0 +1,393 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/wx.h>
+#include <wx/notebook.h>
+#include <wx/dir.h>
+#include <wx/file.h>
+#include <set>
+#include "visualizatorcontroller.h"
+
+#include <visualizator/tools/overlaystool.h>
+#include <visualizator/tools/ecgruletool.h>
+
+#include <visualizator/dialogos/contenedorherramientas.h>
+#include <main/gui/import/generaldata.h>
+#include <main/gui/import/importationdata.h>
+#include <main/gui/history3/synchronizedialog.h>
+#include "../vistas/vista2d.h"
+#include "../vistas/waveformview.h"
+#include <visualizator/estudios/visualizatorstudy.h>
+#include <visualizator/license.h>
+
+#include <api/ientorno.h>
+#include <api/ivista.h>
+#include <api/dicom/imodelodicom.h>
+#include <api/integration/dict.h>
+#include <api/controllers/icontroladorcarga.h>
+#include <visualizator/dialogos/importacion/selectimagesimportationvisualizator.h>
+
+#include <api/controllers/icontroladorpermisos.h>
+
+#include <api/toolsystem/itoolsregistry.h>
+
+#include <api/controllers/ipacscontroller.h>
+#include <api/controllers/icontroladorvistas.h>
+
+#include <api/controllers/icontroladorcarga.h>
+#include <main/controllers/controladorcarga.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/historycontroller.h>
+#include <main/controllers/hangingprotocolcontroller.h>
+#include <commands/pdfextractercommand.h>
+#include <commands/comandopacs.h>
+
+#include <vector>
+#include <string>
+#include <sstream>
+#include <iostream>
+
+#include <api/controllers/icontroladorinternacionalizacion.h>
+#include <resources/visualizatorresourcesmanager.h>
+#include "../export/tagsprivados.h"
+#include <api/dicom/dcmuiddictionary.h>
+#include <main/controllers/anonusagestats.h>
+
+namespace GNKVisualizator
+{
+class GNKVisualizatorControllerMode: public GNC::GCS::ModoControlador
+{
+public:
+        //GNKVisualizatorControllerMode: defines ways of Dicom viewing of this extension
+        //id: unique in this controller
+        //listaModalidades: modality supporting list
+        //abreSeriesSueltas: true if it opens series, false if it opens studies
+        //bitmap: bitmap of this mode (for visualization purposes)
+        GNKVisualizatorControllerMode(int id, const std::string& descripcion, TipoListaModalidades listaModalidades, TipoListaUIDsImportacion listaUIDsImportacion, wxBitmap * bitmap = NULL):GNC::GCS::ModoControlador(id, descripcion, listaModalidades, listaUIDsImportacion, bitmap, GNC::GCS::ModoControlador::THSL_ONLY_REGULAR)
+        {
+        }
+        ~GNKVisualizatorControllerMode() {}
+
+        //returns true if this mode supports this pair of modality-transfer syntax
+        virtual bool SupportsModalityFile(const std::string &modalidad, const std::string& transferSyntax) const
+        {
+                for(TipoListaModalidades::const_iterator it = m_listaModalidades.begin(); it!= m_listaModalidades.end(); ++it) {
+                        if((*it) == modalidad && !(transferSyntax == "1.2.840.10008.1.2.4.100" || transferSyntax == "1.2.840.10008.1.2.4.101")) {
+                                return true;
+                        }
+                }
+                return false;
+        }
+};
+}
+
+
+/* Constructor */
+GNKVisualizator::ControladorAtencionPrimaria::ControladorAtencionPrimaria(GNC::GCS::IEntorno* pEntorno) : GNC::GCS::IModuleController(pEntorno, EXT_SID, 0)
+{
+        //primero de todo registramos nuestro catalogo para la internacionalizacion de las cadenas
+        {
+                pEntorno->GetControladorInternacionalizacion()->AddCatalog("visualizator");
+        }
+
+        //registramos los permisos
+        m_pEntorno->GetControladorPermisos()->AddDefinicionPermiso("atencionprimaria",_Std("Ginkgo CADx viewer"), "dicomizador",_Std("Simple importation of images"),false, "", true);
+        m_pEntorno->GetControladorPermisos()->AddDefinicionPermiso("atencionprimaria",_Std("Ginkgo CADx viewer"),"vista2d",_Std("Medical viewer"), false, "", true);
+        m_pEntorno->GetControladorPermisos()->AddDefinicionPermiso("atencionprimaria",_Std("Ginkgo CADx viewer"),"waveform",_Std("Waveform viewer"), false, "", true);
+
+        m_pEntorno = pEntorno;
+        m_ImporterDescription = _Std("Default importer");
+
+        // Codigos LOINC de los informes de A. Primaria.
+        m_ListaInformes.push_back(GNC::GCS::IdHL7("TUID" + m_UID, "0", _Std("Ginkgo CADx Image Report"), "LN", "", "","v1.0"));
+
+        //registrar herramientas
+        GNC::GCS::IToolsRegistry::Instance()->RegisterTool(new GNKVisualizator::OverlaysTool());
+        GNC::GCS::IToolsRegistry::Instance()->RegisterTool(new GNKVisualizator::ECGRuleTool());
+}
+
+GNKVisualizator::ControladorAtencionPrimaria::~ControladorAtencionPrimaria()
+{
+        for (ListaModos::iterator it = m_ListaModos.begin(); it != m_ListaModos.end(); ++it) {
+                delete (*it);
+        }
+        m_ListaModos.clear();
+
+#if defined(_GINKGO_DEBUG) && defined(_WINDOWS)
+        //cairo_debug_reset_static_data();
+        //_CrtDumpMemoryLeaks();
+#endif
+}
+
+void GNKVisualizator::ControladorAtencionPrimaria::RegistrarVistas()
+{
+        int idModo = 0;
+        GNC::GCS::ModoControlador::TipoListaModalidades listaModalidades;
+        //TODO meter las modalidades que soporta...
+        listaModalidades.push_back(std::string("MR")); //resonancia
+        listaModalidades.push_back(std::string("CR")); //computed radiography
+        listaModalidades.push_back(std::string("US")); //ultrasonido
+        listaModalidades.push_back(std::string("BI")); //biomagnetic image
+        listaModalidades.push_back(std::string("CT")); //computed tomography
+        listaModalidades.push_back(std::string("XA")); //XRAY angiografia
+        listaModalidades.push_back(std::string("SC")); //secondary capture
+        listaModalidades.push_back(std::string("NM")); //nuclear medicine
+        listaModalidades.push_back(std::string("CD")); //Color flow doppler
+        listaModalidades.push_back(std::string("DD")); //Duplex Doppler
+        listaModalidades.push_back(std::string("DG")); //Diaphanography
+        listaModalidades.push_back(std::string("ES")); //Endoscopy
+        listaModalidades.push_back(std::string("LS")); //Laser surface scan
+        listaModalidades.push_back(std::string("PT")); //Positron emission tomography (PET)
+        listaModalidades.push_back(std::string("RG")); //Radiographic imaging
+        listaModalidades.push_back(std::string("ST")); //Single-photon emission computed tomography (SPECT)
+        listaModalidades.push_back(std::string("MG")); //Mammography
+        listaModalidades.push_back(std::string("IO")); //Intra-Oral
+        listaModalidades.push_back(std::string("TG")); //Thermography
+        listaModalidades.push_back(std::string("RF")); //Radio Fluoroscopy
+        listaModalidades.push_back(std::string("RTIMAGE")); //Radiotherapy Image
+        listaModalidades.push_back(std::string("RTDOSE")); //Radiotherapy Dose
+        listaModalidades.push_back(std::string("RTSTRUCT")); //Radiotherapy Structure Set
+        listaModalidades.push_back(std::string("RTPLAN")); //Radiotherapy Plan
+        listaModalidades.push_back(std::string("RTRECORD")); //RT Treatment Record
+        listaModalidades.push_back(std::string("HC")); //Hard Copy
+        listaModalidades.push_back(std::string("DX")); //Digital Radiography
+        listaModalidades.push_back(std::string("PX")); //Panoramic X-Ray
+        listaModalidades.push_back(std::string("GM")); //General Microscopy
+        listaModalidades.push_back(std::string("SM")); //Slide Microscopy
+        listaModalidades.push_back(std::string("XC")); //External-camera Photography
+        listaModalidades.push_back(std::string("DOC")); //DOCUMENT (PDF, WORD...)
+        listaModalidades.push_back(std::string("PR")); //Presentation State
+        //listaModalidades.push_back(std::string("SR")); //SR Document
+        listaModalidades.push_back(std::string("IVUS")); //Intravascular Ultrasound
+        listaModalidades.push_back(std::string("OP")); //Stereometric Relationship
+        listaModalidades.push_back(std::string("OT")); //Other
+        listaModalidades.push_back(std::string("SMR")); //Intra-oral Radiography
+        listaModalidades.push_back(std::string("OCT")); //Optical Coherence Tomography
+        listaModalidades.push_back(std::string("OT"));  //Other
+        listaModalidades.push_back(std::string("OPR")); //Ophthalmic Refraction
+        listaModalidades.push_back(std::string("OPV")); //Ophthalmic Visual Field
+        listaModalidades.push_back(std::string("OPM")); //Ophthalmic Mapping
+        listaModalidades.push_back(std::string("KO"));  //Key Object Selection
+        listaModalidades.push_back(std::string("SEG")); //Segmentation
+        listaModalidades.push_back(std::string("REG")); //Registration
+        listaModalidades.push_back(std::string("OPT")); //Ophthalmic Tomography
+        listaModalidades.push_back(std::string("BDUS"));//Bone Densitometry (ultrasound)
+        listaModalidades.push_back(std::string("BMD")); //Bone Densitometry (X-Ray)
+
+        GNC::GCS::ModoControlador::TipoListaUIDsImportacion listaUIDsImportacion;
+        listaUIDsImportacion.push_back(EXT_IMPORTER_SID);
+
+        if(m_pEntorno->GetControladorPermisos()->Get("atencionprimaria", "vista2d")) {
+                m_ListaModos.push_back(new GNKVisualizatorControllerMode(idModo++, _Std("Medical Image Viewer"), listaModalidades, listaUIDsImportacion));
+        }
+
+        listaModalidades.clear();
+        listaModalidades.push_back(std::string("ECG")); //Electrocardiography
+        listaModalidades.push_back(std::string("EC")); //Electrocardiography
+        listaModalidades.push_back(std::string("HD")); //Hemodynamic Waveform
+
+        listaUIDsImportacion.clear();
+        if(m_pEntorno->GetControladorPermisos()->Get("atencionprimaria", "waveform")) {
+                m_ListaModos.push_back(new GNC::GCS::ModoControlador(idModo++, _Std("Waveform viewer"), listaModalidades, listaUIDsImportacion));
+        }
+}
+
+
+bool GNKVisualizator::ControladorAtencionPrimaria::SupportsImportationUID(const std::string &importationUID)
+{
+        return (importationUID == EXT_IMPORTER_SID);
+}
+
+//helper opening...
+GNC::GCS::IVista* OpenMedicalImageViewer(const std::set<long>& seriesPk, wxWindow* pParent, GNC::GCS::IEntorno* pEntorno, GNC::GCS::IModuleController* pModule, const GNC::GCS::Ptr<GNC::GCS::Layout>& hangingLayout, const GNC::GCS::Ptr<GNC::GCS::HangingProtocol>& hangingProtocol)
+{
+        LOG_STAT(ANON_STAT_VIEW_OS)
+        wxWindowDisabler disabler;
+        GNC::GCS::Ptr<GNKVisualizator::VisualizatorStudy> estudio = new GNKVisualizator::VisualizatorStudy();
+        estudio->OpenedSeries.insert(estudio->OpenedSeries.begin(), seriesPk.begin(), seriesPk.end());
+        estudio->Module = pModule;
+        estudio->hangingLayout = hangingLayout;
+        estudio->hangingProtocol = hangingProtocol;
+        estudio->ParentWindow = pParent;
+        estudio->InitializeContext(*seriesPk.begin());
+        GNC::GCS::IVista* pVista = new GNKVisualizator::Vista2D(estudio);
+        pEntorno->GetControladorVistas()->Registrar(pVista);
+        pEntorno->GetControladorCarga()->CargaAsincrona(pVista);
+        return pVista;
+}
+
+/* Abre un estudio de manera no interactiva desde un directorio y devuelve su controlador específico */
+GNC::GCS::IVista* GNKVisualizator::ControladorAtencionPrimaria::OpenView(int modo, GNC::GCS::IHistoryController::SeriesModelList& series, GNC::GCS::Ptr<GNC::GCS::HangingProtocol> hangingProtocol)
+{
+        GNC::GCS::IVista* pVista = NULL;
+
+        if (modo < 0 || modo >= (int) m_ListaModos.size()) {
+                //TODO: Excepción
+                return NULL;
+        }
+
+        //si no se soporta alguna modalidad pues se ignora
+        std::set<long> pkSeries;
+        bool wadoLinked = false;
+        {
+                for(GNC::GCS::IHistoryController::SeriesModelList::iterator it = series.begin(); it!= series.end(); ++it) {
+                        for (GNC::GCS::IHistoryController::StringList::iterator itTsyntax = (*it).tsuids.begin(); itTsyntax != (*it).tsuids.end(); ++itTsyntax) {
+                                if(m_ListaModos[modo]->SupportsModalityFile((*it).series_modality, (*itTsyntax))) {
+                                        pkSeries.insert((*it).pk);
+                                        if ((*it).location == GNC::GCS::IHistoryController::TL_WadoLinked) {
+                                                wadoLinked = true;
+                                        }
+                                }
+                        }
+                }
+        }
+
+        if (wadoLinked) {
+                //show dialog then download and open again
+                std::list<long> listOfPk;
+                listOfPk.insert(listOfPk.begin(), pkSeries.begin(), pkSeries.end());
+                GNC::GUI::SynchronizeDialog dlg(m_pEntorno->GetVentanaRaiz(), listOfPk, this, modo, hangingProtocol);
+                dlg.ShowModal();
+                return NULL;
+        }
+
+        //first of all open pdf...
+        std::set<long> tmpPk = pkSeries;
+        pkSeries.clear();
+        for(std::set<long>::iterator it = tmpPk.begin(); it!= tmpPk.end(); ++it) {
+                GNC::GCS::IHistoryController::LightFileModelList fileModels;
+                GNC::GCS::HistoryController::Instance()->GetSeriesSortedFileModels((*it), fileModels);
+                if (fileModels.size() == 0) {
+                        return NULL;
+                }
+
+                //if it's pdf...
+                std::list<std::string> paths;
+                bool isPdf = false;
+                for (GNC::GCS::IHistoryController::LightFileModelList::iterator itFile = fileModels.begin(); itFile != fileModels.end(); ++itFile) {
+                        paths.push_back((*itFile).real_path);
+                        if ((*itFile).sopcuid == GKUID_EncapsulatedPDFStorage) {
+                                isPdf = true;
+                        }
+                }
+                if (isPdf) {
+                        GADAPI::PDFExtracterCommandParameters* pParams = new GADAPI::PDFExtracterCommandParameters(paths);
+                        GADAPI::PDFExtracterCommand* pCmd = new GADAPI::PDFExtracterCommand(pParams);
+                        m_pEntorno->GetCommandController()->ProcessAsync("Extracting...", pCmd, NULL);
+                        continue;
+                } else {
+                        pkSeries.insert((*it));
+                }
+        }
+
+        GNC::GCS::IControladorVistas* pCtrlVistas = m_pEntorno->GetControladorVistas();
+        wxWindow* pVentanaPadre = NULL;
+
+        if (m_ListaModos[modo]->GetDescripcion() == _Std("Medical Image Viewer") && !pkSeries.empty()) {
+                {
+                        //comienza la deshabilitacion
+                        pVentanaPadre = pCtrlVistas->GetRootWindow();
+                        try {
+                                if (hangingProtocol.IsValid() && !hangingProtocol->getLayouts().empty())  {
+                                        for (GNC::GCS::HangingProtocol::TListOfLayouts::const_iterator it = hangingProtocol->getLayouts().begin(); it != hangingProtocol->getLayouts().end(); ++it) {
+                                                pVista = OpenMedicalImageViewer(pkSeries, pVentanaPadre, m_pEntorno, this, (*it), hangingProtocol);
+                                        }
+                                } else {
+                                        pVista = OpenMedicalImageViewer(pkSeries, pVentanaPadre, m_pEntorno, this, NULL, NULL);
+                                }
+
+                        } catch(GNC::GCS::VistaException &ex) {
+                                if (pVista != NULL) {
+                                        pCtrlVistas->Destruir(pVista);
+                                }
+                                wxString mensaje = wxString::FromUTF8(ex.GetCause().c_str());
+                                wxMessageDialog dialogo( m_pEntorno->GetVentanaRaiz(), mensaje, _("Error opening study"),  wxOK | wxICON_INFORMATION);
+                                dialogo.ShowModal();
+                                return NULL;
+                        } catch (...) {
+                                if (pVista != NULL) {
+                                        pCtrlVistas->Destruir(pVista);
+                                }
+                                wxMessageDialog dialogo( m_pEntorno->GetVentanaRaiz(), _("Error opening study"), _("Error opening study"),  wxOK | wxICON_INFORMATION);
+                                dialogo.ShowModal();
+                                return NULL;
+                        }
+                }//fin deshabilitacion
+        } else if (m_ListaModos[modo]->GetDescripcion() == _Std("Waveform viewer") && !pkSeries.empty()) {
+                for(std::set<long>::iterator it = pkSeries.begin(); it!= pkSeries.end(); ++it) {
+                        {
+                                //comienza la deshabilitacion
+                                pVentanaPadre = pCtrlVistas->GetRootWindow();
+                                try {
+                                        LOG_STAT(ANON_STAT_VIEW_ECG)
+                                        wxWindowDisabler disabler;
+                                        GNC::GCS::Ptr<GNKVisualizator::ECGStudy> estudio = new GNKVisualizator::ECGStudy();
+                                        estudio->OpenedSeries.push_back((*it));
+                                        estudio->Module = this;
+                                        estudio->ParentWindow = pVentanaPadre;
+                                        estudio->InitializeContext(*pkSeries.begin());
+                                        pVista = new GNKVisualizator::WaveFormView(estudio);
+                                        pCtrlVistas->Registrar(pVista);
+                                } catch(GNC::GCS::VistaException &ex) {
+                                        if (pVista != NULL) {
+                                                pCtrlVistas->Destruir(pVista);
+                                        }
+                                        wxString mensaje = wxString::FromUTF8(ex.GetCause().c_str());
+                                        wxMessageDialog dialogo( m_pEntorno->GetVentanaRaiz(), mensaje, _("Error opening study"),  wxOK | wxICON_INFORMATION);
+                                        dialogo.ShowModal();
+                                        return NULL;
+                                } catch (...) {
+                                        if (pVista != NULL) {
+                                                pCtrlVistas->Destruir(pVista);
+                                        }
+                                        wxMessageDialog dialogo( m_pEntorno->GetVentanaRaiz(), _("Error opening study"), _("Error opening study"),  wxOK | wxICON_INFORMATION);
+                                        dialogo.ShowModal();
+                                        return NULL;
+                                }
+                        }//fin deshabilitacion
+
+                        if (pVista == NULL ) {
+                                pCtrlVistas->Destruir(pVista);
+                                return NULL;
+                        } else {
+                                m_pEntorno->GetControladorCarga()->CargaAsincrona(pVista);
+                        }
+                }
+        }
+
+
+        return pVista;
+}
+
+bool GNKVisualizator::ControladorAtencionPrimaria::SoportaImportacion() const
+{
+        return m_pEntorno->GetControladorPermisos()->Get("atencionprimaria", "dicomizador");
+}
+
+void GNKVisualizator::ControladorAtencionPrimaria::GetPasosImportacion(IWizard* pWizard,std::list<IPasoWizard*> &listaPasos, wxWindow* pParent, std::string &dirTemporal, GNC::GCS::Ptr<GIL::IModeloIntegracion> pModeloIntegracion)
+{
+        GNC::GCS::Ptr<GNC::GUI::ImportationData> datosPersistentes(new GNC::GUI::ImportationData(pModeloIntegracion));
+
+        IPasoWizard* paso=new GNC::GUI::GeneralData(pParent,pWizard,datosPersistentes, true);
+        listaPasos.push_back(paso);
+
+        paso = new GNKVisualizator::GUI::SelectImagesImportationVisualizator(pParent,pWizard,datosPersistentes,dirTemporal);
+        listaPasos.push_back(paso);
+}
diff --git a/visualizator/visualizator/controllers/visualizatorcontroller.h b/visualizator/visualizator/controllers/visualizatorcontroller.h
new file mode 100644
index 0000000..d8fb9f7
--- /dev/null
+++ b/visualizator/visualizator/controllers/visualizatorcontroller.h
@@ -0,0 +1,65 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#include <api/autoptr.h>
+#include <api/controllers/imodulecontroller.h>
+#include "../vistas/vista2d.h"
+
+namespace GIL
+{
+class IModeloIntegracion;
+}
+
+namespace GNKVisualizator
+{
+namespace GUI
+{
+class ContenedorHerramientas;
+}
+}
+/* Controlador del módulo visor DICOM */
+namespace GNKVisualizator
+{
+class ControladorAtencionPrimaria : public GNC::GCS::IModuleController
+{
+public:
+
+        /* Constructor */
+        ControladorAtencionPrimaria(GNC::GCS::IEntorno* pEntorno);
+
+        /* Destructor */
+        ~ControladorAtencionPrimaria();
+
+        virtual void RegistrarVistas();
+        virtual bool SupportsImportationUID(const std::string &importationUID);
+
+        /* Abre un estudio de manera no interactiva desde un directorio y devuelve su controlador específico */
+        virtual GNC::GCS::IVista* OpenView(int modo, GNC::GCS::IHistoryController::SeriesModelList& series, GNC::GCS::Ptr<GNC::GCS::HangingProtocol> hangingProtocol);
+
+        // Metodos de inicializacion de la configuracion particular
+        virtual bool SoportaImportacion() const;
+
+        void GetPasosImportacion(IWizard* pWizard,std::list<IPasoWizard*> &listaPasos, wxWindow* pParent, std::string &dirTemporal,GNC::GCS::Ptr<GIL::IModeloIntegracion> pModeloIntegracion);
+
+protected:
+};
+}
diff --git a/visualizator/visualizator/dialogos/PanelesDeHerramientasPrimaria.fbp b/visualizator/visualizator/dialogos/PanelesDeHerramientasPrimaria.fbp
new file mode 100644
index 0000000..30e60de
--- /dev/null
+++ b/visualizator/visualizator/dialogos/PanelesDeHerramientasPrimaria.fbp
@@ -0,0 +1,315 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="10" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration">; </property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">panelesherramientasaprimariabase</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">PanelesDeHerramientasPrimaria</property>
+        <property name="namespace">"GNKVisualizator" "GUI"</property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Panel" expanded="1">
+            <property name="bg"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">265,200</property>
+            <property name="name">PanelResultadosBase</property>
+            <property name="pos"></property>
+            <property name="size">334,232</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="validator_data_type"></property>
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize">OnSize</event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">m_pMainSizer</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">protected</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND | wxALL</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPropertyGrid" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="extra_style"></property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="include_advanced">1</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pTags</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="style">wxPG_BOLD_MODIFIED|wxPG_SPLITTER_AUTO_CENTER</property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="1">
+            <property name="bg"></property>
+            <property name="center">wxBOTH</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">366,177</property>
+            <property name="name">PanelOverlaysBase</property>
+            <property name="pos"></property>
+            <property name="size">366,177</property>
+            <property name="style"></property>
+            <property name="subclass"></property>
+            <property name="title"></property>
+            <property name="tooltip"></property>
+            <property name="validator_data_type"></property>
+            <property name="validator_style">wxFILTER_NONE</property>
+            <property name="validator_type">wxDefaultValidator</property>
+            <property name="validator_variable"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose">OnClose</event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus">OnKillFocus</event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer2</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">2</property>
+                    <property name="flag">wxALL|wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxCheckListBox" expanded="1">
+                        <property name="bg"></property>
+                        <property name="choices"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pCheckListOverlays</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnCheckListBox"></event>
+                        <event name="OnCheckListBoxDClick"></event>
+                        <event name="OnCheckListBoxToggled">OnItemChecked</event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="1">
+                    <property name="border">5</property>
+                    <property name="flag">wxALL</property>
+                    <property name="proportion">0</property>
+                    <object class="wxStaticText" expanded="1">
+                        <property name="bg"></property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="font"></property>
+                        <property name="hidden">1</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="label">There are no overlays on this image</property>
+                        <property name="maximum_size"></property>
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pLabel</property>
+                        <property name="permission">protected</property>
+                        <property name="pos"></property>
+                        <property name="size"></property>
+                        <property name="style"></property>
+                        <property name="subclass"></property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <property name="wrap">-1</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/visualizator/visualizator/dialogos/contenedorherramientas.cpp b/visualizator/visualizator/dialogos/contenedorherramientas.cpp
new file mode 100644
index 0000000..2f451d4
--- /dev/null
+++ b/visualizator/visualizator/dialogos/contenedorherramientas.cpp
@@ -0,0 +1,66 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/globals.h>
+#include "contenedorherramientas.h"
+#include <iostream>
+namespace GNKVisualizator
+{
+namespace GUI
+{
+ContenedorHerramientas::ContenedorHerramientas(wxWindow* pPadre) : wxControl(pPadre, -1, wxDefaultPosition, wxDefaultSize)//wxScrolledWindow(pPadre, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxVSCROLL|wxHSCROLL)
+{
+        Hide();
+        SetMinSize(wxSize(300, -1));
+        Connect(wxEVT_SIZE, wxSizeEventHandler(ContenedorHerramientas::OnSize));
+        m_pSizer = new wxBoxSizer(wxVERTICAL);
+        this->SetSizer(m_pSizer);
+        m_pSizer->Fit(this);
+        Layout();
+}
+
+ContenedorHerramientas::~ContenedorHerramientas()
+{
+        Disconnect(wxEVT_SIZE, wxSizeEventHandler(ContenedorHerramientas::OnSize));
+}
+
+void ContenedorHerramientas::InsertarPanel(wxWindow* child)
+{
+        m_pSizer->Add(child, 1, wxEXPAND, 0);
+        Layout();
+}
+
+void ContenedorHerramientas::EliminarPanel(wxWindow* child)
+{
+        m_pSizer->Detach(child);
+        Layout();
+}
+
+void ContenedorHerramientas::OnSize(wxSizeEvent& WXUNUSED(event))
+{
+        Layout();
+}
+
+void ContenedorHerramientas::ActualizarVirtualSize()
+{
+        Layout();
+}
+}
+}
diff --git a/visualizator/visualizator/dialogos/contenedorherramientas.h b/visualizator/visualizator/dialogos/contenedorherramientas.h
new file mode 100644
index 0000000..820f7d2
--- /dev/null
+++ b/visualizator/visualizator/dialogos/contenedorherramientas.h
@@ -0,0 +1,47 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <wx/control.h>
+#include <wx/sizer.h>
+namespace GNKVisualizator
+{
+namespace GUI
+{
+class ContenedorHerramientas : public wxControl   // public wxScrolledWindow {
+{
+public:
+        ContenedorHerramientas(wxWindow* pPadre);
+        virtual ~ContenedorHerramientas();
+
+        void InsertarPanel(wxWindow* child);
+        void EliminarPanel(wxWindow* child);
+        void ActualizarVirtualSize();
+
+protected:
+
+private:
+
+        void OnSize(wxSizeEvent& event);
+
+        wxBoxSizer* m_pSizer;
+};
+}
+}
diff --git a/visualizator/visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp b/visualizator/visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp
new file mode 100644
index 0000000..c3ddc2e
--- /dev/null
+++ b/visualizator/visualizator/dialogos/importacion/selectimagesimportationvisualizator.cpp
@@ -0,0 +1,126 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <string>
+#include <sstream>
+#include <cmath>
+
+#include <wx/msgdlg.h>
+#include <wx/filedlg.h>
+#include <wx/valtext.h>
+#include <wx/busyinfo.h>
+#include <wx/image.h>
+#include <wx/filename.h>
+#include <wx/dir.h>
+#include <wx/msgdlg.h>
+#include <main/controllers/configurationcontroller.h>
+#include <main/entorno.h>
+
+
+#include <api/dicom/idicommanager.h>
+
+#include <main/controllers/commandcontroller.h>
+
+#include <commands/comandopacs.h>
+
+#include <export/tagsprivadoscomunes.h>
+
+#include <commands/dicomizecommand.h>
+#include <visualizator/export/tagsprivados.h>
+
+#include "selectimagesimportationvisualizator.h"
+
+namespace GNKVisualizator
+{
+namespace GUI
+{
+
+SelectImagesImportationVisualizator::SelectImagesImportationVisualizator(wxWindow* pParent,IWizard* pWizard,const GNC::GCS::Ptr<GNC::GUI::ImportationData>& importationData,const std::string &dirTemporal):
+        GNC::GUI::SelectImagesImportation(pParent, dirTemporal, pWizard, importationData->m_pIntegrationModel)
+{
+        Hide();
+        m_dicomizado = false;
+        m_pImportationData = importationData;
+
+        m_dirTemporal=dirTemporal;
+}
+
+SelectImagesImportationVisualizator::~SelectImagesImportationVisualizator()
+{
+}
+
+//region "Metodos heredados de Ipasowizard"
+bool SelectImagesImportationVisualizator::Validar()
+{
+        bool correcto =  true;
+        if(GNC::GUI::SelectImagesImportation::Validar()) {
+                if(!m_dicomizado) {
+                        m_dicomizado = Dicomizar();
+                        correcto = m_dicomizado;
+                }
+        } else {
+                correcto = false;
+        }
+        return correcto;
+}
+
+bool SelectImagesImportationVisualizator::Dicomizar()
+{
+        for(ListaFicheros::const_iterator it=m_pListaFicheros->begin(); it!= m_pListaFicheros->end(); ++it) {
+                std::string rutaFichero = (*it);
+                m_pImportationData->m_SourceFiles.push_back(rutaFichero);
+        }
+
+        RellenarTagsComunes(m_pImportationData->baseImages);
+        GADAPI::DicomizeCommandParams* pDicomParams = new GADAPI::DicomizeCommandParams(m_pImportationData,m_dirTemporal);
+        GADAPI::DicomizeCommand* pDicomCmd = new GADAPI::DicomizeCommand(pDicomParams);
+        GNC::GCS::IEntorno::Instance()->GetCommandController()->ProcessAsync(_Std("Performing tasks of integration ..."),pDicomCmd,NULL);
+        //se limpia la lista porque ya avisaremos de los nuevos ficheros
+        m_pListaFicheros->clear();
+        //
+        return true;
+
+}
+
+void SelectImagesImportationVisualizator::RellenarTagsComunes(GIL::DICOM::DicomDataset& base)
+{
+        std::string tag;
+
+        //institucion
+        if (GNC::GCS::ConfigurationController::Instance()->readStringGeneral("/GinkgoCore/Estacion","CentroNombre",tag)) {
+                base.tags[std::string("0008|0080")] = tag;
+        }
+
+        //nombre del medico responsable de la institucion
+        if (GNC::GCS::ConfigurationController::Instance()->readStringUser("/GinkgoCore/Estacion","NombreMedico",tag)) {
+                base.tags[std::string("0008|0090")] = tag;
+        }
+
+        base.tags[std::string("0008|0070")] = EXT_PROVIDER;
+
+        base.tags[std::string("0008|1090")] = EXT_NAME;
+
+        //uid de aprimaria
+        base.tags[std::string("0018|1030")] = EXT_IMPORTER_SID;
+}
+//endregion
+}
+}
diff --git a/visualizator/visualizator/dialogos/importacion/selectimagesimportationvisualizator.h b/visualizator/visualizator/dialogos/importacion/selectimagesimportationvisualizator.h
new file mode 100644
index 0000000..4e0d130
--- /dev/null
+++ b/visualizator/visualizator/dialogos/importacion/selectimagesimportationvisualizator.h
@@ -0,0 +1,61 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/iwizard.h>
+#include <string>
+#include <vector>
+#include <main/gui/import/importationdata.h>
+#include <api/dicom/idicomizador.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+#include <main/gui/import/selectimagesimportation.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IEntorno;
+}
+}
+
+namespace GNKVisualizator
+{
+namespace GUI
+{
+
+class SelectImagesImportationVisualizator: public GNC::GUI::SelectImagesImportation
+{
+public:
+        SelectImagesImportationVisualizator(wxWindow* pParent,IWizard* pWizard,const GNC::GCS::Ptr<GNC::GUI::ImportationData>& importationData,const std::string &dirTemporal);
+        ~SelectImagesImportationVisualizator();
+
+        virtual bool Validar();
+
+        virtual bool Dicomizar();
+
+        void RellenarTagsComunes(GIL::DICOM::DicomDataset& base);
+
+        GNC::GCS::Ptr<GNC::GUI::ImportationData> m_pImportationData;
+        std::string m_dirTemporal;
+        bool m_dicomizado;
+};
+}
+}
diff --git a/visualizator/visualizator/dialogos/panelesherramientasaprimariabase.cpp b/visualizator/visualizator/dialogos/panelesherramientasaprimariabase.cpp
new file mode 100644
index 0000000..07923af
--- /dev/null
+++ b/visualizator/visualizator/dialogos/panelesherramientasaprimariabase.cpp
@@ -0,0 +1,71 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "panelesherramientasaprimariabase.h"
+
+///////////////////////////////////////////////////////////////////////////
+using namespace GNKVisualizator::GUI;
+
+PanelResultadosBase::PanelResultadosBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetMinSize( wxSize( 265,200 ) );
+
+        m_pMainSizer = new wxBoxSizer( wxVERTICAL );
+
+        m_pTags = new wxPropertyGrid(this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxPG_BOLD_MODIFIED|wxPG_SPLITTER_AUTO_CENTER);
+        m_pMainSizer->Add( m_pTags, 1, wxEXPAND | wxALL, 5 );
+
+        this->SetSizer( m_pMainSizer );
+        this->Layout();
+
+        // Connect Events
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( PanelResultadosBase::OnSize ) );
+}
+
+PanelResultadosBase::~PanelResultadosBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( PanelResultadosBase::OnSize ) );
+
+}
+
+PanelOverlaysBase::PanelOverlaysBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 366,177 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer2;
+        bSizer2 = new wxBoxSizer( wxVERTICAL );
+
+        wxArrayString m_pCheckListOverlaysChoices;
+        m_pCheckListOverlays = new wxCheckListBox( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pCheckListOverlaysChoices, 0 );
+        bSizer2->Add( m_pCheckListOverlays, 1, wxALL|wxEXPAND, 2 );
+
+        m_pLabel = new wxStaticText( this, wxID_ANY, _("There are no overlays on this image"), wxDefaultPosition, wxDefaultSize, 0 );
+        m_pLabel->Wrap( -1 );
+        m_pLabel->Hide();
+
+        bSizer2->Add( m_pLabel, 0, wxALL, 5 );
+
+        this->SetSizer( bSizer2 );
+        this->Layout();
+
+        this->Centre( wxBOTH );
+
+        // Connect Events
+        this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PanelOverlaysBase::OnClose ) );
+        this->Connect( wxEVT_KILL_FOCUS, wxFocusEventHandler( PanelOverlaysBase::OnKillFocus ) );
+        m_pCheckListOverlays->Connect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( PanelOverlaysBase::OnItemChecked ), NULL, this );
+}
+
+PanelOverlaysBase::~PanelOverlaysBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( PanelOverlaysBase::OnClose ) );
+        this->Disconnect( wxEVT_KILL_FOCUS, wxFocusEventHandler( PanelOverlaysBase::OnKillFocus ) );
+        m_pCheckListOverlays->Disconnect( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED, wxCommandEventHandler( PanelOverlaysBase::OnItemChecked ), NULL, this );
+
+}
diff --git a/visualizator/visualizator/dialogos/panelesherramientasaprimariabase.h b/visualizator/visualizator/dialogos/panelesherramientasaprimariabase.h
new file mode 100644
index 0000000..b3530e1
--- /dev/null
+++ b/visualizator/visualizator/dialogos/panelesherramientasaprimariabase.h
@@ -0,0 +1,97 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version May  4 2010)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __panelesherramientasaprimariabase__
+#define __panelesherramientasaprimariabase__
+
+#include <wx/intl.h>
+
+#include <wx/propgrid/propgrid.h>
+#include <wx/propgrid/advprops.h>
+#ifdef __VISUALC__
+#include <wx/link_additions.h>
+#endif //__VISUALC__
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/checklst.h>
+#include <wx/stattext.h>
+#include <wx/dialog.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+namespace GNKVisualizator
+{
+namespace GUI
+{
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelResultadosBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelResultadosBase : public wxPanel
+{
+private:
+
+protected:
+        wxBoxSizer* m_pMainSizer;
+        wxPropertyGrid* m_pTags;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnSize( wxSizeEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelResultadosBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 334,232 ), long style = wxTAB_TRAVERSAL );
+        ~PanelResultadosBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class PanelOverlaysBase
+///////////////////////////////////////////////////////////////////////////////
+class PanelOverlaysBase : public wxDialog
+{
+private:
+
+protected:
+        wxCheckListBox* m_pCheckListOverlays;
+        wxStaticText* m_pLabel;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnClose( wxCloseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnKillFocus( wxFocusEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnItemChecked( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        PanelOverlaysBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 366,177 ), long style = 0 );
+        ~PanelOverlaysBase();
+
+};
+
+} // namespace GUI
+} // namespace GNKVisualizator
+
+#endif //__panelesherramientasaprimariabase__
diff --git a/visualizator/visualizator/estudios/ecgstudy.cpp b/visualizator/visualizator/estudios/ecgstudy.cpp
new file mode 100644
index 0000000..5730a67
--- /dev/null
+++ b/visualizator/visualizator/estudios/ecgstudy.cpp
@@ -0,0 +1,877 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <wx/app.h>
+#include <wx/xml/xml.h>
+#include <wx/file.h>
+#include <wx/filename.h>
+#include <wx/mstream.h>
+#include <wx/tokenzr.h>
+
+#include <api/globals.h>
+//#include <api/filename.h>
+#include <api/ientorno.h>
+#include <api/toolsystem/itoolsregistry.h>
+#include <api/internationalization/internationalization.h>
+
+#include <main/controllers/controladorlog.h>
+
+#include <api/controllers/icontroladorcarga.h>
+#include <api/imodelointegracion.h>
+
+#include <api/dicom/idicommanager.h>
+#include <api/dicom/idicomizador.h>
+#include <main/entorno.h>
+#include <main/controllers/historycontroller.h>
+
+#include "ecgstudy.h"
+
+#include <vtkPointData.h>
+#include <vtkImageData.h>
+
+
+
+namespace UIDS
+{
+
+const char* HemodynamicWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.2.1";
+const char* TwelveLeadECGWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.1.1";
+const char* GeneralECGWaveformStorage = "1.2.840.10008.5.1.4.1.1.9.1.2";
+}
+
+namespace TAGS
+{
+const char* MediaStorageSOPClassUID = "0002|0002";
+const char* WaveformOriginality = "003a|0004";
+const char* NumberOfWaveformChannels = "003a|0005";
+const char* NumberOfWaveformSamples = "003a|0010";
+const char* SamplingFrequency = "003a|001a";
+const char* MultiplexGroupLabel = "003a|0020";
+const char* ChannelDefinitionSequence = "003a|0200";
+const char* WaveformChannelNumber = "003a|0202";
+const char* ChannelLabel = "003a|0203";
+const char* ChannelStatus = "003a|0205";
+const char* ChannelSourceSequence = "003a|0208";
+const char* ChannelSourceModifiersSequence = "003a|0209";
+const char* SourceWaveformSequence = "003a|020a";
+const char* ChannelDerivationDescription = "003a|020c";
+const char* ChannelSensitivity = "003a|0210";
+const char* ChannelSensitivityUnitsSequence = "003a|0211";
+const char* ChannelSensitivityCorrectionFactor = "003a|0212";
+const char* ChannelBaseline = "003a|0213";
+const char* ChannelTimeSkew = "003a|0214";
+const char* ChannelSampleSkew = "003a|0215";
+const char* ChannelOffset = "003a|0218";
+const char* WaveformBitsStored = "003a|021a";
+const char* FilterLowFrequency = "003a|0220";
+const char* FilterHighFrequency = "003a|0221";
+const char* NotchFilterFrequency = "003a|0222";
+const char* NotchFilterBandwidth = "003a|0223";
+const char* WaveformDataDisplayScale = "003a|0230";
+const char* WaveformDisplayBkgCIELabValue = "003a|0231";
+const char* WaveformPresentationGroupSequence = "003a|0240";
+const char* PresentationGroupNumber = "003a|0241";
+const char* ChannelDisplaySequence = "003a|0242";
+const char* ChannelRecommendDisplayCIELabValue = "003a|0244";
+const char* ChannelPosition = "003a|0245";
+const char* DisplayShadingFlag = "003a|0246";
+const char* FractionalChannelDisplayScale = "003a|0247";
+const char* AbsoluteChannelDisplayScale = "003a|0248";
+const char* MultiplexAudioChannelsDescrCodeSeq = "003a|0300";
+const char* ChannelIdentificationCode = "003a|0301";
+const char* ChannelMode = "003a|0302";
+
+const char* WaveFormSequence = "5400|0100";
+const char* ChannelMinimumValue = "5400|0110";
+const char* ChannelMaximumValue = "5400|0112";
+const char* WaveformBitsAllocated = "5400|1004";
+const char* WaveformSampleInterpretation = "5400|1006";
+const char* WaveformPaddingValue = "5400|100a";
+const char* WaveformData = "5400|1010";
+
+const char* AnnotationSequence = "0040|b020";
+const char* UnformattedTextValue = "0070|0006";
+const char* AnnotationGroupNumber = "0040|a180";
+const char* ReferencedChannels = "0040|a0b0";
+const char* TemporalRangeType = "0040|a130";
+const char* RefSamplePositions = "0040|a132";
+const char* NumericValue = "0040|a30a";
+
+const char* ConceptCodeSequence = "0040|a168";
+const char* ConceptNameCodeSequence = "0040|a043";
+const char* MeasurementsUnitsCodeSequence = "0040|08ea";
+const char* CodingSchemeDesignator = "0008|0102";
+const char* CodingValue ="0008|0100";
+const char* CodingSchemeVersion = "0008|0103";
+}
+
+template<class T> void Get(const std::string& str, T& val)
+{
+        std::istringstream is(str);
+        is >> val;
+}
+
+typedef std::vector<std::pair<std::string, std::string> > TVectorPairStrings;
+typedef std::vector<std::string> TVectorStrings;
+typedef std::map<int,TVectorStrings > TMapVectorStrings;
+
+bool IsCodeSequence(GIL::DICOM::DicomDataset& base, const std::string& tag, std::string& codeValue, std::string codingSchemeDesignator, std::string codingSchemeVersion)
+{
+        GIL::DICOM::DicomDataset* seq = base.buscar_secuencia(tag);
+        if (seq != NULL && seq->items.size() > 0) {
+                if (seq->items.front().getTag(TAGS::CodingSchemeDesignator) == codingSchemeDesignator || seq->items.front().getTag(TAGS::CodingSchemeVersion) == codingSchemeVersion) {
+                        if (!seq->items.front().getTag(TAGS::CodingValue, codeValue)) {
+                                /* GW: I don't know what it means when the CodingValue tag is not found,
+                                 * but one of the callers simply discards the value, and the other checks against
+                                 * it, so if it is empty, nothing should happen, so just make sure that the
+                                 * value is cleaned.
+                                 */
+                                codeValue="";
+                                LOG_ERROR("EGCStudy", "IsCodeSequence: Tag 'CodingValue' but still returning true");
+                        }
+                        return true;
+                }
+        }
+        return false;
+}
+
+int calcNrOfValues(const TMapVectorStrings& vals)
+{
+        int nr = 0;
+
+        for (TMapVectorStrings::const_iterator it = vals.begin(); it != vals.end(); ++it) {
+                for (TVectorStrings::const_iterator itV = (*it).second.begin(); itV != (*it).second.end(); ++itV) {
+                        if ((*itV) != "") {
+                                nr ++;
+                        }
+                }
+        }
+
+        return nr;
+}
+
+TMapVectorStrings GetValues(GIL::DICOM::DicomDataset* sequence, TVectorPairStrings& items, TVectorPairStrings& units, std::list<int>& /*rwc*/, bool special)
+{
+        TMapVectorStrings result;
+
+        TMapVectorStrings sl;
+
+        for (GIL::DICOM::DicomDataset::DatasetList::reverse_iterator itAnnotations = sequence->items.rbegin(); itAnnotations != sequence->items.rend(); ++itAnnotations) {
+                GIL::DICOM::DicomDataset& base = (*itAnnotations);
+                std::string itemName;
+
+                if (IsCodeSequence(base, TAGS::ConceptNameCodeSequence, itemName, "SCPECG", "1.3")) {
+                        unsigned int nr = 0;
+
+                        for (; nr < items.size(); nr++) {
+                                if (items[nr].first == itemName) {
+                                        break;
+                                }
+                        }
+
+                        if (nr == items.size())
+                                continue;
+
+                        std::string val;
+                        int groupNr;
+                        Get(base.getTag(TAGS::AnnotationGroupNumber),groupNr);
+
+                        if (units[nr].second == "") {
+                                if (units[nr].first == base.getTag(TAGS::TemporalRangeType))
+                                        val = base.getTag(TAGS::RefSamplePositions);
+                        } else if (IsCodeSequence(base, TAGS::MeasurementsUnitsCodeSequence, val, "UCUM", "1.4")) {
+                                val = base.getTag(TAGS::NumericValue);
+                        }
+
+                        /*int[] tempRWC = ds.GetInts(Tags.RefWaveformChannels);
+
+                        if ((val != null)
+                        &&	(groupNr >= 0)
+                        &&	(tempRWC.Length == rwc.Length))
+                        {
+                        	for (int k=0;k < rwc.Length;k++)
+                        		if (tempRWC[k] != rwc[k])
+                        			continue;
+
+                        	string[] temp = null;
+
+                        	if (sl.Contains(groupNr))
+                        		temp = (string[]) sl[groupNr];
+                        	else
+                        	{
+                        		temp = new string[items.GetLength(1)];
+
+                        		sl.Add(groupNr, temp);
+                        	}
+
+                        	temp[nr] = val;
+                        }*/
+                        if (val != "" && groupNr>=0) {
+                                if (sl.find(groupNr) == sl.end()) {
+                                        sl[groupNr] = TVectorStrings(items.size());
+                                }
+                                sl[groupNr][nr] = val;
+                        }
+                }
+        }//for
+
+        if (sl.size() > 0) {
+                if (special && sl.size() >= 2
+                    &&	(items.size() < 64)) {
+                        size_t temp1 = items.size();
+                        unsigned long a = 0, b = 0;
+
+                        TVectorStrings& temp2 = sl.begin()->second;
+                        int i = 0;
+                        for (TVectorStrings::iterator it = temp2.begin(); it != temp2.end(); ++it,++i) {
+                                if ((*it) != "") {
+                                        a |= (1UL << i);
+                                }
+                        }
+
+                        TMapVectorStrings::iterator itSecond = sl.begin();
+                        itSecond++;
+                        TVectorStrings& temp3 = itSecond->second;
+                        i = 0;
+                        for (TVectorStrings::iterator it = temp3.begin(); it != temp3.end(); ++it,++i) {
+                                if ((*it) != "") {
+                                        b |= (1UL << i);
+                                }
+                        }
+
+                        if ((a ^ b) == (a + b)) {
+                                for (size_t i = 0; i < temp1; i++) {
+                                        if (temp2[i] != "") {
+                                                temp3[i] = temp2[i];
+                                        }
+                                }
+
+                                sl.erase(sl.begin());
+                        }
+                }
+
+                for (TMapVectorStrings::iterator it = sl.begin(); it != sl.end(); ++it) {
+                        result[(*it).first] = TVectorStrings();
+
+                        for (TVectorStrings::iterator itStr = (*it).second.begin(); itStr != (*it).second.end(); ++itStr)
+                                result[(*it).first].push_back((*itStr));
+                        std::ostringstream ostr;
+                        ostr << (*it).first;
+                        result [(*it).first].push_back(ostr.str());
+                }
+        }
+        return result;
+}
+
+
+///////////////////////////////////////////////////////////////////////
+void GNKVisualizator::ChannelInfo::SetLead(const std::string& codingSchemeDesignator, const std::string& codingValue)
+{
+        if (codingSchemeDesignator == "SCPECG") {
+                wxStringTokenizer tkz(wxString::FromUTF8(codingValue.c_str()), wxT("-"));
+                //code is the last token
+                wxString code(wxT("0"));
+                while (tkz.HasMoreTokens()) {
+                        code = tkz.GetNextToken();
+                }
+                long lead = 0;
+                if (code.ToLong(&lead) && lead > 0 && lead < 185) {
+                        this->LeadType = (TLeadType)(lead);
+                }
+        } else if (codingSchemeDesignator == "MDC") {
+
+                const char* mdc0[] = { "MDC_ECG_LEAD_CONFIG", "MDC_ECG_LEAD_I", "MDC_ECG_LEAD_II", "MDC_ECG_LEAD_V1", "MDC_ECG_LEAD_V2", "MDC_ECG_LEAD_V3", "MDC_ECG_LEAD_V4", "MDC_ECG_LEAD_V5", "MDC_ECG_LEAD_V6",
+                                       "MDC_ECG_LEAD_V7", "MDC_ECG_LEAD_V2R", "MDC_ECG_LEAD_V3R", "MDC_ECG_LEAD_V4R", "MDC_ECG_LEAD_V5R", "MDC_ECG_LEAD_V6R", "MDC_ECG_LEAD_V7R", "MDC_ECG_LEAD_X", "MDC_ECG_LEAD_Y", "MDC_ECG_LEAD_Z",
+                                       "MDC_ECG_LEAD_CC5", "MDC_ECG_LEAD_CM5", "MDC_ECG_LEAD_LA", "MDC_ECG_LEAD_RA", "MDC_ECG_LEAD_LL", "MDC_ECG_LEAD_fI", "MDC_ECG_LEAD_fE", "MDC_ECG_LEAD_fC", "MDC_ECG_LEAD_fA", " MDC_ECG_LEAD_fM",
+                                       "MDC_ECG_LEAD_fF", "MDC_ECG_LEAD_fH", "MDC_ECG_LEAD_dI", "MDC_ECG_LEAD_dII", "MDC_ECG_LEAD_dV1", "MDC_ECG_LEAD_dV2", "MDC_ECG_LEAD_dV3", "MDC_ECG_LEAD_dV4", "MDC_ECG_LEAD_dV5", "MDC_ECG_LEAD_dV6"
+                                     };
+                for (int i = 0; i< 39; ++i) {
+                        if (codingValue == mdc0[i]) {
+                                this->LeadType = (TLeadType)i;
+                                return;
+                        }
+                }
+                const char* mdc61[] = {"MDC_ECG_LEAD_III", "MDC_ECG_LEAD_aVR", "MDC_ECG_LEAD_aVL", "MDC_ECG_LEAD_aVF", "MDC_ECG_LEAD_aVRneg", "MDC_ECG_LEAD_V8", "MDC_ECG_LEAD_V9", "MDC_ECG_LEAD_V8R", "MDC_ECG_LEAD_V9R",
+                                       "MDC_ECG_LEAD_D", "MDC_ECG_LEAD_A", "MDC_ECG_LEAD_J", "MDC_ECG_LEAD_Defib", " MDC_ECG_LEAD_Extern", "MDC_ECG_LEAD_A1", "MDC_ECG_LEAD_A2", "MDC_ECG_LEAD_A3", "MDC_ECG_LEAD_A4"
+                                      };
+                for (int i = 0; i< 18; ++i) {
+                        if (codingValue == mdc61[i]) {
+                                this->LeadType = (TLeadType)(i+61);
+                                return;
+                        }
+                }
+                const char* mdc86[] = {"MDC_ECG_LEAD_C", "MDC_ECG_LEAD_V", "MDC_ECG_LEAD_VR", "MDC_ECG_LEAD_VL", "MDC_ECG_LEAD_VF", "MDC_ECG_LEAD_MCL", "MDC_ECG_LEAD_MCL1", "MDC_ECG_LEAD_MCL2", "MDC_ECG_LEAD_MCL3",
+                                       "MDC_ECG_LEAD_MCL4", " MDC_ECG_LEAD_MCL5", "MDC_ECG_LEAD_MCL6", "MDC_ECG_LEAD_CC", "MDC_ECG_LEAD_CC1", "MDC_ECG_LEAD_CC2", "MDC_ECG_LEAD_CC3", "MDC_ECG_LEAD_CC4", "MDC_ECG_LEAD_CC6", "MDC_ECG_LEAD_CC7",
+                                       "MDC_ECG_LEAD_CM", "MDC_ECG_LEAD_CM1", "MDC_ECG_LEAD_CM2", "MDC_ECG_LEAD_CM3", "MDC_ECG_LEAD_CM4", "MDC_ECG_LEAD_CM6", "MDC_ECG_LEAD_dIII", " MDC_ECG_LEAD_daVR", "MDC_ECG_LEAD_daVL", "MDC_ECG_LEAD_daVF"
+                                      };
+                for (int i = 0; i< 29; ++i) {
+                        if (codingValue == mdc86[i]) {
+                                this->LeadType = (TLeadType)(i+86);
+                                return;
+                        }
+                }
+                const char* mdc121[] = {"MDC_ECG_LEAD_CM7", "MDC_ECG_LEAD_CH5", "MDC_ECG_LEAD_CS5", "MDC_ECG_LEAD_CB5", "MDC_ECG_LEAD_CR5", "MDC_ECG_LEAD_ML", "MDC_ECG_LEAD_AB1", "MDC_ECG_LEAD_AB2", "MDC_ECG_LEAD_AB3",
+                                        "MDC_ECG_LEAD_AB4", "MDC_ECG_LEAD_ES", "MDC_ECG_LEAD_AS", "MDC_ECG_LEAD_AI", "MDC_ECG_LEAD_S"
+                                       };
+                for (int i = 0; i< 14; ++i) {
+                        if (codingValue == mdc121[i]) {
+                                this->LeadType = (TLeadType)(i+121);
+                                return;
+                        }
+                }
+                const char* mdc147[] = {"MDC_ECG_LEAD_RL", "MDC_ECG_LEAD_CV5RL", "MDC_ECG_LEAD_CV6LL", "MDC_ECG_LEAD_CV6LU", "MDC_ECG_LEAD_V10"
+                                       };
+                for (int i = 0; i< 5; ++i) {
+                        if (codingValue == mdc147[i]) {
+                                this->LeadType = (TLeadType)(i+147);
+                                return;
+                        }
+                }
+        } else {
+                LOG_WARN("EGCStudy", "Unsupported coding scheme designator: " << codingSchemeDesignator);
+        }
+}
+
+std::string GNKVisualizator::ChannelInfo::GetTitle() const
+{
+        const char* leadStrings[] = {"Unknown", "I", "II", "V1", "V2", "V3", "V4", "V5", "V6", "V7", "V2R", "V3R", "V4R", "V5R", "V6R", "V7R", "X", "Y", "Z",
+                                     "CC5", "CM5", "LA", "RA", "LL", "fI", "fE", "fC", "fA", "fM", "fF", "fH", "dI", "dII", "dV1", "dV2", "dV3", "dV4", "dV5", "dV6",
+                                     "dV7", "dV2R", "dV3R", "dV4R", "dV5R", "dV6R", "dV7R", "dX", "dY", "dZ", "dCC5", "dCM5", "dLA", "dRA", "dLL", "dfI", "dfE",
+                                     "dfC", "dfA", "dfM", "dfF", "dfH", "III", "aVR", "aVL", "aVF", "aVRneg", "V8", "V9", "V8R", "V9R", "D", "A", "J", "Defib",
+                                     "Extern", "A1", "A2", "A3", "A4", "dV8", "dV9", "dV8R", "dV9R", "dD", "dA", "dJ", "Chest", "V", "VR", "VL", "VF", "MCL", "MCL1",
+                                     "MCL2", "MCL3", "MCL4", "MCL5", "MCL6", "CC", "CC1", "CC2", "CC3", "CC4", "CC6", "CC7", "CM", "CM1", "CM2", "CM3", "CM4", "CM6",
+                                     "dIII", "daVR", "daVL", "daVF", "daVRneg", "dChest", "dV", "dVR", "dVL", "dVF", "CM7", "CH5", "CS5", "CB5", "CR5", "ML", "AB1",
+                                     "AB2", "AB3", "AB4", "ES", "AS", "AI", "S", "dDefib", "dExtern", "dA1", "dA2", "dA3", "dA4", "dMCL1", "dMCL2", "dMCL3",
+                                     "dMCL4", "dMCL5", "dMCL6", "RL", "CV5RL", "CV6LL", "CV6LU", "V10", "dMCL", "dCC", "dCC1", "dCC2", "dCC3", "dCC4", "dCC6",
+                                     "dCC7", " dCM", "dCM1", "dCM2", "dCM3", "dCM4", "dCM6", "dCM7", "dCH5", "dCS5", "dCB5", "dCR5", "dML", "dAB1", "dAB2", "dAB3",
+                                     "dAB4", "dES", "dAS", "dAI", "dS", "dRL", "dCV5RL", "dCV6LL", "dCV6LU", "dV10"
+                                    };
+        return std::string(leadStrings[(int)LeadType]);
+}
+
+void GNKVisualizator::ChannelInfo::SetUnitsValue(const std::string& unitsvalue)
+{
+        UnitsValue = unitsvalue;
+        if (UnitsValue == "mV") {
+                Multiplier = 100.0;
+        } else if (UnitsValue == "uV") {
+                Multiplier = 0.1;
+        } else if (UnitsValue == "MV" ) {
+                Multiplier = 100000000000.0;
+        } else if (UnitsValue == "kV") {
+                Multiplier = 100000000.0;
+        } else if (UnitsValue ==  "V") {
+                Multiplier = 100000.0;
+        } else if (UnitsValue == "dV") {
+                Multiplier = 10000.0;
+        } else if (UnitsValue == "cV") {
+                Multiplier = 1000.0;
+        } else {
+                std::ostringstream ostr;
+                ostr << _Std("We are working to support ") << UnitsValue;
+                throw GNC::GCS::ControladorCargaException(ostr.str(), "ECGStudy");
+        }
+}
+
+
+///////////////////////////////////////////////////////////////////////
+
+GNKVisualizator::ECGStudy::ECGStudy()
+{
+        GTRACE(">> ECGStudy::ECGStudy()" << this);
+        GTRACE("<< ECGStudy::ECGStudy()" << this);
+}
+
+GNKVisualizator::ECGStudy::~ECGStudy()
+{
+        GTRACE(">> ECGStudy::~ECGStudy()" << this);
+        ECGFiles.clear();
+        GTRACE("<< ECGStudy::~ECGStudy()" << this);
+}
+
+
+void GNKVisualizator::ECGStudy::InitializeContext(long pkSeries)
+{
+        GNC::GCS::IHistoryController::LightFileModelList fileModels;
+        GNC::GCS::HistoryController::Instance()->GetSeriesSortedFileModels(pkSeries, fileModels);
+
+        std::list<std::string> rutas;
+        for (GNC::GCS::IHistoryController::LightFileModelList::iterator itFile = fileModels.begin(); itFile != fileModels.end(); ++itFile) {
+                rutas.push_back((*itFile).real_path);
+        }
+
+        GNC::GCS::IStudyContext::DoInitiallizeContext(rutas);
+
+        for (int i = 0; i < (int)rutas.size(); ++i) {
+                ECGFiles.push_back(NULL);
+        }
+}
+
+void GNKVisualizator::ECGStudy::SetIndexOfActualMultiplexGroup(int index)
+{
+        LoadChannels();
+        ECGFiles[ActiveFileIndex]->SetIndexOfActualMultiplexGroup(index);
+}
+
+GNKVisualizator::ECGStudy::TListChannelInfo& GNKVisualizator::ECGStudy::GetListOfChannels()
+{
+        LoadChannels();
+        return ECGFiles[ActiveFileIndex]->GetListOfChannels();
+}
+bool GNKVisualizator::ECGStudy::Ok()
+{
+        LoadChannels();
+        return ECGFiles[ActiveFileIndex]->Groups.size() > 0;
+}
+
+std::list<std::string> GNKVisualizator::ECGStudy::GetLabelOfMultiplexGroups()
+{
+        LoadChannels();
+        return ECGFiles[ActiveFileIndex]->GetLabelOfMultiplexGroups();
+}
+
+const std::string GNKVisualizator::ECGStudy::GetGlobalMeasurement()
+{
+        LoadChannels();
+        std::ostringstream ostr;
+        if (ECGFiles[ActiveFileIndex]->globalMeasurements.IsValid()) {
+                GNKVisualizator::GlobalMeasurements& mes = (*ECGFiles[ActiveFileIndex]->globalMeasurements);
+
+                int ventRate = (mes.getVentRate() == MeasurementNoValue) ? 0 : (int) mes.getVentRate(),
+                    PRint = (mes.getPRint() == MeasurementNoValue) ? 0 : (int) mes.measurment[0]->PRint(),
+                    QRSdur = (mes.getQRSdur() == MeasurementNoValue) ? 0 : (int) mes.measurment[0]->QRSdur(),
+                    QT = (mes.getQTdur() == MeasurementNoValue) ? 0 : (int) mes.measurment[0]->QTdur(),
+                    QTc = (mes.getQTc() == MeasurementNoValue) ? 0 : (int) mes.getQTc();
+
+                ostr << _Std("Vent rate:      ");
+                ostr << ventRate;
+                ostr << _Std(" BPM") << std::endl;
+
+                ostr << _Std("PR int:      ");
+                ostr << PRint;
+                ostr << _Std(" ms") << std::endl;
+
+                ostr << _Std("QRS dur:      ");
+                ostr << QRSdur;
+                ostr << _Std(" ms") << std::endl;
+
+                ostr << _Std("QT\\QTc:      ");
+                ostr << QT << "/" << QTc;
+                ostr << _Std(" ms") << std::endl;
+
+                ostr << _Std("P-R-T axes: ");
+                if (mes.measurment[0]->Paxis != MeasurementNoAxisValue) {
+                        ostr << mes.measurment[0]->Paxis;
+                } else {
+                        ostr << 999;
+                }
+                ostr << ' ';
+                if (mes.measurment[0]->QRSaxis != MeasurementNoAxisValue) {
+                        ostr << mes.measurment[0]->QRSaxis;
+                } else {
+                        ostr << 999;
+                }
+                ostr << ' ';
+                if (mes.measurment[0]->Taxis != MeasurementNoAxisValue) {
+                        ostr << mes.measurment[0]->Taxis;
+                } else {
+                        ostr << 999;
+                }
+        } else {
+                ostr << _Std("Measurements not found");
+        }
+        return ostr.str();
+}
+
+const std::string& GNKVisualizator::ECGStudy::GetDiagnosis()
+{
+        LoadChannels();
+        return ECGFiles[ActiveFileIndex]->GetDiagnosis();
+}
+
+std::string GNKVisualizator::ECGStudy::getMeasureText(bool isVertical, float measure)
+{
+        std::ostringstream ostr;
+        ostr.setf(ios::floatfield, ios::fixed );
+        ostr.precision(2);
+        ostr.fill('0');
+
+        TListChannelInfo& chanelInfo = GetListOfChannels();
+        if (!chanelInfo.empty()) {
+                //ChannelInfo& frontValue = chanelInfo.front();
+                if (isVertical) {
+                        ostr << (measure /10) << " mV";
+                } else {
+                        //siempre esta a 25 mm/s
+                        ostr << (measure /(  25 )) << " s";
+                }
+        } else {
+                LOG_ERROR("ECGStudy", "Error getting measure");
+        }
+
+        return ostr.str();
+}
+
+void GNKVisualizator::ECGStudy::LoadChannels()
+{
+        if (!ECGFiles[ActiveFileIndex].IsValid()) {
+
+                GNC::GCS::Ptr<TECGFile> ecgFile(new TECGFile);
+                ECGFiles[ActiveFileIndex] = ecgFile;
+
+                GNC::GCS::Ptr<GIL::DICOM::DicomDataset> base(new GIL::DICOM::DicomDataset());
+                GIL::DICOM::IDICOMManager* pDICOMManager = GNC::GCS::IEntorno::Instance()->GetPACSController()->CrearInstanciaDeDICOMManager();
+
+                GIL::DICOM::TipoMetaInfo metaInfo;
+
+                pDICOMManager->CargarMetaInfo(GetPathActiveImage(), metaInfo);
+
+                std::string sopClassUID = metaInfo.getTag(TAGS::MediaStorageSOPClassUID);
+
+                std::vector<GIL::DICOM::TagPrivadoUndefined> tag;
+
+                if (sopClassUID == UIDS::GeneralECGWaveformStorage ||
+                    sopClassUID == UIDS::HemodynamicWaveformStorage ||
+                    sopClassUID == UIDS::TwelveLeadECGWaveformStorage ) {
+
+                        pDICOMManager->CargarFichero(GetPathActiveImage(), *base, false);
+                        bool tag_found = pDICOMManager->FindTag(0x5400, 0x1010, tag);
+
+                        GNC::GCS::IEntorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+                        if (!tag_found) {
+                                LOG_WARN("ECGStudy","Got data set that should contain waveform data, but the tag (0x5400, 0x1010) is not available");
+                                return;
+                        }
+
+                } else {
+                        GNC::GCS::IEntorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+                        LOG_INFO("ECGStudy::LoadChannels", "No waveform found");
+                        return;
+                }
+
+                GIL::DICOM::DicomDataset* waveformSeq = base->buscar_secuencia(TAGS::WaveFormSequence);
+
+                if (!waveformSeq) {
+                        LOG_INFO("ECGStudy::LoadChannels", "No waveform sequence in base");
+                        return;
+                }
+
+                int numChannels = 0;
+                int numSamples = 0;
+                double samplingFreq = 0.0;
+                short paddingValue = 0;
+                std::string orig("unknown");
+                std::string groupLabel("unknown");
+                int bitsAllocated;
+                std::string waveFormSampleInterpretation("unknown");
+
+                int waveform = 0;
+                for (auto itSequences = waveformSeq->items.rbegin(); itSequences != waveformSeq->items.rend(); ++itSequences, ++waveform) {
+                        //multiplex group
+                        GIL::DICOM::DicomDataset& wf = (*itSequences);
+                        ecgFile->Groups.push_back(TMultiplexGroup());
+                        TMultiplexGroup& group = ecgFile->Groups.back();
+
+                        Get(wf.getTag(TAGS::NumberOfWaveformChannels), numChannels);
+                        LOG_INFO("ECGStudy::LoadChannels", "numChannels=" << numChannels);
+
+                        Get(wf.getTag(TAGS::NumberOfWaveformSamples), numSamples);
+                        LOG_INFO("ECGStudy::LoadChannels", "numSamples=" << numSamples);
+
+                        Get(wf.getTag(TAGS::SamplingFrequency), samplingFreq);
+                        LOG_INFO("ECGStudy::LoadChannels", "samplingFreq=" << samplingFreq);
+
+                        //FIXME mal no pilla bien el padding value porque es de tipo ox
+                        Get(wf.getTag(TAGS::WaveformPaddingValue), paddingValue);
+                        LOG_INFO("ECGStudy::LoadChannels", "paddingValue=" << paddingValue);
+
+                        if (!wf.getTag(TAGS::WaveformOriginality, orig))
+                                LOG_INFO("ECGStudy", "Tag " << TAGS::WaveformOriginality << "not found");
+                        if (!wf.getTag(TAGS::MultiplexGroupLabel, groupLabel))
+                                LOG_INFO("ECGStudy", "Tag " << TAGS::MultiplexGroupLabel << "not found");
+                        Get(wf.getTag(TAGS::WaveformBitsAllocated), bitsAllocated);
+                        if (!wf.getTag(TAGS::WaveformSampleInterpretation, waveFormSampleInterpretation))
+                                LOG_INFO("ECGStudy", "Tag " << TAGS::WaveformSampleInterpretation << "not found");
+                        if (bitsAllocated != 16 || waveFormSampleInterpretation != "SS") {
+                                LOG_INFO("ECGStudy", "We are unnable to interpret bitsAllocated=" << bitsAllocated << " waveFormSampleInterpretation=" << waveFormSampleInterpretation);
+                                throw GNC::GCS::ControladorCargaException(_Std("ECG format not supported"), "ECGStudy");
+                        }
+
+                        if (groupLabel != "") {
+                                group.Label = groupLabel;
+                        }
+
+                        //LOG_INFO("ECGStudy::LoadChannels","waveform=" << wf);
+
+                        GIL::DICOM::DicomDataset* channel_def_seq = wf.buscar_secuencia(TAGS::ChannelDefinitionSequence);
+
+                        if (!channel_def_seq) {
+                                LOG_ERROR("ECGStudy::LoadChannels", "wf.buscar_secuencia(TAGS::ChannelDefinitionSequence) returned NULL");
+                                return;  
+                        }
+
+                        if (channel_def_seq->items.size() == (unsigned int) numChannels) {
+
+                                int i = 0;
+                                for (auto  it = channel_def_seq->items.rbegin(); it != channel_def_seq->items.rend(); ++it, i++) {
+                                        LOG_INFO("ECGStudy::LoadChannels", "Read channel_def_seq=" << i);
+
+
+                                        group.Channels.push_back(GNKVisualizator::ChannelInfo());
+
+                                        GIL::DICOM::DicomDataset& channel_def = (*it);
+
+                                        //>> SQ Items (1): (003A,0208) - Channel Source Sequence
+                                        //   > (0008|0104, LO, "Lead I")  # 0x6 - Code Meaning  OK
+                                        //   > (003A|0210, DS, "0.00122")  # 0x8 - Channel sensitivity  OK
+
+
+                                        GIL::DICOM::DicomDataset* channel_src_seq = channel_def.buscar_secuencia(TAGS::ChannelSourceSequence);
+
+                                        //>> SQ Items (1): (003A,0211) - Channel sensitivity units
+                                        //  > (0008|0100, SH, "mV")  # 0x2 - Code Value  OK
+                                        //  > (0008|0104, LO, "millivolt")  # 0xA - Code Meaning  OK
+                                        //  > (003A|0212, DS, "1")  # 0x2 - Sensitivity correction factor  OK
+                                        //  > (003A|0213, DS, "0")  # 0x2 - Channel baseline  OK
+                                        //  > (003A|0214, DS, "0")  # 0x2 - Channel Time skew  OK
+                                        //  > (003A|021A, US, 0x0010)  # 0x2 - Bits per sample  OK
+                                        //  > (003A|0220, DS, ".05")  # 0x4 - Filter low frequency  OK
+                                        //  > (003A|0221, DS, "100")  # 0x4 - filter high frequency  OK
+                                        GIL::DICOM::DicomDataset* channel_sen_seq = channel_def.buscar_secuencia("003a|0211");
+
+
+
+
+                                        if ( channel_src_seq != NULL && channel_src_seq->items.size() > 0 &&
+                                             channel_sen_seq != NULL && channel_sen_seq->items.size() > 0) {
+                                                GIL::DICOM::DicomDataset& channel_src = channel_src_seq->items.front();
+                                                GIL::DICOM::DicomDataset& channel_sen = channel_sen_seq->items.front();
+
+                                                ChannelInfo& channelInfo = group.Channels[i];
+
+                                                channelInfo.NumSamples = numSamples;
+                                                channelInfo.SamplingFrecuency = samplingFreq;
+
+                                                std::string codingValue = channel_src.getTag("0008|0100");
+                                                std::string codingSchemeDesignator = channel_src.getTag("0008|0102");
+                                                channelInfo.SetLead                       (codingSchemeDesignator, codingValue);
+
+                                                channelInfo.SetUnitsValue                  (channel_sen.getTag                ("0008|0100"));
+                                                channelInfo.SetUnitsMeaning                (channel_sen.getTag                ("0008|0104"));
+
+                                                channelInfo.SetSensitivity                 (channel_def.getTagAs<double>      ("003a|0210", 1.0));
+                                                channelInfo.SetSensitivityCorrectionFactor (channel_def.getTagAs<double>      ("003a|0212", 1.0));
+                                                channelInfo.SetChannelBaseline             (channel_def.getTagAs<double>      ("003a|0213", 0.0));
+                                                channelInfo.SetChannelTimeSkew             (channel_def.getTagAs<double>      ("003a|0214", 0.0));
+                                                channelInfo.SetBitsPerSample               (channel_def.getTagAs<unsigned int>("003a|021a", 16));
+                                                channelInfo.SetFilterLowFrequency          (channel_def.getTagAs<double>      ("003a|0220", 0.0));
+                                                channelInfo.SetFilterHighFrequency         (channel_def.getTagAs<double>      ("003a|0221", 0.0));
+
+
+
+                                        }else{
+                                                LOG_ERROR("ECGStudy::LoadChannels", "waveform not found");
+                                        }
+                                }
+
+                                GIL::DICOM::TagPrivadoUndefined& samples = tag[waveform];
+                                auto nSamples = samples.GetSize() / 2;
+
+                                if (nSamples >=  numSamples * group.Channels.size()) {
+                                        short* data = (short*)samples.GetValor();
+                                        unsigned int samplepos = 0;
+                                        for (int i = 0; i < numSamples; i++) {
+                                                for (TListChannelInfo::iterator it = group.Channels.begin(); it != group.Channels.end(); ++it, ++samplepos) {
+                                                        it->Samples.push_back(*data++);
+                                                }
+                                        }
+                                        LOG_INFO("ECGStudy::LoadChannels", "copied " << samplepos << " samples");
+                                }else{
+                                        LOG_ERROR("ECGStudy::LoadChannels", "Didn't get waveform samples as expected: expect "
+                                                  << numSamples * group.Channels.size()<< " bytes, got " <<  nSamples );
+                                }
+
+
+                        }else {
+                                LOG_INFO("ECGStudy::LoadChannels", "Not reading data!");
+                        }
+
+                }//for secuencias waveforms
+                //annotation
+                {
+                        GIL::DICOM::DicomDataset* annotation_seq = base->buscar_secuencia(TAGS::AnnotationSequence);
+                        //TODO read referenced channel to read information about each channel
+
+                        if (annotation_seq != NULL) {
+                                //for each annotation group one list of strings
+                                typedef std::map<int, std::list<std::string> > TMapMultiplexedGroup;
+                                typedef std::map<int, TMapMultiplexedGroup> TMapAnnotations;
+                                TMapAnnotations annotationsMap;
+                                for (GIL::DICOM::DicomDataset::DatasetList::reverse_iterator itAnnotations = annotation_seq->items.rbegin(); itAnnotations != annotation_seq->items.rend(); ++itAnnotations) {
+                                        GIL::DICOM::DicomDataset& an = (*itAnnotations);
+                                        std::string textValue = an.getTag(TAGS::UnformattedTextValue);
+
+                                        if (textValue != "") {
+                                                int group = 0, multiplexedGroup = 0;
+                                                Get(an.getTag(TAGS::AnnotationGroupNumber), group);
+                                                Get(an.getTag(TAGS::ReferencedChannels), multiplexedGroup);
+                                                multiplexedGroup -= 1;
+                                                annotationsMap[multiplexedGroup][group].push_back(textValue);
+                                        }
+                                }//for annotations
+
+
+                                for (TMapAnnotations::iterator itAnnotations = annotationsMap.begin(); itAnnotations != annotationsMap.end(); ++itAnnotations) {
+                                        for (int i = 0; i < (int)ecgFile->Groups.size(); ++i) {
+                                                if ((*itAnnotations).second.find(i) != (*itAnnotations).second.end()) {
+                                                        TMapMultiplexedGroup& annotationsMultiplexed = (*itAnnotations).second;
+                                                        std::ostringstream ostr;
+                                                        for (TMapMultiplexedGroup::iterator itGroups = annotationsMultiplexed.begin(); itGroups != annotationsMultiplexed.end(); ++itGroups) {
+                                                                for (std::list<std::string>::iterator itStrings = (*itGroups).second.begin(); itStrings != (*itGroups).second.end(); ++itStrings) {
+                                                                        ostr << (*itStrings) << std::endl;
+                                                                }
+                                                                ostr << std::endl;
+                                                        }
+                                                        ecgFile->Groups[i].Diagnosis = ostr.str();
+                                                }
+                                        }
+                                }
+                                /////////////////////////////////////////////////////////
+                                ////////////////GLOBAL MEASUREMENTS//////////////////////
+                                /////////////////////////////////////////////////////////
+                                std::string s_AvgRRPPItemsCodes[] = {"5.10.2.1-3", "5.10.2.1-5", "5.10.2.5-5", "5.10.2.5-1"};
+                                std::string s_AvgRRPPItemsMeaning[] = {_Std("RR Interval"), _Std("PP Interval"), _Std("QTc Interval"), _Std("Vent Rate")};
+                                TVectorPairStrings s_AvgRRPPItems;
+                                for (int i = 0; i < 4; ++i) {
+                                        s_AvgRRPPItems.push_back(std::pair<std::string, std::string>(s_AvgRRPPItemsCodes[i], s_AvgRRPPItemsMeaning[i]));
+                                }
+                                std::string s_AvgRRPPUnitsCodes[] = {"ms", "ms", "ms", "/min"};
+                                std::string s_AvgRRPPUnitsMeaning[] = {"milliseconds", "milliseconds", "milliseconds", "heartbeat per minute"};
+                                TVectorPairStrings s_AvgRRPPUnits;
+                                for (int i = 0; i < 4; ++i) {
+                                        s_AvgRRPPUnits.push_back(std::pair<std::string, std::string>(s_AvgRRPPUnitsCodes[i], s_AvgRRPPUnitsMeaning[i]));
+                                }
+                                std::string s_MeasurementItemsCodes[] = {"5.10.3-1", "5.10.3-2", "5.10.3-3", "5.10.3-4", "5.10.3-5", "5.10.3-11", "5.10.3-13", "5.10.3-15"};
+                                std::string s_MeasurementItemsMeaning[] = {"P onset", "P offset", "QRS onset", "QRS offset", "T offset", "P Axis", "QRS Axis", "T Axis"};
+                                TVectorPairStrings s_MeasurementItems;
+                                for (int i = 0; i < 8; ++i) {
+                                        s_MeasurementItems.push_back(std::pair<std::string, std::string>(s_MeasurementItemsCodes[i], s_MeasurementItemsMeaning[i]));
+                                }
+                                std::string s_MeasurementUnitsCode[] = {"ms", "ms", "ms", "ms", "ms", "deg", "deg", "deg"};
+                                std::string s_MeasurementUnitsValue[]= {"milliseconds", "milliseconds", "milliseconds", "milliseconds", "milliseconds", "degrees", "degrees", "degrees"};
+                                TVectorPairStrings s_MeasurementUnits;
+                                for (int i = 0; i < 8; ++i) {
+                                        s_MeasurementUnits.push_back(std::pair<std::string, std::string>(s_MeasurementUnitsCode[i], s_MeasurementUnitsValue[i]));
+                                }
+                                std::string s_MeasurementUnitsPointsCode[] = {"POINT", "POINT", "POINT", "POINT", "POINT", "deg", "deg", "deg"};
+                                std::string s_MeasurementUnitsPointsValue[]= {"", "", "", "", "", "degrees", "degrees", "degrees"};
+                                TVectorPairStrings s_MeasurementUnitsPoints;
+                                for (int i = 0; i < 8; ++i) {
+                                        s_MeasurementUnitsPoints.push_back(std::pair<std::string, std::string>(s_MeasurementUnitsPointsCode[i], s_MeasurementUnitsPointsValue[i]));
+                                }
+                                std::list<int> s_MeasurementRWC;
+                                s_MeasurementRWC.push_back(1);
+                                s_MeasurementRWC.push_back(0);
+
+                                TMapVectorStrings resultAvgRR_PP = GetValues(annotation_seq, s_AvgRRPPItems, s_AvgRRPPUnits, s_MeasurementRWC, false);
+                                TMapVectorStrings resultMeasurments = GetValues(annotation_seq, s_MeasurementItems, s_MeasurementUnits, s_MeasurementRWC, true);
+
+                                float factor = 1.0f;
+
+                                if (!resultAvgRR_PP.empty()) {
+                                        TMapVectorStrings temp1 = GetValues(annotation_seq, s_MeasurementItems, s_MeasurementUnitsPoints, s_MeasurementRWC, true);
+
+                                        if ((!temp1.empty()) && ((!resultMeasurments.empty())	|| (resultMeasurments.size() < temp1.size()) || (calcNrOfValues(resultMeasurments) < calcNrOfValues(temp1)))) {
+                                                if (!ecgFile->Groups.empty()) {
+                                                        factor = 1000.0f / ecgFile->Groups[0].Channels[0].SamplingFrecuency;
+                                                }
+
+                                                resultMeasurments = temp1;
+                                        }
+                                }
+
+                                if ( (!resultAvgRR_PP.empty()) && (!resultMeasurments.empty()) ) {
+                                        ecgFile->globalMeasurements = GNC::GCS::Ptr<GlobalMeasurements>(new GlobalMeasurements());
+                                        GNKVisualizator::GlobalMeasurements& mes = (*ecgFile->globalMeasurements);
+
+                                        TVectorStrings& resultVector = resultAvgRR_PP.begin()->second;
+
+                                        if (resultVector.size() >= 1) {
+                                                if (resultVector[0] != "") {
+                                                        Get(resultVector[0], mes.AvgRR);
+                                                }
+
+                                                if (resultVector[1] != "") {
+                                                        Get(resultVector[1], mes.AvgPP);
+                                                }
+
+                                                if (resultVector[2] != "") {
+                                                        unsigned short qtc;
+                                                        Get(resultVector[2], qtc);
+                                                        mes.setQTc(qtc);
+                                                }
+
+                                                if (resultVector[3] != "") {
+                                                        unsigned short ventRate;
+                                                        Get(resultVector[3], ventRate);
+                                                        mes.setVentRate(ventRate);
+                                                }
+                                        }
+
+                                        if ( (!resultMeasurments.empty()) && ( ((*resultMeasurments.begin()).second.size() -1) == 8) ) {
+                                                for (TMapVectorStrings::iterator itMap = resultMeasurments.begin(); itMap != resultMeasurments.end(); ++itMap) {
+                                                        GNC::GCS::Ptr<GNKVisualizator::GlobalMeasurement> measurement(new GNKVisualizator::GlobalMeasurement());
+
+                                                        TVectorStrings& vectorStrings = (*itMap).second;
+                                                        unsigned short tempUnsignedShort;
+                                                        short tempShort;
+
+                                                        Get(vectorStrings[0], tempUnsignedShort);
+                                                        measurement->Ponset = (unsigned short)(tempUnsignedShort*factor);
+                                                        Get(vectorStrings[1], tempUnsignedShort);
+                                                        measurement->Poffset = (unsigned short)(tempUnsignedShort*factor);
+                                                        Get(vectorStrings[2], tempUnsignedShort);
+                                                        measurement->QRSonset = (unsigned short)(tempUnsignedShort*factor);
+                                                        Get(vectorStrings[3], tempUnsignedShort);
+                                                        measurement->QRSoffset = (unsigned short)(tempUnsignedShort*factor);
+                                                        Get(vectorStrings[4], tempUnsignedShort);
+                                                        measurement->Toffset = (unsigned short)(tempUnsignedShort*factor);
+                                                        Get(vectorStrings[5], tempShort);
+                                                        measurement->Paxis = tempShort;
+                                                        Get(vectorStrings[6], tempShort);
+                                                        measurement->QRSaxis = tempShort;
+                                                        Get(vectorStrings[7], tempShort);
+                                                        measurement->Taxis = tempShort;
+
+
+                                                        mes.measurment.push_back(measurement);
+                                                }
+                                        }
+                                }
+
+                        }//annotation_seq != NULL
+                }//annotation
+        }else{
+                LOG_DEBUG("ECGStudy::LoadChannels", "ECGFiles[ActiveFileIndex].IsValid() = true");
+        }
+}
+
+
diff --git a/visualizator/visualizator/estudios/ecgstudy.h b/visualizator/visualizator/estudios/ecgstudy.h
new file mode 100644
index 0000000..00e502a
--- /dev/null
+++ b/visualizator/visualizator/estudios/ecgstudy.h
@@ -0,0 +1,215 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#include "overlay.h"
+#include "globalmeasurements.h"
+#include <api/istudycontext.h>
+#include <api/internationalization/internationalization.h>
+
+class wxWindow;
+class wxSizer;
+class wxXmlNode;
+class wxXmlDocument;
+
+namespace GNKVisualizator
+{
+//////////////ECGS
+class ChannelInfo
+{
+public:
+        typedef enum TLeadType {
+                Unknown = 0, I, II, V1, V2, V3, V4, V5, V6, V7, V2R, V3R, V4R, V5R, V6R, V7R, X, Y, Z,
+                CC5, CM5, LA, RA, LL, fI, fE, fC, fA, fM, fF, fH, dI, dII, dV1, dV2, dV3, dV4, dV5, dV6,
+                dV7, dV2R, dV3R, dV4R, dV5R, dV6R, dV7R, dX, dY, dZ, dCC5, dCM5, dLA, dRA, dLL, dfI, dfE,
+                dfC, dfA, dfM, dfF, dfH, III, aVR, aVL, aVF, aVRneg, V8, V9, V8R, V9R, D, A, J, Defib,
+                Extern, A1, A2, A3, A4, dV8, dV9, dV8R, dV9R, dD, dA, dJ, Chest, V, VR, VL, VF, MCL, MCL1,
+                MCL2, MCL3, MCL4, MCL5, MCL6, CC, CC1, CC2, CC3, CC4, CC6, CC7, CM, CM1, CM2, CM3, CM4, CM6,
+                dIII, daVR, daVL, daVF, daVRneg, dChest, dV, dVR, dVL, dVF, CM7, CH5, CS5, CB5, CR5, ML, AB1,
+                AB2, AB3, AB4, ES, AS, AI, S, dDefib, dExtern, dA1, dA2, dA3, dA4, dMCL1, dMCL2, dMCL3,
+                dMCL4, dMCL5, dMCL6, RL, CV5RL, CV6LL, CV6LU, V10, dMCL, dCC, dCC1, dCC2, dCC3, dCC4, dCC6,
+                dCC7,  dCM, dCM1, dCM2, dCM3, dCM4, dCM6, dCM7, dCH5, dCS5, dCB5, dCR5, dML, dAB1, dAB2, dAB3,
+                dAB4, dES, dAS, dAI, dS, dRL, dCV5RL, dCV6LL, dCV6LU, dV10
+        } TLeadType;
+
+        ChannelInfo() :
+                LeadType(Unknown),
+                Sensitivity(1.0),
+                SensitivityCorrectionFactor(1.0),
+                Baseline(0.0),
+                TimeSkew(0.0),
+                BitsPerSample(16),
+                FilterLowFrequency(0.0),
+                FilterHighFrequency(0.0),
+                NumSamples(0),
+                SamplingFrecuency(0.0),
+                Multiplier(1.0)
+        {
+
+        }
+
+        void SetLead(const std::string& codingSchemeDesignator, const std::string& codingValue);
+        std::string GetTitle() const;
+
+        void SetUnitsValue(const std::string& unitsvalue);
+
+        void SetUnitsMeaning(const std::string& unitsmeaning)
+        {
+                UnitsMeaning = unitsmeaning;
+        }
+
+        void SetSensitivity (double sensitivity)
+        {
+                Sensitivity = sensitivity;
+        }
+        void SetSensitivityCorrectionFactor(double sensitivitycorrectionfactor)
+        {
+                SensitivityCorrectionFactor = sensitivitycorrectionfactor;
+        }
+        void SetChannelBaseline(double baseline)
+        {
+                Baseline = baseline;
+        }
+        void SetChannelTimeSkew(double timeskew)
+        {
+                TimeSkew = timeskew;
+        }
+        void SetBitsPerSample(unsigned int bitspersample)
+        {
+                BitsPerSample = bitspersample;
+        }
+        void SetFilterLowFrequency(double filterlowfrequency)
+        {
+                FilterLowFrequency = filterlowfrequency;
+        }
+        void SetFilterHighFrequency(double filterhighfrequency)
+        {
+                FilterHighFrequency = filterhighfrequency;
+        }
+
+
+
+        TLeadType	 LeadType;
+        std::string  UnitsValue;
+        std::string  UnitsMeaning;
+
+        double       Sensitivity;
+        double       SensitivityCorrectionFactor;
+        double       Baseline;
+        double       TimeSkew;
+        unsigned int BitsPerSample;
+        double       FilterLowFrequency;
+        double       FilterHighFrequency;
+        double		 NumSamples;
+        double		 SamplingFrecuency;
+
+        typedef std::vector<double> TVectorSamples;
+        TVectorSamples Samples;
+
+        double       Multiplier;
+};
+
+class ECGStudy : public GNC::GCS::IStudyContext
+{
+public:
+        typedef std::vector<ChannelInfo> TListChannelInfo;
+        class TMultiplexGroup
+        {
+        public:
+                TMultiplexGroup() :
+                        Label(_Std("Unknown"))
+                {
+
+                }
+                TListChannelInfo Channels;
+                std::string Label;
+                std::string Diagnosis;
+        };
+        typedef std::vector<TMultiplexGroup> TListMultiplexGroup;
+
+
+        typedef struct TECGFile {
+                TListMultiplexGroup Groups;
+                GNC::GCS::Ptr<GlobalMeasurements> globalMeasurements;
+                int IndexOfActualMultiplexGroup;
+                TECGFile()
+                {
+                        IndexOfActualMultiplexGroup = 0;
+                }
+                ~TECGFile()
+                {
+                        Groups.clear();
+                }
+                TListChannelInfo& GetListOfChannels()
+                {
+                        return Groups[IndexOfActualMultiplexGroup].Channels;
+                }
+                std::list<std::string> GetLabelOfMultiplexGroups()
+                {
+                        std::list<std::string> listOfLabels;
+                        for (TListMultiplexGroup::iterator it = Groups.begin(); it != Groups.end(); ++it) {
+                                listOfLabels.push_back((*it).Label);
+                        }
+                        return listOfLabels;
+                }
+
+                void SetIndexOfActualMultiplexGroup(int index)
+                {
+                        if (index >=0 && index < (int)Groups.size()) {
+                                IndexOfActualMultiplexGroup = index;
+                        }
+                }
+                const std::string& GetDiagnosis()
+                {
+                        return Groups[IndexOfActualMultiplexGroup].Diagnosis;
+                }
+        } TECGFile;
+
+
+        typedef std::vector<GNC::GCS::Ptr<TECGFile> >              TVectorECGFiles;
+
+        ECGStudy();
+        ~ECGStudy();
+
+        void InitializeContext(long pkSeries);
+
+        //overlays...
+
+        virtual void CallbackCargarTagsImagen(const int /*indice*/, GIL::DICOM::IDICOMManager* /*pDicomManager*/) {}
+
+        void SetIndexOfActualMultiplexGroup(int index);
+        TListChannelInfo& GetListOfChannels();
+        bool Ok();
+        std::list<std::string> GetLabelOfMultiplexGroups();
+        const std::string GetGlobalMeasurement();
+
+        const std::string& GetDiagnosis();
+
+        std::string getMeasureText(bool isVertical, float measure);
+
+        virtual void LoadChannels();
+
+
+protected:
+        TVectorECGFiles	  ECGFiles;
+};
+}
diff --git a/visualizator/visualizator/estudios/globalmeasurement.cpp b/visualizator/visualizator/estudios/globalmeasurement.cpp
new file mode 100644
index 0000000..da4138c
--- /dev/null
+++ b/visualizator/visualizator/estudios/globalmeasurement.cpp
@@ -0,0 +1,68 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "globalmeasurements.h"
+#include <cmath>
+
+namespace GNKVisualizator
+{
+
+
+GlobalMeasurement::GlobalMeasurement()
+{
+        Ponset    = MeasurementNoValue;
+        Poffset   = MeasurementNoValue;
+        QRSonset  = MeasurementNoValue;
+        QRSoffset = MeasurementNoValue;
+        Toffset   = MeasurementNoValue;
+        Paxis     = MeasurementNoAxisValue;
+        QRSaxis   = MeasurementNoAxisValue;
+        Taxis     = MeasurementNoAxisValue;
+}
+unsigned short GlobalMeasurement::calcQTc(unsigned short AvgRR, unsigned short HR, TQTcCalcType calcType)
+{
+
+        if ((AvgRR == 0)
+            ||	(AvgRR == MeasurementNoValue)
+            ||	(QTdur() == MeasurementNoValue))
+                return MeasurementNoValue;
+
+        unsigned short ret = MeasurementNoValue;
+
+        switch (calcType) {
+        case Bazett:
+                ret = (unsigned short) (QTdur() / std::sqrt(AvgRR * 0.001));
+                break;
+        case Fridericia:
+                ret = (unsigned short) (QTdur() / std::pow(AvgRR * 0.001, 1.0/3.0));
+                break;
+        case Framingham:
+                ret = (unsigned short) (QTdur() + (154 * (1 - (AvgRR * 0.001))));
+                break;
+        case Hodges:
+                ret = (unsigned short) (QTdur() + (1.75 * (HR - 60)));
+                break;
+        default:
+                break;
+        }
+
+        return ret;
+}
+}
diff --git a/visualizator/visualizator/estudios/globalmeasurement.h b/visualizator/visualizator/estudios/globalmeasurement.h
new file mode 100644
index 0000000..26926d0
--- /dev/null
+++ b/visualizator/visualizator/estudios/globalmeasurement.h
@@ -0,0 +1,78 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#define MeasurementNoValue      29999
+#define MeasurementNoAxisValue 29999
+
+namespace GNKVisualizator
+{
+class GlobalMeasurement
+{
+public:
+        typedef enum TQTcCalcType {
+                Unknown = -1,
+                Bazett = 0,
+                Hodges = 1,
+                Fridericia = 2,
+                Framingham = 3
+        } TQTcCalcType;
+
+        unsigned short Ponset;
+        unsigned short Poffset;
+        unsigned short QRSonset;
+        unsigned short QRSoffset;
+        unsigned short Toffset;
+        short Paxis;
+        short QRSaxis;
+        short Taxis;
+
+        GlobalMeasurement();
+
+        unsigned short Pdur()
+        {
+                return (unsigned short) ((Poffset != MeasurementNoValue) && (Ponset != MeasurementNoValue) && (Ponset < Poffset) ? (Poffset - Ponset) : MeasurementNoValue);
+        }
+
+        unsigned short PRint()
+        {
+                return (unsigned short) ((QRSonset != MeasurementNoValue) && (Ponset != MeasurementNoValue) && (Pdur() != MeasurementNoValue) ? (QRSonset - Ponset) : MeasurementNoValue);
+        }
+
+        unsigned short QRSdur()
+        {
+                return (unsigned short) ((QRSoffset != MeasurementNoValue) && (QRSonset != MeasurementNoValue) ? (QRSoffset - QRSonset) : MeasurementNoValue);
+        }
+
+        unsigned short Tdur()
+        {
+                return (unsigned short) ((Toffset != MeasurementNoValue) && (Ponset != MeasurementNoValue) ? (Toffset - QRSoffset) : MeasurementNoValue);
+        }
+
+        unsigned short QTdur()
+        {
+                return (unsigned short) ((Toffset != MeasurementNoValue) && (QRSonset != MeasurementNoValue) ? (Toffset - QRSonset) : MeasurementNoValue);
+        }
+
+        unsigned short calcQTc(unsigned short AvgRR, unsigned short HR, TQTcCalcType calcType);
+};
+}
diff --git a/visualizator/visualizator/estudios/globalmeasurements.cpp b/visualizator/visualizator/estudios/globalmeasurements.cpp
new file mode 100644
index 0000000..6113e9b
--- /dev/null
+++ b/visualizator/visualizator/estudios/globalmeasurements.cpp
@@ -0,0 +1,33 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "globalmeasurements.h"
+
+namespace GNKVisualizator
+{
+GlobalMeasurements::GlobalMeasurements() :
+        QTcType(GlobalMeasurement::Unknown),
+        _QTc(MeasurementNoValue),
+        _VentRate(MeasurementNoValue),
+        AvgRR(MeasurementNoValue),
+        AvgPP(MeasurementNoValue)
+{
+}
+}
diff --git a/visualizator/visualizator/estudios/globalmeasurements.h b/visualizator/visualizator/estudios/globalmeasurements.h
new file mode 100644
index 0000000..45c701e
--- /dev/null
+++ b/visualizator/visualizator/estudios/globalmeasurements.h
@@ -0,0 +1,188 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include "globalmeasurement.h"
+#include <vector>
+#include <api/autoptr.h>
+
+namespace GNKVisualizator
+{
+struct Spike {
+        unsigned short Time;
+        unsigned short Amplitude;
+
+        Spike() : Time(MeasurementNoValue), Amplitude(MeasurementNoValue)
+        {
+        }
+};
+
+///////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////
+class GlobalMeasurements
+{
+public:
+
+
+        GlobalMeasurement::TQTcCalcType QTcType;
+
+
+        GlobalMeasurements();
+
+private:
+        unsigned short _QTc;
+        unsigned short _VentRate;
+
+public:
+        unsigned short AvgRR;
+        unsigned short AvgPP;
+        std::vector<GNC::GCS::Ptr<GlobalMeasurement> > measurment;
+        std::list<GNC::GCS::Ptr<Spike> > spike;
+
+
+        unsigned short getVentRate()
+        {
+                if (_VentRate < MeasurementNoValue) {
+                        return _VentRate;
+                }
+
+                return (unsigned short) ((AvgRR == 0) || (AvgRR == MeasurementNoValue) ? 0 : (60000 / AvgRR));
+        }
+        void setVentRate(unsigned short value)
+        {
+                _VentRate = value < MeasurementNoValue ? value : MeasurementNoValue;
+        }
+
+        unsigned short getPdur()
+        {
+                if (!measurment.empty() && measurment[0].IsValid()) {
+                        return measurment[0]->Pdur();
+                }
+
+                return MeasurementNoValue;
+        }
+
+        unsigned short getPRint()
+        {
+                if (!measurment.empty() && measurment[0].IsValid()) {
+                        return measurment[0]->PRint();
+                }
+
+                return MeasurementNoValue;
+        }
+
+        unsigned short getQRSdur()
+        {
+                if (!measurment.empty() && measurment[0].IsValid()) {
+                        return measurment[0]->QRSdur();
+                }
+
+                return MeasurementNoValue;
+        }
+
+        unsigned short getQTdur()
+        {
+                if (!measurment.empty() && measurment[0].IsValid()) {
+                        return measurment[0]->QTdur();
+                }
+
+                return MeasurementNoValue;
+        }
+
+        unsigned short  getQTc()
+        {
+                if (_QTc < MeasurementNoValue) {
+                        return _QTc;
+                }
+
+                if (!measurment.empty() && measurment[0].IsValid() && (AvgRR != MeasurementNoValue)) {
+                        return measurment[0]->calcQTc(AvgRR, getVentRate(),(GNKVisualizator::GlobalMeasurement::TQTcCalcType) QTcType);
+                }
+
+                return MeasurementNoValue;
+        }
+        void setQTc(unsigned short value)
+        {
+                _QTc = value;
+        }
+
+
+        GlobalMeasurement::TQTcCalcType getQTcType()
+        {
+                if (_QTc >= MeasurementNoValue) {
+                        return (GlobalMeasurement::TQTcCalcType) (_QTc - MeasurementNoValue);
+                }
+
+                return GlobalMeasurement::Unknown;
+        }
+        void setQTcType(GlobalMeasurement::TQTcCalcType value)
+        {
+                if (value != GlobalMeasurement::Unknown)
+                        _QTc = (unsigned short) (MeasurementNoValue + value);
+                else if (_QTc >= MeasurementNoValue)
+                        _QTc = 0;
+        }
+        /*
+        public GlobalMeasurements Clone()
+        {
+        GlobalMeasurements ret = new GlobalMeasurements();
+
+        ret._QTc = _QTc;
+        ret._VentRate = VentRate;
+        ret.AvgPP = AvgPP;
+        ret.AvgRR = AvgRR;
+
+        if (measurment != null)
+        {
+        	ret.measurment = new GlobalMeasurement[measurment.Length];
+        	for (int i=0;i < measurment.Length;i++)
+        	{
+        		ret.measurment[i] = new GlobalMeasurement();
+
+        		ret.measurment[i].Ponset = measurment[i].Ponset;
+        		ret.measurment[i].Poffset = measurment[i].Poffset;
+        		ret.measurment[i].QRSonset = measurment[i].QRSonset;
+        		ret.measurment[i].QRSoffset = measurment[i].QRSoffset;
+        		ret.measurment[i].Toffset = measurment[i].Toffset;
+
+        		ret.measurment[i].Paxis = measurment[i].Paxis;
+        		ret.measurment[i].QRSaxis = measurment[i].QRSaxis;
+        		ret.measurment[i].Taxis = measurment[i].Taxis;
+        	}
+        }
+
+        if (spike != null)
+        {
+        	ret.spike = new Spike[spike.Length];
+        	for (int i=0;i < spike.Length;i++)
+        	{
+        		ret.spike[i] = new Spike();
+        		ret.spike[i].Amplitude = spike[i].Amplitude;
+        		ret.spike[i].Time = spike[i].Time;
+        	}
+        }
+
+        return ret;
+        }*/
+};
+}
diff --git a/visualizator/visualizator/estudios/overlay.h b/visualizator/visualizator/estudios/overlay.h
new file mode 100644
index 0000000..7753d97
--- /dev/null
+++ b/visualizator/visualizator/estudios/overlay.h
@@ -0,0 +1,76 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vector>
+#include <map>
+#include <vtkSmartPointer.h>
+#include <vtkImageData.h>
+
+namespace GNKVisualizator
+{
+
+typedef std::map<int,bool> TEstadoOverlay;
+
+typedef struct TOverlay {
+        std::string nombre;
+        int indice;
+        vtkSmartPointer<vtkImageData> img;
+
+        TOverlay() :
+                nombre("Overlay"),
+                indice(0)
+        {
+        }
+
+        ~TOverlay()
+        {
+                this->img = NULL;
+        }
+
+        TOverlay(std::string nombre,int indice)
+        {
+                this->nombre = nombre;
+                this->indice = indice;
+        }
+
+        TOverlay(const TOverlay& otro)
+        {
+                this->nombre = otro.nombre;
+                this->indice = otro.indice;
+                this->img = otro.img;
+        }
+
+        TOverlay& operator = (const TOverlay& otro)
+        {
+                this->nombre = otro.nombre;
+                this->indice = otro.indice;
+                this->img = otro.img;
+                return *this;
+        }
+} TOverlay;
+
+typedef std::list<TOverlay> TListaOverlays;
+};
diff --git a/visualizator/visualizator/estudios/visualizatorstudy.cpp b/visualizator/visualizator/estudios/visualizatorstudy.cpp
new file mode 100644
index 0000000..bbd2b15
--- /dev/null
+++ b/visualizator/visualizator/estudios/visualizatorstudy.cpp
@@ -0,0 +1,274 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <wx/app.h>
+#include <wx/xml/xml.h>
+#include <wx/file.h>
+#include <wx/filename.h>
+#include <wx/mstream.h>
+
+#include <api/globals.h>
+//#include <api/filename.h>
+#include <api/toolsystem/itoolsregistry.h>
+#include <api/ientorno.h>
+
+#include <api/dicom/idicommanager.h>
+#include <api/dicom/idicomizador.h>
+#include <api/controllers/icontroladorcarga.h>
+#include <api/imodelointegracion.h>
+#include <main/controllers/historycontroller.h>
+
+#include <main/entorno.h>
+
+#include "visualizatorstudy.h"
+
+#include <vtkPointData.h>
+#include <vtkImageData.h>
+
+
+GNKVisualizator::VisualizatorStudy::VisualizatorStudy()
+{
+        GTRACE(">> VisualizatorStudy::VisualizatorStudy()" << this);
+        GTRACE("<< VisualizatorStudy::VisualizatorStudy()" << this);
+}
+
+GNKVisualizator::VisualizatorStudy::~VisualizatorStudy()
+{
+        GTRACE(">> VisualizatorStudy::~VisualizatorStudy()" << this);
+        ListaOverlays.clear();
+        GTRACE("<< VisualizatorStudy::~VisualizatorStudy()" << this);
+}
+
+
+void GNKVisualizator::VisualizatorStudy::InitializeContext(long seriesPk)
+{
+        GNC::GCS::IHistoryController::LightFileModelList fileModels;
+        GNC::GCS::HistoryController::Instance()->GetSeriesSortedFileModels(seriesPk, fileModels);
+
+        std::list<std::string> rutas;
+        for (GNC::GCS::IHistoryController::LightFileModelList::iterator itFile = fileModels.begin(); itFile != fileModels.end(); ++itFile) {
+                rutas.push_back((*itFile).real_path);
+        }
+
+        GNC::GCS::IStudyContext::DoInitiallizeContext(rutas);
+        ListaOverlays.clear();
+        for (std::list<std::string>::const_iterator it = rutas.begin(); it != rutas.end(); ++it) {
+                ListaOverlays.push_back(NULL);
+        }
+        Loader->SetInput(rutas.front());
+}
+
+bool GNKVisualizator::VisualizatorStudy::TieneOverlaysImagenActiva()
+{
+        return TieneOverlaysImagen(ActiveFileIndex);
+}
+
+bool GNKVisualizator::VisualizatorStudy::TieneOverlaysImagen(const int indice)
+{
+        //se pillan los overlays de la imagen original
+        if(ListaOverlays[indice].IsValid()) {
+                return ListaOverlays[indice]->size()>0;
+        } else {
+                GNC::GCS::Ptr<GIL::DICOM::DicomDataset> jerarq = GetTagsImage(indice);
+                if (jerarq.IsValid()) {
+                        for(GIL::DICOM::ListaTags::iterator it = jerarq->tags.begin(); it != jerarq->tags.end(); ++it) {
+                                if((*it).first.substr(0,2) == "60") {
+                                        return true;
+                                }
+                        }
+                        return false;
+                } else {
+                        return false;
+                }
+        }
+}
+
+GNC::GCS::Ptr<GNKVisualizator::TListaOverlays> GNKVisualizator::VisualizatorStudy::GetOverlaysImagenActiva()
+{
+        return GetOverlaysImagen(ActiveFileIndex);
+}
+
+GNC::GCS::Ptr<GNKVisualizator::TListaOverlays> GNKVisualizator::VisualizatorStudy::GetOverlaysImagen(const int indice)
+{
+        if(!ListaOverlays[indice].IsValid()) {
+                ListaOverlays[indice] = new TListaOverlays();
+
+                GIL::DICOM::IDICOMManager* pDICOMManager= GNC::GCS::IEntorno::Instance()->GetPACSController()->CrearInstanciaDeDICOMManager();
+                pDICOMManager->CargarFichero(Files[indice]->PathOfFile);
+                int filasImagen,columnasImagen;
+                //los overlays van en los grupos pares de 6000 a 601E, ver parte 5 del standard "repeating groups"
+                if(pDICOMManager->GetTag(0x0028,0x0010,filasImagen) && pDICOMManager->GetTag(0x0028,0x0011,columnasImagen)) {
+                        int idOver = 0;
+                        for(int grupo = 0x6000; grupo <0x601E; grupo+=2) {
+                                int filas,columnas;
+                                std::string nombreCapa;
+                                std::string origen, tipo;
+                                GIL::DICOM::TagPrivadoUndefined overlayData;
+                                int bitPosition,bitsAllocated;
+                                if(pDICOMManager->GetTag(grupo,0x0010,filas) && pDICOMManager->GetTag(grupo,0x0011,columnas)
+                                    && pDICOMManager->GetTag(grupo,0x0102,bitPosition) && pDICOMManager->GetTag(grupo,0x0100,bitsAllocated)) {
+                                        //TODO: si no es del tamanio de la imagen de momento no lo tratamos, tendremos que crear una imagen del tamanio adecuado y pegar el roi en su sitio
+                                        if(filas!= filasImagen || columnas!=columnasImagen) {
+                                                continue;
+                                        }
+                                        pDICOMManager->GetTag(grupo,0x0040,tipo);
+                                        //TODO TRATAR DISTINTOS A LOS ROI por ejemplo mostrar la media y todo eso...
+                                        if(!pDICOMManager->GetTag(grupo,0x0022,nombreCapa)) {
+                                                std::ostringstream ostrNombre;
+                                                ostrNombre <<"Capa " << idOver;
+                                                nombreCapa = ostrNombre.str();
+                                        }
+                                        TOverlay over(nombreCapa,grupo);
+                                        idOver++;
+
+                                        if(bitPosition==0 && bitsAllocated==1 && pDICOMManager->GetTag(grupo,0x3000,overlayData)) {
+                                                //este es el caso en el que la capa overlay esta especificada aparte, no usando bits d la imagen
+                                                //se copia la imagen
+                                                vtkImageData* pimg = vtkImageData::New();
+                                                over.img = pimg;
+                                                pimg->Delete();
+                                                over.img->SetDimensions(columnas,filas,1);
+                                                {
+                                                        float x,y;
+                                                        x=1.0f;
+                                                        y=1.0f;
+                                                        if(pDICOMManager->GetTag(grupo,0x0050,origen)) {
+                                                                std::istringstream issl(origen);
+                                                                issl >> x;
+                                                                if(!issl.eof()) {
+                                                                        char c;
+                                                                        issl>>c;//la barra
+                                                                        issl>>y;
+                                                                }
+                                                        }
+                                                        over.img->SetOrigin(x,y,1.0f);
+                                                }
+                                                over.img->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
+
+                                                unsigned char* pData = (unsigned char*)over.img->GetScalarPointer();
+                                                const unsigned char * ptr = (const unsigned char *)overlayData.GetValor();
+
+                                                int size = overlayData.GetSize();
+                                                int sizeOfImage = filas*columnas;
+                                                //double tuple[1] = {0.0f};
+                                                char tmp,c;
+                                                int off = 0;
+                                                for(int i=0; i<size; i++) {
+                                                        c = (const unsigned char) (ptr[i]);
+                                                        tmp = 1;
+                                                        for(int j=0; j<8 && off<sizeOfImage; j++) {
+                                                                if((tmp & c)==0) {
+                                                                        pData[off++] = 0;
+                                                                } else {
+                                                                        pData[off++] = 1;
+                                                                }
+                                                                tmp<<=1;
+                                                        }
+                                                }
+                                                ListaOverlays[indice]->push_back(over);
+                                        } else {
+                                                int bitsAllocatedImagen;
+                                                //en este caso el overlay esta en el pixeldata, esta retired pero asi funcionan tb los viejos
+                                                if(pDICOMManager->GetTag(0x0028,0x0100,bitsAllocatedImagen) && pDICOMManager->GetTag(0x7fe0,0x0010,overlayData) && overlayData.GetSize() > 0) {
+                                                        vtkImageData* tmp = vtkImageData::New();
+                                                        over.img = tmp;
+                                                        tmp->Delete();
+                                                        over.img->SetDimensions(columnas,filas,1);
+                                                        {
+                                                                float x,y;
+                                                                x=1.0f;
+                                                                y=1.0f;
+                                                                if(pDICOMManager->GetTag(grupo,0x0050,origen)) {
+                                                                        std::istringstream issl(origen);
+                                                                        issl >> x;
+                                                                        if(!issl.eof()) {
+                                                                                char c;
+                                                                                issl>>c;//la barra
+                                                                                issl>>y;
+                                                                        }
+                                                                }
+                                                                over.img->SetOrigin(x,y,1.0f);
+                                                        }
+                                                        over.img->AllocateScalars(VTK_UNSIGNED_CHAR, 1);
+
+                                                        unsigned char* pData = (unsigned char*)over.img->GetScalarPointer();
+                                                        const unsigned char * ptr = (const unsigned char *)overlayData.GetValor();
+
+                                                        int size = overlayData.GetSize();
+                                                        //int sizeOfImage = filas*columnas;
+                                                        //double tuple[1] = {0.0f};
+                                                        if(bitsAllocatedImagen == 8 && bitPosition<8) {
+                                                                //se itera caracter a caracter...
+                                                                char mascara,c;
+                                                                int off = 0;
+                                                                mascara = 1;
+                                                                mascara <<= bitPosition;
+                                                                int desplazamiento;
+                                                                for (int y = 0; y < filas; y++) {
+                                                                        desplazamiento = y*columnas;
+                                                                        for (int x = 0; x < columnas && off < size; x++) {
+                                                                                c = (unsigned char) *(ptr + desplazamiento + x);
+                                                                                if((mascara & c)==0) {
+                                                                                        pData[off++] = 0;
+                                                                                } else {
+                                                                                        pData[off++] = 1;
+                                                                                }
+                                                                        }
+                                                                }
+                                                                ListaOverlays[indice]->push_back(over);
+                                                        } else if(bitsAllocatedImagen == 16 && bitPosition<16) {
+                                                                //se itera con 16 bits...
+                                                                unsigned char mascara;
+                                                                unsigned char* c;
+                                                                int off=0;
+                                                                unsigned char bitAConsultar = 0;
+                                                                if(bitPosition<8) {
+                                                                        mascara = 1;
+                                                                        mascara <<= bitPosition;
+                                                                } else {
+                                                                        mascara = 1;
+                                                                        mascara <<= (bitPosition-8);
+                                                                        bitAConsultar = 1;
+                                                                }
+                                                                int desplazamiento;
+                                                                for (int y = 0; y < filas; y++) {
+                                                                        desplazamiento = y*columnas;
+                                                                        for (int x = 0; x < columnas && off < size; ++x) {
+                                                                                c = (unsigned char*) (ptr + 2*(desplazamiento + x)+bitAConsultar);
+                                                                                if((mascara & (*c))==0) {
+                                                                                        pData[off++] = 0;
+                                                                                } else {
+                                                                                        pData[off++] = 1;
+                                                                                }
+                                                                        }
+                                                                }
+                                                                ListaOverlays[indice]->push_back(over);
+                                                        }//else bits allocated
+                                                }//if get pixel data y comprobaciones
+                                        }//else overlay por separado
+                                }//if columnas, bits...
+                        }//for overlays
+                }//si esta especificado filas/columnas de la imagen
+                GNC::GCS::IEntorno::Instance()->GetPACSController()->LiberarInstanciaDeDICOMManager(pDICOMManager);
+        }
+        return ListaOverlays[indice];
+}
+
diff --git a/visualizator/visualizator/estudios/visualizatorstudy.h b/visualizator/visualizator/estudios/visualizatorstudy.h
new file mode 100644
index 0000000..cc01e81
--- /dev/null
+++ b/visualizator/visualizator/estudios/visualizatorstudy.h
@@ -0,0 +1,53 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include "overlay.h"
+#include <api/istudycontext.h>
+
+class wxWindow;
+class wxSizer;
+class wxXmlNode;
+class wxXmlDocument;
+
+namespace GNKVisualizator
+{
+class VisualizatorStudy : public GNC::GCS::IStudyContext
+{
+public:
+
+        VisualizatorStudy();
+        ~VisualizatorStudy();
+
+        void InitializeContext(long seriesPk);
+
+        //overlays...
+        bool TieneOverlaysImagenActiva();
+        bool TieneOverlaysImagen(const int indiceImagen);
+        GNC::GCS::Ptr<GNKVisualizator::TListaOverlays> GetOverlaysImagenActiva();
+        GNC::GCS::Ptr<GNKVisualizator::TListaOverlays> GetOverlaysImagen(const int indice);
+
+        virtual void CallbackCargarTagsImagen(const int /*indice*/, GIL::DICOM::IDICOMManager* /*pDicomManager*/) {}
+
+protected:
+
+        std::vector<GNC::GCS::Ptr<TListaOverlays> >                ListaOverlays;
+};
+}
diff --git a/visualizator/visualizator/eventos/changeposition.h b/visualizator/visualizator/eventos/changeposition.h
new file mode 100644
index 0000000..bf7c3e3
--- /dev/null
+++ b/visualizator/visualizator/eventos/changeposition.h
@@ -0,0 +1,78 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/controllers/ieventscontroller.h>
+
+namespace AtencionPrimaria
+{
+namespace Events
+{
+class ChangePositionEvent: public GNC::GCS::Events::IEvent
+{
+public:
+
+        ChangePositionEvent(GNC::GCS::IVista* pVista = NULL, const double pos[3] = NULL, const double focal[3] = NULL) : GNC::GCS::Events::IEvent(ginkgoEVT_GNKVisualizator_ChangePositionEvent, ginkgoAmbitoAtencionPrimaria, 100, pVista)
+        {
+                m_Nombre = "ChangePositionEvent";
+
+                if (pos != NULL) {
+                        for (int i = 0; i < 3; i++) {
+                                m_pos[i] = pos[i];
+                        }
+                }
+
+                if (focal != NULL) {
+                        for (int i = 0; i < 3; i++) {
+                                m_focal[i] = focal[i];
+                        }
+                }
+        }
+        ~ChangePositionEvent() {}
+
+        void SetPosition(const double pos[3])
+        {
+                for (int i = 0; i < 3; i++) {
+                        m_pos[i] = pos[i];
+                }
+        }
+
+        const double* GetPosition()
+        {
+                return m_pos;
+        }
+
+        void SetFocal(const double focal[3])
+        {
+                for (int i = 0; i < 3; i++) {
+                        m_focal[i] = focal[i];
+                }
+        }
+
+        const double* GetFocal()
+        {
+                return m_focal;
+        }
+protected:
+        double m_pos[3], m_focal[3];
+};
+}
+}
diff --git a/visualizator/visualizator/eventos/overlays.h b/visualizator/visualizator/eventos/overlays.h
new file mode 100644
index 0000000..c89b381
--- /dev/null
+++ b/visualizator/visualizator/eventos/overlays.h
@@ -0,0 +1,106 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/controllers/ieventscontroller.h>
+#include "../estudios/overlay.h"
+
+namespace GNKVisualizator
+{
+namespace Events
+{
+class EventoRefrescarListaOverlays: public GNC::GCS::Events::IEvent
+{
+public:
+        EventoRefrescarListaOverlays(GNC::GCS::IVista* pVista) : GNC::GCS::Events::IEvent(ginkgoEVT_GNKVisualizator_EventoRefrescarListaOverlays, ginkgoAmbitoAtencionPrimaria, 100, pVista)
+        {
+                m_pListaOverlays=NULL;
+                m_Nombre = "RefrescarListaOverlays";
+        }
+
+        EventoRefrescarListaOverlays(GNC::GCS::IVista* pVista,TListaOverlays* pListaOverlays) : GNC::GCS::Events::IEvent(ginkgoEVT_GNKVisualizator_EventoRefrescarListaOverlays, ginkgoAmbitoAtencionPrimaria, 100, pVista)
+        {
+                m_pListaOverlays=pListaOverlays;
+                m_Nombre = "RefrescarListaOverlays";
+        }
+
+        ~EventoRefrescarListaOverlays()
+        {
+                m_pListaOverlays = NULL;
+        }
+
+        TListaOverlays* GetListaOverlays()
+        {
+                return m_pListaOverlays;
+        }
+
+protected:
+        TListaOverlays* m_pListaOverlays;
+};
+
+class EventoMostrarOverlay: public GNC::GCS::Events::IEvent
+{
+public:
+
+        EventoMostrarOverlay(GNC::GCS::IVista* pVista) : GNC::GCS::Events::IEvent(ginkgoEVT_GNKVisualizator_EventoMostrarOverlay, ginkgoAmbitoAtencionPrimaria, 100, pVista)
+        {
+                m_Nombre = "MostrarOverlay";
+        }
+
+        EventoMostrarOverlay(GNC::GCS::IVista* pVista,TOverlay& overlay) : GNC::GCS::Events::IEvent(ginkgoEVT_GNKVisualizator_EventoMostrarOverlay, ginkgoAmbitoAtencionPrimaria, 100, pVista)
+        {
+                m_overlay = overlay;
+                m_Nombre = "MostrarOverlay";
+        }
+
+        ~EventoMostrarOverlay() {}
+
+        const TOverlay& GetOverlay()
+        {
+                return m_overlay;
+        }
+
+protected:
+        TOverlay m_overlay;
+};
+
+}
+}
diff --git a/visualizator/visualizator/eventos/sincronizacion.h b/visualizator/visualizator/eventos/sincronizacion.h
new file mode 100644
index 0000000..fa1d2d1
--- /dev/null
+++ b/visualizator/visualizator/eventos/sincronizacion.h
@@ -0,0 +1,83 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/ievento.h>
+#include <api/controllers/ieventscontroller.h>
+
+namespace AtencionPrimaria
+{
+namespace Events
+{
+class EventoSincronizacion: public GNC::GCS::Events::IEvent
+{
+public:
+        typedef enum {
+                Scroll,
+                Dessincronizar
+        } TipoSincronizacion;
+
+        EventoSincronizacion(GNC::GCS::IVista* pVista, TipoSincronizacion  tipo = Scroll, int posicion = 0, bool relativa = true) : GNC::GCS::Events::IEvent(ginkgoEVT_GNKVisualizator_EventoSincronizacion, ginkgoAmbitoAtencionPrimaria, 100, pVista)
+        {
+                m_posicion = posicion;
+                m_relativa = relativa;
+                m_tipo = tipo;
+                m_Nombre = "Sincronizacion";
+        }
+
+        ~EventoSincronizacion() {}
+
+        int GetPosicion()
+        {
+                return m_posicion;
+        }
+
+        bool EsRelativa()
+        {
+                return m_relativa;
+        }
+
+        TipoSincronizacion GetTipoEvento()
+        {
+                return m_tipo;
+        }
+
+        virtual void pushInfo(std::ostream& out) const
+        {
+                out << "Tipo = ";
+                switch (m_tipo) {
+                case Scroll:
+                        out << "Scroll";
+                        break;
+                case Dessincronizar:
+                        out << "Dessincronizar";
+                        break;
+                }
+                out << ", Posicion = " << m_posicion << ", Relativa = " << m_relativa;
+        }
+
+protected:
+        TipoSincronizacion m_tipo;
+        int m_posicion;
+        bool m_relativa;
+};
+}
+}
diff --git a/visualizator/visualizator/eventos/visualizatorevents.h b/visualizator/visualizator/eventos/visualizatorevents.h
new file mode 100644
index 0000000..7aaef08
--- /dev/null
+++ b/visualizator/visualizator/eventos/visualizatorevents.h
@@ -0,0 +1,34 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#define ginkgoAmbitoAtencionPrimaria  2
+
+#define ginkgoEVT_GNKVisualizator_EventoSincronizacion			 3001
+#define ginkgoEVT_GNKVisualizator_EventoRefrescarListaOverlays	 3002
+#define ginkgoEVT_GNKVisualizator_EventoMostrarOverlay			 3003
+#define ginkgoEVT_GNKVisualizator_EventoZoom							 3004
+#define ginkgoEVT_GNKVisualizator_ChangePositionEvent				 3005
+
+#include "sincronizacion.h"
+#include "overlays.h"
+#include "zoom.h"
+#include "changeposition.h"
diff --git a/visualizator/visualizator/eventos/zoom.h b/visualizator/visualizator/eventos/zoom.h
new file mode 100644
index 0000000..58640f7
--- /dev/null
+++ b/visualizator/visualizator/eventos/zoom.h
@@ -0,0 +1,50 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/controllers/ieventscontroller.h>
+
+namespace AtencionPrimaria
+{
+namespace Events
+{
+class EventoZoom: public GNC::GCS::Events::IEvent
+{
+public:
+
+        EventoZoom(GNC::GCS::IVista* pVista = NULL, const double zoom = 0.0f) : GNC::GCS::Events::IEvent(ginkgoEVT_GNKVisualizator_EventoZoom, ginkgoAmbitoAtencionPrimaria, 100, pVista)
+        {
+                m_zoom = zoom;
+                m_Nombre = "Zoom";
+        }
+
+        ~EventoZoom() {}
+
+        double GetZoom()
+        {
+                return m_zoom;
+        }
+
+protected:
+        double m_zoom;
+};
+}
+}
diff --git a/visualizator/visualizator/export/contracts/ioverlayscontract.cpp b/visualizator/visualizator/export/contracts/ioverlayscontract.cpp
new file mode 100644
index 0000000..c99cc85
--- /dev/null
+++ b/visualizator/visualizator/export/contracts/ioverlayscontract.cpp
@@ -0,0 +1,47 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ioverlayscontract.h"
+
+GNKVisualizator::IOverlaysContract::IOverlaysContract()
+{
+        m_pView = NULL;
+}
+GNKVisualizator::IOverlaysContract::~IOverlaysContract()
+{
+        m_EstadoOverlays.clear();
+}
+
+void GNKVisualizator::IOverlaysContract::Setup(GNC::GCS::Ptr<GNKVisualizator::TListaOverlays>& pListaOverlays, GNC::GCS::IVista* pView)
+{
+        m_pListaOverlays = pListaOverlays;
+        m_pView = pView;
+        m_EstadoOverlays.clear();
+        if(m_pListaOverlays.IsValid()) {
+                for(GNKVisualizator::TListaOverlays::iterator it = pListaOverlays->begin(); it!=pListaOverlays->end(); ++it) {
+                        m_EstadoOverlays[it->indice] = false;
+                }
+        }
+}
+
+GNC::GCS::Ptr<GNKVisualizator::TListaOverlays>& GNKVisualizator::IOverlaysContract::GetOverlayList()
+{
+        return m_pListaOverlays;
+}
diff --git a/visualizator/visualizator/export/contracts/ioverlayscontract.h b/visualizator/visualizator/export/contracts/ioverlayscontract.h
new file mode 100644
index 0000000..0c155f4
--- /dev/null
+++ b/visualizator/visualizator/export/contracts/ioverlayscontract.h
@@ -0,0 +1,58 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#ifndef IOVERLAYSCONTRACT_H
+#define IOVERLAYSCONTRACT_H
+#include <list>
+#include <api/icontract.h>
+#include <api/autoptr.h>
+#include <visualizator/estudios/overlay.h>
+
+class vtkGinkgoImageViewer;
+class vtkLookupTable;
+class vtkAlgorithmOutput;
+namespace GNC
+{
+namespace GCS
+{
+class IVista;
+}
+}
+namespace GNKVisualizator
+{
+class IOverlaysContract: public GNC::GCS::IContract
+{
+private:
+        GNC::GCS::Ptr<GNKVisualizator::TListaOverlays>  m_pListaOverlays;
+public:
+        GNKVisualizator::TEstadoOverlay m_EstadoOverlays;
+        GNC::GCS::IVista* m_pView;
+
+        GNC::GCS::Ptr<GNKVisualizator::TListaOverlays>& GetOverlayList();
+
+        IOverlaysContract();
+        ~IOverlaysContract();
+        virtual void Setup(GNC::GCS::Ptr<GNKVisualizator::TListaOverlays>& pListaOverlays, GNC::GCS::IVista* pView);
+};
+}
+#endif
diff --git a/visualizator/visualizator/export/contracts/ioverlayscontractable.cpp b/visualizator/visualizator/export/contracts/ioverlayscontractable.cpp
new file mode 100644
index 0000000..d2d9610
--- /dev/null
+++ b/visualizator/visualizator/export/contracts/ioverlayscontractable.cpp
@@ -0,0 +1,42 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "ioverlayscontractable.h"
+#include <visualizator/export/contracts/ioverlayscontract.h>
+GNKVisualizator::IOverlaysContractable::IOverlaysContractable()
+{
+        OverlaysContract = NULL;
+}
+GNKVisualizator::IOverlaysContractable::~IOverlaysContractable()
+{
+}
+
+bool GNKVisualizator::IOverlaysContractable::IsValidContract(GNC::GCS::IContract* contract)
+{
+        GNKVisualizator::IOverlaysContract* pWContract = dynamic_cast<GNKVisualizator::IOverlaysContract*>(contract);
+        return pWContract != NULL;
+}
+
+void GNKVisualizator::IOverlaysContractable::Register(GNC::GCS::IContract* contract)
+{
+        GNC::GCS::IContractable::Register(contract);
+        OverlaysContract = static_cast<GNKVisualizator::IOverlaysContract*>(contract);
+}
diff --git a/visualizator/visualizator/export/contracts/ioverlayscontractable.h b/visualizator/visualizator/export/contracts/ioverlayscontractable.h
new file mode 100644
index 0000000..81f094b
--- /dev/null
+++ b/visualizator/visualizator/export/contracts/ioverlayscontractable.h
@@ -0,0 +1,42 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <api/icontract.h>
+
+namespace GNKVisualizator
+{
+class IOverlaysContract;
+class IOverlaysContractable: public GNC::GCS::IContractable
+{
+public:
+        IOverlaysContractable();
+
+        ~IOverlaysContractable();
+
+        virtual bool IsValidContract(GNC::GCS::IContract* contract);
+
+
+        virtual void Register(GNC::GCS::IContract* contract);
+protected:
+        GNKVisualizator::IOverlaysContract* OverlaysContract;
+};
+}
diff --git a/visualizator/visualizator/export/ireconstructiontool.h b/visualizator/visualizator/export/ireconstructiontool.h
new file mode 100644
index 0000000..b97d465
--- /dev/null
+++ b/visualizator/visualizator/export/ireconstructiontool.h
@@ -0,0 +1,52 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#if defined(ENABLE_RECONSTRUCTIONTOOL)
+#include <api/toolsystem/itool.h>
+#include "icontratosaprimaria.h"
+#include "iherramientasaprimaria.h"
+#include <export/iherramientascore.h>
+
+namespace GNKVisualizator
+{
+class IReconstructionTool: public GNC::GCS::ITool, public GNC::GCS::IContratable<GNKVisualizator::IReconstructionContract>
+{
+public:
+        typedef GNKVisualizator::IReconstructionContract              TReconstructionContract;
+        typedef GNC::GCS::IContratable<TReconstructionContract> TReconstructionContratable;
+
+        static const IHerramienta::UID ID = HGNKVisualizator_Reconstruction;
+        IReconstructionTool() : IHerramienta(HGNKVisualizator_Reconstruction, TMenu3D, "Reconstruction", SubFamiliaImagenHerramientasRadio) {}
+        virtual ~IReconstructionTool() {}
+
+        virtual void SetVistaActiva(GNC::GCS::IVista* pVista) = 0;
+
+        virtual void ConectarContratos(bool) = 0;
+
+        virtual bool ValidaContratos(GNC::GCS::IVista* pVista)
+        {
+                return TReconstructionContratable::ValidaContrato(pVista);
+        }
+
+};
+}
+#endif
diff --git a/visualizator/visualizator/export/tagsprivados.h b/visualizator/visualizator/export/tagsprivados.h
new file mode 100644
index 0000000..5776b0f
--- /dev/null
+++ b/visualizator/visualizator/export/tagsprivados.h
@@ -0,0 +1,25 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma  once
+#include <visualizator/license.h>
+#include <export/tagsprivadoscomunes.h>
+
diff --git a/visualizator/visualizator/export/tools/iecgruletool.cpp b/visualizator/visualizator/export/tools/iecgruletool.cpp
new file mode 100644
index 0000000..c96adca
--- /dev/null
+++ b/visualizator/visualizator/export/tools/iecgruletool.cpp
@@ -0,0 +1,30 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "iecgruletool.h"
+#include <resources/ginkgoresourcesmanager.h>
+#include <api/internationalization/internationalization.h>
+
+GNKVisualizator::IECGRuleTool::UID GNKVisualizator::IECGRuleTool::ID = HGNKVisualizator_ECGRule;
+
+GNKVisualizator::IECGRuleTool::IECGRuleTool() : IWidgetTool(ID, TFamiliaMedicion,  _Std("Rule \tCtrl+R"), GinkgoResourcesManager::ToolIcons::GetIcoLongitud())
+{
+        KeyCode = Name[Name.size() - 1];
+}
diff --git a/visualizator/visualizator/export/tools/iecgruletool.h b/visualizator/visualizator/export/tools/iecgruletool.h
new file mode 100644
index 0000000..f5d6350
--- /dev/null
+++ b/visualizator/visualizator/export/tools/iecgruletool.h
@@ -0,0 +1,40 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#ifndef IRULETOOL_H
+#define IRULETOOL_H
+#include <api/toolsystem/iwidgettool.h>
+#include <export/contracts/iwidgetscontractable.h>
+#include "ivisualizatortools.h"
+
+namespace GNKVisualizator
+{
+class EXTAPI IECGRuleTool: public GNC::GCS::IWidgetTool, public GNC::GCS::IWidgetsContractable
+{
+public:
+
+        static GNC::GCS::ITool::UID ID;
+        IECGRuleTool();
+};
+
+}
+#endif
diff --git a/visualizator/visualizator/export/tools/ioverlaystool.cpp b/visualizator/visualizator/export/tools/ioverlaystool.cpp
new file mode 100644
index 0000000..54aeac3
--- /dev/null
+++ b/visualizator/visualizator/export/tools/ioverlaystool.cpp
@@ -0,0 +1,31 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ioverlaystool.h"
+
+#include <api/internationalization/internationalization.h>
+#include <export/tools/iherramientascore.h>
+#include <resources/visualizatorresourcesmanager.h>
+
+GNC::GCS::ITool::UID GNKVisualizator::IOverlaysTool::ID = HGNKVisualizator_Overlays;
+
+GNKVisualizator::IOverlaysTool::IOverlaysTool(): GNC::GCS::ITool(ID, TSeriesMenu, _Std("Overlay layers"), GNKVisualizator::ResourcesManager::ToolIcons::GetIcoCapas(), 1)
+{
+}
diff --git a/visualizator/visualizator/export/tools/ioverlaystool.h b/visualizator/visualizator/export/tools/ioverlaystool.h
new file mode 100644
index 0000000..da67ee3
--- /dev/null
+++ b/visualizator/visualizator/export/tools/ioverlaystool.h
@@ -0,0 +1,39 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#ifndef IOVERLAYSTOOL_H
+#define IOVERLAYSTOOL_H
+#include <visualizator/export/contracts/ioverlayscontractable.h>
+#include <api/toolsystem/itool.h>
+#include "ivisualizatortools.h"
+
+namespace GNKVisualizator
+{
+class IOverlaysTool:  public GNC::GCS::ITool, public GNKVisualizator::IOverlaysContractable
+{
+public:
+        static GNC::GCS::ITool::UID ID;
+        IOverlaysTool();
+};
+}
+#endif
diff --git a/visualizator/visualizator/export/tools/ivisualizatortools.h b/visualizator/visualizator/export/tools/ivisualizatortools.h
new file mode 100644
index 0000000..f043691
--- /dev/null
+++ b/visualizator/visualizator/export/tools/ivisualizatortools.h
@@ -0,0 +1,28 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+// UIDs de las herramientas core: Reservado desde 0 a 100;
+
+#define HGNKVisualizator_MapaColor            4001
+#define HGNKVisualizator_Overlays             4002
+#define HGNKVisualizator_Reconstruction       4003
+#define HGNKVisualizator_ECGRule		      4004
diff --git a/visualizator/visualizator/license.h b/visualizator/visualizator/license.h
new file mode 100644
index 0000000..61d8b1b
--- /dev/null
+++ b/visualizator/visualizator/license.h
@@ -0,0 +1,37 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+
+#define EXT_SID              "visualizator_extension_v3"
+#define EXT_DESCRIPTION      _Std("Visualizator extension")
+#define EXT_PROVIDER         "MetaEmotion S.L. http://metaemotion.com"
+#define EXT_VERSION          3
+#define EXT_SUBVERSION       0
+#define EXT_RELEASE          0
+#define EXT_BUILD            "$Revision: 4970 $"
+#define EXT_CODENAME         "final"
+#define EXT_UPDATEURL        "http://updates.ginkgo-cadx.com/visualizator.xml"
+
+#define EXT_IMPORTER_SID     "METAEMOTION GINKGO RX"
+#define EXT_NAME             "Ginkgo CADx Visualizator"
+#define EXT_COPYRIGHT        "(c) 2011"
+
+#define EXT_INC 35
diff --git a/visualizator/visualizator/tools/ecgruletool.cpp b/visualizator/visualizator/tools/ecgruletool.cpp
new file mode 100644
index 0000000..85e7f37
--- /dev/null
+++ b/visualizator/visualizator/tools/ecgruletool.cpp
@@ -0,0 +1,82 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "ecgruletool.h"
+
+#include <export/contracts/iwidgetscontract.h>
+#include <iostream>
+
+#include <visualizator/widgets/wecgrule.h>
+#include <resources/ginkgoresourcesmanager.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtk/vtkginkgoimageviewer.h>
+
+GNKVisualizator::ECGRuleTool::ECGRuleTool() :
+        m_pRuleBuilder(NULL)
+{
+        m_pRuleBuilder = NULL;
+}
+
+GNKVisualizator::ECGRuleTool::~ECGRuleTool()
+{
+
+}
+
+
+//------------------------------------------------------------------------------
+//region "ITool/IContract realization"
+
+GNC::GCS::ITool* GNKVisualizator::ECGRuleTool::NewTool()
+{
+        return new GNKVisualizator::ECGRuleTool();
+}
+
+void GNKVisualizator::ECGRuleTool::Connect()
+{
+        if (WidgetsContract == NULL) {
+                return;
+        }
+        if (m_pRuleBuilder != NULL) {
+                delete m_pRuleBuilder;
+                m_pRuleBuilder = NULL;
+        }
+
+        m_pRuleBuilder = new GNKVisualizator::Widgets::WECGRuleBuilder(WidgetsContract->GetManager(), GetTriggerButton());
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(m_pRuleBuilder->GetCursor());
+}
+
+void GNKVisualizator::ECGRuleTool::Disconnect()
+{
+        if (WidgetsContract == NULL) {
+                return;
+        }
+        WidgetsContract->GetViewerActivo()->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+        WidgetsContract->GetManager()->SetCursor(GNC::GCS::Widgets::CUR_FLECHA);
+        if (m_pRuleBuilder != NULL) {
+                delete m_pRuleBuilder;
+                m_pRuleBuilder = NULL;
+        }
+}
+
+//endregion
diff --git a/visualizator/visualizator/tools/ecgruletool.h b/visualizator/visualizator/tools/ecgruletool.h
new file mode 100644
index 0000000..f640404
--- /dev/null
+++ b/visualizator/visualizator/tools/ecgruletool.h
@@ -0,0 +1,55 @@
+#pragma once
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#ifndef ECGRULETOOL_H
+#define ECGRULETOOL_H
+#include <visualizator/export/tools/iecgruletool.h>
+#include <api/api.h>
+
+namespace GNKVisualizator
+{
+namespace Widgets
+{
+class WECGRuleBuilder;
+}
+
+class EXTAPI ECGRuleTool : public GNKVisualizator::IECGRuleTool
+{
+public:
+        ECGRuleTool();
+        ~ECGRuleTool();
+
+
+//------------------------------------------------------------------------------
+//region "ITool/IContract realization"
+
+        virtual GNC::GCS::ITool* NewTool();
+        virtual void Connect();
+        virtual void Disconnect();
+
+//endregion
+
+protected:
+        GNKVisualizator::Widgets::WECGRuleBuilder* m_pRuleBuilder;
+};
+}
+#endif
diff --git a/visualizator/visualizator/tools/overlaystool.cpp b/visualizator/visualizator/tools/overlaystool.cpp
new file mode 100644
index 0000000..6d5f857
--- /dev/null
+++ b/visualizator/visualizator/tools/overlaystool.cpp
@@ -0,0 +1,159 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <api/autoptr.h>
+
+#include "overlaystool.h"
+#include <visualizator/eventos/visualizatorevents.h>
+#include <visualizator/export/contracts/ioverlayscontract.h>
+#include <main/gui/toolsystem/wxmenuitemtool.h>
+#include <resources/visualizatorresourcesmanager.h>
+#include <api/controllers/ieventscontroller.h>
+
+#define MENU_OVERLAYS  4051
+
+
+namespace GNKVisualizator
+{
+namespace GUI
+{
+class wxEventHandlerOverlays : public wxEvtHandler
+{
+public:
+        wxEventHandlerOverlays(wxMenu* pSubMenu, wxEvtHandler* pParent, GNKVisualizator::OverlaysTool* pHerramienta):wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pHerramienta=pHerramienta;
+                m_pSubMenu = pSubMenu;
+                m_pParent->Connect(m_pHerramienta->ID, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerOverlays::OnUpdateSeleccionarOverlaysUI),NULL,this);
+        }
+
+        ~wxEventHandlerOverlays()
+        {
+                m_pParent->Disconnect(wxID_ANY, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(wxEventHandlerOverlays::OnUpdateSeleccionarOverlaysUI),NULL,this);
+                m_pParent->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerOverlays::OnMostrarOverlay ),NULL,this);
+                m_pParent = NULL;
+                m_pHerramienta = NULL;
+        }
+
+        void OnUpdateSeleccionarOverlaysUI(wxUpdateUIEvent& event)
+        {
+                //se agregan los overlays...
+                while(m_pSubMenu->GetMenuItemCount() >0) {
+                        m_pSubMenu->Destroy(m_pSubMenu->FindItemByPosition(0));
+                }
+
+                GNKVisualizator::TListaOverlays* pLista = m_pHerramienta->GetListaOverlays();
+                GNKVisualizator::TEstadoOverlay* estadoOverlays = m_pHerramienta->GetEstadoOverlays();
+                if(pLista!= NULL && estadoOverlays!=NULL && pLista->size() > 0) {
+                        int idOverlay = MENU_OVERLAYS;
+                        for(GNKVisualizator::TListaOverlays::iterator itOverlays = pLista->begin(); itOverlays!=pLista->end(); ++itOverlays, ++idOverlay) {
+                                wxMenuItem* capa = new wxMenuItem( m_pSubMenu, idOverlay,wxString::FromUTF8((*itOverlays).nombre.c_str()),wxEmptyString,wxITEM_CHECK);
+                                m_pSubMenu->Append(capa);
+                                bool oculto = false;
+                                if(estadoOverlays->find((*itOverlays).indice) != estadoOverlays->end()) {
+                                        oculto = (*estadoOverlays->find(itOverlays->indice)).second;
+                                }
+                                if(oculto) {
+                                        m_pSubMenu->Check(capa->GetId(),false);
+                                } else {
+                                        m_pSubMenu->Check(capa->GetId(),true);
+                                }
+                                m_pParent->Connect(capa->GetId(), wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxEventHandlerOverlays::OnMostrarOverlay ),NULL,this);
+                        }
+                        event.Show(true);
+                        event.Enable(true);
+                } else {
+                        event.Show(false);
+                        event.Enable(false);
+                }
+        }
+
+        void OnMostrarOverlay(wxCommandEvent& event)
+        {
+                int idOverlay = event.GetId() - MENU_OVERLAYS;
+                m_pHerramienta->ToggleOverlay(idOverlay);
+                event.Skip(false);
+        }
+
+
+        GNKVisualizator::OverlaysTool* m_pHerramienta;
+        wxEvtHandler* m_pParent;
+        wxMenu* m_pSubMenu;
+};
+}
+}
+
+
+GNC::GCS::ITool* GNKVisualizator::OverlaysTool::NewTool()
+{
+        return new GNKVisualizator::OverlaysTool();
+}
+
+GNKVisualizator::OverlaysTool::OverlaysTool()
+{
+}
+GNKVisualizator::OverlaysTool::~OverlaysTool()
+{
+}
+
+bool GNKVisualizator::OverlaysTool::ExecuteAction()
+{
+        return false;
+}
+
+
+void GNKVisualizator::OverlaysTool::AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu)
+{
+        if (AppendsInMenu()) {
+                GNC::GUI::wxMenuTool* pMenuTool = new GNC::GUI::wxMenuTool(NULL);
+                pMenuTool->m_pHandler =  new GNKVisualizator::GUI::wxEventHandlerOverlays(pMenuTool, pParent, this);
+                pMenu->Append(ID, wxString::FromUTF8(Name.c_str()), pMenuTool);
+        }
+}
+
+
+GNC::GCS::Ptr<GNKVisualizator::TListaOverlays>& GNKVisualizator::OverlaysTool::GetListaOverlays()
+{
+        return OverlaysContract->GetOverlayList();
+}
+
+GNKVisualizator::TEstadoOverlay* GNKVisualizator::OverlaysTool::GetEstadoOverlays()
+{
+        return &OverlaysContract->m_EstadoOverlays;
+}
+
+void GNKVisualizator::OverlaysTool::ToggleOverlay(int idOverlay)
+{
+        if(OverlaysContract->GetOverlayList().IsValid()) {
+                GNKVisualizator::TListaOverlays::iterator itOverlays = OverlaysContract->GetOverlayList()->begin();
+                for(; idOverlay > 0 && itOverlays!=OverlaysContract->GetOverlayList()->end(); ++itOverlays, --idOverlay);
+                if( itOverlays!= OverlaysContract->GetOverlayList()->end()) {
+                        if(OverlaysContract->m_EstadoOverlays.find((*itOverlays).indice) != OverlaysContract->m_EstadoOverlays.end()) {
+                                OverlaysContract->m_EstadoOverlays[itOverlays->indice] = !OverlaysContract->m_EstadoOverlays[itOverlays->indice];
+                        } else {
+                                OverlaysContract->m_EstadoOverlays[itOverlays->indice] = false;
+                        }
+                        GNC::GCS::IEventsController::Instance()->ProcesarEvento(new GNKVisualizator::Events::EventoMostrarOverlay(OverlaysContract->m_pView,(*itOverlays)));
+                }
+        }
+}
+
+
diff --git a/visualizator/visualizator/tools/overlaystool.h b/visualizator/visualizator/tools/overlaystool.h
new file mode 100644
index 0000000..a5fc1bd
--- /dev/null
+++ b/visualizator/visualizator/tools/overlaystool.h
@@ -0,0 +1,100 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#ifndef OVERLAYSTOOL_H
+#define OVERLAYSTOOL_H
+
+#include <list>
+
+#include <visualizator/export/tools/ioverlaystool.h>
+#include <visualizator/estudios/overlay.h>
+#include <api/api.h>
+
+namespace GNKVisualizator
+{
+
+class OverlaysTool : public GNKVisualizator::IOverlaysTool
+{
+public:
+        virtual GNC::GCS::ITool* NewTool();
+        OverlaysTool();
+        ~OverlaysTool();
+
+        virtual bool ExecuteAction();
+        virtual void AppendToolIn(wxEvtHandler* pParent, wxMenu* pMenu);
+
+        //cuando hacen click en ella...
+        GNC::GCS::Ptr<GNKVisualizator::TListaOverlays>& GetListaOverlays();
+        GNKVisualizator::TEstadoOverlay* GetEstadoOverlays();
+        virtual void ToggleOverlay(int idOverlay);
+
+protected:
+
+};
+}
+#endif
+
+#if defined(ENABLE_OVERLAYSNTOOL)
+
+#include "../exportacion/iherramientaoverlays.h"
+
+#include <map>
+
+
+namespace GNKVisualizator
+{
+
+class HerramientaOverlays : public GNKVisualizator::IHerramientaOverlays
+{
+
+protected:
+
+public:
+        HerramientaOverlays();
+        ~HerramientaOverlays();
+        //menu del mapa de color
+        virtual bool AppendInMenu(wxWindow* pParent, wxMenu* pMenuParent);
+
+        //region "Realización de la interfaz IHerramienta"
+
+        // Setup de paneles
+        virtual void CrearPaneles( wxPanel* panel );
+
+        //endregion
+
+        //cuando hacen click en ella...
+        GNKVisualizator::TListaOverlays* GetListaOverlays();
+        GNKVisualizator::TEstadoOverlay* GetEstadoOverlays();
+        virtual void ToggleOverlay(int idOverlay);
+        virtual void SolicitarActivacion();
+
+        virtual void ConectarContratoFalso(bool activar);
+        virtual void SetVistaActiva(GNC::GCS::IVista* pVista);
+        virtual void ConectarContratos(bool activar);
+
+
+protected:
+
+};
+}
+#endif
diff --git a/visualizator/visualizator/tools/reconstructiontool.cpp b/visualizator/visualizator/tools/reconstructiontool.cpp
new file mode 100644
index 0000000..e946165
--- /dev/null
+++ b/visualizator/visualizator/tools/reconstructiontool.cpp
@@ -0,0 +1,338 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#if defined(ENABLE_RECONSTRUCTIONTOOL)
+#include <wx/menu.h>
+
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include "reconstructiontool.h"
+#include <eventos/eventosginkgo.h>
+
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtkObject.h>
+
+#include <vtkImageData.h>
+
+#include <api/ientorno.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include <vtkDataSetAttributes.h>
+#include <vtkAlgorithm.h>
+#include <vtkAlgorithmOutput.h>
+#include <vtkExecutive.h>
+#include <vtkInformation.h>
+#include <vtkInformationVector.h>
+#include <vtk/vtkginkgoimageviewer.h>
+
+#define MENU_IDS_RECONSTRUCTION  4201
+
+namespace GNKVisualizator
+{
+
+namespace GUI
+{
+
+class EventHandlerReconstructionTool: public wxEvtHandler
+{
+public:
+        EventHandlerReconstructionTool(wxWindow* pParent, GNKVisualizator::ReconstructionTool* pTool, int modeId):wxEvtHandler()
+        {
+                m_pParent = pParent;
+                m_pTool = pTool;
+
+                m_pParent->Connect(modeId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerReconstructionTool::OnReconstructionModeSelected) ,NULL, this);
+                m_pParent->Connect(modeId, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(EventHandlerReconstructionTool::OnUpdateMenuReconstructionUI),NULL,this);
+        }
+        ~EventHandlerReconstructionTool()
+        {
+                m_pParent->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( EventHandlerReconstructionTool::OnReconstructionModeSelected),NULL,this);
+                m_pParent = NULL;
+                m_pTool = NULL;
+        }
+
+        void OnReconstructionModeSelected( wxCommandEvent& event )
+        {
+                int modeId = event.GetId() - MENU_IDS_RECONSTRUCTION;
+                m_pTool->SelectReconstructionMode(modeId);
+                event.Skip(false);
+        }
+
+        void OnUpdateMenuReconstructionUI(wxUpdateUIEvent& event)
+        {
+                event.Enable(m_pTool->SupportsReconstructionMode(event.GetId() - MENU_IDS_RECONSTRUCTION));
+        }
+
+        GNKVisualizator::ReconstructionTool* m_pTool;
+        wxWindow* m_pParent;
+};
+
+class MenuItemReconstruction : public wxMenuItem
+{
+public:
+        MenuItemReconstruction(wxWindow* pParent,int idMode, const wxString& text,  wxMenu* pMenuPadre, GNKVisualizator::ReconstructionTool* pTool, GNC::GCS::IControladorPermisos* pCP):wxMenuItem(pMenuPadre,idMode,text,text,wxITEM_NORMAL)
+        {
+                pEventHandler = new EventHandlerReconstructionTool(pParent,pTool, idMode);
+        }
+
+        ~MenuItemReconstruction()
+        {
+                if(pEventHandler != NULL) {
+                        delete pEventHandler;
+                        pEventHandler = NULL;
+                }
+        }
+
+        EventHandlerReconstructionTool* pEventHandler;
+};
+
+
+
+
+/*
+class MenuRecontructionTool : public wxMenu {
+
+	public:
+		MenuRecontructionTool(wxWindow* pParent, GNKVisualizator::ReconstructionTool* pTool, GNC::GCS::IControladorPermisos* pCP) : wxMenu() {
+		m_pParent = pParent;
+		m_pTool = pTool;
+
+		wxMenuItem* mode;
+		int modeId = MENU_IDS_RECONSTRUCTION;
+
+		//bool enabled = m_pTool->Habilitada();
+
+		if (pCP != NULL && pCP->Get("atencionprimaria", "reconstruction")) {
+
+			if ( pCP->Get("atencionprimaria.reconstruction","orthogonalmpr3d") ) {
+				int modeId = MENU_IDS_RECONSTRUCTION + (int)GNKVisualizator::Reconstruction::RM_OrthogonalMPR;
+				mode = new wxMenuItem( this, modeId, _("3D MPR"));
+				m_pParent->Connect(modeId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MenuRecontructionTool::OnReconstructionModeSelected) ,NULL, this);
+				m_pParent->Connect(modeId, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuRecontructionTool::OnUpdateMenuReconstructionUI),NULL,this);
+				Append(mode);
+			}
+
+			if ( pCP->Get("atencionprimaria.reconstruction","mip3d") ) {
+				int modeId = MENU_IDS_RECONSTRUCTION + (int)GNKVisualizator::Reconstruction::RM_MIP3D;
+				mode = new wxMenuItem( this, modeId, _("MIP 3D"));
+				m_pParent->Connect(modeId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MenuRecontructionTool::OnReconstructionModeSelected) ,NULL, this);
+				m_pParent->Connect(modeId, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuRecontructionTool::OnUpdateMenuReconstructionUI),NULL,this);
+				Append(mode);
+			}
+
+			if ( pCP->Get("atencionprimaria.reconstruction","volumerengering3d") ) {
+				int modeId = MENU_IDS_RECONSTRUCTION + (int)GNKVisualizator::Reconstruction::RM_VolumeRendering;
+				mode = new wxMenuItem( this, modeId, _("3D volume rendering"));
+				m_pParent->Connect(modeId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MenuRecontructionTool::OnReconstructionModeSelected) ,NULL, this);
+				m_pParent->Connect(modeId, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuRecontructionTool::OnUpdateMenuReconstructionUI),NULL,this);
+				Append(mode);
+			}
+
+			if ( pCP->Get("atencionprimaria.reconstruction","surfacerendering3d") ) {
+				int modeId = MENU_IDS_RECONSTRUCTION + (int)GNKVisualizator::Reconstruction::RM_SurfaceRendering;
+				mode = new wxMenuItem( this, modeId, _("3D surface rendering"));
+				m_pParent->Connect(modeId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MenuRecontructionTool::OnReconstructionModeSelected) ,NULL, this);
+				m_pParent->Connect(modeId, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuRecontructionTool::OnUpdateMenuReconstructionUI),NULL,this);
+				Append(mode);
+			}
+
+
+			if ( pCP->Get("atencionprimaria.reconstruction","endoscopy3d") ) {
+				int modeId = MENU_IDS_RECONSTRUCTION + (int)GNKVisualizator::Reconstruction::RM_3D_Endoscopy;
+				mode = new wxMenuItem( this, modeId, _("3D endoscopy"));
+				m_pParent->Connect(modeId, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MenuRecontructionTool::OnReconstructionModeSelected) ,NULL, this);
+				m_pParent->Connect(modeId, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuRecontructionTool::OnUpdateMenuReconstructionUI),NULL,this);
+				Append(mode);
+			}
+
+			m_pParent->Connect(pTool->ID, wxEVT_UPDATE_UI, wxUpdateUIEventHandler(MenuRecontructionTool::OnUpdateMenuReconstructionUI),NULL,this);
+		}
+	}
+
+	~MenuRecontructionTool() {
+		m_pParent->Disconnect(wxID_ANY, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( MenuRecontructionTool::OnReconstructionModeSelected),NULL,this);
+		m_pParent = NULL;
+		m_pTool = NULL;
+	}
+
+	void OnReconstructionModeSelected( wxCommandEvent& event )
+	{
+		int modeId = event.GetId() - MENU_IDS_RECONSTRUCTION;
+		m_pTool->SelectReconstructionMode(modeId);
+		event.Skip(false);
+	}
+
+	void OnUpdateMenuReconstructionUI(wxUpdateUIEvent& event) {
+		event.Enable(m_pTool->SupportsReconstructionMode(event.GetId() - MENU_IDS_RECONSTRUCTION));
+	}
+
+	GNKVisualizator::ReconstructionTool* m_pTool;
+	wxWindow* m_pParent;
+};*/
+}
+}
+
+//----------------------------------------------------------------------
+
+GNKVisualizator::ReconstructionTool::ReconstructionTool(GNC::GCS::IControladorPermisos* pControladorPermisos)
+{
+        m_Descripcion = _Std("3D/4D Reconstruction");
+        m_IsMenu = true;
+        m_pControladorPermisos = pControladorPermisos;
+}
+
+GNKVisualizator::ReconstructionTool::~ReconstructionTool()
+{
+}
+
+bool GNKVisualizator::ReconstructionTool::AppendInMenu(wxWindow* pParent, wxMenu* pMenuParent)
+{
+        if (m_pControladorPermisos->Get("atencionprimaria", "reconstruction")) {
+                /*		wxMenu* pMenu = new GNKVisualizator::GUI::MenuRecontructionTool(pParent,this, m_pControladorPermisos);
+                		pMenuParent->Append(ID,wxString::FromUTF8(m_Descripcion.c_str()),pMenu);*/
+                GNKVisualizator::GUI::MenuItemReconstruction* mode;
+                //int modeId = MENU_IDS_RECONSTRUCTION;
+
+                if ( m_pControladorPermisos->Get("atencionprimaria.reconstruction","orthogonalmpr3d") ) {
+                        int modeId = MENU_IDS_RECONSTRUCTION + (int)GNKVisualizator::Reconstruction::RM_OrthogonalMPR;
+                        mode = new GNKVisualizator::GUI::MenuItemReconstruction(pParent, modeId, _("3D MPR"), pMenuParent,this, m_pControladorPermisos);
+                        pMenuParent->Append(mode);
+                }
+
+                if ( m_pControladorPermisos->Get("atencionprimaria.reconstruction","mip3d") ) {
+                        int modeId = MENU_IDS_RECONSTRUCTION + (int)GNKVisualizator::Reconstruction::RM_MIP3D;
+                        mode = new GNKVisualizator::GUI::MenuItemReconstruction(pParent, modeId, _("MIP 3D"), pMenuParent,this, m_pControladorPermisos);
+                        pMenuParent->Append(mode);
+                }
+
+                if ( m_pControladorPermisos->Get("atencionprimaria.reconstruction","volumerengering3d") ) {
+                        int modeId = MENU_IDS_RECONSTRUCTION + (int)GNKVisualizator::Reconstruction::RM_VolumeRendering;
+                        mode = new GNKVisualizator::GUI::MenuItemReconstruction(pParent, modeId, _("3D volume rendering"), pMenuParent,this, m_pControladorPermisos);
+                        pMenuParent->Append(mode);
+                }
+
+                if ( m_pControladorPermisos->Get("atencionprimaria.reconstruction","surfacerendering3d") ) {
+                        int modeId = MENU_IDS_RECONSTRUCTION + (int)GNKVisualizator::Reconstruction::RM_SurfaceRendering;
+                        mode = new GNKVisualizator::GUI::MenuItemReconstruction(pParent, modeId, _("3D surface rendering"), pMenuParent,this, m_pControladorPermisos);
+                        pMenuParent->Append(mode);
+                }
+
+
+                if ( m_pControladorPermisos->Get("atencionprimaria.reconstruction","endoscopy3d") ) {
+                        int modeId = MENU_IDS_RECONSTRUCTION + (int)GNKVisualizator::Reconstruction::RM_3D_Endoscopy;
+                        mode = new GNKVisualizator::GUI::MenuItemReconstruction(pParent, modeId, _("3D endoscopy"), pMenuParent,this, m_pControladorPermisos);
+                        pMenuParent->Append(mode);
+                }
+        }
+        return true;
+}
+
+//region "Realizaci�n de la interfaz IHerramienta"
+
+void GNKVisualizator::ReconstructionTool::CrearPaneles( wxPanel* /*panel*/ )
+{
+        m_pAbstractPanelHerramientaOpciones =  NULL;
+}
+
+bool GNKVisualizator::ReconstructionTool::SupportsReconstructionMode(int mode)
+{
+
+        if(Habilitada()) {
+                // TODO: More and better checks required (Ex: modality, etc...)
+                bool supported = true;
+                for (TReconstructionContratable::IteradorListaContratos it1 = TReconstructionContratable::m_pListaActiva->begin(); it1 != TReconstructionContratable::m_pListaActiva->end(); it1++) {
+                        TReconstructionContract* pCR = (*it1);
+                        if(pCR->Estudio->Viewer != NULL) {
+
+                                int nc = pCR->Estudio->Viewer->GetNumberOfComponents();
+
+                                supported = ( supported && (nc == 1) );
+                        } else {
+                                supported = false;
+                        }
+                }
+                return supported;
+        } else {
+                return false;
+        }
+}
+
+void GNKVisualizator::ReconstructionTool::SelectReconstructionMode(int mode)
+{
+        if(Habilitada()) {
+                if(mode >= 0 && mode < (int)GNKVisualizator::Reconstruction::RM_MaxMode) {
+                        for (TReconstructionContratable::IteradorListaContratos it1 = TReconstructionContratable::m_pListaActiva->begin(); it1 != TReconstructionContratable::m_pListaActiva->end(); it1++) {
+                                TReconstructionContract* pCR = (*it1);
+                                switch (mode) {
+                                case GNKVisualizator::Reconstruction::RM_OrthogonalMPR:
+                                        pCR->SetReconstructionMode(GNKVisualizator::Reconstruction::RM_OrthogonalMPR);
+                                        break;
+                                case GNKVisualizator::Reconstruction::RM_MIP3D:
+                                        pCR->SetReconstructionMode(GNKVisualizator::Reconstruction::RM_MIP3D);
+                                        break;
+                                case GNKVisualizator::Reconstruction::RM_VolumeRendering:
+                                        pCR->SetReconstructionMode(GNKVisualizator::Reconstruction::RM_VolumeRendering);
+                                        break;
+                                case GNKVisualizator::Reconstruction::RM_SurfaceRendering:
+                                        pCR->SetReconstructionMode(GNKVisualizator::Reconstruction::RM_SurfaceRendering);
+                                        break;
+                                case GNKVisualizator::Reconstruction::RM_3D_Endoscopy:
+                                        pCR->SetReconstructionMode(GNKVisualizator::Reconstruction::RM_3D_Endoscopy);
+                                        break;
+                                }
+                        }
+                }
+        }
+}
+
+void GNKVisualizator::ReconstructionTool::SolicitarActivacion()
+{
+}
+
+void GNKVisualizator::ReconstructionTool::ConectarContratoFalso(bool )
+{
+        if (TReconstructionContratable::m_pListaActiva == NULL) {
+                //std::cerr << "Error: Se trato de activar el modo deshabilitado de una vista sin haber asignado la vista activa. Error en la logica de activacion. Accion ignorada" << std::endl;
+                return;
+        }
+
+}
+
+void GNKVisualizator::ReconstructionTool::SetVistaActiva(GNC::GCS::IVista* pVista)
+{
+        TReconstructionContratable::EstablecerVistaActiva(pVista);
+}
+
+// FIXME: Aviso!!!! para que funcione deben contratarse contratos pareados obligatorios y en el mismo orden
+void GNKVisualizator::ReconstructionTool::ConectarContratos(bool )
+{
+        if (TReconstructionContratable::m_pListaActiva == NULL) {
+                return;
+        }
+
+}
+
+//endregion
+
+#endif
diff --git a/visualizator/visualizator/tools/reconstructiontool.h b/visualizator/visualizator/tools/reconstructiontool.h
new file mode 100644
index 0000000..a1c2b58
--- /dev/null
+++ b/visualizator/visualizator/tools/reconstructiontool.h
@@ -0,0 +1,70 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#if defined(ENABLE_RECONSTRUCTIONTOOL)
+
+#include "../exportacion/ireconstructiontool.h"
+
+#include <map>
+namespace GNC
+{
+namespace GCS
+{
+class IControladorPermisos;
+}
+}
+
+namespace GNKVisualizator
+{
+
+class ReconstructionTool : public GNKVisualizator::IReconstructionTool
+{
+
+protected:
+
+public:
+        ReconstructionTool(GNC::GCS::IControladorPermisos* pControladorPermisos);
+        ~ReconstructionTool();
+        //menu del mapa de color
+        virtual bool AppendInMenu(wxWindow* pParent, wxMenu* pMenuParent);
+
+        //region "Realización de la interfaz IHerramienta"
+
+        // Setup de paneles
+        virtual void CrearPaneles( wxPanel* panel );
+
+        //endregion
+
+        virtual bool SupportsReconstructionMode(int mode);
+        virtual void SelectReconstructionMode(int mode);
+        virtual void SolicitarActivacion();
+
+        virtual void ConectarContratoFalso(bool activar);
+        virtual void SetVistaActiva(GNC::GCS::IVista* pVista);
+        virtual void ConectarContratos(bool activar);
+
+protected:
+        GNC::GCS::IControladorPermisos* m_pControladorPermisos;
+
+};
+}
+#endif
diff --git a/visualizator/visualizator/vistas/vista2d.cpp b/visualizator/visualizator/vistas/vista2d.cpp
new file mode 100644
index 0000000..1300539
--- /dev/null
+++ b/visualizator/visualizator/vistas/vista2d.cpp
@@ -0,0 +1,283 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/wx.h>
+#include <wx/checkbox.h>
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/busyinfo.h>
+#include <wx/msgdlg.h>
+#include <wx/xml/xml.h>
+#include <wx/utils.h>
+
+#include <api/controllers/icontroladorlog.h>
+#include <api/globals.h>
+#include <api/toolsystem/itoolsregistry.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/controllers/icontroladorcarga.h>
+#include <api/dicom/imodelodicom.h>
+#include <api/dicom/idicomizador.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include <eventos/modificacionimagen.h>
+#include <main/controllers/integrationcontroller.h>
+#include <api/imodelointegracion.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include "../eventos/visualizatorevents.h"
+#include "../estudios/visualizatorstudy.h"
+
+#include <main/entorno.h>
+
+#include "vista2d.h"
+#include "../wxvtk/gvistacompleja.h"
+#include "../wxvtk/gvistasimple.h"
+#include "../dialogos/contenedorherramientas.h"
+
+
+#define TAG_WIDGETS 0xb;
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtkDataSetAttributes.h>
+#include <vtkAlgorithm.h>
+#include <vtkAlgorithmOutput.h>
+#include <vtkImageData.h>
+#include <vtkAlgorithmOutput.h>
+#include <vtkInformation.h>
+
+#include <api/toolsystem/itoolcontroller.h>
+
+/* Constructor */
+
+GNKVisualizator::Vista2D::Vista2D(const GNC::GCS::Ptr<GNKVisualizator::VisualizatorStudy>& estudio) : GNC::GCS::IVista((GNC::GCS::Ptr<GNC::GCS::IStudyContext>)estudio), VisualizatorStudy(estudio)
+{
+        m_Cargada = false;
+        m_IgnorarModificaciones = false;
+
+        VisualizatorStudy->Window = GVista = new GVistaCompleja(this);
+}
+
+
+
+GNKVisualizator::Vista2D::~Vista2D()
+{
+//	GNC::GCS::IEntorno::Instance()->GetControladorCarga()->FreeLoader(&m_pLoader);
+        m_IgnorarModificaciones = true;
+        try {
+                DetenerPipeline();
+        } catch (GIL::IntegrationException& x) {
+                LOG_ERROR("Vista2D", x.str());
+        }
+}
+
+//----------------------------------------------------------------------------------------------------
+//region Interfaz de Carga
+
+
+// Comienzo de carga. Metodo sincrono con la interfaz.
+void GNKVisualizator::Vista2D::OnCargaIniciada()
+{
+}
+
+// Paso 1: Cargar los ficheros en memoria. Metodo NO sincrono con la interfaz.
+void GNKVisualizator::Vista2D::CargarEstudio(GNC::GCS::IComando* /*pCmdInvocador*/)
+{
+
+}
+
+// Finalizacion de la carga. Metodo sincrono con la interfaz.
+void GNKVisualizator::Vista2D::OnCargaFinalizada()
+{
+        GVista->OnCargaFinalizada();
+        GetToolController()->InitializeToolController();
+        GVista->SetFocus();
+}
+
+// Paso 2: Inicializacion del pipeline. Metodo sincrono con la interfaz.
+void GNKVisualizator::Vista2D::IniciarPipeline()
+{
+        try {
+                GVista->IniciarPipeline(VisualizatorStudy->hangingLayout);
+
+                std::string modality("");
+                GetEstudio()->GetTagActiveImage(GKDCM_Modality, modality);
+                GetToolController()->LoadStatus("viewer.view2d", modality); // XXX
+
+        } catch (const std::bad_alloc&) {
+                DetenerPipeline();
+                m_Cargada = false;
+                throw GNC::GCS::VistaException(_Std("Error: System out of memory. Close some studies to free memory."));
+        } catch (GNC::GCS::VistaException&) {
+                DetenerPipeline();
+                m_Cargada = false;
+                throw;
+        }
+
+        m_Cargada = true;
+        GenerarTitulo();
+}
+
+// Parada del pipeline. Metodo sincrono con la interfaz Se invoca en el caso de que ocurra un error de carga.
+void GNKVisualizator::Vista2D::DetenerPipeline()
+{
+        // FIXME: Not called �?
+        std::string modality("");
+        GetEstudio()->GetTagActiveImage(GKDCM_Modality, modality);
+        GetToolController()->SaveStatus("viewer.view2d", modality);
+        GVista->DetenerPipeline();
+}
+
+//endregion
+
+
+//region Interfaz IVista
+bool GNKVisualizator::Vista2D::SoportaHerramienta(GNC::GCS::ITool* /*h*/)
+{
+        return GVista->GetManipulacionEnabled();
+}
+//endregion
+
+
+
+bool GNKVisualizator::Vista2D::SoportaGuardar()
+{
+        std::string namespacePermisos("atencionprimaria.vista2d");
+        if(GNC::GCS::IEntorno::Instance()->GetControladorPermisos()->Get(namespacePermisos,"guardar cambios")) {
+                return true;
+        } else {
+                return false;
+        }
+}
+
+bool GNKVisualizator::Vista2D::SoportaExportar()
+{
+        return true;
+}
+
+std::string GNKVisualizator::Vista2D::GetDICOMTagOriginal(std::string tagId)
+{
+        std::string str("");
+        VisualizatorStudy->GetTagActiveImage(tagId, str);
+        return str;
+}
+
+std::string GNKVisualizator::Vista2D::GetDICOMTagDiagnostico(std::string tagId)
+{
+        std::string str("");
+        VisualizatorStudy->GetTagActiveImage(tagId, str);
+        return str;
+}
+
+void GNKVisualizator::Vista2D::Activar()
+{
+        GNC::GCS::IVista::Activar();
+//#if defined(_WINDOWS)
+        GVista->SetFocus();
+//#endif
+}
+
+void GNKVisualizator::Vista2D::Desactivar()
+{
+        GNC::GCS::IVista::Desactivar();
+}
+
+wxWindow* GNKVisualizator::Vista2D::GetWindow()
+{
+        return GVista;
+}
+
+
+void GNKVisualizator::Vista2D::ActualizarImagen()
+{
+        GVista->ActualizarImagen();
+}
+
+/* Notificacion de cambio en la configuracion */
+void GNKVisualizator::Vista2D::OnConfiguracionCambiada()
+{
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(this,GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas));
+}
+
+void GNKVisualizator::Vista2D::ActivarRuta(long file_pk)
+{
+        GNC::GCS::IHistoryController::FileModel fileModel = GNC::GCS::IHistoryController::Instance()->GetFileModel(file_pk);
+        int indice = VisualizatorStudy->GetPathIndex(fileModel.real_path);
+        if (indice >= 0) {
+                GVista->GoToSlice(indice, false, true, true);
+        }
+}
+
+void GNKVisualizator::Vista2D::ComienzaDestruccion()
+{
+        m_IgnorarModificaciones=true;
+}
+
+void ActivarRuta(const std::string & /*path*/)
+{
+}
+
+//void GNKVisualizator::Vista2D::GetImageActual(ImageType::Pointer& img, MapaMapasValoracion& mapasValoracion, bool conWidgets, const GNC::GCS::Vector& size)
+//{
+//	GetImage(img, GVista->m_posicion, mapasValoracion, conWidgets, size);
+//}
+//
+//void GNKVisualizator::Vista2D::GetImage(ImageType::Pointer& img, int index, MapaMapasValoracion& mapasValoracion, bool conWidgets, const GNC::GCS::Vector& size)
+//{
+//	//como no tiene mapas no se redirige
+//	//TODO EXPORT IMAGES
+//	/////////////GVista->GetImage(img, index, conWidgets, size);
+//
+//}
+//
+//GNKVisualizator::Vista2D::MapaMapasValoracion GNKVisualizator::Vista2D::GetMapasValoracion()
+//{
+//	MapaMapasValoracion mapas;
+//	return mapas;
+//}
+
+void GNKVisualizator::Vista2D::GenerarTitulo()
+{
+        std::ostringstream ostr;
+        std::string valor;
+
+        VisualizatorStudy->GetTagActiveImage("0010|0010",valor);
+        for (std::string::iterator it = valor.begin(); it != valor.end(); ++it) {
+                if ( *it == '^') {
+                        *it = ' ';
+                }
+        }
+        ostr << valor.c_str() << ", ";
+        VisualizatorStudy->GetTagActiveImage("0008|1030",valor);
+        ostr << valor.c_str();
+        if (!valor.empty()) {
+                ostr << "/";
+        }
+        VisualizatorStudy->GetTagActiveImage("0008|103e",valor);
+        ostr << valor.c_str();
+        m_Titulo = ostr.str();
+}
+
+GNC::GCS::IVista* GNKVisualizator::Vista2D::GetView()
+{
+        return this;
+}
+
diff --git a/visualizator/visualizator/vistas/vista2d.h b/visualizator/visualizator/vistas/vista2d.h
new file mode 100644
index 0000000..08c2ce6
--- /dev/null
+++ b/visualizator/visualizator/vistas/vista2d.h
@@ -0,0 +1,120 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/ivista.h>
+#include <export/contracts/islidercontract.h>
+#include <export/contracts/iviewcontract.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/controllers/ipacscontroller.h>
+#include <api/controllers/icontroladorcarga.h> // TODO: Promote to IVista
+
+class GVistaCompleja;
+class wxWindow;
+class wxVtkPageView;
+namespace GNKVisualizator
+{
+class VisualizatorStudy;
+namespace GUI
+{
+class PanelResultados;
+class ContenedorHerramientas;
+}
+
+class Vista2D : public GNC::GCS::IVista, public GNC::GCS::IViewContract
+{
+public:
+        /* Constructor */
+        Vista2D(const GNC::GCS::Ptr<GNKVisualizator::VisualizatorStudy>& estudio);
+
+        //----------------------------------------------------------------------------------------------------
+        //region Interfaz de Carga
+
+        // Comienzo de carga. Metodo sincrono con la interfaz.
+        virtual void OnCargaIniciada();
+
+        // Paso 1: Cargar los ficheros en memoria. Metodo NO sincrono con la interfaz.
+        virtual void CargarEstudio(GNC::GCS::IComando* pCmdInvocador);
+
+        // Finalizacion de la carga. Metodo sincrono con la interfaz.
+        virtual void OnCargaFinalizada();
+
+        // Paso 2: Inicializacion del pipeline. Metodo sincrono con la interfaz.
+        virtual void IniciarPipeline();
+
+        // Parada del pipeline. Metodo sincrono con la interfaz Se invoca en el caso de que ocurra un error de carga.
+        virtual void DetenerPipeline();
+
+        //endregion
+
+        //region Interfaz IVista
+        virtual bool SoportaHerramienta(GNC::GCS::ITool* h);
+        //endregion
+
+        /* Destructor */
+        ~Vista2D();
+
+        virtual bool SoportaGuardar();
+
+        virtual bool SoportaExportar();
+
+        std::string GetDICOMTagOriginal(std::string tagId);
+
+        std::string GetDICOMTagDiagnostico(std::string tagId);
+
+        virtual void Activar();
+
+        virtual void Desactivar();
+
+        //ListaRutas GetPathDiagnosticos();
+        //ListaRutas GetDicomsActivos();
+
+        virtual wxWindow* GetWindow();
+
+        void ActualizarImagen();
+
+        virtual void OnConfiguracionCambiada();
+
+        virtual void ActivarRuta(long file_pk);
+
+        GIL::DICOM::DicomDataset  m_tagsActualizados;
+
+        void ComienzaDestruccion();
+
+        GNC::GCS::Ptr<GNKVisualizator::VisualizatorStudy>& GetVisualizatorStudy()
+        {
+                return VisualizatorStudy;
+        }
+
+        virtual void ActivarVista() {}
+
+        virtual void DesactivarVista() {}
+
+        virtual GNC::GCS::IVista* GetView();
+
+        GVistaCompleja*             GVista;
+        GNC::GCS::Ptr<GNKVisualizator::VisualizatorStudy>  VisualizatorStudy;
+protected:
+        bool					         m_IgnorarModificaciones;
+
+        void GenerarTitulo();
+};
+}
+
diff --git a/visualizator/visualizator/vistas/waveformview.cpp b/visualizator/visualizator/vistas/waveformview.cpp
new file mode 100644
index 0000000..a8ffacf
--- /dev/null
+++ b/visualizator/visualizator/vistas/waveformview.cpp
@@ -0,0 +1,235 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <list>
+
+#include <wx/wx.h>
+#include <wx/checkbox.h>
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/busyinfo.h>
+#include <wx/msgdlg.h>
+#include <wx/xml/xml.h>
+#include <wx/utils.h>
+
+#include <api/globals.h>
+#include <api/math/geometry3d.h>
+#include <api/toolsystem/itoolsregistry.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/controllers/icontroladorcarga.h>
+#include <api/dicom/imodelodicom.h>
+#include <api/dicom/idicomizador.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include <eventos/modificacionimagen.h>
+#include <eventos/modificacionfichero.h>
+
+#include <api/imodelointegracion.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include "../eventos/visualizatorevents.h"
+#include "../estudios/visualizatorstudy.h"
+
+#include <visualizator/widgets/wecg.h>
+
+#include "waveformview.h"
+#include "../wxvtk/gwaveformview.h"
+#include "../dialogos/contenedorherramientas.h"
+#include <main/entorno.h>
+
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtkDataSetAttributes.h>
+#include <vtkAlgorithm.h>
+#include <vtkAlgorithmOutput.h>
+#include <vtkImageData.h>
+#include <vtkAlgorithmOutput.h>
+#include <vtkInformation.h>
+#include <vtkCamera.h>
+
+/* Constructor */
+
+GNKVisualizator::WaveFormView::WaveFormView(const GNC::GCS::Ptr<GNKVisualizator::ECGStudy>& estudio) : GNC::GCS::IVista((GNC::GCS::Ptr<GNC::GCS::IStudyContext>)estudio), VisualizatorStudy(estudio)
+{
+        m_Cargada = false;
+
+        VisualizatorStudy->Window = GVista = new GNKVisualizator::GUI::GWaveformView(this);
+}
+
+
+GNKVisualizator::WaveFormView::~WaveFormView()
+{
+        DetenerPipeline();
+}
+
+//----------------------------------------------------------------------------------------------------
+//region Interfaz de Carga
+
+
+// Comienzo de carga. Metodo sincrono con la interfaz.
+void GNKVisualizator::WaveFormView::OnCargaIniciada()
+{
+}
+
+// Paso 1: Cargar los ficheros en memoria. Metodo NO sincrono con la interfaz.
+void GNKVisualizator::WaveFormView::CargarEstudio(GNC::GCS::IComando* /*pCmdInvocador*/)
+{
+}
+
+// Finalizacion de la carga. Metodo sincrono con la interfaz.
+void GNKVisualizator::WaveFormView::OnCargaFinalizada()
+{
+        GVista->OnFinishLoad();
+}
+
+// Paso 2: Inicializacion del pipeline. Metodo sincrono con la interfaz.
+void GNKVisualizator::WaveFormView::IniciarPipeline()
+{
+        try {
+                GVista->InitPipeline();
+        } catch (const std::bad_alloc&) {
+                DetenerPipeline();
+                m_Cargada = false;
+                throw GNC::GCS::VistaException(_Std("Error: System out of memory. Close some studies to free memory."));
+        } catch (GNC::GCS::VistaException&) {
+                DetenerPipeline();
+                m_Cargada = false;
+                throw;
+        }
+
+        m_Cargada = true;
+
+        //se conecta el evento Ginkgo
+        GNC::GCS::Events::EventoModificacionFichero evtModificado;
+        evtModificado.SetVista(this);
+
+        VisualizatorStudy->ActiveFileIndex = 0;
+
+        typedef GNC::GCS::Vector3D Vec;
+
+        GVista->ViewImage2D->UpdateImage();
+
+        vtkSmartPointer<vtkCamera> cam = GVista->ViewImage2D->GetRenderer()->GetActiveCamera();
+
+        Vec focalPoint;
+        Vec camPos;
+        Vec spacing;
+        Vec dims;
+        Vec winsize;
+        int idims[3];
+        int iwinsize[2];
+
+        GVista->ViewInteractor2D->Layout();
+        GVista->ViewInteractor2D->GetParent()->Layout();
+
+        GVista->ViewImage2D->GetSpacing(spacing.v);
+        GVista->ViewImage2D->GetDimensions(idims);
+        GVista->ViewInteractor2D->GetClientSize(&iwinsize[0], &iwinsize[1]);
+        //((wxWindowBase* )GVista->ViewInteractor2D)->GetSize();
+
+        dims.x = idims[0];
+        dims.y = idims[1];
+        winsize.x = iwinsize[0];
+        winsize.y = iwinsize[1];
+
+        Vec worldViewPort = (spacing * (dims + Vec(1.0, 1.0, 0.0))); // + 1.0 cause pixel centers to pixels edges conversion
+
+        double parallelScale = worldViewPort.y / 2.0;
+
+        GVista->ViewImage2D->SetInitialParallelScale( parallelScale );
+
+        double rel = (winsize.x / winsize.y); // Relaci�n ancho/alto del viewPort
+
+        focalPoint = Vec( rel * (parallelScale), parallelScale, 0.0);
+        camPos = focalPoint - Vec(0.0, 0.0, 1.0);
+
+        cam->SetPosition( camPos.v );
+        cam->SetFocalPoint( focalPoint.v );
+        cam->SetViewUp(0.0, -1.0, 0.0);
+        cam->SetClippingRange(-2.0, 2.0);
+
+        //lanzo el evento de imagen cargada
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(this,GNC::GCS::Events::EventoModificacionImagen::ImagenCargada));
+        /*
+        GNC::GCS::IEntorno::Instance()->GetControladorHerramientas()->RefrescarHerramientas();
+        */
+
+        GenerarTitulo();
+}
+
+// Parada del pipeline. Metodo sincrono con la interfaz Se invoca en el caso de que ocurra un error de carga.
+void GNKVisualizator::WaveFormView::DetenerPipeline()
+{
+        GVista->StopPipeline();
+}
+
+//endregion
+
+
+bool GNKVisualizator::WaveFormView::SoportaGuardar()
+{
+        return false;
+}
+
+bool GNKVisualizator::WaveFormView::SoportaExportar()
+{
+        return false;
+}
+
+void GNKVisualizator::WaveFormView::Activar()
+{
+        GNC::GCS::IVista::Activar();
+        GVista->SetFocus();
+}
+
+
+wxWindow* GNKVisualizator::WaveFormView::GetWindow()
+{
+        return GVista;
+}
+
+void GNKVisualizator::WaveFormView::GenerarTitulo()
+{
+        std::ostringstream ostr;
+        std::string valor;
+
+        VisualizatorStudy->GetTagActiveImage("0010|0010",valor);
+        for (std::string::iterator it = valor.begin(); it != valor.end(); ++it) {
+                if ( *it == '^') {
+                        *it = ' ';
+                }
+        }
+        ostr << valor.c_str() << ", ";
+        VisualizatorStudy->GetTagActiveImage("0008|1030",valor);
+        ostr << valor.c_str();
+        if (!valor.empty()) {
+                ostr << "/";
+        }
+        VisualizatorStudy->GetTagActiveImage("0008|103e",valor);
+        ostr << valor.c_str();
+        m_Titulo = ostr.str();
+}
+
+GNC::GCS::IVista* GNKVisualizator::WaveFormView::GetView()
+{
+        return this;
+}
+
diff --git a/visualizator/visualizator/vistas/waveformview.h b/visualizator/visualizator/vistas/waveformview.h
new file mode 100644
index 0000000..1c3e75a
--- /dev/null
+++ b/visualizator/visualizator/vistas/waveformview.h
@@ -0,0 +1,93 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/ivista.h>
+#include <visualizator/estudios/ecgstudy.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/controllers/ipacscontroller.h>
+#include <api/controllers/icontroladorcarga.h> // TODO: Promover a IVista
+#include <export/contracts/iviewcontract.h>
+
+class wxWindow;
+class wxVtkPageView;
+namespace GNKVisualizator
+{
+class VisualizatorStudy;
+namespace GUI
+{
+class GWaveformView;
+}
+
+class WaveFormView : public GNC::GCS::IVista, public GNC::GCS::IViewContract
+{
+public:
+        /* Constructor */
+        WaveFormView(const GNC::GCS::Ptr<GNKVisualizator::ECGStudy>& estudio);
+
+        //----------------------------------------------------------------------------------------------------
+        //region Interfaz de Carga
+
+        // Comienzo de carga. Metodo sincrono con la interfaz.
+        virtual void OnCargaIniciada();
+
+        // Paso 1: Cargar los ficheros en memoria. Metodo NO sincrono con la interfaz.
+        virtual void CargarEstudio(GNC::GCS::IComando* pCmdInvocador);
+
+        // Finalizacion de la carga. Metodo sincrono con la interfaz.
+        virtual void OnCargaFinalizada();
+
+        // Paso 2: Inicializacion del pipeline. Metodo sincrono con la interfaz.
+        virtual void IniciarPipeline();
+
+        // Parada del pipeline. Metodo sincrono con la interfaz Se invoca en el caso de que ocurra un error de carga.
+        virtual void DetenerPipeline();
+
+        //endregion
+
+        /* Destructor */
+        ~WaveFormView();
+
+        virtual bool SoportaGuardar();
+
+        virtual bool SoportaExportar();
+
+        virtual void Activar();
+        virtual void ActivarRuta(long /*file_pk*/) {}
+
+        virtual wxWindow* GetWindow();
+
+        GNC::GCS::Ptr<GNKVisualizator::ECGStudy>& GetECGStudy()
+        {
+                return VisualizatorStudy;
+        }
+
+        //iviewcontract
+        virtual GNC::GCS::IVista* GetView();
+
+protected:
+        GNKVisualizator::GUI::GWaveformView*             GVista;
+        GNC::GCS::Ptr<GNKVisualizator::ECGStudy>  VisualizatorStudy;
+
+        void GenerarTitulo();
+};
+}
+
diff --git a/visualizator/visualizator/widgets/wecg.cpp b/visualizator/visualizator/widgets/wecg.cpp
new file mode 100644
index 0000000..30df536
--- /dev/null
+++ b/visualizator/visualizator/widgets/wecg.cpp
@@ -0,0 +1,614 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <cmath>
+#include <cstring>
+#include <ostream>
+#include <list>
+
+#include <api/globals.h>
+#include <api/controllers/icontroladorlog.h>
+#include <api/math/geometry3d.h>
+#include <api/icontexto.h>
+#include <api/ievento.h>
+#include <api/iwidgetsmanager.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/ientorno.h>
+#include <api/dicom/imodelodicom.h>
+#include <api/westilo.h>
+
+#include <api/controllers/icontroladorpermisos.h>
+
+#include <eventos/modificacionimagen.h>
+
+#include <main/entorno.h>
+
+
+#include "wecg.h"
+#include <widgets/openglhelper.h>
+
+#include <vtkgl.h>
+#include <vtkImageData.h>
+#include <vtkImageActor.h>
+#include <vtkPointData.h>
+#include <vtk/vtkginkgoimageviewer.h>
+
+#include <widgets/openglhelper.h>
+#include <cairo/cairo.h>
+
+#if defined(_GINKGO_DEBUG)
+#define DEBUG_PRECISION
+#endif
+
+// Propiedades visuales
+
+#define COLOR_FONDO 0.9f, 0.9f, 0.9f, 1.0f
+
+// Num de pixels pantalla minimo para que aparezca la rejilla
+#define GRID_1MM_NEAR_THRESHOLD 0.7
+#define GRID_5MM_FAR_THRESHOLD 0.7
+#define GRAPH_FAR_THRESHOLD 0.7
+
+//greater that this text wont be shown
+#define TEXT_FAR_THRESHOLD 1.2
+
+#define GRID_1MM_LINE_WIDTH 0.25f
+#define GRID_1MM_LINE_COLOR 1.0f, 0.0f, 0.0f, 0.3f
+
+#define GRID_5MM_LINE_WIDTH 1.0f
+#define GRID_5MM_LINE_COLOR 1.0f, 0.0f, 0.0f, 0.5f
+#define GRID_5MM_LINE_WIDTH_FAR 0.15f
+#define GRID_5MM_LINE_COLOR_FAR 1.0f, 0.0f, 0.0f, 0.5f
+
+#define GRAPH_LINE_WIDTH 1.5f
+#define GRAPH_LINE_COLOR 0.0f, 0.0f, 0.0f, 0.9f
+
+#define GRAPH_LINE_WIDTH_FAR 0.3f
+#define GRAPH_LINE_COLOR_FAR 0.0f, 0.0f, 0.0f, 0.9f
+
+#define LEAD_TEXT_COLOR 1.0f, 0.1f, 0.1f, 1.0f
+
+#define REFERENCE_WIDTH 0.4f //0.4 seconds
+
+
+static GNC::GCS::Vector WinMarginRel[2] = {
+        GNC::GCS::Vector(0.0, 0.0), GNC::GCS::Vector(1.0, 1.0)
+};
+
+//region "Implementacion de WBuilder"
+
+GNKVisualizator::Widgets::WECGBuilder::WECGBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid) : GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask, gid, false), IObservadorWidget(-1, gid)
+{
+        m_pRejillaActiva = NULL;
+        m_pManager->InsertarObservador(this);
+
+        // Comprobamos si existe alguna rejilla para esta vista, y de ser asi la asociamos.
+        bool found = false;
+        for( GNC::GCS::ListaWidgets::iterator it = m_pManager->GetListaWidgets().begin(); !found && it != m_pManager->GetListaWidgets().end(); ++it) {
+                GNC::GCS::Widgets::IWidget* w = *it;
+                if (w->GetVID() == -1 && w->GetGID() == m_GID) {
+                        m_pRejillaActiva = dynamic_cast<GNKVisualizator::Widgets::WECG*> (w);
+                        if (m_pRejillaActiva != NULL) {
+                                return;
+                        }
+                }
+        }
+
+}
+
+GNKVisualizator::Widgets::WECGBuilder::~WECGBuilder()
+{
+        m_pManager->EliminarObservador(this);
+}
+
+void GNKVisualizator::Widgets::WECGBuilder::AutoCallibrateImage()
+{
+        if (m_pRejillaActiva) {
+                m_pRejillaActiva->AutoCallibrate();
+        }
+
+}
+
+void GNKVisualizator::Widgets::WECGBuilder::OnWidgetDestruido(GNC::GCS::Widgets::IWidget* w)
+{
+        if (m_pRejillaActiva == w) {
+                m_pRejillaActiva = NULL;
+        }
+}
+
+//region "Interfaz especifica"
+void GNKVisualizator::Widgets::WECGBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& )
+{
+        if (!m_pManager) {
+                return;
+        }
+        GTRACE("GNKVisualizator::Widgets::WECGBuilder::OnMouseEvents(wxMouseEvent&)");
+}
+
+void GNKVisualizator::Widgets::WECGBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+        GTRACE("GNKVisualizator::Widgets::WECGBuilder::OnKeyEvents(wxKeyEvent&)");
+}
+
+void GNKVisualizator::Widgets::WECGBuilder::Render(GNC::GCS::Contexto3D* )
+{
+        return;
+}
+
+//endregion
+
+GNKVisualizator::Widgets::RecursosECG::RecursosECG()
+{
+}
+GNKVisualizator::Widgets::RecursosECG::~RecursosECG()
+{
+        if (!Texturas.empty()) {
+                LOG_WARN("ECGResources", "Resource leaked");
+        }
+}
+
+void GNKVisualizator::Widgets::RecursosECG::Alloc(size_t csize)
+{
+        if (csize == Texturas.size()) {
+                return;
+        }
+        Dealloc();
+        Texturas = TListaTexturas(csize);
+        for (unsigned int i = 0; i < csize; i++) {
+                Texturas[i] = new TexturasCanalECG();
+        }
+}
+
+void GNKVisualizator::Widgets::RecursosECG::Dealloc()
+{
+        for (size_t i = 0; i < Texturas.size(); i++) {
+                Texturas[i]->Destruir();
+                delete Texturas[i];
+        }
+        Texturas.clear();
+}
+
+namespace GNKVisualizator
+{
+namespace Widgets
+{
+
+TexturasCanalECG::TexturasCanalECG()
+{
+        tl = new GNC::GCS::TexturaCairo();
+        tl->Redimensionar(2, 2);
+}
+
+TexturasCanalECG::~TexturasCanalECG()
+{
+        delete tl;
+}
+
+void TexturasCanalECG::Destruir()
+{
+        tl->Destruir();
+}
+
+class Channel
+{
+public:
+
+        Channel(const ChannelInfo& info, const GNC::GCS::Vector& pos, const GNC::GCS::Vector& size, GNC::GCS::Vector& rel):
+                sx(0.0),
+                sy(0.0),
+                Pos(pos),
+                Size(size),
+                Rel(rel),
+                Info(info)
+        {
+        }
+
+        ~Channel()
+        {
+        }
+
+        void Plot(GNC::GCS::Contexto3D* c, GNC::GCS::TexturaCairo* tl)
+        {
+
+                GNC::GCS::Vector sample;
+                GNC::GCS::Vector textSize;
+
+
+                if (!tl->EsValida() || TamTitle.EsNulo()) {
+                        const std::string Title = Info.GetTitle();
+                        tl->SetFontBold(WIDGETS_TEXT_FONT_FAMILY, GNC::GCS::IControladorPermisos::Instance()->Get("style", "ecg.label.fontSize").ObtenerValor<float>());
+                        textSize = GNC::GCS::GLHelper::calcularBoundingBox((*tl), Title, false, 300.0f); // Tama�o de la region en pixels
+                        tl->Redimensionar(std::ceil(textSize.x), std::ceil(textSize.y));
+                        textSize.Asignar(tl->ancho, tl->alto);
+
+                        tl->SetFontBold(WIDGETS_TEXT_FONT_FAMILY, GNC::GCS::IControladorPermisos::Instance()->Get("style", "ecg.label.fontSize").ObtenerValor<float>());
+                        textSize = GNC::GCS::GLHelper::calcularBoundingBox((*tl), Title, false, 300.0f); // Tama�o de la region en pixels
+                        GNC::GCS::GLHelper::TColor col(LEAD_TEXT_COLOR);
+                        TamTitle = GNC::GCS::GLHelper::dibujarTexto(*tl, Title, col, false);
+                }
+
+                if (!tl->texturaCargada) {
+                        tl->Cargar();
+                }
+                if (tl->texturaModificada) {
+                        tl->Actualizar();
+                }
+
+                if (c->RefRelacionImagenPantalla().x < TEXT_FAR_THRESHOLD ) {
+                        //compute display position...if it's too far labels doesn't show well
+                        GNC::GCS::Vector planePos;
+                        planePos = Pos;
+                        GNC::GCS::Vector3D worldPos;
+                        GNC::GCS::Vector3D displayPos;
+
+                        c->pRenderer->m_pImageViewer->UnProyect2D(planePos.v, worldPos.v);
+                        c->pRenderer->WorldToDisplay(worldPos.v, displayPos.v);
+
+                        //ensure label is shown...
+                        displayPos.x = std::max(0.0, displayPos.x);
+                        displayPos.y = std::max(0.0, displayPos.y);
+
+                        wDibujarTexturaTexto2D(c, *tl, displayPos.v);
+                }
+
+
+                if (c->RefRelacionImagenPantalla().x > GRAPH_FAR_THRESHOLD ) {
+                        glColor4d(GRAPH_LINE_COLOR_FAR);
+                        glLineWidth(GRAPH_LINE_WIDTH_FAR);
+                } else {
+                        glColor4d(GRAPH_LINE_COLOR);
+                        glLineWidth(GRAPH_LINE_WIDTH);
+                }
+
+                //draw reference...
+                int i = 0;
+                {
+                        //2 squares of 0.2 sec
+                        float referenceWidth = Info.SamplingFrecuency * REFERENCE_WIDTH;
+                        if (!Info.Samples.empty()) {
+                                glBegin(GL_LINE_STRIP);
+                                do {
+                                        if ((i < referenceWidth/4) || (i >3*referenceWidth/4)) {
+                                                sample = Pos + (GNC::GCS::Vector(i, 0) * Rel);
+                                        } else {
+                                                sample = Pos + (GNC::GCS::Vector(i, -100) * Rel);
+                                                //sample += GNC::GCS::Vector(0, -10.0f);
+                                        }
+                                        glVertex3d( sample.x, sample.y, 0.0);
+                                } while (++i < referenceWidth);
+                                glEnd();
+                        }
+                }
+
+                glBegin(GL_LINE_STRIP);
+                for (GNKVisualizator::ChannelInfo::TVectorSamples::const_iterator it = Info.Samples.begin(); it != Info.Samples.end(); ++it, ++i) {
+                        sample = Pos + (GNC::GCS::Vector(i, -(*it) * Info.Multiplier * Info.Sensitivity * Info.SensitivityCorrectionFactor) * Rel);
+                        glVertex3d( sample.x, sample.y, 0.0);
+
+                }
+                glEnd();
+        }
+
+        double sx;
+        double sy;
+
+        GNC::GCS::Vector Pos;
+        GNC::GCS::Vector Size;
+        GNC::GCS::Vector Rel;
+
+
+        GNC::GCS::Vector TamTitle;
+        GNC::GCS::Vector TamUnits;
+
+        const ChannelInfo Info;
+};
+
+class Data : public std::list<Channel>
+{
+public:
+        Data() : NumSamples(0), NumChannels(0), SamplingFreq(0.0)
+        {
+        }
+
+        ~Data()
+        {
+                clear();
+        }
+
+        void Setup(GNC::GCS::Vector ImageSize, GNC::GCS::Vector ImageSpacing, const GNKVisualizator::ECGStudy::TListChannelInfo& listInfoChannels)
+        {
+                clear();
+                if (listInfoChannels.size() == 0) {
+                        return;
+                }
+                NumChannels = listInfoChannels.size();
+                SamplingFreq = listInfoChannels.front().SamplingFrecuency;
+                //we have to add reference width (0.4 seconds)
+                const float referenceWidth = SamplingFreq*REFERENCE_WIDTH;
+                NumSamples = listInfoChannels.front().NumSamples + referenceWidth;
+
+                GNC::GCS::Vector WinMargin[2] = {ImageSize * WinMarginRel[0], ImageSize * WinMarginRel[1]};
+                GNC::GCS::Vector WinSize = WinMargin[1] - WinMargin[0];
+
+                GNC::GCS::Vector CSize ( WinSize.x / (double) NumSamples, WinSize.y / (double) NumChannels);
+                GNC::GCS::Vector COff(WinMargin[0].x, WinMargin[0].y  + (0.5 * CSize.y));
+                GNC::GCS::Vector CRel = GNC::GCS::Vector( CSize.x , 0.1/ImageSpacing.y); //con el inverso del spacing se sacan los mV como es 10mm/mv pues 0.1mm entre el spacing
+
+                GNC::GCS::Vector CPos = COff;
+
+                for (GNKVisualizator::ECGStudy::TListChannelInfo::const_iterator it = listInfoChannels.begin(); it != listInfoChannels.end(); ++it) {
+                        push_back(Channel((*it), CPos, CSize, CRel));
+                        CPos.y += CSize.y;
+                }
+        }
+
+        void Plot(GNC::GCS::Contexto3D* ct, GNKVisualizator::Widgets::RecursosECG* rec)
+        {
+
+                rec->Alloc(size());
+                unsigned int i = 0;
+                for (iterator it = begin(); it != end(); ++it, i++) {
+                        Channel& c = *it;
+                        c.Plot(ct, rec->Texturas[i]->tl);
+                }
+        }
+
+        size_t NumSamples;
+        size_t NumChannels;
+        double SamplingFreq;
+
+};
+
+}
+}
+//-----------------------------------------------------------------------------------------------
+
+//region "Constructor y destructor"
+
+GNKVisualizator::Widgets::WECG::WECG(GNC::GCS::IWidgetsManager* pManager, long vid, const char* nombre) : GNC::GCS::Widgets::IWidget(pManager, vid, nombre)
+{
+        m_TopLevel        = false;
+        m_Oculto          = false;
+        m_ReservaRecursos = true;
+        this->CData       = new Data();
+}
+
+GNKVisualizator::Widgets::WECG::~WECG()
+{
+        delete this->CData;
+}
+
+//endregion
+
+template<class T> void Get(const std::string& str, T& val)
+{
+        std::istringstream is(str);
+        is >> val;
+}
+
+void GNKVisualizator::Widgets::WECG::AutoCallibrate()
+{
+        int dims[3];
+        m_pManager->GetRendererActivo()->m_pImageViewer->GetDimensions(dims);
+
+        GNC::GCS::Vector dimsImagen = dims;
+
+        if (CData->size() > 0) {
+                double time_channels = CData->NumSamples / CData->SamplingFreq;
+                GNC::GCS::Vector WinMarginSize = (WinMarginRel[1] - WinMarginRel[0]) * dimsImagen;
+
+                double time_px = 25.0 * (time_channels / WinMarginSize.x); // 25 mm/s
+                double amplitude_px = 10.0 * (2.0 * (double) CData->size()  / WinMarginSize.y); // 10 mm/mV => 20 mV por canal
+
+                GNC::GCS::Vector3D oldSpacing;
+                GNC::GCS::Vector3D newSpacing(time_px, amplitude_px, 1.0);
+                GNC::GCS::Vector3D oldOrigin;
+
+                m_pManager->GetRendererActivo()->m_pImageViewer->GetSpacing(oldSpacing.v);
+                m_pManager->GetRendererActivo()->m_pImageViewer->GetOrigin(oldOrigin.v);
+
+                if (oldSpacing != newSpacing) {
+
+                        GNC::GCS::Events::EventoModificacionImagen* pEvt = new GNC::GCS::Events::EventoModificacionImagen(m_pManager->GetVista(), GNC::GCS::Events::EventoModificacionImagen::ImagenRecalibrada, GetVID());
+                        pEvt->SetOldSpacing(oldSpacing.v);
+                        pEvt->SetNewSpacing(newSpacing.v);
+                        pEvt->SetOldOrigin(oldOrigin.v);
+                        pEvt->SetNewOrigin(oldOrigin.v);
+
+                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(pEvt);
+                }
+        }
+}
+
+
+void GNKVisualizator::Widgets::WECG::Reload(const GNKVisualizator::ECGStudy::TListChannelInfo& listInfoChannels)
+{
+        if(listInfoChannels.size() > 0) {
+                int dims[3];
+                double spacing[3];
+                m_pManager->GetRendererActivo()->m_pImageViewer->GetDimensions(dims);
+                m_pManager->GetRendererActivo()->m_pImageViewer->GetSpacing(spacing);
+
+                GNC::GCS::Vector imageDimensions = dims;
+                GNC::GCS::Vector imageSpacing = spacing;
+
+
+                CData->Setup(imageDimensions, imageSpacing, listInfoChannels);
+        } else {
+                return;
+        }
+
+        //base->dump(std::cout);
+
+
+
+        //waveformSeq->dump(std::cout);
+
+
+}
+
+
+//region "Interfaz generica"
+
+void GNKVisualizator::Widgets::WECG::OnMouseEvents(GNC::GCS::Events::EventoRaton& )
+{
+}
+
+void GNKVisualizator::Widgets::WECG::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+}
+
+bool GNKVisualizator::Widgets::WECG::HitTest(float , float , const GNC::GCS::Vector& /*umbral*/)
+{
+        return false;
+}
+
+bool GNKVisualizator::Widgets::WECG::HitTest(GNC::GCS::Vector* , int )
+{
+        return false;
+}
+
+void GNKVisualizator::Widgets::WECG::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        if (CData->size() == 0) {
+                return;
+        }
+
+        RecursosECG* rec = NULL;
+        TMapaRecursos::iterator it = m_mapaRecursos.find(c->GetRenderer());
+        if(it == m_mapaRecursos.end()) {
+                rec = new RecursosECG();
+                m_mapaRecursos[c->GetRenderer()] = rec;
+        } else {
+                rec = (*it).second;
+        }
+
+
+        {
+                int dims[3];
+                GNC::GCS::Vector3D spacing;
+                m_pManager->GetRendererActivo()->m_pImageViewer->GetDimensions(dims);
+                m_pManager->GetRendererActivo()->m_pImageViewer->GetSpacing(spacing.v);
+
+                GNC::GCS::Vector dimsImagen = dims;
+                GNC::GCS::Vector step;
+
+                GNC::GCS::Vector win[2] = { dimsImagen * WinMarginRel[0], dimsImagen * WinMarginRel[1] };
+
+                glClearColor(COLOR_FONDO);
+                glClear(GL_COLOR_BUFFER_BIT);
+                /*
+                glBegin(GL_QUADS);
+                glVertex2d(0.0, 0.0);
+                glVertex2d(0.0, dimsImagen.y);
+                glVertex2d(dimsImagen.x, dimsImagen.y);
+                glVertex2d(dimsImagen.x, 0.0);
+                glEnd();
+                */
+                step.Asignar(1.0 / spacing.x, 1.0 / spacing.y);
+
+                if (c->RefRelacionImagenPantalla().x < GRID_1MM_NEAR_THRESHOLD) {
+
+                        glLineWidth(GRID_1MM_LINE_WIDTH);
+                        glColor4f(GRID_1MM_LINE_COLOR);
+                        glBegin(GL_LINES);
+                        for (double x = win[0].x; x < win[1].x; x += step.x) {
+                                glVertex2d(x, win[0].y);
+                                glVertex2d(x, win[1].y);
+                        }
+                        for (double y = win[0].y; y < win[1].y; y += step.y) {
+                                glVertex2d(win[0].x, y);
+                                glVertex2d(win[1].x, y);
+                        }
+                        glEnd();
+                }
+
+                step *= 5.0f;
+
+
+                if (c->RefRelacionImagenPantalla().x > GRID_5MM_FAR_THRESHOLD) {
+                        glLineWidth(GRID_5MM_LINE_WIDTH_FAR);
+                        glColor4f(GRID_5MM_LINE_COLOR_FAR);
+                } else {
+                        glLineWidth(GRID_5MM_LINE_WIDTH);
+                        glColor4f(GRID_5MM_LINE_COLOR);
+                }
+
+                glBegin(GL_LINES);
+                for (double x = win[0].x; x <= win[1].x; x += step.x) {
+                        glVertex2d(x, win[0].y);
+                        glVertex2d(x, win[1].y);
+                }
+                for (double y = win[0].y; y <= win[1].y; y += step.y) {
+                        glVertex2d(win[0].x, y);
+                        glVertex2d(win[1].x, y);
+                }
+                glEnd();
+
+                /*
+                glColor4f(0.0f, 0.0f, 0.0f, 1.0f);
+                glLineWidth(2.0f);
+                glBegin(GL_LINE_LOOP);
+                glVertex2d(0.0, 0.0);
+                glVertex2d(dims[0], 0.0);
+                glVertex2d(dims[0], dims[1]);
+                glVertex2d(0.0, dims[1]);
+                glVertex2d(0.0, 0.0);
+                glEnd();
+                */
+        }
+
+        CData->Plot(c, rec);
+}
+
+void GNKVisualizator::Widgets::WECG::Seleccionar(bool )
+{
+}
+
+void GNKVisualizator::Widgets::WECG::Iluminar(bool )
+{
+}
+
+void GNKVisualizator::Widgets::WECG::Ocultar(bool oculto)
+{
+        if (m_Oculto != oculto) {
+                m_Oculto = oculto;
+                m_Modificado = true;
+        }
+}
+
+void GNKVisualizator::Widgets::WECG::LiberarRecursos(GNC::GCS::IWidgetsRenderer* pKey)
+{
+        TMapaRecursos::iterator it = m_mapaRecursos.find(pKey);
+        if(it != m_mapaRecursos.end()) {
+                RecursosECG* rec = (*it).second;
+                rec->Dealloc();
+                delete rec;
+                m_mapaRecursos.erase(it);
+        }
+}
+//endregion
+
diff --git a/visualizator/visualizator/widgets/wecg.h b/visualizator/visualizator/widgets/wecg.h
new file mode 100644
index 0000000..f50f74d
--- /dev/null
+++ b/visualizator/visualizator/widgets/wecg.h
@@ -0,0 +1,170 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <vector>
+#include <list>
+#include <set>
+
+#include <api/iwidgets.h>
+#include <api/observers/iwidgetsobserver.h>
+#include <api/controllers/ieventscontroller.h>
+#include <visualizator/estudios/ecgstudy.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IContextoEstudio;
+class TexturaCairo;
+}
+}
+
+namespace GNKVisualizator
+{
+
+namespace Widgets
+{
+
+class WECG;
+class Data;
+
+class WECGBuilder : public GNC::GCS::Widgets::IWidgetBuilder, public GNC::GCS::Widgets::IObservadorWidget
+{
+public:
+
+        WECGBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask, long gid);
+
+        ~WECGBuilder();
+
+        virtual void OnWidgetDestruido(GNC::GCS::Widgets::IWidget*);
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        void AutoCallibrateImage();
+
+protected:
+        GNC::GCS::Vector          m_PosicionCursor;
+        WECG*                     m_pRejillaActiva;
+
+};
+
+//----------------------------------------------------------------------------
+
+typedef struct TexturasCanalECG {
+        GNC::GCS::TexturaCairo* tl;
+
+        TexturasCanalECG();
+        ~TexturasCanalECG();
+
+        void Destruir();
+
+} TexturasCanalECG;
+
+class RecursosECG
+{
+public:
+        typedef std::vector<TexturasCanalECG*> TListaTexturas;
+
+        TListaTexturas Texturas;
+
+        RecursosECG();
+
+        ~RecursosECG();
+
+        void Alloc(size_t csize);
+
+        void Dealloc();
+};
+
+class WECG : public GNC::GCS::Widgets::IWidget
+{
+
+protected:
+
+        typedef std::map<void*, RecursosECG*> TMapaRecursos;
+
+public:
+
+        //region "Constructor y destructor"
+
+public:
+
+        WECG(GNC::GCS::IWidgetsManager* pManager, long vid, const char* nombre = "WECG");
+
+        ~WECG();
+
+        //endregion
+
+        //region "Interfaz generica"
+
+        virtual bool SoportaAutoBorrado() const
+        {
+                return false;
+        }
+
+        virtual void AutoCallibrate();
+
+        virtual void Reload(const GNKVisualizator::ECGStudy::TListChannelInfo& listInfoChannels);
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void Seleccionar(bool seleccionado);
+
+        virtual void Iluminar(bool iluminado);
+
+        virtual void Ocultar(bool oculto);
+
+        virtual void LiberarRecursos(GNC::GCS::IWidgetsRenderer* pKey);
+
+        //endregion
+
+        //region "Estado interno"
+
+private:
+
+
+        //region "Propiedades geometricas"
+private:
+        Data* CData;
+        TMapaRecursos m_mapaRecursos;
+
+public:
+
+        //endregion
+
+        //endregion
+
+};
+}
+}
+
diff --git a/visualizator/visualizator/widgets/wecgrule.cpp b/visualizator/visualizator/widgets/wecgrule.cpp
new file mode 100644
index 0000000..a65948d
--- /dev/null
+++ b/visualizator/visualizator/widgets/wecgrule.cpp
@@ -0,0 +1,672 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+//#define _GINKGO_TRACE
+#include <wx/xml/xml.h>
+#include <api/globals.h>
+#include <api/internationalization/internationalization.h>
+#include <api/icontexto.h>
+#include <api/ivista.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/iwidgetsmanager.h>
+#include <api/westilo.h>
+
+#include <widgets/gui/calibracion.h>
+#include <wx/menu.h>
+#include <wx/xml/xml.h>
+#include "wecgrule.h"
+#include <widgets/wtextbox.h>
+
+#include <main/managers/widgetsmanager.h>
+#include <vtkgl.h>
+#include <cmath>
+#include <sstream>
+#include <cairo/cairo.h>
+#include <widgets/openglhelper.h>
+#include <eventos/modificacionimagen.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <visualizator/estudios/ecgstudy.h>
+
+#include <api/math/geometry3d.h>
+
+//region "Implementacion de WRuleBuilder"
+
+GNKVisualizator::Widgets::WECGRuleBuilder::WECGRuleBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask) :
+        GNC::GCS::Widgets::IWidgetBuilder(pManager, buttonMask),
+        m_MouseDown(false),
+        m_pReglaTemp(NULL)
+{
+}
+
+GNKVisualizator::Widgets::WECGRuleBuilder::~WECGRuleBuilder()
+{
+        if (m_pReglaTemp != NULL) {
+                delete m_pReglaTemp;
+                m_pReglaTemp = NULL;
+        }
+}
+
+void GNKVisualizator::Widgets::WECGRuleBuilder::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if (!m_pManager) {
+                return;
+        }
+
+        if (m_MouseDown && evento.ButtonUp(m_ButtonMask)) {
+                m_MouseDown = false;
+                if (m_pReglaTemp != NULL) {
+                        m_pReglaTemp->m_Vertices[1] = evento.iP;;
+                        m_pReglaTemp->Recalcular(evento.c->GetRenderer());
+                        //como mínimo 2 pixels imagen
+                        if (std::abs(m_pReglaTemp->Distancia()) > GNC::GCS::Vector::EpsilonDeReales() ) {
+                                ConsumirEvento();
+                                m_pManager->InsertarWidget(m_pReglaTemp);
+                                m_pManager->LanzarEventoCreacion(m_pReglaTemp);
+                        } else {
+                                delete m_pReglaTemp;
+                        }
+                        m_pReglaTemp = NULL;
+                        m_pManager->Modificado();
+                }
+        } else if (evento.ButtonDown(m_ButtonMask)) {
+
+                m_MouseDown = true;
+                TNodo nodos[2];
+                nodos[0] = nodos[1] = evento.iP;
+                if (m_pReglaTemp != NULL) {
+                        delete m_pReglaTemp;
+                }
+                m_pReglaTemp = new GNKVisualizator::Widgets::WECGRule(m_pManager, evento.c->GetRenderer()->GetVID(), nodos, "Regla");
+                //std::cout << "linea (leftdwn): " << m_Vertices[0].m_wX << ", " << m_Vertices[0].m_wY << " -> " << m_Vertices[1].m_wX << ", " << m_Vertices[1].m_wY << std::endl;
+                m_pManager->Modificado();
+                ConsumirEvento();
+        } else if (evento.Dragging() && m_MouseDown) {
+                if (m_pReglaTemp != NULL) {
+                        m_pReglaTemp->m_Vertices[1] = evento.iP;
+                        m_pReglaTemp->Recalcular(evento.c->GetRenderer());
+                        //std::cout << "linea (moving): " << m_Vertices[0].m_wX << ", " << m_Vertices[0].m_wY << " -> " << m_Vertices[1].m_wX << ", " << m_Vertices[1].m_wY << std::endl;
+                        m_pManager->Modificado();
+                }
+                ConsumirEvento();
+        }
+
+}
+
+void GNKVisualizator::Widgets::WECGRuleBuilder::OnKeyEvents(GNC::GCS::Events::EventoTeclado&)
+{
+}
+
+void GNKVisualizator::Widgets::WECGRuleBuilder::Render(GNC::GCS::Contexto3D* c)
+{
+        if (m_pReglaTemp == NULL) {
+                return;
+        }
+        m_pReglaTemp->Render(c);
+}
+
+GNC::GCS::Widgets::TipoCursor GNKVisualizator::Widgets::WECGRuleBuilder::GetCursor()
+{
+        return GNC::GCS::Widgets::CUR_CREAR_LINEA;
+}
+
+//region "Constructor y destructor"
+
+GNKVisualizator::Widgets::WECGRule::WECGRule(GNC::GCS::IWidgetsManager* pManager, long vid, GNC::GCS::Nodo nodos[2], const char* nombre) :
+        GNC::GCS::Widgets::IWidget(pManager, vid, nombre,0,TID_USER_ANNOTATION_WIDGET),
+        m_pTextBox(NULL),
+        m_MouseDown(false),
+        m_Distancia(0)
+
+{
+        m_Vertices[0] = nodos[0];
+        m_Vertices[1] = nodos[1];
+
+        m_Oculto = false;
+
+        m_pTextBox = new GNC::GCS::Widgets::WTextBox(m_pManager, m_VID, m_Vertices[1], GNC::GCS::Widgets::WTextBox::TNM_Dynamic, "ruleBox", "");
+        m_pTextBox->SetTexto("0");
+        m_pManager->InsertarWidget(m_pTextBox);
+}
+
+GNKVisualizator::Widgets::WECGRule::~WECGRule()
+{
+        m_pManager->EliminarWidget(m_pTextBox, false);
+        m_pManager->Modificado();
+}
+
+//endregion
+
+bool GNKVisualizator::Widgets::WECGRule::SoportaAutoBorrado() const
+{
+        return true;
+}
+
+void GNKVisualizator::Widgets::WECGRule::OnMouseEvents(GNC::GCS::Events::EventoRaton& evento)
+{
+        if(EstaOculto()) {
+                return;
+        }
+        //------------------------------------------------------
+        // Leaving
+        if (evento.Leaving() ) {
+                Iluminar(false);
+        }
+        //------------------------------------------------------
+        // Entering
+        else if (evento.Entering() ) {
+                if (m_MouseDown) {
+                        Iluminar(true);
+                }
+        }
+        //------------------------------------------------------
+        // Dragging
+        else if (evento.Dragging() && m_MouseDown) {
+                if (EstaSeleccionado() || m_Vertices[0].EstaSeleccionado() || m_Vertices[1].EstaSeleccionado()) {
+                        GNC::GCS::Vector delta = evento.iP - m_PosCursor;
+                        m_PosCursor = evento.iP;
+                        if (EstaSeleccionado()) {
+                                m_Vertices[0] += delta;
+                                m_Vertices[1] += delta;
+                        } else {
+                                if (m_Vertices[1].EstaSeleccionado()) {
+                                        m_Vertices[1] = evento.iP;
+                                } else if (m_Vertices[0].EstaSeleccionado()) {
+                                        m_Vertices[0] = evento.iP;
+                                }
+                        }
+                        LanzarEventoModificacion();
+                        Recalcular(evento.c->GetRenderer());
+                        ConsumirEvento();
+                }
+        }
+        //------------------------------------------------------
+        // LeftDown
+        else if (evento.LeftDown()) {
+
+                if (EventoConsumido() && !evento.m_controlDown) {
+                        SeleccionarNodo(m_Vertices[0], false);
+                        SeleccionarNodo(m_Vertices[1], false);
+                        Seleccionar(false);
+                        return;
+                }
+
+                bool dentro = false;
+
+
+                m_StartPointMov = evento.iP;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                if (m_Vertices[0].Hits(evento.iP.x, evento.iP.y, factor)) { // click sobre el nodo
+                        SeleccionarNodo(m_Vertices[0], true);
+                        SeleccionarNodo(m_Vertices[1], false);
+                        Seleccionar(false);
+
+                        dentro = true;
+                } else { // Click fuera del nodo
+                        SeleccionarNodo(m_Vertices[0], false);
+                }
+                if (!dentro && m_Vertices[1].Hits(evento.iP.x, evento.iP.y, factor)) { // click sobre el nodo
+                        SeleccionarNodo(m_Vertices[0], false);
+                        SeleccionarNodo(m_Vertices[1], true);
+                        Seleccionar(false);
+
+                        dentro = true;
+                } else { // Click fuera del nodo
+                        SeleccionarNodo(m_Vertices[1], false);
+                }
+
+                if (!dentro && HitTest(evento.iP.x, evento.iP.y, factor ) ) { // click sobre la recta
+                        if (evento.m_controlDown) { // Inversion de seleccion
+                                InvertirSeleccion();
+                        } else {
+                                Seleccionar(true);
+                        }
+
+                        dentro = true;
+                } else { // Click fuera del nodo
+                        if (!evento.m_controlDown) {
+                                Seleccionar(false);
+                        } else {
+                                ConsumirEvento();
+                                if (EstaSeleccionado()) {
+                                        m_MouseDown = true;
+                                        m_PosCursor = evento.iP;
+                                }
+                        }
+                }
+
+                if (dentro) {
+                        m_MouseDown = true;
+                        m_PosCursor = evento.iP;
+                        ConsumirEvento();
+                }
+                return;
+        }
+        //------------------------------------------------------
+        // LeftUP
+        else if (evento.LeftUp()) {
+                if (m_MouseDown) {
+                        m_MouseDown = false;
+                        ConsumirEvento();
+                }
+        }
+        //------------------------------------------------------
+        // Moving
+        else if (evento.Moving()) {
+
+                if (EventoConsumido()) {
+                        IluminarNodo(m_Vertices[0], false);
+                        IluminarNodo(m_Vertices[1], false);
+                        Iluminar(false);
+                        return;
+                }
+                bool dentro = false;
+
+                m_PosCursor = evento.iP;
+
+                const GNC::GCS::Vector& factor = evento.c->RelacionImagenPantalla();
+
+                if (m_Vertices[0].Hits(evento.iP.x, evento.iP.y, factor)) {
+
+                        IluminarNodo(m_Vertices[0], true);
+                        IluminarNodo(m_Vertices[1], false);
+                        Iluminar(false);
+
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_Vertices[0], false);
+                }
+
+                if (m_Vertices[1].Hits(evento.iP.x, evento.iP.y, factor) && !m_Vertices[0].EstaIluminado()) {
+
+                        IluminarNodo(m_Vertices[0], false);
+                        IluminarNodo(m_Vertices[1], true);
+                        Iluminar(false);
+
+                        dentro = true;
+                } else {
+                        IluminarNodo(m_Vertices[1], false);
+                }
+
+                if (!dentro && HitTest(evento.iP.x, evento.iP.y, factor) ) {
+                        Iluminar(true);
+                        dentro = true;
+                } else {
+                        Iluminar(false);
+                }
+
+                if (dentro) {
+                        ConsumirEvento();
+                }
+                return;
+        }
+}
+
+void GNKVisualizator::Widgets::WECGRule::OnKeyEvents(GNC::GCS::Events::EventoTeclado& evento)
+{
+        if (evento.GetKeyCode() == WXK_ESCAPE) {
+                Seleccionar(false);
+        }
+}
+
+
+bool GNKVisualizator::Widgets::WECGRule::HitTest(float x, float y, const GNC::GCS::Vector& rel)
+{
+        bool hits = false;
+
+        GNC::GCS::Vector dpos(x,y);
+        if ( m_Vertices[0].DistanciaEuclideaCuadrado(m_Vertices[1]) / 4.0f > dpos.DistanciaEuclideaCuadrado(m_Vertices[0].PuntoMedio(m_Vertices[1]))) {
+
+                GNC::GCS::Vector vdir = m_Vertices[1] - m_Vertices[0];
+                GNC::GCS::Vector orto = (vdir / rel).VectorOrtogonal() * rel;
+
+                GNC::GCS::Vector inter = GNC::GCS::Vector::InterseccionEntreRectas(dpos, dpos + orto, m_Vertices[0], m_Vertices[1]);
+                GNC::GCS::Vector diff = (inter - dpos).ValorAbsoluto();
+                if ( (diff / rel).Norma2Cuadrado() < (m_Vertices[0].m_Size * m_Vertices[0].m_Size) ) {
+                        hits = true;
+                }
+        }
+        return hits;
+}
+
+bool GNKVisualizator::Widgets::WECGRule::HitTest(GNC::GCS::Vector* vertices, int numVertices)
+{
+        return m_Vertices[0].DentroDePoligono2(vertices, numVertices) && m_Vertices[1].DentroDePoligono2(vertices, numVertices);
+}
+
+void GNKVisualizator::Widgets::WECGRule::Render(GNC::GCS::Contexto3D* c)
+{
+        if(m_Oculto) {
+                return;
+        }
+
+        GNC::GCS::Vector escala = c->RelacionImagenPantalla();
+
+
+        glLineWidth(m_LineWidthProp);
+
+        // Highlights sobre nodos activos
+        if (m_Vertices[0].m_Iluminado) {
+                wDibujarElipseDegradado(m_Vertices[0], wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+        }
+
+        if (m_Vertices[1].m_Iluminado) {
+                wDibujarElipseDegradado(m_Vertices[1], wRadioPuntoIluminado * escala, wColorPuntoIluminadoInterior, wColorPuntoIluminadoExterior);
+        }
+
+        GNC::GCS::Vector fsombra;
+        if (m_Seleccionado && m_MouseDown) {
+                fsombra.Asignar(WIDGET_OFFSET_X_SOMBRA_SELECCIONADO, WIDGET_OFFSET_Y_SOMBRA_SELECCIONADO);
+        } else {
+                fsombra.Asignar(WIDGET_OFFSET_X_SOMBRA, WIDGET_OFFSET_Y_SOMBRA);
+        }
+        fsombra *= escala;
+
+        //------------------------------------------------------------------------------------------
+        // Sombra de la regla
+        wColorSombra.Aplicar();
+        glBegin(GL_LINES);
+        glVertex2d(m_Vertices[0].x + fsombra.x, m_Vertices[0].y - fsombra.y);
+        glVertex2d(m_Vertices[1].x + fsombra.x, m_Vertices[1].y - fsombra.y);
+        glEnd();
+
+        // Dibujado de la regla
+        wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINES);
+        glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+        glVertex2d(m_Vertices[1].x, m_Vertices[1].y);
+        glEnd();
+
+
+        TVector diff = m_Vertices[1] - m_Vertices[0];
+
+        // Apply spacing deformation
+        diff /= GNC::GCS::Vector(escala.x, escala.y);
+
+        TVector puntoMedio = m_Vertices[0].PuntoMedio(m_Vertices[1]);
+        TVector ortogonal = (diff).VectorOrtogonal().Normalizar() * escala * 6.0;
+
+        if (m_MouseDown && m_Seleccionado) {
+                ortogonal *= WIDGET_INCREMENTO_DETALLE_SELECCIONADO;
+        }
+
+
+        TVector f00 = m_Vertices[0] + ortogonal;
+        TVector f01 = m_Vertices[0] - ortogonal;
+        TVector f10 = puntoMedio + ortogonal;
+        TVector f20 = m_Vertices[1] + ortogonal;
+        TVector f21 = m_Vertices[1] - ortogonal;
+
+        //------------------------------------------------------------------------------------------
+        // Dibujado de las marcas de la regla.
+        //-- Sombras
+        wColorSombra.Aplicar();
+        glBegin(GL_LINES);
+        glVertex2d(f00.x + fsombra.x, f00.y - fsombra.y);
+        glVertex2d(f01.x + fsombra.x, f01.y - fsombra.y);
+        glEnd();
+
+        glBegin(GL_LINES);
+        glVertex2d(f10.x + fsombra.x, f10.y - fsombra.y);
+        glVertex2d(puntoMedio.x + fsombra.x, puntoMedio.y - fsombra.y);
+        glEnd();
+
+        glBegin(GL_LINES);
+        glVertex2d(f20.x + fsombra.x, f20.y - fsombra.y);
+        glVertex2d(f21.x + fsombra.x, f21.y - fsombra.y);
+        glEnd();
+
+        // Marca derecha
+        glBegin(GL_LINES);
+        glVertex2d(f20.x + fsombra.x, f20.y - fsombra.y);
+        glVertex2d(f21.x + fsombra.x, f21.y - fsombra.y);
+        glEnd();
+
+        //-- Marca izquierda
+        wAplicarColor(m_Iluminado || m_Vertices[0].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINES);
+        glVertex2d(f00.x, f00.y);
+        glVertex2d(f01.x, f01.y);
+        glEnd();
+
+        //-- Marca central
+        wAplicarColor(m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINES);
+        glVertex2d(f10.x, f10.y);
+        glVertex2d(puntoMedio.x, puntoMedio.y);
+        glEnd();
+
+        // Marca derecha
+        wAplicarColor(m_Iluminado || m_Vertices[1].m_Iluminado, m_MouseDown, m_Seleccionado);
+        glBegin(GL_LINES);
+        glVertex2d(f20.x, f20.y);
+        glVertex2d(f21.x, f21.y);
+        glEnd();
+
+#if 0 // DEBUG
+
+        glLineWidth(WIDGET_GROSOR_LINEA);
+        glColor4d(1.0, 0.0, 0.0, 1.0);
+        GNC::GCS::Vector ddiff = m_Vertices[1] - m_Vertices[0];
+        glBegin(GL_LINES);
+        glVertex2d(0.0, 0.0);
+        glVertex2d(ddiff.x, ddiff.y);
+        glEnd();
+
+        GNC::GCS::Vector vr = (ddiff / escala).VectorOrtonormal() * 10.0;
+
+        glColor4d(0.0, 1.0, 1.0, 1.0);
+
+        GNC::GCS::Vector inter = GNC::GCS::Vector::InterseccionEntreRectas(m_PosCursor, m_PosCursor + (vr * escala), m_Vertices[0], m_Vertices[1]);
+
+        glBegin(GL_LINES);
+        glVertex2d(m_PosCursor.x, m_PosCursor.y);
+        glVertex2d(inter.x, inter.y);
+        glEnd();
+
+        glColor4d(0.0, 0.0, 1.0, 1.0);
+
+        glBegin(GL_LINES);
+        glVertex2d(0.0, 0.0);
+        glVertex2d(vr.x * escala.x, vr.y * escala.y);
+        glEnd();
+
+        glBegin(GL_LINES);
+        glVertex2d(m_Vertices[0].x, m_Vertices[0].y);
+        glVertex2d(m_Vertices[0].x + vr.x * escala.x, m_Vertices[0].y + vr.y * escala.y);
+        glEnd();
+
+#endif
+
+}
+
+float GNKVisualizator::Widgets::WECGRule::Distancia()
+{
+        return m_Distancia;
+}
+
+bool GNKVisualizator::Widgets::WECGRule::isVertical()
+{
+        GNC::GCS::Vector iDiff = m_Vertices[1] - m_Vertices[0];
+        return std::abs(iDiff.AnguloSobreAbscisa()) > M_PI_4;;
+}
+
+bool GNKVisualizator::Widgets::WECGRule::GetMenuContextual(wxMenu* /*menuContextual*/, wxWindow* /*pParent*/)
+{
+        return false;
+}
+
+void ortogonalize(bool isVertical, const GNC::GCS::Vector& fixed, GNC::GCS::Vector& modified)
+{
+        if (isVertical) {
+                modified = modified.ProyeccionOrtogonalSobreRecta(fixed, (fixed + GNC::GCS::Vector(0.0f, 1.0f)));
+
+        } else {
+                modified = modified.ProyeccionOrtogonalSobreRecta(fixed, (fixed + GNC::GCS::Vector(1.0f, 0.0f)));
+        }
+}
+
+void GNKVisualizator::Widgets::WECGRule::Recalcular(GNC::GCS::IWidgetsRenderer* renderer)
+{
+        GNC::GCS::Vector3D worldPosition0, worldPosition1, wDiff;
+        bool isVerticalRule = isVertical();
+
+        //ortogonalize nodes...
+        if (m_Vertices[0].EstaIluminado()) {
+                ortogonalize(isVerticalRule, m_Vertices[1], m_Vertices[0]);
+        } else {
+                ortogonalize(isVerticalRule, m_Vertices[0], m_Vertices[1]);
+        }
+        //
+
+        if (renderer != NULL && renderer->m_pImageViewer != NULL) {
+                const double tindex = renderer->m_pImageViewer->GetTindex();
+                double imagePosition0[3] = {m_Vertices[0].x, m_Vertices[0].y, tindex};
+                double imagePosition1[3] = {m_Vertices[1].x, m_Vertices[1].y, tindex};
+                renderer->m_pImageViewer->CoordenadasImagenACoordenadasMundo(imagePosition0, worldPosition0.v);
+                renderer->m_pImageViewer->CoordenadasImagenACoordenadasMundo(imagePosition1, worldPosition1.v);
+        }
+
+        m_Modificado = true;
+        wDiff = worldPosition1 - worldPosition0;
+        m_Distancia = worldPosition0.DistanciaEuclidea(worldPosition1);
+
+        std::stringstream os;
+        os.setf(ios::floatfield, ios::fixed );
+        os.precision(2);
+        os.fill('0');
+        float metricaDistancia = wDiff.Norma2();
+
+        GNKVisualizator::ECGStudy* pStudy = NULL;
+        if (m_pManager->GetVista() != NULL && m_pManager->GetVista()->GetEstudio().IsValid()) {
+                pStudy = dynamic_cast<GNKVisualizator::ECGStudy*>(m_pManager->GetVista()->GetEstudio().GetRawPointer());
+        }
+        if (pStudy != NULL) {
+                os << pStudy->getMeasureText(isVerticalRule, metricaDistancia);
+        } else {
+                os << metricaDistancia << " px.";
+        }
+
+        std::string medida = os.str();
+
+        m_pTextBox->SetTexto(medida);
+
+        GNC::GCS::Vector textPosition(std::max(m_Vertices[0].x, m_Vertices[1].x), std::max(m_Vertices[0].y, m_Vertices[1].y));
+        m_pTextBox->SetPosition(textPosition);
+}
+
+
+//region Interfaz de eventos ginkgo
+
+
+//endregion
+void GNKVisualizator::Widgets::WECGRule::InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades)
+{
+        TMapaPropiedades& primerMapa = listaMapaPropiedades.front();
+        {
+                primerMapa[_Std("Length")] = m_pTextBox->GetTexto();
+        }
+        {
+                std::stringstream out;
+                out << m_Vertices[0] << ",\n" << m_Vertices[1];
+                primerMapa[_Std("Points (I)")] = out.str();
+        }
+        {
+                std::stringstream out;
+                out << PuntoToStringMundo(m_Vertices[0]) << "," << std::endl;
+                out << PuntoToStringMundo(m_Vertices[1]) ;
+
+                primerMapa[_Std("Points (M)")] = out.str();
+        }
+}
+
+void GNKVisualizator::Widgets::WECGRule::OffscreenRender(GNC::GCS::Contexto3D* c)
+{
+        GNC::GCS::Vector Diff = m_Vertices[1] - m_Vertices[0];
+        GNC::GCS::Vector TamTexto;
+
+        const GNC::GCS::Vector& escala = c->RefRelacionMundoPantallaOffscreen();
+
+        GNC::GCS::Vector vert[2] = {c->Reproyectar(m_Vertices[0]) * c->factorReescalado, c->Reproyectar(m_Vertices[1]) * c->factorReescalado };
+
+        glLineWidth(m_LineWidthProp);
+
+        // Dibujado de la regla
+        wColorNormal.AplicarCairo(c->cr);
+        cairo_move_to(c->cr, vert[0].x, vert[0].y);
+        cairo_line_to(c->cr, vert[1].x, vert[1].y);
+        cairo_stroke(c->cr);
+
+        TVector diff = vert[1] - vert[0];
+
+        TVector puntoMedio = vert[0].PuntoMedio(vert[1]);
+        TVector ortogonal = (diff).VectorOrtonormal() * escala * 6.0f;
+
+        TVector f00 = vert[0] + ortogonal;
+        TVector f01 = vert[0] - ortogonal;
+        TVector f10 = puntoMedio + ortogonal;
+        TVector f20 = vert[1] + ortogonal;
+        TVector f21 = vert[1] - ortogonal;
+
+        //------------------------------------------------------------------------------------------
+        // Dibujado de las marcas de la regla.
+
+        //-- marcas normales
+        wColorNormal.AplicarCairo(c->cr);
+        //-- Marca izquierda
+        cairo_move_to(c->cr, f00.x , f00.y );
+        cairo_line_to(c->cr, f01.x , f01.y );
+        cairo_stroke(c->cr);
+
+        //-- Marca central
+        cairo_move_to(c->cr, f10.x , f10.y );
+        cairo_line_to(c->cr, puntoMedio.x , puntoMedio.y );
+        cairo_stroke(c->cr);
+
+        // Marca derecha
+        cairo_move_to(c->cr, f20.x , f20.y );
+        cairo_line_to(c->cr, f21.x , f21.y );
+        cairo_stroke(c->cr);
+
+        //------------------------------------------------------------------------------------------
+        //// Dibujado del texto de la medida
+        cairo_font_options_t* options;
+        options = cairo_font_options_create ();
+
+        cairo_select_font_face (c->cr, WIDGETS_TEXT_FONT_FAMILY, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
+        cairo_set_font_size(c->cr, std::max(m_FontSizeProp * escala.x, (double)8.0f));
+        cairo_font_options_set_antialias (options, CAIRO_ANTIALIAS_NONE);
+        cairo_set_font_options(c->cr, options);
+
+        TamTexto = GNC::GCS::Widgets::HelperTexto::calcularBoundingBox(c, m_pTextBox->GetTexto(), false, m_MaxTextWidthProp * escala.x); // Tamaño de la region en pixels
+
+        cairo_set_source_rgba (c->cr, 1.0f, 1.0f, 1.0f, 1.0f);
+        cairo_save(c->cr);
+        GNC::GCS::Vector puntoTexto( puntoMedio.x - (TamTexto.x / 2.0f), puntoMedio.y - TamTexto.y);
+        puntoTexto.Redondear();
+        cairo_translate(c->cr, puntoTexto.x, puntoTexto.y);
+        GNC::GCS::Widgets::HelperTexto::dibujarTexto(c, m_pTextBox->GetTexto(), false, m_MaxTextWidthProp * escala.x);
+        cairo_restore(c->cr);
+
+        cairo_font_options_destroy(options);
+
+}
+
diff --git a/visualizator/visualizator/widgets/wecgrule.h b/visualizator/visualizator/widgets/wecgrule.h
new file mode 100644
index 0000000..d9bda9a
--- /dev/null
+++ b/visualizator/visualizator/widgets/wecgrule.h
@@ -0,0 +1,128 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#pragma once
+#include <api/iwidgets.h>
+#include <api/iwidgetsmanager.h>
+#include <api/widgetserializable.h>
+#include <api/observers/ieventsobserver.h>
+#include <widgets/openglhelper.h>
+
+class wxXmlNode;
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+#include <vtkSmartPointer.h>
+#include <vtkImageData.h>
+
+namespace GNC
+{
+namespace GCS
+{
+namespace Widgets
+{
+class WTextBox;
+}
+}
+}
+
+namespace GNKVisualizator
+{
+namespace Widgets
+{
+class WECGRule;
+
+class EXTAPI WECGRuleBuilder : public GNC::GCS::Widgets::IWidgetBuilder
+{
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Nodo   TNodo;
+        typedef GNC::GCS::Matriz TMatriz;
+
+        WECGRuleBuilder(GNC::GCS::IWidgetsManager* pManager, const GNC::GCS::TriggerButton& buttonMask);
+
+        ~WECGRuleBuilder();
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual GNC::GCS::Widgets::TipoCursor GetCursor();
+
+protected:
+
+        bool                           m_MouseDown;
+        WECGRule*                      m_pReglaTemp;
+
+};
+
+class EXTAPI WECGRule : public GNC::GCS::Widgets::IWidget
+{
+        friend class WECGRuleBuilder;
+public:
+
+        typedef GNC::GCS::Vector TVector;
+        typedef GNC::GCS::Matriz TMatriz;
+
+        WECGRule(GNC::GCS::IWidgetsManager* pManager, long vid, GNC::GCS::Nodo nodos[2], const char* nombre = "");
+        ~WECGRule();
+
+        virtual bool SoportaAutoBorrado() const;
+
+        virtual void OnMouseEvents(GNC::GCS::Events::EventoRaton&);
+
+        virtual void OnKeyEvents(GNC::GCS::Events::EventoTeclado&);
+
+        virtual bool HitTest(float x, float y, const GNC::GCS::Vector& umbral);
+
+        virtual bool HitTest(GNC::GCS::Vector* vertices, int numVertices);
+
+        virtual void Render(GNC::GCS::Contexto3D* c);
+
+        virtual void OffscreenRender(GNC::GCS::Contexto3D* c);
+
+        virtual float Distancia();
+
+        bool isVertical();
+
+        virtual bool GetMenuContextual(wxMenu* pMenu, wxWindow* pParent) ;
+
+protected:
+
+        GNC::GCS::Nodo                   m_Vertices[2];
+        GNC::GCS::Vector                 m_StartPointMov;
+        GNC::GCS::Widgets::WTextBox*     m_pTextBox;
+        bool                             m_MouseDown;
+
+        float                            m_Distancia;
+public:
+
+        void Recalcular(GNC::GCS::IWidgetsRenderer* renderer);
+
+public:
+        //endregion
+        virtual void InsertarPropiedades(TListaMapasPropiedades &listaMapaPropiedades);
+};
+}
+}
diff --git a/visualizator/visualizator/wxvtk/VisualizatorViews.fbp b/visualizator/visualizator/wxvtk/VisualizatorViews.fbp
new file mode 100644
index 0000000..e735d6e
--- /dev/null
+++ b/visualizator/visualizator/wxvtk/VisualizatorViews.fbp
@@ -0,0 +1,2232 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
+<wxFormBuilder_Project>
+    <FileVersion major="1" minor="11" />
+    <object class="Project" expanded="1">
+        <property name="class_decoration"></property>
+        <property name="code_generation">C++</property>
+        <property name="disconnect_events">1</property>
+        <property name="disconnect_mode">source_name</property>
+        <property name="disconnect_php_events">0</property>
+        <property name="disconnect_python_events">0</property>
+        <property name="embedded_files_path">res</property>
+        <property name="encoding">UTF-8</property>
+        <property name="event_generation">connect</property>
+        <property name="file">visualizatorviews</property>
+        <property name="first_id">1000</property>
+        <property name="help_provider">none</property>
+        <property name="internationalize">1</property>
+        <property name="name">VistasAtencionPrimaria</property>
+        <property name="namespace"></property>
+        <property name="path">.</property>
+        <property name="precompiled_header"></property>
+        <property name="relative_path">1</property>
+        <property name="skip_lua_events">1</property>
+        <property name="skip_php_events">1</property>
+        <property name="skip_python_events">1</property>
+        <property name="ui_table">UI</property>
+        <property name="use_enum">0</property>
+        <property name="use_microsoft_bom">0</property>
+        <object class="Panel" expanded="1">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg">64,64,64</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">-1,-1</property>
+            <property name="name">VistaSimpleBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxCLIP_CHILDREN|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="1">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer7</property>
+                <property name="orient">wxHORIZONTAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">0</property>
+                    <property name="flag">wxALL|wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="CustomControl" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="class">vtkSmartPointer<wxVTKRenderWindowInteractor></property>
+                        <property name="close_button">1</property>
+                        <property name="construction">ViewInteractor2D  = new wxVTKRenderWindowInteractor (this, wxID_ANY,&#x0A;                                                          wxDefaultPosition,&#x0A;                                                          wxDefaultSize,&#x0A;                                                          wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,&#x0A;                                                          wxT(""));&#x0A;  &#x0A;ViewImag [...]
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="declaration">vtkSmartPointer<wxVTKRenderWindowInteractor> ViewInteractor2D;&#x0A;vtkSmartPointer<vtkGinkgoImageViewer> ViewImage2D;</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="include">#undef __DEPRECATED&#x0A;#include <vtkRenderer.h>&#x0A;#include <vtkSmartPointer.h>&#x0A;#include <wxVTKRenderWindowInteractor.h>&#x0A;#include <vtk/vtkginkgoimageviewer.h></property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">ViewInteractor2D</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">public</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="settings"></property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxCLIP_CHILDREN</property>
+                        <event name="OnChar">OnChar</event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">1</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxSlider" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg">64,64,64</property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">1</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="maxValue">1</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="minValue">0</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSliderTimeInstant</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="style">wxSL_AUTOTICKS|wxSL_LEFT|wxSL_VERTICAL</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="validator_data_type"></property>
+                        <property name="validator_style">wxFILTER_NONE</property>
+                        <property name="validator_type">wxDefaultValidator</property>
+                        <property name="validator_variable"></property>
+                        <property name="value">0</property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnCommandScroll"></event>
+                        <event name="OnCommandScrollBottom"></event>
+                        <event name="OnCommandScrollChanged"></event>
+                        <event name="OnCommandScrollLineDown"></event>
+                        <event name="OnCommandScrollLineUp"></event>
+                        <event name="OnCommandScrollPageDown"></event>
+                        <event name="OnCommandScrollPageUp"></event>
+                        <event name="OnCommandScrollThumbRelease"></event>
+                        <event name="OnCommandScrollThumbTrack"></event>
+                        <event name="OnCommandScrollTop"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground">OnEraseBackground</event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnScroll">OnTimeInstantChanged</event>
+                        <event name="OnScrollBottom"></event>
+                        <event name="OnScrollChanged"></event>
+                        <event name="OnScrollLineDown"></event>
+                        <event name="OnScrollLineUp"></event>
+                        <event name="OnScrollPageDown"></event>
+                        <event name="OnScrollPageUp"></event>
+                        <event name="OnScrollThumbRelease"></event>
+                        <event name="OnScrollThumbTrack"></event>
+                        <event name="OnScrollTop"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg">64,64,64</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">1</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">-1,-1</property>
+            <property name="name">VistaComplejaBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint">OnPaint</event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer7</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">2</property>
+                    <property name="flag">wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxBoxSizer" expanded="0">
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pSizerTools</property>
+                        <property name="orient">wxHORIZONTAL</property>
+                        <property name="permission">protected</property>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">2</property>
+                    <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">1</property>
+                    <object class="wxBoxSizer" expanded="0">
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pSizerView</property>
+                        <property name="orient">wxHORIZONTAL</property>
+                        <property name="permission">protected</property>
+                        <object class="sizeritem" expanded="0">
+                            <property name="border">2</property>
+                            <property name="flag">wxEXPAND</property>
+                            <property name="proportion">1</property>
+                            <object class="wxGridSizer" expanded="0">
+                                <property name="cols">1</property>
+                                <property name="hgap">1</property>
+                                <property name="minimum_size"></property>
+                                <property name="name">m_pSizerSeries</property>
+                                <property name="permission">protected</property>
+                                <property name="rows">1</property>
+                                <property name="vgap">1</property>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">2</property>
+                    <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg">30,30,30</property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size">-1,1</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size">-1,1</property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel7</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size">-1,1</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">2</property>
+                    <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg">64,64,64</property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">0</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pPanelManipulacion</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer8</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pSizerIzquierda</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">protected</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">0</property>
+                                <property name="flag">wxEXPAND | wxALL</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg">64,64,64</property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pPanelScroll</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">m_pSizerScroll</property>
+                                        <property name="orient">wxHORIZONTAL</property>
+                                        <property name="permission">protected</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">0</property>
+                                            <property name="flag">wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxSlider" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg">64,64,64</property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="maxValue">100</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="minValue">0</property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pSliderSlice</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">public</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxSL_BOTH</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="value">0</property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCommandScroll"></event>
+                                                <event name="OnCommandScrollBottom"></event>
+                                                <event name="OnCommandScrollChanged"></event>
+                                                <event name="OnCommandScrollLineDown"></event>
+                                                <event name="OnCommandScrollLineUp"></event>
+                                                <event name="OnCommandScrollPageDown"></event>
+                                                <event name="OnCommandScrollPageUp"></event>
+                                                <event name="OnCommandScrollThumbRelease"></event>
+                                                <event name="OnCommandScrollThumbTrack"></event>
+                                                <event name="OnCommandScrollTop"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnScroll">OnZSliderScroll</event>
+                                                <event name="OnScrollBottom"></event>
+                                                <event name="OnScrollChanged"></event>
+                                                <event name="OnScrollLineDown"></event>
+                                                <event name="OnScrollLineUp"></event>
+                                                <event name="OnScrollPageDown"></event>
+                                                <event name="OnScrollPageUp"></event>
+                                                <event name="OnScrollThumbRelease"></event>
+                                                <event name="OnScrollThumbTrack"></event>
+                                                <event name="OnScrollTop"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pSizerDerecho</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">protected</property>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Dialog" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg"></property>
+            <property name="center"></property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="extra_style"></property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">0</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">450,275</property>
+            <property name="name">DialogoSincronizacionBase</property>
+            <property name="pos"></property>
+            <property name="size">450,275</property>
+            <property name="style">wxDEFAULT_DIALOG_STYLE</property>
+            <property name="subclass"></property>
+            <property name="title">Synchronize...</property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style"></property>
+            <event name="OnActivate"></event>
+            <event name="OnActivateApp"></event>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnClose"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnHibernate"></event>
+            <event name="OnIconize"></event>
+            <event name="OnIdle"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint"></event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer9</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">1</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pBody</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">BodyPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer101</property>
+                            <property name="orient">wxVERTICAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxPanel" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_panel7</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="subclass">TitledPanelSinBorder; wx/ginkgostyle/ginkgostyle.h</property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip">Select the view you want to synchronize with the current</property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style">wxTAB_TRAVERSAL</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                    <object class="wxBoxSizer" expanded="0">
+                                        <property name="minimum_size"></property>
+                                        <property name="name">bSizer11</property>
+                                        <property name="orient">wxVERTICAL</property>
+                                        <property name="permission">none</property>
+                                        <object class="sizeritem" expanded="0">
+                                            <property name="border">5</property>
+                                            <property name="flag">wxEXPAND</property>
+                                            <property name="proportion">1</property>
+                                            <object class="wxCheckListBox" expanded="0">
+                                                <property name="BottomDockable">1</property>
+                                                <property name="LeftDockable">1</property>
+                                                <property name="RightDockable">1</property>
+                                                <property name="TopDockable">1</property>
+                                                <property name="aui_layer"></property>
+                                                <property name="aui_name"></property>
+                                                <property name="aui_position"></property>
+                                                <property name="aui_row"></property>
+                                                <property name="best_size"></property>
+                                                <property name="bg"></property>
+                                                <property name="caption"></property>
+                                                <property name="caption_visible">1</property>
+                                                <property name="center_pane">0</property>
+                                                <property name="choices"></property>
+                                                <property name="close_button">1</property>
+                                                <property name="context_help"></property>
+                                                <property name="context_menu">1</property>
+                                                <property name="default_pane">0</property>
+                                                <property name="dock">Dock</property>
+                                                <property name="dock_fixed">0</property>
+                                                <property name="docking">Left</property>
+                                                <property name="enabled">1</property>
+                                                <property name="fg"></property>
+                                                <property name="floatable">1</property>
+                                                <property name="font"></property>
+                                                <property name="gripper">0</property>
+                                                <property name="hidden">0</property>
+                                                <property name="id">wxID_ANY</property>
+                                                <property name="max_size"></property>
+                                                <property name="maximize_button">0</property>
+                                                <property name="maximum_size"></property>
+                                                <property name="min_size"></property>
+                                                <property name="minimize_button">0</property>
+                                                <property name="minimum_size"></property>
+                                                <property name="moveable">1</property>
+                                                <property name="name">m_pCheckListVistas</property>
+                                                <property name="pane_border">1</property>
+                                                <property name="pane_position"></property>
+                                                <property name="pane_size"></property>
+                                                <property name="permission">protected</property>
+                                                <property name="pin_button">1</property>
+                                                <property name="pos"></property>
+                                                <property name="resize">Resizable</property>
+                                                <property name="show">1</property>
+                                                <property name="size"></property>
+                                                <property name="style">wxLB_MULTIPLE</property>
+                                                <property name="subclass"></property>
+                                                <property name="toolbar_pane">0</property>
+                                                <property name="tooltip"></property>
+                                                <property name="validator_data_type"></property>
+                                                <property name="validator_style">wxFILTER_NONE</property>
+                                                <property name="validator_type">wxDefaultValidator</property>
+                                                <property name="validator_variable"></property>
+                                                <property name="window_extra_style"></property>
+                                                <property name="window_name"></property>
+                                                <property name="window_style"></property>
+                                                <event name="OnChar"></event>
+                                                <event name="OnCheckListBox"></event>
+                                                <event name="OnCheckListBoxDClick"></event>
+                                                <event name="OnCheckListBoxToggled"></event>
+                                                <event name="OnEnterWindow"></event>
+                                                <event name="OnEraseBackground"></event>
+                                                <event name="OnKeyDown"></event>
+                                                <event name="OnKeyUp"></event>
+                                                <event name="OnKillFocus"></event>
+                                                <event name="OnLeaveWindow"></event>
+                                                <event name="OnLeftDClick"></event>
+                                                <event name="OnLeftDown"></event>
+                                                <event name="OnLeftUp"></event>
+                                                <event name="OnMiddleDClick"></event>
+                                                <event name="OnMiddleDown"></event>
+                                                <event name="OnMiddleUp"></event>
+                                                <event name="OnMotion"></event>
+                                                <event name="OnMouseEvents"></event>
+                                                <event name="OnMouseWheel"></event>
+                                                <event name="OnPaint"></event>
+                                                <event name="OnRightDClick"></event>
+                                                <event name="OnRightDown"></event>
+                                                <event name="OnRightUp"></event>
+                                                <event name="OnSetFocus"></event>
+                                                <event name="OnSize"></event>
+                                                <event name="OnUpdateUI"></event>
+                                            </object>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">5</property>
+                    <property name="flag">wxEXPAND</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pFooter</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass">FooterPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer10</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_RIGHT|wxRIGHT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_OK</property>
+                                    <property name="label">Accept</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button2</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnAceptarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxALIGN_RIGHT|wxLEFT</property>
+                                <property name="proportion">0</property>
+                                <object class="wxButton" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default">0</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_CANCEL</property>
+                                    <property name="label">Cancel</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_button3</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnButtonClick">OnCancelarClick</event>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+        <object class="Panel" expanded="0">
+            <property name="aui_managed">0</property>
+            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
+            <property name="bg">64,64,64</property>
+            <property name="context_help"></property>
+            <property name="context_menu">1</property>
+            <property name="enabled">1</property>
+            <property name="event_handler">impl_virtual</property>
+            <property name="fg"></property>
+            <property name="font"></property>
+            <property name="hidden">1</property>
+            <property name="id">wxID_ANY</property>
+            <property name="maximum_size"></property>
+            <property name="minimum_size">-1,-1</property>
+            <property name="name">GWaveformViewBase</property>
+            <property name="pos"></property>
+            <property name="size">-1,-1</property>
+            <property name="subclass"></property>
+            <property name="tooltip"></property>
+            <property name="window_extra_style"></property>
+            <property name="window_name"></property>
+            <property name="window_style">wxTAB_TRAVERSAL</property>
+            <event name="OnAuiFindManager"></event>
+            <event name="OnAuiPaneButton"></event>
+            <event name="OnAuiPaneClose"></event>
+            <event name="OnAuiPaneMaximize"></event>
+            <event name="OnAuiPaneRestore"></event>
+            <event name="OnAuiRender"></event>
+            <event name="OnChar"></event>
+            <event name="OnEnterWindow"></event>
+            <event name="OnEraseBackground"></event>
+            <event name="OnInitDialog"></event>
+            <event name="OnKeyDown"></event>
+            <event name="OnKeyUp"></event>
+            <event name="OnKillFocus"></event>
+            <event name="OnLeaveWindow"></event>
+            <event name="OnLeftDClick"></event>
+            <event name="OnLeftDown"></event>
+            <event name="OnLeftUp"></event>
+            <event name="OnMiddleDClick"></event>
+            <event name="OnMiddleDown"></event>
+            <event name="OnMiddleUp"></event>
+            <event name="OnMotion"></event>
+            <event name="OnMouseEvents"></event>
+            <event name="OnMouseWheel"></event>
+            <event name="OnPaint">OnPaint</event>
+            <event name="OnRightDClick"></event>
+            <event name="OnRightDown"></event>
+            <event name="OnRightUp"></event>
+            <event name="OnSetFocus"></event>
+            <event name="OnSize"></event>
+            <event name="OnUpdateUI"></event>
+            <object class="wxBoxSizer" expanded="0">
+                <property name="minimum_size"></property>
+                <property name="name">bSizer7</property>
+                <property name="orient">wxVERTICAL</property>
+                <property name="permission">none</property>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">2</property>
+                    <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxBoxSizer" expanded="0">
+                        <property name="minimum_size"></property>
+                        <property name="name">m_pSizerTools</property>
+                        <property name="orient">wxHORIZONTAL</property>
+                        <property name="permission">protected</property>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">2</property>
+                    <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">1</property>
+                    <object class="wxSplitterWindow" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg"></property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_pane_size">100</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pSplitterPanel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="sashgravity">0.8</property>
+                        <property name="sashpos">149</property>
+                        <property name="sashsize">-1</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="splitmode">wxSPLIT_HORIZONTAL</property>
+                        <property name="style">wxSP_3D</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style"></property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnSplitterDClick"></event>
+                        <event name="OnSplitterSashPosChanged"></event>
+                        <event name="OnSplitterSashPosChanging"></event>
+                        <event name="OnSplitterUnsplit"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="splitteritem" expanded="0">
+                            <object class="wxPanel" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">0</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pPanelView</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass">; wx/ginkgostyle/ginkgostyle.h</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip"></property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer15</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND</property>
+                                        <property name="proportion">1</property>
+                                        <object class="CustomControl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="class">vtkSmartPointer<wxVTKRenderWindowInteractor></property>
+                                            <property name="close_button">1</property>
+                                            <property name="construction">ViewInteractor2D = new wxVTKRenderWindowInteractor (m_pPanelView, wxID_ANY,&#x0A;                                                          wxDefaultPosition,&#x0A;                                                          wxDefaultSize,&#x0A;                                                          wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,&#x0A;                                                          wxT("& [...]
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="declaration">vtkSmartPointer<wxVTKRenderWindowInteractor> ViewInteractor2D;&#x0A;vtkSmartPointer<vtkGinkgoImageViewer> ViewImage2D;</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="include">#undef __DEPRECATED&#x0A;#include <vtkRenderer.h>&#x0A;#include <vtkSmartPointer.h>&#x0A;#include <wxVTKRenderWindowInteractor.h>&#x0A;#include <vtk/vtkginkgoimageviewer.h></property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">ViewInteractor2D</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">public</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="settings"></property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style">wxCLIP_CHILDREN</property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                        <object class="splitteritem" expanded="0">
+                            <object class="wxPanel" expanded="0">
+                                <property name="BottomDockable">1</property>
+                                <property name="LeftDockable">1</property>
+                                <property name="RightDockable">1</property>
+                                <property name="TopDockable">1</property>
+                                <property name="aui_layer"></property>
+                                <property name="aui_name"></property>
+                                <property name="aui_position"></property>
+                                <property name="aui_row"></property>
+                                <property name="best_size"></property>
+                                <property name="bg"></property>
+                                <property name="caption"></property>
+                                <property name="caption_visible">1</property>
+                                <property name="center_pane">0</property>
+                                <property name="close_button">1</property>
+                                <property name="context_help"></property>
+                                <property name="context_menu">1</property>
+                                <property name="default_pane">0</property>
+                                <property name="dock">Dock</property>
+                                <property name="dock_fixed">0</property>
+                                <property name="docking">Left</property>
+                                <property name="enabled">1</property>
+                                <property name="fg"></property>
+                                <property name="floatable">1</property>
+                                <property name="font"></property>
+                                <property name="gripper">0</property>
+                                <property name="hidden">1</property>
+                                <property name="id">wxID_ANY</property>
+                                <property name="max_size"></property>
+                                <property name="maximize_button">0</property>
+                                <property name="maximum_size"></property>
+                                <property name="min_size"></property>
+                                <property name="minimize_button">0</property>
+                                <property name="minimum_size"></property>
+                                <property name="moveable">1</property>
+                                <property name="name">m_pPanelMetadata</property>
+                                <property name="pane_border">1</property>
+                                <property name="pane_position"></property>
+                                <property name="pane_size"></property>
+                                <property name="permission">protected</property>
+                                <property name="pin_button">1</property>
+                                <property name="pos"></property>
+                                <property name="resize">Resizable</property>
+                                <property name="show">1</property>
+                                <property name="size"></property>
+                                <property name="subclass">SubTitledPanel; wx/ginkgostyle/ginkgostyle.h</property>
+                                <property name="toolbar_pane">0</property>
+                                <property name="tooltip">Metadata</property>
+                                <property name="window_extra_style"></property>
+                                <property name="window_name"></property>
+                                <property name="window_style">wxTAB_TRAVERSAL</property>
+                                <event name="OnChar"></event>
+                                <event name="OnEnterWindow"></event>
+                                <event name="OnEraseBackground"></event>
+                                <event name="OnKeyDown"></event>
+                                <event name="OnKeyUp"></event>
+                                <event name="OnKillFocus"></event>
+                                <event name="OnLeaveWindow"></event>
+                                <event name="OnLeftDClick"></event>
+                                <event name="OnLeftDown"></event>
+                                <event name="OnLeftUp"></event>
+                                <event name="OnMiddleDClick"></event>
+                                <event name="OnMiddleDown"></event>
+                                <event name="OnMiddleUp"></event>
+                                <event name="OnMotion"></event>
+                                <event name="OnMouseEvents"></event>
+                                <event name="OnMouseWheel"></event>
+                                <event name="OnPaint"></event>
+                                <event name="OnRightDClick"></event>
+                                <event name="OnRightDown"></event>
+                                <event name="OnRightUp"></event>
+                                <event name="OnSetFocus"></event>
+                                <event name="OnSize"></event>
+                                <event name="OnUpdateUI"></event>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer14</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxRIGHT</property>
+                                        <property name="proportion">1</property>
+                                        <object class="wxTextCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="maxlength">0</property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pTextMeasurements</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style">wxTE_MULTILINE|wxTE_READONLY</property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnText"></event>
+                                            <event name="OnTextEnter"></event>
+                                            <event name="OnTextMaxLen"></event>
+                                            <event name="OnTextURL"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                    <object class="sizeritem" expanded="0">
+                                        <property name="border">5</property>
+                                        <property name="flag">wxEXPAND|wxLEFT</property>
+                                        <property name="proportion">2</property>
+                                        <object class="wxTextCtrl" expanded="0">
+                                            <property name="BottomDockable">1</property>
+                                            <property name="LeftDockable">1</property>
+                                            <property name="RightDockable">1</property>
+                                            <property name="TopDockable">1</property>
+                                            <property name="aui_layer"></property>
+                                            <property name="aui_name"></property>
+                                            <property name="aui_position"></property>
+                                            <property name="aui_row"></property>
+                                            <property name="best_size"></property>
+                                            <property name="bg"></property>
+                                            <property name="caption"></property>
+                                            <property name="caption_visible">1</property>
+                                            <property name="center_pane">0</property>
+                                            <property name="close_button">1</property>
+                                            <property name="context_help"></property>
+                                            <property name="context_menu">1</property>
+                                            <property name="default_pane">0</property>
+                                            <property name="dock">Dock</property>
+                                            <property name="dock_fixed">0</property>
+                                            <property name="docking">Left</property>
+                                            <property name="enabled">1</property>
+                                            <property name="fg"></property>
+                                            <property name="floatable">1</property>
+                                            <property name="font"></property>
+                                            <property name="gripper">0</property>
+                                            <property name="hidden">0</property>
+                                            <property name="id">wxID_ANY</property>
+                                            <property name="max_size"></property>
+                                            <property name="maximize_button">0</property>
+                                            <property name="maximum_size"></property>
+                                            <property name="maxlength">0</property>
+                                            <property name="min_size"></property>
+                                            <property name="minimize_button">0</property>
+                                            <property name="minimum_size"></property>
+                                            <property name="moveable">1</property>
+                                            <property name="name">m_pTextDiagnosis</property>
+                                            <property name="pane_border">1</property>
+                                            <property name="pane_position"></property>
+                                            <property name="pane_size"></property>
+                                            <property name="permission">protected</property>
+                                            <property name="pin_button">1</property>
+                                            <property name="pos"></property>
+                                            <property name="resize">Resizable</property>
+                                            <property name="show">1</property>
+                                            <property name="size"></property>
+                                            <property name="style">wxTE_MULTILINE|wxTE_READONLY</property>
+                                            <property name="subclass"></property>
+                                            <property name="toolbar_pane">0</property>
+                                            <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value"></property>
+                                            <property name="window_extra_style"></property>
+                                            <property name="window_name"></property>
+                                            <property name="window_style"></property>
+                                            <event name="OnChar"></event>
+                                            <event name="OnEnterWindow"></event>
+                                            <event name="OnEraseBackground"></event>
+                                            <event name="OnKeyDown"></event>
+                                            <event name="OnKeyUp"></event>
+                                            <event name="OnKillFocus"></event>
+                                            <event name="OnLeaveWindow"></event>
+                                            <event name="OnLeftDClick"></event>
+                                            <event name="OnLeftDown"></event>
+                                            <event name="OnLeftUp"></event>
+                                            <event name="OnMiddleDClick"></event>
+                                            <event name="OnMiddleDown"></event>
+                                            <event name="OnMiddleUp"></event>
+                                            <event name="OnMotion"></event>
+                                            <event name="OnMouseEvents"></event>
+                                            <event name="OnMouseWheel"></event>
+                                            <event name="OnPaint"></event>
+                                            <event name="OnRightDClick"></event>
+                                            <event name="OnRightDown"></event>
+                                            <event name="OnRightUp"></event>
+                                            <event name="OnSetFocus"></event>
+                                            <event name="OnSize"></event>
+                                            <event name="OnText"></event>
+                                            <event name="OnTextEnter"></event>
+                                            <event name="OnTextMaxLen"></event>
+                                            <event name="OnTextURL"></event>
+                                            <event name="OnUpdateUI"></event>
+                                        </object>
+                                    </object>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">2</property>
+                    <property name="flag">wxEXPAND|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg">30,30,30</property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size">-1,1</property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size">-1,1</property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_panel7</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size">-1,1</property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                    </object>
+                </object>
+                <object class="sizeritem" expanded="0">
+                    <property name="border">2</property>
+                    <property name="flag">wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT</property>
+                    <property name="proportion">0</property>
+                    <object class="wxPanel" expanded="0">
+                        <property name="BottomDockable">1</property>
+                        <property name="LeftDockable">1</property>
+                        <property name="RightDockable">1</property>
+                        <property name="TopDockable">1</property>
+                        <property name="aui_layer"></property>
+                        <property name="aui_name"></property>
+                        <property name="aui_position"></property>
+                        <property name="aui_row"></property>
+                        <property name="best_size"></property>
+                        <property name="bg">64,64,64</property>
+                        <property name="caption"></property>
+                        <property name="caption_visible">1</property>
+                        <property name="center_pane">0</property>
+                        <property name="close_button">1</property>
+                        <property name="context_help"></property>
+                        <property name="context_menu">1</property>
+                        <property name="default_pane">0</property>
+                        <property name="dock">Dock</property>
+                        <property name="dock_fixed">0</property>
+                        <property name="docking">Left</property>
+                        <property name="enabled">1</property>
+                        <property name="fg"></property>
+                        <property name="floatable">1</property>
+                        <property name="font"></property>
+                        <property name="gripper">0</property>
+                        <property name="hidden">0</property>
+                        <property name="id">wxID_ANY</property>
+                        <property name="max_size"></property>
+                        <property name="maximize_button">0</property>
+                        <property name="maximum_size"></property>
+                        <property name="min_size"></property>
+                        <property name="minimize_button">0</property>
+                        <property name="minimum_size"></property>
+                        <property name="moveable">1</property>
+                        <property name="name">m_pManipulationPanel</property>
+                        <property name="pane_border">1</property>
+                        <property name="pane_position"></property>
+                        <property name="pane_size"></property>
+                        <property name="permission">protected</property>
+                        <property name="pin_button">1</property>
+                        <property name="pos"></property>
+                        <property name="resize">Resizable</property>
+                        <property name="show">1</property>
+                        <property name="size"></property>
+                        <property name="subclass"></property>
+                        <property name="toolbar_pane">0</property>
+                        <property name="tooltip"></property>
+                        <property name="window_extra_style"></property>
+                        <property name="window_name"></property>
+                        <property name="window_style">wxTAB_TRAVERSAL</property>
+                        <event name="OnChar"></event>
+                        <event name="OnEnterWindow"></event>
+                        <event name="OnEraseBackground"></event>
+                        <event name="OnKeyDown"></event>
+                        <event name="OnKeyUp"></event>
+                        <event name="OnKillFocus"></event>
+                        <event name="OnLeaveWindow"></event>
+                        <event name="OnLeftDClick"></event>
+                        <event name="OnLeftDown"></event>
+                        <event name="OnLeftUp"></event>
+                        <event name="OnMiddleDClick"></event>
+                        <event name="OnMiddleDown"></event>
+                        <event name="OnMiddleUp"></event>
+                        <event name="OnMotion"></event>
+                        <event name="OnMouseEvents"></event>
+                        <event name="OnMouseWheel"></event>
+                        <event name="OnPaint"></event>
+                        <event name="OnRightDClick"></event>
+                        <event name="OnRightDown"></event>
+                        <event name="OnRightUp"></event>
+                        <event name="OnSetFocus"></event>
+                        <event name="OnSize"></event>
+                        <event name="OnUpdateUI"></event>
+                        <object class="wxBoxSizer" expanded="0">
+                            <property name="minimum_size"></property>
+                            <property name="name">bSizer8</property>
+                            <property name="orient">wxHORIZONTAL</property>
+                            <property name="permission">none</property>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">2</property>
+                                <property name="flag">wxALIGN_CENTER_VERTICAL</property>
+                                <property name="proportion">0</property>
+                                <object class="wxComboBox" expanded="0">
+                                    <property name="BottomDockable">1</property>
+                                    <property name="LeftDockable">1</property>
+                                    <property name="RightDockable">1</property>
+                                    <property name="TopDockable">1</property>
+                                    <property name="aui_layer"></property>
+                                    <property name="aui_name"></property>
+                                    <property name="aui_position"></property>
+                                    <property name="aui_row"></property>
+                                    <property name="best_size"></property>
+                                    <property name="bg"></property>
+                                    <property name="caption"></property>
+                                    <property name="caption_visible">1</property>
+                                    <property name="center_pane">0</property>
+                                    <property name="choices"></property>
+                                    <property name="close_button">1</property>
+                                    <property name="context_help"></property>
+                                    <property name="context_menu">1</property>
+                                    <property name="default_pane">0</property>
+                                    <property name="dock">Dock</property>
+                                    <property name="dock_fixed">0</property>
+                                    <property name="docking">Left</property>
+                                    <property name="enabled">1</property>
+                                    <property name="fg"></property>
+                                    <property name="floatable">1</property>
+                                    <property name="font"></property>
+                                    <property name="gripper">0</property>
+                                    <property name="hidden">0</property>
+                                    <property name="id">wxID_ANY</property>
+                                    <property name="max_size"></property>
+                                    <property name="maximize_button">0</property>
+                                    <property name="maximum_size"></property>
+                                    <property name="min_size"></property>
+                                    <property name="minimize_button">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="moveable">1</property>
+                                    <property name="name">m_pComboGroups</property>
+                                    <property name="pane_border">1</property>
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="selection">-1</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style">wxCB_DROPDOWN|wxCB_READONLY</property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="validator_data_type"></property>
+                                    <property name="validator_style">wxFILTER_NONE</property>
+                                    <property name="validator_type">wxDefaultValidator</property>
+                                    <property name="validator_variable"></property>
+                                    <property name="value"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnCombobox">OnComboGroup</event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnText"></event>
+                                    <event name="OnTextEnter"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">0</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="0">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">m_pSizerRight</property>
+                                    <property name="orient">wxHORIZONTAL</property>
+                                    <property name="permission">protected</property>
+                                </object>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+        </object>
+    </object>
+</wxFormBuilder_Project>
diff --git a/visualizator/visualizator/wxvtk/gvistacompleja.cpp b/visualizator/visualizator/wxvtk/gvistacompleja.cpp
new file mode 100644
index 0000000..7f01bb3
--- /dev/null
+++ b/visualizator/visualizator/wxvtk/gvistacompleja.cpp
@@ -0,0 +1,1306 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <list>
+#include <wx/wx.h>
+#include <wx/msgdlg.h>
+#include <wx/menu.h>
+#include <wx/dnd.h>
+
+#include "gvistacompleja.h"
+#include "gvistasimple.h"
+#include "../vistas/vista2d.h"
+#include <api/internationalization/internationalization.h>
+#include <visualizator/estudios/overlay.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <resources/visualizatorresourcesmanager.h>
+#include <api/dicom/idicommanager.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/iannotator.h>
+
+#include <api/autoptr.h>
+#include <export/contracts/ipixelsbluringcontract.h>
+
+#include "../eventos/visualizatorevents.h"
+#include <api/controllers/icontroladorlog.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/dicom/dcmdictionary.h>
+#include <eventos/modificacionimagen.h>
+#include <eventos/modificacionfichero.h>
+#include <eventos/modificacionwidget.h>
+#include <eventos/mensajes.h>
+#include <eventos/render.h>
+#include <api/iwidgetsmanager.h>
+#include "../estudios/visualizatorstudy.h"
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtkVISUManagement/vtkLookupTableManager.h>
+#include <vtk/widgets/widgetsactor.h>
+#include <vtkCamera.h>
+#include <vtkPointData.h>
+#include <vtkImageMathematics.h>
+#include <api/westilo.h>
+
+#include <api/imodelointegracion.h>
+#include <api/controllers/imodulecontroller.h>
+#include <api/controllers/icontroladorpermisos.h>
+#include <main/controllers/commandcontroller.h>
+#include <main/controllers/hangingprotocolcontroller.h>
+
+#include <main/entorno.h>
+
+#include <commands/comandodestruirvista.h>
+
+#include <cairo/cairo.h>
+#include <widgets/openglhelper.h>
+#include <widgets/wanotacionesquina.h>
+
+
+#include <export/tools/iherramientascore.h>
+#include <visualizator/export/tools/ivisualizatortools.h>
+#include <api/toolsystem/itoolcontroller.h>
+#include <api/toolsystem/itool.h>
+#include <visualizator/wxvtk/previewpanelvisualizator.h>
+
+#include <wx/wxginkgotoolbar.h>
+
+#define ID_BOTON_VER 1
+#define ID_BOTON_LAYOUT 2
+#define ID_BOTON_SINCRONIZAR 3
+#define ID_BOTON_DESENCAJAR 4
+
+//esta clase sirve para las barras de herramientas de abajo
+class BarraHerramientasBotones : public wxGinkgoToolBar
+{
+public:
+        BarraHerramientasBotones(wxWindow* pParent, const wxColor& color = wxColor(0x40, 0x40, 0x40)): wxGinkgoToolBar(pParent,wxID_ANY, wxDefaultPosition, wxDefaultSize, wxAUI_TB_DEFAULT_STYLE)
+        {
+                SetToolBitmapSize(wxSize(16,16));
+                wxGinkgoToolBarArt* pToolArt= new wxGinkgoToolBarArt();
+                pToolArt->SetCustomBaseColor(color);
+                SetArtProvider(pToolArt);
+        }
+
+        ~BarraHerramientasBotones()
+        {
+        }
+};
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+
+class GVistaComplejaOverlaysDelegate: public GNKVisualizator::IOverlaysContract
+{
+public:
+        GVistaComplejaOverlaysDelegate(GVistaCompleja* gView):GView(gView)
+        {
+        }
+        ~GVistaComplejaOverlaysDelegate()
+        {
+        }
+
+protected:
+        GVistaCompleja* GView;
+};
+
+
+class GVistaComplejaWindowLayoutDelegate: public GNC::GCS::IWindowLayoutContract
+{
+public:
+        GVistaComplejaWindowLayoutDelegate(GVistaCompleja* gView):GView(gView)
+        {
+        }
+        ~GVistaComplejaWindowLayoutDelegate()
+        {
+        }
+
+        //contrato layout
+        virtual void SetWindowLayout(int filas, int columnas)
+        {
+                if(filas <1 || columnas < 1) {
+                        //layout invalido
+                        return;
+                }
+                bool incrementado = false;
+
+                const int maxSlices = m_MaxSlice - m_MinSlice +1;
+                if(filas*columnas > maxSlices) {
+                        //layout invalido aunque podría ser valido...
+                        filas = (int)std::ceil((double)maxSlices/columnas);
+                }
+
+                int filasActuales = GView->m_pSizerSeries->GetRows();
+                int columnasActuales = GView->m_pSizerSeries->GetCols();
+                int tamAnterior = GView->m_VistasSimples.size();
+                int nuevoTam = filas*columnas;
+
+                GView->m_pSizerSeries->SetCols(columnas);
+                GView->m_pSizerSeries->SetRows(filas);
+
+
+                //FUNDAMENTAL PARA QUE los viewers se destruyan correctamente y sin leaks ya que Viewer es smart pointer
+                GView->IVista->VisualizatorStudy->Viewer = NULL;
+                if(tamAnterior > nuevoTam) {
+                        //hay que borrar
+                        for(int i = nuevoTam; i< tamAnterior; i++) {
+                                auto pVista = GView->m_VistasSimples[i];
+                                GView->m_pManager->LiberarRecursos(pVista->ViewInteractor2D);
+                                GView->m_pSizerSeries->Detach(pVista);
+                                pVista->Destroy();
+                        }
+                        GView->m_VistasSimples.resize(nuevoTam);
+                } else {
+                        int interpolationMode = VTK_NEAREST_INTERPOLATION;
+                        for (unsigned int i = 0; i < GView->m_VistasSimples.size(); ++i) {
+                                if (i == 0) {
+                                        interpolationMode = GView->m_VistasSimples[i]->ViewImage2D->GetInterpolationMode();
+                                }
+                                GView->m_VistasSimples[i]->ViewImage2D->ResetZoom(false, 0);
+                        }
+
+                        //hay que crear
+                        for(unsigned int i = 0; i< (unsigned int) (nuevoTam - tamAnterior) && GView->m_VistasSimples.size() < (unsigned int) maxSlices; i++) {
+                                incrementado = true;
+                                GView->AddVistaSimple();
+                        }
+                        for (unsigned int i = 1; i < GView->m_VistasSimples.size(); ++i) {
+                                GView->m_VistasSimples[i]->ViewImage2D->SetInterpolationMode(interpolationMode);
+                        }
+                        //por si la posicion actual es invalida
+                        GView->m_posicion = 0;
+                }
+                //FUNDAMENTAL PARA QUE FUNCIONE LA HERRAMIENTA DE MAPAS DE COLOR
+                GView->IVista->VisualizatorStudy->Viewer = GView->m_VistasSimples[0]->ViewImage2D;
+                GView->ActualizarMaxMinSlider();
+                GView->Layout();
+                //nos quedamos en la posicion
+                GView->GoToSlice(GView->m_posicion,false,false,false);
+                if ( (filas > 1 || columnas > 1) && incrementado) { // condición para evitar doble render. Ya se comprueba por otro lado en la creación (con 1 vista).
+                        bool noerror = true;
+                        for(GVistaCompleja::TListaGVistasSimples::iterator it = GView->m_VistasSimples.begin(); noerror && it !=GView-> m_VistasSimples.end(); ++it) {
+                                GVistaSimple* vs = *it;
+                                vs->ViewInteractor2D->Render();
+                                long idTextura = vs->ViewImage2D->GetImageTexture();
+                                if (idTextura == 0 || !glIsTexture(idTextura)) {
+                                        noerror = false;
+                                }
+                        }
+                        if (!noerror) {
+                                SetWindowLayout(filasActuales, columnasActuales);
+                                wxMessageBox(_("It has exhausted the system's video memory and has not been able to assign the grid configuration. Close some studies to free memory."), _("Error configuring the grid"), wxOK, NULL);
+                                return;
+                        }
+                }
+        }
+
+        virtual int GetRows()
+        {
+                return GView->m_pSizerSeries->GetRows();
+        }
+
+        virtual int GetColumns()
+        {
+                return GView->m_pSizerSeries->GetCols();
+        }
+
+protected:
+        GVistaCompleja* GView;
+};
+
+class GVistaComplejaDelegate: public GNC::GCS::ISliderContract,  public GNC::GCS::IWindowLevelContract, public GNC::GCS::IRuleContract
+{
+public:
+        GVistaComplejaDelegate(GVistaCompleja* gView):GView(gView)
+        {
+        }
+        ~GVistaComplejaDelegate()
+        {
+        }
+
+        //contrato widgets
+
+        GNC::GCS::IWidgetsManager* GetManager()
+        {
+                return GView->m_pManager;
+        }
+
+        void GetAllViewers(std::list<vtkGinkgoImageViewer*>& viewerList)
+        {
+                for (GVistaCompleja::TListaGVistasSimples::iterator it = GView->m_VistasSimples.begin(); it != GView->m_VistasSimples.end(); ++it) {
+                        viewerList.push_back((*it)->ViewImage2D);
+                }
+        }
+        //
+
+        void SetSlice(int slicenum)
+        {
+                int tsize = GView->IVista->VisualizatorStudy->GetTSizeActive();
+
+                if (tsize == 1) {
+                        GView->GoToSlice(slicenum, false);
+                } else {
+                        //bool ok = true;
+                        for(GVistaCompleja::TListaGVistasSimples::iterator it = GView->m_VistasSimples.begin(); it != GView-> m_VistasSimples.end(); ++it) {
+                                GVistaSimple* vs = *it;
+                                vs->GoToTSlice(slicenum, false);
+                        }
+                }
+        }
+
+        int GetSlice() const
+        {
+                int tsize = GView->IVista->VisualizatorStudy->GetTSizeActive();
+
+                if (tsize == 1) {
+                        return GView->m_pSliderSlice->GetValue();
+                } else {
+                        GVistaCompleja::TListaGVistasSimples::iterator it = GView->m_VistasSimples.begin();
+                        if (it != GView-> m_VistasSimples.end()) {
+                                GVistaSimple* vs = *it;
+                                return vs->ViewImage2D->GetTindex();
+                        } else {
+                                return 0;
+                        }
+                }
+        }
+
+        int GetNumberOfSlices() const
+        {
+                int tsize = GView->IVista->VisualizatorStudy->GetTSizeActive();
+
+                if (tsize == 1) {
+                        return GView->IVista->VisualizatorStudy->GetSliceNumber();
+                } else {
+                        return tsize;
+                }
+        }
+
+        virtual ListaWindowLevels& GetWindowLevelList()
+        {
+                return m_listaWindowLevels;
+        }
+        virtual std::string GetLabelCurrent()
+        {
+                return m_labelCurrent;
+        }
+        virtual void SetLabelCurrent(const std::string& labelCurrent)
+        {
+                m_labelCurrent = labelCurrent;
+        }
+
+        virtual bool SupportsCallibration()
+        {
+                return true;
+        }
+
+        virtual void DoAutoCalculateWindowLevel()
+        {
+                for(GVistaCompleja::TListaGVistasSimples::iterator it = GView->m_VistasSimples.begin(); it != GView->m_VistasSimples.end(); ++it) {
+                        (*it)->ViewImage2D->SetAutoDefaultWindowLevel();
+                        (*it)->ViewImage2D->ResetToDefaultWindowLevel();
+                        SetUserDefinedWindowLevel((*it)->ViewImage2D->GetWindow(), (*it)->ViewImage2D->GetLevel());
+                }
+        }
+
+        virtual void DoResetWindowLevel()
+        {
+                if (HasDefaultWindowLevel()) {
+                        GNC::GCS::IWindowLevelContract::WindowLevel defWl = GetAndSetDefaultWindowLevel();
+                        for(GVistaCompleja::TListaGVistasSimples::iterator it = GView->m_VistasSimples.begin(); it != GView->m_VistasSimples.end(); ++it) {
+                                (*it)->ViewImage2D->SetDefaultWindowLevel(defWl.m_window, defWl.m_level);
+                                (*it)->ViewImage2D->ResetToDefaultWindowLevel();
+                        }
+                } else {
+                        DoAutoCalculateWindowLevel();
+                }
+        }
+
+        virtual void DoSetWindowLevel(double window, double level)
+        {
+                for(GVistaCompleja::TListaGVistasSimples::iterator it = GView->m_VistasSimples.begin(); it != GView->m_VistasSimples.end(); ++it) {
+                        (*it)->ViewImage2D->SetWindow(window);
+                        (*it)->ViewImage2D->SetLevel(level);
+                }
+        }
+
+protected:
+        GVistaCompleja* GView;
+        ListaWindowLevels m_listaWindowLevels;
+        std::string m_labelCurrent;
+};
+
+class GVistaComplejaPixelsBluringDelegate: public GNC::GCS::IPixelsBluringContract
+{
+public:
+        GVistaComplejaPixelsBluringDelegate(GVistaCompleja* gView):GView(gView)
+        {
+        }
+
+        ~GVistaComplejaPixelsBluringDelegate()
+        {
+        }
+        virtual GNC::GCS::IWidgetsManager* GetManager()
+        {
+                return GView->m_pManager;
+        }
+        virtual void GetAllViewers(std::list<vtkGinkgoImageViewer*>& viewerList)
+        {
+                return GView->Delegate->GetAllViewers(viewerList);
+        }
+
+        GVistaCompleja* GView;
+};
+
+class GVistaComplejaAnnotatorDelegate: public GNC::GCS::IAnnotator
+{
+public:
+        GVistaComplejaAnnotatorDelegate(GVistaCompleja* gView, GNKVisualizator::Vista2D* pView) : GNC::GCS::IAnnotator(pView),
+                GView(gView)
+        {
+        }
+        ~GVistaComplejaAnnotatorDelegate()
+        {
+        }
+
+
+        virtual std::string GetAnnotationValue(GNC::GCS::Contexto3D* c, const std::string& key)
+        {
+                if (key == "${SLICE.IDX}") {
+                        if (c->GetRenderer() != NULL && c->GetRenderer()->m_pImageViewer != NULL) {
+                                std::ostringstream ostr;
+                                ostr << c->GetRenderer()->m_pImageViewer->GetTindex() + 1;
+                                return ostr.str();
+                        }
+                } else if (key == "${SLICE.IDX.FULLTEXT}") {
+                        if (c->GetRenderer() != NULL && c->GetRenderer()->m_pImageViewer != NULL && m_pView != NULL && m_pView->GetEstudio().IsValid()) {
+                                int dims[3] = {0, 0, 0};
+                                c->GetRenderer()->m_pImageViewer->GetDimensions(dims);
+                                std::ostringstream ostr;
+                                if (c->offscreenCreado) {
+                                        ostr << _Std("Slice: ") <<  c->OVID + 1;
+                                        if (dims[2] > 1) {
+                                                ostr << " T: 0";
+                                        }
+
+                                } else {
+                                        ostr << _Std("Slice: ") <<  c->GetRenderer()->GetVID() + 1;
+                                        if (dims[2] > 1) {
+                                                ostr << " T: " << c->GetRenderer()->m_pImageViewer->GetTindex();
+                                        }
+                                }
+                                return ostr.str();
+                        }
+                }
+                return GNC::GCS::IAnnotator::GetAnnotationValue(c, key);
+        }
+
+protected:
+        GVistaCompleja* GView;
+};
+
+//contracts dellegate
+
+/////////////////////////////////////DRAG&DROP/////////////////////////////////////////
+namespace GNKVisualizator
+{
+namespace GUI
+{
+class wxDropTargetPreviewPanelVisualizator: public wxDropTarget
+{
+public:
+        wxDropTargetPreviewPanelVisualizator(GVistaCompleja* gView): GView(gView)
+        {
+                SetDataObject(new GNKVisualizator::GUI::wxDnDPreviewPanelVisualizator);
+                SetDefaultAction(wxDragCopy);
+        }
+
+        ~wxDropTargetPreviewPanelVisualizator()
+        {
+        }
+
+        virtual wxDragResult OnDragOver(wxCoord x, wxCoord y, wxDragResult /*def*/)
+        {
+                wxPoint coords(x, y);
+                coords = GView->ClientToScreen(coords);
+                wxPoint clientPreview = GView->m_pPanelPreview->ScreenToClient(coords);
+                wxPoint client = GView->ScreenToClient(coords);
+                if (GView->m_pPanelPreview->HitTest(clientPreview) != wxHT_WINDOW_INSIDE && GView->HitTest(client) == wxHT_WINDOW_INSIDE) {
+                        return wxDragCopy;
+                }
+
+                return wxDragNone;
+        }
+
+        virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult /*def*/)
+        {
+                if ( !GetData() )
+                        return wxDragNone;
+                GNKVisualizator::GUI::wxDnDPreviewPanelVisualizator *dobj = (GNKVisualizator::GUI::wxDnDPreviewPanelVisualizator *)m_dataObject;
+
+                wxPoint coords(x, y);
+                coords = GView->ClientToScreen(coords);
+
+                wxPoint client = GView->ScreenToClient(coords);
+                wxPoint clientPreview = GView->m_pPanelPreview->ScreenToClient(coords);
+                if (GView->m_pPanelPreview->HitTest(clientPreview) != wxHT_WINDOW_INSIDE && GView->HitTest(client) == wxHT_WINDOW_INSIDE) {
+                        GView->LoadSeries(dobj->GetSeriesPk());
+                        return wxDragCopy;
+                }
+                return wxDragNone;
+        }
+
+private:
+        GVistaCompleja* GView;
+};
+}
+}
+//////////////////////////////////////////////END DRAG&DROP////////////////////////////////////////////
+
+
+GVistaCompleja::GVistaCompleja(GNKVisualizator::Vista2D* pIVista) :
+        VistaComplejaBase(pIVista->GetVisualizatorStudy()->ParentWindow ),
+        IVista(pIVista),
+        m_pManager (GNC::GCS::IEntorno::Instance()->NewWidgetsManager(IVista)),
+        Delegate(new GVistaComplejaDelegate(this)),
+        OverlaysDelegate(new GVistaComplejaOverlaysDelegate(this)),
+        WindowLayoutDelegate(new GVistaComplejaWindowLayoutDelegate(this)),
+        PixelsBluringDelegate(new GVistaComplejaPixelsBluringDelegate(this)),
+        AnnotatorDelegate(new GVistaComplejaAnnotatorDelegate(this, pIVista)),
+        m_pPanelPreview(new GNKVisualizator::GUI::PreviewPanelVisualizator(pIVista, this))
+{
+        IVista->GetVisualizatorStudy()->Window = this;
+        m_hasBeenRendered = false;
+        m_posicion = m_pSliderSlice->GetValue();
+
+        // Setup del manejador de widgets */
+
+        //toolbar
+        GNC::GCS::IToolController* pToolBar = IVista->GetToolController();
+        //widgets...
+        pToolBar->AddTool(HCore_Pointer, (GNC::GCS::ISliderContract*) Delegate);
+        pToolBar->AddTool(HCore_Zoom, (GNC::GCS::ISliderContract*) Delegate);
+        pToolBar->AddTool(HCore_Slider, (GNC::GCS::ISliderContract*) Delegate);
+        pToolBar->AddTool(HCore_Pan, (GNC::GCS::ISliderContract*) Delegate);
+        pToolBar->AddTool(HCore_Angulo, (GNC::GCS::ISliderContract*) Delegate);
+        pToolBar->AddTool(HCore_Rule, (GNC::GCS::IRuleContract*) Delegate);
+        pToolBar->AddTool(HCore_Nota, (GNC::GCS::ISliderContract*) Delegate);
+        pToolBar->AddTool(HCore_Video, (GNC::GCS::ISliderContract*) Delegate);
+        pToolBar->AddTool(HCore_Marcado, (GNC::GCS::ISliderContract*) Delegate);
+        pToolBar->AddTool(HCore_WindowLevel, (GNC::GCS::IWindowLevelContract*) Delegate);
+        //view menu...
+        pToolBar->AddTool(HCore_CornerAnnotations, (GNC::GCS::ISliderContract*) Delegate);
+#if !defined(__WXGTK__)
+        pToolBar->AddTool(HCore_DetachWindow, (GNC::GCS::IViewContract*) IVista);
+#endif
+        pToolBar->AddTool(HCore_MetricGrid, (GNC::GCS::ISliderContract*) Delegate);
+        pToolBar->AddTool(HCore_PixelsBluring, PixelsBluringDelegate);
+        pToolBar->AddTool(HCore_Reset, (GNC::GCS::ISliderContract*) Delegate);
+        pToolBar->AddTool(HCore_WindowLayout, WindowLayoutDelegate);
+        pToolBar->AddTool(HCore_RotateAndFlip, (GNC::GCS::ISliderContract*) Delegate);
+
+        pToolBar->AddTool(HCore_SecondaryCapture, (GNC::GCS::ISliderContract*)Delegate);
+        pToolBar->AddTool(HCore_CopyImageToClipboard, (GNC::GCS::ISliderContract*)Delegate);
+        pToolBar->AddTool(HCore_SimplePrint, (GNC::GCS::ISliderContract*)Delegate);
+        //tools
+        pToolBar->AddTool(HCore_ShowDicomTags, (GNC::GCS::IViewContract*) IVista);
+        pToolBar->AddTool(HCore_ShowHistory, (GNC::GCS::IViewContract*) IVista);
+        pToolBar->AddTool(HCore_ColorMap, (GNC::GCS::ISliderContract*) Delegate);
+        pToolBar->AddTool(HGNKVisualizator_Overlays, OverlaysDelegate);
+        pToolBar->AddTool(HCore_ImageExport, (GNC::GCS::ISliderContract*)Delegate);
+        pToolBar->AddTool(HCore_Deshacer, (GNC::GCS::IViewContract*) IVista);
+        pToolBar->AddTool(HCore_PACSUpload, (GNC::GCS::IViewContract*) IVista);
+        pToolBar->AddTool(HCore_DicomizeFromView, (GNC::GCS::IViewContract*) IVista);
+        pToolBar->AddTool(HCore_AddFileToHistory, (GNC::GCS::IViewContract*) IVista);
+        pToolBar->AddTool(HCore_QueryRetrieve, (GNC::GCS::IViewContract*) IVista);
+
+        m_pSizerTools->Add(pToolBar->CreateNewToolBar(this, GNC::GCS::ITool::TFamiliaVisualizacion), 0, wxEXPAND);
+        m_pSizerTools->Add(pToolBar->CreateNewToolBar(this, GNC::GCS::ITool::TFamiliaMedicion), 0, wxEXPAND);
+        m_pSizerTools->Add(pToolBar->CreateNewToolBar(this, GNC::GCS::ITool::TFamiliaAnotacion), 0, wxEXPAND);
+
+        {
+                GNC::GCS::IToolController::TIdList listids;
+                listids.push_back(HCore_WindowLayout);
+                listids.push_back(HCore_ShowHistory);
+                wxWindow* pwxToolBar = pToolBar->CreateNewToolBar(this, listids, false);
+                m_pSizerTools->Add(pwxToolBar, 1, wxEXPAND);
+        }
+
+        //connect key events..
+        pToolBar->ConnectKeyEvents(this);
+
+        //preview series and drag & drop
+        m_pSizerView->Insert(0, m_pPanelPreview, 0, wxEXPAND);
+        SetDropTarget(new GNKVisualizator::GUI::wxDropTargetPreviewPanelVisualizator(this));
+
+        //se añaden los botones de ver/cine
+        m_pBarraIzquierda = new BarraHerramientasBotones(m_pPanelManipulacion);
+        m_pBarraIzquierda->AddTool(ID_BOTON_VER,_("Display Options"),GNKVisualizator::ResourcesManager::ToolIcons::GetIcoMenuImagen(),_("Display Options"));
+        m_pBarraIzquierda->Connect(ID_BOTON_VER,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( GVistaCompleja::OnMenuVerClick),NULL,this);
+
+        m_pBarraIzquierda->Realize();
+        m_pSizerIzquierda->Add(m_pBarraIzquierda,0, wxALIGN_CENTER_VERTICAL|wxEXPAND,0);
+
+        {
+                GNC::GCS::IToolController::TIdList toolsLeft;
+#if !defined(__WXGTK__)
+                toolsLeft.push_back(HCore_DetachWindow);
+#endif
+                toolsLeft.push_back(HCore_WindowLayout);
+                toolsLeft.push_back(HCore_Video);
+                wxWindow* toolBarLeft = pToolBar->CreateNewToolBar(m_pPanelManipulacion, toolsLeft);
+                m_pSizerIzquierda->Add(toolBarLeft,0, wxALIGN_CENTER_VERTICAL|wxEXPAND,0);
+        }
+        //se añaden los de sincronizar/dessincronizar
+        m_pBarraDerecha = new BarraHerramientasBotones(m_pPanelManipulacion);
+        m_pBarraDerecha->AddTool(ID_BOTON_SINCRONIZAR,_("Synchronize/Des synchronize"),GNKVisualizator::ResourcesManager::SynchronizationBar::GetIcoDessincronizar(),_("Synchronize/Des synchronize"),wxITEM_CHECK);
+        m_pBarraDerecha->Connect(ID_BOTON_SINCRONIZAR,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( GVistaCompleja::OnSincronizarClick),NULL,this);
+        m_pBarraDerecha->ForceToggleTool(ID_BOTON_SINCRONIZAR,false);
+
+        m_pBarraDerecha->Realize();
+        m_pSizerDerecho->Add(m_pBarraDerecha,0, wxALIGN_CENTER_VERTICAL|wxEXPAND,0);
+
+        //Connect(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(GVistaCompleja::OnFocus),NULL,this);
+        Connect(wxEVT_MOUSEWHEEL,wxMouseEventHandler(GVistaCompleja::OnMouseWheel),NULL,this);
+
+        GNC::GCS::Events::EventoModificacionImagen ev2(IVista);
+        GNC::GCS::Events::EventoModificacionWidget ev3(IVista);
+        GNC::GCS::Events::EventoRender ev4(IVista);
+        GNKVisualizator::Events::EventoMostrarOverlay evt5(IVista);
+
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->Registrar(this, ev2);
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->Registrar(this, ev3);
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->Registrar(this, ev4);
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->Registrar(this, evt5);
+
+        AddVistaSimple();
+
+        //FUNDAMENTAL PARA QUE FUNCIONE LA HERRAMIENTA DE MAPAS DE COLOR
+        IVista->VisualizatorStudy->Viewer = m_VistasSimples[0]->ViewImage2D;
+
+        //m_pManager->InsertarWidget(new GNC::GCS::Widgets::WProgreso(m_VistasSimples.front()->ViewInteractor2D, m_pManager, -1, "progreso", 666));
+        m_pManager->EnableAnimation();
+        m_pManager->SetAnnotator(AnnotatorDelegate);
+
+        this->Layout();
+}
+
+GVistaCompleja::~GVistaCompleja()
+{
+        std::string modality("");
+
+        if (IVista != NULL) {
+                IVista->GetEstudio()->GetTagActiveImage(GKDCM_Modality, modality);
+                IVista->GetToolController()->FinalizeToolController();
+
+                IVista->ComienzaDestruccion();
+        }
+
+        //FUNDAMENTAL PARA QUE los viewers se destruyan correctamente y sin leaks ya que Viewer es smart pointer
+        for(TListaGVistasSimples::iterator it = m_VistasSimples.begin(); it != m_VistasSimples.end(); ++it) {
+                (*it)->UnRefIVista();
+        }
+
+
+        if (IVista != NULL) {
+                IVista->VisualizatorStudy->Viewer = NULL;
+                GNC::GCS::IEntorno::Instance()->GetCommandController()->AbortarComandosDeOwner(IVista);
+        }
+
+        //Disconnect(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(GVistaCompleja::OnFocus),NULL,this);
+        this->Disconnect(wxEVT_MOUSEWHEEL,wxMouseEventHandler(GVistaCompleja::OnMouseWheel),NULL,this);
+
+        if(m_ListaSincronizacion.size() >0) {
+                DesSincronizar();
+        }
+
+        m_pManager->EliminarTodosLosWidgets(false);
+
+        m_VistasSimples.clear();
+
+        GNC::GCS::IEntorno::Instance()->FreeWidgetsManager(m_pManager);
+        m_pManager = NULL;
+
+        /*TODO	GNKVisualizator::IReconstructionTool* hReconstruction = GNC::GCS::IEntorno::Instance()->GetControladorHerramientas()->ObtenerHerramientaConcreta<GNKVisualizator::IReconstructionTool>(GNKVisualizator::IReconstructionTool::ID);
+        	if (hReconstruction != NULL) {
+        		((GNC::GCS::IContratable<GNKVisualizator::IReconstructionContract>*)hReconstruction)->DesSubscribirsLosDeLaVista(IVista);
+        	}*/
+
+        if (IVista != NULL) {
+                IVista->Lock();
+                delete IVista;
+        }
+}
+
+void GVistaCompleja::AddVistaSimple()
+{
+        GVistaSimple* pVistaSimple = new GVistaSimple(IVista,this);
+        m_VistasSimples.push_back(pVistaSimple);
+        m_pSizerSeries->Add(pVistaSimple,1,wxEXPAND);
+
+
+        GNC::GCS::IWidgetsRenderer* pR = pVistaSimple->ViewInteractor2D;
+        pR->SetManager(m_pManager);
+        pR->SetIOverlay(pVistaSimple);
+        //m_pManager->SetRendererActivo(pR);
+        std::ostringstream os;
+        os << "Renderer " << pVistaSimple << std::endl;
+        pR->sid = os.str();
+        ////
+
+        WidgetRepresentation* pWidgetsRepresentation = WidgetRepresentation::New();
+        pWidgetsRepresentation->SetRenderer(pVistaSimple->ViewInteractor2D->FindPokedRenderer(0,0));
+        pVistaSimple->ViewInteractor2D->FindPokedRenderer(0,0)->AddViewProp(pWidgetsRepresentation);
+        pR->SetRepresentation(pWidgetsRepresentation);
+        pWidgetsRepresentation->SetWidgetsManager(m_pManager);
+        pWidgetsRepresentation->SetWidgetsRenderer(pR);
+        pWidgetsRepresentation->Delete();
+
+        pVistaSimple->ViewImage2D->SetWindowLevelFrom(m_VistasSimples[0]->ViewImage2D);
+        pVistaSimple->ViewImage2D->SetLookupTable(m_VistasSimples[0]->ViewImage2D->GetLookupTable(), m_VistasSimples[0]->ViewImage2D->GetIdLookupTable());
+        pVistaSimple->ViewImage2D->SetZoom(m_VistasSimples[0]->ViewImage2D->GetZoom());
+        pVistaSimple->ViewImage2D->CopyCameraStatus(m_VistasSimples[0]->ViewImage2D);
+
+        for (unsigned int i = 0; i < m_VistasSimples.size(); i++) {
+                GNC::GCS::IWidgetsRenderer* pR = m_VistasSimples[i]->ViewInteractor2D;
+                pR->SetVID(i, false);
+                std::ostringstream os;
+                os << "Renderer " << i << std::endl;
+                pR->sid = os.str();
+        }
+}
+
+void GVistaCompleja::LoadSeries(long seriesPk)
+{
+        IVista->VisualizatorStudy->InitializeContext(seriesPk);
+
+        for(TListaGVistasSimples::iterator it = m_VistasSimples.begin(); it != m_VistasSimples.end(); ++it) {
+                (*it)->setEstudioReferido(IVista->GetEstudio());
+        }
+        IniciarPipeline();
+}
+
+void GVistaCompleja::IniciarPipeline(const GNC::GCS::Ptr<GNC::GCS::Layout>& layout)
+{
+        m_pManager->RemoveUserAnnotationWidgets(false);
+        m_pPanelManipulacion->Enable(true);
+
+        GNC::GCS::Ptr<std::list<GNKVisualizator::TOverlay> > overlays(IVista->VisualizatorStudy->GetOverlaysImagenActiva());
+        OverlaysDelegate->Setup(overlays, IVista);
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNKVisualizator::Events::EventoRefrescarListaOverlays(IVista,OverlaysDelegate->GetOverlayList()));
+
+        //contratos que son 1:1 con gvistacompleja
+        //esto es correcto porque en la creacion se mete siempre una vista simple
+        GNC::GCS::Ptr<GIL::DICOM::DicomDataset> ds = IVista->GetEstudio()->GetTagsActiveImage();
+        Delegate->Setup(*ds);
+        PixelsBluringDelegate->Setup(ds->getTag(GKDCM_Modality));
+
+
+        ///////////recorrer las vistas simples y pasarles las imagenes
+        if(!m_VistasSimples.empty()) {
+                int i = 0;
+                for(TListaGVistasSimples::iterator it = m_VistasSimples.begin(); it != m_VistasSimples.end(); ++it) {
+                        GVistaSimple* pvs = *it;
+                        pvs->EstudioReferido->SetActiveIndex(i);
+                        pvs->SetOverlays(OverlaysDelegate->GetOverlayList(), OverlaysDelegate->m_EstadoOverlays);
+
+                        //despues se establece el WL
+                        if (Delegate->HasDefaultWindowLevel()) {
+                                GNC::GCS::IWindowLevelContract::WindowLevel wl = Delegate->GetAndSetDefaultWindowLevel();
+                                pvs->ViewImage2D->SetDefaultWindowLevel(wl.m_window, wl.m_level);
+                        } else {
+                                pvs->ViewImage2D->SetAutoDefaultWindowLevel();
+                        }
+                        i++;
+                }
+                m_pManager->SetRendererActivo( (* (m_VistasSimples.begin()) )->ViewInteractor2D );
+
+                WindowLayoutDelegate->Setup(0, IVista->GetEstudio()->GetSliceNumber() - 1);
+
+                ActualizarMaxMinSlider();
+        }
+
+        //contrato window level, hay que preguntarle al viewer de la primera vista porque el estudioatencionprimaria no tiene viewer
+        IVista->GetToolController()->Enable(HCore_WindowLevel, m_VistasSimples[0]->ViewImage2D->GetNumberOfComponents() == 1);
+
+        if (layout.IsValid()) {
+                if (layout->getMatcher().IsValid()) {
+                        for (std::vector<long>::iterator it = IVista->VisualizatorStudy->OpenedSeries.begin(); it != IVista->VisualizatorStudy->OpenedSeries.end(); ++it) {
+                                if (layout->getMatcher()->MatchesSeries((*it))) {
+                                        LoadSeries(*it);
+                                }
+                        }
+                        WindowLayoutDelegate->SetWindowLayout(layout->getRows(), layout->getColumns());
+                }
+                layout->applyWindowProperties(IVista);
+        } else {
+                GoToSlice(0,false,false);
+        }
+}
+
+
+
+void GVistaCompleja::DetenerPipeline()
+{
+        if (m_pManager != NULL) {
+                m_pManager->OcultarTodosLosWidgets(true, 666);
+                m_pManager->DisableAnimation();
+                m_pPanelManipulacion->Enable(true);
+                m_pManager->Render();
+        }
+}
+
+void GVistaCompleja::OnCargaFinalizada()
+{
+        m_pPanelPreview->LoadModel();
+        Layout();
+        m_pManager->OcultarTodosLosWidgets(true, 666);
+        m_pManager->DisableAnimation();
+        m_pManager->Render();
+}
+
+
+void GVistaCompleja::OnPaint(wxPaintEvent& event)
+{
+        //std::cout << "GVistaCompleja::OnPaint()" << std::endl;
+        VistaComplejaBase::OnPaint(event);
+        if(GNC::GCS::IEntorno::Instance()->GetControladorVistas()->GetVistaActiva() == IVista) {
+                wxPaintDC dc(this);
+                wxColour colorLineaSeleccion(219, 219, 0, 255);
+                dc.SetBrush(wxBrush(colorLineaSeleccion,wxTRANSPARENT));
+                dc.SetPen(wxPen(colorLineaSeleccion, 3, wxSOLID));
+                dc.DrawRectangle(wxRect(wxPoint(1, 1), wxPoint(dc.GetSize().x-1, dc.GetSize().y-1)));
+        }
+        //la comprobacion de la textura, se hace la primera vez que se pinta
+        if(!m_hasBeenRendered ) {
+                if(IVista->EstaCargada()) {
+                        for(GVistaCompleja::TListaGVistasSimples::iterator it = m_VistasSimples.begin(); it != m_VistasSimples.end(); ++it) {
+                                GVistaSimple* vs = *it;
+                                try {
+                                        vs->ViewInteractor2D->Render();
+                                        long idTextura = vs->ViewImage2D->GetImageTexture();
+                                        if (idTextura != 0) {
+                                                if ( !glIsTexture(idTextura) ) {
+                                                        LOG_ERROR("GVistaCompleja", "Textura no cargada en memoria de video")
+                                                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,_Std("Error: You have exhausted the system's video memory and has not been able to load the image. Close some studies to free memory."),GNC::GCS::Events::EventoMensajes::PopUpMessage,false));
+                                                        GADAPI::ComandoDestruirVistaParams* pParams = new GADAPI::ComandoDestruirVistaParams(IVista);
+                                                        GNC::GCS::IEntorno::Instance()->GetCommandController()->ProcessAsync(_Std("Destroy View"),new GADAPI::ComandoDestruirVista(pParams),NULL);
+                                                }
+                                        } else {
+                                                //se comprobara mas tarde porque la textura todavia no tiene id
+                                                return;
+                                        }
+                                } catch(const std::bad_alloc&) {
+                                        LOG_ERROR("GVistaCompleja","bad_alloc, error al reservar memoria física");
+                                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,_Std("Error: System out of memory. Close some studies to free memory."),GNC::GCS::Events::EventoMensajes::PopUpMessage,false));
+                                        GADAPI::ComandoDestruirVistaParams* pParams = new GADAPI::ComandoDestruirVistaParams(IVista);
+                                        GNC::GCS::IEntorno::Instance()->GetCommandController()->ProcessAsync(_Std("Destroy View"),new GADAPI::ComandoDestruirVista(pParams),NULL);
+                                } catch(...) {
+                                        LOG_ERROR("GVistaCompleja","excepción general al comprobar errores de memoria");
+                                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoMensajes(NULL,_Std("Error: Internal error."),GNC::GCS::Events::EventoMensajes::PopUpMessage,false));
+                                        GADAPI::ComandoDestruirVistaParams* pParams = new GADAPI::ComandoDestruirVistaParams(IVista);
+                                        GNC::GCS::IEntorno::Instance()->GetCommandController()->ProcessAsync(_Std("Destroy View"),new GADAPI::ComandoDestruirVista(pParams),NULL);
+                                }
+                        }
+                        m_hasBeenRendered = true;
+                }
+        }
+}
+
+void GVistaCompleja::OnMenuVerClick(wxCommandEvent& )
+{
+        IVista->OnFocus();
+        wxMenu ImageMenu ;
+        IVista->GetToolController()->AppendsToolInMenu(this, &ImageMenu, GNC::GCS::ITool::TSeriesMenu);
+        m_pBarraIzquierda->SetToolSticky(ID_BOTON_VER, true);
+        wxRect rect = m_pBarraIzquierda->GetToolRect(ID_BOTON_VER);
+        wxPoint pt = m_pBarraIzquierda->ClientToScreen(rect.GetBottomLeft());
+        pt = ScreenToClient(pt);
+
+        PopupMenu(&ImageMenu, pt);
+        // make sure the button is "un-stuck"
+        m_pBarraIzquierda->SetToolSticky(ID_BOTON_VER, false);
+}
+
+void GVistaCompleja::ActualizarMaxMinSlider()
+{
+        //depende de m_MinSlice y m_MaxSlice;
+        //tb depende del numero de vistasimples
+        int minSlider = WindowLayoutDelegate->m_MinSlice;
+        int maxSlider = ((WindowLayoutDelegate->m_MaxSlice - WindowLayoutDelegate->m_MinSlice) +1)  - (m_pSizerSeries->GetRows() * m_pSizerSeries->GetCols());
+        if (minSlider < maxSlider) {
+                m_pSliderSlice->SetRange(minSlider, maxSlider);
+                m_pSliderSlice->Enable(true);
+                m_pSliderSlice->Show(true);
+                m_pBarraDerecha->Show(true);
+                m_pBarraDerecha->Refresh();
+        } else {
+                m_pSliderSlice->SetRange(0, 1);
+                if(!m_ListaSincronizacion.empty()) {
+                        Sincronizar(false);
+                }
+                m_pSliderSlice->Show(false);
+                m_pBarraDerecha->Show(false);
+        }
+}
+
+
+void GVistaCompleja::OnFocus(wxChildFocusEvent &)
+{
+        IVista->OnFocus();
+}
+
+void GVistaCompleja::OnSize(wxSizeEvent &)
+{
+        this->Layout();
+}
+
+void GVistaCompleja::OnZSliderScroll (wxScrollEvent& event)
+{
+        int pos = event.GetPosition() - m_posicion;
+
+        if(pos!=0) {
+                GoToSlice(event.GetPosition(), false);
+        }
+        event.Skip(false);
+}
+
+void GVistaCompleja::OnMouseWheel(wxMouseEvent& event)
+{
+        if (event.ControlDown()) {
+                if (event.ShiftDown()) {
+                        for (TListaGVistasSimples::iterator it = m_VistasSimples.begin(); it != m_VistasSimples.end(); ++it) {
+                                if(event.GetWheelRotation() > 0) {
+                                        (*it)->GoToTSlice(-1);
+                                } else {
+                                        (*it)->GoToTSlice(1);
+                                }
+                        }
+                } else {
+                        if(event.GetWheelRotation() > 0) {
+                                GoToSlice(-1);
+                        } else {
+                                GoToSlice(1);
+                        }
+                }
+        }
+}
+
+void GVistaCompleja::ActualizarImagen()
+{
+        //m_pImagenOriginal->Modified();
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(IVista,GNC::GCS::Events::EventoModificacionImagen::ImagenModificada, -1));
+}
+
+GNC::GCS::IVista* GVistaCompleja::GetView()
+{
+        return IVista;
+}
+
+//----------DIALOGO SINCRONIZACION...-------------
+class DialogoSincronizacion: public DialogoSincronizacionBase
+{
+public:
+        typedef std::vector<GNKVisualizator::Vista2D*>	TipoListaVistas;
+        DialogoSincronizacion(wxWindow* parent, TipoListaVistas listaVistas):
+                DialogoSincronizacionBase(parent),
+                m_lista(listaVistas)
+        {
+                for(TipoListaVistas::iterator it = listaVistas.begin(); it!=listaVistas.end(); ++it) {
+                        m_pCheckListVistas->AppendString(wxString::FromUTF8((*it)->GetTitulo().c_str()));
+                }
+                this->Layout();
+        }
+
+        ~DialogoSincronizacion()
+        {
+
+        }
+
+        void OnAceptarClick(wxCommandEvent&)
+        {
+                EndModal(wxID_OK);
+        }
+
+        TipoListaVistas GetVistasSeleccionadas()
+        {
+                TipoListaVistas resultado;
+                wxArrayInt selecciones;
+                for(unsigned int i=0; i<m_pCheckListVistas->GetCount(); i++) {
+                        //se busca la vista
+                        for(TipoListaVistas::iterator itVistas = m_lista.begin(); itVistas!= m_lista.end(); ++itVistas) {
+                                if(m_pCheckListVistas->IsChecked(i)) {
+                                        resultado.push_back(m_lista[i]);
+                                        break;
+                                }
+                        }
+                }
+                return resultado;
+        }
+
+protected:
+        TipoListaVistas m_lista;
+};
+
+//---------- end DIALOGO SINCRONIZACION...-------------
+
+void GVistaCompleja::OnSincronizarClick(wxCommandEvent&)
+{
+        bool enabled = m_pBarraDerecha->GetToolToggled(ID_BOTON_SINCRONIZAR);
+        Sincronizar(enabled);
+}
+
+void GVistaCompleja::Sincronizar(bool sincronizar)
+{
+        //si esta toogled...
+        if(!sincronizar) {
+                //dessincronizar
+                DesSincronizar();
+        } else {
+                //sincronizar
+                typedef GNC::GCS::IControladorVistas::TipoListaVistas TipoListaIVistas;
+
+                TipoListaVista2D lista;
+                {
+                        TipoListaIVistas listaTmp = GNC::GCS::IEntorno::Instance()->GetControladorVistas()->GetVistas();
+
+                        //pillamos las vistas simples
+                        for(TipoListaIVistas::iterator it = listaTmp.begin(); it!= listaTmp.end(); ++it) {
+                                GNKVisualizator::Vista2D* v = dynamic_cast<GNKVisualizator::Vista2D*> ((*it));
+                                if(v!=NULL && v!=IVista && v->GVista->EsSincronizable()) {
+                                        lista.push_back(v);
+                                }
+                        }
+                }
+
+                DialogoSincronizacion* dialogoSincronizacion = new DialogoSincronizacion(this, lista);
+                int answer = dialogoSincronizacion->ShowModal();
+                if (answer == wxID_OK) {
+                        //se pillan las vistas seleccionadas
+                        lista = dialogoSincronizacion->GetVistasSeleccionadas();
+                        if(!lista.empty()) {
+                                //nos metemos en la lista
+                                lista.push_back(IVista);
+                                //y ahora sincronizamos a tol mundo
+                                for(DialogoSincronizacion::TipoListaVistas::iterator it = lista.begin(); it!= lista.end(); ++it) {
+                                        (*it)->GVista->Sincronizar(lista);
+                                }
+                                m_pBarraDerecha->ForceToggleTool(ID_BOTON_SINCRONIZAR,true);
+                                m_pBarraDerecha->Refresh();
+                        } else {
+                                m_pBarraDerecha->ForceToggleTool(ID_BOTON_SINCRONIZAR,false);
+                                m_pBarraDerecha->Refresh();
+                        }
+                }
+        }
+}
+
+void GVistaCompleja::Sincronizar(const TipoListaVista2D& lista)
+{
+        //se suscribe a los eventos de los brothers
+        for(TipoListaVista2D::const_iterator it = lista.begin(); it!= lista.end(); ++it) {
+                if((*it) != IVista) {
+                        AtencionPrimaria::Events::EventoSincronizacion evento((*it));
+                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->Registrar(this,evento);
+                        m_ListaSincronizacion.push_back((*it));
+                }
+        }
+        m_pBarraDerecha->ForceToggleTool(ID_BOTON_SINCRONIZAR,true);
+        m_pBarraDerecha->Refresh();
+}
+
+bool GVistaCompleja::EsSincronizable()
+{
+        return m_ListaSincronizacion.empty() && m_pSliderSlice->IsShown();
+}
+
+void GVistaCompleja::DesSincronizar()
+{
+        for(TipoListaVista2D::iterator it = m_ListaSincronizacion.begin(); it!= m_ListaSincronizacion.end(); ++it) {
+                AtencionPrimaria::Events::EventoSincronizacion eventoOtro((*it));
+                GNC::GCS::IEntorno::Instance()->GetControladorEventos()->DesRegistrar(this,eventoOtro);
+        }
+        m_ListaSincronizacion.clear();
+
+        //dessincronizamos
+        AtencionPrimaria::Events::EventoSincronizacion* evento = new AtencionPrimaria::Events::EventoSincronizacion(IVista,AtencionPrimaria::Events::EventoSincronizacion::Dessincronizar);
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(evento);
+
+        m_pBarraDerecha->ForceToggleTool(ID_BOTON_SINCRONIZAR,false);
+        m_pBarraDerecha->Refresh();
+}
+
+void GVistaCompleja::GoToSlice(int pos, bool relativa, bool propagar, bool render)
+{
+        if (WindowLayoutDelegate->m_MaxSlice == WindowLayoutDelegate->m_MinSlice) {
+                if (render) {
+                        GNC::GCS::Events::EventoModificacionImagen* pEvt = new GNC::GCS::Events::EventoModificacionImagen(IVista,GNC::GCS::Events::EventoModificacionImagen::SliceCambiado, -1, render);
+                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(pEvt);
+                }
+                return;
+        }
+        int posicion;
+
+        if(relativa) {
+                posicion = m_pSliderSlice->GetValue() + pos;
+        } else {
+                posicion = pos;
+        }
+
+        posicion = std::max(m_pSliderSlice->GetMin(), std::min(m_pSliderSlice->GetMax(), posicion));
+
+        //si la posicion + las que se muestran en el layout actual es mayor al número de slices de la serie, no se avanza
+
+        if(posicion + ( (int) m_VistasSimples.size() ) > IVista->GetEstudio()->GetSliceNumber()) {
+                if (render) {
+                        GNC::GCS::Events::EventoModificacionImagen* pEvt = new GNC::GCS::Events::EventoModificacionImagen(IVista,GNC::GCS::Events::EventoModificacionImagen::SliceCambiado, -1, render);
+                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(pEvt);
+                }
+                return;
+        }
+
+        m_pSliderSlice->SetValue(posicion);
+        m_posicion = posicion;
+
+        //se reestablece el window/level antes del evento de modificación porque ese evento lo escucha la herramienta
+        Delegate->Setup(*IVista->GetEstudio()->GetTagsImage(m_posicion));
+
+        //se le indica al manager el vid
+        IVista->GetEstudio()->ActiveFileIndex = posicion;
+        for(TListaGVistasSimples::iterator it = m_VistasSimples.begin(); it != m_VistasSimples.end(); ++it) {
+                (*it)->GoToSlice(posicion,false,false);
+
+                //despues se establece el WL
+                if (Delegate->HasCurrentWindowLevel()) {
+                        GNC::GCS::IWindowLevelContract::WindowLevel wl = Delegate->GetCurrentWindowLevel();
+                        (*it)->ViewImage2D->SetDefaultWindowLevel(wl.m_window, wl.m_level);
+                } else if (Delegate->HasDefaultWindowLevel()) {
+                        GNC::GCS::IWindowLevelContract::WindowLevel wl = Delegate->GetAndSetDefaultWindowLevel();
+                        (*it)->ViewImage2D->SetDefaultWindowLevel(wl.m_window, wl.m_level);
+                } else {
+                        (*it)->ViewImage2D->SetAutoDefaultWindowLevel();
+                }
+
+                GNC::GCS::Ptr<GNKVisualizator::TListaOverlays> pLista = IVista->VisualizatorStudy->GetOverlaysImagen(posicion);
+                (*it)->SetOverlays(pLista,OverlaysDelegate->m_EstadoOverlays);
+
+                posicion++;
+        }
+
+
+        GNC::GCS::Events::EventoModificacionImagen* pEvt = new GNC::GCS::Events::EventoModificacionImagen(IVista,GNC::GCS::Events::EventoModificacionImagen::SliceCambiado, -1, render);
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(pEvt);
+
+        if(propagar) {
+                GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new AtencionPrimaria::Events::EventoSincronizacion(IVista, AtencionPrimaria::Events::EventoSincronizacion::Scroll,pos,relativa));
+        }
+}
+
+int GVistaCompleja::GetCurrentSlice() const
+{
+        return m_posicion;
+}
+
+void GVistaCompleja::PreProcesarEvento(GNC::GCS::Events::IEvent* evt, std::list<GNC::GCS::Events::IEvent*>& lista)
+{
+        if (evt == NULL) {
+                std::cerr << "Error: Evento nulo" << std::endl;
+                return;
+        }
+        switch (evt->GetCodigoEvento()) {
+        case ginkgoEVT_GNKVisualizator_EventoSincronizacion: {
+                AtencionPrimaria::Events::EventoSincronizacion* pEvt = dynamic_cast<AtencionPrimaria::Events::EventoSincronizacion*>(evt);
+                if (pEvt == NULL) {
+                        std::cerr << "Error al interpretar evento como evento de sincronización: Evento = " << evt << std::endl;
+                        return;
+                }
+                if (pEvt->GetTipoEvento() != AtencionPrimaria::Events::EventoSincronizacion::Scroll) {
+                        return;
+                }
+                int posicion = pEvt->GetPosicion();
+                if(pEvt->EsRelativa()) {
+                        posicion += m_pSliderSlice->GetValue();
+                }
+                posicion = std::max(m_pSliderSlice->GetMin(), std::min(m_pSliderSlice->GetMax(), posicion));
+        }
+        break;
+        case ginkgoEVT_Core_ModificacionImagen: {
+                GNC::GCS::Events::EventoModificacionImagen* pEvt = dynamic_cast<GNC::GCS::Events::EventoModificacionImagen*>(evt);
+                if (pEvt == NULL) {
+                        std::cerr << "Error al interpretar evento como evento de modificación de imagen: Evento = " << evt << std::endl;
+                        return;
+                }
+                switch (pEvt->GetTipo()) {
+                case GNC::GCS::Events::EventoModificacionImagen::ImagenRecalibrada: {
+                        lista.push_back(new GNC::GCS::Events::EventoModificacionImagen(IVista,GNC::GCS::Events::EventoModificacionImagen::ImagenCargada, -1));
+                        lista.push_back(new GNC::GCS::Events::EventoModificacionFichero(IVista,GNC::GCS::Events::EventoModificacionFichero::FicheroModificado));
+                }
+                break;
+                default:
+                        break;
+                }
+                if (pEvt->GetApilarRender()) {
+                        lista.push_back(new GNC::GCS::Events::EventoRender(IVista,pEvt->GetSliceAfectado()));
+                }
+        }
+        break;
+        case ginkgoEVT_Core_ModificacionWidget: {
+                GNC::GCS::Events::EventoModificacionWidget* pEvt = dynamic_cast<GNC::GCS::Events::EventoModificacionWidget*>(evt);
+                if (pEvt == NULL) {
+                        std::cerr << "Error al interpretar evento como evento de modificación de widget: Evento = " << evt << std::endl;
+                        return;
+                }
+                // TODO: Este flujo es muy mejorable
+                lista.push_back(new GNC::GCS::Events::EventoModificacionFichero(IVista,GNC::GCS::Events::EventoModificacionFichero::FicheroModificado,IVista));
+        }
+        break;
+        case ginkgoEVT_GNKVisualizator_EventoMostrarOverlay: {
+                lista.push_back(new GNC::GCS::Events::EventoRender(IVista));
+        }
+        break;
+        default:
+                break;
+        }
+}
+
+void GVistaCompleja::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        switch (evt->GetCodigoEvento()) {
+        case ginkgoEVT_GNKVisualizator_EventoSincronizacion: {
+                AtencionPrimaria::Events::EventoSincronizacion* pEvt = dynamic_cast<AtencionPrimaria::Events::EventoSincronizacion*>(evt);
+                if(pEvt!=NULL) {
+                        if(pEvt->GetTipoEvento() == AtencionPrimaria::Events::EventoSincronizacion::Scroll) {
+                                GoToSlice(pEvt->GetPosicion(),pEvt->EsRelativa(),false);
+                        } else if (pEvt->GetTipoEvento() == AtencionPrimaria::Events::EventoSincronizacion::Dessincronizar) {
+                                for(TipoListaVista2D::iterator it = m_ListaSincronizacion.begin(); it!= m_ListaSincronizacion.end(); ++it) {
+                                        if((*it) == pEvt->GetVista()) {
+                                                GNC::GCS::IEntorno::Instance()->GetControladorEventos()->DesRegistrar(this,*pEvt);
+                                                m_ListaSincronizacion.erase(it);
+                                                if(m_ListaSincronizacion.empty()) {
+                                                        m_pBarraDerecha->ForceToggleTool(ID_BOTON_SINCRONIZAR,false);
+                                                        m_pBarraDerecha->Refresh();
+                                                }
+                                                return;
+                                        }
+                                }
+                        }
+                }
+        }
+        break;
+
+        case ginkgoEVT_Core_ModificacionImagen: {
+                GNC::GCS::Events::EventoModificacionImagen* pEvt = dynamic_cast<GNC::GCS::Events::EventoModificacionImagen*>(evt);
+                if (pEvt == NULL) {
+                        std::cerr << "Error al interpretar evento como evento de modificación de imagen: Evento = " << evt << std::endl;
+                        return;
+                }
+                switch (pEvt->GetTipo()) {
+                case GNC::GCS::Events::EventoModificacionImagen::ImagenModificada:
+                case GNC::GCS::Events::EventoModificacionImagen::ImagenCargada:
+                case GNC::GCS::Events::EventoModificacionImagen::MapaModificado:
+                case GNC::GCS::Events::EventoModificacionImagen::SliceCambiado: {
+                        for(TListaGVistasSimples::iterator it = m_VistasSimples.begin(); it != m_VistasSimples.end(); ++it) {
+                                (*it)->ViewImage2D->Modified();
+                        }
+                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(IVista,GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas));
+                }
+                break;
+                case GNC::GCS::Events::EventoModificacionImagen::ImagenRecalibrada: {
+
+                        int i = 0;
+                        for(TListaGVistasSimples::iterator it = m_VistasSimples.begin(); it != m_VistasSimples.end(); ++it, i++) {
+                                m_VistasSimples[i]->GetEstudio()->RecalibrateActiveImage(pEvt->GetNewSpacing(), pEvt->GetNewOrigin());
+
+                                //esto es necesario para establecer bien las coordenadas cuando se cambia el origen
+                                (*it)->GoToSlice(m_posicion + i,false,false);
+                                pEvt->SetSlice(-1);
+                                (*it)->RefrescarOverlays(OverlaysDelegate->m_EstadoOverlays);
+                        }
+                        //se vuelve hacer setup del contrato mapa de color
+                        //	GNKVisualizator::IContratoMapaColor::Setup(m_pImagenOriginal);
+
+
+                }
+                break;
+                case GNC::GCS::Events::EventoModificacionImagen::VisualizacionImagenModificada:
+                        //para que pille bien el window/level
+                        if (pEvt->AutoCalculeWindowLevel()) {
+                                Delegate->DoAutoCalculateWindowLevel();
+                        } else {
+                                if(pEvt->ResetWindowLevel()) {
+                                        Delegate->DoResetWindowLevel();
+                                } else {
+                                        Delegate->DoSetWindowLevel(pEvt->GetWindow(), pEvt->GetLevel());
+                                }
+                        }
+
+                        for(TListaGVistasSimples::iterator it = m_VistasSimples.begin(); it != m_VistasSimples.end(); ++it) {
+                                if(pEvt->ResetCurrentPoint()) {
+                                        /*
+                                        double* bounds  = (*it)->ViewImage2D->GetInput()->GetBounds();
+                                        const double* currentPoint = (*it)->ViewImage2D->GetCurrentPoint();
+                                        double  pos[3] =
+                                        {
+                                        	(bounds[0]+bounds[1])/2.0,
+                                        	(bounds[2]+bounds[3])/2.0,
+                                        	currentPoint[2]
+                                        };
+
+                                        (*it)->ViewImage2D->SetCurrentPoint(pos);
+                                        */
+                                }
+                                if(pEvt->ResetZoom()) {
+                                        (*it)->ViewImage2D->ResetZoom(false, pEvt->GetResetZoomMode());
+                                }
+                                //(*it)->ViewImage2D->Modified();
+                        }
+                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(IVista,GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas));
+                        break;
+                case GNC::GCS::Events::EventoModificacionImagen::ImagenDescargada:
+                        break;
+                case GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas:
+
+                        break;
+                }
+        }//fin modificacion
+        break;
+
+        case ginkgoEVT_Core_Render: {
+                for(TListaGVistasSimples::iterator it = m_VistasSimples.begin(); it != m_VistasSimples.end(); ++it) {
+                        (*it)->ViewInteractor2D->Refresh(false);
+                }
+        }
+        break;
+        case ginkgoEVT_Core_ModificacionFichero: {
+                GNC::GCS::Events::EventoModificacionFichero* pEvt = new GNC::GCS::Events::EventoModificacionFichero();
+                pEvt->SetVista(IVista);
+                GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(pEvt);
+        }
+        break;
+        case ginkgoEVT_GNKVisualizator_EventoMostrarOverlay: {
+                for(TListaGVistasSimples::iterator it = m_VistasSimples.begin(); it != m_VistasSimples.end(); ++it) {
+                        (*it)->RefrescarOverlays(OverlaysDelegate->m_EstadoOverlays);
+                        (*it)->ViewImage2D->Modified();
+                }
+        }
+        break;
+        }
+}
diff --git a/visualizator/visualizator/wxvtk/gvistacompleja.h b/visualizator/visualizator/wxvtk/gvistacompleja.h
new file mode 100644
index 0000000..1de659c
--- /dev/null
+++ b/visualizator/visualizator/wxvtk/gvistacompleja.h
@@ -0,0 +1,183 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+
+#include "visualizatorviews.h"
+#include <visualizator/export/contracts/ioverlayscontract.h>
+#include <api/observers/ieventsobserver.h>
+#include <export/contracts/iwidgetscontract.h>
+#include <export/contracts/islidercontract.h>
+#include <export/contracts/irulecontract.h>
+#include <export/contracts/iwindowlevelcontract.h>
+#include <export/contracts/iwindowlayoutcontract.h>
+#include "../estudios/overlay.h"
+
+#include <wx/sizer.h>
+#include <wx/dc.h>
+#include <wx/bitmap.h>
+#include <wx/aui/auibar.h>
+
+#include <vtkCommand.h>
+
+namespace GNKVisualizator
+{
+class VisualizatorStudy;
+class Vista2D;
+class SimpleViewExportDelegate;
+}
+namespace GNC
+{
+namespace GCS
+{
+class Layout;
+}
+}
+
+class GVistaSimple;
+
+class TimerPlay;
+class BarraHerramientasBotones;
+
+class vtkScalarsToColors;
+class vtkAlgorithmOutput;
+class GVistaComplejaDelegate;
+class GVistaComplejaOverlaysDelegate;
+class GVistaComplejaWindowLayoutDelegate;
+class GVistaComplejaPixelsBluringDelegate;
+class GVistaComplejaAnnotatorDelegate;
+
+namespace GNKVisualizator
+{
+class SimpleViewExportDelegate;
+namespace GUI
+{
+class PreviewPanelVisualizator;
+class wxDropTargetPreviewPanelVisualizator;
+}
+}
+
+class GVistaCompleja: public VistaComplejaBase, public GNC::GCS::IEventsObserver
+{
+        friend class GVistaComplejaDelegate;
+        friend class GVistaComplejaOverlaysDelegate;
+        friend class GVistaComplejaWindowLayoutDelegate;
+        friend class GNKVisualizator::GUI::wxDropTargetPreviewPanelVisualizator;
+        friend class GVistaComplejaPixelsBluringDelegate;
+        friend class GVistaComplejaAnnotatorDelegate;
+public:
+
+        /* Constructor */
+        GVistaCompleja( GNKVisualizator::Vista2D* pIVista);
+        /* Destructor */
+        ~GVistaCompleja();
+
+        virtual void OnEraseBackground( wxEraseEvent& event )
+        {
+                event.Skip(false);
+        }
+
+        void AddVistaSimple();
+
+        void LoadSeries(long seriesPk);
+
+        void IniciarPipeline(const GNC::GCS::Ptr<GNC::GCS::Layout>& layout = NULL);
+
+        void DetenerPipeline();
+
+        virtual void OnCargaFinalizada();
+
+        void SetOverlays(GNC::GCS::Ptr<GNKVisualizator::TListaOverlays>& pListaOverlays);
+
+        bool GetManipulacionEnabled()
+        {
+                return m_pPanelManipulacion->IsEnabled();
+        }
+
+        //region "Eventos"
+        virtual void OnPaint(wxPaintEvent& evt);
+
+        void OnMenuVerClick(wxCommandEvent& event);
+        void OnInvertColorMap(wxCommandEvent &event);
+
+        void ActualizarMaxMinSlider();
+
+        void OnFocus(wxChildFocusEvent &event);
+
+        void OnSize(wxSizeEvent &event);
+
+        void OnZSliderScroll (wxScrollEvent& event);
+
+        void OnChar( wxKeyEvent& event );
+
+        void OnMouseWheel( wxMouseEvent& event );
+
+        void OnSincronizarClick(wxCommandEvent &event);
+
+        void Sincronizar(bool sincronizar);
+
+        void GoToSlice(int posicion, bool relativa =  true, bool propagar = true, bool render= true);
+        int GetCurrentSlice() const;
+
+        virtual void PreProcesarEvento(GNC::GCS::Events::IEvent*, std::list<GNC::GCS::Events::IEvent*>& );
+
+        void ProcesarEvento(GNC::GCS::Events::IEvent *evt) ;
+
+        typedef std::vector<GNKVisualizator::Vista2D*> TipoListaVista2D;
+        void Sincronizar(const TipoListaVista2D& lista);
+        void DesSincronizar();
+        bool EsSincronizable();
+
+        //endregion
+
+
+        // Asigna los valores de los apuntadores a la la imagen y el slice actual
+        void AsignarConexionesDeFiltrado(vtkImageData** pImagen, int* slice, vtkImageData** pChroma);
+        void ActualizarImagen();
+
+        GNC::GCS::IVista* GetView();
+protected:
+        GNKVisualizator::Vista2D*            IVista;
+        BarraHerramientasBotones*            m_pBarraIzquierda;
+        BarraHerramientasBotones*            m_pBarraDerecha;
+
+        int                                  m_orientacion;
+        TipoListaVista2D                     m_ListaSincronizacion;
+        int m_posicion;
+        typedef std::vector<GVistaSimple*>   TListaGVistasSimples;
+        TListaGVistasSimples                 m_VistasSimples;
+        ///widgets
+        //TipoFicherosGNKVisualizator*              m_pFicherosAprimaria;
+
+
+        //si se ha pintado
+        bool                                 m_hasBeenRendered;
+        GNC::GCS::IWidgetsManager*				 m_pManager;
+        GNC::GCS::Ptr<GVistaComplejaDelegate> Delegate;
+        GNC::GCS::Ptr<GVistaComplejaOverlaysDelegate> OverlaysDelegate;
+        GNC::GCS::Ptr<GVistaComplejaWindowLayoutDelegate> WindowLayoutDelegate;
+        GNC::GCS::Ptr<GVistaComplejaPixelsBluringDelegate> PixelsBluringDelegate;
+        GNC::GCS::Ptr<GVistaComplejaAnnotatorDelegate> AnnotatorDelegate;
+        GNKVisualizator::GUI::PreviewPanelVisualizator*   m_pPanelPreview;
+
+        friend class GNKVisualizator::Vista2D;
+};
diff --git a/visualizator/visualizator/wxvtk/gvistasimple.cpp b/visualizator/visualizator/wxvtk/gvistasimple.cpp
new file mode 100644
index 0000000..0e766f1
--- /dev/null
+++ b/visualizator/visualizator/wxvtk/gvistasimple.cpp
@@ -0,0 +1,842 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include <wx/wx.h>
+#include <api/iwidgetsmanager.h>
+#include "gvistasimple.h"
+#include "gvistacompleja.h"
+#include "../vistas/vista2d.h"
+
+#include <wx/msgdlg.h>
+#include <wx/menu.h>
+#include <main/controllers/configurationcontroller.h>
+
+#include "../eventos/visualizatorevents.h"
+#include <api/toolsystem/itoolsregistry.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/internationalization/internationalization.h>
+#include <eventos/modificacionimagen.h>
+#include <eventos/render.h>
+#include <main/entorno.h>
+#include <resources/visualizatorresourcesmanager.h>
+
+#ifdef __DEPRECATED
+#undef __DEPRECATED
+#endif
+
+#include <vtkVISUManagement/vtkLookupTableManager.h>
+#include <vtk/widgets/widgetsactor.h>
+#include <vtkCamera.h>
+#include <vtkPointData.h>
+#include <vtkImageBlend.h>
+#include <vtkImageMathematics.h>
+#include <api/westilo.h>
+
+#include <widgets/openglhelper.h>
+
+
+class GVtkObserver: public vtkCommand
+{
+public:
+        static GVtkObserver* New()
+        {
+                return new GVtkObserver;
+        }
+
+        void Execute(vtkObject * caller, unsigned long event, void * /*callData*/)
+        {
+                if (IVista == NULL) {
+                        return;
+                }
+                vtkGinkgoImageViewer* view = vtkGinkgoImageViewer::SafeDownCast (caller);
+                if( !view ) {
+                        return;
+                }
+
+                if ( event==vtkGinkgoImageViewer::ViewImageZoomChangeEvent && !this->ZoomLock) {
+                        double zoom = view->GetZoom();
+                        LockZoom();
+                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new AtencionPrimaria::Events::EventoZoom(IVista,zoom));
+                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoRender(IVista));
+                        UnLockZoom();
+                }
+
+                if ( event==vtkGinkgoImageViewer::ViewImagePositionChangeEvent && !this->PanLock) {
+                        LockPan();
+                        if (view->GetRenderer()) {
+                                double pos[3], focal[3];
+                                view->GetRelativePositionOfCamera(focal, pos);
+                                GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new AtencionPrimaria::Events::ChangePositionEvent(IVista, pos, focal));
+                                GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoRender(IVista));
+                        }
+                        UnLockPan();
+                }
+        }
+
+        void Setup(GNC::GCS::IVista* pIVista)
+        {
+                IVista = pIVista;
+        }
+
+        void LockZoom ()
+        {
+                this->ZoomLock = true;
+        }
+        void UnLockZoom ()
+        {
+                this->ZoomLock = false;
+        }
+
+        void LockPan ()
+        {
+                this->PanLock = true;
+        }
+        void UnLockPan ()
+        {
+                this->PanLock = false;
+        }
+
+protected:
+        GVtkObserver() : ZoomLock(false),  PanLock(false), IVista(NULL)
+        {
+        }
+
+        ~GVtkObserver()
+        {
+                IVista = NULL;
+        }
+
+        bool ZoomLock;
+        bool PanLock;
+        GNC::GCS::IVista* IVista;
+};
+
+
+GVistaSimple::GVistaSimple(GNKVisualizator::Vista2D* pIVista, wxWindow* parent) : VistaSimpleBase(parent), EstudioReferido(GNC::GCS::IStudyContext::NewRef(pIVista->GetEstudio()))
+{
+        IVista = pIVista;
+        m_tDimensions = 0;
+
+        this->Connect( wxEVT_SIZE, wxSizeEventHandler( GVistaSimple::OnSize ) );
+        //this->Connect( wxEVT_PAINT, wxPaintEventHandler( GVistaSimple::OnPaint ) );
+
+        ViewImage2D->SetBackgroundColor(0.0f,0.0f,0.0f);
+        ViewInteractor2D->m_pImageViewer = ViewImage2D;
+
+        EstudioReferido->SetViewer(ViewImage2D);
+        ViewImage2D->SetInputConnection(EstudioReferido->renderConnection);
+
+        GNC::GCS::Events::EventoModificacionImagen evtModificacionImagen(IVista);
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->Registrar(this, evtModificacionImagen);
+
+        m_pObserverVTK = GVtkObserver::New();
+        m_pObserverVTK->Setup(IVista);
+
+        ViewImage2D->AddObserver ( vtkGinkgoImageViewer::ViewImageZoomChangeEvent, m_pObserverVTK );
+        ViewImage2D->AddObserver ( vtkGinkgoImageViewer::ViewImagePositionChangeEvent, m_pObserverVTK );
+
+        AtencionPrimaria::Events::EventoZoom evtZoom(IVista);
+        AtencionPrimaria::Events::ChangePositionEvent evtChange(IVista);
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->Registrar(this, evtZoom);
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->Registrar(this, evtChange);
+
+        this->Connect(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(GVistaSimple::OnFocus),NULL,this);
+        ViewInteractor2D->Connect(wxEVT_KEY_DOWN,wxKeyEventHandler(GVistaSimple::OnChar),NULL,this);
+        this->Layout();
+}
+
+GVistaSimple::~GVistaSimple()
+{
+        if(m_pObserverVTK != NULL) {
+                m_pObserverVTK->Delete();
+                m_pObserverVTK = NULL;
+        }
+        this->Disconnect(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(GVistaSimple::OnFocus),NULL,this);
+        ViewInteractor2D->Disconnect(wxEVT_KEY_DOWN,wxKeyEventHandler(GVistaSimple::OnChar),NULL,this);
+
+        this->Disconnect( wxEVT_SIZE, wxSizeEventHandler( GVistaSimple::OnSize ) );
+
+        //abortamos comandos antes de cargarnos nada!
+        //m_pEntorno->GetCommandController()->AbortarComandosDeOwner(IVista);
+
+        ViewImage2D->Detach();
+        //necesario para que no haga un doble delete
+        EstudioReferido->SetViewer(NULL);
+        //ViewInteractor2D->Reparent(NULL);
+        ViewInteractor2D->Delete();
+
+}
+
+void GVistaSimple::OnSize( wxSizeEvent& /*event*/ )
+{
+        this->Layout();
+}
+
+void GVistaSimple::OnPaint( wxPaintEvent& /*event*/ )
+{
+        wxPaintDC dc(this);
+        dc.SetBrush(wxBrush(wxColor(0,0,0)));
+        dc.DrawRectangle(this->GetClientRect());
+}
+
+void GVistaSimple::setEstudioReferido(const GNC::GCS::Ptr<GNC::GCS::IStudyContext>& parent)
+{
+        EstudioReferido = GNC::GCS::IStudyContext::NewRef(parent);
+        ViewImage2D->RemoveInputs();
+        EstudioReferido->SetViewer(ViewImage2D);
+        ViewImage2D->SetInputConnection(EstudioReferido->renderConnection);
+}
+
+void GVistaSimple::UnRefIVista()
+{
+        IVista = NULL;
+        m_pObserverVTK->Setup(NULL);
+}
+
+void GVistaSimple::RefrescarOverlays(const GNKVisualizator::TEstadoOverlay& estadoOverlays)
+{
+        if(!m_pListaOverlays.IsValid()) {
+                ViewImage2D->SetOverlay(NULL);
+        } else {
+                vtkImageMathematics* pBlend = NULL;
+
+                if(m_pListaOverlays->size()>0) {
+                        int i=0;
+                        vtkImageMathematics* pUltimoBlend = NULL;
+                        for(GNKVisualizator::TListaOverlays::iterator itOverlays = m_pListaOverlays->begin(); itOverlays!=m_pListaOverlays->end(); ++itOverlays) {
+                                bool oculto = false;
+                                if(estadoOverlays.find((*itOverlays).indice) != estadoOverlays.end()) {
+                                        oculto = (*estadoOverlays.find((*itOverlays).indice)).second;
+                                }
+
+                                if(!oculto) {
+                                        if(i==0) {
+                                                pBlend = vtkImageMathematics::New();
+                                                pBlend->SetOperationToMax();
+                                                pBlend->SetInput1Data((*itOverlays).img);
+                                                pBlend->SetInput2Data((*itOverlays).img);
+                                                pUltimoBlend = pBlend;
+                                        } else {
+                                                vtkImageMathematics* otroBlend = vtkImageMathematics::New();
+                                                otroBlend->SetOperationToMax();
+                                                pUltimoBlend->SetInput2Data(otroBlend->GetOutput());
+                                                otroBlend->SetInput1Data((*itOverlays).img);
+                                                otroBlend->SetInput2Data((*itOverlays).img);
+                                                pUltimoBlend = otroBlend;
+                                                otroBlend->Delete();
+                                        }
+                                        i++;
+                                }
+                        }
+                        if(pBlend != NULL) {
+                                pBlend->Update();
+                        }
+                }
+                if(pBlend != NULL) {
+                        ViewImage2D->SetOverlay(pBlend->GetOutput());
+                        pBlend->Delete();
+                } else {
+                        ViewImage2D->SetOverlay(NULL);
+                }
+        }
+}
+
+void GVistaSimple::SetOverlays(GNC::GCS::Ptr<GNKVisualizator::TListaOverlays>& pListaOverlays, const GNKVisualizator::TEstadoOverlay& estadoOverlays)
+{
+        m_pListaOverlays = pListaOverlays;
+        RefrescarOverlays(estadoOverlays);
+}
+
+GNC::GCS::Ptr<GNC::GCS::IReferredStudyContext>& GVistaSimple::GetEstudio()
+{
+        return EstudioReferido;
+}
+
+void GVistaSimple::OnFocus(wxChildFocusEvent& /*event*/)
+{
+        if (IVista != NULL) {
+                IVista->OnFocus();
+        }
+}
+
+void GVistaSimple::ResetTimeInstant()
+{
+        ViewImage2D->SetTindex(0);
+}
+
+void GVistaSimple::OnChar( wxKeyEvent& event )
+{
+        event.ResumePropagation(3);
+        event.Skip(true);
+}
+
+void GVistaSimple::OnMouseWheel( wxMouseEvent& event )
+{
+        event.ResumePropagation(2);
+        event.Skip(true);
+}
+
+void GVistaSimple::OnTimeInstantChanged(wxScrollEvent& event)
+{
+        int pos = m_pSliderTimeInstant->GetValue();
+        if (pos != ViewImage2D->GetTindex()) {
+                GoToTSlice(pos,false);
+        }
+        event.Skip(true);
+}
+
+void GVistaSimple::GoToTSlice(int pos, bool relativa)
+{
+        if (m_tDimensions <= 1) {
+                return;
+        }
+        int posicion;
+        if(relativa) {
+                posicion = ViewImage2D->GetTindex() + pos;
+        } else {
+                posicion = pos;
+        }
+
+        posicion = std::max<int>(0, std::min<int>(m_tDimensions - 1, posicion));
+
+        if (ViewImage2D->GetTindex() != posicion) {
+                m_pSliderTimeInstant->SetValue(posicion);
+
+                ViewImage2D->SetTindex(posicion);
+                ViewInteractor2D->Refresh(false);
+
+                //refrescar anotaciones y compañia
+                if (IVista != NULL) {
+                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(IVista,GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas));
+                }
+        }
+}
+
+void GVistaSimple::GoToSlice(int pos, bool relativa, bool /*propagar*/)
+{
+        int posicion;
+        if(relativa) {
+                posicion = EstudioReferido->ActiveFileIndex + pos;
+        } else {
+                posicion = pos;
+        }
+
+        posicion = std::max<int>(0, std::min<int>(EstudioReferido->GetSliceNumber(), posicion));
+
+        //se le indica al manager el vid
+        this->ViewInteractor2D->SetVID(posicion, false);
+        EstudioReferido->SetActiveIndex(posicion);
+
+        ActualizarTSlider();
+}
+
+void GVistaSimple::ActualizarTSlider()
+{
+        ViewImage2D->SetTindex(0);
+
+        m_tDimensions = EstudioReferido->GetTSizeActive();
+        if (m_tDimensions == 1) {
+                m_pSliderTimeInstant->SetRange(1, 2);
+                if (m_pSliderTimeInstant->IsShown()) {
+                        m_pSliderTimeInstant->Show(false);
+                        this->Layout();
+                        ViewInteractor2D->Refresh(true);
+                }
+        } else {
+                m_pSliderTimeInstant->SetRange(0, m_tDimensions - 1);
+                if (!m_pSliderTimeInstant->IsShown()) {
+                        m_pSliderTimeInstant->Show(true);
+                        this->Layout();
+                        ViewInteractor2D->Refresh(true);
+                }
+        }
+        m_pSliderTimeInstant->SetValue(0);
+}
+
+//endregion
+
+inline bool my_isnan(double x)
+{
+        return x != x;
+}
+
+inline bool my_isnan(float x)
+{
+        return x != x;
+}
+
+//region "Interfaz de impresion de overlays de widgets"
+std::string GVistaSimple::ImprimirOverlay(GNC::GCS::Widgets::IWidget* w, vtkGinkgoImageViewer* /*pViewer*/)
+{
+        if (!w->EsMarcador()) {
+                return "";
+        }
+
+        GNC::GCS::TexturaCairo tc;
+
+        double posMundo[4] = {0.0, 0.0, 0.0, 1.0};
+        GNC::GCS::Vector            posimagen;
+        GNC::GCS::Vector            puntoAnclaje;
+        GNC::GCS::Vector            bBox[2];
+
+        GNC::GCS::Vector            tamTexto;
+
+        std::ostringstream          os;
+
+        os.setf(ios::floatfield, ios::fixed );
+        os.precision(2);
+        os.fill('0');
+
+        double spacing[3] = {0.0, 0.0, 0.0};
+
+        bool hasSpacing = EstudioReferido->GetSpacingActive(spacing[0], spacing[1], spacing[2]);
+
+        w->GetPosicion(posimagen);
+        {
+                double arrIm[3] = {posimagen.x, posimagen.y, 0.0};
+                ViewImage2D->CoordenadasImagenACoordenadasMundo(arrIm, posMundo);
+        }
+
+        w->GetBoundingBox(bBox[0], bBox[1]);
+        //el bounding box hay que cambiarlo a coordenadas pixel
+        {
+                ViewImage2D->CoordenadasImagenACoordenadasPixel(bBox[0]);
+                ViewImage2D->CoordenadasImagenACoordenadasPixel(bBox[1]);
+        }
+
+        //para las rgb solo se imprime rgb para los puntos y poligonos
+        if(EstudioReferido->Viewer->GetNumberOfComponents() == 3) {
+                if (w->DelimitaArea()) {
+                        float perimetro = w->GetPerimetro();
+                        float area = w->GetAreaMetrica();
+
+                        os << _Std("Area      : ");
+
+                        if (my_isnan(area)) {
+                                os << _Std("undetermined") << std::endl;
+                        } else {
+
+                                if (hasSpacing) {
+                                        if (area > (double)1000000.0f) {
+                                                os << area / (double)1000000.0f << " m²." << std::endl;
+                                        } else if (area > (double)100.0f) {
+                                                os << area / (double)100.0f << " cm²." << std::endl;
+                                        } else if (area < 1.0f) {
+                                                os << area * (double)1000000.0f << " µm²." << std::endl;
+                                        } else {
+                                                os << area << " mm²." << std::endl;
+                                        }
+                                } else {
+                                        os << area << "px²." << std::endl;
+                                }
+                        }
+                        os << _Std("Perimeter : ");
+                        if (hasSpacing) {
+                                if (perimetro > (double)1000.0f) {
+                                        os << perimetro / (double)1000.0f << " m.";
+                                } else if (perimetro > (double)10.0f) {
+                                        os << perimetro / (double)10.0f << " cm.";
+                                } else if (perimetro < 1.0f) {
+                                        os << perimetro * (double)1000.0f << " µm." << std::endl;
+                                } else {
+                                        os << perimetro << " mm.";
+                                }
+                        } else {
+                                os << perimetro << " px.";
+                        }
+                } else if(!w->DelimitaTendencia()) {
+                        //se imprime r = tal g = tal y b=tal
+
+                        vtkDataArray* scalars = EstudioReferido->Viewer->GetScalars();
+                        if (scalars != NULL) {
+                                double ip[3] = {posimagen.x, posimagen.y, 0.0};
+                                int pp[3];
+                                int dims[3];
+
+                                EstudioReferido->GetDimensionsActiveImage(dims[0], dims[1], dims[2]);
+
+                                ViewImage2D->CoordenadasImagenACoordenadasPixel(ip, pp);
+
+                                if (pp[0] >= 0 && pp[0] < dims[0] && pp[1] >= 0 && pp[1] < dims[1]) {
+                                        unsigned int off = (dims[0] * dims[1] * ViewImage2D->GetTindex()) + (pp[1] * dims[0] + pp[0]);
+                                        double tuple[3];
+                                        scalars->GetTuple(off, tuple);
+                                        os << _Std("Position   : ") << posMundo[0] << ", " << posMundo[1] << ", " << posMundo[2] << std::endl;
+                                        os << _Std("RGB (") << (int) tuple[0] << ", " << (int) tuple[1] << "," << (int) tuple[2] << ")";
+                                } else {
+                                        os.clear();
+                                }
+                        } else {
+                                os.clear();
+                        }
+                } else {
+                        os.clear();
+                }
+        } else if (EstudioReferido->Viewer->GetNumberOfComponents() == 1) {
+                //para los de una componente se imprime todo teniendo en cuenta el valor del pixel en esa posicion
+                if (w->DelimitaTendencia()) {
+                        std::list<GNC::GCS::Vector> recorrido;
+                        w->GetRecorrido(recorrido);
+
+                        if (!recorrido.empty()) {
+                                std::list<GNC::GCS::Vector>::iterator it;
+
+                                float val0 = 0.0f;
+                                float val1 = 0.0f;
+                                float diff = 0.0f;
+                                float prop = 0.0f;
+
+                                posimagen = recorrido.front();
+
+                                it = recorrido.begin();
+                                ++it;
+                                {
+                                        double arrIm[3] = {posimagen.x, posimagen.y, 0.0};
+                                        ViewImage2D->CoordenadasImagenACoordenadasMundo(arrIm, posMundo);
+                                        os << _Std("Position   : ") << posMundo[0] << ", " << posMundo[1] << ", " << posMundo[2] << std::endl;
+                                }
+
+                                for (; it != recorrido.end(); ++it) {
+                                        double arrIm[3] = {(*it).x, (*it).y, 0.0};
+                                        double mundoTmp[4];
+                                        ViewImage2D->CoordenadasImagenACoordenadasMundo(arrIm, mundoTmp);
+                                        os << " -> " << mundoTmp[0] << ", " << mundoTmp[1] << ", " << mundoTmp[2];
+                                }
+                                os << std::endl;
+
+                                it = recorrido.begin();
+                                ++it;
+                                // Obtener valoracion p0
+                                val0 = ObtenerValoracion(posimagen);
+                                os << _Std("Rating   : ") << val0;
+                                for (; it != recorrido.end(); ++it) {
+                                        val1 = ObtenerValoracion(*it);
+                                        diff = val1 - val0;
+                                        double* rango = ViewImage2D->GetInput()->GetScalarRange();
+                                        prop = 100.0f * (diff/(rango[1]-rango[0]));
+                                        os << " -> " << val1 << _Std("[DNorm =") << prop << "% ]";
+                                }
+                        }
+                } else if (w->DelimitaArea()) {
+                        //float valor = 0.0f;
+                        float media = 0.0f;
+                        float varianza = 0.0f;
+                        float perimetro = w->GetPerimetro();
+                        float area = 0.0f;
+
+                        //valor = ObtenerValoracion(posmundo);
+                        ObtenerEstadisticos(w, &GNC::GCS::Widgets::IWidget::ContieneFast, bBox, NULL, &media, &varianza);
+                        // Se obtuvo el area en pixels absolutos. La despreciamos y recalculamos el area metrica (Ticket #245)
+                        area = w->GetAreaMetrica();
+#if 0
+                        os << "Coor. Centroide: " << posmundo.x << ", " << posmundo.y << std::endl;
+#endif
+                        os << _Std("Centroid Pos:") << posMundo[0] << ", " << posMundo[1] << ", " << posMundo[2] << std::endl;
+                        os << _Std("Area:");
+                        if (my_isnan(area)) {
+                                os << "indeterminada" << std::endl;
+                        } else {
+                                if (hasSpacing) {
+                                        if (area > (double)1000000.0f) {
+                                                os << area / (double)1000000.0f << " m²." << std::endl;
+                                        } else if (area > (double)100.0f) {
+                                                os << area / (double)100.0f << " cm²." << std::endl;
+                                        } else if (area < 1.0f) {
+                                                os << area * (double)1000000.0f << " µm²." << std::endl;
+                                        } else {
+                                                os << area << " mm²." << std::endl;
+
+                                        }
+                                } else {
+                                        os << area << " px²." << std::endl;
+                                }
+                        }
+                        os << _Std("Perimeter:");
+                        if (hasSpacing) {
+                                if (perimetro > (double)1000.0f) {
+                                        os << perimetro / (double)1000.0f << " m." << std::endl;
+                                } else if (perimetro > (double)10.0f) {
+                                        os << perimetro / (double)10.0f << " cm." << std::endl;
+                                } else if (perimetro < 1.0f) {
+                                        os << perimetro * (double)1000.0f << " µm." << std::endl;
+                                } else {
+                                        os << perimetro << " mm." << std::endl;
+                                }
+                        } else {
+                                os << perimetro << " px." << std::endl;
+                        }
+                        os << _Std("Rating: mean =") << media << _Std(", dev =") << varianza;
+                } else {
+                        float valor = 0.0f;
+                        valor = ObtenerValoracion(posimagen);
+                        os << _Std("Position   : ") << posMundo[0] << ", " << posMundo[1] << ", " << posMundo[2] << std::endl;
+                        os << _Std("Rating   : ") << valor;
+                }
+        } else {
+                os.clear();
+        }
+
+        return os.str();
+}
+
+//endregion
+
+
+float GVistaSimple::ObtenerValoracion(const GNC::GCS::Vector& vImagen)
+{
+        int pp[3];
+        double ip[3] = {vImagen.x, vImagen.y, 0.0};
+        ViewImage2D->CoordenadasImagenACoordenadasPixel(ip, pp);
+
+        int dims[3];
+        ViewImage2D->GetDimensions(dims);
+
+        if (pp[0]>=0 && pp[0] < dims[0] && pp[1]>=0 && pp[1] < dims[1]) {
+                vtkSmartPointer<vtkImageData> pImg = ViewImage2D->GetDataObject();
+                if (pImg == NULL)
+                        return 0.0;
+
+                void *scalar = pImg->GetScalarPointer((int)pp[0],(int)pp[1],ViewImage2D->GetTindex());
+                double value = 0.0f;
+                if( scalar ) {
+                        switch (ViewImage2D->GetInput()->GetScalarType()) {
+                        case VTK_DOUBLE:
+                                value = (((double*)scalar)[0]);
+                                break;
+                        case VTK_FLOAT:
+                                value = (double) (((float*)scalar)[0]);
+                                break;
+                        case VTK_UNSIGNED_LONG:
+                                value = (double) (((unsigned long*)scalar)[0]);
+                                break;
+                        case VTK_LONG:
+                                value = (double) (((long*)scalar)[0]);
+                                break;
+                        case VTK_UNSIGNED_INT:
+                                value = (double) (((unsigned int*)scalar)[0]);
+                                break;
+                        case VTK_INT:
+                                value = (double) (((int*)scalar)[0]);
+                                break;
+                        case VTK_UNSIGNED_SHORT:
+                                value = (double) (((unsigned short*)scalar)[0]);
+                                break;
+                        case VTK_SHORT:
+                                value = (double) (((short*)scalar)[0]);
+                                break;
+                        case VTK_UNSIGNED_CHAR:
+                                value = (double) (((unsigned char*)scalar)[0]);
+                                break;
+                        case VTK_CHAR:
+                                value = (double) (((char*)scalar)[0]);
+                                break;
+                        }
+                }
+                return value;
+        }
+        return 0.0;
+}
+
+void GVistaSimple::ObtenerEstadisticos(GNC::GCS::Widgets::IWidget* w, GNC::GCS::Widgets::IWidget::Muestreador ptr, GNC::GCS::Vector boundingBox[2], double* area, float* media, float* varianza)
+{
+        int x, y;
+
+        int dims[3] = {0, 0, 0};
+
+        vtkSmartPointer<vtkImageData> pDataObject = ViewImage2D->GetDataObject();
+        if(pDataObject == NULL) {
+                return;
+        }
+
+        void* scalars = pDataObject->GetScalarPointer(0,0,ViewImage2D->GetTindex());
+        ViewImage2D->GetDimensions(dims);
+
+
+        double numPixels = 0.0f;
+        double sumas = 0.0f;
+        double sumasCuadrado = 0.0f;
+
+        double med = 0.0f;
+
+        GNC::GCS::Vector v;
+        if (area != NULL) {
+                *area = 0;
+        }
+
+        const int st = pDataObject->GetScalarType();
+        const unsigned long nc = pDataObject->GetNumberOfScalarComponents();
+
+#ifdef _GINKGO_DEBUG
+
+        //std::cout << "bbox: " << boundingBox[0] << ", " << boundingBox[1] << std::endl;
+
+        //std::cout << "checking " << (double)boundingBox[0].x * spacing[0] + origin[0] << ", " << (double)-1.0f * (((double)boundingBox[0].y * spacing[1]) + origin[1]) << " - " << (double)boundingBox[1].x * spacing[0] + origin[0] << ", " << (double)-1.0f * (((double)boundingBox[1].y * spacing[1]) + origin[1]) << std::endl << std::endl;
+#endif
+
+        const unsigned long start = 0;
+        const unsigned int stride = nc * dims[0];
+        unsigned int size = dims[0] * dims[1] * nc;
+
+        for (y = boundingBox[0].y; y <= boundingBox[1].y; ++y) {
+                if (y >= 0 && y < dims[1]) {
+                        const unsigned long off = start + (y*stride);
+                        v.y = y;
+                        for (x = boundingBox[0].x; x <= boundingBox[1].x; ++x) {
+                                if (x >= 0 && x < dims[0]) {
+                                        const unsigned long ox = x * nc;
+                                        if(off+ox > size) {
+                                                continue;
+                                        }
+
+                                        v.x = x;
+                                        if ( (w->*ptr)(v) ) {
+
+                                                double pixel = 0.0f;
+                                                switch(st) {
+                                                case VTK_DOUBLE:
+                                                        pixel = ((double*)scalars)[off + ox];
+                                                        break;
+                                                case VTK_FLOAT:
+                                                        pixel = (double) ( ((float*)scalars)[off + ox] );
+                                                        break;
+                                                case VTK_UNSIGNED_LONG:
+                                                        pixel = (double) ( ((unsigned long*)scalars)[off + ox] );
+                                                        break;
+                                                case VTK_LONG:
+                                                        pixel = (double) ( ((long*)scalars)[off + ox] );
+                                                        break;
+                                                case VTK_UNSIGNED_INT:
+                                                        pixel = (double) ( ((unsigned int*)scalars)[off + ox] );
+                                                        break;
+                                                case VTK_INT:
+                                                        pixel = (double) ( ((int*)scalars)[off + ox] );
+                                                        break;
+                                                case VTK_UNSIGNED_SHORT:
+                                                        pixel = (double) ( ((unsigned short*)scalars)[off + ox] );
+                                                        break;
+                                                case VTK_SHORT:
+                                                        pixel = (double) ( ((short*)scalars)[off + ox] );
+                                                        break;
+                                                case VTK_UNSIGNED_CHAR:
+                                                        pixel = (double) ( ((unsigned char*)scalars)[off + ox] );
+                                                        break;
+                                                case VTK_CHAR:
+                                                        pixel = (double) ( ((char*)scalars)[off + ox] );
+                                                        break;
+                                                }
+                                                //std::cout << "Pixel[" << (int) numPixels << "] = " << pixel << std::endl;
+                                                sumas += pixel;
+                                                sumasCuadrado += (pixel * pixel);
+                                                numPixels += 1.0f;
+                                        }
+                                }
+                        }
+                }
+        }
+
+        double spacing[3];
+        ViewImage2D->GetSpacing(spacing);
+        if (area != NULL) {
+                *area = numPixels*spacing[0]*spacing[1];
+        }
+
+        if (numPixels > 0.0f) {
+                med = sumas / numPixels;
+        }
+
+        if (media != NULL) {
+                if (numPixels > 0.0f) {
+                        *media = (float)med;
+                } else {
+                        *media = 0.0f;
+                }
+        }
+        //std::cout << "NumPixels = " << numPixels << std::endl;
+        //std::cout << "sumas = " << sumas << std::endl;
+        //std::cout << "sumascuadrado = " << sumasCuadrado << std::endl;
+        if (varianza != NULL) {
+                if (numPixels > 0.0f) {
+                        double val = (sumasCuadrado / numPixels)  - (med * med);
+                        if (val > std::numeric_limits<double>::epsilon()) {
+                                *varianza = (float) std::sqrt( val );
+                        } else {
+                                *varianza = 0.0f;
+                        }
+                } else {
+                        *varianza = 0.0f;
+                }
+        }
+}
+
+void GVistaSimple::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        if ( IVista == NULL) {
+                return;
+        }
+        switch (evt->GetCodigoEvento()) {
+        case ginkgoEVT_GNKVisualizator_EventoZoom: {
+                AtencionPrimaria::Events::EventoZoom* pEvt = dynamic_cast<AtencionPrimaria::Events::EventoZoom*>(evt);
+                if(pEvt!=NULL) {
+                        m_pObserverVTK->LockZoom();
+                        ViewImage2D->SetZoom(pEvt->GetZoom());
+                        m_pObserverVTK->UnLockZoom();
+                }
+        }
+        break;
+        case ginkgoEVT_GNKVisualizator_ChangePositionEvent: {
+                AtencionPrimaria::Events::ChangePositionEvent* pEvt = dynamic_cast<AtencionPrimaria::Events::ChangePositionEvent*>(evt);
+                if(pEvt!=NULL) {
+                        m_pObserverVTK->LockPan();
+                        ViewImage2D->SetRelativePositionOfCamera(pEvt->GetFocal(), pEvt->GetPosition());
+                        m_pObserverVTK->UnLockPan();
+                }
+        }
+        break;
+        case ginkgoEVT_Core_ModificacionImagen: {
+                GNC::GCS::Events::EventoModificacionImagen* pEvt = dynamic_cast<GNC::GCS::Events::EventoModificacionImagen*>(evt);
+                if (pEvt != NULL  && ( pEvt->GetSliceAfectado() == -1 || pEvt->GetSliceAfectado() == EstudioReferido->ActiveFileIndex) ) {
+                        switch (pEvt->GetTipo()) {
+                        case GNC::GCS::Events::EventoModificacionImagen::ImagenCargada: {
+                                ActualizarTSlider();
+                        }
+                        break;
+                        case GNC::GCS::Events::EventoModificacionImagen::SliceCambiado: {
+                                ActualizarTSlider();
+                        }
+                        break;
+                        case GNC::GCS::Events::EventoModificacionImagen::ImagenDescargada: {
+                        }
+                        break;
+
+                        case GNC::GCS::Events::EventoModificacionImagen::ImagenModificada:
+                        case GNC::GCS::Events::EventoModificacionImagen::ImagenRecalibrada:
+                        case GNC::GCS::Events::EventoModificacionImagen::MapaModificado:
+                        case GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas:
+                        default:
+                                break;
+                        }
+                }
+        }
+        default:
+                break;
+        }
+}
+
+
diff --git a/visualizator/visualizator/wxvtk/gvistasimple.h b/visualizator/visualizator/wxvtk/gvistasimple.h
new file mode 100644
index 0000000..d24b161
--- /dev/null
+++ b/visualizator/visualizator/wxvtk/gvistasimple.h
@@ -0,0 +1,117 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#include "visualizatorviews.h"
+#include <api/controllers/ieventscontroller.h>
+#include <api/iwidgets.h>
+#include <api/icontexto.h>
+#include <api/observers/ieventsobserver.h>
+#include "../estudios/overlay.h"
+
+#include <vtkCommand.h>
+
+namespace GNC
+{
+namespace GCS
+{
+class IEntorno;
+}
+}
+
+namespace GNKVisualizator
+{
+class Vista2D;
+}
+
+class GVtkObserver;
+class IconoImagenCtrl;
+class vtkAlgorithmOutput;
+class vtkImageData;
+
+class GVistaSimple: public VistaSimpleBase, public GNC::GCS::IImpresorOverlay, public GNC::GCS::IEventsObserver
+{
+public:
+        /* Constructor */
+        GVistaSimple( GNKVisualizator::Vista2D* pIVista, wxWindow* pParent);
+        /* Destructor */
+        ~GVistaSimple();
+
+        virtual void OnSize( wxSizeEvent& event );
+        virtual void OnPaint( wxPaintEvent& event );
+
+        virtual void setEstudioReferido(const GNC::GCS::Ptr<GNC::GCS::IStudyContext>& parent);
+
+        virtual void UnRefIVista();
+
+        void RefrescarOverlays(const GNKVisualizator::TEstadoOverlay& estadoOverlays);
+        void SetOverlays(GNC::GCS::Ptr<GNKVisualizator::TListaOverlays>& pListaOverlays,const GNKVisualizator::TEstadoOverlay& estadoOverlays);
+
+        GNC::GCS::Ptr<GNC::GCS::IReferredStudyContext>& GetEstudio();
+
+        vtkImageData* GetImage()
+        {
+                return ViewImage2D->GetInput();
+        };
+
+        //region "Eventos"
+        void OnMenuVerClick(wxCommandEvent& event);
+        void OnMenuCineClick(wxCommandEvent& event);
+
+        void OnFocus(wxChildFocusEvent &event);
+
+        void ResetTimeInstant();
+
+        void OnChar( wxKeyEvent& event );
+
+        void OnMouseWheel( wxMouseEvent& event );
+
+        void OnTimeInstantChanged(wxScrollEvent& event);
+
+        void GoToTSlice(int posicion, bool relativa =  true);
+
+        void GoToSlice(int posicion, bool relativa =  true, bool propagar = true);
+
+        void ActualizarTSlider();
+
+        //endregion
+
+        //region "Interfaz de impresion de overlays de widgets"
+        virtual std::string ImprimirOverlay(GNC::GCS::Widgets::IWidget* w, vtkGinkgoImageViewer* pViewer);
+        //endregion
+
+        //region "Helpers"
+        float ObtenerValoracion(const GNC::GCS::Vector& v);
+        void ObtenerEstadisticos(GNC::GCS::Widgets::IWidget* w, GNC::GCS::Widgets::IWidget::Muestreador ptr, GNC::GCS::Vector boundingBox[2], double* area, float* media, float* varianza);
+        //endregion
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent *evt) ;
+
+protected:
+        GNKVisualizator::Vista2D*                  IVista;
+        GNC::GCS::Ptr<GNC::GCS::IReferredStudyContext> EstudioReferido;
+        GVtkObserver*                              m_pObserverVTK;
+        int													 m_tDimensions;
+
+        GNC::GCS::Ptr<GNKVisualizator::TListaOverlays> m_pListaOverlays;
+        friend class GVistaCompleja;
+};
diff --git a/visualizator/visualizator/wxvtk/gwaveformview.cpp b/visualizator/visualizator/wxvtk/gwaveformview.cpp
new file mode 100644
index 0000000..a3e8641
--- /dev/null
+++ b/visualizator/visualizator/wxvtk/gwaveformview.cpp
@@ -0,0 +1,446 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+#include "gwaveformview.h"
+#include <main/controllers/configurationcontroller.h>
+#include <main/entorno.h>
+#include <eventos/modificacionimagen.h>
+#include <eventos/modificacionwidget.h>
+#include <eventos/render.h>
+#include <wx/pen.h>
+#include <wx/wxginkgotoolbar.h>
+#include <api/iannotator.h>
+#include <wx/ginkgostyle/ginkgostyle.h>
+
+#include <visualizator/vistas/waveformview.h>
+#include <visualizator/estudios/visualizatorstudy.h>
+#include <main/controllers/commandcontroller.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/controllers/icontroladorvistas.h>
+#include <api/iwidgetsrenderer.h>
+#include <api/iwidgetsmanager.h>
+#include <visualizator/widgets/wecg.h>
+#include <vtk/widgets/widgetsactor.h>
+#include <widgets/wanotacionesquina.h>
+
+#include <resources/visualizatorresourcesmanager.h>
+#include <export/tools/iherramientascore.h>
+#include <visualizator/export/tools/ivisualizatortools.h>
+#include <export/contracts/iwidgetscontract.h>
+#include <export/contracts/irulecontract.h>
+#include <api/toolsystem/itoolcontroller.h>
+#include <api/toolsystem/itool.h>
+
+
+#define ID_BUTTON_METADATA 0
+#define CUSTOM_ANNOTATOR_TEXT_COLOR 0.1f, 0.1f, 0.1f, 1.0f
+
+namespace GNKVisualizator
+{
+namespace GUI
+{
+class GWaveformViewDelegate: public GNC::GCS::IRuleContract
+{
+public:
+        GWaveformViewDelegate(GWaveformView* gView):GView(gView)
+        {
+        }
+        ~GWaveformViewDelegate()
+        {
+        }
+
+        GNC::GCS::IWidgetsManager* GetManager()
+        {
+                return GView->m_pManager;
+        }
+
+        virtual bool SupportsCallibration()
+        {
+                return false;
+        }
+protected:
+        GWaveformView* GView;
+};
+////////////////////GWaveform annotator delegate
+class GWaveformAnnotatorDelegate: public GNC::GCS::IAnnotator
+{
+public:
+        GWaveformAnnotatorDelegate(GWaveformView* gView, GNKVisualizator::WaveFormView* pView):GNC::GCS::IAnnotator(pView),
+                GView(gView)
+        {
+        }
+        ~GWaveformAnnotatorDelegate()
+        {
+        }
+
+        virtual std::string GetAnnotationValue(GNC::GCS::Contexto3D* c, const std::string& key)
+        {
+                if (key == "${SLICE.WL.FULLTEXT}") {
+                        return "";
+                } else if (key == "${SLICE.IDX.FULLTEXT}") {
+                        return "";
+                } else if (key == "${VIEW.COORDLABELS}") {
+                        std::ostringstream os;
+                        os << "25 mm/s, 10 mm/mV";
+                        return os.str();
+                }
+                return GNC::GCS::IAnnotator::GetAnnotationValue(c, key);
+        }
+
+
+
+protected:
+        GWaveformView* GView;
+};
+
+/* Constructor */
+GWaveformView::GWaveformView(GNKVisualizator::WaveFormView* pView) : GWaveformViewBase(pView->GetEstudio()->ParentWindow),
+        Delegate(new GWaveformViewDelegate(this)),
+        AnnotatorDelegate(new GWaveformAnnotatorDelegate(this, pView))
+{
+        View = pView;
+        WECG = NULL;
+
+        ViewImage2D->SetBackgroundColor(0.0f,0.0f,0.0f);
+        ViewInteractor2D->m_pImageViewer = ViewImage2D;
+        View->GetEstudio()->SetViewer(ViewImage2D);
+        ViewImage2D->SetInputConnection(View->GetEstudio()->renderConnection);
+        ViewImage2D->SetShowAnnotations(false);
+        ViewImage2D->SetInteractionStyle(vtkGinkgoImageViewer::ZOOM_INTERACTION);
+
+        // Setup del manejador de widgets */
+        m_pManager = GNC::GCS::IEntorno::Instance()->NewWidgetsManager(View);
+        m_pManager->SetAnnotator(AnnotatorDelegate);
+        ViewInteractor2D->SetManager(m_pManager);
+        ViewInteractor2D->SetVID(0,false);
+        m_pManager->SetRendererActivo(ViewInteractor2D);
+
+        WidgetRepresentation* pWidgetsRepresentation = WidgetRepresentation::New();
+        pWidgetsRepresentation->SetRenderer(ViewInteractor2D->FindPokedRenderer(0,0));
+        ViewInteractor2D->FindPokedRenderer(0,0)->AddViewProp(pWidgetsRepresentation);
+        ViewInteractor2D->SetRepresentation(pWidgetsRepresentation);
+        pWidgetsRepresentation->SetWidgetsManager(m_pManager);
+        pWidgetsRepresentation->SetWidgetsRenderer(ViewInteractor2D);
+        pWidgetsRepresentation->Delete();
+
+        //toolbar
+        GNC::GCS::IToolController* pToolBar = View->GetToolController();
+        //widgets...
+        pToolBar->AddTool(HCore_Pointer, (GNC::GCS::IWidgetsContract*) Delegate);
+        pToolBar->AddTool(HCore_Zoom, (GNC::GCS::IWidgetsContract*) Delegate);
+        pToolBar->AddTool(HCore_Pan, (GNC::GCS::IWidgetsContract*) Delegate);
+        pToolBar->AddTool(HCore_Angulo, (GNC::GCS::IWidgetsContract*) Delegate);
+        pToolBar->AddTool(HGNKVisualizator_ECGRule, (GNC::GCS::IWidgetsContract*) Delegate);
+        pToolBar->AddTool(HCore_Nota, (GNC::GCS::IWidgetsContract*) Delegate);
+        pToolBar->AddTool(HCore_Marcado, (GNC::GCS::IWidgetsContract*) Delegate);
+        //view menu...
+        pToolBar->AddTool(HCore_CornerAnnotations, (GNC::GCS::IWidgetsContract*) Delegate);
+#if !defined(__WXGTK__)
+        pToolBar->AddTool(HCore_DetachWindow, (GNC::GCS::IViewContract*) View);
+#endif
+        pToolBar->AddTool(HCore_MetricGrid, (GNC::GCS::IWidgetsContract*) Delegate);
+        pToolBar->AddTool(HCore_Reset, (GNC::GCS::IWidgetsContract*) Delegate);
+
+        pToolBar->AddTool(HCore_SecondaryCapture, (GNC::GCS::IWidgetsContract*) Delegate);
+        pToolBar->AddTool(HCore_ImageExport, (GNC::GCS::IWidgetsContract*) Delegate);
+        //tools
+        pToolBar->AddTool(HCore_ShowDicomTags, (GNC::GCS::IViewContract*) View);
+        pToolBar->AddTool(HCore_ShowHistory, (GNC::GCS::IViewContract*) View);
+        pToolBar->AddTool(HCore_PACSUpload, (GNC::GCS::IViewContract*) View);
+        pToolBar->AddTool(HCore_Deshacer, (GNC::GCS::IViewContract*) View);
+        m_pSizerTools->Add(pToolBar->CreateNewToolBar(this, GNC::GCS::ITool::TFamiliaVisualizacion), 0, wxEXPAND);
+        m_pSizerTools->Add(pToolBar->CreateNewToolBar(this, GNC::GCS::ITool::TFamiliaMedicion), 0, wxEXPAND);
+        m_pSizerTools->Add(pToolBar->CreateNewToolBar(this, GNC::GCS::ITool::TFamiliaAnotacion), 0, wxEXPAND);
+
+        {
+                GNC::GCS::IToolController::TIdList listids;
+                listids.push_back(HCore_ShowHistory);
+                wxWindow* pwxToolBar = pToolBar->CreateNewToolBar(this, listids, false);
+                m_pSizerTools->Add(pwxToolBar, 1, wxEXPAND);
+        }
+
+        //events
+        GNC::GCS::Events::EventoModificacionImagen ev2(View);
+        GNC::GCS::Events::EventoModificacionWidget ev3(View);
+        GNC::GCS::Events::EventoRender ev4(View);
+
+        m_pButtonBar = new wxGinkgoToolBar(m_pManipulationPanel, wxColour(0x40, 0x40, 0x40));
+        m_pButtonBar->AddTool(ID_BUTTON_METADATA,_("Show/Hide metadata"),GNKVisualizator::ResourcesManager::ToolIcons::GetIcoECGMetadata(),_("Show/Hide metadata"));
+        m_pButtonBar->Connect(ID_BUTTON_METADATA,wxEVT_COMMAND_TOOL_CLICKED, wxCommandEventHandler( GWaveformView::OnShowHideMetadata),NULL,this);
+
+        {
+                GNC::GCS::IToolController::TIdList toolsLeft;
+                toolsLeft.push_back(HCore_CornerAnnotations);
+                wxWindow* toolBarLeft = pToolBar->CreateNewToolBar(m_pManipulationPanel, toolsLeft);
+                m_pSizerRight->Add(toolBarLeft,0, wxALIGN_CENTER_VERTICAL|wxEXPAND,0);
+        }
+
+        m_pButtonBar->Realize();
+        m_pSizerRight->Add(m_pButtonBar,0, wxALIGN_CENTER_VERTICAL|wxEXPAND,0);
+
+        //connect key events..
+        pToolBar->ConnectKeyEvents(this);
+
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->Registrar(this, ev2);
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->Registrar(this, ev3);
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->Registrar(this, ev4);
+
+        bool showMetadata = false;
+        // if metadata is shown at start, zoom will be broken
+        //	GNC::GCS::ConfigurationController::Instance()->readBoolUser("/GNKVisualizator/ECGView", "ShowMetadata", showMetadata, true);
+        ShowMetaData(showMetadata);
+
+        this->Connect(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(GWaveformView::OnFocus),NULL,this);
+
+        Layout();
+}
+
+GWaveformView::~GWaveformView()
+{
+        this->Disconnect(wxEVT_CHILD_FOCUS, wxChildFocusEventHandler(GWaveformView::OnFocus),NULL,this);
+        if (View != NULL) {
+                GNC::GCS::IEntorno::Instance()->GetCommandController()->AbortarComandosDeOwner(View);
+                View->GetToolController()->FinalizeToolController();
+        }
+
+        m_pManager->EliminarTodosLosWidgets(false);
+
+        ViewInteractor2D->SetRepresentation(NULL);
+
+        GNC::GCS::IEntorno::Instance()->FreeWidgetsManager(m_pManager);
+        m_pManager = NULL;
+
+        ViewImage2D->Detach();
+        ViewImage2D->Delete();
+        ViewImage2D = NULL;
+
+        ViewInteractor2D->Delete();
+        ViewInteractor2D = NULL;
+
+        if (View != NULL) {
+                View->Lock();
+                delete View;
+        }
+}
+
+void GWaveformView::InitPipeline()
+{
+        ViewImage2D->SetInputConnection(View->GetEstudio()->renderConnection);
+
+        m_pComboGroups->Clear();
+
+        std::list<std::string> listOfLabels = View->GetECGStudy()->GetLabelOfMultiplexGroups();
+        for (std::list<std::string>::iterator it = listOfLabels.begin(); it != listOfLabels.end(); ++it) {
+                m_pComboGroups->AppendString(wxString::FromUTF8((*it).c_str()));
+        }
+        m_pComboGroups->Select(0);
+
+        if(ViewImage2D != NULL) {
+                // FIXME: Comprobar si el pipeline esta conectado.
+                ViewImage2D->SetupPipeline();
+
+                WECG = new GNKVisualizator::Widgets::WECG(GetManager(), 0);
+                GetManager()->InsertarWidget(WECG, false);
+
+                if (!View->GetECGStudy()->Ok()) {
+                        wxMessageBox(_("Error loading study with ecg view"), _("Error"), wxOK, NULL);
+                } else {
+                        WECG->Reload(View->GetECGStudy()->GetListOfChannels());
+                        WECG->AutoCallibrate();
+
+                        m_pTextDiagnosis->SetValue(wxString::FromUTF8(View->GetECGStudy()->GetDiagnosis().c_str()));
+                        m_pTextMeasurements->SetValue(wxString::FromUTF8(View->GetECGStudy()->GetGlobalMeasurement().c_str()));
+
+                        //change color to widget anotacionesesquina
+                        for( GNC::GCS::ListaWidgets::iterator it = m_pManager->GetListaWidgets().begin(); it != m_pManager->GetListaWidgets().end(); ++it) {
+                                GNC::GCS::Widgets::IWidget* w = *it;
+                                if (w->GetVID() == -1) {
+                                        GNC::GCS::Widgets::WAnotador* wac = dynamic_cast<GNC::GCS::Widgets::WAnotador*> (w);
+                                        if (wac != NULL) {
+                                                wac->SetTextColor(GNC::GCS::GLHelper::TColor(CUSTOM_ANNOTATOR_TEXT_COLOR));
+                                        }
+                                }
+                        }
+                }
+        }
+}
+
+void GWaveformView::StopPipeline()
+{
+        View->GetToolController()->SaveStatus("viewer.waveform");
+        if (m_pManager != NULL) {
+                m_pManager->OcultarTodosLosWidgets(true, 666);
+                m_pManager->DisableAnimation();
+                m_pManager->Render();
+        }
+}
+
+void GWaveformView::OnFinishLoad()
+{
+        View->GetToolController()->InitializeToolController();
+        View->GetToolController()->LoadStatus("viewer.waveform");
+        m_pManager->OcultarTodosLosWidgets(true, 666);
+        m_pManager->DisableAnimation();
+        m_pManager->Render();
+}
+
+GNC::GCS::IWidgetsManager* GWaveformView::GetManager()
+{
+        return m_pManager;
+}
+
+void GWaveformView::OnPaint(wxPaintEvent& event)
+{
+        //std::cout << "GVistaCompleja::OnPaint()" << std::endl;
+        GWaveformViewBase::OnPaint(event);
+        if(GNC::GCS::IEntorno::Instance()->GetControladorVistas()->GetVistaActiva() == View) {
+                wxPaintDC dc(this);
+                wxColour colorLineaSeleccion(219, 219, 0, 255);
+                dc.SetBrush(wxBrush(colorLineaSeleccion,wxTRANSPARENT));
+                dc.SetPen(wxPen(colorLineaSeleccion, 3, wxSOLID));
+                dc.DrawRectangle(wxRect(wxPoint(1, 1), wxPoint(dc.GetSize().x-1, dc.GetSize().y-1)));
+        }
+}
+
+void GWaveformView::OnComboGroup(wxCommandEvent &)
+{
+        View->GetECGStudy()->SetIndexOfActualMultiplexGroup(m_pComboGroups->GetSelection());
+        WECG->Reload(View->GetECGStudy()->GetListOfChannels());
+        WECG->AutoCallibrate();
+
+        m_pTextDiagnosis->SetValue(wxString::FromUTF8(View->GetECGStudy()->GetDiagnosis().c_str()));
+        m_pTextMeasurements->SetValue(wxString::FromUTF8(View->GetECGStudy()->GetGlobalMeasurement().c_str()));
+}
+
+void GWaveformView::OnShowHideMetadata(wxCommandEvent &)
+{
+        ShowMetaData(!m_pPanelMetadata->IsShown());
+        GNC::GCS::ConfigurationController::Instance()->writeBoolUser("/GNKVisualizator/ECGView", "ShowMetadata", m_pPanelMetadata->IsShown());
+}
+
+void GWaveformView::ShowMetaData(bool show)
+{
+        if (show && ! m_pSplitterPanel->IsSplit()) {
+                //show
+                m_pSplitterPanel->SplitHorizontally(m_pPanelView, m_pPanelMetadata, -100);
+        } else if (!show && m_pSplitterPanel->IsSplit()) {
+                //hide
+                m_pSplitterPanel->Unsplit(m_pPanelMetadata);
+        }
+}
+
+void GWaveformView::OnShowHideCornerAnnotations(wxCommandEvent &)
+{
+        m_pManager->ShowAnnotations(!m_pManager->IsShownAnnotations());
+        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoRender(View));
+}
+
+
+void GWaveformView::OnFocus(wxChildFocusEvent &)
+{
+        if (View != NULL) {
+                View->OnFocus();
+        }
+}
+
+void GWaveformView::PreProcesarEvento(GNC::GCS::Events::IEvent* evt, std::list<GNC::GCS::Events::IEvent*>& lista)
+{
+        if (evt == NULL) {
+                std::cerr << "Error: Evento nulo" << std::endl;
+                return;
+        }
+        switch (evt->GetCodigoEvento()) {
+        case ginkgoEVT_Core_ModificacionImagen: {
+                GNC::GCS::Events::EventoModificacionImagen* pEvt = dynamic_cast<GNC::GCS::Events::EventoModificacionImagen*>(evt);
+                if (pEvt == NULL) {
+                        std::cerr << "Error al interpretar evento como evento de modificaci�n de imagen: Evento = " << evt << std::endl;
+                        return;
+                }
+                switch (pEvt->GetTipo()) {
+                case GNC::GCS::Events::EventoModificacionImagen::ImagenRecalibrada: {
+                        lista.push_back(new GNC::GCS::Events::EventoModificacionImagen(View,GNC::GCS::Events::EventoModificacionImagen::ImagenCargada, -1));
+                }
+                break;
+                default:
+                        break;
+                }
+                if (pEvt->GetApilarRender()) {
+                        lista.push_back(new GNC::GCS::Events::EventoRender(View,pEvt->GetSliceAfectado()));
+                }
+        }
+        break;
+        default:
+                break;
+        }
+}
+
+void GWaveformView::ProcesarEvento(GNC::GCS::Events::IEvent *evt)
+{
+        switch (evt->GetCodigoEvento()) {
+        case ginkgoEVT_Core_ModificacionImagen: {
+                GNC::GCS::Events::EventoModificacionImagen* pEvt = dynamic_cast<GNC::GCS::Events::EventoModificacionImagen*>(evt);
+                if (pEvt == NULL) {
+                        std::cerr << "Error al interpretar evento como evento de modificaci�n de imagen: Evento = " << evt << std::endl;
+                        return;
+                }
+                switch (pEvt->GetTipo()) {
+                case GNC::GCS::Events::EventoModificacionImagen::ImagenModificada:
+                case GNC::GCS::Events::EventoModificacionImagen::ImagenCargada:
+                case GNC::GCS::Events::EventoModificacionImagen::SliceCambiado: {
+                        ViewImage2D->Modified();
+                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(View,GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas));
+                        if (View->GetECGStudy()->Ok()) {
+                                WECG->Reload(View->GetECGStudy()->GetListOfChannels());
+                        }
+                }
+                break;
+                case GNC::GCS::Events::EventoModificacionImagen::ImagenRecalibrada: {
+                        View->GetEstudio()->RecalibrateActiveImage(pEvt->GetNewSpacing(), pEvt->GetNewOrigin());
+                }
+                break;
+                case GNC::GCS::Events::EventoModificacionImagen::VisualizacionImagenModificada: {
+                        //para que pille bien el window/level
+                        if(pEvt->ResetZoom()) {
+                                ViewImage2D->ResetZoom(false, pEvt->GetResetZoomMode());
+                        }
+                        GNC::GCS::IEntorno::Instance()->GetControladorEventos()->ProcesarEvento(new GNC::GCS::Events::EventoModificacionImagen(View,GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas));
+                }
+                break;
+                case GNC::GCS::Events::EventoModificacionImagen::ImagenDescargada: {
+                }
+                break;
+
+                case GNC::GCS::Events::EventoModificacionImagen::MapaModificado:
+                case GNC::GCS::Events::EventoModificacionImagen::AnotacionesEstaticasModificadas:
+                        break;
+                }
+        }//fin modificacion
+        break;
+
+        case ginkgoEVT_Core_Render: {
+                ViewInteractor2D->Refresh(false);
+        }
+        break;
+        default:
+                break;
+        }
+}
+}
+}
diff --git a/visualizator/visualizator/wxvtk/gwaveformview.h b/visualizator/visualizator/wxvtk/gwaveformview.h
new file mode 100644
index 0000000..c814b1b
--- /dev/null
+++ b/visualizator/visualizator/wxvtk/gwaveformview.h
@@ -0,0 +1,86 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+
+#include <api/observers/ieventsobserver.h>
+#include <export/contracts/iwidgetscontract.h>
+
+#include "visualizatorviews.h"
+
+class vtkGinkgoImageViewer;
+class wxGinkgoToolBar;
+namespace GNKVisualizator
+{
+namespace Widgets
+{
+class WECG;
+}
+class WaveFormView;
+namespace GUI
+{
+class GWaveformViewDelegate;
+class GWaveformAnnotatorDelegate;
+
+class GWaveformView : public GWaveformViewBase, public GNC::GCS::IWidgetsContract, public GNC::GCS::IEventsObserver
+{
+        friend class GWaveformViewDelegate;
+        friend class GWaveformAnnotatorDelegate;
+public:
+        /* Constructor */
+        GWaveformView(GNKVisualizator::WaveFormView* pView);
+
+        /* Destructor */
+        ~GWaveformView();
+
+        void InitPipeline();
+
+        void StopPipeline();
+
+        void OnFinishLoad();
+
+        virtual GNC::GCS::IWidgetsManager* GetManager();
+
+        void OnPaint(wxPaintEvent& event);
+        virtual void OnComboGroup(wxCommandEvent &event);
+        virtual void OnShowHideMetadata(wxCommandEvent &event);
+        virtual void ShowMetaData(bool show);
+        virtual void OnShowHideCornerAnnotations(wxCommandEvent &event);
+
+
+
+protected:
+        void OnFocus(wxChildFocusEvent &event);
+
+        void PreProcesarEvento(GNC::GCS::Events::IEvent* evt, std::list<GNC::GCS::Events::IEvent*>& lista);
+        void ProcesarEvento(GNC::GCS::Events::IEvent *evt) ;
+
+        GNKVisualizator::WaveFormView* View;
+        GNKVisualizator::Widgets::WECG* WECG;
+        wxGinkgoToolBar* m_pButtonBar;
+
+        GNC::GCS::IWidgetsManager* m_pManager;
+        GNC::GCS::Ptr<GWaveformViewDelegate> Delegate;
+        GNC::GCS::Ptr<GWaveformAnnotatorDelegate> AnnotatorDelegate;
+};
+}
+}
+
diff --git a/visualizator/visualizator/wxvtk/previewpanelvisualizator.cpp b/visualizator/visualizator/wxvtk/previewpanelvisualizator.cpp
new file mode 100644
index 0000000..5504619
--- /dev/null
+++ b/visualizator/visualizator/wxvtk/previewpanelvisualizator.cpp
@@ -0,0 +1,257 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include <wx/dnd.h>
+#include <main/gui/previewpanel/previewpanelmodel.h>
+#include <main/gui/previewpanel/previewpanel.h>
+#include <api/controllers/ihistorycontroller.h>
+#include <visualizator/wxvtk/gvistacompleja.h>
+#include <api/dicom/dcmdictionary.h>
+#include <api/internationalization/internationalization.h>
+#include <eventos/scgenerated.h>
+#include <api/controllers/ieventscontroller.h>
+#include <api/ivista.h>
+#include <resources/ginkgoresourcesmanager.h>
+#include <main/gui/pacsupload/pacsuploaddialog.h>
+#include <main/controllers/commandcontroller.h>
+#include <commands/sendpacscommand.h>
+
+#include "previewpanelvisualizator.h"
+
+#define PACS_UPLOAD 2
+
+namespace GNKVisualizator
+{
+namespace GUI
+{
+//////////////////////BEGIN D&D/////////////////////////
+wxDnDPreviewPanelVisualizator::wxDnDPreviewPanelVisualizator(long seriesPk)
+#if defined(_WINDOWS)
+        : wxDataObjectSimple(wxDF_PRIVATE)
+#else
+        : wxDataObjectSimple(wxDF_UNICODETEXT)
+#endif
+{
+        SeriesPk = seriesPk;
+}
+long wxDnDPreviewPanelVisualizator::GetSeriesPk()
+{
+        return SeriesPk;
+}
+// implement base class pure virtuals
+// ----------------------------------
+size_t wxDnDPreviewPanelVisualizator::GetDataSize() const
+{
+        return sizeof(SeriesPk);
+}
+bool wxDnDPreviewPanelVisualizator::GetDataHere(void *buf) const
+{
+        (*((long*)buf)) = SeriesPk;
+        return true;
+}
+bool wxDnDPreviewPanelVisualizator::SetData(size_t /*len*/, const void *buf)
+{
+        SeriesPk = (*(const long*)buf);
+        return true;
+}
+// Must provide overloads to avoid hiding them (and warnings about it)
+size_t wxDnDPreviewPanelVisualizator::GetDataSize(const wxDataFormat&) const
+{
+        return GetDataSize();
+}
+bool wxDnDPreviewPanelVisualizator::GetDataHere(const wxDataFormat&, void *buf) const
+{
+        return GetDataHere(buf);
+}
+bool wxDnDPreviewPanelVisualizator::SetData(const wxDataFormat&, size_t len, const void *buf)
+{
+        return SetData(len, buf);
+}
+//////////////////////END D&D/////////////////////////
+
+
+class IPreviewNodeVisualizator : public GNC::GUI::IPreviewNode
+{
+public:
+        IPreviewNodeVisualizator(const std::string& label): GNC::GUI::IPreviewNode(label)
+        {
+        }
+        void OnShowMenu(wxWindow* /*pParent*/)
+        {
+        }
+        void OnPreviewDClick(wxWindow* /*pParent*/)
+        {
+        }
+        virtual void OnPreviewLDown(wxWindow* /*pParent*/)
+        {
+        }
+};
+
+//////////////////////BEGIN MENU/////////////////////////
+class EXTAPI wxLeafPanelDefaultHandler: public wxEvtHandler
+{
+public:
+        wxLeafPanelDefaultHandler(wxEvtHandler* pParent, GVistaCompleja* view, long seriesPk):
+                GView(view),
+                SeriesPk(seriesPk),
+                m_pParent(pParent)
+
+        {
+                // Connect Events
+                m_pParent->Connect(PACS_UPLOAD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxLeafPanelDefaultHandler::OnPacsUpload),NULL,this);
+        }
+        virtual ~wxLeafPanelDefaultHandler()
+        {
+                m_pParent->Disconnect(PACS_UPLOAD, wxEVT_COMMAND_MENU_SELECTED, wxCommandEventHandler( wxLeafPanelDefaultHandler::OnPacsUpload),NULL,this);
+        }
+
+        virtual void OnPacsUpload(wxCommandEvent& /*event*/)
+        {
+                std::list<long> viewSeries;
+                viewSeries.insert(viewSeries.begin(), GView->GetView()->GetEstudio()->OpenedSeries.begin(), GView->GetView()->GetEstudio()->OpenedSeries.end());
+                std::list<long> selectedSeries;
+                selectedSeries.push_back(SeriesPk);
+
+                GNC::GUI::PACSUploadDialog dlg(GView->GetView()->GetWindow(), viewSeries, selectedSeries);
+
+                if (dlg.ShowModal() == wxID_OK) {
+                        std::list<long> listOfSeries;
+                        listOfSeries = dlg.GetSelectedSeries();
+                        if (!listOfSeries.empty()) {
+                                GADAPI::SendPACSCommand* pCmd = new GADAPI::SendPACSCommand(dlg.GetSelectedServer(), "", listOfSeries);
+                                GNC::GCS::ICommandController::Instance()->ProcessAsync(_Std("Uploading to the PACS ..."),pCmd, NULL);
+                        }
+                }
+        }
+
+protected:
+        GVistaCompleja* GView;
+        long SeriesPk;
+        wxEvtHandler* m_pParent;
+};
+//////////////////////END MENU/////////////////////////
+
+class IPreviewLeafVisualizator : public GNC::GUI::IPreviewLeaf
+{
+public:
+        IPreviewLeafVisualizator(GVistaCompleja* view, long seriesPk, const std::string& label, const std::string& label2): GNC::GUI::IPreviewLeaf(label, label2)
+        {
+                this->VisualizatorView = view;
+                this->seriesPk = seriesPk;
+        }
+        virtual void OnShowMenu(wxWindow* pParent)
+        {
+                wxMenu popupMenu;
+                wxMenuItem* pItem = popupMenu.Append(PACS_UPLOAD, _("Upload series to PACS..."));
+#ifdef __WXMSW__
+                pItem->SetBitmaps(GinkgoResourcesManager::MenuIcons::GetIcoSendToPACS());
+#else
+                pItem->SetBitmap(GinkgoResourcesManager::MenuIcons::GetIcoSendToPACS());
+#endif
+                wxLeafPanelDefaultHandler menuHandler(pParent, VisualizatorView, seriesPk);
+                pParent->PopupMenu(&popupMenu);
+        }
+        virtual void OnPreviewDClick(wxWindow* /*pParent*/)
+        {
+                VisualizatorView->LoadSeries(seriesPk);
+        }
+        virtual void OnPreviewLDown(wxWindow* pParent)
+        {
+                wxDnDPreviewPanelVisualizator myData(seriesPk);
+                wxDropSource dragSource(myData,pParent);
+                wxDragResult result = dragSource.DoDragDrop(wxDrag_CopyOnly);
+                if (result == wxDragCopy) {
+                }
+        }
+
+        GVistaCompleja* VisualizatorView;
+        long seriesPk;
+};
+}
+}
+
+
+GNKVisualizator::GUI::PreviewPanelVisualizator::PreviewPanelVisualizator(GNC::GCS::IVista* pView, GVistaCompleja* pParent) : GNC::GUI::PreviewPanel(pView, pParent)
+{
+        pRoot = NULL;
+        GNC::GCS::IEventsController::Instance()->Registrar(this, GNC::GCS::Events::SCGeneratedEvent(m_pView));
+}
+
+GNKVisualizator::GUI::PreviewPanelVisualizator::~PreviewPanelVisualizator()
+{
+        if (pRoot != NULL) {
+                delete pRoot;
+        }
+}
+
+
+void GNKVisualizator::GUI::PreviewPanelVisualizator::LoadModel()
+{
+        if (pRoot != NULL) {
+                delete pRoot;
+        }
+
+        GNC::GCS::Ptr<GNC::GCS::IStudyContext>& pStudy = m_pView->GetEstudio();
+        GVistaCompleja* GView = dynamic_cast<GVistaCompleja*>(GetParent());
+
+        pRoot = new GNKVisualizator::GUI::IPreviewNodeVisualizator(std::string(wxString::Format(_("%d series"), (int) (pStudy->OpenedSeries.size())).ToUTF8()));
+        for (std::vector<long>::iterator it = pStudy->OpenedSeries.begin(); it != pStudy->OpenedSeries.end(); ++it) {
+                GNC::GCS::IHistoryController::SeriesModel seriesModel = GNC::GCS::IHistoryController::Instance()->GetSeriesModel((*it));
+                GNC::GCS::IHistoryController::FileModel fileModel = GNC::GCS::IHistoryController::Instance()->GetFrameOfReference((*it));
+                std::ostringstream ostr;
+                ostr << seriesModel.series_modality << " (" << seriesModel.num_instances << ")";
+                GNC::GUI::IPreviewLeaf* pLeaf = new GNKVisualizator::GUI::IPreviewLeafVisualizator(GView, (*it), seriesModel.series_desc, ostr.str());
+                pLeaf->SetFilePk(fileModel.pk);
+                pRoot->AddChild(pLeaf);
+        }
+        GNC::GUI::PreviewPanel::LoadModel(pRoot);
+}
+
+
+
+void GNKVisualizator::GUI::PreviewPanelVisualizator::ProcesarEvento(GNC::GCS::Events::IEvent* evt)
+{
+        GNC::GUI::PreviewPanel::ProcesarEvento(evt);
+
+        switch(evt->GetCodigoEvento()) {
+        case ginkgoEVT_Core_SCGenerated: {
+                GNC::GCS::Events::SCGeneratedEvent* pSCGenEvt = dynamic_cast<GNC::GCS::Events::SCGeneratedEvent*>(evt);
+                if(pSCGenEvt != NULL) {
+                        GNC::GCS::Ptr<GNC::GCS::IStudyContext>& pStudy = m_pView->GetEstudio();
+                        for (std::list<long>::const_iterator itNew = pSCGenEvt->GetSeriesId().begin(); itNew != pSCGenEvt->GetSeriesId().end(); ++itNew) {
+                                bool newSeries = true;
+                                for (std::vector<long>::const_iterator itOpened = pStudy->OpenedSeries.begin();  itOpened != pStudy->OpenedSeries.end(); ++itOpened) {
+                                        if ((*itOpened) == (*itNew)) {
+                                                newSeries = false;
+                                                break;
+                                        }
+                                }
+                                if (newSeries) {
+                                        pStudy->OpenedSeries.push_back((*itNew));
+                                }
+                        }
+                        LoadModel();
+                }
+        }
+        break;
+        }
+}
+
diff --git a/visualizator/visualizator/wxvtk/previewpanelvisualizator.h b/visualizator/visualizator/wxvtk/previewpanelvisualizator.h
new file mode 100644
index 0000000..07bd4d3
--- /dev/null
+++ b/visualizator/visualizator/wxvtk/previewpanelvisualizator.h
@@ -0,0 +1,64 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <main/gui/previewpanel/previewpanel.h>
+#include <visualizator/estudios/visualizatorstudy.h>
+
+class GVistaCompleja;
+namespace GNKVisualizator
+{
+namespace GUI
+{
+class wxDnDPreviewPanelVisualizator : public wxDataObjectSimple
+{
+public:
+        wxDnDPreviewPanelVisualizator(long seriesPk = -1);
+        long GetSeriesPk();
+        // implement base class pure virtuals
+        // ----------------------------------
+        virtual size_t GetDataSize() const;
+        virtual bool GetDataHere(void *buf) const;
+        virtual bool SetData(size_t /*len*/, const void *buf);
+        // Must provide overloads to avoid hiding them (and warnings about it)
+        virtual size_t GetDataSize(const wxDataFormat&) const;
+        virtual bool GetDataHere(const wxDataFormat&, void *buf) const;
+        virtual bool SetData(const wxDataFormat&, size_t len, const void *buf);
+
+private:
+        long SeriesPk;
+        DECLARE_NO_COPY_CLASS(wxDnDPreviewPanelVisualizator)
+};
+
+class PreviewPanelVisualizator: public GNC::GUI::PreviewPanel
+{
+public:
+        PreviewPanelVisualizator(GNC::GCS::IVista* pView, GVistaCompleja* pParent);
+        ~PreviewPanelVisualizator();
+
+        void LoadModel();
+
+        virtual void ProcesarEvento(GNC::GCS::Events::IEvent* evt) ;
+
+        GNC::GUI::IPreviewNode* pRoot;
+};
+}
+}
diff --git a/visualizator/visualizator/wxvtk/visualizatorviews.cpp b/visualizator/visualizator/wxvtk/visualizatorviews.cpp
new file mode 100644
index 0000000..f9211b8
--- /dev/null
+++ b/visualizator/visualizator/wxvtk/visualizatorviews.cpp
@@ -0,0 +1,360 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#include "wx/ginkgostyle/ginkgostyle.h"
+
+#include "visualizatorviews.h"
+
+///////////////////////////////////////////////////////////////////////////
+
+VistaSimpleBase::VistaSimpleBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetBackgroundColour( wxColour( 64, 64, 64 ) );
+
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxHORIZONTAL );
+
+        ViewInteractor2D  = new wxVTKRenderWindowInteractor (this, wxID_ANY,
+                        wxDefaultPosition,
+                        wxDefaultSize,
+                        wxWANTS_CHARS | wxFULL_REPAINT_ON_RESIZE,
+                        wxT(""));
+
+        ViewImage2D = vtkSmartPointer<vtkGinkgoImageViewer> ::New();
+
+        vtkSmartPointer<vtkRenderer> rend1 = vtkSmartPointer<vtkRenderer>::New();
+
+        ViewImage2D->SetRenderWindow ( this->ViewInteractor2D->GetRenderWindow() );
+        ViewImage2D->SetRenderer (rend1);
+
+        bSizer7->Add( ViewInteractor2D, 1, wxALL|wxEXPAND, 0 );
+
+        m_pSliderTimeInstant = new wxSlider( this, wxID_ANY, 0, 0, 1, wxDefaultPosition, wxDefaultSize, wxSL_AUTOTICKS|wxSL_LEFT|wxSL_VERTICAL );
+        m_pSliderTimeInstant->SetForegroundColour( wxColour( 64, 64, 64 ) );
+        m_pSliderTimeInstant->Hide();
+
+        bSizer7->Add( m_pSliderTimeInstant, 0, wxEXPAND, 1 );
+
+
+        this->SetSizer( bSizer7 );
+        this->Layout();
+        bSizer7->Fit( this );
+
+        // Connect Events
+        ViewInteractor2D->Connect( wxEVT_CHAR, wxKeyEventHandler( VistaSimpleBase::OnChar ), NULL, this );
+        m_pSliderTimeInstant->Connect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( VistaSimpleBase::OnEraseBackground ), NULL, this );
+        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+}
+
+VistaSimpleBase::~VistaSimpleBase()
+{
+        // Disconnect Events
+        ViewInteractor2D->Disconnect( wxEVT_CHAR, wxKeyEventHandler( VistaSimpleBase::OnChar ), NULL, this );
+        m_pSliderTimeInstant->Disconnect( wxEVT_ERASE_BACKGROUND, wxEraseEventHandler( VistaSimpleBase::OnEraseBackground ), NULL, this );
+        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+        m_pSliderTimeInstant->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( VistaSimpleBase::OnTimeInstantChanged ), NULL, this );
+
+}
+
+VistaComplejaBase::VistaComplejaBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetBackgroundColour( wxColour( 64, 64, 64 ) );
+        this->Hide();
+
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pSizerTools = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer7->Add( m_pSizerTools, 0, wxEXPAND|wxALIGN_CENTER_HORIZONTAL|wxTOP|wxRIGHT|wxLEFT, 2 );
+
+        m_pSizerView = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pSizerSeries = new wxGridSizer( 1, 1, 1, 1 );
+
+
+        m_pSizerView->Add( m_pSizerSeries, 1, wxEXPAND, 2 );
+
+
+        bSizer7->Add( m_pSizerView, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 2 );
+
+        m_panel7 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,1 ), wxTAB_TRAVERSAL );
+        m_panel7->SetBackgroundColour( wxColour( 30, 30, 30 ) );
+        m_panel7->SetMinSize( wxSize( -1,1 ) );
+        m_panel7->SetMaxSize( wxSize( -1,1 ) );
+
+        bSizer7->Add( m_panel7, 0, wxEXPAND|wxRIGHT|wxLEFT, 2 );
+
+        m_pPanelManipulacion = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelManipulacion->SetBackgroundColour( wxColour( 64, 64, 64 ) );
+        m_pPanelManipulacion->Enable( false );
+
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pSizerIzquierda = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer8->Add( m_pSizerIzquierda, 0, wxEXPAND, 5 );
+
+        m_pPanelScroll = new wxPanel( m_pPanelManipulacion, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelScroll->SetBackgroundColour( wxColour( 64, 64, 64 ) );
+
+        m_pSizerScroll = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pSliderSlice = new wxSlider( m_pPanelScroll, wxID_ANY, 0, 0, 100, wxDefaultPosition, wxDefaultSize, wxSL_BOTH );
+        m_pSliderSlice->SetForegroundColour( wxColour( 64, 64, 64 ) );
+
+        m_pSizerScroll->Add( m_pSliderSlice, 1, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 0 );
+
+
+        m_pPanelScroll->SetSizer( m_pSizerScroll );
+        m_pPanelScroll->Layout();
+        m_pSizerScroll->Fit( m_pPanelScroll );
+        bSizer8->Add( m_pPanelScroll, 1, wxEXPAND | wxALL, 0 );
+
+        m_pSizerDerecho = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer8->Add( m_pSizerDerecho, 0, wxEXPAND, 5 );
+
+
+        m_pPanelManipulacion->SetSizer( bSizer8 );
+        m_pPanelManipulacion->Layout();
+        bSizer8->Fit( m_pPanelManipulacion );
+        bSizer7->Add( m_pPanelManipulacion, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 2 );
+
+
+        this->SetSizer( bSizer7 );
+        this->Layout();
+        bSizer7->Fit( this );
+
+        // Connect Events
+        this->Connect( wxEVT_PAINT, wxPaintEventHandler( VistaComplejaBase::OnPaint ) );
+        m_pSliderSlice->Connect( wxEVT_SCROLL_TOP, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Connect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Connect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Connect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Connect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Connect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Connect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Connect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Connect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+}
+
+VistaComplejaBase::~VistaComplejaBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( VistaComplejaBase::OnPaint ) );
+        m_pSliderSlice->Disconnect( wxEVT_SCROLL_TOP, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Disconnect( wxEVT_SCROLL_BOTTOM, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Disconnect( wxEVT_SCROLL_LINEUP, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Disconnect( wxEVT_SCROLL_LINEDOWN, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Disconnect( wxEVT_SCROLL_PAGEUP, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Disconnect( wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Disconnect( wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Disconnect( wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+        m_pSliderSlice->Disconnect( wxEVT_SCROLL_CHANGED, wxScrollEventHandler( VistaComplejaBase::OnZSliderScroll ), NULL, this );
+
+}
+
+DialogoSincronizacionBase::DialogoSincronizacionBase( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style )
+{
+        this->SetSizeHints( wxSize( 450,275 ), wxDefaultSize );
+
+        wxBoxSizer* bSizer9;
+        bSizer9 = new wxBoxSizer( wxVERTICAL );
+
+        m_pBody = new BodyPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer101;
+        bSizer101 = new wxBoxSizer( wxVERTICAL );
+
+        m_panel7 = new TitledPanelSinBorder( m_pBody, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_panel7->SetToolTip( _("Select the view you want to synchronize with the current") );
+
+        wxBoxSizer* bSizer11;
+        bSizer11 = new wxBoxSizer( wxVERTICAL );
+
+        wxArrayString m_pCheckListVistasChoices;
+        m_pCheckListVistas = new wxCheckListBox( m_panel7, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_pCheckListVistasChoices, wxLB_MULTIPLE );
+        bSizer11->Add( m_pCheckListVistas, 1, wxEXPAND, 5 );
+
+
+        m_panel7->SetSizer( bSizer11 );
+        m_panel7->Layout();
+        bSizer11->Fit( m_panel7 );
+        bSizer101->Add( m_panel7, 1, wxEXPAND, 5 );
+
+
+        m_pBody->SetSizer( bSizer101 );
+        m_pBody->Layout();
+        bSizer101->Fit( m_pBody );
+        bSizer9->Add( m_pBody, 1, wxEXPAND, 5 );
+
+        m_pFooter = new FooterPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer10;
+        bSizer10 = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer10->Add( 0, 0, 1, wxEXPAND, 5 );
+
+        m_button2 = new wxButton( m_pFooter, wxID_OK, _("Accept"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer10->Add( m_button2, 0, wxALIGN_RIGHT|wxRIGHT, 5 );
+
+        m_button3 = new wxButton( m_pFooter, wxID_CANCEL, _("Cancel"), wxDefaultPosition, wxDefaultSize, 0 );
+        bSizer10->Add( m_button3, 0, wxALIGN_RIGHT|wxLEFT, 5 );
+
+
+        m_pFooter->SetSizer( bSizer10 );
+        m_pFooter->Layout();
+        bSizer10->Fit( m_pFooter );
+        bSizer9->Add( m_pFooter, 0, wxEXPAND, 5 );
+
+
+        this->SetSizer( bSizer9 );
+        this->Layout();
+
+        // Connect Events
+        m_button2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoSincronizacionBase::OnAceptarClick ), NULL, this );
+        m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoSincronizacionBase::OnCancelarClick ), NULL, this );
+}
+
+DialogoSincronizacionBase::~DialogoSincronizacionBase()
+{
+        // Disconnect Events
+        m_button2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoSincronizacionBase::OnAceptarClick ), NULL, this );
+        m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DialogoSincronizacionBase::OnCancelarClick ), NULL, this );
+
+}
+
+GWaveformViewBase::GWaveformViewBase( wxWindow* parent, wxWindowID id, const wxPoint& pos, const wxSize& size, long style ) : wxPanel( parent, id, pos, size, style )
+{
+        this->SetBackgroundColour( wxColour( 64, 64, 64 ) );
+        this->Hide();
+
+        wxBoxSizer* bSizer7;
+        bSizer7 = new wxBoxSizer( wxVERTICAL );
+
+        m_pSizerTools = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer7->Add( m_pSizerTools, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 2 );
+
+        m_pSplitterPanel = new wxSplitterWindow( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxSP_3D );
+        m_pSplitterPanel->SetSashGravity( 0.8 );
+        m_pSplitterPanel->Connect( wxEVT_IDLE, wxIdleEventHandler( GWaveformViewBase::m_pSplitterPanelOnIdle ), NULL, this );
+        m_pSplitterPanel->SetMinimumPaneSize( 100 );
+
+        m_pPanelView = new wxPanel( m_pSplitterPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        wxBoxSizer* bSizer15;
+        bSizer15 = new wxBoxSizer( wxVERTICAL );
+
+        ViewInteractor2D = new wxVTKRenderWindowInteractor (m_pPanelView, wxID_ANY,
+                        wxDefaultPosition,
+                        wxDefaultSize,
+                        wxWANTS_CHARS | wxNO_FULL_REPAINT_ON_RESIZE,
+                        wxT(""));
+
+        ViewImage2D = vtkGinkgoImageViewer::New();
+
+        vtkRenderer* rend1 = vtkRenderer::New();
+
+        ViewImage2D->SetRenderWindow ( this->ViewInteractor2D->GetRenderWindow() );
+        ViewImage2D->SetRenderer (rend1);
+        rend1->Delete();
+
+        bSizer15->Add( ViewInteractor2D, 1, wxEXPAND, 5 );
+
+
+        m_pPanelView->SetSizer( bSizer15 );
+        m_pPanelView->Layout();
+        bSizer15->Fit( m_pPanelView );
+        m_pPanelMetadata = new SubTitledPanel( m_pSplitterPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pPanelMetadata->Hide();
+        m_pPanelMetadata->SetToolTip( _("Metadata") );
+
+        wxBoxSizer* bSizer14;
+        bSizer14 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pTextMeasurements = new wxTextCtrl( m_pPanelMetadata, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
+        m_pTextMeasurements->SetMaxLength( 0 );
+        bSizer14->Add( m_pTextMeasurements, 1, wxEXPAND|wxRIGHT, 5 );
+
+        m_pTextDiagnosis = new wxTextCtrl( m_pPanelMetadata, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
+        m_pTextDiagnosis->SetMaxLength( 0 );
+        bSizer14->Add( m_pTextDiagnosis, 2, wxEXPAND|wxLEFT, 5 );
+
+
+        m_pPanelMetadata->SetSizer( bSizer14 );
+        m_pPanelMetadata->Layout();
+        bSizer14->Fit( m_pPanelMetadata );
+        m_pSplitterPanel->SplitHorizontally( m_pPanelView, m_pPanelMetadata, 149 );
+        bSizer7->Add( m_pSplitterPanel, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 2 );
+
+        m_panel7 = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxSize( -1,1 ), wxTAB_TRAVERSAL );
+        m_panel7->SetBackgroundColour( wxColour( 30, 30, 30 ) );
+        m_panel7->SetMinSize( wxSize( -1,1 ) );
+        m_panel7->SetMaxSize( wxSize( -1,1 ) );
+
+        bSizer7->Add( m_panel7, 0, wxEXPAND|wxRIGHT|wxLEFT, 2 );
+
+        m_pManipulationPanel = new wxPanel( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+        m_pManipulationPanel->SetBackgroundColour( wxColour( 64, 64, 64 ) );
+
+        wxBoxSizer* bSizer8;
+        bSizer8 = new wxBoxSizer( wxHORIZONTAL );
+
+        m_pComboGroups = new wxComboBox( m_pManipulationPanel, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0, NULL, wxCB_DROPDOWN|wxCB_READONLY );
+        bSizer8->Add( m_pComboGroups, 0, wxALIGN_CENTER_VERTICAL, 2 );
+
+
+        bSizer8->Add( 0, 0, 1, wxEXPAND, 0 );
+
+        m_pSizerRight = new wxBoxSizer( wxHORIZONTAL );
+
+
+        bSizer8->Add( m_pSizerRight, 0, wxEXPAND, 5 );
+
+
+        m_pManipulationPanel->SetSizer( bSizer8 );
+        m_pManipulationPanel->Layout();
+        bSizer8->Fit( m_pManipulationPanel );
+        bSizer7->Add( m_pManipulationPanel, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 2 );
+
+
+        this->SetSizer( bSizer7 );
+        this->Layout();
+        bSizer7->Fit( this );
+
+        // Connect Events
+        this->Connect( wxEVT_PAINT, wxPaintEventHandler( GWaveformViewBase::OnPaint ) );
+        m_pComboGroups->Connect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( GWaveformViewBase::OnComboGroup ), NULL, this );
+}
+
+GWaveformViewBase::~GWaveformViewBase()
+{
+        // Disconnect Events
+        this->Disconnect( wxEVT_PAINT, wxPaintEventHandler( GWaveformViewBase::OnPaint ) );
+        m_pComboGroups->Disconnect( wxEVT_COMMAND_COMBOBOX_SELECTED, wxCommandEventHandler( GWaveformViewBase::OnComboGroup ), NULL, this );
+
+}
diff --git a/visualizator/visualizator/wxvtk/visualizatorviews.h b/visualizator/visualizator/wxvtk/visualizatorviews.h
new file mode 100644
index 0000000..96a68ac
--- /dev/null
+++ b/visualizator/visualizator/wxvtk/visualizatorviews.h
@@ -0,0 +1,193 @@
+///////////////////////////////////////////////////////////////////////////
+// C++ code generated with wxFormBuilder (version Nov  6 2013)
+// http://www.wxformbuilder.org/
+//
+// PLEASE DO "NOT" EDIT THIS FILE!
+///////////////////////////////////////////////////////////////////////////
+
+#ifndef __VISUALIZATORVIEWS_H__
+#define __VISUALIZATORVIEWS_H__
+
+#include <wx/artprov.h>
+#include <wx/xrc/xmlres.h>
+#include <wx/intl.h>
+class BodyPanel;
+class FooterPanel;
+class SubTitledPanel;
+class TitledPanelSinBorder;
+
+#undef __DEPRECATED
+#include <vtkRenderer.h>
+#include <vtkSmartPointer.h>
+#include <wxVTKRenderWindowInteractor.h>
+#include <vtk/vtkginkgoimageviewer.h>
+#include <wx/gdicmn.h>
+#include <wx/font.h>
+#include <wx/colour.h>
+#include <wx/settings.h>
+#include <wx/string.h>
+#include <wx/slider.h>
+#include <wx/sizer.h>
+#include <wx/panel.h>
+#include <wx/checklst.h>
+#include <wx/button.h>
+#include <wx/dialog.h>
+#include <wx/textctrl.h>
+#include <wx/splitter.h>
+#include <wx/combobox.h>
+
+///////////////////////////////////////////////////////////////////////////
+
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class VistaSimpleBase
+///////////////////////////////////////////////////////////////////////////////
+class VistaSimpleBase : public wxPanel
+{
+private:
+
+protected:
+        wxSlider* m_pSliderTimeInstant;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnChar( wxKeyEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnEraseBackground( wxEraseEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnTimeInstantChanged( wxScrollEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+        vtkSmartPointer<vtkGinkgoImageViewer> ViewImage2D;
+        vtkSmartPointer<wxVTKRenderWindowInteractor> ViewInteractor2D;
+
+
+        VistaSimpleBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxCLIP_CHILDREN|wxFULL_REPAINT_ON_RESIZE|wxTAB_TRAVERSAL );
+        ~VistaSimpleBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class VistaComplejaBase
+///////////////////////////////////////////////////////////////////////////////
+class VistaComplejaBase : public wxPanel
+{
+private:
+
+protected:
+        wxBoxSizer* m_pSizerTools;
+        wxBoxSizer* m_pSizerView;
+        wxGridSizer* m_pSizerSeries;
+        wxPanel* m_panel7;
+        wxPanel* m_pPanelManipulacion;
+        wxBoxSizer* m_pSizerIzquierda;
+        wxPanel* m_pPanelScroll;
+        wxBoxSizer* m_pSizerScroll;
+        wxBoxSizer* m_pSizerDerecho;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnPaint( wxPaintEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnZSliderScroll( wxScrollEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+        wxSlider* m_pSliderSlice;
+
+        VistaComplejaBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~VistaComplejaBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class DialogoSincronizacionBase
+///////////////////////////////////////////////////////////////////////////////
+class DialogoSincronizacionBase : public wxDialog
+{
+private:
+
+protected:
+        BodyPanel* m_pBody;
+        TitledPanelSinBorder* m_panel7;
+        wxCheckListBox* m_pCheckListVistas;
+        FooterPanel* m_pFooter;
+        wxButton* m_button2;
+        wxButton* m_button3;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnAceptarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnCancelarClick( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+
+        DialogoSincronizacionBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Synchronize..."), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 450,275 ), long style = wxDEFAULT_DIALOG_STYLE );
+        ~DialogoSincronizacionBase();
+
+};
+
+///////////////////////////////////////////////////////////////////////////////
+/// Class GWaveformViewBase
+///////////////////////////////////////////////////////////////////////////////
+class GWaveformViewBase : public wxPanel
+{
+private:
+
+protected:
+        wxBoxSizer* m_pSizerTools;
+        wxSplitterWindow* m_pSplitterPanel;
+        wxPanel* m_pPanelView;
+        SubTitledPanel* m_pPanelMetadata;
+        wxTextCtrl* m_pTextMeasurements;
+        wxTextCtrl* m_pTextDiagnosis;
+        wxPanel* m_panel7;
+        wxPanel* m_pManipulationPanel;
+        wxComboBox* m_pComboGroups;
+        wxBoxSizer* m_pSizerRight;
+
+        // Virtual event handlers, overide them in your derived class
+        virtual void OnPaint( wxPaintEvent& event )
+        {
+                event.Skip();
+        }
+        virtual void OnComboGroup( wxCommandEvent& event )
+        {
+                event.Skip();
+        }
+
+
+public:
+        vtkSmartPointer<vtkGinkgoImageViewer> ViewImage2D;
+        vtkSmartPointer<wxVTKRenderWindowInteractor> ViewInteractor2D;
+
+
+        GWaveformViewBase( wxWindow* parent, wxWindowID id = wxID_ANY, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxTAB_TRAVERSAL );
+        ~GWaveformViewBase();
+
+        void m_pSplitterPanelOnIdle( wxIdleEvent& )
+        {
+                m_pSplitterPanel->SetSashPosition( 149 );
+                m_pSplitterPanel->Disconnect( wxEVT_IDLE, wxIdleEventHandler( GWaveformViewBase::m_pSplitterPanelOnIdle ), NULL, this );
+        }
+
+};
+
+#endif //__VISUALIZATORVIEWS_H__
diff --git a/visualizator/visualizator_test/visualizatortest.cpp b/visualizator/visualizator_test/visualizatortest.cpp
new file mode 100644
index 0000000..21e34e3
--- /dev/null
+++ b/visualizator/visualizator_test/visualizatortest.cpp
@@ -0,0 +1,31 @@
+/*
+ * This file is part of Ginkgo CADx
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#include "visualizatortest.h"
+namespace GNKVisualizator
+{
+VisualizatorTests::VisualizatorTests()
+{
+}
+VisualizatorTests::~VisualizatorTests()
+{
+}
+}
diff --git a/visualizator/visualizator_test/visualizatortest.h b/visualizator/visualizator_test/visualizatortest.h
new file mode 100644
index 0000000..217697f
--- /dev/null
+++ b/visualizator/visualizator_test/visualizatortest.h
@@ -0,0 +1,33 @@
+/*
+ *  Ginkgo CADx Project
+ *
+ * Copyright (c) 2015-2016 Gert Wollny
+ * Copyright (c) 2008-2014 MetaEmotion S.L. All rights reserved.
+ *
+ * Ginkgo CADx is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; version 3.
+ *
+ * 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 Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser Public License
+ * along with Ginkgo CADx; if not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+
+#pragma once
+#include <api/apitest.h>
+
+namespace GNKVisualizator
+{
+class EXTTEST VisualizatorTests
+{
+public:
+        VisualizatorTests();
+        ~VisualizatorTests();
+};
+}
diff --git a/visualizator/visustdafx.cpp b/visualizator/visustdafx.cpp
new file mode 100644
index 0000000..7d2895f
--- /dev/null
+++ b/visualizator/visustdafx.cpp
@@ -0,0 +1 @@
+#include "visustdafx.h"
\ No newline at end of file
diff --git a/visualizator/visustdafx.h b/visualizator/visustdafx.h
new file mode 100644
index 0000000..462caab
--- /dev/null
+++ b/visualizator/visustdafx.h
@@ -0,0 +1,67 @@
+#if defined(_WINDOWS)
+#if !defined (_SCL_SECURE_NO_WARNINGS)
+#define _SCL_SECURE_NO_WARNINGS
+#endif
+#if !defined (_CRT_SECURE_NO_WARNINGS)
+#define _CRT_SECURE_NO_WARNINGS
+#endif
+#else
+#if defined(__DEPRECATED)
+#undef __DEPRECATED
+#endif
+#endif
+
+#if defined(_WINDOWS) && defined(_GINKGO_DEBUG)
+#if defined _GINKGO_CHECK_LEAKS
+#define _CRTDBG_MAP_ALLOC
+#include <crtdbg.h>
+#endif
+#endif
+
+#if defined(_WINDOWS)
+#include <stdlib.h>
+#include <sys/types.h>
+#include <winsock2.h>
+#include <windows.h>
+#else // !_WIN32
+#include <sys/socket.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <unistd.h>
+#endif
+
+#if !defined(__cplusplus)
+#include <stdio.h>
+#else
+
+#include <string>
+#include <iostream>
+#include <sstream>
+#include <vector>
+#include <list>
+#include <map>
+#include <cmath>
+#include <cstdio>
+#include <cstdlib>
+#include <ctime>
+#include <limits>
+#include <algorithm>
+#include <wx/wx.h>
+#include <wx/image.h>
+#include <wx/bitmap.h>
+#include <wx/xml/xml.h>
+#include <wx/filename.h>
+#include <wx/file.h>
+#include <wx/sstream.h>
+#include <wx/tokenzr.h>
+#include <wx/thread.h>
+
+#include <vtkInformation.h>
+#include <vtkAlgorithmOutput.h>
+#include <vtkImageData.h>
+#include <vtkMatrix4x4.h>
+#include <vtkgl.h>
+
+#include <api/autoptr.h>
+#endif

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/ginkgocadx.git



More information about the debian-med-commit mailing list